@layers-app/shared 0.3.0 → 0.3.1

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 (180) hide show
  1. package/dist/assets/default-workspace-avatar.jpg.js +4 -0
  2. package/dist/assets/layers-logo-full.svg.js +2 -3
  3. package/dist/assets/layers-logo-full.svg2.js +3 -2
  4. package/dist/assets/layers-logo-icon.svg.js +2 -3
  5. package/dist/assets/layers-logo-icon.svg2.js +3 -2
  6. package/dist/assets/projects/figureA.svg.js +4 -0
  7. package/dist/assets/projects/figureB.svg.js +4 -0
  8. package/dist/assets/qwebchannel.d.ts +15 -0
  9. package/dist/assets/qwebchannel.d.ts.map +1 -0
  10. package/dist/assets/taskPriorities/high.svg.js +5 -0
  11. package/dist/assets/taskPriorities/low.svg.js +5 -0
  12. package/dist/assets/taskPriorities/none.svg.js +5 -0
  13. package/dist/assets/taskPriorities/normal.svg.js +5 -0
  14. package/dist/assets/taskPriorities/urgent.svg.js +5 -0
  15. package/dist/components/AnimatedFigurePage/AnimatedFigurePage.d.ts +3 -0
  16. package/dist/components/AnimatedFigurePage/AnimatedFigurePage.d.ts.map +1 -0
  17. package/dist/components/AnimatedFigurePage/AnimatedFigurePage.js +69 -0
  18. package/dist/components/AnimatedFigurePage/AnimatedFigurePage.module.css.js +27 -0
  19. package/dist/components/AnimatedFigurePage/types.d.ts +15 -0
  20. package/dist/components/AnimatedFigurePage/types.d.ts.map +1 -0
  21. package/dist/components/AnimatedFigurePage/useParallax.d.ts +6 -0
  22. package/dist/components/AnimatedFigurePage/useParallax.d.ts.map +1 -0
  23. package/dist/components/AnimatedFigurePage/useParallax.js +29 -0
  24. package/dist/components/AppContainer/AppContainer.d.ts +1 -1
  25. package/dist/components/AppContainer/AppContainer.d.ts.map +1 -1
  26. package/dist/components/AppContainer/AppContainer.js +37 -36
  27. package/dist/components/AppContainer/AppContainer.module.css.js +1 -1
  28. package/dist/components/AppContainer/components/AppsSidebar/UserSection.d.ts.map +1 -1
  29. package/dist/components/AppContainer/components/AppsSidebar/UserSection.js +80 -45
  30. package/dist/components/AppContainer/components/menus/HelpMenu/HelpMenu.d.ts.map +1 -1
  31. package/dist/components/AppContainer/components/menus/HelpMenu/HelpMenu.js +60 -69
  32. package/dist/components/AppContainer/components/menus/HelpMenu/HelpMenu.module.css.js +1 -1
  33. package/dist/components/AppContainer/hooks/useAppContainer.d.ts +1 -1
  34. package/dist/components/AppContainer/hooks/useAppContainer.d.ts.map +1 -1
  35. package/dist/components/AppContainer/hooks/useAppContainer.js +57 -51
  36. package/dist/components/AppContainer/hooks/useAppContainerDataStore.d.ts.map +1 -1
  37. package/dist/components/AppContainer/hooks/useAppContainerDataStore.js +3 -1
  38. package/dist/components/AppContainer/types.d.ts +3 -0
  39. package/dist/components/AppContainer/types.d.ts.map +1 -1
  40. package/dist/components/AppShell/AppShell.module.css.js +5 -5
  41. package/dist/components/AttachmentsGalleryModal/components/ShakePlayer/ShakaPlayer.module.css.js +4 -4
  42. package/dist/components/AttachmentsGalleryModal/styles.module.css.js +14 -14
  43. package/dist/components/AttachmentsPreview/AttachmentsPreview.module.css.js +1 -1
  44. package/dist/components/BouncingLogo/BouncingLogo.module.css.js +8 -8
  45. package/dist/components/CollapsibleContainer/CollapsibleContainer.module.css.js +1 -1
  46. package/dist/components/ColorPicker/ColorPickerPopover.d.ts +6 -6
  47. package/dist/components/ColorPicker/ColorPickerPopover.d.ts.map +1 -1
  48. package/dist/components/ColorPicker/ColorPickerPopover.js +29 -31
  49. package/dist/components/CommentComposer/CommentComposer.module.css.js +4 -4
  50. package/dist/components/CommentComposer/index.d.ts.map +1 -1
  51. package/dist/components/CommentComposer/index.js +115 -111
  52. package/dist/components/CommunitiesDialog/styles.module.css.js +1 -1
  53. package/dist/components/Copyright/Copyright.module.css.js +1 -1
  54. package/dist/components/CustomKBD/CustomKBD.module.css.js +1 -1
  55. package/dist/components/EmojiPicker/EmojiPanel.d.ts.map +1 -1
  56. package/dist/components/EmojiPicker/EmojiPanel.js +12 -10
  57. package/dist/components/EmojiPicker/EmojiPicker.d.ts +3 -1
  58. package/dist/components/EmojiPicker/EmojiPicker.d.ts.map +1 -1
  59. package/dist/components/EmojiPicker/EmojiPicker.js +49 -46
  60. package/dist/components/EmojiPicker/EmojiPicker.module.css.js +8 -8
  61. package/dist/components/EmojiPicker/IconsPanel.d.ts +2 -1
  62. package/dist/components/EmojiPicker/IconsPanel.d.ts.map +1 -1
  63. package/dist/components/EmojiPicker/IconsPanel.js +47 -45
  64. package/dist/components/EmojiPicker/custom-icons/customIcons.d.ts.map +1 -1
  65. package/dist/components/EmojiPicker/custom-icons/customIcons.js +66 -31
  66. package/dist/components/EntityIcon.d.ts +3 -3
  67. package/dist/components/EntityIcon.d.ts.map +1 -1
  68. package/dist/components/EntityIcon.js +59 -35
  69. package/dist/components/EntityTitle/EntityTitle.d.ts +1 -1
  70. package/dist/components/EntityTitle/EntityTitle.d.ts.map +1 -1
  71. package/dist/components/EntityTitle/EntityTitle.js +34 -34
  72. package/dist/components/EntityTitle/EntityTitle.module.css.js +1 -1
  73. package/dist/components/ErrorPage/components/Error404.d.ts.map +1 -1
  74. package/dist/components/FeatureProgress/FeatureProgress.module.css.js +49 -49
  75. package/dist/components/FilePicker/FilePicker.d.ts +4 -2
  76. package/dist/components/FilePicker/FilePicker.d.ts.map +1 -1
  77. package/dist/components/FilePicker/FilePicker.js +241 -238
  78. package/dist/components/FilePicker/FilePicker.module.css.js +14 -12
  79. package/dist/components/FilePicker/FilePickerGallery.d.ts.map +1 -1
  80. package/dist/components/FilePicker/FilePickerGallery.js +60 -34
  81. package/dist/components/FilePicker/FilePickerGiphy.d.ts.map +1 -1
  82. package/dist/components/FilePicker/FilePickerGiphy.js +35 -36
  83. package/dist/components/FilePicker/FilePickerLink.d.ts.map +1 -1
  84. package/dist/components/FilePicker/FilePickerLink.js +26 -23
  85. package/dist/components/FilePicker/FilePickerUnsplash.d.ts.map +1 -1
  86. package/dist/components/FilePicker/FilePickerUnsplash.js +42 -43
  87. package/dist/components/FilePicker/FilePickerUpload.d.ts.map +1 -1
  88. package/dist/components/FilePicker/FilePickerUpload.js +60 -42
  89. package/dist/components/FilePicker/coverCollections.d.ts +4 -0
  90. package/dist/components/FilePicker/coverCollections.d.ts.map +1 -0
  91. package/dist/components/FilePicker/coverCollections.js +164 -0
  92. package/dist/components/FilePicker/index.d.ts +1 -0
  93. package/dist/components/FilePicker/index.d.ts.map +1 -1
  94. package/dist/components/FormViewer/FormViewer.module.css.js +20 -20
  95. package/dist/components/FormViewer/components/fields/DragOptions/DragOptions.module.css.js +1 -1
  96. package/dist/components/FormViewer/components/fields/DropdownField/DropdownField.module.css.js +1 -1
  97. package/dist/components/FormViewer/components/fields/EditableContent/EditableContent.module.css.js +1 -1
  98. package/dist/components/FormViewer/components/fields/SelectableCard/SelectableCard.module.css.js +8 -8
  99. package/dist/components/FormViewer/components/fields/UploadField/UploadField.d.ts.map +1 -1
  100. package/dist/components/FormViewer/components/fields/UploadField/UploadField.js +34 -33
  101. package/dist/components/FormViewer/components/fields/UploadField/UploadFile/UploadFile.module.css.js +4 -4
  102. package/dist/components/FormViewer/hooks/useFormGlobalTheme.d.ts +3 -3
  103. package/dist/components/FormViewer/store/formStore.d.ts.map +1 -1
  104. package/dist/components/ImageCropper/ImageCropper.module.css.js +38 -38
  105. package/dist/components/IntegrationFlowAnimation/IntegrationFlowAnimation.module.css.js +11 -11
  106. package/dist/components/LanguagePicker/LanguagePicker.module.css.js +1 -1
  107. package/dist/components/Loaders/styles.module.css.js +6 -6
  108. package/dist/components/Logotype.d.ts +2 -1
  109. package/dist/components/Logotype.d.ts.map +1 -1
  110. package/dist/components/Logotype.js +58 -49
  111. package/dist/components/MediaLibrary/MediaLibrary.module.css.js +2 -2
  112. package/dist/components/NavMenu/NavMenu.module.css.js +12 -12
  113. package/dist/components/NavMenu/components/NavMenuItem.d.ts.map +1 -1
  114. package/dist/components/NavMenu/components/NavMenuItem.js +122 -107
  115. package/dist/components/NavMenu/types.d.ts +1 -0
  116. package/dist/components/NavMenu/types.d.ts.map +1 -1
  117. package/dist/components/NavbarResizer/NavbarResizer.module.css.js +2 -2
  118. package/dist/components/NotPublicPanel/NotPublicPanel.module.css.js +11 -11
  119. package/dist/components/Notification/Notification.module.css.js +1 -1
  120. package/dist/components/OnBoarding/steps/DifferentLayouts/styles.module.css.js +3 -3
  121. package/dist/components/OnBoarding/steps/styles.module.css.js +9 -9
  122. package/dist/components/OnBoarding/styles.module.css.js +7 -7
  123. package/dist/components/ProjectIcon/ProjectIcon.js +13 -13
  124. package/dist/components/SearchFilters/SearchFilters.module.css.js +1 -1
  125. package/dist/components/SettingsSection/styles.module.css.js +1 -1
  126. package/dist/components/StorageUsageProgress/StorageUsageProgress.module.css.js +1 -1
  127. package/dist/components/TreeIndent/TreeIndent.d.ts +9 -0
  128. package/dist/components/TreeIndent/TreeIndent.d.ts.map +1 -0
  129. package/dist/components/TreeIndent/TreeIndent.js +15 -0
  130. package/dist/components/TreeIndent/TreeIndent.module.css.js +11 -0
  131. package/dist/components/TreeIndent/index.d.ts +2 -0
  132. package/dist/components/TreeIndent/index.d.ts.map +1 -0
  133. package/dist/components/WorkspaceAvatar/WorkspaceAvatar.js +11 -11
  134. package/dist/components/WorkspaceMenu/WorkspaceMenu.d.ts.map +1 -1
  135. package/dist/components/WorkspaceMenu/WorkspaceMenu.js +97 -101
  136. package/dist/components/modals/RemoveConfirmModal.d.ts.map +1 -1
  137. package/dist/components/table/FrontTable.d.ts.map +1 -1
  138. package/dist/components/table/hooks/useColumnsResizing.d.ts.map +1 -1
  139. package/dist/config/brand.d.ts +1 -0
  140. package/dist/config/brand.d.ts.map +1 -1
  141. package/dist/config/brand.js +42 -34
  142. package/dist/config/envConfig.d.ts +40 -0
  143. package/dist/config/envConfig.d.ts.map +1 -1
  144. package/dist/config/envConfig.js +29 -10
  145. package/dist/constants.d.ts.map +1 -1
  146. package/dist/constants.js +15 -4
  147. package/dist/helpers/getFileIcons.d.ts.map +1 -1
  148. package/dist/helpers/getFileIcons.js +34 -29
  149. package/dist/helpers/getFileType.d.ts +1 -1
  150. package/dist/helpers/getFileType.d.ts.map +1 -1
  151. package/dist/helpers/getFileType.js +3 -3
  152. package/dist/helpers/hotjar.d.ts.map +1 -1
  153. package/dist/helpers/hotjar.js +11 -7
  154. package/dist/helpers/platform.js +4 -4
  155. package/dist/helpers/showFeatureFeedback.module.css.js +4 -4
  156. package/dist/helpers/showNotifications.d.ts +3 -0
  157. package/dist/helpers/showNotifications.d.ts.map +1 -1
  158. package/dist/helpers/showNotifications.js +79 -44
  159. package/dist/helpers/showNotifications.module.css.js +1 -1
  160. package/dist/hooks/useDateFnsLocale.d.ts +2 -0
  161. package/dist/hooks/useDateFnsLocale.d.ts.map +1 -1
  162. package/dist/hooks/useDateFnsLocale.js +9 -8
  163. package/dist/hooks/useDateUtils.d.ts.map +1 -1
  164. package/dist/hooks/useDateUtils.js +19 -19
  165. package/dist/hooks/useFormatDistance.d.ts.map +1 -1
  166. package/dist/hooks/useFormatDistance.js +6 -6
  167. package/dist/hooks/useNumberQueryParam.d.ts +1 -1
  168. package/dist/hooks/useNumberQueryParam.d.ts.map +1 -1
  169. package/dist/index.css +1 -1
  170. package/dist/index.d.ts +3 -0
  171. package/dist/index.d.ts.map +1 -1
  172. package/dist/index.js +504 -492
  173. package/dist/lang/locales/ui_en.json.js +15 -15
  174. package/dist/lang/locales/ui_es.json.js +11 -11
  175. package/dist/lang/locales/ui_ru.json.js +16 -16
  176. package/dist/utils/formatStorage.d.ts +9 -0
  177. package/dist/utils/formatStorage.d.ts.map +1 -1
  178. package/dist/utils/formatStorage.js +14 -10
  179. package/docs/README.md +499 -499
  180. package/package.json +75 -75
