@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
@@ -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 { useSortable } from '@dnd-kit/sortable';
3
3
  import { CSS } from '@dnd-kit/utilities';
4
4
  import { Delete } from '@mui/icons-material';
@@ -1,4 +1,4 @@
1
- import { 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 { Edit, Settings } from '@mui/icons-material';
3
3
  import { FormControl, FormLabel, IconButton, ListItemIcon, Menu, MenuItem, Slider, Tooltip } from '@mui/material';
4
4
  import { useState } from 'react';
@@ -1,4 +1,4 @@
1
- import { 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 { OpenInNew } from '@mui/icons-material';
3
3
  import { Card, CardContent, IconButton, Skeleton, Stack, Typography } from '@mui/material';
4
4
  import api from '@cccsaurora/howler-ui/api';
@@ -104,24 +104,24 @@ const ViewCard = ({ viewId, limit, refreshTick, onRefreshComplete }) => {
104
104
  clearTimeout(debounceTimerRef.current);
105
105
  }
106
106
  debounceTimerRef.current = setTimeout(() => {
107
- refreshView();
107
+ void refreshView();
108
108
  }, DEBOUNCE_TIME);
109
109
  }, [refreshView]);
110
110
  useEffect(() => {
111
111
  if (refreshTick) {
112
- refreshView();
112
+ void refreshView();
113
113
  }
114
114
  // eslint-disable-next-line react-hooks/exhaustive-deps
115
115
  }, [refreshTick]);
116
116
  useEffect(() => {
117
- fetchViews([viewId]);
117
+ void fetchViews([viewId]);
118
118
  }, [fetchViews, viewId]);
