@grafana/scenes 4.24.4--canary.734.9299949379.0 → 4.24.4--canary.716.9300035734.0
Sign up to get free protection for your applications and to get access to all the features.
- package/README.md +0 -2
- package/dist/esm/components/EmbeddedScene.js +1 -2
- package/dist/esm/components/EmbeddedScene.js.map +1 -1
- package/dist/esm/components/VizPanel/VizPanel.js +0 -3
- package/dist/esm/components/VizPanel/VizPanel.js.map +1 -1
- package/dist/esm/components/VizPanel/VizPanelRenderer.js +13 -4
- package/dist/esm/components/VizPanel/VizPanelRenderer.js.map +1 -1
- package/dist/esm/core/types.js.map +1 -1
- package/dist/esm/index.js +1 -4
- package/dist/esm/index.js.map +1 -1
- package/dist/esm/querying/SceneQueryRunner.js.map +1 -1
- package/dist/esm/services/UrlSyncManager.js +3 -5
- package/dist/esm/services/UrlSyncManager.js.map +1 -1
- package/dist/esm/utils/writeSceneLog.js +1 -5
- package/dist/esm/utils/writeSceneLog.js.map +1 -1
- package/dist/esm/variables/utils.js.map +1 -1
- package/dist/esm/variables/variants/query/QueryVariable.js.map +1 -1
- package/dist/index.d.ts +142 -243
- package/dist/index.js +15 -189
- package/dist/index.js.map +1 -1
- package/package.json +7 -4
- package/dist/esm/core/PanelBuilders/VizConfigBuilder.js +0 -78
- package/dist/esm/core/PanelBuilders/VizConfigBuilder.js.map +0 -1
- package/dist/esm/core/PanelBuilders/VizConfigBuilders.js +0 -114
- package/dist/esm/core/PanelBuilders/VizConfigBuilders.js.map +0 -1
package/package.json
CHANGED
@@ -1,10 +1,10 @@
|
|
1
1
|
{
|
2
2
|
"name": "@grafana/scenes",
|
3
|
-
"version": "4.24.4--canary.
|
3
|
+
"version": "4.24.4--canary.716.9300035734.0",
|
4
4
|
"description": "Grafana framework for building dynamic dashboards",
|
5
5
|
"author": "Grafana Labs",
|
6
6
|
"license": "AGPL-3.0-only",
|
7
|
-
"homepage": "https://
|
7
|
+
"homepage": "https://github.com/grafana/scenes#readme",
|
8
8
|
"main": "dist/index.js",
|
9
9
|
"types": "dist/index.d.ts",
|
10
10
|
"module": "dist/esm/index.js",
|
@@ -23,7 +23,7 @@
|
|
23
23
|
},
|
24
24
|
"scripts": {
|
25
25
|
"tsc": "tsc -p ./tsconfig.build.json",
|
26
|
-
"dev": "yarn build:dev --watch",
|
26
|
+
"dev": "yarn clean && yarn build:dev --watch",
|
27
27
|
"build": "rollup -c rollup.config.ts",
|
28
28
|
"build:dev": "yarn build --environment NODE_ENV:development",
|
29
29
|
"clean": "rimraf ./dist ./compiled ./package.tgz",
|
@@ -56,6 +56,8 @@
|
|
56
56
|
"@emotion/react": "11.10.5",
|
57
57
|
"@grafana/eslint-config": "5.1.0",
|
58
58
|
"@grafana/tsconfig": "^1.3.0-rc1",
|
59
|
+
"@rollup/plugin-eslint": "^9.0.3",
|
60
|
+
"@rollup/plugin-node-resolve": "15.0.1",
|
59
61
|
"@swc/core": "^1.2.162",
|
60
62
|
"@swc/jest": "^0.2.36",
|
61
63
|
"@testing-library/dom": "9.3.4",
|
@@ -94,6 +96,7 @@
|
|
94
96
|
"rollup": "2.79.1",
|
95
97
|
"rollup-plugin-dts": "^5.0.0",
|
96
98
|
"rollup-plugin-esbuild": "5.0.0",
|
99
|
+
"rollup-plugin-fork-ts-checker": "^0.0.6",
|
97
100
|
"rollup-plugin-node-externals": "^5.0.0",
|
98
101
|
"rollup-plugin-svg-import": "^1.6.0",
|
99
102
|
"rxjs": "7.8.1",
|
@@ -112,5 +115,5 @@
|
|
112
115
|
"prettier --write"
|
113
116
|
]
|
114
117
|
},
|
115
|
-
"gitHead": "
|
118
|
+
"gitHead": "ba18122677fa67d16cea4401507a59a29648135e"
|
116
119
|
}
|
@@ -1,78 +0,0 @@
|
|
1
|
-
import { FieldConfigBuilder } from './FieldConfigBuilder.js';
|
2
|
-
import { PanelOptionsBuilder } from './PanelOptionsBuilder.js';
|
3
|
-
|
4
|
-
class VizConfigBuilder {
|
5
|
-
constructor(pluginId, pluginVersion, defaultOptions, defaultFieldConfig) {
|
6
|
-
this._pluginId = pluginId;
|
7
|
-
this._pluginVersion = pluginVersion;
|
8
|
-
this._fieldConfigBuilder = new FieldConfigBuilder(defaultFieldConfig);
|
9
|
-
this._panelOptionsBuilder = new PanelOptionsBuilder(defaultOptions);
|
10
|
-
}
|
11
|
-
setColor(color) {
|
12
|
-
this._fieldConfigBuilder.setColor(color);
|
13
|
-
return this;
|
14
|
-
}
|
15
|
-
setDecimals(decimals) {
|
16
|
-
this._fieldConfigBuilder.setDecimals(decimals);
|
17
|
-
return this;
|
18
|
-
}
|
19
|
-
setDisplayName(displayName) {
|
20
|
-
this._fieldConfigBuilder.setDisplayName(displayName);
|
21
|
-
return this;
|
22
|
-
}
|
23
|
-
setFilterable(filterable) {
|
24
|
-
this._fieldConfigBuilder.setFilterable(filterable);
|
25
|
-
return this;
|
26
|
-
}
|
27
|
-
setLinks(links) {
|
28
|
-
this._fieldConfigBuilder.setLinks(links);
|
29
|
-
return this;
|
30
|
-
}
|
31
|
-
setMappings(mappings) {
|
32
|
-
this._fieldConfigBuilder.setMappings(mappings);
|
33
|
-
return this;
|
34
|
-
}
|
35
|
-
setMax(max) {
|
36
|
-
this._fieldConfigBuilder.setMax(max);
|
37
|
-
return this;
|
38
|
-
}
|
39
|
-
setMin(min) {
|
40
|
-
this._fieldConfigBuilder.setMin(min);
|
41
|
-
return this;
|
42
|
-
}
|
43
|
-
setNoValue(noValue) {
|
44
|
-
this._fieldConfigBuilder.setNoValue(noValue);
|
45
|
-
return this;
|
46
|
-
}
|
47
|
-
setThresholds(thresholds) {
|
48
|
-
this._fieldConfigBuilder.setThresholds(thresholds);
|
49
|
-
return this;
|
50
|
-
}
|
51
|
-
setUnit(unit) {
|
52
|
-
this._fieldConfigBuilder.setUnit(unit);
|
53
|
-
return this;
|
54
|
-
}
|
55
|
-
setCustomFieldConfig(id, value) {
|
56
|
-
this._fieldConfigBuilder.setCustomFieldConfig(id, value);
|
57
|
-
return this;
|
58
|
-
}
|
59
|
-
setOverrides(builder) {
|
60
|
-
this._fieldConfigBuilder.setOverrides(builder);
|
61
|
-
return this;
|
62
|
-
}
|
63
|
-
setOption(id, value) {
|
64
|
-
this._panelOptionsBuilder.setOption(id, value);
|
65
|
-
return this;
|
66
|
-
}
|
67
|
-
build() {
|
68
|
-
return {
|
69
|
-
pluginId: this._pluginId,
|
70
|
-
pluginVersion: this._pluginVersion,
|
71
|
-
options: this._panelOptionsBuilder.build(),
|
72
|
-
fieldConfig: this._fieldConfigBuilder.build()
|
73
|
-
};
|
74
|
-
}
|
75
|
-
}
|
76
|
-
|
77
|
-
export { VizConfigBuilder };
|
78
|
-
//# sourceMappingURL=VizConfigBuilder.js.map
|
@@ -1 +0,0 @@
|
|
1
|
-
{"version":3,"file":"VizConfigBuilder.js","sources":["../../../../src/core/PanelBuilders/VizConfigBuilder.ts"],"sourcesContent":["import { DeepPartial } from '../types';\nimport { FieldConfigBuilder } from './FieldConfigBuilder';\nimport { FieldConfigOverridesBuilder } from './FieldConfigOverridesBuilder';\nimport { PanelOptionsBuilder } from './PanelOptionsBuilder';\nimport { StandardFieldConfig, StandardFieldConfigInterface, VizConfig } from './types';\n\nexport class VizConfigBuilder<TOptions extends {}, TFieldConfig extends {}>\n implements StandardFieldConfigInterface<StandardFieldConfig, VizConfigBuilder<TOptions, TFieldConfig>, 'set'>\n{\n private _fieldConfigBuilder: FieldConfigBuilder<TFieldConfig>;\n private _panelOptionsBuilder: PanelOptionsBuilder<TOptions>;\n private _pluginId: string;\n private _pluginVersion: string;\n\n public constructor(\n pluginId: string,\n pluginVersion: string,\n defaultOptions?: () => Partial<TOptions>,\n defaultFieldConfig?: () => TFieldConfig\n ) {\n this._pluginId = pluginId;\n this._pluginVersion = pluginVersion;\n this._fieldConfigBuilder = new FieldConfigBuilder(defaultFieldConfig);\n this._panelOptionsBuilder = new PanelOptionsBuilder(defaultOptions);\n }\n\n /**\n * Set color.\n */\n public setColor(color: StandardFieldConfig['color']): this {\n this._fieldConfigBuilder.setColor(color);\n return this;\n }\n\n /**\n * Set number of decimals to show.\n */\n public setDecimals(decimals: StandardFieldConfig['decimals']): this {\n this._fieldConfigBuilder.setDecimals(decimals);\n return this;\n }\n\n /**\n * Set field display name.\n */\n public setDisplayName(displayName: StandardFieldConfig['displayName']): this {\n this._fieldConfigBuilder.setDisplayName(displayName);\n return this;\n }\n\n /**\n * Set the standard field config property filterable.\n */\n public setFilterable(filterable: StandardFieldConfig['filterable']): this {\n this._fieldConfigBuilder.setFilterable(filterable);\n return this;\n }\n\n /**\n * Set data links.\n */\n public setLinks(links: StandardFieldConfig['links']): this {\n this._fieldConfigBuilder.setLinks(links);\n return this;\n }\n\n /**\n * Set value mappings.\n */\n public setMappings(mappings: StandardFieldConfig['mappings']): this {\n this._fieldConfigBuilder.setMappings(mappings);\n return this;\n }\n\n /**\n * Set the standard field config property max.\n */\n public setMax(max: StandardFieldConfig['max']): this {\n this._fieldConfigBuilder.setMax(max);\n return this;\n }\n\n /**\n * Set the standard field config property min.\n */\n public setMin(min: StandardFieldConfig['min']): this {\n this._fieldConfigBuilder.setMin(min);\n return this;\n }\n\n /**\n * Set the standard field config property noValue.\n */\n public setNoValue(noValue: StandardFieldConfig['noValue']): this {\n this._fieldConfigBuilder.setNoValue(noValue);\n return this;\n }\n\n /**\n * Set the standard field config property thresholds.\n */\n public setThresholds(thresholds: StandardFieldConfig['thresholds']): this {\n this._fieldConfigBuilder.setThresholds(thresholds);\n return this;\n }\n\n /**\n * Set the standard field config property unit.\n */\n public setUnit(unit: StandardFieldConfig['unit']): this {\n this._fieldConfigBuilder.setUnit(unit);\n return this;\n }\n\n public setCustomFieldConfig<T extends TFieldConfig, K extends keyof T>(id: K, value: DeepPartial<T[K]>): this {\n this._fieldConfigBuilder.setCustomFieldConfig(id, value);\n return this;\n }\n\n public setOverrides(builder: (b: FieldConfigOverridesBuilder<TFieldConfig>) => void): this {\n this._fieldConfigBuilder.setOverrides(builder);\n return this;\n }\n\n /**\n * Set an individual panel option. This will merge the value with the existing options.\n */\n public setOption<T extends TOptions, K extends keyof T>(id: K, value: DeepPartial<T[K]>): this {\n this._panelOptionsBuilder.setOption(id, value);\n return this;\n }\n\n /**\n * Build the panel.\n */\n public build(): VizConfig<TOptions, TFieldConfig> {\n return {\n pluginId: this._pluginId,\n pluginVersion: this._pluginVersion,\n options: this._panelOptionsBuilder.build(),\n fieldConfig: this._fieldConfigBuilder.build(),\n };\n }\n}\n"],"names":[],"mappings":";;;AAMO,MAAM,gBAEb,CAAA;AAAA,EAMS,WACL,CAAA,QAAA,EACA,aACA,EAAA,cAAA,EACA,kBACA,EAAA;AACA,IAAA,IAAA,CAAK,SAAY,GAAA,QAAA,CAAA;AACjB,IAAA,IAAA,CAAK,cAAiB,GAAA,aAAA,CAAA;AACtB,IAAK,IAAA,CAAA,mBAAA,GAAsB,IAAI,kBAAA,CAAmB,kBAAkB,CAAA,CAAA;AACpE,IAAK,IAAA,CAAA,oBAAA,GAAuB,IAAI,mBAAA,CAAoB,cAAc,CAAA,CAAA;AAAA,GACpE;AAAA,EAKO,SAAS,KAA2C,EAAA;AACzD,IAAK,IAAA,CAAA,mBAAA,CAAoB,SAAS,KAAK,CAAA,CAAA;AACvC,IAAO,OAAA,IAAA,CAAA;AAAA,GACT;AAAA,EAKO,YAAY,QAAiD,EAAA;AAClE,IAAK,IAAA,CAAA,mBAAA,CAAoB,YAAY,QAAQ,CAAA,CAAA;AAC7C,IAAO,OAAA,IAAA,CAAA;AAAA,GACT;AAAA,EAKO,eAAe,WAAuD,EAAA;AAC3E,IAAK,IAAA,CAAA,mBAAA,CAAoB,eAAe,WAAW,CAAA,CAAA;AACnD,IAAO,OAAA,IAAA,CAAA;AAAA,GACT;AAAA,EAKO,cAAc,UAAqD,EAAA;AACxE,IAAK,IAAA,CAAA,mBAAA,CAAoB,cAAc,UAAU,CAAA,CAAA;AACjD,IAAO,OAAA,IAAA,CAAA;AAAA,GACT;AAAA,EAKO,SAAS,KAA2C,EAAA;AACzD,IAAK,IAAA,CAAA,mBAAA,CAAoB,SAAS,KAAK,CAAA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A,CAAA,oBAAA,CAAqB,SAAU,CAAA,EAAA,EAAI,KAAK,CAAA,CAAA;AAC7C,IAAO,OAAA,IAAA,CAAA;AAAA,GACT;AAAA,EAKO,KAA2C,GAAA;AAChD,IAAO,OAAA;AAAA,MACL,UAAU,IAAK,CAAA,SAAA;AAAA,MACf,eAAe,IAAK,CAAA,cAAA;AAAA,MACpB,OAAA,EAAS,IAAK,CAAA,oBAAA,CAAqB,KAAM,EAAA;AAAA,MACzC,WAAA,EAAa,IAAK,CAAA,mBAAA,CAAoB,KAAM,EAAA;AAAA,KAC9C,CAAA;AAAA,GACF;AACF;;;;"}
|
@@ -1,114 +0,0 @@
|
|
1
|
-
import { defaultOptions, defaultFieldConfig } from '@grafana/schema/dist/esm/raw/composable/barchart/panelcfg/x/BarChartPanelCfg_types.gen';
|
2
|
-
import { defaultOptions as defaultOptions$1 } from '@grafana/schema/dist/esm/raw/composable/bargauge/panelcfg/x/BarGaugePanelCfg_types.gen';
|
3
|
-
import { defaultOptions as defaultOptions$2 } from '@grafana/schema/dist/esm/raw/composable/datagrid/panelcfg/x/DatagridPanelCfg_types.gen';
|
4
|
-
import { defaultOptions as defaultOptions$3 } from '@grafana/schema/dist/esm/raw/composable/gauge/panelcfg/x/GaugePanelCfg_types.gen';
|
5
|
-
import { defaultOptions as defaultOptions$4 } from '@grafana/schema/dist/esm/raw/composable/geomap/panelcfg/x/GeomapPanelCfg_types.gen';
|
6
|
-
import { defaultOptions as defaultOptions$5 } from '@grafana/schema/dist/esm/raw/composable/heatmap/panelcfg/x/HeatmapPanelCfg_types.gen';
|
7
|
-
import { defaultOptions as defaultOptions$6, defaultFieldConfig as defaultFieldConfig$1 } from '@grafana/schema/dist/esm/raw/composable/histogram/panelcfg/x/HistogramPanelCfg_types.gen';
|
8
|
-
import { defaultOptions as defaultOptions$7 } from '@grafana/schema/dist/esm/raw/composable/news/panelcfg/x/NewsPanelCfg_types.gen';
|
9
|
-
import { defaultOptions as defaultOptions$8 } from '@grafana/schema/dist/esm/raw/composable/piechart/panelcfg/x/PieChartPanelCfg_types.gen';
|
10
|
-
import { defaultOptions as defaultOptions$9 } from '@grafana/schema/dist/esm/raw/composable/stat/panelcfg/x/StatPanelCfg_types.gen';
|
11
|
-
import { defaultOptions as defaultOptions$a, defaultFieldConfig as defaultFieldConfig$2 } from '@grafana/schema/dist/esm/raw/composable/statetimeline/panelcfg/x/StateTimelinePanelCfg_types.gen';
|
12
|
-
import { defaultOptions as defaultOptions$b, defaultFieldConfig as defaultFieldConfig$3 } from '@grafana/schema/dist/esm/raw/composable/statushistory/panelcfg/x/StatusHistoryPanelCfg_types.gen';
|
13
|
-
import { defaultOptions as defaultOptions$c } from '@grafana/schema/dist/esm/raw/composable/table/panelcfg/x/TablePanelCfg_types.gen';
|
14
|
-
import { defaultOptions as defaultOptions$d } from '@grafana/schema/dist/esm/raw/composable/text/panelcfg/x/TextPanelCfg_types.gen';
|
15
|
-
import { defaultOptions as defaultOptions$e, defaultFieldConfig as defaultFieldConfig$4 } from '@grafana/schema/dist/esm/raw/composable/xychart/panelcfg/x/XYChartPanelCfg_types.gen';
|
16
|
-
import { VizConfigBuilder } from './VizConfigBuilder.js';
|
17
|
-
|
18
|
-
const VizConfigBuilders = {
|
19
|
-
barchart() {
|
20
|
-
return new VizConfigBuilder(
|
21
|
-
"barchart",
|
22
|
-
"10.0.0",
|
23
|
-
() => defaultOptions,
|
24
|
-
() => defaultFieldConfig
|
25
|
-
);
|
26
|
-
},
|
27
|
-
bargauge() {
|
28
|
-
return new VizConfigBuilder("bargauge", "10.0.0", () => defaultOptions$1);
|
29
|
-
},
|
30
|
-
datagrid() {
|
31
|
-
return new VizConfigBuilder("datagrid", "10.0.0", () => defaultOptions$2);
|
32
|
-
},
|
33
|
-
flamegraph() {
|
34
|
-
return new VizConfigBuilder("flamegraph", "10.0.0");
|
35
|
-
},
|
36
|
-
gauge() {
|
37
|
-
return new VizConfigBuilder("gauge", "10.0.0", () => defaultOptions$3);
|
38
|
-
},
|
39
|
-
geomap() {
|
40
|
-
return new VizConfigBuilder("geomap", "10.0.0", () => defaultOptions$4);
|
41
|
-
},
|
42
|
-
heatmap() {
|
43
|
-
return new VizConfigBuilder("heatmap", "10.0.0", () => defaultOptions$5);
|
44
|
-
},
|
45
|
-
histogram() {
|
46
|
-
return new VizConfigBuilder(
|
47
|
-
"histogram",
|
48
|
-
"10.0.0",
|
49
|
-
() => defaultOptions$6,
|
50
|
-
() => defaultFieldConfig$1
|
51
|
-
);
|
52
|
-
},
|
53
|
-
logs() {
|
54
|
-
return new VizConfigBuilder("logs", "10.0.0");
|
55
|
-
},
|
56
|
-
news() {
|
57
|
-
return new VizConfigBuilder("news", "10.0.0", () => defaultOptions$7);
|
58
|
-
},
|
59
|
-
nodegraph() {
|
60
|
-
return new VizConfigBuilder("nodeGraph", "10.0.0");
|
61
|
-
},
|
62
|
-
piechart() {
|
63
|
-
return new VizConfigBuilder(
|
64
|
-
"piechart",
|
65
|
-
"10.0.0",
|
66
|
-
() => defaultOptions$8
|
67
|
-
);
|
68
|
-
},
|
69
|
-
stat() {
|
70
|
-
return new VizConfigBuilder("stat", "10.0.0", () => defaultOptions$9);
|
71
|
-
},
|
72
|
-
statetimeline() {
|
73
|
-
return new VizConfigBuilder(
|
74
|
-
"state-timeline",
|
75
|
-
"10.0.0",
|
76
|
-
() => defaultOptions$a,
|
77
|
-
() => defaultFieldConfig$2
|
78
|
-
);
|
79
|
-
},
|
80
|
-
statushistory() {
|
81
|
-
return new VizConfigBuilder(
|
82
|
-
"status-history",
|
83
|
-
"10.0.0",
|
84
|
-
() => defaultOptions$b,
|
85
|
-
() => defaultFieldConfig$3
|
86
|
-
);
|
87
|
-
},
|
88
|
-
table() {
|
89
|
-
return new VizConfigBuilder("table", "10.0.0", () => defaultOptions$c);
|
90
|
-
},
|
91
|
-
text() {
|
92
|
-
return new VizConfigBuilder("text", "10.0.0", () => defaultOptions$d);
|
93
|
-
},
|
94
|
-
timeseries() {
|
95
|
-
return new VizConfigBuilder("timeseries", "10.0.0");
|
96
|
-
},
|
97
|
-
trend() {
|
98
|
-
return new VizConfigBuilder("trend", "10.0.0");
|
99
|
-
},
|
100
|
-
traces() {
|
101
|
-
return new VizConfigBuilder("traces", "10.0.0");
|
102
|
-
},
|
103
|
-
xychart() {
|
104
|
-
return new VizConfigBuilder(
|
105
|
-
"xychart",
|
106
|
-
"10.0.0",
|
107
|
-
() => defaultOptions$e,
|
108
|
-
() => defaultFieldConfig$4
|
109
|
-
);
|
110
|
-
}
|
111
|
-
};
|
112
|
-
|
113
|
-
export { VizConfigBuilders };
|
114
|
-
//# sourceMappingURL=VizConfigBuilders.js.map
|
@@ -1 +0,0 @@
|
|
1
|
-
{"version":3,"file":"VizConfigBuilders.js","sources":["../../../../src/core/PanelBuilders/VizConfigBuilders.ts"],"sourcesContent":["import { TableFieldOptions as TableFieldConfig } from '@grafana/schema';\n\nimport {\n Options as BarChartOptions,\n FieldConfig as BarChartFieldConfig,\n defaultOptions as defaultBarChartOptions,\n defaultFieldConfig as defaultBarChartFieldConfig,\n} from '@grafana/schema/dist/esm/raw/composable/barchart/panelcfg/x/BarChartPanelCfg_types.gen';\nimport {\n Options as BarGaugeOptions,\n defaultOptions as defaultBarGaugeOptions,\n} from '@grafana/schema/dist/esm/raw/composable/bargauge/panelcfg/x/BarGaugePanelCfg_types.gen';\nimport {\n Options as DataGridOptions,\n defaultOptions as defaultDataGridOptions,\n} from '@grafana/schema/dist/esm/raw/composable/datagrid/panelcfg/x/DatagridPanelCfg_types.gen';\nimport {\n Options as GaugeOptions,\n defaultOptions as defaultGaugeOptions,\n} from '@grafana/schema/dist/esm/raw/composable/gauge/panelcfg/x/GaugePanelCfg_types.gen';\nimport {\n Options as GeomapOptions,\n defaultOptions as defaultGeomapOptions,\n} from '@grafana/schema/dist/esm/raw/composable/geomap/panelcfg/x/GeomapPanelCfg_types.gen';\nimport {\n Options as HeatmapOptions,\n FieldConfig as HeatmapFieldConfig,\n defaultOptions as defaultHeatmapOptions,\n} from '@grafana/schema/dist/esm/raw/composable/heatmap/panelcfg/x/HeatmapPanelCfg_types.gen';\nimport {\n Options as HistogramOptions,\n FieldConfig as HistogramFieldConfig,\n defaultOptions as defaultHistogramOptions,\n defaultFieldConfig as defaultHistogramFieldConfig,\n} from '@grafana/schema/dist/esm/raw/composable/histogram/panelcfg/x/HistogramPanelCfg_types.gen';\nimport { Options as LogsOptions } from '@grafana/schema/dist/esm/raw/composable/logs/panelcfg/x/LogsPanelCfg_types.gen';\nimport {\n Options as NewsOptions,\n defaultOptions as defaultNewsOptions,\n} from '@grafana/schema/dist/esm/raw/composable/news/panelcfg/x/NewsPanelCfg_types.gen';\nimport { Options as NodeGraphOptions } from '@grafana/schema/dist/esm/raw/composable/nodegraph/panelcfg/x/NodeGraphPanelCfg_types.gen';\nimport {\n Options as PieChartOptions,\n FieldConfig as PieChartFieldConfig,\n defaultOptions as defaultPieChartOptions,\n} from '@grafana/schema/dist/esm/raw/composable/piechart/panelcfg/x/PieChartPanelCfg_types.gen';\nimport {\n Options as StatOptions,\n defaultOptions as defaultStatOptions,\n} from '@grafana/schema/dist/esm/raw/composable/stat/panelcfg/x/StatPanelCfg_types.gen';\nimport {\n Options as StateTimelineOptions,\n FieldConfig as StateTimelineFieldConfig,\n defaultOptions as defaultStateTimelineOptions,\n defaultFieldConfig as defaultStateTimelineFieldConfig,\n} from '@grafana/schema/dist/esm/raw/composable/statetimeline/panelcfg/x/StateTimelinePanelCfg_types.gen';\nimport {\n Options as StatusHistoryOptions,\n FieldConfig as StatusHistoryFieldConfig,\n defaultOptions as defaultStatusHistoryOptions,\n defaultFieldConfig as defaultStatusHistoryFieldConfig,\n} from '@grafana/schema/dist/esm/raw/composable/statushistory/panelcfg/x/StatusHistoryPanelCfg_types.gen';\nimport {\n Options as TableOptions,\n defaultOptions as defaultTableOptions,\n} from '@grafana/schema/dist/esm/raw/composable/table/panelcfg/x/TablePanelCfg_types.gen';\nimport {\n Options as TextOptions,\n defaultOptions as defaultTextOptions,\n} from '@grafana/schema/dist/esm/raw/composable/text/panelcfg/x/TextPanelCfg_types.gen';\nimport {\n Options as TimeSeriesOptions,\n FieldConfig as TimeSeriesFieldConfig,\n} from '@grafana/schema/dist/esm/raw/composable/timeseries/panelcfg/x/TimeSeriesPanelCfg_types.gen';\nimport {\n Options as TrendOptions,\n FieldConfig as TrendFieldConfig,\n} from '@grafana/schema/dist/esm/raw/composable/trend/panelcfg/x/TrendPanelCfg_types.gen';\nimport {\n Options as XYChartOptions,\n defaultOptions as defaultXYChartOptions,\n defaultFieldConfig as defaultXYChartFieldConfig,\n} from '@grafana/schema/dist/esm/raw/composable/xychart/panelcfg/x/XYChartPanelCfg_types.gen';\n\nimport { VizConfigBuilder } from './VizConfigBuilder';\n\nexport const VizConfigBuilders = {\n barchart() {\n return new VizConfigBuilder<BarChartOptions, BarChartFieldConfig>(\n 'barchart',\n '10.0.0',\n () => defaultBarChartOptions,\n () => defaultBarChartFieldConfig\n );\n },\n bargauge() {\n return new VizConfigBuilder<BarGaugeOptions, {}>('bargauge', '10.0.0', () => defaultBarGaugeOptions);\n },\n datagrid() {\n return new VizConfigBuilder<DataGridOptions, {}>('datagrid', '10.0.0', () => defaultDataGridOptions);\n },\n flamegraph() {\n return new VizConfigBuilder<{}, {}>('flamegraph', '10.0.0');\n },\n gauge() {\n return new VizConfigBuilder<GaugeOptions, {}>('gauge', '10.0.0', () => defaultGaugeOptions);\n },\n geomap() {\n return new VizConfigBuilder<GeomapOptions, {}>('geomap', '10.0.0', () => defaultGeomapOptions);\n },\n heatmap() {\n return new VizConfigBuilder<HeatmapOptions, HeatmapFieldConfig>('heatmap', '10.0.0', () => defaultHeatmapOptions);\n },\n histogram() {\n return new VizConfigBuilder<HistogramOptions, HistogramFieldConfig>(\n 'histogram',\n '10.0.0',\n () => defaultHistogramOptions,\n () => defaultHistogramFieldConfig\n );\n },\n logs() {\n return new VizConfigBuilder<LogsOptions, {}>('logs', '10.0.0');\n },\n news() {\n return new VizConfigBuilder<NewsOptions, {}>('news', '10.0.0', () => defaultNewsOptions);\n },\n nodegraph() {\n return new VizConfigBuilder<NodeGraphOptions, {}>('nodeGraph', '10.0.0');\n },\n piechart() {\n return new VizConfigBuilder<PieChartOptions, PieChartFieldConfig>(\n 'piechart',\n '10.0.0',\n () => defaultPieChartOptions\n );\n },\n stat() {\n return new VizConfigBuilder<StatOptions, {}>('stat', '10.0.0', () => defaultStatOptions);\n },\n statetimeline() {\n return new VizConfigBuilder<StateTimelineOptions, StateTimelineFieldConfig>(\n 'state-timeline',\n '10.0.0',\n () => defaultStateTimelineOptions,\n () => defaultStateTimelineFieldConfig\n );\n },\n statushistory() {\n return new VizConfigBuilder<StatusHistoryOptions, StatusHistoryFieldConfig>(\n 'status-history',\n '10.0.0',\n () => defaultStatusHistoryOptions,\n () => defaultStatusHistoryFieldConfig\n );\n },\n table() {\n return new VizConfigBuilder<TableOptions, TableFieldConfig>('table', '10.0.0', () => defaultTableOptions);\n },\n text() {\n return new VizConfigBuilder<TextOptions, {}>('text', '10.0.0', () => defaultTextOptions);\n },\n timeseries() {\n return new VizConfigBuilder<TimeSeriesOptions, TimeSeriesFieldConfig>('timeseries', '10.0.0');\n },\n trend() {\n return new VizConfigBuilder<{}, {}>('trend', '10.0.0');\n },\n traces() {\n return new VizConfigBuilder<TrendOptions, TrendFieldConfig>('traces', '10.0.0');\n },\n xychart() {\n return new VizConfigBuilder<XYChartOptions, {}>(\n 'xychart',\n '10.0.0',\n () => defaultXYChartOptions,\n () => defaultXYChartFieldConfig\n );\n },\n};\n"],"names":["defaultBarChartOptions","defaultBarChartFieldConfig","defaultBarGaugeOptions","defaultDataGridOptions","defaultGaugeOptions","defaultGeomapOptions","defaultHeatmapOptions","defaultHistogramOptions","defaultHistogramFieldConfig","defaultNewsOptions","defaultPieChartOptions","defaultStatOptions","defaultStateTimelineOptions","defaultStateTimelineFieldConfig","defaultStatusHistoryOptions","defaultStatusHistoryFieldConfig","defaultTableOptions","defaultTextOptions","defa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