@megha-ui/react 1.2.820 → 1.2.823
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.
|
@@ -53,11 +53,8 @@ const GroupedGrid = ({ groupedData, rowOpened, startIndex, endIndex, alternateRo
|
|
|
53
53
|
display: "flex",
|
|
54
54
|
alignItems: "center",
|
|
55
55
|
padding: "0.5rem",
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
? "var(--row-header-bg)"
|
|
59
|
-
: "var(--row-bg)",
|
|
60
|
-
}, children: "--" }) }));
|
|
56
|
+
backgroundColor: "var(--summary-bg)",
|
|
57
|
+
}, className: `column index-${columnKey}`, onClick: () => updateRowOpened(item.groupedValue), children: _jsx("div", { children: "--" }) }));
|
|
61
58
|
}
|
|
62
59
|
return null;
|
|
63
60
|
}), _jsxs("div", { style: {
|
|
@@ -67,6 +64,7 @@ const GroupedGrid = ({ groupedData, rowOpened, startIndex, endIndex, alternateRo
|
|
|
67
64
|
background: "inherit",
|
|
68
65
|
cursor: "pointer",
|
|
69
66
|
padding: "0.5rem",
|
|
67
|
+
backgroundColor: "var(--summary-bg)",
|
|
70
68
|
}, className: `group-column ${item.key}`, onClick: () => updateRowOpened(item.groupedValue), children: [_jsx("span", { style: {
|
|
71
69
|
fontSize: "inherit",
|
|
72
70
|
marginRight: "0.5rem",
|
|
@@ -55,25 +55,15 @@ const GroupedRow = ({ item, rowStyle, cellStyle, rowHeight, columns, widthMode,
|
|
|
55
55
|
}
|
|
56
56
|
}, 50);
|
|
57
57
|
};
|
|
58
|
-
return (_jsxs(_Fragment, { children: [groupByKeys.map((_groupBy) => {
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
: "fit-content",
|
|
68
|
-
padding: _groupBy ? "0.5rem" : 0,
|
|
69
|
-
backgroundColor: alternateRowColor && (index + 1) % 2 === 0
|
|
70
|
-
? "var(--row-bg)"
|
|
71
|
-
: "var(--row-bg-even)",
|
|
72
|
-
flex: widthMode === "auto" ? 1 : undefined,
|
|
73
|
-
flexGrow: widthMode === "auto" ? 1 : 0,
|
|
74
|
-
flexShrink: widthMode === "auto" ? 1 : 0,
|
|
75
|
-
}, className: `column index-${_groupBy}`, children: _jsx("div", {}) }));
|
|
76
|
-
}), columns
|
|
58
|
+
return (_jsxs(_Fragment, { children: [groupByKeys.map((_groupBy) => (_jsx("div", { style: {
|
|
59
|
+
padding: _groupBy ? "0.5rem" : 0,
|
|
60
|
+
backgroundColor: alternateRowColor && (index + 1) % 2 === 0
|
|
61
|
+
? "var(--row-bg)"
|
|
62
|
+
: "var(--row-bg-even)",
|
|
63
|
+
flex: widthMode === "auto" ? 1 : undefined,
|
|
64
|
+
flexGrow: widthMode === "auto" ? 1 : 0,
|
|
65
|
+
flexShrink: widthMode === "auto" ? 1 : 0,
|
|
66
|
+
}, className: `column index-${_groupBy}`, children: _jsx("div", {}) }))), columns
|
|
77
67
|
.filter((column) => !groupByKeys.includes(column.key))
|
|
78
68
|
.map((column, colIndex) => {
|
|
79
69
|
var _a, _b, _c, _d, _e;
|
|
@@ -108,20 +98,9 @@ const GroupedRow = ({ item, rowStyle, cellStyle, rowHeight, columns, widthMode,
|
|
|
108
98
|
const cellUrl = cellData === null || cellData === void 0 ? void 0 : cellData.url;
|
|
109
99
|
const isHidden = column.overflowHidden;
|
|
110
100
|
if (!column.hidden) {
|
|
111
|
-
return (_jsx("div", { id: `column-${index}-${colIndex}`, className: `column index-${column.key}`, style: Object.assign(Object.assign({}, cellStyle), { padding: "0.5rem", display: "flex", alignItems: "center", justifyContent: "flex-start", overflow: isHidden ? "hidden" : "visible", textOverflow: isHidden ? "ellipsis" : "clip", whiteSpace: isHidden ? "nowrap" : "normal", height: "100%",
|
|
112
|
-
? "auto"
|
|
113
|
-
: (column === null || column === void 0 ? void 0 : column.width)
|
|
114
|
-
? column === null || column === void 0 ? void 0 : column.width
|
|
115
|
-
: (hugColumnWidths === null || hugColumnWidths === void 0 ? void 0 : hugColumnWidths[`column-${column.key}`])
|
|
116
|
-
? hugColumnWidths === null || hugColumnWidths === void 0 ? void 0 : hugColumnWidths[`column-${column.key}`]
|
|
117
|
-
: "fit-content", flex: widthMode === "auto" ? 1 : undefined, flexGrow: widthMode === "auto" ? 1 : 0, flexShrink: widthMode === "auto" ? 1 : 0, boxSizing: "border-box",
|
|
118
|
-
// marginTop:
|
|
119
|
-
// rowIndex === index && rowIndex > -1 && rowIndex < 2
|
|
120
|
-
// ? rowHeight
|
|
121
|
-
// : "",
|
|
122
|
-
backgroundColor: alternateRowColor && (index + 1) % 2 === 0
|
|
101
|
+
return (_jsx("div", { id: `column-${index}-${colIndex}`, className: `column index-${column.key}`, style: Object.assign(Object.assign({}, cellStyle), { padding: "0.5rem", display: "flex", alignItems: "center", justifyContent: "flex-start", overflow: isHidden ? "hidden" : "visible", textOverflow: isHidden ? "ellipsis" : "clip", whiteSpace: isHidden ? "nowrap" : "normal", height: "100%", flex: widthMode === "auto" ? 1 : undefined, flexGrow: widthMode === "auto" ? 1 : 0, flexShrink: widthMode === "auto" ? 1 : 0, boxSizing: "border-box", backgroundColor: alternateRowColor && (index + 1) % 2 === 0
|
|
123
102
|
? "var(--row-bg)"
|
|
124
|
-
: "var(--row-bg-even)" }), onClick: () => handleRowClick(column), children: loading ? (_jsx("div", { style: {
|
|
103
|
+
: "var(--row-bg-even)" }), onClick: () => handleRowClick(column), children: loading ? (_jsx("div", { style: { height: rowHeight }, children: _jsx(Shimmer, { height: 32, width: column.width }) })) : (_jsx("div", { className: (cellData === null || cellData === void 0 ? void 0 : cellData.className) || "", style: {
|
|
125
104
|
display: "flex",
|
|
126
105
|
alignItems: "center", // Vertically center content within the cell
|
|
127
106
|
width: "100%",
|
|
@@ -135,7 +135,7 @@ const NewSummariseDetails = ({ columns, rowIndex, groupBy, sortable, cellStyle,
|
|
|
135
135
|
const columnKey = groupedData
|
|
136
136
|
? `${groupedData}>>${column === null || column === void 0 ? void 0 : column.key}`
|
|
137
137
|
: column === null || column === void 0 ? void 0 : column.key;
|
|
138
|
-
return (_jsxs("div", { style: Object.assign(Object.assign({}, cellStyle), { position: "relative", padding: _groupBy ? "0.5rem" : 0 }), className: `column ${columnKey}-${(_a = summariseDetails[columnKey || ""]) === null || _a === void 0 ? void 0 : _a.type}`, children: [summariseDetails[columnKey || ""] &&
|
|
138
|
+
return (_jsxs("div", { style: Object.assign(Object.assign({}, cellStyle), { position: "relative", padding: _groupBy ? "0.5rem" : 0, background: "var(--row-header-bg)" }), className: `column ${columnKey}-${(_a = summariseDetails[columnKey || ""]) === null || _a === void 0 ? void 0 : _a.type}`, children: [summariseDetails[columnKey || ""] &&
|
|
139
139
|
summariseDetails[columnKey || ""].type ? (_jsxs("div", { style: {
|
|
140
140
|
display: "flex",
|
|
141
141
|
alignItems: "center",
|
|
@@ -163,7 +163,7 @@ const NewSummariseDetails = ({ columns, rowIndex, groupBy, sortable, cellStyle,
|
|
|
163
163
|
? `${groupedData}>>${column.key}`
|
|
164
164
|
: column.key;
|
|
165
165
|
if (!column.hidden) {
|
|
166
|
-
return (_jsxs("div", { className: `${sortable && column.sortable ? "sortable" : ""} ${column.showMenu ? "menu-true" : "menu-false"} ${`column-${column.key}`} ${columnKey}-${(_a = summariseDetails[columnKey]) === null || _a === void 0 ? void 0 : _a.type}`, style: Object.assign(Object.assign({}, cellStyle), { position: "relative", padding: "0.5rem", textAlign: "left", whiteSpace: "nowrap", textOverflow: "ellipsis", flex: widthMode === "auto" ? 1 : undefined, flexGrow: widthMode === "auto" ? 1 : 0, flexShrink: widthMode === "auto" ? 1 : 0, background: "
|
|
166
|
+
return (_jsxs("div", { className: `${sortable && column.sortable ? "sortable" : ""} ${column.showMenu ? "menu-true" : "menu-false"} ${`column-${column.key}`} ${columnKey}-${(_a = summariseDetails[columnKey]) === null || _a === void 0 ? void 0 : _a.type}`, style: Object.assign(Object.assign({}, cellStyle), { position: "relative", padding: "0.5rem", textAlign: "left", whiteSpace: "nowrap", textOverflow: "ellipsis", flex: widthMode === "auto" ? 1 : undefined, flexGrow: widthMode === "auto" ? 1 : 0, flexShrink: widthMode === "auto" ? 1 : 0, background: "var(--row-header-bg)" }), children: [summariseDetails[columnKey] &&
|
|
167
167
|
summariseDetails[columnKey].type ? (_jsxs("div", { style: {
|
|
168
168
|
display: "flex",
|
|
169
169
|
alignItems: "center",
|
package/package.json
CHANGED