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

declare QueryStringInput props explicitly #77054

Closed
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
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
Expand Up @@ -70,6 +70,7 @@
| [Query](./kibana-plugin-plugins-data-public.query.md) | |
| [QueryState](./kibana-plugin-plugins-data-public.querystate.md) | All query state service state |
| [QueryStateChange](./kibana-plugin-plugins-data-public.querystatechange.md) | |
| [QueryStringInputProps](./kibana-plugin-plugins-data-public.querystringinputprops.md) | |
| [QuerySuggestionBasic](./kibana-plugin-plugins-data-public.querysuggestionbasic.md) | \* |
| [QuerySuggestionField](./kibana-plugin-plugins-data-public.querysuggestionfield.md) | \* |
| [QuerySuggestionGetFnArgs](./kibana-plugin-plugins-data-public.querysuggestiongetfnargs.md) | \* |
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,5 +7,5 @@
<b>Signature:</b>

```typescript
QueryStringInput: React.FC<Pick<Props, "query" | "prepend" | "size" | "className" | "placeholder" | "onChange" | "onBlur" | "onSubmit" | "indexPatterns" | "dataTestSubj" | "screenTitle" | "disableAutoFocus" | "persistedLog" | "bubbleSubmitEvent" | "languageSwitcherPopoverAnchorPosition" | "onChangeQueryInputFocus">>
QueryStringInput: React.FC<QueryStringInputProps>
```
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; [QueryStringInputProps](./kibana-plugin-plugins-data-public.querystringinputprops.md) &gt; [bubbleSubmitEvent](./kibana-plugin-plugins-data-public.querystringinputprops.bubblesubmitevent.md)

## QueryStringInputProps.bubbleSubmitEvent property

<b>Signature:</b>

```typescript
bubbleSubmitEvent?: 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; [QueryStringInputProps](./kibana-plugin-plugins-data-public.querystringinputprops.md) &gt; [className](./kibana-plugin-plugins-data-public.querystringinputprops.classname.md)

## QueryStringInputProps.className property

<b>Signature:</b>

```typescript
className?: 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; [QueryStringInputProps](./kibana-plugin-plugins-data-public.querystringinputprops.md) &gt; [dataTestSubj](./kibana-plugin-plugins-data-public.querystringinputprops.datatestsubj.md)

## QueryStringInputProps.dataTestSubj property

<b>Signature:</b>

```typescript
dataTestSubj?: 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; [QueryStringInputProps](./kibana-plugin-plugins-data-public.querystringinputprops.md) &gt; [disableAutoFocus](./kibana-plugin-plugins-data-public.querystringinputprops.disableautofocus.md)

## QueryStringInputProps.disableAutoFocus property

<b>Signature:</b>

```typescript
disableAutoFocus?: 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; [QueryStringInputProps](./kibana-plugin-plugins-data-public.querystringinputprops.md) &gt; [indexPatterns](./kibana-plugin-plugins-data-public.querystringinputprops.indexpatterns.md)

## QueryStringInputProps.indexPatterns property

<b>Signature:</b>

