@serhii.olishevskyi/docs 1.2.14 → 1.2.16
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{UserPopoverComponent-Z7YPC3AV.mjs → UserPopoverComponent-RAEPOSIE.mjs} +1 -1
- package/dist/{chunk-7WZQFX6U.mjs → chunk-4NEOJ5KZ.mjs} +14 -7
- package/dist/index.d.mts +17 -1
- package/dist/index.d.ts +17 -1
- package/dist/index.js +97 -13
- package/dist/index.mjs +80 -6
- package/package.json +1 -1
|
@@ -1434,6 +1434,11 @@ var TranslationDialog = ({
|
|
|
1434
1434
|
const [translatingCode, setTranslatingCode] = useState8(null);
|
|
1435
1435
|
const [isTranslatingAll, setIsTranslatingAll] = useState8(false);
|
|
1436
1436
|
const [error, setError] = useState8(null);
|
|
1437
|
+
useEffect6(() => {
|
|
1438
|
+
if (open) {
|
|
1439
|
+
setSelectedProvider(defaultProvider || "auto");
|
|
1440
|
+
}
|
|
1441
|
+
}, [open, defaultProvider]);
|
|
1437
1442
|
useEffect6(() => {
|
|
1438
1443
|
if (!open) return;
|
|
1439
1444
|
const fetchData = async () => {
|
|
@@ -1464,7 +1469,7 @@ var TranslationDialog = ({
|
|
|
1464
1469
|
}
|
|
1465
1470
|
};
|
|
1466
1471
|
fetchData();
|
|
1467
|
-
}, [open, translationKey, namespace]);
|
|
1472
|
+
}, [open, translationKey, namespace, supabase]);
|
|
1468
1473
|
const effectiveProvider = selectedProvider === "auto" ? void 0 : selectedProvider;
|
|
1469
1474
|
const handleAutoTranslate = async (e, targetLang) => {
|
|
1470
1475
|
e.preventDefault();
|
|
@@ -1602,13 +1607,15 @@ var TranslationDialog = ({
|
|
|
1602
1607
|
onChange: (_, val) => val && setSelectedProvider(val),
|
|
1603
1608
|
disabled: isBusy,
|
|
1604
1609
|
children: [
|
|
1605
|
-
/* @__PURE__ */
|
|
1606
|
-
|
|
1607
|
-
|
|
1608
|
-
")"
|
|
1610
|
+
/* @__PURE__ */ jsx10(ToggleButton, { value: "auto", sx: { px: 1.5, py: 0.2, fontSize: "0.75rem" }, children: "Auto" }),
|
|
1611
|
+
/* @__PURE__ */ jsxs3(ToggleButton, { value: "gemini", sx: { px: 1.5, py: 0.2, fontSize: "0.75rem" }, children: [
|
|
1612
|
+
"Gemini ",
|
|
1613
|
+
defaultProvider === "gemini" && "(Default)"
|
|
1609
1614
|
] }),
|
|
1610
|
-
/* @__PURE__ */
|
|
1611
|
-
|
|
1615
|
+
/* @__PURE__ */ jsxs3(ToggleButton, { value: "openai", sx: { px: 1.5, py: 0.2, fontSize: "0.75rem" }, children: [
|
|
1616
|
+
"OpenAI ",
|
|
1617
|
+
defaultProvider === "openai" && "(Default)"
|
|
1618
|
+
] })
|
|
1612
1619
|
]
|
|
1613
1620
|
}
|
|
1614
1621
|
)
|
package/dist/index.d.mts
CHANGED
|
@@ -373,6 +373,17 @@ interface PageLinkWidgetProps {
|
|
|
373
373
|
onActionButtonClick?: () => void;
|
|
374
374
|
}
|
|
375
375
|
|
|
376
|
+
type CollapsedWidgetContainerProps = {
|
|
377
|
+
overrideNamespace?: string;
|
|
378
|
+
title: ReactNode;
|
|
379
|
+
subtitle?: ReactNode;
|
|
380
|
+
icon?: ReactNode;
|
|
381
|
+
expanded?: boolean;
|
|
382
|
+
uncollapsedContent?: ReactNode;
|
|
383
|
+
disableShadow?: boolean;
|
|
384
|
+
onExpanded?: (expanded: boolean) => void;
|
|
385
|
+
};
|
|
386
|
+
|
|
376
387
|
declare const UI: {
|
|
377
388
|
Inputs: {
|
|
378
389
|
TextField: React$1.FC<TextFieldComponentProps>;
|
|
@@ -403,6 +414,7 @@ declare const UI: {
|
|
|
403
414
|
};
|
|
404
415
|
Pages: {
|
|
405
416
|
PageLinkWidget: React$1.FC<PageLinkWidgetProps>;
|
|
417
|
+
CollapsedWidgetContainer: (props: React$1.PropsWithChildren<CollapsedWidgetContainerProps>) => React$1.JSX.Element;
|
|
406
418
|
};
|
|
407
419
|
};
|
|
408
420
|
};
|
|
@@ -749,4 +761,8 @@ declare const Hooks: {
|
|
|
749
761
|
};
|
|
750
762
|
};
|
|
751
763
|
|
|
752
|
-
|
|
764
|
+
declare const Utils: {
|
|
765
|
+
readonly getDeviceId: () => string;
|
|
766
|
+
};
|
|
767
|
+
|
|
768
|
+
export { type AIConfig, type AIGenerateOptions, AIProvider, type AIProviderProps, type AIProviderType, AppSettingsProvider, AuthProvider, BreadcrumbProvider, type CheckboxComponentProps, type CollapsedWidgetContainerProps, type CompanyMember, type ConfirmOptions, type ConfirmResult, ConfirmationProvider, type ConfirmationProviderProps, type CopyClipboardButtonComponentProps, type DialogSeverity, type DisplayState, type EmailInputComponentProps, type ExpandableNoteComponentProps, type FullCompanyMemberItem, Hooks, type Language, LocalizationProvider, type Membership, type MembershipRole, type MyAvatarComponentProps, type NumberInputComponentProps, type PageLink, type PageLinkWidgetProps, Providers, type SaveCompanyUserPayload, type SearchComponentProps, type SelectComponentProps, type SelectOption, Services, type SupabaseConfig, SupabaseProvider, type SupabaseProviderProps, type SwitchComponentProps, type TextFieldComponentProps, type ThemeColors, type ThemeConfig, type ThemeMode, ThemeProvider, ToastProvider, type ToastType, type TranslatableTooltipComponentProps, TranslateProvider, TranslateText, TranslationEditProvider, type TypographyConfig, UI, type UrlComponentProps as UrlProps, type UserAvatarComponentProps, type UserGroupedSessions, type UserPopoverComponentProps, type UserProfile, type UserRoleChipComponentProps, type UserSessionItem, type UserSettings, UserSettingsProvider, type UserStatusChipComponentProps, type UserStatusType, Utils, defaultUserSettings, initI18n, useAI, useAppSettings, useAppTheme, useAuth, useBreadcrumb, useConfirmation, useLocalization, useSupabase, useToast, useTranslationEdit, useTranslationNamespace, useUserSettings };
|
package/dist/index.d.ts
CHANGED
|
@@ -373,6 +373,17 @@ interface PageLinkWidgetProps {
|
|
|
373
373
|
onActionButtonClick?: () => void;
|
|
374
374
|
}
|
|
375
375
|
|
|
376
|
+
type CollapsedWidgetContainerProps = {
|
|
377
|
+
overrideNamespace?: string;
|
|
378
|
+
title: ReactNode;
|
|
379
|
+
subtitle?: ReactNode;
|
|
380
|
+
icon?: ReactNode;
|
|
381
|
+
expanded?: boolean;
|
|
382
|
+
uncollapsedContent?: ReactNode;
|
|
383
|
+
disableShadow?: boolean;
|
|
384
|
+
onExpanded?: (expanded: boolean) => void;
|
|
385
|
+
};
|
|
386
|
+
|
|
376
387
|
declare const UI: {
|
|
377
388
|
Inputs: {
|
|
378
389
|
TextField: React$1.FC<TextFieldComponentProps>;
|
|
@@ -403,6 +414,7 @@ declare const UI: {
|
|
|
403
414
|
};
|
|
404
415
|
Pages: {
|
|
405
416
|
PageLinkWidget: React$1.FC<PageLinkWidgetProps>;
|
|
417
|
+
CollapsedWidgetContainer: (props: React$1.PropsWithChildren<CollapsedWidgetContainerProps>) => React$1.JSX.Element;
|
|
406
418
|
};
|
|
407
419
|
};
|
|
408
420
|
};
|
|
@@ -749,4 +761,8 @@ declare const Hooks: {
|
|
|
749
761
|
};
|
|
750
762
|
};
|
|
751
763
|
|
|
752
|
-
|
|
764
|
+
declare const Utils: {
|
|
765
|
+
readonly getDeviceId: () => string;
|
|
766
|
+
};
|
|
767
|
+
|
|
768
|
+
export { type AIConfig, type AIGenerateOptions, AIProvider, type AIProviderProps, type AIProviderType, AppSettingsProvider, AuthProvider, BreadcrumbProvider, type CheckboxComponentProps, type CollapsedWidgetContainerProps, type CompanyMember, type ConfirmOptions, type ConfirmResult, ConfirmationProvider, type ConfirmationProviderProps, type CopyClipboardButtonComponentProps, type DialogSeverity, type DisplayState, type EmailInputComponentProps, type ExpandableNoteComponentProps, type FullCompanyMemberItem, Hooks, type Language, LocalizationProvider, type Membership, type MembershipRole, type MyAvatarComponentProps, type NumberInputComponentProps, type PageLink, type PageLinkWidgetProps, Providers, type SaveCompanyUserPayload, type SearchComponentProps, type SelectComponentProps, type SelectOption, Services, type SupabaseConfig, SupabaseProvider, type SupabaseProviderProps, type SwitchComponentProps, type TextFieldComponentProps, type ThemeColors, type ThemeConfig, type ThemeMode, ThemeProvider, ToastProvider, type ToastType, type TranslatableTooltipComponentProps, TranslateProvider, TranslateText, TranslationEditProvider, type TypographyConfig, UI, type UrlComponentProps as UrlProps, type UserAvatarComponentProps, type UserGroupedSessions, type UserPopoverComponentProps, type UserProfile, type UserRoleChipComponentProps, type UserSessionItem, type UserSettings, UserSettingsProvider, type UserStatusChipComponentProps, type UserStatusType, Utils, defaultUserSettings, initI18n, useAI, useAppSettings, useAppTheme, useAuth, useBreadcrumb, useConfirmation, useLocalization, useSupabase, useToast, useTranslationEdit, useTranslationNamespace, useUserSettings };
|
package/dist/index.js
CHANGED
|
@@ -1031,6 +1031,11 @@ var init_TranslationDialog = __esm({
|
|
|
1031
1031
|
const [translatingCode, setTranslatingCode] = (0, import_react5.useState)(null);
|
|
1032
1032
|
const [isTranslatingAll, setIsTranslatingAll] = (0, import_react5.useState)(false);
|
|
1033
1033
|
const [error, setError] = (0, import_react5.useState)(null);
|
|
1034
|
+
(0, import_react5.useEffect)(() => {
|
|
1035
|
+
if (open) {
|
|
1036
|
+
setSelectedProvider(defaultProvider || "auto");
|
|
1037
|
+
}
|
|
1038
|
+
}, [open, defaultProvider]);
|
|
1034
1039
|
(0, import_react5.useEffect)(() => {
|
|
1035
1040
|
if (!open) return;
|
|
1036
1041
|
const fetchData = async () => {
|
|
@@ -1061,7 +1066,7 @@ var init_TranslationDialog = __esm({
|
|
|
1061
1066
|
}
|
|
1062
1067
|
};
|
|
1063
1068
|
fetchData();
|
|
1064
|
-
}, [open, translationKey, namespace]);
|
|
1069
|
+
}, [open, translationKey, namespace, supabase]);
|
|
1065
1070
|
const effectiveProvider = selectedProvider === "auto" ? void 0 : selectedProvider;
|
|
1066
1071
|
const handleAutoTranslate = async (e, targetLang) => {
|
|
1067
1072
|
e.preventDefault();
|
|
@@ -1199,13 +1204,15 @@ var init_TranslationDialog = __esm({
|
|
|
1199
1204
|
onChange: (_, val) => val && setSelectedProvider(val),
|
|
1200
1205
|
disabled: isBusy,
|
|
1201
1206
|
children: [
|
|
1202
|
-
/* @__PURE__ */ (0, import_jsx_runtime5.
|
|
1203
|
-
|
|
1204
|
-
|
|
1205
|
-
")"
|
|
1207
|
+
/* @__PURE__ */ (0, import_jsx_runtime5.jsx)(import_material.ToggleButton, { value: "auto", sx: { px: 1.5, py: 0.2, fontSize: "0.75rem" }, children: "Auto" }),
|
|
1208
|
+
/* @__PURE__ */ (0, import_jsx_runtime5.jsxs)(import_material.ToggleButton, { value: "gemini", sx: { px: 1.5, py: 0.2, fontSize: "0.75rem" }, children: [
|
|
1209
|
+
"Gemini ",
|
|
1210
|
+
defaultProvider === "gemini" && "(Default)"
|
|
1206
1211
|
] }),
|
|
1207
|
-
/* @__PURE__ */ (0, import_jsx_runtime5.
|
|
1208
|
-
|
|
1212
|
+
/* @__PURE__ */ (0, import_jsx_runtime5.jsxs)(import_material.ToggleButton, { value: "openai", sx: { px: 1.5, py: 0.2, fontSize: "0.75rem" }, children: [
|
|
1213
|
+
"OpenAI ",
|
|
1214
|
+
defaultProvider === "openai" && "(Default)"
|
|
1215
|
+
] })
|
|
1209
1216
|
]
|
|
1210
1217
|
}
|
|
1211
1218
|
)
|
|
@@ -2959,6 +2966,7 @@ __export(index_exports, {
|
|
|
2959
2966
|
TranslationEditProvider: () => TranslationEditProvider,
|
|
2960
2967
|
UI: () => UI,
|
|
2961
2968
|
UserSettingsProvider: () => UserSettingsProvider,
|
|
2969
|
+
Utils: () => Utils,
|
|
2962
2970
|
defaultUserSettings: () => defaultUserSettings,
|
|
2963
2971
|
initI18n: () => initI18n,
|
|
2964
2972
|
useAI: () => useAI,
|
|
@@ -4780,6 +4788,74 @@ var CheckboxComponent = ({
|
|
|
4780
4788
|
) });
|
|
4781
4789
|
};
|
|
4782
4790
|
|
|
4791
|
+
// src/UI/widgets/page/CollapsedWidgetContainer.tsx
|
|
4792
|
+
var import_icons_material4 = require("@mui/icons-material");
|
|
4793
|
+
var import_material24 = require("@mui/material");
|
|
4794
|
+
var import_react29 = require("react");
|
|
4795
|
+
init_context();
|
|
4796
|
+
var import_jsx_runtime34 = require("react/jsx-runtime");
|
|
4797
|
+
var ExpandMore = (0, import_material24.styled)((props) => {
|
|
4798
|
+
const { expand, ...other } = props;
|
|
4799
|
+
return /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(import_material24.IconButton, { size: "small", ...other, children: /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(import_icons_material4.ExpandMore, {}) });
|
|
4800
|
+
})(({ theme, expand }) => ({
|
|
4801
|
+
transform: !expand ? "rotate(0deg)" : "rotate(180deg)",
|
|
4802
|
+
transition: theme.transitions.create("transform", {
|
|
4803
|
+
duration: theme.transitions.duration.shortest
|
|
4804
|
+
}),
|
|
4805
|
+
backgroundColor: expand ? theme.palette.primary.main : "transparent",
|
|
4806
|
+
color: expand ? theme.palette.common.white : theme.palette.text.secondary,
|
|
4807
|
+
border: `1px solid ${expand ? theme.palette.primary.main : theme.palette.divider}`,
|
|
4808
|
+
"&:hover": {
|
|
4809
|
+
backgroundColor: expand ? theme.palette.primary.dark : theme.palette.action.hover
|
|
4810
|
+
}
|
|
4811
|
+
}));
|
|
4812
|
+
var CollapsedWidgetContainer = (props) => {
|
|
4813
|
+
const { displayState } = useAppTheme();
|
|
4814
|
+
const [expanded, setExpanded] = (0, import_react29.useState)(props.expanded === void 0 ? false : props.expanded);
|
|
4815
|
+
const handleExpandClick = () => {
|
|
4816
|
+
setExpanded(!expanded);
|
|
4817
|
+
props.onExpanded && props.onExpanded(!expanded);
|
|
4818
|
+
};
|
|
4819
|
+
return /* @__PURE__ */ (0, import_jsx_runtime34.jsxs)(import_material24.Card, { sx: { width: "100%", overflow: "hidden", mb: 2, boxShadow: displayState.isMobile ? "none" : props.disableShadow ? "none" : "0 20px 25px -5px rgb(0 0 0 / 0.1)", borderRadius: displayState.isMobile ? 0 : 1 }, children: [
|
|
4820
|
+
/* @__PURE__ */ (0, import_jsx_runtime34.jsxs)(
|
|
4821
|
+
import_material24.Box,
|
|
4822
|
+
{
|
|
4823
|
+
onClick: () => handleExpandClick(),
|
|
4824
|
+
sx: {
|
|
4825
|
+
cursor: "pointer",
|
|
4826
|
+
"&:hover": { bgcolor: "rgba(0,0,0,0.02)" },
|
|
4827
|
+
display: "flex",
|
|
4828
|
+
alignItems: "center",
|
|
4829
|
+
pr: 2
|
|
4830
|
+
},
|
|
4831
|
+
children: [
|
|
4832
|
+
/* @__PURE__ */ (0, import_jsx_runtime34.jsx)(
|
|
4833
|
+
import_material24.CardHeader,
|
|
4834
|
+
{
|
|
4835
|
+
sx: { flexGrow: 1 },
|
|
4836
|
+
avatar: /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(import_material24.Avatar, { sx: { bgcolor: "primary.main" }, children: props.icon }),
|
|
4837
|
+
label: typeof props.title === "string" ? /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(import_material24.Typography, { variant: "subtitle1", sx: { fontWeight: "700" }, children: /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(TranslateText, { overrideNamespace: props.overrideNamespace, children: props.title }) }) : props.title,
|
|
4838
|
+
subheader: typeof props.subtitle === "string" ? /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(TranslateText, { overrideNamespace: props.overrideNamespace, children: props.subtitle }) : props.subtitle
|
|
4839
|
+
}
|
|
4840
|
+
),
|
|
4841
|
+
/* @__PURE__ */ (0, import_jsx_runtime34.jsx)(import_material24.Tooltip, { title: expanded ? "Show Less" : "Show More", children: /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(import_material24.Box, { sx: { ml: 1 }, children: /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(
|
|
4842
|
+
ExpandMore,
|
|
4843
|
+
{
|
|
4844
|
+
expand: expanded,
|
|
4845
|
+
onClick: handleExpandClick,
|
|
4846
|
+
"aria-expanded": expanded
|
|
4847
|
+
}
|
|
4848
|
+
) }) })
|
|
4849
|
+
]
|
|
4850
|
+
}
|
|
4851
|
+
),
|
|
4852
|
+
/* @__PURE__ */ (0, import_jsx_runtime34.jsxs)(import_material24.Collapse, { in: expanded, timeout: "auto", children: [
|
|
4853
|
+
/* @__PURE__ */ (0, import_jsx_runtime34.jsx)(import_material24.Divider, { variant: "middle" }),
|
|
4854
|
+
/* @__PURE__ */ (0, import_jsx_runtime34.jsx)(import_material24.CardContent, { children: props.children })
|
|
4855
|
+
] })
|
|
4856
|
+
] });
|
|
4857
|
+
};
|
|
4858
|
+
|
|
4783
4859
|
// src/UI/index.ts
|
|
4784
4860
|
var UI = {
|
|
4785
4861
|
Inputs: {
|
|
@@ -4813,7 +4889,8 @@ var UI = {
|
|
|
4813
4889
|
PublicLanguageSelector
|
|
4814
4890
|
},
|
|
4815
4891
|
Pages: {
|
|
4816
|
-
PageLinkWidget
|
|
4892
|
+
PageLinkWidget,
|
|
4893
|
+
CollapsedWidgetContainer
|
|
4817
4894
|
}
|
|
4818
4895
|
}
|
|
4819
4896
|
};
|
|
@@ -4841,16 +4918,16 @@ var Services = {
|
|
|
4841
4918
|
};
|
|
4842
4919
|
|
|
4843
4920
|
// src/hooks/useUserStatus.ts
|
|
4844
|
-
var
|
|
4921
|
+
var import_react30 = require("react");
|
|
4845
4922
|
init_deviceId();
|
|
4846
4923
|
init_context();
|
|
4847
4924
|
var ONLINE_THRESHOLD_MINUTES = 2;
|
|
4848
4925
|
var AWAY_THRESHOLD_MINUTES = 15;
|
|
4849
4926
|
var useUserStatus2 = (userId, initialLastSeenAt, currentAuthUserId) => {
|
|
4850
4927
|
const supabase = useSupabase();
|
|
4851
|
-
const [status, setStatus] = (0,
|
|
4852
|
-
const [lastSeen, setLastSeen] = (0,
|
|
4853
|
-
const lastSeenRef = (0,
|
|
4928
|
+
const [status, setStatus] = (0, import_react30.useState)("offline");
|
|
4929
|
+
const [lastSeen, setLastSeen] = (0, import_react30.useState)(initialLastSeenAt ?? null);
|
|
4930
|
+
const lastSeenRef = (0, import_react30.useRef)(initialLastSeenAt ?? null);
|
|
4854
4931
|
lastSeenRef.current = lastSeen;
|
|
4855
4932
|
const calculateStatus = (isOnline, lastSeenIso) => {
|
|
4856
4933
|
if (isOnline) return "online";
|
|
@@ -4866,7 +4943,7 @@ var useUserStatus2 = (userId, initialLastSeenAt, currentAuthUserId) => {
|
|
|
4866
4943
|
}
|
|
4867
4944
|
return "offline";
|
|
4868
4945
|
};
|
|
4869
|
-
(0,
|
|
4946
|
+
(0, import_react30.useEffect)(() => {
|
|
4870
4947
|
if (!userId) return;
|
|
4871
4948
|
let isMounted = true;
|
|
4872
4949
|
const isSelf = currentAuthUserId && userId === currentAuthUserId;
|
|
@@ -4936,6 +5013,12 @@ var Hooks = {
|
|
|
4936
5013
|
useDebounce,
|
|
4937
5014
|
useUserStatus: useUserStatus2
|
|
4938
5015
|
};
|
|
5016
|
+
|
|
5017
|
+
// src/utils/index.ts
|
|
5018
|
+
init_deviceId();
|
|
5019
|
+
var Utils = {
|
|
5020
|
+
getDeviceId
|
|
5021
|
+
};
|
|
4939
5022
|
// Annotate the CommonJS export names for ESM import in node:
|
|
4940
5023
|
0 && (module.exports = {
|
|
4941
5024
|
AIProvider,
|
|
@@ -4955,6 +5038,7 @@ var Hooks = {
|
|
|
4955
5038
|
TranslationEditProvider,
|
|
4956
5039
|
UI,
|
|
4957
5040
|
UserSettingsProvider,
|
|
5041
|
+
Utils,
|
|
4958
5042
|
defaultUserSettings,
|
|
4959
5043
|
initI18n,
|
|
4960
5044
|
useAI,
|
package/dist/index.mjs
CHANGED
|
@@ -43,7 +43,7 @@ import {
|
|
|
43
43
|
useTranslationEdit,
|
|
44
44
|
useTranslationNamespace,
|
|
45
45
|
useUserSettings
|
|
46
|
-
} from "./chunk-
|
|
46
|
+
} from "./chunk-4NEOJ5KZ.mjs";
|
|
47
47
|
|
|
48
48
|
// src/UI/components/inputs/TextFieldComponent.tsx
|
|
49
49
|
import { useState } from "react";
|
|
@@ -741,7 +741,7 @@ var EmailInputComponent = ({
|
|
|
741
741
|
import { useState as useState5, useEffect as useEffect2, lazy, Suspense } from "react";
|
|
742
742
|
import { Avatar, Tooltip as Tooltip3, Typography as Typography2 } from "@mui/material";
|
|
743
743
|
import { Fragment as Fragment4, jsx as jsx5, jsxs as jsxs4 } from "react/jsx-runtime";
|
|
744
|
-
var LazyUserPopover = lazy(() => import("./UserPopoverComponent-
|
|
744
|
+
var LazyUserPopover = lazy(() => import("./UserPopoverComponent-RAEPOSIE.mjs"));
|
|
745
745
|
var getInitials = (name) => {
|
|
746
746
|
if (!name) return "?";
|
|
747
747
|
const parts = name.trim().split(" ");
|
|
@@ -1873,6 +1873,73 @@ var CheckboxComponent = ({
|
|
|
1873
1873
|
) });
|
|
1874
1874
|
};
|
|
1875
1875
|
|
|
1876
|
+
// src/UI/widgets/page/CollapsedWidgetContainer.tsx
|
|
1877
|
+
import { ExpandMore as ExpandMoreIcon } from "@mui/icons-material";
|
|
1878
|
+
import { Avatar as Avatar3, Box as Box8, Card as Card2, CardContent as CardContent2, CardHeader as CardHeader2, Collapse, Divider as Divider2, IconButton as IconButton7, styled, Tooltip as Tooltip7, Typography as Typography7 } from "@mui/material";
|
|
1879
|
+
import { useState as useState11 } from "react";
|
|
1880
|
+
import { jsx as jsx14, jsxs as jsxs11 } from "react/jsx-runtime";
|
|
1881
|
+
var ExpandMore = styled((props) => {
|
|
1882
|
+
const { expand, ...other } = props;
|
|
1883
|
+
return /* @__PURE__ */ jsx14(IconButton7, { size: "small", ...other, children: /* @__PURE__ */ jsx14(ExpandMoreIcon, {}) });
|
|
1884
|
+
})(({ theme, expand }) => ({
|
|
1885
|
+
transform: !expand ? "rotate(0deg)" : "rotate(180deg)",
|
|
1886
|
+
transition: theme.transitions.create("transform", {
|
|
1887
|
+
duration: theme.transitions.duration.shortest
|
|
1888
|
+
}),
|
|
1889
|
+
backgroundColor: expand ? theme.palette.primary.main : "transparent",
|
|
1890
|
+
color: expand ? theme.palette.common.white : theme.palette.text.secondary,
|
|
1891
|
+
border: `1px solid ${expand ? theme.palette.primary.main : theme.palette.divider}`,
|
|
1892
|
+
"&:hover": {
|
|
1893
|
+
backgroundColor: expand ? theme.palette.primary.dark : theme.palette.action.hover
|
|
1894
|
+
}
|
|
1895
|
+
}));
|
|
1896
|
+
var CollapsedWidgetContainer = (props) => {
|
|
1897
|
+
const { displayState } = useAppTheme();
|
|
1898
|
+
const [expanded, setExpanded] = useState11(props.expanded === void 0 ? false : props.expanded);
|
|
1899
|
+
const handleExpandClick = () => {
|
|
1900
|
+
setExpanded(!expanded);
|
|
1901
|
+
props.onExpanded && props.onExpanded(!expanded);
|
|
1902
|
+
};
|
|
1903
|
+
return /* @__PURE__ */ jsxs11(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: [
|
|
1904
|
+
/* @__PURE__ */ jsxs11(
|
|
1905
|
+
Box8,
|
|
1906
|
+
{
|
|
1907
|
+
onClick: () => handleExpandClick(),
|
|
1908
|
+
sx: {
|
|
1909
|
+
cursor: "pointer",
|
|
1910
|
+
"&:hover": { bgcolor: "rgba(0,0,0,0.02)" },
|
|
1911
|
+
display: "flex",
|
|
1912
|
+
alignItems: "center",
|
|
1913
|
+
pr: 2
|
|
1914
|
+
},
|
|
1915
|
+
children: [
|
|
1916
|
+
/* @__PURE__ */ jsx14(
|
|
1917
|
+
CardHeader2,
|
|
1918
|
+
{
|
|
1919
|
+
sx: { flexGrow: 1 },
|
|
1920
|
+
avatar: /* @__PURE__ */ jsx14(Avatar3, { sx: { bgcolor: "primary.main" }, children: props.icon }),
|
|
1921
|
+
label: typeof props.title === "string" ? /* @__PURE__ */ jsx14(Typography7, { variant: "subtitle1", sx: { fontWeight: "700" }, children: /* @__PURE__ */ jsx14(TranslateText, { overrideNamespace: props.overrideNamespace, children: props.title }) }) : props.title,
|
|
1922
|
+
subheader: typeof props.subtitle === "string" ? /* @__PURE__ */ jsx14(TranslateText, { overrideNamespace: props.overrideNamespace, children: props.subtitle }) : props.subtitle
|
|
1923
|
+
}
|
|
1924
|
+
),
|
|
1925
|
+
/* @__PURE__ */ jsx14(Tooltip7, { title: expanded ? "Show Less" : "Show More", children: /* @__PURE__ */ jsx14(Box8, { sx: { ml: 1 }, children: /* @__PURE__ */ jsx14(
|
|
1926
|
+
ExpandMore,
|
|
1927
|
+
{
|
|
1928
|
+
expand: expanded,
|
|
1929
|
+
onClick: handleExpandClick,
|
|
1930
|
+
"aria-expanded": expanded
|
|
1931
|
+
}
|
|
1932
|
+
) }) })
|
|
1933
|
+
]
|
|
1934
|
+
}
|
|
1935
|
+
),
|
|
1936
|
+
/* @__PURE__ */ jsxs11(Collapse, { in: expanded, timeout: "auto", children: [
|
|
1937
|
+
/* @__PURE__ */ jsx14(Divider2, { variant: "middle" }),
|
|
1938
|
+
/* @__PURE__ */ jsx14(CardContent2, { children: props.children })
|
|
1939
|
+
] })
|
|
1940
|
+
] });
|
|
1941
|
+
};
|
|
1942
|
+
|
|
1876
1943
|
// src/UI/index.ts
|
|
1877
1944
|
var UI = {
|
|
1878
1945
|
Inputs: {
|
|
@@ -1906,7 +1973,8 @@ var UI = {
|
|
|
1906
1973
|
PublicLanguageSelector
|
|
1907
1974
|
},
|
|
1908
1975
|
Pages: {
|
|
1909
|
-
PageLinkWidget
|
|
1976
|
+
PageLinkWidget,
|
|
1977
|
+
CollapsedWidgetContainer
|
|
1910
1978
|
}
|
|
1911
1979
|
}
|
|
1912
1980
|
};
|
|
@@ -1926,13 +1994,13 @@ var Services = {
|
|
|
1926
1994
|
};
|
|
1927
1995
|
|
|
1928
1996
|
// src/hooks/useUserStatus.ts
|
|
1929
|
-
import { useEffect as useEffect6, useRef, useState as
|
|
1997
|
+
import { useEffect as useEffect6, useRef, useState as useState12 } from "react";
|
|
1930
1998
|
var ONLINE_THRESHOLD_MINUTES = 2;
|
|
1931
1999
|
var AWAY_THRESHOLD_MINUTES = 15;
|
|
1932
2000
|
var useUserStatus = (userId, initialLastSeenAt, currentAuthUserId) => {
|
|
1933
2001
|
const supabase = useSupabase();
|
|
1934
|
-
const [status, setStatus] =
|
|
1935
|
-
const [lastSeen, setLastSeen] =
|
|
2002
|
+
const [status, setStatus] = useState12("offline");
|
|
2003
|
+
const [lastSeen, setLastSeen] = useState12(initialLastSeenAt ?? null);
|
|
1936
2004
|
const lastSeenRef = useRef(initialLastSeenAt ?? null);
|
|
1937
2005
|
lastSeenRef.current = lastSeen;
|
|
1938
2006
|
const calculateStatus = (isOnline, lastSeenIso) => {
|
|
@@ -2019,6 +2087,11 @@ var Hooks = {
|
|
|
2019
2087
|
useDebounce,
|
|
2020
2088
|
useUserStatus
|
|
2021
2089
|
};
|
|
2090
|
+
|
|
2091
|
+
// src/utils/index.ts
|
|
2092
|
+
var Utils = {
|
|
2093
|
+
getDeviceId
|
|
2094
|
+
};
|
|
2022
2095
|
export {
|
|
2023
2096
|
AIProvider,
|
|
2024
2097
|
AppSettingsProvider,
|
|
@@ -2037,6 +2110,7 @@ export {
|
|
|
2037
2110
|
TranslationEditProvider,
|
|
2038
2111
|
UI,
|
|
2039
2112
|
UserSettingsProvider,
|
|
2113
|
+
Utils,
|
|
2040
2114
|
defaultUserSettings,
|
|
2041
2115
|
initI18n,
|
|
2042
2116
|
useAI,
|