@hybridcore/ui 1.5.46 → 1.5.47

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.
@@ -1,11 +1,11 @@
1
- import { jsx as o, Fragment as D, jsxs as j } from "react/jsx-runtime";
2
- import { useState as B, useMemo as $ } from "react";
1
+ import { jsx as a, Fragment as D, jsxs as Y } from "react/jsx-runtime";
2
+ import { useMemo as j } from "react";
3
3
  import { DataGrid as N } from "@mui/x-data-grid";
4
- import { ButtonBase as k, Box as A } from "@mui/material";
5
- import { DataGridActions as E } from "./styled.js";
6
- import P from "dayjs";
7
- import T from "lodash";
8
- const U = ({
4
+ import { ButtonBase as B, Box as S } from "@mui/material";
5
+ import { DataGridActions as $ } from "./styled.js";
6
+ import k from "dayjs";
7
+ import A from "lodash";
8
+ const K = ({
9
9
  template: l,
10
10
  data: h,
11
11
  selectedIds: R = [],
@@ -17,8 +17,8 @@ const U = ({
17
17
  onSelect: d,
18
18
  onTitleClick: y
19
19
  }) => {
20
- const [F, H] = B(R), S = $(() => {
21
- var w, g, s, v, b, x, C, I;
20
+ const F = j(() => {
21
+ var w, g, v, b, s, x, C, I;
22
22
  return [
23
23
  ...(w = e == null ? void 0 : e.templateIcon) != null && w.hidden ? [] : [
24
24
  {
@@ -28,17 +28,17 @@ const U = ({
28
28
  filterable: !1,
29
29
  align: "center",
30
30
  width: 30,
31
- renderCell: (g = e == null ? void 0 : e.templateIcon) != null && g.renderCell ? (s = e == null ? void 0 : e.templateIcon) == null ? void 0 : s.renderCell : () => l ? /* @__PURE__ */ o(
31
+ renderCell: (g = e == null ? void 0 : e.templateIcon) != null && g.renderCell ? (v = e == null ? void 0 : e.templateIcon) == null ? void 0 : v.renderCell : () => l ? /* @__PURE__ */ a(
32
32
  "img",
33
33
  {
34
34
  src: l.icon,
35
35
  height: 20,
36
36
  style: { display: "inline", maxWidth: 20 }
37
37
  }
38
- ) : /* @__PURE__ */ o(D, {})
38
+ ) : /* @__PURE__ */ a(D, {})
39
39
  }
40
40
  ],
41
- ...(v = e == null ? void 0 : e.title) != null && v.hidden ? [] : [
41
+ ...(b = e == null ? void 0 : e.title) != null && b.hidden ? [] : [
42
42
  {
43
43
  field: "title",
44
44
  headerName: "Title",
@@ -46,10 +46,10 @@ const U = ({
46
46
  sortable: !1,
47
47
  filterable: !1,
48
48
  valueGetter: (r) => r.row.title,
49
- renderCell: (b = e == null ? void 0 : e.title) != null && b.renderCell ? (x = e == null ? void 0 : e.title) == null ? void 0 : x.renderCell : (r) => {
49
+ renderCell: (s = e == null ? void 0 : e.title) != null && s.renderCell ? (x = e == null ? void 0 : e.title) == null ? void 0 : x.renderCell : (r) => {
50
50
  const { row: t, value: c } = r;
51
- return y ? /* @__PURE__ */ o(
52
- k,
51
+ return y ? /* @__PURE__ */ a(
52
+ B,
53
53
  {
54
54
  onClick: () => y(t),
55
55
  sx: { "&:hover": { textDecoration: "underline" } },
@@ -85,21 +85,21 @@ const U = ({
85
85
  sortable: !1,
86
86
  filterable: !1,
87
87
  width: 150,
88
- valueFormatter: (n) => n.value && r.type === "date" ? P(n.value).format("DD/MM/YYYY HH:mm") : n.value,
89
- valueGetter: (n) => T.get(n.row, t),
88
+ valueFormatter: (n) => n.value && r.type === "date" ? k(n.value).format("DD/MM/YYYY HH:mm") : n.value,
89
+ valueGetter: (n) => A.get(n.row, t),
90
90
  renderCell: e && ((c = e[r.propertyId]) == null ? void 0 : c.renderCell)
91
91
  };
92
92
  })
93
93
  ] : []
94
94
  ];
95
- }, [l]), Y = (a) => {
96
- H(a), d && d(a);
95
+ }, [l]), H = (o) => {
96
+ d && d(o);
97
97
  };
98
- return /* @__PURE__ */ j(A, { position: "relative", children: [
99
- /* @__PURE__ */ o(
98
+ return /* @__PURE__ */ Y(S, { position: "relative", children: [
99
+ /* @__PURE__ */ a(
100
100
  N,
101
101
  {
102
- columns: S,
102
+ columns: F,
103
103
  rows: h,
104
104
  autoHeight: !0,
105
105
  density: "compact",
@@ -109,16 +109,16 @@ const U = ({
109
109
  marginRight: u ? `${m}px` : 0
110
110
  }
111
111
  },
112
- getRowId: (a) => a.id,
112
+ getRowId: (o) => o.id,
113
113
  hideFooterPagination: !0,
114
114
  hideFooter: !0,
115
115
  checkboxSelection: M,
116
- rowSelectionModel: F,
117
- onRowSelectionModelChange: Y,
116
+ rowSelectionModel: R,
117
+ onRowSelectionModelChange: H,
118
118
  keepNonExistentRowsSelected: !0
119
119
  }
120
120
  ),
121
- u !== void 0 && /* @__PURE__ */ o(E, { width: m, children: /* @__PURE__ */ o(
121
+ u !== void 0 && /* @__PURE__ */ a($, { width: m, children: /* @__PURE__ */ a(
122
122
  N,
123
123
  {
124
124
  columns: [
@@ -136,13 +136,13 @@ const U = ({
136
136
  hideFooter: !0,
137
137
  sx: { border: "none" },
138
138
  slots: {
139
- noRowsOverlay: () => /* @__PURE__ */ o(D, {})
139
+ noRowsOverlay: () => /* @__PURE__ */ a(D, {})
140
140
  },
141
- getRowId: (a) => a.id
141
+ getRowId: (o) => o.id
142
142
  }
143
143
  ) })
144
144
  ] });
145
145
  };
146
146
  export {
147
- U as InstanceTable
147
+ K as InstanceTable
148
148
  };
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@hybridcore/ui",
3
3
  "description": "Hybrid Core UI Library",
4
- "version": "1.5.46",
4
+ "version": "1.5.47",
5
5
  "author": "Hybrid Core",
6
6
  "license": "ISC",
7
7
  "type": "module",