@abtnode/ux 1.16.0-beta-8ee536d7 → 1.16.0-beta-62b42401

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.
@@ -0,0 +1,49 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.default = void 0;
7
+ var _Tabs = _interopRequireDefault(require("@arcblock/ux/lib/Tabs"));
8
+ var _material = require("@mui/material");
9
+ var _ahooks = require("ahooks");
10
+ var _react = require("react");
11
+ var _auth = _interopRequireDefault(require("./auth0"));
12
+ var _jsxRuntime = require("react/jsx-runtime");
13
+ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
14
+ function OAuth() {
15
+ const tabs = [{
16
+ label: /*#__PURE__*/(0, _jsxRuntime.jsx)(_material.Box, {
17
+ textAlign: "center",
18
+ width: "100%",
19
+ children: "Auth0"
20
+ }),
21
+ value: 'auth0'
22
+ }, {
23
+ label: /*#__PURE__*/(0, _jsxRuntime.jsx)(_material.Box, {
24
+ textAlign: "center",
25
+ width: "100%",
26
+ children: "More"
27
+ }),
28
+ value: 'more'
29
+ }];
30
+ const [currentTab, setCurrentTab] = (0, _react.useState)(tabs[0].value);
31
+ const contents = (0, _ahooks.useCreation)(() => ({
32
+ auth0: /*#__PURE__*/(0, _jsxRuntime.jsx)(_auth.default, {}),
33
+ more: /*#__PURE__*/(0, _jsxRuntime.jsx)(_material.Box, {
34
+ children: "TBD"
35
+ })
36
+ }), []);
37
+ return /*#__PURE__*/(0, _jsxRuntime.jsxs)(_material.Box, {
38
+ children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_Tabs.default, {
39
+ tabs: tabs,
40
+ current: currentTab,
41
+ onChange: setCurrentTab
42
+ }), /*#__PURE__*/(0, _jsxRuntime.jsx)(_material.Box, {
43
+ marginTop: "10px",
44
+ children: contents[currentTab]
45
+ })]
46
+ });
47
+ }
48
+ var _default = OAuth;
49
+ exports.default = _default;
@@ -13,6 +13,7 @@ var _constant = require("@abtnode/constant");
13
13
  var _material = require("@mui/material");
14
14
  var _TuneRounded = _interopRequireDefault(require("@mui/icons-material/TuneRounded"));
15
15
  var _Key = _interopRequireDefault(require("@mui/icons-material/Key"));
16
+ var _Login = _interopRequireDefault(require("@mui/icons-material/Login"));
16
17
  var _SettingsOutlined = _interopRequireDefault(require("@mui/icons-material/SettingsOutlined"));
17
18
  var _ChevronRight = _interopRequireDefault(require("@mui/icons-material/ChevronRight"));
18
19
  var _ExpandMore = _interopRequireDefault(require("@mui/icons-material/ExpandMore"));
@@ -23,6 +24,7 @@ var _bundleAvatar = _interopRequireDefault(require("../bundle-avatar"));
23
24
  var _configuration = _interopRequireDefault(require("../configuration"));
24
25
  var _index = _interopRequireDefault(require("../access/index"));
25
26
  var _node = require("../../contexts/node");
27
+ var _oauth = _interopRequireDefault(require("../oauth"));
26
28
  var _jsxRuntime = require("react/jsx-runtime");
27
29
  var _templateObject;
28
30
  const _excluded = ["blocklet", "onUpdate"];
@@ -124,6 +126,26 @@ function BlockletPreferences(_ref) {
124
126
  })]
125
127
  }, "access"),
126
128
  value: 'access'
