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

Remove react references from core OverlayService apis #48431

Merged
Merged
Show file tree
Hide file tree
Changes from 12 commits
Commits
Show all changes
27 commits
Select commit Hold shift + click to select a range
bb08083
move/rename overlay mount and unmount types from banner to parent module
pgayvallet Oct 15, 2019
0dccba9
migrate openModal / modalService
pgayvallet Oct 16, 2019
d6c6bd5
migrate openFlyout / flyout service
pgayvallet Oct 17, 2019
dd2e3d3
remove CoreStart export from kibana-react
pgayvallet Oct 23, 2019
390503b
adapt some calls to new signature
pgayvallet Oct 23, 2019
052e39d
updates core doc
pgayvallet Oct 17, 2019
6a38024
adapt new calls
pgayvallet Oct 24, 2019
cf6f965
adapt js call
pgayvallet Oct 24, 2019
f47fc6d
add flex layout on mountWrapper component to avoid losing scroll on o…
pgayvallet Oct 24, 2019
bb1c085
create proper flyout/modal services
pgayvallet Oct 24, 2019
7132dbd
update generated doc
pgayvallet Oct 24, 2019
f6f4fbe
update snapshot on data/query_bar
pgayvallet Oct 24, 2019
34ecb11
use ReactNode instead of ReactElement
pgayvallet Oct 28, 2019
e55d9c0
rename mountForComponent to reactMount
pgayvallet Oct 28, 2019
cfaf20e
Merge remote-tracking branch 'upstream/master' into kbn-37894-NP-agno…
pgayvallet Oct 28, 2019
2cfde6e
Merge remote-tracking branch 'upstream/master' into kbn-37894-NP-agno…
pgayvallet Oct 28, 2019
0053270
Merge remote-tracking branch 'upstream/master' into kbn-37894-NP-agno…
pgayvallet Nov 18, 2019
78b5378
change reactMount usages to toMountPoint
pgayvallet Nov 18, 2019
db390cb
remove duplicate MountPoint type in overlays
pgayvallet Nov 18, 2019
f08fdfe
remove duplicate mount utilities from overlays
pgayvallet Nov 18, 2019
892bcde
allow to specify custom class name to MountWrapper
pgayvallet Nov 18, 2019
25c332f
Allow to specialize MountPoint on HTMLElement subtypes
pgayvallet Nov 18, 2019
d64f550
updates generated doc
pgayvallet Nov 18, 2019
e26120b
undeprecates openFlyout/openModal & remove direct subservice access f…
pgayvallet Nov 18, 2019
3ac8feb
adapt toast api to get i18n context from service
pgayvallet Nov 19, 2019
54916e9
use MountPoint instead of inline definition
pgayvallet Nov 19, 2019
0ae0157
Merge remote-tracking branch 'upstream/master' into kbn-37894-NP-agno…
pgayvallet Nov 19, 2019
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
8 changes: 6 additions & 2 deletions docs/development/core/public/kibana-plugin-public.md
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,10 @@ The plugin integrates with the core system via lifecycle events: `setup`<!-- -->
| [NotificationsSetup](./kibana-plugin-public.notificationssetup.md) | |
| [NotificationsStart](./kibana-plugin-public.notificationsstart.md) | |
| [OverlayBannersStart](./kibana-plugin-public.overlaybannersstart.md) | |
| [OverlayFlyoutOpenOptions](./kibana-plugin-public.overlayflyoutopenoptions.md) | |
| [OverlayFlyoutStart](./kibana-plugin-public.overlayflyoutstart.md) | APIs to open and manage fly-out dialogs. |
| [OverlayModalOpenOptions](./kibana-plugin-public.overlaymodalopenoptions.md) | |
| [OverlayModalStart](./kibana-plugin-public.overlaymodalstart.md) | APIs to open and manage modal dialogs. |
| [OverlayRef](./kibana-plugin-public.overlayref.md) | Returned by [OverlayStart](./kibana-plugin-public.overlaystart.md) methods for closing a mounted overlay. |
| [OverlayStart](./kibana-plugin-public.overlaystart.md) | |
| [PackageInfo](./kibana-plugin-public.packageinfo.md) | |
Expand Down Expand Up @@ -109,8 +113,7 @@ The plugin integrates with the core system via lifecycle events: `setup`<!-- -->
| [HttpStart](./kibana-plugin-public.httpstart.md) | See [HttpServiceBase](./kibana-plugin-public.httpservicebase.md) |
| [IContextProvider](./kibana-plugin-public.icontextprovider.md) | A function that returns a context value for a specific key of given context type. |
| [IToasts](./kibana-plugin-public.itoasts.md) | Methods for adding and removing global toast messages. See [ToastsApi](./kibana-plugin-public.toastsapi.md)<!-- -->. |
| [OverlayBannerMount](./kibana-plugin-public.overlaybannermount.md) | A function that will mount the banner inside the provided element. |
| [OverlayBannerUnmount](./kibana-plugin-public.overlaybannerunmount.md) | A function that will unmount the banner from the element. |
| [MountPoint](./kibana-plugin-public.mountpoint.md) | A function that will mount the banner inside the provided element. |
| [PluginInitializer](./kibana-plugin-public.plugininitializer.md) | The <code>plugin</code> export at the root of a plugin's <code>public</code> directory should conform to this interface. |
| [PluginOpaqueId](./kibana-plugin-public.pluginopaqueid.md) | |
| [RecursiveReadonly](./kibana-plugin-public.recursivereadonly.md) | |
Expand All @@ -122,4 +125,5 @@ The plugin integrates with the core system via lifecycle events: `setup`<!-- -->
| [ToastsSetup](./kibana-plugin-public.toastssetup.md) | [IToasts](./kibana-plugin-public.itoasts.md) |
| [ToastsStart](./kibana-plugin-public.toastsstart.md) | [IToasts](./kibana-plugin-public.itoasts.md) |
| [UiSettingsClientContract](./kibana-plugin-public.uisettingsclientcontract.md) | [UiSettingsClient](./kibana-plugin-public.uisettingsclient.md) |
| [UnmountCallback](./kibana-plugin-public.unmountcallback.md) | A function that will unmount the element previously mounted by the associated [MountPoint](./kibana-plugin-public.mountpoint.md) |

Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
<!-- Do not edit this file. It is automatically generated by API Documenter. -->

