-
Notifications
You must be signed in to change notification settings - Fork 8.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
1ca128d
commit 5ca182e
Showing
20 changed files
with
1,099 additions
and
46 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
30 changes: 30 additions & 0 deletions
30
src/plugins/unified_search/public/query_string_input/quick_filters.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
/* | ||
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one | ||
* or more contributor license agreements. Licensed under the Elastic License | ||
* 2.0 and the Server Side Public License, v 1; you may not use this file except | ||
* in compliance with, at your election, the Elastic License 2.0 or the Server | ||
* Side Public License, v 1. | ||
*/ | ||
|
||
import { EuiIconType } from '@elastic/eui/src/components/icon/icon'; | ||
import { ComponentType } from 'react'; | ||
import { Filter } from '@kbn/es-query'; | ||
|
||
export interface QuickFilter { | ||
name: string; | ||
icon?: Exclude<EuiIconType, ComponentType>; | ||
disabled?: boolean; | ||
filter: Filter; | ||
} | ||
|
||
export interface QuickFiltersGroup { | ||
groupName: string; | ||
icon?: Exclude<EuiIconType, ComponentType>; | ||
items: QuickFiltersMenuItem[]; | ||
} | ||
|
||
export type QuickFiltersMenuItem = QuickFiltersGroup | QuickFilter; | ||
|
||
export const isQuickFiltersGroup = ( | ||
quickFiltersMenuItem: QuickFiltersMenuItem | ||
): quickFiltersMenuItem is QuickFiltersGroup => 'items' in quickFiltersMenuItem; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.