@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.
Files changed (232) hide show
  1. package/dist/assets/default-workspace-avatar.jpg.js +1 -1
  2. package/dist/components/AliasTextInput/AliasTextInput.d.ts.map +1 -1
  3. package/dist/components/AliasTextInput/AliasTextInput.js +32 -32
  4. package/dist/components/AppContainer/AppContainer.d.ts +1 -1
  5. package/dist/components/AppContainer/AppContainer.d.ts.map +1 -1
  6. package/dist/components/AppContainer/AppContainer.js +82 -70
  7. package/dist/components/AppContainer/AppContainer.module.css.js +20 -10
  8. package/dist/components/AppContainer/components/AppsSidebar/DesktopUpdateButton.d.ts +6 -0
  9. package/dist/components/AppContainer/components/AppsSidebar/DesktopUpdateButton.d.ts.map +1 -0
  10. package/dist/components/AppContainer/components/AppsSidebar/DesktopUpdateButton.js +161 -0
  11. package/dist/components/AppContainer/components/AppsSidebar/TopSection.d.ts.map +1 -1
  12. package/dist/components/AppContainer/components/AppsSidebar/TopSection.js +77 -49
  13. package/dist/components/AppContainer/components/AppsSidebar/UserSection.d.ts.map +1 -1
  14. package/dist/components/AppContainer/components/AppsSidebar/UserSection.js +238 -105
  15. package/dist/components/AppContainer/components/Main.js +4 -4
  16. package/dist/components/AppContainer/components/NavbarContent.d.ts.map +1 -1
  17. package/dist/components/AppContainer/components/NavbarContent.js +16 -2
  18. package/dist/components/AppContainer/components/SlideAnimation.js +4 -4
  19. package/dist/components/AppContainer/components/ToolSidebar.d.ts +5 -0
  20. package/dist/components/AppContainer/components/ToolSidebar.d.ts.map +1 -1
  21. package/dist/components/AppContainer/components/ToolSidebar.js +51 -39
  22. package/dist/components/AppContainer/components/menus/HelpMenu/HelpMenu.d.ts +62 -1
  23. package/dist/components/AppContainer/components/menus/HelpMenu/HelpMenu.d.ts.map +1 -1
  24. package/dist/components/AppContainer/components/menus/HelpMenu/HelpMenu.js +1107 -137
  25. package/dist/components/AppContainer/components/menus/HelpMenu/HelpMenu.module.css.js +158 -6
  26. package/dist/components/AppContainer/types.d.ts +12 -0
  27. package/dist/components/AppContainer/types.d.ts.map +1 -1
  28. package/dist/components/AttachmentsPreview/AttachmentsPreview.d.ts +3 -1
  29. package/dist/components/AttachmentsPreview/AttachmentsPreview.d.ts.map +1 -1
  30. package/dist/components/AttachmentsPreview/AttachmentsPreview.js +237 -93
  31. package/dist/components/AttachmentsPreview/AttachmentsPreview.module.css.js +18 -16
  32. package/dist/components/Chat/ChatInput/index.d.ts +13 -1
  33. package/dist/components/Chat/ChatInput/index.d.ts.map +1 -1
  34. package/dist/components/Chat/ChatInput/index.js +264 -164
  35. package/dist/components/Chat/ChatInput/useVoiceRecorder.d.ts +16 -0
  36. package/dist/components/Chat/ChatInput/useVoiceRecorder.d.ts.map +1 -0
  37. package/dist/components/Chat/ChatInput/useVoiceRecorder.js +83 -0
  38. package/dist/components/Chat/ChatMessage/ChatMessage.module.css.js +20 -16
  39. package/dist/components/Chat/ChatMessage/index.d.ts +16 -0
  40. package/dist/components/Chat/ChatMessage/index.d.ts.map +1 -1
  41. package/dist/components/Chat/ChatMessage/index.js +153 -118
  42. package/dist/components/Chat/MessageActions/index.d.ts +2 -0
  43. package/dist/components/Chat/MessageActions/index.d.ts.map +1 -1
  44. package/dist/components/Chat/MessageActions/index.js +189 -50
  45. package/dist/components/Chat/MessageAuthor/index.d.ts +7 -1
  46. package/dist/components/Chat/MessageAuthor/index.d.ts.map +1 -1
  47. package/dist/components/Chat/MessageAuthor/index.js +39 -25
  48. package/dist/components/Chat/MessageList/MessageList.module.css.js +14 -12
  49. package/dist/components/Chat/MessageList/index.d.ts +17 -25
  50. package/dist/components/Chat/MessageList/index.d.ts.map +1 -1
  51. package/dist/components/Chat/MessageList/index.js +201 -149
  52. package/dist/components/Chat/MessageMeta/index.d.ts.map +1 -1
  53. package/dist/components/Chat/MessageMeta/index.js +21 -19
  54. package/dist/components/ColorPicker/ColorPicker.d.ts +3 -0
  55. package/dist/components/ColorPicker/ColorPicker.d.ts.map +1 -1
  56. package/dist/components/ColorPicker/ColorPicker.js +81 -76
  57. package/dist/components/ColorPicker/ColorPickerToolbar.d.ts +1 -0
  58. package/dist/components/ColorPicker/ColorPickerToolbar.d.ts.map +1 -1
  59. package/dist/components/ColorPicker/ColorPickerToolbar.js +97 -91
  60. package/dist/components/CommentComposer/CommentEditorHotkeys.d.ts +2 -1
  61. package/dist/components/CommentComposer/CommentEditorHotkeys.d.ts.map +1 -1
  62. package/dist/components/CommentComposer/CommentEditorHotkeys.js +29 -26
  63. package/dist/components/CommentComposer/index.d.ts +1 -1
  64. package/dist/components/CommentComposer/index.d.ts.map +1 -1
  65. package/dist/components/CommentComposer/index.js +70 -68
  66. package/dist/components/CommentComposer/types.d.ts +6 -0
  67. package/dist/components/CommentComposer/types.d.ts.map +1 -1
  68. package/dist/components/CustomKBD/index.js +21 -22
  69. package/dist/components/EmojiPicker/EmojiPicker.d.ts +1 -0
  70. package/dist/components/EmojiPicker/EmojiPicker.d.ts.map +1 -1
  71. package/dist/components/EmojiPicker/EmojiPicker.js +129 -121
  72. package/dist/components/EntityTitle/EntityTitle.d.ts +3 -4
  73. package/dist/components/EntityTitle/EntityTitle.d.ts.map +1 -1
  74. package/dist/components/EntityTitle/EntityTitle.js +81 -80
  75. package/dist/components/FormViewer/helpers/conditions.d.ts.map +1 -1
  76. package/dist/components/FormViewer/helpers/conditions.js +33 -17
  77. package/dist/components/IntegrationFlowAnimation/IntegrationFlowAnimation.d.ts +3 -1
  78. package/dist/components/IntegrationFlowAnimation/IntegrationFlowAnimation.d.ts.map +1 -1
  79. package/dist/components/IntegrationFlowAnimation/IntegrationFlowAnimation.js +26 -25
  80. package/dist/components/NewToolbar/utils.d.ts +12 -0
  81. package/dist/components/NewToolbar/utils.d.ts.map +1 -0
  82. package/dist/components/Notification/InfiniteScroll.d.ts +12 -0
  83. package/dist/components/Notification/InfiniteScroll.d.ts.map +1 -0
  84. package/dist/components/Notification/InfiniteScroll.js +42 -0
  85. package/dist/components/Notification/Notification.d.ts +4 -1
  86. package/dist/components/Notification/Notification.d.ts.map +1 -1
  87. package/dist/components/Notification/Notification.module.css.js +28 -4
  88. package/dist/components/Notification/atoms/ActionBadge.d.ts +11 -0
  89. package/dist/components/Notification/atoms/ActionBadge.d.ts.map +1 -0
  90. package/dist/components/Notification/atoms/ActionBadge.js +53 -0
  91. package/dist/components/Notification/atoms/ArchiveIcon.d.ts +7 -0
  92. package/dist/components/Notification/atoms/ArchiveIcon.d.ts.map +1 -0
  93. package/dist/components/Notification/atoms/ArchiveIcon.js +40 -0
  94. package/dist/components/Notification/atoms/InboxIcon.d.ts +7 -0
  95. package/dist/components/Notification/atoms/InboxIcon.d.ts.map +1 -0
  96. package/dist/components/Notification/atoms/InboxIcon.js +33 -0
  97. package/dist/components/Notification/atoms/MarkReadIcon.d.ts +7 -0
  98. package/dist/components/Notification/atoms/MarkReadIcon.d.ts.map +1 -0
  99. package/dist/components/Notification/atoms/MarkReadIcon.js +33 -0
  100. package/dist/components/Notification/atoms/ResourceIcon.d.ts +7 -0
  101. package/dist/components/Notification/atoms/ResourceIcon.d.ts.map +1 -0
  102. package/dist/components/Notification/atoms/TabBadge.d.ts +7 -0
  103. package/dist/components/Notification/atoms/TabBadge.d.ts.map +1 -0
  104. package/dist/components/Notification/atoms/TabBadge.js +32 -0
  105. package/dist/components/Notification/atoms/UnreadDot.d.ts +6 -0
  106. package/dist/components/Notification/atoms/UnreadDot.d.ts.map +1 -0
  107. package/dist/components/Notification/atoms/UnreadDot.js +23 -0
  108. package/dist/components/Notification/atoms/index.d.ts +5 -0
  109. package/dist/components/Notification/atoms/index.d.ts.map +1 -0
  110. package/dist/components/Notification/hooks/index.d.ts +8 -0
  111. package/dist/components/Notification/hooks/index.d.ts.map +1 -0
  112. package/dist/components/Notification/hooks/useInboxActions.d.ts +12 -0
  113. package/dist/components/Notification/hooks/useInboxActions.d.ts.map +1 -0
  114. package/dist/components/Notification/hooks/useInboxActions.js +58 -0
  115. package/dist/components/Notification/hooks/useInboxLoader.d.ts +8 -0
  116. package/dist/components/Notification/hooks/useInboxLoader.d.ts.map +1 -0
  117. package/dist/components/Notification/hooks/useInboxLoader.js +49 -0
  118. package/dist/components/Notification/hooks/useNotificationItem.d.ts +26 -0
  119. package/dist/components/Notification/hooks/useNotificationItem.d.ts.map +1 -0
  120. package/dist/components/Notification/hooks/useNotificationItem.js +51 -0
  121. package/dist/components/Notification/hooks/useNotificationStore.d.ts +49 -0
  122. package/dist/components/Notification/hooks/useNotificationStore.d.ts.map +1 -0
  123. package/dist/components/Notification/hooks/useNotificationStore.js +139 -0
  124. package/dist/components/Notification/hooks/useNotificationStream.d.ts +2 -0
  125. package/dist/components/Notification/hooks/useNotificationStream.d.ts.map +1 -0
  126. package/dist/components/Notification/hooks/useNotificationStream.js +86 -0
  127. package/dist/components/Notification/hooks/useNotificationTime.d.ts +2 -0
  128. package/dist/components/Notification/hooks/useNotificationTime.d.ts.map +1 -0
  129. package/dist/components/Notification/hooks/useNotificationTime.js +23 -0
  130. package/dist/components/Notification/hooks/useNotificationsApi.d.ts +25 -0
  131. package/dist/components/Notification/hooks/useNotificationsApi.d.ts.map +1 -0
  132. package/dist/components/Notification/hooks/useNotificationsApi.js +64 -0
  133. package/dist/components/Notification/lib/api.d.ts +4 -0
  134. package/dist/components/Notification/lib/api.d.ts.map +1 -0
  135. package/dist/components/Notification/lib/api.js +19 -0
  136. package/dist/components/Notification/lib/index.d.ts +5 -0
  137. package/dist/components/Notification/lib/index.d.ts.map +1 -0
  138. package/dist/components/Notification/lib/notificationText.d.ts +10 -0
  139. package/dist/components/Notification/lib/notificationText.d.ts.map +1 -0
  140. package/dist/components/Notification/lib/notificationText.js +131 -0
  141. package/dist/components/Notification/lib/stripHtml.d.ts +2 -0
  142. package/dist/components/Notification/lib/stripHtml.d.ts.map +1 -0
  143. package/dist/components/Notification/lib/stripHtml.js +6 -0
  144. package/dist/components/Notification/lib/types.d.ts +45 -0
  145. package/dist/components/Notification/lib/types.d.ts.map +1 -0
  146. package/dist/components/Notification/lib/types.js +9 -0
  147. package/dist/components/Notification/molecules/InboxEmpty.d.ts +8 -0
  148. package/dist/components/Notification/molecules/InboxEmpty.d.ts.map +1 -0
  149. package/dist/components/Notification/molecules/InboxEmpty.js +21 -0
  150. package/dist/components/Notification/molecules/InboxHeader.d.ts +17 -0
  151. package/dist/components/Notification/molecules/InboxHeader.d.ts.map +1 -0
  152. package/dist/components/Notification/molecules/InboxHeader.js +73 -0
  153. package/dist/components/Notification/molecules/InboxTabs.d.ts +15 -0
  154. package/dist/components/Notification/molecules/InboxTabs.d.ts.map +1 -0
  155. package/dist/components/Notification/molecules/InboxTabs.js +60 -0
  156. package/dist/components/Notification/molecules/NotificationActions.d.ts +9 -0
  157. package/dist/components/Notification/molecules/NotificationActions.d.ts.map +1 -0
  158. package/dist/components/Notification/molecules/NotificationActions.js +64 -0
  159. package/dist/components/Notification/molecules/NotificationAvatar.d.ts +17 -0
  160. package/dist/components/Notification/molecules/NotificationAvatar.d.ts.map +1 -0
  161. package/dist/components/Notification/molecules/NotificationAvatar.js +38 -0
  162. package/dist/components/Notification/molecules/NotificationContent.d.ts +22 -0
  163. package/dist/components/Notification/molecules/NotificationContent.d.ts.map +1 -0
  164. package/dist/components/Notification/molecules/NotificationContent.js +183 -0
  165. package/dist/components/Notification/molecules/index.d.ts +7 -0
  166. package/dist/components/Notification/molecules/index.d.ts.map +1 -0
  167. package/dist/components/Notification/organisms/InboxItem.d.ts +14 -0
  168. package/dist/components/Notification/organisms/InboxItem.d.ts.map +1 -0
  169. package/dist/components/Notification/organisms/InboxItem.js +100 -0
  170. package/dist/components/Notification/organisms/InboxPanel.d.ts +4 -0
  171. package/dist/components/Notification/organisms/InboxPanel.d.ts.map +1 -0
  172. package/dist/components/Notification/organisms/InboxPanel.js +99 -0
  173. package/dist/components/Notification/organisms/index.d.ts +3 -0
  174. package/dist/components/Notification/organisms/index.d.ts.map +1 -0
  175. package/dist/components/OnboardingTour/index.d.ts +1 -1
  176. package/dist/components/OnboardingTour/index.d.ts.map +1 -1
  177. package/dist/components/OnboardingTour/useOnboardingTour.d.ts +2 -0
  178. package/dist/components/OnboardingTour/useOnboardingTour.d.ts.map +1 -1
  179. package/dist/components/OnboardingTour/useOnboardingTour.js +63 -51
  180. package/dist/components/modals/RemoveConfirmModal.d.ts.map +1 -1
  181. package/dist/components/modals/RemoveConfirmModal.js +27 -26
  182. package/dist/config/brand.d.ts.map +1 -1
  183. package/dist/config/brand.js +29 -29
  184. package/dist/config/envConfig.d.ts +4 -0
  185. package/dist/config/envConfig.d.ts.map +1 -1
  186. package/dist/config/envConfig.js +29 -28
  187. package/dist/helpers/getFileIcons.js +5 -5
  188. package/dist/helpers/getFileType.d.ts.map +1 -1
  189. package/dist/helpers/getFileType.js +11 -2
  190. package/dist/helpers/platform.d.ts +1 -1
  191. package/dist/helpers/platform.d.ts.map +1 -1
  192. package/dist/helpers/platform.js +1 -0
  193. package/dist/helpers/showNotifications.d.ts +8 -14
  194. package/dist/helpers/showNotifications.d.ts.map +1 -1
  195. package/dist/helpers/showNotifications.js +107 -111
  196. package/dist/helpers/showNotifications.module.css.js +4 -16
  197. package/dist/hooks/useDateUtils.d.ts.map +1 -1
  198. package/dist/hooks/useDateUtils.js +19 -23
  199. package/dist/index.css +1 -1
  200. package/dist/index.js +576 -573
  201. package/dist/node_modules/@gfazioli/mantine-audio/dist/esm/Audio.context.js +15 -0
  202. package/dist/node_modules/@gfazioli/mantine-audio/dist/esm/Audio.js +228 -0
  203. package/dist/node_modules/@gfazioli/mantine-audio/dist/esm/Audio.module.css.js +4 -0
  204. package/dist/node_modules/@gfazioli/mantine-audio/dist/esm/components/AudioControls.js +19 -0
  205. package/dist/node_modules/@gfazioli/mantine-audio/dist/esm/components/AudioMuteButton.js +30 -0
  206. package/dist/node_modules/@gfazioli/mantine-audio/dist/esm/components/AudioPlayButton.js +40 -0
  207. package/dist/node_modules/@gfazioli/mantine-audio/dist/esm/components/AudioSkipButton.js +28 -0
  208. package/dist/node_modules/@gfazioli/mantine-audio/dist/esm/components/AudioSpectrum.js +137 -0
  209. package/dist/node_modules/@gfazioli/mantine-audio/dist/esm/components/AudioSpeedControl.js +31 -0
  210. package/dist/node_modules/@gfazioli/mantine-audio/dist/esm/components/AudioTimeDisplay.js +44 -0
  211. package/dist/node_modules/@gfazioli/mantine-audio/dist/esm/components/AudioTimeline.js +71 -0
  212. package/dist/node_modules/@gfazioli/mantine-audio/dist/esm/components/AudioVolumeSlider.js +43 -0
  213. package/dist/node_modules/@gfazioli/mantine-audio/dist/esm/components/AudioWaveform.js +166 -0
  214. package/dist/node_modules/@gfazioli/mantine-audio/dist/esm/use-audio.js +201 -0
  215. package/dist/node_modules/@gfazioli/mantine-video/dist/esm/Video.context.js +15 -0
  216. package/dist/node_modules/@gfazioli/mantine-video/dist/esm/Video.js +272 -0
  217. package/dist/node_modules/@gfazioli/mantine-video/dist/esm/Video.module.css.js +4 -0
  218. package/dist/node_modules/@gfazioli/mantine-video/dist/esm/components/VideoCaptionsButton.js +55 -0
  219. package/dist/node_modules/@gfazioli/mantine-video/dist/esm/components/VideoControls.js +30 -0
  220. package/dist/node_modules/@gfazioli/mantine-video/dist/esm/components/VideoFullscreenButton.js +31 -0
  221. package/dist/node_modules/@gfazioli/mantine-video/dist/esm/components/VideoMuteButton.js +29 -0
  222. package/dist/node_modules/@gfazioli/mantine-video/dist/esm/components/VideoPiPButton.js +29 -0
  223. package/dist/node_modules/@gfazioli/mantine-video/dist/esm/components/VideoPlayButton.js +28 -0
  224. package/dist/node_modules/@gfazioli/mantine-video/dist/esm/components/VideoSkipButton.js +27 -0
  225. package/dist/node_modules/@gfazioli/mantine-video/dist/esm/components/VideoTimeDisplay.js +44 -0
  226. package/dist/node_modules/@gfazioli/mantine-video/dist/esm/components/VideoTimeline.js +70 -0
  227. package/dist/node_modules/@gfazioli/mantine-video/dist/esm/use-video.js +170 -0
  228. package/package.json +5 -3
  229. package/dist/components/Notification/Notification.js +0 -119
  230. package/dist/components/Notification/NotificationCard.d.ts +0 -10
  231. package/dist/components/Notification/NotificationCard.d.ts.map +0 -1
  232. package/dist/components/Notification/NotificationCard.js +0 -93
