Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Typescript index pattern field editor #63495

Merged
merged 31 commits into from
Apr 27, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
31 commits
Select commit Hold shift + click to select a range
2caf8c4
partial progress
mattkime Apr 8, 2020
2fe760c
Merge branch 'master' into typescript_ui_field_editor
mattkime Apr 14, 2020
9c77acd
Merge branch 'master' into typescript_ui_field_editor
mattkime Apr 14, 2020
326925b
partial progress on tyypescripting
mattkime Apr 14, 2020
c17aad2
Merge branch 'master' into typescript_ui_field_editor
mattkime Apr 16, 2020
3b0b5b8
Merge branch 'master' into typescript_ui_field_editor
mattkime Apr 20, 2020
b0bf4c7
typescript fixes
mattkime Apr 20, 2020
980df33
Merge branch 'master' into typescript_ui_field_editor
mattkime Apr 21, 2020
2010228
fix field format editor
mattkime Apr 21, 2020
80e9d9d
Merge branch 'master' into typescript_ui_field_editor
mattkime Apr 21, 2020
32c277f
merge
mattkime Apr 21, 2020
5705adc
Merge branch 'master' into typescript_ui_field_editor
mattkime Apr 21, 2020
f604c33
revert use of enum for converter type
mattkime Apr 21, 2020
fd42834
less any
mattkime Apr 22, 2020
3983dff
less any
mattkime Apr 22, 2020
c1d9a34
Merge branch 'master' into typescript_ui_field_editor
mattkime Apr 22, 2020
4e5cfe6
typescript tests, partial progress
mattkime Apr 23, 2020
c0443c8
typescript fixes
mattkime Apr 23, 2020
d4de6b1
update snapshots, fix jest test
mattkime Apr 23, 2020
5567738
ts improvements, remove a couple of comments
mattkime Apr 24, 2020
ef45516
remove change to data public api, only needed type
mattkime Apr 24, 2020
9daf1aa
Merge branch 'master' into typescript_ui_field_editor
mattkime Apr 24, 2020
fbdb7a1
Merge branch 'master' into typescript_ui_field_editor
mattkime Apr 24, 2020
534bf31
rename prop argument
mattkime Apr 24, 2020
922c50f
no more ui/kfetch
mattkime Apr 24, 2020
d2ef538
update snapshots, fix field editor args
mattkime Apr 24, 2020
142169a
fix scripted fields
mattkime Apr 24, 2020
a790ac4
ui/dock_links to core.dockLinks
mattkime Apr 25, 2020
cfa3fd5
better define conflict descriptions
mattkime Apr 27, 2020
b8b3abb
one less typescript any and better snapshots
mattkime Apr 27, 2020
60c81ee
Merge branch 'master' into typescript_ui_field_editor
elasticmachine Apr 27, 2020
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
<!-- Do not edit this file. It is automatically generated by API Documenter. -->

[Home](./index.md) &gt; [kibana-plugin-plugins-data-public](./kibana-plugin-plugins-data-public.md) &gt; [Field](./kibana-plugin-plugins-data-public.field.md) &gt; [$$spec](./kibana-plugin-plugins-data-public.field.__spec.md)

## Field.$$spec property

<b>Signature:</b>

```typescript
$$spec: FieldSpec;
```
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
<!-- Do not edit this file. It is automatically generated by API Documenter. -->

[Home](./index.md) &gt; [kibana-plugin-plugins-data-public](./kibana-plugin-plugins-data-public.md) &gt; [IndexPatternField](./kibana-plugin-plugins-data-public.indexpatternfield.md) &gt; [(constructor)](./kibana-plugin-plugins-data-public.indexpatternfield._constructor_.md)
[Home](./index.md) &gt; [kibana-plugin-plugins-data-public](./kibana-plugin-plugins-data-public.md) &gt; [Field](./kibana-plugin-plugins-data-public.field.md) &gt; [(constructor)](./kibana-plugin-plugins-data-public.field._constructor_.md)

