@abtnode/ux 1.16.5 → 1.16.6-beta-4562aa60

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.
@@ -4,7 +4,7 @@ Object.defineProperty(exports, "__esModule", {
4
4
  value: true
5
5
  });
6
6
  exports.default = TrustedIssuersWithPermission;
7
- var _react = require("react");
7
+ var _react = _interopRequireWildcard(require("react"));
8
8
  var _propTypes = _interopRequireDefault(require("prop-types"));
9
9
  var _styled = _interopRequireDefault(require("@emotion/styled"));
10
10
  var _cloneDeep = _interopRequireDefault(require("lodash/cloneDeep"));
@@ -31,6 +31,8 @@ var _trustedIssuer = _interopRequireDefault(require("./trusted-issuer"));
31
31
  var _jsxRuntime = require("react/jsx-runtime");
32
32
  var _templateObject;
33
33
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
34
+ 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); }
35
+ 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; }
34
36
  function _taggedTemplateLiteral(strings, raw) { if (!raw) { raw = strings.slice(0); } return Object.freeze(Object.defineProperties(strings, { raw: { value: Object.freeze(raw) } })); }
35
37
  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; }
36
38
  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; }
@@ -182,7 +184,9 @@ function TrustedIssuers(_ref) {
182
184
  "data-cy": "delete-mapping-rule",
183
185
  onClick: () => setDelConfirm({
184
186
  title: t('common.delete'),
185
- description: t('common.delConfirmDescription'),
187
+ description: t('common.delConfirmDescription', {
188
+ data: x.issuerDid
189
+ }),
186
190
  confirm: t('common.delConfirm'),
187
191
  cancel: t('common.cancel'),
188
192
  onConfirm: () => deleteTrustedIssuer(x.issuerDid),
@@ -195,7 +199,7 @@ function TrustedIssuers(_ref) {
195
199
  children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_DeleteIcon.default, {})
196
200
  })]
197
201
  })]
198
- })), !trustedPassports.length && /*#__PURE__*/(0, _jsxRuntime.jsx)(_Empty.default, {
202
+ }, x.issuerDid)), !trustedPassports.length && /*#__PURE__*/(0, _jsxRuntime.jsx)(_Empty.default, {
199
203
  children: t('common.empty')
200
204
  })]
201
205
  })]
package/lib/util/index.js CHANGED
@@ -28,7 +28,7 @@ exports.getBlockletUrls = getBlockletUrls;
28
28
  exports.getExplorerLink = getExplorerLink;
29
29
  exports.getPathPrefix = exports.getIssuePassportLink = exports.getInviteLink = void 0;
30
30
  exports.getRelativeTime = getRelativeTime;
31
- exports.getStoreList = void 0;
31
+ exports.getTransferAppLink = exports.getStoreList = void 0;
32
32
  exports.getWebWalletUrl = getWebWalletUrl;
33
33
  exports.isNewStoreUrl = exports.isInstalling = exports.isDownloading = exports.isChrome = exports.isCertificateMatch = exports.isBlockletDev = void 0;
34
34
  exports.isProtectedRole = isProtectedRole;
@@ -384,15 +384,29 @@ const getInviteLink = _ref2 => {
384
384
  return u.href;
385
385
  };
386
386
  exports.getInviteLink = getInviteLink;
387
- const getIssuePassportLink = _ref3 => {
387
+ const getTransferAppLink = _ref3 => {
388
388
  let {
389
- id,
389
+ transferId,
390
390
  endpoint
391
391
  } = _ref3;
392
392
  if (!endpoint) {
393
393
  return '';
394
394
  }
395
395
  const u = new URL(endpoint);
396
+ u.pathname = (0, _urlJoin.default)(u.pathname, _constant.WELLKNOWN_SERVICE_PATH_PREFIX, 'transfer');
397
+ u.searchParams.set('transferId', transferId);
398
+ return u.href;
399
+ };
400
+ exports.getTransferAppLink = getTransferAppLink;
401
+ const getIssuePassportLink = _ref4 => {
402
+ let {
403
+ id,
404
+ endpoint
405
+ } = _ref4;
406
+ if (!endpoint) {
407
+ return '';
408
+ }
409
+ const u = new URL(endpoint);
396
410
  u.pathname = (0, _urlJoin.default)(u.pathname, _constant.WELLKNOWN_SERVICE_PATH_PREFIX, 'issue-passport');
397
411
  u.searchParams.set('id', id);
398
412
  return u.href;
@@ -457,12 +471,12 @@ function formatFactoryPrice(blocklet) {
457
471
  }));
458
472
  return list;
459
473
  }
