@danikokonn/yarik-frontend-lib 2.0.49 → 2.0.51
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/dist/components/ActionDialog/ActionDialog.d.ts +1 -2
- package/dist/components/ActionDialog/ActionDialog.d.ts.map +1 -1
- package/dist/components/ActionDialog/ActionDialog.js +7 -18
- package/dist/components/ActionDialog/ActionDialogProps.d.ts +1 -1
- package/dist/components/ActionDialog/ActionDialogProps.d.ts.map +1 -1
- package/dist/components/ActionDialog/index.d.ts +2 -2
- package/dist/components/ActionDialog/index.d.ts.map +1 -1
- package/dist/components/ActionDialog/index.js +1 -1
- package/dist/components/ColumnSearchInput/ColumnSearchInput.d.ts +1 -2
- package/dist/components/ColumnSearchInput/ColumnSearchInput.d.ts.map +1 -1
- package/dist/components/ColumnSearchInput/ColumnSearchInput.js +5 -5
- package/dist/components/ColumnSearchInput/index.d.ts +2 -2
- package/dist/components/ColumnSearchInput/index.d.ts.map +1 -1
- package/dist/components/ColumnSearchInput/index.js +1 -1
- package/dist/components/DateTimeRangePicker/DateTimeRangePicker.d.ts +2 -3
- package/dist/components/DateTimeRangePicker/DateTimeRangePicker.d.ts.map +1 -1
- package/dist/components/DateTimeRangePicker/DateTimeRangePicker.js +39 -41
- package/dist/components/DateTimeRangePicker/index.d.ts +2 -2
- package/dist/components/DateTimeRangePicker/index.d.ts.map +1 -1
- package/dist/components/DateTimeRangePicker/index.js +1 -1
- package/dist/components/DatetimeRangeInput/DatetimeRangeInput.d.ts +1 -1
- package/dist/components/DatetimeRangeInput/DatetimeRangeInput.d.ts.map +1 -1
- package/dist/components/DatetimeRangeInput/DatetimeRangeInput.js +36 -42
- package/dist/components/DatetimeRangeInput/index.d.ts +2 -2
- package/dist/components/DatetimeRangeInput/index.d.ts.map +1 -1
- package/dist/components/DatetimeRangeInput/index.js +1 -1
- package/dist/components/Footer/Footer.d.ts +1 -2
- package/dist/components/Footer/Footer.d.ts.map +1 -1
- package/dist/components/Footer/Footer.js +3 -11
- package/dist/components/Footer/index.d.ts +1 -1
- package/dist/components/Footer/index.d.ts.map +1 -1
- package/dist/components/Footer/index.js +1 -1
- package/dist/components/IpAddressInput/IpAddressInput.d.ts +1 -2
- package/dist/components/IpAddressInput/IpAddressInput.d.ts.map +1 -1
- package/dist/components/IpAddressInput/IpAddressInput.js +5 -6
- package/dist/components/IpAddressInput/index.d.ts +2 -2
- package/dist/components/IpAddressInput/index.d.ts.map +1 -1
- package/dist/components/IpAddressInput/index.js +1 -1
- package/dist/components/IpAddressSwitchableInput/IpAddressSwitchableInput.d.ts +1 -2
- package/dist/components/IpAddressSwitchableInput/IpAddressSwitchableInput.d.ts.map +1 -1
- package/dist/components/IpAddressSwitchableInput/IpAddressSwitchableInput.js +2 -1
- package/dist/components/IpAddressSwitchableInput/index.d.ts +2 -2
- package/dist/components/IpAddressSwitchableInput/index.d.ts.map +1 -1
- package/dist/components/IpAddressSwitchableInput/index.js +1 -1
- package/dist/components/LocalizedDatetimePicker/LocalizedDatetimePicker.d.ts +1 -2
- package/dist/components/LocalizedDatetimePicker/LocalizedDatetimePicker.d.ts.map +1 -1
- package/dist/components/LocalizedDatetimePicker/LocalizedDatetimePicker.js +6 -6
- package/dist/components/LocalizedDatetimePicker/index.d.ts +2 -2
- package/dist/components/LocalizedDatetimePicker/index.d.ts.map +1 -1
- package/dist/components/LocalizedDatetimePicker/index.js +1 -1
- package/dist/components/Navigation/NavMenu.d.ts +2 -2
- package/dist/components/Navigation/NavMenu.d.ts.map +1 -1
- package/dist/components/Navigation/NavMenu.js +20 -25
- package/dist/components/Navigation/Navigation.d.ts +1 -2
- package/dist/components/Navigation/Navigation.d.ts.map +1 -1
- package/dist/components/Navigation/Navigation.js +107 -139
- package/dist/components/Navigation/index.d.ts +2 -2
- package/dist/components/Navigation/index.d.ts.map +1 -1
- package/dist/components/Navigation/index.js +1 -1
- package/dist/components/NumberRangeInput/NumberRangeInput.d.ts +1 -2
- package/dist/components/NumberRangeInput/NumberRangeInput.d.ts.map +1 -1
- package/dist/components/NumberRangeInput/NumberRangeInput.js +34 -39
- package/dist/components/NumberRangeInput/index.d.ts +2 -2
- package/dist/components/NumberRangeInput/index.d.ts.map +1 -1
- package/dist/components/NumberRangeInput/index.js +1 -1
- package/dist/components/PageWrapper/PageWrapper.d.ts +1 -2
- package/dist/components/PageWrapper/PageWrapper.d.ts.map +1 -1
- package/dist/components/PageWrapper/PageWrapper.js +4 -7
- package/dist/components/PageWrapper/index.d.ts +2 -2
- package/dist/components/PageWrapper/index.d.ts.map +1 -1
- package/dist/components/PageWrapper/index.js +1 -1
- package/dist/components/RichFilterTextField/FilterHistoryMenu.d.ts +1 -2
- package/dist/components/RichFilterTextField/FilterHistoryMenu.d.ts.map +1 -1
- package/dist/components/RichFilterTextField/FilterHistoryMenu.js +17 -31
- package/dist/components/RichFilterTextField/HintOptionsMenu.d.ts +4 -4
- package/dist/components/RichFilterTextField/HintOptionsMenu.d.ts.map +1 -1
- package/dist/components/RichFilterTextField/HintOptionsMenu.js +8 -10
- package/dist/components/RichFilterTextField/RichFilterTextField.d.ts +1 -2
- package/dist/components/RichFilterTextField/RichFilterTextField.d.ts.map +1 -1
- package/dist/components/RichFilterTextField/RichFilterTextField.js +40 -47
- package/dist/components/RichFilterTextField/index.d.ts +2 -2
- package/dist/components/RichFilterTextField/index.d.ts.map +1 -1
- package/dist/components/RichFilterTextField/index.js +1 -1
- package/dist/components/RichFilterTextField/utils.d.ts.map +1 -1
- package/dist/components/RichFilterTextField/utils.js +12 -4
- package/dist/components/SmartTable/RowContent.d.ts +2 -2
- package/dist/components/SmartTable/RowContent.d.ts.map +1 -1
- package/dist/components/SmartTable/RowContent.js +29 -31
- package/dist/components/SmartTable/SmartTable.d.ts +1 -2
- package/dist/components/SmartTable/SmartTable.d.ts.map +1 -1
- package/dist/components/SmartTable/SmartTable.js +52 -77
- package/dist/components/SmartTable/TableHeader.d.ts +1 -2
- package/dist/components/SmartTable/TableHeader.d.ts.map +1 -1
- package/dist/components/SmartTable/TableHeader.js +2 -2
- package/dist/components/SmartTable/index.d.ts +2 -2
- package/dist/components/SmartTable/index.d.ts.map +1 -1
- package/dist/components/SmartTable/index.js +1 -1
- package/dist/components/SortBtn/SortBtn.d.ts +1 -2
- package/dist/components/SortBtn/SortBtn.d.ts.map +1 -1
- package/dist/components/SortBtn/SortBtn.js +3 -2
- package/dist/components/SortBtn/index.d.ts +2 -2
- package/dist/components/SortBtn/index.d.ts.map +1 -1
- package/dist/components/SortBtn/index.js +1 -1
- package/dist/components/SubtaskItem/SubtaskItem.d.ts +1 -2
- package/dist/components/SubtaskItem/SubtaskItem.d.ts.map +1 -1
- package/dist/components/SubtaskItem/SubtaskItem.js +47 -57
- package/dist/components/SubtaskItem/SubtaskItemProps.d.ts +1 -1
- package/dist/components/SubtaskItem/SubtaskItemProps.d.ts.map +1 -1
- package/dist/components/SubtaskItem/index.d.ts +2 -2
- package/dist/components/SubtaskItem/index.d.ts.map +1 -1
- package/dist/components/SubtaskItem/index.js +1 -1
- package/dist/components/TaskLoader/TaskLoader.d.ts +1 -2
- package/dist/components/TaskLoader/TaskLoader.d.ts.map +1 -1
- package/dist/components/TaskLoader/TaskLoader.js +68 -92
- package/dist/components/TaskLoader/index.d.ts +2 -2
- package/dist/components/TaskLoader/index.d.ts.map +1 -1
- package/dist/components/TaskLoader/index.js +1 -1
- package/dist/components/TaskStateDialog/TaskStateDialog.d.ts +1 -2
- package/dist/components/TaskStateDialog/TaskStateDialog.d.ts.map +1 -1
- package/dist/components/TaskStateDialog/TaskStateDialog.js +27 -44
- package/dist/components/TaskStateDialog/index.d.ts +2 -2
- package/dist/components/TaskStateDialog/index.d.ts.map +1 -1
- package/dist/components/TaskStateDialog/index.js +1 -1
- package/dist/components/icons/GenerateAndRunIcon.d.ts +1 -2
- package/dist/components/icons/GenerateAndRunIcon.d.ts.map +1 -1
- package/dist/components/icons/GenerateAndRunIcon.js +4 -24
- package/dist/components/icons/GenerateIcon.d.ts +1 -2
- package/dist/components/icons/GenerateIcon.d.ts.map +1 -1
- package/dist/components/icons/GenerateIcon.js +4 -22
- package/dist/components/icons/IntegerIcon.d.ts +1 -2
- package/dist/components/icons/IntegerIcon.d.ts.map +1 -1
- package/dist/components/icons/IntegerIcon.js +4 -10
- package/dist/components/icons/ProcessingIcon.d.ts +1 -2
- package/dist/components/icons/ProcessingIcon.d.ts.map +1 -1
- package/dist/components/icons/ProcessingIcon.js +2 -12
- package/dist/components/icons/QueueIcon.d.ts +1 -2
- package/dist/components/icons/QueueIcon.d.ts.map +1 -1
- package/dist/components/icons/QueueIcon.js +4 -10
- package/dist/components/icons/RangeIcon.d.ts +1 -2
- package/dist/components/icons/RangeIcon.d.ts.map +1 -1
- package/dist/components/icons/RangeIcon.js +4 -10
- package/dist/components/icons/RunIcon.d.ts +1 -2
- package/dist/components/icons/RunIcon.d.ts.map +1 -1
- package/dist/components/icons/RunIcon.js +4 -13
- package/dist/components/icons/TextModeIcon.d.ts.map +1 -1
- package/dist/components/icons/TextModeIcon.js +2 -6
- package/dist/components/icons/index.d.ts +1 -2
- package/dist/components/icons/index.d.ts.map +1 -1
- package/dist/components/icons/index.js +1 -2
- package/dist/index.d.ts +2 -2
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +2 -2
- package/dist/providers/AirflowProvider.d.ts +1 -1
- package/dist/providers/AirflowProvider.d.ts.map +1 -1
- package/dist/providers/AirflowProvider.js +4 -3
- package/dist/providers/DagStateProvider.d.ts +1 -1
- package/dist/providers/DagStateProvider.d.ts.map +1 -1
- package/dist/providers/DagStateProvider.js +4 -3
- package/dist/providers/SessionProvider.d.ts +1 -1
- package/dist/providers/SessionProvider.d.ts.map +1 -1
- package/dist/providers/SessionProvider.js +4 -3
- package/dist/providers/SnackBarProvider.d.ts +1 -1
- package/dist/providers/SnackBarProvider.d.ts.map +1 -1
- package/dist/providers/SnackBarProvider.js +7 -8
- package/dist/providers/index.d.ts +4 -4
- package/dist/providers/index.d.ts.map +1 -1
- package/dist/providers/index.js +4 -4
- package/package.json +18 -16
- package/dist/components/icons/TreeModeIcon.d.ts +0 -5
- package/dist/components/icons/TreeModeIcon.d.ts.map +0 -1
- package/dist/components/icons/TreeModeIcon.js +0 -8
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { jsxs as _jsxs, jsx as _jsx, Fragment as _Fragment } from "react/jsx-runtime";
|
|
1
2
|
import { CircularProgress, Stack, Typography, useTheme } from "@mui/material";
|
|
2
3
|
import FormControl from "@mui/material/FormControl";
|
|
3
4
|
import InputLabel from "@mui/material/InputLabel";
|
|
@@ -17,36 +18,29 @@ import ColumnSearchInput from "../ColumnSearchInput/ColumnSearchInput";
|
|
|
17
18
|
import SortBtn from "../SortBtn/SortBtn";
|
|
18
19
|
import RowContent from "./RowContent";
|
|
19
20
|
import TableHeader from "./TableHeader";
|
|
20
|
-
|
|
21
|
-
const Scroller = React.forwardRef((props, ref) => (React.createElement(TableContainer, { component: Paper, ...props, ref: ref, sx: {
|
|
21
|
+
const Scroller = React.forwardRef((props, ref) => (_jsxs(TableContainer, { component: Paper, ...props, ref: ref, sx: {
|
|
22
22
|
minWidth: Object(props).context.minWidth || "100%",
|
|
23
23
|
flexGrow: 1,
|
|
24
24
|
overflowX: "auto",
|
|
25
|
-
} }
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
const TableHead =
|
|
29
|
-
// eslint-disable-next-line react/display-name
|
|
30
|
-
React.forwardRef((props, ref) => (React.createElement(TableHeader, { ...props, ref: ref })));
|
|
31
|
-
const TableBodyWrapper =
|
|
32
|
-
// eslint-disable-next-line react/display-name
|
|
33
|
-
React.forwardRef((props, ref) => (React.createElement(TableBody, { ...props, ref: ref })));
|
|
25
|
+
}, children: [Object(props).children, Object(props).context.placeholder] })));
|
|
26
|
+
const TableHead = React.forwardRef((props, ref) => (_jsx(TableHeader, { ...props, ref: ref })));
|
|
27
|
+
const TableBodyWrapper = React.forwardRef((props, ref) => _jsx(TableBody, { ...props, ref: ref }));
|
|
34
28
|
const Row = (props) => {
|
|
35
29
|
const ContentWrapper = Object(props).context.ContentWrapper;
|
|
36
30
|
const selectedRow = Object(props).context.selectedRow;
|
|
37
31
|
const rowStyles = Object(props).context.rowStyles;
|
|
38
32
|
const selectable = Object(props).context.selectable;
|
|
39
|
-
return ContentWrapper ? (
|
|
33
|
+
return ContentWrapper ? (_jsx(ContentWrapper, { rowProps: {
|
|
40
34
|
selected: Object(props).item.id === selectedRow,
|
|
41
35
|
...props,
|
|
42
|
-
}, ...props })) : (
|
|
36
|
+
}, ...props })) : (_jsx(TableRow, { hover: true, sx: {
|
|
43
37
|
height: "3rem",
|
|
44
38
|
overflowY: "hidden",
|
|
45
39
|
...rowStyles,
|
|
46
40
|
cursor: selectable ? "pointer" : "default",
|
|
47
41
|
}, selected: Object(props).item.id === selectedRow, ...props }));
|
|
48
42
|
};
|
|
49
|
-
const TableWrapper = (props) => (
|
|
43
|
+
const TableWrapper = (props) => (_jsx(Table, { ...props, stickyHeader: true, sx: {
|
|
50
44
|
...Object(props).context.tableStyle,
|
|
51
45
|
minWidth: Object(props).context.minWidth || "100%",
|
|
52
46
|
} }));
|
|
@@ -65,17 +59,13 @@ export default function SmartTable({ rows, columns, pageN, numPages, perPage, lo
|
|
|
65
59
|
};
|
|
66
60
|
const hasSearchableColumns = columns.some((col) => col.searchable);
|
|
67
61
|
const hasGlobalSearch = globalSearch && globalSearchComponent;
|
|
68
|
-
const searchCols = () => columns.map((col, idx) => (
|
|
69
|
-
const headerTitleRow = (
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
ControlComponent && (React.createElement(TableCell, { sx: { ...controlComponentColSx }, scope: "col" }))));
|
|
76
|
-
const headerSearchRow = (React.createElement(TableRow, { key: 1 }, globalSearch && globalSearchComponent ? (React.createElement(TableCell, { scope: "col", colSpan: columns.length + 1 }, globalSearchComponent)) : (React.createElement(React.Fragment, null,
|
|
77
|
-
hasSearchableColumns ? searchCols() : React.createElement(React.Fragment, null),
|
|
78
|
-
ControlComponent && (React.createElement(TableCell, { sx: { ...controlComponentColSx }, scope: "col" }))))));
|
|
62
|
+
const searchCols = () => columns.map((col, idx) => (_jsx(TableCell, { scope: "col", sx: { ...col.colSx }, children: col.searchable ? ((col.SearchComponent && (_jsx(col.SearchComponent, { ...col.SearchComponentProps }))) || (_jsx(ColumnSearchInput, { field: col.fieldName, searchStr: col.searchStr, onInputSearch: onInputSearch }))) : (_jsx(_Fragment, {})) }, idx)));
|
|
63
|
+
const headerTitleRow = (_jsxs(TableRow, { children: [columns.map((col, idx) => (_jsx(TableCell, { scope: "col", sx: {
|
|
64
|
+
resize: col.resizable ? "horizontal" : "none",
|
|
65
|
+
overflowX: col.resizable ? "hidden" : "inherit",
|
|
66
|
+
...col.colSx,
|
|
67
|
+
}, children: col.sortable ? (_jsx(SortBtn, { field: col.fieldName, order: col.order || "none", onToggleSort: onToggleSort, children: col.displayName })) : (col.displayName) }, idx))), ControlComponent && (_jsx(TableCell, { sx: { ...controlComponentColSx }, scope: "col" }))] }, 0));
|
|
68
|
+
const headerSearchRow = (_jsx(TableRow, { children: globalSearch && globalSearchComponent ? (_jsx(TableCell, { scope: "col", colSpan: columns.length + 1, children: globalSearchComponent })) : (_jsxs(_Fragment, { children: [hasSearchableColumns ? searchCols() : _jsx(_Fragment, {}), ControlComponent && (_jsx(TableCell, { sx: { ...controlComponentColSx }, scope: "col" }))] })) }, 1));
|
|
79
69
|
const centerStyle = {
|
|
80
70
|
position: "absolute",
|
|
81
71
|
left: "50%",
|
|
@@ -85,17 +75,17 @@ export default function SmartTable({ rows, columns, pageN, numPages, perPage, lo
|
|
|
85
75
|
const headerRows = [headerTitleRow, headerSearchRow];
|
|
86
76
|
const placeholder = useMemo(() => {
|
|
87
77
|
if (error && rows.length === 0) {
|
|
88
|
-
return (
|
|
78
|
+
return (_jsx(Typography, { variant: "h6", color: "textSecondary", sx: centerStyle, children: "\u041D\u0435 \u0443\u0434\u0430\u043B\u043E\u0441\u044C \u043F\u043E\u043B\u0443\u0447\u0438\u0442\u044C \u0434\u0430\u043D\u043D\u044B\u0435" }));
|
|
89
79
|
}
|
|
90
80
|
if (loading) {
|
|
91
|
-
return
|
|
81
|
+
return _jsx(CircularProgress, { sx: centerStyle });
|
|
92
82
|
}
|
|
93
83
|
if (rows.length === 0) {
|
|
94
|
-
return (
|
|
84
|
+
return (_jsx(Typography, { variant: "h6", color: "textSecondary", sx: centerStyle, children: "\u041D\u0438\u0447\u0435\u0433\u043E \u043D\u0435 \u043D\u0430\u0439\u0434\u0435\u043D\u043E" }));
|
|
95
85
|
}
|
|
96
|
-
return
|
|
86
|
+
return _jsx(_Fragment, {});
|
|
97
87
|
}, [error, loading, rows.length]);
|
|
98
|
-
const fixedHeaderContent = useCallback(() =>
|
|
88
|
+
const fixedHeaderContent = useCallback(() => _jsx(Fragment, { children: hasGlobalSearch ? headerRows[0] : headerRows }), [hasGlobalSearch, headerRows]);
|
|
99
89
|
const tableContext = useMemo(() => ({
|
|
100
90
|
columns,
|
|
101
91
|
minWidth,
|
|
@@ -131,8 +121,8 @@ export default function SmartTable({ rows, columns, pageN, numPages, perPage, lo
|
|
|
131
121
|
TableBody: TableBodyWrapper,
|
|
132
122
|
// ScrollSeekPlaceholder: ScrollSeekPlaceholder,
|
|
133
123
|
};
|
|
134
|
-
const itemContent = (_index, row, context) => (
|
|
135
|
-
return (
|
|
124
|
+
const itemContent = (_index, row, context) => (_jsx(RowContent, { row: row, columns: context.columns, ControlComponent: context.ControlComponent, ControlComponentProps: context.ControlComponentProps, onDoubleClick: context.onRowDoubleClick, onSelectRow: context.selectable ? context.handleSelectRow : () => { } }, row.id));
|
|
125
|
+
return (_jsxs(Paper, { sx: {
|
|
136
126
|
height: "74vh",
|
|
137
127
|
position: "relative",
|
|
138
128
|
display: "flex",
|
|
@@ -140,49 +130,34 @@ export default function SmartTable({ rows, columns, pageN, numPages, perPage, lo
|
|
|
140
130
|
width: (width && (typeof width === "number" ? `${width}%` : width)) ||
|
|
141
131
|
"100%",
|
|
142
132
|
...sx,
|
|
143
|
-
}
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
React.createElement("div", { style: {
|
|
174
|
-
display: "flex",
|
|
175
|
-
justifyContent: "space-between",
|
|
176
|
-
alignItems: "center",
|
|
177
|
-
} },
|
|
178
|
-
React.createElement(Pagination, { count: numPages, page: pageN, onChange: (_, p) => {
|
|
179
|
-
onPageSelect(p);
|
|
180
|
-
}, showLastButton: true, showFirstButton: true, color: "primary", sx: { display: { xs: "none", md: "flex" } } }),
|
|
181
|
-
React.createElement(Pagination, { count: numPages, page: pageN, onChange: (_, p) => {
|
|
182
|
-
onPageSelect(p);
|
|
183
|
-
}, siblingCount: 0, boundaryCount: 0, color: "primary", sx: { display: { xs: "flex", md: "none" } } }),
|
|
184
|
-
disablePerPageSelector ? (React.createElement(React.Fragment, null)) : (React.createElement(FormControl, { size: "small" },
|
|
185
|
-
React.createElement(InputLabel, { id: "perPageInputLabel" }, "\u0421\u0442\u0440\u043E\u043A"),
|
|
186
|
-
React.createElement(Select, { label: "\u0421\u0442\u0440\u043E\u043A", labelId: "perPageInputLabel", value: String(perPage), autoWidth: true, onChange: (e) => onChangePerPage &&
|
|
187
|
-
onChangePerPage(Number(e.target.value)), sx: { minWidth: "2rem" } }, (perPageOptions || [5, 10, 15, 20, 25, 50, 100]).map((v, idx) => (React.createElement(MenuItem, { key: idx, value: v }, v)))))))))))));
|
|
133
|
+
}, children: [_jsxs(Stack, { direction: "column", sx: {
|
|
134
|
+
flexGrow: 1,
|
|
135
|
+
overflowX: "auto",
|
|
136
|
+
width: "100%",
|
|
137
|
+
}, children: [hasGlobalSearch && (_jsx(Table, { size: "small", className: "rulesTable", stickyHeader: true, sx: { ...tableStyle, minWidth: minWidth || "100%", height: "auto" }, children: _jsx(TableHeader, { children: headerRows[1] }) })), _jsx(Suspense, { fallback: _jsx(CircularProgress, { sx: { position: "absolute", left: "50%", top: "50%" } }), children: _jsx(TableVirtuoso, { ref: virtuosoRef, style: { height: "100%" }, totalCount: rows.length, data: rows, components: VirtuosoTableComponents, fixedHeaderContent: fixedHeaderContent, itemContent: itemContent, context: tableContext,
|
|
138
|
+
// scrollSeekConfiguration={{
|
|
139
|
+
// // Enter placeholder mode only on truly fast scroll (>150px/frame, ~keyboard=100-120)
|
|
140
|
+
// // This filters out slow mouse drags
|
|
141
|
+
// enter: (velocity) => Math.abs(velocity) > 150,
|
|
142
|
+
// // Exit when user clearly stops (velocity drops below 30)
|
|
143
|
+
// exit: (velocity) => Math.abs(velocity) < 30,
|
|
144
|
+
// }}
|
|
145
|
+
// Render only 150px above/below viewport instead of 800px
|
|
146
|
+
// This dramatically improves keyboard scroll performance
|
|
147
|
+
increaseViewportBy: { top: 200, bottom: 200 } }) })] }), _jsx(Table, { sx: { ...tableStyle, height: "auto", minWidth: minWidth || "100%" }, children: _jsx(TableFooter, { sx: {
|
|
148
|
+
bottom: "0%",
|
|
149
|
+
zIndex: 600,
|
|
150
|
+
position: "sticky",
|
|
151
|
+
backgroundColor: theme.vars?.palette.background.default ||
|
|
152
|
+
theme.palette.background.default,
|
|
153
|
+
}, children: _jsx(TableRow, { children: _jsx(TableCell, { colSpan: 11, children: _jsxs("div", { style: {
|
|
154
|
+
display: "flex",
|
|
155
|
+
justifyContent: "space-between",
|
|
156
|
+
alignItems: "center",
|
|
157
|
+
}, children: [_jsx(Pagination, { count: numPages, page: pageN, onChange: (_, p) => {
|
|
158
|
+
onPageSelect(p);
|
|
159
|
+
}, showLastButton: true, showFirstButton: true, color: "primary", sx: { display: { xs: "none", md: "flex" } } }), _jsx(Pagination, { count: numPages, page: pageN, onChange: (_, p) => {
|
|
160
|
+
onPageSelect(p);
|
|
161
|
+
}, siblingCount: 0, boundaryCount: 0, color: "primary", sx: { display: { xs: "flex", md: "none" } } }), disablePerPageSelector ? (_jsx(_Fragment, {})) : (_jsxs(FormControl, { size: "small", children: [_jsx(InputLabel, { id: "perPageInputLabel", children: "\u0421\u0442\u0440\u043E\u043A" }), _jsx(Select, { label: "\u0421\u0442\u0440\u043E\u043A", labelId: "perPageInputLabel", value: String(perPage), autoWidth: true, onChange: (e) => onChangePerPage &&
|
|
162
|
+
onChangePerPage(Number(e.target.value)), sx: { minWidth: "2rem" }, children: (perPageOptions || [5, 10, 15, 20, 25, 50, 100]).map((v, idx) => (_jsx(MenuItem, { value: v, children: v }, idx))) })] }))] }) }) }) }) })] }));
|
|
188
163
|
}
|
|
@@ -1,5 +1,4 @@
|
|
|
1
|
-
import React from "react";
|
|
2
1
|
import { TableHeadProps } from "@mui/material/TableHead";
|
|
3
|
-
declare const TableHeader: ({ ref, ...props }: TableHeadProps) =>
|
|
2
|
+
declare const TableHeader: ({ ref, ...props }: TableHeadProps) => import("react/jsx-runtime").JSX.Element;
|
|
4
3
|
export default TableHeader;
|
|
5
4
|
//# sourceMappingURL=TableHeader.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TableHeader.d.ts","sourceRoot":"","sources":["../../../src/components/SmartTable/TableHeader.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"TableHeader.d.ts","sourceRoot":"","sources":["../../../src/components/SmartTable/TableHeader.tsx"],"names":[],"mappings":"AACA,OAAkB,EAAE,cAAc,EAAE,MAAM,yBAAyB,CAAC;AAEpE,QAAA,MAAM,WAAW,GAAI,mBAAmB,cAAc,4CAiBrD,CAAC;AAEF,eAAe,WAAW,CAAC"}
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
2
|
import { useTheme } from "@mui/material";
|
|
3
3
|
import TableHead from "@mui/material/TableHead";
|
|
4
4
|
const TableHeader = ({ ref, ...props }) => {
|
|
5
5
|
const theme = useTheme();
|
|
6
|
-
return (
|
|
6
|
+
return (_jsx(TableHead, { sx: {
|
|
7
7
|
top: "0",
|
|
8
8
|
zIndex: 600,
|
|
9
9
|
position: "sticky",
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
export { default } from "./SmartTable";
|
|
2
1
|
export * from "./SmartTable";
|
|
3
|
-
export { default
|
|
2
|
+
export { default } from "./SmartTable";
|
|
4
3
|
export * from "./SmartTableProps";
|
|
4
|
+
export { type default as SmartTableProps } from "./SmartTableProps";
|
|
5
5
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/SmartTable/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,cAAc,CAAC;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/SmartTable/index.ts"],"names":[],"mappings":"AAAA,cAAc,cAAc,CAAC;AAC7B,OAAO,EAAE,OAAO,EAAE,MAAM,cAAc,CAAC;AAEvC,cAAc,mBAAmB,CAAC;AAClC,OAAO,EAAE,KAAK,OAAO,IAAI,eAAe,EAAE,MAAM,mBAAmB,CAAC"}
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import React from "react";
|
|
2
1
|
import SortBtnProps from "./SortBtnProps";
|
|
3
|
-
export default function SortBtn({ children, field, order: _order, onToggleSort, }: SortBtnProps):
|
|
2
|
+
export default function SortBtn({ children, field, order: _order, onToggleSort, }: SortBtnProps): import("react/jsx-runtime").JSX.Element;
|
|
4
3
|
//# sourceMappingURL=SortBtn.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SortBtn.d.ts","sourceRoot":"","sources":["../../../src/components/SortBtn/SortBtn.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"SortBtn.d.ts","sourceRoot":"","sources":["../../../src/components/SortBtn/SortBtn.tsx"],"names":[],"mappings":"AAEA,OAAO,YAAY,MAAM,gBAAgB,CAAC;AAE1C,MAAM,CAAC,OAAO,UAAU,OAAO,CAAC,EAC9B,QAAQ,EACR,KAAK,EACL,KAAK,EAAE,MAAM,EACb,YAAY,GACb,EAAE,YAAY,2CAgCd"}
|
|
@@ -1,5 +1,6 @@
|
|
|
1
|
-
import
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
2
|
import { TableSortLabel } from "@mui/material";
|
|
3
|
+
import { useEffect, useState } from "react";
|
|
3
4
|
export default function SortBtn({ children, field, order: _order, onToggleSort, }) {
|
|
4
5
|
const [order, setOrder] = useState(_order || "none");
|
|
5
6
|
useEffect(() => setOrder(_order), [_order]);
|
|
@@ -19,5 +20,5 @@ export default function SortBtn({ children, field, order: _order, onToggleSort,
|
|
|
19
20
|
onToggleSort(field, newOrder);
|
|
20
21
|
setOrder(newOrder);
|
|
21
22
|
}
|
|
22
|
-
return (
|
|
23
|
+
return (_jsx(TableSortLabel, { active: order !== "none", direction: order !== "none" ? order : undefined, id: "toggleSortBtn", onClick: handleToggleSort, children: children }));
|
|
23
24
|
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
export { default } from "./SortBtn";
|
|
2
1
|
export * from "./SortBtn";
|
|
3
|
-
export { default
|
|
2
|
+
export { default } from "./SortBtn";
|
|
4
3
|
export * from "./SortBtnProps";
|
|
4
|
+
export { type default as SortBtnProps } from "./SortBtnProps";
|
|
5
5
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/SortBtn/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/SortBtn/index.ts"],"names":[],"mappings":"AAAA,cAAc,WAAW,CAAC;AAC1B,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAEpC,cAAc,gBAAgB,CAAC;AAC/B,OAAO,EAAE,KAAK,OAAO,IAAI,YAAY,EAAE,MAAM,gBAAgB,CAAC"}
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import React from "react";
|
|
2
1
|
import SubtaskItemProps from "./SubtaskItemProps";
|
|
3
|
-
export default function SubtaskItem({ taskInstance, logs, expanded, onShowLogs, expandedLogContainerRef, }: SubtaskItemProps):
|
|
2
|
+
export default function SubtaskItem({ taskInstance, logs, expanded, onShowLogs, expandedLogContainerRef, }: SubtaskItemProps): import("react/jsx-runtime").JSX.Element;
|
|
4
3
|
//# sourceMappingURL=SubtaskItem.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SubtaskItem.d.ts","sourceRoot":"","sources":["../../../src/components/SubtaskItem/SubtaskItem.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"SubtaskItem.d.ts","sourceRoot":"","sources":["../../../src/components/SubtaskItem/SubtaskItem.tsx"],"names":[],"mappings":"AAeA,OAAO,gBAAgB,MAAM,oBAAoB,CAAC;AAElD,MAAM,CAAC,OAAO,UAAU,WAAW,CAAC,EAClC,YAAY,EACZ,IAAI,EACJ,QAAQ,EACR,UAAU,EACV,uBAAuB,GACxB,EAAE,gBAAgB,2CAuJlB"}
|
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { taskStateText } from "@app/utils";
|
|
1
3
|
import AccessTimeSharpIcon from "@mui/icons-material/AccessTimeSharp";
|
|
2
4
|
import BlockSharpIcon from "@mui/icons-material/BlockSharp";
|
|
3
5
|
import CheckCircleOutlineRoundedIcon from "@mui/icons-material/CheckCircleOutlineRounded";
|
|
@@ -10,8 +12,7 @@ import AccordionDetails from "@mui/material/AccordionDetails";
|
|
|
10
12
|
import AccordionSummary from "@mui/material/AccordionSummary";
|
|
11
13
|
import CircularProgress from "@mui/material/CircularProgress";
|
|
12
14
|
import moment from "moment";
|
|
13
|
-
import
|
|
14
|
-
import { taskStateText } from "../../utils";
|
|
15
|
+
import { useState } from "react";
|
|
15
16
|
export default function SubtaskItem({ taskInstance, logs, expanded, onShowLogs, expandedLogContainerRef, }) {
|
|
16
17
|
const [copyVisible, setCopyVisible] = useState(false);
|
|
17
18
|
const [copyText, setCopyText] = useState("Копировать");
|
|
@@ -19,15 +20,15 @@ export default function SubtaskItem({ taskInstance, logs, expanded, onShowLogs,
|
|
|
19
20
|
const subtaskState = (state) => {
|
|
20
21
|
switch (state) {
|
|
21
22
|
case "success":
|
|
22
|
-
return
|
|
23
|
+
return _jsx(CheckCircleOutlineRoundedIcon, { color: "success" });
|
|
23
24
|
case "failed":
|
|
24
|
-
return
|
|
25
|
+
return _jsx(ErrorOutlineSharpIcon, { color: "error" });
|
|
25
26
|
case "queued":
|
|
26
|
-
return
|
|
27
|
+
return _jsx(AccessTimeSharpIcon, {});
|
|
27
28
|
case "running":
|
|
28
|
-
return
|
|
29
|
+
return _jsx(CircularProgress, { size: 20 });
|
|
29
30
|
default:
|
|
30
|
-
return
|
|
31
|
+
return _jsx(BlockSharpIcon, {});
|
|
31
32
|
}
|
|
32
33
|
};
|
|
33
34
|
const formatEndDate = new Date(taskInstance.executionDate).toLocaleString("ru", {
|
|
@@ -45,7 +46,7 @@ export default function SubtaskItem({ taskInstance, logs, expanded, onShowLogs,
|
|
|
45
46
|
precision: 1,
|
|
46
47
|
template: "h [ч], m [мин], s [сек]",
|
|
47
48
|
});
|
|
48
|
-
return (
|
|
49
|
+
return (_jsxs(Accordion, { disableGutters: true, expanded: expanded, onChange: () => onShowLogs(taskInstance.taskId, taskInstance.tryNumber), disabled: !["running", "success", "failed"].includes(taskInstance.state || ""), sx: {
|
|
49
50
|
position: "relative",
|
|
50
51
|
}, slotProps: {
|
|
51
52
|
transition: {
|
|
@@ -58,55 +59,44 @@ export default function SubtaskItem({ taskInstance, logs, expanded, onShowLogs,
|
|
|
58
59
|
setCopyText("Копировать");
|
|
59
60
|
},
|
|
60
61
|
},
|
|
61
|
-
} },
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
if (e.ctrlKey && e.key.toLowerCase() === "a") {
|
|
86
|
-
e.preventDefault();
|
|
87
|
-
if (e.currentTarget) {
|
|
88
|
-
const range = document.createRange();
|
|
89
|
-
range.selectNodeContents(e.currentTarget);
|
|
90
|
-
const selection = window.getSelection();
|
|
91
|
-
if (selection != null) {
|
|
92
|
-
selection.removeAllRanges();
|
|
93
|
-
selection.addRange(range);
|
|
62
|
+
}, children: [_jsx(AccordionSummary, { expandIcon: _jsx(ExpandMore, {}), children: _jsxs("div", { style: { display: "flex", alignItems: "center", gap: "0.5rem" }, children: [subtaskState(taskInstance.state), _jsxs("span", { children: [taskInstance.taskId, " - ", taskStateText(taskInstance.state), taskInstance.state === "success"
|
|
63
|
+
? (formatEndDate.startsWith("вт") ? " во " : " в ") +
|
|
64
|
+
formatEndDate +
|
|
65
|
+
" за " +
|
|
66
|
+
formatTaskDuration
|
|
67
|
+
: ""] })] }) }), copyVisible && (_jsx(Chip, { label: copyText, size: "small", variant: "outlined", icon: copyText === "Скопировано" ? (_jsx(DoneIcon, { color: "success" })) : undefined, onClick: () => {
|
|
68
|
+
navigator.clipboard.writeText(logs);
|
|
69
|
+
setCopyText("Скопировано");
|
|
70
|
+
}, sx: {
|
|
71
|
+
position: "absolute",
|
|
72
|
+
bottom: "8%",
|
|
73
|
+
right: "3%",
|
|
74
|
+
opacity: "0.5",
|
|
75
|
+
} })), _jsx(AccordionDetails, { ref: expandedLogContainerRef, contentEditable: true, onKeyDown: (e) => {
|
|
76
|
+
if (e.ctrlKey && e.key.toLowerCase() === "a") {
|
|
77
|
+
e.preventDefault();
|
|
78
|
+
if (e.currentTarget) {
|
|
79
|
+
const range = document.createRange();
|
|
80
|
+
range.selectNodeContents(e.currentTarget);
|
|
81
|
+
const selection = window.getSelection();
|
|
82
|
+
if (selection != null) {
|
|
83
|
+
selection.removeAllRanges();
|
|
84
|
+
selection.addRange(range);
|
|
85
|
+
}
|
|
94
86
|
}
|
|
95
87
|
}
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
}
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
fontFamily: "consolas",
|
|
111
|
-
} }, logs.split("\n").map((line, idx) => (React.createElement("p", { key: idx, style: { margin: 0 } }, line)))))));
|
|
88
|
+
if (e.key.toLowerCase() === "backspace") {
|
|
89
|
+
e.preventDefault();
|
|
90
|
+
}
|
|
91
|
+
}, suppressContentEditableWarning: true, onBeforeInput: (e) => e.preventDefault(), onPaste: (e) => e.preventDefault(), onDrop: (e) => e.preventDefault(), sx: {
|
|
92
|
+
maxHeight: "32vh",
|
|
93
|
+
overflow: "auto",
|
|
94
|
+
}, children: _jsx("article", { style: {
|
|
95
|
+
padding: "1.5rem",
|
|
96
|
+
backgroundColor: theme.vars?.palette.background.paper ||
|
|
97
|
+
theme.palette.background.paper,
|
|
98
|
+
borderRadius: "0.5rem",
|
|
99
|
+
fontSize: "smaller",
|
|
100
|
+
fontFamily: "consolas",
|
|
101
|
+
}, children: logs.split("\n").map((line, idx) => (_jsx("p", { style: { margin: 0 }, children: line }, idx))) }) })] }));
|
|
112
102
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SubtaskItemProps.d.ts","sourceRoot":"","sources":["../../../src/components/SubtaskItem/SubtaskItemProps.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,
|
|
1
|
+
{"version":3,"file":"SubtaskItemProps.d.ts","sourceRoot":"","sources":["../../../src/components/SubtaskItem/SubtaskItemProps.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,YAAY,CAAC;AAC1C,OAAO,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAElC,MAAM,CAAC,OAAO,WAAW,gBAAgB;IACvC,YAAY,EAAE,YAAY,CAAC;IAC3B,IAAI,EAAE,MAAM,CAAC;IACb,QAAQ,EAAE,OAAO,CAAC;IAClB,uBAAuB,CAAC,EAAE,SAAS,CAAC,cAAc,GAAG,IAAI,CAAC,CAAC;IAC3D,UAAU,CAAC,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,GAAG,IAAI,CAAC;CAClD"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
export { default } from "./SubtaskItem";
|
|
2
1
|
export * from "./SubtaskItem";
|
|
3
|
-
export { default
|
|
2
|
+
export { default } from "./SubtaskItem";
|
|
4
3
|
export * from "./SubtaskItemProps";
|
|
4
|
+
export { type default as SubtaskItemProps } from "./SubtaskItemProps";
|
|
5
5
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/SubtaskItem/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,eAAe,CAAC;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/SubtaskItem/index.ts"],"names":[],"mappings":"AAAA,cAAc,eAAe,CAAC;AAC9B,OAAO,EAAE,OAAO,EAAE,MAAM,eAAe,CAAC;AAExC,cAAc,oBAAoB,CAAC;AACnC,OAAO,EAAE,KAAK,OAAO,IAAI,gBAAgB,EAAE,MAAM,oBAAoB,CAAC"}
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import React from "react";
|
|
2
1
|
import TaskLoaderProps from "./TaskLoaderProps";
|
|
3
|
-
export default function TaskLoader({ style, subTitle, onUnauthorized, }: TaskLoaderProps):
|
|
2
|
+
export default function TaskLoader({ style, subTitle, onUnauthorized, }: TaskLoaderProps): import("react/jsx-runtime").JSX.Element;
|
|
4
3
|
//# sourceMappingURL=TaskLoader.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TaskLoader.d.ts","sourceRoot":"","sources":["../../../src/components/TaskLoader/TaskLoader.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"TaskLoader.d.ts","sourceRoot":"","sources":["../../../src/components/TaskLoader/TaskLoader.tsx"],"names":[],"mappings":"AA8BA,OAAO,eAAe,MAAM,mBAAmB,CAAC;AAiBhD,MAAM,CAAC,OAAO,UAAU,UAAU,CAAC,EACjC,KAAK,EACL,QAAQ,EACR,cAAc,GACf,EAAE,eAAe,2CA4ZjB"}
|