@serhii.olishevskyi/docs 1.2.15 → 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/index.d.mts +17 -1
- package/dist/index.d.ts +17 -1
- package/dist/index.js +83 -6
- package/dist/index.mjs +78 -4
- package/package.json +1 -1
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
|
@@ -2966,6 +2966,7 @@ __export(index_exports, {
|
|
|
2966
2966
|
TranslationEditProvider: () => TranslationEditProvider,
|
|
2967
2967
|
UI: () => UI,
|
|
2968
2968
|
UserSettingsProvider: () => UserSettingsProvider,
|
|
2969
|
+
Utils: () => Utils,
|
|
2969
2970
|
defaultUserSettings: () => defaultUserSettings,
|
|
2970
2971
|
initI18n: () => initI18n,
|
|
2971
2972
|
useAI: () => useAI,
|
|
@@ -4787,6 +4788,74 @@ var CheckboxComponent = ({
|
|
|
4787
4788
|
) });
|
|
4788
4789
|
};
|
|
4789
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
|
+
|
|
4790
4859
|
// src/UI/index.ts
|
|
4791
4860
|
var UI = {
|
|
4792
4861
|
Inputs: {
|
|
@@ -4820,7 +4889,8 @@ var UI = {
|
|
|
4820
4889
|
PublicLanguageSelector
|
|
4821
4890
|
},
|
|
4822
4891
|
Pages: {
|
|
4823
|
-
PageLinkWidget
|
|
4892
|
+
PageLinkWidget,
|
|
4893
|
+
CollapsedWidgetContainer
|
|
4824
4894
|
}
|
|
4825
4895
|
}
|
|
4826
4896
|
};
|
|
@@ -4848,16 +4918,16 @@ var Services = {
|
|
|
4848
4918
|
};
|
|
4849
4919
|
|
|
4850
4920
|
// src/hooks/useUserStatus.ts
|
|
4851
|
-
var
|
|
4921
|
+
var import_react30 = require("react");
|
|
4852
4922
|
init_deviceId();
|
|
4853
4923
|
init_context();
|
|
4854
4924
|
var ONLINE_THRESHOLD_MINUTES = 2;
|
|
4855
4925
|
var AWAY_THRESHOLD_MINUTES = 15;
|
|
4856
4926
|
var useUserStatus2 = (userId, initialLastSeenAt, currentAuthUserId) => {
|
|
4857
4927
|
const supabase = useSupabase();
|
|
4858
|
-
const [status, setStatus] = (0,
|
|
4859
|
-
const [lastSeen, setLastSeen] = (0,
|
|
4860
|
-
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);
|
|
4861
4931
|
lastSeenRef.current = lastSeen;
|
|
4862
4932
|
const calculateStatus = (isOnline, lastSeenIso) => {
|
|
4863
4933
|
if (isOnline) return "online";
|
|
@@ -4873,7 +4943,7 @@ var useUserStatus2 = (userId, initialLastSeenAt, currentAuthUserId) => {
|
|
|
4873
4943
|
}
|
|
4874
4944
|
return "offline";
|
|
4875
4945
|
};
|
|
4876
|
-
(0,
|
|
4946
|
+
(0, import_react30.useEffect)(() => {
|
|
4877
4947
|
if (!userId) return;
|
|
4878
4948
|
let isMounted = true;
|
|
4879
4949
|
const isSelf = currentAuthUserId && userId === currentAuthUserId;
|
|
@@ -4943,6 +5013,12 @@ var Hooks = {
|
|
|
4943
5013
|
useDebounce,
|
|
4944
5014
|
useUserStatus: useUserStatus2
|
|
4945
5015
|
};
|
|
5016
|
+
|
|
5017
|
+
// src/utils/index.ts
|
|
5018
|
+
init_deviceId();
|
|
5019
|
+
var Utils = {
|
|
5020
|
+
getDeviceId
|
|
5021
|
+
};
|
|
4946
5022
|
// Annotate the CommonJS export names for ESM import in node:
|
|
4947
5023
|
0 && (module.exports = {
|
|
4948
5024
|
AIProvider,
|
|
@@ -4962,6 +5038,7 @@ var Hooks = {
|
|
|
4962
5038
|
TranslationEditProvider,
|
|
4963
5039
|
UI,
|
|
4964
5040
|
UserSettingsProvider,
|
|
5041
|
+
Utils,
|
|
4965
5042
|
defaultUserSettings,
|
|
4966
5043
|
initI18n,
|
|
4967
5044
|
useAI,
|
package/dist/index.mjs
CHANGED
|
@@ -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,
|