@danikokonn/yarik-frontend-lib 2.0.49 → 2.0.50
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 +3 -1
- 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 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/NumberRangeInput/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,oBAAoB,CAAC;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/NumberRangeInput/index.ts"],"names":[],"mappings":"AAAA,cAAc,oBAAoB,CAAC;AACnC,OAAO,EAAE,OAAO,EAAE,MAAM,oBAAoB,CAAC;AAE7C,cAAc,yBAAyB,CAAC;AACxC,OAAO,EAAE,KAAK,OAAO,IAAI,qBAAqB,EAAE,MAAM,yBAAyB,CAAC"}
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import React from "react";
|
|
2
1
|
import PageWrapperProps from "./PageWrapperProps";
|
|
3
|
-
export default function PageWrapper({ children, version, appName, desc, ...props }: PageWrapperProps):
|
|
2
|
+
export default function PageWrapper({ children, version, appName, desc, ...props }: PageWrapperProps): import("react/jsx-runtime").JSX.Element;
|
|
4
3
|
//# sourceMappingURL=PageWrapper.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"PageWrapper.d.ts","sourceRoot":"","sources":["../../../src/components/PageWrapper/PageWrapper.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"PageWrapper.d.ts","sourceRoot":"","sources":["../../../src/components/PageWrapper/PageWrapper.tsx"],"names":[],"mappings":"AAIA,OAAO,gBAAgB,MAAM,oBAAoB,CAAC;AAElD,MAAM,CAAC,OAAO,UAAU,WAAW,CAAC,EAClC,QAAQ,EACR,OAAO,EACP,OAAO,EACP,IAAI,EACJ,GAAG,KAAK,EACT,EAAE,gBAAgB,2CAqBlB"}
|
|
@@ -1,17 +1,14 @@
|
|
|
1
|
-
import
|
|
2
|
-
import Stack from "@mui/material/Stack";
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
3
2
|
import { useTheme } from "@mui/material";
|
|
3
|
+
import Stack from "@mui/material/Stack";
|
|
4
4
|
import Footer from "../Footer/Footer";
|
|
5
5
|
import Navigation from "../Navigation/Navigation";
|
|
6
6
|
export default function PageWrapper({ children, version, appName, desc, ...props }) {
|
|
7
7
|
const theme = useTheme();
|
|
8
|
-
return (
|
|
8
|
+
return (_jsxs(Stack, { direction: "column", bgcolor: theme.vars?.palette.background.default ||
|
|
9
9
|
theme.palette.background.default, sx: {
|
|
10
10
|
justifyContent: "space-between",
|
|
11
11
|
minHeight: "100vh",
|
|
12
12
|
position: "relative",
|
|
13
|
-
} },
|
|
14
|
-
React.createElement(Navigation, { ...props }),
|
|
15
|
-
children,
|
|
16
|
-
React.createElement(Footer, { version: version, appName: appName, desc: desc })));
|
|
13
|
+
}, children: [_jsx(Navigation, { ...props }), children, _jsx(Footer, { version: version, appName: appName, desc: desc })] }));
|
|
17
14
|
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
export { default } from "./PageWrapper";
|
|
2
1
|
export * from "./PageWrapper";
|
|
3
|
-
export { default
|
|
2
|
+
export { default } from "./PageWrapper";
|
|
4
3
|
export * from "./PageWrapperProps";
|
|
4
|
+
export { type default as PageWrapperProps } from "./PageWrapperProps";
|
|
5
5
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/PageWrapper/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,eAAe,CAAC;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/PageWrapper/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,8 +1,7 @@
|
|
|
1
|
-
import React from "react";
|
|
2
1
|
declare const FilterHistoryMenu: ({ searchHist, onChange, onCopy, }: {
|
|
3
2
|
searchHist: string[];
|
|
4
3
|
onChange(text: string, idx: number): void;
|
|
5
4
|
onCopy(): void;
|
|
6
|
-
}) =>
|
|
5
|
+
}) => import("react/jsx-runtime").JSX.Element;
|
|
7
6
|
export default FilterHistoryMenu;
|
|
8
7
|
//# sourceMappingURL=FilterHistoryMenu.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"FilterHistoryMenu.d.ts","sourceRoot":"","sources":["../../../src/components/RichFilterTextField/FilterHistoryMenu.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"FilterHistoryMenu.d.ts","sourceRoot":"","sources":["../../../src/components/RichFilterTextField/FilterHistoryMenu.tsx"],"names":[],"mappings":"AAaA,QAAA,MAAM,iBAAiB,GAAI,mCAIxB;IACD,UAAU,EAAE,MAAM,EAAE,CAAC;IACrB,QAAQ,CAAC,IAAI,EAAE,MAAM,EAAE,GAAG,EAAE,MAAM,GAAG,IAAI,CAAC;IAC1C,MAAM,IAAI,IAAI,CAAC;CAChB,4CA2DA,CAAC;AAEF,eAAe,iBAAiB,CAAC"}
|
|
@@ -1,43 +1,29 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
3
|
-
import IconButton from "@mui/material/IconButton";
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
|
|
2
|
+
import ContentCopy from "@mui/icons-material/ContentCopy";
|
|
4
3
|
import FilterListIcon from "@mui/icons-material/FilterList";
|
|
5
4
|
import HistoryIcon from "@mui/icons-material/History";
|
|
6
|
-
import ContentCopy from "@mui/icons-material/ContentCopy";
|
|
7
5
|
import Divider from "@mui/material/Divider";
|
|
6
|
+
import IconButton from "@mui/material/IconButton";
|
|
8
7
|
import ListItemIcon from "@mui/material/ListItemIcon";
|
|
9
8
|
import ListItemText from "@mui/material/ListItemText";
|
|
10
9
|
import Menu from "@mui/material/Menu";
|
|
11
10
|
import MenuItem from "@mui/material/MenuItem";
|
|
11
|
+
import Stack from "@mui/material/Stack";
|
|
12
12
|
import Typography from "@mui/material/Typography";
|
|
13
|
+
import { useState } from "react";
|
|
13
14
|
const FilterHistoryMenu = ({ searchHist, onChange, onCopy, }) => {
|
|
14
15
|
const [searchHistMenuAnchor, setSearchHistMenuAnchor] = useState(null);
|
|
15
|
-
return (
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
React.createElement(HistoryIcon, null),
|
|
28
|
-
React.createElement(Typography, { variant: "h5" }, "\u0418\u0441\u0442\u043E\u0440\u0438\u044F \u043F\u043E\u043B\u044C\u0437\u043E\u0432\u0430\u0442\u0435\u043B\u044C\u0441\u043A\u0438\u0445 \u0444\u0438\u043B\u044C\u0442\u0440\u043E\u0432")),
|
|
29
|
-
React.createElement(Divider, null),
|
|
30
|
-
searchHist.map((el, idx) => (React.createElement(MenuItem, { key: idx + 1, onClick: () => onChange(el, idx), title: el },
|
|
31
|
-
React.createElement(ListItemText, { sx: { overflow: "hidden" } },
|
|
32
|
-
idx + 1,
|
|
33
|
-
". ",
|
|
34
|
-
el),
|
|
35
|
-
React.createElement(ListItemIcon, null,
|
|
36
|
-
React.createElement(IconButton, { onClick: (e) => {
|
|
37
|
-
navigator.clipboard.writeText(el);
|
|
38
|
-
e.stopPropagation();
|
|
39
|
-
onCopy();
|
|
40
|
-
} },
|
|
41
|
-
React.createElement(ContentCopy, { fontSize: "small" })))))))));
|
|
16
|
+
return (_jsxs(_Fragment, { children: [_jsx(IconButton, { color: "secondary", title: "\u041E\u0442\u043A\u0440\u044B\u0442\u044C \u0438\u0441\u0442\u043E\u0440\u0438\u044E \u0444\u0438\u043B\u044C\u0442\u0440\u043E\u0432", disabled: searchHist.length === 0, onClick: (e) => {
|
|
17
|
+
setSearchHistMenuAnchor(e.currentTarget);
|
|
18
|
+
e.stopPropagation();
|
|
19
|
+
}, children: _jsx(FilterListIcon, {}) }), _jsxs(Menu, { anchorEl: searchHistMenuAnchor, open: Boolean(searchHistMenuAnchor), onClose: () => setSearchHistMenuAnchor(null), onClick: () => setSearchHistMenuAnchor(null), children: [_jsxs(Stack, { direction: "row", spacing: 1, sx: {
|
|
20
|
+
px: 2,
|
|
21
|
+
py: 1,
|
|
22
|
+
alignItems: "center",
|
|
23
|
+
}, children: [_jsx(HistoryIcon, {}), _jsx(Typography, { variant: "h5", children: "\u0418\u0441\u0442\u043E\u0440\u0438\u044F \u043F\u043E\u043B\u044C\u0437\u043E\u0432\u0430\u0442\u0435\u043B\u044C\u0441\u043A\u0438\u0445 \u0444\u0438\u043B\u044C\u0442\u0440\u043E\u0432" })] }), _jsx(Divider, {}), searchHist.map((el, idx) => (_jsxs(MenuItem, { onClick: () => onChange(el, idx), title: el, children: [_jsxs(ListItemText, { sx: { overflow: "hidden" }, children: [idx + 1, ". ", el] }), _jsx(ListItemIcon, { children: _jsx(IconButton, { onClick: (e) => {
|
|
24
|
+
navigator.clipboard.writeText(el);
|
|
25
|
+
e.stopPropagation();
|
|
26
|
+
onCopy();
|
|
27
|
+
}, children: _jsx(ContentCopy, { fontSize: "small" }) }) })] }, idx + 1)))] })] }));
|
|
42
28
|
};
|
|
43
29
|
export default FilterHistoryMenu;
|
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
import
|
|
1
|
+
import { RefObject } from "react";
|
|
2
2
|
declare const HintOptionsMenu: ({ inputAnchor, inputRef, textFieldRef, options, focusIdx, onSelectHint, onClose, }: {
|
|
3
3
|
inputAnchor: Element;
|
|
4
|
-
inputRef:
|
|
5
|
-
textFieldRef:
|
|
4
|
+
inputRef: RefObject<HTMLTextAreaElement>;
|
|
5
|
+
textFieldRef: RefObject<HTMLDivElement>;
|
|
6
6
|
options: Map<string, string | undefined>;
|
|
7
7
|
focusIdx: number;
|
|
8
8
|
onSelectHint(hint: string): void;
|
|
9
9
|
onClose: () => void;
|
|
10
|
-
}) =>
|
|
10
|
+
}) => import("react/jsx-runtime").JSX.Element;
|
|
11
11
|
export default HintOptionsMenu;
|
|
12
12
|
//# sourceMappingURL=HintOptionsMenu.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"HintOptionsMenu.d.ts","sourceRoot":"","sources":["../../../src/components/RichFilterTextField/HintOptionsMenu.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"HintOptionsMenu.d.ts","sourceRoot":"","sources":["../../../src/components/RichFilterTextField/HintOptionsMenu.tsx"],"names":[],"mappings":"AAGA,OAAO,EAAE,SAAS,EAAqB,MAAM,OAAO,CAAC;AAErD,QAAA,MAAM,eAAe,GAAI,oFAQtB;IACD,WAAW,EAAE,OAAO,CAAC;IACrB,QAAQ,EAAE,SAAS,CAAC,mBAAmB,CAAC,CAAC;IACzC,YAAY,EAAE,SAAS,CAAC,cAAc,CAAC,CAAC;IACxC,OAAO,EAAE,GAAG,CAAC,MAAM,EAAE,MAAM,GAAG,SAAS,CAAC,CAAC;IACzC,QAAQ,EAAE,MAAM,CAAC;IACjB,YAAY,CAAC,IAAI,EAAE,MAAM,GAAG,IAAI,CAAC;IACjC,OAAO,EAAE,MAAM,IAAI,CAAC;CACrB,4CA4EA,CAAC;AAEF,eAAe,eAAe,CAAC"}
|
|
@@ -1,7 +1,8 @@
|
|
|
1
|
-
import
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
import ListItemText from "@mui/material/ListItemText";
|
|
2
3
|
import Menu from "@mui/material/Menu";
|
|
3
4
|
import MenuItem from "@mui/material/MenuItem";
|
|
4
|
-
import
|
|
5
|
+
import { useEffect, useRef } from "react";
|
|
5
6
|
const HintOptionsMenu = ({ inputAnchor, inputRef, textFieldRef, options, focusIdx, onSelectHint, onClose, }) => {
|
|
6
7
|
const focusRef = useRef(null);
|
|
7
8
|
useEffect(() => {
|
|
@@ -9,15 +10,12 @@ const HintOptionsMenu = ({ inputAnchor, inputRef, textFieldRef, options, focusId
|
|
|
9
10
|
return;
|
|
10
11
|
focusRef.current.scrollIntoView({ behavior: "smooth" });
|
|
11
12
|
}, [focusRef.current]);
|
|
12
|
-
const
|
|
13
|
-
|
|
14
|
-
.toArray()
|
|
15
|
-
.map((opt, idx) => (React.createElement(MenuItem, { key: idx + 1, onClick: () => onSelectHint(opt[0]), className: focusIdx === idx ? "Mui-focusVisible" : "", ref: focusIdx === idx ? focusRef : null },
|
|
16
|
-
React.createElement(ListItemText, { sx: { overflow: "hidden" }, secondary: opt[1], slotProps: {
|
|
13
|
+
const optsArr = Array.from(options?.entries());
|
|
14
|
+
const menuOptions = () => optsArr.map((opt, idx) => (_jsx(MenuItem, { onClick: () => onSelectHint(opt[0]), className: focusIdx === idx ? "Mui-focusVisible" : "", ref: focusIdx === idx ? focusRef : null, children: _jsx(ListItemText, { sx: { overflow: "hidden" }, secondary: opt[1], slotProps: {
|
|
17
15
|
primary: { variant: "subtitle2" },
|
|
18
16
|
secondary: { variant: "caption" },
|
|
19
|
-
}
|
|
20
|
-
return (
|
|
17
|
+
}, children: opt[0] }) }, idx + 1)));
|
|
18
|
+
return (_jsx(Menu, { sx: { mt: "5px" }, open: Boolean(inputAnchor), anchorEl: inputAnchor, onClose: (_e, r) => {
|
|
21
19
|
if (r === "escapeKeyDown")
|
|
22
20
|
onClose();
|
|
23
21
|
}, onClick: onClose, anchorOrigin: {
|
|
@@ -45,6 +43,6 @@ const HintOptionsMenu = ({ inputAnchor, inputRef, textFieldRef, options, focusId
|
|
|
45
43
|
},
|
|
46
44
|
},
|
|
47
45
|
},
|
|
48
|
-
}, onFocus: () => inputRef.current.focus(), disableAutoFocus: true, disableEnforceFocus: true, disableRestoreFocus: true
|
|
46
|
+
}, onFocus: () => inputRef.current.focus(), disableAutoFocus: true, disableEnforceFocus: true, disableRestoreFocus: true, children: menuOptions() }));
|
|
49
47
|
};
|
|
50
48
|
export default HintOptionsMenu;
|
|
@@ -1,5 +1,4 @@
|
|
|
1
|
-
import React from "react";
|
|
2
1
|
import RichFilterTextFieldProps from "./RichFilterTextFieldProps";
|
|
3
|
-
declare const RichFilterTextField: ({ filterExpr, filterExprHist: searchHist, fields, operators, additionalComponents, instant: _instant, onChange, onSelectFromHistory, }: RichFilterTextFieldProps) =>
|
|
2
|
+
declare const RichFilterTextField: ({ filterExpr, filterExprHist: searchHist, fields, operators, additionalComponents, instant: _instant, onChange, onSelectFromHistory, }: RichFilterTextFieldProps) => import("react/jsx-runtime").JSX.Element;
|
|
4
3
|
export default RichFilterTextField;
|
|
5
4
|
//# sourceMappingURL=RichFilterTextField.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"RichFilterTextField.d.ts","sourceRoot":"","sources":["../../../src/components/RichFilterTextField/RichFilterTextField.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"RichFilterTextField.d.ts","sourceRoot":"","sources":["../../../src/components/RichFilterTextField/RichFilterTextField.tsx"],"names":[],"mappings":"AAUA,OAAO,wBAAwB,MAAM,4BAA4B,CAAC;AAGlE,QAAA,MAAM,mBAAmB,GAAI,wIAS1B,wBAAwB,4CAkS1B,CAAC;AAEF,eAAe,mBAAmB,CAAC"}
|
|
@@ -1,10 +1,11 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
|
|
1
2
|
import ClearIcon from "@mui/icons-material/Clear";
|
|
2
3
|
import SearchRoundedIcon from "@mui/icons-material/SearchRounded";
|
|
3
4
|
import IconButton from "@mui/material/IconButton";
|
|
4
5
|
import InputAdornment from "@mui/material/InputAdornment";
|
|
5
6
|
import Stack from "@mui/material/Stack";
|
|
6
7
|
import TextField from "@mui/material/TextField";
|
|
7
|
-
import
|
|
8
|
+
import { useRef, useState } from "react";
|
|
8
9
|
import { useSnackbarContext } from "../../providers";
|
|
9
10
|
import FilterHistoryMenu from "./FilterHistoryMenu";
|
|
10
11
|
import HintOptionsMenu from "./HintOptionsMenu";
|
|
@@ -79,8 +80,9 @@ const RichFilterTextField = ({ filterExpr, filterExprHist: searchHist, fields, o
|
|
|
79
80
|
case "Enter": {
|
|
80
81
|
e.preventDefault();
|
|
81
82
|
if (inputAnchor) {
|
|
82
|
-
const focusedHint = currentHintOptions.entries()
|
|
83
|
-
|
|
83
|
+
const focusedHint = Array.from(currentHintOptions.entries())[focusIdx]?.[0];
|
|
84
|
+
if (focusedHint)
|
|
85
|
+
insertHint(focusedHint);
|
|
84
86
|
}
|
|
85
87
|
else {
|
|
86
88
|
onChange(search);
|
|
@@ -161,51 +163,42 @@ const RichFilterTextField = ({ filterExpr, filterExprHist: searchHist, fields, o
|
|
|
161
163
|
}
|
|
162
164
|
}
|
|
163
165
|
};
|
|
164
|
-
return (
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
166
|
+
return (_jsxs(_Fragment, { children: [_jsx(TextField, { ref: textFieldRef, inputRef: inputRef, fullWidth: true, size: "small", value: search, title: search, multiline: true, maxRows: 1, onChange: (e) => {
|
|
167
|
+
(instant ? handleChange : setSearch)(e.target.value);
|
|
168
|
+
const newCursorPos = inputRef.current?.selectionStart ?? null;
|
|
169
|
+
setCursorPos(newCursorPos);
|
|
170
|
+
if (newCursorPos &&
|
|
171
|
+
getHints(e.target.value, newCursorPos, fields, operators) !==
|
|
172
|
+
currentHintOptions)
|
|
173
|
+
setFocusIdx(0);
|
|
174
|
+
}, onKeyUp: handleKeyUp, onKeyDown: handleKeyDown, slotProps: {
|
|
175
|
+
htmlInput: {
|
|
176
|
+
onClick: (e) => {
|
|
177
|
+
if (Object(e).target !== Object(e).currentTarget)
|
|
178
|
+
return;
|
|
179
|
+
const newCursorPos = inputRef.current?.selectionStart ?? null;
|
|
180
|
+
setCursorPos(newCursorPos);
|
|
181
|
+
if (newCursorPos &&
|
|
182
|
+
getHints(search, newCursorPos, fields, operators) !==
|
|
183
|
+
currentHintOptions)
|
|
184
|
+
setFocusIdx(0);
|
|
185
|
+
},
|
|
184
186
|
},
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
187
|
+
input: {
|
|
188
|
+
startAdornment: (_jsx(InputAdornment, { position: "start", children: _jsxs(Stack, { direction: "row", sx: { alignItems: "center" }, children: [!instant && (_jsx(IconButton, { onClick: (e) => {
|
|
189
|
+
onChange(search);
|
|
190
|
+
e.stopPropagation();
|
|
191
|
+
}, title: "\u041F\u043E\u0438\u0441\u043A", children: _jsx(SearchRoundedIcon, {}) })), _jsx(FilterHistoryMenu, { searchHist: searchHist, onChange: onSelectFromHistory || handleChange, onCopy: () => enqueueSnackbar("Предустановка фильтра скопирована в буфер обмена", "default") }), additionalComponents] }) })),
|
|
192
|
+
endAdornment: (_jsx(InputAdornment, { position: "end", children: _jsx(IconButton, { title: "\u041E\u0447\u0438\u0441\u0442\u0438\u0442\u044C \u0444\u0438\u043B\u044C\u0442\u0440\u044B", disabled: !search, onClick: (e) => {
|
|
193
|
+
handleChange("");
|
|
194
|
+
setCursorPos(null);
|
|
195
|
+
setFocusIdx(0);
|
|
191
196
|
e.stopPropagation();
|
|
192
|
-
},
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
handleChange("");
|
|
199
|
-
setCursorPos(null);
|
|
200
|
-
setFocusIdx(0);
|
|
201
|
-
e.stopPropagation();
|
|
202
|
-
} },
|
|
203
|
-
React.createElement(ClearIcon, null)))),
|
|
204
|
-
},
|
|
205
|
-
} }),
|
|
206
|
-
React.createElement(HintOptionsMenu, { inputAnchor: inputAnchor, inputRef: inputRef, textFieldRef: textFieldRef, options: currentHintOptions, focusIdx: focusIdx, onSelectHint: insertHint, onClose: () => {
|
|
207
|
-
setCursorPos(null);
|
|
208
|
-
setFocusIdx(0);
|
|
209
|
-
} })));
|
|
197
|
+
}, children: _jsx(ClearIcon, {}) }) })),
|
|
198
|
+
},
|
|
199
|
+
} }), _jsx(HintOptionsMenu, { inputAnchor: inputAnchor, inputRef: inputRef, textFieldRef: textFieldRef, options: currentHintOptions, focusIdx: focusIdx, onSelectHint: insertHint, onClose: () => {
|
|
200
|
+
setCursorPos(null);
|
|
201
|
+
setFocusIdx(0);
|
|
202
|
+
} })] }));
|
|
210
203
|
};
|
|
211
204
|
export default RichFilterTextField;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
export { default } from "./RichFilterTextField";
|
|
2
1
|
export * from "./RichFilterTextField";
|
|
3
|
-
export { default
|
|
2
|
+
export { default } from "./RichFilterTextField";
|
|
4
3
|
export * from "./RichFilterTextFieldProps";
|
|
4
|
+
export { type default as RichFilterTextFieldProps } from "./RichFilterTextFieldProps";
|
|
5
5
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/RichFilterTextField/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,uBAAuB,CAAC;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/RichFilterTextField/index.ts"],"names":[],"mappings":"AAAA,cAAc,uBAAuB,CAAC;AACtC,OAAO,EAAE,OAAO,EAAE,MAAM,uBAAuB,CAAC;AAEhD,cAAc,4BAA4B,CAAC;AAC3C,OAAO,EAAE,KAAK,OAAO,IAAI,wBAAwB,EAAE,MAAM,4BAA4B,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../../../src/components/RichFilterTextField/utils.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,WAAW,EACX,cAAc,EAEf,MAAM,4BAA4B,CAAC;
|
|
1
|
+
{"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../../../src/components/RichFilterTextField/utils.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,WAAW,EACX,cAAc,EAEf,MAAM,4BAA4B,CAAC;AAgBpC,eAAO,MAAM,QAAQ,GACnB,QAAQ,MAAM,EACd,WAAW,MAAM,EACjB,QAAQ,WAAW,EAAE,EACrB,WAAW,cAAc,EAAE,oCA+E5B,CAAC;AAEF,eAAO,MAAM,cAAc,GACzB,QAAQ,MAAM,EACd,WAAW,MAAM,EACjB,MAAM,MAAM,EACZ,QAAQ,WAAW,EAAE;;;CAoFtB,CAAC"}
|
|
@@ -1,4 +1,6 @@
|
|
|
1
1
|
const getSingleMatch = (token, fields) => {
|
|
2
|
+
if (!token)
|
|
3
|
+
return undefined;
|
|
2
4
|
const matchedFields = fields.filter((v) => v.name.toLowerCase().startsWith(token.toLowerCase()));
|
|
3
5
|
if (matchedFields.length !== 1)
|
|
4
6
|
return undefined;
|
|
@@ -44,15 +46,21 @@ export const getHints = (search, cursorPos, fields, operators) => {
|
|
|
44
46
|
if (typeof charAfter === "undefined" || charAfter === " ") {
|
|
45
47
|
const tokensBeforeCursor = search.substring(0, cursorPos).split(" ");
|
|
46
48
|
const token = tokensBeforeCursor[tokensBeforeCursor.length - 1];
|
|
47
|
-
const [tokenField, tokenOperator] = token
|
|
48
|
-
|
|
49
|
+
const [tokenField, tokenOperator] = token
|
|
50
|
+
? token.split(":")
|
|
51
|
+
: [undefined, undefined];
|
|
52
|
+
const matchedField = tokenField
|
|
53
|
+
? getSingleMatch(`${tokenField}:`, fields)
|
|
54
|
+
: undefined;
|
|
49
55
|
const fieldHasValues = Boolean(matchedField?.values);
|
|
50
56
|
const validToken = Boolean(tokenOperator &&
|
|
51
57
|
operators.find((v) => v.name === tokenOperator) != null);
|
|
52
58
|
if (fieldHasValues && validToken) {
|
|
53
59
|
return getMapOf(matchedField?.values || []);
|
|
54
60
|
}
|
|
55
|
-
return
|
|
61
|
+
return token
|
|
62
|
+
? getMapOf(fields.filter((v) => v.name.toLowerCase().startsWith(token.toLowerCase())))
|
|
63
|
+
: new Map();
|
|
56
64
|
}
|
|
57
65
|
}
|
|
58
66
|
}
|
|
@@ -68,7 +76,7 @@ export const insertInStrPos = (search, cursorPos, hint, fields) => {
|
|
|
68
76
|
const charBefore = search[cursorPos - 1];
|
|
69
77
|
const tokensBeforeCursor = search.substring(0, cursorPos).split(" ");
|
|
70
78
|
const token = tokensBeforeCursor[tokensBeforeCursor.length - 1];
|
|
71
|
-
const [tokenField
|
|
79
|
+
const [tokenField] = token ? token.split(":") : [undefined, undefined];
|
|
72
80
|
const matchedField = getSingleMatch(tokenField, fields);
|
|
73
81
|
switch (charBefore) {
|
|
74
82
|
case " ":
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { SxProps, Theme } from "@mui/material";
|
|
2
|
-
import
|
|
2
|
+
import { ComponentType } from "react";
|
|
3
3
|
import { Column } from "../../types";
|
|
4
4
|
interface RowContentProps<T extends {
|
|
5
5
|
id: string | number;
|
|
@@ -28,7 +28,7 @@ declare function RowContent<T extends {
|
|
|
28
28
|
row: T;
|
|
29
29
|
}, S extends {
|
|
30
30
|
row: T;
|
|
31
|
-
}>({ row, columns, onSelectRow, onDoubleClick, ControlComponent, ControlComponentProps, controlComponentColSx, }: RowContentProps<T, P, S>):
|
|
31
|
+
}>({ row, columns, onSelectRow, onDoubleClick, ControlComponent, ControlComponentProps, controlComponentColSx, }: RowContentProps<T, P, S>): import("react/jsx-runtime").JSX.Element;
|
|
32
32
|
declare const _default: typeof RowContent;
|
|
33
33
|
export default _default;
|
|
34
34
|
//# sourceMappingURL=RowContent.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"RowContent.d.ts","sourceRoot":"","sources":["../../../src/components/SmartTable/RowContent.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,KAAK,EAAY,MAAM,eAAe,CAAC;AAEzD,
|
|
1
|
+
{"version":3,"file":"RowContent.d.ts","sourceRoot":"","sources":["../../../src/components/SmartTable/RowContent.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,KAAK,EAAY,MAAM,eAAe,CAAC;AAEzD,OAAc,EAAE,aAAa,EAAE,MAAM,OAAO,CAAC;AAE7C,OAAO,EAAE,MAAM,EAAE,MAAM,aAAa,CAAC;AAErC,UAAU,eAAe,CACvB,CAAC,SAAS;IAAE,EAAE,EAAE,MAAM,GAAG,MAAM,CAAA;CAAE,GAAG;IAAE,EAAE,EAAE,MAAM,GAAG,MAAM,CAAA;CAAE,EAC3D,CAAC,SAAS;IAAE,GAAG,EAAE,CAAC,CAAA;CAAE,GAAG;IAAE,GAAG,EAAE,CAAC,CAAA;CAAE,EACjC,CAAC,SAAS;IAAE,GAAG,EAAE,CAAC,CAAA;CAAE,GAAG;IAAE,GAAG,EAAE,CAAC,CAAA;CAAE;IAEjC,GAAG,EAAE,CAAC,CAAC;IACP,OAAO,EAAE,MAAM,CAAC,CAAC,EAAE,CAAC,CAAC,EAAE,CAAC;IACxB,aAAa,CAAC,CAAC,KAAK,EAAE,MAAM,GAAG,MAAM,GAAG,IAAI,GAAG,IAAI,CAAC;IACpD,WAAW,CAAC,KAAK,EAAE,MAAM,GAAG,MAAM,GAAG,IAAI,GAAG,IAAI,CAAC;IACjD,gBAAgB,CAAC,EAAE,aAAa,CAAC,CAAC,CAAC,CAAC;IACpC,qBAAqB,CAAC,EAAE,IAAI,CAAC,CAAC,EAAE,KAAK,CAAC,CAAC;IACvC,qBAAqB,CAAC,EAAE,OAAO,CAAC,KAAK,CAAC,CAAC;CACxC;AAUD,iBAAS,UAAU,CACjB,CAAC,SAAS;IAAE,EAAE,EAAE,MAAM,GAAG,MAAM,CAAA;CAAE,EACjC,CAAC,SAAS;IAAE,GAAG,EAAE,CAAC,CAAA;CAAE,EACpB,CAAC,SAAS;IAAE,GAAG,EAAE,CAAC,CAAA;CAAE,EACpB,EACA,GAAG,EACH,OAAO,EACP,WAAW,EACX,aAAa,EACb,gBAAgB,EAChB,qBAAqB,EAErB,qBAAqB,GACtB,EAAE,eAAe,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,CAAC,2CAwF1B;wBAIwC,OAAO,UAAU;AAA1D,wBAA2D"}
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-runtime";
|
|
1
2
|
import { useTheme } from "@mui/material";
|
|
2
3
|
import TableCell from "@mui/material/TableCell";
|
|
3
4
|
import React from "react";
|
|
@@ -34,37 +35,34 @@ function RowContent({ row, columns, onSelectRow, onDoubleClick, ControlComponent
|
|
|
34
35
|
base0E: theme.vars?.palette.secondary.main || theme.palette.secondary.main,
|
|
35
36
|
base0F: "#8d6e63", // обычно brown / deprecated
|
|
36
37
|
};
|
|
37
|
-
return (
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
},
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
}
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
...controlComponentColSx,
|
|
66
|
-
} },
|
|
67
|
-
React.createElement(ControlComponent, { ...{ row, ...ControlComponentProps } })))));
|
|
38
|
+
return (_jsxs(_Fragment, { children: [columns.map((col, idx) => (_jsx(TableCell, { sx: {
|
|
39
|
+
...hiddenTextStyle,
|
|
40
|
+
...col.colSx,
|
|
41
|
+
"& > ul": {
|
|
42
|
+
overflowX: "auto",
|
|
43
|
+
},
|
|
44
|
+
}, onClick: (e) => {
|
|
45
|
+
if (typeof col.onClick !== "undefined") {
|
|
46
|
+
if (e.target === e.currentTarget)
|
|
47
|
+
col.onClick(row);
|
|
48
|
+
}
|
|
49
|
+
else {
|
|
50
|
+
const selection = window.getSelection();
|
|
51
|
+
if (selection && selection.toString().length > 0)
|
|
52
|
+
return;
|
|
53
|
+
onSelectRow(Object(row).id);
|
|
54
|
+
}
|
|
55
|
+
}, onDoubleClick: typeof onDoubleClick !== "undefined"
|
|
56
|
+
? (_) => onDoubleClick(Object(row).id)
|
|
57
|
+
: undefined, children: col.CellContentComponent ? (_jsx(col.CellContentComponent, { ...{ row, ...col.CellContentComponentProps } })) : typeof Object(row)[col.name] === "object" &&
|
|
58
|
+
Object(row)[col.name] != null ? (_jsx(JSONTree
|
|
59
|
+
/*invertTheme={invertTheme}*/ , {
|
|
60
|
+
/*invertTheme={invertTheme}*/ theme: treeTheme, shouldExpandNodeInitially: () => false, data: Object(row)[col.name] })) : (Object(row)[col.name] || "N/A") }, idx))), ControlComponent && (_jsx(TableCell, { sx: {
|
|
61
|
+
textAlign: "center",
|
|
62
|
+
cursor: "default",
|
|
63
|
+
p: 0,
|
|
64
|
+
...controlComponentColSx,
|
|
65
|
+
}, children: _jsx(ControlComponent, { ...{ row, ...ControlComponentProps } }) }))] }));
|
|
68
66
|
}
|
|
69
67
|
// Memoize to prevent re-renders when row/columns/props haven't changed
|
|
70
68
|
// This is critical for scroll performance with heavy cellContentComponent renders
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import React from "react";
|
|
2
1
|
import SmartTableProps from "./SmartTableProps";
|
|
3
2
|
export default function SmartTable<T extends {
|
|
4
3
|
id: string | number;
|
|
@@ -8,5 +7,5 @@ export default function SmartTable<T extends {
|
|
|
8
7
|
row: T;
|
|
9
8
|
} = {
|
|
10
9
|
row: T;
|
|
11
|
-
}>({ rows, columns, pageN, numPages, perPage, loading, minWidth, width, rowStyles, selectable, selectedRow, sx, disablePerPageSelector, globalSearch, columnAutoWidth, error, globalSearchComponent, ContentWrapper, ControlComponent, ControlComponentProps, virtuosoRef, controlComponentColSx, perPageOptions, onToggleSort, onInputSearch, onPageSelect, onChangePerPage, onSelectRow, onRowDoubleClick, }: SmartTableProps<T, P>):
|
|
10
|
+
}>({ rows, columns, pageN, numPages, perPage, loading, minWidth, width, rowStyles, selectable, selectedRow, sx, disablePerPageSelector, globalSearch, columnAutoWidth, error, globalSearchComponent, ContentWrapper, ControlComponent, ControlComponentProps, virtuosoRef, controlComponentColSx, perPageOptions, onToggleSort, onInputSearch, onPageSelect, onChangePerPage, onSelectRow, onRowDoubleClick, }: SmartTableProps<T, P>): import("react/jsx-runtime").JSX.Element;
|
|
12
11
|
//# sourceMappingURL=SmartTable.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SmartTable.d.ts","sourceRoot":"","sources":["../../../src/components/SmartTable/SmartTable.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"SmartTable.d.ts","sourceRoot":"","sources":["../../../src/components/SmartTable/SmartTable.tsx"],"names":[],"mappings":"AAkBA,OAAO,eAAe,MAAM,mBAAmB,CAAC;AA2EhD,MAAM,CAAC,OAAO,UAAU,UAAU,CAChC,CAAC,SAAS;IAAE,EAAE,EAAE,MAAM,GAAG,MAAM,CAAA;CAAE,GAAG;IAAE,EAAE,EAAE,MAAM,GAAG,MAAM,CAAA;CAAE,EAC3D,CAAC,SAAS;IAAE,GAAG,EAAE,CAAC,CAAA;CAAE,GAAG;IAAE,GAAG,EAAE,CAAC,CAAA;CAAE,EACjC,EACA,IAAI,EACJ,OAAO,EACP,KAAK,EACL,QAAQ,EACR,OAAO,EACP,OAAO,EACP,QAAQ,EACR,KAAK,EACL,SAAS,EACT,UAAU,EACV,WAAW,EACX,EAAE,EACF,sBAAsB,EACtB,YAAY,EACZ,eAAe,EACf,KAAK,EACL,qBAAqB,EACrB,cAAc,EACd,gBAAgB,EAChB,qBAAqB,EACrB,WAAW,EACX,qBAAqB,EACrB,cAAc,EACd,YAAY,EACZ,aAAa,EACb,YAAY,EACZ,eAAe,EACf,WAAW,EACX,gBAAgB,GACjB,EAAE,eAAe,CAAC,CAAC,EAAE,CAAC,CAAC,2CAiUvB"}
|