@abtnode/ux 1.16.29-next-680cf137 → 1.16.30-beta-00e8bdd1

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.
Files changed (44) hide show
  1. package/lib/blocklet/component/blocklet-owner-info.js +35 -0
  2. package/lib/blocklet/component/component-info-dialog.js +7 -2
  3. package/lib/blocklet/component/environment.js +16 -6
  4. package/lib/blocklet/component/index.js +30 -27
  5. package/lib/blocklet/configuration.js +2 -34
  6. package/lib/blocklet/disk-info.js +66 -55
  7. package/lib/blocklet/install-from-url.js +9 -3
  8. package/lib/blocklet/publish/create-release/blocklets.js +5 -5
  9. package/lib/blocklet/publish/create-release/branding.js +14 -11
  10. package/lib/blocklet/publish/create-release/connect-store-button.js +11 -10
  11. package/lib/blocklet/publish/create-release/header.js +136 -123
  12. package/lib/blocklet/publish/create-release/index.js +16 -16
  13. package/lib/blocklet/publish/create-release/project-setting.js +182 -0
  14. package/lib/blocklet/publish/create-release/resource-select.js +16 -12
  15. package/lib/blocklet/publish/hooks/use-want-to-connect-store.js +6 -2
  16. package/lib/blocklet/publish/utils/get-studio-store-list.js +3 -0
  17. package/lib/blocklet/publish/utils/parse-resource-relate-components.js +31 -0
  18. package/lib/blocklet/storage/auto-check-update.js +2 -2
  19. package/lib/blocklet/storage/connected.js +1 -3
  20. package/lib/blocklet/storage/disconnect.js +1 -7
  21. package/lib/contexts/blocklet-auto-check-update.js +54 -0
  22. package/lib/contexts/blocklet-storage.js +0 -19
  23. package/lib/hooks/blocklet.js +17 -5
  24. package/lib/locales/ar.js +8 -2
  25. package/lib/locales/de.js +8 -2
  26. package/lib/locales/en.js +6 -0
  27. package/lib/locales/es.js +8 -2
  28. package/lib/locales/fr.js +8 -2
  29. package/lib/locales/hi.js +8 -2
  30. package/lib/locales/i18n.db +0 -0
  31. package/lib/locales/id.js +8 -2
  32. package/lib/locales/ja.js +8 -2
  33. package/lib/locales/ko.js +8 -2
  34. package/lib/locales/pt.js +8 -2
  35. package/lib/locales/ru.js +8 -2
  36. package/lib/locales/th.js +8 -2
  37. package/lib/locales/vi.js +8 -2
  38. package/lib/locales/zh-tw.js +8 -2
  39. package/lib/locales/zh.js +8 -2
  40. package/lib/team/members/invite-member.js +16 -3
  41. package/lib/team/members/issue-passport.js +17 -2
  42. package/lib/team/members/member.js +59 -23
  43. package/lib/util/index.js +0 -14
  44. package/package.json +20 -20
@@ -738,7 +738,12 @@ export default {
738
738
  deleteStoreTip: '您確定要將{name}從連接商店列表中移除嗎?',
739
739
  disconnectStoreTip: '斷開連線後,blocklet 將從商店中移除。您確定要斷開連線嗎?',
740
740
  connectOrUpload: '連接或上傳',
741
- developerInfo: '開發者資訊'
741
+ developerInfo: '開發者資訊',
742
+ possibleSameStoreTip: '依賴的 Blocklets 優先使用同源 Store',
743
+ autoUploadTip: '創建發布後自動將 Blocklet 上傳到商店',
744
+ needProjectId: '請先創建一個專案',
745
+ projectSettings: '專案設定',
746
+ noStoreSelected: '請選擇現有商店或添加新商店以繼續'
742
747
  },
743
748
  titleValidationError: '標題長度必須至少為3到40個字符',
744
749
  descriptionValidationError: '描述長度必須介於3到160個字符之間',
