Skip to content

Commit

Permalink
updates core doc
Browse files Browse the repository at this point in the history
Signed-off-by: pgayvallet <pierre.gayvallet@elastic.co>

update doc bis

Signed-off-by: pgayvallet <pierre.gayvallet@elastic.co>
  • Loading branch information
pgayvallet committed Oct 24, 2019
1 parent 38417f8 commit 7e03f01
Show file tree
Hide file tree
Showing 10 changed files with 37 additions and 36 deletions.
4 changes: 2 additions & 2 deletions docs/development/core/public/kibana-plugin-public.md
Original file line number Diff line number Diff line change
Expand Up @@ -107,8 +107,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 @@ -120,4 +119,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
Expand Up @@ -16,6 +16,6 @@ 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> | |
| [openFlyout](./kibana-plugin-public.overlaystart.openflyout.md) | <code>(flyoutChildren: MountPoint, 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: MountPoint, modalProps?: {</code><br/><code> className?: string;</code><br/><code> closeButtonAriaLabel?: string;</code><br/><code> 'data-test-subj'?: string;</code><br/><code> }) =&gt; OverlayRef</code> | |

Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
<b>Signature:</b>

```typescript
openFlyout: (flyoutChildren: React.ReactNode, flyoutProps?: {
openFlyout: (flyoutChildren: MountPoint, flyoutProps?: {
closeButtonAriaLabel?: string;
'data-test-subj'?: string;
}) => OverlayRef;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
<b>Signature:</b>

```typescript
openModal: (modalChildren: React.ReactNode, modalProps?: {
openModal: (modalChildren: MountPoint, modalProps?: {
className?: string;
closeButtonAriaLabel?: string;
'data-test-subj'?: string;
Expand Down
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;
```
21 changes: 11 additions & 10 deletions src/core/public/public.api.md
Original file line number Diff line number Diff line change
Expand Up @@ -596,6 +596,9 @@ export interface LegacyNavLink {
url: string;
}

// @public
export type MountPoint = (element: HTMLElement) => UnmountCallback;

// @public (undocumented)
export interface NotificationsSetup {
// (undocumented)
Expand All @@ -608,25 +611,20 @@ export interface NotificationsStart {
toasts: ToastsStart;
}

// @public
export type OverlayBannerMount = (element: HTMLElement) => OverlayBannerUnmount;

// @public (undocumented)
export interface OverlayBannersStart {
add(mount: OverlayBannerMount, priority?: number): string;
add(mount: MountPoint, priority?: number): string;
// Warning: (ae-forgotten-export) The symbol "OverlayBanner" needs to be exported by the entry point index.d.ts
//
// @internal (undocumented)
get$(): Observable<OverlayBanner[]>;
// (undocumented)
getComponent(): JSX.Element;
remove(id: string): boolean;
replace(id: string | undefined, mount: OverlayBannerMount, priority?: number): string;
// Warning: (ae-unresolved-link) The @link reference could not be resolved: The package "kibana" does not have an export "OverlayBannerMount"
replace(id: string | undefined, mount: MountPoint, priority?: number): string;
}

// @public
export type OverlayBannerUnmount = () => void;

// @public
export interface OverlayRef {
close(): Promise<void>;
Expand All @@ -638,12 +636,12 @@ export interface OverlayStart {
// (undocumented)
banners: OverlayBannersStart;
// (undocumented)
openFlyout: (flyoutChildren: React.ReactNode, flyoutProps?: {
openFlyout: (flyoutChildren: MountPoint, flyoutProps?: {
closeButtonAriaLabel?: string;
'data-test-subj'?: string;
}) => OverlayRef;
// (undocumented)
openModal: (modalChildren: React.ReactNode, modalProps?: {
openModal: (modalChildren: MountPoint, modalProps?: {
className?: string;
closeButtonAriaLabel?: string;
'data-test-subj'?: string;
Expand Down Expand Up @@ -971,5 +969,8 @@ export interface UiSettingsState {
[key: string]: InjectedUiSettingsDefault & InjectedUiSettingsUser;
}

// @public
export type UnmountCallback = () => void;


```

0 comments on commit 7e03f01

Please sign in to comment.