hrm_ui_lib 3.1.27 → 3.1.29
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.
- package/components/Table/Table.js +5 -5
- package/consts/index.d.ts +7 -1
- package/consts/index.js +7 -0
- package/package.json +1 -1
|
@@ -65,10 +65,10 @@ export function Table({ columns, data, onChange, fixedHeader, withSelect = false
|
|
|
65
65
|
const onClearSelectedRows = useCallback(() => {
|
|
66
66
|
toggleAllRowsSelected(false);
|
|
67
67
|
}, []);
|
|
68
|
-
return (_jsxs("div", {
|
|
68
|
+
return (_jsxs("div", { ref: containerRefHandler, children: [withSelect && selectedFlatRows.length > 0 && (_jsxs("div", { className: "table-wrapper__selected-rows", children: [_jsx(Button, { buttonText: setTranslationValue(TABLE_LOCALIZATION[language].n_selected || '', selectedFlatRows.length), onClick: onClearSelectedRows, type: "tertiary", size: "medium", iconProps: { alignment: 'left', Component: IconDismiss } }), submitButtons === null || submitButtons === void 0 ? void 0 : submitButtons.map(({ buttonText, isLoading, onClick, iconProps }) => (_jsx(Button, { iconProps: iconProps || { alignment: 'left', Component: IconCheckmark }, onClick: (event) => {
|
|
69
69
|
onClick(event, state, onClearSelectedRows);
|
|
70
|
-
}, buttonText: buttonText || 'Submit', type: "secondary", size: "medium", className: "mr-8", isLoading: isLoading })))] })), _jsxs("table", Object.assign({}, getTableProps(), { ref: tableRef, children: [_jsx("thead", { children: headerGroups.map((headerGroup, i) => (_jsx(Header, { withSelect: withSelect, fixedHeader: Boolean(fixedHeader), headerGroup: headerGroup, tableWidth: tableWidth, uniqueKey: uniqueKey }, `table_head_${uniqueKey}_${i}`))) }), _jsx("tbody", Object.assign({}, getTableBodyProps(), { children: rows.map((row) => {
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
70
|
+
}, buttonText: buttonText || 'Submit', type: "secondary", size: "medium", className: "mr-8", isLoading: isLoading })))] })), _jsx("div", { onScroll: dispatchScrollEvent, className: classNames('table-wrapper scrollbar scrollbar--horizontal scrollbar--vertical', className, { 'table-row-clickable': !!handleRowClick }), style: { maxHeight: fixedHeader === null || fixedHeader === void 0 ? void 0 : fixedHeader.y }, children: _jsxs("table", Object.assign({}, getTableProps(), { ref: tableRef, children: [_jsx("thead", { children: headerGroups.map((headerGroup, i) => (_jsx(Header, { withSelect: withSelect, fixedHeader: Boolean(fixedHeader), headerGroup: headerGroup, tableWidth: tableWidth, uniqueKey: uniqueKey }, `table_head_${uniqueKey}_${i}`))) }), _jsx("tbody", Object.assign({}, getTableBodyProps(), { children: rows.map((row) => {
|
|
71
|
+
prepareRow(row);
|
|
72
|
+
return (_jsx(Row, { handleRowClick: handleRowClick, withSelect: withSelect, selectedFlatRows: selectedFlatRows, row: row, uniqueKey: uniqueKey }, `table_row_${uniqueKey}_${row.id}`));
|
|
73
|
+
}) }))] })) })] }));
|
|
74
74
|
}
|
package/consts/index.d.ts
CHANGED
|
@@ -36,5 +36,11 @@ export declare enum STORE_KEYS {
|
|
|
36
36
|
isNavMenuExpanded = "isNavMenuExpanded",
|
|
37
37
|
isAuthenticated = "isAuthenticated",
|
|
38
38
|
personId = "personId",
|
|
39
|
-
isMobile = "isMobile"
|
|
39
|
+
isMobile = "isMobile",
|
|
40
|
+
staffListColumns = "staffListColumns",
|
|
41
|
+
themeMode = "themeMode"
|
|
42
|
+
}
|
|
43
|
+
export declare enum ThemeMode {
|
|
44
|
+
Light = "light",
|
|
45
|
+
Dark = "dark"
|
|
40
46
|
}
|
package/consts/index.js
CHANGED
|
@@ -97,4 +97,11 @@ export var STORE_KEYS;
|
|
|
97
97
|
STORE_KEYS["isAuthenticated"] = "isAuthenticated";
|
|
98
98
|
STORE_KEYS["personId"] = "personId";
|
|
99
99
|
STORE_KEYS["isMobile"] = "isMobile";
|
|
100
|
+
STORE_KEYS["staffListColumns"] = "staffListColumns";
|
|
101
|
+
STORE_KEYS["themeMode"] = "themeMode";
|
|
100
102
|
})(STORE_KEYS || (STORE_KEYS = {}));
|
|
103
|
+
export var ThemeMode;
|
|
104
|
+
(function (ThemeMode) {
|
|
105
|
+
ThemeMode["Light"] = "light";
|
|
106
|
+
ThemeMode["Dark"] = "dark";
|
|
107
|
+
})(ThemeMode || (ThemeMode = {}));
|