@grafana/scenes 4.26.3 → 4.27.0--canary.766.9369774725.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (39) hide show
  1. package/CHANGELOG.md +0 -41
  2. package/README.md +0 -2
  3. package/dist/esm/components/SceneTimeRangeCompare.js +1 -55
  4. package/dist/esm/components/SceneTimeRangeCompare.js.map +1 -1
  5. package/dist/esm/components/VizPanel/VizPanel.js +0 -3
  6. package/dist/esm/components/VizPanel/VizPanel.js.map +1 -1
  7. package/dist/esm/core/types.js.map +1 -1
  8. package/dist/esm/index.js +1 -4
  9. package/dist/esm/index.js.map +1 -1
  10. package/dist/esm/querying/SceneQueryRunner.js +88 -85
  11. package/dist/esm/querying/SceneQueryRunner.js.map +1 -1
  12. package/dist/esm/querying/timeShiftQueryResponseOperator.js +60 -0
  13. package/dist/esm/querying/timeShiftQueryResponseOperator.js.map +1 -0
  14. package/dist/esm/utils/writeSceneLog.js +1 -5
  15. package/dist/esm/utils/writeSceneLog.js.map +1 -1
  16. package/dist/esm/variables/adhoc/AdHocFilterRenderer.js +37 -3
  17. package/dist/esm/variables/adhoc/AdHocFilterRenderer.js.map +1 -1
  18. package/dist/esm/variables/components/VariableValueSelect.js +11 -11
  19. package/dist/esm/variables/components/VariableValueSelect.js.map +1 -1
  20. package/dist/esm/variables/components/getOptionSearcher.js +1 -8
  21. package/dist/esm/variables/components/getOptionSearcher.js.map +1 -1
  22. package/dist/esm/variables/groupby/GroupByVariable.js +2 -2
  23. package/dist/esm/variables/groupby/GroupByVariable.js.map +1 -1
  24. package/dist/esm/variables/interpolation/sceneInterpolator.js +3 -3
  25. package/dist/esm/variables/interpolation/sceneInterpolator.js.map +1 -1
  26. package/dist/esm/variables/utils.js.map +1 -1
  27. package/dist/esm/variables/variants/query/QueryVariable.js.map +1 -1
  28. package/dist/index.d.ts +146 -256
  29. package/dist/index.js +936 -1130
  30. package/dist/index.js.map +1 -1
  31. package/package.json +8 -5
  32. package/dist/esm/core/PanelBuilders/VizConfigBuilder.js +0 -78
  33. package/dist/esm/core/PanelBuilders/VizConfigBuilder.js.map +0 -1
  34. package/dist/esm/core/PanelBuilders/VizConfigBuilders.js +0 -114
  35. package/dist/esm/core/PanelBuilders/VizConfigBuilders.js.map +0 -1
  36. package/dist/esm/querying/ExtraQueryProvider.js +0 -6
  37. package/dist/esm/querying/ExtraQueryProvider.js.map +0 -1
  38. package/dist/esm/querying/extraQueryProcessingOperator.js +0 -46
  39. package/dist/esm/querying/extraQueryProcessingOperator.js.map +0 -1
package/dist/index.d.ts CHANGED
@@ -1,11 +1,11 @@
1
1
  import * as _grafana_data from '@grafana/data';
2
- import { BusEventWithPayload, PanelData, BusEvent, BusEventType, BusEventHandler, TimeRange, DataQueryRequest, DataTransformContext, DataFrame, PanelPlugin, EventBus, DataQuery as DataQuery$1, DataSourceApi, Registry, RegistryItem, ScopedVars, AdHocVariableFilter, SelectableValue, MetricFindValue, VariableRefresh as VariableRefresh$1, VariableSort, EventFilterOptions, AnnotationEvent, AnnotationQuery, DataTransformerConfig, PanelMenuItem, FieldConfigSource, PanelModel, AbsoluteTimeRange, InterpolateFunction, IconName as IconName$1, FieldConfig, FieldType, FieldValueMatcherConfig } from '@grafana/data';
2
+ import { BusEventWithPayload, PanelData, BusEvent, BusEventType, BusEventHandler, TimeRange, DataQueryRequest, DataTransformContext, DataFrame, PanelPlugin, EventBus, DataQuery, DataSourceApi, Registry, RegistryItem, ScopedVars, AdHocVariableFilter, SelectableValue, MetricFindValue, VariableRefresh as VariableRefresh$1, VariableSort, EventFilterOptions, AnnotationEvent, AnnotationQuery, DataTransformerConfig, PanelMenuItem, FieldConfigSource, PanelModel, AbsoluteTimeRange, InterpolateFunction, IconName as IconName$1, FieldConfig, FieldType, FieldValueMatcherConfig } from '@grafana/data';
3
3
  import * as React$1 from 'react';
4
4
  import React__default, { CSSProperties, ComponentType } from 'react';