129
+ }, {
130
+ label: /*#__PURE__*/(0, _jsxRuntime.jsxs)(_material.Box, {
131
+ display: "flex",
132
+ alignItems: "center",
133
+ "data-cy": "configuration-tab-oauth",
134
+ children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_Login.default, {
135
+ sx: {
136
+ fontSize: 24
137
+ }
138
+ }), /*#__PURE__*/(0, _jsxRuntime.jsx)(_material.Box, {
139
+ ml: "16px",
140
+ children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_material.Box, {
141
+ style: {
142
+ color: '#222'
143
+ },
144
+ children: t('common.login')
145
+ })
146
+ })]
147
+ }, "oauth"),
148
+ value: 'oauth'
127
149
  }, {
128
150
  label: /*#__PURE__*/(0, _jsxRuntime.jsxs)(_material.Box, {
129
151
  display: "flex",
@@ -173,6 +195,8 @@ function BlockletPreferences(_ref) {
173
195
  });
174
196
  } else if (current === 'access') {
175
197
  content = /*#__PURE__*/(0, _jsxRuntime.jsx)(_index.default, {});
198
+ } else if (current === 'oauth') {
199
+ content = /*#__PURE__*/(0, _jsxRuntime.jsx)(_oauth.default, {});
176
200
  } else {
177
201
  // eslint-disable-next-line no-nested-ternary
178
202
  const pathPrefix = inService ? _constant.WELLKNOWN_SERVICE_PATH_PREFIX : process.env.NODE_ENV === 'production' ? info.routing.adminPath : '';
@@ -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 _spaceGatewaySelector = _interopRequireDefault(require("./component/space-gateway-selector"));
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,136 +57,36 @@ 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 [gatewayUrl, setGatewayUrl] = (0, _react.useState)('');
110
- const [endpoint, setEndpoint] = (0, _react.useState)(((_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) || '');
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) {
189
83
  return;
190
84
  }
191
85
  setIsLoading(true);
192
- await api.backupToSpaces({
86
+ await api.backupBlocklet({
193
87
  input: {
194
- appDid: blocklet.appDid
88
+ appDid: blocklet.appDid,
89
+ to: 'spaces'
195
90
  }
196
91
  });
197
92
  _toast.default.success(t('storage.spaces.backupSuccessfully'));
@@ -202,23 +97,6 @@ function Storage() {
202
97
  setIsLoading(false);
203
98
  }
204
99
  };
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
100
  (0, _react.useEffect)(() => {
223
101
  if (progress !== null && progress !== void 0 && progress.completed) {
224
102
  setIsLoading(false);
@@ -233,14 +111,11 @@ function Storage() {
233
111
  style: {
234
112
  maxWidth: '720px'
235
113
  },
236
- children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_spaceGatewaySelector.default, {
114
+ children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_spaceConnector.default, {
237
115
  sx: {
238
116
  marginTop: '24px',
239
117
  marginBottom: '40px'
240
- },
241
- onSelect: handleOnClickAuthorize,
242
- endpoint: endpoint,
243
- loading: !isReady
118
+ }
244
119
  }), endpoint && /*#__PURE__*/(0, _jsxRuntime.jsxs)(_Box.default, {
245
120
  mt: 3,
246
121
  display: "flex",
@@ -301,22 +176,8 @@ function Storage() {
301
176
  })
302
177
  })]
303
178
  })]
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
179
  })]
320
180
  });
321
181
  }
