UNPKG

@grafana/runtime

Version:
1 lines 1.28 kB
{"version":3,"file":"EmbeddedDashboard.mjs","sources":["../../../src/components/EmbeddedDashboard.tsx"],"sourcesContent":["import * as React from 'react';\n\nexport interface EmbeddedDashboardProps {\n uid?: string;\n /**\n * Use this property to override initial time and variable state.\n * Example: ?from=now-5m&to=now&var-varname=value1\n */\n initialState?: string;\n /**\n * Is called when ever the internal embedded dashboards url state changes.\n * Can be used to sync the internal url state (Which is not synced to URL) with the external context, or to\n * preserve some of the state when moving to other embedded dashboards.\n */\n onStateChange?: (state: string) => void;\n}\n\n/**\n * Returns a React component that renders an embedded dashboard.\n * @alpha\n */\nexport let EmbeddedDashboard: React.ComponentType<EmbeddedDashboardProps> = () => {\n throw new Error('EmbeddedDashboard requires runtime initialization');\n};\n\n/**\n *\n * @internal\n */\nexport function setEmbeddedDashboard(component: React.ComponentType<EmbeddedDashboardProps>) {\n EmbeddedDashboard = component;\n}\n"],"names":[],"mappings":"AAqBO,IAAI,oBAAiE,MAAM;AAChF,EAAM,MAAA,IAAI,MAAM,mDAAmD,CAAA;AACrE;AAMO,SAAS,qBAAqB,SAAwD,EAAA;AAC3F,EAAoB,iBAAA,GAAA,SAAA;AACtB;;;;"}