@abtnode/ux 1.16.14-beta-cb53c14b → 1.16.14-beta-7423f9ef
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/component/add.js +24 -1
- package/es/blocklet/component/selected/index.js +94 -0
- package/es/blocklet/storage/backups.js +15 -8
- package/es/blocklet/storage/connect-to.js +5 -6
- package/es/card-selector.js +15 -15
- package/es/invitation/invitation-passport.js +7 -5
- package/es/locales/en.js +14 -6
- package/es/locales/zh.js +11 -3
- package/es/lost-passport.js +2 -2
- package/es/schema-form/passport-input.js +12 -11
- package/es/team/passports/color.js +14 -13
- package/es/util/spaces.js +10 -1
- package/lib/blocklet/component/add.js +8 -3
- package/lib/blocklet/component/selected/index.js +47 -0
- package/lib/blocklet/storage/backups.js +15 -8
- package/lib/blocklet/storage/connect-to.js +5 -6
- package/lib/card-selector.js +14 -14
- package/lib/invitation/invitation-passport.js +7 -6
- package/lib/locales/en.js +14 -6
- package/lib/locales/zh.js +11 -3
- package/lib/lost-passport.js +2 -2
- package/lib/schema-form/passport-input.js +12 -11
- package/lib/team/passports/color.js +14 -14
- package/lib/util/spaces.js +13 -1
- package/package.json +22 -18
|
@@ -48,6 +48,11 @@ const requirePurchase = meta => meta.inStore && isFreeBlocklet(meta) === false;
|
|
|
48
48
|
const getDIDSpaceCapability = meta => {
|
|
49
49
|
return meta?.capabilities?.didSpace;
|
|
50
50
|
};
|
|
51
|
+
/**
|
|
52
|
+
* @description
|
|
53
|
+
* @param {import('@abtnode/client').BlockletState} blocklet
|
|
54
|
+
* @return {string}
|
|
55
|
+
*/
|
|
51
56
|
const getDIDSpaceEndpoint = blocklet => {
|
|
52
57
|
return blocklet?.configs?.find(item => item.key === BLOCKLET_CONFIGURABLE_KEY.BLOCKLET_APP_SPACE_ENDPOINT)?.value || null;
|
|
53
58
|
};
|
|
@@ -1110,6 +1115,7 @@ const DialogWrapper = styled(Dialog)`
|
|
|
1110
1115
|
padding-right: 0;
|
|
1111
1116
|
padding-bottom: 0;
|
|
1112
1117
|
}
|
|
1118
|
+
|
|
1113
1119
|
.MuiDialogActions-root {
|
|
1114
1120
|
padding: 16px 24px;
|
|
1115
1121
|
}
|
|
@@ -1122,8 +1128,8 @@ const TypographyWrapper = styled(Typography)`
|
|
|
1122
1128
|
height: 100%;
|
|
1123
1129
|
`;
|
|
1124
1130
|
const RightContent = styled.div`
|
|
1125
|
-
padding: 34px 24px 24px;
|
|
1126
1131
|
width: 100%;
|
|
1132
|
+
height: 100%;
|
|
1127
1133
|
display: flex;
|
|
1128
1134
|
flex-direction: column;
|
|
1129
1135
|
justify-content: flex-start;
|
|
@@ -1153,6 +1159,8 @@ const DialogContentWrapper = styled(DialogContentText)`
|
|
|
1153
1159
|
// mobile extra style
|
|
1154
1160
|
if (className === 'mobileStyle') {
|
|
1155
1161
|
return `
|
|
1162
|
+
height: 100%;
|
|
1163
|
+
|
|
1156
1164
|
& > div{
|
|
1157
1165
|
height: 100%;
|
|
1158
1166
|
}
|
|
@@ -1162,6 +1170,8 @@ const DialogContentWrapper = styled(DialogContentText)`
|
|
|
1162
1170
|
}
|
|
1163
1171
|
}
|
|
1164
1172
|
|
|
1173
|
+
|
|
1174
|
+
|
|
1165
1175
|
// content-panel
|
|
1166
1176
|
.root-header + div{
|
|
1167
1177
|
padding-top: 0;
|
|
@@ -1171,6 +1181,19 @@ const DialogContentWrapper = styled(DialogContentText)`
|
|
|
1171
1181
|
}
|
|
1172
1182
|
}
|
|
1173
1183
|
|
|
1184
|
+
header + div {
|
|
1185
|
+
padding-top: 0;
|
|
1186
|
+
}
|
|
1187
|
+
|
|
1188
|
+
header {
|
|
1189
|
+
.header-title {
|
|
1190
|
+
margin-left: 0;
|
|
1191
|
+
}
|
|
1192
|
+
|
|
1193
|
+
.header-title-name {
|
|
1194
|
+
max-width: 100% !important;
|
|
1195
|
+
}
|
|
1196
|
+
}
|
|
1174
1197
|
`;
|
|
1175
1198
|
}
|
|
1176
1199
|
return `
|
|
@@ -0,0 +1,94 @@
|
|
|
1
|
+
/* eslint-disable react/jsx-one-expression-per-line */
|
|
2
|
+
import { Box } from '@mui/material';
|
|
3
|
+
import CheckIcon from '@mui/icons-material/Check';
|
|
4
|
+
import { bool, node } from 'prop-types';
|
|
5
|
+
import styled from '@emotion/styled';
|
|
6
|
+
|
|
7
|
+
/**
|
|
8
|
+
*
|
|
9
|
+
*
|
|
10
|
+
* @export
|
|
11
|
+
* @param {{
|
|
12
|
+
* children: React.ReactNode,
|
|
13
|
+
* selected?: false | true,
|
|
14
|
+
* }} { children, selected }
|
|
15
|
+
* @return {React.Component}
|
|
16
|
+
*/
|
|
17
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
18
|
+
import { jsxs as _jsxs } from "react/jsx-runtime";
|
|
19
|
+
export default function Selected({
|
|
20
|
+
children,
|
|
21
|
+
selected
|
|
22
|
+
}) {
|
|
23
|
+
return /*#__PURE__*/_jsxs(BoxContainer, {
|
|
24
|
+
children: [children, /*#__PURE__*/_jsx(Box, {
|
|
25
|
+
className: `selected-container ${selected ? 'selected' : ''}`,
|
|
26
|
+
children: /*#__PURE__*/_jsx(CheckIcon, {
|
|
27
|
+
className: "selected-icon"
|
|
28
|
+
})
|
|
29
|
+
})]
|
|
30
|
+
});
|
|
31
|
+
}
|
|
32
|
+
const BoxContainer = styled(Box)`
|
|
33
|
+
position: relative;
|
|
34
|
+
|
|
35
|
+
.selected-container {
|
|
36
|
+
display: flex !important;
|
|
37
|
+
position: absolute;
|
|
38
|
+
right: 0px;
|
|
39
|
+
bottom: 0px;
|
|
40
|
+
-webkit-box-pack: end;
|
|
41
|
+
justify-content: flex-end;
|
|
42
|
+
align-items: flex-end;
|
|
43
|
+
width: 32px;
|
|
44
|
+
height: 32px;
|
|
45
|
+
border-radius: 0px 0px 8px;
|
|
46
|
+
color: rgb(255, 255, 255);
|
|
47
|
+
overflow: hidden;
|
|
48
|
+
transition: all 0.4s ease 0s;
|
|
49
|
+
|
|
50
|
+
&::after {
|
|
51
|
+
position: absolute;
|
|
52
|
+
z-index: 0;
|
|
53
|
+
left: 60px;
|
|
54
|
+
top: 60px;
|
|
55
|
+
display: block;
|
|
56
|
+
width: 0px;
|
|
57
|
+
height: 0px;
|
|
58
|
+
border-width: 16px;
|
|
59
|
+
border-style: solid;
|
|
60
|
+
border-color: transparent #1dc1c7 #1dc1c7 transparent;
|
|
61
|
+
transition: all 0.1s ease 0s;
|
|
62
|
+
content: '';
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
.selected-icon {
|
|
66
|
+
visibility: hidden;
|
|
67
|
+
width: 60%;
|
|
68
|
+
height: 60%;
|
|
69
|
+
position: relative;
|
|
70
|
+
z-index: 2;
|
|
71
|
+
margin: 0px 1px 1px 0px;
|
|
72
|
+
font-size: 16px;
|
|
73
|
+
transition: all 0.2s ease 0s;
|
|
74
|
+
}
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
.selected-container.selected {
|
|
78
|
+
&::after {
|
|
79
|
+
left: 0px;
|
|
80
|
+
top: 0px;
|
|
81
|
+
}
|
|
82
|
+
|
|
83
|
+
.selected-icon {
|
|
84
|
+
visibility: visible;
|
|
85
|
+
}
|
|
86
|
+
}
|
|
87
|
+
`;
|
|
88
|
+
Selected.propTypes = {
|
|
89
|
+
children: node.isRequired,
|
|
90
|
+
selected: bool
|
|
91
|
+
};
|
|
92
|
+
Selected.defaultProps = {
|
|
93
|
+
selected: false
|
|
94
|
+
};
|
|
@@ -152,9 +152,14 @@ function SpacesBackupRecords({
|
|
|
152
152
|
customBodyRenderLite: index => {
|
|
153
153
|
const {
|
|
154
154
|
status,
|
|
155
|
-
message
|
|
155
|
+
message,
|
|
156
|
+
createdAt
|
|
156
157
|
} = backups?.[index] ?? {};
|
|
157
|
-
|
|
158
|
+
const timeoutError = isNull(status) && dayjs().diff(createdAt, 'hours') > 6;
|
|
159
|
+
const timeoutErrorMessage = timeoutError && t('common.timeoutError');
|
|
160
|
+
const pending = isNull(status) && !timeoutError;
|
|
161
|
+
const success = status === 0 && !timeoutError;
|
|
162
|
+
if (pending) {
|
|
158
163
|
return /*#__PURE__*/_jsxs(Typography, {
|
|
159
164
|
display: "inline-flex",
|
|
160
165
|
alignItems: "center",
|
|
@@ -167,10 +172,13 @@ function SpacesBackupRecords({
|
|
|
167
172
|
}), t('common.progress')]
|
|
168
173
|
});
|
|
169
174
|
}
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
175
|
+
if (success) {
|
|
176
|
+
return /*#__PURE__*/_jsx(Tag, {
|
|
177
|
+
type: "success",
|
|
178
|
+
children: t('common.succeeded')
|
|
179
|
+
});
|
|
180
|
+
}
|
|
181
|
+
return /*#__PURE__*/_jsxs(Box, {
|
|
174
182
|
display: "inline-flex",
|
|
175
183
|
alignItems: "center",
|
|
176
184
|
children: [/*#__PURE__*/_jsx(Tag, {
|
|
@@ -182,7 +190,7 @@ function SpacesBackupRecords({
|
|
|
182
190
|
alignItems: 'center',
|
|
183
191
|
flexShrink: 0
|
|
184
192
|
},
|
|
185
|
-
title: message,
|
|
193
|
+
title: message || timeoutErrorMessage,
|
|
186
194
|
children: /*#__PURE__*/_jsx(Icon, {
|
|
187
195
|
children: /*#__PURE__*/_jsx(HelpOutlineIcon, {
|
|
188
196
|
style: {
|
|
@@ -194,7 +202,6 @@ function SpacesBackupRecords({
|
|
|
194
202
|
})
|
|
195
203
|
})]
|
|
196
204
|
});
|
|
197
|
-
return node;
|
|
198
205
|
}
|
|
199
206
|
}
|
|
200
207
|
}];
|
|
@@ -4,7 +4,6 @@ import Button from '@arcblock/ux/lib/Button';
|
|
|
4
4
|
import { useLocaleContext } from '@arcblock/ux/lib/Locale/context';
|
|
5
5
|
import DidConnect from '@arcblock/did-connect/lib/Connect';
|
|
6
6
|
import joinUrl from 'url-join';
|
|
7
|
-
import isUrl from 'is-url';
|
|
8
7
|
import toast from '@arcblock/ux/lib/Toast';
|
|
9
8
|
import { BLOCKLET_CONFIGURABLE_KEY } from '@blocklet/constant';
|
|
10
9
|
import SplitButton from '@arcblock/ux/lib/SplitButton';
|
|
@@ -144,12 +143,12 @@ function ConnectTo({
|
|
|
144
143
|
name,
|
|
145
144
|
did
|
|
146
145
|
}) => {
|
|
147
|
-
let
|
|
148
|
-
if (!
|
|
146
|
+
let normalizeUrl = endpoint?.replace(/\/api\/.+/, '')?.trim()?.replace(/\/$/, '');
|
|
147
|
+
if (!normalizeUrl.startsWith('http')) {
|
|
149
148
|
// eslint-disable-next-line no-param-reassign
|
|
150
|
-
|
|
149
|
+
normalizeUrl = `https://${normalizeUrl}`;
|
|
151
150
|
}
|
|
152
|
-
if (!
|
|
151
|
+
if (!(await isValidSpaceGatewayUrl(normalizeUrl))) {
|
|
153
152
|
toast.error(t('storage.spaces.gateway.add.invalidUrl'));
|
|
154
153
|
return;
|
|
155
154
|
}
|
|
@@ -163,7 +162,7 @@ function ConnectTo({
|
|
|
163
162
|
const spaceGateway = {
|
|
164
163
|
name,
|
|
165
164
|
did,
|
|
166
|
-
url:
|
|
165
|
+
url: normalizeUrl,
|
|
167
166
|
endpoint
|
|
168
167
|
};
|
|
169
168
|
await nodeApi.addBlockletSpaceGateway({
|
package/es/card-selector.js
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
/* eslint-disable react/no-danger */
|
|
1
2
|
/* eslint-disable jsx-a11y/alt-text */
|
|
2
3
|
import { useState, useEffect, useRef } from 'react';
|
|
3
4
|
import styled from '@emotion/styled';
|
|
@@ -13,7 +14,7 @@ export default function CardSelector({
|
|
|
13
14
|
}) {
|
|
14
15
|
const [selectedId, setSelectedId] = useState(0);
|
|
15
16
|
const [translateX, setTranslateX] = useState(0);
|
|
16
|
-
const
|
|
17
|
+
const outerCon = useRef(null);
|
|
17
18
|
|
|
18
19
|
// 选择卡片
|
|
19
20
|
const selectedItem = i => {
|
|
@@ -23,14 +24,14 @@ export default function CardSelector({
|
|
|
23
24
|
setSelectedId(i);
|
|
24
25
|
|
|
25
26
|
// 外部容器大小
|
|
26
|
-
const outerWidth =
|
|
27
|
+
const outerWidth = outerCon.current.clientWidth;
|
|
27
28
|
setTranslateX(i * (width + cardSpace) - (outerWidth - width) / 2 + cardSpace * 0.5);
|
|
28
29
|
onSelect(i);
|
|
29
30
|
};
|
|
30
31
|
useEffect(() => {
|
|
31
32
|
selectedItem(defaultIndex);
|
|
32
33
|
const func = e => e.preventDefault();
|
|
33
|
-
|
|
34
|
+
outerCon.current.addEventListener('touchmove', func, {
|
|
34
35
|
passive: false
|
|
35
36
|
});
|
|
36
37
|
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
@@ -52,7 +53,7 @@ export default function CardSelector({
|
|
|
52
53
|
}
|
|
53
54
|
};
|
|
54
55
|
return /*#__PURE__*/_jsx(Container, {
|
|
55
|
-
ref:
|
|
56
|
+
ref: outerCon,
|
|
56
57
|
onTouchStart: touchstart,
|
|
57
58
|
onTouchEnd: touchend,
|
|
58
59
|
children: /*#__PURE__*/_jsx("div", {
|
|
@@ -60,23 +61,22 @@ export default function CardSelector({
|
|
|
60
61
|
style: {
|
|
61
62
|
transform: `translate(${-translateX}px, 0)`
|
|
62
63
|
},
|
|
63
|
-
children: list.map((
|
|
64
|
+
children: list.map((x, i) => {
|
|
64
65
|
return /*#__PURE__*/_jsx("div", {
|
|
65
66
|
className: `card-item ${i === selectedId ? 'selected' : ''}`,
|
|
66
67
|
style: {
|
|
67
68
|
width,
|
|
68
69
|
height,
|
|
69
70
|
margin: cardSpace / 2
|
|
70
|
-
}
|
|
71
|
-
// eslint-disable-next-line react/no-array-index-key
|
|
72
|
-
,
|
|
73
|
-
|
|
71
|
+
},
|
|
74
72
|
onClick: () => selectedItem(i),
|
|
75
|
-
children: /*#__PURE__*/_jsx("
|
|
76
|
-
|
|
77
|
-
|
|
73
|
+
children: /*#__PURE__*/_jsx("div", {
|
|
74
|
+
className: "card-content",
|
|
75
|
+
dangerouslySetInnerHTML: {
|
|
76
|
+
__html: x.src
|
|
77
|
+
}
|
|
78
78
|
})
|
|
79
|
-
},
|
|
79
|
+
}, x.id);
|
|
80
80
|
})
|
|
81
81
|
})
|
|
82
82
|
});
|
|
@@ -98,7 +98,7 @@ const Container = styled.div`
|
|
|
98
98
|
flex-shrink: 0;
|
|
99
99
|
cursor: pointer;
|
|
100
100
|
|
|
101
|
-
|
|
101
|
+
.card-content {
|
|
102
102
|
pointer-events: none;
|
|
103
103
|
max-width: 100%;
|
|
104
104
|
max-height: 100%;
|
|
@@ -110,7 +110,7 @@ const Container = styled.div`
|
|
|
110
110
|
}
|
|
111
111
|
&.selected {
|
|
112
112
|
cursor: default;
|
|
113
|
-
|
|
113
|
+
.card-content {
|
|
114
114
|
outline: #526ded solid 5px;
|
|
115
115
|
}
|
|
116
116
|
}
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
/* eslint-disable react/no-danger */
|
|
1
2
|
/* eslint-disable jsx-a11y/alt-text */
|
|
2
3
|
import { useCallback, useContext, useMemo, useState } from 'react';
|
|
3
4
|
import PropTypes from 'prop-types';
|
|
@@ -30,7 +31,6 @@ function InvitationPassport({
|
|
|
30
31
|
// can't get avatar, cause user is not login
|
|
31
32
|
// ownerAvatarUrl: user.avatar,
|
|
32
33
|
ownerDid: invitation.info.appDid,
|
|
33
|
-
isDataUrl: true,
|
|
34
34
|
preferredColor: invitation.info.passportColor || passportColor
|
|
35
35
|
});
|
|
36
36
|
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
@@ -46,10 +46,11 @@ function InvitationPassport({
|
|
|
46
46
|
children: /*#__PURE__*/_jsx("div", {
|
|
47
47
|
className: "invite-passport__card",
|
|
48
48
|
onClick: onViewPermission,
|
|
49
|
-
children: /*#__PURE__*/_jsx("
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
49
|
+
children: /*#__PURE__*/_jsx("div", {
|
|
50
|
+
className: "invite-passport__cover",
|
|
51
|
+
dangerouslySetInnerHTML: {
|
|
52
|
+
__html: display
|
|
53
|
+
}
|
|
53
54
|
})
|
|
54
55
|
})
|
|
55
56
|
}), /*#__PURE__*/_jsx(Dialog, {
|
|
@@ -108,6 +109,7 @@ const Root = styled.div`
|
|
|
108
109
|
height: 258px;
|
|
109
110
|
flex-shrink: 0;
|
|
110
111
|
.invite-passport__cover {
|
|
112
|
+
cursor: pointer;
|
|
111
113
|
width: 100%;
|
|
112
114
|
height: 100%;
|
|
113
115
|
}
|
package/es/locales/en.js
CHANGED
|
@@ -160,7 +160,7 @@ module.exports = {
|
|
|
160
160
|
expires: 'Expires',
|
|
161
161
|
export: 'Export',
|
|
162
162
|
externalIp: 'External IP',
|
|
163
|
-
failed: '
|
|
163
|
+
failed: 'Failed',
|
|
164
164
|
filter: 'Log Filter',
|
|
165
165
|
fingerprint: 'Fingerprint',
|
|
166
166
|
finish: 'Finish',
|
|
@@ -310,7 +310,9 @@ module.exports = {
|
|
|
310
310
|
manual: 'Manual',
|
|
311
311
|
progress: 'In progress',
|
|
312
312
|
startTime: 'Start time',
|
|
313
|
-
endTime: 'End time'
|
|
313
|
+
endTime: 'End time',
|
|
314
|
+
selected: 'Selected',
|
|
315
|
+
timeoutError: 'Timeout error'
|
|
314
316
|
},
|
|
315
317
|
blocklet: {
|
|
316
318
|
external: 'External',
|
|
@@ -1354,6 +1356,7 @@ module.exports = {
|
|
|
1354
1356
|
tag: 'Connected'
|
|
1355
1357
|
},
|
|
1356
1358
|
connectedWithName: 'You have successfully connected to {name}',
|
|
1359
|
+
addedWithName: 'You have successfully added {name}',
|
|
1357
1360
|
connects: 'Connect',
|
|
1358
1361
|
reconnect: 'Reconnect',
|
|
1359
1362
|
addressCannotEmpty: 'Address cannot be empty',
|
|
@@ -1389,7 +1392,8 @@ module.exports = {
|
|
|
1389
1392
|
title: 'Delete gateway',
|
|
1390
1393
|
succeeded: 'Delete DID Spaces{name} Success',
|
|
1391
1394
|
failed: 'Delete gateway failed',
|
|
1392
|
-
failedForConnected: 'Unable to delete a connected DID Spaces'
|
|
1395
|
+
failedForConnected: 'Unable to delete a connected DID Spaces',
|
|
1396
|
+
failedForSelected: 'Unable to delete a selected DID Spaces'
|
|
1393
1397
|
},
|
|
1394
1398
|
connect: {
|
|
1395
1399
|
title: 'Connect DID Spaces',
|
|
@@ -1419,14 +1423,18 @@ module.exports = {
|
|
|
1419
1423
|
},
|
|
1420
1424
|
notYet: "You don't have a backup in progress yet...",
|
|
1421
1425
|
connect: {
|
|
1422
|
-
now: 'Connect',
|
|
1426
|
+
now: 'Connect now',
|
|
1423
1427
|
title: 'Connect DID Spaces',
|
|
1424
1428
|
provider: 'Provide your DID Spaces to start backups',
|
|
1425
|
-
|
|
1429
|
+
providerForStorage: 'Please connect your DID Spaces',
|
|
1430
|
+
useWallet: 'Connect with DID Wallet',
|
|
1431
|
+
useWalletReconnect: 'Reconnect with DID Wallet',
|
|
1426
1432
|
useSpaceGateway: 'Connect using the DID Spaces gateway',
|
|
1433
|
+
useSpaceGatewayReconnect: 'Reconnect using the DID Spaces gateway',
|
|
1427
1434
|
switchToSpace: 'Switch to Space',
|
|
1428
1435
|
switchToSpaceSucceeded: 'Switched to Space{name}',
|
|
1429
|
-
succeeded: 'You have successfully connected to DID Spaces'
|
|
1436
|
+
succeeded: 'You have successfully connected to DID Spaces',
|
|
1437
|
+
disconnect: 'disconnect'
|
|
1430
1438
|
},
|
|
1431
1439
|
disconnected: {
|
|
1432
1440
|
tag: 'Disconnected',
|
package/es/locales/zh.js
CHANGED
|
@@ -315,7 +315,9 @@ module.exports = {
|
|
|
315
315
|
manual: '手动',
|
|
316
316
|
progress: '进行中',
|
|
317
317
|
startTime: '开始时间',
|
|
318
|
-
endTime: '结束时间'
|
|
318
|
+
endTime: '结束时间',
|
|
319
|
+
selected: '已选中',
|
|
320
|
+
timeoutError: '超时错误'
|
|
319
321
|
},
|
|
320
322
|
blocklet: {
|
|
321
323
|
external: '外部',
|
|
@@ -1358,6 +1360,7 @@ module.exports = {
|
|
|
1358
1360
|
tag: '已连接'
|
|
1359
1361
|
},
|
|
1360
1362
|
connectedWithName: '你已成功连接至 {name}',
|
|
1363
|
+
addedWithName: '你已成功添加 {name}',
|
|
1361
1364
|
connects: '连接',
|
|
1362
1365
|
reconnect: '重新连接',
|
|
1363
1366
|
addressCannotEmpty: '地址不能为空',
|
|
@@ -1392,7 +1395,8 @@ module.exports = {
|
|
|
1392
1395
|
title: '删除 DID Spaces',
|
|
1393
1396
|
succeeded: '删除 DID Spaces{name} 成功',
|
|
1394
1397
|
failed: '删除 DID Spaces 失败',
|
|
1395
|
-
failedForConnected: '无法删除一个已连接的 DID Spaces'
|
|
1398
|
+
failedForConnected: '无法删除一个已连接的 DID Spaces',
|
|
1399
|
+
failedForSelected: '无法删除一个已选中的 DID Spaces'
|
|
1396
1400
|
},
|
|
1397
1401
|
connect: {
|
|
1398
1402
|
title: '连接到 DID Spaces',
|
|
@@ -1425,11 +1429,15 @@ module.exports = {
|
|
|
1425
1429
|
now: '立即连接',
|
|
1426
1430
|
title: '使用 DID Wallet 连接',
|
|
1427
1431
|
provider: '提供您的 DID Spaces 开始备份',
|
|
1432
|
+
providerForStorage: '请连接您的 DID Spaces',
|
|
1428
1433
|
useWallet: '使用 DID Wallet 连接',
|
|
1434
|
+
useWalletReconnect: '使用 DID Wallet 重新连接',
|
|
1429
1435
|
useSpaceGateway: '使用 DID Spaces 网关连接',
|
|
1436
|
+
useSpaceGatewayReconnect: '使用 DID Spaces 网关重新连接',
|
|
1430
1437
|
switchToSpace: '切换至 Space',
|
|
1431
1438
|
switchToSpaceSucceeded: '已切换至 Space{name}',
|
|
1432
|
-
succeeded: '你已成功连接至 DID Spaces'
|
|
1439
|
+
succeeded: '你已成功连接至 DID Spaces',
|
|
1440
|
+
disconnect: '断开连接'
|
|
1433
1441
|
},
|
|
1434
1442
|
disconnected: {
|
|
1435
1443
|
tag: '连接已断开',
|
package/es/lost-passport.js
CHANGED
|
@@ -207,10 +207,10 @@ function LostPassport({
|
|
|
207
207
|
ownerDid: user.did,
|
|
208
208
|
ownerName: user.fullName,
|
|
209
209
|
ownerAvatarUrl: user.avatar,
|
|
210
|
-
isDataUrl: true,
|
|
211
210
|
preferredColor: passportColor || 'auto'
|
|
212
211
|
}),
|
|
213
|
-
name: x.title
|
|
212
|
+
name: x.title,
|
|
213
|
+
id: x.id
|
|
214
214
|
};
|
|
215
215
|
}),
|
|
216
216
|
onSelect: index => handleChange({
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
/* eslint-disable react/no-danger */
|
|
1
2
|
import PropTypes from 'prop-types';
|
|
2
3
|
import Box from '@mui/material/Box';
|
|
3
4
|
import createPassportSvg from '@abtnode/auth/lib/util/create-passport-svg';
|
|
@@ -21,21 +22,21 @@ export default function PassportInput({
|
|
|
21
22
|
return /*#__PURE__*/_jsxs(Box, {
|
|
22
23
|
display: "flex",
|
|
23
24
|
alignItems: "center",
|
|
24
|
-
children: [/*#__PURE__*/_jsx("
|
|
25
|
+
children: [/*#__PURE__*/_jsx("div", {
|
|
25
26
|
style: {
|
|
26
27
|
width: 96,
|
|
27
28
|
marginRight: 12
|
|
28
29
|
},
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
}
|
|
30
|
+
dangerouslySetInnerHTML: {
|
|
31
|
+
__html: createPassportSvg({
|
|
32
|
+
title: 'Owner',
|
|
33
|
+
issuer: getDisplayName(blocklet),
|
|
34
|
+
issuerDid: blocklet.appDid,
|
|
35
|
+
ownerName: 'Your Name',
|
|
36
|
+
ownerDid: blocklet.appDid,
|
|
37
|
+
preferredColor: value || 'auto'
|
|
38
|
+
})
|
|
39
|
+
}
|
|
39
40
|
}), /*#__PURE__*/_jsx(ColorInput, {
|
|
40
41
|
...rest,
|
|
41
42
|
editing: editing,
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
/* eslint-disable react/no-danger */
|
|
1
2
|
import { useState } from 'react';
|
|
2
3
|
import PropTypes from 'prop-types';
|
|
3
4
|
import Box from '@mui/material/Box';
|
|
@@ -85,21 +86,21 @@ function PassportColor({
|
|
|
85
86
|
children: [/*#__PURE__*/_jsx(ChromePicker, {
|
|
86
87
|
color: color,
|
|
87
88
|
onChange: c => setColor(c.hex)
|
|
88
|
-
}), /*#__PURE__*/_jsx("
|
|
89
|
+
}), /*#__PURE__*/_jsx("div", {
|
|
89
90
|
style: {
|
|
90
|
-
width:
|
|
91
|
-
marginLeft:
|
|
91
|
+
width: 220,
|
|
92
|
+
marginLeft: 24
|
|
92
93
|
},
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
}
|
|
94
|
+
dangerouslySetInnerHTML: {
|
|
95
|
+
__html: createPassportSvg({
|
|
96
|
+
title: 'Owner',
|
|
97
|
+
issuer: getDisplayName(blocklet),
|
|
98
|
+
issuerDid: blocklet.appDid,
|
|
99
|
+
ownerName: 'Your Name',
|
|
100
|
+
ownerDid: blocklet.appDid,
|
|
101
|
+
preferredColor: color
|
|
102
|
+
})
|
|
103
|
+
}
|
|
103
104
|
})]
|
|
104
105
|
})
|
|
105
106
|
});
|
package/es/util/spaces.js
CHANGED
|
@@ -148,4 +148,13 @@ export function getSpaceNftDisplayUrlFromEndpoint(endpoint) {
|
|
|
148
148
|
const strArray = endpoint.replace(/\/$/, '').split('/');
|
|
149
149
|
const spaceDid = strArray.at(-4);
|
|
150
150
|
return joinUrl(prefix, `/api/space/nft/display?spaceDid=${spaceDid}`);
|
|
151
|
-
}
|
|
151
|
+
}
|
|
152
|
+
|
|
153
|
+
/**
|
|
154
|
+
* @description
|
|
155
|
+
* @param {import('@abtnode/client').BlockletState} blocklet
|
|
156
|
+
* @return {string}
|
|
157
|
+
*/
|
|
158
|
+
export const getDIDSpaceEndpoint = blocklet => {
|
|
159
|
+
return blocklet?.configs?.find(item => item.key === BLOCKLET_CONFIGURABLE_KEY.BLOCKLET_APP_SPACE_ENDPOINT)?.value || null;
|
|
160
|
+
};
|
|
@@ -64,6 +64,11 @@ const getDIDSpaceCapability = meta => {
|
|
|
64
64
|
var _meta$capabilities;
|
|
65
65
|
return meta === null || meta === void 0 ? void 0 : (_meta$capabilities = meta.capabilities) === null || _meta$capabilities === void 0 ? void 0 : _meta$capabilities.didSpace;
|
|
66
66
|
};
|
|
67
|
+
/**
|
|
68
|
+
* @description
|
|
69
|
+
* @param {import('@abtnode/client').BlockletState} blocklet
|
|
70
|
+
* @return {string}
|
|
71
|
+
*/
|
|
67
72
|
const getDIDSpaceEndpoint = blocklet => {
|
|
68
73
|
var _blocklet$configs, _blocklet$configs$fin;
|
|
69
74
|
return (blocklet === null || blocklet === void 0 ? void 0 : (_blocklet$configs = blocklet.configs) === null || _blocklet$configs === void 0 ? void 0 : (_blocklet$configs$fin = _blocklet$configs.find(item => item.key === _constant.BLOCKLET_CONFIGURABLE_KEY.BLOCKLET_APP_SPACE_ENDPOINT)) === null || _blocklet$configs$fin === void 0 ? void 0 : _blocklet$configs$fin.value) || null;
|
|
@@ -1112,9 +1117,9 @@ AddComponent.defaultProps = {
|
|
|
1112
1117
|
};
|
|
1113
1118
|
|
|
1114
1119
|
// FIXME: @zhanghan 下面代码中的 header:empty 用于修复 e2e-test 中的问题 core/webapp/cypress/e2e/3-blocklet-lifecycle.cy.js L70
|
|
1115
|
-
const DialogWrapper = (0, _styled.default)(_Dialog.default)(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n .MuiDialogContent-root {\n padding-left: 0;\n padding-right: 0;\n padding-bottom: 0;\n }\n .MuiDialogActions-root {\n padding: 16px 24px;\n }\n header:empty {\n display: none;\n }\n"])));
|
|
1120
|
+
const DialogWrapper = (0, _styled.default)(_Dialog.default)(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n .MuiDialogContent-root {\n padding-left: 0;\n padding-right: 0;\n padding-bottom: 0;\n }\n\n .MuiDialogActions-root {\n padding: 16px 24px;\n }\n header:empty {\n display: none;\n }\n"])));
|
|
1116
1121
|
const TypographyWrapper = (0, _styled.default)(_Typography.default)(_templateObject2 || (_templateObject2 = _taggedTemplateLiteral(["\n width: 100%;\n height: 100%;\n"])));
|
|
1117
|
-
const RightContent = _styled.default.div(_templateObject3 || (_templateObject3 = _taggedTemplateLiteral(["\n
|
|
1122
|
+
const RightContent = _styled.default.div(_templateObject3 || (_templateObject3 = _taggedTemplateLiteral(["\n width: 100%;\n height: 100%;\n display: flex;\n flex-direction: column;\n justify-content: flex-start;\n align-items: flex-start;\n\n .bottom-button {\n min-width: 200px;\n }\n\n // blocklet-select-side\n aside {\n width: 140px;\n }\n"])));
|
|
1118
1123
|
const isMobileDialogContent = props => {
|
|
1119
1124
|
if (props.isMobile) {
|
|
1120
1125
|
return "\n height: calc(100vh - 56px - 64px - 48px);\n ";
|
|
@@ -1127,7 +1132,7 @@ const DialogContentWrapper = (0, _styled.default)(_DialogContentText.default)(_t
|
|
|
1127
1132
|
} = _ref9;
|
|
1128
1133
|
// mobile extra style
|
|
1129
1134
|
if (className === 'mobileStyle') {
|
|
1130
|
-
return "\n & > div{\n height: 100%;\n }\n .root-header {\n .app-name-content {\n display: none;\n }\n }\n\n // content-panel\n .root-header + div{\n padding-top: 0;\n position: relative;\n & > div {\n padding-top: 0;\n }\n }\n\n ";
|
|
1135
|
+
return "\n height: 100%;\n\n & > div{\n height: 100%;\n }\n .root-header {\n .app-name-content {\n display: none;\n }\n }\n\n\n\n // content-panel\n .root-header + div{\n padding-top: 0;\n position: relative;\n & > div {\n padding-top: 0;\n }\n }\n\n header + div {\n padding-top: 0;\n }\n\n header {\n .header-title {\n margin-left: 0;\n }\n\n .header-title-name {\n max-width: 100% !important;\n }\n }\n ";
|
|
1131
1136
|
}
|
|
1132
1137
|
return "\n height: 72vh;\n position: relative;\n .root-header {\n z-index: auto !important;\n position: fixed !important;\n }\n & > div {\n height: 100%;\n width: 100%;\n max-width: 100%;\n & > div {\n max-height: unset !important;\n max-width: 100%;\n & > div {\n // left-panel\n &:first-child {\n padding-top: 0;\n // padding-left: 0;\n width: 25%;\n min-width: 240px;\n & > div:first-child {\n display: none;\n }\n // step\n & > div:last-child {\n // margin-top: 32px;\n margin-top: 0;\n }\n }\n // right-panel\n &:last-child {\n padding-top: 0;\n padding-right: 24px;\n overflow-y: auto;\n .app-content {\n padding: 0 0 24px 0;\n }\n .button-container {\n padding-right: 0;\n }\n }\n }\n }\n }\n\n ";
|
|
1133
1138
|
}, props => isMobileDialogContent(props), props => isMobileDialogContent(props));
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.default = Selected;
|
|
7
|
+
var _material = require("@mui/material");
|
|
8
|
+
var _Check = _interopRequireDefault(require("@mui/icons-material/Check"));
|
|
9
|
+
var _propTypes = require("prop-types");
|
|
10
|
+
var _styled = _interopRequireDefault(require("@emotion/styled"));
|
|
11
|
+
var _jsxRuntime = require("react/jsx-runtime");
|
|
12
|
+
var _templateObject;
|
|
13
|
+
/* eslint-disable react/jsx-one-expression-per-line */
|
|
14
|
+
/**
|
|
15
|
+
*
|
|
16
|
+
*
|
|
17
|
+
* @export
|
|
18
|
+
* @param {{
|
|
19
|
+
* children: React.ReactNode,
|
|
20
|
+
* selected?: false | true,
|
|
21
|
+
* }} { children, selected }
|
|
22
|
+
* @return {React.Component}
|
|
23
|
+
*/
|
|
24
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
25
|
+
function _taggedTemplateLiteral(strings, raw) { if (!raw) { raw = strings.slice(0); } return Object.freeze(Object.defineProperties(strings, { raw: { value: Object.freeze(raw) } })); }
|
|
26
|
+
function Selected(_ref) {
|
|
27
|
+
let {
|
|
28
|
+
children,
|
|
29
|
+
selected
|
|
30
|
+
} = _ref;
|
|
31
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsxs)(BoxContainer, {
|
|
32
|
+
children: [children, /*#__PURE__*/(0, _jsxRuntime.jsx)(_material.Box, {
|
|
33
|
+
className: "selected-container ".concat(selected ? 'selected' : ''),
|
|
34
|
+
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_Check.default, {
|
|
35
|
+
className: "selected-icon"
|
|
36
|
+
})
|
|
37
|
+
})]
|
|
38
|
+
});
|
|
39
|
+
}
|
|
40
|
+
const BoxContainer = (0, _styled.default)(_material.Box)(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n position: relative;\n\n .selected-container {\n display: flex !important;\n position: absolute;\n right: 0px;\n bottom: 0px;\n -webkit-box-pack: end;\n justify-content: flex-end;\n align-items: flex-end;\n width: 32px;\n height: 32px;\n border-radius: 0px 0px 8px;\n color: rgb(255, 255, 255);\n overflow: hidden;\n transition: all 0.4s ease 0s;\n\n &::after {\n position: absolute;\n z-index: 0;\n left: 60px;\n top: 60px;\n display: block;\n width: 0px;\n height: 0px;\n border-width: 16px;\n border-style: solid;\n border-color: transparent #1dc1c7 #1dc1c7 transparent;\n transition: all 0.1s ease 0s;\n content: '';\n }\n\n .selected-icon {\n visibility: hidden;\n width: 60%;\n height: 60%;\n position: relative;\n z-index: 2;\n margin: 0px 1px 1px 0px;\n font-size: 16px;\n transition: all 0.2s ease 0s;\n }\n }\n\n .selected-container.selected {\n &::after {\n left: 0px;\n top: 0px;\n }\n\n .selected-icon {\n visibility: visible;\n }\n }\n"])));
|
|
41
|
+
Selected.propTypes = {
|
|
42
|
+
children: _propTypes.node.isRequired,
|
|
43
|
+
selected: _propTypes.bool
|
|
44
|
+
};
|
|
45
|
+
Selected.defaultProps = {
|
|
46
|
+
selected: false
|
|
47
|
+
};
|
|
@@ -172,9 +172,14 @@ function SpacesBackupRecords(_ref2) {
|
|
|
172
172
|
var _backups$index;
|
|
173
173
|
const {
|
|
174
174
|
status,
|
|
175
|
-
message
|
|
175
|
+
message,
|
|
176
|
+
createdAt
|
|
176
177
|
} = (_backups$index = backups === null || backups === void 0 ? void 0 : backups[index]) !== null && _backups$index !== void 0 ? _backups$index : {};
|
|
177
|
-
|
|
178
|
+
const timeoutError = (0, _lodash.isNull)(status) && (0, _dayjs.default)().diff(createdAt, 'hours') > 6;
|
|
179
|
+
const timeoutErrorMessage = timeoutError && t('common.timeoutError');
|
|
180
|
+
const pending = (0, _lodash.isNull)(status) && !timeoutError;
|
|
181
|
+
const success = status === 0 && !timeoutError;
|
|
182
|
+
if (pending) {
|
|
178
183
|
return /*#__PURE__*/(0, _jsxRuntime.jsxs)(_material.Typography, {
|
|
179
184
|
display: "inline-flex",
|
|
180
185
|
alignItems: "center",
|
|
@@ -187,10 +192,13 @@ function SpacesBackupRecords(_ref2) {
|
|
|
187
192
|
}), t('common.progress')]
|
|
188
193
|
});
|
|
189
194
|
}
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
195
|
+
if (success) {
|
|
196
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsx)(_Tag.default, {
|
|
197
|
+
type: "success",
|
|
198
|
+
children: t('common.succeeded')
|
|
199
|
+
});
|
|
200
|
+
}
|
|
201
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsxs)(_material.Box, {
|
|
194
202
|
display: "inline-flex",
|
|
195
203
|
alignItems: "center",
|
|
196
204
|
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_Tag.default, {
|
|
@@ -202,7 +210,7 @@ function SpacesBackupRecords(_ref2) {
|
|
|
202
210
|
alignItems: 'center',
|
|
203
211
|
flexShrink: 0
|
|
204
212
|
},
|
|
205
|
-
title: message,
|
|
213
|
+
title: message || timeoutErrorMessage,
|
|
206
214
|
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_material.Icon, {
|
|
207
215
|
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_HelpOutline.default, {
|
|
208
216
|
style: {
|
|
@@ -214,7 +222,6 @@ function SpacesBackupRecords(_ref2) {
|
|
|
214
222
|
})
|
|
215
223
|
})]
|
|
216
224
|
});
|
|
217
|
-
return node;
|
|
218
225
|
}
|
|
219
226
|
}
|
|
220
227
|
}];
|
|
@@ -10,7 +10,6 @@ var _Button = _interopRequireDefault(require("@arcblock/ux/lib/Button"));
|
|
|
10
10
|
var _context = require("@arcblock/ux/lib/Locale/context");
|
|
11
11
|
var _Connect = _interopRequireDefault(require("@arcblock/did-connect/lib/Connect"));
|
|
12
12
|
var _urlJoin = _interopRequireDefault(require("url-join"));
|
|
13
|
-
var _isUrl = _interopRequireDefault(require("is-url"));
|
|
14
13
|
var _Toast = _interopRequireDefault(require("@arcblock/ux/lib/Toast"));
|
|
15
14
|
var _constant = require("@blocklet/constant");
|
|
16
15
|
var _SplitButton = _interopRequireDefault(require("@arcblock/ux/lib/SplitButton"));
|
|
@@ -155,12 +154,12 @@ function ConnectTo(_ref) {
|
|
|
155
154
|
name,
|
|
156
155
|
did
|
|
157
156
|
} = _ref2;
|
|
158
|
-
let
|
|
159
|
-
if (!
|
|
157
|
+
let normalizeUrl = endpoint === null || endpoint === void 0 ? void 0 : (_endpoint$replace = endpoint.replace(/\/api\/.+/, '')) === null || _endpoint$replace === void 0 ? void 0 : (_endpoint$replace$tri = _endpoint$replace.trim()) === null || _endpoint$replace$tri === void 0 ? void 0 : _endpoint$replace$tri.replace(/\/$/, '');
|
|
158
|
+
if (!normalizeUrl.startsWith('http')) {
|
|
160
159
|
// eslint-disable-next-line no-param-reassign
|
|
161
|
-
|
|
160
|
+
normalizeUrl = "https://".concat(normalizeUrl);
|
|
162
161
|
}
|
|
163
|
-
if (!(0,
|
|
162
|
+
if (!(await (0, _spaces.isValidSpaceGatewayUrl)(normalizeUrl))) {
|
|
164
163
|
_Toast.default.error(t('storage.spaces.gateway.add.invalidUrl'));
|
|
165
164
|
return;
|
|
166
165
|
}
|
|
@@ -174,7 +173,7 @@ function ConnectTo(_ref) {
|
|
|
174
173
|
const spaceGateway = {
|
|
175
174
|
name,
|
|
176
175
|
did,
|
|
177
|
-
url:
|
|
176
|
+
url: normalizeUrl,
|
|
178
177
|
endpoint
|
|
179
178
|
};
|
|
180
179
|
await nodeApi.addBlockletSpaceGateway({
|
package/lib/card-selector.js
CHANGED
|
@@ -9,6 +9,7 @@ var _styled = _interopRequireDefault(require("@emotion/styled"));
|
|
|
9
9
|
var _propTypes = _interopRequireDefault(require("prop-types"));
|
|
10
10
|
var _jsxRuntime = require("react/jsx-runtime");
|
|
11
11
|
var _templateObject;
|
|
12
|
+
/* eslint-disable react/no-danger */
|
|
12
13
|
/* eslint-disable jsx-a11y/alt-text */
|
|
13
14
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
14
15
|
function _taggedTemplateLiteral(strings, raw) { if (!raw) { raw = strings.slice(0); } return Object.freeze(Object.defineProperties(strings, { raw: { value: Object.freeze(raw) } })); }
|
|
@@ -23,7 +24,7 @@ function CardSelector(_ref) {
|
|
|
23
24
|
} = _ref;
|
|
24
25
|
const [selectedId, setSelectedId] = (0, _react.useState)(0);
|
|
25
26
|
const [translateX, setTranslateX] = (0, _react.useState)(0);
|
|
26
|
-
const
|
|
27
|
+
const outerCon = (0, _react.useRef)(null);
|
|
27
28
|
|
|
28
29
|
// 选择卡片
|
|
29
30
|
const selectedItem = i => {
|
|
@@ -33,14 +34,14 @@ function CardSelector(_ref) {
|
|
|
33
34
|
setSelectedId(i);
|
|
34
35
|
|
|
35
36
|
// 外部容器大小
|
|
36
|
-
const outerWidth =
|
|
37
|
+
const outerWidth = outerCon.current.clientWidth;
|
|
37
38
|
setTranslateX(i * (width + cardSpace) - (outerWidth - width) / 2 + cardSpace * 0.5);
|
|
38
39
|
onSelect(i);
|
|
39
40
|
};
|
|
40
41
|
(0, _react.useEffect)(() => {
|
|
41
42
|
selectedItem(defaultIndex);
|
|
42
43
|
const func = e => e.preventDefault();
|
|
43
|
-
|
|
44
|
+
outerCon.current.addEventListener('touchmove', func, {
|
|
44
45
|
passive: false
|
|
45
46
|
});
|
|
46
47
|
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
@@ -62,7 +63,7 @@ function CardSelector(_ref) {
|
|
|
62
63
|
}
|
|
63
64
|
};
|
|
64
65
|
return /*#__PURE__*/(0, _jsxRuntime.jsx)(Container, {
|
|
65
|
-
ref:
|
|
66
|
+
ref: outerCon,
|
|
66
67
|
onTouchStart: touchstart,
|
|
67
68
|
onTouchEnd: touchend,
|
|
68
69
|
children: /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
|
|
@@ -70,28 +71,27 @@ function CardSelector(_ref) {
|
|
|
70
71
|
style: {
|
|
71
72
|
transform: "translate(".concat(-translateX, "px, 0)")
|
|
72
73
|
},
|
|
73
|
-
children: list.map((
|
|
74
|
+
children: list.map((x, i) => {
|
|
74
75
|
return /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
|
|
75
76
|
className: "card-item ".concat(i === selectedId ? 'selected' : ''),
|
|
76
77
|
style: {
|
|
77
78
|
width,
|
|
78
79
|
height,
|
|
79
80
|
margin: cardSpace / 2
|
|
80
|
-
}
|
|
81
|
-
// eslint-disable-next-line react/no-array-index-key
|
|
82
|
-
,
|
|
83
|
-
|
|
81
|
+
},
|
|
84
82
|
onClick: () => selectedItem(i),
|
|
85
|
-
children: /*#__PURE__*/(0, _jsxRuntime.jsx)("
|
|
86
|
-
|
|
87
|
-
|
|
83
|
+
children: /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
|
|
84
|
+
className: "card-content",
|
|
85
|
+
dangerouslySetInnerHTML: {
|
|
86
|
+
__html: x.src
|
|
87
|
+
}
|
|
88
88
|
})
|
|
89
|
-
},
|
|
89
|
+
}, x.id);
|
|
90
90
|
})
|
|
91
91
|
})
|
|
92
92
|
});
|
|
93
93
|
}
|
|
94
|
-
const Container = _styled.default.div(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n overflow: hidden;\n mask-image: linear-gradient(to left, transparent, black 3%, black 97%, transparent);\n overflow: hidden;\n .card-container {\n display: flex;\n white-space: nowrap;\n width: max-content;\n transition: all ease 0.3s;\n }\n .card-item {\n display: inline-flex;\n justify-content: center;\n align-items: center;\n flex-shrink: 0;\n cursor: pointer;\n\n
|
|
94
|
+
const Container = _styled.default.div(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n overflow: hidden;\n mask-image: linear-gradient(to left, transparent, black 3%, black 97%, transparent);\n overflow: hidden;\n .card-container {\n display: flex;\n white-space: nowrap;\n width: max-content;\n transition: all ease 0.3s;\n }\n .card-item {\n display: inline-flex;\n justify-content: center;\n align-items: center;\n flex-shrink: 0;\n cursor: pointer;\n\n .card-content {\n pointer-events: none;\n max-width: 100%;\n max-height: 100%;\n width: auto;\n height: auto;\n outline: #526ded solid 0;\n transition: all ease 0.2s;\n box-shadow: rgba(0, 0, 0, 0.2) 0 0 10px;\n }\n &.selected {\n cursor: default;\n .card-content {\n outline: #526ded solid 5px;\n }\n }\n }\n"])));
|
|
95
95
|
CardSelector.propTypes = {
|
|
96
96
|
list: _propTypes.default.array,
|
|
97
97
|
width: _propTypes.default.number,
|
|
@@ -12,6 +12,7 @@ var _Dialog = _interopRequireDefault(require("@arcblock/ux/lib/Dialog"));
|
|
|
12
12
|
var _iconsMaterial = require("@mui/icons-material");
|
|
13
13
|
var _jsxRuntime = require("react/jsx-runtime");
|
|
14
14
|
var _templateObject;
|
|
15
|
+
/* eslint-disable react/no-danger */
|
|
15
16
|
/* eslint-disable jsx-a11y/alt-text */
|
|
16
17
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
17
18
|
function _taggedTemplateLiteral(strings, raw) { if (!raw) { raw = strings.slice(0); } return Object.freeze(Object.defineProperties(strings, { raw: { value: Object.freeze(raw) } })); }
|
|
@@ -38,7 +39,6 @@ function InvitationPassport(_ref) {
|
|
|
38
39
|
// can't get avatar, cause user is not login
|
|
39
40
|
// ownerAvatarUrl: user.avatar,
|
|
40
41
|
ownerDid: invitation.info.appDid,
|
|
41
|
-
isDataUrl: true,
|
|
42
42
|
preferredColor: invitation.info.passportColor || passportColor
|
|
43
43
|
});
|
|
44
44
|
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
@@ -54,10 +54,11 @@ function InvitationPassport(_ref) {
|
|
|
54
54
|
children: /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
|
|
55
55
|
className: "invite-passport__card",
|
|
56
56
|
onClick: onViewPermission,
|
|
57
|
-
children: /*#__PURE__*/(0, _jsxRuntime.jsx)("
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
57
|
+
children: /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
|
|
58
|
+
className: "invite-passport__cover",
|
|
59
|
+
dangerouslySetInnerHTML: {
|
|
60
|
+
__html: display
|
|
61
|
+
}
|
|
61
62
|
})
|
|
62
63
|
})
|
|
63
64
|
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(_Dialog.default, {
|
|
@@ -106,7 +107,7 @@ InvitationPassport.propTypes = {
|
|
|
106
107
|
InvitationPassport.defaultProps = {
|
|
107
108
|
passportColor: 'auto'
|
|
108
109
|
};
|
|
109
|
-
const Root = _styled.default.div(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n display: flex;\n max-width: 350px;\n margin: 30px auto;\n .invite-passport__card {\n margin: 0 auto;\n width: 228px;\n height: 258px;\n flex-shrink: 0;\n .invite-passport__cover {\n width: 100%;\n height: 100%;\n }\n }\n .invite-passport__content {\n flex: 1;\n display: flex;\n flex-direction: column;\n }\n .invite-passport__title {\n font-weight: 700;\n font-size: 16px;\n }\n .invite-passport__description {\n overflow: hidden;\n text-overflow: ellipsis;\n display: -webkit-box;\n -webkit-line-clamp: 2;\n -webkit-box-orient: vertical;\n height: 3em;\n color: #999;\n font-size: 14px;\n }\n .invite-passport__view-permission {\n cursor: pointer;\n font-size: 14px;\n font-weight: 600;\n line-height: 18px;\n color: ", ";\n }\n"])), _ref2 => {
|
|
110
|
+
const Root = _styled.default.div(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n display: flex;\n max-width: 350px;\n margin: 30px auto;\n .invite-passport__card {\n margin: 0 auto;\n width: 228px;\n height: 258px;\n flex-shrink: 0;\n .invite-passport__cover {\n cursor: pointer;\n width: 100%;\n height: 100%;\n }\n }\n .invite-passport__content {\n flex: 1;\n display: flex;\n flex-direction: column;\n }\n .invite-passport__title {\n font-weight: 700;\n font-size: 16px;\n }\n .invite-passport__description {\n overflow: hidden;\n text-overflow: ellipsis;\n display: -webkit-box;\n -webkit-line-clamp: 2;\n -webkit-box-orient: vertical;\n height: 3em;\n color: #999;\n font-size: 14px;\n }\n .invite-passport__view-permission {\n cursor: pointer;\n font-size: 14px;\n font-weight: 600;\n line-height: 18px;\n color: ", ";\n }\n"])), _ref2 => {
|
|
110
111
|
let {
|
|
111
112
|
theme
|
|
112
113
|
} = _ref2;
|
package/lib/locales/en.js
CHANGED
|
@@ -162,7 +162,7 @@ module.exports = {
|
|
|
162
162
|
expires: 'Expires',
|
|
163
163
|
export: 'Export',
|
|
164
164
|
externalIp: 'External IP',
|
|
165
|
-
failed: '
|
|
165
|
+
failed: 'Failed',
|
|
166
166
|
filter: 'Log Filter',
|
|
167
167
|
fingerprint: 'Fingerprint',
|
|
168
168
|
finish: 'Finish',
|
|
@@ -312,7 +312,9 @@ module.exports = {
|
|
|
312
312
|
manual: 'Manual',
|
|
313
313
|
progress: 'In progress',
|
|
314
314
|
startTime: 'Start time',
|
|
315
|
-
endTime: 'End time'
|
|
315
|
+
endTime: 'End time',
|
|
316
|
+
selected: 'Selected',
|
|
317
|
+
timeoutError: 'Timeout error'
|
|
316
318
|
},
|
|
317
319
|
blocklet: {
|
|
318
320
|
external: 'External',
|
|
@@ -1356,6 +1358,7 @@ module.exports = {
|
|
|
1356
1358
|
tag: 'Connected'
|
|
1357
1359
|
},
|
|
1358
1360
|
connectedWithName: 'You have successfully connected to {name}',
|
|
1361
|
+
addedWithName: 'You have successfully added {name}',
|
|
1359
1362
|
connects: 'Connect',
|
|
1360
1363
|
reconnect: 'Reconnect',
|
|
1361
1364
|
addressCannotEmpty: 'Address cannot be empty',
|
|
@@ -1391,7 +1394,8 @@ module.exports = {
|
|
|
1391
1394
|
title: 'Delete gateway',
|
|
1392
1395
|
succeeded: 'Delete DID Spaces{name} Success',
|
|
1393
1396
|
failed: 'Delete gateway failed',
|
|
1394
|
-
failedForConnected: 'Unable to delete a connected DID Spaces'
|
|
1397
|
+
failedForConnected: 'Unable to delete a connected DID Spaces',
|
|
1398
|
+
failedForSelected: 'Unable to delete a selected DID Spaces'
|
|
1395
1399
|
},
|
|
1396
1400
|
connect: {
|
|
1397
1401
|
title: 'Connect DID Spaces',
|
|
@@ -1421,14 +1425,18 @@ module.exports = {
|
|
|
1421
1425
|
},
|
|
1422
1426
|
notYet: "You don't have a backup in progress yet...",
|
|
1423
1427
|
connect: {
|
|
1424
|
-
now: 'Connect',
|
|
1428
|
+
now: 'Connect now',
|
|
1425
1429
|
title: 'Connect DID Spaces',
|
|
1426
1430
|
provider: 'Provide your DID Spaces to start backups',
|
|
1427
|
-
|
|
1431
|
+
providerForStorage: 'Please connect your DID Spaces',
|
|
1432
|
+
useWallet: 'Connect with DID Wallet',
|
|
1433
|
+
useWalletReconnect: 'Reconnect with DID Wallet',
|
|
1428
1434
|
useSpaceGateway: 'Connect using the DID Spaces gateway',
|
|
1435
|
+
useSpaceGatewayReconnect: 'Reconnect using the DID Spaces gateway',
|
|
1429
1436
|
switchToSpace: 'Switch to Space',
|
|
1430
1437
|
switchToSpaceSucceeded: 'Switched to Space{name}',
|
|
1431
|
-
succeeded: 'You have successfully connected to DID Spaces'
|
|
1438
|
+
succeeded: 'You have successfully connected to DID Spaces',
|
|
1439
|
+
disconnect: 'disconnect'
|
|
1432
1440
|
},
|
|
1433
1441
|
disconnected: {
|
|
1434
1442
|
tag: 'Disconnected',
|
package/lib/locales/zh.js
CHANGED
|
@@ -317,7 +317,9 @@ module.exports = {
|
|
|
317
317
|
manual: '手动',
|
|
318
318
|
progress: '进行中',
|
|
319
319
|
startTime: '开始时间',
|
|
320
|
-
endTime: '结束时间'
|
|
320
|
+
endTime: '结束时间',
|
|
321
|
+
selected: '已选中',
|
|
322
|
+
timeoutError: '超时错误'
|
|
321
323
|
},
|
|
322
324
|
blocklet: {
|
|
323
325
|
external: '外部',
|
|
@@ -1360,6 +1362,7 @@ module.exports = {
|
|
|
1360
1362
|
tag: '已连接'
|
|
1361
1363
|
},
|
|
1362
1364
|
connectedWithName: '你已成功连接至 {name}',
|
|
1365
|
+
addedWithName: '你已成功添加 {name}',
|
|
1363
1366
|
connects: '连接',
|
|
1364
1367
|
reconnect: '重新连接',
|
|
1365
1368
|
addressCannotEmpty: '地址不能为空',
|
|
@@ -1394,7 +1397,8 @@ module.exports = {
|
|
|
1394
1397
|
title: '删除 DID Spaces',
|
|
1395
1398
|
succeeded: '删除 DID Spaces{name} 成功',
|
|
1396
1399
|
failed: '删除 DID Spaces 失败',
|
|
1397
|
-
failedForConnected: '无法删除一个已连接的 DID Spaces'
|
|
1400
|
+
failedForConnected: '无法删除一个已连接的 DID Spaces',
|
|
1401
|
+
failedForSelected: '无法删除一个已选中的 DID Spaces'
|
|
1398
1402
|
},
|
|
1399
1403
|
connect: {
|
|
1400
1404
|
title: '连接到 DID Spaces',
|
|
@@ -1427,11 +1431,15 @@ module.exports = {
|
|
|
1427
1431
|
now: '立即连接',
|
|
1428
1432
|
title: '使用 DID Wallet 连接',
|
|
1429
1433
|
provider: '提供您的 DID Spaces 开始备份',
|
|
1434
|
+
providerForStorage: '请连接您的 DID Spaces',
|
|
1430
1435
|
useWallet: '使用 DID Wallet 连接',
|
|
1436
|
+
useWalletReconnect: '使用 DID Wallet 重新连接',
|
|
1431
1437
|
useSpaceGateway: '使用 DID Spaces 网关连接',
|
|
1438
|
+
useSpaceGatewayReconnect: '使用 DID Spaces 网关重新连接',
|
|
1432
1439
|
switchToSpace: '切换至 Space',
|
|
1433
1440
|
switchToSpaceSucceeded: '已切换至 Space{name}',
|
|
1434
|
-
succeeded: '你已成功连接至 DID Spaces'
|
|
1441
|
+
succeeded: '你已成功连接至 DID Spaces',
|
|
1442
|
+
disconnect: '断开连接'
|
|
1435
1443
|
},
|
|
1436
1444
|
disconnected: {
|
|
1437
1445
|
tag: '连接已断开',
|
package/lib/lost-passport.js
CHANGED
|
@@ -218,10 +218,10 @@ function LostPassport(_ref2) {
|
|
|
218
218
|
ownerDid: user.did,
|
|
219
219
|
ownerName: user.fullName,
|
|
220
220
|
ownerAvatarUrl: user.avatar,
|
|
221
|
-
isDataUrl: true,
|
|
222
221
|
preferredColor: passportColor || 'auto'
|
|
223
222
|
}),
|
|
224
|
-
name: x.title
|
|
223
|
+
name: x.title,
|
|
224
|
+
id: x.id
|
|
225
225
|
};
|
|
226
226
|
}),
|
|
227
227
|
onSelect: index => handleChange({
|
|
@@ -13,6 +13,7 @@ var _colorInput = _interopRequireDefault(require("./color-input"));
|
|
|
13
13
|
var _commonPropTypes = _interopRequireDefault(require("./common-prop-types"));
|
|
14
14
|
var _jsxRuntime = require("react/jsx-runtime");
|
|
15
15
|
const _excluded = ["editing", "value", "onChange", "componentProps"];
|
|
16
|
+
/* eslint-disable react/no-danger */
|
|
16
17
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
17
18
|
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
|
18
19
|
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
|
|
@@ -36,21 +37,21 @@ function PassportInput(_ref) {
|
|
|
36
37
|
return /*#__PURE__*/(0, _jsxRuntime.jsxs)(_Box.default, {
|
|
37
38
|
display: "flex",
|
|
38
39
|
alignItems: "center",
|
|
39
|
-
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)("
|
|
40
|
+
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
|
|
40
41
|
style: {
|
|
41
42
|
width: 96,
|
|
42
43
|
marginRight: 12
|
|
43
44
|
},
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
}
|
|
45
|
+
dangerouslySetInnerHTML: {
|
|
46
|
+
__html: (0, _createPassportSvg.default)({
|
|
47
|
+
title: 'Owner',
|
|
48
|
+
issuer: (0, _util.getDisplayName)(blocklet),
|
|
49
|
+
issuerDid: blocklet.appDid,
|
|
50
|
+
ownerName: 'Your Name',
|
|
51
|
+
ownerDid: blocklet.appDid,
|
|
52
|
+
preferredColor: value || 'auto'
|
|
53
|
+
})
|
|
54
|
+
}
|
|
54
55
|
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(_colorInput.default, _objectSpread(_objectSpread({}, rest), {}, {
|
|
55
56
|
editing: editing,
|
|
56
57
|
value: editing ? color : value,
|
|
@@ -27,7 +27,7 @@ function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (O
|
|
|
27
27
|
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
|
|
28
28
|
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; }
|
|
29
29
|
function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return typeof key === "symbol" ? key : String(key); }
|
|
30
|
-
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); }
|
|
30
|
+
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); } /* eslint-disable react/no-danger */
|
|
31
31
|
function PassportColor(_ref) {
|
|
32
32
|
let {
|
|
33
33
|
onCancel,
|
|
@@ -96,21 +96,21 @@ function PassportColor(_ref) {
|
|
|
96
96
|
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_reactColor.ChromePicker, {
|
|
97
97
|
color: color,
|
|
98
98
|
onChange: c => setColor(c.hex)
|
|
99
|
-
}), /*#__PURE__*/(0, _jsxRuntime.jsx)("
|
|
99
|
+
}), /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
|
|
100
100
|
style: {
|
|
101
|
-
width:
|
|
102
|
-
marginLeft:
|
|
101
|
+
width: 220,
|
|
102
|
+
marginLeft: 24
|
|
103
103
|
},
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
}
|
|
104
|
+
dangerouslySetInnerHTML: {
|
|
105
|
+
__html: (0, _createPassportSvg.default)({
|
|
106
|
+
title: 'Owner',
|
|
107
|
+
issuer: (0, _util.getDisplayName)(blocklet),
|
|
108
|
+
issuerDid: blocklet.appDid,
|
|
109
|
+
ownerName: 'Your Name',
|
|
110
|
+
ownerDid: blocklet.appDid,
|
|
111
|
+
preferredColor: color
|
|
112
|
+
})
|
|
113
|
+
}
|
|
114
114
|
})]
|
|
115
115
|
})
|
|
116
116
|
});
|
package/lib/util/spaces.js
CHANGED
|
@@ -5,6 +5,7 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
5
5
|
});
|
|
6
6
|
exports.getBackupFilesUrlFromEndpoint = getBackupFilesUrlFromEndpoint;
|
|
7
7
|
exports.getDIDSpaceDidFromEndpoint = getDIDSpaceDidFromEndpoint;
|
|
8
|
+
exports.getDIDSpaceEndpoint = void 0;
|
|
8
9
|
exports.getDIDSpaceUrlFromEndpoint = getDIDSpaceUrlFromEndpoint;
|
|
9
10
|
exports.getSpaceBackupEndpoint = getSpaceBackupEndpoint;
|
|
10
11
|
exports.getSpaceGatewayFromEndpoint = getSpaceGatewayFromEndpoint;
|
|
@@ -163,4 +164,15 @@ function getSpaceNftDisplayUrlFromEndpoint(endpoint) {
|
|
|
163
164
|
const strArray = endpoint.replace(/\/$/, '').split('/');
|
|
164
165
|
const spaceDid = strArray.at(-4);
|
|
165
166
|
return joinUrl(prefix, "/api/space/nft/display?spaceDid=".concat(spaceDid));
|
|
166
|
-
}
|
|
167
|
+
}
|
|
168
|
+
|
|
169
|
+
/**
|
|
170
|
+
* @description
|
|
171
|
+
* @param {import('@abtnode/client').BlockletState} blocklet
|
|
172
|
+
* @return {string}
|
|
173
|
+
*/
|
|
174
|
+
const getDIDSpaceEndpoint = blocklet => {
|
|
175
|
+
var _blocklet$configs, _blocklet$configs$fin;
|
|
176
|
+
return (blocklet === null || blocklet === void 0 ? void 0 : (_blocklet$configs = blocklet.configs) === null || _blocklet$configs === void 0 ? void 0 : (_blocklet$configs$fin = _blocklet$configs.find(item => item.key === _constant.BLOCKLET_CONFIGURABLE_KEY.BLOCKLET_APP_SPACE_ENDPOINT)) === null || _blocklet$configs$fin === void 0 ? void 0 : _blocklet$configs$fin.value) || null;
|
|
177
|
+
};
|
|
178
|
+
exports.getDIDSpaceEndpoint = getDIDSpaceEndpoint;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@abtnode/ux",
|
|
3
|
-
"version": "1.16.14-beta-
|
|
3
|
+
"version": "1.16.14-beta-7423f9ef",
|
|
4
4
|
"description": "UX components shared across abtnode packages",
|
|
5
5
|
"publishConfig": {
|
|
6
6
|
"access": "public"
|
|
@@ -19,7 +19,7 @@
|
|
|
19
19
|
"build:lib": "babel src --out-dir lib --copy-files",
|
|
20
20
|
"build:es": "babel --config-file ./babel.config.es.js src --out-dir es --copy-files",
|
|
21
21
|
"autoexports": "node tools/auto-exports.js",
|
|
22
|
-
"watch": "
|
|
22
|
+
"watch": "npm run build:es -- -w",
|
|
23
23
|
"coverage": "npm run test -- --coverage",
|
|
24
24
|
"test": "node tools/jest.js"
|
|
25
25
|
},
|
|
@@ -27,23 +27,23 @@
|
|
|
27
27
|
"author": "linchen <linchen1987@foxmail.com> (http://github.com/linchen1987)",
|
|
28
28
|
"license": "Apache-2.0",
|
|
29
29
|
"dependencies": {
|
|
30
|
-
"@abtnode/auth": "1.16.14-beta-
|
|
31
|
-
"@abtnode/constant": "1.16.14-beta-
|
|
32
|
-
"@abtnode/util": "1.16.14-beta-
|
|
30
|
+
"@abtnode/auth": "1.16.14-beta-7423f9ef",
|
|
31
|
+
"@abtnode/constant": "1.16.14-beta-7423f9ef",
|
|
32
|
+
"@abtnode/util": "1.16.14-beta-7423f9ef",
|
|
33
33
|
"@ahooksjs/use-url-state": "^3.5.1",
|
|
34
|
-
"@arcblock/did": "^1.18.
|
|
35
|
-
"@arcblock/did-connect": "^2.7.
|
|
34
|
+
"@arcblock/did": "^1.18.89",
|
|
35
|
+
"@arcblock/did-connect": "^2.7.6",
|
|
36
36
|
"@arcblock/did-motif": "^1.1.13",
|
|
37
|
-
"@arcblock/icons": "^2.7.
|
|
38
|
-
"@arcblock/nft-display": "2.7.
|
|
39
|
-
"@arcblock/react-hooks": "^2.7.
|
|
40
|
-
"@arcblock/terminal": "^2.7.
|
|
41
|
-
"@arcblock/ux": "^2.7.
|
|
42
|
-
"@blocklet/constant": "1.16.14-beta-
|
|
43
|
-
"@blocklet/launcher-layout": "2.1.
|
|
37
|
+
"@arcblock/icons": "^2.7.6",
|
|
38
|
+
"@arcblock/nft-display": "2.7.6",
|
|
39
|
+
"@arcblock/react-hooks": "^2.7.6",
|
|
40
|
+
"@arcblock/terminal": "^2.7.6",
|
|
41
|
+
"@arcblock/ux": "^2.7.6",
|
|
42
|
+
"@blocklet/constant": "1.16.14-beta-7423f9ef",
|
|
43
|
+
"@blocklet/launcher-layout": "2.1.93",
|
|
44
44
|
"@blocklet/list": "^0.12.25",
|
|
45
|
-
"@blocklet/meta": "1.16.14-beta-
|
|
46
|
-
"@blocklet/ui-react": "^2.7.
|
|
45
|
+
"@blocklet/meta": "1.16.14-beta-7423f9ef",
|
|
46
|
+
"@blocklet/ui-react": "^2.7.6",
|
|
47
47
|
"@emotion/react": "^11.10.4",
|
|
48
48
|
"@emotion/styled": "^11.10.4",
|
|
49
49
|
"@iconify/react": "^4.0.0",
|
|
@@ -53,7 +53,7 @@
|
|
|
53
53
|
"@mui/material": "^5.10.8",
|
|
54
54
|
"@mui/styles": "^5.10.8",
|
|
55
55
|
"@mui/x-date-pickers": "^6.9.0",
|
|
56
|
-
"@ocap/client": "1.18.
|
|
56
|
+
"@ocap/client": "1.18.89",
|
|
57
57
|
"@uiw/react-markdown-preview": "4.0.6",
|
|
58
58
|
"ahooks": "^3.7.1",
|
|
59
59
|
"axios": "^0.27.2",
|
|
@@ -98,7 +98,7 @@
|
|
|
98
98
|
"babel-plugin-inline-react-svg": "^1.1.2",
|
|
99
99
|
"glob": "^10.3.3"
|
|
100
100
|
},
|
|
101
|
-
"gitHead": "
|
|
101
|
+
"gitHead": "b26614028fa0b33cf8b6781c3b571b2a6055dfdd",
|
|
102
102
|
"exports": {
|
|
103
103
|
".": {
|
|
104
104
|
"import": "./es/index.js",
|
|
@@ -116,6 +116,10 @@
|
|
|
116
116
|
"import": "./es/blocklet/component/index.js",
|
|
117
117
|
"require": "./lib/blocklet/component/index.js"
|
|
118
118
|
},
|
|
119
|
+
"./lib/blocklet/component/selected": {
|
|
120
|
+
"import": "./es/blocklet/component/selected/index.js",
|
|
121
|
+
"require": "./lib/blocklet/component/selected/index.js"
|
|
122
|
+
},
|
|
119
123
|
"./lib/blocklet/notification": {
|
|
120
124
|
"import": "./es/blocklet/notification/index.js",
|
|
121
125
|
"require": "./lib/blocklet/notification/index.js"
|