@layers-app/shared 0.2.8 → 0.3.1
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/api/giphy/slice.d.ts +1 -1
- package/dist/api/giphy/slice.d.ts.map +1 -1
- package/dist/api/unsplash/slice.d.ts +1 -1
- package/dist/api/unsplash/slice.d.ts.map +1 -1
- package/dist/assets/default-workspace-avatar.jpg.js +4 -0
- package/dist/assets/layers-logo-full.svg.js +2 -3
- package/dist/assets/layers-logo-full.svg2.js +5 -0
- package/dist/assets/layers-logo-icon.svg.js +2 -3
- package/dist/assets/layers-logo-icon.svg2.js +5 -0
- package/dist/assets/projects/figureA.svg.js +4 -0
- package/dist/assets/projects/figureB.svg.js +4 -0
- package/dist/assets/qwebchannel.d.ts +15 -0
- package/dist/assets/qwebchannel.d.ts.map +1 -0
- package/dist/assets/taskPriorities/high.svg.js +5 -0
- package/dist/assets/taskPriorities/low.svg.js +5 -0
- package/dist/assets/taskPriorities/none.svg.js +5 -0
- package/dist/assets/taskPriorities/normal.svg.js +5 -0
- package/dist/assets/taskPriorities/urgent.svg.js +5 -0
- package/dist/components/AliasTextInput/AliasTextInput.d.ts.map +1 -1
- package/dist/components/AliasTextInput/AliasTextInput.js +8 -7
- package/dist/components/AnimatedFigurePage/AnimatedFigurePage.d.ts +3 -0
- package/dist/components/AnimatedFigurePage/AnimatedFigurePage.d.ts.map +1 -0
- package/dist/components/AnimatedFigurePage/AnimatedFigurePage.js +69 -0
- package/dist/components/AnimatedFigurePage/AnimatedFigurePage.module.css.js +27 -0
- package/dist/components/AnimatedFigurePage/types.d.ts +15 -0
- package/dist/components/AnimatedFigurePage/types.d.ts.map +1 -0
- package/dist/components/AnimatedFigurePage/useParallax.d.ts +6 -0
- package/dist/components/AnimatedFigurePage/useParallax.d.ts.map +1 -0
- package/dist/components/AnimatedFigurePage/useParallax.js +29 -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 +37 -36
- package/dist/components/AppContainer/components/AppsSidebar/UserSection.d.ts.map +1 -1
- package/dist/components/AppContainer/components/AppsSidebar/UserSection.js +80 -45
- package/dist/components/AppContainer/components/menus/HelpMenu/HelpMenu.d.ts.map +1 -1
- package/dist/components/AppContainer/components/menus/HelpMenu/HelpMenu.js +120 -120
- 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 +57 -51
- package/dist/components/AppContainer/hooks/useAppContainerDataStore.d.ts.map +1 -1
- package/dist/components/AppContainer/hooks/useAppContainerDataStore.js +3 -1
- package/dist/components/AppContainer/types.d.ts +3 -0
- package/dist/components/AppContainer/types.d.ts.map +1 -1
- package/dist/components/ColorPicker/ColorPickerPopover.d.ts +6 -6
- package/dist/components/ColorPicker/ColorPickerPopover.d.ts.map +1 -1
- package/dist/components/ColorPicker/ColorPickerPopover.js +29 -31
- package/dist/components/CommentComposer/index.d.ts.map +1 -1
- package/dist/components/CommentComposer/index.js +115 -111
- package/dist/components/CommunitiesDialog/index.d.ts.map +1 -1
- package/dist/components/CommunitiesDialog/index.js +47 -46
- package/dist/components/Copyright/index.d.ts.map +1 -1
- package/dist/components/Copyright/index.js +8 -7
- package/dist/components/EmojiPicker/EmojiPanel.d.ts.map +1 -1
- package/dist/components/EmojiPicker/EmojiPanel.js +12 -10
- package/dist/components/EmojiPicker/EmojiPicker.d.ts +3 -1
- package/dist/components/EmojiPicker/EmojiPicker.d.ts.map +1 -1
- package/dist/components/EmojiPicker/EmojiPicker.js +49 -46
- package/dist/components/EmojiPicker/IconsPanel.d.ts +2 -1
- package/dist/components/EmojiPicker/IconsPanel.d.ts.map +1 -1
- package/dist/components/EmojiPicker/IconsPanel.js +47 -45
- package/dist/components/EmojiPicker/custom-icons/customIcons.d.ts.map +1 -1
- package/dist/components/EmojiPicker/custom-icons/customIcons.js +66 -31
- package/dist/components/EntityIcon.d.ts +3 -3
- package/dist/components/EntityIcon.d.ts.map +1 -1
- package/dist/components/EntityIcon.js +59 -35
- package/dist/components/EntityTitle/EntityTitle.d.ts +1 -1
- package/dist/components/EntityTitle/EntityTitle.d.ts.map +1 -1
- package/dist/components/EntityTitle/EntityTitle.js +34 -34
- package/dist/components/EntityTitle/EntityTitle.module.css.js +1 -1
- package/dist/components/FilePicker/FilePicker.d.ts +1 -1
- package/dist/components/FilePicker/FilePicker.d.ts.map +1 -1
- package/dist/components/FilePicker/FilePicker.js +144 -152
- package/dist/components/FilePicker/FilePicker.module.css.js +10 -10
- package/dist/components/FilePicker/FilePickerGallery.js +13 -13
- package/dist/components/FilePicker/FilePickerGiphy.d.ts +1 -1
- package/dist/components/FilePicker/FilePickerGiphy.d.ts.map +1 -1
- package/dist/components/FilePicker/FilePickerGiphy.js +46 -48
- package/dist/components/FilePicker/FilePickerLink.d.ts.map +1 -1
- package/dist/components/FilePicker/FilePickerLink.js +16 -16
- package/dist/components/FilePicker/FilePickerUnsplash.d.ts +1 -1
- package/dist/components/FilePicker/FilePickerUnsplash.d.ts.map +1 -1
- package/dist/components/FilePicker/FilePickerUnsplash.js +49 -51
- package/dist/components/FilePicker/FilePickerUpload.d.ts.map +1 -1
- package/dist/components/FilePicker/FilePickerUpload.js +44 -42
- package/dist/components/FilePicker/api/giphyApi.d.ts +2 -2
- package/dist/components/FilePicker/api/giphyApi.d.ts.map +1 -1
- package/dist/components/FilePicker/api/giphyApi.js +11 -14
- package/dist/components/FilePicker/api/unsplashApi.d.ts +2 -2
- package/dist/components/FilePicker/api/unsplashApi.d.ts.map +1 -1
- package/dist/components/FilePicker/api/unsplashApi.js +14 -19
- package/dist/components/FormViewer/components/fields/SelectableCard/PictureSelectableCard.d.ts.map +1 -1
- package/dist/components/FormViewer/components/fields/SelectableCard/PictureSelectableCard.js +70 -72
- package/dist/components/FormViewer/components/fields/UploadField/UploadField.d.ts.map +1 -1
- package/dist/components/FormViewer/components/fields/UploadField/UploadField.js +34 -33
- package/dist/components/FormViewer/helpers/conditions.d.ts +84 -84
- package/dist/components/FormViewer/helpers/helpers.d.ts +84 -84
- package/dist/components/FormViewer/helpers/steps.d.ts +84 -84
- package/dist/components/FormViewer/helpers/steps.d.ts.map +1 -1
- package/dist/components/FormViewer/helpers/steps.js +22 -21
- package/dist/components/FormViewer/hooks/useActiveControl.d.ts +71 -71
- package/dist/components/FormViewer/hooks/useActiveStep.d.ts +84 -84
- package/dist/components/FormViewer/hooks/useFormGlobalTheme.d.ts +3 -3
- package/dist/components/FormViewer/store/formStore.d.ts +357 -357
- package/dist/components/FormViewer/store/formStoreApi.d.ts +178 -178
- package/dist/components/FormViewer/store/selectors.d.ts +23861 -23861
- package/dist/components/FormViewer/types/schemes.d.ts +1139 -1139
- package/dist/components/Logotype.d.ts +6 -4
- package/dist/components/Logotype.d.ts.map +1 -1
- package/dist/components/Logotype.js +62 -30
- package/dist/components/NavMenu/components/NavMenuItem.d.ts.map +1 -1
- package/dist/components/NavMenu/components/NavMenuItem.js +122 -107
- package/dist/components/NavMenu/types.d.ts +1 -0
- package/dist/components/NavMenu/types.d.ts.map +1 -1
- package/dist/components/OnBoarding/OnBoardingPage.js +35 -35
- package/dist/components/ProjectIcon/ProjectIcon.js +13 -13
- package/dist/components/TreeIndent/TreeIndent.d.ts +9 -0
- package/dist/components/TreeIndent/TreeIndent.d.ts.map +1 -0
- package/dist/components/TreeIndent/TreeIndent.js +15 -0
- package/dist/components/TreeIndent/TreeIndent.module.css.js +11 -0
- package/dist/components/TreeIndent/index.d.ts +2 -0
- package/dist/components/TreeIndent/index.d.ts.map +1 -0
- package/dist/components/WorkspaceAvatar/WorkspaceAvatar.js +6 -6
- package/dist/components/WorkspaceMenu/WorkspaceMenu.d.ts.map +1 -1
- package/dist/components/WorkspaceMenu/WorkspaceMenu.js +97 -101
- package/dist/components/modals/RemoveConfirmModal.d.ts.map +1 -1
- package/dist/config/brand.d.ts +49 -0
- package/dist/config/brand.d.ts.map +1 -0
- package/dist/config/brand.js +77 -0
- package/dist/config/envConfig.d.ts +110 -0
- package/dist/config/envConfig.d.ts.map +1 -0
- package/dist/config/envConfig.js +48 -0
- package/dist/constants.d.ts +1 -1
- package/dist/constants.d.ts.map +1 -1
- package/dist/constants.js +19 -7
- package/dist/helpers/getFileIcons.d.ts.map +1 -1
- package/dist/helpers/getFileIcons.js +34 -29
- package/dist/helpers/getFileType.d.ts +1 -1
- package/dist/helpers/getFileType.d.ts.map +1 -1
- package/dist/helpers/getFileType.js +3 -3
- package/dist/helpers/hotjar.d.ts.map +1 -1
- package/dist/helpers/hotjar.js +11 -7
- package/dist/helpers/platform.js +4 -4
- package/dist/helpers/showNotifications.d.ts +3 -0
- package/dist/helpers/showNotifications.d.ts.map +1 -1
- package/dist/helpers/showNotifications.js +79 -44
- package/dist/hooks/useDateFnsLocale.d.ts +2 -0
- package/dist/hooks/useDateFnsLocale.d.ts.map +1 -1
- package/dist/hooks/useDateFnsLocale.js +9 -8
- package/dist/hooks/useDateUtils.d.ts.map +1 -1
- package/dist/hooks/useDateUtils.js +19 -19
- package/dist/hooks/useDisableWindowScroll.js +3 -3
- package/dist/hooks/useFormatDistance.d.ts.map +1 -1
- package/dist/hooks/useFormatDistance.js +6 -6
- package/dist/hooks/useNumberQueryParam.d.ts +1 -1
- package/dist/hooks/useNumberQueryParam.d.ts.map +1 -1
- package/dist/index.css +1 -1
- package/dist/index.d.ts +5 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +505 -487
- package/dist/lang/locales/ui_en.json.js +1 -1
- package/dist/lang/locales/ui_es.json.js +5 -5
- package/dist/lang/locales/ui_ru.json.js +5 -5
- package/dist/utils/formatStorage.d.ts +9 -0
- package/dist/utils/formatStorage.d.ts.map +1 -1
- package/dist/utils/formatStorage.js +14 -10
- package/package.json +3 -6
- package/dist/assets/svg/default_icon.svg.js +0 -4
- package/dist/assets/svg/layers-logo-full.svg.js +0 -4
|
@@ -1,76 +1,77 @@
|
|
|
1
|
-
import { jsx as
|
|
2
|
-
import { useState as
|
|
1
|
+
import { jsx as n, jsxs as C } from "react/jsx-runtime";
|
|
2
|
+
import { useState as Z, useRef as v, useMemo as U, useCallback as ee, useEffect as A } from "react";
|
|
3
3
|
import { useTranslation as te } from "react-i18next";
|
|
4
|
-
import { Attachment02Icon as oe, Sent02Icon as
|
|
4
|
+
import { Attachment02Icon as oe, Sent02Icon as re } from "@hugeicons/core-free-icons";
|
|
5
5
|
import { HugeiconsIcon as $ } from "@hugeicons/react";
|
|
6
|
-
import { Stack as
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
10
|
-
import {
|
|
11
|
-
import
|
|
12
|
-
|
|
13
|
-
|
|
6
|
+
import { Stack as ne, Box as se, Group as B, FileButton as ie, ActionIcon as P, UnstyledButton as le, Text as ae, Button as ce, Popover as L } from "@mantine/core";
|
|
7
|
+
import { getMaxUploadSize as de } from "../../config/envConfig.js";
|
|
8
|
+
import { showErrorNotification as W } from "../../helpers/showNotifications.js";
|
|
9
|
+
import { AttachmentsPreview as me } from "../AttachmentsPreview/AttachmentsPreview.js";
|
|
10
|
+
import { CommentEditorHandler as fe } from "./CommentEditorHotkeys.js";
|
|
11
|
+
import { useVirtualAnchor as ue } from "./useVirtualAnchor.js";
|
|
12
|
+
import y from "./CommentComposer.module.css.js";
|
|
13
|
+
function j(r) {
|
|
14
|
+
return "id" in r;
|
|
14
15
|
}
|
|
15
|
-
function
|
|
16
|
-
return typeof
|
|
16
|
+
function pe(r) {
|
|
17
|
+
return typeof r == "object" && "isTemp" in r;
|
|
17
18
|
}
|
|
18
|
-
function
|
|
19
|
-
const
|
|
19
|
+
function he(r) {
|
|
20
|
+
const c = URL.createObjectURL(r);
|
|
20
21
|
return {
|
|
21
22
|
id: `temp-${crypto.randomUUID()}`,
|
|
22
|
-
name:
|
|
23
|
-
type:
|
|
24
|
-
size:
|
|
25
|
-
url:
|
|
26
|
-
src:
|
|
27
|
-
isImage:
|
|
23
|
+
name: r.name,
|
|
24
|
+
type: r.type,
|
|
25
|
+
size: r.size,
|
|
26
|
+
url: c,
|
|
27
|
+
src: c,
|
|
28
|
+
isImage: r.type.startsWith("image/"),
|
|
28
29
|
isTemp: !0,
|
|
29
|
-
raw:
|
|
30
|
+
raw: r
|
|
30
31
|
};
|
|
31
32
|
}
|
|
32
|
-
const
|
|
33
|
-
function
|
|
34
|
-
return
|
|
33
|
+
const M = () => de() ?? 5 * 1024 * 1024, ge = 10;
|
|
34
|
+
function xe(r, c) {
|
|
35
|
+
return r(`composer.${c}`, { defaultValue: "" }) || r(`editor.composer.${c}`);
|
|
35
36
|
}
|
|
36
|
-
const
|
|
37
|
-
children:
|
|
38
|
-
onSubmit:
|
|
37
|
+
const Ne = ({
|
|
38
|
+
children: r,
|
|
39
|
+
onSubmit: c,
|
|
39
40
|
initialDraft: d,
|
|
40
|
-
updateLocation:
|
|
41
|
+
updateLocation: N,
|
|
41
42
|
onBlur: k,
|
|
42
|
-
setEdit:
|
|
43
|
-
ns:
|
|
43
|
+
setEdit: R,
|
|
44
|
+
ns: S = "comments"
|
|
44
45
|
}) => {
|
|
45
|
-
const [m,
|
|
46
|
+
const [m, _] = Z({
|
|
46
47
|
text: d?.text ?? "",
|
|
47
48
|
files: d?.files ?? []
|
|
48
|
-
}), { t:
|
|
49
|
+
}), { t: h } = te(S), G = h(S === "comments" ? "composer.placeholder" : "editor.composer.placeholder"), g = v(null), f = typeof d?.text < "u", a = {
|
|
49
50
|
text: m.text,
|
|
50
51
|
files: m.files
|
|
51
|
-
}, X = v(null), p = v(null), Y =
|
|
52
|
+
}, X = v(null), p = v(null), Y = U(
|
|
52
53
|
() => ({
|
|
53
54
|
container: document.createElement("div"),
|
|
54
55
|
elements: []
|
|
55
56
|
}),
|
|
56
57
|
[]
|
|
57
|
-
),
|
|
58
|
+
), V = v(null), u = !!N, q = ue({
|
|
58
59
|
isFloat: u,
|
|
59
|
-
updateLocation:
|
|
60
|
-
selectionRef:
|
|
60
|
+
updateLocation: N,
|
|
61
|
+
selectionRef: V,
|
|
61
62
|
selectionState: Y
|
|
62
|
-
}),
|
|
63
|
+
}), I = 10 * 30 * 0.7, b = ee(() => {
|
|
63
64
|
if (!p.current) return;
|
|
64
65
|
const e = p.current, t = e.querySelector(
|
|
65
66
|
'[class*="editorWrapper"]'
|
|
66
|
-
), s = t?.scrollHeight || 0, o = s >
|
|
67
|
+
), s = t?.scrollHeight || 0, o = s > I, l = s > 35, i = e.closest(
|
|
67
68
|
'[class*="commentComposerFloat"]'
|
|
68
69
|
) || e;
|
|
69
|
-
u && l ? i.setAttribute("data-multiline", "true") : i.removeAttribute("data-multiline"), o && t ? (t.style.maxHeight = `${
|
|
70
|
-
}, [p, u,
|
|
71
|
-
|
|
70
|
+
u && l ? i.setAttribute("data-multiline", "true") : i.removeAttribute("data-multiline"), o && t ? (t.style.maxHeight = `${I}px`, t.style.overflowY = "auto", t.style.scrollbarWidth = "thin", i.setAttribute("data-editor-constrained", "true")) : t && (t.style.maxHeight = "", t.style.overflowY = "", t.style.scrollbarWidth = "", i.removeAttribute("data-editor-constrained"));
|
|
71
|
+
}, [p, u, I]);
|
|
72
|
+
A(() => {
|
|
72
73
|
b();
|
|
73
|
-
}, [b]),
|
|
74
|
+
}, [b]), A(() => {
|
|
74
75
|
if (!p.current) return;
|
|
75
76
|
const e = new ResizeObserver(() => {
|
|
76
77
|
b();
|
|
@@ -78,7 +79,7 @@ const _e = ({
|
|
|
78
79
|
return e.observe(p.current), () => {
|
|
79
80
|
e.disconnect();
|
|
80
81
|
};
|
|
81
|
-
}, [b]),
|
|
82
|
+
}, [b]), A(() => {
|
|
82
83
|
const e = document.querySelector("main");
|
|
83
84
|
if (e && u) {
|
|
84
85
|
const t = e.style.overflow;
|
|
@@ -87,26 +88,26 @@ const _e = ({
|
|
|
87
88
|
};
|
|
88
89
|
}
|
|
89
90
|
}, [u]);
|
|
90
|
-
const { textChanged:
|
|
91
|
-
const e = d?.files || [], t = m.files, s = d?.text !==
|
|
91
|
+
const { textChanged: J, newFiles: K, deletedFiles: D, hasChanges: F } = U(() => {
|
|
92
|
+
const e = d?.files || [], t = m.files, s = d?.text !== a.text, o = t.filter((i) => i.isTemp), x = new Set(
|
|
92
93
|
t.filter(
|
|
93
|
-
(i) =>
|
|
94
|
+
(i) => j(i)
|
|
94
95
|
).map((i) => i.id)
|
|
95
|
-
), l = e.filter(
|
|
96
|
+
), l = e.filter(j).filter((i) => !x.has(i.id)), E = f ? JSON.stringify(d) === JSON.stringify(m) : a.text.trim().length > 0 || o.length > 0 || l.length > 0;
|
|
96
97
|
return {
|
|
97
98
|
textChanged: s,
|
|
98
99
|
newFiles: o,
|
|
99
100
|
deletedFiles: l,
|
|
100
101
|
hasChanges: E
|
|
101
102
|
};
|
|
102
|
-
}, [f, d, m,
|
|
103
|
-
|
|
103
|
+
}, [f, d, m, a.text]), H = () => {
|
|
104
|
+
R ? R({
|
|
104
105
|
id: "",
|
|
105
106
|
text: "",
|
|
106
107
|
files: []
|
|
107
108
|
}) : k?.();
|
|
108
109
|
}, T = (e, t = !1) => {
|
|
109
|
-
|
|
110
|
+
_((s) => {
|
|
110
111
|
if (t)
|
|
111
112
|
return { text: "", files: [] };
|
|
112
113
|
const o = typeof e == "function" ? e(s) : e;
|
|
@@ -115,98 +116,101 @@ const _e = ({
|
|
|
115
116
|
files: o.files
|
|
116
117
|
};
|
|
117
118
|
});
|
|
118
|
-
},
|
|
119
|
+
}, Q = (e, t) => {
|
|
119
120
|
e && t((s) => {
|
|
120
|
-
const o = s.files,
|
|
121
|
-
e.forEach((
|
|
122
|
-
|
|
123
|
-
}), E.length > 0 &&
|
|
124
|
-
message:
|
|
125
|
-
|
|
126
|
-
|
|
121
|
+
const o = s.files, x = ge - o.length, l = [], E = [];
|
|
122
|
+
e.forEach((z) => {
|
|
123
|
+
z.size > M() ? E.push(z) : l.push(z);
|
|
124
|
+
}), E.length > 0 && W({
|
|
125
|
+
message: h("composer.uploadErrors.fileTooLarge", {
|
|
126
|
+
defaultValue: h("editor.composer.uploadErrors.fileTooLarge", { maxSize: Math.round(M() / (1024 * 1024)) }),
|
|
127
|
+
maxSize: Math.round(M() / (1024 * 1024))
|
|
128
|
+
})
|
|
129
|
+
}), l.length > x && W({
|
|
130
|
+
message: xe(h, "uploadErrors.tooManyFiles")
|
|
127
131
|
});
|
|
128
|
-
const i = l.slice(0,
|
|
132
|
+
const i = l.slice(0, x);
|
|
129
133
|
return {
|
|
130
134
|
...s,
|
|
131
|
-
files: [...o, ...i.map(
|
|
135
|
+
files: [...o, ...i.map(he)]
|
|
132
136
|
};
|
|
133
137
|
});
|
|
134
138
|
}, w = async () => {
|
|
135
139
|
try {
|
|
136
|
-
f ? await
|
|
140
|
+
f ? await c({
|
|
137
141
|
mode: "edit",
|
|
138
142
|
data: {
|
|
139
|
-
textChanged:
|
|
140
|
-
newFiles:
|
|
141
|
-
deletedFiles:
|
|
142
|
-
newText:
|
|
143
|
+
textChanged: J,
|
|
144
|
+
newFiles: K,
|
|
145
|
+
deletedFiles: D,
|
|
146
|
+
newText: a.text
|
|
143
147
|
}
|
|
144
|
-
}) : await
|
|
148
|
+
}) : await c({
|
|
145
149
|
mode: "create",
|
|
146
150
|
data: {
|
|
147
|
-
text:
|
|
148
|
-
files: m.files.filter(
|
|
151
|
+
text: a.text,
|
|
152
|
+
files: m.files.filter(pe)
|
|
149
153
|
}
|
|
150
154
|
});
|
|
151
155
|
} catch {
|
|
152
156
|
return;
|
|
153
157
|
}
|
|
154
|
-
H(),
|
|
155
|
-
const e =
|
|
158
|
+
H(), g.current && g.current.update(() => {
|
|
159
|
+
const e = g.current._editorState._nodeMap.get("root");
|
|
156
160
|
if (!e) return;
|
|
157
161
|
e.clear();
|
|
158
|
-
const t =
|
|
162
|
+
const t = g.current._nodes.get("paragraph");
|
|
159
163
|
if (!t) return;
|
|
160
164
|
const s = new t.klass();
|
|
161
165
|
e.append(s), s.select();
|
|
162
166
|
}), T({ text: "", files: [] }, !0);
|
|
163
|
-
},
|
|
164
|
-
|
|
167
|
+
}, O = /* @__PURE__ */ n(
|
|
168
|
+
ne,
|
|
165
169
|
{
|
|
166
170
|
ref: p,
|
|
167
171
|
className: `
|
|
168
|
-
${
|
|
169
|
-
${f ?
|
|
170
|
-
${u ?
|
|
172
|
+
${y.commentComposerWrapper}
|
|
173
|
+
${f ? y.editMode : ""}
|
|
174
|
+
${u ? y.commentComposerFloat : ""}
|
|
171
175
|
`,
|
|
172
176
|
children: /* @__PURE__ */ C(
|
|
173
177
|
"div",
|
|
174
178
|
{
|
|
175
|
-
className:
|
|
179
|
+
className: y.composerContainer,
|
|
176
180
|
style: {
|
|
177
181
|
"--placeholder-text": `"${G}"`
|
|
178
182
|
},
|
|
179
183
|
children: [
|
|
180
|
-
/* @__PURE__ */
|
|
181
|
-
|
|
184
|
+
/* @__PURE__ */ n("div", { className: y.editorWrapper, children: /* @__PURE__ */ n(
|
|
185
|
+
fe,
|
|
182
186
|
{
|
|
183
187
|
onSubmit: w,
|
|
184
|
-
editorRef:
|
|
188
|
+
editorRef: g,
|
|
185
189
|
inputContainerRef: p,
|
|
186
|
-
commentDraft:
|
|
190
|
+
commentDraft: a,
|
|
187
191
|
onBlur: H,
|
|
188
192
|
isEdit: f,
|
|
189
193
|
isFloat: u,
|
|
190
194
|
hasChanges: F,
|
|
191
|
-
ns:
|
|
192
|
-
children:
|
|
195
|
+
ns: S,
|
|
196
|
+
children: r?.({
|
|
193
197
|
onSubmit: w,
|
|
194
198
|
handleBlur: () => {
|
|
195
199
|
},
|
|
196
200
|
setCommentDraft: T,
|
|
197
|
-
commentDraft:
|
|
198
|
-
editorRef:
|
|
201
|
+
commentDraft: a,
|
|
202
|
+
editorRef: g,
|
|
199
203
|
initialContent: d?.text ?? ""
|
|
200
204
|
})
|
|
201
205
|
}
|
|
202
206
|
) }),
|
|
203
|
-
/* @__PURE__ */
|
|
204
|
-
/* @__PURE__ */
|
|
205
|
-
|
|
207
|
+
/* @__PURE__ */ n(se, { h: 10, "data-editor-spacer": !0, tabIndex: 0, style: { width: "100%" } }),
|
|
208
|
+
/* @__PURE__ */ n(
|
|
209
|
+
me,
|
|
206
210
|
{
|
|
207
211
|
files: m.files,
|
|
208
212
|
mode: "draft",
|
|
209
|
-
onRemove: (e) =>
|
|
213
|
+
onRemove: (e) => _((t) => ({
|
|
210
214
|
...t,
|
|
211
215
|
files: t.files.filter((s, o) => o !== e)
|
|
212
216
|
}))
|
|
@@ -223,12 +227,12 @@ const _e = ({
|
|
|
223
227
|
tabIndex: 0,
|
|
224
228
|
gap: "4px",
|
|
225
229
|
children: [
|
|
226
|
-
/* @__PURE__ */
|
|
230
|
+
/* @__PURE__ */ n(
|
|
227
231
|
ie,
|
|
228
232
|
{
|
|
229
|
-
onChange: (e) =>
|
|
233
|
+
onChange: (e) => Q(e, T),
|
|
230
234
|
multiple: !0,
|
|
231
|
-
children: (e) => /* @__PURE__ */
|
|
235
|
+
children: (e) => /* @__PURE__ */ n(P, { ...e, variant: "subtle", size: "lg", color: "gray", children: /* @__PURE__ */ n(
|
|
232
236
|
$,
|
|
233
237
|
{
|
|
234
238
|
style: { transform: "rotate(35deg)" },
|
|
@@ -239,7 +243,7 @@ const _e = ({
|
|
|
239
243
|
}
|
|
240
244
|
),
|
|
241
245
|
f ? /* @__PURE__ */ C(B, { gap: "8px", children: [
|
|
242
|
-
/* @__PURE__ */
|
|
246
|
+
/* @__PURE__ */ n(
|
|
243
247
|
le,
|
|
244
248
|
{
|
|
245
249
|
onClick: H,
|
|
@@ -251,29 +255,29 @@ const _e = ({
|
|
|
251
255
|
background: "none",
|
|
252
256
|
border: "none"
|
|
253
257
|
},
|
|
254
|
-
children: /* @__PURE__ */
|
|
258
|
+
children: /* @__PURE__ */ n(ae, { size: "sm", c: "dimmed", children: h("composer.cancel") })
|
|
255
259
|
}
|
|
256
260
|
),
|
|
257
|
-
/* @__PURE__ */
|
|
258
|
-
|
|
261
|
+
/* @__PURE__ */ n(
|
|
262
|
+
ce,
|
|
259
263
|
{
|
|
260
264
|
size: "xs",
|
|
261
265
|
radius: "md",
|
|
262
266
|
onClick: w,
|
|
263
267
|
disabled: f ? F : !F,
|
|
264
|
-
children:
|
|
268
|
+
children: h("composer.save")
|
|
265
269
|
}
|
|
266
270
|
)
|
|
267
|
-
] }) : /* @__PURE__ */
|
|
268
|
-
|
|
271
|
+
] }) : /* @__PURE__ */ n(
|
|
272
|
+
P,
|
|
269
273
|
{
|
|
270
274
|
color: "var(--mantine-primary-color-filled)",
|
|
271
275
|
size: "lg",
|
|
272
276
|
"data-comment-submit-button": !0,
|
|
273
277
|
variant: "filled",
|
|
274
278
|
onClick: w,
|
|
275
|
-
disabled: !
|
|
276
|
-
children: /* @__PURE__ */
|
|
279
|
+
disabled: !a.text.trim() && a.files.length === 0,
|
|
280
|
+
children: /* @__PURE__ */ n($, { icon: re, size: 20 })
|
|
277
281
|
}
|
|
278
282
|
)
|
|
279
283
|
]
|
|
@@ -285,7 +289,7 @@ const _e = ({
|
|
|
285
289
|
}
|
|
286
290
|
);
|
|
287
291
|
return u ? /* @__PURE__ */ C(
|
|
288
|
-
|
|
292
|
+
L,
|
|
289
293
|
{
|
|
290
294
|
opened: !0,
|
|
291
295
|
position: "bottom-start",
|
|
@@ -318,10 +322,10 @@ const _e = ({
|
|
|
318
322
|
}
|
|
319
323
|
},
|
|
320
324
|
children: [
|
|
321
|
-
/* @__PURE__ */
|
|
325
|
+
/* @__PURE__ */ n(L.Target, { children: /* @__PURE__ */ n(
|
|
322
326
|
"div",
|
|
323
327
|
{
|
|
324
|
-
ref:
|
|
328
|
+
ref: q,
|
|
325
329
|
style: {
|
|
326
330
|
position: "fixed",
|
|
327
331
|
width: "5px",
|
|
@@ -333,18 +337,18 @@ const _e = ({
|
|
|
333
337
|
}
|
|
334
338
|
}
|
|
335
339
|
) }),
|
|
336
|
-
/* @__PURE__ */
|
|
337
|
-
|
|
340
|
+
/* @__PURE__ */ n(
|
|
341
|
+
L.Dropdown,
|
|
338
342
|
{
|
|
339
343
|
ref: X,
|
|
340
|
-
className:
|
|
341
|
-
children:
|
|
344
|
+
className: y.commentComposerFloat,
|
|
345
|
+
children: O
|
|
342
346
|
}
|
|
343
347
|
)
|
|
344
348
|
]
|
|
345
349
|
}
|
|
346
|
-
) :
|
|
350
|
+
) : O;
|
|
347
351
|
};
|
|
348
352
|
export {
|
|
349
|
-
|
|
353
|
+
Ne as CommentComposer
|
|
350
354
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/CommunitiesDialog/index.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/CommunitiesDialog/index.tsx"],"names":[],"mappings":"AAoBA,eAAO,MAAM,iBAAiB,GAAI,sCAG/B;IACD,YAAY,EAAE,MAAM,IAAI,CAAC;IACzB,iBAAiB,EAAE,MAAM,IAAI,CAAC;CAC/B,4CAqIA,CAAC"}
|
|
@@ -1,25 +1,26 @@
|
|
|
1
1
|
import { jsx as o, jsxs as e } from "react/jsx-runtime";
|
|
2
|
-
import { useTranslation as
|
|
3
|
-
import { Dialog as
|
|
4
|
-
import { IconAmpersand as
|
|
2
|
+
import { useTranslation as g, Trans as f } from "react-i18next";
|
|
3
|
+
import { Dialog as u, Stack as c, Flex as a, Text as l, Button as s, Group as w } from "@mantine/core";
|
|
4
|
+
import { IconAmpersand as x, IconBrandDiscord as b, IconBrandTelegram as D } from "@tabler/icons-react";
|
|
5
|
+
import { brand as r } from "../../config/brand.js";
|
|
5
6
|
import { useMenu as y } from "../../hooks/useMenu.js";
|
|
6
|
-
import { useDiscordDialogStore as
|
|
7
|
-
import
|
|
8
|
-
import
|
|
9
|
-
import
|
|
10
|
-
const
|
|
11
|
-
handleAccess:
|
|
7
|
+
import { useDiscordDialogStore as F, closeUserDiscordDialog as k } from "../../store/discordDialogStore.js";
|
|
8
|
+
import v from "../../assets/svg/discord.svg.js";
|
|
9
|
+
import z from "../../assets/svg/telegram.svg.js";
|
|
10
|
+
import C from "./styles.module.css.js";
|
|
11
|
+
const K = ({
|
|
12
|
+
handleAccess: m,
|
|
12
13
|
handleRemindLater: p
|
|
13
14
|
}) => {
|
|
14
|
-
const { t
|
|
15
|
-
|
|
16
|
-
}, { isMobile:
|
|
15
|
+
const { t } = g(), { opened: d } = F((h) => h), i = () => {
|
|
16
|
+
k();
|
|
17
|
+
}, { isMobile: n } = y();
|
|
17
18
|
return /* @__PURE__ */ o(
|
|
18
|
-
|
|
19
|
+
u,
|
|
19
20
|
{
|
|
20
|
-
opened:
|
|
21
|
+
opened: d,
|
|
21
22
|
onClose: () => {
|
|
22
|
-
p(),
|
|
23
|
+
p(), i();
|
|
23
24
|
},
|
|
24
25
|
radius: "md",
|
|
25
26
|
withCloseButton: !0,
|
|
@@ -35,28 +36,28 @@ const E = ({
|
|
|
35
36
|
position: "relative"
|
|
36
37
|
},
|
|
37
38
|
ml: 5,
|
|
38
|
-
position:
|
|
39
|
+
position: n ? {
|
|
39
40
|
right: 5,
|
|
40
41
|
bottom: 0
|
|
41
42
|
} : void 0,
|
|
42
|
-
children: /* @__PURE__ */ e(
|
|
43
|
+
children: /* @__PURE__ */ e(c, { w: "100%", children: [
|
|
43
44
|
/* @__PURE__ */ o(
|
|
44
|
-
|
|
45
|
+
a,
|
|
45
46
|
{
|
|
46
47
|
h: "50%",
|
|
47
48
|
w: "100%",
|
|
48
|
-
className:
|
|
49
|
+
className: C.section,
|
|
49
50
|
style: { zIndex: -1 }
|
|
50
51
|
}
|
|
51
52
|
),
|
|
52
|
-
/* @__PURE__ */ e(
|
|
53
|
-
/* @__PURE__ */ e(
|
|
54
|
-
/* @__PURE__ */ o(
|
|
55
|
-
/* @__PURE__ */ o(
|
|
56
|
-
/* @__PURE__ */ o(
|
|
53
|
+
/* @__PURE__ */ e(c, { gap: 32, w: "100%", children: [
|
|
54
|
+
/* @__PURE__ */ e(a, { w: "100%", justify: "center", pt: 30, children: [
|
|
55
|
+
/* @__PURE__ */ o(v, { width: 66, height: 66 }),
|
|
56
|
+
/* @__PURE__ */ o(x, { color: "#FFFFFF", size: 32 }),
|
|
57
|
+
/* @__PURE__ */ o(z, { width: 66, height: 66 })
|
|
57
58
|
] }),
|
|
58
59
|
/* @__PURE__ */ e(
|
|
59
|
-
|
|
60
|
+
c,
|
|
60
61
|
{
|
|
61
62
|
gap: 8,
|
|
62
63
|
align: "center",
|
|
@@ -64,13 +65,13 @@ const E = ({
|
|
|
64
65
|
w: "100%",
|
|
65
66
|
px: 12,
|
|
66
67
|
children: [
|
|
67
|
-
/* @__PURE__ */ o(
|
|
68
|
-
|
|
68
|
+
/* @__PURE__ */ o(l, { fz: 20, fw: 700, lh: "24px", ta: "center", children: /* @__PURE__ */ o(
|
|
69
|
+
f,
|
|
69
70
|
{
|
|
70
|
-
i18nKey:
|
|
71
|
+
i18nKey: t("communityDialog.desc1"),
|
|
71
72
|
components: {
|
|
72
73
|
Text: /* @__PURE__ */ o(
|
|
73
|
-
|
|
74
|
+
l,
|
|
74
75
|
{
|
|
75
76
|
fz: "inherit",
|
|
76
77
|
fw: "inherit",
|
|
@@ -81,9 +82,9 @@ const E = ({
|
|
|
81
82
|
}
|
|
82
83
|
}
|
|
83
84
|
) }),
|
|
84
|
-
/* @__PURE__ */ o(
|
|
85
|
+
/* @__PURE__ */ o(l, { px: 12, fz: 14, lh: "16px", ta: "center", children: t("communityDialog.desc2") }),
|
|
85
86
|
/* @__PURE__ */ e(
|
|
86
|
-
|
|
87
|
+
a,
|
|
87
88
|
{
|
|
88
89
|
w: "100%",
|
|
89
90
|
justify: "space-between",
|
|
@@ -93,43 +94,43 @@ const E = ({
|
|
|
93
94
|
wrap: "wrap",
|
|
94
95
|
children: [
|
|
95
96
|
/* @__PURE__ */ o(
|
|
96
|
-
|
|
97
|
+
s,
|
|
97
98
|
{
|
|
98
99
|
variant: "subtle",
|
|
99
100
|
onClick: () => {
|
|
100
|
-
p(),
|
|
101
|
+
p(), i();
|
|
101
102
|
},
|
|
102
|
-
children:
|
|
103
|
+
children: t("communityDialog.remind")
|
|
103
104
|
}
|
|
104
105
|
),
|
|
105
|
-
/* @__PURE__ */ e(
|
|
106
|
-
/* @__PURE__ */ o(
|
|
107
|
-
|
|
106
|
+
/* @__PURE__ */ e(w, { gap: 8, children: [
|
|
107
|
+
r.social.discordEnabled && /* @__PURE__ */ o(
|
|
108
|
+
s,
|
|
108
109
|
{
|
|
109
110
|
component: "a",
|
|
110
|
-
href:
|
|
111
|
+
href: r.social.discord,
|
|
111
112
|
target: "_blank",
|
|
112
113
|
px: 16,
|
|
113
114
|
color: "#5A66F5",
|
|
114
115
|
onClick: () => {
|
|
115
|
-
|
|
116
|
+
m(), i();
|
|
116
117
|
},
|
|
117
|
-
children:
|
|
118
|
+
children: n ? /* @__PURE__ */ o(b, { size: 20 }) : "Discord"
|
|
118
119
|
}
|
|
119
120
|
),
|
|
120
|
-
/* @__PURE__ */ o(
|
|
121
|
-
|
|
121
|
+
r.social.telegramEnabled && /* @__PURE__ */ o(
|
|
122
|
+
s,
|
|
122
123
|
{
|
|
123
124
|
onClick: () => {
|
|
124
|
-
|
|
125
|
+
m(), i();
|
|
125
126
|
},
|
|
126
127
|
component: "a",
|
|
127
|
-
href:
|
|
128
|
+
href: r.social.telegram,
|
|
128
129
|
target: "_blank",
|
|
129
130
|
c: "#fff",
|
|
130
131
|
px: 16,
|
|
131
132
|
color: "#3BB3F2",
|
|
132
|
-
children:
|
|
133
|
+
children: n ? /* @__PURE__ */ o(D, { size: 20 }) : "Telegram"
|
|
133
134
|
}
|
|
134
135
|
)
|
|
135
136
|
] })
|
|
@@ -145,5 +146,5 @@ const E = ({
|
|
|
145
146
|
);
|
|
146
147
|
};
|
|
147
148
|
export {
|
|
148
|
-
|
|
149
|
+
K as CommunitiesDialog
|
|
149
150
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/Copyright/index.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,OAAO,EAAU,WAAW,EAAE,MAAM,eAAe,CAAC;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/Copyright/index.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,OAAO,EAAU,WAAW,EAAE,MAAM,eAAe,CAAC;AASpD,UAAU,cAAc;IACtB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB;AAED,eAAO,MAAM,SAAS,EAAE,KAAK,CAAC,EAAE,CAAC,cAAc,GAAG,WAAW,CAwB5D,CAAC"}
|
|
@@ -1,10 +1,11 @@
|
|
|
1
1
|
import { jsx as r } from "react/jsx-runtime";
|
|
2
2
|
import { Button as n } from "@mantine/core";
|
|
3
3
|
import p from "clsx";
|
|
4
|
-
import {
|
|
4
|
+
import { brand as a } from "../../config/brand.js";
|
|
5
|
+
import { DEFAULT_FONT_FAMILY as f } from "../../constants.js";
|
|
5
6
|
import { Logotype as l } from "../Logotype.js";
|
|
6
|
-
import
|
|
7
|
-
const
|
|
7
|
+
import s from "./Copyright.module.css.js";
|
|
8
|
+
const L = ({
|
|
8
9
|
color: o,
|
|
9
10
|
title: t,
|
|
10
11
|
className: e,
|
|
@@ -14,19 +15,19 @@ const F = ({
|
|
|
14
15
|
n,
|
|
15
16
|
{
|
|
16
17
|
component: "a",
|
|
17
|
-
href:
|
|
18
|
+
href: a.websiteUrl,
|
|
18
19
|
target: "_blank",
|
|
19
20
|
rel: "noopener noreferrer",
|
|
20
21
|
leftSection: /* @__PURE__ */ r(l, { variant: "copyright", isLink: !1 }),
|
|
21
22
|
variant: "filled",
|
|
22
23
|
size: i,
|
|
23
24
|
color: o,
|
|
24
|
-
className: p(
|
|
25
|
-
style: { fontFamily:
|
|
25
|
+
className: p(s.brandingWrapper, e),
|
|
26
|
+
style: { fontFamily: f },
|
|
26
27
|
...m,
|
|
27
28
|
children: t
|
|
28
29
|
}
|
|
29
30
|
);
|
|
30
31
|
export {
|
|
31
|
-
|
|
32
|
+
L as Copyright
|
|
32
33
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"EmojiPanel.d.ts","sourceRoot":"","sources":["../../../src/components/EmojiPicker/EmojiPanel.tsx"],"names":[],"mappings":"AAyCA,OAAO,EAAE,gBAAgB,EAAE,MAAM,eAAe,CAAC;AAsBjD,eAAO,MAAM,UAAU,GAAI,6DAMxB,IAAI,CAAC,gBAAgB,EAAE,SAAS,GAAG,OAAO,GAAG,UAAU,GAAG,aAAa,CAAC,GAAG;IAC5E,OAAO,EAAE,MAAM,IAAI,CAAC;IACpB,aAAa,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,IAAI,CAAC;CACvC,
|
|
1
|
+
{"version":3,"file":"EmojiPanel.d.ts","sourceRoot":"","sources":["../../../src/components/EmojiPicker/EmojiPanel.tsx"],"names":[],"mappings":"AAyCA,OAAO,EAAE,gBAAgB,EAAE,MAAM,eAAe,CAAC;AAsBjD,eAAO,MAAM,UAAU,GAAI,6DAMxB,IAAI,CAAC,gBAAgB,EAAE,SAAS,GAAG,OAAO,GAAG,UAAU,GAAG,aAAa,CAAC,GAAG;IAC5E,OAAO,EAAE,MAAM,IAAI,CAAC;IACpB,aAAa,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,IAAI,CAAC;CACvC,4CAmTA,CAAC"}
|