@abtnode/ux 1.16.21-beta-93c6e42b → 1.16.21-beta-da3f852a

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 (45) hide show
  1. package/es/exchange-passport.js +11 -20
  2. package/es/hooks/use-passport-id.js +2 -1
  3. package/es/issue-passport.js +30 -19
  4. package/es/layout/addon.js +5 -0
  5. package/es/locales/ar.js +1716 -0
  6. package/es/locales/de.js +1716 -0
  7. package/es/locales/en.js +1 -0
  8. package/es/locales/es.js +1716 -0
  9. package/es/locales/fr.js +1716 -0
  10. package/es/locales/hi.js +1716 -0
  11. package/es/locales/i18n.db +0 -0
  12. package/es/locales/id.js +1716 -0
  13. package/es/locales/index.js +29 -2
  14. package/es/locales/ja.js +1716 -0
  15. package/es/locales/ko.js +1716 -0
  16. package/es/locales/pt.js +1716 -0
  17. package/es/locales/ru.js +1716 -0
  18. package/es/locales/th.js +1716 -0
  19. package/es/locales/vi.js +1716 -0
  20. package/es/locales/zh-tw.js +1716 -0
  21. package/es/locales/zh.js +16 -6
  22. package/es/util/index.js +41 -3
  23. package/lib/exchange-passport.js +14 -10
  24. package/lib/hooks/use-passport-id.js +2 -1
  25. package/lib/issue-passport.js +31 -19
  26. package/lib/layout/addon.js +1 -1
  27. package/lib/locales/ar.js +1722 -0
  28. package/lib/locales/de.js +1722 -0
  29. package/lib/locales/en.js +1 -0
  30. package/lib/locales/es.js +1722 -0
  31. package/lib/locales/fr.js +1722 -0
  32. package/lib/locales/hi.js +1722 -0
  33. package/lib/locales/i18n.db +0 -0
  34. package/lib/locales/id.js +1722 -0
  35. package/lib/locales/index.js +30 -2
  36. package/lib/locales/ja.js +1722 -0
  37. package/lib/locales/ko.js +1722 -0
  38. package/lib/locales/pt.js +1722 -0
  39. package/lib/locales/ru.js +1722 -0
  40. package/lib/locales/th.js +1722 -0
  41. package/lib/locales/vi.js +1722 -0
  42. package/lib/locales/zh-tw.js +1722 -0
  43. package/lib/locales/zh.js +16 -6
  44. package/lib/util/index.js +43 -2
  45. package/package.json +19 -19
@@ -1,13 +1,13 @@
1
1
  /* eslint-disable react/prop-types */
2
- /* eslint-disable react/jsx-one-expression-per-line */
3
2
  import React, { useContext } from 'react';
4
- import styled from '@emotion/styled';
5
3
  import { useNavigate } from 'react-router-dom';
4
+ import Box from '@mui/material/Box';
6
5
  import Spinner from '@mui/material/CircularProgress';
7
6
  import Center from '@arcblock/ux/lib/Center';
8
7
  import Toast from '@arcblock/ux/lib/Toast';
9
8
  import DidConnect from '@arcblock/did-connect/lib/Connect';
10
9
  import { useLocaleContext } from '@arcblock/ux/lib/Locale/context';
10
+ import Fullpage from '@arcblock/did-connect/lib/Connect/fullpage';
11
11
  import { WELLKNOWN_SERVICE_PATH_PREFIX } from '@abtnode/constant';
12
12
  import wrapLocale from './wrap-locale';
13
13
  import { jsx as _jsx } from "react/jsx-runtime";
@@ -61,9 +61,14 @@ function ExchangePassport({
61
61
  children: /*#__PURE__*/_jsx(Spinner, {})
62
62
  });
63
63
  }
