@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,7 +1,8 @@
1
1
  import type { HowlerUser } from '@cccsaurora/howler-ui/models/entities/HowlerUser';
2
2
  declare const useMyUserFunctions: () => {
3
3
  editName: (user: HowlerUser, name: string) => Promise<{
4
- name: string;
4
+ avatar?: string;
5
+ is_admin?: boolean;
5
6
  email: string;
6
7
  username: string;
7
8
  api_quota?: number;
@@ -16,15 +17,15 @@ declare const useMyUserFunctions: () => {
16
17
  favourite_analytics?: string[];
17
18
  dashboard?: {
18
19
  entry_id: string;
19
- type: "view" | "analytic";
20
+ type: 'view' | 'analytic';
20
21
  config: string;
21
22
  }[];
22
23
  refresh_rate?: number;
23
- avatar?: string;
24
- is_admin?: boolean;
24
+ name: string;
25
25
  }>;
26
26
  editQuota: (user: HowlerUser, quota: string) => Promise<{
27
- api_quota: number;
27
+ avatar?: string;
28
+ is_admin?: boolean;
28
29
  name: string;
29
30
  email: string;
30
31
  username: string;
@@ -39,16 +40,16 @@ declare const useMyUserFunctions: () => {
39
40
  favourite_analytics?: string[];
40
41
  dashboard?: {
41
42
  entry_id: string;
42
- type: "view" | "analytic";
43
+ type: 'view' | 'analytic';
43
44
  config: string;
44
45
  }[];
45
46
  refresh_rate?: number;
46
- avatar?: string;
47
- is_admin?: boolean;
47
+ api_quota: number;
48
48
  }>;
49
49
  editPassword: (new_pass: string) => Promise<void>;
50
50
  addRole: (user: HowlerUser, role: string) => Promise<{
51
- roles: string[];
51
+ avatar?: string;
52
+ is_admin?: boolean;
52
53
  name: string;
53
54
  email: string;
54
55
  username: string;
@@ -63,16 +64,16 @@ declare const useMyUserFunctions: () => {
63
64
  favourite_analytics?: string[];
64
65
  dashboard?: {
65
66
  entry_id: string;
66
- type: "view" | "analytic";
67
+ type: 'view' | 'analytic';
67
68
  config: string;
68
69
  }[];
69
70
  refresh_rate?: number;
70
- avatar?: string;
71
- is_admin?: boolean;
71
+ roles: string[];
72
72
  }>;
73
73
  addApiKey: () => void;
74
74
  removeRole: (user: HowlerUser, role: string) => Promise<{
75
- roles: string[];
75
+ avatar?: string;
76
+ is_admin?: boolean;
76
77
  name: string;
77
78
  email: string;
78
79
  username: string;
@@ -87,15 +88,15 @@ declare const useMyUserFunctions: () => {
87
88
  favourite_analytics?: string[];
88
89
  dashboard?: {
89
90
  entry_id: string;
90
- type: "view" | "analytic";
91
+ type: 'view' | 'analytic';
91
92
  config: string;
92
93
  }[];
93
94
  refresh_rate?: number;
94
- avatar?: string;
95
- is_admin?: boolean;
95
+ roles: string[];
96
96
  }>;
97
97
  removeApiKey: (user: HowlerUser, apiKey: [string, string[]]) => Promise<{
98
- apikeys: [string, string[], string][];
98
+ avatar?: string;
99
+ is_admin?: boolean;
99
100
  name: string;
100
101
  email: string;
101
102
  username: string;
@@ -110,15 +111,14 @@ declare const useMyUserFunctions: () => {
110
111
  favourite_analytics?: string[];
111
112
  dashboard?: {
112
113
  entry_id: string;
113
- type: "view" | "analytic";
114
+ type: 'view' | 'analytic';
114
115
  config: string;
115
116
  }[];
116
117
  refresh_rate?: number;
117
- avatar?: string;
118
- is_admin?: boolean;
118
+ apikeys: [string, string[], string][];
119
119
  }>;
120
120
  viewGroups: () => Promise<void>;
121
- setDashboard: (dashboard: HowlerUser["dashboard"]) => Promise<void>;
121
+ setDashboard: (dashboard: HowlerUser['dashboard']) => Promise<void>;
122
122
  setRefreshRate: (refresh_rate: number) => Promise<void>;
123
123
  };
124
124
  export default useMyUserFunctions;
@@ -17,7 +17,7 @@ const useRelatedRecords = (ids, enabled = true) => {
17
17
  }
18
18
  return;
19
19
  }
20
- (async () => {
20
+ void (async () => {
21
21
  const joined = ids.join(' OR ');
22
22
  const result = await dispatchApi(api.v2.search.post(['hit', 'event', 'case'], {
23
23
  query: `howler.id:(${joined}) OR case_id:(${joined})`
@@ -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 { Box, CircularProgress, Container, Stack, styled } from '@mui/material';
3
3
  import { useAppBanner } from '@cccsaurora/howler-ui/commons/components/app/hooks';
4
4
  import PageCardCentered from '@cccsaurora/howler-ui/commons/components/pages/PageCardCentered';
@@ -16,7 +16,7 @@ const OAuthLogin = ({ providers }) => {
16
16
  useEffect(() => {
17
17
  if (searchParams.get('code')) {
18
18
  setButtonLoading(true);
19
- doOAuth().finally(() => setButtonLoading(false));
19
+ void doOAuth().finally(() => setButtonLoading(false));
20
20
  }
21
21
  }, [doOAuth, searchParams]);
22
22
  const nonce = useMemo(() => Math.pow(Date.now(), 1 + Math.random()).toString(16), []);
@@ -70,14 +70,14 @@ const useLogin = () => {
70
70
  showErrorMessage(t('user.login.failed'));
71
71
  }
72
72
  else if (saveLoginCredential(userCredential)) {
73
- getUser();
73
+ void getUser();
74
74
  }
75
75
  }, [dispatchApi, getUser, showErrorMessage, t]);
76
76
  // OAuth login flow.
77
77
  const doOAuth = useCallback(async () => {
78
78
  const userCredential = await dispatchApi(api.auth.login.get(searchParams));
79
79
  if (saveLoginCredential(userCredential)) {
80
- getUser();
80
+ void getUser();
81
81
  }
82
82
  }, [dispatchApi, searchParams, getUser]);
83
83
  // login service.
@@ -53,11 +53,11 @@ const ActionEditor = () => {
53
53
  }
54
54
  }, [triggers]);
55
55
  useEffect(() => {
56
- dispatchApi(api.action.operations.get())
56
+ void dispatchApi(api.action.operations.get())
57
57
  .then(_operations => _operations.filter(a => difference(a.roles, user.roles).length < a.roles.length))
58
58
  .then(setOperations);
59
59
  if (responseQuery) {
60
- onSearch(responseQuery);
60
+ void onSearch(responseQuery);
61
61
  }
62
62
  // eslint-disable-next-line react-hooks/exhaustive-deps
63
63
  }, [dispatchApi, getHitFields]);
@@ -70,7 +70,7 @@ const ActionEditor = () => {
70
70
  useEffect(() => {
71
71
  if (params.id) {
72
72
  setLoading(true);
73
- dispatchApi(api.search.action.post({
73
+ void dispatchApi(api.search.action.post({
74
74
  query: `action_id:${params.id}`,
75
75
  rows: 1
76
76
  }), { throwError: false }).then(result => {
@@ -84,7 +84,7 @@ const ActionEditor = () => {
84
84
  setSearchParams(new URLSearchParams(searchParams), { replace: true });
85
85
  setUserOperations(existingAction.operations);
86
86
  setLoading(false);
87
- onSearch(existingAction.query);
87
+ void onSearch(existingAction.query);
88
88
  });
89
89
  }
90
90
  // eslint-disable-next-line react-hooks/exhaustive-deps
@@ -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 { Delete } from '@mui/icons-material';
3
3
  import { Box, Card, CardContent, Chip, Divider, IconButton, ListItemText, MenuItem, Select, Stack } from '@mui/material';
4
4
  import Markdown from '@cccsaurora/howler-ui/components/elements/display/Markdown';
@@ -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 { Alert, AlertTitle, Autocomplete, CircularProgress, InputAdornment, LinearProgress, Stack, TextField } from '@mui/material';
3
3
  import api from '@cccsaurora/howler-ui/api';
4
4
  import useMyApi from '@cccsaurora/howler-ui/components/hooks/useMyApi';
@@ -107,7 +107,7 @@ const useMyActionFunctions = () => {
107
107
  setLoading(false);
108
108
  setRequestId(null);
109
109
  setProgress([0, 0]);
110
- onSearch(query);
110
+ void onSearch(query);
111
111
  }
112
112
  }, [dispatchApi, onSearch, showErrorMessage, t]),
113
113
  executeAction: useCallback(async (actionId, query) => {
@@ -55,14 +55,14 @@ const ActionDetails = () => {
55
55
  }), [withConfirmDeleteModal, deleteAction, action?.action_id, showSuccessMessage, t]);
56
56
  useEffect(() => {
57
57
  setLoading(true);
58
- Promise.all([
58
+ void Promise.all([
59
59
  dispatchApi(api.action.operations.get()).then(setOperations),
60
60
  dispatchApi(api.action.get(params.id).then(setAction))
61
61
  ]).finally(() => setLoading(false));
62
62
  }, [dispatchApi, params.id, setLoading]);
63
63
  useEffect(() => {
64
64
  if (action?.query) {
65
- onSearch(action?.query);
65
+ void onSearch(action?.query);
66
66
  }
67
67
  // eslint-disable-next-line react-hooks/exhaustive-deps
68
68
  }, [action?.query]);
@@ -57,7 +57,7 @@ const ActionSearch = () => {
57
57
  offset
58
58
  });
59
59
  }
60
- catch (e) {
60
+ catch {
61
61
  setHasError(true);
62
62
  }
63
63
  finally {
@@ -88,7 +88,7 @@ const ActionSearch = () => {
88
88
  }, [deleteAction, remove, withConfirmDeleteModal, showSuccessMessage, t]);
89
89
  // Effect to initialize list of users.
90
90
  useEffect(() => {
91
- onSearch();
91
+ void onSearch();
92
92
  if (!searchParams.has('offset')) {
93
93
  searchParams.set('offset', '0');
94
94
  setSearchParams(searchParams, { replace: true });
@@ -105,12 +105,12 @@ const ActionSearch = () => {
105
105
  }, [offset, response?.total, searchParams, setSearchParams]);
106
106
  useEffect(() => {
107
107
  if (!searching) {
108
- onSearch();
108
+ void onSearch();
109
109
  }
110
110
  // eslint-disable-next-line react-hooks/exhaustive-deps
111
111
  }, [offset]);
112
112
  useEffect(() => {
113
- onSearch();
113
+ void onSearch();
114
114
  // eslint-disable-next-line react-hooks/exhaustive-deps
115
115
  }, [searchModifiers]);
116
116
  const editRoles = user.roles.includes('automation_basic') || user.roles.includes('automation_advanced');
@@ -20,7 +20,7 @@ const UserEditor = () => {
20
20
  }, [user, setUser]);
21
21
  useEffect(() => {
22
22
  if (id && !user) {
23
- dispatchApi(api.user.get(id)).then(setUser);
23
+ void dispatchApi(api.user.get(id)).then(setUser);
24
24
  }
25
25
  }, [dispatchApi, id, user]);
26
26
  return (_jsxs(UserPageWrapper, { user: user, children: [_jsx(ProfileSection, { user: user, editName: (isAdmin || currentUser.username === user?.username) && userWrapper(editName), addRole: isAdmin && userWrapper(addRole), removeRole: isAdmin && userWrapper(removeRole), viewGroups: currentUser.username === user?.username && viewGroups }), _jsx(SecuritySection, { user: user, editPassword: currentUser.username === user?.username && editPassword, addApiKey: currentUser.username === user?.username && addApiKey, removeApiKey: (isAdmin || currentUser.username === user?.username) && userWrapper(removeApiKey), editQuota: isAdmin && userWrapper(editQuota) })] }));
@@ -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 { Close, Search } from '@mui/icons-material';
3
3
  import { Box, Chip, Grid, IconButton, LinearProgress, Stack, TextField, Typography } from '@mui/material';
4
4
  import api from '@cccsaurora/howler-ui/api';
@@ -65,17 +65,17 @@ const UserSearch = () => {
65
65
  const onKeyDown = useCallback((event) => {
66
66
  const { isEnter } = parseEvent(event);
67
67
  if (isEnter) {
68
- onSearch();
68
+ void onSearch();
69
69
  }
70
70
  }, [onSearch]);
71
71
  // Clean button handler.
72
72
  const onClear = useCallback(() => {
73
73
  setPhrase('');
74
- onSearch();
74
+ void onSearch();
75
75
  }, [onSearch]);
76
76
  // Effect to initialize list of users.
77
77
  useEffect(() => {
78
- onSearch();
78
+ void onSearch();
79
79
  if (!searchParams.has('offset')) {
80
80
  searchParams.set('offset', '0');
81
81
  setSearchParams(searchParams);
@@ -92,7 +92,7 @@ const UserSearch = () => {
92
92
  }, [offset, response?.total, searchParams, setSearchParams]);
93
93
  useEffect(() => {
94
94
  if (!searching) {
95
- onSearch();
95
+ void onSearch();
96
96
  }
97
97
  // eslint-disable-next-line react-hooks/exhaustive-deps
98
98
  }, [offset]);
@@ -147,7 +147,7 @@ const QueryBuilder = () => {
147
147
  const onKeyDown = useCallback(event => {
148
148
  const parsedEvent = parseEvent(event);
149
149
  if (parsedEvent.isCtrl && parsedEvent.isEnter) {
150
- execute();
150
+ void execute();
151
151
  }
152
152
  }, [execute]);
153
153
  const onMouseMove = useCallback((event) => {
@@ -185,7 +185,7 @@ const QueryBuilder = () => {
185
185
  };
186
186
  }, [execute, monaco, t]);
187
187
  useEffect(() => {
188
- getHitFields();
188
+ void getHitFields();
189
189
  }, [getHitFields]);
190
190
  useEffect(() => {
191
191
  setResponse(null);
@@ -10,7 +10,7 @@ const useLuceneCompletionProvider = () => {
10
10
  const monaco = useMonaco();
11
11
  const { hitFields, getHitFields } = useContext(FieldContext);
12
12
  useEffect(() => {
13
- getHitFields();
13
+ void getHitFields();
14
14
  }, [getHitFields]);
15
15
  // Using fuse for fuzzy searching
16
16
  const fuse = useMemo(() => new Fuse(hitFields, { keys: ['key'], threshold: 0.4 }), [hitFields]);
@@ -53,7 +53,7 @@ const AnalyticComments = ({ analytic, setAnalytic }) => {
53
53
  setShowClear(true);
54
54
  }
55
55
  if (e.ctrlKey && e.key === 'Enter' && !loading) {
56
- onSubmit();
56
+ void onSubmit();
57
57
  }
58
58
  }, [loading, onSubmit]);
59
59
  const checkLength = useCallback(() => setLength(input.current?.value.length), []);
@@ -89,16 +89,14 @@ const AnalyticComments = ({ analytic, setAnalytic }) => {
89
89
  await dispatchApi(api.analytic.comments.react.put(analytic?.analytic_id, commentId, type));
90
90
  setAnalytic({
91
91
  ...analytic,
92
- comment: analytic.comment.map(cmt => cmt.id !== commentId ? cmt : { ...cmt, reactions: { ...(cmt?.reactions ?? {}), [user.username]: type } })
92
+ comment: analytic.comment.map(cmt => cmt.id !== commentId ? cmt : { ...cmt, reactions: { ...cmt?.reactions, [user.username]: type } })
93
93
  });
94
94
  }
95
95
  else {
96
96
  await dispatchApi(api.analytic.comments.react.del(analytic?.analytic_id, commentId));
97
97
  setAnalytic({
98
98
  ...analytic,
99
- comment: analytic.comment.map(cmt => cmt.id !== commentId
100
- ? cmt
101
- : { ...cmt, reactions: { ...(cmt?.reactions ?? {}), [user.username]: undefined } })
99
+ comment: analytic.comment.map(cmt => cmt.id !== commentId ? cmt : { ...cmt, reactions: { ...cmt?.reactions, [user.username]: undefined } })
102
100
  });
103
101
  }
104
102
  }, [analytic, dispatchApi, setAnalytic, user.username]);
@@ -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 { Autocomplete, Divider, Grid, IconButton, Skeleton, Stack, Tab, Tabs, TextField, Typography, useTheme } from '@mui/material';
4
4
  import api from '@cccsaurora/howler-ui/api';
@@ -30,7 +30,7 @@ const AnalyticDetails = () => {
30
30
  const [tab, setTab] = useState(searchParams.get('tab') ?? 'overview');
31
31
  const filteredContributors = useMemo(() => (analytic?.contributors ?? []).filter(_user => _user !== analytic?.owner), [analytic?.contributors, analytic?.owner]);
32
32
  useEffect(() => {
33
- dispatchApi(api.analytic.get(params.id)).then(setAnalytic);
33
+ void dispatchApi(api.analytic.get(params.id)).then(setAnalytic);
34
34
  }, [dispatchApi, params.id]);
35
35
  const [filter, _setFilter] = useState(searchParams.get('filter') ?? null);
36
36
  const setFilter = useCallback((detection) => {
@@ -25,7 +25,7 @@ const AnalyticHitComments = ({ analytic }) => {
25
25
  return;
26
26
  }
27
27
  setLoading(true);
28
- api.search.hit
28
+ void api.search.hit
29
29
  .post({
30
30
  query: `howler.analytic:"${sanitizeLuceneQuery(analytic.name)}" AND _exists_:howler.comment`,
31
31
  rows: pageCount
@@ -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 { omit } from 'lodash-es';
4
4
  import { MemoryRouter } from 'react-router-dom';
@@ -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 { Check, Edit } from '@mui/icons-material';
3
3
  import { Alert, AlertTitle, Box, Card, CardContent, CircularProgress, Divider, IconButton, Skeleton, Stack, TextField, Typography, useMediaQuery, useTheme } from '@mui/material';
4
4
  import api from '@cccsaurora/howler-ui/api';
@@ -30,7 +30,7 @@ const AnalyticOverview = ({ analytic, setAnalytic }) => {
30
30
  return;
31
31
  }
32
32
  setLoading(true);
33
- api.search.count.hit
33
+ void api.search.count.hit
34
34
  .post({ query: `howler.analytic:"${sanitizeLuceneQuery(analytic.name)}"` })
35
35
  .then(({ count }) => setEmpty(!count))
36
36
  .finally(() => setLoading(false));
@@ -16,7 +16,7 @@ const AnalyticOverviews = ({ analytic }) => {
16
16
  const [loading, setLoading] = useState(false);
17
17
  useEffect(() => {
18
18
  setLoading(true);
19
- getOverviews().finally(() => setLoading(false));
19
+ void getOverviews().finally(() => setLoading(false));
20
20
  }, [getOverviews]);
21
21
  if (!analytic) {
22
22
  return _jsx(Skeleton, { variant: "rounded", width: "100%", sx: { minHeight: '300px', mt: 2 } });
@@ -90,7 +90,7 @@ const AnalyticSearchBase = () => {
90
90
  }, [addFavourite, appUser.user?.favourite_analytics, dispatchApi, removeFavourite]);
91
91
  // Effect to initialize list of users.
92
92
  useEffect(() => {
93
- onSearch();
93
+ void onSearch();
94
94
  if (!searchParams.has('offset')) {
95
95
  searchParams.set('offset', '0');
96
96
  setSearchParams(searchParams, { replace: true });
@@ -107,7 +107,7 @@ const AnalyticSearchBase = () => {
107
107
  }, [offset, response?.total, searchParams, setSearchParams]);
108
108
  useEffect(() => {
109
109
  if (!searching) {
110
- onSearch();
110
+ void onSearch();
111
111
  }
112
112
  // eslint-disable-next-line react-hooks/exhaustive-deps
113
113
  }, [offset]);
@@ -17,7 +17,7 @@ const AnalyticTemplates = ({ analytic }) => {
17
17
  const [loading, setLoading] = useState(false);
18
18
  useEffect(() => {
19
19
  setLoading(true);
20
- dispatchApi(api.template.get())
20
+ void dispatchApi(api.template.get())
21
21
  .then(_templates => _templates.filter(_template => _template.analytic === analytic?.name))
22
22
  .then(setTemplates)
23
23
  .finally(() => setLoading(false));
@@ -51,7 +51,7 @@ const TriageSettings = ({ analytic, setAnalytic }) => {
51
51
  }
52
52
  }), children: _jsx(Delete, {}) })] }) }, _rationale))), _jsx(Card, { variant: "outlined", sx: { p: 1 }, children: _jsx(TextField, { label: t('route.analytics.rationales.new'), value: rationale, onChange: e => setRationale(e.target.value), onKeyDown: e => {
53
53
  if (e.key === 'Enter' && !!rationale) {
54
- updateAnalytic({
54
+ void updateAnalytic({
55
55
  triage_settings: {
56
56
  rationales: uniq([...rationales, rationale])
57
57
  }
@@ -60,7 +60,7 @@ const TriageSettings = ({ analytic, setAnalytic }) => {
60
60
  }
61
61
  }, fullWidth: true, size: "small", InputProps: {
62
62
  endAdornment: (_jsx(InputAdornment, { position: "end", children: _jsx(IconButton, { size: "small", disabled: !rationale, onClick: () => {
63
- updateAnalytic({
63
+ void updateAnalytic({
64
64
  triage_settings: {
65
65
  rationales: uniq([...rationales, rationale])
66
66
  }
@@ -17,7 +17,7 @@ const Assessment = forwardRef(({ analytic }, ref) => {
17
17
  return;
18
18
  }
19
19
  setLoading(true);
20
- api.search.facet.hit
20
+ void api.search.facet.hit
21
21
  .post({
22
22
  fields: ['howler.assessment'],
23
23
  query: `howler.analytic:("${analytic.name}")`
@@ -24,7 +24,7 @@ const Created = forwardRef(({ analytic }, ref) => {
24
24
  mincount: 0
25
25
  });
26
26
  }
27
- queryRef.current
27
+ void queryRef.current
28
28
  .then(result => {
29
29
  setIngestionData(result);
30
30
  queryRef.current = null;
@@ -17,7 +17,7 @@ const Escalation = forwardRef(({ analytic, maxWidth = '45%' }, ref) => {
17
17
  return;
18
18
  }
19
19
  setLoading(true);
20
- api.search.facet.hit
20
+ void api.search.facet.hit
21
21
  .post({
22
22
  query: `howler.analytic:("${analytic.name}")`,
23
23
  fields: ['howler.escalation']
@@ -53,7 +53,7 @@ const Stacked = forwardRef(({ analytic, field, color }, ref) => {
53
53
  if (!analytic) {
54
54
  return;
55
55
  }
56
- fetchData();
56
+ void fetchData();
57
57
  }, [analytic, fetchData]);
58
58
  const options = useMemo(() => {
59
59
  const baseOptions = line(`route.analytics.${field.replace('howler.', '')}.title`);
@@ -16,7 +16,7 @@ const CaseViewer = () => {
16
16
  if (!params.id) {
17
17
  return;
18
18
  }
19
- fetchViewers(params.id);
19
+ void fetchViewers(params.id);
20
20
  if (open) {
21
21
  emit({
22
22
  broadcast: false,
@@ -100,7 +100,7 @@ const CasesBase = () => {
100
100
  }
101
101
  }, [offset, searchParams, setSearchParams]);
102
102
  useEffect(() => {
103
- onSearch();
103
+ void onSearch();
104
104
  if (!searchParams.has('offset')) {
105
105
  searchParams.set('offset', '0');
106
106
  setSearchParams(searchParams, { replace: true });
@@ -116,7 +116,7 @@ const CasesBase = () => {
116
116
  }, [offset, response?.total, searchParams, setSearchParams]);
117
117
  useEffect(() => {
118
118
  if (!loading) {
119
- onSearch();
119
+ void onSearch();
120
120
  }
121
121
  // eslint-disable-next-line react-hooks/exhaustive-deps
122
122
  }, [offset]);
@@ -127,7 +127,7 @@ const CasesBase = () => {
127
127
  return;
128
128
  }
129
129
  if (!loading) {
130
- onSearch();
130
+ void onSearch();
131
131
  }
132
132
  // eslint-disable-next-line react-hooks/exhaustive-deps
133
133
  }, [statusFilter, assigneeFilter, dateRange, customStart, customEnd]);
@@ -3,4 +3,4 @@ export declare const ESCALATION_COLOR_MAP: {
3
3
  focus: string;
4
4
  crisis: string;
5
5
  };
6
- export declare const CASE_STATUSES: readonly ["open", "in-progress", "on-hold", "resolved"];
6
+ export declare const CASE_STATUSES: readonly ['open', 'in-progress', 'on-hold', 'resolved'];
@@ -50,7 +50,7 @@ const CaseDashboard = ({ case: providedCase, caseId }) => {
50
50
  if (missingIds.length < 1) {
51
51
  return;
52
52
  }
53
- dispatchApi(api.v2.search.post(['hit', 'event'], {
53
+ void dispatchApi(api.v2.search.post(['hit', 'event'], {
54
54
  query: `howler.id:(${missingIds.join(' OR ')})`,
55
55
  metadata: ['template', 'analytic']
56
56
  })).then(response => {
@@ -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 { Check, FormatListBulleted, HourglassBottom, Pause, People, TrendingUp, WarningRounded } from '@mui/icons-material';
3
3
  import { Autocomplete, AvatarGroup, Card, Divider, LinearProgress, Skeleton, Stack, Table, TableBody, TableCell, TableRow, TextField, Typography } from '@mui/material';
4
4
  import { ApiConfigContext } from '@cccsaurora/howler-ui/components/app/providers/ApiConfigProvider';
@@ -37,7 +37,7 @@ const CaseDetails = ({ case: providedCase }) => {
37
37
  showModal(_jsx(ResolveModal, { case: _case, onConfirm: onConfirm }), { maxHeight: '80vh' });
38
38
  }
39
39
  else {
40
- wrappedUpdate({ status });
40
+ void wrappedUpdate({ status });
41
41
  }
42
42
  };
43
43
  if (!_case) {
@@ -68,7 +68,7 @@ const CaseDetails = ({ case: providedCase }) => {
68
68
  }
69
69
  } }), _jsxs(Stack, { direction: "row", spacing: 1, alignItems: "center", children: [_jsx(TrendingUp, { color: ESCALATION_COLOR_MAP[_case.escalation] }), _jsx(Typography, { variant: "body1", children: t('page.cases.detail.escalation') })] }), _jsx(Autocomplete, { size: "small", disabled: loading, disableClearable: true, value: _case.escalation ?? null, options: config.lookups['case.escalation'], renderInput: params => _jsx(TextField, { ...params, size: "small" }), onChange: (_ev, escalation) => {
70
70
  if (escalation) {
71
- wrappedUpdate({ escalation });
71
+ void wrappedUpdate({ escalation });
72
72
  }
73
73
  } })] }), _jsx(Divider, {}), _jsxs(Stack, { spacing: 1, children: [_jsxs(Stack, { direction: "row", spacing: 1, alignItems: "center", children: [_jsx(People, {}), _jsx(Typography, { variant: "body1", children: t('page.cases.detail.participants') })] }), _jsxs(Stack, { direction: "row", spacing: 0.5, alignItems: "center", children: [_jsx(UserList, { buttonSx: { alignSelf: 'start' }, multiple: true, i18nLabel: "page.cases.detail.assignment", userIds: _case.participants ?? [], onChange: participants => wrappedUpdate({ participants }), disabled: loading }), _jsx("div", { style: { flex: 1 } })] }), caseViewers.length > 0 && (_jsxs(_Fragment, { children: [_jsx(Divider, {}), _jsxs(Stack, { direction: "row", alignItems: "center", children: [_jsx(SocketBadge, { size: "medium" }), _jsx(Typography, { variant: "body1", children: t('page.cases.detail.viewers') })] }), _jsx(AvatarGroup, { max: 4, sx: { alignSelf: 'start' }, componentsProps: {
74
74
  additionalAvatar: {
@@ -35,7 +35,7 @@ const CaseObservables = ({ case: providedCase, caseId }) => {
35
35
  setRecords([]);
36
36
  return;
37
37
  }
38
- dispatchApi(api.v2.search.post(['hit', 'event'], {
38
+ void dispatchApi(api.v2.search.post(['hit', 'event'], {
39
39
  query: `howler.id:(${ids.join(' OR ')})`,
40
40
  fl: `howler.id,${RELATED_FIELDS},${EXTRA_FIELDS}`
41
41
  })).then(response => {
@@ -58,7 +58,7 @@ const CaseObservables = ({ case: providedCase, caseId }) => {
58
58
  setActiveEscalations([]);
59
59
  return;
60
60
  }
61
- dispatchApi(api.v2.search.facet.post(['hit', 'event'], {
61
+ void dispatchApi(api.v2.search.facet.post(['hit', 'event'], {
62
62
  fields: ['howler.escalation'],
63
63
  filters: [`howler.id:(${ids.join(' OR ')})`]
64
64
  }), { throwError: false }).then(result => {