@pulzr/perses-figure-panel 0.2.1 → 0.4.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 +26 -0
- package/__mf/js/{PulzrFigurePanel.577b888ef4.js → PulzrFigurePanel.bf7939ff93.js} +4 -4
- package/__mf/js/async/{0.325dac5c70.js → 0.6258e412aa.js} +2 -2
- package/__mf/js/async/0p.ac41951f88.js +2 -0
- package/__mf/js/async/2.d6d514458f.js +2 -0
- package/__mf/js/async/6.68f450e667.js +1 -0
- package/__mf/js/async/{9.952436a6ee.js → 9.b7a842e7df.js} +1 -1
- package/__mf/js/async/__federation_expose_PulzrFigurePanel.9611e4f48f.js +1 -0
- package/__mf/js/async/{f.daba8eec81.js → f.287458ee3b.js} +2 -2
- package/__mf/js/async/k.c04645b420.js +1 -0
- package/__mf/js/async/kk.f348b428da.js +1 -0
- package/__mf/js/async/kx.49c84b1c51.js +83 -0
- package/__mf/js/async/kx.49c84b1c51.js.LICENSE.txt +55 -0
- package/__mf/js/async/mt.781853f15e.js +92 -0
- package/__mf/js/async/{b.5f50cdb328.js.LICENSE.txt → mt.781853f15e.js.LICENSE.txt} +0 -25
- package/__mf/js/async/o.9ef93c3d4a.js +1 -0
- package/__mf/js/async/{os.7ddd6e9621.js → os.d56e539d46.js} +2 -2
- package/__mf/js/async/p.60ab86d6d6.js +2 -0
- package/__mf/js/async/s.ffd9fa8239.js +1 -0
- package/__mf/js/{main.d9b3dd4bc6.js → main.c3a0244608.js} +4 -4
- package/lib/panels/pulzr-figure-panel/PulzrFigurePanelComponent.d.ts +4 -1
- package/lib/panels/pulzr-figure-panel/PulzrFigurePanelComponent.d.ts.map +1 -1
- package/lib/panels/pulzr-figure-panel/PulzrFigurePanelComponent.js +528 -119
- package/lib/panels/pulzr-figure-panel/PulzrFigurePanelComponent.js.map +1 -1
- package/lib/panels/pulzr-figure-panel/PulzrFigurePanelSettingsEditor.d.ts.map +1 -1
- package/lib/panels/pulzr-figure-panel/PulzrFigurePanelSettingsEditor.js +128 -51
- package/lib/panels/pulzr-figure-panel/PulzrFigurePanelSettingsEditor.js.map +1 -1
- package/lib/panels/pulzr-figure-panel/figure.d.ts +25 -6
- package/lib/panels/pulzr-figure-panel/figure.d.ts.map +1 -1
- package/lib/panels/pulzr-figure-panel/figure.js +43 -11
- package/lib/panels/pulzr-figure-panel/figure.js.map +1 -1
- package/lib/panels/pulzr-figure-panel/pulzr-figure-panel-types.d.ts +22 -2
- package/lib/panels/pulzr-figure-panel/pulzr-figure-panel-types.d.ts.map +1 -1
- package/lib/panels/pulzr-figure-panel/pulzr-figure-panel-types.js.map +1 -1
- package/mf-manifest.json +19 -19
- package/mf-stats.json +19 -19
- package/package.json +1 -1
- package/__mf/js/async/0p.68da90f323.js +0 -2
- package/__mf/js/async/2.18619a1037.js +0 -2
- package/__mf/js/async/5.9d2ef52231.js +0 -83
- package/__mf/js/async/5.9d2ef52231.js.LICENSE.txt +0 -30
- package/__mf/js/async/6.02956de769.js +0 -1
- package/__mf/js/async/__federation_expose_PulzrFigurePanel.e4e9ee3624.js +0 -1
- package/__mf/js/async/b.5f50cdb328.js +0 -92
- package/__mf/js/async/k.7c4213442a.js +0 -1
- package/__mf/js/async/kk.c246b3edb4.js +0 -1
- package/__mf/js/async/o.0d1a3636bd.js +0 -1
- package/__mf/js/async/p.3fb8172ba3.js +0 -2
- package/__mf/js/async/s.f71e79b6e1.js +0 -1
- /package/__mf/css/async/{b.7481ca0159.css → mt.7481ca0159.css} +0 -0
- /package/__mf/js/async/{0.325dac5c70.js.LICENSE.txt → 0.6258e412aa.js.LICENSE.txt} +0 -0
- /package/__mf/js/async/{0p.68da90f323.js.LICENSE.txt → 0p.ac41951f88.js.LICENSE.txt} +0 -0
- /package/__mf/js/async/{2.18619a1037.js.LICENSE.txt → 2.d6d514458f.js.LICENSE.txt} +0 -0
- /package/__mf/js/async/{f.daba8eec81.js.LICENSE.txt → f.287458ee3b.js.LICENSE.txt} +0 -0
- /package/__mf/js/async/{os.7ddd6e9621.js.LICENSE.txt → os.d56e539d46.js.LICENSE.txt} +0 -0
- /package/__mf/js/async/{p.3fb8172ba3.js.LICENSE.txt → p.60ab86d6d6.js.LICENSE.txt} +0 -0
|
@@ -1,31 +1,289 @@
|
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
2
|
import { c as _c } from "react-compiler-runtime";
|
|
3
|
-
import { Box, Typography } from "@mui/material";
|
|
4
|
-
import { formatValue } from "@perses-dev/components";
|
|
5
|
-
import {
|
|
3
|
+
import { Box, Typography, alpha, useTheme } from "@mui/material";
|
|
4
|
+
import { EChart, formatValue, useChartsTheme } from "@perses-dev/components";
|
|
5
|
+
import { LineChart } from "echarts/charts";
|
|
6
|
+
import { GridComponent } from "echarts/components";
|
|
7
|
+
import { color as colors, use as registerECharts } from "echarts/core";
|
|
8
|
+
import { CanvasRenderer } from "echarts/renderers";
|
|
9
|
+
import { BADGE_ARROWS, changeOf, changeText, figureOf, fill, pairOf, sizeChange, timeInParts, valuesOf, valuesOver } from "./figure.js";
|
|
10
|
+
registerECharts([
|
|
11
|
+
LineChart,
|
|
12
|
+
GridComponent,
|
|
13
|
+
CanvasRenderer
|
|
14
|
+
]);
|
|
6
15
|
const numbers = {
|
|
7
16
|
fontFeatureSettings: "'tnum' 1",
|
|
8
17
|
fontVariantNumeric: "tabular-nums"
|
|
9
18
|
};
|
|
10
|
-
/**
|
|
19
|
+
/** A value as text: a time in parts when asked, else by its format. */ function figure(now, format, inParts) {
|
|
11
20
|
if (now === undefined) return "—";
|
|
12
|
-
return
|
|
21
|
+
return inParts && timeInParts(now, format?.unit) || formatValue(now, format);
|
|
13
22
|
}
|
|
14
23
|
const TONE = {
|
|
15
24
|
good: "success.main",
|
|
16
25
|
bad: "error.main",
|
|
17
|
-
flat: "text.
|
|
26
|
+
flat: "text.secondary"
|
|
18
27
|
};
|
|
28
|
+
/** A change as a chip: its text in the tone's color on a soft tint of it, 12px, so a figure's news reads at a glance. */ function chipSx(tone) {
|
|
29
|
+
return {
|
|
30
|
+
...numbers,
|
|
31
|
+
display: "inline-flex",
|
|
32
|
+
alignItems: "center",
|
|
33
|
+
height: 20,
|
|
34
|
+
px: "7px",
|
|
35
|
+
borderRadius: 999,
|
|
36
|
+
fontSize: 12,
|
|
37
|
+
fontWeight: 600,
|
|
38
|
+
lineHeight: 1,
|
|
39
|
+
letterSpacing: 0,
|
|
40
|
+
whiteSpace: "nowrap",
|
|
41
|
+
color: TONE[tone],
|
|
42
|
+
bgcolor: (t)=>tone === "flat" ? t.palette.action.hover : alpha(tone === "good" ? t.palette.success.main : t.palette.error.main, 0.14)
|
|
43
|
+
};
|
|
44
|
+
}
|
|
45
|
+
/** The change, small, as a pillar has it beside a figure: `↗ 133%`, good or bad news. Nothing with nothing before. */ function Badge(t0) {
|
|
46
|
+
const $ = _c(13);
|
|
47
|
+
const { now, before, lowerIsBetter } = t0;
|
|
48
|
+
let T0;
|
|
49
|
+
let change;
|
|
50
|
+
let t1;
|
|
51
|
+
let t2;
|
|
52
|
+
let t3;
|
|
53
|
+
if ($[0] !== before || $[1] !== lowerIsBetter || $[2] !== now) {
|
|
54
|
+
t3 = Symbol.for("react.early_return_sentinel");
|
|
55
|
+
bb0: {
|
|
56
|
+
change = sizeChange(now, before, lowerIsBetter, BADGE_ARROWS);
|
|
57
|
+
if (!change) {
|
|
58
|
+
t3 = null;
|
|
59
|
+
break bb0;
|
|
60
|
+
}
|
|
61
|
+
T0 = Typography;
|
|
62
|
+
t1 = "span";
|
|
63
|
+
t2 = chipSx(change.tone);
|
|
64
|
+
}
|
|
65
|
+
$[0] = before;
|
|
66
|
+
$[1] = lowerIsBetter;
|
|
67
|
+
$[2] = now;
|
|
68
|
+
$[3] = T0;
|
|
69
|
+
$[4] = change;
|
|
70
|
+
$[5] = t1;
|
|
71
|
+
$[6] = t2;
|
|
72
|
+
$[7] = t3;
|
|
73
|
+
} else {
|
|
74
|
+
T0 = $[3];
|
|
75
|
+
change = $[4];
|
|
76
|
+
t1 = $[5];
|
|
77
|
+
t2 = $[6];
|
|
78
|
+
t3 = $[7];
|
|
79
|
+
}
|
|
80
|
+
if (t3 !== Symbol.for("react.early_return_sentinel")) {
|
|
81
|
+
return t3;
|
|
82
|
+
}
|
|
83
|
+
let t4;
|
|
84
|
+
if ($[8] !== T0 || $[9] !== change.text || $[10] !== t1 || $[11] !== t2) {
|
|
85
|
+
t4 = /*#__PURE__*/ _jsx(T0, {
|
|
86
|
+
component: t1,
|
|
87
|
+
sx: t2,
|
|
88
|
+
children: change.text
|
|
89
|
+
});
|
|
90
|
+
$[8] = T0;
|
|
91
|
+
$[9] = change.text;
|
|
92
|
+
$[10] = t1;
|
|
93
|
+
$[11] = t2;
|
|
94
|
+
$[12] = t4;
|
|
95
|
+
} else {
|
|
96
|
+
t4 = $[12];
|
|
97
|
+
}
|
|
98
|
+
return t4;
|
|
99
|
+
}
|
|
100
|
+
/** An area, its line 1.5 wide, fading from the color down: the series' shape over the period. */ function Sparkline(t0) {
|
|
101
|
+
const $ = _c(27);
|
|
102
|
+
const { values, color } = t0;
|
|
103
|
+
const chartsTheme = useChartsTheme();
|
|
104
|
+
let t1;
|
|
105
|
+
let t2;
|
|
106
|
+
let t3;
|
|
107
|
+
if ($[0] === Symbol.for("react.memo_cache_sentinel")) {
|
|
108
|
+
t1 = {
|
|
109
|
+
top: 2,
|
|
110
|
+
right: 0,
|
|
111
|
+
bottom: 0,
|
|
112
|
+
left: 0
|
|
113
|
+
};
|
|
114
|
+
t2 = {
|
|
115
|
+
type: "category",
|
|
116
|
+
show: false,
|
|
117
|
+
boundaryGap: false
|
|
118
|
+
};
|
|
119
|
+
t3 = {
|
|
120
|
+
type: "value",
|
|
121
|
+
show: false
|
|
122
|
+
};
|
|
123
|
+
$[0] = t1;
|
|
124
|
+
$[1] = t2;
|
|
125
|
+
$[2] = t3;
|
|
126
|
+
} else {
|
|
127
|
+
t1 = $[0];
|
|
128
|
+
t2 = $[1];
|
|
129
|
+
t3 = $[2];
|
|
130
|
+
}
|
|
131
|
+
let t4;
|
|
132
|
+
if ($[3] !== color) {
|
|
133
|
+
t4 = {
|
|
134
|
+
color,
|
|
135
|
+
width: 1.5
|
|
136
|
+
};
|
|
137
|
+
$[3] = color;
|
|
138
|
+
$[4] = t4;
|
|
139
|
+
} else {
|
|
140
|
+
t4 = $[4];
|
|
141
|
+
}
|
|
142
|
+
let t5;
|
|
143
|
+
if ($[5] !== color) {
|
|
144
|
+
t5 = colors.modifyAlpha(color, 0.3);
|
|
145
|
+
$[5] = color;
|
|
146
|
+
$[6] = t5;
|
|
147
|
+
} else {
|
|
148
|
+
t5 = $[6];
|
|
149
|
+
}
|
|
150
|
+
let t6;
|
|
151
|
+
if ($[7] !== t5) {
|
|
152
|
+
t6 = {
|
|
153
|
+
offset: 0,
|
|
154
|
+
color: t5
|
|
155
|
+
};
|
|
156
|
+
$[7] = t5;
|
|
157
|
+
$[8] = t6;
|
|
158
|
+
} else {
|
|
159
|
+
t6 = $[8];
|
|
160
|
+
}
|
|
161
|
+
let t7;
|
|
162
|
+
if ($[9] !== color) {
|
|
163
|
+
t7 = colors.modifyAlpha(color, 0);
|
|
164
|
+
$[9] = color;
|
|
165
|
+
$[10] = t7;
|
|
166
|
+
} else {
|
|
167
|
+
t7 = $[10];
|
|
168
|
+
}
|
|
169
|
+
let t8;
|
|
170
|
+
if ($[11] !== t7) {
|
|
171
|
+
t8 = {
|
|
172
|
+
offset: 1,
|
|
173
|
+
color: t7
|
|
174
|
+
};
|
|
175
|
+
$[11] = t7;
|
|
176
|
+
$[12] = t8;
|
|
177
|
+
} else {
|
|
178
|
+
t8 = $[12];
|
|
179
|
+
}
|
|
180
|
+
let t9;
|
|
181
|
+
if ($[13] !== t6 || $[14] !== t8) {
|
|
182
|
+
t9 = {
|
|
183
|
+
opacity: 0.6,
|
|
184
|
+
color: {
|
|
185
|
+
type: "linear",
|
|
186
|
+
x: 0,
|
|
187
|
+
y: 0,
|
|
188
|
+
x2: 0,
|
|
189
|
+
y2: 1,
|
|
190
|
+
colorStops: [
|
|
191
|
+
t6,
|
|
192
|
+
t8
|
|
193
|
+
]
|
|
194
|
+
}
|
|
195
|
+
};
|
|
196
|
+
$[13] = t6;
|
|
197
|
+
$[14] = t8;
|
|
198
|
+
$[15] = t9;
|
|
199
|
+
} else {
|
|
200
|
+
t9 = $[15];
|
|
201
|
+
}
|
|
202
|
+
let t10;
|
|
203
|
+
if ($[16] !== t4 || $[17] !== t9 || $[18] !== values) {
|
|
204
|
+
t10 = {
|
|
205
|
+
animation: false,
|
|
206
|
+
grid: t1,
|
|
207
|
+
xAxis: t2,
|
|
208
|
+
yAxis: t3,
|
|
209
|
+
series: [
|
|
210
|
+
{
|
|
211
|
+
type: "line",
|
|
212
|
+
data: values,
|
|
213
|
+
smooth: true,
|
|
214
|
+
smoothMonotone: "x",
|
|
215
|
+
symbol: "none",
|
|
216
|
+
silent: true,
|
|
217
|
+
lineStyle: t4,
|
|
218
|
+
areaStyle: t9
|
|
219
|
+
}
|
|
220
|
+
]
|
|
221
|
+
};
|
|
222
|
+
$[16] = t4;
|
|
223
|
+
$[17] = t9;
|
|
224
|
+
$[18] = values;
|
|
225
|
+
$[19] = t10;
|
|
226
|
+
} else {
|
|
227
|
+
t10 = $[19];
|
|
228
|
+
}
|
|
229
|
+
const option = t10;
|
|
230
|
+
let t11;
|
|
231
|
+
if ($[20] === Symbol.for("react.memo_cache_sentinel")) {
|
|
232
|
+
t11 = {
|
|
233
|
+
height: 32,
|
|
234
|
+
m: "4px -2px 6px"
|
|
235
|
+
};
|
|
236
|
+
$[20] = t11;
|
|
237
|
+
} else {
|
|
238
|
+
t11 = $[20];
|
|
239
|
+
}
|
|
240
|
+
let t12;
|
|
241
|
+
if ($[21] !== chartsTheme || $[22] !== option || $[23] !== values.length) {
|
|
242
|
+
t12 = values.length > 1 && /*#__PURE__*/ _jsx(EChart, {
|
|
243
|
+
option: option,
|
|
244
|
+
theme: chartsTheme.echartsTheme,
|
|
245
|
+
sx: {
|
|
246
|
+
width: "100%",
|
|
247
|
+
height: "100%"
|
|
248
|
+
}
|
|
249
|
+
});
|
|
250
|
+
$[21] = chartsTheme;
|
|
251
|
+
$[22] = option;
|
|
252
|
+
$[23] = values.length;
|
|
253
|
+
$[24] = t12;
|
|
254
|
+
} else {
|
|
255
|
+
t12 = $[24];
|
|
256
|
+
}
|
|
257
|
+
let t13;
|
|
258
|
+
if ($[25] !== t12) {
|
|
259
|
+
t13 = /*#__PURE__*/ _jsx(Box, {
|
|
260
|
+
sx: t11,
|
|
261
|
+
children: t12
|
|
262
|
+
});
|
|
263
|
+
$[25] = t12;
|
|
264
|
+
$[26] = t13;
|
|
265
|
+
} else {
|
|
266
|
+
t13 = $[26];
|
|
267
|
+
}
|
|
268
|
+
return t13;
|
|
269
|
+
}
|
|
19
270
|
/**
|
|
20
271
|
* The line under the figure: its change in the style asked, good news in the success color, bad in the error
|
|
21
272
|
* color, flat quiet; or the caption, secondary, with nothing to compare with.
|
|
22
273
|
*/ function changeLine(now, before, spec) {
|
|
23
274
|
const label = spec.comparedLabel ?? "vs the period before";
|
|
275
|
+
if (spec.changeStyle === "badge") {
|
|
276
|
+
return {
|
|
277
|
+
line: sizeChange(now, before) ? undefined : spec.caption,
|
|
278
|
+
lineColor: "text.secondary"
|
|
279
|
+
};
|
|
280
|
+
}
|
|
24
281
|
if (spec.changeStyle === "size") {
|
|
25
282
|
const change = sizeChange(now, before, spec.lowerIsBetter);
|
|
26
283
|
return change ? {
|
|
27
|
-
line:
|
|
28
|
-
lineColor:
|
|
284
|
+
line: label,
|
|
285
|
+
lineColor: "text.secondary",
|
|
286
|
+
chip: change
|
|
29
287
|
} : {
|
|
30
288
|
line: spec.caption,
|
|
31
289
|
lineColor: "text.secondary"
|
|
@@ -46,165 +304,316 @@ const TONE = {
|
|
|
46
304
|
lineColor: good ? TONE.good : TONE.bad
|
|
47
305
|
};
|
|
48
306
|
}
|
|
49
|
-
/**
|
|
50
|
-
|
|
307
|
+
/**
|
|
308
|
+
* One figure, large and bold in the text color, and under it its change against the period before (or a caption); as a pillar, bold
|
|
309
|
+
* with its change beside it, a sparkline and a list of figures under it.
|
|
310
|
+
*/ export function PulzrFigurePanelComponent(t0) {
|
|
311
|
+
const $ = _c(47);
|
|
51
312
|
const { queryResults, spec } = t0;
|
|
313
|
+
const theme = useTheme();
|
|
314
|
+
let T0;
|
|
52
315
|
let t1;
|
|
316
|
+
let t2;
|
|
317
|
+
let t3;
|
|
318
|
+
let t4;
|
|
319
|
+
let t5;
|
|
53
320
|
if ($[0] !== queryResults || $[1] !== spec) {
|
|
54
|
-
|
|
321
|
+
let t6;
|
|
322
|
+
if ($[8] !== spec.rows) {
|
|
323
|
+
t6 = spec.rows ?? [];
|
|
324
|
+
$[8] = spec.rows;
|
|
325
|
+
$[9] = t6;
|
|
326
|
+
} else {
|
|
327
|
+
t6 = $[9];
|
|
328
|
+
}
|
|
329
|
+
const others = [
|
|
330
|
+
...spec.sparkline ? [
|
|
331
|
+
spec.sparkline.series
|
|
332
|
+
] : [],
|
|
333
|
+
...t6.map(_temp)
|
|
334
|
+
];
|
|
335
|
+
const { now, before, total } = figureOf(queryResults, spec.of?.series, others);
|
|
55
336
|
const values = spec.subtitle || spec.detail ? valuesOf(queryResults) : undefined;
|
|
56
|
-
const { line, lineColor } = changeLine(now, before, spec);
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
337
|
+
const { line, lineColor, chip } = changeLine(now, before, spec);
|
|
338
|
+
const badge = spec.changeStyle === "badge";
|
|
339
|
+
T0 = Box;
|
|
340
|
+
if ($[10] === Symbol.for("react.memo_cache_sentinel")) {
|
|
341
|
+
t1 = {
|
|
60
342
|
px: "10px",
|
|
61
343
|
pt: "2px",
|
|
62
344
|
pb: "7px",
|
|
63
345
|
minWidth: 0,
|
|
64
346
|
overflow: "hidden"
|
|
65
347
|
};
|
|
66
|
-
$[
|
|
348
|
+
$[10] = t1;
|
|
349
|
+
} else {
|
|
350
|
+
t1 = $[10];
|
|
351
|
+
}
|
|
352
|
+
t2 = spec.subtitle && values && /*#__PURE__*/ _jsx(Typography, {
|
|
353
|
+
component: "div",
|
|
354
|
+
sx: {
|
|
355
|
+
fontSize: 12,
|
|
356
|
+
lineHeight: "16px",
|
|
357
|
+
color: "text.secondary",
|
|
358
|
+
mt: "-2px",
|
|
359
|
+
mb: "2px",
|
|
360
|
+
whiteSpace: "nowrap",
|
|
361
|
+
overflow: "hidden",
|
|
362
|
+
textOverflow: "ellipsis"
|
|
363
|
+
},
|
|
364
|
+
children: fill(spec.subtitle, values)
|
|
365
|
+
});
|
|
366
|
+
let t7;
|
|
367
|
+
if ($[11] !== badge) {
|
|
368
|
+
t7 = badge ? {
|
|
369
|
+
display: "flex",
|
|
370
|
+
alignItems: "center",
|
|
371
|
+
gap: "8px"
|
|
372
|
+
} : {};
|
|
373
|
+
$[11] = badge;
|
|
374
|
+
$[12] = t7;
|
|
67
375
|
} else {
|
|
68
|
-
|
|
376
|
+
t7 = $[12];
|
|
69
377
|
}
|
|
70
|
-
const
|
|
71
|
-
let
|
|
72
|
-
if ($[
|
|
73
|
-
|
|
378
|
+
const t8 = spec.color ?? "text.primary";
|
|
379
|
+
let t9;
|
|
380
|
+
if ($[13] !== t7 || $[14] !== t8) {
|
|
381
|
+
t9 = {
|
|
74
382
|
...numbers,
|
|
75
|
-
fontSize:
|
|
76
|
-
fontWeight:
|
|
77
|
-
lineHeight:
|
|
78
|
-
letterSpacing: "-0.
|
|
383
|
+
fontSize: 28,
|
|
384
|
+
fontWeight: 700,
|
|
385
|
+
lineHeight: "32px",
|
|
386
|
+
letterSpacing: "-0.01em",
|
|
387
|
+
...t7,
|
|
79
388
|
mb: "4px",
|
|
80
|
-
color:
|
|
389
|
+
color: t8
|
|
81
390
|
};
|
|
82
|
-
$[
|
|
83
|
-
$[
|
|
391
|
+
$[13] = t7;
|
|
392
|
+
$[14] = t8;
|
|
393
|
+
$[15] = t9;
|
|
84
394
|
} else {
|
|
85
|
-
|
|
395
|
+
t9 = $[15];
|
|
86
396
|
}
|
|
87
|
-
let
|
|
88
|
-
if ($[
|
|
89
|
-
|
|
90
|
-
$[
|
|
91
|
-
$[
|
|
92
|
-
$[
|
|
397
|
+
let t10;
|
|
398
|
+
if ($[16] !== now || $[17] !== spec.format || $[18] !== spec.timeInParts) {
|
|
399
|
+
t10 = figure(now, spec.format, spec.timeInParts);
|
|
400
|
+
$[16] = now;
|
|
401
|
+
$[17] = spec.format;
|
|
402
|
+
$[18] = spec.timeInParts;
|
|
403
|
+
$[19] = t10;
|
|
93
404
|
} else {
|
|
94
|
-
|
|
405
|
+
t10 = $[19];
|
|
95
406
|
}
|
|
96
|
-
let
|
|
97
|
-
if ($[
|
|
98
|
-
|
|
407
|
+
let t11;
|
|
408
|
+
if ($[20] !== badge || $[21] !== now || $[22] !== spec.of || $[23] !== total) {
|
|
409
|
+
t11 = spec.of && total !== undefined && now !== undefined && /*#__PURE__*/ _jsx(Typography, {
|
|
99
410
|
component: "span",
|
|
100
411
|
sx: {
|
|
101
412
|
...numbers,
|
|
102
413
|
fontSize: 13,
|
|
103
414
|
fontWeight: 400,
|
|
104
|
-
letterSpacing:
|
|
415
|
+
letterSpacing: 0,
|
|
105
416
|
color: "text.secondary",
|
|
106
|
-
ml: "8px",
|
|
417
|
+
ml: badge ? 0 : "8px",
|
|
107
418
|
whiteSpace: "nowrap"
|
|
108
419
|
},
|
|
109
420
|
children: `${Math.round(now * total)}/${total}${spec.of.label ? ` ${spec.of.label}` : ""}`
|
|
110
421
|
});
|
|
111
|
-
$[
|
|
112
|
-
$[
|
|
113
|
-
$[
|
|
114
|
-
$[
|
|
422
|
+
$[20] = badge;
|
|
423
|
+
$[21] = now;
|
|
424
|
+
$[22] = spec.of;
|
|
425
|
+
$[23] = total;
|
|
426
|
+
$[24] = t11;
|
|
115
427
|
} else {
|
|
116
|
-
|
|
428
|
+
t11 = $[24];
|
|
117
429
|
}
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
430
|
+
const t12 = badge && /*#__PURE__*/ _jsx(Badge, {
|
|
431
|
+
now: now,
|
|
432
|
+
before: before,
|
|
433
|
+
lowerIsBetter: spec.lowerIsBetter
|
|
434
|
+
});
|
|
435
|
+
if ($[25] !== t10 || $[26] !== t11 || $[27] !== t12 || $[28] !== t9) {
|
|
436
|
+
t3 = /*#__PURE__*/ _jsxs(Typography, {
|
|
121
437
|
component: "div",
|
|
122
|
-
sx:
|
|
438
|
+
sx: t9,
|
|
123
439
|
children: [
|
|
124
|
-
|
|
125
|
-
|
|
440
|
+
t10,
|
|
441
|
+
t11,
|
|
442
|
+
t12
|
|
126
443
|
]
|
|
127
444
|
});
|
|
128
|
-
$[
|
|
129
|
-
$[
|
|
130
|
-
$[
|
|
131
|
-
$[
|
|
132
|
-
|
|
133
|
-
t7 = $[16];
|
|
134
|
-
}
|
|
135
|
-
let t8;
|
|
136
|
-
if ($[17] !== line || $[18] !== lineColor) {
|
|
137
|
-
t8 = line && /*#__PURE__*/ _jsx(Typography, {
|
|
138
|
-
component: "div",
|
|
139
|
-
sx: {
|
|
140
|
-
...numbers,
|
|
141
|
-
fontSize: 10,
|
|
142
|
-
fontWeight: 500,
|
|
143
|
-
lineHeight: 1.4,
|
|
144
|
-
letterSpacing: "0.02em",
|
|
145
|
-
textTransform: "uppercase",
|
|
146
|
-
whiteSpace: "nowrap",
|
|
147
|
-
overflow: "hidden",
|
|
148
|
-
textOverflow: "ellipsis",
|
|
149
|
-
color: lineColor
|
|
150
|
-
},
|
|
151
|
-
children: line
|
|
152
|
-
});
|
|
153
|
-
$[17] = line;
|
|
154
|
-
$[18] = lineColor;
|
|
155
|
-
$[19] = t8;
|
|
445
|
+
$[25] = t10;
|
|
446
|
+
$[26] = t11;
|
|
447
|
+
$[27] = t12;
|
|
448
|
+
$[28] = t9;
|
|
449
|
+
$[29] = t3;
|
|
156
450
|
} else {
|
|
157
|
-
|
|
451
|
+
t3 = $[29];
|
|
158
452
|
}
|
|
159
|
-
|
|
160
|
-
|
|
453
|
+
t4 = line && /*#__PURE__*/ _jsxs(Typography, {
|
|
454
|
+
component: "div",
|
|
455
|
+
sx: {
|
|
456
|
+
...numbers,
|
|
457
|
+
display: "flex",
|
|
458
|
+
alignItems: "center",
|
|
459
|
+
gap: "6px",
|
|
460
|
+
fontSize: 12,
|
|
461
|
+
fontWeight: chip ? 400 : 500,
|
|
462
|
+
lineHeight: "20px",
|
|
463
|
+
whiteSpace: "nowrap",
|
|
464
|
+
overflow: "hidden",
|
|
465
|
+
textOverflow: "ellipsis",
|
|
466
|
+
color: lineColor
|
|
467
|
+
},
|
|
161
468
|
children: [
|
|
162
|
-
|
|
163
|
-
component: "
|
|
164
|
-
sx:
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
mt: "-4px",
|
|
170
|
-
mb: "2px",
|
|
171
|
-
whiteSpace: "nowrap",
|
|
469
|
+
chip && /*#__PURE__*/ _jsx(Typography, {
|
|
470
|
+
component: "span",
|
|
471
|
+
sx: chipSx(chip.tone),
|
|
472
|
+
children: chip.text
|
|
473
|
+
}),
|
|
474
|
+
/*#__PURE__*/ _jsx("span", {
|
|
475
|
+
style: {
|
|
172
476
|
overflow: "hidden",
|
|
173
477
|
textOverflow: "ellipsis"
|
|
174
478
|
},
|
|
175
|
-
children:
|
|
176
|
-
}),
|
|
177
|
-
t7,
|
|
178
|
-
t8,
|
|
179
|
-
spec.detail && values && /*#__PURE__*/ _jsx(Typography, {
|
|
180
|
-
component: "div",
|
|
181
|
-
sx: {
|
|
182
|
-
...numbers,
|
|
183
|
-
display: "inline-block",
|
|
184
|
-
fontSize: 9,
|
|
185
|
-
fontWeight: 500,
|
|
186
|
-
lineHeight: 1.4,
|
|
187
|
-
letterSpacing: "0.04em",
|
|
188
|
-
textTransform: "uppercase",
|
|
189
|
-
color: "text.secondary",
|
|
190
|
-
mt: "5px",
|
|
191
|
-
px: "6px",
|
|
192
|
-
py: "2px",
|
|
193
|
-
bgcolor: "action.hover",
|
|
194
|
-
border: 1,
|
|
195
|
-
borderColor: "divider"
|
|
196
|
-
},
|
|
197
|
-
children: fill(spec.detail, values)
|
|
479
|
+
children: line
|
|
198
480
|
})
|
|
199
481
|
]
|
|
200
482
|
});
|
|
483
|
+
t5 = spec.detail && values && /*#__PURE__*/ _jsx(Typography, {
|
|
484
|
+
component: "div",
|
|
485
|
+
sx: {
|
|
486
|
+
...numbers,
|
|
487
|
+
fontSize: 12,
|
|
488
|
+
fontWeight: 400,
|
|
489
|
+
lineHeight: "16px",
|
|
490
|
+
color: "text.secondary",
|
|
491
|
+
mt: "4px"
|
|
492
|
+
},
|
|
493
|
+
children: fill(spec.detail, values)
|
|
494
|
+
});
|
|
201
495
|
$[0] = queryResults;
|
|
202
496
|
$[1] = spec;
|
|
203
|
-
$[2] =
|
|
497
|
+
$[2] = T0;
|
|
498
|
+
$[3] = t1;
|
|
499
|
+
$[4] = t2;
|
|
500
|
+
$[5] = t3;
|
|
501
|
+
$[6] = t4;
|
|
502
|
+
$[7] = t5;
|
|
503
|
+
} else {
|
|
504
|
+
T0 = $[2];
|
|
505
|
+
t1 = $[3];
|
|
506
|
+
t2 = $[4];
|
|
507
|
+
t3 = $[5];
|
|
508
|
+
t4 = $[6];
|
|
509
|
+
t5 = $[7];
|
|
510
|
+
}
|
|
511
|
+
let t6;
|
|
512
|
+
if ($[30] !== queryResults || $[31] !== spec.color || $[32] !== spec.sparkline || $[33] !== theme) {
|
|
513
|
+
t6 = spec.sparkline && /*#__PURE__*/ _jsx(Sparkline, {
|
|
514
|
+
values: valuesOver(queryResults, spec.sparkline.series),
|
|
515
|
+
color: spec.sparkline.color ?? spec.color ?? theme.palette.text.primary
|
|
516
|
+
});
|
|
517
|
+
$[30] = queryResults;
|
|
518
|
+
$[31] = spec.color;
|
|
519
|
+
$[32] = spec.sparkline;
|
|
520
|
+
$[33] = theme;
|
|
521
|
+
$[34] = t6;
|
|
204
522
|
} else {
|
|
205
|
-
|
|
523
|
+
t6 = $[34];
|
|
206
524
|
}
|
|
207
|
-
|
|
525
|
+
let t7;
|
|
526
|
+
if ($[35] !== queryResults || $[36] !== spec.rows) {
|
|
527
|
+
t7 = spec.rows && spec.rows.length > 0 && /*#__PURE__*/ _jsx(Box, {
|
|
528
|
+
component: "dl",
|
|
529
|
+
sx: {
|
|
530
|
+
display: "flex",
|
|
531
|
+
flexDirection: "column",
|
|
532
|
+
gap: "1px",
|
|
533
|
+
m: 0
|
|
534
|
+
},
|
|
535
|
+
children: spec.rows.map((row)=>{
|
|
536
|
+
const pair = pairOf(queryResults, row.series);
|
|
537
|
+
return /*#__PURE__*/ _jsxs(Box, {
|
|
538
|
+
sx: {
|
|
539
|
+
display: "flex",
|
|
540
|
+
alignItems: "center",
|
|
541
|
+
justifyContent: "space-between",
|
|
542
|
+
gap: "10px",
|
|
543
|
+
py: "4px",
|
|
544
|
+
borderTop: 1,
|
|
545
|
+
borderColor: "divider",
|
|
546
|
+
fontSize: 12
|
|
547
|
+
},
|
|
548
|
+
children: [
|
|
549
|
+
/*#__PURE__*/ _jsx(Box, {
|
|
550
|
+
component: "dt",
|
|
551
|
+
sx: {
|
|
552
|
+
color: "text.secondary",
|
|
553
|
+
minWidth: 0
|
|
554
|
+
},
|
|
555
|
+
children: row.label
|
|
556
|
+
}),
|
|
557
|
+
/*#__PURE__*/ _jsxs(Box, {
|
|
558
|
+
component: "dd",
|
|
559
|
+
sx: {
|
|
560
|
+
...numbers,
|
|
561
|
+
display: "inline-flex",
|
|
562
|
+
alignItems: "center",
|
|
563
|
+
gap: "6px",
|
|
564
|
+
m: 0,
|
|
565
|
+
color: "text.primary",
|
|
566
|
+
whiteSpace: "nowrap"
|
|
567
|
+
},
|
|
568
|
+
children: [
|
|
569
|
+
figure(pair.now, row.format, row.timeInParts),
|
|
570
|
+
row.suffix && pair.now !== undefined && ` ${row.suffix}`,
|
|
571
|
+
/*#__PURE__*/ _jsx(Badge, {
|
|
572
|
+
now: pair.now,
|
|
573
|
+
before: pair.before,
|
|
574
|
+
lowerIsBetter: row.lowerIsBetter
|
|
575
|
+
})
|
|
576
|
+
]
|
|
577
|
+
})
|
|
578
|
+
]
|
|
579
|
+
}, row.label);
|
|
580
|
+
})
|
|
581
|
+
});
|
|
582
|
+
$[35] = queryResults;
|
|
583
|
+
$[36] = spec.rows;
|
|
584
|
+
$[37] = t7;
|
|
585
|
+
} else {
|
|
586
|
+
t7 = $[37];
|
|
587
|
+
}
|
|
588
|
+
let t8;
|
|
589
|
+
if ($[38] !== T0 || $[39] !== t1 || $[40] !== t2 || $[41] !== t3 || $[42] !== t4 || $[43] !== t5 || $[44] !== t6 || $[45] !== t7) {
|
|
590
|
+
t8 = /*#__PURE__*/ _jsxs(T0, {
|
|
591
|
+
sx: t1,
|
|
592
|
+
children: [
|
|
593
|
+
t2,
|
|
594
|
+
t3,
|
|
595
|
+
t4,
|
|
596
|
+
t5,
|
|
597
|
+
t6,
|
|
598
|
+
t7
|
|
599
|
+
]
|
|
600
|
+
});
|
|
601
|
+
$[38] = T0;
|
|
602
|
+
$[39] = t1;
|
|
603
|
+
$[40] = t2;
|
|
604
|
+
$[41] = t3;
|
|
605
|
+
$[42] = t4;
|
|
606
|
+
$[43] = t5;
|
|
607
|
+
$[44] = t6;
|
|
608
|
+
$[45] = t7;
|
|
609
|
+
$[46] = t8;
|
|
610
|
+
} else {
|
|
611
|
+
t8 = $[46];
|
|
612
|
+
}
|
|
613
|
+
return t8;
|
|
614
|
+
}
|
|
615
|
+
function _temp(r) {
|
|
616
|
+
return r.series;
|
|
208
617
|
}
|
|
209
618
|
|
|
210
619
|
//# sourceMappingURL=PulzrFigurePanelComponent.js.map
|