Grafana/data: Remove barrel files part 1 (#89556)

* chore(grafana-data): remove dataframe barrel file and update all imports and exports

* chore(grafana-data): remove field barrel file and update imports n exports

* chore(grafana-data): remove utils barrel file and update imports and exports

* chore(grafana-data): remove tranformations barrel file and update imports n exports

* chore(grafana-data): remove imports from root index.ts

* chore(grafana-data): remove valueFormats barrel file and update imports n exports

* chore(grafana-data): don't import from root barrel file
This commit is contained in:
Jack Westbrook 2024-06-27 12:42:42 +02:00 committed by Ryan McKinley
parent c3b16639bc
commit 177747ecda
63 changed files with 385 additions and 192 deletions

View File

@ -1,4 +1,6 @@
import { Field, DataFrame, FieldType, guessFieldTypeForField } from '../index';
import { DataFrame, Field, FieldType } from '../types/dataFrame';
import { guessFieldTypeForField } from './processDataFrame';
export interface FieldWithIndex extends Field {
index: number;

View File

@ -1,5 +1,8 @@
import { DataFrame, DataFrameJSON, FieldType, getFieldDisplayName, reduceField, ReducerID } from '..';
import { getFieldDisplayName } from '../field/fieldState';
import { reduceField, ReducerID } from '../transformations/fieldReducer';
import { FieldType, DataFrame } from '../types';
import { DataFrameJSON } from './DataFrameJSON';
import {
closestIdx,
getStreamingFrameOptions,

View File

@ -1,16 +1,12 @@
import { AlignedData } from 'uplot';
import { DataFrame, Field, FieldDTO, FieldType, Labels, parseLabels, QueryResultMeta } from '..';
import { join } from '../transformations/transformers/joinDataFrames';
import { FieldDTO, QueryResultMeta, DataFrame, Field, FieldType, Labels } from '../types';
import { parseLabels } from '../utils/labels';
import { renderLegendFormat } from '../utils/legend';
import {
DataFrameJSON,
decodeFieldValueEntities,
FieldSchema,
guessFieldTypeFromValue,
toFilteredDataFrameDTO,
} from '.';
import { DataFrameJSON, decodeFieldValueEntities, FieldSchema } from './DataFrameJSON';
import { guessFieldTypeFromValue, toFilteredDataFrameDTO } from './processDataFrame';
/**
* Indicate if the frame is appened or replace

View File

@ -1,18 +0,0 @@
export * from './DataFrameView';
export * from './FieldCache';
export * from './MutableDataFrame';
export * from './processDataFrame';
export * from './dimensions';
export * from './ArrayDataFrame';
export * from './DataFrameJSON';
export * from './frameComparisons';
export {
anySeriesWithTimeField,
hasTimeField,
isTimeSeriesFrame,
isTimeSeriesFrames,
isTimeSeriesField,
getRowUniqueId,
addRow,
} from './utils';
export { StreamingDataFrame, StreamingFrameAction, type StreamingFrameOptions, closestIdx } from './StreamingDataFrame';

View File

@ -4,6 +4,7 @@ import { DataFrameDTO, Field, FieldType, TableData, TimeSeries } from '../types/
import { ArrayDataFrame } from './ArrayDataFrame';
import {
createDataFrame,
getFieldTypeFromValue,
guessFieldTypeForField,
guessFieldTypeFromValue,
guessFieldTypes,
@ -15,8 +16,6 @@ import {
toLegacyResponseData,
} from './processDataFrame';
import { getFieldTypeFromValue } from '.';
describe('toDataFrame', () => {
it('converts timeseries to series', () => {
const input1 = {

View File

@ -6,8 +6,7 @@ import { colorManipulator } from '../themes';
import { GrafanaTheme2 } from '../themes/types';
import { reduceField } from '../transformations/fieldReducer';
import { FALLBACK_COLOR, Field, FieldColorModeId, Threshold } from '../types';
import { RegistryItem } from '../utils';
import { Registry } from '../utils/Registry';
import { Registry, RegistryItem } from '../utils/Registry';
import { getScaleCalculator, ColorScaleValue } from './scale';
import { fallBackThreshold } from './thresholds';

View File

@ -3,8 +3,8 @@ import { isEmpty } from 'lodash';
import { DataFrameView } from '../dataframe/DataFrameView';
import { getTimeField } from '../dataframe/processDataFrame';
import { GrafanaTheme2 } from '../themes';
import { getFieldMatcher } from '../transformations';
import { reduceField, ReducerID } from '../transformations/fieldReducer';
import { getFieldMatcher } from '../transformations/matchers';
import { FieldMatcherID } from '../transformations/matchers/ids';
import {
DataFrame,

View File

@ -1,7 +1,8 @@
import { ArrayDataFrame, createDataFrame, toDataFrame } from '../dataframe';
import { ArrayDataFrame } from '../dataframe/ArrayDataFrame';
import { createDataFrame, toDataFrame } from '../dataframe/processDataFrame';
import { rangeUtil } from '../datetime';
import { createTheme } from '../themes';
import { FieldMatcherID } from '../transformations';
import { FieldMatcherID } from '../transformations/matchers/ids';
import {
DataFrame,
Field,
@ -15,7 +16,8 @@ import {
ScopedVars,
ThresholdsMode,
} from '../types';
import { locationUtil, Registry } from '../utils';
import { Registry } from '../utils/Registry';
import { locationUtil } from '../utils/location';
import { mockStandardProperties } from '../utils/tests/mockStandardProperties';
import { FieldConfigOptionsRegistry } from './FieldConfigOptionsRegistry';

View File

@ -4,11 +4,13 @@ import usePrevious from 'react-use/lib/usePrevious';
import { VariableFormatID } from '@grafana/schema';
import { compareArrayValues, compareDataFrameStructures, guessFieldTypeForField } from '../dataframe';
import { compareArrayValues, compareDataFrameStructures } from '../dataframe/frameComparisons';
import { guessFieldTypeForField } from '../dataframe/processDataFrame';
import { PanelPlugin } from '../panel/PanelPlugin';
import { GrafanaTheme2 } from '../themes';
import { asHexString } from '../themes/colorManipulator';
import { fieldMatchers, reduceField, ReducerID } from '../transformations';
import { ReducerID, reduceField } from '../transformations/fieldReducer';
import { fieldMatchers } from '../transformations/matchers';
import {
ApplyFieldOverrideOptions,
DataContextScopedVar,
@ -35,8 +37,8 @@ import {
ValueLinkConfig,
} from '../types';
import { FieldMatcher } from '../types/transformations';
import { locationUtil } from '../utils';
import { mapInternalLinkToExplore } from '../utils/dataLinks';
import { locationUtil } from '../utils/location';
import { FieldConfigOptionsRegistry } from './FieldConfigOptionsRegistry';
import { getDisplayProcessor, getRawDisplayProcessor } from './displayProcessor';

View File

@ -1,4 +1,4 @@
import { toDataFrame } from '../dataframe';
import { toDataFrame } from '../dataframe/processDataFrame';
import { DataFrame, TIME_SERIES_VALUE_FIELD_NAME, FieldType, TIME_SERIES_TIME_FIELD_NAME } from '../types';
import { getFieldDisplayName, getFrameDisplayName } from './fieldState';

View File

@ -1,4 +1,4 @@
import { getFieldMatcher } from '../transformations';
import { getFieldMatcher } from '../transformations/matchers';
import {
DataFrame,
Field,

View File

@ -1,4 +1,4 @@
import { createDataFrame, toDataFrame } from '../dataframe';
import { createDataFrame, toDataFrame } from '../dataframe/processDataFrame';
import { createTheme } from '../themes';
import { applyFieldOverrides } from './fieldOverrides';

View File

@ -1,7 +1,7 @@
import { toNumber } from 'lodash';
import { DataFrame, DisplayValue, TimeZone } from '../types';
import { formattedValueToString } from '../valueFormats';
import { formattedValueToString } from '../valueFormats/valueFormats';
import { getDisplayProcessor } from './displayProcessor';

View File

@ -1,18 +0,0 @@
export * from './fieldDisplay';
export * from './displayProcessor';
export * from './standardFieldConfigEditorRegistry';
export * from './overrides/processors';
export {
getFieldColorModeForField,
getFieldColorMode,
fieldColorModeRegistry,
type FieldColorMode,
getFieldSeriesColor,
} from './fieldColor';
export { FieldConfigOptionsRegistry } from './FieldConfigOptionsRegistry';
export { sortThresholds, getActiveThreshold } from './thresholds';
export { applyFieldOverrides, validateFieldConfig, applyRawFieldOverrides, useFieldOverrides } from './fieldOverrides';
export { getFieldDisplayValuesProxy } from './getFieldDisplayValuesProxy';
export { getFieldDisplayName, getFrameDisplayName, cacheFieldDisplayNames, getUniqueFieldName } from './fieldState';
export { getScaleCalculator, getFieldConfigWithMinMax, getMinMaxAndDelta } from './scale';

View File

@ -8,7 +8,7 @@ import { EventBus } from '../events';
import { StandardEditorContext } from '../field/standardFieldConfigEditorRegistry';
import { GrafanaTheme2 } from '../themes';
import { PanelData } from '../types';
import { PanelOptionsEditorBuilder } from '../utils';
import { PanelOptionsEditorBuilder } from '../utils/OptionsUIBuilders';
import { RegistryItemWithOptions } from '../utils/Registry';
/**

View File

@ -3,20 +3,298 @@
*
* @packageDocumentation
*/
export * from './utils';
export * from './types';
export * from './dataframe';
export * from './transformations';
export * from './datetime';
export * from './text';
export * from './valueFormats';
export * from './field';
export * from './events';
export * from './themes';
export * from './monaco';
export * from './geo/layer';
export * from './query';
export { amendTable, trimTable, type Table } from './table/amendTimeSeries';
// DataFrames
export { DataFrameView } from './dataframe/DataFrameView';
export { type FieldWithIndex, FieldCache } from './dataframe/FieldCache';
export { type MutableField, MISSING_VALUE, MutableDataFrame } from './dataframe/MutableDataFrame';
export {
guessFieldTypeFromNameAndValue,
getFieldTypeFromValue,
guessFieldTypeFromValue,
guessFieldTypeForField,
guessFieldTypes,
isTableData,
isDataFrame,
isDataFrameWithValue,
toDataFrame,
toLegacyResponseData,
sortDataFrame,
reverseDataFrame,
getDataFrameRow,
toDataFrameDTO,
toFilteredDataFrameDTO,
getTimeField,
getProcessedDataFrames,
preProcessPanelData,
type PartialDataFrame,
createDataFrame,
} from './dataframe/processDataFrame';
export {
type Dimension,
type Dimensions,
createDimension,
getColumnsFromDimension,
getColumnFromDimension,
getValueFromDimension,
getAllValuesFromDimension,
getDimensionByName,
} from './dataframe/dimensions';
export {
anySeriesWithTimeField,
hasTimeField,
isTimeSeriesFrame,
isTimeSeriesFrames,
isTimeSeriesField,
getRowUniqueId,
addRow,
} from './dataframe/utils';
export {
StreamingDataFrame,
StreamingFrameAction,
type StreamingFrameOptions,
closestIdx,
} from './dataframe/StreamingDataFrame';
export { ArrayDataFrame, arrayToDataFrame } from './dataframe/ArrayDataFrame';
export {
type DataFrameJSON,
type DataFrameData,
type DataFrameSchema,
type FieldSchema,
type FieldValueEntityLookup,
decodeFieldValueEntities,
decodeFieldValueEnums,
dataFrameFromJSON,
dataFrameToJSON,
} from './dataframe/DataFrameJSON';
export { compareDataFrameStructures, compareArrayValues, shallowCompare } from './dataframe/frameComparisons';
// Field
export {
getFieldColorModeForField,
getFieldColorMode,
fieldColorModeRegistry,
type FieldColorMode,
getFieldSeriesColor,
} from './field/fieldColor';
export { FieldConfigOptionsRegistry } from './field/FieldConfigOptionsRegistry';
export { sortThresholds, getActiveThreshold } from './field/thresholds';
export {
applyFieldOverrides,
validateFieldConfig,
applyRawFieldOverrides,
useFieldOverrides,
} from './field/fieldOverrides';
export { getFieldDisplayValuesProxy } from './field/getFieldDisplayValuesProxy';
export {
getFieldDisplayName,
getFrameDisplayName,
cacheFieldDisplayNames,
getUniqueFieldName,
} from './field/fieldState';
export { getScaleCalculator, getFieldConfigWithMinMax, getMinMaxAndDelta } from './field/scale';
export {
type ReduceDataOptions,
VAR_SERIES_NAME,
VAR_FIELD_NAME,
VAR_FIELD_LABELS,
VAR_CALC,
VAR_CELL_PREFIX,
type FieldSparkline,
type FieldDisplay,
type GetFieldDisplayValuesOptions,
DEFAULT_FIELD_DISPLAY_VALUES_LIMIT,
getFieldDisplayValues,
hasLinks,
getDisplayValueAlignmentFactors,
fixCellTemplateExpressions,
} from './field/fieldDisplay';
export { getDisplayProcessor, getRawDisplayProcessor } from './field/displayProcessor';
export {
type StandardEditorContext,
type StandardEditorProps,
type StandardEditorsRegistryItem,
standardFieldConfigEditorRegistry,
standardEditorsRegistry,
} from './field/standardFieldConfigEditorRegistry';
export {
identityOverrideProcessor,
numberOverrideProcessor,
displayNameOverrideProcessor,
type NumberFieldConfigSettings,
type SliderFieldConfigSettings,
type DataLinksFieldConfigSettings,
type ValueMappingFieldConfigSettings,
type SelectFieldConfigSettings,
type StringFieldConfigSettings,
type ThresholdsFieldConfigSettings,
type UnitFieldConfigSettings,
type FieldColorConfigSettings,
type StatsPickerConfigSettings,
type FieldNamePickerConfigSettings,
dataLinksOverrideProcessor,
valueMappingsOverrideProcessor,
selectOverrideProcessor,
stringOverrideProcessor,
thresholdsOverrideProcessor,
unitOverrideProcessor,
booleanOverrideProcessor,
FieldNamePickerBaseNameMode,
} from './field/overrides/processors';
// Utils
export { PanelOptionsEditorBuilder, FieldConfigEditorBuilder } from './utils/OptionsUIBuilders';
export { getFlotPairs, getFlotPairsConstant } from './utils/flotPairs';
export { locationUtil } from './utils/location';
export { urlUtil, type UrlQueryMap, type UrlQueryValue, serializeStateToUrlParam, toURLRange } from './utils/url';
export { DataLinkBuiltInVars, mapInternalLinkToExplore } from './utils/dataLinks';
export { DocsId } from './utils/docs';
export { makeClassES5Compatible } from './utils/makeClassES5Compatible';
export { anyToNumber } from './utils/anyToNumber';
export { withLoadingIndicator, type WithLoadingIndicatorOptions } from './utils/withLoadingIndicator';
export { convertOldAngularValueMappings, LegacyMappingType } from './utils/valueMappings';
export { containsSearchFilter, type SearchFilterOptions, getSearchFilterScopedVar } from './utils/variables';
export { renderLegendFormat } from './utils/legend';
export { matchPluginId } from './utils/matchPluginId';
export { type RegistryItem, type RegistryItemWithOptions, Registry } from './utils/Registry';
export {
getDataSourceRef,
isDataSourceRef,
getDataSourceUID,
onUpdateDatasourceOption,
onUpdateDatasourceJsonDataOption,
onUpdateDatasourceSecureJsonDataOption,
onUpdateDatasourceJsonDataOptionSelect,
onUpdateDatasourceJsonDataOptionChecked,
onUpdateDatasourceSecureJsonDataOptionSelect,
onUpdateDatasourceResetOption,
updateDatasourcePluginOption,
updateDatasourcePluginJsonDataOption,
updateDatasourcePluginSecureJsonDataOption,
updateDatasourcePluginResetOption,
} from './utils/datasource';
export { deprecationWarning } from './utils/deprecationWarning';
export {
CSVHeaderStyle,
type CSVConfig,
type CSVParseCallbacks,
type CSVOptions,
readCSV,
CSVReader,
toCSV,
} from './utils/csv';
export { parseLabels, findCommonLabels, findUniqueLabels, matchAllLabels, formatLabels } from './utils/labels';
export { roundDecimals, guessDecimals } from './utils/numbers';
export { objRemoveUndefined, isEmptyObject } from './utils/object';
export { classicColors } from './utils/namedColorsPalette';
export { getSeriesTimeStep, hasMsResolution } from './utils/series';
export { BinaryOperationID, type BinaryOperation, binaryOperators } from './utils/binaryOperators';
export { UnaryOperationID, type UnaryOperation, unaryOperators } from './utils/unaryOperators';
export { NodeGraphDataFrameFieldNames } from './utils/nodeGraph';
export { toOption } from './utils/selectUtils';
export * as arrayUtils from './utils/arrayUtils';
export { store } from './utils/store';
export { LocalStorageValueProvider } from './utils/LocalStorageValueProvider';
// Tranformations
export { standardTransformers } from './transformations/transformers';
export {
fieldMatchers,
frameMatchers,
valueMatchers,
getFieldMatcher,
getFrameMatchers,
getValueMatcher,
} from './transformations/matchers';
export { type FieldValueMatcherConfig } from './transformations/matchers/fieldValueMatcher';
export { DataTransformerID } from './transformations/transformers/ids';
export { MatcherID, FieldMatcherID, FrameMatcherID, ValueMatcherID } from './transformations/matchers/ids';
export {
ReducerID,
isReducerID,
type FieldReducerInfo,
reduceField,
fieldReducers,
defaultCalcs,
doStandardCalcs,
} from './transformations/fieldReducer';
export { transformDataFrame } from './transformations/transformDataFrame';
export {
type TransformerRegistryItem,
type TransformerUIProps,
TransformerCategory,
standardTransformersRegistry,
} from './transformations/standardTransformersRegistry';
export {
type RegexpOrNamesMatcherOptions,
type ByNamesMatcherOptions,
ByNamesMatcherMode,
} from './transformations/matchers/nameMatcher';
export type { RenameByRegexTransformerOptions } from './transformations/transformers/renameByRegex';
/** @deprecated -- will be removed in future versions */
export {
joinDataFrames as outerJoinDataFrames,
isLikelyAscendingVector,
} from './transformations/transformers/joinDataFrames';
export * from './transformations/transformers/histogram';
export { ensureTimeField } from './transformations/transformers/convertFieldType';
// Required for Sparklines util to work in @grafana/data, but ideally kept internal
export { applyNullInsertThreshold } from './transformations/transformers/nulls/nullInsertThreshold';
export { nullToValue } from './transformations/transformers/nulls/nullToValue';
// ValueFormats
export {
type FormattedValue,
type ValueFormatter,
type ValueFormat,
type ValueFormatCategory,
type ValueFormatterIndex,
formattedValueToString,
toFixed,
toFixedScaled,
toFixedUnit,
isBooleanUnit,
booleanValueFormatter,
scaledUnits,
locale,
simpleCountUnit,
stringFormater,
getValueFormat,
getValueFormatterIndex,
getValueFormats,
} from './valueFormats/valueFormats';
export {
type ValueMatcherOptions,
type BasicValueMatcherOptions,
@ -49,7 +327,7 @@ export { getLinksSupplier } from './field/fieldOverrides';
export { CircularVector } from './vector/CircularVector';
export { vectorator } from './vector/FunctionalVector';
export { ArrayVector } from './vector/ArrayVector';
export * from './dataframe/CircularDataFrame';
export { CircularDataFrame } from './dataframe/CircularDataFrame';
export {
type CurrentUser,
userHasPermission,

View File

@ -1,11 +1,11 @@
import { PanelOptionsEditorBuilder } from '..';
import { identityOverrideProcessor } from '../field/overrides/processors';
import {
identityOverrideProcessor,
standardEditorsRegistry,
StandardEditorsRegistryItem,
standardEditorsRegistry,
standardFieldConfigEditorRegistry,
} from '../field';
} from '../field/standardFieldConfigEditorRegistry';
import { FieldConfigProperty, FieldConfigPropertyItem } from '../types';
import { PanelOptionsEditorBuilder } from '../utils/OptionsUIBuilders';
import { PanelPlugin } from './PanelPlugin';

View File

@ -1,7 +1,8 @@
import { set } from 'lodash';
import { ComponentClass, ComponentType } from 'react';
import { FieldConfigOptionsRegistry, StandardEditorContext } from '../field';
import { FieldConfigOptionsRegistry } from '../field/FieldConfigOptionsRegistry';
import { StandardEditorContext } from '../field/standardFieldConfigEditorRegistry';
import {
FieldConfigProperty,
FieldConfigSource,
@ -14,8 +15,8 @@ import {
PanelTypeChangedHandler,
VisualizationSuggestionsSupplier,
} from '../types';
import { deprecationWarning } from '../utils';
import { FieldConfigEditorBuilder, PanelOptionsEditorBuilder } from '../utils/OptionsUIBuilders';
import { deprecationWarning } from '../utils/deprecationWarning';
import { createFieldConfigRegistry } from './registryFactories';

View File

@ -1,26 +0,0 @@
export * from './matchers/ids';
export * from './transformers/ids';
export * from './matchers';
export { standardTransformers } from './transformers';
export * from './fieldReducer';
export { transformDataFrame } from './transformDataFrame';
export {
type TransformerRegistryItem,
type TransformerUIProps,
TransformerCategory,
standardTransformersRegistry,
} from './standardTransformersRegistry';
export {
type RegexpOrNamesMatcherOptions,
type ByNamesMatcherOptions,
ByNamesMatcherMode,
} from './matchers/nameMatcher';
export type { RenameByRegexTransformerOptions } from './transformers/renameByRegex';
/** @deprecated -- will be removed in future versions */
export { joinDataFrames as outerJoinDataFrames, isLikelyAscendingVector } from './transformers/joinDataFrames';
export * from './transformers/histogram';
export { ensureTimeField } from './transformers/convertFieldType';
// Required for Sparklines util to work in @grafana/data, but ideally kept internal
export { applyNullInsertThreshold } from './transformers/nulls/nullInsertThreshold';
export { nullToValue } from './transformers/nulls/nullToValue';

View File

@ -23,8 +23,6 @@ import { getRangeValueMatchers } from './matchers/valueMatchers/rangeMatchers';
import { getRegexValueMatcher } from './matchers/valueMatchers/regexMatchers';
import { getSubstringValueMatchers } from './matchers/valueMatchers/substringMatchers';
export { type FieldValueMatcherConfig } from './matchers/fieldValueMatcher';
/**
* Registry that contains all of the built in field matchers.
* @public

View File

@ -1,4 +1,4 @@
import { toDataFrame } from '../../../dataframe';
import { toDataFrame } from '../../../dataframe/processDataFrame';
import { DataFrame } from '../../../types/dataFrame';
import { getValueMatcher } from '../../matchers';
import { ValueMatcherID } from '../ids';

View File

@ -1,4 +1,4 @@
import { toDataFrame } from '../../../dataframe';
import { toDataFrame } from '../../../dataframe/processDataFrame';
import { DataFrame } from '../../../types/dataFrame';
import { getValueMatcher } from '../../matchers';
import { ValueMatcherID } from '../ids';

View File

@ -1,4 +1,4 @@
import { toDataFrame } from '../../../dataframe';
import { toDataFrame } from '../../../dataframe/processDataFrame';
import { DataFrame } from '../../../types/dataFrame';
import { getValueMatcher } from '../../matchers';
import { ValueMatcherID } from '../ids';

View File

@ -1,4 +1,4 @@
import { toDataFrame } from '../../../dataframe';
import { toDataFrame } from '../../../dataframe/processDataFrame';
import { DataFrame } from '../../../types/dataFrame';
import { getValueMatcher } from '../../matchers';
import { ValueMatcherID } from '../ids';

View File

@ -1,4 +1,4 @@
import { toDataFrame } from '../../../dataframe';
import { toDataFrame } from '../../../dataframe/processDataFrame';
import { DataFrame } from '../../../types/dataFrame';
import { getValueMatcher } from '../../matchers';
import { ValueMatcherID } from '../ids';

View File

@ -1,4 +1,4 @@
import { toDataFrame } from '../../../dataframe';
import { toDataFrame } from '../../../dataframe/processDataFrame';
import { DataFrame } from '../../../types/dataFrame';
import { getValueMatcher } from '../../matchers';
import { ValueMatcherID } from '../ids';

View File

@ -1,9 +1,10 @@
import { DataFrameView } from '../../dataframe';
import { DataFrameView } from '../../dataframe/DataFrameView';
import { toDataFrame } from '../../dataframe/processDataFrame';
import { DataTransformContext, ScopedVars } from '../../types';
import { FieldType } from '../../types/dataFrame';
import { BinaryOperationID, UnaryOperationID } from '../../utils';
import { BinaryOperationID } from '../../utils/binaryOperators';
import { mockTransformationsRegistry } from '../../utils/tests/mockTransformationsRegistry';
import { UnaryOperationID } from '../../utils/unaryOperators';
import { ReducerID } from '../fieldReducer';
import { transformDataFrame } from '../transformDataFrame';

View File

@ -2,7 +2,7 @@ import { defaults } from 'lodash';
import { map } from 'rxjs/operators';
import { getTimeField } from '../../dataframe/processDataFrame';
import { getFieldDisplayName } from '../../field';
import { getFieldDisplayName } from '../../field/fieldState';
import { DataFrame, DataTransformerInfo, Field, FieldType, NullValueMode } from '../../types';
import { BinaryOperationID, binaryOperators } from '../../utils/binaryOperators';
import { UnaryOperationID, unaryOperators } from '../../utils/unaryOperators';

View File

@ -2,7 +2,7 @@ import { map } from 'rxjs/operators';
import { TimeZone } from '@grafana/schema';
import { cacheFieldDisplayNames } from '../../field';
import { cacheFieldDisplayNames } from '../../field/fieldState';
import { DataFrame, TransformationApplicabilityLevels } from '../../types';
import { DataTransformContext, DataTransformerInfo } from '../../types/transformations';

View File

@ -1,4 +1,4 @@
import { toDataFrame } from '../../dataframe';
import { toDataFrame } from '../../dataframe/processDataFrame';
import { DataTransformerConfig, FieldType, Field, SpecialValue } from '../../types';
import { mockTransformationsRegistry } from '../../utils/tests/mockTransformationsRegistry';
import { transformDataFrame } from '../transformDataFrame';

View File

@ -1,10 +1,10 @@
import { map } from 'rxjs/operators';
import { getDisplayProcessor } from '../../field';
import { getDisplayProcessor } from '../../field/displayProcessor';
import { createTheme, GrafanaTheme2 } from '../../themes';
import { DataFrameType, DataTransformContext, SynchronousDataTransformerInfo } from '../../types';
import { DataFrame, Field, FieldConfig, FieldType } from '../../types/dataFrame';
import { roundDecimals } from '../../utils';
import { roundDecimals } from '../../utils/numbers';
import { DataTransformerID } from './ids';
import { AlignedData, join } from './joinDataFrames';

View File

@ -1,4 +1,4 @@
import { toDataFrame } from '../../dataframe';
import { toDataFrame } from '../../dataframe/processDataFrame';
import { FieldType, DataTransformerConfig } from '../../types';
import { mockTransformationsRegistry } from '../../utils/tests/mockTransformationsRegistry';
import { transformDataFrame } from '../transformDataFrame';

View File

@ -1,5 +1,5 @@
import { toDataFrame } from '../../dataframe/processDataFrame';
import { getFieldDisplayName } from '../../field';
import { getFieldDisplayName } from '../../field/fieldState';
import { DataFrame, FieldType } from '../../types/dataFrame';
import { mockTransformationsRegistry } from '../../utils/tests/mockTransformationsRegistry';
import { fieldMatchers } from '../matchers';

View File

@ -1,4 +1,4 @@
import { getTimeField, sortDataFrame } from '../../dataframe';
import { getTimeField, sortDataFrame } from '../../dataframe/processDataFrame';
import { DataFrame, Field, FieldMatcher, FieldType, TIME_SERIES_VALUE_FIELD_NAME } from '../../types';
import { fieldMatchers } from '../matchers';
import { FieldMatcherID } from '../matchers/ids';

View File

@ -1,6 +1,6 @@
import { Subscription } from 'rxjs';
import { toDataFrame, toDataFrameDTO } from '../../dataframe';
import { toDataFrame, toDataFrameDTO } from '../../dataframe/processDataFrame';
import { DataFrame, DataTransformerConfig, FieldDTO, FieldType } from '../../types';
import { mockTransformationsRegistry } from '../../utils/tests/mockTransformationsRegistry';
import { transformDataFrame } from '../transformDataFrame';

View File

@ -1,6 +1,6 @@
import { map } from 'rxjs/operators';
import { getFieldDisplayName } from '../..';
import { getFieldDisplayName } from '../../field/fieldState';
import { DataFrame, Field, FieldType, SynchronousDataTransformerInfo } from '../../types';
import { DataTransformerID } from './ids';

View File

@ -1,4 +1,4 @@
import { toDataFrame } from '../../dataframe';
import { toDataFrame } from '../../dataframe/processDataFrame';
import { DataTransformerConfig, DisplayProcessor, Field, FieldType } from '../../types';
import { mockTransformationsRegistry } from '../../utils/tests/mockTransformationsRegistry';
import { transformDataFrame } from '../transformDataFrame';

View File

@ -1,7 +1,7 @@
import { omit } from 'lodash';
import { map } from 'rxjs/operators';
import { MutableDataFrame } from '../../dataframe';
import { MutableDataFrame } from '../../dataframe/MutableDataFrame';
import { DataFrame, Field } from '../../types/dataFrame';
import { DataTransformerInfo, TransformationApplicabilityLevels } from '../../types/transformations';

View File

@ -1,4 +1,5 @@
import { FieldType, createDataFrame } from '@grafana/data';
import { createDataFrame } from '../../../dataframe/processDataFrame';
import { FieldType } from '../../../types';
import { applyNullInsertThreshold } from './nullInsertThreshold';

View File

@ -1,4 +1,5 @@
import { FieldType, createDataFrame } from '@grafana/data';
import { createDataFrame } from '../../../dataframe/processDataFrame';
import { FieldType } from '../../../types';
import { applyNullInsertThreshold } from './nullInsertThreshold';
import { nullToValue } from './nullToValue';

View File

@ -1,4 +1,4 @@
import { toDataFrame } from '../../dataframe';
import { toDataFrame } from '../../dataframe/processDataFrame';
import { FieldType, DataTransformerConfig } from '../../types';
import { mockTransformationsRegistry } from '../../utils/tests/mockTransformationsRegistry';
import { transformDataFrame } from '../transformDataFrame';

View File

@ -1,4 +1,4 @@
import { toDataFrame } from '../../dataframe';
import { toDataFrame } from '../../dataframe/processDataFrame';
import { FieldType, DataTransformerConfig } from '../../types';
import { mockTransformationsRegistry } from '../../utils/tests/mockTransformationsRegistry';
import { transformDataFrame } from '../transformDataFrame';

View File

@ -1,4 +1,4 @@
import { DataFrameView } from '../../dataframe';
import { DataFrameView } from '../../dataframe/DataFrameView';
import { toDataFrame } from '../../dataframe/processDataFrame';
import { DataTransformerConfig, Field, FieldType } from '../../types';
import { mockTransformationsRegistry } from '../../utils/tests/mockTransformationsRegistry';

View File

@ -1,7 +1,7 @@
import { map } from 'rxjs/operators';
import { guessFieldTypeForField } from '../../dataframe/processDataFrame';
import { getFieldDisplayName } from '../../field';
import { getFieldDisplayName } from '../../field/fieldState';
import { KeyValue } from '../../types/data';
import { DataFrame, Field, FieldType } from '../../types/dataFrame';
import { DataTransformerInfo, FieldMatcher, MatcherConfig } from '../../types/transformations';

View File

@ -1,4 +1,4 @@
import { toDataFrame } from '../../dataframe';
import { toDataFrame } from '../../dataframe/processDataFrame';
import { FieldType, DataTransformerConfig } from '../../types';
import { mockTransformationsRegistry } from '../../utils/tests/mockTransformationsRegistry';
import { transformDataFrame } from '../transformDataFrame';

View File

@ -1,4 +1,4 @@
import { toDataFrame } from '../../dataframe';
import { toDataFrame } from '../../dataframe/processDataFrame';
import { FieldType, DataTransformerConfig } from '../../types';
import { mockTransformationsRegistry } from '../../utils/tests/mockTransformationsRegistry';
import { transformDataFrame } from '../transformDataFrame';

View File

@ -1,4 +1,4 @@
import { toDataFrame } from '../../dataframe';
import { toDataFrame } from '../../dataframe/processDataFrame';
import { DataTransformerConfig, Field, FieldType } from '../../types';
import { mockTransformationsRegistry } from '../../utils/tests/mockTransformationsRegistry';
import { transformDataFrame } from '../transformDataFrame';

View File

@ -1,7 +1,8 @@
import { omit } from 'lodash';
import { map } from 'rxjs/operators';
import { MutableDataFrame, sortDataFrame } from '../../dataframe';
import { MutableDataFrame } from '../../dataframe/MutableDataFrame';
import { sortDataFrame } from '../../dataframe/processDataFrame';
import { isTimeSeriesFrames } from '../../dataframe/utils';
import { getFrameDisplayName } from '../../field/fieldState';
import {

View File

@ -1,7 +1,7 @@
import { map } from 'rxjs/operators';
import { sortDataFrame } from '../../dataframe';
import { getFieldDisplayName } from '../../field';
import { sortDataFrame } from '../../dataframe/processDataFrame';
import { getFieldDisplayName } from '../../field/fieldState';
import { DataFrame } from '../../types';
import { DataTransformContext, DataTransformerInfo } from '../../types/transformations';

View File

@ -2,10 +2,10 @@ import { ComponentType } from 'react';
import {
NumberFieldConfigSettings,
SliderFieldConfigSettings,
SelectFieldConfigSettings,
SliderFieldConfigSettings,
StringFieldConfigSettings,
} from '../field';
} from '../field/overrides/processors';
import { RegistryItem, Registry } from '../utils/Registry';
import { OptionEditorConfig } from './options';

View File

@ -1,4 +1,4 @@
import { FormattedValue } from '../valueFormats';
import { FormattedValue } from '../valueFormats/valueFormats';
export type DisplayProcessor = (value: unknown, decimals?: DecimalCount) => DisplayValue;

View File

@ -1,6 +1,7 @@
import { ComponentType } from 'react';
import { StandardEditorProps, FieldConfigOptionsRegistry, StandardEditorContext } from '../field';
import { FieldConfigOptionsRegistry } from '../field/FieldConfigOptionsRegistry';
import { StandardEditorContext, StandardEditorProps } from '../field/standardFieldConfigEditorRegistry';
import { GrafanaTheme2 } from '../themes';
import {
MatcherConfig,

View File

@ -1,8 +1,8 @@
import { defaultsDeep } from 'lodash';
import { EventBus } from '../events';
import { StandardEditorProps } from '../field';
import { Registry } from '../utils';
import { StandardEditorProps } from '../field/standardFieldConfigEditorRegistry';
import { Registry } from '../utils/Registry';
import { OptionsEditorItem } from './OptionsUIRegistryBuilder';
import { ScopedVars } from './ScopedVars';

View File

@ -1,22 +1,24 @@
import { set, cloneDeep } from 'lodash';
import {
FieldNamePickerConfigSettings,
NumberFieldConfigSettings,
SelectFieldConfigSettings,
SliderFieldConfigSettings,
StringFieldConfigSettings,
UnitFieldConfigSettings,
booleanOverrideProcessor,
identityOverrideProcessor,
numberOverrideProcessor,
selectOverrideProcessor,
stringOverrideProcessor,
booleanOverrideProcessor,
standardEditorsRegistry,
SelectFieldConfigSettings,
StandardEditorProps,
StringFieldConfigSettings,
NumberFieldConfigSettings,
SliderFieldConfigSettings,
identityOverrideProcessor,
UnitFieldConfigSettings,
unitOverrideProcessor,
FieldNamePickerConfigSettings,
} from '../field/overrides/processors';
import {
StandardEditorContext,
} from '../field';
StandardEditorProps,
standardEditorsRegistry,
} from '../field/standardFieldConfigEditorRegistry';
import { PanelOptionsSupplier } from '../panel/PanelPlugin';
import { isObject } from '../types';
import { OptionsEditorItem, OptionsUIRegistryBuilder } from '../types/OptionsUIRegistryBuilder';

View File

@ -1,4 +1,4 @@
import { FieldReducerInfo, fieldReducers, ReducerID } from '../transformations';
import { fieldReducers, FieldReducerInfo, ReducerID } from '../transformations/fieldReducer';
import { Registry } from './Registry';

View File

@ -1,9 +1,9 @@
// Test with local CSV files
import fs from 'fs';
import { MutableDataFrame } from '../dataframe';
import { MutableDataFrame } from '../dataframe/MutableDataFrame';
import { getDataFrameRow, toDataFrameDTO } from '../dataframe/processDataFrame';
import { getDisplayProcessor } from '../field';
import { getDisplayProcessor } from '../field/displayProcessor';
import { createTheme } from '../themes';
import { CSVHeaderStyle, readCSV, toCSV } from './csv';

View File

@ -5,9 +5,9 @@ import Papa, { ParseConfig, Parser, ParseResult } from 'papaparse';
// Types
import { MutableDataFrame } from '../dataframe/MutableDataFrame';
import { guessFieldTypeFromValue } from '../dataframe/processDataFrame';
import { getFieldDisplayName } from '../field';
import { getFieldDisplayName } from '../field/fieldState';
import { DataFrame, Field, FieldConfig, FieldType } from '../types';
import { formattedValueToString } from '../valueFormats';
import { formattedValueToString } from '../valueFormats/valueFormats';
export enum CSVHeaderStyle {
full,

View File

@ -1,4 +1,4 @@
import { createDataFrame } from '../dataframe';
import { createDataFrame } from '../dataframe/processDataFrame';
import { dateTime } from '../datetime/moment_wrapper';
import { TimeRange } from '../types/time';

View File

@ -1,31 +0,0 @@
import * as arrayUtils from './arrayUtils';
export * from './Registry';
export * from './datasource';
export * from './deprecationWarning';
export * from './csv';
export * from './labels';
export * from './numbers';
export * from './object';
export * from './namedColorsPalette';
export * from './series';
export * from './binaryOperators';
export * from './unaryOperators';
export * from './nodeGraph';
export * from './selectUtils';
export * from './store';
export * from './LocalStorageValueProvider';
export { PanelOptionsEditorBuilder, FieldConfigEditorBuilder } from './OptionsUIBuilders';
export { arrayUtils };
export { getFlotPairs, getFlotPairsConstant } from './flotPairs';
export { locationUtil } from './location';
export { urlUtil, type UrlQueryMap, type UrlQueryValue, serializeStateToUrlParam, toURLRange } from './url';
export { DataLinkBuiltInVars, mapInternalLinkToExplore } from './dataLinks';
export { DocsId } from './docs';
export { makeClassES5Compatible } from './makeClassES5Compatible';
export { anyToNumber } from './anyToNumber';
export { withLoadingIndicator, type WithLoadingIndicatorOptions } from './withLoadingIndicator';
export { convertOldAngularValueMappings, LegacyMappingType } from './valueMappings';
export { containsSearchFilter, type SearchFilterOptions, getSearchFilterScopedVar } from './variables';
export { renderLegendFormat } from './legend';
export { matchPluginId } from './matchPluginId';

View File

@ -1,4 +1,4 @@
import { displayNameOverrideProcessor, identityOverrideProcessor } from '../../field';
import { displayNameOverrideProcessor, identityOverrideProcessor } from '../../field/overrides/processors';
import { ThresholdsMode } from '../../types';
export const mockStandardProperties = () => {

View File

@ -1,4 +1,4 @@
import { standardTransformersRegistry } from '../../transformations';
import { standardTransformersRegistry } from '../../transformations/standardTransformersRegistry';
import { DataTransformerInfo } from '../../types';
export const mockTransformationsRegistry = (transformers: DataTransformerInfo[]) => {

View File

@ -1,4 +1,4 @@
import { getActiveThreshold } from '../field';
import { getActiveThreshold } from '../field/thresholds';
import { stringToJsRegex } from '../text/string';
import {
MappingType,

View File

@ -1 +0,0 @@
export * from './valueFormats';