64
- return /*#__PURE__*/_jsx(Div, {
65
- children: /*#__PURE__*/_jsx("div", {
66
- className: "connect-wrapper",
64
+ return /*#__PURE__*/_jsx(Fullpage, {
65
+ did: window?.blocklet?.appPid || window?.env?.appPid,
66
+ children: /*#__PURE__*/_jsx(Box, {
67
+ sx: {
68
+ width: '560px',
69
+ maxWidth: '100%',
70
+ height: '100%'
71
+ },
67
72
  children: /*#__PURE__*/_jsx(DidConnect, {
68
73
  className: "connect",
69
74
  action: "exchange-passport",
@@ -85,18 +90,4 @@ function ExchangePassport({
85
90
  })
86
91
  });
87
92
  }
88
- export default wrapLocale(ExchangePassport);
89
- const Div = styled.div`
90
- box-sizing: border-box;
91
- width: 100%;
92
- height: 100vh;
93
- position: relative;
94
- display: flex;
95
- flex-direction: column;
96
- .connect-wrapper {
97
- flex: 1;
98
- }
99
- .connect {
100
- background: #fafafa;
101
- }
102
- `;
93
+ export default wrapLocale(ExchangePassport);
@@ -12,6 +12,7 @@ export default function usePassportId() {
12
12
  };
13
13
  return {
14
14
  getPassportId,
15
- setPassportId
15
+ setPassportId,
16
+ clearPassportId
16
17
  };
17
18
  }
@@ -8,6 +8,7 @@ import Box from '@mui/material/Box';
8
8
  import Center from '@arcblock/ux/lib/Center';
9
9
  import Button from '@arcblock/ux/lib/Button';
10
10
  import DidConnect from '@arcblock/did-connect/lib/Connect';
11
+ import Fullpage from '@arcblock/did-connect/lib/Connect/fullpage';
11
12
  import { LocaleContext } from '@arcblock/ux/lib/Locale/context';
12
13
  import { WELLKNOWN_SERVICE_PATH_PREFIX } from '@abtnode/constant';
13
14
  import wrapLocale from './wrap-locale';
@@ -94,25 +95,35 @@ function IssuePassport({
94
95
  })]
95
96
  })
96
97
  })
97
- }) : /*#__PURE__*/_jsx(DidConnect, {
98
- className: "connect",
99
- action: "issue-passport",
100
- forceConnected: false,
101
- autoConnect: false,
102
- checkFn: api.get,
103
- checkTimeout: 10 * 60 * 1000,
104
- webWalletUrl: webWalletUrl,
105
- onSuccess: onReceivePassport,
106
- locale: locale,
107
- messages: {
108
- title: t('issuePassport.title'),
109
- scan: t('issuePassport.description', {
110
- name: window.env.appName
111
- }),
112
- confirm: t('issuePassport.dialog.confirm'),
113
- success: t('issuePassport.dialog.success')
114
- },
115
- extraParams: extraParams
98
+ }) : /*#__PURE__*/_jsx(Fullpage, {
99
+ did: window?.blocklet?.appPid || window?.env?.appPid,
100
+ children: /*#__PURE__*/_jsx(Box, {
101
+ sx: {
102
+ width: '560px',
103
+ maxWidth: '100%',
104
+ height: '100%'
105
+ },
106
+ children: /*#__PURE__*/_jsx(DidConnect, {
107
+ className: "connect",
108
+ action: "issue-passport",
109
+ forceConnected: false,
110
+ autoConnect: false,
111
+ checkFn: api.get,
112
+ checkTimeout: 10 * 60 * 1000,
113
+ webWalletUrl: webWalletUrl,
114
+ onSuccess: onReceivePassport,
115
+ locale: locale,
116
+ messages: {
117
+ title: t('issuePassport.title'),
118
+ scan: t('issuePassport.description', {
119
+ name: window.env.appName
120
+ }),
121
+ confirm: t('issuePassport.dialog.confirm'),
122
+ success: t('issuePassport.dialog.success')
123
+ },
124
+ extraParams: extraParams
125
+ })
126
+ })
116
127
  })
117
128
  });
118
129
  }
@@ -105,6 +105,11 @@ const Div = styled.div`
105
105
  }
106
106
  }
107
107
 
108
+ .locale-addon .locales {
109
+ max-height: 400px;
110
+ overflow-y: auto;
111
+ }
112
+
108
113
  ${props => props.theme.breakpoints.down('md')} {
109
114
  > button,
110
115
  > a {