@cccsaurora/howler-ui 3.1.0-dev.1493 → 3.1.0-dev.1607
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/action/execute.d.ts +1 -1
- package/api/action/index.d.ts +10 -6
- package/api/action/index.js +5 -9
- package/api/action/operations.js +2 -2
- package/api/analytic/comments/index.d.ts +4 -6
- package/api/analytic/comments/react.d.ts +2 -2
- package/api/analytic/favourite.d.ts +2 -4
- package/api/analytic/index.d.ts +7 -4
- package/api/analytic/index.js +2 -2
- package/api/analytic/notebooks/index.d.ts +2 -4
- package/api/analytic/owner.d.ts +1 -1
- package/api/auth/apikey.d.ts +2 -2
- package/api/auth/login.d.ts +2 -2
- package/api/configs/index.d.ts +1 -1
- package/api/dossier.d.ts +16 -0
- package/api/{dossier/index.js → dossier.js} +6 -4
- package/api/help.d.ts +2 -2
- package/api/hit/assign.d.ts +6 -2
- package/api/hit/comments/index.d.ts +4 -6
- package/api/hit/comments/react.d.ts +2 -2
- package/api/hit/index.d.ts +3 -8
- package/api/hit/labels.d.ts +2 -2
- package/api/hit/overwrite.d.ts +1 -1
- package/api/hit/transition.d.ts +1 -1
- package/api/index.d.ts +6 -6
- package/api/index.js +7 -6
- package/api/notebook/environments.d.ts +1 -1
- package/api/notebook/index.d.ts +1 -1
- package/api/overview/index.d.ts +4 -4
- package/api/search/action.d.ts +1 -1
- package/api/search/analytic.d.ts +1 -1
- package/api/search/case.d.ts +1 -1
- package/api/search/count/hit.d.ts +1 -1
- package/api/search/dossier.d.ts +1 -1
- package/api/search/eql/hit.d.ts +1 -1
- package/api/search/explain/hit.d.ts +1 -1
- package/api/search/facet/hit.d.ts +1 -1
- package/api/search/fields/hit.js +1 -2
- package/api/search/fields/user.js +2 -4
- package/api/search/grouped/hit.d.ts +1 -1
- package/api/search/grouped/user.js +3 -0
- package/api/search/histogram/hit.d.ts +1 -1
- package/api/search/hit.d.ts +1 -1
- package/api/search/overview.d.ts +1 -1
- package/api/search/sigma/hit.d.ts +1 -1
- package/api/search/template.d.ts +1 -1
- package/api/search/user.d.ts +30 -2
- package/api/search/user.js +3 -0
- package/api/search/view.d.ts +1 -1
- package/api/socket/viewers.d.ts +1 -1
- package/api/socket/viewers.js +1 -1
- package/api/template/index.d.ts +3 -3
- package/api/template/index.js +2 -2
- package/api/user/avatar/index.d.ts +1 -1
- package/api/user/groups.d.ts +1 -1
- package/api/user/index.d.ts +2 -2
- package/api/user/whoami.d.ts +1 -1
- package/api/utils/createPermissionsApi.d.ts +10 -0
- package/api/utils/createPermissionsApi.js +10 -0
- package/api/v2/case/index.d.ts +4 -4
- package/api/v2/case/items.d.ts +3 -3
- package/api/v2/case/rules.d.ts +3 -3
- package/api/v2/fuzzy.d.ts +1 -1
- package/api/v2/search/facet.d.ts +1 -1
- package/api/v2/search/index.d.ts +1 -1
- package/api/view/favourite.d.ts +2 -4
- package/api/view/index.d.ts +9 -5
- package/api/view/index.js +3 -1
- package/branding/AppBrand.d.ts +2 -2
- package/branding/AppBrand.js +4 -6
- package/components/app/App.js +248 -51
- package/components/app/AppContainer.js +1 -1
- package/components/app/drawers/ApiKeyDrawer.js +13 -5
- package/components/app/drawers/AssignUserDrawer.js +11 -4
- package/components/app/hooks/useMatchers.d.ts +3 -3
- package/components/app/hooks/useMatchers.js +12 -12
- package/components/app/hooks/useMatchers.test.js +15 -14
- package/components/app/hooks/useTitle.js +8 -7
- package/components/app/providers/AnalyticProvider.d.ts +1 -1
- package/components/app/providers/AnalyticProvider.js +7 -4
- package/components/app/providers/ApiConfigProvider.d.ts +2 -1
- package/components/app/providers/ApiConfigProvider.js +12 -10
- package/components/app/providers/AppDrawerProvider.js +2 -2
- package/components/app/providers/AvatarProvider.js +18 -11
- package/components/app/providers/FavouritesProvider.js +56 -86
- package/components/app/providers/FieldProvider.js +1 -1
- package/components/app/providers/GridColumnsProvider.d.ts +1 -1
- package/components/app/providers/GridColumnsProvider.js +17 -4
- package/components/app/providers/GridColumnsProvider.test.js +2 -1
- package/components/app/providers/LocalStorageProvider.d.ts +2 -2
- package/components/app/providers/LocalStorageProvider.js +4 -3
- package/components/app/providers/ModalProvider.js +8 -1
- package/components/app/providers/OverviewProvider.js +10 -2
- package/components/app/providers/ParameterProvider.d.ts +7 -7
- package/components/app/providers/ParameterProvider.js +42 -5
- package/components/app/providers/ParameterProvider.test.js +1 -0
- package/components/app/providers/RecordProvider.js +7 -1
- package/components/app/providers/RecordSearchProvider.d.ts +1 -2
- package/components/app/providers/RecordSearchProvider.js +32 -23
- package/components/app/providers/RecordSearchProvider.test.js +2 -1
- package/components/app/providers/SearchResponseProvider.d.ts +9 -6
- package/components/app/providers/SearchResponseProvider.js +37 -19
- package/components/app/providers/SearchResponseProvider.test.js +37 -11
- package/components/app/providers/SocketProvider.js +6 -4
- package/components/app/providers/UserListProvider.d.ts +1 -1
- package/components/app/providers/ViewProvider.d.ts +2 -2
- package/components/app/providers/ViewProvider.js +22 -12
- package/components/app/providers/ViewProvider.test.js +2 -2
- package/components/app/providers/contextUtils.d.ts +1 -0
- package/components/app/providers/contextUtils.js +3 -0
- package/components/elements/Comment.d.ts +1 -1
- package/components/elements/Comment.js +11 -9
- package/components/elements/ContextMenu.js +1 -1
- package/components/elements/ContextMenu.test.js +2 -2
- package/components/elements/EditRow.d.ts +9 -4
- package/components/elements/EditRow.js +5 -4
- package/components/elements/MarkdownEditor.js +1 -1
- package/components/elements/MembershipManagement.test.js +178 -0
- package/components/elements/ObjectDetails.js +6 -6
- package/components/elements/ThemedEditor.js +17 -17
- package/components/elements/UserList.d.ts +2 -0
- package/components/elements/UserList.js +26 -18
- package/components/elements/UserList.test.js +24 -1
- package/components/elements/addons/buttons/CustomButton.d.ts +1 -1
- package/components/elements/addons/buttons/CustomButton.js +2 -2
- package/components/elements/addons/buttons/CustomIconButton.d.ts +1 -1
- package/components/elements/addons/buttons/CustomIconButton.js +3 -3
- package/components/elements/addons/buttons/index.d.ts +1 -1
- package/components/elements/addons/layout/FlexOne.d.ts +2 -2
- package/components/elements/addons/layout/FlexOne.test.js +1 -0
- package/components/elements/addons/layout/FlexPort.d.ts +1 -1
- package/components/elements/addons/layout/FlexPort.js +9 -2
- package/components/elements/addons/layout/FlexVertical.d.ts +2 -2
- package/components/elements/addons/layout/FlexVertical.js +1 -1
- package/components/elements/addons/layout/vsbox/VSBox.d.ts +2 -2
- package/components/elements/addons/layout/vsbox/VSBox.js +5 -4
- package/components/elements/addons/layout/vsbox/VSBoxElement.d.ts +1 -1
- package/components/elements/addons/layout/vsbox/VSBoxHeader.js +4 -3
- package/components/elements/addons/lists/TuiList.d.ts +2 -2
- package/components/elements/addons/lists/TuiList.js +1 -1
- package/components/elements/addons/lists/TuiListBase.d.ts +2 -2
- package/components/elements/addons/lists/TuiListBase.js +4 -4
- package/components/elements/addons/lists/TuiListElement.d.ts +2 -2
- package/components/elements/addons/lists/TuiListElement.js +2 -2
- package/components/elements/addons/lists/TuiListMenu.d.ts +13 -37
- package/components/elements/addons/lists/TuiListMenu.js +8 -8
- package/components/elements/addons/lists/TuiListProvider.d.ts +2 -2
- package/components/elements/addons/lists/TuiListProvider.js +4 -4
- package/components/elements/addons/lists/hooks/useTuiListKeyboard.js +1 -1
- package/components/elements/addons/lists/table/TuiTable.d.ts +1 -1
- package/components/elements/addons/lists/table/TuiTable.js +1 -1
- package/components/elements/addons/lists/table/TuiTableBody.d.ts +1 -1
- package/components/elements/addons/lists/table/TuiTableBody.js +1 -1
- package/components/elements/addons/lists/table/TuiTableHead.d.ts +1 -1
- package/components/elements/addons/lists/table/TuiTableHead.js +1 -1
- package/components/elements/addons/lists/table/TuiTableHeader.d.ts +1 -1
- package/components/elements/addons/lists/table/TuiTableLayout.js +1 -1
- package/components/elements/addons/search/SearchPagination.d.ts +1 -1
- package/components/elements/addons/search/SearchPagination.test.js +1 -1
- package/components/elements/addons/search/SearchTotal.d.ts +1 -1
- package/components/elements/addons/search/phrase/Phrase.d.ts +2 -2
- package/components/elements/addons/search/phrase/Phrase.js +7 -7
- package/components/elements/addons/search/phrase/PhraseConsumer.d.ts +2 -2
- package/components/elements/addons/search/phrase/PhraseLexer.d.ts +1 -1
- package/components/elements/addons/search/phrase/PhraseLexer.js +6 -6
- package/components/elements/addons/search/phrase/WordLexer.test.js +1 -0
- package/components/elements/addons/search/phrase/index.d.ts +2 -2
- package/components/elements/addons/search/phrase/index.js +3 -2
- package/components/elements/addons/search/phrase/word/consumers/WhitespaceConsumer.d.ts +1 -1
- package/components/elements/addons/search/phrase/word/consumers/WhitespaceConsumer.js +1 -1
- package/components/elements/addons/search/phrase/word/consumers/WordConsumer.d.ts +1 -1
- package/components/elements/case/CaseCard.js +10 -4
- package/components/elements/case/CasePreview.js +1 -1
- package/components/elements/display/ActionButton.js +3 -1
- package/components/elements/display/ChipPopper.js +1 -1
- package/components/elements/display/ChipPopper.test.js +1 -0
- package/components/elements/display/Classification.js +6 -5
- package/components/elements/display/ClassificationChip.d.ts +2 -4
- package/components/elements/display/ClassificationChip.js +5 -3
- package/components/elements/display/DocumentationButton.js +1 -1
- package/components/elements/display/DocumentationButton.test.js +1 -1
- package/components/elements/display/HandlebarsMarkdown.js +2 -2
- package/components/elements/display/HowlerAvatar.d.ts +1 -0
- package/components/elements/display/HowlerAvatar.js +5 -4
- package/components/elements/display/HowlerAvatarHeader.js +2 -2
- package/components/elements/display/Image.test.js +1 -0
- package/components/elements/display/ItemManager.d.ts +6 -6
- package/components/elements/display/ItemManager.js +1 -1
- package/components/elements/display/Markdown.js +9 -3
- package/components/elements/display/Modal.js +3 -3
- package/components/elements/display/QueryResultText.js +1 -1
- package/components/elements/display/TextDivider.test.js +1 -0
- package/components/elements/display/TypingIndicator.d.ts +1 -1
- package/components/elements/display/UserPageWrapper.js +2 -2
- package/components/elements/display/handlebars/helpers.js +1 -1
- package/components/elements/display/json/JSONViewer.js +2 -2
- package/components/elements/display/markdownPlugins/tabs.js +4 -0
- package/components/elements/display/modals/CreateActionModal.js +1 -1
- package/components/elements/display/modals/RationaleModal.js +1 -2
- package/components/elements/display/modals/RationaleModal.test.js +9 -5
- package/components/elements/event/EventPreview.js +1 -1
- package/components/elements/hit/HitActions.js +5 -7
- package/components/elements/hit/HitBanner.js +4 -16
- package/components/elements/hit/HitBanner.test.js +11 -20
- package/components/elements/hit/HitLabels.js +23 -13
- package/components/elements/hit/HitLinks.js +4 -4
- package/components/elements/hit/HitNotebooks.js +28 -10
- package/components/elements/hit/HitOutline.js +9 -15
- package/components/elements/hit/HitOutline.test.js +5 -5
- package/components/elements/hit/HitOverview.js +3 -3
- package/components/elements/hit/HitPreview.d.ts +1 -1
- package/components/elements/hit/HitPreview.js +6 -7
- package/components/elements/hit/HitSummary.js +8 -8
- package/components/elements/hit/PivotTooltip.js +1 -1
- package/components/elements/hit/actions/ButtonActions.js +2 -2
- package/components/elements/hit/actions/DropdownActions.js +4 -4
- package/components/elements/hit/aggregate/HitGraph.js +28 -11
- package/components/elements/hit/elements/AnalyticLink.js +2 -2
- package/components/elements/hit/elements/AnalyticLink.test.js +1 -1
- package/components/elements/hit/elements/Assigned.js +1 -1
- package/components/elements/hit/elements/Assigned.test.js +1 -1
- package/components/elements/hit/elements/EscalationChip.js +2 -2
- package/components/elements/hit/elements/HitTimestamp.js +2 -2
- package/components/elements/hit/grid/AddColumnModal.js +2 -2
- package/components/elements/hit/grid/ColumnHeader.js +1 -1
- package/components/elements/hit/grid/RecordRow.js +1 -1
- package/components/elements/hit/grid/RecordTable.d.ts +4 -3
- package/components/elements/hit/grid/RecordTable.js +6 -6
- package/components/elements/hit/related/PivotLink.js +2 -2
- package/components/elements/hit/related/RelatedIcon.js +2 -2
- package/components/elements/hit/related/RelatedLink.js +1 -1
- package/components/elements/hit/related/RelatedRecords.js +1 -1
- package/components/elements/membership/Members.d.ts +6 -0
- package/components/elements/membership/Members.js +14 -0
- package/components/elements/membership/MembershipManagement.d.ts +9 -0
- package/components/elements/membership/MembershipManagement.js +119 -0
- package/components/elements/membership/types.d.ts +7 -0
- package/components/elements/membership/utils.d.ts +2 -0
- package/components/elements/membership/utils.js +6 -0
- package/components/elements/record/RecordComments.js +16 -10
- package/components/elements/record/RecordContextMenu.d.ts +2 -2
- package/components/elements/record/RecordContextMenu.js +11 -5
- package/components/elements/record/RecordContextMenu.test.js +14 -6
- package/components/elements/record/RecordRelated.js +2 -2
- package/components/elements/search/FuzzySearchBar.js +1 -1
- package/components/elements/view/LayoutToggle.d.ts +1 -1
- package/components/elements/view/ViewTitle.js +3 -4
- package/components/hooks/useHitActions.d.ts +1 -1
- package/components/hooks/useHitActions.js +25 -15
- package/components/hooks/useLocalStorage.d.ts +1 -1
- package/components/hooks/useLocalStorage.js +1 -1
- package/components/hooks/useLocalStorageItem.d.ts +11 -1
- package/components/hooks/useLocalStorageItem.js +7 -5
- package/components/hooks/useLocalStorageItem.test.js +23 -0
- package/components/hooks/useMyAccessibility.d.ts +7 -0
- package/components/hooks/useMyAccessibility.js +21 -0
- package/components/hooks/useMyApi.d.ts +1 -1
- package/components/hooks/useMyApi.js +4 -4
- package/components/hooks/useMyChart.d.ts +46 -48
- package/components/hooks/useMyChart.js +30 -9
- package/components/hooks/useMyCookies.d.ts +3 -0
- package/components/hooks/useMyCookies.js +8 -0
- package/components/hooks/useMyLocalStorage.d.ts +8 -2
- package/components/hooks/useMyLocalStorage.js +1 -1
- package/components/hooks/useMyPreferences.d.ts +1 -1
- package/components/hooks/useMyPreferences.js +93 -127
- package/components/hooks/useMyRouter.d.ts +2 -0
- package/components/hooks/useMyRouter.js +24 -0
- package/components/hooks/useMySearch.d.ts +1 -1
- package/components/hooks/useMySearch.js +17 -7
- package/components/hooks/useMySnackbar.js +1 -1
- package/components/hooks/useMyTheme.d.ts +1 -1
- package/components/hooks/useMyTheme.js +13 -8
- package/components/hooks/useMyTheme.test.js +11 -6
- package/components/hooks/useMyUser.d.ts +1 -1
- package/components/hooks/useMyUser.js +6 -5
- package/components/hooks/useMyUserFunctions.d.ts +2 -2
- package/components/hooks/useMyUserFunctions.js +14 -10
- package/components/hooks/useMyUserList.d.ts +1 -1
- package/components/hooks/useMyUtils.js +1 -1
- package/components/hooks/useParamState.js +5 -3
- package/components/hooks/useParamState.test.js +1 -1
- package/components/hooks/useRecordSelection.d.ts +4 -3
- package/components/hooks/useRecordSelection.js +5 -5
- package/components/hooks/useScrollRestoration.js +3 -3
- package/components/logins/Login.d.ts +1 -1
- package/components/logins/Login.js +4 -6
- package/components/logins/auth/OAuthLogin.js +1 -1
- package/components/logins/auth/UserPassLogin.d.ts +1 -1
- package/components/logins/hooks/useLogin.js +10 -6
- package/components/routes/403.js +1 -1
- package/components/routes/403.test.js +7 -3
- package/components/routes/404.js +1 -1
- package/components/routes/404.test.js +7 -3
- package/components/routes/ErrorBoundary.d.ts +2 -2
- package/components/routes/ErrorBoundary.js +2 -2
- package/components/routes/ErrorBoundary.test.js +1 -4
- package/components/routes/ErrorOccured.js +1 -1
- package/components/routes/ErrorOccured.test.js +7 -3
- package/components/routes/Logout.js +3 -4
- package/components/routes/Logout.test.js +12 -11
- package/components/routes/action/edit/ActionEditor.js +38 -30
- package/components/routes/action/shared/ActionReportDisplay.js +1 -1
- package/components/routes/action/shared/OperationEntry.js +2 -2
- package/components/routes/action/shared/OperationStep.js +12 -10
- package/components/routes/action/useMyActionFunctions.d.ts +3 -3
- package/components/routes/action/useMyActionFunctions.js +13 -13
- package/components/routes/action/view/ActionDetails.d.ts +1 -1
- package/components/routes/action/view/ActionDetails.js +46 -26
- package/components/routes/action/view/ActionSearch.js +11 -10
- package/components/routes/action/view/Integrations.js +2 -2
- package/components/routes/action/view/markdown/integrations.en.md.js +1 -1
- package/components/routes/action/view/markdown/integrations.fr.md.js +1 -1
- package/components/routes/admin/users/UserEditor.js +21 -8
- package/components/routes/admin/users/UserSearch.js +10 -9
- package/components/routes/advanced/QueryBuilder.js +17 -11
- package/components/routes/advanced/luceneCompletionProvider.js +42 -21
- package/components/routes/analytics/AnalyticComments.js +19 -14
- package/components/routes/analytics/AnalyticDetails.d.ts +1 -1
- package/components/routes/analytics/AnalyticDetails.js +20 -16
- package/components/routes/analytics/AnalyticHitComments.js +13 -6
- package/components/routes/analytics/AnalyticHitComments.test.js +5 -4
- package/components/routes/analytics/AnalyticNotebooks.js +5 -5
- package/components/routes/analytics/AnalyticOverview.js +28 -15
- package/components/routes/analytics/AnalyticOverviews.js +2 -2
- package/components/routes/analytics/AnalyticSearch.js +11 -10
- package/components/routes/analytics/AnalyticTemplates.js +3 -3
- package/components/routes/analytics/TriageSettings.d.ts +1 -1
- package/components/routes/analytics/TriageSettings.js +1 -1
- package/components/routes/analytics/widgets/Assessment.js +1 -1
- package/components/routes/analytics/widgets/Created.js +9 -9
- package/components/routes/analytics/widgets/Escalation.js +3 -3
- package/components/routes/analytics/widgets/Stacked.js +5 -5
- package/components/routes/analytics/widgets/Status.js +2 -2
- package/components/routes/cases/CaseViewer.js +1 -1
- package/components/routes/cases/CaseViewer.test.js +2 -2
- package/components/routes/cases/Cases.d.ts +1 -1
- package/components/routes/cases/Cases.js +8 -7
- package/components/routes/cases/constants.d.ts +3 -3
- package/components/routes/cases/detail/AlertPanel.js +1 -1
- package/components/routes/cases/detail/AlertPanel.test.js +4 -6
- package/components/routes/cases/detail/CaseDashboard.js +8 -4
- package/components/routes/cases/detail/CaseDashboard.test.js +2 -2
- package/components/routes/cases/detail/CaseDetails.js +7 -2
- package/components/routes/cases/detail/CaseDetails.test.js +1 -1
- package/components/routes/cases/detail/CaseObservables.js +5 -4
- package/components/routes/cases/detail/CaseObservables.test.js +1 -1
- package/components/routes/cases/detail/CaseOverview.js +2 -2
- package/components/routes/cases/detail/CaseRules.js +10 -6
- package/components/routes/cases/detail/CaseRules.test.js +2 -2
- package/components/routes/cases/detail/CaseSearch.js +5 -5
- package/components/routes/cases/detail/CaseSearch.test.js +2 -2
- package/components/routes/cases/detail/CaseSidebar.js +12 -7
- package/components/routes/cases/detail/CaseSidebar.test.js +5 -6
- package/components/routes/cases/detail/CaseTask.js +27 -15
- package/components/routes/cases/detail/CaseTask.test.js +8 -1
- package/components/routes/cases/detail/CaseTimeline.js +8 -8
- package/components/routes/cases/detail/CaseTimeline.test.js +6 -6
- package/components/routes/cases/detail/CreateRuleDialog.js +4 -4
- package/components/routes/cases/detail/CreateRuleDialog.test.js +2 -2
- package/components/routes/cases/detail/ItemPage.js +3 -3
- package/components/routes/cases/detail/MarkdownPage.test.js +0 -4
- package/components/routes/cases/detail/RelatedCasePanel.js +1 -1
- package/components/routes/cases/detail/RelatedCasePanel.test.js +4 -6
- package/components/routes/cases/detail/TaskPanel.js +8 -8
- package/components/routes/cases/detail/TaskPanel.test.js +3 -3
- package/components/routes/cases/detail/aggregates/CaseAggregate.js +1 -1
- package/components/routes/cases/detail/aggregates/SourceAggregate.js +3 -3
- package/components/routes/cases/detail/observables/Observable.js +4 -5
- package/components/routes/cases/detail/observables/Observable.test.js +1 -1
- package/components/routes/cases/detail/observables/ObservableTable.js +3 -3
- package/components/routes/cases/detail/observables/ObservableTable.test.js +1 -1
- package/components/routes/cases/detail/sidebar/CaseFolder.js +24 -20
- package/components/routes/cases/detail/sidebar/CaseFolder.test.js +1 -1
- package/components/routes/cases/detail/sidebar/CaseFolderContextMenu.js +4 -2
- package/components/routes/cases/detail/sidebar/CaseFolderContextMenu.test.js +3 -2
- package/components/routes/cases/detail/sidebar/FolderEntry.js +3 -3
- package/components/routes/cases/detail/sidebar/FolderEntry.test.js +3 -3
- package/components/routes/cases/detail/sidebar/types.d.ts +1 -1
- package/components/routes/cases/detail/sidebar/utils.js +1 -1
- package/components/routes/cases/detail/sidebar/utils.test.js +8 -8
- package/components/routes/cases/detail/utils.d.ts +1 -1
- package/components/routes/cases/detail/utils.js +3 -2
- package/components/routes/cases/hooks/useCase.js +14 -2
- package/components/routes/cases/modals/AddRecordToCaseModal.test.js +1 -1
- package/components/routes/cases/modals/AddToCaseModal.d.ts +1 -1
- package/components/routes/cases/modals/AddToCaseModal.js +2 -2
- package/components/routes/cases/modals/CreateCaseModal.test.js +1 -1
- package/components/routes/cases/modals/ResolveModal.js +8 -5
- package/components/routes/cases/modals/ResolveModal.test.js +5 -5
- package/components/routes/cases/modals/hooks.js +1 -2
- package/components/routes/cases/modals/types.d.ts +1 -1
- package/components/routes/cases/search/CaseAssigneeFilter.js +1 -1
- package/components/routes/cases/search/CaseAssigneeFilter.test.js +8 -3
- package/components/routes/cases/search/CaseStatusFilter.test.js +1 -0
- package/components/routes/cases/utils.d.ts +0 -1
- package/components/routes/cases/utils.js +4 -13
- package/components/routes/dossiers/DossierCard.js +3 -3
- package/components/routes/dossiers/DossierCard.test.js +6 -6
- package/components/routes/dossiers/DossierEditor.js +61 -25
- package/components/routes/dossiers/DossierEditor.test.js +16 -9
- package/components/routes/dossiers/Dossiers.d.ts +1 -1
- package/components/routes/dossiers/Dossiers.js +6 -5
- package/components/routes/dossiers/LeadEditor.d.ts +1 -1
- package/components/routes/dossiers/LeadEditor.js +2 -2
- package/components/routes/dossiers/LeadForm.js +2 -2
- package/components/routes/dossiers/PivotForm.d.ts +1 -1
- package/components/routes/dossiers/PivotForm.js +10 -9
- package/components/routes/events/EventViewer.js +1 -1
- package/components/routes/help/ActionDocumentation.js +2 -2
- package/components/routes/help/ActionIntroductionDocumentation.js +2 -2
- package/components/routes/help/ApiDocumentation.js +3 -4
- package/components/routes/help/AuthDocumentation.js +1 -1
- package/components/routes/help/ClientDocumentation.js +1 -1
- package/components/routes/help/Help.d.ts +1 -1
- package/components/routes/help/Help.js +5 -4
- package/components/routes/help/HitDocumentation.js +3 -3
- package/components/routes/help/HitLabelsDocumentation.js +12 -12
- package/components/routes/help/HitLinksDocumentation.js +2 -2
- package/components/routes/help/HitSchemaDocumentation.js +14 -8
- package/components/routes/help/NotebookDocumentation.js +1 -1
- package/components/routes/help/OverviewDocumentation.js +1 -1
- package/components/routes/help/RetentionDocumentation.js +3 -3
- package/components/routes/help/SearchDocumentation.js +6 -4
- package/components/routes/help/TemplateDocumentation.js +2 -2
- package/components/routes/help/ViewDocumentation.js +1 -1
- package/components/routes/help/markdown/en/views.md.js +1 -1
- package/components/routes/help/markdown/fr/views.md.js +1 -1
- package/components/routes/hits/search/InformationPane.js +8 -8
- package/components/routes/hits/search/QuerySettings.js +1 -1
- package/components/routes/hits/search/QuerySettings.test.js +8 -4
- package/components/routes/hits/search/RecordBrowser.js +12 -9
- package/components/routes/hits/search/RecordQuery.js +13 -10
- package/components/routes/hits/search/SearchPane.js +2 -3
- package/components/routes/hits/search/ViewLink.js +4 -4
- package/components/routes/hits/search/ViewLink.test.js +1 -0
- package/components/routes/hits/search/grid/RecordGrid.js +1 -1
- package/components/routes/hits/search/shared/CustomSort.js +3 -2
- package/components/routes/hits/search/shared/CustomSpan.js +9 -1
- package/components/routes/hits/search/shared/HitFilter.js +8 -3
- package/components/routes/hits/search/shared/HitSort.js +8 -6
- package/components/routes/hits/search/shared/IndexPicker.js +1 -1
- package/components/routes/hits/search/shared/LayoutSettings.js +1 -1
- package/components/routes/hits/search/shared/SearchActionMenu.d.ts +1 -1
- package/components/routes/hits/search/shared/SearchActionMenu.js +1 -1
- package/components/routes/hits/search/shared/SearchSpan.js +1 -1
- package/components/routes/hits/view/HitViewer.js +21 -11
- package/components/routes/hits/view/HitViewer.test.js +2 -2
- package/components/routes/home/AddNewCard.d.ts +2 -1
- package/components/routes/home/AddNewCard.js +7 -4
- package/components/routes/home/AnalyticCard.js +3 -3
- package/components/routes/home/EntryWrapper.js +1 -1
- package/components/routes/home/ViewCard.js +11 -7
- package/components/routes/home/ViewCard.test.js +3 -6
- package/components/routes/home/index.js +20 -17
- package/components/routes/overviews/OverviewCard.js +6 -2
- package/components/routes/overviews/OverviewViewer.d.ts +1 -1
- package/components/routes/overviews/OverviewViewer.js +48 -39
- package/components/routes/overviews/Overviews.d.ts +1 -1
- package/components/routes/overviews/Overviews.js +7 -6
- package/components/routes/overviews/markdownExtendedTokenProvider.test.js +1 -0
- package/components/routes/overviews/startingTemplate.js +1 -1
- package/components/routes/settings/ProfileSection.d.ts +1 -1
- package/components/routes/settings/ProfileSection.js +2 -2
- package/components/routes/settings/SecuritySection.d.ts +1 -1
- package/components/routes/settings/SecuritySection.js +2 -2
- package/components/routes/settings/Settings.js +6 -6
- package/components/routes/templates/TemplateCard.js +1 -1
- package/components/routes/templates/TemplateEditor.d.ts +1 -1
- package/components/routes/templates/TemplateEditor.js +3 -3
- package/components/routes/templates/TemplateViewer.d.ts +1 -1
- package/components/routes/templates/TemplateViewer.js +54 -52
- package/components/routes/templates/Templates.d.ts +1 -1
- package/components/routes/templates/Templates.js +10 -9
- package/components/routes/views/ViewComposer.js +38 -30
- package/components/routes/views/Views.d.ts +2 -1
- package/components/routes/views/Views.js +20 -14
- package/i18n.js +4 -0
- package/locales/en/translation.json +10 -0
- package/locales/fr/translation.json +10 -0
- package/models/entities/HowlerUser.d.ts +1 -1
- package/models/entities/generated/Action.d.ts +3 -1
- package/models/entities/generated/ApiType.d.ts +2 -3
- package/models/entities/generated/Dossier.d.ts +2 -0
- package/models/entities/generated/HowlerDossier.d.ts +2 -0
- package/models/entities/generated/Item.d.ts +2 -2
- package/models/entities/generated/Settings.d.ts +1 -1
- package/models/entities/generated/View.d.ts +2 -0
- package/package.json +102 -118
- package/plugins/HowlerPlugin.d.ts +9 -50
- package/plugins/HowlerPlugin.js +7 -113
- package/plugins/clue/Provider.js +2 -2
- package/plugins/clue/components/ClueLeadForm.js +2 -2
- package/plugins/clue/components/CluePivot.js +6 -7
- package/plugins/clue/components/CluePivotForm.js +26 -15
- package/plugins/clue/components/ClueTypography.js +2 -2
- package/plugins/clue/helpers.js +5 -5
- package/plugins/clue/index.d.ts +2 -2
- package/plugins/clue/index.js +1 -1
- package/plugins/clue/setup.js +1 -1
- package/plugins/clue/utils.d.ts +1 -1
- package/plugins/store.d.ts +26 -43
- package/plugins/store.js +2 -15
- package/rest/AxiosClient.js +3 -3
- package/rest/FetchClient.d.ts +1 -1
- package/rest/FetchClient.js +8 -5
- package/rest/FetchClient.test.js +7 -4
- package/rest/index.d.ts +4 -3
- package/setupTests.d.ts +3 -0
- package/tests/MockLocalStorage.js +2 -1
- package/tests/mocks.d.ts +2 -2
- package/tests/mocks.js +3 -3
- package/tests/server-handlers.js +1 -1
- package/utils/Throttler.js +1 -1
- package/utils/actionUtils.d.ts +1 -1
- package/utils/actionUtils.js +10 -6
- package/utils/classificationParser.js +56 -63
- package/utils/constants.d.ts +0 -17
- package/utils/constants.js +1 -18
- package/utils/exampleHit.d.ts +2 -0
- package/utils/exampleHit.js +18 -0
- package/utils/localStorage.d.ts +2 -2
- package/utils/localStorage.js +1 -1
- package/utils/menuUtils.d.ts +3 -89
- package/utils/menuUtils.js +66 -227
- package/utils/menuUtils.test.js +45 -181
- package/utils/sessionStorage.js +1 -1
- package/utils/sessionStorage.test.js +1 -0
- package/utils/stringUtils.d.ts +1 -1
- package/utils/utils.d.ts +30 -6
- package/utils/utils.js +66 -9
- package/utils/utils.test.js +1 -0
- package/utils/xsrf.d.ts +1 -1
- package/utils/xsrf.js +5 -10
- package/api/dossier/hit.d.ts +0 -2
- package/api/dossier/hit.js +0 -7
- package/api/dossier/index.d.ts +0 -9
- package/commons/components/app/AppConfigs.d.ts +0 -137
- package/commons/components/app/AppConstants.d.ts +0 -10
- package/commons/components/app/AppConstants.js +0 -10
- package/commons/components/app/AppContexts.d.ts +0 -105
- package/commons/components/app/AppContexts.js +0 -21
- package/commons/components/app/AppDefaults.d.ts +0 -6
- package/commons/components/app/AppDefaults.js +0 -40
- package/commons/components/app/AppNotificationService.d.ts +0 -6
- package/commons/components/app/AppNotificationService.js +0 -1
- package/commons/components/app/AppProvider.d.ts +0 -15
- package/commons/components/app/AppProvider.js +0 -41
- package/commons/components/app/AppSearchService.d.ts +0 -21
- package/commons/components/app/AppSearchService.js +0 -1
- package/commons/components/app/AppSkeleton.d.ts +0 -5
- package/commons/components/app/AppSkeleton.js +0 -152
- package/commons/components/app/AppUserService.d.ts +0 -17
- package/commons/components/app/AppUserService.js +0 -1
- package/commons/components/app/hooks/index.d.ts +0 -18
- package/commons/components/app/hooks/index.js +0 -18
- package/commons/components/app/hooks/useApp.d.ts +0 -1
- package/commons/components/app/hooks/useApp.js +0 -5
- package/commons/components/app/hooks/useAppBanner.d.ts +0 -1
- package/commons/components/app/hooks/useAppBanner.js +0 -6
- package/commons/components/app/hooks/useAppBar.d.ts +0 -1
- package/commons/components/app/hooks/useAppBar.js +0 -5
- package/commons/components/app/hooks/useAppBarHeight.d.ts +0 -2
- package/commons/components/app/hooks/useAppBarHeight.js +0 -22
- package/commons/components/app/hooks/useAppBarScrollTrigger.d.ts +0 -1
- package/commons/components/app/hooks/useAppBarScrollTrigger.js +0 -7
- package/commons/components/app/hooks/useAppBreadcrumbs.d.ts +0 -1
- package/commons/components/app/hooks/useAppBreadcrumbs.js +0 -5
- package/commons/components/app/hooks/useAppConfigs.d.ts +0 -59
- package/commons/components/app/hooks/useAppConfigs.js +0 -44
- package/commons/components/app/hooks/useAppLanguage.d.ts +0 -6
- package/commons/components/app/hooks/useAppLanguage.js +0 -17
- package/commons/components/app/hooks/useAppLayout.d.ts +0 -1
- package/commons/components/app/hooks/useAppLayout.js +0 -5
- package/commons/components/app/hooks/useAppLeftNav.d.ts +0 -1
- package/commons/components/app/hooks/useAppLeftNav.js +0 -5
- package/commons/components/app/hooks/useAppLogo.d.ts +0 -1
- package/commons/components/app/hooks/useAppLogo.js +0 -8
- package/commons/components/app/hooks/useAppNotification.d.ts +0 -1
- package/commons/components/app/hooks/useAppNotification.js +0 -5
- package/commons/components/app/hooks/useAppQuickSearch.d.ts +0 -1
- package/commons/components/app/hooks/useAppQuickSearch.js +0 -5
- package/commons/components/app/hooks/useAppSearchService.d.ts +0 -2
- package/commons/components/app/hooks/useAppSearchService.js +0 -5
- package/commons/components/app/hooks/useAppSitemap.d.ts +0 -16
- package/commons/components/app/hooks/useAppSitemap.js +0 -70
- package/commons/components/app/hooks/useAppSwitcher.d.ts +0 -1
- package/commons/components/app/hooks/useAppSwitcher.js +0 -5
- package/commons/components/app/hooks/useAppTheme.d.ts +0 -8
- package/commons/components/app/hooks/useAppTheme.js +0 -12
- package/commons/components/app/hooks/useAppUser.d.ts +0 -2
- package/commons/components/app/hooks/useAppUser.js +0 -5
- package/commons/components/app/providers/AppBarProvider.d.ts +0 -10
- package/commons/components/app/providers/AppBarProvider.js +0 -24
- package/commons/components/app/providers/AppBreadcrumbsProvider.d.ts +0 -6
- package/commons/components/app/providers/AppBreadcrumbsProvider.js +0 -43
- package/commons/components/app/providers/AppLayoutProvider.d.ts +0 -6
- package/commons/components/app/providers/AppLayoutProvider.js +0 -73
- package/commons/components/app/providers/AppLeftNavProvider.d.ts +0 -6
- package/commons/components/app/providers/AppLeftNavProvider.js +0 -22
- package/commons/components/app/providers/AppNotificationProvider.d.ts +0 -6
- package/commons/components/app/providers/AppNotificationProvider.js +0 -31
- package/commons/components/app/providers/AppQuickSearchProvider.d.ts +0 -8
- package/commons/components/app/providers/AppQuickSearchProvider.js +0 -19
- package/commons/components/app/providers/AppSearchServiceProvider.d.ts +0 -6
- package/commons/components/app/providers/AppSearchServiceProvider.js +0 -46
- package/commons/components/app/providers/AppSnackbarProvider.d.ts +0 -3
- package/commons/components/app/providers/AppSnackbarProvider.js +0 -15
- package/commons/components/app/providers/AppSwitcherProvider.d.ts +0 -6
- package/commons/components/app/providers/AppSwitcherProvider.js +0 -10
- package/commons/components/app/providers/AppUserProvider.d.ts +0 -8
- package/commons/components/app/providers/AppUserProvider.js +0 -12
- package/commons/components/breadcrumbs/BreadcrumbIcon.d.ts +0 -6
- package/commons/components/breadcrumbs/BreadcrumbIcon.js +0 -9
- package/commons/components/breadcrumbs/BreadcrumbLastItem.d.ts +0 -7
- package/commons/components/breadcrumbs/BreadcrumbLastItem.js +0 -19
- package/commons/components/breadcrumbs/BreadcrumbLinkItem.d.ts +0 -7
- package/commons/components/breadcrumbs/BreadcrumbLinkItem.js +0 -20
- package/commons/components/breadcrumbs/BreadcrumbList.d.ts +0 -11
- package/commons/components/breadcrumbs/BreadcrumbList.js +0 -44
- package/commons/components/breadcrumbs/Breadcrumbs.d.ts +0 -5
- package/commons/components/breadcrumbs/Breadcrumbs.js +0 -31
- package/commons/components/display/AppAvatar.d.ts +0 -8
- package/commons/components/display/AppAvatar.js +0 -18
- package/commons/components/display/AppInfoPanel.d.ts +0 -5
- package/commons/components/display/AppInfoPanel.js +0 -17
- package/commons/components/display/AppListEmpty.d.ts +0 -2
- package/commons/components/display/AppListEmpty.js +0 -5
- package/commons/components/display/AppToc.d.ts +0 -20
- package/commons/components/display/AppToc.js +0 -98
- package/commons/components/display/hooks/useAppColor.d.ts +0 -5
- package/commons/components/display/hooks/useAppColor.js +0 -10
- package/commons/components/leftnav/LeftNavDrawer.d.ts +0 -3
- package/commons/components/leftnav/LeftNavDrawer.js +0 -99
- package/commons/components/leftnav/LeftNavGroup.d.ts +0 -8
- package/commons/components/leftnav/LeftNavGroup.js +0 -55
- package/commons/components/leftnav/LeftNavItem.d.ts +0 -11
- package/commons/components/leftnav/LeftNavItem.js +0 -29
- package/commons/components/notification/FeedModels.d.ts +0 -64
- package/commons/components/notification/FeedModels.js +0 -94
- package/commons/components/notification/Notification.d.ts +0 -10
- package/commons/components/notification/Notification.js +0 -95
- package/commons/components/notification/elements/NotificationCloseButton.d.ts +0 -3
- package/commons/components/notification/elements/NotificationCloseButton.js +0 -6
- package/commons/components/notification/elements/NotificationContainer.d.ts +0 -16
- package/commons/components/notification/elements/NotificationContainer.js +0 -29
- package/commons/components/notification/elements/NotificationEndOfPage.d.ts +0 -5
- package/commons/components/notification/elements/NotificationEndOfPage.js +0 -36
- package/commons/components/notification/elements/NotificationError.d.ts +0 -2
- package/commons/components/notification/elements/NotificationError.js +0 -10
- package/commons/components/notification/elements/NotificationHeader.d.ts +0 -8
- package/commons/components/notification/elements/NotificationHeader.js +0 -18
- package/commons/components/notification/elements/NotificationItems.d.ts +0 -12
- package/commons/components/notification/elements/NotificationItems.js +0 -12
- package/commons/components/notification/elements/NotificationSkeleton.d.ts +0 -2
- package/commons/components/notification/elements/NotificationSkeleton.js +0 -12
- package/commons/components/notification/elements/NotificationTopNavButton.d.ts +0 -9
- package/commons/components/notification/elements/NotificationTopNavButton.js +0 -9
- package/commons/components/notification/elements/item/NotificationItem.d.ts +0 -5
- package/commons/components/notification/elements/item/NotificationItem.js +0 -25
- package/commons/components/notification/elements/item/NotificationItemAuthor.d.ts +0 -5
- package/commons/components/notification/elements/item/NotificationItemAuthor.js +0 -31
- package/commons/components/notification/elements/item/NotificationItemContent.d.ts +0 -3
- package/commons/components/notification/elements/item/NotificationItemContent.js +0 -9
- package/commons/components/notification/elements/item/NotificationItemDate.d.ts +0 -3
- package/commons/components/notification/elements/item/NotificationItemDate.js +0 -10
- package/commons/components/notification/elements/item/NotificationItemImage.d.ts +0 -4
- package/commons/components/notification/elements/item/NotificationItemImage.js +0 -8
- package/commons/components/notification/elements/item/NotificationItemTag.d.ts +0 -4
- package/commons/components/notification/elements/item/NotificationItemTag.js +0 -12
- package/commons/components/notification/elements/item/NotificationItemTitle.d.ts +0 -3
- package/commons/components/notification/elements/item/NotificationItemTitle.js +0 -15
- package/commons/components/notification/index.d.ts +0 -2
- package/commons/components/notification/index.js +0 -2
- package/commons/components/pages/PageCardCentered.d.ts +0 -5
- package/commons/components/pages/PageCardCentered.js +0 -30
- package/commons/components/pages/PageCenter.d.ts +0 -9
- package/commons/components/pages/PageCenter.js +0 -20
- package/commons/components/pages/PageContent.d.ts +0 -8
- package/commons/components/pages/PageContent.js +0 -8
- package/commons/components/pages/PageFullScreen.d.ts +0 -11
- package/commons/components/pages/PageFullScreen.js +0 -40
- package/commons/components/pages/PageFullWidth.d.ts +0 -11
- package/commons/components/pages/PageFullWidth.js +0 -7
- package/commons/components/pages/PageHeader.d.ts +0 -23
- package/commons/components/pages/PageHeader.js +0 -27
- package/commons/components/pages/hooks/usePageProps.d.ts +0 -24
- package/commons/components/pages/hooks/usePageProps.js +0 -19
- package/commons/components/search/AppSearch.d.ts +0 -1
- package/commons/components/search/AppSearch.js +0 -135
- package/commons/components/search/AppSearchInput.d.ts +0 -12
- package/commons/components/search/AppSearchInput.js +0 -35
- package/commons/components/search/AppSearchResult.d.ts +0 -5
- package/commons/components/search/AppSearchResult.js +0 -28
- package/commons/components/topnav/AppBar.d.ts +0 -6
- package/commons/components/topnav/AppBar.js +0 -80
- package/commons/components/topnav/AppName.d.ts +0 -5
- package/commons/components/topnav/AppName.js +0 -31
- package/commons/components/topnav/AppSwitcher.d.ts +0 -3
- package/commons/components/topnav/AppSwitcher.js +0 -44
- package/commons/components/topnav/Notifications.d.ts +0 -2
- package/commons/components/topnav/Notifications.js +0 -8
- package/commons/components/topnav/ThemeSelection.d.ts +0 -3
- package/commons/components/topnav/ThemeSelection.js +0 -33
- package/commons/components/topnav/ThemeSelectionIcon.d.ts +0 -2
- package/commons/components/topnav/ThemeSelectionIcon.js +0 -16
- package/commons/components/topnav/UserProfile.d.ts +0 -6
- package/commons/components/topnav/UserProfile.js +0 -71
- package/commons/components/utils/hooks/useClipboard.d.ts +0 -3
- package/commons/components/utils/hooks/useClipboard.js +0 -29
- package/commons/components/utils/hooks/useEnv.d.ts +0 -1
- package/commons/components/utils/hooks/useEnv.js +0 -11
- package/commons/components/utils/hooks/useFullscreenStatus.d.ts +0 -2
- package/commons/components/utils/hooks/useFullscreenStatus.js +0 -41
- package/commons/components/utils/hooks/useGravatar.d.ts +0 -2
- package/commons/components/utils/hooks/useGravatar.js +0 -9
- package/commons/components/utils/hooks/useLocalStorage.d.ts +0 -12
- package/commons/components/utils/hooks/useLocalStorage.js +0 -52
- package/commons/components/utils/hooks/useLocalStorageItem.d.ts +0 -14
- package/commons/components/utils/hooks/useLocalStorageItem.js +0 -39
- package/commons/components/utils/hooks/useThemeBuilder.d.ts +0 -7
- package/commons/components/utils/hooks/useThemeBuilder.js +0 -48
- package/commons/components/utils/keyboard.d.ts +0 -30
- package/commons/components/utils/keyboard.js +0 -50
- package/components/hooks/useMySitemap.d.ts +0 -3
- package/components/hooks/useMySitemap.js +0 -219
- /package/{commons/components/app/AppConfigs.js → components/elements/MembershipManagement.test.d.ts} +0 -0
|
@@ -5,17 +5,17 @@ import { capitalize } from 'lodash-es';
|
|
|
5
5
|
import { LABEL_TYPES } from '@cccsaurora/howler-ui/utils/constants';
|
|
6
6
|
const HitLabelsDocumentation = () => {
|
|
7
7
|
const { t } = useTranslation();
|
|
8
|
-
return (_jsxs(Stack, { children: [_jsx("h1", { children: t('help.hit.labels.title') }), _jsx(TableContainer, { component: Paper, children: _jsxs(Table, { children: [_jsx(TableHead, { children: _jsxs(TableRow, { children: [_jsx(TableCell, { children: t('page.documentation.labels.name') }), _jsx(TableCell, { children: t('page.documentation.labels.description') }), _jsx(TableCell, { children: t('page.documentation.labels.example') })] }) }), _jsx(TableBody, { children: Object.entries(LABEL_TYPES).map(([label, details]) => (_jsxs(TableRow, { children: [_jsx(TableCell, { children: capitalize(label) }), _jsx(TableCell, { children: t(`hit.label.category.${label}`).replace(/.+ - /, '') }), _jsx(TableCell, { children: _jsx(Chip, { icon: details?.icon ?? undefined, variant: "filled", size: "small", label: label, sx:
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
8
|
+
return (_jsxs(Stack, { children: [_jsx("h1", { children: t('help.hit.labels.title') }), _jsx(TableContainer, { component: Paper, children: _jsxs(Table, { children: [_jsx(TableHead, { children: _jsxs(TableRow, { children: [_jsx(TableCell, { children: t('page.documentation.labels.name') }), _jsx(TableCell, { children: t('page.documentation.labels.description') }), _jsx(TableCell, { children: t('page.documentation.labels.example') })] }) }), _jsx(TableBody, { children: Object.entries(LABEL_TYPES).map(([label, details]) => (_jsxs(TableRow, { children: [_jsx(TableCell, { children: capitalize(label) }), _jsx(TableCell, { children: t(`hit.label.category.${label}`).replace(/.+ - /, '') }), _jsx(TableCell, { children: _jsx(Chip, { icon: details?.icon ?? undefined, variant: "filled", size: "small", label: label, sx: {
|
|
9
|
+
mr: 1,
|
|
10
|
+
mb: 1,
|
|
11
|
+
...(details?.color
|
|
12
|
+
? {
|
|
13
|
+
'&, & svg': {
|
|
14
|
+
color: theme => theme.palette.getContrastText(details.color) + ' !important'
|
|
15
|
+
},
|
|
16
|
+
backgroundColor: details.color
|
|
17
|
+
}
|
|
18
|
+
: {})
|
|
19
|
+
} }) })] }, label))) })] }) })] }));
|
|
20
20
|
};
|
|
21
21
|
export default HitLabelsDocumentation;
|
|
@@ -9,9 +9,9 @@ const HitLinksDocumentation = () => {
|
|
|
9
9
|
const { i18n } = useTranslation();
|
|
10
10
|
const { config } = useContext(ApiConfigContext);
|
|
11
11
|
const md = useMemo(() => {
|
|
12
|
-
const appList = config.configuration
|
|
12
|
+
const appList = config.configuration?.ui.apps.map(a => `- \`${a.name.toLowerCase()}\``).join('\n') ?? [];
|
|
13
13
|
return (i18n.language === 'en' ? LINKS_EN : LINKS_FR).replace('$APP_LIST', appList);
|
|
14
|
-
}, [config.configuration
|
|
14
|
+
}, [config.configuration, i18n.language]);
|
|
15
15
|
return _jsx(Markdown, { md: md });
|
|
16
16
|
};
|
|
17
17
|
export default HitLinksDocumentation;
|
|
@@ -4,7 +4,7 @@ import { Alert, AlertTitle, Box, Chip, IconButton, InputAdornment, Stack, Table,
|
|
|
4
4
|
import Markdown from '@cccsaurora/howler-ui/components/elements/display/Markdown';
|
|
5
5
|
import { memo, useCallback, useContext, useMemo, useState } from 'react';
|
|
6
6
|
import { useTranslation } from 'react-i18next';
|
|
7
|
-
import { useSearchParams } from 'react-router
|
|
7
|
+
import { useSearchParams } from 'react-router';
|
|
8
8
|
import Throttler from '@cccsaurora/howler-ui/utils/Throttler';
|
|
9
9
|
import { ApiConfigContext } from '@cccsaurora/howler-ui/components/app/providers/ApiConfigProvider';
|
|
10
10
|
import SCHEMA_EN from './markdown/en/schema.md';
|
|
@@ -18,6 +18,9 @@ const RowEntry = memo(({ field }) => {
|
|
|
18
18
|
const { t } = useTranslation();
|
|
19
19
|
const { config } = useContext(ApiConfigContext);
|
|
20
20
|
const theme = useTheme();
|
|
21
|
+
if (!config.indexes) {
|
|
22
|
+
return;
|
|
23
|
+
}
|
|
21
24
|
return (_jsxs(TableRow, { children: [_jsx(TableCell, { width: "350", style: { wordBreak: 'break-word' }, children: _jsxs(Stack, { direction: "row", spacing: 1, children: [_jsx(Typography, { children: field }), config.indexes.hit[field].list && _jsx(Chip, { color: "warning", size: "small", label: t('list') }), config.indexes.hit[field].deprecated && _jsx(Chip, { color: "error", size: "small", label: t('deprecated') })] }) }), _jsx(TableCell, { width: "75", children: _jsx(Typography, { children: config.indexes.hit[`${field}.key_a`] ? 'dict' : config.indexes.hit[field].type }) }), _jsxs(TableCell, { sx: { maxWidth: '500px' }, children: [_jsx(Markdown, { md: config.indexes.hit[field].description ?? t('help.hit.schema.description.missing') }), config.indexes.hit[field].regex && (_jsx("a", { href: `https://regexr.com/?expression=${encodeURIComponent(config.indexes.hit[field].regex)}`, children: _jsx(Typography, { children: t('help.hit.schema.regex') }) })), config.indexes.hit[field].values?.length > 0 && (_jsxs(Stack, { spacing: 1, children: [_jsxs(Typography, { children: [t('help.hit.schema.values'), ":"] }), _jsx(Stack, { direction: "row", spacing: 0.5, flexWrap: "wrap", children: config.indexes.hit[field].values.map(val => (_jsx("code", { style: {
|
|
22
25
|
padding: theme.spacing(0.5),
|
|
23
26
|
border: 'thin solid',
|
|
@@ -54,6 +57,9 @@ const HitSchemaDocumentation = () => {
|
|
|
54
57
|
if (!phrase) {
|
|
55
58
|
return true;
|
|
56
59
|
}
|
|
60
|
+
if (!config.indexes) {
|
|
61
|
+
return false;
|
|
62
|
+
}
|
|
57
63
|
const _phrase = phrase.toLowerCase();
|
|
58
64
|
if (field.includes(_phrase)) {
|
|
59
65
|
return true;
|
|
@@ -63,16 +69,16 @@ const HitSchemaDocumentation = () => {
|
|
|
63
69
|
return true;
|
|
64
70
|
}
|
|
65
71
|
return false;
|
|
66
|
-
}, [config.indexes
|
|
67
|
-
const howlerFields = useMemo(() => Object.keys(config.indexes
|
|
72
|
+
}, [config.indexes, phrase]);
|
|
73
|
+
const howlerFields = useMemo(() => Object.keys(config.indexes?.hit ?? {})
|
|
68
74
|
.filter(field => field.startsWith('howler') && !field.endsWith('key_a'))
|
|
69
|
-
.filter(filterSearch), [config.indexes
|
|
70
|
-
const assemblylineFields = useMemo(() => Object.keys(config.indexes
|
|
75
|
+
.filter(filterSearch), [config.indexes, filterSearch]);
|
|
76
|
+
const assemblylineFields = useMemo(() => Object.keys(config.indexes?.hit ?? {})
|
|
71
77
|
.filter(field => field.startsWith('assemblyline') && !field.endsWith('key_a'))
|
|
72
|
-
.filter(filterSearch), [config.indexes
|
|
73
|
-
const ecsFields = useMemo(() => Object.keys(config.indexes
|
|
78
|
+
.filter(filterSearch), [config.indexes, filterSearch]);
|
|
79
|
+
const ecsFields = useMemo(() => Object.keys(config.indexes?.hit ?? {})
|
|
74
80
|
.filter(field => !field.startsWith('howler') && !field.startsWith('assemblyline') && !field.endsWith('key_a'))
|
|
75
|
-
.filter(filterSearch), [config.indexes
|
|
81
|
+
.filter(filterSearch), [config.indexes, filterSearch]);
|
|
76
82
|
return (_jsxs(Stack, { spacing: 1, children: [_jsx(Markdown, { md: md }), _jsx(Box, { sx: { py: 2 } }), _jsx(TextField, { fullWidth: true, value: phrase, onChange: onSearchChange, label: t('help.hit.schema.search.prompt'), InputProps: {
|
|
77
83
|
endAdornment: (_jsx(InputAdornment, { position: "end", children: _jsx(IconButton, { disabled: !phrase, onClick: onClear, children: _jsx(Clear, {}) }) }))
|
|
78
84
|
} }), howlerFields.length > 0 && (_jsxs(_Fragment, { children: [_jsx(Typography, { variant: "h5", pt: 3, children: t('help.hit.schema.table.howler') }), _jsxs(Table, { size: "small", children: [_jsx(TableHeader, {}), _jsx(TableBody, { children: howlerFields.map(field => (_jsx(RowEntry, { field: field }, field))) })] })] })), assemblylineFields.length > 0 && (_jsxs(_Fragment, { children: [_jsx(Typography, { variant: "h5", pt: 3, children: t('help.hit.schema.table.assemblyline') }), _jsxs(Table, { size: "small", children: [_jsx(TableHeader, {}), _jsx(TableBody, { children: assemblylineFields.map(field => (_jsx(RowEntry, { field: field }, field))) })] })] })), ecsFields.length > 0 && (_jsxs(_Fragment, { children: [_jsx(Typography, { variant: "h5", pt: 3, children: t('help.hit.schema.table.ecs') }), _jsxs(Table, { size: "small", children: [_jsx(TableHeader, {}), _jsx(TableBody, { children: ecsFields.map(field => (_jsx(RowEntry, { field: field }, field))) })] })] }))] }));
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
-
import PageCenter from '@
|
|
2
|
+
import { PageCenter } from '@tui/core';
|
|
3
3
|
import Markdown from '@cccsaurora/howler-ui/components/elements/display/Markdown';
|
|
4
4
|
import { useScrollRestoration } from '@cccsaurora/howler-ui/components/hooks/useScrollRestoration';
|
|
5
5
|
import howlerPluginStore from '@cccsaurora/howler-ui/plugins/store';
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
-
import PageCenter from '@
|
|
2
|
+
import { PageCenter } from '@tui/core';
|
|
3
3
|
import HandlebarsMarkdown from '@cccsaurora/howler-ui/components/elements/display/HandlebarsMarkdown';
|
|
4
4
|
import { useScrollRestoration } from '@cccsaurora/howler-ui/components/hooks/useScrollRestoration';
|
|
5
5
|
import ErrorBoundary from '../ErrorBoundary';
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
-
import PageCenter from '@
|
|
2
|
+
import { PageCenter } from '@tui/core';
|
|
3
3
|
import Markdown from '@cccsaurora/howler-ui/components/elements/display/Markdown';
|
|
4
4
|
import { useScrollRestoration } from '@cccsaurora/howler-ui/components/hooks/useScrollRestoration';
|
|
5
5
|
import { useContext, useEffect, useMemo, useState } from 'react';
|
|
@@ -32,10 +32,10 @@ const RetentionDocumentation = () => {
|
|
|
32
32
|
rows: 1,
|
|
33
33
|
fl: 'howler.id'
|
|
34
34
|
})
|
|
35
|
-
.then(val => setHitId(val
|
|
35
|
+
.then(val => setHitId(val?.items[0]?.howler?.id));
|
|
36
36
|
});
|
|
37
37
|
return (_jsx(PageCenter, { margin: 4, width: "100%", textAlign: "left", children: _jsx(Markdown, { md: md, components: {
|
|
38
|
-
duration: (_jsxs("span", { children: [config.configuration
|
|
38
|
+
duration: (_jsxs("span", { children: [config.configuration?.system.retention.limit_amount, " ", config.configuration?.system.retention.limit_unit] })),
|
|
39
39
|
alert: hitId ? _jsx(HitCard, { layout: HitLayout.DENSE, id: hitId }) : _jsx(Skeleton, { variant: "rounded", height: "250px" })
|
|
40
40
|
} }) }));
|
|
41
41
|
};
|
|
@@ -1,13 +1,12 @@
|
|
|
1
1
|
import { Fragment as _Fragment, jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
2
|
import { ExpandMore } from '@mui/icons-material';
|
|
3
3
|
import { Accordion, AccordionDetails, AccordionSummary, Box, Card, Chip, emphasize, Stack, styled, Tab, Table, TableBody, TableCell, TableHead, TableRow, Typography, useMediaQuery, useTheme } from '@mui/material';
|
|
4
|
-
import { useAppBar, useAppLayout, useAppUser } from '@
|
|
5
|
-
import PageCenter from '@cccsaurora/howler-ui/commons/components/pages/PageCenter';
|
|
4
|
+
import { PageCenter, useAppBar, useAppLayout, useAppUser } from '@tui/core';
|
|
6
5
|
import { ApiConfigContext } from '@cccsaurora/howler-ui/components/app/providers/ApiConfigProvider';
|
|
7
6
|
import { useScrollRestoration } from '@cccsaurora/howler-ui/components/hooks/useScrollRestoration';
|
|
8
7
|
import { memo, useContext, useMemo } from 'react';
|
|
9
8
|
import { useTranslation } from 'react-i18next';
|
|
10
|
-
import { useLocation } from 'react-router
|
|
9
|
+
import { useLocation } from 'react-router';
|
|
11
10
|
import HelpTabs from './components/HelpTabs';
|
|
12
11
|
const TableRoot = styled('div')(({ theme }) => ({
|
|
13
12
|
'& .MuiTable-root': {
|
|
@@ -104,8 +103,11 @@ const SearchDocumentation = () => {
|
|
|
104
103
|
const useHorizontal = useMediaQuery(theme.breakpoints.down(1700));
|
|
105
104
|
useScrollRestoration();
|
|
106
105
|
const indexes = useMemo(() => {
|
|
107
|
-
return config?.indexes
|
|
106
|
+
return config?.indexes;
|
|
108
107
|
}, [config]);
|
|
108
|
+
if (!indexes) {
|
|
109
|
+
return;
|
|
110
|
+
}
|
|
109
111
|
return (_jsx(PageCenterRoot, { margin: 4, width: "100%", maxWidth: "1750px", textAlign: "left", children: _jsxs(Stack, { sx: { flexDirection: useHorizontal ? 'column' : 'row', '& h1': { mt: 0 } }, children: [_jsx(HelpTabs, { value: location.hash || '#overview', children: TOC_CONFIGS.flatMap(value => [
|
|
110
112
|
_jsx(Tab, { href: `#${value.id}`, label: _jsx(Typography, { variant: "caption", children: t(value.id) }), value: `#${value.id}` }, value.id),
|
|
111
113
|
...(!useHorizontal && value.subItems ? value.subItems : []).map(subItem => (!subItem.is_admin || user.is_admin) && (_jsx(Tab, { sx: { '& > span': { pl: 1 } }, href: `#${subItem.id}`, label: _jsx(Typography, { variant: "caption", children: t(subItem.id) }), value: `#${subItem.id}` }, subItem.id)))
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { PageCenter } from '@tui/core';
|
|
2
3
|
import { Card, CardContent, Stack } from '@mui/material';
|
|
3
|
-
import PageCenter from '@cccsaurora/howler-ui/commons/components/pages/PageCenter';
|
|
4
4
|
import Markdown from '@cccsaurora/howler-ui/components/elements/display/Markdown';
|
|
5
5
|
import { HitLayout } from '@cccsaurora/howler-ui/components/elements/hit/HitLayout';
|
|
6
6
|
import HitOutline from '@cccsaurora/howler-ui/components/elements/hit/HitOutline';
|
|
@@ -50,7 +50,7 @@ const TemplateDocumentation = () => {
|
|
|
50
50
|
});
|
|
51
51
|
return markdown
|
|
52
52
|
.split('\n===SPLIT===\n')
|
|
53
|
-
.map(section => modifyDocumentation(section, howlerPluginStore, pluginStore));
|
|
53
|
+
.map((section) => modifyDocumentation(section, howlerPluginStore, pluginStore));
|
|
54
54
|
}, [i18n.language, pluginStore]);
|
|
55
55
|
return (_jsxs(PageCenter, { margin: 4, width: "100%", textAlign: "left", children: [_jsx(Markdown, { md: md1 }), _jsx(Stack, { spacing: 1, children: ALERTS.map(alert => (_jsx(Card, { variant: "outlined", children: _jsx(CardContent, { children: _jsx(HitOutline, { hit: alert, template: {
|
|
56
56
|
...TEMPLATE,
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
import { PageCenter } from '@tui/core';
|
|
2
3
|
import { Search } from '@mui/icons-material';
|
|
3
|
-
import PageCenter from '@cccsaurora/howler-ui/commons/components/pages/PageCenter';
|
|
4
4
|
import Markdown from '@cccsaurora/howler-ui/components/elements/display/Markdown';
|
|
5
5
|
import { useScrollRestoration } from '@cccsaurora/howler-ui/components/hooks/useScrollRestoration';
|
|
6
6
|
import howlerPluginStore from '@cccsaurora/howler-ui/plugins/store';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export default "# Views\n\nViews are a feature in Howler that allows users to create custom, default queries through which they can organize and triage hits. In this document, we will outline how to create and interact with views.\n\n## Using a View\n\nYou can use views by navigating to the view manager under [Manage > Views](/views). Clicking on any view will open it in the search page. Here, you can also use the `search` icon to open the view in the search page. You can also edit views that belong to you, and mark them as favourites. This will show them in the `t(route.views.saved)` dropdown in the sidebar. In the top right, you can also choose your \"`t(route.views.manager.default)`\", that will be selected by default when opening the alerts page.\n\n## Creating Views\n\nIn order to create a view, you can use the create view page, located [here](/views/create). This page allows you to modifer your view, specify a `t(hit.search.sort.fields)` and `t(hit.search.span)`, and save the view with a particular name. You can mark a view as global or personal, depending on who you want to be able to see and use the view.\n"
|
|
1
|
+
export default "# Views\n\nViews are a feature in Howler that allows users to create custom, default queries through which they can organize and triage hits. In this document, we will outline how to create and interact with views.\n\n## Using a View\n\nYou can use views by navigating to the view manager under [Manage > Views](/views). Clicking on any view will open it in the search page. Here, you can also use the `search` icon to open the view in the search page. You can also edit views that belong to you or that have been shared with you, and mark them as favourites. This will show them in the `t(route.views.saved)` dropdown in the sidebar. In the top right, you can also choose your \"`t(route.views.manager.default)`\", that will be selected by default when opening the alerts page.\n\n## Creating Views\n\nIn order to create a view, you can use the create view page, located [here](/views/create). This page allows you to modifer your view, specify a `t(hit.search.sort.fields)` and `t(hit.search.span)`, and save the view with a particular name. You can mark a view as global or personal, depending on who you want to be able to see and use the view.\n"
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export default "# Vues\n\nLes vues sont une fonctionnalit\u00e9 de Howler qui permet aux utilisateurs de cr\u00e9er des requ\u00eates personnalis\u00e9es par d\u00e9faut \u00e0 travers lesquelles ils peuvent organiser et trier les hits. Dans ce document, nous d\u00e9crirons comment cr\u00e9er et interagir avec des vues.\n\n## Utilisation d'une vue\n\nVous pouvez utiliser les vues en acc\u00e9dant au gestionnaire de vues sous [Manage > Views](/views). En cliquant sur une vue, vous l'ouvrirez dans la page de recherche. Vous pouvez \u00e9galement utiliser l'ic\u00f4ne `recherche` pour ouvrir la vue dans la page de recherche. Vous pouvez \u00e9galement modifier les vues qui vous appartiennent et les marquer comme favorites. Cela les affichera dans le menu d\u00e9roulant `t(route.views.saved)` dans la barre lat\u00e9rale. En haut \u00e0 droite, vous pouvez \u00e9galement choisir votre `t(route.views.manager.default)`, qui sera s\u00e9lectionn\u00e9 par d\u00e9faut lors de l'ouverture de la page d'alertes.\n\n## Cr\u00e9er des vues\n\nPour cr\u00e9er une vue, vous pouvez utiliser la page de cr\u00e9ation de vue, situ\u00e9e [ici](/views/create). Cette page vous permet de modifier votre vue, de sp\u00e9cifier un `t(hit.search.sort.fields)` et un `t(hit.search.span)`, et de sauvegarder la vue avec un nom particulier. Vous pouvez marquer une vue comme globale ou personnelle, en fonction des personnes que vous souhaitez voir et utiliser.\n"
|
|
1
|
+
export default "# Vues\n\nLes vues sont une fonctionnalit\u00e9 de Howler qui permet aux utilisateurs de cr\u00e9er des requ\u00eates personnalis\u00e9es par d\u00e9faut \u00e0 travers lesquelles ils peuvent organiser et trier les hits. Dans ce document, nous d\u00e9crirons comment cr\u00e9er et interagir avec des vues.\n\n## Utilisation d'une vue\n\nVous pouvez utiliser les vues en acc\u00e9dant au gestionnaire de vues sous [Manage > Views](/views). En cliquant sur une vue, vous l'ouvrirez dans la page de recherche. Vous pouvez \u00e9galement utiliser l'ic\u00f4ne `recherche` pour ouvrir la vue dans la page de recherche. Vous pouvez \u00e9galement modifier les vues qui vous appartiennent ou qui ont \u00e9t\u00e9 partag\u00e9es avec vous, et les marquer comme favorites. Cela les affichera dans le menu d\u00e9roulant `t(route.views.saved)` dans la barre lat\u00e9rale. En haut \u00e0 droite, vous pouvez \u00e9galement choisir votre `t(route.views.manager.default)`, qui sera s\u00e9lectionn\u00e9 par d\u00e9faut lors de l'ouverture de la page d'alertes.\n\n## Cr\u00e9er des vues\n\nPour cr\u00e9er une vue, vous pouvez utiliser la page de cr\u00e9ation de vue, situ\u00e9e [ici](/views/create). Cette page vous permet de modifier votre vue, de sp\u00e9cifier un `t(hit.search.sort.fields)` et un `t(hit.search.span)`, et de sauvegarder la vue avec un nom particulier. Vous pouvez marquer une vue comme globale ou personnelle, en fonction des personnes que vous souhaitez voir et utiliser.\n"
|
|
@@ -30,7 +30,7 @@ import useMyUserList from '@cccsaurora/howler-ui/components/hooks/useMyUserList'
|
|
|
30
30
|
import ErrorBoundary from '@cccsaurora/howler-ui/components/routes/ErrorBoundary';
|
|
31
31
|
import { useContext, useEffect, useMemo, useState } from 'react';
|
|
32
32
|
import { useTranslation } from 'react-i18next';
|
|
33
|
-
import { useLocation } from 'react-router
|
|
33
|
+
import { useLocation } from 'react-router';
|
|
34
34
|
import { useContextSelector } from 'use-context-selector';
|
|
35
35
|
import { getUserList } from '@cccsaurora/howler-ui/utils/recordFunctions';
|
|
36
36
|
import { validateRegex } from '@cccsaurora/howler-ui/utils/stringUtils';
|
|
@@ -71,7 +71,7 @@ const InformationPane = ({ onClose, selected: _selected }) => {
|
|
|
71
71
|
}, [getRecord, selected]);
|
|
72
72
|
useEffect(() => {
|
|
73
73
|
if (selected) {
|
|
74
|
-
setAnalytic(
|
|
74
|
+
setAnalytic(undefined);
|
|
75
75
|
setDossiers(null);
|
|
76
76
|
setHasOverview(false);
|
|
77
77
|
}
|
|
@@ -119,12 +119,12 @@ const InformationPane = ({ onClose, selected: _selected }) => {
|
|
|
119
119
|
return;
|
|
120
120
|
}
|
|
121
121
|
const defaultContent = {
|
|
122
|
-
details: () => (_jsx(Box, { pr: 2, children: _jsx(ObjectDetails, { obj: record }) })),
|
|
123
|
-
comments: () => _jsx(RecordComments, { record: record, users: users }),
|
|
124
|
-
raw: () => _jsx(JSONViewer, { data: !loading && record, hideSearch: true, filter: filter }),
|
|
125
|
-
data: () => (_jsx(JSONViewer, { data: !loading
|
|
126
|
-
related: () => _jsx(RecordRelated, { record: record }),
|
|
127
|
-
worklog: () => _jsx(RecordWorklog, { record:
|
|
122
|
+
details: () => (_jsx(Box, { pr: 2, children: _jsx(ObjectDetails, { obj: record ?? {} }) })),
|
|
123
|
+
comments: () => (record ? _jsx(RecordComments, { record: record, users: users }) : _jsx(_Fragment, {})),
|
|
124
|
+
raw: () => _jsx(JSONViewer, { data: !loading && record ? record : {}, hideSearch: true, filter: filter }),
|
|
125
|
+
data: () => (_jsx(JSONViewer, { data: !loading ? (record?.howler?.data?.map(entry => tryParse(entry)) ?? []) : [], collapse: false, hideSearch: true, filter: filter })),
|
|
126
|
+
related: () => (record ? _jsx(RecordRelated, { record: record }) : _jsx(_Fragment, {})),
|
|
127
|
+
worklog: () => (record && !loading ? _jsx(RecordWorklog, { record: record, users: users }) : _jsx(_Fragment, {}))
|
|
128
128
|
};
|
|
129
129
|
if (!isHit(record)) {
|
|
130
130
|
return defaultContent[tab]?.();
|
|
@@ -26,6 +26,6 @@ const QuerySettings = ({ boxSx }) => {
|
|
|
26
26
|
await fetchViews();
|
|
27
27
|
addView('');
|
|
28
28
|
};
|
|
29
|
-
return (_jsx(Box, { sx: boxSx ?? { position: 'relative', maxWidth: '1200px' }, children: _jsxs(Stack, { direction: "row", spacing: 1, children: [_jsxs(Grid, { container: true, spacing: 1,
|
|
29
|
+
return (_jsx(Box, { sx: boxSx ?? { position: 'relative', maxWidth: '1200px' }, children: _jsxs(Stack, { direction: "row", spacing: 1, children: [_jsxs(Grid, { container: true, spacing: 1, children: [_jsx(Grid, { children: _jsx(IndexPicker, {}) }), _jsx(Grid, { children: _jsx(HitSort, {}) }), _jsx(Grid, { children: _jsx(SearchSpan, {}) }), currentViews?.map((view, id) => (_jsx(Grid, { children: _jsx(ViewLink, { id: id, viewId: view }) }, view))), filters?.map((filter, id) => (_jsx(Grid, { children: _jsx(HitFilter, { id: id, value: filter }) }, filter)))] }), _jsx(ChipPopper, { icon: _jsx(Add, {}), deleteIcon: _jsx(ArrowDropDown, {}), toggleOnDelete: true, closeOnClick: true, slotProps: { chip: { size: 'small', color: 'primary' }, paper: { sx: { p: 1 } } }, children: _jsxs(Stack, { spacing: 1, children: [_jsxs(Button, { id: "add-filter", "aria-label": t('hit.search.filter.add'), variant: "outlined", onClick: () => addFilter('howler.assessment:*'), disabled: filters?.some(filter => filter.endsWith('*')), sx: { display: 'flex', pl: 1 }, children: [_jsx(Add, { fontSize: "small", sx: { mr: 1 } }), _jsx("div", { style: { flex: 1 } }), _jsx("span", { children: t('hit.search.filter.add') })] }), _jsxs(Button, { id: "add-view", "aria-label": t('hit.search.view.add'), variant: "outlined", onClick: onAddView, disabled: !allowAddViews, sx: { display: 'flex', pl: 1 }, children: [_jsx(Add, { fontSize: "small", sx: { mr: 1 } }), _jsx("div", { style: { flex: 1 } }), _jsx("span", { children: t('hit.search.view.add') })] })] }) })] }) }));
|
|
30
30
|
};
|
|
31
31
|
export default memo(QuerySettings);
|
|
@@ -270,7 +270,8 @@ describe('QuerySettings', () => {
|
|
|
270
270
|
mockParameterContext.filters = ['filter1', 'filter2'];
|
|
271
271
|
mockParameterContext.views = ['view-1'];
|
|
272
272
|
const { container } = render(_jsx(QuerySettings, {}), { wrapper: Wrapper });
|
|
273
|
-
const
|
|
273
|
+
const gridContainer = container.querySelector('[class*="MuiGrid-container"]');
|
|
274
|
+
const gridItems = gridContainer?.children ?? [];
|
|
274
275
|
// IndexPicker + HitSort + SearchSpan + 1 view + 2 filters = 5 items
|
|
275
276
|
expect(gridItems.length).toBe(6);
|
|
276
277
|
});
|
|
@@ -278,7 +279,8 @@ describe('QuerySettings', () => {
|
|
|
278
279
|
mockParameterContext.filters = ['filter1'];
|
|
279
280
|
mockParameterContext.views = ['view-1', 'view-2', 'view-3'];
|
|
280
281
|
const { container } = render(_jsx(QuerySettings, {}), { wrapper: Wrapper });
|
|
281
|
-
const
|
|
282
|
+
const gridContainer = container.querySelector('[class*="MuiGrid-container"]');
|
|
283
|
+
const gridItems = gridContainer?.children ?? [];
|
|
282
284
|
// IndexPicker + HitSort + SearchSpan + 3 views + 1 filter = 6 items
|
|
283
285
|
expect(gridItems.length).toBe(7);
|
|
284
286
|
});
|
|
@@ -508,7 +510,8 @@ describe('QuerySettings', () => {
|
|
|
508
510
|
mockParameterContext.filters = ['filter1'];
|
|
509
511
|
mockParameterContext.views = ['view-1'];
|
|
510
512
|
const { container } = render(_jsx(QuerySettings, {}), { wrapper: Wrapper });
|
|
511
|
-
const
|
|
513
|
+
const gridContainer = container.querySelector('[class*="MuiGrid-container"]');
|
|
514
|
+
const gridItems = gridContainer?.children ?? [];
|
|
512
515
|
// Order: IndexPicker, HitSort, SearchSpan, ViewLink(s), HitFilter(s)
|
|
513
516
|
expect(gridItems[0]).toContainElement(screen.getByTestId('index-picker'));
|
|
514
517
|
expect(gridItems[1]).toContainElement(screen.getByTestId('hit-sort'));
|
|
@@ -543,7 +546,8 @@ describe('QuerySettings', () => {
|
|
|
543
546
|
mockParameterContext.views = ['view-1', 'view-2'];
|
|
544
547
|
mockParameterContext.filters = ['filter1'];
|
|
545
548
|
const { container } = render(_jsx(QuerySettings, {}), { wrapper: Wrapper });
|
|
546
|
-
const
|
|
549
|
+
const gridContainer = container.querySelector('[class*="MuiGrid-container"]');
|
|
550
|
+
const gridItems = Array.from(gridContainer?.children ?? []);
|
|
547
551
|
const viewLink0Index = gridItems.findIndex(item => item.querySelector('#view-link-0'));
|
|
548
552
|
const viewLink1Index = gridItems.findIndex(item => item.querySelector('#view-link-1'));
|
|
549
553
|
const filterIndex = gridItems.findIndex(item => item.querySelector('#hit-filter-0'));
|
|
@@ -14,7 +14,7 @@ import ErrorBoundary from '@cccsaurora/howler-ui/components/routes/ErrorBoundary
|
|
|
14
14
|
import { isNull } from 'lodash-es';
|
|
15
15
|
import { memo, useCallback, useEffect, useMemo, useState } from 'react';
|
|
16
16
|
import { Trans, useTranslation } from 'react-i18next';
|
|
17
|
-
import { useLocation, useParams } from 'react-router
|
|
17
|
+
import { useLocation, useParams } from 'react-router';
|
|
18
18
|
import { useContextSelector } from 'use-context-selector';
|
|
19
19
|
import { StorageKey } from '@cccsaurora/howler-ui/utils/constants';
|
|
20
20
|
import InformationPane from './InformationPane';
|
|
@@ -92,7 +92,7 @@ const HitBrowser = () => {
|
|
|
92
92
|
}, children: _jsx(Close, {}) }) }), _jsx(Tooltip, { title: t('hit.search.select.view'), children: _jsx(IconButton, { size: "small", onClick: () => {
|
|
93
93
|
setOffset(0);
|
|
94
94
|
setQuery(`howler.id:(${selectedHits.map(hit => hit.howler.id).join(' OR ')})`);
|
|
95
|
-
}, children: _jsx(ManageSearch, {}) }) })] }) })] }), _jsxs(Wrapper, { show: show, showDrawer: showDrawer, onClose: () => setShow(false), children: [_jsx(HitSummary, { response: response }), _jsxs(Card, { variant: "outlined", sx: [
|
|
95
|
+
}, children: _jsx(ManageSearch, {}) }) })] }) })] }), _jsxs(Wrapper, { show: show, showDrawer: showDrawer, onClose: () => setShow(false), children: [_jsx(HitSummary, { response: response ?? undefined }), _jsxs(Card, { variant: "outlined", sx: [
|
|
96
96
|
{
|
|
97
97
|
zIndex: 100,
|
|
98
98
|
overflow: 'visible',
|
|
@@ -105,13 +105,16 @@ const HitBrowser = () => {
|
|
|
105
105
|
borderBottom: 0,
|
|
106
106
|
transition: theme.transitions.create('left')
|
|
107
107
|
},
|
|
108
|
-
selected
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
108
|
+
selected
|
|
109
|
+
? {
|
|
110
|
+
left: theme.spacing(5)
|
|
111
|
+
}
|
|
112
|
+
: {},
|
|
113
|
+
location.pathname.startsWith('/bundles') && routeParams.id
|
|
114
|
+
? {
|
|
115
|
+
left: 0
|
|
116
|
+
}
|
|
117
|
+
: {}
|
|
115
118
|
], children: [_jsx(InformationPane, { onClose: onClose }), selected && !(location.pathname.startsWith('/bundles') && routeParams.id) && (_jsx(Box, { onClick: onClose, sx: {
|
|
116
119
|
cursor: 'pointer',
|
|
117
120
|
position: 'absolute',
|
|
@@ -8,7 +8,7 @@ import QueryEditor from '@cccsaurora/howler-ui/components/routes/advanced/QueryE
|
|
|
8
8
|
import { RecordSearchContext } from '@cccsaurora/howler-ui/components/app/providers/RecordSearchProvider';
|
|
9
9
|
import { memo, useCallback, useEffect, useMemo, useRef, useState } from 'react';
|
|
10
10
|
import { useTranslation } from 'react-i18next';
|
|
11
|
-
import { useLocation } from 'react-router
|
|
11
|
+
import { useLocation } from 'react-router';
|
|
12
12
|
import { useContextSelector } from 'use-context-selector';
|
|
13
13
|
import { DEFAULT_QUERY } from '@cccsaurora/howler-ui/utils/constants';
|
|
14
14
|
import { sanitizeMultilineLucene } from '@cccsaurora/howler-ui/utils/stringUtils';
|
|
@@ -26,7 +26,7 @@ const RecordQuery = ({ searching = false, disabled = false, compact = false, tri
|
|
|
26
26
|
const [loaded, setLoaded] = useState(false);
|
|
27
27
|
const [multiline, setMultiline] = useState(false);
|
|
28
28
|
const [y, setY] = useState(0);
|
|
29
|
-
const wrapper = useRef();
|
|
29
|
+
const wrapper = useRef(null);
|
|
30
30
|
const search = useCallback(() => triggerSearch(sanitizeMultilineLucene(query)), [query, triggerSearch]);
|
|
31
31
|
const isDirty = useMemo(() => query !== savedQuery, [query, savedQuery]);
|
|
32
32
|
useEffect(() => {
|
|
@@ -121,14 +121,17 @@ const RecordQuery = ({ searching = false, disabled = false, compact = false, tri
|
|
|
121
121
|
},
|
|
122
122
|
transition: theme.transitions.create('border-color')
|
|
123
123
|
},
|
|
124
|
-
isDirty &&
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
124
|
+
isDirty && new URLSearchParams(location.search).has('query')
|
|
125
|
+
? {
|
|
126
|
+
borderColor: 'warning.main'
|
|
127
|
+
}
|
|
128
|
+
: {},
|
|
129
|
+
compact
|
|
130
|
+
? {
|
|
131
|
+
p: 0.5,
|
|
132
|
+
height: multiline ? `${DEFAULT_MULTILINE_HEIGHT + y}px` : theme.spacing(5)
|
|
133
|
+
}
|
|
134
|
+
: {}
|
|
132
135
|
], onKeyDown: e => e.stopPropagation(), children: [_jsx(TuiIconButton, { disabled: query.includes('\n#') || disabled, sx: { mr: 1, alignSelf: 'start' }, onClick: () => setMultiline(!multiline), color: multiline ? 'primary' : theme.palette.text.primary, transparent: !multiline, size: compact ? 'small' : 'medium', children: _jsx(Height, { sx: { fontSize: '20px' } }) }), _jsx(QueryEditor, { id: "hit-query", query: preppedQuery, setQuery: setQuery, language: "lucene", height: multiline ? `${DEFAULT_MULTILINE_HEIGHT - 30}px` : '20px', onMount: onMount, editorOptions: options }), fzfSearch && (_jsx(Tooltip, { title: t('route.history'), children: _jsx(History, {}) })), _jsx(TuiIconButton, { disabled: searching || disabled, onClick: () => setQuery(DEFAULT_QUERY), sx: { ml: 1, alignSelf: 'start', flexShrink: 0 }, size: compact ? 'small' : 'medium', children: _jsx(Tooltip, { title: t('route.clear'), children: _jsx(Clear, { sx: { fontSize: '20px' } }) }) }), _jsx(TuiIconButton, { disabled: searching || disabled, onClick: search, sx: { ml: 1, alignSelf: 'start', flexShrink: 0 }, size: compact ? 'small' : 'medium', children: _jsx(Tooltip, { title: t('route.search'), children: _jsx(Badge, { invisible: !isDirty, color: "warning", variant: "dot", children: _jsx(Search, { sx: { fontSize: '20px' } }) }) }) }), !loaded && (_jsx(Skeleton, { variant: "rectangular", sx: { position: 'absolute', top: 0, left: 0, right: 0, bottom: 0 }, height: "100%" })), multiline && (_jsx(Box, { sx: {
|
|
133
136
|
position: 'absolute',
|
|
134
137
|
left: 0,
|
|
@@ -2,8 +2,7 @@ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
|
2
2
|
import { ErrorOutline } from '@mui/icons-material';
|
|
3
3
|
import { Alert, AlertTitle, Box, LinearProgress, Stack, Tooltip, Typography, useMediaQuery, useTheme } from '@mui/material';
|
|
4
4
|
import { grey } from '@mui/material/colors';
|
|
5
|
-
import AppListEmpty from '@
|
|
6
|
-
import PageCenter from '@cccsaurora/howler-ui/commons/components/pages/PageCenter';
|
|
5
|
+
import { AppListEmpty, PageCenter } from '@tui/core';
|
|
7
6
|
import { ParameterContext } from '@cccsaurora/howler-ui/components/app/providers/ParameterProvider';
|
|
8
7
|
import { RecordContext } from '@cccsaurora/howler-ui/components/app/providers/RecordProvider';
|
|
9
8
|
import { RecordSearchContext } from '@cccsaurora/howler-ui/components/app/providers/RecordSearchProvider';
|
|
@@ -92,7 +91,7 @@ const SearchPane = () => {
|
|
|
92
91
|
const target = event.target;
|
|
93
92
|
const selectedElement = target.closest('[id]');
|
|
94
93
|
if (!selectedElement) {
|
|
95
|
-
return;
|
|
94
|
+
return '';
|
|
96
95
|
}
|
|
97
96
|
return selectedElement.id;
|
|
98
97
|
}, []);
|
|
@@ -8,7 +8,7 @@ import { ViewContext } from '@cccsaurora/howler-ui/components/app/providers/View
|
|
|
8
8
|
import ChipPopper from '@cccsaurora/howler-ui/components/elements/display/ChipPopper';
|
|
9
9
|
import { memo, useEffect, useMemo, useState } from 'react';
|
|
10
10
|
import { useTranslation } from 'react-i18next';
|
|
11
|
-
import { Link } from 'react-router
|
|
11
|
+
import { Link } from 'react-router';
|
|
12
12
|
import { useContextSelector } from 'use-context-selector';
|
|
13
13
|
const ViewLink = ({ id, viewId }) => {
|
|
14
14
|
const { t } = useTranslation();
|
|
@@ -27,7 +27,7 @@ const ViewLink = ({ id, viewId }) => {
|
|
|
27
27
|
useEffect(() => {
|
|
28
28
|
setLoading(true);
|
|
29
29
|
void getCurrentViews({ views: [viewId], ignoreParams: true })
|
|
30
|
-
.then(result => setView(result[0]))
|
|
30
|
+
.then(result => setView(result[0] ?? null))
|
|
31
31
|
.finally(() => setLoading(false));
|
|
32
32
|
}, [getCurrentViews, viewId]);
|
|
33
33
|
const viewUrl = useMemo(() => {
|
|
@@ -46,7 +46,7 @@ const ViewLink = ({ id, viewId }) => {
|
|
|
46
46
|
}
|
|
47
47
|
return keys.length > 0 ? `/views/create?${keys.join('&')}` : '/views/create';
|
|
48
48
|
}, [query, sort, span, view]);
|
|
49
|
-
const options = useMemo(() => Object.values(views).filter(_view => !!_view && !currentViews?.includes(_view.view_id)), [currentViews, views]);
|
|
49
|
+
const options = useMemo(() => Object.values(views).filter((_view) => !!_view && !currentViews?.includes(_view.view_id)), [currentViews, views]);
|
|
50
50
|
if (loading) {
|
|
51
51
|
return _jsx(Chip, { icon: _jsx(CircularProgress, { size: 12 }) });
|
|
52
52
|
}
|
|
@@ -61,6 +61,6 @@ const ViewLink = ({ id, viewId }) => {
|
|
|
61
61
|
readonly: _jsx(Lock, { fontSize: "small", "aria-label": t(`route.views.manager.${view.type}`) }),
|
|
62
62
|
global: _jsx(Language, { fontSize: "small", "aria-label": t(`route.views.manager.${view.type}`) }),
|
|
63
63
|
personal: _jsx(Person, { fontSize: "small", "aria-label": t(`route.views.manager.${view.type}`) })
|
|
64
|
-
}[view.type] }), label: _jsxs(Stack, { direction: "row", spacing: 0.5, alignItems: "center", children: [_jsx(Tooltip, { title: view.query, children: _jsx(Typography, { role: "link", sx: { color: 'text.primary' }, variant: "body2", component: Link, to: `/views/${view.view_id}/edit`, "aria-label": `${t(view.title)} - ${view.query ?? t('unknown')}`, children: t(view.title) }) }), view.settings?.display === 'grid' && displayType !== 'grid' && (_jsx(Tooltip, { title: t('view.display.grid.inactive_warning'), children: _jsx(Warning, { fontSize: "small", color: "warning" }) }))] }), onDelete: () => removeView(viewId), children: _jsxs(Stack, { direction: "row", spacing: 0.5, alignItems: "center", children: [_jsx(Tooltip, { title: view ? t('route.views.edit') : t('route.views.create'), children: _jsx(IconButton, { "aria-label": view ? t('route.views.edit') : t('route.views.create'), size: "small", component: Link, disabled: (!view && !query) || span?.endsWith('custom'), to: viewUrl, role: "link", children: view ? _jsx(Edit, { fontSize: "small" }) : _jsx(SavedSearch, {}) }) }), _jsx(Tooltip, { title: t('view.refresh'), children: _jsx(IconButton, { size: "small", onClick: () => search(query), "aria-label": t('view.refresh'), children: _jsx(Refresh, { fontSize: "small" }) }) }), _jsx(Tooltip, { title: t('view.open'), children: _jsx(IconButton, { size: "small", component: Link, to: `/search?query=${view.query}`, "aria-label": t('view.open'), role: "link", children: _jsx(OpenInNew, { fontSize: "small" }) }) })] }) }));
|
|
64
|
+
}[view.type] ?? _jsx("span", {}) }), label: _jsxs(Stack, { direction: "row", spacing: 0.5, alignItems: "center", children: [_jsx(Tooltip, { title: view.query, children: _jsx(Typography, { role: "link", sx: { color: 'text.primary' }, variant: "body2", component: Link, to: `/views/${view.view_id}/edit`, "aria-label": `${t(view.title)} - ${view.query ?? t('unknown')}`, children: t(view.title) }) }), view.settings?.display === 'grid' && displayType !== 'grid' && (_jsx(Tooltip, { title: t('view.display.grid.inactive_warning'), children: _jsx(Warning, { fontSize: "small", color: "warning" }) }))] }), onDelete: () => removeView(viewId), children: _jsxs(Stack, { direction: "row", spacing: 0.5, alignItems: "center", children: [_jsx(Tooltip, { title: view ? t('route.views.edit') : t('route.views.create'), children: _jsx(IconButton, { "aria-label": view ? t('route.views.edit') : t('route.views.create'), size: "small", component: Link, disabled: (!view && !query) || span?.endsWith('custom'), to: viewUrl, role: "link", children: view ? _jsx(Edit, { fontSize: "small" }) : _jsx(SavedSearch, {}) }) }), _jsx(Tooltip, { title: t('view.refresh'), children: _jsx(IconButton, { size: "small", onClick: () => search(query), "aria-label": t('view.refresh'), children: _jsx(Refresh, { fontSize: "small" }) }) }), _jsx(Tooltip, { title: t('view.open'), children: _jsx(IconButton, { size: "small", component: Link, to: `/search?query=${view.query}`, "aria-label": t('view.open'), role: "link", children: _jsx(OpenInNew, { fontSize: "small" }) }) })] }) }));
|
|
65
65
|
};
|
|
66
66
|
export default memo(ViewLink);
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
2
|
/// <reference types="vitest" />
|
|
3
|
+
// @ts-nocheck
|
|
3
4
|
import { render, screen, waitFor } from '@testing-library/react';
|
|
4
5
|
import userEvent, {} from '@testing-library/user-event';
|
|
5
6
|
import { setupReactRouterMock } from '@cccsaurora/howler-ui/tests/mocks';
|
|
@@ -59,6 +59,6 @@ const RecordGrid = () => {
|
|
|
59
59
|
bottom: 0,
|
|
60
60
|
borderBottomLeftRadius: theme.shape.borderRadius,
|
|
61
61
|
borderBottomRightRadius: theme.shape.borderRadius
|
|
62
|
-
} }))] }) }), _jsxs(Stack, { direction: "row", spacing: 1, width: "100%", alignItems: "center", children: [_jsx(QuerySettings, { boxSx: { flex: 1 } }), _jsx(AddColumnModal, { columns: columns, addColumn: key => isReady && setColumns(uniq([...columns, key])) })] }), response && (_jsx(SearchTotal, { sx: { color: 'text.secondary', fontSize: '0.9em', fontStyle: 'italic', mb: 0.5 }, variant: "body2", offset: response.offset, pageLength: response.rows, total: response.total })), _jsxs(Stack, { component: Paper, spacing: 1, width: "100%", height: "100%", sx: { overflow: 'auto', flex: 1 }, onScroll: onScroll, children: [_jsx(RecordTable, { query: query, items: response?.items, refreshItems: search, ContextMenu: RecordContextMenu, contextMenuProps: { Component: TableBody, getSelectedId
|
|
62
|
+
} }))] }) }), _jsxs(Stack, { direction: "row", spacing: 1, width: "100%", alignItems: "center", children: [_jsx(QuerySettings, { boxSx: { flex: 1 } }), _jsx(AddColumnModal, { columns: columns, addColumn: key => isReady && setColumns(uniq([...columns, key])) })] }), response && (_jsx(SearchTotal, { sx: { color: 'text.secondary', fontSize: '0.9em', fontStyle: 'italic', mb: 0.5 }, variant: "body2", offset: response.offset, pageLength: response.rows, total: response.total })), _jsxs(Stack, { component: Paper, spacing: 1, width: "100%", height: "100%", sx: { overflow: 'auto', flex: 1 }, onScroll: onScroll, children: [_jsx(RecordTable, { query: query, items: response?.items, refreshItems: search, ContextMenu: RecordContextMenu, contextMenuProps: { Component: TableBody, getSelectedId }, onItemClick: onClick }), (response?.total ?? 0) < 1 && (_jsx(Stack, { direction: "row", spacing: 1, alignItems: "center", p: 1, justifyContent: "center", flex: 1, children: _jsxs(Typography, { variant: "h3", color: "text.secondary", display: "flex", flexDirection: "row", alignItems: "center", children: [_jsx(Info, { fontSize: "inherit", sx: { color: 'text.secondary', mr: 1 } }), _jsx("span", { children: t('app.list.empty') })] }) }))] })] }));
|
|
63
63
|
};
|
|
64
64
|
export default RecordGrid;
|
|
@@ -7,12 +7,13 @@ import { uniqBy } from 'lodash-es';
|
|
|
7
7
|
import { memo, useContext, useEffect, useMemo, useState } from 'react';
|
|
8
8
|
import { useTranslation } from 'react-i18next';
|
|
9
9
|
import { useContextSelector } from 'use-context-selector';
|
|
10
|
+
import { notNil } from '@cccsaurora/howler-ui/utils/utils';
|
|
10
11
|
const CustomSort = () => {
|
|
11
12
|
const { t } = useTranslation();
|
|
12
13
|
const [field, setField] = useState('');
|
|
13
14
|
const [sort, setSort] = useState('');
|
|
14
15
|
const { hitFields, getHitFields } = useContext(FieldContext);
|
|
15
|
-
const sortEntries = useContextSelector(ParameterContext, ctx => ctx.sort?.split(','));
|
|
16
|
+
const sortEntries = useContextSelector(ParameterContext, ctx => ctx.sort?.split(',') ?? []);
|
|
16
17
|
const setSavedSort = useContextSelector(ParameterContext, ctx => ctx.setSort);
|
|
17
18
|
const sortFields = useMemo(() => sortEntries.map(entry => entry.split(' ').slice(0, 2)), [sortEntries]);
|
|
18
19
|
useEffect(() => {
|
|
@@ -30,7 +31,7 @@ const CustomSort = () => {
|
|
|
30
31
|
setSavedSort(uniqBy([...sortEntries, `${field} ${sort}`], entry => entry.replace(/ .+/, '')).join(','));
|
|
31
32
|
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
32
33
|
}, [field]);
|
|
33
|
-
return (_jsxs(Stack, { spacing: 1, maxWidth: "450px", children: [_jsxs(Stack, { direction: "row", spacing: 1, children: [_jsx(Autocomplete, { fullWidth: true, sx: { minWidth: '225px' }, size: "small", value: field, options: hitFields.map(_field => _field.key), getOptionDisabled: option => sortEntries.map(entry => entry.replace(/ .+/, '')).includes(option), renderInput: _params => _jsx(TextField, { ..._params, label: t('hit.search.sort.fields') }), onChange: (_, value) => setField(value), disableClearable: true }), _jsxs(Select, { size: "small", sx: { minWidth: '150px' }, value: sort, onChange: e => setSort(e.target.value), children: [_jsx(MenuItem, { value: "asc", children: t('asc') }), _jsx(MenuItem, { value: "desc", children: t('desc') })] })] }), _jsx(Grid, { container: true, spacing: 1, sx: theme => ({ marginLeft: `${theme.spacing(-1)} !important` }), children: sortFields.map(([key, direction]) => (_jsx(Grid, {
|
|
34
|
+
return (_jsxs(Stack, { spacing: 1, maxWidth: "450px", children: [_jsxs(Stack, { direction: "row", spacing: 1, children: [_jsx(Autocomplete, { fullWidth: true, sx: { minWidth: '225px' }, size: "small", value: field, options: hitFields.map(_field => _field.key).filter(notNil), getOptionDisabled: option => sortEntries.map(entry => entry.replace(/ .+/, '')).includes(option), renderInput: _params => _jsx(TextField, { ..._params, label: t('hit.search.sort.fields') }), onChange: (_, value) => setField(value), disableClearable: true }), _jsxs(Select, { size: "small", sx: { minWidth: '150px' }, value: sort, onChange: e => setSort(e.target.value), children: [_jsx(MenuItem, { value: "asc", children: t('asc') }), _jsx(MenuItem, { value: "desc", children: t('desc') })] })] }), _jsx(Grid, { container: true, spacing: 1, sx: theme => ({ marginLeft: `${theme.spacing(-1)} !important` }), children: sortFields.map(([key, direction]) => (_jsx(Grid, { children: _jsx(Chip, { variant: "outlined", label: key, icon: direction === 'asc' ? _jsx(ArrowUpward, {}) : _jsx(ArrowDownward, {}), deleteIcon: _jsx(Cancel, {}), onClick: () => setSavedSort(sortEntries
|
|
34
35
|
.map(entry => entry?.replace(`${key} ${direction}`, `${key} ${direction === 'asc' ? 'desc' : 'asc'}`))
|
|
35
36
|
.join(',')), onDelete: () => setSavedSort(sortEntries.filter(entry => entry && entry.split(' ')[0] != key).join(',')) }) }, key))) })] }));
|
|
36
37
|
};
|
|
@@ -21,6 +21,14 @@ const CustomSpan = () => {
|
|
|
21
21
|
setCustomSpan(dayjs.min(_startDate, _endDate).toISOString(), dayjs.max(_startDate, _endDate).toISOString());
|
|
22
22
|
}
|
|
23
23
|
}, [endDate, setCustomSpan, span, startDate]);
|
|
24
|
-
return span?.endsWith('custom') ? (_jsx(LocalizationProvider, { dateAdapter: AdapterDayjs, children: _jsxs(Stack, { direction: "row", spacing: 1, useFlexGap: true, flexWrap: "wrap", children: [_jsx(DateTimePicker, { sx: { minWidth: '175px', flexGrow: 1, marginTop: 1 }, slotProps: { textField: { size: 'small' } }, label: t('date.select.start'), value: startDate ? dayjs(startDate) : dayjs().subtract(1, 'days'), maxDateTime: endDate, onChange: (newStartDate) =>
|
|
24
|
+
return span?.endsWith('custom') ? (_jsx(LocalizationProvider, { dateAdapter: AdapterDayjs, children: _jsxs(Stack, { direction: "row", spacing: 1, useFlexGap: true, flexWrap: "wrap", children: [_jsx(DateTimePicker, { sx: { minWidth: '175px', flexGrow: 1, marginTop: 1 }, slotProps: { textField: { size: 'small' } }, label: t('date.select.start'), value: startDate ? dayjs(startDate) : dayjs().subtract(1, 'days'), maxDateTime: endDate ?? undefined, onChange: (newStartDate) => {
|
|
25
|
+
if (newStartDate && endDate) {
|
|
26
|
+
setCustomSpan(newStartDate.toISOString(), endDate.toISOString());
|
|
27
|
+
}
|
|
28
|
+
}, ampm: false, disableFuture: true }), _jsx(DateTimePicker, { sx: { minWidth: '175px', flexGrow: 1, marginTop: 1 }, slotProps: { textField: { size: 'small' } }, label: t('date.select.end'), value: endDate ?? dayjs().subtract(1, 'day'), minDateTime: startDate ?? undefined, onChange: (newEndDate) => {
|
|
29
|
+
if (startDate && newEndDate) {
|
|
30
|
+
setCustomSpan(startDate.toISOString(), newEndDate.toISOString());
|
|
31
|
+
}
|
|
32
|
+
}, ampm: false, disableFuture: true })] }) })) : null;
|
|
25
33
|
};
|
|
26
34
|
export default memo(CustomSpan);
|
|
@@ -45,12 +45,15 @@ const HitFilter = ({ size, id, value }) => {
|
|
|
45
45
|
const onCategoryChange = useCallback(async (_, _category) => {
|
|
46
46
|
setCategory(_category);
|
|
47
47
|
setFilter(null);
|
|
48
|
-
if (!
|
|
48
|
+
if (!_category) {
|
|
49
|
+
return;
|
|
50
|
+
}
|
|
51
|
+
if (!config.lookups?.[_category]) {
|
|
49
52
|
setLoading(true);
|
|
50
53
|
const facets = await dispatchApi(api.search.facet.hit.post({ query: 'howler.id:*', fields: [_category], rows: 100 }), {
|
|
51
54
|
throwError: false
|
|
52
55
|
});
|
|
53
|
-
setCustomLookups(Object.keys((facets ?? {})[_category]));
|
|
56
|
+
setCustomLookups(Object.keys((facets ?? {})[_category] ?? {}));
|
|
54
57
|
setLoading(false);
|
|
55
58
|
}
|
|
56
59
|
else {
|
|
@@ -67,6 +70,8 @@ const HitFilter = ({ size, id, value }) => {
|
|
|
67
70
|
}
|
|
68
71
|
}, [category, id, setSavedFilter]);
|
|
69
72
|
const filterValue = filter?.replaceAll('"', '').replaceAll('\\-', '-') || '';
|
|
70
|
-
|
|
73
|
+
const configuredLookup = category && category in (config.lookups ?? {}) ? config.lookups?.[category] : undefined;
|
|
74
|
+
const lookupOptions = Array.isArray(configuredLookup) ? configuredLookup : customLookups;
|
|
75
|
+
return (_jsx(ChipPopper, { icon: _jsx(FilterList, { fontSize: "small" }), label: category && _jsx(Typography, { variant: "body2", children: `${category}:${filterValue || '*'}` }), minWidth: "250px", onDelete: () => removeSavedFilter(value), slotProps: { chip: { size: 'small', color: value?.endsWith('*') ? 'warning' : 'default' } }, children: _jsxs(Stack, { spacing: 1, sx: { minWidth: '225px' }, children: [_jsx(Autocomplete, { fullWidth: true, size: size ?? 'small', value: category, options: ACCEPTED_LOOKUPS, renderInput: _params => _jsx(TextField, { ..._params, label: t('hit.search.filter.fields') }), onChange: onCategoryChange }), _jsx(Autocomplete, { fullWidth: true, freeSolo: true, disabled: !category, loading: loading, size: size ?? 'small', value: filter?.replaceAll('"', '').replaceAll('\\-', '-') || '', options: [...lookupOptions, '*'], renderInput: _params => _jsx(TextField, { ..._params, label: t('hit.search.filter.values') }), getOptionLabel: option => t(option), onChange: onValueChange })] }) }));
|
|
71
76
|
};
|
|
72
77
|
export default memo(HitFilter);
|