@modelform/react-native 0.4.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-ATRMUHKJ.mjs → chunk-5SGVTAFJ.mjs} +147 -1
- package/dist/{chunk-WMRDOYPV.js → chunk-5UE6Q6CQ.js} +147 -1
- package/dist/core/index.d.ts +1 -0
- package/dist/core/index.js +16 -2
- package/dist/core/index.mjs +15 -1
- package/dist/core/snippets.d.ts +4 -0
- package/dist/core/templates.d.ts +74 -0
- package/dist/index.js +148 -134
- package/dist/index.mjs +15 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -200,7 +200,14 @@
|
|
|
200
200
|
|
|
201
201
|
|
|
202
202
|
|
|
203
|
-
|
|
203
|
+
|
|
204
|
+
|
|
205
|
+
|
|
206
|
+
|
|
207
|
+
|
|
208
|
+
|
|
209
|
+
|
|
210
|
+
var _chunk5UE6Q6CQjs = require('./chunk-5UE6Q6CQ.js');
|
|
204
211
|
|
|
205
212
|
// src/ui/theme.tsx
|
|
206
213
|
var _react = require('react');
|
|
@@ -390,7 +397,7 @@ function DashboardProvider({ dashboard, resolve, refreshKey: externalKey = 0, on
|
|
|
390
397
|
if (!dashboard.refresh) return;
|
|
391
398
|
let ms;
|
|
392
399
|
try {
|
|
393
|
-
ms =
|
|
400
|
+
ms = _chunk5UE6Q6CQjs.parseDuration.call(void 0, dashboard.refresh);
|
|
394
401
|
} catch (e2) {
|
|
395
402
|
return;
|
|
396
403
|
}
|
|
@@ -398,7 +405,7 @@ function DashboardProvider({ dashboard, resolve, refreshKey: externalKey = 0, on
|
|
|
398
405
|
return () => clearInterval(id);
|
|
399
406
|
}, [dashboard.refresh, refresh]);
|
|
400
407
|
const refreshKey = tick + externalKey;
|
|
401
|
-
const range3 = _react.useMemo.call(void 0, () =>
|
|
408
|
+
const range3 = _react.useMemo.call(void 0, () => _chunk5UE6Q6CQjs.parseRange.call(void 0, rawRange), [rawRange, refreshKey]);
|
|
402
409
|
const shared = _react.useMemo.call(void 0, () => /* @__PURE__ */ new Map(), [range3, vars.variables, vars.variableInfo]);
|
|
403
410
|
const value = _react.useMemo.call(void 0,
|
|
404
411
|
() => ({
|
|
@@ -435,8 +442,8 @@ function DashboardProvider({ dashboard, resolve, refreshKey: externalKey = 0, on
|
|
|
435
442
|
] });
|
|
436
443
|
}
|
|
437
444
|
function useDashboardVariables(dashboard, resolve, rawRange) {
|
|
438
|
-
const [state, setState] = _react.useState.call(void 0, () => ({ values:
|
|
439
|
-
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);
|
|
440
447
|
const [runKey, setRunKey] = _react.useState.call(void 0, 0);
|
|
441
448
|
const pending = _react.useRef.call(void 0, /* @__PURE__ */ new Set());
|
|
442
449
|
const stateRef = _react.useRef.call(void 0, state);
|
|
@@ -469,7 +476,7 @@ function useDashboardVariables(dashboard, resolve, rawRange) {
|
|
|
469
476
|
setState(update);
|
|
470
477
|
setResolving(false);
|
|
471
478
|
};
|
|
472
|
-
|
|
479
|
+
_chunk5UE6Q6CQjs.resolveVariables.call(void 0, dashboard, { values, options, names, resolve: resolve2, range: _chunk5UE6Q6CQjs.parseRange.call(void 0, rawRange), signal: controller.signal }).then(
|
|
473
480
|
(res) => finish((s) => ({
|
|
474
481
|
// Only the re-run variables change, so a pick made while this ran isn't overwritten.
|
|
475
482
|
values: { ...s.values, ...Object.fromEntries([...names].filter((n) => n in res.values).map((n) => [n, res.values[n]])) },
|
|
@@ -483,11 +490,11 @@ function useDashboardVariables(dashboard, resolve, rawRange) {
|
|
|
483
490
|
const [loadedDashboard, setLoadedDashboard] = _react.useState.call(void 0, dashboard);
|
|
484
491
|
if (dashboard !== loadedDashboard) {
|
|
485
492
|
setLoadedDashboard(dashboard);
|
|
486
|
-
setState((s) => ({ ...s, values: { ...
|
|
493
|
+
setState((s) => ({ ...s, values: { ..._chunk5UE6Q6CQjs.initialVariableValues.call(void 0, dashboard), ...s.values } }));
|
|
487
494
|
}
|
|
488
495
|
_react.useEffect.call(void 0, () => {
|
|
489
|
-
const roots =
|
|
490
|
-
schedule([...roots, ...
|
|
496
|
+
const roots = _chunk5UE6Q6CQjs.refreshedVariables.call(void 0, dashboard, "load");
|
|
497
|
+
schedule([...roots, ..._chunk5UE6Q6CQjs.variableDependents.call(void 0, dashboard, roots)]);
|
|
491
498
|
}, [dashboard, schedule]);
|
|
492
499
|
const mounted = _react.useRef.call(void 0, false);
|
|
493
500
|
_react.useEffect.call(void 0, () => {
|
|
@@ -495,17 +502,17 @@ function useDashboardVariables(dashboard, resolve, rawRange) {
|
|
|
495
502
|
mounted.current = true;
|
|
496
503
|
return;
|
|
497
504
|
}
|
|
498
|
-
const roots =
|
|
499
|
-
schedule([...roots, ...
|
|
505
|
+
const roots = _chunk5UE6Q6CQjs.refreshedVariables.call(void 0, dashboard, "range");
|
|
506
|
+
schedule([...roots, ..._chunk5UE6Q6CQjs.variableDependents.call(void 0, dashboard, roots)]);
|
|
500
507
|
}, [rawRange]);
|
|
501
508
|
const setVariable = _react.useCallback.call(void 0,
|
|
502
509
|
(name, value) => {
|
|
503
510
|
setState((s) => ({ ...s, values: { ...s.values, [name]: value } }));
|
|
504
|
-
schedule(
|
|
511
|
+
schedule(_chunk5UE6Q6CQjs.variableDependents.call(void 0, dashboard, [name]));
|
|
505
512
|
},
|
|
506
513
|
[dashboard, schedule]
|
|
507
514
|
);
|
|
508
|
-
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]);
|
|
509
516
|
return _react.useMemo.call(void 0,
|
|
510
517
|
() => ({
|
|
511
518
|
variables: state.values,
|
|
@@ -535,7 +542,7 @@ function usePanelData(panel, widthPx, enabled = true) {
|
|
|
535
542
|
_react.useEffect.call(void 0, () => {
|
|
536
543
|
if (!enabled || !request || !variablesReady) return;
|
|
537
544
|
const controller = new AbortController();
|
|
538
|
-
|
|
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))) }));
|
|
539
546
|
return () => controller.abort();
|
|
540
547
|
}, [enabled, request, variablesReady]);
|
|
541
548
|
if (!enabled) return IDLE;
|
|
@@ -545,7 +552,7 @@ function usePanelData(panel, widthPx, enabled = true) {
|
|
|
545
552
|
function usePanelLinks(panel) {
|
|
546
553
|
const { dashboard, variables, variableInfo: variableInfo2, range: range3, openLinks } = useDashboard();
|
|
547
554
|
const resolve = _react.useCallback.call(void 0,
|
|
548
|
-
(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 }),
|
|
549
556
|
[dashboard, variables, variableInfo2, panel.scopedVars, range3]
|
|
550
557
|
);
|
|
551
558
|
return { resolve, openLinks };
|
|
@@ -642,14 +649,14 @@ var ArrowIcon = ({ color, dir }) => /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
|
642
649
|
function displayExpr(expr) {
|
|
643
650
|
if (expr.trim().startsWith("now")) return expr;
|
|
644
651
|
try {
|
|
645
|
-
return
|
|
652
|
+
return _chunk5UE6Q6CQjs.formatLocalDateTime.call(void 0, _chunk5UE6Q6CQjs.parseTime.call(void 0, expr));
|
|
646
653
|
} catch (e3) {
|
|
647
654
|
return expr;
|
|
648
655
|
}
|
|
649
656
|
}
|
|
650
657
|
function tryParse(expr, roundUp, now = Date.now()) {
|
|
651
658
|
try {
|
|
652
|
-
return
|
|
659
|
+
return _chunk5UE6Q6CQjs.parseTime.call(void 0, expr, now, roundUp);
|
|
653
660
|
} catch (e4) {
|
|
654
661
|
return null;
|
|
655
662
|
}
|
|
@@ -663,7 +670,7 @@ function endOfDay(ms) {
|
|
|
663
670
|
return new Date(d.getFullYear(), d.getMonth(), d.getDate() + 1).getTime() - 1e3;
|
|
664
671
|
}
|
|
665
672
|
function resolveTo(expr) {
|
|
666
|
-
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;
|
|
667
674
|
}
|
|
668
675
|
function TimeRangeSheet({ visible, value, onApply, onClose }) {
|
|
669
676
|
const theme = useDashTheme();
|
|
@@ -674,12 +681,12 @@ function TimeRangeSheet({ visible, value, onApply, onClose }) {
|
|
|
674
681
|
const [now] = _react.useState.call(void 0, () => Date.now());
|
|
675
682
|
const [month, setMonth] = _react.useState.call(void 0, () => new Date(_nullishCoalesce(tryParse(value.from, false), () => ( now))));
|
|
676
683
|
const fromMs = tryParse(from, false, now);
|
|
677
|
-
const toMs = tryParse(
|
|
678
|
-
const fromError =
|
|
679
|
-
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);
|
|
680
687
|
const orderError = fromMs != null && toMs != null && fromMs >= toMs ? "\u201CTo\u201D must be after \u201CFrom\u201D" : null;
|
|
681
688
|
const valid = !fromError && !toError && !orderError;
|
|
682
|
-
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));
|
|
683
690
|
const apply = () => {
|
|
684
691
|
if (!valid) return;
|
|
685
692
|
onApply({ from: normalize(from), to: normalize(resolveTo(to)) });
|
|
@@ -688,14 +695,14 @@ function TimeRangeSheet({ visible, value, onApply, onClose }) {
|
|
|
688
695
|
const pickDay = (day) => {
|
|
689
696
|
const end = endOfDay(day);
|
|
690
697
|
if (active === "from") {
|
|
691
|
-
setFrom(
|
|
692
|
-
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));
|
|
693
700
|
setActive("to");
|
|
694
701
|
} else if (fromMs != null && day < startOfDay(fromMs)) {
|
|
695
|
-
setFrom(
|
|
696
|
-
setTo(
|
|
702
|
+
setFrom(_chunk5UE6Q6CQjs.formatLocalDateTime.call(void 0, day));
|
|
703
|
+
setTo(_chunk5UE6Q6CQjs.formatLocalDateTime.call(void 0, end));
|
|
697
704
|
} else {
|
|
698
|
-
setTo(
|
|
705
|
+
setTo(_chunk5UE6Q6CQjs.formatLocalDateTime.call(void 0, end));
|
|
699
706
|
}
|
|
700
707
|
};
|
|
701
708
|
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
@@ -731,7 +738,7 @@ function TimeRangeSheet({ visible, value, onApply, onClose }) {
|
|
|
731
738
|
}
|
|
732
739
|
),
|
|
733
740
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _reactnative.Text, { style: [styles3.sectionTitle, { color: theme.textSecondary }], children: "Relative ranges" }),
|
|
734
|
-
/* @__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,
|
|
735
742
|
Chip,
|
|
736
743
|
{
|
|
737
744
|
label: r.label,
|
|
@@ -875,17 +882,17 @@ var FilterIcon = ({ color }) => /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _re
|
|
|
875
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" }) });
|
|
876
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" }) });
|
|
877
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" }) });
|
|
878
|
-
function DashboardToolbar({ presets =
|
|
885
|
+
function DashboardToolbar({ presets = _chunk5UE6Q6CQjs.TIME_PRESETS }) {
|
|
879
886
|
const theme = useDashTheme();
|
|
880
887
|
const { dashboard, rawRange, setRawRange, variables, variableErrors } = useDashboard();
|
|
881
888
|
const [filtersOpen, setFiltersOpen] = _react.useState.call(void 0, false);
|
|
882
889
|
const [rangeOpen, setRangeOpen] = _react.useState.call(void 0, false);
|
|
883
890
|
const [rangeKey, setRangeKey] = _react.useState.call(void 0, 0);
|
|
884
891
|
const custom = !presets.some((p) => rawRange.from === p.from && rawRange.to === p.to);
|
|
885
|
-
const vars =
|
|
892
|
+
const vars = _chunk5UE6Q6CQjs.visibleVariables.call(void 0, dashboard);
|
|
886
893
|
const active = vars.filter((v) => {
|
|
887
894
|
const cur = variables[v.name];
|
|
888
|
-
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);
|
|
889
896
|
}).length;
|
|
890
897
|
const hasError = vars.some((v) => variableErrors[v.name]);
|
|
891
898
|
return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _reactnative.View, { style: styles4.toolbar, children: [
|
|
@@ -911,7 +918,7 @@ function DashboardToolbar({ presets = _chunkWMRDOYPVjs.TIME_PRESETS }) {
|
|
|
911
918
|
setRangeOpen(true);
|
|
912
919
|
},
|
|
913
920
|
accessibilityRole: "button",
|
|
914
|
-
accessibilityLabel: custom ? `Time range, ${
|
|
921
|
+
accessibilityLabel: custom ? `Time range, ${_chunk5UE6Q6CQjs.describeRange.call(void 0, rawRange)}` : "Custom time range",
|
|
915
922
|
style: ({ pressed }) => [
|
|
916
923
|
custom ? styles4.rangeButton : styles4.iconButton,
|
|
917
924
|
{ borderColor: custom ? theme.accent : theme.border, backgroundColor: theme.surface },
|
|
@@ -919,7 +926,7 @@ function DashboardToolbar({ presets = _chunkWMRDOYPVjs.TIME_PRESETS }) {
|
|
|
919
926
|
],
|
|
920
927
|
children: [
|
|
921
928
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, CalendarIcon, { color: custom ? theme.accent : theme.textSecondary }),
|
|
922
|
-
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) })
|
|
923
930
|
]
|
|
924
931
|
}
|
|
925
932
|
),
|
|
@@ -975,14 +982,14 @@ function FilterSection({ variable: v, open, onToggle }) {
|
|
|
975
982
|
const theme = useDashTheme();
|
|
976
983
|
const { variables, variableInfo: variableInfo2, variableErrors, variablesReady, setVariable } = useDashboard();
|
|
977
984
|
const current = variables[v.name];
|
|
978
|
-
const summary =
|
|
979
|
-
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]), () => ( []))];
|
|
980
987
|
const error = variableErrors[v.name];
|
|
981
988
|
const choose = (value, selected) => {
|
|
982
|
-
if (v.multi && value !==
|
|
983
|
-
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);
|
|
984
991
|
const next = selected ? cur.filter((c) => c !== value) : [...cur, value];
|
|
985
|
-
setVariable(v.name, next.length ? next : [
|
|
992
|
+
setVariable(v.name, next.length ? next : [_chunk5UE6Q6CQjs.ALL]);
|
|
986
993
|
} else {
|
|
987
994
|
setVariable(v.name, v.multi ? [value] : value);
|
|
988
995
|
if (!v.multi) onToggle();
|
|
@@ -1122,7 +1129,7 @@ function barCategory(panel, frame) {
|
|
|
1122
1129
|
}
|
|
1123
1130
|
function categoryLabels(field) {
|
|
1124
1131
|
if (field.type !== "time") return field.values.map((v) => v == null ? "" : String(v));
|
|
1125
|
-
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));
|
|
1126
1133
|
let step = Infinity;
|
|
1127
1134
|
times.forEach((t, i) => {
|
|
1128
1135
|
const prev = times[i - 1];
|
|
@@ -1168,19 +1175,19 @@ function formatTooltipTime(t) {
|
|
|
1168
1175
|
return new Date(t).toLocaleString(void 0, { month: "short", day: "numeric", hour: "2-digit", minute: "2-digit" });
|
|
1169
1176
|
}
|
|
1170
1177
|
function styledSeries(panel, frames, scheme) {
|
|
1171
|
-
return styleSeries(panel,
|
|
1178
|
+
return styleSeries(panel, _chunk5UE6Q6CQjs.toSeries.call(void 0, frames), frames, scheme);
|
|
1172
1179
|
}
|
|
1173
1180
|
function styledXYSeries(panel, frames, scheme) {
|
|
1174
|
-
const { series, x } =
|
|
1175
|
-
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) : {};
|
|
1176
1183
|
return { series: styleSeries(panel, series, frames, scheme), xConfig };
|
|
1177
1184
|
}
|
|
1178
1185
|
function styleSeries(panel, series, frames, scheme) {
|
|
1179
1186
|
const frameOf = /* @__PURE__ */ new Map();
|
|
1180
1187
|
frames.forEach((f) => f.fields.forEach((field) => frameOf.set(field, f)));
|
|
1181
1188
|
return series.map((s, i) => {
|
|
1182
|
-
const config =
|
|
1183
|
-
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) };
|
|
1184
1191
|
});
|
|
1185
1192
|
}
|
|
1186
1193
|
function reducedValues(panel, frames, scheme) {
|
|
@@ -1188,30 +1195,30 @@ function reducedValues(panel, frames, scheme) {
|
|
|
1188
1195
|
const out = [];
|
|
1189
1196
|
const multiple = frames.length > 1;
|
|
1190
1197
|
frames.forEach(
|
|
1191
|
-
(frame, fi) =>
|
|
1192
|
-
const raw =
|
|
1193
|
-
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);
|
|
1194
1201
|
const values = field.values.map((v) => v == null ? null : Number(v));
|
|
1195
|
-
const value =
|
|
1196
|
-
const color =
|
|
1197
|
-
const step =
|
|
1198
|
-
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);
|
|
1199
1206
|
out.push({
|
|
1200
1207
|
key: `${fi}/${field.name}/${JSON.stringify(_nullishCoalesce(field.labels, () => ( {})))}`,
|
|
1201
1208
|
name: _nullishCoalesce(config.displayName, () => ( raw)),
|
|
1202
1209
|
value,
|
|
1203
|
-
text: _optionalChain([mapped, 'optionalAccess', _24 => _24.text]) ||
|
|
1210
|
+
text: _optionalChain([mapped, 'optionalAccess', _24 => _24.text]) || _chunk5UE6Q6CQjs.formatValue.call(void 0, value, config),
|
|
1204
1211
|
mapped,
|
|
1205
1212
|
config,
|
|
1206
1213
|
color,
|
|
1207
|
-
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,
|
|
1208
1215
|
sparkline: values,
|
|
1209
1216
|
field,
|
|
1210
1217
|
frame
|
|
1211
1218
|
});
|
|
1212
1219
|
})
|
|
1213
1220
|
);
|
|
1214
|
-
return
|
|
1221
|
+
return _chunk5UE6Q6CQjs.uniqueNames.call(void 0, out, (v) => v.field, frames);
|
|
1215
1222
|
}
|
|
1216
1223
|
function yDomain(series, includeZero) {
|
|
1217
1224
|
let min = Infinity;
|
|
@@ -1272,22 +1279,22 @@ function NoData({ message = "No data" }) {
|
|
|
1272
1279
|
}
|
|
1273
1280
|
function rowTooltipItems(panel, frame, row, multiple) {
|
|
1274
1281
|
return frame.fields.flatMap((f) => {
|
|
1275
|
-
const name =
|
|
1276
|
-
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);
|
|
1277
1284
|
if (_optionalChain([config, 'access', _36 => _36.custom, 'optionalAccess', _37 => _37.hideFrom, 'optionalAccess', _38 => _38.tooltip])) return [];
|
|
1278
1285
|
const v = f.values[row];
|
|
1279
|
-
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);
|
|
1280
1287
|
return [{ name: _nullishCoalesce(config.displayName, () => ( name)), value }];
|
|
1281
1288
|
});
|
|
1282
1289
|
}
|
|
1283
1290
|
function rowLinks(panel, frame, row, multiple, resolve) {
|
|
1284
1291
|
return mergeLinks(
|
|
1285
1292
|
frame.fields.flatMap((f) => {
|
|
1286
|
-
const name =
|
|
1287
|
-
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);
|
|
1288
1295
|
if (!_optionalChain([config, 'access', _39 => _39.links, 'optionalAccess', _40 => _40.length])) return [];
|
|
1289
1296
|
const v = f.values[row];
|
|
1290
|
-
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);
|
|
1291
1298
|
return [{ name: _nullishCoalesce(config.displayName, () => ( name)), links: resolve(config.links, { frame, row, field: f, fieldName: _nullishCoalesce(config.displayName, () => ( name)), value: v, text }) }];
|
|
1292
1299
|
})
|
|
1293
1300
|
);
|
|
@@ -1300,7 +1307,7 @@ function valueLinks(panel, v, resolve) {
|
|
|
1300
1307
|
fieldName: v.name,
|
|
1301
1308
|
seriesName: v.name,
|
|
1302
1309
|
value: v.value,
|
|
1303
|
-
text:
|
|
1310
|
+
text: _chunk5UE6Q6CQjs.formatValue.call(void 0, v.value, v.config),
|
|
1304
1311
|
calc: _nullishCoalesce(_optionalChain([panel, 'access', _44 => _44.options, 'optionalAccess', _45 => _45.reduceOptions, 'optionalAccess', _46 => _46.calcs, 'optionalAccess', _47 => _47[0]]), () => ( "lastNotNull"))
|
|
1305
1312
|
});
|
|
1306
1313
|
}
|
|
@@ -1445,15 +1452,15 @@ function NumberInput({ panel, value, onChange }) {
|
|
|
1445
1452
|
}
|
|
1446
1453
|
function DurationInput({ panel, value, onChange }) {
|
|
1447
1454
|
const theme = useDashTheme();
|
|
1448
|
-
const toDigits = (v) => typeof v === "number" ?
|
|
1455
|
+
const toDigits = (v) => typeof v === "number" ? _chunk5UE6Q6CQjs.formatClock.call(void 0, v).replace(/\D/g, "").replace(/^0+/, "") : "";
|
|
1449
1456
|
const [digits, setDigits] = _react.useState.call(void 0, toDigits(value));
|
|
1450
1457
|
const [syncedValue, setSyncedValue] = _react.useState.call(void 0, value);
|
|
1451
1458
|
if (value !== syncedValue) {
|
|
1452
1459
|
setSyncedValue(value);
|
|
1453
|
-
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));
|
|
1454
1461
|
}
|
|
1455
1462
|
const masked = digits ? maskClock(digits) : "";
|
|
1456
|
-
const invalid = !!digits &&
|
|
1463
|
+
const invalid = !!digits && _chunk5UE6Q6CQjs.parseClockDigits.call(void 0, digits) == null;
|
|
1457
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,
|
|
1458
1465
|
_reactnative.TextInput,
|
|
1459
1466
|
{
|
|
@@ -1461,7 +1468,7 @@ function DurationInput({ panel, value, onChange }) {
|
|
|
1461
1468
|
onChangeText: (t) => {
|
|
1462
1469
|
const d = t.replace(/\D/g, "").replace(/^0+/, "").slice(0, 6);
|
|
1463
1470
|
setDigits(d);
|
|
1464
|
-
onChange(
|
|
1471
|
+
onChange(_chunk5UE6Q6CQjs.parseClockDigits.call(void 0, d));
|
|
1465
1472
|
},
|
|
1466
1473
|
keyboardType: "number-pad",
|
|
1467
1474
|
placeholder: _nullishCoalesce(panel.options.placeholder, () => ( "00:00.00")),
|
|
@@ -1647,10 +1654,10 @@ function SuggestTextInput({ panel, value, onChange }) {
|
|
|
1647
1654
|
}, [store, metric, suggestWith]);
|
|
1648
1655
|
const withText = suggestWith ? form.value(suggestWith) : null;
|
|
1649
1656
|
const own = entries.filter((e) => e.metric === metric);
|
|
1650
|
-
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) : [];
|
|
1651
1658
|
const query = typed ? text : "";
|
|
1652
|
-
const fromScoped =
|
|
1653
|
-
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());
|
|
1654
1661
|
return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _reactnative.View, { style: styles6.suggest, children: [
|
|
1655
1662
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
1656
1663
|
_reactnative.TextInput,
|
|
@@ -1689,7 +1696,7 @@ function CounterInput({ panel }) {
|
|
|
1689
1696
|
const { metric, increment = 1, unit } = panel.options;
|
|
1690
1697
|
const [today, setToday] = _react.useState.call(void 0, 0);
|
|
1691
1698
|
_react.useEffect.call(void 0, () => {
|
|
1692
|
-
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)));
|
|
1693
1700
|
load();
|
|
1694
1701
|
return store.subscribe(load);
|
|
1695
1702
|
}, [store, metric]);
|
|
@@ -1891,7 +1898,7 @@ function BarGaugePanel({ panel, frames }) {
|
|
|
1891
1898
|
const min = _nullishCoalesce(v.config.min, () => ( 0));
|
|
1892
1899
|
const max = _nullishCoalesce(v.config.max, () => ( Math.max(...values.map((o) => _nullishCoalesce(o.value, () => ( 0))), 1)));
|
|
1893
1900
|
const frac = v.value == null ? 0 : Math.min(1, Math.max(0, (v.value - min) / (max - min || 1)));
|
|
1894
|
-
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);
|
|
1895
1902
|
const hasLinks = !!_optionalChain([v, 'access', _77 => _77.config, 'access', _78 => _78.links, 'optionalAccess', _79 => _79.length]);
|
|
1896
1903
|
return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0,
|
|
1897
1904
|
_reactnative.Pressable,
|
|
@@ -2072,7 +2079,7 @@ function geomapLayers(panel, frames, scheme, retina = false, gazetteers = {}) {
|
|
|
2072
2079
|
const color = _nullishCoalesce(style.color, () => ( {}));
|
|
2073
2080
|
const size = _nullishCoalesce(style.size, () => ( {}));
|
|
2074
2081
|
const text = style.text;
|
|
2075
|
-
const fixedColor =
|
|
2082
|
+
const fixedColor = _chunk5UE6Q6CQjs.resolveColor.call(void 0, _nullishCoalesce(color.fixed, () => ( "dark-green")), "#37872D");
|
|
2076
2083
|
const heat = layer.type === "heatmap";
|
|
2077
2084
|
const weight = _nullishCoalesce(config.weight, () => ( {}));
|
|
2078
2085
|
const legend = [];
|
|
@@ -2084,14 +2091,14 @@ function geomapLayers(panel, frames, scheme, retina = false, gazetteers = {}) {
|
|
|
2084
2091
|
let { xs, ys } = located;
|
|
2085
2092
|
if (layer.type === "lastPointTracker" && rows.length) [rows, xs, ys] = [rows.slice(-1), xs.slice(-1), ys.slice(-1)];
|
|
2086
2093
|
const find = (field) => field ? fieldByName(frame, field, multiple) : void 0;
|
|
2087
|
-
const configOf = (f) =>
|
|
2094
|
+
const configOf = (f) => _chunk5UE6Q6CQjs.resolveFieldConfig.call(void 0, panel, f, frame, _chunk5UE6Q6CQjs.fieldDisplayName.call(void 0, f, frame, multiple));
|
|
2088
2095
|
let colors = rows.map(() => fixedColor);
|
|
2089
2096
|
const colorField = !heat ? find(color.field) : void 0;
|
|
2090
2097
|
if (colorField) {
|
|
2091
2098
|
const cConfig = configOf(colorField);
|
|
2092
2099
|
const values = rows.map((i) => num(colorField.values[i]));
|
|
2093
2100
|
const extent = range(values);
|
|
2094
|
-
colors = values.map((v) =>
|
|
2101
|
+
colors = values.map((v) => _chunk5UE6Q6CQjs.valueColor.call(void 0, v, cConfig, fixedColor, extent));
|
|
2095
2102
|
if (showsLegend(layer) && legend.length === 0) legend.push(...thresholdLegend(`${key}/${frames.indexOf(frame)}`, cConfig, fixedColor));
|
|
2096
2103
|
}
|
|
2097
2104
|
const dim = heat ? weight : size;
|
|
@@ -2149,8 +2156,8 @@ function thresholdLegend(key, config, fallback) {
|
|
|
2149
2156
|
if (steps.length < 2) return [];
|
|
2150
2157
|
return steps.map((s, i) => ({
|
|
2151
2158
|
key: `${key}/${i}`,
|
|
2152
|
-
name: s.value == null ? `< ${
|
|
2153
|
-
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)
|
|
2154
2161
|
}));
|
|
2155
2162
|
}
|
|
2156
2163
|
var isDataLayer = (type) => type === "markers" || type === "heatmap" || type === "route" || type === "lastPointTracker";
|
|
@@ -2160,15 +2167,15 @@ function gazetteerPaths(panel, frames) {
|
|
|
2160
2167
|
for (const layer of _nullishCoalesce(_optionalChain([panel, 'access', _97 => _97.options, 'optionalAccess', _98 => _98.layers]), () => ( DEFAULT_LAYERS))) {
|
|
2161
2168
|
if (!isDataLayer(layer.type)) continue;
|
|
2162
2169
|
const mode = _nullishCoalesce(_optionalChain([layer, 'access', _99 => _99.location, 'optionalAccess', _100 => _100.mode]), () => ( "auto"));
|
|
2163
|
-
if (mode === "lookup") paths.add(_optionalChain([layer, 'access', _101 => _101.location, 'optionalAccess', _102 => _102.gazetteer]) ||
|
|
2164
|
-
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);
|
|
2165
2172
|
}
|
|
2166
2173
|
return [...paths];
|
|
2167
2174
|
}
|
|
2168
2175
|
var LAT_NAMES = ["lat", "latitude"];
|
|
2169
2176
|
var LON_NAMES = ["lon", "lng", "long", "longitude"];
|
|
2170
2177
|
function fieldByName(frame, name, multiple) {
|
|
2171
|
-
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)));
|
|
2172
2179
|
}
|
|
2173
2180
|
function locate2(frame, location = {}, gazetteers = {}) {
|
|
2174
2181
|
const mode = _nullishCoalesce(location.mode, () => ( "auto"));
|
|
@@ -2187,10 +2194,10 @@ function locate2(frame, location = {}, gazetteers = {}) {
|
|
|
2187
2194
|
lat = named(LAT_NAMES);
|
|
2188
2195
|
lon = named(LON_NAMES);
|
|
2189
2196
|
if (!lat || !lon) hash = named(["geohash"]);
|
|
2190
|
-
if ((!lat || !lon) && !hash) [lookup, gazetteer] = [lookupField(frame), gazetteers[
|
|
2197
|
+
if ((!lat || !lon) && !hash) [lookup, gazetteer] = [lookupField(frame), gazetteers[_chunk5UE6Q6CQjs.DEFAULT_GAZETTEER]];
|
|
2191
2198
|
} else if (mode === "lookup") {
|
|
2192
2199
|
lookup = location.lookup ? fieldByName(frame, location.lookup, false) : lookupField(frame);
|
|
2193
|
-
gazetteer = gazetteers[location.gazetteer ||
|
|
2200
|
+
gazetteer = gazetteers[location.gazetteer || _chunk5UE6Q6CQjs.DEFAULT_GAZETTEER];
|
|
2194
2201
|
}
|
|
2195
2202
|
const rows = [];
|
|
2196
2203
|
const xs = [];
|
|
@@ -2239,8 +2246,8 @@ function decodeGeohash(hash) {
|
|
|
2239
2246
|
}
|
|
2240
2247
|
function cellText(field, v, config) {
|
|
2241
2248
|
if (v == null) return "";
|
|
2242
|
-
if (field.type === "number") return
|
|
2243
|
-
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();
|
|
2244
2251
|
return String(v);
|
|
2245
2252
|
}
|
|
2246
2253
|
function num(v) {
|
|
@@ -2490,11 +2497,11 @@ function useGazetteers(panel, frames) {
|
|
|
2490
2497
|
let live = true;
|
|
2491
2498
|
let ds;
|
|
2492
2499
|
try {
|
|
2493
|
-
ds = _optionalChain([resolve, 'optionalCall', _112 => _112(
|
|
2500
|
+
ds = _optionalChain([resolve, 'optionalCall', _112 => _112(_chunk5UE6Q6CQjs.normalizeRef.call(void 0, panel.datasource))]);
|
|
2494
2501
|
} catch (e5) {
|
|
2495
2502
|
}
|
|
2496
2503
|
const paths = key.split("\n");
|
|
2497
|
-
Promise.allSettled(paths.map((p) =>
|
|
2504
|
+
Promise.allSettled(paths.map((p) => _chunk5UE6Q6CQjs.loadGazetteer.call(void 0, p, ds))).then((results) => {
|
|
2498
2505
|
if (!live) return;
|
|
2499
2506
|
const gazetteers = {};
|
|
2500
2507
|
const errors = [];
|
|
@@ -2637,8 +2644,8 @@ function cellType(config) {
|
|
|
2637
2644
|
}
|
|
2638
2645
|
function tableColumns(panel, frame, multipleFrames = false) {
|
|
2639
2646
|
return frame.fields.flatMap((field, i) => {
|
|
2640
|
-
const raw =
|
|
2641
|
-
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);
|
|
2642
2649
|
const custom = _nullishCoalesce(config.custom, () => ( {}));
|
|
2643
2650
|
if (custom.hidden || _optionalChain([custom, 'access', _122 => _122.hideFrom, 'optionalAccess', _123 => _123.viz])) return [];
|
|
2644
2651
|
const numeric = field.type === "number";
|
|
@@ -2681,16 +2688,16 @@ function tableFooter(columns) {
|
|
|
2681
2688
|
counted = true;
|
|
2682
2689
|
return [{ label: "Count", text: String(c.field.values.length) }];
|
|
2683
2690
|
}
|
|
2684
|
-
if (!
|
|
2685
|
-
const label =
|
|
2691
|
+
if (!_chunk5UE6Q6CQjs.isReducer.call(void 0, r)) return [];
|
|
2692
|
+
const label = _chunk5UE6Q6CQjs.REDUCER_LABELS[r];
|
|
2686
2693
|
if (r === "count") return [{ label, text: String(c.field.values.length) }];
|
|
2687
2694
|
if (c.field.type !== "number") {
|
|
2688
2695
|
if (r === "distinctCount") return [{ label, text: String(new Set(c.field.values.filter((v) => v != null)).size) }];
|
|
2689
2696
|
return [];
|
|
2690
2697
|
}
|
|
2691
|
-
const value =
|
|
2698
|
+
const value = _chunk5UE6Q6CQjs.reduce.call(void 0, c.field.values.map((v) => v == null ? null : Number(v)), r);
|
|
2692
2699
|
const counts = r === "distinctCount" || r === "changeCount";
|
|
2693
|
-
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) }];
|
|
2694
2701
|
});
|
|
2695
2702
|
return lines.length === 1 && lines[0].label !== "Count" ? [{ text: lines[0].text }] : lines;
|
|
2696
2703
|
});
|
|
@@ -2709,13 +2716,13 @@ function extentOf(values) {
|
|
|
2709
2716
|
}
|
|
2710
2717
|
function cellDisplay(col, raw, fallbackColor) {
|
|
2711
2718
|
const { config, field } = col;
|
|
2712
|
-
const mapped =
|
|
2719
|
+
const mapped = _chunk5UE6Q6CQjs.mappedResult.call(void 0, raw, config);
|
|
2713
2720
|
const num4 = field.type === "number" && raw != null && Number.isFinite(Number(raw)) ? Number(raw) : null;
|
|
2714
|
-
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))));
|
|
2715
2722
|
if (col.cellType === "auto") return { text };
|
|
2716
2723
|
const mode = _optionalChain([config, 'access', _138 => _138.color, 'optionalAccess', _139 => _139.mode]);
|
|
2717
|
-
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([
|
|
2718
|
-
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);
|
|
2719
2726
|
if (col.cellType === "color-text") return { text, color };
|
|
2720
2727
|
if (col.cellType === "color-background") return { text, background: color };
|
|
2721
2728
|
const min = _nullishCoalesce(config.min, () => ( Math.min(0, _nullishCoalesce(_optionalChain([col, 'access', _145 => _145.extent, 'optionalAccess', _146 => _146[0]]), () => ( 0)))));
|
|
@@ -2746,7 +2753,7 @@ function sortedRows(columns, length, sort) {
|
|
|
2746
2753
|
if (!col) return rows;
|
|
2747
2754
|
const { field } = col;
|
|
2748
2755
|
const dir = sort.desc ? -1 : 1;
|
|
2749
|
-
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;
|
|
2750
2757
|
const empty = (v) => v == null || v === "" || typeof v === "number" && Number.isNaN(v);
|
|
2751
2758
|
return rows.sort((a, b) => {
|
|
2752
2759
|
const va = field.values[a];
|
|
@@ -2812,8 +2819,8 @@ function TablePanel({ panel, frames }) {
|
|
|
2812
2819
|
const columns = _react.useMemo.call(void 0, () => frame ? tableColumns(panel, frame, frames.length > 1) : [], [panel, frame, frames.length]);
|
|
2813
2820
|
const [tapped, setSort] = _react.useState.call(void 0, );
|
|
2814
2821
|
const sort = tapped === void 0 ? initialSort(panel, columns) : tapped;
|
|
2815
|
-
const order = _react.useMemo.call(void 0, () => sortedRows(columns, frame ?
|
|
2816
|
-
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, {});
|
|
2817
2824
|
const shown = order.slice(0, 500);
|
|
2818
2825
|
const rowColumn = columns.find((c) => c.applyToRow);
|
|
2819
2826
|
const footer = tableFooter(columns);
|
|
@@ -2913,7 +2920,7 @@ function BarChartPanel({ panel, frames, width }) {
|
|
|
2913
2920
|
{
|
|
2914
2921
|
style: [styles10.tick, { color: theme.textMuted, top: plot.height * (1 - barFraction(axis, t)) - 7 }, axis.side === "left" ? styles10.tickLeft : styles10.tickRight],
|
|
2915
2922
|
numberOfLines: 1,
|
|
2916
|
-
children:
|
|
2923
|
+
children: _chunk5UE6Q6CQjs.formatValue.call(void 0, t, { ...axis.config, decimals: tickDecimals(axis.ticks) })
|
|
2917
2924
|
},
|
|
2918
2925
|
t
|
|
2919
2926
|
)) });
|
|
@@ -3039,7 +3046,7 @@ function TimeSeriesPanel({ panel, frames }) {
|
|
|
3039
3046
|
const y = linearScale(yMin, yMax, PAD.top + plotH, PAD.top);
|
|
3040
3047
|
const span = xTo - xFrom;
|
|
3041
3048
|
const xTicks = numericX ? numberTicks(xFrom, xTo, plotW) : timeTicks(xFrom, xTo, plotW);
|
|
3042
|
-
const xLabel = (t) => numericX ?
|
|
3049
|
+
const xLabel = (t) => numericX ? _chunk5UE6Q6CQjs.formatValue.call(void 0, t, { ...xConfig, decimals: tickDecimals(xTicks) }) : formatTimeTick(t, span);
|
|
3043
3050
|
const unitConfig = series[0].config;
|
|
3044
3051
|
const barSeries = series.filter((s) => style(s) === "bars");
|
|
3045
3052
|
const pointsCount = Math.max(...series.map((s) => s.times.length));
|
|
@@ -3057,11 +3064,11 @@ function TimeSeriesPanel({ panel, frames }) {
|
|
|
3057
3064
|
if (!pinch.current) pinch.current = { start: { from: xFrom, to: xTo }, dist, frac };
|
|
3058
3065
|
const p = pinch.current;
|
|
3059
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) };
|
|
3060
|
-
setPreview(
|
|
3067
|
+
setPreview(_chunk5UE6Q6CQjs.zoomRange.call(void 0, p.start, dist / p.dist, p.frac, frac, limits));
|
|
3061
3068
|
};
|
|
3062
3069
|
const onPinchEnd = (commit) => {
|
|
3063
3070
|
if (commit && pinch.current && preview) {
|
|
3064
|
-
if (!extent) setRawRange({ from:
|
|
3071
|
+
if (!extent) setRawRange({ from: _chunk5UE6Q6CQjs.formatLocalDateTime.call(void 0, preview.from), to: _chunk5UE6Q6CQjs.formatLocalDateTime.call(void 0, preview.to) });
|
|
3065
3072
|
else setXZoom(preview.to - preview.from >= extent[1] - extent[0] ? null : preview);
|
|
3066
3073
|
}
|
|
3067
3074
|
pinch.current = null;
|
|
@@ -3116,7 +3123,7 @@ function TimeSeriesPanel({ panel, frames }) {
|
|
|
3116
3123
|
size.width > 0 && /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _reactnativesvg2.default, { width: size.width, height: size.height, children: [
|
|
3117
3124
|
ticks.map((t) => /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _reactnativesvg.G, { children: [
|
|
3118
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 }),
|
|
3119
|
-
/* @__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) }) })
|
|
3120
3127
|
] }, t)),
|
|
3121
3128
|
xTicks.map((t) => /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
3122
3129
|
_reactnativesvg.Text,
|
|
@@ -3182,11 +3189,11 @@ function TimeSeriesPanel({ panel, frames }) {
|
|
|
3182
3189
|
x(hover.time) > size.width / 2 ? { right: size.width - x(hover.time) + 8 } : { left: x(hover.time) + 8 }
|
|
3183
3190
|
],
|
|
3184
3191
|
children: [
|
|
3185
|
-
/* @__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) }),
|
|
3186
3193
|
hover.rows.map((r) => /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _reactnative.View, { style: styles11.tooltipRow, children: [
|
|
3187
3194
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _reactnative.View, { style: [styles11.swatch, { backgroundColor: r.color }] }),
|
|
3188
3195
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _reactnative.Text, { style: [styles11.tooltipName, { color: theme.textSecondary }], numberOfLines: 1, children: r.name }),
|
|
3189
|
-
/* @__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) })
|
|
3190
3197
|
] }, r.key)),
|
|
3191
3198
|
isPinned && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, TooltipLinks, { links: hoverLinks, onOpen: (l) => openLinks([l]) })
|
|
3192
3199
|
]
|
|
@@ -3271,7 +3278,7 @@ function linkData(r, frames, xField) {
|
|
|
3271
3278
|
if (frame && xField === void 0) {
|
|
3272
3279
|
row = r.index;
|
|
3273
3280
|
} else if (frame) {
|
|
3274
|
-
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]));
|
|
3275
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)]);
|
|
3276
3283
|
row = at != null && at >= 0 ? at : void 0;
|
|
3277
3284
|
}
|
|
@@ -3282,7 +3289,7 @@ function linkData(r, frames, xField) {
|
|
|
3282
3289
|
fieldName: r.name,
|
|
3283
3290
|
seriesName: r.name,
|
|
3284
3291
|
value: r.value,
|
|
3285
|
-
text:
|
|
3292
|
+
text: _chunk5UE6Q6CQjs.formatValue.call(void 0, r.value, r.config),
|
|
3286
3293
|
time: xField === void 0 ? r.time : void 0
|
|
3287
3294
|
};
|
|
3288
3295
|
}
|
|
@@ -3343,8 +3350,8 @@ function xySeries(panel, frames, scheme) {
|
|
|
3343
3350
|
const { manual, series: maps, exclude } = mappings(panel);
|
|
3344
3351
|
const multiple = frames.length > 1;
|
|
3345
3352
|
const out = [];
|
|
3346
|
-
const config = (field, frame) =>
|
|
3347
|
-
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))) : [];
|
|
3348
3355
|
for (const [mi, m] of (maps.length ? maps : [{}]).entries()) {
|
|
3349
3356
|
const matcher = _optionalChain([m, 'access', _219 => _219.frame, 'optionalAccess', _220 => _220.matcher]);
|
|
3350
3357
|
const chosen = _optionalChain([matcher, 'optionalAccess', _221 => _221.id]) === "byIndex" ? frames.filter((_, i) => i === matcher.options) : frames;
|
|
@@ -3360,16 +3367,16 @@ function xySeries(panel, frames, scheme) {
|
|
|
3360
3367
|
const yConfig = config(yField, frame);
|
|
3361
3368
|
if (_optionalChain([yConfig, 'access', _222 => _222.custom, 'optionalAccess', _223 => _223.hideFrom, 'optionalAccess', _224 => _224.viz]) && !manual) continue;
|
|
3362
3369
|
const xConfig = config(xField, frame);
|
|
3363
|
-
const color =
|
|
3364
|
-
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;
|
|
3365
3372
|
const rows = [];
|
|
3366
3373
|
const xs = [];
|
|
3367
3374
|
const ys = [];
|
|
3368
3375
|
yField.values.forEach((yv, i) => {
|
|
3369
3376
|
const xv = xField.values[i];
|
|
3370
3377
|
if (xv == null || yv == null) return;
|
|
3371
|
-
const xn = xField.type === "time" ?
|
|
3372
|
-
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);
|
|
3373
3380
|
if (!Number.isFinite(xn) || !Number.isFinite(yn)) return;
|
|
3374
3381
|
rows.push(i);
|
|
3375
3382
|
xs.push(xn);
|
|
@@ -3382,7 +3389,7 @@ function xySeries(panel, frames, scheme) {
|
|
|
3382
3389
|
const cConfig = config(colorField, frame);
|
|
3383
3390
|
const values = rows.map((i) => num3(colorField.values[i]));
|
|
3384
3391
|
const extent = range2(values);
|
|
3385
|
-
colors = values.map((v) =>
|
|
3392
|
+
colors = values.map((v) => _chunk5UE6Q6CQjs.valueColor.call(void 0, v, cConfig, base, extent));
|
|
3386
3393
|
}
|
|
3387
3394
|
let sizes = rows.map(() => fixedSize);
|
|
3388
3395
|
if (sizeField) {
|
|
@@ -3392,7 +3399,7 @@ function xySeries(panel, frames, scheme) {
|
|
|
3392
3399
|
sizes = values.map((v) => v == null ? min : min + (v - lo) / (hi - lo || 1) * (max - min));
|
|
3393
3400
|
}
|
|
3394
3401
|
const fixedName = _optionalChain([m, 'access', _238 => _238.name, 'optionalAccess', _239 => _239.fixed]);
|
|
3395
|
-
const yName = _nullishCoalesce(yConfig.displayName, () => (
|
|
3402
|
+
const yName = _nullishCoalesce(yConfig.displayName, () => ( _chunk5UE6Q6CQjs.fieldDisplayName.call(void 0, yField, frame, multiple)));
|
|
3396
3403
|
out.push({
|
|
3397
3404
|
key: `${mi}/${frames.indexOf(frame)}/${yField.name}`,
|
|
3398
3405
|
name: fixedName ? yFields.length > 1 ? `${fixedName} ${yName}` : fixedName : yName,
|
|
@@ -3515,7 +3522,7 @@ function XYChartPanel({ panel, frames }) {
|
|
|
3515
3522
|
size.width > 0 && /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _reactnativesvg2.default, { width: size.width, height: size.height, children: [
|
|
3516
3523
|
yTicks.map((t) => /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _reactnativesvg.G, { children: [
|
|
3517
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 }),
|
|
3518
|
-
/* @__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))) }) })
|
|
3519
3526
|
] }, `y${t}`)),
|
|
3520
3527
|
xTicks.map((t) => /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _reactnativesvg.G, { children: [
|
|
3521
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 }),
|
|
@@ -3527,7 +3534,7 @@ function XYChartPanel({ panel, frames }) {
|
|
|
3527
3534
|
fontSize: 10,
|
|
3528
3535
|
fill: theme.textMuted,
|
|
3529
3536
|
textAnchor: layout.x(t) - pad.left < 20 ? "start" : pad.left + plotW - layout.x(t) < 20 ? "end" : "middle",
|
|
3530
|
-
children:
|
|
3537
|
+
children: _chunk5UE6Q6CQjs.formatValue.call(void 0, t, { ...first.xConfig, decimals: _nullishCoalesce(first.xConfig.decimals, () => ( tickDecimals(xTicks))) })
|
|
3531
3538
|
}
|
|
3532
3539
|
)
|
|
3533
3540
|
] }, `x${t}`)),
|
|
@@ -3640,14 +3647,14 @@ function DashboardView({ mode = "auto", header, footer, refreshable }) {
|
|
|
3640
3647
|
const width = (measured.width || window.width) - insets.left - insets.right;
|
|
3641
3648
|
const layoutMode = mode === "auto" ? width >= TABLET_WIDTH ? "grid" : "phone" : mode;
|
|
3642
3649
|
const sections = _react.useMemo.call(void 0,
|
|
3643
|
-
() =>
|
|
3650
|
+
() => _chunk5UE6Q6CQjs.layoutDashboard.call(void 0, dashboard, layoutMode, { values: variables, info: variableInfo2 }),
|
|
3644
3651
|
[dashboard, layoutMode, variables, variableInfo2]
|
|
3645
3652
|
);
|
|
3646
3653
|
const [toggled, setToggled] = _react.useState.call(void 0, {});
|
|
3647
3654
|
const { seen, viewportH, onScroll, onViewportLayout, onSectionLayout } = useSeenSections(window.height);
|
|
3648
3655
|
const maxPanelH = Math.max(MIN_PANEL_H, viewportH - SIDE * 2);
|
|
3649
3656
|
const contentW = width - SIDE * 2;
|
|
3650
|
-
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)]))));
|
|
3651
3658
|
return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _reactnative.View, { style: [styles13.fill, { backgroundColor: theme.background }], onLayout, children: [
|
|
3652
3659
|
width > 0 && /* @__PURE__ */ _jsxruntime.jsxs.call(void 0,
|
|
3653
3660
|
_reactnative.ScrollView,
|
|
@@ -3673,14 +3680,14 @@ function DashboardView({ mode = "auto", header, footer, refreshable }) {
|
|
|
3673
3680
|
accessibilityState: { expanded: !collapsed },
|
|
3674
3681
|
children: [
|
|
3675
3682
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _reactnative.Text, { style: [styles13.chevron, { color: theme.textMuted }], children: collapsed ? "\u25B8" : "\u25BE" }),
|
|
3676
|
-
/* @__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 }) })
|
|
3677
3684
|
]
|
|
3678
3685
|
}
|
|
3679
3686
|
),
|
|
3680
3687
|
!collapsed && layoutMode === "grid" && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, GridSection, { grid: section.grid, width: contentW, maxPanelH, deferred: !seen.has(section.key) }),
|
|
3681
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) => {
|
|
3682
|
-
const w = (contentW + GAP) * (cell.span /
|
|
3683
|
-
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);
|
|
3684
3691
|
}) }, ri))
|
|
3685
3692
|
] }, section.key);
|
|
3686
3693
|
})
|
|
@@ -3691,10 +3698,10 @@ function DashboardView({ mode = "auto", header, footer, refreshable }) {
|
|
|
3691
3698
|
] });
|
|
3692
3699
|
}
|
|
3693
3700
|
function GridSection({ grid, width, maxPanelH, deferred }) {
|
|
3694
|
-
const colW = (width + GAP) /
|
|
3695
|
-
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)));
|
|
3696
3703
|
const scale = tallest > maxPanelH ? maxPanelH / tallest : 1;
|
|
3697
|
-
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)) });
|
|
3698
3705
|
}
|
|
3699
3706
|
function useSeenSections(viewportHeight) {
|
|
3700
3707
|
const [seen, setSeen] = _react.useState.call(void 0, /* @__PURE__ */ new Set());
|
|
@@ -3753,12 +3760,12 @@ function PanelCardContent({ panel, width, height, deferred }) {
|
|
|
3753
3760
|
const theme = useDashTheme();
|
|
3754
3761
|
const { dashboard, variables, variableInfo: variableInfo2 } = useDashboard();
|
|
3755
3762
|
const { resolve, openLinks } = usePanelLinks(panel);
|
|
3756
|
-
const input =
|
|
3763
|
+
const input = _chunk5UE6Q6CQjs.isInputPanel.call(void 0, panel);
|
|
3757
3764
|
const form = _react.useContext.call(void 0, InputFormContext);
|
|
3758
3765
|
const problem = input ? _optionalChain([form, 'optionalAccess', _265 => _265.problem, 'optionalCall', _266 => _266(panel.options.metric)]) : void 0;
|
|
3759
3766
|
const hasLinks = !!_optionalChain([panel, 'access', _267 => _267.links, 'optionalAccess', _268 => _268.length]);
|
|
3760
3767
|
const hasTitle = !!panel.title || hasLinks || !!problem;
|
|
3761
|
-
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 }) : "";
|
|
3762
3769
|
return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _reactnative.View, { style: [styles13.card, { width, height, backgroundColor: theme.surface, borderColor: theme.border }], children: [
|
|
3763
3770
|
hasTitle && /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _reactnative.View, { style: styles13.titleRow, children: [
|
|
3764
3771
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _reactnative.Text, { style: [styles13.title, { color: theme.text }], numberOfLines: 1, children: title }),
|
|
@@ -3780,7 +3787,7 @@ function PanelCardContent({ panel, width, height, deferred }) {
|
|
|
3780
3787
|
}
|
|
3781
3788
|
function DataPanelBody({ panel, width, height }) {
|
|
3782
3789
|
const theme = useDashTheme();
|
|
3783
|
-
const needsData =
|
|
3790
|
+
const needsData = _chunk5UE6Q6CQjs.panelHasQueries.call(void 0, panel);
|
|
3784
3791
|
const data = usePanelData(panel, width, needsData);
|
|
3785
3792
|
const Component2 = panelComponent(panel.type);
|
|
3786
3793
|
if (needsData && data.error) {
|
|
@@ -3822,13 +3829,13 @@ function savedValues(panels, entries) {
|
|
|
3822
3829
|
const values = {};
|
|
3823
3830
|
for (const p of panels) {
|
|
3824
3831
|
const mine = entries.filter((e) => e.metric === p.options.metric);
|
|
3825
|
-
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]);
|
|
3826
3833
|
}
|
|
3827
3834
|
return values;
|
|
3828
3835
|
}
|
|
3829
3836
|
function InputForm({ dashboard, store, onSaved, choices = NO_CHOICES, header, timestamp, defaults: given = NO_DEFAULTS, beforeSave, editing }) {
|
|
3830
3837
|
const theme = useDashTheme();
|
|
3831
|
-
const panels = _react.useMemo.call(void 0, () =>
|
|
3838
|
+
const panels = _react.useMemo.call(void 0, () => _chunk5UE6Q6CQjs.inputPanels.call(void 0, dashboard), [dashboard]);
|
|
3832
3839
|
const saved = _react.useMemo.call(void 0, () => editing ? savedValues(panels, editing) : NO_DEFAULTS, [panels, editing]);
|
|
3833
3840
|
const [defaults, setDefaults] = _react.useState.call(void 0, {});
|
|
3834
3841
|
const [edits, setEdits] = _react.useState.call(void 0, {});
|
|
@@ -3842,7 +3849,7 @@ function InputForm({ dashboard, store, onSaved, choices = NO_CHOICES, header, ti
|
|
|
3842
3849
|
const next = {};
|
|
3843
3850
|
for (const p of panels) {
|
|
3844
3851
|
const d = p.options.default;
|
|
3845
|
-
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));
|
|
3846
3853
|
else if (d !== void 0) next[p.options.metric] = d;
|
|
3847
3854
|
}
|
|
3848
3855
|
if (mine === run) setDefaults(next);
|
|
@@ -3867,14 +3874,14 @@ function InputForm({ dashboard, store, onSaved, choices = NO_CHOICES, header, ti
|
|
|
3867
3874
|
choices,
|
|
3868
3875
|
problem: (m) => {
|
|
3869
3876
|
const p = panels.find((x) => x.options.metric === m);
|
|
3870
|
-
return p && (checked || m in edits) ?
|
|
3877
|
+
return p && (checked || m in edits) ? _chunk5UE6Q6CQjs.inputProblem.call(void 0, p, value(m)) : void 0;
|
|
3871
3878
|
}
|
|
3872
3879
|
};
|
|
3873
3880
|
}, [edits, saved, defaults, given, store, choices, panels, checked]);
|
|
3874
3881
|
const dirty = Object.keys(edits).length;
|
|
3875
3882
|
const save = _react.useCallback.call(void 0, async () => {
|
|
3876
3883
|
const problems = panels.flatMap((p) => {
|
|
3877
|
-
const problem =
|
|
3884
|
+
const problem = _chunk5UE6Q6CQjs.inputProblem.call(void 0, p, state.value(p.options.metric));
|
|
3878
3885
|
return problem ? [`${p.title || p.options.metric}: ${problem.toLowerCase()}`] : [];
|
|
3879
3886
|
});
|
|
3880
3887
|
if (problems.length) {
|
|
@@ -3883,7 +3890,7 @@ function InputForm({ dashboard, store, onSaved, choices = NO_CHOICES, header, ti
|
|
|
3883
3890
|
return;
|
|
3884
3891
|
}
|
|
3885
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)));
|
|
3886
|
-
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));
|
|
3887
3894
|
if (!entries.length) return;
|
|
3888
3895
|
const extra = beforeSave ? await beforeSave(ts) : [];
|
|
3889
3896
|
if (!extra) return;
|
|
@@ -4187,4 +4194,11 @@ var styles14 = _reactnative.StyleSheet.create({
|
|
|
4187
4194
|
|
|
4188
4195
|
|
|
4189
4196
|
|
|
4190
|
-
exports.ALL = _chunkWMRDOYPVjs.ALL; exports.BUNDLE_ACCEPT = _chunkWMRDOYPVjs.BUNDLE_ACCEPT; exports.BUNDLE_TYPE = _chunkWMRDOYPVjs.BUNDLE_TYPE; exports.CANVAS_GAP = _chunkWMRDOYPVjs.CANVAS_GAP; exports.CANVAS_ROW_HEADER = _chunkWMRDOYPVjs.CANVAS_ROW_HEADER; exports.Calendar = Calendar; exports.Chip = Chip; exports.ConfigLoader = _chunkWMRDOYPVjs.ConfigLoader; exports.DASHBOARD_DS = _chunkWMRDOYPVjs.DASHBOARD_DS; exports.DEFAULT_GAZETTEER = _chunkWMRDOYPVjs.DEFAULT_GAZETTEER; exports.DashThemeProvider = DashThemeProvider; exports.DashboardProvider = DashboardProvider; exports.DashboardToolbar = DashboardToolbar; exports.DashboardView = DashboardView; exports.EDITABLE_VARIABLE_TYPES = _chunkWMRDOYPVjs.EDITABLE_VARIABLE_TYPES; exports.GRID_COLUMNS = _chunkWMRDOYPVjs.GRID_COLUMNS; exports.GrafanaClient = _chunkWMRDOYPVjs.GrafanaClient; exports.GrafanaDataSource = _chunkWMRDOYPVjs.GrafanaDataSource; exports.GrafanaError = _chunkWMRDOYPVjs.GrafanaError; exports.HttpConfigFiles = _chunkWMRDOYPVjs.HttpConfigFiles; exports.INPUT_OPTION_KEYS = _chunkWMRDOYPVjs.INPUT_OPTION_KEYS; exports.INPUT_TYPES = _chunkWMRDOYPVjs.INPUT_TYPES; exports.InputForm = InputForm; exports.InputFormContext = InputFormContext; exports.LOCAL_DATASOURCE_TYPE = _chunkWMRDOYPVjs.LOCAL_DATASOURCE_TYPE; exports.Legend = Legend; exports.LocalDataSource = _chunkWMRDOYPVjs.LocalDataSource; exports.MANIFEST_VERSION = _chunkWMRDOYPVjs.MANIFEST_VERSION; exports.MAPPING_TYPES = _chunkWMRDOYPVjs.MAPPING_TYPES; exports.MemoryEntryStore = _chunkWMRDOYPVjs.MemoryEntryStore; exports.NAMED_COLORS = _chunkWMRDOYPVjs.NAMED_COLORS; exports.NoData = NoData; exports.OPTION_CATEGORIES = _chunkWMRDOYPVjs.OPTION_CATEGORIES; exports.OVERRIDE_MATCHERS = _chunkWMRDOYPVjs.OVERRIDE_MATCHERS; exports.PANEL_TYPES = _chunkWMRDOYPVjs.PANEL_TYPES; exports.PanelCard = PanelCard; exports.REDUCER_LABELS = _chunkWMRDOYPVjs.REDUCER_LABELS; exports.REFRESH_CHOICES = _chunkWMRDOYPVjs.REFRESH_CHOICES; exports.RELATIVE_RANGES = _chunkWMRDOYPVjs.RELATIVE_RANGES; exports.RenderBoundary = RenderBoundary; exports.SERIES_PALETTE = _chunkWMRDOYPVjs.SERIES_PALETTE; exports.SNIPPET_VERSION = _chunkWMRDOYPVjs.SNIPPET_VERSION; exports.SPECIAL_MATCHES = _chunkWMRDOYPVjs.SPECIAL_MATCHES; exports.SaveConflictError = _chunkWMRDOYPVjs.SaveConflictError; exports.TIME_PRESETS = _chunkWMRDOYPVjs.TIME_PRESETS; exports.UNIT_CHOICES = _chunkWMRDOYPVjs.UNIT_CHOICES; exports.addTime = _chunkWMRDOYPVjs.addTime; exports.appSchema = _chunkWMRDOYPVjs.appSchema; exports.applyDashboardLink = _chunkWMRDOYPVjs.applyDashboardLink; exports.applyJsonEdits = _chunkWMRDOYPVjs.applyJsonEdits; exports.applyTransformations = _chunkWMRDOYPVjs.applyTransformations; exports.assembleBundle = _chunkWMRDOYPVjs.assembleBundle; exports.assembleFromResponse = _chunkWMRDOYPVjs.assembleFromResponse; exports.buildFrames = _chunkWMRDOYPVjs.buildFrames; exports.bundleFromFiles = _chunkWMRDOYPVjs.bundleFromFiles; exports.bundleRoot = _chunkWMRDOYPVjs.bundleRoot; exports.calculateInterval = _chunkWMRDOYPVjs.calculateInterval; exports.checkFiles = _chunkWMRDOYPVjs.checkFiles; exports.cleanDashboard = _chunkWMRDOYPVjs.cleanDashboard; exports.cleanPanelOptions = _chunkWMRDOYPVjs.cleanPanelOptions; exports.collapseRow = _chunkWMRDOYPVjs.collapseRow; exports.compactGrid = _chunkWMRDOYPVjs.compactGrid; exports.copyPanels = _chunkWMRDOYPVjs.copyPanels; exports.darkTheme = darkTheme; exports.dashboardSchema = _chunkWMRDOYPVjs.dashboardSchema; exports.dashboardSchemaIssues = _chunkWMRDOYPVjs.dashboardSchemaIssues; exports.dashboardSourceIds = _chunkWMRDOYPVjs.dashboardSourceIds; exports.defaultFetchJson = _chunkWMRDOYPVjs.defaultFetchJson; exports.describeRange = _chunkWMRDOYPVjs.describeRange; exports.diffJson = _chunkWMRDOYPVjs.diffJson; exports.documentIdFor = _chunkWMRDOYPVjs.documentIdFor; exports.documentUses = _chunkWMRDOYPVjs.documentUses; exports.dropTarget = _chunkWMRDOYPVjs.dropTarget; exports.duplicatePanel = _chunkWMRDOYPVjs.duplicatePanel; exports.entriesSavedWith = _chunkWMRDOYPVjs.entriesSavedWith; exports.entryToInputValue = _chunkWMRDOYPVjs.entryToInputValue; exports.expandRow = _chunkWMRDOYPVjs.expandRow; exports.fetchBundle = _chunkWMRDOYPVjs.fetchBundle; exports.fetchJsonWithToken = _chunkWMRDOYPVjs.fetchJsonWithToken; exports.fieldDisplayName = _chunkWMRDOYPVjs.fieldDisplayName; exports.fieldMatches = _chunkWMRDOYPVjs.fieldMatches; exports.formatClock = _chunkWMRDOYPVjs.formatClock; exports.formatDisplay = _chunkWMRDOYPVjs.formatDisplay; exports.formatDuration = _chunkWMRDOYPVjs.formatDuration; exports.formatJsonText = _chunkWMRDOYPVjs.formatJsonText; exports.formatLocalDateTime = _chunkWMRDOYPVjs.formatLocalDateTime; exports.formatValue = _chunkWMRDOYPVjs.formatValue; exports.frameLength = _chunkWMRDOYPVjs.frameLength; exports.framesToOptions = _chunkWMRDOYPVjs.framesToOptions; exports.fromWire = _chunkWMRDOYPVjs.fromWire; exports.getPath = _chunkWMRDOYPVjs.getPath; exports.gridOffsetPx = _chunkWMRDOYPVjs.gridOffsetPx; exports.gridUnitsToPx = _chunkWMRDOYPVjs.gridUnitsToPx; exports.httpFetchJson = _chunkWMRDOYPVjs.httpFetchJson; exports.initialVariableValues = _chunkWMRDOYPVjs.initialVariableValues; exports.inputPanels = _chunkWMRDOYPVjs.inputPanels; exports.inputProblem = _chunkWMRDOYPVjs.inputProblem; exports.insertPanel = _chunkWMRDOYPVjs.insertPanel; exports.interpolate = _chunkWMRDOYPVjs.interpolate; exports.interpolateDeep = _chunkWMRDOYPVjs.interpolateDeep; exports.isBundleResponse = _chunkWMRDOYPVjs.isBundleResponse; exports.isEditableVariableType = _chunkWMRDOYPVjs.isEditableVariableType; exports.isInputPanel = _chunkWMRDOYPVjs.isInputPanel; exports.isInputType = _chunkWMRDOYPVjs.isInputType; exports.isLocalDatasource = _chunkWMRDOYPVjs.isLocalDatasource; exports.isReducer = _chunkWMRDOYPVjs.isReducer; exports.isRow = _chunkWMRDOYPVjs.isRow; exports.isSqlDatasource = _chunkWMRDOYPVjs.isSqlDatasource; exports.layoutCanvas = _chunkWMRDOYPVjs.layoutCanvas; exports.layoutDashboard = _chunkWMRDOYPVjs.layoutDashboard; exports.lightTheme = lightTheme; exports.lineColumn = _chunkWMRDOYPVjs.lineColumn; exports.loadGazetteer = _chunkWMRDOYPVjs.loadGazetteer; exports.locate = _chunkWMRDOYPVjs.locate; exports.manifestSchemaIssues = _chunkWMRDOYPVjs.manifestSchemaIssues; exports.mappedResult = _chunkWMRDOYPVjs.mappedResult; exports.mappingProblem = _chunkWMRDOYPVjs.mappingProblem; exports.mappingRow = _chunkWMRDOYPVjs.mappingRow; exports.mappingRows = _chunkWMRDOYPVjs.mappingRows; exports.metricChanges = _chunkWMRDOYPVjs.metricChanges; exports.movePanel = _chunkWMRDOYPVjs.movePanel; exports.newDocument = _chunkWMRDOYPVjs.newDocument; exports.newPanel = _chunkWMRDOYPVjs.newPanel; exports.newVariable = _chunkWMRDOYPVjs.newVariable; exports.nextPanelId = _chunkWMRDOYPVjs.nextPanelId; exports.normalizeRef = _chunkWMRDOYPVjs.normalizeRef; exports.numberFields = _chunkWMRDOYPVjs.numberFields; exports.optionValue = _chunkWMRDOYPVjs.optionValue; exports.overrideProperties = _chunkWMRDOYPVjs.overrideProperties; exports.panelEdits = _chunkWMRDOYPVjs.panelEdits; exports.panelHasQueries = _chunkWMRDOYPVjs.panelHasQueries; exports.panelKey = _chunkWMRDOYPVjs.panelKey; exports.panelOptions = _chunkWMRDOYPVjs.panelOptions; exports.panelOverrides = _chunkWMRDOYPVjs.panelOverrides; exports.panelSize = _chunkWMRDOYPVjs.panelSize; exports.panelSpan = _chunkWMRDOYPVjs.panelSpan; exports.parseClockDigits = _chunkWMRDOYPVjs.parseClockDigits; exports.parseDashboardLink = _chunkWMRDOYPVjs.parseDashboardLink; exports.parseDuration = _chunkWMRDOYPVjs.parseDuration; exports.parseGazetteer = _chunkWMRDOYPVjs.parseGazetteer; exports.parseJsonText = _chunkWMRDOYPVjs.parseJsonText; exports.parseLocalDateTime = _chunkWMRDOYPVjs.parseLocalDateTime; exports.parseRange = _chunkWMRDOYPVjs.parseRange; exports.parseSnippet = _chunkWMRDOYPVjs.parseSnippet; exports.parseTime = _chunkWMRDOYPVjs.parseTime; exports.pasteSnippet = _chunkWMRDOYPVjs.pasteSnippet; exports.placePanel = _chunkWMRDOYPVjs.placePanel; exports.pointerToPath = _chunkWMRDOYPVjs.pointerToPath; exports.prepareDashboard = _chunkWMRDOYPVjs.prepareDashboard; exports.previewPaste = _chunkWMRDOYPVjs.previewPaste; exports.queryPanel = _chunkWMRDOYPVjs.queryPanel; exports.queryParam = _chunkWMRDOYPVjs.queryParam; exports.readConfigFiles = _chunkWMRDOYPVjs.readConfigFiles; exports.readingOrder = _chunkWMRDOYPVjs.readingOrder; exports.reduce = _chunkWMRDOYPVjs.reduce; exports.refineOptions = _chunkWMRDOYPVjs.refineOptions; exports.refreshedVariables = _chunkWMRDOYPVjs.refreshedVariables; exports.registerPanel = registerPanel; exports.removeDocumentFromManifest = _chunkWMRDOYPVjs.removeDocumentFromManifest; exports.removePanel = _chunkWMRDOYPVjs.removePanel; exports.renameDocumentInManifest = _chunkWMRDOYPVjs.renameDocumentInManifest; exports.renameVariableInPanels = _chunkWMRDOYPVjs.renameVariableInPanels; exports.repack = _chunkWMRDOYPVjs.repack; exports.repeatOptions = _chunkWMRDOYPVjs.repeatOptions; exports.resizePanel = _chunkWMRDOYPVjs.resizePanel; exports.resolveColor = _chunkWMRDOYPVjs.resolveColor; exports.resolveFieldConfig = _chunkWMRDOYPVjs.resolveFieldConfig; exports.resolveLinks = _chunkWMRDOYPVjs.resolveLinks; exports.resolveTimezone = _chunkWMRDOYPVjs.resolveTimezone; exports.resolveUrl = _chunkWMRDOYPVjs.resolveUrl; exports.resolveVariables = _chunkWMRDOYPVjs.resolveVariables; exports.revalidateBundle = _chunkWMRDOYPVjs.revalidateBundle; exports.rowsToMappings = _chunkWMRDOYPVjs.rowsToMappings; exports.sampleEntries = _chunkWMRDOYPVjs.sampleEntries; exports.screenDocuments = _chunkWMRDOYPVjs.screenDocuments; exports.screenOfType = _chunkWMRDOYPVjs.screenOfType; exports.selectValue = _chunkWMRDOYPVjs.selectValue; exports.seriesColor = _chunkWMRDOYPVjs.seriesColor; exports.setHiddenOnPhones = _chunkWMRDOYPVjs.setHiddenOnPhones; exports.setJsonValue = _chunkWMRDOYPVjs.setJsonValue; exports.setOption = _chunkWMRDOYPVjs.setOption; exports.setOptionValue = _chunkWMRDOYPVjs.setOptionValue; exports.setOverrides = _chunkWMRDOYPVjs.setOverrides; exports.settleLayout = _chunkWMRDOYPVjs.settleLayout; exports.snapToGrid = _chunkWMRDOYPVjs.snapToGrid; exports.splitPath = _chunkWMRDOYPVjs.splitPath; exports.startOf = _chunkWMRDOYPVjs.startOf; exports.stringifyCompact = _chunkWMRDOYPVjs.stringifyCompact; exports.tabIdFor = _chunkWMRDOYPVjs.tabIdFor; exports.textSuggestions = _chunkWMRDOYPVjs.textSuggestions; exports.thresholdStep = _chunkWMRDOYPVjs.thresholdStep; exports.timeExprError = _chunkWMRDOYPVjs.timeExprError; exports.timeField = _chunkWMRDOYPVjs.timeField; exports.toEntries = _chunkWMRDOYPVjs.toEntries; exports.toMillis = _chunkWMRDOYPVjs.toMillis; exports.toSeries = _chunkWMRDOYPVjs.toSeries; exports.toXYSeries = _chunkWMRDOYPVjs.toXYSeries; exports.uniqueNames = _chunkWMRDOYPVjs.uniqueNames; exports.useDashTheme = useDashTheme; exports.useDashboard = useDashboard; exports.useInputForm = useInputForm; exports.usePanelData = usePanelData; exports.validateBundle = _chunkWMRDOYPVjs.validateBundle; exports.validateDashboard = _chunkWMRDOYPVjs.validateDashboard; exports.validateManifest = _chunkWMRDOYPVjs.validateManifest; exports.valueColor = _chunkWMRDOYPVjs.valueColor; exports.valueText = _chunkWMRDOYPVjs.valueText; exports.variableDependents = _chunkWMRDOYPVjs.variableDependents; exports.variableInfo = _chunkWMRDOYPVjs.variableInfo; exports.variableNameError = _chunkWMRDOYPVjs.variableNameError; exports.variableOptions = _chunkWMRDOYPVjs.variableOptions; exports.variableOrder = _chunkWMRDOYPVjs.variableOrder; exports.variableReferences = _chunkWMRDOYPVjs.variableReferences; exports.variableUses = _chunkWMRDOYPVjs.variableUses; exports.variableWithCurrent = _chunkWMRDOYPVjs.variableWithCurrent; exports.variableWithFlags = _chunkWMRDOYPVjs.variableWithFlags; exports.variableWithQuery = _chunkWMRDOYPVjs.variableWithQuery; exports.variableWithType = _chunkWMRDOYPVjs.variableWithType; exports.visibleVariables = _chunkWMRDOYPVjs.visibleVariables; exports.zoomRange = _chunkWMRDOYPVjs.zoomRange;
|
|
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;
|