@layers-app/shared 0.4.6 → 0.4.8
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/assets/default-workspace-avatar.jpg.js +1 -1
- package/dist/components/AliasTextInput/AliasTextInput.d.ts.map +1 -1
- package/dist/components/AliasTextInput/AliasTextInput.js +32 -32
- package/dist/components/AppContainer/AppContainer.d.ts +1 -1
- package/dist/components/AppContainer/AppContainer.d.ts.map +1 -1
- package/dist/components/AppContainer/AppContainer.js +82 -70
- package/dist/components/AppContainer/AppContainer.module.css.js +20 -10
- package/dist/components/AppContainer/components/AppsSidebar/DesktopUpdateButton.d.ts +6 -0
- package/dist/components/AppContainer/components/AppsSidebar/DesktopUpdateButton.d.ts.map +1 -0
- package/dist/components/AppContainer/components/AppsSidebar/DesktopUpdateButton.js +161 -0
- package/dist/components/AppContainer/components/AppsSidebar/TopSection.d.ts.map +1 -1
- package/dist/components/AppContainer/components/AppsSidebar/TopSection.js +77 -49
- package/dist/components/AppContainer/components/AppsSidebar/UserSection.d.ts.map +1 -1
- package/dist/components/AppContainer/components/AppsSidebar/UserSection.js +238 -105
- package/dist/components/AppContainer/components/Main.js +4 -4
- package/dist/components/AppContainer/components/NavbarContent.d.ts.map +1 -1
- package/dist/components/AppContainer/components/NavbarContent.js +16 -2
- package/dist/components/AppContainer/components/SlideAnimation.js +4 -4
- package/dist/components/AppContainer/components/ToolSidebar.d.ts +5 -0
- package/dist/components/AppContainer/components/ToolSidebar.d.ts.map +1 -1
- package/dist/components/AppContainer/components/ToolSidebar.js +51 -39
- package/dist/components/AppContainer/components/menus/HelpMenu/HelpMenu.d.ts +62 -1
- package/dist/components/AppContainer/components/menus/HelpMenu/HelpMenu.d.ts.map +1 -1
- package/dist/components/AppContainer/components/menus/HelpMenu/HelpMenu.js +1107 -137
- package/dist/components/AppContainer/components/menus/HelpMenu/HelpMenu.module.css.js +158 -6
- package/dist/components/AppContainer/types.d.ts +12 -0
- package/dist/components/AppContainer/types.d.ts.map +1 -1
- package/dist/components/AttachmentsPreview/AttachmentsPreview.d.ts +3 -1
- package/dist/components/AttachmentsPreview/AttachmentsPreview.d.ts.map +1 -1
- package/dist/components/AttachmentsPreview/AttachmentsPreview.js +237 -93
- package/dist/components/AttachmentsPreview/AttachmentsPreview.module.css.js +18 -16
- package/dist/components/Chat/ChatInput/index.d.ts +13 -1
- package/dist/components/Chat/ChatInput/index.d.ts.map +1 -1
- package/dist/components/Chat/ChatInput/index.js +264 -164
- package/dist/components/Chat/ChatInput/useVoiceRecorder.d.ts +16 -0
- package/dist/components/Chat/ChatInput/useVoiceRecorder.d.ts.map +1 -0
- package/dist/components/Chat/ChatInput/useVoiceRecorder.js +83 -0
- package/dist/components/Chat/ChatMessage/ChatMessage.module.css.js +20 -16
- package/dist/components/Chat/ChatMessage/index.d.ts +16 -0
- package/dist/components/Chat/ChatMessage/index.d.ts.map +1 -1
- package/dist/components/Chat/ChatMessage/index.js +153 -118
- package/dist/components/Chat/MessageActions/index.d.ts +2 -0
- package/dist/components/Chat/MessageActions/index.d.ts.map +1 -1
- package/dist/components/Chat/MessageActions/index.js +189 -50
- package/dist/components/Chat/MessageAuthor/index.d.ts +7 -1
- package/dist/components/Chat/MessageAuthor/index.d.ts.map +1 -1
- package/dist/components/Chat/MessageAuthor/index.js +39 -25
- package/dist/components/Chat/MessageList/MessageList.module.css.js +14 -12
- package/dist/components/Chat/MessageList/index.d.ts +17 -25
- package/dist/components/Chat/MessageList/index.d.ts.map +1 -1
- package/dist/components/Chat/MessageList/index.js +201 -149
- package/dist/components/Chat/MessageMeta/index.d.ts.map +1 -1
- package/dist/components/Chat/MessageMeta/index.js +21 -19
- package/dist/components/ColorPicker/ColorPicker.d.ts +3 -0
- package/dist/components/ColorPicker/ColorPicker.d.ts.map +1 -1
- package/dist/components/ColorPicker/ColorPicker.js +81 -76
- package/dist/components/ColorPicker/ColorPickerToolbar.d.ts +1 -0
- package/dist/components/ColorPicker/ColorPickerToolbar.d.ts.map +1 -1
- package/dist/components/ColorPicker/ColorPickerToolbar.js +97 -91
- package/dist/components/CommentComposer/CommentEditorHotkeys.d.ts +2 -1
- package/dist/components/CommentComposer/CommentEditorHotkeys.d.ts.map +1 -1
- package/dist/components/CommentComposer/CommentEditorHotkeys.js +29 -26
- package/dist/components/CommentComposer/index.d.ts +1 -1
- package/dist/components/CommentComposer/index.d.ts.map +1 -1
- package/dist/components/CommentComposer/index.js +70 -68
- package/dist/components/CommentComposer/types.d.ts +6 -0
- package/dist/components/CommentComposer/types.d.ts.map +1 -1
- package/dist/components/CustomKBD/index.js +21 -22
- package/dist/components/EmojiPicker/EmojiPicker.d.ts +1 -0
- package/dist/components/EmojiPicker/EmojiPicker.d.ts.map +1 -1
- package/dist/components/EmojiPicker/EmojiPicker.js +129 -121
- package/dist/components/EntityTitle/EntityTitle.d.ts +3 -4
- package/dist/components/EntityTitle/EntityTitle.d.ts.map +1 -1
- package/dist/components/EntityTitle/EntityTitle.js +81 -80
- package/dist/components/FormViewer/helpers/conditions.d.ts.map +1 -1
- package/dist/components/FormViewer/helpers/conditions.js +33 -17
- package/dist/components/IntegrationFlowAnimation/IntegrationFlowAnimation.d.ts +3 -1
- package/dist/components/IntegrationFlowAnimation/IntegrationFlowAnimation.d.ts.map +1 -1
- package/dist/components/IntegrationFlowAnimation/IntegrationFlowAnimation.js +26 -25
- package/dist/components/NewToolbar/utils.d.ts +12 -0
- package/dist/components/NewToolbar/utils.d.ts.map +1 -0
- package/dist/components/Notification/InfiniteScroll.d.ts +12 -0
- package/dist/components/Notification/InfiniteScroll.d.ts.map +1 -0
- package/dist/components/Notification/InfiniteScroll.js +42 -0
- package/dist/components/Notification/Notification.d.ts +4 -1
- package/dist/components/Notification/Notification.d.ts.map +1 -1
- package/dist/components/Notification/Notification.module.css.js +28 -4
- package/dist/components/Notification/atoms/ActionBadge.d.ts +11 -0
- package/dist/components/Notification/atoms/ActionBadge.d.ts.map +1 -0
- package/dist/components/Notification/atoms/ActionBadge.js +53 -0
- package/dist/components/Notification/atoms/ArchiveIcon.d.ts +7 -0
- package/dist/components/Notification/atoms/ArchiveIcon.d.ts.map +1 -0
- package/dist/components/Notification/atoms/ArchiveIcon.js +40 -0
- package/dist/components/Notification/atoms/InboxIcon.d.ts +7 -0
- package/dist/components/Notification/atoms/InboxIcon.d.ts.map +1 -0
- package/dist/components/Notification/atoms/InboxIcon.js +33 -0
- package/dist/components/Notification/atoms/MarkReadIcon.d.ts +7 -0
- package/dist/components/Notification/atoms/MarkReadIcon.d.ts.map +1 -0
- package/dist/components/Notification/atoms/MarkReadIcon.js +33 -0
- package/dist/components/Notification/atoms/ResourceIcon.d.ts +7 -0
- package/dist/components/Notification/atoms/ResourceIcon.d.ts.map +1 -0
- package/dist/components/Notification/atoms/TabBadge.d.ts +7 -0
- package/dist/components/Notification/atoms/TabBadge.d.ts.map +1 -0
- package/dist/components/Notification/atoms/TabBadge.js +32 -0
- package/dist/components/Notification/atoms/UnreadDot.d.ts +6 -0
- package/dist/components/Notification/atoms/UnreadDot.d.ts.map +1 -0
- package/dist/components/Notification/atoms/UnreadDot.js +23 -0
- package/dist/components/Notification/atoms/index.d.ts +5 -0
- package/dist/components/Notification/atoms/index.d.ts.map +1 -0
- package/dist/components/Notification/hooks/index.d.ts +8 -0
- package/dist/components/Notification/hooks/index.d.ts.map +1 -0
- package/dist/components/Notification/hooks/useInboxActions.d.ts +12 -0
- package/dist/components/Notification/hooks/useInboxActions.d.ts.map +1 -0
- package/dist/components/Notification/hooks/useInboxActions.js +58 -0
- package/dist/components/Notification/hooks/useInboxLoader.d.ts +8 -0
- package/dist/components/Notification/hooks/useInboxLoader.d.ts.map +1 -0
- package/dist/components/Notification/hooks/useInboxLoader.js +49 -0
- package/dist/components/Notification/hooks/useNotificationItem.d.ts +26 -0
- package/dist/components/Notification/hooks/useNotificationItem.d.ts.map +1 -0
- package/dist/components/Notification/hooks/useNotificationItem.js +51 -0
- package/dist/components/Notification/hooks/useNotificationStore.d.ts +49 -0
- package/dist/components/Notification/hooks/useNotificationStore.d.ts.map +1 -0
- package/dist/components/Notification/hooks/useNotificationStore.js +139 -0
- package/dist/components/Notification/hooks/useNotificationStream.d.ts +2 -0
- package/dist/components/Notification/hooks/useNotificationStream.d.ts.map +1 -0
- package/dist/components/Notification/hooks/useNotificationStream.js +86 -0
- package/dist/components/Notification/hooks/useNotificationTime.d.ts +2 -0
- package/dist/components/Notification/hooks/useNotificationTime.d.ts.map +1 -0
- package/dist/components/Notification/hooks/useNotificationTime.js +23 -0
- package/dist/components/Notification/hooks/useNotificationsApi.d.ts +25 -0
- package/dist/components/Notification/hooks/useNotificationsApi.d.ts.map +1 -0
- package/dist/components/Notification/hooks/useNotificationsApi.js +64 -0
- package/dist/components/Notification/lib/api.d.ts +4 -0
- package/dist/components/Notification/lib/api.d.ts.map +1 -0
- package/dist/components/Notification/lib/api.js +19 -0
- package/dist/components/Notification/lib/index.d.ts +5 -0
- package/dist/components/Notification/lib/index.d.ts.map +1 -0
- package/dist/components/Notification/lib/notificationText.d.ts +10 -0
- package/dist/components/Notification/lib/notificationText.d.ts.map +1 -0
- package/dist/components/Notification/lib/notificationText.js +131 -0
- package/dist/components/Notification/lib/stripHtml.d.ts +2 -0
- package/dist/components/Notification/lib/stripHtml.d.ts.map +1 -0
- package/dist/components/Notification/lib/stripHtml.js +6 -0
- package/dist/components/Notification/lib/types.d.ts +45 -0
- package/dist/components/Notification/lib/types.d.ts.map +1 -0
- package/dist/components/Notification/lib/types.js +9 -0
- package/dist/components/Notification/molecules/InboxEmpty.d.ts +8 -0
- package/dist/components/Notification/molecules/InboxEmpty.d.ts.map +1 -0
- package/dist/components/Notification/molecules/InboxEmpty.js +21 -0
- package/dist/components/Notification/molecules/InboxHeader.d.ts +17 -0
- package/dist/components/Notification/molecules/InboxHeader.d.ts.map +1 -0
- package/dist/components/Notification/molecules/InboxHeader.js +73 -0
- package/dist/components/Notification/molecules/InboxTabs.d.ts +15 -0
- package/dist/components/Notification/molecules/InboxTabs.d.ts.map +1 -0
- package/dist/components/Notification/molecules/InboxTabs.js +60 -0
- package/dist/components/Notification/molecules/NotificationActions.d.ts +9 -0
- package/dist/components/Notification/molecules/NotificationActions.d.ts.map +1 -0
- package/dist/components/Notification/molecules/NotificationActions.js +64 -0
- package/dist/components/Notification/molecules/NotificationAvatar.d.ts +17 -0
- package/dist/components/Notification/molecules/NotificationAvatar.d.ts.map +1 -0
- package/dist/components/Notification/molecules/NotificationAvatar.js +38 -0
- package/dist/components/Notification/molecules/NotificationContent.d.ts +22 -0
- package/dist/components/Notification/molecules/NotificationContent.d.ts.map +1 -0
- package/dist/components/Notification/molecules/NotificationContent.js +183 -0
- package/dist/components/Notification/molecules/index.d.ts +7 -0
- package/dist/components/Notification/molecules/index.d.ts.map +1 -0
- package/dist/components/Notification/organisms/InboxItem.d.ts +14 -0
- package/dist/components/Notification/organisms/InboxItem.d.ts.map +1 -0
- package/dist/components/Notification/organisms/InboxItem.js +100 -0
- package/dist/components/Notification/organisms/InboxPanel.d.ts +4 -0
- package/dist/components/Notification/organisms/InboxPanel.d.ts.map +1 -0
- package/dist/components/Notification/organisms/InboxPanel.js +99 -0
- package/dist/components/Notification/organisms/index.d.ts +3 -0
- package/dist/components/Notification/organisms/index.d.ts.map +1 -0
- package/dist/components/OnboardingTour/index.d.ts +1 -1
- package/dist/components/OnboardingTour/index.d.ts.map +1 -1
- package/dist/components/OnboardingTour/useOnboardingTour.d.ts +2 -0
- package/dist/components/OnboardingTour/useOnboardingTour.d.ts.map +1 -1
- package/dist/components/OnboardingTour/useOnboardingTour.js +63 -51
- package/dist/components/modals/RemoveConfirmModal.d.ts.map +1 -1
- package/dist/components/modals/RemoveConfirmModal.js +27 -26
- package/dist/config/brand.d.ts.map +1 -1
- package/dist/config/brand.js +29 -29
- package/dist/config/envConfig.d.ts +4 -0
- package/dist/config/envConfig.d.ts.map +1 -1
- package/dist/config/envConfig.js +29 -28
- package/dist/helpers/getFileIcons.js +5 -5
- package/dist/helpers/getFileType.d.ts.map +1 -1
- package/dist/helpers/getFileType.js +11 -2
- package/dist/helpers/platform.d.ts +1 -1
- package/dist/helpers/platform.d.ts.map +1 -1
- package/dist/helpers/platform.js +1 -0
- package/dist/helpers/showNotifications.d.ts +8 -14
- package/dist/helpers/showNotifications.d.ts.map +1 -1
- package/dist/helpers/showNotifications.js +107 -111
- package/dist/helpers/showNotifications.module.css.js +4 -16
- package/dist/hooks/useDateUtils.d.ts.map +1 -1
- package/dist/hooks/useDateUtils.js +19 -23
- package/dist/index.css +1 -1
- package/dist/index.js +576 -573
- package/dist/node_modules/@gfazioli/mantine-audio/dist/esm/Audio.context.js +15 -0
- package/dist/node_modules/@gfazioli/mantine-audio/dist/esm/Audio.js +228 -0
- package/dist/node_modules/@gfazioli/mantine-audio/dist/esm/Audio.module.css.js +4 -0
- package/dist/node_modules/@gfazioli/mantine-audio/dist/esm/components/AudioControls.js +19 -0
- package/dist/node_modules/@gfazioli/mantine-audio/dist/esm/components/AudioMuteButton.js +30 -0
- package/dist/node_modules/@gfazioli/mantine-audio/dist/esm/components/AudioPlayButton.js +40 -0
- package/dist/node_modules/@gfazioli/mantine-audio/dist/esm/components/AudioSkipButton.js +28 -0
- package/dist/node_modules/@gfazioli/mantine-audio/dist/esm/components/AudioSpectrum.js +137 -0
- package/dist/node_modules/@gfazioli/mantine-audio/dist/esm/components/AudioSpeedControl.js +31 -0
- package/dist/node_modules/@gfazioli/mantine-audio/dist/esm/components/AudioTimeDisplay.js +44 -0
- package/dist/node_modules/@gfazioli/mantine-audio/dist/esm/components/AudioTimeline.js +71 -0
- package/dist/node_modules/@gfazioli/mantine-audio/dist/esm/components/AudioVolumeSlider.js +43 -0
- package/dist/node_modules/@gfazioli/mantine-audio/dist/esm/components/AudioWaveform.js +166 -0
- package/dist/node_modules/@gfazioli/mantine-audio/dist/esm/use-audio.js +201 -0
- package/dist/node_modules/@gfazioli/mantine-video/dist/esm/Video.context.js +15 -0
- package/dist/node_modules/@gfazioli/mantine-video/dist/esm/Video.js +272 -0
- package/dist/node_modules/@gfazioli/mantine-video/dist/esm/Video.module.css.js +4 -0
- package/dist/node_modules/@gfazioli/mantine-video/dist/esm/components/VideoCaptionsButton.js +55 -0
- package/dist/node_modules/@gfazioli/mantine-video/dist/esm/components/VideoControls.js +30 -0
- package/dist/node_modules/@gfazioli/mantine-video/dist/esm/components/VideoFullscreenButton.js +31 -0
- package/dist/node_modules/@gfazioli/mantine-video/dist/esm/components/VideoMuteButton.js +29 -0
- package/dist/node_modules/@gfazioli/mantine-video/dist/esm/components/VideoPiPButton.js +29 -0
- package/dist/node_modules/@gfazioli/mantine-video/dist/esm/components/VideoPlayButton.js +28 -0
- package/dist/node_modules/@gfazioli/mantine-video/dist/esm/components/VideoSkipButton.js +27 -0
- package/dist/node_modules/@gfazioli/mantine-video/dist/esm/components/VideoTimeDisplay.js +44 -0
- package/dist/node_modules/@gfazioli/mantine-video/dist/esm/components/VideoTimeline.js +70 -0
- package/dist/node_modules/@gfazioli/mantine-video/dist/esm/use-video.js +170 -0
- package/package.json +5 -3
- package/dist/components/Notification/Notification.js +0 -119
- package/dist/components/Notification/NotificationCard.d.ts +0 -10
- package/dist/components/Notification/NotificationCard.d.ts.map +0 -1
- package/dist/components/Notification/NotificationCard.js +0 -93
|
@@ -1,157 +1,153 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { InformationCircleIcon as
|
|
3
|
-
import { HugeiconsIcon as
|
|
4
|
-
import {
|
|
5
|
-
import { notifications as
|
|
6
|
-
import { isFunction as
|
|
7
|
-
import { isOfflineSuppressed as
|
|
8
|
-
import
|
|
9
|
-
let
|
|
10
|
-
const
|
|
11
|
-
/* @__PURE__ */
|
|
12
|
-
/* @__PURE__ */
|
|
13
|
-
|
|
1
|
+
import { jsxs as N, jsx as c } from "react/jsx-runtime";
|
|
2
|
+
import { InformationCircleIcon as b, CheckmarkCircle02Icon as O, Alert01Icon as S, Alert02Icon as B } from "@hugeicons/core-free-icons";
|
|
3
|
+
import { HugeiconsIcon as u } from "@hugeicons/react";
|
|
4
|
+
import { Box as f, Button as x } from "@mantine/core";
|
|
5
|
+
import { notifications as w } from "@mantine/notifications";
|
|
6
|
+
import { isFunction as h, isObject as p } from "lodash-es";
|
|
7
|
+
import { isOfflineSuppressed as z } from "./offlineSuppression.js";
|
|
8
|
+
import l from "./showNotifications.module.css.js";
|
|
9
|
+
let M = 0;
|
|
10
|
+
const k = /* @__PURE__ */ c(u, { icon: O, size: 14, color: "white" }), j = /* @__PURE__ */ c(u, { icon: B, size: 14, color: "white" }), E = /* @__PURE__ */ c(u, { icon: S, size: 14, color: "white" }), m = /* @__PURE__ */ c(u, { icon: b, size: 14, color: "white" }), g = (o, t) => t?.length ? /* @__PURE__ */ N(f, { children: [
|
|
11
|
+
/* @__PURE__ */ c(f, { children: o }),
|
|
12
|
+
/* @__PURE__ */ c(f, { className: l.actions, children: t.map((i, e) => /* @__PURE__ */ c(
|
|
13
|
+
x,
|
|
14
14
|
{
|
|
15
15
|
size: "compact-sm",
|
|
16
|
-
variant:
|
|
17
|
-
onClick:
|
|
16
|
+
variant: i.variant ?? "default",
|
|
17
|
+
onClick: i.onClick,
|
|
18
18
|
radius: "md",
|
|
19
|
-
children:
|
|
19
|
+
children: i.label
|
|
20
20
|
},
|
|
21
21
|
e
|
|
22
22
|
)) })
|
|
23
|
-
] }) : o,
|
|
24
|
-
const { successMsg:
|
|
25
|
-
return o.then((
|
|
26
|
-
if (
|
|
27
|
-
const n =
|
|
23
|
+
] }) : o, _ = (o, t = {}) => {
|
|
24
|
+
const { successMsg: i, errorMsg: e } = t;
|
|
25
|
+
return o.then((s) => {
|
|
26
|
+
if (i) {
|
|
27
|
+
const n = h(i) ? i(s) : i, r = {
|
|
28
28
|
id: t.notifyId,
|
|
29
|
-
...
|
|
29
|
+
...p(n) ? n : { message: n }
|
|
30
30
|
};
|
|
31
|
-
|
|
31
|
+
v(r);
|
|
32
32
|
}
|
|
33
|
-
return
|
|
34
|
-
}).catch((
|
|
33
|
+
return s;
|
|
34
|
+
}).catch((s) => {
|
|
35
35
|
if (e) {
|
|
36
|
-
const n =
|
|
36
|
+
const n = h(e) ? e(s) : e, r = {
|
|
37
37
|
id: t.notifyId,
|
|
38
|
-
...
|
|
38
|
+
...p(n) ? n : { message: n }
|
|
39
39
|
};
|
|
40
|
-
|
|
40
|
+
A(r);
|
|
41
41
|
}
|
|
42
|
-
return
|
|
42
|
+
return s;
|
|
43
43
|
});
|
|
44
|
-
},
|
|
45
|
-
root:
|
|
46
|
-
icon:
|
|
47
|
-
title:
|
|
48
|
-
description:
|
|
49
|
-
},
|
|
44
|
+
}, I = {
|
|
45
|
+
root: l.root,
|
|
46
|
+
icon: l.icon,
|
|
47
|
+
title: l.title,
|
|
48
|
+
description: l.description
|
|
49
|
+
}, a = (o, t) => {
|
|
50
50
|
const {
|
|
51
|
-
actions:
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
51
|
+
actions: i,
|
|
52
|
+
icon: e,
|
|
53
|
+
message: s,
|
|
54
|
+
onClose: n,
|
|
55
|
+
bypassOfflineSuppression: r,
|
|
56
|
+
...d
|
|
57
|
+
} = o, C = `ntf-${++M}`, y = d.id ?? C;
|
|
58
|
+
w.show({
|
|
58
59
|
color: t.color,
|
|
59
60
|
radius: 12,
|
|
60
61
|
p: "sm",
|
|
61
|
-
...
|
|
62
|
-
id:
|
|
63
|
-
|
|
64
|
-
// fall back to the status icon (info/success/etc.) when none is supplied.
|
|
65
|
-
icon: a.icon ?? t.icon,
|
|
62
|
+
...d,
|
|
63
|
+
id: y,
|
|
64
|
+
icon: e ?? t.icon,
|
|
66
65
|
withCloseButton: !0,
|
|
67
66
|
withBorder: !0,
|
|
68
|
-
classNames:
|
|
67
|
+
classNames: I,
|
|
69
68
|
onClose: () => {
|
|
70
|
-
|
|
69
|
+
n?.(o);
|
|
71
70
|
},
|
|
72
|
-
message:
|
|
71
|
+
message: g(s, i)
|
|
73
72
|
});
|
|
74
|
-
},
|
|
75
|
-
|
|
73
|
+
}, $ = (o) => {
|
|
74
|
+
a(o, {
|
|
76
75
|
color: "blue",
|
|
77
|
-
icon:
|
|
76
|
+
icon: m
|
|
78
77
|
});
|
|
79
|
-
},
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
78
|
+
}, G = ({
|
|
79
|
+
id: o,
|
|
80
|
+
title: t,
|
|
81
|
+
body: i,
|
|
82
|
+
icon: e,
|
|
83
|
+
onClick: s
|
|
84
|
+
}) => {
|
|
85
|
+
a(
|
|
84
86
|
{
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
p: "sm",
|
|
101
|
-
withCloseButton: !0,
|
|
102
|
-
withBorder: !0,
|
|
103
|
-
autoClose: 6e3,
|
|
104
|
-
classNames: {
|
|
105
|
-
root: c.chatToastRoot,
|
|
106
|
-
closeButton: c.chatToastClose
|
|
87
|
+
id: o,
|
|
88
|
+
title: t,
|
|
89
|
+
message: s ? /* @__PURE__ */ c(
|
|
90
|
+
f,
|
|
91
|
+
{
|
|
92
|
+
role: "button",
|
|
93
|
+
tabIndex: 0,
|
|
94
|
+
onClick: s,
|
|
95
|
+
onKeyDown: (n) => {
|
|
96
|
+
(n.key === "Enter" || n.key === " ") && (n.preventDefault(), s());
|
|
97
|
+
},
|
|
98
|
+
children: i
|
|
99
|
+
}
|
|
100
|
+
) : i,
|
|
101
|
+
icon: e
|
|
107
102
|
},
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
103
|
+
{
|
|
104
|
+
color: "blue",
|
|
105
|
+
icon: m
|
|
106
|
+
}
|
|
107
|
+
);
|
|
108
|
+
}, q = (o, t) => {
|
|
109
|
+
const { actions: i, icon: e, message: s, onClose: n, ...r } = o;
|
|
110
|
+
w.update({
|
|
115
111
|
color: t.color,
|
|
116
112
|
radius: 12,
|
|
117
113
|
p: "sm",
|
|
118
|
-
...
|
|
119
|
-
icon: t.icon,
|
|
114
|
+
...r,
|
|
115
|
+
icon: e ?? t.icon,
|
|
120
116
|
withCloseButton: !0,
|
|
121
117
|
withBorder: !0,
|
|
122
|
-
classNames:
|
|
118
|
+
classNames: I,
|
|
123
119
|
onClose: () => {
|
|
124
|
-
|
|
120
|
+
n?.(o);
|
|
125
121
|
},
|
|
126
|
-
message:
|
|
122
|
+
message: g(s, i)
|
|
127
123
|
});
|
|
128
|
-
},
|
|
129
|
-
|
|
124
|
+
}, J = (o) => {
|
|
125
|
+
q(o, {
|
|
130
126
|
color: "var(--mantine-color-blue-outline)",
|
|
131
|
-
icon:
|
|
127
|
+
icon: m
|
|
132
128
|
});
|
|
133
|
-
},
|
|
134
|
-
|
|
129
|
+
}, v = (o) => {
|
|
130
|
+
a(o, {
|
|
135
131
|
color: "green",
|
|
136
|
-
icon:
|
|
132
|
+
icon: k
|
|
137
133
|
});
|
|
138
|
-
},
|
|
139
|
-
|
|
134
|
+
}, L = (o) => {
|
|
135
|
+
a(o, {
|
|
140
136
|
color: "yellow",
|
|
141
|
-
icon:
|
|
137
|
+
icon: E
|
|
142
138
|
});
|
|
143
|
-
},
|
|
144
|
-
!o.bypassOfflineSuppression &&
|
|
139
|
+
}, A = (o) => {
|
|
140
|
+
!o.bypassOfflineSuppression && z() || a(o, {
|
|
145
141
|
color: "red",
|
|
146
|
-
icon:
|
|
142
|
+
icon: j
|
|
147
143
|
});
|
|
148
144
|
};
|
|
149
145
|
export {
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
146
|
+
G as showChatToast,
|
|
147
|
+
A as showErrorNotification,
|
|
148
|
+
$ as showMessageNotification,
|
|
149
|
+
_ as showRequestNotifications,
|
|
150
|
+
v as showSuccessNotification,
|
|
151
|
+
L as showWarningNotification,
|
|
152
|
+
J as updateMessageNotification
|
|
157
153
|
};
|
|
@@ -1,25 +1,13 @@
|
|
|
1
|
-
const t = "
|
|
1
|
+
const t = "_root_1u7gv_1", o = "_icon_1u7gv_15", c = "_title_1u7gv_79", s = "_description_1u7gv_87", i = "_actions_1u7gv_95", n = {
|
|
2
2
|
root: t,
|
|
3
3
|
icon: o,
|
|
4
4
|
title: c,
|
|
5
5
|
description: s,
|
|
6
|
-
actions:
|
|
7
|
-
chatToastRoot: _,
|
|
8
|
-
chatToast: n,
|
|
9
|
-
chatToastIcon: w,
|
|
10
|
-
chatToastTitle: T,
|
|
11
|
-
chatToastBody: d,
|
|
12
|
-
chatToastClose: h
|
|
6
|
+
actions: i
|
|
13
7
|
};
|
|
14
8
|
export {
|
|
15
|
-
|
|
16
|
-
n as
|
|
17
|
-
d as chatToastBody,
|
|
18
|
-
h as chatToastClose,
|
|
19
|
-
w as chatToastIcon,
|
|
20
|
-
_ as chatToastRoot,
|
|
21
|
-
T as chatToastTitle,
|
|
22
|
-
i as default,
|
|
9
|
+
i as actions,
|
|
10
|
+
n as default,
|
|
23
11
|
s as description,
|
|
24
12
|
o as icon,
|
|
25
13
|
t as root,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useDateUtils.d.ts","sourceRoot":"","sources":["../../src/hooks/useDateUtils.ts"],"names":[],"mappings":"AAEA,OAAO,EACL,qBAAqB,EACrB,0BAA0B,EAS3B,MAAM,UAAU,CAAC;AAMlB,eAAO,MAAM,YAAY;;
|
|
1
|
+
{"version":3,"file":"useDateUtils.d.ts","sourceRoot":"","sources":["../../src/hooks/useDateUtils.ts"],"names":[],"mappings":"AAEA,OAAO,EACL,qBAAqB,EACrB,0BAA0B,EAS3B,MAAM,UAAU,CAAC;AAMlB,eAAO,MAAM,YAAY;;uBAOf,IAAI,GAAG,MAAM,gCAET;QAAE,MAAM,CAAC,EAAE,OAAO,CAAA;KAAE,KAC7B,MAAM;iCAoDD,IAAI,GAAG,MAAM,yBAElB,MAAM;+BAKD,IAAI,GAAG,MAAM,YACT,0BAA0B,KACnC,MAAM;mCAQA,IAAI,GAAG,MAAM,SACb,IAAI,GAAG,MAAM,KACnB,OAAO;wCAQD,IAAI,GAAG,MAAM,SACb,IAAI,GAAG,MAAM,YACV,qBAAqB,KAC9B,MAAM;oCArED,IAAI,GAAG,MAAM,YACT;QAAE,KAAK,CAAC,EAAE,OAAO,CAAA;KAAE,KAC5B,MAAM;CAmFV,CAAC"}
|
|
@@ -1,47 +1,43 @@
|
|
|
1
|
-
import { useTranslation as
|
|
2
|
-
import { differenceInDays as
|
|
3
|
-
import { toZonedTime as s, formatInTimeZone as
|
|
4
|
-
import { useLocalTimezone as
|
|
5
|
-
import { dateFnsLocales as
|
|
6
|
-
const
|
|
7
|
-
const { timezone: o } =
|
|
1
|
+
import { useTranslation as h } from "react-i18next";
|
|
2
|
+
import { differenceInDays as v, differenceInHours as p, differenceInMinutes as U, differenceInSeconds as w, formatDistance as C, isSameDay as S, formatDistanceToNow as H, format as d } from "date-fns";
|
|
3
|
+
import { toZonedTime as s, formatInTimeZone as I } from "date-fns-tz";
|
|
4
|
+
import { useLocalTimezone as M } from "../store/timezoneStore.js";
|
|
5
|
+
import { dateFnsLocales as y } from "./useDateFnsLocale.js";
|
|
6
|
+
const k = () => {
|
|
7
|
+
const { timezone: o } = M(), { t: a, i18n: z } = h("ui"), f = y[z.language] || y.en;
|
|
8
8
|
return {
|
|
9
9
|
timezone: o,
|
|
10
10
|
formatDate: (e, t = "yyyy-MM-dd HH:mm:ss", n) => {
|
|
11
11
|
const r = typeof e == "string" ? new Date(e) : e, i = s(r, o || "UTC");
|
|
12
|
-
|
|
13
|
-
const f = d[y.language] || d.en;
|
|
14
|
-
return l(i, t, { locale: f });
|
|
15
|
-
}
|
|
16
|
-
return l(i, t);
|
|
12
|
+
return n?.locale ?? !1 ? d(i, t, { locale: f }) : d(i, t);
|
|
17
13
|
},
|
|
18
|
-
formatDateInTimezone: (e, t = "yyyy-MM-dd HH:mm:ss") =>
|
|
14
|
+
formatDateInTimezone: (e, t = "yyyy-MM-dd HH:mm:ss") => I(e, o || "UTC", t),
|
|
19
15
|
formatRelativeTime: (e, t) => {
|
|
20
16
|
const n = typeof e == "string" ? new Date(e) : e, r = s(n, o || "UTC");
|
|
21
|
-
return
|
|
17
|
+
return H(r, { ...t });
|
|
22
18
|
},
|
|
23
19
|
isSameDayWithTimezone: (e, t) => {
|
|
24
20
|
const n = s(e, o || "UTC"), r = s(t, o || "UTC");
|
|
25
|
-
return
|
|
21
|
+
return S(n, r);
|
|
26
22
|
},
|
|
27
23
|
formatDistanceWithTimezone: (e, t, n) => {
|
|
28
24
|
const r = s(e, o || "UTC"), i = s(t, o || "UTC");
|
|
29
|
-
return
|
|
25
|
+
return C(r, i, { ...n, locale: f });
|
|
30
26
|
},
|
|
31
27
|
formatRelativeShortTime: (e, t) => {
|
|
32
|
-
const n = typeof e == "string" ? new Date(e) : e, r = /* @__PURE__ */ new Date(), i = s(n, o || "UTC"), m = s(r, o || "UTC"),
|
|
33
|
-
return
|
|
34
|
-
count: f
|
|
35
|
-
}) : T >= 1 ? a(c ? "relativeTime.shortHour" : "relativeTime.hour", {
|
|
28
|
+
const n = typeof e == "string" ? new Date(e) : e, r = /* @__PURE__ */ new Date(), i = s(n, o || "UTC"), m = s(r, o || "UTC"), T = v(m, i), u = p(m, i), D = U(m, i), l = w(m, i), c = t?.short ?? !1;
|
|
29
|
+
return T >= 1 ? a(c ? "relativeTime.shortDay" : "relativeTime.day", {
|
|
36
30
|
count: T
|
|
37
|
-
}) : u >= 1 ? a(c ? "relativeTime.
|
|
31
|
+
}) : u >= 1 ? a(c ? "relativeTime.shortHour" : "relativeTime.hour", {
|
|
38
32
|
count: u
|
|
39
|
-
}) : D >= 1 ? a(c ? "relativeTime.
|
|
33
|
+
}) : D >= 1 ? a(c ? "relativeTime.shortMinute" : "relativeTime.minute", {
|
|
40
34
|
count: D
|
|
35
|
+
}) : l >= 1 ? a(c ? "relativeTime.shortSecond" : "relativeTime.second", {
|
|
36
|
+
count: l
|
|
41
37
|
}) : a(c ? "relativeTime.shortJustNow" : "relativeTime.justNow");
|
|
42
38
|
}
|
|
43
39
|
};
|
|
44
40
|
};
|
|
45
41
|
export {
|
|
46
|
-
|
|
42
|
+
k as useDateUtils
|
|
47
43
|
};
|