@edifice.io/react 2.2.1 → 2.2.2-develop-b2school.20250404170224

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.
Files changed (72) hide show
  1. package/dist/components/Combobox/Combobox.d.ts +54 -4
  2. package/dist/components/Combobox/Combobox.js +12 -6
  3. package/dist/components/Combobox/ComboboxTrigger.d.ts +30 -2
  4. package/dist/components/Combobox/ComboboxTrigger.js +25 -8
  5. package/dist/components/Dropdown/Dropdown.d.ts +6 -2
  6. package/dist/components/Dropdown/Dropdown.js +4 -3
  7. package/dist/components/Dropdown/DropdownItem.d.ts +5 -1
  8. package/dist/components/Dropdown/DropdownItem.js +4 -1
  9. package/dist/components/Dropdown/DropdownTrigger.js +5 -1
  10. package/dist/components/Layout/components/Header.js +1 -1
  11. package/dist/components/Layout/hooks/useHelp.d.ts +1 -1
  12. package/dist/components/Layout/hooks/useHelp.js +4 -3
  13. package/dist/components/List/List.d.ts +9 -1
  14. package/dist/components/List/List.js +9 -9
  15. package/dist/components/SearchBar/SearchBar.d.ts +1 -1
  16. package/dist/components/SearchBar/SearchBar.js +3 -1
  17. package/dist/editor.js +24 -20
  18. package/dist/hooks/index.d.ts +1 -0
  19. package/dist/hooks/useCheckable/useCheckable.js +10 -3
  20. package/dist/hooks/useConversation/useConversation.d.ts +1 -1
  21. package/dist/hooks/useConversation/useConversation.js +13 -17
  22. package/dist/hooks/useDropdown/useDropdown.d.ts +1 -1
  23. package/dist/hooks/useDropdown/useDropdown.js +3 -3
  24. package/dist/hooks/useWorkspaceFolders/index.d.ts +1 -0
  25. package/dist/hooks/useWorkspaceFolders/useWorkspaceFolders.d.ts +13 -0
  26. package/dist/hooks/useWorkspaceFolders/useWorkspaceFolders.js +37 -0
  27. package/dist/icons-apps.js +102 -100
  28. package/dist/icons.js +226 -210
  29. package/dist/index.d.ts +1 -0
  30. package/dist/index.js +46 -20
  31. package/dist/modals.js +16 -14
  32. package/dist/modules/editor/components/Editor/Editor.d.ts +3 -1
  33. package/dist/modules/editor/components/Editor/Editor.js +3 -2
  34. package/dist/modules/editor/components/NodeView/ConversationHistoryNodeView.d.ts +2 -0
  35. package/dist/modules/editor/components/NodeView/ConversationHistoryNodeView.js +10 -0
  36. package/dist/modules/editor/components/NodeView/index.d.ts +2 -1
  37. package/dist/modules/editor/components/Renderer/ConversationHistoryRenderer.d.ts +8 -0
  38. package/dist/modules/editor/components/Renderer/ConversationHistoryRenderer.js +28 -0
  39. package/dist/modules/editor/components/Renderer/index.d.ts +2 -1
  40. package/dist/modules/editor/hooks/useTipTapEditor.d.ts +6 -2
  41. package/dist/modules/editor/hooks/useTipTapEditor.js +2 -2
  42. package/dist/modules/icons/components/IconFolderAdd.d.ts +7 -0
  43. package/dist/modules/icons/components/IconFolderAdd.js +13 -0
  44. package/dist/modules/icons/components/IconFolderDelete.d.ts +7 -0
  45. package/dist/modules/icons/components/IconFolderDelete.js +12 -0
  46. package/dist/modules/icons/components/IconGroupAvatar.d.ts +7 -0
  47. package/dist/modules/icons/components/IconGroupAvatar.js +12 -0
  48. package/dist/modules/icons/components/IconMailRecall.d.ts +7 -0
  49. package/dist/modules/icons/components/IconMailRecall.js +13 -0
  50. package/dist/modules/icons/components/IconQuestionMark.d.ts +7 -0
  51. package/dist/modules/icons/components/IconQuestionMark.js +13 -0
  52. package/dist/modules/icons/components/IconReadMail.d.ts +7 -0
  53. package/dist/modules/icons/components/IconReadMail.js +16 -0
  54. package/dist/modules/icons/components/IconUndoAll.d.ts +7 -0
  55. package/dist/modules/icons/components/IconUndoAll.js +14 -0
  56. package/dist/modules/icons/components/IconUnreadMail.d.ts +7 -0
  57. package/dist/modules/icons/components/IconUnreadMail.js +16 -0
  58. package/dist/modules/icons/components/apps/IconNabook.d.ts +7 -0
  59. package/dist/modules/icons/components/apps/IconNabook.js +14 -0
  60. package/dist/modules/icons/components/apps/index.d.ts +1 -0
  61. package/dist/modules/icons/components/index.d.ts +8 -0
  62. package/dist/modules/modals/ConfirmModal/ConfirmModal.d.ts +42 -0
  63. package/dist/modules/modals/ConfirmModal/ConfirmModal.js +36 -0
  64. package/dist/modules/modals/ConfirmModal/index.d.ts +1 -0
  65. package/dist/modules/modals/PublishModal/hooks/usePublishModal.d.ts +2 -2
  66. package/dist/modules/modals/index.d.ts +1 -0
  67. package/dist/modules/multimedia/WorkspaceFolders/WorkspaceFolders.d.ts +8 -0
  68. package/dist/modules/multimedia/WorkspaceFolders/WorkspaceFolders.js +20 -0
  69. package/dist/modules/multimedia/WorkspaceFolders/index.d.ts +1 -0
  70. package/dist/modules/multimedia/index.d.ts +1 -0
  71. package/dist/multimedia.js +3 -1
  72. package/package.json +6 -6