119
119
  useEffect(() => {
120
120
  if (!view?.query) {
121
121
  return;
122
122
  }
123
123
  const loadingTimeout = setTimeout(() => setLoading(true), 200);
124
- refreshView().finally(() => {
124
+ void refreshView().finally(() => {
125
125
  clearTimeout(loadingTimeout);
126
126
  setLoading(false);
127
127
  });
@@ -70,7 +70,7 @@ const Home = () => {
70
70
  clearTimeout(debounceTimerRef.current);
71
71
  }
72
72
  debounceTimerRef.current = setTimeout(() => {
73
- setRefreshRateBackend(newRate);
73
+ void setRefreshRateBackend(newRate);
74
74
  }, 500);
75
75
  }, [setRefreshRateBackend, setUser]);
76
76
  const handleRefresh = useCallback(() => {
@@ -103,7 +103,7 @@ const Home = () => {
103
103
  }
104
104
  }, [dashboard, getIdFromEntry, setLocalDashboard]);
105
105
  useEffect(() => {
106
- api.search.hit
106
+ void api.search.hit
107
107
  .post({
108
108
  query: updateQuery,
109
109
  rows: 0
@@ -1,4 +1,4 @@
1
- import { 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 { Delete } from '@mui/icons-material';
3
3
  import { Card, IconButton, Stack, Tooltip, Typography } from '@mui/material';
4
4
  import FlexOne from '@cccsaurora/howler-ui/components/elements/addons/layout/FlexOne';
@@ -44,7 +44,7 @@ const OverviewViewer = () => {
44
44
  const wrapper = useRef();
45
45
  const startingTemplate = useStartingTemplate();
46
46
  useEffect(() => {
47
- (async () => {
47
+ void (async () => {
48
48
  setLoading(true);
49
49
  try {
50
50
  setOverviewList(await getOverviews(true));
@@ -75,7 +75,7 @@ const OverviewViewer = () => {
75
75
  }
76
76
  }, [analytic, analytics, detection]);
77
77
  useEffect(() => {
78
- (async () => {
78
+ void (async () => {
79
79
  const result = await dispatchApi(api.search.hit.post({
80
80
  query: `howler.analytic:"${sanitizeLuceneQuery(analytic)}"` +
81
81
  (!!detection && detection !== 'ANY' ? ` AND howler.detection:"${sanitizeLuceneQuery(detection)}"` : ''),
@@ -184,7 +184,7 @@ const OverviewViewer = () => {
184
184
  return (_jsxs(PageCenter, { maxWidth: "100%", width: "100%", textAlign: "left", height: "100%", children: [_jsx(LinearProgress, { sx: { mb: 1, opacity: +loading } }), _jsxs(Stack, { direction: "column", spacing: 2, divider: _jsx(Divider, { orientation: "horizontal", flexItem: true }), height: "100%", children: [_jsxs(Stack, { direction: "row", spacing: 2, mb: 2, alignItems: "stretch", children: [_jsx(FormControl, { sx: { maxWidth: { sm: '300px', lg: '450px' }, width: '100%' }, children: _jsx(Autocomplete, { id: "analytic", options: analytics.sort((a, b) => a.name.toLowerCase().localeCompare(b.name.toLowerCase())), getOptionLabel: option => option.name, value: analytics.find(a => a.name === analytic) || null, onChange: (_event, newValue) => setAnalytic(newValue ? newValue.name : ''), renderInput: autocompleteAnalyticParams => (_jsx(TextField, { ...autocompleteAnalyticParams, label: t('route.overviews.analytic'), size: "small" })) }) }), _jsx(FormControl, { sx: { minWidth: { sm: '200px' } }, disabled: !analytic, children: _jsx(Autocomplete, { id: "detection", options: ['ANY', ...detections.sort()], getOptionLabel: option => option, value: detection ?? '', onChange: (_event, newValue) => setDetection(newValue), renderInput: autocompleteDetectionParams => (_jsx(TextField, { ...autocompleteDetectionParams, label: t('route.overviews.detection'), size: "small" })) }) }), selectedOverview && (_jsx(Button, { variant: "outlined", startIcon: _jsx(Delete, {}), onClick: onDelete, children: t('button.delete') })), _jsx(Button, { variant: "outlined", disabled: analyticOrDetectionMissing || noChange, startIcon: overviewLoading ? _jsx(CircularProgress, { size: 16 }) : _jsx(Check, {}), onClick: onSave, children: t(!analyticOrDetectionMissing && !noChange ? 'button.save' : 'button.saved') }), _jsx("div", { style: { flex: 1 } }), _jsxs(ToggleButtonGroup, { exclusive: true, value: chosenTheme, onChange: (_event, value) => setChosenTheme(value), sx: { maxHeight: '40px' }, children: [_jsx(Tooltip, { title: t('route.overviews.theme.light'), children: _jsx(ToggleButton, { value: "light", children: _jsx(WbSunny, {}) }) }), _jsx(Tooltip, { title: t('route.overviews.theme.dark'), children: _jsx(ToggleButton, { value: "dark", children: _jsx(DarkMode, {}) }) })] })] }), analyticOrDetectionMissing ? (_jsx(AppInfoPanel, { i18nKey: "route.overviews.select", sx: { width: '100%', alignSelf: 'start' } })) : (_jsxs(Stack, { ref: wrapper, direction: "row", spacing: 1, height: "100%", onKeyDown: e => {
185
185
  if (e.ctrlKey && e.key === 's') {
186
186
  if (!noChange) {
187
- onSave();
187
+ void onSave();
188
188
  }
189
189
  e.preventDefault();
190
190
  }
@@ -49,7 +49,7 @@ const OverviewsBase = () => {
49
49
  offset
50
50
  });
51
51
  }
52
- catch (e) {
52
+ catch {
53
53
  setHasError(true);
54
54
  }
55
55
  finally {
@@ -93,7 +93,7 @@ const OverviewsBase = () => {
93
93
  });
94
94
  }, [dispatchApi, remove, withConfirmDeleteModal, showSuccessMessage, t]);
95
95
  useEffect(() => {
96
- onSearch();
96
+ void onSearch();
97
97
  if (!searchParams.has('offset')) {
98
98
  searchParams.set('offset', '0');
99
99
  setSearchParams(searchParams, { replace: true });
@@ -109,7 +109,7 @@ const OverviewsBase = () => {
109
109
  }, [offset, response?.total, searchParams, setSearchParams]);
110
110
  useEffect(() => {
111
111
  if (!loading) {
112
- onSearch();
112
+ void onSearch();
113
113
  }
114
114
  // eslint-disable-next-line react-hooks/exhaustive-deps
115
115
  }, [offset]);
@@ -33,8 +33,8 @@ export const language = {
33
33
  defaultToken: '',
34
34
  tokenPostfix: '.md',
35
35
  // escape codes
36
- control: /[\\`*_\[\]{}()#+\-\.!]/,
37
- noncontrol: /[^\\`*_\[\]{}()#+\-\.!]/,
36
+ control: /[\\`*_[\]{}()#+\-.!]/,
37
+ noncontrol: /[^\\`*_[\]{}()#+\-.!]/,
38
38
  escapes: /\\(?:@control)/,
39
39
  // escape codes for javascript/CSS strings
40
40
  jsescapes: /\\(?:[btnfr\\"']|[0-7][0-7]?|[0-3][0-7]{2})/,
@@ -70,19 +70,19 @@ export const language = {
70
70
  // headers (with #)
71
71
  [/^(\s{0,3})(#+)((?:[^\\#]|@escapes)+)((?:#+)?)/, ['white', 'keyword', 'keyword', 'keyword']],
72
72
  // headers (with =)
73
- [/^\s*(=+|\-+)\s*$/, 'keyword'],
73
+ [/^\s*(=+|-+)\s*$/, 'keyword'],
74
74
  // headers (with ***)
75
75
  [/^\s*((\*[ ]?)+)\s*$/, 'meta.separator'],
76
76
  // quote
77
77
  [/^\s*>+/, 'comment'],
78
78
  // list (starting with * or number)
79
- [/^\s*([\*\-+:]|\d+\.)\s/, 'keyword'],
79
+ [/^\s*([*\-+:]|\d+\.)\s/, 'keyword'],
80
80
  // code block (4 spaces indent)
81
81
  [/^(\t|[ ]{4})[^ ].*$/, 'string'],
82
82
  // code block (3 tilde)
83
- [/^\s*~~~\s*((?:\w|[\/\-#])+)?\s*$/, { token: 'string', next: '@codeblock' }],
83
+ [/^\s*~~~\s*((?:\w|[/\-#])+)?\s*$/, { token: 'string', next: '@codeblock' }],
84
84
  // github style code blocks (with backticks and language)
85
- [/^\s*```\s*((?:\w|[\/\-#])+).*$/, { token: 'string', next: '@codeblockgh', nextEmbedded: '$1' }],
85
+ [/^\s*```\s*((?:\w|[/\-#])+).*$/, { token: 'string', next: '@codeblockgh', nextEmbedded: '$1' }],
86
86
  // github style code blocks (with backticks but no language)
87
87
  [/^\s*```\s*$/, { token: 'string', next: '@codeblock' }],
88
88
  // CCCS MODIFICATION
@@ -94,7 +94,7 @@ export const language = {
94
94
  handlebars: [
95
95
  [/"[^"]+"/, 'string'],
96
96
  [/[()]/, 'handlebars'],
97
- [/[\w\d\.]+/, 'variable'],
97
+ [/[\w\d.]+/, 'variable'],
98
98
  [
99
99
  /[#/\w]+/,
100
100
  {
@@ -109,13 +109,13 @@ export const language = {
109
109
  // CCCS MODIFICATION END
110
110
  table_header: [
111
111
  { include: '@table_common' },
112
- [/[^\|]+/, 'keyword.table.header'] // table header
112
+ [/[^|]+/, 'keyword.table.header'] // table header
113
113
  ],
114
114
  table_body: [{ include: '@table_common' }, { include: '@linecontent' }],
115
115
  table_common: [
116
- [/\s*[\-:]+\s*/, { token: 'keyword', switchTo: 'table_body' }], // header-divider
116
+ [/\s*[-:]+\s*/, { token: 'keyword', switchTo: 'table_body' }], // header-divider
117
117
  [/^\s*\|/, 'keyword.table.left'], // opening |
118
- [/^\s*[^\|]/, '@rematch', '@pop'], // exiting
118
+ [/^\s*[^|]/, '@rematch', '@pop'], // exiting
119
119
  [/^\s*$/, '@rematch', '@pop'], // exiting
120
120
  [
121
121
  /\|/,
@@ -149,7 +149,7 @@ export const language = {
149
149
  [/`/, { token: 'variable', next: '@codecontent' }],
150
150
  // links
151
151
  [/\{+[^}]+\}+/, 'string.target'],
152
- [/(!?\[)((?:[^\]\\]|@escapes)*)(\]\([^\)]+\))/, ['string.link', '', 'string.link']],
152
+ [/(!?\[)((?:[^\]\\]|@escapes)*)(\]\([^)]+\))/, ['string.link', '', 'string.link']],
153
153
  [/(!?\[)((?:[^\]\\]|@escapes)*)(\])/, 'string.link'],
154
154
  // or html
155
155
  { include: 'html' }
@@ -169,7 +169,7 @@ export const language = {
169
169
  // html tags
170
170
  [/<(\w+)\/>/, 'tag'],
171
171
  [
172
- /<(\w+)(\-|\w)*/,
172
+ /<(\w+)(-|\w)*/,
173
173
  {
174
174
  cases: {
175
175
  '@empty': { token: 'tag', next: '@tag.$1' },
@@ -177,14 +177,14 @@ export const language = {
177
177
  }
178
178
  }
179
179
  ],
180
- [/<\/(\w+)(\-|\w)*\s*>/, { token: 'tag' }],
180
+ [/<\/(\w+)(-|\w)*\s*>/, { token: 'tag' }],
181
181
  [/<!--/, 'comment', '@comment']
182
182
  ],
183
183
  comment: [
184
- [/[^<\-]+/, 'comment.content'],
184
+ [/[^<-]+/, 'comment.content'],
185
185
  [/-->/, 'comment', '@pop'],
186
186
  [/<!--/, 'comment.content.invalid'],
187
- [/[<\-]/, 'comment.content']
187
+ [/[<-]/, 'comment.content']
188
188
  ],
189
189
  // Almost full HTML tag matching, complete with embedded scripts & styles
190
190
  tag: [
@@ -1,4 +1,4 @@
1
- import { 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 { Add, Check, ChevronRight, Clear } from '@mui/icons-material';
3
3
  import { Chip, CircularProgress, Grid, TableCell, TableRow, Typography } from '@mui/material';
4
4
  import { ApiConfigContext } from '@cccsaurora/howler-ui/components/app/providers/ApiConfigProvider';
@@ -17,7 +17,7 @@ const ProfileSection = ({ user, editName, addRole, removeRole, viewGroups }) =>
17
17
  const [loadingGroups, setLoadingGroups] = useState(false);
18
18
  const wrapChange = useCallback(async (r, fn) => {
19
19
  const delayedLoad = delay(250);
20
- delayedLoad.then(() => {
20
+ void delayedLoad.then(() => {
21
21
  setLoading({
22
22
  ...loading,
23
23
  [r]: true
@@ -1,9 +1,10 @@
1
1
  import type { Hit } from '@cccsaurora/howler-ui/models/entities/generated/Hit';
2
- declare const _default: import("react").MemoExoticComponent<({ hit, fields, setFields, onRemove, onAdd }: {
2
+ declare const TemplateEditor: ({ hit, fields, setFields, onRemove, onAdd }: {
3
3
  hit: Hit;
4
4
  fields: string[];
5
5
  setFields: (displayFields: string[]) => void;
6
6
  onRemove: (field: string) => void;
7
7
  onAdd: (field: string) => void;
8
- }) => import("react/jsx-runtime").JSX.Element>;
8
+ }) => import("react/jsx-runtime").JSX.Element;
9
+ declare const _default: import("react").MemoExoticComponent<typeof TemplateEditor>;
9
10
  export default _default;
@@ -30,7 +30,7 @@ const TemplateEditor = ({ hit, fields, setFields, onRemove, onAdd }) => {
30
30
  }
31
31
  }, [tryAddField]);
32
32
  useEffect(() => {
33
- getHitFields().then(suggestionFields => setSuggestions(suggestionFields.map(f => f.key)));
33
+ void getHitFields().then(suggestionFields => setSuggestions(suggestionFields.map(f => f.key)));
34
34
  }, [getHitFields]);
35
35
  const handleDragEnd = useCallback((event) => {
36
36
  const { active, over } = event;
@@ -34,7 +34,7 @@ const TemplateViewer = () => {
34
34
  const [templateLoading, setTemplateLoading] = useState(false);
35
35
  useEffect(() => {
36
36
  setLoading(true);
37
- dispatchApi(api.search.analytic.post({ query: 'analytic_id:*', rows: 1000 }), {
37
+ void dispatchApi(api.search.analytic.post({ query: 'analytic_id:*', rows: 1000 }), {
38
38
  logError: false,
39
39
  showError: true,
40
40
  throwError: true
@@ -47,7 +47,7 @@ const TemplateViewer = () => {
47
47
  }
48
48
  setAnalytics(_analytics);
49
49
  });
50
- dispatchApi(api.template.get()).then(setTemplateList);
50
+ void dispatchApi(api.template.get()).then(setTemplateList);
51
51
  // eslint-disable-next-line react-hooks/exhaustive-deps
52
52
  }, [analytic, dispatchApi]);
53
53
  useEffect(() => {
@@ -55,7 +55,7 @@ const TemplateViewer = () => {
55
55
  return;
56
56
  }
57
57
  setLoading(true);
58
- dispatchApi(api.search.grouped.hit.post('howler.detection', {
58
+ void dispatchApi(api.search.grouped.hit.post('howler.detection', {
59
59
  limit: 0,
60
60
  query: `howler.analytic:"${sanitizeLuceneQuery(analytic)}"`
61
61
  }), {
@@ -53,7 +53,7 @@ const TemplatesBase = () => {
53
53
  offset
54
54
  });
55
55
  }
56
- catch (e) {
56
+ catch {
57
57
  setHasError(true);
58
58
  }
59
59
  finally {
@@ -87,7 +87,7 @@ const TemplatesBase = () => {
87
87
  }
88
88
  }, [offset, searchParams, setSearchParams, getSearchRequestData]);
89
89
  useEffect(() => {
90
- onSearch();
90
+ void onSearch();
91
91
  if (!searchParams.has('offset')) {
92
92
  searchParams.set('offset', '0');
93
93
  setSearchParams(searchParams, { replace: true });
@@ -103,7 +103,7 @@ const TemplatesBase = () => {
103
103
  }, [offset, response?.total, searchParams, setSearchParams]);
104
104
  useEffect(() => {
105
105
  if (!searching) {
106
- onSearch();
106
+ void onSearch();
107
107
  }
108
108
  // eslint-disable-next-line react-hooks/exhaustive-deps
109
109
  }, [offset]);
@@ -167,14 +167,14 @@ const ViewComposer = () => {
167
167
  useEffect(() => {
168
168
  // Only run initial search if we're NOT editing an existing view
169
169
  if (!routeParams.id) {
170
- search(query || DEFAULT_QUERY);
170
+ void search(query || DEFAULT_QUERY);
171
171
  }
172
172
  // eslint-disable-next-line react-hooks/exhaustive-deps
173
173
  }, [routeParams.id]);
174
174
  // We only run this when ancillary properties (i.e. filters, sorting) change
175
175
  useEffect(() => {
176
176
  if (query && !isLoadingView) {
177
- search(query);
177
+ void search(query);
178
178
  }
179
179
  // eslint-disable-next-line react-hooks/exhaustive-deps
180
180
  }, [sort, span, indexes, isLoadingView]);
@@ -182,7 +182,7 @@ const ViewComposer = () => {
182
182
  if (!routeParams.id) {
183
183
  return;
184
184
  }
185
- (async () => {
185
+ void (async () => {
186
186
  const viewToEdit = (await getCurrentViews({ views: [routeParams.id] }))[0];
187
187
  if (!viewToEdit) {
188
188
  setError('route.views.missing');
@@ -70,7 +70,7 @@ const ViewsBase = () => {
70
70
  offset
71
71
  });
72
72
  }
73
- catch (e) {
73
+ catch {
74
74
  setHasError(true);
75
75
  }
76
76
  finally {
@@ -175,7 +175,7 @@ const ViewsBase = () => {
175
175
  }, [offset, response?.total, searchParams, setSearchParams]);
176
176
  useEffect(() => {
177
177
  if (!searching) {
178
- onSearch();
178
+ void onSearch();
179
179
  }
180
180
  // eslint-disable-next-line react-hooks/exhaustive-deps
181
181
  }, [offset, favouritesOnly, type]);
package/i18n.js CHANGED
@@ -26,7 +26,7 @@ const resources = {
26
26
  }
27
27
  };
28
28
  const i18nInstance = createInstance();
29
- i18nInstance
29
+ void i18nInstance
30
30
  .use(LanguageDetector)
31
31
  .use(initReactI18next)
32
32
  .init({
package/index.d.ts CHANGED
@@ -1,3 +1,3 @@
1
- import '@fontsource/roboto';
1
+ import '@fontsource/roboto/index.css';
2
2
  import '@cccsaurora/howler-ui/i18n';
3
3
  import 'index.css';
package/index.js CHANGED
@@ -1,5 +1,5 @@
1
1
  import { jsx as _jsx } from "react/jsx-runtime";
2
- import '@fontsource/roboto';
2
+ import '@fontsource/roboto/index.css';
3
3
  import App from '@cccsaurora/howler-ui/components/app/App';
4
4
  import '@cccsaurora/howler-ui/i18n';
5
5
  import 'index.css';
package/package.json CHANGED
@@ -17,7 +17,7 @@
17
17
  "@dnd-kit/modifiers": "^7.0.0",
18
18
  "@dnd-kit/sortable": "^8.0.0",
19
19
  "@dnd-kit/utilities": "^3.2.2",
20
- "@fontsource/roboto": "^5.2.10",
20
+ "@fontsource/roboto": "^5.3.0",
21
21
  "@iconify/icons-logos": "^1.2.36",
22
22
  "@iconify/icons-simple-icons": "^1.2.74",
23
23
  "@iconify/react": "^4.1.1",
@@ -93,7 +93,7 @@
93
93
  "url": "https://github.com/CybercentreCanada/howler"
94
94
  },
95
95
  "type": "module",
96
- "version": "2.19.0-dev.1282",
96
+ "version": "2.19.0-dev.1295",
97
97
  "exports": {
98
98
  "./i18n": "./i18n.js",
99
99
  "./index.css": "./index.css",
@@ -1,4 +1,4 @@
1
- import { 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 { useClueFetcherSelector } from '@cccsaurora/clue-ui/hooks/selectors';
3
3
  import { Autocomplete, Divider, ListItemText, TextField, Typography } from '@mui/material';
4
4
  import { ApiConfigContext } from '@cccsaurora/howler-ui/components/app/providers/ApiConfigProvider';
@@ -1,4 +1,4 @@
1
- import { 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 { useClueActionsSelector, useClueEnrichSelector } from '@cccsaurora/clue-ui';
3
3
  import { adaptSchema } from '@cccsaurora/clue-ui/components/actions/form/schemaAdapter';
4
4
  import { materialCells, materialRenderers } from '@jsonforms/material-renderers';
@@ -69,7 +69,7 @@ const CluePivotForm = ({ pivot, update }) => {
69
69
  // Clone and adapt the action's parameter schema
70
70
  const clueAdaptedSchema = cloneDeep({
71
71
  ...adaptSchema(actions[value].params),
72
- ...(actions[value].extra_schema ?? {})
72
+ ...actions[value].extra_schema
73
73
  });
74
74
  // Enhance string properties with hit index options for better UX
75
75
  Object.entries(clueAdaptedSchema.properties).forEach(([key, prop]) => {
@@ -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
  /* eslint-disable no-console */
3
3
  import EnrichedTypography, {} from '@cccsaurora/clue-ui/components/EnrichedTypography';
4
4
  import Fetcher from '@cccsaurora/clue-ui/components/fetchers/Fetcher';
@@ -174,14 +174,14 @@ où clue_table_cells est un tableau avec les propriétés :
174
174
  return _jsx(TableCell, {}, col);
175
175
  }
176
176
  return (_jsxs(TableCell, { children: [enableClueActions && cell.clue_entity && (_jsx(ClueCheckbox, { value: cell.action_value ?? cell.value })), !!cell.clue_fetcher && !!cell.clue_type ? (_jsx(Fetcher, { slotProps: {
177
- image: { width: !!cell.fetcher_width ? cell.fetcher_width : 'fit-content' },
177
+ image: { width: cell.fetcher_width ? cell.fetcher_width : 'fit-content' },
178
178
  stack: {
179
179
  component: 'span',
180
- sx: !!cell.fetcher_width
180
+ sx: cell.fetcher_width
181
181
  ? { width: cell.fetcher_width, display: 'block' }
182
182
  : { width: 'fit-content' }
183
183
  }
184
- }, fetcherId: cell.clue_fetcher, value: cell.value, type: cell.clue_type })) : !!cell.clue_type ? (_jsx(MarkdownTypography, { slotProps: {
184
+ }, fetcherId: cell.clue_fetcher, value: cell.value, type: cell.clue_type })) : cell.clue_type ? (_jsx(MarkdownTypography, { slotProps: {
185
185
  stack: {
186
186
  component: 'span',
187
187
  sx: { width: 'fit-content' },
@@ -3,6 +3,7 @@ import type { PluginChipProps } from '@cccsaurora/howler-ui/components/elements/
3
3
  import type { PluginTypographyProps } from '@cccsaurora/howler-ui/components/elements/PluginTypography';
4
4
  import type { i18n as I18N } from 'i18next';
5
5
  import HowlerPlugin from '@cccsaurora/howler-ui/plugins/HowlerPlugin';
6
+ import useSetup from './setup';
6
7
  declare class CluePlugin extends HowlerPlugin {
7
8
  name: string;
8
9
  version: string;
@@ -12,7 +13,7 @@ declare class CluePlugin extends HowlerPlugin {
12
13
  provider(): import("react").FC<{
13
14
  children?: import("react").ReactNode | undefined;
14
15
  }>;
15
- setup(): () => void;
16
+ setup(): typeof useSetup;
16
17
  localization(i18nInstance: I18N): void;
17
18
  helpers(): HowlerHelper[];
18
19
  typography(_props: PluginTypographyProps): import("react/jsx-runtime").JSX.Element;
@@ -31,6 +31,7 @@ const { mockAxiosInstance, mockAxiosError, mockInterceptorResponseUse, intercept
31
31
  };
32
32
  });
33
33
  vi.mock('axios', () => ({
34
+ create: vi.fn(() => mockAxiosInstance),
34
35
  default: { create: vi.fn(() => mockAxiosInstance) },
35
36
  AxiosError: mockAxiosError
36
37
  }));
@@ -97,7 +97,7 @@ describe('Throttler', () => {
97
97
  it('does not invoke fn before the delay', async () => {
98
98
  const fn = vi.fn().mockResolvedValue('x');
99
99
  const t = new Throttler(100);
100
- t.delayAsync(fn);
100
+ void t.delayAsync(fn);
101
101
  expect(fn).not.toHaveBeenCalled();
102
102
  });
103
103
  it('resolves with the return value of fn', async () => {
@@ -124,7 +124,7 @@ describe('Throttler', () => {
124
124
  it('cancels the previous pending call when invoked again', async () => {
125
125
  const fn = vi.fn().mockResolvedValue(42);
126
126
  const t = new Throttler(100);
127
- t.delayAsync(fn);
127
+ void t.delayAsync(fn);
128
128
  vi.advanceTimersByTime(50);
129
129
  const second = t.delayAsync(fn);
130
130
  vi.advanceTimersByTime(100);
@@ -14,18 +14,18 @@ export declare const checkArgsAreFilled: (step: ActionOperationStep, values: str
14
14
  * @param context The values provided so far by the user
15
15
  * @returns a list of options matching the current context
16
16
  */
17
- export declare const getOptionsByContext: (options: ActionOperationStep["options"], arg: string, context: string) => string[];
17
+ export declare const getOptionsByContext: (options: ActionOperationStep['options'], arg: string, context: string) => string[];
18
18
  /**
19
19
  * Get a list of arguments to display based on the current context, using the current values supplied for the action entry.
20
20
  * @param args a complete list of all arguments in the action
21
21
  * @param values the current list of values provided by the user
22
22
  * @returns A list of arguments to display
23
23
  */
24
- export declare const getArgsByContext: (args: ActionOperationStep["args"], values: string) => string[];
24
+ export declare const getArgsByContext: (args: ActionOperationStep['args'], values: string) => string[];
25
25
  /**
26
26
  * Check to see if a given action has all the data necessary to execute successfully
27
27
  * @param data The user-provided data
28
28
  * @param action The action to validate
29
29
  * @returns whether the action is ready to execute
30
30
  */
31
- export declare const operationReady: (data: Operation["data_json"], action: ActionOperation) => boolean;
31
+ export declare const operationReady: (data: Operation['data_json'], action: ActionOperation) => boolean;