[Home](./index.md) &gt; [kibana-plugin-public](./kibana-plugin-public.md) &gt; [OverlayBannerMount](./kibana-plugin-public.overlaybannermount.md)
[Home](./index.md) &gt; [kibana-plugin-public](./kibana-plugin-public.md) &gt; [MountPoint](./kibana-plugin-public.mountpoint.md)

## OverlayBannerMount type
## MountPoint type

A function that will mount the banner inside the provided element.

<b>Signature:</b>

```typescript
export declare type OverlayBannerMount = (element: HTMLElement) => OverlayBannerUnmount;
export declare type MountPoint = (element: HTMLElement) => UnmountCallback;
```
Original file line number Diff line number Diff line change
Expand Up @@ -9,14 +9,14 @@ Add a new banner
<b>Signature:</b>

```typescript
add(mount: OverlayBannerMount, priority?: number): string;
add(mount: MountPoint, priority?: number): string;
```

## Parameters

| Parameter | Type | Description |
| --- | --- | --- |
| mount | <code>OverlayBannerMount</code> | |
| mount | <code>MountPoint</code> | |
| priority | <code>number</code> | |

<b>Returns:</b>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,15 +9,15 @@ Replace a banner in place
<b>Signature:</b>

```typescript
replace(id: string | undefined, mount: OverlayBannerMount, priority?: number): string;
replace(id: string | undefined, mount: MountPoint, priority?: number): string;
```

## Parameters

| Parameter | Type | Description |
| --- | --- | --- |
| id | <code>string &#124; undefined</code> | |
| mount | <code>OverlayBannerMount</code> | |
| mount | <code>MountPoint</code> | |
| priority | <code>number</code> | |

