@abtnode/ux 1.16.23-beta-2229bcee → 1.16.23-beta-c9c4e08e
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/es/blocklet/router/rule-list.js +5 -1
- package/es/invitation/invitation-receive.js +19 -9
- package/es/invitation/invitation-success.js +1 -1
- package/es/invitation/invitation.js +37 -26
- package/es/issue-passport.js +1 -2
- package/lib/blocklet/router/rule-list.js +5 -1
- package/lib/invitation/invitation-receive.js +21 -9
- package/lib/invitation/invitation-success.js +1 -1
- package/lib/invitation/invitation.js +37 -26
- package/lib/issue-passport.js +6 -7
- package/package.json +8 -8
|
@@ -116,7 +116,11 @@ function RuleList({
|
|
|
116
116
|
}), typeof avatar === 'object' ? avatar : /*#__PURE__*/_jsx(Avatar, {
|
|
117
117
|
children: avatar
|
|
118
118
|
}), /*#__PURE__*/_jsxs(Box, {
|
|
119
|
-
|
|
119
|
+
sx: {
|
|
120
|
+
ml: 2,
|
|
121
|
+
flex: 1,
|
|
122
|
+
wordBreak: 'break-word'
|
|
123
|
+
},
|
|
120
124
|
children: [/*#__PURE__*/_jsxs(Box, {
|
|
121
125
|
style: {
|
|
122
126
|
color: '#222',
|
|
@@ -14,7 +14,8 @@ function InvitationReceive({
|
|
|
14
14
|
invitation,
|
|
15
15
|
onLogin,
|
|
16
16
|
onReceive,
|
|
17
|
-
inService
|
|
17
|
+
inService,
|
|
18
|
+
action
|
|
18
19
|
}) {
|
|
19
20
|
const {
|
|
20
21
|
t,
|
|
@@ -30,13 +31,20 @@ function InvitationReceive({
|
|
|
30
31
|
if (typeof window !== 'undefined') {
|
|
31
32
|
componentId = window?.blocklet?.componentId;
|
|
32
33
|
}
|
|
34
|
+
const passportId = getPassportId();
|
|
33
35
|
const extraParams = {
|
|
34
|
-
passportId: getPassportId(),
|
|
35
|
-
inviteId: invitation.inviteId,
|
|
36
36
|
// 生成 passport 信息需要 baseUrl 字段
|
|
37
37
|
baseUrl: window.location.origin,
|
|
38
38
|
componentId
|
|
39
39
|
};
|
|
40
|
+
if (passportId) {
|
|
41
|
+
extraParams.passportId = passportId;
|
|
42
|
+
}
|
|
43
|
+
if (action === 'invite') {
|
|
44
|
+
extraParams.inviteId = invitation.inviteId;
|
|
45
|
+
} else if (action === 'issue-passport') {
|
|
46
|
+
extraParams.id = invitation.inviteId;
|
|
47
|
+
}
|
|
40
48
|
const onClose = useCallback(() => {
|
|
41
49
|
connectApi.close();
|
|
42
50
|
}, [connectApi]);
|
|
@@ -51,9 +59,9 @@ function InvitationReceive({
|
|
|
51
59
|
}
|
|
52
60
|
if (inService) {
|
|
53
61
|
connectApi.openPopup({
|
|
54
|
-
action
|
|
62
|
+
action,
|
|
55
63
|
className: 'connect',
|
|
56
|
-
forceConnected: false,
|
|
64
|
+
forceConnected: invitation?.receiver?.did || false,
|
|
57
65
|
autoConnect: false,
|
|
58
66
|
locale,
|
|
59
67
|
extraParams: {
|
|
@@ -75,9 +83,9 @@ function InvitationReceive({
|
|
|
75
83
|
});
|
|
76
84
|
} else {
|
|
77
85
|
connectApi.open({
|
|
78
|
-
action
|
|
86
|
+
action,
|
|
79
87
|
className: 'connect',
|
|
80
|
-
forceConnected: false,
|
|
88
|
+
forceConnected: invitation?.receiver?.did || false,
|
|
81
89
|
autoConnect: false,
|
|
82
90
|
locale,
|
|
83
91
|
extraParams,
|
|
@@ -113,12 +121,14 @@ InvitationReceive.propTypes = {
|
|
|
113
121
|
invitation: PropTypes.object.isRequired,
|
|
114
122
|
onLogin: PropTypes.func,
|
|
115
123
|
onReceive: PropTypes.func,
|
|
116
|
-
inService: PropTypes.bool
|
|
124
|
+
inService: PropTypes.bool,
|
|
125
|
+
action: PropTypes.oneOf(['invite', 'issue-passport'])
|
|
117
126
|
};
|
|
118
127
|
InvitationReceive.defaultProps = {
|
|
119
128
|
onLogin: () => {},
|
|
120
129
|
onReceive: null,
|
|
121
|
-
inService: false
|
|
130
|
+
inService: false,
|
|
131
|
+
action: 'invite'
|
|
122
132
|
};
|
|
123
133
|
const Root = styled.div`
|
|
124
134
|
text-align: center;
|
|
@@ -59,7 +59,7 @@ function InvitationSuccess({
|
|
|
59
59
|
}
|
|
60
60
|
InvitationSuccess.propTypes = {
|
|
61
61
|
invitation: PropTypes.object.isRequired,
|
|
62
|
-
type: PropTypes.oneOf('inviter', 'receiver')
|
|
62
|
+
type: PropTypes.oneOf(['inviter', 'receiver'])
|
|
63
63
|
};
|
|
64
64
|
InvitationSuccess.defaultProps = {
|
|
65
65
|
type: 'inviter'
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import PropTypes from 'prop-types';
|
|
2
2
|
import styled from '@emotion/styled';
|
|
3
3
|
import { useRequest } from 'ahooks';
|
|
4
|
-
import Spinner from '@mui/material/CircularProgress';
|
|
5
4
|
import Result from '@arcblock/ux/lib/Result';
|
|
5
|
+
import { Box, CircularProgress } from '@mui/material';
|
|
6
6
|
import InvitationPassport from './invitation-passport';
|
|
7
7
|
import InvitationReceive from './invitation-receive';
|
|
8
8
|
import InvitationLogin from './invitation-login';
|
|
@@ -12,6 +12,7 @@ import InvitationApp from './invitation-app';
|
|
|
12
12
|
import wrapLocale from '../wrap-locale';
|
|
13
13
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
14
14
|
import { jsxs as _jsxs } from "react/jsx-runtime";
|
|
15
|
+
import { Fragment as _Fragment } from "react/jsx-runtime";
|
|
15
16
|
function Invitation({
|
|
16
17
|
getDataFn,
|
|
17
18
|
passportColor,
|
|
@@ -19,42 +20,48 @@ function Invitation({
|
|
|
19
20
|
onLoginSuccess,
|
|
20
21
|
checkFn,
|
|
21
22
|
onReceive,
|
|
22
|
-
inService
|
|
23
|
+
inService,
|
|
24
|
+
action,
|
|
25
|
+
status
|
|
23
26
|
}) {
|
|
24
27
|
const state = useRequest(getDataFn);
|
|
25
|
-
if (state
|
|
26
|
-
return /*#__PURE__*/_jsx(
|
|
28
|
+
if (state?.loading) {
|
|
29
|
+
return /*#__PURE__*/_jsx(CircularProgress, {});
|
|
27
30
|
}
|
|
28
|
-
if (state
|
|
31
|
+
if (state?.error) {
|
|
29
32
|
return /*#__PURE__*/_jsx(Result, {
|
|
30
33
|
status: "404",
|
|
31
|
-
title: state
|
|
34
|
+
title: state?.error?.response?.data,
|
|
32
35
|
description: ""
|
|
33
36
|
});
|
|
34
37
|
}
|
|
35
|
-
const isSuccess = state
|
|
38
|
+
const isSuccess = status === 'success' || state?.data?.status === 'success';
|
|
36
39
|
const Section1 = isSuccess ? InvitationSuccess : InvitationUser;
|
|
37
40
|
const Section2 = isSuccess ? InvitationLogin : InvitationReceive;
|
|
38
|
-
return /*#__PURE__*/
|
|
41
|
+
return /*#__PURE__*/_jsx(Root, {
|
|
39
42
|
className: "page-invite__wrapper",
|
|
40
|
-
children:
|
|
41
|
-
|
|
42
|
-
}), /*#__PURE__*/_jsxs("div", {
|
|
43
|
-
className: "page-invite__card",
|
|
44
|
-
children: [/*#__PURE__*/_jsx(Section1, {
|
|
43
|
+
children: state?.data ? /*#__PURE__*/_jsxs(_Fragment, {
|
|
44
|
+
children: [/*#__PURE__*/_jsx(InvitationApp, {
|
|
45
45
|
invitation: state.data
|
|
46
|
-
}), /*#__PURE__*/
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
46
|
+
}), /*#__PURE__*/_jsxs(Box, {
|
|
47
|
+
className: "page-invite__card",
|
|
48
|
+
children: [/*#__PURE__*/_jsx(Section1, {
|
|
49
|
+
invitation: state.data
|
|
50
|
+
}), /*#__PURE__*/_jsx(InvitationPassport, {
|
|
51
|
+
invitation: state.data,
|
|
52
|
+
action: action,
|
|
53
|
+
createPassportSvg: createPassportSvg,
|
|
54
|
+
passportColor: passportColor
|
|
55
|
+
}), /*#__PURE__*/_jsx(Section2, {
|
|
56
|
+
invitation: state.data,
|
|
57
|
+
action: action,
|
|
58
|
+
onLogin: onLoginSuccess,
|
|
59
|
+
checkFn: checkFn,
|
|
60
|
+
onReceive: onReceive,
|
|
61
|
+
inService: inService
|
|
62
|
+
})]
|
|
56
63
|
})]
|
|
57
|
-
})
|
|
64
|
+
}) : null
|
|
58
65
|
});
|
|
59
66
|
}
|
|
60
67
|
Invitation.propTypes = {
|
|
@@ -64,13 +71,17 @@ Invitation.propTypes = {
|
|
|
64
71
|
onLoginSuccess: PropTypes.func,
|
|
65
72
|
onReceive: PropTypes.func,
|
|
66
73
|
passportColor: PropTypes.string,
|
|
67
|
-
inService: PropTypes.bool
|
|
74
|
+
inService: PropTypes.bool,
|
|
75
|
+
action: PropTypes.oneOf(['invite', 'issue-passpor']),
|
|
76
|
+
status: PropTypes.oneOf(['success', ''])
|
|
68
77
|
};
|
|
69
78
|
Invitation.defaultProps = {
|
|
70
79
|
onLoginSuccess: () => {},
|
|
71
80
|
passportColor: 'auto',
|
|
72
81
|
onReceive: null,
|
|
73
|
-
inService: false
|
|
82
|
+
inService: false,
|
|
83
|
+
action: 'invite',
|
|
84
|
+
status: ''
|
|
74
85
|
};
|
|
75
86
|
const Root = styled.div`
|
|
76
87
|
max-width: 460px;
|
package/es/issue-passport.js
CHANGED
|
@@ -2,9 +2,8 @@
|
|
|
2
2
|
import { useState, useContext } from 'react';
|
|
3
3
|
import styled from '@emotion/styled';
|
|
4
4
|
import { useNavigate } from 'react-router-dom';
|
|
5
|
-
import Typography from '@mui/material/Typography';
|
|
6
5
|
import CheckCircleIcon from '@mui/icons-material/CheckCircle';
|
|
7
|
-
import Box from '@mui/material
|
|
6
|
+
import { Box, Typography } from '@mui/material';
|
|
8
7
|
import Center from '@arcblock/ux/lib/Center';
|
|
9
8
|
import Button from '@arcblock/ux/lib/Button';
|
|
10
9
|
import DidConnect from '@arcblock/did-connect/lib/Connect';
|
|
@@ -127,7 +127,11 @@ function RuleList(_ref2) {
|
|
|
127
127
|
}), typeof avatar === 'object' ? avatar : /*#__PURE__*/(0, _jsxRuntime.jsx)(_Avatar.default, {
|
|
128
128
|
children: avatar
|
|
129
129
|
}), /*#__PURE__*/(0, _jsxRuntime.jsxs)(_Box.default, {
|
|
130
|
-
|
|
130
|
+
sx: {
|
|
131
|
+
ml: 2,
|
|
132
|
+
flex: 1,
|
|
133
|
+
wordBreak: 'break-word'
|
|
134
|
+
},
|
|
131
135
|
children: [/*#__PURE__*/(0, _jsxRuntime.jsxs)(_Box.default, {
|
|
132
136
|
style: {
|
|
133
137
|
color: '#222',
|
|
@@ -28,7 +28,8 @@ function InvitationReceive(_ref) {
|
|
|
28
28
|
invitation,
|
|
29
29
|
onLogin,
|
|
30
30
|
onReceive,
|
|
31
|
-
inService
|
|
31
|
+
inService,
|
|
32
|
+
action
|
|
32
33
|
} = _ref;
|
|
33
34
|
const {
|
|
34
35
|
t,
|
|
@@ -45,13 +46,20 @@ function InvitationReceive(_ref) {
|
|
|
45
46
|
var _window, _window$blocklet;
|
|
46
47
|
componentId = (_window = window) === null || _window === void 0 ? void 0 : (_window$blocklet = _window.blocklet) === null || _window$blocklet === void 0 ? void 0 : _window$blocklet.componentId;
|
|
47
48
|
}
|
|
49
|
+
const passportId = getPassportId();
|
|
48
50
|
const extraParams = {
|
|
49
|
-
passportId: getPassportId(),
|
|
50
|
-
inviteId: invitation.inviteId,
|
|
51
51
|
// 生成 passport 信息需要 baseUrl 字段
|
|
52
52
|
baseUrl: window.location.origin,
|
|
53
53
|
componentId
|
|
54
54
|
};
|
|
55
|
+
if (passportId) {
|
|
56
|
+
extraParams.passportId = passportId;
|
|
57
|
+
}
|
|
58
|
+
if (action === 'invite') {
|
|
59
|
+
extraParams.inviteId = invitation.inviteId;
|
|
60
|
+
} else if (action === 'issue-passport') {
|
|
61
|
+
extraParams.id = invitation.inviteId;
|
|
62
|
+
}
|
|
55
63
|
const onClose = (0, _react.useCallback)(() => {
|
|
56
64
|
connectApi.close();
|
|
57
65
|
}, [connectApi]);
|
|
@@ -65,10 +73,11 @@ function InvitationReceive(_ref) {
|
|
|
65
73
|
return;
|
|
66
74
|
}
|
|
67
75
|
if (inService) {
|
|
76
|
+
var _invitation$receiver;
|
|
68
77
|
connectApi.openPopup({
|
|
69
|
-
action
|
|
78
|
+
action,
|
|
70
79
|
className: 'connect',
|
|
71
|
-
forceConnected: false,
|
|
80
|
+
forceConnected: (invitation === null || invitation === void 0 ? void 0 : (_invitation$receiver = invitation.receiver) === null || _invitation$receiver === void 0 ? void 0 : _invitation$receiver.did) || false,
|
|
72
81
|
autoConnect: false,
|
|
73
82
|
locale,
|
|
74
83
|
extraParams: _objectSpread({
|
|
@@ -88,10 +97,11 @@ function InvitationReceive(_ref) {
|
|
|
88
97
|
locale
|
|
89
98
|
});
|
|
90
99
|
} else {
|
|
100
|
+
var _invitation$receiver2;
|
|
91
101
|
connectApi.open({
|
|
92
|
-
action
|
|
102
|
+
action,
|
|
93
103
|
className: 'connect',
|
|
94
|
-
forceConnected: false,
|
|
104
|
+
forceConnected: (invitation === null || invitation === void 0 ? void 0 : (_invitation$receiver2 = invitation.receiver) === null || _invitation$receiver2 === void 0 ? void 0 : _invitation$receiver2.did) || false,
|
|
95
105
|
autoConnect: false,
|
|
96
106
|
locale,
|
|
97
107
|
extraParams,
|
|
@@ -127,12 +137,14 @@ InvitationReceive.propTypes = {
|
|
|
127
137
|
invitation: _propTypes.default.object.isRequired,
|
|
128
138
|
onLogin: _propTypes.default.func,
|
|
129
139
|
onReceive: _propTypes.default.func,
|
|
130
|
-
inService: _propTypes.default.bool
|
|
140
|
+
inService: _propTypes.default.bool,
|
|
141
|
+
action: _propTypes.default.oneOf(['invite', 'issue-passport'])
|
|
131
142
|
};
|
|
132
143
|
InvitationReceive.defaultProps = {
|
|
133
144
|
onLogin: () => {},
|
|
134
145
|
onReceive: null,
|
|
135
|
-
inService: false
|
|
146
|
+
inService: false,
|
|
147
|
+
action: 'invite'
|
|
136
148
|
};
|
|
137
149
|
const Root = _styled.default.div(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n text-align: center;\n .invite-receive__logo-wrapper {\n display: inline-flex;\n align-items: center;\n color: #9397a1;\n font-size: 14px;\n }\n .invite-receive__logo {\n height: 16px;\n margin-left: 8px;\n }\n .invite-receive__button {\n width: 100%;\n margin: 16px 0;\n white-space: nowrap;\n }\n .invite-receive__until {\n text-align: center;\n font-size: 14px;\n }\n .invite-receive__description {\n color: #999;\n text-align: left;\n list-style: decimal;\n padding: 0;\n padding-left: 1.2em;\n margin: 40px 0;\n }\n .invite-receive__description-item {\n list-style: decimal;\n }\n .invite-receive__link {\n color: ", ";\n }\n"])), _ref2 => {
|
|
138
150
|
let {
|
|
@@ -68,7 +68,7 @@ function InvitationSuccess(_ref) {
|
|
|
68
68
|
}
|
|
69
69
|
InvitationSuccess.propTypes = {
|
|
70
70
|
invitation: _propTypes.default.object.isRequired,
|
|
71
|
-
type: _propTypes.default.oneOf('inviter', 'receiver')
|
|
71
|
+
type: _propTypes.default.oneOf(['inviter', 'receiver'])
|
|
72
72
|
};
|
|
73
73
|
InvitationSuccess.defaultProps = {
|
|
74
74
|
type: 'inviter'
|
|
@@ -7,8 +7,8 @@ exports.default = void 0;
|
|
|
7
7
|
var _propTypes = _interopRequireDefault(require("prop-types"));
|
|
8
8
|
var _styled = _interopRequireDefault(require("@emotion/styled"));
|
|
9
9
|
var _ahooks = require("ahooks");
|
|
10
|
-
var _CircularProgress = _interopRequireDefault(require("@mui/material/CircularProgress"));
|
|
11
10
|
var _Result = _interopRequireDefault(require("@arcblock/ux/lib/Result"));
|
|
11
|
+
var _material = require("@mui/material");
|
|
12
12
|
var _invitationPassport = _interopRequireDefault(require("./invitation-passport"));
|
|
13
13
|
var _invitationReceive = _interopRequireDefault(require("./invitation-receive"));
|
|
14
14
|
var _invitationLogin = _interopRequireDefault(require("./invitation-login"));
|
|
@@ -21,6 +21,7 @@ var _templateObject;
|
|
|
21
21
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
22
22
|
function _taggedTemplateLiteral(strings, raw) { if (!raw) { raw = strings.slice(0); } return Object.freeze(Object.defineProperties(strings, { raw: { value: Object.freeze(raw) } })); }
|
|
23
23
|
function Invitation(_ref) {
|
|
24
|
+
var _state$data;
|
|
24
25
|
let {
|
|
25
26
|
getDataFn,
|
|
26
27
|
passportColor,
|
|
@@ -28,43 +29,49 @@ function Invitation(_ref) {
|
|
|
28
29
|
onLoginSuccess,
|
|
29
30
|
checkFn,
|
|
30
31
|
onReceive,
|
|
31
|
-
inService
|
|
32
|
+
inService,
|
|
33
|
+
action,
|
|
34
|
+
status
|
|
32
35
|
} = _ref;
|
|
33
36
|
const state = (0, _ahooks.useRequest)(getDataFn);
|
|
34
|
-
if (state.loading) {
|
|
35
|
-
return /*#__PURE__*/(0, _jsxRuntime.jsx)(
|
|
37
|
+
if (state !== null && state !== void 0 && state.loading) {
|
|
38
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsx)(_material.CircularProgress, {});
|
|
36
39
|
}
|
|
37
|
-
if (state.error) {
|
|
40
|
+
if (state !== null && state !== void 0 && state.error) {
|
|
38
41
|
var _state$error, _state$error$response;
|
|
39
42
|
return /*#__PURE__*/(0, _jsxRuntime.jsx)(_Result.default, {
|
|
40
43
|
status: "404",
|
|
41
|
-
title: (_state$error = state.error) === null || _state$error === void 0 ? void 0 : (_state$error$response = _state$error.response) === null || _state$error$response === void 0 ? void 0 : _state$error$response.data,
|
|
44
|
+
title: state === null || state === void 0 ? void 0 : (_state$error = state.error) === null || _state$error === void 0 ? void 0 : (_state$error$response = _state$error.response) === null || _state$error$response === void 0 ? void 0 : _state$error$response.data,
|
|
42
45
|
description: ""
|
|
43
46
|
});
|
|
44
47
|
}
|
|
45
|
-
const isSuccess = state.data.status === 'success';
|
|
48
|
+
const isSuccess = status === 'success' || (state === null || state === void 0 ? void 0 : (_state$data = state.data) === null || _state$data === void 0 ? void 0 : _state$data.status) === 'success';
|
|
46
49
|
const Section1 = isSuccess ? _invitationSuccess.default : _invitationUser.default;
|
|
47
50
|
const Section2 = isSuccess ? _invitationLogin.default : _invitationReceive.default;
|
|
48
|
-
return /*#__PURE__*/(0, _jsxRuntime.
|
|
51
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsx)(Root, {
|
|
49
52
|
className: "page-invite__wrapper",
|
|
50
|
-
children:
|
|
51
|
-
|
|
52
|
-
}), /*#__PURE__*/(0, _jsxRuntime.jsxs)("div", {
|
|
53
|
-
className: "page-invite__card",
|
|
54
|
-
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(Section1, {
|
|
53
|
+
children: state !== null && state !== void 0 && state.data ? /*#__PURE__*/(0, _jsxRuntime.jsxs)(_jsxRuntime.Fragment, {
|
|
54
|
+
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_invitationApp.default, {
|
|
55
55
|
invitation: state.data
|
|
56
|
-
}), /*#__PURE__*/(0, _jsxRuntime.
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
56
|
+
}), /*#__PURE__*/(0, _jsxRuntime.jsxs)(_material.Box, {
|
|
57
|
+
className: "page-invite__card",
|
|
58
|
+
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(Section1, {
|
|
59
|
+
invitation: state.data
|
|
60
|
+
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(_invitationPassport.default, {
|
|
61
|
+
invitation: state.data,
|
|
62
|
+
action: action,
|
|
63
|
+
createPassportSvg: createPassportSvg,
|
|
64
|
+
passportColor: passportColor
|
|
65
|
+
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(Section2, {
|
|
66
|
+
invitation: state.data,
|
|
67
|
+
action: action,
|
|
68
|
+
onLogin: onLoginSuccess,
|
|
69
|
+
checkFn: checkFn,
|
|
70
|
+
onReceive: onReceive,
|
|
71
|
+
inService: inService
|
|
72
|
+
})]
|
|
66
73
|
})]
|
|
67
|
-
})
|
|
74
|
+
}) : null
|
|
68
75
|
});
|
|
69
76
|
}
|
|
70
77
|
Invitation.propTypes = {
|
|
@@ -74,13 +81,17 @@ Invitation.propTypes = {
|
|
|
74
81
|
onLoginSuccess: _propTypes.default.func,
|
|
75
82
|
onReceive: _propTypes.default.func,
|
|
76
83
|
passportColor: _propTypes.default.string,
|
|
77
|
-
inService: _propTypes.default.bool
|
|
84
|
+
inService: _propTypes.default.bool,
|
|
85
|
+
action: _propTypes.default.oneOf(['invite', 'issue-passpor']),
|
|
86
|
+
status: _propTypes.default.oneOf(['success', ''])
|
|
78
87
|
};
|
|
79
88
|
Invitation.defaultProps = {
|
|
80
89
|
onLoginSuccess: () => {},
|
|
81
90
|
passportColor: 'auto',
|
|
82
91
|
onReceive: null,
|
|
83
|
-
inService: false
|
|
92
|
+
inService: false,
|
|
93
|
+
action: 'invite',
|
|
94
|
+
status: ''
|
|
84
95
|
};
|
|
85
96
|
const Root = _styled.default.div(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n max-width: 460px;\n max-height: 650px;\n min-height: 450px;\n width: 90%;\n height: 80%;\n display: flex;\n flex-direction: column;\n .page-invite__card {\n background-color: #fff;\n border-radius: 4px;\n flex: 1;\n padding: 20px 30px;\n margin-top: 10px;\n }\n .page-invite__app {\n margin-top: 20px;\n }\n"])));
|
|
86
97
|
var _default = exports.default = (0, _wrapLocale.default)(Invitation);
|
package/lib/issue-passport.js
CHANGED
|
@@ -7,9 +7,8 @@ exports.default = void 0;
|
|
|
7
7
|
var _react = require("react");
|
|
8
8
|
var _styled = _interopRequireDefault(require("@emotion/styled"));
|
|
9
9
|
var _reactRouterDom = require("react-router-dom");
|
|
10
|
-
var _Typography = _interopRequireDefault(require("@mui/material/Typography"));
|
|
11
10
|
var _CheckCircle = _interopRequireDefault(require("@mui/icons-material/CheckCircle"));
|
|
12
|
-
var
|
|
11
|
+
var _material = require("@mui/material");
|
|
13
12
|
var _Center = _interopRequireDefault(require("@arcblock/ux/lib/Center"));
|
|
14
13
|
var _Button = _interopRequireDefault(require("@arcblock/ux/lib/Button"));
|
|
15
14
|
var _Connect = _interopRequireDefault(require("@arcblock/did-connect/lib/Connect"));
|
|
@@ -79,9 +78,9 @@ function IssuePassport(_ref) {
|
|
|
79
78
|
className: "login",
|
|
80
79
|
children: /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
|
|
81
80
|
className: "connect",
|
|
82
|
-
children: /*#__PURE__*/(0, _jsxRuntime.jsxs)(
|
|
81
|
+
children: /*#__PURE__*/(0, _jsxRuntime.jsxs)(_material.Box, {
|
|
83
82
|
textAlign: "center",
|
|
84
|
-
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(
|
|
83
|
+
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_material.Box, {
|
|
85
84
|
mb: 3,
|
|
86
85
|
color: "success.main",
|
|
87
86
|
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_CheckCircle.default, {
|
|
@@ -89,12 +88,12 @@ function IssuePassport(_ref) {
|
|
|
89
88
|
fontSize: 60
|
|
90
89
|
}
|
|
91
90
|
})
|
|
92
|
-
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(
|
|
91
|
+
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(_material.Typography, {
|
|
93
92
|
component: "p",
|
|
94
93
|
variant: "body1",
|
|
95
94
|
className: "subheader",
|
|
96
95
|
children: t('issuePassport.dialog.success')
|
|
97
|
-
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(
|
|
96
|
+
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(_material.Box, {
|
|
98
97
|
mt: 3,
|
|
99
98
|
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_Button.default, {
|
|
100
99
|
variant: "contained",
|
|
@@ -107,7 +106,7 @@ function IssuePassport(_ref) {
|
|
|
107
106
|
})
|
|
108
107
|
}) : /*#__PURE__*/(0, _jsxRuntime.jsx)(_fullpage.default, {
|
|
109
108
|
did: ((_window = window) === null || _window === void 0 ? void 0 : (_window$blocklet = _window.blocklet) === null || _window$blocklet === void 0 ? void 0 : _window$blocklet.appPid) || ((_window2 = window) === null || _window2 === void 0 ? void 0 : (_window2$env = _window2.env) === null || _window2$env === void 0 ? void 0 : _window2$env.appPid),
|
|
110
|
-
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(
|
|
109
|
+
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_material.Box, {
|
|
111
110
|
sx: {
|
|
112
111
|
width: '560px',
|
|
113
112
|
maxWidth: '100%',
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@abtnode/ux",
|
|
3
|
-
"version": "1.16.23-beta-
|
|
3
|
+
"version": "1.16.23-beta-c9c4e08e",
|
|
4
4
|
"description": "UX components shared across abtnode packages",
|
|
5
5
|
"publishConfig": {
|
|
6
6
|
"access": "public"
|
|
@@ -29,9 +29,9 @@
|
|
|
29
29
|
"author": "linchen <linchen1987@foxmail.com> (http://github.com/linchen1987)",
|
|
30
30
|
"license": "Apache-2.0",
|
|
31
31
|
"dependencies": {
|
|
32
|
-
"@abtnode/auth": "1.16.23-beta-
|
|
33
|
-
"@abtnode/constant": "1.16.23-beta-
|
|
34
|
-
"@abtnode/util": "1.16.23-beta-
|
|
32
|
+
"@abtnode/auth": "1.16.23-beta-c9c4e08e",
|
|
33
|
+
"@abtnode/constant": "1.16.23-beta-c9c4e08e",
|
|
34
|
+
"@abtnode/util": "1.16.23-beta-c9c4e08e",
|
|
35
35
|
"@ahooksjs/use-url-state": "^3.5.1",
|
|
36
36
|
"@arcblock/did": "^1.18.110",
|
|
37
37
|
"@arcblock/did-connect": "^2.9.24",
|
|
@@ -41,12 +41,12 @@
|
|
|
41
41
|
"@arcblock/react-hooks": "^2.9.24",
|
|
42
42
|
"@arcblock/terminal": "^2.9.24",
|
|
43
43
|
"@arcblock/ux": "^2.9.24",
|
|
44
|
-
"@blocklet/constant": "1.16.23-beta-
|
|
44
|
+
"@blocklet/constant": "1.16.23-beta-c9c4e08e",
|
|
45
45
|
"@blocklet/launcher-layout": "2.2.51",
|
|
46
46
|
"@blocklet/list": "^0.12.69",
|
|
47
|
-
"@blocklet/meta": "1.16.23-beta-
|
|
47
|
+
"@blocklet/meta": "1.16.23-beta-c9c4e08e",
|
|
48
48
|
"@blocklet/ui-react": "^2.9.24",
|
|
49
|
-
"@blocklet/uploader": "^0.0.
|
|
49
|
+
"@blocklet/uploader": "^0.0.71",
|
|
50
50
|
"@emotion/react": "^11.10.4",
|
|
51
51
|
"@emotion/styled": "^11.10.4",
|
|
52
52
|
"@iconify/react": "^4.0.0",
|
|
@@ -107,7 +107,7 @@
|
|
|
107
107
|
"jest": "^29.7.0",
|
|
108
108
|
"jest-environment-jsdom": "^29.7.0"
|
|
109
109
|
},
|
|
110
|
-
"gitHead": "
|
|
110
|
+
"gitHead": "f2db6cfe9a6a64fc9921bfbbe2878dd343004703",
|
|
111
111
|
"exports": {
|
|
112
112
|
".": {
|
|
113
113
|
"import": "./es/index.js",
|