@arcblock/ux 1.16.37 → 1.16.40

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.
package/lib/Util/index.js CHANGED
@@ -284,6 +284,8 @@ function formatToDatetime(date) {
284
284
  }
285
285
 
286
286
  function openWebWallet(_ref3) {
287
+ var _window;
288
+
287
289
  let {
288
290
  webWalletUrl,
289
291
  action = 'login',
@@ -291,6 +293,18 @@ function openWebWallet(_ref3) {
291
293
  url,
292
294
  windowFeatures
293
295
  } = _ref3;
296
+ // web wallet extension
297
+ const webWalletExtension = ((_window = window) === null || _window === void 0 ? void 0 : _window.ABT_DEV) || window.ABT;
298
+
299
+ if (webWalletExtension && typeof webWalletExtension.open === 'function') {
300
+ webWalletExtension.open({
301
+ action,
302
+ locale,
303
+ url: encodeURIComponent(url)
304
+ });
305
+ return;
306
+ }
307
+
294
308
  const defaultWindowFeatures = {
295
309
  toolbar: 'no',
296
310
  location: 'no',
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@arcblock/ux",
3
- "version": "1.16.37",
3
+ "version": "1.16.40",
4
4
  "description": "Common used react components for arcblock products",
5
5
  "keywords": [
6
6
  "react",
@@ -53,10 +53,10 @@
53
53
  "react": ">=16.12.0",
54
54
  "react-ga": "^2.7.0"
55
55
  },
56
- "gitHead": "a2cb907207e91d726cb891e2829071da8cdd8820",
56
+ "gitHead": "999176b384379fa9bfb2d7236e5b36eeb5a75471",
57
57
  "dependencies": {
58
- "@arcblock/icons": "^1.16.37",
59
- "@arcblock/react-hooks": "^1.16.37",
58
+ "@arcblock/icons": "^1.16.40",
59
+ "@arcblock/react-hooks": "^1.16.40",
60
60
  "@babel/plugin-syntax-dynamic-import": "^7.8.3",
61
61
  "@material-ui/core": "^4.12.3",
62
62
  "@material-ui/icons": "4.11.2",
package/src/Util/index.js CHANGED
@@ -232,6 +232,18 @@ export function openWebWallet({
232
232
  url,
233
233
  windowFeatures,
234
234
  }) {
235
+ // web wallet extension
236
+ const webWalletExtension = window?.ABT_DEV || window.ABT;
237
+ if (webWalletExtension && typeof webWalletExtension.open === 'function') {
238
+ webWalletExtension.open({
239
+ action,
240
+ locale,
241
+ url: encodeURIComponent(url),
242
+ });
243
+
244
+ return;
245
+ }
246
+
235
247
  const defaultWindowFeatures = {
236
248
  toolbar: 'no',
237
249
  location: 'no',