@conboai/storybook.components 0.3.63 → 0.3.64
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.
|
@@ -17,6 +17,8 @@ export interface CustomDataGridProps {
|
|
|
17
17
|
onRowsScrollEnd?: () => void;
|
|
18
18
|
total?: number;
|
|
19
19
|
hideFooter?: boolean;
|
|
20
|
+
selectedRowId?: string | number;
|
|
21
|
+
onRowIdSelect?: (value: number | null | string) => void;
|
|
20
22
|
}
|
|
21
23
|
declare const CustomDataGrid: FC<CustomDataGridProps>;
|
|
22
24
|
export default CustomDataGrid;
|
|
@@ -96973,34 +96973,35 @@ const Dve = (e, t) => ({
|
|
|
96973
96973
|
onRowsScrollEnd: h,
|
|
96974
96974
|
total: m,
|
|
96975
96975
|
hideFooter: g = !1,
|
|
96976
|
-
|
|
96976
|
+
selectedRowId: A,
|
|
96977
|
+
onRowIdSelect: p
|
|
96977
96978
|
}) => {
|
|
96978
|
-
const [
|
|
96979
|
+
const [w, C] = Ye({
|
|
96979
96980
|
page: 0,
|
|
96980
96981
|
pageSize: s[0]
|
|
96981
|
-
}), [
|
|
96982
|
-
(
|
|
96983
|
-
|
|
96982
|
+
}), [y, D] = Ye([]), v = Sr(
|
|
96983
|
+
(L) => {
|
|
96984
|
+
D(L), u && u(L);
|
|
96984
96985
|
},
|
|
96985
96986
|
[u]
|
|
96986
|
-
),
|
|
96987
|
-
(
|
|
96988
|
-
if (
|
|
96989
|
-
const
|
|
96990
|
-
previousPage:
|
|
96987
|
+
), B = Sr(
|
|
96988
|
+
(L) => {
|
|
96989
|
+
if (C(L), d) {
|
|
96990
|
+
const j = {
|
|
96991
|
+
previousPage: w.page
|
|
96991
96992
|
};
|
|
96992
|
-
d(
|
|
96993
|
+
d(L, j);
|
|
96993
96994
|
}
|
|
96994
96995
|
},
|
|
96995
|
-
[d,
|
|
96996
|
-
),
|
|
96997
|
-
const
|
|
96998
|
-
` + t.map((
|
|
96999
|
-
`),
|
|
97000
|
-
|
|
97001
|
-
},
|
|
97002
|
-
|
|
97003
|
-
},
|
|
96996
|
+
[d, w.page]
|
|
96997
|
+
), M = () => {
|
|
96998
|
+
const L = "data:text/csv;charset=utf-8," + e.map((E) => E.headerName).join(",") + `
|
|
96999
|
+
` + t.map((E) => e.map((x) => E[x.field]).join(",")).join(`
|
|
97000
|
+
`), j = encodeURI(L), I = document.createElement("a");
|
|
97001
|
+
I.setAttribute("href", j), I.setAttribute("download", "table_data.csv"), document.body.appendChild(I), I.click();
|
|
97002
|
+
}, H = (L) => {
|
|
97003
|
+
p && p(null), f && f(L, event);
|
|
97004
|
+
}, Q = () => !g && /* @__PURE__ */ N.jsxs(
|
|
97004
97005
|
ey,
|
|
97005
97006
|
{
|
|
97006
97007
|
sx: {
|
|
@@ -97014,7 +97015,7 @@ const Dve = (e, t) => ({
|
|
|
97014
97015
|
Dr,
|
|
97015
97016
|
{
|
|
97016
97017
|
variant: "text",
|
|
97017
|
-
onClick:
|
|
97018
|
+
onClick: M,
|
|
97018
97019
|
disabled: !t.length,
|
|
97019
97020
|
children: /* @__PURE__ */ N.jsxs(
|
|
97020
97021
|
_t,
|
|
@@ -97053,12 +97054,12 @@ const Dve = (e, t) => ({
|
|
|
97053
97054
|
{
|
|
97054
97055
|
rowsPerPageOptions: s,
|
|
97055
97056
|
count: c,
|
|
97056
|
-
page:
|
|
97057
|
-
onPageChange: (
|
|
97058
|
-
rowsPerPage:
|
|
97059
|
-
onRowsPerPageChange: (
|
|
97060
|
-
...
|
|
97061
|
-
pageSize: parseInt(
|
|
97057
|
+
page: w.page,
|
|
97058
|
+
onPageChange: (L, j) => C((I) => ({ ...I, page: j })),
|
|
97059
|
+
rowsPerPage: w.pageSize,
|
|
97060
|
+
onRowsPerPageChange: (L) => C((j) => ({
|
|
97061
|
+
...j,
|
|
97062
|
+
pageSize: parseInt(L.target.value, 10)
|
|
97062
97063
|
}))
|
|
97063
97064
|
}
|
|
97064
97065
|
) : /* @__PURE__ */ N.jsxs(
|
|
@@ -97082,27 +97083,27 @@ const Dve = (e, t) => ({
|
|
|
97082
97083
|
return /* @__PURE__ */ N.jsx(mo, { sx: Dve(a, l), children: /* @__PURE__ */ N.jsx(
|
|
97083
97084
|
Pve,
|
|
97084
97085
|
{
|
|
97085
|
-
...A,
|
|
97086
97086
|
rows: t,
|
|
97087
|
+
rowSelection: !0,
|
|
97087
97088
|
rowHeight: 35,
|
|
97088
97089
|
columns: e,
|
|
97089
97090
|
paginationMode: r ? "server" : void 0,
|
|
97090
97091
|
sortingMode: "server",
|
|
97091
|
-
paginationModel:
|
|
97092
|
+
paginationModel: w,
|
|
97092
97093
|
rowCount: c,
|
|
97093
97094
|
pagination: r,
|
|
97094
|
-
onPaginationModelChange: r ?
|
|
97095
|
-
sortModel:
|
|
97095
|
+
onPaginationModelChange: r ? B : void 0,
|
|
97096
|
+
sortModel: y,
|
|
97096
97097
|
disableRowSelectionOnClick: !0,
|
|
97097
|
-
onSortModelChange:
|
|
97098
|
-
onRowClick:
|
|
97098
|
+
onSortModelChange: v,
|
|
97099
|
+
onRowClick: H,
|
|
97099
97100
|
slots: {
|
|
97100
|
-
footer:
|
|
97101
|
+
footer: Q
|
|
97101
97102
|
},
|
|
97102
97103
|
loading: n,
|
|
97103
97104
|
sx: Bve(a, l),
|
|
97104
97105
|
onRowsScrollEnd: r ? void 0 : h,
|
|
97105
|
-
getRowClassName: (
|
|
97106
|
+
getRowClassName: (L) => L.id === A ? "Mui-selected" : ""
|
|
97106
97107
|
}
|
|
97107
97108
|
) });
|
|
97108
97109
|
}, Iye = ({
|