Skip to content

Commit

Permalink
fix imports
Browse files Browse the repository at this point in the history
  • Loading branch information
alexwizp committed Nov 14, 2019
1 parent fdeb61e commit 5888433
Show file tree
Hide file tree
Showing 43 changed files with 45 additions and 43 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ import { Subscription } from 'rxjs';
import { FilterManager } from './filter_manager';
import { getFilter } from './test_helpers/get_stub_filter';
import { getFiltersArray } from './test_helpers/get_filters_array';
import { esFilters } from '../../../common/es_query';
import { esFilters } from '../../../common';

import { coreMock } from '../../../../../core/public/mocks';
const setupMock = coreMock.createSetup();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ import { mapAndFlattenFilters } from './lib/map_and_flatten_filters';
import { uniqFilters } from './lib/uniq_filters';
import { onlyDisabledFiltersChanged } from './lib/only_disabled';
import { PartitionedFilters } from './types';
import { esFilters } from '../../../common/es_query';
import { esFilters } from '../../../common';

export class FilterManager {
private filters: esFilters.Filter[] = [];
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
*/

import { compareFilters } from './compare_filters';
import { esFilters } from '../../../../common/es_query';
import { esFilters } from '../../../../common';

describe('filter manager utilities', () => {
describe('compare filters', () => {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
*/

import { defaults, isEqual, omit } from 'lodash';
import { esFilters } from '../../../../common/es_query';
import { esFilters } from '../../../../common';

/**
* Compare two filters to see if they match
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@

import { filter, find } from 'lodash';
import { compareFilters } from './compare_filters';
import { esFilters } from '../../../../../../plugins/data/public';
import { esFilters } from '../../../../common';

/**
* Combine 2 filter collections, removing duplicates
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,8 @@

import { generateFilters } from './generate_filters';
import { FilterManager } from '../filter_manager';
import { esFilters, IFieldType, IIndexPattern } from '../../..';

import { esFilters, IFieldType, IIndexPattern } from '../../../../common';

const INDEX_NAME = 'my-index';
const EXISTS_FIELD_NAME = '_exists_';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,8 @@
*/

import _ from 'lodash';
import { FilterManager, esFilters, IFieldType, IIndexPattern } from '../../..';
import { esFilters, IFieldType, IIndexPattern } from '../../../../common';
import { FilterManager } from '../filter_manager';

function getExistingFilter(
appFilters: esFilters.Filter[],
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@

import sinon from 'sinon';
import { generateMappingChain } from './generate_mapping_chain';
import { esFilters } from '../../../../../../plugins/data/public';
import { esFilters } from '../../../../common';

describe('filter manager utilities', () => {
let mapping: any;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
* specific language governing permissions and limitations
* under the License.
*/
import { esFilters } from '../../../../../../plugins/data/public';
import { esFilters } from '../../../../common';

const noop = () => {
throw new Error('No mappings have been found for filter.');
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
*/

import { mapAndFlattenFilters } from './map_and_flatten_filters';
import { esFilters } from '../../../../../data/public';
import { esFilters } from '../../../../common';

describe('filter manager utilities', () => {
describe('mapAndFlattenFilters()', () => {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@

import { compact, flatten } from 'lodash';
import { mapFilter } from './map_filter';
import { esFilters } from '../../../../../data/public';
import { esFilters } from '../../../../common';

export const mapAndFlattenFilters = (filters: esFilters.Filter[]) => {
return compact(flatten(filters)).map((item: esFilters.Filter) => mapFilter(item));
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
*/

import { mapFilter } from './map_filter';
import { esFilters } from '../../../../../data/public';
import { esFilters } from '../../../../common';

describe('filter manager utilities', () => {
function getDisplayName(filter: esFilters.Filter) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ import { mapGeoBoundingBox } from './mappers/map_geo_bounding_box';
import { mapGeoPolygon } from './mappers/map_geo_polygon';
import { mapDefault } from './mappers/map_default';
import { generateMappingChain } from './generate_mapping_chain';
import { esFilters } from '../../../../../data/public';
import { esFilters } from '../../../../common';

export function mapFilter(filter: esFilters.Filter) {
/** Mappers **/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
*/

import { mapDefault } from './map_default';
import { esFilters } from '../../../../../common/es_query';
import { esFilters } from '../../../../../common';

describe('filter manager utilities', () => {
describe('mapDefault()', () => {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
*/

import { find, keys, get } from 'lodash';
import { esFilters } from '../../../../../common/es_query';
import { esFilters } from '../../../../../common';

export const mapDefault = (filter: esFilters.Filter) => {
const metaProperty = /(^\$|meta)/;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
*/

import { get } from 'lodash';
import { esFilters } from '../../../../../common/es_query';
import { esFilters } from '../../../../../common';

export const mapExists = (filter: esFilters.Filter) => {
if (esFilters.isExistsFilter(filter)) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
*/

import { mapGeoBoundingBox } from './map_geo_bounding_box';
import { esFilters } from '../../../../../common/es_query';
import { esFilters } from '../../../../../common';

describe('filter manager utilities', () => {
describe('mapGeoBoundingBox()', () => {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
* specific language governing permissions and limitations
* under the License.
*/
import { esFilters } from '../../../../../common/es_query';
import { esFilters } from '../../../../../common';

const getFormattedValueFn = (params: any) => {
return (formatter?: esFilters.FilterValueFormatter) => {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
*/

import { mapGeoPolygon } from './map_geo_polygon';
import { esFilters } from '../../../../../common/es_query';
import { esFilters } from '../../../../../common';

describe('filter manager utilities', () => {
let filter: esFilters.GeoPolygonFilter;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
* under the License.
*/

import { esFilters } from '../../../../../common/es_query';
import { esFilters } from '../../../../../common';

const POINTS_SEPARATOR = ', ';

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
*/

import { mapMatchAll } from './map_match_all';
import { esFilters } from '../../../../../common/es_query';
import { esFilters } from '../../../../../common';

describe('filter_manager/lib', () => {
describe('mapMatchAll()', () => {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
* specific language governing permissions and limitations
* under the License.
*/
import { esFilters } from '../../../../../common/es_query';
import { esFilters } from '../../../../../common';

export const mapMatchAll = (filter: esFilters.Filter) => {
if (esFilters.isMatchAllFilter(filter)) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
*/

import { mapMissing } from './map_missing';
import { esFilters } from '../../../../../common/es_query';
import { esFilters } from '../../../../../common';

describe('filter manager utilities', () => {
describe('mapMissing()', () => {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
* under the License.
*/

import { esFilters } from '../../../../../common/es_query';
import { esFilters } from '../../../../../common';

export const mapMissing = (filter: esFilters.Filter) => {
if (esFilters.isMissingFilter(filter)) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
* under the License.
*/
import { mapPhrase } from './map_phrase';
import { esFilters } from '../../../../../common/es_query';
import { esFilters } from '../../../../../common';

describe('filter manager utilities', () => {
describe('mapPhrase()', () => {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
*/

import { get } from 'lodash';
import { esFilters } from '../../../../../common/es_query';
import { esFilters } from '../../../../../common';

const getScriptedPhraseValue = (filter: esFilters.PhraseFilter) =>
get(filter, ['script', 'script', 'params', 'value']);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
* under the License.
*/

import { esFilters } from '../../../../../common/es_query';
import { esFilters } from '../../../../../common';

export const mapPhrases = (filter: esFilters.Filter) => {
if (!esFilters.isPhrasesFilter(filter)) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
*/

import { mapQueryString } from './map_query_string';
import { esFilters } from '../../../../../common/es_query';
import { esFilters } from '../../../../../common';

describe('filter manager utilities', () => {
describe('mapQueryString()', () => {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
* specific language governing permissions and limitations
* under the License.
*/
import { esFilters } from '../../../../../common/es_query';
import { esFilters } from '../../../../../common';

export const mapQueryString = (filter: esFilters.Filter) => {
if (esFilters.isQueryStringFilter(filter)) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
*/

import { mapRange } from './map_range';
import { esFilters } from '../../../../../common/es_query';
import { esFilters } from '../../../../../common';

describe('filter manager utilities', () => {
describe('mapRange()', () => {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
*/

import { get, has } from 'lodash';
import { esFilters } from '../../../../../common/es_query';
import { esFilters } from '../../../../../common';

const getFormattedValueFn = (left: any, right: any) => {
return (formatter?: esFilters.FilterValueFormatter) => {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
*/

import { onlyDisabledFiltersChanged } from './only_disabled';
import { esFilters } from '../../../../../data/public';
import { esFilters } from '../../../../common';

describe('filter manager utilities', () => {
describe('onlyDisabledFiltersChanged()', () => {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
*/

import { filter, isEqual } from 'lodash';
import { esFilters } from '../../../../../../plugins/data/public';
import { esFilters } from '../../../../common';

const isEnabled = (f: esFilters.Filter) => f && f.meta && !f.meta.disabled;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
*/

import { uniqFilters } from './uniq_filters';
import { esFilters } from '../../../../../data/public';
import { esFilters } from '../../../../common';

describe('filter manager utilities', () => {
describe('niqFilter', () => {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
*/
import { each, union } from 'lodash';
import { dedupFilters } from './dedup_filters';
import { esFilters } from '../../../../../data/public';
import { esFilters } from '../../../../common';

/**
* Remove duplicate filters from an array of filters
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
* under the License.
*/

import { esFilters } from '../../../../../../plugins/data/public';
import { esFilters } from '../../../../common';

export function getFiltersArray(): esFilters.Filter[] {
return [
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
* under the License.
*/

import { esFilters } from '../../../../../../plugins/data/public';
import { esFilters } from '../../../../common';

export function getFilter(
store: esFilters.FilterStateStore,
Expand Down
2 changes: 1 addition & 1 deletion src/plugins/data/public/query/filter_manager/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
* under the License.
*/

import { esFilters } from '../../../../../plugins/data/public';
import { esFilters } from '../../../common';

export interface PartitionedFilters {
globalFilters: esFilters.Filter[];
Expand Down
2 changes: 1 addition & 1 deletion src/plugins/data/public/query/timefilter/get_time.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
*/

import dateMath from '@elastic/datemath';
import { TimeRange } from 'src/plugins/data/public';
import { TimeRange } from '../../../common';

// TODO: remove this
import { IndexPattern, Field } from '../../../../../legacy/core_plugins/data/public/index_patterns';
Expand Down
2 changes: 1 addition & 1 deletion src/plugins/data/public/query/timefilter/time_history.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,9 @@
*/

import moment from 'moment';
import { TimeRange } from 'src/plugins/data/public';
import { IStorageWrapper } from 'src/plugins/kibana_utils/public';
import { PersistedLog } from '../persisted_log';
import { TimeRange } from '../../../common';

export class TimeHistory {
private history: PersistedLog<TimeRange>;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ import expect from '@kbn/expect';
import moment from 'moment';
import { Timefilter } from './timefilter';
import { Subscription } from 'rxjs';
import { TimeRange, RefreshInterval } from 'src/plugins/data/public';
import { TimeRange, RefreshInterval } from '../../../common';

import { timefilterServiceMock } from './timefilter_service.mock';
const timefilterSetupMock = timefilterServiceMock.createSetupContract();
Expand Down
2 changes: 1 addition & 1 deletion src/plugins/data/public/query/timefilter/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
* under the License.
*/
import { Moment } from 'moment';
import { RefreshInterval, TimeRange } from 'src/plugins/data/public';
import { TimeRange, RefreshInterval } from '../../../common';

export interface TimefilterConfig {
timeDefaults: TimeRange;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,9 @@
* under the License.
*/

import { ES_FIELD_TYPES } from 'src/plugins/data/public';
import { mapValues, isString } from 'lodash';
import { FieldMappingSpec, MappingObject } from './types';
import { ES_FIELD_TYPES } from '../../../data/public';

/** @private */
type ShorthandFieldMapObject = FieldMappingSpec | ES_FIELD_TYPES | 'json';
Expand Down

0 comments on commit 5888433

Please sign in to comment.