@modelform/react-native 0.3.0 → 0.5.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/dist/{chunk-PU7RRUV4.mjs → chunk-5SGVTAFJ.mjs} +404 -88
- package/dist/{chunk-HZEXKGDS.js → chunk-5UE6Q6CQ.js} +404 -88
- package/dist/core/index.d.ts +2 -0
- package/dist/core/index.js +26 -2
- package/dist/core/index.mjs +25 -1
- package/dist/core/layoutEdit.d.ts +3 -3
- package/dist/core/snippets.d.ts +68 -0
- package/dist/core/templates.d.ts +74 -0
- package/dist/index.js +158 -134
- package/dist/index.mjs +25 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -195,7 +195,19 @@
|
|
|
195
195
|
|
|
196
196
|
|
|
197
197
|
|
|
198
|
-
|
|
198
|
+
|
|
199
|
+
|
|
200
|
+
|
|
201
|
+
|
|
202
|
+
|
|
203
|
+
|
|
204
|
+
|
|
205
|
+
|
|
206
|
+
|
|
207
|
+
|
|
208
|
+
|
|
209
|
+
|
|
210
|
+
var _chunk5UE6Q6CQjs = require('./chunk-5UE6Q6CQ.js');
|
|
199
211
|
|
|
200
212
|
// src/ui/theme.tsx
|
|
201
213
|
var _react = require('react');
|
|
@@ -385,7 +397,7 @@ function DashboardProvider({ dashboard, resolve, refreshKey: externalKey = 0, on
|
|
|
385
397
|
if (!dashboard.refresh) return;
|
|
386
398
|
let ms;
|
|
387
399
|
try {
|
|
388
|
-
ms =
|
|
400
|
+
ms = _chunk5UE6Q6CQjs.parseDuration.call(void 0, dashboard.refresh);
|
|
389
401
|
} catch (e2) {
|
|
390
402
|
return;
|
|
391
403
|
}
|
|
@@ -393,7 +405,7 @@ function DashboardProvider({ dashboard, resolve, refreshKey: externalKey = 0, on
|
|
|
393
405
|
return () => clearInterval(id);
|
|
394
406
|
}, [dashboard.refresh, refresh]);
|
|
395
407
|
const refreshKey = tick + externalKey;
|
|
396
|
-
const range3 = _react.useMemo.call(void 0, () =>
|
|
408
|
+
const range3 = _react.useMemo.call(void 0, () => _chunk5UE6Q6CQjs.parseRange.call(void 0, rawRange), [rawRange, refreshKey]);
|
|
397
409
|
const shared = _react.useMemo.call(void 0, () => /* @__PURE__ */ new Map(), [range3, vars.variables, vars.variableInfo]);
|
|
398
410
|
const value = _react.useMemo.call(void 0,
|
|
399
411
|
() => ({
|
|
@@ -430,8 +442,8 @@ function DashboardProvider({ dashboard, resolve, refreshKey: externalKey = 0, on
|
|
|
430
442
|
] });
|
|
431
443
|
}
|
|
432
444
|
function useDashboardVariables(dashboard, resolve, rawRange) {
|
|
433
|
-
const [state, setState] = _react.useState.call(void 0, () => ({ values:
|
|
434
|
-
const [resolving, setResolving] = _react.useState.call(void 0, () => !!resolve &&
|
|
445
|
+
const [state, setState] = _react.useState.call(void 0, () => ({ values: _chunk5UE6Q6CQjs.initialVariableValues.call(void 0, dashboard), options: {}, errors: {} }));
|
|
446
|
+
const [resolving, setResolving] = _react.useState.call(void 0, () => !!resolve && _chunk5UE6Q6CQjs.refreshedVariables.call(void 0, dashboard, "load").length > 0);
|
|
435
447
|
const [runKey, setRunKey] = _react.useState.call(void 0, 0);
|
|
436
448
|
const pending = _react.useRef.call(void 0, /* @__PURE__ */ new Set());
|
|
437
449
|
const stateRef = _react.useRef.call(void 0, state);
|
|
@@ -464,7 +476,7 @@ function useDashboardVariables(dashboard, resolve, rawRange) {
|
|
|
464
476
|
setState(update);
|
|
465
477
|
setResolving(false);
|
|
466
478
|
};
|
|
467
|
-
|
|
479
|
+
_chunk5UE6Q6CQjs.resolveVariables.call(void 0, dashboard, { values, options, names, resolve: resolve2, range: _chunk5UE6Q6CQjs.parseRange.call(void 0, rawRange), signal: controller.signal }).then(
|
|
468
480
|
(res) => finish((s) => ({
|
|
469
481
|
// Only the re-run variables change, so a pick made while this ran isn't overwritten.
|
|
470
482
|
values: { ...s.values, ...Object.fromEntries([...names].filter((n) => n in res.values).map((n) => [n, res.values[n]])) },
|
|
@@ -478,11 +490,11 @@ function useDashboardVariables(dashboard, resolve, rawRange) {
|
|
|
478
490
|
const [loadedDashboard, setLoadedDashboard] = _react.useState.call(void 0, dashboard);
|
|
479
491
|
if (dashboard !== loadedDashboard) {
|
|
480
492
|
setLoadedDashboard(dashboard);
|
|
481
|
-
setState((s) => ({ ...s, values: { ...
|
|
493
|
+
setState((s) => ({ ...s, values: { ..._chunk5UE6Q6CQjs.initialVariableValues.call(void 0, dashboard), ...s.values } }));
|
|
482
494
|
}
|
|
483
495
|
_react.useEffect.call(void 0, () => {
|
|
484
|
-
const roots =
|
|
485
|
-
schedule([...roots, ...
|
|
496
|
+
const roots = _chunk5UE6Q6CQjs.refreshedVariables.call(void 0, dashboard, "load");
|
|
497
|
+
schedule([...roots, ..._chunk5UE6Q6CQjs.variableDependents.call(void 0, dashboard, roots)]);
|
|
486
498
|
}, [dashboard, schedule]);
|
|
487
499
|
const mounted = _react.useRef.call(void 0, false);
|
|
488
500
|
_react.useEffect.call(void 0, () => {
|
|
@@ -490,17 +502,17 @@ function useDashboardVariables(dashboard, resolve, rawRange) {
|
|
|
490
502
|
mounted.current = true;
|
|
491
503
|
return;
|
|
492
504
|
}
|
|
493
|
-
const roots =
|
|
494
|
-
schedule([...roots, ...
|
|
505
|
+
const roots = _chunk5UE6Q6CQjs.refreshedVariables.call(void 0, dashboard, "range");
|
|
506
|
+
schedule([...roots, ..._chunk5UE6Q6CQjs.variableDependents.call(void 0, dashboard, roots)]);
|
|
495
507
|
}, [rawRange]);
|
|
496
508
|
const setVariable = _react.useCallback.call(void 0,
|
|
497
509
|
(name, value) => {
|
|
498
510
|
setState((s) => ({ ...s, values: { ...s.values, [name]: value } }));
|
|
499
|
-
schedule(
|
|
511
|
+
schedule(_chunk5UE6Q6CQjs.variableDependents.call(void 0, dashboard, [name]));
|
|
500
512
|
},
|
|
501
513
|
[dashboard, schedule]
|
|
502
514
|
);
|
|
503
|
-
const info = _react.useMemo.call(void 0, () =>
|
|
515
|
+
const info = _react.useMemo.call(void 0, () => _chunk5UE6Q6CQjs.variableInfo.call(void 0, dashboard, state.options), [dashboard, state.options]);
|
|
504
516
|
return _react.useMemo.call(void 0,
|
|
505
517
|
() => ({
|
|
506
518
|
variables: state.values,
|
|
@@ -530,7 +542,7 @@ function usePanelData(panel, widthPx, enabled = true) {
|
|
|
530
542
|
_react.useEffect.call(void 0, () => {
|
|
531
543
|
if (!enabled || !request || !variablesReady) return;
|
|
532
544
|
const controller = new AbortController();
|
|
533
|
-
|
|
545
|
+
_chunk5UE6Q6CQjs.queryPanel.call(void 0, request.panel, request.options, controller.signal).then((frames) => !controller.signal.aborted && setResult({ request, frames })).catch((e) => !controller.signal.aborted && setResult({ request, frames: [], error: String(_nullishCoalesce(_optionalChain([e, 'optionalAccess', _5 => _5.message]), () => ( e))) }));
|
|
534
546
|
return () => controller.abort();
|
|
535
547
|
}, [enabled, request, variablesReady]);
|
|
536
548
|
if (!enabled) return IDLE;
|
|
@@ -540,7 +552,7 @@ function usePanelData(panel, widthPx, enabled = true) {
|
|
|
540
552
|
function usePanelLinks(panel) {
|
|
541
553
|
const { dashboard, variables, variableInfo: variableInfo2, range: range3, openLinks } = useDashboard();
|
|
542
554
|
const resolve = _react.useCallback.call(void 0,
|
|
543
|
-
(links, data) =>
|
|
555
|
+
(links, data) => _chunk5UE6Q6CQjs.resolveLinks.call(void 0, links, { dashboard, values: variables, info: variableInfo2, scoped: panel.scopedVars, range: range3, timezone: dashboard.timezone, data }),
|
|
544
556
|
[dashboard, variables, variableInfo2, panel.scopedVars, range3]
|
|
545
557
|
);
|
|
546
558
|
return { resolve, openLinks };
|
|
@@ -637,14 +649,14 @@ var ArrowIcon = ({ color, dir }) => /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
|
637
649
|
function displayExpr(expr) {
|
|
638
650
|
if (expr.trim().startsWith("now")) return expr;
|
|
639
651
|
try {
|
|
640
|
-
return
|
|
652
|
+
return _chunk5UE6Q6CQjs.formatLocalDateTime.call(void 0, _chunk5UE6Q6CQjs.parseTime.call(void 0, expr));
|
|
641
653
|
} catch (e3) {
|
|
642
654
|
return expr;
|
|
643
655
|
}
|
|
644
656
|
}
|
|
645
657
|
function tryParse(expr, roundUp, now = Date.now()) {
|
|
646
658
|
try {
|
|
647
|
-
return
|
|
659
|
+
return _chunk5UE6Q6CQjs.parseTime.call(void 0, expr, now, roundUp);
|
|
648
660
|
} catch (e4) {
|
|
649
661
|
return null;
|
|
650
662
|
}
|
|
@@ -658,7 +670,7 @@ function endOfDay(ms) {
|
|
|
658
670
|
return new Date(d.getFullYear(), d.getMonth(), d.getDate() + 1).getTime() - 1e3;
|
|
659
671
|
}
|
|
660
672
|
function resolveTo(expr) {
|
|
661
|
-
return /^\s*\d{4}-\d{1,2}-\d{1,2}\s*$/.test(expr) ?
|
|
673
|
+
return /^\s*\d{4}-\d{1,2}-\d{1,2}\s*$/.test(expr) ? _chunk5UE6Q6CQjs.formatLocalDateTime.call(void 0, endOfDay(_chunk5UE6Q6CQjs.parseTime.call(void 0, expr))) : expr;
|
|
662
674
|
}
|
|
663
675
|
function TimeRangeSheet({ visible, value, onApply, onClose }) {
|
|
664
676
|
const theme = useDashTheme();
|
|
@@ -669,12 +681,12 @@ function TimeRangeSheet({ visible, value, onApply, onClose }) {
|
|
|
669
681
|
const [now] = _react.useState.call(void 0, () => Date.now());
|
|
670
682
|
const [month, setMonth] = _react.useState.call(void 0, () => new Date(_nullishCoalesce(tryParse(value.from, false), () => ( now))));
|
|
671
683
|
const fromMs = tryParse(from, false, now);
|
|
672
|
-
const toMs = tryParse(
|
|
673
|
-
const fromError =
|
|
674
|
-
const toError =
|
|
684
|
+
const toMs = tryParse(_chunk5UE6Q6CQjs.timeExprError.call(void 0, to) ? to : resolveTo(to), true, now);
|
|
685
|
+
const fromError = _chunk5UE6Q6CQjs.timeExprError.call(void 0, from);
|
|
686
|
+
const toError = _chunk5UE6Q6CQjs.timeExprError.call(void 0, to);
|
|
675
687
|
const orderError = fromMs != null && toMs != null && fromMs >= toMs ? "\u201CTo\u201D must be after \u201CFrom\u201D" : null;
|
|
676
688
|
const valid = !fromError && !toError && !orderError;
|
|
677
|
-
const normalize = (expr) => expr.trim().startsWith("now") ? expr.trim() :
|
|
689
|
+
const normalize = (expr) => expr.trim().startsWith("now") ? expr.trim() : _chunk5UE6Q6CQjs.formatLocalDateTime.call(void 0, _chunk5UE6Q6CQjs.parseTime.call(void 0, expr));
|
|
678
690
|
const apply = () => {
|
|
679
691
|
if (!valid) return;
|
|
680
692
|
onApply({ from: normalize(from), to: normalize(resolveTo(to)) });
|
|
@@ -683,14 +695,14 @@ function TimeRangeSheet({ visible, value, onApply, onClose }) {
|
|
|
683
695
|
const pickDay = (day) => {
|
|
684
696
|
const end = endOfDay(day);
|
|
685
697
|
if (active === "from") {
|
|
686
|
-
setFrom(
|
|
687
|
-
if (toMs == null || toMs <= day) setTo(
|
|
698
|
+
setFrom(_chunk5UE6Q6CQjs.formatLocalDateTime.call(void 0, day));
|
|
699
|
+
if (toMs == null || toMs <= day) setTo(_chunk5UE6Q6CQjs.formatLocalDateTime.call(void 0, end));
|
|
688
700
|
setActive("to");
|
|
689
701
|
} else if (fromMs != null && day < startOfDay(fromMs)) {
|
|
690
|
-
setFrom(
|
|
691
|
-
setTo(
|
|
702
|
+
setFrom(_chunk5UE6Q6CQjs.formatLocalDateTime.call(void 0, day));
|
|
703
|
+
setTo(_chunk5UE6Q6CQjs.formatLocalDateTime.call(void 0, end));
|
|
692
704
|
} else {
|
|
693
|
-
setTo(
|
|
705
|
+
setTo(_chunk5UE6Q6CQjs.formatLocalDateTime.call(void 0, end));
|
|
694
706
|
}
|
|
695
707
|
};
|
|
696
708
|
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
@@ -726,7 +738,7 @@ function TimeRangeSheet({ visible, value, onApply, onClose }) {
|
|
|
726
738
|
}
|
|
727
739
|
),
|
|
728
740
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _reactnative.Text, { style: [styles3.sectionTitle, { color: theme.textSecondary }], children: "Relative ranges" }),
|
|
729
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _reactnative.View, { style: styles3.chips, children:
|
|
741
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _reactnative.View, { style: styles3.chips, children: _chunk5UE6Q6CQjs.RELATIVE_RANGES.map((r) => /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
730
742
|
Chip,
|
|
731
743
|
{
|
|
732
744
|
label: r.label,
|
|
@@ -870,17 +882,17 @@ var FilterIcon = ({ color }) => /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _re
|
|
|
870
882
|
var CalendarIcon = ({ color }) => /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _reactnativesvg2.default, { width: 18, height: 18, viewBox: "0 0 24 24", fill: "none", stroke: color, strokeWidth: 2, strokeLinecap: "round", strokeLinejoin: "round", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _reactnativesvg.Path, { d: "M5 5h14a1 1 0 0 1 1 1v13a1 1 0 0 1-1 1H5a1 1 0 0 1-1-1V6a1 1 0 0 1 1-1zM4 10h16M8 3v4M16 3v4" }) });
|
|
871
883
|
var ChevronIcon = ({ color, open }) => /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _reactnativesvg2.default, { width: 16, height: 16, viewBox: "0 0 24 24", fill: "none", stroke: color, strokeWidth: 2.2, strokeLinecap: "round", strokeLinejoin: "round", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _reactnativesvg.Path, { d: open ? "M6 15l6-6 6 6" : "M6 9l6 6 6-6" }) });
|
|
872
884
|
var CheckIcon = ({ color }) => /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _reactnativesvg2.default, { width: 18, height: 18, viewBox: "0 0 24 24", fill: "none", stroke: color, strokeWidth: 2.4, strokeLinecap: "round", strokeLinejoin: "round", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _reactnativesvg.Path, { d: "M5 12.5l4.5 4.5L19 7" }) });
|
|
873
|
-
function DashboardToolbar({ presets =
|
|
885
|
+
function DashboardToolbar({ presets = _chunk5UE6Q6CQjs.TIME_PRESETS }) {
|
|
874
886
|
const theme = useDashTheme();
|
|
875
887
|
const { dashboard, rawRange, setRawRange, variables, variableErrors } = useDashboard();
|
|
876
888
|
const [filtersOpen, setFiltersOpen] = _react.useState.call(void 0, false);
|
|
877
889
|
const [rangeOpen, setRangeOpen] = _react.useState.call(void 0, false);
|
|
878
890
|
const [rangeKey, setRangeKey] = _react.useState.call(void 0, 0);
|
|
879
891
|
const custom = !presets.some((p) => rawRange.from === p.from && rawRange.to === p.to);
|
|
880
|
-
const vars =
|
|
892
|
+
const vars = _chunk5UE6Q6CQjs.visibleVariables.call(void 0, dashboard);
|
|
881
893
|
const active = vars.filter((v) => {
|
|
882
894
|
const cur = variables[v.name];
|
|
883
|
-
return v.includeAll && cur != null && !(Array.isArray(cur) ? cur.includes(
|
|
895
|
+
return v.includeAll && cur != null && !(Array.isArray(cur) ? cur.includes(_chunk5UE6Q6CQjs.ALL) : cur === _chunk5UE6Q6CQjs.ALL);
|
|
884
896
|
}).length;
|
|
885
897
|
const hasError = vars.some((v) => variableErrors[v.name]);
|
|
886
898
|
return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _reactnative.View, { style: styles4.toolbar, children: [
|
|
@@ -906,7 +918,7 @@ function DashboardToolbar({ presets = _chunkHZEXKGDSjs.TIME_PRESETS }) {
|
|
|
906
918
|
setRangeOpen(true);
|
|
907
919
|
},
|
|
908
920
|
accessibilityRole: "button",
|
|
909
|
-
accessibilityLabel: custom ? `Time range, ${
|
|
921
|
+
accessibilityLabel: custom ? `Time range, ${_chunk5UE6Q6CQjs.describeRange.call(void 0, rawRange)}` : "Custom time range",
|
|
910
922
|
style: ({ pressed }) => [
|
|
911
923
|
custom ? styles4.rangeButton : styles4.iconButton,
|
|
912
924
|
{ borderColor: custom ? theme.accent : theme.border, backgroundColor: theme.surface },
|
|
@@ -914,7 +926,7 @@ function DashboardToolbar({ presets = _chunkHZEXKGDSjs.TIME_PRESETS }) {
|
|
|
914
926
|
],
|
|
915
927
|
children: [
|
|
916
928
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, CalendarIcon, { color: custom ? theme.accent : theme.textSecondary }),
|
|
917
|
-
custom && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _reactnative.Text, { style: [styles4.rangeLabel, { color: theme.accent }], numberOfLines: 1, children:
|
|
929
|
+
custom && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _reactnative.Text, { style: [styles4.rangeLabel, { color: theme.accent }], numberOfLines: 1, children: _chunk5UE6Q6CQjs.describeRange.call(void 0, rawRange) })
|
|
918
930
|
]
|
|
919
931
|
}
|
|
920
932
|
),
|
|
@@ -970,14 +982,14 @@ function FilterSection({ variable: v, open, onToggle }) {
|
|
|
970
982
|
const theme = useDashTheme();
|
|
971
983
|
const { variables, variableInfo: variableInfo2, variableErrors, variablesReady, setVariable } = useDashboard();
|
|
972
984
|
const current = variables[v.name];
|
|
973
|
-
const summary =
|
|
974
|
-
const options = [...v.includeAll ? [{ text: "All", value:
|
|
985
|
+
const summary = _chunk5UE6Q6CQjs.valueText.call(void 0, current, variableInfo2[v.name]) || (variablesReady ? "None" : "\u2026");
|
|
986
|
+
const options = [...v.includeAll ? [{ text: "All", value: _chunk5UE6Q6CQjs.ALL }] : [], ..._nullishCoalesce(_optionalChain([variableInfo2, 'access', _9 => _9[v.name], 'optionalAccess', _10 => _10.options]), () => ( []))];
|
|
975
987
|
const error = variableErrors[v.name];
|
|
976
988
|
const choose = (value, selected) => {
|
|
977
|
-
if (v.multi && value !==
|
|
978
|
-
const cur = (Array.isArray(current) ? current : [current]).filter((c) => c && c !==
|
|
989
|
+
if (v.multi && value !== _chunk5UE6Q6CQjs.ALL) {
|
|
990
|
+
const cur = (Array.isArray(current) ? current : [current]).filter((c) => c && c !== _chunk5UE6Q6CQjs.ALL);
|
|
979
991
|
const next = selected ? cur.filter((c) => c !== value) : [...cur, value];
|
|
980
|
-
setVariable(v.name, next.length ? next : [
|
|
992
|
+
setVariable(v.name, next.length ? next : [_chunk5UE6Q6CQjs.ALL]);
|
|
981
993
|
} else {
|
|
982
994
|
setVariable(v.name, v.multi ? [value] : value);
|
|
983
995
|
if (!v.multi) onToggle();
|
|
@@ -1117,7 +1129,7 @@ function barCategory(panel, frame) {
|
|
|
1117
1129
|
}
|
|
1118
1130
|
function categoryLabels(field) {
|
|
1119
1131
|
if (field.type !== "time") return field.values.map((v) => v == null ? "" : String(v));
|
|
1120
|
-
const times = field.values.map((v) => v == null ? null :
|
|
1132
|
+
const times = field.values.map((v) => v == null ? null : _chunk5UE6Q6CQjs.toMillis.call(void 0, v));
|
|
1121
1133
|
let step = Infinity;
|
|
1122
1134
|
times.forEach((t, i) => {
|
|
1123
1135
|
const prev = times[i - 1];
|
|
@@ -1163,19 +1175,19 @@ function formatTooltipTime(t) {
|
|
|
1163
1175
|
return new Date(t).toLocaleString(void 0, { month: "short", day: "numeric", hour: "2-digit", minute: "2-digit" });
|
|
1164
1176
|
}
|
|
1165
1177
|
function styledSeries(panel, frames, scheme) {
|
|
1166
|
-
return styleSeries(panel,
|
|
1178
|
+
return styleSeries(panel, _chunk5UE6Q6CQjs.toSeries.call(void 0, frames), frames, scheme);
|
|
1167
1179
|
}
|
|
1168
1180
|
function styledXYSeries(panel, frames, scheme) {
|
|
1169
|
-
const { series, x } =
|
|
1170
|
-
const xConfig = x ?
|
|
1181
|
+
const { series, x } = _chunk5UE6Q6CQjs.toXYSeries.call(void 0, frames, _optionalChain([panel, 'access', _18 => _18.options, 'optionalAccess', _19 => _19.xField]) || void 0);
|
|
1182
|
+
const xConfig = x ? _chunk5UE6Q6CQjs.resolveFieldConfig.call(void 0, panel, x.field, x.frame, x.field.name) : {};
|
|
1171
1183
|
return { series: styleSeries(panel, series, frames, scheme), xConfig };
|
|
1172
1184
|
}
|
|
1173
1185
|
function styleSeries(panel, series, frames, scheme) {
|
|
1174
1186
|
const frameOf = /* @__PURE__ */ new Map();
|
|
1175
1187
|
frames.forEach((f) => f.fields.forEach((field) => frameOf.set(field, f)));
|
|
1176
1188
|
return series.map((s, i) => {
|
|
1177
|
-
const config =
|
|
1178
|
-
return { ...s, name: _nullishCoalesce(config.displayName, () => ( s.name)), config, color:
|
|
1189
|
+
const config = _chunk5UE6Q6CQjs.resolveFieldConfig.call(void 0, panel, s.field, frameOf.get(s.field), s.name);
|
|
1190
|
+
return { ...s, name: _nullishCoalesce(config.displayName, () => ( s.name)), config, color: _chunk5UE6Q6CQjs.seriesColor.call(void 0, i, scheme, config) };
|
|
1179
1191
|
});
|
|
1180
1192
|
}
|
|
1181
1193
|
function reducedValues(panel, frames, scheme) {
|
|
@@ -1183,30 +1195,30 @@ function reducedValues(panel, frames, scheme) {
|
|
|
1183
1195
|
const out = [];
|
|
1184
1196
|
const multiple = frames.length > 1;
|
|
1185
1197
|
frames.forEach(
|
|
1186
|
-
(frame, fi) =>
|
|
1187
|
-
const raw =
|
|
1188
|
-
const config =
|
|
1198
|
+
(frame, fi) => _chunk5UE6Q6CQjs.numberFields.call(void 0, frame).forEach((field) => {
|
|
1199
|
+
const raw = _chunk5UE6Q6CQjs.fieldDisplayName.call(void 0, field, frame, multiple);
|
|
1200
|
+
const config = _chunk5UE6Q6CQjs.resolveFieldConfig.call(void 0, panel, field, frame, raw);
|
|
1189
1201
|
const values = field.values.map((v) => v == null ? null : Number(v));
|
|
1190
|
-
const value =
|
|
1191
|
-
const color =
|
|
1192
|
-
const step =
|
|
1193
|
-
const mapped =
|
|
1202
|
+
const value = _chunk5UE6Q6CQjs.reduce.call(void 0, values, calc);
|
|
1203
|
+
const color = _chunk5UE6Q6CQjs.seriesColor.call(void 0, out.length, scheme, config);
|
|
1204
|
+
const step = _chunk5UE6Q6CQjs.thresholdStep.call(void 0, value, config);
|
|
1205
|
+
const mapped = _chunk5UE6Q6CQjs.mappedResult.call(void 0, value, config);
|
|
1194
1206
|
out.push({
|
|
1195
1207
|
key: `${fi}/${field.name}/${JSON.stringify(_nullishCoalesce(field.labels, () => ( {})))}`,
|
|
1196
1208
|
name: _nullishCoalesce(config.displayName, () => ( raw)),
|
|
1197
1209
|
value,
|
|
1198
|
-
text: _optionalChain([mapped, 'optionalAccess', _24 => _24.text]) ||
|
|
1210
|
+
text: _optionalChain([mapped, 'optionalAccess', _24 => _24.text]) || _chunk5UE6Q6CQjs.formatValue.call(void 0, value, config),
|
|
1199
1211
|
mapped,
|
|
1200
1212
|
config,
|
|
1201
1213
|
color,
|
|
1202
|
-
stateColor: _optionalChain([mapped, 'optionalAccess', _25 => _25.color]) ?
|
|
1214
|
+
stateColor: _optionalChain([mapped, 'optionalAccess', _25 => _25.color]) ? _chunk5UE6Q6CQjs.resolveColor.call(void 0, mapped.color, color) : step ? _chunk5UE6Q6CQjs.resolveColor.call(void 0, step.color, color) : color,
|
|
1203
1215
|
sparkline: values,
|
|
1204
1216
|
field,
|
|
1205
1217
|
frame
|
|
1206
1218
|
});
|
|
1207
1219
|
})
|
|
1208
1220
|
);
|
|
1209
|
-
return
|
|
1221
|
+
return _chunk5UE6Q6CQjs.uniqueNames.call(void 0, out, (v) => v.field, frames);
|
|
1210
1222
|
}
|
|
1211
1223
|
function yDomain(series, includeZero) {
|
|
1212
1224
|
let min = Infinity;
|
|
@@ -1267,22 +1279,22 @@ function NoData({ message = "No data" }) {
|
|
|
1267
1279
|
}
|
|
1268
1280
|
function rowTooltipItems(panel, frame, row, multiple) {
|
|
1269
1281
|
return frame.fields.flatMap((f) => {
|
|
1270
|
-
const name =
|
|
1271
|
-
const config =
|
|
1282
|
+
const name = _chunk5UE6Q6CQjs.fieldDisplayName.call(void 0, f, frame, multiple);
|
|
1283
|
+
const config = _chunk5UE6Q6CQjs.resolveFieldConfig.call(void 0, panel, f, frame, name);
|
|
1272
1284
|
if (_optionalChain([config, 'access', _36 => _36.custom, 'optionalAccess', _37 => _37.hideFrom, 'optionalAccess', _38 => _38.tooltip])) return [];
|
|
1273
1285
|
const v = f.values[row];
|
|
1274
|
-
const value = v == null ? "\u2014" : f.type === "number" ?
|
|
1286
|
+
const value = v == null ? "\u2014" : f.type === "number" ? _chunk5UE6Q6CQjs.formatDisplay.call(void 0, Number(v), config) : f.type === "time" ? formatTooltipTime(_chunk5UE6Q6CQjs.toMillis.call(void 0, v)) : String(v);
|
|
1275
1287
|
return [{ name: _nullishCoalesce(config.displayName, () => ( name)), value }];
|
|
1276
1288
|
});
|
|
1277
1289
|
}
|
|
1278
1290
|
function rowLinks(panel, frame, row, multiple, resolve) {
|
|
1279
1291
|
return mergeLinks(
|
|
1280
1292
|
frame.fields.flatMap((f) => {
|
|
1281
|
-
const name =
|
|
1282
|
-
const config =
|
|
1293
|
+
const name = _chunk5UE6Q6CQjs.fieldDisplayName.call(void 0, f, frame, multiple);
|
|
1294
|
+
const config = _chunk5UE6Q6CQjs.resolveFieldConfig.call(void 0, panel, f, frame, name);
|
|
1283
1295
|
if (!_optionalChain([config, 'access', _39 => _39.links, 'optionalAccess', _40 => _40.length])) return [];
|
|
1284
1296
|
const v = f.values[row];
|
|
1285
|
-
const text = v == null ? void 0 : f.type === "number" ?
|
|
1297
|
+
const text = v == null ? void 0 : f.type === "number" ? _chunk5UE6Q6CQjs.formatDisplay.call(void 0, Number(v), config) : String(v);
|
|
1286
1298
|
return [{ name: _nullishCoalesce(config.displayName, () => ( name)), links: resolve(config.links, { frame, row, field: f, fieldName: _nullishCoalesce(config.displayName, () => ( name)), value: v, text }) }];
|
|
1287
1299
|
})
|
|
1288
1300
|
);
|
|
@@ -1295,7 +1307,7 @@ function valueLinks(panel, v, resolve) {
|
|
|
1295
1307
|
fieldName: v.name,
|
|
1296
1308
|
seriesName: v.name,
|
|
1297
1309
|
value: v.value,
|
|
1298
|
-
text:
|
|
1310
|
+
text: _chunk5UE6Q6CQjs.formatValue.call(void 0, v.value, v.config),
|
|
1299
1311
|
calc: _nullishCoalesce(_optionalChain([panel, 'access', _44 => _44.options, 'optionalAccess', _45 => _45.reduceOptions, 'optionalAccess', _46 => _46.calcs, 'optionalAccess', _47 => _47[0]]), () => ( "lastNotNull"))
|
|
1300
1312
|
});
|
|
1301
1313
|
}
|
|
@@ -1440,15 +1452,15 @@ function NumberInput({ panel, value, onChange }) {
|
|
|
1440
1452
|
}
|
|
1441
1453
|
function DurationInput({ panel, value, onChange }) {
|
|
1442
1454
|
const theme = useDashTheme();
|
|
1443
|
-
const toDigits = (v) => typeof v === "number" ?
|
|
1455
|
+
const toDigits = (v) => typeof v === "number" ? _chunk5UE6Q6CQjs.formatClock.call(void 0, v).replace(/\D/g, "").replace(/^0+/, "") : "";
|
|
1444
1456
|
const [digits, setDigits] = _react.useState.call(void 0, toDigits(value));
|
|
1445
1457
|
const [syncedValue, setSyncedValue] = _react.useState.call(void 0, value);
|
|
1446
1458
|
if (value !== syncedValue) {
|
|
1447
1459
|
setSyncedValue(value);
|
|
1448
|
-
setDigits((d) => value == null ?
|
|
1460
|
+
setDigits((d) => value == null ? _chunk5UE6Q6CQjs.parseClockDigits.call(void 0, d) == null ? d : "" : _chunk5UE6Q6CQjs.parseClockDigits.call(void 0, d) === value ? d : toDigits(value));
|
|
1449
1461
|
}
|
|
1450
1462
|
const masked = digits ? maskClock(digits) : "";
|
|
1451
|
-
const invalid = !!digits &&
|
|
1463
|
+
const invalid = !!digits && _chunk5UE6Q6CQjs.parseClockDigits.call(void 0, digits) == null;
|
|
1452
1464
|
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _reactnative.View, { style: [styles6.numberField, { borderColor: invalid ? theme.danger : theme.border }], children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
1453
1465
|
_reactnative.TextInput,
|
|
1454
1466
|
{
|
|
@@ -1456,7 +1468,7 @@ function DurationInput({ panel, value, onChange }) {
|
|
|
1456
1468
|
onChangeText: (t) => {
|
|
1457
1469
|
const d = t.replace(/\D/g, "").replace(/^0+/, "").slice(0, 6);
|
|
1458
1470
|
setDigits(d);
|
|
1459
|
-
onChange(
|
|
1471
|
+
onChange(_chunk5UE6Q6CQjs.parseClockDigits.call(void 0, d));
|
|
1460
1472
|
},
|
|
1461
1473
|
keyboardType: "number-pad",
|
|
1462
1474
|
placeholder: _nullishCoalesce(panel.options.placeholder, () => ( "00:00.00")),
|
|
@@ -1642,10 +1654,10 @@ function SuggestTextInput({ panel, value, onChange }) {
|
|
|
1642
1654
|
}, [store, metric, suggestWith]);
|
|
1643
1655
|
const withText = suggestWith ? form.value(suggestWith) : null;
|
|
1644
1656
|
const own = entries.filter((e) => e.metric === metric);
|
|
1645
|
-
const scoped = suggestWith && typeof withText === "string" && withText.trim() ?
|
|
1657
|
+
const scoped = suggestWith && typeof withText === "string" && withText.trim() ? _chunk5UE6Q6CQjs.entriesSavedWith.call(void 0, entries, metric, suggestWith, withText) : [];
|
|
1646
1658
|
const query = typed ? text : "";
|
|
1647
|
-
const fromScoped =
|
|
1648
|
-
const suggestions = (fromScoped.length ? fromScoped :
|
|
1659
|
+
const fromScoped = _chunk5UE6Q6CQjs.textSuggestions.call(void 0, scoped, query);
|
|
1660
|
+
const suggestions = (fromScoped.length ? fromScoped : _chunk5UE6Q6CQjs.textSuggestions.call(void 0, own, query)).filter((s) => s.toLowerCase() !== text.trim().toLowerCase());
|
|
1649
1661
|
return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _reactnative.View, { style: styles6.suggest, children: [
|
|
1650
1662
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
1651
1663
|
_reactnative.TextInput,
|
|
@@ -1684,7 +1696,7 @@ function CounterInput({ panel }) {
|
|
|
1684
1696
|
const { metric, increment = 1, unit } = panel.options;
|
|
1685
1697
|
const [today, setToday] = _react.useState.call(void 0, 0);
|
|
1686
1698
|
_react.useEffect.call(void 0, () => {
|
|
1687
|
-
const load = () => store.list({ metrics: [metric], from:
|
|
1699
|
+
const load = () => store.list({ metrics: [metric], from: _chunk5UE6Q6CQjs.startOf.call(void 0, /* @__PURE__ */ new Date(), "d").getTime() }).then((rows) => setToday(rows.reduce((a, e) => a + (_nullishCoalesce(e.value, () => ( 0))), 0)));
|
|
1688
1700
|
load();
|
|
1689
1701
|
return store.subscribe(load);
|
|
1690
1702
|
}, [store, metric]);
|
|
@@ -1886,7 +1898,7 @@ function BarGaugePanel({ panel, frames }) {
|
|
|
1886
1898
|
const min = _nullishCoalesce(v.config.min, () => ( 0));
|
|
1887
1899
|
const max = _nullishCoalesce(v.config.max, () => ( Math.max(...values.map((o) => _nullishCoalesce(o.value, () => ( 0))), 1)));
|
|
1888
1900
|
const frac = v.value == null ? 0 : Math.min(1, Math.max(0, (v.value - min) / (max - min || 1)));
|
|
1889
|
-
const color = v.config.thresholds || _optionalChain([v, 'access', _72 => _72.mapped, 'optionalAccess', _73 => _73.color]) ? v.stateColor :
|
|
1901
|
+
const color = v.config.thresholds || _optionalChain([v, 'access', _72 => _72.mapped, 'optionalAccess', _73 => _73.color]) ? v.stateColor : _chunk5UE6Q6CQjs.resolveColor.call(void 0, _optionalChain([v, 'access', _74 => _74.config, 'access', _75 => _75.color, 'optionalAccess', _76 => _76.fixedColor]), v.color);
|
|
1890
1902
|
const hasLinks = !!_optionalChain([v, 'access', _77 => _77.config, 'access', _78 => _78.links, 'optionalAccess', _79 => _79.length]);
|
|
1891
1903
|
return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0,
|
|
1892
1904
|
_reactnative.Pressable,
|
|
@@ -2067,7 +2079,7 @@ function geomapLayers(panel, frames, scheme, retina = false, gazetteers = {}) {
|
|
|
2067
2079
|
const color = _nullishCoalesce(style.color, () => ( {}));
|
|
2068
2080
|
const size = _nullishCoalesce(style.size, () => ( {}));
|
|
2069
2081
|
const text = style.text;
|
|
2070
|
-
const fixedColor =
|
|
2082
|
+
const fixedColor = _chunk5UE6Q6CQjs.resolveColor.call(void 0, _nullishCoalesce(color.fixed, () => ( "dark-green")), "#37872D");
|
|
2071
2083
|
const heat = layer.type === "heatmap";
|
|
2072
2084
|
const weight = _nullishCoalesce(config.weight, () => ( {}));
|
|
2073
2085
|
const legend = [];
|
|
@@ -2079,14 +2091,14 @@ function geomapLayers(panel, frames, scheme, retina = false, gazetteers = {}) {
|
|
|
2079
2091
|
let { xs, ys } = located;
|
|
2080
2092
|
if (layer.type === "lastPointTracker" && rows.length) [rows, xs, ys] = [rows.slice(-1), xs.slice(-1), ys.slice(-1)];
|
|
2081
2093
|
const find = (field) => field ? fieldByName(frame, field, multiple) : void 0;
|
|
2082
|
-
const configOf = (f) =>
|
|
2094
|
+
const configOf = (f) => _chunk5UE6Q6CQjs.resolveFieldConfig.call(void 0, panel, f, frame, _chunk5UE6Q6CQjs.fieldDisplayName.call(void 0, f, frame, multiple));
|
|
2083
2095
|
let colors = rows.map(() => fixedColor);
|
|
2084
2096
|
const colorField = !heat ? find(color.field) : void 0;
|
|
2085
2097
|
if (colorField) {
|
|
2086
2098
|
const cConfig = configOf(colorField);
|
|
2087
2099
|
const values = rows.map((i) => num(colorField.values[i]));
|
|
2088
2100
|
const extent = range(values);
|
|
2089
|
-
colors = values.map((v) =>
|
|
2101
|
+
colors = values.map((v) => _chunk5UE6Q6CQjs.valueColor.call(void 0, v, cConfig, fixedColor, extent));
|
|
2090
2102
|
if (showsLegend(layer) && legend.length === 0) legend.push(...thresholdLegend(`${key}/${frames.indexOf(frame)}`, cConfig, fixedColor));
|
|
2091
2103
|
}
|
|
2092
2104
|
const dim = heat ? weight : size;
|
|
@@ -2144,8 +2156,8 @@ function thresholdLegend(key, config, fallback) {
|
|
|
2144
2156
|
if (steps.length < 2) return [];
|
|
2145
2157
|
return steps.map((s, i) => ({
|
|
2146
2158
|
key: `${key}/${i}`,
|
|
2147
|
-
name: s.value == null ? `< ${
|
|
2148
|
-
color:
|
|
2159
|
+
name: s.value == null ? `< ${_chunk5UE6Q6CQjs.formatValue.call(void 0, steps[i + 1].value, config)}` : `${_chunk5UE6Q6CQjs.formatValue.call(void 0, s.value, config)}+`,
|
|
2160
|
+
color: _chunk5UE6Q6CQjs.resolveColor.call(void 0, s.color, fallback)
|
|
2149
2161
|
}));
|
|
2150
2162
|
}
|
|
2151
2163
|
var isDataLayer = (type) => type === "markers" || type === "heatmap" || type === "route" || type === "lastPointTracker";
|
|
@@ -2155,15 +2167,15 @@ function gazetteerPaths(panel, frames) {
|
|
|
2155
2167
|
for (const layer of _nullishCoalesce(_optionalChain([panel, 'access', _97 => _97.options, 'optionalAccess', _98 => _98.layers]), () => ( DEFAULT_LAYERS))) {
|
|
2156
2168
|
if (!isDataLayer(layer.type)) continue;
|
|
2157
2169
|
const mode = _nullishCoalesce(_optionalChain([layer, 'access', _99 => _99.location, 'optionalAccess', _100 => _100.mode]), () => ( "auto"));
|
|
2158
|
-
if (mode === "lookup") paths.add(_optionalChain([layer, 'access', _101 => _101.location, 'optionalAccess', _102 => _102.gazetteer]) ||
|
|
2159
|
-
else if (mode === "auto" && frames.some(lookupField)) paths.add(
|
|
2170
|
+
if (mode === "lookup") paths.add(_optionalChain([layer, 'access', _101 => _101.location, 'optionalAccess', _102 => _102.gazetteer]) || _chunk5UE6Q6CQjs.DEFAULT_GAZETTEER);
|
|
2171
|
+
else if (mode === "auto" && frames.some(lookupField)) paths.add(_chunk5UE6Q6CQjs.DEFAULT_GAZETTEER);
|
|
2160
2172
|
}
|
|
2161
2173
|
return [...paths];
|
|
2162
2174
|
}
|
|
2163
2175
|
var LAT_NAMES = ["lat", "latitude"];
|
|
2164
2176
|
var LON_NAMES = ["lon", "lng", "long", "longitude"];
|
|
2165
2177
|
function fieldByName(frame, name, multiple) {
|
|
2166
|
-
return _nullishCoalesce(frame.fields.find((f) => f.name === name), () => ( frame.fields.find((f) =>
|
|
2178
|
+
return _nullishCoalesce(frame.fields.find((f) => f.name === name), () => ( frame.fields.find((f) => _chunk5UE6Q6CQjs.fieldDisplayName.call(void 0, f, frame, multiple) === name)));
|
|
2167
2179
|
}
|
|
2168
2180
|
function locate2(frame, location = {}, gazetteers = {}) {
|
|
2169
2181
|
const mode = _nullishCoalesce(location.mode, () => ( "auto"));
|
|
@@ -2182,10 +2194,10 @@ function locate2(frame, location = {}, gazetteers = {}) {
|
|
|
2182
2194
|
lat = named(LAT_NAMES);
|
|
2183
2195
|
lon = named(LON_NAMES);
|
|
2184
2196
|
if (!lat || !lon) hash = named(["geohash"]);
|
|
2185
|
-
if ((!lat || !lon) && !hash) [lookup, gazetteer] = [lookupField(frame), gazetteers[
|
|
2197
|
+
if ((!lat || !lon) && !hash) [lookup, gazetteer] = [lookupField(frame), gazetteers[_chunk5UE6Q6CQjs.DEFAULT_GAZETTEER]];
|
|
2186
2198
|
} else if (mode === "lookup") {
|
|
2187
2199
|
lookup = location.lookup ? fieldByName(frame, location.lookup, false) : lookupField(frame);
|
|
2188
|
-
gazetteer = gazetteers[location.gazetteer ||
|
|
2200
|
+
gazetteer = gazetteers[location.gazetteer || _chunk5UE6Q6CQjs.DEFAULT_GAZETTEER];
|
|
2189
2201
|
}
|
|
2190
2202
|
const rows = [];
|
|
2191
2203
|
const xs = [];
|
|
@@ -2234,8 +2246,8 @@ function decodeGeohash(hash) {
|
|
|
2234
2246
|
}
|
|
2235
2247
|
function cellText(field, v, config) {
|
|
2236
2248
|
if (v == null) return "";
|
|
2237
|
-
if (field.type === "number") return
|
|
2238
|
-
if (field.type === "time") return new Date(
|
|
2249
|
+
if (field.type === "number") return _chunk5UE6Q6CQjs.formatDisplay.call(void 0, Number(v), config);
|
|
2250
|
+
if (field.type === "time") return new Date(_chunk5UE6Q6CQjs.toMillis.call(void 0, v)).toLocaleString();
|
|
2239
2251
|
return String(v);
|
|
2240
2252
|
}
|
|
2241
2253
|
function num(v) {
|
|
@@ -2485,11 +2497,11 @@ function useGazetteers(panel, frames) {
|
|
|
2485
2497
|
let live = true;
|
|
2486
2498
|
let ds;
|
|
2487
2499
|
try {
|
|
2488
|
-
ds = _optionalChain([resolve, 'optionalCall', _112 => _112(
|
|
2500
|
+
ds = _optionalChain([resolve, 'optionalCall', _112 => _112(_chunk5UE6Q6CQjs.normalizeRef.call(void 0, panel.datasource))]);
|
|
2489
2501
|
} catch (e5) {
|
|
2490
2502
|
}
|
|
2491
2503
|
const paths = key.split("\n");
|
|
2492
|
-
Promise.allSettled(paths.map((p) =>
|
|
2504
|
+
Promise.allSettled(paths.map((p) => _chunk5UE6Q6CQjs.loadGazetteer.call(void 0, p, ds))).then((results) => {
|
|
2493
2505
|
if (!live) return;
|
|
2494
2506
|
const gazetteers = {};
|
|
2495
2507
|
const errors = [];
|
|
@@ -2632,8 +2644,8 @@ function cellType(config) {
|
|
|
2632
2644
|
}
|
|
2633
2645
|
function tableColumns(panel, frame, multipleFrames = false) {
|
|
2634
2646
|
return frame.fields.flatMap((field, i) => {
|
|
2635
|
-
const raw =
|
|
2636
|
-
const config =
|
|
2647
|
+
const raw = _chunk5UE6Q6CQjs.fieldDisplayName.call(void 0, field, frame, multipleFrames);
|
|
2648
|
+
const config = _chunk5UE6Q6CQjs.resolveFieldConfig.call(void 0, panel, field, frame, raw);
|
|
2637
2649
|
const custom = _nullishCoalesce(config.custom, () => ( {}));
|
|
2638
2650
|
if (custom.hidden || _optionalChain([custom, 'access', _122 => _122.hideFrom, 'optionalAccess', _123 => _123.viz])) return [];
|
|
2639
2651
|
const numeric = field.type === "number";
|
|
@@ -2676,16 +2688,16 @@ function tableFooter(columns) {
|
|
|
2676
2688
|
counted = true;
|
|
2677
2689
|
return [{ label: "Count", text: String(c.field.values.length) }];
|
|
2678
2690
|
}
|
|
2679
|
-
if (!
|
|
2680
|
-
const label =
|
|
2691
|
+
if (!_chunk5UE6Q6CQjs.isReducer.call(void 0, r)) return [];
|
|
2692
|
+
const label = _chunk5UE6Q6CQjs.REDUCER_LABELS[r];
|
|
2681
2693
|
if (r === "count") return [{ label, text: String(c.field.values.length) }];
|
|
2682
2694
|
if (c.field.type !== "number") {
|
|
2683
2695
|
if (r === "distinctCount") return [{ label, text: String(new Set(c.field.values.filter((v) => v != null)).size) }];
|
|
2684
2696
|
return [];
|
|
2685
2697
|
}
|
|
2686
|
-
const value =
|
|
2698
|
+
const value = _chunk5UE6Q6CQjs.reduce.call(void 0, c.field.values.map((v) => v == null ? null : Number(v)), r);
|
|
2687
2699
|
const counts = r === "distinctCount" || r === "changeCount";
|
|
2688
|
-
return [{ label, text: counts ? String(_nullishCoalesce(value, () => ( 0))) :
|
|
2700
|
+
return [{ label, text: counts ? String(_nullishCoalesce(value, () => ( 0))) : _chunk5UE6Q6CQjs.formatValue.call(void 0, value, c.config) }];
|
|
2689
2701
|
});
|
|
2690
2702
|
return lines.length === 1 && lines[0].label !== "Count" ? [{ text: lines[0].text }] : lines;
|
|
2691
2703
|
});
|
|
@@ -2704,13 +2716,13 @@ function extentOf(values) {
|
|
|
2704
2716
|
}
|
|
2705
2717
|
function cellDisplay(col, raw, fallbackColor) {
|
|
2706
2718
|
const { config, field } = col;
|
|
2707
|
-
const mapped =
|
|
2719
|
+
const mapped = _chunk5UE6Q6CQjs.mappedResult.call(void 0, raw, config);
|
|
2708
2720
|
const num4 = field.type === "number" && raw != null && Number.isFinite(Number(raw)) ? Number(raw) : null;
|
|
2709
|
-
const text = _nullishCoalesce(_optionalChain([mapped, 'optionalAccess', _137 => _137.text]), () => ( (raw == null ? _nullishCoalesce(config.noValue, () => ( "")) : field.type === "number" ?
|
|
2721
|
+
const text = _nullishCoalesce(_optionalChain([mapped, 'optionalAccess', _137 => _137.text]), () => ( (raw == null ? _nullishCoalesce(config.noValue, () => ( "")) : field.type === "number" ? _chunk5UE6Q6CQjs.formatValue.call(void 0, num4, config) : field.type === "time" ? new Date(_chunk5UE6Q6CQjs.toMillis.call(void 0, raw)).toLocaleString() : String(raw))));
|
|
2710
2722
|
if (col.cellType === "auto") return { text };
|
|
2711
2723
|
const mode = _optionalChain([config, 'access', _138 => _138.color, 'optionalAccess', _139 => _139.mode]);
|
|
2712
|
-
const named = _nullishCoalesce(_optionalChain([mapped, 'optionalAccess', _140 => _140.color]), () => ( (mode === "fixed" ? _optionalChain([config, 'access', _141 => _141.color, 'optionalAccess', _142 => _142.fixedColor]) : (!mode || mode === "thresholds") && num4 != null ? _optionalChain([
|
|
2713
|
-
const color = named === "text" ? void 0 : _optionalChain([mapped, 'optionalAccess', _144 => _144.color]) ?
|
|
2724
|
+
const named = _nullishCoalesce(_optionalChain([mapped, 'optionalAccess', _140 => _140.color]), () => ( (mode === "fixed" ? _optionalChain([config, 'access', _141 => _141.color, 'optionalAccess', _142 => _142.fixedColor]) : (!mode || mode === "thresholds") && num4 != null ? _optionalChain([_chunk5UE6Q6CQjs.thresholdStep.call(void 0, num4, config), 'optionalAccess', _143 => _143.color]) : void 0)));
|
|
2725
|
+
const color = named === "text" ? void 0 : _optionalChain([mapped, 'optionalAccess', _144 => _144.color]) ? _chunk5UE6Q6CQjs.resolveColor.call(void 0, mapped.color, fallbackColor) : num4 == null ? void 0 : _chunk5UE6Q6CQjs.valueColor.call(void 0, num4, config, fallbackColor, col.extent);
|
|
2714
2726
|
if (col.cellType === "color-text") return { text, color };
|
|
2715
2727
|
if (col.cellType === "color-background") return { text, background: color };
|
|
2716
2728
|
const min = _nullishCoalesce(config.min, () => ( Math.min(0, _nullishCoalesce(_optionalChain([col, 'access', _145 => _145.extent, 'optionalAccess', _146 => _146[0]]), () => ( 0)))));
|
|
@@ -2741,7 +2753,7 @@ function sortedRows(columns, length, sort) {
|
|
|
2741
2753
|
if (!col) return rows;
|
|
2742
2754
|
const { field } = col;
|
|
2743
2755
|
const dir = sort.desc ? -1 : 1;
|
|
2744
|
-
const key = (v) => field.type === "time" ?
|
|
2756
|
+
const key = (v) => field.type === "time" ? _chunk5UE6Q6CQjs.toMillis.call(void 0, v) : field.type === "number" || field.type === "boolean" ? Number(v) : v;
|
|
2745
2757
|
const empty = (v) => v == null || v === "" || typeof v === "number" && Number.isNaN(v);
|
|
2746
2758
|
return rows.sort((a, b) => {
|
|
2747
2759
|
const va = field.values[a];
|
|
@@ -2807,8 +2819,8 @@ function TablePanel({ panel, frames }) {
|
|
|
2807
2819
|
const columns = _react.useMemo.call(void 0, () => frame ? tableColumns(panel, frame, frames.length > 1) : [], [panel, frame, frames.length]);
|
|
2808
2820
|
const [tapped, setSort] = _react.useState.call(void 0, );
|
|
2809
2821
|
const sort = tapped === void 0 ? initialSort(panel, columns) : tapped;
|
|
2810
|
-
const order = _react.useMemo.call(void 0, () => sortedRows(columns, frame ?
|
|
2811
|
-
if (!frame || !
|
|
2822
|
+
const order = _react.useMemo.call(void 0, () => sortedRows(columns, frame ? _chunk5UE6Q6CQjs.frameLength.call(void 0, frame) : 0, sort), [columns, frame, sort]);
|
|
2823
|
+
if (!frame || !_chunk5UE6Q6CQjs.frameLength.call(void 0, frame)) return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, NoData, {});
|
|
2812
2824
|
const shown = order.slice(0, 500);
|
|
2813
2825
|
const rowColumn = columns.find((c) => c.applyToRow);
|
|
2814
2826
|
const footer = tableFooter(columns);
|
|
@@ -2908,7 +2920,7 @@ function BarChartPanel({ panel, frames, width }) {
|
|
|
2908
2920
|
{
|
|
2909
2921
|
style: [styles10.tick, { color: theme.textMuted, top: plot.height * (1 - barFraction(axis, t)) - 7 }, axis.side === "left" ? styles10.tickLeft : styles10.tickRight],
|
|
2910
2922
|
numberOfLines: 1,
|
|
2911
|
-
children:
|
|
2923
|
+
children: _chunk5UE6Q6CQjs.formatValue.call(void 0, t, { ...axis.config, decimals: tickDecimals(axis.ticks) })
|
|
2912
2924
|
},
|
|
2913
2925
|
t
|
|
2914
2926
|
)) });
|
|
@@ -3034,7 +3046,7 @@ function TimeSeriesPanel({ panel, frames }) {
|
|
|
3034
3046
|
const y = linearScale(yMin, yMax, PAD.top + plotH, PAD.top);
|
|
3035
3047
|
const span = xTo - xFrom;
|
|
3036
3048
|
const xTicks = numericX ? numberTicks(xFrom, xTo, plotW) : timeTicks(xFrom, xTo, plotW);
|
|
3037
|
-
const xLabel = (t) => numericX ?
|
|
3049
|
+
const xLabel = (t) => numericX ? _chunk5UE6Q6CQjs.formatValue.call(void 0, t, { ...xConfig, decimals: tickDecimals(xTicks) }) : formatTimeTick(t, span);
|
|
3038
3050
|
const unitConfig = series[0].config;
|
|
3039
3051
|
const barSeries = series.filter((s) => style(s) === "bars");
|
|
3040
3052
|
const pointsCount = Math.max(...series.map((s) => s.times.length));
|
|
@@ -3052,11 +3064,11 @@ function TimeSeriesPanel({ panel, frames }) {
|
|
|
3052
3064
|
if (!pinch.current) pinch.current = { start: { from: xFrom, to: xTo }, dist, frac };
|
|
3053
3065
|
const p = pinch.current;
|
|
3054
3066
|
const limits = extent ? { minSpan: (extent[1] - extent[0]) / 1e3, maxSpan: extent[1] - extent[0], minFrom: extent[0], maxTo: extent[1] } : { maxTo: Math.max(Date.now(), p.start.to) };
|
|
3055
|
-
setPreview(
|
|
3067
|
+
setPreview(_chunk5UE6Q6CQjs.zoomRange.call(void 0, p.start, dist / p.dist, p.frac, frac, limits));
|
|
3056
3068
|
};
|
|
3057
3069
|
const onPinchEnd = (commit) => {
|
|
3058
3070
|
if (commit && pinch.current && preview) {
|
|
3059
|
-
if (!extent) setRawRange({ from:
|
|
3071
|
+
if (!extent) setRawRange({ from: _chunk5UE6Q6CQjs.formatLocalDateTime.call(void 0, preview.from), to: _chunk5UE6Q6CQjs.formatLocalDateTime.call(void 0, preview.to) });
|
|
3060
3072
|
else setXZoom(preview.to - preview.from >= extent[1] - extent[0] ? null : preview);
|
|
3061
3073
|
}
|
|
3062
3074
|
pinch.current = null;
|
|
@@ -3111,7 +3123,7 @@ function TimeSeriesPanel({ panel, frames }) {
|
|
|
3111
3123
|
size.width > 0 && /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _reactnativesvg2.default, { width: size.width, height: size.height, children: [
|
|
3112
3124
|
ticks.map((t) => /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _reactnativesvg.G, { children: [
|
|
3113
3125
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _reactnativesvg.Line, { x1: PAD.left, x2: PAD.left + plotW, y1: y(t), y2: y(t), stroke: theme.grid, strokeWidth: 1 }),
|
|
3114
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _reactnativesvg.Text, { x: PAD.left - 6, y: y(t) + 3, fontSize: 10, fill: theme.textMuted, textAnchor: "end", children:
|
|
3126
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _reactnativesvg.Text, { x: PAD.left - 6, y: y(t) + 3, fontSize: 10, fill: theme.textMuted, textAnchor: "end", children: _chunk5UE6Q6CQjs.formatValue.call(void 0, t, { ...unitConfig, decimals: tickDecimals(ticks) }) })
|
|
3115
3127
|
] }, t)),
|
|
3116
3128
|
xTicks.map((t) => /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
3117
3129
|
_reactnativesvg.Text,
|
|
@@ -3177,11 +3189,11 @@ function TimeSeriesPanel({ panel, frames }) {
|
|
|
3177
3189
|
x(hover.time) > size.width / 2 ? { right: size.width - x(hover.time) + 8 } : { left: x(hover.time) + 8 }
|
|
3178
3190
|
],
|
|
3179
3191
|
children: [
|
|
3180
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _reactnative.Text, { style: [styles11.tooltipTime, { color: theme.textMuted }], children: numericX ?
|
|
3192
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _reactnative.Text, { style: [styles11.tooltipTime, { color: theme.textMuted }], children: numericX ? _chunk5UE6Q6CQjs.formatValue.call(void 0, hover.time, xConfig) : formatTooltipTime(hover.time) }),
|
|
3181
3193
|
hover.rows.map((r) => /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _reactnative.View, { style: styles11.tooltipRow, children: [
|
|
3182
3194
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _reactnative.View, { style: [styles11.swatch, { backgroundColor: r.color }] }),
|
|
3183
3195
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _reactnative.Text, { style: [styles11.tooltipName, { color: theme.textSecondary }], numberOfLines: 1, children: r.name }),
|
|
3184
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _reactnative.Text, { style: [styles11.tooltipValue, { color: theme.text }], children:
|
|
3196
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _reactnative.Text, { style: [styles11.tooltipValue, { color: theme.text }], children: _chunk5UE6Q6CQjs.formatValue.call(void 0, r.value, r.config) })
|
|
3185
3197
|
] }, r.key)),
|
|
3186
3198
|
isPinned && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, TooltipLinks, { links: hoverLinks, onOpen: (l) => openLinks([l]) })
|
|
3187
3199
|
]
|
|
@@ -3266,7 +3278,7 @@ function linkData(r, frames, xField) {
|
|
|
3266
3278
|
if (frame && xField === void 0) {
|
|
3267
3279
|
row = r.index;
|
|
3268
3280
|
} else if (frame) {
|
|
3269
|
-
const xf = _nullishCoalesce(frame.fields.find((f) => f.name === xField), () => (
|
|
3281
|
+
const xf = _nullishCoalesce(frame.fields.find((f) => f.name === xField), () => ( _chunk5UE6Q6CQjs.numberFields.call(void 0, frame)[0]));
|
|
3270
3282
|
const at = _optionalChain([xf, 'optionalAccess', _206 => _206.values, 'access', _207 => _207.findIndex, 'call', _208 => _208((v, k) => Number(v) === r.time && Number(r.series.field.values[k]) === r.value)]);
|
|
3271
3283
|
row = at != null && at >= 0 ? at : void 0;
|
|
3272
3284
|
}
|
|
@@ -3277,7 +3289,7 @@ function linkData(r, frames, xField) {
|
|
|
3277
3289
|
fieldName: r.name,
|
|
3278
3290
|
seriesName: r.name,
|
|
3279
3291
|
value: r.value,
|
|
3280
|
-
text:
|
|
3292
|
+
text: _chunk5UE6Q6CQjs.formatValue.call(void 0, r.value, r.config),
|
|
3281
3293
|
time: xField === void 0 ? r.time : void 0
|
|
3282
3294
|
};
|
|
3283
3295
|
}
|
|
@@ -3338,8 +3350,8 @@ function xySeries(panel, frames, scheme) {
|
|
|
3338
3350
|
const { manual, series: maps, exclude } = mappings(panel);
|
|
3339
3351
|
const multiple = frames.length > 1;
|
|
3340
3352
|
const out = [];
|
|
3341
|
-
const config = (field, frame) =>
|
|
3342
|
-
const find = (pick, frame, fields = frame.fields) => pick ? fields.filter((f) =>
|
|
3353
|
+
const config = (field, frame) => _chunk5UE6Q6CQjs.resolveFieldConfig.call(void 0, panel, field, frame, _chunk5UE6Q6CQjs.fieldDisplayName.call(void 0, field, frame, multiple));
|
|
3354
|
+
const find = (pick, frame, fields = frame.fields) => pick ? fields.filter((f) => _chunk5UE6Q6CQjs.fieldMatches.call(void 0, pick.matcher, f, frame, _chunk5UE6Q6CQjs.fieldDisplayName.call(void 0, f, frame, multiple))) : [];
|
|
3343
3355
|
for (const [mi, m] of (maps.length ? maps : [{}]).entries()) {
|
|
3344
3356
|
const matcher = _optionalChain([m, 'access', _219 => _219.frame, 'optionalAccess', _220 => _220.matcher]);
|
|
3345
3357
|
const chosen = _optionalChain([matcher, 'optionalAccess', _221 => _221.id]) === "byIndex" ? frames.filter((_, i) => i === matcher.options) : frames;
|
|
@@ -3355,16 +3367,16 @@ function xySeries(panel, frames, scheme) {
|
|
|
3355
3367
|
const yConfig = config(yField, frame);
|
|
3356
3368
|
if (_optionalChain([yConfig, 'access', _222 => _222.custom, 'optionalAccess', _223 => _223.hideFrom, 'optionalAccess', _224 => _224.viz]) && !manual) continue;
|
|
3357
3369
|
const xConfig = config(xField, frame);
|
|
3358
|
-
const color =
|
|
3359
|
-
const base = _optionalChain([yConfig, 'access', _225 => _225.color, 'optionalAccess', _226 => _226.mode]) === "thresholds" ?
|
|
3370
|
+
const color = _chunk5UE6Q6CQjs.seriesColor.call(void 0, out.length, scheme, yConfig);
|
|
3371
|
+
const base = _optionalChain([yConfig, 'access', _225 => _225.color, 'optionalAccess', _226 => _226.mode]) === "thresholds" ? _chunk5UE6Q6CQjs.valueColor.call(void 0, null, yConfig, color) : color;
|
|
3360
3372
|
const rows = [];
|
|
3361
3373
|
const xs = [];
|
|
3362
3374
|
const ys = [];
|
|
3363
3375
|
yField.values.forEach((yv, i) => {
|
|
3364
3376
|
const xv = xField.values[i];
|
|
3365
3377
|
if (xv == null || yv == null) return;
|
|
3366
|
-
const xn = xField.type === "time" ?
|
|
3367
|
-
const yn = yField.type === "time" ?
|
|
3378
|
+
const xn = xField.type === "time" ? _chunk5UE6Q6CQjs.toMillis.call(void 0, xv) : Number(xv);
|
|
3379
|
+
const yn = yField.type === "time" ? _chunk5UE6Q6CQjs.toMillis.call(void 0, yv) : Number(yv);
|
|
3368
3380
|
if (!Number.isFinite(xn) || !Number.isFinite(yn)) return;
|
|
3369
3381
|
rows.push(i);
|
|
3370
3382
|
xs.push(xn);
|
|
@@ -3377,7 +3389,7 @@ function xySeries(panel, frames, scheme) {
|
|
|
3377
3389
|
const cConfig = config(colorField, frame);
|
|
3378
3390
|
const values = rows.map((i) => num3(colorField.values[i]));
|
|
3379
3391
|
const extent = range2(values);
|
|
3380
|
-
colors = values.map((v) =>
|
|
3392
|
+
colors = values.map((v) => _chunk5UE6Q6CQjs.valueColor.call(void 0, v, cConfig, base, extent));
|
|
3381
3393
|
}
|
|
3382
3394
|
let sizes = rows.map(() => fixedSize);
|
|
3383
3395
|
if (sizeField) {
|
|
@@ -3387,7 +3399,7 @@ function xySeries(panel, frames, scheme) {
|
|
|
3387
3399
|
sizes = values.map((v) => v == null ? min : min + (v - lo) / (hi - lo || 1) * (max - min));
|
|
3388
3400
|
}
|
|
3389
3401
|
const fixedName = _optionalChain([m, 'access', _238 => _238.name, 'optionalAccess', _239 => _239.fixed]);
|
|
3390
|
-
const yName = _nullishCoalesce(yConfig.displayName, () => (
|
|
3402
|
+
const yName = _nullishCoalesce(yConfig.displayName, () => ( _chunk5UE6Q6CQjs.fieldDisplayName.call(void 0, yField, frame, multiple)));
|
|
3391
3403
|
out.push({
|
|
3392
3404
|
key: `${mi}/${frames.indexOf(frame)}/${yField.name}`,
|
|
3393
3405
|
name: fixedName ? yFields.length > 1 ? `${fixedName} ${yName}` : fixedName : yName,
|
|
@@ -3510,7 +3522,7 @@ function XYChartPanel({ panel, frames }) {
|
|
|
3510
3522
|
size.width > 0 && /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _reactnativesvg2.default, { width: size.width, height: size.height, children: [
|
|
3511
3523
|
yTicks.map((t) => /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _reactnativesvg.G, { children: [
|
|
3512
3524
|
gridY && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _reactnativesvg.Line, { x1: pad.left, x2: pad.left + plotW, y1: layout.y(t), y2: layout.y(t), stroke: theme.grid, strokeWidth: 1 }),
|
|
3513
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _reactnativesvg.Text, { x: pad.left - 6, y: layout.y(t) + 3, fontSize: 10, fill: theme.textMuted, textAnchor: "end", children:
|
|
3525
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _reactnativesvg.Text, { x: pad.left - 6, y: layout.y(t) + 3, fontSize: 10, fill: theme.textMuted, textAnchor: "end", children: _chunk5UE6Q6CQjs.formatValue.call(void 0, t, { ...first.yConfig, decimals: _nullishCoalesce(first.yConfig.decimals, () => ( tickDecimals(yTicks))) }) })
|
|
3514
3526
|
] }, `y${t}`)),
|
|
3515
3527
|
xTicks.map((t) => /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _reactnativesvg.G, { children: [
|
|
3516
3528
|
gridX && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _reactnativesvg.Line, { x1: layout.x(t), x2: layout.x(t), y1: pad.top, y2: pad.top + plotH, stroke: theme.grid, strokeWidth: 1 }),
|
|
@@ -3522,7 +3534,7 @@ function XYChartPanel({ panel, frames }) {
|
|
|
3522
3534
|
fontSize: 10,
|
|
3523
3535
|
fill: theme.textMuted,
|
|
3524
3536
|
textAnchor: layout.x(t) - pad.left < 20 ? "start" : pad.left + plotW - layout.x(t) < 20 ? "end" : "middle",
|
|
3525
|
-
children:
|
|
3537
|
+
children: _chunk5UE6Q6CQjs.formatValue.call(void 0, t, { ...first.xConfig, decimals: _nullishCoalesce(first.xConfig.decimals, () => ( tickDecimals(xTicks))) })
|
|
3526
3538
|
}
|
|
3527
3539
|
)
|
|
3528
3540
|
] }, `x${t}`)),
|
|
@@ -3635,14 +3647,14 @@ function DashboardView({ mode = "auto", header, footer, refreshable }) {
|
|
|
3635
3647
|
const width = (measured.width || window.width) - insets.left - insets.right;
|
|
3636
3648
|
const layoutMode = mode === "auto" ? width >= TABLET_WIDTH ? "grid" : "phone" : mode;
|
|
3637
3649
|
const sections = _react.useMemo.call(void 0,
|
|
3638
|
-
() =>
|
|
3650
|
+
() => _chunk5UE6Q6CQjs.layoutDashboard.call(void 0, dashboard, layoutMode, { values: variables, info: variableInfo2 }),
|
|
3639
3651
|
[dashboard, layoutMode, variables, variableInfo2]
|
|
3640
3652
|
);
|
|
3641
3653
|
const [toggled, setToggled] = _react.useState.call(void 0, {});
|
|
3642
3654
|
const { seen, viewportH, onScroll, onViewportLayout, onSectionLayout } = useSeenSections(window.height);
|
|
3643
3655
|
const maxPanelH = Math.max(MIN_PANEL_H, viewportH - SIDE * 2);
|
|
3644
3656
|
const contentW = width - SIDE * 2;
|
|
3645
|
-
const canRefresh = _nullishCoalesce(refreshable, () => ( dashboard.panels.some((p) =>
|
|
3657
|
+
const canRefresh = _nullishCoalesce(refreshable, () => ( dashboard.panels.some((p) => _chunk5UE6Q6CQjs.panelHasQueries.call(void 0, p) || _optionalChain([p, 'access', _262 => _262.panels, 'optionalAccess', _263 => _263.some, 'call', _264 => _264(_chunk5UE6Q6CQjs.panelHasQueries)]))));
|
|
3646
3658
|
return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _reactnative.View, { style: [styles13.fill, { backgroundColor: theme.background }], onLayout, children: [
|
|
3647
3659
|
width > 0 && /* @__PURE__ */ _jsxruntime.jsxs.call(void 0,
|
|
3648
3660
|
_reactnative.ScrollView,
|
|
@@ -3668,14 +3680,14 @@ function DashboardView({ mode = "auto", header, footer, refreshable }) {
|
|
|
3668
3680
|
accessibilityState: { expanded: !collapsed },
|
|
3669
3681
|
children: [
|
|
3670
3682
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _reactnative.Text, { style: [styles13.chevron, { color: theme.textMuted }], children: collapsed ? "\u25B8" : "\u25BE" }),
|
|
3671
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _reactnative.Text, { style: [styles13.rowTitle, { color: theme.text }], numberOfLines: 2, children:
|
|
3683
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _reactnative.Text, { style: [styles13.rowTitle, { color: theme.text }], numberOfLines: 2, children: _chunk5UE6Q6CQjs.interpolate.call(void 0, _nullishCoalesce(section.row.title, () => ( "")), { values: variables, info: variableInfo2, scoped: section.row.scopedVars, timezone: dashboard.timezone }) })
|
|
3672
3684
|
]
|
|
3673
3685
|
}
|
|
3674
3686
|
),
|
|
3675
3687
|
!collapsed && layoutMode === "grid" && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, GridSection, { grid: section.grid, width: contentW, maxPanelH, deferred: !seen.has(section.key) }),
|
|
3676
3688
|
!collapsed && layoutMode === "phone" && section.rows.map((row, ri) => /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _reactnative.View, { style: styles13.row, children: row.cells.map((cell) => {
|
|
3677
|
-
const w = (contentW + GAP) * (cell.span /
|
|
3678
|
-
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, PanelCard, { panel: cell.panel, width: w, height: Math.min(
|
|
3689
|
+
const w = (contentW + GAP) * (cell.span / _chunk5UE6Q6CQjs.GRID_COLUMNS) - GAP;
|
|
3690
|
+
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, PanelCard, { panel: cell.panel, width: w, height: Math.min(_chunk5UE6Q6CQjs.gridUnitsToPx.call(void 0, row.h), maxPanelH), deferred: !seen.has(section.key) }, cell.key);
|
|
3679
3691
|
}) }, ri))
|
|
3680
3692
|
] }, section.key);
|
|
3681
3693
|
})
|
|
@@ -3686,10 +3698,10 @@ function DashboardView({ mode = "auto", header, footer, refreshable }) {
|
|
|
3686
3698
|
] });
|
|
3687
3699
|
}
|
|
3688
3700
|
function GridSection({ grid, width, maxPanelH, deferred }) {
|
|
3689
|
-
const colW = (width + GAP) /
|
|
3690
|
-
const tallest = Math.max(0, ...grid.cells.map((c) =>
|
|
3701
|
+
const colW = (width + GAP) / _chunk5UE6Q6CQjs.GRID_COLUMNS;
|
|
3702
|
+
const tallest = Math.max(0, ...grid.cells.map((c) => _chunk5UE6Q6CQjs.gridUnitsToPx.call(void 0, c.h)));
|
|
3691
3703
|
const scale = tallest > maxPanelH ? maxPanelH / tallest : 1;
|
|
3692
|
-
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _reactnative.View, { style: { height:
|
|
3704
|
+
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _reactnative.View, { style: { height: _chunk5UE6Q6CQjs.gridUnitsToPx.call(void 0, grid.h) * scale }, children: grid.cells.map((cell) => /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _reactnative.View, { style: [styles13.gridCell, { left: cell.x * colW, top: _chunk5UE6Q6CQjs.gridOffsetPx.call(void 0, cell.y) * scale }], children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, PanelCard, { panel: cell.panel, width: cell.w * colW - GAP, height: _chunk5UE6Q6CQjs.gridUnitsToPx.call(void 0, cell.h) * scale, deferred }) }, cell.key)) });
|
|
3693
3705
|
}
|
|
3694
3706
|
function useSeenSections(viewportHeight) {
|
|
3695
3707
|
const [seen, setSeen] = _react.useState.call(void 0, /* @__PURE__ */ new Set());
|
|
@@ -3748,12 +3760,12 @@ function PanelCardContent({ panel, width, height, deferred }) {
|
|
|
3748
3760
|
const theme = useDashTheme();
|
|
3749
3761
|
const { dashboard, variables, variableInfo: variableInfo2 } = useDashboard();
|
|
3750
3762
|
const { resolve, openLinks } = usePanelLinks(panel);
|
|
3751
|
-
const input =
|
|
3763
|
+
const input = _chunk5UE6Q6CQjs.isInputPanel.call(void 0, panel);
|
|
3752
3764
|
const form = _react.useContext.call(void 0, InputFormContext);
|
|
3753
3765
|
const problem = input ? _optionalChain([form, 'optionalAccess', _265 => _265.problem, 'optionalCall', _266 => _266(panel.options.metric)]) : void 0;
|
|
3754
3766
|
const hasLinks = !!_optionalChain([panel, 'access', _267 => _267.links, 'optionalAccess', _268 => _268.length]);
|
|
3755
3767
|
const hasTitle = !!panel.title || hasLinks || !!problem;
|
|
3756
|
-
const title = panel.title ?
|
|
3768
|
+
const title = panel.title ? _chunk5UE6Q6CQjs.interpolate.call(void 0, panel.title, { values: variables, info: variableInfo2, scoped: panel.scopedVars, timezone: dashboard.timezone }) : "";
|
|
3757
3769
|
return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _reactnative.View, { style: [styles13.card, { width, height, backgroundColor: theme.surface, borderColor: theme.border }], children: [
|
|
3758
3770
|
hasTitle && /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _reactnative.View, { style: styles13.titleRow, children: [
|
|
3759
3771
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _reactnative.Text, { style: [styles13.title, { color: theme.text }], numberOfLines: 1, children: title }),
|
|
@@ -3775,7 +3787,7 @@ function PanelCardContent({ panel, width, height, deferred }) {
|
|
|
3775
3787
|
}
|
|
3776
3788
|
function DataPanelBody({ panel, width, height }) {
|
|
3777
3789
|
const theme = useDashTheme();
|
|
3778
|
-
const needsData =
|
|
3790
|
+
const needsData = _chunk5UE6Q6CQjs.panelHasQueries.call(void 0, panel);
|
|
3779
3791
|
const data = usePanelData(panel, width, needsData);
|
|
3780
3792
|
const Component2 = panelComponent(panel.type);
|
|
3781
3793
|
if (needsData && data.error) {
|
|
@@ -3817,13 +3829,13 @@ function savedValues(panels, entries) {
|
|
|
3817
3829
|
const values = {};
|
|
3818
3830
|
for (const p of panels) {
|
|
3819
3831
|
const mine = entries.filter((e) => e.metric === p.options.metric);
|
|
3820
|
-
values[p.options.metric] = p.options.multi ? mine.length ? mine.map((e) => _nullishCoalesce(e.text, () => ( e.value))) : null :
|
|
3832
|
+
values[p.options.metric] = p.options.multi ? mine.length ? mine.map((e) => _nullishCoalesce(e.text, () => ( e.value))) : null : _chunk5UE6Q6CQjs.entryToInputValue.call(void 0, p, mine[0]);
|
|
3821
3833
|
}
|
|
3822
3834
|
return values;
|
|
3823
3835
|
}
|
|
3824
3836
|
function InputForm({ dashboard, store, onSaved, choices = NO_CHOICES, header, timestamp, defaults: given = NO_DEFAULTS, beforeSave, editing }) {
|
|
3825
3837
|
const theme = useDashTheme();
|
|
3826
|
-
const panels = _react.useMemo.call(void 0, () =>
|
|
3838
|
+
const panels = _react.useMemo.call(void 0, () => _chunk5UE6Q6CQjs.inputPanels.call(void 0, dashboard), [dashboard]);
|
|
3827
3839
|
const saved = _react.useMemo.call(void 0, () => editing ? savedValues(panels, editing) : NO_DEFAULTS, [panels, editing]);
|
|
3828
3840
|
const [defaults, setDefaults] = _react.useState.call(void 0, {});
|
|
3829
3841
|
const [edits, setEdits] = _react.useState.call(void 0, {});
|
|
@@ -3837,7 +3849,7 @@ function InputForm({ dashboard, store, onSaved, choices = NO_CHOICES, header, ti
|
|
|
3837
3849
|
const next = {};
|
|
3838
3850
|
for (const p of panels) {
|
|
3839
3851
|
const d = p.options.default;
|
|
3840
|
-
if (d === "last") next[p.options.metric] =
|
|
3852
|
+
if (d === "last") next[p.options.metric] = _chunk5UE6Q6CQjs.entryToInputValue.call(void 0, p, await store.latest(p.options.metric));
|
|
3841
3853
|
else if (d !== void 0) next[p.options.metric] = d;
|
|
3842
3854
|
}
|
|
3843
3855
|
if (mine === run) setDefaults(next);
|
|
@@ -3862,14 +3874,14 @@ function InputForm({ dashboard, store, onSaved, choices = NO_CHOICES, header, ti
|
|
|
3862
3874
|
choices,
|
|
3863
3875
|
problem: (m) => {
|
|
3864
3876
|
const p = panels.find((x) => x.options.metric === m);
|
|
3865
|
-
return p && (checked || m in edits) ?
|
|
3877
|
+
return p && (checked || m in edits) ? _chunk5UE6Q6CQjs.inputProblem.call(void 0, p, value(m)) : void 0;
|
|
3866
3878
|
}
|
|
3867
3879
|
};
|
|
3868
3880
|
}, [edits, saved, defaults, given, store, choices, panels, checked]);
|
|
3869
3881
|
const dirty = Object.keys(edits).length;
|
|
3870
3882
|
const save = _react.useCallback.call(void 0, async () => {
|
|
3871
3883
|
const problems = panels.flatMap((p) => {
|
|
3872
|
-
const problem =
|
|
3884
|
+
const problem = _chunk5UE6Q6CQjs.inputProblem.call(void 0, p, state.value(p.options.metric));
|
|
3873
3885
|
return problem ? [`${p.title || p.options.metric}: ${problem.toLowerCase()}`] : [];
|
|
3874
3886
|
});
|
|
3875
3887
|
if (problems.length) {
|
|
@@ -3878,7 +3890,7 @@ function InputForm({ dashboard, store, onSaved, choices = NO_CHOICES, header, ti
|
|
|
3878
3890
|
return;
|
|
3879
3891
|
}
|
|
3880
3892
|
const ts = _nullishCoalesce(_optionalChain([editing, 'optionalAccess', _269 => _269[0], 'optionalAccess', _270 => _270.ts]), () => ( (header !== void 0 ? _nullishCoalesce(_optionalChain([timestamp, 'optionalCall', _271 => _271()]), () => ( Date.now())) : Date.now() + offsetMs)));
|
|
3881
|
-
const entries = panels.filter((p) => editing || p.options.metric in edits || p.options.record === "always").flatMap((p) =>
|
|
3893
|
+
const entries = panels.filter((p) => editing || p.options.metric in edits || p.options.record === "always").flatMap((p) => _chunk5UE6Q6CQjs.toEntries.call(void 0, p, state.value(p.options.metric), ts));
|
|
3882
3894
|
if (!entries.length) return;
|
|
3883
3895
|
const extra = beforeSave ? await beforeSave(ts) : [];
|
|
3884
3896
|
if (!extra) return;
|
|
@@ -4177,4 +4189,16 @@ var styles14 = _reactnative.StyleSheet.create({
|
|
|
4177
4189
|
|
|
4178
4190
|
|
|
4179
4191
|
|
|
4180
|
-
exports.ALL = _chunkHZEXKGDSjs.ALL; exports.BUNDLE_ACCEPT = _chunkHZEXKGDSjs.BUNDLE_ACCEPT; exports.BUNDLE_TYPE = _chunkHZEXKGDSjs.BUNDLE_TYPE; exports.CANVAS_GAP = _chunkHZEXKGDSjs.CANVAS_GAP; exports.CANVAS_ROW_HEADER = _chunkHZEXKGDSjs.CANVAS_ROW_HEADER; exports.Calendar = Calendar; exports.Chip = Chip; exports.ConfigLoader = _chunkHZEXKGDSjs.ConfigLoader; exports.DASHBOARD_DS = _chunkHZEXKGDSjs.DASHBOARD_DS; exports.DEFAULT_GAZETTEER = _chunkHZEXKGDSjs.DEFAULT_GAZETTEER; exports.DashThemeProvider = DashThemeProvider; exports.DashboardProvider = DashboardProvider; exports.DashboardToolbar = DashboardToolbar; exports.DashboardView = DashboardView; exports.EDITABLE_VARIABLE_TYPES = _chunkHZEXKGDSjs.EDITABLE_VARIABLE_TYPES; exports.GRID_COLUMNS = _chunkHZEXKGDSjs.GRID_COLUMNS; exports.GrafanaClient = _chunkHZEXKGDSjs.GrafanaClient; exports.GrafanaDataSource = _chunkHZEXKGDSjs.GrafanaDataSource; exports.GrafanaError = _chunkHZEXKGDSjs.GrafanaError; exports.HttpConfigFiles = _chunkHZEXKGDSjs.HttpConfigFiles; exports.INPUT_OPTION_KEYS = _chunkHZEXKGDSjs.INPUT_OPTION_KEYS; exports.INPUT_TYPES = _chunkHZEXKGDSjs.INPUT_TYPES; exports.InputForm = InputForm; exports.InputFormContext = InputFormContext; exports.LOCAL_DATASOURCE_TYPE = _chunkHZEXKGDSjs.LOCAL_DATASOURCE_TYPE; exports.Legend = Legend; exports.LocalDataSource = _chunkHZEXKGDSjs.LocalDataSource; exports.MANIFEST_VERSION = _chunkHZEXKGDSjs.MANIFEST_VERSION; exports.MAPPING_TYPES = _chunkHZEXKGDSjs.MAPPING_TYPES; exports.MemoryEntryStore = _chunkHZEXKGDSjs.MemoryEntryStore; exports.NAMED_COLORS = _chunkHZEXKGDSjs.NAMED_COLORS; exports.NoData = NoData; exports.OPTION_CATEGORIES = _chunkHZEXKGDSjs.OPTION_CATEGORIES; exports.OVERRIDE_MATCHERS = _chunkHZEXKGDSjs.OVERRIDE_MATCHERS; exports.PANEL_TYPES = _chunkHZEXKGDSjs.PANEL_TYPES; exports.PanelCard = PanelCard; exports.REDUCER_LABELS = _chunkHZEXKGDSjs.REDUCER_LABELS; exports.REFRESH_CHOICES = _chunkHZEXKGDSjs.REFRESH_CHOICES; exports.RELATIVE_RANGES = _chunkHZEXKGDSjs.RELATIVE_RANGES; exports.RenderBoundary = RenderBoundary; exports.SERIES_PALETTE = _chunkHZEXKGDSjs.SERIES_PALETTE; exports.SPECIAL_MATCHES = _chunkHZEXKGDSjs.SPECIAL_MATCHES; exports.SaveConflictError = _chunkHZEXKGDSjs.SaveConflictError; exports.TIME_PRESETS = _chunkHZEXKGDSjs.TIME_PRESETS; exports.UNIT_CHOICES = _chunkHZEXKGDSjs.UNIT_CHOICES; exports.addTime = _chunkHZEXKGDSjs.addTime; exports.appSchema = _chunkHZEXKGDSjs.appSchema; exports.applyDashboardLink = _chunkHZEXKGDSjs.applyDashboardLink; exports.applyJsonEdits = _chunkHZEXKGDSjs.applyJsonEdits; exports.applyTransformations = _chunkHZEXKGDSjs.applyTransformations; exports.assembleBundle = _chunkHZEXKGDSjs.assembleBundle; exports.assembleFromResponse = _chunkHZEXKGDSjs.assembleFromResponse; exports.buildFrames = _chunkHZEXKGDSjs.buildFrames; exports.bundleFromFiles = _chunkHZEXKGDSjs.bundleFromFiles; exports.bundleRoot = _chunkHZEXKGDSjs.bundleRoot; exports.calculateInterval = _chunkHZEXKGDSjs.calculateInterval; exports.checkFiles = _chunkHZEXKGDSjs.checkFiles; exports.cleanDashboard = _chunkHZEXKGDSjs.cleanDashboard; exports.cleanPanelOptions = _chunkHZEXKGDSjs.cleanPanelOptions; exports.collapseRow = _chunkHZEXKGDSjs.collapseRow; exports.compactGrid = _chunkHZEXKGDSjs.compactGrid; exports.darkTheme = darkTheme; exports.dashboardSchema = _chunkHZEXKGDSjs.dashboardSchema; exports.dashboardSchemaIssues = _chunkHZEXKGDSjs.dashboardSchemaIssues; exports.dashboardSourceIds = _chunkHZEXKGDSjs.dashboardSourceIds; exports.defaultFetchJson = _chunkHZEXKGDSjs.defaultFetchJson; exports.describeRange = _chunkHZEXKGDSjs.describeRange; exports.diffJson = _chunkHZEXKGDSjs.diffJson; exports.documentIdFor = _chunkHZEXKGDSjs.documentIdFor; exports.documentUses = _chunkHZEXKGDSjs.documentUses; exports.dropTarget = _chunkHZEXKGDSjs.dropTarget; exports.duplicatePanel = _chunkHZEXKGDSjs.duplicatePanel; exports.entriesSavedWith = _chunkHZEXKGDSjs.entriesSavedWith; exports.entryToInputValue = _chunkHZEXKGDSjs.entryToInputValue; exports.expandRow = _chunkHZEXKGDSjs.expandRow; exports.fetchBundle = _chunkHZEXKGDSjs.fetchBundle; exports.fetchJsonWithToken = _chunkHZEXKGDSjs.fetchJsonWithToken; exports.fieldDisplayName = _chunkHZEXKGDSjs.fieldDisplayName; exports.fieldMatches = _chunkHZEXKGDSjs.fieldMatches; exports.formatClock = _chunkHZEXKGDSjs.formatClock; exports.formatDisplay = _chunkHZEXKGDSjs.formatDisplay; exports.formatDuration = _chunkHZEXKGDSjs.formatDuration; exports.formatJsonText = _chunkHZEXKGDSjs.formatJsonText; exports.formatLocalDateTime = _chunkHZEXKGDSjs.formatLocalDateTime; exports.formatValue = _chunkHZEXKGDSjs.formatValue; exports.frameLength = _chunkHZEXKGDSjs.frameLength; exports.framesToOptions = _chunkHZEXKGDSjs.framesToOptions; exports.fromWire = _chunkHZEXKGDSjs.fromWire; exports.getPath = _chunkHZEXKGDSjs.getPath; exports.gridOffsetPx = _chunkHZEXKGDSjs.gridOffsetPx; exports.gridUnitsToPx = _chunkHZEXKGDSjs.gridUnitsToPx; exports.httpFetchJson = _chunkHZEXKGDSjs.httpFetchJson; exports.initialVariableValues = _chunkHZEXKGDSjs.initialVariableValues; exports.inputPanels = _chunkHZEXKGDSjs.inputPanels; exports.inputProblem = _chunkHZEXKGDSjs.inputProblem; exports.insertPanel = _chunkHZEXKGDSjs.insertPanel; exports.interpolate = _chunkHZEXKGDSjs.interpolate; exports.interpolateDeep = _chunkHZEXKGDSjs.interpolateDeep; exports.isBundleResponse = _chunkHZEXKGDSjs.isBundleResponse; exports.isEditableVariableType = _chunkHZEXKGDSjs.isEditableVariableType; exports.isInputPanel = _chunkHZEXKGDSjs.isInputPanel; exports.isInputType = _chunkHZEXKGDSjs.isInputType; exports.isLocalDatasource = _chunkHZEXKGDSjs.isLocalDatasource; exports.isReducer = _chunkHZEXKGDSjs.isReducer; exports.isRow = _chunkHZEXKGDSjs.isRow; exports.isSqlDatasource = _chunkHZEXKGDSjs.isSqlDatasource; exports.layoutCanvas = _chunkHZEXKGDSjs.layoutCanvas; exports.layoutDashboard = _chunkHZEXKGDSjs.layoutDashboard; exports.lightTheme = lightTheme; exports.lineColumn = _chunkHZEXKGDSjs.lineColumn; exports.loadGazetteer = _chunkHZEXKGDSjs.loadGazetteer; exports.locate = _chunkHZEXKGDSjs.locate; exports.manifestSchemaIssues = _chunkHZEXKGDSjs.manifestSchemaIssues; exports.mappedResult = _chunkHZEXKGDSjs.mappedResult; exports.mappingProblem = _chunkHZEXKGDSjs.mappingProblem; exports.mappingRow = _chunkHZEXKGDSjs.mappingRow; exports.mappingRows = _chunkHZEXKGDSjs.mappingRows; exports.metricChanges = _chunkHZEXKGDSjs.metricChanges; exports.movePanel = _chunkHZEXKGDSjs.movePanel; exports.newDocument = _chunkHZEXKGDSjs.newDocument; exports.newPanel = _chunkHZEXKGDSjs.newPanel; exports.newVariable = _chunkHZEXKGDSjs.newVariable; exports.nextPanelId = _chunkHZEXKGDSjs.nextPanelId; exports.normalizeRef = _chunkHZEXKGDSjs.normalizeRef; exports.numberFields = _chunkHZEXKGDSjs.numberFields; exports.optionValue = _chunkHZEXKGDSjs.optionValue; exports.overrideProperties = _chunkHZEXKGDSjs.overrideProperties; exports.panelEdits = _chunkHZEXKGDSjs.panelEdits; exports.panelHasQueries = _chunkHZEXKGDSjs.panelHasQueries; exports.panelKey = _chunkHZEXKGDSjs.panelKey; exports.panelOptions = _chunkHZEXKGDSjs.panelOptions; exports.panelOverrides = _chunkHZEXKGDSjs.panelOverrides; exports.panelSize = _chunkHZEXKGDSjs.panelSize; exports.panelSpan = _chunkHZEXKGDSjs.panelSpan; exports.parseClockDigits = _chunkHZEXKGDSjs.parseClockDigits; exports.parseDashboardLink = _chunkHZEXKGDSjs.parseDashboardLink; exports.parseDuration = _chunkHZEXKGDSjs.parseDuration; exports.parseGazetteer = _chunkHZEXKGDSjs.parseGazetteer; exports.parseJsonText = _chunkHZEXKGDSjs.parseJsonText; exports.parseLocalDateTime = _chunkHZEXKGDSjs.parseLocalDateTime; exports.parseRange = _chunkHZEXKGDSjs.parseRange; exports.parseTime = _chunkHZEXKGDSjs.parseTime; exports.placePanel = _chunkHZEXKGDSjs.placePanel; exports.pointerToPath = _chunkHZEXKGDSjs.pointerToPath; exports.prepareDashboard = _chunkHZEXKGDSjs.prepareDashboard; exports.queryPanel = _chunkHZEXKGDSjs.queryPanel; exports.queryParam = _chunkHZEXKGDSjs.queryParam; exports.readConfigFiles = _chunkHZEXKGDSjs.readConfigFiles; exports.readingOrder = _chunkHZEXKGDSjs.readingOrder; exports.reduce = _chunkHZEXKGDSjs.reduce; exports.refineOptions = _chunkHZEXKGDSjs.refineOptions; exports.refreshedVariables = _chunkHZEXKGDSjs.refreshedVariables; exports.registerPanel = registerPanel; exports.removeDocumentFromManifest = _chunkHZEXKGDSjs.removeDocumentFromManifest; exports.removePanel = _chunkHZEXKGDSjs.removePanel; exports.renameDocumentInManifest = _chunkHZEXKGDSjs.renameDocumentInManifest; exports.renameVariableInPanels = _chunkHZEXKGDSjs.renameVariableInPanels; exports.repack = _chunkHZEXKGDSjs.repack; exports.repeatOptions = _chunkHZEXKGDSjs.repeatOptions; exports.resizePanel = _chunkHZEXKGDSjs.resizePanel; exports.resolveColor = _chunkHZEXKGDSjs.resolveColor; exports.resolveFieldConfig = _chunkHZEXKGDSjs.resolveFieldConfig; exports.resolveLinks = _chunkHZEXKGDSjs.resolveLinks; exports.resolveTimezone = _chunkHZEXKGDSjs.resolveTimezone; exports.resolveUrl = _chunkHZEXKGDSjs.resolveUrl; exports.resolveVariables = _chunkHZEXKGDSjs.resolveVariables; exports.revalidateBundle = _chunkHZEXKGDSjs.revalidateBundle; exports.rowsToMappings = _chunkHZEXKGDSjs.rowsToMappings; exports.sampleEntries = _chunkHZEXKGDSjs.sampleEntries; exports.screenDocuments = _chunkHZEXKGDSjs.screenDocuments; exports.screenOfType = _chunkHZEXKGDSjs.screenOfType; exports.selectValue = _chunkHZEXKGDSjs.selectValue; exports.seriesColor = _chunkHZEXKGDSjs.seriesColor; exports.setHiddenOnPhones = _chunkHZEXKGDSjs.setHiddenOnPhones; exports.setJsonValue = _chunkHZEXKGDSjs.setJsonValue; exports.setOption = _chunkHZEXKGDSjs.setOption; exports.setOptionValue = _chunkHZEXKGDSjs.setOptionValue; exports.setOverrides = _chunkHZEXKGDSjs.setOverrides; exports.settleLayout = _chunkHZEXKGDSjs.settleLayout; exports.snapToGrid = _chunkHZEXKGDSjs.snapToGrid; exports.splitPath = _chunkHZEXKGDSjs.splitPath; exports.startOf = _chunkHZEXKGDSjs.startOf; exports.stringifyCompact = _chunkHZEXKGDSjs.stringifyCompact; exports.tabIdFor = _chunkHZEXKGDSjs.tabIdFor; exports.textSuggestions = _chunkHZEXKGDSjs.textSuggestions; exports.thresholdStep = _chunkHZEXKGDSjs.thresholdStep; exports.timeExprError = _chunkHZEXKGDSjs.timeExprError; exports.timeField = _chunkHZEXKGDSjs.timeField; exports.toEntries = _chunkHZEXKGDSjs.toEntries; exports.toMillis = _chunkHZEXKGDSjs.toMillis; exports.toSeries = _chunkHZEXKGDSjs.toSeries; exports.toXYSeries = _chunkHZEXKGDSjs.toXYSeries; exports.uniqueNames = _chunkHZEXKGDSjs.uniqueNames; exports.useDashTheme = useDashTheme; exports.useDashboard = useDashboard; exports.useInputForm = useInputForm; exports.usePanelData = usePanelData; exports.validateBundle = _chunkHZEXKGDSjs.validateBundle; exports.validateDashboard = _chunkHZEXKGDSjs.validateDashboard; exports.validateManifest = _chunkHZEXKGDSjs.validateManifest; exports.valueColor = _chunkHZEXKGDSjs.valueColor; exports.valueText = _chunkHZEXKGDSjs.valueText; exports.variableDependents = _chunkHZEXKGDSjs.variableDependents; exports.variableInfo = _chunkHZEXKGDSjs.variableInfo; exports.variableNameError = _chunkHZEXKGDSjs.variableNameError; exports.variableOptions = _chunkHZEXKGDSjs.variableOptions; exports.variableOrder = _chunkHZEXKGDSjs.variableOrder; exports.variableReferences = _chunkHZEXKGDSjs.variableReferences; exports.variableUses = _chunkHZEXKGDSjs.variableUses; exports.variableWithCurrent = _chunkHZEXKGDSjs.variableWithCurrent; exports.variableWithFlags = _chunkHZEXKGDSjs.variableWithFlags; exports.variableWithQuery = _chunkHZEXKGDSjs.variableWithQuery; exports.variableWithType = _chunkHZEXKGDSjs.variableWithType; exports.visibleVariables = _chunkHZEXKGDSjs.visibleVariables; exports.zoomRange = _chunkHZEXKGDSjs.zoomRange;
|
|
4192
|
+
|
|
4193
|
+
|
|
4194
|
+
|
|
4195
|
+
|
|
4196
|
+
|
|
4197
|
+
|
|
4198
|
+
|
|
4199
|
+
|
|
4200
|
+
|
|
4201
|
+
|
|
4202
|
+
|
|
4203
|
+
|
|
4204
|
+
exports.ALL = _chunk5UE6Q6CQjs.ALL; exports.BUNDLE_ACCEPT = _chunk5UE6Q6CQjs.BUNDLE_ACCEPT; exports.BUNDLE_TYPE = _chunk5UE6Q6CQjs.BUNDLE_TYPE; exports.CANVAS_GAP = _chunk5UE6Q6CQjs.CANVAS_GAP; exports.CANVAS_ROW_HEADER = _chunk5UE6Q6CQjs.CANVAS_ROW_HEADER; exports.Calendar = Calendar; exports.Chip = Chip; exports.ConfigLoader = _chunk5UE6Q6CQjs.ConfigLoader; exports.DASHBOARD_DS = _chunk5UE6Q6CQjs.DASHBOARD_DS; exports.DEFAULT_GAZETTEER = _chunk5UE6Q6CQjs.DEFAULT_GAZETTEER; exports.DashThemeProvider = DashThemeProvider; exports.DashboardProvider = DashboardProvider; exports.DashboardToolbar = DashboardToolbar; exports.DashboardView = DashboardView; exports.EDITABLE_VARIABLE_TYPES = _chunk5UE6Q6CQjs.EDITABLE_VARIABLE_TYPES; exports.GRID_COLUMNS = _chunk5UE6Q6CQjs.GRID_COLUMNS; exports.GrafanaClient = _chunk5UE6Q6CQjs.GrafanaClient; exports.GrafanaDataSource = _chunk5UE6Q6CQjs.GrafanaDataSource; exports.GrafanaError = _chunk5UE6Q6CQjs.GrafanaError; exports.HttpConfigFiles = _chunk5UE6Q6CQjs.HttpConfigFiles; exports.INPUT_OPTION_KEYS = _chunk5UE6Q6CQjs.INPUT_OPTION_KEYS; exports.INPUT_TYPES = _chunk5UE6Q6CQjs.INPUT_TYPES; exports.InputForm = InputForm; exports.InputFormContext = InputFormContext; exports.LOCAL_DATASOURCE_TYPE = _chunk5UE6Q6CQjs.LOCAL_DATASOURCE_TYPE; exports.Legend = Legend; exports.LocalDataSource = _chunk5UE6Q6CQjs.LocalDataSource; exports.MANIFEST_VERSION = _chunk5UE6Q6CQjs.MANIFEST_VERSION; exports.MAPPING_TYPES = _chunk5UE6Q6CQjs.MAPPING_TYPES; exports.MemoryEntryStore = _chunk5UE6Q6CQjs.MemoryEntryStore; exports.NAMED_COLORS = _chunk5UE6Q6CQjs.NAMED_COLORS; exports.NoData = NoData; exports.OPTION_CATEGORIES = _chunk5UE6Q6CQjs.OPTION_CATEGORIES; exports.OVERRIDE_MATCHERS = _chunk5UE6Q6CQjs.OVERRIDE_MATCHERS; exports.PANEL_TYPES = _chunk5UE6Q6CQjs.PANEL_TYPES; exports.PanelCard = PanelCard; exports.REDUCER_LABELS = _chunk5UE6Q6CQjs.REDUCER_LABELS; exports.REFRESH_CHOICES = _chunk5UE6Q6CQjs.REFRESH_CHOICES; exports.RELATIVE_RANGES = _chunk5UE6Q6CQjs.RELATIVE_RANGES; exports.RenderBoundary = RenderBoundary; exports.SERIES_PALETTE = _chunk5UE6Q6CQjs.SERIES_PALETTE; exports.SNIPPET_VERSION = _chunk5UE6Q6CQjs.SNIPPET_VERSION; exports.SPECIAL_MATCHES = _chunk5UE6Q6CQjs.SPECIAL_MATCHES; exports.SaveConflictError = _chunk5UE6Q6CQjs.SaveConflictError; exports.TEMPLATE_VERSION = _chunk5UE6Q6CQjs.TEMPLATE_VERSION; exports.TIME_PRESETS = _chunk5UE6Q6CQjs.TIME_PRESETS; exports.UNIT_CHOICES = _chunk5UE6Q6CQjs.UNIT_CHOICES; exports.addTime = _chunk5UE6Q6CQjs.addTime; exports.appSchema = _chunk5UE6Q6CQjs.appSchema; exports.applyDashboardLink = _chunk5UE6Q6CQjs.applyDashboardLink; exports.applyJsonEdits = _chunk5UE6Q6CQjs.applyJsonEdits; exports.applyTemplate = _chunk5UE6Q6CQjs.applyTemplate; exports.applyTransformations = _chunk5UE6Q6CQjs.applyTransformations; exports.assembleBundle = _chunk5UE6Q6CQjs.assembleBundle; exports.assembleFromResponse = _chunk5UE6Q6CQjs.assembleFromResponse; exports.buildFrames = _chunk5UE6Q6CQjs.buildFrames; exports.bundleFromFiles = _chunk5UE6Q6CQjs.bundleFromFiles; exports.bundleRoot = _chunk5UE6Q6CQjs.bundleRoot; exports.calculateInterval = _chunk5UE6Q6CQjs.calculateInterval; exports.checkFiles = _chunk5UE6Q6CQjs.checkFiles; exports.cleanDashboard = _chunk5UE6Q6CQjs.cleanDashboard; exports.cleanPanelOptions = _chunk5UE6Q6CQjs.cleanPanelOptions; exports.collapseRow = _chunk5UE6Q6CQjs.collapseRow; exports.compactGrid = _chunk5UE6Q6CQjs.compactGrid; exports.copyPanels = _chunk5UE6Q6CQjs.copyPanels; exports.darkTheme = darkTheme; exports.dashboardSchema = _chunk5UE6Q6CQjs.dashboardSchema; exports.dashboardSchemaIssues = _chunk5UE6Q6CQjs.dashboardSchemaIssues; exports.dashboardSourceIds = _chunk5UE6Q6CQjs.dashboardSourceIds; exports.defaultFetchJson = _chunk5UE6Q6CQjs.defaultFetchJson; exports.describeRange = _chunk5UE6Q6CQjs.describeRange; exports.diffJson = _chunk5UE6Q6CQjs.diffJson; exports.documentIdFor = _chunk5UE6Q6CQjs.documentIdFor; exports.documentUses = _chunk5UE6Q6CQjs.documentUses; exports.dropTarget = _chunk5UE6Q6CQjs.dropTarget; exports.duplicatePanel = _chunk5UE6Q6CQjs.duplicatePanel; exports.entriesSavedWith = _chunk5UE6Q6CQjs.entriesSavedWith; exports.entryToInputValue = _chunk5UE6Q6CQjs.entryToInputValue; exports.expandRow = _chunk5UE6Q6CQjs.expandRow; exports.fetchBundle = _chunk5UE6Q6CQjs.fetchBundle; exports.fetchJsonWithToken = _chunk5UE6Q6CQjs.fetchJsonWithToken; exports.fieldDisplayName = _chunk5UE6Q6CQjs.fieldDisplayName; exports.fieldMatches = _chunk5UE6Q6CQjs.fieldMatches; exports.formatClock = _chunk5UE6Q6CQjs.formatClock; exports.formatDisplay = _chunk5UE6Q6CQjs.formatDisplay; exports.formatDuration = _chunk5UE6Q6CQjs.formatDuration; exports.formatJsonText = _chunk5UE6Q6CQjs.formatJsonText; exports.formatLocalDateTime = _chunk5UE6Q6CQjs.formatLocalDateTime; exports.formatValue = _chunk5UE6Q6CQjs.formatValue; exports.frameLength = _chunk5UE6Q6CQjs.frameLength; exports.framesToOptions = _chunk5UE6Q6CQjs.framesToOptions; exports.fromWire = _chunk5UE6Q6CQjs.fromWire; exports.getPath = _chunk5UE6Q6CQjs.getPath; exports.gridOffsetPx = _chunk5UE6Q6CQjs.gridOffsetPx; exports.gridUnitsToPx = _chunk5UE6Q6CQjs.gridUnitsToPx; exports.httpFetchJson = _chunk5UE6Q6CQjs.httpFetchJson; exports.initialVariableValues = _chunk5UE6Q6CQjs.initialVariableValues; exports.inputPanels = _chunk5UE6Q6CQjs.inputPanels; exports.inputProblem = _chunk5UE6Q6CQjs.inputProblem; exports.insertPanel = _chunk5UE6Q6CQjs.insertPanel; exports.interpolate = _chunk5UE6Q6CQjs.interpolate; exports.interpolateDeep = _chunk5UE6Q6CQjs.interpolateDeep; exports.isBundleResponse = _chunk5UE6Q6CQjs.isBundleResponse; exports.isEditableVariableType = _chunk5UE6Q6CQjs.isEditableVariableType; exports.isInputPanel = _chunk5UE6Q6CQjs.isInputPanel; exports.isInputType = _chunk5UE6Q6CQjs.isInputType; exports.isLocalDatasource = _chunk5UE6Q6CQjs.isLocalDatasource; exports.isReducer = _chunk5UE6Q6CQjs.isReducer; exports.isRow = _chunk5UE6Q6CQjs.isRow; exports.isSqlDatasource = _chunk5UE6Q6CQjs.isSqlDatasource; exports.layoutCanvas = _chunk5UE6Q6CQjs.layoutCanvas; exports.layoutDashboard = _chunk5UE6Q6CQjs.layoutDashboard; exports.lightTheme = lightTheme; exports.lineColumn = _chunk5UE6Q6CQjs.lineColumn; exports.loadGazetteer = _chunk5UE6Q6CQjs.loadGazetteer; exports.locate = _chunk5UE6Q6CQjs.locate; exports.makeTemplate = _chunk5UE6Q6CQjs.makeTemplate; exports.manifestSchemaIssues = _chunk5UE6Q6CQjs.manifestSchemaIssues; exports.mappedResult = _chunk5UE6Q6CQjs.mappedResult; exports.mappingProblem = _chunk5UE6Q6CQjs.mappingProblem; exports.mappingRow = _chunk5UE6Q6CQjs.mappingRow; exports.mappingRows = _chunk5UE6Q6CQjs.mappingRows; exports.metricChanges = _chunk5UE6Q6CQjs.metricChanges; exports.movePanel = _chunk5UE6Q6CQjs.movePanel; exports.newDocument = _chunk5UE6Q6CQjs.newDocument; exports.newPanel = _chunk5UE6Q6CQjs.newPanel; exports.newVariable = _chunk5UE6Q6CQjs.newVariable; exports.nextPanelId = _chunk5UE6Q6CQjs.nextPanelId; exports.normalizeRef = _chunk5UE6Q6CQjs.normalizeRef; exports.numberFields = _chunk5UE6Q6CQjs.numberFields; exports.optionValue = _chunk5UE6Q6CQjs.optionValue; exports.overrideProperties = _chunk5UE6Q6CQjs.overrideProperties; exports.panelEdits = _chunk5UE6Q6CQjs.panelEdits; exports.panelHasQueries = _chunk5UE6Q6CQjs.panelHasQueries; exports.panelKey = _chunk5UE6Q6CQjs.panelKey; exports.panelMetrics = _chunk5UE6Q6CQjs.panelMetrics; exports.panelOptions = _chunk5UE6Q6CQjs.panelOptions; exports.panelOverrides = _chunk5UE6Q6CQjs.panelOverrides; exports.panelSize = _chunk5UE6Q6CQjs.panelSize; exports.panelSpan = _chunk5UE6Q6CQjs.panelSpan; exports.parseClockDigits = _chunk5UE6Q6CQjs.parseClockDigits; exports.parseDashboardLink = _chunk5UE6Q6CQjs.parseDashboardLink; exports.parseDuration = _chunk5UE6Q6CQjs.parseDuration; exports.parseGazetteer = _chunk5UE6Q6CQjs.parseGazetteer; exports.parseJsonText = _chunk5UE6Q6CQjs.parseJsonText; exports.parseLocalDateTime = _chunk5UE6Q6CQjs.parseLocalDateTime; exports.parseRange = _chunk5UE6Q6CQjs.parseRange; exports.parseSnippet = _chunk5UE6Q6CQjs.parseSnippet; exports.parseTemplate = _chunk5UE6Q6CQjs.parseTemplate; exports.parseTime = _chunk5UE6Q6CQjs.parseTime; exports.pasteSnippet = _chunk5UE6Q6CQjs.pasteSnippet; exports.placePanel = _chunk5UE6Q6CQjs.placePanel; exports.pointerToPath = _chunk5UE6Q6CQjs.pointerToPath; exports.prepareDashboard = _chunk5UE6Q6CQjs.prepareDashboard; exports.previewPaste = _chunk5UE6Q6CQjs.previewPaste; exports.queryPanel = _chunk5UE6Q6CQjs.queryPanel; exports.queryParam = _chunk5UE6Q6CQjs.queryParam; exports.readConfigFiles = _chunk5UE6Q6CQjs.readConfigFiles; exports.readingOrder = _chunk5UE6Q6CQjs.readingOrder; exports.reduce = _chunk5UE6Q6CQjs.reduce; exports.refineOptions = _chunk5UE6Q6CQjs.refineOptions; exports.refreshedVariables = _chunk5UE6Q6CQjs.refreshedVariables; exports.registerPanel = registerPanel; exports.removeDocumentFromManifest = _chunk5UE6Q6CQjs.removeDocumentFromManifest; exports.removePanel = _chunk5UE6Q6CQjs.removePanel; exports.renameDocumentInManifest = _chunk5UE6Q6CQjs.renameDocumentInManifest; exports.renameMetrics = _chunk5UE6Q6CQjs.renameMetrics; exports.renameVariableInPanels = _chunk5UE6Q6CQjs.renameVariableInPanels; exports.repack = _chunk5UE6Q6CQjs.repack; exports.repeatOptions = _chunk5UE6Q6CQjs.repeatOptions; exports.resizePanel = _chunk5UE6Q6CQjs.resizePanel; exports.resolveColor = _chunk5UE6Q6CQjs.resolveColor; exports.resolveFieldConfig = _chunk5UE6Q6CQjs.resolveFieldConfig; exports.resolveLinks = _chunk5UE6Q6CQjs.resolveLinks; exports.resolveTimezone = _chunk5UE6Q6CQjs.resolveTimezone; exports.resolveUrl = _chunk5UE6Q6CQjs.resolveUrl; exports.resolveVariables = _chunk5UE6Q6CQjs.resolveVariables; exports.revalidateBundle = _chunk5UE6Q6CQjs.revalidateBundle; exports.rowsToMappings = _chunk5UE6Q6CQjs.rowsToMappings; exports.sampleEntries = _chunk5UE6Q6CQjs.sampleEntries; exports.screenDocuments = _chunk5UE6Q6CQjs.screenDocuments; exports.screenOfType = _chunk5UE6Q6CQjs.screenOfType; exports.selectValue = _chunk5UE6Q6CQjs.selectValue; exports.seriesColor = _chunk5UE6Q6CQjs.seriesColor; exports.setHiddenOnPhones = _chunk5UE6Q6CQjs.setHiddenOnPhones; exports.setJsonValue = _chunk5UE6Q6CQjs.setJsonValue; exports.setOption = _chunk5UE6Q6CQjs.setOption; exports.setOptionValue = _chunk5UE6Q6CQjs.setOptionValue; exports.setOverrides = _chunk5UE6Q6CQjs.setOverrides; exports.settleLayout = _chunk5UE6Q6CQjs.settleLayout; exports.snapToGrid = _chunk5UE6Q6CQjs.snapToGrid; exports.splitPath = _chunk5UE6Q6CQjs.splitPath; exports.startOf = _chunk5UE6Q6CQjs.startOf; exports.stringifyCompact = _chunk5UE6Q6CQjs.stringifyCompact; exports.tabIdFor = _chunk5UE6Q6CQjs.tabIdFor; exports.templateNeeds = _chunk5UE6Q6CQjs.templateNeeds; exports.textSuggestions = _chunk5UE6Q6CQjs.textSuggestions; exports.thresholdStep = _chunk5UE6Q6CQjs.thresholdStep; exports.timeExprError = _chunk5UE6Q6CQjs.timeExprError; exports.timeField = _chunk5UE6Q6CQjs.timeField; exports.toEntries = _chunk5UE6Q6CQjs.toEntries; exports.toMillis = _chunk5UE6Q6CQjs.toMillis; exports.toSeries = _chunk5UE6Q6CQjs.toSeries; exports.toXYSeries = _chunk5UE6Q6CQjs.toXYSeries; exports.uniqueNames = _chunk5UE6Q6CQjs.uniqueNames; exports.useDashTheme = useDashTheme; exports.useDashboard = useDashboard; exports.useInputForm = useInputForm; exports.usePanelData = usePanelData; exports.validateBundle = _chunk5UE6Q6CQjs.validateBundle; exports.validateDashboard = _chunk5UE6Q6CQjs.validateDashboard; exports.validateManifest = _chunk5UE6Q6CQjs.validateManifest; exports.valueColor = _chunk5UE6Q6CQjs.valueColor; exports.valueText = _chunk5UE6Q6CQjs.valueText; exports.variableDependents = _chunk5UE6Q6CQjs.variableDependents; exports.variableInfo = _chunk5UE6Q6CQjs.variableInfo; exports.variableNameError = _chunk5UE6Q6CQjs.variableNameError; exports.variableOptions = _chunk5UE6Q6CQjs.variableOptions; exports.variableOrder = _chunk5UE6Q6CQjs.variableOrder; exports.variableReferences = _chunk5UE6Q6CQjs.variableReferences; exports.variableUses = _chunk5UE6Q6CQjs.variableUses; exports.variableWithCurrent = _chunk5UE6Q6CQjs.variableWithCurrent; exports.variableWithFlags = _chunk5UE6Q6CQjs.variableWithFlags; exports.variableWithQuery = _chunk5UE6Q6CQjs.variableWithQuery; exports.variableWithType = _chunk5UE6Q6CQjs.variableWithType; exports.visibleVariables = _chunk5UE6Q6CQjs.visibleVariables; exports.zoomRange = _chunk5UE6Q6CQjs.zoomRange;
|