@glodon-aiot/react-components 3.5.2-beta.0 → 3.5.2-snapshot.0
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/es/Button/index.mjs +1 -1
- package/dist/es/ConfirmableButton/index.mjs +29 -29
- package/dist/es/Drawable/Drawable.mjs +84 -84
- package/dist/es/Drawable/LineElement.mjs +2 -2
- package/dist/es/Drawable/MarkerElement.mjs +4 -4
- package/dist/es/Drawable/PolygonElement.mjs +15 -15
- package/dist/es/Drawable/state.mjs +27 -27
- package/dist/es/ExpandablePannel/index.mjs +18 -18
- package/dist/es/GOSImageMap/DrawableImageMap.mjs +18 -18
- package/dist/es/GOSImageMap/ImageMap.mjs +1 -1
- package/dist/es/IconButton/index.mjs +1 -1
- package/dist/es/ImageMap/index.mjs +120 -120
- package/dist/es/MouseTip/index.mjs +10 -10
- package/dist/es/PanoramaRecordPlayer/index.mjs +21 -21
- package/dist/es/PassMap/index.mjs +6 -6
- package/dist/es/TrackMap/PointTooltip.mjs +44 -42
- package/dist/es/TrackMap/TrackPoint.mjs +10 -10
- package/dist/es/TrackMap/index.mjs +158 -158
- package/dist/es/Zoom/index.mjs +19 -19
- package/dist/es/components/Copy/index.mjs +12 -12
- package/dist/es/components/Markdown/ATag/index.mjs +4 -4
- package/dist/es/components/Markdown/Code/index.mjs +14 -14
- package/dist/es/components/Markdown/Image/index.mjs +5 -5
- package/dist/es/components/Markdown/Video/index.mjs +1 -1
- package/dist/es/components/Markdown/index.mjs +11 -11
- package/dist/es/index.mjs +1 -1
- package/dist/lib/index.js +2 -2
- package/dist/src/Drawable/PolygonElement.d.ts +1 -1
- package/dist/src/GOSImageMap/DrawableImageMap.d.ts +1 -1
- package/dist/src/useBimface/index.d.ts +2 -2
- package/dist/src/utils/markdown/index.d.ts +1 -1
- package/package.json +1 -1
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { jsxs as j, jsx as e } from "react/jsx-runtime";
|
|
2
|
-
import { IconButton as
|
|
3
|
-
import { Iconfont as
|
|
2
|
+
import { IconButton as s } from "../IconButton/index.mjs";
|
|
3
|
+
import { Iconfont as c } from "../Iconfont/index.mjs";
|
|
4
4
|
import { useState as p, useEffect as f } from "react";
|
|
5
|
-
const
|
|
5
|
+
const E = (b) => {
|
|
6
6
|
const {
|
|
7
7
|
className: k,
|
|
8
8
|
style: x,
|
|
@@ -13,15 +13,15 @@ const N = (b) => {
|
|
|
13
13
|
loop: I = !1,
|
|
14
14
|
loading: o = !1,
|
|
15
15
|
onChange: t
|
|
16
|
-
} = b, [
|
|
16
|
+
} = b, [r, m] = p(y), [n, l] = p(u), [a, h] = p(null);
|
|
17
17
|
f(() => {
|
|
18
18
|
l(u);
|
|
19
19
|
}, [u]), f(() => {
|
|
20
20
|
m(y);
|
|
21
21
|
}, [y]), f(() => {
|
|
22
|
-
|
|
23
|
-
}, [
|
|
24
|
-
|
|
22
|
+
r ? g() : n >= i - 1 && (l(0), t(0));
|
|
23
|
+
}, [r]), f(() => {
|
|
24
|
+
r && (o ? a && (clearTimeout(a), h(null)) : h(setTimeout(g, P)));
|
|
25
25
|
}, [o]);
|
|
26
26
|
const g = () => {
|
|
27
27
|
l((d) => d < i - 1 ? (t(d + 1), d + 1) : I ? (t(0), 0) : (C(), d));
|
|
@@ -30,55 +30,55 @@ const N = (b) => {
|
|
|
30
30
|
}, C = () => {
|
|
31
31
|
m(!1), a && (clearTimeout(a), h(null));
|
|
32
32
|
};
|
|
33
|
-
return
|
|
33
|
+
return j("div", {
|
|
34
34
|
className: k,
|
|
35
35
|
style: x,
|
|
36
|
-
children: [
|
|
36
|
+
children: [e(s, {
|
|
37
37
|
disabled: n <= 0 || o,
|
|
38
38
|
onClick: () => {
|
|
39
39
|
t(0), l(0);
|
|
40
40
|
},
|
|
41
|
-
children:
|
|
41
|
+
children: e(c, {
|
|
42
42
|
type: "icon-diyige"
|
|
43
43
|
})
|
|
44
|
-
}),
|
|
44
|
+
}), e(s, {
|
|
45
45
|
disabled: n <= 0 || o,
|
|
46
46
|
onClick: () => {
|
|
47
47
|
t(n - 1), l(n - 1);
|
|
48
48
|
},
|
|
49
|
-
children:
|
|
49
|
+
children: e(c, {
|
|
50
50
|
type: "icon-qianyige"
|
|
51
51
|
})
|
|
52
|
-
}),
|
|
52
|
+
}), r ? e(s, {
|
|
53
53
|
onClick: C,
|
|
54
|
-
children:
|
|
54
|
+
children: e(c, {
|
|
55
55
|
type: "icon-zanting"
|
|
56
56
|
})
|
|
57
|
-
}) :
|
|
57
|
+
}) : e(s, {
|
|
58
58
|
disabled: n >= i - 1 || o,
|
|
59
59
|
onClick: T,
|
|
60
|
-
children:
|
|
60
|
+
children: e(c, {
|
|
61
61
|
type: "icon-bofang"
|
|
62
62
|
})
|
|
63
|
-
}),
|
|
63
|
+
}), e(s, {
|
|
64
64
|
disabled: n >= i - 1 || o,
|
|
65
65
|
onClick: () => {
|
|
66
66
|
t(n + 1), l(n + 1);
|
|
67
67
|
},
|
|
68
|
-
children:
|
|
68
|
+
children: e(c, {
|
|
69
69
|
type: "icon-xiayige"
|
|
70
70
|
})
|
|
71
|
-
}),
|
|
71
|
+
}), e(s, {
|
|
72
72
|
disabled: n >= i - 1 || o,
|
|
73
73
|
onClick: () => {
|
|
74
74
|
t(i - 1), l(i - 1);
|
|
75
75
|
},
|
|
76
|
-
children:
|
|
76
|
+
children: e(c, {
|
|
77
77
|
type: "icon-zuihouyige"
|
|
78
78
|
})
|
|
79
79
|
})]
|
|
80
80
|
});
|
|
81
81
|
};
|
|
82
82
|
export {
|
|
83
|
-
|
|
83
|
+
E as PanoramaRecordPlayer
|
|
84
84
|
};
|
|
@@ -9,7 +9,7 @@ var p = (e, s, t) => s in e ? g(e, s, { enumerable: !0, configurable: !0, writab
|
|
|
9
9
|
P.call(s, t) && p(e, t, s[t]);
|
|
10
10
|
return e;
|
|
11
11
|
};
|
|
12
|
-
import { jsx as
|
|
12
|
+
import { jsx as l } from "react/jsx-runtime";
|
|
13
13
|
import "./style.less.mjs";
|
|
14
14
|
const h = {
|
|
15
15
|
stroke: "rgba(255, 77, 79, 0.25)",
|
|
@@ -18,20 +18,20 @@ const h = {
|
|
|
18
18
|
const {
|
|
19
19
|
style: s,
|
|
20
20
|
passes: t,
|
|
21
|
-
scale:
|
|
21
|
+
scale: o,
|
|
22
22
|
activePassId: y,
|
|
23
23
|
passStyle: m,
|
|
24
24
|
activePassStyle: d
|
|
25
25
|
} = e;
|
|
26
|
-
return
|
|
26
|
+
return l("svg", {
|
|
27
27
|
className: "pass-map",
|
|
28
28
|
style: s,
|
|
29
29
|
children: t.map((r, v) => {
|
|
30
30
|
var c;
|
|
31
31
|
const S = r.id === y ? d : h;
|
|
32
|
-
return
|
|
33
|
-
children:
|
|
34
|
-
points: (c = r.points) == null ? void 0 : c.map((i) => `${i.x *
|
|
32
|
+
return l("g", {
|
|
33
|
+
children: l("polygon", {
|
|
34
|
+
points: (c = r.points) == null ? void 0 : c.map((i) => `${i.x * o} ${i.y * o}`).join(","),
|
|
35
35
|
style: a(a(a({}, m), r.passStyle), S)
|
|
36
36
|
})
|
|
37
37
|
}, v);
|
|
@@ -1,78 +1,80 @@
|
|
|
1
1
|
var D = Object.defineProperty, I = Object.defineProperties;
|
|
2
2
|
var j = Object.getOwnPropertyDescriptors;
|
|
3
|
-
var
|
|
4
|
-
var
|
|
5
|
-
var
|
|
6
|
-
for (var
|
|
7
|
-
|
|
8
|
-
if (
|
|
9
|
-
for (var
|
|
10
|
-
|
|
3
|
+
var f = Object.getOwnPropertySymbols;
|
|
4
|
+
var C = Object.prototype.hasOwnProperty, S = Object.prototype.propertyIsEnumerable;
|
|
5
|
+
var m = (t, n, o) => n in t ? D(t, n, { enumerable: !0, configurable: !0, writable: !0, value: o }) : t[n] = o, u = (t, n) => {
|
|
6
|
+
for (var o in n || (n = {}))
|
|
7
|
+
C.call(n, o) && m(t, o, n[o]);
|
|
8
|
+
if (f)
|
|
9
|
+
for (var o of f(n))
|
|
10
|
+
S.call(n, o) && m(t, o, n[o]);
|
|
11
|
+
return t;
|
|
12
|
+
}, x = (t, n) => I(t, j(n));
|
|
13
|
+
var R = (t, n) => {
|
|
14
|
+
var o = {};
|
|
15
|
+
for (var e in t)
|
|
16
|
+
C.call(t, e) && n.indexOf(e) < 0 && (o[e] = t[e]);
|
|
17
|
+
if (t != null && f)
|
|
18
|
+
for (var e of f(t))
|
|
19
|
+
n.indexOf(e) < 0 && S.call(t, e) && (o[e] = t[e]);
|
|
11
20
|
return o;
|
|
12
|
-
}, S = (o, n) => I(o, j(n));
|
|
13
|
-
var x = (o, n) => {
|
|
14
|
-
var e = {};
|
|
15
|
-
for (var t in o)
|
|
16
|
-
m.call(o, t) && n.indexOf(t) < 0 && (e[t] = o[t]);
|
|
17
|
-
if (o != null && s)
|
|
18
|
-
for (var t of s(o))
|
|
19
|
-
n.indexOf(t) < 0 && C.call(o, t) && (e[t] = o[t]);
|
|
20
|
-
return e;
|
|
21
21
|
};
|
|
22
|
-
import { jsx as
|
|
23
|
-
import { useState as W, useRef as z, useEffect as
|
|
22
|
+
import { jsx as T } from "react/jsx-runtime";
|
|
23
|
+
import { useState as W, useRef as z, useEffect as v } from "react";
|
|
24
24
|
import A from "antd/es/tooltip";
|
|
25
|
-
const E = (
|
|
26
|
-
var a, g, O,
|
|
27
|
-
const
|
|
25
|
+
const E = (t) => {
|
|
26
|
+
var a, g, O, y;
|
|
27
|
+
const s = t, {
|
|
28
28
|
children: n,
|
|
29
|
-
open:
|
|
30
|
-
point:
|
|
29
|
+
open: o,
|
|
30
|
+
point: e,
|
|
31
31
|
key: b,
|
|
32
32
|
style: k
|
|
33
|
-
} =
|
|
33
|
+
} = s, w = R(s, [
|
|
34
34
|
"children",
|
|
35
35
|
"open",
|
|
36
36
|
"point",
|
|
37
37
|
"key",
|
|
38
38
|
"style"
|
|
39
|
-
]), [P,
|
|
40
|
-
return
|
|
39
|
+
]), [P, c] = W(o && e.tooltipOpen !== void 0 ? e.tooltipOpen : void 0), i = z(null);
|
|
40
|
+
return v(() => {
|
|
41
41
|
var p, d;
|
|
42
|
-
if (!
|
|
42
|
+
if (!e.tooltipRender || !i.current)
|
|
43
43
|
return;
|
|
44
|
-
const l =
|
|
44
|
+
const l = e.tooltipRender(e);
|
|
45
45
|
if (typeof l == "string" || typeof l == "number") {
|
|
46
46
|
i.current.innerText = l.toString();
|
|
47
47
|
return;
|
|
48
48
|
}
|
|
49
49
|
const r = (p = i.current) == null ? void 0 : p.firstChild;
|
|
50
|
-
r ? r.replaceWith(l) : (d = i.current) == null || d.appendChild(l), console.log("tooltip inner text",
|
|
51
|
-
}, [
|
|
52
|
-
|
|
53
|
-
}, [
|
|
50
|
+
r ? r.replaceWith(l) : (d = i.current) == null || d.appendChild(l), console.log("tooltip inner text", e.id), console.log((/* @__PURE__ */ new Date()).valueOf());
|
|
51
|
+
}, [e.tooltipRender, P]), v(() => {
|
|
52
|
+
c(e.tooltipOpen !== void 0 ? e.tooltipOpen && o : void 0);
|
|
53
|
+
}, [e.tooltipOpen !== void 0 ? e.tooltipOpen && o : void 0]), console.log("render PointTooltip", e.id), console.log((/* @__PURE__ */ new Date()).valueOf()), T(A, x(u({}, w), {
|
|
54
|
+
// key={point.id}
|
|
54
55
|
autoAdjustOverflow: !1,
|
|
55
56
|
placement: "top",
|
|
56
|
-
open:
|
|
57
|
+
open: e.tooltipOpen !== void 0 ? e.tooltipOpen && o : void 0,
|
|
57
58
|
onOpenChange: (l) => {
|
|
58
|
-
var d,
|
|
59
|
-
if (
|
|
59
|
+
var d, h;
|
|
60
|
+
if (e.tooltipOpen || c(l), console.log("tooltip inner text", e.id), console.log((/* @__PURE__ */ new Date()).valueOf()), !e.tooltipRender || !i.current)
|
|
60
61
|
return;
|
|
61
|
-
const r =
|
|
62
|
+
const r = e.tooltipRender(e);
|
|
62
63
|
if (typeof r == "string" || typeof r == "number") {
|
|
63
64
|
i.current.innerText = r.toString();
|
|
64
65
|
return;
|
|
65
66
|
}
|
|
66
67
|
const p = (d = i.current) == null ? void 0 : d.firstChild;
|
|
67
|
-
p ? p.replaceWith(r) : (
|
|
68
|
+
p ? p.replaceWith(r) : (h = i.current) == null || h.appendChild(r);
|
|
68
69
|
},
|
|
69
|
-
color: ((a =
|
|
70
|
-
title:
|
|
70
|
+
color: ((a = e.tooltipStyle) == null ? void 0 : a.backgroundColor) || ((g = e.tooltipStyle) == null ? void 0 : g.backgroundImage) || ((y = (O = e.tooltipStyle) == null ? void 0 : O.background) == null ? void 0 : y.toString()),
|
|
71
|
+
title: T("div", {
|
|
71
72
|
ref: i
|
|
72
73
|
}, b),
|
|
73
|
-
|
|
74
|
+
// overlayClassName="track-map-tooltip"
|
|
75
|
+
overlayInnerStyle: e.tooltipStyle,
|
|
74
76
|
destroyTooltipOnHide: !0,
|
|
75
|
-
style:
|
|
77
|
+
style: u({
|
|
76
78
|
zIndex: 9
|
|
77
79
|
}, k),
|
|
78
80
|
motion: {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { jsx as s, Fragment as O } from "react/jsx-runtime";
|
|
2
|
-
import { useRef as P, useState as
|
|
2
|
+
import { useRef as P, useState as p, useEffect as m, useMemo as g } from "react";
|
|
3
3
|
import { diff as R } from "deep-object-diff";
|
|
4
4
|
import x from "./PointTooltip.mjs";
|
|
5
5
|
import C from "lodash/debounce";
|
|
@@ -9,8 +9,8 @@ const D = {
|
|
|
9
9
|
}, M = (t) => {
|
|
10
10
|
const o = P(null), {
|
|
11
11
|
point: e,
|
|
12
|
-
open:
|
|
13
|
-
id:
|
|
12
|
+
open: y,
|
|
13
|
+
id: h,
|
|
14
14
|
x: n,
|
|
15
15
|
y: r,
|
|
16
16
|
r: i,
|
|
@@ -18,13 +18,13 @@ const D = {
|
|
|
18
18
|
hidden: T = !1,
|
|
19
19
|
onPointClick: a,
|
|
20
20
|
getTooltipContainer: b
|
|
21
|
-
} = t, [c, k] =
|
|
22
|
-
|
|
21
|
+
} = t, [c, k] = p(t.style), [w, u] = p(!0);
|
|
22
|
+
m(() => {
|
|
23
23
|
const l = R(c, t.style);
|
|
24
24
|
Object.keys(l).length && k(t.style);
|
|
25
25
|
}, [t.style]);
|
|
26
|
-
const f = g(() =>
|
|
27
|
-
id: `mark-${
|
|
26
|
+
const f = g(() => s("circle", {
|
|
27
|
+
id: `mark-${h}`,
|
|
28
28
|
className: "point point-active",
|
|
29
29
|
cx: n,
|
|
30
30
|
cy: r,
|
|
@@ -40,13 +40,13 @@ const D = {
|
|
|
40
40
|
console.log("circle is changed"), console.log("hide tooltip", e.id), console.log((/* @__PURE__ */ new Date()).valueOf()), u(!1), l();
|
|
41
41
|
});
|
|
42
42
|
}, []);
|
|
43
|
-
return
|
|
43
|
+
return m(() => {
|
|
44
44
|
if (!(!o.current || !e.tooltipRender))
|
|
45
45
|
return d.observe(o.current, D), () => {
|
|
46
46
|
o.current && d.disconnect();
|
|
47
47
|
};
|
|
48
|
-
}, [n, r, i]), T ?
|
|
49
|
-
open:
|
|
48
|
+
}, [n, r, i]), T ? s(O, {}) : e.tooltipRender && w ? s(x, {
|
|
49
|
+
open: y,
|
|
50
50
|
point: e,
|
|
51
51
|
getPopupContainer: b,
|
|
52
52
|
children: f
|