@abtnode/ux 1.7.26 → 1.8.1
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/card-selector.js +28 -28
- package/lib/invitation/invitation-app.js +26 -15
- package/lib/invitation/invitation-passport.js +69 -57
- package/lib/invitation/invitation-receive.js +38 -34
- package/lib/invitation/invitation-user.js +23 -22
- package/lib/invitation/invitation.js +23 -21
- package/lib/issue-passport.js +54 -47
- package/lib/launch-blocklet/content-layout.js +11 -3
- package/lib/launch-blocklet/page-header.js +11 -7
- package/lib/layout/addon.js +29 -27
- package/lib/lost-passport.js +135 -110
- package/lib/nav-logo.js +63 -39
- package/lib/schema-form/color-input.js +123 -0
- package/lib/schema-form/common-prop-types.js +24 -0
- package/lib/schema-form/index.js +247 -0
- package/lib/schema-form/passport-input.js +82 -0
- package/lib/schema-form/required.js +19 -0
- package/lib/schema-form/text-input.js +87 -0
- package/lib/toast.js +17 -14
- package/lib/util/index.js +2 -1
- package/lib/wrap-locale.js +12 -8
- package/package.json +9 -7
package/lib/issue-passport.js
CHANGED
|
@@ -5,7 +5,7 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
5
5
|
});
|
|
6
6
|
exports.default = void 0;
|
|
7
7
|
|
|
8
|
-
var _react =
|
|
8
|
+
var _react = require("react");
|
|
9
9
|
|
|
10
10
|
var _styledComponents = _interopRequireDefault(require("styled-components"));
|
|
11
11
|
|
|
@@ -31,11 +31,9 @@ var _wrapLocale = _interopRequireDefault(require("./wrap-locale"));
|
|
|
31
31
|
|
|
32
32
|
var _usePassportId = _interopRequireDefault(require("./hooks/use-passport-id"));
|
|
33
33
|
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
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); }
|
|
34
|
+
var _jsxRuntime = require("react/jsx-runtime");
|
|
37
35
|
|
|
38
|
-
function
|
|
36
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
39
37
|
|
|
40
38
|
/* eslint-disable react/jsx-one-expression-per-line, no-undef */
|
|
41
39
|
// eslint-disable-next-line react/prop-types
|
|
@@ -92,48 +90,57 @@ function IssuePassport(_ref) {
|
|
|
92
90
|
history.replace('/');
|
|
93
91
|
};
|
|
94
92
|
|
|
95
|
-
return /*#__PURE__*/
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
93
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsx)(Div, {
|
|
94
|
+
children: success ? /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
|
|
95
|
+
className: "login",
|
|
96
|
+
children: /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
|
|
97
|
+
className: "connect",
|
|
98
|
+
children: /*#__PURE__*/(0, _jsxRuntime.jsxs)(_Box.default, {
|
|
99
|
+
textAlign: "center",
|
|
100
|
+
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_Box.default, {
|
|
101
|
+
mb: 3,
|
|
102
|
+
color: "success.main",
|
|
103
|
+
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_CheckCircle.default, {
|
|
104
|
+
style: {
|
|
105
|
+
fontSize: 60
|
|
106
|
+
}
|
|
107
|
+
})
|
|
108
|
+
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(_Typography.default, {
|
|
109
|
+
component: "p",
|
|
110
|
+
variant: "body1",
|
|
111
|
+
className: "subheader",
|
|
112
|
+
children: t('issuePassport.dialog.success')
|
|
113
|
+
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(_Box.default, {
|
|
114
|
+
mt: 3,
|
|
115
|
+
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_Button.default, {
|
|
116
|
+
variant: "contained",
|
|
117
|
+
color: "primary",
|
|
118
|
+
onClick: onUsePassport,
|
|
119
|
+
children: t('issuePassport.dialog.loginWithPassport')
|
|
120
|
+
})
|
|
121
|
+
})]
|
|
122
|
+
})
|
|
123
|
+
})
|
|
124
|
+
}) : /*#__PURE__*/(0, _jsxRuntime.jsx)(_Connect.default, {
|
|
125
|
+
className: "connect",
|
|
126
|
+
action: "issue-passport",
|
|
127
|
+
checkFn: api.get,
|
|
128
|
+
checkTimeout: 10 * 60 * 1000,
|
|
129
|
+
socketUrl: api.socketUrl,
|
|
130
|
+
webWalletUrl: webWalletUrl,
|
|
131
|
+
onSuccess: onReceivePassport,
|
|
132
|
+
locale: locale,
|
|
133
|
+
messages: {
|
|
134
|
+
title: t('issuePassport.title'),
|
|
135
|
+
scan: t('issuePassport.description', {
|
|
136
|
+
name: window.env.appName
|
|
137
|
+
}),
|
|
138
|
+
confirm: t('issuePassport.dialog.confirm'),
|
|
139
|
+
success: t('issuePassport.dialog.success')
|
|
140
|
+
},
|
|
141
|
+
extraParams: extraParams
|
|
142
|
+
})
|
|
143
|
+
});
|
|
137
144
|
}
|
|
138
145
|
|
|
139
146
|
const Div = (0, _styledComponents.default)(_Center.default).withConfig({
|
|
@@ -5,16 +5,22 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
5
5
|
});
|
|
6
6
|
exports.default = ContentLayout;
|
|
7
7
|
|
|
8
|
-
var _react = _interopRequireDefault(require("react"));
|
|
9
|
-
|
|
10
8
|
var _styledComponents = _interopRequireDefault(require("styled-components"));
|
|
11
9
|
|
|
12
10
|
var _propTypes = _interopRequireDefault(require("prop-types"));
|
|
13
11
|
|
|
12
|
+
var _jsxRuntime = require("react/jsx-runtime");
|
|
13
|
+
|
|
14
14
|
const _excluded = ["children"];
|
|
15
15
|
|
|
16
16
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
17
17
|
|
|
18
|
+
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; }
|
|
19
|
+
|
|
20
|
+
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; }
|
|
21
|
+
|
|
22
|
+
function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
|
23
|
+
|
|
18
24
|
function _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }
|
|
19
25
|
|
|
20
26
|
function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }
|
|
@@ -25,7 +31,9 @@ function ContentLayout(_ref) {
|
|
|
25
31
|
} = _ref,
|
|
26
32
|
props = _objectWithoutProperties(_ref, _excluded);
|
|
27
33
|
|
|
28
|
-
return /*#__PURE__*/
|
|
34
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsx)(Container, _objectSpread(_objectSpread({}, props), {}, {
|
|
35
|
+
children: children
|
|
36
|
+
}));
|
|
29
37
|
}
|
|
30
38
|
|
|
31
39
|
ContentLayout.propTypes = {
|
|
@@ -5,12 +5,12 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
5
5
|
});
|
|
6
6
|
exports.default = void 0;
|
|
7
7
|
|
|
8
|
-
var _react = _interopRequireDefault(require("react"));
|
|
9
|
-
|
|
10
8
|
var _styledComponents = _interopRequireDefault(require("styled-components"));
|
|
11
9
|
|
|
12
10
|
var _propTypes = _interopRequireDefault(require("prop-types"));
|
|
13
11
|
|
|
12
|
+
var _jsxRuntime = require("react/jsx-runtime");
|
|
13
|
+
|
|
14
14
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
15
15
|
|
|
16
16
|
function PageHeader(_ref) {
|
|
@@ -18,11 +18,15 @@ function PageHeader(_ref) {
|
|
|
18
18
|
title,
|
|
19
19
|
subTitle
|
|
20
20
|
} = _ref;
|
|
21
|
-
return /*#__PURE__*/
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
21
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsxs)(Content, {
|
|
22
|
+
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
|
|
23
|
+
className: "title",
|
|
24
|
+
children: title
|
|
25
|
+
}), /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
|
|
26
|
+
className: "sub-title",
|
|
27
|
+
children: subTitle
|
|
28
|
+
})]
|
|
29
|
+
});
|
|
26
30
|
}
|
|
27
31
|
|
|
28
32
|
const Content = _styledComponents.default.div.withConfig({
|
package/lib/layout/addon.js
CHANGED
|
@@ -5,7 +5,7 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
5
5
|
});
|
|
6
6
|
exports.default = HeaderAddon;
|
|
7
7
|
|
|
8
|
-
var _react =
|
|
8
|
+
var _react = require("react");
|
|
9
9
|
|
|
10
10
|
var _styledComponents = _interopRequireDefault(require("styled-components"));
|
|
11
11
|
|
|
@@ -13,8 +13,6 @@ var _propTypes = _interopRequireDefault(require("prop-types"));
|
|
|
13
13
|
|
|
14
14
|
var _IconButton = _interopRequireDefault(require("@mui/material/IconButton"));
|
|
15
15
|
|
|
16
|
-
var _HelpOutline = _interopRequireDefault(require("@mui/icons-material/HelpOutline"));
|
|
17
|
-
|
|
18
16
|
var _reactRouterDom = require("react-router-dom");
|
|
19
17
|
|
|
20
18
|
var _SessionManager = _interopRequireDefault(require("@arcblock/did-connect/lib/SessionManager"));
|
|
@@ -23,19 +21,23 @@ var _selector = _interopRequireDefault(require("@arcblock/ux/lib/Locale/selector
|
|
|
23
21
|
|
|
24
22
|
var _context = require("@arcblock/ux/lib/Locale/context");
|
|
25
23
|
|
|
26
|
-
var
|
|
24
|
+
var _Globe = _interopRequireDefault(require("@arcblock/icons/lib/Globe"));
|
|
25
|
+
|
|
26
|
+
var _QuestionMarkCircle = _interopRequireDefault(require("@arcblock/icons/lib/QuestionMarkCircle"));
|
|
27
|
+
|
|
28
|
+
var _jsxRuntime = require("react/jsx-runtime");
|
|
27
29
|
|
|
28
30
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
29
31
|
|
|
30
|
-
function
|
|
32
|
+
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; }
|
|
31
33
|
|
|
32
|
-
function
|
|
34
|
+
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; }
|
|
35
|
+
|
|
36
|
+
function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
|
33
37
|
|
|
34
|
-
/* eslint-disable react/jsx-one-expression-per-line */
|
|
35
38
|
function HeaderAddon(_ref) {
|
|
36
39
|
let {
|
|
37
40
|
SessionContext,
|
|
38
|
-
webWalletUrl,
|
|
39
41
|
extraItems,
|
|
40
42
|
showLocale,
|
|
41
43
|
showHelper,
|
|
@@ -49,7 +51,6 @@ function HeaderAddon(_ref) {
|
|
|
49
51
|
locale
|
|
50
52
|
} = (0, _react.useContext)(_context.LocaleContext);
|
|
51
53
|
const location = (0, _reactRouterDom.useLocation)();
|
|
52
|
-
const walletUrl = webWalletUrl || (0, _utils.getWebWalletUrl)();
|
|
53
54
|
const docPaths = {
|
|
54
55
|
'/dashboard': '/introduction/abtnode-overview',
|
|
55
56
|
'/store': '/marketplace',
|
|
@@ -76,23 +77,24 @@ function HeaderAddon(_ref) {
|
|
|
76
77
|
window.open("https://docs.arcblock.io/abtnode/".concat(locale).concat(path), '_blank');
|
|
77
78
|
};
|
|
78
79
|
|
|
79
|
-
return /*#__PURE__*/
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
80
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsxs)(Div, {
|
|
81
|
+
children: [extraItems.map((x, index) => /*#__PURE__*/(0, _react.cloneElement)(x, {
|
|
82
|
+
key: index
|
|
83
|
+
})), showLocale && /*#__PURE__*/(0, _jsxRuntime.jsx)(_selector.default, {
|
|
84
|
+
"data-cy": "locale-addon",
|
|
85
|
+
icon: _Globe.default,
|
|
86
|
+
size: 23,
|
|
87
|
+
showText: false,
|
|
88
|
+
className: "locale-addon"
|
|
89
|
+
}), showHelper && /*#__PURE__*/(0, _jsxRuntime.jsx)(_IconButton.default, {
|
|
90
|
+
onClick: onHelpClick,
|
|
91
|
+
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_QuestionMarkCircle.default, {})
|
|
92
|
+
}), showSessionManager && /*#__PURE__*/(0, _jsxRuntime.jsx)(_SessionManager.default, _objectSpread({
|
|
93
|
+
session: session,
|
|
94
|
+
size: 24,
|
|
95
|
+
showRole: true
|
|
96
|
+
}, sessionManagerProps))]
|
|
97
|
+
});
|
|
96
98
|
}
|
|
97
99
|
|
|
98
100
|
HeaderAddon.propTypes = {
|
|
@@ -116,4 +118,4 @@ HeaderAddon.defaultProps = {
|
|
|
116
118
|
const Div = _styledComponents.default.div.withConfig({
|
|
117
119
|
displayName: "addon__Div",
|
|
118
120
|
componentId: "sc-5tyqcw-0"
|
|
119
|
-
})(["display:flex;justify-content:center;align-items:center;.user-addon{.user-avatar{width:28px;border-radius:14px;height:auto;}}", "{> button,> a{padding-left:8px;padding-right:8px;}}"], props => props.theme.breakpoints.down('md'));
|
|
121
|
+
})(["display:flex;justify-content:center;align-items:center;.MuiIconButton-root svg{width:26px;height:26px;}.user-addon{.user-avatar{width:28px;border-radius:14px;height:auto;}}", "{> button,> a{padding-left:8px;padding-right:8px;}}"], props => props.theme.breakpoints.down('md'));
|
package/lib/lost-passport.js
CHANGED
|
@@ -5,7 +5,7 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
5
5
|
});
|
|
6
6
|
exports.default = void 0;
|
|
7
7
|
|
|
8
|
-
var _react =
|
|
8
|
+
var _react = require("react");
|
|
9
9
|
|
|
10
10
|
var _styledComponents = _interopRequireDefault(require("styled-components"));
|
|
11
11
|
|
|
@@ -49,11 +49,11 @@ var _wrapLocale = _interopRequireDefault(require("./wrap-locale"));
|
|
|
49
49
|
|
|
50
50
|
var _usePassportId = _interopRequireDefault(require("./hooks/use-passport-id"));
|
|
51
51
|
|
|
52
|
-
|
|
52
|
+
var _jsxRuntime = require("react/jsx-runtime");
|
|
53
53
|
|
|
54
|
-
function
|
|
54
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
55
55
|
|
|
56
|
-
|
|
56
|
+
/* eslint-disable react/no-unstable-nested-components */
|
|
57
57
|
|
|
58
58
|
/* eslint-disable react/jsx-one-expression-per-line */
|
|
59
59
|
// eslint-disable-next-line react/prop-types
|
|
@@ -64,13 +64,13 @@ function ColorStepIcon(_ref) {
|
|
|
64
64
|
completed
|
|
65
65
|
} = _ref;
|
|
66
66
|
const icons = {
|
|
67
|
-
1: /*#__PURE__*/
|
|
67
|
+
1: /*#__PURE__*/(0, _jsxRuntime.jsx)(_ViewList.default, {
|
|
68
68
|
className: "step-icon"
|
|
69
69
|
}),
|
|
70
|
-
2: /*#__PURE__*/
|
|
70
|
+
2: /*#__PURE__*/(0, _jsxRuntime.jsx)(_GetApp.default, {
|
|
71
71
|
className: "step-icon"
|
|
72
72
|
}),
|
|
73
|
-
3: /*#__PURE__*/
|
|
73
|
+
3: /*#__PURE__*/(0, _jsxRuntime.jsx)(_Done.default, {
|
|
74
74
|
className: "step-icon"
|
|
75
75
|
})
|
|
76
76
|
};
|
|
@@ -84,9 +84,10 @@ function ColorStepIcon(_ref) {
|
|
|
84
84
|
classNames.push('step-icon-w--completed');
|
|
85
85
|
}
|
|
86
86
|
|
|
87
|
-
return /*#__PURE__*/
|
|
88
|
-
className: classNames.join(' ')
|
|
89
|
-
|
|
87
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
|
|
88
|
+
className: classNames.join(' '),
|
|
89
|
+
children: icons[String(icon)]
|
|
90
|
+
});
|
|
90
91
|
} // eslint-disable-next-line react/prop-types
|
|
91
92
|
|
|
92
93
|
|
|
@@ -170,7 +171,7 @@ function LostPassport(_ref2) {
|
|
|
170
171
|
label: t('lostPassport.selectPassport'),
|
|
171
172
|
content: () => {
|
|
172
173
|
if (!user) {
|
|
173
|
-
return /*#__PURE__*/
|
|
174
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsx)(_Connect.default, {
|
|
174
175
|
popup: true,
|
|
175
176
|
open: true,
|
|
176
177
|
hideCloseButton: true,
|
|
@@ -190,58 +191,70 @@ function LostPassport(_ref2) {
|
|
|
190
191
|
});
|
|
191
192
|
}
|
|
192
193
|
|
|
193
|
-
return /*#__PURE__*/
|
|
194
|
-
className: "select-passport"
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
194
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsxs)(_Box.default, {
|
|
195
|
+
className: "select-passport",
|
|
196
|
+
children: [/*#__PURE__*/(0, _jsxRuntime.jsxs)(_Box.default, {
|
|
197
|
+
my: 1,
|
|
198
|
+
display: "flex",
|
|
199
|
+
alignItems: "center",
|
|
200
|
+
className: "user-info",
|
|
201
|
+
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_Avatar.default, {
|
|
202
|
+
src: user.avatar,
|
|
203
|
+
style: {
|
|
204
|
+
width: 48,
|
|
205
|
+
height: 48,
|
|
206
|
+
backgroundColor: 'transparent',
|
|
207
|
+
marginRight: 16
|
|
208
|
+
}
|
|
209
|
+
}), /*#__PURE__*/(0, _jsxRuntime.jsxs)(_Box.default, {
|
|
210
|
+
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_Box.default, {
|
|
211
|
+
className: "name",
|
|
212
|
+
children: user.fullName
|
|
213
|
+
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(_Box.default, {
|
|
214
|
+
className: "did",
|
|
215
|
+
mt: 1,
|
|
216
|
+
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_Address.default, {
|
|
217
|
+
children: user.did
|
|
218
|
+
})
|
|
219
|
+
})]
|
|
220
|
+
})]
|
|
221
|
+
}), /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
|
|
222
|
+
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_cardSelector.default, {
|
|
223
|
+
width: 230,
|
|
224
|
+
height: 306,
|
|
225
|
+
cardSpace: 24,
|
|
226
|
+
list: user.passportTypes.map(x => {
|
|
227
|
+
return {
|
|
228
|
+
src: createPassportSvg({
|
|
229
|
+
title: x.title,
|
|
230
|
+
issuer: x.issuer.name,
|
|
231
|
+
issuerDid: x.issuer.id,
|
|
232
|
+
ownerName: user.fullName,
|
|
233
|
+
ownerAvatarUrl: user.avatar,
|
|
234
|
+
isDataUrl: true,
|
|
235
|
+
preferredColor: passportColor || 'auto'
|
|
236
|
+
}),
|
|
237
|
+
name: x.title
|
|
238
|
+
};
|
|
227
239
|
}),
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
}
|
|
235
|
-
}),
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
240
|
+
onSelect: index => handleChange({
|
|
241
|
+
target: {
|
|
242
|
+
value: user.passportTypes[index].name
|
|
243
|
+
}
|
|
244
|
+
}),
|
|
245
|
+
defaultIndex: 0
|
|
246
|
+
})
|
|
247
|
+
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(_Box.default, {
|
|
248
|
+
textAlign: "center",
|
|
249
|
+
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_Button.default, {
|
|
250
|
+
variant: "contained",
|
|
251
|
+
color: "primary",
|
|
252
|
+
onClick: () => onSelectPassport(),
|
|
253
|
+
disabled: !passport,
|
|
254
|
+
children: t('common.next')
|
|
255
|
+
})
|
|
256
|
+
})]
|
|
257
|
+
});
|
|
245
258
|
}
|
|
246
259
|
}, {
|
|
247
260
|
label: t('lostPassport.receivePassport'),
|
|
@@ -250,7 +263,7 @@ function LostPassport(_ref2) {
|
|
|
250
263
|
receiverDid: user.did,
|
|
251
264
|
passportName: passport
|
|
252
265
|
};
|
|
253
|
-
return /*#__PURE__*/
|
|
266
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsx)(_Connect.default, {
|
|
254
267
|
popup: true,
|
|
255
268
|
open: true,
|
|
256
269
|
hideCloseButton: true,
|
|
@@ -272,54 +285,66 @@ function LostPassport(_ref2) {
|
|
|
272
285
|
}
|
|
273
286
|
}, {
|
|
274
287
|
label: t('common.complete'),
|
|
275
|
-
content: () => /*#__PURE__*/
|
|
276
|
-
textAlign: "center"
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
288
|
+
content: () => /*#__PURE__*/(0, _jsxRuntime.jsxs)(_Box.default, {
|
|
289
|
+
textAlign: "center",
|
|
290
|
+
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_Box.default, {
|
|
291
|
+
mb: 3,
|
|
292
|
+
color: "success.main",
|
|
293
|
+
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_CheckCircle.default, {
|
|
294
|
+
style: {
|
|
295
|
+
fontSize: 60
|
|
296
|
+
}
|
|
297
|
+
})
|
|
298
|
+
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(_Typography.default, {
|
|
299
|
+
component: "p",
|
|
300
|
+
variant: "body1",
|
|
301
|
+
className: "subheader",
|
|
302
|
+
children: t('issuePassport.dialog.success')
|
|
303
|
+
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(_Button.default, {
|
|
304
|
+
style: {
|
|
305
|
+
marginTop: 40
|
|
306
|
+
},
|
|
307
|
+
variant: "contained",
|
|
308
|
+
color: "primary",
|
|
309
|
+
onClick: onUsePassport,
|
|
310
|
+
children: t('issuePassport.dialog.loginWithPassport')
|
|
311
|
+
})]
|
|
312
|
+
})
|
|
296
313
|
}];
|
|
297
|
-
return /*#__PURE__*/
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
|
|
314
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsx)(Div, {
|
|
315
|
+
children: /*#__PURE__*/(0, _jsxRuntime.jsxs)("div", {
|
|
316
|
+
className: "stepper",
|
|
317
|
+
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_Stepper.default, {
|
|
318
|
+
className: "stepper-progress",
|
|
319
|
+
alternativeLabel: true,
|
|
320
|
+
activeStep: activeStep,
|
|
321
|
+
children: steps.map(_ref3 => {
|
|
322
|
+
let {
|
|
323
|
+
label
|
|
324
|
+
} = _ref3;
|
|
325
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsx)(_Step.default, {
|
|
326
|
+
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_StepLabel.default, {
|
|
327
|
+
StepIconComponent: ColorStepIcon,
|
|
328
|
+
children: label
|
|
329
|
+
})
|
|
330
|
+
}, label);
|
|
331
|
+
})
|
|
332
|
+
}), /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
|
|
333
|
+
className: "stepper-content",
|
|
334
|
+
children: steps[activeStep].content()
|
|
335
|
+
}), !success && /*#__PURE__*/(0, _jsxRuntime.jsx)(_Box.default, {
|
|
336
|
+
textAlign: "center",
|
|
337
|
+
fontSize: 12,
|
|
338
|
+
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactRouterDom.Link, {
|
|
339
|
+
to: "/",
|
|
340
|
+
style: {
|
|
341
|
+
color: '#4598FA'
|
|
342
|
+
},
|
|
343
|
+
children: t('lostPassport.return')
|
|
344
|
+
})
|
|
345
|
+
})]
|
|
346
|
+
})
|
|
347
|
+
});
|
|
323
348
|
}
|
|
324
349
|
|
|
325
350
|
const Div = (0, _styledComponents.default)(_Container.default).withConfig({
|