@cccsaurora/howler-ui 2.12.0-dev.42 → 2.12.0-dev.45
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/components/elements/Comment.js +2 -3
- package/components/elements/EditRow.js +3 -6
- package/components/elements/display/TypingIndicator.js +1 -1
- package/components/elements/display/modals/LoginErrorModal.js +2 -2
- package/components/hooks/useMyPreferences.js +3 -5
- package/components/routes/404.js +2 -2
- package/components/routes/ErrorBoundary.js +2 -2
- package/components/routes/ErrorOccured.js +2 -2
- package/components/routes/hits/search/HitQuery.js +2 -3
- package/components/routes/home/ViewCard.js +2 -2
- package/components/routes/settings/SecuritySection.js +2 -2
- package/package.json +1 -1
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
|
|
2
|
-
import { Celebration, Check, Clear, Delete, Edit, Favorite, FireTruck, FormatQuote, Mood, RocketLaunch, ThumbDown, ThumbUp } from '@mui/icons-material';
|
|
3
|
-
import MoreHorizIcon from '@mui/icons-material/MoreHoriz';
|
|
2
|
+
import { Celebration, Check, Clear, Delete, Edit, Favorite, FireTruck, FormatQuote, Mood, MoreHoriz, RocketLaunch, ThumbDown, ThumbUp } from '@mui/icons-material';
|
|
4
3
|
import { CardActions, CardContent, Chip, CircularProgress, Collapse, Fade, IconButton, ListItemIcon, ListItemText, Menu, MenuItem, Stack, TextField, Tooltip, Typography } from '@mui/material';
|
|
5
4
|
import { useAppUser } from '@cccsaurora/howler-ui/commons/components/app/hooks';
|
|
6
5
|
import FlexOne from '@cccsaurora/howler-ui/components/elements/addons/layout/FlexOne';
|
|
@@ -91,7 +90,7 @@ const Comment = ({ comment, handleDelete, handleEdit, handleQuote, handleReact,
|
|
|
91
90
|
}), children: t('comments.edited') })), _jsx(Tooltip, { title: new Date(comment.timestamp).toLocaleString(), children: _jsx(Typography, { variant: "caption", sx: theme => ({
|
|
92
91
|
marginRight: `${theme.spacing(1)} !important`,
|
|
93
92
|
color: shiftColor(theme.palette.text.primary, 0.25)
|
|
94
|
-
}), children: twitterShort(comment.timestamp) }) }), extra, (handleDelete || handleEdit || handleQuote) && (_jsx(Fade, { in: showInteractions, children: _jsx(IconButton, { size: "small", sx: [{ marginLeft: 'auto !important' }, editing && { display: 'none' }], id: `comment${comment.id}-button`, "aria-haspopup": "true", "aria-controls": anchorEl ? `comment${comment.id}-action-menu` : undefined, "aria-expanded": anchorEl ? 'true' : undefined, onClick: handleOpen, children: _jsx(
|
|
93
|
+
}), children: twitterShort(comment.timestamp) }) }), extra, (handleDelete || handleEdit || handleQuote) && (_jsx(Fade, { in: showInteractions, children: _jsx(IconButton, { size: "small", sx: [{ marginLeft: 'auto !important' }, editing && { display: 'none' }], id: `comment${comment.id}-button`, "aria-haspopup": "true", "aria-controls": anchorEl ? `comment${comment.id}-action-menu` : undefined, "aria-expanded": anchorEl ? 'true' : undefined, onClick: handleOpen, children: _jsx(MoreHoriz, { fontSize: "small" }) }) })), _jsxs(Menu, { id: `comment${comment.id}-action-menu`, anchorEl: anchorEl, open: !!anchorEl, onClose: handleClose, MenuListProps: {
|
|
95
94
|
dense: true,
|
|
96
95
|
'aria-labelledby': `comment${comment.id}-button`
|
|
97
96
|
}, anchorOrigin: {
|
|
@@ -1,8 +1,5 @@
|
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
|
|
2
|
-
import { Delete } from '@mui/icons-material';
|
|
3
|
-
import CheckIcon from '@mui/icons-material/Check';
|
|
4
|
-
import CloseIcon from '@mui/icons-material/Close';
|
|
5
|
-
import EditIcon from '@mui/icons-material/Edit';
|
|
2
|
+
import { Check, Close, Delete, Edit } from '@mui/icons-material';
|
|
6
3
|
import { Box, Checkbox, CircularProgress, IconButton, Slider, Stack, TableCell, TableRow, TextField, Typography } from '@mui/material';
|
|
7
4
|
import useMySnackbar from '@cccsaurora/howler-ui/components/hooks/useMySnackbar';
|
|
8
5
|
import { isNull, isUndefined } from 'lodash-es';
|
|
@@ -110,9 +107,9 @@ const EditRow = ({ titleKey, descriptionKey, value, onEdit, validate, failOnVali
|
|
|
110
107
|
setError(false);
|
|
111
108
|
}, onKeyDown: checkForActions, fullWidth: true, label: t('password.confirm'), type: "password", error: error, sx: { '& input': { fontSize: '13.5px !important' } }, InputProps: {
|
|
112
109
|
endAdornment: loading && _jsx(CircularProgress, { size: 24 })
|
|
113
|
-
} }))] }), _jsx(IconButton, { onClick: onSubmit, disabled: loading, children: _jsx(
|
|
110
|
+
} }))] }), _jsx(IconButton, { onClick: onSubmit, disabled: loading, children: _jsx(Check, { fontSize: "small" }) }), _jsx(IconButton, { onClick: () => setEditing(false), disabled: loading, children: _jsx(Close, { fontSize: "small" }) }), optional && (_jsx(IconButton, { onClick: () => {
|
|
114
111
|
setEditing(false);
|
|
115
112
|
onEdit(null);
|
|
116
|
-
}, disabled: loading, children: _jsx(Delete, { fontSize: "small" }) }))] }) })) : (_jsxs(TableCell, { sx: cellSx, width: "100%", children: [type === 'checkbox' ? (_jsx(Checkbox, { onChange: ev => onChange(ev.target.checked), checked: value.toString() === 'true' })) : ((value ?? t('none'))), type === 'range' && value && 'px'] })), onEdit && !editing && type !== 'checkbox' && (_jsx(TableCell, { sx: cellSx, align: "right", children: _jsx(IconButton, { onClick: () => setEditing(true), children: _jsx(
|
|
113
|
+
}, disabled: loading, children: _jsx(Delete, { fontSize: "small" }) }))] }) })) : (_jsxs(TableCell, { sx: cellSx, width: "100%", children: [type === 'checkbox' ? (_jsx(Checkbox, { onChange: ev => onChange(ev.target.checked), checked: value.toString() === 'true' })) : ((value ?? t('none'))), type === 'range' && value && 'px'] })), onEdit && !editing && type !== 'checkbox' && (_jsx(TableCell, { sx: cellSx, align: "right", children: _jsx(IconButton, { onClick: () => setEditing(true), children: _jsx(Edit, { fontSize: "small" }) }) }))] }), descriptionKey && (_jsx(TableRow, { children: _jsx(TableCell, { colSpan: 3, sx: { paddingTop: '0 !important' }, children: _jsx(Typography, { variant: "caption", color: "text.secondary", children: t(descriptionKey) }) }) }))] }));
|
|
117
114
|
};
|
|
118
115
|
export default EditRow;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
-
import Circle from '@mui/icons-material
|
|
2
|
+
import { Circle } from '@mui/icons-material';
|
|
3
3
|
import { alpha, Stack } from '@mui/material';
|
|
4
4
|
const TypingIndicator = () => {
|
|
5
5
|
return (_jsxs(Stack, { direction: "row", sx: theme => ({
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
-
import
|
|
2
|
+
import { Error } from '@mui/icons-material';
|
|
3
3
|
import { Button, Divider, Stack, Typography } from '@mui/material';
|
|
4
4
|
import { useTranslation } from 'react-i18next';
|
|
5
5
|
const LoginErrorModal = ({ error }) => {
|
|
6
6
|
const { t } = useTranslation();
|
|
7
|
-
return (_jsxs(Stack, { direction: "row", spacing: 3, alignItems: "center", children: [_jsx("img", { src: "/images/doggie.png", alt: "" }), _jsxs(Stack, { children: [_jsxs(Stack, { direction: "row", alignItems: "center", spacing: 1, children: [_jsx(
|
|
7
|
+
return (_jsxs(Stack, { direction: "row", spacing: 3, alignItems: "center", children: [_jsx("img", { src: "/images/doggie.png", alt: "" }), _jsxs(Stack, { children: [_jsxs(Stack, { direction: "row", alignItems: "center", spacing: 1, children: [_jsx(Error, { color: "error" }), _jsx(Typography, { variant: "h5", children: t('user.error.modal.header') })] }), _jsx(Divider, { orientation: "horizontal", sx: { mt: 1, mb: 1 } }), _jsx(Typography, { variant: "body1", children: t('user.error.modal.body') }), _jsx(Typography, { variant: "body1", sx: { mt: 1 }, children: t('user.error.modal.details') }), _jsx("code", { style: { fontSize: '0.8rem' }, children: error.toString() }), _jsx(Stack, { direction: "row", justifyContent: "end", sx: { pt: 1 }, children: _jsx(Button, { onClick: () => window.location.reload(), children: t('user.error.modal.reload') }) })] })] }));
|
|
8
8
|
};
|
|
9
9
|
export default LoginErrorModal;
|
|
@@ -1,7 +1,5 @@
|
|
|
1
1
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
-
import { Api, Article, Book, Code, Dashboard, Description, Edit, FormatListBulleted, Help, HelpCenter, Key, ManageSearch, QueryStats, SavedSearch, Search, SettingsSuggest, Shield, Storage, SupervisorAccount, Terminal, Topic } from '@mui/icons-material';
|
|
3
|
-
import ExitToAppIcon from '@mui/icons-material/ExitToApp';
|
|
4
|
-
import SettingsIcon from '@mui/icons-material/Settings';
|
|
2
|
+
import { Api, Article, Book, Code, Dashboard, Description, Edit, ExitToApp, FormatListBulleted, Help, HelpCenter, Key, ManageSearch, QueryStats, SavedSearch, Search, Settings, SettingsSuggest, Shield, Storage, SupervisorAccount, Terminal, Topic } from '@mui/icons-material';
|
|
5
3
|
import { AppBrand } from '@cccsaurora/howler-ui/branding/AppBrand';
|
|
6
4
|
import Classification from '@cccsaurora/howler-ui/components/elements/display/Classification';
|
|
7
5
|
import DocumentationButton from '@cccsaurora/howler-ui/components/elements/display/DocumentationButton';
|
|
@@ -203,12 +201,12 @@ const useMyPreferences = () => {
|
|
|
203
201
|
{
|
|
204
202
|
i18nKey: 'usermenu.settings',
|
|
205
203
|
route: '/settings',
|
|
206
|
-
icon: _jsx(
|
|
204
|
+
icon: _jsx(Settings, {})
|
|
207
205
|
},
|
|
208
206
|
{
|
|
209
207
|
i18nKey: 'usermenu.logout',
|
|
210
208
|
route: '/logout',
|
|
211
|
-
icon: _jsx(
|
|
209
|
+
icon: _jsx(ExitToApp, {})
|
|
212
210
|
}
|
|
213
211
|
], []);
|
|
214
212
|
// This is the basic administrator menu, it is a menu that shows up under the user menu in the account avatar popover.
|
package/components/routes/404.js
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
-
import
|
|
2
|
+
import { LinkOff } from '@mui/icons-material';
|
|
3
3
|
import { Box, Typography } from '@mui/material';
|
|
4
4
|
import PageCenter from '@cccsaurora/howler-ui/commons/components/pages/PageCenter';
|
|
5
5
|
import { useTranslation } from 'react-i18next';
|
|
6
6
|
const NotFoundPage = () => {
|
|
7
7
|
const { t } = useTranslation();
|
|
8
|
-
return (_jsxs(PageCenter, { width: "75%", children: [_jsx(Box, { pt: 6, textAlign: "center", fontSize: 200, children: _jsx(
|
|
8
|
+
return (_jsxs(PageCenter, { width: "75%", children: [_jsx(Box, { pt: 6, textAlign: "center", fontSize: 200, children: _jsx(LinkOff, { color: "secondary", fontSize: "inherit" }) }), _jsx(Box, { pb: 2, children: _jsx(Typography, { variant: "h2", children: t('page.404.title') }) }), _jsx(Box, { children: _jsx(Typography, { variant: "h5", children: t('page.404.description') }) })] }));
|
|
9
9
|
};
|
|
10
10
|
export default NotFoundPage;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
-
import
|
|
2
|
+
import { ExpandMore } from '@mui/icons-material';
|
|
3
3
|
import { Accordion, AccordionDetails, AccordionSummary, Box, Typography } from '@mui/material';
|
|
4
4
|
import React, {} from 'react';
|
|
5
5
|
import ErrorOccured from './ErrorOccured';
|
|
@@ -16,7 +16,7 @@ class ErrorBoundary extends React.Component {
|
|
|
16
16
|
}
|
|
17
17
|
render() {
|
|
18
18
|
if (this.state.hasError) {
|
|
19
|
-
return (_jsxs(Box, { pt: 6, textAlign: "center", fontSize: 20, children: [_jsx(ErrorOccured, {}), _jsxs(Accordion, { elevation: 0, children: [_jsx(AccordionSummary, { expandIcon: _jsx(
|
|
19
|
+
return (_jsxs(Box, { pt: 6, textAlign: "center", fontSize: 20, children: [_jsx(ErrorOccured, {}), _jsxs(Accordion, { elevation: 0, children: [_jsx(AccordionSummary, { expandIcon: _jsx(ExpandMore, {}), "aria-controls": "panel1-content", id: "panel1-header", children: _jsx(Typography, { align: "center", sx: { width: '100%', fontSize: '1.2rem' }, variant: "h5", children: this.state.error.message }) }), _jsx(AccordionDetails, { children: _jsx("code", { children: _jsx(Typography, { variant: "h6", children: this.state.error.stack }) }) })] })] }));
|
|
20
20
|
}
|
|
21
21
|
return this.props.children;
|
|
22
22
|
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
-
import
|
|
2
|
+
import { Error } from '@mui/icons-material';
|
|
3
3
|
import { Box, Typography } from '@mui/material';
|
|
4
4
|
import PageCenter from '@cccsaurora/howler-ui/commons/components/pages/PageCenter';
|
|
5
5
|
import howlerPluginStore from '@cccsaurora/howler-ui/plugins/store';
|
|
@@ -8,6 +8,6 @@ import { usePluginStore } from 'react-pluggable';
|
|
|
8
8
|
const ErrorOccured = () => {
|
|
9
9
|
const { t } = useTranslation();
|
|
10
10
|
const pluginStore = usePluginStore();
|
|
11
|
-
return (_jsxs(PageCenter, { width: "75%", children: [_jsx(Box, { pt: 6, textAlign: "center", fontSize: 200, children: _jsx(
|
|
11
|
+
return (_jsxs(PageCenter, { width: "75%", children: [_jsx(Box, { pt: 6, textAlign: "center", fontSize: 200, children: _jsx(Error, { fontSize: "inherit", style: { color: '#f44336' } }) }), _jsx(Box, { pb: 2, children: _jsx(Typography, { variant: "h2", children: t('page.error.title') }) }), _jsx(Box, { children: _jsx(Typography, { variant: "h5", children: t('page.error.description') }) }), howlerPluginStore.plugins.map(plugin => pluginStore.executeFunction(`${plugin}.support`))] }));
|
|
12
12
|
};
|
|
13
13
|
export default ErrorOccured;
|
|
@@ -1,11 +1,10 @@
|
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
2
|
import { useMonaco } from '@monaco-editor/react';
|
|
3
|
-
import { Height, Search } from '@mui/icons-material';
|
|
3
|
+
import { Height, History, Search } from '@mui/icons-material';
|
|
4
4
|
import { Badge, Box, Card, Skeleton, Tooltip, alpha, useTheme } from '@mui/material';
|
|
5
5
|
import { ParameterContext } from '@cccsaurora/howler-ui/components/app/providers/ParameterProvider';
|
|
6
6
|
import TuiIconButton from '@cccsaurora/howler-ui/components/elements/addons/buttons/CustomIconButton';
|
|
7
7
|
import QueryEditor from '@cccsaurora/howler-ui/components/routes/advanced/QueryEditor';
|
|
8
|
-
import HistoryIcon from '@mui/icons-material/History';
|
|
9
8
|
import { HitSearchContext } from '@cccsaurora/howler-ui/components/app/providers/HitSearchProvider';
|
|
10
9
|
import { memo, useCallback, useEffect, useMemo, useRef, useState } from 'react';
|
|
11
10
|
import { useTranslation } from 'react-i18next';
|
|
@@ -129,7 +128,7 @@ const HitQuery = ({ searching = false, disabled = false, compact = false, trigge
|
|
|
129
128
|
p: 0.5,
|
|
130
129
|
height: multiline ? `${DEFAULT_MULTILINE_HEIGHT + y}px` : theme.spacing(5)
|
|
131
130
|
}
|
|
132
|
-
], onKeyDown: e => e.stopPropagation(), children: [_jsx(TuiIconButton, { disabled: query.includes('\n#') || disabled, sx: { mr: 1, alignSelf: 'start' }, onClick: () => setMultiline(!multiline), color: multiline ? 'primary' : theme.palette.text.primary, transparent: !multiline, size: compact ? 'small' : 'medium', children: _jsx(Height, { sx: { fontSize: '20px' } }) }), _jsx(QueryEditor, { query: preppedQuery, setQuery: setQuery, language: "lucene", height: multiline ? '100%' : '20px', onMount: onMount, editorOptions: options }), fzfSearch && (_jsx(Tooltip, { title: t('route.history'), children: _jsx(
|
|
131
|
+
], onKeyDown: e => e.stopPropagation(), children: [_jsx(TuiIconButton, { disabled: query.includes('\n#') || disabled, sx: { mr: 1, alignSelf: 'start' }, onClick: () => setMultiline(!multiline), color: multiline ? 'primary' : theme.palette.text.primary, transparent: !multiline, size: compact ? 'small' : 'medium', children: _jsx(Height, { sx: { fontSize: '20px' } }) }), _jsx(QueryEditor, { query: preppedQuery, setQuery: setQuery, language: "lucene", height: multiline ? '100%' : '20px', onMount: onMount, editorOptions: options }), fzfSearch && (_jsx(Tooltip, { title: t('route.history'), children: _jsx(History, {}) })), _jsx(TuiIconButton, { disabled: searching || disabled, onClick: search, sx: { ml: 1, alignSelf: 'start', flexShrink: 0 }, size: compact ? 'small' : 'medium', children: _jsx(Tooltip, { title: t('route.search'), children: _jsx(Badge, { invisible: !isDirty, color: "warning", variant: "dot", children: _jsx(Search, { sx: { fontSize: '20px' } }) }) }) }), !loaded && (_jsx(Skeleton, { variant: "rectangular", sx: { position: 'absolute', top: 0, left: 0, right: 0, bottom: 0 }, height: "100%" })), multiline && (_jsx(Box, { sx: {
|
|
133
132
|
position: 'absolute',
|
|
134
133
|
left: 0,
|
|
135
134
|
right: 0,
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
|
|
2
|
-
import
|
|
2
|
+
import { OpenInNew } from '@mui/icons-material';
|
|
3
3
|
import { Card, CardContent, IconButton, Skeleton, Stack, Typography } from '@mui/material';
|
|
4
4
|
import api from '@cccsaurora/howler-ui/api';
|
|
5
5
|
import AppListEmpty from '@cccsaurora/howler-ui/commons/components/display/AppListEmpty';
|
|
@@ -34,6 +34,6 @@ const ViewCard = ({ viewId, limit }) => {
|
|
|
34
34
|
});
|
|
35
35
|
}, [dispatchApi, limit, view?.query]);
|
|
36
36
|
const onClick = useCallback((query) => navigate('/hits?query=' + query), [navigate]);
|
|
37
|
-
return (_jsx(Card, { variant: "outlined", sx: { height: '100%' }, children: _jsxs(Stack, { spacing: 1, sx: { p: 1, minHeight: 100 }, children: [_jsxs(Stack, { direction: "row", spacing: 1, alignItems: "center", children: [_jsx(Typography, { variant: "h6", children: t(view?.title) || _jsx(Skeleton, { variant: "text", height: "2em", width: "100px" }) }), _jsx(IconButton, { size: "small", onClick: () => onClick(view.query), children: _jsx(
|
|
37
|
+
return (_jsx(Card, { variant: "outlined", sx: { height: '100%' }, children: _jsxs(Stack, { spacing: 1, sx: { p: 1, minHeight: 100 }, children: [_jsxs(Stack, { direction: "row", spacing: 1, alignItems: "center", children: [_jsx(Typography, { variant: "h6", children: t(view?.title) || _jsx(Skeleton, { variant: "text", height: "2em", width: "100px" }) }), _jsx(IconButton, { size: "small", onClick: () => onClick(view.query), children: _jsx(OpenInNew, { fontSize: "small" }) })] }), loading ? (_jsxs(_Fragment, { children: [_jsx(Skeleton, { height: 150, width: "100%", variant: "rounded" }), _jsx(Skeleton, { height: 160, width: "100%", variant: "rounded" }), _jsx(Skeleton, { height: 140, width: "100%", variant: "rounded" })] })) : hits.length > 0 ? (hits.map(h => (_jsx(Card, { variant: "outlined", sx: { cursor: 'pointer' }, onClick: () => navigate((h.howler.is_bundle ? '/bundles/' : '/hits/') + h.howler.id), children: _jsx(CardContent, { children: _jsx(HitBanner, { layout: HitLayout.DENSE, hit: h }) }) }, h.howler.id)))) : (_jsx(AppListEmpty, {}))] }) }));
|
|
38
38
|
};
|
|
39
39
|
export default ViewCard;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
-
import
|
|
2
|
+
import { Add } from '@mui/icons-material';
|
|
3
3
|
import { Chip, Grid, IconButton, TableCell, TableRow } from '@mui/material';
|
|
4
4
|
import { ApiConfigContext } from '@cccsaurora/howler-ui/components/app/providers/ApiConfigProvider';
|
|
5
5
|
import useMyLocalStorage from '@cccsaurora/howler-ui/components/hooks/useMyLocalStorage';
|
|
@@ -26,6 +26,6 @@ const SecuritySection = ({ user, editPassword, addApiKey, removeApiKey, editQuot
|
|
|
26
26
|
return (_jsxs(SettingsSection, { title: t('page.settings.security.title'), colSpan: 3, children: [!isOAuth && editPassword && (_jsx(EditRow, { titleKey: "page.settings.security.table.password", value: "\u25CF\u25CF\u25CF\u25CF\u25CF\u25CF\u25CF\u25CF\u25CF\u25CF\u25CF", onEdit: editPassword, type: "password" })), config?.configuration.auth.allow_apikeys && (_jsxs(TableRow, { sx: { cursor: 'pointer' }, children: [_jsx(TableCell, { style: { whiteSpace: 'nowrap' }, children: t('page.settings.security.table.apikeys') }), _jsx(TableCell, { width: "100%", children: _jsxs(Grid, { container: true, spacing: 1, children: [user?.apikeys?.map(apiKey => (_jsx(Grid, { item: true, children: _jsx(Chip, { label: apiKey[0].toLocaleLowerCase() +
|
|
27
27
|
(apiKey[1].length > 0
|
|
28
28
|
? ` (${apiKey[1].map(permission => t(APIKEY_LABELS[permission])).join(', ')})`
|
|
29
|
-
: ''), style: { backgroundColor: moment.utc(apiKey[2]).isBefore(moment().utc()) ? 'orange' : 'default' }, onDelete: removeApiKey ? () => removeApiKey(apiKey) : null }) }, apiKey[0]))), user?.apikeys?.length < 1 && (_jsx(Grid, { item: true, children: _jsx(Trans, { i18nKey: "none" }) }))] }) }), _jsx(TableCell, { align: "right", children: addApiKey && (_jsx(IconButton, { onClick: addApiKey, children: _jsx(
|
|
29
|
+
: ''), style: { backgroundColor: moment.utc(apiKey[2]).isBefore(moment().utc()) ? 'orange' : 'default' }, onDelete: removeApiKey ? () => removeApiKey(apiKey) : null }) }, apiKey[0]))), user?.apikeys?.length < 1 && (_jsx(Grid, { item: true, children: _jsx(Trans, { i18nKey: "none" }) }))] }) }), _jsx(TableCell, { align: "right", children: addApiKey && (_jsx(IconButton, { onClick: addApiKey, children: _jsx(Add, { fontSize: "small" }) })) })] })), _jsx(EditRow, { titleKey: "page.settings.security.table.apiquota", descriptionKey: "page.settings.security.table.apiquota.description", value: user?.api_quota, validate: value => value && /^[0-9]*$/m.test(value.toString()), type: "number", onEdit: editQuota }), howlerPluginStore.plugins.map(plugin => pluginStore.executeFunction(`${plugin}.settings`, 'security'))] }));
|
|
30
30
|
};
|
|
31
31
|
export default SecuritySection;
|