@abtnode/ux 1.16.15-beta-375899b6 → 1.16.15-beta-9318a201

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.
@@ -10,9 +10,10 @@ import SplitButton from '@arcblock/ux/lib/SplitButton';
10
10
  import Dialog from '@arcblock/ux/lib/Dialog';
11
11
  import Alert from '@arcblock/ux/lib/Alert';
12
12
  import { array, func } from 'prop-types';
13
+ import { PROD_DID_SPACES } from '@abtnode/constant';
13
14
  import { useBlockletContext } from '../../contexts/blocklet';
14
15
  import { axios } from '../../util/api';
15
- import { formatError, getPathPrefix, getWebWalletUrl } from '../../util';
16
+ import { formatError, getWebWalletUrl } from '../../util';
16
17
  import { useNodeContext } from '../../contexts/node';
17
18
  import useBlockletInfoForConnectDIDSpaces from '../../hooks/use-blocklet-info-for-connect-did-spaces';
18
19
  import { getDIDSpaceDidFromEndpoint, getSpaceBackupEndpoint, isValidSpaceGatewayUrl } from '../../util/spaces';
@@ -22,7 +23,7 @@ import { getDIDSpaceDidFromEndpoint, getSpaceBackupEndpoint, isValidSpaceGateway
22
23
  * spaceGateways?: Array<import('./connected').SpaceGateway>,
23
24
  * refreshSpaceGateways: () => void,
24
25
  * }} { spaceGateways, refreshSpaceGateways, ...rest }
25
- * @return {*}
26
+ * @return {React.Component}
26
27
  */
27
28
  import { jsx as _jsx } from "react/jsx-runtime";
28
29
  import { jsxs as _jsxs } from "react/jsx-runtime";
@@ -54,10 +55,12 @@ function ConnectTo({
54
55
  const webWalletUrl = getWebWalletUrl(info);
55
56
  const [authorizeFromNftConnect, setAuthorizeFromNftConnect] = useState({
56
57
  open: false,
57
- action: 'get-did-spaces-endpoint',
58
+ action: 'one-click-authorization',
58
59
  checkTimeout: 1000 * 300,
60
+ prefix: joinUrl(PROD_DID_SPACES.CORE_URL, 'space/api/did'),
61
+ baseUrl: new URL(PROD_DID_SPACES.CORE_URL).origin,
59
62
  checkFn: axios.create({
60
- baseURL: joinUrl(window.location.origin, getPathPrefix())
63
+ baseURL: joinUrl(PROD_DID_SPACES.CORE_URL, 'space')
61
64
  }).get,
62
65
  messages: {
63
66
  title: t('storage.spaces.provideNFT.title', {
@@ -16,6 +16,7 @@ var _SplitButton = _interopRequireDefault(require("@arcblock/ux/lib/SplitButton"
16
16
  var _Dialog = _interopRequireDefault(require("@arcblock/ux/lib/Dialog"));
17
17
  var _Alert = _interopRequireDefault(require("@arcblock/ux/lib/Alert"));
18
18
  var _propTypes = require("prop-types");
19
+ var _constant2 = require("@abtnode/constant");
19
20
  var _blocklet = require("../../contexts/blocklet");
20
21
  var _api = require("../../util/api");
21
22
  var _util = require("../../util");
@@ -30,7 +31,7 @@ const _excluded = ["spaceGateways", "refreshSpaceGateways"];
30
31
  * spaceGateways?: Array<import('./connected').SpaceGateway>,
31
32
  * refreshSpaceGateways: () => void,
32
33
  * }} { spaceGateways, refreshSpaceGateways, ...rest }
33
- * @return {*}
34
+ * @return {React.Component}
34
35
  */
35
36
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
36
37
  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); }
@@ -70,10 +71,12 @@ function ConnectTo(_ref) {
70
71
  const webWalletUrl = (0, _util.getWebWalletUrl)(info);
71
72
  const [authorizeFromNftConnect, setAuthorizeFromNftConnect] = (0, _react.useState)({
72
73
  open: false,
73
- action: 'get-did-spaces-endpoint',
74
+ action: 'one-click-authorization',
74
75
  checkTimeout: 1000 * 300,
76
+ prefix: (0, _urlJoin.default)(_constant2.PROD_DID_SPACES.CORE_URL, 'space/api/did'),
77
+ baseUrl: new URL(_constant2.PROD_DID_SPACES.CORE_URL).origin,
75
78
  checkFn: _api.axios.create({
76
- baseURL: (0, _urlJoin.default)(window.location.origin, (0, _util.getPathPrefix)())
79
+ baseURL: (0, _urlJoin.default)(_constant2.PROD_DID_SPACES.CORE_URL, 'space')
77
80
  }).get,
78
81
  messages: {
79
82
  title: t('storage.spaces.provideNFT.title', {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@abtnode/ux",
3
- "version": "1.16.15-beta-375899b6",
3
+ "version": "1.16.15-beta-9318a201",
4
4
  "description": "UX components shared across abtnode packages",
5
5
  "publishConfig": {
6
6
  "access": "public"
@@ -27,9 +27,9 @@
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.15-beta-375899b6",
31
- "@abtnode/constant": "1.16.15-beta-375899b6",
32
- "@abtnode/util": "1.16.15-beta-375899b6",
30
+ "@abtnode/auth": "1.16.15-beta-9318a201",
31
+ "@abtnode/constant": "1.16.15-beta-9318a201",
32
+ "@abtnode/util": "1.16.15-beta-9318a201",
33
33
  "@ahooksjs/use-url-state": "^3.5.1",
34
34
  "@arcblock/did": "^1.18.89",
35
35
  "@arcblock/did-connect": "^2.7.6",
@@ -39,10 +39,10 @@
39
39
  "@arcblock/react-hooks": "^2.7.6",
40
40
  "@arcblock/terminal": "^2.7.6",
41
41
  "@arcblock/ux": "^2.7.6",
42
- "@blocklet/constant": "1.16.15-beta-375899b6",
42
+ "@blocklet/constant": "1.16.15-beta-9318a201",
43
43
  "@blocklet/launcher-layout": "2.1.93",
44
44
  "@blocklet/list": "^0.12.27",
45
- "@blocklet/meta": "1.16.15-beta-375899b6",
45
+ "@blocklet/meta": "1.16.15-beta-9318a201",
46
46
  "@blocklet/ui-react": "^2.7.6",
47
47
  "@emotion/react": "^11.10.4",
48
48
  "@emotion/styled": "^11.10.4",
@@ -98,7 +98,7 @@
98
98
  "babel-plugin-inline-react-svg": "^1.1.2",
99
99
  "glob": "^10.3.3"
100
100
  },
101
- "gitHead": "c999a7f47ecdca1494eb53fc177d28899b3effc9",
101
+ "gitHead": "f3722cbd4fe10c5fa083cad7e859ecff6095060d",
102
102
  "exports": {
103
103
  ".": {
104
104
  "import": "./es/index.js",