@megha-ui/react 1.2.491 → 1.2.493
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.
|
@@ -125,7 +125,7 @@ const GridRow = ({ item, rowStyle, cellStyle, rowHeight, bulkSelect, selectedRow
|
|
|
125
125
|
? "var(--row-bg)"
|
|
126
126
|
: "var(--row-bg-even)" }), 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 &&
|
|
127
127
|
ignoreRowSelect.has((_p = item["id"].value) === null || _p === void 0 ? void 0 : _p.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) => {
|
|
128
|
-
var _a, _b, _c, _d, _e, _f;
|
|
128
|
+
var _a, _b, _c, _d, _e, _f, _g;
|
|
129
129
|
const cellData = item[column.key];
|
|
130
130
|
const cellValue = cellData && cellData.isArrayString ? (_jsx("div", { children: cellData.value.toString().split(">>").length > 1 ? (_jsx(_Fragment, { children: column.isArrayString ? (_jsxs("div", { className: "flex items-center gap-2", children: [cellData.value
|
|
131
131
|
.toString()
|
|
@@ -135,12 +135,17 @@ const GridRow = ({ item, rowStyle, cellStyle, rowHeight, bulkSelect, selectedRow
|
|
|
135
135
|
background: "var(--brand)",
|
|
136
136
|
color: "#fff",
|
|
137
137
|
padding: "0.25rem 0.5rem",
|
|
138
|
-
opacity: index % 2 === 0 ? 0.5 : 1
|
|
139
|
-
}, children: item }))), _jsxs("div", { className: "flex-grow-0 flex-shrink-0",
|
|
138
|
+
opacity: index % 2 === 0 ? 0.5 : 1,
|
|
139
|
+
}, children: item }))), _jsxs("div", { className: "flex-grow-0 flex-shrink-0", "data-tooltip-id": (_a = item.id.value.toString()) !== null && _a !== void 0 ? _a : colIndex.toString(), "data-tooltip-html": `<div class="flex flex-col">${cellData.value
|
|
140
140
|
.toString()
|
|
141
141
|
.split(">>")
|
|
142
|
+
.slice(3)
|
|
142
143
|
.map((item) => `<div>${item}</div>`)
|
|
143
|
-
.join("")}</div>`, children: ["
|
|
144
|
+
.join("")}</div>`, children: ["+", " ", cellData.value.toString().split(">>").slice(3).length, " ", "more"] }), _jsx(Tooltip, { className: "custom-tooltip", id: (_b = item.id.value.toString()) !== null && _b !== void 0 ? _b : colIndex.toString(), place: "top" })] })) : (_jsxs(_Fragment, { children: [_jsxs("span", { "data-tooltip-id": (_c = item.id.value.toString()) !== null && _c !== void 0 ? _c : colIndex.toString(), "data-tooltip-html": `<div class="flex flex-col">${cellData.value
|
|
145
|
+
.toString()
|
|
146
|
+
.split(">>")
|
|
147
|
+
.map((item) => `<div>${item}</div>`)
|
|
148
|
+
.join("")}</div>`, children: ["Multiple", " ", `(${cellData.value.toString().split(">>").length})`] }), _jsx(Tooltip, { className: "custom-tooltip", id: (_d = item.id.value.toString()) !== null && _d !== void 0 ? _d : colIndex.toString(), place: "top" })] })) })) : (_jsx("span", { children: cellData.value })) })) : cellData && Object.keys(cellData).includes("html") ? (cellData === null || cellData === void 0 ? void 0 : cellData.html) : cellData && Object.keys(cellData).includes("value") ? (formatValue(cellData === null || cellData === void 0 ? void 0 : cellData.value, (_e = column.dataType) !== null && _e !== void 0 ? _e : "string", locale, formatOptions)) : cellData ? (cellData) : ("");
|
|
144
149
|
const cellUrl = cellData === null || cellData === void 0 ? void 0 : cellData.url;
|
|
145
150
|
const isHidden = column.overflowHidden;
|
|
146
151
|
if (!column.hidden && !groupByKeys.includes(column.key)) {
|
|
@@ -171,7 +176,7 @@ const GridRow = ({ item, rowStyle, cellStyle, rowHeight, bulkSelect, selectedRow
|
|
|
171
176
|
column.dataType === "currency"
|
|
172
177
|
? "end"
|
|
173
178
|
: "start",
|
|
174
|
-
}, children: isUrl(cellUrl) ? (_jsx("a", { href: cellUrl, target: "_blank", rel: "noopener noreferrer", children: cellValue })) : column.render ? (column.render(cellValue)) : (cellValue) }))] }, `${column.key}-${(
|
|
179
|
+
}, children: isUrl(cellUrl) ? (_jsx("a", { href: cellUrl, target: "_blank", rel: "noopener noreferrer", children: cellValue })) : column.render ? (column.render(cellValue)) : (cellValue) }))] }, `${column.key}-${(_g = (_f = item.id) === null || _f === void 0 ? void 0 : _f.value) !== null && _g !== void 0 ? _g : index}`));
|
|
175
180
|
}
|
|
176
181
|
return null;
|
|
177
182
|
})] }, String((_r = (_q = item.id) === null || _q === void 0 ? void 0 : _q.value) !== null && _r !== void 0 ? _r : index)));
|
package/package.json
CHANGED