@conboai/storybook.components 0.5.54 → 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.
@@ -25,6 +25,7 @@ export interface CustomDataGridProps {
25
25
  useClientSorting?: boolean;
26
26
  isShapeSelection?: boolean;
27
27
  infoText?: string;
28
+ totalText?: string;
28
29
  }
29
30
  declare const CustomDataGrid: FC<CustomDataGridProps>;
30
31
  export default CustomDataGrid;
@@ -80628,6 +80628,7 @@ const yhe = () => {
80628
80628
  fullscreenControl: A,
80629
80629
  disableDefaultUI: !J && b,
80630
80630
  mapTypeId: "satellite",
80631
+ streetViewControl: !1,
80631
80632
  draggableCursor: N.type === "view" || N.type === "edit" ? "hand" : "crosshair"
80632
80633
  }),
80633
80634
  [N.type, J, b]
@@ -80675,7 +80676,7 @@ const yhe = () => {
80675
80676
  options: Q,
80676
80677
  styles: { width: "100%", height: "100%" },
80677
80678
  onLoad: (K) => {
80678
- X(K), S == null || S(K);
80679
+ X(K), S == null || S(K), K == null || K.setTilt(0);
80679
80680
  },
80680
80681
  onError: w,
80681
80682
  onDragEnd: () => c == null ? void 0 : c(Y || null),
@@ -98782,49 +98783,50 @@ const lye = r1e, cye = (e, t) => ({
98782
98783
  onRowIdSelect: m,
98783
98784
  csvFileName: v = "table_data.csv",
98784
98785
  csvHeaders: y,
98785
- csvDataFormatter: C = (M) => M.toString(),
98786
+ csvDataFormatter: C = (O) => O.toString(),
98786
98787
  useClientSorting: S = !1,
98787
98788
  isShapeSelection: w = !1,
98788
- infoText: E = "No rows"
98789
+ infoText: E = "No rows",
98790
+ totalText: M = ""
98789
98791
  }) => {
98790
- const [M, O] = Be({
98792
+ const [O, F] = Be({
98791
98793
  page: 0,
98792
98794
  pageSize: i[0]
98793
- }), [F, D] = Be([]), A = lye(), P = Ao(() => S && F.length > 0 ? [...t].sort((H, B) => {
98794
- for (const N of F) {
98795
- const { field: U, sort: Y } = N;
98796
- if (H[U] < B[U]) return Y === "asc" ? -1 : 1;
98797
- if (H[U] > B[U]) return Y === "asc" ? 1 : -1;
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;
98798
98800
  }
98799
98801
  return 0;
98800
- }) : t, [t, F, S]), L = In(
98801
- (H) => {
98802
- D(H), u && u(H);
98802
+ }) : t, [t, D, S]), x = In(
98803
+ (B) => {
98804
+ A(B), u && u(B);
98803
98805
  },
98804
98806
  [u]
98805
- ), x = In(
98806
- (H) => {
98807
- if (O(H), d) {
98808
- const B = {
98809
- previousPage: M.page
98807
+ ), k = In(
98808
+ (B) => {
98809
+ if (F(B), d) {
98810
+ const N = {
98811
+ previousPage: O.page
98810
98812
  };
98811
- d(H, B);
98813
+ d(B, N);
98812
98814
  }
98813
98815
  },
98814
- [d, M.page]
98815
- ), k = In(
98816
- (H) => {
98817
- m == null || m(null), h == null || h(H);
98816
+ [d, O.page]
98817
+ ), R = In(
98818
+ (B) => {
98819
+ m == null || m(null), h == null || h(B);
98818
98820
  },
98819
98821
  [h, m]
98820
- ), R = () => {
98821
- const B = "data:text/csv;charset=utf-8," + (y || e.map((Y) => Y.headerName)).join(",") + `
98822
- ` + P.map(
98823
- (Y) => e.map((X) => C(Y[X.field], X)).join(",")
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(",")
98824
98826
  ).join(`
98825
- `), N = encodeURI(B), U = document.createElement("a");
98826
- U.setAttribute("href", N), U.setAttribute("download", v), document.body.appendChild(U), U.click(), document.body.removeChild(U);
98827
- }, I = () => !p && /* @__PURE__ */ V.jsxs(
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(
98828
98830
  j5,
98829
98831
  {
98830
98832
  sx: {
@@ -98838,7 +98840,7 @@ const lye = r1e, cye = (e, t) => ({
98838
98840
  Ir,
98839
98841
  {
98840
98842
  variant: "text",
98841
- onClick: R,
98843
+ onClick: I,
98842
98844
  disabled: !t.length,
98843
98845
  children: /* @__PURE__ */ V.jsxs(
98844
98846
  nn,
@@ -98877,15 +98879,15 @@ const lye = r1e, cye = (e, t) => ({
98877
98879
  {
98878
98880
  rowsPerPageOptions: i,
98879
98881
  count: c,
98880
- page: M.page,
98881
- onPageChange: (H, B) => O((N) => ({ ...N, page: B })),
98882
- rowsPerPage: M.pageSize,
98883
- onRowsPerPageChange: (H) => O((B) => ({
98884
- ...B,
98885
- pageSize: parseInt(H.target.value, 10)
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)
98886
98888
  }))
98887
98889
  }
98888
- ) : /* @__PURE__ */ V.jsxs(
98890
+ ) : /* @__PURE__ */ V.jsx(
98889
98891
  Ot,
98890
98892
  {
98891
98893
  sx: {
@@ -98893,46 +98895,42 @@ const lye = r1e, cye = (e, t) => ({
98893
98895
  color: l === "light" ? "#000000" : "rgba(255, 255, 255, 0.5)",
98894
98896
  fontSize: "14px"
98895
98897
  },
98896
- children: [
98897
- t.length,
98898
- " rows from ",
98899
- b || "Unknown"
98900
- ]
98898
+ children: M || `${t.length} rows from ${b || "Unknown"}`
98901
98899
  }
98902
98900
  )
98903
98901
  ]
98904
98902
  }
98905
98903
  );
98906
98904
  return Ie(() => {
98907
- if (w && A.current) {
98908
- const H = A.current.getRowIndexRelativeToVisibleRows(g);
98909
- H != null && H >= 0 && A.current.scrollToIndexes({ rowIndex: H });
98905
+ if (w && P.current) {
98906
+ const B = P.current.getRowIndexRelativeToVisibleRows(g);
98907
+ B != null && B >= 0 && P.current.scrollToIndexes({ rowIndex: B });
98910
98908
  }
98911
- }, [g, A, w]), /* @__PURE__ */ V.jsx(ci, { sx: cye(s, l), children: /* @__PURE__ */ V.jsx(
98909
+ }, [g, P, w]), /* @__PURE__ */ V.jsx(ci, { sx: cye(s, l), children: /* @__PURE__ */ V.jsx(
98912
98910
  aye,
98913
98911
  {
98914
- rows: P,
98912
+ rows: L,
98915
98913
  rowSelection: !0,
98916
98914
  rowHeight: 35,
98917
98915
  columns: e,
98918
98916
  paginationMode: r ? "server" : void 0,
98919
98917
  sortingMode: S ? "client" : "server",
98920
- paginationModel: M,
98918
+ paginationModel: O,
98921
98919
  rowCount: c,
98922
98920
  pagination: r,
98923
- onPaginationModelChange: r ? x : void 0,
98924
- sortModel: F,
98921
+ onPaginationModelChange: r ? k : void 0,
98922
+ sortModel: D,
98925
98923
  disableRowSelectionOnClick: !0,
98926
- onSortModelChange: L,
98927
- onRowClick: k,
98924
+ onSortModelChange: x,
98925
+ onRowClick: R,
98928
98926
  slots: {
98929
- footer: I
98927
+ footer: H
98930
98928
  },
98931
98929
  loading: n,
98932
98930
  sx: uye(s, l),
98933
98931
  onRowsScrollEnd: r ? void 0 : f,
98934
- getRowClassName: (H) => H.id === g ? "Mui-selected" : "",
98935
- apiRef: A,
98932
+ getRowClassName: (B) => B.id === g ? "Mui-selected" : "",
98933
+ apiRef: P,
98936
98934
  localeText: {
98937
98935
  noRowsLabel: E
98938
98936
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@conboai/storybook.components",
3
- "version": "0.5.54",
3
+ "version": "0.5.56",
4
4
  "main": "dist/storybook.components.mjs",
5
5
  "types": "dist/build/index.d.ts",
6
6
  "files": [