322
- Storage.propTypes = {};
182
+ Storage.propTypes = {};
183
+ Storage.defaultProps = {};
@@ -32,9 +32,17 @@ function InvitationReceive(_ref) {
32
32
  const {
33
33
  getPassportId
34
34
  } = (0, _usePassportId.default)();
35
+ let componentId;
36
+ if (typeof window !== 'undefined') {
37
+ var _window, _window$blocklet;
38
+ componentId = (_window = window) === null || _window === void 0 ? void 0 : (_window$blocklet = _window.blocklet) === null || _window$blocklet === void 0 ? void 0 : _window$blocklet.componentId;
39
+ }
35
40
  const extraParams = {
36
41
  passportId: getPassportId(),
37
- inviteId: invitation.inviteId
42
+ inviteId: invitation.inviteId,
43
+ // 生成 passport 信息需要 baseUrl 字段
44
+ baseUrl: window.location.origin,
45
+ componentId
38
46
  };
39
47
  const onClose = (0, _react.useCallback)(() => {
40
48
  setOpen(false);
package/lib/locales/en.js CHANGED
@@ -290,6 +290,7 @@ module.exports = {
290
290
  installFromMarket: 'Install New Blocklets',
291
291
  installFromUrl: 'Install From Url',
292
292
  installFromCreate: 'Create Blocklet',
293
+ installFromDiskBackup: 'Restore from this server',
293
294
  installedAt: 'Installed At',
294
295
  internal: 'Internal',
295
296
  startedAt: 'Started At',
@@ -319,14 +320,13 @@ module.exports = {
319
320
  stopDescription: 'Stopping the blocklet will make its public interfaces unaccessible, which may cause end user failures',
320
321
  confirmStop: 'Yes, Stop It',
321
322
  cancelDownloadDescription: 'Cancel download {name} ?',
322
- removeDescription: 'Removing the blocklet will erase code and data generated by this blocklet, which is not recoverable if you do not have any backups',
323
+ removeApplicationDescription: 'Removing the application will erase code and data generated by this application, which is not recoverable if you do not have any backups',
324
+ removeApplicationAfterBackup: 'Backup and delete the application. You can restore the application from this server if you need',
325
+ removeApplicationComplete: 'Delete the application directly',
323
326
  removeComponentDescription: 'Removing the component will erase code and data generated by this component, which is not recoverable if you do not have any backups',
324
- forceRemoveDescription: 'Deleting this Blocklet will delete all data',
325
- removeKeepData: 'Keep data for this blocklet, only remove code',
326
327
  removeComponentKeepData: 'Keep data for this component, only remove code',
327
- removeComplete: 'Remove both code and data for this blocklet',
328
- confirmRemove: 'Yes, Remove It',
329
328
  removeComponentComplete: 'Remove both code and data for this component',
329
+ confirmRemove: 'Yes, Remove It',
330
330
  confirmComponentRemove: 'Yes, Remove It',
331
331
  upgradeDescription: 'Upgrading the blocklet will make it temporarily unavailable, are you sure to continue?',
332
332
  confirmUpgrade: 'Yes, Upgrade It',
@@ -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',
@@ -918,6 +921,9 @@ module.exports = {
918
921
  passports: 'Passports',
919
922
  lastLogin: 'Last Login',
920
923
  lastLoginIp: 'Last Login IP',
924
+ source: 'Register Source',
925
+ source_derived: 'Derived from oauth',
926
+ source_wallet: 'DID Wallet',
921
927
  filter: 'Filter by',
922
928
  forbidLogin: 'Forbid Login',
923
929
  forbidLoginDescription: 'The user will not be able to connect to this application',
@@ -1240,5 +1246,18 @@ module.exports = {
1240
1246
  1: 'Last 1 Day',
1241
1247
  7: 'Last 1 Week'
1242
1248
  }
1249
+ },
1250
+ oauth: {
1251
+ save: 'Save',
1252
+ saveSuccess: 'Save successfully',
1253
+ saveFailed: 'Save failed',
1254
+ issued: 'Issued',
1255
+ auth0: {
1256
+ enable: 'Enable Auth0 login',
1257
+ domain: 'Domain',
1258
+ domainDescription: "Auth0's domain is required",
1259
+ clientId: 'ClientID',
1260
+ clientIdDescribe: "Auth0's clientId is required"
1261
+ }
1243
1262
  }
1244
1263
  };
package/lib/locales/zh.js CHANGED
@@ -296,6 +296,7 @@ module.exports = {
296
296
  installFromMarket: '从应用商店安装',
297
297
  installFromUrl: '通过 URL 安装',
298
298
  installFromCreate: '创建基石程序',
299
+ installFromDiskBackup: '从此 Server 还原',
299
300
  installedAt: '安装时间',
300
301
  internal: '内部',
301
302
  startedAt: '启动时间',
@@ -315,11 +316,10 @@ module.exports = {
315
316
  stopDescription: '停止该基石程序将会使页面不可以访问,可能会导致使用它的用户出现错误',
316
317
  confirmStop: '是的,停止',
317
318
  cancelDownloadDescription: '取消下载 {name} ?',
318
- removeDescription: '如果没有备份数据,删除该基石程序将会删除所有数据,包括基石程序运行时产生的所有数据',
319
+ removeApplicationDescription: '如果没有备份数据,删除应用将会删除所有数据,包括应用运行时产生的所有数据',
320
+ removeApplicationAfterBackup: '备份和删除该应用。 需要时您可以从此服务器恢复该应用',
321
+ removeApplicationComplete: '直接删除该应用',
319
322
  removeComponentDescription: '如果没有备份数据,删除该组件将会删除所有数据,包括组件运行时产生的所有数据',
320
- forceRemoveDescription: '删除该基石程序将会删除所有数据',
321
- removeKeepData: '保留该基石程序的数据,只删除基石程序',
322
- removeComplete: '删除基石程序和数据',
323
323
  removeComponentKeepData: '保留该组件的数据,只删除组件',
324
324
  removeComponentComplete: '删除组件和数据',
325
325
  confirmRemove: '是的, 删除',
@@ -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: '没有需要更新的组件',
@@ -921,6 +924,9 @@ module.exports = {
921
924
  passports: '通行证',
922
925
  lastLogin: '上次登录',
923
926
  lastLoginIp: '上次登陆 IP',
927
+ source: '注册来源',
928
+ source_derived: 'OAuth 账户派生',
929
+ source_wallet: 'DID Wallet',
924
930
  filter: '条件筛选',
925
931
  forbidLogin: '禁止登录',
926
932
  forbidLoginDescription: '该成员将无法登录此应用',
@@ -1245,5 +1251,18 @@ module.exports = {
1245
1251
  1: '最近 1 天',
1246
1252
  7: '最近 1 周'
1247
1253
  }
1254
+ },
1255
+ oauth: {
1256
+ save: '保存',
1257
+ saveSuccess: '保存成功',
1258
+ saveFailed: '保存失败',
1259
+ issued: '颁发',
1260
+ auth0: {
1261
+ enable: '是否开启 Auth0 登录',
1262
+ domain: 'Domain',
1263
+ domainDescription: '请输入 Auth0 的 Domain',
1264
+ clientId: 'ClientID',
1265
+ clientIdDescribe: '请输入 Auth0 的 ClientID'
1266
+ }
1248
1267
  }
1249
1268
  };
@@ -272,6 +272,15 @@ function MemberList(_ref2) {
272
272
  return e || '-';
273
273
  }
274
274
  }
275
+ }, {
276
+ label: t('team.member.source'),
277
+ name: 'source',
278
+ options: {
279
+ customBodyRender: e => {
280
+ const source = e || _constant.USER_TYPE.WALLET;
281
+ return t("team.member.source_".concat(source)) || '-';
282
+ }
283
+ }
275
284
  }, {
276
285
  label: t('common.actions'),
277
286
  name: '',
@@ -14,6 +14,7 @@ var _MenuItem = _interopRequireDefault(require("@mui/material/MenuItem"));
14
14
  var _Select = _interopRequireDefault(require("@mui/material/Select"));
15
15
  var _InputLabel = _interopRequireDefault(require("@mui/material/InputLabel"));
16
16
  var _FormControl = _interopRequireDefault(require("@mui/material/FormControl"));
17
+ var _constant = require("@abtnode/constant");
17
18
  var _context = require("@arcblock/ux/lib/Locale/context");
18
19
  var _Button = _interopRequireDefault(require("@arcblock/ux/lib/Button"));
19
20
  var _Alert = _interopRequireDefault(require("@arcblock/ux/lib/Alert"));
@@ -25,6 +26,7 @@ function IssuePassport(_ref) {
25
26
  let {
26
27
  teamDid,
27
28
  ownerDid,
29
+ ownerSource,
28
30
  roles,
29
31
  onCancel,
30
32
  onSuccess,
@@ -92,7 +94,7 @@ function IssuePassport(_ref) {
92
94
  "data-cy": "issue-passport-create-btn",
93
95
  children: [loading && /*#__PURE__*/(0, _jsxRuntime.jsx)(_CircularProgress.default, {
94
96
  size: 16
95
- }), t('team.passport.issuance.create.title')]
97
+ }), ownerSource === _constant.USER_TYPE.DERIVED ? t('oauth.issued') : t('team.passport.issuance.create.title')]
96
98
  })]
97
99
  }),
