@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.
Files changed (171) hide show
  1. package/dist/components/ActionDialog/ActionDialog.d.ts +1 -2
  2. package/dist/components/ActionDialog/ActionDialog.d.ts.map +1 -1
  3. package/dist/components/ActionDialog/ActionDialog.js +7 -18
  4. package/dist/components/ActionDialog/ActionDialogProps.d.ts +1 -1
  5. package/dist/components/ActionDialog/ActionDialogProps.d.ts.map +1 -1
  6. package/dist/components/ActionDialog/index.d.ts +2 -2
  7. package/dist/components/ActionDialog/index.d.ts.map +1 -1
  8. package/dist/components/ActionDialog/index.js +1 -1
  9. package/dist/components/ColumnSearchInput/ColumnSearchInput.d.ts +1 -2
  10. package/dist/components/ColumnSearchInput/ColumnSearchInput.d.ts.map +1 -1
  11. package/dist/components/ColumnSearchInput/ColumnSearchInput.js +5 -5
  12. package/dist/components/ColumnSearchInput/index.d.ts +2 -2
  13. package/dist/components/ColumnSearchInput/index.d.ts.map +1 -1
  14. package/dist/components/ColumnSearchInput/index.js +1 -1
  15. package/dist/components/DateTimeRangePicker/DateTimeRangePicker.d.ts +2 -3
  16. package/dist/components/DateTimeRangePicker/DateTimeRangePicker.d.ts.map +1 -1
  17. package/dist/components/DateTimeRangePicker/DateTimeRangePicker.js +39 -41
  18. package/dist/components/DateTimeRangePicker/index.d.ts +2 -2
  19. package/dist/components/DateTimeRangePicker/index.d.ts.map +1 -1
  20. package/dist/components/DateTimeRangePicker/index.js +1 -1
  21. package/dist/components/DatetimeRangeInput/DatetimeRangeInput.d.ts +1 -1
  22. package/dist/components/DatetimeRangeInput/DatetimeRangeInput.d.ts.map +1 -1
  23. package/dist/components/DatetimeRangeInput/DatetimeRangeInput.js +36 -42
  24. package/dist/components/DatetimeRangeInput/index.d.ts +2 -2
  25. package/dist/components/DatetimeRangeInput/index.d.ts.map +1 -1
  26. package/dist/components/DatetimeRangeInput/index.js +1 -1
  27. package/dist/components/Footer/Footer.d.ts +1 -2
  28. package/dist/components/Footer/Footer.d.ts.map +1 -1
  29. package/dist/components/Footer/Footer.js +3 -11
  30. package/dist/components/Footer/index.d.ts +1 -1
  31. package/dist/components/Footer/index.d.ts.map +1 -1
  32. package/dist/components/Footer/index.js +1 -1
  33. package/dist/components/IpAddressInput/IpAddressInput.d.ts +1 -2
  34. package/dist/components/IpAddressInput/IpAddressInput.d.ts.map +1 -1
  35. package/dist/components/IpAddressInput/IpAddressInput.js +5 -6
  36. package/dist/components/IpAddressInput/index.d.ts +2 -2
  37. package/dist/components/IpAddressInput/index.d.ts.map +1 -1
  38. package/dist/components/IpAddressInput/index.js +1 -1
  39. package/dist/components/IpAddressSwitchableInput/IpAddressSwitchableInput.d.ts +1 -2
  40. package/dist/components/IpAddressSwitchableInput/IpAddressSwitchableInput.d.ts.map +1 -1
  41. package/dist/components/IpAddressSwitchableInput/IpAddressSwitchableInput.js +2 -1
  42. package/dist/components/IpAddressSwitchableInput/index.d.ts +2 -2
  43. package/dist/components/IpAddressSwitchableInput/index.d.ts.map +1 -1
  44. package/dist/components/IpAddressSwitchableInput/index.js +1 -1
  45. package/dist/components/LocalizedDatetimePicker/LocalizedDatetimePicker.d.ts +1 -2
  46. package/dist/components/LocalizedDatetimePicker/LocalizedDatetimePicker.d.ts.map +1 -1
  47. package/dist/components/LocalizedDatetimePicker/LocalizedDatetimePicker.js +6 -6
  48. package/dist/components/LocalizedDatetimePicker/index.d.ts +2 -2
  49. package/dist/components/LocalizedDatetimePicker/index.d.ts.map +1 -1
  50. package/dist/components/LocalizedDatetimePicker/index.js +1 -1
  51. package/dist/components/Navigation/NavMenu.d.ts +2 -2
  52. package/dist/components/Navigation/NavMenu.d.ts.map +1 -1
  53. package/dist/components/Navigation/NavMenu.js +20 -25
  54. package/dist/components/Navigation/Navigation.d.ts +1 -2
  55. package/dist/components/Navigation/Navigation.d.ts.map +1 -1
  56. package/dist/components/Navigation/Navigation.js +107 -139
  57. package/dist/components/Navigation/index.d.ts +2 -2
  58. package/dist/components/Navigation/index.d.ts.map +1 -1
  59. package/dist/components/Navigation/index.js +1 -1
  60. package/dist/components/NumberRangeInput/NumberRangeInput.d.ts +1 -2
  61. package/dist/components/NumberRangeInput/NumberRangeInput.d.ts.map +1 -1
  62. package/dist/components/NumberRangeInput/NumberRangeInput.js +34 -39
  63. package/dist/components/NumberRangeInput/index.d.ts +2 -2
  64. package/dist/components/NumberRangeInput/index.d.ts.map +1 -1
  65. package/dist/components/NumberRangeInput/index.js +1 -1
  66. package/dist/components/PageWrapper/PageWrapper.d.ts +1 -2
  67. package/dist/components/PageWrapper/PageWrapper.d.ts.map +1 -1
  68. package/dist/components/PageWrapper/PageWrapper.js +4 -7
  69. package/dist/components/PageWrapper/index.d.ts +2 -2
  70. package/dist/components/PageWrapper/index.d.ts.map +1 -1
  71. package/dist/components/PageWrapper/index.js +1 -1
  72. package/dist/components/RichFilterTextField/FilterHistoryMenu.d.ts +1 -2
  73. package/dist/components/RichFilterTextField/FilterHistoryMenu.d.ts.map +1 -1
  74. package/dist/components/RichFilterTextField/FilterHistoryMenu.js +17 -31
  75. package/dist/components/RichFilterTextField/HintOptionsMenu.d.ts +4 -4
  76. package/dist/components/RichFilterTextField/HintOptionsMenu.d.ts.map +1 -1
  77. package/dist/components/RichFilterTextField/HintOptionsMenu.js +8 -10
  78. package/dist/components/RichFilterTextField/RichFilterTextField.d.ts +1 -2
  79. package/dist/components/RichFilterTextField/RichFilterTextField.d.ts.map +1 -1
  80. package/dist/components/RichFilterTextField/RichFilterTextField.js +40 -47
  81. package/dist/components/RichFilterTextField/index.d.ts +2 -2
  82. package/dist/components/RichFilterTextField/index.d.ts.map +1 -1
  83. package/dist/components/RichFilterTextField/index.js +1 -1
  84. package/dist/components/RichFilterTextField/utils.d.ts.map +1 -1
  85. package/dist/components/RichFilterTextField/utils.js +12 -4
  86. package/dist/components/SmartTable/RowContent.d.ts +2 -2
  87. package/dist/components/SmartTable/RowContent.d.ts.map +1 -1
  88. package/dist/components/SmartTable/RowContent.js +29 -31
  89. package/dist/components/SmartTable/SmartTable.d.ts +1 -2
  90. package/dist/components/SmartTable/SmartTable.d.ts.map +1 -1
  91. package/dist/components/SmartTable/SmartTable.js +52 -77
  92. package/dist/components/SmartTable/TableHeader.d.ts +1 -2
  93. package/dist/components/SmartTable/TableHeader.d.ts.map +1 -1
  94. package/dist/components/SmartTable/TableHeader.js +2 -2
  95. package/dist/components/SmartTable/index.d.ts +2 -2
  96. package/dist/components/SmartTable/index.d.ts.map +1 -1
  97. package/dist/components/SmartTable/index.js +1 -1
  98. package/dist/components/SortBtn/SortBtn.d.ts +1 -2
  99. package/dist/components/SortBtn/SortBtn.d.ts.map +1 -1
  100. package/dist/components/SortBtn/SortBtn.js +3 -2
  101. package/dist/components/SortBtn/index.d.ts +2 -2
  102. package/dist/components/SortBtn/index.d.ts.map +1 -1
  103. package/dist/components/SortBtn/index.js +1 -1
  104. package/dist/components/SubtaskItem/SubtaskItem.d.ts +1 -2
  105. package/dist/components/SubtaskItem/SubtaskItem.d.ts.map +1 -1
  106. package/dist/components/SubtaskItem/SubtaskItem.js +47 -57
  107. package/dist/components/SubtaskItem/SubtaskItemProps.d.ts +1 -1
  108. package/dist/components/SubtaskItem/SubtaskItemProps.d.ts.map +1 -1
  109. package/dist/components/SubtaskItem/index.d.ts +2 -2
  110. package/dist/components/SubtaskItem/index.d.ts.map +1 -1
  111. package/dist/components/SubtaskItem/index.js +1 -1
  112. package/dist/components/TaskLoader/TaskLoader.d.ts +1 -2
  113. package/dist/components/TaskLoader/TaskLoader.d.ts.map +1 -1
  114. package/dist/components/TaskLoader/TaskLoader.js +68 -92
  115. package/dist/components/TaskLoader/index.d.ts +2 -2
  116. package/dist/components/TaskLoader/index.d.ts.map +1 -1
  117. package/dist/components/TaskLoader/index.js +1 -1
  118. package/dist/components/TaskStateDialog/TaskStateDialog.d.ts +1 -2
  119. package/dist/components/TaskStateDialog/TaskStateDialog.d.ts.map +1 -1
  120. package/dist/components/TaskStateDialog/TaskStateDialog.js +27 -44
  121. package/dist/components/TaskStateDialog/index.d.ts +2 -2
  122. package/dist/components/TaskStateDialog/index.d.ts.map +1 -1
  123. package/dist/components/TaskStateDialog/index.js +1 -1
  124. package/dist/components/icons/GenerateAndRunIcon.d.ts +1 -2
  125. package/dist/components/icons/GenerateAndRunIcon.d.ts.map +1 -1
  126. package/dist/components/icons/GenerateAndRunIcon.js +4 -24
  127. package/dist/components/icons/GenerateIcon.d.ts +1 -2
  128. package/dist/components/icons/GenerateIcon.d.ts.map +1 -1
  129. package/dist/components/icons/GenerateIcon.js +4 -22
  130. package/dist/components/icons/IntegerIcon.d.ts +1 -2
  131. package/dist/components/icons/IntegerIcon.d.ts.map +1 -1
  132. package/dist/components/icons/IntegerIcon.js +4 -10
  133. package/dist/components/icons/ProcessingIcon.d.ts +1 -2
  134. package/dist/components/icons/ProcessingIcon.d.ts.map +1 -1
  135. package/dist/components/icons/ProcessingIcon.js +2 -12
  136. package/dist/components/icons/QueueIcon.d.ts +1 -2
  137. package/dist/components/icons/QueueIcon.d.ts.map +1 -1
  138. package/dist/components/icons/QueueIcon.js +4 -10
  139. package/dist/components/icons/RangeIcon.d.ts +1 -2
  140. package/dist/components/icons/RangeIcon.d.ts.map +1 -1
  141. package/dist/components/icons/RangeIcon.js +4 -10
  142. package/dist/components/icons/RunIcon.d.ts +1 -2
  143. package/dist/components/icons/RunIcon.d.ts.map +1 -1
  144. package/dist/components/icons/RunIcon.js +4 -13
  145. package/dist/components/icons/TextModeIcon.d.ts.map +1 -1
  146. package/dist/components/icons/TextModeIcon.js +2 -6
  147. package/dist/components/icons/index.d.ts +1 -2
  148. package/dist/components/icons/index.d.ts.map +1 -1
  149. package/dist/components/icons/index.js +1 -2
  150. package/dist/index.d.ts +2 -2
  151. package/dist/index.d.ts.map +1 -1
  152. package/dist/index.js +2 -2
  153. package/dist/providers/AirflowProvider.d.ts +1 -1
  154. package/dist/providers/AirflowProvider.d.ts.map +1 -1
  155. package/dist/providers/AirflowProvider.js +4 -3
  156. package/dist/providers/DagStateProvider.d.ts +1 -1
  157. package/dist/providers/DagStateProvider.d.ts.map +1 -1
  158. package/dist/providers/DagStateProvider.js +4 -3
  159. package/dist/providers/SessionProvider.d.ts +1 -1
  160. package/dist/providers/SessionProvider.d.ts.map +1 -1
  161. package/dist/providers/SessionProvider.js +4 -3
  162. package/dist/providers/SnackBarProvider.d.ts +1 -1
  163. package/dist/providers/SnackBarProvider.d.ts.map +1 -1
  164. package/dist/providers/SnackBarProvider.js +7 -8
  165. package/dist/providers/index.d.ts +4 -4
  166. package/dist/providers/index.d.ts.map +1 -1
  167. package/dist/providers/index.js +4 -4
  168. package/package.json +18 -16
  169. package/dist/components/icons/TreeModeIcon.d.ts +0 -5
  170. package/dist/components/icons/TreeModeIcon.d.ts.map +0 -1
  171. 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;AAC7C,cAAc,oBAAoB,CAAC;AAEnC,OAAO,EAAE,OAAO,IAAI,qBAAqB,EAAE,MAAM,yBAAyB,CAAC;AAC3E,cAAc,yBAAyB,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,3 +1,3 @@
