@connectif/ui-components 2.0.14 → 2.0.16

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.
@@ -2,5 +2,5 @@ type Props = {
2
2
  children: string;
3
3
  block?: boolean;
4
4
  };
5
- declare const KatexRenderer: ({ children, block }: Props) => string | import("react/jsx-runtime").JSX.Element;
5
+ declare const KatexRenderer: ({ children, block }: Props) => import("react/jsx-runtime").JSX.Element;
6
6
  export default KatexRenderer;
@@ -4,8 +4,12 @@ type MarkdownContainerProps = {
4
4
  color: string;
5
5
  backgroundColor?: string;
6
6
  variant?: TypographyVariant;
7
+ /**
8
+ * Class Name to append to container
9
+ */
10
+ className?: string;
7
11
  };
8
- declare const MarkdownRenderer: ({ text, ...rest }: MarkdownContainerProps & {
12
+ declare const MarkdownRenderer: ({ text, className, ...rest }: MarkdownContainerProps & {
9
13
  text: string;
10
14
  }) => import("react/jsx-runtime").JSX.Element;
11
15
  export default MarkdownRenderer;
package/dist/index.js CHANGED
@@ -24232,13 +24232,14 @@ var Loader = ({
24232
24232
  var Loader_default = Loader;
24233
24233
 
24234
24234
  // src/components/markdown/MarkdownRenderer.tsx
24235
+ import React76 from "react";
24235
24236
  import Markdown from "markdown-to-jsx";
24236
24237
  import { styled as styled8 } from "@mui/material/styles";
24237
24238
  import "katex/dist/katex.min.css";
24238
24239
 
24239
24240
  // src/components/markdown/KatexRenderer.tsx
24240
24241
  import katex from "katex";
24241
- import { jsx as jsx136 } from "react/jsx-runtime";
24242
+ import { jsx as jsx136, jsxs as jsxs69 } from "react/jsx-runtime";
24242
24243
  var KatexRenderer = ({ children, block }) => {
24243
24244
  try {
24244
24245
  const html2 = katex.renderToString(children, {
@@ -24247,7 +24248,10 @@ var KatexRenderer = ({ children, block }) => {
24247
24248
  });
24248
24249
  return /* @__PURE__ */ jsx136("span", { dangerouslySetInnerHTML: { __html: html2 } });
24249
24250
  } catch (err) {
24250
- return `<pre style="color:red">KaTeX error: ${err.message}</pre>`;
24251
+ return /* @__PURE__ */ jsxs69("pre", { style: { color: "red" }, children: [
24252
+ "KaTeX error: $",
24253
+ err.message
24254
+ ] });
24251
24255
  }
24252
24256
  };
24253
24257
  var KatexRenderer_default = KatexRenderer;
@@ -24260,24 +24264,17 @@ var MarkdownContainer = styled8("div")(
24260
24264
  backgroundColor: backgroundColor2,
24261
24265
  borderRadius: "8px",
24262
24266
  overflowWrap: "break-word",
24263
- "& h1, & h2, & h3": {
24264
- color: color2
24265
- },
24267
+ "& h1, & h2, & h3": { color: color2 },
24266
24268
  "& h1": { fontSize: "1.75rem" },
24267
24269
  "& h2": { fontSize: "1.5rem" },
24268
24270
  "& h3": { fontSize: "1.25rem" },
24269
- "& p": {
24270
- ...variants[variant || "body2"],
24271
- margin: "0.5em 0"
24272
- },
24271
+ "& p": { ...variants[variant || "body2"], margin: "0.5em 0" },
24273
24272
  "& ul, & ol": {
24274
24273
  ...variants[variant || "body2"],
24275
24274
  paddingLeft: "1.5em",
24276
24275
  margin: "0.5em 0"
24277
24276
  },
24278
- "& li": {
24279
- marginBottom: "0.25em"
24280
- },
24277
+ "& li": { marginBottom: "0.25em" },
24281
24278
  "& code": {
24282
24279
  background: grey800,
24283
24280
  padding: "2px 6px",
@@ -24286,11 +24283,7 @@ var MarkdownContainer = styled8("div")(
24286
24283
  fontSize: "0.9em",
24287
24284
  color: white
24288
24285
  },
24289
- "& pre code": {
24290
- display: "block",
24291
- padding: "12px",
24292
- overflowX: "auto"
24293
- },
24286
+ "& pre code": { display: "block", padding: "12px", overflowX: "auto" },
24294
24287
  "& table": {
24295
24288
  width: "100%",
24296
24289
  borderCollapse: "collapse",
@@ -24301,37 +24294,38 @@ var MarkdownContainer = styled8("div")(
24301
24294
  padding: "8px",
24302
24295
  textAlign: "left"
24303
24296
  },
24304
- "& th": {
24305
- backgroundColor: grey900,
24306
- color: white
24307
- },
24308
- "& a": {
24309
- color: primary200,
24310
- textDecoration: "none"
24311
- },
24312
- "& a:hover": {
24313
- textDecoration: "underline"
24314
- }
24297
+ "& th": { backgroundColor: grey900, color: white },
24298
+ "& a": { color: primary200, textDecoration: "none" },
24299
+ "& a:hover": { textDecoration: "underline" }
24315
24300
  })
24316
24301
  );
24302
+ var normalizeLatexDelimiters = (s) => {
24303
+ if (!s) {
24304
+ return s;
24305
+ }
24306
+ s = s.replace(/\\\\?\[([\s\S]*?)\\\\?\]/g, (_, inner) => `$$${inner}$$`);
24307
+ s = s.replace(/\\\\?\(([\s\S]*?)\\\\?\)/g, (_, inner) => `$${inner}$`);
24308
+ return s;
24309
+ };
24317
24310
  var renderWithMath = (text) => {
24318
24311
  const parts = [];
24319
- const regex = /\$\$([\s\S]+?)\$\$|\$([\s\S]+?)\$/g;
24312
+ const regex = /\$\$([\s\S]+?)\$\$|\$(?!\$)([\s\S]+?)\$/g;
24320
24313
  let lastIndex = 0;
24321
24314
  let match;
24322
24315
  while ((match = regex.exec(text)) !== null) {
24323
- const [full, blockExpr, inlineExpr] = match;
24324
24316
  const start = match.index;
24325
24317
  if (start > lastIndex) {
24326
24318
  parts.push(text.slice(lastIndex, start));
24327
24319
  }
24328
- if (blockExpr) {
24320
+ const block = match[1];
24321
+ const inline = match[2];
24322
+ if (block !== void 0) {
24329
24323
  parts.push(
24330
- /* @__PURE__ */ jsx137(KatexRenderer_default, { block: true, children: blockExpr.trim() }, start)
24324
+ /* @__PURE__ */ jsx137(KatexRenderer_default, { block: true, children: block.trim() }, start)
24331
24325
  );
24332
- } else if (inlineExpr) {
24326
+ } else if (inline !== void 0) {
24333
24327
  parts.push(
24334
- /* @__PURE__ */ jsx137(KatexRenderer_default, { children: inlineExpr.trim() }, start)
24328
+ /* @__PURE__ */ jsx137(KatexRenderer_default, { children: inline.trim() }, start)
24335
24329
  );
24336
24330
  }
24337
24331
  lastIndex = regex.lastIndex;
@@ -24341,33 +24335,66 @@ var renderWithMath = (text) => {
24341
24335
  }
24342
24336
  return parts;
24343
24337
  };
24338
+ var renderChildrenWithMath = (children) => React76.Children.map(children, (child) => {
24339
+ if (typeof child === "string") {
24340
+ return renderWithMath(child);
24341
+ }
24342
+ if (React76.isValidElement(child)) {
24343
+ return React76.cloneElement(child, {
24344
+ ...child.props,
24345
+ children: renderChildrenWithMath(child.props.children)
24346
+ });
24347
+ }
24348
+ return child;
24349
+ });
24350
+ var CodeOrMath = ({ children, ...props }) => {
24351
+ const raw = Array.isArray(children) ? children.map((c) => typeof c === "string" ? c : "").join("") : typeof children === "string" ? children : "";
24352
+ const s = raw.trim();
24353
+ const fullMath = /^\$\$([\s\S]+)\$\$$|^\$(?!\$)([\s\S]+)\$$/;
24354
+ const m = s.match(fullMath);
24355
+ if (m) {
24356
+ const expr = m[1] || m[2] || "";
24357
+ const isBlock = Boolean(m[1]);
24358
+ return /* @__PURE__ */ jsx137(KatexRenderer_default, { block: isBlock, children: expr.trim() });
24359
+ }
24360
+ const maybe = renderWithMath(s);
24361
+ const onlyText = maybe.length === 1 && typeof maybe[0] === "string";
24362
+ return onlyText ? /* @__PURE__ */ jsx137("code", { ...props, children }) : /* @__PURE__ */ jsx137("span", { children: maybe });
24363
+ };
24344
24364
  var MarkdownRenderer = ({
24345
24365
  text,
24366
+ className,
24346
24367
  ...rest
24347
- }) => /* @__PURE__ */ jsx137(MarkdownContainer, { ...rest, children: /* @__PURE__ */ jsx137(
24348
- Markdown,
24349
- {
24350
- options: {
24351
- forceBlock: true,
24352
- overrides: {
24353
- p: {
24354
- component: ({ children, ...props }) => {
24355
- const rawText = Array.isArray(children) ? children.map(
24356
- (child) => typeof child === "string" ? child : ""
24357
- ).join("") : typeof children === "string" ? children : "";
24358
- return /* @__PURE__ */ jsx137("p", { ...props, children: renderWithMath(rawText) });
24359
- }
24368
+ }) => {
24369
+ const normalized = normalizeLatexDelimiters(text || "");
24370
+ return /* @__PURE__ */ jsx137(
24371
+ MarkdownContainer,
24372
+ {
24373
+ className: `markdown-container ${className || ""}`,
24374
+ ...rest,
24375
+ children: /* @__PURE__ */ jsx137(
24376
+ Markdown,
24377
+ {
24378
+ options: {
24379
+ forceBlock: true,
24380
+ overrides: {
24381
+ p: {
24382
+ component: ({ children, ...props }) => /* @__PURE__ */ jsx137("p", { ...props, children: renderChildrenWithMath(children) })
24383
+ },
24384
+ code: { component: CodeOrMath }
24385
+ }
24386
+ },
24387
+ children: normalized
24360
24388
  }
24361
- }
24362
- },
24363
- children: text
24364
- }
24365
- ) });
24389
+ )
24390
+ }
24391
+ );
24392
+ };
24366
24393
  var MarkdownRenderer_default = MarkdownRenderer;
24367
24394
 
24368
24395
  // src/components/navbar/Navbar.tsx
24369
24396
  import { Drawer as Drawer2 } from "@mui/material";
24370
- import { Fragment as Fragment32, jsx as jsx138, jsxs as jsxs69 } from "react/jsx-runtime";
24397
+ import { Fragment as Fragment32, jsx as jsx138, jsxs as jsxs70 } from "react/jsx-runtime";
24371
24398
  var Navbar = ({
24372
24399
  topContent,
24373
24400
  bottomContent,
@@ -24375,8 +24402,8 @@ var Navbar = ({
24375
24402
  drawerBottomContent,
24376
24403
  onClose,
24377
24404
  isDrawerOpen = false
24378
- }) => /* @__PURE__ */ jsxs69(Fragment32, { children: [
24379
- /* @__PURE__ */ jsxs69(
24405
+ }) => /* @__PURE__ */ jsxs70(Fragment32, { children: [
24406
+ /* @__PURE__ */ jsxs70(
24380
24407
  Box_default,
24381
24408
  {
24382
24409
  sx: {
@@ -24396,7 +24423,7 @@ var Navbar = ({
24396
24423
  ]
24397
24424
  }
24398
24425
  ),
24399
- /* @__PURE__ */ jsxs69(
24426
+ /* @__PURE__ */ jsxs70(
24400
24427
  Drawer2,
24401
24428
  {
24402
24429
  open: isDrawerOpen,
@@ -24428,10 +24455,10 @@ var Navbar = ({
24428
24455
  var Navbar_default = Navbar;
24429
24456
 
24430
24457
  // src/components/navbar/NavbarButton.tsx
24431
- import * as React76 from "react";
24458
+ import * as React77 from "react";
24432
24459
  import { Box as Box6, ButtonBase as ButtonBase2 } from "@mui/material";
24433
- import { jsx as jsx139, jsxs as jsxs70 } from "react/jsx-runtime";
24434
- var NavbarButton = React76.forwardRef(
24460
+ import { jsx as jsx139, jsxs as jsxs71 } from "react/jsx-runtime";
24461
+ var NavbarButton = React77.forwardRef(
24435
24462
  function NavbarButton2({
24436
24463
  iconId,
24437
24464
  srcUrl,
@@ -24445,7 +24472,7 @@ var NavbarButton = React76.forwardRef(
24445
24472
  if (!highlighted) {
24446
24473
  return element;
24447
24474
  }
24448
- return /* @__PURE__ */ jsxs70(
24475
+ return /* @__PURE__ */ jsxs71(
24449
24476
  Box6,
24450
24477
  {
24451
24478
  sx: {
@@ -24486,7 +24513,7 @@ var NavbarButton = React76.forwardRef(
24486
24513
  }
24487
24514
  );
24488
24515
  };
24489
- return /* @__PURE__ */ jsxs70(
24516
+ return /* @__PURE__ */ jsxs71(
24490
24517
  ButtonBase2,
24491
24518
  {
24492
24519
  className: "NavbarButton-root",
@@ -24573,10 +24600,10 @@ var NavbarHeader = ({ text }) => /* @__PURE__ */ jsx140(
24573
24600
  var NavbarHeader_default = NavbarHeader;
24574
24601
 
24575
24602
  // src/components/navbar/NavbarLogo.tsx
24576
- import * as React77 from "react";
24603
+ import * as React78 from "react";
24577
24604
  import { ButtonBase as ButtonBase3 } from "@mui/material";
24578
24605
  import { jsx as jsx141 } from "react/jsx-runtime";
24579
- var NavbarLogo = React77.forwardRef(
24606
+ var NavbarLogo = React78.forwardRef(
24580
24607
  function NavbarButton3({ src, ...rest }, ref) {
24581
24608
  return /* @__PURE__ */ jsx141(
24582
24609
  ButtonBase3,
@@ -24597,8 +24624,8 @@ var NavbarLogo = React77.forwardRef(
24597
24624
  var NavbarLogo_default = NavbarLogo;
24598
24625
 
24599
24626
  // src/components/overlay/DonutFocusOverlay.tsx
24600
- import * as React78 from "react";
24601
- import { Fragment as Fragment33, jsx as jsx142, jsxs as jsxs71 } from "react/jsx-runtime";
24627
+ import * as React79 from "react";
24628
+ import { Fragment as Fragment33, jsx as jsx142, jsxs as jsxs72 } from "react/jsx-runtime";
24602
24629
  var DonutFocusOverlay = ({
24603
24630
  isVisible,
24604
24631
  elementRef,
@@ -24607,8 +24634,8 @@ var DonutFocusOverlay = ({
24607
24634
  chipLabel,
24608
24635
  chipPosition = "right"
24609
24636
  }) => {
24610
- const [clientRect, setClientRect] = React78.useState();
24611
- React78.useEffect(() => {
24637
+ const [clientRect, setClientRect] = React79.useState();
24638
+ React79.useEffect(() => {
24612
24639
  if (!elementRef?.current) {
24613
24640
  setClientRect(void 0);
24614
24641
  return;
@@ -24639,7 +24666,7 @@ var DonutFocusOverlay = ({
24639
24666
  const internalTopHalfCircle = `${internalCircleRadius} ${internalCircleRadius} 0 0 1 ${startPointX + donutWidth + internalCircleRadius * 2} ${startPointY}`;
24640
24667
  const externalTopHalfCircle = `${externalCircleRadius} ${externalCircleRadius} 0 0 0 ${startPointX} ${startPointY}`;
24641
24668
  const path = `path("M ${startPointX} ${startPointY} A ${externalBottomHalfCircle} m ${-donutWidth} 0 A ${internalBottomHalfCircle} A ${internalTopHalfCircle} m ${donutWidth} 0 A ${externalTopHalfCircle} Z")`;
24642
- return /* @__PURE__ */ jsxs71(Fragment33, { children: [
24669
+ return /* @__PURE__ */ jsxs72(Fragment33, { children: [
24643
24670
  /* @__PURE__ */ jsx142(
24644
24671
  Box_default,
24645
24672
  {
@@ -24684,7 +24711,7 @@ var DonutFocusOverlay = ({
24684
24711
  var DonutFocusOverlay_default = DonutFocusOverlay;
24685
24712
 
24686
24713
  // src/components/pager/Pager.tsx
24687
- import { Fragment as Fragment34, jsx as jsx143, jsxs as jsxs72 } from "react/jsx-runtime";
24714
+ import { Fragment as Fragment34, jsx as jsx143, jsxs as jsxs73 } from "react/jsx-runtime";
24688
24715
  var Pager = ({
24689
24716
  page,
24690
24717
  pageSize,
@@ -24699,7 +24726,7 @@ var Pager = ({
24699
24726
  const pages = Math.max(Math.ceil(total / pageSize), 1);
24700
24727
  const options = [...Array(pages).keys()].map((i) => ({ value: i + 1 }));
24701
24728
  const Label = ({ children }) => /* @__PURE__ */ jsx143(Typography_default, { color: Colors_exports.grey400, sx: { padding: "0 8px" }, children });
24702
- return /* @__PURE__ */ jsxs72(Stack_default, { direction: "row", sx: { alignItems: "center" }, children: [
24729
+ return /* @__PURE__ */ jsxs73(Stack_default, { direction: "row", sx: { alignItems: "center" }, children: [
24703
24730
  /* @__PURE__ */ jsx143(Label, { children: t("PAGER.PAGE") }),
24704
24731
  /* @__PURE__ */ jsx143(
24705
24732
  Select_default,
@@ -24710,7 +24737,7 @@ var Pager = ({
24710
24737
  sx: { minWidth: 78 }
24711
24738
  }
24712
24739
  ),
24713
- allowedPageSizes && /* @__PURE__ */ jsxs72(Fragment34, { children: [
24740
+ allowedPageSizes && /* @__PURE__ */ jsxs73(Fragment34, { children: [
24714
24741
  /* @__PURE__ */ jsx143(Label, { children: t("PAGER.ROWS_PER_PAGE") }),
24715
24742
  /* @__PURE__ */ jsx143(
24716
24743
  Select_default,
@@ -24726,7 +24753,7 @@ var Pager = ({
24726
24753
  }
24727
24754
  )
24728
24755
  ] }),
24729
- /* @__PURE__ */ jsxs72(Label, { children: [
24756
+ /* @__PURE__ */ jsxs73(Label, { children: [
24730
24757
  from,
24731
24758
  " - ",
24732
24759
  to,
@@ -24757,17 +24784,17 @@ var Pager_default = Pager;
24757
24784
 
24758
24785
  // src/components/scrollable/HorizontalScrollable.tsx
24759
24786
  import { ButtonBase as ButtonBase4 } from "@mui/material";
24760
- import * as React79 from "react";
24761
- import { jsx as jsx144, jsxs as jsxs73 } from "react/jsx-runtime";
24787
+ import * as React80 from "react";
24788
+ import { jsx as jsx144, jsxs as jsxs74 } from "react/jsx-runtime";
24762
24789
  var HorizontalScrollable = ({
24763
24790
  style: style3,
24764
24791
  children,
24765
24792
  stepDistance = 200
24766
24793
  }) => {
24767
- const horizontalContainerRef = React79.useRef(null);
24768
- const [isLeftArrowHidden, setLeftArrowHidden] = React79.useState(true);
24769
- const [isRightArrowHidden, setRightArrowHidden] = React79.useState(true);
24770
- React79.useEffect(() => {
24794
+ const horizontalContainerRef = React80.useRef(null);
24795
+ const [isLeftArrowHidden, setLeftArrowHidden] = React80.useState(true);
24796
+ const [isRightArrowHidden, setRightArrowHidden] = React80.useState(true);
24797
+ React80.useEffect(() => {
24771
24798
  if (!horizontalContainerRef.current) {
24772
24799
  return;
24773
24800
  }
@@ -24807,7 +24834,7 @@ var HorizontalScrollable = ({
24807
24834
  );
24808
24835
  current.scrollBy(stepDistance, 0);
24809
24836
  };
24810
- return /* @__PURE__ */ jsxs73(Box_default, { sx: { position: "relative", ...style3 }, children: [
24837
+ return /* @__PURE__ */ jsxs74(Box_default, { sx: { position: "relative", ...style3 }, children: [
24811
24838
  /* @__PURE__ */ jsx144(
24812
24839
  ButtonBase4,
24813
24840
  {
@@ -24898,10 +24925,10 @@ import {
24898
24925
  } from "notistack";
24899
24926
 
24900
24927
  // src/components/snackbar/Snackbar.tsx
24901
- import * as React80 from "react";
24928
+ import * as React81 from "react";
24902
24929
  import { SnackbarContent } from "notistack";
24903
24930
  import { Typography as Typography4 } from "@mui/material";
24904
- import { jsx as jsx146, jsxs as jsxs74 } from "react/jsx-runtime";
24931
+ import { jsx as jsx146, jsxs as jsxs75 } from "react/jsx-runtime";
24905
24932
  var sizeStyles5 = {
24906
24933
  M: {
24907
24934
  width: "344px",
@@ -24926,7 +24953,7 @@ var iconColors = {
24926
24953
  error: error300,
24927
24954
  warning: complementary300
24928
24955
  };
24929
- var Snackbar = React80.forwardRef(
24956
+ var Snackbar = React81.forwardRef(
24930
24957
  function Snackbar2({
24931
24958
  severity = "info",
24932
24959
  message,
@@ -24938,10 +24965,10 @@ var Snackbar = React80.forwardRef(
24938
24965
  identifierKey: key,
24939
24966
  dataTestKey
24940
24967
  }, ref) {
24941
- const actionClickHandler = React80.useCallback(() => {
24968
+ const actionClickHandler = React81.useCallback(() => {
24942
24969
  onActionClick && onActionClick(key);
24943
24970
  }, [onActionClick, key]);
24944
- const closeClickHandler = React80.useCallback(() => {
24971
+ const closeClickHandler = React81.useCallback(() => {
24945
24972
  onCloseClick && onCloseClick(key);
24946
24973
  }, [onCloseClick, key]);
24947
24974
  return /* @__PURE__ */ jsx146(
@@ -24962,7 +24989,7 @@ var Snackbar = React80.forwardRef(
24962
24989
  ...dataTestKey && {
24963
24990
  "data-test": dataTestKey
24964
24991
  },
24965
- children: /* @__PURE__ */ jsxs74(
24992
+ children: /* @__PURE__ */ jsxs75(
24966
24993
  Stack_default,
24967
24994
  {
24968
24995
  direction: "row",
@@ -25105,11 +25132,11 @@ var TabButton = ({
25105
25132
  var TabButton_default = TabButton;
25106
25133
 
25107
25134
  // src/components/tab/Tabs.tsx
25108
- import * as React82 from "react";
25135
+ import * as React83 from "react";
25109
25136
  import MuiTabs from "@mui/material/Tabs";
25110
25137
 
25111
25138
  // src/components/layout/SwipeableViews.tsx
25112
- import * as React81 from "react";
25139
+ import * as React82 from "react";
25113
25140
  import { useEffect as useEffect21, useRef as useRef22, useState as useState31 } from "react";
25114
25141
  import { jsx as jsx149 } from "react/jsx-runtime";
25115
25142
  var styles = {
@@ -25205,7 +25232,7 @@ function SwipeableViews({
25205
25232
  );
25206
25233
  }, 100);
25207
25234
  },
25208
- children: React81.Children.map(children, (child, childIndex) => /* @__PURE__ */ jsx149(
25235
+ children: React82.Children.map(children, (child, childIndex) => /* @__PURE__ */ jsx149(
25209
25236
  "div",
25210
25237
  {
25211
25238
  className: "Slim-Vertical-Scroll",
@@ -25218,7 +25245,7 @@ function SwipeableViews({
25218
25245
  }
25219
25246
 
25220
25247
  // src/components/tab/Tabs.tsx
25221
- import { jsx as jsx150, jsxs as jsxs75 } from "react/jsx-runtime";
25248
+ import { jsx as jsx150, jsxs as jsxs76 } from "react/jsx-runtime";
25222
25249
  var Tabs = ({
25223
25250
  tabButtons,
25224
25251
  children,
@@ -25229,7 +25256,7 @@ var Tabs = ({
25229
25256
  contained = false,
25230
25257
  scrollbarGutter
25231
25258
  }) => {
25232
- const [value, setValue] = React82.useState(0);
25259
+ const [value, setValue] = React83.useState(0);
25233
25260
  const handleChangeIndex = (index) => {
25234
25261
  onChangeTab?.(index);
25235
25262
  setValue(index);
@@ -25240,7 +25267,7 @@ var Tabs = ({
25240
25267
  bottom: 0,
25241
25268
  borderRadius: "8px 8px 0 0"
25242
25269
  };
25243
- return /* @__PURE__ */ jsxs75(
25270
+ return /* @__PURE__ */ jsxs76(
25244
25271
  Box_default,
25245
25272
  {
25246
25273
  sx: {
@@ -25407,12 +25434,12 @@ var TableCell = ({
25407
25434
  var TableCell_default = TableCell;
25408
25435
 
25409
25436
  // src/components/table/TableCellCopy.tsx
25410
- import * as React83 from "react";
25437
+ import * as React84 from "react";
25411
25438
  import { jsx as jsx157 } from "react/jsx-runtime";
25412
25439
  var TableCellCopy = ({ text, textToCopy, ...rest }) => {
25413
25440
  const { t } = useTranslation();
25414
- const [isCopied, setIsCopied] = React83.useState(false);
25415
- const [showIcon, setShowIcon] = React83.useState(false);
25441
+ const [isCopied, setIsCopied] = React84.useState(false);
25442
+ const [showIcon, setShowIcon] = React84.useState(false);
25416
25443
  const manageButtonClicked = () => {
25417
25444
  void navigator.clipboard.writeText(textToCopy ?? text);
25418
25445
  if (isCopied) {
@@ -25547,9 +25574,9 @@ var ToolbarBreadcrumb_default = ToolbarBreadcrumb;
25547
25574
 
25548
25575
  // src/components/toolbar/ToolbarBreadcrumbButton.tsx
25549
25576
  import { ButtonBase as ButtonBase5 } from "@mui/material";
25550
- import * as React84 from "react";
25577
+ import * as React85 from "react";
25551
25578
  import { jsx as jsx162 } from "react/jsx-runtime";
25552
- var ToolbarBreadcrumbButton = React84.forwardRef(function ToolbarBreadcrumbButton2({ text, className, ...rest }, ref) {
25579
+ var ToolbarBreadcrumbButton = React85.forwardRef(function ToolbarBreadcrumbButton2({ text, className, ...rest }, ref) {
25553
25580
  return /* @__PURE__ */ jsx162(
25554
25581
  ButtonBase5,
25555
25582
  {
@@ -25576,7 +25603,7 @@ var ToolbarBreadcrumbButton = React84.forwardRef(function ToolbarBreadcrumbButto
25576
25603
  var ToolbarBreadcrumbButton_default = ToolbarBreadcrumbButton;
25577
25604
 
25578
25605
  // src/components/toolbar/Toolbar.tsx
25579
- import { jsx as jsx163, jsxs as jsxs76 } from "react/jsx-runtime";
25606
+ import { jsx as jsx163, jsxs as jsxs77 } from "react/jsx-runtime";
25580
25607
  var Toolbar = ({
25581
25608
  children,
25582
25609
  rightActions,
@@ -25585,7 +25612,7 @@ var Toolbar = ({
25585
25612
  sx,
25586
25613
  dataTestId,
25587
25614
  onClickToolbar
25588
- }) => /* @__PURE__ */ jsxs76(
25615
+ }) => /* @__PURE__ */ jsxs77(
25589
25616
  Box_default,
25590
25617
  {
25591
25618
  className: `Cn-Toolbar ${className}`,
@@ -25605,7 +25632,7 @@ var Toolbar = ({
25605
25632
  onClick: onClickToolbar,
25606
25633
  "data-testid": dataTestId,
25607
25634
  children: [
25608
- /* @__PURE__ */ jsxs76(
25635
+ /* @__PURE__ */ jsxs77(
25609
25636
  Box_default,
25610
25637
  {
25611
25638
  sx: {
@@ -25661,24 +25688,24 @@ var Toolbar = ({
25661
25688
  var Toolbar_default = Toolbar;
25662
25689
 
25663
25690
  // src/components/toolbar/ToolbarTitle.tsx
25664
- import * as React85 from "react";
25691
+ import * as React86 from "react";
25665
25692
  import { useState as useState34 } from "react";
25666
- import { jsx as jsx164, jsxs as jsxs77 } from "react/jsx-runtime";
25667
- var ToolbarTitle = React85.forwardRef(function ToolbarTitle2({
25693
+ import { jsx as jsx164, jsxs as jsxs78 } from "react/jsx-runtime";
25694
+ var ToolbarTitle = React86.forwardRef(function ToolbarTitle2({
25668
25695
  title,
25669
25696
  align = "left",
25670
25697
  className,
25671
25698
  hoverActions,
25672
25699
  color: color2 = grey900
25673
25700
  }, ref) {
25674
- const textElementRef = React85.useRef(null);
25701
+ const textElementRef = React86.useRef(null);
25675
25702
  const [showHoverActions, setShowHoverActions] = useState34(false);
25676
25703
  return /* @__PURE__ */ jsx164(Box_default, { sx: { maxWidth: "100%" }, children: /* @__PURE__ */ jsx164(
25677
25704
  TextEllipsisTooltip_default,
25678
25705
  {
25679
25706
  title: title ?? "\xA0",
25680
25707
  textEllipsableElement: textElementRef,
25681
- children: /* @__PURE__ */ jsxs77(
25708
+ children: /* @__PURE__ */ jsxs78(
25682
25709
  Typography_default,
25683
25710
  {
25684
25711
  color: color2,
@@ -25725,7 +25752,7 @@ var Slide_default = Slide;
25725
25752
 
25726
25753
  // src/components/widget/WidgetLegendItem.tsx
25727
25754
  import { ButtonBase as ButtonBase6 } from "@mui/material";
25728
- import { jsx as jsx165, jsxs as jsxs78 } from "react/jsx-runtime";
25755
+ import { jsx as jsx165, jsxs as jsxs79 } from "react/jsx-runtime";
25729
25756
  var WidgetLegendItem = ({
25730
25757
  groupLabel,
25731
25758
  legendDirection = "column",
@@ -25745,7 +25772,7 @@ var WidgetLegendItem = ({
25745
25772
  p: "2px 12px",
25746
25773
  cursor: onClick ? "pointer" : "default"
25747
25774
  },
25748
- children: /* @__PURE__ */ jsxs78(
25775
+ children: /* @__PURE__ */ jsxs79(
25749
25776
  Box_default,
25750
25777
  {
25751
25778
  sx: {
@@ -25779,7 +25806,7 @@ var WidgetLegendItem = ({
25779
25806
  style: style3
25780
25807
  }, i) => {
25781
25808
  const incrementLabelIconId = incrementLabelType && incrementLabelStyles[incrementLabelType].icon;
25782
- return /* @__PURE__ */ jsxs78(
25809
+ return /* @__PURE__ */ jsxs79(
25783
25810
  Box_default,
25784
25811
  {
25785
25812
  sx: {
@@ -25913,8 +25940,8 @@ var WidgetTitle = ({ children, sx, multiline = false }) => children ? /* @__PURE
25913
25940
  var WidgetTitle_default = WidgetTitle;
25914
25941
 
25915
25942
  // src/components/window/MinimizableWindow.tsx
25916
- import * as React86 from "react";
25917
- import { Fragment as Fragment35, jsx as jsx169, jsxs as jsxs79 } from "react/jsx-runtime";
25943
+ import * as React87 from "react";
25944
+ import { Fragment as Fragment35, jsx as jsx169, jsxs as jsxs80 } from "react/jsx-runtime";
25918
25945
  var sizes6 = {
25919
25946
  M: 400,
25920
25947
  L: 500,
@@ -25939,7 +25966,7 @@ var iconButtonsStyles = {
25939
25966
  backgroundColor: "rgba(255, 255, 255, 0.2)"
25940
25967
  }
25941
25968
  };
25942
- var MinimizableWindow = React86.forwardRef(function MinimizableWindow2({
25969
+ var MinimizableWindow = React87.forwardRef(function MinimizableWindow2({
25943
25970
  children,
25944
25971
  title,
25945
25972
  size = "M",
@@ -25956,17 +25983,17 @@ var MinimizableWindow = React86.forwardRef(function MinimizableWindow2({
25956
25983
  onBack
25957
25984
  }, ref) {
25958
25985
  const { t } = useTranslation();
25959
- const overlayRef = React86.useRef(null);
25960
- const windowRef = React86.useRef(null);
25961
- const headerRef = React86.useRef(null);
25962
- const [isDraggingState, setIsDraggingState] = React86.useState(false);
25963
- const diffRef = React86.useRef({ x: 0, y: 0 });
25964
- React86.useImperativeHandle(ref, () => ({
25986
+ const overlayRef = React87.useRef(null);
25987
+ const windowRef = React87.useRef(null);
25988
+ const headerRef = React87.useRef(null);
25989
+ const [isDraggingState, setIsDraggingState] = React87.useState(false);
25990
+ const diffRef = React87.useRef({ x: 0, y: 0 });
25991
+ React87.useImperativeHandle(ref, () => ({
25965
25992
  window: windowRef.current,
25966
25993
  header: headerRef.current,
25967
25994
  overlay: overlayRef.current
25968
25995
  }));
25969
- React86.useEffect(() => {
25996
+ React87.useEffect(() => {
25970
25997
  if (open) {
25971
25998
  overlayRef.current?.style.removeProperty("transform");
25972
25999
  overlayRef.current?.style.removeProperty("opacity");
@@ -26028,7 +26055,7 @@ var MinimizableWindow = React86.forwardRef(function MinimizableWindow2({
26028
26055
  }
26029
26056
  }, 750);
26030
26057
  };
26031
- return /* @__PURE__ */ jsxs79(Fragment35, { children: [
26058
+ return /* @__PURE__ */ jsxs80(Fragment35, { children: [
26032
26059
  isDraggingState && /* @__PURE__ */ jsx169(
26033
26060
  Box_default,
26034
26061
  {
@@ -26062,7 +26089,7 @@ var MinimizableWindow = React86.forwardRef(function MinimizableWindow2({
26062
26089
  ...!open && { pointerEvents: "none" },
26063
26090
  transition: "transform 0.5s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.5s cubic-bezier(0.4, 0, 0.2, 1), left 0.4s cubic-bezier(0.4, 0, 0.2, 1)"
26064
26091
  },
26065
- children: /* @__PURE__ */ jsxs79(
26092
+ children: /* @__PURE__ */ jsxs80(
26066
26093
  Stack_default,
26067
26094
  {
26068
26095
  sx: {
@@ -26073,7 +26100,7 @@ var MinimizableWindow = React86.forwardRef(function MinimizableWindow2({
26073
26100
  width: `${sizes6[size]}px`,
26074
26101
  height: contentHeight !== void 0 && headerRef.current ? `${contentHeight + contentPadding + headerRef.current.scrollHeight}px` : void 0,
26075
26102
  children: [
26076
- /* @__PURE__ */ jsxs79(
26103
+ /* @__PURE__ */ jsxs80(
26077
26104
  Stack_default,
26078
26105
  {
26079
26106
  ref: headerRef,
@@ -26123,7 +26150,7 @@ var MinimizableWindow = React86.forwardRef(function MinimizableWindow2({
26123
26150
  children: typeof title === "string" ? /* @__PURE__ */ jsx169(Typography_default, { children: title }) : title
26124
26151
  }
26125
26152
  ),
26126
- /* @__PURE__ */ jsxs79(
26153
+ /* @__PURE__ */ jsxs80(
26127
26154
  Stack_default,
26128
26155
  {
26129
26156
  direction: "row",