@layers-app/shared 0.2.5 → 0.2.6
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/AppsSidebar/UserSection.d.ts.map +1 -1
- package/dist/components/AppContainer/components/AppsSidebar/UserSection.js +30 -30
- 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 +45 -42
- package/dist/components/AppContainer/hooks/useAppContainerDataStore.d.ts.map +1 -1
- package/dist/components/AppContainer/hooks/useAppContainerDataStore.js +1 -0
- package/dist/components/AppContainer/types.d.ts +1 -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/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/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 +356 -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 +26 -22
- 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/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 +109 -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 +90 -0
- 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/showNotifications.d.ts +14 -3
- package/dist/helpers/showNotifications.d.ts.map +1 -1
- package/dist/helpers/showNotifications.js +152 -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/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 +10 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +449 -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/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,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"
|
|
@@ -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
|
};
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
export interface ImageCropperProps {
|
|
2
|
+
src: string;
|
|
3
|
+
variant?: 'square' | 'rounded';
|
|
4
|
+
aspectRatio?: number;
|
|
5
|
+
minSize?: number;
|
|
6
|
+
maxSize?: number;
|
|
7
|
+
onCropComplete?: (croppedImage: Blob) => void;
|
|
8
|
+
onCropDataChange?: (data: CropData) => void;
|
|
9
|
+
}
|
|
10
|
+
export interface CropData {
|
|
11
|
+
x: number;
|
|
12
|
+
y: number;
|
|
13
|
+
width: number;
|
|
14
|
+
height: number;
|
|
15
|
+
scale: number;
|
|
16
|
+
}
|
|
17
|
+
export declare const ImageCropper: ({ src, variant, aspectRatio, minSize, maxSize, onCropComplete, onCropDataChange, }: ImageCropperProps) => import("react/jsx-runtime").JSX.Element;
|
|
18
|
+
export default ImageCropper;
|
|
19
|
+
//# sourceMappingURL=ImageCropper.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ImageCropper.d.ts","sourceRoot":"","sources":["../../../src/components/ImageCropper/ImageCropper.tsx"],"names":[],"mappings":"AAOA,MAAM,WAAW,iBAAiB;IAChC,GAAG,EAAE,MAAM,CAAC;IACZ,OAAO,CAAC,EAAE,QAAQ,GAAG,SAAS,CAAC;IAC/B,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,cAAc,CAAC,EAAE,CAAC,YAAY,EAAE,IAAI,KAAK,IAAI,CAAC;IAC9C,gBAAgB,CAAC,EAAE,CAAC,IAAI,EAAE,QAAQ,KAAK,IAAI,CAAC;CAC7C;AAED,MAAM,WAAW,QAAQ;IACvB,CAAC,EAAE,MAAM,CAAC;IACV,CAAC,EAAE,MAAM,CAAC;IACV,KAAK,EAAE,MAAM,CAAC;IACd,MAAM,EAAE,MAAM,CAAC;IACf,KAAK,EAAE,MAAM,CAAC;CACf;AASD,eAAO,MAAM,YAAY,GAAI,oFAQ1B,iBAAiB,4CAuiBnB,CAAC;AAEF,eAAe,YAAY,CAAC"}
|