@@ -22,7 +22,6 @@ import { i18n } from '@kbn/i18n';
2222import { FormattedMessage } from '@kbn/i18n/react' ;
2323
2424import { metadata } from 'ui/metadata' ;
25- import { IndexPattern , INDEX_PATTERN_ILLEGAL_CHARACTERS } from 'ui/index_patterns' ;
2625import { ES_FIELD_TYPES } from '../../../../../../../../../../../src/plugins/data/public' ;
2726import { ml } from '../../../../../services/ml_api_service' ;
2827import { Field , EVENT_RATE_FIELD_ID } from '../../../../../../../common/types/fields' ;
@@ -45,11 +44,6 @@ import {
4544} from '../../../../../../../../../../../src/plugins/data/public' ;
4645import { DfAnalyticsExplainResponse , FieldSelectionItem } from '../../../../common/analytics' ;
4746
48- // based on code used by `ui/index_patterns` internally
49- // remove the space character from the list of illegal characters
50- INDEX_PATTERN_ILLEGAL_CHARACTERS . pop ( ) ;
51- const characterList = INDEX_PATTERN_ILLEGAL_CHARACTERS . join ( ', ' ) ;
52-
5347const BASIC_NUMERICAL_TYPES = new Set ( [
5448 ES_FIELD_TYPES . LONG ,
5549 ES_FIELD_TYPES . INTEGER ,
@@ -166,7 +160,8 @@ export const CreateAnalyticsForm: FC<CreateAnalyticsFormProps> = ({ actions, sta
166160 // Create the option if it doesn't exist.
167161 if (
168162 flattenedOptions . some (
169- ( option : { label : string } ) => option . label . trim ( ) . toLowerCase ( ) === normalizedSearchValue
163+ ( option : EuiComboBoxOptionProps ) =>
164+ option . label . trim ( ) . toLowerCase ( ) === normalizedSearchValue
170165 )
171166 ) {
172167 excludesOptions . push ( newOption ) ;
@@ -194,7 +189,7 @@ export const CreateAnalyticsForm: FC<CreateAnalyticsFormProps> = ({ actions, sta
194189
195190 // If sourceIndex has changed load analysis field options again
196191 if ( previousSourceIndex !== sourceIndex || previousJobType !== jobType ) {
197- const analyzedFieldsOptions : Array < { label : string } > = [ ] ;
192+ const analyzedFieldsOptions : EuiComboBoxOptionProps [ ] = [ ] ;
198193
199194 if ( resp . field_selection ) {
200195 resp . field_selection . forEach ( ( selectedField : FieldSelectionItem ) => {
@@ -257,7 +252,7 @@ export const CreateAnalyticsForm: FC<CreateAnalyticsFormProps> = ({ actions, sta
257252 // Get fields and filter for supported types for job type
258253 const { fields } = newJobCapsService ;
259254
260- const depVarOptions : Array < { label : string } > = [ ] ;
255+ const depVarOptions : EuiComboBoxOptionProps [ ] = [ ] ;
261256
262257 fields . forEach ( ( field : Field ) => {
263258 if ( shouldAddAsDepVarOption ( field ) ) {
0 commit comments