agviewermap-react 0.1.37-5 → 0.1.37-7
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.
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { j as e, M as z, u as A, a as H, B as P, T as b, b as U, C as V, c as W, d as O, t as q, S as G, e as J, I as K, f as Q, g as S, h as X } from "./index-
|
|
2
|
-
import { useState as
|
|
1
|
+
import { j as e, M as z, u as A, a as H, B as P, T as b, b as U, C as V, c as W, d as O, t as q, S as G, e as J, I as K, f as Q, g as S, h as X } from "./index-BLLuaiBJ.js";
|
|
2
|
+
import { useState as g, useContext as Y, useCallback as o, useRef as Z, useMemo as N, useEffect as $ } from "react";
|
|
3
3
|
const D = (s) => /* @__PURE__ */ e.jsxs(
|
|
4
4
|
"svg",
|
|
5
5
|
{
|
|
@@ -32,10 +32,10 @@ const D = (s) => /* @__PURE__ */ e.jsxs(
|
|
|
32
32
|
)
|
|
33
33
|
]
|
|
34
34
|
}
|
|
35
|
-
), ee = ({ marker: s, markerId: f, buttonClassName:
|
|
36
|
-
const [d, i] =
|
|
37
|
-
i((
|
|
38
|
-
}, []), h = (
|
|
35
|
+
), ee = ({ marker: s, markerId: f, buttonClassName: u = "" }) => {
|
|
36
|
+
const [d, i] = g(!1), { handleMarkerUpdate: t } = Y(z), c = A(), p = o(() => {
|
|
37
|
+
i((m) => !m);
|
|
38
|
+
}, []), h = (m) => (console.log("data after editing", m), console.log("data before editing", s), t(m));
|
|
39
39
|
return /* @__PURE__ */ e.jsx(
|
|
40
40
|
H,
|
|
41
41
|
{
|
|
@@ -71,7 +71,7 @@ const D = (s) => /* @__PURE__ */ e.jsxs(
|
|
|
71
71
|
) })
|
|
72
72
|
}
|
|
73
73
|
);
|
|
74
|
-
}, se = ({ marker: s, onMarkerClick: f, onDeleteMarker:
|
|
74
|
+
}, se = ({ marker: s, onMarkerClick: f, onDeleteMarker: u, markersData: d, intl: i }) => /* @__PURE__ */ e.jsx("div", { className: "marker-item rounded-md hover:bg-gray-50 dark:hover:bg-gray-700 p-2 mb-2", children: /* @__PURE__ */ e.jsx("div", { className: "marker-item-info", children: /* @__PURE__ */ e.jsxs("div", { className: "flex justify-between items-center gap-2", children: [
|
|
75
75
|
/* @__PURE__ */ e.jsxs("div", { className: "flex items-center gap-2 flex-1 min-w-0", children: [
|
|
76
76
|
/* @__PURE__ */ e.jsx(Q, { className: "h-4 w-4 text-primary flex-shrink-0" }),
|
|
77
77
|
/* @__PURE__ */ e.jsx("h5", { className: "text-sm font-medium text-gray-800 dark:text-gray-200 break-words leading-tight", children: s == null ? void 0 : s.title })
|
|
@@ -92,7 +92,7 @@ const D = (s) => /* @__PURE__ */ e.jsxs(
|
|
|
92
92
|
{
|
|
93
93
|
variant: "icon",
|
|
94
94
|
className: "rounded-full p-1 hover:bg-gray-100 dark:hover:bg-gray-600",
|
|
95
|
-
onClick: (t) =>
|
|
95
|
+
onClick: (t) => u(t, s),
|
|
96
96
|
"data-marker-id": s.id,
|
|
97
97
|
children: /* @__PURE__ */ e.jsx(X, { className: "w-4 h-4 text-red-500" })
|
|
98
98
|
}
|
|
@@ -108,14 +108,14 @@ const D = (s) => /* @__PURE__ */ e.jsxs(
|
|
|
108
108
|
function ne({
|
|
109
109
|
markersData: s,
|
|
110
110
|
loading: f,
|
|
111
|
-
handleDeleteMarker:
|
|
111
|
+
handleDeleteMarker: u,
|
|
112
112
|
onMarkerClick: d,
|
|
113
113
|
onClose: i,
|
|
114
114
|
intl: t
|
|
115
115
|
}) {
|
|
116
|
-
const [c, p] =
|
|
116
|
+
const [c, p] = g(""), [h, m] = g(""), [I, w] = g(!1), [l, y] = g(20), [x, k] = g(!1), L = Z(null), _ = o(
|
|
117
117
|
O((a) => {
|
|
118
|
-
|
|
118
|
+
m(a), w(!1);
|
|
119
119
|
}, 300),
|
|
120
120
|
[]
|
|
121
121
|
), T = o((a) => {
|
|
@@ -144,8 +144,8 @@ function ne({
|
|
|
144
144
|
}, [C, x, l, n.length]), F = o((a, r) => {
|
|
145
145
|
d(a, r), i();
|
|
146
146
|
}, [d, i]), R = o((a, r) => {
|
|
147
|
-
|
|
148
|
-
}, [
|
|
147
|
+
u(a, r);
|
|
148
|
+
}, [u]);
|
|
149
149
|
return f ? /* @__PURE__ */ e.jsx("div", { className: "flex justify-center items-center h-40", children: /* @__PURE__ */ e.jsx(G, {}) }) : /* @__PURE__ */ e.jsxs("div", { className: "w-full", children: [
|
|
150
150
|
/* @__PURE__ */ e.jsxs("div", { className: "relative mb-4", children: [
|
|
151
151
|
/* @__PURE__ */ e.jsx(J, { className: "w-4 h-4 text-gray-500 absolute left-3 top-1/2 transform -translate-y-1/2" }),
|