@layers-app/shared 0.2.2 → 0.2.4
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/group_default_icon.svg.js +4 -0
- 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 +31 -23
- package/dist/components/AppContainer/hooks/useAppContainerStore.d.ts.map +1 -1
- package/dist/components/AppContainer/hooks/useAppContainerStore.js +30 -20
- package/dist/components/AppContainer/types.d.ts +1 -0
- package/dist/components/AppContainer/types.d.ts.map +1 -1
- package/dist/components/CommentComposer/CommentComposer.module.css.js +4 -4
- package/dist/components/CommentComposer/CommentEditorHotkeys.d.ts.map +1 -1
- package/dist/components/CommentComposer/CommentEditorHotkeys.js +25 -22
- package/dist/components/CommentComposer/index.d.ts.map +1 -1
- package/dist/components/CommentComposer/index.js +237 -153
- package/dist/components/CommentComposer/{useFloatingPosition.d.ts → useVirtualAnchor.d.ts} +3 -4
- package/dist/components/CommentComposer/useVirtualAnchor.d.ts.map +1 -0
- package/dist/components/CommentComposer/useVirtualAnchor.js +71 -0
- package/dist/components/EmojiPicker/EmojiPanel.d.ts.map +1 -1
- package/dist/components/EmojiPicker/EmojiPanel.js +50 -49
- package/dist/components/EmojiPicker/IconsPanel.d.ts.map +1 -1
- package/dist/components/EmojiPicker/IconsPanel.js +79 -78
- package/dist/components/FilePicker/FilePicker.d.ts +2 -3
- package/dist/components/FilePicker/FilePicker.d.ts.map +1 -1
- package/dist/components/FilePicker/FilePicker.js +88 -122
- package/dist/components/FilePicker/FilePickerGiphy.d.ts +1 -3
- package/dist/components/FilePicker/FilePickerGiphy.d.ts.map +1 -1
- package/dist/components/FilePicker/FilePickerGiphy.js +43 -44
- package/dist/components/FilePicker/FilePickerLink.d.ts +2 -3
- package/dist/components/FilePicker/FilePickerLink.d.ts.map +1 -1
- package/dist/components/FilePicker/FilePickerLink.js +21 -21
- package/dist/components/FilePicker/FilePickerUnsplash.d.ts +1 -3
- package/dist/components/FilePicker/FilePickerUnsplash.d.ts.map +1 -1
- package/dist/components/FilePicker/FilePickerUnsplash.js +45 -46
- package/dist/components/FilePicker/FilePickerUpload.d.ts +3 -3
- package/dist/components/FilePicker/FilePickerUpload.d.ts.map +1 -1
- package/dist/components/FilePicker/FilePickerUpload.js +49 -43
- package/dist/components/FormViewer/hooks/useFormGlobalTheme.d.ts +5 -5
- package/dist/components/GroupAvatar/index.d.ts +9 -0
- package/dist/components/GroupAvatar/index.d.ts.map +1 -0
- package/dist/components/GroupAvatar/index.js +24 -0
- package/dist/components/NavMenu/components/NavMenuItem.d.ts.map +1 -1
- package/dist/components/NavMenu/components/NavMenuItem.js +6 -5
- package/dist/components/WorkspaceMenu/WorkspaceMenu.d.ts +2 -2
- package/dist/components/WorkspaceMenu/WorkspaceMenu.d.ts.map +1 -1
- package/dist/components/WorkspaceMenu/WorkspaceMenu.js +100 -103
- package/dist/components/modals/RemoveConfirmModal.d.ts.map +1 -1
- package/dist/components/modals/RemoveConfirmModal.js +22 -21
- package/dist/components/table/FrontTable.d.ts +2 -1
- package/dist/components/table/FrontTable.d.ts.map +1 -1
- package/dist/components/table/components/TableCell.d.ts.map +1 -1
- package/dist/components/table/components/TableCell.js +63 -26
- package/dist/components/table/components/TableMenu.d.ts +2 -1
- package/dist/components/table/components/TableMenu.d.ts.map +1 -1
- package/dist/components/table/components/TableMenu.js +15 -14
- package/dist/constants.d.ts +4 -0
- package/dist/constants.d.ts.map +1 -1
- package/dist/constants.js +7 -4
- package/dist/index.css +1 -1
- package/dist/index.d.ts +1 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +390 -384
- package/dist/lang/locales/ui_en.json.js +20 -12
- package/dist/lang/locales/ui_es.json.js +18 -10
- package/dist/lang/locales/ui_ru.json.js +24 -16
- package/dist/store/accessOptionsControl.d.ts +11 -1
- package/dist/store/accessOptionsControl.d.ts.map +1 -1
- package/dist/store/accessOptionsControl.js +15 -7
- package/package.json +1 -1
- package/dist/components/CommentComposer/useFloatingPosition.d.ts.map +0 -1
- package/dist/components/CommentComposer/useFloatingPosition.js +0 -115
|
@@ -1,95 +1,94 @@
|
|
|
1
|
-
import { jsxs as c, jsx as
|
|
2
|
-
import { useState as l, useMemo as
|
|
3
|
-
import { useTranslation as
|
|
4
|
-
import { Search01Icon as
|
|
5
|
-
import { HugeiconsIcon as
|
|
6
|
-
import { Stack as b, TextInput as
|
|
7
|
-
import { useDebouncedValue as
|
|
8
|
-
import { NoData as
|
|
9
|
-
import { FilePickerSkeletonLoader as
|
|
10
|
-
import { useUnsplashPhotos as
|
|
11
|
-
import
|
|
12
|
-
const
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
clientId: a
|
|
1
|
+
import { jsxs as c, jsx as o } from "react/jsx-runtime";
|
|
2
|
+
import { useState as l, useMemo as x, useEffect as f, useCallback as S } from "react";
|
|
3
|
+
import { useTranslation as P } from "react-i18next";
|
|
4
|
+
import { Search01Icon as z } from "@hugeicons/core-free-icons";
|
|
5
|
+
import { HugeiconsIcon as L } from "@hugeicons/react";
|
|
6
|
+
import { Stack as b, TextInput as T, Loader as j, Box as C, SimpleGrid as D, AspectRatio as M, Button as q } from "@mantine/core";
|
|
7
|
+
import { useDebouncedValue as w, useDebouncedCallback as B } from "@mantine/hooks";
|
|
8
|
+
import { NoData as F } from "../NoData/NoData.js";
|
|
9
|
+
import { FilePickerSkeletonLoader as N } from "./FilePickerSkeletonLoader.js";
|
|
10
|
+
import { useUnsplashPhotos as Q } from "./api/unsplashApi.js";
|
|
11
|
+
import R from "./FilePicker.module.css.js";
|
|
12
|
+
const k = (n) => (n || []).reduce((s, t) => (s[t.id] = t, s), {}), K = ({
|
|
13
|
+
onChange: n,
|
|
14
|
+
clientId: s
|
|
16
15
|
}) => {
|
|
17
|
-
const { t
|
|
16
|
+
const { t } = P("ui"), [m, y] = l(""), [u] = w(m, 800), [I, p] = l(1), [d, h] = l({}), { data: r, isLoading: a } = Q(
|
|
18
17
|
{
|
|
19
18
|
query: u,
|
|
20
|
-
page:
|
|
19
|
+
page: I,
|
|
21
20
|
per_page: 24,
|
|
22
21
|
order_by: "popular"
|
|
23
22
|
},
|
|
24
|
-
|
|
25
|
-
),
|
|
26
|
-
() => Object.values({ ...d, ...
|
|
27
|
-
[d,
|
|
28
|
-
), g =
|
|
23
|
+
s
|
|
24
|
+
), i = x(
|
|
25
|
+
() => Object.values({ ...d, ...k(r?.items) }),
|
|
26
|
+
[d, r?.items]
|
|
27
|
+
), g = B(() => {
|
|
29
28
|
setTimeout(() => {
|
|
30
|
-
h((e) => ({ ...e, ...
|
|
29
|
+
h((e) => ({ ...e, ...k(r?.items) }));
|
|
31
30
|
}, 0);
|
|
32
31
|
}, 100);
|
|
33
32
|
f(() => {
|
|
34
33
|
g();
|
|
35
|
-
}, [
|
|
34
|
+
}, [r?.items, g]), f(() => {
|
|
36
35
|
h({});
|
|
37
36
|
}, [u]);
|
|
38
|
-
const
|
|
37
|
+
const v = S(
|
|
39
38
|
(e) => {
|
|
40
|
-
|
|
39
|
+
y(e.currentTarget.value), p(1);
|
|
41
40
|
},
|
|
42
41
|
[]
|
|
43
42
|
);
|
|
44
43
|
return /* @__PURE__ */ c(b, { gap: "sm", children: [
|
|
45
|
-
/* @__PURE__ */
|
|
46
|
-
|
|
44
|
+
/* @__PURE__ */ o(
|
|
45
|
+
T,
|
|
47
46
|
{
|
|
48
|
-
leftSection:
|
|
47
|
+
leftSection: a ? /* @__PURE__ */ o(j, { size: 16 }) : /* @__PURE__ */ o(L, { size: 16, icon: z }),
|
|
49
48
|
maxLength: 50,
|
|
50
|
-
placeholder:
|
|
49
|
+
placeholder: t("changeCover.searchImage"),
|
|
51
50
|
"data-autofocus": !0,
|
|
52
51
|
value: m,
|
|
53
|
-
onChange:
|
|
52
|
+
onChange: v
|
|
54
53
|
}
|
|
55
54
|
),
|
|
56
|
-
/* @__PURE__ */ c(
|
|
57
|
-
!!
|
|
58
|
-
/* @__PURE__ */
|
|
59
|
-
|
|
55
|
+
/* @__PURE__ */ c(C, { mah: 300, w: "100%", style: { overflowY: "auto" }, children: [
|
|
56
|
+
!!i.length && /* @__PURE__ */ c(b, { gap: 8, children: [
|
|
57
|
+
/* @__PURE__ */ o(D, { cols: 4, spacing: 10, children: i.map((e) => /* @__PURE__ */ o(
|
|
58
|
+
M,
|
|
60
59
|
{
|
|
61
|
-
onClick: () =>
|
|
60
|
+
onClick: () => n?.(e.urls.regular),
|
|
62
61
|
ratio: 120 / 65,
|
|
63
|
-
className:
|
|
62
|
+
className: R.itemImage,
|
|
64
63
|
style: {
|
|
65
64
|
backgroundImage: `url(${e.urls.small})`
|
|
66
65
|
}
|
|
67
66
|
},
|
|
68
67
|
e.id
|
|
69
68
|
)) }),
|
|
70
|
-
|
|
71
|
-
|
|
69
|
+
r?.hasMore && /* @__PURE__ */ o(
|
|
70
|
+
q,
|
|
72
71
|
{
|
|
73
72
|
variant: "subtle",
|
|
74
|
-
loading:
|
|
73
|
+
loading: a,
|
|
75
74
|
onClick: () => p((e) => e + 1),
|
|
76
|
-
children:
|
|
75
|
+
children: t("loadMore")
|
|
77
76
|
}
|
|
78
77
|
)
|
|
79
78
|
] }),
|
|
80
|
-
!
|
|
81
|
-
|
|
79
|
+
!i.length && !a && /* @__PURE__ */ o(C, { pb: 16, children: /* @__PURE__ */ o(
|
|
80
|
+
F,
|
|
82
81
|
{
|
|
83
82
|
size: 120,
|
|
84
83
|
illustration: "noImage",
|
|
85
|
-
description:
|
|
84
|
+
description: t("changeCover.noResult"),
|
|
86
85
|
titleProps: { size: "xs", c: "dimmed" }
|
|
87
86
|
}
|
|
88
87
|
) }),
|
|
89
|
-
!
|
|
88
|
+
!i.length && a && /* @__PURE__ */ o(N, {})
|
|
90
89
|
] })
|
|
91
90
|
] });
|
|
92
91
|
};
|
|
93
92
|
export {
|
|
94
|
-
|
|
93
|
+
K as FilePickerUnsplash
|
|
95
94
|
};
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { DropzoneProps, FileWithPath } from '@mantine/dropzone';
|
|
2
|
-
import {
|
|
2
|
+
import { FileType } from './types';
|
|
3
3
|
import '@mantine/dropzone/styles.css';
|
|
4
|
-
export declare const FilePickerUpload: ({
|
|
5
|
-
|
|
4
|
+
export declare const FilePickerUpload: ({ type, uploading, dropZoneProps, onUpload, }: {
|
|
5
|
+
type?: FileType;
|
|
6
6
|
uploading: boolean;
|
|
7
7
|
dropZoneProps?: Omit<DropzoneProps, "onDrop">;
|
|
8
8
|
onUpload: (files: FileWithPath[]) => void;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"FilePickerUpload.d.ts","sourceRoot":"","sources":["../../../src/components/FilePicker/FilePickerUpload.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"FilePickerUpload.d.ts","sourceRoot":"","sources":["../../../src/components/FilePicker/FilePickerUpload.tsx"],"names":[],"mappings":"AAMA,OAAO,EAEL,aAAa,EAEb,YAAY,EAEb,MAAM,mBAAmB,CAAC;AAI3B,OAAO,EAAE,QAAQ,EAAE,MAAM,SAAS,CAAC;AAEnC,OAAO,8BAA8B,CAAC;AAEtC,eAAO,MAAM,gBAAgB,GAAI,+CAK9B;IACD,IAAI,CAAC,EAAE,QAAQ,CAAC;IAChB,SAAS,EAAE,OAAO,CAAC;IACnB,aAAa,CAAC,EAAE,IAAI,CAAC,aAAa,EAAE,QAAQ,CAAC,CAAC;IAC9C,QAAQ,EAAE,CAAC,KAAK,EAAE,YAAY,EAAE,KAAK,IAAI,CAAC;CAC3C,4CAkGA,CAAC"}
|
|
@@ -1,61 +1,67 @@
|
|
|
1
|
-
import { jsx as
|
|
2
|
-
import { useCallback as
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
1
|
+
import { jsx as n, jsxs as m } from "react/jsx-runtime";
|
|
2
|
+
import { useCallback as f } from "react";
|
|
3
|
+
import { useTranslation as M } from "react-i18next";
|
|
4
|
+
import { Image02Icon as k } from "@hugeicons/core-free-icons";
|
|
5
|
+
import { HugeiconsIcon as v } from "@hugeicons/react";
|
|
6
|
+
import { Stack as d, Text as p } from "@mantine/core";
|
|
7
|
+
import { Dropzone as E, IMAGE_MIME_TYPE as I } from "@mantine/dropzone";
|
|
8
|
+
import { showNotification as h } from "@mantine/notifications";
|
|
9
|
+
import { showErrorNotification as S } from "../../helpers/showNotifications.js";
|
|
9
10
|
import "@mantine/dropzone/styles.css";
|
|
10
|
-
const
|
|
11
|
-
|
|
12
|
-
uploading:
|
|
13
|
-
dropZoneProps:
|
|
11
|
+
const $ = ({
|
|
12
|
+
type: l = "image",
|
|
13
|
+
uploading: g,
|
|
14
|
+
dropZoneProps: t,
|
|
14
15
|
onUpload: s
|
|
15
16
|
}) => {
|
|
16
|
-
const
|
|
17
|
-
(
|
|
18
|
-
|
|
19
|
-
|
|
17
|
+
const { t: e } = M("ui"), u = t?.maxSize != null ? Math.round(t.maxSize / (1024 * 1024)) : 5, x = `filePicker.dropFileHere.${l}`, c = `filePicker.description.${l}`, F = e(x, {
|
|
18
|
+
defaultValue: e("dropFileHere")
|
|
19
|
+
}), a = (() => {
|
|
20
|
+
const r = e(c, { maxSize: u });
|
|
21
|
+
return r !== c ? r : null;
|
|
22
|
+
})(), y = f(
|
|
23
|
+
(r) => {
|
|
24
|
+
if (r.filter(
|
|
25
|
+
(o) => o.errors.some((i) => i.code === "file-invalid-type")
|
|
20
26
|
).length > 0) {
|
|
21
|
-
|
|
27
|
+
h({
|
|
22
28
|
color: "blue",
|
|
23
|
-
message: e.errors.typeIsNotAllowed
|
|
29
|
+
message: e("filePicker.errors.typeIsNotAllowed")
|
|
24
30
|
});
|
|
25
31
|
return;
|
|
26
32
|
}
|
|
27
|
-
if (
|
|
28
|
-
|
|
29
|
-
title: e
|
|
30
|
-
message: e.errors.shouldNotExceed
|
|
33
|
+
if (r.some((o) => o.errors.some((i) => i.code === "file-too-large"))) {
|
|
34
|
+
S({
|
|
35
|
+
title: e("errorMessage"),
|
|
36
|
+
message: e("filePicker.errors.shouldNotExceed")
|
|
31
37
|
});
|
|
32
38
|
return;
|
|
33
39
|
}
|
|
34
|
-
if (
|
|
35
|
-
(
|
|
40
|
+
if (r.filter(
|
|
41
|
+
(o) => o.errors.some((i) => i.code === "too-many-files")
|
|
36
42
|
).length > 0) {
|
|
37
|
-
|
|
43
|
+
h({
|
|
38
44
|
color: "blue",
|
|
39
|
-
message: e.errors.doNotUploadMoreThanSingleFile
|
|
45
|
+
message: e("filePicker.errors.doNotUploadMoreThanSingleFile")
|
|
40
46
|
});
|
|
41
47
|
return;
|
|
42
48
|
}
|
|
43
49
|
},
|
|
44
50
|
[e]
|
|
45
|
-
),
|
|
46
|
-
return /* @__PURE__ */
|
|
47
|
-
|
|
51
|
+
), z = f(s, [s]);
|
|
52
|
+
return /* @__PURE__ */ n(
|
|
53
|
+
E,
|
|
48
54
|
{
|
|
49
|
-
loading:
|
|
50
|
-
onDrop:
|
|
51
|
-
onReject:
|
|
52
|
-
maxFiles:
|
|
53
|
-
accept:
|
|
55
|
+
loading: g,
|
|
56
|
+
onDrop: z,
|
|
57
|
+
onReject: y,
|
|
58
|
+
maxFiles: t?.maxFiles || 1,
|
|
59
|
+
accept: I,
|
|
54
60
|
px: 60,
|
|
55
61
|
py: "xl",
|
|
56
|
-
...
|
|
62
|
+
...t || {},
|
|
57
63
|
children: /* @__PURE__ */ m(
|
|
58
|
-
|
|
64
|
+
d,
|
|
59
65
|
{
|
|
60
66
|
justify: "center",
|
|
61
67
|
gap: "var(--mantine-font-size-xs",
|
|
@@ -63,17 +69,17 @@ const C = ({
|
|
|
63
69
|
mih: 89,
|
|
64
70
|
style: { pointerEvents: "none" },
|
|
65
71
|
children: [
|
|
66
|
-
/* @__PURE__ */
|
|
67
|
-
|
|
72
|
+
/* @__PURE__ */ n(
|
|
73
|
+
v,
|
|
68
74
|
{
|
|
69
75
|
size: 32,
|
|
70
76
|
color: "var(--mantine-color-bright)",
|
|
71
|
-
icon:
|
|
77
|
+
icon: k
|
|
72
78
|
}
|
|
73
79
|
),
|
|
74
|
-
/* @__PURE__ */ m(
|
|
75
|
-
/* @__PURE__ */
|
|
76
|
-
/* @__PURE__ */
|
|
80
|
+
/* @__PURE__ */ m(d, { gap: 8, align: "center", children: [
|
|
81
|
+
/* @__PURE__ */ n(p, { fw: 500, fz: "sm", c: "bright", lh: "sm", ta: "center", children: F }),
|
|
82
|
+
a && /* @__PURE__ */ n(p, { fz: "xs", fw: 400, lh: "140%", c: "dimmed", ta: "center", children: a })
|
|
77
83
|
] })
|
|
78
84
|
]
|
|
79
85
|
}
|
|
@@ -82,5 +88,5 @@ const C = ({
|
|
|
82
88
|
);
|
|
83
89
|
};
|
|
84
90
|
export {
|
|
85
|
-
|
|
91
|
+
$ as FilePickerUpload
|
|
86
92
|
};
|
|
@@ -10,19 +10,19 @@ export declare const useFormGlobalTheme: ({ innerId }: {
|
|
|
10
10
|
black?: string | undefined;
|
|
11
11
|
colors?: {
|
|
12
12
|
[x: string & {}]: import("@mantine/core").MantineColorsTuple | undefined;
|
|
13
|
-
gray?: import("@mantine/core").MantineColorsTuple | undefined;
|
|
14
13
|
blue?: import("@mantine/core").MantineColorsTuple | undefined;
|
|
14
|
+
indigo?: import("@mantine/core").MantineColorsTuple | undefined;
|
|
15
15
|
violet?: import("@mantine/core").MantineColorsTuple | undefined;
|
|
16
|
-
|
|
16
|
+
grape?: import("@mantine/core").MantineColorsTuple | undefined;
|
|
17
17
|
green?: import("@mantine/core").MantineColorsTuple | undefined;
|
|
18
|
+
orange?: import("@mantine/core").MantineColorsTuple | undefined;
|
|
19
|
+
gray?: import("@mantine/core").MantineColorsTuple | undefined;
|
|
20
|
+
cyan?: import("@mantine/core").MantineColorsTuple | undefined;
|
|
18
21
|
yellow?: import("@mantine/core").MantineColorsTuple | undefined;
|
|
19
22
|
red?: import("@mantine/core").MantineColorsTuple | undefined;
|
|
20
23
|
dark?: import("@mantine/core").MantineColorsTuple | undefined;
|
|
21
24
|
pink?: import("@mantine/core").MantineColorsTuple | undefined;
|
|
22
|
-
grape?: import("@mantine/core").MantineColorsTuple | undefined;
|
|
23
|
-
indigo?: import("@mantine/core").MantineColorsTuple | undefined;
|
|
24
25
|
lime?: import("@mantine/core").MantineColorsTuple | undefined;
|
|
25
|
-
orange?: import("@mantine/core").MantineColorsTuple | undefined;
|
|
26
26
|
teal?: import("@mantine/core").MantineColorsTuple | undefined;
|
|
27
27
|
} | undefined;
|
|
28
28
|
primaryShade?: import("@mantine/core").MantineColorShade | {
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { AvatarProps } from '@mantine/core';
|
|
2
|
+
export interface GroupAvatarProps extends Omit<AvatarProps, 'src'>, Omit<React.ComponentPropsWithoutRef<'div'>, keyof AvatarProps> {
|
|
3
|
+
groupIcon?: string | null;
|
|
4
|
+
groupId?: string;
|
|
5
|
+
groupName?: string;
|
|
6
|
+
size?: number | string;
|
|
7
|
+
}
|
|
8
|
+
export declare const GroupAvatar: import("react").ForwardRefExoticComponent<GroupAvatarProps & import("react").RefAttributes<HTMLDivElement>>;
|
|
9
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +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;CACxB;AAED,eAAO,MAAM,WAAW,6GAgBvB,CAAC"}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { jsx as p } from "react/jsx-runtime";
|
|
2
|
+
import { forwardRef as f } from "react";
|
|
3
|
+
import i from "../../assets/svg/group_default_icon.svg.js";
|
|
4
|
+
import { UserAvatar as u } from "../UserAvatar/index.js";
|
|
5
|
+
const s = f(
|
|
6
|
+
({ groupIcon: r, groupId: a, groupName: o, size: t = 24, ...m }, e) => /* @__PURE__ */ p(
|
|
7
|
+
u,
|
|
8
|
+
{
|
|
9
|
+
ref: e,
|
|
10
|
+
user: {
|
|
11
|
+
avatar: r || i,
|
|
12
|
+
id: a || "",
|
|
13
|
+
name: o,
|
|
14
|
+
email: ""
|
|
15
|
+
},
|
|
16
|
+
size: t,
|
|
17
|
+
...m
|
|
18
|
+
}
|
|
19
|
+
)
|
|
20
|
+
);
|
|
21
|
+
s.displayName = "GroupAvatar";
|
|
22
|
+
export {
|
|
23
|
+
s as GroupAvatar
|
|
24
|
+
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"NavMenuItem.d.ts","sourceRoot":"","sources":["../../../../src/components/NavMenu/components/NavMenuItem.tsx"],"names":[],"mappings":"AAmBA,OAAO,EAAE,oBAAoB,EAAE,MAAM,aAAa,CAAC;AAKnD,KAAK,gBAAgB,GAAG;IACtB,IAAI,EAAE,oBAAoB,CAAC;IAC3B,WAAW,CAAC,EAAE,OAAO,CAAC;CACvB,CAAC;AAEF,eAAO,MAAM,WAAW,8DAAgC,gBAAgB,6CAStE,CAAC;
|
|
1
|
+
{"version":3,"file":"NavMenuItem.d.ts","sourceRoot":"","sources":["../../../../src/components/NavMenu/components/NavMenuItem.tsx"],"names":[],"mappings":"AAmBA,OAAO,EAAE,oBAAoB,EAAE,MAAM,aAAa,CAAC;AAKnD,KAAK,gBAAgB,GAAG;IACtB,IAAI,EAAE,oBAAoB,CAAC;IAC3B,WAAW,CAAC,EAAE,OAAO,CAAC;CACvB,CAAC;AAEF,eAAO,MAAM,WAAW,8DAAgC,gBAAgB,6CAStE,CAAC;AAyMH,eAAO,MAAM,eAAe,GAAI,0CAI7B;IACD,KAAK,EAAE,MAAM,CAAC;IACd,MAAM,EAAE,MAAM,CAAC;IACf,oBAAoB,EAAE,MAAM,CAAC;CAC9B,4CAiCA,CAAC"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { jsx as t, jsxs as d } from "react/jsx-runtime";
|
|
2
|
-
import { memo as m, useRef as
|
|
2
|
+
import { memo as m, useRef as C, useEffect as b, useMemo as E } from "react";
|
|
3
3
|
import { useTranslation as g } from "react-i18next";
|
|
4
4
|
import { NavLink as S } from "react-router-dom";
|
|
5
5
|
import { MoreHorizontalIcon as I, ArrowRight01Icon as M } from "@hugeicons/core-free-icons";
|
|
@@ -17,7 +17,7 @@ import { NavMenuActionIcon as O } from "./NavMenuActionIcon.js";
|
|
|
17
17
|
import a from "../NavMenu.module.css.js";
|
|
18
18
|
const ne = m(({ item: e, ignoreDepth: o }) => {
|
|
19
19
|
const { useStore: r } = u(), n = r((s) => s.editId === e.id);
|
|
20
|
-
return /* @__PURE__ */ t(
|
|
20
|
+
return /* @__PURE__ */ t(x, { depth: o ? void 0 : e.depth, children: n ? /* @__PURE__ */ t(B, { item: e }) : /* @__PURE__ */ t(T, { item: e }) });
|
|
21
21
|
}), T = m(({ item: e }) => {
|
|
22
22
|
const { api: o } = u();
|
|
23
23
|
return e.href ? /* @__PURE__ */ t(
|
|
@@ -92,7 +92,7 @@ const ne = m(({ item: e, ignoreDepth: o }) => {
|
|
|
92
92
|
e.rightSection
|
|
93
93
|
] });
|
|
94
94
|
}), B = m(({ item: e }) => {
|
|
95
|
-
const { api: o } = u(), r =
|
|
95
|
+
const { api: o } = u(), r = C(null), n = z({
|
|
96
96
|
initialValues: {
|
|
97
97
|
name: e.title,
|
|
98
98
|
icon: e.data?.icon || ""
|
|
@@ -143,13 +143,14 @@ const ne = m(({ item: e, ignoreDepth: o }) => {
|
|
|
143
143
|
ref: r,
|
|
144
144
|
className: a.editInput,
|
|
145
145
|
...n.getInputProps("name"),
|
|
146
|
+
maxLength: 255,
|
|
146
147
|
onFocus: (c) => c.target.select()
|
|
147
148
|
}
|
|
148
149
|
) })
|
|
149
150
|
] })
|
|
150
151
|
}
|
|
151
152
|
);
|
|
152
|
-
}),
|
|
153
|
+
}), x = m(
|
|
153
154
|
({ depth: e = 0, children: o }) => /* @__PURE__ */ d(
|
|
154
155
|
"div",
|
|
155
156
|
{
|
|
@@ -169,7 +170,7 @@ const ne = m(({ item: e, ignoreDepth: o }) => {
|
|
|
169
170
|
currentChildrenCount: r
|
|
170
171
|
}) => {
|
|
171
172
|
const { t: n } = g("appContainer"), { api: s } = u(), { isLoading: l, onSubmit: i } = D();
|
|
172
|
-
return /* @__PURE__ */ t(
|
|
173
|
+
return /* @__PURE__ */ t(x, { depth: e, children: /* @__PURE__ */ t(
|
|
173
174
|
"div",
|
|
174
175
|
{
|
|
175
176
|
className: a.item,
|
|
@@ -35,6 +35,6 @@ export type WorkspaceMenuProps<W extends MenuWorkspace = MenuWorkspace> = {
|
|
|
35
35
|
isAnonym?: boolean;
|
|
36
36
|
publicMode?: boolean;
|
|
37
37
|
};
|
|
38
|
-
export declare const WorkspaceMenu: <W extends MenuWorkspace>({ children, onCreate, onClick, active, items, workspaceLink, settingsLink, membersLink,
|
|
39
|
-
export declare const ActiveWorkspace: <W extends MenuWorkspace>({ active, workspaceLink, settingsLink, membersLink,
|
|
38
|
+
export declare const WorkspaceMenu: <W extends MenuWorkspace>({ children, onCreate, onClick, active, items, workspaceLink, settingsLink, membersLink, isAnonym, publicMode, }: PropsWithChildren<WorkspaceMenuProps<W>>) => import("react/jsx-runtime").JSX.Element;
|
|
39
|
+
export declare const ActiveWorkspace: <W extends MenuWorkspace>({ active, workspaceLink, settingsLink, membersLink, onClose, }: Pick<WorkspaceMenuProps<W>, "active" | "workspaceLink" | "settingsLink" | "membersLink" | "onClose">) => import("react/jsx-runtime").JSX.Element;
|
|
40
40
|
//# sourceMappingURL=WorkspaceMenu.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"WorkspaceMenu.d.ts","sourceRoot":"","sources":["../../../src/components/WorkspaceMenu/WorkspaceMenu.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,iBAAiB,EAAY,MAAM,OAAO,CAAC;AA6BpD,MAAM,WAAW,aAAa;IAC5B,WAAW,EAAE,MAAM,CAAC;IACpB,aAAa,EAAE,MAAM,CAAC;IACtB,aAAa,EAAE,MAAM,CAAC;IACtB,UAAU,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAC3B,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,kBAAkB,CAAC,EAAE,MAAM,CAAC;IAC5B,iBAAiB,CAAC,EAAE,KAAK,CAAC;QACxB,IAAI,EACA,QAAQ,GACR,WAAW,GACX,QAAQ,GACR,OAAO,GACP,OAAO,GACP,UAAU,GACV,MAAM,CAAC;QACX,MAAM,EAAE,MAAM,CAAC;KAChB,CAAC,CAAC;IACH,IAAI,EAAE,MAAM,CAAC;IACb,YAAY,CAAC,EAAE,MAAM,CAAC;CACvB;AAED,MAAM,MAAM,iBAAiB,GAAG;IAC9B,QAAQ,EAAE,OAAO,CAAC;IAClB,SAAS,EAAE,aAAa,CAAC;IACzB,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,uBAAuB,CAAC,EAAE,CAAC,CAAC,EAAE,OAAO,KAAK,IAAI,CAAC;CAChD,CAAC;AAEF,MAAM,MAAM,kBAAkB,CAAC,CAAC,SAAS,aAAa,GAAG,aAAa,IAAI;IACxE,OAAO,CAAC,EAAE,MAAM,IAAI,CAAC;IACrB,QAAQ,CAAC,EAAE,MAAM,IAAI,CAAC;IACtB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