package/dist/modals.js CHANGED
@@ -1,18 +1,20 @@
1
- import { default as default2 } from "./modules/modals/OnboardingModal/OnboardingModal.js";
2
- import { default as default3 } from "./modules/modals/PublishModal/PublishModal.js";
3
- import { default as default4 } from "./modules/modals/ResourceModal/apps/BlogPublic.js";
4
- import { default as default5 } from "./modules/modals/ResourceModal/hooks/useUpdateMutation.js";
5
- import { default as default6 } from "./modules/modals/ShareModal/ShareModal.js";
6
- import { default as default7 } from "./modules/modals/ShareModal/apps/ShareBlog.js";
7
- import { default as default8 } from "./modules/modals/ShareModal/hooks/useShareMutation.js";
1
+ import { default as default2 } from "./modules/modals/ConfirmModal/ConfirmModal.js";
2
+ import { default as default3 } from "./modules/modals/OnboardingModal/OnboardingModal.js";
3
+ import { default as default4 } from "./modules/modals/PublishModal/PublishModal.js";
4
+ import { default as default5 } from "./modules/modals/ResourceModal/apps/BlogPublic.js";
5
+ import { default as default6 } from "./modules/modals/ResourceModal/hooks/useUpdateMutation.js";
6
+ import { default as default7 } from "./modules/modals/ShareModal/ShareModal.js";
7
+ import { default as default8 } from "./modules/modals/ShareModal/apps/ShareBlog.js";
8
+ import { default as default9 } from "./modules/modals/ShareModal/hooks/useShareMutation.js";
8
9
  import { ResourceModal } from "./modules/modals/ResourceModal/ResourceModal.js";
9
10
  export {
10
- default4 as BlogPublic,
11
- default2 as OnboardingModal,
12
- default3 as PublishModal,
11
+ default5 as BlogPublic,
12
+ default2 as ConfirmModal,
13
+ default3 as OnboardingModal,
14
+ default4 as PublishModal,
13
15
  ResourceModal,
14
- default7 as ShareBlog,
15
- default6 as ShareModal,
16
- default8 as useShareMutation,
17
- default5 as useUpdateMutation
16
+ default8 as ShareBlog,
17
+ default7 as ShareModal,
18
+ default9 as useShareMutation,
19
+ default6 as useUpdateMutation
18
20
  };
@@ -1,5 +1,5 @@
1
1
  import { WorkspaceVisibility } from '@edifice.io/client';
