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OAAQI,EAAAA,GACRF,SAAU,GACVG,aAAc,CAEZnB,MAAO,MAGVa,gBAAgB,CACfD,SAAAA,EACAzC,GAAI,mBACJM,KAAM,mBACNL,KAAM,QACN0C,OAAQC,EAAAA,GACRC,SAAU,CACRC,aAAc,WAGjBmF,SAAS,CACRxF,SAAAA,EACAnC,KAAM,kBACNL,KAAM,aACN4C,SAAU,CACRzB,QAAS,CACP,CAAEc,MAAO8K,EAAAA,GAAAA,SAA8B9E,MAAO,YAC9C,CAAEhG,MAAO8K,EAAAA,GAAAA,QAA6B9E,MAAO,WAC7C,CAAEhG,MAAO8K,EAAAA,GAAAA,MAA2B9E,MAAO,SAC3C,CAAEhG,MAAO8K,EAAAA,GAAAA,KAA0B9E,MAAO,QAC1C,CAAEhG,MAAO8K,EAAAA,GAAAA,KAA0B9E,MAAO,UAG9ClF,aAAcgK,EAAAA,GAAAA,SAIpBiD,UAAW,CAACzN,EAASuM,KAAY,QAC/B,MAAMtM,EAAW,CAAC,UAClBD,EAAQS,eAAe,CACrBR,SAAAA,EACAnC,KAAM,eACNL,KAAM,QACN+C,aAAc,EACdH,SAAU,CACRK,IAAK,EACLC,IAAK,MAIT,UAAI4L,EAAQ3N,eAAZ,iBAAI,EAAiBuL,cAArB,OAAI,EAAyBrL,OAC3BkB,EAAQE,gBAAgB,CACtBD,SAAAA,EACAzC,GAAI,eACJM,KAAM,eACNL,KAAM,QACN0C,OAAQI,EAAAA,GACRF,SAAU,GACVG,aAAc,CAEZnB,MAAO","sources":["webpack://grafana/./public/app/features/canvas/elements/icon.tsx","webpack://grafana/./public/app/features/canvas/elements/notFound.tsx","webpack://grafana/./public/app/features/canvas/elements/button.tsx","webpack://grafana/./public/app/features/canvas/elements/droneFront.tsx","webpack://grafana/./public/app/features/canvas/elements/droneSide.tsx","webpack://grafana/./public/app/features/canvas/elements/droneTop.tsx","webpack://grafana/./public/app/features/canvas/elements/textBox.tsx","webpack://grafana/./public/app/features/canvas/elements/windTurbine.tsx","webpack://grafana/./public/app/features/canvas/registry.ts","webpack://grafana/./public/app/features/canvas/runtime/element.tsx","webpack://grafana/./public/app/features/canvas/types.ts","webpack://grafana/./public/app/plugins/panel/canvas/editor/APIEditor.tsx","webpack://grafana/./public/app/plugins/panel/canvas/editor/options.ts"],"sourcesContent":["import { css } from '@emotion/css';\nimport { isString } from 'lodash';\nimport React, { CSSProperties } from 'react';\nimport SVG from 'react-inlinesvg';\n\nimport {\n ColorDimensionConfig,\n ResourceDimensionConfig,\n ResourceDimensionMode,\n getPublicOrAbsoluteUrl,\n} from 'app/features/dimensions';\nimport { DimensionContext } from 'app/features/dimensions/context';\nimport { ColorDimensionEditor, ResourceDimensionEditor } from 'app/features/dimensions/editors';\nimport { APIEditor, APIEditorConfig, callApi } from 'app/plugins/panel/canvas/editor/APIEditor';\n\nimport { CanvasElementItem, CanvasElementProps } from '../element';\nimport { LineConfig } from '../types';\n\nexport interface IconConfig {\n path?: ResourceDimensionConfig;\n fill?: ColorDimensionConfig;\n stroke?: LineConfig;\n api?: APIEditorConfig;\n}\n\ninterface IconData {\n path: string;\n fill: string;\n strokeColor?: string;\n stroke?: number;\n api?: APIEditorConfig;\n}\n\n// When a stoke is defined, we want the path to be in page units\nconst svgStrokePathClass = css`\n path {\n vector-effect: non-scaling-stroke;\n }\n`;\n\nexport function IconDisplay(props: CanvasElementProps) {\n const { data } = props;\n if (!data?.path) {\n return null;\n }\n\n const onClick = () => {\n if (data?.api) {\n callApi(data.api);\n }\n };\n\n const svgStyle: CSSProperties = {\n fill: data?.fill,\n stroke: data?.strokeColor,\n strokeWidth: data?.stroke,\n };\n\n return (\n \n );\n}\n\nexport const iconItem: CanvasElementItem = {\n id: 'icon',\n name: 'Icon',\n description: 'SVG Icon display',\n\n display: IconDisplay,\n\n getNewOptions: (options) => ({\n placement: {\n width: 50,\n height: 50,\n top: 0,\n left: 0,\n },\n ...options,\n config: {\n path: {\n mode: ResourceDimensionMode.Fixed,\n fixed: 'img/icons/unicons/question-circle.svg',\n },\n fill: { fixed: '#FFF899' },\n },\n }),\n\n // Called when data changes\n prepareData: (ctx: DimensionContext, cfg: IconConfig) => {\n let path: string | undefined = undefined;\n if (cfg.path) {\n path = ctx.getResource(cfg.path).value();\n }\n if (!path || !isString(path)) {\n path = getPublicOrAbsoluteUrl('img/icons/unicons/question-circle.svg');\n }\n\n const data: IconData = {\n path,\n fill: cfg.fill ? ctx.getColor(cfg.fill).value() : '#CCC',\n api: cfg?.api ?? undefined,\n };\n\n if (cfg.stroke?.width && cfg.stroke.color) {\n if (cfg.stroke.width > 0) {\n data.stroke = cfg.stroke?.width;\n data.strokeColor = ctx.getColor(cfg.stroke.color).value();\n }\n }\n return data;\n },\n\n // Heatmap overlay options\n registerOptionsUI: (builder) => {\n const category = ['Icon'];\n builder\n .addCustomEditor({\n category,\n id: 'iconSelector',\n path: 'config.path',\n name: 'SVG Path',\n editor: ResourceDimensionEditor,\n settings: {\n resourceType: 'icon',\n },\n })\n .addCustomEditor({\n category,\n id: 'config.fill',\n path: 'config.fill',\n name: 'Fill color',\n editor: ColorDimensionEditor,\n settings: {},\n defaultValue: {\n // Configured values\n fixed: 'grey',\n },\n })\n .addSliderInput({\n category,\n path: 'config.stroke.width',\n name: 'Stroke',\n defaultValue: 0,\n settings: {\n min: 0,\n max: 10,\n },\n })\n .addCustomEditor({\n category,\n id: 'config.stroke.color',\n path: 'config.stroke.color',\n name: 'Stroke color',\n editor: ColorDimensionEditor,\n settings: {},\n defaultValue: {\n // Configured values\n fixed: 'grey',\n },\n showIf: (cfg) => Boolean(cfg?.config?.stroke?.width),\n })\n .addCustomEditor({\n category,\n id: 'apiSelector',\n path: 'config.api',\n name: 'API',\n editor: APIEditor,\n });\n },\n};\n","import React, { PureComponent } from 'react';\n\nimport { CanvasElementItem, CanvasElementProps } from '../element';\n\ninterface NotFoundConfig {\n orig?: any;\n}\n\nclass NotFoundDisplay extends PureComponent> {\n render() {\n const { config } = this.props;\n return (\n
\n