## IndexPatternField.(constructor)
## Field.(constructor)

Constructs a new instance of the `Field` class

Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
<!-- Do not edit this file. It is automatically generated by API Documenter. -->

[Home](./index.md) &gt; [kibana-plugin-plugins-data-public](./kibana-plugin-plugins-data-public.md) &gt; [Field](./kibana-plugin-plugins-data-public.field.md) &gt; [aggregatable](./kibana-plugin-plugins-data-public.field.aggregatable.md)

## Field.aggregatable property

<b>Signature:</b>

```typescript
aggregatable?: boolean;
```
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
<!-- Do not edit this file. It is automatically generated by API Documenter. -->

[Home](./index.md) &gt; [kibana-plugin-plugins-data-public](./kibana-plugin-plugins-data-public.md) &gt; [Field](./kibana-plugin-plugins-data-public.field.md) &gt; [conflictDescriptions](./kibana-plugin-plugins-data-public.field.conflictdescriptions.md)

## Field.conflictDescriptions property

<b>Signature:</b>

```typescript
conflictDescriptions?: Record<string, string[]>;
```
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
<!-- Do not edit this file. It is automatically generated by API Documenter. -->

[Home](./index.md) &gt; [kibana-plugin-plugins-data-public](./kibana-plugin-plugins-data-public.md) &gt; [Field](./kibana-plugin-plugins-data-public.field.md) &gt; [count](./kibana-plugin-plugins-data-public.field.count.md)

## Field.count property

<b>Signature:</b>

```typescript
count?: number;
```
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
<!-- Do not edit this file. It is automatically generated by API Documenter. -->

[Home](./index.md) &gt; [kibana-plugin-plugins-data-public](./kibana-plugin-plugins-data-public.md) &gt; [Field](./kibana-plugin-plugins-data-public.field.md) &gt; [displayName](./kibana-plugin-plugins-data-public.field.displayname.md)

## Field.displayName property

<b>Signature:</b>

```typescript
displayName?: string;
```
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
<!-- Do not edit this file. It is automatically generated by API Documenter. -->

[Home](./index.md) &gt; [kibana-plugin-plugins-data-public](./kibana-plugin-plugins-data-public.md) &gt; [Field](./kibana-plugin-plugins-data-public.field.md) &gt; [esTypes](./kibana-plugin-plugins-data-public.field.estypes.md)

## Field.esTypes property

<b>Signature:</b>

```typescript
esTypes?: string[];
```
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
<!-- Do not edit this file. It is automatically generated by API Documenter. -->

[Home](./index.md) &gt; [kibana-plugin-plugins-data-public](./kibana-plugin-plugins-data-public.md) &gt; [Field](./kibana-plugin-plugins-data-public.field.md) &gt; [filterable](./kibana-plugin-plugins-data-public.field.filterable.md)

## Field.filterable property

<b>Signature:</b>

```typescript
filterable?: boolean;
```
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
<!-- Do not edit this file. It is automatically generated by API Documenter. -->

[Home](./index.md) &gt; [kibana-plugin-plugins-data-public](./kibana-plugin-plugins-data-public.md) &gt; [Field](./kibana-plugin-plugins-data-public.field.md) &gt; [format](./kibana-plugin-plugins-data-public.field.format.md)

## Field.format property

<b>Signature:</b>

```typescript
format: any;
```
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
<!-- Do not edit this file. It is automatically generated by API Documenter. -->

[Home](./index.md) &gt; [kibana-plugin-plugins-data-public](./kibana-plugin-plugins-data-public.md) &gt; [Field](./kibana-plugin-plugins-data-public.field.md) &gt; [indexPattern](./kibana-plugin-plugins-data-public.field.indexpattern.md)

## Field.indexPattern property

<b>Signature:</b>