2
- import { Content, FocusPosition, JSONContent } from '@tiptap/react';
2
+ import { Content, Extensions, FocusPosition, JSONContent } from '@tiptap/react';
3
3
  export interface EditorRef {
4
4
  /** Get the current content. */
5
5
  getContent: (as: 'html' | 'json' | 'plain') => undefined | string | JSONContent;
@@ -40,6 +40,8 @@ export interface EditorProps {
40
40
  onContentChange?: ({ editor }: {
41
41
  editor: any;
42
42
  }) => void;
43
+ /** Extensions to add to the editor */
44
+ extensions?: Extensions;
43
45
  }
44
46
  declare const Editor: import('react').ForwardRefExoticComponent<EditorProps & import('react').RefAttributes<EditorRef>>;
45
47
  export default Editor;
@@ -27,14 +27,15 @@ const MathsModal = /* @__PURE__ */ lazy(async () => await import("../MathsModal/
27
27
  focus = "start",
28
28
  placeholder = "",
29
29
  visibility = "protected",
30
- onContentChange
30
+ onContentChange,
31
+ extensions
31
32
  }, ref) => {
32
33
  const editorId = useId(), {
33
34
  appCode
34
35
  } = useEdificeClient(), {
35
36
  editor,
36
37
  editable
37
- } = useTipTapEditor(mode === "edit", content, focus, placeholder, onContentChange, visibility), {
38
+ } = useTipTapEditor(mode === "edit", content, focus, placeholder, onContentChange, visibility, extensions), {
38
39
  ref: mediaLibraryModalRef,
39
40
  ...mediaLibraryModalHandlers
40
41
  } = useMediaLibraryEditor(editor), {
@@ -0,0 +1,2 @@
1
+ declare const ConversationHistoryNodeView: (Component: any) => import('@tiptap/core').Node<any, any>;
2
+ export default ConversationHistoryNodeView;
@@ -0,0 +1,10 @@
1
+ import { ConversationHistory } from "@edifice.io/tiptap-extensions/conversation-history";
2
+ import { ReactNodeViewRenderer } from "@tiptap/react";
3
+ const ConversationHistoryNodeView = (Component) => ConversationHistory.extend({
4
+ addNodeView() {
5
+ return ReactNodeViewRenderer(Component);
6
+ }
7
+ });
8
+ export {
9
+ ConversationHistoryNodeView as default
10
+ };
@@ -1,5 +1,6 @@
1
- export { default as AudioNodeView } from './AudioNodeView';
2
1
  export { default as AttachmentNodeView } from './AttachmentNodeView';
2
+ export { default as AudioNodeView } from './AudioNodeView';
3
+ export { default as ConversationHistoryNodeView } from './ConversationHistoryNodeView';
3
4
  export { default as ImageNodeView } from './ImageNodeView';
4
5
  export { default as LinkerNodeView } from './LinkerNodeView';
5
6
  export { default as VideoNodeView } from './VideoNodeView';
@@ -0,0 +1,8 @@
1
+ /**
2
+ * `ConversationHistoryRenderer` is a React component that renders a button to toggle the visibility
3
+ * of conversation history content. It uses the `@tiptap/react` library for rendering content and
4
+ * `clsx` for conditional class names. The component also utilizes the `useTranslation` hook from
5
+ * `react-i18next` for internationalization and a custom `useToggle` hook for managing the open state.
6
+ */
7
+ declare const ConversationHistoryRenderer: () => import("react/jsx-runtime").JSX.Element;
8
+ export default ConversationHistoryRenderer;
@@ -0,0 +1,28 @@
1
+ import { jsxs, jsx, Fragment } from "react/jsx-runtime";
2
+ import { NodeViewWrapper, NodeViewContent } from "@tiptap/react";
3
+ import clsx from "clsx";
4
+ import { useTranslation } from "react-i18next";
5
+ import SvgIconRafterDown from "../../../icons/components/IconRafterDown.js";
6
+ import SvgIconRafterUp from "../../../icons/components/IconRafterUp.js";
7
+ import useToggle from "../../../../hooks/useToggle/useToggle.js";
8
+ import Button from "../../../../components/Button/Button.js";
9
+ const ConversationHistoryRenderer = () => {
10
+ const {
11
+ t
12
+ } = useTranslation("conversation"), [open, toggleOpen] = useToggle(!1), classes = clsx("conversation-history ps-16", {
13
+ show: open
14
+ });
15
+ return /* @__PURE__ */ jsxs(NodeViewWrapper, { as: "div", contentEditable: !1, children: [
16
+ /* @__PURE__ */ jsx(Button, { variant: "ghost", onClick: toggleOpen, size: "sm", className: "d-flex align-items-center gap-4 text-gray-800 fs-6 mt-24", children: open ? /* @__PURE__ */ jsxs(Fragment, { children: [
17
+ t("message.history.hide"),
18
+ /* @__PURE__ */ jsx(SvgIconRafterUp, { width: 16, height: 16 })
19
+ ] }) : /* @__PURE__ */ jsxs(Fragment, { children: [
20
+ t("message.history.show"),
21
+ /* @__PURE__ */ jsx(SvgIconRafterDown, { width: 16, height: 16 })
22
+ ] }) }),
23
+ /* @__PURE__ */ jsx("div", { className: classes, "data-testid": "conversation-history-content", children: /* @__PURE__ */ jsx(NodeViewContent, {}) })
24
+ ] });
25
+ };
26
+ export {
27
+ ConversationHistoryRenderer as default
28
+ };
@@ -1,4 +1,5 @@
1
- export { default as AudioRenderer } from './AudioRenderer';
2
1
  export { default as AttachmentRenderer } from './AttachmentRenderer';
2
+ export { default as AudioRenderer } from './AudioRenderer';
3
+ export { default as ConversationHistoryRenderer } from './ConversationHistoryRenderer';
3
4
  export { default as LinkerRenderer } from './LinkerRenderer';
4
5
  export { default as MediaRenderer } from './MediaRenderer';
@@ -1,4 +1,4 @@
1
- import { Content, FocusPosition } from '@tiptap/react';
1
+ import { Content, Extensions, FocusPosition } from '@tiptap/react';
2
2
  import { WorkspaceVisibility } from '@edifice.io/client';
3
3
  /**
4
4
  * Hook that creates a tiptap editor instance.
@@ -7,10 +7,14 @@ import { WorkspaceVisibility } from '@edifice.io/client';
7
7
  * @param content default rich content
8
8
  * @param focus set focus position to the editor
9
9
  * @param placeholder editor placeholder content
10
+ * @param onContentChange callback to be called on content change
11
+ * @param visibility workspace visibility
12
+ * @param extensions extensions to add to the editor
13
+ * @returns the editor instance and the editable state
10
14
  */
11
15
  export declare const useTipTapEditor: (editable: boolean, content: Content, focus?: FocusPosition, placeholder?: string, onContentChange?: ({ editor }: {
12
16
  editor: any;
13
- }) => void, visibility?: WorkspaceVisibility) => {
17
+ }) => void, visibility?: WorkspaceVisibility, extensions?: Extensions) => {
14
18
  editor: import('@tiptap/core').Editor | null;
15
19
  editable: boolean;
16
20
  };
@@ -36,7 +36,7 @@ import MediaRenderer from "../components/Renderer/MediaRenderer.js";
36
36
  import AudioRenderer from "../components/Renderer/AudioRenderer.js";
37
37
  import LinkerRenderer from "../components/Renderer/LinkerRenderer.js";
38
38
  import AttachmentRenderer from "../components/Renderer/AttachmentRenderer.js";
39
- const useTipTapEditor = (editable, content, focus, placeholder, onContentChange, visibility = "protected") => {
39
+ const useTipTapEditor = (editable, content, focus, placeholder, onContentChange, visibility = "protected", extensions) => {
40
40
  const {
41
41
  currentLanguage
42
42
  } = useEdificeClient(), {
@@ -63,7 +63,7 @@ const useTipTapEditor = (editable, content, focus, placeholder, onContentChange,
63
63
  levels: [1, 2]
64
64
  }), Typography, FontSize, SpeechRecognition, SpeechSynthesis.configure({
65
65
  lang: (currentLanguage == null ? void 0 : currentLanguage.length) === 2 ? `${currentLanguage}-${currentLanguage.toUpperCase()}` : "fr-FR"
66
- }), Iframe, Hyperlink, FontFamily, Mathematics, Alert, VideoNodeView(MediaRenderer), AudioNodeView(AudioRenderer), LinkerNodeView(LinkerRenderer), ImageNodeView(MediaRenderer, uploadFile), AttachmentNodeView(AttachmentRenderer)],
66
+ }), Iframe, Hyperlink, FontFamily, Mathematics, Alert, VideoNodeView(MediaRenderer), AudioNodeView(AudioRenderer), LinkerNodeView(LinkerRenderer), ImageNodeView(MediaRenderer, uploadFile), AttachmentNodeView(AttachmentRenderer), ...extensions || []],
67
67
  content,
