@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.
Files changed (239) hide show
  1. package/api/index.d.ts +1 -1
  2. package/api/search/action.js +1 -1
  3. package/api/search/analytic.js +1 -1
  4. package/api/search/case.js +1 -1
  5. package/api/search/count/hit.js +1 -1
  6. package/api/search/dossier.js +1 -1
  7. package/api/search/eql/hit.js +1 -1
  8. package/api/search/explain/hit.js +1 -1
  9. package/api/search/facet/hit.js +1 -1
  10. package/api/search/grouped/hit.js +1 -1
  11. package/api/search/grouped/user.js +1 -1
  12. package/api/search/histogram/hit.js +1 -1
  13. package/api/search/hit.js +1 -1
  14. package/api/search/overview.js +1 -1
  15. package/api/search/sigma/hit.js +1 -1
  16. package/api/search/template.js +1 -1
  17. package/api/search/user.js +1 -1
  18. package/api/search/view.js +1 -1
  19. package/api/v2/search/facet.js +1 -1
  20. package/api/v2/search/index.js +1 -1
  21. package/api/view/index.d.ts +1 -1
  22. package/branding/AppBrand.d.ts +2 -2
  23. package/commons/components/app/AppSkeleton.js +1 -1
  24. package/commons/components/app/hooks/useAppConfigs.d.ts +2 -2
  25. package/commons/components/app/hooks/useAppSitemap.d.ts +5 -2
  26. package/commons/components/breadcrumbs/BreadcrumbIcon.js +1 -1
  27. package/commons/components/breadcrumbs/Breadcrumbs.d.ts +3 -2
  28. package/commons/components/display/AppToc.d.ts +2 -1
  29. package/commons/components/display/AppToc.js +1 -1
  30. package/commons/components/display/hooks/useAppColor.d.ts +1 -1
  31. package/commons/components/leftnav/LeftNavDrawer.d.ts +2 -1
  32. package/commons/components/leftnav/LeftNavGroup.d.ts +2 -1
  33. package/commons/components/leftnav/LeftNavItem.d.ts +2 -1
  34. package/commons/components/leftnav/LeftNavItem.js +1 -1
  35. package/commons/components/notification/Notification.js +1 -1
  36. package/commons/components/notification/elements/NotificationHeader.js +1 -1
  37. package/commons/components/notification/elements/NotificationItems.js +1 -1
  38. package/commons/components/notification/elements/item/NotificationItemAuthor.js +1 -1
  39. package/commons/components/pages/PageCenter.d.ts +2 -1
  40. package/commons/components/pages/PageContent.d.ts +2 -1
  41. package/commons/components/pages/PageFullScreen.d.ts +2 -1
  42. package/commons/components/search/AppSearch.js +1 -1
  43. package/commons/components/search/AppSearchInput.d.ts +2 -1
  44. package/commons/components/search/AppSearchResult.d.ts +2 -1
  45. package/commons/components/topnav/AppBar.d.ts +2 -1
  46. package/commons/components/topnav/AppName.d.ts +3 -2
  47. package/commons/components/topnav/AppSwitcher.d.ts +2 -1
  48. package/commons/components/topnav/ThemeSelection.d.ts +2 -1
  49. package/commons/components/topnav/ThemeSelection.js +1 -1
  50. package/commons/components/topnav/UserProfile.d.ts +2 -1
  51. package/commons/components/topnav/UserProfile.js +1 -1
  52. package/commons/components/utils/hooks/useThemeBuilder.d.ts +1 -1
  53. package/components/app/App.js +2 -2
  54. package/components/app/drawers/ApiKeyDrawer.js +1 -1
  55. package/components/app/hooks/useMatchers.js +4 -4
  56. package/components/app/hooks/useTitle.js +1 -1
  57. package/components/app/providers/AnalyticProvider.js +1 -1
  58. package/components/app/providers/AvatarProvider.js +1 -1
  59. package/components/app/providers/FavouritesProvider.js +1 -1
  60. package/components/app/providers/GridColumnsProvider.d.ts +1 -1
  61. package/components/app/providers/GridColumnsProvider.js +1 -1
  62. package/components/app/providers/OverviewProvider.js +1 -1
  63. package/components/app/providers/RecordProvider.js +2 -2
  64. package/components/app/providers/RecordSearchProvider.js +2 -2
  65. package/components/app/providers/SocketProvider.js +3 -3
  66. package/components/app/providers/UserListProvider.test.js +6 -6
  67. package/components/app/providers/ViewProvider.js +3 -3
  68. package/components/elements/Comment.js +2 -2
  69. package/components/elements/ContextMenu.test.js +3 -3
  70. package/components/elements/EditRow.js +4 -4
  71. package/components/elements/ObjectDetails.js +1 -1
  72. package/components/elements/UserList.js +1 -1
  73. package/components/elements/addons/buttons/index.d.ts +1 -1
  74. package/components/elements/addons/layout/FlexOne.d.ts +3 -2
  75. package/components/elements/addons/layout/FlexPort.d.ts +2 -1
  76. package/components/elements/addons/layout/FlexVertical.d.ts +2 -1
  77. package/components/elements/addons/layout/vsbox/VSBoxElement.d.ts +2 -1
  78. package/components/elements/addons/lists/TuiList.d.ts +2 -1
  79. package/components/elements/addons/lists/TuiListBase.d.ts +2 -1
  80. package/components/elements/addons/lists/TuiListElement.d.ts +2 -1
  81. package/components/elements/addons/lists/TuiListMenu.d.ts +2 -1
  82. package/components/elements/addons/lists/TuiListMenu.js +1 -1
  83. package/components/elements/addons/lists/table/TuiTableHeader.d.ts +3 -2
  84. package/components/elements/addons/lists/table/index.d.ts +1 -1
  85. package/components/elements/case/CaseCard.js +2 -2
  86. package/components/elements/display/ActionButton.js +1 -1
  87. package/components/elements/display/ChipPopper.js +1 -1
  88. package/components/elements/display/ClassificationChip.d.ts +1 -1
  89. package/components/elements/display/HandlebarsMarkdown.js +3 -3
  90. package/components/elements/display/HowlerAvatar.js +2 -2
  91. package/components/elements/display/Image.js +3 -3
  92. package/components/elements/display/Markdown.js +2 -2
  93. package/components/elements/display/handlebars/helpers.js +3 -3
  94. package/components/elements/display/json/JSONViewer.js +2 -2
  95. package/components/elements/display/modals/RationaleModal.js +2 -2
  96. package/components/elements/display/modals/RationaleModal.test.js +1 -1
  97. package/components/elements/event/EventCard.js +1 -1
  98. package/components/elements/hit/HitActions.d.ts +1 -1
  99. package/components/elements/hit/HitActions.js +1 -1
  100. package/components/elements/hit/HitBanner.js +1 -1
  101. package/components/elements/hit/HitCard.js +1 -1
  102. package/components/elements/hit/HitLabels.js +1 -1
  103. package/components/elements/hit/HitNotebooks.js +9 -9
  104. package/components/elements/hit/HitOutline.js +1 -1
  105. package/components/elements/hit/HitOverview.js +1 -1
  106. package/components/elements/hit/HitPreview.js +1 -1
  107. package/components/elements/hit/HitSummary.js +2 -2
  108. package/components/elements/hit/ResolvePivotUrl.d.ts +1 -1
  109. package/components/elements/hit/actions/ButtonActions.js +1 -3
  110. package/components/elements/hit/aggregate/HitGraph.js +1 -1
  111. package/components/elements/hit/elements/AnalyticLink.js +1 -1
  112. package/components/elements/hit/elements/Assigned.js +1 -1
  113. package/components/elements/hit/grid/AddColumnModal.js +1 -1
  114. package/components/elements/hit/grid/ColumnHeader.js +1 -1
  115. package/components/elements/hit/grid/RecordRow.js +1 -1
  116. package/components/elements/hit/grid/RecordTable.js +2 -2
  117. package/components/elements/hit/outlines/DefaultOutline.js +1 -3
  118. package/components/elements/hit/related/PivotLink.js +1 -1
  119. package/components/elements/record/RecordComments.js +5 -7
  120. package/components/elements/record/RecordContextMenu.js +2 -2
  121. package/components/elements/record/RecordContextMenu.test.js +4 -4
  122. package/components/elements/record/RecordWorklog.js +1 -1
  123. package/components/elements/view/LayoutToggle.d.ts +1 -1
  124. package/components/hooks/useHitActions.js +1 -1
  125. package/components/hooks/useLocalStorage.js +1 -1
  126. package/components/hooks/useLocalStorageItem.test.js +2 -2
  127. package/components/hooks/useMyChart.d.ts +23 -23
  128. package/components/hooks/useMySnackbar.js +1 -1
  129. package/components/hooks/useMyUserFunctions.d.ts +21 -21
  130. package/components/hooks/useRelatedRecords.js +1 -1
  131. package/components/logins/Login.js +1 -1
  132. package/components/logins/auth/OAuthLogin.js +1 -1
  133. package/components/logins/hooks/useLogin.js +2 -2
  134. package/components/routes/action/edit/ActionEditor.js +4 -4
  135. package/components/routes/action/shared/OperationEntry.js +1 -1
  136. package/components/routes/action/shared/OperationStep.js +1 -1
  137. package/components/routes/action/useMyActionFunctions.js +1 -1
  138. package/components/routes/action/view/ActionDetails.js +2 -2
  139. package/components/routes/action/view/ActionSearch.js +4 -4
  140. package/components/routes/admin/users/UserEditor.js +1 -1
  141. package/components/routes/admin/users/UserSearch.js +5 -5
  142. package/components/routes/advanced/QueryBuilder.js +2 -2
  143. package/components/routes/advanced/luceneCompletionProvider.js +1 -1
  144. package/components/routes/analytics/AnalyticComments.js +3 -5
  145. package/components/routes/analytics/AnalyticDetails.js +2 -2
  146. package/components/routes/analytics/AnalyticHitComments.js +1 -1
  147. package/components/routes/analytics/AnalyticHitComments.test.js +1 -1
  148. package/components/routes/analytics/AnalyticOverview.js +2 -2
  149. package/components/routes/analytics/AnalyticOverviews.js +1 -1
  150. package/components/routes/analytics/AnalyticSearch.js +2 -2
  151. package/components/routes/analytics/AnalyticTemplates.js +1 -1
  152. package/components/routes/analytics/TriageSettings.js +2 -2
  153. package/components/routes/analytics/widgets/Assessment.js +1 -1
  154. package/components/routes/analytics/widgets/Created.js +1 -1
  155. package/components/routes/analytics/widgets/Escalation.js +1 -1
  156. package/components/routes/analytics/widgets/Stacked.js +1 -1
  157. package/components/routes/cases/CaseViewer.js +1 -1
  158. package/components/routes/cases/Cases.js +3 -3
  159. package/components/routes/cases/constants.d.ts +1 -1
  160. package/components/routes/cases/detail/CaseDashboard.js +1 -1
  161. package/components/routes/cases/detail/CaseDetails.js +3 -3
  162. package/components/routes/cases/detail/CaseObservables.js +2 -2
  163. package/components/routes/cases/detail/CaseRules.js +3 -3
  164. package/components/routes/cases/detail/CaseSearch.js +2 -2
  165. package/components/routes/cases/detail/CaseSearch.test.js +1 -1
  166. package/components/routes/cases/detail/CaseTask.js +4 -4
  167. package/components/routes/cases/detail/CaseTimeline.js +2 -2
  168. package/components/routes/cases/detail/CreateRuleDialog.test.js +1 -1
  169. package/components/routes/cases/detail/ItemPage.js +1 -1
  170. package/components/routes/cases/detail/MarkdownPage.js +1 -1
  171. package/components/routes/cases/detail/TaskPanel.js +2 -2
  172. package/components/routes/cases/detail/sidebar/CaseFolder.js +2 -2
  173. package/components/routes/cases/detail/sidebar/CaseFolderContextMenu.js +1 -1
  174. package/components/routes/cases/detail/utils.d.ts +1 -1
  175. package/components/routes/cases/hooks/useCase.js +2 -5
  176. package/components/routes/cases/modals/AddRecordToCaseModal.js +2 -2
  177. package/components/routes/cases/modals/AddToCaseModal.js +1 -1
  178. package/components/routes/cases/modals/CreateCaseModal.js +1 -1
  179. package/components/routes/cases/modals/RenameItemModal.js +2 -2
  180. package/components/routes/cases/modals/ResolveModal.js +1 -1
  181. package/components/routes/cases/modals/hooks.d.ts +1 -1
  182. package/components/routes/dossiers/DossierEditor.js +2 -2
  183. package/components/routes/dossiers/DossierEditor.test.js +1 -1
  184. package/components/routes/dossiers/Dossiers.js +3 -3
  185. package/components/routes/dossiers/PivotForm.js +2 -4
  186. package/components/routes/events/EventViewer.js +1 -1
  187. package/components/routes/help/ApiDocumentation.js +1 -1
  188. package/components/routes/help/HitBannerDocumentation.js +1 -1
  189. package/components/routes/help/HitSchemaDocumentation.js +1 -1
  190. package/components/routes/help/RetentionDocumentation.js +2 -2
  191. package/components/routes/help/SearchDocumentation.js +1 -1
  192. package/components/routes/hits/search/InformationPane.js +5 -5
  193. package/components/routes/hits/search/QuerySettings.test.js +4 -5
  194. package/components/routes/hits/search/RecordBrowser.js +1 -1
  195. package/components/routes/hits/search/ViewLink.js +1 -1
  196. package/components/routes/hits/search/shared/CustomSort.js +1 -1
  197. package/components/routes/hits/search/shared/HitFilter.d.ts +1 -1
  198. package/components/routes/hits/search/shared/HitSort.d.ts +1 -1
  199. package/components/routes/hits/search/shared/HitSort.js +1 -1
  200. package/components/routes/hits/search/shared/SearchSpan.d.ts +1 -1
  201. package/components/routes/hits/search/shared/SearchSpan.js +1 -1
  202. package/components/routes/hits/view/HitViewer.js +3 -3
  203. package/components/routes/home/AddNewCard.js +2 -2
  204. package/components/routes/home/AnalyticCard.js +1 -1
  205. package/components/routes/home/EntryWrapper.js +1 -1
  206. package/components/routes/home/HomeSettings.js +1 -1
  207. package/components/routes/home/ViewCard.js +5 -5
  208. package/components/routes/home/index.js +2 -2
  209. package/components/routes/overviews/OverviewCard.js +1 -1
  210. package/components/routes/overviews/OverviewViewer.js +3 -3
  211. package/components/routes/overviews/Overviews.js +3 -3
  212. package/components/routes/overviews/markdownExtendedTokenProvider.js +15 -15
  213. package/components/routes/settings/ProfileSection.js +2 -2
  214. package/components/routes/templates/TemplateEditor.d.ts +3 -2
  215. package/components/routes/templates/TemplateEditor.js +1 -1
  216. package/components/routes/templates/TemplateViewer.js +3 -3
  217. package/components/routes/templates/Templates.js +3 -3
  218. package/components/routes/views/ViewComposer.js +3 -3
  219. package/components/routes/views/Views.js +2 -2
  220. package/i18n.js +1 -1
  221. package/index.d.ts +1 -1
  222. package/index.js +1 -1
  223. package/package.json +2 -2
  224. package/plugins/clue/components/ClueLeadForm.js +1 -1
  225. package/plugins/clue/components/CluePivotForm.js +2 -2
  226. package/plugins/clue/helpers.js +4 -4
  227. package/plugins/clue/index.d.ts +2 -1
  228. package/rest/AxiosClient.test.js +1 -0
  229. package/utils/Throttler.test.js +2 -2
  230. package/utils/actionUtils.d.ts +3 -3
  231. package/utils/classificationParser.js +20 -20
  232. package/utils/constants.d.ts +3 -3
  233. package/utils/localStorage.js +1 -1
  234. package/utils/menuUtils.js +0 -4
  235. package/utils/stringUtils.test.js +1 -1
  236. package/utils/utils.d.ts +1 -1
  237. package/utils/utils.js +2 -2
  238. package/utils/utils.test.js +1 -1
  239. package/utils/xsrf.js +1 -1