```typescript
indexPatterns: Array<IIndexPattern | 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; [QueryStringInputProps](./kibana-plugin-plugins-data-public.querystringinputprops.md) &gt; [languageSwitcherPopoverAnchorPosition](./kibana-plugin-plugins-data-public.querystringinputprops.languageswitcherpopoveranchorposition.md)

## QueryStringInputProps.languageSwitcherPopoverAnchorPosition property

<b>Signature:</b>

```typescript
languageSwitcherPopoverAnchorPosition?: PopoverAnchorPosition;
```
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
<!-- 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; [QueryStringInputProps](./kibana-plugin-plugins-data-public.querystringinputprops.md)

## QueryStringInputProps interface

<b>Signature:</b>

```typescript
export interface QueryStringInputProps
```

## Properties

| Property | Type | Description |
| --- | --- | --- |
| [bubbleSubmitEvent](./kibana-plugin-plugins-data-public.querystringinputprops.bubblesubmitevent.md) | <code>boolean</code> | |
| [className](./kibana-plugin-plugins-data-public.querystringinputprops.classname.md) | <code>string</code> | |
| [dataTestSubj](./kibana-plugin-plugins-data-public.querystringinputprops.datatestsubj.md) | <code>string</code> | |
| [disableAutoFocus](./kibana-plugin-plugins-data-public.querystringinputprops.disableautofocus.md) | <code>boolean</code> | |
| [indexPatterns](./kibana-plugin-plugins-data-public.querystringinputprops.indexpatterns.md) | <code>Array&lt;IIndexPattern &#124; string&gt;</code> | |
| [languageSwitcherPopoverAnchorPosition](./kibana-plugin-plugins-data-public.querystringinputprops.languageswitcherpopoveranchorposition.md) | <code>PopoverAnchorPosition</code> | |
| [onBlur](./kibana-plugin-plugins-data-public.querystringinputprops.onblur.md) | <code>() =&gt; void</code> | |
| [onChange](./kibana-plugin-plugins-data-public.querystringinputprops.onchange.md) | <code>(query: Query) =&gt; void</code> | |
| [onChangeQueryInputFocus](./kibana-plugin-plugins-data-public.querystringinputprops.onchangequeryinputfocus.md) | <code>(isFocused: boolean) =&gt; void</code> | |
| [onSubmit](./kibana-plugin-plugins-data-public.querystringinputprops.onsubmit.md) | <code>(query: Query) =&gt; void</code> | |
| [persistedLog](./kibana-plugin-plugins-data-public.querystringinputprops.persistedlog.md) | <code>PersistedLog</code> | |
| [placeholder](./kibana-plugin-plugins-data-public.querystringinputprops.placeholder.md) | <code>string</code> | |
| [prepend](./kibana-plugin-plugins-data-public.querystringinputprops.prepend.md) | <code>any</code> | |
| [query](./kibana-plugin-plugins-data-public.querystringinputprops.query.md) | <code>Query</code> | |
| [screenTitle](./kibana-plugin-plugins-data-public.querystringinputprops.screentitle.md) | <code>string</code> | |
| [size](./kibana-plugin-plugins-data-public.querystringinputprops.size.md) | <code>SuggestionsListSize</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; [QueryStringInputProps](./kibana-plugin-plugins-data-public.querystringinputprops.md) &gt; [onBlur](./kibana-plugin-plugins-data-public.querystringinputprops.onblur.md)

## QueryStringInputProps.onBlur property

<b>Signature:</b>

```typescript
onBlur?: () => void;
```
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; [QueryStringInputProps](./kibana-plugin-plugins-data-public.querystringinputprops.md) &gt; [onChange](./kibana-plugin-plugins-data-public.querystringinputprops.onchange.md)

## QueryStringInputProps.onChange property

<b>Signature:</b>

```typescript
onChange?: (query: Query) => void;
```
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; [QueryStringInputProps](./kibana-plugin-plugins-data-public.querystringinputprops.md) &gt; [onChangeQueryInputFocus](./kibana-plugin-plugins-data-public.querystringinputprops.onchangequeryinputfocus.md)

## QueryStringInputProps.onChangeQueryInputFocus property

<b>Signature:</b>

```typescript
onChangeQueryInputFocus?: (isFocused: boolean) => void;
```
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; [QueryStringInputProps](./kibana-plugin-plugins-data-public.querystringinputprops.md) &gt; [onSubmit](./kibana-plugin-plugins-data-public.querystringinputprops.onsubmit.md)

## QueryStringInputProps.onSubmit property

<b>Signature:</b>

```typescript
onSubmit?: (query: Query) => void;
```
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; [QueryStringInputProps](./kibana-plugin-plugins-data-public.querystringinputprops.md) &gt; [persistedLog](./kibana-plugin-plugins-data-public.querystringinputprops.persistedlog.md)

## QueryStringInputProps.persistedLog property

<b>Signature:</b>

```typescript
persistedLog?: PersistedLog;
```
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; [QueryStringInputProps](./kibana-plugin-plugins-data-public.querystringinputprops.md) &gt; [placeholder](./kibana-plugin-plugins-data-public.querystringinputprops.placeholder.md)

## QueryStringInputProps.placeholder property

<b>Signature:</b>

```typescript
placeholder?: 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; [QueryStringInputProps](./kibana-plugin-plugins-data-public.querystringinputprops.md) &gt; [prepend](./kibana-plugin-plugins-data-public.querystringinputprops.prepend.md)

## QueryStringInputProps.prepend property

<b>Signature:</b>

```typescript
prepend?: 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; [QueryStringInputProps](./kibana-plugin-plugins-data-public.querystringinputprops.md) &gt; [query](./kibana-plugin-plugins-data-public.querystringinputprops.query.md)

## QueryStringInputProps.query property

<b>Signature:</b>

```typescript
query: Query;
```
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; [QueryStringInputProps](./kibana-plugin-plugins-data-public.querystringinputprops.md) &gt; [screenTitle](./kibana-plugin-plugins-data-public.querystringinputprops.screentitle.md)

## QueryStringInputProps.screenTitle property

<b>Signature:</b>

```typescript
screenTitle?: 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; [QueryStringInputProps](./kibana-plugin-plugins-data-public.querystringinputprops.md) &gt; [size](./kibana-plugin-plugins-data-public.querystringinputprops.size.md)

