@layers-app/shared 0.0.50 → 0.0.51
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/{KanbanLayout-oWz6EhPt.js → KanbanLayout-CqLSzjCH.js} +1 -1
- package/dist/components/FormViewer/helpers/conditions.d.ts +1 -1
- package/dist/components/FormViewer/helpers/helpers.d.ts +1 -1
- package/dist/components/FormViewer/helpers/steps.d.ts +1 -1
- package/dist/components/FormViewer/hooks/useActiveStep.d.ts +1 -1
- package/dist/components/FormViewer/store/formStore.d.ts +6 -6
- package/dist/components/FormViewer/store/formStoreApi.d.ts +3 -3
- package/dist/components/FormViewer/store/selectors.d.ts +342 -342
- package/dist/components/FormViewer/types/schemes.d.ts +22 -22
- package/dist/components/UserAvatar/index.d.ts +3 -2
- package/dist/components/modals/RemoveConfirmModal.d.ts +2 -0
- package/dist/{index-tn5CWDGz.js → index-By3Za6p9.js} +172 -158
- package/dist/index.js +2 -2
- package/dist/index.umd.cjs +4 -4
- package/package.json +1 -1
|
@@ -2,7 +2,7 @@ var __defProp = Object.defineProperty;
|
|
|
2
2
|
var __defNormalProp = (obj, key2, value) => key2 in obj ? __defProp(obj, key2, { enumerable: true, configurable: true, writable: true, value }) : obj[key2] = value;
|
|
3
3
|
var __publicField = (obj, key2, value) => __defNormalProp(obj, typeof key2 !== "symbol" ? key2 + "" : key2, value);
|
|
4
4
|
import { jsxs, jsx as jsx$1, Fragment as Fragment$1 } from "react/jsx-runtime";
|
|
5
|
-
import { Stack, Box, Flex, Title, Text as Text$2, Group, Button, SimpleGrid, AspectRatio, Skeleton, TextInput, Loader, FocusTrap, ActionIcon, Popover, Tabs, Avatar, Tooltip, Paper, useMantineTheme, parseThemeColor, darken as darken$1, Center,
|
|
5
|
+
import { Stack, Box, Flex, Title, Text as Text$2, Group, Button, SimpleGrid, AspectRatio, Skeleton, TextInput, Loader, FocusTrap, ActionIcon, Popover, Tabs, Avatar, Tooltip, Paper, useMantineTheme, parseThemeColor, darken as darken$1, Center, Menu, ScrollArea, Divider, useComputedColorScheme, Progress, useMantineColorScheme, CloseButton, alpha as alpha$1, ColorSwatch, Select, Space, Transition, Alert, Container as Container$4, Modal, Input, Card, MantineProvider, Badge, defaultVariantColorsResolver, rgba, Accordion, Radio, AppShell as AppShell$1, Image as Image$1, ColorInput, getThemeColor, Pill, Indicator, Grid, LoadingOverlay, CloseIcon, FileButton, UnstyledButton, PinInput, Checkbox, Dialog, Drawer, Textarea, ColorPicker as ColorPicker$2, DEFAULT_THEME as DEFAULT_THEME$1, isColorValid, InputError, NumberInput, Rating, Slider, ThemeIcon, createTheme } from "@mantine/core";
|
|
6
6
|
import * as React from "react";
|
|
7
7
|
import React__default, { forwardRef, createElement, useState, useMemo, useEffect, useCallback, useRef, memo as memo$1, useLayoutEffect, useDebugValue, createContext, useContext, useImperativeHandle, isValidElement, cloneElement, Fragment as Fragment$2, lazy, Suspense, useReducer } from "react";
|
|
8
8
|
import { useTranslation, Trans } from "react-i18next";
|
|
@@ -12,7 +12,7 @@ import queryString from "query-string";
|
|
|
12
12
|
import { useForm, useField } from "@mantine/form";
|
|
13
13
|
import { Dropzone, IMAGE_MIME_TYPE } from "@mantine/dropzone";
|
|
14
14
|
import { showNotification } from "@mantine/notifications";
|
|
15
|
-
import { isFunction as isFunction$5, isObject as isObject$3, isString as isString$1, isNil, groupBy, isNumber as isNumber$2, clamp, assignWith, get as get$2, round as round$6, chunk, set as set$1, isArray as isArray$1, xor, mergeWith, isEqual as isEqual$1 } from "lodash-es";
|
|
15
|
+
import { isFunction as isFunction$5, isObject as isObject$3, isString as isString$1, isNil, omit as omit$1, groupBy, isNumber as isNumber$2, clamp, assignWith, get as get$2, round as round$6, chunk, set as set$1, isArray as isArray$1, xor, mergeWith, isEqual as isEqual$1 } from "lodash-es";
|
|
16
16
|
import * as ReactDOM from "react-dom";
|
|
17
17
|
import ReactDOM__default, { flushSync, createPortal, unstable_batchedUpdates } from "react-dom";
|
|
18
18
|
import { useEvent as useEvent$2, useDraggable as useDraggable$1 } from "draggable-ui";
|
|
@@ -1437,7 +1437,11 @@ const ProjectIcon = forwardRef(
|
|
|
1437
1437
|
color,
|
|
1438
1438
|
name: fallbackColorById,
|
|
1439
1439
|
size: size || 20,
|
|
1440
|
-
|
|
1440
|
+
style: {
|
|
1441
|
+
overflow: props.radius ? "hidden" : "visible",
|
|
1442
|
+
...props.style
|
|
1443
|
+
},
|
|
1444
|
+
...omit$1(props, ["style"]),
|
|
1441
1445
|
children: /* @__PURE__ */ jsx$1(
|
|
1442
1446
|
Text$2,
|
|
1443
1447
|
{
|
|
@@ -3992,7 +3996,7 @@ const createAppContainerStore = () => {
|
|
|
3992
3996
|
toolbarWidth: 280,
|
|
3993
3997
|
isTourPassed: false,
|
|
3994
3998
|
showRightbar: false,
|
|
3995
|
-
rightbarWidth:
|
|
3999
|
+
rightbarWidth: 350
|
|
3996
4000
|
}),
|
|
3997
4001
|
{
|
|
3998
4002
|
name: "app-menu",
|
|
@@ -4061,13 +4065,6 @@ const createAppContainerApi = (store) => {
|
|
|
4061
4065
|
};
|
|
4062
4066
|
};
|
|
4063
4067
|
const appContainerStore = createAppContainerStore();
|
|
4064
|
-
const useMenu = () => {
|
|
4065
|
-
const opened = appContainerStore.useStore((s) => s.showToolbar);
|
|
4066
|
-
const isMobile2 = useMediaQuery("(max-width: 992px)");
|
|
4067
|
-
const isTablet = useMediaQuery("(min-width: 993px) and (max-width: 1199px)");
|
|
4068
|
-
const isDesktop = useMediaQuery("(min-width: 1200px)");
|
|
4069
|
-
return { isMobile: isMobile2, isTablet, isDesktop, opened };
|
|
4070
|
-
};
|
|
4071
4068
|
const SidebarToggleButton = ({ forOpen }) => {
|
|
4072
4069
|
const { showToolbar: opened } = appContainerStore.useStore();
|
|
4073
4070
|
if (forOpen && opened) return null;
|
|
@@ -4090,20 +4087,10 @@ const SidebarToggleButton = ({ forOpen }) => {
|
|
|
4090
4087
|
};
|
|
4091
4088
|
const Header$1 = ({ children }) => {
|
|
4092
4089
|
const { withoutHeader: _withoutHeader } = appContainerStore.useStore();
|
|
4093
|
-
const { isMobile: isMobile2 } = useMenu();
|
|
4094
4090
|
const hideHeader = useQueryParam("hide-header");
|
|
4095
4091
|
const withoutHeader = Boolean(hideHeader || _withoutHeader);
|
|
4096
4092
|
if (withoutHeader) return null;
|
|
4097
4093
|
return /* @__PURE__ */ jsxs(Fragment$1, { children: [
|
|
4098
|
-
isMobile2 && /* @__PURE__ */ jsx$1(
|
|
4099
|
-
Burger,
|
|
4100
|
-
{
|
|
4101
|
-
ml: "sm",
|
|
4102
|
-
onClick: appContainerStore.api.toggleToolbar,
|
|
4103
|
-
size: "sm",
|
|
4104
|
-
color: "gray.6"
|
|
4105
|
-
}
|
|
4106
|
-
),
|
|
4107
4094
|
/* @__PURE__ */ jsx$1(SidebarToggleButton, { forOpen: true }),
|
|
4108
4095
|
children
|
|
4109
4096
|
] });
|
|
@@ -4265,6 +4252,13 @@ const appFeature = (value) => {
|
|
|
4265
4252
|
const isFeature = () => {
|
|
4266
4253
|
return localStorage.getItem("showFeatures") === "true";
|
|
4267
4254
|
};
|
|
4255
|
+
const useMenu = () => {
|
|
4256
|
+
const opened = appContainerStore.useStore((s) => s.showToolbar);
|
|
4257
|
+
const isMobile2 = useMediaQuery("(max-width: 992px)");
|
|
4258
|
+
const isTablet = useMediaQuery("(min-width: 993px) and (max-width: 1199px)");
|
|
4259
|
+
const isDesktop = useMediaQuery("(min-width: 1200px)");
|
|
4260
|
+
return { isMobile: isMobile2, isTablet, isDesktop, opened };
|
|
4261
|
+
};
|
|
4268
4262
|
const useSearchModalStore = create(() => ({
|
|
4269
4263
|
opened: false
|
|
4270
4264
|
}));
|
|
@@ -4890,13 +4884,14 @@ const Storage = ({
|
|
|
4890
4884
|
active
|
|
4891
4885
|
}) => {
|
|
4892
4886
|
const { t } = useTranslation("workspaceMenu");
|
|
4893
|
-
const
|
|
4887
|
+
const fraction = ((active == null ? void 0 : active.storageUsedKb) || 0) / ((active == null ? void 0 : active.storageLimitKb) || 1);
|
|
4888
|
+
const stringPercent = Numbers.formatPercents(fraction);
|
|
4894
4889
|
return /* @__PURE__ */ jsxs(Stack, { gap: 4, w: "100%", children: [
|
|
4895
4890
|
/* @__PURE__ */ jsxs(Flex, { justify: "space-between", children: [
|
|
4896
4891
|
/* @__PURE__ */ jsxs(Text$2, { size: "sm", fw: 500, children: [
|
|
4897
4892
|
t("usedStorage"),
|
|
4898
4893
|
": ",
|
|
4899
|
-
|
|
4894
|
+
stringPercent
|
|
4900
4895
|
] }),
|
|
4901
4896
|
/* @__PURE__ */ jsxs(Text$2, { size: "sm", fw: 500, c: "gray", children: [
|
|
4902
4897
|
formatStorage(active == null ? void 0 : active.storageUsedKb),
|
|
@@ -4906,7 +4901,7 @@ const Storage = ({
|
|
|
4906
4901
|
formatStorage(active == null ? void 0 : active.storageLimitKb)
|
|
4907
4902
|
] })
|
|
4908
4903
|
] }),
|
|
4909
|
-
/* @__PURE__ */ jsx$1(Progress, { h: 4, value:
|
|
4904
|
+
/* @__PURE__ */ jsx$1(Progress, { h: 4, value: fraction * 100 })
|
|
4910
4905
|
] });
|
|
4911
4906
|
};
|
|
4912
4907
|
const Switch = ({
|
|
@@ -5191,7 +5186,7 @@ const HelpMenu = () => {
|
|
|
5191
5186
|
] });
|
|
5192
5187
|
};
|
|
5193
5188
|
const UserAvatar = forwardRef(
|
|
5194
|
-
({ user, size = 24, ...props }, ref) => {
|
|
5189
|
+
({ user, size = 24, emptyIcon, ...props }, ref) => {
|
|
5195
5190
|
var _a;
|
|
5196
5191
|
return /* @__PURE__ */ jsx$1(
|
|
5197
5192
|
Avatar,
|
|
@@ -5203,7 +5198,7 @@ const UserAvatar = forwardRef(
|
|
|
5203
5198
|
name: (user == null ? void 0 : user.id) ?? "",
|
|
5204
5199
|
...props,
|
|
5205
5200
|
ref,
|
|
5206
|
-
children: user ? /* @__PURE__ */ jsx$1(Fragment$1, { children: (_a = user.name) == null ? void 0 : _a.charAt(0) }) : /* @__PURE__ */ jsx$1(IconUser, { size: "70%" })
|
|
5201
|
+
children: user ? /* @__PURE__ */ jsx$1(Fragment$1, { children: (_a = user.name) == null ? void 0 : _a.charAt(0) }) : /* @__PURE__ */ jsx$1(Fragment$1, { children: emptyIcon ?? /* @__PURE__ */ jsx$1(IconUser, { size: "70%" }) })
|
|
5207
5202
|
}
|
|
5208
5203
|
);
|
|
5209
5204
|
}
|
|
@@ -5321,11 +5316,10 @@ const AppsSidebar = ({
|
|
|
5321
5316
|
trashMenu,
|
|
5322
5317
|
onInviteClick
|
|
5323
5318
|
}) => {
|
|
5324
|
-
const { isMobile: isMobile2 } = useMenu();
|
|
5325
5319
|
const { withoutToolbar: _withoutNavbar } = appContainerStore.useStore();
|
|
5326
5320
|
const hideSidebar = useQueryParam("embed");
|
|
5327
5321
|
const withoutNavbar = Boolean(hideSidebar || _withoutNavbar);
|
|
5328
|
-
if (withoutNavbar
|
|
5322
|
+
if (withoutNavbar) return null;
|
|
5329
5323
|
return /* @__PURE__ */ jsxs(Stack, { gap: 0, justify: "space-between", pt: 8, pb: 8, h: "100%", children: [
|
|
5330
5324
|
/* @__PURE__ */ jsx$1(TopSection, {}),
|
|
5331
5325
|
/* @__PURE__ */ jsx$1(AppsSection, {}),
|
|
@@ -35036,10 +35030,10 @@ const useDateUtils = () => {
|
|
|
35036
35030
|
const diffHours = differenceInHours(zonedNow, zonedDate);
|
|
35037
35031
|
const diffMinutes = differenceInMinutes(zonedNow, zonedDate);
|
|
35038
35032
|
const diffSeconds = differenceInSeconds(zonedNow, zonedDate);
|
|
35039
|
-
if (diffDays >= 1) return `${diffDays}
|
|
35040
|
-
if (diffHours >= 1) return `${diffHours}
|
|
35041
|
-
if (diffMinutes >= 1) return `${diffMinutes}
|
|
35042
|
-
if (diffSeconds >= 1) return `${diffSeconds}
|
|
35033
|
+
if (diffDays >= 1) return `${diffDays} day ago`;
|
|
35034
|
+
if (diffHours >= 1) return `${diffHours} hour ago`;
|
|
35035
|
+
if (diffMinutes >= 1) return `${diffMinutes} minute ago`;
|
|
35036
|
+
if (diffSeconds >= 1) return `${diffSeconds} second ago`;
|
|
35043
35037
|
return "just now";
|
|
35044
35038
|
};
|
|
35045
35039
|
const formatDateInTimezone = (date, formatStr = "yyyy-MM-dd HH:mm:ss") => {
|
|
@@ -65440,7 +65434,7 @@ const StatusesListBoard = () => {
|
|
|
65440
65434
|
}
|
|
65441
65435
|
) });
|
|
65442
65436
|
};
|
|
65443
|
-
const KanbanLayout = lazy(() => import("./KanbanLayout-
|
|
65437
|
+
const KanbanLayout = lazy(() => import("./KanbanLayout-CqLSzjCH.js"));
|
|
65444
65438
|
const DifferentLayoutsBoard = () => {
|
|
65445
65439
|
const { layoutView } = useOnboardingState();
|
|
65446
65440
|
switch (layoutView) {
|
|
@@ -74790,12 +74784,12 @@ const ThemeIndicator = ({
|
|
|
74790
74784
|
function CommentsPanel() {
|
|
74791
74785
|
return /* @__PURE__ */ jsx$1("div", {});
|
|
74792
74786
|
}
|
|
74793
|
-
const imagePreviewWrapper = "
|
|
74794
|
-
const deleteButton = "
|
|
74795
|
-
const downloadButton = "
|
|
74796
|
-
const filePreviewList = "
|
|
74797
|
-
const fileDownloadName = "
|
|
74798
|
-
const filePreviewWrapper = "
|
|
74787
|
+
const imagePreviewWrapper = "_imagePreviewWrapper_vwi1m_1";
|
|
74788
|
+
const deleteButton = "_deleteButton_vwi1m_8";
|
|
74789
|
+
const downloadButton = "_downloadButton_vwi1m_19";
|
|
74790
|
+
const filePreviewList = "_filePreviewList_vwi1m_31";
|
|
74791
|
+
const fileDownloadName = "_fileDownloadName_vwi1m_44";
|
|
74792
|
+
const filePreviewWrapper = "_filePreviewWrapper_vwi1m_50";
|
|
74799
74793
|
const styles$d = {
|
|
74800
74794
|
imagePreviewWrapper,
|
|
74801
74795
|
deleteButton,
|
|
@@ -74841,7 +74835,7 @@ const AttachmentsPreview = ({
|
|
|
74841
74835
|
};
|
|
74842
74836
|
if (files.length === 0) return null;
|
|
74843
74837
|
return /* @__PURE__ */ jsxs(Fragment$1, { children: [
|
|
74844
|
-
/* @__PURE__ */ jsxs(Stack, { gap: "10px", w: "100%",
|
|
74838
|
+
/* @__PURE__ */ jsxs(Stack, { gap: "10px", w: "100%", tabIndex: 0, children: [
|
|
74845
74839
|
imageFiles.length > 0 && /* @__PURE__ */ jsx$1(Grid, { gutter: "xs", children: imageFiles.map((file) => {
|
|
74846
74840
|
const realIndex = files.indexOf(file);
|
|
74847
74841
|
return /* @__PURE__ */ jsx$1(Grid.Col, { span: "content", children: /* @__PURE__ */ jsxs(
|
|
@@ -74964,11 +74958,17 @@ const AttachmentsPreview = ({
|
|
|
74964
74958
|
)
|
|
74965
74959
|
] });
|
|
74966
74960
|
};
|
|
74967
|
-
const commentComposerWrapper = "
|
|
74968
|
-
const commentComposerFloat = "
|
|
74961
|
+
const commentComposerWrapper = "_commentComposerWrapper_1j9ya_1";
|
|
74962
|
+
const commentComposerFloat = "_commentComposerFloat_1j9ya_60";
|
|
74963
|
+
const composerContainer = "_composerContainer_1j9ya_85";
|
|
74964
|
+
const editorWrapper = "_editorWrapper_1j9ya_96";
|
|
74965
|
+
const editMode = "_editMode_1j9ya_116";
|
|
74969
74966
|
const styles$c = {
|
|
74970
74967
|
commentComposerWrapper,
|
|
74971
|
-
commentComposerFloat
|
|
74968
|
+
commentComposerFloat,
|
|
74969
|
+
composerContainer,
|
|
74970
|
+
editorWrapper,
|
|
74971
|
+
editMode
|
|
74972
74972
|
};
|
|
74973
74973
|
const CommentEditorHandler = ({
|
|
74974
74974
|
children,
|
|
@@ -74988,6 +74988,8 @@ const CommentEditorHandler = ({
|
|
|
74988
74988
|
useEffect(() => {
|
|
74989
74989
|
const handleKeyDown2 = (event) => {
|
|
74990
74990
|
if (event.code === "Enter" && !event.shiftKey) {
|
|
74991
|
+
const isSubmitAllowed = isEdit ? hasChanges : !hasChanges;
|
|
74992
|
+
if (isSubmitAllowed) return;
|
|
74991
74993
|
if (containerRef.current && containerRef.current.contains(document.activeElement)) {
|
|
74992
74994
|
event.preventDefault();
|
|
74993
74995
|
onSubmit();
|
|
@@ -74996,7 +74998,7 @@ const CommentEditorHandler = ({
|
|
|
74996
74998
|
};
|
|
74997
74999
|
document.addEventListener("keydown", handleKeyDown2);
|
|
74998
75000
|
return () => document.removeEventListener("keydown", handleKeyDown2);
|
|
74999
|
-
}, [onSubmit]);
|
|
75001
|
+
}, [onSubmit, isEdit, hasChanges]);
|
|
75000
75002
|
useEffect(() => {
|
|
75001
75003
|
if (!autoFocus) return;
|
|
75002
75004
|
const editor = editorRef.current;
|
|
@@ -75037,7 +75039,9 @@ const CommentEditorHandler = ({
|
|
|
75037
75039
|
const root2 = inputContainerRef.current;
|
|
75038
75040
|
if (!root2) return;
|
|
75039
75041
|
if (root2.contains(target)) return;
|
|
75040
|
-
if (target.closest(".mantine-Modal-root"))
|
|
75042
|
+
if (target.closest(".mantine-Modal-root") || target.closest(".floating-text-format-popup") || target.closest('[data-test-id="floating-link-dropdown"]')) {
|
|
75043
|
+
return;
|
|
75044
|
+
}
|
|
75041
75045
|
if (isEdit) {
|
|
75042
75046
|
if (!hasChanges) {
|
|
75043
75047
|
event.stopPropagation();
|
|
@@ -75049,6 +75053,7 @@ const CommentEditorHandler = ({
|
|
|
75049
75053
|
confirm: t("composer.discardConfirm"),
|
|
75050
75054
|
cancel: t("composer.cancel")
|
|
75051
75055
|
},
|
|
75056
|
+
icon: null,
|
|
75052
75057
|
onConfirm: () => onBlur == null ? void 0 : onBlur()
|
|
75053
75058
|
});
|
|
75054
75059
|
return;
|
|
@@ -75068,6 +75073,7 @@ const CommentEditorHandler = ({
|
|
|
75068
75073
|
confirm: t("editor.composer.discardConfirm"),
|
|
75069
75074
|
cancel: t("editor.composer.cancel")
|
|
75070
75075
|
},
|
|
75076
|
+
icon: null,
|
|
75071
75077
|
onConfirm: () => onBlur == null ? void 0 : onBlur()
|
|
75072
75078
|
});
|
|
75073
75079
|
return;
|
|
@@ -75161,14 +75167,6 @@ const CommentComposer = ({
|
|
|
75161
75167
|
};
|
|
75162
75168
|
}, [isFloat, updateLocation, selectionRef]);
|
|
75163
75169
|
const { textChanged, newFiles, deletedFiles, hasChanges } = useMemo(() => {
|
|
75164
|
-
if (!isEdit) {
|
|
75165
|
-
return {
|
|
75166
|
-
textChanged: false,
|
|
75167
|
-
newFiles: [],
|
|
75168
|
-
deletedFiles: [],
|
|
75169
|
-
hasChanges: false
|
|
75170
|
-
};
|
|
75171
|
-
}
|
|
75172
75170
|
const initialFiles = (initialDraft == null ? void 0 : initialDraft.files) || [];
|
|
75173
75171
|
const currentFiles = state.files;
|
|
75174
75172
|
const textChanged2 = (initialDraft == null ? void 0 : initialDraft.text) !== commentDraft.text;
|
|
@@ -75179,7 +75177,7 @@ const CommentComposer = ({
|
|
|
75179
75177
|
).map((f2) => f2.id)
|
|
75180
75178
|
);
|
|
75181
75179
|
const deletedFiles2 = initialFiles.filter(isServerFile).filter((f2) => !currentIds.has(f2.id));
|
|
75182
|
-
const hasChanges2 = isEdit ? JSON.stringify(initialDraft) === JSON.stringify(state) :
|
|
75180
|
+
const hasChanges2 = isEdit ? JSON.stringify(initialDraft) === JSON.stringify(state) : commentDraft.text.trim().length > 0 || newFiles2.length > 0 || deletedFiles2.length > 0;
|
|
75183
75181
|
return {
|
|
75184
75182
|
textChanged: textChanged2,
|
|
75185
75183
|
newFiles: newFiles2,
|
|
@@ -75273,23 +75271,25 @@ const CommentComposer = ({
|
|
|
75273
75271
|
}
|
|
75274
75272
|
setCommentDraft({ text: "", files: [] }, true);
|
|
75275
75273
|
};
|
|
75276
|
-
return /* @__PURE__ */
|
|
75274
|
+
return /* @__PURE__ */ jsx$1(
|
|
75277
75275
|
Stack,
|
|
75278
75276
|
{
|
|
75279
75277
|
ref: boxRef,
|
|
75280
|
-
className:
|
|
75278
|
+
className: `
|
|
75279
|
+
${styles$c.commentComposerWrapper}
|
|
75280
|
+
${isFloat ? styles$c.commentComposerFloat : ""}
|
|
75281
|
+
${isEdit ? styles$c.editMode : ""}
|
|
75282
|
+
`,
|
|
75281
75283
|
p: isEdit ? 0 : "sm",
|
|
75282
|
-
children:
|
|
75283
|
-
|
|
75284
|
-
|
|
75285
|
-
|
|
75286
|
-
|
|
75287
|
-
|
|
75288
|
-
|
|
75289
|
-
|
|
75290
|
-
|
|
75291
|
-
},
|
|
75292
|
-
children: /* @__PURE__ */ jsx$1(
|
|
75284
|
+
children: /* @__PURE__ */ jsxs(
|
|
75285
|
+
"div",
|
|
75286
|
+
{
|
|
75287
|
+
className: styles$c.composerContainer,
|
|
75288
|
+
style: {
|
|
75289
|
+
["--placeholder-text"]: `"${placeholder}"`
|
|
75290
|
+
},
|
|
75291
|
+
children: [
|
|
75292
|
+
/* @__PURE__ */ jsx$1("div", { className: styles$c.editorWrapper, children: /* @__PURE__ */ jsx$1(
|
|
75293
75293
|
CommentEditorHandler,
|
|
75294
75294
|
{
|
|
75295
75295
|
onSubmit: handleSubmit,
|
|
@@ -75311,97 +75311,106 @@ const CommentComposer = ({
|
|
|
75311
75311
|
initialContent: (initialDraft == null ? void 0 : initialDraft.text) ?? ""
|
|
75312
75312
|
})
|
|
75313
75313
|
}
|
|
75314
|
-
)
|
|
75315
|
-
|
|
75316
|
-
|
|
75317
|
-
|
|
75318
|
-
|
|
75319
|
-
|
|
75320
|
-
|
|
75321
|
-
|
|
75322
|
-
|
|
75323
|
-
|
|
75324
|
-
|
|
75325
|
-
|
|
75326
|
-
|
|
75327
|
-
|
|
75328
|
-
|
|
75329
|
-
|
|
75330
|
-
|
|
75331
|
-
|
|
75332
|
-
|
|
75333
|
-
|
|
75334
|
-
|
|
75335
|
-
|
|
75336
|
-
|
|
75337
|
-
|
|
75338
|
-
|
|
75339
|
-
|
|
75340
|
-
|
|
75341
|
-
|
|
75342
|
-
|
|
75343
|
-
|
|
75344
|
-
|
|
75314
|
+
) }),
|
|
75315
|
+
/* @__PURE__ */ jsx$1(
|
|
75316
|
+
Box,
|
|
75317
|
+
{
|
|
75318
|
+
h: 10,
|
|
75319
|
+
"data-editor-spacer": true,
|
|
75320
|
+
tabIndex: 0,
|
|
75321
|
+
style: { width: "100%" }
|
|
75322
|
+
}
|
|
75323
|
+
),
|
|
75324
|
+
/* @__PURE__ */ jsx$1(
|
|
75325
|
+
AttachmentsPreview,
|
|
75326
|
+
{
|
|
75327
|
+
files: state.files,
|
|
75328
|
+
mode: "draft",
|
|
75329
|
+
onRemove: (i) => setState((prev2) => ({
|
|
75330
|
+
...prev2,
|
|
75331
|
+
files: prev2.files.filter((_2, idx) => idx !== i)
|
|
75332
|
+
}))
|
|
75333
|
+
}
|
|
75334
|
+
),
|
|
75335
|
+
/* @__PURE__ */ jsxs(
|
|
75336
|
+
Group,
|
|
75337
|
+
{
|
|
75338
|
+
justify: isEdit ? "space-between" : "flex-end",
|
|
75339
|
+
"data-comment-footer": true,
|
|
75340
|
+
align: "center",
|
|
75341
|
+
w: "unset",
|
|
75342
|
+
mt: !state.files.length ? 0 : "xs",
|
|
75343
|
+
tabIndex: 0,
|
|
75344
|
+
gap: "4px",
|
|
75345
|
+
children: [
|
|
75346
|
+
/* @__PURE__ */ jsx$1(
|
|
75347
|
+
FileButton,
|
|
75345
75348
|
{
|
|
75346
|
-
|
|
75347
|
-
|
|
75348
|
-
|
|
75349
|
-
|
|
75350
|
-
title: "Attach files",
|
|
75351
|
-
children: /* @__PURE__ */ jsx$1(
|
|
75352
|
-
HugeiconsIcon,
|
|
75349
|
+
onChange: (selected) => handleUploadCommentAttach(selected, setCommentDraft),
|
|
75350
|
+
multiple: true,
|
|
75351
|
+
children: (props) => /* @__PURE__ */ jsx$1(
|
|
75352
|
+
ActionIcon,
|
|
75353
75353
|
{
|
|
75354
|
-
|
|
75355
|
-
|
|
75356
|
-
size:
|
|
75354
|
+
...props,
|
|
75355
|
+
variant: "subtle",
|
|
75356
|
+
size: "lg",
|
|
75357
|
+
color: "gray",
|
|
75358
|
+
title: "Attach files",
|
|
75359
|
+
children: /* @__PURE__ */ jsx$1(
|
|
75360
|
+
HugeiconsIcon,
|
|
75361
|
+
{
|
|
75362
|
+
style: { transform: "rotate(35deg)" },
|
|
75363
|
+
icon: CC,
|
|
75364
|
+
size: 20
|
|
75365
|
+
}
|
|
75366
|
+
)
|
|
75357
75367
|
}
|
|
75358
75368
|
)
|
|
75359
75369
|
}
|
|
75360
|
-
)
|
|
75361
|
-
|
|
75362
|
-
|
|
75363
|
-
|
|
75364
|
-
|
|
75365
|
-
|
|
75366
|
-
|
|
75367
|
-
|
|
75368
|
-
|
|
75369
|
-
|
|
75370
|
-
|
|
75371
|
-
|
|
75372
|
-
|
|
75373
|
-
|
|
75374
|
-
|
|
75375
|
-
|
|
75376
|
-
|
|
75377
|
-
|
|
75378
|
-
|
|
75379
|
-
|
|
75380
|
-
|
|
75381
|
-
|
|
75382
|
-
|
|
75383
|
-
|
|
75384
|
-
|
|
75385
|
-
|
|
75386
|
-
|
|
75387
|
-
|
|
75388
|
-
|
|
75389
|
-
|
|
75390
|
-
|
|
75391
|
-
|
|
75392
|
-
|
|
75393
|
-
|
|
75394
|
-
|
|
75395
|
-
|
|
75396
|
-
|
|
75397
|
-
|
|
75398
|
-
|
|
75399
|
-
|
|
75400
|
-
|
|
75401
|
-
|
|
75402
|
-
|
|
75403
|
-
|
|
75404
|
-
]
|
|
75370
|
+
),
|
|
75371
|
+
!isEdit ? /* @__PURE__ */ jsx$1(
|
|
75372
|
+
ActionIcon,
|
|
75373
|
+
{
|
|
75374
|
+
color: "var(--mantine-primary-color-filled)",
|
|
75375
|
+
size: "lg",
|
|
75376
|
+
variant: "filled",
|
|
75377
|
+
onClick: handleSubmit,
|
|
75378
|
+
disabled: !commentDraft.text.trim() && commentDraft.files.length === 0,
|
|
75379
|
+
children: /* @__PURE__ */ jsx$1(HugeiconsIcon, { icon: U6, size: 20 })
|
|
75380
|
+
}
|
|
75381
|
+
) : /* @__PURE__ */ jsxs(Group, { gap: "8px", children: [
|
|
75382
|
+
/* @__PURE__ */ jsx$1(
|
|
75383
|
+
UnstyledButton,
|
|
75384
|
+
{
|
|
75385
|
+
onClick: handleCancel,
|
|
75386
|
+
"data-no-focus": true,
|
|
75387
|
+
style: {
|
|
75388
|
+
cursor: "pointer",
|
|
75389
|
+
padding: 0,
|
|
75390
|
+
margin: 0,
|
|
75391
|
+
background: "none",
|
|
75392
|
+
border: "none"
|
|
75393
|
+
},
|
|
75394
|
+
children: /* @__PURE__ */ jsx$1(Text$2, { size: "sm", c: "dimmed", children: t("composer.cancel") })
|
|
75395
|
+
}
|
|
75396
|
+
),
|
|
75397
|
+
/* @__PURE__ */ jsx$1(
|
|
75398
|
+
Button,
|
|
75399
|
+
{
|
|
75400
|
+
size: "xs",
|
|
75401
|
+
radius: "md",
|
|
75402
|
+
onClick: handleSubmit,
|
|
75403
|
+
disabled: isEdit ? hasChanges : !hasChanges,
|
|
75404
|
+
children: t("composer.save")
|
|
75405
|
+
}
|
|
75406
|
+
)
|
|
75407
|
+
] })
|
|
75408
|
+
]
|
|
75409
|
+
}
|
|
75410
|
+
)
|
|
75411
|
+
]
|
|
75412
|
+
}
|
|
75413
|
+
)
|
|
75405
75414
|
}
|
|
75406
75415
|
);
|
|
75407
75416
|
};
|
|
@@ -115650,6 +115659,14 @@ const openRemoveConfirmModal = (props) => {
|
|
|
115650
115659
|
onConfirm,
|
|
115651
115660
|
onClose,
|
|
115652
115661
|
labels,
|
|
115662
|
+
icon: icon2 = /* @__PURE__ */ jsx$1(
|
|
115663
|
+
HugeiconsIcon,
|
|
115664
|
+
{
|
|
115665
|
+
size: 20,
|
|
115666
|
+
icon: oI,
|
|
115667
|
+
color: "var(--mantine-color-red-filled)"
|
|
115668
|
+
}
|
|
115669
|
+
),
|
|
115653
115670
|
closeOnConfirm = true,
|
|
115654
115671
|
...otherProps
|
|
115655
115672
|
} = props;
|
|
@@ -115681,11 +115698,8 @@ const openRemoveConfirmModal = (props) => {
|
|
|
115681
115698
|
}
|
|
115682
115699
|
},
|
|
115683
115700
|
children: /* @__PURE__ */ jsxs(Stack, { gap: "xs", align: "center", mb: 0, children: [
|
|
115684
|
-
|
|
115685
|
-
/* @__PURE__ */
|
|
115686
|
-
"Delete: ",
|
|
115687
|
-
title
|
|
115688
|
-
] }),
|
|
115701
|
+
icon2 && icon2,
|
|
115702
|
+
/* @__PURE__ */ jsx$1(Text$2, { size: "sm", fw: "600", children: title }),
|
|
115689
115703
|
/* @__PURE__ */ jsx$1(Text$2, { size: "sm", c: "gray", children })
|
|
115690
115704
|
] }),
|
|
115691
115705
|
onConfirm,
|