@grafana/scenes 6.37.0--canary.1250.17837997062.0 → 6.37.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +12 -0
- package/dist/esm/components/SceneTimePicker.js +19 -3
- package/dist/esm/components/SceneTimePicker.js.map +1 -1
- package/dist/esm/locales/en-US/grafana-scenes.json.js +4 -0
- package/dist/esm/locales/en-US/grafana-scenes.json.js.map +1 -1
- package/dist/esm/variables/adhoc/AdHocFilterRenderer.js +1 -4
- package/dist/esm/variables/adhoc/AdHocFilterRenderer.js.map +1 -1
- package/dist/esm/variables/adhoc/AdHocFiltersCombobox/AdHocFiltersCombobox.js +6 -15
- package/dist/esm/variables/adhoc/AdHocFiltersCombobox/AdHocFiltersCombobox.js.map +1 -1
- package/dist/{grafana-scenes-C_CT7peT.js → grafana-scenes-Bnbq8XI2.js} +5 -1
- package/dist/{grafana-scenes-C_CT7peT.js.map → grafana-scenes-Bnbq8XI2.js.map} +1 -1
- package/dist/index.js +23 -20
- package/dist/index.js.map +1 -1
- package/package.json +2 -2
|
@@ -42,6 +42,10 @@ var grafanaScenes = {
|
|
|
42
42
|
splitter: {
|
|
43
43
|
"aria-label-pane-resize-widget": "Pane resize widget"
|
|
44
44
|
},
|
|
45
|
+
"time-picker": {
|
|
46
|
+
"move-backward-tooltip": "Move {{moveBackwardDuration}} backward",
|
|
47
|
+
"move-forward-tooltip": "Move {{moveForwardDuration}} forward"
|
|
48
|
+
},
|
|
45
49
|
"viz-panel": {
|
|
46
50
|
title: {
|
|
47
51
|
title: "Title"
|
|
@@ -154,4 +158,4 @@ var grafanaScenes = {
|
|
|
154
158
|
};
|
|
155
159
|
|
|
156
160
|
exports.default = grafanaScenes;
|
|
157
|
-
//# sourceMappingURL=grafana-scenes-
|
|
161
|
+
//# sourceMappingURL=grafana-scenes-Bnbq8XI2.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"grafana-scenes-
|
|
1
|
+
{"version":3,"file":"grafana-scenes-Bnbq8XI2.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
package/dist/index.js
CHANGED
|
@@ -4273,13 +4273,11 @@ function AdHocFilterRenderer({ filter, model }) {
|
|
|
4273
4273
|
});
|
|
4274
4274
|
}
|
|
4275
4275
|
};
|
|
4276
|
-
const operatorDefinition = OPERATORS.find((op) => filter.operator === op.value);
|
|
4277
4276
|
const valueSelect = /* @__PURE__ */ React__default.default.createElement(
|
|
4278
4277
|
ui.Select,
|
|
4279
4278
|
{
|
|
4280
4279
|
virtualized: true,
|
|
4281
4280
|
allowCustomValue: (_b = model.state.allowCustomValue) != null ? _b : true,
|
|
4282
|
-
createOptionPosition: (operatorDefinition == null ? void 0 : operatorDefinition.isRegex) ? "first" : "last",
|
|
4283
4281
|
isValidNewOption: (inputValue) => inputValue.trim().length > 0,
|
|
4284
4282
|
allowCreateWhileLoading: true,
|
|
4285
4283
|
formatCreateLabel: (inputValue) => `Use custom value: ${inputValue}`,
|
|
@@ -4337,7 +4335,6 @@ function AdHocFilterRenderer({ filter, model }) {
|
|
|
4337
4335
|
className: css.cx(styles.key, isKeysOpen ? styles.widthWhenOpen : void 0),
|
|
4338
4336
|
width: "auto",
|
|
4339
4337
|
allowCustomValue: (_c = model.state.allowCustomValue) != null ? _c : true,
|
|
4340
|
-
createOptionPosition: (operatorDefinition == null ? void 0 : operatorDefinition.isRegex) ? "first" : "last",
|
|
4341
4338
|
value: keyValue,
|
|
4342
4339
|
placeholder: i18n.t(
|
|
4343
4340
|
"grafana-scenes.variables.ad-hoc-filter-renderer.key-select.placeholder-select-label",
|
|
@@ -5173,20 +5170,11 @@ const AdHocCombobox = React.forwardRef(function AdHocCombobox2({ filter, model,
|
|
|
5173
5170
|
handleOptionGroups(optionsSearcher(preventFiltering ? "" : inputValue))
|
|
5174
5171
|
);
|
|
5175
5172
|
if (allowCustomValue && filterInputType !== "operator" && inputValue) {
|
|
5176
|
-
|
|
5177
|
-
|
|
5178
|
-
|
|
5179
|
-
|
|
5180
|
-
|
|
5181
|
-
isCustom: true
|
|
5182
|
-
});
|
|
5183
|
-
} else {
|
|
5184
|
-
filteredDropDownItems.push({
|
|
5185
|
-
value: inputValue.trim(),
|
|
5186
|
-
label: inputValue.trim(),
|
|
5187
|
-
isCustom: true
|
|
5188
|
-
});
|
|
5189
|
-
}
|
|
5173
|
+
filteredDropDownItems.push({
|
|
5174
|
+
value: inputValue.trim(),
|
|
5175
|
+
label: inputValue.trim(),
|
|
5176
|
+
isCustom: true
|
|
5177
|
+
});
|
|
5190
5178
|
}
|
|
5191
5179
|
const onAddCustomValue = model.state.onAddCustomValue;
|
|
5192
5180
|
const maxOptionWidth = setupDropdownAccessibility(filteredDropDownItems, listRef, disabledIndicesRef);
|
|
@@ -12569,7 +12557,7 @@ class SceneTimePicker extends SceneObjectBase {
|
|
|
12569
12557
|
const {
|
|
12570
12558
|
state: { value: range }
|
|
12571
12559
|
} = timeRange;
|
|
12572
|
-
timeRange.onTimeRangeChange(getShiftedTimeRange(0 /* Backward */, range
|
|
12560
|
+
timeRange.onTimeRangeChange(getShiftedTimeRange(0 /* Backward */, range));
|
|
12573
12561
|
};
|
|
12574
12562
|
this.onMoveForward = () => {
|
|
12575
12563
|
const timeRange = sceneGraph.getTimeRange(this);
|
|
@@ -12595,6 +12583,13 @@ function SceneTimePickerRenderer({ model }) {
|
|
|
12595
12583
|
return null;
|
|
12596
12584
|
}
|
|
12597
12585
|
const rangesToUse = quickRanges || defaultQuickRanges;
|
|
12586
|
+
const halfSpanMs = (timeRangeState.value.to.valueOf() - timeRangeState.value.from.valueOf()) / 2;
|
|
12587
|
+
const moveBackwardDuration = data.intervalToAbbreviatedDurationString({
|
|
12588
|
+
start: new Date(timeRangeState.value.from.valueOf()),
|
|
12589
|
+
end: new Date(timeRangeState.value.from.valueOf() + halfSpanMs)
|
|
12590
|
+
});
|
|
12591
|
+
const canMoveForward = timeRangeState.value.to.valueOf() + halfSpanMs <= Date.now();
|
|
12592
|
+
const moveForwardDuration = canMoveForward ? moveBackwardDuration : void 0;
|
|
12598
12593
|
return /* @__PURE__ */ React__default.default.createElement(
|
|
12599
12594
|
ui.TimeRangePicker,
|
|
12600
12595
|
{
|
|
@@ -12610,6 +12605,14 @@ function SceneTimePickerRenderer({ model }) {
|
|
|
12610
12605
|
fiscalYearStartMonth: timeRangeState.fiscalYearStartMonth,
|
|
12611
12606
|
onMoveBackward: model.onMoveBackward,
|
|
12612
12607
|
onMoveForward: model.onMoveForward,
|
|
12608
|
+
moveForwardTooltip: moveForwardDuration ? i18n.t("grafana-scenes.components.time-picker.move-forward-tooltip", "Move {{moveForwardDuration}} forward", {
|
|
12609
|
+
moveForwardDuration
|
|
12610
|
+
}) : void 0,
|
|
12611
|
+
moveBackwardTooltip: i18n.t(
|
|
12612
|
+
"grafana-scenes.components.time-picker.move-backward-tooltip",
|
|
12613
|
+
"Move {{moveBackwardDuration}} backward",
|
|
12614
|
+
{ moveBackwardDuration }
|
|
12615
|
+
),
|
|
12613
12616
|
onZoom: model.onZoom,
|
|
12614
12617
|
onChangeTimeZone: timeRange.onTimeZoneChange,
|
|
12615
12618
|
onChangeFiscalYearStartMonth: model.onChangeFiscalYearStartMonth,
|
|
@@ -12639,7 +12642,7 @@ function getShiftedTimeRange(dir, timeRange, upperLimit) {
|
|
|
12639
12642
|
} else {
|
|
12640
12643
|
fromRaw = oldFrom + halfSpan;
|
|
12641
12644
|
toRaw = oldTo + halfSpan;
|
|
12642
|
-
if (toRaw > upperLimit && oldTo < upperLimit) {
|
|
12645
|
+
if (upperLimit !== void 0 && toRaw > upperLimit && oldTo < upperLimit) {
|
|
12643
12646
|
toRaw = upperLimit;
|
|
12644
12647
|
fromRaw = oldFrom;
|
|
12645
12648
|
}
|
|
@@ -15121,7 +15124,7 @@ function __variableDynamicImportRuntime0__(path) {
|
|
|
15121
15124
|
switch (path) {
|
|
15122
15125
|
case '../locales/cs-CZ/grafana-scenes.json': return Promise.resolve().then(function () { return require('./grafana-scenes-BcDO8gk4.js'); });
|
|
15123
15126
|
case '../locales/de-DE/grafana-scenes.json': return Promise.resolve().then(function () { return require('./grafana-scenes-CzZTvOrf.js'); });
|
|
15124
|
-
case '../locales/en-US/grafana-scenes.json': return Promise.resolve().then(function () { return require('./grafana-scenes-
|
|
15127
|
+
case '../locales/en-US/grafana-scenes.json': return Promise.resolve().then(function () { return require('./grafana-scenes-Bnbq8XI2.js'); });
|
|
15125
15128
|
case '../locales/es-ES/grafana-scenes.json': return Promise.resolve().then(function () { return require('./grafana-scenes-zGpJY4O3.js'); });
|
|
15126
15129
|
case '../locales/fr-FR/grafana-scenes.json': return Promise.resolve().then(function () { return require('./grafana-scenes-CfoPR_PZ.js'); });
|
|
15127
15130
|
case '../locales/hu-HU/grafana-scenes.json': return Promise.resolve().then(function () { return require('./grafana-scenes-CoXR5Z7T.js'); });
|