@hybridcore/ui 1.6.4 → 1.6.6
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/CATALOG.md +1 -0
- package/dist/IconX-C2wmVYSK.js +11 -0
- package/dist/components/charts/_common/format.js +49 -0
- package/dist/components/charts/_common/utils.js +12 -7
- package/dist/components/charts/chart-wrapper/index.js +36 -34
- package/dist/components/charts/column-line-mix/logic.js +78 -78
- package/dist/components/charts/donut-chart/index.js +11 -0
- package/dist/components/charts/donut-chart/logic.js +67 -0
- package/dist/components/charts/donut-chart/styled.js +12 -0
- package/dist/components/charts/drill-down-treemap/logic.js +123 -123
- package/dist/components/charts/drill-down-voronoi-treemap/logic.js +253 -252
- package/dist/components/charts/heatmap/logic.js +73 -73
- package/dist/components/charts/line/logic.js +66 -66
- package/dist/components/charts/logaritmic-scale/logic.js +65 -65
- package/dist/components/charts/multiple-value-axes/logic.js +75 -74
- package/dist/components/charts/nested-pie/logic.js +43 -42
- package/dist/components/charts/packed-circles/logic.js +111 -110
- package/dist/components/charts/pie-chart/logic.js +40 -39
- package/dist/components/charts/stacked-area-radar/logic.js +51 -51
- package/dist/components/charts/stacked-column-chart/logic.js +79 -79
- package/dist/components/charts/xy-chart/logic.js +71 -71
- package/dist/components/color-picker/index.js +1645 -1602
- package/dist/components/color-picker/logic.js +21 -12
- package/dist/components/color-picker/styled.js +4 -2
- package/dist/components/date-range-picker/index.js +359 -365
- package/dist/components/metric-card/helpers.js +12 -5
- package/dist/components/metric-card/logic.js +65 -57
- package/dist/components/metric-card/styled.js +55 -47
- package/dist/components/simple-pivot-table/index.js +129 -54
- package/dist/components/simple-pivot-table/logic.js +111 -45
- package/dist/components/simple-pivot-table/styled.js +31 -11
- package/dist/main.d.ts +128 -8
- package/dist/main.js +163 -157
- package/dist/{styled-Db1RdcPA.js → styled-SoqbyrkW.js} +116 -89
- package/package.json +1 -1
|
@@ -1,51 +1,117 @@
|
|
|
1
|
-
import { useThemeProps as
|
|
2
|
-
import
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
const
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
1
|
+
import { useThemeProps as z } from "@mui/material";
|
|
2
|
+
import j from "dayjs";
|
|
3
|
+
import { useRef as A, useState as h, useMemo as M, useEffect as w } from "react";
|
|
4
|
+
import { humanizeLabel as y, formatValue as Y, resolveConditionalStyle as O } from "../charts/_common/format.js";
|
|
5
|
+
const U = (t) => {
|
|
6
|
+
const n = t.toLowerCase();
|
|
7
|
+
return n.includes("year") ? "YYYY" : n.includes("month") ? "MMM YYYY" : n.includes("hour") || n.includes("minute") || n.includes("time") ? "DD MMM YYYY HH:mm" : "DD MMM YYYY";
|
|
8
|
+
}, W = (t) => {
|
|
9
|
+
var n;
|
|
10
|
+
return ((n = t.label) == null ? void 0 : n.trim()) || y(t.value);
|
|
11
|
+
}, g = (t) => {
|
|
12
|
+
var n;
|
|
13
|
+
return ((n = t.label) == null ? void 0 : n.trim()) || y(t.name);
|
|
14
|
+
}, X = (t, n) => {
|
|
15
|
+
if (t == null || t === "") return "—";
|
|
16
|
+
if (n.type !== "date") return String(t);
|
|
17
|
+
const s = j(t);
|
|
18
|
+
return s.isValid() ? s.format(n.dateFormat || U(n.value)) : String(t);
|
|
19
|
+
}, L = (t, n) => {
|
|
20
|
+
const s = t.map((a) => Number(a[n])).filter((a) => Number.isFinite(a));
|
|
21
|
+
if (s.length === 0) return null;
|
|
22
|
+
const f = s.length, i = s.reduce((a, u) => a + u, 0);
|
|
23
|
+
return {
|
|
24
|
+
count: f,
|
|
25
|
+
sum: i,
|
|
26
|
+
avg: i / f,
|
|
27
|
+
min: Math.min(...s),
|
|
28
|
+
max: Math.max(...s)
|
|
29
|
+
};
|
|
30
|
+
}, C = (t) => t.key === "Meta" || t.key === "Control", J = (t) => {
|
|
31
|
+
const n = z({ props: t, name: "HCSimplePivotTable" }), {
|
|
32
|
+
title: s,
|
|
33
|
+
description: f,
|
|
34
|
+
data: i = [],
|
|
35
|
+
dimensions: a = [],
|
|
36
|
+
values: u = [],
|
|
37
|
+
sx: E,
|
|
38
|
+
...x
|
|
39
|
+
} = n, b = A(null), [D, F] = h(!1), [c, S] = h(null), k = M(() => typeof navigator < "u" && /Mac|iPhone|iPad/.test(navigator.platform) ? "⌘" : "Ctrl", []);
|
|
40
|
+
w(() => {
|
|
41
|
+
const e = b.current;
|
|
42
|
+
if (!e) return;
|
|
43
|
+
const o = () => F(e.scrollHeight > e.clientHeight + 1);
|
|
44
|
+
o();
|
|
45
|
+
const l = new ResizeObserver(o);
|
|
46
|
+
return l.observe(e), () => l.disconnect();
|
|
47
|
+
}, [i, a, u]), w(() => {
|
|
48
|
+
const e = b.current;
|
|
49
|
+
if (!e) return;
|
|
50
|
+
const o = () => {
|
|
51
|
+
e.style.overflow = "auto";
|
|
52
|
+
}, l = () => {
|
|
53
|
+
e.style.overflow = "hidden";
|
|
54
|
+
};
|
|
55
|
+
l();
|
|
56
|
+
const m = (r) => {
|
|
57
|
+
C(r) && o();
|
|
58
|
+
}, v = (r) => {
|
|
59
|
+
C(r) && l();
|
|
60
|
+
}, p = (r) => {
|
|
61
|
+
if (!(r.ctrlKey || r.metaKey)) return;
|
|
62
|
+
r.preventDefault(), o();
|
|
63
|
+
const d = r.deltaMode === 1 ? 16 : 1;
|
|
64
|
+
e.scrollTop += r.deltaY * d, e.scrollLeft += r.deltaX * d;
|
|
65
|
+
};
|
|
66
|
+
return window.addEventListener("keydown", m), window.addEventListener("keyup", v), window.addEventListener("blur", l), e.addEventListener("wheel", p, { passive: !1 }), () => {
|
|
67
|
+
window.removeEventListener("keydown", m), window.removeEventListener("keyup", v), window.removeEventListener("blur", l), e.removeEventListener("wheel", p);
|
|
68
|
+
};
|
|
69
|
+
}, []);
|
|
70
|
+
const P = M(
|
|
71
|
+
() => u.map((e) => {
|
|
72
|
+
const o = L(i, e.dataFieldName);
|
|
73
|
+
return o ? { field: e.dataFieldName, name: e.name, ...o } : null;
|
|
74
|
+
}).filter((e) => e !== null),
|
|
75
|
+
[u, i]
|
|
76
|
+
), H = M(() => {
|
|
77
|
+
var r;
|
|
78
|
+
if (!c) return null;
|
|
79
|
+
const e = u.find((d) => d.dataFieldName === c), o = e ? g(e) : y(c), l = L(i, c);
|
|
80
|
+
if (!l)
|
|
81
|
+
return { field: c, name: o, items: [{ label: "Count", value: String(i.length) }] };
|
|
82
|
+
const m = (d) => Y(d, e == null ? void 0 : e.format), v = !!((r = e == null ? void 0 : e.format) != null && r.suffix) && e.format.suffix.includes("%"), p = [
|
|
83
|
+
{ label: "Count", value: String(l.count) },
|
|
84
|
+
...v ? [] : [{ label: "Sum", value: m(l.sum) }],
|
|
85
|
+
{ label: "Avg", value: m(l.avg) },
|
|
86
|
+
{ label: "Min", value: m(l.min) },
|
|
87
|
+
{ label: "Max", value: m(l.max) }
|
|
30
88
|
];
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
const o = Number(t);
|
|
34
|
-
return Number.isNaN(o) ? String(t) : e.format(o);
|
|
35
|
-
}, d = { ...l };
|
|
89
|
+
return { field: c, name: o, items: p };
|
|
90
|
+
}, [c, u, i]), N = (e, o) => Y(e, o), K = (e, o) => O(e, o), T = (e) => S((o) => o === e ? null : e), R = () => S(null), V = { ...n };
|
|
36
91
|
return {
|
|
37
|
-
title:
|
|
38
|
-
description:
|
|
39
|
-
dimensions:
|
|
40
|
-
values:
|
|
41
|
-
data:
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
92
|
+
title: s,
|
|
93
|
+
description: f,
|
|
94
|
+
dimensions: a,
|
|
95
|
+
values: u,
|
|
96
|
+
data: i,
|
|
97
|
+
summaries: P,
|
|
98
|
+
selectedField: c,
|
|
99
|
+
selectedSummary: H,
|
|
100
|
+
selectColumn: T,
|
|
101
|
+
clearSelection: R,
|
|
102
|
+
dimensionLabel: W,
|
|
103
|
+
valueLabel: g,
|
|
104
|
+
formatDimensionValue: X,
|
|
105
|
+
formatCell: N,
|
|
106
|
+
getCellStyle: K,
|
|
107
|
+
ownerState: V,
|
|
108
|
+
scrollRef: b,
|
|
109
|
+
canScroll: D,
|
|
110
|
+
scrollModifierLabel: k,
|
|
111
|
+
sx: E,
|
|
112
|
+
other: x
|
|
47
113
|
};
|
|
48
114
|
};
|
|
49
115
|
export {
|
|
50
|
-
|
|
116
|
+
J as useSimplePivotTableLogic
|
|
51
117
|
};
|
|
@@ -1,20 +1,23 @@
|
|
|
1
|
-
import { styled as e, Paper as
|
|
2
|
-
const
|
|
1
|
+
import { styled as e, Paper as a, Box as t, alpha as l } from "@mui/material";
|
|
2
|
+
const n = e(a, {
|
|
3
3
|
name: "HCSimplePivotTable",
|
|
4
4
|
slot: "Root",
|
|
5
5
|
shouldForwardProp: (o) => o !== "ownerState"
|
|
6
6
|
})(() => ({
|
|
7
7
|
height: "100%",
|
|
8
8
|
display: "flex",
|
|
9
|
-
flexDirection: "column"
|
|
10
|
-
|
|
9
|
+
flexDirection: "column",
|
|
10
|
+
"&:hover .HCSimplePivotTable-scrollHint": {
|
|
11
|
+
opacity: 1
|
|
12
|
+
}
|
|
13
|
+
})), r = e(t, {
|
|
11
14
|
name: "HCSimplePivotTable",
|
|
12
15
|
slot: "Header",
|
|
13
16
|
shouldForwardProp: (o) => o !== "ownerState"
|
|
14
17
|
})(({ theme: o }) => ({
|
|
15
18
|
flex: "0 0 auto",
|
|
16
19
|
padding: o.spacing(1.25, 2)
|
|
17
|
-
})),
|
|
20
|
+
})), p = e(t, {
|
|
18
21
|
name: "HCSimplePivotTable",
|
|
19
22
|
slot: "Content",
|
|
20
23
|
shouldForwardProp: (o) => o !== "ownerState"
|
|
@@ -24,8 +27,24 @@ const i = e(l, {
|
|
|
24
27
|
flexDirection: "column",
|
|
25
28
|
flex: "1 1 auto",
|
|
26
29
|
minHeight: 0,
|
|
27
|
-
overflow: "
|
|
28
|
-
})),
|
|
30
|
+
overflow: "hidden"
|
|
31
|
+
})), d = e(t, {
|
|
32
|
+
name: "HCSimplePivotTable",
|
|
33
|
+
slot: "ScrollHint",
|
|
34
|
+
shouldForwardProp: (o) => o !== "ownerState"
|
|
35
|
+
})(({ theme: o }) => ({
|
|
36
|
+
// Pinned to the left of the footer; aggregations stay grouped on the right.
|
|
37
|
+
marginRight: "auto",
|
|
38
|
+
padding: o.spacing(0.25, 1),
|
|
39
|
+
borderRadius: o.shape.borderRadius,
|
|
40
|
+
border: `1px solid ${o.palette.divider}`,
|
|
41
|
+
backgroundColor: l(o.palette.background.paper, 0.85),
|
|
42
|
+
color: o.palette.text.secondary,
|
|
43
|
+
pointerEvents: "none",
|
|
44
|
+
userSelect: "none",
|
|
45
|
+
opacity: 0.5,
|
|
46
|
+
transition: o.transitions.create("opacity")
|
|
47
|
+
})), s = e(t, {
|
|
29
48
|
name: "HCSimplePivotTable",
|
|
30
49
|
slot: "Footer",
|
|
31
50
|
shouldForwardProp: (o) => o !== "ownerState"
|
|
@@ -38,8 +57,9 @@ const i = e(l, {
|
|
|
38
57
|
gap: o.spacing(1)
|
|
39
58
|
}));
|
|
40
59
|
export {
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
60
|
+
p as SimplePivotTableContent,
|
|
61
|
+
s as SimplePivotTableFooter,
|
|
62
|
+
r as SimplePivotTableHeader,
|
|
63
|
+
n as SimplePivotTableRoot,
|
|
64
|
+
d as SimplePivotTableScrollHint
|
|
45
65
|
};
|
package/dist/main.d.ts
CHANGED
|
@@ -84,11 +84,6 @@ export declare namespace AccessUtils {
|
|
|
84
84
|
|
|
85
85
|
export { AdapterDayjs }
|
|
86
86
|
|
|
87
|
-
declare interface Aggregation {
|
|
88
|
-
label: string;
|
|
89
|
-
value: number | string;
|
|
90
|
-
}
|
|
91
|
-
|
|
92
87
|
declare function alert_2(title: string, message: string): Promise<unknown>;
|
|
93
88
|
export { alert_2 as alert }
|
|
94
89
|
|
|
@@ -222,6 +217,10 @@ export declare interface CardProps {
|
|
|
222
217
|
export declare interface ChartDimension {
|
|
223
218
|
value: string;
|
|
224
219
|
type: string;
|
|
220
|
+
/** Display label override; falls back to a humanized `value` when unset. */
|
|
221
|
+
label?: string;
|
|
222
|
+
/** dayjs format for date-typed dimensions; falls back to a grain-based default. */
|
|
223
|
+
dateFormat?: string;
|
|
225
224
|
}
|
|
226
225
|
|
|
227
226
|
export declare type ChartNameType =
|
|
@@ -229,6 +228,7 @@ export declare type ChartNameType =
|
|
|
229
228
|
| "XYChart"
|
|
230
229
|
| "MultipleValueAxes"
|
|
231
230
|
| "PieChart"
|
|
231
|
+
| "DonutChart"
|
|
232
232
|
| "StackedAreaRadar"
|
|
233
233
|
| "StackedColumnChart"
|
|
234
234
|
| "LineChart"
|
|
@@ -269,6 +269,10 @@ export declare interface ChartValue {
|
|
|
269
269
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
270
270
|
operator: any;
|
|
271
271
|
dataFieldName: string;
|
|
272
|
+
/** Optional per-value formatting + conditional styling. */
|
|
273
|
+
format?: ValueFormat;
|
|
274
|
+
/** Display label override; falls back to a humanized `name` when unset. */
|
|
275
|
+
label?: string;
|
|
272
276
|
}
|
|
273
277
|
|
|
274
278
|
export declare const ChartWrapper: (inProps: ChartWrapperProps) => JSX_2.Element;
|
|
@@ -313,10 +317,18 @@ export declare type ColorPickerComponentOverride<Theme = unknown> = {
|
|
|
313
317
|
export declare interface ColorPickerProps {
|
|
314
318
|
value: string;
|
|
315
319
|
swatches?: string[];
|
|
320
|
+
/**
|
|
321
|
+
* "inline" (default) — the legacy swatch row + advanced-picker icon.
|
|
322
|
+
* "popover" — a single swatch/hex trigger button that opens the familiar
|
|
323
|
+
* saturation + hue + hex picker with preset swatches in a popover.
|
|
324
|
+
*/
|
|
325
|
+
variant?: ColorPickerVariant;
|
|
316
326
|
sx?: SxProps<Theme>;
|
|
317
327
|
onChange(value: string): void;
|
|
318
328
|
}
|
|
319
329
|
|
|
330
|
+
declare type ColorPickerVariant = "inline" | "popover";
|
|
331
|
+
|
|
320
332
|
export declare const ColumnLineMix: (inProps: ColumnLineMixProps) => JSX_2.Element;
|
|
321
333
|
|
|
322
334
|
export declare type ColumnLineMixComponentOverride<Theme = unknown> = {
|
|
@@ -326,6 +338,16 @@ export declare type ColumnLineMixComponentOverride<Theme = unknown> = {
|
|
|
326
338
|
|
|
327
339
|
export declare type ColumnLineMixProps = ChartProps;
|
|
328
340
|
|
|
341
|
+
declare interface ColumnSummary {
|
|
342
|
+
field: string;
|
|
343
|
+
name: string;
|
|
344
|
+
count: number;
|
|
345
|
+
sum: number;
|
|
346
|
+
avg: number;
|
|
347
|
+
min: number;
|
|
348
|
+
max: number;
|
|
349
|
+
}
|
|
350
|
+
|
|
329
351
|
export declare interface CompositeListRangeProps {
|
|
330
352
|
value: SIMULATION.RandomInfoComposite;
|
|
331
353
|
mapboxAccessToken: string;
|
|
@@ -335,6 +357,26 @@ export declare interface CompositeListRangeProps {
|
|
|
335
357
|
onChange(value: SIMULATION.RandomInfoComposite): void;
|
|
336
358
|
}
|
|
337
359
|
|
|
360
|
+
export declare type ConditionalOp =
|
|
361
|
+
| "lt"
|
|
362
|
+
| "lte"
|
|
363
|
+
| "gt"
|
|
364
|
+
| "gte"
|
|
365
|
+
| "eq"
|
|
366
|
+
| "neq"
|
|
367
|
+
| "between";
|
|
368
|
+
|
|
369
|
+
export declare interface ConditionalRule {
|
|
370
|
+
op: ConditionalOp;
|
|
371
|
+
value: number;
|
|
372
|
+
/** Upper bound, used only when `op` is "between". */
|
|
373
|
+
value2?: number;
|
|
374
|
+
/** Text color applied when the rule matches (theme token path or CSS color). */
|
|
375
|
+
color?: string;
|
|
376
|
+
/** Background color applied when the rule matches. */
|
|
377
|
+
backgroundColor?: string;
|
|
378
|
+
}
|
|
379
|
+
|
|
338
380
|
export declare const ConditionalWrapper: ({ condition, wrapper, children, }: ConditionalWrapperProps) => JSX_2.Element;
|
|
339
381
|
|
|
340
382
|
declare interface ConditionalWrapperProps {
|
|
@@ -575,6 +617,15 @@ export declare interface DocumentViewerProps {
|
|
|
575
617
|
sx?: SxProps<Theme>;
|
|
576
618
|
}
|
|
577
619
|
|
|
620
|
+
export declare const DonutChart: (inProps: DonutChartProps) => JSX_2.Element;
|
|
621
|
+
|
|
622
|
+
export declare type DonutChartComponentOverride<Theme = unknown> = {
|
|
623
|
+
defaultProps?: Partial<DonutChartProps>;
|
|
624
|
+
styleOverrides?: ComponentsOverrides_2<Theme>["HCDonutChart"];
|
|
625
|
+
};
|
|
626
|
+
|
|
627
|
+
export declare type DonutChartProps = ChartProps;
|
|
628
|
+
|
|
578
629
|
export declare const DrillDownTreemap: (inProps: DrillDownTreemapProps) => JSX_2.Element;
|
|
579
630
|
|
|
580
631
|
export declare type DrillDownTreemapComponentOverride<Theme = unknown> = {
|
|
@@ -635,6 +686,13 @@ export declare const FlexRow: StyledComponent<BoxOwnProps<Theme> & Omit<Omit<Det
|
|
|
635
686
|
ref?: ((instance: HTMLDivElement | null) => void | DO_NOT_USE_OR_YOU_WILL_BE_FIRED_CALLBACK_REF_RETURN_VALUES[keyof DO_NOT_USE_OR_YOU_WILL_BE_FIRED_CALLBACK_REF_RETURN_VALUES]) | RefObject<HTMLDivElement> | null | undefined;
|
|
636
687
|
}, keyof BoxOwnProps<Theme>> & MUIStyledCommonProps<Theme>, {}, {}>;
|
|
637
688
|
|
|
689
|
+
/**
|
|
690
|
+
* Format a raw value for display: numbers get locale grouping + the configured
|
|
691
|
+
* decimals, then the prefix/suffix are wrapped around the result. Non-numeric
|
|
692
|
+
* values are returned as-is; empty values become an em dash.
|
|
693
|
+
*/
|
|
694
|
+
export declare const formatValue: (value: unknown, format?: ValueFormat, empty?: string) => string;
|
|
695
|
+
|
|
638
696
|
export declare const GeometryDraw: ({ mapId, mapboxAccessToken, value: defaultValue, disableActions, variant, defaultExtent, onCancel, onSubmit, onChange, }: GeometryDrawProps) => JSX_2.Element;
|
|
639
697
|
|
|
640
698
|
export declare interface GeometryDrawProps {
|
|
@@ -753,6 +811,13 @@ export declare interface HighlightLineChartProps {
|
|
|
753
811
|
sx?: SxProps<Theme>;
|
|
754
812
|
}
|
|
755
813
|
|
|
814
|
+
/**
|
|
815
|
+
* Turn a raw field key into a human label: snake_case / kebab-case / camelCase
|
|
816
|
+
* → Title Case (e.g. "total_revenue" / "totalRevenue" → "Total Revenue"). Used
|
|
817
|
+
* as the default display label when no explicit label is set.
|
|
818
|
+
*/
|
|
819
|
+
export declare const humanizeLabel: (raw: string) => string;
|
|
820
|
+
|
|
756
821
|
export declare const IconButton: (props: IconButtonProps) => JSX_2.Element;
|
|
757
822
|
|
|
758
823
|
export declare type IconButtonComponentOverride<Theme = unknown> = {
|
|
@@ -1136,9 +1201,15 @@ export declare interface MetricCardProps {
|
|
|
1136
1201
|
|
|
1137
1202
|
// Rendered verbatim around the formatted number, e.g. valuePrefix "€ " → "€ 1,577",
|
|
1138
1203
|
// valueSuffix " kg" → "1,577 kg". Include any spacing in the string itself.
|
|
1204
|
+
// Superseded by `format.prefix` / `format.suffix` when those are set.
|
|
1139
1205
|
valuePrefix?: string;
|
|
1140
1206
|
valueSuffix?: string;
|
|
1141
1207
|
|
|
1208
|
+
// Per-value formatting + conditional coloring (shared with charts/pivot).
|
|
1209
|
+
// `format.prefix`/`format.suffix`/`format.decimals` control the displayed
|
|
1210
|
+
// number; `format.conditionalRules` color the value by threshold.
|
|
1211
|
+
format?: ValueFormat;
|
|
1212
|
+
|
|
1142
1213
|
showChange?: boolean;
|
|
1143
1214
|
changeType?: MetricChangeType;
|
|
1144
1215
|
|
|
@@ -1562,6 +1633,16 @@ export declare type RelativeDatePreset =
|
|
|
1562
1633
|
|
|
1563
1634
|
export declare const removeNotification: (id: string) => void;
|
|
1564
1635
|
|
|
1636
|
+
/**
|
|
1637
|
+
* Resolve the color/background contributed by the first matching conditional
|
|
1638
|
+
* rule. Returns an empty object when the value is non-numeric or nothing
|
|
1639
|
+
* matches, so callers can spread it safely.
|
|
1640
|
+
*/
|
|
1641
|
+
export declare const resolveConditionalStyle: (value: unknown, format?: ValueFormat) => {
|
|
1642
|
+
color?: string;
|
|
1643
|
+
backgroundColor?: string;
|
|
1644
|
+
};
|
|
1645
|
+
|
|
1565
1646
|
export declare const ScrollDrag: (props: ScrollDragProps) => JSX_2.Element;
|
|
1566
1647
|
|
|
1567
1648
|
export declare type ScrollDragComponentOverride<Theme = unknown> = {
|
|
@@ -1661,7 +1742,8 @@ export declare interface SimplePivotTableProps {
|
|
|
1661
1742
|
|
|
1662
1743
|
export declare interface SimplePivotTableSnapshot
|
|
1663
1744
|
extends Omit<SimplePivotTableProps, "sx"> {
|
|
1664
|
-
|
|
1745
|
+
/** Per-(numeric)-column summary stats — for export/snapshot context. */
|
|
1746
|
+
summaries: ColumnSummary[];
|
|
1665
1747
|
}
|
|
1666
1748
|
|
|
1667
1749
|
export declare const SortableList: (props: SortableListProps) => JSX_2.Element;
|
|
@@ -2081,6 +2163,23 @@ export declare interface UploaderProps {
|
|
|
2081
2163
|
|
|
2082
2164
|
export declare type UploaderType = "IMAGE" | "VIDEO" | "FILE" | "AUDIO" | "OTHER";
|
|
2083
2165
|
|
|
2166
|
+
/**
|
|
2167
|
+
* Per-value display configuration. Numbers are formatted, then wrapped with
|
|
2168
|
+
* `prefix`/`suffix`; the first matching `conditionalRules` entry contributes
|
|
2169
|
+
* the cell/value color. Presentation only — the underlying numeric value is
|
|
2170
|
+
* untouched so aggregation, sorting, and conditional rules keep working.
|
|
2171
|
+
*/
|
|
2172
|
+
export declare interface ValueFormat {
|
|
2173
|
+
/** Rendered verbatim before the number, e.g. "$" or "€ ". Include spacing. */
|
|
2174
|
+
prefix?: string;
|
|
2175
|
+
/** Rendered verbatim after the number, e.g. " kg" or "%". Include spacing. */
|
|
2176
|
+
suffix?: string;
|
|
2177
|
+
/** Fixed number of fraction digits; defaults to "up to 2" when unset. */
|
|
2178
|
+
decimals?: number;
|
|
2179
|
+
/** First matching rule wins. */
|
|
2180
|
+
conditionalRules?: ConditionalRule[];
|
|
2181
|
+
}
|
|
2182
|
+
|
|
2084
2183
|
export declare interface VariableDataType {
|
|
2085
2184
|
title: string;
|
|
2086
2185
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
@@ -2267,6 +2366,22 @@ declare module "@mui/material/styles" {
|
|
|
2267
2366
|
|
|
2268
2367
|
|
|
2269
2368
|
|
|
2369
|
+
declare module "@mui/material/styles" {
|
|
2370
|
+
interface ComponentNameToClassKey {
|
|
2371
|
+
HCDonutChart: "root";
|
|
2372
|
+
}
|
|
2373
|
+
|
|
2374
|
+
interface ComponentsPropsList {
|
|
2375
|
+
HCDonutChart: Partial<DonutChartProps>;
|
|
2376
|
+
}
|
|
2377
|
+
|
|
2378
|
+
interface Components<Theme = unknown> {
|
|
2379
|
+
HCDonutChart?: DonutChartComponentOverride<Theme>;
|
|
2380
|
+
}
|
|
2381
|
+
}
|
|
2382
|
+
|
|
2383
|
+
|
|
2384
|
+
|
|
2270
2385
|
declare module "@mui/material/styles" {
|
|
2271
2386
|
interface ComponentNameToClassKey {
|
|
2272
2387
|
HCDrillDownTreemap: "root";
|
|
@@ -2525,7 +2640,7 @@ declare module "@mui/material/styles" {
|
|
|
2525
2640
|
|
|
2526
2641
|
declare module "@mui/material/styles" {
|
|
2527
2642
|
interface ComponentNameToClassKey {
|
|
2528
|
-
HCColorPicker: "root" | "radio" | "pickerWrapper";
|
|
2643
|
+
HCColorPicker: "root" | "radio" | "pickerWrapper" | "trigger" | "swatch";
|
|
2529
2644
|
}
|
|
2530
2645
|
|
|
2531
2646
|
interface ComponentsPropsList {
|
|
@@ -3377,7 +3492,12 @@ declare module "@mui/material/styles" {
|
|
|
3377
3492
|
|
|
3378
3493
|
declare module "@mui/material/styles" {
|
|
3379
3494
|
interface ComponentNameToClassKey {
|
|
3380
|
-
HCSimplePivotTable:
|
|
3495
|
+
HCSimplePivotTable:
|
|
3496
|
+
| "root"
|
|
3497
|
+
| "header"
|
|
3498
|
+
| "content"
|
|
3499
|
+
| "footer"
|
|
3500
|
+
| "scrollHint";
|
|
3381
3501
|
}
|
|
3382
3502
|
|
|
3383
3503
|
interface ComponentsPropsList {
|