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ACN0C,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 <SVG\n onClick={onClick}\n src={data.path}\n style={svgStyle}\n className={svgStyle.strokeWidth ? svgStrokePathClass : undefined}\n />\n );\n}\n\nexport const iconItem: CanvasElementItem<IconConfig, IconData> = {\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<CanvasElementProps<NotFoundConfig>> {\n render() {\n const { config } = this.props;\n return (\n <div>\n <h3>NOT FOUND:</h3>\n <pre>{JSON.stringify(config, null, 2)}</pre>\n </div>\n );\n }\n}\n\nexport const notFoundItem: CanvasElementItem<NotFoundConfig> = {\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<CanvasElementProps<ButtonConfig, ButtonData>> {\n render() {\n const { data } = this.props;\n const onClick = () => {\n if (data?.api) {\n callApi(data.api);\n }\n };\n\n return (\n <Button type=\"submit\" onClick={onClick}>\n {data?.text}\n </Button>\n );\n }\n}\n\nexport const buttonItem: CanvasElementItem<ButtonConfig, ButtonData> = {\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<CanvasElementProps<DroneFrontConfig, DroneFrontData>> = (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 <svg\n className={styles.droneFront}\n xmlns=\"http://www.w3.org/2000/svg\"\n xmlnsXlink=\"http://www.w3.org/1999/xlink\"\n viewBox=\"0 0 1300 290\"\n style={{ transform: droneFrontTransformStyle }}\n >\n <g className=\"arms\" stroke=\"black\" strokeWidth=\"28px\">\n <line x1=\"510\" x2=\"320\" y1=\"100\" y2=\"150\" />\n <line x1=\"510\" x2=\"320\" y1=\"190\" y2=\"210\" />\n <line x1=\"790\" x2=\"980\" y1=\"190\" y2=\"210\" />\n <line x1=\"790\" x2=\"980\" y1=\"100\" y2=\"150\" />\n </g>\n <g className=\"body\" stroke=\"black\" strokeWidth=\"28px\">\n <path\n fill=\"none\"\n d=\" M 510 130 C 510 124 510 110 510 100 C 510 90 530 71 540 70 C 640 61 670 60 760 70 C 770 71 790 90 790 100 Q 790 120 790 130 L 790 130 Q 790 177 790 196 C 790 207 770 225 760 226 C 670 236 640 236 540 226 C 530 226 510 206 510 196 Q 510 177 510 130 Q 510 133 510 130 Z \"\n />\n <circle cx=\"650\" cy=\"160\" r=\"40\" fill=\"none\" />\n </g>\n <g className=\"motors\" stroke=\"black\" strokeWidth=\"28px\">\n <path\n className=\"motor\"\n fill=\"none\"\n d=\" M 320 60 L 250 60 L 250 230 L 260 290 L 310 290 L 320 230 L 320 60 Z \"\n />\n <path\n className=\"motor\"\n fill=\"none\"\n d=\" M 1050 60 L 980 60 L 980 230 L 990 290 L 1040 290 L 1050 230 L 1050 60 Z \"\n />\n </g>\n <g className=\"propellers\" fill=\"black\">\n <path\n className=\"prop\"\n d=\" M 270 60 L 300 60 L 300 20 Q 311 30 330 30 Q 349 30 570 10 L 300 10 Q 300 0 290 0 C 286 0 284 0 280 0 Q 270 0 270 10 L 0 10 Q 220 30 240 30 Q 260 30 270 20 L 270 60 Z \"\n />\n <path\n className=\"prop\"\n d=\" M 1000 60 L 1030 60 L 1030 20 Q 1041 30 1060 30 Q 1079 30 1300 10 L 1030 10 Q 1030 0 1020 0 C 1016 0 1014 0 1010 0 Q 1000 0 1000 10 L 730 10 Q 950 30 970 30 Q 990 30 1000 20 L 1000 60 Z \"\n />\n </g>\n </svg>\n );\n};\n\nexport const droneFrontItem: CanvasElementItem<any, any> = {\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<CanvasElementProps<DroneSideConfig, DroneSideData>> = (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 <svg\n className={styles.droneSide}\n xmlns=\"http://www.w3.org/2000/svg\"\n xmlnsXlink=\"http://www.w3.org/1999/xlink\"\n viewBox=\"0 0 1300 290\"\n style={{ transform: droneSidePitchTransformStyle }}\n >\n <g className=\"arms\" stroke=\"black\" strokeWidth=\"28px\">\n <line x1=\"510\" x2=\"320\" y1=\"100\" y2=\"150\" />\n <line x1=\"510\" x2=\"320\" y1=\"190\" y2=\"210\" />\n <line x1=\"790\" x2=\"980\" y1=\"190\" y2=\"210\" />\n <line x1=\"790\" x2=\"980\" y1=\"100\" y2=\"150\" />\n </g>\n <g className=\"body\" stroke=\"black\" strokeWidth=\"28px\">\n <path\n fill=\"none\"\n d=\" M 510 130 C 510 124 510 110 510 100 C 510 90 530 71 540 70 C 640 61 670 60 760 70 C 770 71 790 90 790 100 Q 790 120 790 130 L 790 130 Q 790 177 790 196 C 790 207 770 225 760 226 C 670 236 640 236 540 226 C 530 226 510 206 510 196 Q 510 177 510 130 Q 510 133 510 130 Z \"\n />\n </g>\n <g className=\"motors\" stroke=\"black\" strokeWidth=\"28px\">\n <path\n className=\"motor\"\n fill=\"none\"\n d=\" M 320 60 L 250 60 L 250 230 L 260 290 L 310 290 L 320 230 L 320 60 Z \"\n />\n <path\n className=\"motor\"\n fill=\"none\"\n d=\" M 1050 60 L 980 60 L 980 230 L 990 290 L 1040 290 L 1050 230 L 1050 60 Z \"\n />\n </g>\n <g className=\"propellers\" fill=\"black\">\n <path\n className=\"prop\"\n d=\" M 270 60 L 300 60 L 300 20 Q 311 30 330 30 Q 349 30 570 10 L 300 10 Q 300 0 290 0 C 286 0 284 0 280 0 Q 270 0 270 10 L 0 10 Q 220 30 240 30 Q 260 30 270 20 L 270 60 Z \"\n />\n <path\n className=\"prop\"\n d=\" M 1000 60 L 1030 60 L 1030 20 Q 1041 30 1060 30 Q 1079 30 1300 10 L 1030 10 Q 1030 0 1020 0 C 1016 0 1014 0 1010 0 Q 1000 0 1000 10 L 730 10 Q 950 30 970 30 Q 990 30 1000 20 L 1000 60 Z \"\n />\n </g>\n </svg>\n );\n};\n\nexport const droneSideItem: CanvasElementItem<any, any> = {\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<CanvasElementProps<DroneTopConfig, DroneTopData>> = (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 <svg\n xmlns=\"http://www.w3.org/2000/svg\"\n xmlnsXlink=\"http://www.w3.org/1999/xlink\"\n viewBox=\"-43 -43 640 640\"\n xmlSpace=\"preserve\"\n style={{ transform: droneTopTransformStyle }}\n >\n <path\n fillRule=\"evenodd\"\n d=\" M 137.95 127.967 C 137.14 127.157 136.189 126.58 135.178 126.218 C 138.173 121.545 139.967 116.036 140.125 110.123 L 217.64 151.862 C 214.049 157.411 211.8 163.922 211.386 170.95 L 209.694 199.712 L 137.95 127.967 L 137.95 127.967 L 137.95 127.967 L 137.95 127.967 L 137.95 127.967 L 137.95 127.967 L 137.95 127.967 L 137.95 127.967 L 137.95 127.967 Z M 134.268 426.981 C 130.211 421.314 124.328 417.045 117.482 415.041 L 201.999 330.523 L 201.385 340.955 C 200.67 353.107 202.829 364.914 207.563 375.673 L 134.268 426.981 L 134.268 426.981 L 134.268 426.981 L 134.268 426.981 L 134.268 426.981 L 134.268 426.981 L 134.268 426.981 L 134.268 426.981 Z M 324.765 373.673 L 228.527 373.673 Q 215.374 358.611 216.361 341.835 L 226.361 171.832 C 226.825 163.94 231.012 157.096 237.146 152.957 L 316.146 152.957 C 322.28 157.096 326.466 163.94 326.931 171.832 L 336.931 341.835 Q 337.918 358.611 324.765 373.673 L 324.765 373.673 L 324.765 373.673 L 324.765 373.673 L 324.765 373.673 L 324.765 373.673 L 324.765 373.673 Z M 435.81 415.041 C 428.964 417.045 423.081 421.314 419.024 426.981 L 345.727 375.673 C 350.461 364.914 352.62 353.107 351.905 340.955 L 351.291 330.523 L 435.81 415.041 L 435.81 415.041 L 435.81 415.041 L 435.81 415.041 L 435.81 415.041 L 435.81 415.041 Z M 343.596 199.713 L 341.904 170.951 C 341.49 163.923 339.242 157.411 335.651 151.863 L 413.167 110.124 C 413.325 116.037 415.119 121.546 418.114 126.219 C 417.103 126.581 416.152 127.158 415.342 127.968 L 343.596 199.713 L 343.596 199.713 L 343.596 199.713 L 343.596 199.713 L 343.596 199.713 Z M 444.646 92.771 C 453.744 92.771 461.146 100.172 461.146 109.271 C 461.146 118.369 453.744 125.771 444.646 125.771 C 435.548 125.771 428.146 118.369 428.146 109.271 C 428.146 100.172 435.548 92.771 444.646 92.771 L 444.646 92.771 L 444.646 92.771 L 444.646 92.771 Z M 108.647 92.771 C 117.745 92.771 125.147 100.172 125.147 109.271 C 125.147 118.369 117.745 125.771 108.647 125.771 C 99.549 125.771 92.147 118.369 92.147 109.271 C 92.147 100.172 99.549 92.771 108.647 92.771 L 108.647 92.771 L 108.647 92.771 Z M 108.647 461.771 C 99.549 461.771 92.147 454.369 92.147 445.271 C 92.147 436.172 99.549 428.771 108.647 428.771 C 117.745 428.771 125.147 436.172 125.147 445.271 C 125.147 454.369 117.745 461.771 108.647 461.771 L 108.647 461.771 Z M 92.322 136.202 C 97.086 139.1 102.675 140.771 108.647 140.771 C 114.883 140.771 120.697 138.941 125.594 135.802 C 125.956 136.813 126.534 137.764 127.343 138.573 L 207.342 218.573 C 207.711 218.942 208.109 219.264 208.528 219.54 L 203.212 309.908 C 201.794 310.182 200.44 310.869 199.342 311.967 L 95.343 415.967 C 94.954 416.356 94.62 416.779 94.335 417.224 C 93.651 417.575 92.976 417.942 92.322 418.34 Q 84.615 424.182 81.716 428.946 C 78.817 433.71 77.147 439.299 77.147 445.271 C 77.147 462.64 91.278 476.771 108.647 476.771 C 114.619 476.771 120.208 475.1 124.972 472.202 C 129.736 469.304 132.678 466.36 135.577 461.596 C 138.476 456.832 140.147 451.243 140.147 445.271 C 140.147 443.943 140.055 442.637 139.895 441.352 L 214.997 388.78 C 217.05 391.677 336.242 391.678 338.295 388.78 L 413.398 441.352 C 413.238 442.637 413.146 443.943 413.146 445.271 C 413.146 451.243 414.817 456.832 417.715 461.596 C 420.613 466.36 423.557 469.304 428.321 472.202 C 433.085 475.1 438.674 476.771 444.646 476.771 C 462.015 476.771 476.146 462.64 476.146 445.271 C 476.146 439.299 474.475 433.71 471.577 428.946 C 468.679 424.182 459.642 417.575 458.958 417.224 C 458.672 416.779 458.339 416.356 457.95 415.967 L 353.95 311.967 C 352.852 310.869 351.498 310.182 350.08 309.908 L 344.764 219.54 C 345.183 219.264 345.581 218.942 345.95 218.573 L 425.95 138.573 C 426.76 137.763 427.337 136.812 427.699 135.802 C 432.596 138.941 438.409 140.771 444.646 140.771 C 450.618 140.771 456.207 139.1 460.971 136.202 C 465.735 133.304 468.679 130.36 471.577 125.596 C 474.475 120.832 476.146 115.243 476.146 109.271 C 476.146 91.903 462.015 77.772 444.646 77.772 C 438.674 77.772 433.085 79.442 428.321 82.34 L 416.215 91.446 L 324.765 140.688 C 318.402 136.324 310.718 133.771 302.473 133.771 L 250.819 133.771 C 242.574 133.771 234.89 136.324 228.527 140.688 L 137.078 91.446 L 124.972 82.34 C 120.208 79.442 114.619 77.772 108.647 77.772 C 91.278 77.772 77.147 91.903 77.147 109.271 C 77.147 115.243 78.818 120.832 81.716 125.595 C 84.614 130.358 87.558 133.304 92.322 136.202 L 92.322 136.202 L 92.322 136.202 L 92.322 136.202 L 92.322 136.202 L 92.322 136.202 L 92.322 136.202 L 92.322 136.202 L 92.322 136.202 Z M 444.646 461.771 C 435.548 461.771 428.146 454.369 428.146 445.271 C 428.146 436.172 435.548 428.771 444.646 428.771 C 453.744 428.771 461.146 436.172 461.146 445.271 C 461.146 454.369 453.744 461.771 444.646 461.771 Z \"\n />\n <path\n fillRule=\"evenodd\"\n d=\" M 259.458 334.235 L 259.458 337.211 L 254.514 337.211 L 254.514 350.795 L 250.842 350.795 L 250.842 337.211 L 245.898 337.211 L 245.898 334.235 L 259.458 334.235 Z M 266.226 347.939 L 272.586 347.939 L 272.754 350.627 L 272.754 350.627 Q 270.498 350.867 265.074 350.867 L 265.074 350.867 L 265.074 350.867 Q 263.418 350.867 262.434 349.967 L 262.434 349.967 L 262.434 349.967 Q 261.45 349.067 261.426 347.531 L 261.426 347.531 L 261.426 337.499 L 261.426 337.499 Q 261.45 335.963 262.434 335.063 L 262.434 335.063 L 262.434 335.063 Q 263.418 334.163 265.074 334.163 L 265.074 334.163 L 265.074 334.163 Q 270.498 334.163 272.754 334.403 L 272.754 334.403 L 272.586 337.115 L 266.226 337.115 L 266.226 337.115 Q 265.626 337.115 265.362 337.403 L 265.362 337.403 L 265.362 337.403 Q 265.098 337.691 265.098 338.339 L 265.098 338.339 L 265.098 340.859 L 271.698 340.859 L 271.698 343.499 L 265.098 343.499 L 265.098 346.691 L 265.098 346.691 Q 265.098 347.363 265.362 347.651 L 265.362 347.651 L 265.362 347.651 Q 265.626 347.939 266.226 347.939 L 266.226 347.939 Z M 275.202 333.995 L 278.73 333.995 L 278.73 346.931 L 278.73 346.931 Q 278.73 348.131 280.074 348.131 L 280.074 348.131 L 281.034 348.131 L 281.442 350.603 L 281.442 350.603 Q 280.53 351.083 278.61 351.083 L 278.61 351.083 L 278.61 351.083 Q 277.026 351.083 276.114 350.231 L 276.114 350.231 L 276.114 350.231 Q 275.202 349.379 275.202 347.819 L 275.202 347.819 L 275.202 333.995 Z M 283.05 333.995 L 286.578 333.995 L 286.578 346.931 L 286.578 346.931 Q 286.578 348.131 287.922 348.131 L 287.922 348.131 L 288.882 348.131 L 289.29 350.603 L 289.29 350.603 Q 288.378 351.083 286.458 351.083 L 286.458 351.083 L 286.458 351.083 Q 284.874 351.083 283.962 350.231 L 283.962 350.231 L 283.962 350.231 Q 283.05 349.379 283.05 347.819 L 283.05 347.819 L 283.05 333.995 Z M 292.086 335.759 L 292.086 335.759 L 292.086 335.759 Q 293.634 333.923 297.618 333.923 L 297.618 333.923 L 297.618 333.923 Q 301.602 333.923 303.162 335.759 L 303.162 335.759 L 303.162 335.759 Q 304.722 337.595 304.722 342.515 L 304.722 342.515 L 304.722 342.515 Q 304.722 347.435 303.162 349.271 L 303.162 349.271 L 303.162 349.271 Q 301.602 351.107 297.618 351.107 L 297.618 351.107 L 297.618 351.107 Q 293.634 351.107 292.086 349.271 L 292.086 349.271 L 292.086 349.271 Q 290.538 347.435 290.538 342.515 L 290.538 342.515 L 290.538 342.515 Q 290.538 337.595 292.086 335.759 Z M 300.174 338.051 L 300.174 338.051 L 300.174 338.051 Q 299.49 336.875 297.618 336.875 L 297.618 336.875 L 297.618 336.875 Q 295.746 336.875 295.062 338.051 L 295.062 338.051 L 295.062 338.051 Q 294.378 339.227 294.378 342.515 L 294.378 342.515 L 294.378 342.515 Q 294.378 345.803 295.062 346.979 L 295.062 346.979 L 295.062 346.979 Q 295.746 348.155 297.618 348.155 L 297.618 348.155 L 297.618 348.155 Q 299.49 348.155 300.174 346.979 L 300.174 346.979 L 300.174 346.979 Q 300.858 345.803 300.858 342.515 L 300.858 342.515 L 300.858 342.515 Q 300.858 339.227 300.174 338.051 Z \"\n />\n <g className=\"propeller-group\">\n <path\n className={`${styles.propeller} ${styles.propellerCW}`}\n style={{ animation: bRightRotorAnimation }}\n d=\" M 461.563 418.77 L 463.992 416.34 Q 465.495 407.116 466.461 400.395 C 467.426 393.675 469.363 388.087 474.731 383.284 Q 533.862 341.514 538.196 338.859 C 542.529 336.203 548.345 334.299 551.492 338.29 C 554.639 342.282 553.481 346.02 549.419 350.082 L 471.147 428.354 L 461.563 418.77 Z M 427.729 471.772 L 425.299 474.202 Q 423.797 483.426 422.831 490.146 C 421.866 496.867 419.929 502.454 414.561 507.257 Q 355.43 549.028 351.096 551.683 C 346.763 554.338 340.947 556.243 337.8 552.251 C 334.653 548.26 335.811 544.522 339.873 540.46 L 418.145 462.187 L 427.729 471.772 Z \"\n />\n <path\n className={`${styles.propeller} ${styles.propellerCCW}`}\n style={{ animation: fRightRotorAnimation }}\n d=\" M 461.563 135.773 L 463.992 138.203 Q 465.495 147.426 466.461 154.147 C 467.426 160.868 469.363 166.455 474.731 171.258 Q 533.862 213.028 538.196 215.684 C 542.529 218.339 548.345 220.244 551.492 216.252 C 554.639 212.26 553.481 208.523 549.419 204.46 L 471.147 126.188 L 461.563 135.773 Z M 427.729 82.77 L 425.299 80.34 Q 423.797 71.117 422.831 64.396 C 421.866 57.675 419.929 52.088 414.561 47.285 Q 355.43 5.515 351.096 2.859 C 346.763 0.204 340.947 -1.701 337.8 2.291 C 334.653 6.282 335.811 10.02 339.873 14.082 L 418.145 92.355 L 427.729 82.77 Z \"\n />\n <path\n className={`${styles.propeller} ${styles.propellerCCW}`}\n style={{ animation: bLeftRotorAnimation }}\n d=\" M 125.563 471.772 L 127.993 474.202 Q 129.496 483.426 130.461 490.146 C 131.427 496.867 133.363 502.454 138.731 507.257 Q 197.863 549.028 202.196 551.683 C 206.53 554.338 212.345 556.243 215.492 552.251 C 218.639 548.26 217.482 544.522 213.419 540.46 L 135.148 462.187 L 125.563 471.772 Z M 91.73 418.77 L 89.3 416.34 Q 87.797 407.116 86.832 400.395 C 85.866 393.675 83.93 388.087 78.562 383.284 Q 19.431 341.514 15.097 338.859 C 10.763 336.203 4.948 334.299 1.801 338.29 C -1.346 342.282 -0.189 346.02 3.874 350.082 L 82.146 428.354 L 91.73 418.77 Z \"\n />\n <path\n className={`${styles.propeller} ${styles.propellerCW}`}\n style={{ animation: fLeftRotorAnimation }}\n d=\" M 125.563 82.77 L 127.993 80.34 Q 129.496 71.117 130.461 64.396 C 131.427 57.675 133.363 52.088 138.731 47.285 Q 197.863 5.515 202.196 2.859 C 206.53 0.204 212.345 -1.701 215.492 2.291 C 218.639 6.282 217.482 10.02 213.419 14.083 L 135.147 92.355 L 125.563 82.77 Z M 91.73 135.773 L 89.3 138.203 Q 87.797 147.426 86.832 154.147 C 85.866 160.868 83.93 166.455 78.562 171.258 Q 19.431 213.028 15.097 215.684 C 10.763 218.339 4.948 220.243 1.801 216.252 C -1.346 212.26 -0.189 208.523 3.874 204.46 L 82.146 126.188 L 91.73 135.773 Z \"\n />\n </g>\n </svg>\n );\n};\n\nexport const droneTopItem: CanvasElementItem<any, any> = {\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<CanvasElementProps<TextBoxConfig, TextBoxData>> {\n render() {\n const { data } = this.props;\n const styles = getStyles(config.theme2, data);\n return (\n <div className={styles.container}>\n <span className={styles.span}>{data?.text}</span>\n </div>\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<TextBoxConfig, TextBoxData> = {\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<CanvasElementProps<WindTurbineConfig, WindTurbineData>> = (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 <svg viewBox=\"0 0 189.326 283.989\" preserveAspectRatio=\"xMidYMid meet\">\n <symbol id=\"blade\">\n <path\n fill=\"#e6e6e6\"\n id=\"blade-front\"\n d=\"M14.6491879,1.85011601 C14.2684455,-0.0535962877 10.7150812,-0.815081206 9.06473318,3.37308585 L0.434338747,70.7658933 L8.93805104,91.9607889 L15.4106729,90.437819 L17.5684455,78.3807425 L14.5218097,1.97679814 L14.6491879,1.85011601 Z\"\n />\n <path\n fill=\"#d0d6d7\"\n id=\"blade-side\"\n d=\"M11.0951276,0.581206497 C10.3336427,0.961948956 9.57215777,1.85011601 8.93735499,3.24640371 L0.306960557,70.6392111 L8.81067285,91.8341067 L3.35359629,70.0044084 L11.0951276,0.581206497 Z\"\n />\n </symbol>\n\n <g>\n <g id=\"structure\" transform=\"translate(58.123, 82.664)\" fillRule=\"nonzero\">\n <polygon id=\"tower\" fill=\"#e6e6e6\" points=\"33.111,10.984 39.965,10.984 44.28,196.176 28.796,196.176\" />\n <path\n id=\"yaw\"\n fill=\"rgba(0,0,0,0.25)\"\n d=\"M40.3454756,23.2948956 L40.7262181,34.8445476 C38.8225058,35.0986079 35.7765661,35.0986079 32.349884,34.337123 L32.7306265,23.2955916 L40.3454756,23.2955916 L40.3454756,23.2948956 Z\"\n />\n <path\n id=\"base\"\n fill=\"#d0d6d7\"\n transform=\"translate(0 42)\"\n d=\"M26.3846868,150.591647 L46.5640371,150.591647 C48.8484919,150.591647 50.7522042,152.49536 50.7522042,154.779814 L50.7522042,158.967981 L22.0691415,158.967981 L22.0691415,154.779814 C22.0691415,152.49536 23.9728538,150.591647 26.2573086,150.591647 L26.3846868,150.591647 Z\"\n />\n <circle id=\"nacelle\" fill=\"#e6e6e6\" cx=\"36.54\" cy=\"12\" r=\"11.93\" />\n <circle id=\"gearbox\" fill=\"none\" stroke=\"#d0d6d7\" strokeWidth=\"2.75\" cx=\"36.538\" cy=\"11.999\" r=\"5.8\" />\n </g>\n <g className={styles.blade} style={{ animation: windTurbineAnimation }}>\n <use id=\"blade1\" href=\"#blade\" x=\"83.24\" y=\"0\" />\n <use id=\"blade2\" href=\"#blade\" x=\"83.24\" y=\"0\" transform=\"rotate(120 94.663 94.663)\" />\n <use id=\"blade3\" href=\"#blade\" x=\"83.24\" y=\"0\" transform=\"rotate(-120 94.663 94.663)\" />\n </g>\n </g>\n </svg>\n );\n};\n\nexport const windTurbineItem: CanvasElementItem<any, any> = {\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<CanvasElementItem>(() => [\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 <div key={this.UID} ref={this.initElement}>\n <item.display key={`${this.UID}/${this.revId}`} config={this.options.config} data={this.data} />\n </div>\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<string, StringFieldConfigSettings> = {\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<StandardEditorProps<APIEditorConfig, any, any>> = (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 <JSONFormatter json={json} />;\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 <Button onClick={() => callApi(api, true)} title={'Test API'}>\n Test API\n </Button>\n );\n }\n\n return;\n };\n\n return config.disableSanitizeHtml ? (\n <>\n <InlineFieldRow>\n <InlineField label={'Endpoint'} labelWidth={labelWidth} grow={true}>\n <StringValueEditor\n context={context}\n value={value?.endpoint}\n onChange={onEndpointChange}\n item={dummyStringSettings}\n />\n </InlineField>\n </InlineFieldRow>\n <InlineFieldRow>\n <InlineField label={'Data'} labelWidth={labelWidth} grow={true}>\n <StringValueEditor\n context={context}\n value={value?.data ?? '{}'}\n onChange={onDataChange}\n item={dummyStringSettings}\n />\n </InlineField>\n </InlineFieldRow>\n {renderTestAPIButton(value)}\n <br />\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<CanvasElementOptions>;\n addBorder: PanelOptionsSupplier<CanvasElementOptions>;\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":""}
|