@megha-ui/react 1.3.24 → 1.3.26

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.
@@ -246,7 +246,12 @@ const GridHeader = ({ columns, onSearch, searchQueries, sortable, search, resiza
246
246
  setIsResizing(false);
247
247
  setResizeIndex(-1);
248
248
  };
249
- return (_jsxs(_Fragment, { children: [bulkSelect && (_jsx("div", { style: Object.assign(Object.assign({}, cellStyle), { textTransform: "uppercase", padding: "0.5rem", textAlign: "left", whiteSpace: "nowrap", textOverflow: "ellipsis", position: "sticky", top: 0, zIndex: 1 }), children: _jsx(Checkbox, { selected: allRowsSelected, onChange: () => toggleSelectAll(), noLabel: true, wrapperClass: checkboxWrapper }) })), groupByKeys.map((_groupBy) => {
249
+ return (_jsxs(_Fragment, { children: [bulkSelect && (_jsx("div", { style: Object.assign(Object.assign({}, cellStyle), { textTransform: "uppercase", padding: "0.5rem", textAlign: "left", whiteSpace: "nowrap", textOverflow: "ellipsis", position: "sticky", top: 0, zIndex: 1, backgroundColor: "var(--row-header-bg)" }), children: _jsx("div", { style: {
250
+ display: "flex",
251
+ alignItems: "center",
252
+ width: "100%",
253
+ height: "100%",
254
+ }, children: _jsx(Checkbox, { selected: allRowsSelected, onChange: () => toggleSelectAll(), noLabel: true, wrapperClass: checkboxWrapper }) }) })), groupByKeys.map((_groupBy) => {
250
255
  var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t, _u, _v, _w, _x, _y, _z, _0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12, _13, _14, _15, _16, _17, _18, _19, _20, _21, _22, _23, _24, _25, _26, _27, _28, _29, _30, _31, _32, _33, _34, _35, _36, _37, _38, _39, _40, _41, _42, _43, _44, _45, _46, _47, _48, _49, _50, _51, _52, _53, _54, _55, _56, _57, _58;
251
256
  return (_jsx(_Fragment, { children: headerColumns.find((column) => column.key === _groupBy) && (_jsxs("div", { className: `${sortable &&
252
257
  ((_a = headerColumns.find((column) => column.key === _groupBy)) === null || _a === void 0 ? void 0 : _a.sortable)
@@ -93,10 +93,17 @@ const GridRow = ({ item, rowStyle, cellStyle, rowHeight, bulkSelect, selectedRow
93
93
  return isExpandable &&
94
94
  ((_a = item === null || item === void 0 ? void 0 : item.id) === null || _a === void 0 ? void 0 : _a.value) &&
95
95
  expandedRow === ((_b = item === null || item === void 0 ? void 0 : item.id) === null || _b === void 0 ? void 0 : _b.value) &&
96
- item.expandedDetails ? (_jsxs("div", { children: [_jsxs("div", { id: String((_d = (_c = item.id) === null || _c === void 0 ? void 0 : _c.value) !== null && _d !== void 0 ? _d : index), onDragOver: (e) => handleDragOver && handleDragOver(e), onDrop: (e) => handleDrop && handleDrop(e, index), className: getRowClassNames(), style: Object.assign(Object.assign({}, rowStyle), { position: "relative", display: "flex", alignItems: itemsAlign, fontSize: "inherit", height: "max-content", boxSizing: "border-box", backgroundColor: alternateRowColor && (index + 1) % 2 === 0
96
+ item.expandedDetails ? (_jsxs("div", { style: { display: "contents" }, children: [_jsxs("div", { id: String((_d = (_c = item.id) === null || _c === void 0 ? void 0 : _c.value) !== null && _d !== void 0 ? _d : index), onDragOver: (e) => handleDragOver && handleDragOver(e), onDrop: (e) => handleDrop && handleDrop(e, index), className: getRowClassNames(), style: Object.assign(Object.assign({}, rowStyle), { position: "relative", display: "flex", alignItems: itemsAlign, fontSize: "inherit", height: "max-content", boxSizing: "border-box", backgroundColor: alternateRowColor && (index + 1) % 2 === 0
97
97
  ? "var(--row-bg)"
98
- : "var(--row-bg-even)" }), children: [bulkSelect && (_jsx("div", { style: Object.assign(Object.assign(Object.assign({}, cellStyle), dragHighlightStyle), { textTransform: "uppercase", padding: "0.5rem", textAlign: "left", whiteSpace: "nowrap", textOverflow: "ellipsis" }), children: _jsx(Checkbox, { noLabel: true, disabled: ignoreRowSelect &&
99
- ignoreRowSelect.has((_e = item["id"].value) === null || _e === void 0 ? void 0 : _e.toString()), onChange: () => { var _a; return toggleRowSelection((_a = item["id"].value) === null || _a === void 0 ? void 0 : _a.toString()); }, selected: item["id"] && selectedRows.has(item["id"].value), wrapperClass: checkboxWrapper }) })), item[groupBy] && (_jsx("div", { style: {
98
+ : "var(--row-bg-even)" }), children: [bulkSelect && (_jsx("div", { style: Object.assign(Object.assign(Object.assign({}, cellStyle), dragHighlightStyle), { textTransform: "uppercase", padding: "0.5rem", textAlign: "left", whiteSpace: "nowrap", textOverflow: "ellipsis", backgroundColor: alternateRowColor && (index + 1) % 2 === 0
99
+ ? "var(--row-bg)"
100
+ : "var(--row-bg-even)" }), children: _jsx("div", { style: {
101
+ display: "flex",
102
+ alignItems: "center",
103
+ width: "100%",
104
+ height: "100%",
105
+ }, children: _jsx(Checkbox, { noLabel: true, disabled: ignoreRowSelect &&
106
+ ignoreRowSelect.has((_e = item["id"].value) === null || _e === void 0 ? void 0 : _e.toString()), onChange: () => { var _a; return toggleRowSelection((_a = item["id"].value) === null || _a === void 0 ? void 0 : _a.toString()); }, selected: item["id"] && selectedRows.has(item["id"].value), wrapperClass: checkboxWrapper }) }) })), item[groupBy] && (_jsx("div", { style: {
100
107
  wordBreak: widthMode === "auto" ? "break-all" : "unset",
101
108
  padding: groupBy ? "0.25rem" : 0,
102
109
  backgroundColor: alternateRowColor && (index + 1) % 2 === 0
@@ -142,8 +149,15 @@ const GridRow = ({ item, rowStyle, cellStyle, rowHeight, bulkSelect, selectedRow
142
149
  ((_h = item === null || item === void 0 ? void 0 : item.id) === null || _h === void 0 ? void 0 : _h.value) &&
143
150
  expandedRow === ((_j = item === null || item === void 0 ? void 0 : item.id) === null || _j === void 0 ? void 0 : _j.value) &&
144
151
  item.expandedDetails &&
145
- item.expandedDetails.html] }, String((_l = (_k = item.id) === null || _k === void 0 ? void 0 : _k.value) !== null && _l !== void 0 ? _l : index))) : (_jsxs("div", { id: `${index}`, className: getRowClassNames(), onDragOver: (e) => handleDragOver && handleDragOver(e), onDrop: (e) => handleDrop && handleDrop(e, index), style: { display: "contents" }, children: [bulkSelect && (_jsx("div", { style: Object.assign(Object.assign(Object.assign(Object.assign({}, cellStyle), rowStyle), dragHighlightStyle), { textTransform: "uppercase", padding: "0.25rem", textAlign: "left", whiteSpace: "nowrap", textOverflow: "ellipsis" }), children: _jsx(Checkbox, { noLabel: true, disabled: ignoreRowSelect &&
146
- ignoreRowSelect.has((_m = item["id"].value) === null || _m === void 0 ? void 0 : _m.toString()), onChange: () => { var _a; return toggleRowSelection((_a = item["id"].value) === null || _a === void 0 ? void 0 : _a.toString()); }, selected: item["id"] && selectedRows.has(item["id"].value), wrapperClass: checkboxWrapper }) })), columns.map((column, colIndex) => {
152
+ item.expandedDetails.html] }, String((_l = (_k = item.id) === null || _k === void 0 ? void 0 : _k.value) !== null && _l !== void 0 ? _l : index))) : (_jsxs("div", { id: `${index}`, className: getRowClassNames(), onDragOver: (e) => handleDragOver && handleDragOver(e), onDrop: (e) => handleDrop && handleDrop(e, index), style: { display: "contents" }, children: [bulkSelect && (_jsx("div", { style: Object.assign(Object.assign(Object.assign(Object.assign({}, cellStyle), rowStyle), dragHighlightStyle), { textTransform: "uppercase", padding: "0.25rem", textAlign: "left", whiteSpace: "nowrap", textOverflow: "ellipsis", backgroundColor: alternateRowColor && (index + 1) % 2 === 0
153
+ ? "var(--row-bg)"
154
+ : "var(--row-bg-even)" }), children: _jsx("div", { style: {
155
+ display: "flex",
156
+ alignItems: "center",
157
+ width: "100%",
158
+ height: "100%",
159
+ }, children: _jsx(Checkbox, { noLabel: true, disabled: ignoreRowSelect &&
160
+ ignoreRowSelect.has((_m = item["id"].value) === null || _m === void 0 ? void 0 : _m.toString()), onChange: () => { var _a; return toggleRowSelection((_a = item["id"].value) === null || _a === void 0 ? void 0 : _a.toString()); }, selected: item["id"] && selectedRows.has(item["id"].value), wrapperClass: checkboxWrapper }) }) })), columns.map((column, colIndex) => {
147
161
  var _a, _b, _c, _d, _e, _f, _g;
148
162
  const cellData = item[column.key];
149
163
  const cellValue = cellData && cellData.isArrayString ? (_jsx("div", { children: cellData.value.toString().split(">>").length > 1 ? (_jsx(_Fragment, { children: column.isArrayString ? (_jsxs("div", { className: "flex items-center gap-2", children: [cellData.value
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@megha-ui/react",
3
- "version": "1.3.24",
3
+ "version": "1.3.26",
4
4
  "description": "A collection of reusable UI components for React applications, built with TypeScript.",
5
5
  "main": "./dist/index.js",
6
6
  "module": "./dist/index.js",