@megha-ui/react 1.2.82 → 1.2.84

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.
@@ -69,6 +69,7 @@ const GridRow = ({ item, rowStyle, cellStyle, rowHeight, bulkSelect, selectedRow
69
69
  : cellData
70
70
  ? cellData
71
71
  : "";
72
+ const draggableIndex = column.key === "actions" && colIndex === 0 ? 1 : 0;
72
73
  const cellUrl = cellData === null || cellData === void 0 ? void 0 : cellData.url;
73
74
  const isHidden = column.overflowHidden;
74
75
  if (!column.hidden && groupBy !== column.key) {
@@ -87,7 +88,7 @@ const GridRow = ({ item, rowStyle, cellStyle, rowHeight, bulkSelect, selectedRow
87
88
  ? `1px solid ${hlBorderColor}`
88
89
  : "", backgroundColor: alternateRowColor && (index + 1) % 2 === 0
89
90
  ? "var(--row-bg)"
90
- : "var(--row-bg-even)" }), children: [draggable && colIndex === 0 && ((0, jsx_runtime_1.jsx)("div", { onDragStart: (e) => handleDragStart && handleDragStart(e, index), style: {
91
+ : "var(--row-bg-even)" }), children: [draggable && colIndex === draggableIndex && ((0, jsx_runtime_1.jsx)("div", { onDragStart: (e) => handleDragStart && handleDragStart(e, index), style: {
91
92
  cursor: "grab",
92
93
  margin: "0 0.25rem",
93
94
  }, children: "\u2630" })), loading ? ((0, jsx_runtime_1.jsx)("div", { style: { width: column.width, height: rowHeight }, children: (0, jsx_runtime_1.jsx)(shimmer_1.default, { height: 32, width: column.width }) })) : ((0, jsx_runtime_1.jsx)("div", { className: (cellData === null || cellData === void 0 ? void 0 : cellData.className) || "", style: {
@@ -1,3 +1 @@
1
- export declare const formatValue: (value: string | number, type?: string, locale?: string, options?: {
2
- currency: string;
3
- }) => string | number;
1
+ export declare const formatValue: (value: string | number, type: string, locale?: string, options?: Intl.NumberFormatOptions) => string | number;
@@ -18,7 +18,7 @@ const formatCurrency = (value, locale = "sv-SE", currency = "SEK", options = {})
18
18
  };
19
19
  // Dynamic formatter function
20
20
  const formatValue = (value, type = "number", locale = "sv-SE", options = {
21
- currency: "SEK",
21
+ currency: "SEK"
22
22
  }) => {
23
23
  if (type === "number") {
24
24
  const num = parseFloat(value.toString());
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@megha-ui/react",
3
- "version": "1.2.82",
3
+ "version": "1.2.84",
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.mjs",