@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.
- package/lib/BlockletStudio/index.js +70 -71
- package/lib/ComponentInstaller/index.js +85 -88
- package/lib/ComponentInstaller/installer-item.js +47 -53
- package/lib/ComponentInstaller/use-component-installed.js +32 -38
- package/lib/ComponentManager/components/add-component.js +47 -50
- package/lib/ComponentManager/components/publish-component.js +30 -31
- package/lib/ComponentManager/components/resource-dialog.js +28 -30
- package/lib/Dashboard/index.d.ts +1 -1
- package/lib/Dashboard/index.js +59 -61
- package/lib/Footer/index.js +51 -52
- package/lib/Footer/internal-footer.js +43 -47
- package/lib/Footer/layout/standard.js +11 -12
- package/lib/Footer/links.js +25 -28
- package/lib/Footer/social-media.js +17 -17
- package/lib/Header/index.js +81 -83
- package/lib/Notifications/Snackbar.js +76 -77
- package/lib/Notifications/hooks/use-title.js +34 -34
- package/lib/Notifications/utils.js +56 -60
- package/lib/UserCenter/components/config-inviter.js +17 -18
- package/lib/UserCenter/components/danger-zone.js +49 -52
- package/lib/UserCenter/components/nft.js +44 -45
- package/lib/UserCenter/components/notification.js +92 -99
- package/lib/UserCenter/components/passport.js +22 -22
- package/lib/UserCenter/components/privacy.js +6 -6
- package/lib/UserCenter/components/settings.js +40 -43
- package/lib/UserCenter/components/status-dialog/date-picker.js +7 -8
- package/lib/UserCenter/components/status-dialog/index.js +112 -114
- package/lib/UserCenter/components/status-selector/duration-menu.js +35 -36
- package/lib/UserCenter/components/status-selector/index.js +13 -13
- package/lib/UserCenter/components/storage/action.js +21 -22
- package/lib/UserCenter/components/storage/delete.js +24 -24
- package/lib/UserCenter/components/third-party-login/index.js +53 -53
- package/lib/UserCenter/components/third-party-login/third-party-item.js +87 -89
- package/lib/UserCenter/components/user-center.js +198 -207
- package/lib/UserCenter/components/user-info/metadata.js +343 -353
- package/lib/UserCenter/components/user-info/switch-role.js +17 -20
- package/lib/UserCenter/components/user-info/user-basic-info.js +79 -82
- package/lib/UserCenter/components/user-info/user-info.js +40 -40
- package/lib/UserCenter/components/user-info/user-status.js +97 -99
- package/lib/UserCenter/components/user-info/utils.js +34 -35
- package/lib/UserSessions/components/user-session-info.js +25 -28
- package/lib/UserSessions/components/user-sessions.js +169 -181
- package/lib/blocklets.js +62 -72
- package/lib/common/domain-warning.js +31 -31
- package/lib/common/header-addons.d.ts +1 -1
- package/lib/common/header-addons.js +49 -53
- package/lib/common/notification-addon.js +29 -32
- package/lib/common/ws.js +17 -18
- package/lib/contexts/config-user-space.js +16 -19
- package/lib/utils.js +44 -48
- package/package.json +6 -6
|
@@ -1,81 +1,80 @@
|
|
|
1
|
-
import { jsx as
|
|
2
|
-
import { BLOCKLET_SERVICE_PATH_PREFIX as
|
|
3
|
-
import { useState as
|
|
4
|
-
import { joinURL as
|
|
5
|
-
function
|
|
6
|
-
const
|
|
7
|
-
return Object.keys(
|
|
8
|
-
const
|
|
9
|
-
|
|
10
|
-
}),
|
|
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
|
|
13
|
-
open:
|
|
14
|
-
setOpen:
|
|
15
|
-
onOpened:
|
|
16
|
-
componentDid:
|
|
17
|
-
tenantScope:
|
|
18
|
-
resourcesParams:
|
|
19
|
-
mode:
|
|
20
|
-
title:
|
|
21
|
-
logo:
|
|
22
|
-
description:
|
|
23
|
-
introduction:
|
|
24
|
-
note:
|
|
25
|
-
componentsTitle:
|
|
26
|
-
resourcesTitle:
|
|
27
|
-
onUploaded:
|
|
28
|
-
onReleased:
|
|
29
|
-
onConnected:
|
|
30
|
-
components:
|
|
31
|
-
resources:
|
|
32
|
-
style:
|
|
33
|
-
zIndex:
|
|
34
|
-
dependentComponentsMode:
|
|
35
|
-
...
|
|
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 [
|
|
38
|
-
c.current =
|
|
39
|
-
const
|
|
40
|
-
if (
|
|
41
|
-
|
|
42
|
-
},
|
|
43
|
-
|
|
44
|
-
},
|
|
45
|
-
const u = (
|
|
46
|
-
|
|
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 =
|
|
50
|
-
typeof l == "function" && l(
|
|
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
|
-
}, []), !
|
|
54
|
+
}, []), !n)
|
|
56
55
|
return null;
|
|
57
|
-
const
|
|
58
|
-
|
|
56
|
+
const U = T(
|
|
57
|
+
I(window.location.origin, k, "/embed/resources", i, "/publish"),
|
|
59
58
|
{
|
|
60
|
-
title:
|
|
61
|
-
logo:
|
|
62
|
-
description:
|
|
63
|
-
introduction:
|
|
64
|
-
note:
|
|
65
|
-
tenantScope:
|
|
66
|
-
mode:
|
|
67
|
-
resourcesParams:
|
|
68
|
-
resources:
|
|
69
|
-
components:
|
|
70
|
-
resourcesTitle:
|
|
71
|
-
componentsTitle:
|
|
72
|
-
dependentComponentsMode:
|
|
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__ */
|
|
74
|
+
return /* @__PURE__ */ _(
|
|
76
75
|
"iframe",
|
|
77
76
|
{
|
|
78
|
-
src:
|
|
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:
|
|
91
|
-
opacity:
|
|
92
|
-
...
|
|
89
|
+
pointerEvents: d ? "auto" : "none",
|
|
90
|
+
opacity: d ? 1 : 0,
|
|
91
|
+
...j
|
|
93
92
|
},
|
|
94
|
-
...
|
|
93
|
+
...P
|
|
95
94
|
}
|
|
96
95
|
);
|
|
97
96
|
}
|
|
98
97
|
export {
|
|
99
|
-
|
|
98
|
+
K as default
|
|
100
99
|
};
|
|
@@ -1,54 +1,54 @@
|
|
|
1
|
-
import { jsx as e, jsxs as
|
|
2
|
-
import { SessionContext as
|
|
3
|
-
import { useLocaleContext as
|
|
4
|
-
import { translate as
|
|
5
|
-
import
|
|
6
|
-
import { Icon as
|
|
7
|
-
import { Close as
|
|
8
|
-
import { ClickAwayListener as
|
|
9
|
-
import { useMemoizedFn as
|
|
10
|
-
import
|
|
11
|
-
import { use as
|
|
12
|
-
import
|
|
13
|
-
import
|
|
14
|
-
import
|
|
15
|
-
function
|
|
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:
|
|
18
|
-
noPermissionMute:
|
|
19
|
-
onInstalled:
|
|
20
|
-
onError:
|
|
21
|
-
children:
|
|
22
|
-
closeByOutSize:
|
|
23
|
-
onClose:
|
|
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:
|
|
26
|
-
roles:
|
|
25
|
+
disabled: v = !1,
|
|
26
|
+
roles: z = ["owner", "admin"]
|
|
27
27
|
}) {
|
|
28
|
-
const { locale:
|
|
29
|
-
did:
|
|
30
|
-
onInstalled:
|
|
31
|
-
onError:
|
|
32
|
-
}),
|
|
33
|
-
|
|
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
|
|
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
|
-
|
|
37
|
+
a({
|
|
38
38
|
hasPermission: i,
|
|
39
|
-
optComponents:
|
|
40
|
-
installStatus:
|
|
39
|
+
optComponents: u,
|
|
40
|
+
installStatus: g
|
|
41
41
|
})
|
|
42
|
-
] }) : /* @__PURE__ */
|
|
42
|
+
] }) : /* @__PURE__ */ r(x, { children: [
|
|
43
43
|
p,
|
|
44
44
|
/* @__PURE__ */ e(
|
|
45
|
-
|
|
45
|
+
q,
|
|
46
46
|
{
|
|
47
|
-
onClickAway: (
|
|
48
|
-
|
|
47
|
+
onClickAway: (t) => {
|
|
48
|
+
t.preventDefault(), t.stopPropagation(), k && f();
|
|
49
49
|
},
|
|
50
|
-
children: /* @__PURE__ */ e(
|
|
51
|
-
|
|
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:
|
|
66
|
+
boxShadow: ({ palette: t }) => `0px 8px 16px 0px ${t.grey[100]}, 0px 0px 0px 1px ${t.grey[100]}`
|
|
67
67
|
},
|
|
68
|
-
children:
|
|
69
|
-
/* @__PURE__ */
|
|
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(
|
|
82
|
-
/* @__PURE__ */ e(n, { sx: { marginLeft: 1, fontSize: "16px", fontWeight: "bold" }, children:
|
|
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
|
-
|
|
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:
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
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:
|
|
102
|
+
/* @__PURE__ */ e(n, { sx: { padding: "20px 24px" }, children: /* @__PURE__ */ e(n, { sx: { opacity: 1 }, children: s("componentInstallerSuggestions") }) })
|
|
106
103
|
] })
|
|
107
|
-
] }) : /* @__PURE__ */
|
|
108
|
-
/* @__PURE__ */
|
|
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(
|
|
121
|
-
/* @__PURE__ */ e(n, { sx: { marginLeft: 1, fontSize: "16px", fontWeight: "bold" }, children:
|
|
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
|
-
|
|
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__ */
|
|
129
|
-
|
|
125
|
+
/* @__PURE__ */ r(n, { sx: { padding: "20px 24px", marginTop: 0 }, children: [
|
|
126
|
+
s("componentInstallerNoDefinedInBlockletYML"),
|
|
130
127
|
": ",
|
|
131
|
-
|
|
128
|
+
m
|
|
132
129
|
] })
|
|
133
130
|
] })
|
|
134
131
|
}
|
|
@@ -137,26 +134,26 @@ function m({
|
|
|
137
134
|
)
|
|
138
135
|
] }) });
|
|
139
136
|
}
|
|
140
|
-
|
|
141
|
-
disabled:
|
|
142
|
-
warnIcon:
|
|
143
|
-
did:
|
|
144
|
-
noPermissionMute:
|
|
145
|
-
onInstalled:
|
|
146
|
-
onError:
|
|
147
|
-
children:
|
|
148
|
-
closeByOutSize:
|
|
149
|
-
onClose:
|
|
150
|
-
fallback:
|
|
151
|
-
roles:
|
|
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
|
|
154
|
-
return window.blocklet ? /* @__PURE__ */ e(
|
|
150
|
+
function E(l) {
|
|
151
|
+
return window.blocklet ? /* @__PURE__ */ e(c, { ...l }) : l.children;
|
|
155
152
|
}
|
|
156
|
-
|
|
157
|
-
...
|
|
158
|
-
children:
|
|
153
|
+
E.propTypes = {
|
|
154
|
+
...c.propTypes,
|
|
155
|
+
children: o.any.isRequired
|
|
159
156
|
};
|
|
160
157
|
export {
|
|
161
|
-
|
|
158
|
+
E as default
|
|
162
159
|
};
|
|
@@ -1,19 +1,19 @@
|
|
|
1
|
-
import { jsxs as
|
|
2
|
-
import { Icon as
|
|
3
|
-
import { useTheme as
|
|
4
|
-
import
|
|
5
|
-
function
|
|
6
|
-
const { palette:
|
|
7
|
-
window.open(
|
|
8
|
-
},
|
|
9
|
-
window.open(
|
|
10
|
-
},
|
|
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
|
-
},
|
|
13
|
-
return /* @__PURE__ */
|
|
14
|
-
|
|
15
|
-
/* @__PURE__ */
|
|
16
|
-
|
|
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__ */
|
|
28
|
+
/* @__PURE__ */ e(
|
|
29
29
|
"img",
|
|
30
30
|
{
|
|
31
|
-
style: { width:
|
|
32
|
-
src:
|
|
33
|
-
alt:
|
|
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__ */
|
|
37
|
-
|
|
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__ */
|
|
48
|
-
|
|
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
|
-
|
|
67
|
-
/* @__PURE__ */
|
|
68
|
-
|
|
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
|
-
|
|
78
|
-
/* @__PURE__ */
|
|
79
|
-
|
|
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:
|
|
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
|
|
98
|
-
/* @__PURE__ */ i
|
|
99
|
-
|
|
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__ */
|
|
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__ */
|
|
109
|
-
|
|
105
|
+
) }) : /* @__PURE__ */ e(
|
|
106
|
+
a,
|
|
110
107
|
{
|
|
111
108
|
sx: { marginTop: 2 },
|
|
112
109
|
variant: "contained",
|
|
113
110
|
className: "button",
|
|
114
|
-
onClick: () =>
|
|
115
|
-
|
|
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
|
-
|
|
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
|
-
|
|
132
|
-
t:
|
|
133
|
-
optionalComponent:
|
|
134
|
-
index:
|
|
135
|
-
installStatus:
|
|
136
|
-
hasPermission:
|
|
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
|
-
|
|
133
|
+
y as default
|
|
140
134
|
};
|