@danikokonn/yarik-frontend-lib 2.0.58-test33 → 2.0.58-test34

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.
@@ -1 +1 @@
1
- {"version":3,"file":"RowContent.d.ts","sourceRoot":"","sources":["../../../src/components/SmartTable/RowContent.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAEzC,OAAO,EAAE,OAAO,EAAE,KAAK,EAAiC,MAAM,eAAe,CAAC;AAG9E,OAAO,EAAE,MAAM,EAAE,MAAM,aAAa,CAAC;AAErC,UAAU,eAAe,CAAC,CAAC,SAAS;IAAE,EAAE,EAAE,MAAM,CAAC;CAAE;IACjD,GAAG,EAAE,CAAC,CAAC;IACP,OAAO,EAAE,MAAM,CAAC,CAAC,CAAC,EAAE,CAAC;IACrB,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;AAUD,MAAM,CAAC,OAAO,UAAU,UAAU,CAAC,CAAC,EAAE,EACpC,GAAG,EACH,OAAO,EACP,WAAW,EACX,aAAa,EACb,gBAAgB,EAChB,qBAAqB,GACtB,EAAE,eAAe,CAAC,CAAC,GAAG;IAAE,EAAE,EAAE,MAAM,CAAC;CAAE,CAAC,qBAwEtC"}
1
+ {"version":3,"file":"RowContent.d.ts","sourceRoot":"","sources":["../../../src/components/SmartTable/RowContent.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAEzC,OAAO,EAAE,OAAO,EAAE,KAAK,EAA2C,MAAM,eAAe,CAAC;AAGxF,OAAO,EAAE,MAAM,EAAE,MAAM,aAAa,CAAC;AAErC,UAAU,eAAe,CAAC,CAAC,SAAS;IAAE,EAAE,EAAE,MAAM,CAAC;CAAE;IACjD,GAAG,EAAE,CAAC,CAAC;IACP,OAAO,EAAE,MAAM,CAAC,CAAC,CAAC,EAAE,CAAC;IACrB,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;AAUD,MAAM,CAAC,OAAO,UAAU,UAAU,CAAC,CAAC,EAAE,EACpC,GAAG,EACH,OAAO,EACP,WAAW,EACX,aAAa,EACb,gBAAgB,EAChB,qBAAqB,GACtB,EAAE,eAAe,CAAC,CAAC,GAAG;IAAE,EAAE,EAAE,MAAM,CAAC;CAAE,CAAC,qBA6EtC"}
@@ -1,5 +1,5 @@
1
1
  import React from "react";
2
- import { useColorScheme, useMediaQuery } from "@mui/material";
2
+ import { useColorScheme, useMediaQuery, useTheme } from "@mui/material";
3
3
  import TableCell from "@mui/material/TableCell";
4
4
  import { JSONTree } from 'react-json-tree';
5
5
  const hiddenTextStyle = {
@@ -10,25 +10,26 @@ const hiddenTextStyle = {
10
10
  paddingBottom: "0.25rem",
11
11
  };
12
12
  export default function RowContent({ row, columns, onSelectRow, onDoubleClick, controlComponent, controlComponentColSx, }) {
13
- const theme = {
13
+ const theme = useTheme();
14
+ const treeTheme = {
14
15
  scheme: 'google',
15
16
  author: 'seth wright (http://sethawright.com)',
16
- base00: '#1d1f21',
17
- base01: '#282a2e',
18
- base02: '#373b41',
19
- base03: '#969896',
20
- base04: '#b4b7b4',
21
- base05: '#c5c8c6',
22
- base06: '#e0e0e0',
23
- base07: '#ffffff',
24
- base08: '#CC342B',
25
- base09: '#F96A38',
26
- base0A: '#FBA922',
27
- base0B: '#198844',
28
- base0C: '#3971ED',
29
- base0D: '#3971ED',
30
- base0E: '#A36AC7',
31
- base0F: '#3971ED'
17
+ base00: theme.palette.background.default, // background
18
+ base01: theme.palette.background.paper, // lighter background
19
+ base02: "#e0e0e0", // selection (можно взять divider)
20
+ base03: theme.palette.text.disabled || "#9e9e9e",
21
+ base04: theme.palette.text.secondary,
22
+ base05: theme.palette.text.primary,
23
+ base06: "#eeeeee",
24
+ base07: "#ffffff",
25
+ base08: theme.palette.error.main,
26
+ base09: theme.palette.warning.main,
27
+ base0A: theme.palette.info.main,
28
+ base0B: theme.palette.success.main,
29
+ base0C: theme.palette.secondary.main,
30
+ base0D: theme.palette.primary.main,
31
+ base0E: theme.palette.secondary.main,
32
+ base0F: "#8d6e63" // обычно brown / deprecated
32
33
  };
33
34
  const { mode } = useColorScheme();
34
35
  const prefersDarkMode = useMediaQuery("(prefers-color-scheme: dark)");
@@ -56,7 +57,7 @@ export default function RowContent({ row, columns, onSelectRow, onDoubleClick, c
56
57
  onSelectRow(row.id);
57
58
  }, onDoubleClick: (_) => (onDoubleClick || (() => { }))(row.id) }, col.cellContentComponent
58
59
  ? col.cellContentComponent(row)
59
- : typeof Object(row)[col.name] === "object" && Object(row)[col.name] != null ? (React.createElement(JSONTree, { invertTheme: invertTheme, theme: theme, shouldExpandNodeInitially: () => false, data: Object(row)[col.name] })) : Object(row)[col.name] || "N/A"))),
60
+ : typeof Object(row)[col.name] === "object" && Object(row)[col.name] != null ? (React.createElement(JSONTree, { invertTheme: invertTheme, theme: treeTheme, shouldExpandNodeInitially: () => false, data: Object(row)[col.name] })) : Object(row)[col.name] || "N/A"))),
60
61
  controlComponent && (React.createElement(TableCell, { sx: {
61
62
  textAlign: "center",
62
63
  cursor: "default",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@danikokonn/yarik-frontend-lib",
3
- "version": "2.0.58-test33",
3
+ "version": "2.0.58-test34",
4
4
  "license": "Apache-2.0",
5
5
  "description": "",
6
6
  "author": "",