@layers-app/shared 0.4.3 → 0.4.5

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 (142) hide show
  1. package/dist/components/AppContainer/components/SidebarToggleButton.d.ts.map +1 -1
  2. package/dist/components/AppContainer/components/SidebarToggleButton.js +25 -16
  3. package/dist/components/AttachmentsGalleryModal/components/GallerySlide.d.ts.map +1 -1
  4. package/dist/components/AttachmentsGalleryModal/components/GallerySlide.js +33 -33
  5. package/dist/components/AttachmentsGalleryModal/components/ShakePlayer/ShakaPlayer.d.ts.map +1 -1
  6. package/dist/components/AttachmentsGalleryModal/components/ShakePlayer/ShakaPlayer.js +54 -36
  7. package/dist/components/AttachmentsGalleryModal/components/ShakePlayer/ShakaPlayer.module.css.js +4 -4
  8. package/dist/components/AttachmentsGalleryModal/components/ShakePlayer/useShakePlayer.d.ts +2 -0
  9. package/dist/components/AttachmentsGalleryModal/components/ShakePlayer/useShakePlayer.d.ts.map +1 -1
  10. package/dist/components/AttachmentsGalleryModal/components/ShakePlayer/useShakePlayer.js +82 -41
  11. package/dist/components/AttachmentsPreview/AttachmentsPreview.d.ts.map +1 -1
  12. package/dist/components/AttachmentsPreview/AttachmentsPreview.js +11 -12
  13. package/dist/components/Chat/CallMessage/CallMessage.module.css.js +15 -0
  14. package/dist/components/Chat/CallMessage/index.d.ts +21 -0
  15. package/dist/components/Chat/CallMessage/index.d.ts.map +1 -0
  16. package/dist/components/Chat/CallMessage/index.js +49 -0
  17. package/dist/components/Chat/ChatBubble/ChatBubble.module.css.js +9 -0
  18. package/dist/components/Chat/ChatBubble/index.d.ts +14 -0
  19. package/dist/components/Chat/ChatBubble/index.d.ts.map +1 -0
  20. package/dist/components/Chat/ChatBubble/index.js +32 -0
  21. package/dist/components/Chat/ChatHeader/ChatHeader.module.css.js +17 -0
  22. package/dist/components/Chat/ChatHeader/index.d.ts +42 -0
  23. package/dist/components/Chat/ChatHeader/index.d.ts.map +1 -0
  24. package/dist/components/Chat/ChatHeader/index.js +78 -0
  25. package/dist/components/Chat/ChatInput/ChatInput.module.css.js +37 -0
  26. package/dist/components/Chat/ChatInput/index.d.ts +46 -0
  27. package/dist/components/Chat/ChatInput/index.d.ts.map +1 -0
  28. package/dist/components/Chat/ChatInput/index.js +228 -0
  29. package/dist/components/Chat/ChatLayout/ChatLayout.module.css.js +15 -0
  30. package/dist/components/Chat/ChatLayout/index.d.ts +17 -0
  31. package/dist/components/Chat/ChatLayout/index.d.ts.map +1 -0
  32. package/dist/components/Chat/ChatLayout/index.js +43 -0
  33. package/dist/components/Chat/ChatMessage/ChatMessage.module.css.js +21 -0
  34. package/dist/components/Chat/ChatMessage/index.d.ts +45 -0
  35. package/dist/components/Chat/ChatMessage/index.d.ts.map +1 -0
  36. package/dist/components/Chat/ChatMessage/index.js +188 -0
  37. package/dist/components/Chat/ChatPill/ChatPill.module.css.js +11 -0
  38. package/dist/components/Chat/ChatPill/index.d.ts +12 -0
  39. package/dist/components/Chat/ChatPill/index.d.ts.map +1 -0
  40. package/dist/components/Chat/ChatPill/index.js +21 -0
  41. package/dist/components/Chat/DayMeta/index.d.ts +11 -0
  42. package/dist/components/Chat/DayMeta/index.d.ts.map +1 -0
  43. package/dist/components/Chat/DayMeta/index.js +9 -0
  44. package/dist/components/Chat/DialogItem/DialogItem.module.css.js +17 -0
  45. package/dist/components/Chat/DialogItem/index.d.ts +41 -0
  46. package/dist/components/Chat/DialogItem/index.d.ts.map +1 -0
  47. package/dist/components/Chat/DialogItem/index.js +107 -0
  48. package/dist/components/Chat/DialogList/DialogList.module.css.js +7 -0
  49. package/dist/components/Chat/DialogList/index.d.ts +11 -0
  50. package/dist/components/Chat/DialogList/index.d.ts.map +1 -0
  51. package/dist/components/Chat/DialogList/index.js +19 -0
  52. package/dist/components/Chat/MediaDocument/MediaDocument.module.css.js +13 -0
  53. package/dist/components/Chat/MediaDocument/index.d.ts +15 -0
  54. package/dist/components/Chat/MediaDocument/index.d.ts.map +1 -0
  55. package/dist/components/Chat/MediaDocument/index.js +73 -0
  56. package/dist/components/Chat/MessageActions/MessageActions.module.css.js +7 -0
  57. package/dist/components/Chat/MessageActions/index.d.ts +16 -0
  58. package/dist/components/Chat/MessageActions/index.d.ts.map +1 -0
  59. package/dist/components/Chat/MessageActions/index.js +65 -0
  60. package/dist/components/Chat/MessageAuthor/index.d.ts +20 -0
  61. package/dist/components/Chat/MessageAuthor/index.d.ts.map +1 -0
  62. package/dist/components/Chat/MessageAuthor/index.js +36 -0
  63. package/dist/components/Chat/MessageForward/MessageForward.module.css.js +7 -0
  64. package/dist/components/Chat/MessageForward/index.d.ts +13 -0
  65. package/dist/components/Chat/MessageForward/index.d.ts.map +1 -0
  66. package/dist/components/Chat/MessageForward/index.js +30 -0
  67. package/dist/components/Chat/MessageList/MessageList.module.css.js +17 -0
  68. package/dist/components/Chat/MessageList/index.d.ts +12 -0
  69. package/dist/components/Chat/MessageList/index.d.ts.map +1 -0
  70. package/dist/components/Chat/MessageList/index.js +71 -0
  71. package/dist/components/Chat/MessageMeta/MessageMeta.module.css.js +13 -0
  72. package/dist/components/Chat/MessageMeta/index.d.ts +16 -0
  73. package/dist/components/Chat/MessageMeta/index.d.ts.map +1 -0
  74. package/dist/components/Chat/MessageMeta/index.js +33 -0
  75. package/dist/components/Chat/MessageReactions/MessageReactions.module.css.js +15 -0
  76. package/dist/components/Chat/MessageReactions/index.d.ts +15 -0
  77. package/dist/components/Chat/MessageReactions/index.d.ts.map +1 -0
  78. package/dist/components/Chat/MessageReactions/index.js +40 -0
  79. package/dist/components/Chat/MessageReply/MessageReply.module.css.js +15 -0
  80. package/dist/components/Chat/MessageReply/index.d.ts +15 -0
  81. package/dist/components/Chat/MessageReply/index.d.ts.map +1 -0
  82. package/dist/components/Chat/MessageReply/index.js +40 -0
  83. package/dist/components/Chat/MessageStatus/MessageStatus.module.css.js +9 -0
  84. package/dist/components/Chat/MessageStatus/index.d.ts +14 -0
  85. package/dist/components/Chat/MessageStatus/index.d.ts.map +1 -0
  86. package/dist/components/Chat/MessageStatus/index.js +53 -0
  87. package/dist/components/Chat/ServiceMessage/ServiceMessage.module.css.js +11 -0
  88. package/dist/components/Chat/ServiceMessage/index.d.ts +13 -0
  89. package/dist/components/Chat/ServiceMessage/index.d.ts.map +1 -0
  90. package/dist/components/Chat/ServiceMessage/index.js +21 -0
  91. package/dist/components/Chat/UnreadSeparator/index.d.ts +11 -0
  92. package/dist/components/Chat/UnreadSeparator/index.d.ts.map +1 -0
  93. package/dist/components/Chat/UnreadSeparator/index.js +13 -0
  94. package/dist/components/Chat/colors.d.ts +7 -0
  95. package/dist/components/Chat/colors.d.ts.map +1 -0
  96. package/dist/components/Chat/colors.js +30 -0
  97. package/dist/components/Chat/icons.d.ts +9 -0
  98. package/dist/components/Chat/icons.d.ts.map +1 -0
  99. package/dist/components/Chat/icons.js +49 -0
  100. package/dist/components/Chat/index.d.ts +24 -0
  101. package/dist/components/Chat/index.d.ts.map +1 -0
  102. package/dist/components/Chat/mock-data.d.ts +32 -0
  103. package/dist/components/Chat/mock-data.d.ts.map +1 -0
  104. package/dist/components/Chat/types.d.ts +159 -0
  105. package/dist/components/Chat/types.d.ts.map +1 -0
  106. package/dist/components/CommentComposer/CommentComposer.module.css.js +4 -4
  107. package/dist/components/CommentComposer/index.d.ts.map +1 -1
  108. package/dist/components/CommentComposer/index.js +53 -54
  109. package/dist/components/CommentComposer/types.js +9 -0
  110. package/dist/components/EmojiPicker/EmojiPicker.d.ts +8 -1
  111. package/dist/components/EmojiPicker/EmojiPicker.d.ts.map +1 -1
  112. package/dist/components/EmojiPicker/EmojiPicker.js +53 -50
  113. package/dist/components/EntityIcon.d.ts.map +1 -1
  114. package/dist/components/EntityIcon.js +36 -27
  115. package/dist/components/FilePicker/FilePicker.d.ts.map +1 -1
  116. package/dist/components/FilePicker/FilePicker.js +135 -161
  117. package/dist/components/FilePicker/FilePicker.module.css.js +8 -12
  118. package/dist/components/FilePicker/FilePickerGallery.js +13 -13
  119. package/dist/components/FilePicker/FilePickerGiphy.js +4 -4
  120. package/dist/components/FilePicker/FilePickerGoogleDrive.js +3 -3
  121. package/dist/components/FilePicker/FilePickerUnsplash.js +18 -18
  122. package/dist/components/FilePicker/FilePickerUpload.d.ts.map +1 -1
  123. package/dist/components/FilePicker/FilePickerUpload.js +55 -47
  124. package/dist/components/MusicPlayerBar/MusicPlayerBar.module.css.js +42 -42
  125. package/dist/components/MusicPlayerBar/components/VolumePopover.d.ts.map +1 -1
  126. package/dist/components/MusicPlayerBar/components/VolumePopover.js +22 -20
  127. package/dist/components/PillTabs/PillTabs.d.ts +19 -0
  128. package/dist/components/PillTabs/PillTabs.d.ts.map +1 -0
  129. package/dist/components/PillTabs/PillTabs.js +50 -0
  130. package/dist/components/PillTabs/PillTabs.module.css.js +11 -0
  131. package/dist/components/modals/RemoveConfirmModal.js +1 -1
  132. package/dist/hooks/useOfficePreviewAvailable.d.ts +2 -0
  133. package/dist/hooks/useOfficePreviewAvailable.d.ts.map +1 -0
  134. package/dist/hooks/useOfficePreviewAvailable.js +20 -0
  135. package/dist/index.css +1 -1
  136. package/dist/index.d.ts +4 -0
  137. package/dist/index.d.ts.map +1 -1
  138. package/dist/index.js +573 -520
  139. package/dist/lang/locales/ui_en.json.js +5 -5
  140. package/dist/lang/locales/ui_es.json.js +1 -1
  141. package/dist/lang/locales/ui_ru.json.js +1 -1
  142. package/package.json +6 -3