@@ -22,7 +22,7 @@ const CaseRules = ({ case: providedCase, caseId }) => {
22
22
  return;
23
23
  }
24
24
  const updatedCase = await dispatchApi(api.v2.case.rules.post(_case.case_id, ruleData));
25
- update(updatedCase, false);
25
+ void update(updatedCase, false);
26
26
  }, [_case, dispatchApi, update]);
27
27
  const handleDeleteRule = useCallback(async (ruleId) => {
28
28
  if (!_case) {
@@ -31,7 +31,7 @@ const CaseRules = ({ case: providedCase, caseId }) => {
31
31
  showModal(_jsx(ConfirmDeleteModal, { onConfirm: async () => {
32
32
  const updatedCase = await dispatchApi(api.v2.case.rules.del(_case.case_id, ruleId), { throwError: false });
33
33
  if (updatedCase) {
34
- update(updatedCase, false);
34
+ void update(updatedCase, false);
35
35
  }
36
36
  } }), { height: 'auto' });
37
37
  }, [_case, dispatchApi, showModal, update]);
@@ -40,7 +40,7 @@ const CaseRules = ({ case: providedCase, caseId }) => {
40
40
  return;
41
41
  }
42
42
  const updatedCase = await dispatchApi(api.v2.case.rules.put(_case.case_id, ruleId, { enabled }));
43
- update(updatedCase, false);
43
+ void update(updatedCase, false);
44
44
  }, [_case, dispatchApi, update]);