5
5
  import * as rxjs from 'rxjs';
6
6
  import { Observable, Unsubscribable, MonoTypeOperatorFunction, Subscription, ReplaySubject } from 'rxjs';
7
7
  import * as _grafana_schema from '@grafana/schema';
8
- import { VariableType, VariableHide, TimeZone, DataTopic, DataQuery, DataSourceRef, VariableRefresh, LoadingState, DashboardCursorSync, MatcherConfig, TableFieldOptions } from '@grafana/schema';
8
+ import { VariableType, VariableHide, TimeZone, DataTopic, DataSourceRef, DataQuery as DataQuery$1, VariableRefresh, LoadingState, DashboardCursorSync, MatcherConfig, TableFieldOptions } from '@grafana/schema';
9
9
  import { VariableInterpolation } from '@grafana/runtime';
10
10
  import { PanelContext, IconName } from '@grafana/ui';
11
11
  import ReactGridLayout from 'react-grid-layout';
@@ -309,10 +309,6 @@ interface UseStateHookOptions {
309
309
  */
310
310
  shouldActivateOrKeepAlive?: boolean;
311
311
  }
312
- interface SceneDataQuery extends DataQuery {
313
- [key: string]: any;
314
- timeRangeCompare?: boolean;
315
- }
316
312
 
317
313
  /**
318
314
  *
@@ -426,7 +422,7 @@ declare function useSceneObjectState<TState extends SceneObjectState>(model: Sce
426
422
 
427
423
  declare function cloneSceneObjectState<TState extends SceneObjectState>(sceneState: TState, withState?: Partial<TState>): TState;
428
424
 
429
- declare abstract class RuntimeDataSource<TQuery extends DataQuery$1 = DataQuery$1> extends DataSourceApi<TQuery> {
425
+ declare abstract class RuntimeDataSource<TQuery extends DataQuery = DataQuery> extends DataSourceApi<TQuery> {
430
426
  constructor(pluginId: string, uid: string);
431
427
  testDatasource(): Promise<any>;
432
428
  }
@@ -481,6 +477,143 @@ interface MacroVariableConstructor {
481
477
  */
482
478
  declare function registerVariableMacro(name: string, macro: MacroVariableConstructor): () => void;
483
479
 
