@cccsaurora/howler-ui 2.18.0-dev.736 → 2.18.0-dev.737

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 (273) hide show
  1. package/api/index.d.ts +0 -2
  2. package/api/index.js +2 -4
  3. package/api/search/facet/hit.d.ts +3 -1
  4. package/api/search/facet/index.d.ts +1 -3
  5. package/api/search/index.d.ts +1 -2
  6. package/api/search/index.js +1 -2
  7. package/commons/components/leftnav/LeftNavDrawer.js +1 -1
  8. package/components/app/App.js +7 -39
  9. package/components/app/hooks/useMatchers.d.ts +1 -1
  10. package/components/app/hooks/useMatchers.js +11 -23
  11. package/components/app/hooks/useMatchers.test.js +22 -22
  12. package/components/app/hooks/useTitle.js +3 -3
  13. package/components/app/providers/FavouritesProvider.js +2 -2
  14. package/components/app/providers/HitProvider.d.ts +22 -0
  15. package/components/app/providers/{RecordProvider.js → HitProvider.js} +41 -41
  16. package/components/app/providers/{RecordSearchProvider.d.ts → HitSearchProvider.d.ts} +6 -6
  17. package/components/app/providers/{RecordSearchProvider.js → HitSearchProvider.js} +17 -12
  18. package/components/app/providers/{RecordSearchProvider.test.js → HitSearchProvider.test.js} +70 -51
  19. package/components/app/providers/ModalProvider.d.ts +0 -1
  20. package/components/app/providers/ParameterProvider.d.ts +2 -9
  21. package/components/app/providers/ParameterProvider.js +240 -165
  22. package/components/app/providers/ParameterProvider.test.js +94 -346
  23. package/components/app/providers/UserListProvider.js +8 -28
  24. package/components/elements/PluginTypography.d.ts +1 -2
  25. package/components/elements/PluginTypography.js +2 -3
  26. package/components/elements/UserList.d.ts +2 -5
  27. package/components/elements/UserList.js +8 -18
  28. package/components/elements/addons/search/phrase/Phrase.js +1 -1
  29. package/components/elements/display/ChipPopper.d.ts +1 -1
  30. package/components/elements/display/HowlerCard.js +1 -1
  31. package/components/elements/display/Modal.js +0 -2
  32. package/components/elements/display/icons/BundleButton.d.ts +6 -0
  33. package/components/elements/display/icons/BundleButton.js +32 -0
  34. package/components/elements/hit/HitActions.js +4 -4
  35. package/components/elements/hit/HitBanner.d.ts +0 -1
  36. package/components/elements/hit/HitBanner.js +49 -29
  37. package/components/elements/hit/HitCard.d.ts +0 -2
  38. package/components/elements/hit/HitCard.js +7 -7
  39. package/components/elements/{record/RecordComments.d.ts → hit/HitComments.d.ts} +4 -5
  40. package/components/elements/{record/RecordComments.js → hit/HitComments.js} +28 -29
  41. package/components/elements/{ObjectDetails.js → hit/HitDetails.js} +17 -17
  42. package/components/elements/hit/HitLabels.js +2 -2
  43. package/components/elements/hit/HitOutline.d.ts +0 -1
  44. package/components/elements/hit/HitOutline.js +3 -3
  45. package/components/elements/hit/{HitPreview.d.ts → HitQuickSearch.d.ts} +3 -3
  46. package/components/elements/hit/{HitPreview.js → HitQuickSearch.js} +4 -10
  47. package/components/elements/hit/HitRelated.d.ts +6 -0
  48. package/components/elements/hit/HitRelated.js +7 -0
  49. package/components/elements/hit/HitSummary.d.ts +1 -2
  50. package/components/elements/hit/HitSummary.js +5 -6
  51. package/components/elements/{record/RecordWorklog.d.ts → hit/HitWorklog.d.ts} +3 -4
  52. package/components/elements/{record/RecordWorklog.js → hit/HitWorklog.js} +13 -15
  53. package/components/elements/hit/aggregate/HitGraph.js +8 -8
  54. package/components/elements/hit/outlines/DefaultOutline.js +1 -1
  55. package/components/elements/view/ViewTitle.d.ts +0 -1
  56. package/components/elements/view/ViewTitle.js +2 -9
  57. package/components/hooks/useHitActions.d.ts +1 -1
  58. package/components/hooks/useHitActions.js +4 -4
  59. package/components/hooks/{useRecordSelection.d.ts → useHitSelection.d.ts} +2 -2
  60. package/components/hooks/{useRecordSelection.js → useHitSelection.js} +33 -12
  61. package/components/hooks/useMyPreferences.js +1 -10
  62. package/components/hooks/useMySearch.js +2 -2
  63. package/components/hooks/useMySitemap.js +1 -4
  64. package/components/hooks/useMyTheme.js +2 -9
  65. package/components/hooks/useParamState.test.js +4 -3
  66. package/components/routes/action/edit/ActionEditor.js +2 -2
  67. package/components/routes/action/view/ActionSearch.js +1 -1
  68. package/components/routes/advanced/QueryBuilder.js +1 -1
  69. package/components/routes/advanced/QueryEditor.js +3 -3
  70. package/components/routes/advanced/historyCompletionProvider.js +3 -3
  71. package/components/routes/analytics/AnalyticDetails.js +2 -2
  72. package/components/routes/analytics/AnalyticSearch.js +1 -1
  73. package/components/routes/dossiers/DossierEditor.js +2 -2
  74. package/components/routes/dossiers/DossierEditor.test.js +1 -1
  75. package/components/routes/help/ApiDocumentation.js +1 -1
  76. package/components/routes/help/BundleDocumentation.d.ts +3 -0
  77. package/components/routes/help/BundleDocumentation.js +12 -0
  78. package/components/routes/help/HitBannerDocumentation.js +0 -1
  79. package/components/routes/help/HitDocumentation.js +3 -1
  80. package/components/routes/help/markdown/en/bundles.md.js +1 -0
  81. package/components/routes/help/markdown/fr/bundles.md.js +1 -0
  82. package/components/routes/hits/search/BundleParentMenu.d.ts +6 -0
  83. package/components/routes/hits/search/BundleParentMenu.js +32 -0
  84. package/components/routes/hits/search/BundleScroller.d.ts +2 -0
  85. package/components/routes/hits/search/BundleScroller.js +6 -0
  86. package/components/routes/hits/search/{RecordBrowser.js → HitBrowser.js} +9 -9
  87. package/components/{elements/record/RecordContextMenu.d.ts → routes/hits/search/HitContextMenu.d.ts} +3 -3
  88. package/components/routes/hits/search/HitContextMenu.js +227 -0
  89. package/components/{elements/record/RecordContextMenu.test.js → routes/hits/search/HitContextMenu.test.js} +39 -94
  90. package/components/routes/hits/search/{RecordQuery.d.ts → HitQuery.d.ts} +2 -2
  91. package/components/routes/hits/search/{RecordQuery.js → HitQuery.js} +6 -6
  92. package/components/routes/hits/search/InformationPane.d.ts +0 -1
  93. package/components/routes/hits/search/InformationPane.js +60 -47
  94. package/components/routes/hits/search/LayoutSettings.js +3 -3
  95. package/components/routes/hits/search/QuerySettings.js +1 -2
  96. package/components/routes/hits/search/QuerySettings.test.js +9 -14
  97. package/components/routes/hits/search/SearchPane.js +49 -26
  98. package/components/routes/hits/search/ViewLink.js +3 -3
  99. package/components/routes/hits/search/ViewLink.test.js +8 -8
  100. package/components/routes/hits/search/grid/AddColumnModal.js +4 -5
  101. package/components/routes/hits/search/grid/EnhancedCell.d.ts +1 -2
  102. package/components/routes/hits/search/grid/EnhancedCell.js +2 -2
  103. package/components/routes/hits/search/grid/HitGrid.js +18 -20
  104. package/components/routes/hits/search/grid/{RecordRow.d.ts → HitRow.d.ts} +2 -3
  105. package/components/routes/hits/search/grid/{RecordRow.js → HitRow.js} +8 -10
  106. package/components/routes/hits/view/HitViewer.js +13 -12
  107. package/components/routes/home/ViewCard.js +41 -47
  108. package/components/{elements/MarkdownEditor.js → routes/overviews/OverviewEditor.js} +3 -3
  109. package/components/routes/overviews/OverviewViewer.js +2 -2
  110. package/components/routes/views/ViewComposer.js +19 -46
  111. package/locales/en/translation.json +3 -89
  112. package/locales/fr/translation.json +3 -87
  113. package/models/WithMetadata.d.ts +1 -2
  114. package/models/entities/generated/{ThreatEnrichment.d.ts → Enrichment.d.ts} +1 -1
  115. package/models/entities/generated/Hit.d.ts +0 -1
  116. package/models/entities/generated/Howler.d.ts +4 -0
  117. package/models/entities/generated/Rule.d.ts +10 -2
  118. package/models/entities/generated/Threat.d.ts +2 -2
  119. package/models/entities/generated/View.d.ts +0 -1
  120. package/package.json +2 -19
  121. package/plugins/clue/components/ClueTypography.js +2 -2
  122. package/plugins/clue/utils.d.ts +1 -2
  123. package/tests/mocks.d.ts +1 -11
  124. package/tests/mocks.js +7 -12
  125. package/tests/server-handlers.js +1 -6
  126. package/tests/utils.d.ts +0 -4
  127. package/tests/utils.js +0 -20
  128. package/utils/constants.d.ts +3 -3
  129. package/utils/hitFunctions.d.ts +1 -2
  130. package/utils/hitFunctions.js +4 -4
  131. package/utils/viewUtils.js +0 -3
  132. package/api/search/case.d.ts +0 -4
  133. package/api/search/case.js +0 -8
  134. package/api/v2/case/index.d.ts +0 -8
  135. package/api/v2/case/index.js +0 -20
  136. package/api/v2/case/items.d.ts +0 -6
  137. package/api/v2/case/items.js +0 -18
  138. package/api/v2/index.d.ts +0 -4
  139. package/api/v2/index.js +0 -6
  140. package/api/v2/search/facet.d.ts +0 -3
  141. package/api/v2/search/facet.js +0 -12
  142. package/api/v2/search/index.d.ts +0 -5
  143. package/api/v2/search/index.js +0 -24
  144. package/components/app/providers/RecordProvider.d.ts +0 -23
  145. package/components/elements/ContextMenu.d.ts +0 -56
  146. package/components/elements/ContextMenu.js +0 -109
  147. package/components/elements/ContextMenu.test.js +0 -215
  148. package/components/elements/ObjectDetails.d.ts +0 -6
  149. package/components/elements/case/CaseCard.d.ts +0 -12
  150. package/components/elements/case/CaseCard.js +0 -42
  151. package/components/elements/case/CasePreview.d.ts +0 -6
  152. package/components/elements/case/CasePreview.js +0 -17
  153. package/components/elements/case/StatusIcon.d.ts +0 -5
  154. package/components/elements/case/StatusIcon.js +0 -13
  155. package/components/elements/hit/elements/AnalyticLink.d.ts +0 -9
  156. package/components/elements/hit/elements/AnalyticLink.js +0 -22
  157. package/components/elements/hit/related/RelatedRecords.js +0 -63
  158. package/components/elements/observable/ObservableCard.d.ts +0 -6
  159. package/components/elements/observable/ObservableCard.js +0 -22
  160. package/components/elements/observable/ObservablePreview.d.ts +0 -6
  161. package/components/elements/observable/ObservablePreview.js +0 -12
  162. package/components/elements/record/RecordContextMenu.js +0 -247
  163. package/components/elements/record/RecordContextMenu.test.d.ts +0 -1
  164. package/components/elements/record/RecordRelated.d.ts +0 -7
  165. package/components/elements/record/RecordRelated.js +0 -34
  166. package/components/hooks/useRelatedRecords.d.ts +0 -13
  167. package/components/hooks/useRelatedRecords.js +0 -32
  168. package/components/routes/cases/CaseViewer.d.ts +0 -2
  169. package/components/routes/cases/CaseViewer.js +0 -22
  170. package/components/routes/cases/Cases.d.ts +0 -2
  171. package/components/routes/cases/Cases.js +0 -101
  172. package/components/routes/cases/constants.d.ts +0 -5
  173. package/components/routes/cases/constants.js +0 -5
  174. package/components/routes/cases/detail/AlertPanel.d.ts +0 -6
  175. package/components/routes/cases/detail/AlertPanel.js +0 -33
  176. package/components/routes/cases/detail/CaseAssets.d.ts +0 -11
  177. package/components/routes/cases/detail/CaseAssets.js +0 -104
  178. package/components/routes/cases/detail/CaseAssets.test.d.ts +0 -1
  179. package/components/routes/cases/detail/CaseAssets.test.js +0 -167
  180. package/components/routes/cases/detail/CaseDashboard.d.ts +0 -7
  181. package/components/routes/cases/detail/CaseDashboard.js +0 -66
  182. package/components/routes/cases/detail/CaseDetails.d.ts +0 -6
  183. package/components/routes/cases/detail/CaseDetails.js +0 -61
  184. package/components/routes/cases/detail/CaseOverview.d.ts +0 -7
  185. package/components/routes/cases/detail/CaseOverview.js +0 -43
  186. package/components/routes/cases/detail/CaseSidebar.d.ts +0 -8
  187. package/components/routes/cases/detail/CaseSidebar.js +0 -107
  188. package/components/routes/cases/detail/CaseSidebar.test.d.ts +0 -1
  189. package/components/routes/cases/detail/CaseSidebar.test.js +0 -246
  190. package/components/routes/cases/detail/CaseTask.d.ts +0 -11
  191. package/components/routes/cases/detail/CaseTask.js +0 -57
  192. package/components/routes/cases/detail/CaseTimeline.d.ts +0 -12
  193. package/components/routes/cases/detail/CaseTimeline.js +0 -106
  194. package/components/routes/cases/detail/CaseTimeline.test.d.ts +0 -1
  195. package/components/routes/cases/detail/CaseTimeline.test.js +0 -227
  196. package/components/routes/cases/detail/ItemPage.d.ts +0 -6
  197. package/components/routes/cases/detail/ItemPage.js +0 -99
  198. package/components/routes/cases/detail/RelatedCasePanel.d.ts +0 -6
  199. package/components/routes/cases/detail/RelatedCasePanel.js +0 -34
  200. package/components/routes/cases/detail/TaskPanel.d.ts +0 -7
  201. package/components/routes/cases/detail/TaskPanel.js +0 -52
  202. package/components/routes/cases/detail/aggregates/CaseAggregate.d.ts +0 -11
  203. package/components/routes/cases/detail/aggregates/CaseAggregate.js +0 -24
  204. package/components/routes/cases/detail/aggregates/SourceAggregate.d.ts +0 -6
  205. package/components/routes/cases/detail/aggregates/SourceAggregate.js +0 -26
  206. package/components/routes/cases/detail/assets/Asset.d.ts +0 -14
  207. package/components/routes/cases/detail/assets/Asset.js +0 -12
  208. package/components/routes/cases/detail/assets/Asset.test.d.ts +0 -1
  209. package/components/routes/cases/detail/assets/Asset.test.js +0 -72
  210. package/components/routes/cases/detail/sidebar/CaseFolder.d.ts +0 -20
  211. package/components/routes/cases/detail/sidebar/CaseFolder.js +0 -83
  212. package/components/routes/cases/detail/sidebar/CaseFolder.test.d.ts +0 -1
  213. package/components/routes/cases/detail/sidebar/CaseFolder.test.js +0 -295
  214. package/components/routes/cases/detail/sidebar/CaseFolderContextMenu.d.ts +0 -34
  215. package/components/routes/cases/detail/sidebar/CaseFolderContextMenu.js +0 -103
  216. package/components/routes/cases/detail/sidebar/CaseFolderContextMenu.test.d.ts +0 -1
  217. package/components/routes/cases/detail/sidebar/CaseFolderContextMenu.test.js +0 -363
  218. package/components/routes/cases/detail/sidebar/FolderEntry.d.ts +0 -25
  219. package/components/routes/cases/detail/sidebar/FolderEntry.js +0 -88
  220. package/components/routes/cases/detail/sidebar/FolderEntry.test.d.ts +0 -1
  221. package/components/routes/cases/detail/sidebar/FolderEntry.test.js +0 -206
  222. package/components/routes/cases/detail/sidebar/RootDropZone.d.ts +0 -5
  223. package/components/routes/cases/detail/sidebar/RootDropZone.js +0 -33
  224. package/components/routes/cases/detail/sidebar/types.d.ts +0 -9
  225. package/components/routes/cases/detail/sidebar/utils.d.ts +0 -3
  226. package/components/routes/cases/detail/sidebar/utils.js +0 -29
  227. package/components/routes/cases/detail/sidebar/utils.test.d.ts +0 -1
  228. package/components/routes/cases/detail/sidebar/utils.test.js +0 -82
  229. package/components/routes/cases/hooks/useCase.d.ts +0 -13
  230. package/components/routes/cases/hooks/useCase.js +0 -51
  231. package/components/routes/cases/modals/AddToCaseModal.d.ts +0 -7
  232. package/components/routes/cases/modals/AddToCaseModal.js +0 -62
  233. package/components/routes/cases/modals/RenameItemModal.d.ts +0 -9
  234. package/components/routes/cases/modals/RenameItemModal.js +0 -48
  235. package/components/routes/cases/modals/ResolveModal.d.ts +0 -7
  236. package/components/routes/cases/modals/ResolveModal.js +0 -115
  237. package/components/routes/cases/modals/ResolveModal.test.d.ts +0 -1
  238. package/components/routes/cases/modals/ResolveModal.test.js +0 -384
  239. package/components/routes/hits/search/shared/IndexPicker.d.ts +0 -2
  240. package/components/routes/hits/search/shared/IndexPicker.js +0 -20
  241. package/components/routes/observables/ObservableViewer.d.ts +0 -7
  242. package/components/routes/observables/ObservableViewer.js +0 -27
  243. package/models/entities/generated/AttachmentsFile.d.ts +0 -12
  244. package/models/entities/generated/Case.d.ts +0 -28
  245. package/models/entities/generated/DestinationOriginal.d.ts +0 -19
  246. package/models/entities/generated/EmailAttachment.d.ts +0 -8
  247. package/models/entities/generated/EmailParent.d.ts +0 -19
  248. package/models/entities/generated/Enrichments.d.ts +0 -7
  249. package/models/entities/generated/EnrichmentsIndicator.d.ts +0 -21
  250. package/models/entities/generated/HttpResponse.d.ts +0 -11
  251. package/models/entities/generated/Item.d.ts +0 -9
  252. package/models/entities/generated/Observable.d.ts +0 -85
  253. package/models/entities/generated/ObservableCloud.d.ts +0 -20
  254. package/models/entities/generated/ObservableDestination.d.ts +0 -23
  255. package/models/entities/generated/ObservableEmail.d.ts +0 -30
  256. package/models/entities/generated/ObservableFile.d.ts +0 -36
  257. package/models/entities/generated/ObservableHowler.d.ts +0 -43
  258. package/models/entities/generated/ObservableHttp.d.ts +0 -11
  259. package/models/entities/generated/ObservableObserver.d.ts +0 -21
  260. package/models/entities/generated/ObservableOrganization.d.ts +0 -7
  261. package/models/entities/generated/ObservableProcess.d.ts +0 -34
  262. package/models/entities/generated/ObservableSource.d.ts +0 -23
  263. package/models/entities/generated/ObservableThreat.d.ts +0 -21
  264. package/models/entities/generated/ObservableTls.d.ts +0 -12
  265. package/models/entities/generated/ObserverIngress.d.ts +0 -9
  266. package/models/entities/generated/Task.d.ts +0 -10
  267. package/utils/typeUtils.d.ts +0 -7
  268. package/utils/typeUtils.js +0 -27
  269. /package/components/app/providers/{RecordSearchProvider.test.d.ts → HitSearchProvider.test.d.ts} +0 -0
  270. /package/components/elements/hit/{related/RelatedRecords.d.ts → HitDetails.d.ts} +0 -0
  271. /package/components/routes/hits/search/{RecordBrowser.d.ts → HitBrowser.d.ts} +0 -0
  272. /package/components/{elements/ContextMenu.test.d.ts → routes/hits/search/HitContextMenu.test.d.ts} +0 -0
  273. /package/components/{elements/MarkdownEditor.d.ts → routes/overviews/OverviewEditor.d.ts} +0 -0
