@cccsaurora/howler-ui 2.12.0-dev.43 → 2.12.0-dev.47
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/api/auth/login.js +0 -1
- package/api/dossier/hit.js +1 -0
- package/api/dossier/index.js +1 -0
- package/api/hit/comments/react.js +1 -0
- package/components/elements/Comment.js +2 -3
- package/components/elements/EditRow.js +3 -6
- package/components/elements/addons/buttons/index.d.ts +1 -1
- package/components/elements/addons/buttons/index.js +2 -2
- package/components/elements/display/HandlebarsMarkdown.js +4 -3
- package/components/elements/display/TypingIndicator.js +1 -1
- package/components/elements/display/handlebars/helpers.d.ts +1 -1
- package/components/elements/display/handlebars/helpers.js +132 -127
- package/components/elements/display/modals/LoginErrorModal.js +2 -2
- package/components/hooks/useMyPreferences.js +3 -5
- package/components/hooks/useMySitemap.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/help/OverviewDocumentation.js +3 -3
- package/components/routes/hits/search/HitQuery.js +2 -3
- package/components/routes/home/ViewCard.js +2 -2
- package/components/routes/overviews/OverviewViewer.js +3 -2
- package/components/routes/overviews/startingTemplate.d.ts +1 -1
- package/components/routes/overviews/startingTemplate.js +8 -6
- package/components/routes/settings/SecuritySection.js +2 -2
- package/package.json +1 -1
- package/plugins/store.d.ts +2 -1
- package/plugins/store.js +4 -1
package/api/auth/login.js
CHANGED
|
@@ -10,7 +10,6 @@ export const post = (body) => {
|
|
|
10
10
|
export const get = (search) => {
|
|
11
11
|
const nonce = localStorage.getItem(`${MY_LOCAL_STORAGE_PREFIX}.${StorageKey.LOGIN_NONCE}`);
|
|
12
12
|
if (nonce) {
|
|
13
|
-
console.log('Adding nonce');
|
|
14
13
|
search.set('nonce', JSON.parse(nonce));
|
|
15
14
|
localStorage.removeItem(`${MY_LOCAL_STORAGE_PREFIX}.${StorageKey.LOGIN_NONCE}`);
|
|
16
15
|
}
|
package/api/dossier/hit.js
CHANGED
package/api/dossier/index.js
CHANGED
|
@@ -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,3 +1,3 @@
|
|
|
1
1
|
export declare const MuiButtonColors: readonly ["inherit", "primary", "secondary", "success", "error", "info", "warning"];
|
|
2
2
|
export type MuiButtonColorType = (typeof MuiButtonColors)[number];
|
|
3
|
-
export declare
|
|
3
|
+
export declare const isMuiButtonColor: (color: string) => boolean;
|
|
@@ -7,10 +7,11 @@ import { useTranslation } from 'react-i18next';
|
|
|
7
7
|
import Throttler from '@cccsaurora/howler-ui/utils/Throttler';
|
|
8
8
|
import { hashCode } from '@cccsaurora/howler-ui/utils/utils';
|
|
9
9
|
import Markdown, {} from '../display/Markdown';
|
|
10
|
-
import {
|
|
10
|
+
import { useHelpers } from './handlebars/helpers';
|
|
11
11
|
const THROTTLER = new Throttler(500);
|
|
12
12
|
const HandlebarsMarkdown = ({ md, object = {}, disableLinks = false }) => {
|
|
13
13
|
const { t } = useTranslation();
|
|
14
|
+
const helpers = useHelpers();
|
|
14
15
|
const [rendered, setRendered] = useState('');
|
|
15
16
|
const [mdComponents, setMdComponents] = useState({});
|
|
16
17
|
const handlebars = useMemo(() => {
|
|
@@ -28,7 +29,7 @@ const HandlebarsMarkdown = ({ md, object = {}, disableLinks = false }) => {
|
|
|
28
29
|
return instance;
|
|
29
30
|
}, []);
|
|
30
31
|
useEffect(() => {
|
|
31
|
-
helpers
|
|
32
|
+
helpers.forEach(helper => {
|
|
32
33
|
if (handlebars.helpers[helper.keyword] && !helper.componentCallback) {
|
|
33
34
|
return;
|
|
34
35
|
}
|
|
@@ -50,7 +51,7 @@ const HandlebarsMarkdown = ({ md, object = {}, disableLinks = false }) => {
|
|
|
50
51
|
return helper.callback(...args);
|
|
51
52
|
});
|
|
52
53
|
});
|
|
53
|
-
}, [handlebars, mdComponents]);
|
|
54
|
+
}, [handlebars, helpers, mdComponents]);
|
|
54
55
|
useEffect(() => {
|
|
55
56
|
THROTTLER.debounce(async () => {
|
|
56
57
|
try {
|
|
@@ -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 => ({
|
|
@@ -8,138 +8,143 @@ import { flatten } from 'flat';
|
|
|
8
8
|
import Handlebars from 'handlebars';
|
|
9
9
|
import { capitalize, get, groupBy, isObject } from 'lodash-es';
|
|
10
10
|
import howlerPluginStore from '@cccsaurora/howler-ui/plugins/store';
|
|
11
|
-
import {} from 'react';
|
|
11
|
+
import { useMemo } from 'react';
|
|
12
|
+
import { usePluginStore } from 'react-pluggable';
|
|
12
13
|
import JSONViewer from '../json/JSONViewer';
|
|
13
|
-
export const
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
keyword: '
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
14
|
+
export const useHelpers = () => {
|
|
15
|
+
const pluginStore = usePluginStore();
|
|
16
|
+
const allHelpers = useMemo(() => [
|
|
17
|
+
{
|
|
18
|
+
keyword: 'equals',
|
|
19
|
+
documentation: 'Checks the equality of the string representation of the two arguments.',
|
|
20
|
+
callback: (arg1, arg2) => arg1?.toString() === arg2.toString()
|
|
21
|
+
},
|
|
22
|
+
{
|
|
23
|
+
keyword: 'and',
|
|
24
|
+
documentation: 'Runs the comparison `arg1 && arg2`, and returns the result.',
|
|
25
|
+
callback: (arg1, arg2) => arg1 && arg2
|
|
26
|
+
},
|
|
27
|
+
{
|
|
28
|
+
keyword: 'or',
|
|
29
|
+
documentation: 'Runs the comparison `arg1 || arg2`, and returns the result.',
|
|
30
|
+
callback: (arg1, arg2) => arg1 || arg2
|
|
31
|
+
},
|
|
32
|
+
{ keyword: 'not', documentation: 'Runs the comparison `!arg`, and returns the result.', callback: arg => !arg },
|
|
33
|
+
{
|
|
34
|
+
keyword: 'curly',
|
|
35
|
+
documentation: 'Wraps the given argument in curly braces.',
|
|
36
|
+
callback: arg1 => new Handlebars.SafeString(`{{${arg1}}}`)
|
|
37
|
+
},
|
|
38
|
+
{
|
|
39
|
+
keyword: 'join',
|
|
40
|
+
documentation: 'Joins two string arguments with a given string `sep`, or the empty string as a default.',
|
|
41
|
+
callback: (arg1, arg2, context) => [arg1?.toString() ?? '', arg2?.toString() ?? ''].join(context.hash?.sep ?? '')
|
|
42
|
+
},
|
|
43
|
+
{
|
|
44
|
+
keyword: 'upper',
|
|
45
|
+
documentation: 'Returns the uppercase representation of a string argment.',
|
|
46
|
+
callback: (val) => val.toLocaleUpperCase()
|
|
47
|
+
},
|
|
48
|
+
{
|
|
49
|
+
keyword: 'lower',
|
|
50
|
+
documentation: 'Returns the lowercase representation of a string argment.',
|
|
51
|
+
callback: (val) => val.toLocaleLowerCase()
|
|
52
|
+
},
|
|
53
|
+
{
|
|
54
|
+
keyword: 'fetch',
|
|
55
|
+
documentation: 'Fetches the url provided and returns the given (flattened) key from the returned JSON object. Note that the result must be JSON!',
|
|
56
|
+
callback: async (url, key) => {
|
|
57
|
+
try {
|
|
58
|
+
const response = await fetch(url);
|
|
59
|
+
const json = await response.json();
|
|
60
|
+
return flatten(json)[key];
|
|
61
|
+
}
|
|
62
|
+
catch (e) {
|
|
63
|
+
return '';
|
|
64
|
+
}
|
|
58
65
|
}
|
|
59
|
-
|
|
60
|
-
|
|
66
|
+
},
|
|
67
|
+
{
|
|
68
|
+
keyword: 'howler',
|
|
69
|
+
documentation: 'Given a howler hit ID, this helper renders a hit card for that ID.',
|
|
70
|
+
componentCallback: id => {
|
|
71
|
+
if (!id) {
|
|
72
|
+
return _jsx(AppListEmpty, {});
|
|
73
|
+
}
|
|
74
|
+
return _jsx(HitCard, { id: id, layout: HitLayout.NORMAL });
|
|
61
75
|
}
|
|
62
|
-
}
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
76
|
+
},
|
|
77
|
+
{
|
|
78
|
+
keyword: 'entries',
|
|
79
|
+
documentation: 'Given a dict, return an array of {key, value} objects.',
|
|
80
|
+
callback: obj => {
|
|
81
|
+
if (!isObject(obj)) {
|
|
82
|
+
return new Handlebars.SafeString('Invalid Object.');
|
|
83
|
+
}
|
|
84
|
+
return Object.entries(obj).map(([key, value]) => ({ key, value }));
|
|
70
85
|
}
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
return
|
|
86
|
+
},
|
|
87
|
+
{
|
|
88
|
+
keyword: 'render_json',
|
|
89
|
+
documentation: 'Given a howler hit ID, this helper renders a hit card for that ID.',
|
|
90
|
+
componentCallback: data => {
|
|
91
|
+
if (!data) {
|
|
92
|
+
return _jsx(AppListEmpty, {});
|
|
93
|
+
}
|
|
94
|
+
return _jsx(JSONViewer, { data: data });
|
|
80
95
|
}
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
componentCallback: data => {
|
|
88
|
-
if (!data) {
|
|
89
|
-
return _jsx(AppListEmpty, {});
|
|
96
|
+
},
|
|
97
|
+
{
|
|
98
|
+
keyword: 'to_json',
|
|
99
|
+
documentation: 'Convert any object into a JSON string.',
|
|
100
|
+
callback: obj => {
|
|
101
|
+
return new Handlebars.SafeString(JSON.stringify(obj));
|
|
90
102
|
}
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
callback: obj => {
|
|
98
|
-
return new Handlebars.SafeString(JSON.stringify(obj));
|
|
99
|
-
}
|
|
100
|
-
},
|
|
101
|
-
{
|
|
102
|
-
keyword: 'parse_json',
|
|
103
|
-
documentation: 'Convert JSON string into and object.',
|
|
104
|
-
callback: str => {
|
|
105
|
-
return JSON.parse(str);
|
|
106
|
-
}
|
|
107
|
-
},
|
|
108
|
-
{
|
|
109
|
-
keyword: 'get',
|
|
110
|
-
documentation: 'Returns the given (flattened) key from the provided object.',
|
|
111
|
-
callback: async (data, key) => {
|
|
112
|
-
try {
|
|
113
|
-
return get(data, key);
|
|
103
|
+
},
|
|
104
|
+
{
|
|
105
|
+
keyword: 'parse_json',
|
|
106
|
+
documentation: 'Convert JSON string into and object.',
|
|
107
|
+
callback: str => {
|
|
108
|
+
return JSON.parse(str);
|
|
114
109
|
}
|
|
115
|
-
|
|
116
|
-
|
|
110
|
+
},
|
|
111
|
+
{
|
|
112
|
+
keyword: 'get',
|
|
113
|
+
documentation: 'Returns the given (flattened) key from the provided object.',
|
|
114
|
+
callback: async (data, key) => {
|
|
115
|
+
try {
|
|
116
|
+
return get(data, key);
|
|
117
|
+
}
|
|
118
|
+
catch (e) {
|
|
119
|
+
return '';
|
|
120
|
+
}
|
|
117
121
|
}
|
|
118
|
-
}
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
}
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
}
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
122
|
+
},
|
|
123
|
+
{
|
|
124
|
+
keyword: 'includes',
|
|
125
|
+
documentation: 'Checks if field is in string',
|
|
126
|
+
callback: (arg1, arg2) => {
|
|
127
|
+
return !!arg2 && !!arg1?.includes(arg2);
|
|
128
|
+
}
|
|
129
|
+
},
|
|
130
|
+
{
|
|
131
|
+
keyword: 'table',
|
|
132
|
+
documentation: 'Render a table in markdown given an array of cells',
|
|
133
|
+
componentCallback: (cells) => {
|
|
134
|
+
const columns = Object.keys(groupBy(cells, 'column'));
|
|
135
|
+
const rows = groupBy(cells, 'row');
|
|
136
|
+
return (_jsx(Paper, { sx: { width: '95%', overflowX: 'auto', m: 1 }, children: _jsxs(Table, { children: [_jsx(TableHead, { children: _jsx(TableRow, { children: columns.map(col => (_jsx(TableCell, { sx: { maxWidth: '150px' }, children: col
|
|
137
|
+
.split(/[_-]/)
|
|
138
|
+
.map(word => capitalize(word))
|
|
139
|
+
.join(' ') }, col))) }) }), _jsx(TableBody, { sx: { '& td': { wordBreak: 'break-word' } }, children: Object.entries(rows).map(([rowId, _cells]) => {
|
|
140
|
+
return (_jsx(TableRow, { children: columns.map(col => {
|
|
141
|
+
const cell = _cells.find(row => row.column === col);
|
|
142
|
+
return _jsx(TableCell, { children: cell?.value ?? 'N/A' }, col + cell?.value);
|
|
143
|
+
}) }, rowId));
|
|
144
|
+
}) })] }) }));
|
|
145
|
+
}
|
|
146
|
+
},
|
|
147
|
+
...howlerPluginStore.plugins.flatMap(plugin => pluginStore.executeFunction(`${plugin}.helpers`))
|
|
148
|
+
], [pluginStore]);
|
|
149
|
+
return allHelpers;
|
|
150
|
+
};
|
|
@@ -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.
|
|
@@ -1,7 +1,5 @@
|
|
|
1
1
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
-
import { Article, Book, Code, CreateNewFolder, Dashboard, Description, Edit, EditNote, FormatListBulleted, Help, Info, Key, PersonSearch, QueryStats, SavedSearch, Search, SettingsSuggest, Shield, Storage, Terminal, Topic, Work } from '@mui/icons-material';
|
|
3
|
-
import PersonIcon from '@mui/icons-material/Person';
|
|
4
|
-
import SettingsIcon from '@mui/icons-material/Settings';
|
|
2
|
+
import { Article, Book, Code, CreateNewFolder, Dashboard, Description, Edit, EditNote, FormatListBulleted, Help, Info, Key, Person, PersonSearch, QueryStats, SavedSearch, Search, Settings, SettingsSuggest, Shield, Storage, Terminal, Topic, Work } from '@mui/icons-material';
|
|
5
3
|
import { useMemo } from 'react';
|
|
6
4
|
import { useTranslation } from 'react-i18next';
|
|
7
5
|
// SiteMapContextProps configuration properties.
|
|
@@ -31,7 +29,7 @@ const useMySitemap = () => {
|
|
|
31
29
|
title: t('route.admin.user.details'),
|
|
32
30
|
isLeaf: true,
|
|
33
31
|
breadcrumbs: ['/admin/users'],
|
|
34
|
-
icon: _jsx(
|
|
32
|
+
icon: _jsx(Person, {})
|
|
35
33
|
},
|
|
36
34
|
{ path: '/help', title: t('route.help'), isRoot: true, icon: _jsx(Help, {}) },
|
|
37
35
|
{ path: '/help/api', title: t('route.help.api'), isLeaf: true, icon: _jsx(Storage, {}), breadcrumbs: ['/help'] },
|
|
@@ -209,7 +207,7 @@ const useMySitemap = () => {
|
|
|
209
207
|
icon: _jsx(Info, {})
|
|
210
208
|
},
|
|
211
209
|
{ path: '/home', title: t('route.home'), isRoot: true, icon: _jsx(Dashboard, {}) },
|
|
212
|
-
{ path: '/settings', title: t('page.settings.sitemap'), isRoot: true, icon: _jsx(
|
|
210
|
+
{ path: '/settings', title: t('page.settings.sitemap'), isRoot: true, icon: _jsx(Settings, {}) },
|
|
213
211
|
{ path: '/advanced', title: t('route.advanced'), isRoot: true, icon: _jsx(Code, {}) }
|
|
214
212
|
]
|
|
215
213
|
}), [t]);
|
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;
|
|
@@ -2,12 +2,12 @@ import { jsx as _jsx } from "react/jsx-runtime";
|
|
|
2
2
|
import PageCenter from '@cccsaurora/howler-ui/commons/components/pages/PageCenter';
|
|
3
3
|
import HandlebarsMarkdown from '@cccsaurora/howler-ui/components/elements/display/HandlebarsMarkdown';
|
|
4
4
|
import { useScrollRestoration } from '@cccsaurora/howler-ui/components/hooks/useScrollRestoration';
|
|
5
|
-
import {
|
|
5
|
+
import {} from 'react';
|
|
6
6
|
import ErrorBoundary from '../ErrorBoundary';
|
|
7
|
-
import {
|
|
7
|
+
import { useStartingTemplate } from '../overviews/startingTemplate';
|
|
8
8
|
const OverviewDocumentation = () => {
|
|
9
9
|
useScrollRestoration();
|
|
10
|
-
const template =
|
|
10
|
+
const template = useStartingTemplate();
|
|
11
11
|
return (_jsx(PageCenter, { margin: 4, width: "100%", textAlign: "left", children: _jsx(ErrorBoundary, { children: _jsx(HandlebarsMarkdown, { md: template }) }) }));
|
|
12
12
|
};
|
|
13
13
|
export default OverviewDocumentation;
|
|
@@ -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;
|
|
@@ -14,7 +14,7 @@ import { useSearchParams } from 'react-router-dom';
|
|
|
14
14
|
import hitsData from '@cccsaurora/howler-ui/utils/hit.json';
|
|
15
15
|
import { sanitizeLuceneQuery } from '@cccsaurora/howler-ui/utils/stringUtils';
|
|
16
16
|
import OverviewEditor from './OverviewEditor';
|
|
17
|
-
import {
|
|
17
|
+
import { useStartingTemplate } from './startingTemplate';
|
|
18
18
|
const OverviewViewer = () => {
|
|
19
19
|
const theme = useTheme();
|
|
20
20
|
const { t } = useTranslation();
|
|
@@ -34,6 +34,7 @@ const OverviewViewer = () => {
|
|
|
34
34
|
const [x, setX] = useState(0);
|
|
35
35
|
const analyticContext = useContext(AnalyticContext);
|
|
36
36
|
const wrapper = useRef();
|
|
37
|
+
const startingTemplate = useStartingTemplate();
|
|
37
38
|
useEffect(() => {
|
|
38
39
|
(async () => {
|
|
39
40
|
setLoading(true);
|
|
@@ -212,6 +213,6 @@ const OverviewViewer = () => {
|
|
|
212
213
|
mt: -1,
|
|
213
214
|
'& > *': { width: '100%' },
|
|
214
215
|
'& > div > :first-child': { mt: 0 }
|
|
215
|
-
}, children: _jsx(HitOverview, { content: content || startingTemplate
|
|
216
|
+
}, children: _jsx(HitOverview, { content: content || startingTemplate, hit: exampleHit }) })] }))] })] }));
|
|
216
217
|
};
|
|
217
218
|
export default OverviewViewer;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare const
|
|
1
|
+
export declare const useStartingTemplate: () => string;
|
|
@@ -1,6 +1,8 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
3
|
-
|
|
1
|
+
import { useHelpers } from '@cccsaurora/howler-ui/components/elements/display/handlebars/helpers';
|
|
2
|
+
import { useMemo } from 'react';
|
|
3
|
+
export const useStartingTemplate = () => {
|
|
4
|
+
const helpers = useHelpers();
|
|
5
|
+
const helperText = useMemo(() => helpers
|
|
4
6
|
.map(helper => `
|
|
5
7
|
### \`${helper.keyword}\`
|
|
6
8
|
|
|
@@ -8,8 +10,8 @@ ${helper.documentation}
|
|
|
8
10
|
|
|
9
11
|
---
|
|
10
12
|
`.trim())
|
|
11
|
-
.join('\n');
|
|
12
|
-
return `
|
|
13
|
+
.join('\n'), [helpers]);
|
|
14
|
+
return useMemo(() => `
|
|
13
15
|
# Creating an Overview
|
|
14
16
|
|
|
15
17
|
Overviews can be used to modify the way data is presented on alerts that match the overview's settings. Overviews are, by design, easy to create and quite flexible.
|
|
@@ -177,5 +179,5 @@ You can also make basic fetch requests for, and parse, JSON data from external s
|
|
|
177
179
|
## Full Helper List
|
|
178
180
|
|
|
179
181
|
${helperText}
|
|
180
|
-
|
|
182
|
+
`, [helperText]);
|
|
181
183
|
};
|
|
@@ -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;
|
package/package.json
CHANGED
package/plugins/store.d.ts
CHANGED
|
@@ -6,7 +6,7 @@ export declare class HitEvent extends Event {
|
|
|
6
6
|
constructor(type: string, hit: Hit);
|
|
7
7
|
}
|
|
8
8
|
declare class HowlerPluginStore {
|
|
9
|
-
|
|
9
|
+
private _pluginStore;
|
|
10
10
|
plugins: string[];
|
|
11
11
|
private _leadFormats;
|
|
12
12
|
private _pivotFormats;
|
|
@@ -18,6 +18,7 @@ declare class HowlerPluginStore {
|
|
|
18
18
|
get leadFormats(): string[];
|
|
19
19
|
get pivotFormats(): string[];
|
|
20
20
|
get operations(): string[];
|
|
21
|
+
get pluginStore(): import("react-pluggable").PluginStore;
|
|
21
22
|
}
|
|
22
23
|
declare const howlerPluginStore: HowlerPluginStore;
|
|
23
24
|
export default howlerPluginStore;
|
package/plugins/store.js
CHANGED
|
@@ -7,7 +7,7 @@ export class HitEvent extends Event {
|
|
|
7
7
|
}
|
|
8
8
|
}
|
|
9
9
|
class HowlerPluginStore {
|
|
10
|
-
|
|
10
|
+
_pluginStore = createPluginStore();
|
|
11
11
|
plugins = [];
|
|
12
12
|
_leadFormats = [];
|
|
13
13
|
_pivotFormats = [];
|
|
@@ -47,6 +47,9 @@ class HowlerPluginStore {
|
|
|
47
47
|
get operations() {
|
|
48
48
|
return this._operations;
|
|
49
49
|
}
|
|
50
|
+
get pluginStore() {
|
|
51
|
+
return this._pluginStore;
|
|
52
|
+
}
|
|
50
53
|
}
|
|
51
54
|
const howlerPluginStore = new HowlerPluginStore();
|
|
52
55
|
export default howlerPluginStore;
|