@carto/ps-react-maps 3.6.0 → 3.6.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/dist/index.js +44 -44
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -8,8 +8,8 @@ import { MapProvider as Ft, Map as Dt, useMap as Rt } from "react-map-gl/maplibr
|
|
|
8
8
|
import Ut from "@deck.gl/react";
|
|
9
9
|
import { useMap as pt, APIProvider as xt, Map as $t } from "@vis.gl/react-google-maps";
|
|
10
10
|
import { GoogleMapsOverlay as qt } from "@deck.gl/google-maps";
|
|
11
|
-
import { CompositeMode as jt, TranslateMode as Bt, ModifyMode as Vt, DrawPolygonByDraggingMode as It, DrawCircleFromCenterMode as mt, DrawRectangleMode as Nt, DrawPolygonMode as Ht, EditableGeoJsonLayer as Gt, MeasureAreaMode as zt, getPickedEditHandle as Qt, MeasureDistanceMode as Wt, ViewMode as
|
|
12
|
-
import { DataFilterExtension as
|
|
11
|
+
import { CompositeMode as jt, TranslateMode as Bt, ModifyMode as Vt, DrawPolygonByDraggingMode as It, DrawCircleFromCenterMode as mt, DrawRectangleMode as Nt, DrawPolygonMode as Ht, EditableGeoJsonLayer as Gt, MeasureAreaMode as zt, getPickedEditHandle as Qt, MeasureDistanceMode as Wt, ViewMode as Kt } from "@deck.gl-community/editable-layers";
|
|
12
|
+
import { DataFilterExtension as Zt, MaskExtension as Yt } from "@deck.gl/extensions";
|
|
13
13
|
import { create as yt, createStore as ze, useStore as Qe } from "zustand";
|
|
14
14
|
import { FlyToInterpolator as Xt, WebMercatorViewport as Jt } from "@deck.gl/core";
|
|
15
15
|
import { EventManager as es } from "mjolnir.js";
|
|
@@ -303,7 +303,7 @@ function Os(r) {
|
|
|
303
303
|
let k;
|
|
304
304
|
e[18] === Symbol.for("react.memo_cache_sentinel") ? (k = (L) => {
|
|
305
305
|
const O = L.type === "deckgl" ? 0 : 1;
|
|
306
|
-
U((H) => H.map((W,
|
|
306
|
+
U((H) => H.map((W, K) => K === O ? L.value : W));
|
|
307
307
|
}, e[18] = k) : k = e[18];
|
|
308
308
|
const u = k;
|
|
309
309
|
let v, P;
|
|
@@ -375,7 +375,7 @@ const ce = "lassoLayer", Le = "maskLayer", Fs = {
|
|
|
375
375
|
labels: {
|
|
376
376
|
mask: "Mask"
|
|
377
377
|
}
|
|
378
|
-
}, Ds = [new
|
|
378
|
+
}, Ds = [new Zt({
|
|
379
379
|
filterSize: 1
|
|
380
380
|
})], _e = {
|
|
381
381
|
id: Le,
|
|
@@ -632,7 +632,7 @@ const ce = "lassoLayer", Le = "maskLayer", Fs = {
|
|
|
632
632
|
...i == null ? void 0 : i.fitBounds(n, s == null ? void 0 : s.boundsOptions),
|
|
633
633
|
...s == null ? void 0 : s.viewStateOptions
|
|
634
634
|
};
|
|
635
|
-
o.setViewState(t, l);
|
|
635
|
+
o.setViewState(t, l), o.updateViewPort(t);
|
|
636
636
|
},
|
|
637
637
|
flyTo: (t, n, s = {}) => {
|
|
638
638
|
const o = e();
|
|
@@ -644,7 +644,7 @@ const ce = "lassoLayer", Le = "maskLayer", Fs = {
|
|
|
644
644
|
...n,
|
|
645
645
|
...a
|
|
646
646
|
};
|
|
647
|
-
o.setViewState(t, l);
|
|
647
|
+
o.setViewState(t, l), o.updateViewPort(t);
|
|
648
648
|
}
|
|
649
649
|
}), js = (r) => ze()((...e) => ({
|
|
650
650
|
...Us(r)(...e),
|
|
@@ -1069,7 +1069,7 @@ function Tt(r, e, t) {
|
|
|
1069
1069
|
}
|
|
1070
1070
|
return [];
|
|
1071
1071
|
}
|
|
1072
|
-
class
|
|
1072
|
+
class Ks extends zt {
|
|
1073
1073
|
constructor() {
|
|
1074
1074
|
super(...arguments);
|
|
1075
1075
|
ee(this, "_isMeasuringSessionFinished", !1);
|
|
@@ -1188,7 +1188,7 @@ class Zs extends zt {
|
|
|
1188
1188
|
}) + "2";
|
|
1189
1189
|
}
|
|
1190
1190
|
}
|
|
1191
|
-
class
|
|
1191
|
+
class Zs extends mt {
|
|
1192
1192
|
constructor() {
|
|
1193
1193
|
super(...arguments);
|
|
1194
1194
|
ee(this, "_isMeasuringSessionFinished", !1);
|
|
@@ -1392,7 +1392,7 @@ const ne = "mapMeasureLayer", Ys = {
|
|
|
1392
1392
|
[V.mile]: "mile",
|
|
1393
1393
|
[V.yard]: "yard",
|
|
1394
1394
|
[V.feet]: "foot"
|
|
1395
|
-
},
|
|
1395
|
+
}, Z = {
|
|
1396
1396
|
"m-km": {
|
|
1397
1397
|
value: "m-km",
|
|
1398
1398
|
system: "metric"
|
|
@@ -1429,18 +1429,18 @@ const ne = "mapMeasureLayer", Ys = {
|
|
|
1429
1429
|
value: "feet",
|
|
1430
1430
|
system: "imperial"
|
|
1431
1431
|
}
|
|
1432
|
-
}, it = [
|
|
1432
|
+
}, it = [Z["m-km"], Z.kilometer, Z.meter, Z["ft-mi"], Z.mile, Z.feet], Js = [Z["m-km"], Z.kilometer, Z.meter, Z["ft-mi"], Z.mile, Z.feet], en = {
|
|
1433
1433
|
distance: {
|
|
1434
1434
|
value: "distance",
|
|
1435
1435
|
mode: Et
|
|
1436
1436
|
},
|
|
1437
1437
|
buffer: {
|
|
1438
1438
|
value: "buffer",
|
|
1439
|
-
mode:
|
|
1439
|
+
mode: Zs
|
|
1440
1440
|
},
|
|
1441
1441
|
area: {
|
|
1442
1442
|
value: "area",
|
|
1443
|
-
mode:
|
|
1443
|
+
mode: Ks
|
|
1444
1444
|
}
|
|
1445
1445
|
}, tn = {
|
|
1446
1446
|
distance: it,
|
|
@@ -1598,7 +1598,7 @@ function on({
|
|
|
1598
1598
|
outline: k
|
|
1599
1599
|
},
|
|
1600
1600
|
onEdit: $,
|
|
1601
|
-
mode: M ? c : new
|
|
1601
|
+
mode: M ? c : new Kt()
|
|
1602
1602
|
});
|
|
1603
1603
|
h(ce, L);
|
|
1604
1604
|
}, [w, i, s.mask, _, c, $, A, h, t.colors.editing, t.colors.finished]), z(() => {
|
|
@@ -1895,9 +1895,9 @@ function Lt(r) {
|
|
|
1895
1895
|
let H;
|
|
1896
1896
|
e[34] !== O || e[35] !== t ? (H = (D) => O(t, D), e[34] = O, e[35] = t, e[36] = H) : H = e[36];
|
|
1897
1897
|
const W = H;
|
|
1898
|
-
let
|
|
1899
|
-
e[37] !== t ? (
|
|
1900
|
-
const B = I(
|
|
1898
|
+
let K;
|
|
1899
|
+
e[37] !== t ? (K = (D) => D.measurements[t].positions, e[37] = t, e[38] = K) : K = e[38];
|
|
1900
|
+
const B = I(K), X = I(fn);
|
|
1901
1901
|
let he;
|
|
1902
1902
|
e[39] !== X || e[40] !== t ? (he = (D) => X(t, D), e[39] = X, e[40] = t, e[41] = he) : he = e[41];
|
|
1903
1903
|
const de = he;
|
|
@@ -2185,9 +2185,9 @@ function Br(r) {
|
|
|
2185
2185
|
let F;
|
|
2186
2186
|
e[17] !== t || e[18] !== s || e[19] !== T || e[20] !== S ? (F = (L) => {
|
|
2187
2187
|
const O = T;
|
|
2188
|
-
if (
|
|
2188
|
+
if (h.current && clearInterval(h.current), h.current = setTimeout(() => {
|
|
2189
2189
|
S(t);
|
|
2190
|
-
}, Mn)
|
|
2190
|
+
}, Mn), s) {
|
|
2191
2191
|
s(L, O);
|
|
2192
2192
|
return;
|
|
2193
2193
|
}
|
|
@@ -2201,9 +2201,9 @@ function Br(r) {
|
|
|
2201
2201
|
const $ = q;
|
|
2202
2202
|
let M;
|
|
2203
2203
|
e[27] !== y || e[28] !== t || e[29] !== o || e[30] !== g ? (M = (L) => {
|
|
2204
|
-
var W,
|
|
2204
|
+
var W, K;
|
|
2205
2205
|
const O = (W = y(t)) == null ? void 0 : W.props.layers, H = !!(O != null && O.every(Pn));
|
|
2206
|
-
g(t, H), (
|
|
2206
|
+
g(t, H), (K = o.onAfterRender) == null || K.call(o, L);
|
|
2207
2207
|
}, e[27] = y, e[28] = t, e[29] = o, e[30] = g, e[31] = M) : M = e[31];
|
|
2208
2208
|
const k = M, u = o.onDragEnd;
|
|
2209
2209
|
let v;
|
|
@@ -2552,11 +2552,11 @@ function Fn() {
|
|
|
2552
2552
|
}
|
|
2553
2553
|
}
|
|
2554
2554
|
if (O.open(L.method, W(L.url), !0), L.credentials === "include" ? O.withCredentials = !0 : L.credentials === "omit" && (O.withCredentials = !1), "responseType" in O && (l.blob ? O.responseType = "blob" : l.arrayBuffer && (O.responseType = "arraybuffer")), v && typeof v.headers == "object" && !(v.headers instanceof y || a.Headers && v.headers instanceof a.Headers)) {
|
|
2555
|
-
var
|
|
2555
|
+
var K = [];
|
|
2556
2556
|
Object.getOwnPropertyNames(v.headers).forEach(function(B) {
|
|
2557
|
-
|
|
2557
|
+
K.push(h(B)), O.setRequestHeader(B, d(v.headers[B]));
|
|
2558
2558
|
}), L.headers.forEach(function(B, X) {
|
|
2559
|
-
|
|
2559
|
+
K.indexOf(X) === -1 && O.setRequestHeader(X, B);
|
|
2560
2560
|
});
|
|
2561
2561
|
} else
|
|
2562
2562
|
L.headers.forEach(function(B, X) {
|
|
@@ -2576,7 +2576,7 @@ function Fn() {
|
|
|
2576
2576
|
}
|
|
2577
2577
|
var Dn = Fn();
|
|
2578
2578
|
const Rn = /* @__PURE__ */ vt(Dn);
|
|
2579
|
-
let We = "https://gcp-us-east1.api.carto.com",
|
|
2579
|
+
let We = "https://gcp-us-east1.api.carto.com", Ke = "v3", Un = "ps";
|
|
2580
2580
|
const ue = {
|
|
2581
2581
|
get: "GET",
|
|
2582
2582
|
post: "POST"
|
|
@@ -2670,9 +2670,9 @@ function jn() {
|
|
|
2670
2670
|
return Be = T, Be;
|
|
2671
2671
|
}
|
|
2672
2672
|
var Bn = jn();
|
|
2673
|
-
const
|
|
2673
|
+
const Ze = /* @__PURE__ */ qn(Bn);
|
|
2674
2674
|
function ut(r) {
|
|
2675
|
-
return
|
|
2675
|
+
return Ze({
|
|
2676
2676
|
method: ue.get,
|
|
2677
2677
|
headers: {
|
|
2678
2678
|
Accept: "application/json"
|
|
@@ -2680,7 +2680,7 @@ function ut(r) {
|
|
|
2680
2680
|
}, r);
|
|
2681
2681
|
}
|
|
2682
2682
|
function Ve(r, e) {
|
|
2683
|
-
return
|
|
2683
|
+
return Ze({
|
|
2684
2684
|
method: ue.post,
|
|
2685
2685
|
headers: {
|
|
2686
2686
|
Accept: "application/json",
|
|
@@ -2703,7 +2703,7 @@ function In({
|
|
|
2703
2703
|
...n
|
|
2704
2704
|
}) {
|
|
2705
2705
|
let s = e;
|
|
2706
|
-
return s && !s.includes("Bearer") && (s = "Bearer " + s), Vn[t](
|
|
2706
|
+
return s && !s.includes("Bearer") && (s = "Bearer " + s), Vn[t](Ze({
|
|
2707
2707
|
method: t,
|
|
2708
2708
|
headers: {
|
|
2709
2709
|
...!!s && {
|
|
@@ -2762,7 +2762,7 @@ const Pe = yt()(ys((r) => ({
|
|
|
2762
2762
|
const i = s[e], {
|
|
2763
2763
|
apiBaseUrl: a = We,
|
|
2764
2764
|
clientId: l = Un,
|
|
2765
|
-
apiVersion: m =
|
|
2765
|
+
apiVersion: m = Ke,
|
|
2766
2766
|
...c
|
|
2767
2767
|
} = t, p = {
|
|
2768
2768
|
...i,
|
|
@@ -3058,7 +3058,7 @@ function Gr(r) {
|
|
|
3058
3058
|
let o;
|
|
3059
3059
|
return e[3] !== t || e[4] !== s ? (o = t(s), e[3] = t, e[4] = s, e[5] = o) : o = e[5], o;
|
|
3060
3060
|
}
|
|
3061
|
-
function
|
|
3061
|
+
function Kn(r) {
|
|
3062
3062
|
const e = R(19), {
|
|
3063
3063
|
accessToken: t,
|
|
3064
3064
|
sourceId: n,
|
|
@@ -3102,11 +3102,11 @@ function zr(r) {
|
|
|
3102
3102
|
children: t,
|
|
3103
3103
|
...n
|
|
3104
3104
|
} = r, e[0] = r, e[1] = t, e[2] = n) : (t = e[1], n = e[2]);
|
|
3105
|
-
const s =
|
|
3105
|
+
const s = Kn(n);
|
|
3106
3106
|
let o;
|
|
3107
3107
|
return e[3] !== t || e[4] !== s ? (o = t(s), e[3] = t, e[4] = s, e[5] = o) : o = e[5], o;
|
|
3108
3108
|
}
|
|
3109
|
-
function
|
|
3109
|
+
function Zn(r) {
|
|
3110
3110
|
const e = R(19), {
|
|
3111
3111
|
accessToken: t,
|
|
3112
3112
|
sourceId: n,
|
|
@@ -3150,7 +3150,7 @@ function Qr(r) {
|
|
|
3150
3150
|
children: t,
|
|
3151
3151
|
...n
|
|
3152
3152
|
} = r, e[0] = r, e[1] = t, e[2] = n) : (t = e[1], n = e[2]);
|
|
3153
|
-
const s =
|
|
3153
|
+
const s = Zn(n);
|
|
3154
3154
|
let o;
|
|
3155
3155
|
return e[3] !== t || e[4] !== s ? (o = t(s), e[3] = t, e[4] = s, e[5] = o) : o = e[5], o;
|
|
3156
3156
|
}
|
|
@@ -3239,7 +3239,7 @@ function Xn(r) {
|
|
|
3239
3239
|
...l
|
|
3240
3240
|
}, e[14] = h, e[15] = d, e[16] = b, e[17] = l, e[18] = y) : y = e[18], se(y);
|
|
3241
3241
|
}
|
|
3242
|
-
function
|
|
3242
|
+
function Kr(r) {
|
|
3243
3243
|
const e = R(6);
|
|
3244
3244
|
let t, n;
|
|
3245
3245
|
e[0] !== r ? ({
|
|
@@ -3287,7 +3287,7 @@ function Jn(r) {
|
|
|
3287
3287
|
...l
|
|
3288
3288
|
}, e[14] = h, e[15] = d, e[16] = b, e[17] = l, e[18] = y) : y = e[18], se(y);
|
|
3289
3289
|
}
|
|
3290
|
-
function
|
|
3290
|
+
function Zr(r) {
|
|
3291
3291
|
const e = R(6);
|
|
3292
3292
|
let t, n;
|
|
3293
3293
|
e[0] !== r ? ({
|
|
@@ -3597,7 +3597,7 @@ async function dr({
|
|
|
3597
3597
|
} = {},
|
|
3598
3598
|
queryParameters: a,
|
|
3599
3599
|
params: l,
|
|
3600
|
-
apiVersion: m =
|
|
3600
|
+
apiVersion: m = Ke
|
|
3601
3601
|
}) {
|
|
3602
3602
|
const c = `${r}/${m}/stats/${e}/${s}`;
|
|
3603
3603
|
return kt({
|
|
@@ -3624,7 +3624,7 @@ async function fr({
|
|
|
3624
3624
|
signal: i,
|
|
3625
3625
|
...a
|
|
3626
3626
|
} = {},
|
|
3627
|
-
apiVersion: l =
|
|
3627
|
+
apiVersion: l = Ke
|
|
3628
3628
|
}) {
|
|
3629
3629
|
const m = `${r}/${l}/stats/${e}/${n}/${s}`;
|
|
3630
3630
|
return kt({
|
|
@@ -3746,8 +3746,8 @@ export {
|
|
|
3746
3746
|
Nr as CategoriesModel,
|
|
3747
3747
|
Cs as CustomCompositeEditMode,
|
|
3748
3748
|
St as CustomEditableGeojsonLayer,
|
|
3749
|
-
|
|
3750
|
-
|
|
3749
|
+
Ks as CustomMeasureAreaMode,
|
|
3750
|
+
Zs as CustomMeasureBufferMode,
|
|
3751
3751
|
Et as CustomMeasureDistanceMode,
|
|
3752
3752
|
Je as DEFAULT_LASSO_TOOLS_COLORS,
|
|
3753
3753
|
Fs as DEFAULT_LASSO_TOOLS_LAYER_PROPS,
|
|
@@ -3772,7 +3772,7 @@ export {
|
|
|
3772
3772
|
ne as MAP_MEASURE_LAYER_ID,
|
|
3773
3773
|
Js as MEASUREMENT_TOOLS_UNITS_AREA,
|
|
3774
3774
|
it as MEASUREMENT_TOOLS_UNITS_DISTANCE,
|
|
3775
|
-
|
|
3775
|
+
Z as MEASUREMENT_TOOLS_UNITS_DISTANCE_VALUES,
|
|
3776
3776
|
Br as MapComponent,
|
|
3777
3777
|
Ie as MapMeasurementUnitAuto,
|
|
3778
3778
|
Xs as MapMeasurementUnitTurf,
|
|
@@ -3783,8 +3783,8 @@ export {
|
|
|
3783
3783
|
un as MeasurementToolsProvider,
|
|
3784
3784
|
Qr as RangeModel,
|
|
3785
3785
|
Wr as ScatterModel,
|
|
3786
|
-
|
|
3787
|
-
|
|
3786
|
+
Kr as TableModel,
|
|
3787
|
+
Zr as TimeSeriesModel,
|
|
3788
3788
|
ro as ZoomControls,
|
|
3789
3789
|
Yr as clientID,
|
|
3790
3790
|
st as convertMetersTo,
|
|
@@ -3808,7 +3808,7 @@ export {
|
|
|
3808
3808
|
Qn as useFeatures,
|
|
3809
3809
|
ie as useFilters,
|
|
3810
3810
|
Wn as useFormula,
|
|
3811
|
-
|
|
3811
|
+
Kn as useHistogram,
|
|
3812
3812
|
tr as useLassoToolsSpatialFilter,
|
|
3813
3813
|
G as useLassoToolsState,
|
|
3814
3814
|
pe as useLayerStore,
|
|
@@ -3817,7 +3817,7 @@ export {
|
|
|
3817
3817
|
eo as useMapScreenshot,
|
|
3818
3818
|
x as useMapStore,
|
|
3819
3819
|
I as useMeasurementToolsState,
|
|
3820
|
-
|
|
3820
|
+
Zn as useRange,
|
|
3821
3821
|
Yn as useScatter,
|
|
3822
3822
|
Hn as useSource,
|
|
3823
3823
|
Pe as useSourceStore,
|