68
68
  // If the onContentChange callback is provided, we call it on every content change.
69
69
  ...onContentChange ? {
@@ -0,0 +1,7 @@
1
+ import { SVGProps } from 'react';
2
+ interface SVGRProps {
3
+ title?: string;
4
+ titleId?: string;
5
+ }
6
+ declare const SvgIconFolderAdd: ({ title, titleId, ...props }: SVGProps<SVGSVGElement> & SVGRProps) => import("react/jsx-runtime").JSX.Element;
7
+ export default SvgIconFolderAdd;
@@ -0,0 +1,13 @@
1
+ import { jsxs, jsx } from "react/jsx-runtime";
2
+ const SvgIconFolderAdd = ({
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("g", { clipPath: "url(#icon-folder-add_svg__a)", children: /* @__PURE__ */ jsx("path", { fill: "currentColor", fillRule: "evenodd", d: "M10.985 5.283A2 2 0 0 0 12.965 7H22v12H2V4h7.5a1.5 1.5 0 0 1 1.485 1.283M1.902 2C.852 2 0 2.852 0 3.902V19a2 2 0 0 0 2 2h20a2 2 0 0 0 2-2V7a2 2 0 0 0-2-2h-9.035A3.5 3.5 0 0 0 9.5 2zM12 8a1 1 0 0 1 1 1v3h3a1 1 0 1 1 0 2h-3v3a1 1 0 1 1-2 0v-3H8a1 1 0 1 1 0-2h3V9a1 1 0 0 1 1-1", clipRule: "evenodd" }) }),
9
+ /* @__PURE__ */ jsx("defs", { children: /* @__PURE__ */ jsx("clipPath", { id: "icon-folder-add_svg__a", children: /* @__PURE__ */ jsx("path", { fill: "#fff", d: "M0 0h24v24H0z" }) }) })
10
+ ] });
11
+ export {
12
+ SvgIconFolderAdd as default
13
+ };
@@ -0,0 +1,7 @@
1
+ import { SVGProps } from 'react';
2
+ interface SVGRProps {
3
+ title?: string;
4
+ titleId?: string;
5
+ }
6
+ declare const SvgIconFolderDelete: ({ title, titleId, ...props }: SVGProps<SVGSVGElement> & SVGRProps) => import("react/jsx-runtime").JSX.Element;
7
+ export default SvgIconFolderDelete;
@@ -0,0 +1,12 @@
1
+ import { jsxs, jsx } from "react/jsx-runtime";
2
+ const SvgIconFolderDelete = ({
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: "M2.756 2A2.756 2.756 0 0 0 0 4.756V18a3 3 0 0 0 3 3h6.5a1 1 0 1 0 0-2H3a1 1 0 0 1-1-1V4.756C2 4.34 2.339 4 2.756 4H9.5A2.5 2.5 0 0 1 12 6.5a1 1 0 0 0 1 1h8a1 1 0 0 1 1 1 1 1 0 1 0 2 0 3 3 0 0 0-3-3h-7.111A4.5 4.5 0 0 0 9.5 2zm20.85 9.536a1 1 0 0 1 0 1.414l-3.535 3.535 3.536 3.536a1 1 0 0 1-1.415 1.414L18.657 17.9l-3.536 3.535a1 1 0 0 1-1.414-1.414l3.536-3.536-3.536-3.535a1 1 0 0 1 1.414-1.414l3.536 3.535 3.535-3.535a1 1 0 0 1 1.415 0", clipRule: "evenodd" })
9
+ ] });
10
+ export {
11
+ SvgIconFolderDelete as default
12
+ };
@@ -0,0 +1,7 @@
1
+ import { SVGProps } from 'react';
2
+ interface SVGRProps {
3
+ title?: string;
4
+ titleId?: string;
5
+ }
6
+ declare const SvgIconGroupAvatar: ({ title, titleId, ...props }: SVGProps<SVGSVGElement> & SVGRProps) => import("react/jsx-runtime").JSX.Element;
7
+ export default SvgIconGroupAvatar;
@@ -0,0 +1,12 @@
1
+ import { jsxs, jsx } from "react/jsx-runtime";
2
+ const SvgIconGroupAvatar = ({
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: "M18.467 13.128a.917.917 0 0 1 1.166-.566c1.034.358 1.89 1.143 2.475 2.155.586 1.014.891 2.233.892 3.467v2.458a.917.917 0 0 1-1.833 0v-2.457c0-.944-.236-1.842-.646-2.55-.41-.709-.948-1.154-1.488-1.34a.917.917 0 0 1-.566-1.167M14.921 2.661a.917.917 0 0 1 .95-.882 4.702 4.702 0 0 1 1.934 8.902.917.917 0 0 1-.822-1.64 2.868 2.868 0 0 0-1.18-5.43.917.917 0 0 1-.882-.95M2.38 15.778c.894-.982 2.127-1.552 3.432-1.552h7.792c1.306 0 2.538.57 3.433 1.552.892.98 1.38 2.29 1.38 3.642v2.14a.917.917 0 1 1-1.834 0v-2.14c0-.917-.332-1.782-.902-2.407-.567-.623-1.316-.954-2.077-.954H5.812c-.76 0-1.51.331-2.077.954-.569.625-.902 1.49-.902 2.407v2.14a.917.917 0 1 1-1.833 0v-2.14c0-1.351.488-2.663 1.38-3.642M9.708 4.142a3.208 3.208 0 1 0 0 6.417 3.208 3.208 0 0 0 0-6.417M4.667 7.351a5.042 5.042 0 1 1 10.083 0 5.042 5.042 0 0 1-10.083 0", clipRule: "evenodd" })
9
+ ] });
10
+ export {
11
+ SvgIconGroupAvatar as default
12
+ };
@@ -0,0 +1,7 @@
1
+ import { SVGProps } from 'react';
2
+ interface SVGRProps {
3
+ title?: string;
4
+ titleId?: string;
5
+ }
6
+ declare const SvgIconMailRecall: ({ title, titleId, ...props }: SVGProps<SVGSVGElement> & SVGRProps) => import("react/jsx-runtime").JSX.Element;
7
+ export default SvgIconMailRecall;
@@ -0,0 +1,13 @@
1
+ import { jsxs, jsx } from "react/jsx-runtime";
2
+ const SvgIconMailRecall = ({
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("g", { clipPath: "url(#icon-mail-recall_svg__a)", children: /* @__PURE__ */ jsx("path", { fill: "currentColor", fillRule: "evenodd", d: "M2.253 6.532A1.34 1.34 0 0 1 3.333 6H6.5a1 1 0 0 0 0-2H3.333C1.512 4 0 5.452 0 7.286v11.428C0 20.548 1.512 22 3.333 22h16.334C21.488 22 23 20.548 23 18.714a1 1 0 1 0-2 0c0 .691-.577 1.286-1.333 1.286H3.333C2.577 20 2 19.405 2 18.714V8.666l8.442 5.066a3 3 0 0 0 3.118-.02l1.965-1.21a1 1 0 1 0-1.05-1.703l-1.964 1.211a1 1 0 0 1-1.04.007L2.515 6.643a1 1 0 0 0-.262-.11M15.8 8.6a1 1 0 0 0-.2-1.4L14 6h4a4 4 0 0 1 4 4v.2a3.8 3.8 0 0 1-3.8 3.8 1 1 0 1 0 0 2 5.8 5.8 0 0 0 5.8-5.8V10a6 6 0 0 0-6-6h-4l1.6-1.2a1 1 0 1 0-1.2-1.6l-3.99 2.993a1 1 0 0 0 0 1.614L14.4 8.8a1 1 0 0 0 1.4-.2", clipRule: "evenodd" }) }),
9
+ /* @__PURE__ */ jsx("defs", { children: /* @__PURE__ */ jsx("clipPath", { id: "icon-mail-recall_svg__a", children: /* @__PURE__ */ jsx("path", { fill: "#fff", d: "M0 0h24v24H0z" }) }) })
10
+ ] });
11
+ export {
12
+ SvgIconMailRecall as default
13
+ };
@@ -0,0 +1,7 @@
1
+ import { SVGProps } from 'react';
2
+ interface SVGRProps {
3
+ title?: string;
4
+ titleId?: string;
5
+ }
6
+ declare const SvgIconQuestionMark: ({ title, titleId, ...props }: SVGProps<SVGSVGElement> & SVGRProps) => import("react/jsx-runtime").JSX.Element;
7
+ export default SvgIconQuestionMark;
@@ -0,0 +1,13 @@
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
+ };
@@ -0,0 +1,7 @@
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;
@@ -0,0 +1,16 @@
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
+ };
@@ -0,0 +1,7 @@
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;
@@ -0,0 +1,14 @@
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
+ };
@@ -0,0 +1,7 @@
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;
@@ -0,0 +1,16 @@
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
+ };
@@ -0,0 +1,7 @@
1
+ import { SVGProps } from 'react';
2
+ interface SVGRProps {
3
+ title?: string;
4
+ titleId?: string;
5
+ }
6
+ declare const SvgIconNabook: ({ title, titleId, ...props }: SVGProps<SVGSVGElement> & SVGRProps) => import("react/jsx-runtime").JSX.Element;
7
+ export default SvgIconNabook;
@@ -0,0 +1,14 @@
1
+ import { jsxs, jsx } from "react/jsx-runtime";
2
+ const SvgIconNabook = ({
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 500 500", "aria-hidden": "true", "aria-labelledby": titleId, ...props, children: [
7
+ title ? /* @__PURE__ */ jsx("title", { id: titleId, children: title }) : null,
8
+ /* @__PURE__ */ jsx("rect", { width: 500, height: 500, fill: "#120D37", rx: 30 }),
9
+ /* @__PURE__ */ jsx("path", { fill: "#066", d: "m363.4 100.712 18.319 264.583-100.438 21.778-71.561-134.076 9.084 144.502-87.235 10.711-26.773-275.746 96.357-16.554 84.212 131.341-13.084-132.203z" }),
10
+ /* @__PURE__ */ jsx("path", { fill: "#0FC", d: "m362.279 87.72 18.318 264.583-100.438 21.777-71.561-134.075 9.084 144.501-87.235 10.711-26.773-275.745 96.357-16.554 84.212 131.341-13.084-132.203z" })
11
+ ] });
12
+ export {
13
+ SvgIconNabook as default
14
+ };
@@ -64,6 +64,7 @@ export { default as IconMonstageenligne } from './IconMonstageenligne';
64
64
  export { default as IconMoodle } from './IconMoodle';