@@ -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,4 @@
1
+ export declare function InboxPanel({ onNavigate }?: {
2
+ onNavigate?: () => void;
3
+ }): import("react/jsx-runtime").JSX.Element;
4
+ //# sourceMappingURL=InboxPanel.d.ts.map
@@ -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,3 @@
1
+ export { InboxItem } from './InboxItem';
2
+ export { InboxPanel } from './InboxPanel';
3
+ //# sourceMappingURL=index.d.ts.map
@@ -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,4 +1,4 @@
1
1
  export { OnboardingTourWrapper } from './OnboardingTourWrapper';
2
2
  export type { OnboardingTourWrapperProps } from './OnboardingTourWrapper';
3
- export { useOnboardingTour, isOnboardingCompleted, resetOnboarding, getSavedStepIndex, saveStepIndex, clearSavedStep, setOnboardingUserId, } from './useOnboardingTour';
3
+ export { useOnboardingTour, isOnboardingCompleted, resetOnboarding, getSavedStepIndex, saveStepIndex, clearSavedStep, setOnboardingUserId, suppressOnboarding, } from './useOnboardingTour';
4
4
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/OnboardingTour/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,qBAAqB,EAAE,MAAM,yBAAyB,CAAC;AAChE,YAAY,EAAE,0BAA0B,EAAE,MAAM,yBAAyB,CAAC;AAC1E,OAAO,EACL,iBAAiB,EACjB,qBAAqB,EACrB,eAAe,EACf,iBAAiB,EACjB,aAAa,EACb,cAAc,EACd,mBAAmB,GACpB,MAAM,qBAAqB,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/OnboardingTour/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,qBAAqB,EAAE,MAAM,yBAAyB,CAAC;AAChE,YAAY,EAAE,0BAA0B,EAAE,MAAM,yBAAyB,CAAC;AAC1E,OAAO,EACL,iBAAiB,EACjB,qBAAqB,EACrB,eAAe,EACf,iBAAiB,EACjB,aAAa,EACb,cAAc,EACd,mBAAmB,EACnB,kBAAkB,GACnB,MAAM,qBAAqB,CAAC"}
@@ -1,3 +1,5 @@
1
+ export declare const suppressOnboarding: (value: boolean) => void;
2
+ export declare const isOnboardingSuppressed: () => boolean;
1
3
  export declare const setOnboardingUserId: (userId: string | null) => void;