480
+ interface VariableDependencyConfigOptions<TState extends SceneObjectState> {
481
+ /**
482
+ * State paths to scan / extract variable dependencies from. Leave empty to scan all paths.
483
+ */
484
+ statePaths?: Array<keyof TState | '*'>;
485
+ /**
486
+ * Explicit list of variable names to depend on. Leave empty to scan state for dependencies.
487
+ */
488
+ variableNames?: string[];
489
+ /**
490
+ * Optional way to customize how to handle when a dependent variable changes
491
+ * If not specified the default behavior is to trigger a re-render
492
+ */
493
+ onReferencedVariableValueChanged?: (variable: SceneVariable) => void;
494
+ /**
495
+ * Two scenarios trigger this callback to be called.
496
+ * 1. When any direct dependency changed value
497
+ * 2. In case hasDependencyInLoadingState was called and returned true we really care about any variable update. So in this scenario this callback is called
498
+ * after any variable update completes. This is to cover scenarios where an object is waiting for indirect dependencies to complete.
499
+ */
500
+ onVariableUpdateCompleted?: () => void;
501
+ /**
502
+ * Optional way to subscribe to all variable value changes, even to variables that are not dependencies.
503
+ */
504
+ onAnyVariableChanged?: (variable: SceneVariable) => void;
505
+ }
506
+ declare class VariableDependencyConfig<TState extends SceneObjectState> implements SceneVariableDependencyConfigLike {
507
+ private _sceneObject;
508
+ private _options;
509
+ private _state;
510
+ private _dependencies;
511
+ private _statePaths?;
512
+ private _isWaitingForVariables;
513
+ scanCount: number;
514
+ constructor(_sceneObject: SceneObject<TState>, _options: VariableDependencyConfigOptions<TState>);
515
+ /**
516
+ * Used to check for dependency on a specific variable
517
+ */
518
+ hasDependencyOn(name: string): boolean;
519
+ /**
520
+ * This is called whenever any set of variables have new values. It is up to this implementation to check if it's relevant given the current dependencies.
521
+ */
522
+ variableUpdateCompleted(variable: SceneVariable, hasChanged: boolean): void;
523
+ hasDependencyInLoadingState(): boolean;
524
+ getNames(): Set<string>;
525
+ /**
526
+ * Update variableNames
527
+ */
528
+ setVariableNames(varNames: string[]): void;
529
+ setPaths(paths: Array<keyof TState | '*'>): void;
530
+ private scanStateForDependencies;
531
+ private extractVariablesFrom;
532
+ }
533
+
534
+ interface QueryRunnerState extends SceneObjectState {
535
+ data?: PanelData;
536
+ queries: DataQueryExtended[];
537
+ datasource?: DataSourceRef;
538
+ minInterval?: string;
539
+ maxDataPoints?: number;
540
+ liveStreaming?: boolean;
541
+ maxDataPointsFromWidth?: boolean;
542
+ cacheTimeout?: DataQueryRequest['cacheTimeout'];
543
+ queryCachingTTL?: DataQueryRequest['queryCachingTTL'];
544
+ dataLayerFilter?: DataLayerFilter;
545
+ _hasFetchedData?: boolean;
546
+ }
547
+ interface DataQueryExtended extends DataQuery$1 {
548
+ [key: string]: any;
549
+ timeRangeCompare?: boolean;
550
+ }
551
+ declare class SceneQueryRunner extends SceneObjectBase<QueryRunnerState> implements SceneDataProvider {
552
+ private _querySub?;
553
+ private _dataLayersSub?;
554
+ private _dataLayersMerger;
555
+ private _timeSub?;
556
+ private _timeSubRange?;
557
+ private _containerWidth?;
558
+ private _variableValueRecorder;
559
+ private _results;
560
+ private _scopedVars;
561
+ private _layerAnnotations?;
562
+ private _resultAnnotations?;
563
+ private _adhocFiltersVar?;
564
+ private _groupByVar?;
565
+ getResultsStream(): ReplaySubject<SceneDataProviderResult>;
566
+ protected _variableDependency: VariableDependencyConfig<QueryRunnerState>;
567
+ constructor(initialState: QueryRunnerState);
568
+ private _onActivate;
569
+ private _handleDataLayers;
570
+ private _onLayersReceived;
571
+ /**
572
+ * This tries to start a new query whenever a variable completes or is changed.
573
+ *
574
+ * We care about variable update completions even when the variable has not changed and even when it is not a direct dependency.
575
+ * Example: Variables A and B (B depends on A). A update depends on time range. So when time change query runner will
576
+ * find that variable A is loading which is a dependency on of variable B so will set _isWaitingForVariables to true and
577
+ * not issue any query.
578
+ *
579
+ * When A completes it's loading (with no value change, so B never updates) it will cause a call of this function letting
580
+ * the query runner know that A has completed, and in case _isWaitingForVariables we try to run the query. The query will
581
+ * only run if all variables are in a non loading state so in other scenarios where a query depends on many variables this will
582
+ * be called many times until all dependencies are in a non loading state. *
583
+ */
584
+ private onVariableUpdatesCompleted;
585
+ /**
586
+ * Check if value changed is a adhoc filter o group by variable that did not exist when we issued the last query
587
+ */
588
+ private onAnyVariableChanged;
589
+ private _isRelevantAutoVariable;
590
+ private shouldRunQueriesOnActivate;
591
+ private _isDataTimeRangeStale;
592
+ private _onDeactivate;
593
+ setContainerWidth(width: number): void;
594
+ isDataReadyToDisplay(): boolean;
595
+ private subscribeToTimeRangeChanges;
596
+ runQueries(): void;
597
+ private getMaxDataPoints;
598
+ cancelQuery(): void;
599
+ private runWithTimeRange;
600
+ clone(withState?: Partial<QueryRunnerState>): this;
601
+ private prepareRequests;
602
+ private onDataReceived;
603
+ private _combineDataLayers;
604
+ private _setNoDataState;
605
+ /**
606
+ * Will walk up the scene graph and find the closest time range compare object
607
+ * It performs buttom-up search, including shallow search across object children for supporting controls/header actions
608
+ */
609
+ private getTimeCompare;
610
+ /**
611
+ * Walk up scene graph and find the closest filterset with matching data source
612
+ */
613
+ private findAndSubscribeToAdHocFilters;
614
+ private _updateExplicitVariableDependencies;
615
+ }
616
+
484
617
  declare function renderPrometheusLabelFilters(filters: AdHocVariableFilter[]): string;
485
618
 
486
619
  declare class AdHocFiltersVariableUrlSyncHandler implements SceneObjectUrlSyncHandler {
@@ -600,60 +733,6 @@ declare class ConstantVariable extends SceneObjectBase<ConstantVariableState> im
600
733
  getValue(): VariableValue;
601
734
  }
602
735
 
