@megha-ui/react 1.2.720 → 1.2.723
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.
|
@@ -506,7 +506,7 @@ withCard = false, cardClassName, cardHeader, title, headerLeft, headerRight, sub
|
|
|
506
506
|
}
|
|
507
507
|
break;
|
|
508
508
|
}
|
|
509
|
-
const _columnKey = _groupedKeys.length > 1 ? `${groupedValue}
|
|
509
|
+
const _columnKey = _groupedKeys.length > 1 ? `${groupedValue}>>${columnKey}` : columnKey;
|
|
510
510
|
if (newSummariseDetails[_columnKey]) {
|
|
511
511
|
newSummariseDetails = Object.assign(Object.assign({}, newSummariseDetails), { [_columnKey]: Object.assign(Object.assign({}, newSummariseDetails[_columnKey]), { type, [type]: value }) });
|
|
512
512
|
}
|
|
@@ -8,6 +8,9 @@ const SummariseDetails = ({ columns, rowIndex, groupBy, sortable, cellStyle, col
|
|
|
8
8
|
.flatMap((g) => g.split("+").filter((k) => k)), [groupBy]);
|
|
9
9
|
const handleCalculateSelect = (_columnKey, type) => {
|
|
10
10
|
let columnKey = _columnKey;
|
|
11
|
+
if (columnKey.includes(">>")) {
|
|
12
|
+
columnKey = columnKey.split(">>")[1];
|
|
13
|
+
}
|
|
11
14
|
const _summariseKeys = Object.assign(Object.assign({}, summariseKeys), { [columnKey]: type });
|
|
12
15
|
recalculate(_summariseKeys);
|
|
13
16
|
};
|
|
@@ -82,7 +82,7 @@ const GridRow = ({ item, rowStyle, cellStyle, rowHeight, bulkSelect, selectedRow
|
|
|
82
82
|
return isExpandable &&
|
|
83
83
|
((_a = item === null || item === void 0 ? void 0 : item.id) === null || _a === void 0 ? void 0 : _a.value) &&
|
|
84
84
|
expandedRow === ((_b = item === null || item === void 0 ? void 0 : item.id) === null || _b === void 0 ? void 0 : _b.value) &&
|
|
85
|
-
item.expandedDetails ? (_jsxs("div", { children: [_jsxs("div", { id: String((_d = (_c = item.id) === null || _c === void 0 ? void 0 : _c.value) !== null && _d !== void 0 ? _d : index), draggable: draggable, onDragStart: (e) => handleDragStart && handleDragStart(e, index), onDragOver: (e) => handleDragOver && handleDragOver(e), onDrop: (e) => handleDrop && handleDrop(e, index), className: getRowClassNames(), style: Object.assign(Object.assign({}, rowStyle), { position: "relative", display: "flex", alignItems: itemsAlign, fontSize: "inherit",
|
|
85
|
+
item.expandedDetails ? (_jsxs("div", { children: [_jsxs("div", { id: String((_d = (_c = item.id) === null || _c === void 0 ? void 0 : _c.value) !== null && _d !== void 0 ? _d : index), draggable: draggable, onDragStart: (e) => handleDragStart && handleDragStart(e, index), onDragOver: (e) => handleDragOver && handleDragOver(e), onDrop: (e) => handleDrop && handleDrop(e, index), className: getRowClassNames(), style: Object.assign(Object.assign({}, rowStyle), { position: "relative", display: "flex", alignItems: itemsAlign, fontSize: "inherit", height: "max-content", boxSizing: "border-box", backgroundColor: alternateRowColor && (index + 1) % 2 === 0
|
|
86
86
|
? "var(--row-bg)"
|
|
87
87
|
: "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 &&
|
|
88
88
|
ignoreRowSelect.has((_e = item["id"].value) === null || _e === void 0 ? void 0 : _e.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 }) })), item[groupBy] && (_jsx("div", { style: {
|
|
@@ -94,7 +94,7 @@ const GridRow = ({ item, rowStyle, cellStyle, rowHeight, bulkSelect, selectedRow
|
|
|
94
94
|
? hugColumnWidths === null || hugColumnWidths === void 0 ? void 0 : hugColumnWidths[`column-${groupBy}`]
|
|
95
95
|
: "fit-content",
|
|
96
96
|
wordBreak: widthMode === "auto" ? "break-all" : "unset",
|
|
97
|
-
padding: groupBy ? "0.
|
|
97
|
+
padding: groupBy ? "0.25rem" : 0,
|
|
98
98
|
backgroundColor: alternateRowColor && (index + 1) % 2 === 0
|
|
99
99
|
? "var(--row-bg)"
|
|
100
100
|
: "var(--row-bg-even)",
|
|
@@ -146,9 +146,9 @@ const GridRow = ({ item, rowStyle, cellStyle, rowHeight, bulkSelect, selectedRow
|
|
|
146
146
|
((_k = item === null || item === void 0 ? void 0 : item.id) === null || _k === void 0 ? void 0 : _k.value) &&
|
|
147
147
|
expandedRow === ((_l = item === null || item === void 0 ? void 0 : item.id) === null || _l === void 0 ? void 0 : _l.value) &&
|
|
148
148
|
item.expandedDetails &&
|
|
149
|
-
item.expandedDetails.html] }, String((_o = (_m = item.id) === null || _m === void 0 ? void 0 : _m.value) !== null && _o !== void 0 ? _o : index))) : (_jsxs("div", { id: `${index}`, draggable: draggable, onDragStart: (e) => handleDragStart && handleDragStart(e, index), onDragOver: (e) => handleDragOver && handleDragOver(e), onDrop: (e) => handleDrop && handleDrop(e, index), className: getRowClassNames(), style: Object.assign(Object.assign({}, rowStyle), { position: "relative", display: "flex", alignItems: itemsAlign, fontSize: "inherit",
|
|
149
|
+
item.expandedDetails.html] }, String((_o = (_m = item.id) === null || _m === void 0 ? void 0 : _m.value) !== null && _o !== void 0 ? _o : index))) : (_jsxs("div", { id: `${index}`, draggable: draggable, onDragStart: (e) => handleDragStart && handleDragStart(e, index), onDragOver: (e) => handleDragOver && handleDragOver(e), onDrop: (e) => handleDrop && handleDrop(e, index), className: getRowClassNames(), style: Object.assign(Object.assign({}, rowStyle), { position: "relative", display: "flex", alignItems: itemsAlign, fontSize: "inherit", height: "max-content", boxSizing: "border-box", backgroundColor: alternateRowColor && (index + 1) % 2 === 0
|
|
150
150
|
? "var(--row-bg)"
|
|
151
|
-
: "var(--row-bg-even)" }), children: [bulkSelect && (_jsx("div", { style: Object.assign(Object.assign({}, cellStyle), { textTransform: "uppercase", padding: "0.
|
|
151
|
+
: "var(--row-bg-even)" }), children: [bulkSelect && (_jsx("div", { style: Object.assign(Object.assign({}, cellStyle), { textTransform: "uppercase", padding: "0.25rem", textAlign: "left", whiteSpace: "nowrap", textOverflow: "ellipsis" }), children: _jsx(Checkbox, { noLabel: true, disabled: ignoreRowSelect &&
|
|
152
152
|
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) => {
|
|
153
153
|
var _a, _b, _c, _d, _e, _f;
|
|
154
154
|
const cellData = item[column.key];
|
package/package.json
CHANGED