App Services: Remove remaining uiActions, expressions, data, embeddable circular dependencies. (#82791) (#86608)

* 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.
This commit is contained in:
Luke Elmers 2020-12-20 15:53:54 -07:00 committed by GitHub
parent 4737c73abb
commit 620f5326ca
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
122 changed files with 438 additions and 582 deletions

View file

@ -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"
```

View file

@ -7,5 +7,5 @@
<b>Signature:</b>
```typescript
embeddable?: IEmbeddable;
embeddable?: unknown;
```

View file

@ -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> | |

View file

@ -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 |

View file

@ -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;
};
};
```
@ -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;
};
}`

View file

@ -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>>;
};
@ -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>>;
}`

View file

@ -7,5 +7,5 @@
<b>Signature:</b>
```typescript
embeddable: IEmbeddable;
embeddable: T;
```

View file

@ -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> | |

View file

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

View file

@ -1,11 +0,0 @@
<!-- 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; [EmbeddableSetupDependencies](./kibana-plugin-plugins-embeddable-public.embeddablesetupdependencies.md) &gt; [data](./kibana-plugin-plugins-embeddable-public.embeddablesetupdependencies.data.md)
## EmbeddableSetupDependencies.data property
<b>Signature:</b>
```typescript
data: DataPublicPluginSetup;
```

View file

@ -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> | |

View file

@ -1,11 +0,0 @@
<!-- 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; [EmbeddableStartDependencies](./kibana-plugin-plugins-embeddable-public.embeddablestartdependencies.md) &gt; [data](./kibana-plugin-plugins-embeddable-public.embeddablestartdependencies.data.md)
## EmbeddableStartDependencies.data property
<b>Signature:</b>
```typescript
data: DataPublicPluginStart;
```

View file

@ -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> | |

View file

@ -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>>
```

View file

@ -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

View file

@ -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"
```

View file

@ -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"
```

View file

@ -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> | |

View file

@ -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;
```

View file

@ -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> | |

View file