NOT FOUND:

\n
{JSON.stringify(config, null, 2)}
\n
\n );\n }\n}\n\nexport const notFoundItem: CanvasElementItem = {\n id: 'not-found',\n name: 'Not found',\n description: 'Display when element type is not found in the registry',\n\n display: NotFoundDisplay,\n\n defaultSize: {\n width: 100,\n height: 100,\n },\n\n getNewOptions: () => ({\n config: {},\n }),\n};\n","import React, { PureComponent } from 'react';\n\nimport { Button } from '@grafana/ui';\nimport { DimensionContext } from 'app/features/dimensions/context';\nimport { TextDimensionEditor } from 'app/features/dimensions/editors/TextDimensionEditor';\nimport { TextDimensionConfig } from 'app/features/dimensions/types';\nimport { APIEditor, APIEditorConfig, callApi } from 'app/plugins/panel/canvas/editor/APIEditor';\n\nimport { CanvasElementItem, CanvasElementProps } from '../element';\n\ninterface ButtonData {\n text?: string;\n api?: APIEditorConfig;\n}\n\ninterface ButtonConfig {\n text?: TextDimensionConfig;\n api?: APIEditorConfig;\n}\n\nclass ButtonDisplay extends PureComponent> {\n render() {\n const { data } = this.props;\n const onClick = () => {\n if (data?.api) {\n callApi(data.api);\n }\n };\n\n return (\n \n );\n }\n}\n\nexport const buttonItem: CanvasElementItem = {\n id: 'button',\n name: 'Button',\n description: 'Button',\n\n display: ButtonDisplay,\n\n defaultSize: {\n width: 200,\n height: 50,\n },\n\n getNewOptions: (options) => ({\n ...options,\n }),\n\n // Called when data changes\n prepareData: (ctx: DimensionContext, cfg: ButtonConfig) => {\n const data: ButtonData = {\n text: cfg?.text ? ctx.getText(cfg.text).value() : '',\n api: cfg?.api ?? undefined,\n };\n\n return data;\n },\n\n // Heatmap overlay options\n registerOptionsUI: (builder) => {\n const category = ['Button'];\n builder\n .addCustomEditor({\n category,\n id: 'textSelector',\n path: 'config.text',\n name: 'Text',\n editor: TextDimensionEditor,\n })\n .addCustomEditor({\n category,\n id: 'apiSelector',\n path: 'config.api',\n name: 'API',\n editor: APIEditor,\n });\n },\n};\n","import { css } from '@emotion/css';\nimport React, { FC } from 'react';\n\nimport { GrafanaTheme2 } from '@grafana/data';\nimport { useStyles2 } from '@grafana/ui';\nimport { DimensionContext, ScalarDimensionConfig } from 'app/features/dimensions';\nimport { ScalarDimensionEditor } from 'app/features/dimensions/editors';\n\nimport { CanvasElementItem, CanvasElementProps } from '../element';\n\ninterface DroneFrontData {\n rollAngle?: number;\n}\n\ninterface DroneFrontConfig {\n rollAngle?: ScalarDimensionConfig;\n}\n\nconst DroneFrontDisplay: FC> = (props) => {\n const styles = useStyles2(getStyles);\n\n const { data } = props;\n\n const droneFrontTransformStyle = `rotate(${data?.rollAngle ? data.rollAngle : 0}deg)`;\n\n return (\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n );\n};\n\nexport const droneFrontItem: CanvasElementItem = {\n id: 'droneFront',\n name: 'Drone Front',\n description: 'Drone front',\n\n display: DroneFrontDisplay,\n\n defaultSize: {\n width: 100,\n height: 100,\n },\n\n getNewOptions: (options) => ({\n ...options,\n }),\n\n // Called when data changes\n prepareData: (ctx: DimensionContext, cfg: DroneFrontConfig) => {\n const data: DroneFrontData = {\n rollAngle: cfg?.rollAngle ? ctx.getScalar(cfg.rollAngle).value() : 0,\n };\n\n return data;\n },\n\n registerOptionsUI: (builder) => {\n const category = ['Drone Front'];\n builder.addCustomEditor({\n category,\n id: 'rollAngle',\n path: 'config.rollAngle',\n name: 'Roll Angle',\n editor: ScalarDimensionEditor,\n });\n },\n};\n\nconst getStyles = (theme: GrafanaTheme2) => ({\n droneFront: css`\n transition: transform 0.4s;\n `,\n});\n","import { css } from '@emotion/css';\nimport React, { FC } from 'react';\n\nimport { GrafanaTheme2 } from '@grafana/data';\nimport { useStyles2 } from '@grafana/ui';\nimport { DimensionContext, ScalarDimensionConfig } from 'app/features/dimensions';\nimport { ScalarDimensionEditor } from 'app/features/dimensions/editors';\n\nimport { CanvasElementItem, CanvasElementProps } from '../element';\n\ninterface DroneSideData {\n pitchAngle?: number;\n}\n\ninterface DroneSideConfig {\n pitchAngle?: ScalarDimensionConfig;\n}\n\nconst DroneSideDisplay: FC> = (props) => {\n const styles = useStyles2(getStyles);\n\n const { data } = props;\n\n const droneSidePitchTransformStyle = `rotate(${data?.pitchAngle ? data.pitchAngle : 0}deg)`;\n\n return (\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n );\n};\n\nexport const droneSideItem: CanvasElementItem = {\n id: 'droneSide',\n name: 'Drone Side',\n description: 'Drone Side',\n\n display: DroneSideDisplay,\n\n defaultSize: {\n width: 100,\n height: 100,\n },\n\n getNewOptions: (options) => ({\n ...options,\n }),\n\n // Called when data changes\n prepareData: (ctx: DimensionContext, cfg: DroneSideConfig) => {\n const data: DroneSideData = {\n pitchAngle: cfg?.pitchAngle ? ctx.getScalar(cfg.pitchAngle).value() : 0,\n };\n\n return data;\n },\n\n registerOptionsUI: (builder) => {\n const category = ['Drone Side'];\n builder.addCustomEditor({\n category,\n id: 'pitchAngle',\n path: 'config.pitchAngle',\n name: 'Pitch Angle',\n editor: ScalarDimensionEditor,\n });\n },\n};\n\nconst getStyles = (theme: GrafanaTheme2) => ({\n droneSide: css`\n transition: transform 0.4s;\n `,\n});\n","import { css } from '@emotion/css';\nimport React, { FC } from 'react';\n\nimport { GrafanaTheme2 } from '@grafana/data';\nimport { useStyles2 } from '@grafana/ui';\nimport { DimensionContext, ScalarDimensionConfig } from 'app/features/dimensions';\nimport { ScalarDimensionEditor } from 'app/features/dimensions/editors';\n\nimport { CanvasElementItem, CanvasElementProps } from '../element';\n\ninterface DroneTopData {\n bRightRotorRPM?: number;\n bLeftRotorRPM?: number;\n fRightRotorRPM?: number;\n fLeftRotorRPM?: number;\n yawAngle?: number;\n}\n\ninterface DroneTopConfig {\n bRightRotorRPM?: ScalarDimensionConfig;\n bLeftRotorRPM?: ScalarDimensionConfig;\n fRightRotorRPM?: ScalarDimensionConfig;\n fLeftRotorRPM?: ScalarDimensionConfig;\n yawAngle?: ScalarDimensionConfig;\n}\n\nconst DroneTopDisplay: FC> = (props) => {\n const styles = useStyles2(getStyles);\n\n const { data } = props;\n\n const fRightRotorAnimation = `spin ${data?.fRightRotorRPM ? 60 / Math.abs(data.fRightRotorRPM) : 0}s linear infinite`;\n\n const fLeftRotorAnimation = `spin ${data?.fLeftRotorRPM ? 60 / Math.abs(data.fLeftRotorRPM) : 0}s linear infinite`;\n\n const bRightRotorAnimation = `spin ${data?.bRightRotorRPM ? 60 / Math.abs(data.bRightRotorRPM) : 0}s linear infinite`;\n\n const bLeftRotorAnimation = `spin ${data?.bLeftRotorRPM ? 60 / Math.abs(data.bLeftRotorRPM) : 0}s linear infinite`;\n\n const droneTopTransformStyle = `rotate(${data?.yawAngle ? data.yawAngle : 0}deg)`;\n\n return (\n \n \n \n \n \n \n \n \n \n \n );\n};\n\nexport const droneTopItem: CanvasElementItem = {\n id: 'droneTop',\n name: 'Drone Top',\n description: 'Drone top',\n\n display: DroneTopDisplay,\n\n defaultSize: {\n width: 100,\n height: 100,\n },\n\n getNewOptions: (options) => ({\n ...options,\n }),\n\n // Called when data changes\n prepareData: (ctx: DimensionContext, cfg: DroneTopConfig) => {\n const data: DroneTopData = {\n bRightRotorRPM: cfg?.bRightRotorRPM ? ctx.getScalar(cfg.bRightRotorRPM).value() : 0,\n bLeftRotorRPM: cfg?.bLeftRotorRPM ? ctx.getScalar(cfg.bLeftRotorRPM).value() : 0,\n fRightRotorRPM: cfg?.fRightRotorRPM ? ctx.getScalar(cfg.fRightRotorRPM).value() : 0,\n fLeftRotorRPM: cfg?.fLeftRotorRPM ? ctx.getScalar(cfg.fLeftRotorRPM).value() : 0,\n yawAngle: cfg?.yawAngle ? ctx.getScalar(cfg.yawAngle).value() : 0,\n };\n\n return data;\n },\n\n registerOptionsUI: (builder) => {\n const category = ['Drone Top'];\n builder\n .addCustomEditor({\n category,\n id: 'yawAngle',\n path: 'config.yawAngle',\n name: 'Yaw Angle',\n editor: ScalarDimensionEditor,\n })\n .addCustomEditor({\n category,\n id: 'fRightRotorRPM',\n path: 'config.fRightRotorRPM',\n name: 'Front Right Rotor RPM',\n editor: ScalarDimensionEditor,\n })\n .addCustomEditor({\n category,\n id: 'fLeftRotorRPM',\n path: 'config.fLeftRotorRPM',\n name: 'Front Left Rotor RPM',\n editor: ScalarDimensionEditor,\n })\n .addCustomEditor({\n category,\n id: 'bRightRotorRPM',\n path: 'config.bRightRotorRPM',\n name: 'Back Right Rotor RPM',\n editor: ScalarDimensionEditor,\n })\n .addCustomEditor({\n category,\n id: 'bLeftRotorRPM',\n path: 'config.bLeftRotorRPM',\n name: 'Back Left Rotor RPM',\n editor: ScalarDimensionEditor,\n });\n },\n};\n\nconst getStyles = (theme: GrafanaTheme2) => ({\n propeller: css`\n transform-origin: 50% 50%;\n transform-box: fill-box;\n display: block;\n @keyframes spin {\n from {\n transform: rotate(0deg);\n }\n to {\n transform: rotate(360deg);\n }\n }\n `,\n propellerCW: css`\n animation-direction: normal;\n `,\n propellerCCW: css`\n animation-direction: reverse;\n `,\n});\n","import { css } from '@emotion/css';\nimport React, { PureComponent } from 'react';\n\nimport { GrafanaTheme2 } from '@grafana/data';\nimport { stylesFactory } from '@grafana/ui';\nimport { config } from 'app/core/config';\nimport { DimensionContext } from 'app/features/dimensions/context';\nimport { ColorDimensionEditor } from 'app/features/dimensions/editors/ColorDimensionEditor';\nimport { TextDimensionEditor } from 'app/features/dimensions/editors/TextDimensionEditor';\nimport { ColorDimensionConfig, TextDimensionConfig } from 'app/features/dimensions/types';\n\nimport { CanvasElementItem, CanvasElementProps } from '../element';\n\nexport enum Align {\n Left = 'left',\n Center = 'center',\n Right = 'right',\n}\n\nexport enum VAlign {\n Top = 'top',\n Middle = 'middle',\n Bottom = 'bottom',\n}\n\ninterface TextBoxData {\n text?: string;\n color?: string;\n size?: number; // 0 or missing will \"auto size\"\n align: Align;\n valign: VAlign;\n}\n\ninterface TextBoxConfig {\n text?: TextDimensionConfig;\n color?: ColorDimensionConfig;\n size?: number; // 0 or missing will \"auto size\"\n align: Align;\n valign: VAlign;\n}\n\nclass TextBoxDisplay extends PureComponent> {\n render() {\n const { data } = this.props;\n const styles = getStyles(config.theme2, data);\n return (\n
\n {data?.text}\n
\n );\n }\n}\nconst getStyles = stylesFactory((theme: GrafanaTheme2, data) => ({\n container: css`\n position: absolute;\n height: 100%;\n width: 100%;\n display: table;\n `,\n span: css`\n display: table-cell;\n vertical-align: ${data.valign};\n text-align: ${data.align};\n font-size: ${data?.size}px;\n color: ${data?.color};\n `,\n}));\nexport const textBoxItem: CanvasElementItem = {\n id: 'text-box',\n name: 'Text',\n description: 'Text box',\n\n display: TextBoxDisplay,\n\n defaultSize: {\n width: 240,\n height: 160,\n },\n\n getNewOptions: (options) => ({\n background: {\n color: {\n fixed: 'grey',\n },\n },\n ...options,\n config: {\n align: Align.Left,\n valign: VAlign.Middle,\n },\n }),\n\n // Called when data changes\n prepareData: (ctx: DimensionContext, cfg: TextBoxConfig) => {\n const data: TextBoxData = {\n text: cfg.text ? ctx.getText(cfg.text).value() : '',\n align: cfg.align ?? Align.Center,\n valign: cfg.valign ?? VAlign.Middle,\n size: cfg.size,\n };\n\n if (cfg.color) {\n data.color = ctx.getColor(cfg.color).value();\n }\n\n return data;\n },\n\n // Heatmap overlay options\n registerOptionsUI: (builder) => {\n const category = ['Text box'];\n builder\n .addCustomEditor({\n category,\n id: 'textSelector',\n path: 'config.text',\n name: 'Text',\n editor: TextDimensionEditor,\n })\n .addCustomEditor({\n category,\n id: 'config.color',\n path: 'config.color',\n name: 'Text color',\n editor: ColorDimensionEditor,\n settings: {},\n defaultValue: {},\n })\n .addRadio({\n category,\n path: 'config.align',\n name: 'Align text',\n settings: {\n options: [\n { value: Align.Left, label: 'Left' },\n { value: Align.Center, label: 'Center' },\n { value: Align.Right, label: 'Right' },\n ],\n },\n defaultValue: Align.Left,\n })\n .addRadio({\n category,\n path: 'config.valign',\n name: 'Vertical align',\n settings: {\n options: [\n { value: VAlign.Top, label: 'Top' },\n { value: VAlign.Middle, label: 'Middle' },\n { value: VAlign.Bottom, label: 'Bottom' },\n ],\n },\n defaultValue: VAlign.Middle,\n })\n .addNumberInput({\n category,\n path: 'config.size',\n name: 'Text size',\n settings: {\n placeholder: 'Auto',\n },\n });\n },\n};\n","import { css } from '@emotion/css';\nimport React, { FC } from 'react';\n\nimport { GrafanaTheme2 } from '@grafana/data';\nimport { useStyles2 } from '@grafana/ui';\nimport { DimensionContext, ScalarDimensionConfig } from 'app/features/dimensions';\nimport { ScalarDimensionEditor } from 'app/features/dimensions/editors';\n\nimport { CanvasElementItem, CanvasElementProps } from '../element';\n\ninterface WindTurbineData {\n rpm?: number;\n}\n\ninterface WindTurbineConfig {\n rpm?: ScalarDimensionConfig;\n}\n\nconst WindTurbineDisplay: FC> = (props) => {\n const styles = useStyles2(getStyles);\n\n const { data } = props;\n\n const windTurbineAnimation = `spin ${data?.rpm ? 60 / Math.abs(data.rpm) : 0}s linear infinite`;\n\n return (\n \n \n \n \n \n\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n );\n};\n\nexport const windTurbineItem: CanvasElementItem = {\n id: 'windTurbine',\n name: 'Wind Turbine',\n description: 'Spinny spinny',\n\n display: WindTurbineDisplay,\n\n defaultSize: {\n width: 100,\n height: 100,\n },\n\n getNewOptions: (options) => ({\n ...options,\n }),\n\n // Called when data changes\n prepareData: (ctx: DimensionContext, cfg: WindTurbineConfig) => {\n const data: WindTurbineData = {\n rpm: cfg?.rpm ? ctx.getScalar(cfg.rpm).value() : 0,\n };\n\n return data;\n },\n\n registerOptionsUI: (builder) => {\n const category = ['Wind Turbine'];\n builder.addCustomEditor({\n category,\n id: 'rpm',\n path: 'config.rpm',\n name: 'RPM',\n editor: ScalarDimensionEditor,\n });\n },\n};\n\nconst getStyles = (theme: GrafanaTheme2) => ({\n blade: css`\n @keyframes spin {\n from {\n transform: rotate(0deg);\n }\n to {\n transform: rotate(360deg);\n }\n }\n\n transform-origin: 94.663px 94.663px;\n transform: rotate(15deg);\n `,\n});\n","import { Registry } from '@grafana/data';\n\nimport { CanvasElementItem, CanvasElementOptions } from './element';\nimport { buttonItem } from './elements/button';\nimport { droneFrontItem } from './elements/droneFront';\nimport { droneSideItem } from './elements/droneSide';\nimport { droneTopItem } from './elements/droneTop';\nimport { iconItem } from './elements/icon';\nimport { textBoxItem } from './elements/textBox';\nimport { windTurbineItem } from './elements/windTurbine';\n\nexport const DEFAULT_CANVAS_ELEMENT_CONFIG: CanvasElementOptions = {\n ...iconItem.getNewOptions(),\n type: iconItem.id,\n name: `Element 1`,\n};\n\nexport const canvasElementRegistry = new Registry(() => [\n iconItem, // default for now\n textBoxItem,\n buttonItem,\n droneTopItem,\n droneFrontItem,\n droneSideItem,\n windTurbineItem,\n]);\n","import React, { CSSProperties } from 'react';\nimport { OnDrag, OnResize } from 'react-moveable/declaration/types';\n\nimport { LayerElement } from 'app/core/components/Layers/types';\nimport {\n BackgroundImageSize,\n CanvasElementItem,\n CanvasElementOptions,\n canvasElementRegistry,\n} from 'app/features/canvas';\nimport { notFoundItem } from 'app/features/canvas/elements/notFound';\nimport { DimensionContext } from 'app/features/dimensions';\n\nimport { Constraint, HorizontalConstraint, Placement, VerticalConstraint } from '../types';\n\nimport { FrameState } from './frame';\nimport { RootElement } from './root';\nimport { Scene } from './scene';\n\nlet counter = 0;\n\nexport class ElementState implements LayerElement {\n // UID necessary for moveable to work (for now)\n readonly UID = counter++;\n revId = 0;\n sizeStyle: CSSProperties = {};\n dataStyle: CSSProperties = {};\n\n // Determine whether or not element is in motion or not (via moveable)\n isMoving = false;\n\n // Temp stored constraint for visualization purposes (switch to top / left constraint to simplify some functionality)\n tempConstraint: Constraint | undefined;\n\n // Filled in by ref\n div?: HTMLDivElement;\n\n // Calculated\n data?: any; // depends on the type\n\n constructor(public item: CanvasElementItem, public options: CanvasElementOptions, public parent?: FrameState) {\n const fallbackName = `Element ${Date.now()}`;\n if (!options) {\n this.options = { type: item.id, name: fallbackName };\n }\n\n options.constraint = options.constraint ?? {\n vertical: VerticalConstraint.Top,\n horizontal: HorizontalConstraint.Left,\n };\n options.placement = options.placement ?? { width: 100, height: 100, top: 0, left: 0 };\n const scene = this.getScene();\n if (!options.name) {\n const newName = scene?.getNextElementName();\n options.name = newName ?? fallbackName;\n }\n scene?.byName.set(options.name, this);\n }\n\n private getScene(): Scene | undefined {\n let trav = this.parent;\n while (trav) {\n if (trav.isRoot()) {\n return trav.scene;\n }\n trav = trav.parent;\n }\n\n return undefined;\n }\n\n getName() {\n return this.options.name;\n }\n\n /** Use the configured options to update CSS style properties directly on the wrapper div **/\n applyLayoutStylesToDiv() {\n if (this.isRoot()) {\n // Root supersedes layout engine and is always 100% width + height of panel\n return;\n }\n\n const { constraint } = this.options;\n const { vertical, horizontal } = constraint ?? {};\n const placement = this.options.placement ?? ({} as Placement);\n\n const style: React.CSSProperties = {\n position: 'absolute',\n // Minimum element size is 10x10\n minWidth: '10px',\n minHeight: '10px',\n };\n\n const translate = ['0px', '0px'];\n\n switch (vertical) {\n case VerticalConstraint.Top:\n placement.top = placement.top ?? 0;\n placement.height = placement.height ?? 100;\n style.top = `${placement.top}px`;\n style.height = `${placement.height}px`;\n delete placement.bottom;\n break;\n case VerticalConstraint.Bottom:\n placement.bottom = placement.bottom ?? 0;\n placement.height = placement.height ?? 100;\n style.bottom = `${placement.bottom}px`;\n style.height = `${placement.height}px`;\n delete placement.top;\n break;\n case VerticalConstraint.TopBottom:\n placement.top = placement.top ?? 0;\n placement.bottom = placement.bottom ?? 0;\n style.top = `${placement.top}px`;\n style.bottom = `${placement.bottom}px`;\n delete placement.height;\n style.height = '';\n break;\n case VerticalConstraint.Center:\n placement.top = placement.top ?? 0;\n placement.height = placement.height ?? 100;\n translate[1] = '-50%';\n style.top = `calc(50% - ${placement.top}px)`;\n style.height = `${placement.height}px`;\n delete placement.bottom;\n break;\n case VerticalConstraint.Scale:\n placement.top = placement.top ?? 0;\n placement.bottom = placement.bottom ?? 0;\n style.top = `${placement.top}%`;\n style.bottom = `${placement.bottom}%`;\n delete placement.height;\n style.height = '';\n break;\n }\n\n switch (horizontal) {\n case HorizontalConstraint.Left:\n placement.left = placement.left ?? 0;\n placement.width = placement.width ?? 100;\n style.left = `${placement.left}px`;\n style.width = `${placement.width}px`;\n delete placement.right;\n break;\n case HorizontalConstraint.Right:\n placement.right = placement.right ?? 0;\n placement.width = placement.width ?? 100;\n style.right = `${placement.right}px`;\n style.width = `${placement.width}px`;\n delete placement.left;\n break;\n case HorizontalConstraint.LeftRight:\n placement.left = placement.left ?? 0;\n placement.right = placement.right ?? 0;\n style.left = `${placement.left}px`;\n style.right = `${placement.right}px`;\n delete placement.width;\n style.width = '';\n break;\n case HorizontalConstraint.Center:\n placement.left = placement.left ?? 0;\n placement.width = placement.width ?? 100;\n translate[0] = '-50%';\n style.left = `calc(50% - ${placement.left}px)`;\n style.width = `${placement.width}px`;\n delete placement.right;\n break;\n case HorizontalConstraint.Scale:\n placement.left = placement.left ?? 0;\n placement.right = placement.right ?? 0;\n style.left = `${placement.left}%`;\n style.right = `${placement.right}%`;\n delete placement.width;\n style.width = '';\n break;\n }\n\n style.transform = `translate(${translate[0]}, ${translate[1]})`;\n this.options.placement = placement;\n this.sizeStyle = style;\n if (this.div) {\n for (const key in this.sizeStyle) {\n this.div.style[key as any] = (this.sizeStyle as any)[key];\n }\n\n for (const key in this.dataStyle) {\n this.div.style[key as any] = (this.dataStyle as any)[key];\n }\n }\n }\n\n setPlacementFromConstraint(elementContainer?: DOMRect, parentContainer?: DOMRect) {\n const { constraint } = this.options;\n const { vertical, horizontal } = constraint ?? {};\n\n if (!elementContainer) {\n elementContainer = this.div && this.div.getBoundingClientRect();\n }\n if (!parentContainer) {\n parentContainer = this.div && this.div.parentElement?.getBoundingClientRect();\n }\n\n const relativeTop =\n elementContainer && parentContainer ? Math.round(elementContainer.top - parentContainer.top) : 0;\n const relativeBottom =\n elementContainer && parentContainer ? Math.round(parentContainer.bottom - elementContainer.bottom) : 0;\n const relativeLeft =\n elementContainer && parentContainer ? Math.round(elementContainer.left - parentContainer.left) : 0;\n const relativeRight =\n elementContainer && parentContainer ? Math.round(parentContainer.right - elementContainer.right) : 0;\n\n const placement = {} as Placement;\n\n const width = elementContainer?.width ?? 100;\n const height = elementContainer?.height ?? 100;\n\n switch (vertical) {\n case VerticalConstraint.Top:\n placement.top = relativeTop;\n placement.height = height;\n break;\n case VerticalConstraint.Bottom:\n placement.bottom = relativeBottom;\n placement.height = height;\n break;\n case VerticalConstraint.TopBottom:\n placement.top = relativeTop;\n placement.bottom = relativeBottom;\n break;\n case VerticalConstraint.Center:\n const elementCenter = elementContainer ? relativeTop + height / 2 : 0;\n const parentCenter = parentContainer ? parentContainer.height / 2 : 0;\n const distanceFromCenter = parentCenter - elementCenter;\n placement.top = distanceFromCenter;\n placement.height = height;\n break;\n case VerticalConstraint.Scale:\n placement.top = (relativeTop / (parentContainer?.height ?? height)) * 100;\n placement.bottom = (relativeBottom / (parentContainer?.height ?? height)) * 100;\n break;\n }\n\n switch (horizontal) {\n case HorizontalConstraint.Left:\n placement.left = relativeLeft;\n placement.width = width;\n break;\n case HorizontalConstraint.Right:\n placement.right = relativeRight;\n placement.width = width;\n break;\n case HorizontalConstraint.LeftRight:\n placement.left = relativeLeft;\n placement.right = relativeRight;\n break;\n case HorizontalConstraint.Center:\n const elementCenter = elementContainer ? relativeLeft + width / 2 : 0;\n const parentCenter = parentContainer ? parentContainer.width / 2 : 0;\n const distanceFromCenter = parentCenter - elementCenter;\n placement.left = distanceFromCenter;\n placement.width = width;\n break;\n case HorizontalConstraint.Scale:\n placement.left = (relativeLeft / (parentContainer?.width ?? width)) * 100;\n placement.right = (relativeRight / (parentContainer?.width ?? width)) * 100;\n break;\n }\n\n this.options.placement = placement;\n\n this.applyLayoutStylesToDiv();\n this.revId++;\n }\n\n updateData(ctx: DimensionContext) {\n if (this.item.prepareData) {\n this.data = this.item.prepareData(ctx, this.options.config);\n this.revId++; // rerender\n }\n\n const { background, border } = this.options;\n const css: CSSProperties = {};\n if (background) {\n if (background.color) {\n const color = ctx.getColor(background.color);\n css.backgroundColor = color.value();\n }\n if (background.image) {\n const image = ctx.getResource(background.image);\n if (image) {\n const v = image.value();\n if (v) {\n css.backgroundImage = `url(\"${v}\")`;\n switch (background.size ?? BackgroundImageSize.Contain) {\n case BackgroundImageSize.Contain:\n css.backgroundSize = 'contain';\n css.backgroundRepeat = 'no-repeat';\n break;\n case BackgroundImageSize.Cover:\n css.backgroundSize = 'cover';\n css.backgroundRepeat = 'no-repeat';\n break;\n case BackgroundImageSize.Original:\n css.backgroundRepeat = 'no-repeat';\n break;\n case BackgroundImageSize.Tile:\n css.backgroundRepeat = 'repeat';\n break;\n case BackgroundImageSize.Fill:\n css.backgroundSize = '100% 100%';\n break;\n }\n }\n }\n }\n }\n\n if (border && border.color && border.width) {\n const color = ctx.getColor(border.color);\n css.borderWidth = border.width;\n css.borderStyle = 'solid';\n css.borderColor = color.value();\n\n // Move the image to inside the border\n if (css.backgroundImage) {\n css.backgroundOrigin = 'padding-box';\n }\n }\n\n this.dataStyle = css;\n this.applyLayoutStylesToDiv();\n }\n\n isRoot(): this is RootElement {\n return false;\n }\n\n /** Recursively visit all nodes */\n visit(visitor: (v: ElementState) => void) {\n visitor(this);\n }\n\n onChange(options: CanvasElementOptions) {\n if (this.item.id !== options.type) {\n this.item = canvasElementRegistry.getIfExists(options.type) ?? notFoundItem;\n }\n\n // rename handling\n const oldName = this.options.name;\n const newName = options.name;\n\n this.revId++;\n this.options = { ...options };\n let trav = this.parent;\n while (trav) {\n if (trav.isRoot()) {\n trav.scene.save();\n break;\n }\n trav.revId++;\n trav = trav.parent;\n }\n\n const scene = this.getScene();\n if (oldName !== newName && scene) {\n scene.byName.delete(oldName);\n scene.byName.set(newName, this);\n }\n }\n\n getSaveModel() {\n return { ...this.options };\n }\n\n initElement = (target: HTMLDivElement) => {\n this.div = target;\n this.applyLayoutStylesToDiv();\n };\n\n applyDrag = (event: OnDrag) => {\n event.target.style.transform = event.transform;\n };\n\n // kinda like:\n // https://github.com/grafana/grafana-edge-app/blob/main/src/panels/draw/WrapItem.tsx#L44\n applyResize = (event: OnResize) => {\n const placement = this.options.placement!;\n\n const style = event.target.style;\n const deltaX = event.delta[0];\n const deltaY = event.delta[1];\n const dirLR = event.direction[0];\n const dirTB = event.direction[1];\n\n if (dirLR === 1) {\n placement.width = event.width;\n style.width = `${placement.width}px`;\n } else if (dirLR === -1) {\n placement.left! -= deltaX;\n placement.width = event.width;\n style.left = `${placement.left}px`;\n style.width = `${placement.width}px`;\n }\n\n if (dirTB === -1) {\n placement.top! -= deltaY;\n placement.height = event.height;\n style.top = `${placement.top}px`;\n style.height = `${placement.height}px`;\n } else if (dirTB === 1) {\n placement.height = event.height;\n style.height = `${placement.height}px`;\n }\n };\n\n render() {\n const { item } = this;\n return (\n
\n \n
\n );\n }\n}\n","import { ColorDimensionConfig, ResourceDimensionConfig } from 'app/features/dimensions/types';\n\nexport interface Placement {\n top?: number;\n left?: number;\n right?: number;\n bottom?: number;\n\n width?: number;\n height?: number;\n}\n\nexport interface Constraint {\n horizontal?: HorizontalConstraint;\n vertical?: VerticalConstraint;\n}\n\nexport enum HorizontalConstraint {\n Left = 'left',\n Right = 'right',\n LeftRight = 'leftright',\n Center = 'center',\n Scale = 'scale',\n}\n\nexport enum VerticalConstraint {\n Top = 'top',\n Bottom = 'bottom',\n TopBottom = 'topbottom',\n Center = 'center',\n Scale = 'scale',\n}\n\nexport enum BackgroundImageSize {\n Original = 'original',\n Contain = 'contain',\n Cover = 'cover',\n Fill = 'fill',\n Tile = 'tile',\n}\n\nexport interface BackgroundConfig {\n color?: ColorDimensionConfig;\n image?: ResourceDimensionConfig;\n size?: BackgroundImageSize;\n}\n\nexport interface LineConfig {\n color?: ColorDimensionConfig;\n width?: number;\n}\n\nexport enum QuickPlacement {\n Top = 'top',\n Bottom = 'bottom',\n Left = 'left',\n Right = 'right',\n HorizontalCenter = 'hcenter',\n VerticalCenter = 'vcenter',\n}\n","import React, { FC, useCallback } from 'react';\n\nimport { AppEvents, StandardEditorProps, StandardEditorsRegistryItem, StringFieldConfigSettings } from '@grafana/data';\nimport { config, getBackendSrv } from '@grafana/runtime';\nimport { Button, InlineField, InlineFieldRow, JSONFormatter, StringValueEditor } from '@grafana/ui';\nimport { appEvents } from 'app/core/core';\n\nexport interface APIEditorConfig {\n endpoint: string;\n data?: string;\n}\n\nconst dummyStringSettings: StandardEditorsRegistryItem = {\n settings: {},\n} as any;\n\nexport const callApi = (api: APIEditorConfig, isTest = false) => {\n if (api) {\n getBackendSrv()\n .fetch({\n url: api.endpoint!,\n method: 'POST',\n data: api.data ?? {},\n })\n .subscribe({\n error: (error: any) => {\n if (isTest) {\n appEvents.emit(AppEvents.alertError, ['Error has occurred: ', JSON.stringify(error)]);\n console.error(error);\n }\n },\n complete: () => {\n if (isTest) {\n appEvents.emit(AppEvents.alertSuccess, ['Test successful']);\n }\n },\n });\n }\n};\n\nexport const APIEditor: FC> = (props) => {\n const { value, context, onChange } = props;\n const labelWidth = 9;\n\n const onEndpointChange = useCallback(\n (endpoint) => {\n onChange({\n ...value,\n endpoint,\n });\n },\n [onChange, value]\n );\n\n const onDataChange = useCallback(\n (data) => {\n onChange({\n ...value,\n data,\n });\n },\n [onChange, value]\n );\n\n const renderJSON = (data: string) => {\n try {\n const json = JSON.parse(data);\n return ;\n } catch (error) {\n return `Invalid JSON provided: ${error.message}`;\n }\n };\n\n const renderTestAPIButton = (api: APIEditorConfig) => {\n if (api && api.endpoint) {\n return (\n \n );\n }\n\n return;\n };\n\n return config.disableSanitizeHtml ? (\n <>\n \n \n \n \n \n \n \n \n \n \n {renderTestAPIButton(value)}\n
\n {renderJSON(value?.data ?? '{}')}\n \n ) : (\n <>Must enable disableSanitizeHtml feature flag to access\n );\n};\n","import { PanelOptionsSupplier } from '@grafana/data/src/panel/PanelPlugin';\nimport { BackgroundImageSize, CanvasElementOptions } from 'app/features/canvas';\nimport { ColorDimensionEditor, ResourceDimensionEditor } from 'app/features/dimensions/editors';\n\ninterface OptionSuppliers {\n addBackground: PanelOptionsSupplier;\n addBorder: PanelOptionsSupplier;\n}\n\nexport const optionBuilder: OptionSuppliers = {\n addBackground: (builder, context) => {\n const category = ['Background'];\n builder\n .addCustomEditor({\n category,\n id: 'background.color',\n path: 'background.color',\n name: 'Color',\n editor: ColorDimensionEditor,\n settings: {},\n defaultValue: {\n // Configured values\n fixed: '',\n },\n })\n .addCustomEditor({\n category,\n id: 'background.image',\n path: 'background.image',\n name: 'Image',\n editor: ResourceDimensionEditor,\n settings: {\n resourceType: 'image',\n },\n })\n .addRadio({\n category,\n path: 'background.size',\n name: 'Image size',\n settings: {\n options: [\n { value: BackgroundImageSize.Original, label: 'Original' },\n { value: BackgroundImageSize.Contain, label: 'Contain' },\n { value: BackgroundImageSize.Cover, label: 'Cover' },\n { value: BackgroundImageSize.Fill, label: 'Fill' },\n { value: BackgroundImageSize.Tile, label: 'Tile' },\n ],\n },\n defaultValue: BackgroundImageSize.Cover,\n });\n },\n\n addBorder: (builder, context) => {\n const category = ['Border'];\n builder.addSliderInput({\n category,\n path: 'border.width',\n name: 'Width',\n defaultValue: 2,\n settings: {\n min: 0,\n max: 20,\n },\n });\n\n if (context.options?.border?.width) {\n builder.addCustomEditor({\n category,\n id: 'border.color',\n path: 'border.color',\n name: 'Color',\n editor: ColorDimensionEditor,\n settings: {},\n defaultValue: {\n // Configured values\n fixed: '',\n },\n });\n }\n },\n};\n"],"names":["svgStrokePathClass","css","iconItem","id","name","description","display","props","data","path","svgStyle","fill","stroke","strokeColor","strokeWidth","onClick","api","callApi","src","style","className","undefined","getNewOptions","options","placement","width","height","top","left","config","mode","ResourceDimensionMode","fixed","prepareData","ctx","cfg","getResource","value","isString","getPublicOrAbsoluteUrl","getColor","color","registerOptionsUI","builder","category","addCustomEditor","editor","ResourceDimensionEditor","settings","resourceType","ColorDimensionEditor","defaultValue","addSliderInput","min","max","showIf","Boolean","APIEditor","NotFoundDisplay","PureComponent","render","this","JSON","stringify","notFoundItem","defaultSize","ButtonDisplay","Button","type","text","buttonItem","getText","TextDimensionEditor","droneFrontItem","styles","useStyles2","getStyles","droneFrontTransformStyle","rollAngle","droneFront","xmlns","xmlnsXlink","viewBox","transform","x1","x2","y1","y2","d","cx","cy","r","getScalar","ScalarDimensionEditor","theme","droneSideItem","droneSidePitchTransformStyle","pitchAngle","droneSide","droneTopItem","fRightRotorAnimation","fRightRotorRPM","Math","abs","fLeftRotorAnimation","fLeftRotorRPM","bRightRotorAnimation","bRightRotorRPM","bLeftRotorAnimation","bLeftRotorRPM","droneTopTransformStyle","yawAngle","xmlSpace","fillRule","propeller","propellerCW","animation","propellerCCW","Align","VAlign","TextBoxDisplay","container","span","stylesFactory","valign","align","size","textBoxItem","background","Left","Middle","Center","addRadio","label","Right","Top","Bottom","addNumberInput","placeholder","windTurbineItem","windTurbineAnimation","rpm","preserveAspectRatio","points","blade","href","x","y","DEFAULT_CANVAS_ELEMENT_CONFIG","canvasElementRegistry","Registry","counter","ElementState","constructor","item","parent","target","div","applyLayoutStylesToDiv","event","deltaX","delta","deltaY","dirLR","direction","dirTB","fallbackName","Date","now","constraint","vertical","VerticalConstraint","horizontal","HorizontalConstraint","scene","getScene","newName","getNextElementName","byName","set","trav","isRoot","getName","position","minWidth","minHeight","translate","bottom","right","sizeStyle","key","dataStyle","setPlacementFromConstraint","elementContainer","parentContainer","getBoundingClientRect","parentElement","relativeTop","round","relativeBottom","relativeLeft","relativeRight","elementCenter","distanceFromCenter","revId","updateData","border","backgroundColor","image","v","backgroundImage","BackgroundImageSize","backgroundSize","backgroundRepeat","borderWidth","borderStyle","borderColor","backgroundOrigin","visit","visitor","onChange","oldName","save","delete","getSaveModel","ref","initElement","UID","QuickPlacement","dummyStringSettings","isTest","getBackendSrv","fetch","url","endpoint","method","subscribe","error","appEvents","AppEvents","console","complete","context","onEndpointChange","useCallback","onDataChange","InlineFieldRow","InlineField","labelWidth","grow","StringValueEditor","title","renderTestAPIButton","json","parse","JSONFormatter","message","renderJSON","optionBuilder","addBackground","addBorder"],"sourceRoot":""}