@@ -1269,7 +1274,8 @@ export default {
1269
1274
  },
1270
1275
  activeUserSessions: '活躍用戶會話',
1271
1276
  forceLogout: '強制登出',
1272
- forceLogoutDescription: '確認是否強制登出此使用者?'
1277
+ forceLogoutDescription: '確認是否強制登出此使用者?',
1278
+ openProfile: '檢視個人檔案'
1273
1279
  },
1274
1280
  transferNode: {
1275
1281
  name: '轉讓所有權',
package/lib/locales/zh.js CHANGED
@@ -739,7 +739,12 @@ export default {
739
739
  deleteStoreTip: '您确定要将{name}从连接商店列表中移除吗?',
740
740
  disconnectStoreTip: '断开连接后,blocklet 将从商店中移除。您确定要断开连接吗?',
741
741
  connectOrUpload: '连接或上传',
742
- developerInfo: '开发者信息'
742
+ developerInfo: '开发者信息',
743
+ possibleSameStoreTip: '依赖的 Blocklets 优先使用同源 Store',
744
+ autoUploadTip: '创建发布后自动将 Blocklet 上传到商店',
745
+ needProjectId: '请先创建一个项目',
746
+ projectSettings: '项目设置',
747
+ noStoreSelected: '请选择现有店铺中的一个或添加新店铺以继续'
743
748
  },
744
749
  titleValidationError: '标题长度必须至少为3到40个字符',
745
750
  descriptionValidationError: '描述长度必须在3到160个字符之间'
@@ -1269,7 +1274,8 @@ export default {
1269
1274
  },
1270
1275
  activeUserSessions: '活跃用户会话',
1271
1276
  forceLogout: '强制注销',
1272
- forceLogoutDescription: '确认是否强制退出此用户?'
1277
+ forceLogoutDescription: '确认是否强制退出此用户?',
1278
+ openProfile: '查看个人资料'
1273
1279
  },