2
4
  export declare const isOnboardingCompleted: (featureKey: string) => boolean;
3
5
  export declare const resetOnboarding: (featureKey: string) => void;
@@ -1 +1 @@
1
- {"version":3,"file":"useOnboardingTour.d.ts","sourceRoot":"","sources":["../../../src/components/OnboardingTour/useOnboardingTour.ts"],"names":[],"mappings":"AASA,eAAO,MAAM,mBAAmB,GAAI,QAAQ,MAAM,GAAG,IAAI,KAAG,IAE3D,CAAC;AA4CF,eAAO,MAAM,qBAAqB,GAAI,YAAY,MAAM,KAAG,OAE1D,CAAC;AAEF,eAAO,MAAM,eAAe,GAAI,YAAY,MAAM,KAAG,IAUpD,CAAC;AAEF,eAAO,MAAM,iBAAiB,GAAI,YAAY,MAAM,KAAG,MAAM,GAAG,SAI/D,CAAC;AAEF,eAAO,MAAM,aAAa,GAAI,YAAY,MAAM,EAAE,WAAW,MAAM,KAAG,IAIrE,CAAC;AAEF,eAAO,MAAM,cAAc,GAAI,YAAY,MAAM,KAAG,IAInD,CAAC;AAEF,UAAU,wBAAwB;IAChC,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAED,UAAU,uBAAuB;IAC/B,OAAO,EAAE,OAAO,CAAC;IACjB,SAAS,EAAE,OAAO,CAAC;IACnB,KAAK,EAAE,MAAM,IAAI,CAAC;IAClB,QAAQ,EAAE,MAAM,IAAI,CAAC;CACtB;AAED,eAAO,MAAM,iBAAiB,GAC5B,YAAY,MAAM,EAClB,UAAU,wBAAwB,KACjC,uBAyDF,CAAC"}
1
+ {"version":3,"file":"useOnboardingTour.d.ts","sourceRoot":"","sources":["../../../src/components/OnboardingTour/useOnboardingTour.ts"],"names":[],"mappings":"AAUA,eAAO,MAAM,kBAAkB,GAAI,OAAO,OAAO,KAAG,IAKnD,CAAC;AAEF,eAAO,MAAM,sBAAsB,QAAO,OAAsB,CAAC;AAIjE,eAAO,MAAM,mBAAmB,GAAI,QAAQ,MAAM,GAAG,IAAI,KAAG,IAE3D,CAAC;AA4CF,eAAO,MAAM,qBAAqB,GAAI,YAAY,MAAM,KAAG,OAE1D,CAAC;AAEF,eAAO,MAAM,eAAe,GAAI,YAAY,MAAM,KAAG,IAUpD,CAAC;AAEF,eAAO,MAAM,iBAAiB,GAAI,YAAY,MAAM,KAAG,MAAM,GAAG,SAI/D,CAAC;AAEF,eAAO,MAAM,aAAa,GAAI,YAAY,MAAM,EAAE,WAAW,MAAM,KAAG,IAIrE,CAAC;AAEF,eAAO,MAAM,cAAc,GAAI,YAAY,MAAM,KAAG,IAInD,CAAC;AAEF,UAAU,wBAAwB;IAChC,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAED,UAAU,uBAAuB;IAC/B,OAAO,EAAE,OAAO,CAAC;IACjB,SAAS,EAAE,OAAO,CAAC;IACnB,KAAK,EAAE,MAAM,IAAI,CAAC;IAClB,QAAQ,EAAE,MAAM,IAAI,CAAC;CACtB;AAED,eAAO,MAAM,iBAAiB,GAC5B,YAAY,MAAM,EAClB,UAAU,wBAAwB,KACjC,uBAmEF,CAAC"}
@@ -1,79 +1,91 @@
1
- import { useState as O, useEffect as M, useCallback as b } from "react";
2
- const m = "onboarding-completed", u = "onboarding-step", E = "onboarding-completed", S = "onboarding-reset";
1
+ import { useState as E, useEffect as u, useCallback as M } from "react";
2
+ const S = "onboarding-completed", m = "onboarding-step", w = "onboarding-completed", g = "onboarding-reset", v = "onboarding-suppressed";
3
+ let _ = !1;
4
+ const D = (t) => {
5
+ _ = t, window.dispatchEvent(
6
+ new CustomEvent(v, { detail: t })
7
+ );
8
+ };
3
9
  let o = null;
