@megha-ui/react 1.3.22 → 1.3.24

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.
@@ -10,7 +10,7 @@ var __rest = (this && this.__rest) || function (s, e) {
10
10
  return t;
11
11
  };
12
12
  import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
13
- import { useState, useEffect, useRef, useMemo, } from "react";
13
+ import { useState, useEffect, useRef, useMemo } from "react";
14
14
  import * as XLSX from "xlsx";
15
15
  import { saveAs } from "file-saver";
16
16
  import Pagination from "./utils/pagination";
@@ -1516,11 +1516,12 @@ withCard = false, cardClassName, cardHeader, title, headerLeft, headerRight, sub
1516
1516
  }, children: "\u00D7" })] }, chip));
1517
1517
  })] }))] }), _jsxs("div", { id: `grid-content`, onScroll: onScroll, ref: gridRef, style: {
1518
1518
  display: "grid",
1519
- gridTemplateColumns: gridColumns
1520
- .map((_, index) => index > gridColumns.length - 2
1521
- ? "minmax(max-content, 1fr)"
1522
- : "max-content")
1523
- .join(" "),
1519
+ gridTemplateColumns: [
1520
+ ...(bulkSelect ? ["max-content"] : []),
1521
+ ...gridColumns.map((_, index) => index < gridColumns.length - 1
1522
+ ? "max-content"
1523
+ : "minmax(max-content, 1fr)"),
1524
+ ].join(" "),
1524
1525
  gridAutoRows: "max-content",
1525
1526
  height: `calc(100% - ${removalHeight})`,
1526
1527
  border: gridBorder ? "1px solid #f0f0f0" : "none",
@@ -1549,7 +1550,7 @@ withCard = false, cardClassName, cardHeader, title, headerLeft, headerRight, sub
1549
1550
  alignItems: "center",
1550
1551
  padding: "1rem 0",
1551
1552
  justifyContent: "center",
1552
- gridColumn: "1 / -1"
1553
+ gridColumn: "1 / -1",
1553
1554
  }, children: "No Data available" })), summariseAvailable &&
1554
1555
  filteredData.length > 0 &&
1555
1556
  gridGroupBy === "" && (_jsx(NewSummariseDetails, { summariseKeys: summariseKeys, columns: gridColumns, groupBy: gridGroupBy, sortable: sortable, cellStyle: cellStyle, columnWidths: columnWidths, widthMode: widthMode, summariseDetails: summariseDetails, activeCalculateColor: activeCalculateColor, gridRef: gridRef, setCalculatePosition: setCalculatePosition, calculatePosition: calculatePosition, calculatetextColor: calculatetextColor, setCalculateVisible: setCalculateVisible, calculateVisible: calculateVisible, summariseDisplay: summariseDisplay, recalculate: recalculate, actionsKey: actionsKey }))] }), paginate && gridGroupBy === "" && (_jsxs("div", { id: "pagination", style: {
@@ -190,12 +190,12 @@ const GridRow = ({ item, rowStyle, cellStyle, rowHeight, bulkSelect, selectedRow
190
190
  ? `1px solid ${hlBorderColor}`
191
191
  : "", backgroundColor: alternateRowColor && (index + 1) % 2 === 0
192
192
  ? "var(--row-bg)"
193
- : "var(--row-bg-even)" }), onClick: () => handleRowClick(column), draggable: draggable, onDragStart: (e) => {
194
- handleDragStart && handleDragStart(e, index);
195
- setIsDragging(true);
196
- }, onDragEnd: () => setIsDragging(false), children: [draggable && colIndex === draggableIndex && (_jsx("div", { style: {
193
+ : "var(--row-bg-even)" }), onClick: () => handleRowClick(column), draggable: draggable, onDragEnd: () => setIsDragging(false), children: [draggable && colIndex === draggableIndex && (_jsx("div", { style: {
197
194
  cursor: "grab",
198
- }, onDragStart: (e) => handleDragStart && handleDragStart(e, index), children: _jsx(MdDragIndicator, { size: "1.25rem" }) })), loading ? (_jsx("div", { style: { height: rowHeight }, children: _jsx(Shimmer, { height: 32, width: column.width }) })) : (_jsx("div", { className: (cellData === null || cellData === void 0 ? void 0 : cellData.className) || "", style: {
195
+ }, onDragStart: (e) => {
196
+ handleDragStart && handleDragStart(e, index);
197
+ setIsDragging(true);
198
+ }, children: _jsx(MdDragIndicator, { size: "1.25rem" }) })), loading ? (_jsx("div", { style: { height: rowHeight }, children: _jsx(Shimmer, { height: 32, width: column.width }) })) : (_jsx("div", { className: (cellData === null || cellData === void 0 ? void 0 : cellData.className) || "", style: {
199
199
  display: "flex",
200
200
  alignItems: "center", // Vertically center content within the cell
201
201
  width: "100%",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@megha-ui/react",
3
- "version": "1.3.22",
3
+ "version": "1.3.24",
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",