@layers-app/shared 0.4.3 → 0.4.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/components/AppContainer/components/SidebarToggleButton.d.ts.map +1 -1
- package/dist/components/AppContainer/components/SidebarToggleButton.js +25 -16
- package/dist/components/AttachmentsGalleryModal/components/GallerySlide.d.ts.map +1 -1
- package/dist/components/AttachmentsGalleryModal/components/GallerySlide.js +33 -33
- package/dist/components/AttachmentsGalleryModal/components/ShakePlayer/ShakaPlayer.d.ts.map +1 -1
- package/dist/components/AttachmentsGalleryModal/components/ShakePlayer/ShakaPlayer.js +54 -36
- package/dist/components/AttachmentsGalleryModal/components/ShakePlayer/ShakaPlayer.module.css.js +4 -4
- package/dist/components/AttachmentsGalleryModal/components/ShakePlayer/useShakePlayer.d.ts +2 -0
- package/dist/components/AttachmentsGalleryModal/components/ShakePlayer/useShakePlayer.d.ts.map +1 -1
- package/dist/components/AttachmentsGalleryModal/components/ShakePlayer/useShakePlayer.js +82 -41
- package/dist/components/AttachmentsPreview/AttachmentsPreview.d.ts.map +1 -1
- package/dist/components/AttachmentsPreview/AttachmentsPreview.js +11 -12
- package/dist/components/Chat/CallMessage/CallMessage.module.css.js +15 -0
- package/dist/components/Chat/CallMessage/index.d.ts +21 -0
- package/dist/components/Chat/CallMessage/index.d.ts.map +1 -0
- package/dist/components/Chat/CallMessage/index.js +49 -0
- package/dist/components/Chat/ChatBubble/ChatBubble.module.css.js +9 -0
- package/dist/components/Chat/ChatBubble/index.d.ts +14 -0
- package/dist/components/Chat/ChatBubble/index.d.ts.map +1 -0
- package/dist/components/Chat/ChatBubble/index.js +32 -0
- package/dist/components/Chat/ChatHeader/ChatHeader.module.css.js +17 -0
- package/dist/components/Chat/ChatHeader/index.d.ts +42 -0
- package/dist/components/Chat/ChatHeader/index.d.ts.map +1 -0
- package/dist/components/Chat/ChatHeader/index.js +78 -0
- package/dist/components/Chat/ChatInput/ChatInput.module.css.js +37 -0
- package/dist/components/Chat/ChatInput/index.d.ts +46 -0
- package/dist/components/Chat/ChatInput/index.d.ts.map +1 -0
- package/dist/components/Chat/ChatInput/index.js +228 -0
- package/dist/components/Chat/ChatLayout/ChatLayout.module.css.js +15 -0
- package/dist/components/Chat/ChatLayout/index.d.ts +17 -0
- package/dist/components/Chat/ChatLayout/index.d.ts.map +1 -0
- package/dist/components/Chat/ChatLayout/index.js +43 -0
- package/dist/components/Chat/ChatMessage/ChatMessage.module.css.js +21 -0
- package/dist/components/Chat/ChatMessage/index.d.ts +45 -0
- package/dist/components/Chat/ChatMessage/index.d.ts.map +1 -0
- package/dist/components/Chat/ChatMessage/index.js +188 -0
- package/dist/components/Chat/ChatPill/ChatPill.module.css.js +11 -0
- package/dist/components/Chat/ChatPill/index.d.ts +12 -0
- package/dist/components/Chat/ChatPill/index.d.ts.map +1 -0
- package/dist/components/Chat/ChatPill/index.js +21 -0
- package/dist/components/Chat/DayMeta/index.d.ts +11 -0
- package/dist/components/Chat/DayMeta/index.d.ts.map +1 -0
- package/dist/components/Chat/DayMeta/index.js +9 -0
- package/dist/components/Chat/DialogItem/DialogItem.module.css.js +17 -0
- package/dist/components/Chat/DialogItem/index.d.ts +41 -0
- package/dist/components/Chat/DialogItem/index.d.ts.map +1 -0
- package/dist/components/Chat/DialogItem/index.js +107 -0
- package/dist/components/Chat/DialogList/DialogList.module.css.js +7 -0
- package/dist/components/Chat/DialogList/index.d.ts +11 -0
- package/dist/components/Chat/DialogList/index.d.ts.map +1 -0
- package/dist/components/Chat/DialogList/index.js +19 -0
- package/dist/components/Chat/MediaDocument/MediaDocument.module.css.js +13 -0
- package/dist/components/Chat/MediaDocument/index.d.ts +15 -0
- package/dist/components/Chat/MediaDocument/index.d.ts.map +1 -0
- package/dist/components/Chat/MediaDocument/index.js +73 -0
- package/dist/components/Chat/MessageActions/MessageActions.module.css.js +7 -0
- package/dist/components/Chat/MessageActions/index.d.ts +16 -0
- package/dist/components/Chat/MessageActions/index.d.ts.map +1 -0
- package/dist/components/Chat/MessageActions/index.js +65 -0
- package/dist/components/Chat/MessageAuthor/index.d.ts +20 -0
- package/dist/components/Chat/MessageAuthor/index.d.ts.map +1 -0
- package/dist/components/Chat/MessageAuthor/index.js +36 -0
- package/dist/components/Chat/MessageForward/MessageForward.module.css.js +7 -0
- package/dist/components/Chat/MessageForward/index.d.ts +13 -0
- package/dist/components/Chat/MessageForward/index.d.ts.map +1 -0
- package/dist/components/Chat/MessageForward/index.js +30 -0
- package/dist/components/Chat/MessageList/MessageList.module.css.js +17 -0
- package/dist/components/Chat/MessageList/index.d.ts +12 -0
- package/dist/components/Chat/MessageList/index.d.ts.map +1 -0
- package/dist/components/Chat/MessageList/index.js +71 -0
- package/dist/components/Chat/MessageMeta/MessageMeta.module.css.js +13 -0
- package/dist/components/Chat/MessageMeta/index.d.ts +16 -0
- package/dist/components/Chat/MessageMeta/index.d.ts.map +1 -0
- package/dist/components/Chat/MessageMeta/index.js +33 -0
- package/dist/components/Chat/MessageReactions/MessageReactions.module.css.js +15 -0
- package/dist/components/Chat/MessageReactions/index.d.ts +15 -0
- package/dist/components/Chat/MessageReactions/index.d.ts.map +1 -0
- package/dist/components/Chat/MessageReactions/index.js +40 -0
- package/dist/components/Chat/MessageReply/MessageReply.module.css.js +15 -0
- package/dist/components/Chat/MessageReply/index.d.ts +15 -0
- package/dist/components/Chat/MessageReply/index.d.ts.map +1 -0
- package/dist/components/Chat/MessageReply/index.js +40 -0
- package/dist/components/Chat/MessageStatus/MessageStatus.module.css.js +9 -0
- package/dist/components/Chat/MessageStatus/index.d.ts +14 -0
- package/dist/components/Chat/MessageStatus/index.d.ts.map +1 -0
- package/dist/components/Chat/MessageStatus/index.js +53 -0
- package/dist/components/Chat/ServiceMessage/ServiceMessage.module.css.js +11 -0
- package/dist/components/Chat/ServiceMessage/index.d.ts +13 -0
- package/dist/components/Chat/ServiceMessage/index.d.ts.map +1 -0
- package/dist/components/Chat/ServiceMessage/index.js +21 -0
- package/dist/components/Chat/UnreadSeparator/index.d.ts +11 -0
- package/dist/components/Chat/UnreadSeparator/index.d.ts.map +1 -0
- package/dist/components/Chat/UnreadSeparator/index.js +13 -0
- package/dist/components/Chat/colors.d.ts +7 -0
- package/dist/components/Chat/colors.d.ts.map +1 -0
- package/dist/components/Chat/colors.js +30 -0
- package/dist/components/Chat/icons.d.ts +9 -0
- package/dist/components/Chat/icons.d.ts.map +1 -0
- package/dist/components/Chat/icons.js +49 -0
- package/dist/components/Chat/index.d.ts +24 -0
- package/dist/components/Chat/index.d.ts.map +1 -0
- package/dist/components/Chat/mock-data.d.ts +32 -0
- package/dist/components/Chat/mock-data.d.ts.map +1 -0
- package/dist/components/Chat/types.d.ts +159 -0
- package/dist/components/Chat/types.d.ts.map +1 -0
- package/dist/components/CommentComposer/CommentComposer.module.css.js +4 -4
- package/dist/components/CommentComposer/index.d.ts.map +1 -1
- package/dist/components/CommentComposer/index.js +53 -54
- package/dist/components/CommentComposer/types.js +9 -0
- package/dist/components/EmojiPicker/EmojiPicker.d.ts +8 -1
- package/dist/components/EmojiPicker/EmojiPicker.d.ts.map +1 -1
- package/dist/components/EmojiPicker/EmojiPicker.js +53 -50
- package/dist/components/EntityIcon.d.ts.map +1 -1
- package/dist/components/EntityIcon.js +36 -27
- package/dist/components/FilePicker/FilePicker.d.ts.map +1 -1
- package/dist/components/FilePicker/FilePicker.js +135 -161
- package/dist/components/FilePicker/FilePicker.module.css.js +8 -12
- package/dist/components/FilePicker/FilePickerGallery.js +13 -13
- package/dist/components/FilePicker/FilePickerGiphy.js +4 -4
- package/dist/components/FilePicker/FilePickerGoogleDrive.js +3 -3
- package/dist/components/FilePicker/FilePickerUnsplash.js +18 -18
- package/dist/components/FilePicker/FilePickerUpload.d.ts.map +1 -1
- package/dist/components/FilePicker/FilePickerUpload.js +55 -47
- package/dist/components/MusicPlayerBar/MusicPlayerBar.module.css.js +42 -42
- package/dist/components/MusicPlayerBar/components/VolumePopover.d.ts.map +1 -1
- package/dist/components/MusicPlayerBar/components/VolumePopover.js +22 -20
- package/dist/components/PillTabs/PillTabs.d.ts +19 -0
- package/dist/components/PillTabs/PillTabs.d.ts.map +1 -0
- package/dist/components/PillTabs/PillTabs.js +50 -0
- package/dist/components/PillTabs/PillTabs.module.css.js +11 -0
- package/dist/components/modals/RemoveConfirmModal.js +1 -1
- package/dist/hooks/useOfficePreviewAvailable.d.ts +2 -0
- package/dist/hooks/useOfficePreviewAvailable.d.ts.map +1 -0
- package/dist/hooks/useOfficePreviewAvailable.js +20 -0
- package/dist/index.css +1 -1
- package/dist/index.d.ts +4 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +573 -520
- package/dist/lang/locales/ui_en.json.js +5 -5
- package/dist/lang/locales/ui_es.json.js +1 -1
- package/dist/lang/locales/ui_ru.json.js +1 -1
- package/package.json +6 -3
|
@@ -1,41 +1,41 @@
|
|
|
1
|
-
import { jsx as
|
|
1
|
+
import { jsx as r, jsxs as C } from "react/jsx-runtime";
|
|
2
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 ne } from "@hugeicons/core-free-icons";
|
|
5
5
|
import { HugeiconsIcon as $ } from "@hugeicons/react";
|
|
6
|
-
import { Stack as
|
|
6
|
+
import { Stack as re, 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
7
|
import { getMaxUploadSize as de } from "../../config/envConfig.js";
|
|
8
8
|
import { showErrorNotification as W } from "../../helpers/showNotifications.js";
|
|
9
9
|
import { AttachmentsPreview as me } from "../AttachmentsPreview/AttachmentsPreview.js";
|
|
10
|
-
import { CommentEditorHandler as
|
|
11
|
-
import { useVirtualAnchor as
|
|
10
|
+
import { CommentEditorHandler as ue } from "./CommentEditorHotkeys.js";
|
|
11
|
+
import { useVirtualAnchor as fe } from "./useVirtualAnchor.js";
|
|
12
12
|
import y from "./CommentComposer.module.css.js";
|
|
13
|
-
function j(
|
|
14
|
-
return "id" in
|
|
13
|
+
function j(n) {
|
|
14
|
+
return "id" in n;
|
|
15
15
|
}
|
|
16
|
-
function pe(
|
|
17
|
-
return typeof
|
|
16
|
+
function pe(n) {
|
|
17
|
+
return typeof n == "object" && "isTemp" in n;
|
|
18
18
|
}
|
|
19
|
-
function he(
|
|
20
|
-
const c = URL.createObjectURL(
|
|
19
|
+
function he(n) {
|
|
20
|
+
const c = URL.createObjectURL(n);
|
|
21
21
|
return {
|
|
22
22
|
id: `temp-${crypto.randomUUID()}`,
|
|
23
|
-
name:
|
|
24
|
-
type:
|
|
25
|
-
size:
|
|
23
|
+
name: n.name,
|
|
24
|
+
type: n.type,
|
|
25
|
+
size: n.size,
|
|
26
26
|
url: c,
|
|
27
27
|
src: c,
|
|
28
|
-
isImage:
|
|
28
|
+
isImage: n.type.startsWith("image/"),
|
|
29
29
|
isTemp: !0,
|
|
30
|
-
raw:
|
|
30
|
+
raw: n
|
|
31
31
|
};
|
|
32
32
|
}
|
|
33
33
|
const M = () => de() ?? 5 * 1024 * 1024, ge = 10;
|
|
34
|
-
function xe(
|
|
35
|
-
return
|
|
34
|
+
function xe(n, c) {
|
|
35
|
+
return n(`composer.${c}`, { defaultValue: "" }) || n(`editor.composer.${c}`);
|
|
36
36
|
}
|
|
37
37
|
const Ne = ({
|
|
38
|
-
children:
|
|
38
|
+
children: n,
|
|
39
39
|
onSubmit: c,
|
|
40
40
|
initialDraft: d,
|
|
41
41
|
updateLocation: N,
|
|
@@ -46,7 +46,7 @@ const Ne = ({
|
|
|
46
46
|
const [m, _] = Z({
|
|
47
47
|
text: d?.text ?? "",
|
|
48
48
|
files: d?.files ?? []
|
|
49
|
-
}), { t: h } = te(S), G = h(S === "comments" ? "composer.placeholder" : "editor.composer.placeholder"), g = v(null),
|
|
49
|
+
}), { t: h } = te(S), G = h(S === "comments" ? "composer.placeholder" : "editor.composer.placeholder"), g = v(null), u = typeof d?.text < "u", a = {
|
|
50
50
|
text: m.text,
|
|
51
51
|
files: m.files
|
|
52
52
|
}, X = v(null), p = v(null), Y = U(
|
|
@@ -55,8 +55,8 @@ const Ne = ({
|
|
|
55
55
|
elements: []
|
|
56
56
|
}),
|
|
57
57
|
[]
|
|
58
|
-
), V = v(null),
|
|
59
|
-
isFloat:
|
|
58
|
+
), V = v(null), f = !!N, q = fe({
|
|
59
|
+
isFloat: f,
|
|
60
60
|
updateLocation: N,
|
|
61
61
|
selectionRef: V,
|
|
62
62
|
selectionState: Y
|
|
@@ -67,8 +67,8 @@ const Ne = ({
|
|
|
67
67
|
), s = t?.scrollHeight || 0, o = s > I, l = s > 35, i = e.closest(
|
|
68
68
|
'[class*="commentComposerFloat"]'
|
|
69
69
|
) || e;
|
|
70
|
-
|
|
71
|
-
}, [p,
|
|
70
|
+
f && 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, f, I]);
|
|
72
72
|
A(() => {
|
|
73
73
|
b();
|
|
74
74
|
}, [b]), A(() => {
|
|
@@ -81,26 +81,26 @@ const Ne = ({
|
|
|
81
81
|
};
|
|
82
82
|
}, [b]), A(() => {
|
|
83
83
|
const e = document.querySelector("main");
|
|
84
|
-
if (e &&
|
|
84
|
+
if (e && f) {
|
|
85
85
|
const t = e.style.overflow;
|
|
86
86
|
return e.style.overflow = "hidden", () => {
|
|
87
87
|
e.style.overflow = t;
|
|
88
88
|
};
|
|
89
89
|
}
|
|
90
|
-
}, [
|
|
90
|
+
}, [f]);
|
|
91
91
|
const { textChanged: J, newFiles: K, deletedFiles: D, hasChanges: F } = U(() => {
|
|
92
92
|
const e = d?.files || [], t = m.files, s = d?.text !== a.text, o = t.filter((i) => i.isTemp), x = new Set(
|
|
93
93
|
t.filter(
|
|
94
94
|
(i) => j(i)
|
|
95
95
|
).map((i) => i.id)
|
|
96
|
-
), l = e.filter(j).filter((i) => !x.has(i.id)), E =
|
|
96
|
+
), l = e.filter(j).filter((i) => !x.has(i.id)), E = u ? JSON.stringify(d) === JSON.stringify(m) : a.text.trim().length > 0 || o.length > 0 || l.length > 0;
|
|
97
97
|
return {
|
|
98
98
|
textChanged: s,
|
|
99
99
|
newFiles: o,
|
|
100
100
|
deletedFiles: l,
|
|
101
101
|
hasChanges: E
|
|
102
102
|
};
|
|
103
|
-
}, [
|
|
103
|
+
}, [u, d, m, a.text]), H = () => {
|
|
104
104
|
R ? R({
|
|
105
105
|
id: "",
|
|
106
106
|
text: "",
|
|
@@ -137,7 +137,7 @@ const Ne = ({
|
|
|
137
137
|
});
|
|
138
138
|
}, w = async () => {
|
|
139
139
|
try {
|
|
140
|
-
|
|
140
|
+
u ? await c({
|
|
141
141
|
mode: "edit",
|
|
142
142
|
data: {
|
|
143
143
|
textChanged: J,
|
|
@@ -164,14 +164,14 @@ const Ne = ({
|
|
|
164
164
|
const s = new t.klass();
|
|
165
165
|
e.append(s), s.select();
|
|
166
166
|
}), T({ text: "", files: [] }, !0);
|
|
167
|
-
}, O = /* @__PURE__ */
|
|
168
|
-
|
|
167
|
+
}, O = /* @__PURE__ */ r(
|
|
168
|
+
re,
|
|
169
169
|
{
|
|
170
170
|
ref: p,
|
|
171
171
|
className: `
|
|
172
172
|
${y.commentComposerWrapper}
|
|
173
|
-
${
|
|
174
|
-
${
|
|
173
|
+
${u ? y.editMode : ""}
|
|
174
|
+
${f ? y.commentComposerFloat : ""}
|
|
175
175
|
`,
|
|
176
176
|
children: /* @__PURE__ */ C(
|
|
177
177
|
"div",
|
|
@@ -181,19 +181,19 @@ const Ne = ({
|
|
|
181
181
|
"--placeholder-text": `"${G}"`
|
|
182
182
|
},
|
|
183
183
|
children: [
|
|
184
|
-
/* @__PURE__ */
|
|
185
|
-
|
|
184
|
+
/* @__PURE__ */ r("div", { className: y.editorWrapper, children: /* @__PURE__ */ r(
|
|
185
|
+
ue,
|
|
186
186
|
{
|
|
187
187
|
onSubmit: w,
|
|
188
188
|
editorRef: g,
|
|
189
189
|
inputContainerRef: p,
|
|
190
190
|
commentDraft: a,
|
|
191
191
|
onBlur: H,
|
|
192
|
-
isEdit:
|
|
193
|
-
isFloat:
|
|
192
|
+
isEdit: u,
|
|
193
|
+
isFloat: f,
|
|
194
194
|
hasChanges: F,
|
|
195
195
|
ns: S,
|
|
196
|
-
children:
|
|
196
|
+
children: n?.({
|
|
197
197
|
onSubmit: w,
|
|
198
198
|
handleBlur: () => {
|
|
199
199
|
},
|
|
@@ -204,8 +204,8 @@ const Ne = ({
|
|
|
204
204
|
})
|
|
205
205
|
}
|
|
206
206
|
) }),
|
|
207
|
-
/* @__PURE__ */
|
|
208
|
-
/* @__PURE__ */
|
|
207
|
+
/* @__PURE__ */ r(se, { h: 10, "data-editor-spacer": !0, tabIndex: 0, style: { width: "100%" } }),
|
|
208
|
+
/* @__PURE__ */ r(
|
|
209
209
|
me,
|
|
210
210
|
{
|
|
211
211
|
files: m.files,
|
|
@@ -219,7 +219,7 @@ const Ne = ({
|
|
|
219
219
|
/* @__PURE__ */ C(
|
|
220
220
|
B,
|
|
221
221
|
{
|
|
222
|
-
justify:
|
|
222
|
+
justify: u ? "space-between" : "flex-end",
|
|
223
223
|
"data-comment-footer": !0,
|
|
224
224
|
align: "center",
|
|
225
225
|
w: "unset",
|
|
@@ -227,12 +227,12 @@ const Ne = ({
|
|
|
227
227
|
tabIndex: 0,
|
|
228
228
|
gap: "4px",
|
|
229
229
|
children: [
|
|
230
|
-
/* @__PURE__ */
|
|
230
|
+
/* @__PURE__ */ r(
|
|
231
231
|
ie,
|
|
232
232
|
{
|
|
233
233
|
onChange: (e) => Q(e, T),
|
|
234
234
|
multiple: !0,
|
|
235
|
-
children: (e) => /* @__PURE__ */
|
|
235
|
+
children: (e) => /* @__PURE__ */ r(P, { ...e, variant: "subtle", size: "lg", color: "gray", children: /* @__PURE__ */ r(
|
|
236
236
|
$,
|
|
237
237
|
{
|
|
238
238
|
style: { transform: "rotate(35deg)" },
|
|
@@ -242,8 +242,8 @@ const Ne = ({
|
|
|
242
242
|
) })
|
|
243
243
|
}
|
|
244
244
|
),
|
|
245
|
-
|
|
246
|
-
/* @__PURE__ */
|
|
245
|
+
u ? /* @__PURE__ */ C(B, { gap: "8px", children: [
|
|
246
|
+
/* @__PURE__ */ r(
|
|
247
247
|
le,
|
|
248
248
|
{
|
|
249
249
|
onClick: H,
|
|
@@ -255,29 +255,28 @@ const Ne = ({
|
|
|
255
255
|
background: "none",
|
|
256
256
|
border: "none"
|
|
257
257
|
},
|
|
258
|
-
children: /* @__PURE__ */
|
|
258
|
+
children: /* @__PURE__ */ r(ae, { size: "sm", c: "dimmed", children: h("composer.cancel") })
|
|
259
259
|
}
|
|
260
260
|
),
|
|
261
|
-
/* @__PURE__ */
|
|
261
|
+
/* @__PURE__ */ r(
|
|
262
262
|
ce,
|
|
263
263
|
{
|
|
264
264
|
size: "xs",
|
|
265
265
|
radius: "md",
|
|
266
266
|
onClick: w,
|
|
267
|
-
disabled:
|
|
267
|
+
disabled: u ? F : !F,
|
|
268
268
|
children: h("composer.save")
|
|
269
269
|
}
|
|
270
270
|
)
|
|
271
|
-
] }) : /* @__PURE__ */
|
|
271
|
+
] }) : /* @__PURE__ */ r(
|
|
272
272
|
P,
|
|
273
273
|
{
|
|
274
|
-
color: "var(--mantine-primary-color-filled)",
|
|
275
274
|
size: "lg",
|
|
276
275
|
"data-comment-submit-button": !0,
|
|
277
276
|
variant: "filled",
|
|
278
277
|
onClick: w,
|
|
279
278
|
disabled: !a.text.trim() && a.files.length === 0,
|
|
280
|
-
children: /* @__PURE__ */
|
|
279
|
+
children: /* @__PURE__ */ r($, { icon: ne, size: 20 })
|
|
281
280
|
}
|
|
282
281
|
)
|
|
283
282
|
]
|
|
@@ -288,7 +287,7 @@ const Ne = ({
|
|
|
288
287
|
)
|
|
289
288
|
}
|
|
290
289
|
);
|
|
291
|
-
return
|
|
290
|
+
return f ? /* @__PURE__ */ C(
|
|
292
291
|
L,
|
|
293
292
|
{
|
|
294
293
|
opened: !0,
|
|
@@ -322,7 +321,7 @@ const Ne = ({
|
|
|
322
321
|
}
|
|
323
322
|
},
|
|
324
323
|
children: [
|
|
325
|
-
/* @__PURE__ */
|
|
324
|
+
/* @__PURE__ */ r(L.Target, { children: /* @__PURE__ */ r(
|
|
326
325
|
"div",
|
|
327
326
|
{
|
|
328
327
|
ref: q,
|
|
@@ -337,7 +336,7 @@ const Ne = ({
|
|
|
337
336
|
}
|
|
338
337
|
}
|
|
339
338
|
) }),
|
|
340
|
-
/* @__PURE__ */
|
|
339
|
+
/* @__PURE__ */ r(
|
|
341
340
|
L.Dropdown,
|
|
342
341
|
{
|
|
343
342
|
ref: X,
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
var o;
|
|
2
|
+
((T) => {
|
|
3
|
+
((e) => {
|
|
4
|
+
e.None = "NONE", e.Project = "PROJECT", e.Sprint = "SPRINT", e.Folder = "FOLDER", e.Workspace = "WORKSPACE", e.Page = "PAGE", e.Task = "PROJECTTASK", e.Form = "FORM", e.Attachment = "ATTACHMENT", e.User = "USER", e.Comment = "COMMENT", e.Flow = "FLOW";
|
|
5
|
+
})(T.Entity || (T.Entity = {}));
|
|
6
|
+
})(o || (o = {}));
|
|
7
|
+
export {
|
|
8
|
+
o as CommentComposerTypes
|
|
9
|
+
};
|
|
@@ -22,6 +22,13 @@ export type EmojiPickerProps = {
|
|
|
22
22
|
typingSeq?: number;
|
|
23
23
|
/** If true, clicking the random icon button will not close the popover. Default: false */
|
|
24
24
|
keepOpenOnRandom?: boolean;
|
|
25
|
+
/**
|
|
26
|
+
* If false, picking an emoji does NOT close the popover — useful for chat
|
|
27
|
+
* composers where users typically want to insert several emoji at once.
|
|
28
|
+
* Click-outside still closes. Default: true (preserves legacy behavior of
|
|
29
|
+
* one-shot icon pickers in Pages/Projects).
|
|
30
|
+
*/
|
|
31
|
+
closeOnSelect?: boolean;
|
|
25
32
|
};
|
|
26
33
|
export type EmojiPickerLocales = {
|
|
27
34
|
emojis?: string;
|
|
@@ -34,5 +41,5 @@ export type EmojiPickerLocales = {
|
|
|
34
41
|
icons?: string;
|
|
35
42
|
emojiCategory?: Record<string, string>;
|
|
36
43
|
};
|
|
37
|
-
export declare const EmojiPicker: ({ project, value, querySearch, children, onChange, position, popoverProps, showIcons, showColors, defaultActiveTab, showEmojis, withinPortal, locales: _locales, openWhen, triggerRegex, typingSeq, showRemoveButton, keepOpenOnRandom, }: PropsWithChildren<EmojiPickerProps>) => import("react/jsx-runtime").JSX.Element;
|
|
44
|
+
export declare const EmojiPicker: ({ project, value, querySearch, children, onChange, position, popoverProps, showIcons, showColors, defaultActiveTab, showEmojis, withinPortal, locales: _locales, openWhen, triggerRegex, typingSeq, showRemoveButton, keepOpenOnRandom, closeOnSelect, }: PropsWithChildren<EmojiPickerProps>) => import("react/jsx-runtime").JSX.Element;
|
|
38
45
|
//# sourceMappingURL=EmojiPicker.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"EmojiPicker.d.ts","sourceRoot":"","sources":["../../../src/components/EmojiPicker/EmojiPicker.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,iBAAiB,EAAgC,MAAM,OAAO,CAAC;AAGxE,OAAO,EAIL,gBAAgB,EAEhB,YAAY,EAEb,MAAM,eAAe,CAAC;AAQvB,MAAM,MAAM,gBAAgB,GAAG;IAC7B,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,KAAK,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IACtB,QAAQ,CAAC,EAAE,CAAC,CAAC,EAAE,MAAM,KAAK,IAAI,CAAC;IAC/B,QAAQ,CAAC,EAAE,gBAAgB,CAAC;IAC5B,YAAY,CAAC,EAAE,YAAY,CAAC;IAC5B,OAAO,CAAC,EAAE,kBAAkB,CAAC;IAC7B,gBAAgB,CAAC,EAAE,OAAO,CAAC;IAC3B,YAAY,CAAC,EAAE,OAAO,CAAC;IACvB,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,gBAAgB,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IACjC,kIAAkI;IAClI,QAAQ,CAAC,EAAE,OAAO,GAAG,UAAU,CAAC;IAChC,2GAA2G;IAC3G,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,gHAAgH;IAChH,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,0FAA0F;IAC1F,gBAAgB,CAAC,EAAE,OAAO,CAAC;
|
|
1
|
+
{"version":3,"file":"EmojiPicker.d.ts","sourceRoot":"","sources":["../../../src/components/EmojiPicker/EmojiPicker.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,iBAAiB,EAAgC,MAAM,OAAO,CAAC;AAGxE,OAAO,EAIL,gBAAgB,EAEhB,YAAY,EAEb,MAAM,eAAe,CAAC;AAQvB,MAAM,MAAM,gBAAgB,GAAG;IAC7B,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,KAAK,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IACtB,QAAQ,CAAC,EAAE,CAAC,CAAC,EAAE,MAAM,KAAK,IAAI,CAAC;IAC/B,QAAQ,CAAC,EAAE,gBAAgB,CAAC;IAC5B,YAAY,CAAC,EAAE,YAAY,CAAC;IAC5B,OAAO,CAAC,EAAE,kBAAkB,CAAC;IAC7B,gBAAgB,CAAC,EAAE,OAAO,CAAC;IAC3B,YAAY,CAAC,EAAE,OAAO,CAAC;IACvB,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,gBAAgB,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IACjC,kIAAkI;IAClI,QAAQ,CAAC,EAAE,OAAO,GAAG,UAAU,CAAC;IAChC,2GAA2G;IAC3G,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,gHAAgH;IAChH,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,0FAA0F;IAC1F,gBAAgB,CAAC,EAAE,OAAO,CAAC;IAC3B;;;;;OAKG;IACH,aAAa,CAAC,EAAE,OAAO,CAAC;CACzB,CAAC;AAEF,MAAM,MAAM,kBAAkB,GAAG;IAC/B,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,aAAa,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;CACxC,CAAC;AAEF,eAAO,MAAM,WAAW,GAAI,0PAoBzB,iBAAiB,CAAC,gBAAgB,CAAC,4CAiNrC,CAAC"}
|
|
@@ -1,32 +1,33 @@
|
|
|
1
1
|
import { jsxs as j, jsx as o } from "react/jsx-runtime";
|
|
2
|
-
import { useState as d, useMemo as
|
|
3
|
-
import { useTranslation as
|
|
4
|
-
import { Popover as k, Center as
|
|
5
|
-
import { IconEntity as
|
|
6
|
-
import { EmojiPanel as
|
|
7
|
-
import { IconsPanel as
|
|
2
|
+
import { useState as d, useMemo as A, useEffect as T } from "react";
|
|
3
|
+
import { useTranslation as E } from "react-i18next";
|
|
4
|
+
import { Popover as k, Center as G, Tabs as t, Flex as C, Button as J } from "@mantine/core";
|
|
5
|
+
import { IconEntity as K } from "../ProjectIcon/ProjectIcon.js";
|
|
6
|
+
import { EmojiPanel as U } from "./EmojiPanel.js";
|
|
7
|
+
import { IconsPanel as V } from "./IconsPanel.js";
|
|
8
8
|
import f from "./EmojiPicker.module.css.js";
|
|
9
|
-
const
|
|
10
|
-
project:
|
|
9
|
+
const oe = ({
|
|
10
|
+
project: N,
|
|
11
11
|
value: i,
|
|
12
12
|
querySearch: l,
|
|
13
|
-
children:
|
|
13
|
+
children: R,
|
|
14
14
|
onChange: p,
|
|
15
|
-
position:
|
|
15
|
+
position: D = "bottom-start",
|
|
16
16
|
popoverProps: P,
|
|
17
17
|
showIcons: u,
|
|
18
|
-
showColors:
|
|
19
|
-
defaultActiveTab:
|
|
18
|
+
showColors: I,
|
|
19
|
+
defaultActiveTab: w = null,
|
|
20
20
|
showEmojis: s = !0,
|
|
21
|
-
withinPortal:
|
|
21
|
+
withinPortal: L = !1,
|
|
22
22
|
locales: h,
|
|
23
23
|
openWhen: g = "click",
|
|
24
24
|
triggerRegex: b = /(^|\s):([^\s:]{1,})$/,
|
|
25
|
-
typingSeq:
|
|
26
|
-
showRemoveButton:
|
|
27
|
-
keepOpenOnRandom:
|
|
25
|
+
typingSeq: n,
|
|
26
|
+
showRemoveButton: M = !0,
|
|
27
|
+
keepOpenOnRandom: z = !1,
|
|
28
|
+
closeOnSelect: y = !0
|
|
28
29
|
}) => {
|
|
29
|
-
const { t: e } =
|
|
30
|
+
const { t: e } = E("ui"), [c, r] = d(!1), [B, x] = d(w), [F, H] = d(i || null), [v, O] = d(null), a = A(() => ({
|
|
30
31
|
emojis: e("emojis"),
|
|
31
32
|
remove: e("remove"),
|
|
32
33
|
search: e("search"),
|
|
@@ -50,30 +51,30 @@ const ee = ({
|
|
|
50
51
|
},
|
|
51
52
|
...h
|
|
52
53
|
}), [e, h]);
|
|
53
|
-
|
|
54
|
-
const m = u &&
|
|
55
|
-
!
|
|
56
|
-
}, [
|
|
57
|
-
if (g !== "realtime" || typeof
|
|
58
|
-
|
|
59
|
-
const m = l ?? "",
|
|
60
|
-
r(
|
|
54
|
+
T(() => {
|
|
55
|
+
const m = u && K.parse(i)?.icon ? "icons" : s ? "emojis" : null;
|
|
56
|
+
!c && m && x(m);
|
|
57
|
+
}, [c, s, u, i]), T(() => {
|
|
58
|
+
if (g !== "realtime" || typeof n != "number" || v === n) return;
|
|
59
|
+
O(n);
|
|
60
|
+
const m = l ?? "", $ = !!s && b.test(m);
|
|
61
|
+
r($);
|
|
61
62
|
}, [
|
|
62
63
|
g,
|
|
63
|
-
|
|
64
|
-
|
|
64
|
+
n,
|
|
65
|
+
v,
|
|
65
66
|
l,
|
|
66
67
|
b,
|
|
67
68
|
s
|
|
68
69
|
]);
|
|
69
|
-
const
|
|
70
|
+
const Q = typeof l == "string";
|
|
70
71
|
return /* @__PURE__ */ j(
|
|
71
72
|
k,
|
|
72
73
|
{
|
|
73
|
-
withinPortal:
|
|
74
|
-
opened:
|
|
74
|
+
withinPortal: L,
|
|
75
|
+
opened: c,
|
|
75
76
|
onChange: r,
|
|
76
|
-
position:
|
|
77
|
+
position: D,
|
|
77
78
|
radius: "var(--mantine-spacing-sm)",
|
|
78
79
|
styles: {
|
|
79
80
|
dropdown: {
|
|
@@ -99,17 +100,17 @@ const ee = ({
|
|
|
99
100
|
...P || {},
|
|
100
101
|
children: [
|
|
101
102
|
/* @__PURE__ */ o(k.Target, { children: /* @__PURE__ */ o(
|
|
102
|
-
|
|
103
|
+
G,
|
|
103
104
|
{
|
|
104
|
-
onClick: g === "click" && !P?.disabled ? () => r(!
|
|
105
|
-
children:
|
|
105
|
+
onClick: g === "click" && !P?.disabled ? () => r(!c) : void 0,
|
|
106
|
+
children: R ?? F
|
|
106
107
|
}
|
|
107
108
|
) }),
|
|
108
109
|
/* @__PURE__ */ o(k.Dropdown, { w: "380px", children: /* @__PURE__ */ j(
|
|
109
110
|
t,
|
|
110
111
|
{
|
|
111
|
-
value:
|
|
112
|
-
onChange:
|
|
112
|
+
value: B,
|
|
113
|
+
onChange: x,
|
|
113
114
|
keepMounted: !1,
|
|
114
115
|
h: "100%",
|
|
115
116
|
styles: {
|
|
@@ -126,7 +127,7 @@ const ee = ({
|
|
|
126
127
|
}
|
|
127
128
|
},
|
|
128
129
|
children: [
|
|
129
|
-
!
|
|
130
|
+
!Q && /* @__PURE__ */ j(
|
|
130
131
|
t.List,
|
|
131
132
|
{
|
|
132
133
|
style: {
|
|
@@ -142,7 +143,7 @@ const ee = ({
|
|
|
142
143
|
h: "100%",
|
|
143
144
|
p: 0,
|
|
144
145
|
value: "emojis",
|
|
145
|
-
children: /* @__PURE__ */ o(
|
|
146
|
+
children: /* @__PURE__ */ o(C, { className: f.customTab, px: "sm", h: 36, children: a.emojis })
|
|
146
147
|
}
|
|
147
148
|
),
|
|
148
149
|
u && /* @__PURE__ */ o(
|
|
@@ -152,11 +153,11 @@ const ee = ({
|
|
|
152
153
|
h: "100%",
|
|
153
154
|
p: 0,
|
|
154
155
|
value: "icons",
|
|
155
|
-
children: /* @__PURE__ */ o(
|
|
156
|
+
children: /* @__PURE__ */ o(C, { className: f.customTab, px: "sm", h: 36, children: a.icons })
|
|
156
157
|
}
|
|
157
158
|
),
|
|
158
|
-
!!String(i) &&
|
|
159
|
-
|
|
159
|
+
!!String(i) && M && /* @__PURE__ */ o(
|
|
160
|
+
J,
|
|
160
161
|
{
|
|
161
162
|
variant: "subtle",
|
|
162
163
|
fz: "sm",
|
|
@@ -174,14 +175,15 @@ const ee = ({
|
|
|
174
175
|
}
|
|
175
176
|
),
|
|
176
177
|
/* @__PURE__ */ o(t.Panel, { mah: 470, style: { overflow: "auto" }, value: "emojis", children: /* @__PURE__ */ o(
|
|
177
|
-
|
|
178
|
+
U,
|
|
178
179
|
{
|
|
179
180
|
onChange: p,
|
|
180
181
|
value: i,
|
|
181
182
|
querySearch: l,
|
|
182
183
|
locales: a,
|
|
183
|
-
setRandomIcon:
|
|
184
|
-
onClose: () => r(!1)
|
|
184
|
+
setRandomIcon: H,
|
|
185
|
+
onClose: y ? () => r(!1) : () => {
|
|
186
|
+
}
|
|
185
187
|
}
|
|
186
188
|
) }),
|
|
187
189
|
/* @__PURE__ */ o(
|
|
@@ -192,15 +194,16 @@ const ee = ({
|
|
|
192
194
|
style: { overflow: "auto" },
|
|
193
195
|
value: "icons",
|
|
194
196
|
children: /* @__PURE__ */ o(
|
|
195
|
-
|
|
197
|
+
V,
|
|
196
198
|
{
|
|
197
|
-
project:
|
|
199
|
+
project: N,
|
|
198
200
|
onChange: p,
|
|
199
201
|
value: i,
|
|
200
202
|
locales: a,
|
|
201
|
-
showColors:
|
|
202
|
-
keepOpenOnRandom:
|
|
203
|
-
onClose: () => r(!1)
|
|
203
|
+
showColors: I,
|
|
204
|
+
keepOpenOnRandom: z,
|
|
205
|
+
onClose: y ? () => r(!1) : () => {
|
|
206
|
+
}
|
|
204
207
|
}
|
|
205
208
|
)
|
|
206
209
|
}
|
|
@@ -213,5 +216,5 @@ const ee = ({
|
|
|
213
216
|
);
|
|
214
217
|
};
|
|
215
218
|
export {
|
|
216
|
-
|
|
219
|
+
oe as EmojiPicker
|
|
217
220
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"EntityIcon.d.ts","sourceRoot":"","sources":["../../src/components/EntityIcon.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"EntityIcon.d.ts","sourceRoot":"","sources":["../../src/components/EntityIcon.tsx"],"names":[],"mappings":"AA4BA,MAAM,WAAW,cAAc;IAC7B,IAAI,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IACrB,IAAI,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IACrB,KAAK,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IACtB,IAAI,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IACrB,EAAE,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IACnB,EAAE,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IACnB,QAAQ,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IACzB,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,QAAQ,CAAC,EAAE,MAAM,EAAE,CAAC;IACpB,MAAM,CAAC,EAAE,OAAO,CAAC;CAClB;AAQD,eAAO,MAAM,UAAU,GAAI,CAAC,SAAS,cAAc,EAAE,WAElD;IACD,IAAI,CAAC,EAAE,CAAC,CAAC;CACV,mDAkJA,CAAC"}
|