Remove leafcutter and related packages

This commit is contained in:
Darren Clarke 2025-11-09 12:48:12 +01:00
parent 48165db6a2
commit 3a1063e40e
264 changed files with 1763 additions and 25062 deletions

View file

@ -4,11 +4,9 @@ import { FC, PropsWithChildren } from "react";
import { CssBaseline } from "@mui/material";
import { CookiesProvider } from "react-cookie";
import { SessionProvider } from "next-auth/react";
import { I18n } from "react-polyglot";
import { AdapterDateFns } from "@mui/x-date-pickers-pro/AdapterDateFnsV3";
import { LocalizationProvider } from "@mui/x-date-pickers-pro";
import { LicenseInfo } from "@mui/x-license";
import { locales, LeafcutterProvider } from "@link-stack/leafcutter-ui";
import { ZammadLoginProvider } from "./ZammadLoginProvider";
LicenseInfo.setLicenseKey(
@ -16,18 +14,13 @@ LicenseInfo.setLicenseKey(
);
export const MultiProvider: FC<PropsWithChildren> = ({ children }) => {
const messages: any = { en: locales.en, fr: locales.fr };
const locale = "en";
return (
<SessionProvider basePath="/link/api/auth">
<CssBaseline />
<ZammadLoginProvider>
<CookiesProvider>
<LocalizationProvider dateAdapter={AdapterDateFns}>
<I18n locale={locale} messages={messages[locale]}>
<LeafcutterProvider>{children}</LeafcutterProvider>
</I18n>
{children}
</LocalizationProvider>
</CookiesProvider>
</ZammadLoginProvider>

View file

@ -0,0 +1,44 @@
"use client";
import { FC } from "react";
import Iframe from "react-iframe";
import { Box } from "@mui/material";
interface OpenSearchWrapperProps {
url: string;
margin?: number;
}
export const OpenSearchWrapper: FC<OpenSearchWrapperProps> = ({
url,
margin = 50,
}) => (
<Box sx={{ position: "relative", marginTop: "-100px" }}>
<Box
sx={{
width: "100%",
height: "100px",
marginTop: "-20px",
backgroundColor: "white",
zIndex: 100,
position: "relative",
}}
/>
<Box
sx={{
marginTop: `-${margin}px`,
zIndex: 1,
position: "relative",
height: `calc(100vh + ${margin}px)`,
}}
>
<Iframe
id="opensearch"
url={`/link/dashboards/${url}`}
width="100%"
height="100%"
frameBorder={0}
/>
</Box>
</Box>
);