Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Cases] Remove temporal public methods from the cases plugin #127248

Merged
merged 1 commit into from
Mar 9, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 0 additions & 2 deletions x-pack/plugins/cases/public/mocks.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,8 @@ export const mockCasesContract = (): jest.Mocked<CasesUiStart> => ({
getCases: jest.fn(),
getCasesContext: jest.fn().mockImplementation(() => mockCasesContext),
getAllCasesSelectorModal: jest.fn(),
getAllCasesSelectorModalNoProvider: jest.fn(),
getCreateCaseFlyout: jest.fn(),
getRecentCases: jest.fn(),
getCreateCaseFlyoutNoProvider: jest.fn(),
hooks: {
getUseCasesAddToNewCaseFlyout: jest.fn(),
getUseCasesAddToExistingCaseModal: jest.fn(),
Expand Down
8 changes: 2 additions & 6 deletions x-pack/plugins/cases/public/plugin.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,6 @@ import {
getAllCasesSelectorModalLazy,
getCreateCaseFlyoutLazy,
canUseCases,
getCreateCaseFlyoutLazyNoProvider,
getAllCasesSelectorModalNoProviderLazy,
} from './methods';
import { CasesUiConfigType } from '../common/ui/types';
import { APP_ID, APP_PATH } from '../common/constants';
Expand Down Expand Up @@ -93,12 +91,10 @@ export class CasesUiPlugin
getCases: getCasesLazy,
getCasesContext: getCasesContextLazy,
getRecentCases: getRecentCasesLazy,
// @deprecated Please use the hook getUseCasesAddToNewCaseFlyout
getCreateCaseFlyout: getCreateCaseFlyoutLazy,
// @deprecated Please use the hook getUseCasesAddToExistingCaseModal
getAllCasesSelectorModal: getAllCasesSelectorModalLazy,
// Temporal methods to remove timelines and cases deep integration
// https://github.com/elastic/kibana/issues/123183
getCreateCaseFlyoutNoProvider: getCreateCaseFlyoutLazyNoProvider,
getAllCasesSelectorModalNoProvider: getAllCasesSelectorModalNoProviderLazy,
hooks: {
getUseCasesAddToNewCaseFlyout: useCasesAddToNewCaseFlyout,
getUseCasesAddToExistingCaseModal: useCasesAddToExistingCaseModal,
Expand Down
7 changes: 0 additions & 7 deletions x-pack/plugins/cases/public/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@ import type { SpacesPluginStart } from '../../spaces/public';
import type { TriggersAndActionsUIPublicPluginStart as TriggersActionsStart } from '../../triggers_actions_ui/public';
import { CommentRequestAlertType, CommentRequestUserType } from '../common/api';
import { UseCasesAddToExistingCaseModal } from './components/all_cases/selector_modal/use_cases_add_to_existing_case_modal';
import { CreateCaseFlyoutProps } from './components/create/flyout';
import { UseCasesAddToNewCaseFlyout } from './components/create/flyout/use_cases_add_to_new_case_flyout';

import type {
Expand Down Expand Up @@ -97,18 +96,12 @@ export interface CasesUiStart {
getAllCasesSelectorModal: (
props: GetAllCasesSelectorModalProps
) => ReactElement<GetAllCasesSelectorModalProps>;
getAllCasesSelectorModalNoProvider: (
props: GetAllCasesSelectorModalProps
) => ReactElement<GetAllCasesSelectorModalProps>;
/**
* Flyout with the form to create a case for the owner
* @param props GetCreateCaseFlyoutProps
* @returns A react component that is a flyout for creating a case
*/
getCreateCaseFlyout: (props: GetCreateCaseFlyoutProps) => ReactElement<GetCreateCaseFlyoutProps>;
getCreateCaseFlyoutNoProvider: (
props: CreateCaseFlyoutProps
) => ReactElement<CreateCaseFlyoutProps>;
/**
* Get the recent cases component
* @param props GetRecentCasesProps
Expand Down