@modelform/react-native 0.14.0 → 0.15.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/README.md +7 -3
- package/dist/{chunk-72OFPTDE.mjs → chunk-GWGDDKJE.mjs} +362 -66
- package/dist/{chunk-XWSPLZNC.js → chunk-P4NMZ77W.js} +450 -154
- package/dist/core/formFill.d.ts +1 -9
- package/dist/core/index.d.ts +1 -0
- package/dist/core/index.js +4 -2
- package/dist/core/index.mjs +3 -1
- package/dist/core/ruleFill.d.ts +12 -0
- package/dist/index.js +164 -162
- package/dist/index.mjs +3 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -251,7 +251,8 @@
|
|
|
251
251
|
|
|
252
252
|
|
|
253
253
|
|
|
254
|
-
|
|
254
|
+
|
|
255
|
+
var _chunkP4NMZ77Wjs = require('./chunk-P4NMZ77W.js');
|
|
255
256
|
|
|
256
257
|
// src/ui/theme.tsx
|
|
257
258
|
var _react = require('react');
|
|
@@ -441,7 +442,7 @@ function DashboardProvider({ dashboard, resolve, refreshKey: externalKey = 0, on
|
|
|
441
442
|
if (!dashboard.refresh) return;
|
|
442
443
|
let ms;
|
|
443
444
|
try {
|
|
444
|
-
ms =
|
|
445
|
+
ms = _chunkP4NMZ77Wjs.parseDuration.call(void 0, dashboard.refresh);
|
|
445
446
|
} catch (e2) {
|
|
446
447
|
return;
|
|
447
448
|
}
|
|
@@ -449,7 +450,7 @@ function DashboardProvider({ dashboard, resolve, refreshKey: externalKey = 0, on
|
|
|
449
450
|
return () => clearInterval(id);
|
|
450
451
|
}, [dashboard.refresh, refresh]);
|
|
451
452
|
const refreshKey = tick + externalKey;
|
|
452
|
-
const range3 = _react.useMemo.call(void 0, () =>
|
|
453
|
+
const range3 = _react.useMemo.call(void 0, () => _chunkP4NMZ77Wjs.parseRange.call(void 0, rawRange), [rawRange, refreshKey]);
|
|
453
454
|
const shared = _react.useMemo.call(void 0, () => /* @__PURE__ */ new Map(), [range3, vars.variables, vars.variableInfo]);
|
|
454
455
|
const value = _react.useMemo.call(void 0,
|
|
455
456
|
() => ({
|
|
@@ -486,8 +487,8 @@ function DashboardProvider({ dashboard, resolve, refreshKey: externalKey = 0, on
|
|
|
486
487
|
] });
|
|
487
488
|
}
|
|
488
489
|
function useDashboardVariables(dashboard, resolve, rawRange) {
|
|
489
|
-
const [state, setState] = _react.useState.call(void 0, () => ({ values:
|
|
490
|
-
const [resolving, setResolving] = _react.useState.call(void 0, () => !!resolve &&
|
|
490
|
+
const [state, setState] = _react.useState.call(void 0, () => ({ values: _chunkP4NMZ77Wjs.initialVariableValues.call(void 0, dashboard), options: {}, errors: {} }));
|
|
491
|
+
const [resolving, setResolving] = _react.useState.call(void 0, () => !!resolve && _chunkP4NMZ77Wjs.refreshedVariables.call(void 0, dashboard, "load").length > 0);
|
|
491
492
|
const [runKey, setRunKey] = _react.useState.call(void 0, 0);
|
|
492
493
|
const pending = _react.useRef.call(void 0, /* @__PURE__ */ new Set());
|
|
493
494
|
const stateRef = _react.useRef.call(void 0, state);
|
|
@@ -520,7 +521,7 @@ function useDashboardVariables(dashboard, resolve, rawRange) {
|
|
|
520
521
|
setState(update);
|
|
521
522
|
setResolving(false);
|
|
522
523
|
};
|
|
523
|
-
|
|
524
|
+
_chunkP4NMZ77Wjs.resolveVariables.call(void 0, dashboard, { values, options, names, resolve: resolve2, range: _chunkP4NMZ77Wjs.parseRange.call(void 0, rawRange), signal: controller.signal }).then(
|
|
524
525
|
(res) => finish((s) => ({
|
|
525
526
|
// Only the re-run variables change, so a pick made while this ran isn't overwritten.
|
|
526
527
|
values: { ...s.values, ...Object.fromEntries([...names].filter((n) => n in res.values).map((n) => [n, res.values[n]])) },
|
|
@@ -534,11 +535,11 @@ function useDashboardVariables(dashboard, resolve, rawRange) {
|
|
|
534
535
|
const [loadedDashboard, setLoadedDashboard] = _react.useState.call(void 0, dashboard);
|
|
535
536
|
if (dashboard !== loadedDashboard) {
|
|
536
537
|
setLoadedDashboard(dashboard);
|
|
537
|
-
setState((s) => ({ ...s, values: { ...
|
|
538
|
+
setState((s) => ({ ...s, values: { ..._chunkP4NMZ77Wjs.initialVariableValues.call(void 0, dashboard), ...s.values } }));
|
|
538
539
|
}
|
|
539
540
|
_react.useEffect.call(void 0, () => {
|
|
540
|
-
const roots =
|
|
541
|
-
schedule([...roots, ...
|
|
541
|
+
const roots = _chunkP4NMZ77Wjs.refreshedVariables.call(void 0, dashboard, "load");
|
|
542
|
+
schedule([...roots, ..._chunkP4NMZ77Wjs.variableDependents.call(void 0, dashboard, roots)]);
|
|
542
543
|
}, [dashboard, schedule]);
|
|
543
544
|
const mounted = _react.useRef.call(void 0, false);
|
|
544
545
|
_react.useEffect.call(void 0, () => {
|
|
@@ -546,17 +547,17 @@ function useDashboardVariables(dashboard, resolve, rawRange) {
|
|
|
546
547
|
mounted.current = true;
|
|
547
548
|
return;
|
|
548
549
|
}
|
|
549
|
-
const roots =
|
|
550
|
-
schedule([...roots, ...
|
|
550
|
+
const roots = _chunkP4NMZ77Wjs.refreshedVariables.call(void 0, dashboard, "range");
|
|
551
|
+
schedule([...roots, ..._chunkP4NMZ77Wjs.variableDependents.call(void 0, dashboard, roots)]);
|
|
551
552
|
}, [rawRange]);
|
|
552
553
|
const setVariable = _react.useCallback.call(void 0,
|
|
553
554
|
(name, value) => {
|
|
554
555
|
setState((s) => ({ ...s, values: { ...s.values, [name]: value } }));
|
|
555
|
-
schedule(
|
|
556
|
+
schedule(_chunkP4NMZ77Wjs.variableDependents.call(void 0, dashboard, [name]));
|
|
556
557
|
},
|
|
557
558
|
[dashboard, schedule]
|
|
558
559
|
);
|
|
559
|
-
const info = _react.useMemo.call(void 0, () =>
|
|
560
|
+
const info = _react.useMemo.call(void 0, () => _chunkP4NMZ77Wjs.variableInfo.call(void 0, dashboard, state.options), [dashboard, state.options]);
|
|
560
561
|
return _react.useMemo.call(void 0,
|
|
561
562
|
() => ({
|
|
562
563
|
variables: state.values,
|
|
@@ -586,7 +587,7 @@ function usePanelData(panel, widthPx, enabled = true) {
|
|
|
586
587
|
_react.useEffect.call(void 0, () => {
|
|
587
588
|
if (!enabled || !request || !variablesReady) return;
|
|
588
589
|
const controller = new AbortController();
|
|
589
|
-
|
|
590
|
+
_chunkP4NMZ77Wjs.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))) }));
|
|
590
591
|
return () => controller.abort();
|
|
591
592
|
}, [enabled, request, variablesReady]);
|
|
592
593
|
if (!enabled) return IDLE;
|
|
@@ -596,7 +597,7 @@ function usePanelData(panel, widthPx, enabled = true) {
|
|
|
596
597
|
function usePanelLinks(panel) {
|
|
597
598
|
const { dashboard, variables, variableInfo: variableInfo2, range: range3, openLinks } = useDashboard();
|
|
598
599
|
const resolve = _react.useCallback.call(void 0,
|
|
599
|
-
(links, data) =>
|
|
600
|
+
(links, data) => _chunkP4NMZ77Wjs.resolveLinks.call(void 0, links, { dashboard, values: variables, info: variableInfo2, scoped: panel.scopedVars, range: range3, timezone: dashboard.timezone, data }),
|
|
600
601
|
[dashboard, variables, variableInfo2, panel.scopedVars, range3]
|
|
601
602
|
);
|
|
602
603
|
return { resolve, openLinks };
|
|
@@ -637,7 +638,7 @@ var RenderBoundary = (_class = class extends _react.Component {constructor(...ar
|
|
|
637
638
|
|
|
638
639
|
// src/ui/inputs/formContext.ts
|
|
639
640
|
|
|
640
|
-
var groupKey = (g) => g.id != null ? `#${g.id}` :
|
|
641
|
+
var groupKey = (g) => g.id != null ? `#${g.id}` : _chunkP4NMZ77Wjs.groupFields.call(void 0, g).map((f) => f.options.metric).join("|");
|
|
641
642
|
var InputFormContext = _react.createContext.call(void 0, null);
|
|
642
643
|
function useInputForm() {
|
|
643
644
|
const v = _react.useContext.call(void 0, InputFormContext);
|
|
@@ -698,14 +699,14 @@ var ArrowIcon = ({ color, dir }) => /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
|
698
699
|
function displayExpr(expr) {
|
|
699
700
|
if (expr.trim().startsWith("now")) return expr;
|
|
700
701
|
try {
|
|
701
|
-
return
|
|
702
|
+
return _chunkP4NMZ77Wjs.formatLocalDateTime.call(void 0, _chunkP4NMZ77Wjs.parseTime.call(void 0, expr));
|
|
702
703
|
} catch (e3) {
|
|
703
704
|
return expr;
|
|
704
705
|
}
|
|
705
706
|
}
|
|
706
707
|
function tryParse(expr, roundUp, now = Date.now()) {
|
|
707
708
|
try {
|
|
708
|
-
return
|
|
709
|
+
return _chunkP4NMZ77Wjs.parseTime.call(void 0, expr, now, roundUp);
|
|
709
710
|
} catch (e4) {
|
|
710
711
|
return null;
|
|
711
712
|
}
|
|
@@ -719,7 +720,7 @@ function endOfDay(ms) {
|
|
|
719
720
|
return new Date(d.getFullYear(), d.getMonth(), d.getDate() + 1).getTime() - 1e3;
|
|
720
721
|
}
|
|
721
722
|
function resolveTo(expr) {
|
|
722
|
-
return /^\s*\d{4}-\d{1,2}-\d{1,2}\s*$/.test(expr) ?
|
|
723
|
+
return /^\s*\d{4}-\d{1,2}-\d{1,2}\s*$/.test(expr) ? _chunkP4NMZ77Wjs.formatLocalDateTime.call(void 0, endOfDay(_chunkP4NMZ77Wjs.parseTime.call(void 0, expr))) : expr;
|
|
723
724
|
}
|
|
724
725
|
function TimeRangeSheet({ visible, value, onApply, onClose }) {
|
|
725
726
|
const theme = useDashTheme();
|
|
@@ -730,12 +731,12 @@ function TimeRangeSheet({ visible, value, onApply, onClose }) {
|
|
|
730
731
|
const [now] = _react.useState.call(void 0, () => Date.now());
|
|
731
732
|
const [month, setMonth] = _react.useState.call(void 0, () => new Date(_nullishCoalesce(tryParse(value.from, false), () => ( now))));
|
|
732
733
|
const fromMs = tryParse(from, false, now);
|
|
733
|
-
const toMs = tryParse(
|
|
734
|
-
const fromError =
|
|
735
|
-
const toError =
|
|
734
|
+
const toMs = tryParse(_chunkP4NMZ77Wjs.timeExprError.call(void 0, to) ? to : resolveTo(to), true, now);
|
|
735
|
+
const fromError = _chunkP4NMZ77Wjs.timeExprError.call(void 0, from);
|
|
736
|
+
const toError = _chunkP4NMZ77Wjs.timeExprError.call(void 0, to);
|
|
736
737
|
const orderError = fromMs != null && toMs != null && fromMs >= toMs ? "\u201CTo\u201D must be after \u201CFrom\u201D" : null;
|
|
737
738
|
const valid = !fromError && !toError && !orderError;
|
|
738
|
-
const normalize = (expr) => expr.trim().startsWith("now") ? expr.trim() :
|
|
739
|
+
const normalize = (expr) => expr.trim().startsWith("now") ? expr.trim() : _chunkP4NMZ77Wjs.formatLocalDateTime.call(void 0, _chunkP4NMZ77Wjs.parseTime.call(void 0, expr));
|
|
739
740
|
const apply = () => {
|
|
740
741
|
if (!valid) return;
|
|
741
742
|
onApply({ from: normalize(from), to: normalize(resolveTo(to)) });
|
|
@@ -744,14 +745,14 @@ function TimeRangeSheet({ visible, value, onApply, onClose }) {
|
|
|
744
745
|
const pickDay = (day) => {
|
|
745
746
|
const end = endOfDay(day);
|
|
746
747
|
if (active === "from") {
|
|
747
|
-
setFrom(
|
|
748
|
-
if (toMs == null || toMs <= day) setTo(
|
|
748
|
+
setFrom(_chunkP4NMZ77Wjs.formatLocalDateTime.call(void 0, day));
|
|
749
|
+
if (toMs == null || toMs <= day) setTo(_chunkP4NMZ77Wjs.formatLocalDateTime.call(void 0, end));
|
|
749
750
|
setActive("to");
|
|
750
751
|
} else if (fromMs != null && day < startOfDay(fromMs)) {
|
|
751
|
-
setFrom(
|
|
752
|
-
setTo(
|
|
752
|
+
setFrom(_chunkP4NMZ77Wjs.formatLocalDateTime.call(void 0, day));
|
|
753
|
+
setTo(_chunkP4NMZ77Wjs.formatLocalDateTime.call(void 0, end));
|
|
753
754
|
} else {
|
|
754
|
-
setTo(
|
|
755
|
+
setTo(_chunkP4NMZ77Wjs.formatLocalDateTime.call(void 0, end));
|
|
755
756
|
}
|
|
756
757
|
};
|
|
757
758
|
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
@@ -787,7 +788,7 @@ function TimeRangeSheet({ visible, value, onApply, onClose }) {
|
|
|
787
788
|
}
|
|
788
789
|
),
|
|
789
790
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _reactnative.Text, { style: [styles3.sectionTitle, { color: theme.textSecondary }], children: "Relative ranges" }),
|
|
790
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _reactnative.View, { style: styles3.chips, children:
|
|
791
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _reactnative.View, { style: styles3.chips, children: _chunkP4NMZ77Wjs.RELATIVE_RANGES.map((r) => /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
791
792
|
Chip,
|
|
792
793
|
{
|
|
793
794
|
label: r.label,
|
|
@@ -931,17 +932,17 @@ var FilterIcon = ({ color }) => /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _re
|
|
|
931
932
|
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" }) });
|
|
932
933
|
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" }) });
|
|
933
934
|
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" }) });
|
|
934
|
-
function DashboardToolbar({ presets =
|
|
935
|
+
function DashboardToolbar({ presets = _chunkP4NMZ77Wjs.TIME_PRESETS }) {
|
|
935
936
|
const theme = useDashTheme();
|
|
936
937
|
const { dashboard, rawRange, setRawRange, variables, variableErrors } = useDashboard();
|
|
937
938
|
const [filtersOpen, setFiltersOpen] = _react.useState.call(void 0, false);
|
|
938
939
|
const [rangeOpen, setRangeOpen] = _react.useState.call(void 0, false);
|
|
939
940
|
const [rangeKey, setRangeKey] = _react.useState.call(void 0, 0);
|
|
940
941
|
const custom = !presets.some((p) => rawRange.from === p.from && rawRange.to === p.to);
|
|
941
|
-
const vars =
|
|
942
|
+
const vars = _chunkP4NMZ77Wjs.visibleVariables.call(void 0, dashboard);
|
|
942
943
|
const active = vars.filter((v) => {
|
|
943
944
|
const cur = variables[v.name];
|
|
944
|
-
return v.includeAll && cur != null && !(Array.isArray(cur) ? cur.includes(
|
|
945
|
+
return v.includeAll && cur != null && !(Array.isArray(cur) ? cur.includes(_chunkP4NMZ77Wjs.ALL) : cur === _chunkP4NMZ77Wjs.ALL);
|
|
945
946
|
}).length;
|
|
946
947
|
const hasError = vars.some((v) => variableErrors[v.name]);
|
|
947
948
|
return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _reactnative.View, { style: styles4.toolbar, children: [
|
|
@@ -967,7 +968,7 @@ function DashboardToolbar({ presets = _chunkXWSPLZNCjs.TIME_PRESETS }) {
|
|
|
967
968
|
setRangeOpen(true);
|
|
968
969
|
},
|
|
969
970
|
accessibilityRole: "button",
|
|
970
|
-
accessibilityLabel: custom ? `Time range, ${
|
|
971
|
+
accessibilityLabel: custom ? `Time range, ${_chunkP4NMZ77Wjs.describeRange.call(void 0, rawRange)}` : "Custom time range",
|
|
971
972
|
style: ({ pressed }) => [
|
|
972
973
|
custom ? styles4.rangeButton : styles4.iconButton,
|
|
973
974
|
{ borderColor: custom ? theme.accent : theme.border, backgroundColor: theme.surface },
|
|
@@ -975,7 +976,7 @@ function DashboardToolbar({ presets = _chunkXWSPLZNCjs.TIME_PRESETS }) {
|
|
|
975
976
|
],
|
|
976
977
|
children: [
|
|
977
978
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, CalendarIcon, { color: custom ? theme.accent : theme.textSecondary }),
|
|
978
|
-
custom && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _reactnative.Text, { style: [styles4.rangeLabel, { color: theme.accent }], numberOfLines: 1, children:
|
|
979
|
+
custom && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _reactnative.Text, { style: [styles4.rangeLabel, { color: theme.accent }], numberOfLines: 1, children: _chunkP4NMZ77Wjs.describeRange.call(void 0, rawRange) })
|
|
979
980
|
]
|
|
980
981
|
}
|
|
981
982
|
),
|
|
@@ -1031,14 +1032,14 @@ function FilterSection({ variable: v, open, onToggle }) {
|
|
|
1031
1032
|
const theme = useDashTheme();
|
|
1032
1033
|
const { variables, variableInfo: variableInfo2, variableErrors, variablesReady, setVariable } = useDashboard();
|
|
1033
1034
|
const current = variables[v.name];
|
|
1034
|
-
const summary =
|
|
1035
|
-
const options = [...v.includeAll ? [{ text: "All", value:
|
|
1035
|
+
const summary = _chunkP4NMZ77Wjs.valueText.call(void 0, current, variableInfo2[v.name]) || (variablesReady ? "None" : "\u2026");
|
|
1036
|
+
const options = [...v.includeAll ? [{ text: "All", value: _chunkP4NMZ77Wjs.ALL }] : [], ..._nullishCoalesce(_optionalChain([variableInfo2, 'access', _9 => _9[v.name], 'optionalAccess', _10 => _10.options]), () => ( []))];
|
|
1036
1037
|
const error = variableErrors[v.name];
|
|
1037
1038
|
const choose = (value, selected) => {
|
|
1038
|
-
if (v.multi && value !==
|
|
1039
|
-
const cur = (Array.isArray(current) ? current : [current]).filter((c) => c && c !==
|
|
1039
|
+
if (v.multi && value !== _chunkP4NMZ77Wjs.ALL) {
|
|
1040
|
+
const cur = (Array.isArray(current) ? current : [current]).filter((c) => c && c !== _chunkP4NMZ77Wjs.ALL);
|
|
1040
1041
|
const next = selected ? cur.filter((c) => c !== value) : [...cur, value];
|
|
1041
|
-
setVariable(v.name, next.length ? next : [
|
|
1042
|
+
setVariable(v.name, next.length ? next : [_chunkP4NMZ77Wjs.ALL]);
|
|
1042
1043
|
} else {
|
|
1043
1044
|
setVariable(v.name, v.multi ? [value] : value);
|
|
1044
1045
|
if (!v.multi) onToggle();
|
|
@@ -1178,7 +1179,7 @@ function barCategory(panel, frame) {
|
|
|
1178
1179
|
}
|
|
1179
1180
|
function categoryLabels(field) {
|
|
1180
1181
|
if (field.type !== "time") return field.values.map((v) => v == null ? "" : String(v));
|
|
1181
|
-
const times = field.values.map((v) => v == null ? null :
|
|
1182
|
+
const times = field.values.map((v) => v == null ? null : _chunkP4NMZ77Wjs.toMillis.call(void 0, v));
|
|
1182
1183
|
let step = Infinity;
|
|
1183
1184
|
times.forEach((t, i) => {
|
|
1184
1185
|
const prev = times[i - 1];
|
|
@@ -1224,19 +1225,19 @@ function formatTooltipTime(t) {
|
|
|
1224
1225
|
return new Date(t).toLocaleString(void 0, { month: "short", day: "numeric", hour: "2-digit", minute: "2-digit" });
|
|
1225
1226
|
}
|
|
1226
1227
|
function styledSeries(panel, frames, scheme) {
|
|
1227
|
-
return styleSeries(panel,
|
|
1228
|
+
return styleSeries(panel, _chunkP4NMZ77Wjs.toSeries.call(void 0, frames), frames, scheme);
|
|
1228
1229
|
}
|
|
1229
1230
|
function styledXYSeries(panel, frames, scheme) {
|
|
1230
|
-
const { series, x } =
|
|
1231
|
-
const xConfig = x ?
|
|
1231
|
+
const { series, x } = _chunkP4NMZ77Wjs.toXYSeries.call(void 0, frames, _optionalChain([panel, 'access', _18 => _18.options, 'optionalAccess', _19 => _19.xField]) || void 0);
|
|
1232
|
+
const xConfig = x ? _chunkP4NMZ77Wjs.resolveFieldConfig.call(void 0, panel, x.field, x.frame, x.field.name) : {};
|
|
1232
1233
|
return { series: styleSeries(panel, series, frames, scheme), xConfig };
|
|
1233
1234
|
}
|
|
1234
1235
|
function styleSeries(panel, series, frames, scheme) {
|
|
1235
1236
|
const frameOf = /* @__PURE__ */ new Map();
|
|
1236
1237
|
frames.forEach((f) => f.fields.forEach((field) => frameOf.set(field, f)));
|
|
1237
1238
|
return series.map((s, i) => {
|
|
1238
|
-
const config =
|
|
1239
|
-
return { ...s, name: _nullishCoalesce(config.displayName, () => ( s.name)), config, color:
|
|
1239
|
+
const config = _chunkP4NMZ77Wjs.resolveFieldConfig.call(void 0, panel, s.field, frameOf.get(s.field), s.name);
|
|
1240
|
+
return { ...s, name: _nullishCoalesce(config.displayName, () => ( s.name)), config, color: _chunkP4NMZ77Wjs.seriesColor.call(void 0, i, scheme, config) };
|
|
1240
1241
|
});
|
|
1241
1242
|
}
|
|
1242
1243
|
function reducedValues(panel, frames, scheme) {
|
|
@@ -1244,30 +1245,30 @@ function reducedValues(panel, frames, scheme) {
|
|
|
1244
1245
|
const out = [];
|
|
1245
1246
|
const multiple = frames.length > 1;
|
|
1246
1247
|
frames.forEach(
|
|
1247
|
-
(frame, fi) =>
|
|
1248
|
-
const raw =
|
|
1249
|
-
const config =
|
|
1248
|
+
(frame, fi) => _chunkP4NMZ77Wjs.numberFields.call(void 0, frame).forEach((field) => {
|
|
1249
|
+
const raw = _chunkP4NMZ77Wjs.fieldDisplayName.call(void 0, field, frame, multiple);
|
|
1250
|
+
const config = _chunkP4NMZ77Wjs.resolveFieldConfig.call(void 0, panel, field, frame, raw);
|
|
1250
1251
|
const values = field.values.map((v) => v == null ? null : Number(v));
|
|
1251
|
-
const value =
|
|
1252
|
-
const color =
|
|
1253
|
-
const step =
|
|
1254
|
-
const mapped =
|
|
1252
|
+
const value = _chunkP4NMZ77Wjs.reduce.call(void 0, values, calc);
|
|
1253
|
+
const color = _chunkP4NMZ77Wjs.seriesColor.call(void 0, out.length, scheme, config);
|
|
1254
|
+
const step = _chunkP4NMZ77Wjs.thresholdStep.call(void 0, value, config);
|
|
1255
|
+
const mapped = _chunkP4NMZ77Wjs.mappedResult.call(void 0, value, config);
|
|
1255
1256
|
out.push({
|
|
1256
1257
|
key: `${fi}/${field.name}/${JSON.stringify(_nullishCoalesce(field.labels, () => ( {})))}`,
|
|
1257
1258
|
name: _nullishCoalesce(config.displayName, () => ( raw)),
|
|
1258
1259
|
value,
|
|
1259
|
-
text: _optionalChain([mapped, 'optionalAccess', _24 => _24.text]) ||
|
|
1260
|
+
text: _optionalChain([mapped, 'optionalAccess', _24 => _24.text]) || _chunkP4NMZ77Wjs.formatValue.call(void 0, value, config),
|
|
1260
1261
|
mapped,
|
|
1261
1262
|
config,
|
|
1262
1263
|
color,
|
|
1263
|
-
stateColor: _optionalChain([mapped, 'optionalAccess', _25 => _25.color]) ?
|
|
1264
|
+
stateColor: _optionalChain([mapped, 'optionalAccess', _25 => _25.color]) ? _chunkP4NMZ77Wjs.resolveColor.call(void 0, mapped.color, color) : step ? _chunkP4NMZ77Wjs.resolveColor.call(void 0, step.color, color) : color,
|
|
1264
1265
|
sparkline: values,
|
|
1265
1266
|
field,
|
|
1266
1267
|
frame
|
|
1267
1268
|
});
|
|
1268
1269
|
})
|
|
1269
1270
|
);
|
|
1270
|
-
return
|
|
1271
|
+
return _chunkP4NMZ77Wjs.uniqueNames.call(void 0, out, (v) => v.field, frames);
|
|
1271
1272
|
}
|
|
1272
1273
|
function yDomain(series, includeZero) {
|
|
1273
1274
|
let min = Infinity;
|
|
@@ -1328,22 +1329,22 @@ function NoData({ message = "No data" }) {
|
|
|
1328
1329
|
}
|
|
1329
1330
|
function rowTooltipItems(panel, frame, row, multiple) {
|
|
1330
1331
|
return frame.fields.flatMap((f) => {
|
|
1331
|
-
const name =
|
|
1332
|
-
const config =
|
|
1332
|
+
const name = _chunkP4NMZ77Wjs.fieldDisplayName.call(void 0, f, frame, multiple);
|
|
1333
|
+
const config = _chunkP4NMZ77Wjs.resolveFieldConfig.call(void 0, panel, f, frame, name);
|
|
1333
1334
|
if (_optionalChain([config, 'access', _36 => _36.custom, 'optionalAccess', _37 => _37.hideFrom, 'optionalAccess', _38 => _38.tooltip])) return [];
|
|
1334
1335
|
const v = f.values[row];
|
|
1335
|
-
const value = v == null ? "\u2014" : f.type === "number" ?
|
|
1336
|
+
const value = v == null ? "\u2014" : f.type === "number" ? _chunkP4NMZ77Wjs.formatDisplay.call(void 0, Number(v), config) : f.type === "time" ? formatTooltipTime(_chunkP4NMZ77Wjs.toMillis.call(void 0, v)) : String(v);
|
|
1336
1337
|
return [{ name: _nullishCoalesce(config.displayName, () => ( name)), value }];
|
|
1337
1338
|
});
|
|
1338
1339
|
}
|
|
1339
1340
|
function rowLinks(panel, frame, row, multiple, resolve) {
|
|
1340
1341
|
return mergeLinks(
|
|
1341
1342
|
frame.fields.flatMap((f) => {
|
|
1342
|
-
const name =
|
|
1343
|
-
const config =
|
|
1343
|
+
const name = _chunkP4NMZ77Wjs.fieldDisplayName.call(void 0, f, frame, multiple);
|
|
1344
|
+
const config = _chunkP4NMZ77Wjs.resolveFieldConfig.call(void 0, panel, f, frame, name);
|
|
1344
1345
|
if (!_optionalChain([config, 'access', _39 => _39.links, 'optionalAccess', _40 => _40.length])) return [];
|
|
1345
1346
|
const v = f.values[row];
|
|
1346
|
-
const text = v == null ? void 0 : f.type === "number" ?
|
|
1347
|
+
const text = v == null ? void 0 : f.type === "number" ? _chunkP4NMZ77Wjs.formatDisplay.call(void 0, Number(v), config) : String(v);
|
|
1347
1348
|
return [{ name: _nullishCoalesce(config.displayName, () => ( name)), links: resolve(config.links, { frame, row, field: f, fieldName: _nullishCoalesce(config.displayName, () => ( name)), value: v, text }) }];
|
|
1348
1349
|
})
|
|
1349
1350
|
);
|
|
@@ -1356,7 +1357,7 @@ function valueLinks(panel, v, resolve) {
|
|
|
1356
1357
|
fieldName: v.name,
|
|
1357
1358
|
seriesName: v.name,
|
|
1358
1359
|
value: v.value,
|
|
1359
|
-
text:
|
|
1360
|
+
text: _chunkP4NMZ77Wjs.formatValue.call(void 0, v.value, v.config),
|
|
1360
1361
|
calc: _nullishCoalesce(_optionalChain([panel, 'access', _44 => _44.options, 'optionalAccess', _45 => _45.reduceOptions, 'optionalAccess', _46 => _46.calcs, 'optionalAccess', _47 => _47[0]]), () => ( "lastNotNull"))
|
|
1361
1362
|
});
|
|
1362
1363
|
}
|
|
@@ -1481,10 +1482,10 @@ function useDictation(panel, value, onChange, choices) {
|
|
|
1481
1482
|
try {
|
|
1482
1483
|
mine = speech.start({
|
|
1483
1484
|
lang: form.speechLang,
|
|
1484
|
-
hints:
|
|
1485
|
+
hints: _chunkP4NMZ77Wjs.dictationHints.call(void 0, panel, choices),
|
|
1485
1486
|
onText(text, final) {
|
|
1486
1487
|
if (!final) return setHint(text ? `\u201C${text}\u201D` : null);
|
|
1487
|
-
const result =
|
|
1488
|
+
const result = _chunkP4NMZ77Wjs.spokenValue.call(void 0, panel, text, latest.current.value, latest.current.choices);
|
|
1488
1489
|
if ("value" in result) {
|
|
1489
1490
|
latest.current.onChange(result.value);
|
|
1490
1491
|
setHint(null);
|
|
@@ -1503,7 +1504,7 @@ function useDictation(panel, value, onChange, choices) {
|
|
|
1503
1504
|
setOn(true);
|
|
1504
1505
|
}
|
|
1505
1506
|
};
|
|
1506
|
-
return { available: !!speech &&
|
|
1507
|
+
return { available: !!speech && _chunkP4NMZ77Wjs.takesDictation.call(void 0, panel), listening: on, hint, toggle };
|
|
1507
1508
|
}
|
|
1508
1509
|
function MicButton({ dictation, title, label, size = 32 }) {
|
|
1509
1510
|
const theme = useDashTheme();
|
|
@@ -1620,15 +1621,15 @@ function NumberInput({ panel, value, onChange }) {
|
|
|
1620
1621
|
}
|
|
1621
1622
|
function DurationInput({ panel, value, onChange }) {
|
|
1622
1623
|
const theme = useDashTheme();
|
|
1623
|
-
const toDigits = (v) => typeof v === "number" ?
|
|
1624
|
+
const toDigits = (v) => typeof v === "number" ? _chunkP4NMZ77Wjs.formatClock.call(void 0, v).replace(/\D/g, "").replace(/^0+/, "") : "";
|
|
1624
1625
|
const [digits, setDigits] = _react.useState.call(void 0, toDigits(value));
|
|
1625
1626
|
const [syncedValue, setSyncedValue] = _react.useState.call(void 0, value);
|
|
1626
1627
|
if (value !== syncedValue) {
|
|
1627
1628
|
setSyncedValue(value);
|
|
1628
|
-
setDigits((d) => value == null ?
|
|
1629
|
+
setDigits((d) => value == null ? _chunkP4NMZ77Wjs.parseClockDigits.call(void 0, d) == null ? d : "" : _chunkP4NMZ77Wjs.parseClockDigits.call(void 0, d) === value ? d : toDigits(value));
|
|
1629
1630
|
}
|
|
1630
1631
|
const masked = digits ? maskClock(digits) : "";
|
|
1631
|
-
const invalid = !!digits &&
|
|
1632
|
+
const invalid = !!digits && _chunkP4NMZ77Wjs.parseClockDigits.call(void 0, digits) == null;
|
|
1632
1633
|
const dictation = useDictation(panel, value, onChange);
|
|
1633
1634
|
return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _reactnative.View, { style: styles7.dictated, children: [
|
|
1634
1635
|
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _reactnative.View, { style: [styles7.numberField, { borderColor: invalid ? theme.danger : theme.border }], children: [
|
|
@@ -1639,7 +1640,7 @@ function DurationInput({ panel, value, onChange }) {
|
|
|
1639
1640
|
onChangeText: (t) => {
|
|
1640
1641
|
const d = t.replace(/\D/g, "").replace(/^0+/, "").slice(0, 6);
|
|
1641
1642
|
setDigits(d);
|
|
1642
|
-
onChange(
|
|
1643
|
+
onChange(_chunkP4NMZ77Wjs.parseClockDigits.call(void 0, d));
|
|
1643
1644
|
},
|
|
1644
1645
|
keyboardType: "number-pad",
|
|
1645
1646
|
placeholder: _nullishCoalesce(panel.options.placeholder, () => ( "00:00.00")),
|
|
@@ -1844,10 +1845,10 @@ function SuggestTextInput({ panel, value, onChange }) {
|
|
|
1844
1845
|
}, [store, metric, suggestWith]);
|
|
1845
1846
|
const withText = suggestWith ? form.value(suggestWith) : null;
|
|
1846
1847
|
const own = entries.filter((e) => e.metric === metric);
|
|
1847
|
-
const scoped = suggestWith && typeof withText === "string" && withText.trim() ?
|
|
1848
|
+
const scoped = suggestWith && typeof withText === "string" && withText.trim() ? _chunkP4NMZ77Wjs.entriesSavedWith.call(void 0, entries, metric, suggestWith, withText) : [];
|
|
1848
1849
|
const query = typed ? text : "";
|
|
1849
|
-
const fromScoped =
|
|
1850
|
-
const suggestions = (fromScoped.length ? fromScoped :
|
|
1850
|
+
const fromScoped = _chunkP4NMZ77Wjs.textSuggestions.call(void 0, scoped, query);
|
|
1851
|
+
const suggestions = (fromScoped.length ? fromScoped : _chunkP4NMZ77Wjs.textSuggestions.call(void 0, own, query)).filter((s) => s.toLowerCase() !== text.trim().toLowerCase());
|
|
1851
1852
|
const dictation = useDictation(panel, value, (v) => {
|
|
1852
1853
|
setTyped(false);
|
|
1853
1854
|
onChange(v);
|
|
@@ -1894,7 +1895,7 @@ function CounterInput({ panel }) {
|
|
|
1894
1895
|
const { metric, increment = 1, unit } = panel.options;
|
|
1895
1896
|
const [today, setToday] = _react.useState.call(void 0, 0);
|
|
1896
1897
|
_react.useEffect.call(void 0, () => {
|
|
1897
|
-
const load = () => store.list({ metrics: [metric], from:
|
|
1898
|
+
const load = () => store.list({ metrics: [metric], from: _chunkP4NMZ77Wjs.startOf.call(void 0, /* @__PURE__ */ new Date(), "d").getTime() }).then((rows) => setToday(rows.reduce((a, e) => a + (_nullishCoalesce(e.value, () => ( 0))), 0)));
|
|
1898
1899
|
load();
|
|
1899
1900
|
return store.subscribe(load);
|
|
1900
1901
|
}, [store, metric]);
|
|
@@ -1976,7 +1977,7 @@ function titleText(v) {
|
|
|
1976
1977
|
function summaryText(f, v) {
|
|
1977
1978
|
if (v == null || v === "" || Array.isArray(v) && !v.length) return void 0;
|
|
1978
1979
|
if (f.type === "input-toggle") return v ? f.title || "Yes" : void 0;
|
|
1979
|
-
if (f.type === "input-duration" && typeof v === "number") return
|
|
1980
|
+
if (f.type === "input-duration" && typeof v === "number") return _chunkP4NMZ77Wjs.formatClock.call(void 0, v);
|
|
1980
1981
|
if (f.type === "input-select" && f.options.choices) {
|
|
1981
1982
|
const label = (x) => _nullishCoalesce(_optionalChain([f, 'access', _65 => _65.options, 'access', _66 => _66.choices, 'access', _67 => _67.find, 'call', _68 => _68((c) => c.value === x), 'optionalAccess', _69 => _69.label]), () => ( String(x)));
|
|
1982
1983
|
return Array.isArray(v) ? v.map(label).join(", ") : label(v);
|
|
@@ -2007,7 +2008,7 @@ function InputGroupBody({ panel }) {
|
|
|
2007
2008
|
}
|
|
2008
2009
|
if (!group) return null;
|
|
2009
2010
|
const label = panel.options.itemTitle || "Item";
|
|
2010
|
-
const collapseFilled = (except) => setCollapsed(new Set(group.items.filter((i) => i.key !== except && !
|
|
2011
|
+
const collapseFilled = (except) => setCollapsed(new Set(group.items.filter((i) => i.key !== except && !_chunkP4NMZ77Wjs.isEmptyItem.call(void 0, panel, i.values)).map((i) => i.key)));
|
|
2011
2012
|
const toggle = (key) => setCollapsed((c) => {
|
|
2012
2013
|
const next = new Set(c);
|
|
2013
2014
|
if (!next.delete(key)) next.add(key);
|
|
@@ -2045,7 +2046,7 @@ function InputGroupBody({ panel }) {
|
|
|
2045
2046
|
group.items.map((item, i) => {
|
|
2046
2047
|
const named = panel.options.titleFrom ? titleText(item.values[panel.options.titleFrom]) : void 0;
|
|
2047
2048
|
const title = _nullishCoalesce(named, () => ( `${label} ${i + 1}`));
|
|
2048
|
-
const troubled =
|
|
2049
|
+
const troubled = _chunkP4NMZ77Wjs.groupFields.call(void 0, panel).some((f) => group.fieldProblem(i, f.options.metric));
|
|
2049
2050
|
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
2050
2051
|
ItemCard,
|
|
2051
2052
|
{
|
|
@@ -2096,7 +2097,7 @@ function InputGroupBody({ panel }) {
|
|
|
2096
2097
|
}
|
|
2097
2098
|
function ItemCard({ panel, group, form, index, title, last, collapsed, onToggle, onDuplicate, dragOffset, lifted, onLayout, handle }) {
|
|
2098
2099
|
const theme = useDashTheme();
|
|
2099
|
-
const fields = _react.useMemo.call(void 0, () =>
|
|
2100
|
+
const fields = _react.useMemo.call(void 0, () => _chunkP4NMZ77Wjs.groupFields.call(void 0, panel), [panel]);
|
|
2100
2101
|
const item = group.items[index];
|
|
2101
2102
|
const scoped = _react.useMemo.call(void 0,
|
|
2102
2103
|
() => ({
|
|
@@ -2316,7 +2317,7 @@ function BarGaugePanel({ panel, frames }) {
|
|
|
2316
2317
|
const min = _nullishCoalesce(v.config.min, () => ( 0));
|
|
2317
2318
|
const max = _nullishCoalesce(v.config.max, () => ( Math.max(...values.map((o) => _nullishCoalesce(o.value, () => ( 0))), 1)));
|
|
2318
2319
|
const frac = v.value == null ? 0 : Math.min(1, Math.max(0, (v.value - min) / (max - min || 1)));
|
|
2319
|
-
const color = v.config.thresholds || _optionalChain([v, 'access', _88 => _88.mapped, 'optionalAccess', _89 => _89.color]) ? v.stateColor :
|
|
2320
|
+
const color = v.config.thresholds || _optionalChain([v, 'access', _88 => _88.mapped, 'optionalAccess', _89 => _89.color]) ? v.stateColor : _chunkP4NMZ77Wjs.resolveColor.call(void 0, _optionalChain([v, 'access', _90 => _90.config, 'access', _91 => _91.color, 'optionalAccess', _92 => _92.fixedColor]), v.color);
|
|
2320
2321
|
const hasLinks = !!_optionalChain([v, 'access', _93 => _93.config, 'access', _94 => _94.links, 'optionalAccess', _95 => _95.length]);
|
|
2321
2322
|
return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0,
|
|
2322
2323
|
_reactnative.Pressable,
|
|
@@ -2497,7 +2498,7 @@ function geomapLayers(panel, frames, scheme, retina = false, gazetteers = {}) {
|
|
|
2497
2498
|
const color = _nullishCoalesce(style.color, () => ( {}));
|
|
2498
2499
|
const size = _nullishCoalesce(style.size, () => ( {}));
|
|
2499
2500
|
const text = style.text;
|
|
2500
|
-
const fixedColor =
|
|
2501
|
+
const fixedColor = _chunkP4NMZ77Wjs.resolveColor.call(void 0, _nullishCoalesce(color.fixed, () => ( "dark-green")), "#37872D");
|
|
2501
2502
|
const heat = layer.type === "heatmap";
|
|
2502
2503
|
const weight = _nullishCoalesce(config.weight, () => ( {}));
|
|
2503
2504
|
const legend = [];
|
|
@@ -2509,14 +2510,14 @@ function geomapLayers(panel, frames, scheme, retina = false, gazetteers = {}) {
|
|
|
2509
2510
|
let { xs, ys } = located;
|
|
2510
2511
|
if (layer.type === "lastPointTracker" && rows.length) [rows, xs, ys] = [rows.slice(-1), xs.slice(-1), ys.slice(-1)];
|
|
2511
2512
|
const find = (field) => field ? fieldByName(frame, field, multiple) : void 0;
|
|
2512
|
-
const configOf = (f) =>
|
|
2513
|
+
const configOf = (f) => _chunkP4NMZ77Wjs.resolveFieldConfig.call(void 0, panel, f, frame, _chunkP4NMZ77Wjs.fieldDisplayName.call(void 0, f, frame, multiple));
|
|
2513
2514
|
let colors = rows.map(() => fixedColor);
|
|
2514
2515
|
const colorField = !heat ? find(color.field) : void 0;
|
|
2515
2516
|
if (colorField) {
|
|
2516
2517
|
const cConfig = configOf(colorField);
|
|
2517
2518
|
const values = rows.map((i) => num(colorField.values[i]));
|
|
2518
2519
|
const extent = range(values);
|
|
2519
|
-
colors = values.map((v) =>
|
|
2520
|
+
colors = values.map((v) => _chunkP4NMZ77Wjs.valueColor.call(void 0, v, cConfig, fixedColor, extent));
|
|
2520
2521
|
if (showsLegend(layer) && legend.length === 0) legend.push(...thresholdLegend(`${key}/${frames.indexOf(frame)}`, cConfig, fixedColor));
|
|
2521
2522
|
}
|
|
2522
2523
|
const dim = heat ? weight : size;
|
|
@@ -2574,8 +2575,8 @@ function thresholdLegend(key, config, fallback) {
|
|
|
2574
2575
|
if (steps.length < 2) return [];
|
|
2575
2576
|
return steps.map((s, i) => ({
|
|
2576
2577
|
key: `${key}/${i}`,
|
|
2577
|
-
name: s.value == null ? `< ${
|
|
2578
|
-
color:
|
|
2578
|
+
name: s.value == null ? `< ${_chunkP4NMZ77Wjs.formatValue.call(void 0, steps[i + 1].value, config)}` : `${_chunkP4NMZ77Wjs.formatValue.call(void 0, s.value, config)}+`,
|
|
2579
|
+
color: _chunkP4NMZ77Wjs.resolveColor.call(void 0, s.color, fallback)
|
|
2579
2580
|
}));
|
|
2580
2581
|
}
|
|
2581
2582
|
var isDataLayer = (type) => type === "markers" || type === "heatmap" || type === "route" || type === "lastPointTracker";
|
|
@@ -2585,15 +2586,15 @@ function gazetteerPaths(panel, frames) {
|
|
|
2585
2586
|
for (const layer of _nullishCoalesce(_optionalChain([panel, 'access', _113 => _113.options, 'optionalAccess', _114 => _114.layers]), () => ( DEFAULT_LAYERS))) {
|
|
2586
2587
|
if (!isDataLayer(layer.type)) continue;
|
|
2587
2588
|
const mode = _nullishCoalesce(_optionalChain([layer, 'access', _115 => _115.location, 'optionalAccess', _116 => _116.mode]), () => ( "auto"));
|
|
2588
|
-
if (mode === "lookup") paths.add(_optionalChain([layer, 'access', _117 => _117.location, 'optionalAccess', _118 => _118.gazetteer]) ||
|
|
2589
|
-
else if (mode === "auto" && frames.some(lookupField)) paths.add(
|
|
2589
|
+
if (mode === "lookup") paths.add(_optionalChain([layer, 'access', _117 => _117.location, 'optionalAccess', _118 => _118.gazetteer]) || _chunkP4NMZ77Wjs.DEFAULT_GAZETTEER);
|
|
2590
|
+
else if (mode === "auto" && frames.some(lookupField)) paths.add(_chunkP4NMZ77Wjs.DEFAULT_GAZETTEER);
|
|
2590
2591
|
}
|
|
2591
2592
|
return [...paths];
|
|
2592
2593
|
}
|
|
2593
2594
|
var LAT_NAMES = ["lat", "latitude"];
|
|
2594
2595
|
var LON_NAMES = ["lon", "lng", "long", "longitude"];
|
|
2595
2596
|
function fieldByName(frame, name, multiple) {
|
|
2596
|
-
return _nullishCoalesce(frame.fields.find((f) => f.name === name), () => ( frame.fields.find((f) =>
|
|
2597
|
+
return _nullishCoalesce(frame.fields.find((f) => f.name === name), () => ( frame.fields.find((f) => _chunkP4NMZ77Wjs.fieldDisplayName.call(void 0, f, frame, multiple) === name)));
|
|
2597
2598
|
}
|
|
2598
2599
|
function locate2(frame, location = {}, gazetteers = {}) {
|
|
2599
2600
|
const mode = _nullishCoalesce(location.mode, () => ( "auto"));
|
|
@@ -2612,10 +2613,10 @@ function locate2(frame, location = {}, gazetteers = {}) {
|
|
|
2612
2613
|
lat = named(LAT_NAMES);
|
|
2613
2614
|
lon = named(LON_NAMES);
|
|
2614
2615
|
if (!lat || !lon) hash = named(["geohash"]);
|
|
2615
|
-
if ((!lat || !lon) && !hash) [lookup, gazetteer] = [lookupField(frame), gazetteers[
|
|
2616
|
+
if ((!lat || !lon) && !hash) [lookup, gazetteer] = [lookupField(frame), gazetteers[_chunkP4NMZ77Wjs.DEFAULT_GAZETTEER]];
|
|
2616
2617
|
} else if (mode === "lookup") {
|
|
2617
2618
|
lookup = location.lookup ? fieldByName(frame, location.lookup, false) : lookupField(frame);
|
|
2618
|
-
gazetteer = gazetteers[location.gazetteer ||
|
|
2619
|
+
gazetteer = gazetteers[location.gazetteer || _chunkP4NMZ77Wjs.DEFAULT_GAZETTEER];
|
|
2619
2620
|
}
|
|
2620
2621
|
const rows = [];
|
|
2621
2622
|
const xs = [];
|
|
@@ -2664,8 +2665,8 @@ function decodeGeohash(hash) {
|
|
|
2664
2665
|
}
|
|
2665
2666
|
function cellText(field, v, config) {
|
|
2666
2667
|
if (v == null) return "";
|
|
2667
|
-
if (field.type === "number") return
|
|
2668
|
-
if (field.type === "time") return new Date(
|
|
2668
|
+
if (field.type === "number") return _chunkP4NMZ77Wjs.formatDisplay.call(void 0, Number(v), config);
|
|
2669
|
+
if (field.type === "time") return new Date(_chunkP4NMZ77Wjs.toMillis.call(void 0, v)).toLocaleString();
|
|
2669
2670
|
return String(v);
|
|
2670
2671
|
}
|
|
2671
2672
|
function num(v) {
|
|
@@ -2915,11 +2916,11 @@ function useGazetteers(panel, frames) {
|
|
|
2915
2916
|
let live = true;
|
|
2916
2917
|
let ds;
|
|
2917
2918
|
try {
|
|
2918
|
-
ds = _optionalChain([resolve, 'optionalCall', _128 => _128(
|
|
2919
|
+
ds = _optionalChain([resolve, 'optionalCall', _128 => _128(_chunkP4NMZ77Wjs.normalizeRef.call(void 0, panel.datasource))]);
|
|
2919
2920
|
} catch (e6) {
|
|
2920
2921
|
}
|
|
2921
2922
|
const paths = key.split("\n");
|
|
2922
|
-
Promise.allSettled(paths.map((p) =>
|
|
2923
|
+
Promise.allSettled(paths.map((p) => _chunkP4NMZ77Wjs.loadGazetteer.call(void 0, p, ds))).then((results) => {
|
|
2923
2924
|
if (!live) return;
|
|
2924
2925
|
const gazetteers = {};
|
|
2925
2926
|
const errors = [];
|
|
@@ -3062,8 +3063,8 @@ function cellType(config) {
|
|
|
3062
3063
|
}
|
|
3063
3064
|
function tableColumns(panel, frame, multipleFrames = false) {
|
|
3064
3065
|
return frame.fields.flatMap((field, i) => {
|
|
3065
|
-
const raw =
|
|
3066
|
-
const config =
|
|
3066
|
+
const raw = _chunkP4NMZ77Wjs.fieldDisplayName.call(void 0, field, frame, multipleFrames);
|
|
3067
|
+
const config = _chunkP4NMZ77Wjs.resolveFieldConfig.call(void 0, panel, field, frame, raw);
|
|
3067
3068
|
const custom = _nullishCoalesce(config.custom, () => ( {}));
|
|
3068
3069
|
if (custom.hidden || _optionalChain([custom, 'access', _138 => _138.hideFrom, 'optionalAccess', _139 => _139.viz])) return [];
|
|
3069
3070
|
const numeric = field.type === "number";
|
|
@@ -3106,16 +3107,16 @@ function tableFooter(columns) {
|
|
|
3106
3107
|
counted = true;
|
|
3107
3108
|
return [{ label: "Count", text: String(c.field.values.length) }];
|
|
3108
3109
|
}
|
|
3109
|
-
if (!
|
|
3110
|
-
const label =
|
|
3110
|
+
if (!_chunkP4NMZ77Wjs.isReducer.call(void 0, r)) return [];
|
|
3111
|
+
const label = _chunkP4NMZ77Wjs.REDUCER_LABELS[r];
|
|
3111
3112
|
if (r === "count") return [{ label, text: String(c.field.values.length) }];
|
|
3112
3113
|
if (c.field.type !== "number") {
|
|
3113
3114
|
if (r === "distinctCount") return [{ label, text: String(new Set(c.field.values.filter((v) => v != null)).size) }];
|
|
3114
3115
|
return [];
|
|
3115
3116
|
}
|
|
3116
|
-
const value =
|
|
3117
|
+
const value = _chunkP4NMZ77Wjs.reduce.call(void 0, c.field.values.map((v) => v == null ? null : Number(v)), r);
|
|
3117
3118
|
const counts = r === "distinctCount" || r === "changeCount";
|
|
3118
|
-
return [{ label, text: counts ? String(_nullishCoalesce(value, () => ( 0))) :
|
|
3119
|
+
return [{ label, text: counts ? String(_nullishCoalesce(value, () => ( 0))) : _chunkP4NMZ77Wjs.formatValue.call(void 0, value, c.config) }];
|
|
3119
3120
|
});
|
|
3120
3121
|
return lines.length === 1 && lines[0].label !== "Count" ? [{ text: lines[0].text }] : lines;
|
|
3121
3122
|
});
|
|
@@ -3134,13 +3135,13 @@ function extentOf(values) {
|
|
|
3134
3135
|
}
|
|
3135
3136
|
function cellDisplay(col, raw, fallbackColor) {
|
|
3136
3137
|
const { config, field } = col;
|
|
3137
|
-
const mapped =
|
|
3138
|
+
const mapped = _chunkP4NMZ77Wjs.mappedResult.call(void 0, raw, config);
|
|
3138
3139
|
const num4 = field.type === "number" && raw != null && Number.isFinite(Number(raw)) ? Number(raw) : null;
|
|
3139
|
-
const text = _nullishCoalesce(_optionalChain([mapped, 'optionalAccess', _153 => _153.text]), () => ( (raw == null ? _nullishCoalesce(config.noValue, () => ( "")) : field.type === "number" ?
|
|
3140
|
+
const text = _nullishCoalesce(_optionalChain([mapped, 'optionalAccess', _153 => _153.text]), () => ( (raw == null ? _nullishCoalesce(config.noValue, () => ( "")) : field.type === "number" ? _chunkP4NMZ77Wjs.formatValue.call(void 0, num4, config) : field.type === "time" ? new Date(_chunkP4NMZ77Wjs.toMillis.call(void 0, raw)).toLocaleString() : String(raw))));
|
|
3140
3141
|
if (col.cellType === "auto") return { text };
|
|
3141
3142
|
const mode = _optionalChain([config, 'access', _154 => _154.color, 'optionalAccess', _155 => _155.mode]);
|
|
3142
|
-
const named = _nullishCoalesce(_optionalChain([mapped, 'optionalAccess', _156 => _156.color]), () => ( (mode === "fixed" ? _optionalChain([config, 'access', _157 => _157.color, 'optionalAccess', _158 => _158.fixedColor]) : (!mode || mode === "thresholds") && num4 != null ? _optionalChain([
|
|
3143
|
-
const color = named === "text" ? void 0 : _optionalChain([mapped, 'optionalAccess', _160 => _160.color]) ?
|
|
3143
|
+
const named = _nullishCoalesce(_optionalChain([mapped, 'optionalAccess', _156 => _156.color]), () => ( (mode === "fixed" ? _optionalChain([config, 'access', _157 => _157.color, 'optionalAccess', _158 => _158.fixedColor]) : (!mode || mode === "thresholds") && num4 != null ? _optionalChain([_chunkP4NMZ77Wjs.thresholdStep.call(void 0, num4, config), 'optionalAccess', _159 => _159.color]) : void 0)));
|
|
3144
|
+
const color = named === "text" ? void 0 : _optionalChain([mapped, 'optionalAccess', _160 => _160.color]) ? _chunkP4NMZ77Wjs.resolveColor.call(void 0, mapped.color, fallbackColor) : num4 == null ? void 0 : _chunkP4NMZ77Wjs.valueColor.call(void 0, num4, config, fallbackColor, col.extent);
|
|
3144
3145
|
if (col.cellType === "color-text") return { text, color };
|
|
3145
3146
|
if (col.cellType === "color-background") return { text, background: color };
|
|
3146
3147
|
const min = _nullishCoalesce(config.min, () => ( Math.min(0, _nullishCoalesce(_optionalChain([col, 'access', _161 => _161.extent, 'optionalAccess', _162 => _162[0]]), () => ( 0)))));
|
|
@@ -3171,7 +3172,7 @@ function sortedRows(columns, length, sort) {
|
|
|
3171
3172
|
if (!col) return rows;
|
|
3172
3173
|
const { field } = col;
|
|
3173
3174
|
const dir = sort.desc ? -1 : 1;
|
|
3174
|
-
const key = (v) => field.type === "time" ?
|
|
3175
|
+
const key = (v) => field.type === "time" ? _chunkP4NMZ77Wjs.toMillis.call(void 0, v) : field.type === "number" || field.type === "boolean" ? Number(v) : v;
|
|
3175
3176
|
const empty = (v) => v == null || v === "" || typeof v === "number" && Number.isNaN(v);
|
|
3176
3177
|
return rows.sort((a, b) => {
|
|
3177
3178
|
const va = field.values[a];
|
|
@@ -3237,8 +3238,8 @@ function TablePanel({ panel, frames }) {
|
|
|
3237
3238
|
const columns = _react.useMemo.call(void 0, () => frame ? tableColumns(panel, frame, frames.length > 1) : [], [panel, frame, frames.length]);
|
|
3238
3239
|
const [tapped, setSort] = _react.useState.call(void 0, );
|
|
3239
3240
|
const sort = tapped === void 0 ? initialSort(panel, columns) : tapped;
|
|
3240
|
-
const order = _react.useMemo.call(void 0, () => sortedRows(columns, frame ?
|
|
3241
|
-
if (!frame || !
|
|
3241
|
+
const order = _react.useMemo.call(void 0, () => sortedRows(columns, frame ? _chunkP4NMZ77Wjs.frameLength.call(void 0, frame) : 0, sort), [columns, frame, sort]);
|
|
3242
|
+
if (!frame || !_chunkP4NMZ77Wjs.frameLength.call(void 0, frame)) return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, NoData, {});
|
|
3242
3243
|
const shown = order.slice(0, 500);
|
|
3243
3244
|
const rowColumn = columns.find((c) => c.applyToRow);
|
|
3244
3245
|
const footer = tableFooter(columns);
|
|
@@ -3338,7 +3339,7 @@ function BarChartPanel({ panel, frames, width }) {
|
|
|
3338
3339
|
{
|
|
3339
3340
|
style: [styles12.tick, { color: theme.textMuted, top: plot.height * (1 - barFraction(axis, t)) - 7 }, axis.side === "left" ? styles12.tickLeft : styles12.tickRight],
|
|
3340
3341
|
numberOfLines: 1,
|
|
3341
|
-
children:
|
|
3342
|
+
children: _chunkP4NMZ77Wjs.formatValue.call(void 0, t, { ...axis.config, decimals: tickDecimals(axis.ticks) })
|
|
3342
3343
|
},
|
|
3343
3344
|
t
|
|
3344
3345
|
)) });
|
|
@@ -3464,7 +3465,7 @@ function TimeSeriesPanel({ panel, frames }) {
|
|
|
3464
3465
|
const y = linearScale(yMin, yMax, PAD.top + plotH, PAD.top);
|
|
3465
3466
|
const span = xTo - xFrom;
|
|
3466
3467
|
const xTicks = numericX ? numberTicks(xFrom, xTo, plotW) : timeTicks(xFrom, xTo, plotW);
|
|
3467
|
-
const xLabel = (t) => numericX ?
|
|
3468
|
+
const xLabel = (t) => numericX ? _chunkP4NMZ77Wjs.formatValue.call(void 0, t, { ...xConfig, decimals: tickDecimals(xTicks) }) : formatTimeTick(t, span);
|
|
3468
3469
|
const unitConfig = series[0].config;
|
|
3469
3470
|
const barSeries = series.filter((s) => style(s) === "bars");
|
|
3470
3471
|
const pointsCount = Math.max(...series.map((s) => s.times.length));
|
|
@@ -3482,11 +3483,11 @@ function TimeSeriesPanel({ panel, frames }) {
|
|
|
3482
3483
|
if (!pinch.current) pinch.current = { start: { from: xFrom, to: xTo }, dist, frac };
|
|
3483
3484
|
const p = pinch.current;
|
|
3484
3485
|
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) };
|
|
3485
|
-
setPreview(
|
|
3486
|
+
setPreview(_chunkP4NMZ77Wjs.zoomRange.call(void 0, p.start, dist / p.dist, p.frac, frac, limits));
|
|
3486
3487
|
};
|
|
3487
3488
|
const onPinchEnd = (commit) => {
|
|
3488
3489
|
if (commit && pinch.current && preview) {
|
|
3489
|
-
if (!extent) setRawRange({ from:
|
|
3490
|
+
if (!extent) setRawRange({ from: _chunkP4NMZ77Wjs.formatLocalDateTime.call(void 0, preview.from), to: _chunkP4NMZ77Wjs.formatLocalDateTime.call(void 0, preview.to) });
|
|
3490
3491
|
else setXZoom(preview.to - preview.from >= extent[1] - extent[0] ? null : preview);
|
|
3491
3492
|
}
|
|
3492
3493
|
pinch.current = null;
|
|
@@ -3541,7 +3542,7 @@ function TimeSeriesPanel({ panel, frames }) {
|
|
|
3541
3542
|
size.width > 0 && /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _reactnativesvg2.default, { width: size.width, height: size.height, children: [
|
|
3542
3543
|
ticks.map((t) => /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _reactnativesvg.G, { children: [
|
|
3543
3544
|
/* @__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 }),
|
|
3544
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _reactnativesvg.Text, { x: PAD.left - 6, y: y(t) + 3, fontSize: 10, fill: theme.textMuted, textAnchor: "end", children:
|
|
3545
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _reactnativesvg.Text, { x: PAD.left - 6, y: y(t) + 3, fontSize: 10, fill: theme.textMuted, textAnchor: "end", children: _chunkP4NMZ77Wjs.formatValue.call(void 0, t, { ...unitConfig, decimals: tickDecimals(ticks) }) })
|
|
3545
3546
|
] }, t)),
|
|
3546
3547
|
xTicks.map((t) => /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
3547
3548
|
_reactnativesvg.Text,
|
|
@@ -3607,11 +3608,11 @@ function TimeSeriesPanel({ panel, frames }) {
|
|
|
3607
3608
|
x(hover.time) > size.width / 2 ? { right: size.width - x(hover.time) + 8 } : { left: x(hover.time) + 8 }
|
|
3608
3609
|
],
|
|
3609
3610
|
children: [
|
|
3610
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _reactnative.Text, { style: [styles13.tooltipTime, { color: theme.textMuted }], children: numericX ?
|
|
3611
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _reactnative.Text, { style: [styles13.tooltipTime, { color: theme.textMuted }], children: numericX ? _chunkP4NMZ77Wjs.formatValue.call(void 0, hover.time, xConfig) : formatTooltipTime(hover.time) }),
|
|
3611
3612
|
hover.rows.map((r) => /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _reactnative.View, { style: styles13.tooltipRow, children: [
|
|
3612
3613
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _reactnative.View, { style: [styles13.swatch, { backgroundColor: r.color }] }),
|
|
3613
3614
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _reactnative.Text, { style: [styles13.tooltipName, { color: theme.textSecondary }], numberOfLines: 1, children: r.name }),
|
|
3614
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _reactnative.Text, { style: [styles13.tooltipValue, { color: theme.text }], children:
|
|
3615
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _reactnative.Text, { style: [styles13.tooltipValue, { color: theme.text }], children: _chunkP4NMZ77Wjs.formatValue.call(void 0, r.value, r.config) })
|
|
3615
3616
|
] }, r.key)),
|
|
3616
3617
|
isPinned && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, TooltipLinks, { links: hoverLinks, onOpen: (l) => openLinks([l]) })
|
|
3617
3618
|
]
|
|
@@ -3696,7 +3697,7 @@ function linkData(r, frames, xField) {
|
|
|
3696
3697
|
if (frame && xField === void 0) {
|
|
3697
3698
|
row = r.index;
|
|
3698
3699
|
} else if (frame) {
|
|
3699
|
-
const xf = _nullishCoalesce(frame.fields.find((f) => f.name === xField), () => (
|
|
3700
|
+
const xf = _nullishCoalesce(frame.fields.find((f) => f.name === xField), () => ( _chunkP4NMZ77Wjs.numberFields.call(void 0, frame)[0]));
|
|
3700
3701
|
const at = _optionalChain([xf, 'optionalAccess', _222 => _222.values, 'access', _223 => _223.findIndex, 'call', _224 => _224((v, k) => Number(v) === r.time && Number(r.series.field.values[k]) === r.value)]);
|
|
3701
3702
|
row = at != null && at >= 0 ? at : void 0;
|
|
3702
3703
|
}
|
|
@@ -3707,7 +3708,7 @@ function linkData(r, frames, xField) {
|
|
|
3707
3708
|
fieldName: r.name,
|
|
3708
3709
|
seriesName: r.name,
|
|
3709
3710
|
value: r.value,
|
|
3710
|
-
text:
|
|
3711
|
+
text: _chunkP4NMZ77Wjs.formatValue.call(void 0, r.value, r.config),
|
|
3711
3712
|
time: xField === void 0 ? r.time : void 0
|
|
3712
3713
|
};
|
|
3713
3714
|
}
|
|
@@ -3768,8 +3769,8 @@ function xySeries(panel, frames, scheme) {
|
|
|
3768
3769
|
const { manual, series: maps, exclude } = mappings(panel);
|
|
3769
3770
|
const multiple = frames.length > 1;
|
|
3770
3771
|
const out = [];
|
|
3771
|
-
const config = (field, frame) =>
|
|
3772
|
-
const find = (pick, frame, fields = frame.fields) => pick ? fields.filter((f) =>
|
|
3772
|
+
const config = (field, frame) => _chunkP4NMZ77Wjs.resolveFieldConfig.call(void 0, panel, field, frame, _chunkP4NMZ77Wjs.fieldDisplayName.call(void 0, field, frame, multiple));
|
|
3773
|
+
const find = (pick, frame, fields = frame.fields) => pick ? fields.filter((f) => _chunkP4NMZ77Wjs.fieldMatches.call(void 0, pick.matcher, f, frame, _chunkP4NMZ77Wjs.fieldDisplayName.call(void 0, f, frame, multiple))) : [];
|
|
3773
3774
|
for (const [mi, m] of (maps.length ? maps : [{}]).entries()) {
|
|
3774
3775
|
const matcher = _optionalChain([m, 'access', _235 => _235.frame, 'optionalAccess', _236 => _236.matcher]);
|
|
3775
3776
|
const chosen = _optionalChain([matcher, 'optionalAccess', _237 => _237.id]) === "byIndex" ? frames.filter((_, i) => i === matcher.options) : frames;
|
|
@@ -3785,16 +3786,16 @@ function xySeries(panel, frames, scheme) {
|
|
|
3785
3786
|
const yConfig = config(yField, frame);
|
|
3786
3787
|
if (_optionalChain([yConfig, 'access', _238 => _238.custom, 'optionalAccess', _239 => _239.hideFrom, 'optionalAccess', _240 => _240.viz]) && !manual) continue;
|
|
3787
3788
|
const xConfig = config(xField, frame);
|
|
3788
|
-
const color =
|
|
3789
|
-
const base = _optionalChain([yConfig, 'access', _241 => _241.color, 'optionalAccess', _242 => _242.mode]) === "thresholds" ?
|
|
3789
|
+
const color = _chunkP4NMZ77Wjs.seriesColor.call(void 0, out.length, scheme, yConfig);
|
|
3790
|
+
const base = _optionalChain([yConfig, 'access', _241 => _241.color, 'optionalAccess', _242 => _242.mode]) === "thresholds" ? _chunkP4NMZ77Wjs.valueColor.call(void 0, null, yConfig, color) : color;
|
|
3790
3791
|
const rows = [];
|
|
3791
3792
|
const xs = [];
|
|
3792
3793
|
const ys = [];
|
|
3793
3794
|
yField.values.forEach((yv, i) => {
|
|
3794
3795
|
const xv = xField.values[i];
|
|
3795
3796
|
if (xv == null || yv == null) return;
|
|
3796
|
-
const xn = xField.type === "time" ?
|
|
3797
|
-
const yn = yField.type === "time" ?
|
|
3797
|
+
const xn = xField.type === "time" ? _chunkP4NMZ77Wjs.toMillis.call(void 0, xv) : Number(xv);
|
|
3798
|
+
const yn = yField.type === "time" ? _chunkP4NMZ77Wjs.toMillis.call(void 0, yv) : Number(yv);
|
|
3798
3799
|
if (!Number.isFinite(xn) || !Number.isFinite(yn)) return;
|
|
3799
3800
|
rows.push(i);
|
|
3800
3801
|
xs.push(xn);
|
|
@@ -3807,7 +3808,7 @@ function xySeries(panel, frames, scheme) {
|
|
|
3807
3808
|
const cConfig = config(colorField, frame);
|
|
3808
3809
|
const values = rows.map((i) => num3(colorField.values[i]));
|
|
3809
3810
|
const extent = range2(values);
|
|
3810
|
-
colors = values.map((v) =>
|
|
3811
|
+
colors = values.map((v) => _chunkP4NMZ77Wjs.valueColor.call(void 0, v, cConfig, base, extent));
|
|
3811
3812
|
}
|
|
3812
3813
|
let sizes = rows.map(() => fixedSize);
|
|
3813
3814
|
if (sizeField) {
|
|
@@ -3817,7 +3818,7 @@ function xySeries(panel, frames, scheme) {
|
|
|
3817
3818
|
sizes = values.map((v) => v == null ? min : min + (v - lo) / (hi - lo || 1) * (max - min));
|
|
3818
3819
|
}
|
|
3819
3820
|
const fixedName = _optionalChain([m, 'access', _254 => _254.name, 'optionalAccess', _255 => _255.fixed]);
|
|
3820
|
-
const yName = _nullishCoalesce(yConfig.displayName, () => (
|
|
3821
|
+
const yName = _nullishCoalesce(yConfig.displayName, () => ( _chunkP4NMZ77Wjs.fieldDisplayName.call(void 0, yField, frame, multiple)));
|
|
3821
3822
|
out.push({
|
|
3822
3823
|
key: `${mi}/${frames.indexOf(frame)}/${yField.name}`,
|
|
3823
3824
|
name: fixedName ? yFields.length > 1 ? `${fixedName} ${yName}` : fixedName : yName,
|
|
@@ -3940,7 +3941,7 @@ function XYChartPanel({ panel, frames }) {
|
|
|
3940
3941
|
size.width > 0 && /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _reactnativesvg2.default, { width: size.width, height: size.height, children: [
|
|
3941
3942
|
yTicks.map((t) => /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _reactnativesvg.G, { children: [
|
|
3942
3943
|
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 }),
|
|
3943
|
-
/* @__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:
|
|
3944
|
+
/* @__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: _chunkP4NMZ77Wjs.formatValue.call(void 0, t, { ...first.yConfig, decimals: _nullishCoalesce(first.yConfig.decimals, () => ( tickDecimals(yTicks))) }) })
|
|
3944
3945
|
] }, `y${t}`)),
|
|
3945
3946
|
xTicks.map((t) => /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _reactnativesvg.G, { children: [
|
|
3946
3947
|
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 }),
|
|
@@ -3952,7 +3953,7 @@ function XYChartPanel({ panel, frames }) {
|
|
|
3952
3953
|
fontSize: 10,
|
|
3953
3954
|
fill: theme.textMuted,
|
|
3954
3955
|
textAnchor: layout.x(t) - pad.left < 20 ? "start" : pad.left + plotW - layout.x(t) < 20 ? "end" : "middle",
|
|
3955
|
-
children:
|
|
3956
|
+
children: _chunkP4NMZ77Wjs.formatValue.call(void 0, t, { ...first.xConfig, decimals: _nullishCoalesce(first.xConfig.decimals, () => ( tickDecimals(xTicks))) })
|
|
3956
3957
|
}
|
|
3957
3958
|
)
|
|
3958
3959
|
] }, `x${t}`)),
|
|
@@ -4065,14 +4066,14 @@ function DashboardView({ mode = "auto", header, footer, refreshable }) {
|
|
|
4065
4066
|
const width = (measured.width || window.width) - insets.left - insets.right;
|
|
4066
4067
|
const layoutMode = mode === "auto" ? width >= TABLET_WIDTH ? "grid" : "phone" : mode;
|
|
4067
4068
|
const sections = _react.useMemo.call(void 0,
|
|
4068
|
-
() =>
|
|
4069
|
+
() => _chunkP4NMZ77Wjs.layoutDashboard.call(void 0, dashboard, layoutMode, { values: variables, info: variableInfo2 }),
|
|
4069
4070
|
[dashboard, layoutMode, variables, variableInfo2]
|
|
4070
4071
|
);
|
|
4071
4072
|
const [toggled, setToggled] = _react.useState.call(void 0, {});
|
|
4072
4073
|
const { seen, viewportH, onScroll, onViewportLayout, onSectionLayout } = useSeenSections(window.height);
|
|
4073
4074
|
const maxPanelH = Math.max(MIN_PANEL_H, viewportH - SIDE * 2);
|
|
4074
4075
|
const contentW = width - SIDE * 2;
|
|
4075
|
-
const canRefresh = _nullishCoalesce(refreshable, () => ( dashboard.panels.some((p) =>
|
|
4076
|
+
const canRefresh = _nullishCoalesce(refreshable, () => ( dashboard.panels.some((p) => _chunkP4NMZ77Wjs.panelHasQueries.call(void 0, p) || _optionalChain([p, 'access', _278 => _278.panels, 'optionalAccess', _279 => _279.some, 'call', _280 => _280(_chunkP4NMZ77Wjs.panelHasQueries)]))));
|
|
4076
4077
|
return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _reactnative.View, { style: [styles15.fill, { backgroundColor: theme.background }], onLayout, children: [
|
|
4077
4078
|
width > 0 && /* @__PURE__ */ _jsxruntime.jsxs.call(void 0,
|
|
4078
4079
|
_reactnative.ScrollView,
|
|
@@ -4098,14 +4099,14 @@ function DashboardView({ mode = "auto", header, footer, refreshable }) {
|
|
|
4098
4099
|
accessibilityState: { expanded: !collapsed },
|
|
4099
4100
|
children: [
|
|
4100
4101
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _reactnative.Text, { style: [styles15.chevron, { color: theme.textMuted }], children: collapsed ? "\u25B8" : "\u25BE" }),
|
|
4101
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _reactnative.Text, { style: [styles15.rowTitle, { color: theme.text }], numberOfLines: 2, children:
|
|
4102
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _reactnative.Text, { style: [styles15.rowTitle, { color: theme.text }], numberOfLines: 2, children: _chunkP4NMZ77Wjs.interpolate.call(void 0, _nullishCoalesce(section.row.title, () => ( "")), { values: variables, info: variableInfo2, scoped: section.row.scopedVars, timezone: dashboard.timezone }) })
|
|
4102
4103
|
]
|
|
4103
4104
|
}
|
|
4104
4105
|
),
|
|
4105
4106
|
!collapsed && layoutMode === "grid" && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, GridSection, { grid: section.grid, width: contentW, maxPanelH, deferred: !seen.has(section.key) }),
|
|
4106
4107
|
!collapsed && layoutMode === "phone" && section.rows.map((row, ri) => /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _reactnative.View, { style: styles15.row, children: row.cells.map((cell) => {
|
|
4107
|
-
const w = (contentW + GAP2) * (cell.span /
|
|
4108
|
-
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, PanelCard, { panel: cell.panel, width: w, height: Math.min(
|
|
4108
|
+
const w = (contentW + GAP2) * (cell.span / _chunkP4NMZ77Wjs.GRID_COLUMNS) - GAP2;
|
|
4109
|
+
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, PanelCard, { panel: cell.panel, width: w, height: Math.min(_chunkP4NMZ77Wjs.gridUnitsToPx.call(void 0, row.h), maxPanelH), deferred: !seen.has(section.key) }, cell.key);
|
|
4109
4110
|
}) }, ri))
|
|
4110
4111
|
] }, section.key);
|
|
4111
4112
|
})
|
|
@@ -4116,10 +4117,10 @@ function DashboardView({ mode = "auto", header, footer, refreshable }) {
|
|
|
4116
4117
|
] });
|
|
4117
4118
|
}
|
|
4118
4119
|
function GridSection({ grid, width, maxPanelH, deferred }) {
|
|
4119
|
-
const colW = (width + GAP2) /
|
|
4120
|
-
const tallest = Math.max(0, ...grid.cells.map((c) =>
|
|
4120
|
+
const colW = (width + GAP2) / _chunkP4NMZ77Wjs.GRID_COLUMNS;
|
|
4121
|
+
const tallest = Math.max(0, ...grid.cells.map((c) => _chunkP4NMZ77Wjs.gridUnitsToPx.call(void 0, c.h)));
|
|
4121
4122
|
const scale = tallest > maxPanelH ? maxPanelH / tallest : 1;
|
|
4122
|
-
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _reactnative.View, { style: { height:
|
|
4123
|
+
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _reactnative.View, { style: { height: _chunkP4NMZ77Wjs.gridUnitsToPx.call(void 0, grid.h) * scale }, children: grid.cells.map((cell) => /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _reactnative.View, { style: [styles15.gridCell, { left: cell.x * colW, top: _chunkP4NMZ77Wjs.gridOffsetPx.call(void 0, cell.y) * scale }], children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, PanelCard, { panel: cell.panel, width: cell.w * colW - GAP2, height: _chunkP4NMZ77Wjs.gridUnitsToPx.call(void 0, cell.h) * scale, deferred }) }, cell.key)) });
|
|
4123
4124
|
}
|
|
4124
4125
|
function useSeenSections(viewportHeight) {
|
|
4125
4126
|
const [seen, setSeen] = _react.useState.call(void 0, /* @__PURE__ */ new Set());
|
|
@@ -4178,14 +4179,14 @@ function PanelCardContent({ panel, width, height, deferred }) {
|
|
|
4178
4179
|
const theme = useDashTheme();
|
|
4179
4180
|
const { dashboard, variables, variableInfo: variableInfo2 } = useDashboard();
|
|
4180
4181
|
const { resolve, openLinks } = usePanelLinks(panel);
|
|
4181
|
-
const group =
|
|
4182
|
-
const input =
|
|
4182
|
+
const group = _chunkP4NMZ77Wjs.isInputGroup.call(void 0, panel);
|
|
4183
|
+
const input = _chunkP4NMZ77Wjs.isInputPanel.call(void 0, panel) || group;
|
|
4183
4184
|
const form = _react.useContext.call(void 0, InputFormContext);
|
|
4184
|
-
const problem = group ? _optionalChain([form, 'optionalAccess', _281 => _281.group, 'optionalCall', _282 => _282(panel), 'optionalAccess', _283 => _283.problem]) :
|
|
4185
|
+
const problem = group ? _optionalChain([form, 'optionalAccess', _281 => _281.group, 'optionalCall', _282 => _282(panel), 'optionalAccess', _283 => _283.problem]) : _chunkP4NMZ77Wjs.isInputPanel.call(void 0, panel) ? _optionalChain([form, 'optionalAccess', _284 => _284.problem, 'optionalCall', _285 => _285(panel.options.metric)]) : void 0;
|
|
4185
4186
|
const hasLinks = !!_optionalChain([panel, 'access', _286 => _286.links, 'optionalAccess', _287 => _287.length]);
|
|
4186
|
-
const filled = !group &&
|
|
4187
|
+
const filled = !group && _chunkP4NMZ77Wjs.isInputPanel.call(void 0, panel) && !!_optionalChain([form, 'optionalAccess', _288 => _288.filled, 'optionalCall', _289 => _289(panel.options.metric)]);
|
|
4187
4188
|
const hasTitle = !!panel.title || hasLinks || !!problem || filled;
|
|
4188
|
-
const title = panel.title ?
|
|
4189
|
+
const title = panel.title ? _chunkP4NMZ77Wjs.interpolate.call(void 0, panel.title, { values: variables, info: variableInfo2, scoped: panel.scopedVars, timezone: dashboard.timezone }) : "";
|
|
4189
4190
|
return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _reactnative.View, { style: [styles15.card, { width, height, backgroundColor: theme.surface, borderColor: filled ? theme.accent : theme.border }, filled && { borderWidth: 2 }], children: [
|
|
4190
4191
|
hasTitle && /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _reactnative.View, { style: styles15.titleRow, children: [
|
|
4191
4192
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _reactnative.Text, { style: [styles15.title, { color: theme.text }], numberOfLines: 1, children: title }),
|
|
@@ -4208,7 +4209,7 @@ function PanelCardContent({ panel, width, height, deferred }) {
|
|
|
4208
4209
|
}
|
|
4209
4210
|
function DataPanelBody({ panel, width, height }) {
|
|
4210
4211
|
const theme = useDashTheme();
|
|
4211
|
-
const needsData =
|
|
4212
|
+
const needsData = _chunkP4NMZ77Wjs.panelHasQueries.call(void 0, panel);
|
|
4212
4213
|
const data = usePanelData(panel, width, needsData);
|
|
4213
4214
|
const Component2 = panelComponent(panel.type);
|
|
4214
4215
|
if (needsData && data.error) {
|
|
@@ -4361,7 +4362,7 @@ function useVoiceFill({ speech, lang, filler, form, onFilled, onError }) {
|
|
|
4361
4362
|
try {
|
|
4362
4363
|
mine = speech.start({
|
|
4363
4364
|
lang,
|
|
4364
|
-
hints:
|
|
4365
|
+
hints: _chunkP4NMZ77Wjs.fillHints.call(void 0, form),
|
|
4365
4366
|
continuous: true,
|
|
4366
4367
|
onText(text, final) {
|
|
4367
4368
|
if (!final) return setHeard(text || null);
|
|
@@ -4393,19 +4394,19 @@ function savedValues(panels, entries) {
|
|
|
4393
4394
|
const values = {};
|
|
4394
4395
|
for (const p of panels) {
|
|
4395
4396
|
const mine = entries.filter((e) => e.metric === p.options.metric);
|
|
4396
|
-
values[p.options.metric] = p.options.multi ? mine.length ? mine.map((e) => _nullishCoalesce(e.text, () => ( e.value))) : null :
|
|
4397
|
+
values[p.options.metric] = p.options.multi ? mine.length ? mine.map((e) => _nullishCoalesce(e.text, () => ( e.value))) : null : _chunkP4NMZ77Wjs.entryToInputValue.call(void 0, p, mine[0]);
|
|
4397
4398
|
}
|
|
4398
4399
|
return values;
|
|
4399
4400
|
}
|
|
4400
4401
|
async function lastItems(store, group) {
|
|
4401
|
-
const metrics =
|
|
4402
|
+
const metrics = _chunkP4NMZ77Wjs.groupFields.call(void 0, group).map((f) => f.options.metric);
|
|
4402
4403
|
const latest = (await Promise.all(metrics.map((m) => store.latest(m)))).filter((e) => !!e).sort((a, b) => b.ts - a.ts)[0];
|
|
4403
4404
|
if (!latest) return [];
|
|
4404
|
-
return
|
|
4405
|
+
return _chunkP4NMZ77Wjs.entriesToItems.call(void 0, group, _chunkP4NMZ77Wjs.sameSave.call(void 0, latest, await store.list({ metrics, from: latest.ts, to: latest.ts })));
|
|
4405
4406
|
}
|
|
4406
4407
|
function freshItem(group, position, last) {
|
|
4407
4408
|
const item = {};
|
|
4408
|
-
for (const f of
|
|
4409
|
+
for (const f of _chunkP4NMZ77Wjs.groupFields.call(void 0, group)) {
|
|
4409
4410
|
const d = f.options.default;
|
|
4410
4411
|
const v = d === "last" ? _optionalChain([last, 'optionalAccess', _293 => _293[position], 'optionalAccess', _294 => _294[f.options.metric]]) : d;
|
|
4411
4412
|
if (v !== void 0 && v !== null) item[f.options.metric] = v;
|
|
@@ -4414,15 +4415,15 @@ function freshItem(group, position, last) {
|
|
|
4414
4415
|
}
|
|
4415
4416
|
function baseItems(group, editing, last) {
|
|
4416
4417
|
const start = group.options.start;
|
|
4417
|
-
const values = editing ?
|
|
4418
|
+
const values = editing ? _chunkP4NMZ77Wjs.entriesToItems.call(void 0, group, editing) : start === "last" && _optionalChain([last, 'optionalAccess', _295 => _295.length]) ? last : Array.from({ length: typeof start === "number" ? Math.max(0, start) : 1 }, (_, i) => freshItem(group, i, last));
|
|
4418
4419
|
return values.map((v, i) => ({ key: `b${i}`, values: v, edited: [] }));
|
|
4419
4420
|
}
|
|
4420
4421
|
var nextItemKey = 1;
|
|
4421
|
-
function InputForm({ dashboard, store, onSaved, choices = NO_CHOICES, header, timestamp, defaults: given = NO_DEFAULTS, beforeSave, editing, speech: givenSpeech, speechLang, filler =
|
|
4422
|
+
function InputForm({ dashboard, store, onSaved, choices = NO_CHOICES, header, timestamp, defaults: given = NO_DEFAULTS, beforeSave, editing, speech: givenSpeech, speechLang, filler = _chunkP4NMZ77Wjs.ruleFiller }) {
|
|
4422
4423
|
const speech = givenSpeech === void 0 ? defaultSpeech() : givenSpeech;
|
|
4423
4424
|
const theme = useDashTheme();
|
|
4424
|
-
const panels = _react.useMemo.call(void 0, () =>
|
|
4425
|
-
const groups = _react.useMemo.call(void 0, () =>
|
|
4425
|
+
const panels = _react.useMemo.call(void 0, () => _chunkP4NMZ77Wjs.plainInputPanels.call(void 0, dashboard), [dashboard]);
|
|
4426
|
+
const groups = _react.useMemo.call(void 0, () => _chunkP4NMZ77Wjs.inputGroups.call(void 0, dashboard), [dashboard]);
|
|
4426
4427
|
const saved = _react.useMemo.call(void 0, () => editing ? savedValues(panels, editing) : NO_DEFAULTS, [panels, editing]);
|
|
4427
4428
|
const [defaults, setDefaults] = _react.useState.call(void 0, {});
|
|
4428
4429
|
const [edits, setEdits] = _react.useState.call(void 0, {});
|
|
@@ -4433,7 +4434,7 @@ function InputForm({ dashboard, store, onSaved, choices = NO_CHOICES, header, ti
|
|
|
4433
4434
|
const [checked, setChecked] = _react.useState.call(void 0, false);
|
|
4434
4435
|
const [filled, setFilled] = _react.useState.call(void 0, {});
|
|
4435
4436
|
const [beforeFill, setBeforeFill] = _react.useState.call(void 0, null);
|
|
4436
|
-
const fillable = _react.useMemo.call(void 0, () =>
|
|
4437
|
+
const fillable = _react.useMemo.call(void 0, () => _chunkP4NMZ77Wjs.fillForm.call(void 0, dashboard, choices), [dashboard, choices]);
|
|
4437
4438
|
_react.useEffect.call(void 0, () => {
|
|
4438
4439
|
let run = 0;
|
|
4439
4440
|
const load = async () => {
|
|
@@ -4441,12 +4442,12 @@ function InputForm({ dashboard, store, onSaved, choices = NO_CHOICES, header, ti
|
|
|
4441
4442
|
const next = {};
|
|
4442
4443
|
for (const p of panels) {
|
|
4443
4444
|
const d = p.options.default;
|
|
4444
|
-
if (d === "last") next[p.options.metric] =
|
|
4445
|
+
if (d === "last") next[p.options.metric] = _chunkP4NMZ77Wjs.entryToInputValue.call(void 0, p, await store.latest(p.options.metric));
|
|
4445
4446
|
else if (d !== void 0) next[p.options.metric] = d;
|
|
4446
4447
|
}
|
|
4447
4448
|
const lastNext = {};
|
|
4448
4449
|
for (const g of groups) {
|
|
4449
|
-
const wanted = g.options.start === "last" ||
|
|
4450
|
+
const wanted = g.options.start === "last" || _chunkP4NMZ77Wjs.groupFields.call(void 0, g).some((f) => f.options.default === "last");
|
|
4450
4451
|
if (wanted) lastNext[groupKey(g)] = await lastItems(store, g);
|
|
4451
4452
|
}
|
|
4452
4453
|
if (mine === run) {
|
|
@@ -4485,7 +4486,7 @@ function InputForm({ dashboard, store, onSaved, choices = NO_CHOICES, header, ti
|
|
|
4485
4486
|
speechLang,
|
|
4486
4487
|
problem: (m) => {
|
|
4487
4488
|
const p = panels.find((x) => x.options.metric === m);
|
|
4488
|
-
return p && (checked || m in edits) ?
|
|
4489
|
+
return p && (checked || m in edits) ? _chunkP4NMZ77Wjs.inputProblem.call(void 0, p, value(m)) : void 0;
|
|
4489
4490
|
},
|
|
4490
4491
|
group: (g) => groupState(g, itemsOf(g), last[groupKey(g)], groupKey(g) in groupEdits, checked, (update) => {
|
|
4491
4492
|
setStatus(null);
|
|
@@ -4518,25 +4519,25 @@ function InputForm({ dashboard, store, onSaved, choices = NO_CHOICES, header, ti
|
|
|
4518
4519
|
const voice = useVoiceFill({ speech, lang: speechLang, filler, form: fillable, onFilled, onError: setStatus });
|
|
4519
4520
|
const dirty = Object.keys(edits).length + groups.reduce((n, g) => n + groupChanges(_nullishCoalesce(base[groupKey(g)], () => ( [])), groupEdits[groupKey(g)]), 0);
|
|
4520
4521
|
const recordedGroups = _react.useCallback.call(void 0,
|
|
4521
|
-
() => groups.filter((g) => editing || groupKey(g) in groupEdits ||
|
|
4522
|
+
() => groups.filter((g) => editing || groupKey(g) in groupEdits || _chunkP4NMZ77Wjs.groupFields.call(void 0, g).some((f) => f.options.record === "always")),
|
|
4522
4523
|
[groups, editing, groupEdits]
|
|
4523
4524
|
);
|
|
4524
4525
|
const save = _react.useCallback.call(void 0, async () => {
|
|
4525
4526
|
const problems = panels.flatMap((p) => {
|
|
4526
|
-
const problem =
|
|
4527
|
+
const problem = _chunkP4NMZ77Wjs.inputProblem.call(void 0, p, state.value(p.options.metric));
|
|
4527
4528
|
return problem ? [`${p.title || p.options.metric}: ${problem.toLowerCase()}`] : [];
|
|
4528
4529
|
});
|
|
4529
|
-
for (const g of recordedGroups()) problems.push(...
|
|
4530
|
+
for (const g of recordedGroups()) problems.push(..._chunkP4NMZ77Wjs.groupProblems.call(void 0, g, itemsOf(g).map((i) => i.values)));
|
|
4530
4531
|
if (problems.length) {
|
|
4531
4532
|
setChecked(true);
|
|
4532
4533
|
setStatus(problems.length === 1 ? `Can\u2019t save. ${problems[0]}` : `Can\u2019t save: ${problems.length} fields need fixing`);
|
|
4533
4534
|
return;
|
|
4534
4535
|
}
|
|
4535
4536
|
const ts = _nullishCoalesce(_optionalChain([editing, 'optionalAccess', _300 => _300[0], 'optionalAccess', _301 => _301.ts]), () => ( (header !== void 0 ? _nullishCoalesce(_optionalChain([timestamp, 'optionalCall', _302 => _302()]), () => ( Date.now())) : Date.now() + offsetMs)));
|
|
4536
|
-
const saveId = _nullishCoalesce(_optionalChain([editing, 'optionalAccess', _303 => _303.find, 'call', _304 => _304((e) => e.save), 'optionalAccess', _305 => _305.save]), () => (
|
|
4537
|
+
const saveId = _nullishCoalesce(_optionalChain([editing, 'optionalAccess', _303 => _303.find, 'call', _304 => _304((e) => e.save), 'optionalAccess', _305 => _305.save]), () => ( _chunkP4NMZ77Wjs.newSaveId.call(void 0, )));
|
|
4537
4538
|
const entries = [
|
|
4538
|
-
...panels.filter((p) => editing || p.options.metric in edits || p.options.record === "always").flatMap((p) =>
|
|
4539
|
-
...recordedGroups().flatMap((g) =>
|
|
4539
|
+
...panels.filter((p) => editing || p.options.metric in edits || p.options.record === "always").flatMap((p) => _chunkP4NMZ77Wjs.toEntries.call(void 0, p, state.value(p.options.metric), ts, { save: saveId })),
|
|
4540
|
+
...recordedGroups().flatMap((g) => _chunkP4NMZ77Wjs.groupToEntries.call(void 0, g, itemsOf(g).map((i) => i.values), ts, saveId))
|
|
4540
4541
|
];
|
|
4541
4542
|
if (!entries.length) return;
|
|
4542
4543
|
const extra = beforeSave ? await beforeSave(ts) : [];
|
|
@@ -4617,10 +4618,10 @@ function groupChanges(base, items) {
|
|
|
4617
4618
|
return edited + added + removed + moved;
|
|
4618
4619
|
}
|
|
4619
4620
|
function groupState(group, items, last, edited, showProblems, update) {
|
|
4620
|
-
const fields =
|
|
4621
|
+
const fields = _chunkP4NMZ77Wjs.groupFields.call(void 0, group);
|
|
4621
4622
|
const { max } = group.options;
|
|
4622
4623
|
const fresh = (position) => ({ key: `n${nextItemKey++}`, values: freshItem(group, position, last), edited: [] });
|
|
4623
|
-
const filled = items.filter((i) => !
|
|
4624
|
+
const filled = items.filter((i) => !_chunkP4NMZ77Wjs.isEmptyItem.call(void 0, group, i.values)).length;
|
|
4624
4625
|
const { min } = group.options;
|
|
4625
4626
|
return {
|
|
4626
4627
|
items: items.map((i) => ({ key: i.key, values: i.values, edited: i.edited })),
|
|
@@ -4645,8 +4646,8 @@ function groupState(group, items, last, edited, showProblems, update) {
|
|
|
4645
4646
|
fieldProblem: (index, metric) => {
|
|
4646
4647
|
const item = items[index];
|
|
4647
4648
|
const field = fields.find((f) => f.options.metric === metric);
|
|
4648
|
-
if (!item || !field ||
|
|
4649
|
-
return showProblems || item.edited.includes(metric) ?
|
|
4649
|
+
if (!item || !field || _chunkP4NMZ77Wjs.isEmptyItem.call(void 0, group, item.values)) return void 0;
|
|
4650
|
+
return showProblems || item.edited.includes(metric) ? _chunkP4NMZ77Wjs.inputProblem.call(void 0, field, _nullishCoalesce(item.values[metric], () => ( null))) : void 0;
|
|
4650
4651
|
}
|
|
4651
4652
|
};
|
|
4652
4653
|
}
|
|
@@ -4963,4 +4964,5 @@ var styles16 = _reactnative.StyleSheet.create({
|
|
|
4963
4964
|
|
|
4964
4965
|
|
|
4965
4966
|
|
|
4966
|
-
exports.ALL = _chunkXWSPLZNCjs.ALL; exports.AUTHORING_GUIDE = _chunkXWSPLZNCjs.AUTHORING_GUIDE; exports.BUNDLE_ACCEPT = _chunkXWSPLZNCjs.BUNDLE_ACCEPT; exports.BUNDLE_TYPE = _chunkXWSPLZNCjs.BUNDLE_TYPE; exports.CANVAS_GAP = _chunkXWSPLZNCjs.CANVAS_GAP; exports.CANVAS_ROW_HEADER = _chunkXWSPLZNCjs.CANVAS_ROW_HEADER; exports.Calendar = Calendar; exports.Chip = Chip; exports.ConfigLoader = _chunkXWSPLZNCjs.ConfigLoader; exports.DASHBOARD_DS = _chunkXWSPLZNCjs.DASHBOARD_DS; exports.DEFAULT_GAZETTEER = _chunkXWSPLZNCjs.DEFAULT_GAZETTEER; exports.DICTATION_TYPES = _chunkXWSPLZNCjs.DICTATION_TYPES; exports.DOCUMENT_GUIDE = _chunkXWSPLZNCjs.DOCUMENT_GUIDE; exports.DashThemeProvider = DashThemeProvider; exports.DashboardProvider = DashboardProvider; exports.DashboardToolbar = DashboardToolbar; exports.DashboardView = DashboardView; exports.EDITABLE_VARIABLE_TYPES = _chunkXWSPLZNCjs.EDITABLE_VARIABLE_TYPES; exports.EXAMPLE_TEMPLATE = _chunkXWSPLZNCjs.EXAMPLE_TEMPLATE; exports.GRID_COLUMNS = _chunkXWSPLZNCjs.GRID_COLUMNS; exports.GROUP_FIELD_TYPES = _chunkXWSPLZNCjs.GROUP_FIELD_TYPES; exports.GrafanaClient = _chunkXWSPLZNCjs.GrafanaClient; exports.GrafanaDataSource = _chunkXWSPLZNCjs.GrafanaDataSource; exports.GrafanaError = _chunkXWSPLZNCjs.GrafanaError; exports.HttpConfigFiles = _chunkXWSPLZNCjs.HttpConfigFiles; exports.INPUT_GROUP = _chunkXWSPLZNCjs.INPUT_GROUP; exports.INPUT_OPTION_KEYS = _chunkXWSPLZNCjs.INPUT_OPTION_KEYS; exports.INPUT_TYPES = _chunkXWSPLZNCjs.INPUT_TYPES; exports.InputForm = InputForm; exports.InputFormContext = InputFormContext; exports.LOCAL_DATASOURCE_TYPE = _chunkXWSPLZNCjs.LOCAL_DATASOURCE_TYPE; exports.Legend = Legend; exports.LocalDataSource = _chunkXWSPLZNCjs.LocalDataSource; exports.MANIFEST_VERSION = _chunkXWSPLZNCjs.MANIFEST_VERSION; exports.MAPPING_TYPES = _chunkXWSPLZNCjs.MAPPING_TYPES; exports.MemoryEntryStore = _chunkXWSPLZNCjs.MemoryEntryStore; exports.NAMED_COLORS = _chunkXWSPLZNCjs.NAMED_COLORS; exports.NoData = NoData; exports.OPTION_CATEGORIES = _chunkXWSPLZNCjs.OPTION_CATEGORIES; exports.OVERRIDE_MATCHERS = _chunkXWSPLZNCjs.OVERRIDE_MATCHERS; exports.PANEL_TYPES = _chunkXWSPLZNCjs.PANEL_TYPES; exports.PanelCard = PanelCard; exports.REDUCER_LABELS = _chunkXWSPLZNCjs.REDUCER_LABELS; exports.REFRESH_CHOICES = _chunkXWSPLZNCjs.REFRESH_CHOICES; exports.RELATIVE_RANGES = _chunkXWSPLZNCjs.RELATIVE_RANGES; exports.RenderBoundary = RenderBoundary; exports.SERIES_PALETTE = _chunkXWSPLZNCjs.SERIES_PALETTE; exports.SNIPPET_VERSION = _chunkXWSPLZNCjs.SNIPPET_VERSION; exports.SPECIAL_MATCHES = _chunkXWSPLZNCjs.SPECIAL_MATCHES; exports.SaveConflictError = _chunkXWSPLZNCjs.SaveConflictError; exports.TEMPLATE_VERSION = _chunkXWSPLZNCjs.TEMPLATE_VERSION; exports.TIME_PRESETS = _chunkXWSPLZNCjs.TIME_PRESETS; exports.UNIT_CHOICES = _chunkXWSPLZNCjs.UNIT_CHOICES; exports.addTime = _chunkXWSPLZNCjs.addTime; exports.appSchema = _chunkXWSPLZNCjs.appSchema; exports.applyDashboardLink = _chunkXWSPLZNCjs.applyDashboardLink; exports.applyJsonEdits = _chunkXWSPLZNCjs.applyJsonEdits; exports.applyTemplate = _chunkXWSPLZNCjs.applyTemplate; exports.applyTransformations = _chunkXWSPLZNCjs.applyTransformations; exports.assembleBundle = _chunkXWSPLZNCjs.assembleBundle; exports.assembleFromResponse = _chunkXWSPLZNCjs.assembleFromResponse; exports.buildFrames = _chunkXWSPLZNCjs.buildFrames; exports.bundleFromFiles = _chunkXWSPLZNCjs.bundleFromFiles; exports.bundleRoot = _chunkXWSPLZNCjs.bundleRoot; exports.calculateInterval = _chunkXWSPLZNCjs.calculateInterval; exports.checkFiles = _chunkXWSPLZNCjs.checkFiles; exports.cleanDashboard = _chunkXWSPLZNCjs.cleanDashboard; exports.cleanPanelOptions = _chunkXWSPLZNCjs.cleanPanelOptions; exports.collapseRow = _chunkXWSPLZNCjs.collapseRow; exports.compactGrid = _chunkXWSPLZNCjs.compactGrid; exports.copyPanels = _chunkXWSPLZNCjs.copyPanels; exports.darkTheme = darkTheme; exports.dashboardSchema = _chunkXWSPLZNCjs.dashboardSchema; exports.dashboardSchemaIssues = _chunkXWSPLZNCjs.dashboardSchemaIssues; exports.dashboardSourceIds = _chunkXWSPLZNCjs.dashboardSourceIds; exports.defaultFetchJson = _chunkXWSPLZNCjs.defaultFetchJson; exports.describeRange = _chunkXWSPLZNCjs.describeRange; exports.dictationHints = _chunkXWSPLZNCjs.dictationHints; exports.diffJson = _chunkXWSPLZNCjs.diffJson; exports.documentChanges = _chunkXWSPLZNCjs.documentChanges; exports.documentIdFor = _chunkXWSPLZNCjs.documentIdFor; exports.documentKind = _chunkXWSPLZNCjs.documentKind; exports.documentPrompt = _chunkXWSPLZNCjs.documentPrompt; exports.documentUses = _chunkXWSPLZNCjs.documentUses; exports.dropTarget = _chunkXWSPLZNCjs.dropTarget; exports.duplicatePanel = _chunkXWSPLZNCjs.duplicatePanel; exports.entriesSavedWith = _chunkXWSPLZNCjs.entriesSavedWith; exports.entriesToItems = _chunkXWSPLZNCjs.entriesToItems; exports.entryToInputValue = _chunkXWSPLZNCjs.entryToInputValue; exports.expandRow = _chunkXWSPLZNCjs.expandRow; exports.fetchBundle = _chunkXWSPLZNCjs.fetchBundle; exports.fetchJsonWithToken = _chunkXWSPLZNCjs.fetchJsonWithToken; exports.fieldDisplayName = _chunkXWSPLZNCjs.fieldDisplayName; exports.fieldMatches = _chunkXWSPLZNCjs.fieldMatches; exports.fillForm = _chunkXWSPLZNCjs.fillForm; exports.fillHints = _chunkXWSPLZNCjs.fillHints; exports.fillPrompt = _chunkXWSPLZNCjs.fillPrompt; exports.fillSchema = _chunkXWSPLZNCjs.fillSchema; exports.fixDocumentPrompt = _chunkXWSPLZNCjs.fixDocumentPrompt; exports.fixTemplatePrompt = _chunkXWSPLZNCjs.fixTemplatePrompt; exports.formatClock = _chunkXWSPLZNCjs.formatClock; exports.formatDisplay = _chunkXWSPLZNCjs.formatDisplay; exports.formatDuration = _chunkXWSPLZNCjs.formatDuration; exports.formatJsonText = _chunkXWSPLZNCjs.formatJsonText; exports.formatLocalDateTime = _chunkXWSPLZNCjs.formatLocalDateTime; exports.formatValue = _chunkXWSPLZNCjs.formatValue; exports.frameLength = _chunkXWSPLZNCjs.frameLength; exports.framesToOptions = _chunkXWSPLZNCjs.framesToOptions; exports.fromWire = _chunkXWSPLZNCjs.fromWire; exports.getPath = _chunkXWSPLZNCjs.getPath; exports.gridOffsetPx = _chunkXWSPLZNCjs.gridOffsetPx; exports.gridUnitsToPx = _chunkXWSPLZNCjs.gridUnitsToPx; exports.groupField = _chunkXWSPLZNCjs.groupField; exports.groupFields = _chunkXWSPLZNCjs.groupFields; exports.groupKey = groupKey; exports.groupProblems = _chunkXWSPLZNCjs.groupProblems; exports.groupToEntries = _chunkXWSPLZNCjs.groupToEntries; exports.httpFetchJson = _chunkXWSPLZNCjs.httpFetchJson; exports.initialVariableValues = _chunkXWSPLZNCjs.initialVariableValues; exports.inputGroups = _chunkXWSPLZNCjs.inputGroups; exports.inputPanels = _chunkXWSPLZNCjs.inputPanels; exports.inputProblem = _chunkXWSPLZNCjs.inputProblem; exports.insertPanel = _chunkXWSPLZNCjs.insertPanel; exports.interpolate = _chunkXWSPLZNCjs.interpolate; exports.interpolateDeep = _chunkXWSPLZNCjs.interpolateDeep; exports.isBundleResponse = _chunkXWSPLZNCjs.isBundleResponse; exports.isEditableVariableType = _chunkXWSPLZNCjs.isEditableVariableType; exports.isEmptyItem = _chunkXWSPLZNCjs.isEmptyItem; exports.isFormPanelType = _chunkXWSPLZNCjs.isFormPanelType; exports.isInputGroup = _chunkXWSPLZNCjs.isInputGroup; exports.isInputPanel = _chunkXWSPLZNCjs.isInputPanel; exports.isInputType = _chunkXWSPLZNCjs.isInputType; exports.isLocalDatasource = _chunkXWSPLZNCjs.isLocalDatasource; exports.isReducer = _chunkXWSPLZNCjs.isReducer; exports.isRow = _chunkXWSPLZNCjs.isRow; exports.isSqlDatasource = _chunkXWSPLZNCjs.isSqlDatasource; exports.jsonFromAnswer = _chunkXWSPLZNCjs.jsonFromAnswer; exports.layoutCanvas = _chunkXWSPLZNCjs.layoutCanvas; exports.layoutDashboard = _chunkXWSPLZNCjs.layoutDashboard; exports.lightTheme = lightTheme; exports.lineColumn = _chunkXWSPLZNCjs.lineColumn; exports.loadGazetteer = _chunkXWSPLZNCjs.loadGazetteer; exports.locate = _chunkXWSPLZNCjs.locate; exports.makeTemplate = _chunkXWSPLZNCjs.makeTemplate; exports.manifestSchemaIssues = _chunkXWSPLZNCjs.manifestSchemaIssues; exports.mappedResult = _chunkXWSPLZNCjs.mappedResult; exports.mappingProblem = _chunkXWSPLZNCjs.mappingProblem; exports.mappingRow = _chunkXWSPLZNCjs.mappingRow; exports.mappingRows = _chunkXWSPLZNCjs.mappingRows; exports.matchChoices = _chunkXWSPLZNCjs.matchChoices; exports.metricChanges = _chunkXWSPLZNCjs.metricChanges; exports.modelFiller = _chunkXWSPLZNCjs.modelFiller; exports.movePanel = _chunkXWSPLZNCjs.movePanel; exports.newDocument = _chunkXWSPLZNCjs.newDocument; exports.newPanel = _chunkXWSPLZNCjs.newPanel; exports.newSaveId = _chunkXWSPLZNCjs.newSaveId; exports.newVariable = _chunkXWSPLZNCjs.newVariable; exports.nextPanelId = _chunkXWSPLZNCjs.nextPanelId; exports.normalizeRef = _chunkXWSPLZNCjs.normalizeRef; exports.numberFields = _chunkXWSPLZNCjs.numberFields; exports.optionValue = _chunkXWSPLZNCjs.optionValue; exports.overrideProperties = _chunkXWSPLZNCjs.overrideProperties; exports.panelEdits = _chunkXWSPLZNCjs.panelEdits; exports.panelHasQueries = _chunkXWSPLZNCjs.panelHasQueries; exports.panelKey = _chunkXWSPLZNCjs.panelKey; exports.panelMetrics = _chunkXWSPLZNCjs.panelMetrics; exports.panelOptions = _chunkXWSPLZNCjs.panelOptions; exports.panelOverrides = _chunkXWSPLZNCjs.panelOverrides; exports.panelSize = _chunkXWSPLZNCjs.panelSize; exports.panelSpan = _chunkXWSPLZNCjs.panelSpan; exports.parseClockDigits = _chunkXWSPLZNCjs.parseClockDigits; exports.parseDashboardLink = _chunkXWSPLZNCjs.parseDashboardLink; exports.parseDuration = _chunkXWSPLZNCjs.parseDuration; exports.parseFillAnswer = _chunkXWSPLZNCjs.parseFillAnswer; exports.parseGazetteer = _chunkXWSPLZNCjs.parseGazetteer; exports.parseJsonText = _chunkXWSPLZNCjs.parseJsonText; exports.parseLocalDateTime = _chunkXWSPLZNCjs.parseLocalDateTime; exports.parseRange = _chunkXWSPLZNCjs.parseRange; exports.parseSnippet = _chunkXWSPLZNCjs.parseSnippet; exports.parseSpokenDuration = _chunkXWSPLZNCjs.parseSpokenDuration; exports.parseSpokenNumber = _chunkXWSPLZNCjs.parseSpokenNumber; exports.parseSpokenYesNo = _chunkXWSPLZNCjs.parseSpokenYesNo; exports.parseTemplate = _chunkXWSPLZNCjs.parseTemplate; exports.parseTime = _chunkXWSPLZNCjs.parseTime; exports.pasteSnippet = _chunkXWSPLZNCjs.pasteSnippet; exports.placePanel = _chunkXWSPLZNCjs.placePanel; exports.plainInputPanels = _chunkXWSPLZNCjs.plainInputPanels; exports.pointerToPath = _chunkXWSPLZNCjs.pointerToPath; exports.prepareDashboard = _chunkXWSPLZNCjs.prepareDashboard; exports.previewPaste = _chunkXWSPLZNCjs.previewPaste; exports.queryPanel = _chunkXWSPLZNCjs.queryPanel; exports.queryParam = _chunkXWSPLZNCjs.queryParam; exports.readConfigFiles = _chunkXWSPLZNCjs.readConfigFiles; exports.readDocumentAnswer = _chunkXWSPLZNCjs.readDocumentAnswer; exports.readFill = _chunkXWSPLZNCjs.readFill; exports.readTemplateAnswer = _chunkXWSPLZNCjs.readTemplateAnswer; exports.readingOrder = _chunkXWSPLZNCjs.readingOrder; exports.reduce = _chunkXWSPLZNCjs.reduce; exports.refineOptions = _chunkXWSPLZNCjs.refineOptions; exports.refreshedVariables = _chunkXWSPLZNCjs.refreshedVariables; exports.registerPanel = registerPanel; exports.removeDocumentFromManifest = _chunkXWSPLZNCjs.removeDocumentFromManifest; exports.removePanel = _chunkXWSPLZNCjs.removePanel; exports.renameDocumentInManifest = _chunkXWSPLZNCjs.renameDocumentInManifest; exports.renameMetrics = _chunkXWSPLZNCjs.renameMetrics; exports.renameVariableInPanels = _chunkXWSPLZNCjs.renameVariableInPanels; exports.repack = _chunkXWSPLZNCjs.repack; exports.repeatOptions = _chunkXWSPLZNCjs.repeatOptions; exports.requiredManifestVersion = _chunkXWSPLZNCjs.requiredManifestVersion; exports.resizePanel = _chunkXWSPLZNCjs.resizePanel; exports.resolveColor = _chunkXWSPLZNCjs.resolveColor; exports.resolveFieldConfig = _chunkXWSPLZNCjs.resolveFieldConfig; exports.resolveLinks = _chunkXWSPLZNCjs.resolveLinks; exports.resolveTimezone = _chunkXWSPLZNCjs.resolveTimezone; exports.resolveUrl = _chunkXWSPLZNCjs.resolveUrl; exports.resolveVariables = _chunkXWSPLZNCjs.resolveVariables; exports.revalidateBundle = _chunkXWSPLZNCjs.revalidateBundle; exports.rowsToMappings = _chunkXWSPLZNCjs.rowsToMappings; exports.ruleFill = _chunkXWSPLZNCjs.ruleFill; exports.ruleFiller = _chunkXWSPLZNCjs.ruleFiller; exports.sameSave = _chunkXWSPLZNCjs.sameSave; exports.sampleEntries = _chunkXWSPLZNCjs.sampleEntries; exports.screenDocuments = _chunkXWSPLZNCjs.screenDocuments; exports.screenOfType = _chunkXWSPLZNCjs.screenOfType; exports.selectValue = _chunkXWSPLZNCjs.selectValue; exports.seriesColor = _chunkXWSPLZNCjs.seriesColor; exports.setHiddenOnPhones = _chunkXWSPLZNCjs.setHiddenOnPhones; exports.setJsonValue = _chunkXWSPLZNCjs.setJsonValue; exports.setOption = _chunkXWSPLZNCjs.setOption; exports.setOptionValue = _chunkXWSPLZNCjs.setOptionValue; exports.setOverrides = _chunkXWSPLZNCjs.setOverrides; exports.settleLayout = _chunkXWSPLZNCjs.settleLayout; exports.snapToGrid = _chunkXWSPLZNCjs.snapToGrid; exports.splitPath = _chunkXWSPLZNCjs.splitPath; exports.spokenValue = _chunkXWSPLZNCjs.spokenValue; exports.startOf = _chunkXWSPLZNCjs.startOf; exports.stringifyCompact = _chunkXWSPLZNCjs.stringifyCompact; exports.tabIdFor = _chunkXWSPLZNCjs.tabIdFor; exports.takesDictation = _chunkXWSPLZNCjs.takesDictation; exports.templateNeeds = _chunkXWSPLZNCjs.templateNeeds; exports.templatePrompt = _chunkXWSPLZNCjs.templatePrompt; exports.textSuggestions = _chunkXWSPLZNCjs.textSuggestions; exports.thresholdStep = _chunkXWSPLZNCjs.thresholdStep; exports.timeExprError = _chunkXWSPLZNCjs.timeExprError; exports.timeField = _chunkXWSPLZNCjs.timeField; exports.toEntries = _chunkXWSPLZNCjs.toEntries; exports.toMillis = _chunkXWSPLZNCjs.toMillis; exports.toSeries = _chunkXWSPLZNCjs.toSeries; exports.toXYSeries = _chunkXWSPLZNCjs.toXYSeries; exports.uniqueNames = _chunkXWSPLZNCjs.uniqueNames; exports.useDashTheme = useDashTheme; exports.useDashboard = useDashboard; exports.useInputForm = useInputForm; exports.usePanelData = usePanelData; exports.validateBundle = _chunkXWSPLZNCjs.validateBundle; exports.validateDashboard = _chunkXWSPLZNCjs.validateDashboard; exports.validateManifest = _chunkXWSPLZNCjs.validateManifest; exports.valueColor = _chunkXWSPLZNCjs.valueColor; exports.valueText = _chunkXWSPLZNCjs.valueText; exports.variableDependents = _chunkXWSPLZNCjs.variableDependents; exports.variableInfo = _chunkXWSPLZNCjs.variableInfo; exports.variableNameError = _chunkXWSPLZNCjs.variableNameError; exports.variableOptions = _chunkXWSPLZNCjs.variableOptions; exports.variableOrder = _chunkXWSPLZNCjs.variableOrder; exports.variableReferences = _chunkXWSPLZNCjs.variableReferences; exports.variableUses = _chunkXWSPLZNCjs.variableUses; exports.variableWithCurrent = _chunkXWSPLZNCjs.variableWithCurrent; exports.variableWithFlags = _chunkXWSPLZNCjs.variableWithFlags; exports.variableWithQuery = _chunkXWSPLZNCjs.variableWithQuery; exports.variableWithType = _chunkXWSPLZNCjs.variableWithType; exports.visibleVariables = _chunkXWSPLZNCjs.visibleVariables; exports.webSpeechRecognizer = webSpeechRecognizer; exports.zoomRange = _chunkXWSPLZNCjs.zoomRange;
|
|
4967
|
+
|
|
4968
|
+
exports.ALL = _chunkP4NMZ77Wjs.ALL; exports.AUTHORING_GUIDE = _chunkP4NMZ77Wjs.AUTHORING_GUIDE; exports.BUNDLE_ACCEPT = _chunkP4NMZ77Wjs.BUNDLE_ACCEPT; exports.BUNDLE_TYPE = _chunkP4NMZ77Wjs.BUNDLE_TYPE; exports.CANVAS_GAP = _chunkP4NMZ77Wjs.CANVAS_GAP; exports.CANVAS_ROW_HEADER = _chunkP4NMZ77Wjs.CANVAS_ROW_HEADER; exports.Calendar = Calendar; exports.Chip = Chip; exports.ConfigLoader = _chunkP4NMZ77Wjs.ConfigLoader; exports.DASHBOARD_DS = _chunkP4NMZ77Wjs.DASHBOARD_DS; exports.DEFAULT_GAZETTEER = _chunkP4NMZ77Wjs.DEFAULT_GAZETTEER; exports.DICTATION_TYPES = _chunkP4NMZ77Wjs.DICTATION_TYPES; exports.DOCUMENT_GUIDE = _chunkP4NMZ77Wjs.DOCUMENT_GUIDE; exports.DashThemeProvider = DashThemeProvider; exports.DashboardProvider = DashboardProvider; exports.DashboardToolbar = DashboardToolbar; exports.DashboardView = DashboardView; exports.EDITABLE_VARIABLE_TYPES = _chunkP4NMZ77Wjs.EDITABLE_VARIABLE_TYPES; exports.EXAMPLE_TEMPLATE = _chunkP4NMZ77Wjs.EXAMPLE_TEMPLATE; exports.GRID_COLUMNS = _chunkP4NMZ77Wjs.GRID_COLUMNS; exports.GROUP_FIELD_TYPES = _chunkP4NMZ77Wjs.GROUP_FIELD_TYPES; exports.GrafanaClient = _chunkP4NMZ77Wjs.GrafanaClient; exports.GrafanaDataSource = _chunkP4NMZ77Wjs.GrafanaDataSource; exports.GrafanaError = _chunkP4NMZ77Wjs.GrafanaError; exports.HttpConfigFiles = _chunkP4NMZ77Wjs.HttpConfigFiles; exports.INPUT_GROUP = _chunkP4NMZ77Wjs.INPUT_GROUP; exports.INPUT_OPTION_KEYS = _chunkP4NMZ77Wjs.INPUT_OPTION_KEYS; exports.INPUT_TYPES = _chunkP4NMZ77Wjs.INPUT_TYPES; exports.InputForm = InputForm; exports.InputFormContext = InputFormContext; exports.LOCAL_DATASOURCE_TYPE = _chunkP4NMZ77Wjs.LOCAL_DATASOURCE_TYPE; exports.Legend = Legend; exports.LocalDataSource = _chunkP4NMZ77Wjs.LocalDataSource; exports.MANIFEST_VERSION = _chunkP4NMZ77Wjs.MANIFEST_VERSION; exports.MAPPING_TYPES = _chunkP4NMZ77Wjs.MAPPING_TYPES; exports.MemoryEntryStore = _chunkP4NMZ77Wjs.MemoryEntryStore; exports.NAMED_COLORS = _chunkP4NMZ77Wjs.NAMED_COLORS; exports.NoData = NoData; exports.OPTION_CATEGORIES = _chunkP4NMZ77Wjs.OPTION_CATEGORIES; exports.OVERRIDE_MATCHERS = _chunkP4NMZ77Wjs.OVERRIDE_MATCHERS; exports.PANEL_TYPES = _chunkP4NMZ77Wjs.PANEL_TYPES; exports.PanelCard = PanelCard; exports.REDUCER_LABELS = _chunkP4NMZ77Wjs.REDUCER_LABELS; exports.REFRESH_CHOICES = _chunkP4NMZ77Wjs.REFRESH_CHOICES; exports.RELATIVE_RANGES = _chunkP4NMZ77Wjs.RELATIVE_RANGES; exports.RenderBoundary = RenderBoundary; exports.SERIES_PALETTE = _chunkP4NMZ77Wjs.SERIES_PALETTE; exports.SNIPPET_VERSION = _chunkP4NMZ77Wjs.SNIPPET_VERSION; exports.SPECIAL_MATCHES = _chunkP4NMZ77Wjs.SPECIAL_MATCHES; exports.SaveConflictError = _chunkP4NMZ77Wjs.SaveConflictError; exports.TEMPLATE_VERSION = _chunkP4NMZ77Wjs.TEMPLATE_VERSION; exports.TIME_PRESETS = _chunkP4NMZ77Wjs.TIME_PRESETS; exports.UNIT_CHOICES = _chunkP4NMZ77Wjs.UNIT_CHOICES; exports.addTime = _chunkP4NMZ77Wjs.addTime; exports.appSchema = _chunkP4NMZ77Wjs.appSchema; exports.applyDashboardLink = _chunkP4NMZ77Wjs.applyDashboardLink; exports.applyJsonEdits = _chunkP4NMZ77Wjs.applyJsonEdits; exports.applyTemplate = _chunkP4NMZ77Wjs.applyTemplate; exports.applyTransformations = _chunkP4NMZ77Wjs.applyTransformations; exports.assembleBundle = _chunkP4NMZ77Wjs.assembleBundle; exports.assembleFromResponse = _chunkP4NMZ77Wjs.assembleFromResponse; exports.buildFrames = _chunkP4NMZ77Wjs.buildFrames; exports.bundleFromFiles = _chunkP4NMZ77Wjs.bundleFromFiles; exports.bundleRoot = _chunkP4NMZ77Wjs.bundleRoot; exports.calculateInterval = _chunkP4NMZ77Wjs.calculateInterval; exports.checkFiles = _chunkP4NMZ77Wjs.checkFiles; exports.choicesOf = _chunkP4NMZ77Wjs.choicesOf; exports.cleanDashboard = _chunkP4NMZ77Wjs.cleanDashboard; exports.cleanPanelOptions = _chunkP4NMZ77Wjs.cleanPanelOptions; exports.collapseRow = _chunkP4NMZ77Wjs.collapseRow; exports.compactGrid = _chunkP4NMZ77Wjs.compactGrid; exports.copyPanels = _chunkP4NMZ77Wjs.copyPanels; exports.darkTheme = darkTheme; exports.dashboardSchema = _chunkP4NMZ77Wjs.dashboardSchema; exports.dashboardSchemaIssues = _chunkP4NMZ77Wjs.dashboardSchemaIssues; exports.dashboardSourceIds = _chunkP4NMZ77Wjs.dashboardSourceIds; exports.defaultFetchJson = _chunkP4NMZ77Wjs.defaultFetchJson; exports.describeRange = _chunkP4NMZ77Wjs.describeRange; exports.dictationHints = _chunkP4NMZ77Wjs.dictationHints; exports.diffJson = _chunkP4NMZ77Wjs.diffJson; exports.documentChanges = _chunkP4NMZ77Wjs.documentChanges; exports.documentIdFor = _chunkP4NMZ77Wjs.documentIdFor; exports.documentKind = _chunkP4NMZ77Wjs.documentKind; exports.documentPrompt = _chunkP4NMZ77Wjs.documentPrompt; exports.documentUses = _chunkP4NMZ77Wjs.documentUses; exports.dropTarget = _chunkP4NMZ77Wjs.dropTarget; exports.duplicatePanel = _chunkP4NMZ77Wjs.duplicatePanel; exports.entriesSavedWith = _chunkP4NMZ77Wjs.entriesSavedWith; exports.entriesToItems = _chunkP4NMZ77Wjs.entriesToItems; exports.entryToInputValue = _chunkP4NMZ77Wjs.entryToInputValue; exports.expandRow = _chunkP4NMZ77Wjs.expandRow; exports.fetchBundle = _chunkP4NMZ77Wjs.fetchBundle; exports.fetchJsonWithToken = _chunkP4NMZ77Wjs.fetchJsonWithToken; exports.fieldDisplayName = _chunkP4NMZ77Wjs.fieldDisplayName; exports.fieldMatches = _chunkP4NMZ77Wjs.fieldMatches; exports.fillForm = _chunkP4NMZ77Wjs.fillForm; exports.fillHints = _chunkP4NMZ77Wjs.fillHints; exports.fillPrompt = _chunkP4NMZ77Wjs.fillPrompt; exports.fillSchema = _chunkP4NMZ77Wjs.fillSchema; exports.fixDocumentPrompt = _chunkP4NMZ77Wjs.fixDocumentPrompt; exports.fixTemplatePrompt = _chunkP4NMZ77Wjs.fixTemplatePrompt; exports.formatClock = _chunkP4NMZ77Wjs.formatClock; exports.formatDisplay = _chunkP4NMZ77Wjs.formatDisplay; exports.formatDuration = _chunkP4NMZ77Wjs.formatDuration; exports.formatJsonText = _chunkP4NMZ77Wjs.formatJsonText; exports.formatLocalDateTime = _chunkP4NMZ77Wjs.formatLocalDateTime; exports.formatValue = _chunkP4NMZ77Wjs.formatValue; exports.frameLength = _chunkP4NMZ77Wjs.frameLength; exports.framesToOptions = _chunkP4NMZ77Wjs.framesToOptions; exports.fromWire = _chunkP4NMZ77Wjs.fromWire; exports.getPath = _chunkP4NMZ77Wjs.getPath; exports.gridOffsetPx = _chunkP4NMZ77Wjs.gridOffsetPx; exports.gridUnitsToPx = _chunkP4NMZ77Wjs.gridUnitsToPx; exports.groupField = _chunkP4NMZ77Wjs.groupField; exports.groupFields = _chunkP4NMZ77Wjs.groupFields; exports.groupKey = groupKey; exports.groupProblems = _chunkP4NMZ77Wjs.groupProblems; exports.groupToEntries = _chunkP4NMZ77Wjs.groupToEntries; exports.httpFetchJson = _chunkP4NMZ77Wjs.httpFetchJson; exports.initialVariableValues = _chunkP4NMZ77Wjs.initialVariableValues; exports.inputGroups = _chunkP4NMZ77Wjs.inputGroups; exports.inputPanels = _chunkP4NMZ77Wjs.inputPanels; exports.inputProblem = _chunkP4NMZ77Wjs.inputProblem; exports.insertPanel = _chunkP4NMZ77Wjs.insertPanel; exports.interpolate = _chunkP4NMZ77Wjs.interpolate; exports.interpolateDeep = _chunkP4NMZ77Wjs.interpolateDeep; exports.isBundleResponse = _chunkP4NMZ77Wjs.isBundleResponse; exports.isEditableVariableType = _chunkP4NMZ77Wjs.isEditableVariableType; exports.isEmptyItem = _chunkP4NMZ77Wjs.isEmptyItem; exports.isFormPanelType = _chunkP4NMZ77Wjs.isFormPanelType; exports.isInputGroup = _chunkP4NMZ77Wjs.isInputGroup; exports.isInputPanel = _chunkP4NMZ77Wjs.isInputPanel; exports.isInputType = _chunkP4NMZ77Wjs.isInputType; exports.isLocalDatasource = _chunkP4NMZ77Wjs.isLocalDatasource; exports.isReducer = _chunkP4NMZ77Wjs.isReducer; exports.isRow = _chunkP4NMZ77Wjs.isRow; exports.isSqlDatasource = _chunkP4NMZ77Wjs.isSqlDatasource; exports.jsonFromAnswer = _chunkP4NMZ77Wjs.jsonFromAnswer; exports.layoutCanvas = _chunkP4NMZ77Wjs.layoutCanvas; exports.layoutDashboard = _chunkP4NMZ77Wjs.layoutDashboard; exports.lightTheme = lightTheme; exports.lineColumn = _chunkP4NMZ77Wjs.lineColumn; exports.loadGazetteer = _chunkP4NMZ77Wjs.loadGazetteer; exports.locate = _chunkP4NMZ77Wjs.locate; exports.makeTemplate = _chunkP4NMZ77Wjs.makeTemplate; exports.manifestSchemaIssues = _chunkP4NMZ77Wjs.manifestSchemaIssues; exports.mappedResult = _chunkP4NMZ77Wjs.mappedResult; exports.mappingProblem = _chunkP4NMZ77Wjs.mappingProblem; exports.mappingRow = _chunkP4NMZ77Wjs.mappingRow; exports.mappingRows = _chunkP4NMZ77Wjs.mappingRows; exports.matchChoices = _chunkP4NMZ77Wjs.matchChoices; exports.metricChanges = _chunkP4NMZ77Wjs.metricChanges; exports.modelFiller = _chunkP4NMZ77Wjs.modelFiller; exports.movePanel = _chunkP4NMZ77Wjs.movePanel; exports.newDocument = _chunkP4NMZ77Wjs.newDocument; exports.newPanel = _chunkP4NMZ77Wjs.newPanel; exports.newSaveId = _chunkP4NMZ77Wjs.newSaveId; exports.newVariable = _chunkP4NMZ77Wjs.newVariable; exports.nextPanelId = _chunkP4NMZ77Wjs.nextPanelId; exports.normalizeRef = _chunkP4NMZ77Wjs.normalizeRef; exports.numberFields = _chunkP4NMZ77Wjs.numberFields; exports.optionValue = _chunkP4NMZ77Wjs.optionValue; exports.overrideProperties = _chunkP4NMZ77Wjs.overrideProperties; exports.panelEdits = _chunkP4NMZ77Wjs.panelEdits; exports.panelHasQueries = _chunkP4NMZ77Wjs.panelHasQueries; exports.panelKey = _chunkP4NMZ77Wjs.panelKey; exports.panelMetrics = _chunkP4NMZ77Wjs.panelMetrics; exports.panelOptions = _chunkP4NMZ77Wjs.panelOptions; exports.panelOverrides = _chunkP4NMZ77Wjs.panelOverrides; exports.panelSize = _chunkP4NMZ77Wjs.panelSize; exports.panelSpan = _chunkP4NMZ77Wjs.panelSpan; exports.parseClockDigits = _chunkP4NMZ77Wjs.parseClockDigits; exports.parseDashboardLink = _chunkP4NMZ77Wjs.parseDashboardLink; exports.parseDuration = _chunkP4NMZ77Wjs.parseDuration; exports.parseFillAnswer = _chunkP4NMZ77Wjs.parseFillAnswer; exports.parseGazetteer = _chunkP4NMZ77Wjs.parseGazetteer; exports.parseJsonText = _chunkP4NMZ77Wjs.parseJsonText; exports.parseLocalDateTime = _chunkP4NMZ77Wjs.parseLocalDateTime; exports.parseRange = _chunkP4NMZ77Wjs.parseRange; exports.parseSnippet = _chunkP4NMZ77Wjs.parseSnippet; exports.parseSpokenDuration = _chunkP4NMZ77Wjs.parseSpokenDuration; exports.parseSpokenNumber = _chunkP4NMZ77Wjs.parseSpokenNumber; exports.parseSpokenYesNo = _chunkP4NMZ77Wjs.parseSpokenYesNo; exports.parseTemplate = _chunkP4NMZ77Wjs.parseTemplate; exports.parseTime = _chunkP4NMZ77Wjs.parseTime; exports.pasteSnippet = _chunkP4NMZ77Wjs.pasteSnippet; exports.placePanel = _chunkP4NMZ77Wjs.placePanel; exports.plainInputPanels = _chunkP4NMZ77Wjs.plainInputPanels; exports.pointerToPath = _chunkP4NMZ77Wjs.pointerToPath; exports.prepareDashboard = _chunkP4NMZ77Wjs.prepareDashboard; exports.previewPaste = _chunkP4NMZ77Wjs.previewPaste; exports.queryPanel = _chunkP4NMZ77Wjs.queryPanel; exports.queryParam = _chunkP4NMZ77Wjs.queryParam; exports.readConfigFiles = _chunkP4NMZ77Wjs.readConfigFiles; exports.readDocumentAnswer = _chunkP4NMZ77Wjs.readDocumentAnswer; exports.readFill = _chunkP4NMZ77Wjs.readFill; exports.readTemplateAnswer = _chunkP4NMZ77Wjs.readTemplateAnswer; exports.readingOrder = _chunkP4NMZ77Wjs.readingOrder; exports.reduce = _chunkP4NMZ77Wjs.reduce; exports.refineOptions = _chunkP4NMZ77Wjs.refineOptions; exports.refreshedVariables = _chunkP4NMZ77Wjs.refreshedVariables; exports.registerPanel = registerPanel; exports.removeDocumentFromManifest = _chunkP4NMZ77Wjs.removeDocumentFromManifest; exports.removePanel = _chunkP4NMZ77Wjs.removePanel; exports.renameDocumentInManifest = _chunkP4NMZ77Wjs.renameDocumentInManifest; exports.renameMetrics = _chunkP4NMZ77Wjs.renameMetrics; exports.renameVariableInPanels = _chunkP4NMZ77Wjs.renameVariableInPanels; exports.repack = _chunkP4NMZ77Wjs.repack; exports.repeatOptions = _chunkP4NMZ77Wjs.repeatOptions; exports.requiredManifestVersion = _chunkP4NMZ77Wjs.requiredManifestVersion; exports.resizePanel = _chunkP4NMZ77Wjs.resizePanel; exports.resolveColor = _chunkP4NMZ77Wjs.resolveColor; exports.resolveFieldConfig = _chunkP4NMZ77Wjs.resolveFieldConfig; exports.resolveLinks = _chunkP4NMZ77Wjs.resolveLinks; exports.resolveTimezone = _chunkP4NMZ77Wjs.resolveTimezone; exports.resolveUrl = _chunkP4NMZ77Wjs.resolveUrl; exports.resolveVariables = _chunkP4NMZ77Wjs.resolveVariables; exports.revalidateBundle = _chunkP4NMZ77Wjs.revalidateBundle; exports.rowsToMappings = _chunkP4NMZ77Wjs.rowsToMappings; exports.ruleFill = _chunkP4NMZ77Wjs.ruleFill; exports.ruleFiller = _chunkP4NMZ77Wjs.ruleFiller; exports.sameSave = _chunkP4NMZ77Wjs.sameSave; exports.sampleEntries = _chunkP4NMZ77Wjs.sampleEntries; exports.screenDocuments = _chunkP4NMZ77Wjs.screenDocuments; exports.screenOfType = _chunkP4NMZ77Wjs.screenOfType; exports.selectValue = _chunkP4NMZ77Wjs.selectValue; exports.seriesColor = _chunkP4NMZ77Wjs.seriesColor; exports.setHiddenOnPhones = _chunkP4NMZ77Wjs.setHiddenOnPhones; exports.setJsonValue = _chunkP4NMZ77Wjs.setJsonValue; exports.setOption = _chunkP4NMZ77Wjs.setOption; exports.setOptionValue = _chunkP4NMZ77Wjs.setOptionValue; exports.setOverrides = _chunkP4NMZ77Wjs.setOverrides; exports.settleLayout = _chunkP4NMZ77Wjs.settleLayout; exports.snapToGrid = _chunkP4NMZ77Wjs.snapToGrid; exports.splitPath = _chunkP4NMZ77Wjs.splitPath; exports.spokenValue = _chunkP4NMZ77Wjs.spokenValue; exports.startOf = _chunkP4NMZ77Wjs.startOf; exports.stringifyCompact = _chunkP4NMZ77Wjs.stringifyCompact; exports.tabIdFor = _chunkP4NMZ77Wjs.tabIdFor; exports.takesDictation = _chunkP4NMZ77Wjs.takesDictation; exports.templateNeeds = _chunkP4NMZ77Wjs.templateNeeds; exports.templatePrompt = _chunkP4NMZ77Wjs.templatePrompt; exports.textSuggestions = _chunkP4NMZ77Wjs.textSuggestions; exports.thresholdStep = _chunkP4NMZ77Wjs.thresholdStep; exports.timeExprError = _chunkP4NMZ77Wjs.timeExprError; exports.timeField = _chunkP4NMZ77Wjs.timeField; exports.toEntries = _chunkP4NMZ77Wjs.toEntries; exports.toMillis = _chunkP4NMZ77Wjs.toMillis; exports.toSeries = _chunkP4NMZ77Wjs.toSeries; exports.toXYSeries = _chunkP4NMZ77Wjs.toXYSeries; exports.uniqueNames = _chunkP4NMZ77Wjs.uniqueNames; exports.useDashTheme = useDashTheme; exports.useDashboard = useDashboard; exports.useInputForm = useInputForm; exports.usePanelData = usePanelData; exports.validateBundle = _chunkP4NMZ77Wjs.validateBundle; exports.validateDashboard = _chunkP4NMZ77Wjs.validateDashboard; exports.validateManifest = _chunkP4NMZ77Wjs.validateManifest; exports.valueColor = _chunkP4NMZ77Wjs.valueColor; exports.valueText = _chunkP4NMZ77Wjs.valueText; exports.variableDependents = _chunkP4NMZ77Wjs.variableDependents; exports.variableInfo = _chunkP4NMZ77Wjs.variableInfo; exports.variableNameError = _chunkP4NMZ77Wjs.variableNameError; exports.variableOptions = _chunkP4NMZ77Wjs.variableOptions; exports.variableOrder = _chunkP4NMZ77Wjs.variableOrder; exports.variableReferences = _chunkP4NMZ77Wjs.variableReferences; exports.variableUses = _chunkP4NMZ77Wjs.variableUses; exports.variableWithCurrent = _chunkP4NMZ77Wjs.variableWithCurrent; exports.variableWithFlags = _chunkP4NMZ77Wjs.variableWithFlags; exports.variableWithQuery = _chunkP4NMZ77Wjs.variableWithQuery; exports.variableWithType = _chunkP4NMZ77Wjs.variableWithType; exports.visibleVariables = _chunkP4NMZ77Wjs.visibleVariables; exports.webSpeechRecognizer = webSpeechRecognizer; exports.zoomRange = _chunkP4NMZ77Wjs.zoomRange;
|