diff --git a/package.json b/package.json index d074463c82f89..724bc7c73b42c 100644 --- a/package.json +++ b/package.json @@ -204,7 +204,7 @@ "yauzl": "2.7.0" }, "devDependencies": { - "@elastic/eslint-config-kibana": "0.9.0", + "@elastic/eslint-config-kibana": "0.10.0", "@elastic/eslint-import-resolver-kibana": "0.8.1", "@elastic/eslint-plugin-kibana-custom": "1.0.3", "angular-mocks": "1.4.7", diff --git a/src/core_plugins/kibana/public/dashboard/top_nav/clone_modal.js b/src/core_plugins/kibana/public/dashboard/top_nav/clone_modal.js index 564d3d0912f68..6cca9f6054a0a 100644 --- a/src/core_plugins/kibana/public/dashboard/top_nav/clone_modal.js +++ b/src/core_plugins/kibana/public/dashboard/top_nav/clone_modal.js @@ -42,7 +42,7 @@ export class DashboardCloneModal extends React.Component { data-tests-subj="dashboardCloneModal" aria-label="Clone a dashboard" className="dashboardCloneModal" - onKeyDown={ this.onKeyDown } + onKeyDown={this.onKeyDown} > @@ -58,8 +58,8 @@ export class DashboardCloneModal extends React.Component { autoFocus data-test-subj="clonedDashboardTitle" className="kuiTextInput kuiTextInput--large" - value={ this.state.newDashboardName } - onChange={ this.onInputChange } + value={this.state.newDashboardName} + onChange={this.onInputChange} /> @@ -68,14 +68,14 @@ export class DashboardCloneModal extends React.Component { Cancel Confirm Clone diff --git a/src/core_plugins/metrics/public/components/add_delete_buttons.js b/src/core_plugins/metrics/public/components/add_delete_buttons.js index 38ebfc1bbbec1..215a8ed9ffe14 100644 --- a/src/core_plugins/metrics/public/components/add_delete_buttons.js +++ b/src/core_plugins/metrics/public/components/add_delete_buttons.js @@ -8,7 +8,7 @@ function AddDeleteButtons(props) { } return ( - + @@ -20,7 +20,7 @@ function AddDeleteButtons(props) { } return ( - + @@ -32,7 +32,7 @@ function AddDeleteButtons(props) { if (props.onClone && !props.disableAdd) { clone = ( - + diff --git a/src/core_plugins/metrics/public/components/aggs/derivative.js b/src/core_plugins/metrics/public/components/aggs/derivative.js index 7206f33e21c61..03cfd49adf63a 100644 --- a/src/core_plugins/metrics/public/components/aggs/derivative.js +++ b/src/core_plugins/metrics/public/components/aggs/derivative.js @@ -1,4 +1,4 @@ -import React, { Component, PropTypes } from 'react'; +import React, { PropTypes } from 'react'; import AggSelect from './agg_select'; import MetricSelect from './metric_select'; import AggRow from './agg_row'; @@ -6,57 +6,53 @@ import createChangeHandler from '../lib/create_change_handler'; import createSelectHandler from '../lib/create_select_handler'; import createTextHandler from '../lib/create_text_handler'; -class DerivativeAgg extends Component { +export const DerivativeAgg = props => { + const { siblings } = props; - render() { - const { siblings } = this.props; + const defaults = { unit: '' }; + const model = { ...defaults, ...props.model }; - const defaults = { unit: '' }; - const model = { ...defaults, ...this.props.model }; + const handleChange = createChangeHandler(props.onChange, model); + const handleSelectChange = createSelectHandler(handleChange); + const handleTextChange = createTextHandler(handleChange); - const handleChange = createChangeHandler(this.props.onChange, model); - const handleSelectChange = createSelectHandler(handleChange); - const handleTextChange = createTextHandler(handleChange); - - return ( - -
-
Aggregation
- -
-
-
Metric
- -
-
-
Units (1s, 1m, etc)
- -
-
- ); - } - -} + return ( + +
+
Aggregation
+ +
+
+
Metric
+ +
+
+
Units (1s, 1m, etc)
+ +
+
+ ); +}; DerivativeAgg.propTypes = { disableDelete: PropTypes.bool, @@ -69,5 +65,3 @@ DerivativeAgg.propTypes = { series: PropTypes.object, siblings: PropTypes.array, }; - -export default DerivativeAgg; diff --git a/src/core_plugins/metrics/public/components/aggs/filter_ratio.js b/src/core_plugins/metrics/public/components/aggs/filter_ratio.js index 734f8ddb63556..94098e3bd3636 100644 --- a/src/core_plugins/metrics/public/components/aggs/filter_ratio.js +++ b/src/core_plugins/metrics/public/components/aggs/filter_ratio.js @@ -1,4 +1,4 @@ -import React, { Component, PropTypes } from 'react'; +import React, { PropTypes } from 'react'; import AggSelect from './agg_select'; import FieldSelect from './field_select'; import AggRow from './agg_row'; @@ -6,94 +6,90 @@ import createChangeHandler from '../lib/create_change_handler'; import createSelectHandler from '../lib/create_select_handler'; import createTextHandler from '../lib/create_text_handler'; -class FilterRatioAgg extends Component { +export const FilterRatioAgg = props => { + const { + series, + fields, + panel + } = props; - render() { - const { - series, - fields, - panel - } = this.props; + const handleChange = createChangeHandler(props.onChange, props.model); + const handleSelectChange = createSelectHandler(handleChange); + const handleTextChange = createTextHandler(handleChange); + const indexPattern = series.override_index_pattern && series.series_index_pattern || panel.index_pattern; - const handleChange = createChangeHandler(this.props.onChange, this.props.model); - const handleSelectChange = createSelectHandler(handleChange); - const handleTextChange = createTextHandler(handleChange); - const indexPattern = series.override_index_pattern && series.series_index_pattern || panel.index_pattern; + const defaults = { + numerator: '*', + denominator: '*', + metric_agg: 'count' + }; - const defaults = { - numerator: '*', - denominator: '*', - metric_agg: 'count' - }; + const model = { ...defaults, ...props.model }; - const model = { ...defaults, ...this.props.model }; - - return ( - -
-
-
-
Aggregation
- -
-
-
Numerator
- -
-
-
Denominator
- -
+ return ( + +
+
+
+
Aggregation
+ +
+
+
Numerator
+
-
+
+
Denominator
+ +
+
+
+
+
Metric Aggregation
+ +
+ { model.metric_agg !== 'count' ? (
-
Metric Aggregation
- Field
+ -
- { model.metric_agg !== 'count' ? ( -
-
Field
- -
) : null } -
+
) : null }
- - ); - } - -} +
+
+ ); +}; FilterRatioAgg.propTypes = { disableDelete: PropTypes.bool, @@ -106,5 +102,3 @@ FilterRatioAgg.propTypes = { series: PropTypes.object, siblings: PropTypes.array, }; - -export default FilterRatioAgg; diff --git a/src/core_plugins/metrics/public/components/aggs/moving_average.js b/src/core_plugins/metrics/public/components/aggs/moving_average.js index b2c12aa7aa993..4f9ad7bc26dc4 100644 --- a/src/core_plugins/metrics/public/components/aggs/moving_average.js +++ b/src/core_plugins/metrics/public/components/aggs/moving_average.js @@ -1,4 +1,4 @@ -import React, { Component, PropTypes } from 'react'; +import React, { PropTypes } from 'react'; import AggRow from './agg_row'; import AggSelect from './agg_select'; import MetricSelect from './metric_select'; @@ -8,106 +8,103 @@ import createSelectHandler from '../lib/create_select_handler'; import createTextHandler from '../lib/create_text_handler'; import createNumberHandler from '../lib/create_number_handler'; -class MovingAverageAgg extends Component { - render() { - const { siblings } = this.props; - const defaults = { - settings: '', - minimize: 0, - window: '', - model: 'simple' - }; - const model = { ...defaults, ...this.props.model }; - const handleChange = createChangeHandler(this.props.onChange, model); - const handleSelectChange = createSelectHandler(handleChange); - const handleTextChange = createTextHandler(handleChange); - const handleNumberChange = createNumberHandler(handleChange); - const modelOptions = [ - { label: 'Simple', value: 'simple' }, - { label: 'Linear', value: 'linear' }, - { label: 'Exponentially Weighted', value: 'ewma' }, - { label: 'Holt-Linear', value: 'holt' }, - { label: 'Holt-Winters', value: 'holt_winters' } - ]; - const minimizeOptions = [ - { label: 'True', value: 1 }, - { label: 'False', value: 0 } - ]; - return ( - -
-
-
-
Aggregation
- -
-
-
Metric
- -
+export const MovingAverageAgg = props => { + const { siblings } = props; + const defaults = { + settings: '', + minimize: 0, + window: '', + model: 'simple' + }; + const model = { ...defaults, ...props.model }; + const handleChange = createChangeHandler(props.onChange, model); + const handleSelectChange = createSelectHandler(handleChange); + const handleTextChange = createTextHandler(handleChange); + const handleNumberChange = createNumberHandler(handleChange); + const modelOptions = [ + { label: 'Simple', value: 'simple' }, + { label: 'Linear', value: 'linear' }, + { label: 'Exponentially Weighted', value: 'ewma' }, + { label: 'Holt-Linear', value: 'holt' }, + { label: 'Holt-Winters', value: 'holt_winters' } + ]; + const minimizeOptions = [ + { label: 'True', value: 1 }, + { label: 'False', value: 0 } + ]; + return ( + +
+
+
+
Aggregation
+
-
-
-
Model
- -
-
-
Minimize
- -
+
+
+
+
Model
+ +
+
+
Minimize
+ +
+
+
+ + ); +}; MovingAverageAgg.propTypes = { disableDelete: PropTypes.bool, @@ -120,5 +117,3 @@ MovingAverageAgg.propTypes = { series: PropTypes.object, siblings: PropTypes.array, }; - -export default MovingAverageAgg; diff --git a/src/core_plugins/metrics/public/components/aggs/percentile.js b/src/core_plugins/metrics/public/components/aggs/percentile.js index 0573797d0ff46..4bd24b98adae3 100644 --- a/src/core_plugins/metrics/public/components/aggs/percentile.js +++ b/src/core_plugins/metrics/public/components/aggs/percentile.js @@ -114,7 +114,7 @@ Percentiles.propTypes = { }; -class PercentileAgg extends Component { +class PercentileAgg extends Component { // eslint-disable-line react/no-multi-comp componentWillMount() { if (!this.props.model.percentiles) { diff --git a/src/core_plugins/metrics/public/components/aggs/percentile_rank.js b/src/core_plugins/metrics/public/components/aggs/percentile_rank.js index e5c32a2c291ef..de02f27856b57 100644 --- a/src/core_plugins/metrics/public/components/aggs/percentile_rank.js +++ b/src/core_plugins/metrics/public/components/aggs/percentile_rank.js @@ -1,4 +1,4 @@ -import React, { Component, PropTypes } from 'react'; +import React, { PropTypes } from 'react'; import AggSelect from './agg_select'; import FieldSelect from './field_select'; import AggRow from './agg_row'; @@ -6,60 +6,55 @@ import createChangeHandler from '../lib/create_change_handler'; import createSelectHandler from '../lib/create_select_handler'; import createTextHandler from '../lib/create_text_handler'; -class PercentileRankAgg extends Component { +export const PercentileRankAgg = props => { + const { series, panel, fields } = props; + const defaults = { value: '' }; + const model = { ...defaults, ...props.model }; - render() { - const { series, panel, fields } = this.props; - const defaults = { value: '' }; - const model = { ...defaults, ...this.props.model }; + const handleChange = createChangeHandler(props.onChange, model); + const handleSelectChange = createSelectHandler(handleChange); + const handleTextChange = createTextHandler(handleChange); + const indexPattern = series.override_index_pattern && series.series_index_pattern || panel.index_pattern; - const handleChange = createChangeHandler(this.props.onChange, model); - const handleSelectChange = createSelectHandler(handleChange); - const handleTextChange = createTextHandler(handleChange); - - const indexPattern = series.override_index_pattern && series.series_index_pattern || panel.index_pattern; - - return ( - -
-
Aggregation
- -
-
-
Field
- -
-
-
Value
- -
-
- ); - } - -} + return ( + +
+
Aggregation
+ +
+
+
Field
+ +
+
+
Value
+ +
+
+ ); +}; PercentileRankAgg.propTypes = { disableDelete: PropTypes.bool, @@ -72,6 +67,3 @@ PercentileRankAgg.propTypes = { series: PropTypes.object, siblings: PropTypes.array, }; - -export default PercentileRankAgg; - diff --git a/src/core_plugins/metrics/public/components/aggs/positive_only.js b/src/core_plugins/metrics/public/components/aggs/positive_only.js index afb243c6effc0..543c814a75956 100644 --- a/src/core_plugins/metrics/public/components/aggs/positive_only.js +++ b/src/core_plugins/metrics/public/components/aggs/positive_only.js @@ -1,51 +1,47 @@ -import React, { Component, PropTypes } from 'react'; +import React, { PropTypes } from 'react'; import AggSelect from './agg_select'; import MetricSelect from './metric_select'; import AggRow from './agg_row'; import createChangeHandler from '../lib/create_change_handler'; import createSelectHandler from '../lib/create_select_handler'; -class PositiveOnlyAgg extends Component { - - render() { - const { siblings } = this.props; - - const defaults = { unit: '' }; - const model = { ...defaults, ...this.props.model }; - - const handleChange = createChangeHandler(this.props.onChange, model); - const handleSelectChange = createSelectHandler(handleChange); - - return ( - -
-
Aggregation
- -
-
-
Metric
- -
-
- ); - } - -} +export const PositiveOnlyAgg = props => { + const { siblings } = props; + + const defaults = { unit: '' }; + const model = { ...defaults, ...props.model }; + + const handleChange = createChangeHandler(props.onChange, model); + const handleSelectChange = createSelectHandler(handleChange); + + return ( + +
+
Aggregation
+ +
+
+
Metric
+ +
+
+ ); +}; PositiveOnlyAgg.propTypes = { disableDelete: PropTypes.bool, @@ -58,5 +54,3 @@ PositiveOnlyAgg.propTypes = { series: PropTypes.object, siblings: PropTypes.array, }; - -export default PositiveOnlyAgg; diff --git a/src/core_plugins/metrics/public/components/aggs/serial_diff.js b/src/core_plugins/metrics/public/components/aggs/serial_diff.js index 1b102390c80aa..33d20a3a1e16f 100644 --- a/src/core_plugins/metrics/public/components/aggs/serial_diff.js +++ b/src/core_plugins/metrics/public/components/aggs/serial_diff.js @@ -1,4 +1,4 @@ -import React, { Component, PropTypes } from 'react'; +import React, { PropTypes } from 'react'; import AggSelect from './agg_select'; import MetricSelect from './metric_select'; import AggRow from './agg_row'; @@ -6,56 +6,52 @@ import createChangeHandler from '../lib/create_change_handler'; import createSelectHandler from '../lib/create_select_handler'; import createNumberHandler from '../lib/create_number_handler'; -class SerialDiffAgg extends Component { +export const SerialDiffAgg = props => { + const { siblings } = props; + const defaults = { lag: '' }; + const model = { ...defaults, ...props.model }; - render() { - const { siblings } = this.props; - const defaults = { lag: '' }; - const model = { ...defaults, ...this.props.model }; + const handleChange = createChangeHandler(props.onChange, model); + const handleSelectChange = createSelectHandler(handleChange); + const handleNumberChange = createNumberHandler(handleChange); - const handleChange = createChangeHandler(this.props.onChange, model); - const handleSelectChange = createSelectHandler(handleChange); - const handleNumberChange = createNumberHandler(handleChange); - - return ( - -
-
Aggregation
- -
-
-
Metric
- -
-
-
Lag
- -
-
- ); - } - -} + return ( + +
+
Aggregation
+ +
+
+
Metric
+ +
+
+
Lag
+ +
+
+ ); +}; SerialDiffAgg.propTypes = { disableDelete: PropTypes.bool, @@ -68,6 +64,3 @@ SerialDiffAgg.propTypes = { series: PropTypes.object, siblings: PropTypes.array, }; - -export default SerialDiffAgg; - diff --git a/src/core_plugins/metrics/public/components/aggs/static.js b/src/core_plugins/metrics/public/components/aggs/static.js index 7193c0bd8beb2..d383eb21f16b4 100644 --- a/src/core_plugins/metrics/public/components/aggs/static.js +++ b/src/core_plugins/metrics/public/components/aggs/static.js @@ -1,62 +1,58 @@ -import React, { Component, PropTypes } from 'react'; +import React, { PropTypes } from 'react'; import AggSelect from './agg_select'; import AggRow from './agg_row'; import createChangeHandler from '../lib/create_change_handler'; import createSelectHandler from '../lib/create_select_handler'; import createTextHandler from '../lib/create_text_handler'; -class FilterRatioAgg extends Component { +export const Static = props => { + const handleChange = createChangeHandler(props.onChange, props.model); + const handleSelectChange = createSelectHandler(handleChange); + const handleTextChange = createTextHandler(handleChange); - render() { - const handleChange = createChangeHandler(this.props.onChange, this.props.model); - const handleSelectChange = createSelectHandler(handleChange); - const handleTextChange = createTextHandler(handleChange); + const defaults = { + numerator: '*', + denominator: '*', + metric_agg: 'count' + }; - const defaults = { - numerator: '*', - denominator: '*', - metric_agg: 'count' - }; + const model = { ...defaults, ...props.model }; - const model = { ...defaults, ...this.props.model }; - - return ( - -
-
-
-
Aggregation
- -
-
-
Static Value
- -
+ return ( + +
+
+
+
Aggregation
+ +
+
+
Static Value
+
- - ); - } - -} +
+
+ ); +}; -FilterRatioAgg.propTypes = { +Static.propTypes = { disableDelete: PropTypes.bool, fields: PropTypes.object, model: PropTypes.object, @@ -67,6 +63,3 @@ FilterRatioAgg.propTypes = { series: PropTypes.object, siblings: PropTypes.array, }; - -export default FilterRatioAgg; - diff --git a/src/core_plugins/metrics/public/components/aggs/std_deviation.js b/src/core_plugins/metrics/public/components/aggs/std_deviation.js index e9b38f4a3c6a4..803d0e240e3d2 100644 --- a/src/core_plugins/metrics/public/components/aggs/std_deviation.js +++ b/src/core_plugins/metrics/public/components/aggs/std_deviation.js @@ -1,4 +1,4 @@ -import React, { Component, PropTypes } from 'react'; +import React, { PropTypes } from 'react'; import AggSelect from './agg_select'; import FieldSelect from './field_select'; import AggRow from './agg_row'; @@ -7,74 +7,70 @@ import createChangeHandler from '../lib/create_change_handler'; import createSelectHandler from '../lib/create_select_handler'; import createTextHandler from '../lib/create_text_handler'; -class StandardDeviationAgg extends Component { +export const StandardDeviationAgg = props => { + const { series, panel, fields } = props; + const defaults = { sigma: '' }; + const model = { ...defaults, ...props.model }; - render() { - const { series, panel, fields } = this.props; - const defaults = { sigma: '' }; - const model = { ...defaults, ...this.props.model }; + const modeOptions = [ + { label: 'Raw', value: 'raw' }, + { label: 'Upper Bound', value: 'upper' }, + { label: 'Lower Bound', value: 'lower' }, + { label: 'Bounds Band', value: 'band' } + ]; - const modeOptions = [ - { label: 'Raw', value: 'raw' }, - { label: 'Upper Bound', value: 'upper' }, - { label: 'Lower Bound', value: 'lower' }, - { label: 'Bounds Band', value: 'band' } - ]; + const handleChange = createChangeHandler(props.onChange, model); + const handleSelectChange = createSelectHandler(handleChange); + const handleTextChange = createTextHandler(handleChange); - const handleChange = createChangeHandler(this.props.onChange, model); - const handleSelectChange = createSelectHandler(handleChange); - const handleTextChange = createTextHandler(handleChange); + const indexPattern = series.override_index_pattern && series.series_index_pattern || panel.index_pattern; - const indexPattern = series.override_index_pattern && series.series_index_pattern || panel.index_pattern; - - return ( - -
-
Aggregation
- -
-
-
Field
- -
-
-
Sigma
- -
-
-
Mode
- +
+
+
Mode
+ -
- ); - - const modeOptions = [ - { label: 'Raw', value: 'raw' }, - { label: 'Upper Bound', value: 'upper' }, - { label: 'Lower Bound', value: 'lower' }, - { label: 'Bounds Band', value: 'band' } - ]; + const stdDev = {}; + if (model.type === 'std_deviation_bucket') { + stdDev.sigma = ( +
+
Sigma
+ +
+ ); - stdDev.mode = ( -
-
Mode
- +
); } -} + return ( + +
+
Aggregation
+ +
+
+
Metric
+ +
+ { stdDev.sigma } + { stdDev.mode } +
+ ); +}; StandardSiblingAgg.propTypes = { disableDelete: PropTypes.bool, @@ -95,5 +91,3 @@ StandardSiblingAgg.propTypes = { series: PropTypes.object, siblings: PropTypes.array, }; - -export default StandardSiblingAgg; diff --git a/src/core_plugins/metrics/public/components/color_picker.js b/src/core_plugins/metrics/public/components/color_picker.js index 30276b35b51e9..01ff23857b542 100644 --- a/src/core_plugins/metrics/public/components/color_picker.js +++ b/src/core_plugins/metrics/public/components/color_picker.js @@ -82,7 +82,7 @@ class ColorPicker extends Component { onClick={this.handleClose} />
diff --git a/src/core_plugins/metrics/public/components/custom_color_picker.js b/src/core_plugins/metrics/public/components/custom_color_picker.js index 382aec8a116aa..5f3bd4f818537 100644 --- a/src/core_plugins/metrics/public/components/custom_color_picker.js +++ b/src/core_plugins/metrics/public/components/custom_color_picker.js @@ -66,21 +66,21 @@ export class CustomColorPicker extends Component {
-
-
+
+
-
+
-
+
{ + const { fields, prefix } = props; + const handleSelectChange = createSelectHandler(props.onChange); + const handleTextChange = createTextHandler(props.onChange); + const timeFieldName = `${prefix}time_field`; + const indexPatternName = `${prefix}index_pattern`; + const intervalName = `${prefix}interval`; + const dropBucketName = `${prefix}drop_last_bucket`; - const defaults = { - [indexPatternName]: '*', - [intervalName]: 'auto', - [dropBucketName]: 1 - }; + const defaults = { + [indexPatternName]: '*', + [intervalName]: 'auto', + [dropBucketName]: 1 + }; - const model = { ...defaults, ...this.props.model }; - return ( -
-
Index Pattern
- -
Time Field
-
- -
-
Interval (auto, 1m, 1d, 1w, 1y)
- -
Drop Last Bucket
- +
Index Pattern
+ +
Time Field
+
+
- ); - } -} +
Interval (auto, 1m, 1d, 1w, 1y)
+ +
Drop Last Bucket
+ +
+ ); +}; IndexPattern.defaultProps = { prefix: '', @@ -73,5 +71,3 @@ IndexPattern.propTypes = { disabled: PropTypes.bool, className: PropTypes.string }; - -export default IndexPattern; diff --git a/src/core_plugins/metrics/public/components/lib/agg_to_component.js b/src/core_plugins/metrics/public/components/lib/agg_to_component.js index 14a1c7e552cbe..9a6b0369b26f3 100644 --- a/src/core_plugins/metrics/public/components/lib/agg_to_component.js +++ b/src/core_plugins/metrics/public/components/lib/agg_to_component.js @@ -1,45 +1,45 @@ -import MovingAverage from '../aggs/moving_average'; -import Derivative from '../aggs/derivative'; +import { MovingAverageAgg } from '../aggs/moving_average'; +import { DerivativeAgg } from '../aggs/derivative'; import Calculation from '../aggs/calculation'; import StdAgg from '../aggs/std_agg'; import Percentile from '../aggs/percentile'; import CumulativeSum from '../aggs/cumulative_sum'; -import StdDeviation from '../aggs/std_deviation'; -import StdSibling from '../aggs/std_sibling'; +import { StandardDeviationAgg } from '../aggs/std_deviation'; +import { StandardSiblingAgg } from '../aggs/std_sibling'; import SeriesAgg from '../aggs/series_agg'; -import SerialDiff from '../aggs/serial_diff'; -import PositiveOnly from '../aggs/positive_only'; -import FilterRatio from '../aggs/filter_ratio'; -import PercentileRank from '../aggs/percentile_rank'; -import Static from '../aggs/static'; +import { SerialDiffAgg } from '../aggs/serial_diff'; +import { PositiveOnlyAgg } from '../aggs/positive_only'; +import { FilterRatioAgg } from '../aggs/filter_ratio'; +import { PercentileRankAgg } from '../aggs/percentile_rank'; +import { Static } from '../aggs/static'; export default { count: StdAgg, avg: StdAgg, max: StdAgg, min: StdAgg, sum: StdAgg, - std_deviation: StdDeviation, + std_deviation: StandardDeviationAgg, sum_of_squares: StdAgg, variance: StdAgg, - avg_bucket: StdSibling, - max_bucket: StdSibling, - min_bucket: StdSibling, - sum_bucket: StdSibling, - variance_bucket: StdSibling, - sum_of_squares_bucket: StdSibling, - std_deviation_bucket: StdSibling, + avg_bucket: StandardSiblingAgg, + max_bucket: StandardSiblingAgg, + min_bucket: StandardSiblingAgg, + sum_bucket: StandardSiblingAgg, + variance_bucket: StandardSiblingAgg, + sum_of_squares_bucket: StandardSiblingAgg, + std_deviation_bucket: StandardSiblingAgg, percentile: Percentile, - percentile_rank: PercentileRank, + percentile_rank: PercentileRankAgg, cardinality: StdAgg, value_count: StdAgg, calculation: Calculation, cumulative_sum: CumulativeSum, - moving_average: MovingAverage, - derivative: Derivative, + moving_average: MovingAverageAgg, + derivative: DerivativeAgg, series_agg: SeriesAgg, - serial_diff: SerialDiff, - filter_ratio: FilterRatio, - positive_only: PositiveOnly, + serial_diff: SerialDiffAgg, + filter_ratio: FilterRatioAgg, + positive_only: PositiveOnlyAgg, static: Static }; diff --git a/src/core_plugins/metrics/public/components/markdown_editor.js b/src/core_plugins/metrics/public/components/markdown_editor.js index 5d1913b949a14..2b4bc7baac66b 100644 --- a/src/core_plugins/metrics/public/components/markdown_editor.js +++ b/src/core_plugins/metrics/public/components/markdown_editor.js @@ -48,7 +48,7 @@ class MarkdownEditor extends Component { - "{ value }" + “{ value }” ); @@ -67,7 +67,7 @@ class MarkdownEditor extends Component { - [ [ "{date}", "{value}" ], ... ] + [ [ “{date}”, “{value}” ], ... ] ); diff --git a/src/core_plugins/metrics/public/components/panel_config.js b/src/core_plugins/metrics/public/components/panel_config.js index 26aa7fda0ed9b..5ec2b849b746d 100644 --- a/src/core_plugins/metrics/public/components/panel_config.js +++ b/src/core_plugins/metrics/public/components/panel_config.js @@ -19,7 +19,7 @@ function PanelConfig(props) { if (component) { return React.createElement(component, props); } - return (
Missing panel config for "{model.type}"
); + return (
Missing panel config for “{model.type}”
); } PanelConfig.propTypes = { diff --git a/src/core_plugins/metrics/public/components/panel_config/gauge.js b/src/core_plugins/metrics/public/components/panel_config/gauge.js index 17b690d80e613..b70227b3a7f92 100644 --- a/src/core_plugins/metrics/public/components/panel_config/gauge.js +++ b/src/core_plugins/metrics/public/components/panel_config/gauge.js @@ -1,6 +1,6 @@ import React, { Component, PropTypes } from 'react'; import SeriesEditor from '../series_editor'; -import IndexPattern from '../index_pattern'; +import { IndexPattern } from '../index_pattern'; import Select from 'react-select'; import createSelectHandler from '../lib/create_select_handler'; import createTextHandler from '../lib/create_text_handler'; diff --git a/src/core_plugins/metrics/public/components/panel_config/markdown.js b/src/core_plugins/metrics/public/components/panel_config/markdown.js index 28148e1504218..8c065ece6c1a4 100644 --- a/src/core_plugins/metrics/public/components/panel_config/markdown.js +++ b/src/core_plugins/metrics/public/components/panel_config/markdown.js @@ -1,6 +1,6 @@ import React, { Component, PropTypes } from 'react'; import SeriesEditor from '../series_editor'; -import IndexPattern from '../index_pattern'; +import { IndexPattern } from '../index_pattern'; import AceEditor from 'react-ace'; import 'brace/mode/less'; import Select from 'react-select'; @@ -120,7 +120,7 @@ class MarkdownPanelConfig extends Component { width="100%" name={`ace-css-${model.id}`} setOptions={{ fontSize: '14px' }} - value={ model.markdown_less} + value={model.markdown_less} onChange={this.handleCSSChange} />
diff --git a/src/core_plugins/metrics/public/components/panel_config/metric.js b/src/core_plugins/metrics/public/components/panel_config/metric.js index 9cd6b18de3aea..5879503040a5f 100644 --- a/src/core_plugins/metrics/public/components/panel_config/metric.js +++ b/src/core_plugins/metrics/public/components/panel_config/metric.js @@ -1,6 +1,6 @@ import React, { Component, PropTypes } from 'react'; import SeriesEditor from '../series_editor'; -import IndexPattern from '../index_pattern'; +import { IndexPattern } from '../index_pattern'; import createTextHandler from '../lib/create_text_handler'; import ColorRules from '../color_rules'; import YesNo from '../yes_no'; diff --git a/src/core_plugins/metrics/public/components/panel_config/timeseries.js b/src/core_plugins/metrics/public/components/panel_config/timeseries.js index dafbfaeb54c66..ce81e1b37d1c6 100644 --- a/src/core_plugins/metrics/public/components/panel_config/timeseries.js +++ b/src/core_plugins/metrics/public/components/panel_config/timeseries.js @@ -1,7 +1,7 @@ import React, { Component, PropTypes } from 'react'; import SeriesEditor from '../series_editor'; import AnnotationsEditor from '../annotations_editor'; -import IndexPattern from '../index_pattern'; +import { IndexPattern } from '../index_pattern'; import Select from 'react-select'; import createSelectHandler from '../lib/create_select_handler'; import createTextHandler from '../lib/create_text_handler'; diff --git a/src/core_plugins/metrics/public/components/panel_config/top_n.js b/src/core_plugins/metrics/public/components/panel_config/top_n.js index 6b0ae65010333..01166f9603ae1 100644 --- a/src/core_plugins/metrics/public/components/panel_config/top_n.js +++ b/src/core_plugins/metrics/public/components/panel_config/top_n.js @@ -1,6 +1,6 @@ import React, { Component, PropTypes } from 'react'; import SeriesEditor from '../series_editor'; -import IndexPattern from '../index_pattern'; +import { IndexPattern } from '../index_pattern'; import createTextHandler from '../lib/create_text_handler'; import ColorRules from '../color_rules'; import ColorPicker from '../color_picker'; diff --git a/src/core_plugins/metrics/public/components/series_config.js b/src/core_plugins/metrics/public/components/series_config.js index 3a1883159bd29..b9b19ef70a0ba 100644 --- a/src/core_plugins/metrics/public/components/series_config.js +++ b/src/core_plugins/metrics/public/components/series_config.js @@ -1,61 +1,58 @@ -import React, { Component, PropTypes } from 'react'; +import React, { PropTypes } from 'react'; import DataFormatPicker from './data_format_picker'; import createSelectHandler from './lib/create_select_handler'; import createTextHandler from './lib/create_text_handler'; import YesNo from './yes_no'; -import IndexPattern from './index_pattern'; +import { IndexPattern } from './index_pattern'; -class SeriesConfig extends Component { - render() { - const defaults = { offset_time: '', value_template: '' }; - const model = { ...defaults, ...this.props.model }; - const handleSelectChange = createSelectHandler(this.props.onChange); - const handleTextChange = createTextHandler(this.props.onChange); +export const SeriesConfig = props => { + const defaults = { offset_time: '', value_template: '' }; + const model = { ...defaults, ...props.model }; + const handleSelectChange = createSelectHandler(props.onChange); + const handleTextChange = createTextHandler(props.onChange); - return ( -
-
-
- -
Template (eg.{'{{value}}/s'})
- -
Offset series time by (1m, 1h, 1w, 1d)
- -
-
-
Override Index Pattern
- - -
+ return ( +
+
+
+ +
Template (eg.{'{{value}}/s'})
+ +
Offset series time by (1m, 1h, 1w, 1d)
+ +
+
+
Override Index Pattern
+ +
- ); - } - -} +
+ ); +}; SeriesConfig.propTypes = { fields: PropTypes.object, @@ -63,5 +60,3 @@ SeriesConfig.propTypes = { onChange: PropTypes.func }; -export default SeriesConfig; - diff --git a/src/core_plugins/metrics/public/components/split.js b/src/core_plugins/metrics/public/components/split.js index 8cc11b22346dc..1ef670c2623ed 100644 --- a/src/core_plugins/metrics/public/components/split.js +++ b/src/core_plugins/metrics/public/components/split.js @@ -1,8 +1,8 @@ import React, { Component, PropTypes } from 'react'; import uuid from 'uuid'; -import SplitByTerms from './splits/terms'; -import SplitByFilter from './splits/filter'; +import { SplitByTerms } from './splits/terms'; +import { SplitByFilter } from './splits/filter'; import SplitByFilters from './splits/filters'; import SplitByEverything from './splits/everything'; diff --git a/src/core_plugins/metrics/public/components/splits/filter.js b/src/core_plugins/metrics/public/components/splits/filter.js index dab31fd56f8b6..3805f25eef0cb 100644 --- a/src/core_plugins/metrics/public/components/splits/filter.js +++ b/src/core_plugins/metrics/public/components/splits/filter.js @@ -1,40 +1,34 @@ import createTextHandler from '../lib/create_text_handler'; import createSelectHandler from '../lib/create_select_handler'; import GroupBySelect from './group_by_select'; -import React, { Component, PropTypes } from 'react'; +import React, { PropTypes } from 'react'; -class SplitByFilter extends Component { - - render() { - const { onChange } = this.props; - const defaults = { filter: '' }; - const model = { ...defaults, ...this.props.model }; - const handleTextChange = createTextHandler(onChange); - const handleSelectChange = createSelectHandler(onChange); - return ( -
-
Group By
-
- -
-
Query String
- { + const { onChange } = props; + const defaults = { filter: '' }; + const model = { ...defaults, ...props.model }; + const handleTextChange = createTextHandler(onChange); + const handleSelectChange = createSelectHandler(onChange); + return ( +
+
Group By
+
+
- ); - } - -} +
Query String
+ +
+ ); +}; SplitByFilter.propTypes = { model: PropTypes.object, onChange: PropTypes.func }; - -export default SplitByFilter; diff --git a/src/core_plugins/metrics/public/components/splits/group_by_select.js b/src/core_plugins/metrics/public/components/splits/group_by_select.js index f6904175ed6a6..02cbef254ecbf 100644 --- a/src/core_plugins/metrics/public/components/splits/group_by_select.js +++ b/src/core_plugins/metrics/public/components/splits/group_by_select.js @@ -10,9 +10,9 @@ function GroupBySelect(props) { return ( +
Group By
+
+ -
Order By
-
- -
- ); - } - -} +
By
+
+ +
+
Top
+ +
Order By
+
+ +
+
+ ); +}; SplitByTerms.propTypes = { model: PropTypes.object, @@ -65,5 +61,3 @@ SplitByTerms.propTypes = { indexPattern: PropTypes.string, fields: PropTypes.object }; - -export default SplitByTerms; diff --git a/src/core_plugins/metrics/public/components/vis_picker.js b/src/core_plugins/metrics/public/components/vis_picker.js index f919ac68c79da..82719b054911e 100644 --- a/src/core_plugins/metrics/public/components/vis_picker.js +++ b/src/core_plugins/metrics/public/components/vis_picker.js @@ -47,7 +47,7 @@ function VisPicker(props) { ); diff --git a/src/core_plugins/metrics/public/components/vis_types/gauge/series.js b/src/core_plugins/metrics/public/components/vis_types/gauge/series.js index 91ad826a7dcb9..2aa6f122ff45f 100644 --- a/src/core_plugins/metrics/public/components/vis_types/gauge/series.js +++ b/src/core_plugins/metrics/public/components/vis_types/gauge/series.js @@ -1,7 +1,7 @@ import React, { PropTypes } from 'react'; import ColorPicker from '../../color_picker'; import AddDeleteButtons from '../../add_delete_buttons'; -import SeriesConfig from '../../series_config'; +import { SeriesConfig } from '../../series_config'; import Sortable from 'react-anything-sortable'; import Split from '../../split'; import Tooltip from '../../tooltip'; @@ -125,13 +125,13 @@ function GaugeSeries(props) { >
-
+
{ colorPicker }
diff --git a/src/core_plugins/metrics/public/components/vis_types/markdown/series.js b/src/core_plugins/metrics/public/components/vis_types/markdown/series.js index 5318038935a06..471dd47048a37 100644 --- a/src/core_plugins/metrics/public/components/vis_types/markdown/series.js +++ b/src/core_plugins/metrics/public/components/vis_types/markdown/series.js @@ -1,6 +1,6 @@ import React, { PropTypes } from 'react'; import AddDeleteButtons from '../../add_delete_buttons'; -import SeriesConfig from '../../series_config'; +import { SeriesConfig } from '../../series_config'; import Sortable from 'react-anything-sortable'; import Split from '../../split'; import createAggRowRender from '../../lib/create_agg_row_render'; @@ -100,18 +100,18 @@ function MarkdownSeries(props) { >
-
+
diff --git a/src/core_plugins/metrics/public/components/vis_types/metric/series.js b/src/core_plugins/metrics/public/components/vis_types/metric/series.js index 64960748a0338..e853142673550 100644 --- a/src/core_plugins/metrics/public/components/vis_types/metric/series.js +++ b/src/core_plugins/metrics/public/components/vis_types/metric/series.js @@ -1,7 +1,7 @@ import React, { PropTypes } from 'react'; import ColorPicker from '../../color_picker'; import AddDeleteButtons from '../../add_delete_buttons'; -import SeriesConfig from '../../series_config'; +import { SeriesConfig } from '../../series_config'; import Sortable from 'react-anything-sortable'; import Split from '../../split'; import Tooltip from '../../tooltip'; @@ -125,13 +125,13 @@ function MetricSeries(props) { >
-
+
{ colorPicker }
diff --git a/src/core_plugins/metrics/public/components/vis_types/timeseries/config.js b/src/core_plugins/metrics/public/components/vis_types/timeseries/config.js index 97fee28ca252d..667cb926544fa 100644 --- a/src/core_plugins/metrics/public/components/vis_types/timeseries/config.js +++ b/src/core_plugins/metrics/public/components/vis_types/timeseries/config.js @@ -4,7 +4,7 @@ import DataFormatPicker from '../../data_format_picker'; import createSelectHandler from '../../lib/create_select_handler'; import YesNo from '../../yes_no'; import createTextHandler from '../../lib/create_text_handler'; -import IndexPattern from '../../index_pattern'; +import { IndexPattern } from '../../index_pattern'; function TimeseriesConfig(props) { const handleSelectChange = createSelectHandler(props.onChange); diff --git a/src/core_plugins/metrics/public/components/vis_types/timeseries/series.js b/src/core_plugins/metrics/public/components/vis_types/timeseries/series.js index d632b65cf5b31..b6db23e0cad13 100644 --- a/src/core_plugins/metrics/public/components/vis_types/timeseries/series.js +++ b/src/core_plugins/metrics/public/components/vis_types/timeseries/series.js @@ -125,13 +125,13 @@ function TimeseriesSeries(props) { >
-
+
{ colorPicker }
diff --git a/src/core_plugins/metrics/public/components/vis_types/top_n/series.js b/src/core_plugins/metrics/public/components/vis_types/top_n/series.js index 2049e5aac5e79..93e81b8f50843 100644 --- a/src/core_plugins/metrics/public/components/vis_types/top_n/series.js +++ b/src/core_plugins/metrics/public/components/vis_types/top_n/series.js @@ -1,7 +1,7 @@ import React, { PropTypes } from 'react'; import ColorPicker from '../../color_picker'; import AddDeleteButtons from '../../add_delete_buttons'; -import SeriesConfig from '../../series_config'; +import { SeriesConfig } from '../../series_config'; import Sortable from 'react-anything-sortable'; import Split from '../../split'; import Tooltip from '../../tooltip'; @@ -120,13 +120,13 @@ function TopNSeries(props) { >
-
+
{ colorPicker }
diff --git a/src/core_plugins/metrics/public/visualizations/components/resize.js b/src/core_plugins/metrics/public/visualizations/components/resize.js index 6af1d54749a68..4f2c3fa50a1c0 100644 --- a/src/core_plugins/metrics/public/visualizations/components/resize.js +++ b/src/core_plugins/metrics/public/visualizations/components/resize.js @@ -29,7 +29,7 @@ class Resize extends Component { const el = findDOMNode(this.el); const currentWidth = el.parentNode.clientWidth; const currentHeight = el.parentNode.clientHeight; - this.setState({ currentHeight, currentWidth }); + this.setState({ currentHeight, currentWidth }); // eslint-disable-line react/no-did-mount-set-state this.checkSize(); } diff --git a/src/core_plugins/metrics/public/visualizations/components/timeseries.js b/src/core_plugins/metrics/public/visualizations/components/timeseries.js index 377297544df96..dafb91ea2e1f3 100644 --- a/src/core_plugins/metrics/public/visualizations/components/timeseries.js +++ b/src/core_plugins/metrics/public/visualizations/components/timeseries.js @@ -123,12 +123,12 @@ class Timeseries extends Component { (row, i) => { const classes = ['rhythm_chart__legend_item']; const key = row.id; if (!_.includes(props.seriesFilter, row.id)) classes.push('disabled'); - if (row.label == null || row.legend === false) return (
); + if (row.label == null || row.legend === false) return (
); return (
props.onToggle(event, row.id) } - key={ key } + className={classes.join(' ')} + onClick={event => props.onToggle(event, row.id)} + key={key} >
diff --git a/ui_framework/doc_site/src/components/guide_page_side_nav/guide_page_side_nav.js b/ui_framework/doc_site/src/components/guide_page_side_nav/guide_page_side_nav.js index 3ee423e6d2e11..bc061b81d5e4d 100644 --- a/ui_framework/doc_site/src/components/guide_page_side_nav/guide_page_side_nav.js +++ b/ui_framework/doc_site/src/components/guide_page_side_nav/guide_page_side_nav.js @@ -1,29 +1,20 @@ import React, { - Component, PropTypes, } from 'react'; -export class GuidePageSideNav extends Component { - - constructor(props) { - super(props); - } - - render() { - return ( -
-
- {this.props.title} -
- -
- {this.props.children} -
+export const GuidePageSideNav = props => { + return ( +
+
+ {props.title}
- ); - } -} +
+ {props.children} +
+
+ ); +}; GuidePageSideNav.propTypes = { title: PropTypes.string, diff --git a/ui_framework/doc_site/src/views/accessibility/accessibility_example.js b/ui_framework/doc_site/src/views/accessibility/accessibility_example.js index 470127beea624..b173c0e593d33 100644 --- a/ui_framework/doc_site/src/views/accessibility/accessibility_example.js +++ b/ui_framework/doc_site/src/views/accessibility/accessibility_example.js @@ -56,13 +56,13 @@ export default props => ( > This class can be useful to add accessibility to older designs that are - still in use, but it shouldn't be a permanent solution. See - http://webaim.org/techniques/css/invisiblecontent/ - { - // eslint-disable-next-line react/jsx-closing-tag-location - } for more information. + still in use, but it shouldn’t be a permanent solution. See {( + + http://webaim.org/techniques/css/invisiblecontent/ + + )} for more information. diff --git a/ui_framework/doc_site/src/views/bar/bar_example.js b/ui_framework/doc_site/src/views/bar/bar_example.js index 750f3cee84a56..381fe747d579b 100644 --- a/ui_framework/doc_site/src/views/bar/bar_example.js +++ b/ui_framework/doc_site/src/views/bar/bar_example.js @@ -60,7 +60,7 @@ export default props => ( > A Bar with one section will align it to the right, by default. To align it to the left, - just add another section and leave it empty, or don't use a Bar at all. + just add another section and leave it empty, or don’t use a Bar at all. @@ -79,7 +79,7 @@ export default props => ( }]} > - Technically the Bar can contain three or more sections, but there's no established use-case + Technically the Bar can contain three or more sections, but there’s no established use-case for this. diff --git a/ui_framework/doc_site/src/views/button/button_example.js b/ui_framework/doc_site/src/views/button/button_example.js index ef8eccfe4cbaa..8e6da0a5d52a0 100644 --- a/ui_framework/doc_site/src/views/button/button_example.js +++ b/ui_framework/doc_site/src/views/button/button_example.js @@ -92,7 +92,7 @@ export default props => ( }]} > - Use the hollow Button when presenting a neutral action, e.g. a "Cancel" button. + Use the hollow Button when presenting a neutral action, e.g. a “Cancel” button. @@ -111,7 +111,7 @@ export default props => ( }]} > - Use the primary Button to represent the most common action. Generally, there won't be a + Use the primary Button to represent the most common action. Generally, there won’t be a need to present more than one of these at a time. @@ -131,7 +131,7 @@ export default props => ( }]} > - Secondary buttons are usually used for actions ("do this") that are optional actions on a page. + Secondary buttons are usually used for actions (“do this”) that are optional actions on a page. @@ -263,7 +263,7 @@ export default props => ( }]} > - You can create a Button using a button element, link, or input[type="submit"]. + You can create a Button using a button element, link, or input[type=“submit”]. diff --git a/ui_framework/doc_site/src/views/button/button_with_icon.js b/ui_framework/doc_site/src/views/button/button_with_icon.js index 88ac3425205f9..8596f1467d3ca 100644 --- a/ui_framework/doc_site/src/views/button/button_with_icon.js +++ b/ui_framework/doc_site/src/views/button/button_with_icon.js @@ -40,7 +40,7 @@ export default () => ( } - iconPosition='right' + iconPosition="right" > Next diff --git a/ui_framework/doc_site/src/views/card/card_example.js b/ui_framework/doc_site/src/views/card/card_example.js index 65cbe5e59453f..67797bcd837eb 100644 --- a/ui_framework/doc_site/src/views/card/card_example.js +++ b/ui_framework/doc_site/src/views/card/card_example.js @@ -31,7 +31,7 @@ export default props => ( }]} > - Cards expand to fill their container. To restrict a card's width, define the width of its + Cards expand to fill their container. To restrict a card’s width, define the width of its container. diff --git a/ui_framework/doc_site/src/views/collapse_button/collapse_button.js b/ui_framework/doc_site/src/views/collapse_button/collapse_button.js index 22cdd501bb76f..59f30f324c1da 100644 --- a/ui_framework/doc_site/src/views/collapse_button/collapse_button.js +++ b/ui_framework/doc_site/src/views/collapse_button/collapse_button.js @@ -6,9 +6,9 @@ import { export default () => (
- - - - + + + +
); diff --git a/ui_framework/doc_site/src/views/color_picker/color_picker.js b/ui_framework/doc_site/src/views/color_picker/color_picker.js index 28521e851abae..c1582a8d6a44a 100644 --- a/ui_framework/doc_site/src/views/color_picker/color_picker.js +++ b/ui_framework/doc_site/src/views/color_picker/color_picker.js @@ -15,6 +15,6 @@ export class ColorPicker extends React.Component { }; render() { - return ; + return ; } } diff --git a/ui_framework/doc_site/src/views/color_picker/color_picker_clear.js b/ui_framework/doc_site/src/views/color_picker/color_picker_clear.js index d675c7ad8ab8a..3d9414f67339e 100644 --- a/ui_framework/doc_site/src/views/color_picker/color_picker_clear.js +++ b/ui_framework/doc_site/src/views/color_picker/color_picker_clear.js @@ -34,15 +34,15 @@ export class ColorPickerLabelAndClear extends React.Component {

- + Reset diff --git a/ui_framework/doc_site/src/views/color_picker/color_picker_no_color_label.js b/ui_framework/doc_site/src/views/color_picker/color_picker_no_color_label.js index 4e6b4f9877cf3..71cc5803e0173 100644 --- a/ui_framework/doc_site/src/views/color_picker/color_picker_no_color_label.js +++ b/ui_framework/doc_site/src/views/color_picker/color_picker_no_color_label.js @@ -29,9 +29,9 @@ export class ColorPickerNoColorLabel extends React.Component { diff --git a/ui_framework/doc_site/src/views/column/column_example.js b/ui_framework/doc_site/src/views/column/column_example.js index 27ddd95bdf75f..3910d26cfb2ac 100644 --- a/ui_framework/doc_site/src/views/column/column_example.js +++ b/ui_framework/doc_site/src/views/column/column_example.js @@ -21,7 +21,7 @@ export default props => ( }]} > - Note: Don't use this. It's subject to change as we evolve our grid system. + Note: Don’t use this. It’s subject to change as we evolve our grid system. diff --git a/ui_framework/doc_site/src/views/gallery/gallery_example.js b/ui_framework/doc_site/src/views/gallery/gallery_example.js index dfdab4a4155eb..326c9ab66b1cb 100644 --- a/ui_framework/doc_site/src/views/gallery/gallery_example.js +++ b/ui_framework/doc_site/src/views/gallery/gallery_example.js @@ -27,7 +27,7 @@ export default props => ( > Use GalleryButton to show a gallery item. - It's an anchor and accepts all anchor properties. + It’s an anchor and accepts all anchor properties. diff --git a/ui_framework/doc_site/src/views/home/home_view.js b/ui_framework/doc_site/src/views/home/home_view.js index c9e205d544c74..d74ad1f6c228e 100644 --- a/ui_framework/doc_site/src/views/home/home_view.js +++ b/ui_framework/doc_site/src/views/home/home_view.js @@ -20,7 +20,7 @@ export const HomeView = () => (

- The Kibana team uses the UI Framework to build Kibana's user interface. Please see + The Kibana team uses the UI Framework to build Kibana’s user interface. Please see the general Kibana docs for information on how to use Kibana, and the plugin-specific section for help developing Kibana plugins. @@ -32,7 +32,7 @@ export const HomeView = () => (

- If you're just getting started with the UI Framework for the first time, you may + If you’re just getting started with the UI Framework for the first time, you may be interested in some of the more commonly-used components:

diff --git a/ui_framework/doc_site/src/views/icon/icon_example.js b/ui_framework/doc_site/src/views/icon/icon_example.js index 16028624b03ac..d1244d09a92b7 100644 --- a/ui_framework/doc_site/src/views/icon/icon_example.js +++ b/ui_framework/doc_site/src/views/icon/icon_example.js @@ -62,7 +62,7 @@ export default props => ( }]} > - Use this Icon when you don't want to communicate any particular meaning with the icon's + Use this Icon when you don’t want to communicate any particular meaning with the icon’s color. diff --git a/ui_framework/doc_site/src/views/local_nav/local_nav_dropdown.js b/ui_framework/doc_site/src/views/local_nav/local_nav_dropdown.js index c55cc9d9b788b..42e03c4d5ad29 100644 --- a/ui_framework/doc_site/src/views/local_nav/local_nav_dropdown.js +++ b/ui_framework/doc_site/src/views/local_nav/local_nav_dropdown.js @@ -45,12 +45,12 @@ export function LocalNavWithDropdown() { {/* Help text */}
- Here's some help text to explain the purpose of the dropdown. + Here’s some help text to explain the purpose of the dropdown.
{/* Warning */}
- Here's some warning text in case the user has something misconfigured. + Here’s some warning text in case the user has something misconfigured.
diff --git a/ui_framework/doc_site/src/views/local_nav/local_nav_dropdown_panels.js b/ui_framework/doc_site/src/views/local_nav/local_nav_dropdown_panels.js index d009b0882a941..eaa2c471e1ba7 100644 --- a/ui_framework/doc_site/src/views/local_nav/local_nav_dropdown_panels.js +++ b/ui_framework/doc_site/src/views/local_nav/local_nav_dropdown_panels.js @@ -48,7 +48,7 @@ export function LocalNavWithDropdownPanels() { {/* Help text */}
- Here's some help text to explain the purpose of the dropdown. + Here’s some help text to explain the purpose of the dropdown.
@@ -59,7 +59,7 @@ export function LocalNavWithDropdownPanels() { {/* Help text */}
- Here's some help text to explain the purpose of the dropdown. + Here’s some help text to explain the purpose of the dropdown.
diff --git a/ui_framework/doc_site/src/views/local_nav/local_nav_example.js b/ui_framework/doc_site/src/views/local_nav/local_nav_example.js index 3dced032ede90..b429fe0d23ac7 100644 --- a/ui_framework/doc_site/src/views/local_nav/local_nav_example.js +++ b/ui_framework/doc_site/src/views/local_nav/local_nav_example.js @@ -61,7 +61,7 @@ export default props => ( ]} > - Here's a simple LocalNav with a Title in the top left corner and Menu in the top right. + Here’s a simple LocalNav with a Title in the top left corner and Menu in the top right. diff --git a/ui_framework/doc_site/src/views/menu_button/menu_button_example.js b/ui_framework/doc_site/src/views/menu_button/menu_button_example.js index 35812940c12a0..22d5f979b7dc9 100644 --- a/ui_framework/doc_site/src/views/menu_button/menu_button_example.js +++ b/ui_framework/doc_site/src/views/menu_button/menu_button_example.js @@ -89,7 +89,7 @@ export default props => ( }]} > - You can create a MenuButton using a button element, link, or input[type="submit"]. + You can create a MenuButton using a button element, link, or input[type=“submit”]. (

- You visited a page which doesn't exist, causing this page to exist. This page thanks + You visited a page which doesn’t exist, causing this page to exist. This page thanks you for summoning it into existence from the raw fabric of reality, but it thinks you may find another page more interesting. Might it suggest - the - home page - ? + the {( + + home page + + )}?

diff --git a/ui_framework/doc_site/src/views/pager/pager_buttons.js b/ui_framework/doc_site/src/views/pager/pager_buttons.js index ba86082f40564..51446d70cf333 100644 --- a/ui_framework/doc_site/src/views/pager/pager_buttons.js +++ b/ui_framework/doc_site/src/views/pager/pager_buttons.js @@ -17,9 +17,9 @@ export class PagerButtons extends React.Component { getPage() { switch (this.state.item) { case 1: - return
I'm Page 1!
; + return
I’m Page 1!
; case 2: - return I'm a button; + return I’m a button; case 3: return
You are at the end
; } diff --git a/ui_framework/doc_site/src/views/popover/popover.js b/ui_framework/doc_site/src/views/popover/popover.js index cf929763b9a07..7e40ccd2fdbf7 100644 --- a/ui_framework/doc_site/src/views/popover/popover.js +++ b/ui_framework/doc_site/src/views/popover/popover.js @@ -41,7 +41,7 @@ export default class extends Component { isOpen={this.state.isPopoverOpen} closePopover={this.closePopover.bind(this)} > -
Popover content that's wider than the default width
+
Popover content that’s wider than the default width
); } diff --git a/ui_framework/doc_site/src/views/popover/popover_anchor_position.js b/ui_framework/doc_site/src/views/popover/popover_anchor_position.js index 12e0617c1ac0e..a5f78f2607c11 100644 --- a/ui_framework/doc_site/src/views/popover/popover_anchor_position.js +++ b/ui_framework/doc_site/src/views/popover/popover_anchor_position.js @@ -46,7 +46,7 @@ export default class extends Component {
+ Popover anchored to the right. )} @@ -61,7 +61,7 @@ export default class extends Component { + Popover anchored to the right. )} diff --git a/ui_framework/doc_site/src/views/popover/popover_body_class_name.js b/ui_framework/doc_site/src/views/popover/popover_body_class_name.js index c5e88f5ac2fc4..bdcf9d31767e0 100644 --- a/ui_framework/doc_site/src/views/popover/popover_body_class_name.js +++ b/ui_framework/doc_site/src/views/popover/popover_body_class_name.js @@ -31,16 +31,16 @@ export default class extends Component { render() { return ( + button={( + Custom class - ) } - isOpen={ this.state.isPopoverOpen } - closePopover={ this.closePopover.bind(this) } + )} + isOpen={this.state.isPopoverOpen} + closePopover={this.closePopover.bind(this)} bodyClassName="yourClassNameHere" > - It's hard to tell but there's a custom class on this element + It’s hard to tell but there’s a custom class on this element ); } diff --git a/ui_framework/doc_site/src/views/table/controlled_table.js b/ui_framework/doc_site/src/views/table/controlled_table.js index 6edeed7f938c0..cbc0ec8848ece 100644 --- a/ui_framework/doc_site/src/views/table/controlled_table.js +++ b/ui_framework/doc_site/src/views/table/controlled_table.js @@ -64,13 +64,13 @@ export class ControlledTable extends React.Component { renderPager() { return ( {} } - onPreviousPage={ () => {} } + startNumber={1} + hasNextPage={true} + hasPreviousPage={false} + endNumber={10} + totalItems={100} + onNextPage={() => {}} + onPreviousPage={() => {}} /> ); } @@ -92,14 +92,14 @@ export class ControlledTable extends React.Component { return ( this.toggleItem(rowData) } + isChecked={this.isItemChecked(rowData)} + onChange={() => this.toggleItem(rowData)} /> { rowData.map((cellData, index) => { const align = index === rowData.length - 1 ? RIGHT_ALIGNMENT : LEFT_ALIGNMENT; return ( - + { cellData } ); @@ -114,7 +114,7 @@ export class ControlledTable extends React.Component { return ( - {} } /> + {}} /> @@ -140,8 +140,8 @@ export class ControlledTable extends React.Component { this.toggleItem('header') } + isChecked={this.isItemChecked('header')} + onChange={() => this.toggleItem('header')} /> Title diff --git a/ui_framework/doc_site/src/views/table/controlled_table_loading_items.js b/ui_framework/doc_site/src/views/table/controlled_table_loading_items.js index f396996d88941..042e3f5249c62 100644 --- a/ui_framework/doc_site/src/views/table/controlled_table_loading_items.js +++ b/ui_framework/doc_site/src/views/table/controlled_table_loading_items.js @@ -19,13 +19,13 @@ export class ControlledTableLoadingItems extends React.Component { getPager() { return ( {} } - onPreviousPage={ () => {} } + startNumber={1} + hasNextPage={true} + hasPreviousPage={false} + endNumber={10} + totalItems={100} + onNextPage={() => {}} + onPreviousPage={() => {}} /> ); } @@ -34,7 +34,7 @@ export class ControlledTableLoadingItems extends React.Component { return ( - {} } /> + {}} /> diff --git a/ui_framework/doc_site/src/views/table/controlled_table_with_empty_prompt.js b/ui_framework/doc_site/src/views/table/controlled_table_with_empty_prompt.js index 5abfd5356712f..0fb4e71863102 100644 --- a/ui_framework/doc_site/src/views/table/controlled_table_with_empty_prompt.js +++ b/ui_framework/doc_site/src/views/table/controlled_table_with_empty_prompt.js @@ -19,13 +19,13 @@ export class ControlledTableWithEmptyPrompt extends React.Component { getPager() { return ( {} } - onPreviousPage={ () => {} } + startNumber={1} + hasNextPage={true} + hasPreviousPage={false} + endNumber={10} + totalItems={100} + onNextPage={() => {}} + onPreviousPage={() => {}} /> ); } @@ -34,7 +34,7 @@ export class ControlledTableWithEmptyPrompt extends React.Component { return ( - {} } /> + {}} /> @@ -59,7 +59,7 @@ export class ControlledTableWithEmptyPrompt extends React.Component { Add Items } + actions={Add Items} message="Uh oh you have no items!" /> diff --git a/ui_framework/doc_site/src/views/table/controlled_table_with_no_items.js b/ui_framework/doc_site/src/views/table/controlled_table_with_no_items.js index 6120839049479..7f9b99bd07d8c 100644 --- a/ui_framework/doc_site/src/views/table/controlled_table_with_no_items.js +++ b/ui_framework/doc_site/src/views/table/controlled_table_with_no_items.js @@ -19,13 +19,13 @@ export class ControlledTableWithNoItems extends React.Component { getPager() { return ( {} } - onPreviousPage={ () => {} } + startNumber={1} + hasNextPage={true} + hasPreviousPage={false} + endNumber={10} + totalItems={100} + onNextPage={() => {}} + onPreviousPage={() => {}} /> ); } @@ -34,7 +34,7 @@ export class ControlledTableWithNoItems extends React.Component { return ( - {} } /> + {}} /> diff --git a/ui_framework/doc_site/src/views/table/fluid_table.js b/ui_framework/doc_site/src/views/table/fluid_table.js index 7d483fdb742d0..7de2f0d4da1f8 100644 --- a/ui_framework/doc_site/src/views/table/fluid_table.js +++ b/ui_framework/doc_site/src/views/table/fluid_table.js @@ -11,7 +11,7 @@ import { export function FluidTable() { return ( - + System diff --git a/ui_framework/doc_site/src/views/table/table_with_menu_buttons.js b/ui_framework/doc_site/src/views/table/table_with_menu_buttons.js index aa8c1addba0e1..cb45e7df798e9 100644 --- a/ui_framework/doc_site/src/views/table/table_with_menu_buttons.js +++ b/ui_framework/doc_site/src/views/table/table_with_menu_buttons.js @@ -48,7 +48,7 @@ export function TableWithMenuButtons() { C - +
); }; diff --git a/ui_framework/src/components/local_nav/local_nav.js b/ui_framework/src/components/local_nav/local_nav.js index 7594f9d4d6ff0..d70e3c24f3d47 100644 --- a/ui_framework/src/components/local_nav/local_nav.js +++ b/ui_framework/src/components/local_nav/local_nav.js @@ -5,7 +5,7 @@ import React from 'react'; export function KuiLocalNav({ className, children, ...rest }) { const classes = classnames('kuiLocalNav', className); return ( -
+
{ children }
); diff --git a/ui_framework/src/components/local_nav/local_nav.test.js b/ui_framework/src/components/local_nav/local_nav.test.js index 12ab75cabad21..2c1d5b8a9edad 100644 --- a/ui_framework/src/components/local_nav/local_nav.test.js +++ b/ui_framework/src/components/local_nav/local_nav.test.js @@ -5,6 +5,6 @@ import { requiredProps } from '../../test/required_props'; import { KuiLocalNav } from './local_nav'; test('renders KuiLocalNav', () => { - const component = children; + const component = children; expect(render(component)).toMatchSnapshot(); }); diff --git a/ui_framework/src/components/local_nav/local_nav_row.js b/ui_framework/src/components/local_nav/local_nav_row.js index 806b7223564fc..2d9b577abb3cc 100644 --- a/ui_framework/src/components/local_nav/local_nav_row.js +++ b/ui_framework/src/components/local_nav/local_nav_row.js @@ -7,7 +7,7 @@ export function KuiLocalNavRow({ className, children, isSecondary, ...rest }) { 'kuiLocalNavRow--secondary': isSecondary, }); return ( -
+
{ children }
); diff --git a/ui_framework/src/components/local_nav/local_nav_row.test.js b/ui_framework/src/components/local_nav/local_nav_row.test.js index c0ad465aa8d31..0bd55a22a9fa9 100644 --- a/ui_framework/src/components/local_nav/local_nav_row.test.js +++ b/ui_framework/src/components/local_nav/local_nav_row.test.js @@ -5,13 +5,13 @@ import { requiredProps } from '../../test/required_props'; import { KuiLocalNavRow } from './local_nav_row'; test('renders KuiLocalNavRow', () => { - const component = children; + const component = children; expect(render(component)).toMatchSnapshot(); }); describe('property isSecondary', () => { test('renders the secondary modifier', () => { - const component = children; + const component = children; expect(render(component)).toMatchSnapshot(); }); }); diff --git a/ui_framework/src/components/local_nav/local_nav_row_section.js b/ui_framework/src/components/local_nav/local_nav_row_section.js index 364d8acd40736..541a60d9f57c1 100644 --- a/ui_framework/src/components/local_nav/local_nav_row_section.js +++ b/ui_framework/src/components/local_nav/local_nav_row_section.js @@ -5,7 +5,7 @@ import React from 'react'; export function KuiLocalNavRowSection({ className, children, ...rest }) { const classes = classnames('kuiLocalNavRow__section', className); return ( -
+
{ children }
); diff --git a/ui_framework/src/components/local_nav/local_nav_row_section.test.js b/ui_framework/src/components/local_nav/local_nav_row_section.test.js index 35235dc017bd9..dbc9509177127 100644 --- a/ui_framework/src/components/local_nav/local_nav_row_section.test.js +++ b/ui_framework/src/components/local_nav/local_nav_row_section.test.js @@ -5,6 +5,6 @@ import { requiredProps } from '../../test/required_props'; import { KuiLocalNavRowSection } from './local_nav_row_section'; test('renders KuiLocalNavRowSection', () => { - const component = children; + const component = children; expect(render(component)).toMatchSnapshot(); }); diff --git a/ui_framework/src/components/local_nav/local_tab.js b/ui_framework/src/components/local_nav/local_tab.js index e4040367e3e34..823bf4eabbb44 100644 --- a/ui_framework/src/components/local_nav/local_tab.js +++ b/ui_framework/src/components/local_nav/local_tab.js @@ -8,7 +8,7 @@ export function KuiLocalTab({ className, children, isDisabled, isSelected, ...re 'kuiLocalTab-isSelected': isSelected, }); return ( - + { children } ); diff --git a/ui_framework/src/components/local_nav/local_tab.test.js b/ui_framework/src/components/local_nav/local_tab.test.js index 0a34baab37296..3dc458768d155 100644 --- a/ui_framework/src/components/local_nav/local_tab.test.js +++ b/ui_framework/src/components/local_nav/local_tab.test.js @@ -5,20 +5,20 @@ import { requiredProps } from '../../test/required_props'; import { KuiLocalTab } from './local_tab'; test('renders KuiLocalTab', () => { - const component = children; + const component = children; expect(render(component)).toMatchSnapshot(); }); describe('property isSelected', () => { test('renders the isSelected modifier', () => { - const component = children; + const component = children; expect(render(component)).toMatchSnapshot(); }); }); describe('property isDisabled', () => { test('renders the isDisabled modifier', () => { - const component = children; + const component = children; expect(render(component)).toMatchSnapshot(); }); }); diff --git a/ui_framework/src/components/local_nav/local_tabs.js b/ui_framework/src/components/local_nav/local_tabs.js index 1aaa458d5688f..f65f5fe905215 100644 --- a/ui_framework/src/components/local_nav/local_tabs.js +++ b/ui_framework/src/components/local_nav/local_tabs.js @@ -5,7 +5,7 @@ import React from 'react'; export function KuiLocalTabs({ className, children, ...rest }) { const classes = classnames('kuiLocalTabs', className); return ( -
+
{ children }
); diff --git a/ui_framework/src/components/local_nav/local_tabs.test.js b/ui_framework/src/components/local_nav/local_tabs.test.js index ffc70aeba75b6..094495ad0f897 100644 --- a/ui_framework/src/components/local_nav/local_tabs.test.js +++ b/ui_framework/src/components/local_nav/local_tabs.test.js @@ -5,6 +5,6 @@ import { requiredProps } from '../../test/required_props'; import { KuiLocalTabs } from './local_tabs'; test('renders KuiLocalTabs', () => { - const component = children; + const component = children; expect(render(component)).toMatchSnapshot(); }); diff --git a/ui_framework/src/components/local_nav/local_title.js b/ui_framework/src/components/local_nav/local_title.js index 1d1eb53406f35..0f40d5c198198 100644 --- a/ui_framework/src/components/local_nav/local_title.js +++ b/ui_framework/src/components/local_nav/local_title.js @@ -5,7 +5,7 @@ import React from 'react'; export function KuiLocalTitle({ className, children, ...rest }) { const classes = classnames('kuiLocalTitle', className); return ( -
+
{ children }
); diff --git a/ui_framework/src/components/local_nav/local_title.test.js b/ui_framework/src/components/local_nav/local_title.test.js index f393653afd3a9..17d3877f4cadf 100644 --- a/ui_framework/src/components/local_nav/local_title.test.js +++ b/ui_framework/src/components/local_nav/local_title.test.js @@ -5,6 +5,6 @@ import { requiredProps } from '../../test/required_props'; import { KuiLocalTitle } from './local_title'; test('renders KuiLocalTitle', () => { - const component = children; + const component = children; expect(render(component)).toMatchSnapshot(); }); diff --git a/ui_framework/src/components/menu/menu.test.js b/ui_framework/src/components/menu/menu.test.js index 170003121cdd4..265703fed390e 100644 --- a/ui_framework/src/components/menu/menu.test.js +++ b/ui_framework/src/components/menu/menu.test.js @@ -7,7 +7,7 @@ import { } from './menu'; test('renders KuiMenu', () => { - const component = children; + const component = children; expect(render(component)).toMatchSnapshot(); }); diff --git a/ui_framework/src/components/menu/menu_item.test.js b/ui_framework/src/components/menu/menu_item.test.js index 7ba271f5e057d..1b08117b9c2b3 100644 --- a/ui_framework/src/components/menu/menu_item.test.js +++ b/ui_framework/src/components/menu/menu_item.test.js @@ -7,6 +7,6 @@ import { } from './menu_item'; test('renders KuiMenuItem', () => { - const component = children; + const component = children; expect(render(component)).toMatchSnapshot(); }); diff --git a/ui_framework/src/components/modal/confirm_modal.js b/ui_framework/src/components/modal/confirm_modal.js index 6655f3050a7f5..f1a04c6c761d5 100644 --- a/ui_framework/src/components/modal/confirm_modal.js +++ b/ui_framework/src/components/modal/confirm_modal.js @@ -42,10 +42,10 @@ export function KuiConfirmModal({ return ( { title ? @@ -65,17 +65,17 @@ export function KuiConfirmModal({ {cancelButtonText} {confirmButtonText} diff --git a/ui_framework/src/components/modal/confirm_modal.test.js b/ui_framework/src/components/modal/confirm_modal.test.js index 216074d7ab2bd..2c14f19493622 100644 --- a/ui_framework/src/components/modal/confirm_modal.test.js +++ b/ui_framework/src/components/modal/confirm_modal.test.js @@ -24,7 +24,7 @@ test('renders KuiConfirmModal', () => { onConfirm={onConfirm} cancelButtonText="Cancel Button Text" confirmButtonText="Confirm Button Text" - { ...requiredProps } + {...requiredProps} />); expect(component).toMatchSnapshot(); }); @@ -37,7 +37,7 @@ test('onConfirm', () => { onConfirm={onConfirm} cancelButtonText="Cancel" confirmButtonText="Confirm" - { ...requiredProps } + {...requiredProps} />); component.find('[data-test-subj="confirmModalConfirmButton"]').simulate('click'); sinon.assert.calledOnce(onConfirm); @@ -53,7 +53,7 @@ describe('onCancel', () => { onConfirm={onConfirm} cancelButtonText="Cancel" confirmButtonText="Confirm" - { ...requiredProps } + {...requiredProps} />); component.find('[data-test-subj="confirmModalCancelButton"]').simulate('click'); sinon.assert.notCalled(onConfirm); @@ -68,7 +68,7 @@ describe('onCancel', () => { onConfirm={onConfirm} cancelButtonText="Cancel" confirmButtonText="Confirm" - { ...requiredProps } + {...requiredProps} />); component.simulate('keydown', { keyCode: 27 }); sinon.assert.notCalled(onConfirm); @@ -85,8 +85,8 @@ describe('defaultFocusedButton', () => { onConfirm={onConfirm} cancelButtonText="Cancel" confirmButtonText="Confirm" - defaultFocusedButton={ CANCEL_BUTTON } - { ...requiredProps } + defaultFocusedButton={CANCEL_BUTTON} + {...requiredProps} />); const button = component.find('[data-test-subj="confirmModalCancelButton"]').getDOMNode(); expect(document.activeElement).toEqual(button); @@ -100,8 +100,8 @@ describe('defaultFocusedButton', () => { onConfirm={onConfirm} cancelButtonText="Cancel" confirmButtonText="Confirm" - defaultFocusedButton={ CONFIRM_BUTTON } - { ...requiredProps } + defaultFocusedButton={CONFIRM_BUTTON} + {...requiredProps} />); const button = component.find('[data-test-subj="confirmModalConfirmButton"]').getDOMNode(); expect(document.activeElement).toEqual(button); @@ -115,7 +115,7 @@ describe('defaultFocusedButton', () => { onConfirm={onConfirm} cancelButtonText="Cancel" confirmButtonText="Confirm" - { ...requiredProps } + {...requiredProps} />); const button = component.find('[data-test-subj="confirmModalConfirmButton"]').getDOMNode(); expect(document.activeElement).toEqual(button); diff --git a/ui_framework/src/components/modal/modal.js b/ui_framework/src/components/modal/modal.js index 8ea7a08b96869..da89951ebae90 100644 --- a/ui_framework/src/components/modal/modal.js +++ b/ui_framework/src/components/modal/modal.js @@ -5,7 +5,7 @@ import PropTypes from 'prop-types'; export function KuiModal({ className, children, ...rest }) { const classes = classnames('kuiModal', className); return ( -
+
{ children }
); diff --git a/ui_framework/src/components/modal/modal.test.js b/ui_framework/src/components/modal/modal.test.js index 4a393c27a008d..948c7da07f99c 100644 --- a/ui_framework/src/components/modal/modal.test.js +++ b/ui_framework/src/components/modal/modal.test.js @@ -7,6 +7,6 @@ import { } from './modal'; test('renders KuiModal', () => { - const component = children; + const component = children; expect(render(component)).toMatchSnapshot(); }); diff --git a/ui_framework/src/components/modal/modal_body.js b/ui_framework/src/components/modal/modal_body.js index efd954b834f12..e43d7ab5af189 100644 --- a/ui_framework/src/components/modal/modal_body.js +++ b/ui_framework/src/components/modal/modal_body.js @@ -5,7 +5,7 @@ import PropTypes from 'prop-types'; export function KuiModalBody({ className, children, ...rest }) { const classes = classnames('kuiModalBody', className); return ( -
+
{ children }
); diff --git a/ui_framework/src/components/modal/modal_body.test.js b/ui_framework/src/components/modal/modal_body.test.js index b8b4d8e02d802..985b2cdb5a2b4 100644 --- a/ui_framework/src/components/modal/modal_body.test.js +++ b/ui_framework/src/components/modal/modal_body.test.js @@ -7,6 +7,6 @@ import { } from './modal_body'; test('renders KuiModalBody', () => { - const component = children; + const component = children; expect(render(component)).toMatchSnapshot(); }); diff --git a/ui_framework/src/components/modal/modal_body_text.js b/ui_framework/src/components/modal/modal_body_text.js index 197bf7f0a7975..55efdc723fa88 100644 --- a/ui_framework/src/components/modal/modal_body_text.js +++ b/ui_framework/src/components/modal/modal_body_text.js @@ -5,7 +5,7 @@ import PropTypes from 'prop-types'; export function KuiModalBodyText({ className, children, ...rest }) { const classes = classnames('kuiModalBodyText', className); return ( -
+
{ children }
); diff --git a/ui_framework/src/components/modal/modal_body_text.test.js b/ui_framework/src/components/modal/modal_body_text.test.js index f71a5f6ed0bee..a8d6af9df7352 100644 --- a/ui_framework/src/components/modal/modal_body_text.test.js +++ b/ui_framework/src/components/modal/modal_body_text.test.js @@ -7,6 +7,6 @@ import { } from './modal_body_text'; test('renders KuiModalBodyText', () => { - const component = children; + const component = children; expect(render(component)).toMatchSnapshot(); }); diff --git a/ui_framework/src/components/modal/modal_footer.js b/ui_framework/src/components/modal/modal_footer.js index a62ba3dccef2e..b91240efe570d 100644 --- a/ui_framework/src/components/modal/modal_footer.js +++ b/ui_framework/src/components/modal/modal_footer.js @@ -5,7 +5,7 @@ import PropTypes from 'prop-types'; export function KuiModalFooter({ className, children, ...rest }) { const classes = classnames('kuiModalFooter', className); return ( -
+
{ children }
); diff --git a/ui_framework/src/components/modal/modal_footer.test.js b/ui_framework/src/components/modal/modal_footer.test.js index ab80fa6b14079..9a54e5d8cae5f 100644 --- a/ui_framework/src/components/modal/modal_footer.test.js +++ b/ui_framework/src/components/modal/modal_footer.test.js @@ -7,6 +7,6 @@ import { } from './modal_footer'; test('renders KuiModalFooter', () => { - const component = children; + const component = children; expect(render(component)).toMatchSnapshot(); }); diff --git a/ui_framework/src/components/modal/modal_header.js b/ui_framework/src/components/modal/modal_header.js index c6ccc30e2e110..7aa74a1cff9f2 100644 --- a/ui_framework/src/components/modal/modal_header.js +++ b/ui_framework/src/components/modal/modal_header.js @@ -5,7 +5,7 @@ import PropTypes from 'prop-types'; export function KuiModalHeader({ className, children, ...rest }) { const classes = classnames('kuiModalHeader', className); return ( -
+
{ children }
); diff --git a/ui_framework/src/components/modal/modal_header.test.js b/ui_framework/src/components/modal/modal_header.test.js index 0caaaa07ae896..f3a603bcb2567 100644 --- a/ui_framework/src/components/modal/modal_header.test.js +++ b/ui_framework/src/components/modal/modal_header.test.js @@ -7,6 +7,6 @@ import { } from './modal_header'; test('renders KuiModalHeader', () => { - const component = children; + const component = children; expect(render(component)).toMatchSnapshot(); }); diff --git a/ui_framework/src/components/modal/modal_header_title.js b/ui_framework/src/components/modal/modal_header_title.js index a4a237ad8f1d3..5baa3bd0be1eb 100644 --- a/ui_framework/src/components/modal/modal_header_title.js +++ b/ui_framework/src/components/modal/modal_header_title.js @@ -5,7 +5,7 @@ import PropTypes from 'prop-types'; export function KuiModalHeaderTitle({ className, children, ...rest }) { const classes = classnames('kuiModalHeader__title', className); return ( -
+
{ children }
); diff --git a/ui_framework/src/components/modal/modal_header_title.test.js b/ui_framework/src/components/modal/modal_header_title.test.js index 35fbbca89c95c..7f0632ad5b60b 100644 --- a/ui_framework/src/components/modal/modal_header_title.test.js +++ b/ui_framework/src/components/modal/modal_header_title.test.js @@ -7,6 +7,6 @@ import { } from './modal_header_title'; test('renders KuiModalHeaderTitle', () => { - const component = children; + const component = children; expect(render(component)).toMatchSnapshot(); }); diff --git a/ui_framework/src/components/modal/modal_overlay.js b/ui_framework/src/components/modal/modal_overlay.js index 34334e1a75072..4467bdee3667f 100644 --- a/ui_framework/src/components/modal/modal_overlay.js +++ b/ui_framework/src/components/modal/modal_overlay.js @@ -6,8 +6,8 @@ export function KuiModalOverlay({ className, ...rest }) { const classes = classnames('kuiModalOverlay', className); return (
); } diff --git a/ui_framework/src/components/modal/modal_overlay.test.js b/ui_framework/src/components/modal/modal_overlay.test.js index 94f5015de662c..0600b5a45187a 100644 --- a/ui_framework/src/components/modal/modal_overlay.test.js +++ b/ui_framework/src/components/modal/modal_overlay.test.js @@ -7,6 +7,6 @@ import { } from './modal_overlay'; test('renders KuiModalOverlay', () => { - const component = children; + const component = children; expect(render(component)).toMatchSnapshot(); }); diff --git a/ui_framework/src/components/pager/pager.js b/ui_framework/src/components/pager/pager.js index b96d399659dfc..55d6ab8f39f64 100644 --- a/ui_framework/src/components/pager/pager.js +++ b/ui_framework/src/components/pager/pager.js @@ -16,7 +16,7 @@ export function KuiPager({ }) { const classes = classNames('kuiPager', className); return ( -
+
{startNumber}–{endNumber} of {totalItems}
{ (startNumber === 1 && endNumber === totalItems) diff --git a/ui_framework/src/components/pager/pager.test.js b/ui_framework/src/components/pager/pager.test.js index f588e709cc9c6..ab05d73e92d7e 100644 --- a/ui_framework/src/components/pager/pager.test.js +++ b/ui_framework/src/components/pager/pager.test.js @@ -24,7 +24,7 @@ test('renders KuiPager', () => { startNumber={1} endNumber={10} totalItems={20} - { ...requiredProps } + {...requiredProps} />); expect(render(component)).toMatchSnapshot(); }); diff --git a/ui_framework/src/components/pager/pager_button_group.js b/ui_framework/src/components/pager/pager_button_group.js index daaaada470385..6c105e3114096 100644 --- a/ui_framework/src/components/pager/pager_button_group.js +++ b/ui_framework/src/components/pager/pager_button_group.js @@ -4,7 +4,7 @@ import { KuiButton, KuiButtonIcon, KuiButtonGroup } from '../button'; export function KuiPagerButtonGroup({ className, onPrevious, onNext, hasNext, hasPrevious, ...rest }) { return ( - + { onPrevious={onPrevious} hasNext={true} hasPrevious={true} - { ...requiredProps } + {...requiredProps} />); expect(render(component)).toMatchSnapshot(); }); diff --git a/ui_framework/src/components/popover/popover.js b/ui_framework/src/components/popover/popover.js index c8dbfc21b7673..ce55ab06d9379 100644 --- a/ui_framework/src/components/popover/popover.js +++ b/ui_framework/src/components/popover/popover.js @@ -67,16 +67,16 @@ export class KuiPopover extends Component { const bodyClasses = classNames('kuiPopover__body', bodyClassName); const body = ( -
+
{ children }
); return (
{ button } { body } diff --git a/ui_framework/src/components/popover/popover.test.js b/ui_framework/src/components/popover/popover.test.js index 0476d6b36f9d3..39f20fccc002a 100644 --- a/ui_framework/src/components/popover/popover.test.js +++ b/ui_framework/src/components/popover/popover.test.js @@ -10,7 +10,7 @@ describe('KuiPopover', () => { } closePopover={() => {}} - { ...requiredProps } + {...requiredProps} /> ); diff --git a/ui_framework/src/components/table/controlled_table.test.js b/ui_framework/src/components/table/controlled_table.test.js index e8f546858f82e..579549b85e2cd 100644 --- a/ui_framework/src/components/table/controlled_table.test.js +++ b/ui_framework/src/components/table/controlled_table.test.js @@ -7,6 +7,6 @@ import { } from './controlled_table'; test('renders KuiToolControlledTable', () => { - const component = children; + const component = children; expect(render(component)).toMatchSnapshot(); }); diff --git a/ui_framework/src/components/table/table.test.js b/ui_framework/src/components/table/table.test.js index 253239d20e43f..4a384bef13547 100644 --- a/ui_framework/src/components/table/table.test.js +++ b/ui_framework/src/components/table/table.test.js @@ -11,7 +11,7 @@ import { KuiTableHeaderCell } from './table_header_cell'; test('renders KuiTable', () => { const component = ( - + Hi Title diff --git a/ui_framework/src/components/table/table_body.js b/ui_framework/src/components/table/table_body.js index 40588e57efef5..79c8b285b761a 100644 --- a/ui_framework/src/components/table/table_body.js +++ b/ui_framework/src/components/table/table_body.js @@ -3,7 +3,7 @@ import PropTypes from 'prop-types'; export const KuiTableBody = ({ children, className, ...rest }) => { return ( - + { children } ); diff --git a/ui_framework/src/components/table/table_header.js b/ui_framework/src/components/table/table_header.js index cb4fa51d82725..e48b2af7694ab 100644 --- a/ui_framework/src/components/table/table_header.js +++ b/ui_framework/src/components/table/table_header.js @@ -3,7 +3,7 @@ import PropTypes from 'prop-types'; export const KuiTableHeader = ({ children, className, ...rest }) => { return ( - + { children } ); diff --git a/ui_framework/src/components/table/table_header_cell.test.js b/ui_framework/src/components/table/table_header_cell.test.js index ec39c1bacceba..44e52ace91488 100644 --- a/ui_framework/src/components/table/table_header_cell.test.js +++ b/ui_framework/src/components/table/table_header_cell.test.js @@ -7,6 +7,6 @@ import { } from './table_header_cell'; test('renders KuiTableHeaderCell', () => { - const component = children; + const component = children; expect(render(component)).toMatchSnapshot(); }); diff --git a/ui_framework/src/components/table/table_header_check_box_cell.js b/ui_framework/src/components/table/table_header_check_box_cell.js index 65c36d5c44d44..84d12b0e3034f 100644 --- a/ui_framework/src/components/table/table_header_check_box_cell.js +++ b/ui_framework/src/components/table/table_header_check_box_cell.js @@ -7,14 +7,14 @@ export const KuiTableHeaderCheckBoxCell = ({ onChange, isChecked, className, ... const classes = classNames('kuiTableHeaderCell--checkBox', className); return ( ); diff --git a/ui_framework/src/components/table/table_header_check_box_cell.test.js b/ui_framework/src/components/table/table_header_check_box_cell.test.js index 44930ddba01ed..e998beabecb48 100644 --- a/ui_framework/src/components/table/table_header_check_box_cell.test.js +++ b/ui_framework/src/components/table/table_header_check_box_cell.test.js @@ -7,6 +7,6 @@ import { } from './table_header_check_box_cell'; test('renders KuiTableHeaderCheckBoxCell', () => { - const component = children; + const component = children; expect(render(component)).toMatchSnapshot(); }); diff --git a/ui_framework/src/components/table/table_info.test.js b/ui_framework/src/components/table/table_info.test.js index 59d7890f0afca..4c5eb34c7265e 100644 --- a/ui_framework/src/components/table/table_info.test.js +++ b/ui_framework/src/components/table/table_info.test.js @@ -7,6 +7,6 @@ import { } from './table_info'; test('renders KuiTableInfo', () => { - const component = children; + const component = children; expect(render(component)).toMatchSnapshot(); }); diff --git a/ui_framework/src/components/table/table_row.test.js b/ui_framework/src/components/table/table_row.test.js index 5732b4d404ea7..abc210710418c 100644 --- a/ui_framework/src/components/table/table_row.test.js +++ b/ui_framework/src/components/table/table_row.test.js @@ -12,7 +12,7 @@ import { test('renders KuiTableRow', () => { const component = ( - + hi ); diff --git a/ui_framework/src/components/table/table_row_cell.test.js b/ui_framework/src/components/table/table_row_cell.test.js index 95928873a681f..117a3e8ef1336 100644 --- a/ui_framework/src/components/table/table_row_cell.test.js +++ b/ui_framework/src/components/table/table_row_cell.test.js @@ -7,6 +7,6 @@ import { } from './table_row_cell'; test('renders KuiTableRowCell', () => { - const component = ; + const component = ; expect(render(component)).toMatchSnapshot(); }); diff --git a/ui_framework/src/components/table/table_row_check_box_cell.js b/ui_framework/src/components/table/table_row_check_box_cell.js index 8d301478ac671..49bca782cd4ae 100644 --- a/ui_framework/src/components/table/table_row_check_box_cell.js +++ b/ui_framework/src/components/table/table_row_check_box_cell.js @@ -7,14 +7,14 @@ export const KuiTableRowCheckBoxCell = ({ onChange, isChecked, className, ...res const classes = classNames('kuiTableRowCell--checkBox', className); return ( ); diff --git a/ui_framework/src/components/table/table_row_check_box_cell.test.js b/ui_framework/src/components/table/table_row_check_box_cell.test.js index 632ce05924337..3429b36fcf385 100644 --- a/ui_framework/src/components/table/table_row_check_box_cell.test.js +++ b/ui_framework/src/components/table/table_row_check_box_cell.test.js @@ -7,6 +7,6 @@ import { } from './table_row_check_box_cell'; test('renders KuiTableRowCheckBoxCell', () => { - const component = ; + const component = ; expect(render(component)).toMatchSnapshot(); }); diff --git a/ui_framework/src/components/tabs/tab.test.js b/ui_framework/src/components/tabs/tab.test.js index e820d148755b5..66311c4f90b8e 100644 --- a/ui_framework/src/components/tabs/tab.test.js +++ b/ui_framework/src/components/tabs/tab.test.js @@ -9,12 +9,12 @@ import { describe('KuiTab', () => { test('renders', () => { - const component = {}} { ...requiredProps }>children; + const component = {}} {...requiredProps}>children; expect(render(component)).toMatchSnapshot(); }); test('renders isSelected', () => { - const component = {}} isSelected { ...requiredProps }>children; + const component = {}} isSelected {...requiredProps}>children; expect(render(component)).toMatchSnapshot(); }); diff --git a/ui_framework/src/components/tabs/tabs.test.js b/ui_framework/src/components/tabs/tabs.test.js index 24e934021a43d..947bd1394da44 100644 --- a/ui_framework/src/components/tabs/tabs.test.js +++ b/ui_framework/src/components/tabs/tabs.test.js @@ -9,7 +9,7 @@ import { describe('KuiTabs', () => { test('renders', () => { const component = ( - + ); expect(render(component)).toMatchSnapshot(); diff --git a/ui_framework/src/components/tool_bar/tool_bar.test.js b/ui_framework/src/components/tool_bar/tool_bar.test.js index 5fc1eb6d38227..bb6d745573683 100644 --- a/ui_framework/src/components/tool_bar/tool_bar.test.js +++ b/ui_framework/src/components/tool_bar/tool_bar.test.js @@ -7,7 +7,7 @@ import { } from './tool_bar'; test('renders KuiToolBar', () => { - const component = children; + const component = children; expect(render(component)).toMatchSnapshot(); }); diff --git a/ui_framework/src/components/tool_bar/tool_bar_footer.test.js b/ui_framework/src/components/tool_bar/tool_bar_footer.test.js index c48ee7fcdcac0..67c5d6132115e 100644 --- a/ui_framework/src/components/tool_bar/tool_bar_footer.test.js +++ b/ui_framework/src/components/tool_bar/tool_bar_footer.test.js @@ -7,6 +7,6 @@ import { } from './tool_bar_footer'; test('renders KuiToolBarFooter', () => { - const component = children; + const component = children; expect(render(component)).toMatchSnapshot(); }); diff --git a/ui_framework/src/components/tool_bar/tool_bar_footer_section.test.js b/ui_framework/src/components/tool_bar/tool_bar_footer_section.test.js index 10008b58e0399..f41d6566cb75e 100644 --- a/ui_framework/src/components/tool_bar/tool_bar_footer_section.test.js +++ b/ui_framework/src/components/tool_bar/tool_bar_footer_section.test.js @@ -7,6 +7,6 @@ import { } from './tool_bar_footer_section'; test('renders KuiToolBarFooterSection', () => { - const component = children; + const component = children; expect(render(component)).toMatchSnapshot(); }); diff --git a/ui_framework/src/components/tool_bar/tool_bar_search_box.js b/ui_framework/src/components/tool_bar/tool_bar_search_box.js index 36803651522f5..41bf0e9925890 100644 --- a/ui_framework/src/components/tool_bar/tool_bar_search_box.js +++ b/ui_framework/src/components/tool_bar/tool_bar_search_box.js @@ -8,18 +8,18 @@ export function KuiToolBarSearchBox({ filter, onFilter, placeholder, className, const classes = classNames('kuiToolBarSearch', className); return (
diff --git a/ui_framework/src/components/tool_bar/tool_bar_search_box.test.js b/ui_framework/src/components/tool_bar/tool_bar_search_box.test.js index 17685a506e1da..7f54bb3bb4e69 100644 --- a/ui_framework/src/components/tool_bar/tool_bar_search_box.test.js +++ b/ui_framework/src/components/tool_bar/tool_bar_search_box.test.js @@ -10,13 +10,13 @@ import { const onFilter = sinon.spy(); test('renders KuiToolBarSearchBox', () => { - const component = ; + const component = ; expect(render(component)).toMatchSnapshot(); }); describe('onFilter', () => { test('is called on change event, with the value entered', () => { - const searchBox = mount(); + const searchBox = mount(); onFilter.reset(); const event = { target: { value: 'a' } }; searchBox.find('input').simulate('change', event); diff --git a/ui_framework/src/components/tool_bar/tool_bar_section.test.js b/ui_framework/src/components/tool_bar/tool_bar_section.test.js index 8a6e92e038f11..7a98f905d9c22 100644 --- a/ui_framework/src/components/tool_bar/tool_bar_section.test.js +++ b/ui_framework/src/components/tool_bar/tool_bar_section.test.js @@ -7,6 +7,6 @@ import { } from './tool_bar_section'; test('renders KuiToolBarSection', () => { - const component = children; + const component = children; expect(render(component)).toMatchSnapshot(); }); diff --git a/ui_framework/src/components/tool_bar/tool_bar_text.test.js b/ui_framework/src/components/tool_bar/tool_bar_text.test.js index c8e697c4a4c0a..b55b49b2be893 100644 --- a/ui_framework/src/components/tool_bar/tool_bar_text.test.js +++ b/ui_framework/src/components/tool_bar/tool_bar_text.test.js @@ -7,7 +7,7 @@ import { } from './tool_bar_text'; test('renders KuiToolBarText', () => { - const component = children; + const component = children; expect(render(component)).toMatchSnapshot(); }); diff --git a/ui_framework/src/components/typography/typography.test.js b/ui_framework/src/components/typography/typography.test.js index 4e2d0959e54f0..d0fd054cba873 100644 --- a/ui_framework/src/components/typography/typography.test.js +++ b/ui_framework/src/components/typography/typography.test.js @@ -11,7 +11,7 @@ import { describe('KuiTitle', () => { test('is rendered', () => { const component = render( - +

Hello

); @@ -39,7 +39,7 @@ describe('KuiTitle', () => { describe('KuiText', () => { test('is rendered', () => { const component = render( - +

Hello

);