@@ -1,22 +1,22 @@
1
1
  import { jsx as n } from "react/jsx-runtime";
2
- import { StarIcon as p, File01Icon as u, Folder02Icon as h, Folder01Icon as y } from "@hugeicons/core-free-icons";
3
- import { HugeiconsIcon as i } from "@hugeicons/react";
4
- import { Text as s, Box as g, Avatar as I, useMantineTheme as v, parseThemeColor as C } from "@mantine/core";
5
- import z from "../assets/enitityIcons/flow.svg.js";
6
- import F from "../assets/enitityIcons/form.svg.js";
7
- import O from "../assets/enitityIcons/page.svg.js";
8
- import E from "../assets/enitityIcons/sprint.svg.js";
2
+ import { StarIcon as p, UserIcon as u, File01Icon as h, Folder02Icon as y, Folder01Icon as I } from "@hugeicons/core-free-icons";
3
+ import { HugeiconsIcon as c } from "@hugeicons/react";
4
+ import { Text as s, Box as g, Avatar as v, useMantineTheme as z, parseThemeColor as C } from "@mantine/core";
5
+ import F from "../assets/enitityIcons/flow.svg.js";
6
+ import O from "../assets/enitityIcons/form.svg.js";
7
+ import E from "../assets/enitityIcons/page.svg.js";
8
+ import S from "../assets/enitityIcons/sprint.svg.js";
9
9
  import { DEFAULT_VALUES as a } from "../constants.js";
