From 74b3d84bb6fce3425fbe1f13c6b90d3e1dcc09fb Mon Sep 17 00:00:00 2001 From: Caroline Horn <549577+cchaos@users.noreply.github.com> Date: Mon, 16 Sep 2019 13:59:39 -0400 Subject: [PATCH] Update EUI to 14.0.0 (#45475) --- package.json | 2 +- .../language_switcher.test.tsx.snap | 8 +- .../query_bar_input.test.tsx.snap | 42 +- .../components/language_switcher.tsx | 8 +- .../saved_query_management_component.tsx | 1 + .../__snapshots__/controls_tab.test.js.snap | 2 + .../list_control_editor.test.js.snap | 32 +- .../__snapshots__/options_tab.test.js.snap | 3 + .../range_control_editor.test.js.snap | 6 +- .../components/editor/control_editor.js | 49 +- .../components/editor/list_control_editor.js | 129 +- .../components/editor/range_control_editor.js | 39 +- .../vis/__snapshots__/form_row.test.js.snap | 4 + .../public/components/vis/form_row.js | 8 +- .../public/components/common/number_input.tsx | 1 + .../public/components/common/range.tsx | 1 + .../public/components/common/select.tsx | 1 + .../public/components/common/text_input.tsx | 1 + .../components/common/truncate_labels.tsx | 1 + .../options/point_series/threshold_panel.tsx | 1 + .../__snapshots__/save_modal.test.js.snap | 2 + .../core_plugins/kibana/public/index.scss | 6 + .../__snapshots__/header.test.js.snap | 2 + .../__snapshots__/time_field.test.js.snap | 3 + .../__snapshots__/objects_table.test.js.snap | 4 + .../__snapshots__/flyout.test.js.snap | 2 + .../__jest__/__snapshots__/table.test.js.snap | 4 + .../components/objects_table/objects_table.js | 1 + .../field/__snapshots__/field.test.js.snap | 40 + .../public/components/aggs/calculation.js | 8 +- .../public/components/aggs/cumulative_sum.js | 17 +- .../public/components/aggs/derivative.js | 14 +- .../public/components/aggs/filter_ratio.js | 19 +- .../public/components/aggs/math.js | 18 +- .../public/components/aggs/moving_average.js | 19 +- .../public/components/aggs/percentile.js | 8 +- .../aggs/percentile_rank/percentile_rank.js | 8 +- .../public/components/aggs/positive_only.js | 17 +- .../public/components/aggs/serial_diff.js | 22 +- .../public/components/aggs/series_agg.js | 14 +- .../public/components/aggs/static.js | 12 +- .../public/components/aggs/std_agg.js | 19 +- .../public/components/aggs/std_deviation.js | 23 +- .../public/components/aggs/std_sibling.js | 22 +- .../public/components/aggs/top_hit.js | 34 +- .../public/components/annotations_editor.js | 4 +- .../public/components/panel_config/gauge.js | 21 +- .../components/panel_config/markdown.js | 25 +- .../public/components/panel_config/metric.js | 2 +- .../public/components/panel_config/table.js | 2 +- .../components/panel_config/timeseries.js | 20 +- .../public/components/panel_config/top_n.js | 19 +- .../splits/__snapshots__/terms.test.js.snap | 7 + .../__snapshots__/field_editor.test.js.snap | 3 + .../bytes/__snapshots__/bytes.test.js.snap | 1 + .../date/__snapshots__/date.test.js.snap | 1 + .../__snapshots__/date_nanos.test.js.snap | 1 + .../__snapshots__/duration.test.js.snap | 5 + .../number/__snapshots__/number.test.js.snap | 1 + .../__snapshots__/percent.test.js.snap | 1 + .../__snapshots__/static_lookup.test.js.snap | 2 + .../string/__snapshots__/string.test.js.snap | 1 + .../__snapshots__/truncate.test.js.snap | 1 + .../url/__snapshots__/url.test.js.snap | 9 + .../__snapshots__/samples.test.js.snap | 1 + .../ui/public/field_editor/field_editor.js | 1 + .../url_panel_content.test.js.snap | 14 + .../share/components/url_panel_content.tsx | 3 + .../vis/editors/default/_agg_params.scss | 1 + .../__snapshots__/agg_params.test.tsx.snap | 1 + .../editors/default/components/agg_select.tsx | 1 + .../controls/__snapshots__/size.test.tsx.snap | 3 +- .../__snapshots__/top_aggregate.test.tsx.snap | 3 +- .../vis/editors/default/controls/field.tsx | 1 + .../vis/editors/default/controls/filter.tsx | 56 +- .../vis/editors/default/controls/filters.tsx | 1 + .../editors/default/controls/metric_agg.tsx | 1 + .../default/controls/number_interval.tsx | 1 + .../vis/editors/default/controls/order.tsx | 1 + .../vis/editors/default/controls/order_by.tsx | 1 + .../editors/default/controls/precision.tsx | 1 + .../default/controls/radius_ratio_option.tsx | 2 +- .../vis/editors/default/controls/raw_json.tsx | 1 + .../vis/editors/default/controls/size.tsx | 1 + .../vis/editors/default/controls/string.tsx | 1 + .../editors/default/controls/sub_metric.tsx | 3 +- .../vis/editors/default/controls/switch.tsx | 7 +- .../default/controls/time_interval.tsx | 1 + .../default/controls/top_aggregate.tsx | 1 + .../saved_object_save_modal.test.tsx.snap | 2 + .../plugins/kbn_tp_run_pipeline/package.json | 2 +- .../kbn_tp_custom_visualizations/package.json | 2 +- .../kbn_tp_embeddable_explorer/package.json | 2 +- .../kbn_tp_sample_panel_action/package.json | 2 +- .../kbn_tp_visualize_embedding/package.json | 2 +- .../ServiceIntegrations/WatcherFlyout.tsx | 7 + .../AddSettings/AddSettingFlyoutBody.tsx | 2 + .../shared/EnvironmentFilter/index.tsx | 12 +- .../components/tag/config_view/index.tsx | 2 + .../extended_template.examples.storyshot | 160 +- .../uis/datasources/timelion.js | 2 + .../components/arg_form/advanced_failure.js | 10 +- .../custom_element_modal.examples.storyshot | 584 ++++--- .../expression_input.examples.storyshot | 28 +- .../file_upload.examples.storyshot | 4 +- .../components/page_config/page_config.js | 4 +- .../workpad_config/workpad_config.js | 2 + .../control_settings/custom_interval.js | 7 +- .../workpad_loader/workpad_loader.js | 1 + .../extended_template.examples.storyshot | 1514 +++++++++-------- .../extended_template.examples.storyshot | 453 ++--- .../series_style/extended_template.tsx | 77 +- .../public/components/graph_save_modal.tsx | 1 + .../components/grok_debugger/grok_debugger.js | 3 +- .../components/add_lifecycle_confirm_modal.js | 61 +- .../components/warm_phase/warm_phase.js | 74 +- .../metrics_explorer/chart_options.tsx | 2 + .../components/waffle/custom_field_panel.tsx | 1 + .../components/waffle/legend_controls.tsx | 2 + .../flex_item_setting.test.js.snap | 2 + .../pipeline_editor.test.js.snap | 28 + .../pipeline_editor/pipeline_editor.js | 1 + .../geometry_filter_form.test.js.snap | 18 +- .../tooltip_selector.test.js.snap | 1 + .../public/components/geometry_filter_form.js | 2 + .../set_view_control/set_view_control.js | 1 + .../_attribution_control.scss | 2 +- .../heatmap_style_editor.test.js.snap | 1 + .../vector_style_symbol_editor.test.js.snap | 2 + .../components/vector/vector_style_editor.js | 51 +- .../__snapshots__/popover_form.test.tsx.snap | 2 + .../__snapshots__/popover_form.test.tsx.snap | 3 + .../components/group_by_list/popover_form.tsx | 24 +- .../step_define/step_define_form.tsx | 1 + .../create_analytics_advanced_editor.tsx | 3 +- .../__snapshots__/overrides.test.js.snap | 4 + .../components/import_settings/advanced.js | 2 + .../components/import_settings/simple.js | 3 + .../__snapshots__/editor.test.js.snap | 28 + .../__snapshots__/list.test.js.snap | 15 + .../__snapshots__/calendar_form.test.js.snap | 5 + .../edit/new_event_modal/new_event_modal.js | 3 + .../add_item_popover.test.js.snap | 3 + .../edit_description_popover.test.js.snap | 3 + .../edit/__snapshots__/header.test.js.snap | 2 + .../remote_cluster_form.test.js.snap | 432 ++--- .../job_create/steps/step_logistics.js | 2 + .../basic_login_form.test.tsx.snap | 2 + .../elasticsearch_privileges.test.tsx.snap | 2 + .../index_privilege_form.test.tsx.snap | 3 + .../simple_privilege_section.test.tsx.snap | 1 + .../privilege_space_form.test.tsx.snap | 2 + .../policy_form/steps/step_logistics.tsx | 2 + .../confirm_delete_modal.test.tsx.snap | 2 + .../components/confirm_delete_modal.tsx | 22 +- .../customize_space_avatar.test.tsx.snap | 67 +- .../space_identifier.test.tsx.snap | 1 + .../customize_space_avatar.tsx | 61 +- .../__snapshots__/ping_list.test.tsx.snap | 2 + x-pack/package.json | 2 +- yarn.lock | 8 +- 161 files changed, 2810 insertions(+), 1947 deletions(-) diff --git a/package.json b/package.json index 1f9629eff8a624..7a5c80c0d58ca2 100644 --- a/package.json +++ b/package.json @@ -105,7 +105,7 @@ "@babel/register": "^7.5.5", "@elastic/charts": "^11.1.1", "@elastic/datemath": "5.0.2", - "@elastic/eui": "13.8.1", + "@elastic/eui": "14.0.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/query/query_bar/components/__snapshots__/language_switcher.test.tsx.snap b/src/legacy/core_plugins/data/public/query/query_bar/components/__snapshots__/language_switcher.test.tsx.snap index e46ec946e97f62..a898d5b3c78d13 100644 --- a/src/legacy/core_plugins/data/public/query/query_bar/components/__snapshots__/language_switcher.test.tsx.snap +++ b/src/legacy/core_plugins/data/public/query/query_bar/components/__snapshots__/language_switcher.test.tsx.snap @@ -2,9 +2,11 @@ exports[`LanguageSwitcher should toggle off if language is lucene 1`] = ` @@ -15,7 +17,6 @@ exports[`LanguageSwitcher should toggle off if language is lucene 1`] = ` /> } - className="eui-displayBlock" closePopover={[Function]} display="inlineBlock" hasArrow={true} @@ -69,6 +70,7 @@ exports[`LanguageSwitcher should toggle off if language is lucene 1`] = ` @@ -115,7 +119,6 @@ exports[`LanguageSwitcher should toggle on if language is kuery 1`] = ` /> } - className="eui-displayBlock" closePopover={[Function]} display="inlineBlock" hasArrow={true} @@ -169,6 +172,7 @@ exports[`LanguageSwitcher should toggle on if language is kuery 1`] = ` - + @@ -375,7 +375,6 @@ exports[`QueryBarInput Should disable autoFocus on EuiFieldText when disableAuto /> } - className="eui-displayBlock" closePopover={[Function]} display="inlineBlock" hasArrow={true} @@ -390,7 +389,7 @@ exports[`QueryBarInput Should disable autoFocus on EuiFieldText when disableAuto onOutsideClick={[Function]} >
+ `; exports[`renders dynamic options should display dynamic options for string fields 1`] = ` -
+ -
+ `; exports[`renders dynamic options should display size field when dynamic options is disabled 1`] = ` -
+ -
+ `; exports[`renders should display chaining input when parents are provided 1`] = ` -
+ -
+ `; exports[`renders should not display any options until field is selected 1`] = ` -
+ -
+ `; diff --git a/src/legacy/core_plugins/input_control_vis/public/components/editor/__snapshots__/options_tab.test.js.snap b/src/legacy/core_plugins/input_control_vis/public/components/editor/__snapshots__/options_tab.test.js.snap index f78607e9cfa0a3..9420b2f05e6355 100644 --- a/src/legacy/core_plugins/input_control_vis/public/components/editor/__snapshots__/options_tab.test.js.snap +++ b/src/legacy/core_plugins/input_control_vis/public/components/editor/__snapshots__/options_tab.test.js.snap @@ -4,6 +4,7 @@ exports[`OptionsTab should renders OptionsTab 1`] = ` + -
+ `; diff --git a/src/legacy/core_plugins/input_control_vis/public/components/editor/control_editor.js b/src/legacy/core_plugins/input_control_vis/public/components/editor/control_editor.js index 12003624f0b3cd..cc31b8d238dbe3 100644 --- a/src/legacy/core_plugins/input_control_vis/public/components/editor/control_editor.js +++ b/src/legacy/core_plugins/input_control_vis/public/components/editor/control_editor.js @@ -35,30 +35,29 @@ import { } from '@elastic/eui'; class ControlEditorUi extends Component { - - changeLabel = (evt) => { + changeLabel = evt => { this.props.handleLabelChange(this.props.controlIndex, evt); - } + }; removeControl = () => { this.props.handleRemoveControl(this.props.controlIndex); - } + }; moveUpControl = () => { this.props.moveControl(this.props.controlIndex, -1); - } + }; moveDownControl = () => { this.props.moveControl(this.props.controlIndex, 1); - } + }; - changeIndexPattern = (evt) => { + changeIndexPattern = evt => { this.props.handleIndexPatternChange(this.props.controlIndex, evt); - } + }; - changeFieldName = (evt) => { + changeFieldName = evt => { this.props.handleFieldNameChange(this.props.controlIndex, evt); - } + }; renderEditor() { let controlEditor = null; @@ -99,12 +98,14 @@ class ControlEditorUi extends Component { } + label={ + + } > - + {controlEditor} @@ -118,7 +119,7 @@ class ControlEditorUi extends Component { - {this.renderEditor()} - ); } @@ -179,10 +178,12 @@ ControlEditorUi.propTypes = { getIndexPattern: PropTypes.func.isRequired, handleCheckboxOptionChange: PropTypes.func.isRequired, handleNumberOptionChange: PropTypes.func.isRequired, - parentCandidates: PropTypes.arrayOf(PropTypes.shape({ - value: PropTypes.string.isRequired, - text: PropTypes.string.isRequired, - })).isRequired, + parentCandidates: PropTypes.arrayOf( + PropTypes.shape({ + value: PropTypes.string.isRequired, + text: PropTypes.string.isRequired, + }) + ).isRequired, handleParentChange: PropTypes.func.isRequired, }; diff --git a/src/legacy/core_plugins/input_control_vis/public/components/editor/list_control_editor.js b/src/legacy/core_plugins/input_control_vis/public/components/editor/list_control_editor.js index 560987cbd9c411..2ee225475b0fe0 100644 --- a/src/legacy/core_plugins/input_control_vis/public/components/editor/list_control_editor.js +++ b/src/legacy/core_plugins/input_control_vis/public/components/editor/list_control_editor.js @@ -18,17 +18,12 @@ */ import PropTypes from 'prop-types'; -import React, { Component } from 'react'; +import React, { Component, Fragment } from 'react'; import { IndexPatternSelectFormRow } from './index_pattern_select_form_row'; import { FieldSelect } from './field_select'; import { FormattedMessage } from '@kbn/i18n/react'; -import { - EuiFormRow, - EuiFieldNumber, - EuiSwitch, - EuiSelect, -} from '@elastic/eui'; +import { EuiFormRow, EuiFieldNumber, EuiSwitch, EuiSelect } from '@elastic/eui'; function filterField(field) { return field.aggregatable && ['number', 'boolean', 'date', 'ip', 'string'].includes(field.type); @@ -60,13 +55,13 @@ export class ListControlEditor extends Component { } return null; - } + }; componentDidUpdate = () => { if (this.state.isLoadingFieldType) { this.loadIsStringField(); } - } + }; loadIsStringField = async () => { if (!this.props.controlParams.indexPattern || !this.props.controlParams.fieldName) { @@ -86,7 +81,7 @@ export class ListControlEditor extends Component { return; } - const field = indexPattern.fields.find((field) => { + const field = indexPattern.fields.find(field => { return field.name === this.props.controlParams.fieldName; }); if (!field) { @@ -94,9 +89,9 @@ export class ListControlEditor extends Component { } this.setState({ isLoadingFieldType: false, - isStringField: field.type === 'string' + isStringField: field.type === 'string', }); - } + }; renderOptions = () => { if (this.state.isLoadingFieldType || !this.props.controlParams.fieldName) { @@ -105,24 +100,28 @@ export class ListControlEditor extends Component { const options = []; if (this.props.parentCandidates && this.props.parentCandidates.length > 0) { - const parentCandidatesOptions = [ - { value: '', text: '' }, - ...this.props.parentCandidates, - ]; + const parentCandidatesOptions = [{ value: '', text: '' }, ...this.props.parentCandidates]; options.push( } - helpText={} + label={ + + } + helpText={ + + } key="parentSelect" > { + onChange={evt => { this.props.handleParentChange(this.props.controlIndex, evt); }} /> @@ -134,15 +133,22 @@ export class ListControlEditor extends Component { } + helpText={ + + } > } + label={ + + } checked={this.props.controlParams.options.multiselect} - onChange={(evt) => { + onChange={evt => { this.props.handleCheckboxOptionChange(this.props.controlIndex, 'multiselect', evt); }} data-test-subj="listControlMultiselectInput" @@ -150,18 +156,17 @@ export class ListControlEditor extends Component { ); - const dynamicOptionsHelpText = this.state.isStringField - ? ( - - ) : ( - - ); + const dynamicOptionsHelpText = this.state.isStringField ? ( + + ) : ( + + ); options.push( } + label={ + + } checked={this.props.controlParams.options.dynamicOptions} - onChange={(evt) => { + onChange={evt => { this.props.handleCheckboxOptionChange(this.props.controlIndex, 'dynamicOptions', evt); }} disabled={this.state.isStringField ? false : true} @@ -185,14 +195,24 @@ export class ListControlEditor extends Component { options.push( } + label={ + + } key="size" - helpText={} + helpText={ + + } > { + onChange={evt => { this.props.handleNumberOptionChange(this.props.controlIndex, 'size', evt); }} data-test-subj="listControlSizeInput" @@ -202,12 +222,11 @@ export class ListControlEditor extends Component { } return options; - } + }; render() { return ( -
- + {this.renderOptions()} - -
+ ); } } @@ -238,10 +256,11 @@ ListControlEditor.propTypes = { handleIndexPatternChange: PropTypes.func.isRequired, handleCheckboxOptionChange: PropTypes.func.isRequired, handleNumberOptionChange: PropTypes.func.isRequired, - parentCandidates: PropTypes.arrayOf(PropTypes.shape({ - value: PropTypes.string.isRequired, - text: PropTypes.string.isRequired, - })).isRequired, + parentCandidates: PropTypes.arrayOf( + PropTypes.shape({ + value: PropTypes.string.isRequired, + text: PropTypes.string.isRequired, + }) + ).isRequired, handleParentChange: PropTypes.func.isRequired, }; - diff --git a/src/legacy/core_plugins/input_control_vis/public/components/editor/range_control_editor.js b/src/legacy/core_plugins/input_control_vis/public/components/editor/range_control_editor.js index ba4e43d4a3ed8a..6e1754b28647f5 100644 --- a/src/legacy/core_plugins/input_control_vis/public/components/editor/range_control_editor.js +++ b/src/legacy/core_plugins/input_control_vis/public/components/editor/range_control_editor.js @@ -18,14 +18,11 @@ */ import PropTypes from 'prop-types'; -import React from 'react'; +import React, { Fragment } from 'react'; import { IndexPatternSelectFormRow } from './index_pattern_select_form_row'; import { FieldSelect } from './field_select'; -import { - EuiFormRow, - EuiFieldNumber, -} from '@elastic/eui'; +import { EuiFormRow, EuiFieldNumber } from '@elastic/eui'; import { FormattedMessage } from '@kbn/i18n/react'; @@ -36,15 +33,14 @@ function filterField(field) { export function RangeControlEditor(props) { const stepSizeId = `stepSize-${props.controlIndex}`; const decimalPlacesId = `decimalPlaces-${props.controlIndex}`; - const handleDecimalPlacesChange = (evt) => { + const handleDecimalPlacesChange = evt => { props.handleNumberOptionChange(props.controlIndex, 'decimalPlaces', evt); }; - const handleStepChange = (evt) => { + const handleStepChange = evt => { props.handleNumberOptionChange(props.controlIndex, 'step', evt); }; return ( -
- + } + label={ + + } > } + label={ + + } > - -
+ ); } @@ -99,5 +98,5 @@ RangeControlEditor.propTypes = { controlParams: PropTypes.object.isRequired, handleFieldNameChange: PropTypes.func.isRequired, handleIndexPatternChange: PropTypes.func.isRequired, - handleNumberOptionChange: PropTypes.func.isRequired + handleNumberOptionChange: PropTypes.func.isRequired, }; diff --git a/src/legacy/core_plugins/input_control_vis/public/components/vis/__snapshots__/form_row.test.js.snap b/src/legacy/core_plugins/input_control_vis/public/components/vis/__snapshots__/form_row.test.js.snap index 7ff5ad453fc245..a95715d9955f93 100644 --- a/src/legacy/core_plugins/input_control_vis/public/components/vis/__snapshots__/form_row.test.js.snap +++ b/src/legacy/core_plugins/input_control_vis/public/components/vis/__snapshots__/form_row.test.js.snap @@ -4,6 +4,7 @@ exports[`renders control with warning 1`] = ` + {control} ); @@ -44,11 +44,7 @@ export function FormRow(props) { ); return ( - + {control} ); diff --git a/src/legacy/core_plugins/kbn_vislib_vis_types/public/components/common/number_input.tsx b/src/legacy/core_plugins/kbn_vislib_vis_types/public/components/common/number_input.tsx index 9a7a39bc8f559d..7322cfb69b20b7 100644 --- a/src/legacy/core_plugins/kbn_vislib_vis_types/public/components/common/number_input.tsx +++ b/src/legacy/core_plugins/kbn_vislib_vis_types/public/components/common/number_input.tsx @@ -52,6 +52,7 @@ function NumberInputOption({ ({ return ( ({ return ( ); diff --git a/src/legacy/core_plugins/kbn_vislib_vis_types/public/components/options/point_series/threshold_panel.tsx b/src/legacy/core_plugins/kbn_vislib_vis_types/public/components/options/point_series/threshold_panel.tsx index 331b81dc653212..a8674b77dc9857 100644 --- a/src/legacy/core_plugins/kbn_vislib_vis_types/public/components/options/point_series/threshold_panel.tsx +++ b/src/legacy/core_plugins/kbn_vislib_vis_types/public/components/options/point_series/threshold_panel.tsx @@ -112,6 +112,7 @@ function ThresholdPanel({ stateParams, setValue, vis }: VisOptionsProps + + + - + + + } + label={ + + } > { - + + { } + label={ + + } fullWidth > { - + + { + } > @@ -117,6 +124,7 @@ export const FilterRatioAgg = props => { defaultMessage="Metric Aggregation" /> + { } + label={ + + } > - + + - + + + } fullWidth helpText={ diff --git a/src/legacy/core_plugins/vis_type_timeseries/public/components/aggs/moving_average.js b/src/legacy/core_plugins/vis_type_timeseries/public/components/aggs/moving_average.js index 4ed7335699a3b0..3b9d0ab2826826 100644 --- a/src/legacy/core_plugins/vis_type_timeseries/public/components/aggs/moving_average.js +++ b/src/legacy/core_plugins/vis_type_timeseries/public/components/aggs/moving_average.js @@ -69,9 +69,12 @@ export const MovingAverageAgg = props => { value: MODEL_TYPES.WEIGHTED_LINEAR, }, { - label: i18n.translate('visTypeTimeseries.movingAverage.modelOptions.exponentiallyWeightedLabel', { - defaultMessage: 'Exponentially Weighted', - }), + label: i18n.translate( + 'visTypeTimeseries.movingAverage.modelOptions.exponentiallyWeightedLabel', + { + defaultMessage: 'Exponentially Weighted', + } + ), value: MODEL_TYPES.WEIGHTED_EXPONENTIAL, }, { @@ -129,6 +132,7 @@ export const MovingAverageAgg = props => { defaultMessage: 'Aggregation', })} + { > + } + label={ + + } > { defaultMessage="Aggregation" /> + { } + label={ + + } > { @@ -54,6 +61,7 @@ export const PositiveOnlyAgg = props => { defaultMessage="Aggregation" /> + { } + label={ + + } > { @@ -51,8 +58,12 @@ export const SerialDiffAgg = props => { - + + { } + label={ + + } > - + + } + label={ + + } > { - + + { + } > - + + } + label={ + + } fullWidth > { defaultMessage="Aggregation" /> + { } + label={ + + } > { } + label={ + + } > @@ -140,7 +152,12 @@ const StandardDeviationAggUi = props => { } + label={ + + } > { } + label={ + + } > @@ -97,7 +100,9 @@ const StandardSiblingAggUi = props => { } + label={ + + } > { - + + { } + label={ + + } > { - + + { } + label={ + + } > { } + label={ + + } > {/* EUITODO: The following input couldn't be converted to EUI because of type mis-match. @@ -211,9 +219,12 @@ const TopHitAggUi = props => { > { } + label={ + + } > { } + label={ + + } > - + - + - + @@ -164,7 +167,7 @@ class GaugePanelConfigUi extends Component { defaultMessage="Ignore global filter?" /> - + - + @@ -265,7 +271,7 @@ class GaugePanelConfigUi extends Component { - + - + this.switchTab('data')}> - + this.switchTab('options')}> - + @@ -175,7 +178,7 @@ class MarkdownPanelConfigUi extends Component { defaultMessage="Ignore global filter?" /> - + - + - + - + - + - + this.switchTab('data')} > - + - + - + - + @@ -201,7 +204,7 @@ class TimeseriesPanelConfigUi extends Component { defaultMessage="Ignore global filter?" /> - + - + - + - + - + this.switchTab('data')}> - + - + @@ -159,7 +162,7 @@ export class TopNPanelConfig extends Component { defaultMessage="Ignore global filter?" /> - + - + - + this.switchTab('data')}> - + this.switchTab('options')}>
+ + + + + { {this.renderShortUrlSwitch()} + + ); diff --git a/src/legacy/ui/public/vis/editors/default/controls/__snapshots__/size.test.tsx.snap b/src/legacy/ui/public/vis/editors/default/controls/__snapshots__/size.test.tsx.snap index 5c6d45e5f0b9be..cbdf2cfd1f7da9 100644 --- a/src/legacy/ui/public/vis/editors/default/controls/__snapshots__/size.test.tsx.snap +++ b/src/legacy/ui/public/vis/editors/default/controls/__snapshots__/size.test.tsx.snap @@ -4,6 +4,7 @@ exports[`SizeParamEditor should init with the default set of props 1`] = ` - - setShowCustomLabel(!showCustomLabel)} - /> - - - onRemoveFilter(id)} - /> - - +
+ setShowCustomLabel(!showCustomLabel)} + /> + onRemoveFilter(id)} + /> +
); return ( @@ -99,7 +88,6 @@ function FilterRow({ label={`${filterLabel}${customLabel ? ` - ${customLabel}` : ''}`} labelAppend={FilterControl} fullWidth={true} - compressed > onChangeValue(id, value, ev.target.value)} fullWidth={true} + compressed />
) : null} + ); } diff --git a/src/legacy/ui/public/vis/editors/default/controls/filters.tsx b/src/legacy/ui/public/vis/editors/default/controls/filters.tsx index 648658b237d575..8d58c51a42a1b2 100644 --- a/src/legacy/ui/public/vis/editors/default/controls/filters.tsx +++ b/src/legacy/ui/public/vis/editors/default/controls/filters.tsx @@ -86,6 +86,7 @@ function FiltersParamEditor({ agg, value = [], setValue }: AggParamEditorProps + {filters.map(({ input, label, id }, arrayIndex) => ( setValue(ev.target.value)} fullWidth={true} + compressed isInvalid={showValidation ? !isValid : false} onBlur={setTouched} data-test-subj={`visEditorSubAggMetric${agg.id}`} diff --git a/src/legacy/ui/public/vis/editors/default/controls/number_interval.tsx b/src/legacy/ui/public/vis/editors/default/controls/number_interval.tsx index c2c685ded8cb35..33f92c337648c8 100644 --- a/src/legacy/ui/public/vis/editors/default/controls/number_interval.tsx +++ b/src/legacy/ui/public/vis/editors/default/controls/number_interval.tsx @@ -84,6 +84,7 @@ function NumberIntervalParamEditor({ onChange={onChange} onBlur={setTouched} fullWidth={true} + compressed placeholder={i18n.translate('common.ui.aggTypes.numberInterval.selectIntervalPlaceholder', { defaultMessage: 'Enter an interval', })} diff --git a/src/legacy/ui/public/vis/editors/default/controls/order.tsx b/src/legacy/ui/public/vis/editors/default/controls/order.tsx index c65d8f793eecd3..ec9be206fe1308 100644 --- a/src/legacy/ui/public/vis/editors/default/controls/order.tsx +++ b/src/legacy/ui/public/vis/editors/default/controls/order.tsx @@ -58,6 +58,7 @@ function OrderParamEditor({ setValue(aggParam.options.find((opt: OptionedValueProp) => opt.value === ev.target.value)) } fullWidth={true} + compressed isInvalid={showValidation ? !isValid : false} onBlur={setTouched} /> diff --git a/src/legacy/ui/public/vis/editors/default/controls/order_by.tsx b/src/legacy/ui/public/vis/editors/default/controls/order_by.tsx index 4319f2f539f1d6..1b199db6df02eb 100644 --- a/src/legacy/ui/public/vis/editors/default/controls/order_by.tsx +++ b/src/legacy/ui/public/vis/editors/default/controls/order_by.tsx @@ -123,6 +123,7 @@ function OrderByParamEditor({ value={value} onChange={ev => setValue(ev.target.value)} fullWidth={true} + compressed isInvalid={showValidation ? !isValid : false} onBlur={setTouched} data-test-subj={`visEditorOrderBy${agg.id}`} diff --git a/src/legacy/ui/public/vis/editors/default/controls/precision.tsx b/src/legacy/ui/public/vis/editors/default/controls/precision.tsx index 19b63712d72720..88f389cb7c009d 100644 --- a/src/legacy/ui/public/vis/editors/default/controls/precision.tsx +++ b/src/legacy/ui/public/vis/editors/default/controls/precision.tsx @@ -46,6 +46,7 @@ function PrecisionParamEditor({ agg, value, setValue }: AggParamEditorProps
); diff --git a/src/legacy/ui/public/vis/editors/default/controls/radius_ratio_option.tsx b/src/legacy/ui/public/vis/editors/default/controls/radius_ratio_option.tsx index f2625c628c3f12..02f6bb404db0c1 100644 --- a/src/legacy/ui/public/vis/editors/default/controls/radius_ratio_option.tsx +++ b/src/legacy/ui/public/vis/editors/default/controls/radius_ratio_option.tsx @@ -50,7 +50,7 @@ function RadiusRatioOptionControl({ editorStateParams, setValue }: AggControlPro }, []); return ( - + ); diff --git a/src/legacy/ui/public/vis/editors/default/controls/size.tsx b/src/legacy/ui/public/vis/editors/default/controls/size.tsx index 99d2e28c2d7405..121e5e9418021b 100644 --- a/src/legacy/ui/public/vis/editors/default/controls/size.tsx +++ b/src/legacy/ui/public/vis/editors/default/controls/size.tsx @@ -60,6 +60,7 @@ function SizeParamEditor({ value={isUndefined(value) ? '' : value} onChange={ev => setValue(ev.target.value === '' ? '' : parseFloat(ev.target.value))} fullWidth={true} + compressed isInvalid={showValidation ? !isValid : false} onBlur={setTouched} min={1} diff --git a/src/legacy/ui/public/vis/editors/default/controls/string.tsx b/src/legacy/ui/public/vis/editors/default/controls/string.tsx index 29bc3edc6fbc65..e48c623e9b9318 100644 --- a/src/legacy/ui/public/vis/editors/default/controls/string.tsx +++ b/src/legacy/ui/public/vis/editors/default/controls/string.tsx @@ -49,6 +49,7 @@ function StringParamEditor({ data-test-subj={`visEditorStringInput${agg.id}${aggParam.name}`} onChange={ev => setValue(ev.target.value)} fullWidth={true} + compressed onBlur={setTouched} isInvalid={showValidation ? !isValid : false} /> diff --git a/src/legacy/ui/public/vis/editors/default/controls/sub_metric.tsx b/src/legacy/ui/public/vis/editors/default/controls/sub_metric.tsx index 1bfe2f77172c49..0d4816306d12cb 100644 --- a/src/legacy/ui/public/vis/editors/default/controls/sub_metric.tsx +++ b/src/legacy/ui/public/vis/editors/default/controls/sub_metric.tsx @@ -18,7 +18,7 @@ */ import React, { useEffect, useState } from 'react'; -import { EuiFormLabel } from '@elastic/eui'; +import { EuiFormLabel, EuiSpacer } from '@elastic/eui'; import { i18n } from '@kbn/i18n'; import { AggParamType } from '../../../../agg_types/param_types/agg'; import { AggConfig } from '../../..'; @@ -65,6 +65,7 @@ function SubMetricParamEditor({ return ( <> {aggTitle} + - + +

{i18n.translate( 'xpack.apm.serviceDetails.enableErrorReportsPanel.triggerScheduleTitle', @@ -403,6 +404,7 @@ export class WatcherFlyout extends Component< disabled={this.state.schedule !== 'daily'} /> + )} + + +

{i18n.translate( diff --git a/x-pack/legacy/plugins/apm/public/components/shared/EnvironmentFilter/index.tsx b/x-pack/legacy/plugins/apm/public/components/shared/EnvironmentFilter/index.tsx index d9618a043175fa..212c4e427f1880 100644 --- a/x-pack/legacy/plugins/apm/public/components/shared/EnvironmentFilter/index.tsx +++ b/x-pack/legacy/plugins/apm/public/components/shared/EnvironmentFilter/index.tsx @@ -4,7 +4,7 @@ * you may not use this file except in compliance with the Elastic License. */ -import { EuiSelect, EuiFormLabel } from '@elastic/eui'; +import { EuiSelect } from '@elastic/eui'; import { i18n } from '@kbn/i18n'; import React from 'react'; import { useFetcher } from '../../../hooks/useFetcher'; @@ -96,13 +96,9 @@ export const EnvironmentFilter: React.FC = () => { return ( - {i18n.translate('xpack.apm.filter.environment.label', { - defaultMessage: 'environment' - })} - - } + prepend={i18n.translate('xpack.apm.filter.environment.label', { + defaultMessage: 'environment' + })} options={getOptions(environments)} value={environment || ENVIRONMENT_ALL} onChange={event => { diff --git a/x-pack/legacy/plugins/beats_management/public/components/tag/config_view/index.tsx b/x-pack/legacy/plugins/beats_management/public/components/tag/config_view/index.tsx index fe505eb8207d9b..20eb2b9c3fd0d9 100644 --- a/x-pack/legacy/plugins/beats_management/public/components/tag/config_view/index.tsx +++ b/x-pack/legacy/plugins/beats_management/public/components/tag/config_view/index.tsx @@ -17,6 +17,7 @@ import { EuiFormRow, EuiHorizontalRule, EuiSelect, + EuiSpacer, EuiTitle, } from '@elastic/eui'; import { i18n } from '@kbn/i18n'; @@ -119,6 +120,7 @@ class ConfigViewUi extends React.Component { )} /> +

{i18n.translate('xpack.beatsManagement.tagConfig.configurationTypeText', { defaultMessage: '{configType} configuration', diff --git a/x-pack/legacy/plugins/canvas/canvas_plugin_src/uis/arguments/axis_config/__examples__/__snapshots__/extended_template.examples.storyshot b/x-pack/legacy/plugins/canvas/canvas_plugin_src/uis/arguments/axis_config/__examples__/__snapshots__/extended_template.examples.storyshot index c256ff8e23502e..df617985631646 100644 --- a/x-pack/legacy/plugins/canvas/canvas_plugin_src/uis/arguments/axis_config/__examples__/__snapshots__/extended_template.examples.storyshot +++ b/x-pack/legacy/plugins/canvas/canvas_plugin_src/uis/arguments/axis_config/__examples__/__snapshots__/extended_template.examples.storyshot @@ -14,57 +14,63 @@ exports[`Storyshots arguments/AxisConfig extended 1`] = ` className="euiFormRow euiFormRow--compressed" id="generated-id-row" > -
+
- -
- + bottom + + + +
- - + + + +
@@ -86,57 +92,63 @@ exports[`Storyshots arguments/AxisConfig/components extended 1`] = ` className="euiFormRow euiFormRow--compressed" id="generated-id-row" > -
+
- -
- + left + + + +
- - + + + +
diff --git a/x-pack/legacy/plugins/canvas/canvas_plugin_src/uis/datasources/timelion.js b/x-pack/legacy/plugins/canvas/canvas_plugin_src/uis/datasources/timelion.js index 34860e328b5eea..3de5976b81c057 100644 --- a/x-pack/legacy/plugins/canvas/canvas_plugin_src/uis/datasources/timelion.js +++ b/x-pack/legacy/plugins/canvas/canvas_plugin_src/uis/datasources/timelion.js @@ -81,6 +81,8 @@ const TimelionDatasource = ({ args, updateArgs, defaultIndex }) => { setArg('interval', e.target.value)} /> + +
  • diff --git a/x-pack/legacy/plugins/canvas/public/components/arg_form/advanced_failure.js b/x-pack/legacy/plugins/canvas/public/components/arg_form/advanced_failure.js index a973bfd65b9ed8..b42d6e0340ef61 100644 --- a/x-pack/legacy/plugins/canvas/public/components/arg_form/advanced_failure.js +++ b/x-pack/legacy/plugins/canvas/public/components/arg_form/advanced_failure.js @@ -7,7 +7,14 @@ import React from 'react'; import PropTypes from 'prop-types'; import { compose, withProps, withPropsOnChange } from 'recompose'; -import { EuiForm, EuiTextArea, EuiButton, EuiButtonEmpty, EuiFormRow } from '@elastic/eui'; +import { + EuiForm, + EuiTextArea, + EuiButton, + EuiButtonEmpty, + EuiFormRow, + EuiSpacer, +} from '@elastic/eui'; import { fromExpression, toExpression } from '@kbn/interpreter/common'; import { createStatefulPropHoc } from '../../components/enhance/stateful_prop'; @@ -49,6 +56,7 @@ export const AdvancedFailureComponent = props => { rows={3} /> +
    valueChange(e)} size="s" type="submit"> Apply diff --git a/x-pack/legacy/plugins/canvas/public/components/custom_element_modal/__examples__/__snapshots__/custom_element_modal.examples.storyshot b/x-pack/legacy/plugins/canvas/public/components/custom_element_modal/__examples__/__snapshots__/custom_element_modal.examples.storyshot index 69924bda523673..126c578d515d65 100644 --- a/x-pack/legacy/plugins/canvas/public/components/custom_element_modal/__examples__/__snapshots__/custom_element_modal.examples.storyshot +++ b/x-pack/legacy/plugins/canvas/public/components/custom_element_modal/__examples__/__snapshots__/custom_element_modal.examples.storyshot @@ -95,116 +95,134 @@ Array [ className="euiFormRow euiFormRow--compressed" id="generated-id-row" > -
    +
    - +
    + +
    +
    +
    + 40 characters remaining
    -
    -
    - 40 characters remaining
    -
    +
    -