@danikokonn/yarik-frontend-lib 2.0.5-test2 → 2.0.5-test4
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/Navigation/Navigation.d.ts.map +1 -1
- package/dist/components/Navigation/Navigation.js +1 -1
- package/dist/components/SmartTable/RuleRow.d.ts +1 -1
- package/dist/components/SmartTable/RuleRow.d.ts.map +1 -1
- package/dist/components/SmartTable/RuleRow.js +15 -7
- package/package.json +3 -3
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Navigation.d.ts","sourceRoot":"","sources":["../../../src/components/Navigation/Navigation.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAoB,MAAM,OAAO,CAAC;AA4BzC,OAAO,eAAe,MAAM,mBAAmB,CAAC;AAGhD,MAAM,CAAC,OAAO,UAAU,UAAU,CAAC,EACjC,kBAAkB,EAClB,QAAQ,EACR,KAAK,EACL,QAAQ,EACR,aAAa,EACb,UAAU,EACV,OAAO,EACP,UAAU,EACV,SAAS,EACT,eAAe,GAChB,EAAE,eAAe,
|
|
1
|
+
{"version":3,"file":"Navigation.d.ts","sourceRoot":"","sources":["../../../src/components/Navigation/Navigation.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAoB,MAAM,OAAO,CAAC;AA4BzC,OAAO,eAAe,MAAM,mBAAmB,CAAC;AAGhD,MAAM,CAAC,OAAO,UAAU,UAAU,CAAC,EACjC,kBAAkB,EAClB,QAAQ,EACR,KAAK,EACL,QAAQ,EACR,aAAa,EACb,UAAU,EACV,OAAO,EACP,UAAU,EACV,SAAS,EACT,eAAe,GAChB,EAAE,eAAe,qBA6VjB"}
|
|
@@ -184,7 +184,7 @@ export default function Navigation({ additionalControls, username, title, navLin
|
|
|
184
184
|
React.createElement(ListItemIcon, null,
|
|
185
185
|
React.createElement(HubIcon, { fontSize: "small" })),
|
|
186
186
|
React.createElement(ListItemText, null, "\u041F\u0440\u0438\u043B\u043E\u0436\u0435\u043D\u0438\u044F"))),
|
|
187
|
-
React.createElement(MenuItem, { href: logoutPageUrl, component: "a" },
|
|
187
|
+
React.createElement(MenuItem, { to: withReactRouter ? logoutPageUrl : undefined, href: withReactRouter ? undefined : logoutPageUrl, component: withReactRouter ? RouterLink : "a" },
|
|
188
188
|
React.createElement(ListItemIcon, null,
|
|
189
189
|
React.createElement(LogoutIcon, { fontSize: "small" })),
|
|
190
190
|
React.createElement(ListItemText, null, "\u0412\u044B\u0439\u0442\u0438 \u0438\u0437 \u0441\u0438\u0441\u0442\u0435\u043C\u044B"))))))));
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import React, { ReactNode } from "react";
|
|
2
|
+
import { SxProps, Theme } from "@mui/material";
|
|
2
3
|
import { TableRowProps } from "@mui/material/TableRow";
|
|
3
4
|
import { Column } from "../../types";
|
|
4
|
-
import { SxProps, Theme } from "@mui/material";
|
|
5
5
|
interface RowProps<T> {
|
|
6
6
|
row: T;
|
|
7
7
|
columns: Column<T>[];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"RuleRow.d.ts","sourceRoot":"","sources":["../../../src/components/SmartTable/RuleRow.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;
|
|
1
|
+
{"version":3,"file":"RuleRow.d.ts","sourceRoot":"","sources":["../../../src/components/SmartTable/RuleRow.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAEzC,OAAO,EAAE,OAAO,EAAE,KAAK,EAAE,MAAM,eAAe,CAAC;AAE/C,OAAiB,EAAE,aAAa,EAAE,MAAM,wBAAwB,CAAC;AACjE,OAAO,EAAE,MAAM,EAAE,MAAM,aAAa,CAAC;AAErC,UAAU,QAAQ,CAAC,CAAC;IAClB,GAAG,EAAE,CAAC,CAAC;IACP,OAAO,EAAE,MAAM,CAAC,CAAC,CAAC,EAAE,CAAC;IACrB,EAAE,CAAC,EAAE,OAAO,CAAC,KAAK,CAAC,CAAC;IACpB,WAAW,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAC5B,cAAc,CAAC,CAAC,EACd,QAAQ,EACR,KAAK,EACL,QAAQ,GACT,EAAE;QACD,QAAQ,CAAC,EAAE,SAAS,CAAC;QACrB,KAAK,EAAE,MAAM,CAAC;QACd,QAAQ,EAAE,aAAa,CAAC;KACzB,GAAG,KAAK,CAAC,GAAG,CAAC,OAAO,CAAC;IACtB,aAAa,CAAC,CAAC,KAAK,EAAE,MAAM,GAAG,IAAI,GAAG,IAAI,CAAC;IAC3C,WAAW,CAAC,KAAK,EAAE,MAAM,GAAG,IAAI,GAAG,IAAI,CAAC;IACxC,gBAAgB,CAAC,CAAC,GAAG,EAAE,CAAC,GAAG,SAAS,CAAC;IACrC,qBAAqB,CAAC,EAAE,OAAO,CAAC,KAAK,CAAC,CAAC;CACxC;AAwDD,MAAM,CAAC,OAAO,UAAU,OAAO,CAAC,CAAC,EAAE,EACjC,GAAG,EACH,OAAO,EACP,EAAE,EACF,WAAW,EACX,WAAW,EACX,aAAa,EACb,gBAAgB,EAChB,cAAc,EACd,qBAAqB,GACtB,EAAE,QAAQ,CAAC,CAAC,CAAC,qBA8Cb"}
|
|
@@ -12,18 +12,26 @@ function RowContent({ row, columns, onSelectRow, onDoubleClick, }) {
|
|
|
12
12
|
return (React.createElement(React.Fragment, null, columns.map((col, idx) => (React.createElement(TableCell, { sx: {
|
|
13
13
|
...hiddenTextStyle,
|
|
14
14
|
...col.colSx,
|
|
15
|
-
}, key: idx, onClick: (
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
15
|
+
}, key: idx, onClick: (e) => {
|
|
16
|
+
if (typeof col.onClick !== "undefined") {
|
|
17
|
+
if (e.target === e.currentTarget)
|
|
18
|
+
col.onClick(row);
|
|
19
|
+
}
|
|
20
|
+
else {
|
|
21
|
+
const selection = window.getSelection();
|
|
22
|
+
if (selection && selection.toString().length > 0)
|
|
23
|
+
return;
|
|
24
|
+
onSelectRow(Object(row).id);
|
|
25
|
+
}
|
|
26
|
+
}, onDoubleClick: typeof onDoubleClick !== "undefined"
|
|
27
|
+
? (_) => onDoubleClick(Object(row).id)
|
|
28
|
+
: undefined }, col.cellContentComponent
|
|
21
29
|
? col.cellContentComponent(row)
|
|
22
30
|
: Object(row)[col.name] || "N/A")))));
|
|
23
31
|
}
|
|
24
32
|
export default function RuleRow({ row, columns, sx, selectedRow, onSelectRow, onDoubleClick, controlComponent, ContentWrapper, controlComponentColSx, }) {
|
|
25
33
|
const content = (React.createElement(React.Fragment, null,
|
|
26
|
-
React.createElement(RowContent, { onSelectRow: onSelectRow, onDoubleClick: onDoubleClick
|
|
34
|
+
React.createElement(RowContent, { onSelectRow: onSelectRow, onDoubleClick: onDoubleClick, row: row, columns: columns }),
|
|
27
35
|
controlComponent && (React.createElement(TableCell, { sx: {
|
|
28
36
|
textAlign: "center",
|
|
29
37
|
cursor: "default",
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@danikokonn/yarik-frontend-lib",
|
|
3
|
-
"version": "2.0.5-
|
|
3
|
+
"version": "2.0.5-test4",
|
|
4
4
|
"license": "Apache-2.0",
|
|
5
5
|
"description": "",
|
|
6
6
|
"author": "",
|
|
@@ -32,8 +32,8 @@
|
|
|
32
32
|
"dependencies": {
|
|
33
33
|
"@emotion/react": "^11.14.0",
|
|
34
34
|
"@emotion/styled": "^11.14.1",
|
|
35
|
-
"@mui/icons-material": "^7.3.
|
|
36
|
-
"@mui/material": "^7.3.
|
|
35
|
+
"@mui/icons-material": "^7.3.4",
|
|
36
|
+
"@mui/material": "^7.3.4",
|
|
37
37
|
"@mui/x-date-pickers": "^8.11.1",
|
|
38
38
|
"css-loader": "^7.1.2",
|
|
39
39
|
"moment": "^2.30.1",
|