@@ -4,7 +4,7 @@ import type { Matched } from './Matched';
4
4
  /**
5
5
  * NOTE: This is an auto-generated file. Don't edit this manually.
6
6
  */
7
- export interface ThreatEnrichment {
7
+ export interface Enrichment {
8
8
  indicator?: Indicator;
9
9
  matched?: Matched;
10
10
  }
@@ -40,7 +40,6 @@ import type { Vulnerability } from './Vulnerability';
40
40
  * NOTE: This is an auto-generated file. Don't edit this manually.
41
41
  */
42
42
  export interface Hit {
43
- __index: 'hit';
44
43
  agent?: Agent;
45
44
  assemblyline?: Assemblyline;
46
45
  aws?: Aws;
@@ -14,6 +14,8 @@ export interface Howler {
14
14
  analytic: string;
15
15
  assessment?: string;
16
16
  assignment: string;
17
+ bundle_size?: number;
18
+ bundles?: string[];
17
19
  comment?: HowlerComment[];
18
20
  confidence?: number;
19
21
  data?: string[];
@@ -22,8 +24,10 @@ export interface Howler {
22
24
  escalation?: string;
23
25
  expiry?: string;
24
26
  hash: string;
27
+ hits?: string[];
25
28
  id: string;
26
29
  incidents?: Incident[];
30
+ is_bundle?: boolean;
27
31
  labels?: Labels;
28
32
  links?: Link[];
29
33
  log?: Log[];
@@ -2,6 +2,14 @@
2
2
  * NOTE: This is an auto-generated file. Don't edit this manually.
3
3
  */
4
4
  export interface Rule {
5
- destination?: string;
6
- query?: string;
5
+ author?: string;
6
+ category?: string;
7
+ description?: string;
8
+ id?: string;
9
+ license?: string;
10
+ name?: string;
11
+ reference?: string;
12
+ ruleset?: string;
13
+ uuid?: string;
14
+ version?: string;
7
15
  }
@@ -1,6 +1,6 @@
1
+ import type { Enrichment } from './Enrichment';
1
2
  import type { Feed } from './Feed';
2
3
  import type { Software } from './Software';
3
- import type { ThreatEnrichment } from './ThreatEnrichment';
4
4
  import type { ThreatGroup } from './ThreatGroup';
5
5
  import type { ThreatIndicator } from './ThreatIndicator';
6
6
  import type { ThreatTactic } from './ThreatTactic';
@@ -10,7 +10,7 @@ import type { ThreatTechnique } from './ThreatTechnique';
10
10
  * NOTE: This is an auto-generated file. Don't edit this manually.
11
11
  */
12
12
  export interface Threat {
13
- enrichments?: ThreatEnrichment[];
13
+ enrichments?: Enrichment[];
14
14
  feed?: Feed;
15
15
  framework?: string;
16
16
  group?: ThreatGroup;
@@ -12,5 +12,4 @@ export interface View {
12
12
  title?: string;
13
13
  type?: string;
14
14
  view_id?: string;
15
- indexes?: string[];
16
15
  }
package/package.json CHANGED
@@ -42,7 +42,7 @@
42
42
  "i18next": "^23.16.8",
43
43
  "i18next-browser-languagedetector": "^7.2.2",
44
44
  "json-schema": "^0.4.0",
45
- "lodash-es": "^4.17.23",
45
+ "lodash-es": "^4.18.1",
46
46
  "md5": "^2.3.0",
47
47
  "mermaid": "^11.13.0",
48
48
  "monaco-editor": "0.49.0",
@@ -101,7 +101,7 @@
101
101
  "internal-slot": "1.0.7"
102
102
  },
103
103
  "type": "module",
104
- "version": "2.18.0-dev.736",
104
+ "version": "2.18.0-dev.737",
105
105
  "exports": {
106
106
  "./i18n": "./i18n.js",
107
107
  "./index.css": "./index.css",
@@ -148,11 +148,9 @@
148
148
  "./components/routes/home": "./components/routes/home/index.js",
149
149
  "./components/routes/dossiers/*": "./components/routes/dossiers/*.js",
150
150
  "./components/routes/help/*": "./components/routes/help/*.js",
151
- "./components/routes/observables/*": "./components/routes/observables/*.js",
152
151
  "./components/routes/admin/*": "./components/routes/admin/*.js",
153
152
  "./components/routes/action/*": "./components/routes/action/*.js",
154
153
  "./components/routes/settings/*": "./components/routes/settings/*.js",
155
- "./components/routes/cases/*": "./components/routes/cases/*.js",
156
154
  "./components/routes/views/*": "./components/routes/views/*.js",
157
155
  "./components/routes/overviews/*": "./components/routes/overviews/*.js",
158
156
  "./components/routes/analytics/*": "./components/routes/analytics/*.js",
@@ -170,21 +168,12 @@
170
168
  "./components/routes/action/shared/*": "./components/routes/action/shared/*.js",
171
169
  "./components/routes/action/view/*": "./components/routes/action/view/*.js",
172
170
  "./components/routes/action/view/markdown/*.md": "./components/routes/action/view/markdown/*.md.js",
173
- "./components/routes/cases/modals/*": "./components/routes/cases/modals/*.js",
174
- "./components/routes/cases/detail/*": "./components/routes/cases/detail/*.js",
175
- "./components/routes/cases/hooks/*": "./components/routes/cases/hooks/*.js",
176
- "./components/routes/cases/detail/assets/*": "./components/routes/cases/detail/assets/*.js",
177
- "./components/routes/cases/detail/sidebar/*": "./components/routes/cases/detail/sidebar/*.js",
178
- "./components/routes/cases/detail/aggregates/*": "./components/routes/cases/detail/aggregates/*.js",
179
171
  "./components/routes/overviews/template/*": "./components/routes/overviews/template/*.js",
180
172
  "./components/routes/analytics/widgets/*": "./components/routes/analytics/widgets/*.js",
181
173
  "./components/logins/auth/*": "./components/logins/auth/*.js",
182
174
  "./components/logins/hooks/*": "./components/logins/hooks/*.js",
183
175
  "./components/elements/hit/*": "./components/elements/hit/*.js",
184
176
  "./components/elements/addons/*": "./components/elements/addons/*.js",
185
- "./components/elements/record/*": "./components/elements/record/*.js",
186
- "./components/elements/observable/*": "./components/elements/observable/*.js",
187
- "./components/elements/case/*": "./components/elements/case/*.js",
188
177
  "./components/elements/view/*": "./components/elements/view/*.js",
189
178
  "./components/elements/display/*": "./components/elements/display/*.js",
190
179
  "./components/elements/hit/aggregate/*": "./components/elements/hit/aggregate/*.js",
@@ -235,8 +224,6 @@
235
224
  "./api/template": "./api/template/index.js",
236
225
  "./api/analytic/*": "./api/analytic/*.js",
237
226
  "./api/analytic": "./api/analytic/index.js",
238
- "./api/v2/*": "./api/v2/*.js",
239
- "./api/v2": "./api/v2/index.js",
240
227
  "./api/auth/*": "./api/auth/*.js",
241
228
  "./api/auth": "./api/auth/index.js",
242
229
  "./api/user/*": "./api/user/*.js",
@@ -257,10 +244,6 @@
257
244
  "./api/analytic/comments": "./api/analytic/comments/index.js",
258
245
  "./api/analytic/notebooks/*": "./api/analytic/notebooks/*.js",
259
246
  "./api/analytic/notebooks": "./api/analytic/notebooks/index.js",
260
- "./api/v2/case/*": "./api/v2/case/*.js",
261
- "./api/v2/case": "./api/v2/case/index.js",
262
- "./api/v2/search/*": "./api/v2/search/*.js",
263
- "./api/v2/search": "./api/v2/search/index.js",
264
247
  "./api/user/avatar/*": "./api/user/avatar/*.js",
265
248
  "./api/user/avatar": "./api/user/avatar/index.js",
266
249
  "./api/search/count/*": "./api/search/count/*.js",
@@ -3,8 +3,8 @@ import EnrichedTypography from '@cccsaurora/clue-ui/components/EnrichedTypograph
3
3
  import { Typography } from '@mui/material';
4
4
  import { memo } from 'react';
5
5
  import { useType } from '../utils';
6
- const ClueTypography = ({ children, value, context, field, obj, ...props }) => {
7
- const type = useType(obj, field, value);
6
+ const ClueTypography = ({ children, value, context, field, hit, ...props }) => {
7
+ const type = useType(hit, field, value);
8
8
  if (!type) {
9
9
  return _jsx(Typography, { ...props, children: children ?? value });
10
10
  }
@@ -1,3 +1,2 @@
1
1
  import type { Hit } from '@cccsaurora/howler-ui/models/entities/generated/Hit';
2
- import type { Observable } from '@cccsaurora/howler-ui/models/entities/generated/Observable';
3
- export declare const useType: (hit?: Hit | Observable, field?: string, value?: string) => any;
2
+ export declare const useType: (hit?: Hit, field?: string, value?: string) => any;
package/tests/mocks.d.ts CHANGED
@@ -7,17 +7,7 @@ export declare const setupContextSelectorMock: () => void;
7
7
  * Sets up a mock for react-router-dom with common defaults
8
8
  * @param options - Override specific router behavior
9
9
  */
10
- export declare const setupReactRouterMock: () => {
11
- mockSearchParams: URLSearchParams;
12
- mockSetParams: import("vitest").Mock<(...args: any[]) => any>;
13
- mockLocation: {
14
- pathname: string;
15
- search: string;
16
- };
17
- mockParams: {
18
- id: any;
19
- };
20
- };
10
+ export declare const setupReactRouterMock: () => void;
21
11
  /**
22
12
  * Sets up a mock localStorage instance
23
13
  */
package/tests/mocks.js CHANGED
@@ -31,20 +31,15 @@ export const setupReactRouterMock = () => {
31
31
  const mockSearchParams = vi.hoisted(() => new URLSearchParams());
32
32
  const mockSetParams = vi.hoisted(() => vi.fn());
33
33
  beforeAll(() => {
34
- vi.mock('react-router-dom', async () => {
35
- const actual = await vi.importActual('react-router-dom');
36
- return {
37
- ...actual,
38
- Link: forwardRef(({ to, children, ...props }, ref) => (_jsx("a", { ref: ref, href: to, ...props, children: children }))),
39
- useLocation: vi.fn(() => mockLocation),
40
- useParams: vi.fn(() => mockParams),
41
- useSearchParams: vi.fn(() => [mockSearchParams, mockSetParams]),
42
- useNavigate: () => vi.fn()
43
- };
44
- });
34
+ vi.mock('react-router-dom', () => ({
35
+ Link: forwardRef(({ to, children, ...props }, ref) => (_jsx("a", { ref: ref, href: to, ...props, children: children }))),
36
+ useLocation: vi.fn(() => mockLocation),
37
+ useParams: vi.fn(() => mockParams),
38
+ useSearchParams: vi.fn(() => [mockSearchParams, mockSetParams]),
39
+ useNavigate: () => vi.fn()
40
+ }));
45
41
  });
46
42
  afterAll(() => vi.resetModules());
47
- return { mockSearchParams, mockSetParams, mockLocation, mockParams };
48
43
  };
49
44
  /**
50
45
  * Sets up a mock localStorage instance
@@ -30,12 +30,7 @@ export const MOCK_RESPONSES = {
30
30
  total: 1,
31
31
  rows: 1
32
32
  },
33
- '/api/v1/analytic': [createMockAnalytic()],
34
- '/api/v2/search/hit,observable': {
35
- items: [],
36
- total: 0,
37
- rows: 0
38
- }
33
+ '/api/v1/analytic': [createMockAnalytic()]
39
34
  };
40
35
  const handlers = [
41
36
  ...Object.entries(MOCK_RESPONSES).map(([path, data]) => http.all(path, async () => HttpResponse.json({ api_response: data }))),
package/tests/utils.d.ts CHANGED
@@ -1,20 +1,16 @@
1
1
  import type { Action } from '@cccsaurora/howler-ui/models/entities/generated/Action';
2
2
  import type { Analytic } from '@cccsaurora/howler-ui/models/entities/generated/Analytic';
3
- import type { Case } from '@cccsaurora/howler-ui/models/entities/generated/Case';
4
3
  import type { Dossier } from '@cccsaurora/howler-ui/models/entities/generated/Dossier';
5
4
  import type { Hit } from '@cccsaurora/howler-ui/models/entities/generated/Hit';
6
- import type { Observable } from '@cccsaurora/howler-ui/models/entities/generated/Observable';
7
5
  import type { Template } from '@cccsaurora/howler-ui/models/entities/generated/Template';
8
6
  import type { View } from '@cccsaurora/howler-ui/models/entities/generated/View';
9
7
  type RecursivePartial<T> = {
10
8
  [P in keyof T]?: T[P] extends (infer U)[] ? RecursivePartial<U>[] : T[P] extends object | undefined ? RecursivePartial<T[P]> : T[P];
11
9
  };
12
10
  export declare const createMockHit: (overrides?: RecursivePartial<Hit>) => Hit;
13
- export declare const createMockObservable: (overrides?: RecursivePartial<Observable>) => Observable;
14
11
  export declare const createMockAnalytic: (overrides?: Partial<Analytic>) => Analytic;
15
12
  export declare const createMockTemplate: (overrides?: Partial<Template>) => Template;
16
13
  export declare const createMockAction: (overrides?: Partial<Action>) => Action;
17
14
  export declare const createMockView: (overrides?: Partial<View>) => View;
18
- export declare const createMockCase: (overrides?: Partial<Case>) => Case;
19
15
  export declare const createMockDossier: (overrides?: Partial<Dossier>) => Dossier;
20
16
  export {};
package/tests/utils.js CHANGED
@@ -1,7 +1,5 @@
1
1
  // Mock data factories
2
2
  export const createMockHit = (overrides) => ({
3
- ...overrides,
4
- __index: 'hit',
5
3
  howler: {
6
4
  id: 'test-hit-1',
7
5
  analytic: 'test-analytic',
@@ -16,17 +14,6 @@ export const createMockHit = (overrides) => ({
16
14
  ...overrides?.event
17
15
  }
18
16
  });
19
- export const createMockObservable = (overrides) => ({
20
- ...overrides,
21
- __index: 'observable',
22
- howler: {
23
- id: 'test-observable-1',
24
- analytic: 'test-analytic',
25
- detection: 'Test Detection',
26
- hash: '',
27
- ...overrides?.howler
28
- }
29
- });
30
17
  export const createMockAnalytic = (overrides) => ({
31
18
  analytic_id: 'test-analytic-id',
32
19
  name: 'test-analytic',
@@ -65,13 +52,6 @@ export const createMockView = (overrides) => ({
65
52
  },
66
53
  ...overrides
67
54
  });
68
- export const createMockCase = (overrides) => ({
69
- case_id: 'test-case-id',
70
- title: 'Test Case',
71
- summary: 'Test case summary',
72
- items: [],
73
- ...overrides
74
- });
75
55
  // Helper function to create mock dossiers
76
56
  export const createMockDossier = (overrides) => ({
77
57
  dossier_id: 'test-dossier-id',
@@ -5,9 +5,9 @@ export declare const VERSION: any;
5
5
  export declare const MY_LOCAL_STORAGE_PREFIX = "howler.ui";
6
6
  export declare const MY_SESSION_STORAGE_PREFIX = "howler.ui.cache";
7
7
  export declare const ESCALATION_COLORS: {
8
- alert: "warning";
9
- evidence: "error";
10
- hit: "primary";
8
+ alert: string;
9
+ evidence: string;
10
+ hit: string;
11
11
  };
12
12
  export declare const STATUS_COLORS: {
13
13
  open: string;
@@ -1,3 +1,2 @@
1
1
  import type { Hit } from '@cccsaurora/howler-ui/models/entities/generated/Hit';
2
- import type { Observable } from '@cccsaurora/howler-ui/models/entities/generated/Observable';
3
- export declare const getUserList: (record: Hit | Observable) => Set<string>;
2
+ export declare const getUserList: (hit: Hit) => Set<string>;
@@ -1,8 +1,8 @@
1
- export const getUserList = (record) => {
1
+ export const getUserList = (hit) => {
2
2
  const ids = new Set();
3
- if (record) {
4
- record.howler?.log?.forEach(l => ids.add(l.user));
5
- record.howler?.comment?.forEach(c => ids.add(c.user), ids);
3
+ if (hit) {
4
+ hit.howler?.log?.forEach(l => ids.add(l.user));
5
+ hit.howler?.comment?.forEach(c => ids.add(c.user), ids);
6
6
  }
7
7
  return ids;
8
8
  };
@@ -7,8 +7,5 @@ export const buildViewUrl = (view) => {
7
7
  if (view.sort) {
8
8
  params.set('sort', view.sort);
9
9
  }
10
- if (view.indexes && view.indexes.length > 0) {
11
- view.indexes.forEach(index => params.append('index', index));
12
- }
13
10
  return `/search?${params.toString()}`;
14
11
  };
@@ -1,4 +0,0 @@
1
- import type { HowlerSearchRequest, HowlerSearchResponse } from '@cccsaurora/howler-ui/api/search';
2
- import type { Case } from '@cccsaurora/howler-ui/models/entities/generated/Case';
3
- export declare const uri: () => string;
4
- export declare const post: (request?: HowlerSearchRequest) => Promise<HowlerSearchResponse<Case>>;
@@ -1,8 +0,0 @@
1
- import { hpost, joinUri } from '@cccsaurora/howler-ui/api';
2
- import { uri as parentUri } from '@cccsaurora/howler-ui/api/search';
3
- export const uri = () => {
4
- return joinUri(parentUri(), 'case');
5
- };
6
- export const post = (request) => {
7
- return hpost(uri(), { ...(request || {}), query: request?.query || 'case_id:*' });
8
- };
@@ -1,8 +0,0 @@
1
- import * as items from '@cccsaurora/howler-ui/api/v2/case/items';
2
- import type { Case } from '@cccsaurora/howler-ui/models/entities/generated/Case';
3
- export declare const uri: (id?: string) => string;
4
- export declare const get: (id: string) => Promise<Case>;
5
- export declare const post: (newData: Partial<Case>) => Promise<Case>;
6
- export declare const put: (id: string, _case: Partial<Case>) => Promise<Case>;
7
- export declare const del: (id: string) => Promise<void>;
8
- export { items };
@@ -1,20 +0,0 @@
1
- // eslint-disable-next-line import/no-cycle
2
- import { hdelete, hget, hpost, hput, joinAllUri, joinUri } from '@cccsaurora/howler-ui/api';
3
- import { uri as parentUri } from '@cccsaurora/howler-ui/api/v2';
4
- import * as items from '@cccsaurora/howler-ui/api/v2/case/items';
5
- export const uri = (id) => {
6
- return id ? joinAllUri(parentUri(), 'case', id) : joinUri(parentUri(), 'case');
7
- };
8
- export const get = (id) => {
9
- return hget(uri(id));
10
- };
11
- export const post = (newData) => {
12
- return hpost(uri(), newData);
13
- };
14
- export const put = (id, _case) => {
15
- return hput(uri(id), _case);
16
- };
17
- export const del = (id) => {
18
- return hdelete(uri(id));
19
- };
20
- export { items };
@@ -1,6 +0,0 @@
1
- import type { Case } from '@cccsaurora/howler-ui/models/entities/generated/Case';
2
- import type { Item } from '@cccsaurora/howler-ui/models/entities/generated/Item';
3
- export declare const uri: (id: string) => string;
4
- export declare const post: (id: string, newData: Item) => Promise<Case>;
5
- export declare const del: (id: string, values: string | string[]) => Promise<Case>;
6
- export declare const patch: (id: string, value: string, newPath: string) => Promise<Case>;
@@ -1,18 +0,0 @@
1
- // eslint-disable-next-line import/no-cycle
2
- import { hdelete, hpatch, hpost, joinUri } from '@cccsaurora/howler-ui/api';
3
- import { uri as parentUri } from '@cccsaurora/howler-ui/api/v2/case';
4
- export const uri = (id) => {
5
- return joinUri(parentUri(id), 'items');
6
- };
7
- export const post = (id, newData) => {
8
- return hpost(uri(id), newData);
9
- };
10
- export const del = (id, values) => {
11
- if (!Array.isArray(values)) {
12
- values = [values];
13
- }
14
- return hdelete(uri(id), { values });
15
- };
16
- export const patch = (id, value, newPath) => {
17
- return hpatch(uri(id), { value, new_path: newPath });
18
- };
package/api/v2/index.d.ts DELETED
@@ -1,4 +0,0 @@
1
- import * as case_ from '@cccsaurora/howler-ui/api/v2/case';
2
- import * as search from '@cccsaurora/howler-ui/api/v2/search';
3
- export declare const uri: () => string;
4
- export { case_ as case, search };
package/api/v2/index.js DELETED
@@ -1,6 +0,0 @@
1
- import * as case_ from '@cccsaurora/howler-ui/api/v2/case';
2
- import * as search from '@cccsaurora/howler-ui/api/v2/search';
3
- export const uri = () => {
4
- return '/api/v2';
5
- };
6
- export { case_ as case, search };
@@ -1,3 +0,0 @@
1
- import type { HowlerFacetSearchRequest, HowlerFacetSearchResponse } from '@cccsaurora/howler-ui/api/search/facet';
2
- export declare const uri: (indexes: string[]) => string;
3
- export declare const post: (indexes: string | string[], request?: HowlerFacetSearchRequest) => Promise<HowlerFacetSearchResponse>;
@@ -1,12 +0,0 @@
1
- // eslint-disable-next-line import/no-cycle
2
- import { hpost, joinAllUri } from '@cccsaurora/howler-ui/api';
3
- import { uri as parentUri } from '@cccsaurora/howler-ui/api/v2';
4
- export const uri = (indexes) => {
5
- return joinAllUri(parentUri(), 'search', 'facet', indexes.join(','));
6
- };
7
- export const post = (indexes, request) => {
8
- if (typeof indexes === 'string') {
9
- indexes = indexes.split(',');
10
- }
11
- return hpost(uri(indexes), { ...(request || {}), query: request?.query || 'howler.id:*' });
12
- };
@@ -1,5 +0,0 @@
1
- import type { HowlerSearchRequest, HowlerSearchResponse } from '@cccsaurora/howler-ui/api/search';
2
- import * as facet from './facet';
3
- export declare const uri: (indexes: string[]) => string;
4
- export declare const post: <T = any>(indexes: string | string[], request?: HowlerSearchRequest) => Promise<HowlerSearchResponse<T>>;
5
- export { facet };
@@ -1,24 +0,0 @@
1
- // eslint-disable-next-line import/no-cycle
2
- import { hpost, joinAllUri } from '@cccsaurora/howler-ui/api';
3
- import { uri as parentUri } from '@cccsaurora/howler-ui/api/v2';
4
- import { identity, isNil } from 'lodash-es';
5
- import * as facet from './facet';
6
- export const uri = (indexes) => {
7
- return joinAllUri(parentUri(), 'search', indexes.join(','));
8
- };
9
- export const post = (indexes, request) => {
10
- if (isNil(indexes)) {
11
- throw new Error('Indexes cannot be null or undefined.');
12
- }
13
- if (typeof indexes === 'string') {
14
- indexes = indexes.split(',').filter(identity);
15
- }
16
- if (indexes.some(index => !['hit', 'observable', 'case'].includes(index))) {
17
- throw new Error('Only hit, case, and observable indexes should be used currently.');
18
- }
19
- if (indexes.length < 1) {
20
- throw new Error('indexes must have length of at least 1.');
21
- }
22
- return hpost(uri(indexes), { ...(request || {}), query: request?.query || 'howler.id:*' });
23
- };
24
- export { facet };
@@ -1,23 +0,0 @@
1
- import type { Hit } from '@cccsaurora/howler-ui/models/entities/generated/Hit';
2
- import type { Observable } from '@cccsaurora/howler-ui/models/entities/generated/Observable';
3
- import type { WithMetadata } from '@cccsaurora/howler-ui/models/WithMetadata';
4
- import type { FC, PropsWithChildren } from 'react';
5
- export interface RecordContextType {
6
- records: {
7
- [index: string]: Hit | Observable;
8
- };
9
- selectedRecords: (Hit | Observable)[];
10
- addRecordToSelection: (id: string) => void;
11
- removeRecordFromSelection: (id: string) => void;
12
- clearSelectedRecords: (except?: string) => void;
13
- loadRecords: (hits: (Hit | Observable)[]) => void;
14
- updateRecord: (newHit: Hit | Observable) => void;
15
- getRecord: (id: string, force?: boolean) => Promise<WithMetadata<Hit | Observable>>;
16
- }
17
- export declare const RecordContext: import("use-context-selector").Context<RecordContextType>;
18
- /**
19
- * Central repository for storing individual hit data across the application. Allows efficient retrieval of hits across componenents.
20
- */
21
- declare const RecordProvider: FC<PropsWithChildren>;
22
- export declare const useHitContextSelector: <Selected>(selector: (value: RecordContextType) => Selected) => Selected;
23
- export default RecordProvider;
@@ -1,56 +0,0 @@
1
- import { type SxProps } from '@mui/material';
2
- import type { ElementType, FC, MouseEventHandler, PropsWithChildren, ReactNode } from 'react';
3
- export type ContextMenuDivider = {
4
- kind: 'divider';
5
- id: string;
6
- sx?: SxProps;
7
- };
8
- export type ContextMenuLeafItem = {
9
- kind: 'item';
10
- id: string;
11
- icon?: ReactNode;
12
- label: ReactNode;
13
- disabled?: boolean;
14
- onClick?: () => void;
15
- /** When provided the item renders as a router Link instead of a button. */
16
- to?: string;
17
- };
18
- export type ContextMenuSubItem = {
19
- key: string;
20
- label: ReactNode;
21
- disabled?: boolean;
22
- onClick?: () => void;
23
- };
24
- export type ContextMenuSubmenuItem = {
25
- kind: 'submenu';
26
- /**
27
- * Identifier for this submenu. Used to derive:
28
- * - the MenuItem's DOM id (`${id}-menu-item`)
29
- * - the submenu Paper's DOM id (`${id}-submenu`)
30
- */
31
- id: string;
32
- icon?: ReactNode;
33
- label: ReactNode;
34
- disabled?: boolean;
35
- items: ContextMenuSubItem[];
36
- };
37
- export type ContextMenuEntry = ContextMenuDivider | ContextMenuLeafItem | ContextMenuSubmenuItem;
38
- interface ContextMenuProps {
39
- items: ContextMenuEntry[];
40
- /** Called after the menu opens, with the triggering event. */
41
- onOpen?: MouseEventHandler<HTMLElement>;
42
- /** Called when the menu closes. */
43
- onClose?: () => void;
44
- /** Wraps children + menu in this element. Defaults to Box. */
45
- Component?: ElementType;
46
- /** id applied to the wrapper element */
47
- id?: string;
48
- }
49
- /**
50
- * Generic context menu component that renders a MUI Menu from a declarative
51
- * items structure supporting leaf items, dividers, and single-level submenus.
52
- *
53
- * Submenus appear on hover and are positioned to avoid screen overflow.
54
- */
55
- declare const ContextMenu: FC<PropsWithChildren<ContextMenuProps>>;
56
- export default ContextMenu;