@megha-ui/react 1.2.815 → 1.2.816
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.
|
@@ -36,6 +36,7 @@ import { TbCopy, TbCopyOff } from "react-icons/tb";
|
|
|
36
36
|
import { formatValue } from "../../services/commonService";
|
|
37
37
|
import NewGridHeader from "./utils/newGridHeader";
|
|
38
38
|
import NewGridRow from "./utils/newGridRow";
|
|
39
|
+
import NewSummariseDetails from "./utils/newSummariseDetails";
|
|
39
40
|
const Grid = ({ columns, wrapperClass, updateGridColumns, data, height, sortable = true, paginate, rowsPerPageOptions = [10, 20, 50, 100], defaultRowsPerPage = 100, defaultColumnsPerView = 200, widthMode = "custom", bulkSelect = false, cellBorder = false, rowHeight = "3rem", onRowClick, rowCount = false, rowBorder = true, showMenu = false, search = false, defaultSearchOperation = "contains", gridBorder = false, isLoading = false, rowTopBorder, rowBottomBorder, rowLeftBorder, rowRightBorder, headerBackground = "var(--row-header-bg)", headerTopBorder = "none", headerBottomBorder = "none", SettingIcon, ExportIcon, ignoredExportItems = ["action", "actions"], borderColor = "#dbdfe9", updateColumns, showHideAvailable = false, columnSearchOutside = false, multiSorting = false, exportAvailable = false, exportableFileName = "", groupBy, updateGroupBy, rowKey = "id", hlBorderColor = "black", selectedRow, selectedRowStyle = {
|
|
40
41
|
borderLeft: "0.5rem solid #d9d9d9",
|
|
41
42
|
}, defaultSort, noKeyEvents = true, customOperation, hasCustomOperation, globalSearch, headerDropdownIndex, draggable = false, resizable = false, updateGridData, widthUnits, checkboxWrapper, ignoreHugContent = false, isSummarise = false, isHideDups = false, isMultipleChips = false, fullScreenAvailable = true, defaultGroupOpen, alternateRowColor = true, activeCalculateColor = "#2377BA", calculatetextColor = "#fff", actionsKey = "actions", ignoreClickKeys = "", saveAsNewView = false, handleSaveAsView, saveAsViewIcon, filterData, chipColor = "#ccc", withAscii = false, propSummariseKeys, SummariseIcon, summarizeColor = "black", isExpandable = false, expandedRow, extraRow, selectedCheckBox, setSelectedCheckbox, ignoreRowSelect, setOpenedRows, openedRows, getLoadingState, globalSearchOpen = false, updateFixedFilterValues = (fixedFilterValues) => {
|
|
@@ -1602,7 +1603,7 @@ withCard = false, cardClassName, cardHeader, title, headerLeft, headerRight, sub
|
|
|
1602
1603
|
}
|
|
1603
1604
|
}), extraRow && extraRow, tableData.length === 0 && typeof extraRow === "undefined" && (_jsx("div", { style: { gridColumn: 1 }, children: "No Data available" })), summariseAvailable &&
|
|
1604
1605
|
filteredData.length > 0 &&
|
|
1605
|
-
gridGroupBy === "" && (_jsx(
|
|
1606
|
+
gridGroupBy === "" && (_jsx(NewSummariseDetails, { summariseKeys: summariseKeys, columns: gridColumns, groupBy: gridGroupBy, sortable: sortable, cellStyle: cellStyle, columnWidths: columnWidths, widthMode: widthMode, summariseDetails: summariseDetails, activeCalculateColor: activeCalculateColor, gridRef: gridRef, setCalculatePosition: setCalculatePosition, calculatePosition: calculatePosition, calculatetextColor: calculatetextColor, setCalculateVisible: setCalculateVisible, calculateVisible: calculateVisible, summariseDisplay: summariseDisplay, recalculate: recalculate, actionsKey: actionsKey }))] }), paginate && gridGroupBy === "" && (_jsxs("div", { id: "pagination", style: {
|
|
1606
1607
|
display: "flex",
|
|
1607
1608
|
minHeight: "2rem",
|
|
1608
1609
|
alignItems: "center",
|
|
@@ -31,5 +31,5 @@ interface SummariseDetailsProps {
|
|
|
31
31
|
groupedData?: string;
|
|
32
32
|
actionsKey: string;
|
|
33
33
|
}
|
|
34
|
-
declare const
|
|
35
|
-
export default
|
|
34
|
+
declare const NewSummariseDetails: React.FC<SummariseDetailsProps>;
|
|
35
|
+
export default NewSummariseDetails;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
|
|
2
2
|
import React from "react";
|
|
3
3
|
import CalculateDropdown from "./calculatedropdown";
|
|
4
|
-
const
|
|
4
|
+
const NewSummariseDetails = ({ columns, rowIndex, groupBy, sortable, cellStyle, columnWidths, widthMode, summariseDetails, summariseKeys, activeCalculateColor, gridRef, setCalculatePosition, calculatePosition, calculatetextColor = "#aaa", setCalculateVisible, calculateVisible, summariseDisplay, recalculate, groupedData, removedKeys = [], actionsKey, }) => {
|
|
5
5
|
const groupByKeys = React.useMemo(() => (groupBy || "")
|
|
6
6
|
.split(",")
|
|
7
7
|
.filter((g) => g)
|
|
@@ -189,4 +189,4 @@ const SummariseDetails = ({ columns, rowIndex, groupBy, sortable, cellStyle, col
|
|
|
189
189
|
}
|
|
190
190
|
})] }));
|
|
191
191
|
};
|
|
192
|
-
export default
|
|
192
|
+
export default NewSummariseDetails;
|
package/package.json
CHANGED