@danikokonn/yarik-frontend-lib 2.0.49-test15 → 2.0.49-test16
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.js +3 -3
- package/dist/components/SmartTable/SmartTable.d.ts.map +1 -1
- package/dist/components/SmartTable/SmartTable.js +1 -3
- package/dist/providers/SnackBarProvider.d.ts.map +1 -1
- package/dist/providers/SnackBarProvider.js +0 -17
- package/package.json +1 -1
|
@@ -23,7 +23,7 @@ import { Button, useColorScheme, useMediaQuery } from "@mui/material";
|
|
|
23
23
|
import { popoverClasses } from "@mui/material/Popover";
|
|
24
24
|
import NavMenu from "./NavMenu";
|
|
25
25
|
export default function Navigation({ additionalControls, username, title, navLinks, logoutPageUrl, defautlUrl, appsUrl, profileUrl, activeTab, withReactRouter, }) {
|
|
26
|
-
const locationRouter = useLocation();
|
|
26
|
+
const locationRouter = withReactRouter ? useLocation() : undefined;
|
|
27
27
|
const { mode, setMode } = useColorScheme();
|
|
28
28
|
const prefersDarkMode = useMediaQuery("(prefers-color-scheme: dark)");
|
|
29
29
|
const [anchorElNav, setAnchorElNav] = React.useState(null);
|
|
@@ -41,11 +41,11 @@ export default function Navigation({ additionalControls, username, title, navLin
|
|
|
41
41
|
const getPages = (sx, anchorOrigin, transformOrigin, endIcon) => {
|
|
42
42
|
return navLinks.map((lnk, idx) => {
|
|
43
43
|
if ("groupName" in lnk) {
|
|
44
|
-
return (React.createElement(NavMenu, { key: idx, name: lnk.groupName, routes: lnk.links, activeTab: withReactRouter ? locationRouter
|
|
44
|
+
return (React.createElement(NavMenu, { key: idx, name: lnk.groupName, routes: lnk.links, activeTab: (withReactRouter ? locationRouter?.pathname : activeTab) || "", sx: sx, anchorOrigin: anchorOrigin, transformOrigin: transformOrigin, endIcon: endIcon }));
|
|
45
45
|
}
|
|
46
46
|
else {
|
|
47
47
|
return (React.createElement(Button, { component: withReactRouter ? RouterLink : "button", disabled: lnk.url ===
|
|
48
|
-
(withReactRouter ? locationRouter
|
|
48
|
+
(withReactRouter ? locationRouter?.pathname : activeTab), to: withReactRouter ? lnk.url : undefined, href: withReactRouter ? undefined : lnk.url, key: idx, sx: sx, color: "inherit", variant: "text" }, lnk.name));
|
|
49
49
|
}
|
|
50
50
|
});
|
|
51
51
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SmartTable.d.ts","sourceRoot":"","sources":["../../../src/components/SmartTable/SmartTable.tsx"],"names":[],"mappings":"AAAA,OAAO,KAA6B,MAAM,OAAO,CAAC;AA2BlD,OAAO,eAAe,MAAM,mBAAmB,CAAC;
|
|
1
|
+
{"version":3,"file":"SmartTable.d.ts","sourceRoot":"","sources":["../../../src/components/SmartTable/SmartTable.tsx"],"names":[],"mappings":"AAAA,OAAO,KAA6B,MAAM,OAAO,CAAC;AA2BlD,OAAO,eAAe,MAAM,mBAAmB,CAAC;AAgHhD,MAAM,CAAC,OAAO,UAAU,UAAU,CAAC,CAAC,SAAS;IAAE,EAAE,EAAE,MAAM,GAAG,MAAM,CAAA;CAAE,EAAE,EACpE,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,WAAW,EACX,gBAAgB,EAAE,gBAAgB,EAClC,YAAY,EACZ,aAAa,EACb,YAAY,EACZ,eAAe,EACf,qBAAqB,EACrB,cAAc,GACf,EAAE,eAAe,CAAC,CAAC,CAAC,qBA4TpB"}
|
|
@@ -51,9 +51,7 @@ const TableWrapper = (props) => (React.createElement(Table, { ...props, stickyHe
|
|
|
51
51
|
minWidth: Object(props).context.minWidth || "100%",
|
|
52
52
|
} }));
|
|
53
53
|
const ItemContent = (_index, row, context) => (React.createElement(RowContent, { key: row.id, row: row, columns: Object(context).columns, controlComponent: Object(context).ControlComponent, onDoubleClick: Object(context).onRowDoubleClick, onSelectRow: Object(context).selectable ? Object(context).handleSelectRow : () => { } }));
|
|
54
|
-
const ScrollSeekPlaceholder = (props) => (
|
|
55
|
-
// eslint-disable-next-line react/prop-types
|
|
56
|
-
React.createElement(TableRow, { sx: { height: Object(props).height } }, Object(props).context.columns.map((col, i) => (React.createElement(TableCell, { sx: {
|
|
54
|
+
const ScrollSeekPlaceholder = (props) => (React.createElement(TableRow, { sx: { height: Object(props).height } }, Object(props).context.columns.map((col, i) => (React.createElement(TableCell, { sx: {
|
|
57
55
|
paddingTop: "0.25rem",
|
|
58
56
|
paddingBottom: "0.25rem",
|
|
59
57
|
py: 0,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SnackBarProvider.d.ts","sourceRoot":"","sources":["../../src/providers/SnackBarProvider.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAoC,MAAM,OAAO,CAAC;AAezD,UAAU,aAAa;IACrB,QAAQ,CAAC,EAAE,KAAK,CAAC,SAAS,GAAG,KAAK,CAAC,SAAS,EAAE,CAAC;CAChD;
|
|
1
|
+
{"version":3,"file":"SnackBarProvider.d.ts","sourceRoot":"","sources":["../../src/providers/SnackBarProvider.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAoC,MAAM,OAAO,CAAC;AAezD,UAAU,aAAa;IACrB,QAAQ,CAAC,EAAE,KAAK,CAAC,SAAS,GAAG,KAAK,CAAC,SAAS,EAAE,CAAC;CAChD;AA8CD,QAAA,MAAM,gBAAgB,GAAI,cAAc,aAAa,sBAMpD,CAAC;AAEF,eAAO,MAAM,kBAAkB;6BA/DlB,MAAM,WACN,SAAS,GAAG,OAAO,GAAG,SAAS,GAAG,SAAS,GAAG,MAAM,GAC5D,IAAI;CA+DR,CAAC;AAEF,eAAe,gBAAgB,CAAC"}
|
|
@@ -5,15 +5,6 @@ const SnackBarContext = createContext({
|
|
|
5
5
|
enqueueSnackbar: () => { },
|
|
6
6
|
});
|
|
7
7
|
const SnackBarProviderUtilities = ({ children }) => {
|
|
8
|
-
// Debug: log which React copy is used and what children contains at runtime
|
|
9
|
-
try {
|
|
10
|
-
const R = React;
|
|
11
|
-
console.log("SnackBarProviderUtilities mounted. React.version:", R.version, "children (raw):", children, "isValidElement:", R.isValidElement?.(children));
|
|
12
|
-
}
|
|
13
|
-
catch (e) {
|
|
14
|
-
// swallow any unexpected logging errors
|
|
15
|
-
console.log("SnackBarProviderUtilities debug log failed:", e);
|
|
16
|
-
}
|
|
17
8
|
const { enqueueSnackbar, closeSnackbar } = useSnackbar();
|
|
18
9
|
const action = (snackbarId) => (React.createElement(React.Fragment, null,
|
|
19
10
|
React.createElement(Button, { size: "small", variant: "text", color: "inherit", onClick: () => {
|
|
@@ -35,14 +26,6 @@ const SnackBarProviderUtilities = ({ children }) => {
|
|
|
35
26
|
} }, children));
|
|
36
27
|
};
|
|
37
28
|
const SnackBarProvider = ({ children }) => {
|
|
38
|
-
// Debug: log which React copy is used and what children contains at render time
|
|
39
|
-
try {
|
|
40
|
-
const R = React;
|
|
41
|
-
console.log("SnackBarProvider render. React.version:", R.version, "children (raw):", children, "isValidElement:", R.isValidElement?.(children));
|
|
42
|
-
}
|
|
43
|
-
catch (e) {
|
|
44
|
-
console.log("SnackBarProvider debug log failed:", e);
|
|
45
|
-
}
|
|
46
29
|
return (React.createElement(SnackbarProvider, { maxSnack: 5, autoHideDuration: 5000, preventDuplicate: true },
|
|
47
30
|
React.createElement(SnackBarProviderUtilities, null, children)));
|
|
48
31
|
};
|