@conboai/storybook.components 0.3.62 → 0.3.63

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