@blocklet/ui-react 3.0.9 → 3.0.10

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 (51) hide show
  1. package/lib/BlockletStudio/index.js +70 -71
  2. package/lib/ComponentInstaller/index.js +85 -88
  3. package/lib/ComponentInstaller/installer-item.js +47 -53
  4. package/lib/ComponentInstaller/use-component-installed.js +32 -38
  5. package/lib/ComponentManager/components/add-component.js +47 -50
  6. package/lib/ComponentManager/components/publish-component.js +30 -31
  7. package/lib/ComponentManager/components/resource-dialog.js +28 -30
  8. package/lib/Dashboard/index.d.ts +1 -1
  9. package/lib/Dashboard/index.js +59 -61
  10. package/lib/Footer/index.js +51 -52
  11. package/lib/Footer/internal-footer.js +43 -47
  12. package/lib/Footer/layout/standard.js +11 -12
  13. package/lib/Footer/links.js +25 -28
  14. package/lib/Footer/social-media.js +17 -17
  15. package/lib/Header/index.js +81 -83
  16. package/lib/Notifications/Snackbar.js +76 -77
  17. package/lib/Notifications/hooks/use-title.js +34 -34
  18. package/lib/Notifications/utils.js +56 -60
  19. package/lib/UserCenter/components/config-inviter.js +17 -18
  20. package/lib/UserCenter/components/danger-zone.js +49 -52
  21. package/lib/UserCenter/components/nft.js +44 -45
  22. package/lib/UserCenter/components/notification.js +92 -99
  23. package/lib/UserCenter/components/passport.js +22 -22
  24. package/lib/UserCenter/components/privacy.js +6 -6
  25. package/lib/UserCenter/components/settings.js +40 -43
  26. package/lib/UserCenter/components/status-dialog/date-picker.js +7 -8
  27. package/lib/UserCenter/components/status-dialog/index.js +112 -114
  28. package/lib/UserCenter/components/status-selector/duration-menu.js +35 -36
  29. package/lib/UserCenter/components/status-selector/index.js +13 -13
  30. package/lib/UserCenter/components/storage/action.js +21 -22
  31. package/lib/UserCenter/components/storage/delete.js +24 -24
  32. package/lib/UserCenter/components/third-party-login/index.js +53 -53
  33. package/lib/UserCenter/components/third-party-login/third-party-item.js +87 -89
  34. package/lib/UserCenter/components/user-center.js +198 -207
  35. package/lib/UserCenter/components/user-info/metadata.js +343 -353
  36. package/lib/UserCenter/components/user-info/switch-role.js +17 -20
  37. package/lib/UserCenter/components/user-info/user-basic-info.js +79 -82
  38. package/lib/UserCenter/components/user-info/user-info.js +40 -40
  39. package/lib/UserCenter/components/user-info/user-status.js +97 -99
  40. package/lib/UserCenter/components/user-info/utils.js +34 -35
  41. package/lib/UserSessions/components/user-session-info.js +25 -28
  42. package/lib/UserSessions/components/user-sessions.js +169 -181
  43. package/lib/blocklets.js +62 -72
  44. package/lib/common/domain-warning.js +31 -31
  45. package/lib/common/header-addons.d.ts +1 -1
  46. package/lib/common/header-addons.js +49 -53
  47. package/lib/common/notification-addon.js +29 -32
  48. package/lib/common/ws.js +17 -18
  49. package/lib/contexts/config-user-space.js +16 -19
  50. package/lib/utils.js +44 -48
  51. package/package.json +6 -6
