{"version":3,"file":"PanelDataErrorView.mjs","sources":["../../../src/components/PanelDataErrorView.tsx"],"sourcesContent":["import * as React from 'react';\n\nimport { type FieldConfigSource, type PanelData, type PanelPluginVisualizationSuggestion } from '@grafana/data';\n\n/**\n * Describes the properties that can be passed to the PanelDataErrorView.\n */\nexport interface PanelDataErrorViewProps {\n  message?: string;\n  panelId: number;\n  data: PanelData;\n  fieldConfig?: FieldConfigSource;\n  needsTimeField?: boolean;\n  needsNumberField?: boolean;\n  needsStringField?: boolean;\n  suggestions?: PanelPluginVisualizationSuggestion[];\n}\n\n/**\n * Simplified type with defaults that describes the PanelDataErrorView.\n *\n * @internal\n */\nexport type PanelDataErrorViewType = React.ComponentType<PanelDataErrorViewProps>;\n\n/**\n * PanelDataErrorView allows panels to show a consistent error message when\n * the result structure does not meet expected criteria\n */\nexport let PanelDataErrorView: PanelDataErrorViewType = ({ message }) => {\n  return <div>Unable to render data: {message}.</div>;\n};\n\n/**\n * Used to bootstrap the PanelDataErrorView during application start so the\n * PanelDataErrorView is exposed via runtime.\n *\n * @internal\n */\nexport function setPanelDataErrorView(renderer: PanelDataErrorViewType) {\n  PanelDataErrorView = renderer;\n}\n"],"names":[],"mappings":";;;AA6BO,IAAI,kBAAA,GAA6C,CAAC,EAAE,OAAA,EAAQ,KAAM;AACvE,EAAA,4BAAQ,KAAA,EAAA,EAAI,QAAA,EAAA;AAAA,IAAA,yBAAA;AAAA,IAAwB,OAAA;AAAA,IAAQ;AAAA,GAAA,EAAC,CAAA;AAC/C;AAQO,SAAS,sBAAsB,QAAA,EAAkC;AACtE,EAAA,kBAAA,GAAqB,QAAA;AACvB;;;;"}