@pulzr/perses-figure-panel 0.2.0 → 0.3.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 +21 -0
- package/__mf/js/{PulzrFigurePanel.222ed57f17.js → PulzrFigurePanel.b29c14b507.js} +2 -2
- package/__mf/js/async/{0.73358ef06f.js → 0.ee9b9a050d.js} +2 -2
- package/__mf/js/async/{0p.a434b768a9.js → 0p.810fbfea5e.js} +2 -2
- package/__mf/js/async/{2.eb2d03fe10.js → 2.e0e77c51ac.js} +2 -2
- package/__mf/js/async/{6.bf1ee74593.js → 6.1033156971.js} +1 -1
- package/__mf/js/async/{9.dc16e89090.js → 9.f20ad249a8.js} +1 -1
- package/__mf/js/async/__federation_expose_PulzrFigurePanel.9472172973.js +1 -0
- package/__mf/js/async/{f.6ef0146b6f.js → f.9b147c6255.js} +2 -2
- package/__mf/js/async/k.39678d65e5.js +1 -0
- package/__mf/js/async/kk.62383e2b13.js +1 -0
- package/__mf/js/async/kx.899711f01e.js +83 -0
- package/__mf/js/async/kx.899711f01e.js.LICENSE.txt +55 -0
- package/__mf/js/async/mt.918f7f9b24.js +92 -0
- package/__mf/js/async/{b.09e9dadd98.js.LICENSE.txt → mt.918f7f9b24.js.LICENSE.txt} +0 -25
- package/__mf/js/async/{o.d3ab28c6c2.js → o.ec154e6ff6.js} +1 -1
- package/__mf/js/async/{os.61448719cf.js → os.e5e40daae1.js} +2 -2
- package/__mf/js/async/{p.f145ba64f8.js → p.4a73008e86.js} +2 -2
- package/__mf/js/async/{s.c517b47b4d.js → s.658d6a4164.js} +1 -1
- package/__mf/js/{main.fb996ef195.js → main.386bdfecce.js} +2 -2
- 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 +499 -101
- 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/5.b8898f130f.js +0 -83
- package/__mf/js/async/5.b8898f130f.js.LICENSE.txt +0 -30
- package/__mf/js/async/__federation_expose_PulzrFigurePanel.1c3d39adbe.js +0 -1
- package/__mf/js/async/b.09e9dadd98.js +0 -92
- package/__mf/js/async/k.d692a3f373.js +0 -1
- package/__mf/js/async/kk.50088d6550.js +0 -1
- /package/__mf/css/async/{b.7481ca0159.css → mt.7481ca0159.css} +0 -0
- /package/__mf/js/async/{0.73358ef06f.js.LICENSE.txt → 0.ee9b9a050d.js.LICENSE.txt} +0 -0
- /package/__mf/js/async/{0p.a434b768a9.js.LICENSE.txt → 0p.810fbfea5e.js.LICENSE.txt} +0 -0
- /package/__mf/js/async/{2.eb2d03fe10.js.LICENSE.txt → 2.e0e77c51ac.js.LICENSE.txt} +0 -0
- /package/__mf/js/async/{f.6ef0146b6f.js.LICENSE.txt → f.9b147c6255.js.LICENSE.txt} +0 -0
- /package/__mf/js/async/{os.61448719cf.js.LICENSE.txt → os.e5e40daae1.js.LICENSE.txt} +0 -0
- /package/__mf/js/async/{p.f145ba64f8.js.LICENSE.txt → p.4a73008e86.js.LICENSE.txt} +0 -0
|
@@ -1,26 +1,258 @@
|
|
|
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, 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
26
|
flat: "text.disabled"
|
|
18
27
|
};
|
|
28
|
+
/** The change, small, as a pillar has it beside a figure: `↗ 133%`, good or bad news. Nothing with nothing before. */ function Badge(t0) {
|
|
29
|
+
const $ = _c(9);
|
|
30
|
+
const { now, before, lowerIsBetter } = t0;
|
|
31
|
+
let t1;
|
|
32
|
+
if ($[0] !== before || $[1] !== lowerIsBetter || $[2] !== now) {
|
|
33
|
+
t1 = sizeChange(now, before, lowerIsBetter, BADGE_ARROWS);
|
|
34
|
+
$[0] = before;
|
|
35
|
+
$[1] = lowerIsBetter;
|
|
36
|
+
$[2] = now;
|
|
37
|
+
$[3] = t1;
|
|
38
|
+
} else {
|
|
39
|
+
t1 = $[3];
|
|
40
|
+
}
|
|
41
|
+
const change = t1;
|
|
42
|
+
if (!change) {
|
|
43
|
+
return null;
|
|
44
|
+
}
|
|
45
|
+
const t2 = TONE[change.tone];
|
|
46
|
+
let t3;
|
|
47
|
+
if ($[4] !== t2) {
|
|
48
|
+
t3 = {
|
|
49
|
+
...numbers,
|
|
50
|
+
fontSize: 11,
|
|
51
|
+
fontWeight: 600,
|
|
52
|
+
whiteSpace: "nowrap",
|
|
53
|
+
color: t2
|
|
54
|
+
};
|
|
55
|
+
$[4] = t2;
|
|
56
|
+
$[5] = t3;
|
|
57
|
+
} else {
|
|
58
|
+
t3 = $[5];
|
|
59
|
+
}
|
|
60
|
+
let t4;
|
|
61
|
+
if ($[6] !== change.text || $[7] !== t3) {
|
|
62
|
+
t4 = /*#__PURE__*/ _jsx(Typography, {
|
|
63
|
+
component: "span",
|
|
64
|
+
sx: t3,
|
|
65
|
+
children: change.text
|
|
66
|
+
});
|
|
67
|
+
$[6] = change.text;
|
|
68
|
+
$[7] = t3;
|
|
69
|
+
$[8] = t4;
|
|
70
|
+
} else {
|
|
71
|
+
t4 = $[8];
|
|
72
|
+
}
|
|
73
|
+
return t4;
|
|
74
|
+
}
|
|
75
|
+
/** An area, its line 1.5 wide, fading from the color down: the series' shape over the period. */ function Sparkline(t0) {
|
|
76
|
+
const $ = _c(27);
|
|
77
|
+
const { values, color } = t0;
|
|
78
|
+
const chartsTheme = useChartsTheme();
|
|
79
|
+
let t1;
|
|
80
|
+
let t2;
|
|
81
|
+
let t3;
|
|
82
|
+
if ($[0] === Symbol.for("react.memo_cache_sentinel")) {
|
|
83
|
+
t1 = {
|
|
84
|
+
top: 2,
|
|
85
|
+
right: 0,
|
|
86
|
+
bottom: 0,
|
|
87
|
+
left: 0
|
|
88
|
+
};
|
|
89
|
+
t2 = {
|
|
90
|
+
type: "category",
|
|
91
|
+
show: false,
|
|
92
|
+
boundaryGap: false
|
|
93
|
+
};
|
|
94
|
+
t3 = {
|
|
95
|
+
type: "value",
|
|
96
|
+
show: false
|
|
97
|
+
};
|
|
98
|
+
$[0] = t1;
|
|
99
|
+
$[1] = t2;
|
|
100
|
+
$[2] = t3;
|
|
101
|
+
} else {
|
|
102
|
+
t1 = $[0];
|
|
103
|
+
t2 = $[1];
|
|
104
|
+
t3 = $[2];
|
|
105
|
+
}
|
|
106
|
+
let t4;
|
|
107
|
+
if ($[3] !== color) {
|
|
108
|
+
t4 = {
|
|
109
|
+
color,
|
|
110
|
+
width: 1.5
|
|
111
|
+
};
|
|
112
|
+
$[3] = color;
|
|
113
|
+
$[4] = t4;
|
|
114
|
+
} else {
|
|
115
|
+
t4 = $[4];
|
|
116
|
+
}
|
|
117
|
+
let t5;
|
|
118
|
+
if ($[5] !== color) {
|
|
119
|
+
t5 = colors.modifyAlpha(color, 0.3);
|
|
120
|
+
$[5] = color;
|
|
121
|
+
$[6] = t5;
|
|
122
|
+
} else {
|
|
123
|
+
t5 = $[6];
|
|
124
|
+
}
|
|
125
|
+
let t6;
|
|
126
|
+
if ($[7] !== t5) {
|
|
127
|
+
t6 = {
|
|
128
|
+
offset: 0,
|
|
129
|
+
color: t5
|
|
130
|
+
};
|
|
131
|
+
$[7] = t5;
|
|
132
|
+
$[8] = t6;
|
|
133
|
+
} else {
|
|
134
|
+
t6 = $[8];
|
|
135
|
+
}
|
|
136
|
+
let t7;
|
|
137
|
+
if ($[9] !== color) {
|
|
138
|
+
t7 = colors.modifyAlpha(color, 0);
|
|
139
|
+
$[9] = color;
|
|
140
|
+
$[10] = t7;
|
|
141
|
+
} else {
|
|
142
|
+
t7 = $[10];
|
|
143
|
+
}
|
|
144
|
+
let t8;
|
|
145
|
+
if ($[11] !== t7) {
|
|
146
|
+
t8 = {
|
|
147
|
+
offset: 1,
|
|
148
|
+
color: t7
|
|
149
|
+
};
|
|
150
|
+
$[11] = t7;
|
|
151
|
+
$[12] = t8;
|
|
152
|
+
} else {
|
|
153
|
+
t8 = $[12];
|
|
154
|
+
}
|
|
155
|
+
let t9;
|
|
156
|
+
if ($[13] !== t6 || $[14] !== t8) {
|
|
157
|
+
t9 = {
|
|
158
|
+
opacity: 0.6,
|
|
159
|
+
color: {
|
|
160
|
+
type: "linear",
|
|
161
|
+
x: 0,
|
|
162
|
+
y: 0,
|
|
163
|
+
x2: 0,
|
|
164
|
+
y2: 1,
|
|
165
|
+
colorStops: [
|
|
166
|
+
t6,
|
|
167
|
+
t8
|
|
168
|
+
]
|
|
169
|
+
}
|
|
170
|
+
};
|
|
171
|
+
$[13] = t6;
|
|
172
|
+
$[14] = t8;
|
|
173
|
+
$[15] = t9;
|
|
174
|
+
} else {
|
|
175
|
+
t9 = $[15];
|
|
176
|
+
}
|
|
177
|
+
let t10;
|
|
178
|
+
if ($[16] !== t4 || $[17] !== t9 || $[18] !== values) {
|
|
179
|
+
t10 = {
|
|
180
|
+
animation: false,
|
|
181
|
+
grid: t1,
|
|
182
|
+
xAxis: t2,
|
|
183
|
+
yAxis: t3,
|
|
184
|
+
series: [
|
|
185
|
+
{
|
|
186
|
+
type: "line",
|
|
187
|
+
data: values,
|
|
188
|
+
smooth: true,
|
|
189
|
+
smoothMonotone: "x",
|
|
190
|
+
symbol: "none",
|
|
191
|
+
silent: true,
|
|
192
|
+
lineStyle: t4,
|
|
193
|
+
areaStyle: t9
|
|
194
|
+
}
|
|
195
|
+
]
|
|
196
|
+
};
|
|
197
|
+
$[16] = t4;
|
|
198
|
+
$[17] = t9;
|
|
199
|
+
$[18] = values;
|
|
200
|
+
$[19] = t10;
|
|
201
|
+
} else {
|
|
202
|
+
t10 = $[19];
|
|
203
|
+
}
|
|
204
|
+
const option = t10;
|
|
205
|
+
let t11;
|
|
206
|
+
if ($[20] === Symbol.for("react.memo_cache_sentinel")) {
|
|
207
|
+
t11 = {
|
|
208
|
+
height: 32,
|
|
209
|
+
m: "4px -2px 6px"
|
|
210
|
+
};
|
|
211
|
+
$[20] = t11;
|
|
212
|
+
} else {
|
|
213
|
+
t11 = $[20];
|
|
214
|
+
}
|
|
215
|
+
let t12;
|
|
216
|
+
if ($[21] !== chartsTheme || $[22] !== option || $[23] !== values.length) {
|
|
217
|
+
t12 = values.length > 1 && /*#__PURE__*/ _jsx(EChart, {
|
|
218
|
+
option: option,
|
|
219
|
+
theme: chartsTheme.echartsTheme,
|
|
220
|
+
sx: {
|
|
221
|
+
width: "100%",
|
|
222
|
+
height: "100%"
|
|
223
|
+
}
|
|
224
|
+
});
|
|
225
|
+
$[21] = chartsTheme;
|
|
226
|
+
$[22] = option;
|
|
227
|
+
$[23] = values.length;
|
|
228
|
+
$[24] = t12;
|
|
229
|
+
} else {
|
|
230
|
+
t12 = $[24];
|
|
231
|
+
}
|
|
232
|
+
let t13;
|
|
233
|
+
if ($[25] !== t12) {
|
|
234
|
+
t13 = /*#__PURE__*/ _jsx(Box, {
|
|
235
|
+
sx: t11,
|
|
236
|
+
children: t12
|
|
237
|
+
});
|
|
238
|
+
$[25] = t12;
|
|
239
|
+
$[26] = t13;
|
|
240
|
+
} else {
|
|
241
|
+
t13 = $[26];
|
|
242
|
+
}
|
|
243
|
+
return t13;
|
|
244
|
+
}
|
|
19
245
|
/**
|
|
20
246
|
* The line under the figure: its change in the style asked, good news in the success color, bad in the error
|
|
21
247
|
* color, flat quiet; or the caption, secondary, with nothing to compare with.
|
|
22
248
|
*/ function changeLine(now, before, spec) {
|
|
23
249
|
const label = spec.comparedLabel ?? "vs the period before";
|
|
250
|
+
if (spec.changeStyle === "badge") {
|
|
251
|
+
return {
|
|
252
|
+
line: sizeChange(now, before) ? undefined : spec.caption,
|
|
253
|
+
lineColor: "text.secondary"
|
|
254
|
+
};
|
|
255
|
+
}
|
|
24
256
|
if (spec.changeStyle === "size") {
|
|
25
257
|
const change = sizeChange(now, before, spec.lowerIsBetter);
|
|
26
258
|
return change ? {
|
|
@@ -46,56 +278,113 @@ const TONE = {
|
|
|
46
278
|
lineColor: good ? TONE.good : TONE.bad
|
|
47
279
|
};
|
|
48
280
|
}
|
|
49
|
-
/**
|
|
50
|
-
|
|
281
|
+
/**
|
|
282
|
+
* One figure, large and light, and under it its change against the period before (or a caption); as a pillar, bold
|
|
283
|
+
* with its change beside it, a sparkline and a list of figures under it.
|
|
284
|
+
*/ export function PulzrFigurePanelComponent(t0) {
|
|
285
|
+
const $ = _c(55);
|
|
51
286
|
const { queryResults, spec } = t0;
|
|
287
|
+
const theme = useTheme();
|
|
288
|
+
let T0;
|
|
52
289
|
let t1;
|
|
290
|
+
let t2;
|
|
291
|
+
let t3;
|
|
292
|
+
let t4;
|
|
293
|
+
let t5;
|
|
53
294
|
if ($[0] !== queryResults || $[1] !== spec) {
|
|
54
|
-
|
|
295
|
+
let t6;
|
|
296
|
+
if ($[8] !== spec.rows) {
|
|
297
|
+
t6 = spec.rows ?? [];
|
|
298
|
+
$[8] = spec.rows;
|
|
299
|
+
$[9] = t6;
|
|
300
|
+
} else {
|
|
301
|
+
t6 = $[9];
|
|
302
|
+
}
|
|
303
|
+
const others = [
|
|
304
|
+
...spec.sparkline ? [
|
|
305
|
+
spec.sparkline.series
|
|
306
|
+
] : [],
|
|
307
|
+
...t6.map(_temp)
|
|
308
|
+
];
|
|
309
|
+
const { now, before, total } = figureOf(queryResults, spec.of?.series, others);
|
|
55
310
|
const values = spec.subtitle || spec.detail ? valuesOf(queryResults) : undefined;
|
|
56
311
|
const { line, lineColor } = changeLine(now, before, spec);
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
312
|
+
const badge = spec.changeStyle === "badge";
|
|
313
|
+
T0 = Box;
|
|
314
|
+
if ($[10] === Symbol.for("react.memo_cache_sentinel")) {
|
|
315
|
+
t1 = {
|
|
60
316
|
px: "10px",
|
|
61
317
|
pt: "2px",
|
|
62
318
|
pb: "7px",
|
|
63
319
|
minWidth: 0,
|
|
64
320
|
overflow: "hidden"
|
|
65
321
|
};
|
|
66
|
-
$[
|
|
322
|
+
$[10] = t1;
|
|
67
323
|
} else {
|
|
68
|
-
|
|
324
|
+
t1 = $[10];
|
|
69
325
|
}
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
326
|
+
t2 = spec.subtitle && values && /*#__PURE__*/ _jsx(Typography, {
|
|
327
|
+
component: "div",
|
|
328
|
+
sx: {
|
|
329
|
+
fontSize: 9,
|
|
330
|
+
letterSpacing: "0.04em",
|
|
331
|
+
textTransform: "uppercase",
|
|
332
|
+
color: "text.secondary",
|
|
333
|
+
mt: "-4px",
|
|
334
|
+
mb: "2px",
|
|
335
|
+
whiteSpace: "nowrap",
|
|
336
|
+
overflow: "hidden",
|
|
337
|
+
textOverflow: "ellipsis"
|
|
338
|
+
},
|
|
339
|
+
children: fill(spec.subtitle, values)
|
|
340
|
+
});
|
|
341
|
+
let t7;
|
|
342
|
+
if ($[11] !== badge) {
|
|
343
|
+
t7 = badge ? {
|
|
344
|
+
fontWeight: 650,
|
|
345
|
+
lineHeight: 1.1,
|
|
346
|
+
display: "flex",
|
|
347
|
+
alignItems: "baseline",
|
|
348
|
+
gap: "8px"
|
|
349
|
+
} : {
|
|
76
350
|
fontWeight: 300,
|
|
77
351
|
lineHeight: 1.05,
|
|
78
|
-
letterSpacing: "-0.02em"
|
|
352
|
+
letterSpacing: "-0.02em"
|
|
353
|
+
};
|
|
354
|
+
$[11] = badge;
|
|
355
|
+
$[12] = t7;
|
|
356
|
+
} else {
|
|
357
|
+
t7 = $[12];
|
|
358
|
+
}
|
|
359
|
+
const t8 = spec.color ?? "text.primary";
|
|
360
|
+
let t9;
|
|
361
|
+
if ($[13] !== t7 || $[14] !== t8) {
|
|
362
|
+
t9 = {
|
|
363
|
+
...numbers,
|
|
364
|
+
fontSize: 22,
|
|
365
|
+
...t7,
|
|
79
366
|
mb: "4px",
|
|
80
|
-
color:
|
|
367
|
+
color: t8
|
|
81
368
|
};
|
|
82
|
-
$[
|
|
83
|
-
$[
|
|
369
|
+
$[13] = t7;
|
|
370
|
+
$[14] = t8;
|
|
371
|
+
$[15] = t9;
|
|
84
372
|
} else {
|
|
85
|
-
|
|
373
|
+
t9 = $[15];
|
|
86
374
|
}
|
|
87
|
-
let
|
|
88
|
-
if ($[
|
|
89
|
-
|
|
90
|
-
$[
|
|
91
|
-
$[
|
|
92
|
-
$[
|
|
375
|
+
let t10;
|
|
376
|
+
if ($[16] !== now || $[17] !== spec.format || $[18] !== spec.timeInParts) {
|
|
377
|
+
t10 = figure(now, spec.format, spec.timeInParts);
|
|
378
|
+
$[16] = now;
|
|
379
|
+
$[17] = spec.format;
|
|
380
|
+
$[18] = spec.timeInParts;
|
|
381
|
+
$[19] = t10;
|
|
93
382
|
} else {
|
|
94
|
-
|
|
383
|
+
t10 = $[19];
|
|
95
384
|
}
|
|
96
|
-
let
|
|
97
|
-
if ($[
|
|
98
|
-
|
|
385
|
+
let t11;
|
|
386
|
+
if ($[20] !== badge || $[21] !== now || $[22] !== spec.of || $[23] !== total) {
|
|
387
|
+
t11 = spec.of && total !== undefined && now !== undefined && /*#__PURE__*/ _jsx(Typography, {
|
|
99
388
|
component: "span",
|
|
100
389
|
sx: {
|
|
101
390
|
...numbers,
|
|
@@ -103,38 +392,54 @@ const TONE = {
|
|
|
103
392
|
fontWeight: 400,
|
|
104
393
|
letterSpacing: "0.02em",
|
|
105
394
|
color: "text.secondary",
|
|
106
|
-
ml: "8px",
|
|
395
|
+
ml: badge ? 0 : "8px",
|
|
107
396
|
whiteSpace: "nowrap"
|
|
108
397
|
},
|
|
109
398
|
children: `${Math.round(now * total)}/${total}${spec.of.label ? ` ${spec.of.label}` : ""}`
|
|
110
399
|
});
|
|
111
|
-
$[
|
|
112
|
-
$[
|
|
113
|
-
$[
|
|
114
|
-
$[
|
|
400
|
+
$[20] = badge;
|
|
401
|
+
$[21] = now;
|
|
402
|
+
$[22] = spec.of;
|
|
403
|
+
$[23] = total;
|
|
404
|
+
$[24] = t11;
|
|
115
405
|
} else {
|
|
116
|
-
|
|
406
|
+
t11 = $[24];
|
|
117
407
|
}
|
|
118
|
-
let
|
|
119
|
-
if ($[
|
|
120
|
-
|
|
408
|
+
let t12;
|
|
409
|
+
if ($[25] !== badge || $[26] !== before || $[27] !== now || $[28] !== spec.lowerIsBetter) {
|
|
410
|
+
t12 = badge && /*#__PURE__*/ _jsx(Badge, {
|
|
411
|
+
now: now,
|
|
412
|
+
before: before,
|
|
413
|
+
lowerIsBetter: spec.lowerIsBetter
|
|
414
|
+
});
|
|
415
|
+
$[25] = badge;
|
|
416
|
+
$[26] = before;
|
|
417
|
+
$[27] = now;
|
|
418
|
+
$[28] = spec.lowerIsBetter;
|
|
419
|
+
$[29] = t12;
|
|
420
|
+
} else {
|
|
421
|
+
t12 = $[29];
|
|
422
|
+
}
|
|
423
|
+
if ($[30] !== t10 || $[31] !== t11 || $[32] !== t12 || $[33] !== t9) {
|
|
424
|
+
t3 = /*#__PURE__*/ _jsxs(Typography, {
|
|
121
425
|
component: "div",
|
|
122
|
-
sx:
|
|
426
|
+
sx: t9,
|
|
123
427
|
children: [
|
|
124
|
-
|
|
125
|
-
|
|
428
|
+
t10,
|
|
429
|
+
t11,
|
|
430
|
+
t12
|
|
126
431
|
]
|
|
127
432
|
});
|
|
128
|
-
$[
|
|
129
|
-
$[
|
|
130
|
-
$[
|
|
131
|
-
$[
|
|
433
|
+
$[30] = t10;
|
|
434
|
+
$[31] = t11;
|
|
435
|
+
$[32] = t12;
|
|
436
|
+
$[33] = t9;
|
|
437
|
+
$[34] = t3;
|
|
132
438
|
} else {
|
|
133
|
-
|
|
439
|
+
t3 = $[34];
|
|
134
440
|
}
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
t8 = line && /*#__PURE__*/ _jsx(Typography, {
|
|
441
|
+
if ($[35] !== line || $[36] !== lineColor) {
|
|
442
|
+
t4 = line && /*#__PURE__*/ _jsx(Typography, {
|
|
138
443
|
component: "div",
|
|
139
444
|
sx: {
|
|
140
445
|
...numbers,
|
|
@@ -150,61 +455,154 @@ const TONE = {
|
|
|
150
455
|
},
|
|
151
456
|
children: line
|
|
152
457
|
});
|
|
153
|
-
$[
|
|
154
|
-
$[
|
|
155
|
-
$[
|
|
458
|
+
$[35] = line;
|
|
459
|
+
$[36] = lineColor;
|
|
460
|
+
$[37] = t4;
|
|
156
461
|
} else {
|
|
157
|
-
|
|
462
|
+
t4 = $[37];
|
|
158
463
|
}
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
464
|
+
t5 = spec.detail && values && /*#__PURE__*/ _jsx(Typography, {
|
|
465
|
+
component: "div",
|
|
466
|
+
sx: {
|
|
467
|
+
...numbers,
|
|
468
|
+
display: "inline-block",
|
|
469
|
+
fontSize: 9,
|
|
470
|
+
fontWeight: 500,
|
|
471
|
+
lineHeight: 1.4,
|
|
472
|
+
letterSpacing: "0.04em",
|
|
473
|
+
textTransform: "uppercase",
|
|
474
|
+
color: "text.secondary",
|
|
475
|
+
mt: "5px",
|
|
476
|
+
px: "6px",
|
|
477
|
+
py: "2px",
|
|
478
|
+
bgcolor: "action.hover",
|
|
479
|
+
border: 1,
|
|
480
|
+
borderColor: "divider"
|
|
481
|
+
},
|
|
482
|
+
children: fill(spec.detail, values)
|
|
483
|
+
});
|
|
484
|
+
$[0] = queryResults;
|
|
485
|
+
$[1] = spec;
|
|
486
|
+
$[2] = T0;
|
|
487
|
+
$[3] = t1;
|
|
488
|
+
$[4] = t2;
|
|
489
|
+
$[5] = t3;
|
|
490
|
+
$[6] = t4;
|
|
491
|
+
$[7] = t5;
|
|
492
|
+
} else {
|
|
493
|
+
T0 = $[2];
|
|
494
|
+
t1 = $[3];
|
|
495
|
+
t2 = $[4];
|
|
496
|
+
t3 = $[5];
|
|
497
|
+
t4 = $[6];
|
|
498
|
+
t5 = $[7];
|
|
499
|
+
}
|
|
500
|
+
let t6;
|
|
501
|
+
if ($[38] !== queryResults || $[39] !== spec.color || $[40] !== spec.sparkline || $[41] !== theme) {
|
|
502
|
+
t6 = spec.sparkline && /*#__PURE__*/ _jsx(Sparkline, {
|
|
503
|
+
values: valuesOver(queryResults, spec.sparkline.series),
|
|
504
|
+
color: spec.sparkline.color ?? spec.color ?? theme.palette.text.primary
|
|
505
|
+
});
|
|
506
|
+
$[38] = queryResults;
|
|
507
|
+
$[39] = spec.color;
|
|
508
|
+
$[40] = spec.sparkline;
|
|
509
|
+
$[41] = theme;
|
|
510
|
+
$[42] = t6;
|
|
511
|
+
} else {
|
|
512
|
+
t6 = $[42];
|
|
513
|
+
}
|
|
514
|
+
let t7;
|
|
515
|
+
if ($[43] !== queryResults || $[44] !== spec.rows) {
|
|
516
|
+
t7 = spec.rows && spec.rows.length > 0 && /*#__PURE__*/ _jsx(Box, {
|
|
517
|
+
component: "dl",
|
|
518
|
+
sx: {
|
|
519
|
+
display: "flex",
|
|
520
|
+
flexDirection: "column",
|
|
521
|
+
gap: "1px",
|
|
522
|
+
m: 0
|
|
523
|
+
},
|
|
524
|
+
children: spec.rows.map((row)=>{
|
|
525
|
+
const pair = pairOf(queryResults, row.series);
|
|
526
|
+
return /*#__PURE__*/ _jsxs(Box, {
|
|
181
527
|
sx: {
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
mt: "5px",
|
|
191
|
-
px: "6px",
|
|
192
|
-
py: "2px",
|
|
193
|
-
bgcolor: "action.hover",
|
|
194
|
-
border: 1,
|
|
195
|
-
borderColor: "divider"
|
|
528
|
+
display: "flex",
|
|
529
|
+
alignItems: "baseline",
|
|
530
|
+
justifyContent: "space-between",
|
|
531
|
+
gap: "10px",
|
|
532
|
+
py: "3px",
|
|
533
|
+
borderTop: 1,
|
|
534
|
+
borderColor: "divider",
|
|
535
|
+
fontSize: 12
|
|
196
536
|
},
|
|
197
|
-
children:
|
|
198
|
-
|
|
537
|
+
children: [
|
|
538
|
+
/*#__PURE__*/ _jsx(Box, {
|
|
539
|
+
component: "dt",
|
|
540
|
+
sx: {
|
|
541
|
+
color: "text.secondary",
|
|
542
|
+
minWidth: 0
|
|
543
|
+
},
|
|
544
|
+
children: row.label
|
|
545
|
+
}),
|
|
546
|
+
/*#__PURE__*/ _jsxs(Box, {
|
|
547
|
+
component: "dd",
|
|
548
|
+
sx: {
|
|
549
|
+
...numbers,
|
|
550
|
+
display: "inline-flex",
|
|
551
|
+
alignItems: "baseline",
|
|
552
|
+
gap: "6px",
|
|
553
|
+
m: 0,
|
|
554
|
+
color: "text.primary",
|
|
555
|
+
whiteSpace: "nowrap"
|
|
556
|
+
},
|
|
557
|
+
children: [
|
|
558
|
+
figure(pair.now, row.format, row.timeInParts),
|
|
559
|
+
row.suffix && pair.now !== undefined && ` ${row.suffix}`,
|
|
560
|
+
/*#__PURE__*/ _jsx(Badge, {
|
|
561
|
+
now: pair.now,
|
|
562
|
+
before: pair.before,
|
|
563
|
+
lowerIsBetter: row.lowerIsBetter
|
|
564
|
+
})
|
|
565
|
+
]
|
|
566
|
+
})
|
|
567
|
+
]
|
|
568
|
+
}, row.label);
|
|
569
|
+
})
|
|
570
|
+
});
|
|
571
|
+
$[43] = queryResults;
|
|
572
|
+
$[44] = spec.rows;
|
|
573
|
+
$[45] = t7;
|
|
574
|
+
} else {
|
|
575
|
+
t7 = $[45];
|
|
576
|
+
}
|
|
577
|
+
let t8;
|
|
578
|
+
if ($[46] !== T0 || $[47] !== t1 || $[48] !== t2 || $[49] !== t3 || $[50] !== t4 || $[51] !== t5 || $[52] !== t6 || $[53] !== t7) {
|
|
579
|
+
t8 = /*#__PURE__*/ _jsxs(T0, {
|
|
580
|
+
sx: t1,
|
|
581
|
+
children: [
|
|
582
|
+
t2,
|
|
583
|
+
t3,
|
|
584
|
+
t4,
|
|
585
|
+
t5,
|
|
586
|
+
t6,
|
|
587
|
+
t7
|
|
199
588
|
]
|
|
200
589
|
});
|
|
201
|
-
$[
|
|
202
|
-
$[
|
|
203
|
-
$[
|
|
590
|
+
$[46] = T0;
|
|
591
|
+
$[47] = t1;
|
|
592
|
+
$[48] = t2;
|
|
593
|
+
$[49] = t3;
|
|
594
|
+
$[50] = t4;
|
|
595
|
+
$[51] = t5;
|
|
596
|
+
$[52] = t6;
|
|
597
|
+
$[53] = t7;
|
|
598
|
+
$[54] = t8;
|
|
204
599
|
} else {
|
|
205
|
-
|
|
600
|
+
t8 = $[54];
|
|
206
601
|
}
|
|
207
|
-
return
|
|
602
|
+
return t8;
|
|
603
|
+
}
|
|
604
|
+
function _temp(r) {
|
|
605
|
+
return r.series;
|
|
208
606
|
}
|
|
209
607
|
|
|
210
608
|
//# sourceMappingURL=PulzrFigurePanelComponent.js.map
|