Skip to content

Commit

Permalink
App Services: Remove remaining uiActions, expressions, data, embeddab…
Browse files Browse the repository at this point in the history
…le circular dependencies. (#82791)

* Move applyFilter, selectRange, valueClick triggers to data/embeddables.

* Update imports.

* Remove embeddable references to non-existent data plugin dependency.

* remove data mocks from embeddable

* Remove query, filters, timeRange from EmbeddableInput and move to apps.

* Remove data plugin imports from embeddable test samples.

* Remove circular dependencies caused by expressions renderer handlers.

* Update circular deps allowList.

* Remove data dependency on embeddable.

* Revert accidental data plugin change.

* Fix new circular deps issues.

* Update generated docs.

* Fix type errors in vis_type_xy

* Fix inspector data table.
  • Loading branch information
lukeelmers authored Dec 19, 2020
1 parent 7e9177d commit 9a3e291
Show file tree
Hide file tree
Showing 122 changed files with 437 additions and 581 deletions.
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-plugins-data-public](./kibana-plugin-plugins-data-public.md) &gt; [APPLY\_FILTER\_TRIGGER](./kibana-plugin-plugins-data-public.apply_filter_trigger.md)

## APPLY\_FILTER\_TRIGGER variable

<b>Signature:</b>

```typescript
APPLY_FILTER_TRIGGER = "FILTER_TRIGGER"
```
Original file line number Diff line number Diff line change
Expand Up @@ -7,5 +7,5 @@
<b>Signature:</b>

```typescript
embeddable?: IEmbeddable;
embeddable?: unknown;
```
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ export interface ApplyGlobalFilterActionContext

| Property | Type | Description |
| --- | --- | --- |
| [embeddable](./kibana-plugin-plugins-data-public.applyglobalfilteractioncontext.embeddable.md) | <code>IEmbeddable</code> | |
| [embeddable](./kibana-plugin-plugins-data-public.applyglobalfilteractioncontext.embeddable.md) | <code>unknown</code> | |
| [filters](./kibana-plugin-plugins-data-public.applyglobalfilteractioncontext.filters.md) | <code>Filter[]</code> | |
| [timeFieldName](./kibana-plugin-plugins-data-public.applyglobalfilteractioncontext.timefieldname.md) | <code>string</code> | |