1
- export { default } from "./NumberRangeInput";
2
1
  export * from "./NumberRangeInput";
2
+ export { default } from "./NumberRangeInput";
3
3
  export * from "./NumberRangeInputProps";
@@ -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): React.JSX.Element;
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":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAO1B,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,qBAqBlB"}
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 React from "react";
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 (React.createElement(Stack, { direction: "column", bgcolor: theme.vars?.palette.background.default ||
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 as PageWrapperProps } from "./PageWrapperProps";
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;AACxC,cAAc,eAAe,CAAC;AAE9B,OAAO,EAAE,OAAO,IAAI,gBAAgB,EAAE,MAAM,oBAAoB,CAAC;AACjE,cAAc,oBAAoB,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,3 +1,3 @@
1
- export { default } from "./PageWrapper";
2
1
  export * from "./PageWrapper";
2
+ export { default } from "./PageWrapper";
3
3
  export * from "./PageWrapperProps";
@@ -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
- }) => React.JSX.Element;
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":"AAAA,OAAO,KAAmB,MAAM,OAAO,CAAC;AAcxC,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,sBA2DA,CAAC;AAEF,eAAe,iBAAiB,CAAC"}
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 React, { useState } from "react";
2
- import Stack from "@mui/material/Stack";
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 (React.createElement(React.Fragment, null,
16
- React.createElement(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
- } },
20
- React.createElement(FilterListIcon, null)),
21
- React.createElement(Menu, { anchorEl: searchHistMenuAnchor, open: Boolean(searchHistMenuAnchor), onClose: () => setSearchHistMenuAnchor(null), onClick: () => setSearchHistMenuAnchor(null) },
22
- React.createElement(Stack, { direction: "row", spacing: 1, sx: {
23
- px: 2,
24
- py: 1,
25
- alignItems: "center",
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 React, { MutableRefObject } from "react";
1
+ import { RefObject } from "react";
2
2
  declare const HintOptionsMenu: ({ inputAnchor, inputRef, textFieldRef, options, focusIdx, onSelectHint, onClose, }: {
3
3
  inputAnchor: Element;
4
- inputRef: MutableRefObject<HTMLTextAreaElement>;
5
- textFieldRef: MutableRefObject<HTMLDivElement>;
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
- }) => React.JSX.Element;
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":"AAAA,OAAO,KAAK,EAAE,EAAE,gBAAgB,EAAqB,MAAM,OAAO,CAAC;AAMnE,QAAA,MAAM,eAAe,GAAI,oFAQtB;IACD,WAAW,EAAE,OAAO,CAAC;IACrB,QAAQ,EAAE,gBAAgB,CAAC,mBAAmB,CAAC,CAAC;IAChD,YAAY,EAAE,gBAAgB,CAAC,cAAc,CAAC,CAAC;IAC/C,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,sBA6EA,CAAC;AAEF,eAAe,eAAe,CAAC"}
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 React, { useEffect, useRef } from "react";
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 ListItemText from "@mui/material/ListItemText";
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 menuOptions = () => options
13
- ?.entries()
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
- } }, opt[0]))));
20
- return (React.createElement(Menu, { sx: { mt: "5px" }, open: Boolean(inputAnchor), anchorEl: inputAnchor, onClose: (_e, r) => {
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 }, menuOptions()));
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) => React.JSX.Element;
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":"AAMA,OAAO,KAAqD,MAAM,OAAO,CAAC;AAI1E,OAAO,wBAAwB,MAAM,4BAA4B,CAAC;AAGlE,QAAA,MAAM,mBAAmB,GAAI,wIAS1B,wBAAwB,sBAkS1B,CAAC;AAEF,eAAe,mBAAmB,CAAC"}
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 React, { useRef, useState } from "react";
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().toArray()[focusIdx][0];
83
- insertHint(focusedHint);
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 (React.createElement(React.Fragment, null,
165
- React.createElement(TextField, { ref: textFieldRef, inputRef: inputRef, fullWidth: true, size: "small", value: search, title: search, multiline: true, maxRows: 1, onChange: (e) => {
166
- (instant ? handleChange : setSearch)(e.target.value);
167
- const newCursorPos = inputRef.current?.selectionStart ?? null;
168
- setCursorPos(newCursorPos);
169
- if (newCursorPos &&
170
- getHints(e.target.value, newCursorPos, fields, operators) !==
171
- currentHintOptions)
172
- setFocusIdx(0);
173
- }, onKeyUp: handleKeyUp, onKeyDown: handleKeyDown, slotProps: {
174
- htmlInput: {
175
- onClick: (e) => {
176
- if (Object(e).target !== Object(e).currentTarget)
177
- return;
178
- const newCursorPos = inputRef.current?.selectionStart ?? null;
179
- setCursorPos(newCursorPos);
180
- if (newCursorPos &&
181
- getHints(search, newCursorPos, fields, operators) !==
182
- currentHintOptions)
183
- setFocusIdx(0);
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
- input: {
187
- startAdornment: (React.createElement(InputAdornment, { position: "start" },
188
- React.createElement(Stack, { direction: "row", sx: { alignItems: "center" } },
189
- !instant && (React.createElement(IconButton, { onClick: (e) => {
190
- onChange(search);
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
- }, title: "\u041F\u043E\u0438\u0441\u043A" },
193
- React.createElement(SearchRoundedIcon, null))),
194
- React.createElement(FilterHistoryMenu, { searchHist: searchHist, onChange: onSelectFromHistory || handleChange, onCopy: () => enqueueSnackbar("Предустановка фильтра скопирована в буфер обмена", "default") }),
195
- additionalComponents))),
196
- endAdornment: (React.createElement(InputAdornment, { position: "end" },
197
- React.createElement(IconButton, { title: "\u041E\u0447\u0438\u0441\u0442\u0438\u0442\u044C \u0444\u0438\u043B\u044C\u0442\u0440\u044B", disabled: !search, onClick: (e) => {
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 as RichFilterTextFieldProps } from "./RichFilterTextFieldProps";
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;AAChD,cAAc,uBAAuB,CAAC;AAEtC,OAAO,EAAE,OAAO,IAAI,wBAAwB,EAAE,MAAM,4BAA4B,CAAC;AACjF,cAAc,4BAA4B,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,3 +1,3 @@
1
- export { default } from "./RichFilterTextField";
2
1
  export * from "./RichFilterTextField";
2
+ export { default } from "./RichFilterTextField";
3
3
  export * from "./RichFilterTextFieldProps";
@@ -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;AAepC,eAAO,MAAM,QAAQ,GACnB,QAAQ,MAAM,EACd,WAAW,MAAM,EACjB,QAAQ,WAAW,EAAE,EACrB,WAAW,cAAc,EAAE,oCAyE5B,CAAC;AAEF,eAAO,MAAM,cAAc,GACzB,QAAQ,MAAM,EACd,WAAW,MAAM,EACjB,MAAM,MAAM,EACZ,QAAQ,WAAW,EAAE;;;CAoFtB,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.split(":");
48
- const matchedField = getSingleMatch(`${tokenField}:`, fields);
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 getMapOf(fields.filter((v) => v.name.toLowerCase().startsWith(token.toLowerCase())));
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, _tokenOperator] = token.split(":");
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 React, { ComponentType } from "react";
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>): React.JSX.Element;
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,OAAO,KAAK,EAAE,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,qBAwF1B;wBAIwC,OAAO,UAAU;AAA1D,wBAA2D"}
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 (React.createElement(React.Fragment, null,
38
- columns.map((col, idx) => (React.createElement(TableCell, { sx: {
39
- ...hiddenTextStyle,
40
- ...col.colSx,
41
- "& > ul": {
42
- overflowX: "auto",
43
- },
44
- }, key: idx, 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 }, col.CellContentComponent ? (React.createElement(col.CellContentComponent, { ...{ row, ...col.CellContentComponentProps } })) : typeof Object(row)[col.name] === "object" &&
58
- Object(row)[col.name] != null ? (React.createElement(JSONTree
59
- /*invertTheme={invertTheme}*/ , {
60
- /*invertTheme={invertTheme}*/ theme: treeTheme, shouldExpandNodeInitially: () => false, data: Object(row)[col.name] })) : (Object(row)[col.name] || "N/A")))),
61
- ControlComponent && (React.createElement(TableCell, { sx: {
62
- textAlign: "center",
63
- cursor: "default",
64
- p: 0,
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>): React.JSX.Element;
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":"AAaA,OAAO,KAAmD,MAAM,OAAO,CAAC;AAKxE,OAAO,eAAe,MAAM,mBAAmB,CAAC;AAgFhD,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,qBAiUvB"}
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"}