Co-authored-by: Anton Dosov <anton.dosov@elastic.co>
This commit is contained in:
parent
c49cdbc284
commit
c3766073f9
25 changed files with 30 additions and 23 deletions
|
@ -75,6 +75,11 @@ module.exports = {
|
||||||
to: '@kbn/test',
|
to: '@kbn/test',
|
||||||
disallowedMessage: `import from the root of @kbn/test instead`
|
disallowedMessage: `import from the root of @kbn/test instead`
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
from: 'react-intl',
|
||||||
|
to: '@kbn/i18n/react',
|
||||||
|
disallowedMessage: `import from @kbn/i18n/react instead`
|
||||||
|
}
|
||||||
],
|
],
|
||||||
],
|
],
|
||||||
},
|
},
|
||||||
|
|
|
@ -6,6 +6,7 @@
|
||||||
* Side Public License, v 1.
|
* Side Public License, v 1.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
// eslint-disable-next-line @kbn/eslint/module_migration
|
||||||
import { InjectedIntl as _InjectedIntl, InjectedIntlProps as _InjectedIntlProps } from 'react-intl';
|
import { InjectedIntl as _InjectedIntl, InjectedIntlProps as _InjectedIntlProps } from 'react-intl';
|
||||||
export type { InjectedIntl, InjectedIntlProps } from 'react-intl';
|
export type { InjectedIntl, InjectedIntlProps } from 'react-intl';
|
||||||
|
|
||||||
|
|
|
@ -8,6 +8,8 @@
|
||||||
|
|
||||||
import * as PropTypes from 'prop-types';
|
import * as PropTypes from 'prop-types';
|
||||||
import * as React from 'react';
|
import * as React from 'react';
|
||||||
|
|
||||||
|
// eslint-disable-next-line @kbn/eslint/module_migration
|
||||||
import { IntlProvider } from 'react-intl';
|
import { IntlProvider } from 'react-intl';
|
||||||
|
|
||||||
import * as i18n from '../core';
|
import * as i18n from '../core';
|
||||||
|
|
|
@ -8,7 +8,7 @@
|
||||||
|
|
||||||
import React from 'react';
|
import React from 'react';
|
||||||
import { FieldFormat } from 'src/plugins/data/public';
|
import { FieldFormat } from 'src/plugins/data/public';
|
||||||
import { IntlProvider } from 'react-intl';
|
import { __IntlProvider as IntlProvider } from '@kbn/i18n/react';
|
||||||
import { UrlFormatEditor } from './url';
|
import { UrlFormatEditor } from './url';
|
||||||
import { coreMock } from 'src/core/public/mocks';
|
import { coreMock } from 'src/core/public/mocks';
|
||||||
import { createKibanaReactContext } from '../../../../../../kibana_react/public';
|
import { createKibanaReactContext } from '../../../../../../kibana_react/public';
|
||||||
|
|
|
@ -7,7 +7,7 @@
|
||||||
|
|
||||||
import { render } from '@testing-library/react';
|
import { render } from '@testing-library/react';
|
||||||
import React, { ReactNode } from 'react';
|
import React, { ReactNode } from 'react';
|
||||||
import { IntlProvider } from 'react-intl';
|
import { __IntlProvider as IntlProvider } from '@kbn/i18n/react';
|
||||||
import { ANOMALY_SEVERITY } from '../../../../common/ml_constants';
|
import { ANOMALY_SEVERITY } from '../../../../common/ml_constants';
|
||||||
import { SelectAnomalySeverity } from './select_anomaly_severity';
|
import { SelectAnomalySeverity } from './select_anomaly_severity';
|
||||||
|
|
||||||
|
|
|
@ -6,7 +6,7 @@
|
||||||
*/
|
*/
|
||||||
|
|
||||||
import React, { ReactNode } from 'react';
|
import React, { ReactNode } from 'react';
|
||||||
import { IntlProvider } from 'react-intl';
|
import { __IntlProvider as IntlProvider } from '@kbn/i18n/react';
|
||||||
// eslint-disable-next-line @kbn/eslint/no-restricted-paths
|
// eslint-disable-next-line @kbn/eslint/no-restricted-paths
|
||||||
import { UrlGeneratorsStart } from '../../../../../../../src/plugins/share/public/url_generators';
|
import { UrlGeneratorsStart } from '../../../../../../../src/plugins/share/public/url_generators';
|
||||||
|
|
||||||
|
|
|
@ -16,10 +16,10 @@ import {
|
||||||
EuiToolTip,
|
EuiToolTip,
|
||||||
} from '@elastic/eui';
|
} from '@elastic/eui';
|
||||||
import { i18n } from '@kbn/i18n';
|
import { i18n } from '@kbn/i18n';
|
||||||
|
import { FormattedMessage } from '@kbn/i18n/react';
|
||||||
import { CoreStart } from 'kibana/public';
|
import { CoreStart } from 'kibana/public';
|
||||||
import { capitalize } from 'lodash';
|
import { capitalize } from 'lodash';
|
||||||
import React from 'react';
|
import React from 'react';
|
||||||
import { FormattedMessage } from 'react-intl';
|
|
||||||
import { RedirectAppLinks } from '../../../../../../../src/plugins/kibana_react/public';
|
import { RedirectAppLinks } from '../../../../../../../src/plugins/kibana_react/public';
|
||||||
import { IManagementSectionsPluginsSetup, SessionsConfigSchema } from '../';
|
import { IManagementSectionsPluginsSetup, SessionsConfigSchema } from '../';
|
||||||
import { SearchSessionStatus } from '../../../../../../../src/plugins/data/common';
|
import { SearchSessionStatus } from '../../../../../../../src/plugins/data/common';
|
||||||
|
|
|
@ -22,7 +22,7 @@ import {
|
||||||
import { coreMock } from '../../../../../../../src/core/public/mocks';
|
import { coreMock } from '../../../../../../../src/core/public/mocks';
|
||||||
import { TOUR_RESTORE_STEP_KEY, TOUR_TAKING_TOO_LONG_STEP_KEY } from './search_session_tour';
|
import { TOUR_RESTORE_STEP_KEY, TOUR_TAKING_TOO_LONG_STEP_KEY } from './search_session_tour';
|
||||||
import userEvent from '@testing-library/user-event';
|
import userEvent from '@testing-library/user-event';
|
||||||
import { IntlProvider } from 'react-intl';
|
import { __IntlProvider as IntlProvider } from '@kbn/i18n/react';
|
||||||
import { createSearchUsageCollectorMock } from '../../../../../../../src/plugins/data/public/search/collectors/mocks';
|
import { createSearchUsageCollectorMock } from '../../../../../../../src/plugins/data/public/search/collectors/mocks';
|
||||||
|
|
||||||
const coreStart = coreMock.createStart();
|
const coreStart = coreMock.createStart();
|
||||||
|
|
|
@ -9,7 +9,7 @@ import React, { ReactNode } from 'react';
|
||||||
import { screen, render } from '@testing-library/react';
|
import { screen, render } from '@testing-library/react';
|
||||||
import userEvent from '@testing-library/user-event';
|
import userEvent from '@testing-library/user-event';
|
||||||
import { SearchSessionIndicator } from './search_session_indicator';
|
import { SearchSessionIndicator } from './search_session_indicator';
|
||||||
import { IntlProvider } from 'react-intl';
|
import { __IntlProvider as IntlProvider } from '@kbn/i18n/react';
|
||||||
import { SearchSessionState } from '../../../../../../../src/plugins/data/public';
|
import { SearchSessionState } from '../../../../../../../src/plugins/data/public';
|
||||||
|
|
||||||
function Container({ children }: { children?: ReactNode }) {
|
function Container({ children }: { children?: ReactNode }) {
|
||||||
|
|
|
@ -7,12 +7,11 @@
|
||||||
|
|
||||||
import React from 'react';
|
import React from 'react';
|
||||||
|
|
||||||
import { FormattedMessage } from 'react-intl';
|
|
||||||
|
|
||||||
import { useValues } from 'kea';
|
import { useValues } from 'kea';
|
||||||
|
|
||||||
import { EuiCallOut, EuiLink } from '@elastic/eui';
|
import { EuiCallOut, EuiLink } from '@elastic/eui';
|
||||||
import { i18n } from '@kbn/i18n';
|
import { i18n } from '@kbn/i18n';
|
||||||
|
import { FormattedMessage } from '@kbn/i18n/react';
|
||||||
|
|
||||||
import { EuiLinkTo } from '../../../shared/react_router_helpers';
|
import { EuiLinkTo } from '../../../shared/react_router_helpers';
|
||||||
import { DOCS_PREFIX, ENGINE_SCHEMA_PATH } from '../../routes';
|
import { DOCS_PREFIX, ENGINE_SCHEMA_PATH } from '../../routes';
|
||||||
|
|
|
@ -26,7 +26,7 @@ import {
|
||||||
EuiText,
|
EuiText,
|
||||||
OnTimeChangeProps,
|
OnTimeChangeProps,
|
||||||
} from '@elastic/eui';
|
} from '@elastic/eui';
|
||||||
import { FormattedDate, FormattedMessage } from 'react-intl';
|
import { FormattedMessage, FormattedDate } from '@kbn/i18n/react';
|
||||||
import { datemathToEpochMillis } from '../../../../../../../utils/datemath';
|
import { datemathToEpochMillis } from '../../../../../../../utils/datemath';
|
||||||
import { SnapshotMetricType } from '../../../../../../../../common/inventory_models/types';
|
import { SnapshotMetricType } from '../../../../../../../../common/inventory_models/types';
|
||||||
import { withTheme } from '../../../../../../../../../../../src/plugins/kibana_react/common';
|
import { withTheme } from '../../../../../../../../../../../src/plugins/kibana_react/common';
|
||||||
|
|
|
@ -18,7 +18,7 @@ import {
|
||||||
import { i18n } from '@kbn/i18n';
|
import { i18n } from '@kbn/i18n';
|
||||||
import { first } from 'lodash';
|
import { first } from 'lodash';
|
||||||
import React, { useCallback, useMemo, useState } from 'react';
|
import React, { useCallback, useMemo, useState } from 'react';
|
||||||
import { FormattedMessage } from 'react-intl';
|
import { FormattedMessage } from '@kbn/i18n/react';
|
||||||
|
|
||||||
interface Row {
|
interface Row {
|
||||||
name: string;
|
name: string;
|
||||||
|
|
|
@ -9,7 +9,7 @@ import useObservable from 'react-use/lib/useObservable';
|
||||||
import mockAnnotations from '../annotations_table/__mocks__/mock_annotations.json';
|
import mockAnnotations from '../annotations_table/__mocks__/mock_annotations.json';
|
||||||
import React from 'react';
|
import React from 'react';
|
||||||
import { fireEvent, render, screen, waitFor } from '@testing-library/react';
|
import { fireEvent, render, screen, waitFor } from '@testing-library/react';
|
||||||
import { IntlProvider } from 'react-intl';
|
import { __IntlProvider as IntlProvider } from '@kbn/i18n/react';
|
||||||
|
|
||||||
import { Annotation } from '../../../../../common/types/annotations';
|
import { Annotation } from '../../../../../common/types/annotations';
|
||||||
import { AnnotationUpdatesService } from '../../../services/annotations_service';
|
import { AnnotationUpdatesService } from '../../../services/annotations_service';
|
||||||
|
|
|
@ -8,7 +8,7 @@
|
||||||
import React from 'react';
|
import React from 'react';
|
||||||
import { render, waitFor, screen } from '@testing-library/react';
|
import { render, waitFor, screen } from '@testing-library/react';
|
||||||
|
|
||||||
import { IntlProvider } from 'react-intl';
|
import { __IntlProvider as IntlProvider } from '@kbn/i18n/react';
|
||||||
|
|
||||||
import euiThemeLight from '@elastic/eui/dist/eui_theme_light.json';
|
import euiThemeLight from '@elastic/eui/dist/eui_theme_light.json';
|
||||||
|
|
||||||
|
|
|
@ -8,7 +8,7 @@
|
||||||
import React from 'react';
|
import React from 'react';
|
||||||
import { render, fireEvent, waitFor, screen } from '@testing-library/react';
|
import { render, fireEvent, waitFor, screen } from '@testing-library/react';
|
||||||
|
|
||||||
import { IntlProvider } from 'react-intl';
|
import { __IntlProvider as IntlProvider } from '@kbn/i18n/react';
|
||||||
|
|
||||||
import {
|
import {
|
||||||
getIndexPatternAndSavedSearch,
|
getIndexPatternAndSavedSearch,
|
||||||
|
|
|
@ -6,7 +6,7 @@
|
||||||
*/
|
*/
|
||||||
|
|
||||||
import React, { ComponentType } from 'react';
|
import React, { ComponentType } from 'react';
|
||||||
import { IntlProvider } from 'react-intl';
|
import { __IntlProvider as IntlProvider } from '@kbn/i18n/react';
|
||||||
import { Observable } from 'rxjs';
|
import { Observable } from 'rxjs';
|
||||||
import { CoreStart } from 'src/core/public';
|
import { CoreStart } from 'src/core/public';
|
||||||
import { EuiThemeProvider } from '../../../../../../../../src/plugins/kibana_react/common';
|
import { EuiThemeProvider } from '../../../../../../../../src/plugins/kibana_react/common';
|
||||||
|
|
|
@ -6,7 +6,7 @@
|
||||||
*/
|
*/
|
||||||
|
|
||||||
import React, { ComponentType, useEffect, useState } from 'react';
|
import React, { ComponentType, useEffect, useState } from 'react';
|
||||||
import { IntlProvider } from 'react-intl';
|
import { __IntlProvider as IntlProvider } from '@kbn/i18n/react';
|
||||||
import { Observable } from 'rxjs';
|
import { Observable } from 'rxjs';
|
||||||
import { CoreStart } from 'src/core/public';
|
import { CoreStart } from 'src/core/public';
|
||||||
import { text } from '@storybook/addon-knobs';
|
import { text } from '@storybook/addon-knobs';
|
||||||
|
|
|
@ -7,7 +7,7 @@
|
||||||
|
|
||||||
import { StoryContext } from '@storybook/react';
|
import { StoryContext } from '@storybook/react';
|
||||||
import React, { ComponentType } from 'react';
|
import React, { ComponentType } from 'react';
|
||||||
import { IntlProvider } from 'react-intl';
|
import { __IntlProvider as IntlProvider } from '@kbn/i18n/react';
|
||||||
import { MemoryRouter } from 'react-router-dom';
|
import { MemoryRouter } from 'react-router-dom';
|
||||||
import { AlertsPage } from '.';
|
import { AlertsPage } from '.';
|
||||||
import { HttpSetup } from '../../../../../../src/core/public';
|
import { HttpSetup } from '../../../../../../src/core/public';
|
||||||
|
|
|
@ -8,7 +8,7 @@
|
||||||
import { render as testLibRender } from '@testing-library/react';
|
import { render as testLibRender } from '@testing-library/react';
|
||||||
import { AppMountParameters, CoreStart } from 'kibana/public';
|
import { AppMountParameters, CoreStart } from 'kibana/public';
|
||||||
import React from 'react';
|
import React from 'react';
|
||||||
import { IntlProvider } from 'react-intl';
|
import { __IntlProvider as IntlProvider } from '@kbn/i18n/react';
|
||||||
import { of } from 'rxjs';
|
import { of } from 'rxjs';
|
||||||
import {
|
import {
|
||||||
KibanaContextProvider,
|
KibanaContextProvider,
|
||||||
|
|
|
@ -7,7 +7,7 @@
|
||||||
|
|
||||||
import { mount } from 'enzyme';
|
import { mount } from 'enzyme';
|
||||||
import React from 'react';
|
import React from 'react';
|
||||||
import { IntlProvider } from 'react-intl';
|
import { __IntlProvider as IntlProvider } from '@kbn/i18n/react';
|
||||||
import { coreMock } from '../../../../../src/core/public/mocks';
|
import { coreMock } from '../../../../../src/core/public/mocks';
|
||||||
import { BaseParams } from '../../common/types';
|
import { BaseParams } from '../../common/types';
|
||||||
import { ReportingAPIClient } from '../lib/reporting_api_client';
|
import { ReportingAPIClient } from '../lib/reporting_api_client';
|
||||||
|
|
|
@ -7,7 +7,7 @@
|
||||||
|
|
||||||
import { i18n } from '@kbn/i18n';
|
import { i18n } from '@kbn/i18n';
|
||||||
import React, { useMemo, useContext, useCallback } from 'react';
|
import React, { useMemo, useContext, useCallback } from 'react';
|
||||||
import { FormattedMessage } from 'react-intl';
|
import { FormattedMessage } from '@kbn/i18n/react';
|
||||||
import { useDispatch } from 'react-redux';
|
import { useDispatch } from 'react-redux';
|
||||||
import { EuiI18nNumber } from '@elastic/eui';
|
import { EuiI18nNumber } from '@elastic/eui';
|
||||||
import { EventStats } from '../../../common/endpoint/types';
|
import { EventStats } from '../../../common/endpoint/types';
|
||||||
|
|
|
@ -6,7 +6,7 @@
|
||||||
*/
|
*/
|
||||||
|
|
||||||
import React, { FC } from 'react';
|
import React, { FC } from 'react';
|
||||||
import { IntlProvider } from 'react-intl';
|
import { __IntlProvider as IntlProvider } from '@kbn/i18n/react';
|
||||||
|
|
||||||
import '@testing-library/jest-dom/extend-expect';
|
import '@testing-library/jest-dom/extend-expect';
|
||||||
import { render, screen, waitFor } from '@testing-library/react';
|
import { render, screen, waitFor } from '@testing-library/react';
|
||||||
|
|
|
@ -7,7 +7,7 @@
|
||||||
|
|
||||||
import { cloneDeep } from 'lodash';
|
import { cloneDeep } from 'lodash';
|
||||||
import React from 'react';
|
import React from 'react';
|
||||||
import { IntlProvider } from 'react-intl';
|
import { __IntlProvider as IntlProvider } from '@kbn/i18n/react';
|
||||||
|
|
||||||
import { render, waitFor, screen } from '@testing-library/react';
|
import { render, waitFor, screen } from '@testing-library/react';
|
||||||
|
|
||||||
|
|
|
@ -14,7 +14,7 @@ import {
|
||||||
EuiText,
|
EuiText,
|
||||||
} from '@elastic/eui';
|
} from '@elastic/eui';
|
||||||
import React, { useCallback } from 'react';
|
import React, { useCallback } from 'react';
|
||||||
import { FormattedMessage } from 'react-intl';
|
import { FormattedMessage } from '@kbn/i18n/react';
|
||||||
import * as i18n from '../translations';
|
import * as i18n from '../translations';
|
||||||
import { useKibana } from '../../../../../common/lib/kibana';
|
import { useKibana } from '../../../../../common/lib/kibana';
|
||||||
import { useGetApplication } from '../use_get_application';
|
import { useGetApplication } from '../use_get_application';
|
||||||
|
|
|
@ -9,7 +9,7 @@ import React, { useEffect, useState } from 'react';
|
||||||
import { EuiFlexItem, EuiCard, EuiIcon, EuiFlexGrid, EuiSpacer } from '@elastic/eui';
|
import { EuiFlexItem, EuiCard, EuiIcon, EuiFlexGrid, EuiSpacer } from '@elastic/eui';
|
||||||
import { i18n } from '@kbn/i18n';
|
import { i18n } from '@kbn/i18n';
|
||||||
import { EuiToolTip } from '@elastic/eui';
|
import { EuiToolTip } from '@elastic/eui';
|
||||||
import { FormattedMessage } from 'react-intl';
|
import { FormattedMessage } from '@kbn/i18n/react';
|
||||||
import { ActionType, ActionTypeIndex, ActionTypeRegistryContract } from '../../../types';
|
import { ActionType, ActionTypeIndex, ActionTypeRegistryContract } from '../../../types';
|
||||||
import { loadActionTypes } from '../../lib/action_connector_api';
|
import { loadActionTypes } from '../../lib/action_connector_api';
|
||||||
import { actionTypeCompare } from '../../lib/action_type_compare';
|
import { actionTypeCompare } from '../../lib/action_type_compare';
|
||||||
|
|
Loading…
Reference in a new issue