diff --git a/docs/developer/plugin-list.asciidoc b/docs/developer/plugin-list.asciidoc index 4918a87a3ff76..da62d1707f065 100644 --- a/docs/developer/plugin-list.asciidoc +++ b/docs/developer/plugin-list.asciidoc @@ -180,9 +180,16 @@ It also provides a stateful version of it on the start contract. which also contains the timelion APIs and backend, look at the vis_type_timelion plugin. -|{kib-repo}blob/{branch}/src/plugins/ui_actions/README.md[uiActions] +|<> |An API for: +- creating custom functionality (`actions`) +- creating custom user interaction events (`triggers`) +- attaching and detaching `actions` to `triggers`. +- emitting `trigger` events +- executing `actions` attached to a given `trigger`. +- exposing a context menu for the user to choose the appropriate action when there are multiple actions attached to a single trigger. + |{kib-repo}blob/{branch}/src/plugins/url_forwarding/README.md[urlForwarding] |This plugins contains helpers to redirect legacy URLs. It can be used to forward old URLs to their new counterparts. @@ -524,5 +531,6 @@ in their infrastructure. include::{kibana-root}/src/plugins/dashboard/README.asciidoc[leveloffset=+1] include::{kibana-root}/src/plugins/expressions/README.asciidoc[leveloffset=+1] +include::{kibana-root}/src/plugins/ui_actions/README.asciidoc[leveloffset=+1] include::{kibana-root}/x-pack/plugins/dashboard_enhanced/README.asciidoc[leveloffset=+1] include::{kibana-root}/x-pack/plugins/embeddable_enhanced/README.asciidoc[leveloffset=+1] diff --git a/docs/development/plugins/ui_actions/public/index.md b/docs/development/plugins/ui_actions/public/index.md new file mode 100644 index 0000000000000..cbc7035b880fa --- /dev/null +++ b/docs/development/plugins/ui_actions/public/index.md @@ -0,0 +1,12 @@ + + +[Home](./index.md) + +## API Reference + +## Packages + +| Package | Description | +| --- | --- | +| [kibana-plugin-plugins-ui\_actions-public](./kibana-plugin-plugins-ui_actions-public.md) | | + diff --git a/docs/development/plugins/ui_actions/public/kibana-plugin-plugins-ui_actions-public.action.execute.md b/docs/development/plugins/ui_actions/public/kibana-plugin-plugins-ui_actions-public.action.execute.md new file mode 100644 index 0000000000000..22a520123cf3f --- /dev/null +++ b/docs/development/plugins/ui_actions/public/kibana-plugin-plugins-ui_actions-public.action.execute.md @@ -0,0 +1,24 @@ + + +[Home](./index.md) > [kibana-plugin-plugins-ui\_actions-public](./kibana-plugin-plugins-ui_actions-public.md) > [Action](./kibana-plugin-plugins-ui_actions-public.action.md) > [execute](./kibana-plugin-plugins-ui_actions-public.action.execute.md) + +## Action.execute() method + +Executes the action. + +Signature: + +```typescript +execute(context: ActionExecutionContext): Promise; +``` + +## Parameters + +| Parameter | Type | Description | +| --- | --- | --- | +| context | ActionExecutionContext<Context> | | + +Returns: + +`Promise` + diff --git a/docs/development/plugins/ui_actions/public/kibana-plugin-plugins-ui_actions-public.action.getdisplayname.md b/docs/development/plugins/ui_actions/public/kibana-plugin-plugins-ui_actions-public.action.getdisplayname.md new file mode 100644 index 0000000000000..cd8cc527e96ec --- /dev/null +++ b/docs/development/plugins/ui_actions/public/kibana-plugin-plugins-ui_actions-public.action.getdisplayname.md @@ -0,0 +1,24 @@ + + +[Home](./index.md) > [kibana-plugin-plugins-ui\_actions-public](./kibana-plugin-plugins-ui_actions-public.md) > [Action](./kibana-plugin-plugins-ui_actions-public.action.md) > [getDisplayName](./kibana-plugin-plugins-ui_actions-public.action.getdisplayname.md) + +## Action.getDisplayName() method + +Returns a title to be displayed to the user. + +Signature: + +```typescript +getDisplayName(context: ActionExecutionContext): string; +``` + +## Parameters + +| Parameter | Type | Description | +| --- | --- | --- | +| context | ActionExecutionContext<Context> | | + +Returns: + +`string` + diff --git a/docs/development/plugins/ui_actions/public/kibana-plugin-plugins-ui_actions-public.action.gethref.md b/docs/development/plugins/ui_actions/public/kibana-plugin-plugins-ui_actions-public.action.gethref.md new file mode 100644 index 0000000000000..5ad9d5e24cf87 --- /dev/null +++ b/docs/development/plugins/ui_actions/public/kibana-plugin-plugins-ui_actions-public.action.gethref.md @@ -0,0 +1,24 @@ + + +[Home](./index.md) > [kibana-plugin-plugins-ui\_actions-public](./kibana-plugin-plugins-ui_actions-public.md) > [Action](./kibana-plugin-plugins-ui_actions-public.action.md) > [getHref](./kibana-plugin-plugins-ui_actions-public.action.gethref.md) + +## Action.getHref() method + +This method should return a link if this item can be clicked on. The link is used to navigate user if user middle-clicks it or Ctrl + clicks or right-clicks and selects "Open in new tab". + +Signature: + +```typescript +getHref?(context: ActionExecutionContext): Promise; +``` + +## Parameters + +| Parameter | Type | Description | +| --- | --- | --- | +| context | ActionExecutionContext<Context> | | + +Returns: + +`Promise` + diff --git a/docs/development/plugins/ui_actions/public/kibana-plugin-plugins-ui_actions-public.action.geticontype.md b/docs/development/plugins/ui_actions/public/kibana-plugin-plugins-ui_actions-public.action.geticontype.md new file mode 100644 index 0000000000000..34d45c4ec75c2 --- /dev/null +++ b/docs/development/plugins/ui_actions/public/kibana-plugin-plugins-ui_actions-public.action.geticontype.md @@ -0,0 +1,24 @@ + + +[Home](./index.md) > [kibana-plugin-plugins-ui\_actions-public](./kibana-plugin-plugins-ui_actions-public.md) > [Action](./kibana-plugin-plugins-ui_actions-public.action.md) > [getIconType](./kibana-plugin-plugins-ui_actions-public.action.geticontype.md) + +## Action.getIconType() method + +Optional EUI icon type that can be displayed along with the title. + +Signature: + +```typescript +getIconType(context: ActionExecutionContext): string | undefined; +``` + +## Parameters + +| Parameter | Type | Description | +| --- | --- | --- | +| context | ActionExecutionContext<Context> | | + +Returns: + +`string | undefined` + diff --git a/docs/development/plugins/ui_actions/public/kibana-plugin-plugins-ui_actions-public.action.id.md b/docs/development/plugins/ui_actions/public/kibana-plugin-plugins-ui_actions-public.action.id.md new file mode 100644 index 0000000000000..e32a5c8592cce --- /dev/null +++ b/docs/development/plugins/ui_actions/public/kibana-plugin-plugins-ui_actions-public.action.id.md @@ -0,0 +1,13 @@ + + +[Home](./index.md) > [kibana-plugin-plugins-ui\_actions-public](./kibana-plugin-plugins-ui_actions-public.md) > [Action](./kibana-plugin-plugins-ui_actions-public.action.md) > [id](./kibana-plugin-plugins-ui_actions-public.action.id.md) + +## Action.id property + +A unique identifier for this action instance. + +Signature: + +```typescript +id: string; +``` diff --git a/docs/development/plugins/ui_actions/public/kibana-plugin-plugins-ui_actions-public.action.iscompatible.md b/docs/development/plugins/ui_actions/public/kibana-plugin-plugins-ui_actions-public.action.iscompatible.md new file mode 100644 index 0000000000000..7a1f6cd23be17 --- /dev/null +++ b/docs/development/plugins/ui_actions/public/kibana-plugin-plugins-ui_actions-public.action.iscompatible.md @@ -0,0 +1,24 @@ + + +[Home](./index.md) > [kibana-plugin-plugins-ui\_actions-public](./kibana-plugin-plugins-ui_actions-public.md) > [Action](./kibana-plugin-plugins-ui_actions-public.action.md) > [isCompatible](./kibana-plugin-plugins-ui_actions-public.action.iscompatible.md) + +## Action.isCompatible() method + +Returns a promise that resolves to true if this action is compatible given the context, otherwise resolves to false. + +Signature: + +```typescript +isCompatible(context: ActionExecutionContext): Promise; +``` + +## Parameters + +| Parameter | Type | Description | +| --- | --- | --- | +| context | ActionExecutionContext<Context> | | + +Returns: + +`Promise` + diff --git a/docs/development/plugins/ui_actions/public/kibana-plugin-plugins-ui_actions-public.action.md b/docs/development/plugins/ui_actions/public/kibana-plugin-plugins-ui_actions-public.action.md new file mode 100644 index 0000000000000..19af63a679de8 --- /dev/null +++ b/docs/development/plugins/ui_actions/public/kibana-plugin-plugins-ui_actions-public.action.md @@ -0,0 +1,32 @@ + + +[Home](./index.md) > [kibana-plugin-plugins-ui\_actions-public](./kibana-plugin-plugins-ui_actions-public.md) > [Action](./kibana-plugin-plugins-ui_actions-public.action.md) + +## Action interface + +Signature: + +```typescript +export interface Action extends Partial>> +``` + +## Properties + +| Property | Type | Description | +| --- | --- | --- | +| [id](./kibana-plugin-plugins-ui_actions-public.action.id.md) | string | A unique identifier for this action instance. | +| [MenuItem](./kibana-plugin-plugins-ui_actions-public.action.menuitem.md) | UiComponent<{
context: ActionExecutionContext<Context>;
}> | UiComponent to render when displaying this action as a context menu item. If not provided, getDisplayName will be used instead. | +| [order](./kibana-plugin-plugins-ui_actions-public.action.order.md) | number | Determined the order when there is more than one action matched to a trigger. Higher numbers are displayed first. | +| [type](./kibana-plugin-plugins-ui_actions-public.action.type.md) | T | The action type is what determines the context shape. | + +## Methods + +| Method | Description | +| --- | --- | +| [execute(context)](./kibana-plugin-plugins-ui_actions-public.action.execute.md) | Executes the action. | +| [getDisplayName(context)](./kibana-plugin-plugins-ui_actions-public.action.getdisplayname.md) | Returns a title to be displayed to the user. | +| [getHref(context)](./kibana-plugin-plugins-ui_actions-public.action.gethref.md) | This method should return a link if this item can be clicked on. The link is used to navigate user if user middle-clicks it or Ctrl + clicks or right-clicks and selects "Open in new tab". | +| [getIconType(context)](./kibana-plugin-plugins-ui_actions-public.action.geticontype.md) | Optional EUI icon type that can be displayed along with the title. | +| [isCompatible(context)](./kibana-plugin-plugins-ui_actions-public.action.iscompatible.md) | Returns a promise that resolves to true if this action is compatible given the context, otherwise resolves to false. | +| [shouldAutoExecute(context)](./kibana-plugin-plugins-ui_actions-public.action.shouldautoexecute.md) | Determines if action should be executed automatically, without first showing up in context menu. false by default. | + diff --git a/docs/development/plugins/ui_actions/public/kibana-plugin-plugins-ui_actions-public.action.menuitem.md b/docs/development/plugins/ui_actions/public/kibana-plugin-plugins-ui_actions-public.action.menuitem.md new file mode 100644 index 0000000000000..ac2168b88e3be --- /dev/null +++ b/docs/development/plugins/ui_actions/public/kibana-plugin-plugins-ui_actions-public.action.menuitem.md @@ -0,0 +1,15 @@ + + +[Home](./index.md) > [kibana-plugin-plugins-ui\_actions-public](./kibana-plugin-plugins-ui_actions-public.md) > [Action](./kibana-plugin-plugins-ui_actions-public.action.md) > [MenuItem](./kibana-plugin-plugins-ui_actions-public.action.menuitem.md) + +## Action.MenuItem property + +`UiComponent` to render when displaying this action as a context menu item. If not provided, `getDisplayName` will be used instead. + +Signature: + +```typescript +MenuItem?: UiComponent<{ + context: ActionExecutionContext; + }>; +``` diff --git a/docs/development/plugins/ui_actions/public/kibana-plugin-plugins-ui_actions-public.action.order.md b/docs/development/plugins/ui_actions/public/kibana-plugin-plugins-ui_actions-public.action.order.md new file mode 100644 index 0000000000000..ce9f66cfe5143 --- /dev/null +++ b/docs/development/plugins/ui_actions/public/kibana-plugin-plugins-ui_actions-public.action.order.md @@ -0,0 +1,13 @@ + + +[Home](./index.md) > [kibana-plugin-plugins-ui\_actions-public](./kibana-plugin-plugins-ui_actions-public.md) > [Action](./kibana-plugin-plugins-ui_actions-public.action.md) > [order](./kibana-plugin-plugins-ui_actions-public.action.order.md) + +## Action.order property + +Determined the order when there is more than one action matched to a trigger. Higher numbers are displayed first. + +Signature: + +```typescript +order?: number; +``` diff --git a/docs/development/plugins/ui_actions/public/kibana-plugin-plugins-ui_actions-public.action.shouldautoexecute.md b/docs/development/plugins/ui_actions/public/kibana-plugin-plugins-ui_actions-public.action.shouldautoexecute.md new file mode 100644 index 0000000000000..1a784f5dad2d5 --- /dev/null +++ b/docs/development/plugins/ui_actions/public/kibana-plugin-plugins-ui_actions-public.action.shouldautoexecute.md @@ -0,0 +1,24 @@ + + +[Home](./index.md) > [kibana-plugin-plugins-ui\_actions-public](./kibana-plugin-plugins-ui_actions-public.md) > [Action](./kibana-plugin-plugins-ui_actions-public.action.md) > [shouldAutoExecute](./kibana-plugin-plugins-ui_actions-public.action.shouldautoexecute.md) + +## Action.shouldAutoExecute() method + +Determines if action should be executed automatically, without first showing up in context menu. false by default. + +Signature: + +```typescript +shouldAutoExecute?(context: ActionExecutionContext): Promise; +``` + +## Parameters + +| Parameter | Type | Description | +| --- | --- | --- | +| context | ActionExecutionContext<Context> | | + +Returns: + +`Promise` + diff --git a/docs/development/plugins/ui_actions/public/kibana-plugin-plugins-ui_actions-public.action.type.md b/docs/development/plugins/ui_actions/public/kibana-plugin-plugins-ui_actions-public.action.type.md new file mode 100644 index 0000000000000..c423df9d1324c --- /dev/null +++ b/docs/development/plugins/ui_actions/public/kibana-plugin-plugins-ui_actions-public.action.type.md @@ -0,0 +1,13 @@ + + +[Home](./index.md) > [kibana-plugin-plugins-ui\_actions-public](./kibana-plugin-plugins-ui_actions-public.md) > [Action](./kibana-plugin-plugins-ui_actions-public.action.md) > [type](./kibana-plugin-plugins-ui_actions-public.action.type.md) + +## Action.type property + +The action type is what determines the context shape. + +Signature: + +```typescript +readonly type: T; +``` diff --git a/docs/development/plugins/ui_actions/public/kibana-plugin-plugins-ui_actions-public.action_visualize_field.md b/docs/development/plugins/ui_actions/public/kibana-plugin-plugins-ui_actions-public.action_visualize_field.md new file mode 100644 index 0000000000000..25788d7aecc9f --- /dev/null +++ b/docs/development/plugins/ui_actions/public/kibana-plugin-plugins-ui_actions-public.action_visualize_field.md @@ -0,0 +1,11 @@ + + +[Home](./index.md) > [kibana-plugin-plugins-ui\_actions-public](./kibana-plugin-plugins-ui_actions-public.md) > [ACTION\_VISUALIZE\_FIELD](./kibana-plugin-plugins-ui_actions-public.action_visualize_field.md) + +## ACTION\_VISUALIZE\_FIELD variable + +Signature: + +```typescript +ACTION_VISUALIZE_FIELD = "ACTION_VISUALIZE_FIELD" +``` diff --git a/docs/development/plugins/ui_actions/public/kibana-plugin-plugins-ui_actions-public.action_visualize_geo_field.md b/docs/development/plugins/ui_actions/public/kibana-plugin-plugins-ui_actions-public.action_visualize_geo_field.md new file mode 100644 index 0000000000000..c9ef93eff934b --- /dev/null +++ b/docs/development/plugins/ui_actions/public/kibana-plugin-plugins-ui_actions-public.action_visualize_geo_field.md @@ -0,0 +1,11 @@ + + +[Home](./index.md) > [kibana-plugin-plugins-ui\_actions-public](./kibana-plugin-plugins-ui_actions-public.md) > [ACTION\_VISUALIZE\_GEO\_FIELD](./kibana-plugin-plugins-ui_actions-public.action_visualize_geo_field.md) + +## ACTION\_VISUALIZE\_GEO\_FIELD variable + +Signature: + +```typescript +ACTION_VISUALIZE_GEO_FIELD = "ACTION_VISUALIZE_GEO_FIELD" +``` diff --git a/docs/development/plugins/ui_actions/public/kibana-plugin-plugins-ui_actions-public.actionbytype.md b/docs/development/plugins/ui_actions/public/kibana-plugin-plugins-ui_actions-public.actionbytype.md new file mode 100644 index 0000000000000..3ceb96adadb1a --- /dev/null +++ b/docs/development/plugins/ui_actions/public/kibana-plugin-plugins-ui_actions-public.actionbytype.md @@ -0,0 +1,11 @@ + + +[Home](./index.md) > [kibana-plugin-plugins-ui\_actions-public](./kibana-plugin-plugins-ui_actions-public.md) > [ActionByType](./kibana-plugin-plugins-ui_actions-public.actionbytype.md) + +## ActionByType type + +Signature: + +```typescript +export declare type ActionByType = Action; +``` diff --git a/docs/development/plugins/ui_actions/public/kibana-plugin-plugins-ui_actions-public.actioncontextmapping.__.md b/docs/development/plugins/ui_actions/public/kibana-plugin-plugins-ui_actions-public.actioncontextmapping.__.md new file mode 100644 index 0000000000000..eb7b1e5954ed2 --- /dev/null +++ b/docs/development/plugins/ui_actions/public/kibana-plugin-plugins-ui_actions-public.actioncontextmapping.__.md @@ -0,0 +1,11 @@ + + +[Home](./index.md) > [kibana-plugin-plugins-ui\_actions-public](./kibana-plugin-plugins-ui_actions-public.md) > [ActionContextMapping](./kibana-plugin-plugins-ui_actions-public.actioncontextmapping.md) > [""](./kibana-plugin-plugins-ui_actions-public.actioncontextmapping.__.md) + +## ActionContextMapping."" property + +Signature: + +```typescript +[DEFAULT_ACTION]: BaseContext; +``` diff --git a/docs/development/plugins/ui_actions/public/kibana-plugin-plugins-ui_actions-public.actioncontextmapping.action_visualize_field.md b/docs/development/plugins/ui_actions/public/kibana-plugin-plugins-ui_actions-public.actioncontextmapping.action_visualize_field.md new file mode 100644 index 0000000000000..eb0547bbf8261 --- /dev/null +++ b/docs/development/plugins/ui_actions/public/kibana-plugin-plugins-ui_actions-public.actioncontextmapping.action_visualize_field.md @@ -0,0 +1,11 @@ + + +[Home](./index.md) > [kibana-plugin-plugins-ui\_actions-public](./kibana-plugin-plugins-ui_actions-public.md) > [ActionContextMapping](./kibana-plugin-plugins-ui_actions-public.actioncontextmapping.md) > [ACTION\_VISUALIZE\_FIELD](./kibana-plugin-plugins-ui_actions-public.actioncontextmapping.action_visualize_field.md) + +## ActionContextMapping.ACTION\_VISUALIZE\_FIELD property + +Signature: + +```typescript +[ACTION_VISUALIZE_FIELD]: VisualizeFieldContext; +``` diff --git a/docs/development/plugins/ui_actions/public/kibana-plugin-plugins-ui_actions-public.actioncontextmapping.action_visualize_geo_field.md b/docs/development/plugins/ui_actions/public/kibana-plugin-plugins-ui_actions-public.actioncontextmapping.action_visualize_geo_field.md new file mode 100644 index 0000000000000..b44ed75106423 --- /dev/null +++ b/docs/development/plugins/ui_actions/public/kibana-plugin-plugins-ui_actions-public.actioncontextmapping.action_visualize_geo_field.md @@ -0,0 +1,11 @@ + + +[Home](./index.md) > [kibana-plugin-plugins-ui\_actions-public](./kibana-plugin-plugins-ui_actions-public.md) > [ActionContextMapping](./kibana-plugin-plugins-ui_actions-public.actioncontextmapping.md) > [ACTION\_VISUALIZE\_GEO\_FIELD](./kibana-plugin-plugins-ui_actions-public.actioncontextmapping.action_visualize_geo_field.md) + +## ActionContextMapping.ACTION\_VISUALIZE\_GEO\_FIELD property + +Signature: + +```typescript +[ACTION_VISUALIZE_GEO_FIELD]: VisualizeFieldContext; +``` diff --git a/docs/development/plugins/ui_actions/public/kibana-plugin-plugins-ui_actions-public.actioncontextmapping.md b/docs/development/plugins/ui_actions/public/kibana-plugin-plugins-ui_actions-public.actioncontextmapping.md new file mode 100644 index 0000000000000..740e6ac63bfba --- /dev/null +++ b/docs/development/plugins/ui_actions/public/kibana-plugin-plugins-ui_actions-public.actioncontextmapping.md @@ -0,0 +1,20 @@ + + +[Home](./index.md) > [kibana-plugin-plugins-ui\_actions-public](./kibana-plugin-plugins-ui_actions-public.md) > [ActionContextMapping](./kibana-plugin-plugins-ui_actions-public.actioncontextmapping.md) + +## ActionContextMapping interface + +Signature: + +```typescript +export interface ActionContextMapping +``` + +## Properties + +| Property | Type | Description | +| --- | --- | --- | +| [""](./kibana-plugin-plugins-ui_actions-public.actioncontextmapping.__.md) | BaseContext | | +| [ACTION\_VISUALIZE\_FIELD](./kibana-plugin-plugins-ui_actions-public.actioncontextmapping.action_visualize_field.md) | VisualizeFieldContext | | +| [ACTION\_VISUALIZE\_GEO\_FIELD](./kibana-plugin-plugins-ui_actions-public.actioncontextmapping.action_visualize_geo_field.md) | VisualizeFieldContext | | + diff --git a/docs/development/plugins/ui_actions/public/kibana-plugin-plugins-ui_actions-public.actiondefinitionbytype.md b/docs/development/plugins/ui_actions/public/kibana-plugin-plugins-ui_actions-public.actiondefinitionbytype.md new file mode 100644 index 0000000000000..ba4dc39088fe4 --- /dev/null +++ b/docs/development/plugins/ui_actions/public/kibana-plugin-plugins-ui_actions-public.actiondefinitionbytype.md @@ -0,0 +1,11 @@ + + +[Home](./index.md) > [kibana-plugin-plugins-ui\_actions-public](./kibana-plugin-plugins-ui_actions-public.md) > [ActionDefinitionByType](./kibana-plugin-plugins-ui_actions-public.actiondefinitionbytype.md) + +## ActionDefinitionByType type + +Signature: + +```typescript +export declare type ActionDefinitionByType = ActionDefinition; +``` diff --git a/docs/development/plugins/ui_actions/public/kibana-plugin-plugins-ui_actions-public.actionexecutioncontext.md b/docs/development/plugins/ui_actions/public/kibana-plugin-plugins-ui_actions-public.actionexecutioncontext.md new file mode 100644 index 0000000000000..3271d86779959 --- /dev/null +++ b/docs/development/plugins/ui_actions/public/kibana-plugin-plugins-ui_actions-public.actionexecutioncontext.md @@ -0,0 +1,13 @@ + + +[Home](./index.md) > [kibana-plugin-plugins-ui\_actions-public](./kibana-plugin-plugins-ui_actions-public.md) > [ActionExecutionContext](./kibana-plugin-plugins-ui_actions-public.actionexecutioncontext.md) + +## ActionExecutionContext type + +Action methods are executed with Context from trigger + [ActionExecutionMeta](./kibana-plugin-plugins-ui_actions-public.actionexecutionmeta.md) + +Signature: + +```typescript +export declare type ActionExecutionContext = Context & ActionExecutionMeta; +``` diff --git a/docs/development/plugins/ui_actions/public/kibana-plugin-plugins-ui_actions-public.actionexecutionmeta.md b/docs/development/plugins/ui_actions/public/kibana-plugin-plugins-ui_actions-public.actionexecutionmeta.md new file mode 100644 index 0000000000000..2056d8f9c7fc6 --- /dev/null +++ b/docs/development/plugins/ui_actions/public/kibana-plugin-plugins-ui_actions-public.actionexecutionmeta.md @@ -0,0 +1,20 @@ + + +[Home](./index.md) > [kibana-plugin-plugins-ui\_actions-public](./kibana-plugin-plugins-ui_actions-public.md) > [ActionExecutionMeta](./kibana-plugin-plugins-ui_actions-public.actionexecutionmeta.md) + +## ActionExecutionMeta interface + +During action execution we can provide additional information, for example, trigger, that caused the action execution + +Signature: + +```typescript +export interface ActionExecutionMeta +``` + +## Properties + +| Property | Type | Description | +| --- | --- | --- | +| [trigger](./kibana-plugin-plugins-ui_actions-public.actionexecutionmeta.trigger.md) | Trigger | Trigger that executed the action | + diff --git a/docs/development/plugins/ui_actions/public/kibana-plugin-plugins-ui_actions-public.actionexecutionmeta.trigger.md b/docs/development/plugins/ui_actions/public/kibana-plugin-plugins-ui_actions-public.actionexecutionmeta.trigger.md new file mode 100644 index 0000000000000..530c2fe514d2c --- /dev/null +++ b/docs/development/plugins/ui_actions/public/kibana-plugin-plugins-ui_actions-public.actionexecutionmeta.trigger.md @@ -0,0 +1,13 @@ + + +[Home](./index.md) > [kibana-plugin-plugins-ui\_actions-public](./kibana-plugin-plugins-ui_actions-public.md) > [ActionExecutionMeta](./kibana-plugin-plugins-ui_actions-public.actionexecutionmeta.md) > [trigger](./kibana-plugin-plugins-ui_actions-public.actionexecutionmeta.trigger.md) + +## ActionExecutionMeta.trigger property + +Trigger that executed the action + +Signature: + +```typescript +trigger: Trigger; +``` diff --git a/docs/development/plugins/ui_actions/public/kibana-plugin-plugins-ui_actions-public.actiontype.md b/docs/development/plugins/ui_actions/public/kibana-plugin-plugins-ui_actions-public.actiontype.md new file mode 100644 index 0000000000000..4916585531004 --- /dev/null +++ b/docs/development/plugins/ui_actions/public/kibana-plugin-plugins-ui_actions-public.actiontype.md @@ -0,0 +1,11 @@ + + +[Home](./index.md) > [kibana-plugin-plugins-ui\_actions-public](./kibana-plugin-plugins-ui_actions-public.md) > [ActionType](./kibana-plugin-plugins-ui_actions-public.actiontype.md) + +## ActionType type + +Signature: + +```typescript +export declare type ActionType = keyof ActionContextMapping; +``` diff --git a/docs/development/plugins/ui_actions/public/kibana-plugin-plugins-ui_actions-public.apply_filter_trigger.md b/docs/development/plugins/ui_actions/public/kibana-plugin-plugins-ui_actions-public.apply_filter_trigger.md new file mode 100644 index 0000000000000..94e66bf404f5c --- /dev/null +++ b/docs/development/plugins/ui_actions/public/kibana-plugin-plugins-ui_actions-public.apply_filter_trigger.md @@ -0,0 +1,11 @@ + + +[Home](./index.md) > [kibana-plugin-plugins-ui\_actions-public](./kibana-plugin-plugins-ui_actions-public.md) > [APPLY\_FILTER\_TRIGGER](./kibana-plugin-plugins-ui_actions-public.apply_filter_trigger.md) + +## APPLY\_FILTER\_TRIGGER variable + +Signature: + +```typescript +APPLY_FILTER_TRIGGER = "FILTER_TRIGGER" +``` diff --git a/docs/development/plugins/ui_actions/public/kibana-plugin-plugins-ui_actions-public.applyfiltertrigger.md b/docs/development/plugins/ui_actions/public/kibana-plugin-plugins-ui_actions-public.applyfiltertrigger.md new file mode 100644 index 0000000000000..e1fb6d342457e --- /dev/null +++ b/docs/development/plugins/ui_actions/public/kibana-plugin-plugins-ui_actions-public.applyfiltertrigger.md @@ -0,0 +1,11 @@ + + +[Home](./index.md) > [kibana-plugin-plugins-ui\_actions-public](./kibana-plugin-plugins-ui_actions-public.md) > [applyFilterTrigger](./kibana-plugin-plugins-ui_actions-public.applyfiltertrigger.md) + +## applyFilterTrigger variable + +Signature: + +```typescript +applyFilterTrigger: Trigger<'FILTER_TRIGGER'> +``` diff --git a/docs/development/plugins/ui_actions/public/kibana-plugin-plugins-ui_actions-public.buildcontextmenuforactions.md b/docs/development/plugins/ui_actions/public/kibana-plugin-plugins-ui_actions-public.buildcontextmenuforactions.md new file mode 100644 index 0000000000000..2d6c0ff106072 --- /dev/null +++ b/docs/development/plugins/ui_actions/public/kibana-plugin-plugins-ui_actions-public.buildcontextmenuforactions.md @@ -0,0 +1,24 @@ + + +[Home](./index.md) > [kibana-plugin-plugins-ui\_actions-public](./kibana-plugin-plugins-ui_actions-public.md) > [buildContextMenuForActions](./kibana-plugin-plugins-ui_actions-public.buildcontextmenuforactions.md) + +## buildContextMenuForActions() function + +Transforms an array of Actions to the shape EuiContextMenuPanel expects. + +Signature: + +```typescript +export declare function buildContextMenuForActions({ actions, title, closeMenu, }: BuildContextMenuParams): Promise; +``` + +## Parameters + +| Parameter | Type | Description | +| --- | --- | --- | +| { actions, title, closeMenu, } | BuildContextMenuParams | | + +Returns: + +`Promise` + diff --git a/docs/development/plugins/ui_actions/public/kibana-plugin-plugins-ui_actions-public.createaction.md b/docs/development/plugins/ui_actions/public/kibana-plugin-plugins-ui_actions-public.createaction.md new file mode 100644 index 0000000000000..04ab36c2e3f58 --- /dev/null +++ b/docs/development/plugins/ui_actions/public/kibana-plugin-plugins-ui_actions-public.createaction.md @@ -0,0 +1,22 @@ + + +[Home](./index.md) > [kibana-plugin-plugins-ui\_actions-public](./kibana-plugin-plugins-ui_actions-public.md) > [createAction](./kibana-plugin-plugins-ui_actions-public.createaction.md) + +## createAction() function + +Signature: + +```typescript +export declare function createAction(action: ActionDefinitionByType): ActionByType; +``` + +## Parameters + +| Parameter | Type | Description | +| --- | --- | --- | +| action | ActionDefinitionByType<T> | | + +Returns: + +`ActionByType` + diff --git a/docs/development/plugins/ui_actions/public/kibana-plugin-plugins-ui_actions-public.incompatibleactionerror._constructor_.md b/docs/development/plugins/ui_actions/public/kibana-plugin-plugins-ui_actions-public.incompatibleactionerror._constructor_.md new file mode 100644 index 0000000000000..f06bb05270ff0 --- /dev/null +++ b/docs/development/plugins/ui_actions/public/kibana-plugin-plugins-ui_actions-public.incompatibleactionerror._constructor_.md @@ -0,0 +1,13 @@ + + +[Home](./index.md) > [kibana-plugin-plugins-ui\_actions-public](./kibana-plugin-plugins-ui_actions-public.md) > [IncompatibleActionError](./kibana-plugin-plugins-ui_actions-public.incompatibleactionerror.md) > [(constructor)](./kibana-plugin-plugins-ui_actions-public.incompatibleactionerror._constructor_.md) + +## IncompatibleActionError.(constructor) + +Constructs a new instance of the `IncompatibleActionError` class + +Signature: + +```typescript +constructor(); +``` diff --git a/docs/development/plugins/ui_actions/public/kibana-plugin-plugins-ui_actions-public.incompatibleactionerror.code.md b/docs/development/plugins/ui_actions/public/kibana-plugin-plugins-ui_actions-public.incompatibleactionerror.code.md new file mode 100644 index 0000000000000..f16aa47438d72 --- /dev/null +++ b/docs/development/plugins/ui_actions/public/kibana-plugin-plugins-ui_actions-public.incompatibleactionerror.code.md @@ -0,0 +1,11 @@ + + +[Home](./index.md) > [kibana-plugin-plugins-ui\_actions-public](./kibana-plugin-plugins-ui_actions-public.md) > [IncompatibleActionError](./kibana-plugin-plugins-ui_actions-public.incompatibleactionerror.md) > [code](./kibana-plugin-plugins-ui_actions-public.incompatibleactionerror.code.md) + +## IncompatibleActionError.code property + +Signature: + +```typescript +code: string; +``` diff --git a/docs/development/plugins/ui_actions/public/kibana-plugin-plugins-ui_actions-public.incompatibleactionerror.md b/docs/development/plugins/ui_actions/public/kibana-plugin-plugins-ui_actions-public.incompatibleactionerror.md new file mode 100644 index 0000000000000..7c9943a53c2bb --- /dev/null +++ b/docs/development/plugins/ui_actions/public/kibana-plugin-plugins-ui_actions-public.incompatibleactionerror.md @@ -0,0 +1,24 @@ + + +[Home](./index.md) > [kibana-plugin-plugins-ui\_actions-public](./kibana-plugin-plugins-ui_actions-public.md) > [IncompatibleActionError](./kibana-plugin-plugins-ui_actions-public.incompatibleactionerror.md) + +## IncompatibleActionError class + +Signature: + +```typescript +export declare class IncompatibleActionError extends Error +``` + +## Constructors + +| Constructor | Modifiers | Description | +| --- | --- | --- | +| [(constructor)()](./kibana-plugin-plugins-ui_actions-public.incompatibleactionerror._constructor_.md) | | Constructs a new instance of the IncompatibleActionError class | + +## Properties + +| Property | Modifiers | Type | Description | +| --- | --- | --- | --- | +| [code](./kibana-plugin-plugins-ui_actions-public.incompatibleactionerror.code.md) | | string | | + diff --git a/docs/development/plugins/ui_actions/public/kibana-plugin-plugins-ui_actions-public.md b/docs/development/plugins/ui_actions/public/kibana-plugin-plugins-ui_actions-public.md new file mode 100644 index 0000000000000..ce4e8c17b9dff --- /dev/null +++ b/docs/development/plugins/ui_actions/public/kibana-plugin-plugins-ui_actions-public.md @@ -0,0 +1,66 @@ + + +[Home](./index.md) > [kibana-plugin-plugins-ui\_actions-public](./kibana-plugin-plugins-ui_actions-public.md) + +## kibana-plugin-plugins-ui\_actions-public package + +## Classes + +| Class | Description | +| --- | --- | +| [IncompatibleActionError](./kibana-plugin-plugins-ui_actions-public.incompatibleactionerror.md) | | +| [UiActionsService](./kibana-plugin-plugins-ui_actions-public.uiactionsservice.md) | | + +## Functions + +| Function | Description | +| --- | --- | +| [buildContextMenuForActions({ actions, title, closeMenu, })](./kibana-plugin-plugins-ui_actions-public.buildcontextmenuforactions.md) | Transforms an array of Actions to the shape EuiContextMenuPanel expects. | +| [createAction(action)](./kibana-plugin-plugins-ui_actions-public.createaction.md) | | +| [plugin(initializerContext)](./kibana-plugin-plugins-ui_actions-public.plugin.md) | | + +## Interfaces + +| Interface | Description | +| --- | --- | +| [Action](./kibana-plugin-plugins-ui_actions-public.action.md) | | +| [ActionContextMapping](./kibana-plugin-plugins-ui_actions-public.actioncontextmapping.md) | | +| [ActionExecutionMeta](./kibana-plugin-plugins-ui_actions-public.actionexecutionmeta.md) | During action execution we can provide additional information, for example, trigger, that caused the action execution | +| [Trigger](./kibana-plugin-plugins-ui_actions-public.trigger.md) | This is a convenience interface used to register a \*trigger\*.Trigger specifies a named anchor to which Action can be attached. When Trigger is being \*called\* it creates a Context object and passes it to the execute method of an Action.More than one action can be attached to a single trigger, in which case when trigger is \*called\* it first displays a context menu for user to pick a single action to execute. | +| [TriggerContextMapping](./kibana-plugin-plugins-ui_actions-public.triggercontextmapping.md) | | +| [UiActionsActionDefinition](./kibana-plugin-plugins-ui_actions-public.uiactionsactiondefinition.md) | A convenience interface used to register an action. | +| [UiActionsPresentable](./kibana-plugin-plugins-ui_actions-public.uiactionspresentable.md) | Represents something that can be displayed to user in UI. | +| [UiActionsServiceParams](./kibana-plugin-plugins-ui_actions-public.uiactionsserviceparams.md) | | +| [VisualizeFieldContext](./kibana-plugin-plugins-ui_actions-public.visualizefieldcontext.md) | | + +## Variables + +| Variable | Description | +| --- | --- | +| [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) | | +| [APPLY\_FILTER\_TRIGGER](./kibana-plugin-plugins-ui_actions-public.apply_filter_trigger.md) | | +| [applyFilterTrigger](./kibana-plugin-plugins-ui_actions-public.applyfiltertrigger.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) | | +| [visualizeGeoFieldTrigger](./kibana-plugin-plugins-ui_actions-public.visualizegeofieldtrigger.md) | | + +## Type Aliases + +| Type Alias | Description | +| --- | --- | +| [ActionByType](./kibana-plugin-plugins-ui_actions-public.actionbytype.md) | | +| [ActionDefinitionByType](./kibana-plugin-plugins-ui_actions-public.actiondefinitionbytype.md) | | +| [ActionExecutionContext](./kibana-plugin-plugins-ui_actions-public.actionexecutioncontext.md) | Action methods are executed with Context from trigger + [ActionExecutionMeta](./kibana-plugin-plugins-ui_actions-public.actionexecutionmeta.md) | +| [ActionType](./kibana-plugin-plugins-ui_actions-public.actiontype.md) | | +| [TriggerContext](./kibana-plugin-plugins-ui_actions-public.triggercontext.md) | | +| [TriggerId](./kibana-plugin-plugins-ui_actions-public.triggerid.md) | | +| [UiActionsPresentableGrouping](./kibana-plugin-plugins-ui_actions-public.uiactionspresentablegrouping.md) | | +| [UiActionsSetup](./kibana-plugin-plugins-ui_actions-public.uiactionssetup.md) | | +| [UiActionsStart](./kibana-plugin-plugins-ui_actions-public.uiactionsstart.md) | | + diff --git a/docs/development/plugins/ui_actions/public/kibana-plugin-plugins-ui_actions-public.plugin.md b/docs/development/plugins/ui_actions/public/kibana-plugin-plugins-ui_actions-public.plugin.md new file mode 100644 index 0000000000000..d9427317d4fc6 --- /dev/null +++ b/docs/development/plugins/ui_actions/public/kibana-plugin-plugins-ui_actions-public.plugin.md @@ -0,0 +1,22 @@ + + +[Home](./index.md) > [kibana-plugin-plugins-ui\_actions-public](./kibana-plugin-plugins-ui_actions-public.md) > [plugin](./kibana-plugin-plugins-ui_actions-public.plugin.md) + +## plugin() function + +Signature: + +```typescript +export declare function plugin(initializerContext: PluginInitializerContext): UiActionsPlugin; +``` + +## Parameters + +| Parameter | Type | Description | +| --- | --- | --- | +| initializerContext | PluginInitializerContext | | + +Returns: + +`UiActionsPlugin` + diff --git a/docs/development/plugins/ui_actions/public/kibana-plugin-plugins-ui_actions-public.select_range_trigger.md b/docs/development/plugins/ui_actions/public/kibana-plugin-plugins-ui_actions-public.select_range_trigger.md new file mode 100644 index 0000000000000..fd784ff17fa84 --- /dev/null +++ b/docs/development/plugins/ui_actions/public/kibana-plugin-plugins-ui_actions-public.select_range_trigger.md @@ -0,0 +1,11 @@ + + +[Home](./index.md) > [kibana-plugin-plugins-ui\_actions-public](./kibana-plugin-plugins-ui_actions-public.md) > [SELECT\_RANGE\_TRIGGER](./kibana-plugin-plugins-ui_actions-public.select_range_trigger.md) + +## SELECT\_RANGE\_TRIGGER variable + +Signature: + +```typescript +SELECT_RANGE_TRIGGER = "SELECT_RANGE_TRIGGER" +``` diff --git a/docs/development/plugins/ui_actions/public/kibana-plugin-plugins-ui_actions-public.selectrangetrigger.md b/docs/development/plugins/ui_actions/public/kibana-plugin-plugins-ui_actions-public.selectrangetrigger.md new file mode 100644 index 0000000000000..0d9fa2d83ee57 --- /dev/null +++ b/docs/development/plugins/ui_actions/public/kibana-plugin-plugins-ui_actions-public.selectrangetrigger.md @@ -0,0 +1,11 @@ + + +[Home](./index.md) > [kibana-plugin-plugins-ui\_actions-public](./kibana-plugin-plugins-ui_actions-public.md) > [selectRangeTrigger](./kibana-plugin-plugins-ui_actions-public.selectrangetrigger.md) + +## selectRangeTrigger variable + +Signature: + +```typescript +selectRangeTrigger: Trigger<'SELECT_RANGE_TRIGGER'> +``` diff --git a/docs/development/plugins/ui_actions/public/kibana-plugin-plugins-ui_actions-public.trigger.description.md b/docs/development/plugins/ui_actions/public/kibana-plugin-plugins-ui_actions-public.trigger.description.md new file mode 100644 index 0000000000000..76faaf8e1a691 --- /dev/null +++ b/docs/development/plugins/ui_actions/public/kibana-plugin-plugins-ui_actions-public.trigger.description.md @@ -0,0 +1,13 @@ + + +[Home](./index.md) > [kibana-plugin-plugins-ui\_actions-public](./kibana-plugin-plugins-ui_actions-public.md) > [Trigger](./kibana-plugin-plugins-ui_actions-public.trigger.md) > [description](./kibana-plugin-plugins-ui_actions-public.trigger.description.md) + +## Trigger.description property + +A longer user friendly description of the trigger. + +Signature: + +```typescript +description?: string; +``` diff --git a/docs/development/plugins/ui_actions/public/kibana-plugin-plugins-ui_actions-public.trigger.id.md b/docs/development/plugins/ui_actions/public/kibana-plugin-plugins-ui_actions-public.trigger.id.md new file mode 100644 index 0000000000000..426f17f9a0352 --- /dev/null +++ b/docs/development/plugins/ui_actions/public/kibana-plugin-plugins-ui_actions-public.trigger.id.md @@ -0,0 +1,13 @@ + + +[Home](./index.md) > [kibana-plugin-plugins-ui\_actions-public](./kibana-plugin-plugins-ui_actions-public.md) > [Trigger](./kibana-plugin-plugins-ui_actions-public.trigger.md) > [id](./kibana-plugin-plugins-ui_actions-public.trigger.id.md) + +## 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". + +Signature: + +```typescript +id: ID; +``` diff --git a/docs/development/plugins/ui_actions/public/kibana-plugin-plugins-ui_actions-public.trigger.md b/docs/development/plugins/ui_actions/public/kibana-plugin-plugins-ui_actions-public.trigger.md new file mode 100644 index 0000000000000..b69bba892f475 --- /dev/null +++ b/docs/development/plugins/ui_actions/public/kibana-plugin-plugins-ui_actions-public.trigger.md @@ -0,0 +1,26 @@ + + +[Home](./index.md) > [kibana-plugin-plugins-ui\_actions-public](./kibana-plugin-plugins-ui_actions-public.md) > [Trigger](./kibana-plugin-plugins-ui_actions-public.trigger.md) + +## Trigger interface + +This is a convenience interface used to register a \*trigger\*. + +`Trigger` specifies a named anchor to which `Action` can be attached. When `Trigger` is being \*called\* it creates a `Context` object and passes it to the `execute` method of an `Action`. + +More than one action can be attached to a single trigger, in which case when trigger is \*called\* it first displays a context menu for user to pick a single action to execute. + +Signature: + +```typescript +export interface Trigger +``` + +## Properties + +| Property | Type | Description | +| --- | --- | --- | +| [description](./kibana-plugin-plugins-ui_actions-public.trigger.description.md) | string | A longer user friendly description of the trigger. | +| [id](./kibana-plugin-plugins-ui_actions-public.trigger.id.md) | ID | Unique name of the trigger as identified in ui_actions plugin trigger registry, such as "SELECT\_RANGE\_TRIGGER" or "VALUE\_CLICK\_TRIGGER". | +| [title](./kibana-plugin-plugins-ui_actions-public.trigger.title.md) | string | User friendly name of the trigger. | + diff --git a/docs/development/plugins/ui_actions/public/kibana-plugin-plugins-ui_actions-public.trigger.title.md b/docs/development/plugins/ui_actions/public/kibana-plugin-plugins-ui_actions-public.trigger.title.md new file mode 100644 index 0000000000000..ded71c8d0c437 --- /dev/null +++ b/docs/development/plugins/ui_actions/public/kibana-plugin-plugins-ui_actions-public.trigger.title.md @@ -0,0 +1,13 @@ + + +[Home](./index.md) > [kibana-plugin-plugins-ui\_actions-public](./kibana-plugin-plugins-ui_actions-public.md) > [Trigger](./kibana-plugin-plugins-ui_actions-public.trigger.md) > [title](./kibana-plugin-plugins-ui_actions-public.trigger.title.md) + +## Trigger.title property + +User friendly name of the trigger. + +Signature: + +```typescript +title?: string; +``` diff --git a/docs/development/plugins/ui_actions/public/kibana-plugin-plugins-ui_actions-public.triggercontext.md b/docs/development/plugins/ui_actions/public/kibana-plugin-plugins-ui_actions-public.triggercontext.md new file mode 100644 index 0000000000000..4ce95d27ecffa --- /dev/null +++ b/docs/development/plugins/ui_actions/public/kibana-plugin-plugins-ui_actions-public.triggercontext.md @@ -0,0 +1,11 @@ + + +[Home](./index.md) > [kibana-plugin-plugins-ui\_actions-public](./kibana-plugin-plugins-ui_actions-public.md) > [TriggerContext](./kibana-plugin-plugins-ui_actions-public.triggercontext.md) + +## TriggerContext type + +Signature: + +```typescript +export declare type TriggerContext = T extends TriggerId ? TriggerContextMapping[T] : never; +``` diff --git a/docs/development/plugins/ui_actions/public/kibana-plugin-plugins-ui_actions-public.triggercontextmapping.__.md b/docs/development/plugins/ui_actions/public/kibana-plugin-plugins-ui_actions-public.triggercontextmapping.__.md new file mode 100644 index 0000000000000..17ad926f8ee82 --- /dev/null +++ b/docs/development/plugins/ui_actions/public/kibana-plugin-plugins-ui_actions-public.triggercontextmapping.__.md @@ -0,0 +1,11 @@ + + +[Home](./index.md) > [kibana-plugin-plugins-ui\_actions-public](./kibana-plugin-plugins-ui_actions-public.md) > [TriggerContextMapping](./kibana-plugin-plugins-ui_actions-public.triggercontextmapping.md) > [""](./kibana-plugin-plugins-ui_actions-public.triggercontextmapping.__.md) + +## TriggerContextMapping."" property + +Signature: + +```typescript +[DEFAULT_TRIGGER]: TriggerContext; +``` diff --git a/docs/development/plugins/ui_actions/public/kibana-plugin-plugins-ui_actions-public.triggercontextmapping.filter_trigger.md b/docs/development/plugins/ui_actions/public/kibana-plugin-plugins-ui_actions-public.triggercontextmapping.filter_trigger.md new file mode 100644 index 0000000000000..0ccf8aa3d7415 --- /dev/null +++ b/docs/development/plugins/ui_actions/public/kibana-plugin-plugins-ui_actions-public.triggercontextmapping.filter_trigger.md @@ -0,0 +1,11 @@ + + +[Home](./index.md) > [kibana-plugin-plugins-ui\_actions-public](./kibana-plugin-plugins-ui_actions-public.md) > [TriggerContextMapping](./kibana-plugin-plugins-ui_actions-public.triggercontextmapping.md) > [FILTER\_TRIGGER](./kibana-plugin-plugins-ui_actions-public.triggercontextmapping.filter_trigger.md) + +## TriggerContextMapping.FILTER\_TRIGGER property + +Signature: + +```typescript +[APPLY_FILTER_TRIGGER]: ApplyGlobalFilterActionContext; +``` diff --git a/docs/development/plugins/ui_actions/public/kibana-plugin-plugins-ui_actions-public.triggercontextmapping.md b/docs/development/plugins/ui_actions/public/kibana-plugin-plugins-ui_actions-public.triggercontextmapping.md new file mode 100644 index 0000000000000..9db44d4dc7b05 --- /dev/null +++ b/docs/development/plugins/ui_actions/public/kibana-plugin-plugins-ui_actions-public.triggercontextmapping.md @@ -0,0 +1,23 @@ + + +[Home](./index.md) > [kibana-plugin-plugins-ui\_actions-public](./kibana-plugin-plugins-ui_actions-public.md) > [TriggerContextMapping](./kibana-plugin-plugins-ui_actions-public.triggercontextmapping.md) + +## TriggerContextMapping interface + +Signature: + +```typescript +export interface TriggerContextMapping +``` + +## Properties + +| Property | Type | Description | +| --- | --- | --- | +| [""](./kibana-plugin-plugins-ui_actions-public.triggercontextmapping.__.md) | TriggerContext | | +| [FILTER\_TRIGGER](./kibana-plugin-plugins-ui_actions-public.triggercontextmapping.filter_trigger.md) | ApplyGlobalFilterActionContext | | +| [SELECT\_RANGE\_TRIGGER](./kibana-plugin-plugins-ui_actions-public.triggercontextmapping.select_range_trigger.md) | RangeSelectContext | | +| [VALUE\_CLICK\_TRIGGER](./kibana-plugin-plugins-ui_actions-public.triggercontextmapping.value_click_trigger.md) | ValueClickContext | | +| [VISUALIZE\_FIELD\_TRIGGER](./kibana-plugin-plugins-ui_actions-public.triggercontextmapping.visualize_field_trigger.md) | VisualizeFieldContext | | +| [VISUALIZE\_GEO\_FIELD\_TRIGGER](./kibana-plugin-plugins-ui_actions-public.triggercontextmapping.visualize_geo_field_trigger.md) | VisualizeFieldContext | | + diff --git a/docs/development/plugins/ui_actions/public/kibana-plugin-plugins-ui_actions-public.triggercontextmapping.select_range_trigger.md b/docs/development/plugins/ui_actions/public/kibana-plugin-plugins-ui_actions-public.triggercontextmapping.select_range_trigger.md new file mode 100644 index 0000000000000..c5ef6843390b3 --- /dev/null +++ b/docs/development/plugins/ui_actions/public/kibana-plugin-plugins-ui_actions-public.triggercontextmapping.select_range_trigger.md @@ -0,0 +1,11 @@ + + +[Home](./index.md) > [kibana-plugin-plugins-ui\_actions-public](./kibana-plugin-plugins-ui_actions-public.md) > [TriggerContextMapping](./kibana-plugin-plugins-ui_actions-public.triggercontextmapping.md) > [SELECT\_RANGE\_TRIGGER](./kibana-plugin-plugins-ui_actions-public.triggercontextmapping.select_range_trigger.md) + +## TriggerContextMapping.SELECT\_RANGE\_TRIGGER property + +Signature: + +```typescript +[SELECT_RANGE_TRIGGER]: RangeSelectContext; +``` diff --git a/docs/development/plugins/ui_actions/public/kibana-plugin-plugins-ui_actions-public.triggercontextmapping.value_click_trigger.md b/docs/development/plugins/ui_actions/public/kibana-plugin-plugins-ui_actions-public.triggercontextmapping.value_click_trigger.md new file mode 100644 index 0000000000000..129144a66cee5 --- /dev/null +++ b/docs/development/plugins/ui_actions/public/kibana-plugin-plugins-ui_actions-public.triggercontextmapping.value_click_trigger.md @@ -0,0 +1,11 @@ + + +[Home](./index.md) > [kibana-plugin-plugins-ui\_actions-public](./kibana-plugin-plugins-ui_actions-public.md) > [TriggerContextMapping](./kibana-plugin-plugins-ui_actions-public.triggercontextmapping.md) > [VALUE\_CLICK\_TRIGGER](./kibana-plugin-plugins-ui_actions-public.triggercontextmapping.value_click_trigger.md) + +## TriggerContextMapping.VALUE\_CLICK\_TRIGGER property + +Signature: + +```typescript +[VALUE_CLICK_TRIGGER]: ValueClickContext; +``` diff --git a/docs/development/plugins/ui_actions/public/kibana-plugin-plugins-ui_actions-public.triggercontextmapping.visualize_field_trigger.md b/docs/development/plugins/ui_actions/public/kibana-plugin-plugins-ui_actions-public.triggercontextmapping.visualize_field_trigger.md new file mode 100644 index 0000000000000..feaaffac8a234 --- /dev/null +++ b/docs/development/plugins/ui_actions/public/kibana-plugin-plugins-ui_actions-public.triggercontextmapping.visualize_field_trigger.md @@ -0,0 +1,11 @@ + + +[Home](./index.md) > [kibana-plugin-plugins-ui\_actions-public](./kibana-plugin-plugins-ui_actions-public.md) > [TriggerContextMapping](./kibana-plugin-plugins-ui_actions-public.triggercontextmapping.md) > [VISUALIZE\_FIELD\_TRIGGER](./kibana-plugin-plugins-ui_actions-public.triggercontextmapping.visualize_field_trigger.md) + +## TriggerContextMapping.VISUALIZE\_FIELD\_TRIGGER property + +Signature: + +```typescript +[VISUALIZE_FIELD_TRIGGER]: VisualizeFieldContext; +``` diff --git a/docs/development/plugins/ui_actions/public/kibana-plugin-plugins-ui_actions-public.triggercontextmapping.visualize_geo_field_trigger.md b/docs/development/plugins/ui_actions/public/kibana-plugin-plugins-ui_actions-public.triggercontextmapping.visualize_geo_field_trigger.md new file mode 100644 index 0000000000000..023490a2ae027 --- /dev/null +++ b/docs/development/plugins/ui_actions/public/kibana-plugin-plugins-ui_actions-public.triggercontextmapping.visualize_geo_field_trigger.md @@ -0,0 +1,11 @@ + + +[Home](./index.md) > [kibana-plugin-plugins-ui\_actions-public](./kibana-plugin-plugins-ui_actions-public.md) > [TriggerContextMapping](./kibana-plugin-plugins-ui_actions-public.triggercontextmapping.md) > [VISUALIZE\_GEO\_FIELD\_TRIGGER](./kibana-plugin-plugins-ui_actions-public.triggercontextmapping.visualize_geo_field_trigger.md) + +## TriggerContextMapping.VISUALIZE\_GEO\_FIELD\_TRIGGER property + +Signature: + +```typescript +[VISUALIZE_GEO_FIELD_TRIGGER]: VisualizeFieldContext; +``` diff --git a/docs/development/plugins/ui_actions/public/kibana-plugin-plugins-ui_actions-public.triggerid.md b/docs/development/plugins/ui_actions/public/kibana-plugin-plugins-ui_actions-public.triggerid.md new file mode 100644 index 0000000000000..6e5a234e286f9 --- /dev/null +++ b/docs/development/plugins/ui_actions/public/kibana-plugin-plugins-ui_actions-public.triggerid.md @@ -0,0 +1,11 @@ + + +[Home](./index.md) > [kibana-plugin-plugins-ui\_actions-public](./kibana-plugin-plugins-ui_actions-public.md) > [TriggerId](./kibana-plugin-plugins-ui_actions-public.triggerid.md) + +## TriggerId type + +Signature: + +```typescript +export declare type TriggerId = keyof TriggerContextMapping; +``` diff --git a/docs/development/plugins/ui_actions/public/kibana-plugin-plugins-ui_actions-public.uiactionsactiondefinition.execute.md b/docs/development/plugins/ui_actions/public/kibana-plugin-plugins-ui_actions-public.uiactionsactiondefinition.execute.md new file mode 100644 index 0000000000000..a2cf61ecc1306 --- /dev/null +++ b/docs/development/plugins/ui_actions/public/kibana-plugin-plugins-ui_actions-public.uiactionsactiondefinition.execute.md @@ -0,0 +1,24 @@ + + +[Home](./index.md) > [kibana-plugin-plugins-ui\_actions-public](./kibana-plugin-plugins-ui_actions-public.md) > [UiActionsActionDefinition](./kibana-plugin-plugins-ui_actions-public.uiactionsactiondefinition.md) > [execute](./kibana-plugin-plugins-ui_actions-public.uiactionsactiondefinition.execute.md) + +## UiActionsActionDefinition.execute() method + +Executes the action. + +Signature: + +```typescript +execute(context: ActionDefinitionContext): Promise; +``` + +## Parameters + +| Parameter | Type | Description | +| --- | --- | --- | +| context | ActionDefinitionContext<Context> | | + +Returns: + +`Promise` + diff --git a/docs/development/plugins/ui_actions/public/kibana-plugin-plugins-ui_actions-public.uiactionsactiondefinition.gethref.md b/docs/development/plugins/ui_actions/public/kibana-plugin-plugins-ui_actions-public.uiactionsactiondefinition.gethref.md new file mode 100644 index 0000000000000..83fee1233a206 --- /dev/null +++ b/docs/development/plugins/ui_actions/public/kibana-plugin-plugins-ui_actions-public.uiactionsactiondefinition.gethref.md @@ -0,0 +1,24 @@ + + +[Home](./index.md) > [kibana-plugin-plugins-ui\_actions-public](./kibana-plugin-plugins-ui_actions-public.md) > [UiActionsActionDefinition](./kibana-plugin-plugins-ui_actions-public.uiactionsactiondefinition.md) > [getHref](./kibana-plugin-plugins-ui_actions-public.uiactionsactiondefinition.gethref.md) + +## UiActionsActionDefinition.getHref() method + +This method should return a link if this item can be clicked on. The link is used to navigate user if user middle-clicks it or Ctrl + clicks or right-clicks and selects "Open in new tab". + +Signature: + +```typescript +getHref?(context: ActionDefinitionContext): Promise; +``` + +## Parameters + +| Parameter | Type | Description | +| --- | --- | --- | +| context | ActionDefinitionContext<Context> | | + +Returns: + +`Promise` + diff --git a/docs/development/plugins/ui_actions/public/kibana-plugin-plugins-ui_actions-public.uiactionsactiondefinition.id.md b/docs/development/plugins/ui_actions/public/kibana-plugin-plugins-ui_actions-public.uiactionsactiondefinition.id.md new file mode 100644 index 0000000000000..01fa6abce3b4a --- /dev/null +++ b/docs/development/plugins/ui_actions/public/kibana-plugin-plugins-ui_actions-public.uiactionsactiondefinition.id.md @@ -0,0 +1,13 @@ + + +[Home](./index.md) > [kibana-plugin-plugins-ui\_actions-public](./kibana-plugin-plugins-ui_actions-public.md) > [UiActionsActionDefinition](./kibana-plugin-plugins-ui_actions-public.uiactionsactiondefinition.md) > [id](./kibana-plugin-plugins-ui_actions-public.uiactionsactiondefinition.id.md) + +## UiActionsActionDefinition.id property + +ID of the action that uniquely identifies this action in the actions registry. + +Signature: + +```typescript +readonly id: string; +``` diff --git a/docs/development/plugins/ui_actions/public/kibana-plugin-plugins-ui_actions-public.uiactionsactiondefinition.iscompatible.md b/docs/development/plugins/ui_actions/public/kibana-plugin-plugins-ui_actions-public.uiactionsactiondefinition.iscompatible.md new file mode 100644 index 0000000000000..736cc40c4243f --- /dev/null +++ b/docs/development/plugins/ui_actions/public/kibana-plugin-plugins-ui_actions-public.uiactionsactiondefinition.iscompatible.md @@ -0,0 +1,24 @@ + + +[Home](./index.md) > [kibana-plugin-plugins-ui\_actions-public](./kibana-plugin-plugins-ui_actions-public.md) > [UiActionsActionDefinition](./kibana-plugin-plugins-ui_actions-public.uiactionsactiondefinition.md) > [isCompatible](./kibana-plugin-plugins-ui_actions-public.uiactionsactiondefinition.iscompatible.md) + +## UiActionsActionDefinition.isCompatible() method + +Returns a promise that resolves to true if this item is compatible given the context and should be displayed to user, otherwise resolves to false. + +Signature: + +```typescript +isCompatible?(context: ActionDefinitionContext): Promise; +``` + +## Parameters + +| Parameter | Type | Description | +| --- | --- | --- | +| context | ActionDefinitionContext<Context> | | + +Returns: + +`Promise` + diff --git a/docs/development/plugins/ui_actions/public/kibana-plugin-plugins-ui_actions-public.uiactionsactiondefinition.md b/docs/development/plugins/ui_actions/public/kibana-plugin-plugins-ui_actions-public.uiactionsactiondefinition.md new file mode 100644 index 0000000000000..7c873715795e9 --- /dev/null +++ b/docs/development/plugins/ui_actions/public/kibana-plugin-plugins-ui_actions-public.uiactionsactiondefinition.md @@ -0,0 +1,30 @@ + + +[Home](./index.md) > [kibana-plugin-plugins-ui\_actions-public](./kibana-plugin-plugins-ui_actions-public.md) > [UiActionsActionDefinition](./kibana-plugin-plugins-ui_actions-public.uiactionsactiondefinition.md) + +## UiActionsActionDefinition interface + +A convenience interface used to register an action. + +Signature: + +```typescript +export interface ActionDefinition extends Partial>> +``` + +## Properties + +| Property | Type | Description | +| --- | --- | --- | +| [id](./kibana-plugin-plugins-ui_actions-public.uiactionsactiondefinition.id.md) | string | ID of the action that uniquely identifies this action in the actions registry. | +| [type](./kibana-plugin-plugins-ui_actions-public.uiactionsactiondefinition.type.md) | ActionType | ID of the factory for this action. Used to construct dynamic actions. | + +## Methods + +| Method | Description | +| --- | --- | +| [execute(context)](./kibana-plugin-plugins-ui_actions-public.uiactionsactiondefinition.execute.md) | Executes the action. | +| [getHref(context)](./kibana-plugin-plugins-ui_actions-public.uiactionsactiondefinition.gethref.md) | This method should return a link if this item can be clicked on. The link is used to navigate user if user middle-clicks it or Ctrl + clicks or right-clicks and selects "Open in new tab". | +| [isCompatible(context)](./kibana-plugin-plugins-ui_actions-public.uiactionsactiondefinition.iscompatible.md) | Returns a promise that resolves to true if this item is compatible given the context and should be displayed to user, otherwise resolves to false. | +| [shouldAutoExecute(context)](./kibana-plugin-plugins-ui_actions-public.uiactionsactiondefinition.shouldautoexecute.md) | Determines if action should be executed automatically, without first showing up in context menu. false by default. | + diff --git a/docs/development/plugins/ui_actions/public/kibana-plugin-plugins-ui_actions-public.uiactionsactiondefinition.shouldautoexecute.md b/docs/development/plugins/ui_actions/public/kibana-plugin-plugins-ui_actions-public.uiactionsactiondefinition.shouldautoexecute.md new file mode 100644 index 0000000000000..04b9975f3b92e --- /dev/null +++ b/docs/development/plugins/ui_actions/public/kibana-plugin-plugins-ui_actions-public.uiactionsactiondefinition.shouldautoexecute.md @@ -0,0 +1,24 @@ + + +[Home](./index.md) > [kibana-plugin-plugins-ui\_actions-public](./kibana-plugin-plugins-ui_actions-public.md) > [UiActionsActionDefinition](./kibana-plugin-plugins-ui_actions-public.uiactionsactiondefinition.md) > [shouldAutoExecute](./kibana-plugin-plugins-ui_actions-public.uiactionsactiondefinition.shouldautoexecute.md) + +## UiActionsActionDefinition.shouldAutoExecute() method + +Determines if action should be executed automatically, without first showing up in context menu. false by default. + +Signature: + +```typescript +shouldAutoExecute?(context: ActionDefinitionContext): Promise; +``` + +## Parameters + +| Parameter | Type | Description | +| --- | --- | --- | +| context | ActionDefinitionContext<Context> | | + +Returns: + +`Promise` + diff --git a/docs/development/plugins/ui_actions/public/kibana-plugin-plugins-ui_actions-public.uiactionsactiondefinition.type.md b/docs/development/plugins/ui_actions/public/kibana-plugin-plugins-ui_actions-public.uiactionsactiondefinition.type.md new file mode 100644 index 0000000000000..125f834e9036e --- /dev/null +++ b/docs/development/plugins/ui_actions/public/kibana-plugin-plugins-ui_actions-public.uiactionsactiondefinition.type.md @@ -0,0 +1,13 @@ + + +[Home](./index.md) > [kibana-plugin-plugins-ui\_actions-public](./kibana-plugin-plugins-ui_actions-public.md) > [UiActionsActionDefinition](./kibana-plugin-plugins-ui_actions-public.uiactionsactiondefinition.md) > [type](./kibana-plugin-plugins-ui_actions-public.uiactionsactiondefinition.type.md) + +## UiActionsActionDefinition.type property + +ID of the factory for this action. Used to construct dynamic actions. + +Signature: + +```typescript +readonly type?: ActionType; +``` diff --git a/docs/development/plugins/ui_actions/public/kibana-plugin-plugins-ui_actions-public.uiactionspresentable.getdisplayname.md b/docs/development/plugins/ui_actions/public/kibana-plugin-plugins-ui_actions-public.uiactionspresentable.getdisplayname.md new file mode 100644 index 0000000000000..986ad4afa5a48 --- /dev/null +++ b/docs/development/plugins/ui_actions/public/kibana-plugin-plugins-ui_actions-public.uiactionspresentable.getdisplayname.md @@ -0,0 +1,24 @@ + + +[Home](./index.md) > [kibana-plugin-plugins-ui\_actions-public](./kibana-plugin-plugins-ui_actions-public.md) > [UiActionsPresentable](./kibana-plugin-plugins-ui_actions-public.uiactionspresentable.md) > [getDisplayName](./kibana-plugin-plugins-ui_actions-public.uiactionspresentable.getdisplayname.md) + +## UiActionsPresentable.getDisplayName() method + +Returns a title to be displayed to the user. + +Signature: + +```typescript +getDisplayName(context: Context): string; +``` + +## Parameters + +| Parameter | Type | Description | +| --- | --- | --- | +| context | Context | | + +Returns: + +`string` + diff --git a/docs/development/plugins/ui_actions/public/kibana-plugin-plugins-ui_actions-public.uiactionspresentable.getdisplaynametooltip.md b/docs/development/plugins/ui_actions/public/kibana-plugin-plugins-ui_actions-public.uiactionspresentable.getdisplaynametooltip.md new file mode 100644 index 0000000000000..8fc859d5713e6 --- /dev/null +++ b/docs/development/plugins/ui_actions/public/kibana-plugin-plugins-ui_actions-public.uiactionspresentable.getdisplaynametooltip.md @@ -0,0 +1,24 @@ + + +[Home](./index.md) > [kibana-plugin-plugins-ui\_actions-public](./kibana-plugin-plugins-ui_actions-public.md) > [UiActionsPresentable](./kibana-plugin-plugins-ui_actions-public.uiactionspresentable.md) > [getDisplayNameTooltip](./kibana-plugin-plugins-ui_actions-public.uiactionspresentable.getdisplaynametooltip.md) + +## UiActionsPresentable.getDisplayNameTooltip() method + +Returns tooltip text which should be displayed when user hovers this object. Should return empty string if tooltip should not be displayed. + +Signature: + +```typescript +getDisplayNameTooltip(context: Context): string; +``` + +## Parameters + +| Parameter | Type | Description | +| --- | --- | --- | +| context | Context | | + +Returns: + +`string` + diff --git a/docs/development/plugins/ui_actions/public/kibana-plugin-plugins-ui_actions-public.uiactionspresentable.gethref.md b/docs/development/plugins/ui_actions/public/kibana-plugin-plugins-ui_actions-public.uiactionspresentable.gethref.md new file mode 100644 index 0000000000000..0c9bd434ff331 --- /dev/null +++ b/docs/development/plugins/ui_actions/public/kibana-plugin-plugins-ui_actions-public.uiactionspresentable.gethref.md @@ -0,0 +1,24 @@ + + +[Home](./index.md) > [kibana-plugin-plugins-ui\_actions-public](./kibana-plugin-plugins-ui_actions-public.md) > [UiActionsPresentable](./kibana-plugin-plugins-ui_actions-public.uiactionspresentable.md) > [getHref](./kibana-plugin-plugins-ui_actions-public.uiactionspresentable.gethref.md) + +## UiActionsPresentable.getHref() method + +This method should return a link if this item can be clicked on. The link is used to navigate user if user middle-clicks it or Ctrl + clicks or right-clicks and selects "Open in new tab". + +Signature: + +```typescript +getHref?(context: Context): Promise; +``` + +## Parameters + +| Parameter | Type | Description | +| --- | --- | --- | +| context | Context | | + +Returns: + +`Promise` + diff --git a/docs/development/plugins/ui_actions/public/kibana-plugin-plugins-ui_actions-public.uiactionspresentable.geticontype.md b/docs/development/plugins/ui_actions/public/kibana-plugin-plugins-ui_actions-public.uiactionspresentable.geticontype.md new file mode 100644 index 0000000000000..8bf5af0f3b7e2 --- /dev/null +++ b/docs/development/plugins/ui_actions/public/kibana-plugin-plugins-ui_actions-public.uiactionspresentable.geticontype.md @@ -0,0 +1,24 @@ + + +[Home](./index.md) > [kibana-plugin-plugins-ui\_actions-public](./kibana-plugin-plugins-ui_actions-public.md) > [UiActionsPresentable](./kibana-plugin-plugins-ui_actions-public.uiactionspresentable.md) > [getIconType](./kibana-plugin-plugins-ui_actions-public.uiactionspresentable.geticontype.md) + +## UiActionsPresentable.getIconType() method + +Optional EUI icon type that can be displayed along with the title. + +Signature: + +```typescript +getIconType(context: Context): string | undefined; +``` + +## Parameters + +| Parameter | Type | Description | +| --- | --- | --- | +| context | Context | | + +Returns: + +`string | undefined` + diff --git a/docs/development/plugins/ui_actions/public/kibana-plugin-plugins-ui_actions-public.uiactionspresentable.grouping.md b/docs/development/plugins/ui_actions/public/kibana-plugin-plugins-ui_actions-public.uiactionspresentable.grouping.md new file mode 100644 index 0000000000000..6b160becf1afc --- /dev/null +++ b/docs/development/plugins/ui_actions/public/kibana-plugin-plugins-ui_actions-public.uiactionspresentable.grouping.md @@ -0,0 +1,13 @@ + + +[Home](./index.md) > [kibana-plugin-plugins-ui\_actions-public](./kibana-plugin-plugins-ui_actions-public.md) > [UiActionsPresentable](./kibana-plugin-plugins-ui_actions-public.uiactionspresentable.md) > [grouping](./kibana-plugin-plugins-ui_actions-public.uiactionspresentable.grouping.md) + +## UiActionsPresentable.grouping property + +Grouping where this item should appear as a submenu. Each entry is a new sub-menu level. For example, used to show drilldowns and sharing options in panel context menu in a sub-menu. + +Signature: + +```typescript +readonly grouping?: PresentableGrouping; +``` diff --git a/docs/development/plugins/ui_actions/public/kibana-plugin-plugins-ui_actions-public.uiactionspresentable.id.md b/docs/development/plugins/ui_actions/public/kibana-plugin-plugins-ui_actions-public.uiactionspresentable.id.md new file mode 100644 index 0000000000000..e98401d95cba8 --- /dev/null +++ b/docs/development/plugins/ui_actions/public/kibana-plugin-plugins-ui_actions-public.uiactionspresentable.id.md @@ -0,0 +1,13 @@ + + +[Home](./index.md) > [kibana-plugin-plugins-ui\_actions-public](./kibana-plugin-plugins-ui_actions-public.md) > [UiActionsPresentable](./kibana-plugin-plugins-ui_actions-public.uiactionspresentable.md) > [id](./kibana-plugin-plugins-ui_actions-public.uiactionspresentable.id.md) + +## UiActionsPresentable.id property + +ID that uniquely identifies this object. + +Signature: + +```typescript +readonly id: string; +``` diff --git a/docs/development/plugins/ui_actions/public/kibana-plugin-plugins-ui_actions-public.uiactionspresentable.iscompatible.md b/docs/development/plugins/ui_actions/public/kibana-plugin-plugins-ui_actions-public.uiactionspresentable.iscompatible.md new file mode 100644 index 0000000000000..073f75c840bcd --- /dev/null +++ b/docs/development/plugins/ui_actions/public/kibana-plugin-plugins-ui_actions-public.uiactionspresentable.iscompatible.md @@ -0,0 +1,24 @@ + + +[Home](./index.md) > [kibana-plugin-plugins-ui\_actions-public](./kibana-plugin-plugins-ui_actions-public.md) > [UiActionsPresentable](./kibana-plugin-plugins-ui_actions-public.uiactionspresentable.md) > [isCompatible](./kibana-plugin-plugins-ui_actions-public.uiactionspresentable.iscompatible.md) + +## UiActionsPresentable.isCompatible() method + +Returns a promise that resolves to true if this item is compatible given the context and should be displayed to user, otherwise resolves to false. + +Signature: + +```typescript +isCompatible(context: Context): Promise; +``` + +## Parameters + +| Parameter | Type | Description | +| --- | --- | --- | +| context | Context | | + +Returns: + +`Promise` + diff --git a/docs/development/plugins/ui_actions/public/kibana-plugin-plugins-ui_actions-public.uiactionspresentable.md b/docs/development/plugins/ui_actions/public/kibana-plugin-plugins-ui_actions-public.uiactionspresentable.md new file mode 100644 index 0000000000000..03fa7fb6e447e --- /dev/null +++ b/docs/development/plugins/ui_actions/public/kibana-plugin-plugins-ui_actions-public.uiactionspresentable.md @@ -0,0 +1,33 @@ + + +[Home](./index.md) > [kibana-plugin-plugins-ui\_actions-public](./kibana-plugin-plugins-ui_actions-public.md) > [UiActionsPresentable](./kibana-plugin-plugins-ui_actions-public.uiactionspresentable.md) + +## UiActionsPresentable interface + +Represents something that can be displayed to user in UI. + +Signature: + +```typescript +export interface Presentable +``` + +## Properties + +| Property | Type | Description | +| --- | --- | --- | +| [grouping](./kibana-plugin-plugins-ui_actions-public.uiactionspresentable.grouping.md) | PresentableGrouping<Context> | Grouping where this item should appear as a submenu. Each entry is a new sub-menu level. For example, used to show drilldowns and sharing options in panel context menu in a sub-menu. | +| [id](./kibana-plugin-plugins-ui_actions-public.uiactionspresentable.id.md) | string | ID that uniquely identifies this object. | +| [MenuItem](./kibana-plugin-plugins-ui_actions-public.uiactionspresentable.menuitem.md) | UiComponent<{
context: Context;
}> | UiComponent to render when displaying this entity as a context menu item. If not provided, getDisplayName will be used instead. | +| [order](./kibana-plugin-plugins-ui_actions-public.uiactionspresentable.order.md) | number | Determines the display order in relation to other items. Higher numbers are displayed first. | + +## Methods + +| Method | Description | +| --- | --- | +| [getDisplayName(context)](./kibana-plugin-plugins-ui_actions-public.uiactionspresentable.getdisplayname.md) | Returns a title to be displayed to the user. | +| [getDisplayNameTooltip(context)](./kibana-plugin-plugins-ui_actions-public.uiactionspresentable.getdisplaynametooltip.md) | Returns tooltip text which should be displayed when user hovers this object. Should return empty string if tooltip should not be displayed. | +| [getHref(context)](./kibana-plugin-plugins-ui_actions-public.uiactionspresentable.gethref.md) | This method should return a link if this item can be clicked on. The link is used to navigate user if user middle-clicks it or Ctrl + clicks or right-clicks and selects "Open in new tab". | +| [getIconType(context)](./kibana-plugin-plugins-ui_actions-public.uiactionspresentable.geticontype.md) | Optional EUI icon type that can be displayed along with the title. | +| [isCompatible(context)](./kibana-plugin-plugins-ui_actions-public.uiactionspresentable.iscompatible.md) | Returns a promise that resolves to true if this item is compatible given the context and should be displayed to user, otherwise resolves to false. | + diff --git a/docs/development/plugins/ui_actions/public/kibana-plugin-plugins-ui_actions-public.uiactionspresentable.menuitem.md b/docs/development/plugins/ui_actions/public/kibana-plugin-plugins-ui_actions-public.uiactionspresentable.menuitem.md new file mode 100644 index 0000000000000..42afe6b8361f0 --- /dev/null +++ b/docs/development/plugins/ui_actions/public/kibana-plugin-plugins-ui_actions-public.uiactionspresentable.menuitem.md @@ -0,0 +1,15 @@ + + +[Home](./index.md) > [kibana-plugin-plugins-ui\_actions-public](./kibana-plugin-plugins-ui_actions-public.md) > [UiActionsPresentable](./kibana-plugin-plugins-ui_actions-public.uiactionspresentable.md) > [MenuItem](./kibana-plugin-plugins-ui_actions-public.uiactionspresentable.menuitem.md) + +## UiActionsPresentable.MenuItem property + +`UiComponent` to render when displaying this entity as a context menu item. If not provided, `getDisplayName` will be used instead. + +Signature: + +```typescript +readonly MenuItem?: UiComponent<{ + context: Context; + }>; +``` diff --git a/docs/development/plugins/ui_actions/public/kibana-plugin-plugins-ui_actions-public.uiactionspresentable.order.md b/docs/development/plugins/ui_actions/public/kibana-plugin-plugins-ui_actions-public.uiactionspresentable.order.md new file mode 100644 index 0000000000000..0bbf80dc89211 --- /dev/null +++ b/docs/development/plugins/ui_actions/public/kibana-plugin-plugins-ui_actions-public.uiactionspresentable.order.md @@ -0,0 +1,13 @@ + + +[Home](./index.md) > [kibana-plugin-plugins-ui\_actions-public](./kibana-plugin-plugins-ui_actions-public.md) > [UiActionsPresentable](./kibana-plugin-plugins-ui_actions-public.uiactionspresentable.md) > [order](./kibana-plugin-plugins-ui_actions-public.uiactionspresentable.order.md) + +## UiActionsPresentable.order property + +Determines the display order in relation to other items. Higher numbers are displayed first. + +Signature: + +```typescript +readonly order: number; +``` diff --git a/docs/development/plugins/ui_actions/public/kibana-plugin-plugins-ui_actions-public.uiactionspresentablegrouping.md b/docs/development/plugins/ui_actions/public/kibana-plugin-plugins-ui_actions-public.uiactionspresentablegrouping.md new file mode 100644 index 0000000000000..a61ff65e39c69 --- /dev/null +++ b/docs/development/plugins/ui_actions/public/kibana-plugin-plugins-ui_actions-public.uiactionspresentablegrouping.md @@ -0,0 +1,11 @@ + + +[Home](./index.md) > [kibana-plugin-plugins-ui\_actions-public](./kibana-plugin-plugins-ui_actions-public.md) > [UiActionsPresentableGrouping](./kibana-plugin-plugins-ui_actions-public.uiactionspresentablegrouping.md) + +## UiActionsPresentableGrouping type + +Signature: + +```typescript +export declare type PresentableGrouping = Array>; +``` diff --git a/docs/development/plugins/ui_actions/public/kibana-plugin-plugins-ui_actions-public.uiactionsservice._constructor_.md b/docs/development/plugins/ui_actions/public/kibana-plugin-plugins-ui_actions-public.uiactionsservice._constructor_.md new file mode 100644 index 0000000000000..ff272245dbbf9 --- /dev/null +++ b/docs/development/plugins/ui_actions/public/kibana-plugin-plugins-ui_actions-public.uiactionsservice._constructor_.md @@ -0,0 +1,20 @@ + + +[Home](./index.md) > [kibana-plugin-plugins-ui\_actions-public](./kibana-plugin-plugins-ui_actions-public.md) > [UiActionsService](./kibana-plugin-plugins-ui_actions-public.uiactionsservice.md) > [(constructor)](./kibana-plugin-plugins-ui_actions-public.uiactionsservice._constructor_.md) + +## UiActionsService.(constructor) + +Constructs a new instance of the `UiActionsService` class + +Signature: + +```typescript +constructor({ triggers, actions, triggerToActions, }?: UiActionsServiceParams); +``` + +## Parameters + +| Parameter | Type | Description | +| --- | --- | --- | +| { triggers, actions, triggerToActions, } | UiActionsServiceParams | | + diff --git a/docs/development/plugins/ui_actions/public/kibana-plugin-plugins-ui_actions-public.uiactionsservice.actions.md b/docs/development/plugins/ui_actions/public/kibana-plugin-plugins-ui_actions-public.uiactionsservice.actions.md new file mode 100644 index 0000000000000..aaf4cebaf841c --- /dev/null +++ b/docs/development/plugins/ui_actions/public/kibana-plugin-plugins-ui_actions-public.uiactionsservice.actions.md @@ -0,0 +1,11 @@ + + +[Home](./index.md) > [kibana-plugin-plugins-ui\_actions-public](./kibana-plugin-plugins-ui_actions-public.md) > [UiActionsService](./kibana-plugin-plugins-ui_actions-public.uiactionsservice.md) > [actions](./kibana-plugin-plugins-ui_actions-public.uiactionsservice.actions.md) + +## UiActionsService.actions property + +Signature: + +```typescript +protected readonly actions: ActionRegistry; +``` diff --git a/docs/development/plugins/ui_actions/public/kibana-plugin-plugins-ui_actions-public.uiactionsservice.addtriggeraction.md b/docs/development/plugins/ui_actions/public/kibana-plugin-plugins-ui_actions-public.uiactionsservice.addtriggeraction.md new file mode 100644 index 0000000000000..1782eef92442c --- /dev/null +++ b/docs/development/plugins/ui_actions/public/kibana-plugin-plugins-ui_actions-public.uiactionsservice.addtriggeraction.md @@ -0,0 +1,15 @@ + + +[Home](./index.md) > [kibana-plugin-plugins-ui\_actions-public](./kibana-plugin-plugins-ui_actions-public.md) > [UiActionsService](./kibana-plugin-plugins-ui_actions-public.uiactionsservice.md) > [addTriggerAction](./kibana-plugin-plugins-ui_actions-public.uiactionsservice.addtriggeraction.md) + +## UiActionsService.addTriggerAction property + +`addTriggerAction` is similar to `attachAction` as it attaches action to a trigger, but it also registers the action, if it has not been registered, yet. + +`addTriggerAction` also infers better typing of the `action` argument. + +Signature: + +```typescript +readonly addTriggerAction: (triggerId: T, action: ActionDefinition | Action) => void; +``` diff --git a/docs/development/plugins/ui_actions/public/kibana-plugin-plugins-ui_actions-public.uiactionsservice.attachaction.md b/docs/development/plugins/ui_actions/public/kibana-plugin-plugins-ui_actions-public.uiactionsservice.attachaction.md new file mode 100644 index 0000000000000..19f215a96b23b --- /dev/null +++ b/docs/development/plugins/ui_actions/public/kibana-plugin-plugins-ui_actions-public.uiactionsservice.attachaction.md @@ -0,0 +1,11 @@ + + +[Home](./index.md) > [kibana-plugin-plugins-ui\_actions-public](./kibana-plugin-plugins-ui_actions-public.md) > [UiActionsService](./kibana-plugin-plugins-ui_actions-public.uiactionsservice.md) > [attachAction](./kibana-plugin-plugins-ui_actions-public.uiactionsservice.attachaction.md) + +## UiActionsService.attachAction property + +Signature: + +```typescript +readonly attachAction: (triggerId: T, actionId: string) => void; +``` diff --git a/docs/development/plugins/ui_actions/public/kibana-plugin-plugins-ui_actions-public.uiactionsservice.clear.md b/docs/development/plugins/ui_actions/public/kibana-plugin-plugins-ui_actions-public.uiactionsservice.clear.md new file mode 100644 index 0000000000000..024c7e3c3f85a --- /dev/null +++ b/docs/development/plugins/ui_actions/public/kibana-plugin-plugins-ui_actions-public.uiactionsservice.clear.md @@ -0,0 +1,13 @@ + + +[Home](./index.md) > [kibana-plugin-plugins-ui\_actions-public](./kibana-plugin-plugins-ui_actions-public.md) > [UiActionsService](./kibana-plugin-plugins-ui_actions-public.uiactionsservice.md) > [clear](./kibana-plugin-plugins-ui_actions-public.uiactionsservice.clear.md) + +## UiActionsService.clear property + +Removes all registered triggers and actions. + +Signature: + +```typescript +readonly clear: () => void; +``` diff --git a/docs/development/plugins/ui_actions/public/kibana-plugin-plugins-ui_actions-public.uiactionsservice.detachaction.md b/docs/development/plugins/ui_actions/public/kibana-plugin-plugins-ui_actions-public.uiactionsservice.detachaction.md new file mode 100644 index 0000000000000..a6ff2489c6f0e --- /dev/null +++ b/docs/development/plugins/ui_actions/public/kibana-plugin-plugins-ui_actions-public.uiactionsservice.detachaction.md @@ -0,0 +1,11 @@ + + +[Home](./index.md) > [kibana-plugin-plugins-ui\_actions-public](./kibana-plugin-plugins-ui_actions-public.md) > [UiActionsService](./kibana-plugin-plugins-ui_actions-public.uiactionsservice.md) > [detachAction](./kibana-plugin-plugins-ui_actions-public.uiactionsservice.detachaction.md) + +## UiActionsService.detachAction property + +Signature: + +```typescript +readonly detachAction: (triggerId: TriggerId, actionId: string) => void; +``` diff --git a/docs/development/plugins/ui_actions/public/kibana-plugin-plugins-ui_actions-public.uiactionsservice.executetriggeractions.md b/docs/development/plugins/ui_actions/public/kibana-plugin-plugins-ui_actions-public.uiactionsservice.executetriggeractions.md new file mode 100644 index 0000000000000..1bb6ca1115248 --- /dev/null +++ b/docs/development/plugins/ui_actions/public/kibana-plugin-plugins-ui_actions-public.uiactionsservice.executetriggeractions.md @@ -0,0 +1,16 @@ + + +[Home](./index.md) > [kibana-plugin-plugins-ui\_actions-public](./kibana-plugin-plugins-ui_actions-public.md) > [UiActionsService](./kibana-plugin-plugins-ui_actions-public.uiactionsservice.md) > [executeTriggerActions](./kibana-plugin-plugins-ui_actions-public.uiactionsservice.executetriggeractions.md) + +## UiActionsService.executeTriggerActions property + +> Warning: This API is now obsolete. +> +> Use `plugins.uiActions.getTrigger(triggerId).exec(params)` instead. +> + +Signature: + +```typescript +readonly executeTriggerActions: (triggerId: T, context: TriggerContext) => Promise; +``` diff --git a/docs/development/plugins/ui_actions/public/kibana-plugin-plugins-ui_actions-public.uiactionsservice.executionservice.md b/docs/development/plugins/ui_actions/public/kibana-plugin-plugins-ui_actions-public.uiactionsservice.executionservice.md new file mode 100644 index 0000000000000..06384cc110a59 --- /dev/null +++ b/docs/development/plugins/ui_actions/public/kibana-plugin-plugins-ui_actions-public.uiactionsservice.executionservice.md @@ -0,0 +1,11 @@ + + +[Home](./index.md) > [kibana-plugin-plugins-ui\_actions-public](./kibana-plugin-plugins-ui_actions-public.md) > [UiActionsService](./kibana-plugin-plugins-ui_actions-public.uiactionsservice.md) > [executionService](./kibana-plugin-plugins-ui_actions-public.uiactionsservice.executionservice.md) + +## UiActionsService.executionService property + +Signature: + +```typescript +readonly executionService: UiActionsExecutionService; +``` diff --git a/docs/development/plugins/ui_actions/public/kibana-plugin-plugins-ui_actions-public.uiactionsservice.fork.md b/docs/development/plugins/ui_actions/public/kibana-plugin-plugins-ui_actions-public.uiactionsservice.fork.md new file mode 100644 index 0000000000000..2b7a43a44cca6 --- /dev/null +++ b/docs/development/plugins/ui_actions/public/kibana-plugin-plugins-ui_actions-public.uiactionsservice.fork.md @@ -0,0 +1,13 @@ + + +[Home](./index.md) > [kibana-plugin-plugins-ui\_actions-public](./kibana-plugin-plugins-ui_actions-public.md) > [UiActionsService](./kibana-plugin-plugins-ui_actions-public.uiactionsservice.md) > [fork](./kibana-plugin-plugins-ui_actions-public.uiactionsservice.fork.md) + +## UiActionsService.fork property + +"Fork" a separate instance of `UiActionsService` that inherits all existing triggers and actions, but going forward all new triggers and actions added to this instance of `UiActionsService` are only available within this instance. + +Signature: + +```typescript +readonly fork: () => UiActionsService; +``` diff --git a/docs/development/plugins/ui_actions/public/kibana-plugin-plugins-ui_actions-public.uiactionsservice.getaction.md b/docs/development/plugins/ui_actions/public/kibana-plugin-plugins-ui_actions-public.uiactionsservice.getaction.md new file mode 100644 index 0000000000000..0c4584a07b569 --- /dev/null +++ b/docs/development/plugins/ui_actions/public/kibana-plugin-plugins-ui_actions-public.uiactionsservice.getaction.md @@ -0,0 +1,11 @@ + + +[Home](./index.md) > [kibana-plugin-plugins-ui\_actions-public](./kibana-plugin-plugins-ui_actions-public.md) > [UiActionsService](./kibana-plugin-plugins-ui_actions-public.uiactionsservice.md) > [getAction](./kibana-plugin-plugins-ui_actions-public.uiactionsservice.getaction.md) + +## UiActionsService.getAction property + +Signature: + +```typescript +readonly getAction: >(id: string) => Action, "" | "ACTION_VISUALIZE_FIELD" | "ACTION_VISUALIZE_GEO_FIELD" | "ACTION_CUSTOMIZE_PANEL" | "ACTION_ADD_PANEL" | "openInspector" | "deletePanel" | "editPanel" | "togglePanel" | "replacePanel" | "clonePanel" | "addToFromLibrary" | "unlinkFromLibrary" | "ACTION_LIBRARY_NOTIFICATION" | "ACTION_GLOBAL_APPLY_FILTER" | "ACTION_SELECT_RANGE" | "ACTION_VALUE_CLICK">; +``` diff --git a/docs/development/plugins/ui_actions/public/kibana-plugin-plugins-ui_actions-public.uiactionsservice.gettrigger.md b/docs/development/plugins/ui_actions/public/kibana-plugin-plugins-ui_actions-public.uiactionsservice.gettrigger.md new file mode 100644 index 0000000000000..d44dc4e43a52e --- /dev/null +++ b/docs/development/plugins/ui_actions/public/kibana-plugin-plugins-ui_actions-public.uiactionsservice.gettrigger.md @@ -0,0 +1,11 @@ + + +[Home](./index.md) > [kibana-plugin-plugins-ui\_actions-public](./kibana-plugin-plugins-ui_actions-public.md) > [UiActionsService](./kibana-plugin-plugins-ui_actions-public.uiactionsservice.md) > [getTrigger](./kibana-plugin-plugins-ui_actions-public.uiactionsservice.gettrigger.md) + +## UiActionsService.getTrigger property + +Signature: + +```typescript +readonly getTrigger: (triggerId: T) => TriggerContract; +``` diff --git a/docs/development/plugins/ui_actions/public/kibana-plugin-plugins-ui_actions-public.uiactionsservice.gettriggeractions.md b/docs/development/plugins/ui_actions/public/kibana-plugin-plugins-ui_actions-public.uiactionsservice.gettriggeractions.md new file mode 100644 index 0000000000000..c65a9a992da2e --- /dev/null +++ b/docs/development/plugins/ui_actions/public/kibana-plugin-plugins-ui_actions-public.uiactionsservice.gettriggeractions.md @@ -0,0 +1,11 @@ + + +[Home](./index.md) > [kibana-plugin-plugins-ui\_actions-public](./kibana-plugin-plugins-ui_actions-public.md) > [UiActionsService](./kibana-plugin-plugins-ui_actions-public.uiactionsservice.md) > [getTriggerActions](./kibana-plugin-plugins-ui_actions-public.uiactionsservice.gettriggeractions.md) + +## UiActionsService.getTriggerActions property + +Signature: + +```typescript +readonly getTriggerActions: (triggerId: T) => Action[]; +``` diff --git a/docs/development/plugins/ui_actions/public/kibana-plugin-plugins-ui_actions-public.uiactionsservice.gettriggercompatibleactions.md b/docs/development/plugins/ui_actions/public/kibana-plugin-plugins-ui_actions-public.uiactionsservice.gettriggercompatibleactions.md new file mode 100644 index 0000000000000..751abe332b08e --- /dev/null +++ b/docs/development/plugins/ui_actions/public/kibana-plugin-plugins-ui_actions-public.uiactionsservice.gettriggercompatibleactions.md @@ -0,0 +1,11 @@ + + +[Home](./index.md) > [kibana-plugin-plugins-ui\_actions-public](./kibana-plugin-plugins-ui_actions-public.md) > [UiActionsService](./kibana-plugin-plugins-ui_actions-public.uiactionsservice.md) > [getTriggerCompatibleActions](./kibana-plugin-plugins-ui_actions-public.uiactionsservice.gettriggercompatibleactions.md) + +## UiActionsService.getTriggerCompatibleActions property + +Signature: + +```typescript +readonly getTriggerCompatibleActions: (triggerId: T, context: TriggerContextMapping[T]) => Promise[]>; +``` diff --git a/docs/development/plugins/ui_actions/public/kibana-plugin-plugins-ui_actions-public.uiactionsservice.hasaction.md b/docs/development/plugins/ui_actions/public/kibana-plugin-plugins-ui_actions-public.uiactionsservice.hasaction.md new file mode 100644 index 0000000000000..2287cb3052864 --- /dev/null +++ b/docs/development/plugins/ui_actions/public/kibana-plugin-plugins-ui_actions-public.uiactionsservice.hasaction.md @@ -0,0 +1,11 @@ + + +[Home](./index.md) > [kibana-plugin-plugins-ui\_actions-public](./kibana-plugin-plugins-ui_actions-public.md) > [UiActionsService](./kibana-plugin-plugins-ui_actions-public.uiactionsservice.md) > [hasAction](./kibana-plugin-plugins-ui_actions-public.uiactionsservice.hasaction.md) + +## UiActionsService.hasAction property + +Signature: + +```typescript +readonly hasAction: (actionId: string) => boolean; +``` diff --git a/docs/development/plugins/ui_actions/public/kibana-plugin-plugins-ui_actions-public.uiactionsservice.md b/docs/development/plugins/ui_actions/public/kibana-plugin-plugins-ui_actions-public.uiactionsservice.md new file mode 100644 index 0000000000000..c372eb113d682 --- /dev/null +++ b/docs/development/plugins/ui_actions/public/kibana-plugin-plugins-ui_actions-public.uiactionsservice.md @@ -0,0 +1,41 @@ + + +[Home](./index.md) > [kibana-plugin-plugins-ui\_actions-public](./kibana-plugin-plugins-ui_actions-public.md) > [UiActionsService](./kibana-plugin-plugins-ui_actions-public.uiactionsservice.md) + +## UiActionsService class + +Signature: + +```typescript +export declare class UiActionsService +``` + +## Constructors + +| Constructor | Modifiers | Description | +| --- | --- | --- | +| [(constructor)({ triggers, actions, triggerToActions, })](./kibana-plugin-plugins-ui_actions-public.uiactionsservice._constructor_.md) | | Constructs a new instance of the UiActionsService class | + +## Properties + +| Property | Modifiers | Type | Description | +| --- | --- | --- | --- | +| [actions](./kibana-plugin-plugins-ui_actions-public.uiactionsservice.actions.md) | | ActionRegistry | | +| [addTriggerAction](./kibana-plugin-plugins-ui_actions-public.uiactionsservice.addtriggeraction.md) | | <T extends "" | "SELECT_RANGE_TRIGGER" | "VALUE_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_CUSTOMIZE_PANEL" | "ACTION_ADD_PANEL" | "openInspector" | "deletePanel" | "editPanel" | "togglePanel" | "replacePanel" | "clonePanel" | "addToFromLibrary" | "unlinkFromLibrary" | "ACTION_LIBRARY_NOTIFICATION" | "ACTION_GLOBAL_APPLY_FILTER" | "ACTION_SELECT_RANGE" | "ACTION_VALUE_CLICK">) => void | addTriggerAction is similar to attachAction as it attaches action to a trigger, but it also registers the action, if it has not been registered, yet.addTriggerAction also infers better typing of the action argument. | +| [attachAction](./kibana-plugin-plugins-ui_actions-public.uiactionsservice.attachaction.md) | | <T extends "" | "SELECT_RANGE_TRIGGER" | "VALUE_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 | | +| [clear](./kibana-plugin-plugins-ui_actions-public.uiactionsservice.clear.md) | | () => void | Removes all registered triggers and actions. | +| [detachAction](./kibana-plugin-plugins-ui_actions-public.uiactionsservice.detachaction.md) | | (triggerId: TriggerId, actionId: string) => void | | +| [executeTriggerActions](./kibana-plugin-plugins-ui_actions-public.uiactionsservice.executetriggeractions.md) | | <T extends "" | "SELECT_RANGE_TRIGGER" | "VALUE_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> | | +| [executionService](./kibana-plugin-plugins-ui_actions-public.uiactionsservice.executionservice.md) | | UiActionsExecutionService | | +| [fork](./kibana-plugin-plugins-ui_actions-public.uiactionsservice.fork.md) | | () => UiActionsService | "Fork" a separate instance of UiActionsService that inherits all existing triggers and actions, but going forward all new triggers and actions added to this instance of UiActionsService are only available within this instance. | +| [getAction](./kibana-plugin-plugins-ui_actions-public.uiactionsservice.getaction.md) | | <T extends ActionDefinition<{}>>(id: string) => Action<ActionContext<T>, "" | "ACTION_VISUALIZE_FIELD" | "ACTION_VISUALIZE_GEO_FIELD" | "ACTION_CUSTOMIZE_PANEL" | "ACTION_ADD_PANEL" | "openInspector" | "deletePanel" | "editPanel" | "togglePanel" | "replacePanel" | "clonePanel" | "addToFromLibrary" | "unlinkFromLibrary" | "ACTION_LIBRARY_NOTIFICATION" | "ACTION_GLOBAL_APPLY_FILTER" | "ACTION_SELECT_RANGE" | "ACTION_VALUE_CLICK"> | | +| [getTrigger](./kibana-plugin-plugins-ui_actions-public.uiactionsservice.gettrigger.md) | | <T extends "" | "SELECT_RANGE_TRIGGER" | "VALUE_CLICK_TRIGGER" | "FILTER_TRIGGER" | "VISUALIZE_FIELD_TRIGGER" | "VISUALIZE_GEO_FIELD_TRIGGER" | "CONTEXT_MENU_TRIGGER" | "PANEL_BADGE_TRIGGER" | "PANEL_NOTIFICATION_TRIGGER">(triggerId: T) => TriggerContract<T> | | +| [getTriggerActions](./kibana-plugin-plugins-ui_actions-public.uiactionsservice.gettriggeractions.md) | | <T extends "" | "SELECT_RANGE_TRIGGER" | "VALUE_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_CUSTOMIZE_PANEL" | "ACTION_ADD_PANEL" | "openInspector" | "deletePanel" | "editPanel" | "togglePanel" | "replacePanel" | "clonePanel" | "addToFromLibrary" | "unlinkFromLibrary" | "ACTION_LIBRARY_NOTIFICATION" | "ACTION_GLOBAL_APPLY_FILTER" | "ACTION_SELECT_RANGE" | "ACTION_VALUE_CLICK">[] | | +| [getTriggerCompatibleActions](./kibana-plugin-plugins-ui_actions-public.uiactionsservice.gettriggercompatibleactions.md) | | <T extends "" | "SELECT_RANGE_TRIGGER" | "VALUE_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_CUSTOMIZE_PANEL" | "ACTION_ADD_PANEL" | "openInspector" | "deletePanel" | "editPanel" | "togglePanel" | "replacePanel" | "clonePanel" | "addToFromLibrary" | "unlinkFromLibrary" | "ACTION_LIBRARY_NOTIFICATION" | "ACTION_GLOBAL_APPLY_FILTER" | "ACTION_SELECT_RANGE" | "ACTION_VALUE_CLICK">[]> | | +| [hasAction](./kibana-plugin-plugins-ui_actions-public.uiactionsservice.hasaction.md) | | (actionId: string) => boolean | | +| [registerAction](./kibana-plugin-plugins-ui_actions-public.uiactionsservice.registeraction.md) | | <A extends ActionDefinition<{}>>(definition: A) => Action<ActionContext<A>, "" | "ACTION_VISUALIZE_FIELD" | "ACTION_VISUALIZE_GEO_FIELD" | "ACTION_CUSTOMIZE_PANEL" | "ACTION_ADD_PANEL" | "openInspector" | "deletePanel" | "editPanel" | "togglePanel" | "replacePanel" | "clonePanel" | "addToFromLibrary" | "unlinkFromLibrary" | "ACTION_LIBRARY_NOTIFICATION" | "ACTION_GLOBAL_APPLY_FILTER" | "ACTION_SELECT_RANGE" | "ACTION_VALUE_CLICK"> | | +| [registerTrigger](./kibana-plugin-plugins-ui_actions-public.uiactionsservice.registertrigger.md) | | (trigger: Trigger) => void | | +| [triggers](./kibana-plugin-plugins-ui_actions-public.uiactionsservice.triggers.md) | | TriggerRegistry | | +| [triggerToActions](./kibana-plugin-plugins-ui_actions-public.uiactionsservice.triggertoactions.md) | | TriggerToActionsRegistry | | +| [unregisterAction](./kibana-plugin-plugins-ui_actions-public.uiactionsservice.unregisteraction.md) | | (actionId: string) => void | | + diff --git a/docs/development/plugins/ui_actions/public/kibana-plugin-plugins-ui_actions-public.uiactionsservice.registeraction.md b/docs/development/plugins/ui_actions/public/kibana-plugin-plugins-ui_actions-public.uiactionsservice.registeraction.md new file mode 100644 index 0000000000000..c71e86fc09dc7 --- /dev/null +++ b/docs/development/plugins/ui_actions/public/kibana-plugin-plugins-ui_actions-public.uiactionsservice.registeraction.md @@ -0,0 +1,11 @@ + + +[Home](./index.md) > [kibana-plugin-plugins-ui\_actions-public](./kibana-plugin-plugins-ui_actions-public.md) > [UiActionsService](./kibana-plugin-plugins-ui_actions-public.uiactionsservice.md) > [registerAction](./kibana-plugin-plugins-ui_actions-public.uiactionsservice.registeraction.md) + +## UiActionsService.registerAction property + +Signature: + +```typescript +readonly registerAction: >(definition: A) => Action, "" | "ACTION_VISUALIZE_FIELD" | "ACTION_VISUALIZE_GEO_FIELD" | "ACTION_CUSTOMIZE_PANEL" | "ACTION_ADD_PANEL" | "openInspector" | "deletePanel" | "editPanel" | "togglePanel" | "replacePanel" | "clonePanel" | "addToFromLibrary" | "unlinkFromLibrary" | "ACTION_LIBRARY_NOTIFICATION" | "ACTION_GLOBAL_APPLY_FILTER" | "ACTION_SELECT_RANGE" | "ACTION_VALUE_CLICK">; +``` diff --git a/docs/development/plugins/ui_actions/public/kibana-plugin-plugins-ui_actions-public.uiactionsservice.registertrigger.md b/docs/development/plugins/ui_actions/public/kibana-plugin-plugins-ui_actions-public.uiactionsservice.registertrigger.md new file mode 100644 index 0000000000000..3002409c02304 --- /dev/null +++ b/docs/development/plugins/ui_actions/public/kibana-plugin-plugins-ui_actions-public.uiactionsservice.registertrigger.md @@ -0,0 +1,11 @@ + + +[Home](./index.md) > [kibana-plugin-plugins-ui\_actions-public](./kibana-plugin-plugins-ui_actions-public.md) > [UiActionsService](./kibana-plugin-plugins-ui_actions-public.uiactionsservice.md) > [registerTrigger](./kibana-plugin-plugins-ui_actions-public.uiactionsservice.registertrigger.md) + +## UiActionsService.registerTrigger property + +Signature: + +```typescript +readonly registerTrigger: (trigger: Trigger) => void; +``` diff --git a/docs/development/plugins/ui_actions/public/kibana-plugin-plugins-ui_actions-public.uiactionsservice.triggers.md b/docs/development/plugins/ui_actions/public/kibana-plugin-plugins-ui_actions-public.uiactionsservice.triggers.md new file mode 100644 index 0000000000000..07d480286e771 --- /dev/null +++ b/docs/development/plugins/ui_actions/public/kibana-plugin-plugins-ui_actions-public.uiactionsservice.triggers.md @@ -0,0 +1,11 @@ + + +[Home](./index.md) > [kibana-plugin-plugins-ui\_actions-public](./kibana-plugin-plugins-ui_actions-public.md) > [UiActionsService](./kibana-plugin-plugins-ui_actions-public.uiactionsservice.md) > [triggers](./kibana-plugin-plugins-ui_actions-public.uiactionsservice.triggers.md) + +## UiActionsService.triggers property + +Signature: + +```typescript +protected readonly triggers: TriggerRegistry; +``` diff --git a/docs/development/plugins/ui_actions/public/kibana-plugin-plugins-ui_actions-public.uiactionsservice.triggertoactions.md b/docs/development/plugins/ui_actions/public/kibana-plugin-plugins-ui_actions-public.uiactionsservice.triggertoactions.md new file mode 100644 index 0000000000000..1b79a1dd84593 --- /dev/null +++ b/docs/development/plugins/ui_actions/public/kibana-plugin-plugins-ui_actions-public.uiactionsservice.triggertoactions.md @@ -0,0 +1,11 @@ + + +[Home](./index.md) > [kibana-plugin-plugins-ui\_actions-public](./kibana-plugin-plugins-ui_actions-public.md) > [UiActionsService](./kibana-plugin-plugins-ui_actions-public.uiactionsservice.md) > [triggerToActions](./kibana-plugin-plugins-ui_actions-public.uiactionsservice.triggertoactions.md) + +## UiActionsService.triggerToActions property + +Signature: + +```typescript +protected readonly triggerToActions: TriggerToActionsRegistry; +``` diff --git a/docs/development/plugins/ui_actions/public/kibana-plugin-plugins-ui_actions-public.uiactionsservice.unregisteraction.md b/docs/development/plugins/ui_actions/public/kibana-plugin-plugins-ui_actions-public.uiactionsservice.unregisteraction.md new file mode 100644 index 0000000000000..0e0eb971c1a7b --- /dev/null +++ b/docs/development/plugins/ui_actions/public/kibana-plugin-plugins-ui_actions-public.uiactionsservice.unregisteraction.md @@ -0,0 +1,11 @@ + + +[Home](./index.md) > [kibana-plugin-plugins-ui\_actions-public](./kibana-plugin-plugins-ui_actions-public.md) > [UiActionsService](./kibana-plugin-plugins-ui_actions-public.uiactionsservice.md) > [unregisterAction](./kibana-plugin-plugins-ui_actions-public.uiactionsservice.unregisteraction.md) + +## UiActionsService.unregisterAction property + +Signature: + +```typescript +readonly unregisterAction: (actionId: string) => void; +``` diff --git a/docs/development/plugins/ui_actions/public/kibana-plugin-plugins-ui_actions-public.uiactionsserviceparams.actions.md b/docs/development/plugins/ui_actions/public/kibana-plugin-plugins-ui_actions-public.uiactionsserviceparams.actions.md new file mode 100644 index 0000000000000..44d2957b0f8ba --- /dev/null +++ b/docs/development/plugins/ui_actions/public/kibana-plugin-plugins-ui_actions-public.uiactionsserviceparams.actions.md @@ -0,0 +1,11 @@ + + +[Home](./index.md) > [kibana-plugin-plugins-ui\_actions-public](./kibana-plugin-plugins-ui_actions-public.md) > [UiActionsServiceParams](./kibana-plugin-plugins-ui_actions-public.uiactionsserviceparams.md) > [actions](./kibana-plugin-plugins-ui_actions-public.uiactionsserviceparams.actions.md) + +## UiActionsServiceParams.actions property + +Signature: + +```typescript +readonly actions?: ActionRegistry; +``` diff --git a/docs/development/plugins/ui_actions/public/kibana-plugin-plugins-ui_actions-public.uiactionsserviceparams.md b/docs/development/plugins/ui_actions/public/kibana-plugin-plugins-ui_actions-public.uiactionsserviceparams.md new file mode 100644 index 0000000000000..756cd3de92ef8 --- /dev/null +++ b/docs/development/plugins/ui_actions/public/kibana-plugin-plugins-ui_actions-public.uiactionsserviceparams.md @@ -0,0 +1,20 @@ + + +[Home](./index.md) > [kibana-plugin-plugins-ui\_actions-public](./kibana-plugin-plugins-ui_actions-public.md) > [UiActionsServiceParams](./kibana-plugin-plugins-ui_actions-public.uiactionsserviceparams.md) + +## UiActionsServiceParams interface + +Signature: + +```typescript +export interface UiActionsServiceParams +``` + +## Properties + +| Property | Type | Description | +| --- | --- | --- | +| [actions](./kibana-plugin-plugins-ui_actions-public.uiactionsserviceparams.actions.md) | ActionRegistry | | +| [triggers](./kibana-plugin-plugins-ui_actions-public.uiactionsserviceparams.triggers.md) | TriggerRegistry | | +| [triggerToActions](./kibana-plugin-plugins-ui_actions-public.uiactionsserviceparams.triggertoactions.md) | TriggerToActionsRegistry | A 1-to-N mapping from Trigger to zero or more Action. | + diff --git a/docs/development/plugins/ui_actions/public/kibana-plugin-plugins-ui_actions-public.uiactionsserviceparams.triggers.md b/docs/development/plugins/ui_actions/public/kibana-plugin-plugins-ui_actions-public.uiactionsserviceparams.triggers.md new file mode 100644 index 0000000000000..061aa5eb68c5d --- /dev/null +++ b/docs/development/plugins/ui_actions/public/kibana-plugin-plugins-ui_actions-public.uiactionsserviceparams.triggers.md @@ -0,0 +1,11 @@ + + +[Home](./index.md) > [kibana-plugin-plugins-ui\_actions-public](./kibana-plugin-plugins-ui_actions-public.md) > [UiActionsServiceParams](./kibana-plugin-plugins-ui_actions-public.uiactionsserviceparams.md) > [triggers](./kibana-plugin-plugins-ui_actions-public.uiactionsserviceparams.triggers.md) + +## UiActionsServiceParams.triggers property + +Signature: + +```typescript +readonly triggers?: TriggerRegistry; +``` diff --git a/docs/development/plugins/ui_actions/public/kibana-plugin-plugins-ui_actions-public.uiactionsserviceparams.triggertoactions.md b/docs/development/plugins/ui_actions/public/kibana-plugin-plugins-ui_actions-public.uiactionsserviceparams.triggertoactions.md new file mode 100644 index 0000000000000..bdf1acba484e6 --- /dev/null +++ b/docs/development/plugins/ui_actions/public/kibana-plugin-plugins-ui_actions-public.uiactionsserviceparams.triggertoactions.md @@ -0,0 +1,13 @@ + + +[Home](./index.md) > [kibana-plugin-plugins-ui\_actions-public](./kibana-plugin-plugins-ui_actions-public.md) > [UiActionsServiceParams](./kibana-plugin-plugins-ui_actions-public.uiactionsserviceparams.md) > [triggerToActions](./kibana-plugin-plugins-ui_actions-public.uiactionsserviceparams.triggertoactions.md) + +## UiActionsServiceParams.triggerToActions property + +A 1-to-N mapping from `Trigger` to zero or more `Action`. + +Signature: + +```typescript +readonly triggerToActions?: TriggerToActionsRegistry; +``` diff --git a/docs/development/plugins/ui_actions/public/kibana-plugin-plugins-ui_actions-public.uiactionssetup.md b/docs/development/plugins/ui_actions/public/kibana-plugin-plugins-ui_actions-public.uiactionssetup.md new file mode 100644 index 0000000000000..d03d4cf9f1ee2 --- /dev/null +++ b/docs/development/plugins/ui_actions/public/kibana-plugin-plugins-ui_actions-public.uiactionssetup.md @@ -0,0 +1,11 @@ + + +[Home](./index.md) > [kibana-plugin-plugins-ui\_actions-public](./kibana-plugin-plugins-ui_actions-public.md) > [UiActionsSetup](./kibana-plugin-plugins-ui_actions-public.uiactionssetup.md) + +## UiActionsSetup type + +Signature: + +```typescript +export declare type UiActionsSetup = Pick; +``` diff --git a/docs/development/plugins/ui_actions/public/kibana-plugin-plugins-ui_actions-public.uiactionsstart.md b/docs/development/plugins/ui_actions/public/kibana-plugin-plugins-ui_actions-public.uiactionsstart.md new file mode 100644 index 0000000000000..41f5bbf705e20 --- /dev/null +++ b/docs/development/plugins/ui_actions/public/kibana-plugin-plugins-ui_actions-public.uiactionsstart.md @@ -0,0 +1,11 @@ + + +[Home](./index.md) > [kibana-plugin-plugins-ui\_actions-public](./kibana-plugin-plugins-ui_actions-public.md) > [UiActionsStart](./kibana-plugin-plugins-ui_actions-public.uiactionsstart.md) + +## UiActionsStart type + +Signature: + +```typescript +export declare type UiActionsStart = PublicMethodsOf; +``` diff --git a/docs/development/plugins/ui_actions/public/kibana-plugin-plugins-ui_actions-public.value_click_trigger.md b/docs/development/plugins/ui_actions/public/kibana-plugin-plugins-ui_actions-public.value_click_trigger.md new file mode 100644 index 0000000000000..bd8d4dc50b8fd --- /dev/null +++ b/docs/development/plugins/ui_actions/public/kibana-plugin-plugins-ui_actions-public.value_click_trigger.md @@ -0,0 +1,11 @@ + + +[Home](./index.md) > [kibana-plugin-plugins-ui\_actions-public](./kibana-plugin-plugins-ui_actions-public.md) > [VALUE\_CLICK\_TRIGGER](./kibana-plugin-plugins-ui_actions-public.value_click_trigger.md) + +## VALUE\_CLICK\_TRIGGER variable + +Signature: + +```typescript +VALUE_CLICK_TRIGGER = "VALUE_CLICK_TRIGGER" +``` diff --git a/docs/development/plugins/ui_actions/public/kibana-plugin-plugins-ui_actions-public.valueclicktrigger.md b/docs/development/plugins/ui_actions/public/kibana-plugin-plugins-ui_actions-public.valueclicktrigger.md new file mode 100644 index 0000000000000..5c4fc284d83b1 --- /dev/null +++ b/docs/development/plugins/ui_actions/public/kibana-plugin-plugins-ui_actions-public.valueclicktrigger.md @@ -0,0 +1,11 @@ + + +[Home](./index.md) > [kibana-plugin-plugins-ui\_actions-public](./kibana-plugin-plugins-ui_actions-public.md) > [valueClickTrigger](./kibana-plugin-plugins-ui_actions-public.valueclicktrigger.md) + +## valueClickTrigger variable + +Signature: + +```typescript +valueClickTrigger: Trigger<'VALUE_CLICK_TRIGGER'> +``` diff --git a/docs/development/plugins/ui_actions/public/kibana-plugin-plugins-ui_actions-public.visualize_field_trigger.md b/docs/development/plugins/ui_actions/public/kibana-plugin-plugins-ui_actions-public.visualize_field_trigger.md new file mode 100644 index 0000000000000..c5d9f53557d6f --- /dev/null +++ b/docs/development/plugins/ui_actions/public/kibana-plugin-plugins-ui_actions-public.visualize_field_trigger.md @@ -0,0 +1,11 @@ + + +[Home](./index.md) > [kibana-plugin-plugins-ui\_actions-public](./kibana-plugin-plugins-ui_actions-public.md) > [VISUALIZE\_FIELD\_TRIGGER](./kibana-plugin-plugins-ui_actions-public.visualize_field_trigger.md) + +## VISUALIZE\_FIELD\_TRIGGER variable + +Signature: + +```typescript +VISUALIZE_FIELD_TRIGGER = "VISUALIZE_FIELD_TRIGGER" +``` diff --git a/docs/development/plugins/ui_actions/public/kibana-plugin-plugins-ui_actions-public.visualize_geo_field_trigger.md b/docs/development/plugins/ui_actions/public/kibana-plugin-plugins-ui_actions-public.visualize_geo_field_trigger.md new file mode 100644 index 0000000000000..a9396c1905485 --- /dev/null +++ b/docs/development/plugins/ui_actions/public/kibana-plugin-plugins-ui_actions-public.visualize_geo_field_trigger.md @@ -0,0 +1,11 @@ + + +[Home](./index.md) > [kibana-plugin-plugins-ui\_actions-public](./kibana-plugin-plugins-ui_actions-public.md) > [VISUALIZE\_GEO\_FIELD\_TRIGGER](./kibana-plugin-plugins-ui_actions-public.visualize_geo_field_trigger.md) + +## VISUALIZE\_GEO\_FIELD\_TRIGGER variable + +Signature: + +```typescript +VISUALIZE_GEO_FIELD_TRIGGER = "VISUALIZE_GEO_FIELD_TRIGGER" +``` diff --git a/docs/development/plugins/ui_actions/public/kibana-plugin-plugins-ui_actions-public.visualizefieldcontext.contextualfields.md b/docs/development/plugins/ui_actions/public/kibana-plugin-plugins-ui_actions-public.visualizefieldcontext.contextualfields.md new file mode 100644 index 0000000000000..681d4127e4030 --- /dev/null +++ b/docs/development/plugins/ui_actions/public/kibana-plugin-plugins-ui_actions-public.visualizefieldcontext.contextualfields.md @@ -0,0 +1,11 @@ + + +[Home](./index.md) > [kibana-plugin-plugins-ui\_actions-public](./kibana-plugin-plugins-ui_actions-public.md) > [VisualizeFieldContext](./kibana-plugin-plugins-ui_actions-public.visualizefieldcontext.md) > [contextualFields](./kibana-plugin-plugins-ui_actions-public.visualizefieldcontext.contextualfields.md) + +## VisualizeFieldContext.contextualFields property + +Signature: + +```typescript +contextualFields?: string[]; +``` diff --git a/docs/development/plugins/ui_actions/public/kibana-plugin-plugins-ui_actions-public.visualizefieldcontext.fieldname.md b/docs/development/plugins/ui_actions/public/kibana-plugin-plugins-ui_actions-public.visualizefieldcontext.fieldname.md new file mode 100644 index 0000000000000..95f45b1fbee4a --- /dev/null +++ b/docs/development/plugins/ui_actions/public/kibana-plugin-plugins-ui_actions-public.visualizefieldcontext.fieldname.md @@ -0,0 +1,11 @@ + + +[Home](./index.md) > [kibana-plugin-plugins-ui\_actions-public](./kibana-plugin-plugins-ui_actions-public.md) > [VisualizeFieldContext](./kibana-plugin-plugins-ui_actions-public.visualizefieldcontext.md) > [fieldName](./kibana-plugin-plugins-ui_actions-public.visualizefieldcontext.fieldname.md) + +## VisualizeFieldContext.fieldName property + +Signature: + +```typescript +fieldName: string; +``` diff --git a/docs/development/plugins/ui_actions/public/kibana-plugin-plugins-ui_actions-public.visualizefieldcontext.indexpatternid.md b/docs/development/plugins/ui_actions/public/kibana-plugin-plugins-ui_actions-public.visualizefieldcontext.indexpatternid.md new file mode 100644 index 0000000000000..588c115cd9885 --- /dev/null +++ b/docs/development/plugins/ui_actions/public/kibana-plugin-plugins-ui_actions-public.visualizefieldcontext.indexpatternid.md @@ -0,0 +1,11 @@ + + +[Home](./index.md) > [kibana-plugin-plugins-ui\_actions-public](./kibana-plugin-plugins-ui_actions-public.md) > [VisualizeFieldContext](./kibana-plugin-plugins-ui_actions-public.visualizefieldcontext.md) > [indexPatternId](./kibana-plugin-plugins-ui_actions-public.visualizefieldcontext.indexpatternid.md) + +## VisualizeFieldContext.indexPatternId property + +Signature: + +```typescript +indexPatternId: string; +``` diff --git a/docs/development/plugins/ui_actions/public/kibana-plugin-plugins-ui_actions-public.visualizefieldcontext.md b/docs/development/plugins/ui_actions/public/kibana-plugin-plugins-ui_actions-public.visualizefieldcontext.md new file mode 100644 index 0000000000000..7aeb254db7771 --- /dev/null +++ b/docs/development/plugins/ui_actions/public/kibana-plugin-plugins-ui_actions-public.visualizefieldcontext.md @@ -0,0 +1,20 @@ + + +[Home](./index.md) > [kibana-plugin-plugins-ui\_actions-public](./kibana-plugin-plugins-ui_actions-public.md) > [VisualizeFieldContext](./kibana-plugin-plugins-ui_actions-public.visualizefieldcontext.md) + +## VisualizeFieldContext interface + +Signature: + +```typescript +export interface VisualizeFieldContext +``` + +## Properties + +| Property | Type | Description | +| --- | --- | --- | +| [contextualFields](./kibana-plugin-plugins-ui_actions-public.visualizefieldcontext.contextualfields.md) | string[] | | +| [fieldName](./kibana-plugin-plugins-ui_actions-public.visualizefieldcontext.fieldname.md) | string | | +| [indexPatternId](./kibana-plugin-plugins-ui_actions-public.visualizefieldcontext.indexpatternid.md) | string | | + diff --git a/docs/development/plugins/ui_actions/public/kibana-plugin-plugins-ui_actions-public.visualizefieldtrigger.md b/docs/development/plugins/ui_actions/public/kibana-plugin-plugins-ui_actions-public.visualizefieldtrigger.md new file mode 100644 index 0000000000000..15510bd3eb4a3 --- /dev/null +++ b/docs/development/plugins/ui_actions/public/kibana-plugin-plugins-ui_actions-public.visualizefieldtrigger.md @@ -0,0 +1,11 @@ + + +[Home](./index.md) > [kibana-plugin-plugins-ui\_actions-public](./kibana-plugin-plugins-ui_actions-public.md) > [visualizeFieldTrigger](./kibana-plugin-plugins-ui_actions-public.visualizefieldtrigger.md) + +## visualizeFieldTrigger variable + +Signature: + +```typescript +visualizeFieldTrigger: Trigger<'VISUALIZE_FIELD_TRIGGER'> +``` diff --git a/docs/development/plugins/ui_actions/public/kibana-plugin-plugins-ui_actions-public.visualizegeofieldtrigger.md b/docs/development/plugins/ui_actions/public/kibana-plugin-plugins-ui_actions-public.visualizegeofieldtrigger.md new file mode 100644 index 0000000000000..faec6a69b71f9 --- /dev/null +++ b/docs/development/plugins/ui_actions/public/kibana-plugin-plugins-ui_actions-public.visualizegeofieldtrigger.md @@ -0,0 +1,11 @@ + + +[Home](./index.md) > [kibana-plugin-plugins-ui\_actions-public](./kibana-plugin-plugins-ui_actions-public.md) > [visualizeGeoFieldTrigger](./kibana-plugin-plugins-ui_actions-public.visualizegeofieldtrigger.md) + +## visualizeGeoFieldTrigger variable + +Signature: + +```typescript +visualizeGeoFieldTrigger: Trigger<'VISUALIZE_GEO_FIELD_TRIGGER'> +``` diff --git a/src/core/public/apm_system.ts b/src/core/public/apm_system.ts new file mode 100644 index 0000000000000..0a18f02c97293 --- /dev/null +++ b/src/core/public/apm_system.ts @@ -0,0 +1,75 @@ +/* + * 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. + */ + +/** + * This is the entry point used to boot the frontend when serving a application + * that lives in the Kibana Platform. + * + * Any changes to this file should be kept in sync with + * src/legacy/ui/ui_bundles/app_entry_template.js + */ +import type { InternalApplicationStart } from './application'; + +interface ApmConfig { + // AgentConfigOptions is not exported from @elastic/apm-rum + globalLabels?: Record; +} + +interface StartDeps { + application: InternalApplicationStart; +} + +export class ApmSystem { + private readonly enabled: boolean; + /** + * `apmConfig` would be populated with relevant APM RUM agent + * configuration if server is started with `ELASTIC_APM_ACTIVE=true` + */ + constructor(private readonly apmConfig?: ApmConfig) { + this.enabled = process.env.IS_KIBANA_DISTRIBUTABLE !== 'true' && apmConfig != null; + } + + async setup() { + if (!this.enabled) return; + const { init, apm } = await import('@elastic/apm-rum'); + const { globalLabels, ...apmConfig } = this.apmConfig!; + if (globalLabels) { + apm.addLabels(globalLabels); + } + + init(apmConfig); + } + + async start(start?: StartDeps) { + if (!this.enabled || !start) return; + /** + * Register listeners for navigation changes and capture them as + * route-change transactions after Kibana app is bootstrapped + */ + start.application.currentAppId$.subscribe((appId) => { + const apmInstance = (window as any).elasticApm; + if (appId && apmInstance && typeof apmInstance.startTransaction === 'function') { + apmInstance.startTransaction(`/app/${appId}`, 'route-change', { + managed: true, + canReuse: true, + }); + } + }); + } +} diff --git a/src/core/public/kbn_bootstrap.test.mocks.ts b/src/core/public/kbn_bootstrap.test.mocks.ts new file mode 100644 index 0000000000000..30f292280a135 --- /dev/null +++ b/src/core/public/kbn_bootstrap.test.mocks.ts @@ -0,0 +1,50 @@ +/* + * 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 { applicationServiceMock } from './application/application_service.mock'; +import { fatalErrorsServiceMock } from './fatal_errors/fatal_errors_service.mock'; +export const fatalErrorMock = fatalErrorsServiceMock.createSetupContract(); +export const coreSystemMock = { + setup: jest.fn().mockResolvedValue({ + fatalErrors: fatalErrorMock, + }), + start: jest.fn().mockResolvedValue({ + application: applicationServiceMock.createInternalStartContract(), + }), +}; +jest.doMock('./core_system', () => ({ + CoreSystem: jest.fn().mockImplementation(() => coreSystemMock), +})); + +export const apmSystem = { + setup: jest.fn().mockResolvedValue(undefined), + start: jest.fn().mockResolvedValue(undefined), +}; +export const ApmSystemConstructor = jest.fn().mockImplementation(() => apmSystem); +jest.doMock('./apm_system', () => ({ + ApmSystem: ApmSystemConstructor, +})); + +export const i18nLoad = jest.fn().mockResolvedValue(undefined); +jest.doMock('@kbn/i18n', () => ({ + i18n: { + ...jest.requireActual('@kbn/i18n').i18n, + load: i18nLoad, + }, +})); diff --git a/src/core/public/kbn_bootstrap.test.ts b/src/core/public/kbn_bootstrap.test.ts new file mode 100644 index 0000000000000..9cd16dd6ab9df --- /dev/null +++ b/src/core/public/kbn_bootstrap.test.ts @@ -0,0 +1,54 @@ +/* + * 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 { apmSystem, fatalErrorMock, i18nLoad } from './kbn_bootstrap.test.mocks'; +import { __kbnBootstrap__ } from './'; + +describe('kbn_bootstrap', () => { + beforeAll(() => { + const metadata = { + i18n: { translationsUrl: 'http://localhost' }, + vars: { apmConfig: null }, + }; + // eslint-disable-next-line no-unsanitized/property + document.body.innerHTML = ` +`; + }); + + beforeEach(() => { + jest.clearAllMocks(); + }); + + it('does not report a fatal error if apm load fails', async () => { + apmSystem.setup.mockRejectedValueOnce(new Error('reason')); + const consoleSpy = jest.spyOn(console, 'warn').mockImplementationOnce(() => undefined); + + await __kbnBootstrap__(); + + expect(fatalErrorMock.add).toHaveBeenCalledTimes(0); + expect(consoleSpy).toHaveBeenCalledTimes(1); + }); + + it('reports a fatal error if i18n load fails', async () => { + i18nLoad.mockRejectedValueOnce(new Error('reason')); + + await __kbnBootstrap__(); + + expect(fatalErrorMock.add).toHaveBeenCalledTimes(1); + }); +}); diff --git a/src/core/public/kbn_bootstrap.ts b/src/core/public/kbn_bootstrap.ts index a108b5aaa47ec..a083196004cf4 100644 --- a/src/core/public/kbn_bootstrap.ts +++ b/src/core/public/kbn_bootstrap.ts @@ -17,70 +17,38 @@ * under the License. */ -/** - * This is the entry point used to boot the frontend when serving a application - * that lives in the Kibana Platform. - * - * Any changes to this file should be kept in sync with - * src/legacy/ui/ui_bundles/app_entry_template.js - */ - import { i18n } from '@kbn/i18n'; import { CoreSystem } from './core_system'; +import { ApmSystem } from './apm_system'; /** @internal */ -export function __kbnBootstrap__() { +export async function __kbnBootstrap__() { const injectedMetadata = JSON.parse( document.querySelector('kbn-injected-metadata')!.getAttribute('data')! ); - /** - * `apmConfig` would be populated with relavant APM RUM agent - * configuration if server is started with `ELASTIC_APM_ACTIVE=true` - */ - const apmConfig = injectedMetadata.vars.apmConfig; - const APM_ENABLED = process.env.IS_KIBANA_DISTRIBUTABLE !== 'true' && apmConfig != null; - - if (APM_ENABLED) { - // eslint-disable-next-line @typescript-eslint/no-var-requires - const { init, apm } = require('@elastic/apm-rum'); - if (apmConfig.globalLabels) { - apm.addLabels(apmConfig.globalLabels); - } - init(apmConfig); + let i18nError: Error | undefined; + const apmSystem = new ApmSystem(injectedMetadata.vars.apmConfig); + + await Promise.all([ + // eslint-disable-next-line no-console + apmSystem.setup().catch(console.warn), + i18n.load(injectedMetadata.i18n.translationsUrl).catch((error) => { + i18nError = error; + }), + ]); + + const coreSystem = new CoreSystem({ + injectedMetadata, + rootDomElement: document.body, + browserSupportsCsp: !(window as any).__kbnCspNotEnforced__, + }); + + const setup = await coreSystem.setup(); + if (i18nError && setup) { + setup.fatalErrors.add(i18nError); } - i18n - .load(injectedMetadata.i18n.translationsUrl) - .catch((e) => e) - .then(async (i18nError) => { - const coreSystem = new CoreSystem({ - injectedMetadata, - rootDomElement: document.body, - browserSupportsCsp: !(window as any).__kbnCspNotEnforced__, - }); - - const setup = await coreSystem.setup(); - if (i18nError && setup) { - setup.fatalErrors.add(i18nError); - } - - const start = await coreSystem.start(); - - if (APM_ENABLED && start) { - /** - * Register listeners for navigation changes and capture them as - * route-change transactions after Kibana app is bootstrapped - */ - start.application.currentAppId$.subscribe((appId) => { - const apmInstance = (window as any).elasticApm; - if (appId && apmInstance && typeof apmInstance.startTransaction === 'function') { - apmInstance.startTransaction(`/app/${appId}`, 'route-change', { - managed: true, - canReuse: true, - }); - } - }); - } - }); + const start = await coreSystem.start(); + await apmSystem.start(start); } diff --git a/src/core/public/public.api.md b/src/core/public/public.api.md index 7179c6cf8b133..5970c9a8571c4 100644 --- a/src/core/public/public.api.md +++ b/src/core/public/public.api.md @@ -42,7 +42,7 @@ import { UnregisterCallback } from 'history'; import { UserProvidedValues as UserProvidedValues_2 } from 'src/core/server/types'; // @internal (undocumented) -export function __kbnBootstrap__(): void; +export function __kbnBootstrap__(): Promise; // @public (undocumented) export interface App { diff --git a/src/dev/run_check_published_api_changes.ts b/src/dev/run_check_published_api_changes.ts index 5a6b6e092da2c..aaac706f991c2 100644 --- a/src/dev/run_check_published_api_changes.ts +++ b/src/dev/run_check_published_api_changes.ts @@ -232,6 +232,7 @@ async function run(folder: string, { opts }: { opts: Options }): Promise + + + + + + + , + "settingsCount": -1, + } + } + /> + + + + + + + + + + , + "settingsCount": -1, + } + } + /> + + + + + + + + + + , + "settingsCount": -1, + } + } + /> + + + + + + + + + + , + "settingsCount": -1, + } + } + /> + + + { }) ); }); + + it('should save an array typed field when user provides an empty string correctly', async () => { + const wrapper = mountWithI18nProvider( +
+ ); + + (wrapper.instance() as Form).setState({ + unsavedChanges: { + 'general:test:array': { + value: '', + }, + }, + }); + + findTestSubject(wrapper.update(), `advancedSetting-saveButton`).simulate('click'); + expect(save).toHaveBeenCalledWith({ 'general:test:array': [] }); + }); + + it('should save an array typed field when user provides a comma separated string correctly', async () => { + const wrapper = mountWithI18nProvider( + + ); + + (wrapper.instance() as Form).setState({ + unsavedChanges: { + 'general:test:array': { + value: 'test1, test2', + }, + }, + }); + + findTestSubject(wrapper.update(), `advancedSetting-saveButton`).simulate('click'); + expect(save).toHaveBeenCalledWith({ 'general:test:array': ['test1', 'test2'] }); + }); }); diff --git a/src/plugins/advanced_settings/public/management_app/components/form/form.tsx b/src/plugins/advanced_settings/public/management_app/components/form/form.tsx index 0378d816fd2c3..497252b75fa58 100644 --- a/src/plugins/advanced_settings/public/management_app/components/form/form.tsx +++ b/src/plugins/advanced_settings/public/management_app/components/form/form.tsx @@ -154,7 +154,9 @@ export class Form extends PureComponent { let equalsToDefault = false; switch (type) { case 'array': - valueToSave = valueToSave.split(',').map((val: string) => val.trim()); + valueToSave = valueToSave.trim(); + valueToSave = + valueToSave === '' ? [] : valueToSave.split(',').map((val: string) => val.trim()); equalsToDefault = valueToSave.join(',') === (defVal as string[]).join(','); break; case 'json': diff --git a/src/plugins/charts/public/services/colors/color_palette.ts b/src/plugins/charts/public/services/colors/color_palette.ts index 464e9e3a66101..e1c32fe68da12 100644 --- a/src/plugins/charts/public/services/colors/color_palette.ts +++ b/src/plugins/charts/public/services/colors/color_palette.ts @@ -17,8 +17,8 @@ * under the License. */ -import d3 from 'd3'; import _ from 'lodash'; +import { hsl } from 'color'; import { seedColors } from './seed_colors'; @@ -49,7 +49,7 @@ const fraction = function (goal: number) { * If the number is greater than the length of seed colors available, * new colors are generated up to the value of the input number. */ -export function createColorPalette(num?: any): string[] { +export function createColorPalette(num: number): string[] { if (!_.isNumber(num)) { throw new TypeError('ColorPaletteUtilService expects a number'); } @@ -58,7 +58,7 @@ export function createColorPalette(num?: any): string[] { const seedLength = seedColors.length; _.times(num - seedLength, function (i) { - colors.push(d3.hsl((fraction(i + seedLength + 1) * 360 + offset) % 360, 0.5, 0.5).toString()); + colors.push(hsl((fraction(i + seedLength + 1) * 360 + offset) % 360, 0.5, 0.5).hex()); }); return colors; diff --git a/src/plugins/charts/public/services/colors/colors_palette.test.ts b/src/plugins/charts/public/services/colors/colors_palette.test.ts index 6612447cefe9e..02ff5a6056d54 100644 --- a/src/plugins/charts/public/services/colors/colors_palette.test.ts +++ b/src/plugins/charts/public/services/colors/colors_palette.test.ts @@ -37,26 +37,32 @@ describe('Color Palette', () => { it('should throw an error if input is not a number', () => { expect(() => { + // @ts-expect-error createColorPalette(string); }).toThrowError(); expect(() => { + // @ts-expect-error createColorPalette(bool); }).toThrowError(); expect(() => { + // @ts-expect-error createColorPalette(nullValue); }).toThrowError(); expect(() => { + // @ts-expect-error createColorPalette(emptyArr); }).toThrowError(); expect(() => { + // @ts-expect-error createColorPalette(emptyObject); }).toThrowError(); expect(() => { + // @ts-expect-error createColorPalette(); }).toThrowError(); }); diff --git a/src/plugins/charts/public/services/colors/mapped_colors.test.ts b/src/plugins/charts/public/services/colors/mapped_colors.test.ts index e97ca8ac257b4..9d00bf098de4c 100644 --- a/src/plugins/charts/public/services/colors/mapped_colors.test.ts +++ b/src/plugins/charts/public/services/colors/mapped_colors.test.ts @@ -18,7 +18,7 @@ */ import _ from 'lodash'; -import d3 from 'd3'; +import Color from 'color'; import { coreMock } from '../../../../../core/public/mocks'; import { COLOR_MAPPING_SETTING } from '../../../common'; @@ -61,7 +61,7 @@ describe('Mapped Colors', () => { mappedColors.mapKeys(arr); const colorValues = _(mappedColors.mapping).values(); - expect(colorValues.includes(seedColors[0])).toBe(false); + expect(colorValues).not.toContain(seedColors[0]); expect(colorValues.uniq().size()).toBe(arr.length); }); @@ -78,8 +78,8 @@ describe('Mapped Colors', () => { }); it('should treat different formats of colors as equal', () => { - const color = d3.rgb(seedColors[0]); - const rgb = `rgb(${color.r}, ${color.g}, ${color.b})`; + const color = new Color(seedColors[0]); + const rgb = `rgb(${color.red()}, ${color.green()}, ${color.blue()})`; const newConfig = { bar: rgb }; config.set(COLOR_MAPPING_SETTING, newConfig); diff --git a/src/plugins/charts/public/services/colors/mapped_colors.ts b/src/plugins/charts/public/services/colors/mapped_colors.ts index 3b9e1501d638d..15f9be32b829c 100644 --- a/src/plugins/charts/public/services/colors/mapped_colors.ts +++ b/src/plugins/charts/public/services/colors/mapped_colors.ts @@ -18,14 +18,14 @@ */ import _ from 'lodash'; -import d3 from 'd3'; +import Color from 'color'; import { CoreSetup } from 'kibana/public'; import { COLOR_MAPPING_SETTING } from '../../../common'; import { createColorPalette } from './color_palette'; -const standardizeColor = (color: string) => d3.rgb(color).toString(); +const standardizeColor = (color: string) => new Color(color).hex().toLowerCase(); /** * Maintains a lookup table that associates the value (key) with a hex color (value) diff --git a/src/plugins/ui_actions/README.asciidoc b/src/plugins/ui_actions/README.asciidoc new file mode 100644 index 0000000000000..577aa2eae354b --- /dev/null +++ b/src/plugins/ui_actions/README.asciidoc @@ -0,0 +1,26 @@ +[[uiactions-plugin]] +== UI Actions + +An API for: + +- creating custom functionality (`actions`) +- creating custom user interaction events (`triggers`) +- attaching and detaching `actions` to `triggers`. +- emitting `trigger` events +- executing `actions` attached to a given `trigger`. +- exposing a context menu for the user to choose the appropriate action when there are multiple actions attached to a single trigger. + +=== Examples + +https://github.com/elastic/kibana/blob/master/examples/ui_action_examples/README.md[ui_action examples] + +=== API Docs + +==== Server API +https://github.com/elastic/kibana/blob/master/docs/development/plugins/ui_actions/server/kibana-plugin-plugins-ui_actions-server.uiactionssetup.md[Browser Setup contract] +https://github.com/elastic/kibana/blob/master/docs/development/plugins/ui_actions/server/kibana-plugin-plugins-ui_actions-server.uiactionsstart.md[Browser Start contract] + +==== Browser API +https://github.com/elastic/kibana/blob/master/docs/development/plugins/ui_actions/public/kibana-plugin-plugins-ui_actions-public.uiactionssetup.md[Browser Setup contract] +https://github.com/elastic/kibana/blob/master/docs/development/plugins/ui_actions/public/kibana-plugin-plugins-ui_actions-public.uiactionsstart.md[Browser Start contract] + diff --git a/src/plugins/ui_actions/README.md b/src/plugins/ui_actions/README.md deleted file mode 100644 index c4e02b551c884..0000000000000 --- a/src/plugins/ui_actions/README.md +++ /dev/null @@ -1,10 +0,0 @@ -# UI Actions - -An API for: - -- creating custom functionality (`actions`) -- creating custom user interaction events (`triggers`) -- attaching and detaching `actions` to `triggers`. -- emitting `trigger` events -- executing `actions` attached to a given `trigger`. -- exposing a context menu for the user to choose the appropriate action when there are multiple actions attached to a single trigger. diff --git a/src/plugins/ui_actions/public/public.api.md b/src/plugins/ui_actions/public/public.api.md new file mode 100644 index 0000000000000..8b3d81a589365 --- /dev/null +++ b/src/plugins/ui_actions/public/public.api.md @@ -0,0 +1,337 @@ +## API Report File for "kibana" + +> Do not edit this file. It is a report generated by [API Extractor](https://api-extractor.com/). + +```ts + +import { CoreSetup } from 'src/core/public'; +import { CoreStart } from 'src/core/public'; +import { EnvironmentMode } from '@kbn/config'; +import { EuiContextMenuPanelDescriptor } from '@elastic/eui'; +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 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 +// Warning: (ae-missing-release-tag) "Action" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) +// +// @public (undocumented) +export interface Action extends Partial>> { + execute(context: ActionExecutionContext): Promise; + getDisplayName(context: ActionExecutionContext): string; + getHref?(context: ActionExecutionContext): Promise; + getIconType(context: ActionExecutionContext): string | undefined; + id: string; + isCompatible(context: ActionExecutionContext): Promise; + MenuItem?: UiComponent<{ + context: ActionExecutionContext; + }>; + order?: number; + shouldAutoExecute?(context: ActionExecutionContext): Promise; + readonly type: T; +} + +// Warning: (ae-missing-release-tag) "ACTION_VISUALIZE_FIELD" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) +// +// @public (undocumented) +export const ACTION_VISUALIZE_FIELD = "ACTION_VISUALIZE_FIELD"; + +// Warning: (ae-missing-release-tag) "ACTION_VISUALIZE_GEO_FIELD" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) +// +// @public (undocumented) +export const ACTION_VISUALIZE_GEO_FIELD = "ACTION_VISUALIZE_GEO_FIELD"; + +// Warning: (ae-missing-release-tag) "ActionByType" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) +// +// @public (undocumented) +export type ActionByType = Action; + +// Warning: (ae-missing-release-tag) "ActionContextMapping" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) +// +// @public (undocumented) +export interface ActionContextMapping { + // Warning: (ae-forgotten-export) The symbol "DEFAULT_ACTION" needs to be exported by the entry point index.d.ts + // + // (undocumented) + [DEFAULT_ACTION]: BaseContext; + // (undocumented) + [ACTION_VISUALIZE_FIELD]: VisualizeFieldContext; + // (undocumented) + [ACTION_VISUALIZE_GEO_FIELD]: VisualizeFieldContext; +} + +// Warning: (ae-missing-release-tag) "ActionDefinitionByType" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) +// +// @public (undocumented) +export type ActionDefinitionByType = UiActionsActionDefinition; + +// Warning: (ae-missing-release-tag) "ActionExecutionContext" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) +// +// @public +export type ActionExecutionContext = Context & ActionExecutionMeta; + +// Warning: (ae-missing-release-tag) "ActionExecutionMeta" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) +// +// @public +export interface ActionExecutionMeta { + trigger: Trigger; +} + +// Warning: (ae-missing-release-tag) "ActionType" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) +// +// @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) +// +// @public +export function buildContextMenuForActions({ actions, title, closeMenu, }: BuildContextMenuParams): Promise; + +// Warning: (ae-forgotten-export) The symbol "ActionDefinitionByType" needs to be exported by the entry point index.d.ts +// Warning: (ae-missing-release-tag) "createAction" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) +// +// @public (undocumented) +export function createAction(action: ActionDefinitionByType_2): ActionByType; + +// Warning: (ae-missing-release-tag) "IncompatibleActionError" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) +// +// @public (undocumented) +export class IncompatibleActionError extends Error { + constructor(); + // (undocumented) + code: string; +} + +// Warning: (ae-forgotten-export) The symbol "PluginInitializerContext" needs to be exported by the entry point index.d.ts +// Warning: (ae-forgotten-export) The symbol "UiActionsPlugin" needs to be exported by the entry point index.d.ts +// Warning: (ae-missing-release-tag) "plugin" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) +// +// @public (undocumented) +export function plugin(initializerContext: PluginInitializerContext): UiActionsPlugin; + +// 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 +export interface Trigger { + description?: string; + id: ID; + title?: string; +} + +// Warning: (ae-missing-release-tag) "TriggerContext" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) +// +// @public (undocumented) +export type TriggerContext = T extends TriggerId ? TriggerContextMapping[T] : never; + +// Warning: (ae-missing-release-tag) "TriggerContextMapping" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) +// +// @public (undocumented) +export interface TriggerContextMapping { + // Warning: (ae-forgotten-export) The symbol "DEFAULT_TRIGGER" needs to be exported by the entry point index.d.ts + // Warning: (ae-forgotten-export) The symbol "TriggerContext" needs to be exported by the entry point index.d.ts + // + // (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; + // 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) + [VISUALIZE_GEO_FIELD_TRIGGER]: VisualizeFieldContext; +} + +// Warning: (ae-missing-release-tag) "TriggerId" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) +// +// @public (undocumented) +export type TriggerId = keyof TriggerContextMapping; + +// Warning: (ae-forgotten-export) The symbol "ActionDefinitionContext" needs to be exported by the entry point index.d.ts +// Warning: (ae-missing-release-tag) "ActionDefinition" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) +// +// @public +export interface UiActionsActionDefinition extends Partial>> { + execute(context: ActionDefinitionContext): Promise; + getHref?(context: ActionDefinitionContext): Promise; + readonly id: string; + isCompatible?(context: ActionDefinitionContext): Promise; + shouldAutoExecute?(context: ActionDefinitionContext): Promise; + readonly type?: ActionType; +} + +// Warning: (ae-missing-release-tag) "Presentable" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) +// +// @public +export interface UiActionsPresentable { + getDisplayName(context: Context): string; + getDisplayNameTooltip(context: Context): string; + getHref?(context: Context): Promise; + getIconType(context: Context): string | undefined; + readonly grouping?: UiActionsPresentableGrouping; + readonly id: string; + isCompatible(context: Context): Promise; + readonly MenuItem?: UiComponent<{ + context: Context; + }>; + readonly order: number; +} + +// Warning: (ae-forgotten-export) The symbol "PresentableGroup" needs to be exported by the entry point index.d.ts +// Warning: (ae-missing-release-tag) "PresentableGrouping" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) +// +// @public (undocumented) +export type UiActionsPresentableGrouping = Array>; + +// Warning: (ae-missing-release-tag) "UiActionsService" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) +// +// @public (undocumented) +export class UiActionsService { + constructor({ triggers, actions, triggerToActions, }?: UiActionsServiceParams); + // Warning: (ae-forgotten-export) The symbol "ActionRegistry" needs to be exported by the entry point index.d.ts + // + // (undocumented) + protected readonly actions: ActionRegistry; + readonly addTriggerAction: (triggerId: T, action: UiActionsActionDefinition | Action) => void; + // (undocumented) + readonly attachAction: (triggerId: T, actionId: string) => void; + readonly clear: () => void; + // (undocumented) + readonly detachAction: (triggerId: TriggerId, actionId: string) => void; + // @deprecated (undocumented) + readonly executeTriggerActions: (triggerId: T, context: TriggerContext) => Promise; + // 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: >(id: string) => Action, "" | "ACTION_VISUALIZE_FIELD" | "ACTION_VISUALIZE_GEO_FIELD" | "ACTION_CUSTOMIZE_PANEL" | "ACTION_ADD_PANEL" | "openInspector" | "deletePanel" | "editPanel" | "togglePanel" | "replacePanel" | "clonePanel" | "addToFromLibrary" | "unlinkFromLibrary" | "ACTION_LIBRARY_NOTIFICATION" | "ACTION_GLOBAL_APPLY_FILTER" | "ACTION_SELECT_RANGE" | "ACTION_VALUE_CLICK">; + // Warning: (ae-forgotten-export) The symbol "TriggerContract" needs to be exported by the entry point index.d.ts + // + // (undocumented) + readonly getTrigger: (triggerId: T) => TriggerContract; + // (undocumented) + readonly getTriggerActions: (triggerId: T) => Action[]; + // (undocumented) + readonly getTriggerCompatibleActions: (triggerId: T, context: TriggerContextMapping[T]) => Promise[]>; + // (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: >(definition: A) => Action, "" | "ACTION_VISUALIZE_FIELD" | "ACTION_VISUALIZE_GEO_FIELD" | "ACTION_CUSTOMIZE_PANEL" | "ACTION_ADD_PANEL" | "openInspector" | "deletePanel" | "editPanel" | "togglePanel" | "replacePanel" | "clonePanel" | "addToFromLibrary" | "unlinkFromLibrary" | "ACTION_LIBRARY_NOTIFICATION" | "ACTION_GLOBAL_APPLY_FILTER" | "ACTION_SELECT_RANGE" | "ACTION_VALUE_CLICK">; + // (undocumented) + readonly registerTrigger: (trigger: Trigger) => void; + // Warning: (ae-forgotten-export) The symbol "TriggerRegistry" needs to be exported by the entry point index.d.ts + // + // (undocumented) + protected readonly triggers: TriggerRegistry; + // Warning: (ae-forgotten-export) The symbol "TriggerToActionsRegistry" needs to be exported by the entry point index.d.ts + // + // (undocumented) + protected readonly triggerToActions: TriggerToActionsRegistry; + // (undocumented) + readonly unregisterAction: (actionId: string) => void; +} + +// Warning: (ae-missing-release-tag) "UiActionsServiceParams" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) +// +// @public (undocumented) +export interface UiActionsServiceParams { + // (undocumented) + readonly actions?: ActionRegistry; + // (undocumented) + readonly triggers?: TriggerRegistry; + readonly triggerToActions?: TriggerToActionsRegistry; +} + +// Warning: (ae-missing-release-tag) "UiActionsSetup" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) +// +// @public (undocumented) +export type UiActionsSetup = Pick; + +// Warning: (ae-missing-release-tag) "UiActionsStart" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) +// +// @public (undocumented) +export type UiActionsStart = PublicMethodsOf; + +// 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) +export const VISUALIZE_FIELD_TRIGGER = "VISUALIZE_FIELD_TRIGGER"; + +// Warning: (ae-missing-release-tag) "VISUALIZE_GEO_FIELD_TRIGGER" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) +// +// @public (undocumented) +export const VISUALIZE_GEO_FIELD_TRIGGER = "VISUALIZE_GEO_FIELD_TRIGGER"; + +// Warning: (ae-missing-release-tag) "VisualizeFieldContext" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) +// +// @public (undocumented) +export interface VisualizeFieldContext { + // (undocumented) + contextualFields?: string[]; + // (undocumented) + fieldName: string; + // (undocumented) + indexPatternId: string; +} + +// Warning: (ae-missing-release-tag) "visualizeFieldTrigger" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) +// +// @public (undocumented) +export const visualizeFieldTrigger: Trigger<'VISUALIZE_FIELD_TRIGGER'>; + +// Warning: (ae-missing-release-tag) "visualizeGeoFieldTrigger" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) +// +// @public (undocumented) +export const visualizeGeoFieldTrigger: Trigger<'VISUALIZE_GEO_FIELD_TRIGGER'>; + + +// (No @packageDocumentation comment for this package) + +``` diff --git a/tsconfig.types.json b/tsconfig.types.json index 4b7dfa2d014a3..86a45f6db1697 100644 --- a/tsconfig.types.json +++ b/tsconfig.types.json @@ -13,6 +13,11 @@ "src/core/public/index.ts", "src/plugins/data/server/index.ts", "src/plugins/data/public/index.ts", + "src/plugins/embeddable/server/index.ts", + "src/plugins/embeddable/public/index.ts", + "src/plugins/expressions/server/index.ts", + "src/plugins/expressions/public/index.ts", + "src/plugins/ui_actions/public/index.ts", "typings" ] } diff --git a/x-pack/plugins/enterprise_search/public/plugin.ts b/x-pack/plugins/enterprise_search/public/plugin.ts index c63232b0c8a7f..e054a49ef1f74 100644 --- a/x-pack/plugins/enterprise_search/public/plugin.ts +++ b/x-pack/plugins/enterprise_search/public/plugin.ts @@ -100,7 +100,7 @@ export class EnterpriseSearchPlugin implements Plugin { mount: async (params: AppMountParameters) => { const kibanaDeps = await this.getKibanaDeps(core, params); const { chrome, http } = kibanaDeps.core; - chrome.docTitle.change(APP_SEARCH_PLUGIN.NAME); + chrome.docTitle.change(WORKPLACE_SEARCH_PLUGIN.NAME); await this.getInitialData(http); const pluginData = this.getPluginData(); diff --git a/x-pack/plugins/lens/public/indexpattern_datasource/dimension_panel/dimension_editor.tsx b/x-pack/plugins/lens/public/indexpattern_datasource/dimension_panel/dimension_editor.tsx index 2572f732aa1b3..bd99bd16a63a8 100644 --- a/x-pack/plugins/lens/public/indexpattern_datasource/dimension_panel/dimension_editor.tsx +++ b/x-pack/plugins/lens/public/indexpattern_datasource/dimension_panel/dimension_editor.tsx @@ -40,19 +40,6 @@ export interface DimensionEditorProps extends IndexPatternDimensionEditorProps { currentIndexPattern: IndexPattern; } -function asOperationOptions(operationTypes: OperationType[], compatibleWithCurrentField: boolean) { - return [...operationTypes] - .sort((opType1, opType2) => { - return operationPanels[opType1].displayName.localeCompare( - operationPanels[opType2].displayName - ); - }) - .map((operationType) => ({ - operationType, - compatibleWithCurrentField, - })); -} - const LabelInput = ({ value, onChange }: { value: string; onChange: (value: string) => void }) => { const [inputValue, setInputValue] = useState(value); @@ -98,7 +85,7 @@ export function DimensionEditor(props: DimensionEditorProps) { currentIndexPattern, hideGrouping, } = props; - const { operationByField, fieldByOperation } = operationSupportMatrix; + const { fieldByOperation, operationWithoutField } = operationSupportMatrix; const [ incompatibleSelectedOperationType, setInvalidOperationType, @@ -117,30 +104,35 @@ export function DimensionEditor(props: DimensionEditorProps) { return fields; }, [currentIndexPattern]); - function getOperationTypes() { - const possibleOperationTypes = Object.keys(fieldByOperation) as OperationType[]; - const validOperationTypes: OperationType[] = []; - - if (!selectedColumn) { - validOperationTypes.push(...(Object.keys(fieldByOperation) as OperationType[])); - } else if (hasField(selectedColumn) && operationByField[selectedColumn.sourceField]) { - validOperationTypes.push(...operationByField[selectedColumn.sourceField]!); - } + const possibleOperations = useMemo(() => { + return Object.values(operationDefinitionMap) + .sort((op1, op2) => { + return op1.displayName.localeCompare(op2.displayName); + }) + .map((def) => def.type) + .filter( + (type) => fieldByOperation[type]?.length || operationWithoutField.indexOf(type) !== -1 + ); + }, [fieldByOperation, operationWithoutField]); - return _.uniqBy( - [ - ...asOperationOptions(validOperationTypes, true), - ...asOperationOptions(possibleOperationTypes, false), - ...asOperationOptions( - operationSupportMatrix.operationWithoutField, - !selectedColumn || !hasField(selectedColumn) - ), - ], - 'operationType' - ); - } + // Operations are compatible if they match inputs. They are always compatible in + // the empty state. Field-based operations are not compatible with field-less operations. + const operationsWithCompatibility = [...possibleOperations].map((operationType) => { + const definition = operationDefinitionMap[operationType]; - const sideNavItems: EuiListGroupItemProps[] = getOperationTypes().map( + return { + operationType, + compatibleWithCurrentField: + !selectedColumn || + (selectedColumn && + hasField(selectedColumn) && + definition.input === 'field' && + fieldByOperation[operationType]?.indexOf(selectedColumn.sourceField) !== -1) || + (selectedColumn && !hasField(selectedColumn) && definition.input !== 'field'), + }; + }); + + const sideNavItems: EuiListGroupItemProps[] = operationsWithCompatibility.map( ({ operationType, compatibleWithCurrentField }) => { const isActive = Boolean( incompatibleSelectedOperationType === operationType || diff --git a/x-pack/plugins/lens/public/indexpattern_datasource/dimension_panel/dimension_panel.test.tsx b/x-pack/plugins/lens/public/indexpattern_datasource/dimension_panel/dimension_panel.test.tsx index 2d7539a9e3ee8..270f9d9f67063 100644 --- a/x-pack/plugins/lens/public/indexpattern_datasource/dimension_panel/dimension_panel.test.tsx +++ b/x-pack/plugins/lens/public/indexpattern_datasource/dimension_panel/dimension_panel.test.tsx @@ -960,12 +960,12 @@ describe('IndexPatternDimensionEditorPanel', () => { const items: EuiListGroupItemProps[] = wrapper.find(EuiListGroup).prop('listItems') || []; expect(items.map(({ label }: { label: React.ReactNode }) => label)).toEqual([ - 'Unique count', 'Average', 'Count', 'Maximum', 'Minimum', 'Sum', + 'Unique count', ]); }); diff --git a/x-pack/test/apm_api_integration/basic/tests/transaction_groups/distribution.ts b/x-pack/test/apm_api_integration/basic/tests/transaction_groups/distribution.ts index 6ea050d2eea3c..bd669600afc14 100644 --- a/x-pack/test/apm_api_integration/basic/tests/transaction_groups/distribution.ts +++ b/x-pack/test/apm_api_integration/basic/tests/transaction_groups/distribution.ts @@ -37,7 +37,8 @@ export default function ApiTest({ getService }: FtrProviderContext) { }); }); - describe('when data is loaded', () => { + // SKIP FAILING TEST to unblock CI: https://github.com/elastic/kibana/issues/78942 + describe.skip('when data is loaded', () => { let response: any; before(async () => { await esArchiver.load(archiveName); diff --git a/x-pack/test/functional/apps/ml/permissions/full_ml_access.ts b/x-pack/test/functional/apps/ml/permissions/full_ml_access.ts index c3dde872fa4a6..7e9b73686a23b 100644 --- a/x-pack/test/functional/apps/ml/permissions/full_ml_access.ts +++ b/x-pack/test/functional/apps/ml/permissions/full_ml_access.ts @@ -16,7 +16,8 @@ export default function ({ getService }: FtrProviderContext) { const testUsers = [USER.ML_POWERUSER, USER.ML_POWERUSER_SPACES]; - describe('for user with full ML access', function () { + // flaky UI behavior makes this test fail, see https://github.com/elastic/kibana/issues/78965 + describe.skip('for user with full ML access', function () { this.tags(['skipFirefox', 'mlqa']); describe('with no data loaded', function () {