@ -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;
```

View file

@ -1,11 +0,0 @@
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
[Home](./index.md) &gt; [kibana-plugin-plugins-ui\_actions-public](./kibana-plugin-plugins-ui_actions-public.md) &gt; [APPLY\_FILTER\_TRIGGER](./kibana-plugin-plugins-ui_actions-public.apply_filter_trigger.md)
## APPLY\_FILTER\_TRIGGER variable
<b>Signature:</b>
```typescript
APPLY_FILTER_TRIGGER = "FILTER_TRIGGER"
```

View file

@ -1,11 +0,0 @@
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
[Home](./index.md) &gt; [kibana-plugin-plugins-ui\_actions-public](./kibana-plugin-plugins-ui_actions-public.md) &gt; [applyFilterTrigger](./kibana-plugin-plugins-ui_actions-public.applyfiltertrigger.md)
## applyFilterTrigger variable
<b>Signature:</b>
```typescript
applyFilterTrigger: Trigger<'FILTER_TRIGGER'>
```

View file

@ -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) | |

View file

@ -7,5 +7,5 @@
<b>Signature:</b>
```typescript
embeddable?: IEmbeddable;
embeddable?: unknown;
```

View file

@ -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> | |

View file

@ -1,11 +0,0 @@
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
[Home](./index.md) &gt; [kibana-plugin-plugins-ui\_actions-public](./kibana-plugin-plugins-ui_actions-public.md) &gt; [SELECT\_RANGE\_TRIGGER](./kibana-plugin-plugins-ui_actions-public.select_range_trigger.md)
## SELECT\_RANGE\_TRIGGER variable
<b>Signature:</b>
```typescript
SELECT_RANGE_TRIGGER = "SELECT_RANGE_TRIGGER"
```

View file

@ -1,11 +0,0 @@
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
[Home](./index.md) &gt; [kibana-plugin-plugins-ui\_actions-public](./kibana-plugin-plugins-ui_actions-public.md) &gt; [selectRangeTrigger](./kibana-plugin-plugins-ui_actions-public.selectrangetrigger.md)
## selectRangeTrigger variable
<b>Signature:</b>
```typescript
selectRangeTrigger: Trigger<'SELECT_RANGE_TRIGGER'>
```

View file

@ -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>

View file

@ -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. |

View file

@ -1,11 +0,0 @@
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
[Home](./index.md) &gt; [kibana-plugin-plugins-ui\_actions-public](./kibana-plugin-plugins-ui_actions-public.md) &gt; [TriggerContextMapping](./kibana-plugin-plugins-ui_actions-public.triggercontextmapping.md) &gt; [FILTER\_TRIGGER](./kibana-plugin-plugins-ui_actions-public.triggercontextmapping.filter_trigger.md)
## TriggerContextMapping.FILTER\_TRIGGER property
<b>Signature:</b>
```typescript
[APPLY_FILTER_TRIGGER]: ApplyGlobalFilterActionContext;
```

View file

@ -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> | |

View file

@ -1,11 +0,0 @@
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
[Home](./index.md) &gt; [kibana-plugin-plugins-ui\_actions-public](./kibana-plugin-plugins-ui_actions-public.md) &gt; [TriggerContextMapping](./kibana-plugin-plugins-ui_actions-public.triggercontextmapping.md) &gt; [SELECT\_RANGE\_TRIGGER](./kibana-plugin-plugins-ui_actions-public.triggercontextmapping.select_range_trigger.md)
## TriggerContextMapping.SELECT\_RANGE\_TRIGGER property
<b>Signature:</b>
```typescript
[SELECT_RANGE_TRIGGER]: RangeSelectContext;
```

View file

@ -1,11 +0,0 @@
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
[Home](./index.md) &gt; [kibana-plugin-plugins-ui\_actions-public](./kibana-plugin-plugins-ui_actions-public.md) &gt; [TriggerContextMapping](./kibana-plugin-plugins-ui_actions-public.triggercontextmapping.md) &gt; [VALUE\_CLICK\_TRIGGER](./kibana-plugin-plugins-ui_actions-public.triggercontextmapping.value_click_trigger.md)
## TriggerContextMapping.VALUE\_CLICK\_TRIGGER property
<b>Signature:</b>
```typescript
[VALUE_CLICK_TRIGGER]: ValueClickContext;
```

View file

@ -11,5 +11,5 @@
<b>Signature:</b>
```typescript
readonly addTriggerAction: <T extends "" | "SELECT_RANGE_TRIGGER" | "VALUE_CLICK_TRIGGER" | "ROW_CLICK_TRIGGER" | "FILTER_TRIGGER" | "VISUALIZE_FIELD_TRIGGER" | "VISUALIZE_GEO_FIELD_TRIGGER" | "CONTEXT_MENU_TRIGGER" | "PANEL_BADGE_TRIGGER" | "PANEL_NOTIFICATION_TRIGGER">(triggerId: T, action: ActionDefinition<TriggerContextMapping[T]> | Action<TriggerContextMapping[T], "" | "ACTION_VISUALIZE_FIELD" | "ACTION_VISUALIZE_GEO_FIELD" | "ACTION_VISUALIZE_LENS_FIELD" | "ACTION_GLOBAL_APPLY_FILTER" | "ACTION_SELECT_RANGE" | "ACTION_VALUE_CLICK" | "ACTION_CUSTOMIZE_PANEL" | "ACTION_ADD_PANEL" | "openInspector" | "deletePanel" | "editPanel" | "togglePanel" | "replacePanel" | "clonePanel" | "addToFromLibrary" | "unlinkFromLibrary" | "ACTION_LIBRARY_NOTIFICATION" | "ACTION_EXPORT_CSV">) => void;
readonly addTriggerAction: <T extends "" | "ROW_CLICK_TRIGGER" | "VISUALIZE_FIELD_TRIGGER" | "VISUALIZE_GEO_FIELD_TRIGGER" | "FILTER_TRIGGER" | "CONTEXT_MENU_TRIGGER" | "PANEL_BADGE_TRIGGER" | "PANEL_NOTIFICATION_TRIGGER" | "SELECT_RANGE_TRIGGER" | "VALUE_CLICK_TRIGGER">(triggerId: T, action: ActionDefinition<TriggerContextMapping[T]> | Action<TriggerContextMapping[T], "" | "ACTION_VISUALIZE_FIELD" | "ACTION_VISUALIZE_GEO_FIELD" | "ACTION_VISUALIZE_LENS_FIELD" | "ACTION_GLOBAL_APPLY_FILTER" | "ACTION_SELECT_RANGE" | "ACTION_VALUE_CLICK" | "ACTION_CUSTOMIZE_PANEL" | "ACTION_ADD_PANEL" | "openInspector" | "deletePanel" | "editPanel">) => void;
```

View file

@ -7,5 +7,5 @@
<b>Signature:</b>
```typescript
readonly attachAction: <T extends "" | "SELECT_RANGE_TRIGGER" | "VALUE_CLICK_TRIGGER" | "ROW_CLICK_TRIGGER" | "FILTER_TRIGGER" | "VISUALIZE_FIELD_TRIGGER" | "VISUALIZE_GEO_FIELD_TRIGGER" | "CONTEXT_MENU_TRIGGER" | "PANEL_BADGE_TRIGGER" | "PANEL_NOTIFICATION_TRIGGER">(triggerId: T, actionId: string) => void;
readonly attachAction: <T extends "" | "ROW_CLICK_TRIGGER" | "VISUALIZE_FIELD_TRIGGER" | "VISUALIZE_GEO_FIELD_TRIGGER" | "FILTER_TRIGGER" | "CONTEXT_MENU_TRIGGER" | "PANEL_BADGE_TRIGGER" | "PANEL_NOTIFICATION_TRIGGER" | "SELECT_RANGE_TRIGGER" | "VALUE_CLICK_TRIGGER">(triggerId: T, actionId: string) => void;
```

View file

@ -12,5 +12,5 @@
<b>Signature:</b>
```typescript
readonly executeTriggerActions: <T extends "" | "SELECT_RANGE_TRIGGER" | "VALUE_CLICK_TRIGGER" | "ROW_CLICK_TRIGGER" | "FILTER_TRIGGER" | "VISUALIZE_FIELD_TRIGGER" | "VISUALIZE_GEO_FIELD_TRIGGER" | "CONTEXT_MENU_TRIGGER" | "PANEL_BADGE_TRIGGER" | "PANEL_NOTIFICATION_TRIGGER">(triggerId: T, context: TriggerContext<T>) => Promise<void>;
readonly executeTriggerActions: <T extends "" | "ROW_CLICK_TRIGGER" | "VISUALIZE_FIELD_TRIGGER" | "VISUALIZE_GEO_FIELD_TRIGGER" | "FILTER_TRIGGER" | "CONTEXT_MENU_TRIGGER" | "PANEL_BADGE_TRIGGER" | "PANEL_NOTIFICATION_TRIGGER" | "SELECT_RANGE_TRIGGER" | "VALUE_CLICK_TRIGGER">(triggerId: T, context: TriggerContext<T>) => Promise<void>;
```

View file

@ -7,5 +7,5 @@
<b>Signature:</b>
```typescript
readonly getAction: <T extends ActionDefinition<{}>>(id: string) => Action<ActionContext<T>, "" | "ACTION_VISUALIZE_FIELD" | "ACTION_VISUALIZE_GEO_FIELD" | "ACTION_VISUALIZE_LENS_FIELD" | "ACTION_GLOBAL_APPLY_FILTER" | "ACTION_SELECT_RANGE" | "ACTION_VALUE_CLICK" | "ACTION_CUSTOMIZE_PANEL" | "ACTION_ADD_PANEL" | "openInspector" | "deletePanel" | "editPanel" | "togglePanel" | "replacePanel" | "clonePanel" | "addToFromLibrary" | "unlinkFromLibrary" | "ACTION_LIBRARY_NOTIFICATION" | "ACTION_EXPORT_CSV">;
readonly getAction: <T extends ActionDefinition<{}>>(id: string) => Action<ActionContext<T>, "" | "ACTION_VISUALIZE_FIELD" | "ACTION_VISUALIZE_GEO_FIELD" | "ACTION_VISUALIZE_LENS_FIELD" | "ACTION_GLOBAL_APPLY_FILTER" | "ACTION_SELECT_RANGE" | "ACTION_VALUE_CLICK" | "ACTION_CUSTOMIZE_PANEL" | "ACTION_ADD_PANEL" | "openInspector" | "deletePanel" | "editPanel">;
```

View file

@ -7,5 +7,5 @@
<b>Signature:</b>
```typescript
readonly getTrigger: <T extends "" | "SELECT_RANGE_TRIGGER" | "VALUE_CLICK_TRIGGER" | "ROW_CLICK_TRIGGER" | "FILTER_TRIGGER" | "VISUALIZE_FIELD_TRIGGER" | "VISUALIZE_GEO_FIELD_TRIGGER" | "CONTEXT_MENU_TRIGGER" | "PANEL_BADGE_TRIGGER" | "PANEL_NOTIFICATION_TRIGGER">(triggerId: T) => TriggerContract<T>;
readonly getTrigger: <T extends "" | "ROW_CLICK_TRIGGER" | "VISUALIZE_FIELD_TRIGGER" | "VISUALIZE_GEO_FIELD_TRIGGER" | "FILTER_TRIGGER" | "CONTEXT_MENU_TRIGGER" | "PANEL_BADGE_TRIGGER" | "PANEL_NOTIFICATION_TRIGGER" | "SELECT_RANGE_TRIGGER" | "VALUE_CLICK_TRIGGER">(triggerId: T) => TriggerContract<T>;
```

View file

@ -7,5 +7,5 @@
<b>Signature:</b>
```typescript
readonly getTriggerActions: <T extends "" | "SELECT_RANGE_TRIGGER" | "VALUE_CLICK_TRIGGER" | "ROW_CLICK_TRIGGER" | "FILTER_TRIGGER" | "VISUALIZE_FIELD_TRIGGER" | "VISUALIZE_GEO_FIELD_TRIGGER" | "CONTEXT_MENU_TRIGGER" | "PANEL_BADGE_TRIGGER" | "PANEL_NOTIFICATION_TRIGGER">(triggerId: T) => Action<TriggerContextMapping[T], "" | "ACTION_VISUALIZE_FIELD" | "ACTION_VISUALIZE_GEO_FIELD" | "ACTION_VISUALIZE_LENS_FIELD" | "ACTION_GLOBAL_APPLY_FILTER" | "ACTION_SELECT_RANGE" | "ACTION_VALUE_CLICK" | "ACTION_CUSTOMIZE_PANEL" | "ACTION_ADD_PANEL" | "openInspector" | "deletePanel" | "editPanel" | "togglePanel" | "replacePanel" | "clonePanel" | "addToFromLibrary" | "unlinkFromLibrary" | "ACTION_LIBRARY_NOTIFICATION" | "ACTION_EXPORT_CSV">[];
readonly getTriggerActions: <T extends "" | "ROW_CLICK_TRIGGER" | "VISUALIZE_FIELD_TRIGGER" | "VISUALIZE_GEO_FIELD_TRIGGER" | "FILTER_TRIGGER" | "CONTEXT_MENU_TRIGGER" | "PANEL_BADGE_TRIGGER" | "PANEL_NOTIFICATION_TRIGGER" | "SELECT_RANGE_TRIGGER" | "VALUE_CLICK_TRIGGER">(triggerId: T) => Action<TriggerContextMapping[T], "" | "ACTION_VISUALIZE_FIELD" | "ACTION_VISUALIZE_GEO_FIELD" | "ACTION_VISUALIZE_LENS_FIELD" | "ACTION_GLOBAL_APPLY_FILTER" | "ACTION_SELECT_RANGE" | "ACTION_VALUE_CLICK" | "ACTION_CUSTOMIZE_PANEL" | "ACTION_ADD_PANEL" | "openInspector" | "deletePanel" | "editPanel">[];
```

View file

@ -7,5 +7,5 @@
<b>Signature:</b>
```typescript
readonly getTriggerCompatibleActions: <T extends "" | "SELECT_RANGE_TRIGGER" | "VALUE_CLICK_TRIGGER" | "ROW_CLICK_TRIGGER" | "FILTER_TRIGGER" | "VISUALIZE_FIELD_TRIGGER" | "VISUALIZE_GEO_FIELD_TRIGGER" | "CONTEXT_MENU_TRIGGER" | "PANEL_BADGE_TRIGGER" | "PANEL_NOTIFICATION_TRIGGER">(triggerId: T, context: TriggerContextMapping[T]) => Promise<Action<TriggerContextMapping[T], "" | "ACTION_VISUALIZE_FIELD" | "ACTION_VISUALIZE_GEO_FIELD" | "ACTION_VISUALIZE_LENS_FIELD" | "ACTION_GLOBAL_APPLY_FILTER" | "ACTION_SELECT_RANGE" | "ACTION_VALUE_CLICK" | "ACTION_CUSTOMIZE_PANEL" | "ACTION_ADD_PANEL" | "openInspector" | "deletePanel" | "editPanel" | "togglePanel" | "replacePanel" | "clonePanel" | "addToFromLibrary" | "unlinkFromLibrary" | "ACTION_LIBRARY_NOTIFICATION" | "ACTION_EXPORT_CSV">[]>;
readonly getTriggerCompatibleActions: <T extends "" | "ROW_CLICK_TRIGGER" | "VISUALIZE_FIELD_TRIGGER" | "VISUALIZE_GEO_FIELD_TRIGGER" | "FILTER_TRIGGER" | "CONTEXT_MENU_TRIGGER" | "PANEL_BADGE_TRIGGER" | "PANEL_NOTIFICATION_TRIGGER" | "SELECT_RANGE_TRIGGER" | "VALUE_CLICK_TRIGGER">(triggerId: T, context: TriggerContextMapping[T]) => Promise<Action<TriggerContextMapping[T], "" | "ACTION_VISUALIZE_FIELD" | "ACTION_VISUALIZE_GEO_FIELD" | "ACTION_VISUALIZE_LENS_FIELD" | "ACTION_GLOBAL_APPLY_FILTER" | "ACTION_SELECT_RANGE" | "ACTION_VALUE_CLICK" | "ACTION_CUSTOMIZE_PANEL" | "ACTION_ADD_PANEL" | "openInspector" | "deletePanel" | "editPanel">[]>;
```

View file

@ -21,19 +21,19 @@ export declare class UiActionsService
| Property | Modifiers | Type | Description |
| --- | --- | --- | --- |
| [actions](./kibana-plugin-plugins-ui_actions-public.uiactionsservice.actions.md) | | <code>ActionRegistry</code> | |
| [addTriggerAction](./kibana-plugin-plugins-ui_actions-public.uiactionsservice.addtriggeraction.md) | | <code>&lt;T extends &quot;&quot; &#124; &quot;SELECT_RANGE_TRIGGER&quot; &#124; &quot;VALUE_CLICK_TRIGGER&quot; &#124; &quot;ROW_CLICK_TRIGGER&quot; &#124; &quot;FILTER_TRIGGER&quot; &#124; &quot;VISUALIZE_FIELD_TRIGGER&quot; &#124; &quot;VISUALIZE_GEO_FIELD_TRIGGER&quot; &#124; &quot;CONTEXT_MENU_TRIGGER&quot; &#124; &quot;PANEL_BADGE_TRIGGER&quot; &#124; &quot;PANEL_NOTIFICATION_TRIGGER&quot;&gt;(triggerId: T, action: ActionDefinition&lt;TriggerContextMapping[T]&gt; &#124; Action&lt;TriggerContextMapping[T], &quot;&quot; &#124; &quot;ACTION_VISUALIZE_FIELD&quot; &#124; &quot;ACTION_VISUALIZE_GEO_FIELD&quot; &#124; &quot;ACTION_VISUALIZE_LENS_FIELD&quot; &#124; &quot;ACTION_GLOBAL_APPLY_FILTER&quot; &#124; &quot;ACTION_SELECT_RANGE&quot; &#124; &quot;ACTION_VALUE_CLICK&quot; &#124; &quot;ACTION_CUSTOMIZE_PANEL&quot; &#124; &quot;ACTION_ADD_PANEL&quot; &#124; &quot;openInspector&quot; &#124; &quot;deletePanel&quot; &#124; &quot;editPanel&quot; &#124; &quot;togglePanel&quot; &#124; &quot;replacePanel&quot; &#124; &quot;clonePanel&quot; &#124; &quot;addToFromLibrary&quot; &#124; &quot;unlinkFromLibrary&quot; &#124; &quot;ACTION_LIBRARY_NOTIFICATION&quot; &#124; &quot;ACTION_EXPORT_CSV&quot;&gt;) =&gt; void</code> | <code>addTriggerAction</code> is similar to <code>attachAction</code> as it attaches action to a trigger, but it also registers the action, if it has not been registered, yet.<code>addTriggerAction</code> also infers better typing of the <code>action</code> argument. |
| [attachAction](./kibana-plugin-plugins-ui_actions-public.uiactionsservice.attachaction.md) | | <code>&lt;T extends &quot;&quot; &#124; &quot;SELECT_RANGE_TRIGGER&quot; &#124; &quot;VALUE_CLICK_TRIGGER&quot; &#124; &quot;ROW_CLICK_TRIGGER&quot; &#124; &quot;FILTER_TRIGGER&quot; &#124; &quot;VISUALIZE_FIELD_TRIGGER&quot; &#124; &quot;VISUALIZE_GEO_FIELD_TRIGGER&quot; &#124; &quot;CONTEXT_MENU_TRIGGER&quot; &#124; &quot;PANEL_BADGE_TRIGGER&quot; &#124; &quot;PANEL_NOTIFICATION_TRIGGER&quot;&gt;(triggerId: T, actionId: string) =&gt; void</code> | |
| [addTriggerAction](./kibana-plugin-plugins-ui_actions-public.uiactionsservice.addtriggeraction.md) | | <code>&lt;T extends &quot;&quot; &#124; &quot;ROW_CLICK_TRIGGER&quot; &#124; &quot;VISUALIZE_FIELD_TRIGGER&quot; &#124; &quot;VISUALIZE_GEO_FIELD_TRIGGER&quot; &#124; &quot;FILTER_TRIGGER&quot; &#124; &quot;CONTEXT_MENU_TRIGGER&quot; &#124; &quot;PANEL_BADGE_TRIGGER&quot; &#124; &quot;PANEL_NOTIFICATION_TRIGGER&quot; &#124; &quot;SELECT_RANGE_TRIGGER&quot; &#124; &quot;VALUE_CLICK_TRIGGER&quot;&gt;(triggerId: T, action: ActionDefinition&lt;TriggerContextMapping[T]&gt; &#124; Action&lt;TriggerContextMapping[T], &quot;&quot; &#124; &quot;ACTION_VISUALIZE_FIELD&quot; &#124; &quot;ACTION_VISUALIZE_GEO_FIELD&quot; &#124; &quot;ACTION_VISUALIZE_LENS_FIELD&quot; &#124; &quot;ACTION_GLOBAL_APPLY_FILTER&quot; &#124; &quot;ACTION_SELECT_RANGE&quot; &#124; &quot;ACTION_VALUE_CLICK&quot; &#124; &quot;ACTION_CUSTOMIZE_PANEL&quot; &#124; &quot;ACTION_ADD_PANEL&quot; &#124; &quot;openInspector&quot; &#124; &quot;deletePanel&quot; &#124; &quot;editPanel&quot;&gt;) =&gt; void</code> | <code>addTriggerAction</code> is similar to <code>attachAction</code> as it attaches action to a trigger, but it also registers the action, if it has not been registered, yet.<code>addTriggerAction</code> also infers better typing of the <code>action</code> argument. |
| [attachAction](./kibana-plugin-plugins-ui_actions-public.uiactionsservice.attachaction.md) | | <code>&lt;T extends &quot;&quot; &#124; &quot;ROW_CLICK_TRIGGER&quot; &#124; &quot;VISUALIZE_FIELD_TRIGGER&quot; &#124; &quot;VISUALIZE_GEO_FIELD_TRIGGER&quot; &#124; &quot;FILTER_TRIGGER&quot; &#124; &quot;CONTEXT_MENU_TRIGGER&quot; &#124; &quot;PANEL_BADGE_TRIGGER&quot; &#124; &quot;PANEL_NOTIFICATION_TRIGGER&quot; &#124; &quot;SELECT_RANGE_TRIGGER&quot; &#124; &quot;VALUE_CLICK_TRIGGER&quot;&gt;(triggerId: T, actionId: string) =&gt; void</code> | |
| [clear](./kibana-plugin-plugins-ui_actions-public.uiactionsservice.clear.md) | | <code>() =&gt; void</code> | Removes all registered triggers and actions. |
| [detachAction](./kibana-plugin-plugins-ui_actions-public.uiactionsservice.detachaction.md) | | <code>(triggerId: TriggerId, actionId: string) =&gt; void</code> | |
| [executeTriggerActions](./kibana-plugin-plugins-ui_actions-public.uiactionsservice.executetriggeractions.md) | | <code>&lt;T extends &quot;&quot; &#124; &quot;SELECT_RANGE_TRIGGER&quot; &#124; &quot;VALUE_CLICK_TRIGGER&quot; &#124; &quot;ROW_CLICK_TRIGGER&quot; &#124; &quot;FILTER_TRIGGER&quot; &#124; &quot;VISUALIZE_FIELD_TRIGGER&quot; &#124; &quot;VISUALIZE_GEO_FIELD_TRIGGER&quot; &#124; &quot;CONTEXT_MENU_TRIGGER&quot; &#124; &quot;PANEL_BADGE_TRIGGER&quot; &#124; &quot;PANEL_NOTIFICATION_TRIGGER&quot;&gt;(triggerId: T, context: TriggerContext&lt;T&gt;) =&gt; Promise&lt;void&gt;</code> | |
| [executeTriggerActions](./kibana-plugin-plugins-ui_actions-public.uiactionsservice.executetriggeractions.md) | | <code>&lt;T extends &quot;&quot; &#124; &quot;ROW_CLICK_TRIGGER&quot; &#124; &quot;VISUALIZE_FIELD_TRIGGER&quot; &#124; &quot;VISUALIZE_GEO_FIELD_TRIGGER&quot; &#124; &quot;FILTER_TRIGGER&quot; &#124; &quot;CONTEXT_MENU_TRIGGER&quot; &#124; &quot;PANEL_BADGE_TRIGGER&quot; &#124; &quot;PANEL_NOTIFICATION_TRIGGER&quot; &#124; &quot;SELECT_RANGE_TRIGGER&quot; &#124; &quot;VALUE_CLICK_TRIGGER&quot;&gt;(triggerId: T, context: TriggerContext&lt;T&gt;) =&gt; Promise&lt;void&gt;</code> | |
| [executionService](./kibana-plugin-plugins-ui_actions-public.uiactionsservice.executionservice.md) | | <code>UiActionsExecutionService</code> | |
| [fork](./kibana-plugin-plugins-ui_actions-public.uiactionsservice.fork.md) | | <code>() =&gt; UiActionsService</code> | "Fork" a separate instance of <code>UiActionsService</code> that inherits all existing triggers and actions, but going forward all new triggers and actions added to this instance of <code>UiActionsService</code> are only available within this instance. |
| [getAction](./kibana-plugin-plugins-ui_actions-public.uiactionsservice.getaction.md) | | <code>&lt;T extends ActionDefinition&lt;{}&gt;&gt;(id: string) =&gt; Action&lt;ActionContext&lt;T&gt;, &quot;&quot; &#124; &quot;ACTION_VISUALIZE_FIELD&quot; &#124; &quot;ACTION_VISUALIZE_GEO_FIELD&quot; &#124; &quot;ACTION_VISUALIZE_LENS_FIELD&quot; &#124; &quot;ACTION_GLOBAL_APPLY_FILTER&quot; &#124; &quot;ACTION_SELECT_RANGE&quot; &#124; &quot;ACTION_VALUE_CLICK&quot; &#124; &quot;ACTION_CUSTOMIZE_PANEL&quot; &#124; &quot;ACTION_ADD_PANEL&quot; &#124; &quot;openInspector&quot; &#124; &quot;deletePanel&quot; &#124; &quot;editPanel&quot; &#124; &quot;togglePanel&quot; &#124; &quot;replacePanel&quot; &#124; &quot;clonePanel&quot; &#124; &quot;addToFromLibrary&quot; &#124; &quot;unlinkFromLibrary&quot; &#124; &quot;ACTION_LIBRARY_NOTIFICATION&quot; &#124; &quot;ACTION_EXPORT_CSV&quot;&gt;</code> | |
| [getTrigger](./kibana-plugin-plugins-ui_actions-public.uiactionsservice.gettrigger.md) | | <code>&lt;T extends &quot;&quot; &#124; &quot;SELECT_RANGE_TRIGGER&quot; &#124; &quot;VALUE_CLICK_TRIGGER&quot; &#124; &quot;ROW_CLICK_TRIGGER&quot; &#124; &quot;FILTER_TRIGGER&quot; &#124; &quot;VISUALIZE_FIELD_TRIGGER&quot; &#124; &quot;VISUALIZE_GEO_FIELD_TRIGGER&quot; &#124; &quot;CONTEXT_MENU_TRIGGER&quot; &#124; &quot;PANEL_BADGE_TRIGGER&quot; &#124; &quot;PANEL_NOTIFICATION_TRIGGER&quot;&gt;(triggerId: T) =&gt; TriggerContract&lt;T&gt;</code> | |
| [getTriggerActions](./kibana-plugin-plugins-ui_actions-public.uiactionsservice.gettriggeractions.md) | | <code>&lt;T extends &quot;&quot; &#124; &quot;SELECT_RANGE_TRIGGER&quot; &#124; &quot;VALUE_CLICK_TRIGGER&quot; &#124; &quot;ROW_CLICK_TRIGGER&quot; &#124; &quot;FILTER_TRIGGER&quot; &#124; &quot;VISUALIZE_FIELD_TRIGGER&quot; &#124; &quot;VISUALIZE_GEO_FIELD_TRIGGER&quot; &#124; &quot;CONTEXT_MENU_TRIGGER&quot; &#124; &quot;PANEL_BADGE_TRIGGER&quot; &#124; &quot;PANEL_NOTIFICATION_TRIGGER&quot;&gt;(triggerId: T) =&gt; Action&lt;TriggerContextMapping[T], &quot;&quot; &#124; &quot;ACTION_VISUALIZE_FIELD&quot; &#124; &quot;ACTION_VISUALIZE_GEO_FIELD&quot; &#124; &quot;ACTION_VISUALIZE_LENS_FIELD&quot; &#124; &quot;ACTION_GLOBAL_APPLY_FILTER&quot; &#124; &quot;ACTION_SELECT_RANGE&quot; &#124; &quot;ACTION_VALUE_CLICK&quot; &#124; &quot;ACTION_CUSTOMIZE_PANEL&quot; &#124; &quot;ACTION_ADD_PANEL&quot; &#124; &quot;openInspector&quot; &#124; &quot;deletePanel&quot; &#124; &quot;editPanel&quot; &#124; &quot;togglePanel&quot; &#124; &quot;replacePanel&quot; &#124; &quot;clonePanel&quot; &#124; &quot;addToFromLibrary&quot; &#124; &quot;unlinkFromLibrary&quot; &#124; &quot;ACTION_LIBRARY_NOTIFICATION&quot; &#124; &quot;ACTION_EXPORT_CSV&quot;&gt;[]</code> | |
| [getTriggerCompatibleActions](./kibana-plugin-plugins-ui_actions-public.uiactionsservice.gettriggercompatibleactions.md) | | <code>&lt;T extends &quot;&quot; &#124; &quot;SELECT_RANGE_TRIGGER&quot; &#124; &quot;VALUE_CLICK_TRIGGER&quot; &#124; &quot;ROW_CLICK_TRIGGER&quot; &#124; &quot;FILTER_TRIGGER&quot; &#124; &quot;VISUALIZE_FIELD_TRIGGER&quot; &#124; &quot;VISUALIZE_GEO_FIELD_TRIGGER&quot; &#124; &quot;CONTEXT_MENU_TRIGGER&quot; &#124; &quot;PANEL_BADGE_TRIGGER&quot; &#124; &quot;PANEL_NOTIFICATION_TRIGGER&quot;&gt;(triggerId: T, context: TriggerContextMapping[T]) =&gt; Promise&lt;Action&lt;TriggerContextMapping[T], &quot;&quot; &#124; &quot;ACTION_VISUALIZE_FIELD&quot; &#124; &quot;ACTION_VISUALIZE_GEO_FIELD&quot; &#124; &quot;ACTION_VISUALIZE_LENS_FIELD&quot; &#124; &quot;ACTION_GLOBAL_APPLY_FILTER&quot; &#124; &quot;ACTION_SELECT_RANGE&quot; &#124; &quot;ACTION_VALUE_CLICK&quot; &#124; &quot;ACTION_CUSTOMIZE_PANEL&quot; &#124; &quot;ACTION_ADD_PANEL&quot; &#124; &quot;openInspector&quot; &#124; &quot;deletePanel&quot; &#124; &quot;editPanel&quot; &#124; &quot;togglePanel&quot; &#124; &quot;replacePanel&quot; &#124; &quot;clonePanel&quot; &#124; &quot;addToFromLibrary&quot; &#124; &quot;unlinkFromLibrary&quot; &#124; &quot;ACTION_LIBRARY_NOTIFICATION&quot; &#124; &quot;ACTION_EXPORT_CSV&quot;&gt;[]&gt;</code> | |
| [getAction](./kibana-plugin-plugins-ui_actions-public.uiactionsservice.getaction.md) | | <code>&lt;T extends ActionDefinition&lt;{}&gt;&gt;(id: string) =&gt; Action&lt;ActionContext&lt;T&gt;, &quot;&quot; &#124; &quot;ACTION_VISUALIZE_FIELD&quot; &#124; &quot;ACTION_VISUALIZE_GEO_FIELD&quot; &#124; &quot;ACTION_VISUALIZE_LENS_FIELD&quot; &#124; &quot;ACTION_GLOBAL_APPLY_FILTER&quot; &#124; &quot;ACTION_SELECT_RANGE&quot; &#124; &quot;ACTION_VALUE_CLICK&quot; &#124; &quot;ACTION_CUSTOMIZE_PANEL&quot; &#124; &quot;ACTION_ADD_PANEL&quot; &#124; &quot;openInspector&quot; &#124; &quot;deletePanel&quot; &#124; &quot;editPanel&quot;&gt;</code> | |
| [getTrigger](./kibana-plugin-plugins-ui_actions-public.uiactionsservice.gettrigger.md) | | <code>&lt;T extends &quot;&quot; &#124; &quot;ROW_CLICK_TRIGGER&quot; &#124; &quot;VISUALIZE_FIELD_TRIGGER&quot; &#124; &quot;VISUALIZE_GEO_FIELD_TRIGGER&quot; &#124; &quot;FILTER_TRIGGER&quot; &#124; &quot;CONTEXT_MENU_TRIGGER&quot; &#124; &quot;PANEL_BADGE_TRIGGER&quot; &#124; &quot;PANEL_NOTIFICATION_TRIGGER&quot; &#124; &quot;SELECT_RANGE_TRIGGER&quot; &#124; &quot;VALUE_CLICK_TRIGGER&quot;&gt;(triggerId: T) =&gt; TriggerContract&lt;T&gt;</code> | |
| [getTriggerActions](./kibana-plugin-plugins-ui_actions-public.uiactionsservice.gettriggeractions.md) | | <code>&lt;T extends &quot;&quot; &#124; &quot;ROW_CLICK_TRIGGER&quot; &#124; &quot;VISUALIZE_FIELD_TRIGGER&quot; &#124; &quot;VISUALIZE_GEO_FIELD_TRIGGER&quot; &#124; &quot;FILTER_TRIGGER&quot; &#124; &quot;CONTEXT_MENU_TRIGGER&quot; &#124; &quot;PANEL_BADGE_TRIGGER&quot; &#124; &quot;PANEL_NOTIFICATION_TRIGGER&quot; &#124; &quot;SELECT_RANGE_TRIGGER&quot; &#124; &quot;VALUE_CLICK_TRIGGER&quot;&gt;(triggerId: T) =&gt; Action&lt;TriggerContextMapping[T], &quot;&quot; &#124; &quot;ACTION_VISUALIZE_FIELD&quot; &#124; &quot;ACTION_VISUALIZE_GEO_FIELD&quot; &#124; &quot;ACTION_VISUALIZE_LENS_FIELD&quot; &#124; &quot;ACTION_GLOBAL_APPLY_FILTER&quot; &#124; &quot;ACTION_SELECT_RANGE&quot; &#124; &quot;ACTION_VALUE_CLICK&quot; &#124; &quot;ACTION_CUSTOMIZE_PANEL&quot; &#124; &quot;ACTION_ADD_PANEL&quot; &#124; &quot;openInspector&quot; &#124; &quot;deletePanel&quot; &#124; &quot;editPanel&quot;&gt;[]</code> | |
| [getTriggerCompatibleActions](./kibana-plugin-plugins-ui_actions-public.uiactionsservice.gettriggercompatibleactions.md) | | <code>&lt;T extends &quot;&quot; &#124; &quot;ROW_CLICK_TRIGGER&quot; &#124; &quot;VISUALIZE_FIELD_TRIGGER&quot; &#124; &quot;VISUALIZE_GEO_FIELD_TRIGGER&quot; &#124; &quot;FILTER_TRIGGER&quot; &#124; &quot;CONTEXT_MENU_TRIGGER&quot; &#124; &quot;PANEL_BADGE_TRIGGER&quot; &#124; &quot;PANEL_NOTIFICATION_TRIGGER&quot; &#124; &quot;SELECT_RANGE_TRIGGER&quot; &#124; &quot;VALUE_CLICK_TRIGGER&quot;&gt;(triggerId: T, context: TriggerContextMapping[T]) =&gt; Promise&lt;Action&lt;TriggerContextMapping[T], &quot;&quot; &#124; &quot;ACTION_VISUALIZE_FIELD&quot; &#124; &quot;ACTION_VISUALIZE_GEO_FIELD&quot; &#124; &quot;ACTION_VISUALIZE_LENS_FIELD&quot; &#124; &quot;ACTION_GLOBAL_APPLY_FILTER&quot; &#124; &quot;ACTION_SELECT_RANGE&quot; &#124; &quot;ACTION_VALUE_CLICK&quot; &#124; &quot;ACTION_CUSTOMIZE_PANEL&quot; &#124; &quot;ACTION_ADD_PANEL&quot; &#124; &quot;openInspector&quot; &#124; &quot;deletePanel&quot; &#124; &quot;editPanel&quot;&gt;[]&gt;</code> | |
| [hasAction](./kibana-plugin-plugins-ui_actions-public.uiactionsservice.hasaction.md) | | <code>(actionId: string) =&gt; boolean</code> | |
| [registerAction](./kibana-plugin-plugins-ui_actions-public.uiactionsservice.registeraction.md) | | <code>&lt;A extends ActionDefinition&lt;{}&gt;&gt;(definition: A) =&gt; Action&lt;ActionContext&lt;A&gt;, &quot;&quot; &#124; &quot;ACTION_VISUALIZE_FIELD&quot; &#124; &quot;ACTION_VISUALIZE_GEO_FIELD&quot; &#124; &quot;ACTION_VISUALIZE_LENS_FIELD&quot; &#124; &quot;ACTION_GLOBAL_APPLY_FILTER&quot; &#124; &quot;ACTION_SELECT_RANGE&quot; &#124; &quot;ACTION_VALUE_CLICK&quot; &#124; &quot;ACTION_CUSTOMIZE_PANEL&quot; &#124; &quot;ACTION_ADD_PANEL&quot; &#124; &quot;openInspector&quot; &#124; &quot;deletePanel&quot; &#124; &quot;editPanel&quot; &#124; &quot;togglePanel&quot; &#124; &quot;replacePanel&quot; &#124; &quot;clonePanel&quot; &#124; &quot;addToFromLibrary&quot; &#124; &quot;unlinkFromLibrary&quot; &#124; &quot;ACTION_LIBRARY_NOTIFICATION&quot; &#124; &quot;ACTION_EXPORT_CSV&quot;&gt;</code> | |
| [registerAction](./kibana-plugin-plugins-ui_actions-public.uiactionsservice.registeraction.md) | | <code>&lt;A extends ActionDefinition&lt;{}&gt;&gt;(definition: A) =&gt; Action&lt;ActionContext&lt;A&gt;, &quot;&quot; &#124; &quot;ACTION_VISUALIZE_FIELD&quot; &#124; &quot;ACTION_VISUALIZE_GEO_FIELD&quot; &#124; &quot;ACTION_VISUALIZE_LENS_FIELD&quot; &#124; &quot;ACTION_GLOBAL_APPLY_FILTER&quot; &#124; &quot;ACTION_SELECT_RANGE&quot; &#124; &quot;ACTION_VALUE_CLICK&quot; &#124; &quot;ACTION_CUSTOMIZE_PANEL&quot; &#124; &quot;ACTION_ADD_PANEL&quot; &#124; &quot;openInspector&quot; &#124; &quot;deletePanel&quot; &#124; &quot;editPanel&quot;&gt;</code> | |
| [registerTrigger](./kibana-plugin-plugins-ui_actions-public.uiactionsservice.registertrigger.md) | | <code>(trigger: Trigger) =&gt; void</code> | |
| [triggers](./kibana-plugin-plugins-ui_actions-public.uiactionsservice.triggers.md) | | <code>TriggerRegistry</code> | |
| [triggerToActions](./kibana-plugin-plugins-ui_actions-public.uiactionsservice.triggertoactions.md) | | <code>TriggerToActionsRegistry</code> | |

View file

@ -7,5 +7,5 @@
<b>Signature:</b>
```typescript
readonly registerAction: <A extends ActionDefinition<{}>>(definition: A) => Action<ActionContext<A>, "" | "ACTION_VISUALIZE_FIELD" | "ACTION_VISUALIZE_GEO_FIELD" | "ACTION_VISUALIZE_LENS_FIELD" | "ACTION_GLOBAL_APPLY_FILTER" | "ACTION_SELECT_RANGE" | "ACTION_VALUE_CLICK" | "ACTION_CUSTOMIZE_PANEL" | "ACTION_ADD_PANEL" | "openInspector" | "deletePanel" | "editPanel" | "togglePanel" | "replacePanel" | "clonePanel" | "addToFromLibrary" | "unlinkFromLibrary" | "ACTION_LIBRARY_NOTIFICATION" | "ACTION_EXPORT_CSV">;
readonly registerAction: <A extends ActionDefinition<{}>>(definition: A) => Action<ActionContext<A>, "" | "ACTION_VISUALIZE_FIELD" | "ACTION_VISUALIZE_GEO_FIELD" | "ACTION_VISUALIZE_LENS_FIELD" | "ACTION_GLOBAL_APPLY_FILTER" | "ACTION_SELECT_RANGE" | "ACTION_VALUE_CLICK" | "ACTION_CUSTOMIZE_PANEL" | "ACTION_ADD_PANEL" | "openInspector" | "deletePanel" | "editPanel">;
```

View file

@ -1,11 +0,0 @@
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
[Home](./index.md) &gt; [kibana-plugin-plugins-ui\_actions-public](./kibana-plugin-plugins-ui_actions-public.md) &gt; [VALUE\_CLICK\_TRIGGER](./kibana-plugin-plugins-ui_actions-public.value_click_trigger.md)
## VALUE\_CLICK\_TRIGGER variable
<b>Signature:</b>
```typescript
VALUE_CLICK_TRIGGER = "VALUE_CLICK_TRIGGER"
```

View file

@ -1,11 +0,0 @@
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
[Home](./index.md) &gt; [kibana-plugin-plugins-ui\_actions-public](./kibana-plugin-plugins-ui_actions-public.md) &gt; [valueClickTrigger](./kibana-plugin-plugins-ui_actions-public.valueclicktrigger.md)
## valueClickTrigger variable
<b>Signature:</b>
```typescript
valueClickTrigger: Trigger<'VALUE_CLICK_TRIGGER'>
```

View file

@ -31,13 +31,8 @@ interface Options {
type CircularDepList = Set<string>;
const allowedList: CircularDepList = new Set([
'src/plugins/charts -> src/plugins/expressions',
'src/plugins/charts -> src/plugins/discover',
'src/plugins/charts -> src/plugins/vis_default_editor',
'src/plugins/data -> src/plugins/embeddable',
'src/plugins/data -> src/plugins/expressions',
'src/plugins/data -> src/plugins/ui_actions',
'src/plugins/embeddable -> src/plugins/ui_actions',
'src/plugins/expressions -> src/plugins/visualizations',
'src/plugins/vis_default_editor -> src/plugins/visualizations',
'src/plugins/vis_default_editor -> src/plugins/visualize',
'src/plugins/visualizations -> src/plugins/visualize',

View file

@ -22,7 +22,6 @@ import { toMountPoint } from '../../../kibana_react/public';
import { ActionByType, createAction, IncompatibleActionError } from '../../../ui_actions/public';
import { getOverlays, getIndexPatterns } from '../services';
import { applyFiltersPopover } from '../ui/apply_filters';
import type { IEmbeddable } from '../../../embeddable/public';
import { Filter, FilterManager, TimefilterContract, esFilters } from '..';
export const ACTION_GLOBAL_APPLY_FILTER = 'ACTION_GLOBAL_APPLY_FILTER';
@ -30,7 +29,9 @@ export const ACTION_GLOBAL_APPLY_FILTER = 'ACTION_GLOBAL_APPLY_FILTER';
export interface ApplyGlobalFilterActionContext {
filters: Filter[];
timeFieldName?: string;
embeddable?: IEmbeddable;
// Need to make this unknown to prevent circular dependencies.
// Apps using this property will need to cast to `IEmbeddable`.
embeddable?: unknown;
}
async function isCompatible(context: ApplyGlobalFilterActionContext) {

View file

@ -19,12 +19,20 @@
import { last } from 'lodash';
import moment from 'moment';
import { Datatable } from 'src/plugins/expressions';
import { esFilters, IFieldType, RangeFilterParams } from '../../../public';
import { getIndexPatterns, getSearchService } from '../../../public/services';
import { RangeSelectContext } from '../../../../embeddable/public';
import { AggConfigSerialized } from '../../../common/search/aggs';
export async function createFiltersFromRangeSelectAction(event: RangeSelectContext['data']) {
/** @internal */
export interface RangeSelectDataContext {
table: Datatable;
column: number;
range: number[];
timeFieldName?: string;
}
export async function createFiltersFromRangeSelectAction(event: RangeSelectDataContext) {
const column: Record<string, any> = event.table.columns[event.column];
if (!column || !column.meta) {

View file

@ -25,8 +25,10 @@ import {
} from '../../../public';
import { dataPluginMock } from '../../../public/mocks';
import { setIndexPatterns, setSearchService } from '../../../public/services';
import { createFiltersFromValueClickAction } from './create_filters_from_value_click';
import { ValueClickContext } from '../../../../embeddable/public';
import {
createFiltersFromValueClickAction,
ValueClickDataContext,
} from './create_filters_from_value_click';
const mockField = {
name: 'bytes',
@ -34,7 +36,7 @@ const mockField = {
};
describe('createFiltersFromValueClick', () => {
let dataPoints: ValueClickContext['data']['data'];
let dataPoints: ValueClickDataContext['data'];
beforeEach(() => {
dataPoints = [

View file

@ -20,9 +20,20 @@
import { Datatable } from '../../../../../plugins/expressions/public';
import { esFilters, Filter } from '../../../public';
import { getIndexPatterns, getSearchService } from '../../../public/services';
import { ValueClickContext } from '../../../../embeddable/public';
import { AggConfigSerialized } from '../../../common/search/aggs';
/** @internal */
export interface ValueClickDataContext {
data: Array<{
table: Pick<Datatable, 'rows' | 'columns'>;
column: number;
row: number;
value: any;
}>;
timeFieldName?: string;
negate?: boolean;
}
/**
* For terms aggregations on `__other__` buckets, this assembles a list of applicable filter
* terms based on a specific cell in the tabified data.
@ -120,7 +131,7 @@ const createFilter = async (
export const createFiltersFromValueClickAction = async ({
data,
negate,
}: ValueClickContext['data']) => {
}: ValueClickDataContext) => {
const filters: Filter[] = [];
await Promise.all(

View file

@ -17,16 +17,22 @@
* under the License.
*/
import {
ActionByType,
APPLY_FILTER_TRIGGER,
createAction,
UiActionsStart,
} from '../../../../plugins/ui_actions/public';
import { Datatable } from 'src/plugins/expressions/public';
import { ActionByType, createAction, UiActionsStart } from '../../../../plugins/ui_actions/public';
import { APPLY_FILTER_TRIGGER } from '../triggers';
import { createFiltersFromRangeSelectAction } from './filters/create_filters_from_range_select';
import type { RangeSelectContext } from '../../../embeddable/public';
export type SelectRangeActionContext = RangeSelectContext;
export interface SelectRangeActionContext {
// Need to make this unknown to prevent circular dependencies.
// Apps using this property will need to cast to `IEmbeddable`.
embeddable?: unknown;
data: {
table: Datatable;
column: number;
range: number[];
timeFieldName?: string;
};
}
export const ACTION_SELECT_RANGE = 'ACTION_SELECT_RANGE';

View file

@ -17,19 +17,31 @@
* under the License.
*/
import {
ActionByType,
APPLY_FILTER_TRIGGER,
createAction,
UiActionsStart,
} from '../../../../plugins/ui_actions/public';
import { Datatable } from 'src/plugins/expressions/public';
import { ActionByType, createAction, UiActionsStart } from '../../../../plugins/ui_actions/public';
import { APPLY_FILTER_TRIGGER } from '../triggers';
import { createFiltersFromValueClickAction } from './filters/create_filters_from_value_click';
import type { Filter } from '../../common/es_query/filters';
import type { ValueClickContext } from '../../../embeddable/public';
export type ValueClickActionContext = ValueClickContext;
export const ACTION_VALUE_CLICK = 'ACTION_VALUE_CLICK';
export interface ValueClickContext {
// Need to make this unknown to prevent circular dependencies.
// Apps using this property will need to cast to `IEmbeddable`.
embeddable?: unknown;
data: {
data: Array<{
table: Pick<Datatable, 'rows' | 'columns'>;
column: number;
row: number;
value: any;
}>;
timeFieldName?: string;
negate?: boolean;
};
}
export function createValueClickAction(
getStartServices: () => { uiActions: UiActionsStart }
): ActionByType<typeof ACTION_VALUE_CLICK> {

View file

@ -483,6 +483,7 @@ export {
export { isTimeRange, isQuery, isFilter, isFilters } from '../common';
export { ACTION_GLOBAL_APPLY_FILTER, ApplyGlobalFilterActionContext } from './actions';
export { APPLY_FILTER_TRIGGER } from './triggers';
/*
* Plugin setup

View file

@ -49,11 +49,6 @@ import {
setUiSettings,
} from './services';
import { createSearchBar } from './ui/search_bar/create_search_bar';
import {
SELECT_RANGE_TRIGGER,
VALUE_CLICK_TRIGGER,
APPLY_FILTER_TRIGGER,
} from '../../ui_actions/public';
import {
ACTION_GLOBAL_APPLY_FILTER,
createFilterAction,
@ -67,13 +62,18 @@ import {
createValueClickAction,
createSelectRangeAction,
} from './actions';
import { APPLY_FILTER_TRIGGER, applyFilterTrigger } from './triggers';
import { SavedObjectsClientPublicToCommon } from './index_patterns';
import { getIndexPatternLoad } from './index_patterns/expressions';
import { UsageCollectionSetup } from '../../usage_collection/public';
import { getTableViewDescription } from './utils/table_inspector_view';
import { TriggerId } from '../../ui_actions/public';
declare module '../../ui_actions/public' {
export interface TriggerContextMapping {
[APPLY_FILTER_TRIGGER]: ApplyGlobalFilterActionContext;
}
export interface ActionContextMapping {
[ACTION_GLOBAL_APPLY_FILTER]: ApplyGlobalFilterActionContext;
[ACTION_SELECT_RANGE]: SelectRangeActionContext;
@ -119,19 +119,21 @@ export class DataPublicPlugin
storage: this.storage,
});
uiActions.registerTrigger(applyFilterTrigger);
uiActions.registerAction(
createFilterAction(queryService.filterManager, queryService.timefilter.timefilter)
);
uiActions.addTriggerAction(
SELECT_RANGE_TRIGGER,
'SELECT_RANGE_TRIGGER' as TriggerId,
createSelectRangeAction(() => ({
uiActions: startServices().plugins.uiActions,
}))
);
uiActions.addTriggerAction(
VALUE_CLICK_TRIGGER,
'VALUE_CLICK_TRIGGER' as TriggerId,
createValueClickAction(() => ({
uiActions: startServices().plugins.uiActions,
}))

View file

@ -464,14 +464,17 @@ export type AggsStart = Assign<AggsCommonStart, {
types: AggTypesRegistryStart;
}>;
// Warning: (ae-missing-release-tag) "APPLY_FILTER_TRIGGER" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal)
//
// @public (undocumented)
export const APPLY_FILTER_TRIGGER = "FILTER_TRIGGER";
// Warning: (ae-missing-release-tag) "ApplyGlobalFilterActionContext" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal)
//
// @public (undocumented)
export interface ApplyGlobalFilterActionContext {
// Warning: (ae-forgotten-export) The symbol "IEmbeddable" needs to be exported by the entry point index.d.ts
//
// (undocumented)
embeddable?: IEmbeddable;
embeddable?: unknown;
// (undocumented)
filters: Filter[];
// (undocumented)

View file

@ -18,15 +18,15 @@
*/
import { i18n } from '@kbn/i18n';
import { Trigger } from '.';
import { Trigger } from '../../../ui_actions/public';
export const APPLY_FILTER_TRIGGER = 'FILTER_TRIGGER';
export const applyFilterTrigger: Trigger<'FILTER_TRIGGER'> = {
id: APPLY_FILTER_TRIGGER,
title: i18n.translate('uiActions.triggers.applyFilterTitle', {
title: i18n.translate('data.triggers.applyFilterTitle', {
defaultMessage: 'Apply filter',
}),
description: i18n.translate('uiActions.triggers.applyFilterDescription', {
description: i18n.translate('data.triggers.applyFilterDescription', {
defaultMessage: 'When kibana filter is applied. Could be a single value or a range filter.',
}),
};

View file

@ -17,16 +17,4 @@
* under the License.
*/
import { i18n } from '@kbn/i18n';
import { Trigger } from '.';
export const VALUE_CLICK_TRIGGER = 'VALUE_CLICK_TRIGGER';
export const valueClickTrigger: Trigger<'VALUE_CLICK_TRIGGER'> = {
id: VALUE_CLICK_TRIGGER,
title: i18n.translate('uiActions.triggers.valueClickTitle', {
defaultMessage: 'Single click',
}),
description: i18n.translate('uiActions.triggers.valueClickDescription', {
defaultMessage: 'A data point click on the visualization',
}),
};
export * from './apply_filter_trigger';

View file

@ -38,7 +38,7 @@ import { DataViewRow, DataViewColumn } from '../types';
import { IUiSettingsClient } from '../../../../../../core/public';
import { Datatable, DatatableColumn } from '../../../../../expressions/public';
import { FieldFormatsStart } from '../../../field_formats';
import { UiActionsStart } from '../../../../../ui_actions/public';
import { TriggerId, UiActionsStart } from '../../../../../ui_actions/public';
interface DataTableFormatState {
columns: DataViewColumn[];
@ -112,7 +112,7 @@ export class DataTableFormat extends Component<DataTableFormatProps, DataTableFo
onClick={() => {
const value = table.rows[rowIndex][column.id];
const eventData = { table, column: columnIndex, row: rowIndex, value };
uiActions.executeTriggerActions('VALUE_CLICK_TRIGGER', {
uiActions.executeTriggerActions('VALUE_CLICK_TRIGGER' as TriggerId, {
data: { data: [eventData] },
});
}}
@ -145,7 +145,7 @@ export class DataTableFormat extends Component<DataTableFormatProps, DataTableFo
onClick={() => {
const value = table.rows[rowIndex][column.id];
const eventData = { table, column: columnIndex, row: rowIndex, value };
uiActions.executeTriggerActions('VALUE_CLICK_TRIGGER', {
uiActions.executeTriggerActions('VALUE_CLICK_TRIGGER' as TriggerId, {
data: { data: [eventData], negate: true },
});
}}

View file

@ -1122,7 +1122,7 @@ export class Plugin implements Plugin_2<PluginSetup, PluginStart, DataPluginSetu
__enhance: (enhancements: DataEnhancements) => void;
search: ISearchSetup;
fieldFormats: {
register: (customFieldFormat: import("../common").FieldFormatInstanceType) => number;
register: (customFieldFormat: import("../public").FieldFormatInstanceType) => number;
};
};
// (undocumented)
@ -1131,7 +1131,7 @@ export class Plugin implements Plugin_2<PluginSetup, PluginStart, DataPluginSetu
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>>;
};

View file

@ -21,9 +21,10 @@ import angular from 'angular';
import _ from 'lodash';
import { Subscription } from 'rxjs';
import { i18n } from '@kbn/i18n';
import { UiActionsStart, APPLY_FILTER_TRIGGER } from '../../../../ui_actions/public';
import { UiActionsStart } from '../../../../ui_actions/public';
import { RequestAdapter, Adapters } from '../../../../inspector/public';
import {
APPLY_FILTER_TRIGGER,
esFilters,
Filter,
TimeRange,

View file

@ -18,8 +18,6 @@
*/
import { PersistableStateService, SerializableState } from '../../kibana_utils/common';
import { Query, TimeRange } from '../../data/common/query';
import { Filter } from '../../data/common/es_query/filters';
export enum ViewMode {
EDIT = 'edit',
@ -53,21 +51,6 @@ export type EmbeddableInput = {
*/
disableTriggers?: boolean;
/**
* Time range of the chart.
*/
timeRange?: TimeRange;
/**
* Visualization query string used to narrow down results.
*/
query?: Query;
/**
* Visualization filters used to narrow down results.
*/
filters?: Filter[];
/**
* Search session id to group searches
*/

View file

@ -18,18 +18,24 @@
*/
import { UiActionsSetup } from '../../ui_actions/public';
import {
contextMenuTrigger,
panelBadgeTrigger,
EmbeddableContext,
CONTEXT_MENU_TRIGGER,
PANEL_BADGE_TRIGGER,
ACTION_ADD_PANEL,
ACTION_CUSTOMIZE_PANEL,
ACTION_INSPECT_PANEL,
REMOVE_PANEL_ACTION,
ACTION_EDIT_PANEL,
panelNotificationTrigger,
ACTION_INSPECT_PANEL,
CONTEXT_MENU_TRIGGER,
contextMenuTrigger,
EmbeddableContext,
PANEL_BADGE_TRIGGER,
PANEL_NOTIFICATION_TRIGGER,
panelBadgeTrigger,
panelNotificationTrigger,
RangeSelectContext,
REMOVE_PANEL_ACTION,
SELECT_RANGE_TRIGGER,
selectRangeTrigger,
ValueClickContext,
VALUE_CLICK_TRIGGER,
valueClickTrigger,
} from './lib';
declare module '../../ui_actions/public' {
@ -37,6 +43,8 @@ declare module '../../ui_actions/public' {
[CONTEXT_MENU_TRIGGER]: EmbeddableContext;
[PANEL_BADGE_TRIGGER]: EmbeddableContext;
[PANEL_NOTIFICATION_TRIGGER]: EmbeddableContext;
[SELECT_RANGE_TRIGGER]: RangeSelectContext;
[VALUE_CLICK_TRIGGER]: ValueClickContext;
}
export interface ActionContextMapping {
@ -56,4 +64,6 @@ export const bootstrap = (uiActions: UiActionsSetup) => {
uiActions.registerTrigger(contextMenuTrigger);
uiActions.registerTrigger(panelBadgeTrigger);
uiActions.registerTrigger(panelNotificationTrigger);
uiActions.registerTrigger(selectRangeTrigger);
uiActions.registerTrigger(valueClickTrigger);
};

View file

@ -65,6 +65,8 @@ export {
PanelNotFoundError,
PanelState,
PropertySpec,
SELECT_RANGE_TRIGGER,
VALUE_CLICK_TRIGGER,
ViewMode,
withEmbeddableSubscription,
SavedObjectEmbeddableInput,

View file

@ -24,8 +24,10 @@ import { Embeddable } from './embeddable';
import { EmbeddableOutput, EmbeddableInput } from './i_embeddable';
import { ViewMode } from '../types';
import { ContactCardEmbeddable } from '../test_samples/embeddables/contact_card/contact_card_embeddable';
import { FilterableEmbeddable } from '../test_samples/embeddables/filterable_embeddable';
import type { Filter } from '../../../../data/public';
import {
MockFilter,
FilterableEmbeddable,
} from '../test_samples/embeddables/filterable_embeddable';
class TestClass {
constructor() {}
@ -83,7 +85,7 @@ test('Embeddable reload is called if lastReloadRequest input time changes', asyn
test('Embeddable reload is called if lastReloadRequest input time changed and new input is used', async () => {
const hello = new FilterableEmbeddable({ id: '123', filters: [], lastReloadRequestTime: 0 });
const aFilter = ({} as unknown) as Filter;
const aFilter = ({} as unknown) as MockFilter;
hello.reload = jest.fn(() => {
// when reload is called embeddable already has new input
expect(hello.getInput().filters).toEqual([aFilter]);

View file

@ -20,6 +20,7 @@
import { ViewMode, EmbeddableOutput, isErrorEmbeddable } from '../../../../';
import { AddPanelAction } from './add_panel_action';
import {
MockFilter,
FILTERABLE_EMBEDDABLE,
FilterableEmbeddable,
FilterableEmbeddableInput,
@ -28,7 +29,6 @@ import { FilterableEmbeddableFactory } from '../../../../test_samples/embeddable
import { FilterableContainer } from '../../../../test_samples/embeddables/filterable_container';
import { coreMock } from '../../../../../../../../core/public/mocks';
import { ContactCardEmbeddable } from '../../../../test_samples';
import { esFilters, Filter } from '../../../../../../../../plugins/data/public';
import { EmbeddableStart } from '../../../../../plugin';
import { embeddablePluginMock } from '../../../../../mocks';
import { defaultTrigger } from '../../../../../../../ui_actions/public/triggers';
@ -51,8 +51,8 @@ beforeEach(async () => {
() => null
);
const derivedFilter: Filter = {
$state: { store: esFilters.FilterStateStore.APP_STATE },
const derivedFilter: MockFilter = {
$state: { store: 'appState' },
meta: { disabled: false, alias: 'name', negate: false },
query: { match: {} },
};

View file

@ -29,7 +29,6 @@ import {
import { inspectorPluginMock } from '../../../../../../../plugins/inspector/public/mocks';
import { EmbeddableOutput, isErrorEmbeddable, ErrorEmbeddable } from '../../../embeddables';
import { of } from '../../../../tests/helpers';
import { esFilters } from '../../../../../../../plugins/data/public';
import { embeddablePluginMock } from '../../../../mocks';
import { EmbeddableStart } from '../../../../plugin';
@ -43,7 +42,7 @@ const setupTests = async () => {
panels: {},
filters: [
{
$state: { store: esFilters.FilterStateStore.APP_STATE },
$state: { store: 'appState' },
meta: { disabled: false, alias: 'name', negate: false },
query: { match: {} },
},

View file

@ -21,6 +21,7 @@ import { EmbeddableOutput, isErrorEmbeddable } from '../../../';
import { RemovePanelAction } from './remove_panel_action';
import { EmbeddableStart } from '../../../../plugin';
import {
MockFilter,
FILTERABLE_EMBEDDABLE,
FilterableEmbeddable,
FilterableEmbeddableInput,
@ -29,7 +30,6 @@ import { FilterableEmbeddableFactory } from '../../../test_samples/embeddables/f
import { FilterableContainer } from '../../../test_samples/embeddables/filterable_container';
import { ViewMode } from '../../../types';
import { ContactCardEmbeddable } from '../../../test_samples/embeddables/contact_card/contact_card_embeddable';
import { esFilters, Filter } from '../../../../../../../plugins/data/public';
import { embeddablePluginMock } from '../../../../mocks';
const { setup, doStart } = embeddablePluginMock.createInstance();
@ -39,8 +39,8 @@ let container: FilterableContainer;
let embeddable: FilterableEmbeddable;
beforeEach(async () => {
const derivedFilter: Filter = {
$state: { store: esFilters.FilterStateStore.APP_STATE },
const derivedFilter: MockFilter = {
$state: { store: 'appState' },
meta: { disabled: false, alias: 'name', negate: false },
query: { match: {} },
};

View file

@ -18,13 +18,13 @@
*/
import { Container, ContainerInput } from '../../containers';
import { Filter } from '../../../../../data/public';
import { EmbeddableStart } from '../../../plugin';
import { MockFilter } from './filterable_embeddable';
export const FILTERABLE_CONTAINER = 'FILTERABLE_CONTAINER';
export interface FilterableContainerInput extends ContainerInput {
filters: Filter[];
filters: MockFilter[];
}
/**
@ -33,7 +33,7 @@ export interface FilterableContainerInput extends ContainerInput {
* here instead
*/
export type InheritedChildrenInput = {
filters: Filter[];
filters: MockFilter[];
id?: string;
};

View file

@ -19,12 +19,18 @@
import { IContainer } from '../../containers';
import { EmbeddableOutput, EmbeddableInput, Embeddable } from '../../embeddables';
import { Filter } from '../../../../../data/public';
/** @internal */
export interface MockFilter {
$state?: any;
meta: any;
query?: any;
}
export const FILTERABLE_EMBEDDABLE = 'FILTERABLE_EMBEDDABLE';
export interface FilterableEmbeddableInput extends EmbeddableInput {
filters: Filter[];
filters: MockFilter[];
}
export class FilterableEmbeddable extends Embeddable<FilterableEmbeddableInput, EmbeddableOutput> {

View file

@ -22,8 +22,8 @@ import { Datatable } from '../../../../expressions';
import { Trigger, RowClickContext } from '../../../../ui_actions/public';
import { IEmbeddable } from '..';
export interface EmbeddableContext {
embeddable: IEmbeddable;
export interface EmbeddableContext<T extends IEmbeddable = IEmbeddable> {
embeddable: T;
}
export interface ValueClickContext<T extends IEmbeddable = IEmbeddable> {
@ -88,6 +88,28 @@ export const panelNotificationTrigger: Trigger<'PANEL_NOTIFICATION_TRIGGER'> = {
}),
};
export const SELECT_RANGE_TRIGGER = 'SELECT_RANGE_TRIGGER';
export const selectRangeTrigger: Trigger<'SELECT_RANGE_TRIGGER'> = {
id: SELECT_RANGE_TRIGGER,
title: i18n.translate('embeddableApi.selectRangeTrigger.title', {
defaultMessage: 'Range selection',
}),
description: i18n.translate('embeddableApi.selectRangeTrigger.description', {
defaultMessage: 'A range of values on the visualization',
}),
};
export const VALUE_CLICK_TRIGGER = 'VALUE_CLICK_TRIGGER';
export const valueClickTrigger: Trigger<'VALUE_CLICK_TRIGGER'> = {
id: VALUE_CLICK_TRIGGER,
title: i18n.translate('embeddableApi.valueClickTrigger.title', {
defaultMessage: 'Single click',
}),
description: i18n.translate('embeddableApi.valueClickTrigger.description', {
defaultMessage: 'A data point click on the visualization',
}),
};
export const isValueClickTriggerContext = (
context: ChartActionContext
): context is ValueClickContext => context.data && 'data' in context.data;

View file

@ -34,7 +34,6 @@ import { coreMock } from '../../../core/public/mocks';
import { UiActionsService } from './lib/ui_actions';
import { CoreStart } from '../../../core/public';
import { Start as InspectorStart } from '../../inspector/public';
import { dataPluginMock } from '../../data/public/mocks';
import { inspectorPluginMock } from '../../inspector/public/mocks';
import { uiActionsPluginMock } from '../../ui_actions/public/mocks';
@ -136,13 +135,11 @@ const createInstance = (setupPlugins: Partial<EmbeddableSetupDependencies> = {})
const plugin = new EmbeddablePublicPlugin({} as any);
const setup = plugin.setup(coreMock.createSetup(), {
uiActions: setupPlugins.uiActions || uiActionsPluginMock.createSetupContract(),
data: dataPluginMock.createSetupContract(),
});
const doStart = (startPlugins: Partial<EmbeddableStartDependencies> = {}) =>
plugin.start(coreMock.createStart(), {
uiActions: startPlugins.uiActions || uiActionsPluginMock.createStartContract(),
inspector: inspectorPluginMock.createStartContract(),
data: dataPluginMock.createStartContract(),
});
return {
plugin,

View file

@ -19,7 +19,6 @@
import React from 'react';
import { Subscription } from 'rxjs';
import { identity } from 'lodash';
import { DataPublicPluginSetup, DataPublicPluginStart } from '../../data/public';
import { getSavedObjectFinder, showSaveModal } from '../../saved_objects/public';
import { UiActionsSetup, UiActionsStart } from '../../ui_actions/public';
import { Start as InspectorStart } from '../../inspector/public';
@ -62,12 +61,10 @@ import {
} from '../common/lib';
export interface EmbeddableSetupDependencies {
data: DataPublicPluginSetup;
uiActions: UiActionsSetup;
}
export interface EmbeddableStartDependencies {
data: DataPublicPluginStart;
uiActions: UiActionsStart;
inspector: InspectorStart;
}
@ -144,7 +141,7 @@ export class EmbeddablePublicPlugin implements Plugin<EmbeddableSetup, Embeddabl
public start(
core: CoreStart,
{ data, uiActions, inspector }: EmbeddableStartDependencies
{ uiActions, inspector }: EmbeddableStartDependencies
): EmbeddableStart {
this.embeddableFactoryDefinitions.forEach((def) => {
this.embeddableFactories.set(

View file

@ -8,48 +8,29 @@ import { Action } from 'history';
import { Action as Action_3 } from 'src/plugins/ui_actions/public';
import { ActionExecutionContext as ActionExecutionContext_2 } from 'src/plugins/ui_actions/public';
import { ApiResponse } from '@elastic/elasticsearch/lib/Transport';
import { ApiResponse as ApiResponse_2 } from '@elastic/elasticsearch';
import { ApplicationStart as ApplicationStart_2 } from 'kibana/public';
import { Assign } from '@kbn/utility-types';
import { BehaviorSubject } from 'rxjs';
import { BfetchPublicSetup } from 'src/plugins/bfetch/public';
import Boom from '@hapi/boom';
import { ConfigDeprecationProvider } from '@kbn/config';
import { CoreSetup as CoreSetup_2 } from 'src/core/public';
import { CoreSetup as CoreSetup_3 } from 'kibana/public';
import { CoreStart as CoreStart_2 } from 'kibana/public';
import * as CSS from 'csstype';
import { DatatableColumn as DatatableColumn_2 } from 'src/plugins/expressions';
import { EmbeddableStart as EmbeddableStart_2 } from 'src/plugins/embeddable/public/plugin';
import { Ensure } from '@kbn/utility-types';
import { EnvironmentMode } from '@kbn/config';
import { ErrorToastOptions as ErrorToastOptions_2 } from 'src/core/public/notifications';
import { EuiBreadcrumb } from '@elastic/eui';
import { EuiButtonEmptyProps } from '@elastic/eui';
import { EuiComboBoxProps } from '@elastic/eui';
import { EuiConfirmModalProps } from '@elastic/eui';
import { EuiContextMenuPanelDescriptor } from '@elastic/eui';
import { EuiFlyoutSize } from '@elastic/eui';
import { EuiGlobalToastListToast } from '@elastic/eui';
import { EventEmitter } from 'events';
import { ExpressionAstExpression } from 'src/plugins/expressions/common';
import { History } from 'history';
import { Href } from 'history';
import { HttpSetup as HttpSetup_2 } from 'kibana/public';
import { I18nStart as I18nStart_2 } from 'src/core/public';
import { IconType } from '@elastic/eui';
import { ISearchOptions } from 'src/plugins/data/public';
import { ISearchSource } from 'src/plugins/data/public';
import { IStorageWrapper as IStorageWrapper_2 } from 'src/plugins/kibana_utils/public';
import { IUiSettingsClient as IUiSettingsClient_2 } from 'src/core/public';
import { KibanaClient } from '@elastic/elasticsearch/api/kibana';
import { Location } from 'history';
import { LocationDescriptorObject } from 'history';
import { Logger } from '@kbn/logging';
import { LogMeta } from '@kbn/logging';
import { MaybePromise } from '@kbn/utility-types';
import { Moment } from 'moment';
import { NameList } from 'elasticsearch';
import { NotificationsStart as NotificationsStart_2 } from 'src/core/public';
import { Observable } from 'rxjs';
import { Optional } from '@kbn/utility-types';
@ -57,39 +38,23 @@ import { OverlayStart as OverlayStart_2 } from 'src/core/public';
import { PackageInfo } from '@kbn/config';
import { Path } from 'history';
import { PluginInitializerContext } from 'src/core/public';
import { PluginInitializerContext as PluginInitializerContext_3 } from 'kibana/public';
import * as PropTypes from 'prop-types';
import { PublicContract } from '@kbn/utility-types';
import { PublicMethodsOf } from '@kbn/utility-types';
import { PublicUiSettingsParams } from 'src/core/server/types';
import React from 'react';
import { RecursiveReadonly } from '@kbn/utility-types';
import { RequestAdapter as RequestAdapter_2 } from 'src/plugins/inspector/common';
import { Required } from '@kbn/utility-types';
import * as Rx from 'rxjs';
import { SavedObject as SavedObject_2 } from 'kibana/server';
import { SavedObject as SavedObject_3 } from 'src/core/server';
import { SavedObjectAttributes } from 'kibana/server';
import { SavedObjectAttributes as SavedObjectAttributes_2 } from 'src/core/public';
import { SavedObjectAttributes as SavedObjectAttributes_3 } from 'kibana/public';
import { SavedObjectsClientContract as SavedObjectsClientContract_3 } from 'src/core/public';
import { SavedObjectsFindOptions as SavedObjectsFindOptions_3 } from 'kibana/public';
import { SavedObjectsFindResponse as SavedObjectsFindResponse_2 } from 'kibana/server';
import { Search } from '@elastic/elasticsearch/api/requestParams';
import { SearchResponse } from 'elasticsearch';
import { SerializedFieldFormat as SerializedFieldFormat_2 } from 'src/plugins/expressions/common';
import { ShallowPromise } from '@kbn/utility-types';
import { SimpleSavedObject as SimpleSavedObject_2 } from 'src/core/public';
import { Start as Start_2 } from 'src/plugins/inspector/public';
import { StartServicesAccessor as StartServicesAccessor_2 } from 'kibana/public';
import { ToastInputFields as ToastInputFields_2 } from 'src/core/public/notifications';
import { ToastsSetup as ToastsSetup_2 } from 'kibana/public';
import { TransportRequestOptions } from '@elastic/elasticsearch/lib/Transport';
import { TransportRequestParams } from '@elastic/elasticsearch/lib/Transport';
import { TransportRequestPromise } from '@elastic/elasticsearch/lib/Transport';
import { TypeOf } from '@kbn/config-schema';
import { UiComponent } from 'src/plugins/kibana_utils/public';
import { UiCounterMetricType } from '@kbn/analytics';
import { UnregisterCallback } from 'history';
import { UserProvidedValues } from 'src/core/server/types';
@ -348,7 +313,7 @@ export abstract class Embeddable<TEmbeddableInput extends EmbeddableInput = Embe
// Warning: (ae-missing-release-tag) "EmbeddableChildPanel" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal)
//
// @public
export class EmbeddableChildPanel extends React.Component<EmbeddableChildPanelProps, State_3> {
export class EmbeddableChildPanel extends React.Component<EmbeddableChildPanelProps, State_2> {
constructor(props: EmbeddableChildPanelProps);
// (undocumented)
[panel: string]: any;
@ -381,9 +346,9 @@ export interface EmbeddableChildPanelProps {
// Warning: (ae-missing-release-tag) "EmbeddableContext" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal)
//
// @public (undocumented)
export interface EmbeddableContext {
export interface EmbeddableContext<T extends IEmbeddable = IEmbeddable> {
// (undocumented)
embeddable: IEmbeddable;
embeddable: T;
}
// @public
@ -444,9 +409,6 @@ export type EmbeddableInput = {
enhancements?: SerializableState;
disabledActions?: string[];
disableTriggers?: boolean;
timeRange?: TimeRange;
query?: Query;
filters?: Filter[];
searchSessionId?: string;
};
@ -501,7 +463,7 @@ export interface EmbeddablePackageState {
// Warning: (ae-missing-release-tag) "EmbeddablePanel" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal)
//
// @public (undocumented)
export class EmbeddablePanel extends React.Component<Props, State_4> {
export class EmbeddablePanel extends React.Component<Props, State_3> {
constructor(props: Props);
// (undocumented)
closeMyContextMenuPanel: () => void;
@ -571,10 +533,6 @@ export interface EmbeddableSetup {
//
// @public (undocumented)
export interface EmbeddableSetupDependencies {
// Warning: (ae-forgotten-export) The symbol "DataPublicPluginSetup" needs to be exported by the entry point index.d.ts
//
// (undocumented)
data: DataPublicPluginSetup;
// Warning: (ae-forgotten-export) The symbol "UiActionsSetup" needs to be exported by the entry point index.d.ts
//
// (undocumented)
@ -610,10 +568,6 @@ export interface EmbeddableStart extends PersistableStateService<EmbeddableState
//
// @public (undocumented)
export interface EmbeddableStartDependencies {
// Warning: (ae-forgotten-export) The symbol "DataPublicPluginStart" needs to be exported by the entry point index.d.ts
//
// (undocumented)
data: DataPublicPluginStart;
// Warning: (ae-forgotten-export) The symbol "Start" needs to be exported by the entry point index.d.ts
//
// (undocumented)
@ -715,7 +669,7 @@ export interface IEmbeddable<I extends EmbeddableInput = EmbeddableInput, O exte
// Warning: (ae-missing-release-tag) "isContextMenuTriggerContext" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal)
//
// @public (undocumented)
export const isContextMenuTriggerContext: (context: unknown) => context is EmbeddableContext;
export const isContextMenuTriggerContext: (context: unknown) => context is EmbeddableContext<IEmbeddable<import("..").EmbeddableInput, import("..").EmbeddableOutput>>;
// Warning: (ae-missing-release-tag) "isEmbeddable" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal)
//
@ -869,6 +823,16 @@ export interface SavedObjectEmbeddableInput extends EmbeddableInput {
savedObjectId: string;
}
// Warning: (ae-missing-release-tag) "SELECT_RANGE_TRIGGER" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal)
//
// @public (undocumented)
export const SELECT_RANGE_TRIGGER = "SELECT_RANGE_TRIGGER";
// Warning: (ae-missing-release-tag) "VALUE_CLICK_TRIGGER" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal)
//
// @public (undocumented)
export const VALUE_CLICK_TRIGGER = "VALUE_CLICK_TRIGGER";
// Warning: (ae-missing-release-tag) "ValueClickContext" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal)
//
// @public (undocumented)
@ -912,10 +876,7 @@ export const withEmbeddableSubscription: <I extends EmbeddableInput, O extends E
// Warnings were encountered during analysis:
//
// src/plugins/embeddable/common/types.ts:44:3 - (ae-forgotten-export) The symbol "SerializableState" needs to be exported by the entry point index.d.ts
// src/plugins/embeddable/common/types.ts:59:3 - (ae-forgotten-export) The symbol "TimeRange" needs to be exported by the entry point index.d.ts
// src/plugins/embeddable/common/types.ts:64:3 - (ae-forgotten-export) The symbol "Query" needs to be exported by the entry point index.d.ts
// src/plugins/embeddable/common/types.ts:69:3 - (ae-forgotten-export) The symbol "Filter" needs to be exported by the entry point index.d.ts
// src/plugins/embeddable/common/types.ts:42:3 - (ae-forgotten-export) The symbol "SerializableState" needs to be exported by the entry point index.d.ts
// src/plugins/embeddable/public/lib/triggers/triggers.ts:46:5 - (ae-forgotten-export) The symbol "Datatable" needs to be exported by the entry point index.d.ts
// (No @packageDocumentation comment for this package)

View file

@ -27,6 +27,7 @@ import {
SavedObjectEmbeddableInput,
} from '../lib';
import {
MockFilter,
FilterableEmbeddableInput,
FilterableEmbeddable,
FILTERABLE_EMBEDDABLE,
@ -52,7 +53,6 @@ import {
import { coreMock } from '../../../../core/public/mocks';
import { testPlugin } from './test_plugin';
import { of } from './helpers';
import { esFilters, Filter } from '../../../../plugins/data/public';
import { createEmbeddablePanelMock } from '../mocks';
async function creatHelloWorldContainerAndEmbeddable(
@ -449,8 +449,8 @@ test('Test nested reactions', async (done) => {
test('Explicit embeddable input mapped to undefined will default to inherited', async () => {
const { start } = await creatHelloWorldContainerAndEmbeddable();
const derivedFilter: Filter = {
$state: { store: esFilters.FilterStateStore.APP_STATE },
const derivedFilter: MockFilter = {
$state: { store: 'appState' },
meta: { disabled: false, alias: 'name', negate: false },
query: { match: {} },
};

View file

@ -20,6 +20,7 @@
import { skip } from 'rxjs/operators';
import { testPlugin } from './test_plugin';
import {
MockFilter,
FILTERABLE_EMBEDDABLE,
FilterableEmbeddableInput,
} from '../lib/test_samples/embeddables/filterable_embeddable';
@ -34,7 +35,6 @@ import { FilterableContainer } from '../lib/test_samples/embeddables/filterable_
import { isErrorEmbeddable } from '../lib';
import { HelloWorldContainer } from '../lib/test_samples/embeddables/hello_world_container';
import { coreMock } from '../../../../core/public/mocks';
import { esFilters, Filter } from '../../../../plugins/data/public';
import { createEmbeddablePanelMock } from '../mocks';
const { setup, doStart, coreStart, uiActions } = testPlugin(
@ -56,8 +56,8 @@ setup.registerEmbeddableFactory(
const start = doStart();
test('Explicit embeddable input mapped to undefined will default to inherited', async () => {
const derivedFilter: Filter = {
$state: { store: esFilters.FilterStateStore.APP_STATE },
const derivedFilter: MockFilter = {
$state: { store: 'appState' },
meta: { disabled: false, alias: 'name', negate: false },
query: { match: {} },
};

View file

@ -21,7 +21,6 @@ import { CoreSetup, CoreStart } from 'src/core/public';
import { UiActionsStart } from '../../../ui_actions/public';
import { uiActionsPluginMock } from '../../../ui_actions/public/mocks';
import { inspectorPluginMock } from '../../../inspector/public/mocks';
import { dataPluginMock } from '../../../data/public/mocks';
import { coreMock } from '../../../../core/public/mocks';
import { EmbeddablePublicPlugin, EmbeddableSetup, EmbeddableStart } from '../plugin';
@ -42,7 +41,6 @@ export const testPlugin = (
const initializerContext = {} as any;
const plugin = new EmbeddablePublicPlugin(initializerContext);
const setup = plugin.setup(coreSetup, {
data: dataPluginMock.createSetupContract(),
uiActions: uiActions.setup,
});
@ -53,7 +51,6 @@ export const testPlugin = (
setup,
doStart: (anotherCoreStart: CoreStart = coreStart) => {
const start = plugin.start(anotherCoreStart, {
data: dataPluginMock.createStartContract(),
inspector: inspectorPluginMock.createStartContract(),
uiActions: uiActionsPluginMock.createStartContract(),
});

View file

@ -17,8 +17,6 @@
* under the License.
*/
import { PersistedState } from 'src/plugins/visualizations/public';
export interface ExpressionRenderDefinition<Config = unknown> {
/**
* Technical name of the renderer, used as ID to identify renderer in
@ -84,5 +82,10 @@ export interface IInterpreterRenderHandlers {
event: (event: any) => void;
hasCompatibleActions?: (event: any) => Promise<boolean>;
getRenderMode: () => RenderMode;
uiState?: PersistedState;
/**
* 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.
*/
uiState?: unknown;
}

View file

@ -12,7 +12,6 @@ import { EventEmitter } from 'events';
import { KibanaRequest } from 'src/core/server';
import { Observable } from 'rxjs';
import { PackageInfo } from '@kbn/config';
import { PersistedState } from 'src/plugins/visualizations/public';
import { Plugin as Plugin_2 } from 'src/core/public';
import { PluginInitializerContext as PluginInitializerContext_2 } from 'src/core/public';
import React from 'react';
@ -924,8 +923,7 @@ export interface IInterpreterRenderHandlers {
onDestroy: (fn: () => void) => void;
// (undocumented)
reload: () => void;
// (undocumented)
uiState?: PersistedState;
uiState?: unknown;
// (undocumented)
update: (params: any) => void;
}

View file

@ -10,7 +10,6 @@ import { Ensure } from '@kbn/utility-types';
import { EventEmitter } from 'events';
import { KibanaRequest } from 'src/core/server';
import { Observable } from 'rxjs';
import { PersistedState } from 'src/plugins/visualizations/public';
import { Plugin as Plugin_2 } from 'src/core/server';
import { PluginInitializerContext } from 'src/core/server';
import { UnwrapPromiseOrReturn } from '@kbn/utility-types';
@ -741,8 +740,7 @@ export interface IInterpreterRenderHandlers {
onDestroy: (fn: () => void) => void;
// (undocumented)
reload: () => void;
// (undocumented)
uiState?: PersistedState;
uiState?: unknown;
// (undocumented)
update: (params: any) => void;
}

View file

@ -40,12 +40,6 @@ export {
export {
Trigger,
TriggerContext,
SELECT_RANGE_TRIGGER,
selectRangeTrigger,
VALUE_CLICK_TRIGGER,
valueClickTrigger,
APPLY_FILTER_TRIGGER,
applyFilterTrigger,
VISUALIZE_FIELD_TRIGGER,
visualizeFieldTrigger,
VISUALIZE_GEO_FIELD_TRIGGER,

View file

@ -20,14 +20,7 @@
import { CoreStart, CoreSetup, Plugin, PluginInitializerContext } from 'src/core/public';
import { PublicMethodsOf } from '@kbn/utility-types';
import { UiActionsService } from './service';
import {
selectRangeTrigger,
valueClickTrigger,
rowClickTrigger,
applyFilterTrigger,
visualizeFieldTrigger,
visualizeGeoFieldTrigger,
} from './triggers';
import { rowClickTrigger, visualizeFieldTrigger, visualizeGeoFieldTrigger } from './triggers';
export type UiActionsSetup = Pick<
UiActionsService,
@ -47,10 +40,7 @@ export class UiActionsPlugin implements Plugin<UiActionsSetup, UiActionsStart> {
constructor(initializerContext: PluginInitializerContext) {}
public setup(core: CoreSetup): UiActionsSetup {
this.service.registerTrigger(selectRangeTrigger);
this.service.registerTrigger(valueClickTrigger);
this.service.registerTrigger(rowClickTrigger);
this.service.registerTrigger(applyFilterTrigger);
this.service.registerTrigger(visualizeFieldTrigger);
this.service.registerTrigger(visualizeGeoFieldTrigger);
return this.service;

View file

@ -8,14 +8,11 @@ import { CoreSetup } from 'src/core/public';
import { CoreStart } from 'src/core/public';
import { EnvironmentMode } from '@kbn/config';
import { EuiContextMenuPanelDescriptor } from '@elastic/eui';
import { EventEmitter } from 'events';
import { Observable } from 'rxjs';
import { PackageInfo } from '@kbn/config';
import { Plugin } from 'src/core/public';
import { PluginInitializerContext as PluginInitializerContext_2 } from 'src/core/public';
import { PublicMethodsOf } from '@kbn/utility-types';
import React from 'react';
import * as Rx from 'rxjs';
import { UiComponent } from 'src/plugins/kibana_utils/public';
// Warning: (ae-forgotten-export) The symbol "BaseContext" needs to be exported by the entry point index.d.ts
@ -95,16 +92,6 @@ export interface ActionExecutionMeta {
// @public (undocumented)
export type ActionType = keyof ActionContextMapping;
// Warning: (ae-missing-release-tag) "APPLY_FILTER_TRIGGER" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal)
//
// @public (undocumented)
export const APPLY_FILTER_TRIGGER = "FILTER_TRIGGER";
// Warning: (ae-missing-release-tag) "applyFilterTrigger" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal)
//
// @public (undocumented)
export const applyFilterTrigger: Trigger<'FILTER_TRIGGER'>;
// Warning: (ae-forgotten-export) The symbol "BuildContextMenuParams" needs to be exported by the entry point index.d.ts
// Warning: (ae-missing-release-tag) "buildContextMenuForActions" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal)
//
@ -148,10 +135,8 @@ export interface RowClickContext {
table: Datatable;
columns?: string[];
};
// Warning: (ae-forgotten-export) The symbol "IEmbeddable" needs to be exported by the entry point index.d.ts
//
// (undocumented)
embeddable?: IEmbeddable;
embeddable?: unknown;
}
// Warning: (ae-missing-release-tag) "rowClickTrigger" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal)
@ -159,16 +144,6 @@ export interface RowClickContext {
// @public (undocumented)
export const rowClickTrigger: Trigger<'ROW_CLICK_TRIGGER'>;
// Warning: (ae-missing-release-tag) "SELECT_RANGE_TRIGGER" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal)
//
// @public (undocumented)
export const SELECT_RANGE_TRIGGER = "SELECT_RANGE_TRIGGER";
// Warning: (ae-missing-release-tag) "selectRangeTrigger" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal)
//
// @public (undocumented)
export const selectRangeTrigger: Trigger<'SELECT_RANGE_TRIGGER'>;
// Warning: (ae-missing-release-tag) "Trigger" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal)
//
// @public
@ -192,20 +167,8 @@ export interface TriggerContextMapping {
//
// (undocumented)
[DEFAULT_TRIGGER]: TriggerContext_2;
// Warning: (ae-forgotten-export) The symbol "ApplyGlobalFilterActionContext" needs to be exported by the entry point index.d.ts
//
// (undocumented)
[APPLY_FILTER_TRIGGER]: ApplyGlobalFilterActionContext;
// (undocumented)
[ROW_CLICK_TRIGGER]: RowClickContext;
// Warning: (ae-forgotten-export) The symbol "RangeSelectContext" needs to be exported by the entry point index.d.ts
//
// (undocumented)
[SELECT_RANGE_TRIGGER]: RangeSelectContext;
// Warning: (ae-forgotten-export) The symbol "ValueClickContext" needs to be exported by the entry point index.d.ts
//
// (undocumented)
[VALUE_CLICK_TRIGGER]: ValueClickContext;
// (undocumented)
[VISUALIZE_FIELD_TRIGGER]: VisualizeFieldContext;
// (undocumented)
@ -262,35 +225,35 @@ export class UiActionsService {
//
// (undocumented)
protected readonly actions: ActionRegistry;
readonly addTriggerAction: <T extends "" | "SELECT_RANGE_TRIGGER" | "VALUE_CLICK_TRIGGER" | "ROW_CLICK_TRIGGER" | "FILTER_TRIGGER" | "VISUALIZE_FIELD_TRIGGER" | "VISUALIZE_GEO_FIELD_TRIGGER" | "CONTEXT_MENU_TRIGGER" | "PANEL_BADGE_TRIGGER" | "PANEL_NOTIFICATION_TRIGGER">(triggerId: T, action: UiActionsActionDefinition<TriggerContextMapping[T]> | Action<TriggerContextMapping[T], "" | "ACTION_VISUALIZE_FIELD" | "ACTION_VISUALIZE_GEO_FIELD" | "ACTION_VISUALIZE_LENS_FIELD" | "ACTION_GLOBAL_APPLY_FILTER" | "ACTION_SELECT_RANGE" | "ACTION_VALUE_CLICK" | "ACTION_CUSTOMIZE_PANEL" | "ACTION_ADD_PANEL" | "openInspector" | "deletePanel" | "editPanel" | "togglePanel" | "replacePanel" | "clonePanel" | "addToFromLibrary" | "unlinkFromLibrary" | "ACTION_LIBRARY_NOTIFICATION" | "ACTION_EXPORT_CSV">) => void;
readonly addTriggerAction: <T extends "" | "ROW_CLICK_TRIGGER" | "VISUALIZE_FIELD_TRIGGER" | "VISUALIZE_GEO_FIELD_TRIGGER" | "FILTER_TRIGGER" | "CONTEXT_MENU_TRIGGER" | "PANEL_BADGE_TRIGGER" | "PANEL_NOTIFICATION_TRIGGER" | "SELECT_RANGE_TRIGGER" | "VALUE_CLICK_TRIGGER">(triggerId: T, action: UiActionsActionDefinition<TriggerContextMapping[T]> | Action<TriggerContextMapping[T], "" | "ACTION_VISUALIZE_FIELD" | "ACTION_VISUALIZE_GEO_FIELD" | "ACTION_VISUALIZE_LENS_FIELD" | "ACTION_GLOBAL_APPLY_FILTER" | "ACTION_SELECT_RANGE" | "ACTION_VALUE_CLICK" | "ACTION_CUSTOMIZE_PANEL" | "ACTION_ADD_PANEL" | "openInspector" | "deletePanel" | "editPanel">) => void;
// (undocumented)
readonly attachAction: <T extends "" | "SELECT_RANGE_TRIGGER" | "VALUE_CLICK_TRIGGER" | "ROW_CLICK_TRIGGER" | "FILTER_TRIGGER" | "VISUALIZE_FIELD_TRIGGER" | "VISUALIZE_GEO_FIELD_TRIGGER" | "CONTEXT_MENU_TRIGGER" | "PANEL_BADGE_TRIGGER" | "PANEL_NOTIFICATION_TRIGGER">(triggerId: T, actionId: string) => void;
readonly attachAction: <T extends "" | "ROW_CLICK_TRIGGER" | "VISUALIZE_FIELD_TRIGGER" | "VISUALIZE_GEO_FIELD_TRIGGER" | "FILTER_TRIGGER" | "CONTEXT_MENU_TRIGGER" | "PANEL_BADGE_TRIGGER" | "PANEL_NOTIFICATION_TRIGGER" | "SELECT_RANGE_TRIGGER" | "VALUE_CLICK_TRIGGER">(triggerId: T, actionId: string) => void;
readonly clear: () => void;
// (undocumented)
readonly detachAction: (triggerId: TriggerId, actionId: string) => void;
// @deprecated (undocumented)
readonly executeTriggerActions: <T extends "" | "SELECT_RANGE_TRIGGER" | "VALUE_CLICK_TRIGGER" | "ROW_CLICK_TRIGGER" | "FILTER_TRIGGER" | "VISUALIZE_FIELD_TRIGGER" | "VISUALIZE_GEO_FIELD_TRIGGER" | "CONTEXT_MENU_TRIGGER" | "PANEL_BADGE_TRIGGER" | "PANEL_NOTIFICATION_TRIGGER">(triggerId: T, context: TriggerContext<T>) => Promise<void>;
readonly executeTriggerActions: <T extends "" | "ROW_CLICK_TRIGGER" | "VISUALIZE_FIELD_TRIGGER" | "VISUALIZE_GEO_FIELD_TRIGGER" | "FILTER_TRIGGER" | "CONTEXT_MENU_TRIGGER" | "PANEL_BADGE_TRIGGER" | "PANEL_NOTIFICATION_TRIGGER" | "SELECT_RANGE_TRIGGER" | "VALUE_CLICK_TRIGGER">(triggerId: T, context: TriggerContext<T>) => Promise<void>;
// Warning: (ae-forgotten-export) The symbol "UiActionsExecutionService" needs to be exported by the entry point index.d.ts
//
// (undocumented)
readonly executionService: UiActionsExecutionService;
readonly fork: () => UiActionsService;
// (undocumented)
readonly getAction: <T extends UiActionsActionDefinition<{}>>(id: string) => Action<ActionContext<T>, "" | "ACTION_VISUALIZE_FIELD" | "ACTION_VISUALIZE_GEO_FIELD" | "ACTION_VISUALIZE_LENS_FIELD" | "ACTION_GLOBAL_APPLY_FILTER" | "ACTION_SELECT_RANGE" | "ACTION_VALUE_CLICK" | "ACTION_CUSTOMIZE_PANEL" | "ACTION_ADD_PANEL" | "openInspector" | "deletePanel" | "editPanel" | "togglePanel" | "replacePanel" | "clonePanel" | "addToFromLibrary" | "unlinkFromLibrary" | "ACTION_LIBRARY_NOTIFICATION" | "ACTION_EXPORT_CSV">;
readonly getAction: <T extends UiActionsActionDefinition<{}>>(id: string) => Action<ActionContext<T>, "" | "ACTION_VISUALIZE_FIELD" | "ACTION_VISUALIZE_GEO_FIELD" | "ACTION_VISUALIZE_LENS_FIELD" | "ACTION_GLOBAL_APPLY_FILTER" | "ACTION_SELECT_RANGE" | "ACTION_VALUE_CLICK" | "ACTION_CUSTOMIZE_PANEL" | "ACTION_ADD_PANEL" | "openInspector" | "deletePanel" | "editPanel">;
// Warning: (ae-forgotten-export) The symbol "TriggerContract" needs to be exported by the entry point index.d.ts
//
// (undocumented)
readonly getTrigger: <T extends "" | "SELECT_RANGE_TRIGGER" | "VALUE_CLICK_TRIGGER" | "ROW_CLICK_TRIGGER" | "FILTER_TRIGGER" | "VISUALIZE_FIELD_TRIGGER" | "VISUALIZE_GEO_FIELD_TRIGGER" | "CONTEXT_MENU_TRIGGER" | "PANEL_BADGE_TRIGGER" | "PANEL_NOTIFICATION_TRIGGER">(triggerId: T) => TriggerContract<T>;
readonly getTrigger: <T extends "" | "ROW_CLICK_TRIGGER" | "VISUALIZE_FIELD_TRIGGER" | "VISUALIZE_GEO_FIELD_TRIGGER" | "FILTER_TRIGGER" | "CONTEXT_MENU_TRIGGER" | "PANEL_BADGE_TRIGGER" | "PANEL_NOTIFICATION_TRIGGER" | "SELECT_RANGE_TRIGGER" | "VALUE_CLICK_TRIGGER">(triggerId: T) => TriggerContract<T>;
// (undocumented)
readonly getTriggerActions: <T extends "" | "SELECT_RANGE_TRIGGER" | "VALUE_CLICK_TRIGGER" | "ROW_CLICK_TRIGGER" | "FILTER_TRIGGER" | "VISUALIZE_FIELD_TRIGGER" | "VISUALIZE_GEO_FIELD_TRIGGER" | "CONTEXT_MENU_TRIGGER" | "PANEL_BADGE_TRIGGER" | "PANEL_NOTIFICATION_TRIGGER">(triggerId: T) => Action<TriggerContextMapping[T], "" | "ACTION_VISUALIZE_FIELD" | "ACTION_VISUALIZE_GEO_FIELD" | "ACTION_VISUALIZE_LENS_FIELD" | "ACTION_GLOBAL_APPLY_FILTER" | "ACTION_SELECT_RANGE" | "ACTION_VALUE_CLICK" | "ACTION_CUSTOMIZE_PANEL" | "ACTION_ADD_PANEL" | "openInspector" | "deletePanel" | "editPanel" | "togglePanel" | "replacePanel" | "clonePanel" | "addToFromLibrary" | "unlinkFromLibrary" | "ACTION_LIBRARY_NOTIFICATION" | "ACTION_EXPORT_CSV">[];
readonly getTriggerActions: <T extends "" | "ROW_CLICK_TRIGGER" | "VISUALIZE_FIELD_TRIGGER" | "VISUALIZE_GEO_FIELD_TRIGGER" | "FILTER_TRIGGER" | "CONTEXT_MENU_TRIGGER" | "PANEL_BADGE_TRIGGER" | "PANEL_NOTIFICATION_TRIGGER" | "SELECT_RANGE_TRIGGER" | "VALUE_CLICK_TRIGGER">(triggerId: T) => Action<TriggerContextMapping[T], "" | "ACTION_VISUALIZE_FIELD" | "ACTION_VISUALIZE_GEO_FIELD" | "ACTION_VISUALIZE_LENS_FIELD" | "ACTION_GLOBAL_APPLY_FILTER" | "ACTION_SELECT_RANGE" | "ACTION_VALUE_CLICK" | "ACTION_CUSTOMIZE_PANEL" | "ACTION_ADD_PANEL" | "openInspector" | "deletePanel" | "editPanel">[];
// (undocumented)
readonly getTriggerCompatibleActions: <T extends "" | "SELECT_RANGE_TRIGGER" | "VALUE_CLICK_TRIGGER" | "ROW_CLICK_TRIGGER" | "FILTER_TRIGGER" | "VISUALIZE_FIELD_TRIGGER" | "VISUALIZE_GEO_FIELD_TRIGGER" | "CONTEXT_MENU_TRIGGER" | "PANEL_BADGE_TRIGGER" | "PANEL_NOTIFICATION_TRIGGER">(triggerId: T, context: TriggerContextMapping[T]) => Promise<Action<TriggerContextMapping[T], "" | "ACTION_VISUALIZE_FIELD" | "ACTION_VISUALIZE_GEO_FIELD" | "ACTION_VISUALIZE_LENS_FIELD" | "ACTION_GLOBAL_APPLY_FILTER" | "ACTION_SELECT_RANGE" | "ACTION_VALUE_CLICK" | "ACTION_CUSTOMIZE_PANEL" | "ACTION_ADD_PANEL" | "openInspector" | "deletePanel" | "editPanel" | "togglePanel" | "replacePanel" | "clonePanel" | "addToFromLibrary" | "unlinkFromLibrary" | "ACTION_LIBRARY_NOTIFICATION" | "ACTION_EXPORT_CSV">[]>;
readonly getTriggerCompatibleActions: <T extends "" | "ROW_CLICK_TRIGGER" | "VISUALIZE_FIELD_TRIGGER" | "VISUALIZE_GEO_FIELD_TRIGGER" | "FILTER_TRIGGER" | "CONTEXT_MENU_TRIGGER" | "PANEL_BADGE_TRIGGER" | "PANEL_NOTIFICATION_TRIGGER" | "SELECT_RANGE_TRIGGER" | "VALUE_CLICK_TRIGGER">(triggerId: T, context: TriggerContextMapping[T]) => Promise<Action<TriggerContextMapping[T], "" | "ACTION_VISUALIZE_FIELD" | "ACTION_VISUALIZE_GEO_FIELD" | "ACTION_VISUALIZE_LENS_FIELD" | "ACTION_GLOBAL_APPLY_FILTER" | "ACTION_SELECT_RANGE" | "ACTION_VALUE_CLICK" | "ACTION_CUSTOMIZE_PANEL" | "ACTION_ADD_PANEL" | "openInspector" | "deletePanel" | "editPanel">[]>;
// (undocumented)
readonly hasAction: (actionId: string) => boolean;
// Warning: (ae-forgotten-export) The symbol "ActionContext" needs to be exported by the entry point index.d.ts
//
// (undocumented)
readonly registerAction: <A extends UiActionsActionDefinition<{}>>(definition: A) => Action<ActionContext<A>, "" | "ACTION_VISUALIZE_FIELD" | "ACTION_VISUALIZE_GEO_FIELD" | "ACTION_VISUALIZE_LENS_FIELD" | "ACTION_GLOBAL_APPLY_FILTER" | "ACTION_SELECT_RANGE" | "ACTION_VALUE_CLICK" | "ACTION_CUSTOMIZE_PANEL" | "ACTION_ADD_PANEL" | "openInspector" | "deletePanel" | "editPanel" | "togglePanel" | "replacePanel" | "clonePanel" | "addToFromLibrary" | "unlinkFromLibrary" | "ACTION_LIBRARY_NOTIFICATION" | "ACTION_EXPORT_CSV">;
readonly registerAction: <A extends UiActionsActionDefinition<{}>>(definition: A) => Action<ActionContext<A>, "" | "ACTION_VISUALIZE_FIELD" | "ACTION_VISUALIZE_GEO_FIELD" | "ACTION_VISUALIZE_LENS_FIELD" | "ACTION_GLOBAL_APPLY_FILTER" | "ACTION_SELECT_RANGE" | "ACTION_VALUE_CLICK" | "ACTION_CUSTOMIZE_PANEL" | "ACTION_ADD_PANEL" | "openInspector" | "deletePanel" | "editPanel">;
// (undocumented)
readonly registerTrigger: (trigger: Trigger) => void;
// Warning: (ae-forgotten-export) The symbol "TriggerRegistry" needs to be exported by the entry point index.d.ts
@ -326,16 +289,6 @@ export type UiActionsSetup = Pick<UiActionsService, 'addTriggerAction' | 'attach
// @public (undocumented)
export type UiActionsStart = PublicMethodsOf<UiActionsService>;
// Warning: (ae-missing-release-tag) "VALUE_CLICK_TRIGGER" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal)
//
// @public (undocumented)
export const VALUE_CLICK_TRIGGER = "VALUE_CLICK_TRIGGER";
// Warning: (ae-missing-release-tag) "valueClickTrigger" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal)
//
// @public (undocumented)
export const valueClickTrigger: Trigger<'VALUE_CLICK_TRIGGER'>;
// Warning: (ae-missing-release-tag) "VISUALIZE_FIELD_TRIGGER" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal)
//
// @public (undocumented)
@ -371,7 +324,7 @@ export const visualizeGeoFieldTrigger: Trigger<'VISUALIZE_GEO_FIELD_TRIGGER'>;
// Warnings were encountered during analysis:
//
// src/plugins/ui_actions/public/triggers/row_click_trigger.ts:45:5 - (ae-forgotten-export) The symbol "Datatable" needs to be exported by the entry point index.d.ts
// src/plugins/ui_actions/public/triggers/row_click_trigger.ts:46:5 - (ae-forgotten-export) The symbol "Datatable" needs to be exported by the entry point index.d.ts
// (No @packageDocumentation comment for this package)

View file

@ -20,10 +20,7 @@
export * from './trigger';
export * from './trigger_contract';
export * from './trigger_internal';
export * from './select_range_trigger';
export * from './value_click_trigger';
export * from './row_click_trigger';
export * from './apply_filter_trigger';
export * from './visualize_field_trigger';
export * from './visualize_geo_field_trigger';
export * from './default_trigger';

View file

@ -18,7 +18,6 @@
*/
import { i18n } from '@kbn/i18n';
import { IEmbeddable } from '../../../embeddable/public';
import { Trigger } from '.';
import { Datatable } from '../../../expressions';
@ -35,7 +34,9 @@ export const rowClickTrigger: Trigger<'ROW_CLICK_TRIGGER'> = {
};
export interface RowClickContext {
embeddable?: IEmbeddable;
// Need to make this unknown to prevent circular dependencies.
// Apps using this property will need to cast to `IEmbeddable`.
embeddable?: unknown;
data: {
/**
* Row index, starting from 0, where user clicked.

View file

@ -1,32 +0,0 @@
/*
* Licensed to Elasticsearch B.V. under one or more contributor
* license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright
* ownership. Elasticsearch B.V. licenses this file to you under
* the Apache License, Version 2.0 (the "License"); you may
* not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
*/
import { i18n } from '@kbn/i18n';
import { Trigger } from '.';
export const SELECT_RANGE_TRIGGER = 'SELECT_RANGE_TRIGGER';
export const selectRangeTrigger: Trigger<'SELECT_RANGE_TRIGGER'> = {
id: SELECT_RANGE_TRIGGER,
title: i18n.translate('uiActions.triggers.selectRangeTitle', {
defaultMessage: 'Range selection',
}),
description: i18n.translate('uiActions.triggers.selectRangeDescription', {
defaultMessage: 'A range of values on the visualization',
}),
};

View file

@ -32,8 +32,7 @@ import { TriggerContextMapping, TriggerId } from '../types';
*/
export interface Trigger<ID extends TriggerId = TriggerId> {
/**
* 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.
*/
id: ID;

View file

@ -25,8 +25,7 @@ import { TriggerId, TriggerContextMapping } from '../types';
*/
export class TriggerContract<T extends TriggerId> {
/**
* 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.
*/
public readonly id: T;

View file

@ -20,17 +20,12 @@
import { ActionInternal } from './actions/action_internal';
import { TriggerInternal } from './triggers/trigger_internal';
import {
SELECT_RANGE_TRIGGER,
VALUE_CLICK_TRIGGER,
ROW_CLICK_TRIGGER,
APPLY_FILTER_TRIGGER,
VISUALIZE_FIELD_TRIGGER,
VISUALIZE_GEO_FIELD_TRIGGER,
DEFAULT_TRIGGER,
RowClickContext,
} from './triggers';
import type { RangeSelectContext, ValueClickContext } from '../../embeddable/public';
import type { ApplyGlobalFilterActionContext } from '../../data/public';
export type TriggerRegistry = Map<TriggerId, TriggerInternal<any>>;
export type ActionRegistry = Map<string, ActionInternal>;
@ -49,10 +44,7 @@ export type TriggerContext = BaseContext;
export interface TriggerContextMapping {
[DEFAULT_TRIGGER]: TriggerContext;
[SELECT_RANGE_TRIGGER]: RangeSelectContext;
[VALUE_CLICK_TRIGGER]: ValueClickContext;
[ROW_CLICK_TRIGGER]: RowClickContext;
[APPLY_FILTER_TRIGGER]: ApplyGlobalFilterActionContext;
[VISUALIZE_FIELD_TRIGGER]: VisualizeFieldContext;
[VISUALIZE_GEO_FIELD_TRIGGER]: VisualizeFieldContext;
}

View file

@ -23,6 +23,7 @@ import classNames from 'classnames';
import { CoreStart } from 'kibana/public';
import { IInterpreterRenderHandlers } from 'src/plugins/expressions';
import type { PersistedState } from 'src/plugins/visualizations/public';
import { KibanaContextProvider } from '../../../kibana_react/public';
import { TableVisConfig } from '../types';
import { TableContext } from '../table_vis_response_handler';
@ -47,7 +48,7 @@ const TableVisualizationComponent = ({
handlers.done();
}, [handlers]);
const uiStateProps = useUiState(handlers.uiState);
const uiStateProps = useUiState(handlers.uiState as PersistedState);
const className = classNames('tbvChart', {
// eslint-disable-next-line @typescript-eslint/naming-convention

View file

@ -19,7 +19,7 @@
import { debounce, isEqual } from 'lodash';
import { useCallback, useEffect, useRef, useState } from 'react';
import { IInterpreterRenderHandlers } from 'src/plugins/expressions';
import type { PersistedState } from 'src/plugins/visualizations/public';
import { ColumnWidthData, TableVisUiState, TableVisUseUiStateProps } from '../../types';
@ -28,9 +28,7 @@ const defaultSort = {
direction: null,
};
export const useUiState = (
uiState: IInterpreterRenderHandlers['uiState']
): TableVisUseUiStateProps => {
export const useUiState = (uiState: PersistedState): TableVisUseUiStateProps => {
const [sort, setSortState] = useState<TableVisUiState['sort']>(
uiState?.get('vis.params.sort') || defaultSort
);

View file

@ -21,6 +21,7 @@ import React, { lazy } from 'react';
import { render, unmountComponentAtNode } from 'react-dom';
import { IUiSettingsClient } from 'kibana/public';
import type { PersistedState } from '../../visualizations/public';
import { VisualizationContainer } from '../../visualizations/public';
import { ExpressionRenderDefinition } from '../../expressions/common/expression_renderers';
import { TimeseriesRenderValue, TimeseriesVisParams } from './metrics_fn';
@ -63,7 +64,7 @@ export const getTimeseriesVisRenderer: (deps: {
handlers={handlers}
model={config.visParams}
visData={config.visData as TimeseriesVisData}
uiState={handlers.uiState!}
uiState={handlers.uiState! as PersistedState}
/>
</VisualizationContainer>,
domNode

View file

@ -22,7 +22,7 @@ import React, { RefObject } from 'react';
import { mountReactNode } from '../../../core/public/utils';
import { ChartsPluginSetup } from '../../charts/public';
import { PersistedState } from '../../visualizations/public';
import type { PersistedState } from '../../visualizations/public';
import { IInterpreterRenderHandlers } from '../../expressions/public';
import { VisTypeVislibCoreSetup } from './plugin';
@ -115,7 +115,7 @@ export const createVislibVisController = (
})
.addClass((legendClassName as any)[visParams.legendPosition]);
this.mountLegend(esResponse, visParams, fireEvent, uiState);
this.mountLegend(esResponse, visParams, fireEvent, uiState as PersistedState);
}
this.vislibVis.render(esResponse, uiState);
@ -128,7 +128,7 @@ export const createVislibVisController = (
CUSTOM_LEGEND_VIS_TYPES.includes(this.vislibVis.visConfigArgs.type)
) {
this.unmountLegend?.();
this.mountLegend(esResponse, visParams, fireEvent, uiState);
this.mountLegend(esResponse, visParams, fireEvent, uiState as PersistedState);
this.vislibVis.render(esResponse, uiState);
}
}

View file

@ -22,6 +22,7 @@ import { EuiResizeObserver } from '@elastic/eui';
import { debounce } from 'lodash';
import { IInterpreterRenderHandlers } from '../../expressions/public';
import type { PersistedState } from '../../visualizations/public';
import { ChartsPluginSetup } from '../../charts/public';
import { VislibRenderValue } from './vis_type_vislib_vis_fn';
@ -66,10 +67,12 @@ const VislibWrapper = ({ core, charts, visData, visConfig, handlers }: VislibWra
useEffect(() => {
if (handlers.uiState) {
handlers.uiState.on('change', updateChart);
const uiState = handlers.uiState as PersistedState;
uiState.on('change', updateChart);
return () => {
handlers.uiState?.off('change', updateChart);
uiState?.off('change', updateChart);
};
}
}, [handlers.uiState, updateChart]);

View file

@ -50,6 +50,7 @@ import {
ClickTriggerEvent,
} from '../../charts/public';
import { Datatable, IInterpreterRenderHandlers } from '../../expressions/public';
import type { PersistedState } from '../../visualizations/public';
import { VisParams } from './types';
import {
@ -77,7 +78,7 @@ import {
export interface VisComponentProps {
visParams: VisParams;
visData: Datatable;
uiState: IInterpreterRenderHandlers['uiState'];
uiState: PersistedState;
fireEvent: IInterpreterRenderHandlers['event'];
renderComplete: IInterpreterRenderHandlers['done'];
}

View file

@ -24,6 +24,7 @@ import { I18nProvider } from '@kbn/i18n/react';
import { ExpressionRenderDefinition } from '../../expressions/public';
import { VisualizationContainer } from '../../visualizations/public';
import type { PersistedState } from '../../visualizations/public';
import { XyVisType } from '../common';
import { SplitChartWarning } from './components/split_chart_warning';
@ -59,7 +60,7 @@ export const xyVisRenderer: ExpressionRenderDefinition<RenderValue> = {
visData={visData}
renderComplete={handlers.done}
fireEvent={handlers.event}
uiState={handlers.uiState}
uiState={handlers.uiState as PersistedState}
/>
</VisualizationContainer>
</>

View file

@ -17,12 +17,9 @@
* under the License.
*/
import {
APPLY_FILTER_TRIGGER,
SELECT_RANGE_TRIGGER,
VALUE_CLICK_TRIGGER,
ROW_CLICK_TRIGGER,
} from '../../../ui_actions/public';
import { ROW_CLICK_TRIGGER } from '../../../ui_actions/public';
import { APPLY_FILTER_TRIGGER } from '../../../../plugins/data/public';
import { SELECT_RANGE_TRIGGER, VALUE_CLICK_TRIGGER } from '../../../../plugins/embeddable/public';
export interface VisEventToTrigger {
['applyFilter']: typeof APPLY_FILTER_TRIGGER;

View file

@ -71,6 +71,9 @@ export interface VisualizeInput extends EmbeddableInput {
};
savedVis?: SerializedVis;
table?: unknown;
query?: Query;
filters?: Filter[];
timeRange?: TimeRange;
}
export interface VisualizeOutput extends EmbeddableOutput {

View file

@ -18,10 +18,12 @@ import {
EuiFlexGroup,
} from '@elastic/eui';
import { SampleMlJob, SampleApp1ClickContext } from '../../triggers';
import { EmbeddableRoot } from '../../../../../../src/plugins/embeddable/public';
import {
EmbeddableRoot,
VALUE_CLICK_TRIGGER,
} from '../../../../../../src/plugins/embeddable/public';
import { ButtonEmbeddable } from '../../embeddables/button_embeddable';
import { useUiActions } from '../../context';
import { VALUE_CLICK_TRIGGER } from '../../../../../../src/plugins/ui_actions/public';
export const job: SampleMlJob = {
job_id: '123',

View file

@ -8,12 +8,12 @@ import React from 'react';
import { EuiFormRow, EuiFieldText } from '@elastic/eui';
import { reactToUiComponent } from '../../../../../../src/plugins/kibana_react/public';
import { UiActionsEnhancedDrilldownDefinition as Drilldown } from '../../../../../plugins/ui_actions_enhanced/public';
import { ChartActionContext } from '../../../../../../src/plugins/embeddable/public';
import { CollectConfigProps } from '../../../../../../src/plugins/kibana_utils/public';
import {
ChartActionContext,
SELECT_RANGE_TRIGGER,
VALUE_CLICK_TRIGGER,
} from '../../../../../../src/plugins/ui_actions/public';
} from '../../../../../../src/plugins/embeddable/public';
import { CollectConfigProps } from '../../../../../../src/plugins/kibana_utils/public';
export type ActionContext = ChartActionContext;

View file

@ -8,9 +8,11 @@ import React from 'react';
import { EuiFormRow, EuiFieldText } from '@elastic/eui';
import { reactToUiComponent } from '../../../../../../src/plugins/kibana_react/public';
import { UiActionsEnhancedDrilldownDefinition as Drilldown } from '../../../../../plugins/ui_actions_enhanced/public';
import { RangeSelectContext } from '../../../../../../src/plugins/embeddable/public';
import {
RangeSelectContext,
SELECT_RANGE_TRIGGER,
} from '../../../../../../src/plugins/embeddable/public';
import { CollectConfigProps } from '../../../../../../src/plugins/kibana_utils/public';
import { SELECT_RANGE_TRIGGER } from '../../../../../../src/plugins/ui_actions/public';
import { BaseActionFactoryContext } from '../../../../../plugins/ui_actions_enhanced/public/dynamic_actions';
export type Config = {

Some files were not shown because too many files have changed in this diff Show more