65
65
  export { default as IconMuseefrancaisphoto } from './IconMuseefrancaisphoto';
66
66
  export { default as IconMyNetwork } from './IconMyNetwork';
67
+ export { default as IconNabook } from './IconNabook';
67
68
  export { default as IconNetvibes } from './IconNetvibes';
68
69
  export { default as IconNote } from './IconNote';
69
70
  export { default as IconNotebook } from './IconNotebook';
@@ -44,11 +44,14 @@ export { default as IconExternalLink } from './IconExternalLink';
44
44
  export { default as IconFiles } from './IconFiles';
45
45
  export { default as IconFilter } from './IconFilter';
46
46
  export { default as IconFlag } from './IconFlag';
47
+ export { default as IconFolderAdd } from './IconFolderAdd';
48
+ export { default as IconFolderDelete } from './IconFolderDelete';
47
49
  export { default as IconFolderMove } from './IconFolderMove';
48
50
  export { default as IconFolder } from './IconFolder';
49
51
  export { default as IconForgoing } from './IconForgoing';
50
52
  export { default as IconFullScreen } from './IconFullScreen';
51
53
  export { default as IconGlobe } from './IconGlobe';
54
+ export { default as IconGroupAvatar } from './IconGroupAvatar';
52
55
  export { default as IconHandMove } from './IconHandMove';