45
45
  if (!_case) {
46
46
  return null;
@@ -1,4 +1,4 @@
1
- import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
1
+ import { Fragment as _Fragment, jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
2
  import { Box, Skeleton, Stack, Typography } from '@mui/material';
3
3
  import api from '@cccsaurora/howler-ui/api';
4
4
  import PageCenter from '@cccsaurora/howler-ui/commons/components/pages/PageCenter';
@@ -59,7 +59,7 @@ const CaseSearch = () => {
59
59
  }, [caseIds, offset, parentCase?.case_id]);
60
60
  useEffect(() => {
61
61
  if (query) {
62
- handleSearch(query, indexes);
62
+ void handleSearch(query, indexes);
63
63
  }
64
64
  // eslint-disable-next-line react-hooks/exhaustive-deps
65
65
  }, [indexes, offset]);
@@ -1,4 +1,4 @@
1
- import { jsxs as _jsxs, jsx as _jsx } from "react/jsx-runtime";
1
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
2
  /// <reference types="vitest" />
3
3
  import { render, screen, waitFor } from '@testing-library/react';
4
4
  import userEvent from '@testing-library/user-event';
@@ -29,14 +29,14 @@ const CaseTask = ({ case: _case, task, onEdit, onDelete, newTask = false, readOn
29
29
  useEffect(() => {
30
30
  if (!readOnly && !editing && task?.assignment !== assignment) {
31
31
  setLoading(true);
32
- onEdit({ assignment }).finally(() => setLoading(false));
32
+ void onEdit({ assignment }).finally(() => setLoading(false));
33
33
  }
34
34
  // eslint-disable-next-line react-hooks/exhaustive-deps
35
35
  }, [assignment]);
36
36
  useEffect(() => {
37
37
  if (!readOnly && !editing && task?.complete !== complete) {
38
38
  setLoading(true);
39
- onEdit({ complete }).finally(() => setLoading(false));
39
+ void onEdit({ complete }).finally(() => setLoading(false));
40
40
  }
41
41
  // eslint-disable-next-line react-hooks/exhaustive-deps
42
42
  }, [complete]);
@@ -51,7 +51,7 @@ const CaseTask = ({ case: _case, task, onEdit, onDelete, newTask = false, readOn
51
51
  }, [task, _case]);
52
52
  return (_jsxs(Card, { sx: { pl: 0.5, pr: 1, py: 0.5, position: 'relative' }, children: [_jsxs(Stack, { direction: "row", alignItems: "center", spacing: 1, children: [_jsx(Checkbox, { disabled: loading || readOnly, color: "success", checked: complete, size: "small", onChange: (_ev, _complete) => !readOnly && setComplete(_complete) }), editing && !readOnly ? (_jsx(TextField, { disabled: loading, value: summary, onChange: e => setSummary(e.target.value), size: "small", fullWidth: true, sx: { minWidth: '40%' } })) : (_jsx(Typography, { sx: [complete && { textDecoration: 'line-through' }], children: task?.summary || summary })), !editing && item && (_jsx(Chip, { clickable: true, component: Link, to: `/cases/${_case.case_id}/${buildPathFromID(_case, item.id)}`, label: item.name })), editing && !readOnly && (_jsx(Autocomplete, { disabled: loading, value: item, options: options, getOptionLabel: opt => buildPathFromID(_case, opt.id), isOptionEqualToValue: opt => opt.id === item.id, onChange: (_ev, value) => setItem(value), fullWidth: true, renderInput: params => _jsx(TextField, { ...params, size: "small" }) })), _jsx(UserList, { disabled: loading || readOnly, userIds: [assignment], onChange: ([_assigment]) => !readOnly && setAssignment(_assigment), i18nLabel: "route.cases.task.set.assignment", avatarHeight: 24 }), _jsx("div", { style: { flex: 1 } }), !readOnly && editing && !newTask && (_jsx(Tooltip, { title: t('route.cases.task.delete'), children: _jsx(IconButton, { size: "small", color: "error", onClick: () => {
53
53
  setLoading(true);
54
- onDelete().then(() => setLoading(false));
54
+ void onDelete().then(() => setLoading(false));
55
55
  }, disabled: loading, children: _jsx(Delete, { fontSize: "small" }) }) })), !readOnly && (_jsx(Tooltip, { title: t(editing ? 'route.cases.task.edit.save' : 'route.cases.task.edit'), children: _jsx("span", { children: _jsx(IconButton, { size: "small", color: editing ? 'success' : 'default', onClick: async () => {
56
56
  if (!editing) {
57
57
  setEditing(true);
@@ -61,7 +61,7 @@ const CaseTask = ({ case: _case, task, onEdit, onDelete, newTask = false, readOn
61
61
  setEditing(false);
62
62
  }, disabled: (!dirty && editing) || loading || !summary, children: editing ? _jsx(Check, { fontSize: "small" }) : _jsx(Edit, { fontSize: "small" }) }) }) })), !readOnly && editing && (_jsx(Tooltip, { title: t('route.cases.task.edit.cancel'), children: _jsx(IconButton, { size: "small", onClick: () => {
63
63
  if (newTask) {
64
- onDelete();
64
+ void onDelete();
65
65
  }
66
66
  else {
67
67
  setEditing(false);
@@ -56,7 +56,7 @@ const CaseTimeline = ({ case: providedCase, caseId }) => {
56
56
  if (ids.length < 1) {
57
57
  return;
58
58
  }
59
- dispatchApi(api.v2.search.facet.post(['hit', 'event'], {
59
+ void dispatchApi(api.v2.search.facet.post(['hit', 'event'], {
60
60
  fields: ['threat.tactic.id', 'threat.technique.id', 'howler.escalation'],
61
61
  filters: [`howler.id:(${ids.join(' OR ')})`]
62
62
  }), { throwError: false }).then(result => {
@@ -84,7 +84,7 @@ const CaseTimeline = ({ case: providedCase, caseId }) => {
84
84
  }
85
85
  setLoading(true);
86
86
  const filters = buildFilters(selectedMitres, selectedEscalations);
87
- dispatchApi(api.v2.search.post(['hit', 'event'], {
87
+ void dispatchApi(api.v2.search.post(['hit', 'event'], {
88
88
  query: `howler.id:(${ids.join(' OR ')})`,
89
89
  sort: 'event.created asc',
90
90
  rows: ids.length,
@@ -1,4 +1,4 @@
1
- import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
1
+ import { Fragment as _Fragment, jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
2
  import { render, screen, waitFor } from '@testing-library/react';
3
3
  import userEvent from '@testing-library/user-event';
4
4
  import { describe, expect, it, vi } from 'vitest';
@@ -74,7 +74,7 @@ const ItemPage = ({ case: providedCase }) => {
74
74
  }
75
75
  };
76
76
  if (_case) {
77
- resolveItem();
77
+ void resolveItem();
78
78
  }
79
79
  return () => {
80
80
  cancelled = true;
@@ -1,4 +1,4 @@
1
- import { jsxs as _jsxs, jsx as _jsx } from "react/jsx-runtime";
1
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
2
  import { Cancel, Edit, Save } from '@mui/icons-material';
3
3
  import { Box, Divider, IconButton, Stack, Tooltip, Typography } from '@mui/material';
4
4
  import ThemedEditor from '@cccsaurora/howler-ui/components/elements/ThemedEditor';
@@ -1,4 +1,4 @@
1
- import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-runtime";
1
+ import { Fragment as _Fragment, jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
2
  import { Add, ExpandLess, ExpandMore } from '@mui/icons-material';
3
3
  import { Autocomplete, Chip, Divider, Skeleton, Stack, TextField, Tooltip, Typography } from '@mui/material';
4
4
  import api from '@cccsaurora/howler-ui/api';
@@ -26,7 +26,7 @@ const TaskPanel = ({ case: _case, updateCase }) => {
26
26
  return;
27
27
  }
28
28
  let cancelled = false;
29
- dispatchApi(api.v2.search.post('case', { query: `case_id:(${childCaseItems.map(item => item.value).join(' OR ')})` }), { throwError: false })
29
+ void dispatchApi(api.v2.search.post('case', { query: `case_id:(${childCaseItems.map(item => item.value).join(' OR ')})` }), { throwError: false })
30
30
  .then(results => results.items)
31
31
  .then(results => {
32
32
  if (!cancelled) {
@@ -1,4 +1,4 @@
1
- import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
1
+ import { Fragment as _Fragment, jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
2
  import { Box, Skeleton, Stack, useTheme } from '@mui/material';
3
3
  import api from '@cccsaurora/howler-ui/api';
4
4
  import { RecordContext } from '@cccsaurora/howler-ui/components/app/providers/RecordProvider';
@@ -52,7 +52,7 @@ const CaseFolder = ({ case: _case, folder, name, step = -1, parentCaseNames = []
52
52
  setCaseStates(current => ({ ...current, [item.value]: { ...prev, open: shouldOpen, loading: shouldFetch } }));
53
53
  if (!shouldFetch)
54
54
  return;
55
- dispatchApi(api.v2.case.get(item.value), { throwError: false })
55
+ void dispatchApi(api.v2.case.get(item.value), { throwError: false })
56
56
  .then(caseResponse => {
57
57
  if (!caseResponse)
58
58
  return;
@@ -85,7 +85,7 @@ const CaseFolderContextMenu = ({ case: _case, item, onUpdate, children }) => {
85
85
  if (!_case.case_id) {
86
86
  return;
87
87
  }
88
- dispatchApi(api.v2.case.items.del(_case.case_id, [item.id], isFolder), { throwError: false }).then(updatedCase => {
88
+ void dispatchApi(api.v2.case.items.del(_case.case_id, [item.id], isFolder), { throwError: false }).then(updatedCase => {
89
89
  if (updatedCase) {
90
90
  onUpdate?.(updatedCase);
91
91
  }
@@ -26,4 +26,4 @@ export declare const buildObservableEntries: (records: Partial<Hit | Event>[]) =
26
26
  */
27
27
  export declare const classifyRole: (value: string, _case: Case, records: Partial<Hit | Event>[]) => ObservableRole;
28
28
  /** Resolve source metadata for an asset's seenIn IDs */
29
- export declare const resolveSources: (seenIn: string[], caseItems: Case["items"], escalationMap: Map<string, string>) => ObservableSource[];
29
+ export declare const resolveSources: (seenIn: string[], caseItems: Case['items'], escalationMap: Map<string, string>) => ObservableSource[];
@@ -19,7 +19,7 @@ const useCase = ({ caseId, case: providedCase }) => {
19
19
  useEffect(() => {
20
20
  if (caseId) {
21
21
  setLoading(true);
22
- dispatchApi(api.v2.case.get(caseId), { throwError: false })
22
+ void dispatchApi(api.v2.case.get(caseId), { throwError: false })
23
23
  .then(setCase)
24
24
  .finally(() => setLoading(false));
25
25
  }
@@ -58,12 +58,9 @@ const useCase = ({ caseId, case: providedCase }) => {
58
58
  });
59
59
  }
60
60
  }
61
- catch (e) {
61
+ catch {
62
62
  setMissing(true);
63
63
  }
64
- finally {
65
- return;
66
- }
67
64
  }, [activeCaseId, dispatchApi]);
68
65
  return { case: _case, update, loading, missing };
69
66
  };
@@ -1,5 +1,5 @@
1
1
  import { createElement as _createElement } from "react";
2
- import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-runtime";
2
+ import { Fragment as _Fragment, jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
3
3
  import { Autocomplete, Button, CircularProgress, Divider, Stack, TextField, Typography } from '@mui/material';
4
4
  import api from '@cccsaurora/howler-ui/api';
5
5
  import { ModalContext } from '@cccsaurora/howler-ui/components/app/providers/ModalProvider';
@@ -21,7 +21,7 @@ const AddRecordToCaseModal = ({ records }) => {
21
21
  const [submitting, setSubmitting] = useState(false);
22
22
  const [entries, updateEntry] = useRecordEntries(records);
23
23
  useEffect(() => {
24
- dispatchApi(api.search.case.post({ query: 'case_id:*', rows: 100 }), { throwError: false }).then(result => {
24
+ void dispatchApi(api.search.case.post({ query: 'case_id:*', rows: 100 }), { throwError: false }).then(result => {
25
25
  if (result) {
26
26
  setCases(result.items);
27
27
  }
@@ -67,6 +67,6 @@ const AddToCaseModal = ({ case: _case, parentId = null, onUpdated }) => {
67
67
  if (option) {
68
68
  setItemType(option);
69
69
  }
70
- }, options: ITEM_TYPES, getOptionLabel: opt => t(opt.labelKey), isOptionEqualToValue: (option, choice) => option.value === choice.value, disablePortal: true, disableClearable: true, renderInput: params => (_jsx(TextField, { ...params, size: "small", label: t('modal.cases.add_item.type'), sx: { minWidth: '175px' } })) }), _jsx(TextField, { size: "small", label: t('modal.cases.add_item.title'), value: title, onChange: ev => setTitle(ev.target.value), fullWidth: true, autoFocus: true })] }), itemType.value === 'reference' && (_jsx(TextField, { size: "small", label: t('modal.cases.add_item.url'), value: value, onChange: ev => setValue(ev.target.value), fullWidth: true, placeholder: "https://example.com" })), itemType.value === 'markdown' && (_jsx(Box, { sx: { border: 'thin solid', borderColor: theme.palette.divider }, children: _jsx(ThemedEditor, { id: "add-item-markdown", height: "240px", width: "100%", language: "markdown", theme: theme.palette.mode === 'light' ? 'howler' : 'howler-dark', value: value, onChange: content => setValue(content ?? ''), options: {} }) })), folderOptions.length > 0 && (_jsx(Autocomplete, { options: folderOptions, getOptionLabel: opt => opt.label, isOptionEqualToValue: (opt, val) => opt.id === val.id, value: folderOptions.find(f => f.id === selectedParent) ?? null, disablePortal: true, onChange: (_ev, newVal) => setSelectedParent(newVal?.id ?? null), renderInput: params => (_jsx(TextField, { ...params, size: "small", label: t('modal.cases.add_item.folder'), placeholder: t('modal.cases.add_item.root'), fullWidth: true })) })), _jsxs(Stack, { direction: "row", spacing: 1, alignSelf: "end", children: [_jsx(Button, { variant: "outlined", color: "error", onClick: close, disabled: submitting, children: t('cancel') }), _jsx(Button, { variant: "outlined", color: "success", disabled: !isValid || submitting, startIcon: submitting ? _jsx(CircularProgress, { size: 16, color: "inherit" }) : undefined, onClick: onSubmit, children: t('confirm') })] })] }));
70
+ }, options: ITEM_TYPES, getOptionLabel: opt => t(opt.labelKey), isOptionEqualToValue: (option, choice) => option.value === choice.value, disablePortal: true, disableClearable: true, renderInput: params => (_jsx(TextField, { ...params, size: "small", label: t('modal.cases.add_item.type'), sx: { minWidth: '175px' } })) }), _jsx(TextField, { size: "small", label: t('modal.cases.add_item.title'), value: title, onChange: ev => setTitle(ev.target.value), fullWidth: true })] }), itemType.value === 'reference' && (_jsx(TextField, { size: "small", label: t('modal.cases.add_item.url'), value: value, onChange: ev => setValue(ev.target.value), fullWidth: true, placeholder: "https://example.com" })), itemType.value === 'markdown' && (_jsx(Box, { sx: { border: 'thin solid', borderColor: theme.palette.divider }, children: _jsx(ThemedEditor, { id: "add-item-markdown", height: "240px", width: "100%", language: "markdown", theme: theme.palette.mode === 'light' ? 'howler' : 'howler-dark', value: value, onChange: content => setValue(content ?? ''), options: {} }) })), folderOptions.length > 0 && (_jsx(Autocomplete, { options: folderOptions, getOptionLabel: opt => opt.label, isOptionEqualToValue: (opt, val) => opt.id === val.id, value: folderOptions.find(f => f.id === selectedParent) ?? null, disablePortal: true, onChange: (_ev, newVal) => setSelectedParent(newVal?.id ?? null), renderInput: params => (_jsx(TextField, { ...params, size: "small", label: t('modal.cases.add_item.folder'), placeholder: t('modal.cases.add_item.root'), fullWidth: true })) })), _jsxs(Stack, { direction: "row", spacing: 1, alignSelf: "end", children: [_jsx(Button, { variant: "outlined", color: "error", onClick: close, disabled: submitting, children: t('cancel') }), _jsx(Button, { variant: "outlined", color: "success", disabled: !isValid || submitting, startIcon: submitting ? _jsx(CircularProgress, { size: 16, color: "inherit" }) : undefined, onClick: onSubmit, children: t('confirm') })] })] }));
71
71
  };
72
72
  export default AddToCaseModal;
@@ -1,4 +1,4 @@
1
- import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
1
+ import { Fragment as _Fragment, jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
2
  import { Autocomplete, Button, CircularProgress, Divider, Stack, TextField, Typography } from '@mui/material';
3
3
  import api from '@cccsaurora/howler-ui/api';
4
4
  import { ModalContext } from '@cccsaurora/howler-ui/components/app/providers/ModalProvider';
@@ -35,9 +35,9 @@ const RenameItemModal = ({ _case, item, onRenamed }) => {
35
35
  setSubmitting(false);
36
36
  }
37
37
  };
38
- return (_jsxs(Stack, { spacing: 2, p: 2, sx: { minWidth: 'min(600px, 60vw)' }, children: [_jsx(Typography, { variant: "h4", children: t('modal.cases.rename_item') }), _jsx(TextField, { size: "small", label: t('modal.cases.rename_item.new_name'), value: name, onChange: ev => setName(ev.target.value), error: !!nameError, helperText: nameError ?? ' ', fullWidth: true, autoFocus: true, onKeyDown: ev => {
38
+ return (_jsxs(Stack, { spacing: 2, p: 2, sx: { minWidth: 'min(600px, 60vw)' }, children: [_jsx(Typography, { variant: "h4", children: t('modal.cases.rename_item') }), _jsx(TextField, { size: "small", label: t('modal.cases.rename_item.new_name'), value: name, onChange: ev => setName(ev.target.value), error: !!nameError, helperText: nameError ?? ' ', fullWidth: true, onKeyDown: ev => {
39
39
  if (ev.key === 'Enter' && isValid && !submitting) {
40
- onSubmit();
40
+ void onSubmit();
41
41
  }
42
42
  } }), _jsxs(Stack, { direction: "row", justifyContent: "flex-end", spacing: 1, children: [_jsx(Button, { onClick: close, color: "error", variant: "outlined", disabled: submitting, children: t('button.cancel') }), _jsx(Button, { onClick: onSubmit, color: "success", variant: "outlined", disabled: !isValid || submitting, startIcon: submitting ? _jsx(CircularProgress, { size: 16, color: "inherit" }) : undefined, children: t('button.confirm') })] })] }));
43
43
  };
@@ -98,7 +98,7 @@ const ResolveModal = ({ case: _case, onConfirm }) => {
98
98
  });
99
99
  }, []);
100
100
  useEffect(() => {
101
- (async () => {
101
+ void (async () => {
102
102
  try {
103
103
  const result = await dispatchApi(api.search.hit.post({
104
104
  query: `howler.id:(${hitIds.join(' OR ')})`,
@@ -4,4 +4,4 @@ import type { Hit } from '@cccsaurora/howler-ui/models/entities/generated/Hit';
4
4
  import type { FolderOption, RecordEntry } from './types';
5
5
  export declare const defaultTitle: (record: Hit | Event) => string;
6
6
  export declare const useFolderOptions: (selectedCase: Case | null) => FolderOption[];
7
- export declare const useRecordEntries: (records: (Hit | Event)[]) => readonly [RecordEntry[], (index: number, field: "name" | "parent", value: string | null) => void];
7
+ export declare const useRecordEntries: (records: (Hit | Event)[]) => readonly [RecordEntry[], (index: number, field: 'name' | 'parent', value: string | null) => void];
@@ -146,7 +146,7 @@ const DossierEditor = () => {
146
146
  return;
147
147
  }
148
148
  setLoading(true);
149
- dispatchApi(api.dossier.get(params.id))
149
+ void dispatchApi(api.dossier.get(params.id))
150
150
  .then(_dossier => {
151
151
  setOriginalDossier(_dossier);
152
152
  setDossier(_dossier);
@@ -158,7 +158,7 @@ const DossierEditor = () => {
158
158
  return;
159
159
  }
160
160
  setQuery(dossier.query);
161
- (async () => {
161
+ void (async () => {
162
162
  setLoading(true);
163
163
  try {
164
164
  const result = await dispatchApi(api.search.hit.post({ query: dossier.query, rows: 0 }));
@@ -273,7 +273,7 @@ describe('DossierEditor', () => {
273
273
  const titleInput = screen.getByTestId('dossier-title');
274
274
  await user.type(titleInput, 'Test Title');
275
275
  const queryInput = screen.getByTestId('query-input');
276
- user.click(queryInput);
276
+ void user.click(queryInput);
277
277
  await user.keyboard('test query');
278
278
  await user.keyboard('{Enter}');
279
279
  await waitFor(() => {
@@ -49,7 +49,7 @@ const DossiersBase = () => {
49
49
  offset
50
50
  });
51
51
  }
52
- catch (e) {
52
+ catch {
53
53
  setHasError(true);
54
54
  }
55
55
  finally {
@@ -93,7 +93,7 @@ const DossiersBase = () => {
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 DossiersBase = () => {
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]);
@@ -1,4 +1,4 @@
1
- import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
1
+ import { Fragment as _Fragment, jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
2
  import { Icon, iconExists } from '@iconify/react';
3
3
  import { Add, Delete, OpenInNew, Remove } from '@mui/icons-material';
4
4
  import { Alert, Autocomplete, Button, Divider, IconButton, Paper, Stack, Tab, Tabs, TextField, Typography, useTheme } from '@mui/material';
@@ -13,9 +13,7 @@ import { useSearchParams } from 'react-router-dom';
13
13
  const LinkForm = ({ pivot, update }) => {
14
14
  const { t } = useTranslation();
15
15
  const { config } = useContext(ApiConfigContext);
16
- return (_jsxs(_Fragment, { children: [_jsx(TextField, { size: "small", label: t('route.dossiers.manager.pivot.value'), disabled: !pivot, value: pivot?.value ?? '', fullWidth: true, onChange: ev => update({ value: ev.target.value }) }), _jsx(Divider, { flexItem: true }), _jsx(Typography, { children: t('route.dossiers.manager.pivot.mappings') }), pivot?.mappings?.map((_mapping, index) => (
17
- // eslint-disable-next-line react/no-array-index-key
18
- _jsxs(Fragment, { children: [_jsxs(Stack, { direction: "row", spacing: 1, children: [_jsx(TextField, { size: "small", label: t('route.dossiers.manager.pivot.mapping.key'), disabled: !pivot, value: _mapping?.key ?? '', onChange: ev => update({
16
+ return (_jsxs(_Fragment, { children: [_jsx(TextField, { size: "small", label: t('route.dossiers.manager.pivot.value'), disabled: !pivot, value: pivot?.value ?? '', fullWidth: true, onChange: ev => update({ value: ev.target.value }) }), _jsx(Divider, { flexItem: true }), _jsx(Typography, { children: t('route.dossiers.manager.pivot.mappings') }), pivot?.mappings?.map((_mapping, index) => (_jsxs(Fragment, { children: [_jsxs(Stack, { direction: "row", spacing: 1, children: [_jsx(TextField, { size: "small", label: t('route.dossiers.manager.pivot.mapping.key'), disabled: !pivot, value: _mapping?.key ?? '', onChange: ev => update({
19
17
  mappings: pivot.mappings.map((_m, _index) => index === _index ? { ..._m, key: ev.target.value } : _m)
20
18
  }) }), _jsx(Autocomplete, { fullWidth: true, disabled: !pivot, options: ['custom', ...Object.keys(config.indexes.hit)], renderInput: params => (_jsx(TextField, { ...params, size: "small", fullWidth: true, label: t('route.dossiers.manager.pivot.mapping.field'), sx: { minWidth: '150px' } })), getOptionLabel: opt => t(opt), value: _mapping.field ?? '', onChange: (_ev, field) => update({
21
19
  mappings: pivot.mappings.map((_m, _index) => (index === _index ? { ..._m, field } : _m))
@@ -14,7 +14,7 @@ const EventViewer = ({ event: provided, eventId }) => {
14
14
  }, [provided]);
15
15
  useEffect(() => {
16
16
  if (eventId) {
17
- dispatchApi(api.v2.search.post('event', { query: `howler.id:${eventId}`, rows: 1 }), {
17
+ void dispatchApi(api.v2.search.post('event', { query: `howler.id:${eventId}`, rows: 1 }), {
18
18
  throwError: false
19
19
  }).then(res => setEvent(res.items[0]));
20
20
  }
@@ -25,7 +25,7 @@ const ApiDocumentation = () => {
25
25
  const isLg = useMediaQuery(theme.breakpoints.down('lg'));
26
26
  const [data, setData] = useState(null);
27
27
  useEffect(() => {
28
- dispatchApi(api.help.get()).then(setData);
28
+ void dispatchApi(api.help.get()).then(setData);
29
29
  }, [dispatchApi]);
30
30
  if (!data) {
31
31
  return (_jsx(PageCenter, { margin: 4, maxWidth: "1750px", width: "100%", textAlign: "left", children: t('loading') }));
@@ -1,4 +1,4 @@
1
- import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-runtime";
1
+ import { Fragment as _Fragment, jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
2
  import { CardContent, Divider, Typography } from '@mui/material';
3
3
  import HowlerCard from '@cccsaurora/howler-ui/components/elements/display/HowlerCard';
4
4
  import JSONViewer from '@cccsaurora/howler-ui/components/elements/display/json/JSONViewer';
@@ -1,4 +1,4 @@
1
- import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
1
+ import { Fragment as _Fragment, jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
2
  import { Clear } from '@mui/icons-material';
3
3
  import { Alert, AlertTitle, Box, Chip, IconButton, InputAdornment, Stack, Table, TableBody, TableCell, TableHead, TableRow, TextField, Typography, useTheme } from '@mui/material';
4
4
  import Markdown from '@cccsaurora/howler-ui/components/elements/display/Markdown';
@@ -1,4 +1,4 @@
1
- import { jsxs as _jsxs, jsx as _jsx } from "react/jsx-runtime";
1
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
2
  import PageCenter from '@cccsaurora/howler-ui/commons/components/pages/PageCenter';
3
3
  import Markdown from '@cccsaurora/howler-ui/components/elements/display/Markdown';
4
4
  import { useScrollRestoration } from '@cccsaurora/howler-ui/components/hooks/useScrollRestoration';
@@ -25,7 +25,7 @@ const RetentionDocumentation = () => {
25
25
  return modifyDocumentation(original, howlerPluginStore, pluginStore);
26
26
  }, [i18n.language, pluginStore]);
27
27
  useEffect(() => {
28
- api.search.hit
28
+ void api.search.hit
29
29
  .post({
30
30
  query: 'howler.id:*',
31
31
  sort: 'event.created asc',
@@ -1,4 +1,4 @@
1
- import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
1
+ import { Fragment as _Fragment, jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
2
  import { ExpandMore } from '@mui/icons-material';
3
3
  import { Accordion, AccordionDetails, AccordionSummary, Box, Card, Chip, emphasize, Stack, styled, Tab, Table, TableBody, TableCell, TableHead, TableRow, Typography, useMediaQuery, useTheme } from '@mui/material';
4
4
  import { useAppBar, useAppLayout, useAppUser } from '@cccsaurora/howler-ui/commons/components/app/hooks';
@@ -1,4 +1,4 @@
1
- import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
1
+ import { Fragment as _Fragment, jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
2
  import { Clear, Code, Comment, DataObject, History, LinkSharp, OpenInNew, QueryStats } from '@mui/icons-material';
3
3
  import { Badge, Box, Divider, IconButton, Skeleton, Stack, Tab, Tabs, Tooltip, useTheme } from '@mui/material';
4
4
  import TuiIconButton from '@cccsaurora/howler-ui/components/elements/addons/buttons/CustomIconButton';
@@ -68,7 +68,7 @@ const InformationPane = ({ onClose, selected: _selected }) => {
68
68
  }
69
69
  if (!record?.howler.data) {
70
70
  setLoading(true);
71
- getRecord(selected, true).finally(() => setLoading(false));
71
+ void getRecord(selected, true).finally(() => setLoading(false));
72
72
  return;
73
73
  }
74
74
  setUserIds(getUserList(record));
@@ -83,17 +83,17 @@ const InformationPane = ({ onClose, selected: _selected }) => {
83
83
  }, [selected]);
84
84
  useEffect(() => {
85
85
  if (isHit(record) && !analytic) {
86
- getMatchingAnalytic(record).then(setAnalytic);
86
+ void getMatchingAnalytic(record).then(setAnalytic);
87
87
  }
88
88
  }, [analytic, getMatchingAnalytic, record]);
89
89
  useEffect(() => {
90
90
  if (isHit(record) && !_dossiers) {
91
- getMatchingDossiers(record).then(setDossiers);
91
+ void getMatchingDossiers(record).then(setDossiers);
92
92
  }
93
93
  }, [_dossiers, getMatchingDossiers, record]);
94
94
  useEffect(() => {
95
95
  if (isHit(record)) {
96
- getMatchingOverview(record).then(_overview => setHasOverview(!!_overview));
96
+ void getMatchingOverview(record).then(_overview => setHasOverview(!!_overview));
97
97
  }
98
98
  }, [getMatchingOverview, record]);
99
99
  useEffect(() => {
@@ -1,4 +1,4 @@
1
- import { jsxs as _jsxs, jsx as _jsx } from "react/jsx-runtime";
1
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
2
  import { render, screen, waitFor } from '@testing-library/react';
3
3
  import userEvent, {} from '@testing-library/user-event';
4
4
  import { act } from 'react';
@@ -249,16 +249,15 @@ describe('QuerySettings', () => {
249
249
  expect(screen.getByLabelText(i18n.t('hit.search.filter.add'))).toBeInTheDocument();
250
250
  expect(screen.getByLabelText(i18n.t('hit.search.view.add'))).toBeInTheDocument();
251
251
  });
252
- it('should allow multiple clicks to add multiple filters', async () => {
252
+ it('should close after adding a filter', async () => {
253
253
  render(_jsx(QuerySettings, {}), { wrapper: Wrapper });
254
254
  const chipButton = screen.getByRole('button');
255
255
  await user.click(chipButton);
256
256
  const addFilterButton = screen.getByLabelText(i18n.t('hit.search.filter.add'));
257
257
  await user.click(addFilterButton);
258
- await user.click(addFilterButton);
259
- await user.click(addFilterButton);
260
- expect(mockAddFilter).toHaveBeenCalledTimes(3);
258
+ expect(mockAddFilter).toHaveBeenCalledTimes(1);
261
259
  expect(mockAddFilter).toHaveBeenCalledWith('howler.assessment:*');
260
+ await waitFor(() => expect(screen.queryByLabelText(i18n.t('hit.search.filter.add'))).not.toBeInTheDocument());
262
261
  });
263
262
  });
264
263
  describe('Grid Layout', () => {
@@ -56,7 +56,7 @@ const HitBrowser = () => {
56
56
  return false;
57
57
  }, [selected, selectedHits]);
58
58
  useEffect(() => {
59
- fetchViews(selectedViews);
59
+ void fetchViews(selectedViews);
60
60
  // eslint-disable-next-line react-hooks/exhaustive-deps
61
61
  }, [location.pathname, location.search]);
62
62
  const onClose = useCallback(() => {
@@ -26,7 +26,7 @@ const ViewLink = ({ id, viewId }) => {
26
26
  const [view, setView] = useState(null);
27
27
  useEffect(() => {
28
28
  setLoading(true);
29
- getCurrentViews({ views: [viewId], ignoreParams: true })
29
+ void getCurrentViews({ views: [viewId], ignoreParams: true })
30
30
  .then(result => setView(result[0]))
31
31
  .finally(() => setLoading(false));
32
32
  }, [getCurrentViews, viewId]);
@@ -16,7 +16,7 @@ const CustomSort = () => {
16
16
  const setSavedSort = useContextSelector(ParameterContext, ctx => ctx.setSort);
17
17
  const sortFields = useMemo(() => sortEntries.map(entry => entry.split(' ').slice(0, 2)), [sortEntries]);
18
18
  useEffect(() => {
19
- getHitFields();
19
+ void getHitFields();
20
20
  }, [getHitFields]);
21
21
  useEffect(() => {
22
22
  if (!sort) {
@@ -1,5 +1,5 @@
1
1
  declare const _default: import("react").NamedExoticComponent<{
2
- size?: "small" | "medium";
2
+ size?: 'small' | 'medium';
3
3
  id: number;
4
4
  value: string;
5
5
  }>;
@@ -1,4 +1,4 @@
1
1
  declare const _default: import("react").NamedExoticComponent<{
2
- size?: "small" | "medium";
2
+ size?: 'small' | 'medium';
3
3
  }>;
4
4
  export default _default;
@@ -57,7 +57,7 @@ const HitSort = ({ size = 'small' }) => {
57
57
  if (location.search.includes('sort')) {
58
58
  return;
59
59
  }
60
- (async () => {
60
+ void (async () => {
61
61
  const selectedViewSort = (await getCurrentViews({ lazy: true })).find(view => view?.sort)?.sort;
62
62
  if (selectedViewSort && !location.search.includes('sort')) {
63
63
  setSavedSort(selectedViewSort);
@@ -1,5 +1,5 @@
1
1
  declare const _default: import("react").NamedExoticComponent<{
2
2
  omitCustom?: boolean;
3
- size?: "small" | "medium";
3
+ size?: 'small' | 'medium';
4
4
  }>;
5
5
  export default _default;
@@ -34,7 +34,7 @@ const SearchSpan = ({ omitCustom = false, size }) => {
34
34
  if (location.search.includes('span')) {
35
35
  return;
36
36
  }
37
- (async () => {
37
+ void (async () => {
38
38
  const selectedViewSpan = (await getCurrentViews({ lazy: true })).find(view => view?.span)?.span;
39
39
  if (!selectedViewSpan) {
40
40
  return;
@@ -72,11 +72,11 @@ const HitViewer = () => {
72
72
  }
73
73
  }, [isUnderLg, setOrientation]);
74
74
  useEffect(() => {
75
- fetchData();
75
+ void fetchData();
76
76
  }, [params.id, fetchData, hit]);
77
77
  const onOrientationChange = useCallback(() => setOrientation(orientation === Orientation.VERTICAL ? Orientation.HORIZONTAL : Orientation.VERTICAL), [orientation, setOrientation]);
78
78
  useEffect(() => {
79
- getMatchingOverview(hit).then(_overview => setHasOverview(!!_overview));
79
+ void getMatchingOverview(hit).then(_overview => setHasOverview(!!_overview));
80
80
  }, [getMatchingOverview, hit]);
81
81
  useEffect(() => {
82
82
  if (hasOverview && tab === 'details') {
@@ -110,7 +110,7 @@ const HitViewer = () => {
110
110
  if (!hit) {
111
111
  return;
112
112
  }
113
- getMatchingDossiers(hit).then(setDossiers);
113
+ void getMatchingDossiers(hit).then(setDossiers);
114
114
  }, [getMatchingDossiers, hit]);
115
115
  if (!hit) {
116
116
  return (_jsx(PageCenter, { children: _jsx(Skeleton, { variant: "rounded", height: "520px" }) }));
@@ -1,5 +1,5 @@
1
1
  import { createElement as _createElement } from "react";
2
- import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
2
+ import { Fragment as _Fragment, jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
3
3
  import { Check } from '@mui/icons-material';
4
4
  import { Autocomplete, Box, Card, CardContent, CardHeader, Divider, FormControl, Grid, InputLabel, MenuItem, Select, Slider, Stack, TextField, Typography } from '@mui/material';
5
5
  import api from '@cccsaurora/howler-ui/api';
@@ -61,7 +61,7 @@ const AddNewCard = ({ dashboard, addCard }) => {
61
61
  setAnalyticsLoading(false);
62
62
  };
63
63
  useEffect(() => {
64
- fetchAllAnalytics();
64
+ void fetchAllAnalytics();
65
65
  }, []);
66
66
  const filteredAnalyticVisualizations = useMemo(() => {
67
67
  const existingAnalyticCards = dashboard.filter(_card => _card.type === 'analytic');
@@ -17,7 +17,7 @@ const AnalyticCard = ({ analyticId, type }) => {
17
17
  const { getAnalyticFromId } = useContext(AnalyticContext);
18
18
  const chartRef = useRef();
19
19
  useEffect(() => {
20
- getAnalyticFromId(analyticId).then(setAnalytic);
20
+ void getAnalyticFromId(analyticId).then(setAnalytic);
21
21
  }, [analyticId, getAnalyticFromId]);
22
22
  return (_jsx(Card, { variant: "outlined", sx: { height: '100%' }, children: _jsxs(CardContent, { sx: { height: '100%' }, children: [_jsxs(Stack, { direction: "row", spacing: 1, alignItems: "center", children: [_jsx(Typography, { variant: "h6", children: analytic?.name ?? _jsx(Skeleton, { variant: "text", height: "2em", width: "100px" }) }), _jsx(IconButton, { size: "small", component: Link, to: `/analytics/${analytic?.analytic_id}`, children: _jsx(OpenInNew, { fontSize: "small" }) }), _jsx(FlexOne, {}), !['assessment', 'escalation'].includes(type) && (_jsx(Tooltip, { title: t('hit.summary.zoom.reset'), children: _jsx(IconButton, { onClick: () => chartRef.current?.resetZoom(), children: _jsx(CenterFocusWeak, {}) }) }))] }), {
23
23
  assessment: () => _jsx(Assessment, { ref: chartRef, analytic: analytic }),