@dexteel/mesf-core 7.15.0 → 7.15.2

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,3 +1,3 @@
1
1
  {
2
- ".": "7.15.0"
2
+ ".": "7.15.2"
3
3
  }
package/CHANGELOG.md CHANGED
@@ -1,5 +1,19 @@
1
1
  # Changelog
2
2
 
3
+ ## [7.15.2](https://github.com/dexteel/mesf-core-frontend/compare/@dexteel/mesf-core-v7.15.1...@dexteel/mesf-core-v7.15.2) (2026-03-06)
4
+
5
+
6
+ ### Bug Fixes
7
+
8
+ * **Context Menu:** Fix zIndex to show it above modals. ([7e9b905](https://github.com/dexteel/mesf-core-frontend/commit/7e9b9051079cfe3bd6e193713bc89c524ed5b10d))
9
+
10
+ ## [7.15.1](https://github.com/dexteel/mesf-core-frontend/compare/@dexteel/mesf-core-v7.15.0...@dexteel/mesf-core-v7.15.1) (2026-03-04)
11
+
12
+
13
+ ### Bug Fixes
14
+
15
+ * **Poll for updates:** add snackbar to mesf-core-frontend ([#615](https://github.com/dexteel/mesf-core-frontend/issues/615)) ([1c9f355](https://github.com/dexteel/mesf-core-frontend/commit/1c9f355fa362140f3b644a8a2585e99b10317b96))
16
+
3
17
  ## [7.15.0](https://github.com/dexteel/mesf-core-frontend/compare/@dexteel/mesf-core-v7.14.0...@dexteel/mesf-core-v7.15.0) (2026-03-04)
4
18
 
5
19
 
@@ -14,6 +14,9 @@ interface Props {
14
14
  plantAssetId?: number;
15
15
  theme?: any;
16
16
  logbookSettings?: Partial<LogbookSettingsState>;
17
+ enableFrontendVersionCheck?: boolean;
18
+ frontendVersionCheckIntervalMs?: number;
19
+ frontendVersionEndpoint?: string;
17
20
  }
18
- declare function MESFMain({ authentication, routes, navbar, navbarTitle, configurations, showAreaSelector, showTrendingsV2Icon, byPassHeaderRoutes, plantAssetId, theme, logbookSettings, }: Props): React.JSX.Element;
21
+ declare function MESFMain({ authentication, routes, navbar, navbarTitle, configurations, showAreaSelector, showTrendingsV2Icon, byPassHeaderRoutes, plantAssetId, theme, logbookSettings, enableFrontendVersionCheck, frontendVersionCheckIntervalMs, frontendVersionEndpoint, }: Props): React.JSX.Element;
19
22
  export { MESFMain };
package/dist/index.esm.js CHANGED
@@ -269,7 +269,7 @@ const ContextMenu$1 = ({ show, position, options }) => {
269
269
  width: "auto",
270
270
  height: "auto",
271
271
  margin: "0",
272
- zIndex: 1,
272
+ zIndex: (theme) => theme.zIndex.modal + 1,
273
273
  listStyle: "none",
274
274
  boxShadow: "0 0 20px 0 #ccc",
275
275
  "& .MuiMenuItem-root": {
@@ -15458,7 +15458,14 @@ const queryClient = new QueryClient({
15458
15458
  },
15459
15459
  },
15460
15460
  });
15461
- function MESFMain({ authentication, routes, navbar, navbarTitle = "MESF", configurations, showAreaSelector = false, showTrendingsV2Icon = true, byPassHeaderRoutes = [], plantAssetId = 1, theme = themeMESF, logbookSettings = {}, }) {
15461
+ function MESFMain({ authentication, routes, navbar, navbarTitle = "MESF", configurations, showAreaSelector = false, showTrendingsV2Icon = true, byPassHeaderRoutes = [], plantAssetId = 1, theme = themeMESF, logbookSettings = {}, enableFrontendVersionCheck = true, frontendVersionCheckIntervalMs = 60000, frontendVersionEndpoint = "/frontend/version", }) {
15462
+ const [isVersionMessageDismissed, setIsVersionMessageDismissed] = useState(false);
15463
+ const { isUpdateAvailable } = useFrontendVersionCheck({
15464
+ enabled: enableFrontendVersionCheck,
15465
+ intervalMs: frontendVersionCheckIntervalMs,
15466
+ endpoint: frontendVersionEndpoint,
15467
+ });
15468
+ const showVersionAlert = isUpdateAvailable && !isVersionMessageDismissed;
15462
15469
  return (React__default.createElement(React__default.Fragment, null,
15463
15470
  React__default.createElement(CssBaseline, null),
15464
15471
  React__default.createElement(StyledEngineProvider, { injectFirst: true },
@@ -15481,7 +15488,14 @@ function MESFMain({ authentication, routes, navbar, navbarTitle = "MESF", config
15481
15488
  React__default.createElement(BrowserRouter, { basename: base },
15482
15489
  React__default.createElement(Routes, null,
15483
15490
  React__default.createElement(Route, { path: "/logout", element: React__default.createElement(Logout, null) })),
15484
- React__default.createElement(Navigation, { showAreaSelector: showAreaSelector, navbarTitle: navbarTitle, byPassHeaderRoutes: byPassHeaderRoutes, showTrendingsV2Icon: showTrendingsV2Icon })))))))))))))))))))));
15491
+ React__default.createElement(Navigation, { showAreaSelector: showAreaSelector, navbarTitle: navbarTitle, byPassHeaderRoutes: byPassHeaderRoutes, showTrendingsV2Icon: showTrendingsV2Icon }))))))))))))))))))),
15492
+ React__default.createElement(Snackbar, { open: showVersionAlert, onClose: (_, reason) => {
15493
+ if (reason === "clickaway") {
15494
+ return;
15495
+ }
15496
+ setIsVersionMessageDismissed(true);
15497
+ }, anchorOrigin: { vertical: "bottom", horizontal: "center" } },
15498
+ React__default.createElement(Alert$1, { severity: "info", action: React__default.createElement(Button, { color: "inherit", size: "small", onClick: () => window.location.reload() }, "Reload") }, "There is a new version. Please reload the page."))));
15485
15499
  }
15486
15500
 
15487
15501
  const ExcelButton = ({ handleExportToExcel, disabled }) => {