@layers-app/shared 0.4.5 → 0.4.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/components/AppContainer/AppContainer.d.ts.map +1 -1
- package/dist/components/AppContainer/AppContainer.js +72 -79
- package/dist/components/AppContainer/AppContainer.module.css.js +6 -6
- package/dist/components/AppContainer/components/AppsSidebar/TopSection.d.ts.map +1 -1
- package/dist/components/AppContainer/components/AppsSidebar/TopSection.js +24 -22
- package/dist/components/AppContainer/components/AppsSidebar/UserSection.d.ts.map +1 -1
- package/dist/components/AppContainer/components/AppsSidebar/UserSection.js +46 -37
- package/dist/components/AppContainer/components/Header.d.ts.map +1 -1
- package/dist/components/AppContainer/components/Header.js +6 -5
- package/dist/components/AppContainer/components/Main.js +4 -4
- package/dist/components/AppContainer/components/SlideAnimation.js +4 -4
- package/dist/components/AppContainer/components/ToolSidebar.d.ts.map +1 -1
- package/dist/components/AppContainer/components/ToolSidebar.js +161 -128
- package/dist/components/AppContainer/components/menus/HelpMenu/HelpMenu.d.ts.map +1 -1
- package/dist/components/AppContainer/components/menus/HelpMenu/HelpMenu.js +131 -121
- 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 +59 -56
- package/dist/components/AppContainer/hooks/useAppContainerDataStore.d.ts.map +1 -1
- package/dist/components/AppContainer/hooks/useAppContainerDataStore.js +4 -3
- package/dist/components/AppContainer/types.d.ts +1 -0
- package/dist/components/AppContainer/types.d.ts.map +1 -1
- package/dist/components/AttachmentsGalleryModal/components/ModalHeader.d.ts.map +1 -1
- package/dist/components/AttachmentsGalleryModal/components/ModalHeader.js +37 -37
- package/dist/components/AttachmentsGalleryModal/components/ShakePlayer/useShakePlayer.d.ts.map +1 -1
- package/dist/components/AttachmentsGalleryModal/components/ShakePlayer/useShakePlayer.js +68 -62
- package/dist/components/AttachmentsGalleryModal/helpers.d.ts +8 -0
- package/dist/components/AttachmentsGalleryModal/helpers.d.ts.map +1 -1
- package/dist/components/AttachmentsGalleryModal/helpers.js +22 -17
- package/dist/components/AttachmentsGalleryModal/hooks/useDownloadFile.d.ts.map +1 -1
- package/dist/components/AttachmentsGalleryModal/hooks/useDownloadFile.js +28 -25
- package/dist/components/AttachmentsGalleryModal/hooks/useGetPreviewUrl.d.ts.map +1 -1
- package/dist/components/AttachmentsGalleryModal/hooks/useGetPreviewUrl.js +36 -41
- package/dist/components/AttachmentsPreview/AttachmentsPreview.d.ts.map +1 -1
- package/dist/components/AttachmentsPreview/AttachmentsPreview.js +135 -80
- package/dist/components/AttachmentsPreview/AttachmentsPreview.module.css.js +24 -14
- package/dist/components/BouncingLogo/BouncingLogo.d.ts +1 -3
- package/dist/components/BouncingLogo/BouncingLogo.d.ts.map +1 -1
- package/dist/components/BouncingLogo/BouncingLogo.js +14 -20
- package/dist/components/BouncingLogo/BouncingLogo.module.css.js +4 -8
- package/dist/components/Chat/ChatBubble/ChatBubble.module.css.js +5 -5
- package/dist/components/Chat/ChatInput/ChatInput.module.css.js +40 -28
- package/dist/components/Chat/ChatInput/index.d.ts +29 -1
- package/dist/components/Chat/ChatInput/index.d.ts.map +1 -1
- package/dist/components/Chat/ChatInput/index.js +178 -118
- package/dist/components/Chat/ChatInput/smilePlusIcon.d.ts +3 -0
- package/dist/components/Chat/ChatInput/smilePlusIcon.d.ts.map +1 -0
- package/dist/components/Chat/ChatInput/smilePlusIcon.js +49 -0
- package/dist/components/Chat/ChatMessage/ChatMessage.module.css.js +9 -9
- package/dist/components/Chat/ChatMessage/index.d.ts +2 -0
- package/dist/components/Chat/ChatMessage/index.d.ts.map +1 -1
- package/dist/components/Chat/ChatMessage/index.js +136 -118
- package/dist/components/Chat/MediaDocument/MediaDocument.module.css.js +4 -4
- package/dist/components/Chat/MessageActions/index.d.ts +7 -0
- package/dist/components/Chat/MessageActions/index.d.ts.map +1 -1
- package/dist/components/Chat/MessageActions/index.js +33 -30
- package/dist/components/Chat/MessageList/MessageList.module.css.js +14 -10
- package/dist/components/Chat/MessageList/index.d.ts +30 -3
- package/dist/components/Chat/MessageList/index.d.ts.map +1 -1
- package/dist/components/Chat/MessageList/index.js +154 -66
- package/dist/components/Chat/MessageReactions/MessageReactions.module.css.js +7 -7
- package/dist/components/Chat/MessageReactions/index.d.ts +17 -0
- package/dist/components/Chat/MessageReactions/index.d.ts.map +1 -1
- package/dist/components/Chat/MessageReactions/index.js +60 -28
- package/dist/components/Chat/MessageStatus/MessageStatus.module.css.js +6 -4
- package/dist/components/Chat/MessageStatus/index.d.ts +1 -1
- package/dist/components/Chat/MessageStatus/index.d.ts.map +1 -1
- package/dist/components/Chat/MessageStatus/index.js +49 -34
- package/dist/components/CircleColorPicker/CircleColorPicker.d.ts.map +1 -1
- package/dist/components/CircleColorPicker/CircleColorPicker.js +17 -15
- package/dist/components/ColorPicker/ColorPicker.module.css.js +26 -20
- package/dist/components/ColorPicker/ColorPickerList.d.ts.map +1 -1
- package/dist/components/ColorPicker/ColorPickerList.js +81 -68
- package/dist/components/ColorPicker/ColorPickerToolbar.d.ts.map +1 -1
- package/dist/components/ColorPicker/ColorPickerToolbar.js +75 -70
- package/dist/components/ColorPicker/icons.js +5 -5
- package/dist/components/ColorPicker/types.d.ts +6 -0
- package/dist/components/ColorPicker/types.d.ts.map +1 -1
- package/dist/components/ColorPicker/types.js +53 -11
- package/dist/components/ColorPicker/useRecentColors.d.ts +3 -1
- package/dist/components/ColorPicker/useRecentColors.d.ts.map +1 -1
- package/dist/components/ColorPicker/useRecentColors.js +43 -20
- package/dist/components/EmojiPicker/EmojiPanel.d.ts +2 -1
- package/dist/components/EmojiPicker/EmojiPanel.d.ts.map +1 -1
- package/dist/components/EmojiPicker/EmojiPanel.js +73 -72
- package/dist/components/EmojiPicker/EmojiPicker.d.ts +16 -1
- package/dist/components/EmojiPicker/EmojiPicker.d.ts.map +1 -1
- package/dist/components/EmojiPicker/EmojiPicker.js +121 -86
- package/dist/components/EmojiPicker/IconsPanel.d.ts.map +1 -1
- package/dist/components/EmojiPicker/IconsPanel.js +28 -25
- package/dist/components/EntityIcon.d.ts +1 -0
- package/dist/components/EntityIcon.d.ts.map +1 -1
- package/dist/components/EntityIcon.js +80 -32
- package/dist/components/ErrorPage/components/Error403.d.ts +5 -1
- package/dist/components/ErrorPage/components/Error403.d.ts.map +1 -1
- package/dist/components/ErrorPage/components/Error403.js +25 -21
- package/dist/components/ErrorPage/index.d.ts +5 -1
- package/dist/components/ErrorPage/index.d.ts.map +1 -1
- package/dist/components/ErrorPage/index.js +17 -10
- package/dist/components/MusicPlayerBar/components/HoverActions.js +28 -28
- package/dist/components/NavMenu/NavMenu.d.ts +7 -1
- package/dist/components/NavMenu/NavMenu.d.ts.map +1 -1
- package/dist/components/NavMenu/NavMenu.js +54 -44
- package/dist/components/NavMenu/NavMenu.module.css.js +10 -10
- package/dist/components/NavMenu/components/NavMenuItem.d.ts.map +1 -1
- package/dist/components/NavMenu/components/NavMenuItem.js +84 -84
- package/dist/components/NavMenu/types.d.ts +4 -0
- package/dist/components/NavMenu/types.d.ts.map +1 -1
- package/dist/components/WorkspaceMenu/WorkspaceItem.d.ts.map +1 -1
- package/dist/components/WorkspaceMenu/WorkspaceItem.js +16 -14
- package/dist/config/envConfig.d.ts +2 -0
- package/dist/config/envConfig.d.ts.map +1 -1
- package/dist/config/envConfig.js +41 -37
- package/dist/helpers/showNotifications.d.ts +15 -0
- package/dist/helpers/showNotifications.d.ts.map +1 -1
- package/dist/helpers/showNotifications.js +114 -72
- package/dist/helpers/showNotifications.module.css.js +16 -4
- package/dist/hooks/useUiPref.d.ts +2 -0
- package/dist/hooks/useUiPref.d.ts.map +1 -0
- package/dist/hooks/useUiPref.js +80 -0
- 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 +550 -540
- package/dist/lang/locales/ui_en.json.js +1 -1
- package/dist/lang/locales/ui_es.json.js +1 -1
- package/dist/lang/locales/ui_ru.json.js +1 -1
- package/package.json +1 -1
|
@@ -1,146 +1,179 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { useRef as
|
|
3
|
-
import { useTranslation as
|
|
4
|
-
import { useNavigate as
|
|
5
|
-
import { ActionIcon as
|
|
6
|
-
import { useField as
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
10
|
-
import {
|
|
11
|
-
import {
|
|
12
|
-
import {
|
|
13
|
-
import {
|
|
14
|
-
import
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
c(()
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
1
|
+
import { jsxs as t, jsx as e } from "react/jsx-runtime";
|
|
2
|
+
import { useRef as B, useEffect as p, useMemo as W } from "react";
|
|
3
|
+
import { useTranslation as A } from "react-i18next";
|
|
4
|
+
import { useNavigate as L, useParams as N, useLocation as P, matchPath as V } from "react-router-dom";
|
|
5
|
+
import { ActionIcon as k, Title as D, TextInput as F, Flex as b, Text as H, Badge as M, Drawer as R, Box as j } from "@mantine/core";
|
|
6
|
+
import { useField as E } from "@mantine/form";
|
|
7
|
+
import { useMediaQuery as O } from "@mantine/hooks";
|
|
8
|
+
import { IconArrowLeft as Q } from "@tabler/icons-react";
|
|
9
|
+
import { AppShell as y } from "../../AppShell/AppShell.js";
|
|
10
|
+
import { NavbarResizer as q } from "../../NavbarResizer/NavbarResizer.js";
|
|
11
|
+
import { useAppContainerDataStore as G } from "../hooks/useAppContainerDataStore.js";
|
|
12
|
+
import { appContainerStore as n } from "../hooks/useAppContainerStore.js";
|
|
13
|
+
import { SidebarToggleButton as v } from "./SidebarToggleButton.js";
|
|
14
|
+
import { SlideAnimation as J } from "./SlideAnimation.js";
|
|
15
|
+
import w from "../AppContainer.module.css.js";
|
|
16
|
+
const se = (T) => {
|
|
17
|
+
const { t: h } = A("appContainer"), { children: d, navbarTitle: i, onTitleChange: r, isBeta: S, bottomSlot: c } = T, C = L(), { showToolbar: l, toolbarWidth: I } = n.useStore(), { formId: z } = N(), m = B(r);
|
|
18
|
+
p(() => {
|
|
19
|
+
m.current = r;
|
|
20
|
+
}, [r]);
|
|
21
|
+
const f = E({
|
|
22
|
+
initialValue: i || "",
|
|
23
|
+
onValueChange: (o) => {
|
|
24
|
+
m.current?.(o);
|
|
24
25
|
}
|
|
25
26
|
});
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
}, [
|
|
29
|
-
const
|
|
30
|
-
|
|
31
|
-
|
|
27
|
+
p(() => {
|
|
28
|
+
f.setValue(i || "");
|
|
29
|
+
}, [i]);
|
|
30
|
+
const a = P(), u = G((o) => o.tools), s = W(() => u.find((o) => !!V({ path: o.path, end: !1 }, a.pathname)), [a.pathname, u]), g = O("(max-width: 768px)", !1, {
|
|
31
|
+
getInitialValueInEffect: !1
|
|
32
|
+
});
|
|
33
|
+
p(() => {
|
|
34
|
+
g && n.api.closeToolbar();
|
|
35
|
+
}, [a.pathname]);
|
|
36
|
+
const x = /* @__PURE__ */ t(
|
|
37
|
+
"div",
|
|
32
38
|
{
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
+
style: {
|
|
40
|
+
display: "flex",
|
|
41
|
+
alignItems: "center",
|
|
42
|
+
gap: 8,
|
|
43
|
+
flex: 1,
|
|
44
|
+
minWidth: 0
|
|
45
|
+
},
|
|
46
|
+
children: [
|
|
47
|
+
s?.withBackButton && z && s.name && /* @__PURE__ */ e(
|
|
48
|
+
k,
|
|
39
49
|
{
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
50
|
+
onClick: () => C(s?.path),
|
|
51
|
+
variant: "light",
|
|
52
|
+
size: "md",
|
|
53
|
+
color: "gray",
|
|
54
|
+
children: /* @__PURE__ */ e(Q, { size: 18 })
|
|
43
55
|
}
|
|
44
56
|
),
|
|
45
|
-
/* @__PURE__ */
|
|
46
|
-
|
|
47
|
-
|
|
57
|
+
/* @__PURE__ */ e(D, { order: 4, fz: 16, component: "div", style: { flex: 1, minWidth: 0 }, children: r ? /* @__PURE__ */ e(
|
|
58
|
+
F,
|
|
59
|
+
{
|
|
60
|
+
...f.getInputProps(),
|
|
61
|
+
placeholder: h("noName"),
|
|
62
|
+
maxLength: 50,
|
|
63
|
+
minLength: 1,
|
|
64
|
+
unstyled: !0,
|
|
65
|
+
classNames: {
|
|
66
|
+
input: w.toolTitleInput
|
|
67
|
+
},
|
|
68
|
+
styles: {
|
|
69
|
+
root: {
|
|
70
|
+
width: "100%",
|
|
71
|
+
flex: 1,
|
|
72
|
+
minWidth: "calc(100% - 40px)"
|
|
73
|
+
},
|
|
74
|
+
input: {
|
|
75
|
+
fontSize: "inherit",
|
|
76
|
+
fontWeight: "inherit",
|
|
77
|
+
lineHeight: "inherit",
|
|
78
|
+
overflow: "hidden",
|
|
79
|
+
textOverflow: "ellipsis",
|
|
80
|
+
whiteSpace: "nowrap"
|
|
81
|
+
}
|
|
82
|
+
}
|
|
83
|
+
}
|
|
84
|
+
) : /* @__PURE__ */ t(b, { gap: "xs", children: [
|
|
85
|
+
/* @__PURE__ */ e(
|
|
86
|
+
H,
|
|
48
87
|
{
|
|
88
|
+
component: "span",
|
|
89
|
+
className: w.toolTitleText,
|
|
90
|
+
truncate: "end",
|
|
49
91
|
style: {
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
minWidth: 0
|
|
92
|
+
fontSize: "inherit",
|
|
93
|
+
fontWeight: "inherit",
|
|
94
|
+
lineHeight: "inherit",
|
|
95
|
+
display: "block"
|
|
55
96
|
},
|
|
56
|
-
children:
|
|
57
|
-
r?.withBackButton && S && r.name && /* @__PURE__ */ t(
|
|
58
|
-
L,
|
|
59
|
-
{
|
|
60
|
-
onClick: () => b(r?.path),
|
|
61
|
-
variant: "light",
|
|
62
|
-
size: "md",
|
|
63
|
-
color: "gray",
|
|
64
|
-
children: /* @__PURE__ */ t(V, { size: 18 })
|
|
65
|
-
}
|
|
66
|
-
),
|
|
67
|
-
/* @__PURE__ */ t(
|
|
68
|
-
N,
|
|
69
|
-
{
|
|
70
|
-
order: 4,
|
|
71
|
-
fz: 16,
|
|
72
|
-
component: "div",
|
|
73
|
-
style: { flex: 1, minWidth: 0 },
|
|
74
|
-
children: i ? /* @__PURE__ */ t(
|
|
75
|
-
k,
|
|
76
|
-
{
|
|
77
|
-
...p.getInputProps(),
|
|
78
|
-
placeholder: a("noName"),
|
|
79
|
-
maxLength: 50,
|
|
80
|
-
minLength: 1,
|
|
81
|
-
unstyled: !0,
|
|
82
|
-
classNames: {
|
|
83
|
-
input: u.toolTitleInput
|
|
84
|
-
},
|
|
85
|
-
styles: {
|
|
86
|
-
root: {
|
|
87
|
-
width: "100%",
|
|
88
|
-
flex: 1,
|
|
89
|
-
minWidth: "calc(100% - 40px)"
|
|
90
|
-
},
|
|
91
|
-
input: {
|
|
92
|
-
fontSize: "inherit",
|
|
93
|
-
fontWeight: "inherit",
|
|
94
|
-
lineHeight: "inherit",
|
|
95
|
-
overflow: "hidden",
|
|
96
|
-
textOverflow: "ellipsis",
|
|
97
|
-
whiteSpace: "nowrap"
|
|
98
|
-
}
|
|
99
|
-
}
|
|
100
|
-
}
|
|
101
|
-
) : /* @__PURE__ */ n(F, { gap: "xs", children: [
|
|
102
|
-
/* @__PURE__ */ t(
|
|
103
|
-
H,
|
|
104
|
-
{
|
|
105
|
-
component: "span",
|
|
106
|
-
className: u.toolTitleText,
|
|
107
|
-
truncate: "end",
|
|
108
|
-
style: {
|
|
109
|
-
fontSize: "inherit",
|
|
110
|
-
fontWeight: "inherit",
|
|
111
|
-
lineHeight: "inherit",
|
|
112
|
-
display: "block"
|
|
113
|
-
// width: '100%',
|
|
114
|
-
},
|
|
115
|
-
children: o
|
|
116
|
-
}
|
|
117
|
-
),
|
|
118
|
-
T && /* @__PURE__ */ t(
|
|
119
|
-
P,
|
|
120
|
-
{
|
|
121
|
-
px: 8,
|
|
122
|
-
py: 4,
|
|
123
|
-
fz: "xs",
|
|
124
|
-
fw: 600,
|
|
125
|
-
variant: "light",
|
|
126
|
-
color: "yellow",
|
|
127
|
-
children: a("beta")
|
|
128
|
-
}
|
|
129
|
-
)
|
|
130
|
-
] })
|
|
131
|
-
}
|
|
132
|
-
)
|
|
133
|
-
]
|
|
97
|
+
children: i
|
|
134
98
|
}
|
|
135
99
|
),
|
|
136
|
-
/* @__PURE__ */
|
|
100
|
+
S && /* @__PURE__ */ e(
|
|
101
|
+
M,
|
|
102
|
+
{
|
|
103
|
+
px: 8,
|
|
104
|
+
py: 4,
|
|
105
|
+
fz: "xs",
|
|
106
|
+
fw: 600,
|
|
107
|
+
variant: "light",
|
|
108
|
+
color: "yellow",
|
|
109
|
+
children: h("beta")
|
|
110
|
+
}
|
|
111
|
+
)
|
|
112
|
+
] }) })
|
|
113
|
+
]
|
|
114
|
+
}
|
|
115
|
+
);
|
|
116
|
+
return g ? /* @__PURE__ */ t(
|
|
117
|
+
R,
|
|
118
|
+
{
|
|
119
|
+
opened: l,
|
|
120
|
+
onClose: n.api.closeToolbar,
|
|
121
|
+
size: 300,
|
|
122
|
+
withCloseButton: !1,
|
|
123
|
+
overlayProps: { opacity: 0.5 },
|
|
124
|
+
padding: 0,
|
|
125
|
+
styles: {
|
|
126
|
+
body: {
|
|
127
|
+
padding: 0,
|
|
128
|
+
height: "100dvh",
|
|
129
|
+
display: "flex",
|
|
130
|
+
flexDirection: "column"
|
|
131
|
+
}
|
|
132
|
+
},
|
|
133
|
+
children: [
|
|
134
|
+
/* @__PURE__ */ t(
|
|
135
|
+
b,
|
|
136
|
+
{
|
|
137
|
+
align: "center",
|
|
138
|
+
h: 48,
|
|
139
|
+
pl: 16,
|
|
140
|
+
pr: 14,
|
|
141
|
+
style: { borderBottom: "1px solid var(--app-shell-border-color, var(--mantine-color-default-border))" },
|
|
142
|
+
children: [
|
|
143
|
+
x,
|
|
144
|
+
/* @__PURE__ */ e(v, {})
|
|
145
|
+
]
|
|
146
|
+
}
|
|
147
|
+
),
|
|
148
|
+
/* @__PURE__ */ e(j, { flex: 1, mih: 0, style: { overflow: "auto" }, children: d }),
|
|
149
|
+
c
|
|
150
|
+
]
|
|
151
|
+
}
|
|
152
|
+
) : /* @__PURE__ */ e(
|
|
153
|
+
J,
|
|
154
|
+
{
|
|
155
|
+
show: l,
|
|
156
|
+
width: "var(--toolbar-width)",
|
|
157
|
+
position: "left",
|
|
158
|
+
children: /* @__PURE__ */ t(y.LeftSidebar, { pos: "relative", children: [
|
|
159
|
+
l && /* @__PURE__ */ e(
|
|
160
|
+
q,
|
|
161
|
+
{
|
|
162
|
+
position: "left",
|
|
163
|
+
width: I,
|
|
164
|
+
onChange: n.api.setToolbarWidth
|
|
165
|
+
}
|
|
166
|
+
),
|
|
167
|
+
/* @__PURE__ */ t(y.Header, { pl: 16, pr: 14, children: [
|
|
168
|
+
x,
|
|
169
|
+
/* @__PURE__ */ e(v, {})
|
|
137
170
|
] }),
|
|
138
|
-
|
|
139
|
-
|
|
171
|
+
d,
|
|
172
|
+
c
|
|
140
173
|
] })
|
|
141
174
|
}
|
|
142
175
|
);
|
|
143
176
|
};
|
|
144
177
|
export {
|
|
145
|
-
|
|
178
|
+
se as ToolSidebar
|
|
146
179
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"HelpMenu.d.ts","sourceRoot":"","sources":["../../../../../../src/components/AppContainer/components/menus/HelpMenu/HelpMenu.tsx"],"names":[],"mappings":"AAmCA,eAAO,MAAM,QAAQ,+
|
|
1
|
+
{"version":3,"file":"HelpMenu.d.ts","sourceRoot":"","sources":["../../../../../../src/components/AppContainer/components/menus/HelpMenu/HelpMenu.tsx"],"names":[],"mappings":"AAmCA,eAAO,MAAM,QAAQ,+CA2RpB,CAAC"}
|