Original file line number Diff line number Diff line change
Expand Up @@ -102,6 +102,7 @@
| [ACTION\_GLOBAL\_APPLY\_FILTER](./kibana-plugin-plugins-data-public.action_global_apply_filter.md) | |
| [AggGroupLabels](./kibana-plugin-plugins-data-public.agggrouplabels.md) | |
| [AggGroupNames](./kibana-plugin-plugins-data-public.agggroupnames.md) | |
| [APPLY\_FILTER\_TRIGGER](./kibana-plugin-plugins-data-public.apply_filter_trigger.md) | |
| [baseFormattersPublic](./kibana-plugin-plugins-data-public.baseformatterspublic.md) | |
| [castEsToKbnFieldTypeName](./kibana-plugin-plugins-data-public.castestokbnfieldtypename.md) | Get the KbnFieldType name for an esType string |
| [connectToQueryState](./kibana-plugin-plugins-data-public.connecttoquerystate.md) | Helper to setup two-way syncing of global data and a state container |
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ setup(core: CoreSetup<DataPluginStartDependencies, DataPluginStart>, { bfetch, e
__enhance: (enhancements: DataEnhancements) => void;
search: ISearchSetup;
fieldFormats: {
register: (customFieldFormat: import("../common").FieldFormatInstanceType) => number;
register: (customFieldFormat: import("../public").FieldFormatInstanceType) => number;
};
};
```
Expand All @@ -29,7 +29,7 @@ setup(core: CoreSetup<DataPluginStartDependencies, DataPluginStart>, { bfetch, e
__enhance: (enhancements: DataEnhancements) => void;
search: ISearchSetup;
fieldFormats: {
register: (customFieldFormat: import("../common").FieldFormatInstanceType) => number;
register: (customFieldFormat: import("../public").FieldFormatInstanceType) => number;
};
}`

Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ start(core: CoreStart): {
fieldFormatServiceFactory: (uiSettings: import("src/core/server").IUiSettingsClient) => Promise<import("../common").FieldFormatsRegistry>;
};
indexPatterns: {
indexPatternsServiceFactory: (savedObjectsClient: Pick<import("src/core/server").SavedObjectsClient, "update" | "find" | "get" | "delete" | "errors" | "create" | "bulkCreate" | "checkConflicts" | "bulkGet" | "addToNamespaces" | "deleteFromNamespaces" | "bulkUpdate" | "removeReferencesTo">, elasticsearchClient: import("src/core/server").ElasticsearchClient) => Promise<import("../common").IndexPatternsService>;
indexPatternsServiceFactory: (savedObjectsClient: Pick<import("src/core/server").SavedObjectsClient, "update" | "find" | "get" | "delete" | "errors" | "create" | "bulkCreate" | "checkConflicts" | "bulkGet" | "addToNamespaces" | "deleteFromNamespaces" | "bulkUpdate" | "removeReferencesTo">, elasticsearchClient: import("src/core/server").ElasticsearchClient) => Promise<import("../public").IndexPatternsService>;
};
search: ISearchStart<import("./search").IEsSearchRequest, import("./search").IEsSearchResponse<any>>;
};
Expand All @@ -31,7 +31,7 @@ start(core: CoreStart): {
fieldFormatServiceFactory: (uiSettings: import("src/core/server").IUiSettingsClient) => Promise<import("../common").FieldFormatsRegistry>;
};
indexPatterns: {
indexPatternsServiceFactory: (savedObjectsClient: Pick<import("src/core/server").SavedObjectsClient, "update" | "find" | "get" | "delete" | "errors" | "create" | "bulkCreate" | "checkConflicts" | "bulkGet" | "addToNamespaces" | "deleteFromNamespaces" | "bulkUpdate" | "removeReferencesTo">, elasticsearchClient: import("src/core/server").ElasticsearchClient) => Promise<import("../common").IndexPatternsService>;
indexPatternsServiceFactory: (savedObjectsClient: Pick<import("src/core/server").SavedObjectsClient, "update" | "find" | "get" | "delete" | "errors" | "create" | "bulkCreate" | "checkConflicts" | "bulkGet" | "addToNamespaces" | "deleteFromNamespaces" | "bulkUpdate" | "removeReferencesTo">, elasticsearchClient: import("src/core/server").ElasticsearchClient) => Promise<import("../public").IndexPatternsService>;
};
search: ISearchStart<import("./search").IEsSearchRequest, import("./search").IEsSearchResponse<any>>;
}`
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,5 +7,5 @@
<b>Signature:</b>

```typescript
embeddable: IEmbeddable;
embeddable: T;
```
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,12 @@
<b>Signature:</b>

```typescript
export interface EmbeddableContext
export interface EmbeddableContext<T extends IEmbeddable = IEmbeddable>
```

## Properties

| Property | Type | Description |
| --- | --- | --- |
| [embeddable](./kibana-plugin-plugins-embeddable-public.embeddablecontext.embeddable.md) | <code>IEmbeddable</code> | |
| [embeddable](./kibana-plugin-plugins-embeddable-public.embeddablecontext.embeddable.md) | <code>T</code> | |

Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,6 @@ export declare type EmbeddableInput = {
enhancements?: SerializableState;
disabledActions?: string[];
disableTriggers?: boolean;
timeRange?: TimeRange;
query?: Query;
filters?: Filter[];
searchSessionId?: string;
};
```

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,5 @@ export interface EmbeddableSetupDependencies

