@abtnode/ux 1.16.0-beta-8ee536d7 → 1.16.0-beta-1d6c582e
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/blocklet/component/add.js +58 -1
- package/lib/blocklet/component/delete.js +1 -1
- package/lib/blocklet/component/space-connector.js +208 -0
- package/lib/blocklet/component/{space-gateway-selector.js → space-selector.js} +20 -10
- package/lib/blocklet/storage.js +11 -151
- package/lib/locales/en.js +3 -0
- package/lib/locales/zh.js +3 -0
- package/package.json +7 -7
|
@@ -25,6 +25,7 @@ var _context = require("@arcblock/ux/lib/Locale/context");
|
|
|
25
25
|
var _constant = require("@blocklet/constant");
|
|
26
26
|
var _launcherLayout = _interopRequireDefault(require("@blocklet/launcher-layout"));
|
|
27
27
|
var _step = require("@blocklet/launcher-layout/lib/context/step");
|
|
28
|
+
var _Box = _interopRequireDefault(require("@mui/material/Box"));
|
|
28
29
|
var _constant2 = require("@abtnode/constant");
|
|
29
30
|
var _Button = _interopRequireDefault(require("@arcblock/ux/lib/Button"));
|
|
30
31
|
var _Alert = _interopRequireDefault(require("@arcblock/ux/lib/Alert"));
|
|
@@ -43,6 +44,7 @@ var _agreement = _interopRequireDefault(require("../agreement"));
|
|
|
43
44
|
var _installFromUrl = _interopRequireDefault(require("../install-from-url"));
|
|
44
45
|
var _selectStore = _interopRequireDefault(require("./select-store"));
|
|
45
46
|
var _storeBlockletList = _interopRequireDefault(require("./store-blocklet-list"));
|
|
47
|
+
var _spaceConnector = _interopRequireDefault(require("./space-connector"));
|
|
46
48
|
var _jsxRuntime = require("react/jsx-runtime");
|
|
47
49
|
var _templateObject, _templateObject2, _templateObject3, _templateObject4, _templateObject5, _templateObject6, _templateObject7;
|
|
48
50
|
const _excluded = ["name", "validation"],
|
|
@@ -57,6 +59,14 @@ function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key i
|
|
|
57
59
|
function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return typeof key === "symbol" ? key : String(key); }
|
|
58
60
|
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); }
|
|
59
61
|
const requirePurchase = meta => meta.inStore && (0, _util.isFreeBlocklet)(meta) === false;
|
|
62
|
+
const getDIDSpaceCapability = meta => {
|
|
63
|
+
var _meta$capabilities;
|
|
64
|
+
return meta === null || meta === void 0 ? void 0 : (_meta$capabilities = meta.capabilities) === null || _meta$capabilities === void 0 ? void 0 : _meta$capabilities.didSpace;
|
|
65
|
+
};
|
|
66
|
+
const getDIDSpaceEndpoint = blocklet => {
|
|
67
|
+
var _blocklet$configs, _blocklet$configs$fin;
|
|
68
|
+
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;
|
|
69
|
+
};
|
|
60
70
|
const hasRequiredEnvironments = meta => (meta.environments || []).some(x => x.required);
|
|
61
71
|
const hasMissRequiredConfigs = (configsList, sharedValueMap) => {
|
|
62
72
|
return configsList === null || configsList === void 0 ? void 0 : configsList.some(item => {
|
|
@@ -161,6 +171,7 @@ function AddComponent(_ref2) {
|
|
|
161
171
|
hasEnvironmentsStep: false,
|
|
162
172
|
hasRequiredEnvironments: false,
|
|
163
173
|
requirePurchase: false,
|
|
174
|
+
didSpaceCapability: null,
|
|
164
175
|
installResultProps: {},
|
|
165
176
|
purchaseResultProps: {},
|
|
166
177
|
showFromUrlDialog: false
|
|
@@ -556,12 +567,16 @@ function AddComponent(_ref2) {
|
|
|
556
567
|
|
|
557
568
|
// eslint-disable-next-line no-shadow
|
|
558
569
|
const componentRequirePurchase = requirePurchase(component.current.meta);
|
|
570
|
+
const componentDIDSpaceCapability = getDIDSpaceCapability(component.current.meta);
|
|
571
|
+
const didSpaceEndpoint = getDIDSpaceEndpoint(blocklet);
|
|
559
572
|
updateParams(_objectSpread(_objectSpread({
|
|
560
573
|
bundleDid,
|
|
561
574
|
componentDid
|
|
562
575
|
}, doc), {}, {
|
|
563
576
|
hasRequiredEnvironments: hasRequiredEnvironments(component.current.meta),
|
|
564
|
-
requirePurchase: componentRequirePurchase
|
|
577
|
+
requirePurchase: componentRequirePurchase,
|
|
578
|
+
didSpaceCapability: componentDIDSpaceCapability,
|
|
579
|
+
didSpaceEndpoint
|
|
565
580
|
}));
|
|
566
581
|
if (isInit && componentRequirePurchase) {
|
|
567
582
|
onGeneratePurchaseData();
|
|
@@ -885,6 +900,48 @@ function AddComponent(_ref2) {
|
|
|
885
900
|
confirm: t('common.next'),
|
|
886
901
|
onCancel: _onCancel,
|
|
887
902
|
onConfirm: onNext
|
|
903
|
+
}, meta && (params === null || params === void 0 ? void 0 : params.didSpaceCapability) && {
|
|
904
|
+
key: 'didSpace',
|
|
905
|
+
name: /*#__PURE__*/(0, _jsxRuntime.jsxs)(_jsxRuntime.Fragment, {
|
|
906
|
+
children: [t('blocklet.component.didSpaceConfig'), " ", params.didSpaceCapability === 'required' && /*#__PURE__*/(0, _jsxRuntime.jsx)(_required.default, {})]
|
|
907
|
+
}),
|
|
908
|
+
disabled: params.didSpaceCapability === 'required' && !params.didSpaceEndpoint,
|
|
909
|
+
body: () => {
|
|
910
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsxs)(TypographyWrapper, {
|
|
911
|
+
component: "div",
|
|
912
|
+
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(PageHeaderWrapper, {
|
|
913
|
+
title: t('blocklet.component.didSpaceConfig'),
|
|
914
|
+
subTitle: t('blocklet.component.didSpaceConfigTip')
|
|
915
|
+
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(_Box.default, {
|
|
916
|
+
sx: {
|
|
917
|
+
mt: '36px',
|
|
918
|
+
'& > div': {
|
|
919
|
+
maxWidth: 'unset !important',
|
|
920
|
+
'& .MuiAutocomplete-root': {
|
|
921
|
+
maxWidth: 'unset !important'
|
|
922
|
+
}
|
|
923
|
+
}
|
|
924
|
+
},
|
|
925
|
+
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_spaceConnector.default, {
|
|
926
|
+
sx: {
|
|
927
|
+
'& .MuiFormHelperText-root': {
|
|
928
|
+
wordBreak: 'break-all'
|
|
929
|
+
}
|
|
930
|
+
},
|
|
931
|
+
helperText: params.didSpaceEndpoint && t('blocklet.component.didSpaceConnected', {
|
|
932
|
+
endpoint: params.didSpaceEndpoint
|
|
933
|
+
}),
|
|
934
|
+
onConnect: () => {
|
|
935
|
+
onNext();
|
|
936
|
+
}
|
|
937
|
+
})
|
|
938
|
+
})]
|
|
939
|
+
});
|
|
940
|
+
},
|
|
941
|
+
cancel: t('common.pre'),
|
|
942
|
+
confirm: t('common.next'),
|
|
943
|
+
onCancel: _onCancel,
|
|
944
|
+
onConfirm: onNext
|
|
888
945
|
}, {
|
|
889
946
|
key: 'install',
|
|
890
947
|
name: t('common.install'),
|
|
@@ -47,7 +47,7 @@ function DeleteComponent(_ref) {
|
|
|
47
47
|
const btn = /*#__PURE__*/(0, _jsxRuntime.jsx)(StyledButton, {
|
|
48
48
|
disabled: componentDisabled,
|
|
49
49
|
onClick: () => setDeleteSetting({
|
|
50
|
-
title: t('
|
|
50
|
+
title: "".concat(t('common.delete'), " ").concat(component.meta.title || component.meta.name),
|
|
51
51
|
// eslint-disable-next-line react/no-unstable-nested-components
|
|
52
52
|
description: (params, setParams) => /*#__PURE__*/(0, _jsxRuntime.jsxs)(_Typography.default, {
|
|
53
53
|
component: "div",
|
|
@@ -0,0 +1,208 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.default = void 0;
|
|
7
|
+
var _react = _interopRequireWildcard(require("react"));
|
|
8
|
+
var _Connect = _interopRequireDefault(require("@arcblock/did-connect/lib/Connect"));
|
|
9
|
+
var _context = require("@arcblock/ux/lib/Locale/context");
|
|
10
|
+
var _constant = require("@blocklet/constant");
|
|
11
|
+
var _axios = _interopRequireDefault(require("axios"));
|
|
12
|
+
var _propTypes = _interopRequireDefault(require("prop-types"));
|
|
13
|
+
var _urlJoin = _interopRequireDefault(require("url-join"));
|
|
14
|
+
var _lodash = require("lodash");
|
|
15
|
+
var _Typography = _interopRequireDefault(require("@mui/material/Typography"));
|
|
16
|
+
var _util = require("@blocklet/meta/lib/util");
|
|
17
|
+
var _blocklet = require("../../../lib/contexts/blocklet");
|
|
18
|
+
var _node = require("../../contexts/node");
|
|
19
|
+
var _toast = _interopRequireDefault(require("../../../lib/toast"));
|
|
20
|
+
var _spaceSelector = _interopRequireDefault(require("./space-selector"));
|
|
21
|
+
var _jsxRuntime = require("react/jsx-runtime");
|
|
22
|
+
const _excluded = ["onConnect"];
|
|
23
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
24
|
+
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
|
|
25
|
+
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
|
|
26
|
+
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; }
|
|
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
|
+
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
|
+
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); }
|
|
31
|
+
function _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }
|
|
32
|
+
function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }
|
|
33
|
+
/**
|
|
34
|
+
*
|
|
35
|
+
*
|
|
36
|
+
* @param {import('@abtnode/client').BlockletState} blocklet
|
|
37
|
+
* @return {*}
|
|
38
|
+
*/
|
|
39
|
+
function useAppUrl(blocklet) {
|
|
40
|
+
var _blocklet$site, _blocklet$site$domain, _blocklet$site$domain2;
|
|
41
|
+
const appUrls = blocklet === null || blocklet === void 0 ? void 0 : (_blocklet$site = blocklet.site) === null || _blocklet$site === void 0 ? void 0 : (_blocklet$site$domain = _blocklet$site.domainAliases) === null || _blocklet$site$domain === void 0 ? void 0 : (_blocklet$site$domain2 = _blocklet$site$domain.sort((a, b) => {
|
|
42
|
+
if (a.accessibility.accessible && b.accessibility.accessible) {
|
|
43
|
+
return +a.isProtected - +b.isProtected;
|
|
44
|
+
}
|
|
45
|
+
return +b.accessibility.accessible - +a.accessibility.accessible;
|
|
46
|
+
})) === null || _blocklet$site$domain2 === void 0 ? void 0 : _blocklet$site$domain2.map(domainAlias => {
|
|
47
|
+
var _domainAlias$domainSt;
|
|
48
|
+
const protocol = domainAlias !== null && domainAlias !== void 0 && (_domainAlias$domainSt = domainAlias.domainStatus) !== null && _domainAlias$domainSt !== void 0 && _domainAlias$domainSt.isHttps ? 'https://' : 'http://';
|
|
49
|
+
const value = domainAlias === null || domainAlias === void 0 ? void 0 : domainAlias.value;
|
|
50
|
+
return "".concat(protocol).concat(value);
|
|
51
|
+
}).filter(Boolean);
|
|
52
|
+
const appUrl = appUrls === null || appUrls === void 0 ? void 0 : appUrls[0];
|
|
53
|
+
|
|
54
|
+
// 授权的时候提供 appUrl, 因为 appUrl 可能很久都拿不到值,所以加一个 loading 效果过渡一下
|
|
55
|
+
return {
|
|
56
|
+
appUrl,
|
|
57
|
+
isReady: Boolean(appUrl)
|
|
58
|
+
};
|
|
59
|
+
}
|
|
60
|
+
const SpaceConnector = /*#__PURE__*/(0, _react.forwardRef)((_ref, ref) => {
|
|
61
|
+
let {
|
|
62
|
+
onConnect
|
|
63
|
+
} = _ref,
|
|
64
|
+
restProps = _objectWithoutProperties(_ref, _excluded);
|
|
65
|
+
/** @type {{ api: import('@abtnode/client').ABTNodeClient, info: import('@abtnode/client').NodeState }} */
|
|
66
|
+
const {
|
|
67
|
+
api,
|
|
68
|
+
info
|
|
69
|
+
} = (0, _node.useNodeContext)();
|
|
70
|
+
const nodeDid = info.did;
|
|
71
|
+
const {
|
|
72
|
+
t,
|
|
73
|
+
locale
|
|
74
|
+
} = (0, _react.useContext)(_context.LocaleContext);
|
|
75
|
+
/** @type {{ blocklet: import('@abtnode/client').BlockletState }} */
|
|
76
|
+
const {
|
|
77
|
+
blocklet
|
|
78
|
+
} = (0, _blocklet.useBlockletContext)();
|
|
79
|
+
const [gatewayUrl, setGatewayUrl] = (0, _react.useState)('');
|
|
80
|
+
const spaceProps = (0, _react.useMemo)(() => {
|
|
81
|
+
var _blocklet$environment, _blocklet$environment2, _blocklet$environment3, _blocklet$environment4;
|
|
82
|
+
return {
|
|
83
|
+
endpoint: (blocklet === null || blocklet === void 0 ? void 0 : (_blocklet$environment = blocklet.environments) === null || _blocklet$environment === void 0 ? void 0 : (_blocklet$environment2 = _blocklet$environment.find(e => e.key === _constant.BLOCKLET_CONFIGURABLE_KEY.BLOCKLET_APP_SPACE_ENDPOINT)) === null || _blocklet$environment2 === void 0 ? void 0 : _blocklet$environment2.value) || '',
|
|
84
|
+
gatewayUrl: (blocklet === null || blocklet === void 0 ? void 0 : (_blocklet$environment3 = blocklet.environments) === null || _blocklet$environment3 === void 0 ? void 0 : (_blocklet$environment4 = _blocklet$environment3.find(e => e.key === _constant.BLOCKLET_CONFIGURABLE_KEY.BLOCKLET_APP_SPACES_URL)) === null || _blocklet$environment4 === void 0 ? void 0 : _blocklet$environment4.value) || ''
|
|
85
|
+
};
|
|
86
|
+
}, [blocklet]);
|
|
87
|
+
const appName = (0, _util.getAppName)(blocklet);
|
|
88
|
+
const appDescription = (0, _util.getAppDescription)(blocklet);
|
|
89
|
+
const {
|
|
90
|
+
appUrl,
|
|
91
|
+
isReady
|
|
92
|
+
} = useAppUrl(blocklet);
|
|
93
|
+
async function saveSpaceConnectorEndpoint(did, storageEndpoint) {
|
|
94
|
+
await api.configBlocklet({
|
|
95
|
+
input: {
|
|
96
|
+
did: [did],
|
|
97
|
+
configs: [{
|
|
98
|
+
key: _constant.BLOCKLET_CONFIGURABLE_KEY.BLOCKLET_APP_SPACES_URL,
|
|
99
|
+
value: gatewayUrl
|
|
100
|
+
}, {
|
|
101
|
+
key: _constant.BLOCKLET_CONFIGURABLE_KEY.BLOCKLET_APP_SPACE_ENDPOINT,
|
|
102
|
+
value: storageEndpoint
|
|
103
|
+
}]
|
|
104
|
+
}
|
|
105
|
+
}).then(() => {
|
|
106
|
+
_toast.default.success(t('storage.spaces.connected', locale));
|
|
107
|
+
}).catch(error => {
|
|
108
|
+
console.error(error);
|
|
109
|
+
_toast.default.error(error.message);
|
|
110
|
+
});
|
|
111
|
+
}
|
|
112
|
+
const onAuthorizeConnectSuccess = async (response, decrypt) => {
|
|
113
|
+
await saveSpaceConnectorEndpoint(blocklet.meta.did, decrypt(response.endpoint));
|
|
114
|
+
setTimeout(() => {
|
|
115
|
+
setAuthorizeConnect(preValue => _objectSpread(_objectSpread({}, preValue), {}, {
|
|
116
|
+
open: false
|
|
117
|
+
}));
|
|
118
|
+
onConnect === null || onConnect === void 0 ? void 0 : onConnect();
|
|
119
|
+
}, 3000);
|
|
120
|
+
};
|
|
121
|
+
const [authorizeConnect, setAuthorizeConnect] = (0, _react.useState)({
|
|
122
|
+
open: false
|
|
123
|
+
});
|
|
124
|
+
|
|
125
|
+
// eslint-disable-next-line no-shadow
|
|
126
|
+
const handleOnClickAuthorize = async gatewayUrl => {
|
|
127
|
+
if ((0, _lodash.isEmpty)(gatewayUrl)) {
|
|
128
|
+
_toast.default.error(t('storage.spaces.addressCannotEmpty', locale));
|
|
129
|
+
return;
|
|
130
|
+
}
|
|
131
|
+
setGatewayUrl(gatewayUrl);
|
|
132
|
+
setAuthorizeConnect(preValue => _objectSpread(_objectSpread({}, preValue), {}, {
|
|
133
|
+
action: 'one-click-authorization',
|
|
134
|
+
checkTimeout: 1000 * 300,
|
|
135
|
+
prefix: (0, _urlJoin.default)(gatewayUrl, 'space/api/did'),
|
|
136
|
+
baseUrl: new URL(gatewayUrl).origin,
|
|
137
|
+
checkFn: _axios.default.create({
|
|
138
|
+
baseURL: (0, _urlJoin.default)(gatewayUrl, 'space')
|
|
139
|
+
}).get,
|
|
140
|
+
extraParams: {
|
|
141
|
+
appDid: blocklet.appDid,
|
|
142
|
+
appName,
|
|
143
|
+
appDescription,
|
|
144
|
+
scopes: 'list:object read:object write:object',
|
|
145
|
+
appUrl,
|
|
146
|
+
referrer: window.location.href,
|
|
147
|
+
nodeDid
|
|
148
|
+
},
|
|
149
|
+
onClose: () => {
|
|
150
|
+
// eslint-disable-next-line no-shadow
|
|
151
|
+
setAuthorizeConnect(preValue => _objectSpread(_objectSpread({}, preValue), {}, {
|
|
152
|
+
open: false
|
|
153
|
+
}));
|
|
154
|
+
},
|
|
155
|
+
open: true
|
|
156
|
+
}));
|
|
157
|
+
};
|
|
158
|
+
(0, _react.useEffect)(() => {
|
|
159
|
+
setAuthorizeConnect(preValue => _objectSpread(_objectSpread({}, preValue), {}, {
|
|
160
|
+
messages: {
|
|
161
|
+
title: t('storage.spaces.authorize.title', {
|
|
162
|
+
appName
|
|
163
|
+
}),
|
|
164
|
+
scan: t('storage.spaces.authorize.scan', {
|
|
165
|
+
appName
|
|
166
|
+
}),
|
|
167
|
+
confirm: '',
|
|
168
|
+
success: /*#__PURE__*/(0, _jsxRuntime.jsx)(_Typography.default, {
|
|
169
|
+
gutterBottom: true,
|
|
170
|
+
children: t('storage.spaces.authorize.success')
|
|
171
|
+
})
|
|
172
|
+
}
|
|
173
|
+
}));
|
|
174
|
+
}, [appName, locale, t]);
|
|
175
|
+
(0, _react.useImperativeHandle)(ref, () => ({
|
|
176
|
+
getEndpoint: () => spaceProps.endpoint,
|
|
177
|
+
getGatewayUrl: () => spaceProps.gatewayUrl
|
|
178
|
+
}));
|
|
179
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsxs)(_jsxRuntime.Fragment, {
|
|
180
|
+
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_spaceSelector.default, _objectSpread(_objectSpread(_objectSpread({}, restProps), spaceProps), {}, {
|
|
181
|
+
onSelect: handleOnClickAuthorize,
|
|
182
|
+
loading: !isReady
|
|
183
|
+
})), /*#__PURE__*/(0, _jsxRuntime.jsx)(_Connect.default, {
|
|
184
|
+
forceConnected: false,
|
|
185
|
+
saveConnect: false,
|
|
186
|
+
prefix: authorizeConnect.prefix,
|
|
187
|
+
open: authorizeConnect.open,
|
|
188
|
+
popup: true,
|
|
189
|
+
action: authorizeConnect.action,
|
|
190
|
+
baseUrl: authorizeConnect.baseUrl,
|
|
191
|
+
checkFn: authorizeConnect.checkFn,
|
|
192
|
+
onSuccess: onAuthorizeConnectSuccess,
|
|
193
|
+
onClose: authorizeConnect.onClose,
|
|
194
|
+
checkTimeout: authorizeConnect.checkTimeout,
|
|
195
|
+
extraParams: authorizeConnect.extraParams,
|
|
196
|
+
messages: authorizeConnect.messages,
|
|
197
|
+
locale: locale
|
|
198
|
+
})]
|
|
199
|
+
});
|
|
200
|
+
});
|
|
201
|
+
SpaceConnector.propTypes = {
|
|
202
|
+
onConnect: _propTypes.default.func
|
|
203
|
+
};
|
|
204
|
+
SpaceConnector.defaultProps = {
|
|
205
|
+
onConnect: () => {}
|
|
206
|
+
};
|
|
207
|
+
var _default = SpaceConnector;
|
|
208
|
+
exports.default = _default;
|
|
@@ -18,7 +18,7 @@ var _session = require("../../../lib/contexts/session");
|
|
|
18
18
|
var _toast = _interopRequireDefault(require("../../toast"));
|
|
19
19
|
var _jsxRuntime = require("react/jsx-runtime");
|
|
20
20
|
var _templateObject;
|
|
21
|
-
const _excluded = ["onSelect", "endpoint", "loading"];
|
|
21
|
+
const _excluded = ["onSelect", "endpoint", "gatewayUrl", "loading", "size", "helperText"];
|
|
22
22
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
23
23
|
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
|
|
24
24
|
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
|
|
@@ -40,15 +40,18 @@ const DEFAULT_GATEWAY_LIST = [{
|
|
|
40
40
|
avatar: 'S'
|
|
41
41
|
}];
|
|
42
42
|
const filter = (0, _Autocomplete.createFilterOptions)();
|
|
43
|
-
function
|
|
43
|
+
function SpaceSelector(_ref) {
|
|
44
44
|
let {
|
|
45
45
|
onSelect,
|
|
46
46
|
endpoint,
|
|
47
|
-
|
|
47
|
+
gatewayUrl: defaultGatewayUrl,
|
|
48
|
+
loading,
|
|
49
|
+
size,
|
|
50
|
+
helperText
|
|
48
51
|
} = _ref,
|
|
49
52
|
rest = _objectWithoutProperties(_ref, _excluded);
|
|
50
53
|
const [gatewayList, setGatewayList] = (0, _useLocalStorage.default)('did-space-gateway-list', DEFAULT_GATEWAY_LIST);
|
|
51
|
-
const [gatewayUrl, setGatewayUrl] = (0,
|
|
54
|
+
const [gatewayUrl, setGatewayUrl] = (0, _react.useState)(defaultGatewayUrl || DEFAULT_GATEWAY_LIST[0].value);
|
|
52
55
|
const {
|
|
53
56
|
t
|
|
54
57
|
} = (0, _context.useLocaleContext)();
|
|
@@ -134,8 +137,9 @@ function SpaceGatewaySelector(_ref) {
|
|
|
134
137
|
},
|
|
135
138
|
renderInput: params => {
|
|
136
139
|
return /*#__PURE__*/(0, _jsxRuntime.jsx)(_material.TextField, _objectSpread(_objectSpread({}, params), {}, {
|
|
140
|
+
helperText: helperText,
|
|
137
141
|
label: t('storage.spaces.label'),
|
|
138
|
-
size:
|
|
142
|
+
size: size,
|
|
139
143
|
InputProps: _objectSpread(_objectSpread({}, params.InputProps), {}, {
|
|
140
144
|
type: 'search',
|
|
141
145
|
endAdornment: /*#__PURE__*/(0, _jsxRuntime.jsx)(_Button.default, {
|
|
@@ -161,14 +165,20 @@ function SpaceGatewaySelector(_ref) {
|
|
|
161
165
|
}));
|
|
162
166
|
}
|
|
163
167
|
const Container = (0, _styled.default)(_Autocomplete.default)(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n height: 40px;\n width: 100%;\n max-width: 720px;\n ", " {\n width: 75%;\n }\n input.MuiInputBase-input {\n max-width: calc(100% - 80px);\n }\n"])), props => props.theme.breakpoints.down('md'));
|
|
164
|
-
|
|
168
|
+
SpaceSelector.propTypes = {
|
|
165
169
|
onSelect: _propTypes.default.func.isRequired,
|
|
166
170
|
endpoint: _propTypes.default.string,
|
|
167
|
-
loading: _propTypes.default.bool
|
|
171
|
+
loading: _propTypes.default.bool,
|
|
172
|
+
size: _propTypes.default.string,
|
|
173
|
+
helperText: _propTypes.default.string,
|
|
174
|
+
gatewayUrl: _propTypes.default.string
|
|
168
175
|
};
|
|
169
|
-
|
|
176
|
+
SpaceSelector.defaultProps = {
|
|
170
177
|
endpoint: undefined,
|
|
171
|
-
loading: false
|
|
178
|
+
loading: false,
|
|
179
|
+
size: 'small',
|
|
180
|
+
helperText: '',
|
|
181
|
+
gatewayUrl: ''
|
|
172
182
|
};
|
|
173
|
-
var _default =
|
|
183
|
+
var _default = SpaceSelector;
|
|
174
184
|
exports.default = _default;
|
package/lib/blocklet/storage.js
CHANGED
|
@@ -6,21 +6,16 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
6
6
|
exports.default = Storage;
|
|
7
7
|
var _react = _interopRequireWildcard(require("react"));
|
|
8
8
|
var _Box = _interopRequireDefault(require("@mui/material/Box"));
|
|
9
|
-
var _Connect = _interopRequireDefault(require("@arcblock/did-connect/lib/Connect"));
|
|
10
9
|
var _context = require("@arcblock/ux/lib/Locale/context");
|
|
11
10
|
var _constant = require("@blocklet/constant");
|
|
12
|
-
var _axios = _interopRequireDefault(require("axios"));
|
|
13
|
-
var _urlJoin = _interopRequireDefault(require("url-join"));
|
|
14
11
|
var _styled = _interopRequireDefault(require("@emotion/styled"));
|
|
15
|
-
var _lodash = require("lodash");
|
|
16
12
|
var _Typography = _interopRequireDefault(require("@mui/material/Typography"));
|
|
17
13
|
var _material = require("@mui/material");
|
|
18
14
|
var _Button = _interopRequireDefault(require("@arcblock/ux/lib/Button"));
|
|
19
|
-
var _util = require("@blocklet/meta/lib/util");
|
|
20
15
|
var _blocklet = require("../../lib/contexts/blocklet");
|
|
21
16
|
var _node = require("../contexts/node");
|
|
22
17
|
var _toast = _interopRequireDefault(require("../../lib/toast"));
|
|
23
|
-
var
|
|
18
|
+
var _spaceConnector = _interopRequireDefault(require("./component/space-connector"));
|
|
24
19
|
var _jsxRuntime = require("react/jsx-runtime");
|
|
25
20
|
var _templateObject;
|
|
26
21
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
@@ -62,127 +57,26 @@ function useBackupProgress(_ref) {
|
|
|
62
57
|
}, [appDid, webSocketClient]);
|
|
63
58
|
return progress;
|
|
64
59
|
}
|
|
65
|
-
|
|
66
|
-
/**
|
|
67
|
-
*
|
|
68
|
-
*
|
|
69
|
-
* @param {import('@abtnode/client').BlockletState} blocklet
|
|
70
|
-
* @return {*}
|
|
71
|
-
*/
|
|
72
|
-
function useAppUrl(blocklet) {
|
|
73
|
-
var _blocklet$site, _blocklet$site$domain, _blocklet$site$domain2;
|
|
74
|
-
const appUrls = blocklet === null || blocklet === void 0 ? void 0 : (_blocklet$site = blocklet.site) === null || _blocklet$site === void 0 ? void 0 : (_blocklet$site$domain = _blocklet$site.domainAliases) === null || _blocklet$site$domain === void 0 ? void 0 : (_blocklet$site$domain2 = _blocklet$site$domain.sort((a, b) => {
|
|
75
|
-
if (a.accessibility.accessible && b.accessibility.accessible) {
|
|
76
|
-
return +a.isProtected - +b.isProtected;
|
|
77
|
-
}
|
|
78
|
-
return +b.accessibility.accessible - +a.accessibility.accessible;
|
|
79
|
-
})) === null || _blocklet$site$domain2 === void 0 ? void 0 : _blocklet$site$domain2.map(domainAlias => {
|
|
80
|
-
var _domainAlias$domainSt;
|
|
81
|
-
const protocol = domainAlias !== null && domainAlias !== void 0 && (_domainAlias$domainSt = domainAlias.domainStatus) !== null && _domainAlias$domainSt !== void 0 && _domainAlias$domainSt.isHttps ? 'https://' : 'http://';
|
|
82
|
-
const value = domainAlias === null || domainAlias === void 0 ? void 0 : domainAlias.value;
|
|
83
|
-
return "".concat(protocol).concat(value);
|
|
84
|
-
}).filter(Boolean);
|
|
85
|
-
const appUrl = appUrls === null || appUrls === void 0 ? void 0 : appUrls[0];
|
|
86
|
-
|
|
87
|
-
// 授权的时候提供 appUrl, 因为 appUrl 可能很久都拿不到值,所以加一个 loading 效果过渡一下
|
|
88
|
-
return {
|
|
89
|
-
appUrl,
|
|
90
|
-
isReady: Boolean(appUrl)
|
|
91
|
-
};
|
|
92
|
-
}
|
|
93
60
|
function Storage() {
|
|
94
|
-
var _blocklet$environment;
|
|
95
61
|
/** @type {{ api: import('@abtnode/client').ABTNodeClient, info: import('@abtnode/client').NodeState }} */
|
|
96
62
|
const {
|
|
97
|
-
api
|
|
98
|
-
info
|
|
63
|
+
api
|
|
99
64
|
} = (0, _node.useNodeContext)();
|
|
100
|
-
const nodeDid = info.did;
|
|
101
65
|
const {
|
|
102
|
-
t
|
|
103
|
-
locale
|
|
66
|
+
t
|
|
104
67
|
} = (0, _react.useContext)(_context.LocaleContext);
|
|
105
68
|
/** @type {{ blocklet: import('@abtnode/client').BlockletState }} */
|
|
106
69
|
const {
|
|
107
70
|
blocklet
|
|
108
71
|
} = (0, _blocklet.useBlockletContext)();
|
|
109
|
-
const
|
|
110
|
-
|
|
72
|
+
const endpoint = (0, _react.useMemo)(() => {
|
|
73
|
+
var _blocklet$environment;
|
|
74
|
+
return ((_blocklet$environment = blocklet.environments.find(e => e.key === _constant.BLOCKLET_CONFIGURABLE_KEY.BLOCKLET_APP_SPACE_ENDPOINT)) === null || _blocklet$environment === void 0 ? void 0 : _blocklet$environment.value) || '';
|
|
75
|
+
}, [blocklet]);
|
|
111
76
|
const progress = useBackupProgress({
|
|
112
77
|
appDid: blocklet === null || blocklet === void 0 ? void 0 : blocklet.appDid
|
|
113
78
|
});
|
|
114
79
|
const [isLoading, setIsLoading] = (0, _react.useState)(false);
|
|
115
|
-
const appName = (0, _util.getAppName)(blocklet);
|
|
116
|
-
const appDescription = (0, _util.getAppDescription)(blocklet);
|
|
117
|
-
const {
|
|
118
|
-
appUrl,
|
|
119
|
-
isReady
|
|
120
|
-
} = useAppUrl(blocklet);
|
|
121
|
-
async function saveStorageEndpoint(did, storageEndpoint) {
|
|
122
|
-
await api.configBlocklet({
|
|
123
|
-
input: {
|
|
124
|
-
did: [did],
|
|
125
|
-
configs: [{
|
|
126
|
-
key: _constant.BLOCKLET_CONFIGURABLE_KEY.BLOCKLET_APP_SPACES_URL,
|
|
127
|
-
value: gatewayUrl
|
|
128
|
-
}, {
|
|
129
|
-
key: _constant.BLOCKLET_CONFIGURABLE_KEY.BLOCKLET_APP_SPACE_ENDPOINT,
|
|
130
|
-
value: storageEndpoint
|
|
131
|
-
}]
|
|
132
|
-
}
|
|
133
|
-
}).then(() => {
|
|
134
|
-
_toast.default.success(t('storage.spaces.connected', locale));
|
|
135
|
-
}).catch(error => {
|
|
136
|
-
console.error(error);
|
|
137
|
-
_toast.default.error(error.message);
|
|
138
|
-
});
|
|
139
|
-
}
|
|
140
|
-
const onAuthorizeConnectSuccess = async (response, decrypt) => {
|
|
141
|
-
setEndpoint(decrypt(response.endpoint));
|
|
142
|
-
await saveStorageEndpoint(blocklet.meta.did, decrypt(response.endpoint));
|
|
143
|
-
setTimeout(() => {
|
|
144
|
-
setAuthorizeConnect(preValue => _objectSpread(_objectSpread({}, preValue), {}, {
|
|
145
|
-
open: false
|
|
146
|
-
}));
|
|
147
|
-
}, 3000);
|
|
148
|
-
};
|
|
149
|
-
const [authorizeConnect, setAuthorizeConnect] = (0, _react.useState)({
|
|
150
|
-
open: false
|
|
151
|
-
});
|
|
152
|
-
|
|
153
|
-
// eslint-disable-next-line no-shadow
|
|
154
|
-
const handleOnClickAuthorize = async gatewayUrl => {
|
|
155
|
-
if ((0, _lodash.isEmpty)(gatewayUrl)) {
|
|
156
|
-
_toast.default.error(t('storage.spaces.addressCannotEmpty', locale));
|
|
157
|
-
return;
|
|
158
|
-
}
|
|
159
|
-
setGatewayUrl(gatewayUrl);
|
|
160
|
-
setAuthorizeConnect(preValue => _objectSpread(_objectSpread({}, preValue), {}, {
|
|
161
|
-
action: 'one-click-authorization',
|
|
162
|
-
checkTimeout: 1000 * 300,
|
|
163
|
-
prefix: (0, _urlJoin.default)(gatewayUrl, 'space/api/did'),
|
|
164
|
-
baseUrl: new URL(gatewayUrl).origin,
|
|
165
|
-
checkFn: _axios.default.create({
|
|
166
|
-
baseURL: (0, _urlJoin.default)(gatewayUrl, 'space')
|
|
167
|
-
}).get,
|
|
168
|
-
extraParams: {
|
|
169
|
-
appDid: blocklet.appDid,
|
|
170
|
-
appName,
|
|
171
|
-
appDescription,
|
|
172
|
-
scopes: 'list:object read:object write:object',
|
|
173
|
-
appUrl,
|
|
174
|
-
referrer: window.location.href,
|
|
175
|
-
nodeDid
|
|
176
|
-
},
|
|
177
|
-
onClose: () => {
|
|
178
|
-
// eslint-disable-next-line no-shadow
|
|
179
|
-
setAuthorizeConnect(preValue => _objectSpread(_objectSpread({}, preValue), {}, {
|
|
180
|
-
open: false
|
|
181
|
-
}));
|
|
182
|
-
},
|
|
183
|
-
open: true
|
|
184
|
-
}));
|
|
185
|
-
};
|
|
186
80
|
const onBackup = async () => {
|
|
187
81
|
try {
|
|
188
82
|
if (isLoading) {
|
|
@@ -202,23 +96,6 @@ function Storage() {
|
|
|
202
96
|
setIsLoading(false);
|
|
203
97
|
}
|
|
204
98
|
};
|
|
205
|
-
(0, _react.useEffect)(() => {
|
|
206
|
-
setAuthorizeConnect(preValue => _objectSpread(_objectSpread({}, preValue), {}, {
|
|
207
|
-
messages: {
|
|
208
|
-
title: t('storage.spaces.authorize.title', {
|
|
209
|
-
appName
|
|
210
|
-
}),
|
|
211
|
-
scan: t('storage.spaces.authorize.scan', {
|
|
212
|
-
appName
|
|
213
|
-
}),
|
|
214
|
-
confirm: '',
|
|
215
|
-
success: /*#__PURE__*/(0, _jsxRuntime.jsx)(_Typography.default, {
|
|
216
|
-
gutterBottom: true,
|
|
217
|
-
children: t('storage.spaces.authorize.success')
|
|
218
|
-
})
|
|
219
|
-
}
|
|
220
|
-
}));
|
|
221
|
-
}, [appName, locale, t]);
|
|
222
99
|
(0, _react.useEffect)(() => {
|
|
223
100
|
if (progress !== null && progress !== void 0 && progress.completed) {
|
|
224
101
|
setIsLoading(false);
|
|
@@ -233,14 +110,11 @@ function Storage() {
|
|
|
233
110
|
style: {
|
|
234
111
|
maxWidth: '720px'
|
|
235
112
|
},
|
|
236
|
-
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(
|
|
113
|
+
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_spaceConnector.default, {
|
|
237
114
|
sx: {
|
|
238
115
|
marginTop: '24px',
|
|
239
116
|
marginBottom: '40px'
|
|
240
|
-
}
|
|
241
|
-
onSelect: handleOnClickAuthorize,
|
|
242
|
-
endpoint: endpoint,
|
|
243
|
-
loading: !isReady
|
|
117
|
+
}
|
|
244
118
|
}), endpoint && /*#__PURE__*/(0, _jsxRuntime.jsxs)(_Box.default, {
|
|
245
119
|
mt: 3,
|
|
246
120
|
display: "flex",
|
|
@@ -301,22 +175,8 @@ function Storage() {
|
|
|
301
175
|
})
|
|
302
176
|
})]
|
|
303
177
|
})]
|
|
304
|
-
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(_Connect.default, {
|
|
305
|
-
forceConnected: false,
|
|
306
|
-
saveConnect: false,
|
|
307
|
-
prefix: authorizeConnect.prefix,
|
|
308
|
-
open: authorizeConnect.open,
|
|
309
|
-
popup: true,
|
|
310
|
-
action: authorizeConnect.action,
|
|
311
|
-
baseUrl: authorizeConnect.baseUrl,
|
|
312
|
-
checkFn: authorizeConnect.checkFn,
|
|
313
|
-
onSuccess: onAuthorizeConnectSuccess,
|
|
314
|
-
onClose: authorizeConnect.onClose,
|
|
315
|
-
checkTimeout: authorizeConnect.checkTimeout,
|
|
316
|
-
extraParams: authorizeConnect.extraParams,
|
|
317
|
-
messages: authorizeConnect.messages,
|
|
318
|
-
locale: locale
|
|
319
178
|
})]
|
|
320
179
|
});
|
|
321
180
|
}
|
|
322
|
-
Storage.propTypes = {};
|
|
181
|
+
Storage.propTypes = {};
|
|
182
|
+
Storage.defaultProps = {};
|
package/lib/locales/en.js
CHANGED
|
@@ -459,6 +459,9 @@ module.exports = {
|
|
|
459
459
|
star: 'Star'
|
|
460
460
|
},
|
|
461
461
|
component: {
|
|
462
|
+
didSpaceConfig: 'Configure DID Spaces',
|
|
463
|
+
didSpaceConfigTip: 'Complete the following authorize process to store application data in DID Spaces',
|
|
464
|
+
didSpaceConnected: 'Storage being authorized to: {endpoint}',
|
|
462
465
|
checkUpdateTitle: 'Check for Updates',
|
|
463
466
|
updateTitle: 'Update Components',
|
|
464
467
|
noUpdate: 'No components to update',
|
package/lib/locales/zh.js
CHANGED
|
@@ -467,6 +467,9 @@ module.exports = {
|
|
|
467
467
|
star: '收藏数'
|
|
468
468
|
},
|
|
469
469
|
component: {
|
|
470
|
+
didSpaceConfig: '配置 DID Spaces',
|
|
471
|
+
didSpaceConfigTip: '完成以下授权流程,即可将应用数据存储到 DID Spaces 中',
|
|
472
|
+
didSpaceConnected: '正在授权存储到:{endpoint}',
|
|
470
473
|
checkUpdateTitle: '检查更新',
|
|
471
474
|
updateTitle: '更新组件',
|
|
472
475
|
noUpdate: '没有需要更新的组件',
|
package/package.json
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
"publishConfig": {
|
|
4
4
|
"access": "public"
|
|
5
5
|
},
|
|
6
|
-
"version": "1.16.0-beta-
|
|
6
|
+
"version": "1.16.0-beta-1d6c582e",
|
|
7
7
|
"description": "UX components shared across abtnode packages",
|
|
8
8
|
"main": "lib/index.js",
|
|
9
9
|
"files": [
|
|
@@ -21,19 +21,19 @@
|
|
|
21
21
|
"author": "linchen <linchen1987@foxmail.com> (http://github.com/linchen1987)",
|
|
22
22
|
"license": "MIT",
|
|
23
23
|
"dependencies": {
|
|
24
|
-
"@abtnode/auth": "1.16.0-beta-
|
|
25
|
-
"@abtnode/constant": "1.16.0-beta-
|
|
26
|
-
"@abtnode/util": "1.16.0-beta-
|
|
24
|
+
"@abtnode/auth": "1.16.0-beta-1d6c582e",
|
|
25
|
+
"@abtnode/constant": "1.16.0-beta-1d6c582e",
|
|
26
|
+
"@abtnode/util": "1.16.0-beta-1d6c582e",
|
|
27
27
|
"@arcblock/did-connect": "^2.5.14",
|
|
28
28
|
"@arcblock/did-motif": "^1.1.10",
|
|
29
29
|
"@arcblock/icons": "^2.5.14",
|
|
30
30
|
"@arcblock/react-hooks": "^2.5.14",
|
|
31
31
|
"@arcblock/terminal": "^2.5.14",
|
|
32
32
|
"@arcblock/ux": "^2.5.14",
|
|
33
|
-
"@blocklet/constant": "1.16.0-beta-
|
|
33
|
+
"@blocklet/constant": "1.16.0-beta-1d6c582e",
|
|
34
34
|
"@blocklet/launcher-layout": "1.9.65",
|
|
35
35
|
"@blocklet/list": "^0.11.6",
|
|
36
|
-
"@blocklet/meta": "1.16.0-beta-
|
|
36
|
+
"@blocklet/meta": "1.16.0-beta-1d6c582e",
|
|
37
37
|
"@blocklet/ui-react": "^2.5.14",
|
|
38
38
|
"@emotion/react": "^11.10.4",
|
|
39
39
|
"@emotion/styled": "^11.10.4",
|
|
@@ -88,5 +88,5 @@
|
|
|
88
88
|
"@babel/preset-react": "^7.18.6",
|
|
89
89
|
"babel-plugin-inline-react-svg": "^1.1.2"
|
|
90
90
|
},
|
|
91
|
-
"gitHead": "
|
|
91
|
+
"gitHead": "209fa1413ae05d8961942b2c21f2d83df66f4b68"
|
|
92
92
|
}
|