diff --git a/package.json b/package.json index 5b5b123d2f076..4f2b41ad2a877 100644 --- a/package.json +++ b/package.json @@ -104,7 +104,7 @@ "@babel/register": "^7.5.5", "@elastic/charts": "^12.0.2", "@elastic/datemath": "5.0.2", - "@elastic/eui": "14.0.0", + "@elastic/eui": "14.2.0", "@elastic/filesaver": "1.1.2", "@elastic/good": "8.1.1-kibana2", "@elastic/numeral": "2.3.3", diff --git a/src/legacy/core_plugins/data/public/search/search_bar/components/saved_query_management/saved_query_management_component.tsx b/src/legacy/core_plugins/data/public/search/search_bar/components/saved_query_management/saved_query_management_component.tsx index 273d40a12246c..013941cb4ec95 100644 --- a/src/legacy/core_plugins/data/public/search/search_bar/components/saved_query_management/saved_query_management_component.tsx +++ b/src/legacy/core_plugins/data/public/search/search_bar/components/saved_query_management/saved_query_management_component.tsx @@ -113,7 +113,6 @@ export const SavedQueryManagementComponent: FunctionComponent = ({ const savedQueryPopoverButton = ( { @@ -164,7 +163,6 @@ export const SavedQueryManagementComponent: FunctionComponent = ({ { diff --git a/src/legacy/core_plugins/kibana/public/index.scss b/src/legacy/core_plugins/kibana/public/index.scss index 02a0dcd5a7c11..c8a66f6c3913b 100644 --- a/src/legacy/core_plugins/kibana/public/index.scss +++ b/src/legacy/core_plugins/kibana/public/index.scss @@ -1,11 +1,5 @@ @import 'src/legacy/ui/public/styles/styling_constants'; -// Temporary shim to help with EuiFormRow spacing -// Will move to EUI -.euiFormRow + .euiButton { - margin-top: $euiSize; -} - // Public UI styles @import 'src/legacy/ui/public/index'; diff --git a/src/legacy/core_plugins/kibana/public/management/sections/settings/components/field/__snapshots__/field.test.js.snap b/src/legacy/core_plugins/kibana/public/management/sections/settings/components/field/__snapshots__/field.test.js.snap index 8339ff292b57d..1a5039bbb96f8 100644 --- a/src/legacy/core_plugins/kibana/public/management/sections/settings/components/field/__snapshots__/field.test.js.snap +++ b/src/legacy/core_plugins/kibana/public/management/sections/settings/components/field/__snapshots__/field.test.js.snap @@ -1007,8 +1007,6 @@ exports[`Field for image setting should render as read only with help text if ov allowFullScreen={true} alt="image:test:setting" aria-label="image test setting" - fullScreenIconColor="light" - size="original" url="data:image/gif;base64,R0lGODlhAQABAIAAAP///wAAACH5BAEAAAAALAAAAAABAAEAAAICRAEAOw==" /> @@ -1270,8 +1268,6 @@ exports[`Field for image setting should render user value if there is user value allowFullScreen={true} alt="image:test:setting" aria-label="image test setting" - fullScreenIconColor="light" - size="original" url="data:image/gif;base64,R0lGODlhAQABAIAAAP///wAAACH5BAEAAAAALAAAAAABAAEAAAICRAEAOw==" /> diff --git a/src/legacy/ui/public/vis/editors/default/components/agg_select.tsx b/src/legacy/ui/public/vis/editors/default/components/agg_select.tsx index dbda4bc38103a..2934711b2357a 100644 --- a/src/legacy/ui/public/vis/editors/default/components/agg_select.tsx +++ b/src/legacy/ui/public/vis/editors/default/components/agg_select.tsx @@ -142,7 +142,7 @@ function DefaultEditorAggSelect({ isClearable={false} isInvalid={showValidation ? !isValid : false} fullWidth={true} - // compressed + compressed /> ); diff --git a/src/legacy/ui/public/vis/editors/default/controls/extended_bounds.tsx b/src/legacy/ui/public/vis/editors/default/controls/extended_bounds.tsx index 7ef9fddb3c090..ac102165ce7bb 100644 --- a/src/legacy/ui/public/vis/editors/default/controls/extended_bounds.tsx +++ b/src/legacy/ui/public/vis/editors/default/controls/extended_bounds.tsx @@ -19,7 +19,7 @@ import React, { useEffect, ChangeEvent } from 'react'; -import { EuiFieldNumber, EuiFlexGroup, EuiFlexItem, EuiFormRow, EuiText } from '@elastic/eui'; +import { EuiFieldNumber, EuiFlexGroup, EuiFlexItem, EuiFormRow } from '@elastic/eui'; import { i18n } from '@kbn/i18n'; import { isUndefined } from 'lodash'; import { AggParamEditorProps } from '..'; @@ -95,11 +95,7 @@ function ExtendedBoundsParamEditor({ fullWidth={true} isInvalid={showValidation ? !isValid : false} aria-label={minLabel} - prepend={ - - {minLabel} - - } + prepend={minLabel} compressed /> @@ -111,11 +107,7 @@ function ExtendedBoundsParamEditor({ fullWidth={true} isInvalid={showValidation ? !isValid : false} aria-label={maxLabel} - prepend={ - - {maxLabel} - - } + prepend={maxLabel} compressed /> diff --git a/src/legacy/ui/public/vis/editors/default/controls/field.tsx b/src/legacy/ui/public/vis/editors/default/controls/field.tsx index 6a4a787ac41d8..a96be3a14b7ef 100644 --- a/src/legacy/ui/public/vis/editors/default/controls/field.tsx +++ b/src/legacy/ui/public/vis/editors/default/controls/field.tsx @@ -110,7 +110,7 @@ function FieldParamEditor({ compressed > ( +export const CronDaily = ({ minute, minuteOptions, hour, hourOptions, onChange }) => ( - )} + label={ + + } fullWidth data-test-subj="cronFrequencyConfiguration" > @@ -54,20 +39,13 @@ export const CronDaily = ({ options={hourOptions} value={hour} aria-label={i18n.translate('esUi.cronEditor.cronDaily.hourSelectLabel', { - defaultMessage: 'Hour' + defaultMessage: 'Hour', })} onChange={e => onChange({ hour: e.target.value })} fullWidth - prepend={( - - - - - - )} + prepend={i18n.translate('esUi.cronEditor.cronDaily.fieldHour.textAtLabel', { + defaultMessage: 'At', + })} data-test-subj="cronFrequencyDailyHourSelect" /> @@ -77,17 +55,11 @@ export const CronDaily = ({ options={minuteOptions} value={minute} aria-label={i18n.translate('esUi.cronEditor.cronDaily.minuteSelectLabel', { - defaultMessage: 'Minute' + defaultMessage: 'Minute', })} onChange={e => onChange({ minute: e.target.value })} fullWidth - prepend={( - - - : - - - )} + prepend=":" data-test-subj="cronFrequencyDailyMinuteSelect" /> diff --git a/src/plugins/es_ui_shared/public/components/cron_editor/cron_editor.js b/src/plugins/es_ui_shared/public/components/cron_editor/cron_editor.js index 64d6405603dd7..576658882589f 100644 --- a/src/plugins/es_ui_shared/public/components/cron_editor/cron_editor.js +++ b/src/plugins/es_ui_shared/public/components/cron_editor/cron_editor.js @@ -21,12 +21,9 @@ import React, { Component, Fragment } from 'react'; import PropTypes from 'prop-types'; import { padLeft } from 'lodash'; import { FormattedMessage } from '@kbn/i18n/react'; +import { i18n } from '@kbn/i18n'; -import { - EuiSelect, - EuiText, - EuiFormRow, -} from '@elastic/eui'; +import { EuiSelect, EuiFormRow } from '@elastic/eui'; import { getOrdinalValue, @@ -81,25 +78,32 @@ const MONTH_OPTIONS = makeSequence(1, 12).map(value => ({ text: getMonthName(value - 1), })); -const UNITS = [{ - value: MINUTE, - text: 'minute', -}, { - value: HOUR, - text: 'hour', -}, { - value: DAY, - text: 'day', -}, { - value: WEEK, - text: 'week', -}, { - value: MONTH, - text: 'month', -}, { - value: YEAR, - text: 'year', -}]; +const UNITS = [ + { + value: MINUTE, + text: 'minute', + }, + { + value: HOUR, + text: 'hour', + }, + { + value: DAY, + text: 'day', + }, + { + value: WEEK, + text: 'week', + }, + { + value: MONTH, + text: 'month', + }, + { + value: YEAR, + text: 'year', + }, +]; const frequencyToFieldsMap = { [MINUTE]: {}, @@ -185,7 +189,7 @@ export class CronEditor extends Component { frequency: PropTypes.string.isRequired, cronExpression: PropTypes.string.isRequired, onChange: PropTypes.func.isRequired, - } + }; static getDerivedStateFromProps(props) { const { cronExpression } = props; @@ -209,12 +213,15 @@ export class CronEditor extends Component { // Update fields which aren't editable with acceptable baseline values. const editableFields = Object.keys(frequencyToFieldsMap[frequency]); - const inheritedFields = editableFields.reduce((baselineFields, field) => { - if (fieldToPreferredValueMap[field] != null) { - baselineFields[field] = fieldToPreferredValueMap[field]; - } - return baselineFields; - }, { ...frequencyToBaselineFieldsMap[frequency] }); + const inheritedFields = editableFields.reduce( + (baselineFields, field) => { + if (fieldToPreferredValueMap[field] != null) { + baselineFields[field] = fieldToPreferredValueMap[field]; + } + return baselineFields; + }, + { ...frequencyToBaselineFieldsMap[frequency] } + ); const newCronExpression = cronPartsToExpression(inheritedFields); @@ -231,17 +238,20 @@ export class CronEditor extends Component { const editableFields = Object.keys(frequencyToFieldsMap[frequency]); const newFieldToPreferredValueMap = {}; - const editedFields = editableFields.reduce((accumFields, field) => { - if (fields[field] !== undefined) { - accumFields[field] = fields[field]; - // Once the user touches a field, we want to persist its value as the user changes - // the cron frequency. - newFieldToPreferredValueMap[field] = fields[field]; - } else { - accumFields[field] = this.state[field]; - } - return accumFields; - }, { ...frequencyToBaselineFieldsMap[frequency] }); + const editedFields = editableFields.reduce( + (accumFields, field) => { + if (fields[field] !== undefined) { + accumFields[field] = fields[field]; + // Once the user touches a field, we want to persist its value as the user changes + // the cron frequency. + newFieldToPreferredValueMap[field] = fields[field]; + } else { + accumFields[field] = this.state[field]; + } + return accumFields; + }, + { ...frequencyToBaselineFieldsMap[frequency] } + ); const newCronExpression = cronPartsToExpression(editedFields); @@ -251,20 +261,14 @@ export class CronEditor extends Component { fieldToPreferredValueMap: { ...fieldToPreferredValueMap, ...newFieldToPreferredValueMap, - } + }, }); }; renderForm() { const { frequency } = this.props; - const { - minute, - hour, - day, - date, - month, - } = this.state; + const { minute, hour, day, date, month } = this.state; switch (frequency) { case MINUTE: @@ -342,12 +346,9 @@ export class CronEditor extends Component { return ( - )} + label={ + + } fullWidth > this.onChangeFrequency(e.target.value)} fullWidth - prepend={( - - - - - - )} + prepend={i18n.translate('esUi.cronEditor.textEveryLabel', { + defaultMessage: 'Every', + })} data-test-subj="cronFrequencySelect" /> diff --git a/src/plugins/es_ui_shared/public/components/cron_editor/cron_hourly.js b/src/plugins/es_ui_shared/public/components/cron_editor/cron_hourly.js index a207998a7f73b..194fccf110174 100644 --- a/src/plugins/es_ui_shared/public/components/cron_editor/cron_hourly.js +++ b/src/plugins/es_ui_shared/public/components/cron_editor/cron_hourly.js @@ -20,26 +20,16 @@ import React, { Fragment } from 'react'; import PropTypes from 'prop-types'; import { FormattedMessage } from '@kbn/i18n/react'; +import { i18n } from '@kbn/i18n'; -import { - EuiFormRow, - EuiSelect, - EuiText, -} from '@elastic/eui'; +import { EuiFormRow, EuiSelect } from '@elastic/eui'; -export const CronHourly = ({ - minute, - minuteOptions, - onChange, -}) => ( +export const CronHourly = ({ minute, minuteOptions, onChange }) => ( - )} + label={ + + } fullWidth data-test-subj="cronFrequencyConfiguration" > @@ -48,16 +38,9 @@ export const CronHourly = ({ value={minute} onChange={e => onChange({ minute: e.target.value })} fullWidth - prepend={( - - - - - - )} + prepend={i18n.translate('esUi.cronEditor.cronHourly.fieldMinute.textAtLabel', { + defaultMessage: 'At', + })} data-test-subj="cronFrequencyHourlyMinuteSelect" /> diff --git a/src/plugins/es_ui_shared/public/components/cron_editor/cron_monthly.js b/src/plugins/es_ui_shared/public/components/cron_editor/cron_monthly.js index 0a5329924b970..f3ffc082a4c60 100644 --- a/src/plugins/es_ui_shared/public/components/cron_editor/cron_monthly.js +++ b/src/plugins/es_ui_shared/public/components/cron_editor/cron_monthly.js @@ -22,13 +22,7 @@ import PropTypes from 'prop-types'; import { FormattedMessage } from '@kbn/i18n/react'; import { i18n } from '@kbn/i18n'; -import { - EuiFlexGroup, - EuiFlexItem, - EuiFormRow, - EuiSelect, - EuiText, -} from '@elastic/eui'; +import { EuiFlexGroup, EuiFlexItem, EuiFormRow, EuiSelect } from '@elastic/eui'; export const CronMonthly = ({ minute, @@ -41,12 +35,9 @@ export const CronMonthly = ({ }) => ( - )} + label={ + + } fullWidth data-test-subj="cronFrequencyConfiguration" > @@ -55,27 +46,17 @@ export const CronMonthly = ({ value={date} onChange={e => onChange({ date: e.target.value })} fullWidth - prepend={( - - - - - - )} + prepend={i18n.translate('esUi.cronEditor.cronMonthly.textOnTheLabel', { + defaultMessage: 'On the', + })} data-test-subj="cronFrequencyMonthlyDateSelect" /> - )} + label={ + + } fullWidth data-test-subj="cronFrequencyConfiguration" > @@ -85,20 +66,13 @@ export const CronMonthly = ({ options={hourOptions} value={hour} aria-label={i18n.translate('esUi.cronEditor.cronMonthly.hourSelectLabel', { - defaultMessage: 'Hour' + defaultMessage: 'Hour', })} onChange={e => onChange({ hour: e.target.value })} fullWidth - prepend={( - - - - - - )} + prepend={i18n.translate('esUi.cronEditor.cronMonthly.fieldHour.textAtLabel', { + defaultMessage: 'At', + })} data-test-subj="cronFrequencyMonthlyHourSelect" /> @@ -108,17 +82,11 @@ export const CronMonthly = ({ options={minuteOptions} value={minute} aria-label={i18n.translate('esUi.cronEditor.cronMonthly.minuteSelectLabel', { - defaultMessage: 'Minute' + defaultMessage: 'Minute', })} onChange={e => onChange({ minute: e.target.value })} fullWidth - prepend={( - - - : - - - )} + prepend=":" data-test-subj="cronFrequencyMonthlyMinuteSelect" /> diff --git a/src/plugins/es_ui_shared/public/components/cron_editor/cron_weekly.js b/src/plugins/es_ui_shared/public/components/cron_editor/cron_weekly.js index d04a8b2ecd093..b328b5cb958b4 100644 --- a/src/plugins/es_ui_shared/public/components/cron_editor/cron_weekly.js +++ b/src/plugins/es_ui_shared/public/components/cron_editor/cron_weekly.js @@ -22,13 +22,7 @@ import PropTypes from 'prop-types'; import { FormattedMessage } from '@kbn/i18n/react'; import { i18n } from '@kbn/i18n'; -import { - EuiFlexGroup, - EuiFlexItem, - EuiFormRow, - EuiSelect, - EuiText, -} from '@elastic/eui'; +import { EuiFlexGroup, EuiFlexItem, EuiFormRow, EuiSelect } from '@elastic/eui'; export const CronWeekly = ({ minute, @@ -41,12 +35,9 @@ export const CronWeekly = ({ }) => ( - )} + label={ + + } fullWidth data-test-subj="cronFrequencyConfiguration" > @@ -55,27 +46,17 @@ export const CronWeekly = ({ value={day} onChange={e => onChange({ day: e.target.value })} fullWidth - prepend={( - - - - - - )} + prepend={i18n.translate('esUi.cronEditor.cronWeekly.textOnLabel', { + defaultMessage: 'On', + })} data-test-subj="cronFrequencyWeeklyDaySelect" /> - )} + label={ + + } fullWidth data-test-subj="cronFrequencyConfiguration" > @@ -85,20 +66,13 @@ export const CronWeekly = ({ options={hourOptions} value={hour} aria-label={i18n.translate('esUi.cronEditor.cronWeekly.hourSelectLabel', { - defaultMessage: 'Hour' + defaultMessage: 'Hour', })} onChange={e => onChange({ hour: e.target.value })} fullWidth - prepend={( - - - - - - )} + prepend={i18n.translate('esUi.cronEditor.cronWeekly.fieldHour.textAtLabel', { + defaultMessage: 'At', + })} data-test-subj="cronFrequencyWeeklyHourSelect" /> @@ -109,16 +83,10 @@ export const CronWeekly = ({ value={minute} onChange={e => onChange({ minute: e.target.value })} aria-label={i18n.translate('esUi.cronEditor.cronWeekly.minuteSelectLabel', { - defaultMessage: 'Minute' + defaultMessage: 'Minute', })} fullWidth - prepend={( - - - : - - - )} + prepend=":" data-test-subj="cronFrequencyWeeklyMinuteSelect" /> diff --git a/src/plugins/es_ui_shared/public/components/cron_editor/cron_yearly.js b/src/plugins/es_ui_shared/public/components/cron_editor/cron_yearly.js index 8a380a97b73ef..26a57756273bd 100644 --- a/src/plugins/es_ui_shared/public/components/cron_editor/cron_yearly.js +++ b/src/plugins/es_ui_shared/public/components/cron_editor/cron_yearly.js @@ -22,13 +22,7 @@ import PropTypes from 'prop-types'; import { FormattedMessage } from '@kbn/i18n/react'; import { i18n } from '@kbn/i18n'; -import { - EuiFlexGroup, - EuiFlexItem, - EuiFormRow, - EuiSelect, - EuiText, -} from '@elastic/eui'; +import { EuiFlexGroup, EuiFlexItem, EuiFormRow, EuiSelect } from '@elastic/eui'; export const CronYearly = ({ minute, @@ -43,12 +37,9 @@ export const CronYearly = ({ }) => ( - )} + label={ + + } fullWidth data-test-subj="cronFrequencyConfiguration" > @@ -57,27 +48,17 @@ export const CronYearly = ({ value={month} onChange={e => onChange({ month: e.target.value })} fullWidth - prepend={( - - - - - - )} + prepend={i18n.translate('esUi.cronEditor.cronYearly.fieldMonth.textInLabel', { + defaultMessage: 'In', + })} data-test-subj="cronFrequencyYearlyMonthSelect" /> - )} + label={ + + } fullWidth data-test-subj="cronFrequencyConfiguration" > @@ -86,27 +67,17 @@ export const CronYearly = ({ value={date} onChange={e => onChange({ date: e.target.value })} fullWidth - prepend={( - - - - - - )} + prepend={i18n.translate('esUi.cronEditor.cronYearly.fieldDate.textOnTheLabel', { + defaultMessage: 'On the', + })} data-test-subj="cronFrequencyYearlyDateSelect" /> - )} + label={ + + } fullWidth data-test-subj="cronFrequencyConfiguration" > @@ -116,20 +87,13 @@ export const CronYearly = ({ options={hourOptions} value={hour} aria-label={i18n.translate('esUi.cronEditor.cronYearly.hourSelectLabel', { - defaultMessage: 'Hour' + defaultMessage: 'Hour', })} onChange={e => onChange({ hour: e.target.value })} fullWidth - prepend={( - - - - - - )} + prepend={i18n.translate('esUi.cronEditor.cronYearly.fieldHour.textAtLabel', { + defaultMessage: 'At', + })} data-test-subj="cronFrequencyYearlyHourSelect" /> @@ -139,17 +103,11 @@ export const CronYearly = ({ options={minuteOptions} value={minute} aria-label={i18n.translate('esUi.cronEditor.cronYearly.minuteSelectLabel', { - defaultMessage: 'Minute' + defaultMessage: 'Minute', })} onChange={e => onChange({ minute: e.target.value })} fullWidth - prepend={( - - - : - - - )} + prepend=":" data-test-subj="cronFrequencyYearlyMinuteSelect" /> diff --git a/test/interpreter_functional/plugins/kbn_tp_run_pipeline/package.json b/test/interpreter_functional/plugins/kbn_tp_run_pipeline/package.json index 55cdc77267124..33e785083c7e3 100644 --- a/test/interpreter_functional/plugins/kbn_tp_run_pipeline/package.json +++ b/test/interpreter_functional/plugins/kbn_tp_run_pipeline/package.json @@ -7,7 +7,7 @@ }, "license": "Apache-2.0", "dependencies": { - "@elastic/eui": "14.0.0", + "@elastic/eui": "14.2.0", "react": "^16.8.0", "react-dom": "^16.8.0" } diff --git a/test/plugin_functional/plugins/kbn_tp_custom_visualizations/package.json b/test/plugin_functional/plugins/kbn_tp_custom_visualizations/package.json index b872f3dce6d30..8d3100e124941 100644 --- a/test/plugin_functional/plugins/kbn_tp_custom_visualizations/package.json +++ b/test/plugin_functional/plugins/kbn_tp_custom_visualizations/package.json @@ -7,7 +7,7 @@ }, "license": "Apache-2.0", "dependencies": { - "@elastic/eui": "14.0.0", + "@elastic/eui": "14.2.0", "react": "^16.8.0" } } diff --git a/test/plugin_functional/plugins/kbn_tp_embeddable_explorer/package.json b/test/plugin_functional/plugins/kbn_tp_embeddable_explorer/package.json index 90109a70b1e78..f76a5f0c0a392 100644 --- a/test/plugin_functional/plugins/kbn_tp_embeddable_explorer/package.json +++ b/test/plugin_functional/plugins/kbn_tp_embeddable_explorer/package.json @@ -8,7 +8,7 @@ }, "license": "Apache-2.0", "dependencies": { - "@elastic/eui": "14.0.0", + "@elastic/eui": "14.2.0", "react": "^16.8.0" }, "scripts": { diff --git a/test/plugin_functional/plugins/kbn_tp_sample_panel_action/package.json b/test/plugin_functional/plugins/kbn_tp_sample_panel_action/package.json index 1815075e20e40..9d0d1c922c8a8 100644 --- a/test/plugin_functional/plugins/kbn_tp_sample_panel_action/package.json +++ b/test/plugin_functional/plugins/kbn_tp_sample_panel_action/package.json @@ -8,7 +8,7 @@ }, "license": "Apache-2.0", "dependencies": { - "@elastic/eui": "14.0.0", + "@elastic/eui": "14.2.0", "react": "^16.8.0" }, "scripts": { diff --git a/test/plugin_functional/plugins/kbn_tp_visualize_embedding/package.json b/test/plugin_functional/plugins/kbn_tp_visualize_embedding/package.json index b995ddf029292..567abd36cb2a4 100644 --- a/test/plugin_functional/plugins/kbn_tp_visualize_embedding/package.json +++ b/test/plugin_functional/plugins/kbn_tp_visualize_embedding/package.json @@ -7,7 +7,7 @@ }, "license": "Apache-2.0", "dependencies": { - "@elastic/eui": "14.0.0", + "@elastic/eui": "14.2.0", "react": "^16.8.0", "react-dom": "^16.8.0" } diff --git a/x-pack/legacy/plugins/canvas/public/components/asset_manager/__examples__/__snapshots__/asset.examples.storyshot b/x-pack/legacy/plugins/canvas/public/components/asset_manager/__examples__/__snapshots__/asset.examples.storyshot index fb63022f341d6..5bb55dd1a8b60 100644 --- a/x-pack/legacy/plugins/canvas/public/components/asset_manager/__examples__/__snapshots__/asset.examples.storyshot +++ b/x-pack/legacy/plugins/canvas/public/components/asset_manager/__examples__/__snapshots__/asset.examples.storyshot @@ -17,24 +17,20 @@ exports[`Storyshots components/Assets/Asset airplane 1`] = `
- + } + > + Asset thumbnail +
- + } + > + Asset thumbnail +
({ ...localState, isTypeFilterOpen: false })) } button={ - { setLocalState(s => ({ ...s, @@ -429,17 +429,15 @@ export const InnerIndexPatternDataPanel = function InnerIndexPatternDataPanel({ }} data-test-subj="lnsIndexPatternFiltersToggle" title={i18n.translate('xpack.lens.indexPatterns.toggleFiltersPopover', { - defaultMessage: 'Toggle filters for index pattern', + defaultMessage: 'Filters for index pattern', })} aria-label={i18n.translate( 'xpack.lens.indexPatterns.toggleFiltersPopover', { - defaultMessage: 'Toggle filters for index pattern', + defaultMessage: 'Filters for index pattern', } )} - > - - + /> } > diff --git a/x-pack/legacy/plugins/lens/public/indexpattern_plugin/operations/definitions/date_histogram.test.tsx b/x-pack/legacy/plugins/lens/public/indexpattern_plugin/operations/definitions/date_histogram.test.tsx index ac9c9f48c7acb..751c1c84aa844 100644 --- a/x-pack/legacy/plugins/lens/public/indexpattern_plugin/operations/definitions/date_histogram.test.tsx +++ b/x-pack/legacy/plugins/lens/public/indexpattern_plugin/operations/definitions/date_histogram.test.tsx @@ -411,11 +411,14 @@ describe('date_histogram', () => { /> ); - instance.find(EuiRange).prop('onChange')!({ - target: { - value: '2', - }, - } as React.ChangeEvent); + instance.find(EuiRange).prop('onChange')!( + { + target: { + value: '2', + }, + } as React.ChangeEvent, + true + ); expect(setStateSpy).toHaveBeenCalledWith({ ...state, layers: { diff --git a/x-pack/legacy/plugins/lens/public/indexpattern_plugin/operations/definitions/terms.test.tsx b/x-pack/legacy/plugins/lens/public/indexpattern_plugin/operations/definitions/terms.test.tsx index a0c7cdd69ff0d..1040a26c3f7c4 100644 --- a/x-pack/legacy/plugins/lens/public/indexpattern_plugin/operations/definitions/terms.test.tsx +++ b/x-pack/legacy/plugins/lens/public/indexpattern_plugin/operations/definitions/terms.test.tsx @@ -526,11 +526,14 @@ describe('terms', () => { /> ); - instance.find(EuiRange).prop('onChange')!({ - target: { - value: '7', - }, - } as React.ChangeEvent); + instance.find(EuiRange).prop('onChange')!( + { + target: { + value: '7', + }, + } as React.ChangeEvent, + true + ); expect(setStateSpy).toHaveBeenCalledWith({ ...state, layers: { diff --git a/x-pack/legacy/plugins/rollup/public/crud_app/sections/job_create/steps/step_logistics.js b/x-pack/legacy/plugins/rollup/public/crud_app/sections/job_create/steps/step_logistics.js index 630e81a4235e4..c3cf39bec5fad 100644 --- a/x-pack/legacy/plugins/rollup/public/crud_app/sections/job_create/steps/step_logistics.js +++ b/x-pack/legacy/plugins/rollup/public/crud_app/sections/job_create/steps/step_logistics.js @@ -44,7 +44,7 @@ export class StepLogisticsUi extends Component { isValidatingIndexPattern: PropTypes.bool.isRequired, hasMatchingIndices: PropTypes.bool.isRequired, indexPatternAsyncErrors: PropTypes.array, - } + }; showAdvancedCron = () => { const { onFieldsChange } = this.props; @@ -66,12 +66,9 @@ export class StepLogisticsUi extends Component { }; renderIndexPatternHelpText() { - const { - isValidatingIndexPattern, - hasMatchingIndices, - } = this.props; + const { isValidatingIndexPattern, hasMatchingIndices } = this.props; - if(!isValidatingIndexPattern && hasMatchingIndices) { + if (!isValidatingIndexPattern && hasMatchingIndices) { return (

@@ -128,37 +125,25 @@ export class StepLogisticsUi extends Component { } renderCronEditor() { - const { - fields, - onFieldsChange, - areStepErrorsVisible, - fieldErrors, - } = this.props; + const { fields, onFieldsChange, areStepErrorsVisible, fieldErrors } = this.props; - const { - rollupCron, - cronFrequency, - isAdvancedCronVisible, - fieldToPreferredValueMap, - } = fields; + const { rollupCron, cronFrequency, isAdvancedCronVisible, fieldToPreferredValueMap } = fields; - const { - rollupCron: errorRollupCron, - } = fieldErrors; + const { rollupCron: errorRollupCron } = fieldErrors; if (isAdvancedCronVisible) { return ( - )} + } error={errorRollupCron} isInvalid={Boolean(areStepErrorsVisible && errorRollupCron)} - helpText={( + helpText={

- )} + } fullWidth > onFieldsChange({ - rollupCron: cronExpression, - simpleRollupCron: cronExpression, - cronFrequency: frequency, - fieldToPreferredValueMap, - })} + onChange={({ cronExpression, frequency, fieldToPreferredValueMap }) => + onFieldsChange({ + rollupCron: cronExpression, + simpleRollupCron: cronExpression, + cronFrequency: frequency, + fieldToPreferredValueMap, + }) + } /> + + - + ); } @@ -233,13 +218,7 @@ export class StepLogisticsUi extends Component { indexPatternAsyncErrors, } = this.props; - const { - id, - indexPattern, - rollupIndex, - rollupPageSize, - rollupDelay, - } = fields; + const { id, indexPattern, rollupIndex, rollupPageSize, rollupDelay } = fields; const { id: errorId, @@ -295,7 +274,7 @@ export class StepLogisticsUi extends Component {

- )} - description={( + } + description={ - )} + } fullWidth > - )} + } error={errorId} isInvalid={Boolean(areStepErrorsVisible && errorId)} fullWidth @@ -335,7 +314,7 @@ export class StepLogisticsUi extends Component {

- )} - description={( + } + description={ - )} + } fullWidth > - )} - error={isValidatingIndexPattern ? undefined : (errorIndexPattern || indexPatternAsyncErrors)} - isInvalid={Boolean((areStepErrorsVisible && errorIndexPattern)) || Boolean(indexPatternAsyncErrors)} + } + error={ + isValidatingIndexPattern ? undefined : errorIndexPattern || indexPatternAsyncErrors + } + isInvalid={ + Boolean(areStepErrorsVisible && errorIndexPattern) || + Boolean(indexPatternAsyncErrors) + } helpText={this.renderIndexPatternHelpText()} fullWidth > onFieldsChange({ indexPattern: e.target.value })} - isInvalid={Boolean(areStepErrorsVisible && errorIndexPattern) || Boolean(indexPatternAsyncErrors)} + isInvalid={ + Boolean(areStepErrorsVisible && errorIndexPattern) || + Boolean(indexPatternAsyncErrors) + } isLoading={isValidatingIndexPattern} fullWidth data-test-subj="rollupIndexPattern" @@ -376,21 +363,21 @@ export class StepLogisticsUi extends Component { - )} + } error={errorRollupIndex} isInvalid={Boolean(areStepErrorsVisible && errorRollupIndex)} - helpText={( + helpText={ {indexIllegalCharacters} }} /> - )} + } fullWidth >

- )} - description={( + } + description={ - )} + } fullWidth > {this.renderCronEditor()}
- )} - description={( + } + description={ - )} + } fullWidth > - )} + } error={errorRollupPageSize} isInvalid={Boolean(areStepErrorsVisible && errorRollupPageSize)} fullWidth @@ -467,7 +454,7 @@ export class StepLogisticsUi extends Component {
- )} - description={( + } + description={ - )} + } fullWidth > - )} + } error={errorRollupDelay} isInvalid={Boolean(areStepErrorsVisible && errorRollupDelay)} - helpText={( + helpText={

- )} + } fullWidth > ; - } + }; } export const StepLogistics = injectI18n(StepLogisticsUi); diff --git a/x-pack/legacy/plugins/snapshot_restore/public/app/components/policy_form/steps/step_logistics.tsx b/x-pack/legacy/plugins/snapshot_restore/public/app/components/policy_form/steps/step_logistics.tsx index cde5d89fb5e64..85307ae47b832 100644 --- a/x-pack/legacy/plugins/snapshot_restore/public/app/components/policy_form/steps/step_logistics.tsx +++ b/x-pack/legacy/plugins/snapshot_restore/public/app/components/policy_form/steps/step_logistics.tsx @@ -450,6 +450,8 @@ export const PolicyStepLogistics: React.FunctionComponent = ({ }} /> + + { diff --git a/x-pack/legacy/plugins/watcher/public/sections/watch_edit/components/threshold_watch_edit/action_fields/webhook_action_fields.tsx b/x-pack/legacy/plugins/watcher/public/sections/watch_edit/components/threshold_watch_edit/action_fields/webhook_action_fields.tsx index d877ec1dbcbde..c3784e1ca5516 100644 --- a/x-pack/legacy/plugins/watcher/public/sections/watch_edit/components/threshold_watch_edit/action_fields/webhook_action_fields.tsx +++ b/x-pack/legacy/plugins/watcher/public/sections/watch_edit/components/threshold_watch_edit/action_fields/webhook_action_fields.tsx @@ -14,7 +14,6 @@ import { EuiSelect, EuiFlexGroup, EuiFlexItem, - EuiText, EuiSpacer, } from '@elastic/eui'; import { i18n } from '@kbn/i18n'; @@ -112,11 +111,7 @@ export const WebhookActionFields: React.FunctionComponent = ({ )} > - : - - } + prepend=":" fullWidth name="port" value={port || ''} @@ -144,11 +139,7 @@ export const WebhookActionFields: React.FunctionComponent = ({ )} > - / - - } + prepend="/" fullWidth name="path" value={path || ''} diff --git a/x-pack/legacy/plugins/watcher/public/sections/watch_edit/components/threshold_watch_edit/threshold_watch_edit.tsx b/x-pack/legacy/plugins/watcher/public/sections/watch_edit/components/threshold_watch_edit/threshold_watch_edit.tsx index 1041213d355ba..34c3e66e542b1 100644 --- a/x-pack/legacy/plugins/watcher/public/sections/watch_edit/components/threshold_watch_edit/threshold_watch_edit.tsx +++ b/x-pack/legacy/plugins/watcher/public/sections/watch_edit/components/threshold_watch_edit/threshold_watch_edit.tsx @@ -273,6 +273,7 @@ export const ThresholdWatchEdit = ({ pageTitle }: { pageTitle: string }) => { }} /> +