@@ -1 +1 @@
1
- {"version":3,"file":"FilePicker.d.ts","sourceRoot":"","sources":["../../../src/components/FilePicker/FilePicker.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,iBAAiB,EAAqB,MAAM,OAAO,CAAC;AAK7D,O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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;CACxB,CAAC,CAAC;AAEH,eAAO,MAAM,UAAU,GAAI,0TAwBxB,iBAAiB,CAAC,eAAe,CAAC,4CAsUpC,CAAC"}
@@ -1,22 +1,23 @@
1
- import { jsx as e, jsxs as t } from "react/jsx-runtime";
2
- import { useState as x, useMemo as y } from "react";
3
- import { useTranslation as Q } from "react-i18next";
4
- import { ImageAdd02Icon as F } from "@hugeicons/core-free-icons";
5
- import { HugeiconsIcon as M } from "@hugeicons/react";
6
- import { Flex as a, ActionIcon as W, Button as P, Text as X, Popover as m, Tabs as g, Stack as Y } from "@mantine/core";
7
- import { getEnvConfig as S } from "../../config/envConfig.js";
8
- import { isFeature as I } from "../../helpers/feature.js";
9
- import { useMenu as Z } from "../../hooks/useMenu.js";
10
- import { usePlatform as $ } from "../../hooks/usePlatform.js";
11
- import { MediaLibraryBrowser as D } from "../MediaLibrary/MediaLibraryBrowser.js";
12
- import { FilePickerGallery as w } from "./FilePickerGallery.js";
13
- import { FilePickerGiphy as ee } from "./FilePickerGiphy.js";
14
- import { FilePickerGoogleDrive as le } from "./FilePickerGoogleDrive.js";
15
- import { FilePickerLink as ie } from "./FilePickerLink.js";
16
- import { FilePickerUnsplash as ne } from "./FilePickerUnsplash.js";
17
- import { FilePickerUpload as ae } from "./FilePickerUpload.js";
18
- import z from "./FilePicker.module.css.js";
19
- const re = [
1
+ import { jsx as e, jsxs as d } from "react/jsx-runtime";
2
+ import { useState as E, useMemo as u, useEffect as ne } from "react";
3
+ import { useTranslation as le } 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 ie, Button as A, Text as re, Tabs as x, Box as ae, Popover as F, Stack as oe } from "@mantine/core";
7
+ import { getEnvConfig as L } from "../../config/envConfig.js";
8
+ import { isFeature as se } from "../../helpers/feature.js";
9
+ import { useMenu as te } from "../../hooks/useMenu.js";
10
+ import { usePlatform as ce } from "../../hooks/usePlatform.js";
11
+ import { MediaLibraryBrowser as de } from "../MediaLibrary/MediaLibraryBrowser.js";
12
+ import { FilePickerGallery as ue } from "./FilePickerGallery.js";
13
+ import { FilePickerGiphy as he } from "./FilePickerGiphy.js";
14
+ import { FilePickerLink as pe } from "./FilePickerLink.js";
15
+ import { FilePickerUnsplash as me } from "./FilePickerUnsplash.js";
16
+ import { FilePickerGoogleDrive as fe } from "./FilePickerGoogleDrive.js";
17
+ import { FilePickerUpload as ge } from "./FilePickerUpload.js";
18
+ import { coverCollections as ve } from "./coverCollections.js";
19
+ import w from "./FilePicker.module.css.js";
20
+ const be = [
20
21
  "gallery",
21
22
  "upload",
22
23
  "link",
@@ -24,243 +25,245 @@ const re = [
24
25
  "giphy",
25
26
  "googleDrive",
26
27
  "media"
27
- ], Se = ({
28
- onChange: G,
29
- onRemove: V,
30
- onUpload: u,
31
- uploading: B = !1,
32
- showTabs: r = re,
33
- children: E,
34
- width: j = 610,
35
- position: A = "bottom-end",
36
- readOnly: L = !1,
37
- hasImage: N,
38
- giphyToken: se,
39
- unsplashClientId: oe,
40
- type: f = "image",
41
- galleryCollection: d = [],
42
- isValidMediaUrl: T,
43
- popoverProps: U,
44
- dropZoneProps: _,
45
- targetProps: H,
46
- onOpenedChange: O,
47
- googleDrive: i,
48
- mediaLibrary: s
28
+ ], _e = ({
29
+ onChange: N,
30
+ onRemove: U,
31
+ onUpload: b,
32
+ uploading: _ = !1,
33
+ showTabs: o = be,
34
+ children: H,
35
+ width: O = 610,
36
+ position: R = "bottom-end",
37
+ readOnly: $ = !1,
38
+ hasImage: q,
39
+ giphyToken: Ce,
40
+ unsplashClientId: ke,
41
+ type: S = "image",
42
+ galleryCollection: h = [],
43
+ isValidMediaUrl: J,
44
+ popoverProps: K,
45
+ dropZoneProps: Q,
46
+ targetProps: W,
47
+ onOpenedChange: X,
48
+ googleDrive: l,
49
+ mediaLibrary: a,
50
+ inline: p = !1,
51
+ tab: C
49
52
  }) => {
50
- const { t: n } = Q("ui"), [v, h] = x(!1), { isMobile: b } = Z(), C = $(), p = y(
51
- () => [
52
- {
53
- value: "gallery",
54
- label: /* @__PURE__ */ e(a, { children: /* @__PURE__ */ e("span", { children: n("changeCover.gallery") }) }),
55
- visible: r.includes("gallery") && !!d.length
56
- },
57
- {
58
- value: "upload",
59
- label: /* @__PURE__ */ e(a, { children: /* @__PURE__ */ e("span", { children: n("changeCover.upload") }) }),
60
- visible: r.includes("upload") && !!u
61
- },
62
- {
63
- value: "link",
64
- label: /* @__PURE__ */ e(a, { children: /* @__PURE__ */ e("span", { children: n("changeCover.link") }) }),
65
- visible: r.includes("link")
66
- },
67
- {
68
- value: "unsplash",
69
- label: /* @__PURE__ */ e(a, { children: /* @__PURE__ */ e("span", { children: n("changeCover.searchImages") }) }),
70
- visible: r.includes("unsplash") && S().media?.unsplashEnabled !== !1
71
- },
53
+ const { t: i } = le("ui"), [T, m] = E(!1), { isMobile: I } = te(), M = ce(), f = u(() => h.length > 0 ? h : p ? ve.map((n) => ({
54
+ ...n,
55
+ title: i(`coverGroups.${n.id}`, { defaultValue: n.id })
56
+ })) : h, [h, p, i]), s = u(() => [
57
+ {
58
+ value: "gallery",
59
+ label: /* @__PURE__ */ e(r, { children: /* @__PURE__ */ e("span", { children: i("changeCover.gallery") }) }),
60
+ visible: o.includes("gallery") && !!f.length
61
+ },
62
+ {
63
+ value: "upload",
64
+ label: /* @__PURE__ */ e(r, { children: /* @__PURE__ */ e("span", { children: i("changeCover.upload") }) }),
65
+ visible: o.includes("upload") && !!b
66
+ },
67
+ {
68
+ value: "link",
69
+ label: /* @__PURE__ */ e(r, { children: /* @__PURE__ */ e("span", { children: i("changeCover.link") }) }),
70
+ visible: o.includes("link")
71
+ },
72
+ {
73
+ value: "unsplash",
74
+ label: /* @__PURE__ */ e(r, { children: /* @__PURE__ */ e("span", { children: i("changeCover.searchImages") }) }),
75
+ visible: o.includes("unsplash") && L().media?.unsplashEnabled !== !1
76
+ },
77
+ {
78
+ value: "giphy",
79
+ label: /* @__PURE__ */ e(r, { children: /* @__PURE__ */ e("span", { children: "GIFs" }) }),
80
+ visible: o.includes("giphy") && M.has("giphy") && L().media?.giphyEnabled !== !1
81
+ },
82
+ {
83
+ value: "googleDrive",
84
+ label: /* @__PURE__ */ e(r, { children: /* @__PURE__ */ e("span", { children: i("changeCover.googleDrive", {
85
+ defaultValue: "Google Drive"
86
+ }) }) }),
87
+ visible: o.includes("googleDrive") && !!l
88
+ },
89
+ {
90
+ value: "media",
91
+ label: /* @__PURE__ */ e(r, { children: /* @__PURE__ */ e("span", { children: i("changeCover.media", { defaultValue: "Media" }) }) }),
92
+ visible: o.includes("media") && !!a && se()
93
+ }
94
+ ].filter((y) => y.visible), [
95
+ o,
96
+ M,
97
+ i,
98
+ f.length,
99
+ b,
100
+ l,
101
+ a
102
+ ]), g = C !== void 0, [Y, P] = E(() => C !== void 0 ? "" : s[0]?.value ?? "");
103
+ ne(() => {
104
+ g || s.length && P((n) => n && s.some((y) => y.value === n) ? n : s[0].value);
105
+ }, [s, g]);
106
+ const k = u(() => s.map((n) => n.value), [s]), v = g ? C : Y, t = u(() => v && k.includes(v) ? v : k[0] ?? "", [v, k]), z = (n) => {
107
+ g || P(n);
108
+ }, Z = (n) => {
109
+ b?.(n, m);
110
+ }, c = (n) => {
111
+ N?.(n), p || m(!1);
112
+ }, D = u(() => I ? /* @__PURE__ */ d(ie, { size: "lg", children: [
113
+ /* @__PURE__ */ e(j, { icon: V, size: 22 }),
114
+ " "
115
+ ] }) : /* @__PURE__ */ e(
116
+ A,
117
+ {
118
+ variant: "default",
119
+ size: "xs",
120
+ leftSection: /* @__PURE__ */ e(j, { icon: V, size: 16 }),
121
+ children: /* @__PURE__ */ e(re, { fw: 600, size: "sm", children: i("changeCover.change") })
122
+ }
123
+ ), [i, I]), G = (n) => {
124
+ m(n), X?.(n);
125
+ }, B = /* @__PURE__ */ d(oe, { gap: 0, px: 8, pb: 8, pt: "sm", children: [
126
+ t === "gallery" && !!f.length && /* @__PURE__ */ e(
127
+ ue,
72
128
  {
73
- value: "giphy",
74
- label: /* @__PURE__ */ e(a, { children: /* @__PURE__ */ e("span", { children: "GIFs" }) }),
75
- visible: r.includes("giphy") && C.has("giphy") && S().media?.giphyEnabled !== !1
76
- },
129
+ galleryCollection: f,
130
+ onChange: c
131
+ }
132
+ ),
133
+ t === "upload" && /* @__PURE__ */ e(
134
+ ge,
77
135
  {
78
- value: "googleDrive",
79
- label: /* @__PURE__ */ e(a, { children: /* @__PURE__ */ e("span", { children: n("changeCover.googleDrive", {
80
- defaultValue: "Google Drive"
81
- }) }) }),
82
- visible: r.includes("googleDrive") && !!i
83
- },
136
+ type: S || "image",
137
+ uploading: _,
138
+ dropZoneProps: Q,
139
+ onUpload: Z
140
+ }
141
+ ),
142
+ t === "link" && /* @__PURE__ */ e(
143
+ pe,
84
144
  {
85
- value: "media",
86
- label: /* @__PURE__ */ e(a, { children: /* @__PURE__ */ e("span", { children: n("changeCover.media", { defaultValue: "Media" }) }) }),
87
- visible: r.includes("media") && !!s && I()
88
- },
145
+ type: S || "image",
146
+ onChange: c,
147
+ isValidMediaUrl: J
148
+ }
149
+ ),
150
+ t === "unsplash" && /* @__PURE__ */ e(me, { onChange: c }),
151
+ t === "giphy" && /* @__PURE__ */ e(he, { onChange: c }),
152
+ t === "googleDrive" && l && /* @__PURE__ */ e(
153
+ fe,
89
154
  {
90
- value: "googleDrive",
91
- label: /* @__PURE__ */ e(a, { children: /* @__PURE__ */ e("span", { children: n("changeCover.googleDrive", {
92
- defaultValue: "Google Drive"
93
- }) }) }),
94
- visible: r.includes("googleDrive") && !!i
95
- },
155
+ isConnected: l.isConnected,
156
+ connectedEmail: l.connectedEmail,
157
+ files: l.files,
158
+ isLoading: l.isLoading,
159
+ hasMore: l.hasMore,
160
+ isImporting: l.isImporting,
161
+ onSearch: l.onSearch,
162
+ onLoadMore: l.onLoadMore,
163
+ onSelect: (n) => {
164
+ l.onSelect(n, c);
165
+ },
166
+ error: l.error
167
+ }
168
+ ),
169
+ t === "media" && a && /* @__PURE__ */ e(
170
+ de,
96
171
  {
97
- value: "media",
98
- label: /* @__PURE__ */ e(a, { children: /* @__PURE__ */ e("span", { children: n("changeCover.media", { defaultValue: "Media" }) }) }),
99
- visible: r.includes("media") && !!s && I()
172
+ items: a.items,
173
+ isLoading: a.isLoading,
174
+ breadcrumbs: a.breadcrumbs,
175
+ onFolderClick: a.onFolderClick,
176
+ onBreadcrumbClick: a.onBreadcrumbClick,
177
+ onSelect: (n) => {
178
+ a.onSelect?.(n), m(!1);
179
+ }
100
180
  }
101
- ].filter((l) => l.visible),
102
- [
103
- r,
104
- C,
105
- n,
106
- d.length,
107
- u,
108
- i,
109
- s
110
- ]
111
- ), [o, R] = x(() => {
112
- if (p[0]) return p[0].value;
113
- const l = p.find((K) => K.visible);
114
- return l ? l.value : "";
115
- }), q = (l) => {
116
- u?.(l, h);
117
- }, c = (l) => {
118
- G?.(l), h(!1);
119
- }, J = y(() => b ? /* @__PURE__ */ t(W, { size: "lg", children: [
120
- /* @__PURE__ */ e(M, { icon: F, size: 22 }),
121
- " "
122
- ] }) : /* @__PURE__ */ e(
123
- P,
181
+ )
182
+ ] }), ee = /* @__PURE__ */ e(r, { justify: "space-between", align: "center", children: /* @__PURE__ */ e(
183
+ x,
124
184
  {
125
- variant: "default",
126
- size: "xs",
127
- leftSection: /* @__PURE__ */ e(M, { icon: F, size: 16 }),
128
- children: /* @__PURE__ */ e(X, { fw: 600, size: "sm", children: n("changeCover.change") })
185
+ defaultValue: "gallery",
186
+ value: t,
187
+ onChange: (n) => n && z(n),
188
+ styles: {
189
+ list: {
190
+ alignItems: "center",
191
+ paddingRight: "var(--mantine-spacing-xs)"
192
+ }
193
+ },
194
+ w: "100%",
195
+ children: /* @__PURE__ */ d(
196
+ x.List,
197
+ {
198
+ style: {
199
+ gap: "4px"
200
+ },
201
+ px: 8,
202
+ h: 54,
203
+ children: [
204
+ s.map((n) => /* @__PURE__ */ e(
205
+ x.Tab,
206
+ {
207
+ className: w.originalTab,
208
+ disabled: $,
209
+ h: "100%",
210
+ p: 0,
211
+ value: n.value,
212
+ onClick: () => z(n.value),
213
+ children: /* @__PURE__ */ e(r, { className: w.customTab, px: "sm", h: 36, children: n.label })
214
+ },
215
+ n.value
216
+ )),
217
+ q && /* @__PURE__ */ e(
218
+ A,
219
+ {
220
+ variant: "subtle",
221
+ fz: "sm",
222
+ lh: "sm",
223
+ fw: 500,
224
+ px: "sm",
225
+ size: "30px",
226
+ onClick: U,
227
+ color: "var(--mantine-color-gray-light-color)",
228
+ style: { marginLeft: "auto" },
229
+ children: i("remove")
230
+ }
231
+ )
232
+ ]
233
+ }
234
+ )
129
235
  }
130
- ), [n, b]), k = (l) => {
131
- h(l), O?.(l);
132
- };
133
- return /* @__PURE__ */ t(
134
- m,
236
+ ) });
237
+ return p ? /* @__PURE__ */ e(
238
+ ae,
135
239
  {
136
- width: j,
240
+ "data-file-picker-inline": !0,
241
+ bdrs: 8,
242
+ p: 12,
243
+ bg: "light-dark(var(--mantine-color-white), var(--mantine-color-dark-7))",
244
+ children: B
245
+ }
246
+ ) : /* @__PURE__ */ d(
247
+ F,
248
+ {
249
+ width: O,
137
250
  radius: "var(--mantine-spacing-sm)",
138
- position: A,
251
+ position: R,
139
252
  shadow: "md",
140
- opened: v,
141
- onChange: k,
253
+ opened: T,
254
+ onChange: G,
142
255
  withinPortal: !0,
143
- ...U || {},
256
+ ...K || {},
144
257
  children: [
145
- /* @__PURE__ */ e(m.Target, { children: /* @__PURE__ */ e(a, { onClick: () => k(!v), ...H, children: E ?? J }) }),
146
- /* @__PURE__ */ t(m.Dropdown, { p: 0, children: [
147
- /* @__PURE__ */ e(a, { justify: "space-between", align: "center", children: /* @__PURE__ */ e(
148
- g,
149
- {
150
- defaultValue: "gallery",
151
- value: o,
152
- styles: {
153
- list: {
154
- alignItems: "center",
155
- paddingRight: "var(--mantine-spacing-xs)"
156
- }
157
- },
158
- w: "100%",
159
- children: /* @__PURE__ */ t(
160
- g.List,
161
- {
162
- style: {
163
- gap: "4px"
164
- },
165
- px: 8,
166
- h: 54,
167
- children: [
168
- p.map((l) => /* @__PURE__ */ e(
169
- g.Tab,
170
- {
171
- className: z.originalTab,
172
- disabled: L,
173
- h: "100%",
174
- p: 0,
175
- value: l.value,
176
- onClick: () => R(l.value),
177
- children: /* @__PURE__ */ e(a, { className: z.customTab, px: "sm", h: 36, children: l.label })
178
- },
179
- l.value
180
- )),
181
- N && /* @__PURE__ */ e(
182
- P,
183
- {
184
- variant: "subtle",
185
- fz: "sm",
186
- lh: "sm",
187
- fw: 500,
188
- px: "sm",
189
- size: "30px",
190
- onClick: V,
191
- color: "var(--mantine-color-gray-light-color)",
192
- style: { marginLeft: "auto" },
193
- children: n("remove")
194
- }
195
- )
196
- ]
197
- }
198
- )
199
- }
200
- ) }),
201
- /* @__PURE__ */ t(Y, { gap: 0, px: 8, pb: 8, pt: "sm", children: [
202
- o === "gallery" && !!d.length && /* @__PURE__ */ e(
203
- w,
204
- {
205
- galleryCollection: d,
206
- onChange: c
207
- }
208
- ),
209
- o === "upload" && /* @__PURE__ */ e(
210
- ae,
211
- {
212
- type: f || "image",
213
- uploading: B,
214
- dropZoneProps: _,
215
- onUpload: q
216
- }
217
- ),
218
- o === "link" && /* @__PURE__ */ e(
219
- ie,
220
- {
221
- type: f || "image",
222
- onChange: c,
223
- isValidMediaUrl: T
224
- }
225
- ),
226
- o === "unsplash" && /* @__PURE__ */ e(ne, { onChange: c }),
227
- o === "giphy" && /* @__PURE__ */ e(ee, { onChange: c }),
228
- o === "googleDrive" && i && /* @__PURE__ */ e(
229
- le,
230
- {
231
- isConnected: i.isConnected,
232
- connectedEmail: i.connectedEmail,
233
- files: i.files,
234
- isLoading: i.isLoading,
235
- hasMore: i.hasMore,
236
- isImporting: i.isImporting,
237
- onSearch: i.onSearch,
238
- onLoadMore: i.onLoadMore,
239
- onSelect: (l) => {
240
- i.onSelect(l, c);
241
- },
242
- error: i.error
243
- }
244
- ),
245
- o === "media" && s && /* @__PURE__ */ e(
246
- D,
247
- {
248
- items: s.items,
249
- isLoading: s.isLoading,
250
- breadcrumbs: s.breadcrumbs,
251
- onFolderClick: s.onFolderClick,
252
- onBreadcrumbClick: s.onBreadcrumbClick,
253
- onSelect: (l) => {
254
- s.onSelect?.(l), h(!1);
255
- }
256
- }
257
- )
258
- ] })
258
+ /* @__PURE__ */ e(F.Target, { children: /* @__PURE__ */ e(r, { onClick: () => G(!T), ...W, children: H ?? D }) }),
259
+ /* @__PURE__ */ d(F.Dropdown, { p: 0, children: [
260
+ ee,
261
+ B
259
262
  ] })
260
263
  ]
261
264
  }
262
265
  );
263
266
  };
264
267
  export {
265
- Se as FilePicker
268
+ _e as FilePicker
266
269
  };
@@ -1,15 +1,17 @@
1
- const t = "_itemImage_1me1c_1", o = "_imageAuthor_1me1c_14", a = "_originalTab_1me1c_22", e = "_customTab_1me1c_28", m = "_button_1me1c_36", _ = {
2
- itemImage: t,
3
- imageAuthor: o,
4
- originalTab: a,
5
- customTab: e,
6
- button: m
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,
3
+ imageAuthor: t,
4
+ originalTab: e,
5
+ customTab: _,
6
+ button: a,
7
+ pickerDropZone: n
7
8
  };
8
9
  export {
9
- m as button,
10
- e as customTab,
11
- _ as default,
12
- o as imageAuthor,
13
- t as itemImage,
14
- a as originalTab
10
+ a as button,
11
+ _ as customTab,
12
+ b as default,
13
+ t as imageAuthor,
14
+ o as itemImage,
15
+ e as originalTab,
16
+ n as pickerDropZone
15
17
  };
@@ -1 +1 @@
1
- {"version":3,"file":"FilePickerGallery.d.ts","sourceRoot":"","sources":["../../../src/components/FilePicker/FilePickerGallery.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAE,4BAA4B,EAAE,MAAM,SAAS,CAAC;AAIvD,eAAO,MAAM,iBAAiB,GAAI,kCAG/B;IACD,iBAAiB,EAAE,4BAA4B,EAAE,CAAC;IAClD,QAAQ,CAAC,EAAE,CAAC,CAAC,EAAE,MAAM,KAAK,IAAI,CAAC;CAChC,4CAqCA,CAAC"}
1
+ {"version":3,"file":"FilePickerGallery.d.ts","sourceRoot":"","sources":["../../../src/components/FilePicker/FilePickerGallery.tsx"],"names":[],"mappings":"AAcA,OAAO,EAAE,4BAA4B,EAAE,MAAM,SAAS,CAAC;AAIvD,eAAO,MAAM,iBAAiB,GAAI,kCAG/B;IACD,iBAAiB,EAAE,4BAA4B,EAAE,CAAC;IAClD,QAAQ,CAAC,EAAE,CAAC,CAAC,EAAE,MAAM,KAAK,IAAI,CAAC;CAChC,4CAyEA,CAAC"}
@@ -1,38 +1,64 @@
1
- import { jsx as r, jsxs as n } from "react/jsx-runtime";
2
- import { Stack as l, Text as o, SimpleGrid as p, AspectRatio as c } from "@mantine/core";
3
- import d from "./FilePicker.module.css.js";
4
- const x = ({
5
- galleryCollection: s,
6
- onChange: t
7
- }) => /* @__PURE__ */ r(l, { gap: "xs", mah: 400, w: "100%", style: { overflow: "auto" }, children: s.map((e) => /* @__PURE__ */ n(l, { gap: 4, pb: "sm", children: [
8
- /* @__PURE__ */ r("a", { target: "_blank", href: e?.url || "#", children: /* @__PURE__ */ r(
9
- o,
10
- {
11
- fz: "xs",
12
- fw: 500,
13
- lh: "xs",
14
- c: "dimmed",
15
- component: "span",
16
- td: "none",
17
- children: e.title
18
- }
19
- ) }),
20
- /* @__PURE__ */ r(p, { spacing: 10, cols: 4, children: e.items.map((m, a) => {
21
- const i = "/images/covers/" + e.path + m;
22
- return /* @__PURE__ */ r(
23
- c,
1
+ import { jsxs as c, jsx as r } from "react/jsx-runtime";
2
+ import { useState as d, useMemo as f } from "react";
3
+ import { useTranslation as x } from "react-i18next";
4
+ import { Search01Icon as $ } from "@hugeicons/core-free-icons";
5
+ import { HugeiconsIcon as v } from "@hugeicons/react";
6
+ import { Stack as m, FocusTrap as g, TextInput as I, Text as u, SimpleGrid as w, AspectRatio as C } from "@mantine/core";
7
+ import S from "./FilePicker.module.css.js";
8
+ const G = ({
9
+ galleryCollection: n,
10
+ onChange: p
11
+ }) => {
12
+ const { t: a } = x("ui"), [i, h] = d(""), l = f(() => {
13
+ const e = i.trim().toLowerCase();
14
+ return e ? n.map((t) => ({
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: [
20
+ /* @__PURE__ */ r(g, { active: !0, children: /* @__PURE__ */ r(
21
+ I,
24
22
  {
25
- onClick: () => t?.(i),
26
- ratio: 120 / 65,
27
- className: d.itemImage,
28
- style: {
29
- backgroundImage: `url(${i})`
23
+ leftSection: /* @__PURE__ */ r(v, { size: 16, icon: $ }),
24
+ maxLength: 50,
25
+ placeholder: a("changeCover.searchImage"),
26
+ "data-autofocus": !0,
27
+ value: i,
28
+ onChange: (e) => h(e.currentTarget.value)
29
+ }
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: [
32
+ /* @__PURE__ */ r("a", { target: "_blank", href: e?.url || "#", rel: "noreferrer", children: /* @__PURE__ */ r(
33
+ u,
34
+ {
35
+ fz: "xs",
36
+ fw: 500,
37
+ lh: "xs",
38
+ c: "dimmed",
39
+ component: "span",
40
+ td: "none",
41
+ children: e.title
30
42
  }
31
- },
32
- a
33
- );
34
- }) })
35
- ] }, e.id)) });
43
+ ) }),
44
+ /* @__PURE__ */ r(w, { spacing: 10, cols: 4, children: e.items.map((t, s) => {
45
+ const o = "/images/covers/" + e.path + t;
46
+ return /* @__PURE__ */ r(
47
+ C,
48
+ {
49
+ onClick: () => p?.(o),
50
+ ratio: 120 / 65,
51
+ className: S.itemImage,
52
+ style: {
53
+ backgroundImage: `url(${o})`
54
+ }
55
+ },
56
+ `${e.id}-${t}-${s}`
57
+ );
58
+ }) })
59
+ ] }, e.id)) })
60
+ ] });
61
+ };
36
62
  export {
37
- x as FilePickerGallery
63
+ G as FilePickerGallery
38
64
  };
@@ -1 +1 @@
1
- {"version":3,"file":"FilePickerGiphy.d.ts","sourceRoot":"","sources":["../../../src/components/FilePicker/FilePickerGiphy.tsx"],"names":[],"mappings":"AAmCA,eAAO,MAAM,eAAe,GAAI,eAE7B;IACD,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,QAAQ,CAAC,EAAE,CAAC,CAAC,EAAE,MAAM,KAAK,IAAI,CAAC;CAChC,4CAoGA,CAAC"}
1
+ {"version":3,"file":"FilePickerGiphy.d.ts","sourceRoot":"","sources":["../../../src/components/FilePicker/FilePickerGiphy.tsx"],"names":[],"mappings":"AAoCA,eAAO,MAAM,eAAe,GAAI,eAE7B;IACD,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,QAAQ,CAAC,EAAE,CAAC,CAAC,EAAE,MAAM,KAAK,IAAI,CAAC;CAChC,4CAqGA,CAAC"}