@abtnode/ux 1.16.20-beta-cf6dfce1 → 1.16.20-beta-148929e2
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/es/blocklet/access/index.js +1 -1
- package/es/blocklet/actions.js +0 -1
- package/es/blocklet/add-cert.js +24 -12
- package/es/blocklet/component/add-component-core.js +0 -1
- package/es/blocklet/component/did-space/connect-to.js +1 -1
- package/es/blocklet/component/domain-list.js +99 -87
- package/es/blocklet/component/index.js +7 -7
- package/es/blocklet/publish/tree.js +0 -1
- package/es/blocklet/router/add-domain.js +15 -9
- package/es/blocklet/router/dns-tip.js +5 -3
- package/es/clear-cache.js +1 -1
- package/es/hooks/use-space-gateways.js +1 -1
- package/es/locales/en.js +1 -1
- package/es/locales/index.js +4 -5
- package/es/locales/zh.js +1 -1
- package/lib/actions.js +2 -2
- package/lib/analytics/card.js +2 -2
- package/lib/analytics/chart.js +4 -4
- package/lib/analytics/disk.js +2 -2
- package/lib/analytics/runtime.js +2 -2
- package/lib/analytics/traffic.js +2 -2
- package/lib/blocklet/access/config-access.js +1 -2
- package/lib/blocklet/access/index.js +3 -3
- package/lib/blocklet/actions.js +2 -3
- package/lib/blocklet/add-cert.js +28 -16
- package/lib/blocklet/agreement-app.js +2 -2
- package/lib/blocklet/app-avatar.js +2 -2
- package/lib/blocklet/bundle-avatar.js +2 -2
- package/lib/blocklet/component/add-component-core.js +2 -3
- package/lib/blocklet/component/button.js +2 -2
- package/lib/blocklet/component/delete.js +2 -2
- package/lib/blocklet/component/did-space/connect-to.js +6 -7
- package/lib/blocklet/component/did-space/connected.js +1 -2
- package/lib/blocklet/component/did-space/delete.js +3 -4
- package/lib/blocklet/component/did-space/disconnect.js +3 -4
- package/lib/blocklet/component/did-space/index.js +3 -4
- package/lib/blocklet/component/did-space/item.js +5 -6
- package/lib/blocklet/component/domain-list.js +103 -90
- package/lib/blocklet/component/environment.js +2 -2
- package/lib/blocklet/component/index.js +11 -11
- package/lib/blocklet/component/navigation/locale-tabs.js +1 -2
- package/lib/blocklet/component/navigation/navigation-actions.js +1 -2
- package/lib/blocklet/component/navigation/navigation-dialog.js +3 -4
- package/lib/blocklet/component/navigation/navigation-preview.js +1 -2
- package/lib/blocklet/component/navigation/simple-select.js +3 -4
- package/lib/blocklet/component/select-store.js +2 -2
- package/lib/blocklet/component/setting.js +2 -2
- package/lib/blocklet/component/sortable-tree.js +3 -4
- package/lib/blocklet/component/space-connector.js +5 -6
- package/lib/blocklet/component/space-selector.js +5 -6
- package/lib/blocklet/component/store-blocklet-list.js +4 -4
- package/lib/blocklet/component/switch-control.js +3 -4
- package/lib/blocklet/config-navigation.js +3 -4
- package/lib/blocklet/configuration.js +4 -4
- package/lib/blocklet/disk-info.js +2 -2
- package/lib/blocklet/icons.js +2 -3
- package/lib/blocklet/install-from-url.js +2 -2
- package/lib/blocklet/log.js +2 -2
- package/lib/blocklet/logo-uploader.js +2 -2
- package/lib/blocklet/migration.js +2 -2
- package/lib/blocklet/mode.js +2 -2
- package/lib/blocklet/notification/email.js +3 -4
- package/lib/blocklet/notification/index.js +1 -2
- package/lib/blocklet/oauth/auth0.js +3 -4
- package/lib/blocklet/oauth/common-settings.js +2 -2
- package/lib/blocklet/oauth/federated-detail-dialog.js +1 -2
- package/lib/blocklet/oauth/federated-invite-dialog.js +1 -2
- package/lib/blocklet/oauth/federated-join-dialog.js +1 -2
- package/lib/blocklet/oauth/federated-site-list.js +1 -2
- package/lib/blocklet/oauth/index.js +1 -2
- package/lib/blocklet/overview.js +2 -2
- package/lib/blocklet/page-group.js +2 -2
- package/lib/blocklet/preferences/index.js +4 -4
- package/lib/blocklet/publish/create-project.js +2 -2
- package/lib/blocklet/publish/create-release.js +4 -4
- package/lib/blocklet/publish/index.js +2 -2
- package/lib/blocklet/publish/project-list.js +2 -2
- package/lib/blocklet/publish/release-list.js +2 -2
- package/lib/blocklet/publish/tree.js +0 -1
- package/lib/blocklet/purchase/common.js +2 -4
- package/lib/blocklet/purchase/component-purchase.js +3 -4
- package/lib/blocklet/resource-type.js +2 -2
- package/lib/blocklet/router/action/add-domain-alias.js +2 -2
- package/lib/blocklet/router/action/add-rule.js +4 -4
- package/lib/blocklet/router/action/config-routing-rule.js +4 -4
- package/lib/blocklet/router/action/update-rule.js +2 -2
- package/lib/blocklet/router/add-domain.js +21 -15
- package/lib/blocklet/router/dns-tip.js +7 -5
- package/lib/blocklet/router/rule-actions.js +2 -2
- package/lib/blocklet/router/rule-list.js +2 -2
- package/lib/blocklet/runtime-info.js +2 -2
- package/lib/blocklet/status.js +2 -2
- package/lib/blocklet/storage/action.js +5 -6
- package/lib/blocklet/storage/auto-backup.js +9 -10
- package/lib/blocklet/storage/backups.js +10 -11
- package/lib/blocklet/storage/connect-to.js +9 -10
- package/lib/blocklet/storage/connected.js +1 -2
- package/lib/blocklet/storage/delete.js +3 -4
- package/lib/blocklet/storage/disconnect.js +3 -4
- package/lib/blocklet/storage/index.js +1 -2
- package/lib/blocklet/storage/item.js +5 -6
- package/lib/blocklet/storage/preview-nft.js +5 -6
- package/lib/blocklet/types.js +2 -3
- package/lib/blocklet/util.js +4 -8
- package/lib/blocklet/version.js +2 -2
- package/lib/clear-cache.js +5 -5
- package/lib/click-to-copy.js +2 -2
- package/lib/confirm.js +2 -2
- package/lib/contexts/audit-log.js +1 -2
- package/lib/contexts/blocklet-storage.js +26 -27
- package/lib/contexts/blocklet.js +1 -2
- package/lib/contexts/config-space.js +1 -2
- package/lib/contexts/node.js +3 -4
- package/lib/contexts/team.js +1 -2
- package/lib/delete-confirm.js +2 -2
- package/lib/did-address.js +3 -4
- package/lib/dot.js +1 -2
- package/lib/empty-spinner.js +2 -2
- package/lib/exchange-passport.js +3 -4
- package/lib/form/form-select-input.js +4 -4
- package/lib/form/form-text-input.js +4 -4
- package/lib/form/form-wrapper.js +1 -2
- package/lib/form/required.js +1 -2
- package/lib/hooks/blocklet.js +2 -2
- package/lib/hooks/mobile-width.js +1 -2
- package/lib/hooks/url-evaluation.js +2 -2
- package/lib/hooks/use-backup-progress.js +4 -4
- package/lib/hooks/use-blocklet-info-for-connect-did-spaces.js +1 -2
- package/lib/hooks/use-navigation.js +2 -2
- package/lib/hooks/use-space-gateways.js +1 -1
- package/lib/images.js +2 -2
- package/lib/invitation/invitation-app.js +3 -4
- package/lib/invitation/invitation-login.js +1 -2
- package/lib/invitation/invitation-passport.js +1 -2
- package/lib/invitation/invitation-receive.js +3 -4
- package/lib/invitation/invitation-success.js +1 -2
- package/lib/invitation/invitation-user.js +1 -2
- package/lib/invitation/invitation.js +1 -2
- package/lib/issue-passport.js +1 -2
- package/lib/launch-blocklet/content-layout.js +2 -2
- package/lib/launch-blocklet/page-header.js +1 -2
- package/lib/layout/addon.js +2 -2
- package/lib/locales/en.js +5 -1
- package/lib/locales/index.js +8 -5
- package/lib/locales/zh.js +5 -1
- package/lib/logs/clock.js +1 -2
- package/lib/logs/log-terminal.js +3 -4
- package/lib/lost-passport.js +3 -4
- package/lib/nav-logo.js +2 -2
- package/lib/passport-tag.js +2 -2
- package/lib/permission.js +2 -2
- package/lib/relative-time.js +2 -2
- package/lib/result-message.js +1 -2
- package/lib/schema-form/common-prop-types.js +2 -3
- package/lib/schema-form/index.js +2 -2
- package/lib/schema-form/passport-input.js +2 -2
- package/lib/schema-form/text-input.js +2 -2
- package/lib/subscription.js +3 -4
- package/lib/table-icons.js +2 -3
- package/lib/table.js +1 -2
- package/lib/tag.js +2 -2
- package/lib/team/members/index.js +4 -4
- package/lib/team/members/member.js +2 -2
- package/lib/team/members/passport-item.js +2 -2
- package/lib/team/members/passports.js +4 -4
- package/lib/team/passports/color.js +2 -2
- package/lib/team/passports/detail.js +2 -2
- package/lib/team/passports/index.js +2 -2
- package/lib/team/passports/trusted-factories.js +4 -4
- package/lib/team/passports/trusted-factory.js +2 -2
- package/lib/team/passports/trusted-issuer.js +4 -4
- package/lib/team/passports/trusted-issuers.js +4 -4
- package/lib/team/search-input.js +3 -4
- package/lib/team/styles/dialog.js +1 -2
- package/lib/team/styles/list-header.js +1 -2
- package/lib/util/api.js +2 -4
- package/lib/util/constants.js +2 -4
- package/lib/util/index.js +11 -22
- package/lib/util/mode.js +1 -2
- package/lib/util/space-gateway.js +2 -2
- package/lib/who-can-access/config.js +2 -3
- package/lib/wrap-locale.js +2 -2
- package/package.json +16 -16
|
@@ -150,7 +150,7 @@ function ComponentItem({
|
|
|
150
150
|
}, "actions")]
|
|
151
151
|
}, "group-not-gateway-box"), /*#__PURE__*/_jsx(Line, {
|
|
152
152
|
depth: depth
|
|
153
|
-
}), blocklet.children?.length ? /*#__PURE__*/_jsx(Collapse, {
|
|
153
|
+
}, "line"), blocklet.children?.length ? /*#__PURE__*/_jsx(Collapse, {
|
|
154
154
|
in: expand,
|
|
155
155
|
children: blocklet.children.map(x => /*#__PURE__*/_jsx(ComponentItem, {
|
|
156
156
|
blocklet: x,
|
package/es/blocklet/actions.js
CHANGED
package/es/blocklet/add-cert.js
CHANGED
|
@@ -5,9 +5,9 @@ import useAsyncRetry from 'react-use/lib/useAsyncRetry';
|
|
|
5
5
|
import Tooltip from '@mui/material/Tooltip';
|
|
6
6
|
import CircularProgress from '@mui/material/CircularProgress';
|
|
7
7
|
import Alert from '@arcblock/ux/lib/Alert';
|
|
8
|
+
import Toast from '@arcblock/ux/lib/Toast';
|
|
8
9
|
import { useLocaleContext } from '@arcblock/ux/lib/Locale/context';
|
|
9
10
|
import { BlockletEvents } from '@blocklet/constant';
|
|
10
|
-
import Toast from '@arcblock/ux/lib/Toast';
|
|
11
11
|
import Confirm from '../confirm';
|
|
12
12
|
import { useNodeContext } from '../contexts/node';
|
|
13
13
|
import { useBlockletContext } from '../contexts/blocklet';
|
|
@@ -21,21 +21,26 @@ function Add(props) {
|
|
|
21
21
|
t
|
|
22
22
|
} = useLocaleContext();
|
|
23
23
|
const [loading, setLoading] = useState(false);
|
|
24
|
+
const {
|
|
25
|
+
inService
|
|
26
|
+
} = useNodeContext();
|
|
24
27
|
const [confirmSetting, setConfirmSetting] = useState(null);
|
|
25
28
|
const {
|
|
29
|
+
siteId,
|
|
26
30
|
domain,
|
|
27
31
|
onAdd,
|
|
28
32
|
children,
|
|
29
33
|
did
|
|
30
34
|
} = props;
|
|
35
|
+
const [issuing, setIssuing] = useState(false);
|
|
31
36
|
const {
|
|
32
37
|
api,
|
|
33
38
|
ws: {
|
|
34
39
|
useSubscription
|
|
35
40
|
}
|
|
36
41
|
} = useNodeContext();
|
|
37
|
-
const [issuing, setIssuing] = useState(false);
|
|
38
42
|
const {
|
|
43
|
+
mode,
|
|
39
44
|
actions: {
|
|
40
45
|
refreshDomainStatus
|
|
41
46
|
}
|
|
@@ -54,18 +59,24 @@ function Add(props) {
|
|
|
54
59
|
const handleIssueComplete = (cert, type) => {
|
|
55
60
|
if (cert.domain === domain) {
|
|
56
61
|
setIssuing(false);
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
62
|
+
setLoading(false);
|
|
63
|
+
|
|
64
|
+
// Setup 模式下有全局通知,所以这里不需要通知
|
|
65
|
+
if (inService && mode !== 'setup') {
|
|
66
|
+
if (type === 'success') {
|
|
67
|
+
Toast.success(`The ${cert.domain} certificate is issued successfully`);
|
|
68
|
+
} else if (type === 'error') {
|
|
69
|
+
Toast.error(`Failed to issue certificate for ${cert.domain}`);
|
|
70
|
+
}
|
|
61
71
|
}
|
|
62
72
|
}
|
|
63
73
|
};
|
|
64
74
|
useEffect(() => {
|
|
65
|
-
if (
|
|
66
|
-
|
|
75
|
+
if (certState.loading) {
|
|
76
|
+
return;
|
|
67
77
|
}
|
|
68
|
-
|
|
78
|
+
setIssuing(isCertInProgress(certState.value?.status));
|
|
79
|
+
}, [certState.loading, certState.value?.status]);
|
|
69
80
|
useSubscription(BlockletEvents.certError, cert => handleIssueComplete(cert, 'error'));
|
|
70
81
|
useSubscription(BlockletEvents.certIssued, cert => {
|
|
71
82
|
certState.retry();
|
|
@@ -75,11 +86,9 @@ function Add(props) {
|
|
|
75
86
|
if (certState.loading) {
|
|
76
87
|
return ''; // 如果正在加载证书的状态,则不渲染任何元素
|
|
77
88
|
}
|
|
78
|
-
|
|
79
89
|
if (certState.value?.status === 'normal') {
|
|
80
90
|
return ''; // 如果证书已经生成,则不渲染任何元素
|
|
81
91
|
}
|
|
82
|
-
|
|
83
92
|
const onCancel = () => {
|
|
84
93
|
setLoading(false);
|
|
85
94
|
setConfirmSetting(null);
|
|
@@ -89,8 +98,10 @@ function Add(props) {
|
|
|
89
98
|
try {
|
|
90
99
|
await api.issueLetsEncryptCert({
|
|
91
100
|
input: {
|
|
101
|
+
siteId,
|
|
92
102
|
domain,
|
|
93
|
-
did
|
|
103
|
+
did,
|
|
104
|
+
inBlockletSetup: mode === 'setup'
|
|
94
105
|
}
|
|
95
106
|
});
|
|
96
107
|
onAdd();
|
|
@@ -142,6 +153,7 @@ function Add(props) {
|
|
|
142
153
|
Add.propTypes = {
|
|
143
154
|
domain: PropTypes.string.isRequired,
|
|
144
155
|
did: PropTypes.string.isRequired,
|
|
156
|
+
siteId: PropTypes.string.isRequired,
|
|
145
157
|
onAdd: PropTypes.func,
|
|
146
158
|
children: PropTypes.any
|
|
147
159
|
};
|
|
@@ -12,7 +12,7 @@ import { func } from 'prop-types';
|
|
|
12
12
|
import { PROD_DID_SPACES } from '@abtnode/constant';
|
|
13
13
|
import useBlockletInfoForConnectDIDSpaces from '../../../hooks/use-blocklet-info-for-connect-did-spaces';
|
|
14
14
|
import { extraDIDSpacesCoreUrl, getDIDSpaceDidFromEndpoint, getSpaceGatewayUrl, isValidSpaceGatewayUrl } from '../../../util/spaces';
|
|
15
|
-
import { formatError, getWebWalletUrl } from '
|
|
15
|
+
import { formatError, getWebWalletUrl } from '../../../util';
|
|
16
16
|
import { useBlockletContext } from '../../../contexts/blocklet';
|
|
17
17
|
import { useConfigSpaceContext } from '../../../contexts/config-space';
|
|
18
18
|
import { useNodeContext } from '../../../contexts/node';
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import Button from '@arcblock/ux/lib/Button';
|
|
2
2
|
import styled from '@emotion/styled';
|
|
3
3
|
import PropTypes from 'prop-types';
|
|
4
|
-
import React, { useMemo, useState } from 'react';
|
|
4
|
+
import React, { Fragment, useMemo, useState } from 'react';
|
|
5
5
|
import AddIcon from '@mui/icons-material/Add';
|
|
6
6
|
import DiamondIcon from '@mui/icons-material/Diamond';
|
|
7
7
|
import ExpandLess from '@mui/icons-material/ExpandLess';
|
|
@@ -149,93 +149,102 @@ function DomainList({
|
|
|
149
149
|
flexDirection: 'column',
|
|
150
150
|
gap: 1
|
|
151
151
|
},
|
|
152
|
-
children: (showAllDomains ? domains : displayDomains).map(domain =>
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
display:
|
|
172
|
-
alignItems:
|
|
173
|
-
justifyContent:
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
152
|
+
children: (showAllDomains ? domains : displayDomains).map(domain => {
|
|
153
|
+
const key = domain.value;
|
|
154
|
+
return (
|
|
155
|
+
/*#__PURE__*/
|
|
156
|
+
// HACK: 必须给 Fragment 元素一个 key,否则会警告 key 的问题
|
|
157
|
+
_jsxs(Fragment, {
|
|
158
|
+
children: [isMobile && /*#__PURE__*/_jsxs(Box, {
|
|
159
|
+
display: "flex",
|
|
160
|
+
flexDirection: "column",
|
|
161
|
+
children: [/*#__PURE__*/_jsx(Box, {
|
|
162
|
+
display: "flex",
|
|
163
|
+
alignItems: "center",
|
|
164
|
+
justifyContent: "flex-start",
|
|
165
|
+
children: /*#__PURE__*/_jsx(DomainLink, {
|
|
166
|
+
domain: domain,
|
|
167
|
+
target: "_blank",
|
|
168
|
+
children: domain.value
|
|
169
|
+
})
|
|
170
|
+
}), /*#__PURE__*/_jsxs(Box, {
|
|
171
|
+
display: "flex",
|
|
172
|
+
alignItems: "center",
|
|
173
|
+
justifyContent: "space-between",
|
|
174
|
+
children: [/*#__PURE__*/_jsxs(Box, {
|
|
175
|
+
sx: {
|
|
176
|
+
display: 'flex',
|
|
177
|
+
alignItems: 'center',
|
|
178
|
+
justifyContent: 'flex-start',
|
|
179
|
+
gap: 1
|
|
180
|
+
},
|
|
181
|
+
children: [/*#__PURE__*/_jsx(DomainStatus, {
|
|
182
|
+
domain: domain,
|
|
183
|
+
filters: ['domain']
|
|
184
|
+
}, `${domain.value}-domain`), /*#__PURE__*/_jsx(InnerAddDomain, {
|
|
185
|
+
siteId: blocklet.site?.id,
|
|
186
|
+
domain: domain,
|
|
187
|
+
blocklet: blocklet,
|
|
188
|
+
hasMutatePermission: hasMutatePermission
|
|
189
|
+
})]
|
|
190
|
+
}), /*#__PURE__*/_jsx(Box, {
|
|
191
|
+
sx: {
|
|
192
|
+
button: {
|
|
193
|
+
padding: 0
|
|
194
|
+
}
|
|
195
|
+
},
|
|
196
|
+
children: /*#__PURE__*/_jsx(InnerAction, {
|
|
197
|
+
hasMutatePermission: hasMutatePermission,
|
|
198
|
+
site: site,
|
|
199
|
+
domain: domain,
|
|
200
|
+
blocklet: blocklet
|
|
201
|
+
})
|
|
202
|
+
})]
|
|
183
203
|
})]
|
|
184
|
-
}), /*#__PURE__*/
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
children:
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
}
|
|
229
|
-
},
|
|
230
|
-
children: /*#__PURE__*/_jsx(InnerAction, {
|
|
231
|
-
hasMutatePermission: hasMutatePermission,
|
|
232
|
-
site: site,
|
|
233
|
-
domain: domain,
|
|
234
|
-
blocklet: blocklet
|
|
235
|
-
})
|
|
236
|
-
})]
|
|
237
|
-
}, domain.value)]
|
|
238
|
-
}))
|
|
204
|
+
}, key), !isMobile && /*#__PURE__*/_jsxs(Box, {
|
|
205
|
+
display: "flex",
|
|
206
|
+
alignItems: "center",
|
|
207
|
+
justifyContent: "space-between",
|
|
208
|
+
children: [/*#__PURE__*/_jsxs(Box, {
|
|
209
|
+
display: "flex",
|
|
210
|
+
alignItems: "center",
|
|
211
|
+
justifyContent: "flex-start",
|
|
212
|
+
children: [/*#__PURE__*/_jsx(DomainStatus, {
|
|
213
|
+
domain: domain,
|
|
214
|
+
filters: ['domain']
|
|
215
|
+
}, `${domain.value}-domain`), /*#__PURE__*/_jsx(Box, {
|
|
216
|
+
sx: {
|
|
217
|
+
ml: 2,
|
|
218
|
+
mr: 0.5
|
|
219
|
+
},
|
|
220
|
+
children: /*#__PURE__*/_jsx(DomainLink, {
|
|
221
|
+
domain: domain,
|
|
222
|
+
target: "_blank",
|
|
223
|
+
children: domain.value
|
|
224
|
+
})
|
|
225
|
+
}), /*#__PURE__*/_jsx(InnerAddDomain, {
|
|
226
|
+
siteId: blocklet.site?.id,
|
|
227
|
+
domain: domain,
|
|
228
|
+
blocklet: blocklet,
|
|
229
|
+
hasMutatePermission: hasMutatePermission
|
|
230
|
+
})]
|
|
231
|
+
}), /*#__PURE__*/_jsx(Box, {
|
|
232
|
+
sx: {
|
|
233
|
+
button: {
|
|
234
|
+
padding: 0
|
|
235
|
+
}
|
|
236
|
+
},
|
|
237
|
+
children: /*#__PURE__*/_jsx(InnerAction, {
|
|
238
|
+
hasMutatePermission: hasMutatePermission,
|
|
239
|
+
site: site,
|
|
240
|
+
domain: domain,
|
|
241
|
+
blocklet: blocklet
|
|
242
|
+
})
|
|
243
|
+
})]
|
|
244
|
+
}, key)]
|
|
245
|
+
}, key)
|
|
246
|
+
);
|
|
247
|
+
})
|
|
239
248
|
}), hiddenDomains.length > 0 && /*#__PURE__*/_jsx("div", {
|
|
240
249
|
style: {
|
|
241
250
|
marginLeft: '20px',
|
|
@@ -374,6 +383,7 @@ InnerAction.propTypes = {
|
|
|
374
383
|
blocklet: PropTypes.object.isRequired
|
|
375
384
|
};
|
|
376
385
|
function InnerAddDomain({
|
|
386
|
+
siteId,
|
|
377
387
|
domain,
|
|
378
388
|
blocklet,
|
|
379
389
|
hasMutatePermission
|
|
@@ -486,6 +496,7 @@ function InnerAddDomain({
|
|
|
486
496
|
domain: domain,
|
|
487
497
|
filters: ['http']
|
|
488
498
|
}, `${domain.value}-http`), hasMutatePermission && /*#__PURE__*/_jsx(AddCert, {
|
|
499
|
+
siteId: siteId,
|
|
489
500
|
domain: domain.value,
|
|
490
501
|
domainStatus: domain.domainStatus,
|
|
491
502
|
did: blocklet.meta.did,
|
|
@@ -503,6 +514,7 @@ function InnerAddDomain({
|
|
|
503
514
|
});
|
|
504
515
|
}
|
|
505
516
|
InnerAddDomain.propTypes = {
|
|
517
|
+
siteId: PropTypes.string.isRequired,
|
|
506
518
|
domain: DomainType.isRequired,
|
|
507
519
|
blocklet: PropTypes.object.isRequired,
|
|
508
520
|
hasMutatePermission: PropTypes.bool.isRequired
|
|
@@ -237,7 +237,7 @@ function ComponentItem({
|
|
|
237
237
|
value: /*#__PURE__*/_jsx(Box, {
|
|
238
238
|
children: blocklet.dependents.map(x => /*#__PURE__*/_jsx(Box, {
|
|
239
239
|
children: `${getComponentName(x.id, app)} ${x.required ? `(${t('common.required')})` : ''}`
|
|
240
|
-
}))
|
|
240
|
+
}, x.id))
|
|
241
241
|
})
|
|
242
242
|
} : null, blocklet.meta.resources?.length ? {
|
|
243
243
|
name: t('common.resource'),
|
|
@@ -313,7 +313,7 @@ function ComponentItem({
|
|
|
313
313
|
title: [`${t('common.dependents')}: `, blocklet.dependents.map(x => /*#__PURE__*/_jsx(Box, {
|
|
314
314
|
pl: 1,
|
|
315
315
|
children: `${getComponentName(x.id, app)} ${x.required ? `(${t('common.required')})` : ''}`
|
|
316
|
-
}))],
|
|
316
|
+
}, x.id))],
|
|
317
317
|
children: /*#__PURE__*/_jsx(Box, {
|
|
318
318
|
display: "flex",
|
|
319
319
|
color: "primary.main",
|
|
@@ -439,7 +439,7 @@ function ComponentItem({
|
|
|
439
439
|
}, "actions")]
|
|
440
440
|
}, "group-not-gateway-box"), /*#__PURE__*/_jsx(Line, {
|
|
441
441
|
depth: 2
|
|
442
|
-
}), !!componentInfo && /*#__PURE__*/_jsx(Dialog, {
|
|
442
|
+
}, "line"), !!componentInfo && /*#__PURE__*/_jsx(Dialog, {
|
|
443
443
|
open: true,
|
|
444
444
|
fullWidth: true,
|
|
445
445
|
maxWidth: "md",
|
|
@@ -470,7 +470,7 @@ function ComponentItem({
|
|
|
470
470
|
onCancel: () => setShowDeleteConfirm(false),
|
|
471
471
|
hideBtn: true,
|
|
472
472
|
showConfirm: showDeleteConfirm
|
|
473
|
-
}), confirmSetting && /*#__PURE__*/_jsx(Confirm, {
|
|
473
|
+
}, "delete-component"), confirmSetting && /*#__PURE__*/_jsx(Confirm, {
|
|
474
474
|
title: confirmSetting.title,
|
|
475
475
|
description: confirmSetting.description,
|
|
476
476
|
confirm: confirmSetting.confirm,
|
|
@@ -478,7 +478,7 @@ function ComponentItem({
|
|
|
478
478
|
params: confirmSetting.params,
|
|
479
479
|
onConfirm: confirmSetting.onConfirm,
|
|
480
480
|
onCancel: confirmSetting.onCancel
|
|
481
|
-
})];
|
|
481
|
+
}, "confirm-setting")];
|
|
482
482
|
}
|
|
483
483
|
ComponentItem.propTypes = {
|
|
484
484
|
blocklet: PropTypes.object.isRequired,
|
|
@@ -830,7 +830,7 @@ export default function BlockletComponent({
|
|
|
830
830
|
})]
|
|
831
831
|
})
|
|
832
832
|
})]
|
|
833
|
-
}), components
|
|
833
|
+
}), components?.length ? /*#__PURE__*/_jsxs(Box, {
|
|
834
834
|
mt: 2,
|
|
835
835
|
ml: {
|
|
836
836
|
xs: '-12px',
|
|
@@ -924,7 +924,7 @@ export default function BlockletComponent({
|
|
|
924
924
|
})]
|
|
925
925
|
})]
|
|
926
926
|
}, `${x.name}-${x.newVersion}`)]
|
|
927
|
-
}))
|
|
927
|
+
}, x.name))
|
|
928
928
|
}), /*#__PURE__*/_jsxs(DialogActions, {
|
|
929
929
|
style: {
|
|
930
930
|
padding: '8px 24px 24px'
|
|
@@ -10,9 +10,8 @@ import trim from 'lodash/trim';
|
|
|
10
10
|
import PropTypes from 'prop-types';
|
|
11
11
|
import useSetState from 'react-use/lib/useSetState';
|
|
12
12
|
import joinURL from 'url-join';
|
|
13
|
-
import { validateDomain } from '../../../lib/util';
|
|
14
13
|
import { useNodeContext } from '../../contexts/node';
|
|
15
|
-
import { sleep } from '../../util';
|
|
14
|
+
import { sleep, validateDomain } from '../../util';
|
|
16
15
|
import { axios } from '../../util/api';
|
|
17
16
|
import DNSTip from './dns-tip';
|
|
18
17
|
import { parseDomainFromURL } from './util';
|
|
@@ -30,6 +29,7 @@ export default function AddDomain({
|
|
|
30
29
|
onSuccess,
|
|
31
30
|
disabled,
|
|
32
31
|
autoFocus,
|
|
32
|
+
inBlockletSetup,
|
|
33
33
|
...props
|
|
34
34
|
}) {
|
|
35
35
|
const {
|
|
@@ -56,14 +56,16 @@ export default function AddDomain({
|
|
|
56
56
|
chainHost
|
|
57
57
|
}) => {
|
|
58
58
|
try {
|
|
59
|
+
const tmpDomain = parseDomainFromURL(domain);
|
|
59
60
|
await api.addDomainAlias({
|
|
60
61
|
input: {
|
|
61
62
|
id: siteId,
|
|
62
63
|
type: 'nft-domain',
|
|
63
|
-
domainAlias:
|
|
64
|
+
domainAlias: tmpDomain,
|
|
64
65
|
nftDid,
|
|
65
66
|
chainHost,
|
|
66
|
-
teamDid
|
|
67
|
+
teamDid,
|
|
68
|
+
inBlockletSetup
|
|
67
69
|
}
|
|
68
70
|
});
|
|
69
71
|
await sleep(2000);
|
|
@@ -72,8 +74,10 @@ export default function AddDomain({
|
|
|
72
74
|
showNFTDomainAuth: false
|
|
73
75
|
});
|
|
74
76
|
onSuccess({
|
|
75
|
-
domain,
|
|
76
|
-
type: state.type
|
|
77
|
+
domain: tmpDomain,
|
|
78
|
+
type: state.type,
|
|
79
|
+
nftDid,
|
|
80
|
+
chainHost
|
|
77
81
|
});
|
|
78
82
|
} finally {
|
|
79
83
|
setState({
|
|
@@ -215,7 +219,7 @@ export default function AddDomain({
|
|
|
215
219
|
gap: '1em'
|
|
216
220
|
},
|
|
217
221
|
children: inputDomainTypes.map((type, index) => /*#__PURE__*/_jsxs(Box, {
|
|
218
|
-
children: [/*#__PURE__*/_jsx(Box, {
|
|
222
|
+
children: [inputDomainTypes.length > 1 && /*#__PURE__*/_jsx(Box, {
|
|
219
223
|
children: `${t(`optionsOrder.${index + 1}`)}: ${domainTypes[type]?.name}`
|
|
220
224
|
}), /*#__PURE__*/_jsx(Box, {
|
|
221
225
|
sx: {
|
|
@@ -237,7 +241,8 @@ AddDomain.propTypes = {
|
|
|
237
241
|
appId: PropTypes.string,
|
|
238
242
|
appPk: PropTypes.string,
|
|
239
243
|
disabled: PropTypes.bool,
|
|
240
|
-
autoFocus: PropTypes.bool
|
|
244
|
+
autoFocus: PropTypes.bool,
|
|
245
|
+
inBlockletSetup: PropTypes.bool
|
|
241
246
|
};
|
|
242
247
|
AddDomain.defaultProps = {
|
|
243
248
|
defaultCustomDomain: '',
|
|
@@ -246,5 +251,6 @@ AddDomain.defaultProps = {
|
|
|
246
251
|
appId: '',
|
|
247
252
|
appPk: '',
|
|
248
253
|
disabled: false,
|
|
249
|
-
autoFocus: true
|
|
254
|
+
autoFocus: true,
|
|
255
|
+
inBlockletSetup: false
|
|
250
256
|
};
|
|
@@ -78,11 +78,13 @@ function Tip({
|
|
|
78
78
|
children: [/*#__PURE__*/_jsx(Typography, {
|
|
79
79
|
component: "span",
|
|
80
80
|
color: "primary.main",
|
|
81
|
-
wordWrap: "break-word",
|
|
82
81
|
overflow: "auto",
|
|
83
82
|
sx: isMobile ? {
|
|
84
|
-
maxWidth: '95%'
|
|
85
|
-
|
|
83
|
+
maxWidth: '95%',
|
|
84
|
+
wordWrap: 'break-word'
|
|
85
|
+
} : {
|
|
86
|
+
wordWrap: 'break-word'
|
|
87
|
+
},
|
|
86
88
|
children: value
|
|
87
89
|
}), /*#__PURE__*/_jsx(CopyButton, {
|
|
88
90
|
content: value,
|
package/es/clear-cache.js
CHANGED
|
@@ -3,7 +3,7 @@ import Toast from '@arcblock/ux/lib/Toast';
|
|
|
3
3
|
import Button from '@arcblock/ux/lib/Button';
|
|
4
4
|
import Spinner from '@mui/material/CircularProgress';
|
|
5
5
|
import { useLocaleContext } from '@arcblock/ux/lib/Locale/context';
|
|
6
|
-
import { formatError } from '
|
|
6
|
+
import { formatError } from './util';
|
|
7
7
|
import { useNodeContext } from './contexts/node';
|
|
8
8
|
import Confirm from './confirm';
|
|
9
9
|
|
|
@@ -3,7 +3,7 @@ import { useAsyncEffect } from 'ahooks';
|
|
|
3
3
|
import toast from '@arcblock/ux/lib/Toast';
|
|
4
4
|
import { useNodeContext } from '../contexts/node';
|
|
5
5
|
import { updateSpaceGatewaysFromDIDSpaces } from '../util/space-gateway';
|
|
6
|
-
import { formatError } from '
|
|
6
|
+
import { formatError } from '../util';
|
|
7
7
|
import { useBlockletContext } from '../contexts/blocklet';
|
|
8
8
|
|
|
9
9
|
/**
|
package/es/locales/en.js
CHANGED
package/es/locales/index.js
CHANGED
|
@@ -1,9 +1,8 @@
|
|
|
1
|
+
/* eslint-disable import/prefer-default-export */
|
|
1
2
|
const flat = require('flat');
|
|
2
3
|
const en = require('./en');
|
|
3
4
|
const zh = require('./zh');
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
en: flat(en)
|
|
8
|
-
}
|
|
5
|
+
export const translations = {
|
|
6
|
+
zh: flat(zh),
|
|
7
|
+
en: flat(en)
|
|
9
8
|
};
|
package/es/locales/zh.js
CHANGED
package/lib/actions.js
CHANGED
|
@@ -19,8 +19,8 @@ const _excluded = ["actions", "size"],
|
|
|
19
19
|
_excluded2 = ["icon", "text", "onClick", "disabled"];
|
|
20
20
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
21
21
|
function _taggedTemplateLiteral(strings, raw) { if (!raw) { raw = strings.slice(0); } return Object.freeze(Object.defineProperties(strings, { raw: { value: Object.freeze(raw) } })); }
|
|
22
|
-
function ownKeys(
|
|
23
|
-
function _objectSpread(
|
|
22
|
+
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
23
|
+
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
24
24
|
function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
|
25
25
|
function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return typeof key === "symbol" ? key : String(key); }
|
|
26
26
|
function _toPrimitive(input, hint) { if (typeof input !== "object" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || "default"); if (typeof res !== "object") return res; throw new TypeError("@@toPrimitive must return a primitive value."); } return (hint === "string" ? String : Number)(input); }
|
package/lib/analytics/card.js
CHANGED
|
@@ -14,8 +14,8 @@ var _jsxRuntime = require("react/jsx-runtime");
|
|
|
14
14
|
var _templateObject;
|
|
15
15
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
16
16
|
function _taggedTemplateLiteral(strings, raw) { if (!raw) { raw = strings.slice(0); } return Object.freeze(Object.defineProperties(strings, { raw: { value: Object.freeze(raw) } })); }
|
|
17
|
-
function ownKeys(
|
|
18
|
-
function _objectSpread(
|
|
17
|
+
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
18
|
+
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
19
19
|
function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
|
20
20
|
function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return typeof key === "symbol" ? key : String(key); }
|
|
21
21
|
function _toPrimitive(input, hint) { if (typeof input !== "object" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || "default"); if (typeof res !== "object") return res; throw new TypeError("@@toPrimitive must return a primitive value."); } return (hint === "string" ? String : Number)(input); }
|
package/lib/analytics/chart.js
CHANGED
|
@@ -11,10 +11,10 @@ var _Sparkline = _interopRequireDefault(require("@arcblock/ux/lib/Sparkline"));
|
|
|
11
11
|
var _card = _interopRequireDefault(require("./card"));
|
|
12
12
|
var _jsxRuntime = require("react/jsx-runtime");
|
|
13
13
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
14
|
-
function _getRequireWildcardCache(
|
|
15
|
-
function _interopRequireWildcard(
|
|
16
|
-
function ownKeys(
|
|
17
|
-
function _objectSpread(
|
|
14
|
+
function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(e) { return e ? t : r; })(e); }
|
|
15
|
+
function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != typeof e && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && Object.prototype.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; }
|
|
16
|
+
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
17
|
+
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
18
18
|
function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
|
19
19
|
function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return typeof key === "symbol" ? key : String(key); }
|
|
20
20
|
function _toPrimitive(input, hint) { if (typeof input !== "object" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || "default"); if (typeof res !== "object") return res; throw new TypeError("@@toPrimitive must return a primitive value."); } return (hint === "string" ? String : Number)(input); }
|