Skip to content

Commit

Permalink
undeprecates openFlyout/openModal & remove direct subservice access f…
Browse files Browse the repository at this point in the history
…rom overlayService
  • Loading branch information
pgayvallet committed Nov 18, 2019
1 parent d64f550 commit e26120b
Show file tree
Hide file tree
Showing 9 changed files with 5 additions and 99 deletions.

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,6 @@ export interface OverlayStart
| Property | Type | Description |
| --- | --- | --- |
| [banners](./kibana-plugin-public.overlaystart.banners.md) | <code>OverlayBannersStart</code> | [OverlayBannersStart](./kibana-plugin-public.overlaybannersstart.md) |
| [flyouts](./kibana-plugin-public.overlaystart.flyouts.md) | <code>OverlayFlyoutStart</code> | |
| [modals](./kibana-plugin-public.overlaystart.modals.md) | <code>OverlayModalStart</code> | |
| [openFlyout](./kibana-plugin-public.overlaystart.openflyout.md) | <code>OverlayFlyoutStart['open']</code> | |
| [openModal](./kibana-plugin-public.overlaystart.openmodal.md) | <code>OverlayModalStart['open']</code> | |

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,6 @@

## OverlayStart.openFlyout property

> Warning: This API is now obsolete.
>
> Use [OverlayStart.flyouts](./kibana-plugin-public.overlaystart.flyouts.md) instead
>

<b>Signature:</b>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,6 @@

## OverlayStart.openModal property

> Warning: This API is now obsolete.
>
> Use [OverlayStart.modals](./kibana-plugin-public.overlaystart.modals.md) instead
>

<b>Signature:</b>

Expand Down
10 changes: 2 additions & 8 deletions src/core/public/overlays/overlay_service.mock.ts
Original file line number Diff line number Diff line change
Expand Up @@ -23,16 +23,10 @@ import { overlayModalServiceMock } from './modal/modal_service.mock';

const createStartContractMock = () => {
const startContract: DeeplyMockedKeys<OverlayStart> = {
openFlyout: jest.fn(),
openModal: jest.fn(),
openFlyout: overlayFlyoutServiceMock.createStartContract().open,
openModal: overlayModalServiceMock.createStartContract().open,
banners: overlayBannersServiceMock.createStartContract(),
flyouts: overlayFlyoutServiceMock.createStartContract(),
modals: overlayModalServiceMock.createStartContract(),
};
startContract.openModal.mockReturnValue({
close: jest.fn(),
onClose: Promise.resolve(),
});
return startContract;
};

Expand Down
16 changes: 2 additions & 14 deletions src/core/public/overlays/overlay_service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -48,9 +48,6 @@ export class OverlayService {

return {
banners,
flyouts,
modals,

openFlyout: flyouts.open.bind(flyouts),
openModal: modals.open.bind(modals),
};
Expand All @@ -61,17 +58,8 @@ export class OverlayService {
export interface OverlayStart {
/** {@link OverlayBannersStart} */
banners: OverlayBannersStart;
/** {@link OverlayModalStart} */
modals: OverlayModalStart;
/** {@link OverlayFlyoutStart} */
flyouts: OverlayFlyoutStart;

/**
* @deprecated Use {@link OverlayStart.flyouts} instead
*/
/** {@link OverlayFlyoutStart#open} */
openFlyout: OverlayFlyoutStart['open'];
/**
* @deprecated Use {@link OverlayStart.modals} instead
*/
/** {@link OverlayModalStart#open} */
openModal: OverlayModalStart['open'];
}
8 changes: 1 addition & 7 deletions src/core/public/public.api.md
Original file line number Diff line number Diff line change
Expand Up @@ -658,18 +658,12 @@ export interface OverlayStart {
// (undocumented)
banners: OverlayBannersStart;
// Warning: (ae-forgotten-export) The symbol "OverlayFlyoutStart" needs to be exported by the entry point index.d.ts
// Warning: (ae-unresolved-link) The @link reference could not be resolved: The package "kibana" does not have an export "OverlayFlyoutStart"
//
// (undocumented)
flyouts: OverlayFlyoutStart;
openFlyout: OverlayFlyoutStart['open'];
// Warning: (ae-forgotten-export) The symbol "OverlayModalStart" needs to be exported by the entry point index.d.ts
// Warning: (ae-unresolved-link) The @link reference could not be resolved: The package "kibana" does not have an export "OverlayModalStart"
//
// (undocumented)
modals: OverlayModalStart;
// @deprecated (undocumented)
openFlyout: OverlayFlyoutStart['open'];
// @deprecated (undocumented)
openModal: OverlayModalStart['open'];
}

Expand Down

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit e26120b

Please sign in to comment.