<b>Returns:</b>
Expand Down

This file was deleted.

Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
<!-- Do not edit this file. It is automatically generated by API Documenter. -->

[Home](./index.md) &gt; [kibana-plugin-public](./kibana-plugin-public.md) &gt; [OverlayFlyoutOpenOptions](./kibana-plugin-public.overlayflyoutopenoptions.md) &gt; ["data-test-subj"](./kibana-plugin-public.overlayflyoutopenoptions._data-test-subj_.md)

## OverlayFlyoutOpenOptions."data-test-subj" property

<b>Signature:</b>

```typescript
'data-test-subj'?: string;
```
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
<!-- Do not edit this file. It is automatically generated by API Documenter. -->

[Home](./index.md) &gt; [kibana-plugin-public](./kibana-plugin-public.md) &gt; [OverlayFlyoutOpenOptions](./kibana-plugin-public.overlayflyoutopenoptions.md) &gt; [className](./kibana-plugin-public.overlayflyoutopenoptions.classname.md)

## OverlayFlyoutOpenOptions.className property

<b>Signature:</b>

```typescript
className?: string;
```
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
<!-- Do not edit this file. It is automatically generated by API Documenter. -->

[Home](./index.md) &gt; [kibana-plugin-public](./kibana-plugin-public.md) &gt; [OverlayFlyoutOpenOptions](./kibana-plugin-public.overlayflyoutopenoptions.md) &gt; [closeButtonAriaLabel](./kibana-plugin-public.overlayflyoutopenoptions.closebuttonarialabel.md)

## OverlayFlyoutOpenOptions.closeButtonAriaLabel property

<b>Signature:</b>

```typescript
closeButtonAriaLabel?: string;
```
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
<!-- Do not edit this file. It is automatically generated by API Documenter. -->

[Home](./index.md) &gt; [kibana-plugin-public](./kibana-plugin-public.md) &gt; [OverlayFlyoutOpenOptions](./kibana-plugin-public.overlayflyoutopenoptions.md)

## OverlayFlyoutOpenOptions interface


<b>Signature:</b>

```typescript
export interface OverlayFlyoutOpenOptions
```

## Properties

| Property | Type | Description |
| --- | --- | --- |
| ["data-test-subj"](./kibana-plugin-public.overlayflyoutopenoptions._data-test-subj_.md) | <code>string</code> | |
| [className](./kibana-plugin-public.overlayflyoutopenoptions.classname.md) | <code>string</code> | |
| [closeButtonAriaLabel](./kibana-plugin-public.overlayflyoutopenoptions.closebuttonarialabel.md) | <code>string</code> | |

Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
<!-- Do not edit this file. It is automatically generated by API Documenter. -->

[Home](./index.md) &gt; [kibana-plugin-public](./kibana-plugin-public.md) &gt; [OverlayFlyoutStart](./kibana-plugin-public.overlayflyoutstart.md)

## OverlayFlyoutStart interface

APIs to open and manage fly-out dialogs.

<b>Signature:</b>

```typescript
export interface OverlayFlyoutStart
```

## Methods

| Method | Description |
| --- | --- |
| [open(mount, options)](./kibana-plugin-public.overlayflyoutstart.open.md) | Opens a flyout panel with the given mount point inside. You can use <code>close()</code> on the returned FlyoutRef to close the flyout. |

Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
<!-- Do not edit this file. It is automatically generated by API Documenter. -->

[Home](./index.md) &gt; [kibana-plugin-public](./kibana-plugin-public.md) &gt; [OverlayFlyoutStart](./kibana-plugin-public.overlayflyoutstart.md) &gt; [open](./kibana-plugin-public.overlayflyoutstart.open.md)

## OverlayFlyoutStart.open() method

Opens a flyout panel with the given mount point inside. You can use `close()` on the returned FlyoutRef to close the flyout.

<b>Signature:</b>

```typescript
open(mount: MountPoint, options?: OverlayFlyoutOpenOptions): OverlayRef;
```

## Parameters

