@layers-app/shared 0.4.7 → 0.4.9
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/AnimatedFigurePage/AnimatedFigurePage.module.css.js +13 -13
- 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 +76 -71
- package/dist/components/AppContainer/AppContainer.module.css.js +14 -14
- 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/NavbarContent.d.ts.map +1 -1
- package/dist/components/AppContainer/components/NavbarContent.js +16 -2
- 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 +42 -30
- package/dist/components/AppContainer/components/menus/HelpMenu/HelpMenu.module.css.js +90 -90
- package/dist/components/AppContainer/types.d.ts +12 -0
- package/dist/components/AppContainer/types.d.ts.map +1 -1
- package/dist/components/AppShell/AppShell.module.css.js +5 -5
- package/dist/components/AttachmentsGalleryModal/components/ModalHeader.d.ts.map +1 -1
- package/dist/components/AttachmentsGalleryModal/components/ModalHeader.js +59 -52
- package/dist/components/AttachmentsGalleryModal/components/ShakePlayer/ShakaPlayer.module.css.js +4 -4
- package/dist/components/AttachmentsGalleryModal/components/useAttachmentVideoStatus.d.ts +1 -0
- package/dist/components/AttachmentsGalleryModal/components/useAttachmentVideoStatus.d.ts.map +1 -1
- package/dist/components/AttachmentsGalleryModal/components/useAttachmentVideoStatus.js +16 -15
- package/dist/components/AttachmentsGalleryModal/styles.module.css.js +22 -22
- 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 +22 -20
- package/dist/components/BouncingLogo/BouncingLogo.module.css.js +4 -4
- package/dist/components/Chat/CallMessage/CallMessage.module.css.js +8 -8
- package/dist/components/Chat/ChatBubble/ChatBubble.module.css.js +1 -1
- package/dist/components/Chat/ChatHeader/ChatHeader.module.css.js +1 -1
- package/dist/components/Chat/ChatInput/ChatInput.module.css.js +44 -44
- 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/ChatLayout/ChatLayout.module.css.js +4 -4
- 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/ChatPill/ChatPill.module.css.js +1 -1
- package/dist/components/Chat/DialogItem/DialogItem.module.css.js +4 -4
- package/dist/components/Chat/DialogList/DialogList.module.css.js +1 -1
- package/dist/components/Chat/MediaDocument/MediaDocument.module.css.js +4 -4
- package/dist/components/Chat/MessageActions/MessageActions.module.css.js +1 -1
- 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 +188 -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/MessageForward/MessageForward.module.css.js +1 -1
- 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/MessageMeta.module.css.js +3 -3
- package/dist/components/Chat/MessageReactions/MessageReactions.module.css.js +12 -12
- package/dist/components/Chat/MessageReply/MessageReply.module.css.js +7 -7
- package/dist/components/Chat/MessageStatus/MessageStatus.module.css.js +8 -8
- package/dist/components/Chat/ServiceMessage/ServiceMessage.module.css.js +1 -1
- package/dist/components/CollapsibleContainer/CollapsibleContainer.module.css.js +1 -1
- package/dist/components/ColorPicker/ColorPicker.module.css.js +32 -26
- package/dist/components/ColorPicker/ColorPickerList.d.ts.map +1 -1
- package/dist/components/ColorPicker/ColorPickerList.js +83 -72
- 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 +94 -85
- package/dist/components/ColorPicker/icons.js +5 -5
- package/dist/components/ColorPicker/types.d.ts +6 -0
- package/dist/components/ColorPicker/types.d.ts.map +1 -1
- package/dist/components/ColorPicker/types.js +53 -11
- package/dist/components/ColorPicker/useRecentColors.d.ts +3 -1
- package/dist/components/ColorPicker/useRecentColors.d.ts.map +1 -1
- package/dist/components/ColorPicker/useRecentColors.js +43 -20
- package/dist/components/CommentComposer/CommentComposer.module.css.js +14 -10
- 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 +2 -1
- package/dist/components/CommentComposer/index.d.ts.map +1 -1
- package/dist/components/CommentComposer/index.js +333 -313
- package/dist/components/CommentComposer/types.d.ts +10 -0
- package/dist/components/CommentComposer/types.d.ts.map +1 -1
- package/dist/components/CommunitiesDialog/styles.module.css.js +1 -1
- package/dist/components/Copyright/Copyright.module.css.js +1 -1
- package/dist/components/CustomKBD/CustomKBD.module.css.js +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/EmojiPicker/EmojiPicker.module.css.js +8 -8
- 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/EntityTitle/EntityTitle.module.css.js +1 -1
- package/dist/components/ErrorPage/components/Error404.d.ts.map +1 -1
- package/dist/components/FeatureProgress/FeatureProgress.module.css.js +49 -49
- package/dist/components/FilePicker/FilePicker.module.css.js +7 -7
- package/dist/components/FormViewer/FormViewer.module.css.js +20 -20
- package/dist/components/FormViewer/components/fields/DragOptions/DragOptions.module.css.js +1 -1
- package/dist/components/FormViewer/components/fields/DropdownField/DropdownField.module.css.js +1 -1
- package/dist/components/FormViewer/components/fields/EditableContent/EditableContent.module.css.js +1 -1
- package/dist/components/FormViewer/components/fields/SelectableCard/SelectableCard.module.css.js +8 -8
- package/dist/components/FormViewer/components/fields/UploadField/UploadFile/UploadFile.module.css.js +4 -4
- package/dist/components/FormViewer/helpers/conditions.d.ts.map +1 -1
- package/dist/components/FormViewer/helpers/conditions.js +33 -17
- package/dist/components/FormViewer/store/formStore.d.ts.map +1 -1
- package/dist/components/ImageCropper/ImageCropper.module.css.js +38 -38
- package/dist/components/IntegrationFlowAnimation/IntegrationFlowAnimation.module.css.js +11 -11
- package/dist/components/LanguagePicker/LanguagePicker.module.css.js +1 -1
- package/dist/components/Loaders/styles.module.css.js +6 -6
- package/dist/components/MediaLibrary/MediaLibrary.module.css.js +2 -2
- package/dist/components/MusicPlayerBar/MusicPlayerBar.module.css.js +23 -23
- package/dist/components/NavMenu/NavMenu.module.css.js +12 -12
- package/dist/components/NavbarResizer/NavbarResizer.module.css.js +2 -2
- package/dist/components/NotPublicPanel/NotPublicPanel.module.css.js +11 -11
- 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/PillTabs/PillTabs.module.css.js +1 -1
- package/dist/components/SearchFilters/SearchFilters.module.css.js +1 -1
- package/dist/components/SettingsSection/styles.module.css.js +1 -1
- package/dist/components/StorageUsageProgress/StorageUsageProgress.module.css.js +1 -1
- package/dist/components/TreeIndent/TreeIndent.module.css.js +4 -4
- package/dist/components/modals/RemoveConfirmModal.d.ts.map +1 -1
- package/dist/components/modals/RemoveConfirmModal.js +27 -26
- package/dist/components/table/FrontTable.d.ts.map +1 -1
- package/dist/components/table/hooks/useColumnsResizing.d.ts.map +1 -1
- package/dist/config/envConfig.d.ts +2 -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 +1 -1
- package/dist/helpers/getFileType.d.ts.map +1 -1
- package/dist/helpers/getFileType.js +11 -1
- 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/showFeatureFeedback.module.css.js +4 -4
- package/dist/helpers/showNotifications.module.css.js +1 -1
- package/dist/hooks/useDateUtils.d.ts +3 -1
- package/dist/hooks/useDateUtils.d.ts.map +1 -1
- package/dist/hooks/useDateUtils.js +23 -18
- package/dist/index.css +1 -1
- package/dist/index.js +595 -588
- package/dist/lang/locales/ui_en.json.js +9 -7
- package/dist/lang/locales/ui_es.json.js +6 -4
- package/dist/lang/locales/ui_ru.json.js +8 -6
- 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/docs/README.md +499 -499
- package/package.json +81 -79
- 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
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
import { jsxs as t, Fragment as d, jsx as o } from "react/jsx-runtime";
|
|
2
|
+
import { HashtagIcon as I, CallDisabled02Icon as h, UserRemove01Icon as f, UserCheck01Icon as u, AlertCircleIcon as y, Alert02Icon as g, InformationCircleIcon as p, CheckmarkCircle02Icon as v } from "@hugeicons/core-free-icons";
|
|
3
|
+
import { HugeiconsIcon as C } from "@hugeicons/react";
|
|
4
|
+
import { Box as x, ThemeIcon as U } from "@mantine/core";
|
|
5
|
+
import { UserAvatar as k } from "../../UserAvatar/index.js";
|
|
6
|
+
import { ActionBadge as A } from "../atoms/ActionBadge.js";
|
|
7
|
+
import { UnreadDot as w } from "../atoms/UnreadDot.js";
|
|
8
|
+
const S = {
|
|
9
|
+
"system-success": { color: "green", Icon: v },
|
|
10
|
+
"system-info": { color: "blue", Icon: p },
|
|
11
|
+
"system-alert": { color: "red", Icon: g },
|
|
12
|
+
"system-warning": { color: "yellow", Icon: y },
|
|
13
|
+
"system-invitation-accepted": { color: "green", Icon: u },
|
|
14
|
+
"system-invitation-declined": { color: "yellow", Icon: f },
|
|
15
|
+
"system-call-missed": { color: "red", Icon: h },
|
|
16
|
+
"system-channel-added": { color: "indigo", Icon: I }
|
|
17
|
+
};
|
|
18
|
+
function E({
|
|
19
|
+
actorUserId: r,
|
|
20
|
+
actorName: i,
|
|
21
|
+
actorAvatarUrl: s,
|
|
22
|
+
variant: n,
|
|
23
|
+
notificationType: l,
|
|
24
|
+
fallbackUser: a,
|
|
25
|
+
unread: m
|
|
26
|
+
}) {
|
|
27
|
+
const c = n === "user-action", e = c ? void 0 : S[n];
|
|
28
|
+
return /* @__PURE__ */ t(x, { pos: "relative", style: { flexShrink: 0, width: 38, height: 38 }, children: [
|
|
29
|
+
c ? /* @__PURE__ */ t(d, { children: [
|
|
30
|
+
/* @__PURE__ */ o(k, { user: r ? { id: r, avatar: s ?? null, name: i ?? null } : a, size: 38, radius: "xl" }),
|
|
31
|
+
/* @__PURE__ */ o(A, { notificationType: l })
|
|
32
|
+
] }) : e ? /* @__PURE__ */ o(U, { variant: "light", color: e.color, size: 38, radius: 100, children: /* @__PURE__ */ o(C, { icon: e.Icon, size: 24, strokeWidth: 1.5 }) }) : null,
|
|
33
|
+
m && /* @__PURE__ */ o(w, {})
|
|
34
|
+
] });
|
|
35
|
+
}
|
|
36
|
+
export {
|
|
37
|
+
E as NotificationAvatar
|
|
38
|
+
};
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { type ReactNode } from 'react';
|
|
2
|
+
interface NotificationContentProps {
|
|
3
|
+
actorName: string;
|
|
4
|
+
verb: string;
|
|
5
|
+
objectName: string;
|
|
6
|
+
source: string;
|
|
7
|
+
sourceKey: string | null;
|
|
8
|
+
sourceIcon?: ReactNode;
|
|
9
|
+
time: string;
|
|
10
|
+
isSystem: boolean;
|
|
11
|
+
systemTitle: string | null;
|
|
12
|
+
statusValue: string | null;
|
|
13
|
+
statusOldValue: string | null;
|
|
14
|
+
commentPreview: string | null;
|
|
15
|
+
taskKey: string | null;
|
|
16
|
+
showInvitationActor: boolean;
|
|
17
|
+
statusFirst: boolean;
|
|
18
|
+
tailConnector: string;
|
|
19
|
+
}
|
|
20
|
+
export declare function NotificationContent({ actorName, verb, objectName, source, sourceKey, sourceIcon, time, isSystem, systemTitle, statusValue, statusOldValue, commentPreview, taskKey, showInvitationActor, statusFirst, tailConnector, }: NotificationContentProps): import("react/jsx-runtime").JSX.Element;
|
|
21
|
+
export {};
|
|
22
|
+
//# sourceMappingURL=NotificationContent.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"NotificationContent.d.ts","sourceRoot":"","sources":["../../../../src/components/Notification/molecules/NotificationContent.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAiC,KAAK,SAAS,EAAE,MAAM,OAAO,CAAC;AAyCtE,UAAU,wBAAwB;IAChC,SAAS,EAAE,MAAM,CAAC;IAClB,IAAI,EAAE,MAAM,CAAC;IACb,UAAU,EAAE,MAAM,CAAC;IACnB,MAAM,EAAE,MAAM,CAAC;IACf,SAAS,EAAE,MAAM,GAAG,IAAI,CAAC;IACzB,UAAU,CAAC,EAAE,SAAS,CAAC;IACvB,IAAI,EAAE,MAAM,CAAC;IACb,QAAQ,EAAE,OAAO,CAAC;IAClB,WAAW,EAAE,MAAM,GAAG,IAAI,CAAC;IAC3B,WAAW,EAAE,MAAM,GAAG,IAAI,CAAC;IAC3B,cAAc,EAAE,MAAM,GAAG,IAAI,CAAC;IAC9B,cAAc,EAAE,MAAM,GAAG,IAAI,CAAC;IAC9B,OAAO,EAAE,MAAM,GAAG,IAAI,CAAC;IACvB,mBAAmB,EAAE,OAAO,CAAC;IAC7B,WAAW,EAAE,OAAO,CAAC;IACrB,aAAa,EAAE,MAAM,CAAC;CACvB;AAcD,wBAAgB,mBAAmB,CAAC,EAClC,SAAS,EAAE,IAAI,EAAE,UAAU,EAAE,MAAM,EAAE,SAAS,EAAE,UAAU,EAAE,IAAI,EAChE,QAAQ,EAAE,WAAW,EAAE,WAAW,EAAE,cAAc,EAAE,cAAc,EAClE,OAAO,EAAE,mBAAmB,EAAE,WAAW,EAAE,aAAa,GACzD,EAAE,wBAAwB,2CAsI1B"}
|
|
@@ -0,0 +1,183 @@
|
|
|
1
|
+
import { jsxs as r, jsx as n, Fragment as l } from "react/jsx-runtime";
|
|
2
|
+
import { useRef as _, useState as D, useCallback as J } from "react";
|
|
3
|
+
import { HashtagIcon as O, Video01Icon as Q, WorkflowSquareIcon as R, File02Icon as E, CheckListIcon as A, PlazaIcon as X } from "@hugeicons/core-free-icons";
|
|
4
|
+
import { HugeiconsIcon as Y } from "@hugeicons/react";
|
|
5
|
+
import { Stack as H, Tooltip as M, Text as e, Group as w, Box as g } from "@mantine/core";
|
|
6
|
+
import { useTranslation as Z } from "react-i18next";
|
|
7
|
+
import u from "../Notification.module.css.js";
|
|
8
|
+
const P = {
|
|
9
|
+
workspace: X,
|
|
10
|
+
pages: E,
|
|
11
|
+
projects: A,
|
|
12
|
+
tasks: A,
|
|
13
|
+
comments: E,
|
|
14
|
+
forms: R,
|
|
15
|
+
flow: R,
|
|
16
|
+
chat: Q,
|
|
17
|
+
channel: O
|
|
18
|
+
};
|
|
19
|
+
function K({ sourceKey: i }) {
|
|
20
|
+
if (!i) return null;
|
|
21
|
+
const c = P[i];
|
|
22
|
+
return c ? /* @__PURE__ */ n(
|
|
23
|
+
Y,
|
|
24
|
+
{
|
|
25
|
+
icon: c,
|
|
26
|
+
size: 14,
|
|
27
|
+
style: { color: "var(--mantine-color-gray-6)", flexShrink: 0 }
|
|
28
|
+
}
|
|
29
|
+
) : null;
|
|
30
|
+
}
|
|
31
|
+
function j() {
|
|
32
|
+
const i = _(null), [c, o] = D(!1), h = J(() => {
|
|
33
|
+
const a = i.current;
|
|
34
|
+
a && o(a.scrollWidth > a.clientWidth);
|
|
35
|
+
}, []);
|
|
36
|
+
return { ref: i, truncated: c, onMouseEnter: h };
|
|
37
|
+
}
|
|
38
|
+
function ln({
|
|
39
|
+
actorName: i,
|
|
40
|
+
verb: c,
|
|
41
|
+
objectName: o,
|
|
42
|
+
source: h,
|
|
43
|
+
sourceKey: a,
|
|
44
|
+
sourceIcon: b,
|
|
45
|
+
time: d,
|
|
46
|
+
isSystem: q,
|
|
47
|
+
systemTitle: F,
|
|
48
|
+
statusValue: t,
|
|
49
|
+
statusOldValue: m,
|
|
50
|
+
commentPreview: f,
|
|
51
|
+
taskKey: y,
|
|
52
|
+
showInvitationActor: G,
|
|
53
|
+
statusFirst: k,
|
|
54
|
+
tailConnector: L
|
|
55
|
+
}) {
|
|
56
|
+
const C = b ?? /* @__PURE__ */ n(K, { sourceKey: a }), { t: x } = Z("appContainer"), { ref: S, truncated: $, onMouseEnter: W } = j(), s = t ? L : "", p = x("inbox.locationConnector"), I = x("inbox.fromConnector"), z = x("inbox.statusConnector"), T = !!(m && t);
|
|
57
|
+
if (q) {
|
|
58
|
+
const B = [
|
|
59
|
+
G ? i : "",
|
|
60
|
+
F
|
|
61
|
+
].filter(Boolean).join(" ");
|
|
62
|
+
return /* @__PURE__ */ r(H, { gap: 6, className: u.itemContent, children: [
|
|
63
|
+
/* @__PURE__ */ n(M, { label: B, disabled: !$, multiline: !0, maw: 320, withArrow: !0, children: /* @__PURE__ */ n(
|
|
64
|
+
e,
|
|
65
|
+
{
|
|
66
|
+
ref: S,
|
|
67
|
+
onMouseEnter: W,
|
|
68
|
+
fz: 14,
|
|
69
|
+
fw: 500,
|
|
70
|
+
lh: 1.45,
|
|
71
|
+
lineClamp: 2,
|
|
72
|
+
style: { minWidth: 0, wordBreak: "break-word" },
|
|
73
|
+
children: B
|
|
74
|
+
}
|
|
75
|
+
) }),
|
|
76
|
+
/* @__PURE__ */ r(w, { gap: 6, wrap: "nowrap", align: "center", style: { minWidth: 0 }, children: [
|
|
77
|
+
/* @__PURE__ */ r(w, { gap: 4, wrap: "nowrap", align: "center", style: { minWidth: 0, flexShrink: 1 }, children: [
|
|
78
|
+
C,
|
|
79
|
+
/* @__PURE__ */ n(e, { fz: 12, c: "gray.6", lh: 1.4, truncate: "end", style: { minWidth: 0 }, children: h })
|
|
80
|
+
] }),
|
|
81
|
+
d && /* @__PURE__ */ r(l, { children: [
|
|
82
|
+
/* @__PURE__ */ n(g, { w: 3, h: 3, style: { borderRadius: "50%", backgroundColor: "var(--mantine-color-gray-5)", flexShrink: 0 } }),
|
|
83
|
+
/* @__PURE__ */ n(e, { fz: 12, c: "gray.6", lh: 1.4, style: { whiteSpace: "nowrap", flexShrink: 0 }, children: d })
|
|
84
|
+
] })
|
|
85
|
+
] })
|
|
86
|
+
] });
|
|
87
|
+
}
|
|
88
|
+
const v = T ? [
|
|
89
|
+
i,
|
|
90
|
+
c,
|
|
91
|
+
`${I} ${m} ${z} ${t}`,
|
|
92
|
+
o ? `${p} ${o}` : ""
|
|
93
|
+
].filter(Boolean).join(" ") : k && t ? [
|
|
94
|
+
i,
|
|
95
|
+
c,
|
|
96
|
+
`${s} ${t}`,
|
|
97
|
+
o ? `${p} ${o}` : ""
|
|
98
|
+
].filter(Boolean).join(" ") : [
|
|
99
|
+
i,
|
|
100
|
+
c,
|
|
101
|
+
o,
|
|
102
|
+
t ? `${s} ${t}` : ""
|
|
103
|
+
].filter(Boolean).join(" "), U = f ? `${v} — ${f}` : v;
|
|
104
|
+
return /* @__PURE__ */ r(H, { gap: 6, className: u.itemContent, children: [
|
|
105
|
+
/* @__PURE__ */ n(M, { label: U, disabled: !$, multiline: !0, maw: 320, withArrow: !0, children: /* @__PURE__ */ r(
|
|
106
|
+
e,
|
|
107
|
+
{
|
|
108
|
+
ref: S,
|
|
109
|
+
onMouseEnter: W,
|
|
110
|
+
fz: 14,
|
|
111
|
+
lh: 1.45,
|
|
112
|
+
c: "var(--mantine-color-text)",
|
|
113
|
+
lineClamp: 2,
|
|
114
|
+
style: { minWidth: 0, wordBreak: "break-word" },
|
|
115
|
+
children: [
|
|
116
|
+
i && /* @__PURE__ */ r(e, { span: !0, fw: 600, c: "var(--mantine-color-text)", children: [
|
|
117
|
+
i,
|
|
118
|
+
" "
|
|
119
|
+
] }),
|
|
120
|
+
c,
|
|
121
|
+
T ? /* @__PURE__ */ r(l, { children: [
|
|
122
|
+
" ",
|
|
123
|
+
I,
|
|
124
|
+
" ",
|
|
125
|
+
/* @__PURE__ */ n(e, { span: !0, fw: 600, c: "var(--mantine-color-text)", children: m }),
|
|
126
|
+
" ",
|
|
127
|
+
z,
|
|
128
|
+
" ",
|
|
129
|
+
/* @__PURE__ */ n(e, { span: !0, fw: 600, c: "var(--mantine-color-text)", children: t }),
|
|
130
|
+
o && /* @__PURE__ */ r(l, { children: [
|
|
131
|
+
" ",
|
|
132
|
+
p,
|
|
133
|
+
" ",
|
|
134
|
+
/* @__PURE__ */ n(e, { span: !0, fw: 600, c: "var(--mantine-color-text)", children: o })
|
|
135
|
+
] })
|
|
136
|
+
] }) : k && t ? /* @__PURE__ */ r(l, { children: [
|
|
137
|
+
" ",
|
|
138
|
+
s,
|
|
139
|
+
" ",
|
|
140
|
+
/* @__PURE__ */ n(e, { span: !0, fw: 600, c: "var(--mantine-color-text)", children: t }),
|
|
141
|
+
o && /* @__PURE__ */ r(l, { children: [
|
|
142
|
+
" ",
|
|
143
|
+
p,
|
|
144
|
+
" ",
|
|
145
|
+
/* @__PURE__ */ n(e, { span: !0, fw: 600, c: "var(--mantine-color-text)", children: o })
|
|
146
|
+
] })
|
|
147
|
+
] }) : /* @__PURE__ */ r(l, { children: [
|
|
148
|
+
o && /* @__PURE__ */ r(l, { children: [
|
|
149
|
+
" ",
|
|
150
|
+
/* @__PURE__ */ n(e, { span: !0, fw: 600, c: "var(--mantine-color-text)", children: o })
|
|
151
|
+
] }),
|
|
152
|
+
t && /* @__PURE__ */ r(l, { children: [
|
|
153
|
+
" ",
|
|
154
|
+
s,
|
|
155
|
+
" ",
|
|
156
|
+
/* @__PURE__ */ n(e, { span: !0, fw: 600, c: "var(--mantine-color-text)", children: t })
|
|
157
|
+
] })
|
|
158
|
+
] })
|
|
159
|
+
]
|
|
160
|
+
}
|
|
161
|
+
) }),
|
|
162
|
+
f && /* @__PURE__ */ n(g, { className: u.replyPreview, children: /* @__PURE__ */ n(e, { fz: 13, c: "var(--mantine-color-text)", lh: 1.45, lineClamp: 2, style: { flex: 1, minWidth: 0 }, children: f }) }),
|
|
163
|
+
/* @__PURE__ */ r(w, { gap: 6, wrap: "nowrap", align: "center", style: { minWidth: 0 }, children: [
|
|
164
|
+
/* @__PURE__ */ r(w, { gap: 4, wrap: "nowrap", align: "center", style: { minWidth: 0, flexShrink: 1 }, children: [
|
|
165
|
+
C,
|
|
166
|
+
/* @__PURE__ */ r(e, { fz: 12, c: "gray.6", lh: 1.4, truncate: "end", style: { minWidth: 0 }, children: [
|
|
167
|
+
h,
|
|
168
|
+
y && /* @__PURE__ */ r(l, { children: [
|
|
169
|
+
" · ",
|
|
170
|
+
/* @__PURE__ */ n(e, { span: !0, c: "gray.6", fw: 500, children: y })
|
|
171
|
+
] })
|
|
172
|
+
] })
|
|
173
|
+
] }),
|
|
174
|
+
d && /* @__PURE__ */ r(l, { children: [
|
|
175
|
+
/* @__PURE__ */ n(g, { w: 3, h: 3, style: { borderRadius: "50%", backgroundColor: "var(--mantine-color-gray-5)", flexShrink: 0 } }),
|
|
176
|
+
/* @__PURE__ */ n(e, { fz: 12, c: "gray.6", lh: 1.4, style: { whiteSpace: "nowrap", flexShrink: 0 }, children: d })
|
|
177
|
+
] })
|
|
178
|
+
] })
|
|
179
|
+
] });
|
|
180
|
+
}
|
|
181
|
+
export {
|
|
182
|
+
ln as NotificationContent
|
|
183
|
+
};
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
export { NotificationAvatar } from './NotificationAvatar';
|
|
2
|
+
export { NotificationContent } from './NotificationContent';
|
|
3
|
+
export { NotificationActions } from './NotificationActions';
|
|
4
|
+
export { InboxEmpty } from './InboxEmpty';
|
|
5
|
+
export { InboxHeader } from './InboxHeader';
|
|
6
|
+
export { InboxTabs } from './InboxTabs';
|
|
7
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/components/Notification/molecules/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,kBAAkB,EAAE,MAAM,sBAAsB,CAAC;AAC1D,OAAO,EAAE,mBAAmB,EAAE,MAAM,uBAAuB,CAAC;AAC5D,OAAO,EAAE,mBAAmB,EAAE,MAAM,uBAAuB,CAAC;AAC5D,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAC1C,OAAO,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AAC5C,OAAO,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC"}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { type ReactNode } from 'react';
|
|
2
|
+
import type { NotificationDTO } from '../lib/types';
|
|
3
|
+
interface InboxItemProps {
|
|
4
|
+
notification: NotificationDTO;
|
|
5
|
+
onRead: (id: number) => void;
|
|
6
|
+
onUnread: (id: number) => void;
|
|
7
|
+
onArchive: (id: number) => void;
|
|
8
|
+
onUnarchive: (id: number) => void;
|
|
9
|
+
onClick: (notification: NotificationDTO) => void;
|
|
10
|
+
sourceIcons?: Record<string, ReactNode | null>;
|
|
11
|
+
}
|
|
12
|
+
export declare function InboxItem({ notification: n, onRead, onUnread, onArchive, onUnarchive, onClick, sourceIcons, }: InboxItemProps): import("react/jsx-runtime").JSX.Element;
|
|
13
|
+
export {};
|
|
14
|
+
//# sourceMappingURL=InboxItem.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"InboxItem.d.ts","sourceRoot":"","sources":["../../../../src/components/Notification/organisms/InboxItem.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAe,KAAK,SAAS,EAAE,MAAM,OAAO,CAAC;AAKpD,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,cAAc,CAAC;AAOpD,UAAU,cAAc;IACtB,YAAY,EAAE,eAAe,CAAC;IAC9B,MAAM,EAAE,CAAC,EAAE,EAAE,MAAM,KAAK,IAAI,CAAC;IAC7B,QAAQ,EAAE,CAAC,EAAE,EAAE,MAAM,KAAK,IAAI,CAAC;IAC/B,SAAS,EAAE,CAAC,EAAE,EAAE,MAAM,KAAK,IAAI,CAAC;IAChC,WAAW,EAAE,CAAC,EAAE,EAAE,MAAM,KAAK,IAAI,CAAC;IAClC,OAAO,EAAE,CAAC,YAAY,EAAE,eAAe,KAAK,IAAI,CAAC;IACjD,WAAW,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,SAAS,GAAG,IAAI,CAAC,CAAC;CAChD;AAED,wBAAgB,SAAS,CAAC,EACxB,YAAY,EAAE,CAAC,EAAE,MAAM,EAAE,QAAQ,EAAE,SAAS,EAAE,WAAW,EAAE,OAAO,EAAE,WAAW,GAChF,EAAE,cAAc,2CAmDhB"}
|
|
@@ -0,0 +1,100 @@
|
|
|
1
|
+
import { jsxs as w, jsx as a } from "react/jsx-runtime";
|
|
2
|
+
import { useCallback as m } from "react";
|
|
3
|
+
import { Flex as F, Box as K } from "@mantine/core";
|
|
4
|
+
import { useNotificationItem as V } from "../hooks/useNotificationItem.js";
|
|
5
|
+
import { NotificationActions as B } from "../molecules/NotificationActions.js";
|
|
6
|
+
import { NotificationAvatar as O } from "../molecules/NotificationAvatar.js";
|
|
7
|
+
import { NotificationContent as S } from "../molecules/NotificationContent.js";
|
|
8
|
+
import l from "../Notification.module.css.js";
|
|
9
|
+
function M({
|
|
10
|
+
notification: o,
|
|
11
|
+
onRead: r,
|
|
12
|
+
onUnread: e,
|
|
13
|
+
onArchive: c,
|
|
14
|
+
onUnarchive: s,
|
|
15
|
+
onClick: d,
|
|
16
|
+
sourceIcons: p
|
|
17
|
+
}) {
|
|
18
|
+
const {
|
|
19
|
+
variant: f,
|
|
20
|
+
isUser: n,
|
|
21
|
+
actorName: u,
|
|
22
|
+
verb: v,
|
|
23
|
+
source: g,
|
|
24
|
+
sourceKey: i,
|
|
25
|
+
time: N,
|
|
26
|
+
statusValue: y,
|
|
27
|
+
statusOldValue: h,
|
|
28
|
+
taskKey: x,
|
|
29
|
+
commentPreview: I,
|
|
30
|
+
objectName: b,
|
|
31
|
+
systemTitle: k,
|
|
32
|
+
showInvitationActor: A,
|
|
33
|
+
fallbackUser: C,
|
|
34
|
+
statusFirst: T,
|
|
35
|
+
tailConnector: P
|
|
36
|
+
} = V(o), U = m((t) => {
|
|
37
|
+
t.stopPropagation(), o.read ? e(o.id) : r(o.id);
|
|
38
|
+
}, [o.id, o.read, r, e]), j = m((t) => {
|
|
39
|
+
t.stopPropagation(), o.archived ? s(o.id) : c(o.id);
|
|
40
|
+
}, [o.id, o.archived, c, s]);
|
|
41
|
+
return /* @__PURE__ */ w(
|
|
42
|
+
F,
|
|
43
|
+
{
|
|
44
|
+
gap: 10,
|
|
45
|
+
px: 16,
|
|
46
|
+
py: o.archived ? 10 : 12,
|
|
47
|
+
pos: "relative",
|
|
48
|
+
className: l.item,
|
|
49
|
+
onClick: () => d(o),
|
|
50
|
+
style: o.read ? void 0 : { backgroundColor: "var(--mantine-color-gray-light)" },
|
|
51
|
+
children: [
|
|
52
|
+
/* @__PURE__ */ a(
|
|
53
|
+
O,
|
|
54
|
+
{
|
|
55
|
+
actorUserId: o.actorUserId,
|
|
56
|
+
actorName: o.actorName,
|
|
57
|
+
actorAvatarUrl: o.actorAvatarUrl,
|
|
58
|
+
variant: f,
|
|
59
|
+
notificationType: o.notificationType,
|
|
60
|
+
fallbackUser: C,
|
|
61
|
+
unread: !o.read
|
|
62
|
+
}
|
|
63
|
+
),
|
|
64
|
+
/* @__PURE__ */ a(
|
|
65
|
+
S,
|
|
66
|
+
{
|
|
67
|
+
actorName: u,
|
|
68
|
+
verb: v,
|
|
69
|
+
objectName: b,
|
|
70
|
+
source: g,
|
|
71
|
+
sourceKey: i,
|
|
72
|
+
sourceIcon: i ? p?.[i] ?? null : null,
|
|
73
|
+
time: N,
|
|
74
|
+
isSystem: !n,
|
|
75
|
+
systemTitle: k,
|
|
76
|
+
statusValue: y,
|
|
77
|
+
statusOldValue: h,
|
|
78
|
+
commentPreview: I,
|
|
79
|
+
taskKey: x,
|
|
80
|
+
showInvitationActor: A,
|
|
81
|
+
statusFirst: T,
|
|
82
|
+
tailConnector: P
|
|
83
|
+
}
|
|
84
|
+
),
|
|
85
|
+
/* @__PURE__ */ a(K, { className: l.itemActions, onClick: (t) => t.stopPropagation(), children: /* @__PURE__ */ a(
|
|
86
|
+
B,
|
|
87
|
+
{
|
|
88
|
+
read: o.read,
|
|
89
|
+
archived: o.archived,
|
|
90
|
+
onToggleRead: U,
|
|
91
|
+
onToggleArchive: j
|
|
92
|
+
}
|
|
93
|
+
) })
|
|
94
|
+
]
|
|
95
|
+
}
|
|
96
|
+
);
|
|
97
|
+
}
|
|
98
|
+
export {
|
|
99
|
+
M as InboxItem
|
|
100
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"InboxPanel.d.ts","sourceRoot":"","sources":["../../../../src/components/Notification/organisms/InboxPanel.tsx"],"names":[],"mappings":"AAuBA,wBAAgB,UAAU,CAAC,EAAE,UAAU,EAAE,GAAE;IAAE,UAAU,CAAC,EAAE,MAAM,IAAI,CAAA;CAAO,2CAkG1E"}
|
|
@@ -0,0 +1,99 @@
|
|
|
1
|
+
import { jsx as r, jsxs as W } from "react/jsx-runtime";
|
|
2
|
+
import { useMemo as a, useCallback as B } from "react";
|
|
3
|
+
import { useLocation as D } from "react-router-dom";
|
|
4
|
+
import { Stack as G } from "@mantine/core";
|
|
5
|
+
import { useAppContainerDataStore as C } from "../../AppContainer/hooks/useAppContainerDataStore.js";
|
|
6
|
+
import { InfiniteScroll as J } from "../InfiniteScroll.js";
|
|
7
|
+
import { useInboxActions as N } from "../hooks/useInboxActions.js";
|
|
8
|
+
import { useInboxLoader as V } from "../hooks/useInboxLoader.js";
|
|
9
|
+
import { useNotificationStore as t } from "../hooks/useNotificationStore.js";
|
|
10
|
+
import { InboxEmpty as Y } from "../molecules/InboxEmpty.js";
|
|
11
|
+
import { InboxHeader as q } from "../molecules/InboxHeader.js";
|
|
12
|
+
import { InboxTabs as Q } from "../molecules/InboxTabs.js";
|
|
13
|
+
import { InboxItem as X } from "./InboxItem.js";
|
|
14
|
+
const Z = [
|
|
15
|
+
{ key: "PAGE", toolId: "pages", i18nKey: "pages" },
|
|
16
|
+
{ key: "PROJECT", toolId: "projects", i18nKey: "projects" },
|
|
17
|
+
{ key: "FORM", toolId: "forms", i18nKey: "forms" },
|
|
18
|
+
{ key: "FLOW", toolId: "flow", i18nKey: "flow" }
|
|
19
|
+
];
|
|
20
|
+
function ho({ onNavigate: w } = {}) {
|
|
21
|
+
const u = D(), x = a(() => u.pathname.split("/").filter(Boolean)[0] || "", [u.pathname]), O = C((o) => o.workspaceMenu?.active?.workspaceId || ""), c = C((o) => o.tools), m = t((o) => o.notifications), p = t((o) => o.tab), g = t((o) => o.unreadOnly), i = t((o) => o.activeSources), R = t((o) => o.unreadCounts), L = t((o) => o.setTab), U = t((o) => o.setUnreadOnly), h = t((o) => o.setSources), { loadPage: T, handleLoadMore: j, refreshCounts: E, loading: A, hasMore: K } = V(O), {
|
|
22
|
+
handleClick: I,
|
|
23
|
+
handleRead: y,
|
|
24
|
+
handleUnread: b,
|
|
25
|
+
handleArchive: v,
|
|
26
|
+
handleUnarchive: S,
|
|
27
|
+
handleMarkAllRead: P,
|
|
28
|
+
handleArchiveAll: z,
|
|
29
|
+
handleArchiveRead: H
|
|
30
|
+
} = N(x, E, T, w), f = a(() => {
|
|
31
|
+
const o = new Map(c.map((e) => [e.id, e]));
|
|
32
|
+
return Z.map(({ key: e, toolId: n, i18nKey: d }) => {
|
|
33
|
+
const s = o.get(n);
|
|
34
|
+
return { key: e, i18nKey: d, icon: s?.icon?.({ size: 18 }) };
|
|
35
|
+
});
|
|
36
|
+
}, [c]), M = a(() => {
|
|
37
|
+
const o = new Map(c.map((n) => [n.id, n])), e = (n) => o.get(n)?.icon?.({ size: 14 }) ?? null;
|
|
38
|
+
return {
|
|
39
|
+
pages: e("pages"),
|
|
40
|
+
projects: e("projects"),
|
|
41
|
+
forms: e("forms"),
|
|
42
|
+
flow: e("flow"),
|
|
43
|
+
tasks: e("projects"),
|
|
44
|
+
comments: e("pages")
|
|
45
|
+
};
|
|
46
|
+
}, [c]), l = a(() => f.map((o) => o.key), [f]), _ = B((o) => {
|
|
47
|
+
if (i.size === 0) {
|
|
48
|
+
h(l.filter((s) => s !== o));
|
|
49
|
+
return;
|
|
50
|
+
}
|
|
51
|
+
const n = new Set(i);
|
|
52
|
+
n.has(o) ? n.delete(o) : n.add(o);
|
|
53
|
+
const d = l.length > 0 && l.every((s) => n.has(s));
|
|
54
|
+
h(d ? [] : [...n]);
|
|
55
|
+
}, [i, l, h]), k = m.length === 0 && !A, F = a(
|
|
56
|
+
() => m.map((o) => /* @__PURE__ */ r(
|
|
57
|
+
X,
|
|
58
|
+
{
|
|
59
|
+
notification: o,
|
|
60
|
+
onClick: I,
|
|
61
|
+
onRead: y,
|
|
62
|
+
onUnread: b,
|
|
63
|
+
onArchive: v,
|
|
64
|
+
onUnarchive: S,
|
|
65
|
+
sourceIcons: M
|
|
66
|
+
},
|
|
67
|
+
o.id
|
|
68
|
+
)),
|
|
69
|
+
[m, I, y, b, v, S, M]
|
|
70
|
+
);
|
|
71
|
+
return /* @__PURE__ */ W(G, { h: "100%", gap: 0, style: { overflow: "hidden", minHeight: 0 }, children: [
|
|
72
|
+
/* @__PURE__ */ r(
|
|
73
|
+
q,
|
|
74
|
+
{
|
|
75
|
+
sourceItems: f,
|
|
76
|
+
activeSources: i,
|
|
77
|
+
onToggleSource: _,
|
|
78
|
+
unreadOnly: g,
|
|
79
|
+
onUnreadOnlyChange: U
|
|
80
|
+
}
|
|
81
|
+
),
|
|
82
|
+
/* @__PURE__ */ r(
|
|
83
|
+
Q,
|
|
84
|
+
{
|
|
85
|
+
tab: p,
|
|
86
|
+
onTabChange: L,
|
|
87
|
+
unreadCounts: R,
|
|
88
|
+
onMarkAllRead: P,
|
|
89
|
+
onArchiveAll: z,
|
|
90
|
+
onArchiveRead: H,
|
|
91
|
+
isEmpty: k,
|
|
92
|
+
children: k ? /* @__PURE__ */ r(Y, { tab: p, caughtUp: g && p !== "ARCHIVE" }) : /* @__PURE__ */ r(J, { onLoadMore: j, isLoading: A, disabled: !K, children: F })
|
|
93
|
+
}
|
|
94
|
+
)
|
|
95
|
+
] });
|
|
96
|
+
}
|
|
97
|
+
export {
|
|
98
|
+
ho as InboxPanel
|
|
99
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/components/Notification/organisms/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AACxC,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC"}
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
const t = "
|
|
1
|
+
const t = "_container_f42en_1", e = "_depthBox_f42en_21", n = "_item_f42en_37", o = {
|
|
2
2
|
container: t,
|
|
3
3
|
depthBox: e,
|
|
4
|
-
item:
|
|
4
|
+
item: n
|
|
5
5
|
};
|
|
6
6
|
export {
|
|
7
7
|
t as container,
|
|
8
|
-
|
|
8
|
+
o as default,
|
|
9
9
|
e as depthBox,
|
|
10
|
-
|
|
10
|
+
n as item
|
|
11
11
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"RemoveConfirmModal.d.ts","sourceRoot":"","sources":["../../../src/components/modals/RemoveConfirmModal.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAKlC,OAAO,EAAE,MAAM,EAAE,MAAM,iBAAiB,CAAC;
|
|
1
|
+
{"version":3,"file":"RemoveConfirmModal.d.ts","sourceRoot":"","sources":["../../../src/components/modals/RemoveConfirmModal.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAKlC,OAAO,EAAE,MAAM,EAAE,MAAM,iBAAiB,CAAC;AAGzC,eAAO,MAAM,sBAAsB,GACjC,OAAO,UAAU,CAAC,OAAO,MAAM,CAAC,gBAAgB,CAAC,CAAC,CAAC,CAAC,GAAG;IACrD,MAAM,CAAC,EAAE;QACP,OAAO,CAAC,EAAE,MAAM,CAAC;QACjB,MAAM,CAAC,EAAE,MAAM,CAAC;KACjB,CAAC;IACF,IAAI,CAAC,EAAE,SAAS,GAAG,IAAI,CAAC;CACzB,SAsFF,CAAC"}
|
|
@@ -1,27 +1,28 @@
|
|
|
1
|
-
import { jsxs as
|
|
2
|
-
import { Delete02Icon as
|
|
3
|
-
import { HugeiconsIcon as
|
|
1
|
+
import { jsxs as v, jsx as e } from "react/jsx-runtime";
|
|
2
|
+
import { Delete02Icon as y } from "@hugeicons/core-free-icons";
|
|
3
|
+
import { HugeiconsIcon as x } from "@hugeicons/react";
|
|
4
4
|
import { Stack as C, Text as c } from "@mantine/core";
|
|
5
5
|
import { modals as a } from "@mantine/modals";
|
|
6
|
-
|
|
6
|
+
import s from "i18next";
|
|
7
|
+
const D = (m) => {
|
|
7
8
|
const {
|
|
8
|
-
title:
|
|
9
|
-
children:
|
|
9
|
+
title: d,
|
|
10
|
+
children: p,
|
|
10
11
|
onConfirm: o,
|
|
11
|
-
onClose:
|
|
12
|
-
labels:
|
|
13
|
-
icon:
|
|
14
|
-
|
|
12
|
+
onClose: f,
|
|
13
|
+
labels: t,
|
|
14
|
+
icon: n = /* @__PURE__ */ e(
|
|
15
|
+
x,
|
|
15
16
|
{
|
|
16
17
|
size: 20,
|
|
17
|
-
icon:
|
|
18
|
+
icon: y,
|
|
18
19
|
color: "var(--mantine-color-red-filled)"
|
|
19
20
|
}
|
|
20
21
|
),
|
|
21
|
-
confirmProps:
|
|
22
|
-
closeOnConfirm:
|
|
23
|
-
...
|
|
24
|
-
} =
|
|
22
|
+
confirmProps: u,
|
|
23
|
+
closeOnConfirm: h = !0,
|
|
24
|
+
...w
|
|
25
|
+
} = m, g = a.openConfirmModal({
|
|
25
26
|
withCloseButton: !1,
|
|
26
27
|
keepMounted: !1,
|
|
27
28
|
centered: !0,
|
|
@@ -36,18 +37,18 @@ const z = (s) => {
|
|
|
36
37
|
}
|
|
37
38
|
},
|
|
38
39
|
confirmProps: {
|
|
39
|
-
color:
|
|
40
|
+
color: u?.color ?? "red",
|
|
40
41
|
fullWidth: !0,
|
|
41
42
|
variant: "filled",
|
|
42
43
|
size: "sm",
|
|
43
|
-
children:
|
|
44
|
+
children: t?.confirm ?? (s.t("delete") || "Delete"),
|
|
44
45
|
style: { whiteSpace: "nowrap" }
|
|
45
46
|
},
|
|
46
47
|
cancelProps: {
|
|
47
48
|
variant: "default",
|
|
48
49
|
size: "sm",
|
|
49
50
|
fullWidth: !0,
|
|
50
|
-
children:
|
|
51
|
+
children: t?.cancel ?? (s.t("cancel") || "Cancel"),
|
|
51
52
|
style: { whiteSpace: "nowrap" }
|
|
52
53
|
},
|
|
53
54
|
groupProps: {
|
|
@@ -55,22 +56,22 @@ const z = (s) => {
|
|
|
55
56
|
wrap: "nowrap",
|
|
56
57
|
gap: 8
|
|
57
58
|
},
|
|
58
|
-
children: /* @__PURE__ */
|
|
59
|
-
|
|
60
|
-
/* @__PURE__ */ e(c, { c: "bright", mt: "xs", fw: "700", ta: "center", children:
|
|
61
|
-
/* @__PURE__ */ e(c, { mt: 6, size: "sm", c: "gray", ta: "center", children:
|
|
59
|
+
children: /* @__PURE__ */ v(C, { gap: 0, align: "center", mb: 0, children: [
|
|
60
|
+
n && n,
|
|
61
|
+
/* @__PURE__ */ e(c, { c: "bright", mt: "xs", fw: "700", ta: "center", children: d }),
|
|
62
|
+
/* @__PURE__ */ e(c, { mt: 6, size: "sm", c: "gray", ta: "center", children: p })
|
|
62
63
|
] }),
|
|
63
64
|
onConfirm: o,
|
|
64
65
|
onClose: () => {
|
|
65
|
-
window.removeEventListener("keydown", r),
|
|
66
|
+
window.removeEventListener("keydown", r), f?.();
|
|
66
67
|
},
|
|
67
|
-
...
|
|
68
|
+
...w
|
|
68
69
|
}), r = (i) => {
|
|
69
70
|
const l = document.activeElement?.tagName;
|
|
70
|
-
l === "TEXTAREA" || l === "INPUT" || i.key === "Enter" && (i.preventDefault(), o?.(),
|
|
71
|
+
l === "TEXTAREA" || l === "INPUT" || i.key === "Enter" && (i.preventDefault(), o?.(), h && a.close(g));
|
|
71
72
|
};
|
|
72
73
|
window.addEventListener("keydown", r);
|
|
73
74
|
};
|
|
74
75
|
export {
|
|
75
|
-
|
|
76
|
+
D as openRemoveConfirmModal
|
|
76
77
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"FrontTable.d.ts","sourceRoot":"","sources":["../../../src/components/table/FrontTable.tsx"],"names":[],"mappings":"AAYA,eAAO,MAAM,UAAU;;;;;;;;;;;;;;;;;;;;;;;;;
|
|
1
|
+
{"version":3,"file":"FrontTable.d.ts","sourceRoot":"","sources":["../../../src/components/table/FrontTable.tsx"],"names":[],"mappings":"AAYA,eAAO,MAAM,UAAU;;;;;;;;;;;;;;;;;;;;;;;;;gBAAV,CAAA;iBACA,CAAC;gBACA,CAAC;;CAOb,CAAC;AAEH,cAAc,wBAAwB,CAAC;AACvC,cAAc,yBAAyB,CAAC;AACxC,cAAc,SAAS,CAAC;AACxB,cAAc,mBAAmB,CAAC;AAClC,cAAc,0BAA0B,CAAC;AACzC,cAAc,8BAA8B,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useColumnsResizing.d.ts","sourceRoot":"","sources":["../../../../src/components/table/hooks/useColumnsResizing.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,OAAO,CAAC;AAW9C,eAAO,MAAM,kBAAkB,GAAI,UAAU,gBAAgB,CAAC,OAAO,CAAC;
|
|
1
|
+
{"version":3,"file":"useColumnsResizing.d.ts","sourceRoot":"","sources":["../../../../src/components/table/hooks/useColumnsResizing.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,OAAO,CAAC;AAW9C,eAAO,MAAM,kBAAkB,GAAI,UAAU,gBAAgB,CAAC,OAAO,CAAC;oBAc/B,GAAG;;CAqEzC,CAAC"}
|