10
- import { IconEntity as c, ProjectIcon as l, renderIcon as S } from "./ProjectIcon/ProjectIcon.js";
11
- const f = (o) => !!o && a.COLORS.includes(o), R = (o) => o.type === "FOLDER" || o.isFolder || o.type === "PROJECT" && o?.pathById?.findIndex((r) => r === o?.parentId) === 1, _ = ({
10
+ import { IconEntity as i, ProjectIcon as l, renderIcon as R } from "./ProjectIcon/ProjectIcon.js";
11
+ const f = (o) => !!o && a.COLORS.includes(o), T = (o) => o.type === "FOLDER" || o.isFolder || o.type === "PROJECT" && o?.pathById?.findIndex((r) => r === o?.parentId) === 1, D = ({
12
12
  item: o
13
13
  }) => {
14
14
  const r = o?.size || 16;
15
15
  if (!o) return null;
16
- if (R(o)) {
16
+ if (T(o)) {
17
17
  if (o.title === "_system.favorites")
18
18
  return /* @__PURE__ */ n(
19
- i,
19
+ c,
20
20
  {
21
21
  icon: p,
22
22
  size: r,
@@ -24,11 +24,20 @@ const f = (o) => !!o && a.COLORS.includes(o), R = (o) => o.type === "FOLDER" ||
24
24
  fill: "var(--mantine-color-yellow-5)"
25
25
  }
26
26
  );
27
- const e = c.parse(o.icon), t = f(e?.color) ? e.color : a.FOLDER_COLOR;
28
- return /* @__PURE__ */ n(T, { color: t, size: r, opened: o.isOpen });
27
+ if (o.title === "_system.shared")
28
+ return /* @__PURE__ */ n(
29
+ c,
30
+ {
31
+ icon: u,
32
+ size: r,
33
+ color: "var(--mantine-color-blue-5)"
34
+ }
35
+ );
36
+ const e = i.parse(o.icon), t = f(e?.color) ? e.color : a.FOLDER_COLOR;
37
+ return /* @__PURE__ */ n(m, { color: t, size: r, opened: o.isOpen });
29
38
  }
30
39
  if (o.type === "ATTACHMENT")
31
- return /* @__PURE__ */ n(i, { icon: u, size: r });
40
+ return /* @__PURE__ */ n(c, { icon: h, size: r });
32
41
  if (o.type === "PAGE")
33
42
  return /* @__PURE__ */ n(
34
43
  l,
@@ -36,7 +45,7 @@ const f = (o) => !!o && a.COLORS.includes(o), R = (o) => o.type === "FOLDER" ||
36
45
  fallbackColor: o.icon ? void 0 : "var(--default-page-icon-color)",
37
46
  name: o.title,
38
47
  icon: o.icon,
39
- fallback: /* @__PURE__ */ n(O, { width: r, height: r })
48
+ fallback: /* @__PURE__ */ n(E, { width: r, height: r })
40
49
  }
41
50
  );
42
51
  if (o.type === "FORM")
@@ -45,7 +54,7 @@ const f = (o) => !!o && a.COLORS.includes(o), R = (o) => o.type === "FOLDER" ||
45
54
  {
46
55
  fallbackColor: "var(--default-form-icon-color)",
47
56
  icon: o.icon,
48
- fallback: /* @__PURE__ */ n(F, { width: r, height: r })
57
+ fallback: /* @__PURE__ */ n(O, { width: r, height: r })
49
58
  }
50
59
  );
51
60
  if (o.type === "FLOW")
@@ -54,11 +63,11 @@ const f = (o) => !!o && a.COLORS.includes(o), R = (o) => o.type === "FOLDER" ||
54
63
  {
55
64
  icon: o.icon,
56
65
  fallbackColor: "var(--default-flow-icon-color)",
57
- fallback: /* @__PURE__ */ n(z, { width: r, height: r })
66
+ fallback: /* @__PURE__ */ n(F, { width: r, height: r })
58
67
  }
59
68
  );
60
69
  if (o.type === "SPRINT") {
61
- const e = c.parse(o.icon), t = f(e?.color) ? e.color : a.SPRINT_COLOR;
70
+ const e = i.parse(o.icon), t = f(e?.color) ? e.color : a.SPRINT_COLOR;
62
71
  return /* @__PURE__ */ n(
63
72
  s,
64
73
  {
@@ -71,12 +80,12 @@ const f = (o) => !!o && a.COLORS.includes(o), R = (o) => o.type === "FOLDER" ||
71
80
  lineHeight: "normal",
72
81
  width: r + 4
73
82
  },
74
- children: /* @__PURE__ */ n(E, {})
83
+ children: /* @__PURE__ */ n(S, {})
75
84
  }
76
85
  );
77
86
  }
