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