## QueryStringInputProps.size property

<b>Signature:</b>

```typescript
size?: SuggestionsListSize;
```
1 change: 1 addition & 0 deletions src/plugins/data/public/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -406,6 +406,7 @@ export {
StatefulSearchBarProps,
FilterBar,
QueryStringInput,
QueryStringInputProps,
IndexPatternSelect,
} from './ui';

Expand Down
45 changes: 43 additions & 2 deletions src/plugins/data/public/public.api.md
Original file line number Diff line number Diff line change
Expand Up @@ -1475,11 +1475,52 @@ export interface QueryStateChange extends QueryStateChangePartial {
globalFilters?: boolean;
}

// Warning: (ae-forgotten-export) The symbol "Props" needs to be exported by the entry point index.d.ts
// Warning: (ae-missing-release-tag) "QueryStringInput" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal)
//
// @public (undocumented)
export const QueryStringInput: React.FC<Pick<Props_3, "query" | "prepend" | "size" | "className" | "placeholder" | "onChange" | "onBlur" | "onSubmit" | "indexPatterns" | "dataTestSubj" | "screenTitle" | "disableAutoFocus" | "persistedLog" | "bubbleSubmitEvent" | "languageSwitcherPopoverAnchorPosition" | "onChangeQueryInputFocus">>;
export const QueryStringInput: React.FC<QueryStringInputProps>;

// Warning: (ae-missing-release-tag) "QueryStringInputProps" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal)
//
// @public (undocumented)
export interface QueryStringInputProps {
// (undocumented)
bubbleSubmitEvent?: boolean;
// (undocumented)
className?: string;
// (undocumented)
dataTestSubj?: string;
// (undocumented)
disableAutoFocus?: boolean;
// (undocumented)
indexPatterns: Array<IIndexPattern | string>;
// (undocumented)
languageSwitcherPopoverAnchorPosition?: PopoverAnchorPosition;
// (undocumented)
onBlur?: () => void;
// (undocumented)
onChange?: (query: Query) => void;
// (undocumented)
onChangeQueryInputFocus?: (isFocused: boolean) => void;
// (undocumented)
onSubmit?: (query: Query) => void;
// Warning: (ae-forgotten-export) The symbol "PersistedLog" needs to be exported by the entry point index.d.ts
//
// (undocumented)
persistedLog?: PersistedLog;
// (undocumented)
placeholder?: string;
// (undocumented)
prepend?: any;
// (undocumented)
query: Query;
// (undocumented)
screenTitle?: string;
// Warning: (ae-forgotten-export) The symbol "SuggestionsListSize" needs to be exported by the entry point index.d.ts
//
// (undocumented)
size?: SuggestionsListSize;
}

// @public (undocumented)
export type QuerySuggestion = QuerySuggestionBasic | QuerySuggestionField;
Expand Down
2 changes: 1 addition & 1 deletion src/plugins/data/public/ui/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
export { SuggestionsComponent } from './typeahead';
export { IndexPatternSelect } from './index_pattern_select';
export { FilterBar } from './filter_bar';
export { QueryStringInput } from './query_string_input/query_string_input';
export { QueryStringInput, QueryStringInputProps } from './query_string_input/query_string_input';
export { SearchBar, SearchBarProps, StatefulSearchBarProps } from './search_bar';

// @internal
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -45,8 +45,7 @@ import { PersistedLog, getQueryLog, matchPairs, toUser, fromUser } from '../../q
import { SuggestionsListSize } from '../typeahead/suggestions_component';
import { SuggestionsComponent } from '..';

interface Props {
kibana: KibanaReactContextValue<IDataPluginServices>;
export interface QueryStringInputProps {
indexPatterns: Array<IIndexPattern | string>;
query: Query;
disableAutoFocus?: boolean;
Expand All @@ -64,6 +63,9 @@ interface Props {
size?: SuggestionsListSize;
className?: string;
}
interface Props extends QueryStringInputProps {
kibana: KibanaReactContextValue<IDataPluginServices>;
}

interface State {
isSuggestionsVisible: boolean;
Expand Down Expand Up @@ -680,4 +682,4 @@ export class QueryStringInputUI extends Component<Props, State> {
}
}

export const QueryStringInput = withKibana(QueryStringInputUI);
export const QueryStringInput: React.FC<QueryStringInputProps> = withKibana(QueryStringInputUI);