98
100
  children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_DialogContentText.default, {
@@ -142,6 +144,7 @@ function IssuePassport(_ref) {
142
144
  IssuePassport.propTypes = {
143
145
  teamDid: _propTypes.default.string.isRequired,
144
146
  ownerDid: _propTypes.default.string.isRequired,
147
+ ownerSource: _propTypes.default.oneOf([_constant.USER_TYPE.WALLET, _constant.USER_TYPE.DERIVED, undefined]),
145
148
  onCancel: _propTypes.default.func.isRequired,
146
149
  onSuccess: _propTypes.default.func.isRequired,
147
150
  onError: _propTypes.default.func,
@@ -151,5 +154,6 @@ IssuePassport.propTypes = {
151
154
  IssuePassport.defaultProps = {
152
155
  onError: () => {},
153
156
  roles: [],
154
- showOwnerPassport: false
157
+ showOwnerPassport: false,
158
+ ownerSource: _constant.USER_TYPE.WALLET
155
159
  };
@@ -307,6 +307,7 @@ function Passports(_ref2) {
307
307
  }), showIssueDialog && /*#__PURE__*/(0, _jsxRuntime.jsx)(_issuePassport.default, {
308
308
  teamDid: teamDid,
309
309
  ownerDid: user.did,
310
+ ownerSource: user.source,
310
311
  roles: roles,
311
312
  onCancel: () => setShowIssueDialog(false),
312
313
  onSuccess: () => {
package/package.json CHANGED
@@ -3,7 +3,7 @@
3
3
  "publishConfig": {
4
4
  "access": "public"
5
5
  },
6
- "version": "1.16.0-beta-8ee536d7",
6
+ "version": "1.16.0-beta-62b42401",
7
7
  "description": "UX components shared across abtnode packages",
8
8
  "main": "lib/index.js",
9
9
  "files": [
@@ -21,20 +21,20 @@
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-8ee536d7",
25
- "@abtnode/constant": "1.16.0-beta-8ee536d7",
26
- "@abtnode/util": "1.16.0-beta-8ee536d7",
27
- "@arcblock/did-connect": "^2.5.14",
24
+ "@abtnode/auth": "1.16.0-beta-62b42401",
25
+ "@abtnode/constant": "1.16.0-beta-62b42401",
26
+ "@abtnode/util": "1.16.0-beta-62b42401",
27
+ "@arcblock/did-connect": "^2.5.15",
28
28
  "@arcblock/did-motif": "^1.1.10",
29
- "@arcblock/icons": "^2.5.14",
30
- "@arcblock/react-hooks": "^2.5.14",
31
- "@arcblock/terminal": "^2.5.14",
32
- "@arcblock/ux": "^2.5.14",
33
- "@blocklet/constant": "1.16.0-beta-8ee536d7",
29
+ "@arcblock/icons": "^2.5.15",
30
+ "@arcblock/react-hooks": "^2.5.15",
31
+ "@arcblock/terminal": "^2.5.15",
32
+ "@arcblock/ux": "^2.5.15",
33
+ "@blocklet/constant": "1.16.0-beta-62b42401",
34
34
  "@blocklet/launcher-layout": "1.9.65",
35
- "@blocklet/list": "^0.11.6",
36
- "@blocklet/meta": "1.16.0-beta-8ee536d7",
37
- "@blocklet/ui-react": "^2.5.14",
35
+ "@blocklet/list": "^0.11.10",
36
+ "@blocklet/meta": "1.16.0-beta-62b42401",
37
+ "@blocklet/ui-react": "^2.5.15",
38
38
  "@emotion/react": "^11.10.4",
39
39
  "@emotion/styled": "^11.10.4",
40
40
  "@iconify/react": "^4.0.0",
@@ -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": "57d0c45be311a5fbc1c0fffa2814b62c1a3ee34c"
91
+ "gitHead": "6ef1c3601d0cfdcf5da0b55b4c54ef1fa9fce7d2"
92
92
  }