@layers-app/shared 0.2.5 → 0.2.7
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/flags/es.svg.js +4 -0
- package/dist/assets/svg/flags/ru.svg.js +4 -0
- package/dist/assets/svg/flags/us.svg.js +4 -0
- package/dist/assets/svg/globeIcon.svg.js +5 -0
- package/dist/assets/svg/socials/github.svg.js +5 -0
- package/dist/assets/svg/socials/instagram.svg.js +5 -0
- package/dist/assets/svg/socials/x.svg.js +5 -0
- package/dist/assets/svg/socials/youtube.svg.js +5 -0
- 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.js +22 -22
- package/dist/components/AppContainer/components/AppsSidebar/TopSection.d.ts.map +1 -1
- package/dist/components/AppContainer/components/AppsSidebar/TopSection.js +25 -25
- package/dist/components/AppContainer/components/AppsSidebar/UserSection.d.ts.map +1 -1
- package/dist/components/AppContainer/components/AppsSidebar/UserSection.js +40 -40
- package/dist/components/AppContainer/components/menus/HelpMenu/HelpMenu.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 +49 -43
- package/dist/components/AppContainer/hooks/useAppContainerDataStore.d.ts.map +1 -1
- package/dist/components/AppContainer/hooks/useAppContainerDataStore.js +4 -2
- package/dist/components/AppContainer/types.d.ts +2 -0
- package/dist/components/AppContainer/types.d.ts.map +1 -1
- package/dist/components/AttachmentsGalleryModal/components/ShakePlayer/ShakaPlayer.d.ts.map +1 -1
- package/dist/components/FilePicker/FilePicker.d.ts +33 -2
- package/dist/components/FilePicker/FilePicker.d.ts.map +1 -1
- package/dist/components/FilePicker/FilePicker.js +161 -110
- package/dist/components/FilePicker/FilePicker.module.css.js +9 -7
- package/dist/components/FilePicker/FilePickerGoogleDrive.d.ts +22 -0
- package/dist/components/FilePicker/FilePickerGoogleDrive.d.ts.map +1 -0
- package/dist/components/FilePicker/FilePickerGoogleDrive.js +86 -0
- package/dist/components/FilePicker/FilePickerUnsplash.d.ts.map +1 -1
- package/dist/components/FilePicker/FilePickerUnsplash.js +69 -52
- package/dist/components/FormViewer/components/OneSlideLayput.js +39 -37
- package/dist/components/FormViewer/hooks/useCreateFormContext.d.ts.map +1 -1
- package/dist/components/FormViewer/hooks/useCreateFormContext.js +10 -10
- package/dist/components/FormViewer/hooks/useFormGlobalTheme.js +15 -15
- package/dist/components/FormViewer/hooks/useInterpolateText.js +3 -3
- package/dist/components/FormViewer/store/formStore.js +3 -3
- package/dist/components/FormViewer/store/formStoreApi.js +13 -13
- package/dist/components/FormViewer/store/selectors.js +1 -1
- package/dist/components/GroupAvatar/index.d.ts +1 -0
- package/dist/components/GroupAvatar/index.d.ts.map +1 -1
- package/dist/components/GroupAvatar/index.js +9 -8
- package/dist/components/ImageCropper/ImageCropper.d.ts +19 -0
- package/dist/components/ImageCropper/ImageCropper.d.ts.map +1 -0
- package/dist/components/ImageCropper/ImageCropper.js +358 -0
- package/dist/components/ImageCropper/ImageCropper.module.css.js +51 -0
- package/dist/components/ImageCropper/cropUtils.d.ts +22 -0
- package/dist/components/ImageCropper/cropUtils.d.ts.map +1 -0
- package/dist/components/ImageCropper/cropUtils.js +42 -0
- package/dist/components/ImageCropper/index.d.ts +4 -0
- package/dist/components/ImageCropper/index.d.ts.map +1 -0
- package/dist/components/ImageCropper/useCropInteraction.d.ts +28 -0
- package/dist/components/ImageCropper/useCropInteraction.d.ts.map +1 -0
- package/dist/components/ImageCropper/useCropInteraction.js +76 -0
- package/dist/components/IntegrationFlowAnimation/IntegrationFlowAnimation.d.ts +21 -0
- package/dist/components/IntegrationFlowAnimation/IntegrationFlowAnimation.d.ts.map +1 -0
- package/dist/components/IntegrationFlowAnimation/IntegrationFlowAnimation.js +73 -0
- package/dist/components/IntegrationFlowAnimation/IntegrationFlowAnimation.module.css.js +19 -0
- package/dist/components/IntegrationFlowAnimation/icons/GoogleDriveIcon.d.ts +6 -0
- package/dist/components/IntegrationFlowAnimation/icons/GoogleDriveIcon.d.ts.map +1 -0
- package/dist/components/IntegrationFlowAnimation/icons/GoogleDriveIcon.js +60 -0
- package/dist/components/IntegrationFlowAnimation/icons/LayersCubeIcon.d.ts +6 -0
- package/dist/components/IntegrationFlowAnimation/icons/LayersCubeIcon.d.ts.map +1 -0
- package/dist/components/IntegrationFlowAnimation/icons/LayersCubeIcon.js +21 -0
- package/dist/components/IntegrationFlowAnimation/icons/NotionIcon.d.ts +6 -0
- package/dist/components/IntegrationFlowAnimation/icons/NotionIcon.d.ts.map +1 -0
- package/dist/components/IntegrationFlowAnimation/icons/NotionIcon.js +35 -0
- package/dist/components/IntegrationFlowAnimation/icons/index.d.ts +4 -0
- package/dist/components/IntegrationFlowAnimation/icons/index.d.ts.map +1 -0
- package/dist/components/IntegrationFlowAnimation/index.d.ts +5 -0
- package/dist/components/IntegrationFlowAnimation/index.d.ts.map +1 -0
- package/dist/components/LanguagePicker/LanguagePicker.d.ts +2 -1
- package/dist/components/LanguagePicker/LanguagePicker.d.ts.map +1 -1
- package/dist/components/LanguagePicker/LanguagePicker.js +44 -31
- package/dist/components/LanguagePicker/LanguagePicker.module.css.js +6 -4
- package/dist/components/MediaLibrary/MediaLibrary.d.ts +3 -0
- package/dist/components/MediaLibrary/MediaLibrary.d.ts.map +1 -0
- package/dist/components/MediaLibrary/MediaLibrary.js +93 -0
- package/dist/components/MediaLibrary/MediaLibrary.module.css.js +17 -0
- package/dist/components/MediaLibrary/MediaLibraryBreadcrumbs.d.ts +8 -0
- package/dist/components/MediaLibrary/MediaLibraryBreadcrumbs.d.ts.map +1 -0
- package/dist/components/MediaLibrary/MediaLibraryBreadcrumbs.js +22 -0
- package/dist/components/MediaLibrary/MediaLibraryBrowser.d.ts +12 -0
- package/dist/components/MediaLibrary/MediaLibraryBrowser.d.ts.map +1 -0
- package/dist/components/MediaLibrary/MediaLibraryBrowser.js +52 -0
- package/dist/components/MediaLibrary/MediaLibraryRow.d.ts +9 -0
- package/dist/components/MediaLibrary/MediaLibraryRow.d.ts.map +1 -0
- package/dist/components/MediaLibrary/MediaLibraryRow.js +29 -0
- package/dist/components/MediaLibrary/index.d.ts +4 -0
- package/dist/components/MediaLibrary/index.d.ts.map +1 -0
- package/dist/components/MediaLibrary/types.d.ts +31 -0
- package/dist/components/MediaLibrary/types.d.ts.map +1 -0
- package/dist/components/NavMenu/components/NavMenuItem.d.ts.map +1 -1
- package/dist/components/NavMenu/components/NavMenuItem.js +53 -50
- package/dist/components/NavMenu/types.d.ts +1 -0
- package/dist/components/NavMenu/types.d.ts.map +1 -1
- package/dist/components/NoData/NoData.d.ts +6 -1
- package/dist/components/NoData/NoData.d.ts.map +1 -1
- package/dist/components/NoData/NoData.js +85 -82
- package/dist/components/SettingsSection/index.d.ts +12 -0
- package/dist/components/SettingsSection/index.d.ts.map +1 -0
- package/dist/components/SettingsSection/index.js +36 -0
- package/dist/components/SettingsSection/styles.module.css.js +7 -0
- package/dist/components/SocialLinkRow/index.d.ts +11 -0
- package/dist/components/SocialLinkRow/index.d.ts.map +1 -0
- package/dist/components/SocialLinkRow/index.js +131 -0
- package/dist/components/SortableList/components/SortableItem/SortableItem.js +3 -3
- package/dist/components/StorageUsageProgress/index.js +26 -24
- package/dist/components/TimezonePicker/index.d.ts +9 -0
- package/dist/components/TimezonePicker/index.d.ts.map +1 -0
- package/dist/components/TimezonePicker/index.js +91 -0
- 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 +18 -17
- package/dist/components/WorkspaceMenu/WorkspaceMenu.d.ts.map +1 -1
- package/dist/components/WorkspaceMenu/WorkspaceMenu.js +70 -69
- package/dist/components/modals/RemoveConfirmModal.js +1 -1
- package/dist/components/table/components/TableHeaders.js +3 -3
- package/dist/components/table/components/TablePanel.js +1 -1
- package/dist/components/table/helpers/columns.js +3 -3
- package/dist/components/table/hooks/TableProvider.js +3 -3
- package/dist/components/table/selectors.js +6 -6
- package/dist/helpers/getFileType.d.ts +1 -2
- package/dist/helpers/getFileType.d.ts.map +1 -1
- package/dist/helpers/getFileType.js +5 -6
- 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 +14 -3
- package/dist/helpers/showNotifications.d.ts.map +1 -1
- package/dist/helpers/showNotifications.js +120 -61
- package/dist/helpers/showNotifications.module.css.js +29 -0
- package/dist/helpers/timezones.d.ts +12 -0
- package/dist/helpers/timezones.d.ts.map +1 -0
- package/dist/helpers/timezones.js +59 -0
- package/dist/hooks/useFeatureFeedback.d.ts +23 -0
- package/dist/hooks/useFeatureFeedback.d.ts.map +1 -0
- package/dist/hooks/useFeatureFeedback.js +48 -0
- package/dist/hooks/useNumberQueryParam.js +3 -3
- package/dist/hooks/useVideoUploadGuard.d.ts +2 -0
- package/dist/hooks/useVideoUploadGuard.d.ts.map +1 -0
- package/dist/hooks/useVideoUploadGuard.js +24 -0
- package/dist/index.css +1 -1
- package/dist/index.d.ts +13 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +461 -406
- package/dist/lang/locales/ui_en.json.js +24 -22
- package/dist/lang/locales/ui_es.json.js +20 -18
- package/dist/lang/locales/ui_ru.json.js +20 -18
- package/dist/lib/contentImport/index.d.ts +4 -0
- package/dist/lib/contentImport/index.d.ts.map +1 -0
- package/dist/lib/contentImport/lexicalSerializer.d.ts +19 -0
- package/dist/lib/contentImport/lexicalSerializer.d.ts.map +1 -0
- package/dist/lib/contentImport/lexicalSerializer.js +215 -0
- package/dist/lib/contentImport/types.d.ts +161 -0
- package/dist/lib/contentImport/types.d.ts.map +1 -0
- package/dist/lib/contentImport/utils.d.ts +35 -0
- package/dist/lib/contentImport/utils.d.ts.map +1 -0
- package/dist/lib/contentImport/utils.js +145 -0
- 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/node_modules/countries-and-timezones/esm/index.js +4031 -0
- package/dist/store/plansModal.d.ts.map +1 -1
- package/dist/store/plansModal.js +8 -7
- package/dist/utils/formatStorage.d.ts +7 -1
- package/dist/utils/formatStorage.d.ts.map +1 -1
- package/dist/utils/formatStorage.js +10 -5
- package/dist/utils/getCroppedBlob.d.ts +3 -0
- package/dist/utils/getCroppedBlob.d.ts.map +1 -0
- package/dist/utils/getCroppedBlob.js +21 -0
- package/package.json +1 -1
- package/dist/assets/images/flags/es.svg.js +0 -4
- package/dist/assets/images/flags/ru.svg.js +0 -4
- package/dist/assets/images/flags/us.svg.js +0 -4
- package/dist/components/PaymentSuccess/PaymentSuccess.d.ts +0 -2
- package/dist/components/PaymentSuccess/PaymentSuccess.d.ts.map +0 -1
- package/dist/components/PaymentSuccess/PaymentSuccess.js +0 -41
|
@@ -1,94 +1,111 @@
|
|
|
1
|
-
import { jsxs as
|
|
2
|
-
import { useState as
|
|
3
|
-
import { useTranslation as
|
|
4
|
-
import { Search01Icon as
|
|
5
|
-
import { HugeiconsIcon as
|
|
6
|
-
import { Stack as
|
|
7
|
-
import { useDebouncedValue as w, useDebouncedCallback as
|
|
1
|
+
import { jsxs as a, jsx as t } from "react/jsx-runtime";
|
|
2
|
+
import { useState as m, useMemo as z, useEffect as k, useCallback as T } from "react";
|
|
3
|
+
import { useTranslation as L } from "react-i18next";
|
|
4
|
+
import { Search01Icon as j } from "@hugeicons/core-free-icons";
|
|
5
|
+
import { HugeiconsIcon as B } from "@hugeicons/react";
|
|
6
|
+
import { Stack as C, TextInput as D, Loader as M, Box as c, SimpleGrid as N, AspectRatio as _, Text as b, Button as q } from "@mantine/core";
|
|
7
|
+
import { useDebouncedValue as w, useDebouncedCallback as A } from "@mantine/hooks";
|
|
8
8
|
import { NoData as F } from "../NoData/NoData.js";
|
|
9
|
-
import { FilePickerSkeletonLoader as
|
|
10
|
-
import { useUnsplashPhotos as
|
|
11
|
-
import
|
|
12
|
-
const
|
|
13
|
-
onChange:
|
|
9
|
+
import { FilePickerSkeletonLoader as Q } from "./FilePickerSkeletonLoader.js";
|
|
10
|
+
import { useUnsplashPhotos as R } from "./api/unsplashApi.js";
|
|
11
|
+
import y from "./FilePicker.module.css.js";
|
|
12
|
+
const x = (l) => (l || []).reduce((s, o) => (s[o.id] = o, s), {}), X = ({
|
|
13
|
+
onChange: l,
|
|
14
14
|
clientId: s
|
|
15
15
|
}) => {
|
|
16
|
-
const { t } =
|
|
16
|
+
const { t: o } = L("ui"), [u, v] = m(""), [h] = w(u, 800), [I, p] = m(1), [d, g] = m({}), { data: r, isLoading: n } = R(
|
|
17
17
|
{
|
|
18
|
-
query:
|
|
18
|
+
query: h,
|
|
19
19
|
page: I,
|
|
20
20
|
per_page: 24,
|
|
21
21
|
order_by: "popular"
|
|
22
22
|
},
|
|
23
23
|
s
|
|
24
|
-
), i =
|
|
25
|
-
() => Object.values({ ...d, ...
|
|
24
|
+
), i = z(
|
|
25
|
+
() => Object.values({ ...d, ...x(r?.items) }),
|
|
26
26
|
[d, r?.items]
|
|
27
|
-
),
|
|
27
|
+
), f = A(() => {
|
|
28
28
|
setTimeout(() => {
|
|
29
|
-
|
|
29
|
+
g((e) => ({ ...e, ...x(r?.items) }));
|
|
30
30
|
}, 0);
|
|
31
31
|
}, 100);
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
}, [r?.items,
|
|
35
|
-
|
|
36
|
-
}, [
|
|
37
|
-
const
|
|
32
|
+
k(() => {
|
|
33
|
+
f();
|
|
34
|
+
}, [r?.items, f]), k(() => {
|
|
35
|
+
g({});
|
|
36
|
+
}, [h]);
|
|
37
|
+
const S = T(
|
|
38
38
|
(e) => {
|
|
39
|
-
|
|
39
|
+
v(e.currentTarget.value), p(1);
|
|
40
40
|
},
|
|
41
41
|
[]
|
|
42
42
|
);
|
|
43
|
-
return /* @__PURE__ */
|
|
44
|
-
/* @__PURE__ */
|
|
45
|
-
|
|
43
|
+
return /* @__PURE__ */ a(C, { gap: "sm", children: [
|
|
44
|
+
/* @__PURE__ */ t(
|
|
45
|
+
D,
|
|
46
46
|
{
|
|
47
|
-
leftSection:
|
|
47
|
+
leftSection: n ? /* @__PURE__ */ t(M, { size: 16 }) : /* @__PURE__ */ t(B, { size: 16, icon: j }),
|
|
48
48
|
maxLength: 50,
|
|
49
|
-
placeholder:
|
|
49
|
+
placeholder: o("changeCover.searchImage"),
|
|
50
50
|
"data-autofocus": !0,
|
|
51
|
-
value:
|
|
52
|
-
onChange:
|
|
51
|
+
value: u,
|
|
52
|
+
onChange: S
|
|
53
53
|
}
|
|
54
54
|
),
|
|
55
|
-
/* @__PURE__ */ c
|
|
56
|
-
!!i.length && /* @__PURE__ */
|
|
57
|
-
/* @__PURE__ */
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
55
|
+
/* @__PURE__ */ a(c, { mah: 300, w: "100%", style: { overflowY: "auto" }, children: [
|
|
56
|
+
!!i.length && /* @__PURE__ */ a(C, { gap: 8, children: [
|
|
57
|
+
/* @__PURE__ */ t(N, { cols: 4, spacing: 10, children: i.map((e) => /* @__PURE__ */ a(c, { children: [
|
|
58
|
+
/* @__PURE__ */ t(
|
|
59
|
+
_,
|
|
60
|
+
{
|
|
61
|
+
onClick: () => l?.(e.urls.regular),
|
|
62
|
+
ratio: 120 / 65,
|
|
63
|
+
className: y.itemImage,
|
|
64
|
+
style: {
|
|
65
|
+
backgroundImage: `url(${e.urls.small})`
|
|
66
|
+
}
|
|
65
67
|
}
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
68
|
+
),
|
|
69
|
+
/* @__PURE__ */ t(c, { className: y.imageAuthor, children: /* @__PURE__ */ a(b, { truncate: !0, c: "gray", size: "xs", children: [
|
|
70
|
+
o("changeCover.photoBy"),
|
|
71
|
+
" ",
|
|
72
|
+
/* @__PURE__ */ t(
|
|
73
|
+
b,
|
|
74
|
+
{
|
|
75
|
+
component: "a",
|
|
76
|
+
inherit: !0,
|
|
77
|
+
href: e.user.links.html,
|
|
78
|
+
target: "_blank",
|
|
79
|
+
rel: "noopener noreferrer",
|
|
80
|
+
onClick: (P) => P.stopPropagation(),
|
|
81
|
+
children: e.user.name
|
|
82
|
+
}
|
|
83
|
+
)
|
|
84
|
+
] }) })
|
|
85
|
+
] }, e.id)) }),
|
|
86
|
+
r?.hasMore && /* @__PURE__ */ t(
|
|
70
87
|
q,
|
|
71
88
|
{
|
|
72
89
|
variant: "subtle",
|
|
73
|
-
loading:
|
|
90
|
+
loading: n,
|
|
74
91
|
onClick: () => p((e) => e + 1),
|
|
75
|
-
children:
|
|
92
|
+
children: o("loadMore")
|
|
76
93
|
}
|
|
77
94
|
)
|
|
78
95
|
] }),
|
|
79
|
-
!i.length && !
|
|
96
|
+
!i.length && !n && /* @__PURE__ */ t(c, { pb: 16, children: /* @__PURE__ */ t(
|
|
80
97
|
F,
|
|
81
98
|
{
|
|
82
99
|
size: 120,
|
|
83
100
|
illustration: "noImage",
|
|
84
|
-
description:
|
|
101
|
+
description: o("changeCover.noResult"),
|
|
85
102
|
titleProps: { size: "xs", c: "dimmed" }
|
|
86
103
|
}
|
|
87
104
|
) }),
|
|
88
|
-
!i.length &&
|
|
105
|
+
!i.length && n && /* @__PURE__ */ t(Q, {})
|
|
89
106
|
] })
|
|
90
107
|
] });
|
|
91
108
|
};
|
|
92
109
|
export {
|
|
93
|
-
|
|
110
|
+
X as FilePickerUnsplash
|
|
94
111
|
};
|
|
@@ -1,26 +1,26 @@
|
|
|
1
|
-
import { jsx as e, jsxs as s, Fragment as
|
|
2
|
-
import { memo as
|
|
3
|
-
import { createPortal as
|
|
4
|
-
import { Stack as
|
|
5
|
-
import { AnimatePresence as
|
|
1
|
+
import { jsx as e, jsxs as s, Fragment as p } from "react/jsx-runtime";
|
|
2
|
+
import { memo as h } from "react";
|
|
3
|
+
import { createPortal as u } from "react-dom";
|
|
4
|
+
import { Stack as b, Flex as y } from "@mantine/core";
|
|
5
|
+
import { AnimatePresence as v, motion as k } from "framer-motion";
|
|
6
6
|
import { Copyright as S } from "../../Copyright/index.js";
|
|
7
7
|
import { animations as w } from "../helpers/slides.js";
|
|
8
|
-
import { useFormViewerStore as
|
|
9
|
-
import { startStepReselect as
|
|
10
|
-
import { Navigation as
|
|
11
|
-
import { getImageFilter as
|
|
8
|
+
import { useFormViewerStore as d } from "../store/formStore.js";
|
|
9
|
+
import { startStepReselect as x, themeReselect as F } from "../store/selectors.js";
|
|
10
|
+
import { Navigation as $ } from "./Navigation/Navigation.js";
|
|
11
|
+
import { getImageFilter as R, Step as j } from "./Step.js";
|
|
12
12
|
import { ProgressLine as A } from "./fields/ProgressLine.js";
|
|
13
13
|
import g from "../FormViewer.module.css.js";
|
|
14
14
|
import { useSteps as C } from "../hooks/useCreateFormContext.js";
|
|
15
|
-
import { useFormMobile as
|
|
15
|
+
import { useFormMobile as M } from "../hooks/useFormMobile.js";
|
|
16
16
|
import { useActiveStep as N } from "../hooks/useActiveStep.js";
|
|
17
|
-
const
|
|
17
|
+
const U = ({
|
|
18
18
|
NoStepSlot: m,
|
|
19
19
|
copyright: l
|
|
20
20
|
}) => {
|
|
21
|
-
const { useStore: a } =
|
|
22
|
-
return a(
|
|
23
|
-
|
|
21
|
+
const { useStore: a } = d();
|
|
22
|
+
return a(x) ? /* @__PURE__ */ e(P, { copyright: l }) : /* @__PURE__ */ e(
|
|
23
|
+
b,
|
|
24
24
|
{
|
|
25
25
|
align: "center",
|
|
26
26
|
justify: "center",
|
|
@@ -31,11 +31,11 @@ const T = ({
|
|
|
31
31
|
children: /* @__PURE__ */ e(m, {})
|
|
32
32
|
}
|
|
33
33
|
);
|
|
34
|
-
}, P =
|
|
35
|
-
const { anim: l } = C(), { ref: a } =
|
|
36
|
-
return /* @__PURE__ */ s(
|
|
37
|
-
|
|
38
|
-
/* @__PURE__ */ s(
|
|
34
|
+
}, P = h(({ copyright: m }) => {
|
|
35
|
+
const { anim: l } = C(), { ref: a, isMobile: o } = M(), { useStore: c } = d(), r = c((n) => n.config.settings), f = c((n) => n.editing), t = c(F), i = N();
|
|
36
|
+
return /* @__PURE__ */ s(p, { children: [
|
|
37
|
+
u(
|
|
38
|
+
/* @__PURE__ */ s(p, { children: [
|
|
39
39
|
/* @__PURE__ */ e(
|
|
40
40
|
"link",
|
|
41
41
|
{
|
|
@@ -70,7 +70,7 @@ const T = ({
|
|
|
70
70
|
"--bg-fit": t.background?.fit || "cover",
|
|
71
71
|
"--bg-image": t.background?.image ? `url(${t.background.image})` : "none",
|
|
72
72
|
"--bg-color": t.background?.color || "none",
|
|
73
|
-
"--bg-image-filter":
|
|
73
|
+
"--bg-image-filter": R({
|
|
74
74
|
brightness: t.background?.brightness || 100,
|
|
75
75
|
blur: t.background?.blur,
|
|
76
76
|
layout: "background"
|
|
@@ -78,7 +78,7 @@ const T = ({
|
|
|
78
78
|
}
|
|
79
79
|
}
|
|
80
80
|
),
|
|
81
|
-
/* @__PURE__ */ e(
|
|
81
|
+
/* @__PURE__ */ e(v, { mode: "wait", children: i && /* @__PURE__ */ e(
|
|
82
82
|
k.div,
|
|
83
83
|
{
|
|
84
84
|
style: {
|
|
@@ -91,43 +91,45 @@ const T = ({
|
|
|
91
91
|
transition: {
|
|
92
92
|
duration: 0.25
|
|
93
93
|
},
|
|
94
|
-
...w[
|
|
94
|
+
...w[r.slideAnimation][l],
|
|
95
95
|
animate: { opacity: 1, y: 0, x: 0 },
|
|
96
96
|
children: /* @__PURE__ */ e(
|
|
97
|
-
|
|
97
|
+
j,
|
|
98
98
|
{
|
|
99
|
-
step:
|
|
100
|
-
theme:
|
|
99
|
+
step: i,
|
|
100
|
+
theme: i.theme
|
|
101
101
|
},
|
|
102
|
-
|
|
102
|
+
i.id
|
|
103
103
|
)
|
|
104
104
|
},
|
|
105
|
-
|
|
105
|
+
i.id
|
|
106
106
|
) })
|
|
107
107
|
] }),
|
|
108
108
|
/* @__PURE__ */ s(
|
|
109
|
-
|
|
109
|
+
y,
|
|
110
110
|
{
|
|
111
|
-
pos: "absolute",
|
|
112
|
-
bottom: 24,
|
|
113
|
-
right: 24,
|
|
114
|
-
|
|
111
|
+
pos: o ? "relative" : "absolute",
|
|
112
|
+
bottom: o ? void 0 : 24,
|
|
113
|
+
right: o ? void 0 : 24,
|
|
114
|
+
justify: o ? "flex-end" : void 0,
|
|
115
|
+
p: o ? "8px 12px" : void 0,
|
|
116
|
+
onClick: f ? (n) => n.preventDefault() : void 0,
|
|
115
117
|
children: [
|
|
116
|
-
|
|
118
|
+
r.copyright && /* @__PURE__ */ e(
|
|
117
119
|
S,
|
|
118
120
|
{
|
|
119
121
|
size: "sm",
|
|
120
|
-
color:
|
|
122
|
+
color: i?.theme?.primaryColor,
|
|
121
123
|
title: m
|
|
122
124
|
}
|
|
123
125
|
),
|
|
124
|
-
|
|
126
|
+
r.navArrows && r.layout === "slides" && /* @__PURE__ */ e($, {})
|
|
125
127
|
]
|
|
126
128
|
}
|
|
127
129
|
),
|
|
128
|
-
|
|
130
|
+
r.progressBar && /* @__PURE__ */ e(A, {})
|
|
129
131
|
] });
|
|
130
132
|
});
|
|
131
133
|
export {
|
|
132
|
-
|
|
134
|
+
U as OneSlideLayout
|
|
133
135
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useCreateFormContext.d.ts","sourceRoot":"","sources":["../../../../src/components/FormViewer/hooks/useCreateFormContext.tsx"],"names":[],"mappings":"AAAA,OAAO,EACL,iBAAiB,EAKlB,MAAM,OAAO,CAAC;AAEf,OAAO,EAAE,iBAAiB,EAAW,MAAM,eAAe,CAAC;AAO3D,OAAO,EAAE,SAAS,EAAE,MAAM,eAAe,CAAC;AAG1C,KAAK,YAAY,GAAG;IAClB,UAAU,EAAE,MAAM,IAAI,CAAC;IACvB,UAAU,EAAE,MAAM,IAAI,CAAC;IACvB,IAAI,EAAE,SAAS,CAAC;IAChB,IAAI,EAAE,iBAAiB,CAAC,eAAe,CAAC,CAAC;IACzC,QAAQ,EAAE,CAAC,SAAS,EAAE,MAAM,EAAE,KAAK,EAAE,GAAG,EAAE,OAAO,CAAC,EAAE,MAAM,KAAK,IAAI,CAAC;CACrE,CAAC;AAEF,eAAO,MAAM,YAAY,uCAExB,CAAC;AAEF,eAAO,MAAM,QAAQ,oBAAiC,CAAC;AAEvD,MAAM,MAAM,eAAe,GAAG,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,GAAG;IAClD,YAAY,EAAE,MAAM,CAAC;CACtB,CAAC;AAEF,KAAK,yBAAyB,GAAG;IAC/B,QAAQ,CAAC,EAAE,CAAC,MAAM,EAAE,eAAe,KAAK,IAAI,CAAC;IAC7C,cAAc,CAAC,EAAE,CAAC,MAAM,EAAE,eAAe,KAAK,IAAI,CAAC;CACpD,CAAC;
|
|
1
|
+
{"version":3,"file":"useCreateFormContext.d.ts","sourceRoot":"","sources":["../../../../src/components/FormViewer/hooks/useCreateFormContext.tsx"],"names":[],"mappings":"AAAA,OAAO,EACL,iBAAiB,EAKlB,MAAM,OAAO,CAAC;AAEf,OAAO,EAAE,iBAAiB,EAAW,MAAM,eAAe,CAAC;AAO3D,OAAO,EAAE,SAAS,EAAE,MAAM,eAAe,CAAC;AAG1C,KAAK,YAAY,GAAG;IAClB,UAAU,EAAE,MAAM,IAAI,CAAC;IACvB,UAAU,EAAE,MAAM,IAAI,CAAC;IACvB,IAAI,EAAE,SAAS,CAAC;IAChB,IAAI,EAAE,iBAAiB,CAAC,eAAe,CAAC,CAAC;IACzC,QAAQ,EAAE,CAAC,SAAS,EAAE,MAAM,EAAE,KAAK,EAAE,GAAG,EAAE,OAAO,CAAC,EAAE,MAAM,KAAK,IAAI,CAAC;CACrE,CAAC;AAEF,eAAO,MAAM,YAAY,uCAExB,CAAC;AAEF,eAAO,MAAM,QAAQ,oBAAiC,CAAC;AAEvD,MAAM,MAAM,eAAe,GAAG,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,GAAG;IAClD,YAAY,EAAE,MAAM,CAAC;CACtB,CAAC;AAEF,KAAK,yBAAyB,GAAG;IAC/B,QAAQ,CAAC,EAAE,CAAC,MAAM,EAAE,eAAe,KAAK,IAAI,CAAC;IAC7C,cAAc,CAAC,EAAE,CAAC,MAAM,EAAE,eAAe,KAAK,IAAI,CAAC;CACpD,CAAC;AA2GF,kEAAkE;AAClE,eAAO,MAAM,mBAAmB,GAAI,wBAGjC,iBAAiB,CAAC,yBAAyB,CAAC,4CAK9C,CAAC"}
|
|
@@ -34,26 +34,26 @@ const d = h(
|
|
|
34
34
|
}) => {
|
|
35
35
|
const { useStore: a, api: i } = A(), { currentSteps: l } = a(T), n = j(), [f, p] = b("next"), { getValidation: x } = y(), r = E({
|
|
36
36
|
initialValues: l?.reduce(
|
|
37
|
-
(
|
|
38
|
-
|
|
39
|
-
}),
|
|
37
|
+
(o, e) => (e.controls?.forEach((t) => {
|
|
38
|
+
o[t.id] = w[t.controlType];
|
|
39
|
+
}), o),
|
|
40
40
|
{
|
|
41
41
|
submissionId: crypto.randomUUID()
|
|
42
42
|
}
|
|
43
43
|
),
|
|
44
|
-
validate: l?.reduce((
|
|
44
|
+
validate: l?.reduce((o, e) => (e.controls?.forEach((t) => o[t.id] = x(t)), o), {}),
|
|
45
45
|
onValuesChange: u
|
|
46
46
|
}), c = m(() => {
|
|
47
47
|
if (!n || (n.controls || []).map((t) => r.validateField(t.id)).some((t) => t.hasError)) return;
|
|
48
|
-
const
|
|
49
|
-
p("next"), setTimeout(() => {
|
|
50
|
-
i.setActiveStepId(
|
|
51
|
-
}, 0),
|
|
48
|
+
const e = g(n, l, r);
|
|
49
|
+
p("next"), e && setTimeout(() => {
|
|
50
|
+
i.setActiveStepId(e.id);
|
|
51
|
+
}, 0), e?.isEnd && (s?.(r.getValues()), new F().addConfetti());
|
|
52
52
|
}, [n, i, l, r, s]), S = m(() => {
|
|
53
53
|
p("prev"), setTimeout(() => i.backActiveStep(), 0);
|
|
54
54
|
}, [i]), v = m(
|
|
55
|
-
(
|
|
56
|
-
r.setFieldValue(
|
|
55
|
+
(o, e) => {
|
|
56
|
+
r.setFieldValue(o, e), n?.autoSubmit && c();
|
|
57
57
|
},
|
|
58
58
|
[n?.autoSubmit, r, c]
|
|
59
59
|
);
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { useMemo as r } from "react";
|
|
2
2
|
import { generateColors as a } from "@mantine/colors-generator";
|
|
3
|
-
import { createTheme as d,
|
|
3
|
+
import { createTheme as d, DEFAULT_THEME as u, Flex as l, ActionIcon as m, ThemeIcon as f, Card as c, InputError as p, Progress as x, Select as z, NumberInput as b, Textarea as P, TextInput as h, Button as R, Text as T, Title as g } from "@mantine/core";
|
|
4
4
|
import { DateInput as y } from "@mantine/dates";
|
|
5
5
|
import { scopeCustomCss as F } from "../helpers/cssScoping.js";
|
|
6
6
|
import { useFormViewerStore as I } from "../store/formStore.js";
|
|
@@ -9,7 +9,7 @@ const B = ({ innerId: t }) => {
|
|
|
9
9
|
const { useStore: s } = I(), e = s(S), i = r(() => {
|
|
10
10
|
const n = a(e?.primaryColor || ""), o = "custom";
|
|
11
11
|
return d({
|
|
12
|
-
...
|
|
12
|
+
...u,
|
|
13
13
|
fontFamily: `"${e.font?.fontFamily || "Roboto"}", sans-serif`,
|
|
14
14
|
// fontWeight: theme.font?.fontWeight,
|
|
15
15
|
headings: {
|
|
@@ -22,7 +22,7 @@ const B = ({ innerId: t }) => {
|
|
|
22
22
|
},
|
|
23
23
|
defaultRadius: e.borderRadius,
|
|
24
24
|
components: {
|
|
25
|
-
Title:
|
|
25
|
+
Title: g.extend({
|
|
26
26
|
defaultProps: {
|
|
27
27
|
style: {
|
|
28
28
|
fontFamily: e.title?.fontFamily,
|
|
@@ -30,7 +30,7 @@ const B = ({ innerId: t }) => {
|
|
|
30
30
|
}
|
|
31
31
|
}
|
|
32
32
|
}),
|
|
33
|
-
Text:
|
|
33
|
+
Text: T.extend({
|
|
34
34
|
defaultProps: {
|
|
35
35
|
style: {
|
|
36
36
|
fontFamily: e.font?.fontFamily,
|
|
@@ -38,7 +38,7 @@ const B = ({ innerId: t }) => {
|
|
|
38
38
|
}
|
|
39
39
|
}
|
|
40
40
|
}),
|
|
41
|
-
Button:
|
|
41
|
+
Button: R.extend({
|
|
42
42
|
defaultProps: {
|
|
43
43
|
color: o,
|
|
44
44
|
size: e.size,
|
|
@@ -46,7 +46,7 @@ const B = ({ innerId: t }) => {
|
|
|
46
46
|
radius: e.borderRadius
|
|
47
47
|
}
|
|
48
48
|
}),
|
|
49
|
-
TextInput:
|
|
49
|
+
TextInput: h.extend({
|
|
50
50
|
defaultProps: {
|
|
51
51
|
radius: e.borderRadius,
|
|
52
52
|
color: o,
|
|
@@ -60,60 +60,60 @@ const B = ({ innerId: t }) => {
|
|
|
60
60
|
size: e.size
|
|
61
61
|
}
|
|
62
62
|
}),
|
|
63
|
-
Textarea:
|
|
63
|
+
Textarea: P.extend({
|
|
64
64
|
defaultProps: {
|
|
65
65
|
radius: e.borderRadius,
|
|
66
66
|
color: o,
|
|
67
67
|
size: e.size
|
|
68
68
|
}
|
|
69
69
|
}),
|
|
70
|
-
NumberInput:
|
|
70
|
+
NumberInput: b.extend({
|
|
71
71
|
defaultProps: {
|
|
72
72
|
radius: e.borderRadius,
|
|
73
73
|
color: o,
|
|
74
74
|
size: e.size
|
|
75
75
|
}
|
|
76
76
|
}),
|
|
77
|
-
Select:
|
|
77
|
+
Select: z.extend({
|
|
78
78
|
defaultProps: {
|
|
79
79
|
radius: e.borderRadius,
|
|
80
80
|
color: o,
|
|
81
81
|
size: e.size
|
|
82
82
|
}
|
|
83
83
|
}),
|
|
84
|
-
Progress:
|
|
84
|
+
Progress: x.extend({
|
|
85
85
|
defaultProps: {
|
|
86
86
|
radius: e.borderRadius,
|
|
87
87
|
color: o,
|
|
88
88
|
size: e.size
|
|
89
89
|
}
|
|
90
90
|
}),
|
|
91
|
-
InputError:
|
|
91
|
+
InputError: p.extend({
|
|
92
92
|
defaultProps: {
|
|
93
93
|
color: o,
|
|
94
94
|
size: e.size
|
|
95
95
|
}
|
|
96
96
|
}),
|
|
97
|
-
Card:
|
|
97
|
+
Card: c.extend({
|
|
98
98
|
defaultProps: {
|
|
99
99
|
radius: e.borderRadius
|
|
100
100
|
}
|
|
101
101
|
}),
|
|
102
|
-
ThemeIcon:
|
|
102
|
+
ThemeIcon: f.extend({
|
|
103
103
|
defaultProps: {
|
|
104
104
|
radius: e.borderRadius,
|
|
105
105
|
color: o,
|
|
106
106
|
size: e.size
|
|
107
107
|
}
|
|
108
108
|
}),
|
|
109
|
-
ActionIcon:
|
|
109
|
+
ActionIcon: m.extend({
|
|
110
110
|
defaultProps: {
|
|
111
111
|
radius: e.borderRadius,
|
|
112
112
|
color: o,
|
|
113
113
|
size: e.size
|
|
114
114
|
}
|
|
115
115
|
}),
|
|
116
|
-
Flex:
|
|
116
|
+
Flex: l.extend({
|
|
117
117
|
defaultProps: {
|
|
118
118
|
align: "center",
|
|
119
119
|
gap: 8
|
|
@@ -1,14 +1,14 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { useCallback as m, useMemo as d } from "react";
|
|
2
2
|
import { isValid as f } from "date-fns";
|
|
3
3
|
import { useFormViewerStore as v } from "../store/formStore.js";
|
|
4
4
|
import { controlsReselect as h } from "../store/selectors.js";
|
|
5
5
|
import { useSteps as g } from "./useCreateFormContext.js";
|
|
6
6
|
const N = (i, o = !1) => {
|
|
7
7
|
const a = b();
|
|
8
|
-
return
|
|
8
|
+
return d(() => o ? i || "" : a(i), [o, a, i]);
|
|
9
9
|
}, b = () => {
|
|
10
10
|
const { form: i } = g(), { useStore: o } = v(), a = o(h);
|
|
11
|
-
return
|
|
11
|
+
return m(
|
|
12
12
|
(u) => {
|
|
13
13
|
const p = a.reduce(
|
|
14
14
|
(t, e) => {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { jsx as p } from "react/jsx-runtime";
|
|
2
|
-
import { useState as a, useLayoutEffect as d,
|
|
2
|
+
import { useState as a, useLayoutEffect as d, useContext as S, createContext as v } from "react";
|
|
3
3
|
import { create as w } from "zustand";
|
|
4
4
|
import { createFormStoreApi as x } from "./formStoreApi.js";
|
|
5
5
|
const b = () => {
|
|
@@ -40,7 +40,7 @@ const b = () => {
|
|
|
40
40
|
useStore: e,
|
|
41
41
|
api: x(e)
|
|
42
42
|
};
|
|
43
|
-
}, u =
|
|
43
|
+
}, u = v(null), P = ({
|
|
44
44
|
children: e,
|
|
45
45
|
editing: t = !1,
|
|
46
46
|
preview: o = !1,
|
|
@@ -70,7 +70,7 @@ const b = () => {
|
|
|
70
70
|
r.api
|
|
71
71
|
]), /* @__PURE__ */ p(u.Provider, { value: r, children: m ? e : null });
|
|
72
72
|
}, A = () => {
|
|
73
|
-
const t =
|
|
73
|
+
const t = S(u) || window.globalFormStore;
|
|
74
74
|
if (!t)
|
|
75
75
|
throw new Error(
|
|
76
76
|
"useFormViewerStore must be used within a FormStoreProvider"
|
|
@@ -6,11 +6,11 @@ const O = (e) => {
|
|
|
6
6
|
...t,
|
|
7
7
|
...n
|
|
8
8
|
}));
|
|
9
|
-
},
|
|
10
|
-
e.getState().onConfigChange?.(
|
|
9
|
+
}, l = () => e.getState().config, s = () => {
|
|
10
|
+
e.getState().onConfigChange?.(l());
|
|
11
11
|
}, u = (n) => {
|
|
12
12
|
e.setState({ layout: n });
|
|
13
|
-
},
|
|
13
|
+
}, m = (n) => {
|
|
14
14
|
e.setState((t) => ({
|
|
15
15
|
...t,
|
|
16
16
|
config: {
|
|
@@ -122,7 +122,7 @@ const O = (e) => {
|
|
|
122
122
|
steps: o
|
|
123
123
|
}
|
|
124
124
|
};
|
|
125
|
-
}),
|
|
125
|
+
}), S(n.id), s();
|
|
126
126
|
}, A = (n) => {
|
|
127
127
|
e.setState((i) => ({
|
|
128
128
|
...i,
|
|
@@ -130,7 +130,7 @@ const O = (e) => {
|
|
|
130
130
|
...i.config,
|
|
131
131
|
steps: i.config.steps.filter((o) => o.id !== n) || []
|
|
132
132
|
}
|
|
133
|
-
})), E(e.getState()) === n &&
|
|
133
|
+
})), E(e.getState()) === n && h(), s();
|
|
134
134
|
}, F = (n, t) => {
|
|
135
135
|
n === "list" ? e.setState((i) => ({
|
|
136
136
|
...i,
|
|
@@ -291,7 +291,7 @@ const O = (e) => {
|
|
|
291
291
|
...o,
|
|
292
292
|
initialConfigSnapshot: n
|
|
293
293
|
})), t || s();
|
|
294
|
-
},
|
|
294
|
+
}, S = (n) => {
|
|
295
295
|
e.setState((t) => {
|
|
296
296
|
const i = [
|
|
297
297
|
...t.activeStep.history.slice(0, t.activeStep.current + 1),
|
|
@@ -324,10 +324,10 @@ const O = (e) => {
|
|
|
324
324
|
)
|
|
325
325
|
}
|
|
326
326
|
}));
|
|
327
|
-
},
|
|
327
|
+
}, h = () => {
|
|
328
328
|
e.setState({
|
|
329
329
|
activeStep: {
|
|
330
|
-
history: [],
|
|
330
|
+
history: [null],
|
|
331
331
|
current: 0
|
|
332
332
|
}
|
|
333
333
|
});
|
|
@@ -343,7 +343,7 @@ const O = (e) => {
|
|
|
343
343
|
})), s();
|
|
344
344
|
},
|
|
345
345
|
setLayout: u,
|
|
346
|
-
patchSettingsData:
|
|
346
|
+
patchSettingsData: m,
|
|
347
347
|
patchThemeData: C,
|
|
348
348
|
patchContainerTheme: y,
|
|
349
349
|
patchTitleProperties: b,
|
|
@@ -363,19 +363,19 @@ const O = (e) => {
|
|
|
363
363
|
removeCondition: V,
|
|
364
364
|
setIsMobile: _,
|
|
365
365
|
setConfig: $,
|
|
366
|
-
setActiveStepId:
|
|
366
|
+
setActiveStepId: S,
|
|
367
367
|
setFormLayout: (n) => {
|
|
368
|
-
|
|
368
|
+
m({ layout: n }), s();
|
|
369
369
|
},
|
|
370
370
|
scrollToControl: (n) => {
|
|
371
371
|
const t = document.querySelector(`[data-control-id='${n}']`);
|
|
372
372
|
t && t.scrollIntoView({ behavior: "smooth", block: "center" });
|
|
373
373
|
},
|
|
374
|
-
getConfig:
|
|
374
|
+
getConfig: l,
|
|
375
375
|
setProps: r,
|
|
376
376
|
forwardActiveStep: z,
|
|
377
377
|
backActiveStep: j,
|
|
378
|
-
resetActiveStep:
|
|
378
|
+
resetActiveStep: h
|
|
379
379
|
};
|
|
380
380
|
};
|
|
381
381
|
export {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { createSelector as s } from "@reduxjs/toolkit";
|
|
2
2
|
import { isEqual as y } from "lodash-es";
|
|
3
3
|
import { DEFAULT_THEME as v } from "../constants/defaultTheme.js";
|
|
4
|
-
import {
|
|
4
|
+
import { sortSteps as g, mergeTheme as d } from "../helpers/helpers.js";
|
|
5
5
|
import { getFirstStep as B } from "../helpers/steps.js";
|
|
6
6
|
const D = v, M = s(
|
|
7
7
|
[(t) => t.config.theme],
|
|
@@ -4,6 +4,7 @@ export interface GroupAvatarProps extends Omit<AvatarProps, 'src'>, Omit<React.C
|
|
|
4
4
|
groupId?: string;
|
|
5
5
|
groupName?: string;
|
|
6
6
|
size?: number | string;
|
|
7
|
+
textSize?: number | string;
|
|
7
8
|
}
|
|
8
9
|
export declare const GroupAvatar: import("react").ForwardRefExoticComponent<GroupAvatarProps & import("react").RefAttributes<HTMLDivElement>>;
|
|
9
10
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/GroupAvatar/index.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AAK5C,MAAM,WAAW,gBACf,SAAQ,IAAI,CAAC,WAAW,EAAE,KAAK,CAAC,EAC9B,IAAI,CAAC,KAAK,CAAC,wBAAwB,CAAC,KAAK,CAAC,EAAE,MAAM,WAAW,CAAC;IAChE,SAAS,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAC1B,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,IAAI,CAAC,EAAE,MAAM,GAAG,MAAM,CAAC;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/GroupAvatar/index.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AAK5C,MAAM,WAAW,gBACf,SAAQ,IAAI,CAAC,WAAW,EAAE,KAAK,CAAC,EAC9B,IAAI,CAAC,KAAK,CAAC,wBAAwB,CAAC,KAAK,CAAC,EAAE,MAAM,WAAW,CAAC;IAChE,SAAS,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAC1B,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,IAAI,CAAC,EAAE,MAAM,GAAG,MAAM,CAAC;IACvB,QAAQ,CAAC,EAAE,MAAM,GAAG,MAAM,CAAC;CAC5B;AAED,eAAO,MAAM,WAAW,6GAiBvB,CAAC"}
|
|
@@ -1,14 +1,15 @@
|
|
|
1
|
-
import { jsx as
|
|
2
|
-
import { forwardRef as
|
|
3
|
-
import
|
|
1
|
+
import { jsx as i } from "react/jsx-runtime";
|
|
2
|
+
import { forwardRef as p } from "react";
|
|
3
|
+
import f from "../../assets/svg/group_default_icon.svg.js";
|
|
4
4
|
import { UserAvatar as u } from "../UserAvatar/index.js";
|
|
5
|
-
const
|
|
6
|
-
({ groupIcon: r, groupId: a, groupName: o, size: t = 24, ...m }, e) => /* @__PURE__ */
|
|
5
|
+
const n = p(
|
|
6
|
+
({ groupIcon: r, groupId: a, groupName: o, size: t = 24, ...m }, e) => /* @__PURE__ */ i(
|
|
7
7
|
u,
|
|
8
8
|
{
|
|
9
9
|
ref: e,
|
|
10
|
+
variant: "light",
|
|
10
11
|
user: {
|
|
11
|
-
avatar: r ||
|
|
12
|
+
avatar: r || f,
|
|
12
13
|
id: a || "",
|
|
13
14
|
name: o,
|
|
14
15
|
email: ""
|
|
@@ -18,7 +19,7 @@ const s = f(
|
|
|
18
19
|
}
|
|
19
20
|
)
|
|
20
21
|
);
|
|
21
|
-
|
|
22
|
+
n.displayName = "GroupAvatar";
|
|
22
23
|
export {
|
|
23
|
-
|
|
24
|
+
n as GroupAvatar
|
|
24
25
|
};
|