@megha-ui/react 1.2.203 → 1.2.204

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.
@@ -19,7 +19,7 @@ const isUrl = (value) => {
19
19
  return false;
20
20
  };
21
21
  const GridRow = ({ item, rowStyle, cellStyle, rowHeight, bulkSelect, selectedRows, toggleRowSelection, columns, widthMode, index, rowKey, hasVerticalScroll, onRowClick, loading, groupBy, rowIndex, columnIndex, hlBorderColor, handleDragStart, handleDragOver, handleDrop, draggable, checkboxWrapper, hugColumnWidths, hugColumnHeights, alternateRowColor, isExpandable, expandedRow, ignoreRowSelect, locale, formatOptions, }) => {
22
- var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
22
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l;
23
23
  const [itemsAlign, setItemsAlign] = useState("stretch");
24
24
  const [draggableIndex, setDraggableIndex] = useState(0);
25
25
  const handleRowClick = useCallback(() => {
@@ -109,13 +109,13 @@ const GridRow = ({ item, rowStyle, cellStyle, rowHeight, bulkSelect, selectedRow
109
109
  }, children: isUrl(cellUrl) ? (_jsx("a", { href: cellUrl, target: "_blank", rel: "noopener noreferrer", children: cellValue })) : column.render ? (column.render(cellValue)) : (cellValue) }))] }, `${column.key}-${(_d = (_c = item.id) === null || _c === void 0 ? void 0 : _c.value) !== null && _d !== void 0 ? _d : index}`));
110
110
  }
111
111
  return null;
112
- })] }), isExpandable && item.id.value &&
112
+ })] }), isExpandable && ((_f = item === null || item === void 0 ? void 0 : item.id) === null || _f === void 0 ? void 0 : _f.value) &&
113
113
  expandedRow === item.id.value &&
114
114
  item.expandedDetails &&
115
- item.expandedDetails.html] }, String((_g = (_f = item.id) === null || _f === void 0 ? void 0 : _f.value) !== null && _g !== void 0 ? _g : index))) : (_jsxs("div", { id: `${index}`, draggable: draggable, onDragStart: (e) => handleDragStart && handleDragStart(e, 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", minHeight: rowHeight, height: "max-content", boxSizing: "border-box", backgroundColor: alternateRowColor && (index + 1) % 2 === 0
115
+ item.expandedDetails.html] }, String((_h = (_g = item.id) === null || _g === void 0 ? void 0 : _g.value) !== null && _h !== void 0 ? _h : index))) : (_jsxs("div", { id: `${index}`, draggable: draggable, onDragStart: (e) => handleDragStart && handleDragStart(e, 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", minHeight: rowHeight, height: "max-content", boxSizing: "border-box", backgroundColor: alternateRowColor && (index + 1) % 2 === 0
116
116
  ? "var(--row-bg)"
117
117
  : "var(--row-bg-even)" }), onClick: handleRowClick, children: [bulkSelect && (_jsx("div", { style: Object.assign(Object.assign({}, cellStyle), { textTransform: "uppercase", padding: "0.5rem", textAlign: "left", whiteSpace: "nowrap", textOverflow: "ellipsis" }), children: _jsx(Checkbox, { noLabel: true, disabled: ignoreRowSelect &&
118
- ignoreRowSelect.has((_h = item["id"].value) === null || _h === void 0 ? void 0 : _h.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) => {
118
+ ignoreRowSelect.has((_j = item["id"].value) === null || _j === void 0 ? void 0 : _j.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) => {
119
119
  var _a, _b, _c;
120
120
  const cellData = item[column.key];
121
121
  const cellValue = cellData && Object.keys(cellData).includes("html")
@@ -158,6 +158,6 @@ const GridRow = ({ item, rowStyle, cellStyle, rowHeight, bulkSelect, selectedRow
158
158
  }, children: isUrl(cellUrl) ? (_jsx("a", { href: cellUrl, target: "_blank", rel: "noopener noreferrer", children: cellValue })) : column.render ? (column.render(cellValue)) : (cellValue) }))] }, `${column.key}-${(_c = (_b = item.id) === null || _b === void 0 ? void 0 : _b.value) !== null && _c !== void 0 ? _c : index}`));
159
159
  }
160
160
  return null;
161
- })] }, String((_k = (_j = item.id) === null || _j === void 0 ? void 0 : _j.value) !== null && _k !== void 0 ? _k : index)));
161
+ })] }, String((_l = (_k = item.id) === null || _k === void 0 ? void 0 : _k.value) !== null && _l !== void 0 ? _l : index)));
162
162
  };
163
163
  export default memo(GridRow);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@megha-ui/react",
3
- "version": "1.2.203",
3
+ "version": "1.2.204",
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",