53
56
  export { default as IconHeadphone } from './IconHeadphone';
54
57
  export { default as IconHide } from './IconHide';
@@ -66,6 +69,7 @@ export { default as IconLink } from './IconLink';
66
69
  export { default as IconListOrder } from './IconListOrder';
67
70
  export { default as IconLoader } from './IconLoader';
68
71
  export { default as IconLock } from './IconLock';
72
+ export { default as IconMailRecall } from './IconMailRecall';
69
73
  export { default as IconMail } from './IconMail';
70
74
  export { default as IconMergeCells } from './IconMergeCells';
71
75
  export { default as IconMessageInfo } from './IconMessageInfo';
@@ -86,12 +90,14 @@ export { default as IconPlus } from './IconPlus';
86
90
  export { default as IconPointerDefault } from './IconPointerDefault';
87
91
  export { default as IconPointerHand } from './IconPointerHand';
88
92
  export { default as IconPrint } from './IconPrint';
93
+ export { default as IconQuestionMark } from './IconQuestionMark';
89
94
  export { default as IconQuestion } from './IconQuestion';
90
95
  export { default as IconRafterDown } from './IconRafterDown';
91
96
  export { default as IconRafterLeft } from './IconRafterLeft';
92
97
  export { default as IconRafterRight } from './IconRafterRight';
