{"version":3,"file":"PanelDataErrorView.mjs","sources":["../../../src/components/PanelDataErrorView.tsx"],"sourcesContent":["import * as React from 'react';\n\nimport { FieldConfigSource, PanelData, VisualizationSuggestion } from '@grafana/data';\n\n/**\n * Describes the properties that can be passed to the PanelDataErrorView.\n *\n * @alpha\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?: VisualizationSuggestion[];\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 *\n * @alpha\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":";;AAiCO,IAAI,kBAA6C,GAAA,CAAC,EAAE,OAAA,EAAc,KAAA;AACvE,EAAA,4BAAQ,KAAI,EAAA,EAAA,QAAA,EAAA;AAAA,IAAA,yBAAA;AAAA,IAAwB,OAAA;AAAA,IAAQ;AAAA,GAAC,EAAA,CAAA;AAC/C;;;;"}