| Property | Type | Description |
| --- | --- | --- |
| [data](./kibana-plugin-plugins-embeddable-public.embeddablesetupdependencies.data.md) | <code>DataPublicPluginSetup</code> | |
| [uiActions](./kibana-plugin-plugins-embeddable-public.embeddablesetupdependencies.uiactions.md) | <code>UiActionsSetup</code> | |

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@ export interface EmbeddableStartDependencies

| Property | Type | Description |
| --- | --- | --- |
| [data](./kibana-plugin-plugins-embeddable-public.embeddablestartdependencies.data.md) | <code>DataPublicPluginStart</code> | |
| [inspector](./kibana-plugin-plugins-embeddable-public.embeddablestartdependencies.inspector.md) | <code>InspectorStart</code> | |
| [uiActions](./kibana-plugin-plugins-embeddable-public.embeddablestartdependencies.uiactions.md) | <code>UiActionsStart</code> | |

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

```typescript
isContextMenuTriggerContext: (context: unknown) => context is EmbeddableContext
isContextMenuTriggerContext: (context: unknown) => context is EmbeddableContext<IEmbeddable<import("..").EmbeddableInput, import("..").EmbeddableOutput>>
```
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,8 @@
| [PANEL\_NOTIFICATION\_TRIGGER](./kibana-plugin-plugins-embeddable-public.panel_notification_trigger.md) | |
| [panelBadgeTrigger](./kibana-plugin-plugins-embeddable-public.panelbadgetrigger.md) | |
| [panelNotificationTrigger](./kibana-plugin-plugins-embeddable-public.panelnotificationtrigger.md) | |
| [SELECT\_RANGE\_TRIGGER](./kibana-plugin-plugins-embeddable-public.select_range_trigger.md) | |
| [VALUE\_CLICK\_TRIGGER](./kibana-plugin-plugins-embeddable-public.value_click_trigger.md) | |
| [withEmbeddableSubscription](./kibana-plugin-plugins-embeddable-public.withembeddablesubscription.md) | |

## Type Aliases
Expand Down
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-plugins-embeddable-public](./kibana-plugin-plugins-embeddable-public.md) &gt; [SELECT\_RANGE\_TRIGGER](./kibana-plugin-plugins-embeddable-public.select_range_trigger.md)

## SELECT\_RANGE\_TRIGGER variable

<b>Signature:</b>

```typescript
SELECT_RANGE_TRIGGER = "SELECT_RANGE_TRIGGER"
```
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-plugins-embeddable-public](./kibana-plugin-plugins-embeddable-public.md) &gt; [VALUE\_CLICK\_TRIGGER](./kibana-plugin-plugins-embeddable-public.value_click_trigger.md)

## VALUE\_CLICK\_TRIGGER variable

<b>Signature:</b>

```typescript
VALUE_CLICK_TRIGGER = "VALUE_CLICK_TRIGGER"
```
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,6 @@ export interface IInterpreterRenderHandlers
| [hasCompatibleActions](./kibana-plugin-plugins-expressions-public.iinterpreterrenderhandlers.hascompatibleactions.md) | <code>(event: any) =&gt; Promise&lt;boolean&gt;</code> | |
| [onDestroy](./kibana-plugin-plugins-expressions-public.iinterpreterrenderhandlers.ondestroy.md) | <code>(fn: () =&gt; void) =&gt; void</code> | |
| [reload](./kibana-plugin-plugins-expressions-public.iinterpreterrenderhandlers.reload.md) | <code>() =&gt; void</code> | |
| [uiState](./kibana-plugin-plugins-expressions-public.iinterpreterrenderhandlers.uistate.md) | <code>PersistedState</code> | |
| [uiState](./kibana-plugin-plugins-expressions-public.iinterpreterrenderhandlers.uistate.md) | <code>unknown</code> | This uiState interface is actually <code>PersistedState</code> from the visualizations plugin, but expressions cannot know about vis or it creates a mess of circular dependencies. Downstream consumers of the uiState handler will need to cast for now. |
| [update](./kibana-plugin-plugins-expressions-public.iinterpreterrenderhandlers.update.md) | <code>(params: any) =&gt; void</code> | |

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

