@serhii.olishevskyi/docs 1.2.22 → 1.2.24
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/{UserPopoverComponent-RAEPOSIE.mjs → UserPopoverComponent-VFSZ5ZO2.mjs} +1 -1
- package/dist/index.d.mts +93 -98
- package/dist/index.d.ts +93 -98
- package/dist/index.js +1585 -1838
- package/dist/index.mjs +1016 -1301
- package/package.json +1 -1
- package/dist/{chunk-4NEOJ5KZ.mjs → chunk-VFNVP7VE.mjs} +1 -1
package/dist/index.mjs
CHANGED
|
@@ -15,7 +15,7 @@ import {
|
|
|
15
15
|
TranslateText,
|
|
16
16
|
TranslationDialog,
|
|
17
17
|
TranslationEditProvider,
|
|
18
|
-
|
|
18
|
+
UserPopoverComponent,
|
|
19
19
|
UserRoleChipComponent,
|
|
20
20
|
UserSettingsProvider,
|
|
21
21
|
UserStatusChipComponent,
|
|
@@ -43,7 +43,7 @@ import {
|
|
|
43
43
|
useTranslationEdit,
|
|
44
44
|
useTranslationNamespace,
|
|
45
45
|
useUserSettings
|
|
46
|
-
} from "./chunk-
|
|
46
|
+
} from "./chunk-VFNVP7VE.mjs";
|
|
47
47
|
|
|
48
48
|
// src/UI/components/inputs/TextFieldComponent.tsx
|
|
49
49
|
import { useState } from "react";
|
|
@@ -477,208 +477,9 @@ var NumberInputComponent = ({
|
|
|
477
477
|
);
|
|
478
478
|
};
|
|
479
479
|
|
|
480
|
-
// src/UI/components/inputs/UrlComponent.tsx
|
|
481
|
-
import { useState as useState3 } from "react";
|
|
482
|
-
import {
|
|
483
|
-
TextField as TextField2,
|
|
484
|
-
InputAdornment as InputAdornment3,
|
|
485
|
-
IconButton as IconButton3,
|
|
486
|
-
Tooltip as Tooltip2,
|
|
487
|
-
Popover,
|
|
488
|
-
Box as Box3,
|
|
489
|
-
Typography,
|
|
490
|
-
Button
|
|
491
|
-
} from "@mui/material";
|
|
492
|
-
import LinkIcon from "@mui/icons-material/Link";
|
|
493
|
-
import LaunchIcon from "@mui/icons-material/Launch";
|
|
494
|
-
import ContentCopyIcon2 from "@mui/icons-material/ContentCopy";
|
|
495
|
-
import CheckIcon2 from "@mui/icons-material/Check";
|
|
496
|
-
import EditNoteIcon from "@mui/icons-material/EditNote";
|
|
497
|
-
import LockIcon2 from "@mui/icons-material/Lock";
|
|
498
|
-
import { Fragment as Fragment3, jsx as jsx3, jsxs as jsxs3 } from "react/jsx-runtime";
|
|
499
|
-
function UrlComponent({
|
|
500
|
-
overrideNamespace,
|
|
501
|
-
label,
|
|
502
|
-
value,
|
|
503
|
-
onChange,
|
|
504
|
-
disabled = false,
|
|
505
|
-
readOnly = false,
|
|
506
|
-
required = false,
|
|
507
|
-
error = false,
|
|
508
|
-
helperText = "",
|
|
509
|
-
description = "",
|
|
510
|
-
fullWidth = true,
|
|
511
|
-
openInNewTab = true,
|
|
512
|
-
showLock = true,
|
|
513
|
-
lockTooltip = "Field is not editable",
|
|
514
|
-
sx
|
|
515
|
-
}) {
|
|
516
|
-
const [copied, setCopied] = useState3(false);
|
|
517
|
-
const [anchorEl, setAnchorEl] = useState3(null);
|
|
518
|
-
const isViewMode = disabled || readOnly;
|
|
519
|
-
const currentUrl = typeof value === "object" && value !== null ? value.url || "" : value || "";
|
|
520
|
-
const currentTitle = typeof value === "object" && value !== null ? value.title || "" : "";
|
|
521
|
-
const getFormattedUrl = (val) => {
|
|
522
|
-
if (!val) return "";
|
|
523
|
-
const trimmed = val.trim();
|
|
524
|
-
if (trimmed.match(/^[a-zA-Z]+:\/\//)) {
|
|
525
|
-
return trimmed;
|
|
526
|
-
}
|
|
527
|
-
return `https://${trimmed}`;
|
|
528
|
-
};
|
|
529
|
-
const finalUrl = getFormattedUrl(currentUrl);
|
|
530
|
-
const targetAttribute = openInNewTab ? "_blank" : "_self";
|
|
531
|
-
const displayLabelText = currentTitle.trim() || currentUrl;
|
|
532
|
-
const handleUrlChange = (newUrl) => {
|
|
533
|
-
onChange?.({ url: newUrl, title: currentTitle });
|
|
534
|
-
};
|
|
535
|
-
const handleTitleChange = (newTitle) => {
|
|
536
|
-
onChange?.({ url: currentUrl, title: newTitle });
|
|
537
|
-
};
|
|
538
|
-
const handleCopy = (e) => {
|
|
539
|
-
e.stopPropagation();
|
|
540
|
-
if (!finalUrl) return;
|
|
541
|
-
navigator.clipboard.writeText(finalUrl);
|
|
542
|
-
setCopied(true);
|
|
543
|
-
setTimeout(() => setCopied(false), 2e3);
|
|
544
|
-
};
|
|
545
|
-
const handleOpenLink = (e) => {
|
|
546
|
-
e.stopPropagation();
|
|
547
|
-
if (finalUrl) {
|
|
548
|
-
window.open(finalUrl, targetAttribute, openInNewTab ? "noopener,noreferrer" : void 0);
|
|
549
|
-
}
|
|
550
|
-
};
|
|
551
|
-
const handleInputClick = (e) => {
|
|
552
|
-
if (isViewMode && finalUrl) {
|
|
553
|
-
handleOpenLink(e);
|
|
554
|
-
}
|
|
555
|
-
};
|
|
556
|
-
const handleOpenTitleMenu = (e) => {
|
|
557
|
-
e.stopPropagation();
|
|
558
|
-
setAnchorEl(e.currentTarget);
|
|
559
|
-
};
|
|
560
|
-
const handleCloseTitleMenu = () => {
|
|
561
|
-
setAnchorEl(null);
|
|
562
|
-
};
|
|
563
|
-
const isTitlePopoverOpen = Boolean(anchorEl);
|
|
564
|
-
const displayHelperText = error ? helperText : description || helperText;
|
|
565
|
-
return /* @__PURE__ */ jsxs3(Fragment3, { children: [
|
|
566
|
-
/* @__PURE__ */ jsx3(
|
|
567
|
-
TextField2,
|
|
568
|
-
{
|
|
569
|
-
label: /* @__PURE__ */ jsx3(TranslateText, { overrideNamespace, children: label }),
|
|
570
|
-
type: isViewMode ? "text" : "url",
|
|
571
|
-
value: isViewMode ? displayLabelText : currentUrl,
|
|
572
|
-
onChange: (e) => handleUrlChange(e.target.value),
|
|
573
|
-
required,
|
|
574
|
-
error,
|
|
575
|
-
disabled,
|
|
576
|
-
margin: "dense",
|
|
577
|
-
helperText: displayHelperText,
|
|
578
|
-
fullWidth,
|
|
579
|
-
placeholder: "example.com",
|
|
580
|
-
sx: {
|
|
581
|
-
"& .MuiInputLabel-asterisk": {
|
|
582
|
-
color: "red",
|
|
583
|
-
fontSize: "1.5rem"
|
|
584
|
-
},
|
|
585
|
-
"& .MuiInputBase-input": {
|
|
586
|
-
color: isViewMode && finalUrl ? "primary.main" : void 0,
|
|
587
|
-
textDecoration: isViewMode && finalUrl ? "underline" : "none",
|
|
588
|
-
cursor: isViewMode && finalUrl ? "pointer" : void 0,
|
|
589
|
-
fontWeight: isViewMode && finalUrl ? 500 : void 0
|
|
590
|
-
},
|
|
591
|
-
...sx
|
|
592
|
-
},
|
|
593
|
-
slotProps: {
|
|
594
|
-
htmlInput: {
|
|
595
|
-
readOnly,
|
|
596
|
-
onClick: handleInputClick
|
|
597
|
-
},
|
|
598
|
-
input: {
|
|
599
|
-
startAdornment: /* @__PURE__ */ jsx3(InputAdornment3, { position: "start", children: /* @__PURE__ */ jsx3(LinkIcon, { fontSize: "small", color: isViewMode && finalUrl ? "primary" : "action" }) }),
|
|
600
|
-
endAdornment: /* @__PURE__ */ jsxs3(InputAdornment3, { position: "end", sx: { gap: 0.5 }, children: [
|
|
601
|
-
!isViewMode && /* @__PURE__ */ jsx3(Tooltip2, { title: currentTitle ? `Title: "${currentTitle}"` : /* @__PURE__ */ jsx3(TranslateText, { overrideNamespace: overrideNamespace || "form_components", children: "Set link title" }), children: /* @__PURE__ */ jsx3(
|
|
602
|
-
IconButton3,
|
|
603
|
-
{
|
|
604
|
-
size: "small",
|
|
605
|
-
onClick: handleOpenTitleMenu,
|
|
606
|
-
color: currentTitle ? "primary" : "default",
|
|
607
|
-
children: /* @__PURE__ */ jsx3(EditNoteIcon, { fontSize: "small" })
|
|
608
|
-
}
|
|
609
|
-
) }),
|
|
610
|
-
finalUrl && /* @__PURE__ */ jsx3(Tooltip2, { title: copied ? /* @__PURE__ */ jsx3(TranslateText, { overrideNamespace: overrideNamespace || "form_components", children: "Copied!" }) : /* @__PURE__ */ jsx3(TranslateText, { overrideNamespace: overrideNamespace || "form_components", children: "Copy link" }), children: /* @__PURE__ */ jsx3(IconButton3, { size: "small", onClick: handleCopy, color: copied ? "success" : "default", children: copied ? /* @__PURE__ */ jsx3(CheckIcon2, { fontSize: "small" }) : /* @__PURE__ */ jsx3(ContentCopyIcon2, { fontSize: "small" }) }) }),
|
|
611
|
-
isViewMode && showLock && /* @__PURE__ */ jsx3(Tooltip2, { title: /* @__PURE__ */ jsx3(TranslateText, { overrideNamespace, children: lockTooltip }), children: /* @__PURE__ */ jsx3(
|
|
612
|
-
IconButton3,
|
|
613
|
-
{
|
|
614
|
-
size: "small",
|
|
615
|
-
disabled: true,
|
|
616
|
-
edge: "end",
|
|
617
|
-
"aria-label": "locked input",
|
|
618
|
-
sx: {
|
|
619
|
-
"&.Mui-disabled": {
|
|
620
|
-
color: "text.secondary"
|
|
621
|
-
}
|
|
622
|
-
},
|
|
623
|
-
children: /* @__PURE__ */ jsx3(LockIcon2, { fontSize: "small" })
|
|
624
|
-
}
|
|
625
|
-
) }),
|
|
626
|
-
finalUrl && /* @__PURE__ */ jsx3(Tooltip2, { title: /* @__PURE__ */ jsx3(TranslateText, { overrideNamespace: overrideNamespace || "form_components", children: "Open link" }), children: /* @__PURE__ */ jsx3(IconButton3, { size: "small", onClick: handleOpenLink, children: /* @__PURE__ */ jsx3(LaunchIcon, { fontSize: "small", color: isViewMode ? "primary" : "action" }) }) })
|
|
627
|
-
] })
|
|
628
|
-
}
|
|
629
|
-
}
|
|
630
|
-
}
|
|
631
|
-
),
|
|
632
|
-
/* @__PURE__ */ jsxs3(
|
|
633
|
-
Popover,
|
|
634
|
-
{
|
|
635
|
-
open: isTitlePopoverOpen,
|
|
636
|
-
anchorEl,
|
|
637
|
-
onClose: handleCloseTitleMenu,
|
|
638
|
-
anchorOrigin: {
|
|
639
|
-
vertical: "bottom",
|
|
640
|
-
horizontal: "right"
|
|
641
|
-
},
|
|
642
|
-
transformOrigin: {
|
|
643
|
-
vertical: "top",
|
|
644
|
-
horizontal: "right"
|
|
645
|
-
},
|
|
646
|
-
slotProps: {
|
|
647
|
-
paper: { sx: { p: 2, width: 280 } }
|
|
648
|
-
},
|
|
649
|
-
children: [
|
|
650
|
-
/* @__PURE__ */ jsx3(Typography, { variant: "subtitle2", sx: { mb: 1, fontWeight: "bold" }, children: /* @__PURE__ */ jsx3(TranslateText, { overrideNamespace: overrideNamespace || "form_components", children: "Link Title (Anchor)" }) }),
|
|
651
|
-
/* @__PURE__ */ jsxs3(Typography, { variant: "caption", color: "text.secondary", sx: { mb: 1.5, display: "block" }, children: [
|
|
652
|
-
/* @__PURE__ */ jsx3(TranslateText, { overrideNamespace: overrideNamespace || "form_components", children: "Specify the text to display instead of the URL address" }),
|
|
653
|
-
":"
|
|
654
|
-
] }),
|
|
655
|
-
/* @__PURE__ */ jsx3(
|
|
656
|
-
TextField2,
|
|
657
|
-
{
|
|
658
|
-
size: "small",
|
|
659
|
-
fullWidth: true,
|
|
660
|
-
placeholder: "e.g. Instruction",
|
|
661
|
-
value: currentTitle,
|
|
662
|
-
onChange: (e) => handleTitleChange(e.target.value),
|
|
663
|
-
autoFocus: true,
|
|
664
|
-
onKeyDown: (e) => {
|
|
665
|
-
if (e.key === "Enter") {
|
|
666
|
-
e.preventDefault();
|
|
667
|
-
handleCloseTitleMenu();
|
|
668
|
-
}
|
|
669
|
-
}
|
|
670
|
-
}
|
|
671
|
-
),
|
|
672
|
-
/* @__PURE__ */ jsx3(Box3, { sx: { display: "flex", justifyContent: "flex-end", mt: 1.5 }, children: /* @__PURE__ */ jsx3(Button, { size: "small", variant: "contained", onClick: handleCloseTitleMenu, children: /* @__PURE__ */ jsx3(TranslateText, { overrideNamespace: overrideNamespace || "form_components", children: "Done" }) }) })
|
|
673
|
-
]
|
|
674
|
-
}
|
|
675
|
-
)
|
|
676
|
-
] });
|
|
677
|
-
}
|
|
678
|
-
|
|
679
480
|
// src/UI/components/inputs/EmailInputComponent.tsx
|
|
680
|
-
import { useState as
|
|
681
|
-
import { jsx as
|
|
481
|
+
import { useState as useState3 } from "react";
|
|
482
|
+
import { jsx as jsx3 } from "react/jsx-runtime";
|
|
682
483
|
var EMAIL_REGEX = /^[a-zA-Z0-9._%+-]+@[a-zA-Z0-9.-]+\.[a-zA-Z]{2,}$/;
|
|
683
484
|
var EmailInputComponent = ({
|
|
684
485
|
value = "",
|
|
@@ -691,7 +492,7 @@ var EmailInputComponent = ({
|
|
|
691
492
|
onValidationChange,
|
|
692
493
|
...props
|
|
693
494
|
}) => {
|
|
694
|
-
const [internalError, setInternalError] =
|
|
495
|
+
const [internalError, setInternalError] = useState3(null);
|
|
695
496
|
const validateEmail = (val) => {
|
|
696
497
|
if (disableValidation) return true;
|
|
697
498
|
const stringVal = String(val ?? "").trim();
|
|
@@ -707,561 +508,48 @@ var EmailInputComponent = ({
|
|
|
707
508
|
return isValid;
|
|
708
509
|
};
|
|
709
510
|
const handleChange = (e) => {
|
|
710
|
-
const newValue = e.target.value;
|
|
711
|
-
if (internalError) {
|
|
712
|
-
validateEmail(newValue);
|
|
713
|
-
}
|
|
714
|
-
if (onChange) {
|
|
715
|
-
onChange(e);
|
|
716
|
-
}
|
|
717
|
-
};
|
|
718
|
-
const handleBlur = (e) => {
|
|
719
|
-
validateEmail(e.target.value);
|
|
720
|
-
if (onBlur) {
|
|
721
|
-
onBlur(e);
|
|
722
|
-
}
|
|
723
|
-
};
|
|
724
|
-
const hasError = Boolean(externalError || internalError);
|
|
725
|
-
const displayHelperText = externalHelperText || internalError || void 0;
|
|
726
|
-
return /* @__PURE__ */
|
|
727
|
-
TextFieldComponent,
|
|
728
|
-
{
|
|
729
|
-
type: "email",
|
|
730
|
-
value,
|
|
731
|
-
onChange: handleChange,
|
|
732
|
-
onBlur: handleBlur,
|
|
733
|
-
error: hasError,
|
|
734
|
-
helperText: displayHelperText,
|
|
735
|
-
...props
|
|
736
|
-
}
|
|
737
|
-
);
|
|
738
|
-
};
|
|
739
|
-
|
|
740
|
-
// src/UI/components/data.display/UserAvatarComponent.tsx
|
|
741
|
-
import { useState as useState5, useEffect as useEffect2, lazy, Suspense } from "react";
|
|
742
|
-
import { Avatar, Tooltip as Tooltip3, Typography as Typography2 } from "@mui/material";
|
|
743
|
-
import { Fragment as Fragment4, jsx as jsx5, jsxs as jsxs4 } from "react/jsx-runtime";
|
|
744
|
-
var LazyUserPopover = lazy(() => import("./UserPopoverComponent-RAEPOSIE.mjs"));
|
|
745
|
-
var getInitials = (name) => {
|
|
746
|
-
if (!name) return "?";
|
|
747
|
-
const parts = name.trim().split(" ");
|
|
748
|
-
if (parts.length >= 2) {
|
|
749
|
-
return `${parts[0][0]}${parts[1][0]}`.toUpperCase();
|
|
750
|
-
}
|
|
751
|
-
return name[0].toUpperCase();
|
|
752
|
-
};
|
|
753
|
-
var UserAvatarComponent = ({
|
|
754
|
-
userId = "",
|
|
755
|
-
avatarUrl = "",
|
|
756
|
-
displayName = "",
|
|
757
|
-
employeePost = "",
|
|
758
|
-
size = 40,
|
|
759
|
-
disableBorder = false,
|
|
760
|
-
disableShadow = false,
|
|
761
|
-
disablePopover = false,
|
|
762
|
-
disableTooltip = false,
|
|
763
|
-
sx = {}
|
|
764
|
-
}) => {
|
|
765
|
-
const supabase = useSupabase();
|
|
766
|
-
const [anchorEl, setAnchorEl] = useState5(null);
|
|
767
|
-
const [hasInteracted, setHasInteracted] = useState5(false);
|
|
768
|
-
const [resolvedAvatarUrl, setResolvedAvatarUrl] = useState5(null);
|
|
769
|
-
const canShowPopover = !disablePopover && Boolean(userId);
|
|
770
|
-
useEffect2(() => {
|
|
771
|
-
let isMounted = true;
|
|
772
|
-
const resolveAvatar = async () => {
|
|
773
|
-
if (!avatarUrl) {
|
|
774
|
-
if (isMounted) setResolvedAvatarUrl(null);
|
|
775
|
-
return;
|
|
776
|
-
}
|
|
777
|
-
if (!avatarUrl.startsWith("http") && !avatarUrl.startsWith("data:")) {
|
|
778
|
-
try {
|
|
779
|
-
const { data } = await supabase.storage.from("user-media").createSignedUrl(avatarUrl, 3600);
|
|
780
|
-
if (isMounted) {
|
|
781
|
-
setResolvedAvatarUrl(data?.signedUrl || null);
|
|
782
|
-
}
|
|
783
|
-
} catch (err) {
|
|
784
|
-
console.error("Error resolving signed url for avatar:", err);
|
|
785
|
-
if (isMounted) setResolvedAvatarUrl(null);
|
|
786
|
-
}
|
|
787
|
-
} else {
|
|
788
|
-
if (isMounted) setResolvedAvatarUrl(avatarUrl);
|
|
789
|
-
}
|
|
790
|
-
};
|
|
791
|
-
resolveAvatar();
|
|
792
|
-
return () => {
|
|
793
|
-
isMounted = false;
|
|
794
|
-
};
|
|
795
|
-
}, [avatarUrl]);
|
|
796
|
-
const handleClick = (event) => {
|
|
797
|
-
event.stopPropagation();
|
|
798
|
-
event.preventDefault();
|
|
799
|
-
if (canShowPopover) {
|
|
800
|
-
setAnchorEl(event.currentTarget);
|
|
801
|
-
if (!hasInteracted) {
|
|
802
|
-
setHasInteracted(true);
|
|
803
|
-
}
|
|
804
|
-
}
|
|
805
|
-
};
|
|
806
|
-
const handleClose = (event) => {
|
|
807
|
-
if (event) {
|
|
808
|
-
event.stopPropagation();
|
|
809
|
-
event.preventDefault();
|
|
810
|
-
}
|
|
811
|
-
setAnchorEl(null);
|
|
812
|
-
};
|
|
813
|
-
const isPopoverOpen = Boolean(anchorEl);
|
|
814
|
-
const initials = getInitials(displayName || "");
|
|
815
|
-
const getTooltip = /* @__PURE__ */ jsxs4(Fragment4, { children: [
|
|
816
|
-
/* @__PURE__ */ jsx5(Typography2, { component: "div", variant: "caption", children: displayName }),
|
|
817
|
-
displayName && employeePost && /* @__PURE__ */ jsx5(Typography2, { component: "div", variant: "caption", children: employeePost })
|
|
818
|
-
] });
|
|
819
|
-
return /* @__PURE__ */ jsxs4(Fragment4, { children: [
|
|
820
|
-
/* @__PURE__ */ jsx5(Tooltip3, { title: disableTooltip || isPopoverOpen ? "" : getTooltip, children: /* @__PURE__ */ jsx5(
|
|
821
|
-
Avatar,
|
|
822
|
-
{
|
|
823
|
-
src: resolvedAvatarUrl || void 0,
|
|
824
|
-
alt: displayName || "User Avatar",
|
|
825
|
-
onClick: handleClick,
|
|
826
|
-
sx: {
|
|
827
|
-
width: size,
|
|
828
|
-
height: size,
|
|
829
|
-
fontSize: size * 0.4,
|
|
830
|
-
fontWeight: 600,
|
|
831
|
-
bgcolor: "primary.main",
|
|
832
|
-
color: "primary.contrastText",
|
|
833
|
-
cursor: canShowPopover ? "pointer" : void 0,
|
|
834
|
-
transition: "transform 0.2s ease, box-shadow 0.2s ease",
|
|
835
|
-
border: disableBorder ? "none" : "2px solid",
|
|
836
|
-
borderColor: "background.paper",
|
|
837
|
-
boxShadow: disableShadow ? "none" : 2,
|
|
838
|
-
"&:hover": {
|
|
839
|
-
transform: canShowPopover ? "scale(1.05)" : "none"
|
|
840
|
-
},
|
|
841
|
-
...sx
|
|
842
|
-
},
|
|
843
|
-
children: !resolvedAvatarUrl && initials
|
|
844
|
-
}
|
|
845
|
-
) }),
|
|
846
|
-
canShowPopover && hasInteracted && /* @__PURE__ */ jsx5(Suspense, { fallback: null, children: /* @__PURE__ */ jsx5(
|
|
847
|
-
LazyUserPopover,
|
|
848
|
-
{
|
|
849
|
-
userId,
|
|
850
|
-
anchorEl,
|
|
851
|
-
open: isPopoverOpen,
|
|
852
|
-
onClose: handleClose
|
|
853
|
-
}
|
|
854
|
-
) })
|
|
855
|
-
] });
|
|
856
|
-
};
|
|
857
|
-
|
|
858
|
-
// src/UI/components/data.display/MyAvatarComponent.tsx
|
|
859
|
-
import { useState as useState6 } from "react";
|
|
860
|
-
import { Avatar as Avatar2, Box as Box4, Popover as Popover2, Typography as Typography3, Skeleton } from "@mui/material";
|
|
861
|
-
import { Fragment as Fragment5, jsx as jsx6, jsxs as jsxs5 } from "react/jsx-runtime";
|
|
862
|
-
var getInitials2 = (name) => {
|
|
863
|
-
if (!name) return "?";
|
|
864
|
-
const parts = name.trim().split(" ");
|
|
865
|
-
if (parts.length >= 2) {
|
|
866
|
-
return `${parts[0][0]}${parts[1][0]}`.toUpperCase();
|
|
867
|
-
}
|
|
868
|
-
return name[0].toUpperCase();
|
|
869
|
-
};
|
|
870
|
-
var MyAvatarComponent = ({
|
|
871
|
-
size = 40,
|
|
872
|
-
disableBorder = false,
|
|
873
|
-
disableShadow = false,
|
|
874
|
-
disablePopover = false,
|
|
875
|
-
sx = {}
|
|
876
|
-
}) => {
|
|
877
|
-
const { profile: userProfile, loading: isLoading } = useAuth();
|
|
878
|
-
const [anchorEl, setAnchorEl] = useState6(null);
|
|
879
|
-
const handlePopoverOpen = (event) => {
|
|
880
|
-
if (!disablePopover) {
|
|
881
|
-
setAnchorEl(event.currentTarget);
|
|
882
|
-
}
|
|
883
|
-
};
|
|
884
|
-
const handlePopoverClose = () => {
|
|
885
|
-
setAnchorEl(null);
|
|
886
|
-
};
|
|
887
|
-
const isPopoverOpen = Boolean(anchorEl);
|
|
888
|
-
if (isLoading) {
|
|
889
|
-
return /* @__PURE__ */ jsx6(
|
|
890
|
-
Skeleton,
|
|
891
|
-
{
|
|
892
|
-
variant: "circular",
|
|
893
|
-
width: size,
|
|
894
|
-
height: size,
|
|
895
|
-
sx: { display: "inline-block", flexShrink: 0, ...sx }
|
|
896
|
-
}
|
|
897
|
-
);
|
|
898
|
-
}
|
|
899
|
-
const initials = getInitials2(userProfile?.display_name || "");
|
|
900
|
-
return /* @__PURE__ */ jsxs5(Fragment5, { children: [
|
|
901
|
-
/* @__PURE__ */ jsx6(
|
|
902
|
-
Avatar2,
|
|
903
|
-
{
|
|
904
|
-
src: userProfile?.avatar_url || void 0,
|
|
905
|
-
alt: userProfile?.display_name || "User Avatar",
|
|
906
|
-
onMouseEnter: handlePopoverOpen,
|
|
907
|
-
onMouseLeave: handlePopoverClose,
|
|
908
|
-
sx: {
|
|
909
|
-
width: size,
|
|
910
|
-
height: size,
|
|
911
|
-
fontSize: size * 0.4,
|
|
912
|
-
fontWeight: 600,
|
|
913
|
-
bgcolor: "primary.main",
|
|
914
|
-
color: "primary.contrastText",
|
|
915
|
-
cursor: disablePopover ? void 0 : "pointer",
|
|
916
|
-
transition: "transform 0.2s ease, box-shadow 0.2s ease",
|
|
917
|
-
border: disableBorder ? "none" : "2px solid",
|
|
918
|
-
borderColor: "background.paper",
|
|
919
|
-
boxShadow: disableShadow ? "none" : 2,
|
|
920
|
-
"&:hover": {
|
|
921
|
-
transform: disablePopover ? "none" : "scale(1.05)"
|
|
922
|
-
},
|
|
923
|
-
...sx
|
|
924
|
-
},
|
|
925
|
-
children: !userProfile?.avatar_url && initials
|
|
926
|
-
}
|
|
927
|
-
),
|
|
928
|
-
!disablePopover && /* @__PURE__ */ jsx6(
|
|
929
|
-
Popover2,
|
|
930
|
-
{
|
|
931
|
-
id: `avatar-popover-${userProfile?.id}`,
|
|
932
|
-
open: isPopoverOpen,
|
|
933
|
-
anchorEl,
|
|
934
|
-
anchorOrigin: {
|
|
935
|
-
vertical: "bottom",
|
|
936
|
-
horizontal: "center"
|
|
937
|
-
},
|
|
938
|
-
transformOrigin: {
|
|
939
|
-
vertical: "top",
|
|
940
|
-
horizontal: "center"
|
|
941
|
-
},
|
|
942
|
-
onClose: handlePopoverClose,
|
|
943
|
-
disableRestoreFocus: true,
|
|
944
|
-
disableAutoFocus: true,
|
|
945
|
-
disableEnforceFocus: true,
|
|
946
|
-
sx: {
|
|
947
|
-
pointerEvents: "none",
|
|
948
|
-
mt: 1
|
|
949
|
-
},
|
|
950
|
-
slotProps: {
|
|
951
|
-
paper: {
|
|
952
|
-
sx: {
|
|
953
|
-
p: 1.5,
|
|
954
|
-
borderRadius: 2,
|
|
955
|
-
boxShadow: 3
|
|
956
|
-
}
|
|
957
|
-
}
|
|
958
|
-
},
|
|
959
|
-
children: /* @__PURE__ */ jsxs5(Box4, { sx: { display: "flex", flexDirection: "column", alignItems: "center", gap: 0.5 }, children: [
|
|
960
|
-
/* @__PURE__ */ jsx6(Typography3, { variant: "subtitle2", sx: { fontWeight: 600 }, children: userProfile?.display_name }),
|
|
961
|
-
userProfile?.email && /* @__PURE__ */ jsx6(Typography3, { variant: "caption", color: "text.secondary", children: userProfile.email })
|
|
962
|
-
] })
|
|
963
|
-
}
|
|
964
|
-
)
|
|
965
|
-
] });
|
|
966
|
-
};
|
|
967
|
-
|
|
968
|
-
// src/i18n/LanguageSelector.tsx
|
|
969
|
-
import { useEffect as useEffect3, useState as useState7 } from "react";
|
|
970
|
-
import { useTranslation as useTranslation2 } from "react-i18next";
|
|
971
|
-
import {
|
|
972
|
-
Box as Box5,
|
|
973
|
-
Typography as Typography4,
|
|
974
|
-
CircularProgress,
|
|
975
|
-
IconButton as IconButton4,
|
|
976
|
-
Menu,
|
|
977
|
-
MenuItem,
|
|
978
|
-
Tooltip as Tooltip4
|
|
979
|
-
} from "@mui/material";
|
|
980
|
-
import { Fragment as Fragment6, jsx as jsx7, jsxs as jsxs6 } from "react/jsx-runtime";
|
|
981
|
-
var LanguageSelector = () => {
|
|
982
|
-
const supabase = useSupabase();
|
|
983
|
-
const { i18n } = useTranslation2();
|
|
984
|
-
const [languages, setLanguages] = useState7([]);
|
|
985
|
-
const [loading, setLoading] = useState7(true);
|
|
986
|
-
const { changeLanguage } = useLocalization();
|
|
987
|
-
const { settings: userSettings, setLanguage } = useUserSettings();
|
|
988
|
-
const [anchorEl, setAnchorEl] = useState7(null);
|
|
989
|
-
const open = Boolean(anchorEl);
|
|
990
|
-
useEffect3(() => {
|
|
991
|
-
const fetchLanguages = async () => {
|
|
992
|
-
try {
|
|
993
|
-
const { data, error } = await supabase.from("languages").select("code, name, svg_flag").eq("enabled", true);
|
|
994
|
-
if (error) throw error;
|
|
995
|
-
setLanguages(data || []);
|
|
996
|
-
if (userSettings.language) changeLanguage(userSettings.language);
|
|
997
|
-
} catch (err) {
|
|
998
|
-
console.error("\u041F\u043E\u043C\u0438\u043B\u043A\u0430 \u0437\u0430\u0432\u0430\u043D\u0442\u0430\u0436\u0435\u043D\u043D\u044F \u043C\u043E\u0432:", err);
|
|
999
|
-
} finally {
|
|
1000
|
-
setLoading(false);
|
|
1001
|
-
}
|
|
1002
|
-
};
|
|
1003
|
-
fetchLanguages();
|
|
1004
|
-
}, []);
|
|
1005
|
-
const handleClick = (event) => {
|
|
1006
|
-
setAnchorEl(event.currentTarget);
|
|
1007
|
-
};
|
|
1008
|
-
const handleClose = () => {
|
|
1009
|
-
setAnchorEl(null);
|
|
1010
|
-
};
|
|
1011
|
-
const handleSelectLanguage = (langCode) => {
|
|
1012
|
-
changeLanguage(langCode);
|
|
1013
|
-
setLanguage(langCode);
|
|
1014
|
-
handleClose();
|
|
1015
|
-
};
|
|
1016
|
-
if (loading) {
|
|
1017
|
-
return /* @__PURE__ */ jsx7(CircularProgress, { size: 20, color: "inherit", sx: { mx: 1 } });
|
|
1018
|
-
}
|
|
1019
|
-
const rawCurrentLang = i18n.language || "uk";
|
|
1020
|
-
const currentLangCode = rawCurrentLang.split("-")[0];
|
|
1021
|
-
const currentLang = languages.find((l) => l.code === currentLangCode) || languages[0];
|
|
1022
|
-
return /* @__PURE__ */ jsxs6(Fragment6, { children: [
|
|
1023
|
-
/* @__PURE__ */ jsx7(Tooltip4, { title: currentLang ? currentLang.name : "\u041C\u043E\u0432\u0430", arrow: true, placement: "bottom", children: /* @__PURE__ */ jsx7(
|
|
1024
|
-
IconButton4,
|
|
1025
|
-
{
|
|
1026
|
-
onClick: handleClick,
|
|
1027
|
-
size: "small",
|
|
1028
|
-
"aria-controls": open ? "language-menu" : void 0,
|
|
1029
|
-
"aria-haspopup": "true",
|
|
1030
|
-
"aria-expanded": open ? "true" : void 0,
|
|
1031
|
-
sx: {
|
|
1032
|
-
p: 1,
|
|
1033
|
-
borderRadius: 2,
|
|
1034
|
-
transition: "background-color 0.2s",
|
|
1035
|
-
"&:hover": {
|
|
1036
|
-
backgroundColor: "action.hover"
|
|
1037
|
-
}
|
|
1038
|
-
},
|
|
1039
|
-
children: currentLang?.svg_flag && /* @__PURE__ */ jsx7(
|
|
1040
|
-
Box5,
|
|
1041
|
-
{
|
|
1042
|
-
sx: {
|
|
1043
|
-
width: 24,
|
|
1044
|
-
height: 16,
|
|
1045
|
-
borderRadius: "3px",
|
|
1046
|
-
overflow: "hidden",
|
|
1047
|
-
flexShrink: 0,
|
|
1048
|
-
boxShadow: "0 0 2px rgba(0,0,0,0.3)",
|
|
1049
|
-
display: "flex",
|
|
1050
|
-
alignItems: "center",
|
|
1051
|
-
justifyContent: "center",
|
|
1052
|
-
"& svg": { width: "100%", height: "100%", display: "block", objectFit: "cover" }
|
|
1053
|
-
},
|
|
1054
|
-
dangerouslySetInnerHTML: { __html: currentLang.svg_flag }
|
|
1055
|
-
}
|
|
1056
|
-
)
|
|
1057
|
-
}
|
|
1058
|
-
) }),
|
|
1059
|
-
/* @__PURE__ */ jsx7(
|
|
1060
|
-
Menu,
|
|
1061
|
-
{
|
|
1062
|
-
id: "language-menu",
|
|
1063
|
-
anchorEl,
|
|
1064
|
-
open,
|
|
1065
|
-
onClose: handleClose,
|
|
1066
|
-
slotProps: {
|
|
1067
|
-
paper: {
|
|
1068
|
-
elevation: 3,
|
|
1069
|
-
sx: {
|
|
1070
|
-
mt: 1,
|
|
1071
|
-
minWidth: 150,
|
|
1072
|
-
borderRadius: 2
|
|
1073
|
-
}
|
|
1074
|
-
}
|
|
1075
|
-
},
|
|
1076
|
-
transformOrigin: { horizontal: "right", vertical: "top" },
|
|
1077
|
-
anchorOrigin: { horizontal: "right", vertical: "bottom" },
|
|
1078
|
-
children: languages.map((lang) => {
|
|
1079
|
-
const isSelected = lang.code === currentLangCode;
|
|
1080
|
-
return /* @__PURE__ */ jsxs6(
|
|
1081
|
-
MenuItem,
|
|
1082
|
-
{
|
|
1083
|
-
selected: isSelected,
|
|
1084
|
-
onClick: () => handleSelectLanguage(lang.code),
|
|
1085
|
-
sx: {
|
|
1086
|
-
display: "flex",
|
|
1087
|
-
alignItems: "center",
|
|
1088
|
-
gap: 1.5,
|
|
1089
|
-
py: 1,
|
|
1090
|
-
px: 2
|
|
1091
|
-
},
|
|
1092
|
-
children: [
|
|
1093
|
-
/* @__PURE__ */ jsx7(
|
|
1094
|
-
Box5,
|
|
1095
|
-
{
|
|
1096
|
-
sx: {
|
|
1097
|
-
width: 22,
|
|
1098
|
-
height: 15,
|
|
1099
|
-
borderRadius: "2px",
|
|
1100
|
-
overflow: "hidden",
|
|
1101
|
-
flexShrink: 0,
|
|
1102
|
-
boxShadow: "0 0 1px rgba(0,0,0,0.4)",
|
|
1103
|
-
"& svg": { width: "100%", height: "100%", display: "block" }
|
|
1104
|
-
},
|
|
1105
|
-
dangerouslySetInnerHTML: { __html: lang.svg_flag }
|
|
1106
|
-
}
|
|
1107
|
-
),
|
|
1108
|
-
/* @__PURE__ */ jsx7(Typography4, { variant: "body2", sx: { fontWeight: isSelected ? 600 : 400 }, children: lang.name })
|
|
1109
|
-
]
|
|
1110
|
-
},
|
|
1111
|
-
lang.code
|
|
1112
|
-
);
|
|
1113
|
-
})
|
|
1114
|
-
}
|
|
1115
|
-
)
|
|
1116
|
-
] });
|
|
1117
|
-
};
|
|
1118
|
-
var PublicLanguageSelector = () => {
|
|
1119
|
-
const supabase = useSupabase();
|
|
1120
|
-
const { i18n } = useTranslation2();
|
|
1121
|
-
const { changeLanguage } = useLocalization();
|
|
1122
|
-
const [languages, setLanguages] = useState7([]);
|
|
1123
|
-
const [loading, setLoading] = useState7(true);
|
|
1124
|
-
const [anchorEl, setAnchorEl] = useState7(null);
|
|
1125
|
-
const open = Boolean(anchorEl);
|
|
1126
|
-
useEffect3(() => {
|
|
1127
|
-
const fetchLanguages = async () => {
|
|
1128
|
-
try {
|
|
1129
|
-
const { data, error } = await supabase.from("languages").select("code, name, svg_flag").eq("enabled", true);
|
|
1130
|
-
if (error) throw error;
|
|
1131
|
-
setLanguages(data || []);
|
|
1132
|
-
} catch (err) {
|
|
1133
|
-
console.error("\u041F\u043E\u043C\u0438\u043B\u043A\u0430 \u0437\u0430\u0432\u0430\u043D\u0442\u0430\u0436\u0435\u043D\u043D\u044F \u043C\u043E\u0432:", err);
|
|
1134
|
-
} finally {
|
|
1135
|
-
setLoading(false);
|
|
1136
|
-
}
|
|
1137
|
-
};
|
|
1138
|
-
fetchLanguages();
|
|
1139
|
-
}, []);
|
|
1140
|
-
const handleClick = (event) => {
|
|
1141
|
-
setAnchorEl(event.currentTarget);
|
|
1142
|
-
};
|
|
1143
|
-
const handleClose = () => {
|
|
1144
|
-
setAnchorEl(null);
|
|
1145
|
-
};
|
|
1146
|
-
const handleSelectLanguage = (langCode) => {
|
|
1147
|
-
changeLanguage(langCode);
|
|
1148
|
-
handleClose();
|
|
1149
|
-
};
|
|
1150
|
-
if (loading) {
|
|
1151
|
-
return /* @__PURE__ */ jsx7(CircularProgress, { size: 20, color: "inherit", sx: { mx: 1 } });
|
|
1152
|
-
}
|
|
1153
|
-
const rawCurrentLang = i18n.language || "uk";
|
|
1154
|
-
const currentLangCode = rawCurrentLang.split("-")[0];
|
|
1155
|
-
const currentLang = languages.find((l) => l.code === currentLangCode) || languages[0];
|
|
1156
|
-
return /* @__PURE__ */ jsxs6(Fragment6, { children: [
|
|
1157
|
-
/* @__PURE__ */ jsx7(Tooltip4, { title: currentLang ? currentLang.name : "\u041C\u043E\u0432\u0430", arrow: true, placement: "bottom", children: /* @__PURE__ */ jsx7(
|
|
1158
|
-
IconButton4,
|
|
1159
|
-
{
|
|
1160
|
-
onClick: handleClick,
|
|
1161
|
-
size: "small",
|
|
1162
|
-
"aria-controls": open ? "language-menu" : void 0,
|
|
1163
|
-
"aria-haspopup": "true",
|
|
1164
|
-
"aria-expanded": open ? "true" : void 0,
|
|
1165
|
-
sx: {
|
|
1166
|
-
p: 1,
|
|
1167
|
-
borderRadius: 2,
|
|
1168
|
-
transition: "background-color 0.2s",
|
|
1169
|
-
"&:hover": {
|
|
1170
|
-
backgroundColor: "action.hover"
|
|
1171
|
-
}
|
|
1172
|
-
},
|
|
1173
|
-
children: currentLang?.svg_flag && /* @__PURE__ */ jsx7(
|
|
1174
|
-
Box5,
|
|
1175
|
-
{
|
|
1176
|
-
sx: {
|
|
1177
|
-
width: 24,
|
|
1178
|
-
height: 16,
|
|
1179
|
-
borderRadius: "3px",
|
|
1180
|
-
overflow: "hidden",
|
|
1181
|
-
flexShrink: 0,
|
|
1182
|
-
boxShadow: "0 0 2px rgba(0,0,0,0.3)",
|
|
1183
|
-
display: "flex",
|
|
1184
|
-
alignItems: "center",
|
|
1185
|
-
justifyContent: "center",
|
|
1186
|
-
"& svg": { width: "100%", height: "100%", display: "block", objectFit: "cover" }
|
|
1187
|
-
},
|
|
1188
|
-
dangerouslySetInnerHTML: { __html: currentLang.svg_flag }
|
|
1189
|
-
}
|
|
1190
|
-
)
|
|
1191
|
-
}
|
|
1192
|
-
) }),
|
|
1193
|
-
/* @__PURE__ */ jsx7(
|
|
1194
|
-
Menu,
|
|
1195
|
-
{
|
|
1196
|
-
id: "language-menu",
|
|
1197
|
-
anchorEl,
|
|
1198
|
-
open,
|
|
1199
|
-
onClose: handleClose,
|
|
1200
|
-
slotProps: {
|
|
1201
|
-
paper: {
|
|
1202
|
-
elevation: 3,
|
|
1203
|
-
sx: {
|
|
1204
|
-
mt: 1,
|
|
1205
|
-
minWidth: 150,
|
|
1206
|
-
borderRadius: 2
|
|
1207
|
-
}
|
|
1208
|
-
}
|
|
1209
|
-
},
|
|
1210
|
-
transformOrigin: { horizontal: "right", vertical: "top" },
|
|
1211
|
-
anchorOrigin: { horizontal: "right", vertical: "bottom" },
|
|
1212
|
-
children: languages.map((lang) => {
|
|
1213
|
-
const isSelected = lang.code === currentLangCode;
|
|
1214
|
-
return /* @__PURE__ */ jsxs6(
|
|
1215
|
-
MenuItem,
|
|
1216
|
-
{
|
|
1217
|
-
selected: isSelected,
|
|
1218
|
-
onClick: () => handleSelectLanguage(lang.code),
|
|
1219
|
-
sx: {
|
|
1220
|
-
display: "flex",
|
|
1221
|
-
alignItems: "center",
|
|
1222
|
-
gap: 1.5,
|
|
1223
|
-
py: 1,
|
|
1224
|
-
px: 2
|
|
1225
|
-
},
|
|
1226
|
-
children: [
|
|
1227
|
-
/* @__PURE__ */ jsx7(
|
|
1228
|
-
Box5,
|
|
1229
|
-
{
|
|
1230
|
-
sx: {
|
|
1231
|
-
width: 22,
|
|
1232
|
-
height: 15,
|
|
1233
|
-
borderRadius: "2px",
|
|
1234
|
-
overflow: "hidden",
|
|
1235
|
-
flexShrink: 0,
|
|
1236
|
-
boxShadow: "0 0 1px rgba(0,0,0,0.4)",
|
|
1237
|
-
"& svg": { width: "100%", height: "100%", display: "block" }
|
|
1238
|
-
},
|
|
1239
|
-
dangerouslySetInnerHTML: { __html: lang.svg_flag }
|
|
1240
|
-
}
|
|
1241
|
-
),
|
|
1242
|
-
/* @__PURE__ */ jsx7(Typography4, { variant: "body2", sx: { fontWeight: isSelected ? 600 : 400 }, children: lang.name })
|
|
1243
|
-
]
|
|
1244
|
-
},
|
|
1245
|
-
lang.code
|
|
1246
|
-
);
|
|
1247
|
-
})
|
|
1248
|
-
}
|
|
1249
|
-
)
|
|
1250
|
-
] });
|
|
511
|
+
const newValue = e.target.value;
|
|
512
|
+
if (internalError) {
|
|
513
|
+
validateEmail(newValue);
|
|
514
|
+
}
|
|
515
|
+
if (onChange) {
|
|
516
|
+
onChange(e);
|
|
517
|
+
}
|
|
518
|
+
};
|
|
519
|
+
const handleBlur = (e) => {
|
|
520
|
+
validateEmail(e.target.value);
|
|
521
|
+
if (onBlur) {
|
|
522
|
+
onBlur(e);
|
|
523
|
+
}
|
|
524
|
+
};
|
|
525
|
+
const hasError = Boolean(externalError || internalError);
|
|
526
|
+
const displayHelperText = externalHelperText || internalError || void 0;
|
|
527
|
+
return /* @__PURE__ */ jsx3(
|
|
528
|
+
TextFieldComponent,
|
|
529
|
+
{
|
|
530
|
+
type: "email",
|
|
531
|
+
value,
|
|
532
|
+
onChange: handleChange,
|
|
533
|
+
onBlur: handleBlur,
|
|
534
|
+
error: hasError,
|
|
535
|
+
helperText: displayHelperText,
|
|
536
|
+
...props
|
|
537
|
+
}
|
|
538
|
+
);
|
|
1251
539
|
};
|
|
1252
540
|
|
|
1253
541
|
// src/UI/components/inputs/SearchComponent.tsx
|
|
1254
|
-
import { useState as
|
|
1255
|
-
import { useTranslation as
|
|
1256
|
-
import { TextField as
|
|
542
|
+
import { useState as useState5, useEffect as useEffect3 } from "react";
|
|
543
|
+
import { useTranslation as useTranslation2 } from "react-i18next";
|
|
544
|
+
import { TextField as TextField2, InputAdornment as InputAdornment3, IconButton as IconButton3, Tooltip as Tooltip2 } from "@mui/material";
|
|
1257
545
|
import TranslateIcon2 from "@mui/icons-material/Translate";
|
|
1258
546
|
import ClearIcon2 from "@mui/icons-material/Clear";
|
|
1259
547
|
|
|
1260
548
|
// src/hooks/useDebounce.ts
|
|
1261
|
-
import { useEffect as
|
|
549
|
+
import { useEffect as useEffect2, useState as useState4 } from "react";
|
|
1262
550
|
function useDebounce(value, delay = 500) {
|
|
1263
|
-
const [debouncedValue, setDebouncedValue] =
|
|
1264
|
-
|
|
551
|
+
const [debouncedValue, setDebouncedValue] = useState4(value);
|
|
552
|
+
useEffect2(() => {
|
|
1265
553
|
const timer = setTimeout(() => {
|
|
1266
554
|
setDebouncedValue(value);
|
|
1267
555
|
}, delay);
|
|
@@ -1273,7 +561,7 @@ function useDebounce(value, delay = 500) {
|
|
|
1273
561
|
}
|
|
1274
562
|
|
|
1275
563
|
// src/UI/components/inputs/SearchComponent.tsx
|
|
1276
|
-
import { Fragment as
|
|
564
|
+
import { Fragment as Fragment3, jsx as jsx4, jsxs as jsxs3 } from "react/jsx-runtime";
|
|
1277
565
|
var SearchComponent = ({
|
|
1278
566
|
overrideNamespace,
|
|
1279
567
|
label = "",
|
|
@@ -1289,15 +577,15 @@ var SearchComponent = ({
|
|
|
1289
577
|
}) => {
|
|
1290
578
|
const supabase = useSupabase();
|
|
1291
579
|
const namespace = useTranslationNamespace();
|
|
1292
|
-
const { t, i18n } =
|
|
580
|
+
const { t, i18n } = useTranslation2(namespace);
|
|
1293
581
|
const { isTranslationMode } = useTranslationEdit();
|
|
1294
|
-
const [isDialogOpen, setIsDialogOpen] =
|
|
1295
|
-
const [localValue, setLocalValue] =
|
|
582
|
+
const [isDialogOpen, setIsDialogOpen] = useState5(false);
|
|
583
|
+
const [localValue, setLocalValue] = useState5(String(value ?? ""));
|
|
1296
584
|
const debouncedValue = useDebounce(localValue, debounceDelay);
|
|
1297
|
-
|
|
585
|
+
useEffect3(() => {
|
|
1298
586
|
setLocalValue(String(value ?? ""));
|
|
1299
587
|
}, [value]);
|
|
1300
|
-
|
|
588
|
+
useEffect3(() => {
|
|
1301
589
|
if (onDebounceChange) {
|
|
1302
590
|
onDebounceChange(debouncedValue);
|
|
1303
591
|
}
|
|
@@ -1355,21 +643,21 @@ var SearchComponent = ({
|
|
|
1355
643
|
if (!hasValue && (!isTranslationMode || !placeholderKey)) {
|
|
1356
644
|
return existingEndAdornment;
|
|
1357
645
|
}
|
|
1358
|
-
return /* @__PURE__ */
|
|
646
|
+
return /* @__PURE__ */ jsxs3(Fragment3, { children: [
|
|
1359
647
|
existingEndAdornment,
|
|
1360
|
-
/* @__PURE__ */
|
|
1361
|
-
hasValue && /* @__PURE__ */
|
|
1362
|
-
|
|
648
|
+
/* @__PURE__ */ jsxs3(InputAdornment3, { position: "end", children: [
|
|
649
|
+
hasValue && /* @__PURE__ */ jsx4(TranslatableTooltipComponent, { title: /* @__PURE__ */ jsx4(TranslateText, { overrideNamespace, children: clearTooltip }), children: /* @__PURE__ */ jsx4(
|
|
650
|
+
IconButton3,
|
|
1363
651
|
{
|
|
1364
652
|
size: "small",
|
|
1365
653
|
onClick: handleClear,
|
|
1366
654
|
edge: "end",
|
|
1367
655
|
"aria-label": "clear input",
|
|
1368
|
-
children: /* @__PURE__ */
|
|
656
|
+
children: /* @__PURE__ */ jsx4(ClearIcon2, { fontSize: "small" })
|
|
1369
657
|
}
|
|
1370
658
|
) }),
|
|
1371
|
-
isTranslationMode && placeholderKey && /* @__PURE__ */
|
|
1372
|
-
|
|
659
|
+
isTranslationMode && placeholderKey && /* @__PURE__ */ jsx4(Tooltip2, { title: `Translate placeholder: "${placeholderKey}"`, children: /* @__PURE__ */ jsx4(
|
|
660
|
+
IconButton3,
|
|
1373
661
|
{
|
|
1374
662
|
size: "small",
|
|
1375
663
|
onClick: (e) => {
|
|
@@ -1387,18 +675,18 @@ var SearchComponent = ({
|
|
|
1387
675
|
backgroundColor: "#fef08a"
|
|
1388
676
|
}
|
|
1389
677
|
},
|
|
1390
|
-
children: /* @__PURE__ */
|
|
678
|
+
children: /* @__PURE__ */ jsx4(TranslateIcon2, { fontSize: "small" })
|
|
1391
679
|
}
|
|
1392
680
|
) })
|
|
1393
681
|
] })
|
|
1394
682
|
] });
|
|
1395
683
|
};
|
|
1396
|
-
return /* @__PURE__ */
|
|
1397
|
-
/* @__PURE__ */
|
|
1398
|
-
|
|
684
|
+
return /* @__PURE__ */ jsxs3(Fragment3, { children: [
|
|
685
|
+
/* @__PURE__ */ jsx4(
|
|
686
|
+
TextField2,
|
|
1399
687
|
{
|
|
1400
688
|
...restProps,
|
|
1401
|
-
label: typeof label === "string" ? /* @__PURE__ */
|
|
689
|
+
label: typeof label === "string" ? /* @__PURE__ */ jsx4(TranslateText, { overrideNamespace, children: label }) : label,
|
|
1402
690
|
value: localValue,
|
|
1403
691
|
onChange: handleChange,
|
|
1404
692
|
placeholder: translatedPlaceholder,
|
|
@@ -1411,7 +699,7 @@ var SearchComponent = ({
|
|
|
1411
699
|
}
|
|
1412
700
|
}
|
|
1413
701
|
),
|
|
1414
|
-
placeholderKey && /* @__PURE__ */
|
|
702
|
+
placeholderKey && /* @__PURE__ */ jsx4(
|
|
1415
703
|
TranslationDialog,
|
|
1416
704
|
{
|
|
1417
705
|
open: isDialogOpen,
|
|
@@ -1429,16 +717,16 @@ import {
|
|
|
1429
717
|
FormControl,
|
|
1430
718
|
InputLabel,
|
|
1431
719
|
Select,
|
|
1432
|
-
MenuItem
|
|
720
|
+
MenuItem,
|
|
1433
721
|
Checkbox,
|
|
1434
722
|
ListItemText,
|
|
1435
|
-
IconButton as
|
|
1436
|
-
InputAdornment as
|
|
1437
|
-
Tooltip as
|
|
723
|
+
IconButton as IconButton4,
|
|
724
|
+
InputAdornment as InputAdornment4,
|
|
725
|
+
Tooltip as Tooltip3,
|
|
1438
726
|
FormHelperText
|
|
1439
727
|
} from "@mui/material";
|
|
1440
728
|
import CloseIcon from "@mui/icons-material/Close";
|
|
1441
|
-
import { jsx as
|
|
729
|
+
import { jsx as jsx5, jsxs as jsxs4 } from "react/jsx-runtime";
|
|
1442
730
|
var SelectComponent = ({
|
|
1443
731
|
overrideNamespace,
|
|
1444
732
|
label,
|
|
@@ -1499,331 +787,128 @@ var SelectComponent = ({
|
|
|
1499
787
|
return visibleLabels.join(", ");
|
|
1500
788
|
};
|
|
1501
789
|
const isSmall = size === "small";
|
|
1502
|
-
return /* @__PURE__ */
|
|
1503
|
-
|
|
790
|
+
return /* @__PURE__ */ jsx5(
|
|
791
|
+
Tooltip3,
|
|
1504
792
|
{
|
|
1505
793
|
title: multiple ? Array.isArray(value) ? options.filter((opt) => value.includes(opt.value)).map((opt) => typeof opt.label === "string" ? opt.label : String(opt.value)).join(", ") : "" : options.find((opt) => opt.value === value)?.label ?? String(value ?? ""),
|
|
1506
|
-
children: /* @__PURE__ */
|
|
1507
|
-
/* @__PURE__ */
|
|
1508
|
-
/* @__PURE__ */
|
|
794
|
+
children: /* @__PURE__ */ jsxs4(FormControl, { fullWidth, size, sx: { mt: 1 }, children: [
|
|
795
|
+
/* @__PURE__ */ jsx5(InputLabel, { id: labelId, size: isSmall ? "small" : "medium", children: typeof label === "string" ? /* @__PURE__ */ jsx5(TranslateText, { overrideNamespace, children: label }) : label }),
|
|
796
|
+
/* @__PURE__ */ jsx5(
|
|
1509
797
|
Select,
|
|
1510
798
|
{
|
|
1511
799
|
labelId,
|
|
1512
800
|
id,
|
|
1513
801
|
value: safeValue,
|
|
1514
|
-
label: typeof label === "string" ? /* @__PURE__ */
|
|
802
|
+
label: typeof label === "string" ? /* @__PURE__ */ jsx5(TranslateText, { overrideNamespace, children: label }) : label,
|
|
1515
803
|
size,
|
|
1516
804
|
multiple,
|
|
1517
805
|
disabled,
|
|
1518
806
|
onChange: handleChange,
|
|
1519
807
|
renderValue: multiple ? renderValueHandler : void 0,
|
|
1520
808
|
...restProps,
|
|
1521
|
-
endAdornment: clearable && hasValue && !disabled ? /* @__PURE__ */
|
|
1522
|
-
|
|
809
|
+
endAdornment: clearable && hasValue && !disabled ? /* @__PURE__ */ jsx5(InputAdornment4, { position: "end", sx: { mr: 1 }, children: /* @__PURE__ */ jsx5(
|
|
810
|
+
IconButton4,
|
|
1523
811
|
{
|
|
1524
812
|
size: "small",
|
|
1525
813
|
onClick: handleClear,
|
|
1526
814
|
"aria-label": "clear selection",
|
|
1527
815
|
edge: "end",
|
|
1528
816
|
sx: { p: 0.5 },
|
|
1529
|
-
children: /* @__PURE__ */
|
|
817
|
+
children: /* @__PURE__ */ jsx5(CloseIcon, { fontSize: "small" })
|
|
1530
818
|
}
|
|
1531
819
|
) }) : null,
|
|
1532
820
|
sx: {
|
|
1533
821
|
// 1. Задаем фиксированную высоту для всего контейнера инпута
|
|
1534
822
|
height: isSmall ? "40px" : "56px",
|
|
1535
823
|
minHeight: isSmall ? "40px" : "56px",
|
|
1536
|
-
// 2. Выравниваем внутренний класс текстового поля
|
|
1537
|
-
"& .MuiSelect-select": {
|
|
1538
|
-
display: "flex",
|
|
1539
|
-
alignItems: "center",
|
|
1540
|
-
boxSizing: "border-box",
|
|
1541
|
-
height: "100%",
|
|
1542
|
-
minHeight: "100% !important",
|
|
1543
|
-
py: 0,
|
|
1544
|
-
lineHeight: "normal",
|
|
1545
|
-
overflow: "hidden",
|
|
1546
|
-
textOverflow: "ellipsis",
|
|
1547
|
-
whiteSpace: "nowrap",
|
|
1548
|
-
paddingRight: clearable && hasValue ? "64px !important" : "32px !important"
|
|
1549
|
-
},
|
|
1550
|
-
// 3. Корректируем иконку стрелки выпадающего списка
|
|
1551
|
-
"& .MuiSelect-icon": {
|
|
1552
|
-
top: "calc(50% - 12px)"
|
|
1553
|
-
},
|
|
1554
|
-
// 4. Корректируем расположение иконки очистки
|
|
1555
|
-
"& .MuiInputAdornment-root": {
|
|
1556
|
-
maxHeight: "100%",
|
|
1557
|
-
height: "100%",
|
|
1558
|
-
alignItems: "center"
|
|
1559
|
-
},
|
|
1560
|
-
...sx
|
|
1561
|
-
},
|
|
1562
|
-
children: options.map((option) => {
|
|
1563
|
-
const isSelected = multiple && selectedArray.includes(option.value);
|
|
1564
|
-
const isDisabled = Boolean(isLimitReached && !isSelected);
|
|
1565
|
-
return /* @__PURE__ */ jsxs8(
|
|
1566
|
-
MenuItem2,
|
|
1567
|
-
{
|
|
1568
|
-
value: option.value,
|
|
1569
|
-
disabled: isDisabled,
|
|
1570
|
-
children: [
|
|
1571
|
-
multiple && withCheckboxes && /* @__PURE__ */ jsx9(Checkbox, { checked: isSelected, size, disabled: isDisabled }),
|
|
1572
|
-
/* @__PURE__ */ jsx9(
|
|
1573
|
-
ListItemText,
|
|
1574
|
-
{
|
|
1575
|
-
primary: option.isItalic ? /* @__PURE__ */ jsx9("em", { children: option.label }) : option.label
|
|
1576
|
-
}
|
|
1577
|
-
)
|
|
1578
|
-
]
|
|
1579
|
-
},
|
|
1580
|
-
String(option.value)
|
|
1581
|
-
);
|
|
1582
|
-
})
|
|
1583
|
-
}
|
|
1584
|
-
),
|
|
1585
|
-
helperText && /* @__PURE__ */ jsx9(FormHelperText, { children: helperText })
|
|
1586
|
-
] })
|
|
1587
|
-
}
|
|
1588
|
-
);
|
|
1589
|
-
};
|
|
1590
|
-
|
|
1591
|
-
// src/UI/components/data.display/ExpandableNoteComponent.tsx
|
|
1592
|
-
import { useState as useState10 } from "react";
|
|
1593
|
-
import { Typography as Typography5, Link } from "@mui/material";
|
|
1594
|
-
import { Fragment as Fragment8, jsx as jsx10, jsxs as jsxs9 } from "react/jsx-runtime";
|
|
1595
|
-
var ExpandableNoteComponent = ({
|
|
1596
|
-
overrideNamespace,
|
|
1597
|
-
text,
|
|
1598
|
-
maxLength = 100,
|
|
1599
|
-
label,
|
|
1600
|
-
sx,
|
|
1601
|
-
...restProps
|
|
1602
|
-
}) => {
|
|
1603
|
-
const [isExpanded, setIsExpanded] = useState10(false);
|
|
1604
|
-
if (!text) return null;
|
|
1605
|
-
const isLong = text.length > maxLength;
|
|
1606
|
-
const displayedText = isExpanded || !isLong ? text : `${text.slice(0, maxLength).trim()}...`;
|
|
1607
|
-
const toggleExpand = (e) => {
|
|
1608
|
-
e.stopPropagation();
|
|
1609
|
-
setIsExpanded((prev) => !prev);
|
|
1610
|
-
};
|
|
1611
|
-
return /* @__PURE__ */ jsxs9(
|
|
1612
|
-
Typography5,
|
|
1613
|
-
{
|
|
1614
|
-
variant: "caption",
|
|
1615
|
-
sx: {
|
|
1616
|
-
color: "text.secondary",
|
|
1617
|
-
fontStyle: "italic",
|
|
1618
|
-
display: "inline-block",
|
|
1619
|
-
...sx
|
|
1620
|
-
},
|
|
1621
|
-
...restProps,
|
|
1622
|
-
children: [
|
|
1623
|
-
label !== void 0 ? label : /* @__PURE__ */ jsxs9(Fragment8, { children: [
|
|
1624
|
-
/* @__PURE__ */ jsx10(TranslateText, { overrideNamespace: overrideNamespace || "form_components", children: "Note" }),
|
|
1625
|
-
": "
|
|
1626
|
-
] }),
|
|
1627
|
-
" ",
|
|
1628
|
-
displayedText,
|
|
1629
|
-
" ",
|
|
1630
|
-
isLong && /* @__PURE__ */ jsx10(
|
|
1631
|
-
Link,
|
|
1632
|
-
{
|
|
1633
|
-
component: "button",
|
|
1634
|
-
type: "button",
|
|
1635
|
-
variant: "caption",
|
|
1636
|
-
underline: "hover",
|
|
1637
|
-
onClick: toggleExpand,
|
|
1638
|
-
sx: {
|
|
1639
|
-
fontStyle: "normal",
|
|
1640
|
-
fontWeight: "bold",
|
|
1641
|
-
ml: 0.5,
|
|
1642
|
-
cursor: "pointer",
|
|
1643
|
-
verticalAlign: "baseline"
|
|
1644
|
-
},
|
|
1645
|
-
children: isExpanded ? /* @__PURE__ */ jsx10(TranslateText, { overrideNamespace: overrideNamespace || "form_components", children: "less" }) : /* @__PURE__ */ jsxs9(Fragment8, { children: [
|
|
1646
|
-
/* @__PURE__ */ jsx10(TranslateText, { overrideNamespace: overrideNamespace || "form_components", children: "more" }),
|
|
1647
|
-
"..."
|
|
1648
|
-
] })
|
|
1649
|
-
}
|
|
1650
|
-
)
|
|
1651
|
-
]
|
|
1652
|
-
}
|
|
1653
|
-
);
|
|
1654
|
-
};
|
|
1655
|
-
|
|
1656
|
-
// src/UI/widgets/page/PageLinkWidget.tsx
|
|
1657
|
-
import { ArrowRight, Settings } from "@mui/icons-material";
|
|
1658
|
-
import {
|
|
1659
|
-
Button as Button2,
|
|
1660
|
-
Card,
|
|
1661
|
-
CardActions,
|
|
1662
|
-
CardContent,
|
|
1663
|
-
CardHeader,
|
|
1664
|
-
Divider,
|
|
1665
|
-
List,
|
|
1666
|
-
ListItem,
|
|
1667
|
-
ListItemIcon,
|
|
1668
|
-
ListItemText as ListItemText2,
|
|
1669
|
-
Typography as Typography6,
|
|
1670
|
-
Link as MuiLink
|
|
1671
|
-
} from "@mui/material";
|
|
1672
|
-
import React10 from "react";
|
|
1673
|
-
import { Link as RouterLink, useNavigate } from "react-router-dom";
|
|
1674
|
-
import { jsx as jsx11, jsxs as jsxs10 } from "react/jsx-runtime";
|
|
1675
|
-
var PageLinkWidget = ({
|
|
1676
|
-
overrideNamespace,
|
|
1677
|
-
title,
|
|
1678
|
-
subheader,
|
|
1679
|
-
description,
|
|
1680
|
-
icon,
|
|
1681
|
-
links,
|
|
1682
|
-
actionButtonText,
|
|
1683
|
-
onActionButtonClick,
|
|
1684
|
-
bgcolor
|
|
1685
|
-
}) => {
|
|
1686
|
-
const navigate = useNavigate();
|
|
1687
|
-
return /* @__PURE__ */ jsxs10(
|
|
1688
|
-
Card,
|
|
1689
|
-
{
|
|
1690
|
-
sx: (theme) => ({
|
|
1691
|
-
height: "100%",
|
|
1692
|
-
display: "flex",
|
|
1693
|
-
flexDirection: "column",
|
|
1694
|
-
boxShadow: 3,
|
|
1695
|
-
bgcolor,
|
|
1696
|
-
color: bgcolor ? typeof bgcolor === "string" && bgcolor.includes(".") ? theme.palette.getContrastText(
|
|
1697
|
-
bgcolor.split(".").reduce((acc, key) => acc[key], theme.palette)
|
|
1698
|
-
) : typeof bgcolor === "function" ? theme.palette.getContrastText(bgcolor(theme)) : theme.palette.getContrastText(bgcolor) : "text.primary"
|
|
1699
|
-
}),
|
|
1700
|
-
children: [
|
|
1701
|
-
/* @__PURE__ */ jsx11(
|
|
1702
|
-
CardHeader,
|
|
1703
|
-
{
|
|
1704
|
-
avatar: icon ? React10.cloneElement(icon, {
|
|
1705
|
-
sx: { color: bgcolor ? "inherit" : "primary", ...icon.props.sx }
|
|
1706
|
-
}) : /* @__PURE__ */ jsx11(Settings, { color: bgcolor ? "inherit" : "primary" }),
|
|
1707
|
-
title: /* @__PURE__ */ jsx11(Typography6, { variant: "h6", component: "div", color: "inherit", children: typeof title === "string" ? /* @__PURE__ */ jsx11(TranslateText, { overrideNamespace, children: title }) : title }),
|
|
1708
|
-
subheader: subheader && /* @__PURE__ */ jsx11(Typography6, { variant: "body2", sx: { opacity: 0.8, color: "inherit" }, children: typeof subheader === "string" ? /* @__PURE__ */ jsx11(TranslateText, { overrideNamespace, children: subheader }) : subheader })
|
|
1709
|
-
}
|
|
1710
|
-
),
|
|
1711
|
-
/* @__PURE__ */ jsx11(Divider, { sx: { borderColor: "inherit", opacity: 0.2 } }),
|
|
1712
|
-
/* @__PURE__ */ jsxs10(CardContent, { sx: { flexGrow: 1 }, children: [
|
|
1713
|
-
/* @__PURE__ */ jsx11(Typography6, { variant: "body2", sx: { opacity: 0.85, color: "inherit" }, children: typeof description === "string" ? /* @__PURE__ */ jsx11(TranslateText, { overrideNamespace, children: description }) : description }),
|
|
1714
|
-
links && links.length > 0 && /* @__PURE__ */ jsx11(List, { dense: true, disablePadding: true, children: links.filter((f) => !f.hidden).map((link, index) => /* @__PURE__ */ jsxs10(
|
|
1715
|
-
ListItem,
|
|
1716
|
-
{
|
|
1717
|
-
disablePadding: true,
|
|
1718
|
-
sx: {
|
|
1719
|
-
mt: 1,
|
|
1720
|
-
// Запрещаем ListItem менять цвет фона при наведении
|
|
1721
|
-
"&:hover": {
|
|
1722
|
-
backgroundColor: "transparent"
|
|
1723
|
-
}
|
|
1724
|
-
},
|
|
1725
|
-
children: [
|
|
1726
|
-
/* @__PURE__ */ jsx11(
|
|
1727
|
-
ListItemIcon,
|
|
1728
|
-
{
|
|
1729
|
-
sx: { minWidth: 30, cursor: "pointer", color: "inherit" },
|
|
1730
|
-
onClick: () => {
|
|
1731
|
-
if (link?.href) navigate(link.href);
|
|
1732
|
-
},
|
|
1733
|
-
children: /* @__PURE__ */ jsx11(ArrowRight, { fontSize: "small", color: "inherit" })
|
|
1734
|
-
}
|
|
1735
|
-
),
|
|
1736
|
-
/* @__PURE__ */ jsx11(ListItemText2, { children: link.onClick ? /* @__PURE__ */ jsx11(
|
|
1737
|
-
Button2,
|
|
1738
|
-
{
|
|
1739
|
-
size: "small",
|
|
1740
|
-
variant: "text",
|
|
1741
|
-
color: bgcolor ? "inherit" : "primary",
|
|
1742
|
-
onClick: link.onClick,
|
|
1743
|
-
sx: {
|
|
1744
|
-
fontWeight: 500,
|
|
1745
|
-
textTransform: "none",
|
|
1746
|
-
// Отключает автоматические заглавные буквы (UPPERCASE)
|
|
1747
|
-
padding: 0,
|
|
1748
|
-
minWidth: "auto",
|
|
1749
|
-
justifyContent: "flex-start",
|
|
1750
|
-
textAlign: "left",
|
|
1751
|
-
transition: "opacity 0.2s ease-in-out",
|
|
1752
|
-
"&:hover": {
|
|
1753
|
-
opacity: 0.75,
|
|
1754
|
-
backgroundColor: "transparent",
|
|
1755
|
-
// Убирает стандартную серую подложку при ховере кнопки
|
|
1756
|
-
textDecoration: "underline"
|
|
1757
|
-
// Эффект подчеркивания, как у ссылки
|
|
1758
|
-
}
|
|
1759
|
-
},
|
|
1760
|
-
children: typeof link.text === "string" ? /* @__PURE__ */ jsx11(TranslateText, { overrideNamespace, children: link.text }) : link.text
|
|
1761
|
-
}
|
|
1762
|
-
) : link.href ? /* @__PURE__ */ jsx11(
|
|
1763
|
-
MuiLink,
|
|
1764
|
-
{
|
|
1765
|
-
component: RouterLink,
|
|
1766
|
-
to: link.href,
|
|
1767
|
-
target: link.external ? "_blank" : "_self",
|
|
1768
|
-
rel: link.external ? "noopener noreferrer" : "",
|
|
1769
|
-
underline: "hover",
|
|
1770
|
-
color: bgcolor ? "inherit" : "primary",
|
|
1771
|
-
sx: {
|
|
1772
|
-
fontWeight: 500,
|
|
1773
|
-
display: "inline-block",
|
|
1774
|
-
transition: "opacity 0.2s ease-in-out",
|
|
1775
|
-
"&:hover": {
|
|
1776
|
-
opacity: 0.75,
|
|
1777
|
-
backgroundColor: "transparent"
|
|
1778
|
-
}
|
|
1779
|
-
},
|
|
1780
|
-
children: typeof link.text === "string" ? /* @__PURE__ */ jsx11(TranslateText, { overrideNamespace, children: link.text }) : link.text
|
|
1781
|
-
}
|
|
1782
|
-
) : /* @__PURE__ */ jsx11(Typography6, { variant: "body2", sx: { fontWeight: 500, color: "inherit" }, children: typeof link.text === "string" ? /* @__PURE__ */ jsx11(TranslateText, { overrideNamespace, children: link.text }) : link.text }) })
|
|
1783
|
-
]
|
|
824
|
+
// 2. Выравниваем внутренний класс текстового поля
|
|
825
|
+
"& .MuiSelect-select": {
|
|
826
|
+
display: "flex",
|
|
827
|
+
alignItems: "center",
|
|
828
|
+
boxSizing: "border-box",
|
|
829
|
+
height: "100%",
|
|
830
|
+
minHeight: "100% !important",
|
|
831
|
+
py: 0,
|
|
832
|
+
lineHeight: "normal",
|
|
833
|
+
overflow: "hidden",
|
|
834
|
+
textOverflow: "ellipsis",
|
|
835
|
+
whiteSpace: "nowrap",
|
|
836
|
+
paddingRight: clearable && hasValue ? "64px !important" : "32px !important"
|
|
837
|
+
},
|
|
838
|
+
// 3. Корректируем иконку стрелки выпадающего списка
|
|
839
|
+
"& .MuiSelect-icon": {
|
|
840
|
+
top: "calc(50% - 12px)"
|
|
841
|
+
},
|
|
842
|
+
// 4. Корректируем расположение иконки очистки
|
|
843
|
+
"& .MuiInputAdornment-root": {
|
|
844
|
+
maxHeight: "100%",
|
|
845
|
+
height: "100%",
|
|
846
|
+
alignItems: "center"
|
|
847
|
+
},
|
|
848
|
+
...sx
|
|
1784
849
|
},
|
|
1785
|
-
|
|
1786
|
-
|
|
1787
|
-
|
|
1788
|
-
|
|
1789
|
-
|
|
850
|
+
children: options.map((option) => {
|
|
851
|
+
const isSelected = multiple && selectedArray.includes(option.value);
|
|
852
|
+
const isDisabled = Boolean(isLimitReached && !isSelected);
|
|
853
|
+
return /* @__PURE__ */ jsxs4(
|
|
854
|
+
MenuItem,
|
|
855
|
+
{
|
|
856
|
+
value: option.value,
|
|
857
|
+
disabled: isDisabled,
|
|
858
|
+
children: [
|
|
859
|
+
multiple && withCheckboxes && /* @__PURE__ */ jsx5(Checkbox, { checked: isSelected, size, disabled: isDisabled }),
|
|
860
|
+
/* @__PURE__ */ jsx5(
|
|
861
|
+
ListItemText,
|
|
862
|
+
{
|
|
863
|
+
primary: option.isItalic ? /* @__PURE__ */ jsx5("em", { children: option.label }) : option.label
|
|
864
|
+
}
|
|
865
|
+
)
|
|
866
|
+
]
|
|
867
|
+
},
|
|
868
|
+
String(option.value)
|
|
869
|
+
);
|
|
870
|
+
})
|
|
871
|
+
}
|
|
872
|
+
),
|
|
873
|
+
helperText && /* @__PURE__ */ jsx5(FormHelperText, { children: helperText })
|
|
874
|
+
] })
|
|
1790
875
|
}
|
|
1791
876
|
);
|
|
1792
877
|
};
|
|
1793
878
|
|
|
1794
|
-
// src/UI/components/inputs/
|
|
879
|
+
// src/UI/components/inputs/CheckboxComponent.tsx
|
|
1795
880
|
import {
|
|
1796
881
|
FormControlLabel,
|
|
1797
|
-
|
|
1798
|
-
|
|
882
|
+
Checkbox as Checkbox2,
|
|
883
|
+
Box as Box3
|
|
1799
884
|
} from "@mui/material";
|
|
1800
|
-
import { jsx as
|
|
1801
|
-
var
|
|
885
|
+
import { jsx as jsx6 } from "react/jsx-runtime";
|
|
886
|
+
var CheckboxComponent = ({
|
|
1802
887
|
checked = false,
|
|
1803
888
|
onChange,
|
|
1804
889
|
label,
|
|
1805
890
|
checkedLabel,
|
|
1806
891
|
uncheckedLabel,
|
|
1807
892
|
overrideNamespace,
|
|
1808
|
-
|
|
893
|
+
checkboxProps,
|
|
1809
894
|
...props
|
|
1810
895
|
}) => {
|
|
1811
896
|
const currentLabel = label ?? (checked ? checkedLabel : uncheckedLabel);
|
|
1812
897
|
const renderLabel = (node) => {
|
|
1813
898
|
if (typeof node === "string") {
|
|
1814
|
-
return /* @__PURE__ */
|
|
899
|
+
return /* @__PURE__ */ jsx6(TranslateText, { overrideNamespace, children: node });
|
|
1815
900
|
}
|
|
1816
901
|
return node;
|
|
1817
902
|
};
|
|
1818
|
-
return /* @__PURE__ */
|
|
903
|
+
return /* @__PURE__ */ jsx6(Box3, { sx: { display: "inline-flex", alignItems: "center", gap: 0.5 }, children: /* @__PURE__ */ jsx6(
|
|
1819
904
|
FormControlLabel,
|
|
1820
905
|
{
|
|
1821
|
-
control: /* @__PURE__ */
|
|
1822
|
-
|
|
906
|
+
control: /* @__PURE__ */ jsx6(
|
|
907
|
+
Checkbox2,
|
|
1823
908
|
{
|
|
1824
909
|
checked,
|
|
1825
910
|
onChange,
|
|
1826
|
-
...
|
|
911
|
+
...checkboxProps
|
|
1827
912
|
}
|
|
1828
913
|
),
|
|
1829
914
|
label: renderLabel(currentLabel),
|
|
@@ -1832,39 +917,39 @@ var SwitchComponent = ({
|
|
|
1832
917
|
) });
|
|
1833
918
|
};
|
|
1834
919
|
|
|
1835
|
-
// src/UI/components/inputs/
|
|
920
|
+
// src/UI/components/inputs/SwitchComponent.tsx
|
|
1836
921
|
import {
|
|
1837
922
|
FormControlLabel as FormControlLabel2,
|
|
1838
|
-
|
|
1839
|
-
|
|
923
|
+
Box as Box4,
|
|
924
|
+
Switch
|
|
1840
925
|
} from "@mui/material";
|
|
1841
|
-
import { jsx as
|
|
1842
|
-
var
|
|
926
|
+
import { jsx as jsx7 } from "react/jsx-runtime";
|
|
927
|
+
var SwitchComponent = ({
|
|
1843
928
|
checked = false,
|
|
1844
929
|
onChange,
|
|
1845
930
|
label,
|
|
1846
931
|
checkedLabel,
|
|
1847
932
|
uncheckedLabel,
|
|
1848
933
|
overrideNamespace,
|
|
1849
|
-
|
|
934
|
+
switchProps,
|
|
1850
935
|
...props
|
|
1851
936
|
}) => {
|
|
1852
937
|
const currentLabel = label ?? (checked ? checkedLabel : uncheckedLabel);
|
|
1853
938
|
const renderLabel = (node) => {
|
|
1854
939
|
if (typeof node === "string") {
|
|
1855
|
-
return /* @__PURE__ */
|
|
940
|
+
return /* @__PURE__ */ jsx7(TranslateText, { overrideNamespace, children: node });
|
|
1856
941
|
}
|
|
1857
942
|
return node;
|
|
1858
943
|
};
|
|
1859
|
-
return /* @__PURE__ */
|
|
944
|
+
return /* @__PURE__ */ jsx7(Box4, { sx: { display: "inline-flex", alignItems: "center", gap: 0.5 }, children: /* @__PURE__ */ jsx7(
|
|
1860
945
|
FormControlLabel2,
|
|
1861
946
|
{
|
|
1862
|
-
control: /* @__PURE__ */
|
|
1863
|
-
|
|
947
|
+
control: /* @__PURE__ */ jsx7(
|
|
948
|
+
Switch,
|
|
1864
949
|
{
|
|
1865
950
|
checked,
|
|
1866
951
|
onChange,
|
|
1867
|
-
...
|
|
952
|
+
...switchProps
|
|
1868
953
|
}
|
|
1869
954
|
),
|
|
1870
955
|
label: renderLabel(currentLabel),
|
|
@@ -1873,83 +958,233 @@ var CheckboxComponent = ({
|
|
|
1873
958
|
) });
|
|
1874
959
|
};
|
|
1875
960
|
|
|
1876
|
-
// src/UI/
|
|
1877
|
-
import {
|
|
1878
|
-
import {
|
|
1879
|
-
|
|
1880
|
-
|
|
1881
|
-
|
|
1882
|
-
|
|
1883
|
-
|
|
1884
|
-
|
|
1885
|
-
|
|
1886
|
-
|
|
1887
|
-
|
|
1888
|
-
|
|
1889
|
-
|
|
1890
|
-
|
|
1891
|
-
|
|
1892
|
-
|
|
1893
|
-
|
|
1894
|
-
|
|
1895
|
-
|
|
1896
|
-
|
|
1897
|
-
|
|
1898
|
-
|
|
1899
|
-
|
|
1900
|
-
|
|
1901
|
-
|
|
961
|
+
// src/UI/components/inputs/UrlComponent.tsx
|
|
962
|
+
import { useState as useState6 } from "react";
|
|
963
|
+
import {
|
|
964
|
+
TextField as TextField3,
|
|
965
|
+
InputAdornment as InputAdornment5,
|
|
966
|
+
IconButton as IconButton5,
|
|
967
|
+
Tooltip as Tooltip4,
|
|
968
|
+
Popover,
|
|
969
|
+
Box as Box5,
|
|
970
|
+
Typography,
|
|
971
|
+
Button
|
|
972
|
+
} from "@mui/material";
|
|
973
|
+
import LinkIcon from "@mui/icons-material/Link";
|
|
974
|
+
import LaunchIcon from "@mui/icons-material/Launch";
|
|
975
|
+
import ContentCopyIcon2 from "@mui/icons-material/ContentCopy";
|
|
976
|
+
import CheckIcon2 from "@mui/icons-material/Check";
|
|
977
|
+
import EditNoteIcon from "@mui/icons-material/EditNote";
|
|
978
|
+
import LockIcon2 from "@mui/icons-material/Lock";
|
|
979
|
+
import { Fragment as Fragment4, jsx as jsx8, jsxs as jsxs5 } from "react/jsx-runtime";
|
|
980
|
+
function UrlComponent({
|
|
981
|
+
overrideNamespace,
|
|
982
|
+
label,
|
|
983
|
+
value,
|
|
984
|
+
onChange,
|
|
985
|
+
disabled = false,
|
|
986
|
+
readOnly = false,
|
|
987
|
+
required = false,
|
|
988
|
+
error = false,
|
|
989
|
+
helperText = "",
|
|
990
|
+
description = "",
|
|
991
|
+
fullWidth = true,
|
|
992
|
+
openInNewTab = true,
|
|
993
|
+
showLock = true,
|
|
994
|
+
lockTooltip = "Field is not editable",
|
|
995
|
+
sx
|
|
996
|
+
}) {
|
|
997
|
+
const [copied, setCopied] = useState6(false);
|
|
998
|
+
const [anchorEl, setAnchorEl] = useState6(null);
|
|
999
|
+
const isViewMode = disabled || readOnly;
|
|
1000
|
+
const currentUrl = typeof value === "object" && value !== null ? value.url || "" : value || "";
|
|
1001
|
+
const currentTitle = typeof value === "object" && value !== null ? value.title || "" : "";
|
|
1002
|
+
const getFormattedUrl = (val) => {
|
|
1003
|
+
if (!val) return "";
|
|
1004
|
+
const trimmed = val.trim();
|
|
1005
|
+
if (trimmed.match(/^[a-zA-Z]+:\/\//)) {
|
|
1006
|
+
return trimmed;
|
|
1007
|
+
}
|
|
1008
|
+
return `https://${trimmed}`;
|
|
1009
|
+
};
|
|
1010
|
+
const finalUrl = getFormattedUrl(currentUrl);
|
|
1011
|
+
const targetAttribute = openInNewTab ? "_blank" : "_self";
|
|
1012
|
+
const displayLabelText = currentTitle.trim() || currentUrl;
|
|
1013
|
+
const handleUrlChange = (newUrl) => {
|
|
1014
|
+
onChange?.({ url: newUrl, title: currentTitle });
|
|
1015
|
+
};
|
|
1016
|
+
const handleTitleChange = (newTitle) => {
|
|
1017
|
+
onChange?.({ url: currentUrl, title: newTitle });
|
|
1018
|
+
};
|
|
1019
|
+
const handleCopy = (e) => {
|
|
1020
|
+
e.stopPropagation();
|
|
1021
|
+
if (!finalUrl) return;
|
|
1022
|
+
navigator.clipboard.writeText(finalUrl);
|
|
1023
|
+
setCopied(true);
|
|
1024
|
+
setTimeout(() => setCopied(false), 2e3);
|
|
1025
|
+
};
|
|
1026
|
+
const handleOpenLink = (e) => {
|
|
1027
|
+
e.stopPropagation();
|
|
1028
|
+
if (finalUrl) {
|
|
1029
|
+
window.open(finalUrl, targetAttribute, openInNewTab ? "noopener,noreferrer" : void 0);
|
|
1030
|
+
}
|
|
1031
|
+
};
|
|
1032
|
+
const handleInputClick = (e) => {
|
|
1033
|
+
if (isViewMode && finalUrl) {
|
|
1034
|
+
handleOpenLink(e);
|
|
1035
|
+
}
|
|
1902
1036
|
};
|
|
1903
|
-
|
|
1904
|
-
|
|
1905
|
-
|
|
1037
|
+
const handleOpenTitleMenu = (e) => {
|
|
1038
|
+
e.stopPropagation();
|
|
1039
|
+
setAnchorEl(e.currentTarget);
|
|
1040
|
+
};
|
|
1041
|
+
const handleCloseTitleMenu = () => {
|
|
1042
|
+
setAnchorEl(null);
|
|
1043
|
+
};
|
|
1044
|
+
const isTitlePopoverOpen = Boolean(anchorEl);
|
|
1045
|
+
const displayHelperText = error ? helperText : description || helperText;
|
|
1046
|
+
return /* @__PURE__ */ jsxs5(Fragment4, { children: [
|
|
1047
|
+
/* @__PURE__ */ jsx8(
|
|
1048
|
+
TextField3,
|
|
1906
1049
|
{
|
|
1907
|
-
|
|
1050
|
+
label: /* @__PURE__ */ jsx8(TranslateText, { overrideNamespace, children: label }),
|
|
1051
|
+
type: isViewMode ? "text" : "url",
|
|
1052
|
+
value: isViewMode ? displayLabelText : currentUrl,
|
|
1053
|
+
onChange: (e) => handleUrlChange(e.target.value),
|
|
1054
|
+
required,
|
|
1055
|
+
error,
|
|
1056
|
+
disabled,
|
|
1057
|
+
margin: "dense",
|
|
1058
|
+
helperText: displayHelperText,
|
|
1059
|
+
fullWidth,
|
|
1060
|
+
placeholder: "example.com",
|
|
1908
1061
|
sx: {
|
|
1909
|
-
|
|
1910
|
-
|
|
1911
|
-
|
|
1912
|
-
|
|
1913
|
-
|
|
1062
|
+
"& .MuiInputLabel-asterisk": {
|
|
1063
|
+
color: "red",
|
|
1064
|
+
fontSize: "1.5rem"
|
|
1065
|
+
},
|
|
1066
|
+
"& .MuiInputBase-input": {
|
|
1067
|
+
color: isViewMode && finalUrl ? "primary.main" : void 0,
|
|
1068
|
+
textDecoration: isViewMode && finalUrl ? "underline" : "none",
|
|
1069
|
+
cursor: isViewMode && finalUrl ? "pointer" : void 0,
|
|
1070
|
+
fontWeight: isViewMode && finalUrl ? 500 : void 0
|
|
1071
|
+
},
|
|
1072
|
+
...sx
|
|
1073
|
+
},
|
|
1074
|
+
slotProps: {
|
|
1075
|
+
htmlInput: {
|
|
1076
|
+
readOnly,
|
|
1077
|
+
onClick: handleInputClick
|
|
1078
|
+
},
|
|
1079
|
+
input: {
|
|
1080
|
+
startAdornment: /* @__PURE__ */ jsx8(InputAdornment5, { position: "start", children: /* @__PURE__ */ jsx8(LinkIcon, { fontSize: "small", color: isViewMode && finalUrl ? "primary" : "action" }) }),
|
|
1081
|
+
endAdornment: /* @__PURE__ */ jsxs5(InputAdornment5, { position: "end", sx: { gap: 0.5 }, children: [
|
|
1082
|
+
!isViewMode && /* @__PURE__ */ jsx8(Tooltip4, { title: currentTitle ? `Title: "${currentTitle}"` : /* @__PURE__ */ jsx8(TranslateText, { overrideNamespace: overrideNamespace || "form_components", children: "Set link title" }), children: /* @__PURE__ */ jsx8(
|
|
1083
|
+
IconButton5,
|
|
1084
|
+
{
|
|
1085
|
+
size: "small",
|
|
1086
|
+
onClick: handleOpenTitleMenu,
|
|
1087
|
+
color: currentTitle ? "primary" : "default",
|
|
1088
|
+
children: /* @__PURE__ */ jsx8(EditNoteIcon, { fontSize: "small" })
|
|
1089
|
+
}
|
|
1090
|
+
) }),
|
|
1091
|
+
finalUrl && /* @__PURE__ */ jsx8(Tooltip4, { title: copied ? /* @__PURE__ */ jsx8(TranslateText, { overrideNamespace: overrideNamespace || "form_components", children: "Copied!" }) : /* @__PURE__ */ jsx8(TranslateText, { overrideNamespace: overrideNamespace || "form_components", children: "Copy link" }), children: /* @__PURE__ */ jsx8(IconButton5, { size: "small", onClick: handleCopy, color: copied ? "success" : "default", children: copied ? /* @__PURE__ */ jsx8(CheckIcon2, { fontSize: "small" }) : /* @__PURE__ */ jsx8(ContentCopyIcon2, { fontSize: "small" }) }) }),
|
|
1092
|
+
isViewMode && showLock && /* @__PURE__ */ jsx8(Tooltip4, { title: /* @__PURE__ */ jsx8(TranslateText, { overrideNamespace, children: lockTooltip }), children: /* @__PURE__ */ jsx8(
|
|
1093
|
+
IconButton5,
|
|
1094
|
+
{
|
|
1095
|
+
size: "small",
|
|
1096
|
+
disabled: true,
|
|
1097
|
+
edge: "end",
|
|
1098
|
+
"aria-label": "locked input",
|
|
1099
|
+
sx: {
|
|
1100
|
+
"&.Mui-disabled": {
|
|
1101
|
+
color: "text.secondary"
|
|
1102
|
+
}
|
|
1103
|
+
},
|
|
1104
|
+
children: /* @__PURE__ */ jsx8(LockIcon2, { fontSize: "small" })
|
|
1105
|
+
}
|
|
1106
|
+
) }),
|
|
1107
|
+
finalUrl && /* @__PURE__ */ jsx8(Tooltip4, { title: /* @__PURE__ */ jsx8(TranslateText, { overrideNamespace: overrideNamespace || "form_components", children: "Open link" }), children: /* @__PURE__ */ jsx8(IconButton5, { size: "small", onClick: handleOpenLink, children: /* @__PURE__ */ jsx8(LaunchIcon, { fontSize: "small", color: isViewMode ? "primary" : "action" }) }) })
|
|
1108
|
+
] })
|
|
1109
|
+
}
|
|
1110
|
+
}
|
|
1111
|
+
}
|
|
1112
|
+
),
|
|
1113
|
+
/* @__PURE__ */ jsxs5(
|
|
1114
|
+
Popover,
|
|
1115
|
+
{
|
|
1116
|
+
open: isTitlePopoverOpen,
|
|
1117
|
+
anchorEl,
|
|
1118
|
+
onClose: handleCloseTitleMenu,
|
|
1119
|
+
anchorOrigin: {
|
|
1120
|
+
vertical: "bottom",
|
|
1121
|
+
horizontal: "right"
|
|
1122
|
+
},
|
|
1123
|
+
transformOrigin: {
|
|
1124
|
+
vertical: "top",
|
|
1125
|
+
horizontal: "right"
|
|
1126
|
+
},
|
|
1127
|
+
slotProps: {
|
|
1128
|
+
paper: { sx: { p: 2, width: 280 } }
|
|
1914
1129
|
},
|
|
1915
1130
|
children: [
|
|
1916
|
-
/* @__PURE__ */
|
|
1917
|
-
|
|
1131
|
+
/* @__PURE__ */ jsx8(Typography, { variant: "subtitle2", sx: { mb: 1, fontWeight: "bold" }, children: /* @__PURE__ */ jsx8(TranslateText, { overrideNamespace: overrideNamespace || "form_components", children: "Link Title (Anchor)" }) }),
|
|
1132
|
+
/* @__PURE__ */ jsxs5(Typography, { variant: "caption", color: "text.secondary", sx: { mb: 1.5, display: "block" }, children: [
|
|
1133
|
+
/* @__PURE__ */ jsx8(TranslateText, { overrideNamespace: overrideNamespace || "form_components", children: "Specify the text to display instead of the URL address" }),
|
|
1134
|
+
":"
|
|
1135
|
+
] }),
|
|
1136
|
+
/* @__PURE__ */ jsx8(
|
|
1137
|
+
TextField3,
|
|
1918
1138
|
{
|
|
1919
|
-
|
|
1920
|
-
|
|
1921
|
-
|
|
1922
|
-
|
|
1139
|
+
size: "small",
|
|
1140
|
+
fullWidth: true,
|
|
1141
|
+
placeholder: "e.g. Instruction",
|
|
1142
|
+
value: currentTitle,
|
|
1143
|
+
onChange: (e) => handleTitleChange(e.target.value),
|
|
1144
|
+
autoFocus: true,
|
|
1145
|
+
onKeyDown: (e) => {
|
|
1146
|
+
if (e.key === "Enter") {
|
|
1147
|
+
e.preventDefault();
|
|
1148
|
+
handleCloseTitleMenu();
|
|
1149
|
+
}
|
|
1150
|
+
}
|
|
1923
1151
|
}
|
|
1924
1152
|
),
|
|
1925
|
-
/* @__PURE__ */
|
|
1926
|
-
ExpandMore,
|
|
1927
|
-
{
|
|
1928
|
-
expand: expanded,
|
|
1929
|
-
onClick: handleExpandClick,
|
|
1930
|
-
"aria-expanded": expanded
|
|
1931
|
-
}
|
|
1932
|
-
) }) })
|
|
1153
|
+
/* @__PURE__ */ jsx8(Box5, { sx: { display: "flex", justifyContent: "flex-end", mt: 1.5 }, children: /* @__PURE__ */ jsx8(Button, { size: "small", variant: "contained", onClick: handleCloseTitleMenu, children: /* @__PURE__ */ jsx8(TranslateText, { overrideNamespace: overrideNamespace || "form_components", children: "Done" }) }) })
|
|
1933
1154
|
]
|
|
1934
1155
|
}
|
|
1935
|
-
)
|
|
1936
|
-
/* @__PURE__ */ jsxs11(Collapse, { in: expanded, timeout: "auto", children: [
|
|
1937
|
-
/* @__PURE__ */ jsx14(Divider2, { variant: "middle" }),
|
|
1938
|
-
/* @__PURE__ */ jsx14(CardContent2, { children: props.children })
|
|
1939
|
-
] })
|
|
1156
|
+
)
|
|
1940
1157
|
] });
|
|
1941
|
-
}
|
|
1158
|
+
}
|
|
1159
|
+
|
|
1160
|
+
// src/UI/components/buttons/ButtonComponent.tsx
|
|
1161
|
+
import { forwardRef } from "react";
|
|
1162
|
+
import { Button as Button2 } from "@mui/material";
|
|
1163
|
+
import { jsx as jsx9 } from "react/jsx-runtime";
|
|
1164
|
+
var ButtonComponent = forwardRef(
|
|
1165
|
+
({ label, children, overrideNamespace, ...props }, ref) => {
|
|
1166
|
+
const renderContent = (content) => {
|
|
1167
|
+
if (typeof content === "string") {
|
|
1168
|
+
return /* @__PURE__ */ jsx9(TranslateText, { overrideNamespace, children: content });
|
|
1169
|
+
}
|
|
1170
|
+
return content;
|
|
1171
|
+
};
|
|
1172
|
+
const contentToRender = label !== void 0 ? label : children;
|
|
1173
|
+
return /* @__PURE__ */ jsx9(Button2, { ref, ...props, children: renderContent(contentToRender) });
|
|
1174
|
+
}
|
|
1175
|
+
);
|
|
1176
|
+
ButtonComponent.displayName = "ButtonComponent";
|
|
1942
1177
|
|
|
1943
1178
|
// src/UI/components/buttons/RefreshButtonComponent.tsx
|
|
1944
|
-
import { useState as
|
|
1179
|
+
import { useState as useState7 } from "react";
|
|
1945
1180
|
import {
|
|
1946
1181
|
Button as Button3,
|
|
1947
1182
|
Fab,
|
|
1948
|
-
styled
|
|
1183
|
+
styled
|
|
1949
1184
|
} from "@mui/material";
|
|
1950
1185
|
import RefreshIconMui from "@mui/icons-material/Refresh";
|
|
1951
|
-
import { Fragment as
|
|
1952
|
-
var AnimatedRefreshIcon =
|
|
1186
|
+
import { Fragment as Fragment5, jsx as jsx10 } from "react/jsx-runtime";
|
|
1187
|
+
var AnimatedRefreshIcon = styled(RefreshIconMui, {
|
|
1953
1188
|
shouldForwardProp: (prop) => prop !== "isSpinning"
|
|
1954
1189
|
})(({ isSpinning }) => ({
|
|
1955
1190
|
animation: isSpinning ? "spin 1s linear infinite" : "none",
|
|
@@ -1976,7 +1211,7 @@ var RefreshButtonComponent = ({
|
|
|
1976
1211
|
hideTooltipOnDesktop
|
|
1977
1212
|
}) => {
|
|
1978
1213
|
const { displayState } = useAppTheme();
|
|
1979
|
-
const [internalLoading, setInternalLoading] =
|
|
1214
|
+
const [internalLoading, setInternalLoading] = useState7(false);
|
|
1980
1215
|
const isLoading = externalLoading !== void 0 ? externalLoading : internalLoading;
|
|
1981
1216
|
const handleClick = async (event) => {
|
|
1982
1217
|
if (!onClick || isLoading || disabled) return;
|
|
@@ -1987,9 +1222,9 @@ var RefreshButtonComponent = ({
|
|
|
1987
1222
|
setInternalLoading(false);
|
|
1988
1223
|
}
|
|
1989
1224
|
};
|
|
1990
|
-
const renderIcon = () => /* @__PURE__ */
|
|
1225
|
+
const renderIcon = () => /* @__PURE__ */ jsx10(AnimatedRefreshIcon, { fontSize: size, isSpinning: isLoading });
|
|
1991
1226
|
if (displayState.isMobile && !disableMobileView || mobileViewOnly) {
|
|
1992
|
-
return /* @__PURE__ */
|
|
1227
|
+
return /* @__PURE__ */ jsx10(TranslatableTooltipComponent, { title: hideTooltipOnMobile ? /* @__PURE__ */ jsx10(Fragment5, {}) : tooltip || /* @__PURE__ */ jsx10(TranslateText, { overrideNamespace: overrideNamespace || "form_components", children: "Refresh" }), children: /* @__PURE__ */ jsx10("span", { children: /* @__PURE__ */ jsx10(
|
|
1993
1228
|
Fab,
|
|
1994
1229
|
{
|
|
1995
1230
|
size,
|
|
@@ -2001,31 +1236,324 @@ var RefreshButtonComponent = ({
|
|
|
2001
1236
|
}
|
|
2002
1237
|
) }) });
|
|
2003
1238
|
}
|
|
2004
|
-
return /* @__PURE__ */
|
|
1239
|
+
return /* @__PURE__ */ jsx10(TranslatableTooltipComponent, { title: hideTooltipOnDesktop ? /* @__PURE__ */ jsx10(Fragment5, {}) : tooltip || /* @__PURE__ */ jsx10(TranslateText, { overrideNamespace: overrideNamespace || "form_components", children: "Refresh" }), children: /* @__PURE__ */ jsx10(
|
|
2005
1240
|
Button3,
|
|
2006
1241
|
{
|
|
2007
|
-
variant: "contained",
|
|
2008
|
-
color: "inherit",
|
|
2009
|
-
size,
|
|
2010
|
-
onClick: handleClick,
|
|
2011
|
-
disabled: disabled || isLoading,
|
|
2012
|
-
fullWidth,
|
|
2013
|
-
startIcon: renderIcon(),
|
|
2014
|
-
children: /* @__PURE__ */
|
|
1242
|
+
variant: "contained",
|
|
1243
|
+
color: "inherit",
|
|
1244
|
+
size,
|
|
1245
|
+
onClick: handleClick,
|
|
1246
|
+
disabled: disabled || isLoading,
|
|
1247
|
+
fullWidth,
|
|
1248
|
+
startIcon: renderIcon(),
|
|
1249
|
+
children: /* @__PURE__ */ jsx10(TranslateText, { overrideNamespace: overrideNamespace || "form_components", children: "Refresh" })
|
|
1250
|
+
}
|
|
1251
|
+
) });
|
|
1252
|
+
};
|
|
1253
|
+
|
|
1254
|
+
// src/UI/components/data.display/UserAvatarComponent.tsx
|
|
1255
|
+
import { useState as useState8, useEffect as useEffect4, lazy, Suspense } from "react";
|
|
1256
|
+
import { Avatar, Tooltip as Tooltip5, Typography as Typography2 } from "@mui/material";
|
|
1257
|
+
import { Fragment as Fragment6, jsx as jsx11, jsxs as jsxs6 } from "react/jsx-runtime";
|
|
1258
|
+
var LazyUserPopover = lazy(() => import("./UserPopoverComponent-VFSZ5ZO2.mjs"));
|
|
1259
|
+
var getInitials = (name) => {
|
|
1260
|
+
if (!name) return "?";
|
|
1261
|
+
const parts = name.trim().split(" ");
|
|
1262
|
+
if (parts.length >= 2) {
|
|
1263
|
+
return `${parts[0][0]}${parts[1][0]}`.toUpperCase();
|
|
1264
|
+
}
|
|
1265
|
+
return name[0].toUpperCase();
|
|
1266
|
+
};
|
|
1267
|
+
var UserAvatarComponent = ({
|
|
1268
|
+
userId = "",
|
|
1269
|
+
avatarUrl = "",
|
|
1270
|
+
displayName = "",
|
|
1271
|
+
employeePost = "",
|
|
1272
|
+
size = 40,
|
|
1273
|
+
disableBorder = false,
|
|
1274
|
+
disableShadow = false,
|
|
1275
|
+
disablePopover = false,
|
|
1276
|
+
disableTooltip = false,
|
|
1277
|
+
sx = {}
|
|
1278
|
+
}) => {
|
|
1279
|
+
const supabase = useSupabase();
|
|
1280
|
+
const [anchorEl, setAnchorEl] = useState8(null);
|
|
1281
|
+
const [hasInteracted, setHasInteracted] = useState8(false);
|
|
1282
|
+
const [resolvedAvatarUrl, setResolvedAvatarUrl] = useState8(null);
|
|
1283
|
+
const canShowPopover = !disablePopover && Boolean(userId);
|
|
1284
|
+
useEffect4(() => {
|
|
1285
|
+
let isMounted = true;
|
|
1286
|
+
const resolveAvatar = async () => {
|
|
1287
|
+
if (!avatarUrl) {
|
|
1288
|
+
if (isMounted) setResolvedAvatarUrl(null);
|
|
1289
|
+
return;
|
|
1290
|
+
}
|
|
1291
|
+
if (!avatarUrl.startsWith("http") && !avatarUrl.startsWith("data:")) {
|
|
1292
|
+
try {
|
|
1293
|
+
const { data } = await supabase.storage.from("user-media").createSignedUrl(avatarUrl, 3600);
|
|
1294
|
+
if (isMounted) {
|
|
1295
|
+
setResolvedAvatarUrl(data?.signedUrl || null);
|
|
1296
|
+
}
|
|
1297
|
+
} catch (err) {
|
|
1298
|
+
console.error("Error resolving signed url for avatar:", err);
|
|
1299
|
+
if (isMounted) setResolvedAvatarUrl(null);
|
|
1300
|
+
}
|
|
1301
|
+
} else {
|
|
1302
|
+
if (isMounted) setResolvedAvatarUrl(avatarUrl);
|
|
1303
|
+
}
|
|
1304
|
+
};
|
|
1305
|
+
resolveAvatar();
|
|
1306
|
+
return () => {
|
|
1307
|
+
isMounted = false;
|
|
1308
|
+
};
|
|
1309
|
+
}, [avatarUrl]);
|
|
1310
|
+
const handleClick = (event) => {
|
|
1311
|
+
event.stopPropagation();
|
|
1312
|
+
event.preventDefault();
|
|
1313
|
+
if (canShowPopover) {
|
|
1314
|
+
setAnchorEl(event.currentTarget);
|
|
1315
|
+
if (!hasInteracted) {
|
|
1316
|
+
setHasInteracted(true);
|
|
1317
|
+
}
|
|
1318
|
+
}
|
|
1319
|
+
};
|
|
1320
|
+
const handleClose = (event) => {
|
|
1321
|
+
if (event) {
|
|
1322
|
+
event.stopPropagation();
|
|
1323
|
+
event.preventDefault();
|
|
1324
|
+
}
|
|
1325
|
+
setAnchorEl(null);
|
|
1326
|
+
};
|
|
1327
|
+
const isPopoverOpen = Boolean(anchorEl);
|
|
1328
|
+
const initials = getInitials(displayName || "");
|
|
1329
|
+
const getTooltip = /* @__PURE__ */ jsxs6(Fragment6, { children: [
|
|
1330
|
+
/* @__PURE__ */ jsx11(Typography2, { component: "div", variant: "caption", children: displayName }),
|
|
1331
|
+
displayName && employeePost && /* @__PURE__ */ jsx11(Typography2, { component: "div", variant: "caption", children: employeePost })
|
|
1332
|
+
] });
|
|
1333
|
+
return /* @__PURE__ */ jsxs6(Fragment6, { children: [
|
|
1334
|
+
/* @__PURE__ */ jsx11(Tooltip5, { title: disableTooltip || isPopoverOpen ? "" : getTooltip, children: /* @__PURE__ */ jsx11(
|
|
1335
|
+
Avatar,
|
|
1336
|
+
{
|
|
1337
|
+
src: resolvedAvatarUrl || void 0,
|
|
1338
|
+
alt: displayName || "User Avatar",
|
|
1339
|
+
onClick: handleClick,
|
|
1340
|
+
sx: {
|
|
1341
|
+
width: size,
|
|
1342
|
+
height: size,
|
|
1343
|
+
fontSize: size * 0.4,
|
|
1344
|
+
fontWeight: 600,
|
|
1345
|
+
bgcolor: "primary.main",
|
|
1346
|
+
color: "primary.contrastText",
|
|
1347
|
+
cursor: canShowPopover ? "pointer" : void 0,
|
|
1348
|
+
transition: "transform 0.2s ease, box-shadow 0.2s ease",
|
|
1349
|
+
border: disableBorder ? "none" : "2px solid",
|
|
1350
|
+
borderColor: "background.paper",
|
|
1351
|
+
boxShadow: disableShadow ? "none" : 2,
|
|
1352
|
+
"&:hover": {
|
|
1353
|
+
transform: canShowPopover ? "scale(1.05)" : "none"
|
|
1354
|
+
},
|
|
1355
|
+
...sx
|
|
1356
|
+
},
|
|
1357
|
+
children: !resolvedAvatarUrl && initials
|
|
1358
|
+
}
|
|
1359
|
+
) }),
|
|
1360
|
+
canShowPopover && hasInteracted && /* @__PURE__ */ jsx11(Suspense, { fallback: null, children: /* @__PURE__ */ jsx11(
|
|
1361
|
+
LazyUserPopover,
|
|
1362
|
+
{
|
|
1363
|
+
userId,
|
|
1364
|
+
anchorEl,
|
|
1365
|
+
open: isPopoverOpen,
|
|
1366
|
+
onClose: handleClose
|
|
1367
|
+
}
|
|
1368
|
+
) })
|
|
1369
|
+
] });
|
|
1370
|
+
};
|
|
1371
|
+
|
|
1372
|
+
// src/UI/components/data.display/MyAvatarComponent.tsx
|
|
1373
|
+
import { useState as useState9 } from "react";
|
|
1374
|
+
import { Avatar as Avatar2, Box as Box6, Popover as Popover2, Typography as Typography3, Skeleton } from "@mui/material";
|
|
1375
|
+
import { Fragment as Fragment7, jsx as jsx12, jsxs as jsxs7 } from "react/jsx-runtime";
|
|
1376
|
+
var getInitials2 = (name) => {
|
|
1377
|
+
if (!name) return "?";
|
|
1378
|
+
const parts = name.trim().split(" ");
|
|
1379
|
+
if (parts.length >= 2) {
|
|
1380
|
+
return `${parts[0][0]}${parts[1][0]}`.toUpperCase();
|
|
1381
|
+
}
|
|
1382
|
+
return name[0].toUpperCase();
|
|
1383
|
+
};
|
|
1384
|
+
var MyAvatarComponent = ({
|
|
1385
|
+
size = 40,
|
|
1386
|
+
disableBorder = false,
|
|
1387
|
+
disableShadow = false,
|
|
1388
|
+
disablePopover = false,
|
|
1389
|
+
sx = {}
|
|
1390
|
+
}) => {
|
|
1391
|
+
const { profile: userProfile, loading: isLoading } = useAuth();
|
|
1392
|
+
const [anchorEl, setAnchorEl] = useState9(null);
|
|
1393
|
+
const handlePopoverOpen = (event) => {
|
|
1394
|
+
if (!disablePopover) {
|
|
1395
|
+
setAnchorEl(event.currentTarget);
|
|
1396
|
+
}
|
|
1397
|
+
};
|
|
1398
|
+
const handlePopoverClose = () => {
|
|
1399
|
+
setAnchorEl(null);
|
|
1400
|
+
};
|
|
1401
|
+
const isPopoverOpen = Boolean(anchorEl);
|
|
1402
|
+
if (isLoading) {
|
|
1403
|
+
return /* @__PURE__ */ jsx12(
|
|
1404
|
+
Skeleton,
|
|
1405
|
+
{
|
|
1406
|
+
variant: "circular",
|
|
1407
|
+
width: size,
|
|
1408
|
+
height: size,
|
|
1409
|
+
sx: { display: "inline-block", flexShrink: 0, ...sx }
|
|
1410
|
+
}
|
|
1411
|
+
);
|
|
1412
|
+
}
|
|
1413
|
+
const initials = getInitials2(userProfile?.display_name || "");
|
|
1414
|
+
return /* @__PURE__ */ jsxs7(Fragment7, { children: [
|
|
1415
|
+
/* @__PURE__ */ jsx12(
|
|
1416
|
+
Avatar2,
|
|
1417
|
+
{
|
|
1418
|
+
src: userProfile?.avatar_url || void 0,
|
|
1419
|
+
alt: userProfile?.display_name || "User Avatar",
|
|
1420
|
+
onMouseEnter: handlePopoverOpen,
|
|
1421
|
+
onMouseLeave: handlePopoverClose,
|
|
1422
|
+
sx: {
|
|
1423
|
+
width: size,
|
|
1424
|
+
height: size,
|
|
1425
|
+
fontSize: size * 0.4,
|
|
1426
|
+
fontWeight: 600,
|
|
1427
|
+
bgcolor: "primary.main",
|
|
1428
|
+
color: "primary.contrastText",
|
|
1429
|
+
cursor: disablePopover ? void 0 : "pointer",
|
|
1430
|
+
transition: "transform 0.2s ease, box-shadow 0.2s ease",
|
|
1431
|
+
border: disableBorder ? "none" : "2px solid",
|
|
1432
|
+
borderColor: "background.paper",
|
|
1433
|
+
boxShadow: disableShadow ? "none" : 2,
|
|
1434
|
+
"&:hover": {
|
|
1435
|
+
transform: disablePopover ? "none" : "scale(1.05)"
|
|
1436
|
+
},
|
|
1437
|
+
...sx
|
|
1438
|
+
},
|
|
1439
|
+
children: !userProfile?.avatar_url && initials
|
|
1440
|
+
}
|
|
1441
|
+
),
|
|
1442
|
+
!disablePopover && /* @__PURE__ */ jsx12(
|
|
1443
|
+
Popover2,
|
|
1444
|
+
{
|
|
1445
|
+
id: `avatar-popover-${userProfile?.id}`,
|
|
1446
|
+
open: isPopoverOpen,
|
|
1447
|
+
anchorEl,
|
|
1448
|
+
anchorOrigin: {
|
|
1449
|
+
vertical: "bottom",
|
|
1450
|
+
horizontal: "center"
|
|
1451
|
+
},
|
|
1452
|
+
transformOrigin: {
|
|
1453
|
+
vertical: "top",
|
|
1454
|
+
horizontal: "center"
|
|
1455
|
+
},
|
|
1456
|
+
onClose: handlePopoverClose,
|
|
1457
|
+
disableRestoreFocus: true,
|
|
1458
|
+
disableAutoFocus: true,
|
|
1459
|
+
disableEnforceFocus: true,
|
|
1460
|
+
sx: {
|
|
1461
|
+
pointerEvents: "none",
|
|
1462
|
+
mt: 1
|
|
1463
|
+
},
|
|
1464
|
+
slotProps: {
|
|
1465
|
+
paper: {
|
|
1466
|
+
sx: {
|
|
1467
|
+
p: 1.5,
|
|
1468
|
+
borderRadius: 2,
|
|
1469
|
+
boxShadow: 3
|
|
1470
|
+
}
|
|
1471
|
+
}
|
|
1472
|
+
},
|
|
1473
|
+
children: /* @__PURE__ */ jsxs7(Box6, { sx: { display: "flex", flexDirection: "column", alignItems: "center", gap: 0.5 }, children: [
|
|
1474
|
+
/* @__PURE__ */ jsx12(Typography3, { variant: "subtitle2", sx: { fontWeight: 600 }, children: userProfile?.display_name }),
|
|
1475
|
+
userProfile?.email && /* @__PURE__ */ jsx12(Typography3, { variant: "caption", color: "text.secondary", children: userProfile.email })
|
|
1476
|
+
] })
|
|
1477
|
+
}
|
|
1478
|
+
)
|
|
1479
|
+
] });
|
|
1480
|
+
};
|
|
1481
|
+
|
|
1482
|
+
// src/UI/components/data.display/ExpandableNoteComponent.tsx
|
|
1483
|
+
import { useState as useState10 } from "react";
|
|
1484
|
+
import { Typography as Typography4, Link } from "@mui/material";
|
|
1485
|
+
import { Fragment as Fragment8, jsx as jsx13, jsxs as jsxs8 } from "react/jsx-runtime";
|
|
1486
|
+
var ExpandableNoteComponent = ({
|
|
1487
|
+
overrideNamespace,
|
|
1488
|
+
text,
|
|
1489
|
+
maxLength = 100,
|
|
1490
|
+
label,
|
|
1491
|
+
sx,
|
|
1492
|
+
...restProps
|
|
1493
|
+
}) => {
|
|
1494
|
+
const [isExpanded, setIsExpanded] = useState10(false);
|
|
1495
|
+
if (!text) return null;
|
|
1496
|
+
const isLong = text.length > maxLength;
|
|
1497
|
+
const displayedText = isExpanded || !isLong ? text : `${text.slice(0, maxLength).trim()}...`;
|
|
1498
|
+
const toggleExpand = (e) => {
|
|
1499
|
+
e.stopPropagation();
|
|
1500
|
+
setIsExpanded((prev) => !prev);
|
|
1501
|
+
};
|
|
1502
|
+
return /* @__PURE__ */ jsxs8(
|
|
1503
|
+
Typography4,
|
|
1504
|
+
{
|
|
1505
|
+
variant: "caption",
|
|
1506
|
+
sx: {
|
|
1507
|
+
color: "text.secondary",
|
|
1508
|
+
fontStyle: "italic",
|
|
1509
|
+
display: "inline-block",
|
|
1510
|
+
...sx
|
|
1511
|
+
},
|
|
1512
|
+
...restProps,
|
|
1513
|
+
children: [
|
|
1514
|
+
label !== void 0 ? label : /* @__PURE__ */ jsxs8(Fragment8, { children: [
|
|
1515
|
+
/* @__PURE__ */ jsx13(TranslateText, { overrideNamespace: overrideNamespace || "form_components", children: "Note" }),
|
|
1516
|
+
": "
|
|
1517
|
+
] }),
|
|
1518
|
+
" ",
|
|
1519
|
+
displayedText,
|
|
1520
|
+
" ",
|
|
1521
|
+
isLong && /* @__PURE__ */ jsx13(
|
|
1522
|
+
Link,
|
|
1523
|
+
{
|
|
1524
|
+
component: "button",
|
|
1525
|
+
type: "button",
|
|
1526
|
+
variant: "caption",
|
|
1527
|
+
underline: "hover",
|
|
1528
|
+
onClick: toggleExpand,
|
|
1529
|
+
sx: {
|
|
1530
|
+
fontStyle: "normal",
|
|
1531
|
+
fontWeight: "bold",
|
|
1532
|
+
ml: 0.5,
|
|
1533
|
+
cursor: "pointer",
|
|
1534
|
+
verticalAlign: "baseline"
|
|
1535
|
+
},
|
|
1536
|
+
children: isExpanded ? /* @__PURE__ */ jsx13(TranslateText, { overrideNamespace: overrideNamespace || "form_components", children: "less" }) : /* @__PURE__ */ jsxs8(Fragment8, { children: [
|
|
1537
|
+
/* @__PURE__ */ jsx13(TranslateText, { overrideNamespace: overrideNamespace || "form_components", children: "more" }),
|
|
1538
|
+
"..."
|
|
1539
|
+
] })
|
|
1540
|
+
}
|
|
1541
|
+
)
|
|
1542
|
+
]
|
|
2015
1543
|
}
|
|
2016
|
-
)
|
|
1544
|
+
);
|
|
2017
1545
|
};
|
|
2018
1546
|
|
|
2019
|
-
// src/UI/
|
|
2020
|
-
import { Alert, Box as
|
|
1547
|
+
// src/UI/components/data.display/ErrorAlertComponent.tsx
|
|
1548
|
+
import { Alert, Box as Box7, Button as Button4, Typography as Typography5, useTheme } from "@mui/material";
|
|
2021
1549
|
import ReplayIcon from "@mui/icons-material/Replay";
|
|
2022
|
-
import { jsx as
|
|
1550
|
+
import { jsx as jsx14, jsxs as jsxs9 } from "react/jsx-runtime";
|
|
2023
1551
|
var ErrorIllustration = ({ size = 64 }) => {
|
|
2024
1552
|
const theme = useTheme();
|
|
2025
1553
|
const mainColor = theme.palette.error.main;
|
|
2026
1554
|
const lightColor = theme.palette.error.light;
|
|
2027
|
-
return /* @__PURE__ */
|
|
2028
|
-
|
|
1555
|
+
return /* @__PURE__ */ jsx14(
|
|
1556
|
+
Box7,
|
|
2029
1557
|
{
|
|
2030
1558
|
sx: {
|
|
2031
1559
|
display: "flex",
|
|
@@ -2033,7 +1561,7 @@ var ErrorIllustration = ({ size = 64 }) => {
|
|
|
2033
1561
|
justifyContent: "center",
|
|
2034
1562
|
flexShrink: 0
|
|
2035
1563
|
},
|
|
2036
|
-
children: /* @__PURE__ */
|
|
1564
|
+
children: /* @__PURE__ */ jsxs9(
|
|
2037
1565
|
"svg",
|
|
2038
1566
|
{
|
|
2039
1567
|
width: size,
|
|
@@ -2042,7 +1570,7 @@ var ErrorIllustration = ({ size = 64 }) => {
|
|
|
2042
1570
|
fill: "none",
|
|
2043
1571
|
xmlns: "http://www.w3.org/2000/svg",
|
|
2044
1572
|
children: [
|
|
2045
|
-
/* @__PURE__ */
|
|
1573
|
+
/* @__PURE__ */ jsxs9(
|
|
2046
1574
|
"circle",
|
|
2047
1575
|
{
|
|
2048
1576
|
cx: "50",
|
|
@@ -2051,7 +1579,7 @@ var ErrorIllustration = ({ size = 64 }) => {
|
|
|
2051
1579
|
fill: lightColor,
|
|
2052
1580
|
fillOpacity: "0.25",
|
|
2053
1581
|
children: [
|
|
2054
|
-
/* @__PURE__ */
|
|
1582
|
+
/* @__PURE__ */ jsx14(
|
|
2055
1583
|
"animate",
|
|
2056
1584
|
{
|
|
2057
1585
|
attributeName: "r",
|
|
@@ -2060,7 +1588,7 @@ var ErrorIllustration = ({ size = 64 }) => {
|
|
|
2060
1588
|
repeatCount: "indefinite"
|
|
2061
1589
|
}
|
|
2062
1590
|
),
|
|
2063
|
-
/* @__PURE__ */
|
|
1591
|
+
/* @__PURE__ */ jsx14(
|
|
2064
1592
|
"animate",
|
|
2065
1593
|
{
|
|
2066
1594
|
attributeName: "fill-opacity",
|
|
@@ -2072,8 +1600,8 @@ var ErrorIllustration = ({ size = 64 }) => {
|
|
|
2072
1600
|
]
|
|
2073
1601
|
}
|
|
2074
1602
|
),
|
|
2075
|
-
/* @__PURE__ */
|
|
2076
|
-
/* @__PURE__ */
|
|
1603
|
+
/* @__PURE__ */ jsx14("circle", { cx: "50", cy: "50", r: "34", fill: lightColor, fillOpacity: "0.35" }),
|
|
1604
|
+
/* @__PURE__ */ jsx14(
|
|
2077
1605
|
"path",
|
|
2078
1606
|
{
|
|
2079
1607
|
d: "M50 20L80 72H20L50 20Z",
|
|
@@ -2083,7 +1611,7 @@ var ErrorIllustration = ({ size = 64 }) => {
|
|
|
2083
1611
|
strokeLinejoin: "round"
|
|
2084
1612
|
}
|
|
2085
1613
|
),
|
|
2086
|
-
/* @__PURE__ */
|
|
1614
|
+
/* @__PURE__ */ jsx14(
|
|
2087
1615
|
"path",
|
|
2088
1616
|
{
|
|
2089
1617
|
d: "M50 36V54",
|
|
@@ -2092,17 +1620,17 @@ var ErrorIllustration = ({ size = 64 }) => {
|
|
|
2092
1620
|
strokeLinecap: "round"
|
|
2093
1621
|
}
|
|
2094
1622
|
),
|
|
2095
|
-
/* @__PURE__ */
|
|
2096
|
-
/* @__PURE__ */
|
|
2097
|
-
/* @__PURE__ */
|
|
2098
|
-
/* @__PURE__ */
|
|
1623
|
+
/* @__PURE__ */ jsx14("circle", { cx: "50", cy: "62", r: "2.5", fill: "#FFFFFF" }),
|
|
1624
|
+
/* @__PURE__ */ jsx14("circle", { cx: "16", cy: "30", r: "3", fill: mainColor, opacity: "0.4" }),
|
|
1625
|
+
/* @__PURE__ */ jsx14("circle", { cx: "84", cy: "30", r: "2", fill: mainColor, opacity: "0.6" }),
|
|
1626
|
+
/* @__PURE__ */ jsx14("circle", { cx: "88", cy: "68", r: "3", fill: mainColor, opacity: "0.3" })
|
|
2099
1627
|
]
|
|
2100
1628
|
}
|
|
2101
1629
|
)
|
|
2102
1630
|
}
|
|
2103
1631
|
);
|
|
2104
1632
|
};
|
|
2105
|
-
var
|
|
1633
|
+
var ErrorAlertComponent = ({
|
|
2106
1634
|
overrideNamespace,
|
|
2107
1635
|
title = "An error occurred",
|
|
2108
1636
|
message,
|
|
@@ -2110,7 +1638,7 @@ var ErrorAlertWidget = ({
|
|
|
2110
1638
|
retryText = "Retry",
|
|
2111
1639
|
isRetrying = false
|
|
2112
1640
|
}) => {
|
|
2113
|
-
return /* @__PURE__ */
|
|
1641
|
+
return /* @__PURE__ */ jsx14(
|
|
2114
1642
|
Alert,
|
|
2115
1643
|
{
|
|
2116
1644
|
severity: "error",
|
|
@@ -2128,8 +1656,8 @@ var ErrorAlertWidget = ({
|
|
|
2128
1656
|
p: 0
|
|
2129
1657
|
}
|
|
2130
1658
|
},
|
|
2131
|
-
children: /* @__PURE__ */
|
|
2132
|
-
|
|
1659
|
+
children: /* @__PURE__ */ jsxs9(
|
|
1660
|
+
Box7,
|
|
2133
1661
|
{
|
|
2134
1662
|
sx: {
|
|
2135
1663
|
display: "flex",
|
|
@@ -2138,26 +1666,26 @@ var ErrorAlertWidget = ({
|
|
|
2138
1666
|
gap: 2
|
|
2139
1667
|
},
|
|
2140
1668
|
children: [
|
|
2141
|
-
/* @__PURE__ */
|
|
2142
|
-
/* @__PURE__ */
|
|
2143
|
-
typeof title === "string" ? /* @__PURE__ */
|
|
2144
|
-
|
|
1669
|
+
/* @__PURE__ */ jsx14(ErrorIllustration, { size: 68 }),
|
|
1670
|
+
/* @__PURE__ */ jsxs9(Box7, { sx: { flexGrow: 1 }, children: [
|
|
1671
|
+
typeof title === "string" ? /* @__PURE__ */ jsx14(
|
|
1672
|
+
Typography5,
|
|
2145
1673
|
{
|
|
2146
1674
|
variant: "subtitle1",
|
|
2147
1675
|
sx: { fontWeight: 600, color: "error.main", mb: 0.5 },
|
|
2148
|
-
children: /* @__PURE__ */
|
|
1676
|
+
children: /* @__PURE__ */ jsx14(TranslateText, { overrideNamespace, children: title })
|
|
2149
1677
|
}
|
|
2150
1678
|
) : title,
|
|
2151
|
-
typeof message === "string" ? /* @__PURE__ */
|
|
1679
|
+
typeof message === "string" ? /* @__PURE__ */ jsx14(Typography5, { variant: "body2", color: "text.secondary", children: /* @__PURE__ */ jsx14(TranslateText, { overrideNamespace, children: message }) }) : message
|
|
2152
1680
|
] }),
|
|
2153
|
-
onRetry && /* @__PURE__ */
|
|
2154
|
-
|
|
1681
|
+
onRetry && /* @__PURE__ */ jsx14(
|
|
1682
|
+
Box7,
|
|
2155
1683
|
{
|
|
2156
1684
|
sx: {
|
|
2157
1685
|
alignSelf: { xs: "flex-end", sm: "center" },
|
|
2158
1686
|
mt: { xs: 1, sm: 0 }
|
|
2159
1687
|
},
|
|
2160
|
-
children: /* @__PURE__ */
|
|
1688
|
+
children: /* @__PURE__ */ jsx14(
|
|
2161
1689
|
Button4,
|
|
2162
1690
|
{
|
|
2163
1691
|
variant: "outlined",
|
|
@@ -2165,7 +1693,7 @@ var ErrorAlertWidget = ({
|
|
|
2165
1693
|
size: "small",
|
|
2166
1694
|
disabled: isRetrying,
|
|
2167
1695
|
onClick: onRetry,
|
|
2168
|
-
startIcon: /* @__PURE__ */
|
|
1696
|
+
startIcon: /* @__PURE__ */ jsx14(
|
|
2169
1697
|
ReplayIcon,
|
|
2170
1698
|
{
|
|
2171
1699
|
sx: {
|
|
@@ -2197,37 +1725,19 @@ var ErrorAlertWidget = ({
|
|
|
2197
1725
|
);
|
|
2198
1726
|
};
|
|
2199
1727
|
|
|
2200
|
-
// src/UI/components/buttons/ButtonComponent.tsx
|
|
2201
|
-
import { forwardRef } from "react";
|
|
2202
|
-
import { Button as Button5 } from "@mui/material";
|
|
2203
|
-
import { jsx as jsx17 } from "react/jsx-runtime";
|
|
2204
|
-
var ButtonComponent = forwardRef(
|
|
2205
|
-
({ label, children, overrideNamespace, ...props }, ref) => {
|
|
2206
|
-
const renderContent = (content) => {
|
|
2207
|
-
if (typeof content === "string") {
|
|
2208
|
-
return /* @__PURE__ */ jsx17(TranslateText, { overrideNamespace, children: content });
|
|
2209
|
-
}
|
|
2210
|
-
return content;
|
|
2211
|
-
};
|
|
2212
|
-
const contentToRender = label !== void 0 ? label : children;
|
|
2213
|
-
return /* @__PURE__ */ jsx17(Button5, { ref, ...props, children: renderContent(contentToRender) });
|
|
2214
|
-
}
|
|
2215
|
-
);
|
|
2216
|
-
ButtonComponent.displayName = "ButtonComponent";
|
|
2217
|
-
|
|
2218
1728
|
// src/UI/components/layout/PageComponent.tsx
|
|
2219
|
-
import
|
|
1729
|
+
import React10, { useState as useState11 } from "react";
|
|
2220
1730
|
import {
|
|
2221
|
-
Box as
|
|
2222
|
-
Typography as
|
|
2223
|
-
Button as
|
|
2224
|
-
IconButton as
|
|
2225
|
-
Menu
|
|
2226
|
-
MenuItem as
|
|
2227
|
-
ListItemIcon
|
|
2228
|
-
ListItemText as
|
|
2229
|
-
Divider
|
|
2230
|
-
Tooltip as
|
|
1731
|
+
Box as Box8,
|
|
1732
|
+
Typography as Typography6,
|
|
1733
|
+
Button as Button5,
|
|
1734
|
+
IconButton as IconButton6,
|
|
1735
|
+
Menu,
|
|
1736
|
+
MenuItem as MenuItem2,
|
|
1737
|
+
ListItemIcon,
|
|
1738
|
+
ListItemText as ListItemText2,
|
|
1739
|
+
Divider,
|
|
1740
|
+
Tooltip as Tooltip6,
|
|
2231
1741
|
useTheme as useTheme2,
|
|
2232
1742
|
useMediaQuery,
|
|
2233
1743
|
Stack,
|
|
@@ -2236,7 +1746,7 @@ import {
|
|
|
2236
1746
|
import MoreVertIcon from "@mui/icons-material/MoreVert";
|
|
2237
1747
|
import KeyboardArrowDownIcon from "@mui/icons-material/KeyboardArrowDown";
|
|
2238
1748
|
import { Refresh as RefreshIcon } from "@mui/icons-material";
|
|
2239
|
-
import { Fragment as
|
|
1749
|
+
import { Fragment as Fragment9, jsx as jsx15, jsxs as jsxs10 } from "react/jsx-runtime";
|
|
2240
1750
|
var getTruncateStyles = (mode = "truncate") => {
|
|
2241
1751
|
switch (mode) {
|
|
2242
1752
|
case "truncate":
|
|
@@ -2267,7 +1777,7 @@ var PageHeader = ({
|
|
|
2267
1777
|
const theme = useTheme2();
|
|
2268
1778
|
const mediaIsMobile = useMediaQuery(theme.breakpoints.down(mobileBreakpoint));
|
|
2269
1779
|
const isMobile = forceMobileView ?? mediaIsMobile;
|
|
2270
|
-
const [anchorEl, setAnchorEl] =
|
|
1780
|
+
const [anchorEl, setAnchorEl] = useState11(null);
|
|
2271
1781
|
const isMenuOpen = Boolean(anchorEl);
|
|
2272
1782
|
const handleOpenMenu = (e) => setAnchorEl(e.currentTarget);
|
|
2273
1783
|
const handleCloseMenu = () => setAnchorEl(null);
|
|
@@ -2277,8 +1787,8 @@ var PageHeader = ({
|
|
|
2277
1787
|
};
|
|
2278
1788
|
const hasSecondaryActions = secondaryActions.length > 0;
|
|
2279
1789
|
const hasActions = Boolean(primaryAction || hasSecondaryActions || refreshAction);
|
|
2280
|
-
return /* @__PURE__ */
|
|
2281
|
-
|
|
1790
|
+
return /* @__PURE__ */ jsxs10(
|
|
1791
|
+
Box8,
|
|
2282
1792
|
{
|
|
2283
1793
|
sx: [
|
|
2284
1794
|
{
|
|
@@ -2296,9 +1806,9 @@ var PageHeader = ({
|
|
|
2296
1806
|
...Array.isArray(sx) ? sx : [sx]
|
|
2297
1807
|
],
|
|
2298
1808
|
children: [
|
|
2299
|
-
/* @__PURE__ */
|
|
2300
|
-
icon && /* @__PURE__ */
|
|
2301
|
-
|
|
1809
|
+
/* @__PURE__ */ jsxs10(Box8, { sx: { display: "flex", alignItems: "center", gap: { xs: 1.5, sm: 2 }, minWidth: 0, flex: 1 }, children: [
|
|
1810
|
+
icon && /* @__PURE__ */ jsx15(
|
|
1811
|
+
Box8,
|
|
2302
1812
|
{
|
|
2303
1813
|
sx: {
|
|
2304
1814
|
display: "flex",
|
|
@@ -2317,10 +1827,10 @@ var PageHeader = ({
|
|
|
2317
1827
|
children: icon
|
|
2318
1828
|
}
|
|
2319
1829
|
),
|
|
2320
|
-
/* @__PURE__ */
|
|
2321
|
-
tag && /* @__PURE__ */
|
|
2322
|
-
/* @__PURE__ */
|
|
2323
|
-
|
|
1830
|
+
/* @__PURE__ */ jsxs10(Box8, { sx: { minWidth: 0, flex: 1 }, children: [
|
|
1831
|
+
tag && /* @__PURE__ */ jsx15(Box8, { sx: { mb: 0.5, display: "flex", alignItems: "center" }, children: tag }),
|
|
1832
|
+
/* @__PURE__ */ jsx15(Tooltip6, { title: titleTruncateMode === "truncate" ? /* @__PURE__ */ jsx15(TranslateText, { children: title }) : void 0, arrow: true, placement: "top", children: /* @__PURE__ */ jsx15(
|
|
1833
|
+
Typography6,
|
|
2324
1834
|
{
|
|
2325
1835
|
variant: "h5",
|
|
2326
1836
|
component: "h1",
|
|
@@ -2331,11 +1841,11 @@ var PageHeader = ({
|
|
|
2331
1841
|
lineHeight: 1.3,
|
|
2332
1842
|
...getTruncateStyles(titleTruncateMode)
|
|
2333
1843
|
},
|
|
2334
|
-
children: /* @__PURE__ */
|
|
1844
|
+
children: /* @__PURE__ */ jsx15(TranslateText, { children: title })
|
|
2335
1845
|
}
|
|
2336
1846
|
) }),
|
|
2337
|
-
subtitle && /* @__PURE__ */
|
|
2338
|
-
|
|
1847
|
+
subtitle && /* @__PURE__ */ jsx15(Tooltip6, { title: subtitleTruncateMode === "truncate" ? /* @__PURE__ */ jsx15(TranslateText, { children: subtitle }) : void 0, arrow: true, placement: "top", children: /* @__PURE__ */ jsx15(
|
|
1848
|
+
Typography6,
|
|
2339
1849
|
{
|
|
2340
1850
|
variant: "body2",
|
|
2341
1851
|
sx: {
|
|
@@ -2345,24 +1855,24 @@ var PageHeader = ({
|
|
|
2345
1855
|
lineHeight: 1.4,
|
|
2346
1856
|
...getTruncateStyles(subtitleTruncateMode)
|
|
2347
1857
|
},
|
|
2348
|
-
children: /* @__PURE__ */
|
|
1858
|
+
children: /* @__PURE__ */ jsx15(TranslateText, { children: subtitle })
|
|
2349
1859
|
}
|
|
2350
1860
|
) })
|
|
2351
1861
|
] })
|
|
2352
1862
|
] }),
|
|
2353
|
-
hasActions && /* @__PURE__ */
|
|
1863
|
+
hasActions && /* @__PURE__ */ jsx15(Box8, { sx: { flexShrink: 0, display: "flex", alignItems: "center", gap: 1 }, children: isMobile ? (
|
|
2354
1864
|
/* MOBILE: IconButton with MoreVertIcon showing ALL actions inside Menu */
|
|
2355
|
-
/* @__PURE__ */
|
|
2356
|
-
/* @__PURE__ */
|
|
2357
|
-
|
|
1865
|
+
/* @__PURE__ */ jsxs10(Fragment9, { children: [
|
|
1866
|
+
/* @__PURE__ */ jsx15(TranslatableTooltipComponent, { title: /* @__PURE__ */ jsx15(TranslateText, { overrideNamespace: overrideNamespace || "form_components", children: "Actions" }), children: /* @__PURE__ */ jsx15(
|
|
1867
|
+
IconButton6,
|
|
2358
1868
|
{
|
|
2359
1869
|
onClick: handleOpenMenu,
|
|
2360
1870
|
sx: { border: "1px solid", borderColor: "divider", borderRadius: 2, p: 1 },
|
|
2361
|
-
children: /* @__PURE__ */
|
|
1871
|
+
children: /* @__PURE__ */ jsx15(MoreVertIcon, {})
|
|
2362
1872
|
}
|
|
2363
1873
|
) }),
|
|
2364
|
-
/* @__PURE__ */
|
|
2365
|
-
|
|
1874
|
+
/* @__PURE__ */ jsxs10(
|
|
1875
|
+
Menu,
|
|
2366
1876
|
{
|
|
2367
1877
|
anchorEl,
|
|
2368
1878
|
open: isMenuOpen,
|
|
@@ -2371,9 +1881,9 @@ var PageHeader = ({
|
|
|
2371
1881
|
anchorOrigin: { horizontal: "right", vertical: "bottom" },
|
|
2372
1882
|
slotProps: { paper: { elevation: 4, sx: { minWidth: 200, borderRadius: 2, mt: 1, p: 0.5 } } },
|
|
2373
1883
|
children: [
|
|
2374
|
-
primaryAction && /* @__PURE__ */
|
|
2375
|
-
/* @__PURE__ */
|
|
2376
|
-
|
|
1884
|
+
primaryAction && /* @__PURE__ */ jsxs10(Fragment9, { children: [
|
|
1885
|
+
/* @__PURE__ */ jsxs10(
|
|
1886
|
+
MenuItem2,
|
|
2377
1887
|
{
|
|
2378
1888
|
onClick: () => handleMenuAction(primaryAction.onClick),
|
|
2379
1889
|
disabled: primaryAction.disabled,
|
|
@@ -2386,32 +1896,32 @@ var PageHeader = ({
|
|
|
2386
1896
|
px: 1.5
|
|
2387
1897
|
},
|
|
2388
1898
|
children: [
|
|
2389
|
-
primaryAction.icon && /* @__PURE__ */
|
|
2390
|
-
/* @__PURE__ */
|
|
1899
|
+
primaryAction.icon && /* @__PURE__ */ jsx15(ListItemIcon, { sx: { color: "inherit", minWidth: 32 }, children: primaryAction.icon }),
|
|
1900
|
+
/* @__PURE__ */ jsx15(ListItemText2, { primary: /* @__PURE__ */ jsx15(TranslateText, { children: primaryAction.label }), slotProps: { primary: { sx: { fontWeight: 700, fontSize: "0.9rem" } } } })
|
|
2391
1901
|
]
|
|
2392
1902
|
}
|
|
2393
1903
|
),
|
|
2394
|
-
hasSecondaryActions && /* @__PURE__ */
|
|
1904
|
+
hasSecondaryActions && /* @__PURE__ */ jsx15(Divider, { sx: { my: 0.75 } })
|
|
2395
1905
|
] }),
|
|
2396
|
-
secondaryActions.map((action) => /* @__PURE__ */
|
|
2397
|
-
action.divider && /* @__PURE__ */
|
|
2398
|
-
/* @__PURE__ */
|
|
2399
|
-
|
|
1906
|
+
secondaryActions.map((action) => /* @__PURE__ */ jsxs10(React10.Fragment, { children: [
|
|
1907
|
+
action.divider && /* @__PURE__ */ jsx15(Divider, { sx: { my: 0.5 } }),
|
|
1908
|
+
/* @__PURE__ */ jsxs10(
|
|
1909
|
+
MenuItem2,
|
|
2400
1910
|
{
|
|
2401
1911
|
onClick: () => handleMenuAction(action.onClick),
|
|
2402
1912
|
disabled: action.disabled,
|
|
2403
1913
|
sx: { borderRadius: 1, py: 1, px: 1.5, color: action.color ? `${action.color}.main` : "text.primary" },
|
|
2404
1914
|
children: [
|
|
2405
|
-
action.icon && /* @__PURE__ */
|
|
2406
|
-
/* @__PURE__ */
|
|
1915
|
+
action.icon && /* @__PURE__ */ jsx15(ListItemIcon, { sx: { color: action.color ? `${action.color}.main` : "text.secondary", minWidth: 32 }, children: action.icon }),
|
|
1916
|
+
/* @__PURE__ */ jsx15(ListItemText2, { primary: action.label, slotProps: { primary: { sx: { fontSize: "0.875rem" } } } })
|
|
2407
1917
|
]
|
|
2408
1918
|
}
|
|
2409
1919
|
)
|
|
2410
1920
|
] }, action.id)),
|
|
2411
|
-
refreshAction && /* @__PURE__ */
|
|
2412
|
-
/* @__PURE__ */
|
|
2413
|
-
/* @__PURE__ */
|
|
2414
|
-
|
|
1921
|
+
refreshAction && /* @__PURE__ */ jsxs10(Fragment9, { children: [
|
|
1922
|
+
/* @__PURE__ */ jsx15(Divider, { sx: { my: 0.5 } }),
|
|
1923
|
+
/* @__PURE__ */ jsxs10(
|
|
1924
|
+
MenuItem2,
|
|
2415
1925
|
{
|
|
2416
1926
|
onClick: () => handleMenuAction(refreshAction.onClick),
|
|
2417
1927
|
disabled: refreshAction.disabled,
|
|
@@ -2423,8 +1933,8 @@ var PageHeader = ({
|
|
|
2423
1933
|
px: 1.5
|
|
2424
1934
|
},
|
|
2425
1935
|
children: [
|
|
2426
|
-
/* @__PURE__ */
|
|
2427
|
-
/* @__PURE__ */
|
|
1936
|
+
/* @__PURE__ */ jsx15(ListItemIcon, { sx: { color: "inherit", minWidth: 32 }, children: /* @__PURE__ */ jsx15(RefreshIcon, {}) }),
|
|
1937
|
+
/* @__PURE__ */ jsx15(ListItemText2, { primary: /* @__PURE__ */ jsx15(TranslateText, { overrideNamespace: overrideNamespace || "form_components", children: "Refresh" }), slotProps: { primary: { sx: { fontWeight: 700, fontSize: "0.9rem" } } } })
|
|
2428
1938
|
]
|
|
2429
1939
|
}
|
|
2430
1940
|
)
|
|
@@ -2435,10 +1945,10 @@ var PageHeader = ({
|
|
|
2435
1945
|
] })
|
|
2436
1946
|
) : (
|
|
2437
1947
|
/* DESKTOP: Primary Action Button + Secondary Actions Dropdown Button */
|
|
2438
|
-
/* @__PURE__ */
|
|
2439
|
-
(primaryAction || refreshAction) && /* @__PURE__ */
|
|
2440
|
-
primaryAction && /* @__PURE__ */
|
|
2441
|
-
|
|
1948
|
+
/* @__PURE__ */ jsxs10(Box8, { sx: { display: "flex", alignItems: "center", gap: 1 }, children: [
|
|
1949
|
+
(primaryAction || refreshAction) && /* @__PURE__ */ jsxs10(Stack, { direction: "row", spacing: 2, children: [
|
|
1950
|
+
primaryAction && /* @__PURE__ */ jsx15(
|
|
1951
|
+
Button5,
|
|
2442
1952
|
{
|
|
2443
1953
|
variant: primaryAction.variant || "contained",
|
|
2444
1954
|
color: primaryAction.color || "primary",
|
|
@@ -2446,10 +1956,10 @@ var PageHeader = ({
|
|
|
2446
1956
|
disabled: primaryAction.disabled,
|
|
2447
1957
|
startIcon: primaryAction.icon,
|
|
2448
1958
|
sx: { borderRadius: 2, textTransform: "none", fontWeight: 600, px: 2, py: 0.85 },
|
|
2449
|
-
children: /* @__PURE__ */
|
|
1959
|
+
children: /* @__PURE__ */ jsx15(TranslateText, { children: primaryAction.label })
|
|
2450
1960
|
}
|
|
2451
1961
|
),
|
|
2452
|
-
refreshAction && /* @__PURE__ */
|
|
1962
|
+
refreshAction && /* @__PURE__ */ jsx15(TranslatableTooltipComponent, { title: /* @__PURE__ */ jsx15(TranslateText, { overrideNamespace: overrideNamespace || "form_components", children: "Refresh" }), children: /* @__PURE__ */ jsx15(
|
|
2453
1963
|
Fab2,
|
|
2454
1964
|
{
|
|
2455
1965
|
color: "default",
|
|
@@ -2457,21 +1967,21 @@ var PageHeader = ({
|
|
|
2457
1967
|
disabled: refreshAction.disabled,
|
|
2458
1968
|
"aria-label": "refresh",
|
|
2459
1969
|
size: "small",
|
|
2460
|
-
children: /* @__PURE__ */
|
|
1970
|
+
children: /* @__PURE__ */ jsx15(RefreshIcon, {})
|
|
2461
1971
|
}
|
|
2462
1972
|
) })
|
|
2463
1973
|
] }),
|
|
2464
|
-
hasSecondaryActions && /* @__PURE__ */
|
|
2465
|
-
/* @__PURE__ */
|
|
2466
|
-
|
|
1974
|
+
hasSecondaryActions && /* @__PURE__ */ jsxs10(Fragment9, { children: [
|
|
1975
|
+
/* @__PURE__ */ jsx15(
|
|
1976
|
+
IconButton6,
|
|
2467
1977
|
{
|
|
2468
1978
|
onClick: handleOpenMenu,
|
|
2469
1979
|
sx: { border: "1px solid", borderColor: "divider", borderRadius: 2, p: 1 },
|
|
2470
|
-
children: /* @__PURE__ */
|
|
1980
|
+
children: /* @__PURE__ */ jsx15(KeyboardArrowDownIcon, {})
|
|
2471
1981
|
}
|
|
2472
1982
|
),
|
|
2473
|
-
/* @__PURE__ */
|
|
2474
|
-
|
|
1983
|
+
/* @__PURE__ */ jsx15(
|
|
1984
|
+
Menu,
|
|
2475
1985
|
{
|
|
2476
1986
|
anchorEl,
|
|
2477
1987
|
open: isMenuOpen,
|
|
@@ -2479,17 +1989,17 @@ var PageHeader = ({
|
|
|
2479
1989
|
transformOrigin: { horizontal: "right", vertical: "top" },
|
|
2480
1990
|
anchorOrigin: { horizontal: "right", vertical: "bottom" },
|
|
2481
1991
|
slotProps: { paper: { elevation: 4, sx: { minWidth: 180, borderRadius: 2, mt: 1, p: 0.5 } } },
|
|
2482
|
-
children: secondaryActions.map((action) => /* @__PURE__ */
|
|
2483
|
-
action.divider && /* @__PURE__ */
|
|
2484
|
-
/* @__PURE__ */
|
|
2485
|
-
|
|
1992
|
+
children: secondaryActions.map((action) => /* @__PURE__ */ jsxs10(React10.Fragment, { children: [
|
|
1993
|
+
action.divider && /* @__PURE__ */ jsx15(Divider, { sx: { my: 0.5 } }),
|
|
1994
|
+
/* @__PURE__ */ jsxs10(
|
|
1995
|
+
MenuItem2,
|
|
2486
1996
|
{
|
|
2487
1997
|
onClick: () => handleMenuAction(action.onClick),
|
|
2488
1998
|
disabled: action.disabled,
|
|
2489
1999
|
sx: { borderRadius: 1, py: 0.85, color: action.color ? `${action.color}.main` : "text.primary" },
|
|
2490
2000
|
children: [
|
|
2491
|
-
action.icon && /* @__PURE__ */
|
|
2492
|
-
/* @__PURE__ */
|
|
2001
|
+
action.icon && /* @__PURE__ */ jsx15(ListItemIcon, { sx: { color: action.color ? `${action.color}.main` : "text.secondary", minWidth: 32 }, children: action.icon }),
|
|
2002
|
+
/* @__PURE__ */ jsx15(ListItemText2, { primary: action.label, slotProps: { primary: { sx: { fontSize: "0.875rem" } } } })
|
|
2493
2003
|
]
|
|
2494
2004
|
}
|
|
2495
2005
|
)
|
|
@@ -2499,14 +2009,14 @@ var PageHeader = ({
|
|
|
2499
2009
|
] })
|
|
2500
2010
|
] })
|
|
2501
2011
|
) }),
|
|
2502
|
-
customFragment && /* @__PURE__ */
|
|
2012
|
+
customFragment && /* @__PURE__ */ jsx15(Fragment9, { children: customFragment })
|
|
2503
2013
|
]
|
|
2504
2014
|
}
|
|
2505
2015
|
);
|
|
2506
2016
|
};
|
|
2507
2017
|
var PageContainer = ({ children }) => {
|
|
2508
|
-
return /* @__PURE__ */
|
|
2509
|
-
|
|
2018
|
+
return /* @__PURE__ */ jsx15(
|
|
2019
|
+
Box8,
|
|
2510
2020
|
{
|
|
2511
2021
|
sx: {
|
|
2512
2022
|
width: "100%",
|
|
@@ -2522,8 +2032,8 @@ var PageComponent = ({
|
|
|
2522
2032
|
header,
|
|
2523
2033
|
children
|
|
2524
2034
|
}) => {
|
|
2525
|
-
return /* @__PURE__ */
|
|
2526
|
-
|
|
2035
|
+
return /* @__PURE__ */ jsx15(
|
|
2036
|
+
Box8,
|
|
2527
2037
|
{
|
|
2528
2038
|
sx: {
|
|
2529
2039
|
//pt: 2,
|
|
@@ -2532,56 +2042,239 @@ var PageComponent = ({
|
|
|
2532
2042
|
overflowY: "auto",
|
|
2533
2043
|
boxSizing: "border-box"
|
|
2534
2044
|
},
|
|
2535
|
-
children: /* @__PURE__ */
|
|
2536
|
-
header && /* @__PURE__ */
|
|
2045
|
+
children: /* @__PURE__ */ jsxs10(PageContainer, { children: [
|
|
2046
|
+
header && /* @__PURE__ */ jsx15(PageHeader, { ...header }),
|
|
2537
2047
|
children
|
|
2538
2048
|
] })
|
|
2539
2049
|
}
|
|
2540
2050
|
);
|
|
2541
2051
|
};
|
|
2542
2052
|
|
|
2543
|
-
// src/UI/
|
|
2544
|
-
|
|
2545
|
-
|
|
2546
|
-
|
|
2547
|
-
|
|
2548
|
-
|
|
2549
|
-
|
|
2550
|
-
|
|
2551
|
-
|
|
2552
|
-
|
|
2553
|
-
|
|
2554
|
-
|
|
2555
|
-
|
|
2556
|
-
|
|
2557
|
-
|
|
2558
|
-
|
|
2559
|
-
|
|
2560
|
-
|
|
2561
|
-
|
|
2562
|
-
|
|
2563
|
-
|
|
2564
|
-
|
|
2565
|
-
|
|
2566
|
-
|
|
2567
|
-
|
|
2568
|
-
|
|
2569
|
-
|
|
2570
|
-
|
|
2571
|
-
|
|
2572
|
-
|
|
2573
|
-
|
|
2574
|
-
|
|
2575
|
-
|
|
2576
|
-
|
|
2577
|
-
|
|
2578
|
-
|
|
2579
|
-
|
|
2580
|
-
|
|
2581
|
-
|
|
2582
|
-
|
|
2053
|
+
// src/UI/components/layout/FilterContainerComponent.tsx
|
|
2054
|
+
import React11 from "react";
|
|
2055
|
+
import { Grid, Paper } from "@mui/material";
|
|
2056
|
+
import { jsx as jsx16 } from "react/jsx-runtime";
|
|
2057
|
+
var FilterContainerComponent = ({
|
|
2058
|
+
sections,
|
|
2059
|
+
children,
|
|
2060
|
+
sx
|
|
2061
|
+
}) => {
|
|
2062
|
+
return /* @__PURE__ */ jsx16(
|
|
2063
|
+
Paper,
|
|
2064
|
+
{
|
|
2065
|
+
variant: "outlined",
|
|
2066
|
+
sx: [
|
|
2067
|
+
{ p: 2, mb: 3 },
|
|
2068
|
+
...Array.isArray(sx) ? sx : [sx]
|
|
2069
|
+
],
|
|
2070
|
+
children: /* @__PURE__ */ jsx16(Grid, { container: true, spacing: 2, sx: { alignItems: "center" }, children: sections ? sections.map((sec, idx) => /* @__PURE__ */ jsx16(React11.Fragment, { children: sec }, idx)) : children })
|
|
2071
|
+
}
|
|
2072
|
+
);
|
|
2073
|
+
};
|
|
2074
|
+
|
|
2075
|
+
// src/UI/components/layout/PageLinkComponent.tsx
|
|
2076
|
+
import { ArrowRight, Settings } from "@mui/icons-material";
|
|
2077
|
+
import {
|
|
2078
|
+
Button as Button6,
|
|
2079
|
+
Card,
|
|
2080
|
+
CardActions,
|
|
2081
|
+
CardContent,
|
|
2082
|
+
CardHeader,
|
|
2083
|
+
Divider as Divider2,
|
|
2084
|
+
List,
|
|
2085
|
+
ListItem,
|
|
2086
|
+
ListItemIcon as ListItemIcon2,
|
|
2087
|
+
ListItemText as ListItemText3,
|
|
2088
|
+
Typography as Typography7,
|
|
2089
|
+
Link as MuiLink
|
|
2090
|
+
} from "@mui/material";
|
|
2091
|
+
import React12 from "react";
|
|
2092
|
+
import { Link as RouterLink, useNavigate } from "react-router-dom";
|
|
2093
|
+
import { jsx as jsx17, jsxs as jsxs11 } from "react/jsx-runtime";
|
|
2094
|
+
var PageLinkComponent = ({
|
|
2095
|
+
overrideNamespace,
|
|
2096
|
+
title,
|
|
2097
|
+
subheader,
|
|
2098
|
+
description,
|
|
2099
|
+
icon,
|
|
2100
|
+
links,
|
|
2101
|
+
actionButtonText,
|
|
2102
|
+
onActionButtonClick,
|
|
2103
|
+
bgcolor
|
|
2104
|
+
}) => {
|
|
2105
|
+
const navigate = useNavigate();
|
|
2106
|
+
return /* @__PURE__ */ jsxs11(
|
|
2107
|
+
Card,
|
|
2108
|
+
{
|
|
2109
|
+
sx: (theme) => ({
|
|
2110
|
+
height: "100%",
|
|
2111
|
+
display: "flex",
|
|
2112
|
+
flexDirection: "column",
|
|
2113
|
+
boxShadow: 3,
|
|
2114
|
+
bgcolor,
|
|
2115
|
+
color: bgcolor ? typeof bgcolor === "string" && bgcolor.includes(".") ? theme.palette.getContrastText(
|
|
2116
|
+
bgcolor.split(".").reduce((acc, key) => acc[key], theme.palette)
|
|
2117
|
+
) : typeof bgcolor === "function" ? theme.palette.getContrastText(bgcolor(theme)) : theme.palette.getContrastText(bgcolor) : "text.primary"
|
|
2118
|
+
}),
|
|
2119
|
+
children: [
|
|
2120
|
+
/* @__PURE__ */ jsx17(
|
|
2121
|
+
CardHeader,
|
|
2122
|
+
{
|
|
2123
|
+
avatar: icon ? React12.cloneElement(icon, {
|
|
2124
|
+
sx: { color: bgcolor ? "inherit" : "primary", ...icon.props.sx }
|
|
2125
|
+
}) : /* @__PURE__ */ jsx17(Settings, { color: bgcolor ? "inherit" : "primary" }),
|
|
2126
|
+
title: /* @__PURE__ */ jsx17(Typography7, { variant: "h6", component: "div", color: "inherit", children: typeof title === "string" ? /* @__PURE__ */ jsx17(TranslateText, { overrideNamespace, children: title }) : title }),
|
|
2127
|
+
subheader: subheader && /* @__PURE__ */ jsx17(Typography7, { variant: "body2", sx: { opacity: 0.8, color: "inherit" }, children: typeof subheader === "string" ? /* @__PURE__ */ jsx17(TranslateText, { overrideNamespace, children: subheader }) : subheader })
|
|
2128
|
+
}
|
|
2129
|
+
),
|
|
2130
|
+
/* @__PURE__ */ jsx17(Divider2, { sx: { borderColor: "inherit", opacity: 0.2 } }),
|
|
2131
|
+
/* @__PURE__ */ jsxs11(CardContent, { sx: { flexGrow: 1 }, children: [
|
|
2132
|
+
/* @__PURE__ */ jsx17(Typography7, { variant: "body2", sx: { opacity: 0.85, color: "inherit" }, children: typeof description === "string" ? /* @__PURE__ */ jsx17(TranslateText, { overrideNamespace, children: description }) : description }),
|
|
2133
|
+
links && links.length > 0 && /* @__PURE__ */ jsx17(List, { dense: true, disablePadding: true, children: links.filter((f) => !f.hidden).map((link, index) => /* @__PURE__ */ jsxs11(
|
|
2134
|
+
ListItem,
|
|
2135
|
+
{
|
|
2136
|
+
disablePadding: true,
|
|
2137
|
+
sx: {
|
|
2138
|
+
mt: 1,
|
|
2139
|
+
// Запрещаем ListItem менять цвет фона при наведении
|
|
2140
|
+
"&:hover": {
|
|
2141
|
+
backgroundColor: "transparent"
|
|
2142
|
+
}
|
|
2143
|
+
},
|
|
2144
|
+
children: [
|
|
2145
|
+
/* @__PURE__ */ jsx17(
|
|
2146
|
+
ListItemIcon2,
|
|
2147
|
+
{
|
|
2148
|
+
sx: { minWidth: 30, cursor: "pointer", color: "inherit" },
|
|
2149
|
+
onClick: () => {
|
|
2150
|
+
if (link?.href) navigate(link.href);
|
|
2151
|
+
},
|
|
2152
|
+
children: /* @__PURE__ */ jsx17(ArrowRight, { fontSize: "small", color: "inherit" })
|
|
2153
|
+
}
|
|
2154
|
+
),
|
|
2155
|
+
/* @__PURE__ */ jsx17(ListItemText3, { children: link.onClick ? /* @__PURE__ */ jsx17(
|
|
2156
|
+
Button6,
|
|
2157
|
+
{
|
|
2158
|
+
size: "small",
|
|
2159
|
+
variant: "text",
|
|
2160
|
+
color: bgcolor ? "inherit" : "primary",
|
|
2161
|
+
onClick: link.onClick,
|
|
2162
|
+
sx: {
|
|
2163
|
+
fontWeight: 500,
|
|
2164
|
+
textTransform: "none",
|
|
2165
|
+
// Отключает автоматические заглавные буквы (UPPERCASE)
|
|
2166
|
+
padding: 0,
|
|
2167
|
+
minWidth: "auto",
|
|
2168
|
+
justifyContent: "flex-start",
|
|
2169
|
+
textAlign: "left",
|
|
2170
|
+
transition: "opacity 0.2s ease-in-out",
|
|
2171
|
+
"&:hover": {
|
|
2172
|
+
opacity: 0.75,
|
|
2173
|
+
backgroundColor: "transparent",
|
|
2174
|
+
// Убирает стандартную серую подложку при ховере кнопки
|
|
2175
|
+
textDecoration: "underline"
|
|
2176
|
+
// Эффект подчеркивания, как у ссылки
|
|
2177
|
+
}
|
|
2178
|
+
},
|
|
2179
|
+
children: typeof link.text === "string" ? /* @__PURE__ */ jsx17(TranslateText, { overrideNamespace, children: link.text }) : link.text
|
|
2180
|
+
}
|
|
2181
|
+
) : link.href ? /* @__PURE__ */ jsx17(
|
|
2182
|
+
MuiLink,
|
|
2183
|
+
{
|
|
2184
|
+
component: RouterLink,
|
|
2185
|
+
to: link.href,
|
|
2186
|
+
target: link.external ? "_blank" : "_self",
|
|
2187
|
+
rel: link.external ? "noopener noreferrer" : "",
|
|
2188
|
+
underline: "hover",
|
|
2189
|
+
color: bgcolor ? "inherit" : "primary",
|
|
2190
|
+
sx: {
|
|
2191
|
+
fontWeight: 500,
|
|
2192
|
+
display: "inline-block",
|
|
2193
|
+
transition: "opacity 0.2s ease-in-out",
|
|
2194
|
+
"&:hover": {
|
|
2195
|
+
opacity: 0.75,
|
|
2196
|
+
backgroundColor: "transparent"
|
|
2197
|
+
}
|
|
2198
|
+
},
|
|
2199
|
+
children: typeof link.text === "string" ? /* @__PURE__ */ jsx17(TranslateText, { overrideNamespace, children: link.text }) : link.text
|
|
2200
|
+
}
|
|
2201
|
+
) : /* @__PURE__ */ jsx17(Typography7, { variant: "body2", sx: { fontWeight: 500, color: "inherit" }, children: typeof link.text === "string" ? /* @__PURE__ */ jsx17(TranslateText, { overrideNamespace, children: link.text }) : link.text }) })
|
|
2202
|
+
]
|
|
2203
|
+
},
|
|
2204
|
+
index
|
|
2205
|
+
)) })
|
|
2206
|
+
] }),
|
|
2207
|
+
actionButtonText && onActionButtonClick && /* @__PURE__ */ jsx17(CardActions, { sx: { justifyContent: "flex-end", padding: 2 }, children: /* @__PURE__ */ jsx17(Button6, { size: "small", variant: "contained", onClick: onActionButtonClick, children: typeof actionButtonText === "string" ? /* @__PURE__ */ jsx17(TranslateText, { overrideNamespace, children: actionButtonText }) : actionButtonText }) })
|
|
2208
|
+
]
|
|
2583
2209
|
}
|
|
2210
|
+
);
|
|
2211
|
+
};
|
|
2212
|
+
|
|
2213
|
+
// src/UI/components/layout/CollapsedContainerComponent.tsx
|
|
2214
|
+
import { ExpandMore as ExpandMoreIcon } from "@mui/icons-material";
|
|
2215
|
+
import { Avatar as Avatar3, Box as Box9, Card as Card2, CardContent as CardContent2, CardHeader as CardHeader2, Collapse, Divider as Divider3, IconButton as IconButton7, styled as styled2, Tooltip as Tooltip7, Typography as Typography8 } from "@mui/material";
|
|
2216
|
+
import { useState as useState12 } from "react";
|
|
2217
|
+
import { jsx as jsx18, jsxs as jsxs12 } from "react/jsx-runtime";
|
|
2218
|
+
var ExpandMore = styled2((props) => {
|
|
2219
|
+
const { expand, ...other } = props;
|
|
2220
|
+
return /* @__PURE__ */ jsx18(IconButton7, { size: "small", ...other, children: /* @__PURE__ */ jsx18(ExpandMoreIcon, {}) });
|
|
2221
|
+
})(({ theme, expand }) => ({
|
|
2222
|
+
transform: !expand ? "rotate(0deg)" : "rotate(180deg)",
|
|
2223
|
+
transition: theme.transitions.create("transform", {
|
|
2224
|
+
duration: theme.transitions.duration.shortest
|
|
2225
|
+
}),
|
|
2226
|
+
backgroundColor: expand ? theme.palette.primary.main : "transparent",
|
|
2227
|
+
color: expand ? theme.palette.common.white : theme.palette.text.secondary,
|
|
2228
|
+
border: `1px solid ${expand ? theme.palette.primary.main : theme.palette.divider}`,
|
|
2229
|
+
"&:hover": {
|
|
2230
|
+
backgroundColor: expand ? theme.palette.primary.dark : theme.palette.action.hover
|
|
2584
2231
|
}
|
|
2232
|
+
}));
|
|
2233
|
+
var CollapsedContainerComponent = (props) => {
|
|
2234
|
+
const { displayState } = useAppTheme();
|
|
2235
|
+
const [expanded, setExpanded] = useState12(props.expanded === void 0 ? false : props.expanded);
|
|
2236
|
+
const handleExpandClick = () => {
|
|
2237
|
+
setExpanded(!expanded);
|
|
2238
|
+
props.onExpanded && props.onExpanded(!expanded);
|
|
2239
|
+
};
|
|
2240
|
+
return /* @__PURE__ */ jsxs12(Card2, { 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: [
|
|
2241
|
+
/* @__PURE__ */ jsxs12(
|
|
2242
|
+
Box9,
|
|
2243
|
+
{
|
|
2244
|
+
onClick: () => handleExpandClick(),
|
|
2245
|
+
sx: {
|
|
2246
|
+
cursor: "pointer",
|
|
2247
|
+
"&:hover": { bgcolor: "rgba(0,0,0,0.02)" },
|
|
2248
|
+
display: "flex",
|
|
2249
|
+
alignItems: "center",
|
|
2250
|
+
pr: 2
|
|
2251
|
+
},
|
|
2252
|
+
children: [
|
|
2253
|
+
/* @__PURE__ */ jsx18(
|
|
2254
|
+
CardHeader2,
|
|
2255
|
+
{
|
|
2256
|
+
sx: { flexGrow: 1 },
|
|
2257
|
+
avatar: /* @__PURE__ */ jsx18(Avatar3, { sx: { bgcolor: "primary.main" }, children: props.icon }),
|
|
2258
|
+
title: typeof props.title === "string" ? /* @__PURE__ */ jsx18(Typography8, { variant: "subtitle1", sx: { fontWeight: "700" }, children: /* @__PURE__ */ jsx18(TranslateText, { overrideNamespace: props.overrideNamespace, children: props.title }) }) : props.title,
|
|
2259
|
+
subheader: typeof props.subtitle === "string" ? /* @__PURE__ */ jsx18(TranslateText, { overrideNamespace: props.overrideNamespace, children: props.subtitle }) : props.subtitle
|
|
2260
|
+
}
|
|
2261
|
+
),
|
|
2262
|
+
/* @__PURE__ */ jsx18(Tooltip7, { title: expanded ? "Show Less" : "Show More", children: /* @__PURE__ */ jsx18(Box9, { sx: { ml: 1 }, children: /* @__PURE__ */ jsx18(
|
|
2263
|
+
ExpandMore,
|
|
2264
|
+
{
|
|
2265
|
+
expand: expanded,
|
|
2266
|
+
onClick: handleExpandClick,
|
|
2267
|
+
"aria-expanded": expanded
|
|
2268
|
+
}
|
|
2269
|
+
) }) })
|
|
2270
|
+
]
|
|
2271
|
+
}
|
|
2272
|
+
),
|
|
2273
|
+
/* @__PURE__ */ jsxs12(Collapse, { in: expanded, timeout: "auto", children: [
|
|
2274
|
+
/* @__PURE__ */ jsx18(Divider3, { variant: "middle" }),
|
|
2275
|
+
/* @__PURE__ */ jsx18(CardContent2, { children: props.children })
|
|
2276
|
+
] })
|
|
2277
|
+
] });
|
|
2585
2278
|
};
|
|
2586
2279
|
|
|
2587
2280
|
// src/services/index.ts
|
|
@@ -2599,13 +2292,13 @@ var Services = {
|
|
|
2599
2292
|
};
|
|
2600
2293
|
|
|
2601
2294
|
// src/hooks/useUserStatus.ts
|
|
2602
|
-
import { useEffect as
|
|
2295
|
+
import { useEffect as useEffect5, useRef, useState as useState13 } from "react";
|
|
2603
2296
|
var ONLINE_THRESHOLD_MINUTES = 2;
|
|
2604
2297
|
var AWAY_THRESHOLD_MINUTES = 15;
|
|
2605
2298
|
var useUserStatus = (userId, initialLastSeenAt, currentAuthUserId) => {
|
|
2606
2299
|
const supabase = useSupabase();
|
|
2607
|
-
const [status, setStatus] =
|
|
2608
|
-
const [lastSeen, setLastSeen] =
|
|
2300
|
+
const [status, setStatus] = useState13("offline");
|
|
2301
|
+
const [lastSeen, setLastSeen] = useState13(initialLastSeenAt ?? null);
|
|
2609
2302
|
const lastSeenRef = useRef(initialLastSeenAt ?? null);
|
|
2610
2303
|
lastSeenRef.current = lastSeen;
|
|
2611
2304
|
const calculateStatus = (isOnline, lastSeenIso) => {
|
|
@@ -2622,7 +2315,7 @@ var useUserStatus = (userId, initialLastSeenAt, currentAuthUserId) => {
|
|
|
2622
2315
|
}
|
|
2623
2316
|
return "offline";
|
|
2624
2317
|
};
|
|
2625
|
-
|
|
2318
|
+
useEffect5(() => {
|
|
2626
2319
|
if (!userId) return;
|
|
2627
2320
|
let isMounted = true;
|
|
2628
2321
|
const isSelf = currentAuthUserId && userId === currentAuthUserId;
|
|
@@ -2723,19 +2416,41 @@ export {
|
|
|
2723
2416
|
AppSettingsProvider,
|
|
2724
2417
|
AuthProvider,
|
|
2725
2418
|
BreadcrumbProvider,
|
|
2419
|
+
ButtonComponent,
|
|
2420
|
+
CheckboxComponent,
|
|
2421
|
+
CollapsedContainerComponent,
|
|
2726
2422
|
ConfirmationProvider,
|
|
2423
|
+
CopyClipboardButtonComponent,
|
|
2424
|
+
EmailInputComponent,
|
|
2425
|
+
ErrorAlertComponent,
|
|
2426
|
+
ExpandableNoteComponent,
|
|
2427
|
+
FilterContainerComponent,
|
|
2727
2428
|
Hooks,
|
|
2728
2429
|
LocalizationProvider,
|
|
2430
|
+
MyAvatarComponent,
|
|
2431
|
+
NumberInputComponent,
|
|
2432
|
+
PageComponent,
|
|
2433
|
+
PageLinkComponent,
|
|
2729
2434
|
Providers,
|
|
2435
|
+
RefreshButtonComponent,
|
|
2436
|
+
SearchComponent,
|
|
2437
|
+
SelectComponent,
|
|
2730
2438
|
Services,
|
|
2731
2439
|
SupabaseProvider,
|
|
2440
|
+
SwitchComponent,
|
|
2441
|
+
TextFieldComponent,
|
|
2732
2442
|
ThemeProvider,
|
|
2733
2443
|
ToastProvider,
|
|
2444
|
+
TranslatableTooltipComponent,
|
|
2734
2445
|
TranslateProvider,
|
|
2735
2446
|
TranslateText,
|
|
2736
2447
|
TranslationEditProvider,
|
|
2737
|
-
|
|
2448
|
+
UrlComponent,
|
|
2449
|
+
UserAvatarComponent,
|
|
2450
|
+
UserPopoverComponent,
|
|
2451
|
+
UserRoleChipComponent,
|
|
2738
2452
|
UserSettingsProvider,
|
|
2453
|
+
UserStatusChipComponent,
|
|
2739
2454
|
Utils,
|
|
2740
2455
|
defaultUserSettings,
|
|
2741
2456
|
initI18n,
|