diff --git a/packages/grafana-ui/src/components/FieldConfigs/standardFieldConfigEditors.tsx b/packages/grafana-ui/src/components/FieldConfigs/standardFieldConfigEditors.tsx index 3f724e197db..a57d54ff024 100644 --- a/packages/grafana-ui/src/components/FieldConfigs/standardFieldConfigEditors.tsx +++ b/packages/grafana-ui/src/components/FieldConfigs/standardFieldConfigEditors.tsx @@ -10,9 +10,8 @@ import { } from './thresholds'; import { DataLinksOverrideEditor, dataLinksOverrideProcessor, DataLinksValueEditor } from './links'; -// eslint-disable-next-line @typescript-eslint/no-namespace -export namespace StandardFieldConfigEditors { - export const title: FieldPropertyEditorItem = { +export const getStandardFieldConfigs = () => { + const title: FieldPropertyEditorItem = { id: 'title', // Match field properties name: 'Title', description: 'The field title', @@ -27,7 +26,7 @@ export namespace StandardFieldConfigEditors { shouldApply: field => field.type !== FieldType.time, }; - export const unit: FieldPropertyEditorItem = { + const unit: FieldPropertyEditorItem = { id: 'unit', // Match field properties name: 'Unit', description: 'value units', @@ -43,7 +42,7 @@ export namespace StandardFieldConfigEditors { shouldApply: field => field.type === FieldType.number, }; - export const min: FieldPropertyEditorItem = { + const min: FieldPropertyEditorItem = { id: 'min', // Match field properties name: 'Min', description: 'Minimum expected value', @@ -58,7 +57,7 @@ export namespace StandardFieldConfigEditors { shouldApply: field => field.type === FieldType.number, }; - export const max: FieldPropertyEditorItem = { + const max: FieldPropertyEditorItem = { id: 'max', // Match field properties name: 'Max', description: 'Maximum expected value', @@ -74,7 +73,7 @@ export namespace StandardFieldConfigEditors { shouldApply: field => field.type === FieldType.number, }; - export const decimals: FieldPropertyEditorItem = { + const decimals: FieldPropertyEditorItem = { id: 'decimals', // Match field properties name: 'Decimals', description: 'How many decimal places should be shown on a number', @@ -93,7 +92,7 @@ export namespace StandardFieldConfigEditors { shouldApply: field => field.type === FieldType.number, }; - export const thresholds: FieldPropertyEditorItem = { + const thresholds: FieldPropertyEditorItem = { id: 'thresholds', // Match field properties name: 'Thresholds', description: 'Manage Thresholds', @@ -109,7 +108,7 @@ export namespace StandardFieldConfigEditors { shouldApply: field => field.type === FieldType.number, }; - export const noValue: FieldPropertyEditorItem = { + const noValue: FieldPropertyEditorItem = { id: 'noValue', // Match field properties name: 'No Value', description: 'What to show when there is no value', @@ -125,7 +124,7 @@ export namespace StandardFieldConfigEditors { shouldApply: () => true, }; - export const links: FieldPropertyEditorItem = { + const links: FieldPropertyEditorItem = { id: 'links', // Match field properties name: 'DataLinks', description: 'Manage date links', @@ -137,17 +136,6 @@ export namespace StandardFieldConfigEditors { }, shouldApply: () => true, }; -} -export const getStandardFieldConfigs = () => { - return [ - StandardFieldConfigEditors.unit, - StandardFieldConfigEditors.min, - StandardFieldConfigEditors.max, - StandardFieldConfigEditors.decimals, - StandardFieldConfigEditors.thresholds, - StandardFieldConfigEditors.title, - StandardFieldConfigEditors.noValue, - StandardFieldConfigEditors.links, - ]; + return [unit, min, max, decimals, thresholds, title, noValue, links]; };