@serhii.olishevskyi/docs 1.2.25 → 1.2.26

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/index.js CHANGED
@@ -2977,6 +2977,7 @@ __export(index_exports, {
2977
2977
  Services: () => Services,
2978
2978
  SupabaseProvider: () => SupabaseProvider,
2979
2979
  SwitchComponent: () => SwitchComponent,
2980
+ TablePaginationComponent: () => TablePaginationComponent,
2980
2981
  TextFieldComponent: () => TextFieldComponent,
2981
2982
  ThemeProvider: () => ThemeProvider,
2982
2983
  ToastProvider: () => ToastProvider,
@@ -2984,6 +2985,7 @@ __export(index_exports, {
2984
2985
  TranslateProvider: () => TranslateProvider,
2985
2986
  TranslateText: () => TranslateText,
2986
2987
  TranslationEditProvider: () => TranslationEditProvider,
2988
+ TruncatedTypography: () => TruncatedTypography,
2987
2989
  UrlComponent: () => UrlComponent,
2988
2990
  UserAvatarComponent: () => UserAvatarComponent,
2989
2991
  UserPopoverComponent: () => UserPopoverComponent,
@@ -4683,15 +4685,79 @@ var ErrorAlertComponent = ({
4683
4685
  );
4684
4686
  };
4685
4687
 
4686
- // src/UI/components/layout/PageComponent.tsx
4687
- var import_react29 = __toESM(require("react"));
4688
+ // src/UI/components/data.display/TruncatedTypography.tsx
4689
+ var import_react29 = require("react");
4688
4690
  var import_material25 = require("@mui/material");
4691
+ init_TranslatableTooltipComponent();
4692
+ var import_jsx_runtime35 = require("react/jsx-runtime");
4693
+ var TruncatedTypography = ({
4694
+ children,
4695
+ lines = 1,
4696
+ tooltipProps,
4697
+ alwaysShowTooltip = false,
4698
+ sx,
4699
+ ...typographyProps
4700
+ }) => {
4701
+ const textRef = (0, import_react29.useRef)(null);
4702
+ const [isTruncated, setIsTruncated] = (0, import_react29.useState)(false);
4703
+ const checkOverflow = () => {
4704
+ const element = textRef.current;
4705
+ if (!element) return;
4706
+ if (lines === 1) {
4707
+ setIsTruncated(element.scrollWidth > element.clientWidth);
4708
+ } else {
4709
+ setIsTruncated(element.scrollHeight > element.clientHeight);
4710
+ }
4711
+ };
4712
+ (0, import_react29.useEffect)(() => {
4713
+ checkOverflow();
4714
+ window.addEventListener("resize", checkOverflow);
4715
+ return () => window.removeEventListener("resize", checkOverflow);
4716
+ }, [children, lines]);
4717
+ const truncationStyles = lines > 1 ? {
4718
+ display: "-webkit-box",
4719
+ WebkitLineClamp: lines,
4720
+ WebkitBoxOrient: "vertical",
4721
+ overflow: "hidden",
4722
+ textOverflow: "ellipsis",
4723
+ wordBreak: "break-word"
4724
+ } : {
4725
+ overflow: "hidden",
4726
+ textOverflow: "ellipsis",
4727
+ whiteSpace: "nowrap"
4728
+ };
4729
+ const textContent = typeof children === "string" ? children : void 0;
4730
+ return /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(
4731
+ TranslatableTooltipComponent,
4732
+ {
4733
+ title: alwaysShowTooltip || isTruncated ? textContent || children : "",
4734
+ disableHoverListener: !alwaysShowTooltip && !isTruncated,
4735
+ ...tooltipProps,
4736
+ children: /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(
4737
+ import_material25.Typography,
4738
+ {
4739
+ ref: textRef,
4740
+ sx: {
4741
+ ...truncationStyles,
4742
+ ...sx
4743
+ },
4744
+ ...typographyProps,
4745
+ children
4746
+ }
4747
+ )
4748
+ }
4749
+ );
4750
+ };
4751
+
4752
+ // src/UI/components/layout/PageComponent.tsx
4753
+ var import_react30 = __toESM(require("react"));
4754
+ var import_material26 = require("@mui/material");
4689
4755
  var import_MoreVert = __toESM(require("@mui/icons-material/MoreVert"));
4690
4756
  var import_KeyboardArrowDown = __toESM(require("@mui/icons-material/KeyboardArrowDown"));
4691
4757
  var import_icons_material3 = require("@mui/icons-material");
4692
4758
  init_context();
4693
4759
  init_TranslatableTooltipComponent();
4694
- var import_jsx_runtime35 = require("react/jsx-runtime");
4760
+ var import_jsx_runtime36 = require("react/jsx-runtime");
4695
4761
  var getTruncateStyles = (mode = "truncate") => {
4696
4762
  switch (mode) {
4697
4763
  case "truncate":
@@ -4719,10 +4785,10 @@ var PageHeader = ({
4719
4785
  forceMobileView,
4720
4786
  sx = []
4721
4787
  }) => {
4722
- const theme = (0, import_material25.useTheme)();
4723
- const mediaIsMobile = (0, import_material25.useMediaQuery)(theme.breakpoints.down(mobileBreakpoint));
4788
+ const theme = (0, import_material26.useTheme)();
4789
+ const mediaIsMobile = (0, import_material26.useMediaQuery)(theme.breakpoints.down(mobileBreakpoint));
4724
4790
  const isMobile = forceMobileView ?? mediaIsMobile;
4725
- const [anchorEl, setAnchorEl] = (0, import_react29.useState)(null);
4791
+ const [anchorEl, setAnchorEl] = (0, import_react30.useState)(null);
4726
4792
  const isMenuOpen = Boolean(anchorEl);
4727
4793
  const handleOpenMenu = (e) => setAnchorEl(e.currentTarget);
4728
4794
  const handleCloseMenu = () => setAnchorEl(null);
@@ -4732,8 +4798,8 @@ var PageHeader = ({
4732
4798
  };
4733
4799
  const hasSecondaryActions = secondaryActions.length > 0;
4734
4800
  const hasActions = Boolean(primaryAction || hasSecondaryActions || refreshAction);
4735
- return /* @__PURE__ */ (0, import_jsx_runtime35.jsxs)(
4736
- import_material25.Box,
4801
+ return /* @__PURE__ */ (0, import_jsx_runtime36.jsxs)(
4802
+ import_material26.Box,
4737
4803
  {
4738
4804
  sx: [
4739
4805
  {
@@ -4751,9 +4817,9 @@ var PageHeader = ({
4751
4817
  ...Array.isArray(sx) ? sx : [sx]
4752
4818
  ],
4753
4819
  children: [
4754
- /* @__PURE__ */ (0, import_jsx_runtime35.jsxs)(import_material25.Box, { sx: { display: "flex", alignItems: "center", gap: { xs: 1.5, sm: 2 }, minWidth: 0, flex: 1 }, children: [
4755
- icon && /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(
4756
- import_material25.Box,
4820
+ /* @__PURE__ */ (0, import_jsx_runtime36.jsxs)(import_material26.Box, { sx: { display: "flex", alignItems: "center", gap: { xs: 1.5, sm: 2 }, minWidth: 0, flex: 1 }, children: [
4821
+ icon && /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(
4822
+ import_material26.Box,
4757
4823
  {
4758
4824
  sx: {
4759
4825
  display: "flex",
@@ -4772,10 +4838,10 @@ var PageHeader = ({
4772
4838
  children: icon
4773
4839
  }
4774
4840
  ),
4775
- /* @__PURE__ */ (0, import_jsx_runtime35.jsxs)(import_material25.Box, { sx: { minWidth: 0, flex: 1 }, children: [
4776
- tag && /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(import_material25.Box, { sx: { mb: 0.5, display: "flex", alignItems: "center" }, children: tag }),
4777
- /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(import_material25.Tooltip, { title: titleTruncateMode === "truncate" ? /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(TranslateText, { children: title }) : void 0, arrow: true, placement: "top", children: /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(
4778
- import_material25.Typography,
4841
+ /* @__PURE__ */ (0, import_jsx_runtime36.jsxs)(import_material26.Box, { sx: { minWidth: 0, flex: 1 }, children: [
4842
+ tag && /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(import_material26.Box, { sx: { mb: 0.5, display: "flex", alignItems: "center" }, children: tag }),
4843
+ /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(import_material26.Tooltip, { title: titleTruncateMode === "truncate" ? /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(TranslateText, { children: title }) : void 0, arrow: true, placement: "top", children: /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(
4844
+ import_material26.Typography,
4779
4845
  {
4780
4846
  variant: "h5",
4781
4847
  component: "h1",
@@ -4786,11 +4852,11 @@ var PageHeader = ({
4786
4852
  lineHeight: 1.3,
4787
4853
  ...getTruncateStyles(titleTruncateMode)
4788
4854
  },
4789
- children: /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(TranslateText, { children: title })
4855
+ children: /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(TranslateText, { children: title })
4790
4856
  }
4791
4857
  ) }),
4792
- subtitle && /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(import_material25.Tooltip, { title: subtitleTruncateMode === "truncate" ? /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(TranslateText, { children: subtitle }) : void 0, arrow: true, placement: "top", children: /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(
4793
- import_material25.Typography,
4858
+ subtitle && /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(import_material26.Tooltip, { title: subtitleTruncateMode === "truncate" ? /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(TranslateText, { children: subtitle }) : void 0, arrow: true, placement: "top", children: /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(
4859
+ import_material26.Typography,
4794
4860
  {
4795
4861
  variant: "body2",
4796
4862
  sx: {
@@ -4800,24 +4866,24 @@ var PageHeader = ({
4800
4866
  lineHeight: 1.4,
4801
4867
  ...getTruncateStyles(subtitleTruncateMode)
4802
4868
  },
4803
- children: /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(TranslateText, { children: subtitle })
4869
+ children: /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(TranslateText, { children: subtitle })
4804
4870
  }
4805
4871
  ) })
4806
4872
  ] })
4807
4873
  ] }),
4808
- hasActions && /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(import_material25.Box, { sx: { flexShrink: 0, display: "flex", alignItems: "center", gap: 1 }, children: isMobile ? (
4874
+ hasActions && /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(import_material26.Box, { sx: { flexShrink: 0, display: "flex", alignItems: "center", gap: 1 }, children: isMobile ? (
4809
4875
  /* MOBILE: IconButton with MoreVertIcon showing ALL actions inside Menu */
4810
- /* @__PURE__ */ (0, import_jsx_runtime35.jsxs)(import_jsx_runtime35.Fragment, { children: [
4811
- /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(TranslatableTooltipComponent, { title: /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(TranslateText, { overrideNamespace: overrideNamespace || "form_components", children: "Actions" }), children: /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(
4812
- import_material25.IconButton,
4876
+ /* @__PURE__ */ (0, import_jsx_runtime36.jsxs)(import_jsx_runtime36.Fragment, { children: [
4877
+ /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(TranslatableTooltipComponent, { title: /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(TranslateText, { overrideNamespace: overrideNamespace || "form_components", children: "Actions" }), children: /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(
4878
+ import_material26.IconButton,
4813
4879
  {
4814
4880
  onClick: handleOpenMenu,
4815
4881
  sx: { border: "1px solid", borderColor: "divider", borderRadius: 2, p: 1 },
4816
- children: /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(import_MoreVert.default, {})
4882
+ children: /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(import_MoreVert.default, {})
4817
4883
  }
4818
4884
  ) }),
4819
- /* @__PURE__ */ (0, import_jsx_runtime35.jsxs)(
4820
- import_material25.Menu,
4885
+ /* @__PURE__ */ (0, import_jsx_runtime36.jsxs)(
4886
+ import_material26.Menu,
4821
4887
  {
4822
4888
  anchorEl,
4823
4889
  open: isMenuOpen,
@@ -4826,9 +4892,9 @@ var PageHeader = ({
4826
4892
  anchorOrigin: { horizontal: "right", vertical: "bottom" },
4827
4893
  slotProps: { paper: { elevation: 4, sx: { minWidth: 200, borderRadius: 2, mt: 1, p: 0.5 } } },
4828
4894
  children: [
4829
- primaryAction && /* @__PURE__ */ (0, import_jsx_runtime35.jsxs)(import_jsx_runtime35.Fragment, { children: [
4830
- /* @__PURE__ */ (0, import_jsx_runtime35.jsxs)(
4831
- import_material25.MenuItem,
4895
+ primaryAction && /* @__PURE__ */ (0, import_jsx_runtime36.jsxs)(import_jsx_runtime36.Fragment, { children: [
4896
+ /* @__PURE__ */ (0, import_jsx_runtime36.jsxs)(
4897
+ import_material26.MenuItem,
4832
4898
  {
4833
4899
  onClick: () => handleMenuAction(primaryAction.onClick),
4834
4900
  disabled: primaryAction.disabled,
@@ -4841,32 +4907,32 @@ var PageHeader = ({
4841
4907
  px: 1.5
4842
4908
  },
4843
4909
  children: [
4844
- primaryAction.icon && /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(import_material25.ListItemIcon, { sx: { color: "inherit", minWidth: 32 }, children: primaryAction.icon }),
4845
- /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(import_material25.ListItemText, { primary: /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(TranslateText, { children: primaryAction.label }), slotProps: { primary: { sx: { fontWeight: 700, fontSize: "0.9rem" } } } })
4910
+ primaryAction.icon && /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(import_material26.ListItemIcon, { sx: { color: "inherit", minWidth: 32 }, children: primaryAction.icon }),
4911
+ /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(import_material26.ListItemText, { primary: /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(TranslateText, { children: primaryAction.label }), slotProps: { primary: { sx: { fontWeight: 700, fontSize: "0.9rem" } } } })
4846
4912
  ]
4847
4913
  }
4848
4914
  ),
4849
- hasSecondaryActions && /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(import_material25.Divider, { sx: { my: 0.75 } })
4915
+ hasSecondaryActions && /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(import_material26.Divider, { sx: { my: 0.75 } })
4850
4916
  ] }),
4851
- secondaryActions.map((action) => /* @__PURE__ */ (0, import_jsx_runtime35.jsxs)(import_react29.default.Fragment, { children: [
4852
- action.divider && /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(import_material25.Divider, { sx: { my: 0.5 } }),
4853
- /* @__PURE__ */ (0, import_jsx_runtime35.jsxs)(
4854
- import_material25.MenuItem,
4917
+ secondaryActions.map((action) => /* @__PURE__ */ (0, import_jsx_runtime36.jsxs)(import_react30.default.Fragment, { children: [
4918
+ action.divider && /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(import_material26.Divider, { sx: { my: 0.5 } }),
4919
+ /* @__PURE__ */ (0, import_jsx_runtime36.jsxs)(
4920
+ import_material26.MenuItem,
4855
4921
  {
4856
4922
  onClick: () => handleMenuAction(action.onClick),
4857
4923
  disabled: action.disabled,
4858
4924
  sx: { borderRadius: 1, py: 1, px: 1.5, color: action.color ? `${action.color}.main` : "text.primary" },
4859
4925
  children: [
4860
- action.icon && /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(import_material25.ListItemIcon, { sx: { color: action.color ? `${action.color}.main` : "text.secondary", minWidth: 32 }, children: action.icon }),
4861
- /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(import_material25.ListItemText, { primary: action.label, slotProps: { primary: { sx: { fontSize: "0.875rem" } } } })
4926
+ action.icon && /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(import_material26.ListItemIcon, { sx: { color: action.color ? `${action.color}.main` : "text.secondary", minWidth: 32 }, children: action.icon }),
4927
+ /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(import_material26.ListItemText, { primary: action.label, slotProps: { primary: { sx: { fontSize: "0.875rem" } } } })
4862
4928
  ]
4863
4929
  }
4864
4930
  )
4865
4931
  ] }, action.id)),
4866
- refreshAction && /* @__PURE__ */ (0, import_jsx_runtime35.jsxs)(import_jsx_runtime35.Fragment, { children: [
4867
- /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(import_material25.Divider, { sx: { my: 0.5 } }),
4868
- /* @__PURE__ */ (0, import_jsx_runtime35.jsxs)(
4869
- import_material25.MenuItem,
4932
+ refreshAction && /* @__PURE__ */ (0, import_jsx_runtime36.jsxs)(import_jsx_runtime36.Fragment, { children: [
4933
+ /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(import_material26.Divider, { sx: { my: 0.5 } }),
4934
+ /* @__PURE__ */ (0, import_jsx_runtime36.jsxs)(
4935
+ import_material26.MenuItem,
4870
4936
  {
4871
4937
  onClick: () => handleMenuAction(refreshAction.onClick),
4872
4938
  disabled: refreshAction.disabled,
@@ -4878,8 +4944,8 @@ var PageHeader = ({
4878
4944
  px: 1.5
4879
4945
  },
4880
4946
  children: [
4881
- /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(import_material25.ListItemIcon, { sx: { color: "inherit", minWidth: 32 }, children: /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(import_icons_material3.Refresh, {}) }),
4882
- /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(import_material25.ListItemText, { primary: /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(TranslateText, { overrideNamespace: overrideNamespace || "form_components", children: "Refresh" }), slotProps: { primary: { sx: { fontWeight: 700, fontSize: "0.9rem" } } } })
4947
+ /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(import_material26.ListItemIcon, { sx: { color: "inherit", minWidth: 32 }, children: /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(import_icons_material3.Refresh, {}) }),
4948
+ /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(import_material26.ListItemText, { primary: /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(TranslateText, { overrideNamespace: overrideNamespace || "form_components", children: "Refresh" }), slotProps: { primary: { sx: { fontWeight: 700, fontSize: "0.9rem" } } } })
4883
4949
  ]
4884
4950
  }
4885
4951
  )
@@ -4890,10 +4956,10 @@ var PageHeader = ({
4890
4956
  ] })
4891
4957
  ) : (
4892
4958
  /* DESKTOP: Primary Action Button + Secondary Actions Dropdown Button */
4893
- /* @__PURE__ */ (0, import_jsx_runtime35.jsxs)(import_material25.Box, { sx: { display: "flex", alignItems: "center", gap: 1 }, children: [
4894
- (primaryAction || refreshAction) && /* @__PURE__ */ (0, import_jsx_runtime35.jsxs)(import_material25.Stack, { direction: "row", spacing: 2, children: [
4895
- primaryAction && /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(
4896
- import_material25.Button,
4959
+ /* @__PURE__ */ (0, import_jsx_runtime36.jsxs)(import_material26.Box, { sx: { display: "flex", alignItems: "center", gap: 1 }, children: [
4960
+ (primaryAction || refreshAction) && /* @__PURE__ */ (0, import_jsx_runtime36.jsxs)(import_material26.Stack, { direction: "row", spacing: 2, children: [
4961
+ primaryAction && /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(
4962
+ import_material26.Button,
4897
4963
  {
4898
4964
  variant: primaryAction.variant || "contained",
4899
4965
  color: primaryAction.color || "primary",
@@ -4901,32 +4967,32 @@ var PageHeader = ({
4901
4967
  disabled: primaryAction.disabled,
4902
4968
  startIcon: primaryAction.icon,
4903
4969
  sx: { borderRadius: 2, textTransform: "none", fontWeight: 600, px: 2, py: 0.85 },
4904
- children: /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(TranslateText, { children: primaryAction.label })
4970
+ children: /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(TranslateText, { children: primaryAction.label })
4905
4971
  }
4906
4972
  ),
4907
- refreshAction && /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(TranslatableTooltipComponent, { title: /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(TranslateText, { overrideNamespace: overrideNamespace || "form_components", children: "Refresh" }), children: /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(
4908
- import_material25.Fab,
4973
+ refreshAction && /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(TranslatableTooltipComponent, { title: /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(TranslateText, { overrideNamespace: overrideNamespace || "form_components", children: "Refresh" }), children: /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(
4974
+ import_material26.Fab,
4909
4975
  {
4910
4976
  color: "default",
4911
4977
  onClick: refreshAction.onClick,
4912
4978
  disabled: refreshAction.disabled,
4913
4979
  "aria-label": "refresh",
4914
4980
  size: "small",
4915
- children: /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(import_icons_material3.Refresh, {})
4981
+ children: /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(import_icons_material3.Refresh, {})
4916
4982
  }
4917
4983
  ) })
4918
4984
  ] }),
4919
- hasSecondaryActions && /* @__PURE__ */ (0, import_jsx_runtime35.jsxs)(import_jsx_runtime35.Fragment, { children: [
4920
- /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(
4921
- import_material25.IconButton,
4985
+ hasSecondaryActions && /* @__PURE__ */ (0, import_jsx_runtime36.jsxs)(import_jsx_runtime36.Fragment, { children: [
4986
+ /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(
4987
+ import_material26.IconButton,
4922
4988
  {
4923
4989
  onClick: handleOpenMenu,
4924
4990
  sx: { border: "1px solid", borderColor: "divider", borderRadius: 2, p: 1 },
4925
- children: /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(import_KeyboardArrowDown.default, {})
4991
+ children: /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(import_KeyboardArrowDown.default, {})
4926
4992
  }
4927
4993
  ),
4928
- /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(
4929
- import_material25.Menu,
4994
+ /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(
4995
+ import_material26.Menu,
4930
4996
  {
4931
4997
  anchorEl,
4932
4998
  open: isMenuOpen,
@@ -4934,17 +5000,17 @@ var PageHeader = ({
4934
5000
  transformOrigin: { horizontal: "right", vertical: "top" },
4935
5001
  anchorOrigin: { horizontal: "right", vertical: "bottom" },
4936
5002
  slotProps: { paper: { elevation: 4, sx: { minWidth: 180, borderRadius: 2, mt: 1, p: 0.5 } } },
4937
- children: secondaryActions.map((action) => /* @__PURE__ */ (0, import_jsx_runtime35.jsxs)(import_react29.default.Fragment, { children: [
4938
- action.divider && /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(import_material25.Divider, { sx: { my: 0.5 } }),
4939
- /* @__PURE__ */ (0, import_jsx_runtime35.jsxs)(
4940
- import_material25.MenuItem,
5003
+ children: secondaryActions.map((action) => /* @__PURE__ */ (0, import_jsx_runtime36.jsxs)(import_react30.default.Fragment, { children: [
5004
+ action.divider && /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(import_material26.Divider, { sx: { my: 0.5 } }),
5005
+ /* @__PURE__ */ (0, import_jsx_runtime36.jsxs)(
5006
+ import_material26.MenuItem,
4941
5007
  {
4942
5008
  onClick: () => handleMenuAction(action.onClick),
4943
5009
  disabled: action.disabled,
4944
5010
  sx: { borderRadius: 1, py: 0.85, color: action.color ? `${action.color}.main` : "text.primary" },
4945
5011
  children: [
4946
- action.icon && /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(import_material25.ListItemIcon, { sx: { color: action.color ? `${action.color}.main` : "text.secondary", minWidth: 32 }, children: action.icon }),
4947
- /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(import_material25.ListItemText, { primary: action.label, slotProps: { primary: { sx: { fontSize: "0.875rem" } } } })
5012
+ action.icon && /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(import_material26.ListItemIcon, { sx: { color: action.color ? `${action.color}.main` : "text.secondary", minWidth: 32 }, children: action.icon }),
5013
+ /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(import_material26.ListItemText, { primary: action.label, slotProps: { primary: { sx: { fontSize: "0.875rem" } } } })
4948
5014
  ]
4949
5015
  }
4950
5016
  )
@@ -4954,14 +5020,14 @@ var PageHeader = ({
4954
5020
  ] })
4955
5021
  ] })
4956
5022
  ) }),
4957
- customFragment && /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(import_jsx_runtime35.Fragment, { children: customFragment })
5023
+ customFragment && /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(import_jsx_runtime36.Fragment, { children: customFragment })
4958
5024
  ]
4959
5025
  }
4960
5026
  );
4961
5027
  };
4962
5028
  var PageContainer = ({ children }) => {
4963
- return /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(
4964
- import_material25.Box,
5029
+ return /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(
5030
+ import_material26.Box,
4965
5031
  {
4966
5032
  sx: {
4967
5033
  width: "100%",
@@ -4977,8 +5043,8 @@ var PageComponent = ({
4977
5043
  header,
4978
5044
  children
4979
5045
  }) => {
4980
- return /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(
4981
- import_material25.Box,
5046
+ return /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(
5047
+ import_material26.Box,
4982
5048
  {
4983
5049
  sx: {
4984
5050
  //pt: 2,
@@ -4987,8 +5053,8 @@ var PageComponent = ({
4987
5053
  overflowY: "auto",
4988
5054
  boxSizing: "border-box"
4989
5055
  },
4990
- children: /* @__PURE__ */ (0, import_jsx_runtime35.jsxs)(PageContainer, { children: [
4991
- header && /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(PageHeader, { ...header }),
5056
+ children: /* @__PURE__ */ (0, import_jsx_runtime36.jsxs)(PageContainer, { children: [
5057
+ header && /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(PageHeader, { ...header }),
4992
5058
  children
4993
5059
  ] })
4994
5060
  }
@@ -4996,9 +5062,9 @@ var PageComponent = ({
4996
5062
  };
4997
5063
 
4998
5064
  // src/UI/components/layout/FilterContainerComponent.tsx
4999
- var import_react30 = __toESM(require("react"));
5000
- var import_material26 = require("@mui/material");
5001
- var import_jsx_runtime36 = (
5065
+ var import_react31 = __toESM(require("react"));
5066
+ var import_material27 = require("@mui/material");
5067
+ var import_jsx_runtime37 = (
5002
5068
  /* Автоматическая обертка каждого дочернего элемента в Grid size */
5003
5069
  require("react/jsx-runtime")
5004
5070
  );
@@ -5007,26 +5073,26 @@ var FilterContainerComponent = ({
5007
5073
  children,
5008
5074
  sx
5009
5075
  }) => {
5010
- return /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(
5011
- import_material26.Paper,
5076
+ return /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(
5077
+ import_material27.Paper,
5012
5078
  {
5013
5079
  variant: "outlined",
5014
5080
  sx: [
5015
5081
  { p: 2, mb: 3 },
5016
5082
  ...Array.isArray(sx) ? sx : [sx]
5017
5083
  ],
5018
- children: /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(import_material26.Grid, { container: true, spacing: 2, sx: { alignItems: "center" }, children: sections ? sections.map((sec, idx) => /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(import_react30.default.Fragment, { children: sec }, idx)) : children })
5084
+ children: /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(import_material27.Grid, { container: true, spacing: 2, sx: { alignItems: "center" }, children: sections ? sections.map((sec, idx) => /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(import_react31.default.Fragment, { children: sec }, idx)) : children })
5019
5085
  }
5020
5086
  );
5021
5087
  };
5022
5088
 
5023
5089
  // src/UI/components/layout/PageLinkComponent.tsx
5024
5090
  var import_icons_material4 = require("@mui/icons-material");
5025
- var import_material27 = require("@mui/material");
5026
- var import_react31 = __toESM(require("react"));
5091
+ var import_material28 = require("@mui/material");
5092
+ var import_react32 = __toESM(require("react"));
5027
5093
  var import_react_router_dom = require("react-router-dom");
5028
5094
  init_context();
5029
- var import_jsx_runtime37 = require("react/jsx-runtime");
5095
+ var import_jsx_runtime38 = require("react/jsx-runtime");
5030
5096
  var PageLinkComponent = ({
5031
5097
  overrideNamespace,
5032
5098
  title,
@@ -5039,8 +5105,8 @@ var PageLinkComponent = ({
5039
5105
  bgcolor
5040
5106
  }) => {
5041
5107
  const navigate = (0, import_react_router_dom.useNavigate)();
5042
- return /* @__PURE__ */ (0, import_jsx_runtime37.jsxs)(
5043
- import_material27.Card,
5108
+ return /* @__PURE__ */ (0, import_jsx_runtime38.jsxs)(
5109
+ import_material28.Card,
5044
5110
  {
5045
5111
  sx: (theme) => ({
5046
5112
  height: "100%",
@@ -5053,21 +5119,21 @@ var PageLinkComponent = ({
5053
5119
  ) : typeof bgcolor === "function" ? theme.palette.getContrastText(bgcolor(theme)) : theme.palette.getContrastText(bgcolor) : "text.primary"
5054
5120
  }),
5055
5121
  children: [
5056
- /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(
5057
- import_material27.CardHeader,
5122
+ /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(
5123
+ import_material28.CardHeader,
5058
5124
  {
5059
- avatar: icon ? import_react31.default.cloneElement(icon, {
5125
+ avatar: icon ? import_react32.default.cloneElement(icon, {
5060
5126
  sx: { color: bgcolor ? "inherit" : "primary", ...icon.props.sx }
5061
- }) : /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(import_icons_material4.Settings, { color: bgcolor ? "inherit" : "primary" }),
5062
- title: /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(import_material27.Typography, { variant: "h6", component: "div", color: "inherit", children: typeof title === "string" ? /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(TranslateText, { overrideNamespace, children: title }) : title }),
5063
- subheader: subheader && /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(import_material27.Typography, { variant: "body2", sx: { opacity: 0.8, color: "inherit" }, children: typeof subheader === "string" ? /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(TranslateText, { overrideNamespace, children: subheader }) : subheader })
5127
+ }) : /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(import_icons_material4.Settings, { color: bgcolor ? "inherit" : "primary" }),
5128
+ title: /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(import_material28.Typography, { variant: "h6", component: "div", color: "inherit", children: typeof title === "string" ? /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(TranslateText, { overrideNamespace, children: title }) : title }),
5129
+ subheader: subheader && /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(import_material28.Typography, { variant: "body2", sx: { opacity: 0.8, color: "inherit" }, children: typeof subheader === "string" ? /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(TranslateText, { overrideNamespace, children: subheader }) : subheader })
5064
5130
  }
5065
5131
  ),
5066
- /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(import_material27.Divider, { sx: { borderColor: "inherit", opacity: 0.2 } }),
5067
- /* @__PURE__ */ (0, import_jsx_runtime37.jsxs)(import_material27.CardContent, { sx: { flexGrow: 1 }, children: [
5068
- /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(import_material27.Typography, { variant: "body2", sx: { opacity: 0.85, color: "inherit" }, children: typeof description === "string" ? /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(TranslateText, { overrideNamespace, children: description }) : description }),
5069
- links && links.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(import_material27.List, { dense: true, disablePadding: true, children: links.filter((f) => !f.hidden).map((link, index) => /* @__PURE__ */ (0, import_jsx_runtime37.jsxs)(
5070
- import_material27.ListItem,
5132
+ /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(import_material28.Divider, { sx: { borderColor: "inherit", opacity: 0.2 } }),
5133
+ /* @__PURE__ */ (0, import_jsx_runtime38.jsxs)(import_material28.CardContent, { sx: { flexGrow: 1 }, children: [
5134
+ /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(import_material28.Typography, { variant: "body2", sx: { opacity: 0.85, color: "inherit" }, children: typeof description === "string" ? /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(TranslateText, { overrideNamespace, children: description }) : description }),
5135
+ links && links.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(import_material28.List, { dense: true, disablePadding: true, children: links.filter((f) => !f.hidden).map((link, index) => /* @__PURE__ */ (0, import_jsx_runtime38.jsxs)(
5136
+ import_material28.ListItem,
5071
5137
  {
5072
5138
  disablePadding: true,
5073
5139
  sx: {
@@ -5078,18 +5144,18 @@ var PageLinkComponent = ({
5078
5144
  }
5079
5145
  },
5080
5146
  children: [
5081
- /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(
5082
- import_material27.ListItemIcon,
5147
+ /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(
5148
+ import_material28.ListItemIcon,
5083
5149
  {
5084
5150
  sx: { minWidth: 30, cursor: "pointer", color: "inherit" },
5085
5151
  onClick: () => {
5086
5152
  if (link?.href) navigate(link.href);
5087
5153
  },
5088
- children: /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(import_icons_material4.ArrowRight, { fontSize: "small", color: "inherit" })
5154
+ children: /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(import_icons_material4.ArrowRight, { fontSize: "small", color: "inherit" })
5089
5155
  }
5090
5156
  ),
5091
- /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(import_material27.ListItemText, { children: link.onClick ? /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(
5092
- import_material27.Button,
5157
+ /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(import_material28.ListItemText, { children: link.onClick ? /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(
5158
+ import_material28.Button,
5093
5159
  {
5094
5160
  size: "small",
5095
5161
  variant: "text",
@@ -5112,10 +5178,10 @@ var PageLinkComponent = ({
5112
5178
  // Эффект подчеркивания, как у ссылки
5113
5179
  }
5114
5180
  },
5115
- children: typeof link.text === "string" ? /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(TranslateText, { overrideNamespace, children: link.text }) : link.text
5181
+ children: typeof link.text === "string" ? /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(TranslateText, { overrideNamespace, children: link.text }) : link.text
5116
5182
  }
5117
- ) : link.href ? /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(
5118
- import_material27.Link,
5183
+ ) : link.href ? /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(
5184
+ import_material28.Link,
5119
5185
  {
5120
5186
  component: import_react_router_dom.Link,
5121
5187
  to: link.href,
@@ -5132,15 +5198,15 @@ var PageLinkComponent = ({
5132
5198
  backgroundColor: "transparent"
5133
5199
  }
5134
5200
  },
5135
- children: typeof link.text === "string" ? /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(TranslateText, { overrideNamespace, children: link.text }) : link.text
5201
+ children: typeof link.text === "string" ? /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(TranslateText, { overrideNamespace, children: link.text }) : link.text
5136
5202
  }
5137
- ) : /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(import_material27.Typography, { variant: "body2", sx: { fontWeight: 500, color: "inherit" }, children: typeof link.text === "string" ? /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(TranslateText, { overrideNamespace, children: link.text }) : link.text }) })
5203
+ ) : /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(import_material28.Typography, { variant: "body2", sx: { fontWeight: 500, color: "inherit" }, children: typeof link.text === "string" ? /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(TranslateText, { overrideNamespace, children: link.text }) : link.text }) })
5138
5204
  ]
5139
5205
  },
5140
5206
  index
5141
5207
  )) })
5142
5208
  ] }),
5143
- actionButtonText && onActionButtonClick && /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(import_material27.CardActions, { sx: { justifyContent: "flex-end", padding: 2 }, children: /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(import_material27.Button, { size: "small", variant: "contained", onClick: onActionButtonClick, children: typeof actionButtonText === "string" ? /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(TranslateText, { overrideNamespace, children: actionButtonText }) : actionButtonText }) })
5209
+ actionButtonText && onActionButtonClick && /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(import_material28.CardActions, { sx: { justifyContent: "flex-end", padding: 2 }, children: /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(import_material28.Button, { size: "small", variant: "contained", onClick: onActionButtonClick, children: typeof actionButtonText === "string" ? /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(TranslateText, { overrideNamespace, children: actionButtonText }) : actionButtonText }) })
5144
5210
  ]
5145
5211
  }
5146
5212
  );
@@ -5148,13 +5214,13 @@ var PageLinkComponent = ({
5148
5214
 
5149
5215
  // src/UI/components/layout/CollapsedContainerComponent.tsx
5150
5216
  var import_icons_material5 = require("@mui/icons-material");
5151
- var import_material28 = require("@mui/material");
5152
- var import_react32 = require("react");
5217
+ var import_material29 = require("@mui/material");
5218
+ var import_react33 = require("react");
5153
5219
  init_context();
5154
- var import_jsx_runtime38 = require("react/jsx-runtime");
5155
- var ExpandMore = (0, import_material28.styled)((props) => {
5220
+ var import_jsx_runtime39 = require("react/jsx-runtime");
5221
+ var ExpandMore = (0, import_material29.styled)((props) => {
5156
5222
  const { expand, ...other } = props;
5157
- return /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(import_material28.IconButton, { size: "small", ...other, children: /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(import_icons_material5.ExpandMore, {}) });
5223
+ return /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(import_material29.IconButton, { size: "small", ...other, children: /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(import_icons_material5.ExpandMore, {}) });
5158
5224
  })(({ theme, expand }) => ({
5159
5225
  transform: !expand ? "rotate(0deg)" : "rotate(180deg)",
5160
5226
  transition: theme.transitions.create("transform", {
@@ -5169,14 +5235,14 @@ var ExpandMore = (0, import_material28.styled)((props) => {
5169
5235
  }));
5170
5236
  var CollapsedContainerComponent = (props) => {
5171
5237
  const { displayState } = useAppTheme();
5172
- const [expanded, setExpanded] = (0, import_react32.useState)(props.expanded === void 0 ? false : props.expanded);
5238
+ const [expanded, setExpanded] = (0, import_react33.useState)(props.expanded === void 0 ? false : props.expanded);
5173
5239
  const handleExpandClick = () => {
5174
5240
  setExpanded(!expanded);
5175
5241
  props.onExpanded && props.onExpanded(!expanded);
5176
5242
  };
5177
- return /* @__PURE__ */ (0, import_jsx_runtime38.jsxs)(import_material28.Card, { sx: { width: "100%", overflow: "hidden", mb: 2, boxShadow: displayState.isMobile ? "none" : props.disableShadow ? "none" : "0 20px 25px -5px rgb(0 0 0 / 0.1)", borderRadius: displayState.isMobile ? 0 : 1 }, children: [
5178
- /* @__PURE__ */ (0, import_jsx_runtime38.jsxs)(
5179
- import_material28.Box,
5243
+ return /* @__PURE__ */ (0, import_jsx_runtime39.jsxs)(import_material29.Card, { sx: { width: "100%", overflow: "hidden", mb: 2, boxShadow: displayState.isMobile ? "none" : props.disableShadow ? "none" : "0 20px 25px -5px rgb(0 0 0 / 0.1)", borderRadius: displayState.isMobile ? 0 : 1 }, children: [
5244
+ /* @__PURE__ */ (0, import_jsx_runtime39.jsxs)(
5245
+ import_material29.Box,
5180
5246
  {
5181
5247
  onClick: () => handleExpandClick(),
5182
5248
  sx: {
@@ -5187,16 +5253,16 @@ var CollapsedContainerComponent = (props) => {
5187
5253
  pr: 2
5188
5254
  },
5189
5255
  children: [
5190
- /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(
5191
- import_material28.CardHeader,
5256
+ /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(
5257
+ import_material29.CardHeader,
5192
5258
  {
5193
5259
  sx: { flexGrow: 1 },
5194
- avatar: /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(import_material28.Avatar, { sx: { bgcolor: "primary.main" }, children: props.icon }),
5195
- title: typeof props.title === "string" ? /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(import_material28.Typography, { variant: "subtitle1", sx: { fontWeight: "700" }, children: /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(TranslateText, { overrideNamespace: props.overrideNamespace, children: props.title }) }) : props.title,
5196
- subheader: typeof props.subtitle === "string" ? /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(TranslateText, { overrideNamespace: props.overrideNamespace, children: props.subtitle }) : props.subtitle
5260
+ avatar: /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(import_material29.Avatar, { sx: { bgcolor: "primary.main" }, children: props.icon }),
5261
+ title: typeof props.title === "string" ? /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(import_material29.Typography, { variant: "subtitle1", sx: { fontWeight: "700" }, children: /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(TranslateText, { overrideNamespace: props.overrideNamespace, children: props.title }) }) : props.title,
5262
+ subheader: typeof props.subtitle === "string" ? /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(TranslateText, { overrideNamespace: props.overrideNamespace, children: props.subtitle }) : props.subtitle
5197
5263
  }
5198
5264
  ),
5199
- /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(import_material28.Tooltip, { title: expanded ? "Show Less" : "Show More", children: /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(import_material28.Box, { sx: { ml: 1 }, children: /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(
5265
+ /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(import_material29.Tooltip, { title: expanded ? "Show Less" : "Show More", children: /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(import_material29.Box, { sx: { ml: 1 }, children: /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(
5200
5266
  ExpandMore,
5201
5267
  {
5202
5268
  expand: expanded,
@@ -5207,31 +5273,31 @@ var CollapsedContainerComponent = (props) => {
5207
5273
  ]
5208
5274
  }
5209
5275
  ),
5210
- /* @__PURE__ */ (0, import_jsx_runtime38.jsxs)(import_material28.Collapse, { in: expanded, timeout: "auto", children: [
5211
- /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(import_material28.Divider, { variant: "middle" }),
5212
- /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(import_material28.CardContent, { children: props.children })
5276
+ /* @__PURE__ */ (0, import_jsx_runtime39.jsxs)(import_material29.Collapse, { in: expanded, timeout: "auto", children: [
5277
+ /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(import_material29.Divider, { variant: "middle" }),
5278
+ /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(import_material29.CardContent, { children: props.children })
5213
5279
  ] })
5214
5280
  ] });
5215
5281
  };
5216
5282
 
5217
5283
  // src/i18n/LanguageSelector.tsx
5218
- var import_react33 = require("react");
5284
+ var import_react34 = require("react");
5219
5285
  var import_react_i18next6 = require("react-i18next");
5220
- var import_material29 = require("@mui/material");
5286
+ var import_material30 = require("@mui/material");
5221
5287
  init_LocalizationProvider();
5222
5288
  init_UserSettingsProvider();
5223
5289
  init_SupabaseProvider();
5224
- var import_jsx_runtime39 = require("react/jsx-runtime");
5290
+ var import_jsx_runtime40 = require("react/jsx-runtime");
5225
5291
  var LanguageSelector = () => {
5226
5292
  const supabase = useSupabase();
5227
5293
  const { i18n: i18n2 } = (0, import_react_i18next6.useTranslation)();
5228
- const [languages, setLanguages] = (0, import_react33.useState)([]);
5229
- const [loading, setLoading] = (0, import_react33.useState)(true);
5294
+ const [languages, setLanguages] = (0, import_react34.useState)([]);
5295
+ const [loading, setLoading] = (0, import_react34.useState)(true);
5230
5296
  const { changeLanguage } = useLocalization();
5231
5297
  const { settings: userSettings, setLanguage } = useUserSettings();
5232
- const [anchorEl, setAnchorEl] = (0, import_react33.useState)(null);
5298
+ const [anchorEl, setAnchorEl] = (0, import_react34.useState)(null);
5233
5299
  const open = Boolean(anchorEl);
5234
- (0, import_react33.useEffect)(() => {
5300
+ (0, import_react34.useEffect)(() => {
5235
5301
  const fetchLanguages = async () => {
5236
5302
  try {
5237
5303
  const { data, error } = await supabase.from("languages").select("code, name, svg_flag").eq("enabled", true);
@@ -5258,14 +5324,14 @@ var LanguageSelector = () => {
5258
5324
  handleClose();
5259
5325
  };
5260
5326
  if (loading) {
5261
- return /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(import_material29.CircularProgress, { size: 20, color: "inherit", sx: { mx: 1 } });
5327
+ return /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(import_material30.CircularProgress, { size: 20, color: "inherit", sx: { mx: 1 } });
5262
5328
  }
5263
5329
  const rawCurrentLang = i18n2.language || "uk";
5264
5330
  const currentLangCode = rawCurrentLang.split("-")[0];
5265
5331
  const currentLang = languages.find((l) => l.code === currentLangCode) || languages[0];
5266
- return /* @__PURE__ */ (0, import_jsx_runtime39.jsxs)(import_jsx_runtime39.Fragment, { children: [
5267
- /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(import_material29.Tooltip, { title: currentLang ? currentLang.name : "\u041C\u043E\u0432\u0430", arrow: true, placement: "bottom", children: /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(
5268
- import_material29.IconButton,
5332
+ return /* @__PURE__ */ (0, import_jsx_runtime40.jsxs)(import_jsx_runtime40.Fragment, { children: [
5333
+ /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(import_material30.Tooltip, { title: currentLang ? currentLang.name : "\u041C\u043E\u0432\u0430", arrow: true, placement: "bottom", children: /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(
5334
+ import_material30.IconButton,
5269
5335
  {
5270
5336
  onClick: handleClick,
5271
5337
  size: "small",
@@ -5280,8 +5346,8 @@ var LanguageSelector = () => {
5280
5346
  backgroundColor: "action.hover"
5281
5347
  }
5282
5348
  },
5283
- children: currentLang?.svg_flag && /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(
5284
- import_material29.Box,
5349
+ children: currentLang?.svg_flag && /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(
5350
+ import_material30.Box,
5285
5351
  {
5286
5352
  sx: {
5287
5353
  width: 24,
@@ -5300,8 +5366,8 @@ var LanguageSelector = () => {
5300
5366
  )
5301
5367
  }
5302
5368
  ) }),
5303
- /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(
5304
- import_material29.Menu,
5369
+ /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(
5370
+ import_material30.Menu,
5305
5371
  {
5306
5372
  id: "language-menu",
5307
5373
  anchorEl,
@@ -5321,8 +5387,8 @@ var LanguageSelector = () => {
5321
5387
  anchorOrigin: { horizontal: "right", vertical: "bottom" },
5322
5388
  children: languages.map((lang) => {
5323
5389
  const isSelected = lang.code === currentLangCode;
5324
- return /* @__PURE__ */ (0, import_jsx_runtime39.jsxs)(
5325
- import_material29.MenuItem,
5390
+ return /* @__PURE__ */ (0, import_jsx_runtime40.jsxs)(
5391
+ import_material30.MenuItem,
5326
5392
  {
5327
5393
  selected: isSelected,
5328
5394
  onClick: () => handleSelectLanguage(lang.code),
@@ -5334,8 +5400,8 @@ var LanguageSelector = () => {
5334
5400
  px: 2
5335
5401
  },
5336
5402
  children: [
5337
- /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(
5338
- import_material29.Box,
5403
+ /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(
5404
+ import_material30.Box,
5339
5405
  {
5340
5406
  sx: {
5341
5407
  width: 22,
@@ -5349,7 +5415,7 @@ var LanguageSelector = () => {
5349
5415
  dangerouslySetInnerHTML: { __html: lang.svg_flag }
5350
5416
  }
5351
5417
  ),
5352
- /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(import_material29.Typography, { variant: "body2", sx: { fontWeight: isSelected ? 600 : 400 }, children: lang.name })
5418
+ /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(import_material30.Typography, { variant: "body2", sx: { fontWeight: isSelected ? 600 : 400 }, children: lang.name })
5353
5419
  ]
5354
5420
  },
5355
5421
  lang.code
@@ -5363,11 +5429,11 @@ var PublicLanguageSelector = () => {
5363
5429
  const supabase = useSupabase();
5364
5430
  const { i18n: i18n2 } = (0, import_react_i18next6.useTranslation)();
5365
5431
  const { changeLanguage } = useLocalization();
5366
- const [languages, setLanguages] = (0, import_react33.useState)([]);
5367
- const [loading, setLoading] = (0, import_react33.useState)(true);
5368
- const [anchorEl, setAnchorEl] = (0, import_react33.useState)(null);
5432
+ const [languages, setLanguages] = (0, import_react34.useState)([]);
5433
+ const [loading, setLoading] = (0, import_react34.useState)(true);
5434
+ const [anchorEl, setAnchorEl] = (0, import_react34.useState)(null);
5369
5435
  const open = Boolean(anchorEl);
5370
- (0, import_react33.useEffect)(() => {
5436
+ (0, import_react34.useEffect)(() => {
5371
5437
  const fetchLanguages = async () => {
5372
5438
  try {
5373
5439
  const { data, error } = await supabase.from("languages").select("code, name, svg_flag").eq("enabled", true);
@@ -5392,14 +5458,14 @@ var PublicLanguageSelector = () => {
5392
5458
  handleClose();
5393
5459
  };
5394
5460
  if (loading) {
5395
- return /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(import_material29.CircularProgress, { size: 20, color: "inherit", sx: { mx: 1 } });
5461
+ return /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(import_material30.CircularProgress, { size: 20, color: "inherit", sx: { mx: 1 } });
5396
5462
  }
5397
5463
  const rawCurrentLang = i18n2.language || "uk";
5398
5464
  const currentLangCode = rawCurrentLang.split("-")[0];
5399
5465
  const currentLang = languages.find((l) => l.code === currentLangCode) || languages[0];
5400
- return /* @__PURE__ */ (0, import_jsx_runtime39.jsxs)(import_jsx_runtime39.Fragment, { children: [
5401
- /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(import_material29.Tooltip, { title: currentLang ? currentLang.name : "\u041C\u043E\u0432\u0430", arrow: true, placement: "bottom", children: /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(
5402
- import_material29.IconButton,
5466
+ return /* @__PURE__ */ (0, import_jsx_runtime40.jsxs)(import_jsx_runtime40.Fragment, { children: [
5467
+ /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(import_material30.Tooltip, { title: currentLang ? currentLang.name : "\u041C\u043E\u0432\u0430", arrow: true, placement: "bottom", children: /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(
5468
+ import_material30.IconButton,
5403
5469
  {
5404
5470
  onClick: handleClick,
5405
5471
  size: "small",
@@ -5414,8 +5480,8 @@ var PublicLanguageSelector = () => {
5414
5480
  backgroundColor: "action.hover"
5415
5481
  }
5416
5482
  },
5417
- children: currentLang?.svg_flag && /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(
5418
- import_material29.Box,
5483
+ children: currentLang?.svg_flag && /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(
5484
+ import_material30.Box,
5419
5485
  {
5420
5486
  sx: {
5421
5487
  width: 24,
@@ -5434,8 +5500,8 @@ var PublicLanguageSelector = () => {
5434
5500
  )
5435
5501
  }
5436
5502
  ) }),
5437
- /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(
5438
- import_material29.Menu,
5503
+ /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(
5504
+ import_material30.Menu,
5439
5505
  {
5440
5506
  id: "language-menu",
5441
5507
  anchorEl,
@@ -5455,8 +5521,8 @@ var PublicLanguageSelector = () => {
5455
5521
  anchorOrigin: { horizontal: "right", vertical: "bottom" },
5456
5522
  children: languages.map((lang) => {
5457
5523
  const isSelected = lang.code === currentLangCode;
5458
- return /* @__PURE__ */ (0, import_jsx_runtime39.jsxs)(
5459
- import_material29.MenuItem,
5524
+ return /* @__PURE__ */ (0, import_jsx_runtime40.jsxs)(
5525
+ import_material30.MenuItem,
5460
5526
  {
5461
5527
  selected: isSelected,
5462
5528
  onClick: () => handleSelectLanguage(lang.code),
@@ -5468,8 +5534,8 @@ var PublicLanguageSelector = () => {
5468
5534
  px: 2
5469
5535
  },
5470
5536
  children: [
5471
- /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(
5472
- import_material29.Box,
5537
+ /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(
5538
+ import_material30.Box,
5473
5539
  {
5474
5540
  sx: {
5475
5541
  width: 22,
@@ -5483,7 +5549,7 @@ var PublicLanguageSelector = () => {
5483
5549
  dangerouslySetInnerHTML: { __html: lang.svg_flag }
5484
5550
  }
5485
5551
  ),
5486
- /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(import_material29.Typography, { variant: "body2", sx: { fontWeight: isSelected ? 600 : 400 }, children: lang.name })
5552
+ /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(import_material30.Typography, { variant: "body2", sx: { fontWeight: isSelected ? 600 : 400 }, children: lang.name })
5487
5553
  ]
5488
5554
  },
5489
5555
  lang.code
@@ -5494,6 +5560,76 @@ var PublicLanguageSelector = () => {
5494
5560
  ] });
5495
5561
  };
5496
5562
 
5563
+ // src/UI/components/tables/TablePaginationComponent.tsx
5564
+ var import_material31 = require("@mui/material");
5565
+ var import_FirstPage = __toESM(require("@mui/icons-material/FirstPage"));
5566
+ var import_KeyboardArrowLeft = __toESM(require("@mui/icons-material/KeyboardArrowLeft"));
5567
+ var import_KeyboardArrowRight = __toESM(require("@mui/icons-material/KeyboardArrowRight"));
5568
+ var import_LastPage = __toESM(require("@mui/icons-material/LastPage"));
5569
+ init_TranslatableTooltipComponent();
5570
+ init_context();
5571
+ var import_jsx_runtime41 = require("react/jsx-runtime");
5572
+ var CustomPaginationActions = (props) => {
5573
+ const {
5574
+ count,
5575
+ page,
5576
+ rowsPerPage,
5577
+ onPageChange,
5578
+ showFirstButton,
5579
+ showLastButton,
5580
+ overrideNamespace
5581
+ } = props;
5582
+ const ns = overrideNamespace || "form_components";
5583
+ const handleFirstPage = (e) => onPageChange(e, 0);
5584
+ const handleBack = (e) => onPageChange(e, page - 1);
5585
+ const handleNext = (e) => onPageChange(e, page + 1);
5586
+ const handleLast = (e) => onPageChange(e, Math.max(0, Math.ceil(count / rowsPerPage) - 1));
5587
+ const isFirstDisabled = page === 0;
5588
+ const isLastDisabled = page >= Math.ceil(count / rowsPerPage) - 1;
5589
+ return /* @__PURE__ */ (0, import_jsx_runtime41.jsxs)(import_material31.Box, { sx: { flexShrink: 0, ml: 2, display: "flex", alignItems: "center" }, children: [
5590
+ showFirstButton && /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(TranslatableTooltipComponent, { title: /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(TranslateText, { overrideNamespace: ns, children: "First page" }), children: /* @__PURE__ */ (0, import_jsx_runtime41.jsx)("span", { children: /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(import_material31.IconButton, { onClick: handleFirstPage, disabled: isFirstDisabled, size: "small", children: /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(import_FirstPage.default, {}) }) }) }),
5591
+ /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(TranslatableTooltipComponent, { title: /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(TranslateText, { overrideNamespace: ns, children: "Previous page" }), children: /* @__PURE__ */ (0, import_jsx_runtime41.jsx)("span", { children: /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(import_material31.IconButton, { onClick: handleBack, disabled: isFirstDisabled, size: "small", children: /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(import_KeyboardArrowLeft.default, {}) }) }) }),
5592
+ /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(TranslatableTooltipComponent, { title: /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(TranslateText, { overrideNamespace: ns, children: "Next page" }), children: /* @__PURE__ */ (0, import_jsx_runtime41.jsx)("span", { children: /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(import_material31.IconButton, { onClick: handleNext, disabled: isLastDisabled, size: "small", children: /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(import_KeyboardArrowRight.default, {}) }) }) }),
5593
+ showLastButton && /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(TranslatableTooltipComponent, { title: /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(TranslateText, { overrideNamespace: ns, children: "Last page" }), children: /* @__PURE__ */ (0, import_jsx_runtime41.jsx)("span", { children: /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(import_material31.IconButton, { onClick: handleLast, disabled: isLastDisabled, size: "small", children: /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(import_LastPage.default, {}) }) }) })
5594
+ ] });
5595
+ };
5596
+ var TablePaginationComponent = ({
5597
+ overrideNamespace,
5598
+ rowsPerPageOptions = [5, 10, 25, 50],
5599
+ count,
5600
+ rowsPerPage,
5601
+ page,
5602
+ onPageChange,
5603
+ onRowsPerPageChange
5604
+ }) => {
5605
+ const { displayState } = useAppTheme();
5606
+ const activeNamespace = overrideNamespace || "form_components";
5607
+ return /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(
5608
+ import_material31.TablePagination,
5609
+ {
5610
+ rowsPerPageOptions,
5611
+ component: "div",
5612
+ count,
5613
+ rowsPerPage,
5614
+ page,
5615
+ onPageChange,
5616
+ onRowsPerPageChange,
5617
+ showFirstButton: true,
5618
+ showLastButton: true,
5619
+ labelRowsPerPage: displayState.isMobile ? /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(import_jsx_runtime41.Fragment, {}) : /* @__PURE__ */ (0, import_jsx_runtime41.jsxs)(import_jsx_runtime41.Fragment, { children: [
5620
+ /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(TranslateText, { overrideNamespace: activeNamespace, children: "Rows per page" }),
5621
+ ":"
5622
+ ] }),
5623
+ ActionsComponent: CustomPaginationActions,
5624
+ slotProps: {
5625
+ actions: {
5626
+ overrideNamespace: activeNamespace
5627
+ }
5628
+ }
5629
+ }
5630
+ );
5631
+ };
5632
+
5497
5633
  // src/types/index.ts
5498
5634
  init_user_types();
5499
5635
 
@@ -5517,16 +5653,16 @@ var Services = {
5517
5653
  };
5518
5654
 
5519
5655
  // src/hooks/useUserStatus.ts
5520
- var import_react34 = require("react");
5656
+ var import_react35 = require("react");
5521
5657
  init_deviceId();
5522
5658
  init_context();
5523
5659
  var ONLINE_THRESHOLD_MINUTES = 2;
5524
5660
  var AWAY_THRESHOLD_MINUTES = 15;
5525
5661
  var useUserStatus2 = (userId, initialLastSeenAt, currentAuthUserId) => {
5526
5662
  const supabase = useSupabase();
5527
- const [status, setStatus] = (0, import_react34.useState)("offline");
5528
- const [lastSeen, setLastSeen] = (0, import_react34.useState)(initialLastSeenAt ?? null);
5529
- const lastSeenRef = (0, import_react34.useRef)(initialLastSeenAt ?? null);
5663
+ const [status, setStatus] = (0, import_react35.useState)("offline");
5664
+ const [lastSeen, setLastSeen] = (0, import_react35.useState)(initialLastSeenAt ?? null);
5665
+ const lastSeenRef = (0, import_react35.useRef)(initialLastSeenAt ?? null);
5530
5666
  lastSeenRef.current = lastSeen;
5531
5667
  const calculateStatus = (isOnline, lastSeenIso) => {
5532
5668
  if (isOnline) return "online";
@@ -5542,7 +5678,7 @@ var useUserStatus2 = (userId, initialLastSeenAt, currentAuthUserId) => {
5542
5678
  }
5543
5679
  return "offline";
5544
5680
  };
5545
- (0, import_react34.useEffect)(() => {
5681
+ (0, import_react35.useEffect)(() => {
5546
5682
  if (!userId) return;
5547
5683
  let isMounted = true;
5548
5684
  const isSelf = currentAuthUserId && userId === currentAuthUserId;
@@ -5671,6 +5807,7 @@ var Utils = {
5671
5807
  Services,
5672
5808
  SupabaseProvider,
5673
5809
  SwitchComponent,
5810
+ TablePaginationComponent,
5674
5811
  TextFieldComponent,
5675
5812
  ThemeProvider,
5676
5813
  ToastProvider,
@@ -5678,6 +5815,7 @@ var Utils = {
5678
5815
  TranslateProvider,
5679
5816
  TranslateText,
5680
5817
  TranslationEditProvider,
5818
+ TruncatedTypography,
5681
5819
  UrlComponent,
5682
5820
  UserAvatarComponent,
5683
5821
  UserPopoverComponent,