@layers-app/shared 0.2.3 → 0.2.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/assets/jsons/emoji-categorized-windows.json.js +4 -0
- package/dist/assets/jsons/emoji-categorized-windows10.json.js +4 -0
- package/dist/assets/svg/users.svg.js +5 -0
- package/dist/assets/svg/whatsapp-icon.svg.js +5 -0
- package/dist/components/AliasTextInput/AliasTextInput.d.ts +3 -1
- package/dist/components/AliasTextInput/AliasTextInput.d.ts.map +1 -1
- package/dist/components/AliasTextInput/AliasTextInput.js +63 -54
- package/dist/components/AppContainer/AppContainer.d.ts +1 -1
- package/dist/components/AppContainer/AppContainer.d.ts.map +1 -1
- package/dist/components/AppContainer/AppContainer.js +54 -43
- package/dist/components/AppContainer/AppContainer.module.css.js +1 -1
- package/dist/components/AppContainer/components/AppSidebarButton.js +1 -1
- package/dist/components/AppContainer/components/AppsSidebar/AppsSection.js +5 -5
- package/dist/components/AppContainer/components/AppsSidebar/UserSection.d.ts.map +1 -1
- package/dist/components/AppContainer/components/AppsSidebar/UserSection.js +56 -43
- package/dist/components/AppContainer/components/Main.d.ts +5 -1
- package/dist/components/AppContainer/components/Main.d.ts.map +1 -1
- package/dist/components/AppContainer/components/Main.js +11 -8
- package/dist/components/AppContainer/components/menus/HelpMenu/HelpMenu.d.ts.map +1 -1
- package/dist/components/AppContainer/components/menus/HelpMenu/HelpMenu.js +34 -19
- package/dist/components/AppContainer/components/menus/HelpMenu/HelpMenu.module.css.js +1 -1
- package/dist/components/AppContainer/components/menus/MoreMenu.js +8 -8
- package/dist/components/AppContainer/components/menus/UserMenu/MenuUserDropdown.d.ts +1 -0
- package/dist/components/AppContainer/components/menus/UserMenu/MenuUserDropdown.d.ts.map +1 -1
- package/dist/components/AppContainer/hooks/useAppContainerStore.d.ts.map +1 -1
- package/dist/components/AppContainer/hooks/useAppContainerStore.js +12 -9
- package/dist/components/AppContainer/types.d.ts +2 -0
- package/dist/components/AppContainer/types.d.ts.map +1 -1
- package/dist/components/AttachmentsGalleryModal/AttachmentsGalleryModal.d.ts +1 -1
- package/dist/components/AttachmentsGalleryModal/AttachmentsGalleryModal.d.ts.map +1 -1
- package/dist/components/AttachmentsGalleryModal/components/GallerySlide.d.ts +1 -1
- package/dist/components/AttachmentsGalleryModal/components/GallerySlide.d.ts.map +1 -1
- package/dist/components/AttachmentsGalleryModal/components/GallerySlide.js +5 -5
- package/dist/components/AttachmentsGalleryModal/components/ModalFooter.d.ts +1 -1
- package/dist/components/AttachmentsGalleryModal/components/ModalFooter.d.ts.map +1 -1
- package/dist/components/AttachmentsGalleryModal/components/ModalFooter.js +4 -4
- package/dist/components/AttachmentsGalleryModal/components/ModalHeader.d.ts +1 -1
- package/dist/components/AttachmentsGalleryModal/components/ModalHeader.d.ts.map +1 -1
- package/dist/components/AttachmentsGalleryModal/hooks/useDownloadFile.d.ts +1 -1
- package/dist/components/AttachmentsGalleryModal/hooks/useDownloadFile.d.ts.map +1 -1
- package/dist/components/AttachmentsGalleryModal/hooks/useGetPreviewUrl.d.ts +1 -1
- package/dist/components/AttachmentsGalleryModal/hooks/useGetPreviewUrl.d.ts.map +1 -1
- package/dist/components/AttachmentsGalleryModal/styles.module.css.js +9 -9
- package/dist/components/AttachmentsPreview/AttachmentsPreview.d.ts.map +1 -1
- package/dist/components/AttachmentsPreview/AttachmentsPreview.js +114 -88
- package/dist/components/AttachmentsPreview/AttachmentsPreview.module.css.js +9 -9
- package/dist/components/BouncingLogo/BouncingLogo.d.ts +6 -2
- package/dist/components/BouncingLogo/BouncingLogo.d.ts.map +1 -1
- package/dist/components/BouncingLogo/BouncingLogo.js +13 -14
- package/dist/components/BouncingLogo/BouncingLogo.module.css.js +12 -10
- package/dist/components/ColorPicker/ColorPicker.d.ts +2 -0
- package/dist/components/ColorPicker/ColorPicker.d.ts.map +1 -1
- package/dist/components/ColorPicker/ColorPicker.js +66 -59
- package/dist/components/CommentComposer/CommentEditorHotkeys.js +1 -1
- package/dist/components/CommunitiesDialog/styles.module.css.js +1 -1
- package/dist/components/Copyright/index.d.ts.map +1 -1
- package/dist/components/Copyright/index.js +6 -6
- package/dist/components/EmojiPicker/EmojiPanel.d.ts.map +1 -1
- package/dist/components/EmojiPicker/EmojiPanel.js +47 -46
- package/dist/components/EmojiPicker/EmojiPicker.d.ts.map +1 -1
- package/dist/components/EmojiPicker/EmojiPicker.js +87 -95
- package/dist/components/EmojiPicker/IconsPanel.d.ts.map +1 -1
- package/dist/components/EmojiPicker/IconsPanel.js +72 -72
- package/dist/components/EmojiPicker/utils.d.ts +11 -0
- package/dist/components/EmojiPicker/utils.d.ts.map +1 -0
- package/dist/components/EmojiPicker/utils.js +46 -0
- package/dist/components/EntityIcon.d.ts +5 -2
- package/dist/components/EntityIcon.d.ts.map +1 -1
- package/dist/components/EntityIcon.js +44 -46
- package/dist/components/FilePicker/FilePicker.d.ts +2 -3
- package/dist/components/FilePicker/FilePicker.d.ts.map +1 -1
- package/dist/components/FilePicker/FilePicker.js +95 -130
- package/dist/components/FilePicker/FilePickerGiphy.d.ts +1 -3
- package/dist/components/FilePicker/FilePickerGiphy.d.ts.map +1 -1
- package/dist/components/FilePicker/FilePickerGiphy.js +43 -44
- package/dist/components/FilePicker/FilePickerLink.d.ts +2 -3
- package/dist/components/FilePicker/FilePickerLink.d.ts.map +1 -1
- package/dist/components/FilePicker/FilePickerLink.js +21 -21
- package/dist/components/FilePicker/FilePickerUnsplash.d.ts +1 -3
- package/dist/components/FilePicker/FilePickerUnsplash.d.ts.map +1 -1
- package/dist/components/FilePicker/FilePickerUnsplash.js +45 -46
- package/dist/components/FilePicker/FilePickerUpload.d.ts +3 -3
- package/dist/components/FilePicker/FilePickerUpload.d.ts.map +1 -1
- package/dist/components/FilePicker/FilePickerUpload.js +49 -43
- package/dist/components/FilePicker/types.d.ts +1 -1
- package/dist/components/FilePicker/types.d.ts.map +1 -1
- package/dist/components/FormViewer/FormViewer.module.css.js +18 -18
- package/dist/components/FormViewer/components/fields/ChoiceField/PictureChoiceCard.d.ts +4 -2
- package/dist/components/FormViewer/components/fields/ChoiceField/PictureChoiceCard.d.ts.map +1 -1
- package/dist/components/FormViewer/components/fields/ChoiceField/PictureChoiceCard.js +51 -26
- package/dist/components/FormViewer/components/fields/ChoiceField/PictureChoiceField.d.ts.map +1 -1
- package/dist/components/FormViewer/components/fields/ChoiceField/PictureChoiceField.js +25 -23
- package/dist/components/FormViewer/components/fields/DragOptions/DragOptions.module.css.js +1 -1
- package/dist/components/FormViewer/components/fields/SelectableCard/PictureSelectableCard.d.ts +5 -2
- package/dist/components/FormViewer/components/fields/SelectableCard/PictureSelectableCard.d.ts.map +1 -1
- package/dist/components/FormViewer/components/fields/SelectableCard/PictureSelectableCard.js +105 -96
- package/dist/components/FormViewer/components/fields/SliderField.d.ts.map +1 -1
- package/dist/components/FormViewer/components/fields/SliderField.js +19 -18
- package/dist/components/FormViewer/components/fields/UploadField/UploadField.d.ts.map +1 -1
- package/dist/components/FormViewer/components/fields/UploadField/UploadFile/UploadFile.module.css.js +1 -1
- package/dist/components/FormViewer/helpers/cssScoping.d.ts.map +1 -1
- package/dist/components/FormViewer/helpers/staticClasses.d.ts.map +1 -1
- package/dist/components/FormViewer/store/formStore.d.ts +10 -3
- package/dist/components/FormViewer/store/formStore.d.ts.map +1 -1
- package/dist/components/LanguagePicker/LanguagePicker.js +13 -13
- package/dist/components/Loaders/styles.module.css.js +1 -1
- package/dist/components/NavMenu/NavMenu.d.ts +4 -1
- package/dist/components/NavMenu/NavMenu.d.ts.map +1 -1
- package/dist/components/NavMenu/NavMenu.js +96 -77
- package/dist/components/NavMenu/NavMenu.module.css.js +10 -10
- package/dist/components/NavMenu/components/DnDItem.d.ts +2 -1
- package/dist/components/NavMenu/components/DnDItem.d.ts.map +1 -1
- package/dist/components/NavMenu/components/DnDItem.js +32 -30
- package/dist/components/NavMenu/components/DnDProvider.d.ts.map +1 -1
- package/dist/components/NavMenu/components/DnDProvider.js +28 -26
- package/dist/components/NavMenu/components/DraggableOverlay.d.ts.map +1 -1
- package/dist/components/NavMenu/components/NavMenuItem.d.ts +1 -1
- package/dist/components/NavMenu/components/NavMenuItem.d.ts.map +1 -1
- package/dist/components/NavMenu/components/NavMenuItem.js +109 -94
- package/dist/components/NavMenu/store.d.ts +1 -0
- package/dist/components/NavMenu/store.d.ts.map +1 -1
- 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/NoData/NoData.d.ts +32 -26
- package/dist/components/NoData/NoData.d.ts.map +1 -1
- package/dist/components/NoData/NoData.js +73 -73
- package/dist/components/OnBoarding/ProjectBoard.js +17 -17
- package/dist/components/OnBoarding/steps/AddTasks/AddTasksNav.js +7 -7
- package/dist/components/OnBoarding/steps/AddTasks/TasksListBoard.d.ts.map +1 -1
- package/dist/components/OnBoarding/steps/AddTasks/TasksListBoard.js +9 -9
- package/dist/components/OnBoarding/steps/CreateFirstProject.js +5 -5
- package/dist/components/OnBoarding/steps/DefineStatuses/DefineStatusesNav.js +7 -7
- package/dist/components/OnBoarding/steps/DefineStatuses/StatusesListBoard.js +6 -6
- package/dist/components/OnBoarding/steps/DifferentLayouts/DifferentLayoutsBoard.d.ts.map +1 -1
- package/dist/components/OnBoarding/steps/DifferentLayouts/DifferentLayoutsNav.js +10 -10
- package/dist/components/OnBoarding/steps/DifferentLayouts/KanbanLayout.js +5 -5
- package/dist/components/OnBoarding/steps/InviteUsers/BoardModal.js +10 -10
- package/dist/components/OnBoarding/steps/InviteUsers/InviteUsers.d.ts.map +1 -1
- package/dist/components/OnBoarding/steps/SelectCategory/CategorySelect.d.ts.map +1 -1
- package/dist/components/OnBoarding/steps/SelectCategory/CategorySelect.js +8 -8
- package/dist/components/OnBoarding/steps/SelectCategory/SelectCategoryNav.js +5 -5
- package/dist/components/OnBoarding/steps/StartedStep.js +5 -5
- package/dist/components/PaymentSuccess/PaymentSuccess.d.ts.map +1 -1
- package/dist/components/PaymentSuccess/PaymentSuccess.js +9 -9
- package/dist/components/SearchFilters/components/DateFilter.js +19 -19
- package/dist/components/SearchFilters/components/SearchHelp.d.ts.map +1 -1
- package/dist/components/SearchFilters/components/SearchHelp.js +7 -7
- package/dist/components/SortableList/SortableList.d.ts.map +1 -1
- package/dist/components/SortableList/components/SortableItem/SortableItem.d.ts.map +1 -1
- package/dist/components/SortableList/components/SortableItem/SortableItem.js +1 -9
- package/dist/components/SortableList/components/SortableItem/index.d.ts +1 -1
- package/dist/components/SortableList/components/SortableItem/index.d.ts.map +1 -1
- package/dist/components/StorageUsageEntityList/StorageEntityItem.d.ts +2 -6
- package/dist/components/StorageUsageEntityList/StorageEntityItem.d.ts.map +1 -1
- package/dist/components/StorageUsageEntityList/StorageEntityItem.js +19 -59
- package/dist/components/StorageUsageEntityList/StorageUsageEntityList.d.ts +1 -1
- package/dist/components/StorageUsageEntityList/StorageUsageEntityList.d.ts.map +1 -1
- package/dist/components/StorageUsageEntityList/StorageUsageEntityList.js +6 -24
- package/dist/components/StorageUsageProgress/StorageUsageProgress.module.css.js +7 -0
- package/dist/components/StorageUsageProgress/index.d.ts +2 -2
- package/dist/components/StorageUsageProgress/index.d.ts.map +1 -1
- package/dist/components/StorageUsageProgress/index.js +73 -40
- package/dist/components/ThemeIndicator/index.d.ts.map +1 -1
- package/dist/components/ThemeIndicator/index.js +4 -4
- package/dist/components/UserAvatar/index.js +14 -14
- package/dist/components/WorkspaceMenu/WorkspaceMenu.d.ts +2 -2
- package/dist/components/WorkspaceMenu/WorkspaceMenu.d.ts.map +1 -1
- package/dist/components/WorkspaceMenu/WorkspaceMenu.js +103 -103
- package/dist/components/modals/RemoveConfirmModal.d.ts.map +1 -1
- package/dist/components/modals/RemoveConfirmModal.js +31 -24
- package/dist/components/table/export.d.ts.map +1 -1
- package/dist/components/table/hooks/useSaveRowCount.d.ts.map +1 -1
- package/dist/components/table/hooks/useSaveRowCount.js +4 -4
- package/dist/components/table/hooks/useSorting.d.ts.map +1 -1
- package/dist/components/table/hooks/useSorting.js +3 -1
- package/dist/constants.d.ts.map +1 -1
- package/dist/constants.js +8 -1
- package/dist/helpers/getFileIcons.js +12 -12
- package/dist/helpers/isAppMode.d.ts +1 -1
- package/dist/helpers/isAppMode.d.ts.map +1 -1
- package/dist/helpers/validateAliasFormat.d.ts +2 -0
- package/dist/helpers/validateAliasFormat.d.ts.map +1 -0
- package/dist/helpers/validateAliasFormat.js +4 -0
- package/dist/hooks/useOutsideClick.d.ts.map +1 -1
- package/dist/index.css +1 -1
- package/dist/index.d.ts +3 -4
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +328 -329
- package/dist/lang/locales/ui_en.json.js +20 -12
- package/dist/lang/locales/ui_es.json.js +18 -10
- package/dist/lang/locales/ui_ru.json.js +26 -18
- package/dist/store/trashModal.d.ts +8 -0
- package/dist/store/trashModal.d.ts.map +1 -0
- package/dist/store/trashModal.js +13 -0
- package/dist/types/storageCategories.d.ts +4 -0
- package/dist/types/storageCategories.d.ts.map +1 -0
- package/dist/types/storageCategories.js +21 -0
- package/dist/utils/formatStorage.d.ts +1 -1
- package/dist/utils/formatStorage.d.ts.map +1 -1
- package/dist/utils/formatStorage.js +3 -3
- package/docs/README.md +17 -4
- package/package.json +1 -1
- package/dist/assets/fileTypes/archives.svg.js +0 -5
- package/dist/assets/fileTypes/audio.svg.js +0 -5
- package/dist/assets/fileTypes/code.svg.js +0 -5
- package/dist/assets/fileTypes/documentsStorage.svg.js +0 -5
- package/dist/assets/fileTypes/images.svg.js +0 -5
- package/dist/assets/fileTypes/other.svg.js +0 -5
- package/dist/assets/fileTypes/videos.svg.js +0 -5
- package/dist/components/AppContainer/hooks/useSetAppContainerLayout.d.ts +0 -3
- package/dist/components/AppContainer/hooks/useSetAppContainerLayout.d.ts.map +0 -1
- package/dist/components/AppContainer/hooks/useSetAppContainerLayout.js +0 -10
- package/dist/components/EmojiPicker/getIconsList.d.ts +0 -8
- package/dist/components/EmojiPicker/getIconsList.d.ts.map +0 -1
- package/dist/components/EmojiPicker/getIconsList.js +0 -32
- package/dist/components/EmojiPicker/getRandomIcon.d.ts +0 -2
- package/dist/components/EmojiPicker/getRandomIcon.d.ts.map +0 -1
- package/dist/components/EmojiPicker/getRandomIcon.js +0 -10
- package/dist/components/NoData/NoData.module.css.js +0 -7
- package/dist/components/PaymentCancel/PaymentCancel.d.ts +0 -2
- package/dist/components/PaymentCancel/PaymentCancel.d.ts.map +0 -1
- package/dist/components/PaymentCancel/PaymentCancel.js +0 -41
- package/dist/components/PaymentError/PaymentError.d.ts +0 -2
- package/dist/components/PaymentError/PaymentError.d.ts.map +0 -1
- package/dist/components/PaymentError/PaymentError.js +0 -41
- package/dist/node_modules/@layers-app/layers/src/api/common.js +0 -41
- package/dist/store/accessOptionsControl.d.ts +0 -17
- package/dist/store/accessOptionsControl.d.ts.map +0 -1
- package/dist/store/accessOptionsControl.js +0 -18
|
@@ -1,91 +1,90 @@
|
|
|
1
1
|
import { jsxs as c, jsx as t } from "react/jsx-runtime";
|
|
2
|
-
import { useState as m, useMemo as
|
|
3
|
-
import { useTranslation as
|
|
4
|
-
import { Search01Icon as
|
|
5
|
-
import { HugeiconsIcon as
|
|
6
|
-
import { Stack as
|
|
7
|
-
import { useDebouncedValue as
|
|
8
|
-
import { NoData as
|
|
9
|
-
import { FilePickerSkeletonLoader as
|
|
10
|
-
import { useGiphyPhotos as
|
|
11
|
-
import
|
|
12
|
-
const
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
onChange: s
|
|
2
|
+
import { useState as m, useMemo as x, useEffect as b, useCallback as S } from "react";
|
|
3
|
+
import { useTranslation as P } from "react-i18next";
|
|
4
|
+
import { Search01Icon as w } from "@hugeicons/core-free-icons";
|
|
5
|
+
import { HugeiconsIcon as z } from "@hugeicons/react";
|
|
6
|
+
import { Stack as C, TextInput as L, Loader as T, Box as k, SimpleGrid as j, AspectRatio as D, Button as G } from "@mantine/core";
|
|
7
|
+
import { useDebouncedValue as M, useDebouncedCallback as q } from "@mantine/hooks";
|
|
8
|
+
import { NoData as B } from "../NoData/NoData.js";
|
|
9
|
+
import { FilePickerSkeletonLoader as F } from "./FilePickerSkeletonLoader.js";
|
|
10
|
+
import { useGiphyPhotos as N } from "./api/giphyApi.js";
|
|
11
|
+
import Q from "./FilePicker.module.css.js";
|
|
12
|
+
const v = (n) => (n || []).reduce((r, o) => (r[o.id] = o, r), {}), U = ({
|
|
13
|
+
token: n,
|
|
14
|
+
onChange: r
|
|
16
15
|
}) => {
|
|
17
|
-
const { t:
|
|
16
|
+
const { t: o } = P("ui"), [l, y] = m(""), [u] = M(l, 800), [d, p] = m(1), [h, g] = m({}), { data: i, isLoading: s } = N(
|
|
18
17
|
{ q: u, limit: 24, offset: (d - 1) * 24 + 1 },
|
|
19
18
|
d,
|
|
20
|
-
|
|
21
|
-
),
|
|
22
|
-
() => Object.values({ ...h, ...
|
|
23
|
-
[h,
|
|
24
|
-
), f =
|
|
19
|
+
n
|
|
20
|
+
), a = x(
|
|
21
|
+
() => Object.values({ ...h, ...v(i?.items) }),
|
|
22
|
+
[h, i?.items]
|
|
23
|
+
), f = q(() => {
|
|
25
24
|
setTimeout(() => {
|
|
26
|
-
g((e) => ({ ...e, ...
|
|
25
|
+
g((e) => ({ ...e, ...v(i?.items) }));
|
|
27
26
|
}, 0);
|
|
28
27
|
}, 100);
|
|
29
28
|
b(() => {
|
|
30
29
|
f();
|
|
31
|
-
}, [
|
|
30
|
+
}, [i?.items, f]), b(() => {
|
|
32
31
|
g({});
|
|
33
32
|
}, [u]);
|
|
34
|
-
const
|
|
33
|
+
const I = S(
|
|
35
34
|
(e) => {
|
|
36
|
-
|
|
35
|
+
y(e.currentTarget.value), p(1);
|
|
37
36
|
},
|
|
38
37
|
[]
|
|
39
38
|
);
|
|
40
|
-
return /* @__PURE__ */ c(
|
|
39
|
+
return /* @__PURE__ */ c(C, { gap: "sm", children: [
|
|
41
40
|
/* @__PURE__ */ t(
|
|
42
|
-
|
|
41
|
+
L,
|
|
43
42
|
{
|
|
44
|
-
leftSection:
|
|
43
|
+
leftSection: s ? /* @__PURE__ */ t(T, { size: 16 }) : /* @__PURE__ */ t(z, { size: 16, icon: w }),
|
|
45
44
|
maxLength: 50,
|
|
46
|
-
placeholder:
|
|
45
|
+
placeholder: o("changeCover.searchImage"),
|
|
47
46
|
"data-autofocus": !0,
|
|
48
47
|
value: l,
|
|
49
|
-
onChange:
|
|
48
|
+
onChange: I
|
|
50
49
|
}
|
|
51
50
|
),
|
|
52
|
-
/* @__PURE__ */ c(
|
|
53
|
-
!!
|
|
54
|
-
/* @__PURE__ */ t(
|
|
55
|
-
|
|
51
|
+
/* @__PURE__ */ c(k, { mah: 300, w: "100%", style: { overflowY: "auto" }, children: [
|
|
52
|
+
!!a.length && /* @__PURE__ */ c(C, { gap: 8, children: [
|
|
53
|
+
/* @__PURE__ */ t(j, { cols: 4, spacing: 10, children: a.map((e) => /* @__PURE__ */ t(
|
|
54
|
+
D,
|
|
56
55
|
{
|
|
57
|
-
onClick: () =>
|
|
56
|
+
onClick: () => r?.(e.images.original.url),
|
|
58
57
|
ratio: 120 / 65,
|
|
59
|
-
className:
|
|
58
|
+
className: Q.itemImage,
|
|
60
59
|
style: {
|
|
61
60
|
backgroundImage: `url(${e.images.preview_webp.url})`
|
|
62
61
|
}
|
|
63
62
|
},
|
|
64
63
|
e.id
|
|
65
64
|
)) }),
|
|
66
|
-
|
|
67
|
-
|
|
65
|
+
i?.hasMore && /* @__PURE__ */ t(
|
|
66
|
+
G,
|
|
68
67
|
{
|
|
69
68
|
variant: "subtle",
|
|
70
|
-
loading:
|
|
69
|
+
loading: s,
|
|
71
70
|
onClick: () => p((e) => e + 1),
|
|
72
|
-
children:
|
|
71
|
+
children: o("loadMode")
|
|
73
72
|
}
|
|
74
73
|
)
|
|
75
74
|
] }),
|
|
76
|
-
!
|
|
77
|
-
|
|
75
|
+
!a.length && !s && /* @__PURE__ */ t(k, { pb: 16, children: /* @__PURE__ */ t(
|
|
76
|
+
B,
|
|
78
77
|
{
|
|
79
78
|
size: 120,
|
|
80
79
|
illustration: "noImage",
|
|
81
|
-
description:
|
|
80
|
+
description: o("changeCover.noResult"),
|
|
82
81
|
titleProps: { size: "xs", c: "dimmed" }
|
|
83
82
|
}
|
|
84
83
|
) }),
|
|
85
|
-
!
|
|
84
|
+
!a.length && s && /* @__PURE__ */ t(F, {})
|
|
86
85
|
] })
|
|
87
86
|
] });
|
|
88
87
|
};
|
|
89
88
|
export {
|
|
90
|
-
|
|
89
|
+
U as FilePickerGiphy
|
|
91
90
|
};
|
|
@@ -1,6 +1,5 @@
|
|
|
1
|
-
import {
|
|
2
|
-
export declare const FilePickerLink: ({
|
|
3
|
-
locales: FilePickerLocales;
|
|
1
|
+
import { FileType } from './types';
|
|
2
|
+
export declare const FilePickerLink: ({ onChange, type, isValidMediaUrl, }: {
|
|
4
3
|
onChange?: (v: string) => void;
|
|
5
4
|
type: FileType;
|
|
6
5
|
isValidMediaUrl?: (url: string) => boolean;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"FilePickerLink.d.ts","sourceRoot":"","sources":["../../../src/components/FilePicker/FilePickerLink.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"FilePickerLink.d.ts","sourceRoot":"","sources":["../../../src/components/FilePicker/FilePickerLink.tsx"],"names":[],"mappings":"AAWA,OAAO,EAAE,QAAQ,EAAE,MAAM,SAAS,CAAC;AAInC,eAAO,MAAM,cAAc,GAAI,sCAI5B;IACD,QAAQ,CAAC,EAAE,CAAC,CAAC,EAAE,MAAM,KAAK,IAAI,CAAC;IAC/B,IAAI,EAAE,QAAQ,CAAC;IACf,eAAe,CAAC,EAAE,CAAC,GAAG,EAAE,MAAM,KAAK,OAAO,CAAC;CAC5C,4CA+DA,CAAC"}
|
|
@@ -1,44 +1,44 @@
|
|
|
1
|
-
import { jsxs as
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import F from "
|
|
1
|
+
import { jsxs as u, jsx as t } from "react/jsx-runtime";
|
|
2
|
+
import { useTranslation as c } from "react-i18next";
|
|
3
|
+
import { Stack as m, FocusTrap as d, TextInput as f, Flex as p, Button as h } from "@mantine/core";
|
|
4
|
+
import { useForm as g } from "@mantine/form";
|
|
5
|
+
import { isValidUrl as v, isImageUrl as k, isVideoUrl as x, isAudioUrl as F } from "../../helpers/validation.js";
|
|
6
|
+
import L from "./FilePicker.module.css.js";
|
|
6
7
|
const U = ({
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
isValidMediaUrl: a
|
|
8
|
+
onChange: o,
|
|
9
|
+
type: a,
|
|
10
|
+
isValidMediaUrl: s
|
|
11
11
|
}) => {
|
|
12
|
-
const l =
|
|
12
|
+
const { t: i } = c("ui"), l = g({
|
|
13
13
|
initialValues: {
|
|
14
14
|
url: ""
|
|
15
15
|
},
|
|
16
16
|
validate: {
|
|
17
|
-
url: (
|
|
17
|
+
url: (e) => (e || "").trim().length > 0 && v(e) ? null : i("changeCover.invalidLink")
|
|
18
18
|
}
|
|
19
19
|
}), n = async () => {
|
|
20
|
-
const { values:
|
|
21
|
-
let
|
|
22
|
-
|
|
20
|
+
const { values: e } = l;
|
|
21
|
+
let r;
|
|
22
|
+
a === "image" ? r = await k(e.url) : a === "video" ? s && s(e.url) ? r = !0 : r = await x(e.url) : a === "audio" ? r = await F(e.url) : r = !0, r ? o?.(e.url) : l.setFieldError("url", i("changeCover.invalidLink"));
|
|
23
23
|
};
|
|
24
|
-
return /* @__PURE__ */
|
|
24
|
+
return /* @__PURE__ */ u(m, { gap: "sm", children: [
|
|
25
25
|
/* @__PURE__ */ t(d, { active: !0, children: /* @__PURE__ */ t(
|
|
26
|
-
|
|
26
|
+
f,
|
|
27
27
|
{
|
|
28
28
|
maxLength: 500,
|
|
29
29
|
size: "sm",
|
|
30
|
-
placeholder: i.pasteLink,
|
|
30
|
+
placeholder: i("changeCover.pasteLink"),
|
|
31
31
|
"data-autofocus": !0,
|
|
32
32
|
...l.getInputProps("url")
|
|
33
33
|
}
|
|
34
34
|
) }),
|
|
35
|
-
/* @__PURE__ */ t(
|
|
36
|
-
|
|
35
|
+
/* @__PURE__ */ t(p, { justify: "flex-end", align: "center", children: /* @__PURE__ */ t(
|
|
36
|
+
h,
|
|
37
37
|
{
|
|
38
38
|
onClick: n,
|
|
39
|
-
className:
|
|
39
|
+
className: L.button,
|
|
40
40
|
disabled: !l.values.url,
|
|
41
|
-
children: i.save
|
|
41
|
+
children: i("customDrawer.save")
|
|
42
42
|
}
|
|
43
43
|
) })
|
|
44
44
|
] });
|
|
@@ -1,6 +1,4 @@
|
|
|
1
|
-
|
|
2
|
-
export declare const FilePickerUnsplash: ({ locales, onChange, clientId, }: {
|
|
3
|
-
locales: FilePickerLocales;
|
|
1
|
+
export declare const FilePickerUnsplash: ({ onChange, clientId, }: {
|
|
4
2
|
clientId?: string;
|
|
5
3
|
onChange?: (v: string) => void;
|
|
6
4
|
}) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"FilePickerUnsplash.d.ts","sourceRoot":"","sources":["../../../src/components/FilePicker/FilePickerUnsplash.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"FilePickerUnsplash.d.ts","sourceRoot":"","sources":["../../../src/components/FilePicker/FilePickerUnsplash.tsx"],"names":[],"mappings":"AAmCA,eAAO,MAAM,kBAAkB,GAAI,yBAGhC;IACD,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,QAAQ,CAAC,EAAE,CAAC,CAAC,EAAE,MAAM,KAAK,IAAI,CAAC;CAChC,4CAwGA,CAAC"}
|
|
@@ -1,95 +1,94 @@
|
|
|
1
|
-
import { jsxs as c, jsx as
|
|
2
|
-
import { useState as l, useMemo as
|
|
3
|
-
import { useTranslation as
|
|
4
|
-
import { Search01Icon as
|
|
5
|
-
import { HugeiconsIcon as
|
|
6
|
-
import { Stack as b, TextInput as
|
|
7
|
-
import { useDebouncedValue as
|
|
8
|
-
import { NoData as
|
|
9
|
-
import { FilePickerSkeletonLoader as
|
|
10
|
-
import { useUnsplashPhotos as
|
|
11
|
-
import
|
|
12
|
-
const
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
clientId: a
|
|
1
|
+
import { jsxs as c, jsx as o } from "react/jsx-runtime";
|
|
2
|
+
import { useState as l, useMemo as x, useEffect as f, useCallback as S } from "react";
|
|
3
|
+
import { useTranslation as P } from "react-i18next";
|
|
4
|
+
import { Search01Icon as z } from "@hugeicons/core-free-icons";
|
|
5
|
+
import { HugeiconsIcon as L } from "@hugeicons/react";
|
|
6
|
+
import { Stack as b, TextInput as T, Loader as j, Box as C, SimpleGrid as D, AspectRatio as M, Button as q } from "@mantine/core";
|
|
7
|
+
import { useDebouncedValue as w, useDebouncedCallback as B } from "@mantine/hooks";
|
|
8
|
+
import { NoData as F } from "../NoData/NoData.js";
|
|
9
|
+
import { FilePickerSkeletonLoader as N } from "./FilePickerSkeletonLoader.js";
|
|
10
|
+
import { useUnsplashPhotos as Q } from "./api/unsplashApi.js";
|
|
11
|
+
import R from "./FilePicker.module.css.js";
|
|
12
|
+
const k = (n) => (n || []).reduce((s, t) => (s[t.id] = t, s), {}), K = ({
|
|
13
|
+
onChange: n,
|
|
14
|
+
clientId: s
|
|
16
15
|
}) => {
|
|
17
|
-
const { t
|
|
16
|
+
const { t } = P("ui"), [m, y] = l(""), [u] = w(m, 800), [I, p] = l(1), [d, h] = l({}), { data: r, isLoading: a } = Q(
|
|
18
17
|
{
|
|
19
18
|
query: u,
|
|
20
|
-
page:
|
|
19
|
+
page: I,
|
|
21
20
|
per_page: 24,
|
|
22
21
|
order_by: "popular"
|
|
23
22
|
},
|
|
24
|
-
|
|
25
|
-
),
|
|
26
|
-
() => Object.values({ ...d, ...
|
|
27
|
-
[d,
|
|
28
|
-
), g =
|
|
23
|
+
s
|
|
24
|
+
), i = x(
|
|
25
|
+
() => Object.values({ ...d, ...k(r?.items) }),
|
|
26
|
+
[d, r?.items]
|
|
27
|
+
), g = B(() => {
|
|
29
28
|
setTimeout(() => {
|
|
30
|
-
h((e) => ({ ...e, ...
|
|
29
|
+
h((e) => ({ ...e, ...k(r?.items) }));
|
|
31
30
|
}, 0);
|
|
32
31
|
}, 100);
|
|
33
32
|
f(() => {
|
|
34
33
|
g();
|
|
35
|
-
}, [
|
|
34
|
+
}, [r?.items, g]), f(() => {
|
|
36
35
|
h({});
|
|
37
36
|
}, [u]);
|
|
38
|
-
const
|
|
37
|
+
const v = S(
|
|
39
38
|
(e) => {
|
|
40
|
-
|
|
39
|
+
y(e.currentTarget.value), p(1);
|
|
41
40
|
},
|
|
42
41
|
[]
|
|
43
42
|
);
|
|
44
43
|
return /* @__PURE__ */ c(b, { gap: "sm", children: [
|
|
45
|
-
/* @__PURE__ */
|
|
46
|
-
|
|
44
|
+
/* @__PURE__ */ o(
|
|
45
|
+
T,
|
|
47
46
|
{
|
|
48
|
-
leftSection:
|
|
47
|
+
leftSection: a ? /* @__PURE__ */ o(j, { size: 16 }) : /* @__PURE__ */ o(L, { size: 16, icon: z }),
|
|
49
48
|
maxLength: 50,
|
|
50
|
-
placeholder:
|
|
49
|
+
placeholder: t("changeCover.searchImage"),
|
|
51
50
|
"data-autofocus": !0,
|
|
52
51
|
value: m,
|
|
53
|
-
onChange:
|
|
52
|
+
onChange: v
|
|
54
53
|
}
|
|
55
54
|
),
|
|
56
|
-
/* @__PURE__ */ c(
|
|
57
|
-
!!
|
|
58
|
-
/* @__PURE__ */
|
|
59
|
-
|
|
55
|
+
/* @__PURE__ */ c(C, { mah: 300, w: "100%", style: { overflowY: "auto" }, children: [
|
|
56
|
+
!!i.length && /* @__PURE__ */ c(b, { gap: 8, children: [
|
|
57
|
+
/* @__PURE__ */ o(D, { cols: 4, spacing: 10, children: i.map((e) => /* @__PURE__ */ o(
|
|
58
|
+
M,
|
|
60
59
|
{
|
|
61
|
-
onClick: () =>
|
|
60
|
+
onClick: () => n?.(e.urls.regular),
|
|
62
61
|
ratio: 120 / 65,
|
|
63
|
-
className:
|
|
62
|
+
className: R.itemImage,
|
|
64
63
|
style: {
|
|
65
64
|
backgroundImage: `url(${e.urls.small})`
|
|
66
65
|
}
|
|
67
66
|
},
|
|
68
67
|
e.id
|
|
69
68
|
)) }),
|
|
70
|
-
|
|
71
|
-
|
|
69
|
+
r?.hasMore && /* @__PURE__ */ o(
|
|
70
|
+
q,
|
|
72
71
|
{
|
|
73
72
|
variant: "subtle",
|
|
74
|
-
loading:
|
|
73
|
+
loading: a,
|
|
75
74
|
onClick: () => p((e) => e + 1),
|
|
76
|
-
children:
|
|
75
|
+
children: t("loadMore")
|
|
77
76
|
}
|
|
78
77
|
)
|
|
79
78
|
] }),
|
|
80
|
-
!
|
|
81
|
-
|
|
79
|
+
!i.length && !a && /* @__PURE__ */ o(C, { pb: 16, children: /* @__PURE__ */ o(
|
|
80
|
+
F,
|
|
82
81
|
{
|
|
83
82
|
size: 120,
|
|
84
83
|
illustration: "noImage",
|
|
85
|
-
description:
|
|
84
|
+
description: t("changeCover.noResult"),
|
|
86
85
|
titleProps: { size: "xs", c: "dimmed" }
|
|
87
86
|
}
|
|
88
87
|
) }),
|
|
89
|
-
!
|
|
88
|
+
!i.length && a && /* @__PURE__ */ o(N, {})
|
|
90
89
|
] })
|
|
91
90
|
] });
|
|
92
91
|
};
|
|
93
92
|
export {
|
|
94
|
-
|
|
93
|
+
K as FilePickerUnsplash
|
|
95
94
|
};
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { DropzoneProps, FileWithPath } from '@mantine/dropzone';
|
|
2
|
-
import {
|
|
2
|
+
import { FileType } from './types';
|
|
3
3
|
import '@mantine/dropzone/styles.css';
|
|
4
|
-
export declare const FilePickerUpload: ({
|
|
5
|
-
|
|
4
|
+
export declare const FilePickerUpload: ({ type, uploading, dropZoneProps, onUpload, }: {
|
|
5
|
+
type?: FileType;
|
|
6
6
|
uploading: boolean;
|
|
7
7
|
dropZoneProps?: Omit<DropzoneProps, "onDrop">;
|
|
8
8
|
onUpload: (files: FileWithPath[]) => void;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"FilePickerUpload.d.ts","sourceRoot":"","sources":["../../../src/components/FilePicker/FilePickerUpload.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"FilePickerUpload.d.ts","sourceRoot":"","sources":["../../../src/components/FilePicker/FilePickerUpload.tsx"],"names":[],"mappings":"AAMA,OAAO,EAEL,aAAa,EAEb,YAAY,EAEb,MAAM,mBAAmB,CAAC;AAI3B,OAAO,EAAE,QAAQ,EAAE,MAAM,SAAS,CAAC;AAEnC,OAAO,8BAA8B,CAAC;AAEtC,eAAO,MAAM,gBAAgB,GAAI,+CAK9B;IACD,IAAI,CAAC,EAAE,QAAQ,CAAC;IAChB,SAAS,EAAE,OAAO,CAAC;IACnB,aAAa,CAAC,EAAE,IAAI,CAAC,aAAa,EAAE,QAAQ,CAAC,CAAC;IAC9C,QAAQ,EAAE,CAAC,KAAK,EAAE,YAAY,EAAE,KAAK,IAAI,CAAC;CAC3C,4CAkGA,CAAC"}
|
|
@@ -1,61 +1,67 @@
|
|
|
1
|
-
import { jsx as
|
|
2
|
-
import { useCallback as
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
1
|
+
import { jsx as n, jsxs as m } from "react/jsx-runtime";
|
|
2
|
+
import { useCallback as f } from "react";
|
|
3
|
+
import { useTranslation as M } from "react-i18next";
|
|
4
|
+
import { Image02Icon as k } from "@hugeicons/core-free-icons";
|
|
5
|
+
import { HugeiconsIcon as v } from "@hugeicons/react";
|
|
6
|
+
import { Stack as d, Text as p } from "@mantine/core";
|
|
7
|
+
import { Dropzone as E, IMAGE_MIME_TYPE as I } from "@mantine/dropzone";
|
|
8
|
+
import { showNotification as h } from "@mantine/notifications";
|
|
9
|
+
import { showErrorNotification as S } from "../../helpers/showNotifications.js";
|
|
9
10
|
import "@mantine/dropzone/styles.css";
|
|
10
|
-
const
|
|
11
|
-
|
|
12
|
-
uploading:
|
|
13
|
-
dropZoneProps:
|
|
11
|
+
const $ = ({
|
|
12
|
+
type: l = "image",
|
|
13
|
+
uploading: g,
|
|
14
|
+
dropZoneProps: t,
|
|
14
15
|
onUpload: s
|
|
15
16
|
}) => {
|
|
16
|
-
const
|
|
17
|
-
(
|
|
18
|
-
|
|
19
|
-
|
|
17
|
+
const { t: e } = M("ui"), u = t?.maxSize != null ? Math.round(t.maxSize / (1024 * 1024)) : 5, x = `filePicker.dropFileHere.${l}`, c = `filePicker.description.${l}`, F = e(x, {
|
|
18
|
+
defaultValue: e("dropFileHere")
|
|
19
|
+
}), a = (() => {
|
|
20
|
+
const r = e(c, { maxSize: u });
|
|
21
|
+
return r !== c ? r : null;
|
|
22
|
+
})(), y = f(
|
|
23
|
+
(r) => {
|
|
24
|
+
if (r.filter(
|
|
25
|
+
(o) => o.errors.some((i) => i.code === "file-invalid-type")
|
|
20
26
|
).length > 0) {
|
|
21
|
-
|
|
27
|
+
h({
|
|
22
28
|
color: "blue",
|
|
23
|
-
message: e.errors.typeIsNotAllowed
|
|
29
|
+
message: e("filePicker.errors.typeIsNotAllowed")
|
|
24
30
|
});
|
|
25
31
|
return;
|
|
26
32
|
}
|
|
27
|
-
if (
|
|
28
|
-
|
|
29
|
-
title: e
|
|
30
|
-
message: e.errors.shouldNotExceed
|
|
33
|
+
if (r.some((o) => o.errors.some((i) => i.code === "file-too-large"))) {
|
|
34
|
+
S({
|
|
35
|
+
title: e("errorMessage"),
|
|
36
|
+
message: e("filePicker.errors.shouldNotExceed")
|
|
31
37
|
});
|
|
32
38
|
return;
|
|
33
39
|
}
|
|
34
|
-
if (
|
|
35
|
-
(
|
|
40
|
+
if (r.filter(
|
|
41
|
+
(o) => o.errors.some((i) => i.code === "too-many-files")
|
|
36
42
|
).length > 0) {
|
|
37
|
-
|
|
43
|
+
h({
|
|
38
44
|
color: "blue",
|
|
39
|
-
message: e.errors.doNotUploadMoreThanSingleFile
|
|
45
|
+
message: e("filePicker.errors.doNotUploadMoreThanSingleFile")
|
|
40
46
|
});
|
|
41
47
|
return;
|
|
42
48
|
}
|
|
43
49
|
},
|
|
44
50
|
[e]
|
|
45
|
-
),
|
|
46
|
-
return /* @__PURE__ */
|
|
47
|
-
|
|
51
|
+
), z = f(s, [s]);
|
|
52
|
+
return /* @__PURE__ */ n(
|
|
53
|
+
E,
|
|
48
54
|
{
|
|
49
|
-
loading:
|
|
50
|
-
onDrop:
|
|
51
|
-
onReject:
|
|
52
|
-
maxFiles:
|
|
53
|
-
accept:
|
|
55
|
+
loading: g,
|
|
56
|
+
onDrop: z,
|
|
57
|
+
onReject: y,
|
|
58
|
+
maxFiles: t?.maxFiles || 1,
|
|
59
|
+
accept: I,
|
|
54
60
|
px: 60,
|
|
55
61
|
py: "xl",
|
|
56
|
-
...
|
|
62
|
+
...t || {},
|
|
57
63
|
children: /* @__PURE__ */ m(
|
|
58
|
-
|
|
64
|
+
d,
|
|
59
65
|
{
|
|
60
66
|
justify: "center",
|
|
61
67
|
gap: "var(--mantine-font-size-xs",
|
|
@@ -63,17 +69,17 @@ const C = ({
|
|
|
63
69
|
mih: 89,
|
|
64
70
|
style: { pointerEvents: "none" },
|
|
65
71
|
children: [
|
|
66
|
-
/* @__PURE__ */
|
|
67
|
-
|
|
72
|
+
/* @__PURE__ */ n(
|
|
73
|
+
v,
|
|
68
74
|
{
|
|
69
75
|
size: 32,
|
|
70
76
|
color: "var(--mantine-color-bright)",
|
|
71
|
-
icon:
|
|
77
|
+
icon: k
|
|
72
78
|
}
|
|
73
79
|
),
|
|
74
|
-
/* @__PURE__ */ m(
|
|
75
|
-
/* @__PURE__ */
|
|
76
|
-
/* @__PURE__ */
|
|
80
|
+
/* @__PURE__ */ m(d, { gap: 8, align: "center", children: [
|
|
81
|
+
/* @__PURE__ */ n(p, { fw: 500, fz: "sm", c: "bright", lh: "sm", ta: "center", children: F }),
|
|
82
|
+
a && /* @__PURE__ */ n(p, { fz: "xs", fw: 400, lh: "140%", c: "dimmed", ta: "center", children: a })
|
|
77
83
|
] })
|
|
78
84
|
]
|
|
79
85
|
}
|
|
@@ -82,5 +88,5 @@ const C = ({
|
|
|
82
88
|
);
|
|
83
89
|
};
|
|
84
90
|
export {
|
|
85
|
-
|
|
91
|
+
$ as FilePickerUpload
|
|
86
92
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/components/FilePicker/types.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,4BAA4B,GAAG;IACzC,KAAK,EAAE,MAAM,CAAC;IACd,IAAI,EAAE,MAAM,CAAC;IACb,EAAE,EAAE,MAAM,CAAC;IACX,GAAG,EAAE,MAAM,CAAC;IACZ,KAAK,EAAE,MAAM,EAAE,CAAC;CACjB,CAAC;AAEF,MAAM,MAAM,iBAAiB,GAAG;IAC9B,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,KAAK,CAAC,EAAE,MAAM,CAAC;IAEf,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,IAAI,CAAC,EAAE,MAAM,CAAC;IAEd,mBAAmB,CAAC,EAAE,MAAM,CAAC;IAC7B,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,UAAU,CAAC,EAAE,MAAM,CAAC;IAEpB,iBAAiB,CAAC,EAAE,MAAM,CAAC;IAC3B,QAAQ,CAAC,EAAE,MAAM,CAAC;IAElB,MAAM,EAAE;QACN,gBAAgB,CAAC,EAAE,MAAM,CAAC;QAC1B,eAAe,CAAC,EAAE,MAAM,CAAC;QACzB,6BAA6B,CAAC,EAAE,MAAM,CAAC;QACvC,WAAW,CAAC,EAAE,MAAM,CAAC;KACtB,CAAC;CACH,CAAC;AAEF,MAAM,MAAM,QAAQ,GAAG,MAAM,GAAG,OAAO,GAAG,OAAO,GAAG,OAAO,CAAC"}
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/components/FilePicker/types.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,4BAA4B,GAAG;IACzC,KAAK,EAAE,MAAM,CAAC;IACd,IAAI,EAAE,MAAM,CAAC;IACb,EAAE,EAAE,MAAM,CAAC;IACX,GAAG,EAAE,MAAM,CAAC;IACZ,KAAK,EAAE,MAAM,EAAE,CAAC;CACjB,CAAC;AAEF,MAAM,MAAM,iBAAiB,GAAG;IAC9B,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,KAAK,CAAC,EAAE,MAAM,CAAC;IAEf,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,IAAI,CAAC,EAAE,MAAM,CAAC;IAEd,mBAAmB,CAAC,EAAE,MAAM,CAAC;IAC7B,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,UAAU,CAAC,EAAE,MAAM,CAAC;IAEpB,iBAAiB,CAAC,EAAE,MAAM,CAAC;IAC3B,QAAQ,CAAC,EAAE,MAAM,CAAC;IAElB,MAAM,EAAE;QACN,gBAAgB,CAAC,EAAE,MAAM,CAAC;QAC1B,eAAe,CAAC,EAAE,MAAM,CAAC;QACzB,6BAA6B,CAAC,EAAE,MAAM,CAAC;QACvC,WAAW,CAAC,EAAE,MAAM,CAAC;KACtB,CAAC;CACH,CAAC;AAEF,MAAM,MAAM,QAAQ,GAAG,MAAM,GAAG,OAAO,GAAG,OAAO,GAAG,OAAO,GAAG,QAAQ,CAAC"}
|
|
@@ -1,18 +1,18 @@
|
|
|
1
|
-
const t = "
|
|
1
|
+
const t = "_themeProvider_1lm79_1", o = "_root_1lm79_7", e = "_container_1lm79_36", n = "_media_1lm79_42", _ = "_background_1lm79_46", s = "_stepRoot_1lm79_59", c = "_content_1lm79_104", l = "_mediaInner_1lm79_169", i = "_stepTitle_1lm79_332", a = "_stepDescription_1lm79_355", r = "_stepIndicator_1lm79_369", d = "_stepIndicatorIcon_1lm79_386", m = "_focusBox_1lm79_405", p = "_dropzone_1lm79_414", u = "_allSlidesLayout_1lm79_432", I = "_allSlidesLayoutStep_1lm79_438", S = {
|
|
2
2
|
themeProvider: t,
|
|
3
3
|
root: o,
|
|
4
4
|
container: e,
|
|
5
5
|
media: n,
|
|
6
6
|
background: _,
|
|
7
|
-
stepRoot:
|
|
8
|
-
content:
|
|
9
|
-
mediaInner:
|
|
10
|
-
stepTitle:
|
|
11
|
-
stepDescription:
|
|
12
|
-
stepIndicator:
|
|
7
|
+
stepRoot: s,
|
|
8
|
+
content: c,
|
|
9
|
+
mediaInner: l,
|
|
10
|
+
stepTitle: i,
|
|
11
|
+
stepDescription: a,
|
|
12
|
+
stepIndicator: r,
|
|
13
13
|
stepIndicatorIcon: d,
|
|
14
|
-
focusBox:
|
|
15
|
-
dropzone:
|
|
14
|
+
focusBox: m,
|
|
15
|
+
dropzone: p,
|
|
16
16
|
allSlidesLayout: u,
|
|
17
17
|
allSlidesLayoutStep: I
|
|
18
18
|
};
|
|
@@ -21,17 +21,17 @@ export {
|
|
|
21
21
|
I as allSlidesLayoutStep,
|
|
22
22
|
_ as background,
|
|
23
23
|
e as container,
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
24
|
+
c as content,
|
|
25
|
+
S as default,
|
|
26
|
+
p as dropzone,
|
|
27
|
+
m as focusBox,
|
|
28
28
|
n as media,
|
|
29
|
-
|
|
29
|
+
l as mediaInner,
|
|
30
30
|
o as root,
|
|
31
|
-
|
|
32
|
-
|
|
31
|
+
a as stepDescription,
|
|
32
|
+
r as stepIndicator,
|
|
33
33
|
d as stepIndicatorIcon,
|
|
34
|
-
|
|
35
|
-
|
|
34
|
+
s as stepRoot,
|
|
35
|
+
i as stepTitle,
|
|
36
36
|
t as themeProvider
|
|
37
37
|
};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { PictureChoiceControlItem, ThemeData } from '../../../types/form';
|
|
1
|
+
import { PictureChoiceControl, PictureChoiceControlItem, ThemeData } from '../../../types/form';
|
|
2
2
|
export type PictureChoiceCardProps = {
|
|
3
3
|
label: string;
|
|
4
4
|
showInput?: boolean;
|
|
@@ -8,6 +8,8 @@ export type PictureChoiceCardProps = {
|
|
|
8
8
|
controlId: string;
|
|
9
9
|
id: string;
|
|
10
10
|
theme?: ThemeData;
|
|
11
|
+
stepId: string;
|
|
12
|
+
options: PictureChoiceControl['options'];
|
|
11
13
|
};
|
|
12
|
-
export declare const PictureChoiceCard: import("react").MemoExoticComponent<({ label, showInput, onUpdate, onRemove, image, controlId, id, theme, }: PictureChoiceCardProps) => import("react/jsx-runtime").JSX.Element>;
|
|
14
|
+
export declare const PictureChoiceCard: import("react").MemoExoticComponent<({ label, showInput, onUpdate, onRemove, image, controlId, id, theme, stepId, options, }: PictureChoiceCardProps) => import("react/jsx-runtime").JSX.Element>;
|
|
13
15
|
//# sourceMappingURL=PictureChoiceCard.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"PictureChoiceCard.d.ts","sourceRoot":"","sources":["../../../../../../src/components/FormViewer/components/fields/ChoiceField/PictureChoiceCard.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"PictureChoiceCard.d.ts","sourceRoot":"","sources":["../../../../../../src/components/FormViewer/components/fields/ChoiceField/PictureChoiceCard.tsx"],"names":[],"mappings":"AAMA,OAAO,EACL,oBAAoB,EACpB,wBAAwB,EACxB,SAAS,EACV,MAAM,qBAAqB,CAAC;AAG7B,MAAM,MAAM,sBAAsB,GAAG;IACnC,KAAK,EAAE,MAAM,CAAC;IACd,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,QAAQ,CAAC,EAAE,CAAC,CAAC,EAAE,OAAO,CAAC,wBAAwB,CAAC,KAAK,IAAI,CAAC;IAC1D,QAAQ,CAAC,EAAE,MAAM,IAAI,CAAC;IACtB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,SAAS,EAAE,MAAM,CAAC;IAClB,EAAE,EAAE,MAAM,CAAC;IACX,KAAK,CAAC,EAAE,SAAS,CAAC;IAClB,MAAM,EAAE,MAAM,CAAC;IACf,OAAO,EAAE,oBAAoB,CAAC,SAAS,CAAC,CAAC;CAC1C,CAAC;AAEF,eAAO,MAAM,iBAAiB,gIAYzB,sBAAsB,6CAkD1B,CAAC"}
|