93
98
  export { default as IconRafterUp } from './IconRafterUp';
94
99
  export { default as IconReaction } from './IconReaction';
100
+ export { default as IconReadMail } from './IconReadMail';
95
101
  export { default as IconRecordPause } from './IconRecordPause';
96
102
  export { default as IconRecordStop } from './IconRecordStop';
97
103
  export { default as IconRecordVideo } from './IconRecordVideo';
@@ -135,9 +141,11 @@ export { default as IconTextVanilla } from './IconTextVanilla';
135
141
  export { default as IconToolCenter } from './IconToolCenter';
136
142
  export { default as IconTool } from './IconTool';
137
143
  export { default as IconTrendingUp } from './IconTrendingUp';
144
+ export { default as IconUndoAll } from './IconUndoAll';
138
145
  export { default as IconUndo } from './IconUndo';
139
146
  export { default as IconUnlink } from './IconUnlink';
140
147
  export { default as IconUnlock } from './IconUnlock';
148
+ export { default as IconUnreadMail } from './IconUnreadMail';
141
149
  export { default as IconUpload } from './IconUpload';
142
150
  export { default as IconUserSearch } from './IconUserSearch';
143
151
  export { default as IconUser } from './IconUser';
@@ -0,0 +1,42 @@
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 {};
@@ -0,0 +1,36 @@
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
+ };
@@ -0,0 +1 @@
1
+ export { default as ConfirmModal } from './ConfirmModal';
@@ -15,7 +15,7 @@ export interface FormDataProps {
15
15
  keyWords: string;
16
16
  }