78
87
  if (o.type === "PROJECT") {
79
- const e = c.parse(o.icon);
88
+ const e = i.parse(o.icon);
80
89
  return e?.emoji ? /* @__PURE__ */ n(
81
90
  g,
82
91
  {
@@ -100,7 +109,7 @@ const f = (o) => !!o && a.COLORS.includes(o), R = (o) => o.type === "FOLDER" ||
100
109
  )
101
110
  }
102
111
  ) : /* @__PURE__ */ n(
103
- I,
112
+ v,
104
113
  {
105
114
  variant: "filled",
106
115
  radius: 4,
@@ -120,31 +129,31 @@ const f = (o) => !!o && a.COLORS.includes(o), R = (o) => o.type === "FOLDER" ||
120
129
  justifyContent: "center",
121
130
  lineHeight: "normal"
122
131
  },
123
- children: S(e, void 0, !0, o.title)
132
+ children: R(e, void 0, !0, o.title)
124
133
  }
125
134
  )
126
135
  }
127
136
  );
128
137
  }
129
138
  return null;
130
- }, T = ({
139
+ }, m = ({
131
140
  color: o,
132
141
  size: r,
133
142
  opened: e
134
143
  }) => {
135
- const t = v(), d = C({
144
+ const t = z(), d = C({
136
145
  color: o || "gray",
137
146
  theme: t
138
147
  });
139
148
  return /* @__PURE__ */ n(
140
- i,
149
+ c,
141
150
  {
142
151
  color: d.value || void 0,
143
- icon: e ? h : y,
152
+ icon: e ? y : I,
144
153
  size: r
145
154
  }
146
155
  );
147
156
  };
148
157
  export {
149
- _ as EntityIcon
158
+ D as EntityIcon
150
159
  };
@@ -1 +1 @@
1
- {"version":3,"file":"FilePicker.d.ts","sourceRoot":"","sources":["../../../src/components/FilePicker/FilePicker.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,iBAAiB,EAA8C,MAAM,OAAO,CAAC;AAItF,OAAO,EAAiB,KAAK,cAAc,EAAE,MAAM,kBAAkB,CAAC;AACtE,OAAO,EAAiC,SAAS,EAAE,g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CAAA;SAAE,EACpD,IAAI,EAAE,CAAC,GAAG,EAAE,MAAM,KAAK,IAAI,KACxB,IAAI,CAAC;QACV,KAAK,EAAE,MAAM,GAAG,IAAI,CAAC;KACtB,CAAC;IACF,YAAY,CAAC,EAAE;QACb,KAAK,EAAE,SAAS,EAAE,CAAC;QACnB,SAAS,CAAC,EAAE,OAAO,CAAC;QACpB,WAAW,CAAC,EAAE,cAAc,EAAE,CAAC;QAC/B,aAAa,CAAC,EAAE,CAAC,MAAM,EAAE,SAAS,KAAK,IAAI,CAAC;QAC5C,iBAAiB,CAAC,EAAE,CAAC,KAAK,EAAE,cAAc,EAAE,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;QACnE,QAAQ,CAAC,EAAE,CAAC,IAAI,EAAE,SAAS,KAAK,IAAI,CAAC;KACtC,CAAC;IACF,MAAM,CAAC,EAAE,OAAO,CAAC;IACjB,GAAG,CAAC,EAAE,OAAO,GAAG,MAAM,CAAC;IACvB,UAAU,CAAC,EAAE,cAAc,CAAC;CAC7B,CAAC,CAAC;AAEH,eAAO,MAAM,UAAU,GAAI,sUAyBxB,iBAAiB,CAAC,eAAe,CAAC,4CA8SpC,CAAC"}
@@ -1,23 +1,23 @@
1
- import { jsx as e, jsxs as d } from "react/jsx-runtime";
2
- import { useState as E, useMemo as u, useEffect as le } from "react";
3
- import { useTranslation as ie } from "react-i18next";
4
- import { ImageAdd02Icon as V } from "@hugeicons/core-free-icons";
5
- import { HugeiconsIcon as j } from "@hugeicons/react";
6
- import { Flex as r, ActionIcon as re, Button as A, Text as ae, Tabs as x, Box as oe, Popover as F, Stack as se } from "@mantine/core";
7
- import { getEnvConfig as L } from "../../config/envConfig.js";
8
- import { isFeature as te } from "../../helpers/feature.js";
9
- import { useMenu as ce } from "../../hooks/useMenu.js";
10
- import { usePlatform as de } from "../../hooks/usePlatform.js";
11
- import { MediaLibraryBrowser as ue } from "../MediaLibrary/MediaLibraryBrowser.js";
12
- import { FilePickerGallery as he } from "./FilePickerGallery.js";
13
- import { FilePickerGiphy as pe } from "./FilePickerGiphy.js";
1
+ import { jsx as e, jsxs as v } from "react/jsx-runtime";
2
+ import { useState as T, useMemo as d, useEffect as ee } from "react";
3
+ import { useTranslation as ne } from "react-i18next";
4
+ import { ImageAdd02Icon as B } from "@hugeicons/core-free-icons";
5
+ import { HugeiconsIcon as E } from "@hugeicons/react";
6
+ import { Flex as s, ActionIcon as le, Button as V, Text as ie, Box as re, Popover as P, Stack as ae } from "@mantine/core";
7
+ import { getEnvConfig as A } from "../../config/envConfig.js";
8
+ import { isFeature as oe } from "../../helpers/feature.js";
9
+ import { useMenu as te } from "../../hooks/useMenu.js";
10
+ import { usePlatform as se } from "../../hooks/usePlatform.js";
11
+ import { MediaLibraryBrowser as ce } from "../MediaLibrary/MediaLibraryBrowser.js";
12
+ import { PillTabs as de } from "../PillTabs/PillTabs.js";
13
+ import { FilePickerGallery as ue } from "./FilePickerGallery.js";
14
+ import { FilePickerGiphy as he } from "./FilePickerGiphy.js";
14
15
  import { FilePickerLink as me } from "./FilePickerLink.js";
15
- import { FilePickerUnsplash as fe } from "./FilePickerUnsplash.js";
16
- import { FilePickerGoogleDrive as ge } from "./FilePickerGoogleDrive.js";
17
- import { FilePickerUpload as ve } from "./FilePickerUpload.js";
18
- import { coverCollections as be } from "./coverCollections.js";
19
- import w from "./FilePicker.module.css.js";
20
- const Ce = [
16
+ import { FilePickerUnsplash as pe } from "./FilePickerUnsplash.js";
17
+ import { FilePickerGoogleDrive as fe } from "./FilePickerGoogleDrive.js";
18
+ import { FilePickerUpload as ge } from "./FilePickerUpload.js";
19
+ import { coverCollections as ve } from "./coverCollections.js";
20
+ const be = [
21
21
  "gallery",
22
22
  "upload",
23
23
  "link",
@@ -25,120 +25,120 @@ const Ce = [
25
25
  "giphy",
26
26
  "googleDrive",
27
27
  "media"
28
- ], He = ({
29
- onChange: N,
30
- onRemove: U,
28
+ ], Oe = ({
29
+ onChange: j,
30
+ onRemove: L,
31
31
  onUpload: b,
32
- uploading: _ = !1,
33
- showTabs: o = Ce,
34
- children: H,
35
- width: O = 610,
36
- position: R = "bottom-end",
37
- readOnly: $ = !1,
38
- hasImage: q,
39
- giphyToken: ke,
40
- unsplashClientId: ye,
32
+ uploading: U = !1,
33
+ showTabs: a = be,
34
+ children: _,
35
+ width: H = 610,
36
+ position: O = "bottom-end",
37
+ readOnly: X = !1,
38
+ hasImage: $,
39
+ giphyToken: Ce,
40
+ unsplashClientId: ke,
41
41
  type: S = "image",
42
- galleryCollection: h = [],
43
- isValidMediaUrl: J,
44
- popoverProps: K,
45
- dropZoneProps: Q,
46
- targetProps: W,
47
- onOpenedChange: X,
42
+ galleryCollection: u = [],
43
+ isValidMediaUrl: q,
44
+ popoverProps: w,
45
+ dropZoneProps: J,
46
+ targetProps: K,
47
+ onOpenedChange: N,
48
48
  googleDrive: l,
49
- mediaLibrary: a,
50
- inline: p = !1,
49
+ mediaLibrary: r,
50
+ inline: h = !1,
51
51
  tab: C,
52
- uploadIcon: Y
52
+ uploadIcon: Q
53
53
  }) => {
54
- const { t: i } = ie("ui"), [T, m] = E(!1), { isMobile: I } = ce(), M = de(), f = u(() => h.length > 0 ? h : p ? be.map((n) => ({
54
+ const { t: i } = ne("ui"), [x, m] = T(!1), { isMobile: y } = te(), I = se(), p = d(() => u.length > 0 ? u : h ? ve.map((n) => ({
55
55
  ...n,
56
56
  title: i(`coverGroups.${n.id}`, { defaultValue: n.id })
57
- })) : h, [h, p, i]), s = u(() => [
57
+ })) : u, [u, h, i]), o = d(() => [
58
58
  {
59
59
  value: "gallery",
60
- label: /* @__PURE__ */ e(r, { children: /* @__PURE__ */ e("span", { children: i("changeCover.gallery") }) }),
61
- visible: o.includes("gallery") && !!f.length
60
+ label: /* @__PURE__ */ e(s, { children: /* @__PURE__ */ e("span", { children: i("changeCover.gallery") }) }),
61
+ visible: a.includes("gallery") && !!p.length
62
62
  },
63
63
  {
64
64
  value: "upload",
65
- label: /* @__PURE__ */ e(r, { children: /* @__PURE__ */ e("span", { children: i("changeCover.upload") }) }),
66
- visible: o.includes("upload") && !!b
65
+ label: /* @__PURE__ */ e(s, { children: /* @__PURE__ */ e("span", { children: i("changeCover.upload") }) }),
66
+ visible: a.includes("upload") && !!b
67
67
  },
68
68
  {
69
69
  value: "link",
70
- label: /* @__PURE__ */ e(r, { children: /* @__PURE__ */ e("span", { children: i("changeCover.link") }) }),
71
- visible: o.includes("link")
70
+ label: /* @__PURE__ */ e(s, { children: /* @__PURE__ */ e("span", { children: i("changeCover.link") }) }),
71
+ visible: a.includes("link")
72
72
  },
73
73
  {
74
74
  value: "unsplash",
75
- label: /* @__PURE__ */ e(r, { children: /* @__PURE__ */ e("span", { children: i("changeCover.searchImages") }) }),
76
- visible: o.includes("unsplash") && L().media?.unsplashEnabled !== !1
75
+ label: /* @__PURE__ */ e(s, { children: /* @__PURE__ */ e("span", { children: i("changeCover.searchImages") }) }),
76
+ visible: a.includes("unsplash") && A().media?.unsplashEnabled !== !1
77
77
  },
78
78
  {
79
79
  value: "giphy",
80
- label: /* @__PURE__ */ e(r, { children: /* @__PURE__ */ e("span", { children: "GIFs" }) }),
81
- visible: o.includes("giphy") && M.has("giphy") && L().media?.giphyEnabled !== !1
80
+ label: /* @__PURE__ */ e(s, { children: /* @__PURE__ */ e("span", { children: "GIFs" }) }),
81
+ visible: a.includes("giphy") && I.has("giphy") && A().media?.giphyEnabled !== !1
82
82
  },
83
83
  {
84
84
  value: "googleDrive",
85
- label: /* @__PURE__ */ e(r, { children: /* @__PURE__ */ e("span", { children: i("changeCover.googleDrive", {
85
+ label: /* @__PURE__ */ e(s, { children: /* @__PURE__ */ e("span", { children: i("changeCover.googleDrive", {
86
86
  defaultValue: "Google Drive"
87
87
  }) }) }),
88
- visible: o.includes("googleDrive") && !!l
88
+ visible: a.includes("googleDrive") && !!l
89
89
  },
90
90
  {
91
91
  value: "media",
92
- label: /* @__PURE__ */ e(r, { children: /* @__PURE__ */ e("span", { children: i("changeCover.media", { defaultValue: "Media" }) }) }),
93
- visible: o.includes("media") && !!a && te()
92
+ label: /* @__PURE__ */ e(s, { children: /* @__PURE__ */ e("span", { children: i("changeCover.media", { defaultValue: "Media" }) }) }),
93
+ visible: a.includes("media") && !!r && oe()
94
94
  }
95
- ].filter((y) => y.visible), [
96
- o,
97
- M,
95
+ ].filter((F) => F.visible), [
96
+ a,
97
+ I,
98
98
  i,
99
- f.length,
99
+ p.length,
100
100
  b,
101
101
  l,
102
- a
103
- ]), g = C !== void 0, [Z, P] = E(() => C !== void 0 ? "" : s[0]?.value ?? "");
104
- le(() => {
105
- g || s.length && P((n) => n && s.some((y) => y.value === n) ? n : s[0].value);
106
- }, [s, g]);
107
- const k = u(() => s.map((n) => n.value), [s]), v = g ? C : Z, t = u(() => v && k.includes(v) ? v : k[0] ?? "", [v, k]), z = (n) => {
108
- g || P(n);
109
- }, D = (n) => {
102
+ r
103
+ ]), f = C !== void 0, [R, M] = T(() => C !== void 0 ? "" : o[0]?.value ?? "");
104
+ ee(() => {
105
+ f || o.length && M((n) => n && o.some((F) => F.value === n) ? n : o[0].value);
106
+ }, [o, f]);
107
+ const k = d(() => o.map((n) => n.value), [o]), g = f ? C : R, t = d(() => g && k.includes(g) ? g : k[0] ?? "", [g, k]), W = (n) => {
108
+ f || M(n);
109
+ }, Y = (n) => {
110
110
  b?.(n, m);
111
111
  }, c = (n) => {
112
- N?.(n), p || m(!1);
113
- }, ee = u(() => I ? /* @__PURE__ */ d(re, { size: "lg", children: [
114
- /* @__PURE__ */ e(j, { icon: V, size: 22 }),
112
+ j?.(n), h || m(!1);
113
+ }, Z = d(() => y ? /* @__PURE__ */ v(le, { size: "lg", children: [
114
+ /* @__PURE__ */ e(E, { icon: B, size: 22 }),
115
115
  " "
116
116
  ] }) : /* @__PURE__ */ e(
117
- A,
117
+ V,
118
118
  {
119
119
  variant: "default",
120
120
  size: "xs",
121
- leftSection: /* @__PURE__ */ e(j, { icon: V, size: 16 }),
122
- children: /* @__PURE__ */ e(ae, { fw: 600, size: "sm", children: i("changeCover.change") })
121
+ leftSection: /* @__PURE__ */ e(E, { icon: B, size: 16 }),
122
+ children: /* @__PURE__ */ e(ie, { fw: 600, size: "sm", children: i("changeCover.change") })
123
123
  }
124
- ), [i, I]), G = (n) => {
125
- m(n), X?.(n);
126
- }, B = /* @__PURE__ */ d(se, { gap: 0, px: 8, pb: 8, pt: "sm", children: [
127
- t === "gallery" && !!f.length && /* @__PURE__ */ e(
128
- he,
124
+ ), [i, y]), z = (n) => {
125
+ m(n), N?.(n);
126
+ }, G = /* @__PURE__ */ v(ae, { gap: 0, px: 8, pb: 8, pt: "sm", children: [
127
+ t === "gallery" && !!p.length && /* @__PURE__ */ e(
128
+ ue,
129
129
  {
130
- galleryCollection: f,
130
+ galleryCollection: p,
131
131
  onChange: c
132
132
  }
133
133
  ),
134
134
  t === "upload" && /* @__PURE__ */ e(
135
- ve,
135
+ ge,
136
136
  {
137
137
  type: S || "image",
138
- uploading: _,
139
- dropZoneProps: Q,
140
- onUpload: D,
141
- icon: Y
138
+ uploading: U,
139
+ dropZoneProps: J,
140
+ onUpload: Y,
141
+ icon: Q
142
142
  }
143
143
  ),
144
144
  t === "link" && /* @__PURE__ */ e(
@@ -146,13 +146,13 @@ const Ce = [
146
146
  {
147
147
  type: S || "image",
148
148
  onChange: c,
149
- isValidMediaUrl: J
149
+ isValidMediaUrl: q
150
150
  }
151
151
  ),
152
- t === "unsplash" && /* @__PURE__ */ e(fe, { onChange: c }),
153
- t === "giphy" && /* @__PURE__ */ e(pe, { onChange: c }),
152
+ t === "unsplash" && /* @__PURE__ */ e(pe, { onChange: c }),
153
+ t === "giphy" && /* @__PURE__ */ e(he, { onChange: c }),
154
154
  t === "googleDrive" && l && /* @__PURE__ */ e(
155
- ge,
155
+ fe,
156
156
  {
157
157
  isConnected: l.isConnected,
158
158
  connectedEmail: l.connectedEmail,
@@ -168,104 +168,78 @@ const Ce = [
168
168
  error: l.error
169
169
  }
170
170
  ),
171
- t === "media" && a && /* @__PURE__ */ e(
172
- ue,
171
+ t === "media" && r && /* @__PURE__ */ e(
172
+ ce,
173
173
  {
174
- items: a.items,
175
- isLoading: a.isLoading,
176
- breadcrumbs: a.breadcrumbs,
177
- onFolderClick: a.onFolderClick,
178
- onBreadcrumbClick: a.onBreadcrumbClick,
174
+ items: r.items,
175
+ isLoading: r.isLoading,
176
+ breadcrumbs: r.breadcrumbs,
177
+ onFolderClick: r.onFolderClick,
178
+ onBreadcrumbClick: r.onBreadcrumbClick,
179
179
  onSelect: (n) => {
180
- a.onSelect?.(n), m(!1);
180
+ r.onSelect?.(n), m(!1);
181
181
  }
182
182
  }
183
183
  )
184
- ] }), ne = /* @__PURE__ */ e(r, { justify: "space-between", align: "center", children: /* @__PURE__ */ e(
185
- x,
184
+ ] }), D = /* @__PURE__ */ e(
185
+ de,
186
186
  {
187
- defaultValue: "gallery",
188
187
  value: t,
189
- onChange: (n) => n && z(n),
190
- styles: {
191
- list: {
192
- alignItems: "center",
193
- paddingRight: "var(--mantine-spacing-xs)"
194
- }
195
- },
196
- w: "100%",
197
- children: /* @__PURE__ */ d(
198
- x.List,
188
+ onChange: (n) => W(n),
189
+ height: 54,
190
+ pillPaddingX: 12,
191
+ items: o.map((n) => ({
192
+ value: n.value,
193
+ label: n.label,
194
+ disabled: X
195
+ })),
196
+ rightSlot: $ && /* @__PURE__ */ e(
197
+ V,
199
198
  {
200
- style: {
201
- gap: "4px"
202
- },
203
- px: 8,
204
- h: 54,
205
- children: [
206
- s.map((n) => /* @__PURE__ */ e(
207
- x.Tab,
208
- {
209
- className: w.originalTab,
210
- disabled: $,
211
- h: "100%",
212
- p: 0,
213
- value: n.value,
214
- onClick: () => z(n.value),
215
- children: /* @__PURE__ */ e(r, { className: w.customTab, px: "sm", h: 36, children: n.label })
216
- },
217
- n.value
218
- )),
219
- q && /* @__PURE__ */ e(
220
- A,
221
- {
222
- variant: "subtle",
223
- fz: "sm",
224
- lh: "sm",
225
- fw: 500,
226
- px: "sm",
227
- size: "30px",
228
- onClick: U,
229
- color: "var(--mantine-color-gray-light-color)",
230
- style: { marginLeft: "auto" },
231
- children: i("remove")
232
- }
233
- )
234
- ]
199
+ variant: "subtle",
200
+ fz: "sm",
201
+ lh: "sm",
202
+ fw: 500,
203
+ px: "sm",
204
+ size: "30px",
205
+ onClick: L,
206
+ color: "var(--mantine-color-gray-light-color)",
207
+ style: { marginLeft: "auto" },
208
+ children: i("remove")
235
209
  }
236
210
  )
237
211
  }
238
- ) });
239
- return p ? /* @__PURE__ */ e(
240
- oe,
212
+ );
213
+ return h ? /* @__PURE__ */ e(
214
+ re,
241
215
  {
242
216
  "data-file-picker-inline": !0,
243
217
  bdrs: 8,
244
218
  p: 12,
245
219
  bg: "light-dark(var(--mantine-color-white), var(--mantine-color-dark-7))",
246
- children: B
220
+ children: G
247
221
  }
248
- ) : /* @__PURE__ */ d(
249
- F,
222
+ ) : /* @__PURE__ */ v(
223
+ P,
250
224
  {
251
- width: O,
225
+ width: H,
252
226
  radius: "var(--mantine-spacing-sm)",
253
- position: R,
227
+ position: O,
254
228
  shadow: "md",
255
- opened: T,
256
- onChange: G,
229
+ opened: x,
230
+ onChange: z,
257
231
  withinPortal: !0,
258
- ...K || {},
232
+ ...w || {},
259
233
  children: [
260
- /* @__PURE__ */ e(F.Target, { children: /* @__PURE__ */ e(r, { onClick: () => G(!T), ...W, children: H ?? ee }) }),
261
- /* @__PURE__ */ d(F.Dropdown, { p: 0, children: [
262
- ne,
263
- B
234
+ /* @__PURE__ */ e(P.Target, { children: /* @__PURE__ */ e(s, { onClick: () => z(!x), ...K, children: _ ?? Z }) }),
235
+ /* @__PURE__ */ v(P.Dropdown, { p: 0, children: [
236
+ D,
237
+ G
264
238
  ] })
265
239
  ]
266
240
  }
267
241
  );
268
242
  };
269
243
  export {
270
- He as FilePicker
244
+ Oe as FilePicker
271
245
  };
@@ -1,17 +1,13 @@
1
- const o = "_itemImage_7zb8o_1", t = "_imageAuthor_7zb8o_27", e = "_originalTab_7zb8o_43", _ = "_customTab_7zb8o_55", a = "_button_7zb8o_71", n = "_pickerDropZone_7zb8o_91", b = {
2
- itemImage: o,
1
+ const e = "_itemImage_119se_1", t = "_imageAuthor_119se_27", o = "_button_119se_43", s = "_pickerDropZone_119se_63", _ = {
2
+ itemImage: e,
3
3
  imageAuthor: t,
4
- originalTab: e,
5
- customTab: _,
6
- button: a,
7
- pickerDropZone: n
4
+ button: o,
5
+ pickerDropZone: s
8
6
  };
9
7
  export {
10
- a as button,
11
- _ as customTab,
12
- b as default,
8
+ o as button,
9
+ _ as default,
13
10
  t as imageAuthor,
14
- o as itemImage,
15
- e as originalTab,
16
- n as pickerDropZone
11
+ e as itemImage,
12
+ s as pickerDropZone
17
13
  };
@@ -1,4 +1,4 @@
1
- import { jsxs as c, jsx as r } from "react/jsx-runtime";
1
+ import { jsxs as l, jsx as r } from "react/jsx-runtime";
2
2
  import { useState as d, useMemo as f } from "react";
3
3
  import { useTranslation as x } from "react-i18next";
4
4
  import { Search01Icon as $ } from "@hugeicons/core-free-icons";
@@ -6,17 +6,17 @@ import { HugeiconsIcon as v } from "@hugeicons/react";
6
6
  import { Stack as m, FocusTrap as g, TextInput as I, Text as u, SimpleGrid as w, AspectRatio as C } from "@mantine/core";
7
7
  import S from "./FilePicker.module.css.js";
8
8
  const G = ({
9
- galleryCollection: n,
9
+ galleryCollection: i,
10
10
  onChange: p
11
11
  }) => {
12
- const { t: a } = x("ui"), [i, h] = d(""), l = f(() => {
13
- const e = i.trim().toLowerCase();
14
- return e ? n.map((t) => ({
12
+ const { t: a } = x("ui"), [s, h] = d(""), c = f(() => {
13
+ const e = s.trim().toLowerCase();
14
+ return e ? i.map((t) => ({
15
15
  ...t,
16
- items: t.items.filter((s) => `${t.title} ${t.id} ${t.path} ${s}`.toLowerCase().includes(e))
17
- })).filter((t) => t.items.length > 0) : n;
18
- }, [n, i]);
19
- return /* @__PURE__ */ c(m, { gap: "sm", children: [
16
+ items: t.items.filter((n) => `${t.title} ${t.id} ${t.path} ${n}`.toLowerCase().includes(e))
17
+ })).filter((t) => t.items.length > 0) : i;
18
+ }, [i, s]);
19
+ return /* @__PURE__ */ l(m, { gap: "sm", children: [
20
20
  /* @__PURE__ */ r(g, { active: !0, children: /* @__PURE__ */ r(
21
21
  I,
22
22
  {
@@ -24,11 +24,11 @@ const G = ({
24
24
  maxLength: 50,
25
25
  placeholder: a("changeCover.searchImage"),
26
26
  "data-autofocus": !0,
27
- value: i,
27
+ value: s,
28
28
  onChange: (e) => h(e.currentTarget.value)
29
29
  }
30
30
  ) }),
31
- /* @__PURE__ */ r(m, { gap: "xs", mah: 400, w: "100%", style: { overflow: "auto" }, children: l.length === 0 && i.trim() ? /* @__PURE__ */ r(u, { fz: "xs", c: "dimmed", ta: "center", py: "xs", children: a("changeCover.noResult") }) : l.map((e) => /* @__PURE__ */ c(m, { gap: 4, pb: "sm", children: [
31
+ /* @__PURE__ */ r(m, { gap: "xs", mah: 400, w: "100%", style: { overflow: "auto" }, children: c.length === 0 && s.trim() ? /* @__PURE__ */ r(u, { fz: "xs", c: "dimmed", ta: "center", py: "xs", children: a("changeCover.noResult") }) : c.map((e) => /* @__PURE__ */ l(m, { gap: 4, pb: "sm", children: [
32
32
  /* @__PURE__ */ r("a", { target: "_blank", href: e?.url || "#", rel: "noreferrer", children: /* @__PURE__ */ r(
33
33
  u,
34
34
  {
@@ -41,7 +41,7 @@ const G = ({
41
41
  children: e.title
42
42
  }
43
43
  ) }),
44
- /* @__PURE__ */ r(w, { spacing: 10, cols: 4, children: e.items.map((t, s) => {
44
+ /* @__PURE__ */ r(w, { spacing: 10, cols: 4, children: e.items.map((t, n) => {
45
45
  const o = "/images/covers/" + e.path + t;
46
46
  return /* @__PURE__ */ r(
47
47
  C,
@@ -53,7 +53,7 @@ const G = ({
53
53
  backgroundImage: `url(${o})`
54
54
  }
55
55
  },
56
- `${e.id}-${t}-${s}`
56
+ `${e.id}-${t}-${n}`
57
57
  );
58
58
  }) })
59
59
  ] }, e.id)) })