@conboai/storybook.components 0.5.55 → 0.5.56
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.
|
@@ -98783,49 +98783,50 @@ const lye = r1e, cye = (e, t) => ({
|
|
|
98783
98783
|
onRowIdSelect: m,
|
|
98784
98784
|
csvFileName: v = "table_data.csv",
|
|
98785
98785
|
csvHeaders: y,
|
|
98786
|
-
csvDataFormatter: C = (
|
|
98786
|
+
csvDataFormatter: C = (O) => O.toString(),
|
|
98787
98787
|
useClientSorting: S = !1,
|
|
98788
98788
|
isShapeSelection: w = !1,
|
|
98789
|
-
infoText: E = "No rows"
|
|
98789
|
+
infoText: E = "No rows",
|
|
98790
|
+
totalText: M = ""
|
|
98790
98791
|
}) => {
|
|
98791
|
-
const [
|
|
98792
|
+
const [O, F] = Be({
|
|
98792
98793
|
page: 0,
|
|
98793
98794
|
pageSize: i[0]
|
|
98794
|
-
}), [
|
|
98795
|
-
for (const
|
|
98796
|
-
const { field:
|
|
98797
|
-
if (
|
|
98798
|
-
if (
|
|
98795
|
+
}), [D, A] = Be([]), P = lye(), L = Ao(() => S && D.length > 0 ? [...t].sort((B, N) => {
|
|
98796
|
+
for (const U of D) {
|
|
98797
|
+
const { field: Y, sort: X } = U;
|
|
98798
|
+
if (B[Y] < N[Y]) return X === "asc" ? -1 : 1;
|
|
98799
|
+
if (B[Y] > N[Y]) return X === "asc" ? 1 : -1;
|
|
98799
98800
|
}
|
|
98800
98801
|
return 0;
|
|
98801
|
-
}) : t, [t,
|
|
98802
|
-
(
|
|
98803
|
-
|
|
98802
|
+
}) : t, [t, D, S]), x = In(
|
|
98803
|
+
(B) => {
|
|
98804
|
+
A(B), u && u(B);
|
|
98804
98805
|
},
|
|
98805
98806
|
[u]
|
|
98806
|
-
),
|
|
98807
|
-
(
|
|
98808
|
-
if (
|
|
98809
|
-
const
|
|
98810
|
-
previousPage:
|
|
98807
|
+
), k = In(
|
|
98808
|
+
(B) => {
|
|
98809
|
+
if (F(B), d) {
|
|
98810
|
+
const N = {
|
|
98811
|
+
previousPage: O.page
|
|
98811
98812
|
};
|
|
98812
|
-
d(
|
|
98813
|
+
d(B, N);
|
|
98813
98814
|
}
|
|
98814
98815
|
},
|
|
98815
|
-
[d,
|
|
98816
|
-
),
|
|
98817
|
-
(
|
|
98818
|
-
m == null || m(null), h == null || h(
|
|
98816
|
+
[d, O.page]
|
|
98817
|
+
), R = In(
|
|
98818
|
+
(B) => {
|
|
98819
|
+
m == null || m(null), h == null || h(B);
|
|
98819
98820
|
},
|
|
98820
98821
|
[h, m]
|
|
98821
|
-
),
|
|
98822
|
-
const
|
|
98823
|
-
` +
|
|
98824
|
-
(
|
|
98822
|
+
), I = () => {
|
|
98823
|
+
const N = "data:text/csv;charset=utf-8," + (y || e.map((X) => X.headerName)).join(",") + `
|
|
98824
|
+
` + L.map(
|
|
98825
|
+
(X) => e.map((Z) => C(X[Z.field], Z)).join(",")
|
|
98825
98826
|
).join(`
|
|
98826
|
-
`),
|
|
98827
|
-
|
|
98828
|
-
},
|
|
98827
|
+
`), U = encodeURI(N), Y = document.createElement("a");
|
|
98828
|
+
Y.setAttribute("href", U), Y.setAttribute("download", v), document.body.appendChild(Y), Y.click(), document.body.removeChild(Y);
|
|
98829
|
+
}, H = () => !p && /* @__PURE__ */ V.jsxs(
|
|
98829
98830
|
j5,
|
|
98830
98831
|
{
|
|
98831
98832
|
sx: {
|
|
@@ -98839,7 +98840,7 @@ const lye = r1e, cye = (e, t) => ({
|
|
|
98839
98840
|
Ir,
|
|
98840
98841
|
{
|
|
98841
98842
|
variant: "text",
|
|
98842
|
-
onClick:
|
|
98843
|
+
onClick: I,
|
|
98843
98844
|
disabled: !t.length,
|
|
98844
98845
|
children: /* @__PURE__ */ V.jsxs(
|
|
98845
98846
|
nn,
|
|
@@ -98878,15 +98879,15 @@ const lye = r1e, cye = (e, t) => ({
|
|
|
98878
98879
|
{
|
|
98879
98880
|
rowsPerPageOptions: i,
|
|
98880
98881
|
count: c,
|
|
98881
|
-
page:
|
|
98882
|
-
onPageChange: (
|
|
98883
|
-
rowsPerPage:
|
|
98884
|
-
onRowsPerPageChange: (
|
|
98885
|
-
...
|
|
98886
|
-
pageSize: parseInt(
|
|
98882
|
+
page: O.page,
|
|
98883
|
+
onPageChange: (B, N) => F((U) => ({ ...U, page: N })),
|
|
98884
|
+
rowsPerPage: O.pageSize,
|
|
98885
|
+
onRowsPerPageChange: (B) => F((N) => ({
|
|
98886
|
+
...N,
|
|
98887
|
+
pageSize: parseInt(B.target.value, 10)
|
|
98887
98888
|
}))
|
|
98888
98889
|
}
|
|
98889
|
-
) : /* @__PURE__ */ V.
|
|
98890
|
+
) : /* @__PURE__ */ V.jsx(
|
|
98890
98891
|
Ot,
|
|
98891
98892
|
{
|
|
98892
98893
|
sx: {
|
|
@@ -98894,46 +98895,42 @@ const lye = r1e, cye = (e, t) => ({
|
|
|
98894
98895
|
color: l === "light" ? "#000000" : "rgba(255, 255, 255, 0.5)",
|
|
98895
98896
|
fontSize: "14px"
|
|
98896
98897
|
},
|
|
98897
|
-
children:
|
|
98898
|
-
t.length,
|
|
98899
|
-
" rows from ",
|
|
98900
|
-
b || "Unknown"
|
|
98901
|
-
]
|
|
98898
|
+
children: M || `${t.length} rows from ${b || "Unknown"}`
|
|
98902
98899
|
}
|
|
98903
98900
|
)
|
|
98904
98901
|
]
|
|
98905
98902
|
}
|
|
98906
98903
|
);
|
|
98907
98904
|
return Ie(() => {
|
|
98908
|
-
if (w &&
|
|
98909
|
-
const
|
|
98910
|
-
|
|
98905
|
+
if (w && P.current) {
|
|
98906
|
+
const B = P.current.getRowIndexRelativeToVisibleRows(g);
|
|
98907
|
+
B != null && B >= 0 && P.current.scrollToIndexes({ rowIndex: B });
|
|
98911
98908
|
}
|
|
98912
|
-
}, [g,
|
|
98909
|
+
}, [g, P, w]), /* @__PURE__ */ V.jsx(ci, { sx: cye(s, l), children: /* @__PURE__ */ V.jsx(
|
|
98913
98910
|
aye,
|
|
98914
98911
|
{
|
|
98915
|
-
rows:
|
|
98912
|
+
rows: L,
|
|
98916
98913
|
rowSelection: !0,
|
|
98917
98914
|
rowHeight: 35,
|
|
98918
98915
|
columns: e,
|
|
98919
98916
|
paginationMode: r ? "server" : void 0,
|
|
98920
98917
|
sortingMode: S ? "client" : "server",
|
|
98921
|
-
paginationModel:
|
|
98918
|
+
paginationModel: O,
|
|
98922
98919
|
rowCount: c,
|
|
98923
98920
|
pagination: r,
|
|
98924
|
-
onPaginationModelChange: r ?
|
|
98925
|
-
sortModel:
|
|
98921
|
+
onPaginationModelChange: r ? k : void 0,
|
|
98922
|
+
sortModel: D,
|
|
98926
98923
|
disableRowSelectionOnClick: !0,
|
|
98927
|
-
onSortModelChange:
|
|
98928
|
-
onRowClick:
|
|
98924
|
+
onSortModelChange: x,
|
|
98925
|
+
onRowClick: R,
|
|
98929
98926
|
slots: {
|
|
98930
|
-
footer:
|
|
98927
|
+
footer: H
|
|
98931
98928
|
},
|
|
98932
98929
|
loading: n,
|
|
98933
98930
|
sx: uye(s, l),
|
|
98934
98931
|
onRowsScrollEnd: r ? void 0 : f,
|
|
98935
|
-
getRowClassName: (
|
|
98936
|
-
apiRef:
|
|
98932
|
+
getRowClassName: (B) => B.id === g ? "Mui-selected" : "",
|
|
98933
|
+
apiRef: P,
|
|
98937
98934
|
localeText: {
|
|
98938
98935
|
noRowsLabel: E
|
|
98939
98936
|
}
|