@megha-ui/react 1.2.97 → 1.2.98

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.
@@ -121,17 +121,15 @@ const GridRow = ({ item, rowStyle, cellStyle, rowHeight, bulkSelect, selectedRow
121
121
  ? "var(--row-bg)"
122
122
  : "var(--row-bg-even)" }), onClick: handleRowClick, children: [bulkSelect && ((0, jsx_runtime_1.jsx)("div", { style: Object.assign(Object.assign({}, cellStyle), { textTransform: "uppercase", padding: "0.5rem", textAlign: "left", whiteSpace: "nowrap", textOverflow: "ellipsis" }), children: (0, jsx_runtime_1.jsx)(checkbox_1.default, { noLabel: true, disabled: ignoreRowSelect &&
123
123
  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) => {
124
- var _a, _b;
124
+ var _a, _b, _c;
125
125
  const cellData = item[column.key];
126
126
  const cellValue = cellData && Object.keys(cellData).includes("html")
127
127
  ? cellData === null || cellData === void 0 ? void 0 : cellData.html
128
- : cellData && Object.keys(cellData).includes("displayValue")
129
- ? cellData === null || cellData === void 0 ? void 0 : cellData.displayValue
130
- : cellData && Object.keys(cellData).includes("value")
131
- ? cellData === null || cellData === void 0 ? void 0 : cellData.value
132
- : cellData
133
- ? cellData
134
- : "";
128
+ : cellData && Object.keys(cellData).includes("value")
129
+ ? (0, commonService_1.formatValue)(cellData === null || cellData === void 0 ? void 0 : cellData.value, (_a = column.dataType) !== null && _a !== void 0 ? _a : "string", locale, formatOptions)
130
+ : cellData
131
+ ? cellData
132
+ : "";
135
133
  const cellUrl = cellData === null || cellData === void 0 ? void 0 : cellData.url;
136
134
  const isHidden = column.overflowHidden;
137
135
  if (!column.hidden && groupBy !== column.key) {
@@ -161,7 +159,7 @@ const GridRow = ({ item, rowStyle, cellStyle, rowHeight, bulkSelect, selectedRow
161
159
  : column.dataType === "number"
162
160
  ? "end"
163
161
  : "start",
164
- }, children: isUrl(cellUrl) ? ((0, jsx_runtime_1.jsx)("a", { href: cellUrl, target: "_blank", rel: "noopener noreferrer", children: cellValue })) : column.render ? (column.render(cellValue)) : (cellValue) }))] }, `${column.key}-${(_b = (_a = item.id) === null || _a === void 0 ? void 0 : _a.value) !== null && _b !== void 0 ? _b : index}`));
162
+ }, children: isUrl(cellUrl) ? ((0, jsx_runtime_1.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}`));
165
163
  }
166
164
  return null;
167
165
  })] }, String((_k = (_j = item.id) === null || _j === void 0 ? void 0 : _j.value) !== null && _k !== void 0 ? _k : index)));
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@megha-ui/react",
3
- "version": "1.2.97",
3
+ "version": "1.2.98",
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",