@modelform/react-native 0.13.0 → 0.14.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 +24 -0
- package/dist/{chunk-OFXIKI2L.mjs → chunk-72OFPTDE.mjs} +244 -0
- package/dist/{chunk-CU4TMSZE.js → chunk-XWSPLZNC.js} +346 -102
- package/dist/core/formFill.d.ts +89 -0
- package/dist/core/index.d.ts +1 -0
- package/dist/core/index.js +20 -2
- package/dist/core/index.mjs +19 -1
- package/dist/index.js +338 -175
- package/dist/index.mjs +187 -24
- package/dist/ui/inputs/Dictation.d.ts +8 -2
- package/dist/ui/inputs/InputForm.d.ts +8 -1
- package/dist/ui/inputs/VoiceFill.d.ts +28 -0
- package/dist/ui/inputs/formContext.d.ts +2 -0
- package/dist/ui/speech.d.ts +5 -0
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -242,7 +242,16 @@
|
|
|
242
242
|
|
|
243
243
|
|
|
244
244
|
|
|
245
|
-
|
|
245
|
+
|
|
246
|
+
|
|
247
|
+
|
|
248
|
+
|
|
249
|
+
|
|
250
|
+
|
|
251
|
+
|
|
252
|
+
|
|
253
|
+
|
|
254
|
+
var _chunkXWSPLZNCjs = require('./chunk-XWSPLZNC.js');
|
|
246
255
|
|
|
247
256
|
// src/ui/theme.tsx
|
|
248
257
|
var _react = require('react');
|
|
@@ -432,7 +441,7 @@ function DashboardProvider({ dashboard, resolve, refreshKey: externalKey = 0, on
|
|
|
432
441
|
if (!dashboard.refresh) return;
|
|
433
442
|
let ms;
|
|
434
443
|
try {
|
|
435
|
-
ms =
|
|
444
|
+
ms = _chunkXWSPLZNCjs.parseDuration.call(void 0, dashboard.refresh);
|
|
436
445
|
} catch (e2) {
|
|
437
446
|
return;
|
|
438
447
|
}
|
|
@@ -440,7 +449,7 @@ function DashboardProvider({ dashboard, resolve, refreshKey: externalKey = 0, on
|
|
|
440
449
|
return () => clearInterval(id);
|
|
441
450
|
}, [dashboard.refresh, refresh]);
|
|
442
451
|
const refreshKey = tick + externalKey;
|
|
443
|
-
const range3 = _react.useMemo.call(void 0, () =>
|
|
452
|
+
const range3 = _react.useMemo.call(void 0, () => _chunkXWSPLZNCjs.parseRange.call(void 0, rawRange), [rawRange, refreshKey]);
|
|
444
453
|
const shared = _react.useMemo.call(void 0, () => /* @__PURE__ */ new Map(), [range3, vars.variables, vars.variableInfo]);
|
|
445
454
|
const value = _react.useMemo.call(void 0,
|
|
446
455
|
() => ({
|
|
@@ -477,8 +486,8 @@ function DashboardProvider({ dashboard, resolve, refreshKey: externalKey = 0, on
|
|
|
477
486
|
] });
|
|
478
487
|
}
|
|
479
488
|
function useDashboardVariables(dashboard, resolve, rawRange) {
|
|
480
|
-
const [state, setState] = _react.useState.call(void 0, () => ({ values:
|
|
481
|
-
const [resolving, setResolving] = _react.useState.call(void 0, () => !!resolve &&
|
|
489
|
+
const [state, setState] = _react.useState.call(void 0, () => ({ values: _chunkXWSPLZNCjs.initialVariableValues.call(void 0, dashboard), options: {}, errors: {} }));
|
|
490
|
+
const [resolving, setResolving] = _react.useState.call(void 0, () => !!resolve && _chunkXWSPLZNCjs.refreshedVariables.call(void 0, dashboard, "load").length > 0);
|
|
482
491
|
const [runKey, setRunKey] = _react.useState.call(void 0, 0);
|
|
483
492
|
const pending = _react.useRef.call(void 0, /* @__PURE__ */ new Set());
|
|
484
493
|
const stateRef = _react.useRef.call(void 0, state);
|
|
@@ -511,7 +520,7 @@ function useDashboardVariables(dashboard, resolve, rawRange) {
|
|
|
511
520
|
setState(update);
|
|
512
521
|
setResolving(false);
|
|
513
522
|
};
|
|
514
|
-
|
|
523
|
+
_chunkXWSPLZNCjs.resolveVariables.call(void 0, dashboard, { values, options, names, resolve: resolve2, range: _chunkXWSPLZNCjs.parseRange.call(void 0, rawRange), signal: controller.signal }).then(
|
|
515
524
|
(res) => finish((s) => ({
|
|
516
525
|
// Only the re-run variables change, so a pick made while this ran isn't overwritten.
|
|
517
526
|
values: { ...s.values, ...Object.fromEntries([...names].filter((n) => n in res.values).map((n) => [n, res.values[n]])) },
|
|
@@ -525,11 +534,11 @@ function useDashboardVariables(dashboard, resolve, rawRange) {
|
|
|
525
534
|
const [loadedDashboard, setLoadedDashboard] = _react.useState.call(void 0, dashboard);
|
|
526
535
|
if (dashboard !== loadedDashboard) {
|
|
527
536
|
setLoadedDashboard(dashboard);
|
|
528
|
-
setState((s) => ({ ...s, values: { ...
|
|
537
|
+
setState((s) => ({ ...s, values: { ..._chunkXWSPLZNCjs.initialVariableValues.call(void 0, dashboard), ...s.values } }));
|
|
529
538
|
}
|
|
530
539
|
_react.useEffect.call(void 0, () => {
|
|
531
|
-
const roots =
|
|
532
|
-
schedule([...roots, ...
|
|
540
|
+
const roots = _chunkXWSPLZNCjs.refreshedVariables.call(void 0, dashboard, "load");
|
|
541
|
+
schedule([...roots, ..._chunkXWSPLZNCjs.variableDependents.call(void 0, dashboard, roots)]);
|
|
533
542
|
}, [dashboard, schedule]);
|
|
534
543
|
const mounted = _react.useRef.call(void 0, false);
|
|
535
544
|
_react.useEffect.call(void 0, () => {
|
|
@@ -537,17 +546,17 @@ function useDashboardVariables(dashboard, resolve, rawRange) {
|
|
|
537
546
|
mounted.current = true;
|
|
538
547
|
return;
|
|
539
548
|
}
|
|
540
|
-
const roots =
|
|
541
|
-
schedule([...roots, ...
|
|
549
|
+
const roots = _chunkXWSPLZNCjs.refreshedVariables.call(void 0, dashboard, "range");
|
|
550
|
+
schedule([...roots, ..._chunkXWSPLZNCjs.variableDependents.call(void 0, dashboard, roots)]);
|
|
542
551
|
}, [rawRange]);
|
|
543
552
|
const setVariable = _react.useCallback.call(void 0,
|
|
544
553
|
(name, value) => {
|
|
545
554
|
setState((s) => ({ ...s, values: { ...s.values, [name]: value } }));
|
|
546
|
-
schedule(
|
|
555
|
+
schedule(_chunkXWSPLZNCjs.variableDependents.call(void 0, dashboard, [name]));
|
|
547
556
|
},
|
|
548
557
|
[dashboard, schedule]
|
|
549
558
|
);
|
|
550
|
-
const info = _react.useMemo.call(void 0, () =>
|
|
559
|
+
const info = _react.useMemo.call(void 0, () => _chunkXWSPLZNCjs.variableInfo.call(void 0, dashboard, state.options), [dashboard, state.options]);
|
|
551
560
|
return _react.useMemo.call(void 0,
|
|
552
561
|
() => ({
|
|
553
562
|
variables: state.values,
|
|
@@ -577,7 +586,7 @@ function usePanelData(panel, widthPx, enabled = true) {
|
|
|
577
586
|
_react.useEffect.call(void 0, () => {
|
|
578
587
|
if (!enabled || !request || !variablesReady) return;
|
|
579
588
|
const controller = new AbortController();
|
|
580
|
-
|
|
589
|
+
_chunkXWSPLZNCjs.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))) }));
|
|
581
590
|
return () => controller.abort();
|
|
582
591
|
}, [enabled, request, variablesReady]);
|
|
583
592
|
if (!enabled) return IDLE;
|
|
@@ -587,7 +596,7 @@ function usePanelData(panel, widthPx, enabled = true) {
|
|
|
587
596
|
function usePanelLinks(panel) {
|
|
588
597
|
const { dashboard, variables, variableInfo: variableInfo2, range: range3, openLinks } = useDashboard();
|
|
589
598
|
const resolve = _react.useCallback.call(void 0,
|
|
590
|
-
(links, data) =>
|
|
599
|
+
(links, data) => _chunkXWSPLZNCjs.resolveLinks.call(void 0, links, { dashboard, values: variables, info: variableInfo2, scoped: panel.scopedVars, range: range3, timezone: dashboard.timezone, data }),
|
|
591
600
|
[dashboard, variables, variableInfo2, panel.scopedVars, range3]
|
|
592
601
|
);
|
|
593
602
|
return { resolve, openLinks };
|
|
@@ -628,7 +637,7 @@ var RenderBoundary = (_class = class extends _react.Component {constructor(...ar
|
|
|
628
637
|
|
|
629
638
|
// src/ui/inputs/formContext.ts
|
|
630
639
|
|
|
631
|
-
var groupKey = (g) => g.id != null ? `#${g.id}` :
|
|
640
|
+
var groupKey = (g) => g.id != null ? `#${g.id}` : _chunkXWSPLZNCjs.groupFields.call(void 0, g).map((f) => f.options.metric).join("|");
|
|
632
641
|
var InputFormContext = _react.createContext.call(void 0, null);
|
|
633
642
|
function useInputForm() {
|
|
634
643
|
const v = _react.useContext.call(void 0, InputFormContext);
|
|
@@ -689,14 +698,14 @@ var ArrowIcon = ({ color, dir }) => /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
|
689
698
|
function displayExpr(expr) {
|
|
690
699
|
if (expr.trim().startsWith("now")) return expr;
|
|
691
700
|
try {
|
|
692
|
-
return
|
|
701
|
+
return _chunkXWSPLZNCjs.formatLocalDateTime.call(void 0, _chunkXWSPLZNCjs.parseTime.call(void 0, expr));
|
|
693
702
|
} catch (e3) {
|
|
694
703
|
return expr;
|
|
695
704
|
}
|
|
696
705
|
}
|
|
697
706
|
function tryParse(expr, roundUp, now = Date.now()) {
|
|
698
707
|
try {
|
|
699
|
-
return
|
|
708
|
+
return _chunkXWSPLZNCjs.parseTime.call(void 0, expr, now, roundUp);
|
|
700
709
|
} catch (e4) {
|
|
701
710
|
return null;
|
|
702
711
|
}
|
|
@@ -710,7 +719,7 @@ function endOfDay(ms) {
|
|
|
710
719
|
return new Date(d.getFullYear(), d.getMonth(), d.getDate() + 1).getTime() - 1e3;
|
|
711
720
|
}
|
|
712
721
|
function resolveTo(expr) {
|
|
713
|
-
return /^\s*\d{4}-\d{1,2}-\d{1,2}\s*$/.test(expr) ?
|
|
722
|
+
return /^\s*\d{4}-\d{1,2}-\d{1,2}\s*$/.test(expr) ? _chunkXWSPLZNCjs.formatLocalDateTime.call(void 0, endOfDay(_chunkXWSPLZNCjs.parseTime.call(void 0, expr))) : expr;
|
|
714
723
|
}
|
|
715
724
|
function TimeRangeSheet({ visible, value, onApply, onClose }) {
|
|
716
725
|
const theme = useDashTheme();
|
|
@@ -721,12 +730,12 @@ function TimeRangeSheet({ visible, value, onApply, onClose }) {
|
|
|
721
730
|
const [now] = _react.useState.call(void 0, () => Date.now());
|
|
722
731
|
const [month, setMonth] = _react.useState.call(void 0, () => new Date(_nullishCoalesce(tryParse(value.from, false), () => ( now))));
|
|
723
732
|
const fromMs = tryParse(from, false, now);
|
|
724
|
-
const toMs = tryParse(
|
|
725
|
-
const fromError =
|
|
726
|
-
const toError =
|
|
733
|
+
const toMs = tryParse(_chunkXWSPLZNCjs.timeExprError.call(void 0, to) ? to : resolveTo(to), true, now);
|
|
734
|
+
const fromError = _chunkXWSPLZNCjs.timeExprError.call(void 0, from);
|
|
735
|
+
const toError = _chunkXWSPLZNCjs.timeExprError.call(void 0, to);
|
|
727
736
|
const orderError = fromMs != null && toMs != null && fromMs >= toMs ? "\u201CTo\u201D must be after \u201CFrom\u201D" : null;
|
|
728
737
|
const valid = !fromError && !toError && !orderError;
|
|
729
|
-
const normalize = (expr) => expr.trim().startsWith("now") ? expr.trim() :
|
|
738
|
+
const normalize = (expr) => expr.trim().startsWith("now") ? expr.trim() : _chunkXWSPLZNCjs.formatLocalDateTime.call(void 0, _chunkXWSPLZNCjs.parseTime.call(void 0, expr));
|
|
730
739
|
const apply = () => {
|
|
731
740
|
if (!valid) return;
|
|
732
741
|
onApply({ from: normalize(from), to: normalize(resolveTo(to)) });
|
|
@@ -735,14 +744,14 @@ function TimeRangeSheet({ visible, value, onApply, onClose }) {
|
|
|
735
744
|
const pickDay = (day) => {
|
|
736
745
|
const end = endOfDay(day);
|
|
737
746
|
if (active === "from") {
|
|
738
|
-
setFrom(
|
|
739
|
-
if (toMs == null || toMs <= day) setTo(
|
|
747
|
+
setFrom(_chunkXWSPLZNCjs.formatLocalDateTime.call(void 0, day));
|
|
748
|
+
if (toMs == null || toMs <= day) setTo(_chunkXWSPLZNCjs.formatLocalDateTime.call(void 0, end));
|
|
740
749
|
setActive("to");
|
|
741
750
|
} else if (fromMs != null && day < startOfDay(fromMs)) {
|
|
742
|
-
setFrom(
|
|
743
|
-
setTo(
|
|
751
|
+
setFrom(_chunkXWSPLZNCjs.formatLocalDateTime.call(void 0, day));
|
|
752
|
+
setTo(_chunkXWSPLZNCjs.formatLocalDateTime.call(void 0, end));
|
|
744
753
|
} else {
|
|
745
|
-
setTo(
|
|
754
|
+
setTo(_chunkXWSPLZNCjs.formatLocalDateTime.call(void 0, end));
|
|
746
755
|
}
|
|
747
756
|
};
|
|
748
757
|
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
@@ -778,7 +787,7 @@ function TimeRangeSheet({ visible, value, onApply, onClose }) {
|
|
|
778
787
|
}
|
|
779
788
|
),
|
|
780
789
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _reactnative.Text, { style: [styles3.sectionTitle, { color: theme.textSecondary }], children: "Relative ranges" }),
|
|
781
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _reactnative.View, { style: styles3.chips, children:
|
|
790
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _reactnative.View, { style: styles3.chips, children: _chunkXWSPLZNCjs.RELATIVE_RANGES.map((r) => /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
782
791
|
Chip,
|
|
783
792
|
{
|
|
784
793
|
label: r.label,
|
|
@@ -922,17 +931,17 @@ var FilterIcon = ({ color }) => /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _re
|
|
|
922
931
|
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" }) });
|
|
923
932
|
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" }) });
|
|
924
933
|
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" }) });
|
|
925
|
-
function DashboardToolbar({ presets =
|
|
934
|
+
function DashboardToolbar({ presets = _chunkXWSPLZNCjs.TIME_PRESETS }) {
|
|
926
935
|
const theme = useDashTheme();
|
|
927
936
|
const { dashboard, rawRange, setRawRange, variables, variableErrors } = useDashboard();
|
|
928
937
|
const [filtersOpen, setFiltersOpen] = _react.useState.call(void 0, false);
|
|
929
938
|
const [rangeOpen, setRangeOpen] = _react.useState.call(void 0, false);
|
|
930
939
|
const [rangeKey, setRangeKey] = _react.useState.call(void 0, 0);
|
|
931
940
|
const custom = !presets.some((p) => rawRange.from === p.from && rawRange.to === p.to);
|
|
932
|
-
const vars =
|
|
941
|
+
const vars = _chunkXWSPLZNCjs.visibleVariables.call(void 0, dashboard);
|
|
933
942
|
const active = vars.filter((v) => {
|
|
934
943
|
const cur = variables[v.name];
|
|
935
|
-
return v.includeAll && cur != null && !(Array.isArray(cur) ? cur.includes(
|
|
944
|
+
return v.includeAll && cur != null && !(Array.isArray(cur) ? cur.includes(_chunkXWSPLZNCjs.ALL) : cur === _chunkXWSPLZNCjs.ALL);
|
|
936
945
|
}).length;
|
|
937
946
|
const hasError = vars.some((v) => variableErrors[v.name]);
|
|
938
947
|
return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _reactnative.View, { style: styles4.toolbar, children: [
|
|
@@ -958,7 +967,7 @@ function DashboardToolbar({ presets = _chunkCU4TMSZEjs.TIME_PRESETS }) {
|
|
|
958
967
|
setRangeOpen(true);
|
|
959
968
|
},
|
|
960
969
|
accessibilityRole: "button",
|
|
961
|
-
accessibilityLabel: custom ? `Time range, ${
|
|
970
|
+
accessibilityLabel: custom ? `Time range, ${_chunkXWSPLZNCjs.describeRange.call(void 0, rawRange)}` : "Custom time range",
|
|
962
971
|
style: ({ pressed }) => [
|
|
963
972
|
custom ? styles4.rangeButton : styles4.iconButton,
|
|
964
973
|
{ borderColor: custom ? theme.accent : theme.border, backgroundColor: theme.surface },
|
|
@@ -966,7 +975,7 @@ function DashboardToolbar({ presets = _chunkCU4TMSZEjs.TIME_PRESETS }) {
|
|
|
966
975
|
],
|
|
967
976
|
children: [
|
|
968
977
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, CalendarIcon, { color: custom ? theme.accent : theme.textSecondary }),
|
|
969
|
-
custom && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _reactnative.Text, { style: [styles4.rangeLabel, { color: theme.accent }], numberOfLines: 1, children:
|
|
978
|
+
custom && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _reactnative.Text, { style: [styles4.rangeLabel, { color: theme.accent }], numberOfLines: 1, children: _chunkXWSPLZNCjs.describeRange.call(void 0, rawRange) })
|
|
970
979
|
]
|
|
971
980
|
}
|
|
972
981
|
),
|
|
@@ -1022,14 +1031,14 @@ function FilterSection({ variable: v, open, onToggle }) {
|
|
|
1022
1031
|
const theme = useDashTheme();
|
|
1023
1032
|
const { variables, variableInfo: variableInfo2, variableErrors, variablesReady, setVariable } = useDashboard();
|
|
1024
1033
|
const current = variables[v.name];
|
|
1025
|
-
const summary =
|
|
1026
|
-
const options = [...v.includeAll ? [{ text: "All", value:
|
|
1034
|
+
const summary = _chunkXWSPLZNCjs.valueText.call(void 0, current, variableInfo2[v.name]) || (variablesReady ? "None" : "\u2026");
|
|
1035
|
+
const options = [...v.includeAll ? [{ text: "All", value: _chunkXWSPLZNCjs.ALL }] : [], ..._nullishCoalesce(_optionalChain([variableInfo2, 'access', _9 => _9[v.name], 'optionalAccess', _10 => _10.options]), () => ( []))];
|
|
1027
1036
|
const error = variableErrors[v.name];
|
|
1028
1037
|
const choose = (value, selected) => {
|
|
1029
|
-
if (v.multi && value !==
|
|
1030
|
-
const cur = (Array.isArray(current) ? current : [current]).filter((c) => c && c !==
|
|
1038
|
+
if (v.multi && value !== _chunkXWSPLZNCjs.ALL) {
|
|
1039
|
+
const cur = (Array.isArray(current) ? current : [current]).filter((c) => c && c !== _chunkXWSPLZNCjs.ALL);
|
|
1031
1040
|
const next = selected ? cur.filter((c) => c !== value) : [...cur, value];
|
|
1032
|
-
setVariable(v.name, next.length ? next : [
|
|
1041
|
+
setVariable(v.name, next.length ? next : [_chunkXWSPLZNCjs.ALL]);
|
|
1033
1042
|
} else {
|
|
1034
1043
|
setVariable(v.name, v.multi ? [value] : value);
|
|
1035
1044
|
if (!v.multi) onToggle();
|
|
@@ -1169,7 +1178,7 @@ function barCategory(panel, frame) {
|
|
|
1169
1178
|
}
|
|
1170
1179
|
function categoryLabels(field) {
|
|
1171
1180
|
if (field.type !== "time") return field.values.map((v) => v == null ? "" : String(v));
|
|
1172
|
-
const times = field.values.map((v) => v == null ? null :
|
|
1181
|
+
const times = field.values.map((v) => v == null ? null : _chunkXWSPLZNCjs.toMillis.call(void 0, v));
|
|
1173
1182
|
let step = Infinity;
|
|
1174
1183
|
times.forEach((t, i) => {
|
|
1175
1184
|
const prev = times[i - 1];
|
|
@@ -1215,19 +1224,19 @@ function formatTooltipTime(t) {
|
|
|
1215
1224
|
return new Date(t).toLocaleString(void 0, { month: "short", day: "numeric", hour: "2-digit", minute: "2-digit" });
|
|
1216
1225
|
}
|
|
1217
1226
|
function styledSeries(panel, frames, scheme) {
|
|
1218
|
-
return styleSeries(panel,
|
|
1227
|
+
return styleSeries(panel, _chunkXWSPLZNCjs.toSeries.call(void 0, frames), frames, scheme);
|
|
1219
1228
|
}
|
|
1220
1229
|
function styledXYSeries(panel, frames, scheme) {
|
|
1221
|
-
const { series, x } =
|
|
1222
|
-
const xConfig = x ?
|
|
1230
|
+
const { series, x } = _chunkXWSPLZNCjs.toXYSeries.call(void 0, frames, _optionalChain([panel, 'access', _18 => _18.options, 'optionalAccess', _19 => _19.xField]) || void 0);
|
|
1231
|
+
const xConfig = x ? _chunkXWSPLZNCjs.resolveFieldConfig.call(void 0, panel, x.field, x.frame, x.field.name) : {};
|
|
1223
1232
|
return { series: styleSeries(panel, series, frames, scheme), xConfig };
|
|
1224
1233
|
}
|
|
1225
1234
|
function styleSeries(panel, series, frames, scheme) {
|
|
1226
1235
|
const frameOf = /* @__PURE__ */ new Map();
|
|
1227
1236
|
frames.forEach((f) => f.fields.forEach((field) => frameOf.set(field, f)));
|
|
1228
1237
|
return series.map((s, i) => {
|
|
1229
|
-
const config =
|
|
1230
|
-
return { ...s, name: _nullishCoalesce(config.displayName, () => ( s.name)), config, color:
|
|
1238
|
+
const config = _chunkXWSPLZNCjs.resolveFieldConfig.call(void 0, panel, s.field, frameOf.get(s.field), s.name);
|
|
1239
|
+
return { ...s, name: _nullishCoalesce(config.displayName, () => ( s.name)), config, color: _chunkXWSPLZNCjs.seriesColor.call(void 0, i, scheme, config) };
|
|
1231
1240
|
});
|
|
1232
1241
|
}
|
|
1233
1242
|
function reducedValues(panel, frames, scheme) {
|
|
@@ -1235,30 +1244,30 @@ function reducedValues(panel, frames, scheme) {
|
|
|
1235
1244
|
const out = [];
|
|
1236
1245
|
const multiple = frames.length > 1;
|
|
1237
1246
|
frames.forEach(
|
|
1238
|
-
(frame, fi) =>
|
|
1239
|
-
const raw =
|
|
1240
|
-
const config =
|
|
1247
|
+
(frame, fi) => _chunkXWSPLZNCjs.numberFields.call(void 0, frame).forEach((field) => {
|
|
1248
|
+
const raw = _chunkXWSPLZNCjs.fieldDisplayName.call(void 0, field, frame, multiple);
|
|
1249
|
+
const config = _chunkXWSPLZNCjs.resolveFieldConfig.call(void 0, panel, field, frame, raw);
|
|
1241
1250
|
const values = field.values.map((v) => v == null ? null : Number(v));
|
|
1242
|
-
const value =
|
|
1243
|
-
const color =
|
|
1244
|
-
const step =
|
|
1245
|
-
const mapped =
|
|
1251
|
+
const value = _chunkXWSPLZNCjs.reduce.call(void 0, values, calc);
|
|
1252
|
+
const color = _chunkXWSPLZNCjs.seriesColor.call(void 0, out.length, scheme, config);
|
|
1253
|
+
const step = _chunkXWSPLZNCjs.thresholdStep.call(void 0, value, config);
|
|
1254
|
+
const mapped = _chunkXWSPLZNCjs.mappedResult.call(void 0, value, config);
|
|
1246
1255
|
out.push({
|
|
1247
1256
|
key: `${fi}/${field.name}/${JSON.stringify(_nullishCoalesce(field.labels, () => ( {})))}`,
|
|
1248
1257
|
name: _nullishCoalesce(config.displayName, () => ( raw)),
|
|
1249
1258
|
value,
|
|
1250
|
-
text: _optionalChain([mapped, 'optionalAccess', _24 => _24.text]) ||
|
|
1259
|
+
text: _optionalChain([mapped, 'optionalAccess', _24 => _24.text]) || _chunkXWSPLZNCjs.formatValue.call(void 0, value, config),
|
|
1251
1260
|
mapped,
|
|
1252
1261
|
config,
|
|
1253
1262
|
color,
|
|
1254
|
-
stateColor: _optionalChain([mapped, 'optionalAccess', _25 => _25.color]) ?
|
|
1263
|
+
stateColor: _optionalChain([mapped, 'optionalAccess', _25 => _25.color]) ? _chunkXWSPLZNCjs.resolveColor.call(void 0, mapped.color, color) : step ? _chunkXWSPLZNCjs.resolveColor.call(void 0, step.color, color) : color,
|
|
1255
1264
|
sparkline: values,
|
|
1256
1265
|
field,
|
|
1257
1266
|
frame
|
|
1258
1267
|
});
|
|
1259
1268
|
})
|
|
1260
1269
|
);
|
|
1261
|
-
return
|
|
1270
|
+
return _chunkXWSPLZNCjs.uniqueNames.call(void 0, out, (v) => v.field, frames);
|
|
1262
1271
|
}
|
|
1263
1272
|
function yDomain(series, includeZero) {
|
|
1264
1273
|
let min = Infinity;
|
|
@@ -1319,22 +1328,22 @@ function NoData({ message = "No data" }) {
|
|
|
1319
1328
|
}
|
|
1320
1329
|
function rowTooltipItems(panel, frame, row, multiple) {
|
|
1321
1330
|
return frame.fields.flatMap((f) => {
|
|
1322
|
-
const name =
|
|
1323
|
-
const config =
|
|
1331
|
+
const name = _chunkXWSPLZNCjs.fieldDisplayName.call(void 0, f, frame, multiple);
|
|
1332
|
+
const config = _chunkXWSPLZNCjs.resolveFieldConfig.call(void 0, panel, f, frame, name);
|
|
1324
1333
|
if (_optionalChain([config, 'access', _36 => _36.custom, 'optionalAccess', _37 => _37.hideFrom, 'optionalAccess', _38 => _38.tooltip])) return [];
|
|
1325
1334
|
const v = f.values[row];
|
|
1326
|
-
const value = v == null ? "\u2014" : f.type === "number" ?
|
|
1335
|
+
const value = v == null ? "\u2014" : f.type === "number" ? _chunkXWSPLZNCjs.formatDisplay.call(void 0, Number(v), config) : f.type === "time" ? formatTooltipTime(_chunkXWSPLZNCjs.toMillis.call(void 0, v)) : String(v);
|
|
1327
1336
|
return [{ name: _nullishCoalesce(config.displayName, () => ( name)), value }];
|
|
1328
1337
|
});
|
|
1329
1338
|
}
|
|
1330
1339
|
function rowLinks(panel, frame, row, multiple, resolve) {
|
|
1331
1340
|
return mergeLinks(
|
|
1332
1341
|
frame.fields.flatMap((f) => {
|
|
1333
|
-
const name =
|
|
1334
|
-
const config =
|
|
1342
|
+
const name = _chunkXWSPLZNCjs.fieldDisplayName.call(void 0, f, frame, multiple);
|
|
1343
|
+
const config = _chunkXWSPLZNCjs.resolveFieldConfig.call(void 0, panel, f, frame, name);
|
|
1335
1344
|
if (!_optionalChain([config, 'access', _39 => _39.links, 'optionalAccess', _40 => _40.length])) return [];
|
|
1336
1345
|
const v = f.values[row];
|
|
1337
|
-
const text = v == null ? void 0 : f.type === "number" ?
|
|
1346
|
+
const text = v == null ? void 0 : f.type === "number" ? _chunkXWSPLZNCjs.formatDisplay.call(void 0, Number(v), config) : String(v);
|
|
1338
1347
|
return [{ name: _nullishCoalesce(config.displayName, () => ( name)), links: resolve(config.links, { frame, row, field: f, fieldName: _nullishCoalesce(config.displayName, () => ( name)), value: v, text }) }];
|
|
1339
1348
|
})
|
|
1340
1349
|
);
|
|
@@ -1347,7 +1356,7 @@ function valueLinks(panel, v, resolve) {
|
|
|
1347
1356
|
fieldName: v.name,
|
|
1348
1357
|
seriesName: v.name,
|
|
1349
1358
|
value: v.value,
|
|
1350
|
-
text:
|
|
1359
|
+
text: _chunkXWSPLZNCjs.formatValue.call(void 0, v.value, v.config),
|
|
1351
1360
|
calc: _nullishCoalesce(_optionalChain([panel, 'access', _44 => _44.options, 'optionalAccess', _45 => _45.reduceOptions, 'optionalAccess', _46 => _46.calcs, 'optionalAccess', _47 => _47[0]]), () => ( "lastNotNull"))
|
|
1352
1361
|
});
|
|
1353
1362
|
}
|
|
@@ -1422,6 +1431,15 @@ var styles5 = _reactnative.StyleSheet.create({
|
|
|
1422
1431
|
|
|
1423
1432
|
|
|
1424
1433
|
var listening = null;
|
|
1434
|
+
function stopListening() {
|
|
1435
|
+
_optionalChain([listening, 'optionalAccess', _55 => _55.abort, 'call', _56 => _56()]);
|
|
1436
|
+
listening = null;
|
|
1437
|
+
}
|
|
1438
|
+
function claimListening(session, done = false) {
|
|
1439
|
+
if (done) {
|
|
1440
|
+
if (listening === session) listening = null;
|
|
1441
|
+
} else listening = session;
|
|
1442
|
+
}
|
|
1425
1443
|
var HINT_MS = 4e3;
|
|
1426
1444
|
function useDictation(panel, value, onChange, choices) {
|
|
1427
1445
|
const form = useInputForm();
|
|
@@ -1435,7 +1453,7 @@ function useDictation(panel, value, onChange, choices) {
|
|
|
1435
1453
|
});
|
|
1436
1454
|
_react.useEffect.call(void 0,
|
|
1437
1455
|
() => () => {
|
|
1438
|
-
_optionalChain([session, 'access',
|
|
1456
|
+
_optionalChain([session, 'access', _57 => _57.current, 'optionalAccess', _58 => _58.abort, 'call', _59 => _59()]);
|
|
1439
1457
|
},
|
|
1440
1458
|
[]
|
|
1441
1459
|
);
|
|
@@ -1450,23 +1468,23 @@ function useDictation(panel, value, onChange, choices) {
|
|
|
1450
1468
|
session.current.stop();
|
|
1451
1469
|
return;
|
|
1452
1470
|
}
|
|
1453
|
-
|
|
1471
|
+
stopListening();
|
|
1454
1472
|
setHint(null);
|
|
1455
1473
|
let mine = null;
|
|
1456
1474
|
let ended = false;
|
|
1457
1475
|
const end = () => {
|
|
1458
1476
|
ended = true;
|
|
1459
1477
|
if (session.current === mine) session.current = null;
|
|
1460
|
-
|
|
1478
|
+
claimListening(mine, true);
|
|
1461
1479
|
setOn(false);
|
|
1462
1480
|
};
|
|
1463
1481
|
try {
|
|
1464
1482
|
mine = speech.start({
|
|
1465
1483
|
lang: form.speechLang,
|
|
1466
|
-
hints:
|
|
1484
|
+
hints: _chunkXWSPLZNCjs.dictationHints.call(void 0, panel, choices),
|
|
1467
1485
|
onText(text, final) {
|
|
1468
1486
|
if (!final) return setHint(text ? `\u201C${text}\u201D` : null);
|
|
1469
|
-
const result =
|
|
1487
|
+
const result = _chunkXWSPLZNCjs.spokenValue.call(void 0, panel, text, latest.current.value, latest.current.choices);
|
|
1470
1488
|
if ("value" in result) {
|
|
1471
1489
|
latest.current.onChange(result.value);
|
|
1472
1490
|
setHint(null);
|
|
@@ -1481,13 +1499,13 @@ function useDictation(panel, value, onChange, choices) {
|
|
|
1481
1499
|
}
|
|
1482
1500
|
if (!ended) {
|
|
1483
1501
|
session.current = mine;
|
|
1484
|
-
|
|
1502
|
+
claimListening(mine);
|
|
1485
1503
|
setOn(true);
|
|
1486
1504
|
}
|
|
1487
1505
|
};
|
|
1488
|
-
return { available: !!speech &&
|
|
1506
|
+
return { available: !!speech && _chunkXWSPLZNCjs.takesDictation.call(void 0, panel), listening: on, hint, toggle };
|
|
1489
1507
|
}
|
|
1490
|
-
function MicButton({ dictation, title, size = 32 }) {
|
|
1508
|
+
function MicButton({ dictation, title, label, size = 32 }) {
|
|
1491
1509
|
const theme = useDashTheme();
|
|
1492
1510
|
if (!dictation.available) return null;
|
|
1493
1511
|
const on = dictation.listening;
|
|
@@ -1496,7 +1514,7 @@ function MicButton({ dictation, title, size = 32 }) {
|
|
|
1496
1514
|
{
|
|
1497
1515
|
onPress: dictation.toggle,
|
|
1498
1516
|
accessibilityRole: "button",
|
|
1499
|
-
accessibilityLabel: on ? "Stop dictating" : title ? `Dictate ${title}` : "Dictate",
|
|
1517
|
+
accessibilityLabel: on ? "Stop dictating" : _nullishCoalesce(label, () => ( (title ? `Dictate ${title}` : "Dictate"))),
|
|
1500
1518
|
accessibilityState: { selected: on },
|
|
1501
1519
|
hitSlop: 6,
|
|
1502
1520
|
style: ({ pressed }) => [
|
|
@@ -1602,15 +1620,15 @@ function NumberInput({ panel, value, onChange }) {
|
|
|
1602
1620
|
}
|
|
1603
1621
|
function DurationInput({ panel, value, onChange }) {
|
|
1604
1622
|
const theme = useDashTheme();
|
|
1605
|
-
const toDigits = (v) => typeof v === "number" ?
|
|
1623
|
+
const toDigits = (v) => typeof v === "number" ? _chunkXWSPLZNCjs.formatClock.call(void 0, v).replace(/\D/g, "").replace(/^0+/, "") : "";
|
|
1606
1624
|
const [digits, setDigits] = _react.useState.call(void 0, toDigits(value));
|
|
1607
1625
|
const [syncedValue, setSyncedValue] = _react.useState.call(void 0, value);
|
|
1608
1626
|
if (value !== syncedValue) {
|
|
1609
1627
|
setSyncedValue(value);
|
|
1610
|
-
setDigits((d) => value == null ?
|
|
1628
|
+
setDigits((d) => value == null ? _chunkXWSPLZNCjs.parseClockDigits.call(void 0, d) == null ? d : "" : _chunkXWSPLZNCjs.parseClockDigits.call(void 0, d) === value ? d : toDigits(value));
|
|
1611
1629
|
}
|
|
1612
1630
|
const masked = digits ? maskClock(digits) : "";
|
|
1613
|
-
const invalid = !!digits &&
|
|
1631
|
+
const invalid = !!digits && _chunkXWSPLZNCjs.parseClockDigits.call(void 0, digits) == null;
|
|
1614
1632
|
const dictation = useDictation(panel, value, onChange);
|
|
1615
1633
|
return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _reactnative.View, { style: styles7.dictated, children: [
|
|
1616
1634
|
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _reactnative.View, { style: [styles7.numberField, { borderColor: invalid ? theme.danger : theme.border }], children: [
|
|
@@ -1621,7 +1639,7 @@ function DurationInput({ panel, value, onChange }) {
|
|
|
1621
1639
|
onChangeText: (t) => {
|
|
1622
1640
|
const d = t.replace(/\D/g, "").replace(/^0+/, "").slice(0, 6);
|
|
1623
1641
|
setDigits(d);
|
|
1624
|
-
onChange(
|
|
1642
|
+
onChange(_chunkXWSPLZNCjs.parseClockDigits.call(void 0, d));
|
|
1625
1643
|
},
|
|
1626
1644
|
keyboardType: "number-pad",
|
|
1627
1645
|
placeholder: _nullishCoalesce(panel.options.placeholder, () => ( "00:00.00")),
|
|
@@ -1826,10 +1844,10 @@ function SuggestTextInput({ panel, value, onChange }) {
|
|
|
1826
1844
|
}, [store, metric, suggestWith]);
|
|
1827
1845
|
const withText = suggestWith ? form.value(suggestWith) : null;
|
|
1828
1846
|
const own = entries.filter((e) => e.metric === metric);
|
|
1829
|
-
const scoped = suggestWith && typeof withText === "string" && withText.trim() ?
|
|
1847
|
+
const scoped = suggestWith && typeof withText === "string" && withText.trim() ? _chunkXWSPLZNCjs.entriesSavedWith.call(void 0, entries, metric, suggestWith, withText) : [];
|
|
1830
1848
|
const query = typed ? text : "";
|
|
1831
|
-
const fromScoped =
|
|
1832
|
-
const suggestions = (fromScoped.length ? fromScoped :
|
|
1849
|
+
const fromScoped = _chunkXWSPLZNCjs.textSuggestions.call(void 0, scoped, query);
|
|
1850
|
+
const suggestions = (fromScoped.length ? fromScoped : _chunkXWSPLZNCjs.textSuggestions.call(void 0, own, query)).filter((s) => s.toLowerCase() !== text.trim().toLowerCase());
|
|
1833
1851
|
const dictation = useDictation(panel, value, (v) => {
|
|
1834
1852
|
setTyped(false);
|
|
1835
1853
|
onChange(v);
|
|
@@ -1876,7 +1894,7 @@ function CounterInput({ panel }) {
|
|
|
1876
1894
|
const { metric, increment = 1, unit } = panel.options;
|
|
1877
1895
|
const [today, setToday] = _react.useState.call(void 0, 0);
|
|
1878
1896
|
_react.useEffect.call(void 0, () => {
|
|
1879
|
-
const load = () => store.list({ metrics: [metric], from:
|
|
1897
|
+
const load = () => store.list({ metrics: [metric], from: _chunkXWSPLZNCjs.startOf.call(void 0, /* @__PURE__ */ new Date(), "d").getTime() }).then((rows) => setToday(rows.reduce((a, e) => a + (_nullishCoalesce(e.value, () => ( 0))), 0)));
|
|
1880
1898
|
load();
|
|
1881
1899
|
return store.subscribe(load);
|
|
1882
1900
|
}, [store, metric]);
|
|
@@ -1958,7 +1976,7 @@ function titleText(v) {
|
|
|
1958
1976
|
function summaryText(f, v) {
|
|
1959
1977
|
if (v == null || v === "" || Array.isArray(v) && !v.length) return void 0;
|
|
1960
1978
|
if (f.type === "input-toggle") return v ? f.title || "Yes" : void 0;
|
|
1961
|
-
if (f.type === "input-duration" && typeof v === "number") return
|
|
1979
|
+
if (f.type === "input-duration" && typeof v === "number") return _chunkXWSPLZNCjs.formatClock.call(void 0, v);
|
|
1962
1980
|
if (f.type === "input-select" && f.options.choices) {
|
|
1963
1981
|
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)));
|
|
1964
1982
|
return Array.isArray(v) ? v.map(label).join(", ") : label(v);
|
|
@@ -1989,7 +2007,7 @@ function InputGroupBody({ panel }) {
|
|
|
1989
2007
|
}
|
|
1990
2008
|
if (!group) return null;
|
|
1991
2009
|
const label = panel.options.itemTitle || "Item";
|
|
1992
|
-
const collapseFilled = (except) => setCollapsed(new Set(group.items.filter((i) => i.key !== except && !
|
|
2010
|
+
const collapseFilled = (except) => setCollapsed(new Set(group.items.filter((i) => i.key !== except && !_chunkXWSPLZNCjs.isEmptyItem.call(void 0, panel, i.values)).map((i) => i.key)));
|
|
1993
2011
|
const toggle = (key) => setCollapsed((c) => {
|
|
1994
2012
|
const next = new Set(c);
|
|
1995
2013
|
if (!next.delete(key)) next.add(key);
|
|
@@ -2027,7 +2045,7 @@ function InputGroupBody({ panel }) {
|
|
|
2027
2045
|
group.items.map((item, i) => {
|
|
2028
2046
|
const named = panel.options.titleFrom ? titleText(item.values[panel.options.titleFrom]) : void 0;
|
|
2029
2047
|
const title = _nullishCoalesce(named, () => ( `${label} ${i + 1}`));
|
|
2030
|
-
const troubled =
|
|
2048
|
+
const troubled = _chunkXWSPLZNCjs.groupFields.call(void 0, panel).some((f) => group.fieldProblem(i, f.options.metric));
|
|
2031
2049
|
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
2032
2050
|
ItemCard,
|
|
2033
2051
|
{
|
|
@@ -2078,7 +2096,7 @@ function InputGroupBody({ panel }) {
|
|
|
2078
2096
|
}
|
|
2079
2097
|
function ItemCard({ panel, group, form, index, title, last, collapsed, onToggle, onDuplicate, dragOffset, lifted, onLayout, handle }) {
|
|
2080
2098
|
const theme = useDashTheme();
|
|
2081
|
-
const fields = _react.useMemo.call(void 0, () =>
|
|
2099
|
+
const fields = _react.useMemo.call(void 0, () => _chunkXWSPLZNCjs.groupFields.call(void 0, panel), [panel]);
|
|
2082
2100
|
const item = group.items[index];
|
|
2083
2101
|
const scoped = _react.useMemo.call(void 0,
|
|
2084
2102
|
() => ({
|
|
@@ -2298,7 +2316,7 @@ function BarGaugePanel({ panel, frames }) {
|
|
|
2298
2316
|
const min = _nullishCoalesce(v.config.min, () => ( 0));
|
|
2299
2317
|
const max = _nullishCoalesce(v.config.max, () => ( Math.max(...values.map((o) => _nullishCoalesce(o.value, () => ( 0))), 1)));
|
|
2300
2318
|
const frac = v.value == null ? 0 : Math.min(1, Math.max(0, (v.value - min) / (max - min || 1)));
|
|
2301
|
-
const color = v.config.thresholds || _optionalChain([v, 'access', _88 => _88.mapped, 'optionalAccess', _89 => _89.color]) ? v.stateColor :
|
|
2319
|
+
const color = v.config.thresholds || _optionalChain([v, 'access', _88 => _88.mapped, 'optionalAccess', _89 => _89.color]) ? v.stateColor : _chunkXWSPLZNCjs.resolveColor.call(void 0, _optionalChain([v, 'access', _90 => _90.config, 'access', _91 => _91.color, 'optionalAccess', _92 => _92.fixedColor]), v.color);
|
|
2302
2320
|
const hasLinks = !!_optionalChain([v, 'access', _93 => _93.config, 'access', _94 => _94.links, 'optionalAccess', _95 => _95.length]);
|
|
2303
2321
|
return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0,
|
|
2304
2322
|
_reactnative.Pressable,
|
|
@@ -2479,7 +2497,7 @@ function geomapLayers(panel, frames, scheme, retina = false, gazetteers = {}) {
|
|
|
2479
2497
|
const color = _nullishCoalesce(style.color, () => ( {}));
|
|
2480
2498
|
const size = _nullishCoalesce(style.size, () => ( {}));
|
|
2481
2499
|
const text = style.text;
|
|
2482
|
-
const fixedColor =
|
|
2500
|
+
const fixedColor = _chunkXWSPLZNCjs.resolveColor.call(void 0, _nullishCoalesce(color.fixed, () => ( "dark-green")), "#37872D");
|
|
2483
2501
|
const heat = layer.type === "heatmap";
|
|
2484
2502
|
const weight = _nullishCoalesce(config.weight, () => ( {}));
|
|
2485
2503
|
const legend = [];
|
|
@@ -2491,14 +2509,14 @@ function geomapLayers(panel, frames, scheme, retina = false, gazetteers = {}) {
|
|
|
2491
2509
|
let { xs, ys } = located;
|
|
2492
2510
|
if (layer.type === "lastPointTracker" && rows.length) [rows, xs, ys] = [rows.slice(-1), xs.slice(-1), ys.slice(-1)];
|
|
2493
2511
|
const find = (field) => field ? fieldByName(frame, field, multiple) : void 0;
|
|
2494
|
-
const configOf = (f) =>
|
|
2512
|
+
const configOf = (f) => _chunkXWSPLZNCjs.resolveFieldConfig.call(void 0, panel, f, frame, _chunkXWSPLZNCjs.fieldDisplayName.call(void 0, f, frame, multiple));
|
|
2495
2513
|
let colors = rows.map(() => fixedColor);
|
|
2496
2514
|
const colorField = !heat ? find(color.field) : void 0;
|
|
2497
2515
|
if (colorField) {
|
|
2498
2516
|
const cConfig = configOf(colorField);
|
|
2499
2517
|
const values = rows.map((i) => num(colorField.values[i]));
|
|
2500
2518
|
const extent = range(values);
|
|
2501
|
-
colors = values.map((v) =>
|
|
2519
|
+
colors = values.map((v) => _chunkXWSPLZNCjs.valueColor.call(void 0, v, cConfig, fixedColor, extent));
|
|
2502
2520
|
if (showsLegend(layer) && legend.length === 0) legend.push(...thresholdLegend(`${key}/${frames.indexOf(frame)}`, cConfig, fixedColor));
|
|
2503
2521
|
}
|
|
2504
2522
|
const dim = heat ? weight : size;
|
|
@@ -2556,8 +2574,8 @@ function thresholdLegend(key, config, fallback) {
|
|
|
2556
2574
|
if (steps.length < 2) return [];
|
|
2557
2575
|
return steps.map((s, i) => ({
|
|
2558
2576
|
key: `${key}/${i}`,
|
|
2559
|
-
name: s.value == null ? `< ${
|
|
2560
|
-
color:
|
|
2577
|
+
name: s.value == null ? `< ${_chunkXWSPLZNCjs.formatValue.call(void 0, steps[i + 1].value, config)}` : `${_chunkXWSPLZNCjs.formatValue.call(void 0, s.value, config)}+`,
|
|
2578
|
+
color: _chunkXWSPLZNCjs.resolveColor.call(void 0, s.color, fallback)
|
|
2561
2579
|
}));
|
|
2562
2580
|
}
|
|
2563
2581
|
var isDataLayer = (type) => type === "markers" || type === "heatmap" || type === "route" || type === "lastPointTracker";
|
|
@@ -2567,15 +2585,15 @@ function gazetteerPaths(panel, frames) {
|
|
|
2567
2585
|
for (const layer of _nullishCoalesce(_optionalChain([panel, 'access', _113 => _113.options, 'optionalAccess', _114 => _114.layers]), () => ( DEFAULT_LAYERS))) {
|
|
2568
2586
|
if (!isDataLayer(layer.type)) continue;
|
|
2569
2587
|
const mode = _nullishCoalesce(_optionalChain([layer, 'access', _115 => _115.location, 'optionalAccess', _116 => _116.mode]), () => ( "auto"));
|
|
2570
|
-
if (mode === "lookup") paths.add(_optionalChain([layer, 'access', _117 => _117.location, 'optionalAccess', _118 => _118.gazetteer]) ||
|
|
2571
|
-
else if (mode === "auto" && frames.some(lookupField)) paths.add(
|
|
2588
|
+
if (mode === "lookup") paths.add(_optionalChain([layer, 'access', _117 => _117.location, 'optionalAccess', _118 => _118.gazetteer]) || _chunkXWSPLZNCjs.DEFAULT_GAZETTEER);
|
|
2589
|
+
else if (mode === "auto" && frames.some(lookupField)) paths.add(_chunkXWSPLZNCjs.DEFAULT_GAZETTEER);
|
|
2572
2590
|
}
|
|
2573
2591
|
return [...paths];
|
|
2574
2592
|
}
|
|
2575
2593
|
var LAT_NAMES = ["lat", "latitude"];
|
|
2576
2594
|
var LON_NAMES = ["lon", "lng", "long", "longitude"];
|
|
2577
2595
|
function fieldByName(frame, name, multiple) {
|
|
2578
|
-
return _nullishCoalesce(frame.fields.find((f) => f.name === name), () => ( frame.fields.find((f) =>
|
|
2596
|
+
return _nullishCoalesce(frame.fields.find((f) => f.name === name), () => ( frame.fields.find((f) => _chunkXWSPLZNCjs.fieldDisplayName.call(void 0, f, frame, multiple) === name)));
|
|
2579
2597
|
}
|
|
2580
2598
|
function locate2(frame, location = {}, gazetteers = {}) {
|
|
2581
2599
|
const mode = _nullishCoalesce(location.mode, () => ( "auto"));
|
|
@@ -2594,10 +2612,10 @@ function locate2(frame, location = {}, gazetteers = {}) {
|
|
|
2594
2612
|
lat = named(LAT_NAMES);
|
|
2595
2613
|
lon = named(LON_NAMES);
|
|
2596
2614
|
if (!lat || !lon) hash = named(["geohash"]);
|
|
2597
|
-
if ((!lat || !lon) && !hash) [lookup, gazetteer] = [lookupField(frame), gazetteers[
|
|
2615
|
+
if ((!lat || !lon) && !hash) [lookup, gazetteer] = [lookupField(frame), gazetteers[_chunkXWSPLZNCjs.DEFAULT_GAZETTEER]];
|
|
2598
2616
|
} else if (mode === "lookup") {
|
|
2599
2617
|
lookup = location.lookup ? fieldByName(frame, location.lookup, false) : lookupField(frame);
|
|
2600
|
-
gazetteer = gazetteers[location.gazetteer ||
|
|
2618
|
+
gazetteer = gazetteers[location.gazetteer || _chunkXWSPLZNCjs.DEFAULT_GAZETTEER];
|
|
2601
2619
|
}
|
|
2602
2620
|
const rows = [];
|
|
2603
2621
|
const xs = [];
|
|
@@ -2646,8 +2664,8 @@ function decodeGeohash(hash) {
|
|
|
2646
2664
|
}
|
|
2647
2665
|
function cellText(field, v, config) {
|
|
2648
2666
|
if (v == null) return "";
|
|
2649
|
-
if (field.type === "number") return
|
|
2650
|
-
if (field.type === "time") return new Date(
|
|
2667
|
+
if (field.type === "number") return _chunkXWSPLZNCjs.formatDisplay.call(void 0, Number(v), config);
|
|
2668
|
+
if (field.type === "time") return new Date(_chunkXWSPLZNCjs.toMillis.call(void 0, v)).toLocaleString();
|
|
2651
2669
|
return String(v);
|
|
2652
2670
|
}
|
|
2653
2671
|
function num(v) {
|
|
@@ -2897,11 +2915,11 @@ function useGazetteers(panel, frames) {
|
|
|
2897
2915
|
let live = true;
|
|
2898
2916
|
let ds;
|
|
2899
2917
|
try {
|
|
2900
|
-
ds = _optionalChain([resolve, 'optionalCall', _128 => _128(
|
|
2918
|
+
ds = _optionalChain([resolve, 'optionalCall', _128 => _128(_chunkXWSPLZNCjs.normalizeRef.call(void 0, panel.datasource))]);
|
|
2901
2919
|
} catch (e6) {
|
|
2902
2920
|
}
|
|
2903
2921
|
const paths = key.split("\n");
|
|
2904
|
-
Promise.allSettled(paths.map((p) =>
|
|
2922
|
+
Promise.allSettled(paths.map((p) => _chunkXWSPLZNCjs.loadGazetteer.call(void 0, p, ds))).then((results) => {
|
|
2905
2923
|
if (!live) return;
|
|
2906
2924
|
const gazetteers = {};
|
|
2907
2925
|
const errors = [];
|
|
@@ -3044,8 +3062,8 @@ function cellType(config) {
|
|
|
3044
3062
|
}
|
|
3045
3063
|
function tableColumns(panel, frame, multipleFrames = false) {
|
|
3046
3064
|
return frame.fields.flatMap((field, i) => {
|
|
3047
|
-
const raw =
|
|
3048
|
-
const config =
|
|
3065
|
+
const raw = _chunkXWSPLZNCjs.fieldDisplayName.call(void 0, field, frame, multipleFrames);
|
|
3066
|
+
const config = _chunkXWSPLZNCjs.resolveFieldConfig.call(void 0, panel, field, frame, raw);
|
|
3049
3067
|
const custom = _nullishCoalesce(config.custom, () => ( {}));
|
|
3050
3068
|
if (custom.hidden || _optionalChain([custom, 'access', _138 => _138.hideFrom, 'optionalAccess', _139 => _139.viz])) return [];
|
|
3051
3069
|
const numeric = field.type === "number";
|
|
@@ -3088,16 +3106,16 @@ function tableFooter(columns) {
|
|
|
3088
3106
|
counted = true;
|
|
3089
3107
|
return [{ label: "Count", text: String(c.field.values.length) }];
|
|
3090
3108
|
}
|
|
3091
|
-
if (!
|
|
3092
|
-
const label =
|
|
3109
|
+
if (!_chunkXWSPLZNCjs.isReducer.call(void 0, r)) return [];
|
|
3110
|
+
const label = _chunkXWSPLZNCjs.REDUCER_LABELS[r];
|
|
3093
3111
|
if (r === "count") return [{ label, text: String(c.field.values.length) }];
|
|
3094
3112
|
if (c.field.type !== "number") {
|
|
3095
3113
|
if (r === "distinctCount") return [{ label, text: String(new Set(c.field.values.filter((v) => v != null)).size) }];
|
|
3096
3114
|
return [];
|
|
3097
3115
|
}
|
|
3098
|
-
const value =
|
|
3116
|
+
const value = _chunkXWSPLZNCjs.reduce.call(void 0, c.field.values.map((v) => v == null ? null : Number(v)), r);
|
|
3099
3117
|
const counts = r === "distinctCount" || r === "changeCount";
|
|
3100
|
-
return [{ label, text: counts ? String(_nullishCoalesce(value, () => ( 0))) :
|
|
3118
|
+
return [{ label, text: counts ? String(_nullishCoalesce(value, () => ( 0))) : _chunkXWSPLZNCjs.formatValue.call(void 0, value, c.config) }];
|
|
3101
3119
|
});
|
|
3102
3120
|
return lines.length === 1 && lines[0].label !== "Count" ? [{ text: lines[0].text }] : lines;
|
|
3103
3121
|
});
|
|
@@ -3116,13 +3134,13 @@ function extentOf(values) {
|
|
|
3116
3134
|
}
|
|
3117
3135
|
function cellDisplay(col, raw, fallbackColor) {
|
|
3118
3136
|
const { config, field } = col;
|
|
3119
|
-
const mapped =
|
|
3137
|
+
const mapped = _chunkXWSPLZNCjs.mappedResult.call(void 0, raw, config);
|
|
3120
3138
|
const num4 = field.type === "number" && raw != null && Number.isFinite(Number(raw)) ? Number(raw) : null;
|
|
3121
|
-
const text = _nullishCoalesce(_optionalChain([mapped, 'optionalAccess', _153 => _153.text]), () => ( (raw == null ? _nullishCoalesce(config.noValue, () => ( "")) : field.type === "number" ?
|
|
3139
|
+
const text = _nullishCoalesce(_optionalChain([mapped, 'optionalAccess', _153 => _153.text]), () => ( (raw == null ? _nullishCoalesce(config.noValue, () => ( "")) : field.type === "number" ? _chunkXWSPLZNCjs.formatValue.call(void 0, num4, config) : field.type === "time" ? new Date(_chunkXWSPLZNCjs.toMillis.call(void 0, raw)).toLocaleString() : String(raw))));
|
|
3122
3140
|
if (col.cellType === "auto") return { text };
|
|
3123
3141
|
const mode = _optionalChain([config, 'access', _154 => _154.color, 'optionalAccess', _155 => _155.mode]);
|
|
3124
|
-
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([
|
|
3125
|
-
const color = named === "text" ? void 0 : _optionalChain([mapped, 'optionalAccess', _160 => _160.color]) ?
|
|
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([_chunkXWSPLZNCjs.thresholdStep.call(void 0, num4, config), 'optionalAccess', _159 => _159.color]) : void 0)));
|
|
3143
|
+
const color = named === "text" ? void 0 : _optionalChain([mapped, 'optionalAccess', _160 => _160.color]) ? _chunkXWSPLZNCjs.resolveColor.call(void 0, mapped.color, fallbackColor) : num4 == null ? void 0 : _chunkXWSPLZNCjs.valueColor.call(void 0, num4, config, fallbackColor, col.extent);
|
|
3126
3144
|
if (col.cellType === "color-text") return { text, color };
|
|
3127
3145
|
if (col.cellType === "color-background") return { text, background: color };
|
|
3128
3146
|
const min = _nullishCoalesce(config.min, () => ( Math.min(0, _nullishCoalesce(_optionalChain([col, 'access', _161 => _161.extent, 'optionalAccess', _162 => _162[0]]), () => ( 0)))));
|
|
@@ -3153,7 +3171,7 @@ function sortedRows(columns, length, sort) {
|
|
|
3153
3171
|
if (!col) return rows;
|
|
3154
3172
|
const { field } = col;
|
|
3155
3173
|
const dir = sort.desc ? -1 : 1;
|
|
3156
|
-
const key = (v) => field.type === "time" ?
|
|
3174
|
+
const key = (v) => field.type === "time" ? _chunkXWSPLZNCjs.toMillis.call(void 0, v) : field.type === "number" || field.type === "boolean" ? Number(v) : v;
|
|
3157
3175
|
const empty = (v) => v == null || v === "" || typeof v === "number" && Number.isNaN(v);
|
|
3158
3176
|
return rows.sort((a, b) => {
|
|
3159
3177
|
const va = field.values[a];
|
|
@@ -3219,8 +3237,8 @@ function TablePanel({ panel, frames }) {
|
|
|
3219
3237
|
const columns = _react.useMemo.call(void 0, () => frame ? tableColumns(panel, frame, frames.length > 1) : [], [panel, frame, frames.length]);
|
|
3220
3238
|
const [tapped, setSort] = _react.useState.call(void 0, );
|
|
3221
3239
|
const sort = tapped === void 0 ? initialSort(panel, columns) : tapped;
|
|
3222
|
-
const order = _react.useMemo.call(void 0, () => sortedRows(columns, frame ?
|
|
3223
|
-
if (!frame || !
|
|
3240
|
+
const order = _react.useMemo.call(void 0, () => sortedRows(columns, frame ? _chunkXWSPLZNCjs.frameLength.call(void 0, frame) : 0, sort), [columns, frame, sort]);
|
|
3241
|
+
if (!frame || !_chunkXWSPLZNCjs.frameLength.call(void 0, frame)) return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, NoData, {});
|
|
3224
3242
|
const shown = order.slice(0, 500);
|
|
3225
3243
|
const rowColumn = columns.find((c) => c.applyToRow);
|
|
3226
3244
|
const footer = tableFooter(columns);
|
|
@@ -3320,7 +3338,7 @@ function BarChartPanel({ panel, frames, width }) {
|
|
|
3320
3338
|
{
|
|
3321
3339
|
style: [styles12.tick, { color: theme.textMuted, top: plot.height * (1 - barFraction(axis, t)) - 7 }, axis.side === "left" ? styles12.tickLeft : styles12.tickRight],
|
|
3322
3340
|
numberOfLines: 1,
|
|
3323
|
-
children:
|
|
3341
|
+
children: _chunkXWSPLZNCjs.formatValue.call(void 0, t, { ...axis.config, decimals: tickDecimals(axis.ticks) })
|
|
3324
3342
|
},
|
|
3325
3343
|
t
|
|
3326
3344
|
)) });
|
|
@@ -3446,7 +3464,7 @@ function TimeSeriesPanel({ panel, frames }) {
|
|
|
3446
3464
|
const y = linearScale(yMin, yMax, PAD.top + plotH, PAD.top);
|
|
3447
3465
|
const span = xTo - xFrom;
|
|
3448
3466
|
const xTicks = numericX ? numberTicks(xFrom, xTo, plotW) : timeTicks(xFrom, xTo, plotW);
|
|
3449
|
-
const xLabel = (t) => numericX ?
|
|
3467
|
+
const xLabel = (t) => numericX ? _chunkXWSPLZNCjs.formatValue.call(void 0, t, { ...xConfig, decimals: tickDecimals(xTicks) }) : formatTimeTick(t, span);
|
|
3450
3468
|
const unitConfig = series[0].config;
|
|
3451
3469
|
const barSeries = series.filter((s) => style(s) === "bars");
|
|
3452
3470
|
const pointsCount = Math.max(...series.map((s) => s.times.length));
|
|
@@ -3464,11 +3482,11 @@ function TimeSeriesPanel({ panel, frames }) {
|
|
|
3464
3482
|
if (!pinch.current) pinch.current = { start: { from: xFrom, to: xTo }, dist, frac };
|
|
3465
3483
|
const p = pinch.current;
|
|
3466
3484
|
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) };
|
|
3467
|
-
setPreview(
|
|
3485
|
+
setPreview(_chunkXWSPLZNCjs.zoomRange.call(void 0, p.start, dist / p.dist, p.frac, frac, limits));
|
|
3468
3486
|
};
|
|
3469
3487
|
const onPinchEnd = (commit) => {
|
|
3470
3488
|
if (commit && pinch.current && preview) {
|
|
3471
|
-
if (!extent) setRawRange({ from:
|
|
3489
|
+
if (!extent) setRawRange({ from: _chunkXWSPLZNCjs.formatLocalDateTime.call(void 0, preview.from), to: _chunkXWSPLZNCjs.formatLocalDateTime.call(void 0, preview.to) });
|
|
3472
3490
|
else setXZoom(preview.to - preview.from >= extent[1] - extent[0] ? null : preview);
|
|
3473
3491
|
}
|
|
3474
3492
|
pinch.current = null;
|
|
@@ -3523,7 +3541,7 @@ function TimeSeriesPanel({ panel, frames }) {
|
|
|
3523
3541
|
size.width > 0 && /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _reactnativesvg2.default, { width: size.width, height: size.height, children: [
|
|
3524
3542
|
ticks.map((t) => /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _reactnativesvg.G, { children: [
|
|
3525
3543
|
/* @__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 }),
|
|
3526
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _reactnativesvg.Text, { x: PAD.left - 6, y: y(t) + 3, fontSize: 10, fill: theme.textMuted, textAnchor: "end", children:
|
|
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: _chunkXWSPLZNCjs.formatValue.call(void 0, t, { ...unitConfig, decimals: tickDecimals(ticks) }) })
|
|
3527
3545
|
] }, t)),
|
|
3528
3546
|
xTicks.map((t) => /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
3529
3547
|
_reactnativesvg.Text,
|
|
@@ -3589,11 +3607,11 @@ function TimeSeriesPanel({ panel, frames }) {
|
|
|
3589
3607
|
x(hover.time) > size.width / 2 ? { right: size.width - x(hover.time) + 8 } : { left: x(hover.time) + 8 }
|
|
3590
3608
|
],
|
|
3591
3609
|
children: [
|
|
3592
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _reactnative.Text, { style: [styles13.tooltipTime, { color: theme.textMuted }], children: numericX ?
|
|
3610
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _reactnative.Text, { style: [styles13.tooltipTime, { color: theme.textMuted }], children: numericX ? _chunkXWSPLZNCjs.formatValue.call(void 0, hover.time, xConfig) : formatTooltipTime(hover.time) }),
|
|
3593
3611
|
hover.rows.map((r) => /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _reactnative.View, { style: styles13.tooltipRow, children: [
|
|
3594
3612
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _reactnative.View, { style: [styles13.swatch, { backgroundColor: r.color }] }),
|
|
3595
3613
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _reactnative.Text, { style: [styles13.tooltipName, { color: theme.textSecondary }], numberOfLines: 1, children: r.name }),
|
|
3596
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _reactnative.Text, { style: [styles13.tooltipValue, { color: theme.text }], children:
|
|
3614
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _reactnative.Text, { style: [styles13.tooltipValue, { color: theme.text }], children: _chunkXWSPLZNCjs.formatValue.call(void 0, r.value, r.config) })
|
|
3597
3615
|
] }, r.key)),
|
|
3598
3616
|
isPinned && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, TooltipLinks, { links: hoverLinks, onOpen: (l) => openLinks([l]) })
|
|
3599
3617
|
]
|
|
@@ -3678,7 +3696,7 @@ function linkData(r, frames, xField) {
|
|
|
3678
3696
|
if (frame && xField === void 0) {
|
|
3679
3697
|
row = r.index;
|
|
3680
3698
|
} else if (frame) {
|
|
3681
|
-
const xf = _nullishCoalesce(frame.fields.find((f) => f.name === xField), () => (
|
|
3699
|
+
const xf = _nullishCoalesce(frame.fields.find((f) => f.name === xField), () => ( _chunkXWSPLZNCjs.numberFields.call(void 0, frame)[0]));
|
|
3682
3700
|
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)]);
|
|
3683
3701
|
row = at != null && at >= 0 ? at : void 0;
|
|
3684
3702
|
}
|
|
@@ -3689,7 +3707,7 @@ function linkData(r, frames, xField) {
|
|
|
3689
3707
|
fieldName: r.name,
|
|
3690
3708
|
seriesName: r.name,
|
|
3691
3709
|
value: r.value,
|
|
3692
|
-
text:
|
|
3710
|
+
text: _chunkXWSPLZNCjs.formatValue.call(void 0, r.value, r.config),
|
|
3693
3711
|
time: xField === void 0 ? r.time : void 0
|
|
3694
3712
|
};
|
|
3695
3713
|
}
|
|
@@ -3750,8 +3768,8 @@ function xySeries(panel, frames, scheme) {
|
|
|
3750
3768
|
const { manual, series: maps, exclude } = mappings(panel);
|
|
3751
3769
|
const multiple = frames.length > 1;
|
|
3752
3770
|
const out = [];
|
|
3753
|
-
const config = (field, frame) =>
|
|
3754
|
-
const find = (pick, frame, fields = frame.fields) => pick ? fields.filter((f) =>
|
|
3771
|
+
const config = (field, frame) => _chunkXWSPLZNCjs.resolveFieldConfig.call(void 0, panel, field, frame, _chunkXWSPLZNCjs.fieldDisplayName.call(void 0, field, frame, multiple));
|
|
3772
|
+
const find = (pick, frame, fields = frame.fields) => pick ? fields.filter((f) => _chunkXWSPLZNCjs.fieldMatches.call(void 0, pick.matcher, f, frame, _chunkXWSPLZNCjs.fieldDisplayName.call(void 0, f, frame, multiple))) : [];
|
|
3755
3773
|
for (const [mi, m] of (maps.length ? maps : [{}]).entries()) {
|
|
3756
3774
|
const matcher = _optionalChain([m, 'access', _235 => _235.frame, 'optionalAccess', _236 => _236.matcher]);
|
|
3757
3775
|
const chosen = _optionalChain([matcher, 'optionalAccess', _237 => _237.id]) === "byIndex" ? frames.filter((_, i) => i === matcher.options) : frames;
|
|
@@ -3767,16 +3785,16 @@ function xySeries(panel, frames, scheme) {
|
|
|
3767
3785
|
const yConfig = config(yField, frame);
|
|
3768
3786
|
if (_optionalChain([yConfig, 'access', _238 => _238.custom, 'optionalAccess', _239 => _239.hideFrom, 'optionalAccess', _240 => _240.viz]) && !manual) continue;
|
|
3769
3787
|
const xConfig = config(xField, frame);
|
|
3770
|
-
const color =
|
|
3771
|
-
const base = _optionalChain([yConfig, 'access', _241 => _241.color, 'optionalAccess', _242 => _242.mode]) === "thresholds" ?
|
|
3788
|
+
const color = _chunkXWSPLZNCjs.seriesColor.call(void 0, out.length, scheme, yConfig);
|
|
3789
|
+
const base = _optionalChain([yConfig, 'access', _241 => _241.color, 'optionalAccess', _242 => _242.mode]) === "thresholds" ? _chunkXWSPLZNCjs.valueColor.call(void 0, null, yConfig, color) : color;
|
|
3772
3790
|
const rows = [];
|
|
3773
3791
|
const xs = [];
|
|
3774
3792
|
const ys = [];
|
|
3775
3793
|
yField.values.forEach((yv, i) => {
|
|
3776
3794
|
const xv = xField.values[i];
|
|
3777
3795
|
if (xv == null || yv == null) return;
|
|
3778
|
-
const xn = xField.type === "time" ?
|
|
3779
|
-
const yn = yField.type === "time" ?
|
|
3796
|
+
const xn = xField.type === "time" ? _chunkXWSPLZNCjs.toMillis.call(void 0, xv) : Number(xv);
|
|
3797
|
+
const yn = yField.type === "time" ? _chunkXWSPLZNCjs.toMillis.call(void 0, yv) : Number(yv);
|
|
3780
3798
|
if (!Number.isFinite(xn) || !Number.isFinite(yn)) return;
|
|
3781
3799
|
rows.push(i);
|
|
3782
3800
|
xs.push(xn);
|
|
@@ -3789,7 +3807,7 @@ function xySeries(panel, frames, scheme) {
|
|
|
3789
3807
|
const cConfig = config(colorField, frame);
|
|
3790
3808
|
const values = rows.map((i) => num3(colorField.values[i]));
|
|
3791
3809
|
const extent = range2(values);
|
|
3792
|
-
colors = values.map((v) =>
|
|
3810
|
+
colors = values.map((v) => _chunkXWSPLZNCjs.valueColor.call(void 0, v, cConfig, base, extent));
|
|
3793
3811
|
}
|
|
3794
3812
|
let sizes = rows.map(() => fixedSize);
|
|
3795
3813
|
if (sizeField) {
|
|
@@ -3799,7 +3817,7 @@ function xySeries(panel, frames, scheme) {
|
|
|
3799
3817
|
sizes = values.map((v) => v == null ? min : min + (v - lo) / (hi - lo || 1) * (max - min));
|
|
3800
3818
|
}
|
|
3801
3819
|
const fixedName = _optionalChain([m, 'access', _254 => _254.name, 'optionalAccess', _255 => _255.fixed]);
|
|
3802
|
-
const yName = _nullishCoalesce(yConfig.displayName, () => (
|
|
3820
|
+
const yName = _nullishCoalesce(yConfig.displayName, () => ( _chunkXWSPLZNCjs.fieldDisplayName.call(void 0, yField, frame, multiple)));
|
|
3803
3821
|
out.push({
|
|
3804
3822
|
key: `${mi}/${frames.indexOf(frame)}/${yField.name}`,
|
|
3805
3823
|
name: fixedName ? yFields.length > 1 ? `${fixedName} ${yName}` : fixedName : yName,
|
|
@@ -3922,7 +3940,7 @@ function XYChartPanel({ panel, frames }) {
|
|
|
3922
3940
|
size.width > 0 && /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _reactnativesvg2.default, { width: size.width, height: size.height, children: [
|
|
3923
3941
|
yTicks.map((t) => /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _reactnativesvg.G, { children: [
|
|
3924
3942
|
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 }),
|
|
3925
|
-
/* @__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:
|
|
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: _chunkXWSPLZNCjs.formatValue.call(void 0, t, { ...first.yConfig, decimals: _nullishCoalesce(first.yConfig.decimals, () => ( tickDecimals(yTicks))) }) })
|
|
3926
3944
|
] }, `y${t}`)),
|
|
3927
3945
|
xTicks.map((t) => /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _reactnativesvg.G, { children: [
|
|
3928
3946
|
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 }),
|
|
@@ -3934,7 +3952,7 @@ function XYChartPanel({ panel, frames }) {
|
|
|
3934
3952
|
fontSize: 10,
|
|
3935
3953
|
fill: theme.textMuted,
|
|
3936
3954
|
textAnchor: layout.x(t) - pad.left < 20 ? "start" : pad.left + plotW - layout.x(t) < 20 ? "end" : "middle",
|
|
3937
|
-
children:
|
|
3955
|
+
children: _chunkXWSPLZNCjs.formatValue.call(void 0, t, { ...first.xConfig, decimals: _nullishCoalesce(first.xConfig.decimals, () => ( tickDecimals(xTicks))) })
|
|
3938
3956
|
}
|
|
3939
3957
|
)
|
|
3940
3958
|
] }, `x${t}`)),
|
|
@@ -4047,14 +4065,14 @@ function DashboardView({ mode = "auto", header, footer, refreshable }) {
|
|
|
4047
4065
|
const width = (measured.width || window.width) - insets.left - insets.right;
|
|
4048
4066
|
const layoutMode = mode === "auto" ? width >= TABLET_WIDTH ? "grid" : "phone" : mode;
|
|
4049
4067
|
const sections = _react.useMemo.call(void 0,
|
|
4050
|
-
() =>
|
|
4068
|
+
() => _chunkXWSPLZNCjs.layoutDashboard.call(void 0, dashboard, layoutMode, { values: variables, info: variableInfo2 }),
|
|
4051
4069
|
[dashboard, layoutMode, variables, variableInfo2]
|
|
4052
4070
|
);
|
|
4053
4071
|
const [toggled, setToggled] = _react.useState.call(void 0, {});
|
|
4054
4072
|
const { seen, viewportH, onScroll, onViewportLayout, onSectionLayout } = useSeenSections(window.height);
|
|
4055
4073
|
const maxPanelH = Math.max(MIN_PANEL_H, viewportH - SIDE * 2);
|
|
4056
4074
|
const contentW = width - SIDE * 2;
|
|
4057
|
-
const canRefresh = _nullishCoalesce(refreshable, () => ( dashboard.panels.some((p) =>
|
|
4075
|
+
const canRefresh = _nullishCoalesce(refreshable, () => ( dashboard.panels.some((p) => _chunkXWSPLZNCjs.panelHasQueries.call(void 0, p) || _optionalChain([p, 'access', _278 => _278.panels, 'optionalAccess', _279 => _279.some, 'call', _280 => _280(_chunkXWSPLZNCjs.panelHasQueries)]))));
|
|
4058
4076
|
return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _reactnative.View, { style: [styles15.fill, { backgroundColor: theme.background }], onLayout, children: [
|
|
4059
4077
|
width > 0 && /* @__PURE__ */ _jsxruntime.jsxs.call(void 0,
|
|
4060
4078
|
_reactnative.ScrollView,
|
|
@@ -4080,14 +4098,14 @@ function DashboardView({ mode = "auto", header, footer, refreshable }) {
|
|
|
4080
4098
|
accessibilityState: { expanded: !collapsed },
|
|
4081
4099
|
children: [
|
|
4082
4100
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _reactnative.Text, { style: [styles15.chevron, { color: theme.textMuted }], children: collapsed ? "\u25B8" : "\u25BE" }),
|
|
4083
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _reactnative.Text, { style: [styles15.rowTitle, { color: theme.text }], numberOfLines: 2, children:
|
|
4101
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _reactnative.Text, { style: [styles15.rowTitle, { color: theme.text }], numberOfLines: 2, children: _chunkXWSPLZNCjs.interpolate.call(void 0, _nullishCoalesce(section.row.title, () => ( "")), { values: variables, info: variableInfo2, scoped: section.row.scopedVars, timezone: dashboard.timezone }) })
|
|
4084
4102
|
]
|
|
4085
4103
|
}
|
|
4086
4104
|
),
|
|
4087
4105
|
!collapsed && layoutMode === "grid" && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, GridSection, { grid: section.grid, width: contentW, maxPanelH, deferred: !seen.has(section.key) }),
|
|
4088
4106
|
!collapsed && layoutMode === "phone" && section.rows.map((row, ri) => /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _reactnative.View, { style: styles15.row, children: row.cells.map((cell) => {
|
|
4089
|
-
const w = (contentW + GAP2) * (cell.span /
|
|
4090
|
-
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, PanelCard, { panel: cell.panel, width: w, height: Math.min(
|
|
4107
|
+
const w = (contentW + GAP2) * (cell.span / _chunkXWSPLZNCjs.GRID_COLUMNS) - GAP2;
|
|
4108
|
+
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, PanelCard, { panel: cell.panel, width: w, height: Math.min(_chunkXWSPLZNCjs.gridUnitsToPx.call(void 0, row.h), maxPanelH), deferred: !seen.has(section.key) }, cell.key);
|
|
4091
4109
|
}) }, ri))
|
|
4092
4110
|
] }, section.key);
|
|
4093
4111
|
})
|
|
@@ -4098,10 +4116,10 @@ function DashboardView({ mode = "auto", header, footer, refreshable }) {
|
|
|
4098
4116
|
] });
|
|
4099
4117
|
}
|
|
4100
4118
|
function GridSection({ grid, width, maxPanelH, deferred }) {
|
|
4101
|
-
const colW = (width + GAP2) /
|
|
4102
|
-
const tallest = Math.max(0, ...grid.cells.map((c) =>
|
|
4119
|
+
const colW = (width + GAP2) / _chunkXWSPLZNCjs.GRID_COLUMNS;
|
|
4120
|
+
const tallest = Math.max(0, ...grid.cells.map((c) => _chunkXWSPLZNCjs.gridUnitsToPx.call(void 0, c.h)));
|
|
4103
4121
|
const scale = tallest > maxPanelH ? maxPanelH / tallest : 1;
|
|
4104
|
-
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _reactnative.View, { style: { height:
|
|
4122
|
+
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _reactnative.View, { style: { height: _chunkXWSPLZNCjs.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: _chunkXWSPLZNCjs.gridOffsetPx.call(void 0, cell.y) * scale }], children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, PanelCard, { panel: cell.panel, width: cell.w * colW - GAP2, height: _chunkXWSPLZNCjs.gridUnitsToPx.call(void 0, cell.h) * scale, deferred }) }, cell.key)) });
|
|
4105
4123
|
}
|
|
4106
4124
|
function useSeenSections(viewportHeight) {
|
|
4107
4125
|
const [seen, setSeen] = _react.useState.call(void 0, /* @__PURE__ */ new Set());
|
|
@@ -4160,16 +4178,18 @@ function PanelCardContent({ panel, width, height, deferred }) {
|
|
|
4160
4178
|
const theme = useDashTheme();
|
|
4161
4179
|
const { dashboard, variables, variableInfo: variableInfo2 } = useDashboard();
|
|
4162
4180
|
const { resolve, openLinks } = usePanelLinks(panel);
|
|
4163
|
-
const group =
|
|
4164
|
-
const input =
|
|
4181
|
+
const group = _chunkXWSPLZNCjs.isInputGroup.call(void 0, panel);
|
|
4182
|
+
const input = _chunkXWSPLZNCjs.isInputPanel.call(void 0, panel) || group;
|
|
4165
4183
|
const form = _react.useContext.call(void 0, InputFormContext);
|
|
4166
|
-
const problem = group ? _optionalChain([form, 'optionalAccess', _281 => _281.group, 'optionalCall', _282 => _282(panel), 'optionalAccess', _283 => _283.problem]) :
|
|
4184
|
+
const problem = group ? _optionalChain([form, 'optionalAccess', _281 => _281.group, 'optionalCall', _282 => _282(panel), 'optionalAccess', _283 => _283.problem]) : _chunkXWSPLZNCjs.isInputPanel.call(void 0, panel) ? _optionalChain([form, 'optionalAccess', _284 => _284.problem, 'optionalCall', _285 => _285(panel.options.metric)]) : void 0;
|
|
4167
4185
|
const hasLinks = !!_optionalChain([panel, 'access', _286 => _286.links, 'optionalAccess', _287 => _287.length]);
|
|
4168
|
-
const
|
|
4169
|
-
const
|
|
4170
|
-
|
|
4186
|
+
const filled = !group && _chunkXWSPLZNCjs.isInputPanel.call(void 0, panel) && !!_optionalChain([form, 'optionalAccess', _288 => _288.filled, 'optionalCall', _289 => _289(panel.options.metric)]);
|
|
4187
|
+
const hasTitle = !!panel.title || hasLinks || !!problem || filled;
|
|
4188
|
+
const title = panel.title ? _chunkXWSPLZNCjs.interpolate.call(void 0, panel.title, { values: variables, info: variableInfo2, scoped: panel.scopedVars, timezone: dashboard.timezone }) : "";
|
|
4189
|
+
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: [
|
|
4171
4190
|
hasTitle && /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _reactnative.View, { style: styles15.titleRow, children: [
|
|
4172
4191
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _reactnative.Text, { style: [styles15.title, { color: theme.text }], numberOfLines: 1, children: title }),
|
|
4192
|
+
filled && !problem && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _reactnative.Text, { style: [styles15.problem, { color: theme.accent }], numberOfLines: 1, children: "From voice" }),
|
|
4173
4193
|
!!problem && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _reactnative.Text, { style: [styles15.problem, { color: theme.danger }], numberOfLines: 1, accessibilityRole: "alert", children: problem }),
|
|
4174
4194
|
hasLinks && /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
4175
4195
|
_reactnative.Pressable,
|
|
@@ -4188,7 +4208,7 @@ function PanelCardContent({ panel, width, height, deferred }) {
|
|
|
4188
4208
|
}
|
|
4189
4209
|
function DataPanelBody({ panel, width, height }) {
|
|
4190
4210
|
const theme = useDashTheme();
|
|
4191
|
-
const needsData =
|
|
4211
|
+
const needsData = _chunkXWSPLZNCjs.panelHasQueries.call(void 0, panel);
|
|
4192
4212
|
const data = usePanelData(panel, width, needsData);
|
|
4193
4213
|
const Component2 = panelComponent(panel.type);
|
|
4194
4214
|
if (needsData && data.error) {
|
|
@@ -4242,7 +4262,7 @@ function webSpeechRecognizer() {
|
|
|
4242
4262
|
const r = new Recognition();
|
|
4243
4263
|
if (o.lang) r.lang = o.lang;
|
|
4244
4264
|
r.interimResults = true;
|
|
4245
|
-
r.continuous =
|
|
4265
|
+
r.continuous = !!o.continuous;
|
|
4246
4266
|
r.maxAlternatives = 1;
|
|
4247
4267
|
let delivered = false;
|
|
4248
4268
|
let aborted = false;
|
|
@@ -4255,6 +4275,7 @@ function webSpeechRecognizer() {
|
|
|
4255
4275
|
if (!e.results[i].isFinal) final = false;
|
|
4256
4276
|
}
|
|
4257
4277
|
lastText = text.trim();
|
|
4278
|
+
if (o.continuous) final = false;
|
|
4258
4279
|
if (final) delivered = true;
|
|
4259
4280
|
o.onText(lastText, final);
|
|
4260
4281
|
};
|
|
@@ -4285,6 +4306,83 @@ function webSpeechRecognizer() {
|
|
|
4285
4306
|
};
|
|
4286
4307
|
}
|
|
4287
4308
|
|
|
4309
|
+
// src/ui/inputs/VoiceFill.tsx
|
|
4310
|
+
|
|
4311
|
+
function useVoiceFill({ speech, lang, filler, form, onFilled, onError }) {
|
|
4312
|
+
const [on, setOn] = _react.useState.call(void 0, false);
|
|
4313
|
+
const [filling, setFilling] = _react.useState.call(void 0, false);
|
|
4314
|
+
const [heard, setHeard] = _react.useState.call(void 0, null);
|
|
4315
|
+
const session = _react.useRef.call(void 0, null);
|
|
4316
|
+
const alive = _react.useRef.call(void 0, true);
|
|
4317
|
+
const latest = _react.useRef.call(void 0, { form, filler, onFilled, onError });
|
|
4318
|
+
_react.useEffect.call(void 0, () => {
|
|
4319
|
+
latest.current = { form, filler, onFilled, onError };
|
|
4320
|
+
});
|
|
4321
|
+
_react.useEffect.call(void 0, () => {
|
|
4322
|
+
alive.current = true;
|
|
4323
|
+
return () => {
|
|
4324
|
+
alive.current = false;
|
|
4325
|
+
_optionalChain([session, 'access', _290 => _290.current, 'optionalAccess', _291 => _291.abort, 'call', _292 => _292()]);
|
|
4326
|
+
};
|
|
4327
|
+
}, []);
|
|
4328
|
+
const fill = async (said) => {
|
|
4329
|
+
const { form: f, filler: run } = latest.current;
|
|
4330
|
+
if (!run) return;
|
|
4331
|
+
setFilling(true);
|
|
4332
|
+
let result;
|
|
4333
|
+
try {
|
|
4334
|
+
result = await run(f, said);
|
|
4335
|
+
} catch (e8) {
|
|
4336
|
+
result = { values: {}, problems: [{ key: "", problem: "Couldn\u2019t fill the form" }] };
|
|
4337
|
+
}
|
|
4338
|
+
if (!alive.current) return;
|
|
4339
|
+
setFilling(false);
|
|
4340
|
+
latest.current.onFilled(result, said);
|
|
4341
|
+
};
|
|
4342
|
+
const toggle = () => {
|
|
4343
|
+
if (!speech || !filler) return;
|
|
4344
|
+
if (session.current) {
|
|
4345
|
+
session.current.stop();
|
|
4346
|
+
return;
|
|
4347
|
+
}
|
|
4348
|
+
stopListening();
|
|
4349
|
+
setHeard(null);
|
|
4350
|
+
let mine = null;
|
|
4351
|
+
let ended = false;
|
|
4352
|
+
const end = () => {
|
|
4353
|
+
ended = true;
|
|
4354
|
+
if (session.current === mine) session.current = null;
|
|
4355
|
+
claimListening(mine, true);
|
|
4356
|
+
if (alive.current) {
|
|
4357
|
+
setOn(false);
|
|
4358
|
+
setHeard(null);
|
|
4359
|
+
}
|
|
4360
|
+
};
|
|
4361
|
+
try {
|
|
4362
|
+
mine = speech.start({
|
|
4363
|
+
lang,
|
|
4364
|
+
hints: _chunkXWSPLZNCjs.fillHints.call(void 0, form),
|
|
4365
|
+
continuous: true,
|
|
4366
|
+
onText(text, final) {
|
|
4367
|
+
if (!final) return setHeard(text || null);
|
|
4368
|
+
if (text.trim()) fill(text.trim());
|
|
4369
|
+
},
|
|
4370
|
+
onError: (message) => alive.current && latest.current.onError(message),
|
|
4371
|
+
onEnd: end
|
|
4372
|
+
});
|
|
4373
|
+
} catch (e9) {
|
|
4374
|
+
onError("Dictation couldn\u2019t start");
|
|
4375
|
+
return;
|
|
4376
|
+
}
|
|
4377
|
+
if (!ended) {
|
|
4378
|
+
session.current = mine;
|
|
4379
|
+
claimListening(mine);
|
|
4380
|
+
setOn(true);
|
|
4381
|
+
}
|
|
4382
|
+
};
|
|
4383
|
+
return { available: !!speech && !!filler && form.fields.length > 0, listening: on, filling, heard, toggle };
|
|
4384
|
+
}
|
|
4385
|
+
|
|
4288
4386
|
// src/ui/inputs/InputForm.tsx
|
|
4289
4387
|
|
|
4290
4388
|
var NO_CHOICES = {};
|
|
@@ -4295,36 +4393,36 @@ function savedValues(panels, entries) {
|
|
|
4295
4393
|
const values = {};
|
|
4296
4394
|
for (const p of panels) {
|
|
4297
4395
|
const mine = entries.filter((e) => e.metric === p.options.metric);
|
|
4298
|
-
values[p.options.metric] = p.options.multi ? mine.length ? mine.map((e) => _nullishCoalesce(e.text, () => ( e.value))) : null :
|
|
4396
|
+
values[p.options.metric] = p.options.multi ? mine.length ? mine.map((e) => _nullishCoalesce(e.text, () => ( e.value))) : null : _chunkXWSPLZNCjs.entryToInputValue.call(void 0, p, mine[0]);
|
|
4299
4397
|
}
|
|
4300
4398
|
return values;
|
|
4301
4399
|
}
|
|
4302
4400
|
async function lastItems(store, group) {
|
|
4303
|
-
const metrics =
|
|
4401
|
+
const metrics = _chunkXWSPLZNCjs.groupFields.call(void 0, group).map((f) => f.options.metric);
|
|
4304
4402
|
const latest = (await Promise.all(metrics.map((m) => store.latest(m)))).filter((e) => !!e).sort((a, b) => b.ts - a.ts)[0];
|
|
4305
4403
|
if (!latest) return [];
|
|
4306
|
-
return
|
|
4404
|
+
return _chunkXWSPLZNCjs.entriesToItems.call(void 0, group, _chunkXWSPLZNCjs.sameSave.call(void 0, latest, await store.list({ metrics, from: latest.ts, to: latest.ts })));
|
|
4307
4405
|
}
|
|
4308
4406
|
function freshItem(group, position, last) {
|
|
4309
4407
|
const item = {};
|
|
4310
|
-
for (const f of
|
|
4408
|
+
for (const f of _chunkXWSPLZNCjs.groupFields.call(void 0, group)) {
|
|
4311
4409
|
const d = f.options.default;
|
|
4312
|
-
const v = d === "last" ? _optionalChain([last, 'optionalAccess',
|
|
4410
|
+
const v = d === "last" ? _optionalChain([last, 'optionalAccess', _293 => _293[position], 'optionalAccess', _294 => _294[f.options.metric]]) : d;
|
|
4313
4411
|
if (v !== void 0 && v !== null) item[f.options.metric] = v;
|
|
4314
4412
|
}
|
|
4315
4413
|
return item;
|
|
4316
4414
|
}
|
|
4317
4415
|
function baseItems(group, editing, last) {
|
|
4318
4416
|
const start = group.options.start;
|
|
4319
|
-
const values = editing ?
|
|
4417
|
+
const values = editing ? _chunkXWSPLZNCjs.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));
|
|
4320
4418
|
return values.map((v, i) => ({ key: `b${i}`, values: v, edited: [] }));
|
|
4321
4419
|
}
|
|
4322
4420
|
var nextItemKey = 1;
|
|
4323
|
-
function InputForm({ dashboard, store, onSaved, choices = NO_CHOICES, header, timestamp, defaults: given = NO_DEFAULTS, beforeSave, editing, speech: givenSpeech, speechLang }) {
|
|
4421
|
+
function InputForm({ dashboard, store, onSaved, choices = NO_CHOICES, header, timestamp, defaults: given = NO_DEFAULTS, beforeSave, editing, speech: givenSpeech, speechLang, filler = _chunkXWSPLZNCjs.ruleFiller }) {
|
|
4324
4422
|
const speech = givenSpeech === void 0 ? defaultSpeech() : givenSpeech;
|
|
4325
4423
|
const theme = useDashTheme();
|
|
4326
|
-
const panels = _react.useMemo.call(void 0, () =>
|
|
4327
|
-
const groups = _react.useMemo.call(void 0, () =>
|
|
4424
|
+
const panels = _react.useMemo.call(void 0, () => _chunkXWSPLZNCjs.plainInputPanels.call(void 0, dashboard), [dashboard]);
|
|
4425
|
+
const groups = _react.useMemo.call(void 0, () => _chunkXWSPLZNCjs.inputGroups.call(void 0, dashboard), [dashboard]);
|
|
4328
4426
|
const saved = _react.useMemo.call(void 0, () => editing ? savedValues(panels, editing) : NO_DEFAULTS, [panels, editing]);
|
|
4329
4427
|
const [defaults, setDefaults] = _react.useState.call(void 0, {});
|
|
4330
4428
|
const [edits, setEdits] = _react.useState.call(void 0, {});
|
|
@@ -4333,6 +4431,9 @@ function InputForm({ dashboard, store, onSaved, choices = NO_CHOICES, header, ti
|
|
|
4333
4431
|
const [offsetMs, setOffsetMs] = _react.useState.call(void 0, 0);
|
|
4334
4432
|
const [status, setStatus] = _react.useState.call(void 0, null);
|
|
4335
4433
|
const [checked, setChecked] = _react.useState.call(void 0, false);
|
|
4434
|
+
const [filled, setFilled] = _react.useState.call(void 0, {});
|
|
4435
|
+
const [beforeFill, setBeforeFill] = _react.useState.call(void 0, null);
|
|
4436
|
+
const fillable = _react.useMemo.call(void 0, () => _chunkXWSPLZNCjs.fillForm.call(void 0, dashboard, choices), [dashboard, choices]);
|
|
4336
4437
|
_react.useEffect.call(void 0, () => {
|
|
4337
4438
|
let run = 0;
|
|
4338
4439
|
const load = async () => {
|
|
@@ -4340,12 +4441,12 @@ function InputForm({ dashboard, store, onSaved, choices = NO_CHOICES, header, ti
|
|
|
4340
4441
|
const next = {};
|
|
4341
4442
|
for (const p of panels) {
|
|
4342
4443
|
const d = p.options.default;
|
|
4343
|
-
if (d === "last") next[p.options.metric] =
|
|
4444
|
+
if (d === "last") next[p.options.metric] = _chunkXWSPLZNCjs.entryToInputValue.call(void 0, p, await store.latest(p.options.metric));
|
|
4344
4445
|
else if (d !== void 0) next[p.options.metric] = d;
|
|
4345
4446
|
}
|
|
4346
4447
|
const lastNext = {};
|
|
4347
4448
|
for (const g of groups) {
|
|
4348
|
-
const wanted = g.options.start === "last" ||
|
|
4449
|
+
const wanted = g.options.start === "last" || _chunkXWSPLZNCjs.groupFields.call(void 0, g).some((f) => f.options.default === "last");
|
|
4349
4450
|
if (wanted) lastNext[groupKey(g)] = await lastItems(store, g);
|
|
4350
4451
|
}
|
|
4351
4452
|
if (mine === run) {
|
|
@@ -4369,43 +4470,73 @@ function InputForm({ dashboard, store, onSaved, choices = NO_CHOICES, header, ti
|
|
|
4369
4470
|
setValue: (m, v) => {
|
|
4370
4471
|
setStatus(null);
|
|
4371
4472
|
setEdits((e) => ({ ...e, [m]: v }));
|
|
4473
|
+
setFilled((f) => {
|
|
4474
|
+
if (!(m in f)) return f;
|
|
4475
|
+
const { [m]: _, ...rest } = f;
|
|
4476
|
+
return rest;
|
|
4477
|
+
});
|
|
4478
|
+
setBeforeFill(null);
|
|
4372
4479
|
},
|
|
4373
4480
|
isDirty: (m) => m in edits,
|
|
4481
|
+
filled: (m) => m in filled,
|
|
4374
4482
|
store,
|
|
4375
4483
|
choices,
|
|
4376
4484
|
speech,
|
|
4377
4485
|
speechLang,
|
|
4378
4486
|
problem: (m) => {
|
|
4379
4487
|
const p = panels.find((x) => x.options.metric === m);
|
|
4380
|
-
return p && (checked || m in edits) ?
|
|
4488
|
+
return p && (checked || m in edits) ? _chunkXWSPLZNCjs.inputProblem.call(void 0, p, value(m)) : void 0;
|
|
4381
4489
|
},
|
|
4382
4490
|
group: (g) => groupState(g, itemsOf(g), last[groupKey(g)], groupKey(g) in groupEdits, checked, (update) => {
|
|
4383
4491
|
setStatus(null);
|
|
4384
4492
|
setGroupEdits((all) => ({ ...all, [groupKey(g)]: update(_nullishCoalesce(_nullishCoalesce(all[groupKey(g)], () => ( base[groupKey(g)])), () => ( []))) }));
|
|
4385
4493
|
})
|
|
4386
4494
|
};
|
|
4387
|
-
}, [edits, saved, defaults, given, store, choices, speech, speechLang, panels, checked, itemsOf, last, groupEdits, base]);
|
|
4495
|
+
}, [edits, saved, defaults, given, store, choices, speech, speechLang, panels, checked, itemsOf, last, groupEdits, base, filled]);
|
|
4496
|
+
const clearFill = () => {
|
|
4497
|
+
setFilled({});
|
|
4498
|
+
setBeforeFill(null);
|
|
4499
|
+
};
|
|
4500
|
+
const onFilled = _react.useCallback.call(void 0,
|
|
4501
|
+
(result, said) => {
|
|
4502
|
+
const keys = Object.keys(result.values);
|
|
4503
|
+
const label = (key) => _nullishCoalesce(_optionalChain([fillable, 'access', _296 => _296.fields, 'access', _297 => _297.find, 'call', _298 => _298((f) => f.key === key), 'optionalAccess', _299 => _299.label]), () => ( key));
|
|
4504
|
+
const problem = result.problems[0];
|
|
4505
|
+
const problemText = problem ? problem.key ? `${label(problem.key)}: ${problem.problem.charAt(0).toLowerCase()}${problem.problem.slice(1)}` : problem.problem : "";
|
|
4506
|
+
if (!keys.length) {
|
|
4507
|
+
setStatus(problem ? `Couldn\u2019t fill. ${problemText}` : `Didn\u2019t catch any fields in \u201C${said}\u201D`);
|
|
4508
|
+
return;
|
|
4509
|
+
}
|
|
4510
|
+
setBeforeFill(edits);
|
|
4511
|
+
setEdits({ ...edits, ...result.values });
|
|
4512
|
+
setFilled(Object.fromEntries(keys.map((k) => [k, true])));
|
|
4513
|
+
const more = result.problems.length > 1 ? ` (+${result.problems.length - 1} more)` : "";
|
|
4514
|
+
setStatus(`Filled ${keys.length} ${keys.length === 1 ? "field" : "fields"}. Check, then Save${problem ? `. ${problemText}${more}` : ""}`);
|
|
4515
|
+
},
|
|
4516
|
+
[fillable, edits]
|
|
4517
|
+
);
|
|
4518
|
+
const voice = useVoiceFill({ speech, lang: speechLang, filler, form: fillable, onFilled, onError: setStatus });
|
|
4388
4519
|
const dirty = Object.keys(edits).length + groups.reduce((n, g) => n + groupChanges(_nullishCoalesce(base[groupKey(g)], () => ( [])), groupEdits[groupKey(g)]), 0);
|
|
4389
4520
|
const recordedGroups = _react.useCallback.call(void 0,
|
|
4390
|
-
() => groups.filter((g) => editing || groupKey(g) in groupEdits ||
|
|
4521
|
+
() => groups.filter((g) => editing || groupKey(g) in groupEdits || _chunkXWSPLZNCjs.groupFields.call(void 0, g).some((f) => f.options.record === "always")),
|
|
4391
4522
|
[groups, editing, groupEdits]
|
|
4392
4523
|
);
|
|
4393
4524
|
const save = _react.useCallback.call(void 0, async () => {
|
|
4394
4525
|
const problems = panels.flatMap((p) => {
|
|
4395
|
-
const problem =
|
|
4526
|
+
const problem = _chunkXWSPLZNCjs.inputProblem.call(void 0, p, state.value(p.options.metric));
|
|
4396
4527
|
return problem ? [`${p.title || p.options.metric}: ${problem.toLowerCase()}`] : [];
|
|
4397
4528
|
});
|
|
4398
|
-
for (const g of recordedGroups()) problems.push(...
|
|
4529
|
+
for (const g of recordedGroups()) problems.push(..._chunkXWSPLZNCjs.groupProblems.call(void 0, g, itemsOf(g).map((i) => i.values)));
|
|
4399
4530
|
if (problems.length) {
|
|
4400
4531
|
setChecked(true);
|
|
4401
4532
|
setStatus(problems.length === 1 ? `Can\u2019t save. ${problems[0]}` : `Can\u2019t save: ${problems.length} fields need fixing`);
|
|
4402
4533
|
return;
|
|
4403
4534
|
}
|
|
4404
|
-
const ts = _nullishCoalesce(_optionalChain([editing, 'optionalAccess',
|
|
4405
|
-
const saveId = _nullishCoalesce(_optionalChain([editing, 'optionalAccess',
|
|
4535
|
+
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]), () => ( _chunkXWSPLZNCjs.newSaveId.call(void 0, )));
|
|
4406
4537
|
const entries = [
|
|
4407
|
-
...panels.filter((p) => editing || p.options.metric in edits || p.options.record === "always").flatMap((p) =>
|
|
4408
|
-
...recordedGroups().flatMap((g) =>
|
|
4538
|
+
...panels.filter((p) => editing || p.options.metric in edits || p.options.record === "always").flatMap((p) => _chunkXWSPLZNCjs.toEntries.call(void 0, p, state.value(p.options.metric), ts, { save: saveId })),
|
|
4539
|
+
...recordedGroups().flatMap((g) => _chunkXWSPLZNCjs.groupToEntries.call(void 0, g, itemsOf(g).map((i) => i.values), ts, saveId))
|
|
4409
4540
|
];
|
|
4410
4541
|
if (!entries.length) return;
|
|
4411
4542
|
const extra = beforeSave ? await beforeSave(ts) : [];
|
|
@@ -4414,23 +4545,46 @@ function InputForm({ dashboard, store, onSaved, choices = NO_CHOICES, header, ti
|
|
|
4414
4545
|
setEdits({});
|
|
4415
4546
|
setGroupEdits({});
|
|
4416
4547
|
setChecked(false);
|
|
4548
|
+
clearFill();
|
|
4417
4549
|
setOffsetMs(0);
|
|
4418
4550
|
setStatus(`Saved ${added.length} ${added.length === 1 ? "value" : "values"}`);
|
|
4419
|
-
_optionalChain([onSaved, 'optionalCall',
|
|
4551
|
+
_optionalChain([onSaved, 'optionalCall', _306 => _306(added.length, added)]);
|
|
4420
4552
|
}, [panels, edits, state, offsetMs, store, onSaved, header, timestamp, beforeSave, editing, recordedGroups, itemsOf]);
|
|
4421
4553
|
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, InputFormContext.Provider, { value: state, children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, DashboardProvider, { dashboard, children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
4422
4554
|
DashboardView,
|
|
4423
4555
|
{
|
|
4424
4556
|
header: header !== void 0 ? header : /* @__PURE__ */ _jsxruntime.jsx.call(void 0, TimestampPicker, { offsetMs, onChange: setOffsetMs }),
|
|
4425
4557
|
footer: /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _reactnative.View, { style: [styles16.footer, { backgroundColor: theme.surface, borderTopColor: theme.border }], children: [
|
|
4426
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
4427
|
-
|
|
4558
|
+
voice.available && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, MicButton, { dictation: voice, label: "Fill the form by voice", size: 36 }),
|
|
4559
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
4560
|
+
_reactnative.Text,
|
|
4561
|
+
{
|
|
4562
|
+
style: [styles16.status, { color: _optionalChain([status, 'optionalAccess', _307 => _307.startsWith, 'call', _308 => _308("Can\u2019t")]) || _optionalChain([status, 'optionalAccess', _309 => _309.startsWith, 'call', _310 => _310("Couldn\u2019t")]) ? theme.danger : theme.textSecondary }],
|
|
4563
|
+
accessibilityLiveRegion: "polite",
|
|
4564
|
+
children: voice.listening ? voice.heard ? `\u201C${voice.heard}\u201D` : "Listening\u2026 say each field\u2019s name and its value, then tap to stop" : voice.filling ? "Filling\u2026" : _nullishCoalesce(status, () => ( (dirty ? `${dirty} unsaved ${dirty === 1 ? "change" : "changes"}` : "Nothing to save")))
|
|
4565
|
+
}
|
|
4566
|
+
),
|
|
4567
|
+
beforeFill && /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
4568
|
+
_reactnative.Pressable,
|
|
4569
|
+
{
|
|
4570
|
+
onPress: () => {
|
|
4571
|
+
setEdits(beforeFill);
|
|
4572
|
+
clearFill();
|
|
4573
|
+
setStatus(null);
|
|
4574
|
+
},
|
|
4575
|
+
style: styles16.secondary,
|
|
4576
|
+
accessibilityRole: "button",
|
|
4577
|
+
children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _reactnative.Text, { style: { color: theme.textSecondary, fontWeight: "500" }, children: "Undo" })
|
|
4578
|
+
}
|
|
4579
|
+
),
|
|
4580
|
+
dirty > 0 && !beforeFill && /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
4428
4581
|
_reactnative.Pressable,
|
|
4429
4582
|
{
|
|
4430
4583
|
onPress: () => {
|
|
4431
4584
|
setEdits({});
|
|
4432
4585
|
setGroupEdits({});
|
|
4433
4586
|
setChecked(false);
|
|
4587
|
+
clearFill();
|
|
4434
4588
|
setStatus(null);
|
|
4435
4589
|
},
|
|
4436
4590
|
style: styles16.secondary,
|
|
@@ -4459,14 +4613,14 @@ function groupChanges(base, items) {
|
|
|
4459
4613
|
const edited = items.reduce((n, i) => n + (baseKeys.has(i.key) ? i.edited.length : 0), 0);
|
|
4460
4614
|
const added = items.filter((i) => !baseKeys.has(i.key)).length;
|
|
4461
4615
|
const removed = base.filter((i) => !keys.has(i.key)).length;
|
|
4462
|
-
const moved = edited + added + removed === 0 && items.some((i, n) => _optionalChain([base, 'access',
|
|
4616
|
+
const moved = edited + added + removed === 0 && items.some((i, n) => _optionalChain([base, 'access', _311 => _311[n], 'optionalAccess', _312 => _312.key]) !== i.key) ? 1 : 0;
|
|
4463
4617
|
return edited + added + removed + moved;
|
|
4464
4618
|
}
|
|
4465
4619
|
function groupState(group, items, last, edited, showProblems, update) {
|
|
4466
|
-
const fields =
|
|
4620
|
+
const fields = _chunkXWSPLZNCjs.groupFields.call(void 0, group);
|
|
4467
4621
|
const { max } = group.options;
|
|
4468
4622
|
const fresh = (position) => ({ key: `n${nextItemKey++}`, values: freshItem(group, position, last), edited: [] });
|
|
4469
|
-
const filled = items.filter((i) => !
|
|
4623
|
+
const filled = items.filter((i) => !_chunkXWSPLZNCjs.isEmptyItem.call(void 0, group, i.values)).length;
|
|
4470
4624
|
const { min } = group.options;
|
|
4471
4625
|
return {
|
|
4472
4626
|
items: items.map((i) => ({ key: i.key, values: i.values, edited: i.edited })),
|
|
@@ -4491,8 +4645,8 @@ function groupState(group, items, last, edited, showProblems, update) {
|
|
|
4491
4645
|
fieldProblem: (index, metric) => {
|
|
4492
4646
|
const item = items[index];
|
|
4493
4647
|
const field = fields.find((f) => f.options.metric === metric);
|
|
4494
|
-
if (!item || !field ||
|
|
4495
|
-
return showProblems || item.edited.includes(metric) ?
|
|
4648
|
+
if (!item || !field || _chunkXWSPLZNCjs.isEmptyItem.call(void 0, group, item.values)) return void 0;
|
|
4649
|
+
return showProblems || item.edited.includes(metric) ? _chunkXWSPLZNCjs.inputProblem.call(void 0, field, _nullishCoalesce(item.values[metric], () => ( null))) : void 0;
|
|
4496
4650
|
}
|
|
4497
4651
|
};
|
|
4498
4652
|
}
|
|
@@ -4800,4 +4954,13 @@ var styles16 = _reactnative.StyleSheet.create({
|
|
|
4800
4954
|
|
|
4801
4955
|
|
|
4802
4956
|
|
|
4803
|
-
exports.ALL = _chunkCU4TMSZEjs.ALL; exports.AUTHORING_GUIDE = _chunkCU4TMSZEjs.AUTHORING_GUIDE; exports.BUNDLE_ACCEPT = _chunkCU4TMSZEjs.BUNDLE_ACCEPT; exports.BUNDLE_TYPE = _chunkCU4TMSZEjs.BUNDLE_TYPE; exports.CANVAS_GAP = _chunkCU4TMSZEjs.CANVAS_GAP; exports.CANVAS_ROW_HEADER = _chunkCU4TMSZEjs.CANVAS_ROW_HEADER; exports.Calendar = Calendar; exports.Chip = Chip; exports.ConfigLoader = _chunkCU4TMSZEjs.ConfigLoader; exports.DASHBOARD_DS = _chunkCU4TMSZEjs.DASHBOARD_DS; exports.DEFAULT_GAZETTEER = _chunkCU4TMSZEjs.DEFAULT_GAZETTEER; exports.DICTATION_TYPES = _chunkCU4TMSZEjs.DICTATION_TYPES; exports.DOCUMENT_GUIDE = _chunkCU4TMSZEjs.DOCUMENT_GUIDE; exports.DashThemeProvider = DashThemeProvider; exports.DashboardProvider = DashboardProvider; exports.DashboardToolbar = DashboardToolbar; exports.DashboardView = DashboardView; exports.EDITABLE_VARIABLE_TYPES = _chunkCU4TMSZEjs.EDITABLE_VARIABLE_TYPES; exports.EXAMPLE_TEMPLATE = _chunkCU4TMSZEjs.EXAMPLE_TEMPLATE; exports.GRID_COLUMNS = _chunkCU4TMSZEjs.GRID_COLUMNS; exports.GROUP_FIELD_TYPES = _chunkCU4TMSZEjs.GROUP_FIELD_TYPES; exports.GrafanaClient = _chunkCU4TMSZEjs.GrafanaClient; exports.GrafanaDataSource = _chunkCU4TMSZEjs.GrafanaDataSource; exports.GrafanaError = _chunkCU4TMSZEjs.GrafanaError; exports.HttpConfigFiles = _chunkCU4TMSZEjs.HttpConfigFiles; exports.INPUT_GROUP = _chunkCU4TMSZEjs.INPUT_GROUP; exports.INPUT_OPTION_KEYS = _chunkCU4TMSZEjs.INPUT_OPTION_KEYS; exports.INPUT_TYPES = _chunkCU4TMSZEjs.INPUT_TYPES; exports.InputForm = InputForm; exports.InputFormContext = InputFormContext; exports.LOCAL_DATASOURCE_TYPE = _chunkCU4TMSZEjs.LOCAL_DATASOURCE_TYPE; exports.Legend = Legend; exports.LocalDataSource = _chunkCU4TMSZEjs.LocalDataSource; exports.MANIFEST_VERSION = _chunkCU4TMSZEjs.MANIFEST_VERSION; exports.MAPPING_TYPES = _chunkCU4TMSZEjs.MAPPING_TYPES; exports.MemoryEntryStore = _chunkCU4TMSZEjs.MemoryEntryStore; exports.NAMED_COLORS = _chunkCU4TMSZEjs.NAMED_COLORS; exports.NoData = NoData; exports.OPTION_CATEGORIES = _chunkCU4TMSZEjs.OPTION_CATEGORIES; exports.OVERRIDE_MATCHERS = _chunkCU4TMSZEjs.OVERRIDE_MATCHERS; exports.PANEL_TYPES = _chunkCU4TMSZEjs.PANEL_TYPES; exports.PanelCard = PanelCard; exports.REDUCER_LABELS = _chunkCU4TMSZEjs.REDUCER_LABELS; exports.REFRESH_CHOICES = _chunkCU4TMSZEjs.REFRESH_CHOICES; exports.RELATIVE_RANGES = _chunkCU4TMSZEjs.RELATIVE_RANGES; exports.RenderBoundary = RenderBoundary; exports.SERIES_PALETTE = _chunkCU4TMSZEjs.SERIES_PALETTE; exports.SNIPPET_VERSION = _chunkCU4TMSZEjs.SNIPPET_VERSION; exports.SPECIAL_MATCHES = _chunkCU4TMSZEjs.SPECIAL_MATCHES; exports.SaveConflictError = _chunkCU4TMSZEjs.SaveConflictError; exports.TEMPLATE_VERSION = _chunkCU4TMSZEjs.TEMPLATE_VERSION; exports.TIME_PRESETS = _chunkCU4TMSZEjs.TIME_PRESETS; exports.UNIT_CHOICES = _chunkCU4TMSZEjs.UNIT_CHOICES; exports.addTime = _chunkCU4TMSZEjs.addTime; exports.appSchema = _chunkCU4TMSZEjs.appSchema; exports.applyDashboardLink = _chunkCU4TMSZEjs.applyDashboardLink; exports.applyJsonEdits = _chunkCU4TMSZEjs.applyJsonEdits; exports.applyTemplate = _chunkCU4TMSZEjs.applyTemplate; exports.applyTransformations = _chunkCU4TMSZEjs.applyTransformations; exports.assembleBundle = _chunkCU4TMSZEjs.assembleBundle; exports.assembleFromResponse = _chunkCU4TMSZEjs.assembleFromResponse; exports.buildFrames = _chunkCU4TMSZEjs.buildFrames; exports.bundleFromFiles = _chunkCU4TMSZEjs.bundleFromFiles; exports.bundleRoot = _chunkCU4TMSZEjs.bundleRoot; exports.calculateInterval = _chunkCU4TMSZEjs.calculateInterval; exports.checkFiles = _chunkCU4TMSZEjs.checkFiles; exports.cleanDashboard = _chunkCU4TMSZEjs.cleanDashboard; exports.cleanPanelOptions = _chunkCU4TMSZEjs.cleanPanelOptions; exports.collapseRow = _chunkCU4TMSZEjs.collapseRow; exports.compactGrid = _chunkCU4TMSZEjs.compactGrid; exports.copyPanels = _chunkCU4TMSZEjs.copyPanels; exports.darkTheme = darkTheme; exports.dashboardSchema = _chunkCU4TMSZEjs.dashboardSchema; exports.dashboardSchemaIssues = _chunkCU4TMSZEjs.dashboardSchemaIssues; exports.dashboardSourceIds = _chunkCU4TMSZEjs.dashboardSourceIds; exports.defaultFetchJson = _chunkCU4TMSZEjs.defaultFetchJson; exports.describeRange = _chunkCU4TMSZEjs.describeRange; exports.dictationHints = _chunkCU4TMSZEjs.dictationHints; exports.diffJson = _chunkCU4TMSZEjs.diffJson; exports.documentChanges = _chunkCU4TMSZEjs.documentChanges; exports.documentIdFor = _chunkCU4TMSZEjs.documentIdFor; exports.documentKind = _chunkCU4TMSZEjs.documentKind; exports.documentPrompt = _chunkCU4TMSZEjs.documentPrompt; exports.documentUses = _chunkCU4TMSZEjs.documentUses; exports.dropTarget = _chunkCU4TMSZEjs.dropTarget; exports.duplicatePanel = _chunkCU4TMSZEjs.duplicatePanel; exports.entriesSavedWith = _chunkCU4TMSZEjs.entriesSavedWith; exports.entriesToItems = _chunkCU4TMSZEjs.entriesToItems; exports.entryToInputValue = _chunkCU4TMSZEjs.entryToInputValue; exports.expandRow = _chunkCU4TMSZEjs.expandRow; exports.fetchBundle = _chunkCU4TMSZEjs.fetchBundle; exports.fetchJsonWithToken = _chunkCU4TMSZEjs.fetchJsonWithToken; exports.fieldDisplayName = _chunkCU4TMSZEjs.fieldDisplayName; exports.fieldMatches = _chunkCU4TMSZEjs.fieldMatches; exports.fixDocumentPrompt = _chunkCU4TMSZEjs.fixDocumentPrompt; exports.fixTemplatePrompt = _chunkCU4TMSZEjs.fixTemplatePrompt; exports.formatClock = _chunkCU4TMSZEjs.formatClock; exports.formatDisplay = _chunkCU4TMSZEjs.formatDisplay; exports.formatDuration = _chunkCU4TMSZEjs.formatDuration; exports.formatJsonText = _chunkCU4TMSZEjs.formatJsonText; exports.formatLocalDateTime = _chunkCU4TMSZEjs.formatLocalDateTime; exports.formatValue = _chunkCU4TMSZEjs.formatValue; exports.frameLength = _chunkCU4TMSZEjs.frameLength; exports.framesToOptions = _chunkCU4TMSZEjs.framesToOptions; exports.fromWire = _chunkCU4TMSZEjs.fromWire; exports.getPath = _chunkCU4TMSZEjs.getPath; exports.gridOffsetPx = _chunkCU4TMSZEjs.gridOffsetPx; exports.gridUnitsToPx = _chunkCU4TMSZEjs.gridUnitsToPx; exports.groupField = _chunkCU4TMSZEjs.groupField; exports.groupFields = _chunkCU4TMSZEjs.groupFields; exports.groupKey = groupKey; exports.groupProblems = _chunkCU4TMSZEjs.groupProblems; exports.groupToEntries = _chunkCU4TMSZEjs.groupToEntries; exports.httpFetchJson = _chunkCU4TMSZEjs.httpFetchJson; exports.initialVariableValues = _chunkCU4TMSZEjs.initialVariableValues; exports.inputGroups = _chunkCU4TMSZEjs.inputGroups; exports.inputPanels = _chunkCU4TMSZEjs.inputPanels; exports.inputProblem = _chunkCU4TMSZEjs.inputProblem; exports.insertPanel = _chunkCU4TMSZEjs.insertPanel; exports.interpolate = _chunkCU4TMSZEjs.interpolate; exports.interpolateDeep = _chunkCU4TMSZEjs.interpolateDeep; exports.isBundleResponse = _chunkCU4TMSZEjs.isBundleResponse; exports.isEditableVariableType = _chunkCU4TMSZEjs.isEditableVariableType; exports.isEmptyItem = _chunkCU4TMSZEjs.isEmptyItem; exports.isFormPanelType = _chunkCU4TMSZEjs.isFormPanelType; exports.isInputGroup = _chunkCU4TMSZEjs.isInputGroup; exports.isInputPanel = _chunkCU4TMSZEjs.isInputPanel; exports.isInputType = _chunkCU4TMSZEjs.isInputType; exports.isLocalDatasource = _chunkCU4TMSZEjs.isLocalDatasource; exports.isReducer = _chunkCU4TMSZEjs.isReducer; exports.isRow = _chunkCU4TMSZEjs.isRow; exports.isSqlDatasource = _chunkCU4TMSZEjs.isSqlDatasource; exports.jsonFromAnswer = _chunkCU4TMSZEjs.jsonFromAnswer; exports.layoutCanvas = _chunkCU4TMSZEjs.layoutCanvas; exports.layoutDashboard = _chunkCU4TMSZEjs.layoutDashboard; exports.lightTheme = lightTheme; exports.lineColumn = _chunkCU4TMSZEjs.lineColumn; exports.loadGazetteer = _chunkCU4TMSZEjs.loadGazetteer; exports.locate = _chunkCU4TMSZEjs.locate; exports.makeTemplate = _chunkCU4TMSZEjs.makeTemplate; exports.manifestSchemaIssues = _chunkCU4TMSZEjs.manifestSchemaIssues; exports.mappedResult = _chunkCU4TMSZEjs.mappedResult; exports.mappingProblem = _chunkCU4TMSZEjs.mappingProblem; exports.mappingRow = _chunkCU4TMSZEjs.mappingRow; exports.mappingRows = _chunkCU4TMSZEjs.mappingRows; exports.matchChoices = _chunkCU4TMSZEjs.matchChoices; exports.metricChanges = _chunkCU4TMSZEjs.metricChanges; exports.movePanel = _chunkCU4TMSZEjs.movePanel; exports.newDocument = _chunkCU4TMSZEjs.newDocument; exports.newPanel = _chunkCU4TMSZEjs.newPanel; exports.newSaveId = _chunkCU4TMSZEjs.newSaveId; exports.newVariable = _chunkCU4TMSZEjs.newVariable; exports.nextPanelId = _chunkCU4TMSZEjs.nextPanelId; exports.normalizeRef = _chunkCU4TMSZEjs.normalizeRef; exports.numberFields = _chunkCU4TMSZEjs.numberFields; exports.optionValue = _chunkCU4TMSZEjs.optionValue; exports.overrideProperties = _chunkCU4TMSZEjs.overrideProperties; exports.panelEdits = _chunkCU4TMSZEjs.panelEdits; exports.panelHasQueries = _chunkCU4TMSZEjs.panelHasQueries; exports.panelKey = _chunkCU4TMSZEjs.panelKey; exports.panelMetrics = _chunkCU4TMSZEjs.panelMetrics; exports.panelOptions = _chunkCU4TMSZEjs.panelOptions; exports.panelOverrides = _chunkCU4TMSZEjs.panelOverrides; exports.panelSize = _chunkCU4TMSZEjs.panelSize; exports.panelSpan = _chunkCU4TMSZEjs.panelSpan; exports.parseClockDigits = _chunkCU4TMSZEjs.parseClockDigits; exports.parseDashboardLink = _chunkCU4TMSZEjs.parseDashboardLink; exports.parseDuration = _chunkCU4TMSZEjs.parseDuration; exports.parseGazetteer = _chunkCU4TMSZEjs.parseGazetteer; exports.parseJsonText = _chunkCU4TMSZEjs.parseJsonText; exports.parseLocalDateTime = _chunkCU4TMSZEjs.parseLocalDateTime; exports.parseRange = _chunkCU4TMSZEjs.parseRange; exports.parseSnippet = _chunkCU4TMSZEjs.parseSnippet; exports.parseSpokenDuration = _chunkCU4TMSZEjs.parseSpokenDuration; exports.parseSpokenNumber = _chunkCU4TMSZEjs.parseSpokenNumber; exports.parseSpokenYesNo = _chunkCU4TMSZEjs.parseSpokenYesNo; exports.parseTemplate = _chunkCU4TMSZEjs.parseTemplate; exports.parseTime = _chunkCU4TMSZEjs.parseTime; exports.pasteSnippet = _chunkCU4TMSZEjs.pasteSnippet; exports.placePanel = _chunkCU4TMSZEjs.placePanel; exports.plainInputPanels = _chunkCU4TMSZEjs.plainInputPanels; exports.pointerToPath = _chunkCU4TMSZEjs.pointerToPath; exports.prepareDashboard = _chunkCU4TMSZEjs.prepareDashboard; exports.previewPaste = _chunkCU4TMSZEjs.previewPaste; exports.queryPanel = _chunkCU4TMSZEjs.queryPanel; exports.queryParam = _chunkCU4TMSZEjs.queryParam; exports.readConfigFiles = _chunkCU4TMSZEjs.readConfigFiles; exports.readDocumentAnswer = _chunkCU4TMSZEjs.readDocumentAnswer; exports.readTemplateAnswer = _chunkCU4TMSZEjs.readTemplateAnswer; exports.readingOrder = _chunkCU4TMSZEjs.readingOrder; exports.reduce = _chunkCU4TMSZEjs.reduce; exports.refineOptions = _chunkCU4TMSZEjs.refineOptions; exports.refreshedVariables = _chunkCU4TMSZEjs.refreshedVariables; exports.registerPanel = registerPanel; exports.removeDocumentFromManifest = _chunkCU4TMSZEjs.removeDocumentFromManifest; exports.removePanel = _chunkCU4TMSZEjs.removePanel; exports.renameDocumentInManifest = _chunkCU4TMSZEjs.renameDocumentInManifest; exports.renameMetrics = _chunkCU4TMSZEjs.renameMetrics; exports.renameVariableInPanels = _chunkCU4TMSZEjs.renameVariableInPanels; exports.repack = _chunkCU4TMSZEjs.repack; exports.repeatOptions = _chunkCU4TMSZEjs.repeatOptions; exports.requiredManifestVersion = _chunkCU4TMSZEjs.requiredManifestVersion; exports.resizePanel = _chunkCU4TMSZEjs.resizePanel; exports.resolveColor = _chunkCU4TMSZEjs.resolveColor; exports.resolveFieldConfig = _chunkCU4TMSZEjs.resolveFieldConfig; exports.resolveLinks = _chunkCU4TMSZEjs.resolveLinks; exports.resolveTimezone = _chunkCU4TMSZEjs.resolveTimezone; exports.resolveUrl = _chunkCU4TMSZEjs.resolveUrl; exports.resolveVariables = _chunkCU4TMSZEjs.resolveVariables; exports.revalidateBundle = _chunkCU4TMSZEjs.revalidateBundle; exports.rowsToMappings = _chunkCU4TMSZEjs.rowsToMappings; exports.sameSave = _chunkCU4TMSZEjs.sameSave; exports.sampleEntries = _chunkCU4TMSZEjs.sampleEntries; exports.screenDocuments = _chunkCU4TMSZEjs.screenDocuments; exports.screenOfType = _chunkCU4TMSZEjs.screenOfType; exports.selectValue = _chunkCU4TMSZEjs.selectValue; exports.seriesColor = _chunkCU4TMSZEjs.seriesColor; exports.setHiddenOnPhones = _chunkCU4TMSZEjs.setHiddenOnPhones; exports.setJsonValue = _chunkCU4TMSZEjs.setJsonValue; exports.setOption = _chunkCU4TMSZEjs.setOption; exports.setOptionValue = _chunkCU4TMSZEjs.setOptionValue; exports.setOverrides = _chunkCU4TMSZEjs.setOverrides; exports.settleLayout = _chunkCU4TMSZEjs.settleLayout; exports.snapToGrid = _chunkCU4TMSZEjs.snapToGrid; exports.splitPath = _chunkCU4TMSZEjs.splitPath; exports.spokenValue = _chunkCU4TMSZEjs.spokenValue; exports.startOf = _chunkCU4TMSZEjs.startOf; exports.stringifyCompact = _chunkCU4TMSZEjs.stringifyCompact; exports.tabIdFor = _chunkCU4TMSZEjs.tabIdFor; exports.takesDictation = _chunkCU4TMSZEjs.takesDictation; exports.templateNeeds = _chunkCU4TMSZEjs.templateNeeds; exports.templatePrompt = _chunkCU4TMSZEjs.templatePrompt; exports.textSuggestions = _chunkCU4TMSZEjs.textSuggestions; exports.thresholdStep = _chunkCU4TMSZEjs.thresholdStep; exports.timeExprError = _chunkCU4TMSZEjs.timeExprError; exports.timeField = _chunkCU4TMSZEjs.timeField; exports.toEntries = _chunkCU4TMSZEjs.toEntries; exports.toMillis = _chunkCU4TMSZEjs.toMillis; exports.toSeries = _chunkCU4TMSZEjs.toSeries; exports.toXYSeries = _chunkCU4TMSZEjs.toXYSeries; exports.uniqueNames = _chunkCU4TMSZEjs.uniqueNames; exports.useDashTheme = useDashTheme; exports.useDashboard = useDashboard; exports.useInputForm = useInputForm; exports.usePanelData = usePanelData; exports.validateBundle = _chunkCU4TMSZEjs.validateBundle; exports.validateDashboard = _chunkCU4TMSZEjs.validateDashboard; exports.validateManifest = _chunkCU4TMSZEjs.validateManifest; exports.valueColor = _chunkCU4TMSZEjs.valueColor; exports.valueText = _chunkCU4TMSZEjs.valueText; exports.variableDependents = _chunkCU4TMSZEjs.variableDependents; exports.variableInfo = _chunkCU4TMSZEjs.variableInfo; exports.variableNameError = _chunkCU4TMSZEjs.variableNameError; exports.variableOptions = _chunkCU4TMSZEjs.variableOptions; exports.variableOrder = _chunkCU4TMSZEjs.variableOrder; exports.variableReferences = _chunkCU4TMSZEjs.variableReferences; exports.variableUses = _chunkCU4TMSZEjs.variableUses; exports.variableWithCurrent = _chunkCU4TMSZEjs.variableWithCurrent; exports.variableWithFlags = _chunkCU4TMSZEjs.variableWithFlags; exports.variableWithQuery = _chunkCU4TMSZEjs.variableWithQuery; exports.variableWithType = _chunkCU4TMSZEjs.variableWithType; exports.visibleVariables = _chunkCU4TMSZEjs.visibleVariables; exports.webSpeechRecognizer = webSpeechRecognizer; exports.zoomRange = _chunkCU4TMSZEjs.zoomRange;
|
|
4957
|
+
|
|
4958
|
+
|
|
4959
|
+
|
|
4960
|
+
|
|
4961
|
+
|
|
4962
|
+
|
|
4963
|
+
|
|
4964
|
+
|
|
4965
|
+
|
|
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;
|