@monolith-forensics/monolith-ui 1.2.1 → 1.2.2
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.
|
@@ -27,7 +27,7 @@ const FlexedRow = styled.div `
|
|
|
27
27
|
}
|
|
28
28
|
`;
|
|
29
29
|
const TableMenu = () => {
|
|
30
|
-
var _a, _b, _c, _d, _e, _f, _g;
|
|
30
|
+
var _a, _b, _c, _d, _e, _f, _g, _h;
|
|
31
31
|
const { data, columnState, searchState, toggleColumnVisibility, tableMenuOptions, runSearch, enableSelection, compactState, toggleCompact, totalRecords, getCalculatedSelectionTotal, filterState, handleFilterChange, } = useTable();
|
|
32
32
|
if ((tableMenuOptions === null || tableMenuOptions === void 0 ? void 0 : tableMenuOptions.enabled) !== true)
|
|
33
33
|
return null;
|
|
@@ -88,7 +88,7 @@ const TableMenu = () => {
|
|
|
88
88
|
return (_b = (_a = tableMenuOptions === null || tableMenuOptions === void 0 ? void 0 : tableMenuOptions.exportOptions) === null || _a === void 0 ? void 0 : _a.onExport) === null || _b === void 0 ? void 0 : _b.call(_a, item.value);
|
|
89
89
|
}, dropDownProps: {
|
|
90
90
|
style: { width: 175, maxWidth: 400 },
|
|
91
|
-
}, children: _jsx(DownloadIcon, { size: 14 }) })), _jsx(Button, { variant: "outlined", title: "Toggle Compact", size: "xxs", style: { padding: "0px 4px" }, onClick: () => toggleCompact(), children: compactState ? _jsx(Rows4Icon, { size: 14 }) : _jsx(Rows3Icon, { size: 14 }) }), ((
|
|
91
|
+
}, children: _jsx(DownloadIcon, { size: 14 }) })), ((_e = tableMenuOptions === null || tableMenuOptions === void 0 ? void 0 : tableMenuOptions.compactOptions) === null || _e === void 0 ? void 0 : _e.enabled) !== false && (_jsx(Button, { variant: "outlined", title: "Toggle Compact", size: "xxs", style: { padding: "0px 4px" }, onClick: () => toggleCompact(), children: compactState ? _jsx(Rows4Icon, { size: 14 }) : _jsx(Rows3Icon, { size: 14 }) })), ((_f = tableMenuOptions === null || tableMenuOptions === void 0 ? void 0 : tableMenuOptions.columnSelectorOptions) === null || _f === void 0 ? void 0 : _f.enabled) !== false && (_jsx(DropDownMenu, { variant: "outlined", size: "xs", data: columnState.map((col) => ({
|
|
92
92
|
label: (col === null || col === void 0 ? void 0 : col.caption) || col.dataField,
|
|
93
93
|
value: col.dataField,
|
|
94
94
|
onClick: () => toggleColumnVisibility(col.dataField),
|
|
@@ -103,6 +103,6 @@ const TableMenu = () => {
|
|
|
103
103
|
style: { padding: "0px 4px" },
|
|
104
104
|
}, dropDownProps: {
|
|
105
105
|
style: { width: 175, maxWidth: 400 },
|
|
106
|
-
}, children: _jsx(Columns3Icon, { size: 14 }) })), ((
|
|
106
|
+
}, children: _jsx(Columns3Icon, { size: 14 }) })), ((_g = tableMenuOptions === null || tableMenuOptions === void 0 ? void 0 : tableMenuOptions.searchOptions) === null || _g === void 0 ? void 0 : _g.enabled) !== false && (_jsx(TextInput, { size: "xs", placeholder: ((_h = tableMenuOptions === null || tableMenuOptions === void 0 ? void 0 : tableMenuOptions.searchOptions) === null || _h === void 0 ? void 0 : _h.placeholder) || "Search", defaultValue: searchState, onChange: handleSearch }))] })] }), _jsx(QueryFilter, { queryFilter: queryFilter })] }));
|
|
107
107
|
};
|
|
108
108
|
export default TableMenu;
|
package/dist/Table/types.d.ts
CHANGED