Skip to content

Commit

Permalink
[SIEM] Fix ResizeObserver polyfill (#58046)
Browse files Browse the repository at this point in the history
  • Loading branch information
patrykkopycinski authored Feb 20, 2020
1 parent 8097bd8 commit b70d544
Show file tree
Hide file tree
Showing 9 changed files with 13 additions and 13 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ import {
RecursivePartial,
} from '@elastic/charts';
import { getOr, get, isNull, isNumber } from 'lodash/fp';
import useResizeObserver from 'use-resize-observer';
import useResizeObserver from 'use-resize-observer/polyfilled';

import { ChartPlaceHolder } from './chart_place_holder';
import { useTimeZone } from '../../lib/kibana';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import React from 'react';
import { Chart, BarSeries, Axis, Position, ScaleType, Settings } from '@elastic/charts';
import { getOr, get, isNumber } from 'lodash/fp';
import deepmerge from 'deepmerge';
import useResizeObserver from 'use-resize-observer';
import useResizeObserver from 'use-resize-observer/polyfilled';

import { useTimeZone } from '../../lib/kibana';
import { ChartPlaceHolder } from './chart_place_holder';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

import React from 'react';
import { MockedProvider } from 'react-apollo/test-utils';
import useResizeObserver from 'use-resize-observer';
import useResizeObserver from 'use-resize-observer/polyfilled';

import { mockIndexPattern, TestProviders } from '../../mock';
import { wait } from '../../lib/helpers';
Expand All @@ -29,7 +29,7 @@ mockUseFetchIndexPatterns.mockImplementation(() => [
]);

const mockUseResizeObserver: jest.Mock = useResizeObserver as jest.Mock;
jest.mock('use-resize-observer');
jest.mock('use-resize-observer/polyfilled');
mockUseResizeObserver.mockImplementation(() => ({}));

const from = 1566943856794;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import deepEqual from 'fast-deep-equal';
import { getOr, isEmpty, isEqual, union } from 'lodash/fp';
import React, { useMemo } from 'react';
import styled from 'styled-components';
import useResizeObserver from 'use-resize-observer';
import useResizeObserver from 'use-resize-observer/polyfilled';

import { BrowserFields } from '../../containers/source';
import { TimelineQuery } from '../../containers/timeline';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

import React from 'react';
import { MockedProvider } from 'react-apollo/test-utils';
import useResizeObserver from 'use-resize-observer';
import useResizeObserver from 'use-resize-observer/polyfilled';

import { wait } from '../../lib/helpers';
import { mockIndexPattern, TestProviders } from '../../mock';
Expand All @@ -28,7 +28,7 @@ mockUseFetchIndexPatterns.mockImplementation(() => [
]);

const mockUseResizeObserver: jest.Mock = useResizeObserver as jest.Mock;
jest.mock('use-resize-observer');
jest.mock('use-resize-observer/polyfilled');
mockUseResizeObserver.mockImplementation(() => ({}));

const from = 1566943856794;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
import { shallow } from 'enzyme';
import React from 'react';
import { MockedProvider } from 'react-apollo/test-utils';
import useResizeObserver from 'use-resize-observer';
import useResizeObserver from 'use-resize-observer/polyfilled';

import { timelineQuery } from '../../containers/timeline/index.gql_query';
import { mockBrowserFields } from '../../containers/source/mock';
Expand All @@ -31,7 +31,7 @@ const testFlyoutHeight = 980;
jest.mock('../../lib/kibana');

const mockUseResizeObserver: jest.Mock = useResizeObserver as jest.Mock;
jest.mock('use-resize-observer');
jest.mock('use-resize-observer/polyfilled');
mockUseResizeObserver.mockImplementation(() => ({}));

describe('Timeline', () => {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import { EuiFlexGroup } from '@elastic/eui';
import { getOr, isEmpty } from 'lodash/fp';
import React from 'react';
import styled from 'styled-components';
import useResizeObserver from 'use-resize-observer';
import useResizeObserver from 'use-resize-observer/polyfilled';

import { BrowserFields } from '../../containers/source';
import { TimelineQuery } from '../../containers/timeline';
Expand Down
2 changes: 1 addition & 1 deletion x-pack/legacy/plugins/siem/public/pages/home/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
import React from 'react';
import { Redirect, Route, Switch } from 'react-router-dom';
import styled from 'styled-components';
import useResizeObserver from 'use-resize-observer';
import useResizeObserver from 'use-resize-observer/polyfilled';

import { DragDropContextWrapper } from '../../components/drag_and_drop/drag_drop_context_wrapper';
import { Flyout, flyoutHeaderHeight } from '../../components/flyout';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
import React from 'react';
import { IIndexPattern } from 'src/plugins/data/public';
import { MemoryRouter } from 'react-router-dom';
import useResizeObserver from 'use-resize-observer';
import useResizeObserver from 'use-resize-observer/polyfilled';

import { mockIndexPattern } from '../../../mock/index_pattern';
import { TestProviders } from '../../../mock/test_providers';
Expand Down Expand Up @@ -37,7 +37,7 @@ jest.mock('../../../components/query_bar', () => ({
}));

const mockUseResizeObserver: jest.Mock = useResizeObserver as jest.Mock;
jest.mock('use-resize-observer');
jest.mock('use-resize-observer/polyfilled');
mockUseResizeObserver.mockImplementation(() => ({}));

describe('body', () => {
Expand Down

0 comments on commit b70d544

Please sign in to comment.