@megha-ui/react 1.2.97 → 1.2.99

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.
@@ -108,7 +108,8 @@ const GridRow = ({ item, rowStyle, cellStyle, rowHeight, bulkSelect, selectedRow
108
108
  width: "100%",
109
109
  justifyContent: column.alignment
110
110
  ? column.alignment
111
- : column.dataType === "number"
111
+ : column.dataType === "number" ||
112
+ column.dataType === "currency"
112
113
  ? "end"
113
114
  : "start",
114
115
  }, 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}`));
@@ -121,17 +122,15 @@ const GridRow = ({ item, rowStyle, cellStyle, rowHeight, bulkSelect, selectedRow
121
122
  ? "var(--row-bg)"
122
123
  : "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
124
  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;
125
+ var _a, _b, _c;
125
126
  const cellData = item[column.key];
126
127
  const cellValue = cellData && Object.keys(cellData).includes("html")
127
128
  ? 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
- : "";
129
+ : cellData && Object.keys(cellData).includes("value")
130
+ ? (0, commonService_1.formatValue)(cellData === null || cellData === void 0 ? void 0 : cellData.value, (_a = column.dataType) !== null && _a !== void 0 ? _a : "string", locale, formatOptions)
131
+ : cellData
132
+ ? cellData
133
+ : "";
135
134
  const cellUrl = cellData === null || cellData === void 0 ? void 0 : cellData.url;
136
135
  const isHidden = column.overflowHidden;
137
136
  if (!column.hidden && groupBy !== column.key) {
@@ -161,7 +160,7 @@ const GridRow = ({ item, rowStyle, cellStyle, rowHeight, bulkSelect, selectedRow
161
160
  : column.dataType === "number"
162
161
  ? "end"
163
162
  : "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}`));
163
+ }, 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
164
  }
166
165
  return null;
167
166
  })] }, 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.99",
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",