Skip to content

Commit b01a327

Browse files
authored
Row trigger 2 (#83167)
* feat: ๐ŸŽธ add ROW_CLICK_TRIGGER * feat: ๐ŸŽธ wire row click event to UI Actions trigger in Lens * feat: ๐ŸŽธ add row click trigger to url drilldown * feat: ๐ŸŽธ add datatable to row click context * feat: ๐ŸŽธ pass in row index in row click trigger context * feat: ๐ŸŽธ add columns to row click trigger context * feat: ๐ŸŽธ fill values and keys event scope array * feat: ๐ŸŽธ generate correct row scope variables * fix: ๐Ÿ› report triggers from lens embeddable * feat: ๐ŸŽธ add sample preview for row click trigger * feat: ๐ŸŽธ remove url drilldown preview box * chore: ๐Ÿค– remove mock variable generation functions * feat: ๐ŸŽธ generate context and global variable lists * feat: ๐ŸŽธ preview event variable list * feat: ๐ŸŽธ show empty url error on blur * feat: ๐ŸŽธ add ability to always show popup for executed actions * refactor: ๐Ÿ’ก rename multiple action execution method * fix: ๐Ÿ› don't add separator befor group on no main items * feat: ๐ŸŽธ wire in uiActions service into datatable renderer * feat: ๐ŸŽธ check each row if it has compatible row click actions * feat: ๐ŸŽธ allow passing data to expression renderer * feat: ๐ŸŽธ add isEmbeddable helper * feat: ๐ŸŽธ pass embeddable to lens table renderer * feat: ๐ŸŽธ hide lens table row actions which are empty * feat: ๐ŸŽธ re-render lens embeddable when dynamic actions chagne * feat: ๐ŸŽธ hide actions column if there are no row actions * feat: ๐ŸŽธ re-render lens embeddable on view mode chagne * fix: ๐Ÿ› fix TypeScript errors * chore: ๐Ÿค– fix TypeScript errors * docs: โœ๏ธ update auto-generated docs * feat: ๐ŸŽธ add hasCompatibleActions to expression layer * feat: ๐ŸŽธ remove "data" from expression renderer handlers * fix: ๐Ÿ› fix TypeScript errors * test: ๐Ÿ’ fix Jest tests * docs: โœ๏ธ update autogenerated docs * fix: ๐Ÿ› wrap event payload into data * test: ๐Ÿ’ add "alwaysShowPopup" test * chore: ๐Ÿค– add comment requested in review #83167 (comment) * test: ๐Ÿ’ add hasCompatibleActions test * test: ๐Ÿ’ add datatable renderer test * test: ๐Ÿ’ add Lens embeddable input change tests * test: ๐Ÿ’ add embeddable row click test * fix: ๐Ÿ› add url validation * test: ๐Ÿ’ add url drilldown tests * docs: โœ๏ธ remove url drilldown preview from docs * docs: โœ๏ธ remove preview from url templating * docs: โœ๏ธ add row click description * chore: ๐Ÿค– move 36.5 KB bundle balance to url_drilldown * test: ๐Ÿ’ simplify test case * style: ๐Ÿ’„ change types places * refactor: ๐Ÿ’ก clean up panel variable generation * test: ๐Ÿ’ add getPanelVariables() tests * fix: ๐Ÿ› generate runtime variables correctly * fix: ๐Ÿ› improve getVariableList() and add tests for it * feat: ๐ŸŽธ add translation, improve types
1 parent 5a8a5bf commit b01a327

File tree

76 files changed

+1684
-584
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

76 files changed

+1684
-584
lines changed

โ€Ždocs/development/plugins/embeddable/public/kibana-plugin-plugins-embeddable-public.chartactioncontext.mdโ€Ž

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,5 +7,5 @@
77
<b>Signature:</b>
88

99
```typescript
10-
export declare type ChartActionContext<T extends IEmbeddable = IEmbeddable> = ValueClickContext<T> | RangeSelectContext<T>;
10+
export declare type ChartActionContext<T extends IEmbeddable = IEmbeddable> = ValueClickContext<T> | RangeSelectContext<T> | RowClickContext;
1111
```
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
2+
3+
[Home](./index.md) &gt; [kibana-plugin-plugins-embeddable-public](./kibana-plugin-plugins-embeddable-public.md) &gt; [isEmbeddable](./kibana-plugin-plugins-embeddable-public.isembeddable.md)
4+
5+
## isEmbeddable variable
6+
7+
<b>Signature:</b>
8+
9+
```typescript
10+
isEmbeddable: (x: unknown) => x is IEmbeddable<import("./i_embeddable").EmbeddableInput, import("./i_embeddable").EmbeddableOutput>
11+
```
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
2+
3+
[Home](./index.md) &gt; [kibana-plugin-plugins-embeddable-public](./kibana-plugin-plugins-embeddable-public.md) &gt; [isRowClickTriggerContext](./kibana-plugin-plugins-embeddable-public.isrowclicktriggercontext.md)
4+
5+
## isRowClickTriggerContext variable
6+
7+
<b>Signature:</b>
8+
9+
```typescript
10+
isRowClickTriggerContext: (context: ChartActionContext) => context is RowClickContext
11+
```

โ€Ždocs/development/plugins/embeddable/public/kibana-plugin-plugins-embeddable-public.mdโ€Ž

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,9 @@
7878
| [defaultEmbeddableFactoryProvider](./kibana-plugin-plugins-embeddable-public.defaultembeddablefactoryprovider.md) | |
7979
| [EmbeddableRenderer](./kibana-plugin-plugins-embeddable-public.embeddablerenderer.md) | Helper react component to render an embeddable Can be used if you have an embeddable object or an embeddable factory Supports updating input by passing <code>input</code> prop |
8080
| [isContextMenuTriggerContext](./kibana-plugin-plugins-embeddable-public.iscontextmenutriggercontext.md) | |
81+
| [isEmbeddable](./kibana-plugin-plugins-embeddable-public.isembeddable.md) | |
8182
| [isRangeSelectTriggerContext](./kibana-plugin-plugins-embeddable-public.israngeselecttriggercontext.md) | |
83+
| [isRowClickTriggerContext](./kibana-plugin-plugins-embeddable-public.isrowclicktriggercontext.md) | |
8284
| [isValueClickTriggerContext](./kibana-plugin-plugins-embeddable-public.isvalueclicktriggercontext.md) | |
8385
| [PANEL\_BADGE\_TRIGGER](./kibana-plugin-plugins-embeddable-public.panel_badge_trigger.md) | |
8486
| [PANEL\_NOTIFICATION\_TRIGGER](./kibana-plugin-plugins-embeddable-public.panel_notification_trigger.md) | |

โ€Ždocs/development/plugins/expressions/public/kibana-plugin-plugins-expressions-public.expressionrenderhandler._constructor_.mdโ€Ž

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,13 +9,13 @@ Constructs a new instance of the `ExpressionRenderHandler` class
99
<b>Signature:</b>
1010

1111
```typescript
12-
constructor(element: HTMLElement, { onRenderError, renderMode }?: Partial<ExpressionRenderHandlerParams>);
12+
constructor(element: HTMLElement, { onRenderError, renderMode, hasCompatibleActions, }?: ExpressionRenderHandlerParams);
1313
```
1414

1515
## Parameters
1616

1717
| Parameter | Type | Description |
1818
| --- | --- | --- |
1919
| element | <code>HTMLElement</code> | |
20-
| { onRenderError, renderMode } | <code>Partial&lt;ExpressionRenderHandlerParams&gt;</code> | |
20+
| { onRenderError, renderMode, hasCompatibleActions, } | <code>ExpressionRenderHandlerParams</code> | |
2121

โ€Ždocs/development/plugins/expressions/public/kibana-plugin-plugins-expressions-public.expressionrenderhandler.mdโ€Ž

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ export declare class ExpressionRenderHandler
1414

1515
| Constructor | Modifiers | Description |
1616
| --- | --- | --- |
17-
| [(constructor)(element, { onRenderError, renderMode })](./kibana-plugin-plugins-expressions-public.expressionrenderhandler._constructor_.md) | | Constructs a new instance of the <code>ExpressionRenderHandler</code> class |
17+
| [(constructor)(element, { onRenderError, renderMode, hasCompatibleActions, })](./kibana-plugin-plugins-expressions-public.expressionrenderhandler._constructor_.md) | | Constructs a new instance of the <code>ExpressionRenderHandler</code> class |
1818

1919
## Properties
2020

@@ -24,7 +24,7 @@ export declare class ExpressionRenderHandler
2424
| [events$](./kibana-plugin-plugins-expressions-public.expressionrenderhandler.events_.md) | | <code>Observable&lt;ExpressionRendererEvent&gt;</code> | |
2525
| [getElement](./kibana-plugin-plugins-expressions-public.expressionrenderhandler.getelement.md) | | <code>() =&gt; HTMLElement</code> | |
2626
| [handleRenderError](./kibana-plugin-plugins-expressions-public.expressionrenderhandler.handlerendererror.md) | | <code>(error: ExpressionRenderError) =&gt; void</code> | |
27-
| [render](./kibana-plugin-plugins-expressions-public.expressionrenderhandler.render.md) | | <code>(data: any, uiState?: any) =&gt; Promise&lt;void&gt;</code> | |
27+
| [render](./kibana-plugin-plugins-expressions-public.expressionrenderhandler.render.md) | | <code>(value: any, uiState?: any) =&gt; Promise&lt;void&gt;</code> | |
2828
| [render$](./kibana-plugin-plugins-expressions-public.expressionrenderhandler.render_.md) | | <code>Observable&lt;number&gt;</code> | |
2929
| [update$](./kibana-plugin-plugins-expressions-public.expressionrenderhandler.update_.md) | | <code>Observable&lt;UpdateValue &#124; null&gt;</code> | |
3030

โ€Ždocs/development/plugins/expressions/public/kibana-plugin-plugins-expressions-public.expressionrenderhandler.render.mdโ€Ž

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,5 +7,5 @@
77
<b>Signature:</b>
88

99
```typescript
10-
render: (data: any, uiState?: any) => Promise<void>;
10+
render: (value: any, uiState?: any) => Promise<void>;
1111
```
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
2+
3+
[Home](./index.md) &gt; [kibana-plugin-plugins-expressions-public](./kibana-plugin-plugins-expressions-public.md) &gt; [IExpressionLoaderParams](./kibana-plugin-plugins-expressions-public.iexpressionloaderparams.md) &gt; [hasCompatibleActions](./kibana-plugin-plugins-expressions-public.iexpressionloaderparams.hascompatibleactions.md)
4+
5+
## IExpressionLoaderParams.hasCompatibleActions property
6+
7+
<b>Signature:</b>
8+
9+
```typescript
10+
hasCompatibleActions?: ExpressionRenderHandlerParams['hasCompatibleActions'];
11+
```

โ€Ždocs/development/plugins/expressions/public/kibana-plugin-plugins-expressions-public.iexpressionloaderparams.mdโ€Ž

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@ export interface IExpressionLoaderParams
1919
| [customRenderers](./kibana-plugin-plugins-expressions-public.iexpressionloaderparams.customrenderers.md) | <code>[]</code> | |
2020
| [debug](./kibana-plugin-plugins-expressions-public.iexpressionloaderparams.debug.md) | <code>boolean</code> | |
2121
| [disableCaching](./kibana-plugin-plugins-expressions-public.iexpressionloaderparams.disablecaching.md) | <code>boolean</code> | |
22+
| [hasCompatibleActions](./kibana-plugin-plugins-expressions-public.iexpressionloaderparams.hascompatibleactions.md) | <code>ExpressionRenderHandlerParams['hasCompatibleActions']</code> | |
2223
| [inspectorAdapters](./kibana-plugin-plugins-expressions-public.iexpressionloaderparams.inspectoradapters.md) | <code>Adapters</code> | |
2324
| [onRenderError](./kibana-plugin-plugins-expressions-public.iexpressionloaderparams.onrendererror.md) | <code>RenderErrorHandlerFnType</code> | |
2425
| [renderMode](./kibana-plugin-plugins-expressions-public.iexpressionloaderparams.rendermode.md) | <code>RenderMode</code> | |
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
2+
3+
[Home](./index.md) &gt; [kibana-plugin-plugins-expressions-public](./kibana-plugin-plugins-expressions-public.md) &gt; [IInterpreterRenderHandlers](./kibana-plugin-plugins-expressions-public.iinterpreterrenderhandlers.md) &gt; [hasCompatibleActions](./kibana-plugin-plugins-expressions-public.iinterpreterrenderhandlers.hascompatibleactions.md)
4+
5+
## IInterpreterRenderHandlers.hasCompatibleActions property
6+
7+
<b>Signature:</b>
8+
9+
```typescript
10+
hasCompatibleActions?: (event: any) => Promise<boolean>;
11+
```

0 commit comments

Comments
ย (0)