@cccsaurora/howler-ui 2.14.0-dev.268 → 2.14.0-dev.271
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 +3 -0
- package/api/action/execute.js +17 -0
- package/api/action/index.d.ts +10 -0
- package/api/action/index.js +28 -0
- package/api/action/operations.d.ts +3 -0
- package/api/action/operations.js +8 -0
- package/api/analytic/comments/index.d.ts +13 -0
- package/api/analytic/comments/index.js +19 -0
- package/api/analytic/comments/react.d.ts +3 -0
- package/api/analytic/comments/react.js +11 -0
- package/api/analytic/favourite.d.ts +7 -0
- package/api/analytic/favourite.js +11 -0
- package/api/analytic/index.d.ts +12 -0
- package/api/analytic/index.js +19 -0
- package/api/analytic/notebooks/index.d.ts +10 -0
- package/api/analytic/notebooks/index.js +11 -0
- package/api/analytic/owner.d.ts +5 -0
- package/api/analytic/owner.js +8 -0
- package/api/analytic/rules.d.ts +3 -0
- package/api/analytic/rules.js +8 -0
- package/api/auth/apikey.d.ts +8 -0
- package/api/auth/apikey.js +11 -0
- package/api/auth/index.d.ts +4 -0
- package/api/auth/index.js +7 -0
- package/api/auth/login.d.ts +14 -0
- package/api/auth/login.js +17 -0
- package/api/configs/index.d.ts +3 -0
- package/api/configs/index.js +7 -0
- package/api/dossier/hit.d.ts +2 -0
- package/api/dossier/hit.js +7 -0
- package/api/dossier/index.d.ts +8 -0
- package/api/dossier/index.js +19 -0
- package/api/help.d.ts +55 -0
- package/api/help.js +7 -0
- package/api/hit/assign.d.ts +3 -0
- package/api/hit/assign.js +8 -0
- package/api/hit/comments/index.d.ts +13 -0
- package/api/hit/comments/index.js +19 -0
- package/api/hit/comments/react.d.ts +3 -0
- package/api/hit/comments/react.js +12 -0
- package/api/hit/index.d.ts +35 -0
- package/api/hit/index.js +23 -0
- package/api/hit/labels.d.ts +5 -0
- package/api/hit/labels.js +11 -0
- package/api/hit/overwrite.d.ts +3 -0
- package/api/hit/overwrite.js +8 -0
- package/api/hit/transition.d.ts +4 -0
- package/api/hit/transition.js +8 -0
- package/api/index.d.ts +142 -0
- package/api/index.js +240 -0
- package/api/notebook/environments.d.ts +10 -0
- package/api/notebook/environments.js +8 -0
- package/api/notebook/index.d.ts +14 -0
- package/api/notebook/index.js +9 -0
- package/api/overview/index.d.ts +6 -0
- package/api/overview/index.js +16 -0
- package/api/search/action.d.ts +4 -0
- package/api/search/action.js +8 -0
- package/api/search/analytic.d.ts +4 -0
- package/api/search/analytic.js +8 -0
- package/api/search/count/hit.d.ts +3 -0
- package/api/search/count/hit.js +8 -0
- package/api/search/count/index.d.ts +10 -0
- package/api/search/count/index.js +7 -0
- package/api/search/dossier.d.ts +4 -0
- package/api/search/dossier.js +8 -0
- package/api/search/eql/hit.d.ts +4 -0
- package/api/search/eql/hit.js +8 -0
- package/api/search/facet/hit.d.ts +5 -0
- package/api/search/facet/hit.js +8 -0
- package/api/search/facet/index.d.ts +13 -0
- package/api/search/facet/index.js +7 -0
- package/api/search/fields/hit.d.ts +3 -0
- package/api/search/fields/hit.js +9 -0
- package/api/search/fields/index.d.ts +19 -0
- package/api/search/fields/index.js +15 -0
- package/api/search/fields/user.d.ts +3 -0
- package/api/search/fields/user.js +11 -0
- package/api/search/grouped/hit.d.ts +4 -0
- package/api/search/grouped/hit.js +8 -0
- package/api/search/grouped/index.d.ts +25 -0
- package/api/search/grouped/index.js +8 -0
- package/api/search/grouped/user.d.ts +7 -0
- package/api/search/grouped/user.js +21 -0
- package/api/search/histogram/hit.d.ts +3 -0
- package/api/search/histogram/hit.js +8 -0
- package/api/search/histogram/index.d.ts +14 -0
- package/api/search/histogram/index.js +7 -0
- package/api/search/hit.d.ts +7 -0
- package/api/search/hit.js +11 -0
- package/api/search/index.d.ts +53 -0
- package/api/search/index.js +18 -0
- package/api/search/overview.d.ts +4 -0
- package/api/search/overview.js +8 -0
- package/api/search/sigma/hit.d.ts +4 -0
- package/api/search/sigma/hit.js +8 -0
- package/api/search/template.d.ts +4 -0
- package/api/search/template.js +8 -0
- package/api/search/user.d.ts +7 -0
- package/api/search/user.js +15 -0
- package/api/search/view.d.ts +4 -0
- package/api/search/view.js +8 -0
- package/api/template/index.d.ts +6 -0
- package/api/template/index.js +16 -0
- package/api/user/avatar/index.d.ts +2 -0
- package/api/user/avatar/index.js +8 -0
- package/api/user/groups.d.ts +6 -0
- package/api/user/groups.js +8 -0
- package/api/user/index.d.ts +10 -0
- package/api/user/index.js +15 -0
- package/api/user/whoami.d.ts +3 -0
- package/api/user/whoami.js +8 -0
- package/api/view/favourite.d.ts +7 -0
- package/api/view/favourite.js +11 -0
- package/api/view/index.d.ts +8 -0
- package/api/view/index.js +18 -0
- package/branding/AppBrand.d.ts +85 -0
- package/branding/AppBrand.js +103 -0
- package/commons/components/app/AppConfigs.d.ts +137 -0
- package/commons/components/app/AppConfigs.js +1 -0
- package/commons/components/app/AppConstants.d.ts +10 -0
- package/commons/components/app/AppConstants.js +10 -0
- package/commons/components/app/AppContexts.d.ts +105 -0
- package/commons/components/app/AppContexts.js +21 -0
- package/commons/components/app/AppDefaults.d.ts +6 -0
- package/commons/components/app/AppDefaults.js +40 -0
- package/commons/components/app/AppNotificationService.d.ts +6 -0
- package/commons/components/app/AppNotificationService.js +1 -0
- package/commons/components/app/AppProvider.d.ts +15 -0
- package/commons/components/app/AppProvider.js +41 -0
- package/commons/components/app/AppSearchService.d.ts +21 -0
- package/commons/components/app/AppSearchService.js +1 -0
- package/commons/components/app/AppSkeleton.d.ts +5 -0
- package/commons/components/app/AppSkeleton.js +152 -0
- package/commons/components/app/AppUserService.d.ts +17 -0
- package/commons/components/app/AppUserService.js +1 -0
- package/commons/components/app/hooks/index.js +18 -0
- package/commons/components/app/hooks/useApp.d.ts +1 -0
- package/commons/components/app/hooks/useApp.js +5 -0
- package/commons/components/app/hooks/useAppBanner.d.ts +1 -0
- package/commons/components/app/hooks/useAppBanner.js +6 -0
- package/commons/components/app/hooks/useAppBar.d.ts +1 -0
- package/commons/components/app/hooks/useAppBar.js +5 -0
- package/commons/components/app/hooks/useAppBarHeight.d.ts +2 -0
- package/commons/components/app/hooks/useAppBarHeight.js +22 -0
- package/commons/components/app/hooks/useAppBarScrollTrigger.d.ts +1 -0
- package/commons/components/app/hooks/useAppBarScrollTrigger.js +7 -0
- package/commons/components/app/hooks/useAppBreadcrumbs.d.ts +1 -0
- package/commons/components/app/hooks/useAppBreadcrumbs.js +5 -0
- package/commons/components/app/hooks/useAppConfigs.d.ts +59 -0
- package/commons/components/app/hooks/useAppConfigs.js +44 -0
- package/commons/components/app/hooks/useAppLanguage.d.ts +6 -0
- package/commons/components/app/hooks/useAppLanguage.js +17 -0
- package/commons/components/app/hooks/useAppLayout.d.ts +1 -0
- package/commons/components/app/hooks/useAppLayout.js +5 -0
- package/commons/components/app/hooks/useAppLeftNav.d.ts +1 -0
- package/commons/components/app/hooks/useAppLeftNav.js +5 -0
- package/commons/components/app/hooks/useAppLogo.d.ts +1 -0
- package/commons/components/app/hooks/useAppLogo.js +8 -0
- package/commons/components/app/hooks/useAppNotification.d.ts +1 -0
- package/commons/components/app/hooks/useAppNotification.js +5 -0
- package/commons/components/app/hooks/useAppQuickSearch.d.ts +1 -0
- package/commons/components/app/hooks/useAppQuickSearch.js +5 -0
- package/commons/components/app/hooks/useAppSearchService.d.ts +2 -0
- package/commons/components/app/hooks/useAppSearchService.js +5 -0
- package/commons/components/app/hooks/useAppSitemap.d.ts +13 -0
- package/commons/components/app/hooks/useAppSitemap.js +70 -0
- package/commons/components/app/hooks/useAppSwitcher.d.ts +1 -0
- package/commons/components/app/hooks/useAppSwitcher.js +5 -0
- package/commons/components/app/hooks/useAppTheme.d.ts +8 -0
- package/commons/components/app/hooks/useAppTheme.js +12 -0
- package/commons/components/app/hooks/useAppUser.d.ts +2 -0
- package/commons/components/app/hooks/useAppUser.js +5 -0
- package/commons/components/app/providers/AppBarProvider.d.ts +10 -0
- package/commons/components/app/providers/AppBarProvider.js +24 -0
- package/commons/components/app/providers/AppBreadcrumbsProvider.d.ts +6 -0
- package/commons/components/app/providers/AppBreadcrumbsProvider.js +43 -0
- package/commons/components/app/providers/AppLayoutProvider.d.ts +6 -0
- package/commons/components/app/providers/AppLayoutProvider.js +73 -0
- package/commons/components/app/providers/AppLeftNavProvider.d.ts +6 -0
- package/commons/components/app/providers/AppLeftNavProvider.js +22 -0
- package/commons/components/app/providers/AppNotificationProvider.d.ts +6 -0
- package/commons/components/app/providers/AppNotificationProvider.js +31 -0
- package/commons/components/app/providers/AppQuickSearchProvider.d.ts +8 -0
- package/commons/components/app/providers/AppQuickSearchProvider.js +19 -0
- package/commons/components/app/providers/AppSearchServiceProvider.d.ts +6 -0
- package/commons/components/app/providers/AppSearchServiceProvider.js +46 -0
- package/commons/components/app/providers/AppSnackbarProvider.d.ts +3 -0
- package/commons/components/app/providers/AppSnackbarProvider.js +15 -0
- package/commons/components/app/providers/AppSwitcherProvider.d.ts +6 -0
- package/commons/components/app/providers/AppSwitcherProvider.js +10 -0
- package/commons/components/app/providers/AppUserProvider.d.ts +8 -0
- package/commons/components/app/providers/AppUserProvider.js +12 -0
- package/commons/components/breadcrumbs/BreadcrumbIcon.d.ts +6 -0
- package/commons/components/breadcrumbs/BreadcrumbIcon.js +9 -0
- package/commons/components/breadcrumbs/BreadcrumbLastItem.d.ts +7 -0
- package/commons/components/breadcrumbs/BreadcrumbLastItem.js +19 -0
- package/commons/components/breadcrumbs/BreadcrumbLinkItem.d.ts +7 -0
- package/commons/components/breadcrumbs/BreadcrumbLinkItem.js +20 -0
- package/commons/components/breadcrumbs/BreadcrumbList.d.ts +11 -0
- package/commons/components/breadcrumbs/BreadcrumbList.js +44 -0
- package/commons/components/breadcrumbs/Breadcrumbs.d.ts +4 -0
- package/commons/components/breadcrumbs/Breadcrumbs.js +31 -0
- package/commons/components/display/AppAvatar.d.ts +8 -0
- package/commons/components/display/AppAvatar.js +18 -0
- package/commons/components/display/AppInfoPanel.d.ts +5 -0
- package/commons/components/display/AppInfoPanel.js +17 -0
- package/commons/components/display/AppListEmpty.d.ts +2 -0
- package/commons/components/display/AppListEmpty.js +5 -0
- package/commons/components/display/AppToc.d.ts +19 -0
- package/commons/components/display/AppToc.js +98 -0
- package/commons/components/display/hooks/useAppColor.d.ts +5 -0
- package/commons/components/display/hooks/useAppColor.js +10 -0
- package/commons/components/leftnav/LeftNavDrawer.d.ts +2 -0
- package/commons/components/leftnav/LeftNavDrawer.js +99 -0
- package/commons/components/leftnav/LeftNavGroup.d.ts +7 -0
- package/commons/components/leftnav/LeftNavGroup.js +55 -0
- package/commons/components/leftnav/LeftNavItem.d.ts +10 -0
- package/commons/components/leftnav/LeftNavItem.js +29 -0
- package/commons/components/notification/FeedModels.d.ts +64 -0
- package/commons/components/notification/FeedModels.js +94 -0
- package/commons/components/notification/Notification.d.ts +10 -0
- package/commons/components/notification/Notification.js +95 -0
- package/commons/components/notification/elements/NotificationCloseButton.d.ts +3 -0
- package/commons/components/notification/elements/NotificationCloseButton.js +6 -0
- package/commons/components/notification/elements/NotificationContainer.d.ts +16 -0
- package/commons/components/notification/elements/NotificationContainer.js +29 -0
- package/commons/components/notification/elements/NotificationEndOfPage.d.ts +5 -0
- package/commons/components/notification/elements/NotificationEndOfPage.js +36 -0
- package/commons/components/notification/elements/NotificationError.d.ts +2 -0
- package/commons/components/notification/elements/NotificationError.js +10 -0
- package/commons/components/notification/elements/NotificationHeader.d.ts +8 -0
- package/commons/components/notification/elements/NotificationHeader.js +18 -0
- package/commons/components/notification/elements/NotificationItems.d.ts +12 -0
- package/commons/components/notification/elements/NotificationItems.js +12 -0
- package/commons/components/notification/elements/NotificationSkeleton.d.ts +2 -0
- package/commons/components/notification/elements/NotificationSkeleton.js +12 -0
- package/commons/components/notification/elements/NotificationTopNavButton.d.ts +9 -0
- package/commons/components/notification/elements/NotificationTopNavButton.js +9 -0
- package/commons/components/notification/elements/item/NotificationItem.d.ts +5 -0
- package/commons/components/notification/elements/item/NotificationItem.js +25 -0
- package/commons/components/notification/elements/item/NotificationItemAuthor.d.ts +5 -0
- package/commons/components/notification/elements/item/NotificationItemAuthor.js +31 -0
- package/commons/components/notification/elements/item/NotificationItemContent.d.ts +3 -0
- package/commons/components/notification/elements/item/NotificationItemContent.js +9 -0
- package/commons/components/notification/elements/item/NotificationItemDate.d.ts +3 -0
- package/commons/components/notification/elements/item/NotificationItemDate.js +10 -0
- package/commons/components/notification/elements/item/NotificationItemImage.d.ts +4 -0
- package/commons/components/notification/elements/item/NotificationItemImage.js +8 -0
- package/commons/components/notification/elements/item/NotificationItemTag.d.ts +4 -0
- package/commons/components/notification/elements/item/NotificationItemTag.js +12 -0
- package/commons/components/notification/elements/item/NotificationItemTitle.d.ts +3 -0
- package/commons/components/notification/elements/item/NotificationItemTitle.js +15 -0
- package/commons/components/notification/index.js +2 -0
- package/commons/components/pages/PageCardCentered.d.ts +5 -0
- package/commons/components/pages/PageCardCentered.js +30 -0
- package/commons/components/pages/PageCenter.d.ts +8 -0
- package/commons/components/pages/PageCenter.js +20 -0
- package/commons/components/pages/PageContent.d.ts +7 -0
- package/commons/components/pages/PageContent.js +8 -0
- package/commons/components/pages/PageFullScreen.d.ts +10 -0
- package/commons/components/pages/PageFullScreen.js +40 -0
- package/commons/components/pages/PageFullWidth.d.ts +11 -0
- package/commons/components/pages/PageFullWidth.js +7 -0
- package/commons/components/pages/PageHeader.d.ts +23 -0
- package/commons/components/pages/PageHeader.js +27 -0
- package/commons/components/pages/hooks/usePageProps.d.ts +24 -0
- package/commons/components/pages/hooks/usePageProps.js +19 -0
- package/commons/components/search/AppSearch.d.ts +1 -0
- package/commons/components/search/AppSearch.js +135 -0
- package/commons/components/search/AppSearchInput.d.ts +11 -0
- package/commons/components/search/AppSearchInput.js +35 -0
- package/commons/components/search/AppSearchResult.d.ts +4 -0
- package/commons/components/search/AppSearchResult.js +28 -0
- package/commons/components/topnav/AppBar.d.ts +5 -0
- package/commons/components/topnav/AppBar.js +80 -0
- package/commons/components/topnav/AppName.d.ts +4 -0
- package/commons/components/topnav/AppName.js +31 -0
- package/commons/components/topnav/AppSwitcher.d.ts +2 -0
- package/commons/components/topnav/AppSwitcher.js +44 -0
- package/commons/components/topnav/Notifications.d.ts +2 -0
- package/commons/components/topnav/Notifications.js +8 -0
- package/commons/components/topnav/ThemeSelection.d.ts +2 -0
- package/commons/components/topnav/ThemeSelection.js +33 -0
- package/commons/components/topnav/ThemeSelectionIcon.d.ts +2 -0
- package/commons/components/topnav/ThemeSelectionIcon.js +16 -0
- package/commons/components/topnav/UserProfile.d.ts +5 -0
- package/commons/components/topnav/UserProfile.js +71 -0
- package/commons/components/utils/hooks/useClipboard.d.ts +3 -0
- package/commons/components/utils/hooks/useClipboard.js +29 -0
- package/commons/components/utils/hooks/useEnv.d.ts +1 -0
- package/commons/components/utils/hooks/useEnv.js +11 -0
- package/commons/components/utils/hooks/useFullscreenStatus.d.ts +2 -0
- package/commons/components/utils/hooks/useFullscreenStatus.js +41 -0
- package/commons/components/utils/hooks/useGravatar.d.ts +2 -0
- package/commons/components/utils/hooks/useGravatar.js +9 -0
- package/commons/components/utils/hooks/useLocalStorage.d.ts +12 -0
- package/commons/components/utils/hooks/useLocalStorage.js +52 -0
- package/commons/components/utils/hooks/useLocalStorageItem.d.ts +14 -0
- package/commons/components/utils/hooks/useLocalStorageItem.js +39 -0
- package/commons/components/utils/hooks/useThemeBuilder.d.ts +7 -0
- package/commons/components/utils/hooks/useThemeBuilder.js +48 -0
- package/commons/components/utils/keyboard.d.ts +30 -0
- package/commons/components/utils/keyboard.js +50 -0
- package/components/app/App.d.ts +3 -0
- package/components/app/App.js +341 -0
- package/components/app/AppContainer.d.ts +3 -0
- package/components/app/AppContainer.js +10 -0
- package/components/app/drawers/ApiKeyDrawer.d.ts +6 -0
- package/components/app/drawers/ApiKeyDrawer.js +66 -0
- package/components/app/drawers/AppDrawerType.d.ts +6 -0
- package/components/app/drawers/AppDrawerType.js +1 -0
- package/components/app/drawers/AssignUserDrawer.d.ts +9 -0
- package/components/app/drawers/AssignUserDrawer.js +50 -0
- package/components/app/drawers/ViewGroupsDrawer.d.ts +7 -0
- package/components/app/drawers/ViewGroupsDrawer.js +6 -0
- package/components/app/hooks/useMatchers.d.ts +9 -0
- package/components/app/hooks/useMatchers.js +82 -0
- package/components/app/hooks/useMatchers.test.d.ts +1 -0
- package/components/app/hooks/useMatchers.test.js +237 -0
- package/components/app/hooks/useTitle.d.ts +2 -0
- package/components/app/hooks/useTitle.js +68 -0
- package/components/app/providers/AnalyticProvider.d.ts +10 -0
- package/components/app/providers/AnalyticProvider.js +61 -0
- package/components/app/providers/ApiConfigProvider.d.ts +9 -0
- package/components/app/providers/ApiConfigProvider.js +18 -0
- package/components/app/providers/AppDrawerProvider.d.ts +10 -0
- package/components/app/providers/AppDrawerProvider.js +29 -0
- package/components/app/providers/AvatarProvider.d.ts +7 -0
- package/components/app/providers/AvatarProvider.js +31 -0
- package/components/app/providers/CustomPluginProvider.d.ts +3 -0
- package/components/app/providers/CustomPluginProvider.js +14 -0
- package/components/app/providers/FavouritesProvider.d.ts +4 -0
- package/components/app/providers/FavouritesProvider.js +134 -0
- package/components/app/providers/FieldProvider.d.ts +9 -0
- package/components/app/providers/FieldProvider.js +19 -0
- package/components/app/providers/HitProvider.d.ts +22 -0
- package/components/app/providers/HitProvider.js +113 -0
- package/components/app/providers/HitSearchProvider.d.ts +27 -0
- package/components/app/providers/HitSearchProvider.js +169 -0
- package/components/app/providers/LocalStorageProvider.d.ts +13 -0
- package/components/app/providers/LocalStorageProvider.js +41 -0
- package/components/app/providers/ModalProvider.d.ts +16 -0
- package/components/app/providers/ModalProvider.js +28 -0
- package/components/app/providers/OverviewProvider.d.ts +13 -0
- package/components/app/providers/OverviewProvider.js +59 -0
- package/components/app/providers/ParameterProvider.d.ts +26 -0
- package/components/app/providers/ParameterProvider.js +183 -0
- package/components/app/providers/SocketProvider.d.ts +57 -0
- package/components/app/providers/SocketProvider.js +226 -0
- package/components/app/providers/UserListProvider.d.ts +12 -0
- package/components/app/providers/UserListProvider.js +30 -0
- package/components/app/providers/ViewProvider.d.ts +23 -0
- package/components/app/providers/ViewProvider.js +127 -0
- package/components/app/providers/ViewProvider.test.d.ts +1 -0
- package/components/app/providers/ViewProvider.test.js +168 -0
- package/components/elements/Comment.d.ts +17 -0
- package/components/elements/Comment.js +114 -0
- package/components/elements/EditRow.d.ts +14 -0
- package/components/elements/EditRow.js +115 -0
- package/components/elements/PluginChip.d.ts +9 -0
- package/components/elements/PluginChip.js +22 -0
- package/components/elements/PluginTypography.d.ts +9 -0
- package/components/elements/PluginTypography.js +22 -0
- package/components/elements/ThemedEditor.d.ts +3 -0
- package/components/elements/ThemedEditor.js +104 -0
- package/components/elements/UserList.d.ts +9 -0
- package/components/elements/UserList.js +26 -0
- package/components/elements/addons/buttons/CustomButton.d.ts +12 -0
- package/components/elements/addons/buttons/CustomButton.js +43 -0
- package/components/elements/addons/buttons/CustomIconButton.d.ts +15 -0
- package/components/elements/addons/buttons/CustomIconButton.js +48 -0
- package/components/elements/addons/buttons/index.d.ts +3 -0
- package/components/elements/addons/buttons/index.js +4 -0
- package/components/elements/addons/layout/FlexOne.d.ts +4 -0
- package/components/elements/addons/layout/FlexOne.js +6 -0
- package/components/elements/addons/layout/FlexPort.d.ts +12 -0
- package/components/elements/addons/layout/FlexPort.js +15 -0
- package/components/elements/addons/layout/FlexVertical.d.ts +8 -0
- package/components/elements/addons/layout/FlexVertical.js +13 -0
- package/components/elements/addons/layout/vsbox/VSBox.d.ts +16 -0
- package/components/elements/addons/layout/vsbox/VSBox.js +27 -0
- package/components/elements/addons/layout/vsbox/VSBoxContent.d.ts +4 -0
- package/components/elements/addons/layout/vsbox/VSBoxContent.js +6 -0
- package/components/elements/addons/layout/vsbox/VSBoxElement.d.ts +8 -0
- package/components/elements/addons/layout/vsbox/VSBoxElement.js +39 -0
- package/components/elements/addons/layout/vsbox/VSBoxHeader.d.ts +5 -0
- package/components/elements/addons/layout/vsbox/VSBoxHeader.js +23 -0
- package/components/elements/addons/lists/TuiList.d.ts +8 -0
- package/components/elements/addons/lists/TuiList.js +9 -0
- package/components/elements/addons/lists/TuiListBase.d.ts +10 -0
- package/components/elements/addons/lists/TuiListBase.js +61 -0
- package/components/elements/addons/lists/TuiListElement.d.ts +9 -0
- package/components/elements/addons/lists/TuiListElement.js +24 -0
- package/components/elements/addons/lists/TuiListMenu.d.ts +49 -0
- package/components/elements/addons/lists/TuiListMenu.js +33 -0
- package/components/elements/addons/lists/TuiListProvider.d.ts +22 -0
- package/components/elements/addons/lists/TuiListProvider.js +117 -0
- package/components/elements/addons/lists/hooks/useTuiListKeyboard.d.ts +5 -0
- package/components/elements/addons/lists/hooks/useTuiListKeyboard.js +41 -0
- package/components/elements/addons/lists/index.d.ts +19 -0
- package/components/elements/addons/lists/index.js +4 -0
- package/components/elements/addons/lists/table/TuiTable.d.ts +14 -0
- package/components/elements/addons/lists/table/TuiTable.js +81 -0
- package/components/elements/addons/lists/table/TuiTableBody.d.ts +14 -0
- package/components/elements/addons/lists/table/TuiTableBody.js +19 -0
- package/components/elements/addons/lists/table/TuiTableHead.d.ts +8 -0
- package/components/elements/addons/lists/table/TuiTableHead.js +9 -0
- package/components/elements/addons/lists/table/TuiTableHeader.d.ts +6 -0
- package/components/elements/addons/lists/table/TuiTableHeader.js +8 -0
- package/components/elements/addons/lists/table/TuiTableLayout.d.ts +12 -0
- package/components/elements/addons/lists/table/TuiTableLayout.js +41 -0
- package/components/elements/addons/lists/table/index.d.ts +15 -0
- package/components/elements/addons/lists/table/index.js +1 -0
- package/components/elements/addons/search/SearchPagination.d.ts +9 -0
- package/components/elements/addons/search/SearchPagination.js +12 -0
- package/components/elements/addons/search/SearchTotal.d.ts +8 -0
- package/components/elements/addons/search/SearchTotal.js +13 -0
- package/components/elements/addons/search/phrase/Phrase.d.ts +19 -0
- package/components/elements/addons/search/phrase/Phrase.js +89 -0
- package/components/elements/addons/search/phrase/PhraseConsumer.d.ts +13 -0
- package/components/elements/addons/search/phrase/PhraseConsumer.js +22 -0
- package/components/elements/addons/search/phrase/PhraseLexer.d.ts +26 -0
- package/components/elements/addons/search/phrase/PhraseLexer.js +130 -0
- package/components/elements/addons/search/phrase/index.d.ts +40 -0
- package/components/elements/addons/search/phrase/index.js +45 -0
- package/components/elements/addons/search/phrase/word/WordLexer.d.ts +5 -0
- package/components/elements/addons/search/phrase/word/WordLexer.js +8 -0
- package/components/elements/addons/search/phrase/word/WordSuggester.d.ts +6 -0
- package/components/elements/addons/search/phrase/word/WordSuggester.js +9 -0
- package/components/elements/addons/search/phrase/word/consumers/WhitespaceConsumer.d.ts +7 -0
- package/components/elements/addons/search/phrase/word/consumers/WhitespaceConsumer.js +17 -0
- package/components/elements/addons/search/phrase/word/consumers/WordConsumer.d.ts +7 -0
- package/components/elements/addons/search/phrase/word/consumers/WordConsumer.js +17 -0
- package/components/elements/display/ActionButton.d.ts +8 -0
- package/components/elements/display/ActionButton.js +18 -0
- package/components/elements/display/Classification.d.ts +3 -0
- package/components/elements/display/Classification.js +22 -0
- package/components/elements/display/DocumentationButton.d.ts +3 -0
- package/components/elements/display/DocumentationButton.js +34 -0
- package/components/elements/display/DynamicTabs.d.ts +8 -0
- package/components/elements/display/DynamicTabs.js +21 -0
- package/components/elements/display/HandlebarsMarkdown.d.ts +9 -0
- package/components/elements/display/HandlebarsMarkdown.js +78 -0
- package/components/elements/display/HowlerAvatar.d.ts +6 -0
- package/components/elements/display/HowlerAvatar.js +44 -0
- package/components/elements/display/HowlerAvatarHeader.d.ts +6 -0
- package/components/elements/display/HowlerAvatarHeader.js +19 -0
- package/components/elements/display/HowlerCard.d.ts +3 -0
- package/components/elements/display/HowlerCard.js +5 -0
- package/components/elements/display/Image.d.ts +3 -0
- package/components/elements/display/Image.js +23 -0
- package/components/elements/display/ItemManager.d.ts +25 -0
- package/components/elements/display/ItemManager.js +35 -0
- package/components/elements/display/Markdown.d.ts +10 -0
- package/components/elements/display/Markdown.js +133 -0
- package/components/elements/display/Modal.d.ts +3 -0
- package/components/elements/display/Modal.js +30 -0
- package/components/elements/display/Notebook.d.ts +5 -0
- package/components/elements/display/Notebook.js +6 -0
- package/components/elements/display/QueryResultText.d.ts +6 -0
- package/components/elements/display/QueryResultText.js +15 -0
- package/components/elements/display/TextDivider.d.ts +3 -0
- package/components/elements/display/TextDivider.js +40 -0
- package/components/elements/display/TypingIndicator.d.ts +2 -0
- package/components/elements/display/TypingIndicator.js +29 -0
- package/components/elements/display/UserPageWrapper.d.ts +6 -0
- package/components/elements/display/UserPageWrapper.js +6 -0
- package/components/elements/display/features/DevelopmentBanner.d.ts +3 -0
- package/components/elements/display/features/DevelopmentBanner.js +14 -0
- package/components/elements/display/features/DevelopmentIcon.d.ts +3 -0
- package/components/elements/display/features/DevelopmentIcon.js +15 -0
- package/components/elements/display/handlebars/helpers.d.ts +12 -0
- package/components/elements/display/handlebars/helpers.js +223 -0
- package/components/elements/display/icons/BundleButton.d.ts +6 -0
- package/components/elements/display/icons/BundleButton.js +32 -0
- package/components/elements/display/icons/Iconified.d.ts +9 -0
- package/components/elements/display/icons/Iconified.js +11 -0
- package/components/elements/display/icons/SocketBadge.d.ts +5 -0
- package/components/elements/display/icons/SocketBadge.js +60 -0
- package/components/elements/display/json/JSONViewer.d.ts +8 -0
- package/components/elements/display/json/JSONViewer.js +46 -0
- package/components/elements/display/markdownPlugins/tabs.d.ts +3 -0
- package/components/elements/display/markdownPlugins/tabs.js +70 -0
- package/components/elements/display/modals/ConfirmDeleteModal.d.ts +5 -0
- package/components/elements/display/modals/ConfirmDeleteModal.js +15 -0
- package/components/elements/display/modals/ConfirmNotebookModal.d.ts +5 -0
- package/components/elements/display/modals/ConfirmNotebookModal.js +15 -0
- package/components/elements/display/modals/CreateActionModal.d.ts +5 -0
- package/components/elements/display/modals/CreateActionModal.js +35 -0
- package/components/elements/display/modals/LoginErrorModal.d.ts +5 -0
- package/components/elements/display/modals/LoginErrorModal.js +9 -0
- package/components/elements/display/modals/RationaleModal.d.ts +5 -0
- package/components/elements/display/modals/RationaleModal.js +28 -0
- package/components/elements/hit/HitActions.d.ts +6 -0
- package/components/elements/hit/HitActions.js +158 -0
- package/components/elements/hit/HitBanner.d.ts +15 -0
- package/components/elements/hit/HitBanner.js +121 -0
- package/components/elements/hit/HitBannerTooltip.d.ts +6 -0
- package/components/elements/hit/HitBannerTooltip.js +9 -0
- package/components/elements/hit/HitCard.d.ts +7 -0
- package/components/elements/hit/HitCard.js +25 -0
- package/components/elements/hit/HitComments.d.ts +11 -0
- package/components/elements/hit/HitComments.js +176 -0
- package/components/elements/hit/HitDetails.d.ts +5 -0
- package/components/elements/hit/HitDetails.js +125 -0
- package/components/elements/hit/HitLabels.d.ts +6 -0
- package/components/elements/hit/HitLabels.js +121 -0
- package/components/elements/hit/HitLayout.d.ts +5 -0
- package/components/elements/hit/HitLayout.js +6 -0
- package/components/elements/hit/HitNotebooks.d.ts +8 -0
- package/components/elements/hit/HitNotebooks.js +145 -0
- package/components/elements/hit/HitOutline.d.ts +9 -0
- package/components/elements/hit/HitOutline.js +36 -0
- package/components/elements/hit/HitOverview.d.ts +6 -0
- package/components/elements/hit/HitOverview.js +22 -0
- package/components/elements/hit/HitQuickSearch.d.ts +8 -0
- package/components/elements/hit/HitQuickSearch.js +31 -0
- package/components/elements/hit/HitRelated.d.ts +6 -0
- package/components/elements/hit/HitRelated.js +7 -0
- package/components/elements/hit/HitShortcuts.d.ts +5 -0
- package/components/elements/hit/HitShortcuts.js +6 -0
- package/components/elements/hit/HitSummary.d.ts +11 -0
- package/components/elements/hit/HitSummary.js +152 -0
- package/components/elements/hit/HitWorklog.d.ts +10 -0
- package/components/elements/hit/HitWorklog.js +97 -0
- package/components/elements/hit/actions/ButtonActions.d.ts +12 -0
- package/components/elements/hit/actions/ButtonActions.js +126 -0
- package/components/elements/hit/actions/DropdownActions.d.ts +12 -0
- package/components/elements/hit/actions/DropdownActions.js +28 -0
- package/components/elements/hit/actions/SharedComponents.d.ts +18 -0
- package/components/elements/hit/actions/SharedComponents.js +21 -0
- package/components/elements/hit/aggregate/HitGraph.d.ts +6 -0
- package/components/elements/hit/aggregate/HitGraph.js +236 -0
- package/components/elements/hit/elements/Assigned.d.ts +9 -0
- package/components/elements/hit/elements/Assigned.js +31 -0
- package/components/elements/hit/elements/EscalationChip.d.ts +9 -0
- package/components/elements/hit/elements/EscalationChip.js +10 -0
- package/components/elements/hit/elements/HitTimestamp.d.ts +8 -0
- package/components/elements/hit/elements/HitTimestamp.js +48 -0
- package/components/elements/hit/outlines/DefaultOutline.d.ts +12 -0
- package/components/elements/hit/outlines/DefaultOutline.js +47 -0
- package/components/elements/hit/outlines/al/AssemblyLineRules.d.ts +5 -0
- package/components/elements/hit/outlines/al/AssemblyLineRules.js +46 -0
- package/components/elements/hit/related/PivotLink.d.ts +10 -0
- package/components/elements/hit/related/PivotLink.js +49 -0
- package/components/elements/hit/related/RelatedIcon.d.ts +8 -0
- package/components/elements/hit/related/RelatedIcon.js +32 -0
- package/components/elements/hit/related/RelatedLink.d.ts +8 -0
- package/components/elements/hit/related/RelatedLink.js +22 -0
- package/components/elements/view/ViewTitle.d.ts +10 -0
- package/components/elements/view/ViewTitle.js +25 -0
- package/components/hooks/useHitActions.d.ts +14 -0
- package/components/hooks/useHitActions.js +191 -0
- package/components/hooks/useHitSelection.d.ts +8 -0
- package/components/hooks/useHitSelection.js +78 -0
- package/components/hooks/useMyApi.d.ts +10 -0
- package/components/hooks/useMyApi.js +43 -0
- package/components/hooks/useMyChart.d.ts +276 -0
- package/components/hooks/useMyChart.js +115 -0
- package/components/hooks/useMyLocalStorage.d.ts +17 -0
- package/components/hooks/useMyLocalStorage.js +15 -0
- package/components/hooks/useMyPreferences.d.ts +3 -0
- package/components/hooks/useMyPreferences.js +272 -0
- package/components/hooks/useMySearch.d.ts +4 -0
- package/components/hooks/useMySearch.js +47 -0
- package/components/hooks/useMySitemap.d.ts +3 -0
- package/components/hooks/useMySitemap.js +217 -0
- package/components/hooks/useMySnackbar.d.ts +8 -0
- package/components/hooks/useMySnackbar.js +47 -0
- package/components/hooks/useMyTheme.d.ts +3 -0
- package/components/hooks/useMyTheme.js +30 -0
- package/components/hooks/useMyUser.d.ts +4 -0
- package/components/hooks/useMyUser.js +27 -0
- package/components/hooks/useMyUserFunctions.d.ts +118 -0
- package/components/hooks/useMyUserFunctions.js +113 -0
- package/components/hooks/useMyUserList.d.ts +4 -0
- package/components/hooks/useMyUserList.js +11 -0
- package/components/hooks/useMyUtils.d.ts +4 -0
- package/components/hooks/useMyUtils.js +10 -0
- package/components/hooks/useScrollRestoration.d.ts +7 -0
- package/components/hooks/useScrollRestoration.js +32 -0
- package/components/logins/Login.d.ts +2 -0
- package/components/logins/Login.js +32 -0
- package/components/logins/auth/OAuthLogin.d.ts +6 -0
- package/components/logins/auth/OAuthLogin.js +25 -0
- package/components/logins/auth/UserPassLogin.d.ts +2 -0
- package/components/logins/auth/UserPassLogin.js +26 -0
- package/components/logins/hooks/useLogin.d.ts +7 -0
- package/components/logins/hooks/useLogin.js +90 -0
- package/components/routes/404.d.ts +3 -0
- package/components/routes/404.js +10 -0
- package/components/routes/ErrorBoundary.d.ts +14 -0
- package/components/routes/ErrorBoundary.js +24 -0
- package/components/routes/ErrorOccured.d.ts +3 -0
- package/components/routes/ErrorOccured.js +13 -0
- package/components/routes/Logout.d.ts +3 -0
- package/components/routes/Logout.js +37 -0
- package/components/routes/action/edit/ActionEditor.d.ts +14 -0
- package/components/routes/action/edit/ActionEditor.js +137 -0
- package/components/routes/action/shared/ActionReportDisplay.d.ts +7 -0
- package/components/routes/action/shared/ActionReportDisplay.js +21 -0
- package/components/routes/action/shared/OperationEntry.d.ts +13 -0
- package/components/routes/action/shared/OperationEntry.js +31 -0
- package/components/routes/action/shared/OperationStep.d.ts +11 -0
- package/components/routes/action/shared/OperationStep.js +102 -0
- package/components/routes/action/useMyActionFunctions.d.ts +19 -0
- package/components/routes/action/useMyActionFunctions.js +156 -0
- package/components/routes/action/view/ActionDetails.d.ts +2 -0
- package/components/routes/action/view/ActionDetails.js +80 -0
- package/components/routes/action/view/ActionSearch.d.ts +3 -0
- package/components/routes/action/view/ActionSearch.js +119 -0
- package/components/routes/action/view/Integrations.d.ts +3 -0
- package/components/routes/action/view/Integrations.js +25 -0
- package/components/routes/admin/users/UserEditor.d.ts +3 -0
- package/components/routes/admin/users/UserEditor.js +28 -0
- package/components/routes/admin/users/UserSearch.d.ts +3 -0
- package/components/routes/admin/users/UserSearch.js +124 -0
- package/components/routes/advanced/QueryBuilder.d.ts +3 -0
- package/components/routes/advanced/QueryBuilder.js +264 -0
- package/components/routes/advanced/QueryEditor.d.ts +14 -0
- package/components/routes/advanced/QueryEditor.js +90 -0
- package/components/routes/advanced/RuleModal.d.ts +7 -0
- package/components/routes/advanced/RuleModal.js +83 -0
- package/components/routes/advanced/eqlCompletionProvider.d.ts +3 -0
- package/components/routes/advanced/eqlCompletionProvider.js +84 -0
- package/components/routes/advanced/eqlTokenProvider.d.ts +8 -0
- package/components/routes/advanced/eqlTokenProvider.js +86 -0
- package/components/routes/advanced/historyCompletionProvider.d.ts +3 -0
- package/components/routes/advanced/historyCompletionProvider.js +48 -0
- package/components/routes/advanced/luceneCompletionProvider.d.ts +3 -0
- package/components/routes/advanced/luceneCompletionProvider.js +98 -0
- package/components/routes/advanced/luceneTokenProvider.d.ts +9 -0
- package/components/routes/advanced/luceneTokenProvider.js +104 -0
- package/components/routes/advanced/yamlCompletionProvider.d.ts +3 -0
- package/components/routes/advanced/yamlCompletionProvider.js +50 -0
- package/components/routes/analytics/AnalyticComments.d.ts +7 -0
- package/components/routes/analytics/AnalyticComments.js +115 -0
- package/components/routes/analytics/AnalyticDetails.d.ts +2 -0
- package/components/routes/analytics/AnalyticDetails.js +133 -0
- package/components/routes/analytics/AnalyticHitComments.d.ts +6 -0
- package/components/routes/analytics/AnalyticHitComments.js +49 -0
- package/components/routes/analytics/AnalyticNotebooks.d.ts +7 -0
- package/components/routes/analytics/AnalyticNotebooks.js +60 -0
- package/components/routes/analytics/AnalyticOverview.d.ts +8 -0
- package/components/routes/analytics/AnalyticOverview.js +60 -0
- package/components/routes/analytics/AnalyticOverviews.d.ts +7 -0
- package/components/routes/analytics/AnalyticOverviews.js +39 -0
- package/components/routes/analytics/AnalyticSearch.d.ts +3 -0
- package/components/routes/analytics/AnalyticSearch.js +138 -0
- package/components/routes/analytics/AnalyticTemplates.d.ts +7 -0
- package/components/routes/analytics/AnalyticTemplates.js +43 -0
- package/components/routes/analytics/RuleView.d.ts +8 -0
- package/components/routes/analytics/RuleView.js +48 -0
- package/components/routes/analytics/TriageSettings.d.ts +8 -0
- package/components/routes/analytics/TriageSettings.js +49 -0
- package/components/routes/analytics/widgets/Assessment.d.ts +6 -0
- package/components/routes/analytics/widgets/Assessment.js +45 -0
- package/components/routes/analytics/widgets/Created.d.ts +6 -0
- package/components/routes/analytics/widgets/Created.js +44 -0
- package/components/routes/analytics/widgets/Detection.d.ts +7 -0
- package/components/routes/analytics/widgets/Detection.js +9 -0
- package/components/routes/analytics/widgets/Escalation.d.ts +7 -0
- package/components/routes/analytics/widgets/Escalation.js +40 -0
- package/components/routes/analytics/widgets/Stacked.d.ts +8 -0
- package/components/routes/analytics/widgets/Stacked.js +77 -0
- package/components/routes/analytics/widgets/Status.d.ts +6 -0
- package/components/routes/analytics/widgets/Status.js +11 -0
- package/components/routes/dossiers/DossierCard.d.ts +8 -0
- package/components/routes/dossiers/DossierCard.js +11 -0
- package/components/routes/dossiers/DossierEditor.d.ts +2 -0
- package/components/routes/dossiers/DossierEditor.js +129 -0
- package/components/routes/dossiers/Dossiers.d.ts +2 -0
- package/components/routes/dossiers/Dossiers.js +116 -0
- package/components/routes/dossiers/LeadEditor.d.ts +13 -0
- package/components/routes/dossiers/LeadEditor.js +36 -0
- package/components/routes/dossiers/LeadForm.d.ts +8 -0
- package/components/routes/dossiers/LeadForm.js +51 -0
- package/components/routes/dossiers/PivotForm.d.ts +13 -0
- package/components/routes/dossiers/PivotForm.js +82 -0
- package/components/routes/help/ActionDocumentation.d.ts +9 -0
- package/components/routes/help/ActionDocumentation.js +31 -0
- package/components/routes/help/ActionIntroductionDocumentation.d.ts +3 -0
- package/components/routes/help/ActionIntroductionDocumentation.js +61 -0
- package/components/routes/help/ApiDocumentation.d.ts +3 -0
- package/components/routes/help/ApiDocumentation.js +55 -0
- package/components/routes/help/AuthDocumentation.d.ts +3 -0
- package/components/routes/help/AuthDocumentation.js +15 -0
- package/components/routes/help/BundleDocumentation.d.ts +3 -0
- package/components/routes/help/BundleDocumentation.js +12 -0
- package/components/routes/help/ClientDocumentation.d.ts +3 -0
- package/components/routes/help/ClientDocumentation.js +15 -0
- package/components/routes/help/Help.d.ts +2 -0
- package/components/routes/help/Help.js +24 -0
- package/components/routes/help/HitBannerDocumentation.d.ts +3 -0
- package/components/routes/help/HitBannerDocumentation.js +49 -0
- package/components/routes/help/HitDocumentation.d.ts +3 -0
- package/components/routes/help/HitDocumentation.js +34 -0
- package/components/routes/help/HitLabelsDocumentation.d.ts +3 -0
- package/components/routes/help/HitLabelsDocumentation.js +21 -0
- package/components/routes/help/HitLinksDocumentation.d.ts +3 -0
- package/components/routes/help/HitLinksDocumentation.js +17 -0
- package/components/routes/help/HitSchemaDocumentation.d.ts +3 -0
- package/components/routes/help/HitSchemaDocumentation.js +80 -0
- package/components/routes/help/NotebookDocumentation.d.ts +3 -0
- package/components/routes/help/NotebookDocumentation.js +18 -0
- package/components/routes/help/OverviewDocumentation.d.ts +3 -0
- package/components/routes/help/OverviewDocumentation.js +13 -0
- package/components/routes/help/RetentionDocumentation.d.ts +3 -0
- package/components/routes/help/RetentionDocumentation.js +35 -0
- package/components/routes/help/SearchDocumentation.d.ts +3 -0
- package/components/routes/help/SearchDocumentation.js +114 -0
- package/components/routes/help/TemplateDocumentation.d.ts +3 -0
- package/components/routes/help/TemplateDocumentation.js +46 -0
- package/components/routes/help/ViewDocumentation.d.ts +3 -0
- package/components/routes/help/ViewDocumentation.js +18 -0
- package/components/routes/help/components/HelpTabs.d.ts +6 -0
- package/components/routes/help/components/HelpTabs.js +30 -0
- package/components/routes/help/markdown/en/actionIntroduction.md.js +1 -0
- package/components/routes/help/markdown/en/authentication.md.js +1 -0
- package/components/routes/help/markdown/en/bundles.md.js +1 -0
- package/components/routes/help/markdown/en/client.md.js +1 -0
- package/components/routes/help/markdown/en/links.md.js +1 -0
- package/components/routes/help/markdown/en/notebook.md.js +1 -0
- package/components/routes/help/markdown/en/retention.md.js +1 -0
- package/components/routes/help/markdown/en/schema.md.js +1 -0
- package/components/routes/help/markdown/en/templates.md.js +1 -0
- package/components/routes/help/markdown/en/views.md.js +1 -0
- package/components/routes/help/markdown/fr/actionIntroduction.md.js +1 -0
- package/components/routes/help/markdown/fr/authentication.md.js +1 -0
- package/components/routes/help/markdown/fr/bundles.md.js +1 -0
- package/components/routes/help/markdown/fr/client.md.js +1 -0
- package/components/routes/help/markdown/fr/links.md.js +1 -0
- package/components/routes/help/markdown/fr/notebook.md.js +1 -0
- package/components/routes/help/markdown/fr/retention.md.js +1 -0
- package/components/routes/help/markdown/fr/schema.md.js +1 -0
- package/components/routes/help/markdown/fr/templates.md.js +1 -0
- package/components/routes/help/markdown/fr/views.md.js +1 -0
- package/components/routes/hits/search/BundleParentMenu.d.ts +6 -0
- package/components/routes/hits/search/BundleParentMenu.js +32 -0
- package/components/routes/hits/search/BundleScroller.d.ts +2 -0
- package/components/routes/hits/search/BundleScroller.js +6 -0
- package/components/routes/hits/search/CustomSort.d.ts +2 -0
- package/components/routes/hits/search/CustomSort.js +37 -0
- package/components/routes/hits/search/HitBrowser.d.ts +3 -0
- package/components/routes/hits/search/HitBrowser.js +174 -0
- package/components/routes/hits/search/HitContextMenu.d.ts +7 -0
- package/components/routes/hits/search/HitContextMenu.js +115 -0
- package/components/routes/hits/search/HitQuery.d.ts +9 -0
- package/components/routes/hits/search/HitQuery.js +150 -0
- package/components/routes/hits/search/InformationPane.d.ts +5 -0
- package/components/routes/hits/search/InformationPane.js +204 -0
- package/components/routes/hits/search/SearchPane.d.ts +3 -0
- package/components/routes/hits/search/SearchPane.js +132 -0
- package/components/routes/hits/search/ViewLink.d.ts +2 -0
- package/components/routes/hits/search/ViewLink.js +42 -0
- package/components/routes/hits/search/grid/AddColumnModal.d.ts +8 -0
- package/components/routes/hits/search/grid/AddColumnModal.js +31 -0
- package/components/routes/hits/search/grid/ColumnHeader.d.ts +8 -0
- package/components/routes/hits/search/grid/ColumnHeader.js +30 -0
- package/components/routes/hits/search/grid/EnhancedCell.d.ts +8 -0
- package/components/routes/hits/search/grid/EnhancedCell.js +18 -0
- package/components/routes/hits/search/grid/HitGrid.d.ts +3 -0
- package/components/routes/hits/search/grid/HitGrid.js +139 -0
- package/components/routes/hits/search/grid/HitRow.d.ts +10 -0
- package/components/routes/hits/search/grid/HitRow.js +50 -0
- package/components/routes/hits/search/shared/CustomSpan.d.ts +2 -0
- package/components/routes/hits/search/shared/CustomSpan.js +24 -0
- package/components/routes/hits/search/shared/HitFilter.d.ts +4 -0
- package/components/routes/hits/search/shared/HitFilter.js +64 -0
- package/components/routes/hits/search/shared/HitSort.d.ts +4 -0
- package/components/routes/hits/search/shared/HitSort.js +65 -0
- package/components/routes/hits/search/shared/QuerySettings.d.ts +6 -0
- package/components/routes/hits/search/shared/QuerySettings.js +22 -0
- package/components/routes/hits/search/shared/SearchSpan.d.ts +5 -0
- package/components/routes/hits/search/shared/SearchSpan.js +44 -0
- package/components/routes/hits/view/HitViewer.d.ts +7 -0
- package/components/routes/hits/view/HitViewer.js +162 -0
- package/components/routes/hits/view/LeadRenderer.d.ts +7 -0
- package/components/routes/hits/view/LeadRenderer.js +21 -0
- package/components/routes/home/AddNewCard.d.ts +7 -0
- package/components/routes/home/AddNewCard.js +103 -0
- package/components/routes/home/AnalyticCard.d.ts +7 -0
- package/components/routes/home/AnalyticCard.js +30 -0
- package/components/routes/home/EntryWrapper.d.ts +7 -0
- package/components/routes/home/EntryWrapper.js +19 -0
- package/components/routes/home/ViewCard.d.ts +7 -0
- package/components/routes/home/ViewCard.js +43 -0
- package/components/routes/home/index.d.ts +3 -0
- package/components/routes/home/index.js +122 -0
- package/components/routes/overviews/OverviewCard.d.ts +8 -0
- package/components/routes/overviews/OverviewCard.js +16 -0
- package/components/routes/overviews/OverviewEditor.d.ts +12 -0
- package/components/routes/overviews/OverviewEditor.js +56 -0
- package/components/routes/overviews/OverviewViewer.d.ts +2 -0
- package/components/routes/overviews/OverviewViewer.js +220 -0
- package/components/routes/overviews/Overviews.d.ts +2 -0
- package/components/routes/overviews/Overviews.js +116 -0
- package/components/routes/overviews/markdownExtendedTokenProvider.d.ts +6 -0
- package/components/routes/overviews/markdownExtendedTokenProvider.js +254 -0
- package/components/routes/overviews/startingTemplate.d.ts +1 -0
- package/components/routes/overviews/startingTemplate.js +27 -0
- package/components/routes/overviews/template/en.md.js +1 -0
- package/components/routes/overviews/template/fr.md.js +1 -0
- package/components/routes/settings/AdminSection.d.ts +3 -0
- package/components/routes/settings/AdminSection.js +11 -0
- package/components/routes/settings/LocalSection.d.ts +3 -0
- package/components/routes/settings/LocalSection.js +26 -0
- package/components/routes/settings/ProfileSection.d.ts +10 -0
- package/components/routes/settings/ProfileSection.js +53 -0
- package/components/routes/settings/SecuritySection.d.ts +10 -0
- package/components/routes/settings/SecuritySection.js +31 -0
- package/components/routes/settings/Settings.d.ts +3 -0
- package/components/routes/settings/Settings.js +22 -0
- package/components/routes/settings/SettingsSection.d.ts +7 -0
- package/components/routes/settings/SettingsSection.js +10 -0
- package/components/routes/templates/TemplateCard.d.ts +7 -0
- package/components/routes/templates/TemplateCard.js +13 -0
- package/components/routes/templates/TemplateDnD.d.ts +8 -0
- package/components/routes/templates/TemplateDnD.js +12 -0
- package/components/routes/templates/TemplateEditor.d.ts +9 -0
- package/components/routes/templates/TemplateEditor.js +54 -0
- package/components/routes/templates/TemplateViewer.d.ts +2 -0
- package/components/routes/templates/TemplateViewer.js +156 -0
- package/components/routes/templates/Templates.d.ts +2 -0
- package/components/routes/templates/Templates.js +109 -0
- package/components/routes/views/ViewComposer.d.ts +3 -0
- package/components/routes/views/ViewComposer.js +175 -0
- package/components/routes/views/Views.d.ts +2 -0
- package/components/routes/views/Views.js +182 -0
- package/i18n.d.ts +3 -0
- package/i18n.js +43 -0
- package/index.d.ts +3 -0
- package/index.js +17 -0
- package/locales/en/help/main.json +11 -11
- package/locales/en/help/search.json +182 -184
- package/locales/en/translation.json +691 -797
- package/locales/fr/help/main.json +11 -11
- package/locales/fr/help/search.json +182 -184
- package/locales/fr/translation.json +690 -795
- package/package.json +157 -604
- package/plugins/HowlerPlugin.d.ts +115 -0
- package/plugins/HowlerPlugin.js +273 -0
- package/plugins/store.d.ts +95 -0
- package/plugins/store.js +96 -0
- package/rest/AxiosClient.d.ts +10 -0
- package/rest/AxiosClient.js +60 -0
- package/rest/FetchClient.d.ts +7 -0
- package/rest/FetchClient.js +16 -0
- package/rest/index.d.ts +6 -0
- package/rest/index.js +1 -0
- package/setupTests.d.ts +1 -0
- package/setupTests.js +12 -0
- package/tests/MockLocalStorage.d.ts +5 -0
- package/tests/MockLocalStorage.js +44 -0
- package/tests/server-handlers.d.ts +5 -0
- package/tests/server-handlers.js +97 -0
- package/tests/server.d.ts +3 -0
- package/tests/server.js +5 -0
- package/utils/Throttler.d.ts +9 -0
- package/utils/Throttler.js +38 -0
- package/utils/actionUtils.d.ts +31 -0
- package/utils/actionUtils.js +88 -0
- package/utils/constants.d.ts +79 -0
- package/utils/constants.js +114 -0
- package/utils/hit.json +30291 -30291
- package/utils/hitFunctions.d.ts +2 -0
- package/utils/hitFunctions.js +8 -0
- package/utils/localStorage.d.ts +21 -0
- package/utils/localStorage.js +48 -0
- package/utils/menuUtils.d.ts +89 -0
- package/utils/menuUtils.js +243 -0
- package/utils/sessionStorage.d.ts +7 -0
- package/utils/sessionStorage.js +44 -0
- package/utils/socketUtils.d.ts +8 -0
- package/utils/socketUtils.js +8 -0
- package/utils/stringUtils.d.ts +8 -0
- package/utils/stringUtils.js +47 -0
- package/utils/utils.d.ts +33 -0
- package/utils/utils.js +180 -0
- package/utils/xsrf.d.ts +2 -0
- package/utils/xsrf.js +16 -0
- package/README.fr.md +0 -39
- package/README.md +0 -29
- package/api/action/execute.ts +0 -19
- package/api/action/index.ts +0 -36
- package/api/action/operations.ts +0 -11
- package/api/analytic/comments/index.ts +0 -27
- package/api/analytic/comments/react.ts +0 -14
- package/api/analytic/favourite.ts +0 -14
- package/api/analytic/index.ts +0 -27
- package/api/analytic/notebooks/index.ts +0 -15
- package/api/analytic/owner.ts +0 -11
- package/api/analytic/rules.ts +0 -13
- package/api/auth/apikey.ts +0 -20
- package/api/auth/index.ts +0 -9
- package/api/auth/login.ts +0 -35
- package/api/configs/index.ts +0 -10
- package/api/dossier/hit.ts +0 -10
- package/api/dossier/index.ts +0 -26
- package/api/help.ts +0 -71
- package/api/hit/assign.ts +0 -11
- package/api/hit/comments/index.ts +0 -27
- package/api/hit/comments/react.ts +0 -15
- package/api/hit/index.ts +0 -56
- package/api/hit/labels.ts +0 -16
- package/api/hit/overwrite.ts +0 -11
- package/api/hit/transition.ts +0 -12
- package/api/index.ts +0 -301
- package/api/notebook/environments.ts +0 -14
- package/api/notebook/index.ts +0 -20
- package/api/overview/index.ts +0 -22
- package/api/search/action.ts +0 -12
- package/api/search/analytic.ts +0 -12
- package/api/search/count/hit.ts +0 -11
- package/api/search/count/index.ts +0 -18
- package/api/search/dossier.ts +0 -12
- package/api/search/eql/hit.ts +0 -12
- package/api/search/facet/hit.ts +0 -11
- package/api/search/facet/index.ts +0 -19
- package/api/search/fields/hit.ts +0 -12
- package/api/search/fields/index.ts +0 -29
- package/api/search/fields/user.ts +0 -14
- package/api/search/grouped/hit.ts +0 -15
- package/api/search/grouped/index.ts +0 -34
- package/api/search/grouped/user.ts +0 -30
- package/api/search/histogram/hit.ts +0 -11
- package/api/search/histogram/index.ts +0 -20
- package/api/search/hit.ts +0 -17
- package/api/search/index.ts +0 -63
- package/api/search/overview.ts +0 -12
- package/api/search/sigma/hit.ts +0 -12
- package/api/search/template.ts +0 -12
- package/api/search/user.ts +0 -21
- package/api/search/view.ts +0 -12
- package/api/template/index.ts +0 -22
- package/api/user/avatar/index.ts +0 -10
- package/api/user/groups.ts +0 -12
- package/api/user/index.ts +0 -20
- package/api/user/whoami.ts +0 -11
- package/api/view/favourite.ts +0 -14
- package/api/view/index.ts +0 -25
- package/branding/AppBrand.tsx +0 -161
- package/commons/components/app/AppConfigs.ts +0 -179
- package/commons/components/app/AppConstants.ts +0 -11
- package/commons/components/app/AppContexts.ts +0 -142
- package/commons/components/app/AppDefaults.ts +0 -52
- package/commons/components/app/AppNotificationService.ts +0 -7
- package/commons/components/app/AppProvider.tsx +0 -86
- package/commons/components/app/AppSearchService.ts +0 -33
- package/commons/components/app/AppSkeleton.tsx +0 -321
- package/commons/components/app/AppUserService.ts +0 -21
- package/commons/components/app/hooks/useApp.tsx +0 -6
- package/commons/components/app/hooks/useAppBanner.tsx +0 -7
- package/commons/components/app/hooks/useAppBar.tsx +0 -6
- package/commons/components/app/hooks/useAppBarHeight.tsx +0 -27
- package/commons/components/app/hooks/useAppBarScrollTrigger.tsx +0 -8
- package/commons/components/app/hooks/useAppBreadcrumbs.tsx +0 -6
- package/commons/components/app/hooks/useAppConfigs.tsx +0 -54
- package/commons/components/app/hooks/useAppLanguage.tsx +0 -29
- package/commons/components/app/hooks/useAppLayout.tsx +0 -6
- package/commons/components/app/hooks/useAppLeftNav.tsx +0 -6
- package/commons/components/app/hooks/useAppLogo.tsx +0 -9
- package/commons/components/app/hooks/useAppNotification.tsx +0 -6
- package/commons/components/app/hooks/useAppQuickSearch.tsx +0 -6
- package/commons/components/app/hooks/useAppSearchService.tsx +0 -7
- package/commons/components/app/hooks/useAppSitemap.tsx +0 -84
- package/commons/components/app/hooks/useAppSwitcher.tsx +0 -6
- package/commons/components/app/hooks/useAppTheme.tsx +0 -23
- package/commons/components/app/hooks/useAppUser.tsx +0 -7
- package/commons/components/app/providers/AppBarProvider.tsx +0 -48
- package/commons/components/app/providers/AppBreadcrumbsProvider.tsx +0 -53
- package/commons/components/app/providers/AppLayoutProvider.tsx +0 -114
- package/commons/components/app/providers/AppLeftNavProvider.tsx +0 -30
- package/commons/components/app/providers/AppNotificationProvider.tsx +0 -49
- package/commons/components/app/providers/AppQuickSearchProvider.tsx +0 -32
- package/commons/components/app/providers/AppSearchServiceProvider.tsx +0 -65
- package/commons/components/app/providers/AppSnackbarProvider.tsx +0 -16
- package/commons/components/app/providers/AppSwitcherProvider.tsx +0 -16
- package/commons/components/app/providers/AppUserProvider.tsx +0 -22
- package/commons/components/breadcrumbs/BreadcrumbIcon.tsx +0 -21
- package/commons/components/breadcrumbs/BreadcrumbLastItem.tsx +0 -40
- package/commons/components/breadcrumbs/BreadcrumbLinkItem.tsx +0 -43
- package/commons/components/breadcrumbs/BreadcrumbList.tsx +0 -87
- package/commons/components/breadcrumbs/Breadcrumbs.tsx +0 -40
- package/commons/components/display/AppAvatar.tsx +0 -34
- package/commons/components/display/AppInfoPanel.tsx +0 -30
- package/commons/components/display/AppListEmpty.tsx +0 -5
- package/commons/components/display/AppToc.tsx +0 -160
- package/commons/components/display/hooks/useAppColor.tsx +0 -21
- package/commons/components/leftnav/LeftNavDrawer.tsx +0 -172
- package/commons/components/leftnav/LeftNavGroup.tsx +0 -144
- package/commons/components/leftnav/LeftNavItem.tsx +0 -73
- package/commons/components/notification/FeedModels.ts +0 -163
- package/commons/components/notification/Notification.tsx +0 -152
- package/commons/components/notification/elements/NotificationCloseButton.tsx +0 -14
- package/commons/components/notification/elements/NotificationContainer.tsx +0 -87
- package/commons/components/notification/elements/NotificationEndOfPage.tsx +0 -48
- package/commons/components/notification/elements/NotificationError.tsx +0 -24
- package/commons/components/notification/elements/NotificationHeader.tsx +0 -41
- package/commons/components/notification/elements/NotificationItems.tsx +0 -47
- package/commons/components/notification/elements/NotificationSkeleton.tsx +0 -59
- package/commons/components/notification/elements/NotificationTopNavButton.tsx +0 -27
- package/commons/components/notification/elements/item/NotificationItem.tsx +0 -44
- package/commons/components/notification/elements/item/NotificationItemAuthor.tsx +0 -72
- package/commons/components/notification/elements/item/NotificationItemContent.tsx +0 -29
- package/commons/components/notification/elements/item/NotificationItemDate.tsx +0 -14
- package/commons/components/notification/elements/item/NotificationItemImage.tsx +0 -19
- package/commons/components/notification/elements/item/NotificationItemTag.tsx +0 -18
- package/commons/components/notification/elements/item/NotificationItemTitle.tsx +0 -38
- package/commons/components/pages/PageCardCentered.tsx +0 -32
- package/commons/components/pages/PageCenter.tsx +0 -46
- package/commons/components/pages/PageContent.tsx +0 -13
- package/commons/components/pages/PageFullScreen.tsx +0 -74
- package/commons/components/pages/PageFullWidth.tsx +0 -30
- package/commons/components/pages/PageHeader.tsx +0 -117
- package/commons/components/pages/hooks/usePageProps.tsx +0 -41
- package/commons/components/search/AppSearch.tsx +0 -256
- package/commons/components/search/AppSearchInput.tsx +0 -104
- package/commons/components/search/AppSearchResult.tsx +0 -66
- package/commons/components/topnav/AppBar.tsx +0 -137
- package/commons/components/topnav/AppName.tsx +0 -53
- package/commons/components/topnav/AppSwitcher.tsx +0 -116
- package/commons/components/topnav/Notifications.tsx +0 -16
- package/commons/components/topnav/ThemeSelection.tsx +0 -143
- package/commons/components/topnav/ThemeSelectionIcon.tsx +0 -39
- package/commons/components/topnav/UserProfile.tsx +0 -196
- package/commons/components/utils/hooks/useClipboard.tsx +0 -31
- package/commons/components/utils/hooks/useEnv.tsx +0 -13
- package/commons/components/utils/hooks/useFullscreenStatus.tsx +0 -47
- package/commons/components/utils/hooks/useGravatar.tsx +0 -13
- package/commons/components/utils/hooks/useLocalStorage.ts +0 -75
- package/commons/components/utils/hooks/useLocalStorageItem.tsx +0 -45
- package/commons/components/utils/hooks/useThemeBuilder.tsx +0 -55
- package/commons/components/utils/keyboard.ts +0 -61
- package/components/app/App.tsx +0 -434
- package/components/app/AppContainer.tsx +0 -19
- package/components/app/drawers/ApiKeyDrawer.tsx +0 -173
- package/components/app/drawers/AppDrawerType.ts +0 -7
- package/components/app/drawers/AssignUserDrawer.tsx +0 -126
- package/components/app/drawers/ViewGroupsDrawer.tsx +0 -24
- package/components/app/hooks/useMatchers.tsx +0 -107
- package/components/app/hooks/useTitle.tsx +0 -77
- package/components/app/providers/AnalyticProvider.tsx +0 -87
- package/components/app/providers/ApiConfigProvider.tsx +0 -31
- package/components/app/providers/AppDrawerProvider.tsx +0 -54
- package/components/app/providers/AvatarProvider.tsx +0 -47
- package/components/app/providers/CustomPluginProvider.tsx +0 -19
- package/components/app/providers/FavouritesProvider.tsx +0 -157
- package/components/app/providers/FieldProvider.tsx +0 -34
- package/components/app/providers/HitProvider.tsx +0 -164
- package/components/app/providers/HitSearchProvider.tsx +0 -248
- package/components/app/providers/LocalStorageProvider.tsx +0 -67
- package/components/app/providers/ModalProvider.tsx +0 -57
- package/components/app/providers/OverviewProvider.tsx +0 -90
- package/components/app/providers/ParameterProvider.tsx +0 -270
- package/components/app/providers/SocketProvider.tsx +0 -329
- package/components/app/providers/UserListProvider.tsx +0 -56
- package/components/app/providers/ViewProvider.tsx +0 -207
- package/components/elements/Comment.tsx +0 -315
- package/components/elements/EditRow.tsx +0 -268
- package/components/elements/PluginChip.tsx +0 -32
- package/components/elements/PluginTypography.tsx +0 -31
- package/components/elements/ThemedEditor.tsx +0 -130
- package/components/elements/UserList.tsx +0 -79
- package/components/elements/addons/buttons/CustomButton.tsx +0 -93
- package/components/elements/addons/buttons/CustomIconButton.tsx +0 -122
- package/components/elements/addons/buttons/index.ts +0 -7
- package/components/elements/addons/layout/FlexOne.tsx +0 -6
- package/components/elements/addons/layout/FlexPort.tsx +0 -39
- package/components/elements/addons/layout/FlexVertical.tsx +0 -28
- package/components/elements/addons/layout/vsbox/VSBox.tsx +0 -52
- package/components/elements/addons/layout/vsbox/VSBoxContent.tsx +0 -13
- package/components/elements/addons/layout/vsbox/VSBoxElement.tsx +0 -60
- package/components/elements/addons/layout/vsbox/VSBoxHeader.tsx +0 -41
- package/components/elements/addons/lists/TuiList.tsx +0 -31
- package/components/elements/addons/lists/TuiListBase.tsx +0 -98
- package/components/elements/addons/lists/TuiListElement.tsx +0 -51
- package/components/elements/addons/lists/TuiListMenu.tsx +0 -61
- package/components/elements/addons/lists/TuiListProvider.tsx +0 -162
- package/components/elements/addons/lists/hooks/useTuiListKeyboard.tsx +0 -60
- package/components/elements/addons/lists/index.tsx +0 -25
- package/components/elements/addons/lists/table/TuiTable.tsx +0 -151
- package/components/elements/addons/lists/table/TuiTableBody.tsx +0 -77
- package/components/elements/addons/lists/table/TuiTableHead.tsx +0 -29
- package/components/elements/addons/lists/table/TuiTableHeader.tsx +0 -15
- package/components/elements/addons/lists/table/TuiTableLayout.ts +0 -53
- package/components/elements/addons/lists/table/index.tsx +0 -24
- package/components/elements/addons/search/SearchPagination.tsx +0 -26
- package/components/elements/addons/search/SearchTotal.tsx +0 -35
- package/components/elements/addons/search/phrase/Phrase.tsx +0 -175
- package/components/elements/addons/search/phrase/PhraseConsumer.ts +0 -35
- package/components/elements/addons/search/phrase/PhraseLexer.ts +0 -167
- package/components/elements/addons/search/phrase/index.ts +0 -86
- package/components/elements/addons/search/phrase/word/WordLexer.ts +0 -10
- package/components/elements/addons/search/phrase/word/WordSuggester.ts +0 -9
- package/components/elements/addons/search/phrase/word/consumers/WhitespaceConsumer.ts +0 -21
- package/components/elements/addons/search/phrase/word/consumers/WordConsumer.ts +0 -21
- package/components/elements/display/ActionButton.tsx +0 -40
- package/components/elements/display/Classification.tsx +0 -29
- package/components/elements/display/DocumentationButton.tsx +0 -46
- package/components/elements/display/DynamicTabs.tsx +0 -52
- package/components/elements/display/HandlebarsMarkdown.tsx +0 -105
- package/components/elements/display/HowlerAvatar.tsx +0 -66
- package/components/elements/display/HowlerAvatarHeader.tsx +0 -37
- package/components/elements/display/HowlerCard.tsx +0 -10
- package/components/elements/display/Image.tsx +0 -43
- package/components/elements/display/ItemManager.tsx +0 -146
- package/components/elements/display/Markdown.tsx +0 -200
- package/components/elements/display/Modal.tsx +0 -44
- package/components/elements/display/Notebook.tsx +0 -7
- package/components/elements/display/QueryResultText.tsx +0 -25
- package/components/elements/display/TextDivider.tsx +0 -48
- package/components/elements/display/TypingIndicator.tsx +0 -41
- package/components/elements/display/UserPageWrapper.tsx +0 -20
- package/components/elements/display/features/DevelopmentBanner.tsx +0 -24
- package/components/elements/display/features/DevelopmentIcon.tsx +0 -24
- package/components/elements/display/handlebars/helpers.tsx +0 -276
- package/components/elements/display/icons/BundleButton.tsx +0 -77
- package/components/elements/display/icons/Iconified.tsx +0 -16
- package/components/elements/display/icons/SocketBadge.tsx +0 -82
- package/components/elements/display/icons/svg/howler-icon-darkmode.svg +0 -1
- package/components/elements/display/icons/svg/howler-icon-lightmode.svg +0 -1
- package/components/elements/display/icons/svg/howler-logo-full.svg +0 -1
- package/components/elements/display/icons/svg/howler-logo.svg +0 -1
- package/components/elements/display/json/JSONViewer.tsx +0 -98
- package/components/elements/display/markdownPlugins/tabs.ts +0 -81
- package/components/elements/display/modals/ConfirmDeleteModal.tsx +0 -32
- package/components/elements/display/modals/ConfirmNotebookModal.tsx +0 -32
- package/components/elements/display/modals/CreateActionModal.tsx +0 -63
- package/components/elements/display/modals/LoginErrorModal.tsx +0 -31
- package/components/elements/display/modals/RationaleModal.tsx +0 -59
- package/components/elements/hit/HitActions.tsx +0 -298
- package/components/elements/hit/HitBanner.tsx +0 -367
- package/components/elements/hit/HitBannerTooltip.tsx +0 -41
- package/components/elements/hit/HitCard.tsx +0 -42
- package/components/elements/hit/HitComments.tsx +0 -372
- package/components/elements/hit/HitDetails.tsx +0 -324
- package/components/elements/hit/HitLabels.tsx +0 -265
- package/components/elements/hit/HitLayout.ts +0 -5
- package/components/elements/hit/HitNotebooks.tsx +0 -264
- package/components/elements/hit/HitOutline.tsx +0 -56
- package/components/elements/hit/HitOverview.tsx +0 -53
- package/components/elements/hit/HitQuickSearch.tsx +0 -111
- package/components/elements/hit/HitRelated.tsx +0 -18
- package/components/elements/hit/HitShortcuts.ts +0 -5
- package/components/elements/hit/HitSummary.tsx +0 -301
- package/components/elements/hit/HitWorklog.tsx +0 -201
- package/components/elements/hit/actions/ButtonActions.tsx +0 -269
- package/components/elements/hit/actions/DropdownActions.tsx +0 -157
- package/components/elements/hit/actions/SharedComponents.tsx +0 -40
- package/components/elements/hit/aggregate/HitGraph.tsx +0 -351
- package/components/elements/hit/elements/Assigned.tsx +0 -71
- package/components/elements/hit/elements/EscalationChip.tsx +0 -26
- package/components/elements/hit/elements/HitTimestamp.tsx +0 -81
- package/components/elements/hit/outlines/DefaultOutline.tsx +0 -107
- package/components/elements/hit/outlines/al/AssemblyLineRules.tsx +0 -130
- package/components/elements/hit/related/PivotLink.tsx +0 -67
- package/components/elements/hit/related/RelatedIcon.tsx +0 -51
- package/components/elements/hit/related/RelatedLink.tsx +0 -43
- package/components/elements/view/ViewTitle.tsx +0 -61
- package/components/hooks/useHitActions.tsx +0 -276
- package/components/hooks/useHitSelection.tsx +0 -102
- package/components/hooks/useMyApi.tsx +0 -64
- package/components/hooks/useMyChart.tsx +0 -164
- package/components/hooks/useMyLocalStorage.ts +0 -20
- package/components/hooks/useMyPreferences.tsx +0 -309
- package/components/hooks/useMySearch.tsx +0 -77
- package/components/hooks/useMySitemap.tsx +0 -248
- package/components/hooks/useMySnackbar.tsx +0 -67
- package/components/hooks/useMyTheme.tsx +0 -34
- package/components/hooks/useMyUser.tsx +0 -39
- package/components/hooks/useMyUserFunctions.tsx +0 -166
- package/components/hooks/useMyUserList.tsx +0 -15
- package/components/hooks/useMyUtils.tsx +0 -16
- package/components/hooks/useScrollRestoration.tsx +0 -37
- package/components/logins/Login.tsx +0 -62
- package/components/logins/auth/OAuthLogin.tsx +0 -49
- package/components/logins/auth/UserPassLogin.tsx +0 -57
- package/components/logins/hooks/useLogin.tsx +0 -101
- package/components/routes/404.tsx +0 -24
- package/components/routes/ErrorBoundary.tsx +0 -44
- package/components/routes/ErrorOccured.tsx +0 -28
- package/components/routes/Logout.tsx +0 -56
- package/components/routes/action/edit/ActionEditor.tsx +0 -358
- package/components/routes/action/shared/ActionReportDisplay.tsx +0 -84
- package/components/routes/action/shared/OperationEntry.tsx +0 -121
- package/components/routes/action/shared/OperationStep.tsx +0 -219
- package/components/routes/action/useMyActionFunctions.tsx +0 -225
- package/components/routes/action/view/ActionDetails.tsx +0 -205
- package/components/routes/action/view/ActionSearch.tsx +0 -249
- package/components/routes/action/view/Integrations.tsx +0 -49
- package/components/routes/admin/users/UserEditor.tsx +0 -55
- package/components/routes/admin/users/UserSearch.tsx +0 -228
- package/components/routes/advanced/QueryBuilder.tsx +0 -584
- package/components/routes/advanced/QueryEditor.tsx +0 -148
- package/components/routes/advanced/RuleModal.tsx +0 -217
- package/components/routes/advanced/eqlCompletionProvider.ts +0 -94
- package/components/routes/advanced/eqlTokenProvider.ts +0 -110
- package/components/routes/advanced/historyCompletionProvider.ts +0 -61
- package/components/routes/advanced/luceneCompletionProvider.ts +0 -111
- package/components/routes/advanced/luceneTokenProvider.ts +0 -131
- package/components/routes/advanced/yamlCompletionProvider.ts +0 -58
- package/components/routes/analytics/AnalyticComments.tsx +0 -218
- package/components/routes/analytics/AnalyticDetails.tsx +0 -343
- package/components/routes/analytics/AnalyticHitComments.tsx +0 -99
- package/components/routes/analytics/AnalyticNotebooks.tsx +0 -185
- package/components/routes/analytics/AnalyticOverview.tsx +0 -165
- package/components/routes/analytics/AnalyticOverviews.tsx +0 -75
- package/components/routes/analytics/AnalyticSearch.tsx +0 -301
- package/components/routes/analytics/AnalyticTemplates.tsx +0 -77
- package/components/routes/analytics/RuleView.tsx +0 -80
- package/components/routes/analytics/TriageSettings.tsx +0 -146
- package/components/routes/analytics/widgets/Assessment.tsx +0 -71
- package/components/routes/analytics/widgets/Created.tsx +0 -61
- package/components/routes/analytics/widgets/Detection.tsx +0 -11
- package/components/routes/analytics/widgets/Escalation.tsx +0 -65
- package/components/routes/analytics/widgets/Stacked.tsx +0 -109
- package/components/routes/analytics/widgets/Status.tsx +0 -21
- package/components/routes/dossiers/DossierCard.tsx +0 -48
- package/components/routes/dossiers/DossierEditor.tsx +0 -247
- package/components/routes/dossiers/Dossiers.tsx +0 -173
- package/components/routes/dossiers/LeadEditor.tsx +0 -122
- package/components/routes/dossiers/LeadForm.tsx +0 -106
- package/components/routes/dossiers/PivotForm.tsx +0 -311
- package/components/routes/help/ActionDocumentation.tsx +0 -77
- package/components/routes/help/ActionIntroductionDocumentation.tsx +0 -128
- package/components/routes/help/ApiDocumentation.tsx +0 -217
- package/components/routes/help/AuthDocumentation.tsx +0 -26
- package/components/routes/help/BundleDocumentation.tsx +0 -17
- package/components/routes/help/ClientDocumentation.tsx +0 -27
- package/components/routes/help/Help.tsx +0 -96
- package/components/routes/help/HitBannerDocumentation.tsx +0 -71
- package/components/routes/help/HitDocumentation.tsx +0 -77
- package/components/routes/help/HitLabelsDocumentation.tsx +0 -57
- package/components/routes/help/HitLinksDocumentation.tsx +0 -23
- package/components/routes/help/HitSchemaDocumentation.tsx +0 -253
- package/components/routes/help/NotebookDocumentation.tsx +0 -28
- package/components/routes/help/OverviewDocumentation.tsx +0 -21
- package/components/routes/help/RetentionDocumentation.tsx +0 -55
- package/components/routes/help/SearchDocumentation.tsx +0 -700
- package/components/routes/help/TemplateDocumentation.tsx +0 -73
- package/components/routes/help/ViewDocumentation.tsx +0 -32
- package/components/routes/help/components/HelpTabs.tsx +0 -47
- package/components/routes/help/markdown/en/actionIntroduction.md +0 -33
- package/components/routes/help/markdown/en/authentication.md +0 -261
- package/components/routes/help/markdown/en/bundles.md +0 -70
- package/components/routes/help/markdown/en/client.md +0 -213
- package/components/routes/help/markdown/en/links.md +0 -37
- package/components/routes/help/markdown/en/notebook.md +0 -157
- package/components/routes/help/markdown/en/retention.md +0 -15
- package/components/routes/help/markdown/en/schema.md +0 -20
- package/components/routes/help/markdown/en/templates.md +0 -23
- package/components/routes/help/markdown/en/views.md +0 -11
- package/components/routes/help/markdown/fr/actionIntroduction.md +0 -33
- package/components/routes/help/markdown/fr/authentication.md +0 -259
- package/components/routes/help/markdown/fr/bundles.md +0 -70
- package/components/routes/help/markdown/fr/client.md +0 -209
- package/components/routes/help/markdown/fr/links.md +0 -37
- package/components/routes/help/markdown/fr/notebook.md +0 -157
- package/components/routes/help/markdown/fr/retention.md +0 -15
- package/components/routes/help/markdown/fr/schema.md +0 -20
- package/components/routes/help/markdown/fr/templates.md +0 -23
- package/components/routes/help/markdown/fr/views.md +0 -11
- package/components/routes/hits/search/BundleParentMenu.tsx +0 -73
- package/components/routes/hits/search/BundleScroller.tsx +0 -8
- package/components/routes/hits/search/CustomSort.tsx +0 -94
- package/components/routes/hits/search/HitBrowser.tsx +0 -318
- package/components/routes/hits/search/HitContextMenu.tsx +0 -260
- package/components/routes/hits/search/HitQuery.tsx +0 -268
- package/components/routes/hits/search/InformationPane.tsx +0 -430
- package/components/routes/hits/search/SearchPane.tsx +0 -291
- package/components/routes/hits/search/ViewLink.tsx +0 -96
- package/components/routes/hits/search/grid/AddColumnModal.tsx +0 -98
- package/components/routes/hits/search/grid/ColumnHeader.tsx +0 -70
- package/components/routes/hits/search/grid/EnhancedCell.tsx +0 -50
- package/components/routes/hits/search/grid/HitGrid.tsx +0 -342
- package/components/routes/hits/search/grid/HitRow.tsx +0 -121
- package/components/routes/hits/search/shared/CustomSpan.tsx +0 -54
- package/components/routes/hits/search/shared/HitFilter.tsx +0 -110
- package/components/routes/hits/search/shared/HitSort.tsx +0 -111
- package/components/routes/hits/search/shared/QuerySettings.tsx +0 -40
- package/components/routes/hits/search/shared/SearchSpan.tsx +0 -68
- package/components/routes/hits/view/HitViewer.tsx +0 -372
- package/components/routes/hits/view/LeadRenderer.tsx +0 -42
- package/components/routes/home/AddNewCard.tsx +0 -295
- package/components/routes/home/AnalyticCard.tsx +0 -68
- package/components/routes/home/EntryWrapper.tsx +0 -54
- package/components/routes/home/ViewCard.tsx +0 -96
- package/components/routes/home/index.tsx +0 -278
- package/components/routes/overviews/OverviewCard.tsx +0 -51
- package/components/routes/overviews/OverviewEditor.tsx +0 -102
- package/components/routes/overviews/OverviewViewer.tsx +0 -387
- package/components/routes/overviews/Overviews.tsx +0 -179
- package/components/routes/overviews/markdownExtendedTokenProvider.ts +0 -296
- package/components/routes/overviews/startingTemplate.ts +0 -40
- package/components/routes/overviews/template/en.md +0 -167
- package/components/routes/overviews/template/fr.md +0 -167
- package/components/routes/settings/AdminSection.tsx +0 -18
- package/components/routes/settings/LocalSection.tsx +0 -168
- package/components/routes/settings/ProfileSection.tsx +0 -138
- package/components/routes/settings/SecuritySection.tsx +0 -95
- package/components/routes/settings/Settings.tsx +0 -51
- package/components/routes/settings/SettingsSection.tsx +0 -28
- package/components/routes/templates/TemplateCard.tsx +0 -38
- package/components/routes/templates/TemplateDnD.tsx +0 -51
- package/components/routes/templates/TemplateEditor.tsx +0 -121
- package/components/routes/templates/TemplateViewer.tsx +0 -285
- package/components/routes/templates/Templates.tsx +0 -187
- package/components/routes/views/ViewComposer.tsx +0 -317
- package/components/routes/views/Views.tsx +0 -379
- package/globals.d.ts +0 -1
- package/i18n.ts +0 -50
- package/index.tsx +0 -19
- package/models/ActionTypes.d.ts +0 -50
- package/models/WithMetadata.d.ts +0 -12
- package/models/entities/HowlerUser.d.ts +0 -18
- package/models/entities/generated/Account.d.ts +0 -7
- package/models/entities/generated/Action.d.ts +0 -13
- package/models/entities/generated/Agent.d.ts +0 -9
- package/models/entities/generated/Analytic.d.ts +0 -21
- package/models/entities/generated/Answer.d.ts +0 -10
- package/models/entities/generated/Antivirus.d.ts +0 -9
- package/models/entities/generated/ApiType.d.ts +0 -238
- package/models/entities/generated/Assemblyline.d.ts +0 -22
- package/models/entities/generated/Attachment.d.ts +0 -8
- package/models/entities/generated/Attribution.d.ts +0 -9
- package/models/entities/generated/AutonomousSystems.d.ts +0 -7
- package/models/entities/generated/Aws.d.ts +0 -10
- package/models/entities/generated/Azure.d.ts +0 -10
- package/models/entities/generated/Bcc.d.ts +0 -6
- package/models/entities/generated/Behaviour.d.ts +0 -9
- package/models/entities/generated/Body.d.ts +0 -7
- package/models/entities/generated/Cbs.d.ts +0 -8
- package/models/entities/generated/Cc.d.ts +0 -6
- package/models/entities/generated/Client.d.ts +0 -7
- package/models/entities/generated/Cloud.d.ts +0 -20
- package/models/entities/generated/CloudAccount.d.ts +0 -7
- package/models/entities/generated/CodeSignature.d.ts +0 -14
- package/models/entities/generated/Comment.d.ts +0 -12
- package/models/entities/generated/Container.d.ts +0 -12
- package/models/entities/generated/Created.d.ts +0 -7
- package/models/entities/generated/Dashboard.d.ts +0 -8
- package/models/entities/generated/Data.d.ts +0 -8
- package/models/entities/generated/Destination.d.ts +0 -23
- package/models/entities/generated/Device.d.ts +0 -6
- package/models/entities/generated/Dns.d.ts +0 -16
- package/models/entities/generated/Domain.d.ts +0 -9
- package/models/entities/generated/Dossier.d.ts +0 -15
- package/models/entities/generated/Ecs.d.ts +0 -6
- package/models/entities/generated/Egress.d.ts +0 -6
- package/models/entities/generated/Elf.d.ts +0 -20
- package/models/entities/generated/Email.d.ts +0 -30
- package/models/entities/generated/Enrichment.d.ts +0 -10
- package/models/entities/generated/EntryMeta.d.ts +0 -6
- package/models/entities/generated/Error.d.ts +0 -7
- package/models/entities/generated/Event.d.ts +0 -31
- package/models/entities/generated/Faas.d.ts +0 -13
- package/models/entities/generated/Feed.d.ts +0 -9
- package/models/entities/generated/File.d.ts +0 -12
- package/models/entities/generated/FileHash.d.ts +0 -12
- package/models/entities/generated/From.d.ts +0 -6
- package/models/entities/generated/Gcp.d.ts +0 -10
- package/models/entities/generated/Geo.d.ts +0 -18
- package/models/entities/generated/Group.d.ts +0 -8
- package/models/entities/generated/Hash.d.ts +0 -6
- package/models/entities/generated/Header.d.ts +0 -13
- package/models/entities/generated/Heuristic.d.ts +0 -9
- package/models/entities/generated/Hit.d.ts +0 -102
- package/models/entities/generated/HitFile.d.ts +0 -36
- package/models/entities/generated/HitOrganization.d.ts +0 -7
- package/models/entities/generated/Host.d.ts +0 -11
- package/models/entities/generated/Howler.d.ts +0 -48
- package/models/entities/generated/HowlerComment.d.ts +0 -11
- package/models/entities/generated/HowlerDossier.d.ts +0 -12
- package/models/entities/generated/Http.d.ts +0 -11
- package/models/entities/generated/Image.d.ts +0 -10
- package/models/entities/generated/Incident.d.ts +0 -8
- package/models/entities/generated/Indicator.d.ts +0 -21
- package/models/entities/generated/IndicatorEmail.d.ts +0 -6
- package/models/entities/generated/IndicatorFile.d.ts +0 -36
- package/models/entities/generated/Ingress.d.ts +0 -9
- package/models/entities/generated/Instance.d.ts +0 -7
- package/models/entities/generated/Interface.d.ts +0 -7
- package/models/entities/generated/Label.d.ts +0 -7
- package/models/entities/generated/Labels.d.ts +0 -13
- package/models/entities/generated/Lead.d.ts +0 -12
- package/models/entities/generated/Link.d.ts +0 -8
- package/models/entities/generated/Location.d.ts +0 -7
- package/models/entities/generated/Log.d.ts +0 -13
- package/models/entities/generated/Machine.d.ts +0 -6
- package/models/entities/generated/Mapping.d.ts +0 -8
- package/models/entities/generated/Matched.d.ts +0 -6
- package/models/entities/generated/Mitre.d.ts +0 -10
- package/models/entities/generated/Modified.d.ts +0 -7
- package/models/entities/generated/Nat.d.ts +0 -7
- package/models/entities/generated/Network.d.ts +0 -8
- package/models/entities/generated/Notebook.d.ts +0 -10
- package/models/entities/generated/Observer.d.ts +0 -21
- package/models/entities/generated/Operation.d.ts +0 -7
- package/models/entities/generated/Organization.d.ts +0 -7
- package/models/entities/generated/Original.d.ts +0 -19
- package/models/entities/generated/Os.d.ts +0 -12
- package/models/entities/generated/Outline.d.ts +0 -9
- package/models/entities/generated/Overview.d.ts +0 -10
- package/models/entities/generated/Parent.d.ts +0 -19
- package/models/entities/generated/ParentHash.d.ts +0 -12
- package/models/entities/generated/ParentParent.d.ts +0 -32
- package/models/entities/generated/ParentUser.d.ts +0 -9
- package/models/entities/generated/Pe.d.ts +0 -13
- package/models/entities/generated/Pivot.d.ts +0 -13
- package/models/entities/generated/Process.d.ts +0 -34
- package/models/entities/generated/ProcessHash.d.ts +0 -12
- package/models/entities/generated/ProcessParent.d.ts +0 -34
- package/models/entities/generated/ProcessUser.d.ts +0 -9
- package/models/entities/generated/Project.d.ts +0 -7
- package/models/entities/generated/Question.d.ts +0 -11
- package/models/entities/generated/Registry.d.ts +0 -12
- package/models/entities/generated/Related.d.ts +0 -13
- package/models/entities/generated/ReplyTo.d.ts +0 -6
- package/models/entities/generated/Request.d.ts +0 -13
- package/models/entities/generated/Response.d.ts +0 -11
- package/models/entities/generated/Rule.d.ts +0 -15
- package/models/entities/generated/Section.d.ts +0 -14
- package/models/entities/generated/Segment.d.ts +0 -14
- package/models/entities/generated/Sender.d.ts +0 -6
- package/models/entities/generated/Server.d.ts +0 -8
- package/models/entities/generated/Service.d.ts +0 -6
- package/models/entities/generated/Settings.d.ts +0 -6
- package/models/entities/generated/Sharepoint.d.ts +0 -10
- package/models/entities/generated/Software.d.ts +0 -11
- package/models/entities/generated/Source.d.ts +0 -23
- package/models/entities/generated/SourceOriginal.d.ts +0 -19
- package/models/entities/generated/Tactic.d.ts +0 -9
- package/models/entities/generated/Technique.d.ts +0 -9
- package/models/entities/generated/Template.d.ts +0 -11
- package/models/entities/generated/Threat.d.ts +0 -21
- package/models/entities/generated/ThreatGroup.d.ts +0 -9
- package/models/entities/generated/ThreatIndicator.d.ts +0 -21
- package/models/entities/generated/ThreatTactic.d.ts +0 -8
- package/models/entities/generated/ThreatTechnique.d.ts +0 -8
- package/models/entities/generated/Tls.d.ts +0 -12
- package/models/entities/generated/TlsServer.d.ts +0 -6
- package/models/entities/generated/To.d.ts +0 -6
- package/models/entities/generated/TriageSettings.d.ts +0 -8
- package/models/entities/generated/Trigger.d.ts +0 -7
- package/models/entities/generated/Uri.d.ts +0 -9
- package/models/entities/generated/Url.d.ts +0 -19
- package/models/entities/generated/User.d.ts +0 -15
- package/models/entities/generated/UserAgent.d.ts +0 -13
- package/models/entities/generated/UserUser.d.ts +0 -19
- package/models/entities/generated/View.d.ts +0 -15
- package/models/entities/generated/Votes.d.ts +0 -8
- package/models/entities/generated/Vulnerability.d.ts +0 -12
- package/models/entities/generated/Yara.d.ts +0 -9
- package/models/socket/HitUpdate.d.ts +0 -14
- package/plugins/HowlerPlugin.ts +0 -375
- package/plugins/store.ts +0 -152
- package/rest/AxiosClient.ts +0 -81
- package/rest/FetchClient.ts +0 -27
- package/rest/index.ts +0 -12
- package/setupTests.ts +0 -17
- package/utils/Throttler.ts +0 -43
- package/utils/actionUtils.ts +0 -112
- package/utils/constants.tsx +0 -131
- package/utils/hitFunctions.ts +0 -10
- package/utils/localStorage.ts +0 -54
- package/utils/menuUtils.ts +0 -274
- package/utils/sessionStorage.ts +0 -59
- package/utils/socketUtils.ts +0 -11
- package/utils/stringUtils.ts +0 -57
- package/utils/utils.ts +0 -222
- package/utils/xsrf.ts +0 -17
- package/vite-env.d.ts +0 -1
- /package/commons/components/app/hooks/{index.ts → index.d.ts} +0 -0
- /package/commons/components/notification/{index.tsx → index.d.ts} +0 -0
|
@@ -0,0 +1,127 @@
|
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
import api from '@cccsaurora/howler-ui/api';
|
|
3
|
+
import { useAppUser } from '@cccsaurora/howler-ui/commons/components/app/hooks';
|
|
4
|
+
import useMyApi from '@cccsaurora/howler-ui/components/hooks/useMyApi';
|
|
5
|
+
import { useMyLocalStorageItem } from '@cccsaurora/howler-ui/components/hooks/useMyLocalStorage';
|
|
6
|
+
import { has, omit } from 'lodash-es';
|
|
7
|
+
import { useCallback, useEffect, useState } from 'react';
|
|
8
|
+
import { useLocation, useParams } from 'react-router-dom';
|
|
9
|
+
import { createContext, useContextSelector } from 'use-context-selector';
|
|
10
|
+
import { StorageKey } from '@cccsaurora/howler-ui/utils/constants';
|
|
11
|
+
export const ViewContext = createContext(null);
|
|
12
|
+
const ViewProvider = ({ children }) => {
|
|
13
|
+
const { dispatchApi } = useMyApi();
|
|
14
|
+
const appUser = useAppUser();
|
|
15
|
+
const [defaultView, setDefaultView] = useMyLocalStorageItem(StorageKey.DEFAULT_VIEW);
|
|
16
|
+
const location = useLocation();
|
|
17
|
+
const routeParams = useParams();
|
|
18
|
+
const [views, setViews] = useState({});
|
|
19
|
+
const fetchViews = useCallback(async (ids) => {
|
|
20
|
+
if (!ids) {
|
|
21
|
+
const newViews = (await dispatchApi(api.view.get(), { throwError: false })) ?? [];
|
|
22
|
+
setViews(_views => ({
|
|
23
|
+
..._views,
|
|
24
|
+
...Object.fromEntries(newViews.map(_view => [_view.view_id, _view]))
|
|
25
|
+
}));
|
|
26
|
+
return newViews;
|
|
27
|
+
}
|
|
28
|
+
const missingIds = ids.filter(_id => !has(views, _id));
|
|
29
|
+
if (missingIds.length < 1) {
|
|
30
|
+
return ids.map(id => views[id]);
|
|
31
|
+
}
|
|
32
|
+
try {
|
|
33
|
+
const response = await dispatchApi(api.search.view.post({
|
|
34
|
+
query: `view_id:(${missingIds.join(' OR ')})`,
|
|
35
|
+
rows: missingIds.length,
|
|
36
|
+
sort: 'title asc'
|
|
37
|
+
}));
|
|
38
|
+
const newViews = Object.fromEntries(response.items.map(_view => [_view.view_id, _view]));
|
|
39
|
+
setViews(_views => ({
|
|
40
|
+
..._views,
|
|
41
|
+
...Object.fromEntries(missingIds.map(_view_id => [_view_id, null])),
|
|
42
|
+
...newViews
|
|
43
|
+
}));
|
|
44
|
+
return ids.map(id => views[id] ?? newViews[id]);
|
|
45
|
+
}
|
|
46
|
+
catch (e) {
|
|
47
|
+
// eslint-disable-next-line no-console
|
|
48
|
+
console.warn(e);
|
|
49
|
+
return [];
|
|
50
|
+
}
|
|
51
|
+
}, [dispatchApi, views]);
|
|
52
|
+
useEffect(() => {
|
|
53
|
+
if (!defaultView || has(views, defaultView)) {
|
|
54
|
+
return;
|
|
55
|
+
}
|
|
56
|
+
(async () => {
|
|
57
|
+
const result = await fetchViews([defaultView]);
|
|
58
|
+
if (!result.length) {
|
|
59
|
+
setDefaultView(undefined);
|
|
60
|
+
}
|
|
61
|
+
})();
|
|
62
|
+
}, [defaultView, fetchViews, setDefaultView, views]);
|
|
63
|
+
const getCurrentView = useCallback(async ({ viewId, lazy = false } = {}) => {
|
|
64
|
+
if (!viewId) {
|
|
65
|
+
viewId = location.pathname.startsWith('/views') ? routeParams.id : defaultView;
|
|
66
|
+
}
|
|
67
|
+
if (!viewId) {
|
|
68
|
+
return null;
|
|
69
|
+
}
|
|
70
|
+
if (!has(views, viewId) && !lazy) {
|
|
71
|
+
return (await fetchViews([viewId]))[0];
|
|
72
|
+
}
|
|
73
|
+
return views[viewId];
|
|
74
|
+
}, [defaultView, fetchViews, location.pathname, routeParams.id, views]);
|
|
75
|
+
const editView = useCallback(async (id, partialView) => {
|
|
76
|
+
const result = await dispatchApi(api.view.put(id, partialView));
|
|
77
|
+
setViews(_views => ({
|
|
78
|
+
..._views,
|
|
79
|
+
[id]: { ...(_views[id] ?? {}), ...partialView }
|
|
80
|
+
}));
|
|
81
|
+
return result;
|
|
82
|
+
}, [dispatchApi]);
|
|
83
|
+
const addFavourite = useCallback(async (id) => {
|
|
84
|
+
await dispatchApi(api.view.favourite.post(id));
|
|
85
|
+
appUser.setUser({
|
|
86
|
+
...appUser.user,
|
|
87
|
+
favourite_views: [...appUser.user.favourite_views, id]
|
|
88
|
+
});
|
|
89
|
+
}, [appUser, dispatchApi]);
|
|
90
|
+
const addView = useCallback(async (view) => {
|
|
91
|
+
const newView = await dispatchApi(api.view.post(view));
|
|
92
|
+
setViews(_views => ({ ..._views, [newView.view_id]: newView }));
|
|
93
|
+
addFavourite(newView.view_id);
|
|
94
|
+
return newView;
|
|
95
|
+
}, [addFavourite, dispatchApi]);
|
|
96
|
+
const removeFavourite = useCallback(async (id) => {
|
|
97
|
+
await dispatchApi(api.view.favourite.del(id));
|
|
98
|
+
appUser.setUser({
|
|
99
|
+
...appUser.user,
|
|
100
|
+
favourite_views: appUser.user.favourite_views.filter(v => v !== id)
|
|
101
|
+
});
|
|
102
|
+
}, [appUser, dispatchApi]);
|
|
103
|
+
const removeView = useCallback(async (id) => {
|
|
104
|
+
const result = await dispatchApi(api.view.del(id));
|
|
105
|
+
setViews(_views => omit(_views, id));
|
|
106
|
+
if (appUser.user?.favourite_views.includes(id)) {
|
|
107
|
+
removeFavourite(id);
|
|
108
|
+
}
|
|
109
|
+
return result;
|
|
110
|
+
}, [appUser.user?.favourite_views, dispatchApi, removeFavourite]);
|
|
111
|
+
return (_jsx(ViewContext.Provider, { value: {
|
|
112
|
+
views,
|
|
113
|
+
addFavourite,
|
|
114
|
+
removeFavourite,
|
|
115
|
+
fetchViews,
|
|
116
|
+
addView,
|
|
117
|
+
editView,
|
|
118
|
+
removeView,
|
|
119
|
+
defaultView,
|
|
120
|
+
setDefaultView,
|
|
121
|
+
getCurrentView
|
|
122
|
+
}, children: children }));
|
|
123
|
+
};
|
|
124
|
+
export const useViewContextSelector = (selector) => {
|
|
125
|
+
return useContextSelector(ViewContext, selector);
|
|
126
|
+
};
|
|
127
|
+
export default ViewProvider;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,168 @@
|
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
import { act, renderHook, waitFor } from '@testing-library/react';
|
|
3
|
+
import { hget, hpost, hput } from '@cccsaurora/howler-ui/api';
|
|
4
|
+
import MockLocalStorage from '@cccsaurora/howler-ui/tests/MockLocalStorage';
|
|
5
|
+
import { MOCK_RESPONSES } from '@cccsaurora/howler-ui/tests/server-handlers';
|
|
6
|
+
import { useContextSelector } from 'use-context-selector';
|
|
7
|
+
import { MY_LOCAL_STORAGE_PREFIX, StorageKey } from '@cccsaurora/howler-ui/utils/constants';
|
|
8
|
+
import ViewProvider, { ViewContext } from './ViewProvider';
|
|
9
|
+
let mockUser = {
|
|
10
|
+
favourite_views: ['favourited_view_id']
|
|
11
|
+
};
|
|
12
|
+
vi.mock('@cccsaurora/howler-ui/api', { spy: true });
|
|
13
|
+
vi.mock('react-router-dom', () => ({
|
|
14
|
+
useLocation: vi.fn(() => ({ pathname: '/views/searched_view_id' })),
|
|
15
|
+
useParams: vi.fn(() => ({ id: 'searched_view_id' }))
|
|
16
|
+
}));
|
|
17
|
+
vi.mock('@cccsaurora/howler-ui/commons/components/app/hooks', () => ({
|
|
18
|
+
useAppUser: () => ({
|
|
19
|
+
user: mockUser,
|
|
20
|
+
setUser: _user => (mockUser = _user)
|
|
21
|
+
})
|
|
22
|
+
}));
|
|
23
|
+
const mockLocalStorage = new MockLocalStorage();
|
|
24
|
+
// Replace localStorage in global scope
|
|
25
|
+
Object.defineProperty(window, 'localStorage', {
|
|
26
|
+
value: mockLocalStorage,
|
|
27
|
+
writable: true
|
|
28
|
+
});
|
|
29
|
+
const Wrapper = ({ children }) => {
|
|
30
|
+
return _jsx(ViewProvider, { children: children });
|
|
31
|
+
};
|
|
32
|
+
beforeEach(() => {
|
|
33
|
+
mockLocalStorage.clear();
|
|
34
|
+
});
|
|
35
|
+
describe('ViewContext', () => {
|
|
36
|
+
it('should fetch the defaultView on initialization', async () => {
|
|
37
|
+
mockLocalStorage.setItem(`${MY_LOCAL_STORAGE_PREFIX}.${StorageKey.DEFAULT_VIEW}`, JSON.stringify('searched_view_id'));
|
|
38
|
+
let hook = await act(async () => renderHook(() => useContextSelector(ViewContext, ctx => ctx.views), { wrapper: Wrapper }));
|
|
39
|
+
await waitFor(() => expect(hook.result.current.searched_view_id).not.toBeFalsy());
|
|
40
|
+
expect(hook.result.current.searched_view_id).toEqual(MOCK_RESPONSES['/api/v1/search/view'].items[0]);
|
|
41
|
+
});
|
|
42
|
+
it('should allow the user to add and remove a favourite view', async () => {
|
|
43
|
+
const hook = await act(async () => {
|
|
44
|
+
return renderHook(() => useContextSelector(ViewContext, ctx => ({
|
|
45
|
+
addFavourite: ctx.addFavourite,
|
|
46
|
+
removeFavourite: ctx.removeFavourite
|
|
47
|
+
})), { wrapper: Wrapper });
|
|
48
|
+
});
|
|
49
|
+
await hook.result.current.addFavourite('example_view_id');
|
|
50
|
+
expect(mockUser.favourite_views).toEqual(['favourited_view_id', 'example_view_id']);
|
|
51
|
+
await hook.result.current.removeFavourite('example_view_id');
|
|
52
|
+
expect(mockUser.favourite_views).toEqual(['favourited_view_id']);
|
|
53
|
+
});
|
|
54
|
+
it('should allow the user to add and remove views', async () => {
|
|
55
|
+
const hook = await act(async () => {
|
|
56
|
+
return renderHook(() => useContextSelector(ViewContext, ctx => ({
|
|
57
|
+
addView: ctx.addView,
|
|
58
|
+
removeView: ctx.removeView,
|
|
59
|
+
views: ctx.views
|
|
60
|
+
})), { wrapper: Wrapper });
|
|
61
|
+
});
|
|
62
|
+
const result = await act(async () => hook.result.current.addView({
|
|
63
|
+
owner: 'user',
|
|
64
|
+
settings: {
|
|
65
|
+
advance_on_triage: false
|
|
66
|
+
},
|
|
67
|
+
view_id: 'example_created_view',
|
|
68
|
+
query: 'howler.id:*',
|
|
69
|
+
sort: 'event.created desc',
|
|
70
|
+
title: 'Example View',
|
|
71
|
+
type: 'personal',
|
|
72
|
+
span: 'date.range.1.month'
|
|
73
|
+
}));
|
|
74
|
+
hook.rerender();
|
|
75
|
+
expect(hook.result.current.views[result.view_id]).toEqual(result);
|
|
76
|
+
await act(async () => hook.result.current.removeView(result.view_id));
|
|
77
|
+
hook.rerender();
|
|
78
|
+
expect(hook.result.current.views[result.view_id]).toBeFalsy();
|
|
79
|
+
});
|
|
80
|
+
describe('fetchViews', () => {
|
|
81
|
+
let hook;
|
|
82
|
+
beforeEach(async () => {
|
|
83
|
+
hook = await act(async () => {
|
|
84
|
+
return renderHook(() => useContextSelector(ViewContext, ctx => ctx.fetchViews), { wrapper: Wrapper });
|
|
85
|
+
});
|
|
86
|
+
vi.mocked(hpost).mockClear();
|
|
87
|
+
vi.mocked(hget).mockClear();
|
|
88
|
+
});
|
|
89
|
+
it('Should fetch all views when no ids are provided', async () => {
|
|
90
|
+
const result = await act(async () => hook.result.current());
|
|
91
|
+
expect(result.length).toBe(2);
|
|
92
|
+
expect(result[0].view_id).toBe('example_view_id');
|
|
93
|
+
expect(result[1].view_id).toBe('another_view_id');
|
|
94
|
+
});
|
|
95
|
+
it('Should search for specified views when ids are provided', async () => {
|
|
96
|
+
const result = await act(async () => hook.result.current(['searched_view_id']));
|
|
97
|
+
expect(hpost).toHaveBeenCalledOnce();
|
|
98
|
+
expect(hpost).toBeCalledWith('/api/v1/search/view', {
|
|
99
|
+
query: 'view_id:(searched_view_id)',
|
|
100
|
+
rows: 1,
|
|
101
|
+
sort: 'title asc'
|
|
102
|
+
});
|
|
103
|
+
expect(result).toEqual(MOCK_RESPONSES['/api/v1/search/view'].items);
|
|
104
|
+
});
|
|
105
|
+
it('Should search only for new views when ids are provided', async () => {
|
|
106
|
+
await act(async () => hook.result.current(['searched_view_id']));
|
|
107
|
+
expect(hpost).toHaveBeenCalledOnce();
|
|
108
|
+
expect(hpost).toBeCalledWith('/api/v1/search/view', {
|
|
109
|
+
query: 'view_id:(searched_view_id)',
|
|
110
|
+
rows: 1,
|
|
111
|
+
sort: 'title asc'
|
|
112
|
+
});
|
|
113
|
+
vi.mocked(hpost).mockClear();
|
|
114
|
+
await act(async () => hook.result.current(['searched_view_id', 'searched_view_id_2']));
|
|
115
|
+
expect(hpost).toHaveBeenCalledOnce();
|
|
116
|
+
expect(hpost).toBeCalledWith('/api/v1/search/view', {
|
|
117
|
+
query: 'view_id:(searched_view_id_2)',
|
|
118
|
+
rows: 1,
|
|
119
|
+
sort: 'title asc'
|
|
120
|
+
});
|
|
121
|
+
});
|
|
122
|
+
it('Should provide cached instances as a response when the same views are requested', async () => {
|
|
123
|
+
let result = await act(async () => hook.result.current(['searched_view_id']));
|
|
124
|
+
expect(result).toEqual(MOCK_RESPONSES['/api/v1/search/view'].items);
|
|
125
|
+
result = await act(async () => hook.result.current(['searched_view_id']));
|
|
126
|
+
expect(result).toEqual(MOCK_RESPONSES['/api/v1/search/view'].items);
|
|
127
|
+
expect(hpost).toHaveBeenCalledOnce();
|
|
128
|
+
});
|
|
129
|
+
});
|
|
130
|
+
describe('getCurrentView', () => {
|
|
131
|
+
let hook;
|
|
132
|
+
beforeEach(async () => {
|
|
133
|
+
hook = await act(async () => {
|
|
134
|
+
return renderHook(() => useContextSelector(ViewContext, ctx => ctx.getCurrentView), { wrapper: Wrapper });
|
|
135
|
+
});
|
|
136
|
+
});
|
|
137
|
+
it('should allow the user to fetch their current view based on the location', async () => {
|
|
138
|
+
// lazy load should return nothing
|
|
139
|
+
await expect(hook.result.current({ lazy: true })).resolves.toBeFalsy();
|
|
140
|
+
const result = await act(async () => hook.result.current());
|
|
141
|
+
expect(result).toEqual(MOCK_RESPONSES['/api/v1/search/view'].items[0]);
|
|
142
|
+
});
|
|
143
|
+
it('should allow the user to fetch their current view based on the view ID', async () => {
|
|
144
|
+
// lazy load should return nothing
|
|
145
|
+
await expect(hook.result.current({ lazy: true })).resolves.toBeFalsy();
|
|
146
|
+
const result = await act(async () => hook.result.current({ viewId: 'searched_view_id' }));
|
|
147
|
+
expect(result).toEqual(MOCK_RESPONSES['/api/v1/search/view'].items[0]);
|
|
148
|
+
});
|
|
149
|
+
});
|
|
150
|
+
describe('editView', () => {
|
|
151
|
+
let hook;
|
|
152
|
+
beforeAll(async () => {
|
|
153
|
+
hook = await act(async () => {
|
|
154
|
+
return renderHook(() => useContextSelector(ViewContext, ctx => ctx.editView), { wrapper: Wrapper });
|
|
155
|
+
});
|
|
156
|
+
});
|
|
157
|
+
beforeEach(() => {
|
|
158
|
+
vi.mocked(hput).mockClear();
|
|
159
|
+
vi.mocked(hpost).mockClear();
|
|
160
|
+
});
|
|
161
|
+
it('should allow users to edit views', async () => {
|
|
162
|
+
const result = await act(async () => hook.result.current('example_view_id', { query: 'howler.id:*' }));
|
|
163
|
+
expect(hput).toHaveBeenCalledOnce();
|
|
164
|
+
expect(hput).toBeCalledWith('/api/v1/view/example_view_id', { query: 'howler.id:*' });
|
|
165
|
+
expect(result).toEqual(MOCK_RESPONSES['/api/v1/view/example_view_id']);
|
|
166
|
+
});
|
|
167
|
+
});
|
|
168
|
+
});
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import type { HowlerUser } from '@cccsaurora/howler-ui/models/entities/HowlerUser';
|
|
2
|
+
import type { Comment as AnalyticComment } from '@cccsaurora/howler-ui/models/entities/generated/Comment';
|
|
3
|
+
import type { HowlerComment } from '@cccsaurora/howler-ui/models/entities/generated/HowlerComment';
|
|
4
|
+
import type { ReactNode } from 'react';
|
|
5
|
+
declare const _default: import("react").NamedExoticComponent<{
|
|
6
|
+
comment: HowlerComment | AnalyticComment;
|
|
7
|
+
handleDelete?: () => Promise<void>;
|
|
8
|
+
handleEdit?: (value: string) => Promise<void>;
|
|
9
|
+
handleReact?: (type: string) => Promise<void>;
|
|
10
|
+
handleQuote?: () => void;
|
|
11
|
+
onClick?: () => void;
|
|
12
|
+
users: {
|
|
13
|
+
[id: string]: HowlerUser;
|
|
14
|
+
};
|
|
15
|
+
extra?: ReactNode;
|
|
16
|
+
}>;
|
|
17
|
+
export default _default;
|
|
@@ -0,0 +1,114 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
|
|
2
|
+
import { Celebration, Check, Clear, Delete, Edit, Favorite, FireTruck, FormatQuote, Mood, MoreHoriz, RocketLaunch, ThumbDown, ThumbUp } from '@mui/icons-material';
|
|
3
|
+
import { CardActions, CardContent, Chip, CircularProgress, Collapse, Fade, IconButton, ListItemIcon, ListItemText, Menu, MenuItem, Stack, TextField, Tooltip, Typography } from '@mui/material';
|
|
4
|
+
import { useAppUser } from '@cccsaurora/howler-ui/commons/components/app/hooks';
|
|
5
|
+
import FlexOne from '@cccsaurora/howler-ui/components/elements/addons/layout/FlexOne';
|
|
6
|
+
import useMyUtils from '@cccsaurora/howler-ui/components/hooks/useMyUtils';
|
|
7
|
+
import { memo, useCallback, useMemo, useState } from 'react';
|
|
8
|
+
import { useTranslation } from 'react-i18next';
|
|
9
|
+
import { compareTimestamp, twitterShort } from '@cccsaurora/howler-ui/utils/utils';
|
|
10
|
+
import HowlerAvatar from './display/HowlerAvatar';
|
|
11
|
+
import HowlerCard from './display/HowlerCard';
|
|
12
|
+
import Markdown from './display/Markdown';
|
|
13
|
+
const REACTION_ICONS = {
|
|
14
|
+
'+1': ThumbUp,
|
|
15
|
+
'-1': ThumbDown,
|
|
16
|
+
laugh: Mood,
|
|
17
|
+
confetti: Celebration,
|
|
18
|
+
heart: Favorite,
|
|
19
|
+
rocket: RocketLaunch,
|
|
20
|
+
fire: FireTruck
|
|
21
|
+
};
|
|
22
|
+
const Comment = ({ comment, handleDelete, handleEdit, handleQuote, handleReact, users, extra, onClick }) => {
|
|
23
|
+
const { t } = useTranslation();
|
|
24
|
+
const { user } = useAppUser();
|
|
25
|
+
const { shiftColor } = useMyUtils();
|
|
26
|
+
const [anchorEl, setAnchorEl] = useState(null);
|
|
27
|
+
const [wasEdited, setEdited] = useState(compareTimestamp(comment.modified, comment.timestamp) > 1);
|
|
28
|
+
const [editing, setEditing] = useState(false);
|
|
29
|
+
const [loading, setLoading] = useState(false);
|
|
30
|
+
const [showInteractions, setShowInteractions] = useState(false);
|
|
31
|
+
const [editValue, setEditValue] = useState(comment.value);
|
|
32
|
+
const handleOpen = useCallback((event) => setAnchorEl(event.currentTarget), []);
|
|
33
|
+
const handleClose = useCallback(() => setAnchorEl(null), []);
|
|
34
|
+
const onDelete = useCallback(async () => {
|
|
35
|
+
setLoading(true);
|
|
36
|
+
try {
|
|
37
|
+
await handleDelete();
|
|
38
|
+
}
|
|
39
|
+
finally {
|
|
40
|
+
setLoading(false);
|
|
41
|
+
handleClose();
|
|
42
|
+
}
|
|
43
|
+
}, [handleDelete, handleClose]);
|
|
44
|
+
const onEdit = useCallback(async () => {
|
|
45
|
+
if (editValue === comment.value) {
|
|
46
|
+
setEditing(false);
|
|
47
|
+
return;
|
|
48
|
+
}
|
|
49
|
+
try {
|
|
50
|
+
setLoading(true);
|
|
51
|
+
await handleEdit(editValue);
|
|
52
|
+
setEdited(true);
|
|
53
|
+
}
|
|
54
|
+
finally {
|
|
55
|
+
setLoading(false);
|
|
56
|
+
setEditing(false);
|
|
57
|
+
}
|
|
58
|
+
}, [comment.value, editValue, handleEdit]);
|
|
59
|
+
const checkForActions = useCallback(e => {
|
|
60
|
+
e.stopPropagation();
|
|
61
|
+
if (e.ctrlKey && e.key === 'Enter' && !loading) {
|
|
62
|
+
onEdit();
|
|
63
|
+
}
|
|
64
|
+
else if (e.key === 'Escape') {
|
|
65
|
+
setEditing(false);
|
|
66
|
+
}
|
|
67
|
+
}, [loading, onEdit]);
|
|
68
|
+
const onQuote = useCallback(() => {
|
|
69
|
+
handleQuote();
|
|
70
|
+
handleClose();
|
|
71
|
+
}, [handleClose, handleQuote]);
|
|
72
|
+
const reactions = useMemo(() => {
|
|
73
|
+
return Object.keys(REACTION_ICONS).map(type => {
|
|
74
|
+
const quantity = Object.values(comment?.reactions ?? {}).filter(r => r === type).length;
|
|
75
|
+
const Icon = REACTION_ICONS[type];
|
|
76
|
+
return !!quantity || (showInteractions && handleReact) ? (_jsx(Fade, { in: true, children: _jsx(Chip, { size: "small", variant: "outlined", color: comment.reactions?.[user.username] === type ? 'primary' : 'default', icon: _jsx(Icon, {}), onClick: handleReact ? () => handleReact(comment.reactions?.[user.username] !== type ? type : null) : null, sx: [
|
|
77
|
+
!quantity && {
|
|
78
|
+
'& svg': { mr: '-14px !important' }
|
|
79
|
+
}
|
|
80
|
+
], label: quantity || null }) }, type)) : null;
|
|
81
|
+
});
|
|
82
|
+
}, [comment.reactions, handleReact, showInteractions, user.username]);
|
|
83
|
+
return (_jsxs(Stack, { direction: "row", spacing: 1, children: [_jsx(HowlerAvatar, { userId: comment.user }), _jsxs(HowlerCard, { onClick: onClick, onMouseEnter: () => setShowInteractions(true), onMouseLeave: () => setShowInteractions(false), sx: [
|
|
84
|
+
{ p: 2, pb: 0, pt: 1, border: 'thin solid transparent' },
|
|
85
|
+
editing && { flex: 1 },
|
|
86
|
+
onClick && { '&:hover': { cursor: 'pointer', borderColor: 'primary.main' } }
|
|
87
|
+
], children: [_jsxs(CardContent, { sx: { p: 0 }, children: [_jsxs(Stack, { direction: "row", alignItems: "center", spacing: 2, children: [_jsx(Typography, { variant: "body1", children: users[comment.user]?.name ?? comment.user }), wasEdited && (_jsx(Typography, { variant: "caption", sx: theme => ({
|
|
88
|
+
marginRight: `${theme.spacing(1)} !important`,
|
|
89
|
+
color: shiftColor(theme.palette.text.primary, 0.25)
|
|
90
|
+
}), children: t('comments.edited') })), _jsx(Tooltip, { title: new Date(comment.timestamp).toLocaleString(), children: _jsx(Typography, { variant: "caption", sx: theme => ({
|
|
91
|
+
marginRight: `${theme.spacing(1)} !important`,
|
|
92
|
+
color: shiftColor(theme.palette.text.primary, 0.25)
|
|
93
|
+
}), children: twitterShort(comment.timestamp) }) }), extra, (handleDelete || handleEdit || handleQuote) && (_jsx(Fade, { in: showInteractions, children: _jsx(IconButton, { size: "small", sx: [{ marginLeft: 'auto !important' }, editing && { display: 'none' }], id: `comment${comment.id}-button`, "aria-haspopup": "true", "aria-controls": anchorEl ? `comment${comment.id}-action-menu` : undefined, "aria-expanded": anchorEl ? 'true' : undefined, onClick: handleOpen, children: _jsx(MoreHoriz, { fontSize: "small" }) }) })), _jsxs(Menu, { id: `comment${comment.id}-action-menu`, anchorEl: anchorEl, open: !!anchorEl, onClose: handleClose, MenuListProps: {
|
|
94
|
+
dense: true,
|
|
95
|
+
'aria-labelledby': `comment${comment.id}-button`
|
|
96
|
+
}, anchorOrigin: {
|
|
97
|
+
vertical: 'bottom',
|
|
98
|
+
horizontal: 'right'
|
|
99
|
+
}, transformOrigin: {
|
|
100
|
+
vertical: 'top',
|
|
101
|
+
horizontal: 'right'
|
|
102
|
+
}, children: [handleDelete && (comment?.user === user.username || user.is_admin) && (_jsxs(MenuItem, { onClick: onDelete, disabled: loading, children: [_jsx(ListItemIcon, { children: loading ? (_jsx(CircularProgress, { size: 18, sx: theme => ({ color: theme.palette.text.primary }) })) : (_jsx(Delete, {})) }), _jsx(ListItemText, { children: t('comments.delete') })] })), handleEdit && comment?.user === user.username && (_jsxs(MenuItem, { onClick: () => {
|
|
103
|
+
setEditing(!editing);
|
|
104
|
+
handleClose();
|
|
105
|
+
}, disabled: loading, children: [_jsx(ListItemIcon, { children: _jsx(Edit, {}) }), _jsx(ListItemText, { children: !editing ? t('comments.edit') : t('comments.edit.stop') })] })), handleQuote && (_jsxs(MenuItem, { onClick: onQuote, disabled: loading, children: [_jsx(ListItemIcon, { children: _jsx(FormatQuote, {}) }), _jsx(ListItemText, { children: t('comments.quote') })] }))] })] }), !editing ? (_jsx(Typography, { variant: "body2", color: "text.secondary", component: "div", sx: {
|
|
106
|
+
'& > *': {
|
|
107
|
+
wordBreak: 'break-word'
|
|
108
|
+
},
|
|
109
|
+
'& > :last-child': {
|
|
110
|
+
marginBottom: 0
|
|
111
|
+
}
|
|
112
|
+
}, children: _jsx(Markdown, { md: comment.value }) })) : (_jsx(TextField, { sx: { mt: 1 }, inputProps: { sx: (theme) => ({ fontSize: theme.typography.body2.fontSize }) }, inputRef: (ref) => setTimeout(() => ref?.current?.focus(), 100), defaultValue: comment.value, onChange: e => setEditValue(e.target.value), onKeyDown: checkForActions, fullWidth: true, multiline: true }))] }), _jsx(CardActions, { sx: { px: 0 }, children: _jsx(Collapse, { in: editing || showInteractions || Object.values(comment?.reactions ?? {}).length > 0, sx: { width: '100%' }, children: _jsxs(Stack, { direction: "row", sx: { width: '100%' }, spacing: 0.5, children: [reactions, _jsx(FlexOne, {}), editing && (_jsxs(_Fragment, { children: [_jsx(IconButton, { size: "small", onClick: () => setEditing(false), disabled: loading, children: _jsx(Clear, { fontSize: "small" }) }), _jsx(IconButton, { size: "small", onClick: onEdit, disabled: loading, children: _jsx(Check, { fontSize: "small" }) })] }))] }) }) })] }, comment.timestamp)] }, comment.id));
|
|
113
|
+
};
|
|
114
|
+
export default memo(Comment);
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
type EditRowTypes<T extends string | number | boolean> = {
|
|
2
|
+
titleKey: string;
|
|
3
|
+
descriptionKey?: string;
|
|
4
|
+
value: T;
|
|
5
|
+
onEdit?: (value: string) => Promise<void>;
|
|
6
|
+
validate?: (value: T) => boolean;
|
|
7
|
+
failOnValidate?: boolean;
|
|
8
|
+
type?: 'password' | 'number' | 'text' | 'checkbox' | 'range';
|
|
9
|
+
min?: number;
|
|
10
|
+
max?: number;
|
|
11
|
+
optional?: boolean;
|
|
12
|
+
};
|
|
13
|
+
declare const EditRow: <T extends string | number | boolean>({ titleKey, descriptionKey, value, onEdit, validate, failOnValidate, type, min, max, optional }: EditRowTypes<T>) => import("react/jsx-runtime").JSX.Element;
|
|
14
|
+
export default EditRow;
|
|
@@ -0,0 +1,115 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
|
|
2
|
+
import { Check, Close, Delete, Edit } from '@mui/icons-material';
|
|
3
|
+
import { Box, Checkbox, CircularProgress, IconButton, Slider, Stack, TableCell, TableRow, TextField, Typography } from '@mui/material';
|
|
4
|
+
import useMySnackbar from '@cccsaurora/howler-ui/components/hooks/useMySnackbar';
|
|
5
|
+
import { isNull, isUndefined } from 'lodash-es';
|
|
6
|
+
import { useCallback, useEffect, useMemo, useState } from 'react';
|
|
7
|
+
import { useTranslation } from 'react-i18next';
|
|
8
|
+
const EditRow = ({ titleKey, descriptionKey, value, onEdit, validate, failOnValidate = false, type = 'text', min, max, optional }) => {
|
|
9
|
+
const { t } = useTranslation();
|
|
10
|
+
const { showErrorMessage } = useMySnackbar();
|
|
11
|
+
const [editing, setEditing] = useState(false);
|
|
12
|
+
const [error, setError] = useState(false);
|
|
13
|
+
const [loading, setLoading] = useState(false);
|
|
14
|
+
const [editValue, setEditValue] = useState(type === 'password' ? '' : value);
|
|
15
|
+
const [confirmPassword, setConfirmPassword] = useState('');
|
|
16
|
+
useEffect(() => {
|
|
17
|
+
if ((editValue === undefined || editValue === null) && value) {
|
|
18
|
+
setEditValue(value);
|
|
19
|
+
}
|
|
20
|
+
}, [editValue, value]);
|
|
21
|
+
const onChange = useCallback((_value) => {
|
|
22
|
+
if (validate && !validate(_value)) {
|
|
23
|
+
if (failOnValidate) {
|
|
24
|
+
return;
|
|
25
|
+
}
|
|
26
|
+
else {
|
|
27
|
+
setError(true);
|
|
28
|
+
}
|
|
29
|
+
}
|
|
30
|
+
else {
|
|
31
|
+
setError(false);
|
|
32
|
+
}
|
|
33
|
+
if (type === 'number' || type === 'range') {
|
|
34
|
+
if (!isNull(min) && !isUndefined(min) && parseInt(_value) < min) {
|
|
35
|
+
if (failOnValidate) {
|
|
36
|
+
return;
|
|
37
|
+
}
|
|
38
|
+
else {
|
|
39
|
+
setError(true);
|
|
40
|
+
}
|
|
41
|
+
}
|
|
42
|
+
else if (!isNull(max) && !isUndefined(max) && parseInt(_value) > max) {
|
|
43
|
+
if (failOnValidate) {
|
|
44
|
+
return;
|
|
45
|
+
}
|
|
46
|
+
else {
|
|
47
|
+
setError(true);
|
|
48
|
+
}
|
|
49
|
+
}
|
|
50
|
+
else {
|
|
51
|
+
setError(false);
|
|
52
|
+
}
|
|
53
|
+
}
|
|
54
|
+
if (type !== 'checkbox') {
|
|
55
|
+
setEditValue(_value);
|
|
56
|
+
}
|
|
57
|
+
else {
|
|
58
|
+
onEdit(_value.toString());
|
|
59
|
+
}
|
|
60
|
+
}, [failOnValidate, max, min, onEdit, type, validate]);
|
|
61
|
+
const onSubmit = useCallback(async () => {
|
|
62
|
+
if (editValue === value) {
|
|
63
|
+
setEditing(false);
|
|
64
|
+
return;
|
|
65
|
+
}
|
|
66
|
+
if (type === 'password' && editValue !== confirmPassword) {
|
|
67
|
+
showErrorMessage(t('password.match'));
|
|
68
|
+
setError(true);
|
|
69
|
+
return;
|
|
70
|
+
}
|
|
71
|
+
setLoading(true);
|
|
72
|
+
try {
|
|
73
|
+
await onEdit(editValue.toString());
|
|
74
|
+
setEditing(false);
|
|
75
|
+
}
|
|
76
|
+
finally {
|
|
77
|
+
setLoading(false);
|
|
78
|
+
}
|
|
79
|
+
}, [confirmPassword, editValue, onEdit, showErrorMessage, t, type, value]);
|
|
80
|
+
const checkForActions = useCallback(e => {
|
|
81
|
+
if (e.ctrlKey && e.key === 'Enter' && !loading) {
|
|
82
|
+
onSubmit();
|
|
83
|
+
}
|
|
84
|
+
if (e.key === 'Escape') {
|
|
85
|
+
setEditing(false);
|
|
86
|
+
}
|
|
87
|
+
}, [loading, onSubmit]);
|
|
88
|
+
const cellSx = useMemo(() => [!!descriptionKey && { borderBottom: 0, paddingBottom: '0 !important' }, { width: '100%' }], [descriptionKey]);
|
|
89
|
+
return (_jsxs(_Fragment, { children: [_jsxs(TableRow, { children: [_jsx(TableCell, { sx: cellSx, style: { whiteSpace: 'nowrap' }, children: t(titleKey) }), editing ? (_jsx(TableCell, { sx: cellSx, colSpan: 2, children: _jsxs(Stack, { direction: "row", spacing: 1, alignItems: "center", children: [_jsxs(Box, { sx: {
|
|
90
|
+
display: 'flex',
|
|
91
|
+
width: '100%',
|
|
92
|
+
flexDirection: { xs: 'column', md: 'row' },
|
|
93
|
+
'& > .MuiTextField-root:nth-of-type(2)': {
|
|
94
|
+
ml: {
|
|
95
|
+
xs: 0,
|
|
96
|
+
md: 1
|
|
97
|
+
},
|
|
98
|
+
mt: {
|
|
99
|
+
xs: 1,
|
|
100
|
+
md: 0
|
|
101
|
+
}
|
|
102
|
+
}
|
|
103
|
+
}, children: [!['checkbox', 'range'].includes(type) && (_jsx(TextField, { size: "small", value: editValue, onChange: ev => onChange(ev.target.value), onKeyDown: checkForActions, fullWidth: true, label: type === 'password' ? t('password') : null, type: type, error: error, sx: { '& input': { fontSize: '13.5px !important' } }, InputProps: {
|
|
104
|
+
endAdornment: loading && _jsx(CircularProgress, { size: 24 })
|
|
105
|
+
} })), type === 'checkbox' && (_jsx(Checkbox, { sx: { marginRight: 'auto' }, value: editValue, onChange: ev => onChange(ev.target.checked) })), type === 'range' && (_jsx(Slider, { min: min ?? 0, max: max ?? 100, step: Math.pow(10, Math.floor(Math.log10(max ?? 100) - Math.log10(Math.max(min ?? 0, 1)) / 2)), onChange: (__, val) => onChange(val), value: editValue, valueLabelDisplay: "auto", valueLabelFormat: val => `${val}px` })), type === 'password' && (_jsx(TextField, { size: "small", value: confirmPassword, onChange: ev => {
|
|
106
|
+
setConfirmPassword(ev.target.value);
|
|
107
|
+
setError(false);
|
|
108
|
+
}, onKeyDown: checkForActions, fullWidth: true, label: t('password.confirm'), type: "password", error: error, sx: { '& input': { fontSize: '13.5px !important' } }, InputProps: {
|
|
109
|
+
endAdornment: loading && _jsx(CircularProgress, { size: 24 })
|
|
110
|
+
} }))] }), _jsx(IconButton, { onClick: onSubmit, disabled: loading, children: _jsx(Check, { fontSize: "small" }) }), _jsx(IconButton, { onClick: () => setEditing(false), disabled: loading, children: _jsx(Close, { fontSize: "small" }) }), optional && (_jsx(IconButton, { onClick: () => {
|
|
111
|
+
setEditing(false);
|
|
112
|
+
onEdit(null);
|
|
113
|
+
}, disabled: loading, children: _jsx(Delete, { fontSize: "small" }) }))] }) })) : (_jsxs(TableCell, { sx: cellSx, width: "100%", children: [type === 'checkbox' ? (_jsx(Checkbox, { onChange: ev => onChange(ev.target.checked), checked: value.toString() === 'true' })) : ((value ?? t('none'))), type === 'range' && value && 'px'] })), onEdit && !editing && type !== 'checkbox' && (_jsx(TableCell, { sx: cellSx, align: "right", children: _jsx(IconButton, { onClick: () => setEditing(true), children: _jsx(Edit, { fontSize: "small" }) }) }))] }), descriptionKey && (_jsx(TableRow, { children: _jsx(TableCell, { colSpan: 3, sx: { paddingTop: '0 !important' }, children: _jsx(Typography, { variant: "caption", color: "text.secondary", children: t(descriptionKey) }) }) }))] }));
|
|
114
|
+
};
|
|
115
|
+
export default EditRow;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { type ChipProps } from '@mui/material';
|
|
2
|
+
import { type FC } from 'react';
|
|
3
|
+
export type PluginChipProps = ChipProps & {
|
|
4
|
+
value: string;
|
|
5
|
+
context: string;
|
|
6
|
+
field?: string;
|
|
7
|
+
};
|
|
8
|
+
declare const PluginChip: FC<PluginChipProps>;
|
|
9
|
+
export default PluginChip;
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
import { Chip } from '@mui/material';
|
|
3
|
+
import howlerPluginStore from '@cccsaurora/howler-ui/plugins/store';
|
|
4
|
+
import {} from 'react';
|
|
5
|
+
import { usePluginStore } from 'react-pluggable';
|
|
6
|
+
const PluginChip = ({ children, value, context, field, ...props }) => {
|
|
7
|
+
const pluginStore = usePluginStore();
|
|
8
|
+
for (const plugin of howlerPluginStore.plugins) {
|
|
9
|
+
const component = pluginStore.executeFunction(`${plugin}.chip`, {
|
|
10
|
+
children,
|
|
11
|
+
value,
|
|
12
|
+
context,
|
|
13
|
+
field,
|
|
14
|
+
...props
|
|
15
|
+
});
|
|
16
|
+
if (component) {
|
|
17
|
+
return component;
|
|
18
|
+
}
|
|
19
|
+
}
|
|
20
|
+
return _jsx(Chip, { ...props, children: children });
|
|
21
|
+
};
|
|
22
|
+
export default PluginChip;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { type TypographyProps } from '@mui/material';
|
|
2
|
+
import { type FC } from 'react';
|
|
3
|
+
export type PluginTypographyProps = TypographyProps & {
|
|
4
|
+
value: string;
|
|
5
|
+
context: string;
|
|
6
|
+
field?: string;
|
|
7
|
+
};
|
|
8
|
+
declare const PluginTypography: FC<PluginTypographyProps>;
|
|
9
|
+
export default PluginTypography;
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
import { Typography } from '@mui/material';
|
|
3
|
+
import howlerPluginStore from '@cccsaurora/howler-ui/plugins/store';
|
|
4
|
+
import {} from 'react';
|
|
5
|
+
import { usePluginStore } from 'react-pluggable';
|
|
6
|
+
const PluginTypography = ({ children, value, context, field, ...props }) => {
|
|
7
|
+
const pluginStore = usePluginStore();
|
|
8
|
+
for (const plugin of howlerPluginStore.plugins) {
|
|
9
|
+
const component = pluginStore.executeFunction(`${plugin}.typography`, {
|
|
10
|
+
children,
|
|
11
|
+
value,
|
|
12
|
+
context,
|
|
13
|
+
field,
|
|
14
|
+
...props
|
|
15
|
+
});
|
|
16
|
+
if (component) {
|
|
17
|
+
return component;
|
|
18
|
+
}
|
|
19
|
+
}
|
|
20
|
+
return _jsx(Typography, { ...props, children: children ?? value });
|
|
21
|
+
};
|
|
22
|
+
export default PluginTypography;
|