@layers-app/shared 0.2.6 → 0.2.8-test
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/assets/svg/socials/instagram.svg.js +3 -3
- package/dist/components/AliasTextInput/AliasTextInput.d.ts.map +1 -1
- package/dist/components/AliasTextInput/AliasTextInput.js +21 -20
- package/dist/components/AppContainer/AppContainer.js +3 -3
- package/dist/components/AppContainer/AppContainer.module.css.js +1 -1
- package/dist/components/AppContainer/components/AppSidebarButton.d.ts +1 -1
- package/dist/components/AppContainer/components/AppSidebarButton.d.ts.map +1 -1
- package/dist/components/AppContainer/components/AppSidebarButton.js +4 -4
- package/dist/components/AppContainer/components/AppsSidebar/AppsSection.d.ts.map +1 -1
- package/dist/components/AppContainer/components/AppsSidebar/AppsSection.js +40 -32
- package/dist/components/AppContainer/components/AppsSidebar/TopSection.d.ts.map +1 -1
- package/dist/components/AppContainer/components/AppsSidebar/TopSection.js +41 -33
- package/dist/components/AppContainer/components/AppsSidebar/UserSection.d.ts.map +1 -1
- package/dist/components/AppContainer/components/AppsSidebar/UserSection.js +58 -49
- package/dist/components/AppContainer/components/menus/HelpMenu/HelpMenu.d.ts.map +1 -1
- package/dist/components/AppContainer/components/menus/HelpMenu/HelpMenu.js +151 -51
- package/dist/components/AppContainer/components/menus/HelpMenu/HelpMenu.module.css.js +1 -1
- package/dist/components/AppContainer/hooks/useAppContainer.d.ts +1 -1
- package/dist/components/AppContainer/hooks/useAppContainer.d.ts.map +1 -1
- package/dist/components/AppContainer/hooks/useAppContainer.js +46 -43
- package/dist/components/AppContainer/hooks/useAppContainerDataStore.d.ts.map +1 -1
- package/dist/components/AppContainer/hooks/useAppContainerDataStore.js +4 -3
- package/dist/components/AppContainer/types.d.ts +2 -1
- package/dist/components/AppContainer/types.d.ts.map +1 -1
- package/dist/components/AppShell/AppShell.module.css.js +5 -5
- package/dist/components/AttachmentsGalleryModal/components/ShakePlayer/ShakaPlayer.module.css.js +4 -4
- package/dist/components/AttachmentsGalleryModal/styles.module.css.js +14 -14
- 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/CommentComposer/CommentComposer.module.css.js +4 -4
- 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/EmojiPicker.d.ts.map +1 -1
- package/dist/components/EmojiPicker/EmojiPicker.js +28 -29
- package/dist/components/EmojiPicker/EmojiPicker.module.css.js +8 -8
- 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.d.ts +11 -0
- package/dist/components/FeatureProgress/FeatureProgress.d.ts.map +1 -0
- package/dist/components/FeatureProgress/FeatureProgress.js +148 -0
- package/dist/components/FeatureProgress/FeatureProgress.module.css.js +81 -0
- package/dist/components/FeatureProgress/FeatureProgressCelebrationIcon.d.ts +2 -0
- package/dist/components/FeatureProgress/FeatureProgressCelebrationIcon.d.ts.map +1 -0
- package/dist/components/FeatureProgress/FeatureProgressCelebrationIcon.js +88 -0
- package/dist/components/FeatureProgress/FeatureProgressCompleteModal.d.ts +9 -0
- package/dist/components/FeatureProgress/FeatureProgressCompleteModal.d.ts.map +1 -0
- package/dist/components/FeatureProgress/FeatureProgressCompleteModal.js +35 -0
- package/dist/components/FeatureProgress/constants.d.ts +4 -0
- package/dist/components/FeatureProgress/constants.d.ts.map +1 -0
- package/dist/components/FeatureProgress/constants.js +4 -0
- package/dist/components/FeatureProgress/index.d.ts +3 -0
- package/dist/components/FeatureProgress/index.d.ts.map +1 -0
- package/dist/components/FilePicker/FilePicker.d.ts +4 -2
- package/dist/components/FilePicker/FilePicker.d.ts.map +1 -1
- package/dist/components/FilePicker/FilePicker.js +247 -229
- package/dist/components/FilePicker/FilePicker.module.css.js +12 -10
- package/dist/components/FilePicker/FilePickerGallery.d.ts.map +1 -1
- package/dist/components/FilePicker/FilePickerGallery.js +59 -33
- package/dist/components/FilePicker/FilePickerGiphy.d.ts.map +1 -1
- package/dist/components/FilePicker/FilePickerGiphy.js +38 -38
- package/dist/components/FilePicker/FilePickerLink.d.ts.map +1 -1
- package/dist/components/FilePicker/FilePickerLink.js +18 -15
- package/dist/components/FilePicker/FilePickerUnsplash.d.ts.map +1 -1
- package/dist/components/FilePicker/FilePickerUnsplash.js +39 -39
- package/dist/components/FilePicker/FilePickerUpload.d.ts.map +1 -1
- package/dist/components/FilePicker/FilePickerUpload.js +51 -35
- package/dist/components/FilePicker/api/giphyApi.js +10 -10
- package/dist/components/FilePicker/coverCollections.d.ts +4 -0
- package/dist/components/FilePicker/coverCollections.d.ts.map +1 -0
- package/dist/components/FilePicker/coverCollections.js +164 -0
- package/dist/components/FilePicker/index.d.ts +1 -0
- 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/OneSlideLayput.js +39 -37
- 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/PictureSelectableCard.js +42 -42
- 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/hooks/useCreateFormContext.d.ts.map +1 -1
- package/dist/components/FormViewer/hooks/useCreateFormContext.js +10 -10
- package/dist/components/FormViewer/store/formStore.d.ts.map +1 -1
- package/dist/components/FormViewer/store/formStoreApi.js +13 -13
- package/dist/components/ImageCropper/ImageCropper.d.ts.map +1 -1
- package/dist/components/ImageCropper/ImageCropper.js +185 -183
- package/dist/components/ImageCropper/ImageCropper.module.css.js +38 -38
- package/dist/components/ImageCropper/index.d.ts +1 -1
- package/dist/components/ImageCropper/index.d.ts.map +1 -1
- package/dist/components/ImageCropper/useCropInteraction.d.ts.map +1 -1
- package/dist/components/ImageCropper/useCropInteraction.js +13 -2
- package/dist/components/IntegrationFlowAnimation/IntegrationFlowAnimation.d.ts.map +1 -1
- package/dist/components/IntegrationFlowAnimation/IntegrationFlowAnimation.module.css.js +7 -7
- package/dist/components/IntegrationFlowAnimation/icons/GoogleDriveIcon.d.ts +1 -1
- package/dist/components/IntegrationFlowAnimation/icons/GoogleDriveIcon.d.ts.map +1 -1
- package/dist/components/IntegrationFlowAnimation/icons/GoogleDriveIcon.js +3 -1
- package/dist/components/IntegrationFlowAnimation/icons/LayersCubeIcon.d.ts +1 -1
- package/dist/components/IntegrationFlowAnimation/icons/LayersCubeIcon.d.ts.map +1 -1
- package/dist/components/IntegrationFlowAnimation/icons/LayersCubeIcon.js +3 -1
- package/dist/components/LanguagePicker/LanguagePicker.d.ts.map +1 -1
- package/dist/components/LanguagePicker/LanguagePicker.js +45 -35
- package/dist/components/LanguagePicker/LanguagePicker.module.css.js +6 -4
- 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.d.ts.map +1 -1
- package/dist/components/MediaLibrary/MediaLibraryRow.js +16 -4
- package/dist/components/NavMenu/NavMenu.d.ts +2 -1
- package/dist/components/NavMenu/NavMenu.d.ts.map +1 -1
- package/dist/components/NavMenu/NavMenu.module.css.js +16 -16
- package/dist/components/NavMenu/components/NavMenuItem.d.ts +2 -1
- package/dist/components/NavMenu/components/NavMenuItem.d.ts.map +1 -1
- package/dist/components/NavMenu/components/NavMenuItem.js +128 -106
- package/dist/components/NavMenu/types.d.ts +1 -0
- package/dist/components/NavMenu/types.d.ts.map +1 -1
- package/dist/components/NavbarResizer/NavbarResizer.module.css.js +2 -2
- package/dist/components/NotPublicPanel/NotPublicPanel.module.css.js +11 -11
- package/dist/components/Notification/Notification.module.css.js +1 -1
- 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/OnboardingTourFooter.d.ts +17 -0
- package/dist/components/OnboardingTour/OnboardingTourFooter.d.ts.map +1 -0
- package/dist/components/OnboardingTour/OnboardingTourFooter.js +40 -0
- package/dist/components/OnboardingTour/OnboardingTourWrapper.d.ts +13 -0
- package/dist/components/OnboardingTour/OnboardingTourWrapper.d.ts.map +1 -0
- package/dist/components/OnboardingTour/OnboardingTourWrapper.js +164 -0
- package/dist/components/OnboardingTour/index.d.ts +4 -0
- package/dist/components/OnboardingTour/index.d.ts.map +1 -0
- package/dist/components/OnboardingTour/useOnboardingTour.d.ts +14 -0
- package/dist/components/OnboardingTour/useOnboardingTour.d.ts.map +1 -0
- package/dist/components/OnboardingTour/useOnboardingTour.js +50 -0
- package/dist/components/SearchFilters/SearchFilters.module.css.js +1 -1
- package/dist/components/SettingsSection/styles.module.css.js +1 -1
- package/dist/components/SocialLinkRow/index.d.ts.map +1 -1
- package/dist/components/SocialLinkRow/index.js +80 -58
- package/dist/components/StorageUsageProgress/StorageUsageProgress.module.css.js +1 -1
- package/dist/components/TimezonePicker/index.d.ts.map +1 -1
- package/dist/components/TimezonePicker/index.js +42 -41
- package/dist/components/UserAvatar/index.d.ts.map +1 -1
- package/dist/components/UserAvatar/index.js +11 -10
- package/dist/components/WorkspaceMenu/WorkspaceItem.d.ts.map +1 -1
- package/dist/components/WorkspaceMenu/WorkspaceItem.js +21 -21
- package/dist/components/WorkspaceMenu/WorkspaceMenu.d.ts.map +1 -1
- package/dist/components/WorkspaceMenu/WorkspaceMenu.js +74 -74
- package/dist/components/table/FrontTable.d.ts.map +1 -1
- package/dist/components/table/hooks/useColumnsResizing.d.ts.map +1 -1
- package/dist/helpers/getFileIcons.js +1 -1
- package/dist/helpers/getFileType.d.ts +1 -1
- package/dist/helpers/getFileType.d.ts.map +1 -1
- package/dist/helpers/platform.d.ts +14 -0
- package/dist/helpers/platform.d.ts.map +1 -0
- package/dist/helpers/platform.js +33 -0
- package/dist/helpers/showFeatureFeedback.d.ts +16 -0
- package/dist/helpers/showFeatureFeedback.d.ts.map +1 -0
- package/dist/helpers/showFeatureFeedback.js +109 -0
- package/dist/helpers/showFeatureFeedback.module.css.js +9 -0
- package/dist/helpers/showNotifications.d.ts.map +1 -1
- package/dist/helpers/showNotifications.js +81 -113
- package/dist/helpers/showNotifications.module.css.js +10 -10
- package/dist/hooks/useFeatureFeedback.d.ts +23 -0
- package/dist/hooks/useFeatureFeedback.d.ts.map +1 -0
- package/dist/hooks/useFeatureFeedback.js +45 -0
- package/dist/hooks/usePlatform.d.ts +3 -0
- package/dist/hooks/usePlatform.d.ts.map +1 -0
- package/dist/hooks/usePlatform.js +10 -0
- package/dist/index.css +1 -1
- package/dist/index.d.ts +8 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +373 -334
- package/dist/lang/locales/ui_en.json.js +15 -15
- package/dist/lang/locales/ui_es.json.js +13 -13
- package/dist/lang/locales/ui_ru.json.js +12 -12
- package/dist/lib/contentImport/lexicalSerializer.js +59 -47
- package/dist/lib/contentImport/utils.d.ts.map +1 -1
- package/dist/lib/layersVisitData.d.ts +13 -0
- package/dist/lib/layersVisitData.d.ts.map +1 -0
- package/dist/lib/layersVisitData.js +37 -0
- package/dist/store/featureProgress.d.ts +39 -0
- package/dist/store/featureProgress.d.ts.map +1 -0
- package/dist/store/featureProgress.js +68 -0
- package/dist/store/plansModal.d.ts.map +1 -1
- package/dist/store/plansModal.js +8 -6
- package/docs/README.md +499 -499
- package/package.json +75 -74
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"FilePicker.d.ts","sourceRoot":"","sources":["../../../src/components/FilePicker/FilePicker.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,iBAAiB,
|
|
1
|
+
{"version":3,"file":"FilePicker.d.ts","sourceRoot":"","sources":["../../../src/components/FilePicker/FilePicker.tsx"],"names":[],"mappings":"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"}
|
|
@@ -1,20 +1,21 @@
|
|
|
1
|
-
import { jsx as
|
|
2
|
-
import { useState as
|
|
3
|
-
import { useTranslation as
|
|
4
|
-
import { ImageAdd02Icon as
|
|
5
|
-
import { HugeiconsIcon as
|
|
6
|
-
import { Flex as
|
|
7
|
-
import { isFeature as
|
|
8
|
-
import { useMenu as
|
|
9
|
-
import { MediaLibraryBrowser as
|
|
10
|
-
import { FilePickerGallery as
|
|
11
|
-
import { FilePickerGiphy as
|
|
12
|
-
import { FilePickerLink as
|
|
13
|
-
import { FilePickerUnsplash as
|
|
14
|
-
import { FilePickerGoogleDrive as
|
|
15
|
-
import { FilePickerUpload as
|
|
16
|
-
import
|
|
17
|
-
|
|
1
|
+
import { jsx as n, jsxs as u } from "react/jsx-runtime";
|
|
2
|
+
import { useState as j, useMemo as h, useEffect as ne } from "react";
|
|
3
|
+
import { useTranslation as ie } from "react-i18next";
|
|
4
|
+
import { ImageAdd02Icon as A } from "@hugeicons/core-free-icons";
|
|
5
|
+
import { HugeiconsIcon as E } from "@hugeicons/react";
|
|
6
|
+
import { Flex as a, ActionIcon as le, Button as L, Text as re, Tabs as F, Box as ae, Popover as y, Stack as te } from "@mantine/core";
|
|
7
|
+
import { isFeature as oe } from "../../helpers/feature.js";
|
|
8
|
+
import { useMenu as se } from "../../hooks/useMenu.js";
|
|
9
|
+
import { MediaLibraryBrowser as ce } from "../MediaLibrary/MediaLibraryBrowser.js";
|
|
10
|
+
import { FilePickerGallery as de } from "./FilePickerGallery.js";
|
|
11
|
+
import { FilePickerGiphy as ue } from "./FilePickerGiphy.js";
|
|
12
|
+
import { FilePickerLink as he } from "./FilePickerLink.js";
|
|
13
|
+
import { FilePickerUnsplash as me } from "./FilePickerUnsplash.js";
|
|
14
|
+
import { FilePickerGoogleDrive as pe } from "./FilePickerGoogleDrive.js";
|
|
15
|
+
import { FilePickerUpload as fe } from "./FilePickerUpload.js";
|
|
16
|
+
import { coverCollections as ge } from "./coverCollections.js";
|
|
17
|
+
import w from "./FilePicker.module.css.js";
|
|
18
|
+
const ve = [
|
|
18
19
|
"gallery",
|
|
19
20
|
"upload",
|
|
20
21
|
"link",
|
|
@@ -22,238 +23,255 @@ const re = [
|
|
|
22
23
|
"giphy",
|
|
23
24
|
"googleDrive",
|
|
24
25
|
"media"
|
|
25
|
-
],
|
|
26
|
-
onChange:
|
|
27
|
-
onRemove:
|
|
28
|
-
onUpload:
|
|
29
|
-
uploading:
|
|
30
|
-
showTabs:
|
|
31
|
-
children:
|
|
32
|
-
width:
|
|
33
|
-
position:
|
|
34
|
-
readOnly:
|
|
35
|
-
hasImage:
|
|
36
|
-
giphyToken:
|
|
37
|
-
unsplashClientId:
|
|
38
|
-
type:
|
|
39
|
-
galleryCollection:
|
|
40
|
-
isValidMediaUrl:
|
|
41
|
-
popoverProps:
|
|
42
|
-
dropZoneProps:
|
|
43
|
-
targetProps:
|
|
44
|
-
onOpenedChange:
|
|
26
|
+
], Ee = ({
|
|
27
|
+
onChange: N,
|
|
28
|
+
onRemove: U,
|
|
29
|
+
onUpload: b,
|
|
30
|
+
uploading: H = !1,
|
|
31
|
+
showTabs: o = ve,
|
|
32
|
+
children: O,
|
|
33
|
+
width: R = 610,
|
|
34
|
+
position: $ = "bottom-end",
|
|
35
|
+
readOnly: q = !1,
|
|
36
|
+
hasImage: J,
|
|
37
|
+
giphyToken: S,
|
|
38
|
+
unsplashClientId: M,
|
|
39
|
+
type: P = "image",
|
|
40
|
+
galleryCollection: m = [],
|
|
41
|
+
isValidMediaUrl: K,
|
|
42
|
+
popoverProps: Q,
|
|
43
|
+
dropZoneProps: W,
|
|
44
|
+
targetProps: X,
|
|
45
|
+
onOpenedChange: Y,
|
|
45
46
|
googleDrive: i,
|
|
46
|
-
mediaLibrary:
|
|
47
|
+
mediaLibrary: t,
|
|
48
|
+
inline: c = !1,
|
|
49
|
+
tab: k
|
|
47
50
|
}) => {
|
|
48
|
-
const { t: l } =
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
},
|
|
51
|
+
const { t: l } = ie("ui"), [z, p] = j(!1), { isMobile: G } = se(), f = h(() => m.length > 0 ? m : c ? ge.map((e) => ({
|
|
52
|
+
...e,
|
|
53
|
+
title: l(`coverGroups.${e.id}`, { defaultValue: e.id })
|
|
54
|
+
})) : m, [m, c, l]), r = h(() => [
|
|
55
|
+
{
|
|
56
|
+
value: "gallery",
|
|
57
|
+
label: /* @__PURE__ */ n(a, { children: /* @__PURE__ */ n("span", { children: l("changeCover.gallery") }) }),
|
|
58
|
+
visible: o.includes("gallery") && !!f.length
|
|
59
|
+
},
|
|
60
|
+
{
|
|
61
|
+
value: "upload",
|
|
62
|
+
label: /* @__PURE__ */ n(a, { children: /* @__PURE__ */ n("span", { children: l("changeCover.upload") }) }),
|
|
63
|
+
visible: o.includes("upload") && !!b
|
|
64
|
+
},
|
|
65
|
+
{
|
|
66
|
+
value: "link",
|
|
67
|
+
label: /* @__PURE__ */ n(a, { children: /* @__PURE__ */ n("span", { children: l("changeCover.link") }) }),
|
|
68
|
+
visible: o.includes("link")
|
|
69
|
+
},
|
|
70
|
+
{
|
|
71
|
+
value: "unsplash",
|
|
72
|
+
label: /* @__PURE__ */ n(a, { children: /* @__PURE__ */ n("span", { children: l("changeCover.searchImages") }) }),
|
|
73
|
+
visible: o.includes("unsplash") && M
|
|
74
|
+
},
|
|
75
|
+
{
|
|
76
|
+
value: "giphy",
|
|
77
|
+
label: /* @__PURE__ */ n(a, { children: /* @__PURE__ */ n("span", { children: "GIFs" }) }),
|
|
78
|
+
visible: o.includes("giphy") && S
|
|
79
|
+
},
|
|
80
|
+
{
|
|
81
|
+
value: "googleDrive",
|
|
82
|
+
label: /* @__PURE__ */ n(a, { children: /* @__PURE__ */ n("span", { children: l("changeCover.googleDrive", {
|
|
83
|
+
defaultValue: "Google Drive"
|
|
84
|
+
}) }) }),
|
|
85
|
+
visible: o.includes("googleDrive") && !!i
|
|
86
|
+
},
|
|
87
|
+
{
|
|
88
|
+
value: "media",
|
|
89
|
+
label: /* @__PURE__ */ n(a, { children: /* @__PURE__ */ n("span", { children: l("changeCover.media", { defaultValue: "Media" }) }) }),
|
|
90
|
+
visible: o.includes("media") && !!t && oe()
|
|
91
|
+
}
|
|
92
|
+
].filter((e) => e.visible), [
|
|
93
|
+
o,
|
|
94
|
+
l,
|
|
95
|
+
f.length,
|
|
96
|
+
b,
|
|
97
|
+
i,
|
|
98
|
+
t
|
|
99
|
+
]), g = k !== void 0, [Z, I] = j(() => {
|
|
100
|
+
if (k !== void 0) return "";
|
|
101
|
+
if (r[0]) return r[0].value;
|
|
102
|
+
const e = r.find((x) => x.visible);
|
|
103
|
+
return e ? e.value : "";
|
|
104
|
+
});
|
|
105
|
+
ne(() => {
|
|
106
|
+
g || r.length && I((e) => e && r.some((x) => x.value === e) ? e : r[0].value);
|
|
107
|
+
}, [r, g]);
|
|
108
|
+
const C = h(() => r.map((e) => e.value), [r]), v = g ? k : Z, s = h(() => v && C.includes(v) ? v : C[0] ?? "", [v, C]), B = (e) => {
|
|
109
|
+
g || I(e);
|
|
110
|
+
}, _ = (e) => {
|
|
111
|
+
b?.(e, p);
|
|
112
|
+
}, d = (e) => {
|
|
113
|
+
N?.(e), c || p(!1);
|
|
114
|
+
}, D = h(() => G ? /* @__PURE__ */ u(le, { size: "lg", children: [
|
|
115
|
+
/* @__PURE__ */ n(E, { icon: A, size: 22 }),
|
|
116
|
+
" "
|
|
117
|
+
] }) : /* @__PURE__ */ n(
|
|
118
|
+
L,
|
|
119
|
+
{
|
|
120
|
+
variant: "default",
|
|
121
|
+
size: "xs",
|
|
122
|
+
leftSection: /* @__PURE__ */ n(E, { icon: A, size: 16 }),
|
|
123
|
+
children: /* @__PURE__ */ n(re, { fw: 600, size: "sm", children: l("changeCover.change") })
|
|
124
|
+
}
|
|
125
|
+
), [l, G]), V = (e) => {
|
|
126
|
+
p(e), Y?.(e);
|
|
127
|
+
}, T = /* @__PURE__ */ u(te, { gap: 0, px: 8, pb: 8, pt: "sm", children: [
|
|
128
|
+
s === "gallery" && !!f.length && /* @__PURE__ */ n(
|
|
129
|
+
de,
|
|
55
130
|
{
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
131
|
+
galleryCollection: f,
|
|
132
|
+
onChange: d
|
|
133
|
+
}
|
|
134
|
+
),
|
|
135
|
+
s === "upload" && /* @__PURE__ */ n(
|
|
136
|
+
fe,
|
|
60
137
|
{
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
138
|
+
type: P || "image",
|
|
139
|
+
uploading: H,
|
|
140
|
+
dropZoneProps: W,
|
|
141
|
+
onUpload: _
|
|
142
|
+
}
|
|
143
|
+
),
|
|
144
|
+
s === "link" && /* @__PURE__ */ n(
|
|
145
|
+
he,
|
|
65
146
|
{
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
}
|
|
147
|
+
type: P || "image",
|
|
148
|
+
onChange: d,
|
|
149
|
+
isValidMediaUrl: K
|
|
150
|
+
}
|
|
151
|
+
),
|
|
152
|
+
s === "unsplash" && /* @__PURE__ */ n(
|
|
153
|
+
me,
|
|
70
154
|
{
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
155
|
+
clientId: M,
|
|
156
|
+
onChange: d
|
|
157
|
+
}
|
|
158
|
+
),
|
|
159
|
+
s === "giphy" && /* @__PURE__ */ n(ue, { token: S, onChange: d }),
|
|
160
|
+
s === "googleDrive" && i && /* @__PURE__ */ n(
|
|
161
|
+
pe,
|
|
75
162
|
{
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
163
|
+
isConnected: i.isConnected,
|
|
164
|
+
connectedEmail: i.connectedEmail,
|
|
165
|
+
files: i.files,
|
|
166
|
+
isLoading: i.isLoading,
|
|
167
|
+
hasMore: i.hasMore,
|
|
168
|
+
isImporting: i.isImporting,
|
|
169
|
+
onSearch: i.onSearch,
|
|
170
|
+
onLoadMore: i.onLoadMore,
|
|
171
|
+
onSelect: (e) => {
|
|
172
|
+
i.onSelect(e, d);
|
|
173
|
+
},
|
|
174
|
+
error: i.error
|
|
175
|
+
}
|
|
176
|
+
),
|
|
177
|
+
s === "media" && t && /* @__PURE__ */ n(
|
|
178
|
+
ce,
|
|
82
179
|
{
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
180
|
+
items: t.items,
|
|
181
|
+
isLoading: t.isLoading,
|
|
182
|
+
breadcrumbs: t.breadcrumbs,
|
|
183
|
+
onFolderClick: t.onFolderClick,
|
|
184
|
+
onBreadcrumbClick: t.onBreadcrumbClick,
|
|
185
|
+
onSelect: (e) => {
|
|
186
|
+
t.onSelect?.(e), c || p(!1);
|
|
187
|
+
}
|
|
86
188
|
}
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
m,
|
|
91
|
-
d,
|
|
92
|
-
l,
|
|
93
|
-
u.length,
|
|
94
|
-
f,
|
|
95
|
-
i,
|
|
96
|
-
a
|
|
97
|
-
]
|
|
98
|
-
), [o, q] = F(() => {
|
|
99
|
-
if (p[0]) return p[0].value;
|
|
100
|
-
const n = p.find((K) => K.visible);
|
|
101
|
-
return n ? n.value : "";
|
|
102
|
-
}), w = (n) => {
|
|
103
|
-
f?.(n, h);
|
|
104
|
-
}, c = (n) => {
|
|
105
|
-
B?.(n), h(!1);
|
|
106
|
-
}, J = M(() => C ? /* @__PURE__ */ t(W, { size: "lg", children: [
|
|
107
|
-
/* @__PURE__ */ e(S, { icon: P, size: 22 }),
|
|
108
|
-
" "
|
|
109
|
-
] }) : /* @__PURE__ */ e(
|
|
110
|
-
z,
|
|
189
|
+
)
|
|
190
|
+
] }), ee = /* @__PURE__ */ n(a, { justify: "space-between", align: "center", children: /* @__PURE__ */ n(
|
|
191
|
+
F,
|
|
111
192
|
{
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
193
|
+
defaultValue: "gallery",
|
|
194
|
+
value: s,
|
|
195
|
+
onChange: (e) => e && B(e),
|
|
196
|
+
styles: {
|
|
197
|
+
list: {
|
|
198
|
+
alignItems: "center",
|
|
199
|
+
paddingRight: "var(--mantine-spacing-xs)"
|
|
200
|
+
}
|
|
201
|
+
},
|
|
202
|
+
w: "100%",
|
|
203
|
+
children: /* @__PURE__ */ u(
|
|
204
|
+
F.List,
|
|
205
|
+
{
|
|
206
|
+
style: {
|
|
207
|
+
gap: "4px"
|
|
208
|
+
},
|
|
209
|
+
px: 8,
|
|
210
|
+
h: 54,
|
|
211
|
+
children: [
|
|
212
|
+
r.map((e) => /* @__PURE__ */ n(
|
|
213
|
+
F.Tab,
|
|
214
|
+
{
|
|
215
|
+
className: w.originalTab,
|
|
216
|
+
disabled: q,
|
|
217
|
+
h: "100%",
|
|
218
|
+
p: 0,
|
|
219
|
+
value: e.value,
|
|
220
|
+
onClick: () => B(e.value),
|
|
221
|
+
children: /* @__PURE__ */ n(a, { className: w.customTab, px: "sm", h: 36, children: e.label })
|
|
222
|
+
},
|
|
223
|
+
e.value
|
|
224
|
+
)),
|
|
225
|
+
J && /* @__PURE__ */ n(
|
|
226
|
+
L,
|
|
227
|
+
{
|
|
228
|
+
variant: "subtle",
|
|
229
|
+
fz: "sm",
|
|
230
|
+
lh: "sm",
|
|
231
|
+
fw: 500,
|
|
232
|
+
px: "sm",
|
|
233
|
+
size: "30px",
|
|
234
|
+
onClick: U,
|
|
235
|
+
color: "var(--mantine-color-gray-light-color)",
|
|
236
|
+
style: { marginLeft: "auto" },
|
|
237
|
+
children: l("remove")
|
|
238
|
+
}
|
|
239
|
+
)
|
|
240
|
+
]
|
|
241
|
+
}
|
|
242
|
+
)
|
|
243
|
+
}
|
|
244
|
+
) });
|
|
245
|
+
return c ? /* @__PURE__ */ n(
|
|
246
|
+
ae,
|
|
247
|
+
{
|
|
248
|
+
"data-file-picker-inline": !0,
|
|
249
|
+
bdrs: 8,
|
|
250
|
+
p: 12,
|
|
251
|
+
bg: "light-dark(var(--mantine-color-white), var(--mantine-color-dark-7))",
|
|
252
|
+
children: T
|
|
116
253
|
}
|
|
117
|
-
)
|
|
118
|
-
|
|
119
|
-
};
|
|
120
|
-
return /* @__PURE__ */ t(
|
|
121
|
-
g,
|
|
254
|
+
) : /* @__PURE__ */ u(
|
|
255
|
+
y,
|
|
122
256
|
{
|
|
123
|
-
width:
|
|
257
|
+
width: R,
|
|
124
258
|
radius: "var(--mantine-spacing-sm)",
|
|
125
|
-
position:
|
|
259
|
+
position: $,
|
|
126
260
|
shadow: "md",
|
|
127
|
-
opened:
|
|
128
|
-
onChange:
|
|
261
|
+
opened: z,
|
|
262
|
+
onChange: V,
|
|
129
263
|
withinPortal: !0,
|
|
130
|
-
...
|
|
264
|
+
...Q || {},
|
|
131
265
|
children: [
|
|
132
|
-
/* @__PURE__ */
|
|
133
|
-
/* @__PURE__ */
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
{
|
|
137
|
-
defaultValue: "gallery",
|
|
138
|
-
value: o,
|
|
139
|
-
styles: {
|
|
140
|
-
list: {
|
|
141
|
-
alignItems: "center",
|
|
142
|
-
paddingRight: "var(--mantine-spacing-xs)"
|
|
143
|
-
}
|
|
144
|
-
},
|
|
145
|
-
w: "100%",
|
|
146
|
-
children: /* @__PURE__ */ t(
|
|
147
|
-
v.List,
|
|
148
|
-
{
|
|
149
|
-
style: {
|
|
150
|
-
gap: "4px"
|
|
151
|
-
},
|
|
152
|
-
px: 8,
|
|
153
|
-
h: 54,
|
|
154
|
-
children: [
|
|
155
|
-
p.map((n) => /* @__PURE__ */ e(
|
|
156
|
-
v.Tab,
|
|
157
|
-
{
|
|
158
|
-
className: y.originalTab,
|
|
159
|
-
disabled: A,
|
|
160
|
-
h: "100%",
|
|
161
|
-
p: 0,
|
|
162
|
-
value: n.value,
|
|
163
|
-
onClick: () => q(n.value),
|
|
164
|
-
children: /* @__PURE__ */ e(r, { className: y.customTab, px: "sm", h: 36, children: n.label })
|
|
165
|
-
},
|
|
166
|
-
n.value
|
|
167
|
-
)),
|
|
168
|
-
E && /* @__PURE__ */ e(
|
|
169
|
-
z,
|
|
170
|
-
{
|
|
171
|
-
variant: "subtle",
|
|
172
|
-
fz: "sm",
|
|
173
|
-
lh: "sm",
|
|
174
|
-
fw: 500,
|
|
175
|
-
px: "sm",
|
|
176
|
-
size: "30px",
|
|
177
|
-
onClick: G,
|
|
178
|
-
color: "var(--mantine-color-gray-light-color)",
|
|
179
|
-
style: { marginLeft: "auto" },
|
|
180
|
-
children: l("remove")
|
|
181
|
-
}
|
|
182
|
-
)
|
|
183
|
-
]
|
|
184
|
-
}
|
|
185
|
-
)
|
|
186
|
-
}
|
|
187
|
-
) }),
|
|
188
|
-
/* @__PURE__ */ t(Y, { gap: 0, px: 8, pb: 8, pt: "sm", children: [
|
|
189
|
-
o === "gallery" && !!u.length && /* @__PURE__ */ e(
|
|
190
|
-
T,
|
|
191
|
-
{
|
|
192
|
-
galleryCollection: u,
|
|
193
|
-
onChange: c
|
|
194
|
-
}
|
|
195
|
-
),
|
|
196
|
-
o === "upload" && /* @__PURE__ */ e(
|
|
197
|
-
le,
|
|
198
|
-
{
|
|
199
|
-
type: b || "image",
|
|
200
|
-
uploading: I,
|
|
201
|
-
dropZoneProps: H,
|
|
202
|
-
onUpload: w
|
|
203
|
-
}
|
|
204
|
-
),
|
|
205
|
-
o === "link" && /* @__PURE__ */ e(
|
|
206
|
-
ee,
|
|
207
|
-
{
|
|
208
|
-
type: b || "image",
|
|
209
|
-
onChange: c,
|
|
210
|
-
isValidMediaUrl: N
|
|
211
|
-
}
|
|
212
|
-
),
|
|
213
|
-
o === "unsplash" && m && /* @__PURE__ */ e(
|
|
214
|
-
ne,
|
|
215
|
-
{
|
|
216
|
-
clientId: m,
|
|
217
|
-
onChange: c
|
|
218
|
-
}
|
|
219
|
-
),
|
|
220
|
-
o === "giphy" && d && /* @__PURE__ */ e(D, { token: d, onChange: c }),
|
|
221
|
-
o === "googleDrive" && i && /* @__PURE__ */ e(
|
|
222
|
-
ie,
|
|
223
|
-
{
|
|
224
|
-
isConnected: i.isConnected,
|
|
225
|
-
connectedEmail: i.connectedEmail,
|
|
226
|
-
files: i.files,
|
|
227
|
-
isLoading: i.isLoading,
|
|
228
|
-
hasMore: i.hasMore,
|
|
229
|
-
isImporting: i.isImporting,
|
|
230
|
-
onSearch: i.onSearch,
|
|
231
|
-
onLoadMore: i.onLoadMore,
|
|
232
|
-
onSelect: (n) => {
|
|
233
|
-
i.onSelect(n, c);
|
|
234
|
-
},
|
|
235
|
-
error: i.error
|
|
236
|
-
}
|
|
237
|
-
),
|
|
238
|
-
o === "media" && a && /* @__PURE__ */ e(
|
|
239
|
-
$,
|
|
240
|
-
{
|
|
241
|
-
items: a.items,
|
|
242
|
-
isLoading: a.isLoading,
|
|
243
|
-
breadcrumbs: a.breadcrumbs,
|
|
244
|
-
onFolderClick: a.onFolderClick,
|
|
245
|
-
onBreadcrumbClick: a.onBreadcrumbClick,
|
|
246
|
-
onSelect: (n) => {
|
|
247
|
-
a.onSelect?.(n), h(!1);
|
|
248
|
-
}
|
|
249
|
-
}
|
|
250
|
-
)
|
|
251
|
-
] })
|
|
266
|
+
/* @__PURE__ */ n(y.Target, { children: /* @__PURE__ */ n(a, { onClick: () => V(!z), ...X, children: O ?? D }) }),
|
|
267
|
+
/* @__PURE__ */ u(y.Dropdown, { p: 0, children: [
|
|
268
|
+
ee,
|
|
269
|
+
T
|
|
252
270
|
] })
|
|
253
271
|
]
|
|
254
272
|
}
|
|
255
273
|
);
|
|
256
274
|
};
|
|
257
275
|
export {
|
|
258
|
-
|
|
276
|
+
Ee as FilePicker
|
|
259
277
|
};
|
|
@@ -1,15 +1,17 @@
|
|
|
1
|
-
const
|
|
2
|
-
itemImage:
|
|
3
|
-
imageAuthor:
|
|
4
|
-
originalTab:
|
|
1
|
+
const o = "_itemImage_5y6cx_1", t = "_imageAuthor_5y6cx_14", c = "_originalTab_5y6cx_22", e = "_customTab_5y6cx_28", _ = "_button_5y6cx_36", a = "_pickerDropZone_5y6cx_46", n = {
|
|
2
|
+
itemImage: o,
|
|
3
|
+
imageAuthor: t,
|
|
4
|
+
originalTab: c,
|
|
5
5
|
customTab: e,
|
|
6
|
-
button:
|
|
6
|
+
button: _,
|
|
7
|
+
pickerDropZone: a
|
|
7
8
|
};
|
|
8
9
|
export {
|
|
9
|
-
|
|
10
|
+
_ as button,
|
|
10
11
|
e as customTab,
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
12
|
+
n as default,
|
|
13
|
+
t as imageAuthor,
|
|
14
|
+
o as itemImage,
|
|
15
|
+
c as originalTab,
|
|
16
|
+
a as pickerDropZone
|
|
15
17
|
};
|
|
@@ -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":"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 {
|
|
2
|
-
import {
|
|
3
|
-
import
|
|
4
|
-
|
|
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 w, Text as u, SimpleGrid as C, AspectRatio as I } from "@mantine/core";
|
|
7
|
+
import S from "./FilePicker.module.css.js";
|
|
8
|
+
const F = ({
|
|
5
9
|
galleryCollection: s,
|
|
6
|
-
onChange:
|
|
7
|
-
}) =>
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
{
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
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,
|
|
10
|
+
onChange: p
|
|
11
|
+
}) => {
|
|
12
|
+
const { t: a } = x("ui"), [i, h] = d(""), l = f(() => {
|
|
13
|
+
const e = i.trim().toLowerCase();
|
|
14
|
+
return e ? s.map((t) => ({
|
|
15
|
+
...t,
|
|
16
|
+
items: t.items.filter((n) => `${t.title} ${t.id} ${t.path} ${n}`.toLowerCase().includes(e))
|
|
17
|
+
})).filter((t) => t.items.length > 0) : s;
|
|
18
|
+
}, [s, i]);
|
|
19
|
+
return /* @__PURE__ */ c(m, { gap: "sm", children: [
|
|
20
|
+
/* @__PURE__ */ r(g, { active: !0, children: /* @__PURE__ */ r(
|
|
21
|
+
w,
|
|
24
22
|
{
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
23
|
+
leftSection: /* @__PURE__ */ r(v, { size: 16, icon: $ }),
|
|
24
|
+
maxLength: 50,
|
|
25
|
+
placeholder: a("changeCover.searchGifs"),
|
|
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
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
43
|
+
) }),
|
|
44
|
+
/* @__PURE__ */ r(C, { spacing: 10, cols: 4, children: e.items.map((t, n) => {
|
|
45
|
+
const o = "/images/covers/" + e.path + t;
|
|
46
|
+
return /* @__PURE__ */ r(
|
|
47
|
+
I,
|
|
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}-${n}`
|
|
57
|
+
);
|
|
58
|
+
}) })
|
|
59
|
+
] }, e.id)) })
|
|
60
|
+
] });
|
|
61
|
+
};
|
|
36
62
|
export {
|
|
37
|
-
|
|
63
|
+
F as FilePickerGallery
|
|
38
64
|
};
|
|
@@ -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":"AAoCA,eAAO,MAAM,eAAe,GAAI,sBAG7B;IACD,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,QAAQ,CAAC,EAAE,CAAC,CAAC,EAAE,MAAM,KAAK,IAAI,CAAC;CAChC,4CAsGA,CAAC"}
|