@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
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import type { TFunction } from 'i18next';
|
|
2
|
+
export declare function resolveNotificationType(raw: string | null): string | null;
|
|
3
|
+
export declare function getNotificationVerb(t: TFunction, notificationType: string | null, params?: Record<string, string>): string;
|
|
4
|
+
export declare function getNotificationVerbSelf(t: TFunction, notificationType: string | null, params?: Record<string, string>): string;
|
|
5
|
+
export declare function getSystemMessage(t: TFunction, notificationType: string | null, params?: Record<string, string>): string | null;
|
|
6
|
+
export declare function getSourceLabel(t: TFunction, notificationType: string | number | null, storedLink?: string | null): string;
|
|
7
|
+
export declare function getSourceKey(notificationType: string | number | null, storedLink?: string | null): string | null;
|
|
8
|
+
export declare function isMention(notificationType: string | null): boolean;
|
|
9
|
+
export declare function buildNotificationLink(notificationType: string | null, objectId: string | null, parentId: string | null, wsAlias: string, storedLink?: string | null): string | null;
|
|
10
|
+
//# sourceMappingURL=notificationText.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"notificationText.d.ts","sourceRoot":"","sources":["../../../../src/components/Notification/lib/notificationText.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,SAAS,CAAC;AAYzC,wBAAgB,uBAAuB,CAAC,GAAG,EAAE,MAAM,GAAG,IAAI,GAAG,MAAM,GAAG,IAAI,CAMzE;AAED,wBAAgB,mBAAmB,CACjC,CAAC,EAAE,SAAS,EAAE,gBAAgB,EAAE,MAAM,GAAG,IAAI,EAAE,MAAM,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,GAC7E,MAAM,CAKR;AAED,wBAAgB,uBAAuB,CACrC,CAAC,EAAE,SAAS,EAAE,gBAAgB,EAAE,MAAM,GAAG,IAAI,EAAE,MAAM,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,GAC7E,MAAM,CAOR;AAED,wBAAgB,gBAAgB,CAC9B,CAAC,EAAE,SAAS,EACZ,gBAAgB,EAAE,MAAM,GAAG,IAAI,EAC/B,MAAM,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,GAC9B,MAAM,GAAG,IAAI,CAMf;AAmFD,wBAAgB,cAAc,CAC5B,CAAC,EAAE,SAAS,EACZ,gBAAgB,EAAE,MAAM,GAAG,MAAM,GAAG,IAAI,EACxC,UAAU,CAAC,EAAE,MAAM,GAAG,IAAI,GACzB,MAAM,CASR;AAED,wBAAgB,YAAY,CAC1B,gBAAgB,EAAE,MAAM,GAAG,MAAM,GAAG,IAAI,EACxC,UAAU,CAAC,EAAE,MAAM,GAAG,IAAI,GACzB,MAAM,GAAG,IAAI,CAQf;AAED,wBAAgB,SAAS,CAAC,gBAAgB,EAAE,MAAM,GAAG,IAAI,GAAG,OAAO,CAIlE;AAED,wBAAgB,qBAAqB,CACnC,gBAAgB,EAAE,MAAM,GAAG,IAAI,EAC/B,QAAQ,EAAE,MAAM,GAAG,IAAI,EACvB,QAAQ,EAAE,MAAM,GAAG,IAAI,EACvB,OAAO,EAAE,MAAM,EACf,UAAU,CAAC,EAAE,MAAM,GAAG,IAAI,GACzB,MAAM,GAAG,IAAI,CAgCf"}
|
|
@@ -0,0 +1,131 @@
|
|
|
1
|
+
const D = {
|
|
2
|
+
PAGE_DELETE: "PAGE_DELETED",
|
|
3
|
+
PROJECT_DELETE: "PROJECT_DELETED",
|
|
4
|
+
PROJECTTASK_DELETE: "TASK_DELETED",
|
|
5
|
+
TASK_DELETE: "TASK_DELETED",
|
|
6
|
+
INVITATION_CREATE: "INVITATION_CREATED",
|
|
7
|
+
ACCESS_GRANT: "ACCESS_GRANTED",
|
|
8
|
+
ACCESS_REVOKE: "ACCESS_REVOKED"
|
|
9
|
+
};
|
|
10
|
+
function A(E) {
|
|
11
|
+
if (!E) return null;
|
|
12
|
+
if (D[E]) return D[E];
|
|
13
|
+
const T = E.replace(/_DESC$/, "");
|
|
14
|
+
return D[T] ? D[T] : E;
|
|
15
|
+
}
|
|
16
|
+
function S(E, T, t) {
|
|
17
|
+
const e = A(T);
|
|
18
|
+
if (!e) return "";
|
|
19
|
+
const r = E(`inbox.verb.${e}`, { ...t, defaultValue: "" });
|
|
20
|
+
return r === `inbox.verb.${e}` ? "" : r;
|
|
21
|
+
}
|
|
22
|
+
function u(E, T, t) {
|
|
23
|
+
const e = A(T);
|
|
24
|
+
if (!e) return "";
|
|
25
|
+
const r = `inbox.verbSelf.${e}`, _ = E(r, { ...t, defaultValue: "" });
|
|
26
|
+
return _ && _ !== r ? _ : S(E, T, t);
|
|
27
|
+
}
|
|
28
|
+
function O(E, T, t) {
|
|
29
|
+
const e = A(T);
|
|
30
|
+
if (!e) return null;
|
|
31
|
+
const r = `inbox.system.${e}`, _ = E(r, { ...t, defaultValue: "" });
|
|
32
|
+
return _ === r || !_ ? null : _;
|
|
33
|
+
}
|
|
34
|
+
const n = {
|
|
35
|
+
MENTION_IN_PAGE: "pages",
|
|
36
|
+
MENTION_IN_TASK: "projects",
|
|
37
|
+
MENTION_IN_COMMENT: "comments",
|
|
38
|
+
MENTION_IN_CHAT_CHANNEL: "chat",
|
|
39
|
+
MENTION_IN_CHAT_DM: "chat",
|
|
40
|
+
TASK_ASSIGNED: "projects",
|
|
41
|
+
TASK_UNASSIGNED: "projects",
|
|
42
|
+
TASK_DELETED: "projects",
|
|
43
|
+
TASK_RESTORED: "projects",
|
|
44
|
+
TASK_STATUS_CHANGED: "projects",
|
|
45
|
+
TASK_TYPE_CHANGED: "projects",
|
|
46
|
+
TASK_PRIORITY_CHANGED: "projects",
|
|
47
|
+
TASK_START_DATE_ADDED: "projects",
|
|
48
|
+
TASK_START_DATE_CHANGED: "projects",
|
|
49
|
+
TASK_START_DATE_REMOVED: "projects",
|
|
50
|
+
TASK_DUE_DATE_ADDED: "projects",
|
|
51
|
+
TASK_DUE_DATE_CHANGED: "projects",
|
|
52
|
+
TASK_DUE_DATE_REMOVED: "projects",
|
|
53
|
+
TASK_TIME_ESTIMATE_ADDED: "projects",
|
|
54
|
+
TASK_TIME_ESTIMATE_CHANGED: "projects",
|
|
55
|
+
TASK_TIME_ESTIMATE_REMOVED: "projects",
|
|
56
|
+
TASK_PARENT_CHANGED: "projects",
|
|
57
|
+
TASK_PARENT_REMOVED: "projects",
|
|
58
|
+
TASK_TITLE_CHANGED: "projects",
|
|
59
|
+
TASK_COMMENT_ADDED: "projects",
|
|
60
|
+
TASK_LIST_DELETED: "projects",
|
|
61
|
+
TASK_LIST_RESTORED: "projects",
|
|
62
|
+
PAGE_CREATED: "pages",
|
|
63
|
+
PAGE_DELETED: "pages",
|
|
64
|
+
PAGE_RESTORED: "pages",
|
|
65
|
+
PAGE_COMMENT_ADDED: "pages",
|
|
66
|
+
PROJECT_DELETED: "projects",
|
|
67
|
+
PROJECT_RESTORED: "projects",
|
|
68
|
+
FORM_DELETED: "forms",
|
|
69
|
+
FORM_RESTORED: "forms",
|
|
70
|
+
FLOW_DELETED: "flow",
|
|
71
|
+
FLOW_RESTORED: "flow",
|
|
72
|
+
INVITATION_CREATED: "workspace",
|
|
73
|
+
INVITATION_ACCEPTED_BY: "workspace",
|
|
74
|
+
INVITATION_DECLINED_BY: "workspace",
|
|
75
|
+
INVITATION_REVOKED: "workspace",
|
|
76
|
+
INVITATION_ROLE_CHANGED: "workspace",
|
|
77
|
+
INVITATION_ROLE_CHANGED_BY_OWNER: "workspace",
|
|
78
|
+
COMMENT_RESOLVED: "comments",
|
|
79
|
+
COMMENT_REPLIED: "comments",
|
|
80
|
+
ACCESS_GRANTED: "workspace",
|
|
81
|
+
ACCESS_REVOKED: "workspace",
|
|
82
|
+
CHANNEL_ADDED: "chat",
|
|
83
|
+
MISSED_CALL: "chat",
|
|
84
|
+
WORKSPACE_DELETED: "workspace",
|
|
85
|
+
WORKSPACE_CREATED: "workspace",
|
|
86
|
+
WORKSPACE_UPDATED: "workspace"
|
|
87
|
+
};
|
|
88
|
+
function N(E) {
|
|
89
|
+
return !E || typeof E != "string" ? null : E.includes("/pages/") ? "pages" : E.includes("/projects/") ? "projects" : E.includes("/forms/") ? "forms" : E.includes("/flow/") ? "flow" : E.includes("/connect/") ? "chat" : null;
|
|
90
|
+
}
|
|
91
|
+
const c = /* @__PURE__ */ new Set([
|
|
92
|
+
"ACCESS_GRANTED",
|
|
93
|
+
"ACCESS_REVOKED",
|
|
94
|
+
"COMMENT_REPLIED",
|
|
95
|
+
"COMMENT_RESOLVED",
|
|
96
|
+
"MENTION_IN_COMMENT",
|
|
97
|
+
"INVITATION_ROLE_CHANGED",
|
|
98
|
+
"INVITATION_ROLE_CHANGED_BY_OWNER"
|
|
99
|
+
]);
|
|
100
|
+
function l(E, T, t) {
|
|
101
|
+
if (T == null) return "";
|
|
102
|
+
const e = A(String(T));
|
|
103
|
+
let r = e ? n[e] : null;
|
|
104
|
+
return e && c.has(e) && (r = N(t) ?? r), r ? E(`inbox.sourceLabel.${r}`, { defaultValue: r }) : "";
|
|
105
|
+
}
|
|
106
|
+
function C(E, T) {
|
|
107
|
+
if (E == null) return null;
|
|
108
|
+
const t = A(String(E));
|
|
109
|
+
let e = t ? n[t] : null;
|
|
110
|
+
return t && c.has(t) && (e = N(T) ?? e), e;
|
|
111
|
+
}
|
|
112
|
+
function I(E) {
|
|
113
|
+
return E ? A(E)?.startsWith("MENTION_") ?? !1 : !1;
|
|
114
|
+
}
|
|
115
|
+
function R(E, T, t, e, r) {
|
|
116
|
+
const _ = e ? `/${e}` : "", o = r && r.startsWith("/") ? r : t && t.startsWith("/") ? t : null;
|
|
117
|
+
if (o) return `${_}${o}`;
|
|
118
|
+
if (!T) return null;
|
|
119
|
+
const s = A(E);
|
|
120
|
+
return s ? s.startsWith("TASK_") || s === "MENTION_IN_TASK" ? t ? `${_}/projects/${t}/issues/${T}` : null : s.startsWith("PAGE") || s === "MENTION_IN_PAGE" ? `${_}/pages/${T}` : s.startsWith("PROJECT") ? `${_}/projects/${T}` : (s === "MENTION_IN_COMMENT" || s.startsWith("INVITATION") || s.startsWith("ACCESS"), null) : null;
|
|
121
|
+
}
|
|
122
|
+
export {
|
|
123
|
+
R as buildNotificationLink,
|
|
124
|
+
S as getNotificationVerb,
|
|
125
|
+
u as getNotificationVerbSelf,
|
|
126
|
+
C as getSourceKey,
|
|
127
|
+
l as getSourceLabel,
|
|
128
|
+
O as getSystemMessage,
|
|
129
|
+
I as isMention,
|
|
130
|
+
A as resolveNotificationType
|
|
131
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"stripHtml.d.ts","sourceRoot":"","sources":["../../../../src/components/Notification/lib/stripHtml.ts"],"names":[],"mappings":"AAAA,wBAAgB,SAAS,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,CAI9C"}
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
export interface NotificationDTO {
|
|
2
|
+
id: number;
|
|
3
|
+
actorUserId: string | null;
|
|
4
|
+
actorName: string | null;
|
|
5
|
+
actorAvatarUrl: string | null;
|
|
6
|
+
notificationType: string | null;
|
|
7
|
+
link: string | null;
|
|
8
|
+
read: boolean;
|
|
9
|
+
archived: boolean;
|
|
10
|
+
objectId: string | null;
|
|
11
|
+
objectName: string | null;
|
|
12
|
+
parentId: string | null;
|
|
13
|
+
createdAt: string;
|
|
14
|
+
archivedAt: string | null;
|
|
15
|
+
priority: string | null;
|
|
16
|
+
notificationCategory: string | null;
|
|
17
|
+
params: Record<string, string> | null;
|
|
18
|
+
title: string | null;
|
|
19
|
+
}
|
|
20
|
+
export interface UnreadCounts {
|
|
21
|
+
all: number;
|
|
22
|
+
mentions: number;
|
|
23
|
+
}
|
|
24
|
+
export interface NotificationsResponse {
|
|
25
|
+
pagination: {
|
|
26
|
+
page: number;
|
|
27
|
+
size: number;
|
|
28
|
+
totalElements: number;
|
|
29
|
+
};
|
|
30
|
+
data: {
|
|
31
|
+
notifications: NotificationDTO[];
|
|
32
|
+
unreadCount: number;
|
|
33
|
+
unreadMentions: number;
|
|
34
|
+
};
|
|
35
|
+
}
|
|
36
|
+
export type NotificationTab = 'ALL' | 'MENTIONS' | 'ARCHIVE';
|
|
37
|
+
export declare const NotificationSourceCategory: {
|
|
38
|
+
readonly PAGE: 2;
|
|
39
|
+
readonly PROJECT: 3;
|
|
40
|
+
readonly FORM: 6;
|
|
41
|
+
readonly FLOW: 11;
|
|
42
|
+
};
|
|
43
|
+
export type SourceCategoryKey = keyof typeof NotificationSourceCategory;
|
|
44
|
+
export type NotificationVariant = 'user-action' | 'system-success' | 'system-info' | 'system-alert' | 'system-warning' | 'system-invitation-accepted' | 'system-invitation-declined' | 'system-call-missed' | 'system-channel-added';
|
|
45
|
+
//# sourceMappingURL=types.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../src/components/Notification/lib/types.ts"],"names":[],"mappings":"AAAA,MAAM,WAAW,eAAe;IAC9B,EAAE,EAAE,MAAM,CAAC;IACX,WAAW,EAAE,MAAM,GAAG,IAAI,CAAC;IAC3B,SAAS,EAAE,MAAM,GAAG,IAAI,CAAC;IACzB,cAAc,EAAE,MAAM,GAAG,IAAI,CAAC;IAC9B,gBAAgB,EAAE,MAAM,GAAG,IAAI,CAAC;IAChC,IAAI,EAAE,MAAM,GAAG,IAAI,CAAC;IACpB,IAAI,EAAE,OAAO,CAAC;IACd,QAAQ,EAAE,OAAO,CAAC;IAClB,QAAQ,EAAE,MAAM,GAAG,IAAI,CAAC;IACxB,UAAU,EAAE,MAAM,GAAG,IAAI,CAAC;IAC1B,QAAQ,EAAE,MAAM,GAAG,IAAI,CAAC;IACxB,SAAS,EAAE,MAAM,CAAC;IAClB,UAAU,EAAE,MAAM,GAAG,IAAI,CAAC;IAC1B,QAAQ,EAAE,MAAM,GAAG,IAAI,CAAC;IACxB,oBAAoB,EAAE,MAAM,GAAG,IAAI,CAAC;IACpC,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,GAAG,IAAI,CAAC;IACtC,KAAK,EAAE,MAAM,GAAG,IAAI,CAAC;CACtB;AAED,MAAM,WAAW,YAAY;IAC3B,GAAG,EAAE,MAAM,CAAC;IACZ,QAAQ,EAAE,MAAM,CAAC;CAClB;AAED,MAAM,WAAW,qBAAqB;IACpC,UAAU,EAAE;QACV,IAAI,EAAE,MAAM,CAAC;QACb,IAAI,EAAE,MAAM,CAAC;QACb,aAAa,EAAE,MAAM,CAAC;KACvB,CAAC;IACF,IAAI,EAAE;QACJ,aAAa,EAAE,eAAe,EAAE,CAAC;QACjC,WAAW,EAAE,MAAM,CAAC;QACpB,cAAc,EAAE,MAAM,CAAC;KACxB,CAAC;CACH;AAED,MAAM,MAAM,eAAe,GAAG,KAAK,GAAG,UAAU,GAAG,SAAS,CAAC;AAE7D,eAAO,MAAM,0BAA0B;;;;;CAK7B,CAAC;AAEX,MAAM,MAAM,iBAAiB,GAAG,MAAM,OAAO,0BAA0B,CAAC;AAExE,MAAM,MAAM,mBAAmB,GAC3B,aAAa,GACb,gBAAgB,GAChB,aAAa,GACb,cAAc,GACd,gBAAgB,GAChB,4BAA4B,GAC5B,4BAA4B,GAC5B,oBAAoB,GACpB,sBAAsB,CAAC"}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import type { NotificationTab } from '../lib/types';
|
|
2
|
+
interface InboxEmptyProps {
|
|
3
|
+
tab: NotificationTab;
|
|
4
|
+
caughtUp?: boolean;
|
|
5
|
+
}
|
|
6
|
+
export declare function InboxEmpty({ tab, caughtUp }: InboxEmptyProps): import("react/jsx-runtime").JSX.Element;
|
|
7
|
+
export {};
|
|
8
|
+
//# sourceMappingURL=InboxEmpty.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"InboxEmpty.d.ts","sourceRoot":"","sources":["../../../../src/components/Notification/molecules/InboxEmpty.tsx"],"names":[],"mappings":"AAWA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,cAAc,CAAC;AAEpD,UAAU,eAAe;IACvB,GAAG,EAAE,eAAe,CAAC;IACrB,QAAQ,CAAC,EAAE,OAAO,CAAC;CACpB;AAWD,wBAAgB,UAAU,CAAC,EAAE,GAAG,EAAE,QAAQ,EAAE,EAAE,eAAe,2CAe5D"}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { jsxs as p, jsx as o } from "react/jsx-runtime";
|
|
2
|
+
import { useTranslation as x } from "react-i18next";
|
|
3
|
+
import { Stack as f, Text as i } from "@mantine/core";
|
|
4
|
+
import { IconCheck as I, IconArchive as C, IconInbox as h, IconMail as y } from "@tabler/icons-react";
|
|
5
|
+
const t = "var(--mantine-color-gray-5)", s = {
|
|
6
|
+
ALL: /* @__PURE__ */ o(y, { size: 32, stroke: 1.5, color: t }),
|
|
7
|
+
MENTIONS: /* @__PURE__ */ o(h, { size: 32, stroke: 1.5, color: t }),
|
|
8
|
+
ARCHIVE: /* @__PURE__ */ o(C, { size: 32, stroke: 1.5, color: t }),
|
|
9
|
+
CAUGHT_UP: /* @__PURE__ */ o(I, { size: 32, stroke: 1.75, color: "var(--mantine-color-indigo-5)" })
|
|
10
|
+
};
|
|
11
|
+
function A({ tab: e, caughtUp: n }) {
|
|
12
|
+
const { t: r } = x("appContainer"), c = n ? "caughtUp" : e.toLowerCase(), l = r(`inbox.empty.${c}.title`), a = r(`inbox.empty.${c}.desc`), m = n ? s.CAUGHT_UP : s[e];
|
|
13
|
+
return /* @__PURE__ */ p(f, { gap: 10, align: "center", justify: "center", px: 10, style: { flex: 1, minHeight: 0 }, children: [
|
|
14
|
+
m,
|
|
15
|
+
/* @__PURE__ */ o(i, { fw: 600, fz: 16, lh: 1.55, ta: "center", c: "var(--mantine-color-text)", children: l }),
|
|
16
|
+
/* @__PURE__ */ o(i, { fz: 14, c: "gray.6", lh: 1.45, ta: "center", children: a })
|
|
17
|
+
] });
|
|
18
|
+
}
|
|
19
|
+
export {
|
|
20
|
+
A as InboxEmpty
|
|
21
|
+
};
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import type { ReactNode } from 'react';
|
|
2
|
+
import type { SourceCategoryKey } from '../lib/types';
|
|
3
|
+
interface SourceItem {
|
|
4
|
+
key: SourceCategoryKey;
|
|
5
|
+
i18nKey: string;
|
|
6
|
+
icon: ReactNode | null;
|
|
7
|
+
}
|
|
8
|
+
interface InboxHeaderProps {
|
|
9
|
+
sourceItems: SourceItem[];
|
|
10
|
+
activeSources: Set<SourceCategoryKey>;
|
|
11
|
+
onToggleSource: (key: SourceCategoryKey) => void;
|
|
12
|
+
unreadOnly: boolean;
|
|
13
|
+
onUnreadOnlyChange: (value: boolean) => void;
|
|
14
|
+
}
|
|
15
|
+
export declare function InboxHeader({ sourceItems, activeSources, onToggleSource, unreadOnly, onUnreadOnlyChange, }: InboxHeaderProps): import("react/jsx-runtime").JSX.Element;
|
|
16
|
+
export {};
|
|
17
|
+
//# sourceMappingURL=InboxHeader.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"InboxHeader.d.ts","sourceRoot":"","sources":["../../../../src/components/Notification/molecules/InboxHeader.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAMvC,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,cAAc,CAAC;AAItD,UAAU,UAAU;IAClB,GAAG,EAAE,iBAAiB,CAAC;IACvB,OAAO,EAAE,MAAM,CAAC;IAChB,IAAI,EAAE,SAAS,GAAG,IAAI,CAAC;CACxB;AAED,UAAU,gBAAgB;IACxB,WAAW,EAAE,UAAU,EAAE,CAAC;IAC1B,aAAa,EAAE,GAAG,CAAC,iBAAiB,CAAC,CAAC;IACtC,cAAc,EAAE,CAAC,GAAG,EAAE,iBAAiB,KAAK,IAAI,CAAC;IACjD,UAAU,EAAE,OAAO,CAAC;IACpB,kBAAkB,EAAE,CAAC,KAAK,EAAE,OAAO,KAAK,IAAI,CAAC;CAC9C;AAED,wBAAgB,WAAW,CAAC,EAC1B,WAAW,EAAE,aAAa,EAAE,cAAc,EAC1C,UAAU,EAAE,kBAAkB,GAC/B,EAAE,gBAAgB,2CAwDlB"}
|
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
import { jsxs as r, jsx as e } from "react/jsx-runtime";
|
|
2
|
+
import { useTranslation as x } from "react-i18next";
|
|
3
|
+
import { Group as a, Text as s, Switch as f, Menu as i, ActionIcon as g } from "@mantine/core";
|
|
4
|
+
import { IconSettings as I, IconCheck as z } from "@tabler/icons-react";
|
|
5
|
+
import t from "../Notification.module.css.js";
|
|
6
|
+
function T({
|
|
7
|
+
sourceItems: p,
|
|
8
|
+
activeSources: c,
|
|
9
|
+
onToggleSource: d,
|
|
10
|
+
unreadOnly: m,
|
|
11
|
+
onUnreadOnlyChange: h
|
|
12
|
+
}) {
|
|
13
|
+
const { t: n } = x("appContainer"), w = c.size === 0;
|
|
14
|
+
return /* @__PURE__ */ r(a, { justify: "space-between", wrap: "nowrap", px: "md", py: "md", gap: "md", children: [
|
|
15
|
+
/* @__PURE__ */ e(s, { fw: 700, fz: 18, lh: 1.6, style: { whiteSpace: "nowrap" }, children: n("inbox.title") }),
|
|
16
|
+
/* @__PURE__ */ r(a, { gap: 10, wrap: "nowrap", align: "center", children: [
|
|
17
|
+
/* @__PURE__ */ r(a, { gap: 8, wrap: "nowrap", align: "center", children: [
|
|
18
|
+
/* @__PURE__ */ e(s, { fz: 14, lh: 1.45, c: "var(--mantine-color-text)", style: { whiteSpace: "nowrap" }, children: n("inbox.showUnread") }),
|
|
19
|
+
/* @__PURE__ */ e(
|
|
20
|
+
f,
|
|
21
|
+
{
|
|
22
|
+
size: "xs",
|
|
23
|
+
checked: m,
|
|
24
|
+
onChange: (o) => h(o.currentTarget.checked)
|
|
25
|
+
}
|
|
26
|
+
)
|
|
27
|
+
] }),
|
|
28
|
+
/* @__PURE__ */ r(
|
|
29
|
+
i,
|
|
30
|
+
{
|
|
31
|
+
position: "bottom-end",
|
|
32
|
+
shadow: "md",
|
|
33
|
+
withinPortal: !1,
|
|
34
|
+
closeOnItemClick: !1,
|
|
35
|
+
classNames: { dropdown: t.inboxMenu, item: t.inboxMenuItem, label: t.inboxMenuLabel },
|
|
36
|
+
children: [
|
|
37
|
+
/* @__PURE__ */ e(i.Target, { children: /* @__PURE__ */ e(
|
|
38
|
+
g,
|
|
39
|
+
{
|
|
40
|
+
variant: "subtle",
|
|
41
|
+
size: 28,
|
|
42
|
+
radius: "md",
|
|
43
|
+
color: "gray",
|
|
44
|
+
"aria-label": n("inbox.sources"),
|
|
45
|
+
children: /* @__PURE__ */ e(I, { size: 18, stroke: 1.5 })
|
|
46
|
+
}
|
|
47
|
+
) }),
|
|
48
|
+
/* @__PURE__ */ r(i.Dropdown, { w: 200, children: [
|
|
49
|
+
/* @__PURE__ */ e(i.Label, { children: n("inbox.sources") }),
|
|
50
|
+
p.map(({ key: o, i18nKey: b, icon: u }) => {
|
|
51
|
+
const l = w || c.has(o);
|
|
52
|
+
return /* @__PURE__ */ e(
|
|
53
|
+
i.Item,
|
|
54
|
+
{
|
|
55
|
+
leftSection: u,
|
|
56
|
+
rightSection: l ? /* @__PURE__ */ e(z, { size: 16, stroke: 1.75, color: "var(--mantine-color-indigo-5)" }) : null,
|
|
57
|
+
onClick: () => d(o),
|
|
58
|
+
className: l ? t.inboxMenuItemActive : void 0,
|
|
59
|
+
children: n(`inbox.sourceLabel.${b}`)
|
|
60
|
+
},
|
|
61
|
+
o
|
|
62
|
+
);
|
|
63
|
+
})
|
|
64
|
+
] })
|
|
65
|
+
]
|
|
66
|
+
}
|
|
67
|
+
)
|
|
68
|
+
] })
|
|
69
|
+
] });
|
|
70
|
+
}
|
|
71
|
+
export {
|
|
72
|
+
T as InboxHeader
|
|
73
|
+
};
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import type { ReactNode } from 'react';
|
|
2
|
+
import type { NotificationTab, UnreadCounts } from '../lib/types';
|
|
3
|
+
interface InboxTabsProps {
|
|
4
|
+
tab: NotificationTab;
|
|
5
|
+
onTabChange: (tab: NotificationTab) => void;
|
|
6
|
+
unreadCounts: UnreadCounts;
|
|
7
|
+
onMarkAllRead: () => void;
|
|
8
|
+
onArchiveAll: () => void;
|
|
9
|
+
onArchiveRead: () => void;
|
|
10
|
+
children: ReactNode;
|
|
11
|
+
isEmpty: boolean;
|
|
12
|
+
}
|
|
13
|
+
export declare function InboxTabs({ tab, onTabChange, unreadCounts, onMarkAllRead, onArchiveAll, onArchiveRead, children, isEmpty, }: InboxTabsProps): import("react/jsx-runtime").JSX.Element;
|
|
14
|
+
export {};
|
|
15
|
+
//# sourceMappingURL=InboxTabs.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"InboxTabs.d.ts","sourceRoot":"","sources":["../../../../src/components/Notification/molecules/InboxTabs.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAOvC,OAAO,KAAK,EAAE,eAAe,EAAE,YAAY,EAAE,MAAM,cAAc,CAAC;AAIlE,UAAU,cAAc;IACtB,GAAG,EAAE,eAAe,CAAC;IACrB,WAAW,EAAE,CAAC,GAAG,EAAE,eAAe,KAAK,IAAI,CAAC;IAC5C,YAAY,EAAE,YAAY,CAAC;IAC3B,aAAa,EAAE,MAAM,IAAI,CAAC;IAC1B,YAAY,EAAE,MAAM,IAAI,CAAC;IACzB,aAAa,EAAE,MAAM,IAAI,CAAC;IAC1B,QAAQ,EAAE,SAAS,CAAC;IACpB,OAAO,EAAE,OAAO,CAAC;CAClB;AAED,wBAAgB,SAAS,CAAC,EACxB,GAAG,EAAE,WAAW,EAAE,YAAY,EAC9B,aAAa,EAAE,YAAY,EAAE,aAAa,EAAE,QAAQ,EAAE,OAAO,GAC9D,EAAE,cAAc,2CA6ChB"}
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
import { jsx as e, jsxs as o } from "react/jsx-runtime";
|
|
2
|
+
import { useTranslation as I } from "react-i18next";
|
|
3
|
+
import { Tabs as a, Stack as c, Group as g, Box as k, Menu as n, ActionIcon as v } from "@mantine/core";
|
|
4
|
+
import { IconDotsVertical as T, IconChecks as N, IconArchive as m } from "@tabler/icons-react";
|
|
5
|
+
import { TabBadge as h } from "../atoms/TabBadge.js";
|
|
6
|
+
import i from "../Notification.module.css.js";
|
|
7
|
+
function z({
|
|
8
|
+
tab: r,
|
|
9
|
+
onTabChange: d,
|
|
10
|
+
unreadCounts: l,
|
|
11
|
+
onMarkAllRead: b,
|
|
12
|
+
onArchiveAll: p,
|
|
13
|
+
onArchiveRead: x,
|
|
14
|
+
children: f,
|
|
15
|
+
isEmpty: u
|
|
16
|
+
}) {
|
|
17
|
+
const { t } = I("appContainer");
|
|
18
|
+
return /* @__PURE__ */ e(
|
|
19
|
+
a,
|
|
20
|
+
{
|
|
21
|
+
value: r,
|
|
22
|
+
onChange: (s) => s && d(s),
|
|
23
|
+
variant: "pills",
|
|
24
|
+
classNames: { list: i.tabsList, tab: i.tab },
|
|
25
|
+
style: { flex: 1, minHeight: 0, display: "flex", flexDirection: "column" },
|
|
26
|
+
children: /* @__PURE__ */ o(c, { gap: 0, h: "100%", style: { minHeight: 0 }, children: [
|
|
27
|
+
/* @__PURE__ */ o(g, { justify: "space-between", wrap: "nowrap", gap: 0, px: "md", className: i.tabsBar, children: [
|
|
28
|
+
/* @__PURE__ */ o(a.List, { children: [
|
|
29
|
+
/* @__PURE__ */ e(a.Tab, { value: "ALL", rightSection: /* @__PURE__ */ e(h, { count: l.all, active: r === "ALL" }), children: t("inbox.tab.all") }),
|
|
30
|
+
/* @__PURE__ */ e(a.Tab, { value: "MENTIONS", rightSection: /* @__PURE__ */ e(h, { count: l.mentions, active: r === "MENTIONS" }), children: t("inbox.tab.mentions") }),
|
|
31
|
+
/* @__PURE__ */ e(k, { className: i.tabDivider }),
|
|
32
|
+
/* @__PURE__ */ e(a.Tab, { value: "ARCHIVE", children: t("inbox.tab.archive") })
|
|
33
|
+
] }),
|
|
34
|
+
/* @__PURE__ */ o(
|
|
35
|
+
n,
|
|
36
|
+
{
|
|
37
|
+
position: "bottom-end",
|
|
38
|
+
shadow: "md",
|
|
39
|
+
withinPortal: !1,
|
|
40
|
+
closeOnItemClick: !0,
|
|
41
|
+
classNames: { dropdown: i.inboxMenu, item: i.inboxMenuItem },
|
|
42
|
+
children: [
|
|
43
|
+
/* @__PURE__ */ e(n.Target, { children: /* @__PURE__ */ e(v, { variant: "subtle", size: 28, radius: "md", color: "gray", mt: 4, children: /* @__PURE__ */ e(T, { size: 20, stroke: 1.5 }) }) }),
|
|
44
|
+
/* @__PURE__ */ o(n.Dropdown, { w: 200, children: [
|
|
45
|
+
/* @__PURE__ */ e(n.Item, { leftSection: /* @__PURE__ */ e(N, { size: 16, stroke: 1.5 }), onClick: b, children: t("inbox.markAllRead") }),
|
|
46
|
+
/* @__PURE__ */ e(n.Item, { leftSection: /* @__PURE__ */ e(m, { size: 16, stroke: 1.5 }), onClick: p, children: t("inbox.archiveAll") }),
|
|
47
|
+
/* @__PURE__ */ e(n.Item, { leftSection: /* @__PURE__ */ e(m, { size: 16, stroke: 1.5 }), onClick: x, children: t("inbox.archiveRead") })
|
|
48
|
+
] })
|
|
49
|
+
]
|
|
50
|
+
}
|
|
51
|
+
)
|
|
52
|
+
] }),
|
|
53
|
+
/* @__PURE__ */ e(c, { gap: 0, style: { flex: 1, minHeight: 0, justifyContent: u ? "center" : "flex-start" }, className: i.shrink, children: f })
|
|
54
|
+
] })
|
|
55
|
+
}
|
|
56
|
+
);
|
|
57
|
+
}
|
|
58
|
+
export {
|
|
59
|
+
z as InboxTabs
|
|
60
|
+
};
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
interface NotificationActionsProps {
|
|
2
|
+
read: boolean;
|
|
3
|
+
archived: boolean;
|
|
4
|
+
onToggleRead: (e: React.MouseEvent) => void;
|
|
5
|
+
onToggleArchive: (e: React.MouseEvent) => void;
|
|
6
|
+
}
|
|
7
|
+
export declare function NotificationActions({ read, archived, onToggleRead, onToggleArchive, }: NotificationActionsProps): import("react/jsx-runtime").JSX.Element;
|
|
8
|
+
export {};
|
|
9
|
+
//# sourceMappingURL=NotificationActions.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"NotificationActions.d.ts","sourceRoot":"","sources":["../../../../src/components/Notification/molecules/NotificationActions.tsx"],"names":[],"mappings":"AASA,UAAU,wBAAwB;IAChC,IAAI,EAAE,OAAO,CAAC;IACd,QAAQ,EAAE,OAAO,CAAC;IAClB,YAAY,EAAE,CAAC,CAAC,EAAE,KAAK,CAAC,UAAU,KAAK,IAAI,CAAC;IAC5C,eAAe,EAAE,CAAC,CAAC,EAAE,KAAK,CAAC,UAAU,KAAK,IAAI,CAAC;CAChD;AAID,wBAAgB,mBAAmB,CAAC,EAClC,IAAI,EAAE,QAAQ,EAAE,YAAY,EAAE,eAAe,GAC9C,EAAE,wBAAwB,2CAwD1B"}
|
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
import { jsx as r, jsxs as m } from "react/jsx-runtime";
|
|
2
|
+
import { useTranslation as d } from "react-i18next";
|
|
3
|
+
import { UndoIcon as p } from "@hugeicons/core-free-icons";
|
|
4
|
+
import { HugeiconsIcon as h } from "@hugeicons/react";
|
|
5
|
+
import { Flex as l, Tooltip as o, ActionIcon as n } from "@mantine/core";
|
|
6
|
+
import { ArchiveIcon as b } from "../atoms/ArchiveIcon.js";
|
|
7
|
+
import { MarkReadIcon as u } from "../atoms/MarkReadIcon.js";
|
|
8
|
+
const a = "var(--mantine-color-gray-6)";
|
|
9
|
+
function C({
|
|
10
|
+
read: e,
|
|
11
|
+
archived: c,
|
|
12
|
+
onToggleRead: s,
|
|
13
|
+
onToggleArchive: t
|
|
14
|
+
}) {
|
|
15
|
+
const { t: i } = d("appContainer");
|
|
16
|
+
return c ? /* @__PURE__ */ r(l, { gap: 2, style: { flexShrink: 0 }, children: /* @__PURE__ */ r(o, { label: i("inbox.unarchive"), withArrow: !0, position: "top", children: /* @__PURE__ */ r(
|
|
17
|
+
n,
|
|
18
|
+
{
|
|
19
|
+
variant: "subtle",
|
|
20
|
+
size: 28,
|
|
21
|
+
radius: "md",
|
|
22
|
+
color: "gray",
|
|
23
|
+
onClick: t,
|
|
24
|
+
"aria-label": i("inbox.unarchive"),
|
|
25
|
+
children: /* @__PURE__ */ r(
|
|
26
|
+
h,
|
|
27
|
+
{
|
|
28
|
+
icon: p,
|
|
29
|
+
size: 20,
|
|
30
|
+
color: a,
|
|
31
|
+
strokeWidth: 1.5
|
|
32
|
+
}
|
|
33
|
+
)
|
|
34
|
+
}
|
|
35
|
+
) }) }) : /* @__PURE__ */ m(l, { gap: 2, style: { flexShrink: 0 }, children: [
|
|
36
|
+
/* @__PURE__ */ r(o, { label: i(e ? "inbox.markUnread" : "inbox.markRead"), withArrow: !0, position: "top", children: /* @__PURE__ */ r(
|
|
37
|
+
n,
|
|
38
|
+
{
|
|
39
|
+
variant: "subtle",
|
|
40
|
+
size: 28,
|
|
41
|
+
radius: "md",
|
|
42
|
+
color: "gray",
|
|
43
|
+
onClick: s,
|
|
44
|
+
"aria-label": i(e ? "inbox.markUnread" : "inbox.markRead"),
|
|
45
|
+
children: /* @__PURE__ */ r(u, { size: 20, color: a })
|
|
46
|
+
}
|
|
47
|
+
) }),
|
|
48
|
+
/* @__PURE__ */ r(o, { label: i("inbox.archive"), withArrow: !0, position: "top", children: /* @__PURE__ */ r(
|
|
49
|
+
n,
|
|
50
|
+
{
|
|
51
|
+
variant: "subtle",
|
|
52
|
+
size: 28,
|
|
53
|
+
radius: "md",
|
|
54
|
+
color: "gray",
|
|
55
|
+
onClick: t,
|
|
56
|
+
"aria-label": i("inbox.archive"),
|
|
57
|
+
children: /* @__PURE__ */ r(b, { size: 20, color: a })
|
|
58
|
+
}
|
|
59
|
+
) })
|
|
60
|
+
] });
|
|
61
|
+
}
|
|
62
|
+
export {
|
|
63
|
+
C as NotificationActions
|
|
64
|
+
};
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import type { NotificationVariant } from '../lib/types';
|
|
2
|
+
interface NotificationAvatarProps {
|
|
3
|
+
actorUserId: string | null;
|
|
4
|
+
actorName: string | null;
|
|
5
|
+
actorAvatarUrl: string | null;
|
|
6
|
+
variant: NotificationVariant;
|
|
7
|
+
notificationType: string | null;
|
|
8
|
+
fallbackUser: {
|
|
9
|
+
id: string;
|
|
10
|
+
avatar: string | null;
|
|
11
|
+
name: string | null;
|
|
12
|
+
} | null;
|
|
13
|
+
unread?: boolean;
|
|
14
|
+
}
|
|
15
|
+
export declare function NotificationAvatar({ actorUserId, actorName, actorAvatarUrl, variant, notificationType, fallbackUser, unread, }: NotificationAvatarProps): import("react/jsx-runtime").JSX.Element;
|
|
16
|
+
export {};
|
|
17
|
+
//# sourceMappingURL=NotificationAvatar.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"NotificationAvatar.d.ts","sourceRoot":"","sources":["../../../../src/components/Notification/molecules/NotificationAvatar.tsx"],"names":[],"mappings":"AAgBA,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,cAAc,CAAC;AAExD,UAAU,uBAAuB;IAC/B,WAAW,EAAE,MAAM,GAAG,IAAI,CAAC;IAC3B,SAAS,EAAE,MAAM,GAAG,IAAI,CAAC;IACzB,cAAc,EAAE,MAAM,GAAG,IAAI,CAAC;IAC9B,OAAO,EAAE,mBAAmB,CAAC;IAC7B,gBAAgB,EAAE,MAAM,GAAG,IAAI,CAAC;IAChC,YAAY,EAAE;QAAE,EAAE,EAAE,MAAM,CAAC;QAAC,MAAM,EAAE,MAAM,GAAG,IAAI,CAAC;QAAC,IAAI,EAAE,MAAM,GAAG,IAAI,CAAA;KAAE,GAAG,IAAI,CAAC;IAChF,MAAM,CAAC,EAAE,OAAO,CAAC;CAClB;AAaD,wBAAgB,kBAAkB,CAAC,EACjC,WAAW,EAAE,SAAS,EAAE,cAAc,EAAE,OAAO,EAAE,gBAAgB,EAAE,YAAY,EAAE,MAAM,GACxF,EAAE,uBAAuB,2CAuBzB"}
|
|
@@ -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"}
|