@abtnode/ux 1.16.53 → 1.16.54-beta-20251017-133309-7d40faa6
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/blocklet/audit-logs.js +27 -8
- package/lib/blocklet/notification-records/index.js +16 -2
- package/lib/blocklet/publish/create-release/header.js +2 -1
- package/lib/blocklet/security/form-access-role-input.js +18 -1
- package/lib/blocklet/webhook/create-or-edit.js +25 -12
- package/lib/locales/ar.js +2 -1
- package/lib/locales/de.js +2 -1
- package/lib/locales/en.js +2 -1
- package/lib/locales/es.js +2 -1
- package/lib/locales/fr.js +2 -1
- package/lib/locales/hi.js +2 -1
- package/lib/locales/i18n.json +20 -0
- package/lib/locales/id.js +2 -1
- package/lib/locales/ja.js +2 -1
- package/lib/locales/ko.js +2 -1
- package/lib/locales/pt.js +2 -1
- package/lib/locales/ru.js +2 -1
- package/lib/locales/th.js +2 -1
- package/lib/locales/vi.js +2 -1
- package/lib/locales/zh-tw.js +2 -1
- package/lib/locales/zh.js +2 -1
- package/lib/notifications/pages/preview/attachment/asset.js +8 -2
- package/lib/notifications/pages/preview/attachment/index.js +2 -1
- package/lib/simple-select.js +34 -21
- package/lib/team/members/index.js +67 -69
- package/lib/team/members/member.js +5 -5
- package/lib/team/user-session/index.js +569 -0
- package/lib/team/user-session/user-session-info.js +93 -0
- package/package.json +23 -22
|
@@ -15,6 +15,7 @@ import styled from '@emotion/styled';
|
|
|
15
15
|
import { get } from 'lodash';
|
|
16
16
|
import Tag from '@arcblock/ux/lib/Tag';
|
|
17
17
|
import Tooltip from '@mui/material/Tooltip';
|
|
18
|
+
import useMediaQuery from '@mui/material/useMediaQuery';
|
|
18
19
|
import { useMemo } from 'react';
|
|
19
20
|
import { parseAvatar } from '../team/members/util';
|
|
20
21
|
import { useAuditLogContext, AuditLogProvider } from '../contexts/audit-log';
|
|
@@ -163,6 +164,21 @@ function AuditLogs() {
|
|
|
163
164
|
actionOrContent,
|
|
164
165
|
setActionOrContent
|
|
165
166
|
} = useAuditLogContext();
|
|
167
|
+
const theme = useTheme();
|
|
168
|
+
const isBreakpointsDownSm = useMediaQuery(theme.breakpoints.down('sm'));
|
|
169
|
+
const responsiveStyles = useMemo(() => ({
|
|
170
|
+
flexDirection: isBreakpointsDownSm ? 'column' : 'row',
|
|
171
|
+
alignItems: isBreakpointsDownSm ? 'flex-start' : 'center',
|
|
172
|
+
justifyContent: isBreakpointsDownSm ? 'flex-start' : 'space-between',
|
|
173
|
+
'& > div': isBreakpointsDownSm ? {
|
|
174
|
+
width: '100%',
|
|
175
|
+
flex: 1,
|
|
176
|
+
'.toolbar-search-area': {
|
|
177
|
+
width: '100% !important',
|
|
178
|
+
flex: '1 !important'
|
|
179
|
+
}
|
|
180
|
+
} : {}
|
|
181
|
+
}), [isBreakpointsDownSm]);
|
|
166
182
|
const handleRowsPerPageChange = e => {
|
|
167
183
|
const pageSize = Number(e.target.value);
|
|
168
184
|
setPaging({
|
|
@@ -198,15 +214,22 @@ function AuditLogs() {
|
|
|
198
214
|
return /*#__PURE__*/_jsxs(Div, {
|
|
199
215
|
"data-cy": "audit-logs",
|
|
200
216
|
children: [/*#__PURE__*/_jsxs(Box, {
|
|
217
|
+
className: "audit-logs-toolbar",
|
|
201
218
|
sx: {
|
|
202
219
|
display: 'flex',
|
|
203
|
-
flexDirection: 'row',
|
|
220
|
+
flexDirection: isBreakpointsDownSm ? 'column' : 'row',
|
|
204
221
|
gap: 2,
|
|
205
|
-
alignItems: 'center'
|
|
222
|
+
alignItems: isBreakpointsDownSm ? 'flex-start' : 'center',
|
|
223
|
+
justifyContent: isBreakpointsDownSm ? 'flex-start' : 'space-between',
|
|
224
|
+
...responsiveStyles
|
|
206
225
|
},
|
|
207
226
|
children: [/*#__PURE__*/_jsxs(FormControl, {
|
|
208
|
-
|
|
209
|
-
width: '
|
|
227
|
+
sx: isBreakpointsDownSm ? {
|
|
228
|
+
width: '100%',
|
|
229
|
+
flex: 1
|
|
230
|
+
} : {
|
|
231
|
+
width: 240,
|
|
232
|
+
flexShrink: 0
|
|
210
233
|
},
|
|
211
234
|
variant: "outlined",
|
|
212
235
|
children: [/*#__PURE__*/_jsx(InputLabel, {
|
|
@@ -232,10 +255,6 @@ function AuditLogs() {
|
|
|
232
255
|
})
|
|
233
256
|
}, x.label))
|
|
234
257
|
})]
|
|
235
|
-
}), /*#__PURE__*/_jsx(Box, {
|
|
236
|
-
sx: {
|
|
237
|
-
flex: 1
|
|
238
|
-
}
|
|
239
258
|
}), /*#__PURE__*/_jsx(TableSearch, {
|
|
240
259
|
options: {
|
|
241
260
|
searchPlaceholder: t('common.auditLogsSearch'),
|
|
@@ -8,6 +8,7 @@ import isEqual from 'lodash/isEqual';
|
|
|
8
8
|
import Datatable, { getDurableData } from '@arcblock/ux/lib/Datatable';
|
|
9
9
|
import { useLocaleContext } from '@arcblock/ux/lib/Locale/context';
|
|
10
10
|
import { ThemeProvider, useTheme } from '@mui/material';
|
|
11
|
+
import useMediaQuery from '@mui/material/useMediaQuery';
|
|
11
12
|
import { deepmerge } from '@arcblock/ux/lib/Theme';
|
|
12
13
|
import dayjs from '@abtnode/util/lib/dayjs';
|
|
13
14
|
import FormControl from '@mui/material/FormControl';
|
|
@@ -51,6 +52,7 @@ function NotificationRecords({
|
|
|
51
52
|
locale
|
|
52
53
|
} = useLocaleContext();
|
|
53
54
|
const parentTheme = useTheme();
|
|
55
|
+
const isBreakpointsDownSm = useMediaQuery(parentTheme.breakpoints.down('sm'));
|
|
54
56
|
const mergedTheme = useMemo(() => deepmerge(parentTheme, getMuiThemeOpts()), [parentTheme]);
|
|
55
57
|
const [loading, setLoading] = useState(false);
|
|
56
58
|
const {
|
|
@@ -474,6 +476,7 @@ function NotificationRecords({
|
|
|
474
476
|
}
|
|
475
477
|
},
|
|
476
478
|
children: [/*#__PURE__*/_jsx(Div, {
|
|
479
|
+
isBreakpointsDownSm: isBreakpointsDownSm,
|
|
477
480
|
children: /*#__PURE__*/_jsx(ThemeProvider, {
|
|
478
481
|
theme: mergedTheme,
|
|
479
482
|
children: /*#__PURE__*/_jsx(Datatable, {
|
|
@@ -501,10 +504,10 @@ function NotificationRecords({
|
|
|
501
504
|
setNotificationDialog(data[dataIndex]);
|
|
502
505
|
}
|
|
503
506
|
},
|
|
504
|
-
|
|
507
|
+
title: /*#__PURE__*/_jsx(DatePicker, {
|
|
505
508
|
value: search.dateRange,
|
|
506
509
|
onChange: onDateRangeChange
|
|
507
|
-
})
|
|
510
|
+
}),
|
|
508
511
|
customButtons: customButtons,
|
|
509
512
|
components: {
|
|
510
513
|
TableFilterList: props => /*#__PURE__*/_jsx(CustomFilterList, {
|
|
@@ -565,6 +568,17 @@ const Div = styled.div`
|
|
|
565
568
|
.custom-toobar-btns {
|
|
566
569
|
gap: 4px;
|
|
567
570
|
}
|
|
571
|
+
.custom-toobar-title-inner {
|
|
572
|
+
display: flex;
|
|
573
|
+
justify-content: ${({
|
|
574
|
+
isBreakpointsDownSm
|
|
575
|
+
}) => isBreakpointsDownSm ? 'space-between' : 'flex-end'};
|
|
576
|
+
padding-right: ${({
|
|
577
|
+
isBreakpointsDownSm
|
|
578
|
+
}) => isBreakpointsDownSm ? '0' : '8px'};
|
|
579
|
+
flex-wrap: wrap;
|
|
580
|
+
gap: 8px;
|
|
581
|
+
}
|
|
568
582
|
`;
|
|
569
583
|
WrapperNotificationRecords.propTypes = {
|
|
570
584
|
blocklet: PropTypes.object.isRequired,
|
|
@@ -4,6 +4,7 @@ import GroupIcon from '@mui/icons-material/Group';
|
|
|
4
4
|
import GroupRemoveIcon from '@mui/icons-material/GroupRemove';
|
|
5
5
|
import { useLocaleContext } from '@arcblock/ux/lib/Locale/context';
|
|
6
6
|
import { Box, TextField, MenuItem } from '@mui/material';
|
|
7
|
+
import ArrowDownwardIcon from '@arcblock/icons/lib/ArrowDown';
|
|
7
8
|
import AccessConfig from '../../who-can-access/config';
|
|
8
9
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
9
10
|
export default function FormAccessRoleInput({
|
|
@@ -49,6 +50,16 @@ export default function FormAccessRoleInput({
|
|
|
49
50
|
fullWidth: true,
|
|
50
51
|
value: value,
|
|
51
52
|
onChange: onChange,
|
|
53
|
+
sx: {
|
|
54
|
+
'& .MuiInputBase-input': {
|
|
55
|
+
width: 'calc(100% - 46px)',
|
|
56
|
+
'& > .MuiBox-root:first-of-type': {
|
|
57
|
+
overflow: 'hidden',
|
|
58
|
+
textOverflow: 'ellipsis',
|
|
59
|
+
whiteSpace: 'nowrap'
|
|
60
|
+
}
|
|
61
|
+
}
|
|
62
|
+
},
|
|
52
63
|
slotProps: {
|
|
53
64
|
select: {
|
|
54
65
|
renderValue: selected => {
|
|
@@ -64,7 +75,13 @@ export default function FormAccessRoleInput({
|
|
|
64
75
|
}
|
|
65
76
|
}), d.title[locale] || d.title.en]
|
|
66
77
|
}) : null;
|
|
67
|
-
}
|
|
78
|
+
},
|
|
79
|
+
// eslint-disable-next-line react/no-unstable-nested-components
|
|
80
|
+
IconComponent: iconProps => /*#__PURE__*/_jsx(ArrowDownwardIcon, {
|
|
81
|
+
...iconProps,
|
|
82
|
+
width: 20,
|
|
83
|
+
height: 20
|
|
84
|
+
})
|
|
68
85
|
}
|
|
69
86
|
},
|
|
70
87
|
children: Configs.map(d => {
|
|
@@ -2,7 +2,7 @@ import React, { useMemo, useState, useEffect } from 'react';
|
|
|
2
2
|
import PropTypes from 'prop-types';
|
|
3
3
|
import { useForm, Controller } from 'react-hook-form';
|
|
4
4
|
import Toast from '@arcblock/ux/lib/Toast';
|
|
5
|
-
import { Button, Dialog, DialogTitle, DialogContent, DialogActions, TextField, Tooltip, Checkbox, Box, List, ListItem, Collapse, Typography, IconButton, Chip, FormHelperText, Avatar, Alert, CircularProgress, FormControlLabel } from '@mui/material';
|
|
5
|
+
import { Button, Dialog, useMediaQuery, DialogTitle, DialogContent, DialogActions, TextField, Tooltip, Checkbox, Box, List, ListItem, Collapse, Typography, IconButton, Chip, FormHelperText, Avatar, Alert, CircularProgress, FormControlLabel, useTheme } from '@mui/material';
|
|
6
6
|
import ExpandMoreIcon from '@mui/icons-material/ExpandMore';
|
|
7
7
|
import ExpandLessIcon from '@mui/icons-material/ExpandLess';
|
|
8
8
|
import InfoOutlinedIcon from '@mui/icons-material/InfoOutlined';
|
|
@@ -182,16 +182,18 @@ function EventSelector({
|
|
|
182
182
|
})
|
|
183
183
|
})]
|
|
184
184
|
}), /*#__PURE__*/_jsx(Box, {
|
|
185
|
+
className: "webhook-event-selector",
|
|
185
186
|
sx: {
|
|
186
187
|
maxHeight: '50vh',
|
|
187
|
-
|
|
188
|
+
overflowY: 'auto',
|
|
189
|
+
overflowX: 'hidden'
|
|
188
190
|
},
|
|
189
191
|
children: /*#__PURE__*/_jsx(List, {
|
|
190
192
|
disablePadding: true,
|
|
191
193
|
sx: {
|
|
192
194
|
border: '1px solid',
|
|
193
195
|
borderColor: 'divider',
|
|
194
|
-
borderRadius:
|
|
196
|
+
borderRadius: 0.5
|
|
195
197
|
},
|
|
196
198
|
children: Object.entries(eventsBySource).map(([did, {
|
|
197
199
|
source,
|
|
@@ -207,8 +209,8 @@ function EventSelector({
|
|
|
207
209
|
borderBottom: ({
|
|
208
210
|
palette
|
|
209
211
|
}) => index < Object.keys(eventsBySource).length - 1 ? `1px solid ${palette.divider}` : 'none',
|
|
210
|
-
px:
|
|
211
|
-
py: 1
|
|
212
|
+
px: 0,
|
|
213
|
+
py: 1,
|
|
212
214
|
'&:hover': {
|
|
213
215
|
bgcolor: 'rgba(0, 0, 0, 0.02)'
|
|
214
216
|
}
|
|
@@ -303,9 +305,7 @@ function EventSelector({
|
|
|
303
305
|
children: /*#__PURE__*/_jsx(List, {
|
|
304
306
|
disablePadding: true,
|
|
305
307
|
sx: {
|
|
306
|
-
|
|
307
|
-
pr: 2,
|
|
308
|
-
py: 1,
|
|
308
|
+
p: 0,
|
|
309
309
|
bgcolor: 'rgba(0, 0, 0, 0.01)'
|
|
310
310
|
},
|
|
311
311
|
children: events.map(event => {
|
|
@@ -314,7 +314,8 @@ function EventSelector({
|
|
|
314
314
|
return /*#__PURE__*/_jsx(ListItem, {
|
|
315
315
|
dense: true,
|
|
316
316
|
sx: {
|
|
317
|
-
py: 0.75
|
|
317
|
+
py: 0.75,
|
|
318
|
+
px: 1
|
|
318
319
|
},
|
|
319
320
|
onClick: () => handleToggleEvent(event),
|
|
320
321
|
children: /*#__PURE__*/_jsxs(Box, {
|
|
@@ -326,14 +327,21 @@ function EventSelector({
|
|
|
326
327
|
children: [/*#__PURE__*/_jsx(Checkbox, {
|
|
327
328
|
checked: isChecked,
|
|
328
329
|
sx: {
|
|
329
|
-
|
|
330
|
+
flexShrink: 0
|
|
330
331
|
}
|
|
331
332
|
}), /*#__PURE__*/_jsxs(Box, {
|
|
333
|
+
sx: {
|
|
334
|
+
flex: 1,
|
|
335
|
+
minWidth: 0
|
|
336
|
+
},
|
|
332
337
|
children: [/*#__PURE__*/_jsx(Typography, {
|
|
333
338
|
variant: "body1",
|
|
339
|
+
className: "webhook-event-type",
|
|
334
340
|
sx: {
|
|
335
341
|
cursor: 'pointer',
|
|
336
|
-
color: 'text.primary'
|
|
342
|
+
color: 'text.primary',
|
|
343
|
+
wordBreak: 'break-word',
|
|
344
|
+
overflowWrap: 'break-word'
|
|
337
345
|
},
|
|
338
346
|
children: event.type
|
|
339
347
|
}), /*#__PURE__*/_jsx(Typography, {
|
|
@@ -341,7 +349,9 @@ function EventSelector({
|
|
|
341
349
|
sx: {
|
|
342
350
|
color: 'text.secondary',
|
|
343
351
|
display: 'block',
|
|
344
|
-
cursor: 'pointer'
|
|
352
|
+
cursor: 'pointer',
|
|
353
|
+
wordBreak: 'break-word',
|
|
354
|
+
overflowWrap: 'break-word'
|
|
345
355
|
},
|
|
346
356
|
children: event.description
|
|
347
357
|
})]
|
|
@@ -406,6 +416,7 @@ function CreateOrEditHook({
|
|
|
406
416
|
error,
|
|
407
417
|
eventsBySource
|
|
408
418
|
} = useOpenEvent();
|
|
419
|
+
const theme = useTheme();
|
|
409
420
|
const {
|
|
410
421
|
control,
|
|
411
422
|
handleSubmit: validateSubmit,
|
|
@@ -421,6 +432,7 @@ function CreateOrEditHook({
|
|
|
421
432
|
description: ''
|
|
422
433
|
}
|
|
423
434
|
});
|
|
435
|
+
const isBreakpointsDownSm = useMediaQuery(theme.breakpoints.down('md'));
|
|
424
436
|
useEffect(() => {
|
|
425
437
|
const hasSelectedEvents = Object.values(selectedEvents).some(value => value);
|
|
426
438
|
setValue('selectedEvents', hasSelectedEvents ? 'valid' : '');
|
|
@@ -486,6 +498,7 @@ function CreateOrEditHook({
|
|
|
486
498
|
onClose: handleClose,
|
|
487
499
|
maxWidth: "lg",
|
|
488
500
|
fullWidth: true,
|
|
501
|
+
fullScreen: isBreakpointsDownSm,
|
|
489
502
|
sx: {
|
|
490
503
|
'& .MuiDialog-paper': {
|
|
491
504
|
minHeight: 600
|
package/lib/locales/ar.js
CHANGED
package/lib/locales/de.js
CHANGED
package/lib/locales/en.js
CHANGED
package/lib/locales/es.js
CHANGED
package/lib/locales/fr.js
CHANGED
package/lib/locales/hi.js
CHANGED
package/lib/locales/i18n.json
CHANGED
|
@@ -45538,5 +45538,25 @@
|
|
|
45538
45538
|
"vi": "Chỉ một thực thể",
|
|
45539
45539
|
"th": "มีเพียงอินสแตนซ์เดียว"
|
|
45540
45540
|
}
|
|
45541
|
+
},
|
|
45542
|
+
"common.userSessions": {
|
|
45543
|
+
"en": "User Sessions",
|
|
45544
|
+
"value": {
|
|
45545
|
+
"en": "User Sessions",
|
|
45546
|
+
"es": "Sesiones de Usuario",
|
|
45547
|
+
"zh": "用户会话",
|
|
45548
|
+
"zh-TW": "使用者工作階段",
|
|
45549
|
+
"ja": "ユーザーセッション",
|
|
45550
|
+
"ko": "사용자 세션",
|
|
45551
|
+
"de": "Benutzersitzungen",
|
|
45552
|
+
"hi": "उपयोगकर्ता सत्र",
|
|
45553
|
+
"fr": "Sessions utilisateur",
|
|
45554
|
+
"ar": "جلسات المستخدم",
|
|
45555
|
+
"ru": "Сеансы пользователя",
|
|
45556
|
+
"pt": "Sessões de Usuário",
|
|
45557
|
+
"id": "Sesi Pengguna",
|
|
45558
|
+
"vi": "Phiên người dùng",
|
|
45559
|
+
"th": "เซสชันผู้ใช้"
|
|
45560
|
+
}
|
|
45541
45561
|
}
|
|
45542
45562
|
}
|
package/lib/locales/id.js
CHANGED
package/lib/locales/ja.js
CHANGED
package/lib/locales/ko.js
CHANGED
package/lib/locales/pt.js
CHANGED
package/lib/locales/ru.js
CHANGED
package/lib/locales/th.js
CHANGED
package/lib/locales/vi.js
CHANGED
package/lib/locales/zh-tw.js
CHANGED
package/lib/locales/zh.js
CHANGED
|
@@ -8,11 +8,13 @@ import { mergeDarkStyle } from '../utils';
|
|
|
8
8
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
9
9
|
AssetPreview.propTypes = {
|
|
10
10
|
locale: PropTypes.string,
|
|
11
|
-
data: PropTypes.object.isRequired
|
|
11
|
+
data: PropTypes.object.isRequired,
|
|
12
|
+
type: PropTypes.oneOf(['asset', 'vc'])
|
|
12
13
|
};
|
|
13
14
|
function AssetPreview({
|
|
14
15
|
locale = 'en',
|
|
15
|
-
data
|
|
16
|
+
data,
|
|
17
|
+
type = 'asset'
|
|
16
18
|
}) {
|
|
17
19
|
const title = {
|
|
18
20
|
zh: '接收',
|
|
@@ -48,6 +50,10 @@ function AssetPreview({
|
|
|
48
50
|
display: 'block'
|
|
49
51
|
},
|
|
50
52
|
onClick: e => {
|
|
53
|
+
if (type === 'vc') {
|
|
54
|
+
e.preventDefault();
|
|
55
|
+
return;
|
|
56
|
+
}
|
|
51
57
|
e.customPreventRedirect = true;
|
|
52
58
|
},
|
|
53
59
|
rel: "noreferrer",
|
|
@@ -40,7 +40,8 @@ function AttachmentPreviewPage({
|
|
|
40
40
|
}), attachment.type === 'asset' || attachment.type === 'vc' ? /*#__PURE__*/_jsx(AssetPreview, {
|
|
41
41
|
data: attachment.data,
|
|
42
42
|
local: local,
|
|
43
|
-
isMd: isMd
|
|
43
|
+
isMd: isMd,
|
|
44
|
+
type: attachment.type
|
|
44
45
|
}) : null, attachment.type === 'dapp' && /*#__PURE__*/_jsx(DAPPPreview, {
|
|
45
46
|
data: attachment.data,
|
|
46
47
|
local: local,
|
package/lib/simple-select.js
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
/* eslint-disable react/require-default-props */
|
|
2
2
|
import PropTypes from 'prop-types';
|
|
3
|
-
import { Box, Chip, FormControl, FormHelperText, InputLabel,
|
|
3
|
+
import { Box, Chip, FormControl, FormHelperText, InputLabel, MenuItem, OutlinedInput, Select, Typography } from '@mui/material';
|
|
4
|
+
import ArrowDownwardIcon from '@arcblock/icons/lib/ArrowDown';
|
|
4
5
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
5
6
|
function SimpleSelect({
|
|
6
7
|
fullWidth = false,
|
|
@@ -12,7 +13,6 @@ function SimpleSelect({
|
|
|
12
13
|
helperText = '',
|
|
13
14
|
error = false,
|
|
14
15
|
margin = '',
|
|
15
|
-
textDirection = 'row',
|
|
16
16
|
size,
|
|
17
17
|
...rest
|
|
18
18
|
}) {
|
|
@@ -27,6 +27,16 @@ function SimpleSelect({
|
|
|
27
27
|
children: `${label}${required ? '*' : ''}`
|
|
28
28
|
}), /*#__PURE__*/_jsxs(Select, {
|
|
29
29
|
multiple: multiple,
|
|
30
|
+
sx: {
|
|
31
|
+
'& .MuiInputBase-input': {
|
|
32
|
+
width: 'calc(100% - 46px)',
|
|
33
|
+
'& > .MuiBox-root:first-of-type': {
|
|
34
|
+
overflow: 'hidden',
|
|
35
|
+
textOverflow: 'ellipsis',
|
|
36
|
+
whiteSpace: 'nowrap'
|
|
37
|
+
}
|
|
38
|
+
}
|
|
39
|
+
},
|
|
30
40
|
input: /*#__PURE__*/_jsx(OutlinedInput, {
|
|
31
41
|
defaultValue: defaultValue,
|
|
32
42
|
sx: {
|
|
@@ -71,7 +81,14 @@ function SimpleSelect({
|
|
|
71
81
|
children: option.description
|
|
72
82
|
})]
|
|
73
83
|
});
|
|
74
|
-
}
|
|
84
|
+
}
|
|
85
|
+
// eslint-disable-next-line react/no-unstable-nested-components
|
|
86
|
+
,
|
|
87
|
+
IconComponent: props => /*#__PURE__*/_jsx(ArrowDownwardIcon, {
|
|
88
|
+
...props,
|
|
89
|
+
width: 20,
|
|
90
|
+
height: 20
|
|
91
|
+
}),
|
|
75
92
|
...rest,
|
|
76
93
|
children: [/*#__PURE__*/_jsx(MenuItem, {
|
|
77
94
|
disabled: true,
|
|
@@ -81,25 +98,21 @@ function SimpleSelect({
|
|
|
81
98
|
}), !required && !multiple && /*#__PURE__*/_jsx(MenuItem, {
|
|
82
99
|
value: "",
|
|
83
100
|
children: "None"
|
|
84
|
-
}), options.map(option => option && option.value && /*#__PURE__*/
|
|
85
|
-
sx: [{
|
|
86
|
-
justifyContent: 'center'
|
|
87
|
-
}, textDirection === 'column' ? {
|
|
88
|
-
flexDirection: 'column',
|
|
89
|
-
alignItems: 'flex-start'
|
|
90
|
-
} : {}],
|
|
101
|
+
}), options.map(option => option && option.value && /*#__PURE__*/_jsx(MenuItem, {
|
|
91
102
|
value: option.value,
|
|
92
|
-
children:
|
|
93
|
-
children:
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
+
children: /*#__PURE__*/_jsxs(Box, {
|
|
104
|
+
children: [/*#__PURE__*/_jsx("span", {
|
|
105
|
+
children: option.title
|
|
106
|
+
}), option.description && /*#__PURE__*/_jsx(Box, {
|
|
107
|
+
sx: {
|
|
108
|
+
maxWidth: 510,
|
|
109
|
+
fontSize: 12,
|
|
110
|
+
color: '#999',
|
|
111
|
+
whiteSpace: 'normal'
|
|
112
|
+
},
|
|
113
|
+
children: option.description
|
|
114
|
+
})]
|
|
115
|
+
})
|
|
103
116
|
}, option.value))]
|
|
104
117
|
}), /*#__PURE__*/_jsx(FormHelperText, {
|
|
105
118
|
children: helperText
|