@hybridcore/ui 1.6.28 → 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/_common/format.js +64 -54
- package/dist/components/charts/_common/utils.js +39 -20
- package/dist/components/charts/donut-chart/logic.js +96 -58
- package/dist/components/charts/line/logic.js +124 -101
- package/dist/components/charts/pie-chart/logic.js +88 -50
- 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 +165 -5
- package/package.json +1 -1
|
@@ -1,28 +1,33 @@
|
|
|
1
|
-
import { jsx as e, jsxs as i, Fragment as
|
|
1
|
+
import { jsx as e, jsxs as i, Fragment as v } from "react/jsx-runtime";
|
|
2
2
|
import { Stack as a, Skeleton as l, Tooltip as c } from "@mui/material";
|
|
3
|
-
import { MetricChart as
|
|
4
|
-
import { useMetricCardLogic as
|
|
5
|
-
import { MetricCardRoot as
|
|
6
|
-
const
|
|
7
|
-
const { state:
|
|
3
|
+
import { MetricChart as y } from "./MetricChart.js";
|
|
4
|
+
import { useMetricCardLogic as W } from "./logic.js";
|
|
5
|
+
import { MetricCardRoot as S, MetricCardValue as D, MetricCardSecondValue as F, MetricCardTrendContainer as L, MetricCardLabel as b, MetricCardPanel as A, MetricCardDescription as I, MetricCardSideChart as R, MetricCardCornerIconContainer as q, MetricCardIconContainer as T, MetricCardContent as B, MetricCardChartContainer as E } from "./styled.js";
|
|
6
|
+
const O = (t) => {
|
|
7
|
+
const { state: j } = W(t), {
|
|
8
8
|
ownerState: n,
|
|
9
9
|
layout: d,
|
|
10
10
|
calculatedValue: o,
|
|
11
11
|
calculatedSecondValue: h,
|
|
12
12
|
calculatedChange: s,
|
|
13
|
-
TrendIcon:
|
|
13
|
+
TrendIcon: z,
|
|
14
14
|
Icon: r,
|
|
15
|
-
showCornerIcon:
|
|
15
|
+
showCornerIcon: V,
|
|
16
16
|
showSideIcon: C,
|
|
17
17
|
iconPosition: x,
|
|
18
|
-
snapshotPayload:
|
|
19
|
-
|
|
18
|
+
snapshotPayload: k,
|
|
19
|
+
hasChart: g,
|
|
20
|
+
chartType: m,
|
|
21
|
+
chartData: w,
|
|
22
|
+
chartColor: f,
|
|
23
|
+
chartFill: u
|
|
24
|
+
} = j, P = (t.showChange || t.showTrend) && s !== "—";
|
|
20
25
|
if (t.loading)
|
|
21
|
-
return /* @__PURE__ */ e(
|
|
26
|
+
return /* @__PURE__ */ e(S, { ownerState: n, sx: t.sx, children: /* @__PURE__ */ i(a, { spacing: 1, children: [
|
|
22
27
|
/* @__PURE__ */ e(l, { variant: "text", width: "60%" }),
|
|
23
28
|
/* @__PURE__ */ e(l, { variant: "rectangular", height: 40, width: "40%" }),
|
|
24
29
|
/* @__PURE__ */ e(l, { variant: "text", width: "80%" }),
|
|
25
|
-
|
|
30
|
+
n.showChart && /* @__PURE__ */ e(
|
|
26
31
|
l,
|
|
27
32
|
{
|
|
28
33
|
variant: "rectangular",
|
|
@@ -32,7 +37,7 @@ const H = (t) => {
|
|
|
32
37
|
}
|
|
33
38
|
)
|
|
34
39
|
] }) });
|
|
35
|
-
const
|
|
40
|
+
const M = /* @__PURE__ */ i(
|
|
36
41
|
a,
|
|
37
42
|
{
|
|
38
43
|
direction: "row",
|
|
@@ -49,43 +54,43 @@ const H = (t) => {
|
|
|
49
54
|
spacing: 0.5,
|
|
50
55
|
sx: { minWidth: 0 },
|
|
51
56
|
children: [
|
|
52
|
-
/* @__PURE__ */ e(c, { title: o, children: /* @__PURE__ */ e(
|
|
53
|
-
h && /* @__PURE__ */ e(c, { title: h, children: /* @__PURE__ */ e(
|
|
57
|
+
/* @__PURE__ */ e(c, { title: o, children: /* @__PURE__ */ e(D, { variant: "h4", ownerState: n, children: o }) }),
|
|
58
|
+
h && /* @__PURE__ */ e(c, { title: h, children: /* @__PURE__ */ e(F, { variant: "h5", ownerState: n, children: h }) })
|
|
54
59
|
]
|
|
55
60
|
}
|
|
56
61
|
),
|
|
57
|
-
|
|
58
|
-
d === "overlay" && t.showTrend && /* @__PURE__ */ e(
|
|
62
|
+
P && /* @__PURE__ */ i(L, { ownerState: n, children: [
|
|
63
|
+
d === "overlay" && t.showTrend && /* @__PURE__ */ e(z, { size: 16 }),
|
|
59
64
|
t.showChange && s
|
|
60
65
|
] })
|
|
61
66
|
]
|
|
62
67
|
}
|
|
63
68
|
);
|
|
64
69
|
return /* @__PURE__ */ e(
|
|
65
|
-
|
|
70
|
+
S,
|
|
66
71
|
{
|
|
67
72
|
ownerState: n,
|
|
68
73
|
sx: t.sx,
|
|
69
|
-
"data-snapshot":
|
|
70
|
-
children: d === "panel" ? /* @__PURE__ */ i(
|
|
71
|
-
/* @__PURE__ */ e(c, { title: t.label, children: /* @__PURE__ */ e(
|
|
72
|
-
/* @__PURE__ */ i(
|
|
74
|
+
"data-snapshot": k,
|
|
75
|
+
children: d === "panel" ? /* @__PURE__ */ i(v, { children: [
|
|
76
|
+
/* @__PURE__ */ e(c, { title: t.label, children: /* @__PURE__ */ e(b, { variant: "body2", children: t.label }) }),
|
|
77
|
+
/* @__PURE__ */ i(A, { children: [
|
|
73
78
|
/* @__PURE__ */ i(a, { justifyContent: "center", spacing: 0.5, sx: { flexShrink: 0 }, children: [
|
|
74
|
-
|
|
75
|
-
t.description && /* @__PURE__ */ e(c, { title: t.description, children: /* @__PURE__ */ e(
|
|
79
|
+
M,
|
|
80
|
+
t.description && /* @__PURE__ */ e(c, { title: t.description, children: /* @__PURE__ */ e(I, { variant: "caption", children: t.description }) })
|
|
76
81
|
] }),
|
|
77
|
-
g && /* @__PURE__ */ e(
|
|
78
|
-
|
|
82
|
+
g && /* @__PURE__ */ e(R, { children: /* @__PURE__ */ e(
|
|
83
|
+
y,
|
|
79
84
|
{
|
|
80
|
-
type:
|
|
81
|
-
data:
|
|
82
|
-
|
|
83
|
-
|
|
85
|
+
type: m,
|
|
86
|
+
data: w,
|
|
87
|
+
fill: u ?? "gradient",
|
|
88
|
+
color: f
|
|
84
89
|
}
|
|
85
90
|
) })
|
|
86
91
|
] })
|
|
87
|
-
] }) : /* @__PURE__ */ i(
|
|
88
|
-
|
|
92
|
+
] }) : /* @__PURE__ */ i(v, { children: [
|
|
93
|
+
V && r && /* @__PURE__ */ e(q, { ownerState: n, children: /* @__PURE__ */ e(r, { size: 24 }) }),
|
|
89
94
|
/* @__PURE__ */ i(
|
|
90
95
|
a,
|
|
91
96
|
{
|
|
@@ -94,12 +99,12 @@ const H = (t) => {
|
|
|
94
99
|
alignItems: "flex-start",
|
|
95
100
|
sx: { flex: 1 },
|
|
96
101
|
children: [
|
|
97
|
-
C && r && x === "left" && /* @__PURE__ */ e(
|
|
98
|
-
/* @__PURE__ */ i(
|
|
99
|
-
/* @__PURE__ */ e(c, { title: t.label, children: /* @__PURE__ */ e(
|
|
100
|
-
|
|
102
|
+
C && r && x === "left" && /* @__PURE__ */ e(T, { ownerState: n, children: /* @__PURE__ */ e(r, { sx: { fontSize: 24 } }) }),
|
|
103
|
+
/* @__PURE__ */ i(B, { children: [
|
|
104
|
+
/* @__PURE__ */ e(c, { title: t.label, children: /* @__PURE__ */ e(b, { variant: "body2", children: t.label }) }),
|
|
105
|
+
M
|
|
101
106
|
] }),
|
|
102
|
-
C && r && x === "right" && /* @__PURE__ */ e(
|
|
107
|
+
C && r && x === "right" && /* @__PURE__ */ e(T, { ownerState: n, children: /* @__PURE__ */ e(r, { sx: { fontSize: 24 } }) })
|
|
103
108
|
]
|
|
104
109
|
}
|
|
105
110
|
),
|
|
@@ -111,14 +116,22 @@ const H = (t) => {
|
|
|
111
116
|
sx: { width: "100%", mt: 2 },
|
|
112
117
|
children: [
|
|
113
118
|
t.description && /* @__PURE__ */ e(c, { title: t.description, children: /* @__PURE__ */ e(
|
|
114
|
-
|
|
119
|
+
I,
|
|
115
120
|
{
|
|
116
121
|
variant: "caption",
|
|
117
122
|
sx: { textAlign: { xs: "center", sm: "left" } },
|
|
118
123
|
children: t.description
|
|
119
124
|
}
|
|
120
125
|
) }),
|
|
121
|
-
g && /* @__PURE__ */ e(
|
|
126
|
+
g && /* @__PURE__ */ e(E, { children: /* @__PURE__ */ e(
|
|
127
|
+
y,
|
|
128
|
+
{
|
|
129
|
+
type: m,
|
|
130
|
+
data: w,
|
|
131
|
+
fill: u ?? "solid",
|
|
132
|
+
color: f
|
|
133
|
+
}
|
|
134
|
+
) })
|
|
122
135
|
]
|
|
123
136
|
}
|
|
124
137
|
)
|
|
@@ -127,5 +140,5 @@ const H = (t) => {
|
|
|
127
140
|
);
|
|
128
141
|
};
|
|
129
142
|
export {
|
|
130
|
-
|
|
143
|
+
O as MetricCard
|
|
131
144
|
};
|
|
@@ -1,96 +1,105 @@
|
|
|
1
|
-
import { useThemeProps as
|
|
2
|
-
import { formatValue as
|
|
3
|
-
import { I as
|
|
4
|
-
const
|
|
5
|
-
const i =
|
|
6
|
-
value:
|
|
7
|
-
secondValue:
|
|
8
|
-
secondValueFormat:
|
|
9
|
-
variant:
|
|
10
|
-
layout:
|
|
11
|
-
valuePrefix:
|
|
12
|
-
valueSuffix:
|
|
13
|
-
format:
|
|
14
|
-
showChange:
|
|
1
|
+
import { useThemeProps as _ } from "@mui/material";
|
|
2
|
+
import { formatValue as M, resolveConditionalStyle as $ } from "../charts/_common/format.js";
|
|
3
|
+
import { I as ee, a as oe, b as te } from "../../IconTrendingUp-CW4SFYmc.js";
|
|
4
|
+
const le = (k) => {
|
|
5
|
+
const i = _({ props: k, name: "HCMetricCard" }), {
|
|
6
|
+
value: o = [],
|
|
7
|
+
secondValue: C = [],
|
|
8
|
+
secondValueFormat: O,
|
|
9
|
+
variant: Z = "default",
|
|
10
|
+
layout: v = "overlay",
|
|
11
|
+
valuePrefix: A,
|
|
12
|
+
valueSuffix: H,
|
|
13
|
+
format: t,
|
|
14
|
+
showChange: J = !1,
|
|
15
15
|
changeType: l = "percentage",
|
|
16
|
-
showTrend:
|
|
16
|
+
showTrend: L = !1,
|
|
17
17
|
showIcon: b = !1,
|
|
18
18
|
icon: u,
|
|
19
|
-
iconPosition: d = "right"
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
19
|
+
iconPosition: d = "right",
|
|
20
|
+
showChart: R = !1,
|
|
21
|
+
chartType: w,
|
|
22
|
+
chartColor: U,
|
|
23
|
+
chartFill: j
|
|
24
|
+
} = i, q = o.length > 0, h = o[o.length - 1], y = o[o.length - 2], e = h ? Number(h.v) : NaN, a = y ? Number(y.v) : NaN, S = !isNaN(e) && !isNaN(a), f = {
|
|
25
|
+
...t,
|
|
26
|
+
prefix: (t == null ? void 0 : t.prefix) ?? A,
|
|
27
|
+
suffix: (t == null ? void 0 : t.suffix) ?? H
|
|
24
28
|
};
|
|
25
|
-
let r = "—",
|
|
29
|
+
let r = "—", I = "", V, x;
|
|
26
30
|
if (!isNaN(e)) {
|
|
27
|
-
r =
|
|
28
|
-
const
|
|
29
|
-
|
|
31
|
+
r = M(e, f), I = h.t;
|
|
32
|
+
const c = $(e, f);
|
|
33
|
+
V = c.color, x = c.backgroundColor;
|
|
30
34
|
}
|
|
31
|
-
const
|
|
32
|
-
let
|
|
33
|
-
const
|
|
34
|
-
if (!isNaN(
|
|
35
|
-
|
|
36
|
-
const
|
|
37
|
-
|
|
35
|
+
const T = O ?? f;
|
|
36
|
+
let g, B, F;
|
|
37
|
+
const D = C[C.length - 1], p = D ? Number(D.v) : NaN;
|
|
38
|
+
if (!isNaN(p)) {
|
|
39
|
+
g = M(p, T);
|
|
40
|
+
const c = $(p, T);
|
|
41
|
+
B = c.color, F = c.backgroundColor;
|
|
38
42
|
}
|
|
39
43
|
let s;
|
|
40
|
-
if (
|
|
41
|
-
if (
|
|
42
|
-
const m = l === "absolute" ? e -
|
|
43
|
-
s = `${
|
|
44
|
+
if (J)
|
|
45
|
+
if (S && !(a === 0 && l === "percentage")) {
|
|
46
|
+
const m = l === "absolute" ? e - a : (e - a) / a * 100, W = m > 0 ? "+" : m < 0 ? "−" : "", X = l === "percentage" ? 1 : 2, Y = l === "percentage" ? "%" : "";
|
|
47
|
+
s = `${W}${Math.abs(m).toFixed(X)}${Y}`;
|
|
44
48
|
} else
|
|
45
49
|
s = "—";
|
|
46
50
|
let n;
|
|
47
|
-
|
|
48
|
-
let N =
|
|
49
|
-
n === "up" ? N =
|
|
51
|
+
L && S && (e > a ? n = "up" : e < a ? n = "down" : n = "neutral");
|
|
52
|
+
let N = ee;
|
|
53
|
+
n === "up" ? N = oe : n === "down" && (N = te);
|
|
50
54
|
const P = [
|
|
51
55
|
"top-left",
|
|
52
56
|
"top-right",
|
|
53
57
|
"bottom-left",
|
|
54
58
|
"bottom-right"
|
|
55
|
-
].includes(d),
|
|
59
|
+
].includes(d), z = b && !!u && P, E = b && !!u && !P, G = JSON.stringify({
|
|
56
60
|
metric: i.label,
|
|
57
61
|
value: r,
|
|
58
62
|
change: s,
|
|
59
|
-
asOf:
|
|
60
|
-
}),
|
|
63
|
+
asOf: I
|
|
64
|
+
}), K = {
|
|
61
65
|
...i,
|
|
62
|
-
variant:
|
|
63
|
-
layout:
|
|
66
|
+
variant: Z,
|
|
67
|
+
layout: v,
|
|
64
68
|
changeType: l,
|
|
65
69
|
iconPosition: d,
|
|
66
70
|
calculatedValue: r,
|
|
67
|
-
calculatedSecondValue:
|
|
68
|
-
calculatedSecondValueColor:
|
|
69
|
-
calculatedSecondValueBg:
|
|
71
|
+
calculatedSecondValue: g,
|
|
72
|
+
calculatedSecondValueColor: B,
|
|
73
|
+
calculatedSecondValueBg: F,
|
|
70
74
|
calculatedChange: s,
|
|
71
75
|
calculatedTrend: n,
|
|
72
|
-
calculatedValueColor:
|
|
73
|
-
calculatedValueBg:
|
|
74
|
-
hasData:
|
|
75
|
-
};
|
|
76
|
+
calculatedValueColor: V,
|
|
77
|
+
calculatedValueBg: x,
|
|
78
|
+
hasData: q
|
|
79
|
+
}, Q = !!R && !!w && o.length >= 2;
|
|
76
80
|
return {
|
|
77
81
|
refs: {},
|
|
78
82
|
state: {
|
|
79
|
-
ownerState:
|
|
80
|
-
layout:
|
|
83
|
+
ownerState: K,
|
|
84
|
+
layout: v,
|
|
85
|
+
hasChart: Q,
|
|
86
|
+
chartType: w,
|
|
87
|
+
chartData: o,
|
|
88
|
+
chartColor: U,
|
|
89
|
+
chartFill: j,
|
|
81
90
|
calculatedValue: r,
|
|
82
|
-
calculatedSecondValue:
|
|
91
|
+
calculatedSecondValue: g,
|
|
83
92
|
calculatedChange: s,
|
|
84
93
|
TrendIcon: N,
|
|
85
94
|
Icon: u,
|
|
86
|
-
showCornerIcon:
|
|
87
|
-
showSideIcon:
|
|
95
|
+
showCornerIcon: z,
|
|
96
|
+
showSideIcon: E,
|
|
88
97
|
iconPosition: d,
|
|
89
|
-
snapshotPayload:
|
|
98
|
+
snapshotPayload: G
|
|
90
99
|
},
|
|
91
100
|
actions: {}
|
|
92
101
|
};
|
|
93
102
|
};
|
|
94
103
|
export {
|
|
95
|
-
|
|
104
|
+
le as useMetricCardLogic
|
|
96
105
|
};
|
|
@@ -3,7 +3,7 @@ import { Widget as f } from "../widget/styled.js";
|
|
|
3
3
|
import { variantColor as s, resolvePaletteColor as d, trendColor as u } from "./helpers.js";
|
|
4
4
|
const e = {
|
|
5
5
|
shouldForwardProp: (o) => o !== "ownerState"
|
|
6
|
-
},
|
|
6
|
+
}, w = t(f.Root, {
|
|
7
7
|
name: "HCMetricCard",
|
|
8
8
|
slot: "Root",
|
|
9
9
|
...e
|
|
@@ -19,7 +19,7 @@ const e = {
|
|
|
19
19
|
padding: o.spacing(1.5)
|
|
20
20
|
}
|
|
21
21
|
};
|
|
22
|
-
}),
|
|
22
|
+
}), M = t(C, {
|
|
23
23
|
name: "HCMetricCard",
|
|
24
24
|
slot: "Content"
|
|
25
25
|
})(() => ({
|
|
@@ -86,7 +86,7 @@ const e = {
|
|
|
86
86
|
[o.breakpoints.down("md")]: { fontSize: "0.95rem" },
|
|
87
87
|
[o.breakpoints.up("md")]: { fontSize: "1.25rem" }
|
|
88
88
|
};
|
|
89
|
-
}),
|
|
89
|
+
}), h = t("div", {
|
|
90
90
|
name: "HCMetricCard",
|
|
91
91
|
slot: "TrendContainer",
|
|
92
92
|
...e
|
|
@@ -112,7 +112,7 @@ const e = {
|
|
|
112
112
|
}
|
|
113
113
|
}
|
|
114
114
|
};
|
|
115
|
-
}),
|
|
115
|
+
}), S = t(l, {
|
|
116
116
|
name: "HCMetricCard",
|
|
117
117
|
slot: "Description"
|
|
118
118
|
})(({ theme: o }) => ({
|
|
@@ -194,19 +194,23 @@ const e = {
|
|
|
194
194
|
minWidth: 0,
|
|
195
195
|
alignSelf: "stretch",
|
|
196
196
|
display: "flex",
|
|
197
|
-
alignItems: "flex-end"
|
|
197
|
+
alignItems: "flex-end",
|
|
198
|
+
// `MetricChart` is drawn wider and taller than its box so amCharts' axis gutters (and
|
|
199
|
+
// its watermark) fall outside — this is what clips them, and what keeps the overhang
|
|
200
|
+
// from reaching the value column beside it.
|
|
201
|
+
overflow: "hidden"
|
|
198
202
|
}));
|
|
199
203
|
export {
|
|
200
204
|
I as MetricCardChartContainer,
|
|
201
|
-
|
|
205
|
+
M as MetricCardContent,
|
|
202
206
|
H as MetricCardCornerIconContainer,
|
|
203
|
-
|
|
207
|
+
S as MetricCardDescription,
|
|
204
208
|
k as MetricCardIconContainer,
|
|
205
209
|
m as MetricCardLabel,
|
|
206
210
|
R as MetricCardPanel,
|
|
207
|
-
|
|
211
|
+
w as MetricCardRoot,
|
|
208
212
|
W as MetricCardSecondValue,
|
|
209
213
|
z as MetricCardSideChart,
|
|
210
|
-
|
|
214
|
+
h as MetricCardTrendContainer,
|
|
211
215
|
y as MetricCardValue
|
|
212
216
|
};
|
|
@@ -1,73 +1,156 @@
|
|
|
1
|
-
import { jsxs as
|
|
2
|
-
import { Typography as
|
|
3
|
-
import
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
|
|
1
|
+
import { jsxs as n, Fragment as g, jsx as e } from "react/jsx-runtime";
|
|
2
|
+
import { Typography as I, Divider as k, Checkbox as R, CircularProgress as H, TablePagination as T, Box as W, ListItem as B, ListItemIcon as J, ListItemText as q } from "@mui/material";
|
|
3
|
+
import K from "lodash";
|
|
4
|
+
import { joinMeta as Q } from "./helpers.js";
|
|
5
|
+
import { usePaginatedListLogic as X } from "./logic.js";
|
|
6
|
+
import { PaginatedListRoot as Y, PaginatedListHeader as Z, PaginatedListViewAll as $, PaginatedListContent as ee, PaginatedListCardRail as ie, PaginatedListCard as ne, PaginatedListCardHeader as ae, PaginatedListCardIcon as te, PaginatedListCardTitle as re, PaginatedListCardDescription as oe, PaginatedListCardFooter as de, PaginatedListCardMeta as se, PaginatedListCardAction as ce, PaginatedListLoadMore as le, PaginatedListPagination as M, PaginatedListList as he } from "./styled.js";
|
|
7
|
+
import { c as ge } from "../../createReactComponent-C7L-DMHj.js";
|
|
8
|
+
/**
|
|
9
|
+
* @license @tabler/icons-react v3.44.0 - MIT
|
|
10
|
+
*
|
|
11
|
+
* This source code is licensed under the MIT license.
|
|
12
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
13
|
+
*/
|
|
14
|
+
const pe = [["path", { d: "M17 7l-10 10", key: "svg-0" }], ["path", { d: "M8 7l9 0l0 9", key: "svg-1" }]], O = ge("outline", "arrow-up-right", "ArrowUpRight", pe), A = [5, 10, 25, 50], xe = (_) => {
|
|
7
15
|
const {
|
|
8
|
-
title:
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
16
|
+
title: c,
|
|
17
|
+
variant: b,
|
|
18
|
+
itemIcon: S,
|
|
19
|
+
metaSeparator: z,
|
|
20
|
+
cardsLayout: D,
|
|
21
|
+
isInfinite: p,
|
|
22
|
+
hasMore: E,
|
|
23
|
+
isLoadingMore: j,
|
|
24
|
+
refs: F,
|
|
25
|
+
onViewAll: P,
|
|
26
|
+
displayData: l,
|
|
27
|
+
count: C,
|
|
28
|
+
page: L,
|
|
12
29
|
rowsPerPage: m,
|
|
13
|
-
expanded:
|
|
14
|
-
selectionMode:
|
|
15
|
-
selected:
|
|
16
|
-
handleChangePage:
|
|
17
|
-
handleChangeRowsPerPage:
|
|
18
|
-
handleItemClick:
|
|
19
|
-
handleExpandToggle:
|
|
20
|
-
onItemClick:
|
|
21
|
-
ownerState:
|
|
22
|
-
sx:
|
|
23
|
-
other:
|
|
24
|
-
} = _
|
|
25
|
-
return /* @__PURE__ */
|
|
26
|
-
|
|
30
|
+
expanded: u,
|
|
31
|
+
selectionMode: t,
|
|
32
|
+
selected: v,
|
|
33
|
+
handleChangePage: f,
|
|
34
|
+
handleChangeRowsPerPage: x,
|
|
35
|
+
handleItemClick: y,
|
|
36
|
+
handleExpandToggle: N,
|
|
37
|
+
onItemClick: U,
|
|
38
|
+
ownerState: a,
|
|
39
|
+
sx: V,
|
|
40
|
+
other: G
|
|
41
|
+
} = X(_), h = S, r = b === "cards", o = r && D === "grid", d = t || !!U;
|
|
42
|
+
return /* @__PURE__ */ n(
|
|
43
|
+
Y,
|
|
27
44
|
{
|
|
28
|
-
ownerState:
|
|
29
|
-
sx:
|
|
45
|
+
ownerState: a,
|
|
46
|
+
sx: V,
|
|
30
47
|
elevation: 0,
|
|
31
48
|
"data-snapshot": JSON.stringify({
|
|
32
|
-
title:
|
|
33
|
-
data:
|
|
49
|
+
title: c,
|
|
50
|
+
data: l
|
|
34
51
|
}),
|
|
35
|
-
...
|
|
52
|
+
...G,
|
|
36
53
|
children: [
|
|
37
|
-
|
|
38
|
-
/* @__PURE__ */ n(
|
|
39
|
-
|
|
54
|
+
c && /* @__PURE__ */ n(g, { children: [
|
|
55
|
+
/* @__PURE__ */ n(Z, { ownerState: a, children: [
|
|
56
|
+
/* @__PURE__ */ e(I, { variant: "h3", children: c }),
|
|
57
|
+
r && !o && P && /* @__PURE__ */ e(
|
|
58
|
+
$,
|
|
59
|
+
{
|
|
60
|
+
size: "small",
|
|
61
|
+
endIcon: /* @__PURE__ */ e(O, { size: 16 }),
|
|
62
|
+
onClick: P,
|
|
63
|
+
children: "View all"
|
|
64
|
+
}
|
|
65
|
+
)
|
|
66
|
+
] }),
|
|
67
|
+
!r && /* @__PURE__ */ e(k, {})
|
|
40
68
|
] }),
|
|
41
|
-
/* @__PURE__ */
|
|
42
|
-
/* @__PURE__ */ n(
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
69
|
+
/* @__PURE__ */ e(ee, { ownerState: a, children: r ? /* @__PURE__ */ n(g, { children: [
|
|
70
|
+
/* @__PURE__ */ n(ie, { grid: o, children: [
|
|
71
|
+
l.map((i, s) => {
|
|
72
|
+
const w = Q(i.meta, z);
|
|
73
|
+
return /* @__PURE__ */ n(
|
|
74
|
+
ne,
|
|
75
|
+
{
|
|
76
|
+
onClick: y(i),
|
|
77
|
+
sx: {
|
|
78
|
+
cursor: d ? "pointer" : "default",
|
|
79
|
+
...o && { flex: "1 1 280px", maxWidth: 360 }
|
|
80
|
+
},
|
|
81
|
+
children: [
|
|
82
|
+
/* @__PURE__ */ n(ae, { children: [
|
|
83
|
+
t ? /* @__PURE__ */ e(
|
|
84
|
+
R,
|
|
85
|
+
{
|
|
86
|
+
size: "small",
|
|
87
|
+
sx: { p: 0 },
|
|
88
|
+
checked: v.indexOf(i.id) !== -1
|
|
89
|
+
}
|
|
90
|
+
) : (i.icon || h) && /* @__PURE__ */ e(te, { children: i.icon ?? (h ? /* @__PURE__ */ e(h, {}) : null) }),
|
|
91
|
+
/* @__PURE__ */ e(re, { variant: "h4", title: i.title, children: i.title })
|
|
92
|
+
] }),
|
|
93
|
+
/* @__PURE__ */ e(
|
|
94
|
+
oe,
|
|
95
|
+
{
|
|
96
|
+
variant: "body2",
|
|
97
|
+
title: i.description,
|
|
98
|
+
children: i.description
|
|
99
|
+
}
|
|
100
|
+
),
|
|
101
|
+
/* @__PURE__ */ n(de, { children: [
|
|
102
|
+
/* @__PURE__ */ e(se, { variant: "caption", title: w, children: w }),
|
|
103
|
+
d && /* @__PURE__ */ e(ce, { children: /* @__PURE__ */ e(O, { size: 18 }) })
|
|
104
|
+
] })
|
|
105
|
+
]
|
|
106
|
+
},
|
|
107
|
+
i.id || s
|
|
108
|
+
);
|
|
109
|
+
}),
|
|
110
|
+
p && E && /* @__PURE__ */ e(le, { ref: F.sentinelRef, children: j && /* @__PURE__ */ e(H, { size: 18 }) })
|
|
111
|
+
] }),
|
|
112
|
+
o && !p && /* @__PURE__ */ e(M, { ownerState: a, children: /* @__PURE__ */ e(
|
|
113
|
+
T,
|
|
114
|
+
{
|
|
115
|
+
component: "div",
|
|
116
|
+
count: C,
|
|
117
|
+
page: L,
|
|
118
|
+
rowsPerPage: m,
|
|
119
|
+
rowsPerPageOptions: A,
|
|
120
|
+
onPageChange: f,
|
|
121
|
+
onRowsPerPageChange: x
|
|
122
|
+
}
|
|
123
|
+
) })
|
|
124
|
+
] }) : /* @__PURE__ */ n(g, { children: [
|
|
125
|
+
/* @__PURE__ */ e(he, { disablePadding: !0, ownerState: a, children: l.map((i, s) => /* @__PURE__ */ n(W, { children: [
|
|
126
|
+
s !== 0 && /* @__PURE__ */ e(k, { component: "li" }),
|
|
127
|
+
/* @__PURE__ */ n(
|
|
128
|
+
B,
|
|
46
129
|
{
|
|
47
|
-
onClick:
|
|
130
|
+
onClick: y(i),
|
|
48
131
|
sx: {
|
|
49
|
-
cursor:
|
|
50
|
-
"&:hover":
|
|
51
|
-
pl:
|
|
132
|
+
cursor: d ? "pointer" : "default",
|
|
133
|
+
"&:hover": d ? { backgroundColor: "action.hover" } : void 0,
|
|
134
|
+
pl: t ? 0 : 2
|
|
52
135
|
},
|
|
53
136
|
children: [
|
|
54
|
-
|
|
55
|
-
!
|
|
56
|
-
/* @__PURE__ */
|
|
57
|
-
|
|
137
|
+
t && /* @__PURE__ */ e(R, { checked: v.indexOf(i.id) !== -1 }),
|
|
138
|
+
!t && i.icon && /* @__PURE__ */ e(J, { children: i.icon }),
|
|
139
|
+
/* @__PURE__ */ e(
|
|
140
|
+
q,
|
|
58
141
|
{
|
|
59
|
-
primary:
|
|
142
|
+
primary: i.title,
|
|
60
143
|
primaryTypographyProps: { variant: "h4" },
|
|
61
144
|
secondaryTypographyProps: { component: "div" },
|
|
62
|
-
secondary: /* @__PURE__ */
|
|
63
|
-
|
|
145
|
+
secondary: /* @__PURE__ */ e(
|
|
146
|
+
I,
|
|
64
147
|
{
|
|
65
148
|
variant: "body2",
|
|
66
149
|
mt: 1,
|
|
67
150
|
sx: { cursor: "pointer" },
|
|
68
|
-
title:
|
|
69
|
-
onClick:
|
|
70
|
-
children:
|
|
151
|
+
title: u.includes(i.id) ? "Show less" : "Read more",
|
|
152
|
+
onClick: N(i),
|
|
153
|
+
children: u.includes(i.id) ? i.description : K.truncate(i.description, { length: 100 })
|
|
71
154
|
}
|
|
72
155
|
)
|
|
73
156
|
}
|
|
@@ -75,24 +158,24 @@ const N = [5, 10, 25, 50], U = (g) => {
|
|
|
75
158
|
]
|
|
76
159
|
}
|
|
77
160
|
)
|
|
78
|
-
] },
|
|
79
|
-
/* @__PURE__ */
|
|
80
|
-
|
|
161
|
+
] }, i.id || s)) }),
|
|
162
|
+
/* @__PURE__ */ e(M, { ownerState: a, children: /* @__PURE__ */ e(
|
|
163
|
+
T,
|
|
81
164
|
{
|
|
82
165
|
component: "div",
|
|
83
|
-
count:
|
|
84
|
-
page:
|
|
166
|
+
count: C,
|
|
167
|
+
page: L,
|
|
85
168
|
rowsPerPage: m,
|
|
86
|
-
rowsPerPageOptions:
|
|
87
|
-
onPageChange:
|
|
88
|
-
onRowsPerPageChange:
|
|
169
|
+
rowsPerPageOptions: A,
|
|
170
|
+
onPageChange: f,
|
|
171
|
+
onRowsPerPageChange: x
|
|
89
172
|
}
|
|
90
173
|
) })
|
|
91
|
-
] })
|
|
174
|
+
] }) })
|
|
92
175
|
]
|
|
93
176
|
}
|
|
94
177
|
);
|
|
95
178
|
};
|
|
96
179
|
export {
|
|
97
|
-
|
|
180
|
+
xe as PaginatedList
|
|
98
181
|
};
|