@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,24 +1,24 @@
|
|
|
1
|
-
var
|
|
2
|
-
var
|
|
3
|
-
var
|
|
4
|
-
var
|
|
5
|
-
var
|
|
1
|
+
var Te = Object.defineProperty, $e = Object.defineProperties;
|
|
2
|
+
var Fe = Object.getOwnPropertyDescriptors;
|
|
3
|
+
var he = Object.getOwnPropertySymbols;
|
|
4
|
+
var Ce = Object.prototype.hasOwnProperty, ze = Object.prototype.propertyIsEnumerable;
|
|
5
|
+
var ye = (x, l, y) => l in x ? Te(x, l, { enumerable: !0, configurable: !0, writable: !0, value: y }) : x[l] = y, b = (x, l) => {
|
|
6
6
|
for (var y in l || (l = {}))
|
|
7
|
-
|
|
8
|
-
if (
|
|
9
|
-
for (var y of
|
|
10
|
-
|
|
7
|
+
Ce.call(l, y) && ye(x, y, l[y]);
|
|
8
|
+
if (he)
|
|
9
|
+
for (var y of he(l))
|
|
10
|
+
ze.call(l, y) && ye(x, y, l[y]);
|
|
11
11
|
return x;
|
|
12
|
-
}, X = (x, l) => $
|
|
12
|
+
}, X = (x, l) => $e(x, Fe(l));
|
|
13
13
|
import { jsx as d, jsxs as Y } from "react/jsx-runtime";
|
|
14
|
-
import { useRef as
|
|
15
|
-
import
|
|
16
|
-
import
|
|
14
|
+
import { useRef as z, useState as u, useEffect as h } from "react";
|
|
15
|
+
import De from "antd/es/tooltip";
|
|
16
|
+
import Me from "react-moveable";
|
|
17
17
|
import "./style.less.mjs";
|
|
18
|
-
import
|
|
19
|
-
import { ConfigProvider as
|
|
20
|
-
const
|
|
21
|
-
var
|
|
18
|
+
import me from "./TrackPoint.mjs";
|
|
19
|
+
import { ConfigProvider as Oe } from "antd";
|
|
20
|
+
const Ue = (x) => {
|
|
21
|
+
var fe;
|
|
22
22
|
const {
|
|
23
23
|
width: l,
|
|
24
24
|
height: y,
|
|
@@ -26,131 +26,131 @@ const Ut = (x) => {
|
|
|
26
26
|
scale: a,
|
|
27
27
|
pointSize: $ = 6,
|
|
28
28
|
direction: q,
|
|
29
|
-
activePointId:
|
|
29
|
+
activePointId: D,
|
|
30
30
|
style: g,
|
|
31
|
-
lineStyle:
|
|
32
|
-
pointStyle:
|
|
33
|
-
directionStyle:
|
|
34
|
-
marks:
|
|
31
|
+
lineStyle: M,
|
|
32
|
+
pointStyle: R,
|
|
33
|
+
directionStyle: xe,
|
|
34
|
+
marks: oe,
|
|
35
35
|
resizable: H,
|
|
36
36
|
transform: r,
|
|
37
|
-
keepRatio:
|
|
37
|
+
keepRatio: ie = !1,
|
|
38
38
|
onPointClick: J,
|
|
39
39
|
onTransform: N,
|
|
40
|
-
onPointsChange:
|
|
41
|
-
onCancelResize:
|
|
40
|
+
onPointsChange: O,
|
|
41
|
+
onCancelResize: Pe,
|
|
42
42
|
actions: B = !0,
|
|
43
|
-
setIsSaved:
|
|
44
|
-
isSaved:
|
|
45
|
-
} = x, S =
|
|
43
|
+
setIsSaved: se,
|
|
44
|
+
isSaved: ce = !1
|
|
45
|
+
} = x, S = z(null), w = z(null), s = z(null), E = z(null), K = z(null), [F, pe] = u(null), [Q, U] = u((r == null ? void 0 : r.scale) || [1, 1]), [V, Z] = u((r == null ? void 0 : r.rotate) || 0), [P, _] = u((r == null ? void 0 : r.translate) || [0, 0, 0, 0]), [be, ve] = u([]), [f, ke] = u(), [Re, ae] = u(), [W, G] = u(H), [le, ee] = u([]), [v, de] = u(T), [I, We] = u(!0), [k, j] = u(), [m, C] = u(), [Ie, Ne] = u(typeof B != "boolean" ? B : B === !0 ? {} : null), A = ($ - $ / 4 * 0.9) * 2 / a;
|
|
46
46
|
h(() => {
|
|
47
|
-
|
|
47
|
+
Ne(typeof B != "boolean" ? B : B === !0 ? {} : null);
|
|
48
48
|
}, [B]);
|
|
49
|
-
const
|
|
50
|
-
if (!
|
|
49
|
+
const Be = (e, t) => {
|
|
50
|
+
if (!e.length)
|
|
51
51
|
return;
|
|
52
52
|
let i;
|
|
53
|
-
return
|
|
53
|
+
return e.map((o) => {
|
|
54
54
|
var p;
|
|
55
55
|
if (!i) {
|
|
56
56
|
i = o;
|
|
57
57
|
return;
|
|
58
58
|
}
|
|
59
|
-
const c =
|
|
59
|
+
const c = d("line", {
|
|
60
60
|
x1: Number.isFinite(i.x) ? i.x : 0,
|
|
61
61
|
y1: Number.isFinite(i.y) ? i.y : 0,
|
|
62
62
|
x2: Number.isFinite(o.x) ? o.x : 0,
|
|
63
63
|
y2: Number.isFinite(o.y) ? o.y : 0,
|
|
64
64
|
style: X(b(b({
|
|
65
65
|
stroke: "#1F66E1BF"
|
|
66
|
-
},
|
|
67
|
-
strokeWidth: Number((
|
|
66
|
+
}, M), i.lineStyle), {
|
|
67
|
+
strokeWidth: Number((M == null ? void 0 : M.strokeWidth) || ((p = i.lineStyle) == null ? void 0 : p.strokeWidth) || 2) / t
|
|
68
68
|
})
|
|
69
69
|
}, o.id);
|
|
70
70
|
return i = o, c;
|
|
71
71
|
});
|
|
72
|
-
},
|
|
72
|
+
}, ue = new ResizeObserver(() => {
|
|
73
73
|
S.current && (w.current && (w.current.style.transform = "none", w.current.style.width = "auto", w.current.style.height = "100%"), w.current && (w.current.style.width = "100%", w.current.style.height = "100%"));
|
|
74
74
|
});
|
|
75
75
|
h(() => {
|
|
76
|
-
var
|
|
77
|
-
|
|
76
|
+
var e;
|
|
77
|
+
C((e = s.current) == null ? void 0 : e.getBoundingClientRect());
|
|
78
78
|
}, [g == null ? void 0 : g.left, g == null ? void 0 : g.top, g == null ? void 0 : g.width, g == null ? void 0 : g.height, a]), h(() => {
|
|
79
79
|
G(H);
|
|
80
80
|
}, [H]), h(() => {
|
|
81
|
-
|
|
82
|
-
}, [T,
|
|
83
|
-
var
|
|
84
|
-
(!((
|
|
85
|
-
}, [(
|
|
86
|
-
!s.current ||
|
|
87
|
-
}, [
|
|
81
|
+
de(T || []);
|
|
82
|
+
}, [T, le]), h(() => {
|
|
83
|
+
var e;
|
|
84
|
+
(!((e = s.current) != null && e.style.transform) || s.current.style.transform === "none") && (U((r == null ? void 0 : r.scale) || [1, 1]), Z((r == null ? void 0 : r.rotate) || 0), _((r == null ? void 0 : r.translate) || [0, 0, 0, 0]));
|
|
85
|
+
}, [(fe = s.current) == null ? void 0 : fe.style.transform]), h(() => {
|
|
86
|
+
!s.current || W || (s.current.style.transform = "none", U((r == null ? void 0 : r.scale) || [1, 1]), Z((r == null ? void 0 : r.rotate) || 0), _((r == null ? void 0 : r.translate) || [0, 0, 0, 0]));
|
|
87
|
+
}, [W]), h(() => {
|
|
88
88
|
if (S.current)
|
|
89
|
-
return
|
|
90
|
-
S.current &&
|
|
89
|
+
return ue.observe(S.current), () => {
|
|
90
|
+
S.current && ue.unobserve(S.current);
|
|
91
91
|
};
|
|
92
92
|
}, [S.current]), h(() => {
|
|
93
93
|
!F || !r || (F.throttleDragRotate = r.rotate, F.throttleScale = r.scale, F.throttleDrag = r.translate);
|
|
94
94
|
}, [F, r]), h(() => {
|
|
95
|
-
|
|
96
|
-
let
|
|
97
|
-
var p,
|
|
98
|
-
const i =
|
|
99
|
-
return
|
|
95
|
+
ke(v == null ? void 0 : v.find((t) => t.id === D));
|
|
96
|
+
let e = v.map((t) => {
|
|
97
|
+
var p, ne, L;
|
|
98
|
+
const i = t.x, n = t.y, o = t.id === D, c = $ * (o ? 1.2 : 1) / a;
|
|
99
|
+
return d(me, {
|
|
100
100
|
open: I,
|
|
101
|
-
id:
|
|
102
|
-
point:
|
|
101
|
+
id: t.id,
|
|
102
|
+
point: t,
|
|
103
103
|
getTooltipContainer: () => K.current || document.body,
|
|
104
104
|
x: i,
|
|
105
105
|
y: n,
|
|
106
|
-
r:
|
|
106
|
+
r: R != null && R.r || (p = t.pointStyle) != null && p.r ? Number((R == null ? void 0 : R.r) || ((ne = t.pointStyle) == null ? void 0 : ne.r)) / a : c / 2,
|
|
107
107
|
hidden: o,
|
|
108
108
|
style: X(b(b({
|
|
109
109
|
stroke: "#1F66E1BF",
|
|
110
110
|
fill: "#fff",
|
|
111
111
|
cursor: J ? "pointer" : "unset"
|
|
112
|
-
},
|
|
113
|
-
strokeWidth: Number(((L =
|
|
112
|
+
}, R), t.pointStyle), {
|
|
113
|
+
strokeWidth: Number(((L = t.pointStyle) == null ? void 0 : L.strokeWidth) || 2) / a,
|
|
114
114
|
r: void 0
|
|
115
115
|
}),
|
|
116
116
|
onPointClick: J
|
|
117
|
-
},
|
|
117
|
+
}, t.id);
|
|
118
118
|
}) || [];
|
|
119
|
-
|
|
120
|
-
}, [v,
|
|
119
|
+
ve(e);
|
|
120
|
+
}, [v, D, a, I]), h(() => {
|
|
121
121
|
var o, c, p;
|
|
122
122
|
if (!f) {
|
|
123
|
-
|
|
123
|
+
ae(void 0);
|
|
124
124
|
return;
|
|
125
125
|
}
|
|
126
|
-
const
|
|
127
|
-
|
|
128
|
-
children: [q !== void 0 &&
|
|
126
|
+
const e = f.x, t = f.y, i = f.id === D, n = $ * (i ? 1.2 : 1) / a;
|
|
127
|
+
ae(Y("g", {
|
|
128
|
+
children: [q !== void 0 && d("circle", {
|
|
129
129
|
id: `mark-${f.id}`,
|
|
130
|
-
cx:
|
|
131
|
-
cy:
|
|
130
|
+
cx: e,
|
|
131
|
+
cy: t,
|
|
132
132
|
r: `${A}`,
|
|
133
133
|
strokeDasharray: A * 2 * Math.PI,
|
|
134
134
|
strokeDashoffset: A * 2 * Math.PI / 360 * (360 - 60),
|
|
135
135
|
style: b({
|
|
136
136
|
transform: `rotate(${q + 240}deg)`,
|
|
137
|
-
transformOrigin: `${
|
|
137
|
+
transformOrigin: `${e}px ${t}px`,
|
|
138
138
|
strokeWidth: A * 2,
|
|
139
139
|
stroke: "#1F66E1BF",
|
|
140
140
|
fill: "transparent",
|
|
141
141
|
pointerEvents: "none"
|
|
142
|
-
},
|
|
143
|
-
}),
|
|
142
|
+
}, xe)
|
|
143
|
+
}), d(me, {
|
|
144
144
|
open: I,
|
|
145
145
|
point: f,
|
|
146
146
|
getTooltipContainer: () => K.current || document.body,
|
|
147
|
-
x:
|
|
148
|
-
y:
|
|
147
|
+
x: e,
|
|
148
|
+
y: t,
|
|
149
149
|
r: (o = f.pointStyle) != null && o.r ? Number((c = f.pointStyle) == null ? void 0 : c.r) / a : n / 2,
|
|
150
150
|
style: X(b(b({
|
|
151
151
|
stroke: "#1F66E1BF",
|
|
152
152
|
fill: "#fff"
|
|
153
|
-
},
|
|
153
|
+
}, R), f.pointStyle), {
|
|
154
154
|
strokeWidth: Number(((p = f.pointStyle) == null ? void 0 : p.strokeWidth) || 2) / a,
|
|
155
155
|
r: void 0
|
|
156
156
|
}),
|
|
@@ -159,59 +159,59 @@ const Ut = (x) => {
|
|
|
159
159
|
}, f.id));
|
|
160
160
|
}, [f, q, a, I]), h(() => {
|
|
161
161
|
s.current && setTimeout(() => {
|
|
162
|
-
var
|
|
163
|
-
j((
|
|
162
|
+
var e, t;
|
|
163
|
+
j((e = s.current) == null ? void 0 : e.getBBox()), C((t = s.current) == null ? void 0 : t.getBoundingClientRect());
|
|
164
164
|
}, 100);
|
|
165
165
|
}, [r]), h(() => {
|
|
166
|
-
var
|
|
166
|
+
var t, i;
|
|
167
167
|
if (!s.current)
|
|
168
168
|
return;
|
|
169
|
-
j((
|
|
169
|
+
j((t = s.current) == null ? void 0 : t.getBBox()), C((i = s.current) == null ? void 0 : i.getBoundingClientRect()), new ResizeObserver(() => {
|
|
170
170
|
var n, o;
|
|
171
|
-
j((n = s.current) == null ? void 0 : n.getBBox()),
|
|
171
|
+
j((n = s.current) == null ? void 0 : n.getBBox()), C((o = s.current) == null ? void 0 : o.getBoundingClientRect());
|
|
172
172
|
}).observe(s.current);
|
|
173
173
|
}, [s.current]), h(() => {
|
|
174
|
-
|
|
175
|
-
}, [
|
|
176
|
-
const
|
|
174
|
+
ce && (Se(), se && se(!1));
|
|
175
|
+
}, [ce]);
|
|
176
|
+
const Se = () => {
|
|
177
177
|
var n;
|
|
178
|
-
const
|
|
179
|
-
if (!
|
|
180
|
-
|
|
178
|
+
const e = (n = E.current) == null ? void 0 : n.getBoundingClientRect();
|
|
179
|
+
if (!e) {
|
|
180
|
+
O && O(T), G(!1);
|
|
181
181
|
return;
|
|
182
182
|
}
|
|
183
|
-
const
|
|
183
|
+
const t = le.map((o) => {
|
|
184
184
|
const c = o.getBoundingClientRect();
|
|
185
185
|
return {
|
|
186
186
|
id: o.id.split("-")[1],
|
|
187
|
-
x: (c.x + c.width / 2 -
|
|
188
|
-
y: (c.y + c.height / 2 -
|
|
187
|
+
x: (c.x + c.width / 2 - e.x) / a,
|
|
188
|
+
y: (c.y + c.height / 2 - e.y) / a
|
|
189
189
|
};
|
|
190
190
|
}), i = T.map((o) => {
|
|
191
|
-
const c =
|
|
191
|
+
const c = t == null ? void 0 : t.find((p) => p.id.toString() === o.id.toString());
|
|
192
192
|
return c ? b(b({}, o), c) : o;
|
|
193
193
|
});
|
|
194
|
-
|
|
194
|
+
de(i), O && O(i.length ? i.map((o, c) => ({
|
|
195
195
|
id: o.id,
|
|
196
196
|
x: o.x,
|
|
197
197
|
y: o.y,
|
|
198
198
|
order: c
|
|
199
199
|
})) : T), G(!1);
|
|
200
|
-
},
|
|
200
|
+
}, we = (e) => e.map((t) => {
|
|
201
201
|
const {
|
|
202
202
|
render: i,
|
|
203
203
|
renderData: n
|
|
204
|
-
} =
|
|
205
|
-
return
|
|
204
|
+
} = t, o = t.x * a, c = t.y * a;
|
|
205
|
+
return d(De, {
|
|
206
206
|
className: "track-map-marker-tooltip",
|
|
207
207
|
placement: "top",
|
|
208
|
-
title: i(n, b({},
|
|
208
|
+
title: i(n, b({}, t)),
|
|
209
209
|
open: !!n,
|
|
210
210
|
style: {
|
|
211
211
|
zIndex: 9999
|
|
212
212
|
},
|
|
213
|
-
children:
|
|
214
|
-
id: `mark-${
|
|
213
|
+
children: d("circle", {
|
|
214
|
+
id: `mark-${t.id}`,
|
|
215
215
|
cx: o,
|
|
216
216
|
cy: c,
|
|
217
217
|
r: $ / 2,
|
|
@@ -220,59 +220,59 @@ const Ut = (x) => {
|
|
|
220
220
|
strokeWidth: 2,
|
|
221
221
|
fill: "#fff0"
|
|
222
222
|
},
|
|
223
|
-
children:
|
|
223
|
+
children: d("span", {
|
|
224
224
|
children: n.label
|
|
225
225
|
})
|
|
226
226
|
})
|
|
227
|
-
},
|
|
228
|
-
}),
|
|
229
|
-
x:
|
|
230
|
-
y:
|
|
227
|
+
}, t.id);
|
|
228
|
+
}), ge = k ? {
|
|
229
|
+
x: k.x + k.width / 2,
|
|
230
|
+
y: k.y + k.height / 2
|
|
231
231
|
} : {
|
|
232
232
|
x: 0,
|
|
233
233
|
y: 0
|
|
234
|
-
},
|
|
235
|
-
return
|
|
234
|
+
}, te = v.reduce((e, t) => [Math.min(e[0], t.x), Math.max(e[1], t.x)], [0, 0]), re = v.reduce((e, t) => [Math.min(e[0], t.y), Math.max(e[1], t.y)], [0, 0]);
|
|
235
|
+
return d(Oe, {
|
|
236
236
|
prefixCls: "g-rc",
|
|
237
|
-
children:
|
|
237
|
+
children: Y("div", {
|
|
238
238
|
className: "track-map",
|
|
239
239
|
style: {
|
|
240
240
|
width: "100%",
|
|
241
241
|
height: "100%"
|
|
242
242
|
},
|
|
243
243
|
ref: S,
|
|
244
|
-
children: [
|
|
244
|
+
children: [d("svg", {
|
|
245
245
|
style: g,
|
|
246
246
|
ref: E,
|
|
247
247
|
viewBox: `0 0 ${l} ${y}`,
|
|
248
|
-
children:
|
|
248
|
+
children: Y("g", {
|
|
249
249
|
ref: s,
|
|
250
|
-
x:
|
|
251
|
-
y:
|
|
252
|
-
width:
|
|
253
|
-
height:
|
|
250
|
+
x: te[0],
|
|
251
|
+
y: re[0],
|
|
252
|
+
width: te[1] - te[0],
|
|
253
|
+
height: re[1] - re[0],
|
|
254
254
|
style: {
|
|
255
|
-
transformOrigin: `${
|
|
256
|
-
cursor:
|
|
255
|
+
transformOrigin: `${ge.x}px ${ge.y}px`,
|
|
256
|
+
cursor: W ? "url('./images/icon-move.svg') 16 16, move" : "unset",
|
|
257
257
|
transform: r && r.scale ? `${r.translate ? ` translate(${r.translate[0]}px, ${r.translate[1]}px)` : ""} rotate(${r.rotate}rad)${r.scale ? ` scale(${r.scale[0]}, ${r.scale[1]})` : ""}` : "none"
|
|
258
258
|
},
|
|
259
|
-
children: [
|
|
260
|
-
x:
|
|
261
|
-
y:
|
|
262
|
-
width:
|
|
263
|
-
height:
|
|
259
|
+
children: [k && d("rect", {
|
|
260
|
+
x: k.x,
|
|
261
|
+
y: k.y,
|
|
262
|
+
width: k.width,
|
|
263
|
+
height: k.height,
|
|
264
264
|
fill: "#ff000004"
|
|
265
|
-
}),
|
|
265
|
+
}), d("g", {
|
|
266
266
|
className: "track-lines",
|
|
267
|
-
children:
|
|
268
|
-
}),
|
|
267
|
+
children: Be((v == null ? void 0 : v.filter((e) => e.order > -1)) || [], a)
|
|
268
|
+
}), Y("g", {
|
|
269
269
|
className: "track-points",
|
|
270
|
-
children: [
|
|
271
|
-
}),
|
|
272
|
-
children:
|
|
270
|
+
children: [be, Re]
|
|
271
|
+
}), oe && d("g", {
|
|
272
|
+
children: we(oe)
|
|
273
273
|
})]
|
|
274
274
|
})
|
|
275
|
-
}),
|
|
275
|
+
}), d("div", {
|
|
276
276
|
className: "tooltip-container",
|
|
277
277
|
ref: K,
|
|
278
278
|
style: {
|
|
@@ -282,12 +282,12 @@ const Ut = (x) => {
|
|
|
282
282
|
width: (m == null ? void 0 : m.width) || 0,
|
|
283
283
|
height: (m == null ? void 0 : m.height) || 0
|
|
284
284
|
}
|
|
285
|
-
}),
|
|
285
|
+
}), W && s.current && E.current && d(Me, {
|
|
286
286
|
className: "path-moveable-control-box",
|
|
287
|
-
ref: (
|
|
288
|
-
|
|
287
|
+
ref: (e) => {
|
|
288
|
+
pe(e);
|
|
289
289
|
},
|
|
290
|
-
keepRatio:
|
|
290
|
+
keepRatio: ie,
|
|
291
291
|
target: [s.current],
|
|
292
292
|
draggable: !0,
|
|
293
293
|
scalable: !0,
|
|
@@ -299,77 +299,77 @@ const Ut = (x) => {
|
|
|
299
299
|
bottom: 10
|
|
300
300
|
},
|
|
301
301
|
onDrag: ({
|
|
302
|
-
target:
|
|
303
|
-
beforeDelta:
|
|
302
|
+
target: e,
|
|
303
|
+
beforeDelta: t,
|
|
304
304
|
beforeDist: i,
|
|
305
305
|
left: n,
|
|
306
306
|
top: o,
|
|
307
307
|
right: c,
|
|
308
308
|
bottom: p,
|
|
309
|
-
delta:
|
|
309
|
+
delta: ne,
|
|
310
310
|
dist: L,
|
|
311
|
-
transform:
|
|
312
|
-
clientX:
|
|
313
|
-
clientY:
|
|
311
|
+
transform: Ee,
|
|
312
|
+
clientX: je,
|
|
313
|
+
clientY: Ae
|
|
314
314
|
}) => {
|
|
315
|
-
_(L),
|
|
315
|
+
_(L), e.style.transform = Ee;
|
|
316
316
|
},
|
|
317
317
|
onDragStart: ({
|
|
318
|
-
inputEvent:
|
|
318
|
+
inputEvent: e
|
|
319
319
|
}) => {
|
|
320
|
-
|
|
320
|
+
e.stopPropagation();
|
|
321
321
|
},
|
|
322
322
|
onDragEnd: () => {
|
|
323
|
-
var
|
|
324
|
-
const
|
|
325
|
-
|
|
323
|
+
var t;
|
|
324
|
+
const e = (t = s.current) == null ? void 0 : t.getElementsByTagName("circle");
|
|
325
|
+
ee(e != null && e.length ? [...e] : []), N && N({
|
|
326
326
|
rotate: V,
|
|
327
|
-
translate:
|
|
327
|
+
translate: P,
|
|
328
328
|
scale: Q
|
|
329
|
-
},
|
|
329
|
+
}, e != null && e.length ? [...e] : [], E.current || void 0);
|
|
330
330
|
},
|
|
331
|
-
renderDirections:
|
|
331
|
+
renderDirections: ie ? ["nw", "ne", "sw", "se"] : ["n", "w", "e", "s", "nw", "ne", "sw", "se"],
|
|
332
332
|
onScale: ({
|
|
333
|
-
target:
|
|
334
|
-
scale:
|
|
333
|
+
target: e,
|
|
334
|
+
scale: t,
|
|
335
335
|
transform: i
|
|
336
336
|
}) => {
|
|
337
337
|
var o;
|
|
338
|
-
U(
|
|
338
|
+
U(t), e.style.transform = i;
|
|
339
339
|
const n = (o = s.current) == null ? void 0 : o.getElementsByTagName("circle");
|
|
340
|
-
|
|
340
|
+
ee(n != null && n.length ? [...n] : []), N && N({
|
|
341
341
|
rotate: V,
|
|
342
|
-
translate:
|
|
343
|
-
scale:
|
|
342
|
+
translate: P,
|
|
343
|
+
scale: t
|
|
344
344
|
}, n != null && n.length ? [...n] : [], E.current || void 0);
|
|
345
345
|
},
|
|
346
346
|
onRotate: ({
|
|
347
|
-
target:
|
|
348
|
-
dist:
|
|
347
|
+
target: e,
|
|
348
|
+
dist: t,
|
|
349
349
|
transform: i
|
|
350
350
|
}) => {
|
|
351
351
|
var o;
|
|
352
|
-
Z(
|
|
352
|
+
Z(t), e.style.transform = i;
|
|
353
353
|
const n = (o = s.current) == null ? void 0 : o.getElementsByTagName("circle");
|
|
354
|
-
|
|
355
|
-
rotate:
|
|
356
|
-
translate:
|
|
354
|
+
ee(n != null && n.length ? [...n] : []), N && N({
|
|
355
|
+
rotate: t,
|
|
356
|
+
translate: P,
|
|
357
357
|
scale: Q
|
|
358
358
|
}, n != null && n.length ? [...n] : [], E.current || void 0);
|
|
359
359
|
},
|
|
360
360
|
onRenderEnd: () => {
|
|
361
|
-
var
|
|
362
|
-
const
|
|
361
|
+
var t, i, n;
|
|
362
|
+
const e = (t = s.current) == null ? void 0 : t.getElementsByTagName("circle");
|
|
363
363
|
N && N({
|
|
364
364
|
rotate: V,
|
|
365
|
-
translate:
|
|
365
|
+
translate: P,
|
|
366
366
|
scale: Q
|
|
367
|
-
},
|
|
367
|
+
}, e != null && e.length ? [...e] : [], E.current || void 0), j((i = s.current) == null ? void 0 : i.getBBox()), C((n = s.current) == null ? void 0 : n.getBoundingClientRect());
|
|
368
368
|
}
|
|
369
369
|
})]
|
|
370
370
|
})
|
|
371
371
|
});
|
|
372
372
|
};
|
|
373
373
|
export {
|
|
374
|
-
|
|
374
|
+
Ue as TrackMap
|
|
375
375
|
};
|
package/dist/es/Zoom/index.mjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { jsxs as d, jsx as
|
|
1
|
+
import { jsxs as d, jsx as n } from "react/jsx-runtime";
|
|
2
2
|
import { IconButton as m } from "../IconButton/index.mjs";
|
|
3
3
|
import { Iconfont as l } from "../Iconfont/index.mjs";
|
|
4
4
|
import { useState as x, useEffect as y } from "react";
|
|
@@ -6,38 +6,38 @@ const j = (a) => {
|
|
|
6
6
|
const {
|
|
7
7
|
className: f,
|
|
8
8
|
style: h,
|
|
9
|
-
value:
|
|
10
|
-
min:
|
|
11
|
-
max:
|
|
12
|
-
step:
|
|
13
|
-
onChange:
|
|
9
|
+
value: t,
|
|
10
|
+
min: i,
|
|
11
|
+
max: c,
|
|
12
|
+
step: e = 1,
|
|
13
|
+
onChange: r,
|
|
14
14
|
showText: p = !1
|
|
15
|
-
} = a, [
|
|
15
|
+
} = a, [o, s] = x(t != null ? t : 0);
|
|
16
16
|
return y(() => {
|
|
17
|
-
|
|
18
|
-
}, [
|
|
17
|
+
s(t != null ? t : 0);
|
|
18
|
+
}, [t]), d("div", {
|
|
19
19
|
className: f,
|
|
20
20
|
style: h,
|
|
21
|
-
children: [
|
|
22
|
-
disabled: !!(
|
|
21
|
+
children: [n(m, {
|
|
22
|
+
disabled: !!(c && c <= o),
|
|
23
23
|
onClick: () => {
|
|
24
|
-
|
|
24
|
+
r(o + e), s(o + e);
|
|
25
25
|
},
|
|
26
|
-
children:
|
|
26
|
+
children: n(l, {
|
|
27
27
|
type: "icon-fangda"
|
|
28
28
|
})
|
|
29
|
-
}), p &&
|
|
29
|
+
}), p && d("div", {
|
|
30
30
|
style: {
|
|
31
31
|
width: 40,
|
|
32
32
|
textAlign: "center"
|
|
33
33
|
},
|
|
34
|
-
children: [Math.round(
|
|
35
|
-
}),
|
|
36
|
-
disabled: !!(
|
|
34
|
+
children: [Math.round(o * 100), "%"]
|
|
35
|
+
}), n(m, {
|
|
36
|
+
disabled: !!(i && i >= o),
|
|
37
37
|
onClick: () => {
|
|
38
|
-
|
|
38
|
+
r(o - e), s(o - e);
|
|
39
39
|
},
|
|
40
|
-
children:
|
|
40
|
+
children: n(l, {
|
|
41
41
|
type: "icon-suoxiao"
|
|
42
42
|
})
|
|
43
43
|
})]
|
|
@@ -1,30 +1,30 @@
|
|
|
1
|
-
import { jsx as
|
|
1
|
+
import { jsx as e } from "react/jsx-runtime";
|
|
2
2
|
import { useState as r, useEffect as c } from "react";
|
|
3
3
|
import { Iconfont as l } from "../../Iconfont/index.mjs";
|
|
4
4
|
import { copyToClipboard as m } from "../../utils/clipboard.mjs";
|
|
5
5
|
import "./style.less.mjs";
|
|
6
|
-
import { CheckOutlined as
|
|
6
|
+
import { CheckOutlined as n, CloseOutlined as p } from "@ant-design/icons";
|
|
7
7
|
import { Tooltip as f } from "antd";
|
|
8
|
-
const
|
|
8
|
+
const g = ({
|
|
9
9
|
text: i
|
|
10
10
|
}) => {
|
|
11
|
-
const [
|
|
11
|
+
const [o, t] = r();
|
|
12
12
|
return c(() => {
|
|
13
|
-
|
|
14
|
-
}, [
|
|
13
|
+
o && setTimeout(() => t(void 0), 2e3);
|
|
14
|
+
}, [o]), o ? e("div", {
|
|
15
15
|
className: "copy-tip",
|
|
16
|
-
children:
|
|
16
|
+
children: o === "success" ? e(n, {
|
|
17
17
|
style: {
|
|
18
18
|
color: "rgba(48, 191, 19, 1)"
|
|
19
19
|
}
|
|
20
|
-
}) :
|
|
20
|
+
}) : e(p, {
|
|
21
21
|
style: {
|
|
22
22
|
color: "#dc4446"
|
|
23
23
|
}
|
|
24
24
|
})
|
|
25
|
-
}) :
|
|
25
|
+
}) : e(f, {
|
|
26
26
|
title: "复制",
|
|
27
|
-
children:
|
|
27
|
+
children: e("div", {
|
|
28
28
|
className: "copy-btn",
|
|
29
29
|
onClick: () => {
|
|
30
30
|
m({
|
|
@@ -33,12 +33,12 @@ const b = ({
|
|
|
33
33
|
t(s ? "success" : "failed");
|
|
34
34
|
});
|
|
35
35
|
},
|
|
36
|
-
children:
|
|
36
|
+
children: e(l, {
|
|
37
37
|
type: "icon-fuzhi"
|
|
38
38
|
})
|
|
39
39
|
})
|
|
40
40
|
});
|
|
41
41
|
};
|
|
42
42
|
export {
|
|
43
|
-
|
|
43
|
+
g as Copy
|
|
44
44
|
};
|