@hybridcore/ui 1.5.30 → 1.5.32
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/{Source-CnCcu5UP.js → Source-BESIjd9X.js} +770 -761
- package/dist/{Text-BT5kPHOo.js → Text-Cl1H4b0h.js} +47 -43
- package/dist/components/geometry-picker/coordinate/index.js +1 -1
- package/dist/components/geometry-picker/edit/index.js +42 -57
- package/dist/components/geometry-picker/geometry/index.js +1 -1
- package/dist/components/geometry-picker/geometry/map-overlay.js +1 -1
- package/dist/components/geometry-picker/index.js +31 -32
- package/dist/components/geometry-picker/kml/index.js +7 -7
- package/dist/components/geometry-picker/map/logic.js +2025 -680
- package/dist/components/geometry-picker/map/style.js +1 -1
- package/dist/components/geometry-picker/parser/coordinate-input/index.js +2 -2
- package/dist/components/geometry-picker/parser/coordinate-input/logic.js +122 -135
- package/dist/components/map/helpers/mapbox.js +1 -1
- package/dist/components/map/helpers/ol.js +6 -6
- package/dist/components/map/logic.js +3 -3
- package/dist/components/map/styled.js +31 -41
- package/dist/components/property-mapping/index.js +1 -1
- package/dist/{has-9_asnBxn.js → has-DNclCIDV.js} +99 -81
- package/dist/main.d.ts +2 -2
- package/dist/{ol-9hySGI6D.js → ol-lGwSyEIV.js} +331 -322
- package/package.json +1 -1
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { a as w, c as v, W as $, B as ae, b as le, l as N, I as he, u as ce, E as O, d as m, T as oe, g as ue } from "./has-DNclCIDV.js";
|
|
2
2
|
const ge = /^#([a-f0-9]{3}|[a-f0-9]{4}(?:[a-f0-9]{2}){0,2})$/i, fe = /^([a-z]*)$|^hsla?\(.*\)$/i;
|
|
3
|
-
function
|
|
3
|
+
function j(i) {
|
|
4
4
|
return typeof i == "string" ? i : ee(i);
|
|
5
5
|
}
|
|
6
6
|
function de(i) {
|
|
@@ -123,7 +123,7 @@ class ye {
|
|
|
123
123
|
}
|
|
124
124
|
}
|
|
125
125
|
function X(i, e, t) {
|
|
126
|
-
const n = t ?
|
|
126
|
+
const n = t ? j(t) : "null";
|
|
127
127
|
return e + ":" + i + ":" + n;
|
|
128
128
|
}
|
|
129
129
|
const U = new ye(), Me = "ol-hidden", Ee = "ol-unselectable", Re = "ol-control", be = "ol-collapsed", Se = new RegExp(
|
|
@@ -166,7 +166,7 @@ const U = new ye(), Me = "ol-hidden", Ee = "ol-unselectable", Re = "ol-control",
|
|
|
166
166
|
};
|
|
167
167
|
function L(i, e, t, n) {
|
|
168
168
|
let s;
|
|
169
|
-
return t && t.length ? s = t.shift() :
|
|
169
|
+
return t && t.length ? s = t.shift() : $ ? s = new OffscreenCanvas(i || 300, e || 300) : s = document.createElement("canvas"), i && (s.width = i), e && (s.height = e), /** @type {CanvasRenderingContext2D} */
|
|
170
170
|
s.getContext("2d", n);
|
|
171
171
|
}
|
|
172
172
|
function Fe(i) {
|
|
@@ -252,7 +252,7 @@ const P = {}, Ge = function() {
|
|
|
252
252
|
return function(e) {
|
|
253
253
|
let t = P[e];
|
|
254
254
|
if (t == null) {
|
|
255
|
-
if (
|
|
255
|
+
if ($) {
|
|
256
256
|
const n = te(e), s = ie(e, "Žg");
|
|
257
257
|
t = (isNaN(Number(n.lineHeight)) ? 1.2 : Number(n.lineHeight)) * (s.actualBoundingBoxAscent + s.actualBoundingBoxDescent);
|
|
258
258
|
} else
|
|
@@ -333,6 +333,9 @@ function Ce(i, e) {
|
|
|
333
333
|
function Ke(i) {
|
|
334
334
|
return i[0] > 0 && i[1] > 0;
|
|
335
335
|
}
|
|
336
|
+
function $e(i, e, t) {
|
|
337
|
+
return t === void 0 && (t = [0, 0]), t[0] = i[0] * e + 0.5 | 0, t[1] = i[1] * e + 0.5 | 0, t;
|
|
338
|
+
}
|
|
336
339
|
function M(i, e) {
|
|
337
340
|
return Array.isArray(i) ? i : (e === void 0 ? e = [i, i] : (e[0] = i, e[1] = i), e);
|
|
338
341
|
}
|
|
@@ -733,7 +736,7 @@ class ze extends oe {
|
|
|
733
736
|
const t = this.image_, n = document.createElement("canvas");
|
|
734
737
|
n.width = Math.ceil(t.width * e), n.height = Math.ceil(t.height * e);
|
|
735
738
|
const s = n.getContext("2d");
|
|
736
|
-
s.scale(e, e), s.drawImage(t, 0, 0), s.globalCompositeOperation = "multiply", s.fillStyle =
|
|
739
|
+
s.scale(e, e), s.drawImage(t, 0, 0), s.globalCompositeOperation = "multiply", s.fillStyle = j(this.color_), s.fillRect(0, 0, n.width / e, n.height / e), s.globalCompositeOperation = "destination-in", s.drawImage(t, 0, 0), this.canvas_[e] = n;
|
|
737
740
|
}
|
|
738
741
|
/**
|
|
739
742
|
* Discards event handlers which listen for load completion or errors.
|
|
@@ -1712,7 +1715,7 @@ function je(i) {
|
|
|
1712
1715
|
return e;
|
|
1713
1716
|
}
|
|
1714
1717
|
let W = null;
|
|
1715
|
-
function
|
|
1718
|
+
function Qe(i, e) {
|
|
1716
1719
|
if (!W) {
|
|
1717
1720
|
const t = new C({
|
|
1718
1721
|
color: "rgba(255,255,255,0.4)"
|
|
@@ -1734,7 +1737,7 @@ function $e(i, e) {
|
|
|
1734
1737
|
}
|
|
1735
1738
|
return W;
|
|
1736
1739
|
}
|
|
1737
|
-
function
|
|
1740
|
+
function et() {
|
|
1738
1741
|
const i = {}, e = [255, 255, 255, 1], t = [0, 153, 255, 1], n = 3;
|
|
1739
1742
|
return i.Polygon = [
|
|
1740
1743
|
new S({
|
|
@@ -2145,48 +2148,49 @@ class se {
|
|
|
2145
2148
|
}
|
|
2146
2149
|
}
|
|
2147
2150
|
export {
|
|
2148
|
-
|
|
2149
|
-
|
|
2151
|
+
Ne as A,
|
|
2152
|
+
Je as B,
|
|
2150
2153
|
R as C,
|
|
2151
|
-
|
|
2152
|
-
|
|
2154
|
+
p as D,
|
|
2155
|
+
we as E,
|
|
2153
2156
|
C as F,
|
|
2154
|
-
|
|
2155
|
-
|
|
2157
|
+
Ie as G,
|
|
2158
|
+
Ye as H,
|
|
2156
2159
|
ne as I,
|
|
2157
|
-
|
|
2158
|
-
|
|
2159
|
-
|
|
2160
|
-
|
|
2161
|
-
|
|
2162
|
-
|
|
2160
|
+
Xe as J,
|
|
2161
|
+
Ue as K,
|
|
2162
|
+
He as L,
|
|
2163
|
+
Ge as M,
|
|
2164
|
+
qe as N,
|
|
2165
|
+
Ze as O,
|
|
2166
|
+
pe as P,
|
|
2163
2167
|
V as R,
|
|
2164
2168
|
S,
|
|
2165
2169
|
se as T,
|
|
2166
2170
|
A as a,
|
|
2167
|
-
|
|
2168
|
-
|
|
2169
|
-
|
|
2170
|
-
|
|
2171
|
-
|
|
2172
|
-
|
|
2173
|
-
|
|
2174
|
-
|
|
2175
|
-
|
|
2176
|
-
|
|
2177
|
-
|
|
2178
|
-
|
|
2179
|
-
|
|
2180
|
-
|
|
2181
|
-
|
|
2182
|
-
|
|
2171
|
+
U as b,
|
|
2172
|
+
et as c,
|
|
2173
|
+
y as d,
|
|
2174
|
+
Ee as e,
|
|
2175
|
+
Te as f,
|
|
2176
|
+
Re as g,
|
|
2177
|
+
be as h,
|
|
2178
|
+
Pe as i,
|
|
2179
|
+
We as j,
|
|
2180
|
+
Me as k,
|
|
2181
|
+
Ke as l,
|
|
2182
|
+
_ as m,
|
|
2183
|
+
Q as n,
|
|
2184
|
+
L as o,
|
|
2185
|
+
ke as p,
|
|
2186
|
+
Fe as q,
|
|
2183
2187
|
Ve as r,
|
|
2184
|
-
|
|
2188
|
+
$e as s,
|
|
2185
2189
|
M as t,
|
|
2186
|
-
|
|
2187
|
-
|
|
2188
|
-
|
|
2189
|
-
|
|
2190
|
-
|
|
2191
|
-
|
|
2190
|
+
je as u,
|
|
2191
|
+
Qe as v,
|
|
2192
|
+
Z as w,
|
|
2193
|
+
G as x,
|
|
2194
|
+
De as y,
|
|
2195
|
+
Be as z
|
|
2192
2196
|
};
|
|
@@ -2,7 +2,7 @@ import { jsxs as l, Fragment as p, jsx as o } from "react/jsx-runtime";
|
|
|
2
2
|
import { Button as a, Box as f } from "@mui/material";
|
|
3
3
|
import u from "../map/index.js";
|
|
4
4
|
import C from "../parser/index.js";
|
|
5
|
-
import { g as y, c as h } from "../../../ol-
|
|
5
|
+
import { g as y, c as h } from "../../../ol-lGwSyEIV.js";
|
|
6
6
|
import { useState as g } from "react";
|
|
7
7
|
import { Add as P } from "@mui/icons-material";
|
|
8
8
|
import { parse as v, convert as x } from "../../map/helpers/wkt.js";
|
|
@@ -1,71 +1,56 @@
|
|
|
1
|
-
import { jsxs as
|
|
2
|
-
import
|
|
3
|
-
import { Dialog as
|
|
4
|
-
import
|
|
5
|
-
import { c as
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
onCancel: l,
|
|
16
|
-
onSubmit: u,
|
|
17
|
-
onChange: d
|
|
1
|
+
import { jsxs as t, jsx as i, Fragment as D } from "react/jsx-runtime";
|
|
2
|
+
import k, { useState as x } from "react";
|
|
3
|
+
import { Dialog as W, DialogContent as w, DialogActions as y, Button as e, Box as j } from "@mui/material";
|
|
4
|
+
import m from "../map/index.js";
|
|
5
|
+
import { c as K } from "../../../ol-lGwSyEIV.js";
|
|
6
|
+
function F({
|
|
7
|
+
value: h,
|
|
8
|
+
disableActions: p,
|
|
9
|
+
mapboxAccessToken: o,
|
|
10
|
+
variant: v = "inline",
|
|
11
|
+
mapId: a,
|
|
12
|
+
onCancel: n,
|
|
13
|
+
onSubmit: l,
|
|
14
|
+
onChange: c
|
|
18
15
|
}) {
|
|
19
|
-
const
|
|
20
|
-
|
|
21
|
-
},
|
|
22
|
-
const
|
|
23
|
-
|
|
24
|
-
}, h = () => {
|
|
25
|
-
var o, v, C;
|
|
26
|
-
const e = S(n);
|
|
27
|
-
if (!_.isArray(e))
|
|
28
|
-
if ((e == null ? void 0 : e.type) === "Point") {
|
|
29
|
-
const i = B(e.coordinates, "EPSG:4326", "EPSG:3857");
|
|
30
|
-
(o = t.current) == null || o.setCenter(i), (v = t.current) == null || v.setZoomLevel(10);
|
|
31
|
-
} else {
|
|
32
|
-
const i = R(n);
|
|
33
|
-
i && ((C = t.current) == null || C.centerToFeature(i[0], [100, 100, 100, 100]));
|
|
34
|
-
}
|
|
16
|
+
const d = k.useRef(null), [r, g] = x(h), f = () => {
|
|
17
|
+
l && l(r);
|
|
18
|
+
}, s = (C) => {
|
|
19
|
+
const u = K({ features: C });
|
|
20
|
+
g(u), c && c(u);
|
|
35
21
|
};
|
|
36
|
-
return
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
g,
|
|
22
|
+
return v === "dialog" ? /* @__PURE__ */ t(W, { open: !0, maxWidth: "sm", fullWidth: !0, onClose: n, children: [
|
|
23
|
+
/* @__PURE__ */ i(w, { children: /* @__PURE__ */ i(
|
|
24
|
+
m,
|
|
40
25
|
{
|
|
41
|
-
id:
|
|
42
|
-
ref:
|
|
43
|
-
drawingWKTData:
|
|
44
|
-
mapboxAccessToken:
|
|
45
|
-
onDrawEnd:
|
|
26
|
+
id: a,
|
|
27
|
+
ref: d,
|
|
28
|
+
drawingWKTData: r,
|
|
29
|
+
mapboxAccessToken: o,
|
|
30
|
+
onDrawEnd: s
|
|
46
31
|
}
|
|
47
32
|
) }),
|
|
48
|
-
/* @__PURE__ */
|
|
49
|
-
/* @__PURE__ */
|
|
50
|
-
/* @__PURE__ */
|
|
33
|
+
/* @__PURE__ */ t(y, { children: [
|
|
34
|
+
/* @__PURE__ */ i(e, { color: "inherit", variant: "contained", onClick: n, children: "Cancel" }),
|
|
35
|
+
/* @__PURE__ */ i(e, { variant: "contained", onClick: f, children: "Ok" })
|
|
51
36
|
] })
|
|
52
|
-
] }) : /* @__PURE__ */
|
|
53
|
-
/* @__PURE__ */
|
|
54
|
-
|
|
37
|
+
] }) : /* @__PURE__ */ t(D, { children: [
|
|
38
|
+
/* @__PURE__ */ i(
|
|
39
|
+
m,
|
|
55
40
|
{
|
|
56
|
-
id:
|
|
57
|
-
ref:
|
|
58
|
-
drawingWKTData:
|
|
59
|
-
mapboxAccessToken:
|
|
60
|
-
onDrawEnd:
|
|
41
|
+
id: a,
|
|
42
|
+
ref: d,
|
|
43
|
+
drawingWKTData: r,
|
|
44
|
+
mapboxAccessToken: o,
|
|
45
|
+
onDrawEnd: s
|
|
61
46
|
}
|
|
62
47
|
),
|
|
63
|
-
!
|
|
64
|
-
/* @__PURE__ */
|
|
65
|
-
/* @__PURE__ */
|
|
48
|
+
!p && /* @__PURE__ */ t(j, { display: "flex", justifyContent: "space-between", mt: 3, children: [
|
|
49
|
+
/* @__PURE__ */ i(e, { color: "primary", onClick: n, children: "Cancel" }),
|
|
50
|
+
/* @__PURE__ */ i(e, { color: "primary", variant: "contained", onClick: f, children: "Ok" })
|
|
66
51
|
] })
|
|
67
52
|
] });
|
|
68
53
|
}
|
|
69
54
|
export {
|
|
70
|
-
|
|
55
|
+
F as default
|
|
71
56
|
};
|
|
@@ -3,7 +3,7 @@ import D, { useState as k } from "react";
|
|
|
3
3
|
import { Dialog as R, DialogContent as K, Box as o, Typography as x, DialogActions as F, Button as d } from "@mui/material";
|
|
4
4
|
import P from "../map/index.js";
|
|
5
5
|
import b from "../parser/index.js";
|
|
6
|
-
import { c as _ } from "../../../ol-
|
|
6
|
+
import { c as _ } from "../../../ol-lGwSyEIV.js";
|
|
7
7
|
import { Button as l } from "../styled.js";
|
|
8
8
|
import { HorizontalRule as j, ShowChart as O, CircleOutlined as I } from "@mui/icons-material";
|
|
9
9
|
import L from "./map-overlay.js";
|
|
@@ -10,7 +10,7 @@ function d({ show: r }) {
|
|
|
10
10
|
height: "100%",
|
|
11
11
|
justifyContent: "center",
|
|
12
12
|
alignItems: "center",
|
|
13
|
-
sx: { backgroundColor: "rgba(0,0,0,0.
|
|
13
|
+
sx: { backgroundColor: "rgba(0,0,0,0.5)" },
|
|
14
14
|
children: /* @__PURE__ */ t(i, { color: "white", children: "Select drawing type to start drawing" })
|
|
15
15
|
}
|
|
16
16
|
),
|
|
@@ -1,39 +1,38 @@
|
|
|
1
1
|
import { jsx as o, jsxs as i, Fragment as s } from "react/jsx-runtime";
|
|
2
2
|
import { EditOutlined as f, DeleteOutline as D, AddLocationOutlined as I, DrawOutlined as A, LayersOutlined as p } from "@mui/icons-material";
|
|
3
|
-
import { Container as O, Actions as
|
|
4
|
-
import
|
|
5
|
-
import
|
|
6
|
-
import
|
|
7
|
-
import
|
|
3
|
+
import { Container as O, Actions as k, Button as l } from "./styled.js";
|
|
4
|
+
import S from "./logic.js";
|
|
5
|
+
import y from "./coordinate/index.js";
|
|
6
|
+
import b from "./edit/index.js";
|
|
7
|
+
import E from "./geometry/index.js";
|
|
8
8
|
import g from "./kml/index.js";
|
|
9
9
|
import W from "./wkt/index.js";
|
|
10
|
-
import { IconButton as u, OutlinedInput as K, FilledInput as L, Dialog as z, DialogTitle as
|
|
11
|
-
import { I as
|
|
12
|
-
import { F as
|
|
13
|
-
import { I as
|
|
10
|
+
import { IconButton as u, OutlinedInput as K, FilledInput as L, Dialog as z, DialogTitle as B, DialogContent as F } from "@mui/material";
|
|
11
|
+
import { I as G } from "../../InputAdornment-BAVRrRts.js";
|
|
12
|
+
import { F as T, I as w } from "../../InputLabel-ClDXuWBr.js";
|
|
13
|
+
import { I as M } from "../../Input-BAbDr3Tk.js";
|
|
14
14
|
const Z = ({
|
|
15
|
-
label:
|
|
16
|
-
mapboxAccessToken:
|
|
15
|
+
label: d,
|
|
16
|
+
mapboxAccessToken: c,
|
|
17
17
|
value: e = "",
|
|
18
18
|
disableAddCoordinate: h = !1,
|
|
19
19
|
defaultExtent: a,
|
|
20
20
|
variant: r = "outlined",
|
|
21
21
|
onChange: C
|
|
22
22
|
}) => {
|
|
23
|
-
const { state: t, action: n } =
|
|
24
|
-
label:
|
|
23
|
+
const { state: t, action: n } = S({
|
|
24
|
+
label: d,
|
|
25
25
|
value: e,
|
|
26
|
-
mapboxAccessToken: l,
|
|
27
26
|
onChange: C
|
|
28
|
-
}), m = /* @__PURE__ */ o(
|
|
27
|
+
}), m = /* @__PURE__ */ o(G, { position: "end", children: e !== "" && /* @__PURE__ */ i(s, { children: [
|
|
29
28
|
/* @__PURE__ */ o(u, { size: "small", onClick: n.onEdit, children: /* @__PURE__ */ o(f, { fontSize: "small" }) }),
|
|
30
29
|
/* @__PURE__ */ o(u, { size: "small", onClick: n.onDelete, children: /* @__PURE__ */ o(D, { fontSize: "small" }) })
|
|
31
30
|
] }) });
|
|
32
31
|
return /* @__PURE__ */ i(s, { children: [
|
|
33
32
|
/* @__PURE__ */ i(O, { children: [
|
|
34
|
-
/* @__PURE__ */ i(
|
|
33
|
+
/* @__PURE__ */ i(k, { variant: r, children: [
|
|
35
34
|
h === !1 && /* @__PURE__ */ o(
|
|
36
|
-
|
|
35
|
+
l,
|
|
37
36
|
{
|
|
38
37
|
color: "inherit",
|
|
39
38
|
startIcon: /* @__PURE__ */ o(I, {}),
|
|
@@ -42,7 +41,7 @@ const Z = ({
|
|
|
42
41
|
}
|
|
43
42
|
),
|
|
44
43
|
/* @__PURE__ */ o(
|
|
45
|
-
|
|
44
|
+
l,
|
|
46
45
|
{
|
|
47
46
|
color: "inherit",
|
|
48
47
|
startIcon: /* @__PURE__ */ o(A, {}),
|
|
@@ -51,7 +50,7 @@ const Z = ({
|
|
|
51
50
|
}
|
|
52
51
|
),
|
|
53
52
|
/* @__PURE__ */ o(
|
|
54
|
-
|
|
53
|
+
l,
|
|
55
54
|
{
|
|
56
55
|
color: "inherit",
|
|
57
56
|
startIcon: /* @__PURE__ */ o(p, {}),
|
|
@@ -60,7 +59,7 @@ const Z = ({
|
|
|
60
59
|
}
|
|
61
60
|
),
|
|
62
61
|
/* @__PURE__ */ o(
|
|
63
|
-
|
|
62
|
+
l,
|
|
64
63
|
{
|
|
65
64
|
color: "inherit",
|
|
66
65
|
startIcon: /* @__PURE__ */ o(p, {}),
|
|
@@ -70,19 +69,19 @@ const Z = ({
|
|
|
70
69
|
)
|
|
71
70
|
] }),
|
|
72
71
|
/* @__PURE__ */ i(
|
|
73
|
-
|
|
72
|
+
T,
|
|
74
73
|
{
|
|
75
74
|
fullWidth: !0,
|
|
76
75
|
variant: r,
|
|
77
76
|
contentEditable: !1,
|
|
78
77
|
onClick: n.onClick,
|
|
79
78
|
children: [
|
|
80
|
-
/* @__PURE__ */ o(
|
|
81
|
-
r === "standard" && /* @__PURE__ */ o(
|
|
79
|
+
/* @__PURE__ */ o(w, { shrink: !!e, children: d }),
|
|
80
|
+
r === "standard" && /* @__PURE__ */ o(M, { value: e, readOnly: !0, endAdornment: m }),
|
|
82
81
|
r === "outlined" && /* @__PURE__ */ o(
|
|
83
82
|
K,
|
|
84
83
|
{
|
|
85
|
-
label:
|
|
84
|
+
label: d,
|
|
86
85
|
value: e,
|
|
87
86
|
readOnly: !0,
|
|
88
87
|
endAdornment: m
|
|
@@ -101,22 +100,22 @@ const Z = ({
|
|
|
101
100
|
fullWidth: !0,
|
|
102
101
|
maxWidth: "md",
|
|
103
102
|
children: [
|
|
104
|
-
/* @__PURE__ */ o(
|
|
105
|
-
/* @__PURE__ */ i(
|
|
103
|
+
/* @__PURE__ */ o(B, { children: t.content.title }),
|
|
104
|
+
/* @__PURE__ */ i(F, { children: [
|
|
106
105
|
t.content.action === "ADD" && t.content.type === "COORDINATE" && /* @__PURE__ */ o(
|
|
107
|
-
|
|
106
|
+
y,
|
|
108
107
|
{
|
|
109
|
-
mapboxAccessToken:
|
|
108
|
+
mapboxAccessToken: c,
|
|
110
109
|
defaultExtent: a,
|
|
111
110
|
onCancel: n.modal.close,
|
|
112
111
|
onSubmit: n.onSubmit
|
|
113
112
|
}
|
|
114
113
|
),
|
|
115
114
|
t.content.action === "ADD" && t.content.type === "GEOMETRY" && /* @__PURE__ */ o(
|
|
116
|
-
|
|
115
|
+
E,
|
|
117
116
|
{
|
|
118
117
|
mapId: "map-geo-picker-001",
|
|
119
|
-
mapboxAccessToken:
|
|
118
|
+
mapboxAccessToken: c,
|
|
120
119
|
defaultExtent: a,
|
|
121
120
|
onCancel: n.modal.close,
|
|
122
121
|
onSubmit: n.onSubmit
|
|
@@ -125,11 +124,11 @@ const Z = ({
|
|
|
125
124
|
t.content.action === "ADD" && t.content.type === "KML" && /* @__PURE__ */ o(g, { onCancel: n.modal.close, onSubmit: n.onSubmit }),
|
|
126
125
|
t.content.action === "ADD" && t.content.type === "WKT" && /* @__PURE__ */ o(W, { onCancel: n.modal.close, onSubmit: n.onSubmit }),
|
|
127
126
|
t.content.action === "EDIT" && !!e && /* @__PURE__ */ o(
|
|
128
|
-
|
|
127
|
+
b,
|
|
129
128
|
{
|
|
130
129
|
mapId: "map-geo-edit-001",
|
|
131
130
|
value: e,
|
|
132
|
-
mapboxAccessToken:
|
|
131
|
+
mapboxAccessToken: c,
|
|
133
132
|
onCancel: n.modal.close,
|
|
134
133
|
onSubmit: n.onSubmit
|
|
135
134
|
}
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { jsx as r, jsxs as c } from "react/jsx-runtime";
|
|
2
|
-
import { useState as i, useEffect as
|
|
3
|
-
import
|
|
4
|
-
import { Box as d, TextField as
|
|
2
|
+
import { useState as i, useEffect as k } from "react";
|
|
3
|
+
import M from "./select-input-method.js";
|
|
4
|
+
import { Box as d, TextField as b, Button as m } from "@mui/material";
|
|
5
5
|
import { validate as C } from "../../map/helpers/kml.js";
|
|
6
|
-
import {
|
|
6
|
+
import { a as L, c as T } from "../../../ol-lGwSyEIV.js";
|
|
7
7
|
function W({ onCancel: f, onSubmit: a }) {
|
|
8
8
|
const [t, l] = i(), [o, p] = i(), [s, n] = i(), h = (e) => {
|
|
9
9
|
l(e);
|
|
@@ -21,10 +21,10 @@ function W({ onCancel: f, onSubmit: a }) {
|
|
|
21
21
|
}, x = () => {
|
|
22
22
|
a && o && a(o);
|
|
23
23
|
};
|
|
24
|
-
return
|
|
25
|
-
}), [t, u]), t === void 0 ? /* @__PURE__ */ r(
|
|
24
|
+
return k(() => (u(), () => {
|
|
25
|
+
}), [t, u]), t === void 0 ? /* @__PURE__ */ r(M, { onSubmit: h }) : /* @__PURE__ */ c(d, { pt: 1, children: [
|
|
26
26
|
/* @__PURE__ */ r(
|
|
27
|
-
|
|
27
|
+
b,
|
|
28
28
|
{
|
|
29
29
|
label: "KML Text",
|
|
30
30
|
multiline: !0,
|