17
17
  export default function usePublishModal({ onSuccess, resource }: ModalProps): {
18
- control: import('react-hook-form').Control<FormDataProps, any>;
18
+ control: import('react-hook-form').Control<FormDataProps, any, FormDataProps>;
19
19
  cover: string | File | Blob;
20
20
  formState: {
21
21
  errors: import('react-hook-form').FieldErrors<FormDataProps>;
@@ -25,7 +25,7 @@ export default function usePublishModal({ onSuccess, resource }: ModalProps): {
25
25
  };
26
26
  handleDeleteImage: () => void;
27
27
  handlePublish: SubmitHandler<FormDataProps>;
28
- handleSubmit: import('react-hook-form').UseFormHandleSubmit<FormDataProps, undefined>;
28
+ handleSubmit: import('react-hook-form').UseFormHandleSubmit<FormDataProps, FormDataProps>;
29
29
  handleUploadImage: (file: File | string) => void;
30
30
  register: import('react-hook-form').UseFormRegister<FormDataProps>;
31
31
  selectActivities: (value: string | number) => void;
@@ -1,3 +1,4 @@
1
+ export * from './ConfirmModal';
1
2
  export * from './OnboardingModal';
2
3
  export * from './PublishModal';
3
4
  export * from './ResourceModal';
@@ -0,0 +1,8 @@
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 {};
@@ -0,0 +1,20 @@
1
+ import { jsxs, jsx } from "react/jsx-runtime";
2
+ import { useTranslation } from "react-i18next";
3
+ import useWorkspaceFolders from "../../../hooks/useWorkspaceFolders/useWorkspaceFolders.js";
4
+ import Tree from "../../../components/Tree/components/Tree.js";
5
+ function WorkspaceFolders({
6
+ onFolderSelected
7
+ }) {
8
+ const {
9
+ t
10
+ } = useTranslation(), {
11
+ folderTree
12
+ } = useWorkspaceFolders();
13
+ return /* @__PURE__ */ jsxs("div", { className: "d-flex flex-column gap-12", children: [
14
+ /* @__PURE__ */ jsx("p", { children: t("attachments.add.to.folder.modal.description") }),
15
+ /* @__PURE__ */ jsx("div", { className: "border border-gray-400 rounded", children: /* @__PURE__ */ jsx("div", { className: "p-12", children: /* @__PURE__ */ jsx(Tree, { nodes: folderTree, onTreeItemClick: onFolderSelected }) }) })
16
+ ] });
17
+ }
18
+ export {
19
+ WorkspaceFolders as default
20
+ };
@@ -0,0 +1 @@
1
+ export { default as WorkspaceFolders } from './WorkspaceFolders';
@@ -7,3 +7,4 @@ export * from './MediaLibrary';
7
7
  export * from './VideoEmbed';
8
8
  export * from './VideoRecorder';
9
9
  export * from './Workspace';
10
+ export * from './WorkspaceFolders';