@cccsaurora/howler-ui 2.19.0-dev.1151 → 2.19.0-dev.1260
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/api/analytic/index.d.ts +2 -3
- package/api/analytic/index.js +1 -2
- package/api/index.d.ts +4 -0
- package/api/index.js +10 -2
- package/api/search/case.d.ts +4 -0
- package/api/search/case.js +8 -0
- package/api/search/facet/hit.d.ts +1 -3
- package/api/search/facet/index.d.ts +3 -1
- package/api/search/index.d.ts +3 -1
- package/api/search/index.js +2 -1
- package/api/socket/index.d.ts +3 -0
- package/api/socket/index.js +6 -0
- package/api/socket/viewers.d.ts +2 -0
- package/api/socket/viewers.js +8 -0
- package/api/socket/viewers.test.js +44 -0
- package/api/v2/case/index.d.ts +9 -0
- package/api/v2/case/index.js +21 -0
- package/api/v2/case/items.d.ts +9 -0
- package/api/v2/case/items.js +19 -0
- package/api/v2/case/rules.d.ts +6 -0
- package/api/v2/case/rules.js +18 -0
- package/api/v2/fuzzy.d.ts +17 -0
- package/api/v2/fuzzy.js +11 -0
- package/api/v2/index.d.ts +5 -0
- package/api/v2/index.js +7 -0
- package/api/v2/search/facet.d.ts +3 -0
- package/api/v2/search/facet.js +12 -0
- package/api/v2/search/index.d.ts +6 -0
- package/api/v2/search/index.js +24 -0
- package/commons/components/leftnav/LeftNavDrawer.js +1 -1
- package/components/app/App.js +49 -11
- package/components/app/hooks/useMatchers.d.ts +1 -1
- package/components/app/hooks/useMatchers.js +23 -11
- package/components/app/hooks/useMatchers.test.js +22 -22
- package/components/app/hooks/useTitle.js +5 -5
- package/components/app/providers/FavouritesProvider.js +2 -2
- package/components/app/providers/GridColumnsProvider.js +2 -2
- package/components/app/providers/GridColumnsProvider.test.js +3 -3
- package/components/app/providers/ModalProvider.d.ts +1 -0
- package/components/app/providers/ParameterProvider.d.ts +25 -3
- package/components/app/providers/ParameterProvider.js +163 -226
- package/components/app/providers/ParameterProvider.test.js +358 -94
- package/components/app/providers/RecordProvider.d.ts +23 -0
- package/components/app/providers/{HitProvider.js → RecordProvider.js} +46 -42
- package/components/app/providers/{HitSearchProvider.d.ts → RecordSearchProvider.d.ts} +6 -6
- package/components/app/providers/{HitSearchProvider.js → RecordSearchProvider.js} +22 -35
- package/components/app/providers/{HitSearchProvider.test.js → RecordSearchProvider.test.js} +52 -71
- package/components/app/providers/SearchResponseProvider.d.ts +4 -4
- package/components/app/providers/SearchResponseProvider.js +1 -1
- package/components/app/providers/SocketProvider.d.ts +11 -2
- package/components/app/providers/SocketProvider.js +18 -5
- package/components/app/providers/UserListProvider.js +28 -8
- package/components/app/providers/UserListProvider.test.js +150 -0
- package/components/elements/ContextMenu.d.ts +56 -0
- package/components/elements/ContextMenu.js +109 -0
- package/components/elements/ContextMenu.test.d.ts +1 -0
- package/components/elements/ContextMenu.test.js +215 -0
- package/components/{routes/overviews/OverviewEditor.js → elements/MarkdownEditor.js} +3 -3
- package/components/elements/ObjectDetails.d.ts +6 -0
- package/components/elements/{hit/HitDetails.js → ObjectDetails.js} +17 -17
- package/components/elements/PluginChip.d.ts +1 -1
- package/components/elements/PluginChip.js +0 -1
- package/components/elements/PluginTypography.d.ts +2 -1
- package/components/elements/PluginTypography.js +3 -2
- package/components/elements/UserList.d.ts +5 -2
- package/components/elements/UserList.js +33 -16
- package/components/elements/UserList.test.d.ts +1 -0
- package/components/elements/UserList.test.js +122 -0
- package/components/elements/addons/lists/TuiListElement.d.ts +1 -1
- package/components/elements/addons/lists/TuiListElement.js +0 -1
- package/components/elements/addons/search/SearchTotal.js +1 -1
- package/components/elements/addons/search/SearchTotal.test.js +2 -2
- package/components/elements/addons/search/phrase/Phrase.js +1 -1
- package/components/elements/case/CaseCard.d.ts +12 -0
- package/components/elements/case/CaseCard.js +43 -0
- package/components/elements/case/CasePreview.d.ts +6 -0
- package/components/elements/case/CasePreview.js +17 -0
- package/components/elements/case/StatusIcon.d.ts +5 -0
- package/components/elements/case/StatusIcon.js +13 -0
- package/components/elements/display/ChipPopper.d.ts +1 -1
- package/components/elements/display/ChipPopper.js +6 -5
- package/components/elements/display/Classification.js +1 -1
- package/components/elements/display/ClassificationChip.d.ts +14 -0
- package/components/elements/display/ClassificationChip.js +36 -0
- package/components/elements/display/HowlerCard.js +1 -1
- package/components/elements/display/HowlerCard.test.js +5 -9
- package/components/elements/display/ItemManager.js +2 -2
- package/components/elements/display/Modal.js +2 -0
- package/components/elements/display/QueryResultText.d.ts +1 -0
- package/components/elements/display/QueryResultText.js +2 -2
- package/components/elements/event/EventCard.d.ts +6 -0
- package/components/elements/event/EventCard.js +22 -0
- package/components/elements/event/EventPreview.d.ts +6 -0
- package/components/elements/event/EventPreview.js +12 -0
- package/components/elements/hit/HitActions.js +4 -4
- package/components/elements/hit/HitBanner.d.ts +1 -0
- package/components/elements/hit/HitBanner.js +31 -49
- package/components/elements/hit/HitCard.d.ts +4 -0
- package/components/elements/hit/HitCard.js +7 -7
- package/components/elements/hit/HitLabels.js +2 -2
- package/components/elements/hit/HitLabels.test.js +2 -2
- package/components/elements/hit/HitOutline.d.ts +1 -0
- package/components/elements/hit/HitOutline.js +3 -3
- package/components/elements/hit/{HitQuickSearch.d.ts → HitPreview.d.ts} +3 -3
- package/components/elements/hit/{HitQuickSearch.js → HitPreview.js} +10 -4
- package/components/elements/hit/HitSummary.d.ts +2 -1
- package/components/elements/hit/HitSummary.js +6 -5
- package/components/elements/hit/aggregate/HitGraph.js +8 -8
- package/components/elements/hit/elements/AnalyticLink.d.ts +9 -0
- package/components/elements/hit/elements/AnalyticLink.js +22 -0
- package/components/elements/hit/elements/{HitUsers.d.ts → Assigned.d.ts} +3 -4
- package/components/elements/hit/elements/Assigned.js +36 -0
- package/components/elements/hit/elements/Assigned.test.d.ts +1 -0
- package/components/elements/hit/elements/Assigned.test.js +65 -0
- package/components/elements/hit/grid/AddColumnModal.js +5 -4
- package/components/elements/hit/grid/EnhancedCell.d.ts +2 -1
- package/components/elements/hit/grid/EnhancedCell.js +2 -2
- package/components/elements/hit/grid/{HitRow.d.ts → RecordRow.d.ts} +3 -2
- package/components/elements/hit/grid/{HitRow.js → RecordRow.js} +11 -9
- package/components/elements/hit/grid/{HitTable.d.ts → RecordTable.d.ts} +5 -4
- package/components/elements/hit/grid/{HitTable.js → RecordTable.js} +13 -11
- package/components/elements/hit/outlines/DefaultOutline.js +1 -1
- package/components/elements/hit/related/RelatedRecords.js +63 -0
- package/components/elements/{hit/HitComments.d.ts → record/RecordComments.d.ts} +5 -4
- package/components/elements/{hit/HitComments.js → record/RecordComments.js} +29 -28
- package/components/elements/{hit/HitContextMenu.d.ts → record/RecordContextMenu.d.ts} +3 -3
- package/components/elements/record/RecordContextMenu.js +268 -0
- package/components/elements/record/RecordContextMenu.test.d.ts +1 -0
- package/components/elements/{hit/HitContextMenu.test.js → record/RecordContextMenu.test.js} +98 -43
- package/components/elements/record/RecordRelated.d.ts +7 -0
- package/components/elements/record/RecordRelated.js +34 -0
- package/components/elements/{hit/HitWorklog.d.ts → record/RecordWorklog.d.ts} +4 -3
- package/components/elements/{hit/HitWorklog.js → record/RecordWorklog.js} +15 -13
- package/components/elements/search/FuzzySearchBar.d.ts +7 -0
- package/components/elements/search/FuzzySearchBar.js +33 -0
- package/components/elements/search/FuzzySearchBar.test.d.ts +1 -0
- package/components/elements/search/FuzzySearchBar.test.js +87 -0
- package/components/elements/view/ViewTitle.d.ts +1 -0
- package/components/elements/view/ViewTitle.js +9 -2
- package/components/hooks/useHitActions.d.ts +1 -1
- package/components/hooks/useHitActions.js +4 -4
- package/components/hooks/useMyPreferences.js +10 -1
- package/components/hooks/useMySearch.js +2 -2
- package/components/hooks/useMySitemap.js +4 -1
- package/components/hooks/useMyTheme.js +9 -2
- package/components/hooks/{useHitSelection.d.ts → useRecordSelection.d.ts} +2 -2
- package/components/hooks/{useHitSelection.js → useRecordSelection.js} +12 -33
- package/components/hooks/useRelatedRecords.d.ts +13 -0
- package/components/hooks/useRelatedRecords.js +32 -0
- package/components/routes/action/edit/ActionEditor.js +2 -2
- package/components/routes/action/view/ActionSearch.js +1 -1
- package/components/routes/advanced/QueryBuilder.js +4 -27
- package/components/routes/advanced/QueryEditor.js +3 -3
- package/components/routes/advanced/historyCompletionProvider.js +3 -3
- package/components/routes/analytics/AnalyticDetails.js +6 -54
- package/components/routes/analytics/AnalyticSearch.js +9 -18
- package/components/routes/cases/CaseViewer.d.ts +2 -0
- package/components/routes/cases/CaseViewer.js +44 -0
- package/components/routes/cases/CaseViewer.test.d.ts +1 -0
- package/components/routes/cases/CaseViewer.test.js +133 -0
- package/components/routes/cases/Cases.d.ts +2 -0
- package/components/routes/cases/Cases.js +140 -0
- package/components/routes/cases/constants.d.ts +6 -0
- package/components/routes/cases/constants.js +6 -0
- package/components/routes/cases/detail/AlertPanel.d.ts +6 -0
- package/components/routes/cases/detail/AlertPanel.js +33 -0
- package/components/routes/cases/detail/AlertPanel.test.d.ts +1 -0
- package/components/routes/cases/detail/AlertPanel.test.js +107 -0
- package/components/routes/cases/detail/CaseDashboard.d.ts +7 -0
- package/components/routes/cases/detail/CaseDashboard.js +66 -0
- package/components/routes/cases/detail/CaseDashboard.test.d.ts +1 -0
- package/components/routes/cases/detail/CaseDashboard.test.js +218 -0
- package/components/routes/cases/detail/CaseDetails.d.ts +6 -0
- package/components/routes/cases/detail/CaseDetails.js +79 -0
- package/components/routes/cases/detail/CaseDetails.test.d.ts +1 -0
- package/components/routes/cases/detail/CaseDetails.test.js +145 -0
- package/components/routes/cases/detail/CaseObservables.d.ts +6 -0
- package/components/routes/cases/detail/CaseObservables.js +142 -0
- package/components/routes/cases/detail/CaseObservables.test.d.ts +1 -0
- package/components/routes/cases/detail/CaseObservables.test.js +169 -0
- package/components/routes/cases/detail/CaseOverview.d.ts +7 -0
- package/components/routes/cases/detail/CaseOverview.js +43 -0
- package/components/routes/cases/detail/CaseRules.d.ts +7 -0
- package/components/routes/cases/detail/CaseRules.js +55 -0
- package/components/routes/cases/detail/CaseRules.test.d.ts +1 -0
- package/components/routes/cases/detail/CaseRules.test.js +238 -0
- package/components/routes/cases/detail/CaseSearch.d.ts +3 -0
- package/components/routes/cases/detail/CaseSearch.js +78 -0
- package/components/routes/cases/detail/CaseSearch.test.d.ts +1 -0
- package/components/routes/cases/detail/CaseSearch.test.js +154 -0
- package/components/routes/cases/detail/CaseSidebar.d.ts +8 -0
- package/components/routes/cases/detail/CaseSidebar.js +147 -0
- package/components/routes/cases/detail/CaseSidebar.test.d.ts +1 -0
- package/components/routes/cases/detail/CaseSidebar.test.js +155 -0
- package/components/routes/cases/detail/CaseTask.d.ts +14 -0
- package/components/routes/cases/detail/CaseTask.js +71 -0
- package/components/routes/cases/detail/CaseTask.test.d.ts +1 -0
- package/components/routes/cases/detail/CaseTask.test.js +143 -0
- package/components/routes/cases/detail/CaseTimeline.d.ts +12 -0
- package/components/routes/cases/detail/CaseTimeline.js +106 -0
- package/components/routes/cases/detail/CaseTimeline.test.d.ts +1 -0
- package/components/routes/cases/detail/CaseTimeline.test.js +320 -0
- package/components/routes/cases/detail/CreateRuleDialog.d.ts +9 -0
- package/components/routes/cases/detail/CreateRuleDialog.js +145 -0
- package/components/routes/cases/detail/CreateRuleDialog.test.d.ts +1 -0
- package/components/routes/cases/detail/CreateRuleDialog.test.js +284 -0
- package/components/routes/cases/detail/ItemPage.d.ts +6 -0
- package/components/routes/cases/detail/ItemPage.js +100 -0
- package/components/routes/cases/detail/ItemPage.test.d.ts +1 -0
- package/components/routes/cases/detail/ItemPage.test.js +238 -0
- package/components/routes/cases/detail/MarkdownPage.d.ts +8 -0
- package/components/routes/cases/detail/MarkdownPage.js +63 -0
- package/components/routes/cases/detail/MarkdownPage.test.d.ts +1 -0
- package/components/routes/cases/detail/MarkdownPage.test.js +116 -0
- package/components/routes/cases/detail/RelatedCasePanel.d.ts +6 -0
- package/components/routes/cases/detail/RelatedCasePanel.js +34 -0
- package/components/routes/cases/detail/RelatedCasePanel.test.d.ts +1 -0
- package/components/routes/cases/detail/RelatedCasePanel.test.js +115 -0
- package/components/routes/cases/detail/TaskPanel.d.ts +7 -0
- package/components/routes/cases/detail/TaskPanel.js +95 -0
- package/components/routes/cases/detail/TaskPanel.test.d.ts +1 -0
- package/components/routes/cases/detail/TaskPanel.test.js +145 -0
- package/components/routes/cases/detail/aggregates/CaseAggregate.d.ts +11 -0
- package/components/routes/cases/detail/aggregates/CaseAggregate.js +24 -0
- package/components/routes/cases/detail/aggregates/SourceAggregate.d.ts +6 -0
- package/components/routes/cases/detail/aggregates/SourceAggregate.js +26 -0
- package/components/routes/cases/detail/observables/Observable.d.ts +8 -0
- package/components/routes/cases/detail/observables/Observable.js +13 -0
- package/components/routes/cases/detail/observables/Observable.test.d.ts +1 -0
- package/components/routes/cases/detail/observables/Observable.test.js +72 -0
- package/components/routes/cases/detail/observables/ObservableTable.d.ts +7 -0
- package/components/routes/cases/detail/observables/ObservableTable.js +61 -0
- package/components/routes/cases/detail/observables/ObservableTable.test.d.ts +1 -0
- package/components/routes/cases/detail/observables/ObservableTable.test.js +85 -0
- package/components/routes/cases/detail/sidebar/CaseFolder.d.ts +22 -0
- package/components/routes/cases/detail/sidebar/CaseFolder.js +105 -0
- package/components/routes/cases/detail/sidebar/CaseFolder.test.d.ts +1 -0
- package/components/routes/cases/detail/sidebar/CaseFolder.test.js +98 -0
- package/components/routes/cases/detail/sidebar/CaseFolderContextMenu.d.ts +32 -0
- package/components/routes/cases/detail/sidebar/CaseFolderContextMenu.js +99 -0
- package/components/routes/cases/detail/sidebar/CaseFolderContextMenu.test.d.ts +1 -0
- package/components/routes/cases/detail/sidebar/CaseFolderContextMenu.test.js +117 -0
- package/components/routes/cases/detail/sidebar/FolderEntry.d.ts +25 -0
- package/components/routes/cases/detail/sidebar/FolderEntry.js +89 -0
- package/components/routes/cases/detail/sidebar/FolderEntry.test.d.ts +1 -0
- package/components/routes/cases/detail/sidebar/FolderEntry.test.js +81 -0
- package/components/routes/cases/detail/sidebar/RootDropZone.d.ts +5 -0
- package/components/routes/cases/detail/sidebar/RootDropZone.js +33 -0
- package/components/routes/cases/detail/sidebar/types.d.ts +9 -0
- package/components/routes/cases/detail/sidebar/utils.d.ts +10 -0
- package/components/routes/cases/detail/sidebar/utils.js +51 -0
- package/components/routes/cases/detail/sidebar/utils.test.d.ts +1 -0
- package/components/routes/cases/detail/sidebar/utils.test.js +82 -0
- package/components/routes/cases/detail/types.d.ts +24 -0
- package/components/routes/cases/detail/utils.d.ts +29 -0
- package/components/routes/cases/detail/utils.js +114 -0
- package/components/routes/cases/detail/utils.test.d.ts +1 -0
- package/components/routes/cases/detail/utils.test.js +144 -0
- package/components/routes/cases/hooks/useCase.d.ts +13 -0
- package/components/routes/cases/hooks/useCase.js +69 -0
- package/components/routes/cases/hooks/useCase.test.d.ts +1 -0
- package/components/routes/cases/hooks/useCase.test.js +141 -0
- package/components/routes/cases/modals/AddRecordToCaseModal.d.ts +7 -0
- package/components/routes/cases/modals/AddRecordToCaseModal.js +57 -0
- package/components/routes/cases/modals/AddRecordToCaseModal.test.d.ts +1 -0
- package/components/routes/cases/modals/AddRecordToCaseModal.test.js +309 -0
- package/components/routes/cases/modals/AddToCaseModal.d.ts +9 -0
- package/components/routes/cases/modals/AddToCaseModal.js +72 -0
- package/components/routes/cases/modals/CaseRecordRow.d.ts +9 -0
- package/components/routes/cases/modals/CaseRecordRow.js +14 -0
- package/components/routes/cases/modals/CreateCaseModal.d.ts +7 -0
- package/components/routes/cases/modals/CreateCaseModal.js +53 -0
- package/components/routes/cases/modals/CreateCaseModal.test.d.ts +1 -0
- package/components/routes/cases/modals/CreateCaseModal.test.js +319 -0
- package/components/routes/cases/modals/RenameItemModal.d.ts +9 -0
- package/components/routes/cases/modals/RenameItemModal.js +44 -0
- package/components/routes/cases/modals/ResolveModal.d.ts +7 -0
- package/components/routes/cases/modals/ResolveModal.js +120 -0
- package/components/routes/cases/modals/ResolveModal.test.d.ts +1 -0
- package/components/routes/cases/modals/ResolveModal.test.js +520 -0
- package/components/routes/cases/modals/hooks.d.ts +7 -0
- package/components/routes/cases/modals/hooks.js +40 -0
- package/components/routes/cases/modals/types.d.ts +13 -0
- package/components/routes/cases/search/CaseAssigneeFilter.d.ts +6 -0
- package/components/routes/cases/search/CaseAssigneeFilter.js +33 -0
- package/components/routes/cases/search/CaseAssigneeFilter.test.d.ts +1 -0
- package/components/routes/cases/search/CaseAssigneeFilter.test.js +127 -0
- package/components/routes/cases/search/CaseDateFilter.d.ts +13 -0
- package/components/routes/cases/search/CaseDateFilter.js +26 -0
- package/components/routes/cases/search/CaseDateFilter.test.d.ts +1 -0
- package/components/routes/cases/search/CaseDateFilter.test.js +115 -0
- package/components/routes/cases/search/CaseStatusFilter.d.ts +6 -0
- package/components/routes/cases/search/CaseStatusFilter.js +13 -0
- package/components/routes/cases/search/CaseStatusFilter.test.d.ts +1 -0
- package/components/routes/cases/search/CaseStatusFilter.test.js +86 -0
- package/components/routes/cases/utils.d.ts +3 -0
- package/components/routes/cases/utils.js +21 -0
- package/components/routes/dossiers/DossierEditor.js +2 -2
- package/components/routes/dossiers/DossierEditor.test.js +1 -1
- package/components/routes/events/EventViewer.d.ts +7 -0
- package/components/routes/events/EventViewer.js +24 -0
- package/components/routes/help/ApiDocumentation.js +1 -1
- package/components/routes/help/HitBannerDocumentation.js +1 -0
- package/components/routes/help/HitDocumentation.js +1 -3
- package/components/routes/help/OverviewDocumentation.d.ts +1 -1
- package/components/routes/help/OverviewDocumentation.js +0 -1
- package/components/routes/hits/search/InformationPane.d.ts +1 -0
- package/components/routes/hits/search/InformationPane.js +51 -64
- package/components/routes/hits/search/QuerySettings.js +2 -1
- package/components/routes/hits/search/QuerySettings.test.js +14 -9
- package/components/routes/hits/search/{HitBrowser.js → RecordBrowser.js} +11 -11
- package/components/routes/hits/search/{HitQuery.d.ts → RecordQuery.d.ts} +2 -2
- package/components/routes/hits/search/{HitQuery.js → RecordQuery.js} +6 -6
- package/components/routes/hits/search/SearchPane.js +24 -46
- package/components/routes/hits/search/ViewLink.js +4 -4
- package/components/routes/hits/search/ViewLink.test.js +8 -9
- package/components/routes/hits/search/grid/RecordGrid.d.ts +3 -0
- package/components/routes/hits/search/grid/{HitGrid.js → RecordGrid.js} +15 -15
- package/components/routes/hits/search/shared/CustomSpan.test.js +3 -4
- package/components/routes/hits/search/shared/IndexPicker.d.ts +8 -0
- package/components/routes/hits/search/shared/IndexPicker.js +21 -0
- package/components/routes/hits/search/shared/LayoutSettings.js +3 -3
- package/components/routes/hits/search/shared/SearchActionMenu.js +3 -9
- package/components/routes/hits/view/HitViewer.js +13 -14
- package/components/routes/home/ViewCard.js +47 -41
- package/components/routes/overviews/OverviewViewer.js +4 -4
- package/components/routes/views/ViewComposer.js +49 -23
- package/locales/en/translation.json +171 -27
- package/locales/fr/translation.json +169 -25
- package/models/WithMetadata.d.ts +2 -1
- package/models/entities/generated/Analytic.d.ts +0 -3
- package/models/entities/generated/ApiType.d.ts +3 -1
- package/models/entities/generated/AttachmentsFile.d.ts +12 -0
- package/models/entities/generated/Case.d.ts +29 -0
- package/models/entities/generated/DestinationOriginal.d.ts +19 -0
- package/models/entities/generated/ECSEvent.d.ts +31 -0
- package/models/entities/generated/EmailAttachment.d.ts +8 -0
- package/models/entities/generated/EmailParent.d.ts +19 -0
- package/models/entities/generated/Enrichments.d.ts +7 -0
- package/models/entities/generated/EnrichmentsIndicator.d.ts +21 -0
- package/models/entities/generated/Event.d.ts +80 -26
- package/models/entities/generated/EventCloud.d.ts +20 -0
- package/models/entities/generated/EventDestination.d.ts +23 -0
- package/models/entities/generated/EventEmail.d.ts +30 -0
- package/models/entities/generated/EventFile.d.ts +36 -0
- package/models/entities/generated/EventHowler.d.ts +42 -0
- package/models/entities/generated/EventHttp.d.ts +11 -0
- package/models/entities/generated/EventObserver.d.ts +21 -0
- package/models/entities/generated/EventOrganization.d.ts +7 -0
- package/models/entities/generated/EventProcess.d.ts +34 -0
- package/models/entities/generated/EventSource.d.ts +23 -0
- package/models/entities/generated/EventThreat.d.ts +21 -0
- package/models/entities/generated/EventTls.d.ts +12 -0
- package/models/entities/generated/Hit.d.ts +3 -2
- package/models/entities/generated/Howler.d.ts +0 -5
- package/models/entities/generated/HttpResponse.d.ts +11 -0
- package/models/entities/generated/Item.d.ts +12 -0
- package/models/entities/generated/ObserverIngress.d.ts +9 -0
- package/models/entities/generated/Rule.d.ts +8 -9
- package/models/entities/generated/Task.d.ts +10 -0
- package/models/entities/generated/Threat.d.ts +2 -2
- package/models/entities/generated/{Enrichment.d.ts → ThreatEnrichment.d.ts} +1 -1
- package/models/entities/generated/View.d.ts +1 -0
- package/models/socket/CaseUpdate.d.ts +5 -0
- package/models/socket/ViewersUpdate.d.ts +4 -0
- package/package.json +112 -91
- package/plugins/clue/components/ClueTypography.js +2 -2
- package/plugins/clue/index.d.ts +1 -1
- package/plugins/clue/index.js +0 -1
- package/plugins/clue/utils.d.ts +2 -1
- package/tests/mocks.d.ts +11 -1
- package/tests/mocks.js +12 -7
- package/tests/server-handlers.js +11 -1
- package/tests/utils.d.ts +4 -0
- package/tests/utils.js +21 -0
- package/utils/classificationParser.d.ts +195 -0
- package/utils/classificationParser.js +680 -0
- package/utils/constants.d.ts +4 -3
- package/utils/constants.js +6 -0
- package/utils/recordFunctions.d.ts +3 -0
- package/utils/recordFunctions.js +8 -0
- package/utils/recordFunctions.test.d.ts +1 -0
- package/utils/{hitFunctions.test.js → recordFunctions.test.js} +1 -1
- package/utils/socketUtils.d.ts +14 -0
- package/utils/socketUtils.js +17 -1
- package/utils/socketUtils.test.js +49 -16
- package/utils/typeUtils.d.ts +7 -0
- package/utils/typeUtils.js +27 -0
- package/utils/viewUtils.js +3 -0
- package/api/analytic/rules.d.ts +0 -4
- package/api/analytic/rules.js +0 -8
- package/components/app/providers/HitProvider.d.ts +0 -22
- package/components/elements/display/icons/BundleButton.d.ts +0 -6
- package/components/elements/display/icons/BundleButton.js +0 -32
- package/components/elements/hit/HitContextMenu.js +0 -239
- package/components/elements/hit/HitRelated.d.ts +0 -6
- package/components/elements/hit/HitRelated.js +0 -7
- package/components/elements/hit/elements/HitUsers.js +0 -33
- package/components/routes/advanced/RuleModal.d.ts +0 -7
- package/components/routes/advanced/RuleModal.js +0 -83
- package/components/routes/analytics/RuleView.d.ts +0 -8
- package/components/routes/analytics/RuleView.js +0 -48
- package/components/routes/help/BundleDocumentation.d.ts +0 -3
- package/components/routes/help/BundleDocumentation.js +0 -12
- package/components/routes/help/markdown/en/bundles.md.js +0 -1
- package/components/routes/help/markdown/fr/bundles.md.js +0 -1
- package/components/routes/hits/search/BundleScroller.d.ts +0 -2
- package/components/routes/hits/search/BundleScroller.js +0 -6
- package/components/routes/hits/search/grid/HitGrid.d.ts +0 -3
- package/components/routes/hits/search/shared/BundleParentMenu.d.ts +0 -6
- package/components/routes/hits/search/shared/BundleParentMenu.js +0 -32
- package/utils/hitFunctions.d.ts +0 -2
- package/utils/hitFunctions.js +0 -8
- /package/{components/app/providers/HitSearchProvider.test.d.ts → api/socket/viewers.test.d.ts} +0 -0
- /package/components/{elements/hit/HitContextMenu.test.d.ts → app/providers/RecordSearchProvider.test.d.ts} +0 -0
- /package/{utils/hitFunctions.test.d.ts → components/app/providers/UserListProvider.test.d.ts} +0 -0
- /package/components/{routes/overviews/OverviewEditor.d.ts → elements/MarkdownEditor.d.ts} +0 -0
- /package/components/elements/hit/{HitDetails.d.ts → related/RelatedRecords.d.ts} +0 -0
- /package/components/routes/hits/search/{HitBrowser.d.ts → RecordBrowser.d.ts} +0 -0
package/api/analytic/index.d.ts
CHANGED
|
@@ -3,11 +3,10 @@ import * as comments from '@cccsaurora/howler-ui/api/analytic/comments';
|
|
|
3
3
|
import * as favourite from '@cccsaurora/howler-ui/api/analytic/favourite';
|
|
4
4
|
import * as notebooks from '@cccsaurora/howler-ui/api/analytic/notebooks';
|
|
5
5
|
import * as owner from '@cccsaurora/howler-ui/api/analytic/owner';
|
|
6
|
-
import * as rules from '@cccsaurora/howler-ui/api/analytic/rules';
|
|
7
6
|
import type { Analytic } from '@cccsaurora/howler-ui/models/entities/generated/Analytic';
|
|
8
|
-
export type EditOptions = Pick<Analytic, 'description' | '
|
|
7
|
+
export type EditOptions = Pick<Analytic, 'description' | 'triage_settings'>;
|
|
9
8
|
export declare const uri: (id?: string) => string;
|
|
10
9
|
export declare const get: (id?: string) => Promise<Analytic> | Promise<Analytic[]>;
|
|
11
10
|
export declare const put: (id: string, editData: EditOptions, refresh?: HowlerRefreshParam) => Promise<Analytic>;
|
|
12
11
|
export declare const del: (id: string, refresh?: HowlerRefreshParam) => Promise<void>;
|
|
13
|
-
export { comments, favourite, notebooks, owner
|
|
12
|
+
export { comments, favourite, notebooks, owner };
|
package/api/analytic/index.js
CHANGED
|
@@ -3,7 +3,6 @@ import * as comments from '@cccsaurora/howler-ui/api/analytic/comments';
|
|
|
3
3
|
import * as favourite from '@cccsaurora/howler-ui/api/analytic/favourite';
|
|
4
4
|
import * as notebooks from '@cccsaurora/howler-ui/api/analytic/notebooks';
|
|
5
5
|
import * as owner from '@cccsaurora/howler-ui/api/analytic/owner';
|
|
6
|
-
import * as rules from '@cccsaurora/howler-ui/api/analytic/rules';
|
|
7
6
|
export const uri = (id) => {
|
|
8
7
|
return id ? joinAllUri(parentUri(), 'analytic', id) : joinUri(parentUri(), 'analytic');
|
|
9
8
|
};
|
|
@@ -16,4 +15,4 @@ export const put = (id, editData, refresh) => {
|
|
|
16
15
|
export const del = (id, refresh) => {
|
|
17
16
|
return hdelete(uri(id), undefined, undefined, refresh ? new URLSearchParams({ refresh }) : undefined);
|
|
18
17
|
};
|
|
19
|
-
export { comments, favourite, notebooks, owner
|
|
18
|
+
export { comments, favourite, notebooks, owner };
|
package/api/index.d.ts
CHANGED
|
@@ -8,8 +8,10 @@ import * as hit from '@cccsaurora/howler-ui/api/hit';
|
|
|
8
8
|
import * as notebook from '@cccsaurora/howler-ui/api/notebook';
|
|
9
9
|
import * as overview from '@cccsaurora/howler-ui/api/overview';
|
|
10
10
|
import * as search from '@cccsaurora/howler-ui/api/search';
|
|
11
|
+
import * as socket from '@cccsaurora/howler-ui/api/socket';
|
|
11
12
|
import * as template from '@cccsaurora/howler-ui/api/template';
|
|
12
13
|
import * as user from '@cccsaurora/howler-ui/api/user';
|
|
14
|
+
import * as v2 from '@cccsaurora/howler-ui/api/v2';
|
|
13
15
|
import * as view from '@cccsaurora/howler-ui/api/view';
|
|
14
16
|
/**
|
|
15
17
|
* Defining the default export exposing all children routes of '/api/v1/'.
|
|
@@ -24,10 +26,12 @@ declare const api: {
|
|
|
24
26
|
hit: typeof hit;
|
|
25
27
|
overview: typeof overview;
|
|
26
28
|
search: typeof search;
|
|
29
|
+
socket: typeof socket;
|
|
27
30
|
template: typeof template;
|
|
28
31
|
user: typeof user;
|
|
29
32
|
view: typeof view;
|
|
30
33
|
notebook: typeof notebook;
|
|
34
|
+
v2: typeof v2;
|
|
31
35
|
};
|
|
32
36
|
/**
|
|
33
37
|
* The specification interface of an Howler HTTP response.
|
package/api/index.js
CHANGED
|
@@ -8,8 +8,10 @@ import * as hit from '@cccsaurora/howler-ui/api/hit';
|
|
|
8
8
|
import * as notebook from '@cccsaurora/howler-ui/api/notebook';
|
|
9
9
|
import * as overview from '@cccsaurora/howler-ui/api/overview';
|
|
10
10
|
import * as search from '@cccsaurora/howler-ui/api/search';
|
|
11
|
+
import * as socket from '@cccsaurora/howler-ui/api/socket';
|
|
11
12
|
import * as template from '@cccsaurora/howler-ui/api/template';
|
|
12
13
|
import * as user from '@cccsaurora/howler-ui/api/user';
|
|
14
|
+
import * as v2 from '@cccsaurora/howler-ui/api/v2';
|
|
13
15
|
import * as view from '@cccsaurora/howler-ui/api/view';
|
|
14
16
|
import AxiosClient from '@cccsaurora/howler-ui/rest/AxiosClient';
|
|
15
17
|
import urlJoin from 'url-join';
|
|
@@ -35,10 +37,12 @@ const api = {
|
|
|
35
37
|
hit,
|
|
36
38
|
overview,
|
|
37
39
|
search,
|
|
40
|
+
socket,
|
|
38
41
|
template,
|
|
39
42
|
user,
|
|
40
43
|
view,
|
|
41
|
-
notebook
|
|
44
|
+
notebook,
|
|
45
|
+
v2
|
|
42
46
|
};
|
|
43
47
|
/**
|
|
44
48
|
* The base section of the Howler API uri.
|
|
@@ -57,7 +61,11 @@ export const uri = () => {
|
|
|
57
61
|
* @returns `string` - properly formatted howler uri.
|
|
58
62
|
*/
|
|
59
63
|
const format = (_uri) => {
|
|
60
|
-
|
|
64
|
+
// skip validation if we're hitting the socket endpoints
|
|
65
|
+
if (_uri.startsWith('/socket')) {
|
|
66
|
+
return _uri;
|
|
67
|
+
}
|
|
68
|
+
return _uri.startsWith('/api') ? _uri : `${uri()}/${_uri.replace(/\/$/, '')}`;
|
|
61
69
|
};
|
|
62
70
|
/**
|
|
63
71
|
* Append series of search parameters to the specified uri.
|
|
@@ -0,0 +1,4 @@
|
|
|
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>>;
|
|
@@ -0,0 +1,8 @@
|
|
|
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,5 +1,3 @@
|
|
|
1
1
|
import type { HowlerFacetSearchRequest, HowlerFacetSearchResponse } from '@cccsaurora/howler-ui/api/search/facet';
|
|
2
2
|
export declare const uri: () => string;
|
|
3
|
-
export declare const post: (request?: HowlerFacetSearchRequest) => Promise<
|
|
4
|
-
[index: string]: HowlerFacetSearchResponse;
|
|
5
|
-
}>;
|
|
3
|
+
export declare const post: (request?: HowlerFacetSearchRequest) => Promise<HowlerFacetSearchResponse>;
|
package/api/search/index.d.ts
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import * as action from '@cccsaurora/howler-ui/api/search/action';
|
|
2
2
|
import * as analytic from '@cccsaurora/howler-ui/api/search/analytic';
|
|
3
|
+
import * as case_ from '@cccsaurora/howler-ui/api/search/case';
|
|
3
4
|
import * as count from '@cccsaurora/howler-ui/api/search/count';
|
|
4
5
|
import * as dossier from '@cccsaurora/howler-ui/api/search/dossier';
|
|
5
6
|
import * as facet from '@cccsaurora/howler-ui/api/search/facet';
|
|
@@ -22,6 +23,7 @@ export type HowlerSearchRequest = {
|
|
|
22
23
|
timeout?: number;
|
|
23
24
|
filters?: string[];
|
|
24
25
|
metadata?: string[];
|
|
26
|
+
indexes?: string[];
|
|
25
27
|
};
|
|
26
28
|
export type HowlerSearchResponse<T> = {
|
|
27
29
|
items: T[];
|
|
@@ -60,4 +62,4 @@ export type HowlerExplainSearchResponse = {
|
|
|
60
62
|
explanation: string;
|
|
61
63
|
}[];
|
|
62
64
|
};
|
|
63
|
-
export { action, analytic, count, dossier, facet, fields, grouped, histogram, hit, overview, template, user, view };
|
|
65
|
+
export { action, analytic, case_ as case, count, dossier, facet, fields, grouped, histogram, hit, overview, template, user, view };
|
package/api/search/index.js
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { joinUri, uri as parentUri } from '@cccsaurora/howler-ui/api';
|
|
2
2
|
import * as action from '@cccsaurora/howler-ui/api/search/action';
|
|
3
3
|
import * as analytic from '@cccsaurora/howler-ui/api/search/analytic';
|
|
4
|
+
import * as case_ from '@cccsaurora/howler-ui/api/search/case';
|
|
4
5
|
import * as count from '@cccsaurora/howler-ui/api/search/count';
|
|
5
6
|
import * as dossier from '@cccsaurora/howler-ui/api/search/dossier';
|
|
6
7
|
import * as facet from '@cccsaurora/howler-ui/api/search/facet';
|
|
@@ -15,4 +16,4 @@ import * as view from '@cccsaurora/howler-ui/api/search/view';
|
|
|
15
16
|
export const uri = () => {
|
|
16
17
|
return joinUri(parentUri(), 'search');
|
|
17
18
|
};
|
|
18
|
-
export { action, analytic, count, dossier, facet, fields, grouped, histogram, hit, overview, template, user, view };
|
|
19
|
+
export { action, analytic, case_ as case, count, dossier, facet, fields, grouped, histogram, hit, overview, template, user, view };
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { hget, joinAllUri } from '@cccsaurora/howler-ui/api';
|
|
2
|
+
import { uri as parentUri } from '@cccsaurora/howler-ui/api/socket';
|
|
3
|
+
export const uri = (entityId) => {
|
|
4
|
+
return entityId ? joinAllUri(parentUri(), 'viewers', entityId) : joinAllUri(parentUri(), 'viewers');
|
|
5
|
+
};
|
|
6
|
+
export const get = async (entityId) => {
|
|
7
|
+
return hget(uri(entityId));
|
|
8
|
+
};
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
import { beforeEach, describe, expect, it, vi } from 'vitest';
|
|
2
|
+
// ---------------------------------------------------------------------------
|
|
3
|
+
// Hoisted mocks
|
|
4
|
+
// ---------------------------------------------------------------------------
|
|
5
|
+
const mockHget = vi.hoisted(() => vi.fn());
|
|
6
|
+
vi.mock('api', async () => {
|
|
7
|
+
const urlJoin = (await import('url-join')).default;
|
|
8
|
+
return {
|
|
9
|
+
hget: mockHget,
|
|
10
|
+
joinAllUri: (...parts) => urlJoin(...parts)
|
|
11
|
+
};
|
|
12
|
+
});
|
|
13
|
+
// ---------------------------------------------------------------------------
|
|
14
|
+
// Import after mocks
|
|
15
|
+
// ---------------------------------------------------------------------------
|
|
16
|
+
// eslint-disable-next-line
|
|
17
|
+
import { get } from './viewers';
|
|
18
|
+
// ---------------------------------------------------------------------------
|
|
19
|
+
// Setup
|
|
20
|
+
// ---------------------------------------------------------------------------
|
|
21
|
+
beforeEach(() => {
|
|
22
|
+
mockHget.mockReset();
|
|
23
|
+
});
|
|
24
|
+
// ---------------------------------------------------------------------------
|
|
25
|
+
// Tests
|
|
26
|
+
// ---------------------------------------------------------------------------
|
|
27
|
+
describe('viewers API', () => {
|
|
28
|
+
describe('get', () => {
|
|
29
|
+
it('calls hget with the correct URI', async () => {
|
|
30
|
+
mockHget.mockResolvedValue(['alice', 'bob']);
|
|
31
|
+
await get('entity-1');
|
|
32
|
+
expect(mockHget).toHaveBeenCalledWith('/socket/v1/viewers/entity-1');
|
|
33
|
+
});
|
|
34
|
+
it('returns the result from hget', async () => {
|
|
35
|
+
mockHget.mockResolvedValue(['alice', 'bob']);
|
|
36
|
+
const result = await get('entity-1');
|
|
37
|
+
expect(result).toEqual(['alice', 'bob']);
|
|
38
|
+
});
|
|
39
|
+
it('propagates errors from hget', async () => {
|
|
40
|
+
mockHget.mockRejectedValue(new Error('not found'));
|
|
41
|
+
await expect(get('entity-1')).rejects.toThrow('not found');
|
|
42
|
+
});
|
|
43
|
+
});
|
|
44
|
+
});
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import * as items from '@cccsaurora/howler-ui/api/v2/case/items';
|
|
2
|
+
import * as rules from '@cccsaurora/howler-ui/api/v2/case/rules';
|
|
3
|
+
import type { Case } from '@cccsaurora/howler-ui/models/entities/generated/Case';
|
|
4
|
+
export declare const uri: (id?: string) => string;
|
|
5
|
+
export declare const get: (id: string) => Promise<Case>;
|
|
6
|
+
export declare const post: (newData: Partial<Case>) => Promise<Case>;
|
|
7
|
+
export declare const put: (id: string, _case: Partial<Case>) => Promise<Case>;
|
|
8
|
+
export declare const del: (id: string) => Promise<void>;
|
|
9
|
+
export { items, rules };
|
|
@@ -0,0 +1,21 @@
|
|
|
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
|
+
import * as rules from '@cccsaurora/howler-ui/api/v2/case/rules';
|
|
6
|
+
export const uri = (id) => {
|
|
7
|
+
return id ? joinAllUri(parentUri(), 'case', id) : joinUri(parentUri(), 'case');
|
|
8
|
+
};
|
|
9
|
+
export const get = (id) => {
|
|
10
|
+
return hget(uri(id));
|
|
11
|
+
};
|
|
12
|
+
export const post = (newData) => {
|
|
13
|
+
return hpost(uri(), newData);
|
|
14
|
+
};
|
|
15
|
+
export const put = (id, _case) => {
|
|
16
|
+
return hput(uri(id), _case);
|
|
17
|
+
};
|
|
18
|
+
export const del = (id) => {
|
|
19
|
+
return hdelete(uri(id));
|
|
20
|
+
};
|
|
21
|
+
export { items, rules };
|
|
@@ -0,0 +1,9 @@
|
|
|
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, ids: string | string[], force?: boolean) => Promise<Case>;
|
|
6
|
+
export declare const put: (caseId: string, id: string, payload?: {
|
|
7
|
+
name?: string;
|
|
8
|
+
parent?: string;
|
|
9
|
+
}) => Promise<Case>;
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
// eslint-disable-next-line import/no-cycle
|
|
2
|
+
import { hdelete, hpost, hput, 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, ids, force = false) => {
|
|
11
|
+
if (!Array.isArray(ids)) {
|
|
12
|
+
ids = [ids];
|
|
13
|
+
}
|
|
14
|
+
return hdelete(uri(id), { ids, force });
|
|
15
|
+
};
|
|
16
|
+
export const put = (caseId, id, payload = {}) => {
|
|
17
|
+
payload.id = id;
|
|
18
|
+
return hput(uri(caseId), payload);
|
|
19
|
+
};
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import type { Case } from '@cccsaurora/howler-ui/models/entities/generated/Case';
|
|
2
|
+
import type { Rule } from '@cccsaurora/howler-ui/models/entities/generated/Rule';
|
|
3
|
+
export declare const uri: (caseId: string, ruleId?: string) => string;
|
|
4
|
+
export declare const post: (caseId: string, ruleData: Partial<Rule>) => Promise<Case>;
|
|
5
|
+
export declare const del: (caseId: string, ruleId: string) => Promise<Case>;
|
|
6
|
+
export declare const put: (caseId: string, ruleId: string, data: Partial<Rule>) => Promise<Case>;
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
// eslint-disable-next-line import/no-cycle
|
|
2
|
+
import { hdelete, hpost, hput, joinAllUri } from '@cccsaurora/howler-ui/api';
|
|
3
|
+
import { uri as parentUri } from '@cccsaurora/howler-ui/api/v2/case';
|
|
4
|
+
export const uri = (caseId, ruleId) => {
|
|
5
|
+
if (ruleId) {
|
|
6
|
+
return joinAllUri(parentUri(caseId), 'rules', ruleId);
|
|
7
|
+
}
|
|
8
|
+
return joinAllUri(parentUri(caseId), 'rules');
|
|
9
|
+
};
|
|
10
|
+
export const post = (caseId, ruleData) => {
|
|
11
|
+
return hpost(uri(caseId), ruleData);
|
|
12
|
+
};
|
|
13
|
+
export const del = (caseId, ruleId) => {
|
|
14
|
+
return hdelete(uri(caseId, ruleId));
|
|
15
|
+
};
|
|
16
|
+
export const put = (caseId, ruleId, data) => {
|
|
17
|
+
return hput(uri(caseId, ruleId), data);
|
|
18
|
+
};
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import type { HowlerSearchResponse } from '@cccsaurora/howler-ui/api/search';
|
|
2
|
+
import type { Case } from '@cccsaurora/howler-ui/models/entities/generated/Case';
|
|
3
|
+
import type { Event } from '@cccsaurora/howler-ui/models/entities/generated/Event';
|
|
4
|
+
import type { Hit } from '@cccsaurora/howler-ui/models/entities/generated/Hit';
|
|
5
|
+
export type FuzzySearchRequest = {
|
|
6
|
+
query: string;
|
|
7
|
+
indexes?: string[];
|
|
8
|
+
filters?: string[];
|
|
9
|
+
offset?: number;
|
|
10
|
+
rows?: number;
|
|
11
|
+
track_total_hits?: boolean;
|
|
12
|
+
};
|
|
13
|
+
export type FuzzySearchItem<T = Hit | Event | Case> = T & {
|
|
14
|
+
_score: number;
|
|
15
|
+
};
|
|
16
|
+
export declare const uri: () => string;
|
|
17
|
+
export declare const post: (request: FuzzySearchRequest) => Promise<HowlerSearchResponse<FuzzySearchItem>>;
|
package/api/v2/fuzzy.js
ADDED
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { hpost, joinAllUri } from '@cccsaurora/howler-ui/api';
|
|
2
|
+
import { uri as parentUri } from '@cccsaurora/howler-ui/api/v2';
|
|
3
|
+
export const uri = () => {
|
|
4
|
+
return joinAllUri(parentUri(), 'fuzzy');
|
|
5
|
+
};
|
|
6
|
+
export const post = (request) => {
|
|
7
|
+
if (!request.query || !request.query.trim()) {
|
|
8
|
+
throw new Error('Search query is required.');
|
|
9
|
+
}
|
|
10
|
+
return hpost(joinAllUri(uri(), 'search'), request);
|
|
11
|
+
};
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import * as case_ from '@cccsaurora/howler-ui/api/v2/case';
|
|
2
|
+
import * as fuzzy from '@cccsaurora/howler-ui/api/v2/fuzzy';
|
|
3
|
+
import * as search from '@cccsaurora/howler-ui/api/v2/search';
|
|
4
|
+
export declare const uri: () => string;
|
|
5
|
+
export { case_ as case, fuzzy, search };
|
package/api/v2/index.js
ADDED
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import * as case_ from '@cccsaurora/howler-ui/api/v2/case';
|
|
2
|
+
import * as fuzzy from '@cccsaurora/howler-ui/api/v2/fuzzy';
|
|
3
|
+
import * as search from '@cccsaurora/howler-ui/api/v2/search';
|
|
4
|
+
export const uri = () => {
|
|
5
|
+
return '/api/v2';
|
|
6
|
+
};
|
|
7
|
+
export { case_ as case, fuzzy, search };
|
|
@@ -0,0 +1,3 @@
|
|
|
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>;
|
|
@@ -0,0 +1,12 @@
|
|
|
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
|
+
};
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import type { HowlerSearchRequest, HowlerSearchResponse } from '@cccsaurora/howler-ui/api/search';
|
|
2
|
+
import * as facet from './facet';
|
|
3
|
+
export type SearchIndex = 'hit' | 'event' | 'case';
|
|
4
|
+
export declare const uri: (indexes: string[]) => string;
|
|
5
|
+
export declare const post: <T = any>(indexes: SearchIndex | SearchIndex[], request?: HowlerSearchRequest) => Promise<HowlerSearchResponse<T>>;
|
|
6
|
+
export { facet };
|
|
@@ -0,0 +1,24 @@
|
|
|
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', 'event', 'case'].includes(index))) {
|
|
17
|
+
throw new Error('Only hit, case, and event 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 };
|
|
@@ -75,7 +75,7 @@ const LeftNavDrawer = () => {
|
|
|
75
75
|
}
|
|
76
76
|
}, children: _jsx(AppName, {}) }), !isTopLayout && _jsx(Divider, {})] }));
|
|
77
77
|
const hide = (_jsx(List, { disablePadding: true, children: _jsxs(ListItemButton, { onClick: leftnav.toggle, children: [_jsx(ListItemIcon, { children: leftnav.open ? _jsx(ChevronLeftIcon, {}) : _jsx(ChevronRightIcon, {}) }), _jsx(ListItemText, { primary: t('drawer.collapse') })] }, "chevron") }));
|
|
78
|
-
return (_jsx(ClickAwayListener, { mouseEvent: "onMouseDown", touchEvent: "onTouchStart", onClickAway: onCloseDrawerIfOpen, children: _jsxs(StyledDrawer, {
|
|
78
|
+
return (_jsx(ClickAwayListener, { mouseEvent: "onMouseDown", touchEvent: "onTouchStart", onClickAway: onCloseDrawerIfOpen, children: _jsxs(StyledDrawer, { variant: "permanent", style: { height: '100%' }, width: preferences.leftnav.width, open: leftnav.open, children: [leftnav.open ? (header) : (_jsx(Tooltip, { title: preferences.appName, "aria-label": preferences.appName, placement: "right", children: header })), _jsx(List, { disablePadding: true, children: leftnav.elements.map((e, i) => {
|
|
79
79
|
if (e.type === 'item') {
|
|
80
80
|
const item = e.element;
|
|
81
81
|
return _jsx(LeftNavItem, { item: item, onClick: isSmDown && onCloseDrawerIfOpen }, item.id);
|
package/components/app/App.js
CHANGED
|
@@ -26,6 +26,14 @@ import UserSearchProvider from '@cccsaurora/howler-ui/components/routes/admin/us
|
|
|
26
26
|
import QueryBuilder from '@cccsaurora/howler-ui/components/routes/advanced/QueryBuilder';
|
|
27
27
|
import AnalyticDetails from '@cccsaurora/howler-ui/components/routes/analytics/AnalyticDetails';
|
|
28
28
|
import AnalyticSearch from '@cccsaurora/howler-ui/components/routes/analytics/AnalyticSearch';
|
|
29
|
+
import CaseViewer from '@cccsaurora/howler-ui/components/routes/cases/CaseViewer';
|
|
30
|
+
import Cases from '@cccsaurora/howler-ui/components/routes/cases/Cases';
|
|
31
|
+
import CaseDashboard from '@cccsaurora/howler-ui/components/routes/cases/detail/CaseDashboard';
|
|
32
|
+
import CaseObservables from '@cccsaurora/howler-ui/components/routes/cases/detail/CaseObservables';
|
|
33
|
+
import CaseRules from '@cccsaurora/howler-ui/components/routes/cases/detail/CaseRules';
|
|
34
|
+
import CaseSearch from '@cccsaurora/howler-ui/components/routes/cases/detail/CaseSearch';
|
|
35
|
+
import CaseTimeline from '@cccsaurora/howler-ui/components/routes/cases/detail/CaseTimeline';
|
|
36
|
+
import ItemPage from '@cccsaurora/howler-ui/components/routes/cases/detail/ItemPage';
|
|
29
37
|
import DossierEditor from '@cccsaurora/howler-ui/components/routes/dossiers/DossierEditor';
|
|
30
38
|
import Dossiers from '@cccsaurora/howler-ui/components/routes/dossiers/Dossiers';
|
|
31
39
|
import ActionDocumentation from '@cccsaurora/howler-ui/components/routes/help/ActionDocumentation';
|
|
@@ -40,7 +48,7 @@ import RetentionDocumentation from '@cccsaurora/howler-ui/components/routes/help
|
|
|
40
48
|
import SearchDocumentation from '@cccsaurora/howler-ui/components/routes/help/SearchDocumentation';
|
|
41
49
|
import TemplateDocumentation from '@cccsaurora/howler-ui/components/routes/help/TemplateDocumentation';
|
|
42
50
|
import ViewDocumentation from '@cccsaurora/howler-ui/components/routes/help/ViewDocumentation';
|
|
43
|
-
import
|
|
51
|
+
import RecordBrowser from '@cccsaurora/howler-ui/components/routes/hits/search/RecordBrowser';
|
|
44
52
|
import HitViewer from '@cccsaurora/howler-ui/components/routes/hits/view/HitViewer';
|
|
45
53
|
import Home from '@cccsaurora/howler-ui/components/routes/home';
|
|
46
54
|
import OverviewViewer from '@cccsaurora/howler-ui/components/routes/overviews/OverviewViewer';
|
|
@@ -75,12 +83,12 @@ import CustomPluginProvider from './providers/CustomPluginProvider';
|
|
|
75
83
|
import FavouriteProvider from './providers/FavouritesProvider';
|
|
76
84
|
import FieldProvider from './providers/FieldProvider';
|
|
77
85
|
import GridColumnsProvider from './providers/GridColumnsProvider';
|
|
78
|
-
import HitProvider from './providers/HitProvider';
|
|
79
|
-
import HitSearchProvider from './providers/HitSearchProvider';
|
|
80
86
|
import LocalStorageProvider from './providers/LocalStorageProvider';
|
|
81
87
|
import ModalProvider from './providers/ModalProvider';
|
|
82
88
|
import OverviewProvider from './providers/OverviewProvider';
|
|
83
89
|
import ParameterProvider from './providers/ParameterProvider';
|
|
90
|
+
import RecordProvider from './providers/RecordProvider';
|
|
91
|
+
import RecordSearchProvider from './providers/RecordSearchProvider';
|
|
84
92
|
import SocketProvider from './providers/SocketProvider';
|
|
85
93
|
import UserListProvider from './providers/UserListProvider';
|
|
86
94
|
import ViewProvider from './providers/ViewProvider';
|
|
@@ -162,7 +170,7 @@ const MyAppProvider = ({ children }) => {
|
|
|
162
170
|
const mySitemap = useMySitemap();
|
|
163
171
|
const myUser = useMyUser();
|
|
164
172
|
const mySearch = useMySearch();
|
|
165
|
-
return (_jsx(ErrorBoundary, { children: _jsx(AppProvider, { preferences: myPreferences, theme: myTheme, sitemap: mySitemap, user: myUser, search: mySearch, children: _jsx(CustomPluginProvider, { children: _jsx(ErrorBoundary, { children: _jsx(ErrorBoundary, { children: _jsx(ViewProvider, { children: _jsx(AvatarProvider, { children: _jsx(ModalProvider, { children: _jsx(FieldProvider, { children: _jsx(LocalStorageProvider, { children: _jsx(SocketProvider, { children: _jsx(
|
|
173
|
+
return (_jsx(ErrorBoundary, { children: _jsx(AppProvider, { preferences: myPreferences, theme: myTheme, sitemap: mySitemap, user: myUser, search: mySearch, children: _jsx(CustomPluginProvider, { children: _jsx(ErrorBoundary, { children: _jsx(ErrorBoundary, { children: _jsx(ViewProvider, { children: _jsx(AvatarProvider, { children: _jsx(ModalProvider, { children: _jsx(FieldProvider, { children: _jsx(LocalStorageProvider, { children: _jsx(SocketProvider, { children: _jsx(RecordProvider, { children: _jsx(OverviewProvider, { children: _jsx(AnalyticProvider, { children: _jsx(FavouriteProvider, { children: _jsx(UserListProvider, { children: children }) }) }) }) }) }) }) }) }) }) }) }) }) }) }) }));
|
|
166
174
|
};
|
|
167
175
|
const AppProviderWrapper = () => {
|
|
168
176
|
return (_jsx(I18nextProvider, { i18n: i18n, defaultNS: "translation", children: _jsx(ApiConfigProvider, { children: _jsx(PluginProvider, { pluginStore: howlerPluginStore.pluginStore, children: _jsx(AppBarProvider, { children: _jsxs(MyAppProvider, { children: [_jsx(MyApp, {}), _jsx(Modal, {})] }) }) }) }) }));
|
|
@@ -186,19 +194,49 @@ const createRouter = () => createBrowserRouter([
|
|
|
186
194
|
},
|
|
187
195
|
{
|
|
188
196
|
path: 'hits',
|
|
189
|
-
element: _jsx(
|
|
197
|
+
element: _jsx(RecordBrowser, {})
|
|
190
198
|
},
|
|
191
199
|
{
|
|
192
200
|
path: 'search',
|
|
193
|
-
element: _jsx(
|
|
201
|
+
element: _jsx(RecordBrowser, {})
|
|
194
202
|
},
|
|
195
203
|
{
|
|
196
204
|
path: 'hits/:id',
|
|
197
205
|
element: _jsx(HitViewer, {})
|
|
198
206
|
},
|
|
199
207
|
{
|
|
200
|
-
path: '
|
|
201
|
-
element: _jsx(
|
|
208
|
+
path: 'cases',
|
|
209
|
+
element: _jsx(Cases, {})
|
|
210
|
+
},
|
|
211
|
+
{
|
|
212
|
+
path: 'cases/:id',
|
|
213
|
+
element: (_jsx(ParameterProvider, { defaults: { query: '', indexes: ['hit', 'event', 'case'] }, children: _jsx(CaseViewer, {}) })),
|
|
214
|
+
children: [
|
|
215
|
+
{
|
|
216
|
+
index: true,
|
|
217
|
+
element: _jsx(CaseDashboard, {})
|
|
218
|
+
},
|
|
219
|
+
{
|
|
220
|
+
path: 'observables',
|
|
221
|
+
element: _jsx(CaseObservables, {})
|
|
222
|
+
},
|
|
223
|
+
{
|
|
224
|
+
path: 'timeline',
|
|
225
|
+
element: _jsx(CaseTimeline, {})
|
|
226
|
+
},
|
|
227
|
+
{
|
|
228
|
+
path: 'rules',
|
|
229
|
+
element: _jsx(CaseRules, {})
|
|
230
|
+
},
|
|
231
|
+
{
|
|
232
|
+
path: 'search',
|
|
233
|
+
element: _jsx(CaseSearch, {})
|
|
234
|
+
},
|
|
235
|
+
{
|
|
236
|
+
path: '*',
|
|
237
|
+
element: _jsx(ItemPage, {})
|
|
238
|
+
}
|
|
239
|
+
]
|
|
202
240
|
},
|
|
203
241
|
{
|
|
204
242
|
path: 'templates',
|
|
@@ -234,15 +272,15 @@ const createRouter = () => createBrowserRouter([
|
|
|
234
272
|
},
|
|
235
273
|
{
|
|
236
274
|
path: 'views/create',
|
|
237
|
-
element: (_jsx(ParameterProvider, { children: _jsx(
|
|
275
|
+
element: (_jsx(ParameterProvider, { children: _jsx(RecordSearchProvider, { children: _jsx(GridColumnsProvider, { viewSource: "path", children: _jsx(ViewComposer, {}) }) }) }))
|
|
238
276
|
},
|
|
239
277
|
{
|
|
240
278
|
path: 'views/:id',
|
|
241
|
-
element: _jsx(
|
|
279
|
+
element: _jsx(RecordBrowser, {})
|
|
242
280
|
},
|
|
243
281
|
{
|
|
244
282
|
path: 'views/:id/edit',
|
|
245
|
-
element: (_jsx(ParameterProvider, { children: _jsx(
|
|
283
|
+
element: (_jsx(ParameterProvider, { children: _jsx(RecordSearchProvider, { children: _jsx(GridColumnsProvider, { viewSource: "path", children: _jsx(ViewComposer, {}) }) }) }))
|
|
246
284
|
},
|
|
247
285
|
{
|
|
248
286
|
path: 'admin/users',
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { Hit } from '@cccsaurora/howler-ui/models/entities/generated/Hit';
|
|
2
2
|
import type { WithMetadata } from '@cccsaurora/howler-ui/models/WithMetadata';
|
|
3
|
-
declare const useMatchers: () => {
|
|
3
|
+
declare const useMatchers: (lazy?: boolean) => {
|
|
4
4
|
getMatchingDossiers: (hit: WithMetadata<Hit>) => Promise<import("../../../models/entities/generated/Dossier").Dossier[]>;
|
|
5
5
|
getMatchingOverview: (hit: WithMetadata<Hit>) => Promise<import("../../../models/entities/generated/Overview").Overview>;
|
|
6
6
|
getMatchingTemplate: (hit: WithMetadata<Hit>) => Promise<import("../../../models/entities/generated/Template").Template>;
|