## IInterpreterRenderHandlers.uiState property

This uiState interface is actually `PersistedState` from the visualizations plugin, but expressions cannot know about vis or it creates a mess of circular dependencies. Downstream consumers of the uiState handler will need to cast for now.

<b>Signature:</b>

```typescript
uiState?: PersistedState;
uiState?: unknown;
```
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,6 @@ export interface IInterpreterRenderHandlers
| [hasCompatibleActions](./kibana-plugin-plugins-expressions-server.iinterpreterrenderhandlers.hascompatibleactions.md) | <code>(event: any) =&gt; Promise&lt;boolean&gt;</code> | |
| [onDestroy](./kibana-plugin-plugins-expressions-server.iinterpreterrenderhandlers.ondestroy.md) | <code>(fn: () =&gt; void) =&gt; void</code> | |
| [reload](./kibana-plugin-plugins-expressions-server.iinterpreterrenderhandlers.reload.md) | <code>() =&gt; void</code> | |
| [uiState](./kibana-plugin-plugins-expressions-server.iinterpreterrenderhandlers.uistate.md) | <code>PersistedState</code> | |
| [uiState](./kibana-plugin-plugins-expressions-server.iinterpreterrenderhandlers.uistate.md) | <code>unknown</code> | This uiState interface is actually <code>PersistedState</code> from the visualizations plugin, but expressions cannot know about vis or it creates a mess of circular dependencies. Downstream consumers of the uiState handler will need to cast for now. |
| [update](./kibana-plugin-plugins-expressions-server.iinterpreterrenderhandlers.update.md) | <code>(params: any) =&gt; void</code> | |

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

## IInterpreterRenderHandlers.uiState property

This uiState interface is actually `PersistedState` from the visualizations plugin, but expressions cannot know about vis or it creates a mess of circular dependencies. Downstream consumers of the uiState handler will need to cast for now.

<b>Signature:</b>

```typescript
uiState?: PersistedState;
uiState?: unknown;
```

This file was deleted.

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -41,14 +41,8 @@
| [ACTION\_VISUALIZE\_FIELD](./kibana-plugin-plugins-ui_actions-public.action_visualize_field.md) | |
| [ACTION\_VISUALIZE\_GEO\_FIELD](./kibana-plugin-plugins-ui_actions-public.action_visualize_geo_field.md) | |
| [ACTION\_VISUALIZE\_LENS\_FIELD](./kibana-plugin-plugins-ui_actions-public.action_visualize_lens_field.md) | |
| [APPLY\_FILTER\_TRIGGER](./kibana-plugin-plugins-ui_actions-public.apply_filter_trigger.md) | |
| [applyFilterTrigger](./kibana-plugin-plugins-ui_actions-public.applyfiltertrigger.md) | |
| [ROW\_CLICK\_TRIGGER](./kibana-plugin-plugins-ui_actions-public.row_click_trigger.md) | |
| [rowClickTrigger](./kibana-plugin-plugins-ui_actions-public.rowclicktrigger.md) | |
| [SELECT\_RANGE\_TRIGGER](./kibana-plugin-plugins-ui_actions-public.select_range_trigger.md) | |
| [selectRangeTrigger](./kibana-plugin-plugins-ui_actions-public.selectrangetrigger.md) | |
| [VALUE\_CLICK\_TRIGGER](./kibana-plugin-plugins-ui_actions-public.value_click_trigger.md) | |
| [valueClickTrigger](./kibana-plugin-plugins-ui_actions-public.valueclicktrigger.md) | |
| [VISUALIZE\_FIELD\_TRIGGER](./kibana-plugin-plugins-ui_actions-public.visualize_field_trigger.md) | |
| [VISUALIZE\_GEO\_FIELD\_TRIGGER](./kibana-plugin-plugins-ui_actions-public.visualize_geo_field_trigger.md) | |
| [visualizeFieldTrigger](./kibana-plugin-plugins-ui_actions-public.visualizefieldtrigger.md) | |
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,5 +7,5 @@
<b>Signature:</b>