4
- const R = (t) => {
10
+ const G = (t) => {
5
11
  o = t;
6
- }, d = (t) => {
12
+ }, c = (t) => {
7
13
  try {
8
14
  return JSON.parse(localStorage.getItem(t) || "{}");
9
15
  } catch {
10
16
  return {};
11
17
  }
12
- }, g = () => o ? d(m)[o] ?? {} : {}, I = (t) => {
18
+ }, O = () => o ? c(S)[o] ?? {} : {}, I = (t) => {
13
19
  if (o)
14
20
  try {
15
- const e = d(m);
16
- e[o] = t, localStorage.setItem(m, JSON.stringify(e));
21
+ const e = c(S);
22
+ e[o] = t, localStorage.setItem(S, JSON.stringify(e));
17
23
  } catch {
18
24
  }
19
- }, a = () => o ? d(u)[o] ?? {} : {}, w = (t) => {
25
+ }, i = () => o ? c(m)[o] ?? {} : {}, b = (t) => {
20
26
  if (o)
21
27
  try {
22
- const e = d(u);
23
- e[o] = t, localStorage.setItem(u, JSON.stringify(e));
28
+ const e = c(m);
29
+ e[o] = t, localStorage.setItem(m, JSON.stringify(e));
24
30
  } catch {
25
31
  return;
26
32
  }
27
- }, c = (t) => !!g()[t], L = (t) => {
28
- const e = g();
33
+ }, a = (t) => !!O()[t], P = (t) => {
34
+ const e = O();
29
35
  delete e[t], I(e);
30
- const n = a();
31
- delete n[t], w(n), window.dispatchEvent(
32
- new CustomEvent(S, { detail: t })
36
+ const n = i();
37
+ delete n[t], b(n), window.dispatchEvent(
38
+ new CustomEvent(g, { detail: t })
33
39
  );
34
- }, f = (t) => {
35
- const n = a()[t];
40
+ }, x = (t) => {
41
+ const n = i()[t];
36
42
  return typeof n == "number" ? n : void 0;
37
- }, A = (t, e) => {
38
- const n = a();
39
- n[t] = e, w(n);
40
- }, _ = (t) => {
41
- const e = a();
42
- delete e[t], w(e);
43
- }, G = (t, e) => {
44
- const { dependsOn: n } = e ?? {}, [i, v] = O(
45
- () => c(t)
46
- ), [p, r] = O(
47
- () => !c(t) && (n ? c(n) : !0)
43
+ }, B = (t, e) => {
44
+ const n = i();
45
+ n[t] = e, b(n);
46
+ }, f = (t) => {
47
+ const e = i();
48
+ delete e[t], b(e);
49
+ }, J = (t, e) => {
50
+ const { dependsOn: n } = e ?? {}, [h, C] = E(_), [p, N] = E(
51
+ () => a(t)
52
+ ), [l, d] = E(
53
+ () => !a(t) && (n ? a(n) : !0)
48
54
  );
49
- M(() => {
50
- if (i || !n || p) return;
51
- const s = (l) => {
52
- l.detail === n && !c(t) && r(!0);
55
+ u(() => {
56
+ const s = (r) => {
57
+ C(r.detail);
58
+ };
59
+ return window.addEventListener(v, s), () => window.removeEventListener(v, s);
60
+ }, []), u(() => {
61
+ if (p || !n || l) return;
62
+ const s = (r) => {
63
+ r.detail === n && !a(t) && d(!0);
53
64
  };
54
- return window.addEventListener(E, s), () => window.removeEventListener(E, s);
55
- }, [n, i, p, t]), M(() => {
56
- const s = (l) => {
57
- l.detail === t && (v(!1), r(!0));
65
+ return window.addEventListener(w, s), () => window.removeEventListener(w, s);
66
+ }, [n, p, l, t]), u(() => {
67
+ const s = (r) => {
68
+ r.detail === t && (N(!1), d(!0));
58
69
  };
59
- return window.addEventListener(S, s), () => window.removeEventListener(S, s);
70
+ return window.addEventListener(g, s), () => window.removeEventListener(g, s);
60
71
  }, [t]);
61
- const N = b(() => {
62
- const s = g();
63
- s[t] = !0, I(s), _(t), v(!0), r(!1), window.dispatchEvent(
64
- new CustomEvent(E, { detail: t })
72
+ const T = M(() => {
73
+ const s = O();
74
+ s[t] = !0, I(s), f(t), N(!0), d(!1), window.dispatchEvent(
75
+ new CustomEvent(w, { detail: t })
65
76
  );
66
- }, [t]), C = b(() => {
67
- r(!0);
77
+ }, [t]), R = M(() => {
78
+ d(!0);
68
79
  }, []);
69
- return { started: p, completed: i, start: C, complete: N };
80
+ return { started: l && !h, completed: p, start: R, complete: T };
70
81
  };
71
82
  export {
72
- _ as clearSavedStep,
73
- f as getSavedStepIndex,
74
- c as isOnboardingCompleted,
75
- L as resetOnboarding,
76
- A as saveStepIndex,
77
- R as setOnboardingUserId,
78
- G as useOnboardingTour
83
+ f as clearSavedStep,
84
+ x as getSavedStepIndex,
85
+ a as isOnboardingCompleted,
86
+ P as resetOnboarding,
87
+ B as saveStepIndex,
88
+ G as setOnboardingUserId,
89
+ D as suppressOnboarding,
90
+ J as useOnboardingTour
79
91
  };
@@ -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;AAEzC,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
+ {"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"}