@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
|
@@ -85,13 +85,13 @@ const RecordProvider = ({ children }) => {
|
|
|
85
85
|
setSelectedHitIds(_selected => _selected.filter(_id => _id !== id));
|
|
86
86
|
}, []);
|
|
87
87
|
const clearSelectedRecords = useCallback((except) => {
|
|
88
|
-
setSelectedHitIds(
|
|
88
|
+
setSelectedHitIds(except ? [except] : []);
|
|
89
89
|
}, []);
|
|
90
90
|
const selectedRecords = useMemo(() => selectedHitIds.map(id => records[id]).filter(hit => !!hit), [records, selectedHitIds]);
|
|
91
91
|
useEffect(() => {
|
|
92
92
|
selectedHitIds.forEach(id => {
|
|
93
93
|
if (!recordRequests.current[id]) {
|
|
94
|
-
getRecord(id);
|
|
94
|
+
void getRecord(id);
|
|
95
95
|
}
|
|
96
96
|
});
|
|
97
97
|
}, [getRecord, selectedHitIds]);
|
|
@@ -83,7 +83,7 @@ const RecordSearchProvider = ({ children }) => {
|
|
|
83
83
|
const search = useCallback(async (_query, appendResults) => {
|
|
84
84
|
THROTTLER.debounce(async () => {
|
|
85
85
|
if (_query === 'woof!') {
|
|
86
|
-
i18n.changeLanguage('woof');
|
|
86
|
+
void i18n.changeLanguage('woof');
|
|
87
87
|
return;
|
|
88
88
|
}
|
|
89
89
|
if (isNull(sort) || isNull(span)) {
|
|
@@ -156,7 +156,7 @@ const RecordSearchProvider = ({ children }) => {
|
|
|
156
156
|
return;
|
|
157
157
|
}
|
|
158
158
|
if (views.length > 0 || (query && query !== DEFAULT_QUERY) || offset > 0 || filters.length > 0) {
|
|
159
|
-
search(query);
|
|
159
|
+
void search(query);
|
|
160
160
|
}
|
|
161
161
|
else {
|
|
162
162
|
setResponse(null);
|
|
@@ -63,14 +63,14 @@ const SocketProvider = ({ children }) => {
|
|
|
63
63
|
// If we are unauthorized, we can update the token through the usual process and tell
|
|
64
64
|
// the connection to retry with the new token
|
|
65
65
|
if (data.status === 401) {
|
|
66
|
-
api.user.whoami.get().then(() => setRetry(true));
|
|
66
|
+
void api.user.whoami.get().then(() => setRetry(true));
|
|
67
67
|
}
|
|
68
68
|
else {
|
|
69
69
|
console.error(data);
|
|
70
70
|
setRetry(false);
|
|
71
71
|
}
|
|
72
72
|
}
|
|
73
|
-
catch
|
|
73
|
+
catch {
|
|
74
74
|
// There's no useful data, or the refresh attempt failed.
|
|
75
75
|
// Either way, we can't really do anything
|
|
76
76
|
}
|
|
@@ -100,7 +100,7 @@ const SocketProvider = ({ children }) => {
|
|
|
100
100
|
console.warn(data?.message || 'Websocket Error');
|
|
101
101
|
}
|
|
102
102
|
}
|
|
103
|
-
catch
|
|
103
|
+
catch {
|
|
104
104
|
console.warn('Websocket Error');
|
|
105
105
|
}
|
|
106
106
|
}, []);
|
|
@@ -52,10 +52,10 @@ describe('UserListProvider', () => {
|
|
|
52
52
|
.mockResolvedValueOnce(makeResponse(updatedFirstUser, secondUser));
|
|
53
53
|
const hook = renderHook(() => useContext(UserListContext), { wrapper: Wrapper });
|
|
54
54
|
await act(async () => {
|
|
55
|
-
|
|
55
|
+
hook.result.current.searchUsers('name:alpha');
|
|
56
56
|
});
|
|
57
57
|
await act(async () => {
|
|
58
|
-
|
|
58
|
+
hook.result.current.searchUsers('name:(alpha OR bravo)');
|
|
59
59
|
});
|
|
60
60
|
expect(hook.result.current.users).toEqual({
|
|
61
61
|
alpha: updatedFirstUser,
|
|
@@ -74,8 +74,8 @@ describe('UserListProvider', () => {
|
|
|
74
74
|
mockDispatchApi.mockResolvedValueOnce(makeResponse(alpha)).mockResolvedValueOnce(undefined);
|
|
75
75
|
const hook = renderHook(() => useContext(UserListContext), { wrapper: Wrapper });
|
|
76
76
|
await act(async () => {
|
|
77
|
-
|
|
78
|
-
|
|
77
|
+
hook.result.current.searchUsers('name:alpha');
|
|
78
|
+
hook.result.current.searchUsers('name:bravo');
|
|
79
79
|
});
|
|
80
80
|
expect(hook.result.current.users).toEqual({ alpha });
|
|
81
81
|
});
|
|
@@ -107,7 +107,7 @@ describe('UserListProvider', () => {
|
|
|
107
107
|
mockSearchUserPost.mockResolvedValueOnce(makeResponse(alpha)).mockResolvedValueOnce(makeResponse(bravo));
|
|
108
108
|
const hook = renderHook(() => useContext(UserListContext), { wrapper: Wrapper });
|
|
109
109
|
await act(async () => {
|
|
110
|
-
|
|
110
|
+
hook.result.current.searchUsers('id:alpha');
|
|
111
111
|
});
|
|
112
112
|
act(() => {
|
|
113
113
|
hook.result.current.fetchUsers(new Set(['Unknown', 'alpha', 'bravo']));
|
|
@@ -125,7 +125,7 @@ describe('UserListProvider', () => {
|
|
|
125
125
|
mockDispatchApi.mockResolvedValueOnce(makeResponse(alpha));
|
|
126
126
|
const hook = renderHook(() => useContext(UserListContext), { wrapper: Wrapper });
|
|
127
127
|
await act(async () => {
|
|
128
|
-
|
|
128
|
+
hook.result.current.searchUsers('id:alpha');
|
|
129
129
|
});
|
|
130
130
|
act(() => {
|
|
131
131
|
hook.result.current.fetchUsers(new Set(['Unknown', 'alpha']));
|
|
@@ -52,7 +52,7 @@ const ViewProvider = ({ children }) => {
|
|
|
52
52
|
if (!defaultView || has(views, defaultView)) {
|
|
53
53
|
return;
|
|
54
54
|
}
|
|
55
|
-
(async () => {
|
|
55
|
+
void (async () => {
|
|
56
56
|
const result = await fetchViews([defaultView]);
|
|
57
57
|
if (!result.length) {
|
|
58
58
|
setDefaultView(undefined);
|
|
@@ -80,7 +80,7 @@ const ViewProvider = ({ children }) => {
|
|
|
80
80
|
const result = await dispatchApi(api.view.put(id, partialView));
|
|
81
81
|
setViews(_views => ({
|
|
82
82
|
..._views,
|
|
83
|
-
[id]: { ...
|
|
83
|
+
[id]: { ..._views[id], ...partialView }
|
|
84
84
|
}));
|
|
85
85
|
return result;
|
|
86
86
|
}, [dispatchApi]);
|
|
@@ -94,7 +94,7 @@ const ViewProvider = ({ children }) => {
|
|
|
94
94
|
const addView = useCallback(async (view) => {
|
|
95
95
|
const newView = await dispatchApi(api.view.post(view));
|
|
96
96
|
setViews(_views => ({ ..._views, [newView.view_id]: newView }));
|
|
97
|
-
addFavourite(newView.view_id);
|
|
97
|
+
void addFavourite(newView.view_id);
|
|
98
98
|
return newView;
|
|
99
99
|
}, [addFavourite, dispatchApi]);
|
|
100
100
|
const removeFavourite = useCallback(async (id) => {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { Fragment as _Fragment, jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
2
|
import { Celebration, Check, Clear, Delete, Edit, Favorite, FireTruck, FormatQuote, Mood, MoreHoriz, RocketLaunch, ThumbDown, ThumbUp } from '@mui/icons-material';
|
|
3
3
|
import { CardActions, CardContent, Chip, CircularProgress, Collapse, Fade, IconButton, ListItemIcon, ListItemText, Menu, MenuItem, Stack, TextField, Tooltip, Typography } from '@mui/material';
|
|
4
4
|
import { useAppUser } from '@cccsaurora/howler-ui/commons/components/app/hooks';
|
|
@@ -59,7 +59,7 @@ const Comment = ({ comment, handleDelete, handleEdit, handleQuote, handleReact,
|
|
|
59
59
|
const checkForActions = useCallback(e => {
|
|
60
60
|
e.stopPropagation();
|
|
61
61
|
if (e.ctrlKey && e.key === 'Enter' && !loading) {
|
|
62
|
-
onEdit();
|
|
62
|
+
void onEdit();
|
|
63
63
|
}
|
|
64
64
|
else if (e.key === 'Escape') {
|
|
65
65
|
setEditing(false);
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { Fragment as _Fragment, jsx as _jsx } from "react/jsx-runtime";
|
|
2
2
|
import { fireEvent, render, screen, waitFor } from '@testing-library/react';
|
|
3
3
|
import { omit } from 'lodash-es';
|
|
4
4
|
import { act } from 'react';
|
|
@@ -13,10 +13,10 @@ vi.mock('@mui/material', async () => {
|
|
|
13
13
|
return {
|
|
14
14
|
...actual,
|
|
15
15
|
useTheme: () => ({ shape: { borderRadius: 4 } }),
|
|
16
|
-
Menu: ({ children, open, onClose, ...props }) => open ? (_jsx("div", { role: "menu", onClick: onClose, ...omit(props, ['sx', 'slotProps', 'MenuListProps', 'anchorOrigin', 'anchorEl']), children: children })) : null,
|
|
16
|
+
Menu: ({ children, open, onClose, ...props }) => open ? (_jsx("div", { tabIndex: 0, role: "menu", onClick: onClose, ...omit(props, ['sx', 'slotProps', 'MenuListProps', 'anchorOrigin', 'anchorEl']), children: children })) : null,
|
|
17
17
|
MenuItem: ({ children, onClick, disabled, component, to, id, onMouseEnter, onMouseLeave, ...props }) => {
|
|
18
18
|
const Component = component || 'div';
|
|
19
|
-
return (_jsx(Component, { role: "menuitem", onClick: onClick, "aria-disabled": disabled, href: to, id: id, onMouseEnter: onMouseEnter, onMouseLeave: onMouseLeave, ...omit(props, ['sx']), children: children }));
|
|
19
|
+
return (_jsx(Component, { tabIndex: 0, role: "menuitem", onClick: onClick, "aria-disabled": disabled, href: to, id: id, onMouseEnter: onMouseEnter, onMouseLeave: onMouseLeave, ...omit(props, ['sx']), children: children }));
|
|
20
20
|
},
|
|
21
21
|
Fade: ({ children, in: inProp }) => (inProp ? _jsx(_Fragment, { children: children }) : null),
|
|
22
22
|
ListItemIcon: ({ children }) => _jsx("div", { children: children }),
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { Fragment as _Fragment, jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
2
|
import { Check, Close, Delete, Edit } from '@mui/icons-material';
|
|
3
3
|
import { Box, Checkbox, CircularProgress, IconButton, Slider, Stack, TableCell, TableRow, TextField, Typography } from '@mui/material';
|
|
4
4
|
import useMySnackbar from '@cccsaurora/howler-ui/components/hooks/useMySnackbar';
|
|
@@ -55,7 +55,7 @@ const EditRow = ({ titleKey, descriptionKey, value, onEdit, validate, failOnVali
|
|
|
55
55
|
setEditValue(_value);
|
|
56
56
|
}
|
|
57
57
|
else {
|
|
58
|
-
onEdit(_value.toString());
|
|
58
|
+
void onEdit(_value.toString());
|
|
59
59
|
}
|
|
60
60
|
}, [failOnValidate, max, min, onEdit, type, validate]);
|
|
61
61
|
const onSubmit = useCallback(async () => {
|
|
@@ -79,7 +79,7 @@ const EditRow = ({ titleKey, descriptionKey, value, onEdit, validate, failOnVali
|
|
|
79
79
|
}, [confirmPassword, editValue, onEdit, showErrorMessage, t, type, value]);
|
|
80
80
|
const checkForActions = useCallback(e => {
|
|
81
81
|
if (e.ctrlKey && e.key === 'Enter' && !loading) {
|
|
82
|
-
onSubmit();
|
|
82
|
+
void onSubmit();
|
|
83
83
|
}
|
|
84
84
|
if (e.key === 'Escape') {
|
|
85
85
|
setEditing(false);
|
|
@@ -109,7 +109,7 @@ const EditRow = ({ titleKey, descriptionKey, value, onEdit, validate, failOnVali
|
|
|
109
109
|
endAdornment: loading && _jsx(CircularProgress, { size: 24 })
|
|
110
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: () => {
|
|
111
111
|
setEditing(false);
|
|
112
|
-
onEdit(null);
|
|
112
|
+
void onEdit(null);
|
|
113
113
|
}, disabled: loading, children: _jsx(Delete, { fontSize: "small" }) }))] }) })) : (_jsx(TableCell, { sx: cellSx, width: "100%", children: type === 'checkbox' ? (_jsx(Checkbox, { onChange: ev => onChange(ev.target.checked), checked: value.toString() === 'true' })) : type === 'range' && !isNil(value) ? ((valueLabelFormat ?? (val => `${val}px`))(value)) : ((value ?? t('none'))) })), 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) }) }) }))] }));
|
|
114
114
|
};
|
|
115
115
|
export default EditRow;
|
|
@@ -44,7 +44,7 @@ const ListRenderer = memo(({ obj, objKey: key, entries, maxKeyLength }) => {
|
|
|
44
44
|
return (_jsxs(Grid, { item: true, maxWidth: "100%", className: `${key}_${index}`.replace(/\./g, '_'), component: "code", display: "flex", flexDirection: "row", children: [_jsx(PluginTypography, { context: "details", component: "code", style: { maxWidth: '100%', font: 'inherit' }, value: entry, field: key.replace(/\.[0-9]+/g, ''), obj: obj, children: entry }), allPrimitives && index < uniqueEntries.length - 1 && _jsx("span", { children: "," })] }, entry));
|
|
45
45
|
}), omittedDuplicates && (_jsx(Grid, { item: true, display: "flex", alignItems: "center", children: _jsx(Tooltip, { title: t('duplicates.omitted'), children: _jsx(InfoOutlined, { sx: { fontSize: '20px', ml: 1 }, color: "disabled" }) }) }))] })] }));
|
|
46
46
|
});
|
|
47
|
-
const ObjectRenderer = memo(({ obj
|
|
47
|
+
const ObjectRenderer = memo(({ obj, data, parentKey, indent = false }) => {
|
|
48
48
|
const theme = useTheme();
|
|
49
49
|
const entries = useMemo(() => {
|
|
50
50
|
const unsorted = Object.entries(flatten(data, { safe: true })).map(([key, val]) => [key, val]);
|
|
@@ -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 } from '@mui/icons-material';
|
|
3
3
|
import { Autocomplete, AvatarGroup, Box, IconButton, Popover, Stack, TextField, Typography } from '@mui/material';
|
|
4
4
|
import { UserListContext } from '@cccsaurora/howler-ui/components/app/providers/UserListProvider';
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
export declare const MuiButtonColors: readonly [
|
|
1
|
+
export declare const MuiButtonColors: readonly ['inherit', 'primary', 'secondary', 'success', 'error', 'info', 'warning'];
|
|
2
2
|
export type MuiButtonColorType = (typeof MuiButtonColors)[number];
|
|
3
3
|
export declare const isMuiButtonColor: (color: string) => boolean;
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
declare const
|
|
1
|
+
declare const FlexOne: ({ children }: {
|
|
2
2
|
children?: any;
|
|
3
|
-
}) => import("react/jsx-runtime").JSX.Element
|
|
3
|
+
}) => import("react/jsx-runtime").JSX.Element;
|
|
4
|
+
declare const _default: import("react").MemoExoticComponent<typeof FlexOne>;
|
|
4
5
|
export default _default;
|
|
@@ -8,5 +8,6 @@ type FlexPortProps = {
|
|
|
8
8
|
id?: string;
|
|
9
9
|
children: React.ReactNode;
|
|
10
10
|
};
|
|
11
|
-
declare const
|
|
11
|
+
declare const FlexPort: ({ children, disableOverflow, id, ...props }: FlexPortProps) => import("react/jsx-runtime").JSX.Element;
|
|
12
|
+
declare const _default: import("react").MemoExoticComponent<typeof FlexPort>;
|
|
12
13
|
export default _default;
|
|
@@ -4,5 +4,6 @@ type FlexVerticalProps = PageProps & {
|
|
|
4
4
|
flex?: number;
|
|
5
5
|
children: ReactNode;
|
|
6
6
|
};
|
|
7
|
-
declare const
|
|
7
|
+
declare const FlexVertical: ({ flex, children, ...props }: FlexVerticalProps) => import("react/jsx-runtime").JSX.Element;
|
|
8
|
+
declare const _default: import("react").MemoExoticComponent<typeof FlexVertical>;
|
|
8
9
|
export default _default;
|
|
@@ -4,5 +4,6 @@ type VSBoxElementProps = Omit<BoxProps, 'children'> & {
|
|
|
4
4
|
focus: boolean;
|
|
5
5
|
children: ReactElement;
|
|
6
6
|
};
|
|
7
|
-
declare const
|
|
7
|
+
declare const VSBoxElement: ({ focus, children }: VSBoxElementProps) => import("react/jsx-runtime").JSX.Element;
|
|
8
|
+
declare const _default: import("react").MemoExoticComponent<typeof VSBoxElement>;
|
|
8
9
|
export default _default;
|
|
@@ -4,5 +4,6 @@ type TuiListProps<T> = {
|
|
|
4
4
|
children: TuiListItemRenderer<T>;
|
|
5
5
|
onSelection?: TuiListItemOnSelect<T>;
|
|
6
6
|
};
|
|
7
|
-
declare const
|
|
7
|
+
declare const TuiList: <T>({ keyboard, children, onSelection }: TuiListProps<T>) => import("react/jsx-runtime").JSX.Element;
|
|
8
|
+
declare const _default: import("react").MemoExoticComponent<typeof TuiList>;
|
|
8
9
|
export default _default;
|
|
@@ -6,5 +6,6 @@ type TuiListBaseProps<T> = {
|
|
|
6
6
|
onSelect: TuiListItemOnSelect<T>;
|
|
7
7
|
children: TuiListItemsRenderer<T>;
|
|
8
8
|
};
|
|
9
|
-
declare const
|
|
9
|
+
declare const TuiListBase: <T>({ keyboard, onSelect, children }: TuiListBaseProps<T>) => import("react/jsx-runtime").JSX.Element;
|
|
10
|
+
declare const _default: import("react").MemoExoticComponent<typeof TuiListBase>;
|
|
10
11
|
export default _default;
|
|
@@ -5,5 +5,6 @@ type TuiListElementProps<T> = {
|
|
|
5
5
|
onSelect?: TuiListItemOnSelect<T>;
|
|
6
6
|
children: TuiListItemRenderer<T>;
|
|
7
7
|
};
|
|
8
|
-
declare const
|
|
8
|
+
declare const TuiListElement: <T>({ position, item, onSelect: onClick, children }: TuiListElementProps<T>) => import("react/jsx-runtime").JSX.Element;
|
|
9
|
+
declare const _default: import("react").MemoExoticComponent<typeof TuiListElement>;
|
|
9
10
|
export default _default;
|
|
@@ -45,5 +45,6 @@ type TuiListMenuProps = {
|
|
|
45
45
|
children: ReactElement | ReactElement[];
|
|
46
46
|
};
|
|
47
47
|
export type TuiListMenuPlacement = keyof typeof PLACEMENTS;
|
|
48
|
-
declare const
|
|
48
|
+
declare const TuiListMenu: ({ style, className, permanent, placement, children }: TuiListMenuProps) => import("react/jsx-runtime").JSX.Element;
|
|
49
|
+
declare const _default: import("react").MemoExoticComponent<typeof TuiListMenu>;
|
|
49
50
|
export default _default;
|
|
@@ -13,7 +13,7 @@ const PLACEMENTS = {
|
|
|
13
13
|
const TuiListMenuRoot = styled('div', { shouldForwardProp: prop => !MY_PROPS.includes(prop) })(({ theme, permanent, placement }) => {
|
|
14
14
|
const position = PLACEMENTS[placement];
|
|
15
15
|
return {
|
|
16
|
-
...
|
|
16
|
+
...position,
|
|
17
17
|
zIndex: position ? 100 : null,
|
|
18
18
|
display: permanent ? 'flex' : 'none',
|
|
19
19
|
position: position ? 'absolute' : 'inherit',
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import type { TuiTableColumn } from '.';
|
|
2
|
-
declare const
|
|
2
|
+
declare const TuiTableHeader: ({ width, column }: {
|
|
3
3
|
width: number;
|
|
4
4
|
column: TuiTableColumn;
|
|
5
|
-
}) => import("react/jsx-runtime").JSX.Element
|
|
5
|
+
}) => import("react/jsx-runtime").JSX.Element;
|
|
6
|
+
declare const _default: import("react").MemoExoticComponent<typeof TuiTableHeader>;
|
|
6
7
|
export default _default;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { ReactNode } from 'react';
|
|
2
2
|
import type { TuiListItemProps } from '..';
|
|
3
|
-
export declare const MATCHERS: readonly [
|
|
3
|
+
export declare const MATCHERS: readonly ['like', 'in', 'is', '>=', '<=', '='];
|
|
4
4
|
export type TuiSearchMatcher = (typeof MATCHERS)[number];
|
|
5
5
|
export type TuiTableColumn = {
|
|
6
6
|
column: string;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { Fragment as _Fragment, jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
2
|
import { CheckCircleOutline, HourglassBottom, RadioButtonUnchecked, UpdateOutlined } from '@mui/icons-material';
|
|
3
3
|
import { Chip, Divider, Grid, Skeleton, Stack, Tooltip, Typography, useTheme } from '@mui/material';
|
|
4
4
|
import api from '@cccsaurora/howler-ui/api';
|
|
@@ -27,7 +27,7 @@ const CaseCard = ({ case: providedCase, caseId, className, slotProps }) => {
|
|
|
27
27
|
}, [providedCase]);
|
|
28
28
|
useEffect(() => {
|
|
29
29
|
if (caseId) {
|
|
30
|
-
dispatchApi(api.v2.case.get(caseId), { throwError: false }).then(setCase);
|
|
30
|
+
void dispatchApi(api.v2.case.get(caseId), { throwError: false }).then(setCase);
|
|
31
31
|
}
|
|
32
32
|
}, [caseId, dispatchApi]);
|
|
33
33
|
if (!_case) {
|
|
@@ -11,7 +11,7 @@ const ActionButton = ({ actionId, hitId, label, ...otherProps }) => {
|
|
|
11
11
|
const { executeAction } = useMyActionFunctions();
|
|
12
12
|
const [action, setAction] = useState(null);
|
|
13
13
|
useEffect(() => {
|
|
14
|
-
dispatchApi(api.search.action.post({ query: `action_id:${actionId}`, rows: 1 })).then(result => setAction(result.items[0]));
|
|
14
|
+
void dispatchApi(api.search.action.post({ query: `action_id:${actionId}`, rows: 1 })).then(result => setAction(result.items[0]));
|
|
15
15
|
}, [actionId, dispatchApi]);
|
|
16
16
|
if (!actionId || !hitId) {
|
|
17
17
|
return (_jsxs(Stack, { spacing: 1, children: [_jsx("strong", { style: { color: 'red' }, children: t('markdown.error') }), _jsx("code", { style: { fontSize: '0.8rem' }, children: t('markdown.actionbutton.error') })] }));
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { Fragment as _Fragment, jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
2
|
import { Chip, ClickAwayListener, Collapse, Paper, Popper } from '@mui/material';
|
|
3
3
|
import { memo, useState } from 'react';
|
|
4
4
|
const ChipPopper = ({ icon, deleteIcon, label, children, minWidth, placement = 'bottom-start', onToggle, onDelete, toggleOnDelete = false, closeOnClick = false, disablePortal = true, slotProps = {} }) => {
|
|
@@ -8,7 +8,7 @@ interface EnrichedChipProps {
|
|
|
8
8
|
}
|
|
9
9
|
declare const _default: React.NamedExoticComponent<EnrichedChipProps & ChipOwnProps & import("@mui/material/OverridableComponent").CommonProps & Omit<Omit<React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & {
|
|
10
10
|
ref?: React.Ref<HTMLDivElement>;
|
|
11
|
-
}, "
|
|
11
|
+
}, "avatar" | "children" | "className" | "classes" | "clickable" | "color" | "deleteIcon" | "disabled" | "icon" | "label" | "onDelete" | "size" | "skipFocusWhenDisabled" | "style" | "sx" | "tabIndex" | "variant"> & {
|
|
12
12
|
component?: React.ElementType;
|
|
13
13
|
}>;
|
|
14
14
|
export default _default;
|
|
@@ -50,7 +50,7 @@ const HandlebarsMarkdown = ({ md, object = {}, disableLinks = false }) => {
|
|
|
50
50
|
if (!mdComponents[id]) {
|
|
51
51
|
const result = helper.componentCallback(...args);
|
|
52
52
|
if (result instanceof Promise) {
|
|
53
|
-
result.then(_result => setMdComponents(_components => ({ ..._components, [id]: _result })));
|
|
53
|
+
void result.then(_result => setMdComponents(_components => ({ ..._components, [id]: _result })));
|
|
54
54
|
}
|
|
55
55
|
else {
|
|
56
56
|
setMdComponents(_components => ({ ..._components, [id]: result }));
|
|
@@ -82,13 +82,13 @@ const HandlebarsMarkdown = ({ md, object = {}, disableLinks = false }) => {
|
|
|
82
82
|
THROTTLER.debounce(async () => {
|
|
83
83
|
const compiled = handlebars.compile(md || '');
|
|
84
84
|
try {
|
|
85
|
-
setRendered(
|
|
85
|
+
setRendered(compiled(object));
|
|
86
86
|
}
|
|
87
87
|
catch (err) {
|
|
88
88
|
if (err.message?.startsWith('Missing helper')) {
|
|
89
89
|
const missingHelper = err.message.replace(/.+"(.+)"/, '$1');
|
|
90
90
|
handlebars.registerHelper(missingHelper, () => new Handlebars.SafeString(`<span style="color: red; font-weight: bold; font-family: monospace;">Missing helper ${missingHelper}</span>`));
|
|
91
|
-
setRendered(
|
|
91
|
+
setRendered(compiled(object));
|
|
92
92
|
return;
|
|
93
93
|
}
|
|
94
94
|
if (err instanceof HowlerHandlebarsRenderError) {
|
|
@@ -38,10 +38,10 @@ const HowlerAvatar = ({ userId, ...avatarProps }) => {
|
|
|
38
38
|
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
39
39
|
}, [userId]);
|
|
40
40
|
if (userId) {
|
|
41
|
-
return (_jsx(Tooltip, { title: displayId, children: _jsx(Avatar, { "aria-label": displayId, ...avatarProps, ...props, sx: { ...
|
|
41
|
+
return (_jsx(Tooltip, { title: displayId, children: _jsx(Avatar, { "aria-label": displayId, ...avatarProps, ...props, sx: { ...avatarProps?.sx, ...props?.sx } }) }));
|
|
42
42
|
}
|
|
43
43
|
else {
|
|
44
|
-
return (_jsx(Avatar, { "aria-label": t('unknown'), ...avatarProps, ...props, sx: { ...
|
|
44
|
+
return (_jsx(Avatar, { "aria-label": t('unknown'), ...avatarProps, ...props, sx: { ...avatarProps?.sx, ...props?.sx } }));
|
|
45
45
|
}
|
|
46
46
|
};
|
|
47
47
|
export default memo(HowlerAvatar);
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { Fragment as _Fragment, jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
2
|
import { Close } from '@mui/icons-material';
|
|
3
3
|
import { Box, IconButton, lighten, Modal } from '@mui/material';
|
|
4
4
|
import { useState } from 'react';
|
|
5
5
|
const Image = props => {
|
|
6
6
|
const [showModal, setShowModal] = useState(false);
|
|
7
|
-
return (_jsxs(_Fragment, { children: [_jsx("img", { ...props, style: { ...
|
|
7
|
+
return (_jsxs(_Fragment, { children: [_jsx("img", { ...props, style: { ...props.style, cursor: 'pointer' }, onClick: () => setShowModal(true) }), _jsx(Modal, { open: showModal, onClose: () => setShowModal(false), children: _jsxs(Box, { sx: {
|
|
8
8
|
width: '100%',
|
|
9
9
|
height: '100%',
|
|
10
10
|
display: 'flex',
|
|
@@ -18,6 +18,6 @@ const Image = props => {
|
|
|
18
18
|
'&:hover': {
|
|
19
19
|
backgroundColor: lighten(theme.palette.background.paper, 0.1)
|
|
20
20
|
}
|
|
21
|
-
}), children: _jsx(Close, {}) }), _jsx("img", { ...props, style: { ...
|
|
21
|
+
}), children: _jsx(Close, {}) }), _jsx("img", { ...props, style: { ...props.style, maxWidth: '70vw', maxHeight: '70vh' } })] }) })] }));
|
|
22
22
|
};
|
|
23
23
|
export default Image;
|
|
@@ -53,7 +53,7 @@ const Markdown = ({ md, components = {}, disableLinks = false }) => {
|
|
|
53
53
|
});
|
|
54
54
|
}, [isDark, theme]);
|
|
55
55
|
useEffect(() => {
|
|
56
|
-
mermaid.run();
|
|
56
|
+
void mermaid.run();
|
|
57
57
|
});
|
|
58
58
|
return (_jsx(ReactMarkdown, { remarkPlugins: [remarkGfm, codeTabs], rehypePlugins: [rehypeRaw], urlTransform: (value) => value, components: {
|
|
59
59
|
code({ node, className, children, ...props }) {
|
|
@@ -76,7 +76,7 @@ const Markdown = ({ md, components = {}, disableLinks = false }) => {
|
|
|
76
76
|
try {
|
|
77
77
|
return _jsx(JSONViewer, { data: JSON.parse(node.children[0].value) });
|
|
78
78
|
}
|
|
79
|
-
catch
|
|
79
|
+
catch {
|
|
80
80
|
return _jsx("code", { style: { color: 'red' }, children: t('markdown.json.invalid') });
|
|
81
81
|
}
|
|
82
82
|
}
|
|
@@ -152,7 +152,7 @@ export const useHelpers = (opts = { async: true, components: true }) => {
|
|
|
152
152
|
const json = await FETCH_RESULTS[url];
|
|
153
153
|
return flatten(json)[key];
|
|
154
154
|
}
|
|
155
|
-
catch
|
|
155
|
+
catch {
|
|
156
156
|
return '';
|
|
157
157
|
}
|
|
158
158
|
},
|
|
@@ -234,7 +234,7 @@ export const useHelpers = (opts = { async: true, components: true }) => {
|
|
|
234
234
|
try {
|
|
235
235
|
return JSON.parse(str);
|
|
236
236
|
}
|
|
237
|
-
catch
|
|
237
|
+
catch {
|
|
238
238
|
throw new HowlerHelperError('Invalid JSON string');
|
|
239
239
|
}
|
|
240
240
|
},
|
|
@@ -252,7 +252,7 @@ export const useHelpers = (opts = { async: true, components: true }) => {
|
|
|
252
252
|
try {
|
|
253
253
|
return get(data, key);
|
|
254
254
|
}
|
|
255
|
-
catch
|
|
255
|
+
catch {
|
|
256
256
|
return '';
|
|
257
257
|
}
|
|
258
258
|
},
|
|
@@ -32,10 +32,10 @@ const JSONViewer = ({ data, collapse = true, hideSearch = false, filter }) => {
|
|
|
32
32
|
}, []);
|
|
33
33
|
const renderer = useMemo(() => result && (_jsx(ReactJson, { src: result, theme: isDark ? 'summerfruit' : 'summerfruit:inverted', indentWidth: 2, displayDataTypes: !compact, displayObjectSize: !compact, shouldCollapse: collapse ? shouldCollapse : false, quotesOnKeys: false, style: { flex: 1, overflow: 'auto', height: '100%', fontSize: compact ? 'small' : 'smaller' }, enableClipboard: _data => {
|
|
34
34
|
if (typeof _data.src === 'string') {
|
|
35
|
-
navigator.clipboard.writeText(_data.src);
|
|
35
|
+
void navigator.clipboard.writeText(_data.src);
|
|
36
36
|
}
|
|
37
37
|
else {
|
|
38
|
-
navigator.clipboard.writeText(JSON.stringify(_data.src));
|
|
38
|
+
void navigator.clipboard.writeText(JSON.stringify(_data.src));
|
|
39
39
|
}
|
|
40
40
|
}, ...{
|
|
41
41
|
// Type declaration is wrong - this is a valid prop
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { Fragment as _Fragment, jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
2
|
import { Autocomplete, Button, CircularProgress, ListItemText, Stack, TextField, Typography } from '@mui/material';
|
|
3
3
|
import api from '@cccsaurora/howler-ui/api';
|
|
4
4
|
import { useAppUser } from '@cccsaurora/howler-ui/commons/components/app/hooks/useAppUser';
|
|
@@ -70,7 +70,7 @@ const RationaleModal = ({ hits, onSubmit }) => {
|
|
|
70
70
|
return rationales.map(_rationale => ({ rationale: _rationale, type: 'preset' }));
|
|
71
71
|
}, [hits, getMatchingAnalytic]);
|
|
72
72
|
useEffect(() => {
|
|
73
|
-
(async () => {
|
|
73
|
+
void (async () => {
|
|
74
74
|
setLoading(true);
|
|
75
75
|
try {
|
|
76
76
|
const options = await Promise.all([
|
|
@@ -404,7 +404,7 @@ describe('RationaleModal', () => {
|
|
|
404
404
|
render(_jsx(RationaleModal, { hits: defaultHits, onSubmit: mockOnSubmit }), { wrapper: Wrapper });
|
|
405
405
|
const specialText = 'Test <>&"\'{}[]()';
|
|
406
406
|
const input = screen.getByLabelText(i18n.t('modal.rationale.label'));
|
|
407
|
-
await user.type(input, specialText.replace(/([{
|
|
407
|
+
await user.type(input, specialText.replace(/([{[])/g, '$1$1'));
|
|
408
408
|
const submitButton = screen.getByText(i18n.t('submit'));
|
|
409
409
|
await user.click(submitButton);
|
|
410
410
|
expect(mockOnSubmit).toHaveBeenCalledWith(specialText);
|
|
@@ -10,7 +10,7 @@ const EventCard = ({ id, event: _event }) => {
|
|
|
10
10
|
const event = useContextSelector(RecordContext, ctx => _event ?? ctx.records[id]);
|
|
11
11
|
useEffect(() => {
|
|
12
12
|
if (!event) {
|
|
13
|
-
getRecord(id);
|
|
13
|
+
void getRecord(id);
|
|
14
14
|
}
|
|
15
15
|
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
16
16
|
}, [id]);
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { Hit } from '@cccsaurora/howler-ui/models/entities/generated/Hit';
|
|
2
2
|
declare const _default: import("react").NamedExoticComponent<{
|
|
3
3
|
hit: Hit;
|
|
4
|
-
orientation?:
|
|
4
|
+
orientation?: 'horizontal' | 'vertical';
|
|
5
5
|
}>;
|
|
6
6
|
export default _default;
|
|
@@ -111,7 +111,7 @@ const HitActions = ({ hit, orientation = 'horizontal' }) => {
|
|
|
111
111
|
}
|
|
112
112
|
}, [keyboardDownHandler]);
|
|
113
113
|
useEffect(() => {
|
|
114
|
-
getMatchingAnalytic(hit).then(setAnalytic);
|
|
114
|
+
void getMatchingAnalytic(hit).then(setAnalytic);
|
|
115
115
|
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
116
116
|
}, [hit?.howler.analytic]);
|
|
117
117
|
const handleOpenSetting = useCallback((e) => setOpenSetting(e.currentTarget), []);
|
|
@@ -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 { Box, Chip, Divider, Grid, Stack, Tooltip, Typography, avatarClasses, chipClasses, iconButtonClasses, useTheme } from '@mui/material';
|
|
4
4
|
import { ApiConfigContext } from '@cccsaurora/howler-ui/components/app/providers/ApiConfigProvider';
|
|
@@ -12,7 +12,7 @@ const HitCard = ({ id, layout, readOnly = true, lazy = false, elevation, hit: _h
|
|
|
12
12
|
const hit = useContextSelector(RecordContext, ctx => _hit ?? ctx.records[id]);
|
|
13
13
|
useEffect(() => {
|
|
14
14
|
if (!hit && !lazy) {
|
|
15
|
-
getRecord(id);
|
|
15
|
+
void getRecord(id);
|
|
16
16
|
}
|
|
17
17
|
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
18
18
|
}, [id]);
|
|
@@ -32,7 +32,7 @@ const NewLabelForm = ({ handleSubmit }) => {
|
|
|
32
32
|
'.MuiListItemIcon-root': { minWidth: 36, marginLeft: '2px' }
|
|
33
33
|
}, label: t('hit.label.edit.add.category'), id: "label-category", labelId: "type-label", value: category, onChange: e => setCategory(e.target.value), children: Object.keys(LABEL_TYPES).map(key => (_jsxs(MenuItem, { value: key, children: [_jsx(ListItemIcon, { children: LABEL_TYPES[key].icon ?? _jsx(Check, { sx: { opacity: 0 } }) }), _jsx(ListItemText, { sx: { textTransform: 'capitalize' }, children: key })] }, key))) })] }), _jsx(Stack, { direction: "row", spacing: 1, alignItems: "center", children: _jsxs(FormControl, { fullWidth: true, error: !!error, children: [_jsx(TextField, { label: t('hit.label.edit.add.label'), value: label, onChange: e => setLabel(e.currentTarget.value), onKeyDown: e => {
|
|
34
34
|
if (e.key === 'Enter') {
|
|
35
|
-
handleAdd();
|
|
35
|
+
void handleAdd();
|
|
36
36
|
}
|
|
37
37
|
else if (error) {
|
|
38
38
|
setError('');
|