@edifice.io/react 2.0.5-develop.20250127164045 → 2.0.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/Attachment/Attachment.js +1 -1
- package/dist/components/Button/Button.js +1 -1
- package/dist/components/Layout/components/Header.js +3 -4
- package/dist/components/Modal/Modal.js +1 -1
- package/dist/hooks/useDropzone/useDropzone.js +1 -1
- package/dist/hooks/useTrapFocus/useTrapFocus.d.ts +1 -1
- package/dist/hooks/useTrapFocus/useTrapFocus.js +2 -3
- package/dist/modules/comments/components/Comment.js +7 -10
- package/dist/modules/comments/context/Context.d.ts +0 -2
- package/dist/modules/comments/hooks/useComments.d.ts +1 -1
- package/dist/modules/comments/hooks/useComments.js +1 -1
- package/dist/modules/comments/hooks/useCommentsContext.d.ts +0 -1
- package/dist/modules/comments/provider/CommentProvider.js +1 -2
- package/dist/modules/comments/types.d.ts +1 -5
- package/dist/modules/editor/components/Renderer/AttachmentRenderer.js +7 -12
- package/dist/modules/editor/components/Renderer/AudioRenderer.js +1 -4
- package/dist/modules/editor/hooks/useCommentEditor.d.ts +1 -1
- package/dist/modules/editor/hooks/useTipTapEditor.d.ts +1 -1
- package/dist/modules/editor/hooks/useTipTapEditor.js +1 -1
- package/package.json +30 -30
- package/dist/modules/comments/components/DeleteModal.d.ts +0 -7
- package/dist/modules/comments/components/DeleteModal.js +0 -19
|
@@ -6,7 +6,7 @@ const Attachment = /* @__PURE__ */ forwardRef(({
|
|
|
6
6
|
name = "Attachment Name",
|
|
7
7
|
options,
|
|
8
8
|
...restProps
|
|
9
|
-
}, ref) => /* @__PURE__ */ jsxs("div", { ref, className: "attachment px-12 py-8", ...restProps,
|
|
9
|
+
}, ref) => /* @__PURE__ */ jsxs("div", { ref, className: "attachment px-12 py-8", ...restProps, children: [
|
|
10
10
|
/* @__PURE__ */ jsxs(Tooltip, { message: name, className: "filename text-truncate d-flex align-items-center gap-8", children: [
|
|
11
11
|
/* @__PURE__ */ jsx(SvgIconPaperclip, { height: 22, width: 22 }),
|
|
12
12
|
/* @__PURE__ */ jsx("div", { className: "filename text-truncate", children: name })
|
|
@@ -24,7 +24,7 @@ const Button = /* @__PURE__ */ forwardRef(({
|
|
|
24
24
|
"btn-lg": size === "lg",
|
|
25
25
|
"btn-sm": size === "sm"
|
|
26
26
|
}, className);
|
|
27
|
-
return /* @__PURE__ */ jsx("button", { ref,
|
|
27
|
+
return /* @__PURE__ */ jsx("button", { ref, className: classes, type, ...restProps, "data-testid": "button", children: isLoading ? /* @__PURE__ */ jsx(Loading, { isLoading: !0, loadingIcon, loadingPosition, children }) : /* @__PURE__ */ jsxs("span", { children: [
|
|
28
28
|
leftIcon,
|
|
29
29
|
children,
|
|
30
30
|
rightIcon
|
|
@@ -4,14 +4,13 @@ import { useTranslation } from "react-i18next";
|
|
|
4
4
|
import { useEdificeClient } from "../../../providers/EdificeClientProvider/EdificeClientProvider.hook.js";
|
|
5
5
|
import { useEdificeTheme } from "../../../providers/EdificeThemeProvider/EdificeThemeProvider.hook.js";
|
|
6
6
|
import SvgIconRafterDown from "../../../modules/icons/components/IconRafterDown.js";
|
|
7
|
+
import SvgIconAssistance from "../../../modules/icons/components/apps/IconAssistance.js";
|
|
7
8
|
import SvgIconCommunity from "../../../modules/icons/components/nav/IconCommunity.js";
|
|
8
9
|
import SvgIconDisconnect from "../../../modules/icons/components/nav/IconDisconnect.js";
|
|
9
10
|
import SvgIconHome from "../../../modules/icons/components/nav/IconHome.js";
|
|
10
11
|
import SvgIconMyApps from "../../../modules/icons/components/nav/IconMyApps.js";
|
|
11
|
-
import SvgIconNeoAssistance from "../../../modules/icons/components/nav/IconNeoAssistance.js";
|
|
12
12
|
import SvgIconNeoMessaging from "../../../modules/icons/components/nav/IconNeoMessaging.js";
|
|
13
13
|
import SvgIconNewRelease from "../../../modules/icons/components/nav/IconNewRelease.js";
|
|
14
|
-
import SvgIconOneAssistance from "../../../modules/icons/components/nav/IconOneAssistance.js";
|
|
15
14
|
import SvgIconOneMessaging from "../../../modules/icons/components/nav/IconOneMessaging.js";
|
|
16
15
|
import SvgIconOneProfile from "../../../modules/icons/components/nav/IconOneProfile.js";
|
|
17
16
|
import SvgIconUserbook from "../../../modules/icons/components/nav/IconUserbook.js";
|
|
@@ -99,7 +98,7 @@ const Header = ({
|
|
|
99
98
|
/* @__PURE__ */ jsxs("button", { className: "nav-link", onClick: () => {
|
|
100
99
|
setIsHelpOpen(!0);
|
|
101
100
|
}, children: [
|
|
102
|
-
/* @__PURE__ */ jsx(
|
|
101
|
+
/* @__PURE__ */ jsx(SvgIconAssistance, { className: "icon help" }),
|
|
103
102
|
/* @__PURE__ */ jsx(VisuallyHidden, { children: t("navbar.help") })
|
|
104
103
|
] }),
|
|
105
104
|
/* @__PURE__ */ jsx(Help, { isHelpOpen, setIsHelpOpen, parsedContent, parsedHeadline, error })
|
|
@@ -158,7 +157,7 @@ const Header = ({
|
|
|
158
157
|
/* @__PURE__ */ jsxs("button", { className: "nav-link btn btn-naked", onClick: () => {
|
|
159
158
|
setIsHelpOpen(!0);
|
|
160
159
|
}, children: [
|
|
161
|
-
/* @__PURE__ */ jsx(
|
|
160
|
+
/* @__PURE__ */ jsx(SvgIconAssistance, { color: "#fff" }),
|
|
162
161
|
/* @__PURE__ */ jsx(VisuallyHidden, { children: t("support") })
|
|
163
162
|
] }),
|
|
164
163
|
/* @__PURE__ */ jsx(Help, { isHelpOpen, setIsHelpOpen, parsedContent, parsedHeadline, error })
|
|
@@ -20,7 +20,7 @@ const Root = /* @__PURE__ */ forwardRef((props, ref) => {
|
|
|
20
20
|
scrollable = !1,
|
|
21
21
|
focusId,
|
|
22
22
|
children
|
|
23
|
-
} = props, ariaLabelId = `aria_label_${id}`, ariaDescriptionId = `aria_desc_${id}`, modalRef = useClickOutside(onModalClose), trapRef = useTrapFocus(
|
|
23
|
+
} = props, ariaLabelId = `aria_label_${id}`, ariaDescriptionId = `aria_desc_${id}`, modalRef = useClickOutside(onModalClose), trapRef = useTrapFocus();
|
|
24
24
|
useKeyPress(onModalClose, ["Escape"]), useEffect(() => {
|
|
25
25
|
if (isOpen && (document.body.style.overflow = "hidden", focusId)) {
|
|
26
26
|
const elem = document.getElementById(focusId);
|
|
@@ -30,7 +30,7 @@ const useDropzone = (props) => {
|
|
|
30
30
|
type: file.type
|
|
31
31
|
})
|
|
32
32
|
));
|
|
33
|
-
|
|
33
|
+
props != null && props.forceFilters ? (filesToAdd = applyInputFiltersOn(filesToAdd), filesToAdd && filesToAdd.length && setFiles((prevFiles) => [...prevFiles, ...filesToAdd])) : setFiles((prevFiles) => [...prevFiles, ...files2]);
|
|
34
34
|
}, cleanFiles = () => {
|
|
35
35
|
setFiles([]);
|
|
36
36
|
}, handleOnChange = (event) => {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export default function useTrapFocus(
|
|
1
|
+
export default function useTrapFocus(): import('react').MutableRefObject<HTMLElement | null>;
|
|
@@ -1,8 +1,7 @@
|
|
|
1
1
|
import { useRef, useEffect } from "react";
|
|
2
|
-
function useTrapFocus(
|
|
2
|
+
function useTrapFocus() {
|
|
3
3
|
const ref = useRef(null), focusableElements = 'button:not([disabled]), [href], input, select, textarea, [tabindex]:not([tabindex="-1"])';
|
|
4
4
|
return useEffect(() => {
|
|
5
|
-
if (!isActive) return;
|
|
6
5
|
const node = ref.current, firstFocusableElement = node.querySelectorAll(focusableElements)[0], focusableContent = node.querySelectorAll(focusableElements), lastFocusableElement = ref && (focusableContent == null ? void 0 : focusableContent[focusableContent.length - 1]), handleKeydown = (event) => {
|
|
7
6
|
event.key === "Tab" && (event.shiftKey ? document.activeElement === firstFocusableElement && (lastFocusableElement.focus(), event.preventDefault()) : document.activeElement === lastFocusableElement && (firstFocusableElement.focus(), event.preventDefault()));
|
|
8
7
|
};
|
|
@@ -10,7 +9,7 @@ function useTrapFocus(isActive) {
|
|
|
10
9
|
return node.addEventListener("keydown", handleKeydown), () => {
|
|
11
10
|
node.removeEventListener("keydown", handleKeydown);
|
|
12
11
|
};
|
|
13
|
-
}, [
|
|
12
|
+
}, []), ref;
|
|
14
13
|
}
|
|
15
14
|
export {
|
|
16
15
|
useTrapFocus as default
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { jsxs, jsx, Fragment } from "react/jsx-runtime";
|
|
2
|
-
import { useState
|
|
2
|
+
import { useState } from "react";
|
|
3
3
|
import { useTranslation } from "react-i18next";
|
|
4
4
|
import SvgIconSave from "../../icons/components/IconSave.js";
|
|
5
5
|
import { useAutosizeTextarea } from "../hooks/useAutosizeTextarea.js";
|
|
@@ -10,8 +10,7 @@ import { CommentDate } from "./CommentDate.js";
|
|
|
10
10
|
import { CommentTitle } from "./CommentTitle.js";
|
|
11
11
|
import { TextCounter } from "./TextCounter.js";
|
|
12
12
|
import Button from "../../../components/Button/Button.js";
|
|
13
|
-
|
|
14
|
-
const DeleteModal = /* @__PURE__ */ lazy(() => import("./DeleteModal.js")), Comment = ({
|
|
13
|
+
const Comment = ({
|
|
15
14
|
comment,
|
|
16
15
|
userId,
|
|
17
16
|
profile
|
|
@@ -23,13 +22,12 @@ const DeleteModal = /* @__PURE__ */ lazy(() => import("./DeleteModal.js")), Comm
|
|
|
23
22
|
createdAt,
|
|
24
23
|
updatedAt,
|
|
25
24
|
comment: content
|
|
26
|
-
} = comment, [ref, onFocus, resizeTextarea] = useAutosizeTextarea(!0),
|
|
25
|
+
} = comment, [ref, onFocus, resizeTextarea] = useAutosizeTextarea(!0), {
|
|
27
26
|
t
|
|
28
27
|
} = useTranslation(), {
|
|
29
28
|
editCommentId,
|
|
30
29
|
options,
|
|
31
30
|
type,
|
|
32
|
-
userRights,
|
|
33
31
|
handleDeleteComment: onDeleteComment,
|
|
34
32
|
handleModifyComment,
|
|
35
33
|
handleReset,
|
|
@@ -59,15 +57,14 @@ const DeleteModal = /* @__PURE__ */ lazy(() => import("./DeleteModal.js")), Comm
|
|
|
59
57
|
] })
|
|
60
58
|
] }) : /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
61
59
|
/* @__PURE__ */ jsx("div", { className: "mt-8 mb-4", children: content }),
|
|
62
|
-
type === "edit" && /* @__PURE__ */ jsxs("div", { className: "ms-n8", children: [
|
|
63
|
-
|
|
60
|
+
userId === authorId && type === "edit" && /* @__PURE__ */ jsxs("div", { className: "ms-n8", children: [
|
|
61
|
+
/* @__PURE__ */ jsx(Button, { variant: "ghost", color: "tertiary", size: "sm", onClick: () => {
|
|
64
62
|
handleModifyComment(comment.id), setValue(content);
|
|
65
63
|
}, children: t("comment.edit") }),
|
|
66
|
-
|
|
64
|
+
/* @__PURE__ */ jsx(Button, { variant: "ghost", color: "tertiary", size: "sm", onClick: () => onDeleteComment(id), children: t("comment.remove") })
|
|
67
65
|
] })
|
|
68
66
|
] })
|
|
69
|
-
] })
|
|
70
|
-
/* @__PURE__ */ jsx(Suspense, { fallback: /* @__PURE__ */ jsx(LoadingScreen, { position: !1 }), children: isDeleteModalOpen && /* @__PURE__ */ jsx(DeleteModal, { isOpen: isDeleteModalOpen, onCancel: () => setIsDeleteModalOpen(!1), onSuccess: () => onDeleteComment(id) }) })
|
|
67
|
+
] })
|
|
71
68
|
] }, id);
|
|
72
69
|
};
|
|
73
70
|
export {
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import { RightRole } from '@edifice.io/client';
|
|
2
1
|
import { CommentOptions, CommentProps, CommentType, UserProfileResult } from '../types';
|
|
3
2
|
export declare const CommentContext: import('react').Context<{
|
|
4
3
|
comments: CommentProps[] | undefined;
|
|
@@ -7,7 +6,6 @@ export declare const CommentContext: import('react').Context<{
|
|
|
7
6
|
profiles: (UserProfileResult | undefined)[];
|
|
8
7
|
options: Partial<CommentOptions>;
|
|
9
8
|
type: CommentType;
|
|
10
|
-
userRights?: Record<RightRole, boolean>;
|
|
11
9
|
setEditCommentId: (value: string | null) => void;
|
|
12
10
|
handleModifyComment: (commentId: string) => void;
|
|
13
11
|
handleChangeContent: (event: React.ChangeEvent<HTMLTextAreaElement>) => void;
|
|
@@ -27,6 +27,6 @@ export declare const useComments: ({ defaultComments, options, type, callbacks,
|
|
|
27
27
|
handleDeleteComment: (id: string) => void;
|
|
28
28
|
handleCreateComment: (content: string) => void;
|
|
29
29
|
handleModifyComment: (commentId: string) => void;
|
|
30
|
-
handleUpdateComment: (comment: string) =>
|
|
30
|
+
handleUpdateComment: (comment: string) => void;
|
|
31
31
|
handleReset: () => void;
|
|
32
32
|
};
|
|
@@ -50,7 +50,7 @@ const useComments = ({
|
|
|
50
50
|
handleModifyComment: (commentId) => {
|
|
51
51
|
setEditCommentId(commentId);
|
|
52
52
|
},
|
|
53
|
-
handleUpdateComment:
|
|
53
|
+
handleUpdateComment: (comment) => {
|
|
54
54
|
editCommentId && (type === "edit" && (callbacks == null || callbacks.put({
|
|
55
55
|
comment,
|
|
56
56
|
commentId: editCommentId
|
|
@@ -5,7 +5,6 @@ export declare const useCommentsContext: () => {
|
|
|
5
5
|
profiles: (import('../types').UserProfileResult | undefined)[];
|
|
6
6
|
options: Partial<import('../types').CommentOptions>;
|
|
7
7
|
type: import('../types').CommentType;
|
|
8
|
-
userRights?: Record<import('@edifice.io/client').RightRole, boolean>;
|
|
9
8
|
setEditCommentId: (value: string | null) => void;
|
|
10
9
|
handleModifyComment: (commentId: string) => void;
|
|
11
10
|
handleChangeContent: (event: React.ChangeEvent<HTMLTextAreaElement>) => void;
|
|
@@ -46,7 +46,7 @@ const CommentProvider = ({
|
|
|
46
46
|
defaultComments,
|
|
47
47
|
callbacks: type == "edit" ? props.callbacks : null,
|
|
48
48
|
options
|
|
49
|
-
}),
|
|
49
|
+
}), values = useMemo(
|
|
50
50
|
() => ({
|
|
51
51
|
comments,
|
|
52
52
|
content,
|
|
@@ -54,7 +54,6 @@ const CommentProvider = ({
|
|
|
54
54
|
editCommentId,
|
|
55
55
|
options,
|
|
56
56
|
type,
|
|
57
|
-
userRights,
|
|
58
57
|
setEditCommentId,
|
|
59
58
|
handleCreateComment,
|
|
60
59
|
handleModifyComment,
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { UserProfile } from '@edifice.io/client';
|
|
2
2
|
export interface CommentProps {
|
|
3
3
|
/**
|
|
4
4
|
* Comment Id
|
|
@@ -61,10 +61,6 @@ interface EditRootProps extends BaseProps {
|
|
|
61
61
|
* Callbacks to perform CRUD on comment
|
|
62
62
|
*/
|
|
63
63
|
callbacks: CommentCallbacks;
|
|
64
|
-
/**
|
|
65
|
-
* Rights to perform CRUD on comment
|
|
66
|
-
*/
|
|
67
|
-
rights?: Record<RightRole, boolean>;
|
|
68
64
|
}
|
|
69
65
|
interface ReadRootProps extends BaseProps {
|
|
70
66
|
type: 'read';
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { jsx, jsxs, Fragment } from "react/jsx-runtime";
|
|
2
|
-
import { useState
|
|
2
|
+
import { useState } from "react";
|
|
3
3
|
import { NodeViewWrapper } from "@tiptap/react";
|
|
4
4
|
import { useTranslation } from "react-i18next";
|
|
5
5
|
import SvgIconDelete from "../../../icons/components/IconDelete.js";
|
|
@@ -10,20 +10,15 @@ import { useEditorContext } from "../../hooks/useEditorContext.js";
|
|
|
10
10
|
import { Grid } from "../../../../components/Grid/Grid.js";
|
|
11
11
|
const AttachmentRenderer = (props) => {
|
|
12
12
|
const {
|
|
13
|
-
node,
|
|
14
|
-
editor
|
|
15
|
-
} = props, [attachmentArrayAttrs, setAttachmentArrayAttrs] = useState(node.attrs.links), {
|
|
16
13
|
t
|
|
17
14
|
} = useTranslation(), {
|
|
15
|
+
node
|
|
16
|
+
} = props, {
|
|
18
17
|
editable
|
|
19
|
-
} = useEditorContext()
|
|
20
|
-
|
|
21
|
-
attachmentArrayAttrs !== node.attrs.links && setAttachmentArrayAttrs(node.attrs.links);
|
|
22
|
-
}, [node.attrs.links, attachmentArrayAttrs]);
|
|
23
|
-
const handleDelete = (index, documentId) => {
|
|
24
|
-
editor.commands.unsetAttachment(documentId), setAttachmentArrayAttrs((oldAttachments) => oldAttachments.filter((_, i) => i !== index));
|
|
18
|
+
} = useEditorContext(), [attachmentArrayAttrs, setAttachmentArrayAttrs] = useState(node.attrs.links), handleDelete = (index) => {
|
|
19
|
+
setAttachmentArrayAttrs((oldAttachments) => oldAttachments.filter((_, i) => i !== index));
|
|
25
20
|
};
|
|
26
|
-
return
|
|
21
|
+
return attachmentArrayAttrs.length !== 0 && /* @__PURE__ */ jsx(NodeViewWrapper, { children: /* @__PURE__ */ jsxs("div", { style: {
|
|
27
22
|
backgroundColor: "#F2F2F2",
|
|
28
23
|
borderRadius: ".8rem",
|
|
29
24
|
padding: "1.2rem"
|
|
@@ -31,7 +26,7 @@ const AttachmentRenderer = (props) => {
|
|
|
31
26
|
/* @__PURE__ */ jsx("p", { className: "m-12 mt-0", children: t("tiptap.attachments.bloc") }),
|
|
32
27
|
/* @__PURE__ */ jsx(Grid, { children: attachmentArrayAttrs == null ? void 0 : attachmentArrayAttrs.map((attachment, index) => /* @__PURE__ */ jsx(Grid.Col, { sm: "6", children: /* @__PURE__ */ jsx(Attachment, { name: attachment.name, options: /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
33
28
|
/* @__PURE__ */ jsx("a", { href: attachment.href, download: !0, children: /* @__PURE__ */ jsx(IconButton, { "aria-label": t("tiptap.attachments.download"), color: "tertiary", type: "button", icon: /* @__PURE__ */ jsx(SvgIconDownload, {}), variant: "ghost" }) }),
|
|
34
|
-
editable && /* @__PURE__ */ jsx(IconButton, { "aria-label": t("tiptap.attachments.delete"), color: "danger", type: "button", icon: /* @__PURE__ */ jsx(SvgIconDelete, {}), variant: "ghost", onClick: () => handleDelete(index
|
|
29
|
+
editable && /* @__PURE__ */ jsx(IconButton, { "aria-label": t("tiptap.attachments.delete"), color: "danger", type: "button", icon: /* @__PURE__ */ jsx(SvgIconDelete, {}), variant: "ghost", onClick: () => handleDelete(index) })
|
|
35
30
|
] }) }) }, index)) })
|
|
36
31
|
] }) });
|
|
37
32
|
};
|
|
@@ -4,10 +4,7 @@ const AudioRenderer = (props) => {
|
|
|
4
4
|
const {
|
|
5
5
|
node
|
|
6
6
|
} = props;
|
|
7
|
-
return /* @__PURE__ */ jsx(NodeViewWrapper, {
|
|
8
|
-
display: "inline-block",
|
|
9
|
-
width: "fit-content"
|
|
10
|
-
}, children: /* @__PURE__ */ jsx("div", { className: "audio-wrapper", "data-drag-handle": !0, children: /* @__PURE__ */ jsx("audio", { src: node.attrs.src, controls: !0, "data-document-id": node.attrs.src, children: /* @__PURE__ */ jsx("track", { kind: "captions" }) }) }) });
|
|
7
|
+
return /* @__PURE__ */ jsx(NodeViewWrapper, { children: /* @__PURE__ */ jsx("div", { className: "audio-wrapper", children: /* @__PURE__ */ jsx("audio", { src: node.attrs.src, controls: !0, "data-document-id": node.attrs.src, children: /* @__PURE__ */ jsx("track", { kind: "captions" }) }) }) });
|
|
11
8
|
};
|
|
12
9
|
export {
|
|
13
10
|
AudioRenderer as default
|
|
@@ -6,7 +6,7 @@ import { Content, HTMLContent } from '@tiptap/react';
|
|
|
6
6
|
* @param content default rich content
|
|
7
7
|
*/
|
|
8
8
|
export declare const useCommentEditor: (editable: boolean, content: Content, maxLength?: number) => {
|
|
9
|
-
editor: import('@tiptap/
|
|
9
|
+
editor: import('@tiptap/react').Editor | null;
|
|
10
10
|
commentLength: number;
|
|
11
11
|
getComment: () => HTMLContent;
|
|
12
12
|
resetComment: () => void;
|
|
@@ -11,6 +11,6 @@ import { WorkspaceVisibility } from '@edifice.io/client';
|
|
|
11
11
|
export declare const useTipTapEditor: (editable: boolean, content: Content, focus?: FocusPosition, placeholder?: string, onContentChange?: ({ editor }: {
|
|
12
12
|
editor: any;
|
|
13
13
|
}) => void, visibility?: WorkspaceVisibility) => {
|
|
14
|
-
editor: import('@tiptap/
|
|
14
|
+
editor: import('@tiptap/react').Editor | null;
|
|
15
15
|
editable: boolean;
|
|
16
16
|
};
|
|
@@ -58,7 +58,7 @@ const useTipTapEditor = (editable, content, focus, placeholder, onContentChange,
|
|
|
58
58
|
}), Underline, TextStyle, Color, Subscript, Superscript, Table.configure({
|
|
59
59
|
resizable: !0
|
|
60
60
|
}), TableRow, TableHeader, TableCell, TextAlign.configure({
|
|
61
|
-
types: ["heading", "paragraph", "video"]
|
|
61
|
+
types: ["heading", "paragraph", "custom-image", "video"]
|
|
62
62
|
}), CustomHeading.configure({
|
|
63
63
|
levels: [1, 2]
|
|
64
64
|
}), Typography, FontSize, SpeechRecognition, SpeechSynthesis.configure({
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@edifice.io/react",
|
|
3
|
-
"version": "2.0.5
|
|
3
|
+
"version": "2.0.5",
|
|
4
4
|
"description": "Edifice React Library",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"react",
|
|
@@ -80,30 +80,30 @@
|
|
|
80
80
|
"@pixi/mixin-get-child-by-name": "7.4.2",
|
|
81
81
|
"@pixi/react": "7.1.2",
|
|
82
82
|
"@popperjs/core": "2.11.8",
|
|
83
|
-
"@tiptap/core": "2.
|
|
84
|
-
"@tiptap/extension-character-count": "2.
|
|
85
|
-
"@tiptap/extension-color": "2.
|
|
86
|
-
"@tiptap/extension-focus": "2.
|
|
87
|
-
"@tiptap/extension-font-family": "2.
|
|
88
|
-
"@tiptap/extension-heading": "2.
|
|
89
|
-
"@tiptap/extension-highlight": "2.
|
|
90
|
-
"@tiptap/extension-image": "2.
|
|
91
|
-
"@tiptap/extension-link": "2.
|
|
92
|
-
"@tiptap/extension-list-item": "2.
|
|
93
|
-
"@tiptap/extension-placeholder": "2.
|
|
94
|
-
"@tiptap/extension-subscript": "2.
|
|
95
|
-
"@tiptap/extension-superscript": "2.
|
|
96
|
-
"@tiptap/extension-table": "2.
|
|
97
|
-
"@tiptap/extension-table-cell": "2.
|
|
98
|
-
"@tiptap/extension-table-header": "2.
|
|
99
|
-
"@tiptap/extension-table-row": "2.
|
|
100
|
-
"@tiptap/extension-text-align": "2.
|
|
101
|
-
"@tiptap/extension-text-style": "2.
|
|
102
|
-
"@tiptap/extension-typography": "2.
|
|
103
|
-
"@tiptap/extension-underline": "2.
|
|
104
|
-
"@tiptap/pm": "2.
|
|
105
|
-
"@tiptap/react": "2.
|
|
106
|
-
"@tiptap/starter-kit": "2.
|
|
83
|
+
"@tiptap/core": "2.3.0",
|
|
84
|
+
"@tiptap/extension-character-count": "2.3.0",
|
|
85
|
+
"@tiptap/extension-color": "2.3.0",
|
|
86
|
+
"@tiptap/extension-focus": "2.3.0",
|
|
87
|
+
"@tiptap/extension-font-family": "2.3.0",
|
|
88
|
+
"@tiptap/extension-heading": "2.3.0",
|
|
89
|
+
"@tiptap/extension-highlight": "2.3.0",
|
|
90
|
+
"@tiptap/extension-image": "2.3.0",
|
|
91
|
+
"@tiptap/extension-link": "2.3.0",
|
|
92
|
+
"@tiptap/extension-list-item": "2.3.0",
|
|
93
|
+
"@tiptap/extension-placeholder": "2.3.0",
|
|
94
|
+
"@tiptap/extension-subscript": "2.3.0",
|
|
95
|
+
"@tiptap/extension-superscript": "2.3.0",
|
|
96
|
+
"@tiptap/extension-table": "2.3.0",
|
|
97
|
+
"@tiptap/extension-table-cell": "2.3.0",
|
|
98
|
+
"@tiptap/extension-table-header": "2.3.0",
|
|
99
|
+
"@tiptap/extension-table-row": "2.3.0",
|
|
100
|
+
"@tiptap/extension-text-align": "2.3.0",
|
|
101
|
+
"@tiptap/extension-text-style": "2.3.0",
|
|
102
|
+
"@tiptap/extension-typography": "2.3.0",
|
|
103
|
+
"@tiptap/extension-underline": "2.3.0",
|
|
104
|
+
"@tiptap/pm": "2.3.0",
|
|
105
|
+
"@tiptap/react": "2.3.0",
|
|
106
|
+
"@tiptap/starter-kit": "2.3.0",
|
|
107
107
|
"@uidotdev/usehooks": "^2.4.1",
|
|
108
108
|
"clsx": "^2.1.1",
|
|
109
109
|
"dayjs": "1.11.10",
|
|
@@ -118,9 +118,9 @@
|
|
|
118
118
|
"react-slugify": "^3.0.3",
|
|
119
119
|
"swiper": "^10.1.0",
|
|
120
120
|
"ua-parser-js": "^1.0.36",
|
|
121
|
-
"@edifice.io/bootstrap": "2.0.5
|
|
122
|
-
"@edifice.io/tiptap-extensions": "2.0.5
|
|
123
|
-
"@edifice.io/utilities": "2.0.5
|
|
121
|
+
"@edifice.io/bootstrap": "2.0.5",
|
|
122
|
+
"@edifice.io/tiptap-extensions": "2.0.5",
|
|
123
|
+
"@edifice.io/utilities": "2.0.5"
|
|
124
124
|
},
|
|
125
125
|
"devDependencies": {
|
|
126
126
|
"@babel/plugin-transform-react-pure-annotations": "^7.23.3",
|
|
@@ -148,8 +148,8 @@
|
|
|
148
148
|
"vite": "^5.4.11",
|
|
149
149
|
"vite-plugin-dts": "^4.1.0",
|
|
150
150
|
"vite-tsconfig-paths": "^5.0.1",
|
|
151
|
-
"@edifice.io/client": "2.0.5
|
|
152
|
-
"@edifice.io/config": "2.0.5
|
|
151
|
+
"@edifice.io/client": "2.0.5",
|
|
152
|
+
"@edifice.io/config": "2.0.5"
|
|
153
153
|
},
|
|
154
154
|
"peerDependencies": {
|
|
155
155
|
"@react-spring/web": "^9.7.5",
|
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
import { jsxs, jsx } from "react/jsx-runtime";
|
|
2
|
-
import Modal from "../../../components/Modal/Modal.js";
|
|
3
|
-
import Button from "../../../components/Button/Button.js";
|
|
4
|
-
const DeleteModal = ({
|
|
5
|
-
isOpen,
|
|
6
|
-
onCancel,
|
|
7
|
-
onSuccess
|
|
8
|
-
}) => /* @__PURE__ */ jsxs(Modal, { isOpen, onModalClose: onCancel, id: "delete-comment-modal", children: [
|
|
9
|
-
/* @__PURE__ */ jsx(Modal.Header, { onModalClose: onCancel, children: "Suppression de commentaire" }),
|
|
10
|
-
/* @__PURE__ */ jsx(Modal.Body, { children: /* @__PURE__ */ jsx("p", { children: "Voulez-vous vraiment supprimer ce commentaire ?" }) }),
|
|
11
|
-
/* @__PURE__ */ jsxs(Modal.Footer, { children: [
|
|
12
|
-
/* @__PURE__ */ jsx(Button, { color: "tertiary", onClick: onCancel, type: "button", variant: "ghost", children: "Annuler" }),
|
|
13
|
-
/* @__PURE__ */ jsx(Button, { color: "danger", onClick: onSuccess, type: "button", variant: "filled", children: "Supprimer le commentaire" })
|
|
14
|
-
] })
|
|
15
|
-
] });
|
|
16
|
-
export {
|
|
17
|
-
DeleteModal,
|
|
18
|
-
DeleteModal as default
|
|
19
|
-
};
|