```typescript
embeddable?: IEmbeddable;
embeddable?: unknown;
```
Original file line number Diff line number Diff line change
Expand Up @@ -15,5 +15,5 @@ export interface RowClickContext
| Property | Type | Description |
| --- | --- | --- |
| [data](./kibana-plugin-plugins-ui_actions-public.rowclickcontext.data.md) | <code>{</code><br/><code> rowIndex: number;</code><br/><code> table: Datatable;</code><br/><code> columns?: string[];</code><br/><code> }</code> | |
| [embeddable](./kibana-plugin-plugins-ui_actions-public.rowclickcontext.embeddable.md) | <code>IEmbeddable</code> | |
| [embeddable](./kibana-plugin-plugins-ui_actions-public.rowclickcontext.embeddable.md) | <code>unknown</code> | |

This file was deleted.

This file was deleted.

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

## Trigger.id property

Unique name of the trigger as identified in `ui_actions` plugin trigger registry, such as "SELECT\_RANGE\_TRIGGER" or "VALUE\_CLICK\_TRIGGER".
Unique name of the trigger as identified in `ui_actions` plugin trigger registry.

<b>Signature:</b>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,6 @@ export interface Trigger<ID extends TriggerId = TriggerId>
| Property | Type | Description |
| --- | --- | --- |
| [description](./kibana-plugin-plugins-ui_actions-public.trigger.description.md) | <code>string</code> | A longer user friendly description of the trigger. |
| [id](./kibana-plugin-plugins-ui_actions-public.trigger.id.md) | <code>ID</code> | Unique name of the trigger as identified in <code>ui_actions</code> plugin trigger registry, such as "SELECT\_RANGE\_TRIGGER" or "VALUE\_CLICK\_TRIGGER". |
| [id](./kibana-plugin-plugins-ui_actions-public.trigger.id.md) | <code>ID</code> | Unique name of the trigger as identified in <code>ui_actions</code> plugin trigger registry. |
| [title](./kibana-plugin-plugins-ui_actions-public.trigger.title.md) | <code>string</code> | User friendly name of the trigger. |

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,7 @@ export interface TriggerContextMapping
| Property | Type | Description |
| --- | --- | --- |
| [""](./kibana-plugin-plugins-ui_actions-public.triggercontextmapping.__.md) | <code>TriggerContext</code> | |
| [FILTER\_TRIGGER](./kibana-plugin-plugins-ui_actions-public.triggercontextmapping.filter_trigger.md) | <code>ApplyGlobalFilterActionContext</code> | |
| [ROW\_CLICK\_TRIGGER](./kibana-plugin-plugins-ui_actions-public.triggercontextmapping.row_click_trigger.md) | <code>RowClickContext</code> | |
| [SELECT\_RANGE\_TRIGGER](./kibana-plugin-plugins-ui_actions-public.triggercontextmapping.select_range_trigger.md) | <code>RangeSelectContext</code> | |
| [VALUE\_CLICK\_TRIGGER](./kibana-plugin-plugins-ui_actions-public.triggercontextmapping.value_click_trigger.md) | <code>ValueClickContext</code> | |
| [VISUALIZE\_FIELD\_TRIGGER](./kibana-plugin-plugins-ui_actions-public.triggercontextmapping.visualize_field_trigger.md) | <code>VisualizeFieldContext</code> | |
| [VISUALIZE\_GEO\_FIELD\_TRIGGER](./kibana-plugin-plugins-ui_actions-public.triggercontextmapping.visualize_geo_field_trigger.md) | <code>VisualizeFieldContext</code> | |

This file was deleted.

Loading

0 comments on commit 9a3e291

Please sign in to comment.