| Parameter | Type | Description |
| --- | --- | --- |
| mount | <code>MountPoint</code> | |
| options | <code>OverlayFlyoutOpenOptions</code> | |

<b>Returns:</b>

`OverlayRef`

Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
<!-- Do not edit this file. It is automatically generated by API Documenter. -->

[Home](./index.md) &gt; [kibana-plugin-public](./kibana-plugin-public.md) &gt; [OverlayModalOpenOptions](./kibana-plugin-public.overlaymodalopenoptions.md) &gt; ["data-test-subj"](./kibana-plugin-public.overlaymodalopenoptions._data-test-subj_.md)

## OverlayModalOpenOptions."data-test-subj" property

<b>Signature:</b>

```typescript
'data-test-subj'?: string;
```
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
<!-- Do not edit this file. It is automatically generated by API Documenter. -->

[Home](./index.md) &gt; [kibana-plugin-public](./kibana-plugin-public.md) &gt; [OverlayModalOpenOptions](./kibana-plugin-public.overlaymodalopenoptions.md) &gt; [className](./kibana-plugin-public.overlaymodalopenoptions.classname.md)

## OverlayModalOpenOptions.className property

<b>Signature:</b>

```typescript
className?: string;
```
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
<!-- Do not edit this file. It is automatically generated by API Documenter. -->

[Home](./index.md) &gt; [kibana-plugin-public](./kibana-plugin-public.md) &gt; [OverlayModalOpenOptions](./kibana-plugin-public.overlaymodalopenoptions.md) &gt; [closeButtonAriaLabel](./kibana-plugin-public.overlaymodalopenoptions.closebuttonarialabel.md)

## OverlayModalOpenOptions.closeButtonAriaLabel property

<b>Signature:</b>

```typescript
closeButtonAriaLabel?: string;
```
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
<!-- Do not edit this file. It is automatically generated by API Documenter. -->

[Home](./index.md) &gt; [kibana-plugin-public](./kibana-plugin-public.md) &gt; [OverlayModalOpenOptions](./kibana-plugin-public.overlaymodalopenoptions.md)

## OverlayModalOpenOptions interface


<b>Signature:</b>

```typescript
export interface OverlayModalOpenOptions
```

## Properties

| Property | Type | Description |
| --- | --- | --- |
| ["data-test-subj"](./kibana-plugin-public.overlaymodalopenoptions._data-test-subj_.md) | <code>string</code> | |
| [className](./kibana-plugin-public.overlaymodalopenoptions.classname.md) | <code>string</code> | |
| [closeButtonAriaLabel](./kibana-plugin-public.overlaymodalopenoptions.closebuttonarialabel.md) | <code>string</code> | |

Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
<!-- Do not edit this file. It is automatically generated by API Documenter. -->

[Home](./index.md) &gt; [kibana-plugin-public](./kibana-plugin-public.md) &gt; [OverlayModalStart](./kibana-plugin-public.overlaymodalstart.md)

## OverlayModalStart interface

APIs to open and manage modal dialogs.

<b>Signature:</b>

```typescript
export interface OverlayModalStart
```

## Methods

| Method | Description |
| --- | --- |
| [open(mount, options)](./kibana-plugin-public.overlaymodalstart.open.md) | Opens a modal panel with the given mount point inside. You can use <code>close()</code> on the returned OverlayRef to close the modal. |

Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
<!-- Do not edit this file. It is automatically generated by API Documenter. -->

[Home](./index.md) &gt; [kibana-plugin-public](./kibana-plugin-public.md) &gt; [OverlayModalStart](./kibana-plugin-public.overlaymodalstart.md) &gt; [open](./kibana-plugin-public.overlaymodalstart.open.md)

## OverlayModalStart.open() method

Opens a modal panel with the given mount point inside. You can use `close()` on the returned OverlayRef to close the modal.

<b>Signature:</b>

```typescript
open(mount: MountPoint, options?: OverlayModalOpenOptions): OverlayRef;
```

## Parameters

| Parameter | Type | Description |
| --- | --- | --- |
| mount | <code>MountPoint</code> | |
| options | <code>OverlayModalOpenOptions</code> | |