603
- interface VariableDependencyConfigOptions<TState extends SceneObjectState> {
604
- /**
605
- * State paths to scan / extract variable dependencies from. Leave empty to scan all paths.
606
- */
607
- statePaths?: Array<keyof TState | '*'>;
608
- /**
609
- * Explicit list of variable names to depend on. Leave empty to scan state for dependencies.
610
- */
611
- variableNames?: string[];
612
- /**
613
- * Optional way to customize how to handle when a dependent variable changes
614
- * If not specified the default behavior is to trigger a re-render
615
- */
616
- onReferencedVariableValueChanged?: (variable: SceneVariable) => void;
617
- /**
618
- * Two scenarios trigger this callback to be called.
619
- * 1. When any direct dependency changed value
620
- * 2. In case hasDependencyInLoadingState was called and returned true we really care about any variable update. So in this scenario this callback is called
621
- * after any variable update completes. This is to cover scenarios where an object is waiting for indirect dependencies to complete.
622
- */
623
- onVariableUpdateCompleted?: () => void;
624
- /**
625
- * Optional way to subscribe to all variable value changes, even to variables that are not dependencies.
626
- */
627
- onAnyVariableChanged?: (variable: SceneVariable) => void;
628
- }
629
- declare class VariableDependencyConfig<TState extends SceneObjectState> implements SceneVariableDependencyConfigLike {
630
- private _sceneObject;
631
- private _options;
632
- private _state;
633
- private _dependencies;
634
- private _statePaths?;
635
- private _isWaitingForVariables;
636
- scanCount: number;
637
- constructor(_sceneObject: SceneObject<TState>, _options: VariableDependencyConfigOptions<TState>);
638
- /**
639
- * Used to check for dependency on a specific variable
640
- */
641
- hasDependencyOn(name: string): boolean;
642
- /**
643
- * This is called whenever any set of variables have new values. It is up to this implementation to check if it's relevant given the current dependencies.
644
- */
645
- variableUpdateCompleted(variable: SceneVariable, hasChanged: boolean): void;
646
- hasDependencyInLoadingState(): boolean;
647
- getNames(): Set<string>;
648
- /**
649
- * Update variableNames
650
- */
651
- setVariableNames(varNames: string[]): void;
652
- setPaths(paths: Array<keyof TState | '*'>): void;
653
- private scanStateForDependencies;
654
- private extractVariablesFrom;
655
- }
656
-
657
736
  interface MultiValueVariableState extends SceneVariableState {
658
737
  value: VariableValue;
659
738
  text: VariableValue;
@@ -793,7 +872,7 @@ declare class TextBoxVariable extends SceneObjectBase<TextBoxVariableState> impl
793
872
  interface QueryVariableState extends MultiValueVariableState {
794
873
  type: 'query';
795
874
  datasource: DataSourceRef | null;
796
- query: string | SceneDataQuery;
875
+ query: string | DataQueryExtended;
797
876
  regex: string;
798
877
  refresh: VariableRefresh$1;
799
878
  sort: VariableSort;
@@ -1237,96 +1316,6 @@ declare class SceneTimeZoneOverride extends SceneTimeRangeTransformerBase<SceneT
1237
1316
  onTimeZoneChange(timeZone: string): void;
1238
1317
  }
1239
1318
 
1240
- interface QueryRunnerState extends SceneObjectState {
1241
- data?: PanelData;
1242
- queries: SceneDataQuery[];
1243
- datasource?: DataSourceRef;
1244
- minInterval?: string;
1245
- maxDataPoints?: number;
1246
- liveStreaming?: boolean;
1247
- maxDataPointsFromWidth?: boolean;
1248
- cacheTimeout?: DataQueryRequest['cacheTimeout'];
1249
- queryCachingTTL?: DataQueryRequest['queryCachingTTL'];
1250
- dataLayerFilter?: DataLayerFilter;
1251
- _hasFetchedData?: boolean;
1252
- }
1253
- declare class SceneQueryRunner extends SceneObjectBase<QueryRunnerState> implements SceneDataProvider {
1254
- private _querySub?;
1255
- private _dataLayersSub?;
1256
- private _dataLayersMerger;
1257
- private _timeSub?;
1258
- private _timeSubRange?;
1259
- private _containerWidth?;
1260
- private _variableValueRecorder;
1261
- private _results;
1262
- private _scopedVars;
1263
- private _layerAnnotations?;
1264
- private _resultAnnotations?;
1265
- private _adhocFiltersVar?;
1266
- private _groupByVar?;
1267
- getResultsStream(): ReplaySubject<SceneDataProviderResult>;
1268
- protected _variableDependency: VariableDependencyConfig<QueryRunnerState>;
1269
- constructor(initialState: QueryRunnerState);
1270
- private _onActivate;
1271
- private _handleDataLayers;
1272
- private _onLayersReceived;
1273
- /**
1274
- * This tries to start a new query whenever a variable completes or is changed.
1275
- *
1276
- * We care about variable update completions even when the variable has not changed and even when it is not a direct dependency.
1277
- * Example: Variables A and B (B depends on A). A update depends on time range. So when time change query runner will
1278
- * find that variable A is loading which is a dependency on of variable B so will set _isWaitingForVariables to true and
1279
- * not issue any query.
1280
- *
1281
- * When A completes it's loading (with no value change, so B never updates) it will cause a call of this function letting
1282
- * the query runner know that A has completed, and in case _isWaitingForVariables we try to run the query. The query will
1283
- * only run if all variables are in a non loading state so in other scenarios where a query depends on many variables this will
1284
- * be called many times until all dependencies are in a non loading state. *
1285
- */
1286
- private onVariableUpdatesCompleted;
1287
- /**
1288
- * Check if value changed is a adhoc filter o group by variable that did not exist when we issued the last query
1289
- */
1290
- private onAnyVariableChanged;
1291
- private _isRelevantAutoVariable;
1292
- private shouldRunQueriesOnActivate;
1293
- private _isDataTimeRangeStale;
1294
- private _onDeactivate;
1295
- setContainerWidth(width: number): void;
1296
- isDataReadyToDisplay(): boolean;
1297
- private subscribeToTimeRangeChanges;
1298
- runQueries(): void;
1299
- private getMaxDataPoints;
1300
- cancelQuery(): void;
1301
- private runWithTimeRange;
1302
- clone(withState?: Partial<QueryRunnerState>): this;
1303
- private prepareRequests;
1304
- private onDataReceived;
1305
- private _combineDataLayers;
1306
- private _setNoDataState;
1307
- /**
1308
- * Walk up the scene graph and find any ExtraQueryProviders.
1309
- *
1310
- * This will return an array of the closest provider of each type.
1311
- */
1312
- private getClosestExtraQueryProviders;
1313
- /**
1314
- * Walk up scene graph and find the closest filterset with matching data source
1315
- */
1316
- private findAndSubscribeToAdHocFilters;
1317
- private _updateExplicitVariableDependencies;
1318
- }
1319
-
1320
- type ExtraQueryDataProcessor = (primary: PanelData, secondary: PanelData) => Observable<PanelData>;
1321
- interface ExtraQueryDescriptor {
1322
- req: DataQueryRequest;
1323
- processor?: ExtraQueryDataProcessor;
1324
- }
1325
- interface ExtraQueryProvider<T extends SceneObjectState> extends SceneObjectBase<T> {
1326
- getExtraQueries(request: DataQueryRequest): ExtraQueryDescriptor[];
1327
- shouldRerun(prev: T, next: T): boolean;
1328
- }
1329
-
1330
1319
  declare abstract class SceneDataLayerSetBase<T extends SceneDataLayerProviderState> extends SceneObjectBase<T> implements SceneDataLayerProvider {
1331
1320
  /** Mark it as a data layer */
1332
1321
  isDataLayer: true;
@@ -1412,13 +1401,6 @@ declare class VariableValueSelectors extends SceneObjectBase<VariableValueSelect
1412
1401
  static Component: typeof VariableValueSelectorsRenderer;
1413
1402
  }
1414
1403
  declare function VariableValueSelectorsRenderer({ model }: SceneComponentProps<VariableValueSelectors>): React__default.JSX.Element;
1415
- interface VariableSelectProps {
1416
- layout?: ControlsLayout;
1417
- variable: SceneVariable;
1418
- /** To override hide from VariableValueSelectByName */
1419
- showAlways?: boolean;
1420
- }
1421
- declare function VariableValueSelectWrapper({ variable, layout, showAlways }: VariableSelectProps): React__default.JSX.Element | null;
1422
1404
 
1423
1405
  interface VariableValueControlState extends SceneObjectState {
1424
1406
  layout?: ControlsLayout;
@@ -1686,7 +1668,6 @@ declare class VizPanel<TOptions = {}, TFieldConfig extends {} = {}> extends Scen
1686
1668
  onFieldConfigChange: (fieldConfigUpdate: FieldConfigSource<DeepPartial<TFieldConfig>>, replace?: boolean) => void;
1687
1669
  interpolate: InterpolateFunction;
1688
1670
  getDescription: () => string;
1689
- clearFieldConfigCache(): void;
1690
1671
  /**
1691
1672
  * Called from the react render path to apply the field config to the data provided by the data provider
1692
1673
  */
@@ -1795,6 +1776,9 @@ declare class SceneRefreshPicker extends SceneObjectBase<SceneRefreshPickerState
1795
1776
  }
1796
1777
  declare function SceneRefreshPickerRenderer({ model }: SceneComponentProps<SceneRefreshPicker>): React__default.JSX.Element;
1797
1778
 
1779
+ interface TimeRangeCompareProvider {
1780
+ getCompareTimeRange(timeRange: TimeRange): TimeRange | undefined;
1781
+ }
1798
1782
  interface SceneTimeRangeCompareState extends SceneObjectState {
1799
1783
  compareWith?: string;
1800
1784
  compareOptions: Array<{
@@ -1802,7 +1786,7 @@ interface SceneTimeRangeCompareState extends SceneObjectState {
1802
1786
  value: string;
1803
1787
  }>;
1804
1788
  }
1805
- declare class SceneTimeRangeCompare extends SceneObjectBase<SceneTimeRangeCompareState> implements ExtraQueryProvider<SceneTimeRangeCompareState> {
1789
+ declare class SceneTimeRangeCompare extends SceneObjectBase<SceneTimeRangeCompareState> implements TimeRangeCompareProvider {
1806
1790
  static Component: typeof SceneTimeRangeCompareRenderer;
1807
1791
  protected _urlSync: SceneObjectUrlSyncConfig;
1808
1792
  constructor(state: Partial<SceneTimeRangeCompareState>);
@@ -1813,8 +1797,6 @@ declare class SceneTimeRangeCompare extends SceneObjectBase<SceneTimeRangeCompar
1813
1797
  }[];
1814
1798
  onCompareWithChanged: (compareWith: string) => void;
1815
1799
  onClearCompare: () => void;
1816
- getExtraQueries(request: DataQueryRequest): ExtraQueryDescriptor[];
1817
- shouldRerun(prev: SceneTimeRangeCompareState, next: SceneTimeRangeCompareState): boolean;
1818
1800
  getCompareTimeRange(timeRange: TimeRange): TimeRange | undefined;
1819
1801
  getUrlState(): SceneObjectUrlValues;
1820
1802
  updateFromUrl(values: SceneObjectUrlValues): void;
@@ -2214,12 +2196,6 @@ type StandardFieldConfigInterface<T, C, Prefix extends string> = {
2214
2196
  [K in Exclude<keyof T, keyof any[]> as `${Prefix}${Capitalize<string & K>}`]: (value: T[K]) => C;
2215
2197
  };
2216
2198
  type StandardFieldConfig = Pick<FieldConfig, 'color' | 'decimals' | 'displayName' | 'filterable' | 'links' | 'mappings' | 'max' | 'min' | 'noValue' | 'thresholds' | 'unit'>;
2217
- interface VizConfig<TOptions = {}, TFieldConfig = {}> {
2218
- pluginId: string;
2219
- pluginVersion: string;
2220
- options: DeepPartial<TOptions>;
2221
- fieldConfig: FieldConfigSource<DeepPartial<TFieldConfig>>;
2222
- }
2223
2199
 
2224
2200
  declare class StandardFieldConfigOverridesBuilder<T extends StandardFieldConfigOverridesBuilder<T>> implements StandardFieldConfigInterface<StandardFieldConfig, T, 'override'> {
2225
2201
  protected _overrides: Array<{
@@ -2528,92 +2504,6 @@ interface Props {
2528
2504
  */
2529
2505
  declare function SceneDebugger({ scene }: Props): React__default.JSX.Element;
2530
2506
 
2531
- declare class VizConfigBuilder<TOptions extends {}, TFieldConfig extends {}> implements StandardFieldConfigInterface<StandardFieldConfig, VizConfigBuilder<TOptions, TFieldConfig>, 'set'> {
2532
- private _fieldConfigBuilder;
2533
- private _panelOptionsBuilder;
2534
- private _pluginId;
2535
- private _pluginVersion;
2536
- constructor(pluginId: string, pluginVersion: string, defaultOptions?: () => Partial<TOptions>, defaultFieldConfig?: () => TFieldConfig);
2537
- /**
2538
- * Set color.
2539
- */
2540
- setColor(color: StandardFieldConfig['color']): this;
2541
- /**
2542
- * Set number of decimals to show.
2543
- */
2544
- setDecimals(decimals: StandardFieldConfig['decimals']): this;
2545
- /**
2546
- * Set field display name.
2547
- */
2548
- setDisplayName(displayName: StandardFieldConfig['displayName']): this;
2549
- /**
2550
- * Set the standard field config property filterable.
2551
- */
2552
- setFilterable(filterable: StandardFieldConfig['filterable']): this;
2553
- /**
2554
- * Set data links.
2555
- */
2556
- setLinks(links: StandardFieldConfig['links']): this;
2557
- /**
2558
- * Set value mappings.
2559
- */
2560
- setMappings(mappings: StandardFieldConfig['mappings']): this;
2561
- /**
2562
- * Set the standard field config property max.
2563
- */
2564
- setMax(max: StandardFieldConfig['max']): this;
2565
- /**
2566
- * Set the standard field config property min.
2567
- */
2568
- setMin(min: StandardFieldConfig['min']): this;
2569
- /**
2570
- * Set the standard field config property noValue.
2571
- */
2572
- setNoValue(noValue: StandardFieldConfig['noValue']): this;
2573
- /**
2574
- * Set the standard field config property thresholds.
2575
- */
2576
- setThresholds(thresholds: StandardFieldConfig['thresholds']): this;
2577
- /**
2578
- * Set the standard field config property unit.
2579
- */
2580
- setUnit(unit: StandardFieldConfig['unit']): this;
2581
- setCustomFieldConfig<T extends TFieldConfig, K extends keyof T>(id: K, value: DeepPartial<T[K]>): this;
2582
- setOverrides(builder: (b: FieldConfigOverridesBuilder<TFieldConfig>) => void): this;
2583
- /**
2584
- * Set an individual panel option. This will merge the value with the existing options.
2585
- */
2586
- setOption<T extends TOptions, K extends keyof T>(id: K, value: DeepPartial<T[K]>): this;
2587
- /**
2588
- * Build the panel.
2589
- */
2590
- build(): VizConfig<TOptions, TFieldConfig>;
2591
- }
2592
-
2593
- declare const VizConfigBuilders: {
2594
- barchart(): VizConfigBuilder<Options, FieldConfig$1>;
2595
- bargauge(): VizConfigBuilder<Options$1, {}>;
2596
- datagrid(): VizConfigBuilder<Options$2, {}>;
2597
- flamegraph(): VizConfigBuilder<{}, {}>;
2598
- gauge(): VizConfigBuilder<Options$3, {}>;
2599
- geomap(): VizConfigBuilder<Options$4, {}>;
2600
- heatmap(): VizConfigBuilder<Options$5, FieldConfig$2>;
2601
- histogram(): VizConfigBuilder<Options$6, FieldConfig$3>;
2602
- logs(): VizConfigBuilder<Options$7, {}>;
2603
- news(): VizConfigBuilder<Options$8, {}>;
2604
- nodegraph(): VizConfigBuilder<Options$9, {}>;
2605
- piechart(): VizConfigBuilder<Options$a, FieldConfig$4>;
2606
- stat(): VizConfigBuilder<Options$b, {}>;
2607
- statetimeline(): VizConfigBuilder<Options$c, FieldConfig$5>;
2608
- statushistory(): VizConfigBuilder<Options$d, FieldConfig$6>;
2609
- table(): VizConfigBuilder<Options$e, TableFieldOptions>;
2610
- text(): VizConfigBuilder<Options$f, {}>;
2611
- timeseries(): VizConfigBuilder<Options$g, FieldConfig$7>;
2612
- trend(): VizConfigBuilder<{}, {}>;
2613
- traces(): VizConfigBuilder<Options$h, FieldConfig$8>;
2614
- xychart(): VizConfigBuilder<Options$i, {}>;
2615
- };
2616
-
2617
2507
  declare const sceneUtils: {
2618
2508
  getUrlWithAppState: typeof getUrlWithAppState;
2619
2509
  registerRuntimePanelPlugin: typeof registerRuntimePanelPlugin;
@@ -2633,4 +2523,4 @@ declare const sceneUtils: {
2633
2523
  isGroupByVariable: typeof isGroupByVariable;
2634
2524
  };
2635
2525
 
2636
- export { AdHocFiltersVariable, CancelActivationHandler, ConstantVariable, ControlsLayout, CustomFormatterVariable, CustomTransformOperator, CustomTransformerDefinition, CustomVariable, CustomVariableValue, DataLayerFilter, DataRequestEnricher, DataSourceVariable, DeepPartial, EmbeddedScene, EmbeddedSceneState, ExtraQueryDataProcessor, ExtraQueryDescriptor, ExtraQueryProvider, FieldConfigBuilder, FieldConfigBuilders, FieldConfigOverridesBuilder, FormatVariable, GroupByVariable, InterpolationFormatParameter, IntervalVariable, LocalValueVariable, MacroVariableConstructor, MultiValueVariable, NestedScene, PanelBuilders, PanelOptionsBuilders, QueryRunnerState, QueryVariable, RuntimeDataSource, SceneActivationHandler, SceneApp, SceneAppDrilldownView, SceneAppPage, SceneAppPageLike, SceneAppPageState, SceneAppRoute, SceneByFrameRepeater, SceneByVariableRepeater, SceneCSSGridItem, SceneCSSGridLayout, SceneCanvasText, SceneComponent, SceneComponentProps, SceneControlsSpacer, SceneDataLayerBase, SceneDataLayerControls, SceneDataLayerProvider, SceneDataLayerProviderState, SceneDataLayerSet, SceneDataLayerSetBase, SceneDataNode, SceneDataProvider, SceneDataProviderResult, SceneDataQuery, SceneDataState, SceneDataTransformer, SceneDeactivationHandler, SceneDebugger, SceneFlexItem, SceneFlexItemLike, SceneFlexItemState, SceneFlexLayout, SceneGridItem, SceneGridItemLike, SceneGridItemStateLike, SceneGridLayout, SceneGridRow, SceneLayout, SceneLayoutChildOptions, SceneLayoutState, SceneObject, SceneObjectBase, SceneObjectRef, SceneObjectState, SceneObjectStateChangedEvent, SceneObjectStateChangedPayload, SceneObjectUrlSyncConfig, SceneObjectUrlSyncHandler, SceneObjectUrlValue, SceneObjectUrlValues, SceneObjectWithUrlSync, SceneQueryControllerEntry, SceneQueryControllerEntryType, SceneQueryControllerLike, SceneQueryRunner, SceneReactObject, SceneRefreshPicker, SceneRefreshPickerState, SceneRouteMatch, SceneStateChangedHandler, SceneStatelessBehavior, SceneTimePicker, SceneTimeRange, SceneTimeRangeCompare, SceneTimeRangeLike, SceneTimeRangeState, SceneTimeRangeTransformerBase, SceneTimeZoneOverride, SceneToolbarButton, SceneToolbarInput, SceneVariable, SceneVariableDependencyConfigLike, SceneVariableSet, SceneVariableSetState, SceneVariableState, SceneVariableValueChangedEvent, SceneVariables, SplitLayout, TestVariable, TextBoxVariable, UrlSyncManager, UrlSyncManagerLike, UseStateHookOptions, UserActionEvent, ValidateAndUpdateResult, VariableCustomFormatterFn, VariableDependencyConfig, VariableValue, VariableValueControl, VariableValueOption, VariableValueSelectWrapper, VariableValueSelectors, VariableValueSingle, VizConfig, VizConfigBuilder, VizConfigBuilders, VizPanel, VizPanelBuilder, VizPanelMenu, VizPanelState, index$1 as behaviors, index as dataLayers, formatRegistry, getUrlSyncManager, isCustomVariableValue, isDataLayer, isDataRequestEnricher, isSceneObject, registerQueryWithController, registerRuntimeDataSource, sceneGraph, sceneUtils, useSceneApp, useSceneObjectState };
2526
+ export { AdHocFiltersVariable, CancelActivationHandler, ConstantVariable, ControlsLayout, CustomFormatterVariable, CustomTransformOperator, CustomTransformerDefinition, CustomVariable, CustomVariableValue, DataLayerFilter, DataRequestEnricher, DataSourceVariable, DeepPartial, EmbeddedScene, EmbeddedSceneState, FieldConfigBuilders, FieldConfigOverridesBuilder, FormatVariable, GroupByVariable, InterpolationFormatParameter, IntervalVariable, LocalValueVariable, MacroVariableConstructor, MultiValueVariable, NestedScene, PanelBuilders, PanelOptionsBuilders, QueryRunnerState, QueryVariable, RuntimeDataSource, SceneActivationHandler, SceneApp, SceneAppDrilldownView, SceneAppPage, SceneAppPageLike, SceneAppPageState, SceneAppRoute, SceneByFrameRepeater, SceneByVariableRepeater, SceneCSSGridItem, SceneCSSGridLayout, SceneCanvasText, SceneComponent, SceneComponentProps, SceneControlsSpacer, SceneDataLayerBase, SceneDataLayerControls, SceneDataLayerProvider, SceneDataLayerProviderState, SceneDataLayerSet, SceneDataLayerSetBase, SceneDataNode, SceneDataProvider, SceneDataProviderResult, SceneDataState, SceneDataTransformer, SceneDeactivationHandler, SceneDebugger, SceneFlexItem, SceneFlexItemLike, SceneFlexItemState, SceneFlexLayout, SceneGridItem, SceneGridItemLike, SceneGridItemStateLike, SceneGridLayout, SceneGridRow, SceneLayout, SceneLayoutChildOptions, SceneLayoutState, SceneObject, SceneObjectBase, SceneObjectRef, SceneObjectState, SceneObjectStateChangedEvent, SceneObjectStateChangedPayload, SceneObjectUrlSyncConfig, SceneObjectUrlSyncHandler, SceneObjectUrlValue, SceneObjectUrlValues, SceneObjectWithUrlSync, SceneQueryControllerEntry, SceneQueryControllerEntryType, SceneQueryControllerLike, SceneQueryRunner, SceneReactObject, SceneRefreshPicker, SceneRouteMatch, SceneStateChangedHandler, SceneStatelessBehavior, SceneTimePicker, SceneTimeRange, SceneTimeRangeCompare, SceneTimeRangeLike, SceneTimeRangeState, SceneTimeRangeTransformerBase, SceneTimeZoneOverride, SceneToolbarButton, SceneToolbarInput, SceneVariable, SceneVariableDependencyConfigLike, SceneVariableSet, SceneVariableSetState, SceneVariableState, SceneVariableValueChangedEvent, SceneVariables, SplitLayout, TestVariable, TextBoxVariable, UrlSyncManager, UrlSyncManagerLike, UseStateHookOptions, UserActionEvent, ValidateAndUpdateResult, VariableCustomFormatterFn, VariableDependencyConfig, VariableValue, VariableValueControl, VariableValueOption, VariableValueSelectors, VariableValueSingle, VizPanel, VizPanelBuilder, VizPanelMenu, VizPanelState, index$1 as behaviors, index as dataLayers, formatRegistry, getUrlSyncManager, isCustomVariableValue, isDataLayer, isDataRequestEnricher, isSceneObject, registerQueryWithController, registerRuntimeDataSource, sceneGraph, sceneUtils, useSceneApp, useSceneObjectState };