Chore: Remove deprecated TextDisplayOptions export (#49705)

This commit is contained in:
kay delaney 2022-05-26 15:02:11 +01:00 committed by GitHub
parent 43249464bb
commit c6ac9410b2
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
5 changed files with 8 additions and 21 deletions

View File

@ -26,6 +26,3 @@ export { PanelPlugin, SetFieldConfigOptionsArgs, StandardOptionConfig } from './
export { createFieldConfigRegistry } from './panel/registryFactories';
export { QueryRunner, QueryRunnerOptions } from './types/queryRunner';
export { GroupingToMatrixTransformerOptions } from './transformations/transformers/groupingToMatrix';
// Moved to `@grafana/schema`, in Grafana 9, this will be removed
export * from './schema';

View File

@ -1,11 +0,0 @@
// Moved to `@grafana/schema`, in Grafana 9, this will be removed
//---------------------------------------------------------------
// grafana/grafana/packages/grafana-schema$ grep export src/schema/*.ts
/**
* @deprecated Moved to `@grafana/schema` package and will be removed in Grafana 9
* @public
*/
export {
// Styles that changed
VizTextDisplayOptions as TextDisplayOptions, // rename
} from '@grafana/schema';

View File

@ -14,12 +14,12 @@ import {
GAUGE_DEFAULT_MAXIMUM,
GAUGE_DEFAULT_MINIMUM,
getFieldColorMode,
TextDisplayOptions,
ThresholdsMode,
TimeSeriesValue,
VizOrientation,
} from '@grafana/data';
import { selectors } from '@grafana/e2e-selectors';
import { VizTextDisplayOptions } from '@grafana/schema';
import { Themeable2 } from '../../types';
import { calculateFontSize, measureText } from '../../utils/measureText';
@ -39,7 +39,7 @@ export interface Props extends Themeable2 {
display?: DisplayProcessor;
value: DisplayValue;
orientation: VizOrientation;
text?: TextDisplayOptions;
text?: VizTextDisplayOptions;
itemSpacing?: number;
lcdCellWidth?: number;
displayMode: BarGaugeDisplayMode;
@ -609,7 +609,7 @@ function getValueStyles(
width: number,
height: number,
orientation: VizOrientation,
text?: TextDisplayOptions
text?: VizTextDisplayOptions
): CSSProperties {
const styles: CSSProperties = {
color,

View File

@ -1,6 +1,7 @@
import React, { PureComponent } from 'react';
import { DisplayValue, DisplayValueAlignmentFactors, FieldSparkline, TextDisplayOptions } from '@grafana/data';
import { DisplayValue, DisplayValueAlignmentFactors, FieldSparkline } from '@grafana/data';
import { VizTextDisplayOptions } from '@grafana/schema';
import { Themeable2 } from '../../types';
import { FormattedValueDisplay } from '../FormattedValueDisplay/FormattedValueDisplay';
@ -57,7 +58,7 @@ export interface Props extends Themeable2 {
/** Factors that should influence the positioning of the text */
alignmentFactors?: DisplayValueAlignmentFactors;
/** Explicit font size control */
text?: TextDisplayOptions;
text?: VizTextDisplayOptions;
/** Specify which text should be visible in the BigValue */
textMode?: BigValueTextMode;
/** If true disables the tooltip */

View File

@ -8,8 +8,8 @@ import {
ThresholdsMode,
GAUGE_DEFAULT_MAXIMUM,
GAUGE_DEFAULT_MINIMUM,
TextDisplayOptions,
} from '@grafana/data';
import { VizTextDisplayOptions } from '@grafana/schema';
import { Themeable } from '../../types';
import { calculateFontSize } from '../../utils/measureText';
@ -23,7 +23,7 @@ export interface Props extends Themeable {
showThresholdLabels: boolean;
width: number;
value: DisplayValue;
text?: TextDisplayOptions;
text?: VizTextDisplayOptions;
onClick?: React.MouseEventHandler<HTMLElement>;
className?: string;
}