1274
1280
  transferNode: {
1275
1281
  name: '转移所有者',
@@ -1,5 +1,5 @@
1
1
  import PropTypes from 'prop-types';
2
- import { Alert, Box, CircularProgress, DialogContentText, MenuItem, Select, TextField, InputLabel, FormControl } from '@mui/material';
2
+ import { Alert, Box, CircularProgress, DialogContentText, MenuItem, Select, TextField, InputLabel, FormControl, Typography } from '@mui/material';
3
3
  import { useReactive } from 'ahooks';
4
4
  import Dialog from '@arcblock/ux/lib/Dialog';
5
5
  import { useLocaleContext } from '@arcblock/ux/lib/Locale/context';
@@ -139,8 +139,21 @@ export default function InviteMember({
139
139
  children: roles.filter(d => d.name !== 'owner').map(r => /*#__PURE__*/_jsx(MenuItem, {
140
140
  value: r.name,
141
141
  "data-cy": `invite-member-select-option-${r.name}`,
142
- children: /*#__PURE__*/_jsx("span", {
143
- children: r.title || r.name
142
+ children: /*#__PURE__*/_jsxs(Box, {
143
+ sx: {
144
+ display: 'flex',
145
+ flexDirection: 'column'
146
+ },
147
+ children: [/*#__PURE__*/_jsx(Typography, {
148
+ variant: "subtitle1",
149
+ children: r.title || r.name
150
+ }), /*#__PURE__*/_jsx(Typography, {
151
+ variant: "caption",
152
+ sx: {
153
+ opacity: 0.7
154
+ },
155
+ children: r.description
156
+ })]
144
157
  })
145
158
  }, r.name))
146
159
  })]
@@ -11,6 +11,7 @@ import FormControl from '@mui/material/FormControl';
11
11
  import { useLocaleContext } from '@arcblock/ux/lib/Locale/context';
12
12
  import Button from '@arcblock/ux/lib/Button';
13
13
  import Alert from '@mui/material/Alert';
14
+ import { Box } from '@mui/material';
14
15
  import { useNodeContext } from '../../contexts/node';
15
16
  import { formatError } from '../../util';
16
17
  import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
@@ -57,6 +58,7 @@ export default function IssuePassport({
57
58
  setLoading(false);
58
59
  }
59
60
  };
61
+ console.error('--debug--', roles);
60
62
  return /*#__PURE__*/_jsxs(Dialog, {
61
63
  title: t('team.passport.issue'),
62
64
  fullWidth: true,
@@ -118,8 +120,21 @@ export default function IssuePassport({
118
120
  children: roles.filter(d => showOwnerPassport || d.name !== 'owner').map(r => /*#__PURE__*/_jsx(MenuItem, {
119
121
  value: r.name,
120
122
  "data-cy": `issue-passport-select-option-${r.name}`,
121
- children: /*#__PURE__*/_jsx("span", {
122
- children: r.title || r.name
123
+ children: /*#__PURE__*/_jsxs(Box, {
124
+ sx: {
125
+ display: 'flex',
126
+ flexDirection: 'column'
127
+ },
128
+ children: [/*#__PURE__*/_jsx(Typography, {
129
+ variant: "subtitle1",
130
+ children: r.title || r.name
131
+ }), /*#__PURE__*/_jsx(Typography, {
132
+ variant: "caption",
133
+ sx: {
134
+ opacity: 0.7
135
+ },
136
+ children: r.description
137
+ })]
123
138
  })
124
139
  }, r.name))
125
140
  })]
@@ -1,5 +1,5 @@
1
1
  /* eslint-disable react/no-unstable-nested-components */
2
- import { useEffect } from 'react';
2
+ import { useEffect, useState } from 'react';
3
3
  import PropTypes from 'prop-types';
4
4
  import styled from '@emotion/styled';
5
5
  import Toast from '@arcblock/ux/lib/Toast';
@@ -14,8 +14,10 @@ import ForbidLoginIcon from '@arcblock/icons/lib/ForbidLoginIcon';
14
14
  import AllowLoginIcon from '@arcblock/icons/lib/AllowLoginIcon';
15
15
  import { getTextColor } from '@abtnode/auth/lib/util/create-passport-svg';
16
16
  import { useReactive } from 'ahooks';
17
+ import { Icon } from '@iconify/react';
17
18
  import { USER_TYPE } from '@abtnode/constant';
18
19
  import { LOGIN_PROVIDER, PROVIDER_NAME, TeamEvents } from '@blocklet/constant';
20
+ import { Button } from '@mui/material';
19
21
  import Tag from '../../tag';
20
22
  import DidAddress from '../../did-address';
21
23
  import Permission from '../../permission';
@@ -26,6 +28,7 @@ import PassportIssuances from './passport-issuances';
26
28
  import Passports from './passports';
27
29
  import ToggleUserApproval from './toggle-user-approval';
28
30
  import { parseAvatar } from './util';
31
+ import blockletSdk from '../../util/sdk';
29
32
  import UserConnections from './connections';
30
33
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
31
34
  function LinkUser({
@@ -75,6 +78,7 @@ export default function Member({
75
78
  issuances: null,
76
79
  tab: initTab || defaultTab
77
80
  });
81
+ const [profileUrl, setProfileUrl] = useState('');
78
82
  const getData = async (_teamDid, _userDid) => {
79
83
  try {
80
84
  const res = await api.doBatchQuery({
@@ -126,6 +130,12 @@ export default function Member({
126
130
  }
127
131
  }, [pageState.issuances]); // eslint-disable-line
128
132
 
133
+ useEffect(() => {
134
+ blockletSdk.user.getProfileUrl({
135
+ did: pageState.user?.did,
136
+ locale
137
+ }).then(setProfileUrl);
138
+ }, [pageState.user?.did, locale]);
129
139
  const handleChangeUser = async changedUser => {
130
140
  await getData(teamDid, changedUser.did);
131
141
  pageState.tab = defaultTab;
@@ -298,29 +308,55 @@ export default function Member({
298
308
  children: /*#__PURE__*/_jsx(Spinner, {})
299
309
  }), pageState.user && /*#__PURE__*/_jsxs("div", {
300
310
  children: [/*#__PURE__*/_jsxs(Box, {
301
- display: "flex",
302
- alignItems: "center",
303
- className: "info",
304
- children: [/*#__PURE__*/_jsx(Avatar, {
305
- src: pageState.user.avatar,
306
- style: {
307
- width: 48,
308
- height: 48,
309
- backgroundColor: 'transparent',
310
- marginRight: 16
311
- }
312
- }), /*#__PURE__*/_jsxs(Box, {
313
- children: [/*#__PURE__*/_jsx(Box, {
314
- className: "name",
315
- children: pageState.user.fullName
316
- }), /*#__PURE__*/_jsx(Box, {
317
- className: "did",
318
- mt: 1,
319
- children: /*#__PURE__*/_jsx(DidAddress, {
320
- did: pageState.user.did,
321
- showQrcode: true
322
- })
311
+ sx: {
312
+ display: 'flex',
313
+ flexDirection: 'row',
314
+ alignItems: 'center',
315
+ justifyContent: 'space-between'
316
+ },
317
+ children: [/*#__PURE__*/_jsxs(Box, {
318
+ display: "flex",
319
+ alignItems: "center",
320
+ className: "info",
321
+ children: [/*#__PURE__*/_jsx(Avatar, {
322
+ src: pageState.user.avatar,
323
+ style: {
324
+ width: 48,
325
+ height: 48,
326
+ backgroundColor: 'transparent',
327
+ marginRight: 16
328
+ }
329
+ }), /*#__PURE__*/_jsxs(Box, {
330
+ children: [/*#__PURE__*/_jsx(Box, {
331
+ className: "name",
332
+ children: pageState.user.fullName
333
+ }), /*#__PURE__*/_jsx(Box, {
334
+ className: "did",
335
+ mt: 1,
336
+ children: /*#__PURE__*/_jsx(DidAddress, {
337
+ compact: true,
338
+ responsive: false,
339
+ did: pageState.user.did,
340
+ showQrcode: true
341
+ })
342
+ })]
323
343
  })]
344
+ }), !!inService && /*#__PURE__*/_jsx("a", {
345
+ href: profileUrl,
346
+ target: "_blank",
347
+ rel: "noreferrer",
348
+ children: /*#__PURE__*/_jsxs(Button, {
349
+ variant: "contained",
350
+ color: "primary",
351
+ "data-cy": "issue-passport",
352
+ children: [/*#__PURE__*/_jsx(Icon, {
353
+ icon: "majesticons:open-line",
354
+ style: {
355
+ fontSize: 16,
356
+ marginRight: 4
357
+ }
358
+ }), t('team.member.openProfile')]
359
+ })
324
360
  })]
325
361
  }), /*#__PURE__*/_jsx(Box, {
326
362
  mx: 3,
package/lib/util/index.js CHANGED
@@ -226,20 +226,6 @@ export const checkInputByType = (type, value) => {
226
226
  return false;
227
227
  };
228
228
  export const formatUrl = url => humanizeUrl(url.split('?').shift());
229
- export const formatPerson = person => {
230
- if (!person) {
231
- return '-';
232
- }
233
- if (typeof person === 'string') {
234
- return person;
235
- }
236
- const name = person.name || '';
237
- const u = person.url || person.web;
238
- const url = u ? ` (${u})` : '';
239
- const e = person.email || person.mail;
240
- const email = e ? ` <${e}>` : '';
241
- return name + email + url;
242
- };
243
229
  export const shouldCheckDomainStatus = domain => domain &&
244
230
  // eslint-disable-line
245
231
  ![DOMAIN_FOR_IP_SITE, DOMAIN_FOR_IP_SITE_REGEXP, DOMAIN_FOR_DEFAULT_SITE, DOMAIN_FOR_INTERNAL_SITE].includes(domain);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@abtnode/ux",
3
- "version": "1.16.29-next-680cf137",
3
+ "version": "1.16.30-beta-00e8bdd1",
4
4
  "description": "UX components shared across abtnode packages",
5
5
  "publishConfig": {
6
6
  "access": "public"
@@ -25,25 +25,25 @@
25
25
  "author": "linchen <linchen1987@foxmail.com> (http://github.com/linchen1987)",
26
26
  "license": "Apache-2.0",
27
27
  "dependencies": {
28
- "@abtnode/auth": "1.16.29-next-680cf137",
29
- "@abtnode/constant": "1.16.29-next-680cf137",
30
- "@abtnode/util": "1.16.29-next-680cf137",
28
+ "@abtnode/auth": "1.16.30-beta-00e8bdd1",
29
+ "@abtnode/constant": "1.16.30-beta-00e8bdd1",
30
+ "@abtnode/util": "1.16.30-beta-00e8bdd1",
31
31
  "@ahooksjs/use-url-state": "^3.5.1",
32
- "@arcblock/did": "^1.18.126",
33
- "@arcblock/did-connect": "^2.10.7",
32
+ "@arcblock/did": "^1.18.128",
33
+ "@arcblock/did-connect": "^2.10.13",
34
34
  "@arcblock/did-motif": "^1.1.13",
35
- "@arcblock/icons": "^2.10.7",
36
- "@arcblock/nft-display": "2.10.7",
37
- "@arcblock/react-hooks": "^2.10.7",
38
- "@arcblock/terminal": "^2.10.7",
39
- "@arcblock/ux": "^2.10.7",
40
- "@blocklet/constant": "1.16.29-next-680cf137",
41
- "@blocklet/js-sdk": "1.16.29-next-680cf137",
42
- "@blocklet/launcher-layout": "2.3.33",
43
- "@blocklet/list": "^0.13.9",
44
- "@blocklet/meta": "1.16.29-next-680cf137",
45
- "@blocklet/ui-react": "^2.10.7",
46
- "@blocklet/uploader": "0.1.19",
35
+ "@arcblock/icons": "^2.10.13",
36
+ "@arcblock/nft-display": "2.10.13",
37
+ "@arcblock/react-hooks": "^2.10.13",
38
+ "@arcblock/terminal": "^2.10.13",
39
+ "@arcblock/ux": "^2.10.13",
40
+ "@blocklet/constant": "1.16.30-beta-00e8bdd1",
41
+ "@blocklet/js-sdk": "1.16.30-beta-00e8bdd1",
42
+ "@blocklet/launcher-layout": "2.3.39",
43
+ "@blocklet/list": "^0.13.14",
44
+ "@blocklet/meta": "1.16.30-beta-00e8bdd1",
45
+ "@blocklet/ui-react": "^2.10.13",
46
+ "@blocklet/uploader": "0.1.20",
47
47
  "@emotion/react": "^11.10.4",
48
48
  "@emotion/styled": "^11.10.4",
49
49
  "@iconify-icons/logos": "^1.2.36",
@@ -56,7 +56,7 @@
56
56
  "@mui/styles": "^5.15.11",
57
57
  "@mui/x-date-pickers": "^6.19.0",
58
58
  "@mui/x-tree-view": "^6.17.0",
59
- "@ocap/client": "1.18.126",
59
+ "@ocap/client": "1.18.128",
60
60
  "@uiw/react-markdown-preview": "^5.1.1",
61
61
  "ahooks": "^3.7.8",
62
62
  "axios": "^1.7.2",
@@ -108,5 +108,5 @@
108
108
  "jest": "^29.7.0",
109
109
  "jest-environment-jsdom": "^29.7.0"
110
110
  },
111
- "gitHead": "17b7e7c5e43c497980d4fe6b5bb20609328041bd"
111
+ "gitHead": "e165c7e64a2900b4c390b7435c0bb71abbf9b625"
112
112
  }