diff --git a/packages/kbn-i18n/src/react/__snapshots__/inject_i18n_provider.test.tsx.snap b/packages/kbn-i18n/src/react/__snapshots__/inject_i18n_provider.test.tsx.snap index 1bd4c1aeda6b3..df3ea6450d0be 100644 --- a/packages/kbn-i18n/src/react/__snapshots__/inject_i18n_provider.test.tsx.snap +++ b/packages/kbn-i18n/src/react/__snapshots__/inject_i18n_provider.test.tsx.snap @@ -133,7 +133,7 @@ Object { "messages": Object {}, "now": [Function], "onError": [Function], - "textComponent": "span", + "textComponent": Symbol(react.fragment), "timeZone": null, } `; diff --git a/packages/kbn-i18n/src/react/__snapshots__/provider.test.tsx.snap b/packages/kbn-i18n/src/react/__snapshots__/provider.test.tsx.snap index 3929cd16a0c58..0ce4cf1a77476 100644 --- a/packages/kbn-i18n/src/react/__snapshots__/provider.test.tsx.snap +++ b/packages/kbn-i18n/src/react/__snapshots__/provider.test.tsx.snap @@ -133,7 +133,7 @@ Object { "messages": Object {}, "now": [Function], "onError": [Function], - "textComponent": "span", + "textComponent": Symbol(react.fragment), "timeZone": null, } `; diff --git a/packages/kbn-i18n/src/react/provider.tsx b/packages/kbn-i18n/src/react/provider.tsx index adeef0dbc21b9..07afc3b7930d3 100644 --- a/packages/kbn-i18n/src/react/provider.tsx +++ b/packages/kbn-i18n/src/react/provider.tsx @@ -43,6 +43,7 @@ export class I18nProvider extends React.PureComponent { defaultLocale={i18n.getDefaultLocale()} formats={i18n.getFormats()} defaultFormats={i18n.getFormats()} + textComponent={React.Fragment} > {children} diff --git a/src/core_plugins/input_control_vis/public/components/editor/__snapshots__/list_control_editor.test.js.snap b/src/core_plugins/input_control_vis/public/components/editor/__snapshots__/list_control_editor.test.js.snap index bae4d46bfbdca..e05bfac6fd803 100644 --- a/src/core_plugins/input_control_vis/public/components/editor/__snapshots__/list_control_editor.test.js.snap +++ b/src/core_plugins/input_control_vis/public/components/editor/__snapshots__/list_control_editor.test.js.snap @@ -19,14 +19,26 @@ exports[`renders dynamic options should display disabled dynamic options with to describedByIds={Array []} fullWidth={false} hasEmptyLabelSpace={false} - helpText="Allow multiple selection" + helpText={ + + } id="multiselect-0" key="multiselect" > + } onChange={[Function]} /> @@ -34,7 +46,13 @@ exports[`renders dynamic options should display disabled dynamic options with to describedByIds={Array []} fullWidth={false} hasEmptyLabelSpace={false} - helpText="Only available for \\"string\\" fields" + helpText={ + + } id="dynamicOptions-0" key="dynamicOptions" > @@ -42,7 +60,13 @@ exports[`renders dynamic options should display disabled dynamic options with to checked={true} data-test-subj="listControlDynamicOptionsSwitch" disabled={true} - label="Dynamic Options" + label={ + + } onChange={[Function]} /> @@ -50,10 +74,22 @@ exports[`renders dynamic options should display disabled dynamic options with to describedByIds={Array []} fullWidth={false} hasEmptyLabelSpace={false} - helpText="Number of options" + helpText={ + + } id="size-0" key="size" - label="Size" + label={ + + } > + } id="multiselect-0" key="multiselect" > + } onChange={[Function]} /> @@ -102,7 +150,13 @@ exports[`renders dynamic options should display dynamic options for string field describedByIds={Array []} fullWidth={false} hasEmptyLabelSpace={false} - helpText="Update options in response to user input" + helpText={ + + } id="dynamicOptions-0" key="dynamicOptions" > @@ -110,7 +164,13 @@ exports[`renders dynamic options should display dynamic options for string field checked={true} data-test-subj="listControlDynamicOptionsSwitch" disabled={false} - label="Dynamic Options" + label={ + + } onChange={[Function]} /> @@ -136,14 +196,26 @@ exports[`renders dynamic options should display size field when dynamic options describedByIds={Array []} fullWidth={false} hasEmptyLabelSpace={false} - helpText="Allow multiple selection" + helpText={ + + } id="multiselect-0" key="multiselect" > + } onChange={[Function]} /> @@ -151,7 +223,13 @@ exports[`renders dynamic options should display size field when dynamic options describedByIds={Array []} fullWidth={false} hasEmptyLabelSpace={false} - helpText="Update options in response to user input" + helpText={ + + } id="dynamicOptions-0" key="dynamicOptions" > @@ -159,7 +237,13 @@ exports[`renders dynamic options should display size field when dynamic options checked={false} data-test-subj="listControlDynamicOptionsSwitch" disabled={false} - label="Dynamic Options" + label={ + + } onChange={[Function]} /> @@ -167,10 +251,22 @@ exports[`renders dynamic options should display size field when dynamic options describedByIds={Array []} fullWidth={false} hasEmptyLabelSpace={false} - helpText="Number of options" + helpText={ + + } id="size-0" key="size" - label="Size" + label={ + + } > + } id="parentSelect-0" key="parentSelect" - label="Parent control" + label={ + + } > + } id="multiselect-0" key="multiselect" > + } onChange={[Function]} /> @@ -252,7 +372,13 @@ exports[`renders should display chaining input when parents are provided 1`] = ` describedByIds={Array []} fullWidth={false} hasEmptyLabelSpace={false} - helpText="Update options in response to user input" + helpText={ + + } id="dynamicOptions-0" key="dynamicOptions" > @@ -260,7 +386,13 @@ exports[`renders should display chaining input when parents are provided 1`] = ` checked={false} data-test-subj="listControlDynamicOptionsSwitch" disabled={false} - label="Dynamic Options" + label={ + + } onChange={[Function]} /> @@ -268,10 +400,22 @@ exports[`renders should display chaining input when parents are provided 1`] = ` describedByIds={Array []} fullWidth={false} hasEmptyLabelSpace={false} - helpText="Number of options" + helpText={ + + } id="size-0" key="size" - label="Size" + label={ + + } > } > 0) { const parentCandidatesOptions = [ { value: '', text: '' }, @@ -112,14 +111,11 @@ class ListControlEditorUi extends Component { options.push( } + helpText={} key="parentSelect" > } > } checked={this.props.controlParams.options.multiselect} onChange={(evt) => { this.props.handleCheckboxOptionChange(this.props.controlIndex, 'multiselect', evt); @@ -157,14 +150,17 @@ class ListControlEditorUi extends Component { ); const dynamicOptionsHelpText = this.state.isStringField - ? intl.formatMessage({ - id: 'inputControl.editor.listControl.dynamicOptions.updateDescription', - defaultMessage: 'Update options in response to user input' - }) - : intl.formatMessage({ - id: 'inputControl.editor.listControl.dynamicOptions.stringFieldDescription', - defaultMessage: 'Only available for "string" fields' - }); + ? ( + + ) : ( + + ); options.push( } checked={this.props.controlParams.options.dynamicOptions} onChange={(evt) => { this.props.handleCheckboxOptionChange(this.props.controlIndex, 'dynamicOptions', evt); @@ -191,15 +184,9 @@ class ListControlEditorUi extends Component { options.push( } key="size" - helpText={intl.formatMessage({ - id: 'inputControl.editor.listControl.sizeDescription', - defaultMessage: 'Number of options' - })} + helpText={} > { size: 5, } }; - const component = shallowWithIntl( { { value: '1', text: 'fieldA' }, { value: '2', text: 'fieldB' } ]; - const component = shallowWithIntl( { size: 5, } }; - const component = shallowWithIntl( { size: 5, } }; - const component = shallowWithIntl( { size: 5, } }; - const component = shallowWithIntl( { }); test('handleCheckboxOptionChange - multiselect', async () => { - const component = mountWithIntl( { }); test('handleNumberOptionChange - size', async () => { - const component = mountWithIntl( } @@ -126,7 +126,7 @@ exports[`Header should render without including system indices 1`] = ` label={ } diff --git a/src/core_plugins/kibana/public/management/sections/indices/create_index_pattern_wizard/components/header/header.js b/src/core_plugins/kibana/public/management/sections/indices/create_index_pattern_wizard/components/header/header.js index 0c7ba277ff6ab..c6c749d400bab 100644 --- a/src/core_plugins/kibana/public/management/sections/indices/create_index_pattern_wizard/components/header/header.js +++ b/src/core_plugins/kibana/public/management/sections/indices/create_index_pattern_wizard/components/header/header.js @@ -44,7 +44,6 @@ export const Header = ({ defaultMessage="Create index pattern" /> - @@ -62,7 +61,7 @@ export const Header = ({ } id="checkboxShowSystemIndices" diff --git a/src/core_plugins/kibana/public/management/sections/indices/create_index_pattern_wizard/components/step_time_field/components/advanced_options/advanced_options.js b/src/core_plugins/kibana/public/management/sections/indices/create_index_pattern_wizard/components/step_time_field/components/advanced_options/advanced_options.js index 9ad692baf0e94..3126dcf5430f6 100644 --- a/src/core_plugins/kibana/public/management/sections/indices/create_index_pattern_wizard/components/step_time_field/components/advanced_options/advanced_options.js +++ b/src/core_plugins/kibana/public/management/sections/indices/create_index_pattern_wizard/components/step_time_field/components/advanced_options/advanced_options.js @@ -61,17 +61,15 @@ export const AdvancedOptionsComponent = ({ { isVisible ? - } + label={} + helpText={} > + } >

- Painless + , } } diff --git a/src/core_plugins/kibana/public/management/sections/indices/edit_index_pattern/scripted_fields_table/components/call_outs/__tests__/call_outs.test.js b/src/core_plugins/kibana/public/management/sections/indices/edit_index_pattern/scripted_fields_table/components/call_outs/__tests__/call_outs.test.js index 0fba18be79cff..2553400cbdd32 100644 --- a/src/core_plugins/kibana/public/management/sections/indices/edit_index_pattern/scripted_fields_table/components/call_outs/__tests__/call_outs.test.js +++ b/src/core_plugins/kibana/public/management/sections/indices/edit_index_pattern/scripted_fields_table/components/call_outs/__tests__/call_outs.test.js @@ -18,14 +18,14 @@ */ import React from 'react'; -import { shallowWithIntl } from 'test_utils/enzyme_helpers'; +import { shallow } from 'enzyme'; -import { CallOutsComponent } from '../call_outs'; +import { CallOuts } from '../call_outs'; describe('CallOuts', () => { it('should render normally', async () => { - const component = shallowWithIntl( - @@ -35,8 +35,8 @@ describe('CallOuts', () => { }); it('should render without any call outs', async () => { - const component = shallowWithIntl( - diff --git a/src/core_plugins/kibana/public/management/sections/indices/edit_index_pattern/scripted_fields_table/components/call_outs/call_outs.js b/src/core_plugins/kibana/public/management/sections/indices/edit_index_pattern/scripted_fields_table/components/call_outs/call_outs.js index b4ddf87bede12..e4271ec4811f3 100644 --- a/src/core_plugins/kibana/public/management/sections/indices/edit_index_pattern/scripted_fields_table/components/call_outs/call_outs.js +++ b/src/core_plugins/kibana/public/management/sections/indices/edit_index_pattern/scripted_fields_table/components/call_outs/call_outs.js @@ -25,12 +25,11 @@ import { EuiSpacer, } from '@elastic/eui'; -import { injectI18n, FormattedMessage } from '@kbn/i18n/react'; +import { FormattedMessage } from '@kbn/i18n/react'; -export const CallOutsComponent = ({ +export const CallOuts = ({ deprecatedLangsInUse, painlessDocLink, - intl }) => { if (!deprecatedLangsInUse.length) { return null; @@ -39,9 +38,10 @@ export const CallOutsComponent = ({ return (

} color="danger" iconType="cross" > @@ -54,8 +54,12 @@ export const CallOutsComponent = ({ deprecatedLangsInUse: deprecatedLangsInUse.join(', '), link: ( - Painless - ) + + + ) }} />

@@ -64,5 +68,3 @@ export const CallOutsComponent = ({
); }; - -export const CallOuts = injectI18n(CallOutsComponent); diff --git a/src/core_plugins/kibana/public/management/sections/indices/edit_index_pattern/source_filters_table/__tests__/__snapshots__/source_filters_table.test.js.snap b/src/core_plugins/kibana/public/management/sections/indices/edit_index_pattern/source_filters_table/__tests__/__snapshots__/source_filters_table.test.js.snap index 3452fd16456e7..0717c5a68aaf4 100644 --- a/src/core_plugins/kibana/public/management/sections/indices/edit_index_pattern/source_filters_table/__tests__/__snapshots__/source_filters_table.test.js.snap +++ b/src/core_plugins/kibana/public/management/sections/indices/edit_index_pattern/source_filters_table/__tests__/__snapshots__/source_filters_table.test.js.snap @@ -234,72 +234,69 @@ exports[`SourceFiltersTable should should a loading indicator when saving 1`] = `; exports[`SourceFiltersTable should show a delete modal 1`] = ` -Object { - "component":
-
- - - +
+ + +
+ + + } + confirmButtonText={ + + } + onCancel={[Function]} + onConfirm={[Function]} + title={ + } - saveFilter={[Function]} /> - - - - , - "i18n": Array [ - Array [ - Object { - "defaultMessage": "Delete source filter '{value}'?", - "id": "kbn.management.editIndexPattern.source.deleteSourceFilterLabel", - }, - Object { - "value": "tim*", - }, - ], - Array [ - Object { - "defaultMessage": "Cancel", - "id": "kbn.management.editIndexPattern.source.deleteFilter.cancelButton", - }, - ], - Array [ - Object { - "defaultMessage": "Delete", - "id": "kbn.management.editIndexPattern.source.deleteFilter.deleteButton", - }, - ], - ], -} + + `; exports[`SourceFiltersTable should update a filter 1`] = ` diff --git a/src/core_plugins/kibana/public/management/sections/indices/edit_index_pattern/source_filters_table/__tests__/source_filters_table.test.js b/src/core_plugins/kibana/public/management/sections/indices/edit_index_pattern/source_filters_table/__tests__/source_filters_table.test.js index d6047cb66d4e2..c2cda7f41b74c 100644 --- a/src/core_plugins/kibana/public/management/sections/indices/edit_index_pattern/source_filters_table/__tests__/source_filters_table.test.js +++ b/src/core_plugins/kibana/public/management/sections/indices/edit_index_pattern/source_filters_table/__tests__/source_filters_table.test.js @@ -18,9 +18,9 @@ */ import React from 'react'; -import { shallowWithIntl, intl } from 'test_utils/enzyme_helpers'; +import { shallow } from 'enzyme'; -import { SourceFiltersTableComponent } from '../source_filters_table'; +import { SourceFiltersTable } from '../source_filters_table'; jest.mock('@elastic/eui', () => ({ EuiButton: 'eui-button', @@ -57,11 +57,9 @@ const indexPattern = { describe('SourceFiltersTable', () => { - afterEach(() => intl.formatMessage.mockClear()); - it('should render normally', async () => { - const component = shallowWithIntl( - {}} /> @@ -71,8 +69,8 @@ describe('SourceFiltersTable', () => { }); it('should filter based on the query bar', async () => { - const component = shallowWithIntl( - {}} /> @@ -83,8 +81,8 @@ describe('SourceFiltersTable', () => { }); it('should should a loading indicator when saving', async () => { - const component = shallowWithIntl( - { }); it('should show a delete modal', async () => { - const component = shallowWithIntl( - { component.instance().startDeleteFilter({ value: 'tim*' }); component.update(); // We are not calling `.setState` directly so we need to re-render - expect({ - component, - i18n: intl.formatMessage.mock.calls, - }).toMatchSnapshot(); + expect(component).toMatchSnapshot(); }); it('should remove a filter', async () => { const save = jest.fn(); - const component = shallowWithIntl( - { it('should add a filter', async () => { const save = jest.fn(); - const component = shallowWithIntl( - { it('should update a filter', async () => { const save = jest.fn(); - const component = shallowWithIntl( - @@ -82,7 +82,7 @@ exports[`AddFilter should render normally 1`] = ` > diff --git a/src/core_plugins/kibana/public/management/sections/indices/edit_index_pattern/source_filters_table/components/add_filter/add_filter.js b/src/core_plugins/kibana/public/management/sections/indices/edit_index_pattern/source_filters_table/components/add_filter/add_filter.js index 223f40e1274f6..47084161a484a 100644 --- a/src/core_plugins/kibana/public/management/sections/indices/edit_index_pattern/source_filters_table/components/add_filter/add_filter.js +++ b/src/core_plugins/kibana/public/management/sections/indices/edit_index_pattern/source_filters_table/components/add_filter/add_filter.js @@ -69,7 +69,7 @@ export class AddFilterComponent extends Component { isDisabled={filter.length === 0} onClick={this.onAddFilter} > - + diff --git a/src/core_plugins/kibana/public/management/sections/indices/edit_index_pattern/source_filters_table/source_filters_table.js b/src/core_plugins/kibana/public/management/sections/indices/edit_index_pattern/source_filters_table/source_filters_table.js index 2bf6eb9325da6..8ae3ef7e9fd22 100644 --- a/src/core_plugins/kibana/public/management/sections/indices/edit_index_pattern/source_filters_table/source_filters_table.js +++ b/src/core_plugins/kibana/public/management/sections/indices/edit_index_pattern/source_filters_table/source_filters_table.js @@ -31,9 +31,9 @@ import { import { Table } from './components/table'; import { Header } from './components/header'; import { AddFilter } from './components/add_filter'; -import { injectI18n } from '@kbn/i18n/react'; +import { FormattedMessage } from '@kbn/i18n/react'; -export class SourceFiltersTableComponent extends Component { +export class SourceFiltersTable extends Component { static propTypes = { indexPattern: PropTypes.object.isRequired, filterFilter: PropTypes.string, @@ -154,7 +154,6 @@ export class SourceFiltersTableComponent extends Component { renderDeleteConfirmationModal() { const { filterToDelete } = this.state; - const { intl } = this.props; if (!filterToDelete) { return null; @@ -163,15 +162,23 @@ export class SourceFiltersTableComponent extends Component { return ( } onCancel={this.hideDeleteConfirmationModal} onConfirm={this.deleteFilter} - cancelButtonText={intl.formatMessage({ - id: 'kbn.management.editIndexPattern.source.deleteFilter.cancelButton', defaultMessage: 'Cancel' })} - confirmButtonText={intl.formatMessage({ - id: 'kbn.management.editIndexPattern.source.deleteFilter.deleteButton', defaultMessage: 'Delete' })} + cancelButtonText={} + confirmButtonText={} defaultFocusedButton={EUI_MODAL_CONFIRM_BUTTON} /> @@ -204,5 +211,3 @@ export class SourceFiltersTableComponent extends Component { ); } } - -export const SourceFiltersTable = injectI18n(SourceFiltersTableComponent); diff --git a/src/ui/public/field_editor/__snapshots__/field_editor.test.js.snap b/src/ui/public/field_editor/__snapshots__/field_editor.test.js.snap index a79c70b4db52c..38bc79e4bab3f 100644 --- a/src/ui/public/field_editor/__snapshots__/field_editor.test.js.snap +++ b/src/ui/public/field_editor/__snapshots__/field_editor.test.js.snap @@ -862,7 +862,11 @@ exports[`FieldEditor should show deprecated lang warning 1`] = ` href="(docLink for scriptedFields.painless)" target="_window" > - Painless + , } } diff --git a/src/ui/public/field_editor/components/field_format_editor/editors/static_lookup/__snapshots__/static_lookup.test.js.snap b/src/ui/public/field_editor/components/field_format_editor/editors/static_lookup/__snapshots__/static_lookup.test.js.snap index 51d0d13d8b222..31ac15c41eb8e 100644 --- a/src/ui/public/field_editor/components/field_format_editor/editors/static_lookup/__snapshots__/static_lookup.test.js.snap +++ b/src/ui/public/field_editor/components/field_format_editor/editors/static_lookup/__snapshots__/static_lookup.test.js.snap @@ -77,7 +77,13 @@ exports[`StaticLookupFormatEditorComponent should render multiple lookup entries describedByIds={Array []} fullWidth={false} hasEmptyLabelSpace={false} - label="Value for unknown key" + label={ + + } > + } > } > @@ -94,7 +94,11 @@ exports[`UrlFormatEditor should render label template help 1`] = ` onClick={[Function]} type="button" > - Label template help + } isInvalid={false} @@ -181,7 +185,7 @@ exports[`UrlFormatEditor should render normally 1`] = ` > @@ -215,7 +219,11 @@ exports[`UrlFormatEditor should render normally 1`] = ` onClick={[Function]} type="button" > - Label template help + } isInvalid={false} @@ -302,7 +310,7 @@ exports[`UrlFormatEditor should render url template help 1`] = ` > @@ -336,7 +344,11 @@ exports[`UrlFormatEditor should render url template help 1`] = ` onClick={[Function]} type="button" > - Label template help + } isInvalid={false} diff --git a/src/ui/public/field_editor/components/field_format_editor/editors/url/url.js b/src/ui/public/field_editor/components/field_format_editor/editors/url/url.js index 48d8479db4409..000328e252b77 100644 --- a/src/ui/public/field_editor/components/field_format_editor/editors/url/url.js +++ b/src/ui/public/field_editor/components/field_format_editor/editors/url/url.js @@ -158,10 +158,10 @@ export class UrlFormatEditor extends DefaultFormatEditor { ) : null} } + label={} helpText={( - + )} isInvalid={!!error} error={error} @@ -176,8 +176,15 @@ export class UrlFormatEditor extends DefaultFormatEditor { } - helpText={(Label template help)} + label={} + helpText={( + + + + )} isInvalid={!!error} error={error} > diff --git a/src/ui/public/field_editor/components/field_format_editor/samples/__snapshots__/samples.test.js.snap b/src/ui/public/field_editor/components/field_format_editor/samples/__snapshots__/samples.test.js.snap index b713b77cd8a6c..812fe2650c513 100644 --- a/src/ui/public/field_editor/components/field_format_editor/samples/__snapshots__/samples.test.js.snap +++ b/src/ui/public/field_editor/components/field_format_editor/samples/__snapshots__/samples.test.js.snap @@ -5,7 +5,13 @@ exports[`FormatEditorSamples should render normally 1`] = ` describedByIds={Array []} fullWidth={false} hasEmptyLabelSpace={false} - label="Samples" + label={ + + } > } > + } >

+ } >

{ return isVisible ? ( } color="danger" iconType="alert" > @@ -50,6 +49,4 @@ export const ScriptingDisabledCallOutComponent = ({ ) : null; }; -ScriptingDisabledCallOutComponent.displayName = 'ScriptingDisabledCallOut'; - -export const ScriptingDisabledCallOut = injectI18n(ScriptingDisabledCallOutComponent); +ScriptingDisabledCallOut.displayName = 'ScriptingDisabledCallOut'; diff --git a/src/ui/public/field_editor/components/scripting_call_outs/disabled_call_out.test.js b/src/ui/public/field_editor/components/scripting_call_outs/disabled_call_out.test.js index a80da582e6849..d1b7ee9d7709f 100644 --- a/src/ui/public/field_editor/components/scripting_call_outs/disabled_call_out.test.js +++ b/src/ui/public/field_editor/components/scripting_call_outs/disabled_call_out.test.js @@ -18,14 +18,14 @@ */ import React from 'react'; -import { shallowWithIntl } from 'test_utils/enzyme_helpers'; +import { shallow } from 'enzyme'; -import { ScriptingDisabledCallOutComponent } from './disabled_call_out'; +import { ScriptingDisabledCallOut } from './disabled_call_out'; describe('ScriptingDisabledCallOut', () => { it('should render normally', async () => { - const component = shallowWithIntl( - ); @@ -34,8 +34,8 @@ describe('ScriptingDisabledCallOut', () => { }); it('should render nothing if not visible', async () => { - const component = shallowWithIntl( - + const component = shallow( + ); expect(component).toMatchSnapshot(); diff --git a/src/ui/public/field_editor/components/scripting_call_outs/warning_call_out.js b/src/ui/public/field_editor/components/scripting_call_outs/warning_call_out.js index dfcd37eed9ebc..98a101a8de826 100644 --- a/src/ui/public/field_editor/components/scripting_call_outs/warning_call_out.js +++ b/src/ui/public/field_editor/components/scripting_call_outs/warning_call_out.js @@ -27,16 +27,15 @@ import { EuiSpacer, } from '@elastic/eui'; -import { injectI18n, FormattedMessage } from '@kbn/i18n/react'; +import { FormattedMessage } from '@kbn/i18n/react'; -export const ScriptingWarningCallOutComponent = ({ +export const ScriptingWarningCallOut = ({ isVisible = false, - intl, }) => { return isVisible ? ( } color="warning" iconType="alert" > @@ -77,6 +76,4 @@ export const ScriptingWarningCallOutComponent = ({ ) : null; }; -ScriptingWarningCallOutComponent.displayName = 'ScriptingWarningCallOut'; - -export const ScriptingWarningCallOut = injectI18n(ScriptingWarningCallOutComponent); +ScriptingWarningCallOut.displayName = 'ScriptingWarningCallOut'; diff --git a/src/ui/public/field_editor/components/scripting_call_outs/warning_call_out.test.js b/src/ui/public/field_editor/components/scripting_call_outs/warning_call_out.test.js index 51e359d87cdbc..d3bb31a142689 100644 --- a/src/ui/public/field_editor/components/scripting_call_outs/warning_call_out.test.js +++ b/src/ui/public/field_editor/components/scripting_call_outs/warning_call_out.test.js @@ -18,9 +18,9 @@ */ import React from 'react'; -import { shallowWithIntl } from 'test_utils/enzyme_helpers'; +import { shallow } from 'enzyme'; -import { ScriptingWarningCallOutComponent } from './warning_call_out'; +import { ScriptingWarningCallOut } from './warning_call_out'; jest.mock('ui/documentation_links', () => ({ getDocLink: (doc) => `(docLink for ${doc})`, @@ -28,8 +28,8 @@ jest.mock('ui/documentation_links', () => ({ describe('ScriptingWarningCallOut', () => { it('should render normally', async () => { - const component = shallowWithIntl( - ); @@ -38,8 +38,8 @@ describe('ScriptingWarningCallOut', () => { }); it('should render nothing if not visible', async () => { - const component = shallowWithIntl( - + const component = shallow( + ); expect(component).toMatchSnapshot(); diff --git a/src/ui/public/field_editor/components/scripting_help/scripting_syntax.js b/src/ui/public/field_editor/components/scripting_help/scripting_syntax.js index 8b0a1229010dd..41b58689c0a80 100644 --- a/src/ui/public/field_editor/components/scripting_help/scripting_syntax.js +++ b/src/ui/public/field_editor/components/scripting_help/scripting_syntax.js @@ -35,7 +35,7 @@ export const ScriptingSyntax = () => (

- +

( target="_window" href={getDocLink('scriptedFields.painless')} > - Painless + + {' '} ) }} @@ -56,7 +57,7 @@ export const ScriptingSyntax = () => (

- +

diff --git a/src/ui/public/field_editor/field_editor.js b/src/ui/public/field_editor/field_editor.js index ecd8e744d603b..69ef86b11eedf 100644 --- a/src/ui/public/field_editor/field_editor.js +++ b/src/ui/public/field_editor/field_editor.js @@ -291,7 +291,10 @@ export class FieldEditorComponent extends PureComponent { language: {field.lang}, painlessLink: ( - Painless + ) }} diff --git a/x-pack/plugins/index_management/public/sections/index_list/components/detail_panel/detail_panel.js b/x-pack/plugins/index_management/public/sections/index_list/components/detail_panel/detail_panel.js index eba3e6c75d56b..0f4875b3dc6a5 100644 --- a/x-pack/plugins/index_management/public/sections/index_list/components/detail_panel/detail_panel.js +++ b/x-pack/plugins/index_management/public/sections/index_list/components/detail_panel/detail_panel.js @@ -5,7 +5,7 @@ */ import React, { Component } from 'react'; -import { injectI18n } from '@kbn/i18n/react'; +import { FormattedMessage } from '@kbn/i18n/react'; import { Route } from 'react-router-dom'; import { ShowJson } from './show_json'; import { Summary } from './summary'; @@ -30,7 +30,7 @@ function capitalizeFirstLetter(string) { } const tabs = ['Summary', 'Settings', 'Mapping', 'Stats', 'Edit settings']; -export class DetailPanelUi extends Component { +export class DetailPanel extends Component { renderTabs() { const { panelType, indexName, indexStatus, openDetailPanel } = this.props; @@ -51,7 +51,7 @@ export class DetailPanelUi extends Component { } render() { - const { panelType, indexName, closeDetailPanel, intl } = this.props; + const { panelType, indexName, closeDetailPanel } = this.props; if (!panelType) { return null; } @@ -95,10 +95,7 @@ export class DetailPanelUi extends Component { anchorPosition="upRight" detailPanel={true} iconType="arrowUp" - label={intl.formatMessage({ - id: 'xpack.idxMgmt.detailPanel.manageContextMenuLabel', - defaultMessage: 'Manage', - })} + label={} /> )} /> @@ -109,5 +106,3 @@ export class DetailPanelUi extends Component { ); } } - -export const DetailPanel = injectI18n(DetailPanelUi); \ No newline at end of file diff --git a/x-pack/plugins/index_management/public/sections/index_list/components/index_actions_context_menu/index_actions_context_menu.js b/x-pack/plugins/index_management/public/sections/index_list/components/index_actions_context_menu/index_actions_context_menu.js index 9c0a381a1d19c..31f06921fb11e 100644 --- a/x-pack/plugins/index_management/public/sections/index_list/components/index_actions_context_menu/index_actions_context_menu.js +++ b/x-pack/plugins/index_management/public/sections/index_list/components/index_actions_context_menu/index_actions_context_menu.js @@ -285,8 +285,8 @@ class IndexActionsContextMenuUi extends Component {

{' '} {entity}: @@ -377,8 +377,8 @@ class IndexActionsContextMenuUi extends Component {

{' '} {entity}: diff --git a/x-pack/plugins/index_management/public/sections/index_list/components/index_table/index_table.js b/x-pack/plugins/index_management/public/sections/index_list/components/index_table/index_table.js index 20dde2cbe7562..df501ef98ff32 100644 --- a/x-pack/plugins/index_management/public/sections/index_list/components/index_table/index_table.js +++ b/x-pack/plugins/index_management/public/sections/index_list/components/index_table/index_table.js @@ -284,12 +284,10 @@ export class IndexTableUi extends Component { id="checkboxShowSystemIndices" checked={showSystemIndices} onChange={event => showSystemIndicesChanged(event.target.checked)} - label={ - intl.formatMessage({ - id: 'xpack.idxMgmt.indexTable.systemIndicesSwitchLabel', - defaultMessage: 'Include system indices', - }) - } + label={} /> @@ -324,7 +322,12 @@ export class IndexTableUi extends Component { defaultMessage: 'Search', }) } - aria-label="Search indices" + aria-label={ + intl.formatMessage({ + id: 'xpack.idxMgmt.indexTable.systemIndicesSearchIndicesAriaLabel', + defaultMessage: 'Search indices', + }) + } />