@edifice.io/react 2.2.2-develop-b2school.20250408144842 → 2.2.2-develop-pedago.20250409103005
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/Avatar/Avatar.d.ts +21 -0
- package/dist/components/Avatar/Avatar.js +15 -2
- package/dist/components/AvatarGroup/AvatarGroup.d.ts +24 -0
- package/dist/components/AvatarGroup/AvatarGroup.js +24 -0
- package/dist/components/AvatarGroup/index.d.ts +2 -0
- package/dist/components/Card/Card.d.ts +3 -1
- package/dist/components/Card/CardBody.d.ts +3 -1
- package/dist/components/Card/CardBody.js +4 -2
- package/dist/components/Combobox/Combobox.d.ts +5 -55
- package/dist/components/Combobox/Combobox.js +7 -13
- package/dist/components/Combobox/ComboboxTrigger.d.ts +2 -30
- package/dist/components/Combobox/ComboboxTrigger.js +8 -28
- package/dist/components/Dropdown/Dropdown.d.ts +6 -6
- package/dist/components/Dropdown/Dropdown.js +5 -4
- package/dist/components/Dropdown/DropdownItem.d.ts +3 -3
- package/dist/components/Dropdown/DropdownItem.js +8 -6
- package/dist/components/Dropdown/DropdownTrigger.d.ts +31 -2
- package/dist/components/Dropdown/DropdownTrigger.js +24 -8
- package/dist/components/List/List.d.ts +1 -9
- package/dist/components/List/List.js +9 -9
- package/dist/components/PreventPropagation/PreventPropagation.d.ts +10 -0
- package/dist/components/PreventPropagation/PreventPropagation.js +9 -0
- package/dist/components/PreventPropagation/index.d.ts +2 -0
- package/dist/components/SearchBar/SearchBar.d.ts +1 -1
- package/dist/components/SearchBar/SearchBar.js +1 -3
- package/dist/components/StackedGroup/StackedGroup.d.ts +23 -0
- package/dist/components/StackedGroup/StackedGroup.js +21 -0
- package/dist/components/StackedGroup/index.d.ts +1 -0
- package/dist/components/Switch/Switch.d.ts +29 -0
- package/dist/components/Switch/Switch.js +27 -0
- package/dist/components/Switch/index.d.ts +2 -0
- package/dist/components/index.d.ts +4 -0
- package/dist/editor.js +22 -22
- package/dist/hooks/index.d.ts +0 -1
- package/dist/hooks/useCheckable/useCheckable.js +3 -10
- package/dist/hooks/useConf/useConf.d.ts +1 -1
- package/dist/hooks/useConversation/useConversation.d.ts +1 -1
- package/dist/hooks/useConversation/useConversation.js +17 -13
- package/dist/hooks/useDropdown/useDropdown.d.ts +1 -1
- package/dist/hooks/useDropdown/useDropdown.js +3 -3
- package/dist/hooks/useSession/useSession.d.ts +1 -1
- package/dist/icons.js +212 -228
- package/dist/index.d.ts +0 -1
- package/dist/index.js +154 -172
- package/dist/modals.js +14 -16
- package/dist/modules/comments/components/Comment.js +49 -34
- package/dist/modules/comments/components/CommentDeleted.d.ts +1 -0
- package/dist/modules/comments/components/CommentDeleted.js +11 -0
- package/dist/modules/comments/components/CommentForm.d.ts +2 -1
- package/dist/modules/comments/components/CommentForm.js +12 -8
- package/dist/modules/comments/components/CommentList.js +3 -3
- package/dist/modules/comments/components/CommentReplies.d.ts +4 -0
- package/dist/modules/comments/components/CommentReplies.js +33 -0
- package/dist/modules/comments/constants.d.ts +4 -0
- package/dist/modules/comments/constants.js +2 -1
- package/dist/modules/comments/context/Context.d.ts +6 -4
- package/dist/modules/comments/hooks/useCommentReplies.d.ts +12 -0
- package/dist/modules/comments/hooks/useCommentReplies.js +36 -0
- package/dist/modules/comments/hooks/useComments.d.ts +7 -7
- package/dist/modules/comments/hooks/useComments.js +24 -19
- package/dist/modules/comments/hooks/useCommentsContext.d.ts +6 -4
- package/dist/modules/comments/provider/CommentProvider.js +16 -13
- package/dist/modules/comments/types.d.ts +14 -1
- package/dist/modules/editor/components/BubbleMenuEditInformationPane/BubbleMenuEditInformationPane.d.ts +6 -0
- package/dist/modules/editor/components/BubbleMenuEditInformationPane/BubbleMenuEditInformationPane.js +136 -0
- package/dist/modules/editor/components/BubbleMenuEditInformationPane/index.d.ts +1 -0
- package/dist/modules/editor/components/Editor/Editor.d.ts +1 -3
- package/dist/modules/editor/components/Editor/Editor.js +8 -5
- package/dist/modules/editor/components/EditorToolbar/EditorToolbar.js +12 -0
- package/dist/modules/editor/components/NodeView/InformationPaneNodeView.d.ts +2 -0
- package/dist/modules/editor/components/NodeView/InformationPaneNodeView.js +10 -0
- package/dist/modules/editor/components/NodeView/index.d.ts +2 -2
- package/dist/modules/editor/components/Renderer/InformationPaneRenderer.d.ts +3 -0
- package/dist/modules/editor/components/Renderer/InformationPaneRenderer.js +33 -0
- package/dist/modules/editor/components/Renderer/index.d.ts +2 -2
- package/dist/modules/editor/hooks/useTipTapEditor.d.ts +2 -6
- package/dist/modules/editor/hooks/useTipTapEditor.js +4 -2
- package/dist/modules/icons/components/IconInfoRectangle.d.ts +7 -0
- package/dist/modules/icons/components/IconInfoRectangle.js +13 -0
- package/dist/modules/icons/components/index.d.ts +1 -9
- package/dist/modules/modals/ResourceModal/ResourceModal.d.ts +1 -1
- package/dist/modules/modals/ResourceModal/hooks/useUpdateMutation.d.ts +1 -1
- package/dist/modules/modals/ShareModal/ShareModal.d.ts +1 -1
- package/dist/modules/modals/ShareModal/apps/ShareBlog.d.ts +1 -1
- package/dist/modules/modals/ShareModal/hooks/useShareMutation.d.ts +1 -1
- package/dist/modules/modals/index.d.ts +0 -1
- package/dist/modules/multimedia/Linker/InternalLinker/InternalLinker.js +9 -5
- package/dist/modules/multimedia/index.d.ts +0 -1
- package/dist/multimedia.js +1 -3
- package/dist/providers/EdificeClientProvider/EdificeClientProvider.context.d.ts +1 -1
- package/dist/types/index.d.ts +1 -0
- package/package.json +6 -6
- package/dist/hooks/useWorkspaceFolders/index.d.ts +0 -1
- package/dist/hooks/useWorkspaceFolders/useWorkspaceFolders.d.ts +0 -14
- package/dist/hooks/useWorkspaceFolders/useWorkspaceFolders.js +0 -44
- package/dist/modules/editor/components/NodeView/ConversationHistoryNodeView.d.ts +0 -2
- package/dist/modules/editor/components/NodeView/ConversationHistoryNodeView.js +0 -10
- package/dist/modules/editor/components/Renderer/ConversationHistoryRenderer.d.ts +0 -8
- package/dist/modules/editor/components/Renderer/ConversationHistoryRenderer.js +0 -28
- package/dist/modules/icons/components/IconFolderAdd.d.ts +0 -7
- package/dist/modules/icons/components/IconFolderAdd.js +0 -13
- package/dist/modules/icons/components/IconFolderDelete.d.ts +0 -7
- package/dist/modules/icons/components/IconFolderDelete.js +0 -12
- package/dist/modules/icons/components/IconGlobe2.d.ts +0 -7
- package/dist/modules/icons/components/IconGlobe2.js +0 -16
- package/dist/modules/icons/components/IconGroupAvatar.d.ts +0 -7
- package/dist/modules/icons/components/IconGroupAvatar.js +0 -12
- package/dist/modules/icons/components/IconMailRecall.d.ts +0 -7
- package/dist/modules/icons/components/IconMailRecall.js +0 -13
- package/dist/modules/icons/components/IconQuestionMark.d.ts +0 -7
- package/dist/modules/icons/components/IconQuestionMark.js +0 -13
- package/dist/modules/icons/components/IconReadMail.d.ts +0 -7
- package/dist/modules/icons/components/IconReadMail.js +0 -16
- package/dist/modules/icons/components/IconUndoAll.d.ts +0 -7
- package/dist/modules/icons/components/IconUndoAll.js +0 -14
- package/dist/modules/icons/components/IconUnreadMail.d.ts +0 -7
- package/dist/modules/icons/components/IconUnreadMail.js +0 -16
- package/dist/modules/modals/ConfirmModal/ConfirmModal.d.ts +0 -42
- package/dist/modules/modals/ConfirmModal/ConfirmModal.js +0 -36
- package/dist/modules/modals/ConfirmModal/index.d.ts +0 -1
- package/dist/modules/multimedia/WorkspaceFolders/WorkspaceFolders.d.ts +0 -8
- package/dist/modules/multimedia/WorkspaceFolders/WorkspaceFolders.js +0 -28
- package/dist/modules/multimedia/WorkspaceFolders/index.d.ts +0 -1
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
import { jsxs, jsx } from "react/jsx-runtime";
|
|
2
|
-
const SvgIconQuestionMark = ({
|
|
3
|
-
title,
|
|
4
|
-
titleId,
|
|
5
|
-
...props
|
|
6
|
-
}) => /* @__PURE__ */ jsxs("svg", { xmlns: "http://www.w3.org/2000/svg", width: "24", height: "24", fill: "none", viewBox: "0 0 24 24", "aria-hidden": "true", "aria-labelledby": titleId, ...props, children: [
|
|
7
|
-
title ? /* @__PURE__ */ jsx("title", { id: titleId, children: title }) : null,
|
|
8
|
-
/* @__PURE__ */ jsx("path", { fill: "currentColor", fillRule: "evenodd", d: "M9.579 5.429C9.172 5.964 9 6.706 9 7.44a1 1 0 0 1-2 0c0-.99.223-2.217.987-3.222.8-1.051 2.086-1.718 3.905-1.718 2.032 0 3.284 1.043 3.892 2.323.563 1.184.578 2.568.265 3.445-.409 1.148-1.191 2.056-1.81 2.773l-.27.317c-.7.83-1.077 1.427-1.077 2.157v1.806a1 1 0 1 1-2 0v-1.806c0-1.513.835-2.6 1.546-3.445q.16-.189.312-.366c.629-.737 1.141-1.337 1.415-2.107.128-.359.157-1.192-.187-1.915-.298-.627-.874-1.182-2.086-1.182-1.283 0-1.943.442-2.313.929", clipRule: "evenodd" }),
|
|
9
|
-
/* @__PURE__ */ jsx("path", { fill: "currentColor", d: "M13.762 19.888a1.612 1.612 0 1 1-3.223 0 1.612 1.612 0 0 1 3.223 0" })
|
|
10
|
-
] });
|
|
11
|
-
export {
|
|
12
|
-
SvgIconQuestionMark as default
|
|
13
|
-
};
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
import { SVGProps } from 'react';
|
|
2
|
-
interface SVGRProps {
|
|
3
|
-
title?: string;
|
|
4
|
-
titleId?: string;
|
|
5
|
-
}
|
|
6
|
-
declare const SvgIconReadMail: ({ title, titleId, ...props }: SVGProps<SVGSVGElement> & SVGRProps) => import("react/jsx-runtime").JSX.Element;
|
|
7
|
-
export default SvgIconReadMail;
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
import { jsxs, jsx } from "react/jsx-runtime";
|
|
2
|
-
const SvgIconReadMail = ({
|
|
3
|
-
title,
|
|
4
|
-
titleId,
|
|
5
|
-
...props
|
|
6
|
-
}) => /* @__PURE__ */ jsxs("svg", { xmlns: "http://www.w3.org/2000/svg", width: "24", height: "24", fill: "none", viewBox: "0 0 24 24", "aria-hidden": "true", "aria-labelledby": titleId, ...props, children: [
|
|
7
|
-
title ? /* @__PURE__ */ jsx("title", { id: titleId, children: title }) : null,
|
|
8
|
-
/* @__PURE__ */ jsxs("g", { fill: "currentColor", fillRule: "evenodd", clipPath: "url(#icon-read-mail_svg__a)", clipRule: "evenodd", children: [
|
|
9
|
-
/* @__PURE__ */ jsx("path", { d: "M1.143 8.986a1 1 0 0 1 1.372-.343l8.97 5.382a1 1 0 0 0 1.03 0l8.97-5.382a1 1 0 1 1 1.03 1.714l-8.971 5.383a3 3 0 0 1-3.088 0l-8.97-5.382a1 1 0 0 1-.343-1.373" }),
|
|
10
|
-
/* @__PURE__ */ jsx("path", { d: "M12.466 2.4a.95.95 0 0 0-.932 0c-1.333.74-3.83 2.146-5.99 3.465-1.083.662-2.063 1.29-2.764 1.797a8 8 0 0 0-.78.62v11.003H0V8c0-.38.191-.664.272-.776.107-.148.238-.285.364-.404.254-.24.594-.506.973-.78.765-.552 1.797-1.212 2.892-1.881C6.697 2.817 9.224 1.395 10.563.65a2.95 2.95 0 0 1 2.874 0c1.34.744 3.866 2.166 6.062 3.508 1.095.669 2.127 1.33 2.892 1.882.38.273.719.54.973.78.126.118.257.255.364.403.08.112.272.395.272.776v11.285h-2V8.284l-.009-.008a8 8 0 0 0-.77-.613c-.702-.506-1.682-1.135-2.765-1.797-2.16-1.32-4.657-2.725-5.99-3.466M2.321 19.802c.253.192.647.34 1.123.34h17.112c.476 0 .87-.148 1.123-.34.252-.192.321-.384.321-.517h2c0 .892-.479 1.629-1.111 2.11-.632.479-1.46.747-2.333.747H3.444c-.873 0-1.701-.268-2.333-.748S0 20.178 0 19.285h2c0 .133.069.326.32.518" })
|
|
11
|
-
] }),
|
|
12
|
-
/* @__PURE__ */ jsx("defs", { children: /* @__PURE__ */ jsx("clipPath", { id: "icon-read-mail_svg__a", children: /* @__PURE__ */ jsx("path", { fill: "#fff", d: "M0 0h24v24H0z" }) }) })
|
|
13
|
-
] });
|
|
14
|
-
export {
|
|
15
|
-
SvgIconReadMail as default
|
|
16
|
-
};
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
import { SVGProps } from 'react';
|
|
2
|
-
interface SVGRProps {
|
|
3
|
-
title?: string;
|
|
4
|
-
titleId?: string;
|
|
5
|
-
}
|
|
6
|
-
declare const SvgIconUndoAll: ({ title, titleId, ...props }: SVGProps<SVGSVGElement> & SVGRProps) => import("react/jsx-runtime").JSX.Element;
|
|
7
|
-
export default SvgIconUndoAll;
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
import { jsxs, jsx } from "react/jsx-runtime";
|
|
2
|
-
const SvgIconUndoAll = ({
|
|
3
|
-
title,
|
|
4
|
-
titleId,
|
|
5
|
-
...props
|
|
6
|
-
}) => /* @__PURE__ */ jsxs("svg", { xmlns: "http://www.w3.org/2000/svg", width: "24", height: "24", fill: "none", viewBox: "0 0 24 24", "aria-hidden": "true", "aria-labelledby": titleId, ...props, children: [
|
|
7
|
-
title ? /* @__PURE__ */ jsx("title", { id: titleId, children: title }) : null,
|
|
8
|
-
/* @__PURE__ */ jsx("path", { fill: "currentColor", fillRule: "evenodd", d: "M11.648 12.564a.917.917 0 0 0 0-1.297L7.713 7.332l3.935-3.935A.917.917 0 1 0 10.352 2.1L5.768 6.684a.917.917 0 0 0 0 1.296l4.584 4.583a.917.917 0 0 0 1.296 0", clipRule: "evenodd" }),
|
|
9
|
-
/* @__PURE__ */ jsx("path", { fill: "currentColor", fillRule: "evenodd", d: "M7.523 12.564a.917.917 0 0 0 0-1.297L3.588 7.332l3.935-3.935A.917.917 0 1 0 6.227 2.1L1.643 6.684a.917.917 0 0 0 0 1.296l4.584 4.583a.917.917 0 0 0 1.296 0", clipRule: "evenodd" }),
|
|
10
|
-
/* @__PURE__ */ jsx("path", { fill: "currentColor", fillRule: "evenodd", d: "M19.25 18.332c.506 0 .917-.41.917-.917V11a4.583 4.583 0 0 0-4.584-4.584H6.417a.917.917 0 0 0 0 1.834h9.166a2.75 2.75 0 0 1 2.75 2.75v6.416c0 .507.41.917.917.917", clipRule: "evenodd" })
|
|
11
|
-
] });
|
|
12
|
-
export {
|
|
13
|
-
SvgIconUndoAll as default
|
|
14
|
-
};
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
import { SVGProps } from 'react';
|
|
2
|
-
interface SVGRProps {
|
|
3
|
-
title?: string;
|
|
4
|
-
titleId?: string;
|
|
5
|
-
}
|
|
6
|
-
declare const SvgIconUnreadMail: ({ title, titleId, ...props }: SVGProps<SVGSVGElement> & SVGRProps) => import("react/jsx-runtime").JSX.Element;
|
|
7
|
-
export default SvgIconUnreadMail;
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
import { jsxs, jsx } from "react/jsx-runtime";
|
|
2
|
-
const SvgIconUnreadMail = ({
|
|
3
|
-
title,
|
|
4
|
-
titleId,
|
|
5
|
-
...props
|
|
6
|
-
}) => /* @__PURE__ */ jsxs("svg", { xmlns: "http://www.w3.org/2000/svg", width: "24", height: "24", fill: "none", viewBox: "0 0 24 24", "aria-hidden": "true", "aria-labelledby": titleId, ...props, children: [
|
|
7
|
-
title ? /* @__PURE__ */ jsx("title", { id: titleId, children: title }) : null,
|
|
8
|
-
/* @__PURE__ */ jsxs("g", { fill: "currentColor", fillRule: "evenodd", clipPath: "url(#icon-unread-mail_svg__a)", clipRule: "evenodd", children: [
|
|
9
|
-
/* @__PURE__ */ jsx("path", { d: "M7.975 4.5a5.1 5.1 0 0 0-.204-2h12.785A3.437 3.437 0 0 1 24 5.948V18.07c0 1.9-1.548 3.429-3.444 3.429H3.444A3.437 3.437 0 0 1 0 18.071V8.001c.581.436 1.261.749 2 .899v9.171c0 .783.64 1.429 1.444 1.429h17.112c.803 0 1.444-.646 1.444-1.429V7.79l-9.448 6.257a1 1 0 0 1-1.104 0L3.744 8.945a5 5 0 0 0 2.228-.924L12 12.014l9.916-6.567c-.2-.55-.73-.947-1.36-.947z" }),
|
|
10
|
-
/* @__PURE__ */ jsx("path", { d: "M3 7a3 3 0 1 0 0-6 3 3 0 0 0 0 6" })
|
|
11
|
-
] }),
|
|
12
|
-
/* @__PURE__ */ jsx("defs", { children: /* @__PURE__ */ jsx("clipPath", { id: "icon-unread-mail_svg__a", children: /* @__PURE__ */ jsx("path", { fill: "#fff", d: "M0 0h24v24H0z" }) }) })
|
|
13
|
-
] });
|
|
14
|
-
export {
|
|
15
|
-
SvgIconUnreadMail as default
|
|
16
|
-
};
|
|
@@ -1,42 +0,0 @@
|
|
|
1
|
-
import { ReactNode } from 'react';
|
|
2
|
-
export type ConfirmModalVariant = 'yes/no' | 'ok/cancel';
|
|
3
|
-
interface ConfirmModalProps {
|
|
4
|
-
/**
|
|
5
|
-
* Variant of text buttons content
|
|
6
|
-
*/
|
|
7
|
-
variant?: ConfirmModalVariant;
|
|
8
|
-
/**
|
|
9
|
-
* Modal id (useful when multiple modal on the same page)
|
|
10
|
-
*/
|
|
11
|
-
id: string;
|
|
12
|
-
/**
|
|
13
|
-
* Is Modal Open
|
|
14
|
-
*/
|
|
15
|
-
isOpen: boolean;
|
|
16
|
-
/**
|
|
17
|
-
* Content of header modal's
|
|
18
|
-
*/
|
|
19
|
-
header?: ReactNode;
|
|
20
|
-
/**
|
|
21
|
-
* Content of body modal's
|
|
22
|
-
*/
|
|
23
|
-
body?: ReactNode;
|
|
24
|
-
/**
|
|
25
|
-
* Key text translation of confirm button (useTranslation('common'))
|
|
26
|
-
*/
|
|
27
|
-
okText?: string;
|
|
28
|
-
/**
|
|
29
|
-
* Key text translation of cancel button (useTranslation('common'))
|
|
30
|
-
*/
|
|
31
|
-
koText?: string;
|
|
32
|
-
/**
|
|
33
|
-
* Function to call when success button proceed
|
|
34
|
-
*/
|
|
35
|
-
onSuccess?: () => void;
|
|
36
|
-
/**
|
|
37
|
-
* Function to call when closing modal
|
|
38
|
-
*/
|
|
39
|
-
onCancel?: () => void;
|
|
40
|
-
}
|
|
41
|
-
export default function ConfirmModal({ variant, id, isOpen, header, body, okText, koText, onSuccess, onCancel, }: ConfirmModalProps): import("react/jsx-runtime").JSX.Element;
|
|
42
|
-
export {};
|
|
@@ -1,36 +0,0 @@
|
|
|
1
|
-
import { jsxs, jsx } from "react/jsx-runtime";
|
|
2
|
-
import { useTranslation } from "react-i18next";
|
|
3
|
-
import Modal from "../../../components/Modal/Modal.js";
|
|
4
|
-
import Button from "../../../components/Button/Button.js";
|
|
5
|
-
function ConfirmModal({
|
|
6
|
-
variant = "yes/no",
|
|
7
|
-
id,
|
|
8
|
-
isOpen,
|
|
9
|
-
header,
|
|
10
|
-
body,
|
|
11
|
-
okText,
|
|
12
|
-
koText,
|
|
13
|
-
onSuccess = () => ({}),
|
|
14
|
-
onCancel = () => ({})
|
|
15
|
-
}) {
|
|
16
|
-
const {
|
|
17
|
-
t
|
|
18
|
-
} = useTranslation(), ok = {
|
|
19
|
-
"yes/no": t("yes"),
|
|
20
|
-
"ok/cancel": t("ok")
|
|
21
|
-
}, ko = {
|
|
22
|
-
"yes/no": t("no"),
|
|
23
|
-
"ok/cancel": t("cancel")
|
|
24
|
-
};
|
|
25
|
-
return /* @__PURE__ */ jsxs(Modal, { isOpen, onModalClose: onCancel, id, children: [
|
|
26
|
-
/* @__PURE__ */ jsx(Modal.Header, { onModalClose: onCancel, children: header }),
|
|
27
|
-
/* @__PURE__ */ jsx(Modal.Body, { children: body }),
|
|
28
|
-
/* @__PURE__ */ jsxs(Modal.Footer, { children: [
|
|
29
|
-
/* @__PURE__ */ jsx(Button, { color: "tertiary", onClick: onCancel, type: "button", variant: "ghost", children: koText ? t(koText) : ko[variant] }),
|
|
30
|
-
/* @__PURE__ */ jsx(Button, { color: "danger", onClick: onSuccess, type: "button", variant: "filled", children: okText ? t(okText) : ok[variant] })
|
|
31
|
-
] })
|
|
32
|
-
] });
|
|
33
|
-
}
|
|
34
|
-
export {
|
|
35
|
-
ConfirmModal as default
|
|
36
|
-
};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export { default as ConfirmModal } from './ConfirmModal';
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
interface WorkspaceFoldersProps {
|
|
2
|
-
/**
|
|
3
|
-
* Function called when a folder is selected
|
|
4
|
-
*/
|
|
5
|
-
onFolderSelected: (folderId: string) => void;
|
|
6
|
-
}
|
|
7
|
-
export default function WorkspaceFolders({ onFolderSelected, }: WorkspaceFoldersProps): import("react/jsx-runtime").JSX.Element;
|
|
8
|
-
export {};
|
|
@@ -1,28 +0,0 @@
|
|
|
1
|
-
import { jsxs, jsx } from "react/jsx-runtime";
|
|
2
|
-
import { useTranslation } from "react-i18next";
|
|
3
|
-
import { useState } from "react";
|
|
4
|
-
import useWorkspaceFolders from "../../../hooks/useWorkspaceFolders/useWorkspaceFolders.js";
|
|
5
|
-
import SearchBar from "../../../components/SearchBar/SearchBar.js";
|
|
6
|
-
import Tree from "../../../components/Tree/components/Tree.js";
|
|
7
|
-
function WorkspaceFolders({
|
|
8
|
-
onFolderSelected
|
|
9
|
-
}) {
|
|
10
|
-
const {
|
|
11
|
-
t
|
|
12
|
-
} = useTranslation(), {
|
|
13
|
-
folderTree,
|
|
14
|
-
setSearchQuery
|
|
15
|
-
} = useWorkspaceFolders(), [shouldExpandAllNodes, setShouldExpandAllNodes] = useState(!1), [searchValue, setSearchValue] = useState(""), handleSearchChange = (e) => {
|
|
16
|
-
setSearchValue(e.target.value);
|
|
17
|
-
}, handleSearchSubmit = () => {
|
|
18
|
-
setSearchQuery(searchValue), setShouldExpandAllNodes(searchValue !== "");
|
|
19
|
-
};
|
|
20
|
-
return /* @__PURE__ */ jsxs("div", { className: "d-flex flex-column gap-12", children: [
|
|
21
|
-
/* @__PURE__ */ jsx("p", { children: t("attachments.add.to.folder.modal.description") }),
|
|
22
|
-
/* @__PURE__ */ jsx(SearchBar, { onChange: handleSearchChange, isVariant: !1, placeholder: t("search"), onClick: handleSearchSubmit }),
|
|
23
|
-
/* @__PURE__ */ jsx("div", { className: "border border-gray-400 rounded", children: /* @__PURE__ */ jsx("div", { className: "p-12", children: /* @__PURE__ */ jsx(Tree, { nodes: folderTree, onTreeItemClick: onFolderSelected, shouldExpandAllNodes }) }) })
|
|
24
|
-
] });
|
|
25
|
-
}
|
|
26
|
-
export {
|
|
27
|
-
WorkspaceFolders as default
|
|
28
|
-
};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export { default as WorkspaceFolders } from './WorkspaceFolders';
|