@@ -1,81 +1,80 @@
1
- import { jsx as I } from "react/jsx-runtime";
2
- import { BLOCKLET_SERVICE_PATH_PREFIX as T } from "@arcblock/ux/lib/Util/constant";
3
- import { useState as V, useRef as p, useEffect as A } from "react";
4
- import { joinURL as H } from "ufo";
5
- function J(d, s) {
6
- const i = new URL(d);
7
- return Object.keys(s).forEach((e) => {
8
- const r = s[e];
9
- r !== void 0 && i.searchParams.set(e, typeof r == "string" ? r : JSON.stringify(r));
10
- }), i.pathname + i.search;
1
+ import { jsx as _ } from "react/jsx-runtime";
2
+ import { BLOCKLET_SERVICE_PATH_PREFIX as k } from "@arcblock/ux/lib/Util/constant";
3
+ import { useState as C, useRef as f, useEffect as F } from "react";
4
+ import { joinURL as I } from "ufo";
5
+ function T(n, r) {
6
+ const t = new URL(n);
7
+ return Object.keys(r).forEach((i) => {
8
+ const e = r[i];
9
+ e !== void 0 && t.searchParams.set(i, typeof e == "string" ? e : JSON.stringify(e));
10
+ }), t.pathname + t.search;
11
11
  }
12
- function z({
13
- open: d,
14
- setOpen: s,
15
- onOpened: i = void 0,
16
- componentDid: e,
17
- tenantScope: r = void 0,
18
- resourcesParams: h = {},
19
- mode: w = "dialog",
20
- title: E = void 0,
21
- logo: v = void 0,
22
- description: R = void 0,
23
- introduction: L = void 0,
24
- note: y = void 0,
25
- componentsTitle: D = void 0,
26
- resourcesTitle: S = void 0,
27
- onUploaded: b = void 0,
28
- onReleased: j = void 0,
29
- onConnected: x = void 0,
30
- components: B = [],
31
- resources: P = {},
32
- style: U = {},
33
- zIndex: _ = 9999,
34
- dependentComponentsMode: k = void 0,
35
- ...C
12
+ function K({
13
+ open: n,
14
+ setOpen: r,
15
+ onOpened: t = void 0,
16
+ componentDid: i,
17
+ tenantScope: e = void 0,
18
+ resourcesParams: v = {},
19
+ mode: p = "dialog",
20
+ title: m = void 0,
21
+ logo: g = void 0,
22
+ description: h = void 0,
23
+ introduction: w = void 0,
24
+ note: E = void 0,
25
+ componentsTitle: R = void 0,
26
+ resourcesTitle: L = void 0,
27
+ onUploaded: y = void 0,
28
+ onReleased: D = void 0,
29
+ onConnected: S = void 0,
30
+ components: b = [],
31
+ resources: O = {},
32
+ style: j = {},
33
+ zIndex: x = 9999,
34
+ dependentComponentsMode: B = void 0,
35
+ ...P
36
36
  }) {
37
- const [a, n] = V(!1), c = p("");
38
- c.current = e;
39
- const t = p({});
40
- if (t.current["resourceDialog.close"] = () => {
41
- n(!1), s(!1);
42
- }, t.current["resourceDialog.loaded"] = () => {
43
- n(!0), i == null || i();
44
- }, t.current["studioDialog.uploaded"] = b, t.current["studioDialog.connected"] = x, t.current["studioDialog.released"] = j, A(() => {
45
- const u = (o) => {
46
- var f, m, g;
47
- if (((f = o == null ? void 0 : o.data) == null ? void 0 : f.componentDid) !== c.current)
37
+ const [d, a] = C(!1), c = f("");
38
+ c.current = i;
39
+ const o = f({});
40
+ if (o.current["resourceDialog.close"] = () => {
41
+ a(!1), r(!1);
42
+ }, o.current["resourceDialog.loaded"] = () => {
43
+ a(!0), t?.();
44
+ }, o.current["studioDialog.uploaded"] = y, o.current["studioDialog.connected"] = S, o.current["studioDialog.released"] = D, F(() => {
45
+ const u = (s) => {
46
+ if (s?.data?.componentDid !== c.current)
48
47
  return;
49
- const l = t.current[(m = o == null ? void 0 : o.data) == null ? void 0 : m.event];
50
- typeof l == "function" && l((g = o == null ? void 0 : o.data) == null ? void 0 : g.data);
48
+ const l = o.current[s?.data?.event];
49
+ typeof l == "function" && l(s?.data?.data);
51
50
  };
52
51
  return window.addEventListener("message", u), () => {
53
52
  window.removeEventListener("message", u);
54
53
  };
55
- }, []), !d)
54
+ }, []), !n)
56
55
  return null;
57
- const F = J(
58
- H(window.location.origin, T, "/embed/resources", e, "/publish"),
56
+ const U = T(
57
+ I(window.location.origin, k, "/embed/resources", i, "/publish"),
59
58
  {
60
- title: E,
61
- logo: v,
62
- description: R,
63
- introduction: L,
64
- note: y,
65
- tenantScope: r,
66
- mode: w,
67
- resourcesParams: h,
68
- resources: P,
69
- components: B,
70
- resourcesTitle: S,
71
- componentsTitle: D,
72
- dependentComponentsMode: k
59
+ title: m,
60
+ logo: g,
61
+ description: h,
62
+ introduction: w,
63
+ note: E,
64
+ tenantScope: e,
65
+ mode: p,
66
+ resourcesParams: v,
67
+ resources: O,
68
+ components: b,
69
+ resourcesTitle: L,
70
+ componentsTitle: R,
71
+ dependentComponentsMode: B
73
72
  }
74
73
  );
75
- return /* @__PURE__ */ I(
74
+ return /* @__PURE__ */ _(
76
75
  "iframe",
77
76
  {
78
- src: F,
77
+ src: U,
79
78
  title: "Blocklet Studio",
80
79
  style: {
81
80
  position: "fixed",
@@ -83,18 +82,18 @@ function z({
83
82
  left: 0,
84
83
  width: "100vw",
85
84
  height: "100vh",
86
- zIndex: _,
85
+ zIndex: x,
87
86
  border: 0,
88
87
  padding: 0,
89
88
  margin: 0,
90
- pointerEvents: a ? "auto" : "none",
91
- opacity: a ? 1 : 0,
92
- ...U
89
+ pointerEvents: d ? "auto" : "none",
90
+ opacity: d ? 1 : 0,
91
+ ...j
93
92
  },
94
- ...C
93
+ ...P
95
94
  }
96
95
  );
97
96
  }
98
97
  export {
99
- z as default
98
+ K as default
100
99
  };
@@ -1,54 +1,54 @@
1
- import { jsx as e, jsxs as o, Fragment as x } from "react/jsx-runtime";
2
- import { SessionContext as R } from "@arcblock/did-connect/lib/Session";
3
- import { useLocaleContext as W } from "@arcblock/ux/lib/Locale/context";
4
- import { translate as q } from "@arcblock/ux/lib/Locale/util";
5
- import A from "@arcblock/ux/lib/SessionPermission";
6
- import { Icon as I } from "@iconify/react";
7
- import { Close as S } from "@mui/icons-material";
8
- import { ClickAwayListener as F, Fade as N, Paper as O, Box as n, IconButton as C } from "@mui/material";
9
- import { useMemoizedFn as Y } from "ahooks";
10
- import t from "prop-types";
11
- import { use as P } from "react";
12
- import $ from "./installer-item.js";
13
- import E from "./locales.js";
14
- import H from "./use-component-installed.js";
15
- function m({
1
+ import { jsx as e, jsxs as r, Fragment as x } from "react/jsx-runtime";
2
+ import { SessionContext as j } from "@arcblock/did-connect/lib/Session";
3
+ import { useLocaleContext as M } from "@arcblock/ux/lib/Locale/context";
4
+ import { translate as R } from "@arcblock/ux/lib/Locale/util";
5
+ import W from "@arcblock/ux/lib/SessionPermission";
6
+ import { Icon as y } from "@iconify/react";
7
+ import { Close as w } from "@mui/icons-material";
8
+ import { ClickAwayListener as q, Fade as A, Paper as F, Box as n, IconButton as b } from "@mui/material";
9
+ import { useMemoizedFn as N } from "ahooks";
10
+ import o from "prop-types";
11
+ import { use as O } from "react";
12
+ import Y from "./installer-item.js";
13
+ import P from "./locales.js";
14
+ import $ from "./use-component-installed.js";
15
+ function c({
16
16
  warnIcon: l = null,
17
- did: u,
18
- noPermissionMute: k = !1,
19
- onInstalled: v = null,
20
- onError: z = null,
21
- children: d,
22
- closeByOutSize: L = !1,
23
- onClose: s = null,
17
+ did: m,
18
+ noPermissionMute: I = !1,
19
+ onInstalled: C = null,
20
+ onError: S = null,
21
+ children: a,
22
+ closeByOutSize: k = !1,
23
+ onClose: d = null,
24
24
  fallback: p = null,
25
- disabled: T = !1,
26
- roles: D = ["owner", "admin"]
25
+ disabled: v = !1,
26
+ roles: z = ["owner", "admin"]
27
27
  }) {
28
- const { locale: B } = W(), a = Y((i, r = {}) => q(E, i, B, "en", r)), { installed: j, optComponents: g, installStatus: h, definedInBlockletYML: M } = H({
29
- did: u,
30
- onInstalled: v,
31
- onError: z
32
- }), f = P(R), c = () => {
33
- s == null || s(!1);
28
+ const { locale: L } = M(), s = N((i, t = {}) => R(P, i, L, "en", t)), { installed: T, optComponents: u, installStatus: g, definedInBlockletYML: D } = $({
29
+ did: m,
30
+ onInstalled: C,
31
+ onError: S
32
+ }), B = O(j), f = () => {
33
+ d?.(!1);
34
34
  };
35
- return T ? d : /* @__PURE__ */ e(A, { session: f == null ? void 0 : f.session, roles: D, children: ({ hasPermission: i }) => j ? d : k && !i ? p || null : typeof d == "function" ? /* @__PURE__ */ o(x, { children: [
35
+ return v ? a : /* @__PURE__ */ e(W, { session: B?.session, roles: z, children: ({ hasPermission: i }) => T ? a : I && !i ? p || null : typeof a == "function" ? /* @__PURE__ */ r(x, { children: [
36
36
  p,
37
- d({
37
+ a({
38
38
  hasPermission: i,
39
- optComponents: g,
40
- installStatus: h
39
+ optComponents: u,
40
+ installStatus: g
41
41
  })
42
- ] }) : /* @__PURE__ */ o(x, { children: [
42
+ ] }) : /* @__PURE__ */ r(x, { children: [
43
43
  p,
44
44
  /* @__PURE__ */ e(
45
- F,
45
+ q,
46
46
  {
47
- onClickAway: (r) => {
48
- r.preventDefault(), r.stopPropagation(), L && c();
47
+ onClickAway: (t) => {
48
+ t.preventDefault(), t.stopPropagation(), k && f();
49
49
  },
50
- children: /* @__PURE__ */ e(N, { in: !0, timeout: 350, children: /* @__PURE__ */ e(
51
- O,
50
+ children: /* @__PURE__ */ e(A, { in: !0, timeout: 350, children: /* @__PURE__ */ e(
51
+ F,
52
52
  {
53
53
  variant: "outlined",
54
54
  sx: {
@@ -63,10 +63,10 @@ function m({
63
63
  border: "0 !important",
64
64
  fontSize: "14px",
65
65
  textAlign: "left",
66
- boxShadow: ({ palette: r }) => `0px 8px 16px 0px ${r.grey[100]}, 0px 0px 0px 1px ${r.grey[100]}`
66
+ boxShadow: ({ palette: t }) => `0px 8px 16px 0px ${t.grey[100]}, 0px 0px 0px 1px ${t.grey[100]}`
67
67
  },
68
- children: M ? /* @__PURE__ */ o(n, { sx: { display: "flex", flexDirection: "column" }, children: [
69
- /* @__PURE__ */ o(
68
+ children: D ? /* @__PURE__ */ r(n, { sx: { display: "flex", flexDirection: "column" }, children: [
69
+ /* @__PURE__ */ r(
70
70
  n,
71
71
  {
72
72
  sx: {
@@ -78,34 +78,31 @@ function m({
78
78
  justifyContent: "flex-start"
79
79
  },
80
80
  children: [
81
- l || /* @__PURE__ */ e(I, { icon: "mdi:warning-box", style: { color: "yellowgreen", fontSize: 24 } }),
82
- /* @__PURE__ */ e(n, { sx: { marginLeft: 1, fontSize: "16px", fontWeight: "bold" }, children: a("componentInstallerTitle") }),
81
+ l || /* @__PURE__ */ e(y, { icon: "mdi:warning-box", style: { color: "yellowgreen", fontSize: 24 } }),
82
+ /* @__PURE__ */ e(n, { sx: { marginLeft: 1, fontSize: "16px", fontWeight: "bold" }, children: s("componentInstallerTitle") }),
83
83
  /* @__PURE__ */ e(n, { sx: { flex: 1 } }),
84
- s ? /* @__PURE__ */ e(C, { variant: "outlined", className: "button", onClick: c, children: /* @__PURE__ */ e(S, {}) }) : null
84
+ d ? /* @__PURE__ */ e(b, { variant: "outlined", className: "button", onClick: f, children: /* @__PURE__ */ e(w, {}) }) : null
85
85
  ]
86
86
  }
87
87
  ),
88
88
  /* @__PURE__ */ e(n, { sx: { width: "100%", height: "1px", backgroundColor: "grey.100" } }),
89
- /* @__PURE__ */ e(n, { sx: { maxHeight: "70vh", overflowY: "auto" }, children: g.map((r, y) => {
90
- var w, b;
91
- return /* @__PURE__ */ e(
92
- $,
93
- {
94
- t: a,
95
- hasPermission: i,
96
- index: y,
97
- optionalComponent: r,
98
- installStatus: h[(w = r.meta) == null ? void 0 : w.did]
99
- },
100
- ((b = r.meta) == null ? void 0 : b.did) || y
101
- );
102
- }) }),
103
- i ? null : /* @__PURE__ */ o(x, { children: [
89
+ /* @__PURE__ */ e(n, { sx: { maxHeight: "70vh", overflowY: "auto" }, children: u.map((t, h) => /* @__PURE__ */ e(
90
+ Y,
91
+ {
92
+ t: s,
93
+ hasPermission: i,
94
+ index: h,
95
+ optionalComponent: t,
96
+ installStatus: g[t.meta?.did]
97
+ },
98
+ t.meta?.did || h
99
+ )) }),
100
+ i ? null : /* @__PURE__ */ r(x, { children: [
104
101
  /* @__PURE__ */ e(n, { sx: { width: "100%", height: "1px", backgroundColor: "grey.100" } }),
105
- /* @__PURE__ */ e(n, { sx: { padding: "20px 24px" }, children: /* @__PURE__ */ e(n, { sx: { opacity: 1 }, children: a("componentInstallerSuggestions") }) })
102
+ /* @__PURE__ */ e(n, { sx: { padding: "20px 24px" }, children: /* @__PURE__ */ e(n, { sx: { opacity: 1 }, children: s("componentInstallerSuggestions") }) })
106
103
  ] })
107
- ] }) : /* @__PURE__ */ o(n, { sx: { display: "flex", flexDirection: "column" }, children: [
108
- /* @__PURE__ */ o(
104
+ ] }) : /* @__PURE__ */ r(n, { sx: { display: "flex", flexDirection: "column" }, children: [
105
+ /* @__PURE__ */ r(
109
106
  n,
110
107
  {
111
108
  sx: {
@@ -117,18 +114,18 @@ function m({
117
114
  justifyContent: "flex-start"
118
115
  },
119
116
  children: [
120
- l || /* @__PURE__ */ e(I, { icon: "mdi:warning-box", style: { color: "yellowgreen", fontSize: 24 } }),
121
- /* @__PURE__ */ e(n, { sx: { marginLeft: 1, fontSize: "16px", fontWeight: "bold" }, children: a("componentInstallerTitle") }),
117
+ l || /* @__PURE__ */ e(y, { icon: "mdi:warning-box", style: { color: "yellowgreen", fontSize: 24 } }),
118
+ /* @__PURE__ */ e(n, { sx: { marginLeft: 1, fontSize: "16px", fontWeight: "bold" }, children: s("componentInstallerTitle") }),
122
119
  /* @__PURE__ */ e(n, { sx: { flex: 1 } }),
123
- s ? /* @__PURE__ */ e(C, { variant: "outlined", className: "button", onClick: c, children: /* @__PURE__ */ e(S, {}) }) : null
120
+ d ? /* @__PURE__ */ e(b, { variant: "outlined", className: "button", onClick: f, children: /* @__PURE__ */ e(w, {}) }) : null
124
121
  ]
125
122
  }
126
123
  ),
127
124
  /* @__PURE__ */ e(n, { sx: { width: "100%", height: "1px", backgroundColor: "grey.100" } }),
128
- /* @__PURE__ */ o(n, { sx: { padding: "20px 24px", marginTop: 0 }, children: [
129
- a("componentInstallerNoDefinedInBlockletYML"),
125
+ /* @__PURE__ */ r(n, { sx: { padding: "20px 24px", marginTop: 0 }, children: [
126
+ s("componentInstallerNoDefinedInBlockletYML"),
130
127
  ": ",
131
- u
128
+ m
132
129
  ] })
133
130
  ] })
134
131
  }
@@ -137,26 +134,26 @@ function m({
137
134
  )
138
135
  ] }) });
139
136
  }
140
- m.propTypes = {
141
- disabled: t.bool,
142
- warnIcon: t.node,
143
- did: t.oneOfType([t.string, t.arrayOf(t.string)]).isRequired,
144
- noPermissionMute: t.bool,
145
- onInstalled: t.func,
146
- onError: t.func,
147
- children: t.any.isRequired,
148
- closeByOutSize: t.bool,
149
- onClose: t.func,
150
- fallback: t.node,
151
- roles: t.array
137
+ c.propTypes = {
138
+ disabled: o.bool,
139
+ warnIcon: o.node,
140
+ did: o.oneOfType([o.string, o.arrayOf(o.string)]).isRequired,
141
+ noPermissionMute: o.bool,
142
+ onInstalled: o.func,
143
+ onError: o.func,
144
+ children: o.any.isRequired,
145
+ closeByOutSize: o.bool,
146
+ onClose: o.func,
147
+ fallback: o.node,
148
+ roles: o.array
152
149
  };
153
- function G(l) {
154
- return window.blocklet ? /* @__PURE__ */ e(m, { ...l }) : l.children;
150
+ function E(l) {
151
+ return window.blocklet ? /* @__PURE__ */ e(c, { ...l }) : l.children;
155
152
  }
156
- G.propTypes = {
157
- ...m.propTypes,
158
- children: t.any.isRequired
153
+ E.propTypes = {
154
+ ...c.propTypes,
155
+ children: o.any.isRequired
159
156
  };
160
157
  export {
161
- G as default
158
+ E as default
162
159
  };
@@ -1,19 +1,19 @@
1
- import { jsxs as n, jsx as i } from "react/jsx-runtime";
2
- import { Icon as x } from "@iconify/react";
3
- import { useTheme as y, Box as r, Button as d } from "@mui/material";
4
- import s from "prop-types";
5
- function I({ optionalComponent: e, index: h, installStatus: l = "", hasPermission: f, t: c }) {
6
- const { palette: m } = y(), g = () => {
7
- window.open(e == null ? void 0 : e.installUrl, "_blank");
8
- }, p = () => {
9
- window.open(e == null ? void 0 : e.storeUrl, "_blank");
10
- }, u = () => {
1
+ import { jsxs as t, jsx as e } from "react/jsx-runtime";
2
+ import { Icon as d } from "@iconify/react";
3
+ import { useTheme as u, Box as i, Button as a } from "@mui/material";
4
+ import r from "prop-types";
5
+ function y({ optionalComponent: n, index: p, installStatus: l = "", hasPermission: m, t: s }) {
6
+ const { palette: x } = u(), h = () => {
7
+ window.open(n?.installUrl, "_blank");
8
+ }, f = () => {
9
+ window.open(n?.storeUrl, "_blank");
10
+ }, g = () => {
11
11
  window.location.reload();
12
- }, o = l === "stopped" || l === "running", a = 60;
13
- return /* @__PURE__ */ n(r, { children: [
14
- h === 0 ? null : /* @__PURE__ */ i(r, { sx: { width: "100%", height: "1px", backgroundColor: "grey.100" } }),
15
- /* @__PURE__ */ n(
16
- r,
12
+ }, c = l === "stopped" || l === "running", o = 60;
13
+ return /* @__PURE__ */ t(i, { children: [
14
+ p === 0 ? null : /* @__PURE__ */ e(i, { sx: { width: "100%", height: "1px", backgroundColor: "grey.100" } }),
15
+ /* @__PURE__ */ t(
16
+ i,
17
17
  {
18
18
  sx: {
19
19
  padding: "20px 24px",
@@ -25,16 +25,16 @@ function I({ optionalComponent: e, index: h, installStatus: l = "", hasPermissio
25
25
  alignItems: "flex-start"
26
26
  },
27
27
  children: [
28
- /* @__PURE__ */ i(
28
+ /* @__PURE__ */ e(
29
29
  "img",
30
30
  {
31
- style: { width: a, height: a, minWidth: a, minHeight: a },
32
- src: e.logoUrl,
33
- alt: e.meta.title
31
+ style: { width: o, height: o, minWidth: o, minHeight: o },
32
+ src: n.logoUrl,
33
+ alt: n.meta.title
34
34
  }
35
35
  ),
36
- /* @__PURE__ */ n(
37
- r,
36
+ /* @__PURE__ */ t(
37
+ i,
38
38
  {
39
39
  sx: {
40
40
  display: "flex",
@@ -44,8 +44,8 @@ function I({ optionalComponent: e, index: h, installStatus: l = "", hasPermissio
44
44
  marginLeft: 2
45
45
  },
46
46
  children: [
47
- /* @__PURE__ */ n(
48
- r,
47
+ /* @__PURE__ */ t(
48
+ i,
49
49
  {
50
50
  sx: {
51
51
  fontSize: "16px",
@@ -58,14 +58,11 @@ function I({ optionalComponent: e, index: h, installStatus: l = "", hasPermissio
58
58
  opacity: 1
59
59
  }
60
60
  },
61
- onClick: () => {
62
- var t;
63
- return p((t = e.meta) == null ? void 0 : t.did);
64
- },
61
+ onClick: () => f(n.meta?.did),
65
62
  children: [
66
- e.meta.title,
67
- /* @__PURE__ */ n(
68
- r,
63
+ n.meta.title,
64
+ /* @__PURE__ */ t(
65
+ i,
69
66
  {
70
67
  sx: {
71
68
  paddingLeft: 1,
@@ -74,14 +71,14 @@ function I({ optionalComponent: e, index: h, installStatus: l = "", hasPermissio
74
71
  },
75
72
  component: "span",
76
73
  children: [
77
- e.meta.version,
78
- /* @__PURE__ */ i(
79
- x,
74
+ n.meta.version,
75
+ /* @__PURE__ */ e(
76
+ d,
80
77
  {
81
78
  className: "link-icon",
82
79
  icon: "fluent:open-20-filled",
83
80
  style: {
84
- color: m.primary.main,
81
+ color: x.primary.main,
85
82
  fontSize: 16,
86
83
  transform: "translate(6px, 3px)",
87
84
  transition: "all 0.3s"
@@ -94,32 +91,29 @@ function I({ optionalComponent: e, index: h, installStatus: l = "", hasPermissio
94
91
  ]
95
92
  }
96
93
  ),
97
- /* @__PURE__ */ i(r, { sx: { marginTop: 0, opacity: 0.7 }, children: e.meta.description }),
98
- /* @__PURE__ */ i(r, { sx: { display: f ? "flex" : "none", flexDirection: "row", gap: 1 }, children: l ? /* @__PURE__ */ i(r, { sx: { marginTop: 2, opacity: 0.7 }, children: o ? /* @__PURE__ */ i(d, { variant: "contained", onClick: u, children: c("componentInstallerRefresh") }, "refresh") : /* @__PURE__ */ i(
99
- d,
94
+ /* @__PURE__ */ e(i, { sx: { marginTop: 0, opacity: 0.7 }, children: n.meta.description }),
95
+ /* @__PURE__ */ e(i, { sx: { display: m ? "flex" : "none", flexDirection: "row", gap: 1 }, children: l ? /* @__PURE__ */ e(i, { sx: { marginTop: 2, opacity: 0.7 }, children: c ? /* @__PURE__ */ e(a, { variant: "contained", onClick: g, children: s("componentInstallerRefresh") }, "refresh") : /* @__PURE__ */ e(
96
+ a,
100
97
  {
101
98
  disabled: !0,
102
99
  sx: { color: "text.primary" },
103
- startIcon: /* @__PURE__ */ i(x, { icon: "line-md:loading-loop", style: { color: "text.primary", fontSize: 16 } }),
100
+ startIcon: /* @__PURE__ */ e(d, { icon: "line-md:loading-loop", style: { color: "text.primary", fontSize: 16 } }),
104
101
  variant: "contained",
105
102
  children: l
106
103
  },
107
104
  "status"
108
- ) }) : /* @__PURE__ */ i(
109
- d,
105
+ ) }) : /* @__PURE__ */ e(
106
+ a,
110
107
  {
111
108
  sx: { marginTop: 2 },
112
109
  variant: "contained",
113
110
  className: "button",
114
- onClick: () => {
115
- var t;
116
- return g((t = e.meta) == null ? void 0 : t.did);
117
- },
118
- children: c("componentInstallerInstall")
111
+ onClick: () => h(n.meta?.did),
112
+ children: s("componentInstallerInstall")
119
113
  },
120
114
  "install"
121
115
  ) }),
122
- o ? /* @__PURE__ */ i(r, { sx: { marginTop: 2, opacity: 0.7 }, children: c("componentInstallerSuccessInstalled") }) : null
116
+ c ? /* @__PURE__ */ e(i, { sx: { marginTop: 2, opacity: 0.7 }, children: s("componentInstallerSuccessInstalled") }) : null
123
117
  ]
124
118
  }
125
119
  )
@@ -128,13 +122,13 @@ function I({ optionalComponent: e, index: h, installStatus: l = "", hasPermissio
128
122
  )
129
123
  ] });
130
124
  }
131
- I.propTypes = {
132
- t: s.func.isRequired,
133
- optionalComponent: s.object.isRequired,
134
- index: s.number.isRequired,
135
- installStatus: s.string,
136
- hasPermission: s.bool.isRequired
125
+ y.propTypes = {
126
+ t: r.func.isRequired,
127
+ optionalComponent: r.object.isRequired,
128
+ index: r.number.isRequired,
129
+ installStatus: r.string,
130
+ hasPermission: r.bool.isRequired
137
131
  };
138
132
  export {
139
- I as default
133
+ y as default
140
134
  };