Move temporary types in data plugin to common/types. (#50280)
* Move temporary ui imported types in data plugin to common/types.
Remove unnecessary mocks.
* Updated dashboard, discover and visualize mappings - type removal
* Revert "Updated dashboard, discover and visualize mappings - type removal"
This reverts commit 5e931ce62a
.
This commit is contained in:
parent
f317c25852
commit
4c8afa76d3
|
@ -18,7 +18,7 @@
|
|||
*/
|
||||
|
||||
import { Filter, FilterMeta } from './meta_filter';
|
||||
import { IndexPattern, Field } from './types';
|
||||
import { IndexPattern, Field } from '../../types';
|
||||
|
||||
export type ExistsFilterMeta = FilterMeta;
|
||||
|
||||
|
|
|
@ -18,7 +18,7 @@
|
|||
*/
|
||||
|
||||
import { buildInlineScriptForPhraseFilter, buildPhraseFilter } from './phrase_filter';
|
||||
import { IndexPattern } from './types';
|
||||
import { IndexPattern } from '../../types';
|
||||
import { getField } from '../__tests__/fields_mock';
|
||||
|
||||
describe('Phrase filter builder', () => {
|
||||
|
|
|
@ -19,7 +19,7 @@
|
|||
|
||||
import { get, isPlainObject } from 'lodash';
|
||||
import { Filter, FilterMeta } from './meta_filter';
|
||||
import { IndexPattern, Field } from './types';
|
||||
import { IndexPattern, Field } from '../../types';
|
||||
|
||||
export type PhraseFilterMeta = FilterMeta & {
|
||||
params?: {
|
||||
|
|
|
@ -18,7 +18,7 @@
|
|||
*/
|
||||
|
||||
import { Filter, FilterMeta } from './meta_filter';
|
||||
import { Field, IndexPattern } from './types';
|
||||
import { Field, IndexPattern } from '../../types';
|
||||
import { getPhraseScript } from './phrase_filter';
|
||||
|
||||
export type PhrasesFilterMeta = FilterMeta & {
|
||||
|
|
|
@ -18,7 +18,7 @@
|
|||
*/
|
||||
|
||||
import { buildQueryFilter } from './query_string_filter';
|
||||
import { IndexPattern } from './types';
|
||||
import { IndexPattern } from '../../types';
|
||||
|
||||
describe('Phrase filter builder', () => {
|
||||
let indexPattern: IndexPattern;
|
||||
|
|
|
@ -18,7 +18,7 @@
|
|||
*/
|
||||
|
||||
import { Filter, FilterMeta } from './meta_filter';
|
||||
import { IndexPattern } from './types';
|
||||
import { IndexPattern } from '../../types';
|
||||
|
||||
export type QueryStringFilterMeta = FilterMeta;
|
||||
|
||||
|
|
|
@ -19,7 +19,7 @@
|
|||
|
||||
import { each } from 'lodash';
|
||||
import { buildRangeFilter, RangeFilter } from './range_filter';
|
||||
import { IndexPattern, Field } from './types';
|
||||
import { IndexPattern, Field } from '../../types';
|
||||
import { getField } from '../__tests__/fields_mock';
|
||||
|
||||
describe('Range filter builder', () => {
|
||||
|
|
|
@ -18,7 +18,7 @@
|
|||
*/
|
||||
import { map, reduce, mapValues, get, keys, pick } from 'lodash';
|
||||
import { Filter, FilterMeta } from './meta_filter';
|
||||
import { Field, IndexPattern } from './types';
|
||||
import { Field, IndexPattern } from '../../types';
|
||||
|
||||
const OPERANDS_IN_RANGE = 2;
|
||||
|
||||
|
|
|
@ -49,9 +49,3 @@ export enum FILTERS {
|
|||
GEO_BOUNDING_BOX = 'geo_bounding_box',
|
||||
GEO_POLYGON = 'geo_polygon',
|
||||
}
|
||||
|
||||
// We can't import the real types from the data plugin, so need to either duplicate
|
||||
// them here or figure out another solution, perhaps housing them in this package
|
||||
// will be replaces after Fieds / IndexPattern will be moved into new platform
|
||||
export type Field = any;
|
||||
export type IndexPattern = any;
|
||||
|
|
|
@ -27,3 +27,4 @@ export * from './kbn_field_types/types';
|
|||
// will be replaces after Fieds / IndexPattern will be moved into new platform
|
||||
export type Field = any;
|
||||
export type IndexPattern = any;
|
||||
export type StaticIndexPattern = any;
|
||||
|
|
|
@ -17,8 +17,8 @@
|
|||
* under the License.
|
||||
*/
|
||||
|
||||
import { StaticIndexPattern, Field } from 'ui/index_patterns';
|
||||
import { AutocompleteProviderRegister } from '.';
|
||||
import { Field, StaticIndexPattern } from '..';
|
||||
|
||||
export type AutocompletePublicPluginSetup = Pick<
|
||||
AutocompleteProviderRegister,
|
||||
|
|
|
@ -36,12 +36,6 @@ const createMockStorage = () => ({
|
|||
clear: jest.fn(),
|
||||
});
|
||||
|
||||
jest.mock('ui/chrome', () => {
|
||||
return {
|
||||
getBasePath: () => `/some/base/path`,
|
||||
};
|
||||
});
|
||||
|
||||
const historyName = 'testHistory';
|
||||
const historyLimit = 10;
|
||||
const payload = [
|
||||
|
|
|
@ -16,8 +16,6 @@
|
|||
* specific language governing permissions and limitations
|
||||
* under the License.
|
||||
*/
|
||||
|
||||
// Should be import { Field } from './index_patterns';
|
||||
export type Field = any;
|
||||
import { Field } from '..';
|
||||
|
||||
export type IGetSuggestions = (index: string, field: Field, query: string, boolFilter?: any) => any;
|
||||
|
|
|
@ -19,7 +19,6 @@
|
|||
|
||||
// TODO: remove when index patterns are moved here.
|
||||
jest.mock('ui/new_platform');
|
||||
jest.mock('ui/index_patterns');
|
||||
|
||||
import { stubIndexPattern, stubFields } from '../stubs';
|
||||
import { getSuggestionsProvider } from './value_suggestions';
|
||||
|
|
|
@ -20,7 +20,8 @@
|
|||
import { memoize } from 'lodash';
|
||||
|
||||
import { UiSettingsClientContract, HttpServiceBase } from 'src/core/public';
|
||||
import { IGetSuggestions, Field } from './types';
|
||||
import { IGetSuggestions } from './types';
|
||||
import { Field } from '..';
|
||||
|
||||
export function getSuggestionsProvider(
|
||||
uiSettings: UiSettingsClientContract,
|
||||
|
|
Loading…
Reference in a new issue