@layers-app/shared 0.3.7 → 0.3.8
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/components/AnimatedFigurePage/AnimatedFigurePage.module.css.js +10 -10
- package/dist/components/AnimatedFigurePage/useParallax.d.ts +2 -2
- package/dist/components/AppContainer/AppContainer.module.css.js +1 -1
- package/dist/components/AppContainer/components/AppSidebarButton.d.ts +4 -1
- package/dist/components/AppContainer/components/AppSidebarButton.d.ts.map +1 -1
- package/dist/components/AppContainer/components/AppSidebarButton.js +22 -15
- package/dist/components/AppContainer/components/AppsSidebar/AppsSection.d.ts.map +1 -1
- package/dist/components/AppContainer/components/AppsSidebar/AppsSection.js +22 -21
- package/dist/components/AppContainer/components/AppsSidebar/UserSection.d.ts.map +1 -1
- package/dist/components/AppContainer/components/AppsSidebar/UserSection.js +48 -91
- package/dist/components/AppContainer/components/menus/HelpMenu/HelpMenu.module.css.js +1 -1
- package/dist/components/AppShell/AppShell.module.css.js +5 -5
- package/dist/components/AttachmentsGalleryModal/components/GallerySlide.d.ts +3 -1
- package/dist/components/AttachmentsGalleryModal/components/GallerySlide.d.ts.map +1 -1
- package/dist/components/AttachmentsGalleryModal/components/GallerySlide.js +89 -63
- package/dist/components/AttachmentsGalleryModal/components/ShakePlayer/ShakaPlayer.d.ts +1 -1
- package/dist/components/AttachmentsGalleryModal/components/ShakePlayer/ShakaPlayer.d.ts.map +1 -1
- package/dist/components/AttachmentsGalleryModal/components/ShakePlayer/ShakaPlayer.js +35 -26
- package/dist/components/AttachmentsGalleryModal/components/ShakePlayer/ShakaPlayer.module.css.js +4 -4
- package/dist/components/AttachmentsGalleryModal/components/ShakePlayer/useShakePlayer.d.ts +1 -1
- package/dist/components/AttachmentsGalleryModal/components/ShakePlayer/useShakePlayer.d.ts.map +1 -1
- package/dist/components/AttachmentsGalleryModal/components/ShakePlayer/useShakePlayer.js +43 -36
- package/dist/components/AttachmentsGalleryModal/components/UnsupportedSection.d.ts +6 -0
- package/dist/components/AttachmentsGalleryModal/components/UnsupportedSection.d.ts.map +1 -0
- package/dist/components/AttachmentsGalleryModal/components/UnsupportedSection.js +16 -0
- package/dist/components/AttachmentsGalleryModal/hooks/useGetPreviewUrl.d.ts +4 -0
- package/dist/components/AttachmentsGalleryModal/hooks/useGetPreviewUrl.d.ts.map +1 -1
- package/dist/components/AttachmentsGalleryModal/hooks/useGetPreviewUrl.js +59 -20
- package/dist/components/AttachmentsGalleryModal/styles.module.css.js +28 -18
- package/dist/components/AttachmentsPreview/AttachmentsPreview.d.ts.map +1 -1
- package/dist/components/AttachmentsPreview/AttachmentsPreview.js +22 -18
- package/dist/components/AttachmentsPreview/AttachmentsPreview.module.css.js +1 -1
- package/dist/components/BouncingLogo/BouncingLogo.module.css.js +8 -8
- package/dist/components/CollapsibleContainer/CollapsibleContainer.module.css.js +1 -1
- package/dist/components/ColorPicker/ColorPicker.d.ts +19 -21
- package/dist/components/ColorPicker/ColorPicker.d.ts.map +1 -1
- package/dist/components/ColorPicker/ColorPicker.js +136 -144
- package/dist/components/CommentComposer/CommentComposer.module.css.js +4 -4
- package/dist/components/CommentComposer/CommentEditorHotkeys.d.ts.map +1 -1
- package/dist/components/CommentComposer/CommentEditorHotkeys.js +3 -4
- package/dist/components/CommentComposer/index.js +1 -1
- package/dist/components/CommentComposer/useVirtualAnchor.d.ts +1 -1
- package/dist/components/CommentComposer/useVirtualAnchor.d.ts.map +1 -1
- package/dist/components/CommunitiesDialog/styles.module.css.js +1 -1
- package/dist/components/Copyright/Copyright.module.css.js +1 -1
- package/dist/components/CustomKBD/CustomKBD.module.css.js +1 -1
- package/dist/components/EmojiPicker/EmojiPanel.d.ts.map +1 -1
- package/dist/components/EmojiPicker/EmojiPanel.js +22 -22
- package/dist/components/EmojiPicker/EmojiPicker.d.ts +0 -1
- package/dist/components/EmojiPicker/EmojiPicker.d.ts.map +1 -1
- package/dist/components/EmojiPicker/EmojiPicker.js +0 -1
- package/dist/components/EmojiPicker/EmojiPicker.module.css.js +8 -8
- package/dist/components/EmojiPicker/IconsPanel.js +13 -13
- package/dist/components/EntityIcon.d.ts.map +1 -1
- package/dist/components/EntityIcon.js +43 -33
- package/dist/components/EntityTitle/EntityTitle.module.css.js +1 -1
- package/dist/components/ErrorPage/components/Error404.d.ts.map +1 -1
- package/dist/components/FeatureProgress/FeatureProgress.module.css.js +49 -49
- package/dist/components/FilePicker/FilePicker.d.ts +2 -4
- package/dist/components/FilePicker/FilePicker.d.ts.map +1 -1
- package/dist/components/FilePicker/FilePicker.js +226 -241
- package/dist/components/FilePicker/FilePicker.module.css.js +12 -14
- package/dist/components/FilePicker/FilePickerGallery.d.ts.map +1 -1
- package/dist/components/FilePicker/FilePickerGallery.js +34 -60
- package/dist/components/FilePicker/FilePickerGiphy.d.ts.map +1 -1
- package/dist/components/FilePicker/FilePickerGiphy.js +39 -38
- package/dist/components/FilePicker/FilePickerLink.d.ts.map +1 -1
- package/dist/components/FilePicker/FilePickerLink.js +26 -29
- package/dist/components/FilePicker/FilePickerUnsplash.d.ts.map +1 -1
- package/dist/components/FilePicker/FilePickerUnsplash.js +43 -42
- package/dist/components/FilePicker/FilePickerUpload.d.ts.map +1 -1
- package/dist/components/FilePicker/FilePickerUpload.js +35 -51
- package/dist/components/FilePicker/index.d.ts +0 -1
- package/dist/components/FilePicker/index.d.ts.map +1 -1
- package/dist/components/FormViewer/FormViewer.module.css.js +20 -20
- package/dist/components/FormViewer/components/fields/DragOptions/DragOptions.module.css.js +1 -1
- package/dist/components/FormViewer/components/fields/DropdownField/DropdownField.module.css.js +1 -1
- package/dist/components/FormViewer/components/fields/EditableContent/EditableContent.module.css.js +1 -1
- package/dist/components/FormViewer/components/fields/SelectableCard/SelectableCard.module.css.js +8 -8
- package/dist/components/FormViewer/components/fields/UploadField/UploadFile/UploadFile.module.css.js +4 -4
- package/dist/components/FormViewer/helpers/conditions.d.ts +38 -38
- package/dist/components/FormViewer/helpers/helpers.d.ts +38 -38
- package/dist/components/FormViewer/helpers/steps.d.ts +38 -38
- package/dist/components/FormViewer/hooks/useActiveControl.d.ts +19 -19
- package/dist/components/FormViewer/hooks/useActiveStep.d.ts +38 -38
- package/dist/components/FormViewer/hooks/useFormGlobalTheme.d.ts +6 -0
- package/dist/components/FormViewer/hooks/useFormGlobalTheme.d.ts.map +1 -1
- package/dist/components/FormViewer/hooks/useFormGlobalTheme.js +4 -3
- package/dist/components/FormViewer/hooks/useFormMobile.d.ts +1 -1
- package/dist/components/FormViewer/hooks/useFormMobile.d.ts.map +1 -1
- package/dist/components/FormViewer/store/formStore.d.ts +248 -248
- package/dist/components/FormViewer/store/formStore.d.ts.map +1 -1
- package/dist/components/FormViewer/store/formStoreApi.d.ts +124 -124
- package/dist/components/FormViewer/store/selectors.d.ts +11655 -11655
- package/dist/components/FormViewer/types/form.d.ts +1 -1
- package/dist/components/FormViewer/types/form.d.ts.map +1 -1
- package/dist/components/FormViewer/types/schemes.d.ts +381 -6358
- package/dist/components/FormViewer/types/schemes.d.ts.map +1 -1
- package/dist/components/FormViewer/types/schemes.js +1 -1
- package/dist/components/GroupAvatar/index.d.ts +3 -1
- package/dist/components/GroupAvatar/index.d.ts.map +1 -1
- package/dist/components/GroupAvatar/index.js +24 -21
- package/dist/components/ImageCropper/ImageCropper.module.css.js +38 -38
- package/dist/components/IntegrationFlowAnimation/IntegrationFlowAnimation.module.css.js +11 -11
- package/dist/components/LanguagePicker/LanguagePicker.module.css.js +1 -1
- package/dist/components/Loaders/styles.module.css.js +6 -6
- package/dist/components/MediaLibrary/MediaLibrary.module.css.js +2 -2
- package/dist/components/MediaLibrary/MediaLibraryRow.js +7 -7
- package/dist/components/NavMenu/NavMenu.d.ts +3 -1
- package/dist/components/NavMenu/NavMenu.d.ts.map +1 -1
- package/dist/components/NavMenu/NavMenu.module.css.js +12 -12
- package/dist/components/NavMenu/components/DnDProvider.d.ts +1 -1
- package/dist/components/NavMenu/components/DnDProvider.d.ts.map +1 -1
- package/dist/components/NavMenu/components/NavMenuActionIcon.d.ts +7 -1
- package/dist/components/NavMenu/components/NavMenuActionIcon.d.ts.map +1 -1
- package/dist/components/NavMenu/components/NavMenuActionIcon.js +21 -23
- package/dist/components/NavbarResizer/NavbarResizer.module.css.js +2 -2
- package/dist/components/NewColorPicker/components/Target.d.ts +3 -1
- package/dist/components/NewColorPicker/components/Target.d.ts.map +1 -1
- package/dist/components/NewColorPicker/components/Target.js +48 -43
- package/dist/components/NotPublicPanel/NotPublicPanel.module.css.js +11 -11
- package/dist/components/Notification/Notification.js +3 -1
- package/dist/components/Notification/Notification.module.css.js +1 -1
- package/dist/components/Notification/NotificationCard.d.ts +3 -1
- package/dist/components/Notification/NotificationCard.d.ts.map +1 -1
- package/dist/components/Notification/NotificationCard.js +87 -86
- package/dist/components/OnBoarding/steps/DifferentLayouts/styles.module.css.js +3 -3
- package/dist/components/OnBoarding/steps/styles.module.css.js +9 -9
- package/dist/components/OnBoarding/styles.module.css.js +7 -7
- package/dist/components/OnboardingTour/OnboardingTourWrapper.d.ts +1 -1
- package/dist/components/OnboardingTour/OnboardingTourWrapper.d.ts.map +1 -1
- package/dist/components/OnboardingTour/OnboardingTourWrapper.js +70 -74
- package/dist/components/ProjectIcon/ProjectIcon.d.ts +7 -12
- package/dist/components/ProjectIcon/ProjectIcon.d.ts.map +1 -1
- package/dist/components/ProjectIcon/ProjectIcon.js +58 -60
- package/dist/components/SearchFilters/SearchFilters.module.css.js +1 -1
- package/dist/components/SettingsSection/styles.module.css.js +1 -1
- package/dist/components/StorageUsageProgress/StorageUsageProgress.module.css.js +1 -1
- package/dist/components/TreeIndent/TreeIndent.module.css.js +4 -4
- package/dist/components/UserAvatar/index.d.ts +2 -1
- package/dist/components/UserAvatar/index.d.ts.map +1 -1
- package/dist/components/UserAvatar/index.js +38 -35
- package/dist/components/WorkspaceAvatar/WorkspaceAvatar.d.ts +3 -3
- package/dist/components/WorkspaceAvatar/WorkspaceAvatar.d.ts.map +1 -1
- package/dist/components/WorkspaceAvatar/WorkspaceAvatar.js +19 -18
- package/dist/components/WorkspaceMenu/WorkspaceItem.js +17 -17
- package/dist/components/WorkspaceMenu/WorkspaceMenu.js +7 -7
- package/dist/components/table/FrontTable.d.ts.map +1 -1
- package/dist/components/table/hooks/useColumnsResizing.d.ts.map +1 -1
- package/dist/config/brand.js +8 -8
- package/dist/config/envConfig.d.ts +8 -0
- package/dist/config/envConfig.d.ts.map +1 -1
- package/dist/config/envConfig.js +21 -13
- package/dist/helpers/getFileIcons.d.ts.map +1 -1
- package/dist/helpers/getFileIcons.js +63 -45
- package/dist/helpers/getFileType.d.ts +1 -1
- package/dist/helpers/getFileType.d.ts.map +1 -1
- package/dist/helpers/getFileType.js +29 -8
- package/dist/helpers/getPartOfTheDay.d.ts +1 -1
- package/dist/helpers/offlineSuppression.d.ts +3 -0
- package/dist/helpers/offlineSuppression.d.ts.map +1 -0
- package/dist/helpers/offlineSuppression.js +8 -0
- package/dist/helpers/platform.d.ts +1 -1
- package/dist/helpers/platform.d.ts.map +1 -1
- package/dist/helpers/platform.js +5 -4
- package/dist/helpers/showFeatureFeedback.module.css.js +4 -4
- package/dist/helpers/showNotifications.d.ts.map +1 -1
- package/dist/helpers/showNotifications.js +30 -29
- package/dist/helpers/showNotifications.module.css.js +1 -1
- package/dist/hooks/useOutsideClick.d.ts +1 -1
- package/dist/hooks/useOutsideClick.d.ts.map +1 -1
- package/dist/index.css +1 -1
- package/dist/index.d.ts +1 -6
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +498 -509
- package/dist/lang/locales/ui_en.json.js +18 -20
- package/dist/lang/locales/ui_es.json.js +12 -14
- package/dist/lang/locales/ui_ru.json.js +13 -15
- package/dist/node_modules/countries-and-timezones/esm/index.js +281 -4011
- package/docs/README.md +499 -499
- package/package.json +75 -75
- package/dist/components/ColorPicker/ColorPicker.module.css.js +0 -31
- package/dist/components/ColorPicker/ColorPickerList.d.ts +0 -6
- package/dist/components/ColorPicker/ColorPickerList.d.ts.map +0 -1
- package/dist/components/ColorPicker/ColorPickerList.js +0 -134
- package/dist/components/ColorPicker/ColorPickerToolbar.d.ts +0 -13
- package/dist/components/ColorPicker/ColorPickerToolbar.d.ts.map +0 -1
- package/dist/components/ColorPicker/ColorPickerToolbar.js +0 -149
- package/dist/components/ColorPicker/icons.d.ts +0 -11
- package/dist/components/ColorPicker/icons.d.ts.map +0 -1
- package/dist/components/ColorPicker/icons.js +0 -71
- package/dist/components/ColorPicker/types.d.ts +0 -49
- package/dist/components/ColorPicker/types.d.ts.map +0 -1
- package/dist/components/ColorPicker/types.js +0 -10
- package/dist/components/ColorPicker/useRecentColors.d.ts +0 -13
- package/dist/components/ColorPicker/useRecentColors.d.ts.map +0 -1
- package/dist/components/ColorPicker/useRecentColors.js +0 -39
- package/dist/components/FilePicker/coverCollections.d.ts +0 -4
- package/dist/components/FilePicker/coverCollections.d.ts.map +0 -1
- package/dist/components/FilePicker/coverCollections.js +0 -164
|
@@ -1,23 +1,22 @@
|
|
|
1
|
-
import { jsx as e, jsxs as
|
|
2
|
-
import { useState as
|
|
3
|
-
import { useTranslation as
|
|
4
|
-
import { ImageAdd02Icon as
|
|
5
|
-
import { HugeiconsIcon as
|
|
6
|
-
import { Flex as
|
|
7
|
-
import { getEnvConfig as
|
|
8
|
-
import { isFeature as
|
|
9
|
-
import { useMenu as
|
|
10
|
-
import { usePlatform as
|
|
11
|
-
import { MediaLibraryBrowser as
|
|
12
|
-
import { FilePickerGallery as
|
|
13
|
-
import { FilePickerGiphy as
|
|
14
|
-
import {
|
|
15
|
-
import {
|
|
16
|
-
import {
|
|
17
|
-
import { FilePickerUpload as
|
|
18
|
-
import
|
|
19
|
-
|
|
20
|
-
const be = [
|
|
1
|
+
import { jsx as e, jsxs as c } from "react/jsx-runtime";
|
|
2
|
+
import { useState as x, useMemo as y } from "react";
|
|
3
|
+
import { useTranslation as J } from "react-i18next";
|
|
4
|
+
import { ImageAdd02Icon as F } from "@hugeicons/core-free-icons";
|
|
5
|
+
import { HugeiconsIcon as P } from "@hugeicons/react";
|
|
6
|
+
import { Flex as a, ActionIcon as K, Button as M, Text as Q, Popover as u, Tabs as f, Stack as W } from "@mantine/core";
|
|
7
|
+
import { getEnvConfig as S } from "../../config/envConfig.js";
|
|
8
|
+
import { isFeature as X } from "../../helpers/feature.js";
|
|
9
|
+
import { useMenu as Y } from "../../hooks/useMenu.js";
|
|
10
|
+
import { usePlatform as Z } from "../../hooks/usePlatform.js";
|
|
11
|
+
import { MediaLibraryBrowser as $ } from "../MediaLibrary/MediaLibraryBrowser.js";
|
|
12
|
+
import { FilePickerGallery as D } from "./FilePickerGallery.js";
|
|
13
|
+
import { FilePickerGiphy as ee } from "./FilePickerGiphy.js";
|
|
14
|
+
import { FilePickerGoogleDrive as ne } from "./FilePickerGoogleDrive.js";
|
|
15
|
+
import { FilePickerLink as ie } from "./FilePickerLink.js";
|
|
16
|
+
import { FilePickerUnsplash as le } from "./FilePickerUnsplash.js";
|
|
17
|
+
import { FilePickerUpload as ae } from "./FilePickerUpload.js";
|
|
18
|
+
import I from "./FilePicker.module.css.js";
|
|
19
|
+
const re = [
|
|
21
20
|
"gallery",
|
|
22
21
|
"upload",
|
|
23
22
|
"link",
|
|
@@ -25,245 +24,231 @@ const be = [
|
|
|
25
24
|
"giphy",
|
|
26
25
|
"googleDrive",
|
|
27
26
|
"media"
|
|
28
|
-
],
|
|
29
|
-
onChange:
|
|
30
|
-
onRemove:
|
|
31
|
-
onUpload:
|
|
32
|
-
uploading:
|
|
33
|
-
showTabs:
|
|
34
|
-
children:
|
|
35
|
-
width:
|
|
36
|
-
position:
|
|
37
|
-
readOnly:
|
|
38
|
-
hasImage:
|
|
39
|
-
giphyToken:
|
|
40
|
-
unsplashClientId:
|
|
41
|
-
type:
|
|
42
|
-
galleryCollection:
|
|
43
|
-
isValidMediaUrl:
|
|
44
|
-
popoverProps:
|
|
45
|
-
dropZoneProps:
|
|
46
|
-
targetProps:
|
|
47
|
-
onOpenedChange:
|
|
48
|
-
googleDrive:
|
|
49
|
-
mediaLibrary:
|
|
50
|
-
inline: p = !1,
|
|
51
|
-
tab: C
|
|
27
|
+
], Se = ({
|
|
28
|
+
onChange: z,
|
|
29
|
+
onRemove: B,
|
|
30
|
+
onUpload: m,
|
|
31
|
+
uploading: E = !1,
|
|
32
|
+
showTabs: s = re,
|
|
33
|
+
children: G,
|
|
34
|
+
width: T = 610,
|
|
35
|
+
position: V = "bottom-end",
|
|
36
|
+
readOnly: j = !1,
|
|
37
|
+
hasImage: L,
|
|
38
|
+
giphyToken: se,
|
|
39
|
+
unsplashClientId: oe,
|
|
40
|
+
type: g = "image",
|
|
41
|
+
galleryCollection: d = [],
|
|
42
|
+
isValidMediaUrl: A,
|
|
43
|
+
popoverProps: N,
|
|
44
|
+
dropZoneProps: U,
|
|
45
|
+
targetProps: _,
|
|
46
|
+
onOpenedChange: H,
|
|
47
|
+
googleDrive: i,
|
|
48
|
+
mediaLibrary: r
|
|
52
49
|
}) => {
|
|
53
|
-
const { t:
|
|
54
|
-
|
|
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,
|
|
50
|
+
const { t: l } = J("ui"), [v, p] = x(!1), { isMobile: b } = Y(), k = Z(), h = y(
|
|
51
|
+
() => [
|
|
128
52
|
{
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
t === "upload" && /* @__PURE__ */ e(
|
|
134
|
-
ge,
|
|
53
|
+
value: "gallery",
|
|
54
|
+
label: /* @__PURE__ */ e(a, { children: /* @__PURE__ */ e("span", { children: l("changeCover.gallery") }) }),
|
|
55
|
+
visible: s.includes("gallery") && !!d.length
|
|
56
|
+
},
|
|
135
57
|
{
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
}
|
|
141
|
-
),
|
|
142
|
-
t === "link" && /* @__PURE__ */ e(
|
|
143
|
-
pe,
|
|
58
|
+
value: "upload",
|
|
59
|
+
label: /* @__PURE__ */ e(a, { children: /* @__PURE__ */ e("span", { children: l("changeCover.upload") }) }),
|
|
60
|
+
visible: s.includes("upload") && !!m
|
|
61
|
+
},
|
|
144
62
|
{
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
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,
|
|
63
|
+
value: "link",
|
|
64
|
+
label: /* @__PURE__ */ e(a, { children: /* @__PURE__ */ e("span", { children: l("changeCover.link") }) }),
|
|
65
|
+
visible: s.includes("link")
|
|
66
|
+
},
|
|
154
67
|
{
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
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,
|
|
68
|
+
value: "unsplash",
|
|
69
|
+
label: /* @__PURE__ */ e(a, { children: /* @__PURE__ */ e("span", { children: l("changeCover.searchImages") }) }),
|
|
70
|
+
visible: s.includes("unsplash") && S().media?.unsplashEnabled !== !1
|
|
71
|
+
},
|
|
171
72
|
{
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
onFolderClick: a.onFolderClick,
|
|
176
|
-
onBreadcrumbClick: a.onBreadcrumbClick,
|
|
177
|
-
onSelect: (n) => {
|
|
178
|
-
a.onSelect?.(n), m(!1);
|
|
179
|
-
}
|
|
180
|
-
}
|
|
181
|
-
)
|
|
182
|
-
] }), ee = /* @__PURE__ */ e(r, { justify: "space-between", align: "center", children: /* @__PURE__ */ e(
|
|
183
|
-
x,
|
|
184
|
-
{
|
|
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
|
-
}
|
|
73
|
+
value: "giphy",
|
|
74
|
+
label: /* @__PURE__ */ e(a, { children: /* @__PURE__ */ e("span", { children: "GIFs" }) }),
|
|
75
|
+
visible: s.includes("giphy") && k.has("giphy") && S().media?.giphyEnabled !== !1
|
|
193
76
|
},
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
children: i("remove")
|
|
230
|
-
}
|
|
231
|
-
)
|
|
232
|
-
]
|
|
233
|
-
}
|
|
234
|
-
)
|
|
235
|
-
}
|
|
236
|
-
) });
|
|
237
|
-
return p ? /* @__PURE__ */ e(
|
|
238
|
-
ae,
|
|
77
|
+
{
|
|
78
|
+
value: "googleDrive",
|
|
79
|
+
label: /* @__PURE__ */ e(a, { children: /* @__PURE__ */ e("span", { children: l("changeCover.googleDrive", {
|
|
80
|
+
defaultValue: "Google Drive"
|
|
81
|
+
}) }) }),
|
|
82
|
+
visible: s.includes("googleDrive") && !!i
|
|
83
|
+
},
|
|
84
|
+
{
|
|
85
|
+
value: "media",
|
|
86
|
+
label: /* @__PURE__ */ e(a, { children: /* @__PURE__ */ e("span", { children: l("changeCover.media", { defaultValue: "Media" }) }) }),
|
|
87
|
+
visible: s.includes("media") && !!r && X()
|
|
88
|
+
}
|
|
89
|
+
].filter((n) => n.visible),
|
|
90
|
+
[
|
|
91
|
+
s,
|
|
92
|
+
k,
|
|
93
|
+
l,
|
|
94
|
+
d.length,
|
|
95
|
+
m,
|
|
96
|
+
i,
|
|
97
|
+
r
|
|
98
|
+
]
|
|
99
|
+
), [o, O] = x(() => {
|
|
100
|
+
if (h[0]) return h[0].value;
|
|
101
|
+
const n = h.find((w) => w.visible);
|
|
102
|
+
return n ? n.value : "";
|
|
103
|
+
}), R = (n) => {
|
|
104
|
+
m?.(n, p);
|
|
105
|
+
}, t = (n) => {
|
|
106
|
+
z?.(n), p(!1);
|
|
107
|
+
}, q = y(() => b ? /* @__PURE__ */ c(K, { size: "lg", children: [
|
|
108
|
+
/* @__PURE__ */ e(P, { icon: F, size: 22 }),
|
|
109
|
+
" "
|
|
110
|
+
] }) : /* @__PURE__ */ e(
|
|
111
|
+
M,
|
|
239
112
|
{
|
|
240
|
-
"
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
children: B
|
|
113
|
+
variant: "default",
|
|
114
|
+
size: "xs",
|
|
115
|
+
leftSection: /* @__PURE__ */ e(P, { icon: F, size: 16 }),
|
|
116
|
+
children: /* @__PURE__ */ e(Q, { fw: 600, size: "sm", children: l("changeCover.change") })
|
|
245
117
|
}
|
|
246
|
-
)
|
|
247
|
-
|
|
118
|
+
), [l, b]), C = (n) => {
|
|
119
|
+
p(n), H?.(n);
|
|
120
|
+
};
|
|
121
|
+
return /* @__PURE__ */ c(
|
|
122
|
+
u,
|
|
248
123
|
{
|
|
249
|
-
width:
|
|
124
|
+
width: T,
|
|
250
125
|
radius: "var(--mantine-spacing-sm)",
|
|
251
|
-
position:
|
|
126
|
+
position: V,
|
|
252
127
|
shadow: "md",
|
|
253
|
-
opened:
|
|
254
|
-
onChange:
|
|
128
|
+
opened: v,
|
|
129
|
+
onChange: C,
|
|
255
130
|
withinPortal: !0,
|
|
256
|
-
...
|
|
131
|
+
...N || {},
|
|
257
132
|
children: [
|
|
258
|
-
/* @__PURE__ */ e(
|
|
259
|
-
/* @__PURE__ */
|
|
260
|
-
|
|
261
|
-
|
|
133
|
+
/* @__PURE__ */ e(u.Target, { children: /* @__PURE__ */ e(a, { onClick: () => C(!v), ..._, children: G ?? q }) }),
|
|
134
|
+
/* @__PURE__ */ c(u.Dropdown, { p: 0, children: [
|
|
135
|
+
/* @__PURE__ */ e(a, { justify: "space-between", align: "center", children: /* @__PURE__ */ e(
|
|
136
|
+
f,
|
|
137
|
+
{
|
|
138
|
+
defaultValue: "gallery",
|
|
139
|
+
value: o,
|
|
140
|
+
styles: {
|
|
141
|
+
list: {
|
|
142
|
+
alignItems: "center",
|
|
143
|
+
paddingRight: "var(--mantine-spacing-xs)"
|
|
144
|
+
}
|
|
145
|
+
},
|
|
146
|
+
w: "100%",
|
|
147
|
+
children: /* @__PURE__ */ c(
|
|
148
|
+
f.List,
|
|
149
|
+
{
|
|
150
|
+
style: {
|
|
151
|
+
gap: "4px"
|
|
152
|
+
},
|
|
153
|
+
px: 8,
|
|
154
|
+
h: 54,
|
|
155
|
+
children: [
|
|
156
|
+
h.map((n) => /* @__PURE__ */ e(
|
|
157
|
+
f.Tab,
|
|
158
|
+
{
|
|
159
|
+
className: I.originalTab,
|
|
160
|
+
disabled: j,
|
|
161
|
+
h: "100%",
|
|
162
|
+
p: 0,
|
|
163
|
+
value: n.value,
|
|
164
|
+
onClick: () => O(n.value),
|
|
165
|
+
children: /* @__PURE__ */ e(a, { className: I.customTab, px: "sm", h: 36, children: n.label })
|
|
166
|
+
},
|
|
167
|
+
n.value
|
|
168
|
+
)),
|
|
169
|
+
L && /* @__PURE__ */ e(
|
|
170
|
+
M,
|
|
171
|
+
{
|
|
172
|
+
variant: "subtle",
|
|
173
|
+
fz: "sm",
|
|
174
|
+
lh: "sm",
|
|
175
|
+
fw: 500,
|
|
176
|
+
px: "sm",
|
|
177
|
+
size: "30px",
|
|
178
|
+
onClick: B,
|
|
179
|
+
color: "var(--mantine-color-gray-light-color)",
|
|
180
|
+
style: { marginLeft: "auto" },
|
|
181
|
+
children: l("remove")
|
|
182
|
+
}
|
|
183
|
+
)
|
|
184
|
+
]
|
|
185
|
+
}
|
|
186
|
+
)
|
|
187
|
+
}
|
|
188
|
+
) }),
|
|
189
|
+
/* @__PURE__ */ c(W, { gap: 0, px: 8, pb: 8, pt: "sm", children: [
|
|
190
|
+
o === "gallery" && !!d.length && /* @__PURE__ */ e(
|
|
191
|
+
D,
|
|
192
|
+
{
|
|
193
|
+
galleryCollection: d,
|
|
194
|
+
onChange: t
|
|
195
|
+
}
|
|
196
|
+
),
|
|
197
|
+
o === "upload" && /* @__PURE__ */ e(
|
|
198
|
+
ae,
|
|
199
|
+
{
|
|
200
|
+
type: g || "image",
|
|
201
|
+
uploading: E,
|
|
202
|
+
dropZoneProps: U,
|
|
203
|
+
onUpload: R
|
|
204
|
+
}
|
|
205
|
+
),
|
|
206
|
+
o === "link" && /* @__PURE__ */ e(
|
|
207
|
+
ie,
|
|
208
|
+
{
|
|
209
|
+
type: g || "image",
|
|
210
|
+
onChange: t,
|
|
211
|
+
isValidMediaUrl: A
|
|
212
|
+
}
|
|
213
|
+
),
|
|
214
|
+
o === "unsplash" && /* @__PURE__ */ e(le, { onChange: t }),
|
|
215
|
+
o === "giphy" && /* @__PURE__ */ e(ee, { onChange: t }),
|
|
216
|
+
o === "googleDrive" && i && /* @__PURE__ */ e(
|
|
217
|
+
ne,
|
|
218
|
+
{
|
|
219
|
+
isConnected: i.isConnected,
|
|
220
|
+
connectedEmail: i.connectedEmail,
|
|
221
|
+
files: i.files,
|
|
222
|
+
isLoading: i.isLoading,
|
|
223
|
+
hasMore: i.hasMore,
|
|
224
|
+
isImporting: i.isImporting,
|
|
225
|
+
onSearch: i.onSearch,
|
|
226
|
+
onLoadMore: i.onLoadMore,
|
|
227
|
+
onSelect: (n) => {
|
|
228
|
+
i.onSelect(n, t);
|
|
229
|
+
},
|
|
230
|
+
error: i.error
|
|
231
|
+
}
|
|
232
|
+
),
|
|
233
|
+
o === "media" && r && /* @__PURE__ */ e(
|
|
234
|
+
$,
|
|
235
|
+
{
|
|
236
|
+
items: r.items,
|
|
237
|
+
isLoading: r.isLoading,
|
|
238
|
+
breadcrumbs: r.breadcrumbs,
|
|
239
|
+
onFolderClick: r.onFolderClick,
|
|
240
|
+
onBreadcrumbClick: r.onBreadcrumbClick,
|
|
241
|
+
onSelect: (n) => {
|
|
242
|
+
r.onSelect?.(n), p(!1);
|
|
243
|
+
}
|
|
244
|
+
}
|
|
245
|
+
)
|
|
246
|
+
] })
|
|
262
247
|
] })
|
|
263
248
|
]
|
|
264
249
|
}
|
|
265
250
|
);
|
|
266
251
|
};
|
|
267
252
|
export {
|
|
268
|
-
|
|
253
|
+
Se as FilePicker
|
|
269
254
|
};
|
|
@@ -1,17 +1,15 @@
|
|
|
1
|
-
const
|
|
2
|
-
itemImage:
|
|
3
|
-
imageAuthor:
|
|
4
|
-
originalTab:
|
|
5
|
-
customTab:
|
|
6
|
-
button:
|
|
7
|
-
pickerDropZone: n
|
|
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
|
|
8
7
|
};
|
|
9
8
|
export {
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
n as pickerDropZone
|
|
9
|
+
m as button,
|
|
10
|
+
e as customTab,
|
|
11
|
+
_ as default,
|
|
12
|
+
o as imageAuthor,
|
|
13
|
+
t as itemImage,
|
|
14
|
+
a as originalTab
|
|
17
15
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"FilePickerGallery.d.ts","sourceRoot":"","sources":["../../../src/components/FilePicker/FilePickerGallery.tsx"],"names":[],"mappings":"
|
|
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,64 +1,38 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
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,
|
|
22
24
|
{
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
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
|
|
25
|
+
onClick: () => t?.(i),
|
|
26
|
+
ratio: 120 / 65,
|
|
27
|
+
className: d.itemImage,
|
|
28
|
+
style: {
|
|
29
|
+
backgroundImage: `url(${i})`
|
|
42
30
|
}
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
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
|
-
};
|
|
31
|
+
},
|
|
32
|
+
a
|
|
33
|
+
);
|
|
34
|
+
}) })
|
|
35
|
+
] }, e.id)) });
|
|
62
36
|
export {
|
|
63
|
-
|
|
37
|
+
x as FilePickerGallery
|
|
64
38
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"FilePickerGiphy.d.ts","sourceRoot":"","sources":["../../../src/components/FilePicker/FilePickerGiphy.tsx"],"names":[],"mappings":"
|
|
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"}
|