@conboai/storybook.components 0.3.38 → 0.3.39
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.
|
@@ -2,5 +2,5 @@ import { SxProps } from '@mui/material';
|
|
|
2
2
|
|
|
3
3
|
export declare const toggleSx: SxProps;
|
|
4
4
|
export declare const inputLabelSx: SxProps;
|
|
5
|
-
export declare const leftLabelSx: (
|
|
6
|
-
export declare const rightLabelSx: (
|
|
5
|
+
export declare const leftLabelSx: (leftLabelsDisabled?: boolean) => SxProps;
|
|
6
|
+
export declare const rightLabelSx: (rightLabelDisabled?: boolean) => SxProps;
|
|
@@ -64423,13 +64423,15 @@ const mle = {
|
|
|
64423
64423
|
}, kle = (t) => ({
|
|
64424
64424
|
color: t ? Rp : du
|
|
64425
64425
|
}), Ple = (t) => ({
|
|
64426
|
-
color: t ?
|
|
64426
|
+
color: t ? Rp : du
|
|
64427
64427
|
}), uCe = ({
|
|
64428
64428
|
checked: t,
|
|
64429
64429
|
onChange: e,
|
|
64430
64430
|
leftLabel: n,
|
|
64431
64431
|
sx: r,
|
|
64432
|
-
rightLabel: o
|
|
64432
|
+
rightLabel: o,
|
|
64433
|
+
leftLabelsDisabled: i = !1,
|
|
64434
|
+
rightLabelDisabled: a = !1
|
|
64433
64435
|
}) => /* @__PURE__ */ H.jsxs(
|
|
64434
64436
|
Zt,
|
|
64435
64437
|
{
|
|
@@ -64440,8 +64442,8 @@ const mle = {
|
|
|
64440
64442
|
alignItems: "center",
|
|
64441
64443
|
children: [
|
|
64442
64444
|
/* @__PURE__ */ H.jsxs(Zt, { container: !0, flexDirection: "column", gap: "15px", children: [
|
|
64443
|
-
n && /* @__PURE__ */ H.jsx(La, { sx: Sk, children: /* @__PURE__ */ H.jsx(on, { sx: kle(
|
|
64444
|
-
o && /* @__PURE__ */ H.jsx(La, { sx: Sk, children: /* @__PURE__ */ H.jsx(on, { sx: Ple(
|
|
64445
|
+
n && /* @__PURE__ */ H.jsx(La, { sx: Sk, children: /* @__PURE__ */ H.jsx(on, { sx: kle(i), title: n, children: n }) }),
|
|
64446
|
+
o && /* @__PURE__ */ H.jsx(La, { sx: Sk, children: /* @__PURE__ */ H.jsx(on, { sx: Ple(a), title: o, children: o }) })
|
|
64445
64447
|
] }),
|
|
64446
64448
|
/* @__PURE__ */ H.jsx(
|
|
64447
64449
|
vl,
|
|
@@ -74204,9 +74206,12 @@ const bCe = ({
|
|
|
74204
74206
|
onClick: l,
|
|
74205
74207
|
total: c
|
|
74206
74208
|
}) => {
|
|
74207
|
-
const u = Po(null), d = Po(null), [h, f] = Ve(!1), [b, g] = Ve(null), [p, m] = Ve(null), v = Yr(
|
|
74208
|
-
|
|
74209
|
-
|
|
74209
|
+
const u = Po(null), d = Po(null), [h, f] = Ve(!1), [b, g] = Ve(null), [p, m] = Ve(null), v = Yr(
|
|
74210
|
+
(A) => {
|
|
74211
|
+
g(A), l && l(A);
|
|
74212
|
+
},
|
|
74213
|
+
[l]
|
|
74214
|
+
), y = Yr(() => {
|
|
74210
74215
|
var M;
|
|
74211
74216
|
const A = (M = u.current) == null ? void 0 : M.chart;
|
|
74212
74217
|
A && (f(A.resetZoomButton), m({
|
|
@@ -74303,222 +74308,234 @@ const bCe = ({
|
|
|
74303
74308
|
return A && A.addEventListener("scroll", N), () => {
|
|
74304
74309
|
A && A.removeEventListener("scroll", N);
|
|
74305
74310
|
};
|
|
74306
|
-
}, [N])
|
|
74307
|
-
|
|
74308
|
-
|
|
74309
|
-
|
|
74310
|
-
|
|
74311
|
-
|
|
74312
|
-
|
|
74313
|
-
|
|
74314
|
-
|
|
74315
|
-
|
|
74316
|
-
|
|
74317
|
-
|
|
74318
|
-
|
|
74319
|
-
|
|
74320
|
-
|
|
74311
|
+
}, [N]), Ie(() => {
|
|
74312
|
+
if (t.length > 0) {
|
|
74313
|
+
const A = Math.min(
|
|
74314
|
+
...t.map((P) => new Date(P.startDate).getTime())
|
|
74315
|
+
), M = Math.max(
|
|
74316
|
+
...t.map(
|
|
74317
|
+
(P) => P.endDate ? new Date(P.endDate).getTime() : new Date(P.startDate).getTime()
|
|
74318
|
+
)
|
|
74319
|
+
);
|
|
74320
|
+
m({ min: A, max: M });
|
|
74321
|
+
}
|
|
74322
|
+
}, [t]);
|
|
74323
|
+
const j = Ea(
|
|
74324
|
+
() => t.filter((A) => A.id),
|
|
74325
|
+
[t]
|
|
74326
|
+
), D = Ea(
|
|
74327
|
+
() => ({
|
|
74328
|
+
chart: {
|
|
74329
|
+
type: "xrange",
|
|
74330
|
+
marginTop: 30,
|
|
74331
|
+
height: t.length * rd,
|
|
74332
|
+
zooming: {
|
|
74333
|
+
type: "x"
|
|
74334
|
+
},
|
|
74335
|
+
panning: !0,
|
|
74336
|
+
panKey: "shift",
|
|
74337
|
+
resetZoomButton: {
|
|
74338
|
+
theme: {
|
|
74339
|
+
style: {
|
|
74340
|
+
display: "none"
|
|
74341
|
+
}
|
|
74321
74342
|
}
|
|
74322
|
-
}
|
|
74323
|
-
|
|
74324
|
-
|
|
74325
|
-
|
|
74326
|
-
|
|
74327
|
-
|
|
74328
|
-
|
|
74329
|
-
|
|
74330
|
-
|
|
74343
|
+
},
|
|
74344
|
+
events: {
|
|
74345
|
+
render() {
|
|
74346
|
+
var x;
|
|
74347
|
+
const A = this, M = A.yAxis[0], P = A.xAxis[0];
|
|
74348
|
+
if (!M || !P) {
|
|
74349
|
+
console.error("yAxis или xAxis не определены");
|
|
74350
|
+
return;
|
|
74351
|
+
}
|
|
74352
|
+
A.verticalLines || (A.verticalLines = [], (x = P.tickPositions) == null || x.forEach((T) => {
|
|
74353
|
+
var V;
|
|
74354
|
+
const R = P.toPixels(T, !1), L = A.renderer.path([
|
|
74355
|
+
"M",
|
|
74356
|
+
R,
|
|
74357
|
+
M.top,
|
|
74358
|
+
"L",
|
|
74359
|
+
R,
|
|
74360
|
+
M.top + M.height
|
|
74361
|
+
]).attr({
|
|
74362
|
+
"stroke-width": 1,
|
|
74363
|
+
stroke: AS,
|
|
74364
|
+
zIndex: 3
|
|
74365
|
+
}).add();
|
|
74366
|
+
(V = A.verticalLines) == null || V.push({ line: L, pos: T, timePos: R });
|
|
74367
|
+
}));
|
|
74331
74368
|
}
|
|
74332
|
-
A.verticalLines || (A.verticalLines = [], (x = P.tickPositions) == null || x.forEach((T) => {
|
|
74333
|
-
var V;
|
|
74334
|
-
const R = P.toPixels(T, !1), L = A.renderer.path([
|
|
74335
|
-
"M",
|
|
74336
|
-
R,
|
|
74337
|
-
M.top,
|
|
74338
|
-
"L",
|
|
74339
|
-
R,
|
|
74340
|
-
M.top + M.height
|
|
74341
|
-
]).attr({
|
|
74342
|
-
"stroke-width": 1,
|
|
74343
|
-
stroke: AS,
|
|
74344
|
-
zIndex: 3
|
|
74345
|
-
}).add();
|
|
74346
|
-
(V = A.verticalLines) == null || V.push({ line: L, pos: T, timePos: R });
|
|
74347
|
-
}));
|
|
74348
74369
|
}
|
|
74349
|
-
}
|
|
74350
|
-
},
|
|
74351
|
-
title: {
|
|
74352
|
-
text: void 0
|
|
74353
|
-
},
|
|
74354
|
-
xAxis: {
|
|
74355
|
-
type: "datetime",
|
|
74356
|
-
opposite: !0,
|
|
74357
|
-
offset: 4,
|
|
74358
|
-
tickColor: oo,
|
|
74359
|
-
lineColor: oo,
|
|
74360
|
-
labels: {
|
|
74361
|
-
useHTML: !0,
|
|
74362
|
-
style: {
|
|
74363
|
-
color: FH
|
|
74364
|
-
}
|
|
74365
|
-
}
|
|
74366
|
-
},
|
|
74367
|
-
yAxis: {
|
|
74368
|
-
title: {
|
|
74369
|
-
text: "ID",
|
|
74370
|
-
align: "high",
|
|
74371
|
-
rotation: 0,
|
|
74372
|
-
offset: 0,
|
|
74373
|
-
x: -30,
|
|
74374
|
-
y: -20
|
|
74375
74370
|
},
|
|
74376
|
-
|
|
74377
|
-
|
|
74378
|
-
gridLineWidth: 0,
|
|
74379
|
-
scrollbar: {
|
|
74380
|
-
enabled: !0
|
|
74371
|
+
title: {
|
|
74372
|
+
text: void 0
|
|
74381
74373
|
},
|
|
74382
|
-
|
|
74383
|
-
|
|
74384
|
-
|
|
74385
|
-
|
|
74386
|
-
|
|
74387
|
-
|
|
74388
|
-
|
|
74389
|
-
|
|
74390
|
-
cursor: "pointer"
|
|
74391
|
-
}
|
|
74392
|
-
}
|
|
74393
|
-
},
|
|
74394
|
-
series: [
|
|
74395
|
-
{
|
|
74396
|
-
type: "xrange",
|
|
74397
|
-
name: "ID",
|
|
74398
|
-
borderColor: DH,
|
|
74399
|
-
pointWidth: 10,
|
|
74400
|
-
data: j.map((A, M) => ({
|
|
74401
|
-
x: new Date(A.startDate).getTime(),
|
|
74402
|
-
x2: A.endDate ? new Date(A.endDate).getTime() : void 0,
|
|
74403
|
-
y: j.findIndex((P) => P.id === A.id),
|
|
74404
|
-
color: n[M % n.length],
|
|
74405
|
-
index: M,
|
|
74406
|
-
id: A.id,
|
|
74407
|
-
tooltipData: { ...A },
|
|
74408
|
-
events: {
|
|
74409
|
-
click: function() {
|
|
74410
|
-
v(A.id);
|
|
74411
|
-
}
|
|
74412
|
-
}
|
|
74413
|
-
})),
|
|
74414
|
-
showInLegend: !1,
|
|
74415
|
-
dataLabels: {
|
|
74416
|
-
enabled: !1,
|
|
74374
|
+
xAxis: {
|
|
74375
|
+
type: "datetime",
|
|
74376
|
+
opposite: !0,
|
|
74377
|
+
offset: 4,
|
|
74378
|
+
tickColor: oo,
|
|
74379
|
+
lineColor: oo,
|
|
74380
|
+
labels: {
|
|
74381
|
+
useHTML: !0,
|
|
74417
74382
|
style: {
|
|
74418
|
-
color:
|
|
74419
|
-
textOutline: "none"
|
|
74383
|
+
color: FH
|
|
74420
74384
|
}
|
|
74385
|
+
}
|
|
74386
|
+
},
|
|
74387
|
+
yAxis: {
|
|
74388
|
+
title: {
|
|
74389
|
+
text: "ID",
|
|
74390
|
+
align: "high",
|
|
74391
|
+
rotation: 0,
|
|
74392
|
+
offset: 0,
|
|
74393
|
+
x: -30,
|
|
74394
|
+
y: -20
|
|
74421
74395
|
},
|
|
74422
|
-
|
|
74396
|
+
categories: j.map((A) => A.id),
|
|
74397
|
+
reversed: !1,
|
|
74398
|
+
gridLineWidth: 0,
|
|
74399
|
+
scrollbar: {
|
|
74400
|
+
enabled: !0
|
|
74401
|
+
},
|
|
74402
|
+
min: 0,
|
|
74403
|
+
max: j.length < 1 ? 0 : j.length - 1,
|
|
74404
|
+
labels: {
|
|
74405
|
+
formatter: function() {
|
|
74406
|
+
return `<span class="custom-label" style="cursor:pointer; font-weight:${this.value === b ? "bold" : "normal"};">${this.value}</span>`;
|
|
74407
|
+
},
|
|
74408
|
+
useHTML: !0,
|
|
74423
74409
|
style: {
|
|
74424
|
-
|
|
74410
|
+
cursor: "pointer"
|
|
74411
|
+
}
|
|
74412
|
+
}
|
|
74413
|
+
},
|
|
74414
|
+
series: [
|
|
74415
|
+
{
|
|
74416
|
+
type: "xrange",
|
|
74417
|
+
name: "ID",
|
|
74418
|
+
borderColor: DH,
|
|
74419
|
+
pointWidth: 10,
|
|
74420
|
+
data: j.map((A, M) => ({
|
|
74421
|
+
x: new Date(A.startDate).getTime(),
|
|
74422
|
+
x2: A.endDate ? new Date(A.endDate).getTime() : void 0,
|
|
74423
|
+
y: j.findIndex((P) => P.id === A.id),
|
|
74424
|
+
color: n[M % n.length],
|
|
74425
|
+
index: M,
|
|
74426
|
+
id: A.id,
|
|
74427
|
+
tooltipData: { ...A },
|
|
74428
|
+
events: {
|
|
74429
|
+
click: function() {
|
|
74430
|
+
v(A.id);
|
|
74431
|
+
}
|
|
74432
|
+
}
|
|
74433
|
+
})),
|
|
74434
|
+
showInLegend: !1,
|
|
74435
|
+
dataLabels: {
|
|
74436
|
+
enabled: !1,
|
|
74437
|
+
style: {
|
|
74438
|
+
color: "#000000",
|
|
74439
|
+
textOutline: "none"
|
|
74440
|
+
}
|
|
74425
74441
|
},
|
|
74426
|
-
|
|
74427
|
-
|
|
74428
|
-
|
|
74429
|
-
|
|
74430
|
-
|
|
74431
|
-
this.
|
|
74432
|
-
|
|
74433
|
-
|
|
74434
|
-
|
|
74442
|
+
tooltip: {
|
|
74443
|
+
style: {
|
|
74444
|
+
zIndex: 1e4
|
|
74445
|
+
},
|
|
74446
|
+
pointFormatter: function() {
|
|
74447
|
+
const A = Object.entries(this.tooltipData).filter(
|
|
74448
|
+
([M]) => !["id", "startDate", "endDate"].includes(M)
|
|
74449
|
+
).map(
|
|
74450
|
+
([M, P]) => `<br/><strong>${OO(M)}:</strong> ${P}`
|
|
74451
|
+
).join("");
|
|
74452
|
+
return `<span>ID: ${this.id}</span><br/><strong>Start:</strong> ${new Date(
|
|
74453
|
+
this.x
|
|
74454
|
+
).toLocaleString()}${this.x2 ? `<br/><strong>End:</strong> ${new Date(
|
|
74455
|
+
this.x2
|
|
74456
|
+
).toLocaleString()}` : ""}${A}`;
|
|
74457
|
+
}
|
|
74435
74458
|
}
|
|
74436
74459
|
}
|
|
74460
|
+
],
|
|
74461
|
+
credits: {
|
|
74462
|
+
enabled: !1
|
|
74437
74463
|
}
|
|
74438
|
-
|
|
74439
|
-
|
|
74440
|
-
|
|
74441
|
-
|
|
74442
|
-
|
|
74443
|
-
|
|
74444
|
-
|
|
74445
|
-
|
|
74446
|
-
|
|
74447
|
-
|
|
74448
|
-
|
|
74449
|
-
|
|
74450
|
-
|
|
74451
|
-
t.length === 0 && !a ? /* @__PURE__ */ H.jsx(Pt, { sx: Xle(i), children: /* @__PURE__ */ H.jsx(on, { variant: "body2", color: "textSecondary", children: "No rows" }) }) : /* @__PURE__ */ H.jsx(
|
|
74452
|
-
Pt,
|
|
74464
|
+
}),
|
|
74465
|
+
[t, j, b, v, n]
|
|
74466
|
+
);
|
|
74467
|
+
return /* @__PURE__ */ H.jsxs(Pt, { position: "relative", sx: Zle, id: "timeline-chart", children: [
|
|
74468
|
+
a && /* @__PURE__ */ H.jsx(Pt, { sx: Kle, children: /* @__PURE__ */ H.jsx(pu, { sx: tx }) }),
|
|
74469
|
+
t.length === 0 && !a ? /* @__PURE__ */ H.jsx(Pt, { sx: Xle(i), children: /* @__PURE__ */ H.jsx(on, { variant: "body2", color: "textSecondary", children: "No rows" }) }) : /* @__PURE__ */ H.jsx(
|
|
74470
|
+
Pt,
|
|
74471
|
+
{
|
|
74472
|
+
id: "scrollableDiv",
|
|
74473
|
+
ref: d,
|
|
74474
|
+
sx: Qle(i),
|
|
74475
|
+
children: /* @__PURE__ */ H.jsx(Pt, { sx: Jle, children: /* @__PURE__ */ H.jsx(
|
|
74476
|
+
Wle,
|
|
74453
74477
|
{
|
|
74454
|
-
|
|
74455
|
-
|
|
74456
|
-
|
|
74457
|
-
|
|
74458
|
-
|
|
74459
|
-
|
|
74460
|
-
|
|
74461
|
-
|
|
74462
|
-
|
|
74463
|
-
|
|
74464
|
-
|
|
74465
|
-
|
|
74466
|
-
|
|
74467
|
-
|
|
74468
|
-
|
|
74469
|
-
/* @__PURE__ */ H.
|
|
74470
|
-
|
|
74478
|
+
highcharts: Cx,
|
|
74479
|
+
options: D,
|
|
74480
|
+
ref: u
|
|
74481
|
+
},
|
|
74482
|
+
t.length
|
|
74483
|
+
) })
|
|
74484
|
+
}
|
|
74485
|
+
),
|
|
74486
|
+
/* @__PURE__ */ H.jsxs(Pt, { sx: ece, children: [
|
|
74487
|
+
/* @__PURE__ */ H.jsx(
|
|
74488
|
+
Er,
|
|
74489
|
+
{
|
|
74490
|
+
variant: "text",
|
|
74491
|
+
onClick: C,
|
|
74492
|
+
disabled: !t.length,
|
|
74493
|
+
children: /* @__PURE__ */ H.jsxs(
|
|
74494
|
+
Zt,
|
|
74471
74495
|
{
|
|
74472
|
-
|
|
74473
|
-
|
|
74474
|
-
|
|
74475
|
-
|
|
74476
|
-
|
|
74477
|
-
|
|
74478
|
-
|
|
74479
|
-
|
|
74480
|
-
|
|
74481
|
-
|
|
74482
|
-
|
|
74483
|
-
|
|
74484
|
-
|
|
74485
|
-
|
|
74486
|
-
|
|
74487
|
-
|
|
74488
|
-
|
|
74489
|
-
|
|
74490
|
-
|
|
74491
|
-
|
|
74492
|
-
|
|
74493
|
-
|
|
74494
|
-
|
|
74495
|
-
|
|
74496
|
-
|
|
74497
|
-
lineHeight: "20px",
|
|
74498
|
-
letterSpacing: "0.4px",
|
|
74499
|
-
children: "Download"
|
|
74500
|
-
}
|
|
74501
|
-
)
|
|
74502
|
-
]
|
|
74503
|
-
}
|
|
74504
|
-
)
|
|
74496
|
+
container: !0,
|
|
74497
|
+
gap: "8px",
|
|
74498
|
+
justifyContent: "space-between",
|
|
74499
|
+
alignItems: "center",
|
|
74500
|
+
children: [
|
|
74501
|
+
/* @__PURE__ */ H.jsx(
|
|
74502
|
+
qn,
|
|
74503
|
+
{
|
|
74504
|
+
icon: "download",
|
|
74505
|
+
fill: e === "light" ? "#212121" : "rgba(255, 255, 255, 0.5)"
|
|
74506
|
+
}
|
|
74507
|
+
),
|
|
74508
|
+
/* @__PURE__ */ H.jsx(
|
|
74509
|
+
on,
|
|
74510
|
+
{
|
|
74511
|
+
textTransform: "capitalize",
|
|
74512
|
+
color: "#000000",
|
|
74513
|
+
fontWeight: "400",
|
|
74514
|
+
fontSize: "12px",
|
|
74515
|
+
lineHeight: "20px",
|
|
74516
|
+
letterSpacing: "0.4px",
|
|
74517
|
+
children: "Download"
|
|
74518
|
+
}
|
|
74519
|
+
)
|
|
74520
|
+
]
|
|
74505
74521
|
}
|
|
74506
|
-
)
|
|
74507
|
-
|
|
74508
|
-
|
|
74509
|
-
|
|
74510
|
-
|
|
74511
|
-
|
|
74512
|
-
|
|
74513
|
-
|
|
74514
|
-
|
|
74515
|
-
|
|
74516
|
-
|
|
74517
|
-
|
|
74518
|
-
|
|
74519
|
-
|
|
74520
|
-
|
|
74521
|
-
|
|
74522
|
+
)
|
|
74523
|
+
}
|
|
74524
|
+
),
|
|
74525
|
+
p && /* @__PURE__ */ H.jsxs(on, { sx: kk(e), children: [
|
|
74526
|
+
"Date range: ",
|
|
74527
|
+
new Date(p.min).toLocaleString(),
|
|
74528
|
+
" -",
|
|
74529
|
+
" ",
|
|
74530
|
+
new Date(p.max).toLocaleString()
|
|
74531
|
+
] }),
|
|
74532
|
+
/* @__PURE__ */ H.jsxs(on, { sx: kk(e), children: [
|
|
74533
|
+
t.length,
|
|
74534
|
+
" rows from ",
|
|
74535
|
+
c || "Unknown"
|
|
74536
|
+
] })
|
|
74537
|
+
] })
|
|
74538
|
+
] });
|
|
74522
74539
|
}, tce = (t, e) => e === 1 ? "white" : `hsl(${360 * +t * 5 / e / 4}, 100%, 50%)`, od = (t, e, n) => {
|
|
74523
74540
|
const r = t / n.width - 0.5, o = e / n.height - 0.5;
|
|
74524
74541
|
return { x: r, y: o };
|