@grafana/scenes 5.18.3 → 5.19.0--canary.932.11250344357.0

Sign up to get free protection for your applications and to get access to all the features.
@@ -129,6 +129,10 @@ class VizPanelBuilder {
129
129
  this._state.$behaviors = behaviors;
130
130
  return this;
131
131
  }
132
+ applyMixin(mixin) {
133
+ mixin(this);
134
+ return this;
135
+ }
132
136
  build() {
133
137
  const panel = new VizPanel(__spreadProps(__spreadValues({}, this._state), {
134
138
  options: this._panelOptionsBuilder.build(),
@@ -1 +1 @@
1
- {"version":3,"file":"VizPanelBuilder.js","sources":["../../../../src/core/PanelBuilders/VizPanelBuilder.ts"],"sourcesContent":["import { VizPanel, VizPanelState } from '../../components/VizPanel/VizPanel';\nimport { DeepPartial } from '../types';\nimport { FieldConfigBuilder } from './FieldConfigBuilder';\nimport { FieldConfigOverridesBuilder } from './FieldConfigOverridesBuilder';\nimport { PanelOptionsBuilder } from './PanelOptionsBuilder';\nimport { StandardFieldConfig, StandardFieldConfigInterface } from './types';\n\nexport class VizPanelBuilder<TOptions extends {}, TFieldConfig extends {}>\n implements StandardFieldConfigInterface<StandardFieldConfig, VizPanelBuilder<TOptions, TFieldConfig>, 'set'>\n{\n private _state: VizPanelState<TOptions, TFieldConfig> = {} as VizPanelState<TOptions, TFieldConfig>;\n private _fieldConfigBuilder: FieldConfigBuilder<TFieldConfig>;\n private _panelOptionsBuilder: PanelOptionsBuilder<TOptions>;\n\n public constructor(\n pluginId: string,\n pluginVersion: string,\n defaultOptions?: () => Partial<TOptions>,\n defaultFieldConfig?: () => TFieldConfig\n ) {\n this._state.title = '';\n this._state.description = '';\n this._state.displayMode = 'default';\n this._state.hoverHeader = false;\n this._state.pluginId = pluginId;\n this._state.pluginVersion = pluginVersion;\n\n this._fieldConfigBuilder = new FieldConfigBuilder(defaultFieldConfig);\n this._panelOptionsBuilder = new PanelOptionsBuilder(defaultOptions);\n }\n\n /**\n * Set panel title.\n */\n public setTitle(title: VizPanelState['title']): this {\n this._state.title = title;\n return this;\n }\n\n /**\n * Set panel description.\n */\n public setDescription(description: VizPanelState['description']): this {\n this._state.description = description;\n return this;\n }\n\n /**\n * Set panel display mode.\n */\n public setDisplayMode(displayMode: VizPanelState['displayMode']): this {\n this._state.displayMode = displayMode;\n return this;\n }\n\n /**\n * Set if panel header should be shown on hover.\n */\n public setHoverHeader(hoverHeader: VizPanelState['hoverHeader']): this {\n this._state.hoverHeader = hoverHeader;\n return this;\n }\n\n /**\n * Set panel menu scene object.\n */\n public setMenu(menu: VizPanelState['menu']): this {\n this._state.menu = menu;\n return this;\n }\n\n /**\n * Set scene object or react component to use as panel header actions.\n */\n public setHeaderActions(headerActions: VizPanelState['headerActions']): this {\n this._state.headerActions = headerActions;\n return this;\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 * Set data provider for the panel.\n */\n public setData(data: VizPanelState['$data']): this {\n this._state.$data = data;\n return this;\n }\n\n /**\n * Set time range for the panel.\n */\n public setTimeRange(timeRange: VizPanelState['$timeRange']): this {\n this._state.$timeRange = timeRange;\n return this;\n }\n\n /**\n * Set variables for the panel.\n */\n public setVariables(variables: VizPanelState['$variables']): this {\n this._state.$variables = variables;\n return this;\n }\n\n /**\n * Set behaviors for the panel.\n */\n public setBehaviors(behaviors: VizPanelState['$behaviors']): this {\n this._state.$behaviors = behaviors;\n return this;\n }\n\n /**\n * Build the panel.\n */\n public build() {\n const panel = new VizPanel<TOptions, TFieldConfig>({\n ...this._state,\n options: this._panelOptionsBuilder.build(),\n fieldConfig: this._fieldConfigBuilder.build(),\n });\n\n return panel;\n }\n}\n"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;AAOO,MAAM,eAEb,CAAA;AAAA,EAKS,WACL,CAAA,QAAA,EACA,aACA,EAAA,cAAA,EACA,kBACA,EAAA;AATF,I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IAAA,IAAA,CAAK,OAAO,UAAa,GAAA,SAAA,CAAA;AACzB,IAAO,OAAA,IAAA,CAAA;AAAA,GACT;AAAA,EAKO,KAAQ,GAAA;AACb,IAAA,MAAM,KAAQ,GAAA,IAAI,QAAiC,CAAA,aAAA,CAAA,cAAA,CAAA,EAAA,EAC9C,KAAK,MADyC,CAAA,EAAA;AAAA,MAEjD,OAAA,EAAS,IAAK,CAAA,oBAAA,CAAqB,KAAM,EAAA;AAAA,MACzC,WAAA,EAAa,IAAK,CAAA,mBAAA,CAAoB,KAAM,EAAA;AAAA,KAC7C,CAAA,CAAA,CAAA;AAED,IAAO,OAAA,KAAA,CAAA;AAAA,GACT;AACF;;;;"}
1
+ {"version":3,"file":"VizPanelBuilder.js","sources":["../../../../src/core/PanelBuilders/VizPanelBuilder.ts"],"sourcesContent":["import { VizPanel, VizPanelState } from '../../components/VizPanel/VizPanel';\nimport { DeepPartial } from '../types';\nimport { FieldConfigBuilder } from './FieldConfigBuilder';\nimport { FieldConfigOverridesBuilder } from './FieldConfigOverridesBuilder';\nimport { PanelOptionsBuilder } from './PanelOptionsBuilder';\nimport { StandardFieldConfig, StandardFieldConfigInterface } from './types';\n\nexport class VizPanelBuilder<TOptions extends {}, TFieldConfig extends {}>\n implements StandardFieldConfigInterface<StandardFieldConfig, VizPanelBuilder<TOptions, TFieldConfig>, 'set'>\n{\n private _state: VizPanelState<TOptions, TFieldConfig> = {} as VizPanelState<TOptions, TFieldConfig>;\n private _fieldConfigBuilder: FieldConfigBuilder<TFieldConfig>;\n private _panelOptionsBuilder: PanelOptionsBuilder<TOptions>;\n\n public constructor(\n pluginId: string,\n pluginVersion: string,\n defaultOptions?: () => Partial<TOptions>,\n defaultFieldConfig?: () => TFieldConfig\n ) {\n this._state.title = '';\n this._state.description = '';\n this._state.displayMode = 'default';\n this._state.hoverHeader = false;\n this._state.pluginId = pluginId;\n this._state.pluginVersion = pluginVersion;\n\n this._fieldConfigBuilder = new FieldConfigBuilder(defaultFieldConfig);\n this._panelOptionsBuilder = new PanelOptionsBuilder(defaultOptions);\n }\n\n /**\n * Set panel title.\n */\n public setTitle(title: VizPanelState['title']): this {\n this._state.title = title;\n return this;\n }\n\n /**\n * Set panel description.\n */\n public setDescription(description: VizPanelState['description']): this {\n this._state.description = description;\n return this;\n }\n\n /**\n * Set panel display mode.\n */\n public setDisplayMode(displayMode: VizPanelState['displayMode']): this {\n this._state.displayMode = displayMode;\n return this;\n }\n\n /**\n * Set if panel header should be shown on hover.\n */\n public setHoverHeader(hoverHeader: VizPanelState['hoverHeader']): this {\n this._state.hoverHeader = hoverHeader;\n return this;\n }\n\n /**\n * Set panel menu scene object.\n */\n public setMenu(menu: VizPanelState['menu']): this {\n this._state.menu = menu;\n return this;\n }\n\n /**\n * Set scene object or react component to use as panel header actions.\n */\n public setHeaderActions(headerActions: VizPanelState['headerActions']): this {\n this._state.headerActions = headerActions;\n return this;\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 * Set data provider for the panel.\n */\n public setData(data: VizPanelState['$data']): this {\n this._state.$data = data;\n return this;\n }\n\n /**\n * Set time range for the panel.\n */\n public setTimeRange(timeRange: VizPanelState['$timeRange']): this {\n this._state.$timeRange = timeRange;\n return this;\n }\n\n /**\n * Set variables for the panel.\n */\n public setVariables(variables: VizPanelState['$variables']): this {\n this._state.$variables = variables;\n return this;\n }\n\n /**\n * Set behaviors for the panel.\n */\n public setBehaviors(behaviors: VizPanelState['$behaviors']): this {\n this._state.$behaviors = behaviors;\n return this;\n }\n\n /**\n * Makes it possible to shared config between different builders\n */\n public applyMixin(mixin: (builder: this) => void): this {\n mixin(this);\n return this;\n }\n\n /**\n * Build the panel.\n */\n public build() {\n const panel = new VizPanel<TOptions, TFieldConfig>({\n ...this._state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,SAAA,CAAA;AACzB,IAAO,OAAA,IAAA,CAAA;AAAA,GACT;AAAA,EAKO,aAAa,SAA8C,EAAA;AAChE,IAAA,IAAA,CAAK,OAAO,UAAa,GAAA,SAAA,CAAA;AACzB,IAAO,OAAA,IAAA,CAAA;AAAA,GACT;AAAA,EAKO,aAAa,SAA8C,EAAA;AAChE,IAAA,IAAA,CAAK,OAAO,UAAa,GAAA,SAAA,CAAA;AACzB,IAAO,OAAA,IAAA,CAAA;AAAA,GACT;AAAA,EAKO,WAAW,KAAsC,EAAA;AACtD,IAAA,KAAA,CAAM,IAAI,CAAA,CAAA;AACV,IAAO,OAAA,IAAA,CAAA;AAAA,GACT;AAAA,EAKO,KAAQ,GAAA;AACb,IAAA,MAAM,KAAQ,GAAA,IAAI,QAAiC,CAAA,aAAA,CAAA,cAAA,CAAA,EAAA,EAC9C,KAAK,MADyC,CAAA,EAAA;AAAA,MAEjD,OAAA,EAAS,IAAK,CAAA,oBAAA,CAAqB,KAAM,EAAA;AAAA,MACzC,WAAA,EAAa,IAAK,CAAA,mBAAA,CAAoB,KAAM,EAAA;AAAA,KAC7C,CAAA,CAAA,CAAA;AAED,IAAO,OAAA,KAAA,CAAA;AAAA,GACT;AACF;;;;"}
package/dist/index.d.ts CHANGED
@@ -2481,6 +2481,10 @@ declare class VizPanelBuilder<TOptions extends {}, TFieldConfig extends {}> impl
2481
2481
  * Set behaviors for the panel.
2482
2482
  */
2483
2483
  setBehaviors(behaviors: VizPanelState['$behaviors']): this;
2484
+ /**
2485
+ * Makes it possible to shared config between different builders
2486
+ */
2487
+ applyMixin(mixin: (builder: this) => void): this;
2484
2488
  /**
2485
2489
  * Build the panel.
2486
2490
  */
package/dist/index.js CHANGED
@@ -12800,6 +12800,10 @@ class VizPanelBuilder {
12800
12800
  this._state.$behaviors = behaviors;
12801
12801
  return this;
12802
12802
  }
12803
+ applyMixin(mixin) {
12804
+ mixin(this);
12805
+ return this;
12806
+ }
12803
12807
  build() {
12804
12808
  const panel = new VizPanel(__spreadProps(__spreadValues({}, this._state), {
12805
12809
  options: this._panelOptionsBuilder.build(),