@layers-app/shared 0.2.4 → 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 +48 -45
- 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/types.d.ts +1 -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 +14 -14
- 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 +37 -38
- 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.map +1 -1
- package/dist/components/FilePicker/FilePicker.js +58 -59
- 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 +108 -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.map +1 -1
- package/dist/components/WorkspaceMenu/WorkspaceMenu.js +40 -37
- 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 +1 -1
- package/dist/lang/locales/ui_es.json.js +9 -9
- package/dist/lang/locales/ui_ru.json.js +9 -9
- 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,76 +1,74 @@
|
|
|
1
|
-
import { jsx as
|
|
2
|
-
import { Folder01Icon as
|
|
1
|
+
import { jsx as n } from "react/jsx-runtime";
|
|
2
|
+
import { Folder01Icon as t, Folder02Icon as f } from "@hugeicons/core-free-icons";
|
|
3
3
|
import { HugeiconsIcon as l } from "@hugeicons/react";
|
|
4
|
-
import { Text as c, Box as
|
|
5
|
-
import
|
|
6
|
-
import
|
|
7
|
-
import
|
|
8
|
-
import
|
|
9
|
-
import { ProjectIcon as
|
|
10
|
-
const
|
|
11
|
-
|
|
12
|
-
}) => {
|
|
13
|
-
const n = o?.size || 16;
|
|
4
|
+
import { Text as c, Box as s, Avatar as d } from "@mantine/core";
|
|
5
|
+
import p from "../assets/enitityIcons/flow.svg.js";
|
|
6
|
+
import u from "../assets/enitityIcons/form.svg.js";
|
|
7
|
+
import h from "../assets/enitityIcons/page.svg.js";
|
|
8
|
+
import y from "../assets/enitityIcons/sprint.svg.js";
|
|
9
|
+
import { ProjectIcon as i, IconEntity as a, renderIcon as g } from "./ProjectIcon/ProjectIcon.js";
|
|
10
|
+
const I = (o) => o.isFolder || o.type === "PROJECT" && o?.pathById?.findIndex((r) => r === o?.parentId) === 1, k = ({ item: o }) => {
|
|
11
|
+
const r = o?.size || 16;
|
|
14
12
|
if (!o) return null;
|
|
15
13
|
if (o.type === "FOLDER")
|
|
16
|
-
return /* @__PURE__ */
|
|
14
|
+
return /* @__PURE__ */ n(l, { icon: t, size: r });
|
|
17
15
|
if (o.type === "PAGE")
|
|
18
|
-
return /* @__PURE__ */
|
|
19
|
-
|
|
16
|
+
return /* @__PURE__ */ n(
|
|
17
|
+
i,
|
|
20
18
|
{
|
|
21
|
-
fallbackColor: "var(--default-page-icon-color)",
|
|
19
|
+
fallbackColor: o.icon ? void 0 : "var(--default-page-icon-color)",
|
|
22
20
|
name: o.title,
|
|
23
21
|
icon: o.icon,
|
|
24
|
-
fallback: /* @__PURE__ */
|
|
22
|
+
fallback: /* @__PURE__ */ n(h, { width: r, height: r })
|
|
25
23
|
}
|
|
26
24
|
);
|
|
27
25
|
if (o.type === "FORM")
|
|
28
|
-
return /* @__PURE__ */
|
|
29
|
-
|
|
26
|
+
return /* @__PURE__ */ n(
|
|
27
|
+
i,
|
|
30
28
|
{
|
|
31
29
|
fallbackColor: "var(--default-form-icon-color)",
|
|
32
30
|
icon: o.icon,
|
|
33
|
-
fallback: /* @__PURE__ */
|
|
31
|
+
fallback: /* @__PURE__ */ n(u, { width: r, height: r })
|
|
34
32
|
}
|
|
35
33
|
);
|
|
36
34
|
if (o.type === "FLOW")
|
|
37
|
-
return /* @__PURE__ */
|
|
38
|
-
|
|
35
|
+
return /* @__PURE__ */ n(
|
|
36
|
+
i,
|
|
39
37
|
{
|
|
40
38
|
icon: o.icon,
|
|
41
39
|
fallbackColor: "var(--default-flow-icon-color)",
|
|
42
|
-
fallback: /* @__PURE__ */
|
|
40
|
+
fallback: /* @__PURE__ */ n(p, { width: r, height: r })
|
|
43
41
|
}
|
|
44
42
|
);
|
|
45
43
|
if (o.type === "SPRINT") {
|
|
46
|
-
const
|
|
47
|
-
return /* @__PURE__ */
|
|
44
|
+
const e = a.parse(o.icon);
|
|
45
|
+
return /* @__PURE__ */ n(
|
|
48
46
|
c,
|
|
49
47
|
{
|
|
50
|
-
fz:
|
|
51
|
-
c:
|
|
48
|
+
fz: r,
|
|
49
|
+
c: e?.color || "yellow.6",
|
|
52
50
|
style: {
|
|
53
51
|
display: "flex",
|
|
54
52
|
alignItems: "center",
|
|
55
53
|
justifyContent: "center",
|
|
56
54
|
lineHeight: "normal",
|
|
57
|
-
width:
|
|
55
|
+
width: r + 4
|
|
58
56
|
},
|
|
59
|
-
children: /* @__PURE__ */
|
|
57
|
+
children: /* @__PURE__ */ n(y, {})
|
|
60
58
|
}
|
|
61
59
|
);
|
|
62
60
|
}
|
|
63
61
|
if (o.type === "PROJECT") {
|
|
64
|
-
const
|
|
65
|
-
return o
|
|
62
|
+
const e = a.parse(o.icon);
|
|
63
|
+
return I(o) ? /* @__PURE__ */ n(
|
|
66
64
|
l,
|
|
67
65
|
{
|
|
68
|
-
color:
|
|
69
|
-
icon:
|
|
70
|
-
size:
|
|
66
|
+
color: e?.color || void 0,
|
|
67
|
+
icon: o.isOpen ? f : t,
|
|
68
|
+
size: r
|
|
71
69
|
}
|
|
72
|
-
) :
|
|
73
|
-
|
|
70
|
+
) : e?.emoji ? /* @__PURE__ */ n(
|
|
71
|
+
s,
|
|
74
72
|
{
|
|
75
73
|
bg: "gray.1",
|
|
76
74
|
style: {
|
|
@@ -78,20 +76,20 @@ const S = ({
|
|
|
78
76
|
display: "flex",
|
|
79
77
|
alignItems: "center",
|
|
80
78
|
justifyContent: "center",
|
|
81
|
-
width:
|
|
82
|
-
height:
|
|
79
|
+
width: r,
|
|
80
|
+
height: r
|
|
83
81
|
},
|
|
84
|
-
children: /* @__PURE__ */
|
|
82
|
+
children: /* @__PURE__ */ n(i, { p: 0, icon: o.icon, size: 14, textSize: 12 })
|
|
85
83
|
}
|
|
86
|
-
) : /* @__PURE__ */
|
|
87
|
-
|
|
84
|
+
) : /* @__PURE__ */ n(
|
|
85
|
+
d,
|
|
88
86
|
{
|
|
89
87
|
variant: "filled",
|
|
90
88
|
radius: 4,
|
|
91
|
-
name: o.
|
|
89
|
+
name: o.id || "",
|
|
92
90
|
size: 16,
|
|
93
|
-
color:
|
|
94
|
-
children: /* @__PURE__ */
|
|
91
|
+
color: e?.color || "initials",
|
|
92
|
+
children: /* @__PURE__ */ n(
|
|
95
93
|
c,
|
|
96
94
|
{
|
|
97
95
|
fz: 12,
|
|
@@ -104,7 +102,7 @@ const S = ({
|
|
|
104
102
|
justifyContent: "center",
|
|
105
103
|
lineHeight: "normal"
|
|
106
104
|
},
|
|
107
|
-
children:
|
|
105
|
+
children: g(e, void 0, !0, o.title)
|
|
108
106
|
}
|
|
109
107
|
)
|
|
110
108
|
}
|
|
@@ -113,5 +111,5 @@ const S = ({
|
|
|
113
111
|
return null;
|
|
114
112
|
};
|
|
115
113
|
export {
|
|
116
|
-
|
|
114
|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CAAC,EAAE,SAAS,OAAO,EAAE,CAAC;IAC9B,QAAQ,CAAC,EAAE,gBAAgB,CAAC;IAC5B,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAC1B,iBAAiB,CAAC,EAAE,4BAA4B,EAAE,CAAC;IACnD,YAAY,CAAC,EAAE,YAAY,CAAC;IAC5B,aAAa,CAAC,EAAE,IAAI,CAAC,aAAa,EAAE,QAAQ,CAAC,CAAC;IAC9C,IAAI,CAAC,EAAE,QAAQ,CAAC;IAChB,eAAe,CAAC,EAAE,CAAC,GAAG,EAAE,MAAM,KAAK,OAAO,CAAC;IAC3C,WAAW,CAAC,EAAE,SAAS,CAAC;IACxB,cAAc,CAAC,EAAE,CAAC,MAAM,EAAE,OAAO,KAAK,IAAI,CAAC;CAC5C,CAAC,CAAC;AAEH,eAAO,MAAM,UAAU,GAAI,yOAoBxB,iBAAiB,CAAC,eAAe,CAAC,4CAqNpC,CAAC"}
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { jsx as e, jsxs as
|
|
1
|
+
import { jsx as e, jsxs as s } from "react/jsx-runtime";
|
|
2
2
|
import { useState as x, useMemo as y } from "react";
|
|
3
3
|
import { useTranslation as q } from "react-i18next";
|
|
4
4
|
import { ImageAdd02Icon as C } from "@hugeicons/core-free-icons";
|
|
5
5
|
import { HugeiconsIcon as F } from "@hugeicons/react";
|
|
6
|
-
import { Flex as
|
|
6
|
+
import { Flex as n, ActionIcon as E, Button as P, Text as J, Popover as u, Tabs as g, Stack as K } from "@mantine/core";
|
|
7
7
|
import { useMenu as Q } from "../../hooks/useMenu.js";
|
|
8
8
|
import { FilePickerGallery as W } from "./FilePickerGallery.js";
|
|
9
9
|
import { FilePickerGiphy as X } from "./FilePickerGiphy.js";
|
|
@@ -20,70 +20,69 @@ const $ = [
|
|
|
20
20
|
], me = ({
|
|
21
21
|
onChange: L,
|
|
22
22
|
onRemove: j,
|
|
23
|
-
onUpload:
|
|
23
|
+
onUpload: p,
|
|
24
24
|
uploading: G = !1,
|
|
25
|
-
showTabs:
|
|
25
|
+
showTabs: r = $,
|
|
26
26
|
children: M,
|
|
27
27
|
width: S = 610,
|
|
28
28
|
position: A = "bottom-end",
|
|
29
29
|
readOnly: B = !1,
|
|
30
30
|
hasImage: I,
|
|
31
|
-
giphyToken:
|
|
32
|
-
unsplashClientId:
|
|
33
|
-
type:
|
|
34
|
-
galleryCollection:
|
|
31
|
+
giphyToken: t,
|
|
32
|
+
unsplashClientId: o,
|
|
33
|
+
type: f = "image",
|
|
34
|
+
galleryCollection: c = [],
|
|
35
35
|
isValidMediaUrl: N,
|
|
36
36
|
popoverProps: U,
|
|
37
37
|
dropZoneProps: V,
|
|
38
38
|
targetProps: w,
|
|
39
39
|
onOpenedChange: D
|
|
40
40
|
}) => {
|
|
41
|
-
const { t: l } = q("ui"), [
|
|
41
|
+
const { t: l } = q("ui"), [v, m] = x(!1), { isMobile: b } = Q(), d = y(
|
|
42
42
|
() => [
|
|
43
43
|
{
|
|
44
44
|
value: "gallery",
|
|
45
|
-
label: /* @__PURE__ */ e(
|
|
46
|
-
visible:
|
|
45
|
+
label: /* @__PURE__ */ e(n, { children: /* @__PURE__ */ e("span", { children: l("changeCover.gallery") }) }),
|
|
46
|
+
visible: r.includes("gallery") && !!c.length
|
|
47
47
|
},
|
|
48
48
|
{
|
|
49
49
|
value: "upload",
|
|
50
|
-
label: /* @__PURE__ */ e(
|
|
51
|
-
visible:
|
|
50
|
+
label: /* @__PURE__ */ e(n, { children: /* @__PURE__ */ e("span", { children: l("changeCover.upload") }) }),
|
|
51
|
+
visible: r.includes("upload") && !!p
|
|
52
52
|
},
|
|
53
53
|
{
|
|
54
54
|
value: "link",
|
|
55
|
-
label: /* @__PURE__ */ e(
|
|
56
|
-
visible:
|
|
55
|
+
label: /* @__PURE__ */ e(n, { children: /* @__PURE__ */ e("span", { children: l("changeCover.link") }) }),
|
|
56
|
+
visible: r.includes("link")
|
|
57
57
|
},
|
|
58
58
|
{
|
|
59
59
|
value: "unsplash",
|
|
60
|
-
label: /* @__PURE__ */ e(
|
|
61
|
-
visible:
|
|
60
|
+
label: /* @__PURE__ */ e(n, { children: /* @__PURE__ */ e("span", { children: l("changeCover.searchImages") }) }),
|
|
61
|
+
visible: r.includes("unsplash") && o
|
|
62
62
|
},
|
|
63
63
|
{
|
|
64
64
|
value: "giphy",
|
|
65
|
-
label: /* @__PURE__ */ e(
|
|
66
|
-
visible:
|
|
65
|
+
label: /* @__PURE__ */ e(n, { children: /* @__PURE__ */ e("span", { children: "GIFs" }) }),
|
|
66
|
+
visible: r.includes("giphy") && t
|
|
67
67
|
}
|
|
68
68
|
].filter((i) => i.visible),
|
|
69
69
|
[
|
|
70
|
-
|
|
71
|
-
a,
|
|
72
|
-
c,
|
|
70
|
+
r,
|
|
73
71
|
o,
|
|
72
|
+
t,
|
|
74
73
|
l,
|
|
75
|
-
|
|
76
|
-
|
|
74
|
+
c.length,
|
|
75
|
+
p
|
|
77
76
|
]
|
|
78
|
-
), [
|
|
79
|
-
if (
|
|
80
|
-
const i =
|
|
77
|
+
), [a, H] = x(() => {
|
|
78
|
+
if (d[0]) return d[0].value;
|
|
79
|
+
const i = d.find((T) => T.visible);
|
|
81
80
|
return i ? i.value : "";
|
|
82
81
|
}), O = (i) => {
|
|
83
|
-
|
|
84
|
-
},
|
|
85
|
-
L?.(i),
|
|
86
|
-
}, R = y(() =>
|
|
82
|
+
p?.(i, m);
|
|
83
|
+
}, h = (i) => {
|
|
84
|
+
L?.(i), m(!1);
|
|
85
|
+
}, R = y(() => b ? /* @__PURE__ */ s(E, { size: "lg", children: [
|
|
87
86
|
/* @__PURE__ */ e(F, { icon: C, size: 22 }),
|
|
88
87
|
" "
|
|
89
88
|
] }) : /* @__PURE__ */ e(
|
|
@@ -94,28 +93,28 @@ const $ = [
|
|
|
94
93
|
leftSection: /* @__PURE__ */ e(F, { icon: C, size: 16 }),
|
|
95
94
|
children: /* @__PURE__ */ e(J, { fw: 600, size: "sm", children: l("changeCover.change") })
|
|
96
95
|
}
|
|
97
|
-
), [l,
|
|
98
|
-
|
|
96
|
+
), [l, b]), k = (i) => {
|
|
97
|
+
m(i), D?.(i);
|
|
99
98
|
};
|
|
100
|
-
return /* @__PURE__ */
|
|
101
|
-
|
|
99
|
+
return /* @__PURE__ */ s(
|
|
100
|
+
u,
|
|
102
101
|
{
|
|
103
102
|
width: S,
|
|
104
103
|
radius: "var(--mantine-spacing-sm)",
|
|
105
104
|
position: A,
|
|
106
105
|
shadow: "md",
|
|
107
|
-
opened:
|
|
106
|
+
opened: v,
|
|
108
107
|
onChange: k,
|
|
109
108
|
withinPortal: !0,
|
|
110
109
|
...U || {},
|
|
111
110
|
children: [
|
|
112
|
-
/* @__PURE__ */ e(
|
|
113
|
-
/* @__PURE__ */
|
|
114
|
-
/* @__PURE__ */ e(
|
|
115
|
-
|
|
111
|
+
/* @__PURE__ */ e(u.Target, { children: /* @__PURE__ */ e(n, { onClick: () => k(!v), ...w, children: M ?? R }) }),
|
|
112
|
+
/* @__PURE__ */ s(u.Dropdown, { p: 0, children: [
|
|
113
|
+
/* @__PURE__ */ e(n, { justify: "space-between", align: "center", children: /* @__PURE__ */ e(
|
|
114
|
+
g,
|
|
116
115
|
{
|
|
117
116
|
defaultValue: "gallery",
|
|
118
|
-
value:
|
|
117
|
+
value: a,
|
|
119
118
|
styles: {
|
|
120
119
|
list: {
|
|
121
120
|
alignItems: "center",
|
|
@@ -123,8 +122,8 @@ const $ = [
|
|
|
123
122
|
}
|
|
124
123
|
},
|
|
125
124
|
w: "100%",
|
|
126
|
-
children: /* @__PURE__ */
|
|
127
|
-
|
|
125
|
+
children: /* @__PURE__ */ s(
|
|
126
|
+
g.List,
|
|
128
127
|
{
|
|
129
128
|
style: {
|
|
130
129
|
gap: "4px"
|
|
@@ -132,8 +131,8 @@ const $ = [
|
|
|
132
131
|
px: 8,
|
|
133
132
|
h: 54,
|
|
134
133
|
children: [
|
|
135
|
-
|
|
136
|
-
|
|
134
|
+
d.map((i) => /* @__PURE__ */ e(
|
|
135
|
+
g.Tab,
|
|
137
136
|
{
|
|
138
137
|
className: z.originalTab,
|
|
139
138
|
disabled: B,
|
|
@@ -141,7 +140,7 @@ const $ = [
|
|
|
141
140
|
p: 0,
|
|
142
141
|
value: i.value,
|
|
143
142
|
onClick: () => H(i.value),
|
|
144
|
-
children: /* @__PURE__ */ e(
|
|
143
|
+
children: /* @__PURE__ */ e(n, { className: z.customTab, px: "sm", h: 36, children: i.label })
|
|
145
144
|
},
|
|
146
145
|
i.value
|
|
147
146
|
)),
|
|
@@ -165,39 +164,39 @@ const $ = [
|
|
|
165
164
|
)
|
|
166
165
|
}
|
|
167
166
|
) }),
|
|
168
|
-
/* @__PURE__ */
|
|
169
|
-
|
|
167
|
+
/* @__PURE__ */ s(K, { gap: 0, px: 8, pb: 8, pt: "sm", children: [
|
|
168
|
+
a === "gallery" && !!c.length && /* @__PURE__ */ e(
|
|
170
169
|
W,
|
|
171
170
|
{
|
|
172
|
-
galleryCollection:
|
|
173
|
-
onChange:
|
|
171
|
+
galleryCollection: c,
|
|
172
|
+
onChange: h
|
|
174
173
|
}
|
|
175
174
|
),
|
|
176
|
-
|
|
175
|
+
a === "upload" && /* @__PURE__ */ e(
|
|
177
176
|
_,
|
|
178
177
|
{
|
|
179
|
-
type:
|
|
178
|
+
type: f || "image",
|
|
180
179
|
uploading: G,
|
|
181
180
|
dropZoneProps: V,
|
|
182
181
|
onUpload: O
|
|
183
182
|
}
|
|
184
183
|
),
|
|
185
|
-
|
|
184
|
+
a === "link" && /* @__PURE__ */ e(
|
|
186
185
|
Y,
|
|
187
186
|
{
|
|
188
|
-
type:
|
|
189
|
-
onChange:
|
|
187
|
+
type: f || "image",
|
|
188
|
+
onChange: h,
|
|
190
189
|
isValidMediaUrl: N
|
|
191
190
|
}
|
|
192
191
|
),
|
|
193
|
-
|
|
192
|
+
a === "unsplash" && o && /* @__PURE__ */ e(
|
|
194
193
|
Z,
|
|
195
194
|
{
|
|
196
|
-
clientId:
|
|
197
|
-
onChange:
|
|
195
|
+
clientId: o,
|
|
196
|
+
onChange: h
|
|
198
197
|
}
|
|
199
198
|
),
|
|
200
|
-
|
|
199
|
+
a === "giphy" && t && /* @__PURE__ */ e(X, { token: t, onChange: h })
|
|
201
200
|
] })
|
|
202
201
|
] })
|
|
203
202
|
]
|
|
@@ -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,CAA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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"}
|
|
@@ -1,37 +1,62 @@
|
|
|
1
|
-
import { jsx as
|
|
2
|
-
import { memo as
|
|
3
|
-
import { useSteps as
|
|
4
|
-
import {
|
|
5
|
-
|
|
1
|
+
import { jsx as v } from "react/jsx-runtime";
|
|
2
|
+
import { memo as F, useCallback as U } from "react";
|
|
3
|
+
import { useSteps as b } from "../../../hooks/useCreateFormContext.js";
|
|
4
|
+
import { useFormViewerStore as x } from "../../../store/formStore.js";
|
|
5
|
+
import { PictureSelectableCard as P } from "../SelectableCard/PictureSelectableCard.js";
|
|
6
|
+
const L = F(
|
|
6
7
|
({
|
|
7
|
-
label:
|
|
8
|
-
showInput:
|
|
9
|
-
onUpdate:
|
|
10
|
-
onRemove:
|
|
11
|
-
image:
|
|
8
|
+
label: n,
|
|
9
|
+
showInput: c,
|
|
10
|
+
onUpdate: u,
|
|
11
|
+
onRemove: m,
|
|
12
|
+
image: p,
|
|
12
13
|
controlId: e,
|
|
13
|
-
id:
|
|
14
|
-
theme:
|
|
14
|
+
id: o,
|
|
15
|
+
theme: f,
|
|
16
|
+
stepId: t,
|
|
17
|
+
options: i
|
|
15
18
|
}) => {
|
|
16
|
-
const { form:
|
|
17
|
-
|
|
18
|
-
|
|
19
|
+
const { form: d, setValue: C } = b(), { useStore: h } = x(), s = h((r) => r.uploadFileFn), a = d.values[e] === o, S = () => {
|
|
20
|
+
C(e, a ? null : o);
|
|
21
|
+
}, V = U(
|
|
22
|
+
(r, k) => {
|
|
23
|
+
const l = r[0];
|
|
24
|
+
return s?.(
|
|
25
|
+
{
|
|
26
|
+
file: l,
|
|
27
|
+
id: l.name,
|
|
28
|
+
isError: !1,
|
|
29
|
+
isLoading: !0,
|
|
30
|
+
isSuccess: !1
|
|
31
|
+
},
|
|
32
|
+
{
|
|
33
|
+
stepId: t,
|
|
34
|
+
controlId: e,
|
|
35
|
+
optionId: o,
|
|
36
|
+
setOpen: k,
|
|
37
|
+
pictureChoiceOptions: i
|
|
38
|
+
}
|
|
39
|
+
);
|
|
40
|
+
},
|
|
41
|
+
[e, o, s, i, t]
|
|
42
|
+
);
|
|
43
|
+
return /* @__PURE__ */ v(
|
|
44
|
+
P,
|
|
19
45
|
{
|
|
20
|
-
label:
|
|
21
|
-
hasInput:
|
|
46
|
+
label: n,
|
|
47
|
+
hasInput: c,
|
|
22
48
|
inputType: "radio",
|
|
23
|
-
active:
|
|
24
|
-
onClick:
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
theme: s
|
|
49
|
+
active: a,
|
|
50
|
+
onClick: S,
|
|
51
|
+
onUpdate: u,
|
|
52
|
+
onRemove: m,
|
|
53
|
+
image: p,
|
|
54
|
+
theme: f,
|
|
55
|
+
onUpload: V
|
|
31
56
|
}
|
|
32
57
|
);
|
|
33
58
|
}
|
|
34
59
|
);
|
|
35
60
|
export {
|
|
36
|
-
|
|
61
|
+
L as PictureChoiceCard
|
|
37
62
|
};
|
package/dist/components/FormViewer/components/fields/ChoiceField/PictureChoiceField.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"PictureChoiceField.d.ts","sourceRoot":"","sources":["../../../../../../src/components/FormViewer/components/fields/ChoiceField/PictureChoiceField.tsx"],"names":[],"mappings":"AAYA,OAAO,EACL,oBAAoB,EAEpB,QAAQ,EACR,SAAS,EACV,MAAM,qBAAqB,CAAC;AAK7B,eAAO,MAAM,kBAAkB,GAAI,2BAIhC;IACD,OAAO,EAAE,oBAAoB,CAAC;IAC9B,IAAI,EAAE,QAAQ,CAAC;IACf,KAAK,CAAC,EAAE,SAAS,CAAC;CACnB,
|
|
1
|
+
{"version":3,"file":"PictureChoiceField.d.ts","sourceRoot":"","sources":["../../../../../../src/components/FormViewer/components/fields/ChoiceField/PictureChoiceField.tsx"],"names":[],"mappings":"AAYA,OAAO,EACL,oBAAoB,EAEpB,QAAQ,EACR,SAAS,EACV,MAAM,qBAAqB,CAAC;AAK7B,eAAO,MAAM,kBAAkB,GAAI,2BAIhC;IACD,OAAO,EAAE,oBAAoB,CAAC;IAC9B,IAAI,EAAE,QAAQ,CAAC;IACf,KAAK,CAAC,EAAE,SAAS,CAAC;CACnB,4CAqGA,CAAC"}
|