mirror of
https://github.com/grafana/grafana.git
synced 2025-02-25 18:55:37 -06:00
Build: fix failing grafana/ui build (#16913)
* Bump version of @types/react and regenerate yarn.lock * Fix imports in grafana/ui
This commit is contained in:
@@ -31,7 +31,7 @@
|
|||||||
"@types/lodash": "4.14.123",
|
"@types/lodash": "4.14.123",
|
||||||
"@types/node": "11.13.4",
|
"@types/node": "11.13.4",
|
||||||
"@types/papaparse": "4.5.9",
|
"@types/papaparse": "4.5.9",
|
||||||
"@types/react": "16.8.13",
|
"@types/react": "16.8.16",
|
||||||
"@types/react-dom": "16.8.4",
|
"@types/react-dom": "16.8.4",
|
||||||
"@types/react-grid-layout": "0.16.7",
|
"@types/react-grid-layout": "0.16.7",
|
||||||
"@types/react-select": "2.0.15",
|
"@types/react-select": "2.0.15",
|
||||||
|
|||||||
@@ -55,7 +55,7 @@
|
|||||||
"@types/node": "10.14.1",
|
"@types/node": "10.14.1",
|
||||||
"@types/papaparse": "4.5.9",
|
"@types/papaparse": "4.5.9",
|
||||||
"@types/pretty-format": "20.0.1",
|
"@types/pretty-format": "20.0.1",
|
||||||
"@types/react": "16.8.13",
|
"@types/react": "16.8.16",
|
||||||
"@types/react-custom-scrollbars": "4.0.5",
|
"@types/react-custom-scrollbars": "4.0.5",
|
||||||
"@types/react-test-renderer": "16.8.1",
|
"@types/react-test-renderer": "16.8.1",
|
||||||
"@types/react-transition-group": "2.0.16",
|
"@types/react-transition-group": "2.0.16",
|
||||||
|
|||||||
@@ -41,6 +41,7 @@ const buildCjsPackage = ({ env }) => {
|
|||||||
'sortBy',
|
'sortBy',
|
||||||
'uniqueId',
|
'uniqueId',
|
||||||
'zip',
|
'zip',
|
||||||
|
'omit',
|
||||||
],
|
],
|
||||||
'../../node_modules/react-color/lib/components/common': ['Saturation', 'Hue', 'Alpha'],
|
'../../node_modules/react-color/lib/components/common': ['Saturation', 'Hue', 'Alpha'],
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
import React, { PureComponent } from 'react';
|
import React, { PureComponent } from 'react';
|
||||||
import { select, pie, arc, event } from 'd3';
|
import { select, pie, arc, event } from 'd3';
|
||||||
import { sum } from 'lodash';
|
import sum from 'lodash/sum';
|
||||||
|
|
||||||
import { GrafanaThemeType, DisplayValue } from '../../types';
|
import { GrafanaThemeType, DisplayValue } from '../../types';
|
||||||
import { Themeable } from '../../index';
|
import { Themeable } from '../../index';
|
||||||
|
|||||||
@@ -1,7 +1,8 @@
|
|||||||
import React, { PureComponent } from 'react';
|
import React, { PureComponent } from 'react';
|
||||||
import classNames from 'classnames';
|
import classNames from 'classnames';
|
||||||
|
import { SelectOptionItem } from '../Select/Select';
|
||||||
import { SelectOptionItem, ButtonSelect, Tooltip } from '@grafana/ui';
|
import { Tooltip } from '../Tooltip/Tooltip';
|
||||||
|
import { ButtonSelect } from '../Select/ButtonSelect';
|
||||||
|
|
||||||
export const offOption = { label: 'Off', value: '' };
|
export const offOption = { label: 'Off', value: '' };
|
||||||
export const defaultIntervals = ['5s', '10s', '30s', '1m', '5m', '15m', '30m', '1h', '2h', '1d'];
|
export const defaultIntervals = ['5s', '10s', '30s', '1m', '5m', '15m', '30m', '1h', '2h', '1d'];
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
import { omit } from 'lodash';
|
import omit from 'lodash/omit';
|
||||||
import React, { InputHTMLAttributes, FunctionComponent } from 'react';
|
import React, { InputHTMLAttributes, FunctionComponent } from 'react';
|
||||||
import { FormField } from '..';
|
import { FormField } from '..';
|
||||||
|
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
import React, { PureComponent } from 'react';
|
import React, { PureComponent } from 'react';
|
||||||
import Select, { SelectOptionItem } from './Select';
|
import Select, { SelectOptionItem } from './Select';
|
||||||
import { PopperContent } from '@grafana/ui/src/components/Tooltip/PopperController';
|
import { PopperContent } from '../Tooltip/PopperController';
|
||||||
|
|
||||||
interface ButtonComponentProps {
|
interface ButtonComponentProps {
|
||||||
label: string | undefined;
|
label: string | undefined;
|
||||||
|
|||||||
@@ -17,8 +17,8 @@ import IndicatorsContainer from './IndicatorsContainer';
|
|||||||
import NoOptionsMessage from './NoOptionsMessage';
|
import NoOptionsMessage from './NoOptionsMessage';
|
||||||
import resetSelectStyles from './resetSelectStyles';
|
import resetSelectStyles from './resetSelectStyles';
|
||||||
import { CustomScrollbar } from '../CustomScrollbar/CustomScrollbar';
|
import { CustomScrollbar } from '../CustomScrollbar/CustomScrollbar';
|
||||||
import { PopperContent } from '@grafana/ui/src/components/Tooltip/PopperController';
|
import { PopperContent } from '../Tooltip/PopperController';
|
||||||
import { Tooltip } from '@grafana/ui';
|
import { Tooltip } from '../Tooltip/Tooltip';
|
||||||
|
|
||||||
export interface SelectOptionItem<T> {
|
export interface SelectOptionItem<T> {
|
||||||
label?: string;
|
label?: string;
|
||||||
|
|||||||
@@ -2,13 +2,17 @@
|
|||||||
import React, { PureComponent, ChangeEvent } from 'react';
|
import React, { PureComponent, ChangeEvent } from 'react';
|
||||||
|
|
||||||
// Components
|
// Components
|
||||||
import { FormField, FormLabel, PanelOptionsGroup, StatsPicker, ReducerID } from '@grafana/ui';
|
import { PanelOptionsGroup } from '../PanelOptionsGroup/PanelOptionsGroup';
|
||||||
|
import { FormLabel } from '../FormLabel/FormLabel';
|
||||||
|
import { FormField } from '../FormField/FormField';
|
||||||
|
import { StatsPicker } from '../StatsPicker/StatsPicker';
|
||||||
|
|
||||||
// Types
|
// Types
|
||||||
import { FieldDisplayOptions, DEFAULT_FIELD_DISPLAY_VALUES_LIMIT } from '../../utils/fieldDisplay';
|
import { FieldDisplayOptions, DEFAULT_FIELD_DISPLAY_VALUES_LIMIT } from '../../utils/fieldDisplay';
|
||||||
import { Field } from '../../types/data';
|
import { Field } from '../../types/data';
|
||||||
import Select, { SelectOptionItem } from '../Select/Select';
|
import Select, { SelectOptionItem } from '../Select/Select';
|
||||||
import { toNumberString, toIntegerOrUndefined } from '../../utils';
|
import { toNumberString, toIntegerOrUndefined } from '../../utils';
|
||||||
|
import { ReducerID } from '../../utils/fieldReducer';
|
||||||
|
|
||||||
const showOptions: Array<SelectOptionItem<boolean>> = [
|
const showOptions: Array<SelectOptionItem<boolean>> = [
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -2,11 +2,15 @@
|
|||||||
import React, { PureComponent, ChangeEvent } from 'react';
|
import React, { PureComponent, ChangeEvent } from 'react';
|
||||||
|
|
||||||
// Components
|
// Components
|
||||||
import { FormField, FormLabel, PanelOptionsGroup, UnitPicker, SelectOptionItem } from '@grafana/ui';
|
import { PanelOptionsGroup } from '../PanelOptionsGroup/PanelOptionsGroup';
|
||||||
|
import { FormField } from '../FormField/FormField';
|
||||||
|
import { FormLabel } from '../FormLabel/FormLabel';
|
||||||
|
import { UnitPicker } from '../UnitPicker/UnitPicker';
|
||||||
|
|
||||||
// Types
|
// Types
|
||||||
import { Field } from '../../types/data';
|
import { Field } from '../../types/data';
|
||||||
import { toNumberString, toIntegerOrUndefined } from '../../utils';
|
import { toNumberString, toIntegerOrUndefined } from '../../utils';
|
||||||
|
import { SelectOptionItem } from '../Select/Select';
|
||||||
|
|
||||||
import { VAR_SERIES_NAME, VAR_FIELD_NAME, VAR_CALC, VAR_CELL_PREFIX } from '../../utils/fieldDisplay';
|
import { VAR_SERIES_NAME, VAR_FIELD_NAME, VAR_CALC, VAR_CELL_PREFIX } from '../../utils/fieldDisplay';
|
||||||
|
|
||||||
|
|||||||
@@ -14,7 +14,6 @@ import { Themeable } from '../../types/theme';
|
|||||||
|
|
||||||
import { sortSeriesData } from '../../utils/processSeriesData';
|
import { sortSeriesData } from '../../utils/processSeriesData';
|
||||||
|
|
||||||
import { SeriesData, InterpolateFunction } from '@grafana/ui';
|
|
||||||
import {
|
import {
|
||||||
TableCellBuilder,
|
TableCellBuilder,
|
||||||
ColumnStyle,
|
ColumnStyle,
|
||||||
@@ -23,6 +22,8 @@ import {
|
|||||||
simpleCellBuilder,
|
simpleCellBuilder,
|
||||||
} from './TableCellBuilder';
|
} from './TableCellBuilder';
|
||||||
import { stringToJsRegex } from '../../utils/index';
|
import { stringToJsRegex } from '../../utils/index';
|
||||||
|
import { SeriesData } from '../../types/data';
|
||||||
|
import { InterpolateFunction } from '../../types/panel';
|
||||||
|
|
||||||
export interface Props extends Themeable {
|
export interface Props extends Themeable {
|
||||||
data: SeriesData;
|
data: SeriesData;
|
||||||
|
|||||||
@@ -4,10 +4,10 @@ import React, { ReactElement } from 'react';
|
|||||||
import { GridCellProps } from 'react-virtualized';
|
import { GridCellProps } from 'react-virtualized';
|
||||||
import { Table, Props } from './Table';
|
import { Table, Props } from './Table';
|
||||||
import moment from 'moment';
|
import moment from 'moment';
|
||||||
import { ValueFormatter } from '../../utils/index';
|
import { ValueFormatter, getValueFormat, getColorFromHexRgbOrName } from '../../utils/index';
|
||||||
import { GrafanaTheme } from '../../types/theme';
|
import { GrafanaTheme } from '../../types/theme';
|
||||||
import { getValueFormat, getColorFromHexRgbOrName, Field } from '@grafana/ui';
|
|
||||||
import { InterpolateFunction } from '../../types/panel';
|
import { InterpolateFunction } from '../../types/panel';
|
||||||
|
import { Field } from '../../types/data';
|
||||||
|
|
||||||
export interface TableCellBuilderOptions {
|
export interface TableCellBuilderOptions {
|
||||||
value: any;
|
value: any;
|
||||||
|
|||||||
@@ -1,7 +1,6 @@
|
|||||||
import { SeriesData } from '../../types/data';
|
import { SeriesData } from '../../types/data';
|
||||||
import { ColumnStyle } from './TableCellBuilder';
|
import { ColumnStyle } from './TableCellBuilder';
|
||||||
|
import { getColorDefinitionByName } from '../../utils/namedColorsPalette';
|
||||||
import { getColorDefinitionByName } from '@grafana/ui';
|
|
||||||
|
|
||||||
const SemiDarkOrange = getColorDefinitionByName('semi-dark-orange');
|
const SemiDarkOrange = getColorDefinitionByName('semi-dark-orange');
|
||||||
|
|
||||||
|
|||||||
@@ -1,10 +1,11 @@
|
|||||||
import React, { PureComponent, ChangeEvent } from 'react';
|
import React, { PureComponent, ChangeEvent } from 'react';
|
||||||
import { Threshold } from '../../types';
|
import { Threshold } from '../../types';
|
||||||
import { ColorPicker } from '..';
|
|
||||||
import { Input, PanelOptionsGroup } from '..';
|
|
||||||
import { colors } from '../../utils';
|
import { colors } from '../../utils';
|
||||||
import { ThemeContext } from '../../themes';
|
import { ThemeContext } from '../../themes';
|
||||||
import { getColorFromHexRgbOrName } from '../../utils';
|
import { getColorFromHexRgbOrName } from '../../utils';
|
||||||
|
import { Input } from '../Input/Input';
|
||||||
|
import { ColorPicker } from '../ColorPicker/ColorPicker';
|
||||||
|
import { PanelOptionsGroup } from '../PanelOptionsGroup/PanelOptionsGroup';
|
||||||
|
|
||||||
export interface Props {
|
export interface Props {
|
||||||
thresholds: Threshold[];
|
thresholds: Threshold[];
|
||||||
|
|||||||
@@ -1,12 +1,13 @@
|
|||||||
import React, { PureComponent } from 'react';
|
import React, { PureComponent } from 'react';
|
||||||
import moment from 'moment';
|
import moment from 'moment';
|
||||||
import { TimeRange, TimeOptions, TimeOption, SelectOptionItem } from '@grafana/ui';
|
|
||||||
import { ButtonSelect } from '../Select/ButtonSelect';
|
import { ButtonSelect } from '../Select/ButtonSelect';
|
||||||
import { mapTimeOptionToTimeRange, mapTimeRangeToRangeString } from './time';
|
import { mapTimeOptionToTimeRange, mapTimeRangeToRangeString } from './time';
|
||||||
import { Props as TimePickerPopoverProps } from './TimePickerPopover';
|
import { Props as TimePickerPopoverProps } from './TimePickerPopover';
|
||||||
import { TimePickerOptionGroup } from './TimePickerOptionGroup';
|
import { TimePickerOptionGroup } from './TimePickerOptionGroup';
|
||||||
import { PopperContent } from '../Tooltip/PopperController';
|
import { PopperContent } from '../Tooltip/PopperController';
|
||||||
import { Timezone } from '../../utils/datemath';
|
import { Timezone } from '../../utils/datemath';
|
||||||
|
import { TimeRange, TimeOption, TimeOptions } from '../../types/time';
|
||||||
|
import { SelectOptionItem } from '../Select/Select';
|
||||||
|
|
||||||
export interface Props {
|
export interface Props {
|
||||||
value: TimeRange;
|
value: TimeRange;
|
||||||
|
|||||||
@@ -1,8 +1,8 @@
|
|||||||
import React, { PureComponent, createRef } from 'react';
|
import React, { PureComponent, createRef } from 'react';
|
||||||
import { GroupProps } from 'react-select/lib/components/Group';
|
import { GroupProps } from 'react-select/lib/components/Group';
|
||||||
import { Popper } from '@grafana/ui/src/components/Tooltip/Popper';
|
|
||||||
import { Props as TimePickerProps, TimePickerPopover } from './TimePickerPopover';
|
import { Props as TimePickerProps, TimePickerPopover } from './TimePickerPopover';
|
||||||
import { TimeRange } from '@grafana/ui';
|
import { TimeRange } from '../../types/time';
|
||||||
|
import { Popper } from '../Tooltip/Popper';
|
||||||
|
|
||||||
export interface DataProps {
|
export interface DataProps {
|
||||||
onPopoverOpen: () => void;
|
onPopoverOpen: () => void;
|
||||||
|
|||||||
@@ -1,8 +1,7 @@
|
|||||||
import moment, { Moment } from 'moment';
|
import moment, { Moment } from 'moment';
|
||||||
import { TimeOption, TimeRange, TIME_FORMAT } from '@grafana/ui';
|
import { TimeOption, TimeRange, TIME_FORMAT } from '../../types/time';
|
||||||
|
import { describeTimeRange } from '../../utils/rangeutil';
|
||||||
import * as dateMath from '@grafana/ui/src/utils/datemath';
|
import * as dateMath from '../../utils/datemath';
|
||||||
import { describeTimeRange } from '@grafana/ui/src/utils/rangeutil';
|
|
||||||
|
|
||||||
export const mapTimeOptionToTimeRange = (
|
export const mapTimeOptionToTimeRange = (
|
||||||
timeOption: TimeOption,
|
timeOption: TimeOption,
|
||||||
|
|||||||
@@ -2,7 +2,7 @@
|
|||||||
import _ from 'lodash';
|
import _ from 'lodash';
|
||||||
import moment from 'moment';
|
import moment from 'moment';
|
||||||
|
|
||||||
import { RawTimeRange } from '@grafana/ui';
|
import { RawTimeRange } from '../types/time';
|
||||||
|
|
||||||
import * as dateMath from './datemath';
|
import * as dateMath from './datemath';
|
||||||
|
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
import { stringToJsRegex, stringToMs } from '@grafana/ui';
|
import { stringToJsRegex, stringToMs } from './string';
|
||||||
|
|
||||||
describe('stringToJsRegex', () => {
|
describe('stringToJsRegex', () => {
|
||||||
it('should parse the valid regex value', () => {
|
it('should parse the valid regex value', () => {
|
||||||
|
|||||||
Reference in New Issue
Block a user