@grafana/scenes 5.26.0--canary.912.11978949363.0 → 5.26.0
Sign up to get free protection for your applications and to get access to all the features.
- package/CHANGELOG.md +12 -0
- package/dist/esm/core/PanelBuilders/VizPanelBuilder.js +0 -32
- package/dist/esm/core/PanelBuilders/VizPanelBuilder.js.map +1 -1
- package/dist/esm/core/sceneGraph/index.js +2 -3
- package/dist/esm/core/sceneGraph/index.js.map +1 -1
- package/dist/esm/core/sceneGraph/sceneGraph.js +1 -8
- package/dist/esm/core/sceneGraph/sceneGraph.js.map +1 -1
- package/dist/esm/index.js +0 -1
- package/dist/esm/index.js.map +1 -1
- package/dist/esm/variables/groupby/GroupByVariable.js +11 -2
- package/dist/esm/variables/groupby/GroupByVariable.js.map +1 -1
- package/dist/index.d.ts +1 -38
- package/dist/index.js +37 -148
- package/dist/index.js.map +1 -1
- package/package.json +2 -2
- package/dist/esm/components/LimitSeriesTitleItem.js +0 -93
- package/dist/esm/components/LimitSeriesTitleItem.js.map +0 -1
package/dist/index.js
CHANGED
@@ -2991,7 +2991,16 @@ class GroupByVariable extends MultiValueVariable {
|
|
2991
2991
|
}
|
2992
2992
|
GroupByVariable.Component = GroupByVariableRenderer;
|
2993
2993
|
function GroupByVariableRenderer({ model }) {
|
2994
|
-
const {
|
2994
|
+
const {
|
2995
|
+
value,
|
2996
|
+
text,
|
2997
|
+
key,
|
2998
|
+
maxVisibleValues,
|
2999
|
+
noValueOnClear,
|
3000
|
+
options,
|
3001
|
+
includeAll,
|
3002
|
+
allowCustomValue = true
|
3003
|
+
} = model.useState();
|
2995
3004
|
const values = React.useMemo(() => {
|
2996
3005
|
const arrayValue = lodash.isArray(value) ? value : [value];
|
2997
3006
|
const arrayText = lodash.isArray(text) ? text : [text];
|
@@ -3034,7 +3043,7 @@ function GroupByVariableRenderer({ model }) {
|
|
3034
3043
|
id: key,
|
3035
3044
|
placeholder: "Select value",
|
3036
3045
|
width: "auto",
|
3037
|
-
allowCustomValue
|
3046
|
+
allowCustomValue,
|
3038
3047
|
inputValue,
|
3039
3048
|
value: uncommittedValue,
|
3040
3049
|
noMultiValueWrap: true,
|
@@ -3101,7 +3110,7 @@ function LoadingIndicator(props) {
|
|
3101
3110
|
}
|
3102
3111
|
|
3103
3112
|
function ControlsLabel(props) {
|
3104
|
-
const styles = ui.useStyles2(getStyles$
|
3113
|
+
const styles = ui.useStyles2(getStyles$f);
|
3105
3114
|
const theme = ui.useTheme2();
|
3106
3115
|
const isVertical = props.layout === "vertical";
|
3107
3116
|
const loadingIndicator = Boolean(props.isLoading) ? /* @__PURE__ */ React__default["default"].createElement("div", {
|
@@ -3164,7 +3173,7 @@ function ControlsLabel(props) {
|
|
3164
3173
|
}
|
3165
3174
|
return labelElement;
|
3166
3175
|
}
|
3167
|
-
const getStyles$
|
3176
|
+
const getStyles$f = (theme) => ({
|
3168
3177
|
horizontalLabel: css.css({
|
3169
3178
|
background: theme.isDark ? theme.colors.background.primary : theme.colors.background.secondary,
|
3170
3179
|
display: `flex`,
|
@@ -3233,7 +3242,7 @@ function keyLabelToOption(key, label) {
|
|
3233
3242
|
const filterNoOp = () => true;
|
3234
3243
|
function AdHocFilterRenderer({ filter, model }) {
|
3235
3244
|
var _a, _b, _c, _d, _e;
|
3236
|
-
const styles = ui.useStyles2(getStyles$
|
3245
|
+
const styles = ui.useStyles2(getStyles$e);
|
3237
3246
|
const [keys, setKeys] = React.useState([]);
|
3238
3247
|
const [values, setValues] = React.useState([]);
|
3239
3248
|
const [isKeysLoading, setIsKeysLoading] = React.useState(false);
|
@@ -3436,7 +3445,7 @@ function AdHocFilterRenderer({ filter, model }) {
|
|
3436
3445
|
onClick: () => model._removeFilter(filter)
|
3437
3446
|
}));
|
3438
3447
|
}
|
3439
|
-
const getStyles$
|
3448
|
+
const getStyles$e = (theme) => ({
|
3440
3449
|
field: css.css({
|
3441
3450
|
marginBottom: 0
|
3442
3451
|
}),
|
@@ -3619,7 +3628,7 @@ var __objRest$3 = (source, exclude) => {
|
|
3619
3628
|
const DropdownItem = React.forwardRef(
|
3620
3629
|
function DropdownItem2(_a, ref) {
|
3621
3630
|
var _b = _a, { children, active, addGroupBottomBorder, isMultiValueEdit, checked } = _b, rest = __objRest$3(_b, ["children", "active", "addGroupBottomBorder", "isMultiValueEdit", "checked"]);
|
3622
|
-
const styles = ui.useStyles2(getStyles$
|
3631
|
+
const styles = ui.useStyles2(getStyles$d);
|
3623
3632
|
const id = React.useId();
|
3624
3633
|
return /* @__PURE__ */ React__default["default"].createElement("div", __spreadValues$C({
|
3625
3634
|
ref,
|
@@ -3637,7 +3646,7 @@ const DropdownItem = React.forwardRef(
|
|
3637
3646
|
}) : null, children)));
|
3638
3647
|
}
|
3639
3648
|
);
|
3640
|
-
const getStyles$
|
3649
|
+
const getStyles$d = (theme) => ({
|
3641
3650
|
option: css.css({
|
3642
3651
|
label: "grafana-select-option",
|
3643
3652
|
top: 0,
|
@@ -3708,7 +3717,7 @@ const OptionsErrorPlaceholder = ({ handleFetchOptions }) => {
|
|
3708
3717
|
}, "An error has occurred fetching labels. Click to retry");
|
3709
3718
|
};
|
3710
3719
|
const MultiValueApplyButton = ({ onApply, floatingElement, maxOptionWidth, menuHeight }) => {
|
3711
|
-
const styles = ui.useStyles2(getStyles$
|
3720
|
+
const styles = ui.useStyles2(getStyles$d);
|
3712
3721
|
const floatingElementRect = floatingElement == null ? void 0 : floatingElement.getBoundingClientRect();
|
3713
3722
|
return /* @__PURE__ */ React__default["default"].createElement("div", {
|
3714
3723
|
className: styles.multiValueApplyWrapper,
|
@@ -3954,7 +3963,7 @@ const MultiValuePill = ({
|
|
3954
3963
|
handleEditMultiValuePill
|
3955
3964
|
}) => {
|
3956
3965
|
var _a, _b;
|
3957
|
-
const styles = ui.useStyles2(getStyles$
|
3966
|
+
const styles = ui.useStyles2(getStyles$c);
|
3958
3967
|
const editMultiValuePill = React.useCallback(
|
3959
3968
|
(e) => {
|
3960
3969
|
e.stopPropagation();
|
@@ -4007,7 +4016,7 @@ const MultiValuePill = ({
|
|
4007
4016
|
id: `${item.value}-${index}-close-icon`
|
4008
4017
|
})));
|
4009
4018
|
};
|
4010
|
-
const getStyles$
|
4019
|
+
const getStyles$c = (theme) => ({
|
4011
4020
|
basePill: css.css(__spreadProps$p(__spreadValues$B({
|
4012
4021
|
display: "flex",
|
4013
4022
|
alignItems: "center",
|
@@ -4064,7 +4073,7 @@ const AdHocCombobox = React.forwardRef(function AdHocCombobox2({ filter, model,
|
|
4064
4073
|
const [inputValue, setInputValue] = React.useState("");
|
4065
4074
|
const [activeIndex, setActiveIndex] = React.useState(null);
|
4066
4075
|
const [filterInputType, setInputType] = React.useState(!isAlwaysWip ? "value" : "key");
|
4067
|
-
const styles = ui.useStyles2(getStyles$
|
4076
|
+
const styles = ui.useStyles2(getStyles$b);
|
4068
4077
|
const [filterMultiValues, setFilterMultiValues] = React.useState([]);
|
4069
4078
|
const [_, setForceRefresh] = React.useState({});
|
4070
4079
|
const allowCustomValue = (_a = model.state.allowCustomValue) != null ? _a : true;
|
@@ -4568,7 +4577,7 @@ const AdHocCombobox = React.forwardRef(function AdHocCombobox2({ filter, model,
|
|
4568
4577
|
menuHeight: Math.min(rowVirtualizer.getTotalSize(), MAX_MENU_HEIGHT)
|
4569
4578
|
}) : null))));
|
4570
4579
|
});
|
4571
|
-
const getStyles$
|
4580
|
+
const getStyles$b = (theme) => ({
|
4572
4581
|
comboboxWrapper: css.css({
|
4573
4582
|
display: "flex",
|
4574
4583
|
flexWrap: "wrap"
|
@@ -4659,7 +4668,7 @@ var __spreadValues$z = (a, b) => {
|
|
4659
4668
|
var __spreadProps$n = (a, b) => __defProps$n(a, __getOwnPropDescs$n(b));
|
4660
4669
|
function AdHocFilterPill({ filter, model, readOnly, focusOnWipInputRef }) {
|
4661
4670
|
var _a, _b, _c;
|
4662
|
-
const styles = ui.useStyles2(getStyles$
|
4671
|
+
const styles = ui.useStyles2(getStyles$a);
|
4663
4672
|
const [viewMode, setViewMode] = React.useState(true);
|
4664
4673
|
const [shouldFocusOnPillWrapper, setShouldFocusOnPillWrapper] = React.useState(false);
|
4665
4674
|
const pillWrapperRef = React.useRef(null);
|
@@ -4749,7 +4758,7 @@ function AdHocFilterPill({ filter, model, readOnly, focusOnWipInputRef }) {
|
|
4749
4758
|
populateInputOnEdit
|
4750
4759
|
});
|
4751
4760
|
}
|
4752
|
-
const getStyles$
|
4761
|
+
const getStyles$a = (theme) => ({
|
4753
4762
|
combinedFilterPill: css.css(__spreadProps$n(__spreadValues$z({
|
4754
4763
|
display: "flex",
|
4755
4764
|
alignItems: "center",
|
@@ -4810,7 +4819,7 @@ const AdHocFiltersAlwaysWipCombobox = React.forwardRef(function AdHocFiltersAlwa
|
|
4810
4819
|
|
4811
4820
|
const AdHocFiltersComboboxRenderer = React.memo(function AdHocFiltersComboboxRenderer2({ model }) {
|
4812
4821
|
const { filters, readOnly } = model.useState();
|
4813
|
-
const styles = ui.useStyles2(getStyles$
|
4822
|
+
const styles = ui.useStyles2(getStyles$9);
|
4814
4823
|
const focusOnWipInputRef = React.useRef();
|
4815
4824
|
return /* @__PURE__ */ React__default["default"].createElement("div", {
|
4816
4825
|
className: css.cx(styles.comboboxWrapper, { [styles.comboboxFocusOutline]: !readOnly }),
|
@@ -4833,7 +4842,7 @@ const AdHocFiltersComboboxRenderer = React.memo(function AdHocFiltersComboboxRen
|
|
4833
4842
|
ref: focusOnWipInputRef
|
4834
4843
|
}) : null);
|
4835
4844
|
});
|
4836
|
-
const getStyles$
|
4845
|
+
const getStyles$9 = (theme) => ({
|
4837
4846
|
comboboxWrapper: css.css({
|
4838
4847
|
display: "flex",
|
4839
4848
|
flexWrap: "wrap",
|
@@ -5086,7 +5095,7 @@ function renderExpression(builder, filters) {
|
|
5086
5095
|
}
|
5087
5096
|
function AdHocFiltersVariableRenderer({ model }) {
|
5088
5097
|
const { filters, readOnly, addFilterButtonText } = model.useState();
|
5089
|
-
const styles = ui.useStyles2(getStyles$
|
5098
|
+
const styles = ui.useStyles2(getStyles$8);
|
5090
5099
|
if (model.state.layout === "combobox") {
|
5091
5100
|
return /* @__PURE__ */ React__default["default"].createElement(AdHocFiltersComboboxRenderer, {
|
5092
5101
|
model
|
@@ -5105,7 +5114,7 @@ function AdHocFiltersVariableRenderer({ model }) {
|
|
5105
5114
|
addFilterButtonText
|
5106
5115
|
}));
|
5107
5116
|
}
|
5108
|
-
const getStyles$
|
5117
|
+
const getStyles$8 = (theme) => ({
|
5109
5118
|
wrapper: css.css({
|
5110
5119
|
display: "flex",
|
5111
5120
|
flexWrap: "wrap",
|
@@ -6536,13 +6545,6 @@ function findAllObjects(scene, check) {
|
|
6536
6545
|
});
|
6537
6546
|
return found;
|
6538
6547
|
}
|
6539
|
-
function findDescendent(scene, descendentType) {
|
6540
|
-
function isDescendentType(scene2) {
|
6541
|
-
return scene2 instanceof descendentType;
|
6542
|
-
}
|
6543
|
-
const targetScenes = findAllObjects(scene, isDescendentType);
|
6544
|
-
return targetScenes.find(isDescendentType);
|
6545
|
-
}
|
6546
6548
|
function getDataLayers(sceneObject, localOnly = false) {
|
6547
6549
|
let currentLevel = sceneObject;
|
6548
6550
|
let collected = [];
|
@@ -6627,8 +6629,7 @@ const sceneGraph = {
|
|
6627
6629
|
getAncestor,
|
6628
6630
|
findDescendents,
|
6629
6631
|
getQueryController,
|
6630
|
-
getUrlSyncManager
|
6631
|
-
findDescendent
|
6632
|
+
getUrlSyncManager
|
6632
6633
|
};
|
6633
6634
|
|
6634
6635
|
class UniqueUrlKeyMapper {
|
@@ -9842,7 +9843,7 @@ class EmbeddedScene extends SceneObjectBase {
|
|
9842
9843
|
EmbeddedScene.Component = EmbeddedSceneRenderer;
|
9843
9844
|
function EmbeddedSceneRenderer({ model }) {
|
9844
9845
|
const { body, controls } = model.useState();
|
9845
|
-
const styles = ui.useStyles2(getStyles$
|
9846
|
+
const styles = ui.useStyles2(getStyles$7);
|
9846
9847
|
return /* @__PURE__ */ React__default["default"].createElement("div", {
|
9847
9848
|
className: styles.container
|
9848
9849
|
}, controls && /* @__PURE__ */ React__default["default"].createElement("div", {
|
@@ -9856,7 +9857,7 @@ function EmbeddedSceneRenderer({ model }) {
|
|
9856
9857
|
model: body
|
9857
9858
|
})));
|
9858
9859
|
}
|
9859
|
-
const getStyles$
|
9860
|
+
const getStyles$7 = (theme) => {
|
9860
9861
|
return {
|
9861
9862
|
container: css.css({
|
9862
9863
|
flexGrow: 1,
|
@@ -10073,7 +10074,7 @@ const LazyLoader = React__default["default"].forwardRef(
|
|
10073
10074
|
(_a, ref) => {
|
10074
10075
|
var _b = _a, { children, onLoad, onChange, className } = _b, rest = __objRest$1(_b, ["children", "onLoad", "onChange", "className"]);
|
10075
10076
|
const id = useUniqueId();
|
10076
|
-
const { hideEmpty } = ui.useStyles2(getStyles$
|
10077
|
+
const { hideEmpty } = ui.useStyles2(getStyles$6);
|
10077
10078
|
const [loaded, setLoaded] = React.useState(false);
|
10078
10079
|
const [isInView, setIsInView] = React.useState(false);
|
10079
10080
|
const innerRef = React.useRef(null);
|
@@ -10107,7 +10108,7 @@ const LazyLoader = React__default["default"].forwardRef(
|
|
10107
10108
|
}, rest), loaded && (typeof children === "function" ? children({ isInView }) : children));
|
10108
10109
|
}
|
10109
10110
|
);
|
10110
|
-
function getStyles$
|
10111
|
+
function getStyles$6() {
|
10111
10112
|
return {
|
10112
10113
|
hideEmpty: css.css({
|
10113
10114
|
"&:empty": {
|
@@ -10804,7 +10805,7 @@ NestedScene.Component = NestedSceneRenderer;
|
|
10804
10805
|
function NestedSceneRenderer({ model }) {
|
10805
10806
|
const { title, isCollapsed, canCollapse, canRemove, body, controls } = model.useState();
|
10806
10807
|
const gridRow = ui.useStyles2(getSceneGridRowStyles);
|
10807
|
-
const styles = ui.useStyles2(getStyles$
|
10808
|
+
const styles = ui.useStyles2(getStyles$5);
|
10808
10809
|
const toolbarControls = (controls != null ? controls : []).map((action) => /* @__PURE__ */ React__default["default"].createElement(action.Component, {
|
10809
10810
|
key: action.state.key,
|
10810
10811
|
model: action
|
@@ -10839,7 +10840,7 @@ function NestedSceneRenderer({ model }) {
|
|
10839
10840
|
model: body
|
10840
10841
|
}));
|
10841
10842
|
}
|
10842
|
-
const getStyles$
|
10843
|
+
const getStyles$5 = (theme) => ({
|
10843
10844
|
wrapper: css.css({
|
10844
10845
|
display: "flex",
|
10845
10846
|
flexDirection: "column",
|
@@ -11417,7 +11418,7 @@ const timeShiftAlignmentProcessor = (primary, secondary) => {
|
|
11417
11418
|
};
|
11418
11419
|
function SceneTimeRangeCompareRenderer({ model }) {
|
11419
11420
|
var _a;
|
11420
|
-
const styles = ui.useStyles2(getStyles$
|
11421
|
+
const styles = ui.useStyles2(getStyles$4);
|
11421
11422
|
const { compareWith, compareOptions } = model.useState();
|
11422
11423
|
const [previousCompare, setPreviousCompare] = React__default["default"].useState(compareWith);
|
11423
11424
|
const previousValue = (_a = compareOptions.find(({ value: value2 }) => value2 === previousCompare)) != null ? _a : PREVIOUS_PERIOD_COMPARE_OPTION;
|
@@ -11457,7 +11458,7 @@ function SceneTimeRangeCompareRenderer({ model }) {
|
|
11457
11458
|
isOpen: false
|
11458
11459
|
}, previousValue.label));
|
11459
11460
|
}
|
11460
|
-
function getStyles$
|
11461
|
+
function getStyles$4(theme) {
|
11461
11462
|
return {
|
11462
11463
|
previewButton: css.css({
|
11463
11464
|
"&:disabled": {
|
@@ -11565,87 +11566,6 @@ SceneControlsSpacer.Component = (_props) => {
|
|
11565
11566
|
});
|
11566
11567
|
};
|
11567
11568
|
|
11568
|
-
class TimeSeriesLimitSeriesTitleItemScene extends SceneObjectBase {
|
11569
|
-
constructor(state) {
|
11570
|
-
super(state);
|
11571
|
-
this.addActivationHandler(this.onActivate.bind(this));
|
11572
|
-
}
|
11573
|
-
onActivate() {
|
11574
|
-
const panel = sceneGraph.getAncestor(this, VizPanel);
|
11575
|
-
const $transformedData = sceneGraph.getData(panel);
|
11576
|
-
const untransformedQueryRunner = sceneGraph.findDescendent(panel, SceneQueryRunner);
|
11577
|
-
this._subs.add(
|
11578
|
-
$transformedData.subscribeToState((transformedDataState) => {
|
11579
|
-
var _a, _b, _c;
|
11580
|
-
if (untransformedQueryRunner && ((_a = untransformedQueryRunner.state.data) == null ? void 0 : _a.series.length) !== this.state.currentSeriesCount) {
|
11581
|
-
this.setState({
|
11582
|
-
currentSeriesCount: (_b = transformedDataState.data) == null ? void 0 : _b.series.length,
|
11583
|
-
totalSeriesCount: (_c = untransformedQueryRunner.state.data) == null ? void 0 : _c.series.length
|
11584
|
-
});
|
11585
|
-
}
|
11586
|
-
})
|
11587
|
-
);
|
11588
|
-
}
|
11589
|
-
showAllSeries() {
|
11590
|
-
const $data = sceneGraph.getData(this);
|
11591
|
-
if ($data instanceof SceneDataTransformer) {
|
11592
|
-
$data.setState({
|
11593
|
-
transformations: []
|
11594
|
-
});
|
11595
|
-
this.setState({
|
11596
|
-
showAllSeries: true
|
11597
|
-
});
|
11598
|
-
$data.reprocessTransformations();
|
11599
|
-
}
|
11600
|
-
}
|
11601
|
-
}
|
11602
|
-
TimeSeriesLimitSeriesTitleItemScene.Component = ({ model }) => {
|
11603
|
-
const { showAllSeries, currentSeriesCount, seriesLimit, totalSeriesCount } = model.useState();
|
11604
|
-
const styles = ui.useStyles2(getStyles$4);
|
11605
|
-
if (totalSeriesCount === void 0 || showAllSeries || !currentSeriesCount || totalSeriesCount < seriesLimit) {
|
11606
|
-
return null;
|
11607
|
-
}
|
11608
|
-
return /* @__PURE__ */ React__default["default"].createElement("div", {
|
11609
|
-
className: styles.timeSeriesDisclaimer
|
11610
|
-
}, /* @__PURE__ */ React__default["default"].createElement("span", {
|
11611
|
-
className: styles.warningMessage
|
11612
|
-
}, /* @__PURE__ */ React__default["default"].createElement(React__default["default"].Fragment, null, /* @__PURE__ */ React__default["default"].createElement(ui.Icon, {
|
11613
|
-
title: `Showing only ${model.state.seriesLimit} series`,
|
11614
|
-
name: "exclamation-triangle",
|
11615
|
-
"aria-hidden": "true"
|
11616
|
-
}))), /* @__PURE__ */ React__default["default"].createElement(ui.Tooltip, {
|
11617
|
-
content: "Rendering too many series in a single panel may impact performance and make data harder to read."
|
11618
|
-
}, /* @__PURE__ */ React__default["default"].createElement(ui.Button, {
|
11619
|
-
variant: "secondary",
|
11620
|
-
size: "sm",
|
11621
|
-
onClick: () => model.showAllSeries()
|
11622
|
-
}, /* @__PURE__ */ React__default["default"].createElement(React__default["default"].Fragment, null, "Show all ", totalSeriesCount))));
|
11623
|
-
};
|
11624
|
-
function limitFramesTransformation(limit) {
|
11625
|
-
return (source) => {
|
11626
|
-
return source.pipe(
|
11627
|
-
rxjs.map((frames) => {
|
11628
|
-
return frames.slice(0, limit);
|
11629
|
-
})
|
11630
|
-
);
|
11631
|
-
};
|
11632
|
-
}
|
11633
|
-
const getStyles$4 = (theme) => ({
|
11634
|
-
timeSeriesDisclaimer: css.css({
|
11635
|
-
label: "time-series-disclaimer",
|
11636
|
-
display: "flex",
|
11637
|
-
alignItems: "center",
|
11638
|
-
gap: theme.spacing(1)
|
11639
|
-
}),
|
11640
|
-
warningMessage: css.css({
|
11641
|
-
display: "flex",
|
11642
|
-
alignItems: "center",
|
11643
|
-
gap: theme.spacing(0.5),
|
11644
|
-
color: theme.colors.warning.main,
|
11645
|
-
fontSize: theme.typography.bodySmall.fontSize
|
11646
|
-
})
|
11647
|
-
});
|
11648
|
-
|
11649
11569
|
class SceneFlexLayout extends SceneObjectBase {
|
11650
11570
|
toggleDirection() {
|
11651
11571
|
this.setState({
|
@@ -13096,10 +13016,6 @@ class VizPanelBuilder {
|
|
13096
13016
|
this._state.title = title;
|
13097
13017
|
return this;
|
13098
13018
|
}
|
13099
|
-
setTitleItems(titleItems) {
|
13100
|
-
this._state.titleItems = titleItems;
|
13101
|
-
return this;
|
13102
|
-
}
|
13103
13019
|
setDescription(description) {
|
13104
13020
|
this._state.description = description;
|
13105
13021
|
return this;
|
@@ -13197,38 +13113,12 @@ class VizPanelBuilder {
|
|
13197
13113
|
return this;
|
13198
13114
|
}
|
13199
13115
|
build() {
|
13200
|
-
this.limitPanelSeries();
|
13201
13116
|
const panel = new VizPanel(__spreadProps(__spreadValues({}, this._state), {
|
13202
13117
|
options: this._panelOptionsBuilder.build(),
|
13203
13118
|
fieldConfig: this._fieldConfigBuilder.build()
|
13204
13119
|
}));
|
13205
13120
|
return panel;
|
13206
13121
|
}
|
13207
|
-
limitPanelSeries() {
|
13208
|
-
if (this._state.$data) {
|
13209
|
-
const limitSeriesTitleItem = this.getLimitSeriesTitleItem();
|
13210
|
-
if (limitSeriesTitleItem && limitSeriesTitleItem.state.seriesLimit) {
|
13211
|
-
this.setData(new SceneDataTransformer({
|
13212
|
-
$data: this._state.$data,
|
13213
|
-
transformations: [() => limitFramesTransformation(limitSeriesTitleItem.state.seriesLimit)]
|
13214
|
-
}));
|
13215
|
-
}
|
13216
|
-
}
|
13217
|
-
}
|
13218
|
-
getLimitSeriesTitleItem() {
|
13219
|
-
if (this._state.titleItems) {
|
13220
|
-
if (Array.isArray(this._state.titleItems)) {
|
13221
|
-
for (const titleItem of this._state.titleItems) {
|
13222
|
-
if (titleItem instanceof TimeSeriesLimitSeriesTitleItemScene) {
|
13223
|
-
return titleItem;
|
13224
|
-
}
|
13225
|
-
}
|
13226
|
-
} else if (this._state.titleItems instanceof TimeSeriesLimitSeriesTitleItemScene) {
|
13227
|
-
return this._state.titleItems;
|
13228
|
-
}
|
13229
|
-
}
|
13230
|
-
return void 0;
|
13231
|
-
}
|
13232
13122
|
}
|
13233
13123
|
|
13234
13124
|
const PanelOptionsBuilders = {
|
@@ -13705,7 +13595,6 @@ exports.SceneVariableValueChangedEvent = SceneVariableValueChangedEvent;
|
|
13705
13595
|
exports.SplitLayout = SplitLayout;
|
13706
13596
|
exports.TestVariable = TestVariable;
|
13707
13597
|
exports.TextBoxVariable = TextBoxVariable;
|
13708
|
-
exports.TimeSeriesLimitSeriesTitleItemScene = TimeSeriesLimitSeriesTitleItemScene;
|
13709
13598
|
exports.UrlSyncContextProvider = UrlSyncContextProvider;
|
13710
13599
|
exports.UrlSyncManager = UrlSyncManager;
|
13711
13600
|
exports.UserActionEvent = UserActionEvent;
|