@abtnode/ux 1.16.11-next-ca5f18b5 → 1.16.11-next-3e55bc95

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.
@@ -377,7 +377,7 @@ function AddComponent(_ref2) {
377
377
  const _onCancel = () => {
378
378
  setActiveStepByIndex(x => x - 1);
379
379
  };
380
- const onGeneratePurchaseData = async () => {
380
+ const onGeneratePurchaseData = () => {
381
381
  const {
382
382
  pathPrefix: mountPoint,
383
383
  bundleDid,
@@ -127,7 +127,7 @@ const SpaceConnector = /*#__PURE__*/(0, _react.forwardRef)((_ref, ref) => {
127
127
  });
128
128
 
129
129
  // eslint-disable-next-line no-shadow
130
- const handleOnClickAuthorize = async gatewayUrl => {
130
+ const handleOnClickAuthorize = gatewayUrl => {
131
131
  if ((0, _lodash.isEmpty)(gatewayUrl)) {
132
132
  _Toast.default.error(t('storage.spaces.addressCannotEmpty', locale));
133
133
  return;
@@ -101,7 +101,7 @@ function InstallFromUrl(_ref) {
101
101
  setLoading(false);
102
102
  }
103
103
  };
104
- const _onConfirm = async () => {
104
+ const _onConfirm = () => {
105
105
  if (isComponentMode) {
106
106
  onSuccess(_objectSpread({
107
107
  meta
@@ -75,7 +75,7 @@ function BlockletMigration() {
75
75
  const [openConnect, setOpenConnect] = (0, _react.useState)(false);
76
76
  const [leftSec, setLeftSec] = (0, _react.useState)(5);
77
77
  const needMigration = blocklet && blocklet.structVersion !== _constant.APP_STRUCT_VERSION;
78
- const onMigrate = async () => {
78
+ const onMigrate = () => {
79
79
  try {
80
80
  if (blocklet.status === 'running') {
81
81
  _Toast.default.error(t('blocklet.migrate.tip.running'));
@@ -48,7 +48,7 @@ function ComponentPurchase(_ref) {
48
48
  meta
49
49
  });
50
50
  const handleConnectSuccess = async (result, decrypt) => {
51
- const success = async _ref2 => {
51
+ const success = _ref2 => {
52
52
  let {
53
53
  downloadTokenList
54
54
  } = _ref2;
@@ -56,11 +56,11 @@ function ComponentPurchase(_ref) {
56
56
  downloadTokenList
57
57
  });
58
58
  };
59
- const failure = async errorMessage => {
59
+ const failure = errorMessage => {
60
60
  _Toast.default.error(errorMessage);
61
61
  onCancel(errorMessage);
62
62
  };
63
- async function handleConnectSessionStatus(url) {
63
+ function handleConnectSessionStatus(url) {
64
64
  return (0, _pWaitFor.default)(() => {
65
65
  return _api.api.get(url).then(async _ref3 => {
66
66
  let {
@@ -203,13 +203,13 @@ const ComponentPurchaseSelect = /*#__PURE__*/(0, _react.forwardRef)((_ref5, ref)
203
203
  rest = _objectWithoutProperties(_ref5, _excluded);
204
204
  const [action, setAction] = (0, _react.useState)(mode !== 'both' ? mode : 'verify');
205
205
  const [step, setStep] = (0, _react.useState)(mode !== 'both' ? 2 : 1);
206
- const onSelect = async act => {
206
+ const onSelect = act => {
207
207
  if (act === action) {
208
208
  return;
209
209
  }
210
210
  setAction(act);
211
211
  };
212
- const onNext = async () => {
212
+ const onNext = () => {
213
213
  if (!action) {
214
214
  return;
215
215
  }
@@ -55,6 +55,8 @@ function useBackups(_ref) {
55
55
  });
56
56
  setBackups(data !== null && data !== void 0 ? data : []);
57
57
  }, 2000), []);
58
+
59
+ // eslint-disable-next-line require-await
58
60
  (0, _ahooks.useAsyncEffect)(async () => {
59
61
  fetchBackups();
60
62
  }, [blocklet, progress, loading]);
@@ -120,7 +120,7 @@ function ConnectTo(_ref) {
120
120
  }));
121
121
  }
122
122
  });
123
- const onAuthorizeConnectSuccess = async (response, decrypt) => {
123
+ const onAuthorizeConnectSuccess = (response, decrypt) => {
124
124
  setTimeout(async () => {
125
125
  setAuthorizeConnect(preValue => _objectSpread(_objectSpread({}, preValue), {}, {
126
126
  open: false
@@ -199,7 +199,7 @@ function ConnectTo(_ref) {
199
199
  }));
200
200
  refreshBlocklet();
201
201
  };
202
- const handleUseWalletConnect = async () => {
202
+ const handleUseWalletConnect = () => {
203
203
  setAuthorizeFromNftConnect(preValue => _objectSpread(_objectSpread({}, preValue), {}, {
204
204
  open: true,
205
205
  extraParams: {
@@ -213,7 +213,7 @@ function ConnectTo(_ref) {
213
213
  }
214
214
  }));
215
215
  };
216
- const handleUseSpaceGatewayConnect = async () => {
216
+ const handleUseSpaceGatewayConnect = () => {
217
217
  try {
218
218
  setLoading(true);
219
219
  setAuthorizeConnect(preValue => _objectSpread(_objectSpread({}, preValue), {}, {
@@ -40,7 +40,7 @@ function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj &&
40
40
  * @param {React.MouseEvent} event
41
41
  * @param {boolean} isOpen
42
42
  */
43
- const helpOpen = async (event, isOpen) => {
43
+ const helpOpen = (event, isOpen) => {
44
44
  event === null || event === void 0 ? void 0 : event.preventDefault();
45
45
  event === null || event === void 0 ? void 0 : event.stopPropagation();
46
46
  setOpen(isOpen);
@@ -114,7 +114,7 @@ DeleteDIDSpacesGateWay.propTypes = {
114
114
  }).isRequired
115
115
  };
116
116
  DeleteDIDSpacesGateWay.defaultProps = {
117
- onDelete: async () => undefined
117
+ onDelete: () => undefined
118
118
  };
119
119
  var _default = DeleteDIDSpacesGateWay;
120
120
  exports.default = _default;
@@ -175,7 +175,9 @@ function SpaceItem(_ref) {
175
175
  const {
176
176
  data: hasPermission,
177
177
  loading: hasPermissionLoading
178
- } = (0, _ahooks.useRequest)(async () => {
178
+ } = (0, _ahooks.useRequest)(
179
+ // eslint-disable-next-line require-await
180
+ async () => {
179
181
  if (!connected) {
180
182
  return true;
181
183
  }
@@ -51,7 +51,7 @@ function TransferOwner(_ref) {
51
51
  endpoint
52
52
  } = (0, _team.useTeamContext)();
53
53
  const [confirmCopied, setConfirmCopied] = (0, _react.useState)(false);
54
- const onCreateSession = async res => {
54
+ const onCreateSession = res => {
55
55
  setError(null);
56
56
  setLoading(true);
57
57
  try {
package/lib/util/index.js CHANGED
@@ -496,7 +496,7 @@ const getBlockletLogoUrl = _ref5 => {
496
496
  exports.getBlockletLogoUrl = getBlockletLogoUrl;
497
497
  const getPathPrefix = () => window.env && window.env.apiPrefix ? window.env.apiPrefix : '/';
498
498
  exports.getPathPrefix = getPathPrefix;
499
- const isUrlAccessible = async url => (0, _checkAccessibleBrowser.default)((0, _urlJoin.default)(new URL(url).origin, _constant.WELLKNOWN_PING_PREFIX));
499
+ const isUrlAccessible = url => (0, _checkAccessibleBrowser.default)((0, _urlJoin.default)(new URL(url).origin, _constant.WELLKNOWN_PING_PREFIX));
500
500
  exports.isUrlAccessible = isUrlAccessible;
501
501
  const getAccessibleUrl = async urls => {
502
502
  try {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@abtnode/ux",
3
- "version": "1.16.11-next-ca5f18b5",
3
+ "version": "1.16.11-next-3e55bc95",
4
4
  "description": "UX components shared across abtnode packages",
5
5
  "publishConfig": {
6
6
  "access": "public"
@@ -23,9 +23,9 @@
23
23
  "author": "linchen <linchen1987@foxmail.com> (http://github.com/linchen1987)",
24
24
  "license": "Apache-2.0",
25
25
  "dependencies": {
26
- "@abtnode/auth": "1.16.11-next-ca5f18b5",
27
- "@abtnode/constant": "1.16.11-next-ca5f18b5",
28
- "@abtnode/util": "1.16.11-next-ca5f18b5",
26
+ "@abtnode/auth": "1.16.11-next-3e55bc95",
27
+ "@abtnode/constant": "1.16.11-next-3e55bc95",
28
+ "@abtnode/util": "1.16.11-next-3e55bc95",
29
29
  "@ahooksjs/use-url-state": "^3.5.1",
30
30
  "@arcblock/did": "^1.18.80",
31
31
  "@arcblock/did-connect": "^2.5.48",
@@ -34,10 +34,10 @@
34
34
  "@arcblock/react-hooks": "^2.5.48",
35
35
  "@arcblock/terminal": "^2.5.48",
36
36
  "@arcblock/ux": "^2.5.48",
37
- "@blocklet/constant": "1.16.11-next-ca5f18b5",
37
+ "@blocklet/constant": "1.16.11-next-3e55bc95",
38
38
  "@blocklet/launcher-layout": "2.1.6",
39
39
  "@blocklet/list": "^0.11.28",
40
- "@blocklet/meta": "1.16.11-next-ca5f18b5",
40
+ "@blocklet/meta": "1.16.11-next-3e55bc95",
41
41
  "@blocklet/ui-react": "^2.5.48",
42
42
  "@emotion/react": "^11.10.4",
43
43
  "@emotion/styled": "^11.10.4",
@@ -93,5 +93,5 @@
93
93
  "@babel/preset-react": "^7.18.6",
94
94
  "babel-plugin-inline-react-svg": "^1.1.2"
95
95
  },
96
- "gitHead": "d797d0177d585b66d17876c99c994fda4d812f37"
96
+ "gitHead": "cf0251c2d85c617b03151495b5944061ceb373e5"
97
97
  }