```typescript
indexPattern?: IndexPattern;
```
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
<!-- Do not edit this file. It is automatically generated by API Documenter. -->

[Home](./index.md) &gt; [kibana-plugin-plugins-data-public](./kibana-plugin-plugins-data-public.md) &gt; [Field](./kibana-plugin-plugins-data-public.field.md) &gt; [lang](./kibana-plugin-plugins-data-public.field.lang.md)

## Field.lang property

<b>Signature:</b>

```typescript
lang?: string;
```
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
<!-- Do not edit this file. It is automatically generated by API Documenter. -->

[Home](./index.md) &gt; [kibana-plugin-plugins-data-public](./kibana-plugin-plugins-data-public.md) &gt; [Field](./kibana-plugin-plugins-data-public.field.md)

## Field class

<b>Signature:</b>

```typescript
export declare class Field implements IFieldType
```

## Constructors

| Constructor | Modifiers | Description |
| --- | --- | --- |
| [(constructor)(indexPattern, spec, shortDotsEnable)](./kibana-plugin-plugins-data-public.field._constructor_.md) | | Constructs a new instance of the <code>Field</code> class |

## Properties

| Property | Modifiers | Type | Description |
| --- | --- | --- | --- |
| [$$spec](./kibana-plugin-plugins-data-public.field.__spec.md) | | <code>FieldSpec</code> | |
| [aggregatable](./kibana-plugin-plugins-data-public.field.aggregatable.md) | | <code>boolean</code> | |
| [conflictDescriptions](./kibana-plugin-plugins-data-public.field.conflictdescriptions.md) | | <code>Record&lt;string, string[]&gt;</code> | |
| [count](./kibana-plugin-plugins-data-public.field.count.md) | | <code>number</code> | |
| [displayName](./kibana-plugin-plugins-data-public.field.displayname.md) | | <code>string</code> | |
| [esTypes](./kibana-plugin-plugins-data-public.field.estypes.md) | | <code>string[]</code> | |
| [filterable](./kibana-plugin-plugins-data-public.field.filterable.md) | | <code>boolean</code> | |
| [format](./kibana-plugin-plugins-data-public.field.format.md) | | <code>any</code> | |
| [indexPattern](./kibana-plugin-plugins-data-public.field.indexpattern.md) | | <code>IndexPattern</code> | |
| [lang](./kibana-plugin-plugins-data-public.field.lang.md) | | <code>string</code> | |
| [name](./kibana-plugin-plugins-data-public.field.name.md) | | <code>string</code> | |
| [script](./kibana-plugin-plugins-data-public.field.script.md) | | <code>string</code> | |
| [scripted](./kibana-plugin-plugins-data-public.field.scripted.md) | | <code>boolean</code> | |
| [searchable](./kibana-plugin-plugins-data-public.field.searchable.md) | | <code>boolean</code> | |
| [sortable](./kibana-plugin-plugins-data-public.field.sortable.md) | | <code>boolean</code> | |
| [subType](./kibana-plugin-plugins-data-public.field.subtype.md) | | <code>IFieldSubType</code> | |
| [type](./kibana-plugin-plugins-data-public.field.type.md) | | <code>string</code> | |
| [visualizable](./kibana-plugin-plugins-data-public.field.visualizable.md) | | <code>boolean</code> | |

Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
<!-- Do not edit this file. It is automatically generated by API Documenter. -->

[Home](./index.md) &gt; [kibana-plugin-plugins-data-public](./kibana-plugin-plugins-data-public.md) &gt; [Field](./kibana-plugin-plugins-data-public.field.md) &gt; [name](./kibana-plugin-plugins-data-public.field.name.md)

## Field.name property

<b>Signature:</b>

```typescript
name: string;
```
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
<!-- Do not edit this file. It is automatically generated by API Documenter. -->

