@hybridcore/ui 1.6.29 → 1.6.30
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/dist/components/charts/line/logic.js +124 -101
- package/dist/components/data-list/logic.js +131 -137
- package/dist/components/metric-card/MetricChart.js +60 -58
- package/dist/components/metric-card/index.js +53 -40
- package/dist/components/metric-card/logic.js +66 -57
- package/dist/components/metric-card/styled.js +13 -9
- package/dist/components/paginated-list/helpers.js +8 -0
- package/dist/components/paginated-list/index.js +144 -61
- package/dist/components/paginated-list/logic.js +84 -47
- package/dist/components/paginated-list/styled.js +154 -17
- package/dist/hooks/useInfinitePaging.js +51 -0
- package/dist/main.d.ts +115 -3
- package/package.json +1 -1
|
@@ -1,224 +1,218 @@
|
|
|
1
|
-
import { useThemeProps as
|
|
2
|
-
import {
|
|
3
|
-
import
|
|
4
|
-
import {
|
|
5
|
-
import { I as
|
|
1
|
+
import { useThemeProps as ae } from "@mui/material";
|
|
2
|
+
import { useState as b, useMemo as N } from "react";
|
|
3
|
+
import oe from "../../hooks/useInfinitePaging.js";
|
|
4
|
+
import { c as a } from "../../createReactComponent-C7L-DMHj.js";
|
|
5
|
+
import { a as ne, I as se } from "../../IconCheck-BcUcbvno.js";
|
|
6
|
+
import { I as ie } from "../../IconCircle-HcgE1lHy.js";
|
|
6
7
|
/**
|
|
7
8
|
* @license @tabler/icons-react v3.44.0 - MIT
|
|
8
9
|
*
|
|
9
10
|
* This source code is licensed under the MIT license.
|
|
10
11
|
* See the LICENSE file in the root directory of this source tree.
|
|
11
12
|
*/
|
|
12
|
-
const
|
|
13
|
+
const ce = [["path", { d: "M3 12a9 9 0 1 0 18 0a9 9 0 0 0 -18 0", key: "svg-0" }], ["path", { d: "M12 8v4", key: "svg-1" }], ["path", { d: "M12 16h.01", key: "svg-2" }]], re = a("outline", "alert-circle", "AlertCircle", ce);
|
|
13
14
|
/**
|
|
14
15
|
* @license @tabler/icons-react v3.44.0 - MIT
|
|
15
16
|
*
|
|
16
17
|
* This source code is licensed under the MIT license.
|
|
17
18
|
* See the LICENSE file in the root directory of this source tree.
|
|
18
19
|
*/
|
|
19
|
-
const
|
|
20
|
+
const le = [["path", { d: "M10 5a2 2 0 1 1 4 0a7 7 0 0 1 4 6v3a4 4 0 0 0 2 3h-16a4 4 0 0 0 2 -3v-3a7 7 0 0 1 4 -6", key: "svg-0" }], ["path", { d: "M9 17v1a3 3 0 0 0 6 0v-1", key: "svg-1" }]], de = a("outline", "bell", "Bell", le);
|
|
20
21
|
/**
|
|
21
22
|
* @license @tabler/icons-react v3.44.0 - MIT
|
|
22
23
|
*
|
|
23
24
|
* This source code is licensed under the MIT license.
|
|
24
25
|
* See the LICENSE file in the root directory of this source tree.
|
|
25
26
|
*/
|
|
26
|
-
const
|
|
27
|
+
const ge = [["path", { d: "M3 12a9 9 0 1 0 18 0a9 9 0 0 0 -18 0", key: "svg-0" }], ["path", { d: "M12 7v5l3 3", key: "svg-1" }]], he = a("outline", "clock", "Clock", ge);
|
|
27
28
|
/**
|
|
28
29
|
* @license @tabler/icons-react v3.44.0 - MIT
|
|
29
30
|
*
|
|
30
31
|
* This source code is licensed under the MIT license.
|
|
31
32
|
* See the LICENSE file in the root directory of this source tree.
|
|
32
33
|
*/
|
|
33
|
-
const
|
|
34
|
+
const pe = [["path", { d: "M14 3v4a1 1 0 0 0 1 1h4", key: "svg-0" }], ["path", { d: "M17 21h-10a2 2 0 0 1 -2 -2v-14a2 2 0 0 1 2 -2h7l5 5v11a2 2 0 0 1 -2 2", key: "svg-1" }], ["path", { d: "M9 9l1 0", key: "svg-2" }], ["path", { d: "M9 13l6 0", key: "svg-3" }], ["path", { d: "M9 17l6 0", key: "svg-4" }]], ve = a("outline", "file-text", "FileText", pe);
|
|
34
35
|
/**
|
|
35
36
|
* @license @tabler/icons-react v3.44.0 - MIT
|
|
36
37
|
*
|
|
37
38
|
* This source code is licensed under the MIT license.
|
|
38
39
|
* See the LICENSE file in the root directory of this source tree.
|
|
39
40
|
*/
|
|
40
|
-
const
|
|
41
|
+
const ue = [["path", { d: "M5 5a5 5 0 0 1 7 0a5 5 0 0 0 7 0v9a5 5 0 0 1 -7 0a5 5 0 0 0 -7 0v-9", key: "svg-0" }], ["path", { d: "M5 21v-7", key: "svg-1" }]], me = a("outline", "flag", "Flag", ue);
|
|
41
42
|
/**
|
|
42
43
|
* @license @tabler/icons-react v3.44.0 - MIT
|
|
43
44
|
*
|
|
44
45
|
* This source code is licensed under the MIT license.
|
|
45
46
|
* See the LICENSE file in the root directory of this source tree.
|
|
46
47
|
*/
|
|
47
|
-
const
|
|
48
|
+
const Me = [["path", { d: "M3 12a9 9 0 1 0 18 0a9 9 0 0 0 -18 0", key: "svg-0" }], ["path", { d: "M12 9h.01", key: "svg-1" }], ["path", { d: "M11 12h1v4h1", key: "svg-2" }]], fe = a("outline", "info-circle", "InfoCircle", Me);
|
|
48
49
|
/**
|
|
49
50
|
* @license @tabler/icons-react v3.44.0 - MIT
|
|
50
51
|
*
|
|
51
52
|
* This source code is licensed under the MIT license.
|
|
52
53
|
* See the LICENSE file in the root directory of this source tree.
|
|
53
54
|
*/
|
|
54
|
-
const
|
|
55
|
+
const ke = [["path", { d: "M9 11a3 3 0 1 0 6 0a3 3 0 0 0 -6 0", key: "svg-0" }], ["path", { d: "M17.657 16.657l-4.243 4.243a2 2 0 0 1 -2.827 0l-4.244 -4.243a8 8 0 1 1 11.314 0", key: "svg-1" }]], ye = a("outline", "map-pin", "MapPin", ke);
|
|
55
56
|
/**
|
|
56
57
|
* @license @tabler/icons-react v3.44.0 - MIT
|
|
57
58
|
*
|
|
58
59
|
* This source code is licensed under the MIT license.
|
|
59
60
|
* See the LICENSE file in the root directory of this source tree.
|
|
60
61
|
*/
|
|
61
|
-
const
|
|
62
|
+
const Pe = [["path", { d: "M8 9h8", key: "svg-0" }], ["path", { d: "M8 13h6", key: "svg-1" }], ["path", { d: "M18 4a3 3 0 0 1 3 3v8a3 3 0 0 1 -3 3h-5l-5 3v-3h-2a3 3 0 0 1 -3 -3v-8a3 3 0 0 1 3 -3h12", key: "svg-2" }]], _e = a("outline", "message", "Message", Pe);
|
|
62
63
|
/**
|
|
63
64
|
* @license @tabler/icons-react v3.44.0 - MIT
|
|
64
65
|
*
|
|
65
66
|
* This source code is licensed under the MIT license.
|
|
66
67
|
* See the LICENSE file in the root directory of this source tree.
|
|
67
68
|
*/
|
|
68
|
-
const
|
|
69
|
+
const Ie = [["path", { d: "M15.04 19.745c-.942 .551 -1.964 .976 -3.04 1.255a12 12 0 0 1 -8.5 -15a12 12 0 0 0 8.5 -3a12 12 0 0 0 8.5 3a12 12 0 0 1 .195 6.015", key: "svg-0" }], ["path", { d: "M19 16v3", key: "svg-1" }], ["path", { d: "M19 22v.01", key: "svg-2" }]], be = a("outline", "shield-exclamation", "ShieldExclamation", Ie);
|
|
69
70
|
/**
|
|
70
71
|
* @license @tabler/icons-react v3.44.0 - MIT
|
|
71
72
|
*
|
|
72
73
|
* This source code is licensed under the MIT license.
|
|
73
74
|
* See the LICENSE file in the root directory of this source tree.
|
|
74
75
|
*/
|
|
75
|
-
const
|
|
76
|
+
const Ne = [["path", { d: "M12 3a12 12 0 0 0 8.5 3a12 12 0 0 1 -8.5 15a12 12 0 0 1 -8.5 -15a12 12 0 0 0 8.5 -3", key: "svg-0" }]], Se = a("outline", "shield", "Shield", Ne);
|
|
76
77
|
/**
|
|
77
78
|
* @license @tabler/icons-react v3.44.0 - MIT
|
|
78
79
|
*
|
|
79
80
|
* This source code is licensed under the MIT license.
|
|
80
81
|
* See the LICENSE file in the root directory of this source tree.
|
|
81
82
|
*/
|
|
82
|
-
const
|
|
83
|
+
const we = [["path", { d: "M7 11v8a1 1 0 0 1 -1 1h-2a1 1 0 0 1 -1 -1v-7a1 1 0 0 1 1 -1h3a4 4 0 0 0 4 -4v-1a2 2 0 0 1 4 0v5h3a2 2 0 0 1 2 2l-1 5a2 3 0 0 1 -2 2h-7a3 3 0 0 1 -3 -3", key: "svg-0" }]], $e = a("outline", "thumb-up", "ThumbUp", we);
|
|
83
84
|
/**
|
|
84
85
|
* @license @tabler/icons-react v3.44.0 - MIT
|
|
85
86
|
*
|
|
86
87
|
* This source code is licensed under the MIT license.
|
|
87
88
|
* See the LICENSE file in the root directory of this source tree.
|
|
88
89
|
*/
|
|
89
|
-
const
|
|
90
|
-
shield:
|
|
91
|
-
"shield-alert":
|
|
92
|
-
"alert-triangle":
|
|
93
|
-
"alert-circle":
|
|
94
|
-
info:
|
|
95
|
-
bell:
|
|
96
|
-
check:
|
|
97
|
-
clock:
|
|
98
|
-
flag:
|
|
99
|
-
file:
|
|
100
|
-
"map-pin":
|
|
101
|
-
message:
|
|
102
|
-
"thumb-up":
|
|
103
|
-
users:
|
|
104
|
-
circle:
|
|
105
|
-
},
|
|
106
|
-
if (!(
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
);
|
|
151
|
-
|
|
152
|
-
}, [u, P, _, b]), B(() => {
|
|
153
|
-
u && !c && L(a);
|
|
154
|
-
}, [u, c, a, m, o.length]);
|
|
155
|
-
const ee = (e, t) => {
|
|
156
|
-
C(t), r == null || r({ ...i, pageNumber: t, rows: a });
|
|
157
|
-
}, te = (e) => {
|
|
90
|
+
const Ce = [["path", { d: "M5 7a4 4 0 1 0 8 0a4 4 0 1 0 -8 0", key: "svg-0" }], ["path", { d: "M3 21v-2a4 4 0 0 1 4 -4h4a4 4 0 0 1 4 4v2", key: "svg-1" }], ["path", { d: "M16 3.13a4 4 0 0 1 0 7.75", key: "svg-2" }], ["path", { d: "M21 21v-2a4 4 0 0 0 -3 -3.85", key: "svg-3" }]], Le = a("outline", "users", "Users", Ce), Re = {
|
|
91
|
+
shield: Se,
|
|
92
|
+
"shield-alert": be,
|
|
93
|
+
"alert-triangle": ne,
|
|
94
|
+
"alert-circle": re,
|
|
95
|
+
info: fe,
|
|
96
|
+
bell: de,
|
|
97
|
+
check: se,
|
|
98
|
+
clock: he,
|
|
99
|
+
flag: me,
|
|
100
|
+
file: ve,
|
|
101
|
+
"map-pin": ye,
|
|
102
|
+
message: _e,
|
|
103
|
+
"thumb-up": $e,
|
|
104
|
+
users: Le,
|
|
105
|
+
circle: ie
|
|
106
|
+
}, xe = [5, 10, 25, 50], S = (l, n) => {
|
|
107
|
+
if (!(l != null && l.length) || n === void 0 || n === null)
|
|
108
|
+
return;
|
|
109
|
+
const i = `${n}`.trim().toLowerCase();
|
|
110
|
+
if (i)
|
|
111
|
+
return l.find((g) => `${g.value}`.trim().toLowerCase() === i);
|
|
112
|
+
}, Ae = (l) => {
|
|
113
|
+
const n = ae({ props: l, name: "HCDataList" }), {
|
|
114
|
+
data: i = [],
|
|
115
|
+
totalCount: g,
|
|
116
|
+
payload: s,
|
|
117
|
+
onChange: c,
|
|
118
|
+
onItemClick: h,
|
|
119
|
+
iconStates: w,
|
|
120
|
+
iconShape: $ = "circle",
|
|
121
|
+
badgeStates: C,
|
|
122
|
+
endSlot: M = "badge",
|
|
123
|
+
metaSeparator: L = "•",
|
|
124
|
+
descriptionLines: R = 1,
|
|
125
|
+
dense: x = !1,
|
|
126
|
+
divider: T = !0,
|
|
127
|
+
headerGutter: O = !1,
|
|
128
|
+
paginationMode: v = "infinite",
|
|
129
|
+
rowsPerPage: B = 10,
|
|
130
|
+
resetKey: D,
|
|
131
|
+
loading: f = !1,
|
|
132
|
+
loadingMore: E = !1
|
|
133
|
+
} = n, [F, k] = b(0), [A, U] = b(B), d = (s == null ? void 0 : s.pageNumber) ?? F, r = (s == null ? void 0 : s.rows) ?? A, u = !!c, m = v === "infinite", {
|
|
134
|
+
displayData: y,
|
|
135
|
+
hasMore: V,
|
|
136
|
+
isLoadingMore: G,
|
|
137
|
+
scrollRef: j,
|
|
138
|
+
sentinelRef: H
|
|
139
|
+
} = oe({
|
|
140
|
+
data: i,
|
|
141
|
+
totalCount: g,
|
|
142
|
+
page: d,
|
|
143
|
+
rowsPerPage: r,
|
|
144
|
+
payload: s,
|
|
145
|
+
onChange: c,
|
|
146
|
+
resetKey: D,
|
|
147
|
+
loading: f,
|
|
148
|
+
loadingMore: E,
|
|
149
|
+
enabled: m
|
|
150
|
+
}), P = u ? g ?? 0 : i.length, p = N(() => m ? y : u ? i : i.slice(d * r, (d + 1) * r), [m, y, u, i, d, r]), J = v === "buttons" && P > r, K = (e, t) => {
|
|
151
|
+
k(t), c == null || c({ ...s, pageNumber: t, rows: r });
|
|
152
|
+
}, W = (e) => {
|
|
158
153
|
const t = parseInt(e.target.value, 10);
|
|
159
|
-
|
|
160
|
-
},
|
|
161
|
-
e.disabled ||
|
|
162
|
-
},
|
|
154
|
+
U(t), k(0), c == null || c({ ...s, pageNumber: 0, rows: t });
|
|
155
|
+
}, q = (e) => () => {
|
|
156
|
+
e.disabled || h == null || h(e);
|
|
157
|
+
}, z = (e) => !!h && !e.disabled, Q = (e) => {
|
|
163
158
|
if (!e.meta) return e.description;
|
|
164
|
-
const t = e.meta.filter((
|
|
165
|
-
return t.length ? t.join(` ${
|
|
166
|
-
},
|
|
167
|
-
var
|
|
168
|
-
const t = (
|
|
169
|
-
return t ?
|
|
170
|
-
},
|
|
171
|
-
var
|
|
172
|
-
const t =
|
|
173
|
-
return t ? t.label ?? t.value : ((
|
|
174
|
-
},
|
|
159
|
+
const t = e.meta.filter((o) => o != null && `${o}`.trim() !== "").map((o) => `${o}`.trim());
|
|
160
|
+
return t.length ? t.join(` ${L} `) : void 0;
|
|
161
|
+
}, _ = (e) => S(w, e.iconValue), X = (e) => {
|
|
162
|
+
var o;
|
|
163
|
+
const t = (o = _(e)) == null ? void 0 : o.icon;
|
|
164
|
+
return t ? Re[t] : void 0;
|
|
165
|
+
}, I = (e) => S(C, e.status), Y = (e) => {
|
|
166
|
+
var o;
|
|
167
|
+
const t = I(e);
|
|
168
|
+
return t ? t.label ?? t.value : ((o = e.status) == null ? void 0 : o.trim()) || void 0;
|
|
169
|
+
}, Z = (e) => {
|
|
175
170
|
const t = typeof e.endValue == "string" ? Number(e.endValue) : e.endValue;
|
|
176
171
|
return Number.isFinite(t) ? Math.min(100, Math.max(0, t)) : 0;
|
|
177
|
-
},
|
|
178
|
-
() => JSON.stringify({ title:
|
|
179
|
-
[
|
|
180
|
-
),
|
|
181
|
-
...
|
|
182
|
-
iconShape:
|
|
183
|
-
endSlot:
|
|
184
|
-
dense:
|
|
185
|
-
divider:
|
|
186
|
-
descriptionLines:
|
|
187
|
-
headerGutter:
|
|
188
|
-
paginationMode:
|
|
189
|
-
isEmpty: !
|
|
172
|
+
}, ee = N(
|
|
173
|
+
() => JSON.stringify({ title: n.title, data: p }),
|
|
174
|
+
[n.title, p]
|
|
175
|
+
), te = {
|
|
176
|
+
...n,
|
|
177
|
+
iconShape: $,
|
|
178
|
+
endSlot: M,
|
|
179
|
+
dense: x,
|
|
180
|
+
divider: T,
|
|
181
|
+
descriptionLines: R,
|
|
182
|
+
headerGutter: O,
|
|
183
|
+
paginationMode: v,
|
|
184
|
+
isEmpty: !f && p.length === 0
|
|
190
185
|
};
|
|
191
186
|
return {
|
|
192
|
-
refs: { listRef:
|
|
187
|
+
refs: { listRef: j, sentinelRef: H },
|
|
193
188
|
state: {
|
|
194
|
-
ownerState:
|
|
195
|
-
displayData:
|
|
196
|
-
count:
|
|
197
|
-
page:
|
|
198
|
-
rowsPerPage:
|
|
199
|
-
rowsPerPageOptions:
|
|
200
|
-
showPagination:
|
|
201
|
-
hasMore:
|
|
189
|
+
ownerState: te,
|
|
190
|
+
displayData: p,
|
|
191
|
+
count: P,
|
|
192
|
+
page: d,
|
|
193
|
+
rowsPerPage: r,
|
|
194
|
+
rowsPerPageOptions: n.rowsPerPageOptions ?? xe,
|
|
195
|
+
showPagination: J,
|
|
196
|
+
hasMore: V,
|
|
202
197
|
// Either the caller says a request is running, or we know one is in flight.
|
|
203
|
-
isLoadingMore:
|
|
204
|
-
snapshot:
|
|
205
|
-
endSlot:
|
|
206
|
-
isItemClickable:
|
|
207
|
-
getSecondaryText:
|
|
208
|
-
getIconState:
|
|
209
|
-
getIcon:
|
|
210
|
-
getBadgeState:
|
|
211
|
-
getBadgeLabel:
|
|
212
|
-
getProgressValue:
|
|
198
|
+
isLoadingMore: G,
|
|
199
|
+
snapshot: ee,
|
|
200
|
+
endSlot: M,
|
|
201
|
+
isItemClickable: z,
|
|
202
|
+
getSecondaryText: Q,
|
|
203
|
+
getIconState: _,
|
|
204
|
+
getIcon: X,
|
|
205
|
+
getBadgeState: I,
|
|
206
|
+
getBadgeLabel: Y,
|
|
207
|
+
getProgressValue: Z
|
|
213
208
|
},
|
|
214
209
|
actions: {
|
|
215
|
-
handleChangePage:
|
|
216
|
-
handleChangeRowsPerPage:
|
|
217
|
-
handleItemClick:
|
|
218
|
-
loadMore: b
|
|
210
|
+
handleChangePage: K,
|
|
211
|
+
handleChangeRowsPerPage: W,
|
|
212
|
+
handleItemClick: q
|
|
219
213
|
}
|
|
220
214
|
};
|
|
221
215
|
};
|
|
222
216
|
export {
|
|
223
|
-
|
|
217
|
+
Ae as useDataListLogic
|
|
224
218
|
};
|
|
@@ -1,28 +1,28 @@
|
|
|
1
|
-
import { jsx as
|
|
2
|
-
import { R as
|
|
3
|
-
import { useTheme as
|
|
4
|
-
import { useRef as
|
|
5
|
-
import { X as
|
|
6
|
-
import { C as
|
|
7
|
-
import { A as
|
|
8
|
-
import { T as
|
|
9
|
-
import { C } from "../../ColumnSeries-CtRTsn-E.js";
|
|
10
|
-
import { c as
|
|
1
|
+
import { jsx as A } from "react/jsx-runtime";
|
|
2
|
+
import { R as g, A as T } from "../../AnimatedTheme-ktdO3Bel.js";
|
|
3
|
+
import { useTheme as w, alpha as x } from "@mui/material";
|
|
4
|
+
import { useRef as R, useLayoutEffect as y } from "react";
|
|
5
|
+
import { X as v, V as L } from "../../AxisRenderer-BCQoUJw6.js";
|
|
6
|
+
import { C as X } from "../../CategoryAxis-B6NqW8qd.js";
|
|
7
|
+
import { A as b, a as C } from "../../AxisRendererY-AXWvGU6r.js";
|
|
8
|
+
import { T as F } from "../../Tooltip-vyZRZWih.js";
|
|
9
|
+
import { C as S } from "../../ColumnSeries-CtRTsn-E.js";
|
|
10
|
+
import { c as i } from "../../Entity-BJCuhdq_.js";
|
|
11
11
|
import { L as Y } from "../../LineSeries-D_IL2qGF.js";
|
|
12
|
-
import { L as
|
|
13
|
-
const
|
|
14
|
-
data:
|
|
12
|
+
import { L as G } from "../../LinearGradient-CxQyCSEB.js";
|
|
13
|
+
const u = 10, k = 21, q = ({
|
|
14
|
+
data: a,
|
|
15
15
|
type: p,
|
|
16
|
-
|
|
17
|
-
|
|
16
|
+
fill: n = "solid",
|
|
17
|
+
color: h
|
|
18
18
|
}) => {
|
|
19
|
-
const l =
|
|
20
|
-
return
|
|
19
|
+
const l = R(null), c = w(), r = h ?? c.palette.divider;
|
|
20
|
+
return y(() => {
|
|
21
21
|
if (!l.current) return;
|
|
22
|
-
const e =
|
|
23
|
-
e.setThemes([
|
|
24
|
-
const
|
|
25
|
-
|
|
22
|
+
const e = g.new(l.current);
|
|
23
|
+
e.setThemes([T.new(e)]);
|
|
24
|
+
const s = e.container.children.push(
|
|
25
|
+
v.new(e, {
|
|
26
26
|
panX: !1,
|
|
27
27
|
panY: !1,
|
|
28
28
|
wheelX: "none",
|
|
@@ -32,80 +32,82 @@ const z = ({
|
|
|
32
32
|
paddingTop: 0,
|
|
33
33
|
paddingBottom: 0
|
|
34
34
|
})
|
|
35
|
-
),
|
|
36
|
-
|
|
35
|
+
), o = s.xAxes.push(
|
|
36
|
+
X.new(e, {
|
|
37
37
|
categoryField: "t",
|
|
38
|
-
renderer:
|
|
38
|
+
renderer: b.new(e, {
|
|
39
39
|
minGridDistance: 10
|
|
40
40
|
}),
|
|
41
|
-
tooltip:
|
|
41
|
+
tooltip: F.new(e, {})
|
|
42
42
|
})
|
|
43
|
-
),
|
|
44
|
-
|
|
43
|
+
), d = o.get("renderer");
|
|
44
|
+
d.grid.template.set("visible", !1), d.labels.template.set("visible", !1), o.setAll({
|
|
45
45
|
startLocation: 0.5,
|
|
46
46
|
endLocation: 0.5
|
|
47
|
-
}),
|
|
48
|
-
const
|
|
49
|
-
|
|
50
|
-
renderer:
|
|
47
|
+
}), o.data.setAll(a);
|
|
48
|
+
const m = s.yAxes.push(
|
|
49
|
+
L.new(e, {
|
|
50
|
+
renderer: C.new(e, {})
|
|
51
51
|
})
|
|
52
|
-
), f =
|
|
52
|
+
), f = m.get("renderer");
|
|
53
53
|
f.grid.template.set("visible", !1), f.labels.template.set("visible", !1);
|
|
54
|
-
let
|
|
55
|
-
return p === "column" ? (
|
|
56
|
-
|
|
54
|
+
let t;
|
|
55
|
+
return p === "column" ? (t = s.series.push(
|
|
56
|
+
S.new(e, {
|
|
57
57
|
name: "Series",
|
|
58
|
-
xAxis:
|
|
59
|
-
yAxis:
|
|
58
|
+
xAxis: o,
|
|
59
|
+
yAxis: m,
|
|
60
60
|
valueYField: "v",
|
|
61
61
|
categoryXField: "t",
|
|
62
|
-
fill:
|
|
62
|
+
fill: i(r)
|
|
63
63
|
})
|
|
64
|
-
),
|
|
64
|
+
), t.columns.template.setAll({
|
|
65
65
|
cornerRadiusTL: 2,
|
|
66
66
|
cornerRadiusTR: 2,
|
|
67
67
|
strokeOpacity: 0
|
|
68
|
-
})) : (
|
|
68
|
+
})) : (t = s.series.push(
|
|
69
69
|
Y.new(e, {
|
|
70
70
|
name: "Series",
|
|
71
|
-
xAxis:
|
|
72
|
-
yAxis:
|
|
71
|
+
xAxis: o,
|
|
72
|
+
yAxis: m,
|
|
73
73
|
valueYField: "v",
|
|
74
74
|
categoryXField: "t",
|
|
75
75
|
// @ts-expect-error amcharts5 typing accepts string/Color; alpha returns rgba string
|
|
76
|
-
fill:
|
|
77
|
-
stroke:
|
|
76
|
+
fill: x(r, 0.25),
|
|
77
|
+
stroke: i(r)
|
|
78
78
|
})
|
|
79
|
-
),
|
|
79
|
+
), t.strokes.template.setAll({
|
|
80
80
|
strokeWidth: 1
|
|
81
|
-
}),
|
|
81
|
+
}), t.fills.template.setAll({
|
|
82
82
|
fillOpacity: 1,
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
83
|
+
// "none" leaves the stroke alone on the card surface, which is what the plain
|
|
84
|
+
// sparklines want; anything else paints the band beneath it.
|
|
85
|
+
visible: n !== "none",
|
|
86
|
+
...n === "gradient" && {
|
|
87
|
+
fillGradient: G.new(e, {
|
|
86
88
|
rotation: 90,
|
|
87
89
|
stops: [
|
|
88
|
-
{ color:
|
|
89
|
-
{ color:
|
|
90
|
+
{ color: i(r), opacity: 0.6 },
|
|
91
|
+
{ color: i(r), opacity: 0 }
|
|
90
92
|
]
|
|
91
93
|
})
|
|
92
94
|
}
|
|
93
|
-
})),
|
|
95
|
+
})), t.data.setAll(a), t.appear(1e3), s.appear(1e3, 100), () => {
|
|
94
96
|
e.dispose();
|
|
95
97
|
};
|
|
96
|
-
}, [
|
|
98
|
+
}, [a, p, n, r, c.palette.mode]), /* @__PURE__ */ A(
|
|
97
99
|
"div",
|
|
98
100
|
{
|
|
99
101
|
ref: l,
|
|
100
|
-
style:
|
|
101
|
-
width:
|
|
102
|
+
style: {
|
|
103
|
+
width: `calc(100% + ${u}px)`,
|
|
102
104
|
height: "100%",
|
|
103
|
-
|
|
104
|
-
|
|
105
|
+
marginLeft: -u,
|
|
106
|
+
marginBottom: -k
|
|
105
107
|
}
|
|
106
108
|
}
|
|
107
109
|
);
|
|
108
110
|
};
|
|
109
111
|
export {
|
|
110
|
-
|
|
112
|
+
q as MetricChart
|
|
111
113
|
};
|