@cccsaurora/howler-ui 2.19.0-dev.1282 → 2.19.0-dev.1295
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/index.d.ts +1 -1
- package/api/search/action.js +1 -1
- package/api/search/analytic.js +1 -1
- package/api/search/case.js +1 -1
- package/api/search/count/hit.js +1 -1
- package/api/search/dossier.js +1 -1
- package/api/search/eql/hit.js +1 -1
- package/api/search/explain/hit.js +1 -1
- package/api/search/facet/hit.js +1 -1
- package/api/search/grouped/hit.js +1 -1
- package/api/search/grouped/user.js +1 -1
- package/api/search/histogram/hit.js +1 -1
- package/api/search/hit.js +1 -1
- package/api/search/overview.js +1 -1
- package/api/search/sigma/hit.js +1 -1
- package/api/search/template.js +1 -1
- package/api/search/user.js +1 -1
- package/api/search/view.js +1 -1
- package/api/v2/search/facet.js +1 -1
- package/api/v2/search/index.js +1 -1
- package/api/view/index.d.ts +1 -1
- package/branding/AppBrand.d.ts +2 -2
- package/commons/components/app/AppSkeleton.js +1 -1
- package/commons/components/app/hooks/useAppConfigs.d.ts +2 -2
- package/commons/components/app/hooks/useAppSitemap.d.ts +5 -2
- package/commons/components/breadcrumbs/BreadcrumbIcon.js +1 -1
- package/commons/components/breadcrumbs/Breadcrumbs.d.ts +3 -2
- package/commons/components/display/AppToc.d.ts +2 -1
- package/commons/components/display/AppToc.js +1 -1
- package/commons/components/display/hooks/useAppColor.d.ts +1 -1
- package/commons/components/leftnav/LeftNavDrawer.d.ts +2 -1
- package/commons/components/leftnav/LeftNavGroup.d.ts +2 -1
- package/commons/components/leftnav/LeftNavItem.d.ts +2 -1
- package/commons/components/leftnav/LeftNavItem.js +1 -1
- package/commons/components/notification/Notification.js +1 -1
- package/commons/components/notification/elements/NotificationHeader.js +1 -1
- package/commons/components/notification/elements/NotificationItems.js +1 -1
- package/commons/components/notification/elements/item/NotificationItemAuthor.js +1 -1
- package/commons/components/pages/PageCenter.d.ts +2 -1
- package/commons/components/pages/PageContent.d.ts +2 -1
- package/commons/components/pages/PageFullScreen.d.ts +2 -1
- package/commons/components/search/AppSearch.js +1 -1
- package/commons/components/search/AppSearchInput.d.ts +2 -1
- package/commons/components/search/AppSearchResult.d.ts +2 -1
- package/commons/components/topnav/AppBar.d.ts +2 -1
- package/commons/components/topnav/AppName.d.ts +3 -2
- package/commons/components/topnav/AppSwitcher.d.ts +2 -1
- package/commons/components/topnav/ThemeSelection.d.ts +2 -1
- package/commons/components/topnav/ThemeSelection.js +1 -1
- package/commons/components/topnav/UserProfile.d.ts +2 -1
- package/commons/components/topnav/UserProfile.js +1 -1
- package/commons/components/utils/hooks/useThemeBuilder.d.ts +1 -1
- package/components/app/App.js +2 -2
- package/components/app/drawers/ApiKeyDrawer.js +1 -1
- package/components/app/hooks/useMatchers.js +4 -4
- package/components/app/hooks/useTitle.js +1 -1
- package/components/app/providers/AnalyticProvider.js +1 -1
- package/components/app/providers/AvatarProvider.js +1 -1
- package/components/app/providers/FavouritesProvider.js +1 -1
- package/components/app/providers/GridColumnsProvider.d.ts +1 -1
- package/components/app/providers/GridColumnsProvider.js +1 -1
- package/components/app/providers/OverviewProvider.js +1 -1
- package/components/app/providers/RecordProvider.js +2 -2
- package/components/app/providers/RecordSearchProvider.js +2 -2
- package/components/app/providers/SocketProvider.js +3 -3
- package/components/app/providers/UserListProvider.test.js +6 -6
- package/components/app/providers/ViewProvider.js +3 -3
- package/components/elements/Comment.js +2 -2
- package/components/elements/ContextMenu.test.js +3 -3
- package/components/elements/EditRow.js +4 -4
- package/components/elements/ObjectDetails.js +1 -1
- package/components/elements/UserList.js +1 -1
- package/components/elements/addons/buttons/index.d.ts +1 -1
- package/components/elements/addons/layout/FlexOne.d.ts +3 -2
- package/components/elements/addons/layout/FlexPort.d.ts +2 -1
- package/components/elements/addons/layout/FlexVertical.d.ts +2 -1
- package/components/elements/addons/layout/vsbox/VSBoxElement.d.ts +2 -1
- package/components/elements/addons/lists/TuiList.d.ts +2 -1
- package/components/elements/addons/lists/TuiListBase.d.ts +2 -1
- package/components/elements/addons/lists/TuiListElement.d.ts +2 -1
- package/components/elements/addons/lists/TuiListMenu.d.ts +2 -1
- package/components/elements/addons/lists/TuiListMenu.js +1 -1
- package/components/elements/addons/lists/table/TuiTableHeader.d.ts +3 -2
- package/components/elements/addons/lists/table/index.d.ts +1 -1
- package/components/elements/case/CaseCard.js +2 -2
- package/components/elements/display/ActionButton.js +1 -1
- package/components/elements/display/ChipPopper.js +1 -1
- package/components/elements/display/ClassificationChip.d.ts +1 -1
- package/components/elements/display/HandlebarsMarkdown.js +3 -3
- package/components/elements/display/HowlerAvatar.js +2 -2
- package/components/elements/display/Image.js +3 -3
- package/components/elements/display/Markdown.js +2 -2
- package/components/elements/display/handlebars/helpers.js +3 -3
- package/components/elements/display/json/JSONViewer.js +2 -2
- package/components/elements/display/modals/RationaleModal.js +2 -2
- package/components/elements/display/modals/RationaleModal.test.js +1 -1
- package/components/elements/event/EventCard.js +1 -1
- package/components/elements/hit/HitActions.d.ts +1 -1
- package/components/elements/hit/HitActions.js +1 -1
- package/components/elements/hit/HitBanner.js +1 -1
- package/components/elements/hit/HitCard.js +1 -1
- package/components/elements/hit/HitLabels.js +1 -1
- package/components/elements/hit/HitNotebooks.js +9 -9
- package/components/elements/hit/HitOutline.js +1 -1
- package/components/elements/hit/HitOverview.js +1 -1
- package/components/elements/hit/HitPreview.js +1 -1
- package/components/elements/hit/HitSummary.js +2 -2
- package/components/elements/hit/ResolvePivotUrl.d.ts +1 -1
- package/components/elements/hit/actions/ButtonActions.js +1 -3
- package/components/elements/hit/aggregate/HitGraph.js +1 -1
- package/components/elements/hit/elements/AnalyticLink.js +1 -1
- package/components/elements/hit/elements/Assigned.js +1 -1
- package/components/elements/hit/grid/AddColumnModal.js +1 -1
- package/components/elements/hit/grid/ColumnHeader.js +1 -1
- package/components/elements/hit/grid/RecordRow.js +1 -1
- package/components/elements/hit/grid/RecordTable.js +2 -2
- package/components/elements/hit/outlines/DefaultOutline.js +1 -3
- package/components/elements/hit/related/PivotLink.js +1 -1
- package/components/elements/record/RecordComments.js +5 -7
- package/components/elements/record/RecordContextMenu.js +2 -2
- package/components/elements/record/RecordContextMenu.test.js +4 -4
- package/components/elements/record/RecordWorklog.js +1 -1
- package/components/elements/view/LayoutToggle.d.ts +1 -1
- package/components/hooks/useHitActions.js +1 -1
- package/components/hooks/useLocalStorage.js +1 -1
- package/components/hooks/useLocalStorageItem.test.js +2 -2
- package/components/hooks/useMyChart.d.ts +23 -23
- package/components/hooks/useMySnackbar.js +1 -1
- package/components/hooks/useMyUserFunctions.d.ts +21 -21
- package/components/hooks/useRelatedRecords.js +1 -1
- package/components/logins/Login.js +1 -1
- package/components/logins/auth/OAuthLogin.js +1 -1
- package/components/logins/hooks/useLogin.js +2 -2
- package/components/routes/action/edit/ActionEditor.js +4 -4
- package/components/routes/action/shared/OperationEntry.js +1 -1
- package/components/routes/action/shared/OperationStep.js +1 -1
- package/components/routes/action/useMyActionFunctions.js +1 -1
- package/components/routes/action/view/ActionDetails.js +2 -2
- package/components/routes/action/view/ActionSearch.js +4 -4
- package/components/routes/admin/users/UserEditor.js +1 -1
- package/components/routes/admin/users/UserSearch.js +5 -5
- package/components/routes/advanced/QueryBuilder.js +2 -2
- package/components/routes/advanced/luceneCompletionProvider.js +1 -1
- package/components/routes/analytics/AnalyticComments.js +3 -5
- package/components/routes/analytics/AnalyticDetails.js +2 -2
- package/components/routes/analytics/AnalyticHitComments.js +1 -1
- package/components/routes/analytics/AnalyticHitComments.test.js +1 -1
- package/components/routes/analytics/AnalyticOverview.js +2 -2
- package/components/routes/analytics/AnalyticOverviews.js +1 -1
- package/components/routes/analytics/AnalyticSearch.js +2 -2
- package/components/routes/analytics/AnalyticTemplates.js +1 -1
- package/components/routes/analytics/TriageSettings.js +2 -2
- package/components/routes/analytics/widgets/Assessment.js +1 -1
- package/components/routes/analytics/widgets/Created.js +1 -1
- package/components/routes/analytics/widgets/Escalation.js +1 -1
- package/components/routes/analytics/widgets/Stacked.js +1 -1
- package/components/routes/cases/CaseViewer.js +1 -1
- package/components/routes/cases/Cases.js +3 -3
- package/components/routes/cases/constants.d.ts +1 -1
- package/components/routes/cases/detail/CaseDashboard.js +1 -1
- package/components/routes/cases/detail/CaseDetails.js +3 -3
- package/components/routes/cases/detail/CaseObservables.js +2 -2
- package/components/routes/cases/detail/CaseRules.js +3 -3
- package/components/routes/cases/detail/CaseSearch.js +2 -2
- package/components/routes/cases/detail/CaseSearch.test.js +1 -1
- package/components/routes/cases/detail/CaseTask.js +4 -4
- package/components/routes/cases/detail/CaseTimeline.js +2 -2
- package/components/routes/cases/detail/CreateRuleDialog.test.js +1 -1
- package/components/routes/cases/detail/ItemPage.js +1 -1
- package/components/routes/cases/detail/MarkdownPage.js +1 -1
- package/components/routes/cases/detail/TaskPanel.js +2 -2
- package/components/routes/cases/detail/sidebar/CaseFolder.js +2 -2
- package/components/routes/cases/detail/sidebar/CaseFolderContextMenu.js +1 -1
- package/components/routes/cases/detail/utils.d.ts +1 -1
- package/components/routes/cases/hooks/useCase.js +2 -5
- package/components/routes/cases/modals/AddRecordToCaseModal.js +2 -2
- package/components/routes/cases/modals/AddToCaseModal.js +1 -1
- package/components/routes/cases/modals/CreateCaseModal.js +1 -1
- package/components/routes/cases/modals/RenameItemModal.js +2 -2
- package/components/routes/cases/modals/ResolveModal.js +1 -1
- package/components/routes/cases/modals/hooks.d.ts +1 -1
- package/components/routes/dossiers/DossierEditor.js +2 -2
- package/components/routes/dossiers/DossierEditor.test.js +1 -1
- package/components/routes/dossiers/Dossiers.js +3 -3
- package/components/routes/dossiers/PivotForm.js +2 -4
- package/components/routes/events/EventViewer.js +1 -1
- package/components/routes/help/ApiDocumentation.js +1 -1
- package/components/routes/help/HitBannerDocumentation.js +1 -1
- package/components/routes/help/HitSchemaDocumentation.js +1 -1
- package/components/routes/help/RetentionDocumentation.js +2 -2
- package/components/routes/help/SearchDocumentation.js +1 -1
- package/components/routes/hits/search/InformationPane.js +5 -5
- package/components/routes/hits/search/QuerySettings.test.js +4 -5
- package/components/routes/hits/search/RecordBrowser.js +1 -1
- package/components/routes/hits/search/ViewLink.js +1 -1
- package/components/routes/hits/search/shared/CustomSort.js +1 -1
- package/components/routes/hits/search/shared/HitFilter.d.ts +1 -1
- package/components/routes/hits/search/shared/HitSort.d.ts +1 -1
- package/components/routes/hits/search/shared/HitSort.js +1 -1
- package/components/routes/hits/search/shared/SearchSpan.d.ts +1 -1
- package/components/routes/hits/search/shared/SearchSpan.js +1 -1
- package/components/routes/hits/view/HitViewer.js +3 -3
- package/components/routes/home/AddNewCard.js +2 -2
- package/components/routes/home/AnalyticCard.js +1 -1
- package/components/routes/home/EntryWrapper.js +1 -1
- package/components/routes/home/HomeSettings.js +1 -1
- package/components/routes/home/ViewCard.js +5 -5
- package/components/routes/home/index.js +2 -2
- package/components/routes/overviews/OverviewCard.js +1 -1
- package/components/routes/overviews/OverviewViewer.js +3 -3
- package/components/routes/overviews/Overviews.js +3 -3
- package/components/routes/overviews/markdownExtendedTokenProvider.js +15 -15
- package/components/routes/settings/ProfileSection.js +2 -2
- package/components/routes/templates/TemplateEditor.d.ts +3 -2
- package/components/routes/templates/TemplateEditor.js +1 -1
- package/components/routes/templates/TemplateViewer.js +3 -3
- package/components/routes/templates/Templates.js +3 -3
- package/components/routes/views/ViewComposer.js +3 -3
- package/components/routes/views/Views.js +2 -2
- package/i18n.js +1 -1
- package/index.d.ts +1 -1
- package/index.js +1 -1
- package/package.json +2 -2
- package/plugins/clue/components/ClueLeadForm.js +1 -1
- package/plugins/clue/components/CluePivotForm.js +2 -2
- package/plugins/clue/helpers.js +4 -4
- package/plugins/clue/index.d.ts +2 -1
- package/rest/AxiosClient.test.js +1 -0
- package/utils/Throttler.test.js +2 -2
- package/utils/actionUtils.d.ts +3 -3
- package/utils/classificationParser.js +20 -20
- package/utils/constants.d.ts +3 -3
- package/utils/localStorage.js +1 -1
- package/utils/menuUtils.js +0 -4
- package/utils/stringUtils.test.js +1 -1
- package/utils/utils.d.ts +1 -1
- package/utils/utils.js +2 -2
- package/utils/utils.test.js +1 -1
- package/utils/xsrf.js +1 -1
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { Fragment as _Fragment, jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
2
|
import { useSortable } from '@dnd-kit/sortable';
|
|
3
3
|
import { CSS } from '@dnd-kit/utilities';
|
|
4
4
|
import { Delete } from '@mui/icons-material';
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { Fragment as _Fragment, jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
2
|
import { Edit, Settings } from '@mui/icons-material';
|
|
3
3
|
import { FormControl, FormLabel, IconButton, ListItemIcon, Menu, MenuItem, Slider, Tooltip } from '@mui/material';
|
|
4
4
|
import { useState } from 'react';
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { Fragment as _Fragment, jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
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';
|
|
@@ -104,24 +104,24 @@ const ViewCard = ({ viewId, limit, refreshTick, onRefreshComplete }) => {
|
|
|
104
104
|
clearTimeout(debounceTimerRef.current);
|
|
105
105
|
}
|
|
106
106
|
debounceTimerRef.current = setTimeout(() => {
|
|
107
|
-
refreshView();
|
|
107
|
+
void refreshView();
|
|
108
108
|
}, DEBOUNCE_TIME);
|
|
109
109
|
}, [refreshView]);
|
|
110
110
|
useEffect(() => {
|
|
111
111
|
if (refreshTick) {
|
|
112
|
-
refreshView();
|
|
112
|
+
void refreshView();
|
|
113
113
|
}
|
|
114
114
|
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
115
115
|
}, [refreshTick]);
|
|
116
116
|
useEffect(() => {
|
|
117
|
-
fetchViews([viewId]);
|
|
117
|
+
void fetchViews([viewId]);
|
|
118
118
|
}, [fetchViews, viewId]);
|
|
119
119
|
useEffect(() => {
|
|
120
120
|
if (!view?.query) {
|
|
121
121
|
return;
|
|
122
122
|
}
|
|
123
123
|
const loadingTimeout = setTimeout(() => setLoading(true), 200);
|
|
124
|
-
refreshView().finally(() => {
|
|
124
|
+
void refreshView().finally(() => {
|
|
125
125
|
clearTimeout(loadingTimeout);
|
|
126
126
|
setLoading(false);
|
|
127
127
|
});
|
|
@@ -70,7 +70,7 @@ const Home = () => {
|
|
|
70
70
|
clearTimeout(debounceTimerRef.current);
|
|
71
71
|
}
|
|
72
72
|
debounceTimerRef.current = setTimeout(() => {
|
|
73
|
-
setRefreshRateBackend(newRate);
|
|
73
|
+
void setRefreshRateBackend(newRate);
|
|
74
74
|
}, 500);
|
|
75
75
|
}, [setRefreshRateBackend, setUser]);
|
|
76
76
|
const handleRefresh = useCallback(() => {
|
|
@@ -103,7 +103,7 @@ const Home = () => {
|
|
|
103
103
|
}
|
|
104
104
|
}, [dashboard, getIdFromEntry, setLocalDashboard]);
|
|
105
105
|
useEffect(() => {
|
|
106
|
-
api.search.hit
|
|
106
|
+
void api.search.hit
|
|
107
107
|
.post({
|
|
108
108
|
query: updateQuery,
|
|
109
109
|
rows: 0
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
2
|
import { Delete } from '@mui/icons-material';
|
|
3
3
|
import { Card, IconButton, Stack, Tooltip, Typography } from '@mui/material';
|
|
4
4
|
import FlexOne from '@cccsaurora/howler-ui/components/elements/addons/layout/FlexOne';
|
|
@@ -44,7 +44,7 @@ const OverviewViewer = () => {
|
|
|
44
44
|
const wrapper = useRef();
|
|
45
45
|
const startingTemplate = useStartingTemplate();
|
|
46
46
|
useEffect(() => {
|
|
47
|
-
(async () => {
|
|
47
|
+
void (async () => {
|
|
48
48
|
setLoading(true);
|
|
49
49
|
try {
|
|
50
50
|
setOverviewList(await getOverviews(true));
|
|
@@ -75,7 +75,7 @@ const OverviewViewer = () => {
|
|
|
75
75
|
}
|
|
76
76
|
}, [analytic, analytics, detection]);
|
|
77
77
|
useEffect(() => {
|
|
78
|
-
(async () => {
|
|
78
|
+
void (async () => {
|
|
79
79
|
const result = await dispatchApi(api.search.hit.post({
|
|
80
80
|
query: `howler.analytic:"${sanitizeLuceneQuery(analytic)}"` +
|
|
81
81
|
(!!detection && detection !== 'ANY' ? ` AND howler.detection:"${sanitizeLuceneQuery(detection)}"` : ''),
|
|
@@ -184,7 +184,7 @@ const OverviewViewer = () => {
|
|
|
184
184
|
return (_jsxs(PageCenter, { maxWidth: "100%", width: "100%", textAlign: "left", height: "100%", children: [_jsx(LinearProgress, { sx: { mb: 1, opacity: +loading } }), _jsxs(Stack, { direction: "column", spacing: 2, divider: _jsx(Divider, { orientation: "horizontal", flexItem: true }), height: "100%", children: [_jsxs(Stack, { direction: "row", spacing: 2, mb: 2, alignItems: "stretch", children: [_jsx(FormControl, { sx: { maxWidth: { sm: '300px', lg: '450px' }, width: '100%' }, children: _jsx(Autocomplete, { id: "analytic", options: analytics.sort((a, b) => a.name.toLowerCase().localeCompare(b.name.toLowerCase())), getOptionLabel: option => option.name, value: analytics.find(a => a.name === analytic) || null, onChange: (_event, newValue) => setAnalytic(newValue ? newValue.name : ''), renderInput: autocompleteAnalyticParams => (_jsx(TextField, { ...autocompleteAnalyticParams, label: t('route.overviews.analytic'), size: "small" })) }) }), _jsx(FormControl, { sx: { minWidth: { sm: '200px' } }, disabled: !analytic, children: _jsx(Autocomplete, { id: "detection", options: ['ANY', ...detections.sort()], getOptionLabel: option => option, value: detection ?? '', onChange: (_event, newValue) => setDetection(newValue), renderInput: autocompleteDetectionParams => (_jsx(TextField, { ...autocompleteDetectionParams, label: t('route.overviews.detection'), size: "small" })) }) }), selectedOverview && (_jsx(Button, { variant: "outlined", startIcon: _jsx(Delete, {}), onClick: onDelete, children: t('button.delete') })), _jsx(Button, { variant: "outlined", disabled: analyticOrDetectionMissing || noChange, startIcon: overviewLoading ? _jsx(CircularProgress, { size: 16 }) : _jsx(Check, {}), onClick: onSave, children: t(!analyticOrDetectionMissing && !noChange ? 'button.save' : 'button.saved') }), _jsx("div", { style: { flex: 1 } }), _jsxs(ToggleButtonGroup, { exclusive: true, value: chosenTheme, onChange: (_event, value) => setChosenTheme(value), sx: { maxHeight: '40px' }, children: [_jsx(Tooltip, { title: t('route.overviews.theme.light'), children: _jsx(ToggleButton, { value: "light", children: _jsx(WbSunny, {}) }) }), _jsx(Tooltip, { title: t('route.overviews.theme.dark'), children: _jsx(ToggleButton, { value: "dark", children: _jsx(DarkMode, {}) }) })] })] }), analyticOrDetectionMissing ? (_jsx(AppInfoPanel, { i18nKey: "route.overviews.select", sx: { width: '100%', alignSelf: 'start' } })) : (_jsxs(Stack, { ref: wrapper, direction: "row", spacing: 1, height: "100%", onKeyDown: e => {
|
|
185
185
|
if (e.ctrlKey && e.key === 's') {
|
|
186
186
|
if (!noChange) {
|
|
187
|
-
onSave();
|
|
187
|
+
void onSave();
|
|
188
188
|
}
|
|
189
189
|
e.preventDefault();
|
|
190
190
|
}
|
|
@@ -49,7 +49,7 @@ const OverviewsBase = () => {
|
|
|
49
49
|
offset
|
|
50
50
|
});
|
|
51
51
|
}
|
|
52
|
-
catch
|
|
52
|
+
catch {
|
|
53
53
|
setHasError(true);
|
|
54
54
|
}
|
|
55
55
|
finally {
|
|
@@ -93,7 +93,7 @@ const OverviewsBase = () => {
|
|
|
93
93
|
});
|
|
94
94
|
}, [dispatchApi, remove, withConfirmDeleteModal, showSuccessMessage, t]);
|
|
95
95
|
useEffect(() => {
|
|
96
|
-
onSearch();
|
|
96
|
+
void onSearch();
|
|
97
97
|
if (!searchParams.has('offset')) {
|
|
98
98
|
searchParams.set('offset', '0');
|
|
99
99
|
setSearchParams(searchParams, { replace: true });
|
|
@@ -109,7 +109,7 @@ const OverviewsBase = () => {
|
|
|
109
109
|
}, [offset, response?.total, searchParams, setSearchParams]);
|
|
110
110
|
useEffect(() => {
|
|
111
111
|
if (!loading) {
|
|
112
|
-
onSearch();
|
|
112
|
+
void onSearch();
|
|
113
113
|
}
|
|
114
114
|
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
115
115
|
}, [offset]);
|
|
@@ -33,8 +33,8 @@ export const language = {
|
|
|
33
33
|
defaultToken: '',
|
|
34
34
|
tokenPostfix: '.md',
|
|
35
35
|
// escape codes
|
|
36
|
-
control: /[\\`*_
|
|
37
|
-
noncontrol: /[^\\`*_
|
|
36
|
+
control: /[\\`*_[\]{}()#+\-.!]/,
|
|
37
|
+
noncontrol: /[^\\`*_[\]{}()#+\-.!]/,
|
|
38
38
|
escapes: /\\(?:@control)/,
|
|
39
39
|
// escape codes for javascript/CSS strings
|
|
40
40
|
jsescapes: /\\(?:[btnfr\\"']|[0-7][0-7]?|[0-3][0-7]{2})/,
|
|
@@ -70,19 +70,19 @@ export const language = {
|
|
|
70
70
|
// headers (with #)
|
|
71
71
|
[/^(\s{0,3})(#+)((?:[^\\#]|@escapes)+)((?:#+)?)/, ['white', 'keyword', 'keyword', 'keyword']],
|
|
72
72
|
// headers (with =)
|
|
73
|
-
[/^\s*(
|
|
73
|
+
[/^\s*(=+|-+)\s*$/, 'keyword'],
|
|
74
74
|
// headers (with ***)
|
|
75
75
|
[/^\s*((\*[ ]?)+)\s*$/, 'meta.separator'],
|
|
76
76
|
// quote
|
|
77
77
|
[/^\s*>+/, 'comment'],
|
|
78
78
|
// list (starting with * or number)
|
|
79
|
-
[/^\s*([
|
|
79
|
+
[/^\s*([*\-+:]|\d+\.)\s/, 'keyword'],
|
|
80
80
|
// code block (4 spaces indent)
|
|
81
81
|
[/^(\t|[ ]{4})[^ ].*$/, 'string'],
|
|
82
82
|
// code block (3 tilde)
|
|
83
|
-
[/^\s*~~~\s*((?:\w|[
|
|
83
|
+
[/^\s*~~~\s*((?:\w|[/\-#])+)?\s*$/, { token: 'string', next: '@codeblock' }],
|
|
84
84
|
// github style code blocks (with backticks and language)
|
|
85
|
-
[/^\s*```\s*((?:\w|[
|
|
85
|
+
[/^\s*```\s*((?:\w|[/\-#])+).*$/, { token: 'string', next: '@codeblockgh', nextEmbedded: '$1' }],
|
|
86
86
|
// github style code blocks (with backticks but no language)
|
|
87
87
|
[/^\s*```\s*$/, { token: 'string', next: '@codeblock' }],
|
|
88
88
|
// CCCS MODIFICATION
|
|
@@ -94,7 +94,7 @@ export const language = {
|
|
|
94
94
|
handlebars: [
|
|
95
95
|
[/"[^"]+"/, 'string'],
|
|
96
96
|
[/[()]/, 'handlebars'],
|
|
97
|
-
[/[\w\d
|
|
97
|
+
[/[\w\d.]+/, 'variable'],
|
|
98
98
|
[
|
|
99
99
|
/[#/\w]+/,
|
|
100
100
|
{
|
|
@@ -109,13 +109,13 @@ export const language = {
|
|
|
109
109
|
// CCCS MODIFICATION END
|
|
110
110
|
table_header: [
|
|
111
111
|
{ include: '@table_common' },
|
|
112
|
-
[/[
|
|
112
|
+
[/[^|]+/, 'keyword.table.header'] // table header
|
|
113
113
|
],
|
|
114
114
|
table_body: [{ include: '@table_common' }, { include: '@linecontent' }],
|
|
115
115
|
table_common: [
|
|
116
|
-
[/\s*[
|
|
116
|
+
[/\s*[-:]+\s*/, { token: 'keyword', switchTo: 'table_body' }], // header-divider
|
|
117
117
|
[/^\s*\|/, 'keyword.table.left'], // opening |
|
|
118
|
-
[/^\s*[
|
|
118
|
+
[/^\s*[^|]/, '@rematch', '@pop'], // exiting
|
|
119
119
|
[/^\s*$/, '@rematch', '@pop'], // exiting
|
|
120
120
|
[
|
|
121
121
|
/\|/,
|
|
@@ -149,7 +149,7 @@ export const language = {
|
|
|
149
149
|
[/`/, { token: 'variable', next: '@codecontent' }],
|
|
150
150
|
// links
|
|
151
151
|
[/\{+[^}]+\}+/, 'string.target'],
|
|
152
|
-
[/(!?\[)((?:[^\]\\]|@escapes)*)(\]\([
|
|
152
|
+
[/(!?\[)((?:[^\]\\]|@escapes)*)(\]\([^)]+\))/, ['string.link', '', 'string.link']],
|
|
153
153
|
[/(!?\[)((?:[^\]\\]|@escapes)*)(\])/, 'string.link'],
|
|
154
154
|
// or html
|
|
155
155
|
{ include: 'html' }
|
|
@@ -169,7 +169,7 @@ export const language = {
|
|
|
169
169
|
// html tags
|
|
170
170
|
[/<(\w+)\/>/, 'tag'],
|
|
171
171
|
[
|
|
172
|
-
/<(\w+)(
|
|
172
|
+
/<(\w+)(-|\w)*/,
|
|
173
173
|
{
|
|
174
174
|
cases: {
|
|
175
175
|
'@empty': { token: 'tag', next: '@tag.$1' },
|
|
@@ -177,14 +177,14 @@ export const language = {
|
|
|
177
177
|
}
|
|
178
178
|
}
|
|
179
179
|
],
|
|
180
|
-
[/<\/(\w+)(
|
|
180
|
+
[/<\/(\w+)(-|\w)*\s*>/, { token: 'tag' }],
|
|
181
181
|
[/<!--/, 'comment', '@comment']
|
|
182
182
|
],
|
|
183
183
|
comment: [
|
|
184
|
-
[/[
|
|
184
|
+
[/[^<-]+/, 'comment.content'],
|
|
185
185
|
[/-->/, 'comment', '@pop'],
|
|
186
186
|
[/<!--/, 'comment.content.invalid'],
|
|
187
|
-
[/[
|
|
187
|
+
[/[<-]/, 'comment.content']
|
|
188
188
|
],
|
|
189
189
|
// Almost full HTML tag matching, complete with embedded scripts & styles
|
|
190
190
|
tag: [
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { Fragment as _Fragment, jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
2
|
import { Add, Check, ChevronRight, Clear } from '@mui/icons-material';
|
|
3
3
|
import { Chip, CircularProgress, Grid, TableCell, TableRow, Typography } from '@mui/material';
|
|
4
4
|
import { ApiConfigContext } from '@cccsaurora/howler-ui/components/app/providers/ApiConfigProvider';
|
|
@@ -17,7 +17,7 @@ const ProfileSection = ({ user, editName, addRole, removeRole, viewGroups }) =>
|
|
|
17
17
|
const [loadingGroups, setLoadingGroups] = useState(false);
|
|
18
18
|
const wrapChange = useCallback(async (r, fn) => {
|
|
19
19
|
const delayedLoad = delay(250);
|
|
20
|
-
delayedLoad.then(() => {
|
|
20
|
+
void delayedLoad.then(() => {
|
|
21
21
|
setLoading({
|
|
22
22
|
...loading,
|
|
23
23
|
[r]: true
|
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
import type { Hit } from '@cccsaurora/howler-ui/models/entities/generated/Hit';
|
|
2
|
-
declare const
|
|
2
|
+
declare const TemplateEditor: ({ hit, fields, setFields, onRemove, onAdd }: {
|
|
3
3
|
hit: Hit;
|
|
4
4
|
fields: string[];
|
|
5
5
|
setFields: (displayFields: string[]) => void;
|
|
6
6
|
onRemove: (field: string) => void;
|
|
7
7
|
onAdd: (field: string) => void;
|
|
8
|
-
}) => import("react/jsx-runtime").JSX.Element
|
|
8
|
+
}) => import("react/jsx-runtime").JSX.Element;
|
|
9
|
+
declare const _default: import("react").MemoExoticComponent<typeof TemplateEditor>;
|
|
9
10
|
export default _default;
|
|
@@ -30,7 +30,7 @@ const TemplateEditor = ({ hit, fields, setFields, onRemove, onAdd }) => {
|
|
|
30
30
|
}
|
|
31
31
|
}, [tryAddField]);
|
|
32
32
|
useEffect(() => {
|
|
33
|
-
getHitFields().then(suggestionFields => setSuggestions(suggestionFields.map(f => f.key)));
|
|
33
|
+
void getHitFields().then(suggestionFields => setSuggestions(suggestionFields.map(f => f.key)));
|
|
34
34
|
}, [getHitFields]);
|
|
35
35
|
const handleDragEnd = useCallback((event) => {
|
|
36
36
|
const { active, over } = event;
|
|
@@ -34,7 +34,7 @@ const TemplateViewer = () => {
|
|
|
34
34
|
const [templateLoading, setTemplateLoading] = useState(false);
|
|
35
35
|
useEffect(() => {
|
|
36
36
|
setLoading(true);
|
|
37
|
-
dispatchApi(api.search.analytic.post({ query: 'analytic_id:*', rows: 1000 }), {
|
|
37
|
+
void dispatchApi(api.search.analytic.post({ query: 'analytic_id:*', rows: 1000 }), {
|
|
38
38
|
logError: false,
|
|
39
39
|
showError: true,
|
|
40
40
|
throwError: true
|
|
@@ -47,7 +47,7 @@ const TemplateViewer = () => {
|
|
|
47
47
|
}
|
|
48
48
|
setAnalytics(_analytics);
|
|
49
49
|
});
|
|
50
|
-
dispatchApi(api.template.get()).then(setTemplateList);
|
|
50
|
+
void dispatchApi(api.template.get()).then(setTemplateList);
|
|
51
51
|
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
52
52
|
}, [analytic, dispatchApi]);
|
|
53
53
|
useEffect(() => {
|
|
@@ -55,7 +55,7 @@ const TemplateViewer = () => {
|
|
|
55
55
|
return;
|
|
56
56
|
}
|
|
57
57
|
setLoading(true);
|
|
58
|
-
dispatchApi(api.search.grouped.hit.post('howler.detection', {
|
|
58
|
+
void dispatchApi(api.search.grouped.hit.post('howler.detection', {
|
|
59
59
|
limit: 0,
|
|
60
60
|
query: `howler.analytic:"${sanitizeLuceneQuery(analytic)}"`
|
|
61
61
|
}), {
|
|
@@ -53,7 +53,7 @@ const TemplatesBase = () => {
|
|
|
53
53
|
offset
|
|
54
54
|
});
|
|
55
55
|
}
|
|
56
|
-
catch
|
|
56
|
+
catch {
|
|
57
57
|
setHasError(true);
|
|
58
58
|
}
|
|
59
59
|
finally {
|
|
@@ -87,7 +87,7 @@ const TemplatesBase = () => {
|
|
|
87
87
|
}
|
|
88
88
|
}, [offset, searchParams, setSearchParams, getSearchRequestData]);
|
|
89
89
|
useEffect(() => {
|
|
90
|
-
onSearch();
|
|
90
|
+
void onSearch();
|
|
91
91
|
if (!searchParams.has('offset')) {
|
|
92
92
|
searchParams.set('offset', '0');
|
|
93
93
|
setSearchParams(searchParams, { replace: true });
|
|
@@ -103,7 +103,7 @@ const TemplatesBase = () => {
|
|
|
103
103
|
}, [offset, response?.total, searchParams, setSearchParams]);
|
|
104
104
|
useEffect(() => {
|
|
105
105
|
if (!searching) {
|
|
106
|
-
onSearch();
|
|
106
|
+
void onSearch();
|
|
107
107
|
}
|
|
108
108
|
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
109
109
|
}, [offset]);
|
|
@@ -167,14 +167,14 @@ const ViewComposer = () => {
|
|
|
167
167
|
useEffect(() => {
|
|
168
168
|
// Only run initial search if we're NOT editing an existing view
|
|
169
169
|
if (!routeParams.id) {
|
|
170
|
-
search(query || DEFAULT_QUERY);
|
|
170
|
+
void search(query || DEFAULT_QUERY);
|
|
171
171
|
}
|
|
172
172
|
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
173
173
|
}, [routeParams.id]);
|
|
174
174
|
// We only run this when ancillary properties (i.e. filters, sorting) change
|
|
175
175
|
useEffect(() => {
|
|
176
176
|
if (query && !isLoadingView) {
|
|
177
|
-
search(query);
|
|
177
|
+
void search(query);
|
|
178
178
|
}
|
|
179
179
|
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
180
180
|
}, [sort, span, indexes, isLoadingView]);
|
|
@@ -182,7 +182,7 @@ const ViewComposer = () => {
|
|
|
182
182
|
if (!routeParams.id) {
|
|
183
183
|
return;
|
|
184
184
|
}
|
|
185
|
-
(async () => {
|
|
185
|
+
void (async () => {
|
|
186
186
|
const viewToEdit = (await getCurrentViews({ views: [routeParams.id] }))[0];
|
|
187
187
|
if (!viewToEdit) {
|
|
188
188
|
setError('route.views.missing');
|
|
@@ -70,7 +70,7 @@ const ViewsBase = () => {
|
|
|
70
70
|
offset
|
|
71
71
|
});
|
|
72
72
|
}
|
|
73
|
-
catch
|
|
73
|
+
catch {
|
|
74
74
|
setHasError(true);
|
|
75
75
|
}
|
|
76
76
|
finally {
|
|
@@ -175,7 +175,7 @@ const ViewsBase = () => {
|
|
|
175
175
|
}, [offset, response?.total, searchParams, setSearchParams]);
|
|
176
176
|
useEffect(() => {
|
|
177
177
|
if (!searching) {
|
|
178
|
-
onSearch();
|
|
178
|
+
void onSearch();
|
|
179
179
|
}
|
|
180
180
|
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
181
181
|
}, [offset, favouritesOnly, type]);
|
package/i18n.js
CHANGED
package/index.d.ts
CHANGED
package/index.js
CHANGED
package/package.json
CHANGED
|
@@ -17,7 +17,7 @@
|
|
|
17
17
|
"@dnd-kit/modifiers": "^7.0.0",
|
|
18
18
|
"@dnd-kit/sortable": "^8.0.0",
|
|
19
19
|
"@dnd-kit/utilities": "^3.2.2",
|
|
20
|
-
"@fontsource/roboto": "^5.
|
|
20
|
+
"@fontsource/roboto": "^5.3.0",
|
|
21
21
|
"@iconify/icons-logos": "^1.2.36",
|
|
22
22
|
"@iconify/icons-simple-icons": "^1.2.74",
|
|
23
23
|
"@iconify/react": "^4.1.1",
|
|
@@ -93,7 +93,7 @@
|
|
|
93
93
|
"url": "https://github.com/CybercentreCanada/howler"
|
|
94
94
|
},
|
|
95
95
|
"type": "module",
|
|
96
|
-
"version": "2.19.0-dev.
|
|
96
|
+
"version": "2.19.0-dev.1295",
|
|
97
97
|
"exports": {
|
|
98
98
|
"./i18n": "./i18n.js",
|
|
99
99
|
"./index.css": "./index.css",
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { Fragment as _Fragment, jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
2
|
import { useClueFetcherSelector } from '@cccsaurora/clue-ui/hooks/selectors';
|
|
3
3
|
import { Autocomplete, Divider, ListItemText, TextField, Typography } from '@mui/material';
|
|
4
4
|
import { ApiConfigContext } from '@cccsaurora/howler-ui/components/app/providers/ApiConfigProvider';
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { Fragment as _Fragment, jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
2
|
import { useClueActionsSelector, useClueEnrichSelector } from '@cccsaurora/clue-ui';
|
|
3
3
|
import { adaptSchema } from '@cccsaurora/clue-ui/components/actions/form/schemaAdapter';
|
|
4
4
|
import { materialCells, materialRenderers } from '@jsonforms/material-renderers';
|
|
@@ -69,7 +69,7 @@ const CluePivotForm = ({ pivot, update }) => {
|
|
|
69
69
|
// Clone and adapt the action's parameter schema
|
|
70
70
|
const clueAdaptedSchema = cloneDeep({
|
|
71
71
|
...adaptSchema(actions[value].params),
|
|
72
|
-
...
|
|
72
|
+
...actions[value].extra_schema
|
|
73
73
|
});
|
|
74
74
|
// Enhance string properties with hit index options for better UX
|
|
75
75
|
Object.entries(clueAdaptedSchema.properties).forEach(([key, prop]) => {
|
package/plugins/clue/helpers.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { Fragment as _Fragment, jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
2
|
/* eslint-disable no-console */
|
|
3
3
|
import EnrichedTypography, {} from '@cccsaurora/clue-ui/components/EnrichedTypography';
|
|
4
4
|
import Fetcher from '@cccsaurora/clue-ui/components/fetchers/Fetcher';
|
|
@@ -174,14 +174,14 @@ où clue_table_cells est un tableau avec les propriétés :
|
|
|
174
174
|
return _jsx(TableCell, {}, col);
|
|
175
175
|
}
|
|
176
176
|
return (_jsxs(TableCell, { children: [enableClueActions && cell.clue_entity && (_jsx(ClueCheckbox, { value: cell.action_value ?? cell.value })), !!cell.clue_fetcher && !!cell.clue_type ? (_jsx(Fetcher, { slotProps: {
|
|
177
|
-
image: { width:
|
|
177
|
+
image: { width: cell.fetcher_width ? cell.fetcher_width : 'fit-content' },
|
|
178
178
|
stack: {
|
|
179
179
|
component: 'span',
|
|
180
|
-
sx:
|
|
180
|
+
sx: cell.fetcher_width
|
|
181
181
|
? { width: cell.fetcher_width, display: 'block' }
|
|
182
182
|
: { width: 'fit-content' }
|
|
183
183
|
}
|
|
184
|
-
}, fetcherId: cell.clue_fetcher, value: cell.value, type: cell.clue_type })) :
|
|
184
|
+
}, fetcherId: cell.clue_fetcher, value: cell.value, type: cell.clue_type })) : cell.clue_type ? (_jsx(MarkdownTypography, { slotProps: {
|
|
185
185
|
stack: {
|
|
186
186
|
component: 'span',
|
|
187
187
|
sx: { width: 'fit-content' },
|
package/plugins/clue/index.d.ts
CHANGED
|
@@ -3,6 +3,7 @@ import type { PluginChipProps } from '@cccsaurora/howler-ui/components/elements/
|
|
|
3
3
|
import type { PluginTypographyProps } from '@cccsaurora/howler-ui/components/elements/PluginTypography';
|
|
4
4
|
import type { i18n as I18N } from 'i18next';
|
|
5
5
|
import HowlerPlugin from '@cccsaurora/howler-ui/plugins/HowlerPlugin';
|
|
6
|
+
import useSetup from './setup';
|
|
6
7
|
declare class CluePlugin extends HowlerPlugin {
|
|
7
8
|
name: string;
|
|
8
9
|
version: string;
|
|
@@ -12,7 +13,7 @@ declare class CluePlugin extends HowlerPlugin {
|
|
|
12
13
|
provider(): import("react").FC<{
|
|
13
14
|
children?: import("react").ReactNode | undefined;
|
|
14
15
|
}>;
|
|
15
|
-
setup():
|
|
16
|
+
setup(): typeof useSetup;
|
|
16
17
|
localization(i18nInstance: I18N): void;
|
|
17
18
|
helpers(): HowlerHelper[];
|
|
18
19
|
typography(_props: PluginTypographyProps): import("react/jsx-runtime").JSX.Element;
|
package/rest/AxiosClient.test.js
CHANGED
package/utils/Throttler.test.js
CHANGED
|
@@ -97,7 +97,7 @@ describe('Throttler', () => {
|
|
|
97
97
|
it('does not invoke fn before the delay', async () => {
|
|
98
98
|
const fn = vi.fn().mockResolvedValue('x');
|
|
99
99
|
const t = new Throttler(100);
|
|
100
|
-
t.delayAsync(fn);
|
|
100
|
+
void t.delayAsync(fn);
|
|
101
101
|
expect(fn).not.toHaveBeenCalled();
|
|
102
102
|
});
|
|
103
103
|
it('resolves with the return value of fn', async () => {
|
|
@@ -124,7 +124,7 @@ describe('Throttler', () => {
|
|
|
124
124
|
it('cancels the previous pending call when invoked again', async () => {
|
|
125
125
|
const fn = vi.fn().mockResolvedValue(42);
|
|
126
126
|
const t = new Throttler(100);
|
|
127
|
-
t.delayAsync(fn);
|
|
127
|
+
void t.delayAsync(fn);
|
|
128
128
|
vi.advanceTimersByTime(50);
|
|
129
129
|
const second = t.delayAsync(fn);
|
|
130
130
|
vi.advanceTimersByTime(100);
|
package/utils/actionUtils.d.ts
CHANGED
|
@@ -14,18 +14,18 @@ export declare const checkArgsAreFilled: (step: ActionOperationStep, values: str
|
|
|
14
14
|
* @param context The values provided so far by the user
|
|
15
15
|
* @returns a list of options matching the current context
|
|
16
16
|
*/
|
|
17
|
-
export declare const getOptionsByContext: (options: ActionOperationStep[
|
|
17
|
+
export declare const getOptionsByContext: (options: ActionOperationStep['options'], arg: string, context: string) => string[];
|
|
18
18
|
/**
|
|
19
19
|
* Get a list of arguments to display based on the current context, using the current values supplied for the action entry.
|
|
20
20
|
* @param args a complete list of all arguments in the action
|
|
21
21
|
* @param values the current list of values provided by the user
|
|
22
22
|
* @returns A list of arguments to display
|
|
23
23
|
*/
|
|
24
|
-
export declare const getArgsByContext: (args: ActionOperationStep[
|
|
24
|
+
export declare const getArgsByContext: (args: ActionOperationStep['args'], values: string) => string[];
|
|
25
25
|
/**
|
|
26
26
|
* Check to see if a given action has all the data necessary to execute successfully
|
|
27
27
|
* @param data The user-provided data
|
|
28
28
|
* @param action The action to validate
|
|
29
29
|
* @returns whether the action is ready to execute
|
|
30
30
|
*/
|
|
31
|
-
export declare const operationReady: (data: Operation[
|
|
31
|
+
export declare const operationReady: (data: Operation['data_json'], action: ActionOperation) => boolean;
|