[Home](./index.md) &gt; [kibana-plugin-plugins-data-public](./kibana-plugin-plugins-data-public.md) &gt; [Field](./kibana-plugin-plugins-data-public.field.md) &gt; [script](./kibana-plugin-plugins-data-public.field.script.md)

## Field.script property

<b>Signature:</b>

```typescript
script?: string;
```
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
<!-- Do not edit this file. It is automatically generated by API Documenter. -->

[Home](./index.md) &gt; [kibana-plugin-plugins-data-public](./kibana-plugin-plugins-data-public.md) &gt; [Field](./kibana-plugin-plugins-data-public.field.md) &gt; [scripted](./kibana-plugin-plugins-data-public.field.scripted.md)

## Field.scripted property

<b>Signature:</b>

```typescript
scripted?: boolean;
```
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
<!-- Do not edit this file. It is automatically generated by API Documenter. -->

[Home](./index.md) &gt; [kibana-plugin-plugins-data-public](./kibana-plugin-plugins-data-public.md) &gt; [Field](./kibana-plugin-plugins-data-public.field.md) &gt; [searchable](./kibana-plugin-plugins-data-public.field.searchable.md)

## Field.searchable property

<b>Signature:</b>

```typescript
searchable?: boolean;
```
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
<!-- Do not edit this file. It is automatically generated by API Documenter. -->

[Home](./index.md) &gt; [kibana-plugin-plugins-data-public](./kibana-plugin-plugins-data-public.md) &gt; [Field](./kibana-plugin-plugins-data-public.field.md) &gt; [sortable](./kibana-plugin-plugins-data-public.field.sortable.md)

## Field.sortable property

<b>Signature:</b>

```typescript
sortable?: boolean;
```
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
<!-- Do not edit this file. It is automatically generated by API Documenter. -->

[Home](./index.md) &gt; [kibana-plugin-plugins-data-public](./kibana-plugin-plugins-data-public.md) &gt; [Field](./kibana-plugin-plugins-data-public.field.md) &gt; [subType](./kibana-plugin-plugins-data-public.field.subtype.md)

## Field.subType property

<b>Signature:</b>

```typescript
subType?: IFieldSubType;
```
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
<!-- Do not edit this file. It is automatically generated by API Documenter. -->

[Home](./index.md) &gt; [kibana-plugin-plugins-data-public](./kibana-plugin-plugins-data-public.md) &gt; [Field](./kibana-plugin-plugins-data-public.field.md) &gt; [type](./kibana-plugin-plugins-data-public.field.type.md)

## Field.type property

<b>Signature:</b>

```typescript
type: string;
```
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
<!-- Do not edit this file. It is automatically generated by API Documenter. -->

[Home](./index.md) &gt; [kibana-plugin-plugins-data-public](./kibana-plugin-plugins-data-public.md) &gt; [Field](./kibana-plugin-plugins-data-public.field.md) &gt; [visualizable](./kibana-plugin-plugins-data-public.field.visualizable.md)

## Field.visualizable property

<b>Signature:</b>

```typescript
visualizable?: boolean;
```
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
<!-- Do not edit this file. It is automatically generated by API Documenter. -->

[Home](./index.md) &gt; [kibana-plugin-plugins-data-public](./kibana-plugin-plugins-data-public.md) &gt; [FieldFormat](./kibana-plugin-plugins-data-public.fieldformat.md) &gt; [(constructor)](./kibana-plugin-plugins-data-public.fieldformat._constructor_.md)

## FieldFormat.(constructor)

Constructs a new instance of the `FieldFormat` class

<b>Signature:</b>

```typescript
constructor(_params?: IFieldFormatMetaParams, getConfig?: FieldFormatsGetConfigFn);
```

## Parameters

| Parameter | Type | Description |
| --- | --- | --- |
| \_params | <code>IFieldFormatMetaParams</code> | |
| getConfig | <code>FieldFormatsGetConfigFn</code> | |

Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
<!-- Do not edit this file. It is automatically generated by API Documenter. -->