<b>Returns:</b>

`OverlayRef`

Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
<!-- Do not edit this file. It is automatically generated by API Documenter. -->

[Home](./index.md) &gt; [kibana-plugin-public](./kibana-plugin-public.md) &gt; [OverlayStart](./kibana-plugin-public.overlaystart.md) &gt; [flyouts](./kibana-plugin-public.overlaystart.flyouts.md)

## OverlayStart.flyouts property

[OverlayFlyoutStart](./kibana-plugin-public.overlayflyoutstart.md)

<b>Signature:</b>

```typescript
flyouts: OverlayFlyoutStart;
```
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,8 @@ export interface OverlayStart
| Property | Type | Description |
| --- | --- | --- |
| [banners](./kibana-plugin-public.overlaystart.banners.md) | <code>OverlayBannersStart</code> | [OverlayBannersStart](./kibana-plugin-public.overlaybannersstart.md) |
| [openFlyout](./kibana-plugin-public.overlaystart.openflyout.md) | <code>(flyoutChildren: React.ReactNode, flyoutProps?: {</code><br/><code> closeButtonAriaLabel?: string;</code><br/><code> 'data-test-subj'?: string;</code><br/><code> }) =&gt; OverlayRef</code> | |
| [openModal](./kibana-plugin-public.overlaystart.openmodal.md) | <code>(modalChildren: React.ReactNode, modalProps?: {</code><br/><code> className?: string;</code><br/><code> closeButtonAriaLabel?: string;</code><br/><code> 'data-test-subj'?: string;</code><br/><code> }) =&gt; OverlayRef</code> | |
| [flyouts](./kibana-plugin-public.overlaystart.flyouts.md) | <code>OverlayFlyoutStart</code> | [OverlayFlyoutStart](./kibana-plugin-public.overlayflyoutstart.md) |
| [modals](./kibana-plugin-public.overlaystart.modals.md) | <code>OverlayModalStart</code> | [OverlayModalStart](./kibana-plugin-public.overlaymodalstart.md) |
| [openFlyout](./kibana-plugin-public.overlaystart.openflyout.md) | <code>OverlayFlyoutStart['open']</code> | |
| [openModal](./kibana-plugin-public.overlaystart.openmodal.md) | <code>OverlayModalStart['open']</code> | |

Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
<!-- Do not edit this file. It is automatically generated by API Documenter. -->

[Home](./index.md) &gt; [kibana-plugin-public](./kibana-plugin-public.md) &gt; [OverlayStart](./kibana-plugin-public.overlaystart.md) &gt; [modals](./kibana-plugin-public.overlaystart.modals.md)

## OverlayStart.modals property

[OverlayModalStart](./kibana-plugin-public.overlaymodalstart.md)

<b>Signature:</b>

```typescript
modals: OverlayModalStart;
```
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,13 @@

## OverlayStart.openFlyout property

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

<b>Signature:</b>

```typescript
openFlyout: (flyoutChildren: React.ReactNode, flyoutProps?: {
closeButtonAriaLabel?: string;
'data-test-subj'?: string;
}) => OverlayRef;
openFlyout: OverlayFlyoutStart['open'];
```
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,13 @@

## OverlayStart.openModal property

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

<b>Signature:</b>

```typescript
openModal: (modalChildren: React.ReactNode, modalProps?: {
className?: string;
closeButtonAriaLabel?: string;
'data-test-subj'?: string;
}) => OverlayRef;
openModal: OverlayModalStart['open'];
```
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
<!-- Do not edit this file. It is automatically generated by API Documenter. -->

[Home](./index.md) &gt; [kibana-plugin-public](./kibana-plugin-public.md) &gt; [UnmountCallback](./kibana-plugin-public.unmountcallback.md)

## UnmountCallback type

A function that will unmount the element previously mounted by the associated [MountPoint](./kibana-plugin-public.mountpoint.md)

<b>Signature:</b>

```typescript
export declare type UnmountCallback = () => void;
```
Loading