460
- const getBlockletLogoUrl = _ref4 => {
474
+ const getBlockletLogoUrl = _ref5 => {
461
475
  let {
462
476
  did,
463
477
  baseUrl,
464
478
  logoPath
465
- } = _ref4;
479
+ } = _ref5;
466
480
  if (logoPath && logoPath.startsWith('http')) {
467
481
  return logoPath;
468
482
  }
@@ -658,13 +672,13 @@ const toSlotDomain = domain => {
658
672
  return domain;
659
673
  };
660
674
  exports.toSlotDomain = toSlotDomain;
661
- const getStoreList = _ref5 => {
675
+ const getStoreList = _ref6 => {
662
676
  var _blocklet$meta, _blocklet$settings;
663
677
  let {
664
678
  fromBlocklet,
665
679
  nodeInfo,
666
680
  blocklet
667
- } = _ref5;
681
+ } = _ref6;
668
682
  const teamDid = fromBlocklet ? blocklet === null || blocklet === void 0 ? void 0 : (_blocklet$meta = blocklet.meta) === null || _blocklet$meta === void 0 ? void 0 : _blocklet$meta.did : nodeInfo === null || nodeInfo === void 0 ? void 0 : nodeInfo.did;
669
683
  const storeList = fromBlocklet ? (blocklet === null || blocklet === void 0 ? void 0 : (_blocklet$settings = blocklet.settings) === null || _blocklet$settings === void 0 ? void 0 : _blocklet$settings.storeList) || [] : (nodeInfo === null || nodeInfo === void 0 ? void 0 : nodeInfo.blockletRegistryList) || [];
670
684
  return {
package/package.json CHANGED
@@ -3,7 +3,7 @@
3
3
  "publishConfig": {
4
4
  "access": "public"
5
5
  },
6
- "version": "1.16.5",
6
+ "version": "1.16.6-beta-4562aa60",
7
7
  "description": "UX components shared across abtnode packages",
8
8
  "main": "lib/index.js",
9
9
  "files": [
@@ -22,20 +22,20 @@
22
22
  "author": "linchen <linchen1987@foxmail.com> (http://github.com/linchen1987)",
23
23
  "license": "MIT",
24
24
  "dependencies": {
25
- "@abtnode/auth": "1.16.5",
26
- "@abtnode/constant": "1.16.5",
27
- "@abtnode/util": "1.16.5",
28
- "@arcblock/did-connect": "^2.5.24",
25
+ "@abtnode/auth": "1.16.6-beta-4562aa60",
26
+ "@abtnode/constant": "1.16.6-beta-4562aa60",
27
+ "@abtnode/util": "1.16.6-beta-4562aa60",
28
+ "@arcblock/did-connect": "^2.5.27",
29
29
  "@arcblock/did-motif": "^1.1.10",
30
- "@arcblock/icons": "^2.5.24",
31
- "@arcblock/react-hooks": "^2.5.24",
32
- "@arcblock/terminal": "^2.5.24",
33
- "@arcblock/ux": "^2.5.24",
34
- "@blocklet/constant": "1.16.5",
35
- "@blocklet/launcher-layout": "^2.0.28",
30
+ "@arcblock/icons": "^2.5.27",
31
+ "@arcblock/react-hooks": "^2.5.27",
32
+ "@arcblock/terminal": "^2.5.27",
33
+ "@arcblock/ux": "^2.5.27",
34
+ "@blocklet/constant": "1.16.6-beta-4562aa60",
35
+ "@blocklet/launcher-layout": "2.0.30",
36
36
  "@blocklet/list": "^0.11.18",
37
- "@blocklet/meta": "1.16.5",
38
- "@blocklet/ui-react": "^2.5.24",
37
+ "@blocklet/meta": "1.16.6-beta-4562aa60",
38
+ "@blocklet/ui-react": "^2.5.27",
39
39
  "@emotion/react": "^11.10.4",
40
40
  "@emotion/styled": "^11.10.4",
41
41
  "@iconify/react": "^4.0.0",
@@ -61,6 +61,7 @@
61
61
  "lodash": "^4.17.21",
62
62
  "md5": "^2.3.0",
63
63
  "moment": "^2.29.4",
64
+ "ms": "^2.1.3",
64
65
  "nanoid": "^4.0.0",
65
66
  "notistack": "2.0.5",
66
67
  "p-wait-for": "^4.1.0",
@@ -89,5 +90,5 @@
89
90
  "@babel/preset-react": "^7.18.6",
90
91
  "babel-plugin-inline-react-svg": "^1.1.2"
91
92
  },
92
- "gitHead": "229effc24ce7e12a0dbe551b2cc57825c3803745"
93
+ "gitHead": "e49856099ffc3c16eda77480a7ad93b2e9760764"
93
94
  }