[Home](./index.md) &gt; [kibana-plugin-plugins-data-public](./kibana-plugin-plugins-data-public.md) &gt; [FieldFormat](./kibana-plugin-plugins-data-public.fieldformat.md) &gt; [\_params](./kibana-plugin-plugins-data-public.fieldformat._params.md)

## FieldFormat.\_params property

<b>Signature:</b>

```typescript
protected readonly _params: any;
```
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
<!-- Do not edit this file. It is automatically generated by API Documenter. -->

[Home](./index.md) &gt; [kibana-plugin-plugins-data-public](./kibana-plugin-plugins-data-public.md) &gt; [FieldFormat](./kibana-plugin-plugins-data-public.fieldformat.md) &gt; [convert](./kibana-plugin-plugins-data-public.fieldformat.convert.md)

## FieldFormat.convert() method

Convert a raw value to a formatted string

<b>Signature:</b>

```typescript
convert(value: any, contentType?: FieldFormatsContentType, options?: HtmlContextTypeOptions | TextContextTypeOptions): string;
```

## Parameters

| Parameter | Type | Description |
| --- | --- | --- |
| value | <code>any</code> | |
| contentType | <code>FieldFormatsContentType</code> | |
| options | <code>HtmlContextTypeOptions &#124; TextContextTypeOptions</code> | |

<b>Returns:</b>

`string`

Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
<!-- Do not edit this file. It is automatically generated by API Documenter. -->

[Home](./index.md) &gt; [kibana-plugin-plugins-data-public](./kibana-plugin-plugins-data-public.md) &gt; [FieldFormat](./kibana-plugin-plugins-data-public.fieldformat.md) &gt; [convertObject](./kibana-plugin-plugins-data-public.fieldformat.convertobject.md)

## FieldFormat.convertObject property

{<!-- -->FieldFormatConvert<!-- -->} have to remove the private because of https://github.com/Microsoft/TypeScript/issues/17293

<b>Signature:</b>

```typescript
convertObject: FieldFormatConvert | undefined;
```
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
<!-- Do not edit this file. It is automatically generated by API Documenter. -->

[Home](./index.md) &gt; [kibana-plugin-plugins-data-public](./kibana-plugin-plugins-data-public.md) &gt; [FieldFormat](./kibana-plugin-plugins-data-public.fieldformat.md) &gt; [fieldType](./kibana-plugin-plugins-data-public.fieldformat.fieldtype.md)

## FieldFormat.fieldType property

{<!-- -->string<!-- -->} - Field Format Type

<b>Signature:</b>

```typescript
static fieldType: string | string[];
```
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
<!-- Do not edit this file. It is automatically generated by API Documenter. -->

[Home](./index.md) &gt; [kibana-plugin-plugins-data-public](./kibana-plugin-plugins-data-public.md) &gt; [FieldFormat](./kibana-plugin-plugins-data-public.fieldformat.md) &gt; [from](./kibana-plugin-plugins-data-public.fieldformat.from.md)

## FieldFormat.from() method

<b>Signature:</b>

```typescript
static from(convertFn: FieldFormatConvertFunction): FieldFormatInstanceType;
```

## Parameters

| Parameter | Type | Description |
| --- | --- | --- |
| convertFn | <code>FieldFormatConvertFunction</code> | |

<b>Returns:</b>

`FieldFormatInstanceType`

Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
<!-- Do not edit this file. It is automatically generated by API Documenter. -->

[Home](./index.md) &gt; [kibana-plugin-plugins-data-public](./kibana-plugin-plugins-data-public.md) &gt; [FieldFormat](./kibana-plugin-plugins-data-public.fieldformat.md) &gt; [getConfig](./kibana-plugin-plugins-data-public.fieldformat.getconfig.md)

## FieldFormat.getConfig property

<b>Signature:</b>

```typescript
protected getConfig: FieldFormatsGetConfigFn | undefined;
```
Loading