@edifice.io/react 2.1.0-develop-enabling.0 → 2.1.0-develop-b2school.20250204153130
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/README.md +3 -3
- package/dist/components/AppIcon/AppIcon.js +2 -2
- package/dist/components/Attachment/Attachment.js +1 -1
- package/dist/components/Button/Button.js +1 -1
- package/dist/components/Dropdown/DropdownTrigger.js +5 -1
- package/dist/components/Form/FormContext.js +1 -1
- package/dist/components/Form/FormControl.js +1 -1
- package/dist/components/Layout/components/Header.js +5 -4
- package/dist/components/Layout/components/WidgetApps.js +1 -1
- package/dist/{hooks/useHeader → components/Layout/hooks}/useHeader.js +6 -6
- package/dist/components/List/List.d.ts +9 -1
- package/dist/components/List/List.js +9 -9
- package/dist/components/Modal/Modal.js +1 -1
- package/dist/components/SearchBar/SearchBar.d.ts +1 -1
- package/dist/components/SearchBar/SearchBar.js +3 -1
- package/dist/components/Tree/components/SortableTree.js +3 -2
- package/dist/components/Tree/types/index.d.ts +1 -0
- package/dist/components/Tree/utilities/tree.d.ts +2 -1
- package/dist/hooks/index.d.ts +1 -5
- package/dist/hooks/useCheckable/useCheckable.js +1 -1
- package/dist/hooks/useConf/useConf.d.ts +2 -2
- package/dist/hooks/useConversation/useConversation.d.ts +1 -1
- package/dist/hooks/useConversation/useConversation.js +13 -17
- package/dist/hooks/useDropdown/useDropdown.js +1 -1
- package/dist/hooks/useDropzone/useDropzone.js +1 -1
- package/dist/hooks/useHasWorkflow/useHasWorkflow.js +3 -11
- package/dist/hooks/useHttpErrorToast/index.d.ts +1 -0
- package/dist/hooks/useHttpErrorToast/useHttpErrorToast.d.ts +3 -0
- package/dist/hooks/useHttpErrorToast/useHttpErrorToast.js +21 -0
- package/dist/hooks/useSession/useSession.d.ts +2 -1
- package/dist/hooks/useTrapFocus/useTrapFocus.d.ts +1 -1
- package/dist/hooks/useTrapFocus/useTrapFocus.js +3 -2
- package/dist/hooks/useUploadFiles/useUploadFiles.js +1 -1
- package/dist/hooks/useWorkspaceSearch/useWorkspaceSearch.js +3 -11
- package/dist/icons-apps.js +220 -218
- package/dist/icons.js +116 -112
- package/dist/index.js +138 -144
- package/dist/modules/audience/ReactionChoice.d.ts +13 -0
- package/dist/modules/audience/ReactionModal.Card.js +4 -4
- package/dist/modules/audience/ReactionModal.d.ts +24 -6
- package/dist/modules/audience/ReactionModal.js +12 -9
- package/dist/modules/audience/ReactionSummary.d.ts +9 -0
- package/dist/modules/audience/ViewsCounter.d.ts +10 -0
- package/dist/modules/audience/ViewsModal.d.ts +13 -1
- package/dist/modules/audience/ViewsModal.js +22 -19
- package/dist/modules/comments/components/Comment.js +10 -7
- package/dist/modules/comments/components/CommentAvatar.js +1 -1
- package/dist/modules/comments/components/DeleteModal.d.ts +7 -0
- package/dist/modules/comments/components/DeleteModal.js +19 -0
- package/dist/modules/comments/context/Context.d.ts +2 -0
- package/dist/modules/comments/hooks/useComments.d.ts +5 -2
- package/dist/modules/comments/hooks/useComments.js +1 -1
- package/dist/modules/comments/hooks/useCommentsContext.d.ts +1 -0
- package/dist/modules/comments/hooks/useProfileQueries.d.ts +4 -1
- package/dist/modules/comments/provider/CommentProvider.js +3 -2
- package/dist/modules/comments/types.d.ts +5 -1
- package/dist/modules/editor/components/Editor/Editor.js +2 -2
- package/dist/modules/editor/components/{Editor → MathsModal}/MathsModal.d.ts +1 -1
- package/dist/modules/editor/components/{Editor → MathsModal}/MathsModal.js +2 -3
- package/dist/modules/editor/components/MathsModal/index.d.ts +1 -0
- package/dist/modules/editor/components/Renderer/AttachmentRenderer.js +12 -7
- package/dist/modules/editor/components/Renderer/AudioRenderer.js +4 -1
- package/dist/modules/editor/components/Renderer/LinkerRenderer.js +1 -1
- package/dist/modules/editor/components/Renderer/MediaRenderer.js +10 -2
- package/dist/modules/editor/hooks/useCommentEditor.d.ts +1 -1
- package/dist/modules/editor/hooks/useSpeechRecognition.js +2 -0
- package/dist/modules/editor/hooks/useSpeechSynthetisis.js +2 -0
- package/dist/modules/editor/hooks/useTipTapEditor.d.ts +1 -1
- package/dist/modules/editor/hooks/useTipTapEditor.js +4 -4
- package/dist/modules/icons/components/IconReadMail.d.ts +7 -0
- package/dist/modules/icons/components/IconReadMail.js +16 -0
- package/dist/modules/icons/components/IconUnreadMail.d.ts +7 -0
- package/dist/modules/icons/components/IconUnreadMail.js +16 -0
- package/dist/modules/icons/components/apps/IconAppointments.d.ts +7 -0
- package/dist/modules/icons/components/apps/IconAppointments.js +12 -0
- package/dist/modules/icons/components/apps/index.d.ts +1 -0
- package/dist/modules/icons/components/index.d.ts +2 -0
- package/dist/modules/multimedia/MediaLibrary/MediaLibrary.js +5 -1
- package/dist/modules/multimedia/UploadCard/UploadCard.js +2 -2
- package/dist/modules/multimedia/index.d.ts +2 -0
- package/dist/multimedia.js +10 -6
- package/dist/providers/MockedProvider/MockedProvider.d.ts +4 -0
- package/dist/providers/MockedProvider/MockedProvider.js +20 -0
- package/dist/providers/index.d.ts +1 -0
- package/package.json +57 -54
- package/dist/hooks/useAvatar/index.d.ts +0 -1
- package/dist/hooks/useAvatar/useAvatar.d.ts +0 -6
- package/dist/hooks/useAvatar/useAvatar.js +0 -30
- package/dist/hooks/useHeader/index.d.ts +0 -1
- package/dist/hooks/useHeader/useHeader.d.ts +0 -5
- package/dist/providers/MockedDataProvider/MockedDataProvider.d.ts +0 -28
- package/dist/providers/MockedDataProvider/MockedDataProvider.js +0 -9
- package/dist/providers/MockedDataProvider/index.d.ts +0 -1
|
@@ -1,9 +1,11 @@
|
|
|
1
1
|
import { useState, useCallback } from "react";
|
|
2
|
+
import { odeServices } from "@edifice.io/client";
|
|
2
3
|
const useSpeechSynthetisis = (editor) => {
|
|
3
4
|
const [isActivated, setActivated] = useState(!1), toggle = useCallback(() => {
|
|
4
5
|
if (isActivated)
|
|
5
6
|
return editor == null || editor.commands.stopSpeechSynthesis(), setActivated(!1), !1;
|
|
6
7
|
{
|
|
8
|
+
odeServices.data().trackSpeechAndText("TTS");
|
|
7
9
|
const speech = (editor == null ? void 0 : editor.commands.startSpeechSynthesis()) || !1;
|
|
8
10
|
return setActivated(speech), speech;
|
|
9
11
|
}
|
|
@@ -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/core').Editor | null;
|
|
15
15
|
editable: boolean;
|
|
16
16
|
};
|
|
@@ -28,13 +28,13 @@ import { useTranslation } from "react-i18next";
|
|
|
28
28
|
import { useEdificeClient } from "../../../providers/EdificeClientProvider/EdificeClientProvider.hook.js";
|
|
29
29
|
import useUpload from "../../../hooks/useUpload/useUpload.js";
|
|
30
30
|
import VideoNodeView from "../components/NodeView/VideoNodeView.js";
|
|
31
|
-
import MediaRenderer from "../components/Renderer/MediaRenderer.js";
|
|
32
31
|
import AudioNodeView from "../components/NodeView/AudioNodeView.js";
|
|
33
|
-
import AudioRenderer from "../components/Renderer/AudioRenderer.js";
|
|
34
32
|
import LinkerNodeView from "../components/NodeView/LinkerNodeView.js";
|
|
35
|
-
import LinkerRenderer from "../components/Renderer/LinkerRenderer.js";
|
|
36
33
|
import ImageNodeView from "../components/NodeView/ImageNodeView.js";
|
|
37
34
|
import AttachmentNodeView from "../components/NodeView/AttachmentNodeView.js";
|
|
35
|
+
import MediaRenderer from "../components/Renderer/MediaRenderer.js";
|
|
36
|
+
import AudioRenderer from "../components/Renderer/AudioRenderer.js";
|
|
37
|
+
import LinkerRenderer from "../components/Renderer/LinkerRenderer.js";
|
|
38
38
|
import AttachmentRenderer from "../components/Renderer/AttachmentRenderer.js";
|
|
39
39
|
const useTipTapEditor = (editable, content, focus, placeholder, onContentChange, visibility = "protected") => {
|
|
40
40
|
const {
|
|
@@ -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", "
|
|
61
|
+
types: ["heading", "paragraph", "video"]
|
|
62
62
|
}), CustomHeading.configure({
|
|
63
63
|
levels: [1, 2]
|
|
64
64
|
}), Typography, FontSize, SpeechRecognition, SpeechSynthesis.configure({
|
|
@@ -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 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 SvgIconAppointments: ({ title, titleId, ...props }: SVGProps<SVGSVGElement> & SVGRProps) => import("react/jsx-runtime").JSX.Element;
|
|
7
|
+
export default SvgIconAppointments;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { jsxs, jsx } from "react/jsx-runtime";
|
|
2
|
+
const SvgIconAppointments = ({
|
|
3
|
+
title,
|
|
4
|
+
titleId,
|
|
5
|
+
...props
|
|
6
|
+
}) => /* @__PURE__ */ jsxs("svg", { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", width: "24", height: "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", d: "M18.616 5.414v-4.11c0-.72-.575-1.304-1.285-1.304s-1.286.584-1.286 1.304v4.11c0 .72.575 1.304 1.285 1.304s1.286-.583 1.286-1.304m-9.99-2.597V5.23c0 1.194-.947 2.156-2.124 2.156s-2.126-.962-2.126-2.156V2.817h-1.57C1.25 2.817 0 4.087 0 5.663v15.491C0 22.731 1.251 24 2.805 24h18.39C22.749 24 24 22.73 24 21.154V5.663c0-1.577-1.251-2.846-2.805-2.846h-1.81V5.23c0 1.194-.949 2.155-2.126 2.155s-2.125-.961-2.125-2.155V2.817zm3.048 6.83q.071 0 .141.006c.374.025.737.13 1.06.288 1.29.631 2.232 1.986 2.259 3.507.016.934-.515 1.722-1.153 2.159-.627.43-1.349.626-2.042.75.395.369.78.807 1.104 1.328.309.497.553.698.648.766l.004-.008.027-.035c.222-.268.477-1.095.477-1.095a.88.88 0 0 1 .386-.546.856.856 0 0 1 1.19.282.89.89 0 0 1 .108.662s-.166 1.013-.838 1.824c-.336.406-.997.824-1.71.653-.714-.17-1.227-.716-1.756-1.569-.441-.711-1.109-1.251-1.667-1.615.004.043.002.097 0 .15-.002.057-.004.114.001.158.144 1.131.438 1.678.438 1.678a.9.9 0 0 1 .06.668.87.87 0 0 1-.746.614.85.85 0 0 1-.633-.2.9.9 0 0 1-.212-.266s-.446-.882-.622-2.27-.113-3.353.783-5.676c.38-.987.964-1.69 1.704-2.015.324-.143.66-.202.99-.198m-.05 1.748a.7.7 0 0 0-.252.06c-.216.095-.513.348-.781 1.044-.318.825-.447 1.535-.557 2.223q.105.002.207.006c.36.014.726.027 1.368-.086.566-.1 1.098-.28 1.404-.489.306-.21.397-.332.391-.674-.012-.687-.662-1.656-1.28-1.957-.192-.094-.353-.134-.5-.127M7.817 1.305v4.11c0 .72-.576 1.303-1.286 1.303s-1.286-.583-1.286-1.304v-4.11C5.245.584 5.821 0 6.531 0s1.286.584 1.286 1.304" })
|
|
9
|
+
] });
|
|
10
|
+
export {
|
|
11
|
+
SvgIconAppointments as default
|
|
12
|
+
};
|
|
@@ -4,6 +4,7 @@ export { default as IconAdminPortal } from './IconAdminPortal';
|
|
|
4
4
|
export { default as IconAdmin } from './IconAdmin';
|
|
5
5
|
export { default as IconAdmissionPostBac } from './IconAdmissionPostBac';
|
|
6
6
|
export { default as IconAgenda } from './IconAgenda';
|
|
7
|
+
export { default as IconAppointments } from './IconAppointments';
|
|
7
8
|
export { default as IconArchive } from './IconArchive';
|
|
8
9
|
export { default as IconAssistance } from './IconAssistance';
|
|
9
10
|
export { default as IconAssr } from './IconAssr';
|
|
@@ -91,6 +91,7 @@ export { default as IconRafterLeft } from './IconRafterLeft';
|
|
|
91
91
|
export { default as IconRafterRight } from './IconRafterRight';
|
|
92
92
|
export { default as IconRafterUp } from './IconRafterUp';
|
|
93
93
|
export { default as IconReaction } from './IconReaction';
|
|
94
|
+
export { default as IconReadMail } from './IconReadMail';
|
|
94
95
|
export { default as IconRecordPause } from './IconRecordPause';
|
|
95
96
|
export { default as IconRecordStop } from './IconRecordStop';
|
|
96
97
|
export { default as IconRecordVideo } from './IconRecordVideo';
|
|
@@ -136,6 +137,7 @@ export { default as IconTrendingUp } from './IconTrendingUp';
|
|
|
136
137
|
export { default as IconUndo } from './IconUndo';
|
|
137
138
|
export { default as IconUnlink } from './IconUnlink';
|
|
138
139
|
export { default as IconUnlock } from './IconUnlock';
|
|
140
|
+
export { default as IconUnreadMail } from './IconUnreadMail';
|
|
139
141
|
export { default as IconUpload } from './IconUpload';
|
|
140
142
|
export { default as IconUserSearch } from './IconUserSearch';
|
|
141
143
|
export { default as IconUser } from './IconUser';
|
|
@@ -11,6 +11,7 @@ import SvgIconRecordVideo from "../../icons/components/IconRecordVideo.js";
|
|
|
11
11
|
import SvgIconSmartphone from "../../icons/components/IconSmartphone.js";
|
|
12
12
|
import { InnerTabs } from "./innertabs/index.js";
|
|
13
13
|
import { MediaLibraryContext } from "./MediaLibraryContext.js";
|
|
14
|
+
import useHttpErrorToast from "../../../hooks/useHttpErrorToast/useHttpErrorToast.js";
|
|
14
15
|
import useHasWorkflow from "../../../hooks/useHasWorkflow/useHasWorkflow.js";
|
|
15
16
|
import Modal from "../../../components/Modal/Modal.js";
|
|
16
17
|
import { Tabs } from "../../../components/Tabs/components/Tabs.js";
|
|
@@ -72,7 +73,10 @@ const orderedTabs = [
|
|
|
72
73
|
showLink,
|
|
73
74
|
type,
|
|
74
75
|
...refModal.current
|
|
75
|
-
}))
|
|
76
|
+
})), useHttpErrorToast({
|
|
77
|
+
isDismissible: !0,
|
|
78
|
+
duration: 1 / 0
|
|
79
|
+
});
|
|
76
80
|
const {
|
|
77
81
|
t
|
|
78
82
|
} = useTranslation(), workspaceCreateWorkflow = useHasWorkflow("org.entcore.workspace.controllers.WorkspaceController|addDocument"), videoCaptureWorkflow = useHasWorkflow("com.opendigitaleducation.video.controllers.VideoController|capture"), [type, setType] = useState(null), availableTabs = {
|
|
@@ -5,12 +5,12 @@ import SvgIconClose from "../../icons/components/IconClose.js";
|
|
|
5
5
|
import SvgIconReset from "../../icons/components/IconReset.js";
|
|
6
6
|
import SvgIconSuccessOutline from "../../icons/components/IconSuccessOutline.js";
|
|
7
7
|
import SvgIconWand from "../../icons/components/IconWand.js";
|
|
8
|
-
import Button from "../../../components/Button/Button.js";
|
|
9
|
-
import Image from "../../../components/Image/Image.js";
|
|
10
8
|
import Tooltip from "../../../components/Tooltip/Tooltip.js";
|
|
11
9
|
import Loading from "../../../components/Loading/Loading.js";
|
|
10
|
+
import Button from "../../../components/Button/Button.js";
|
|
12
11
|
import Card from "../../../components/Card/Card.js";
|
|
13
12
|
import IconButton from "../../../components/Button/IconButton.js";
|
|
13
|
+
import Image from "../../../components/Image/Image.js";
|
|
14
14
|
const UploadCard = ({
|
|
15
15
|
item,
|
|
16
16
|
status = "idle",
|
|
@@ -1,7 +1,9 @@
|
|
|
1
1
|
export * from './AudioRecorder';
|
|
2
2
|
export * from './Embed';
|
|
3
3
|
export * from './ImageEditor';
|
|
4
|
+
export * from './ImagePicker';
|
|
4
5
|
export * from './Linker';
|
|
5
6
|
export * from './MediaLibrary';
|
|
7
|
+
export * from './VideoEmbed';
|
|
6
8
|
export * from './VideoRecorder';
|
|
7
9
|
export * from './Workspace';
|
package/dist/multimedia.js
CHANGED
|
@@ -1,18 +1,22 @@
|
|
|
1
1
|
import { default as default2 } from "./modules/multimedia/AudioRecorder/AudioRecorder.js";
|
|
2
2
|
import { default as default3 } from "./modules/multimedia/Embed/Embed.js";
|
|
3
3
|
import { default as default4 } from "./modules/multimedia/ImageEditor/components/ImageEditor.js";
|
|
4
|
-
import { default as default5 } from "./modules/multimedia/
|
|
5
|
-
import { default as default6 } from "./modules/multimedia/
|
|
4
|
+
import { default as default5 } from "./modules/multimedia/VideoEmbed/VideoEmbed.js";
|
|
5
|
+
import { default as default6 } from "./modules/multimedia/VideoRecorder/VideoRecorder.js";
|
|
6
|
+
import { default as default7 } from "./modules/multimedia/Workspace/Workspace.js";
|
|
7
|
+
import { default as default8 } from "./modules/multimedia/ImagePicker/ImagePicker.js";
|
|
6
8
|
import { ExternalLinker } from "./modules/multimedia/Linker/ExternalLinker/ExternalLinker.js";
|
|
7
9
|
import { InternalLinker } from "./modules/multimedia/Linker/InternalLinker/InternalLinker.js";
|
|
8
|
-
import { default as
|
|
10
|
+
import { default as default9 } from "./modules/multimedia/MediaLibrary/MediaLibrary.js";
|
|
9
11
|
export {
|
|
10
12
|
default2 as AudioRecorder,
|
|
11
13
|
default3 as Embed,
|
|
12
14
|
ExternalLinker,
|
|
13
15
|
default4 as ImageEditor,
|
|
16
|
+
default8 as ImagePicker,
|
|
14
17
|
InternalLinker,
|
|
15
|
-
|
|
16
|
-
default5 as
|
|
17
|
-
default6 as
|
|
18
|
+
default9 as MediaLibrary,
|
|
19
|
+
default5 as VideoEmbed,
|
|
20
|
+
default6 as VideoRecorder,
|
|
21
|
+
default7 as Workspace
|
|
18
22
|
};
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { jsx } from "react/jsx-runtime";
|
|
2
|
+
import { QueryClientProvider, QueryClient } from "@tanstack/react-query";
|
|
3
|
+
import { EdificeClientProvider } from "../EdificeClientProvider/EdificeClientProvider.js";
|
|
4
|
+
import { EdificeThemeContext } from "../EdificeThemeProvider/EdificeThemeProvider.context.js";
|
|
5
|
+
const queryClient = new QueryClient(), Providers = ({
|
|
6
|
+
children
|
|
7
|
+
}) => /* @__PURE__ */ jsx(QueryClientProvider, { client: queryClient, children: /* @__PURE__ */ jsx(EdificeClientProvider, { params: {
|
|
8
|
+
app: "wiki"
|
|
9
|
+
}, children }) }), MockedProvider = ({
|
|
10
|
+
children
|
|
11
|
+
}) => {
|
|
12
|
+
const themeContextValue = {
|
|
13
|
+
theme: "default",
|
|
14
|
+
setTheme: vi.fn()
|
|
15
|
+
};
|
|
16
|
+
return /* @__PURE__ */ jsx(Providers, { children: /* @__PURE__ */ jsx(EdificeThemeContext.Provider, { value: themeContextValue, children }) });
|
|
17
|
+
};
|
|
18
|
+
export {
|
|
19
|
+
MockedProvider
|
|
20
|
+
};
|
|
@@ -4,3 +4,4 @@ export * from './EdificeClientProvider/EdificeClientProvider.hook';
|
|
|
4
4
|
export * from './EdificeThemeProvider/EdificeThemeProvider';
|
|
5
5
|
export * from './EdificeThemeProvider/EdificeThemeProvider.context';
|
|
6
6
|
export * from './EdificeThemeProvider/EdificeThemeProvider.hook';
|
|
7
|
+
export * from './MockedProvider/MockedProvider';
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@edifice.io/react",
|
|
3
|
-
"version": "2.1.0-develop-
|
|
3
|
+
"version": "2.1.0-develop-b2school.20250204153130",
|
|
4
4
|
"description": "Edifice React Library",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"react",
|
|
@@ -80,35 +80,34 @@
|
|
|
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.11.0",
|
|
84
|
+
"@tiptap/extension-character-count": "2.11.0",
|
|
85
|
+
"@tiptap/extension-color": "2.11.0",
|
|
86
|
+
"@tiptap/extension-focus": "2.11.0",
|
|
87
|
+
"@tiptap/extension-font-family": "2.11.0",
|
|
88
|
+
"@tiptap/extension-heading": "2.11.0",
|
|
89
|
+
"@tiptap/extension-highlight": "2.11.0",
|
|
90
|
+
"@tiptap/extension-image": "2.11.0",
|
|
91
|
+
"@tiptap/extension-link": "2.11.0",
|
|
92
|
+
"@tiptap/extension-list-item": "2.11.0",
|
|
93
|
+
"@tiptap/extension-placeholder": "2.11.0",
|
|
94
|
+
"@tiptap/extension-subscript": "2.11.0",
|
|
95
|
+
"@tiptap/extension-superscript": "2.11.0",
|
|
96
|
+
"@tiptap/extension-table": "2.11.0",
|
|
97
|
+
"@tiptap/extension-table-cell": "2.11.0",
|
|
98
|
+
"@tiptap/extension-table-header": "2.11.0",
|
|
99
|
+
"@tiptap/extension-table-row": "2.11.0",
|
|
100
|
+
"@tiptap/extension-text-align": "2.11.0",
|
|
101
|
+
"@tiptap/extension-text-style": "2.11.0",
|
|
102
|
+
"@tiptap/extension-typography": "2.11.0",
|
|
103
|
+
"@tiptap/extension-underline": "2.11.0",
|
|
104
|
+
"@tiptap/pm": "2.11.0",
|
|
105
|
+
"@tiptap/react": "2.11.0",
|
|
106
|
+
"@tiptap/starter-kit": "2.11.0",
|
|
107
107
|
"@uidotdev/usehooks": "^2.4.1",
|
|
108
|
-
"clsx": "
|
|
108
|
+
"clsx": "^2.1.1",
|
|
109
109
|
"dayjs": "1.11.10",
|
|
110
110
|
"emoji-picker-react": "4.5.2",
|
|
111
|
-
"globals": "^15.11.0",
|
|
112
111
|
"html-react-parser": "4.2.1",
|
|
113
112
|
"ohash": "1.1.3",
|
|
114
113
|
"pako": "2.1.0",
|
|
@@ -119,43 +118,46 @@
|
|
|
119
118
|
"react-slugify": "^3.0.3",
|
|
120
119
|
"swiper": "^10.1.0",
|
|
121
120
|
"ua-parser-js": "^1.0.36",
|
|
122
|
-
"@edifice.io/
|
|
123
|
-
"@edifice.io/
|
|
124
|
-
"@edifice.io/
|
|
121
|
+
"@edifice.io/bootstrap": "2.1.0-develop-b2school.20250204153130",
|
|
122
|
+
"@edifice.io/tiptap-extensions": "2.1.0-develop-b2school.20250204153130",
|
|
123
|
+
"@edifice.io/utilities": "2.1.0-develop-b2school.20250204153130"
|
|
125
124
|
},
|
|
126
125
|
"devDependencies": {
|
|
127
126
|
"@babel/plugin-transform-react-pure-annotations": "^7.23.3",
|
|
128
127
|
"@eslint/js": "^9.12.0",
|
|
129
128
|
"@react-spring/web": "^9.7.5",
|
|
130
129
|
"@svgr/cli": "^8.1.0",
|
|
131
|
-
"@tanstack/
|
|
132
|
-
"@
|
|
130
|
+
"@tanstack/query-core": "5.62.7",
|
|
131
|
+
"@tanstack/react-query": "5.62.7",
|
|
132
|
+
"@types/node": "^22.9.1",
|
|
133
133
|
"@types/pako": "^2.0.3",
|
|
134
|
-
"@types/react": "
|
|
135
|
-
"@types/react-dom": "
|
|
134
|
+
"@types/react": "^18.2.33",
|
|
135
|
+
"@types/react-dom": "^18.2.14",
|
|
136
136
|
"@types/ua-parser-js": "^0.7.37",
|
|
137
|
-
"@vitejs/plugin-react": "
|
|
137
|
+
"@vitejs/plugin-react": "^4.3.2",
|
|
138
138
|
"eslint": "^9.12.0",
|
|
139
139
|
"eslint-plugin-react-hooks": "5.1.0-rc.0",
|
|
140
140
|
"eslint-plugin-react-refresh": "^0.4.12",
|
|
141
|
-
"react": "
|
|
142
|
-
"react-dom": "
|
|
143
|
-
"react-hook-form": "
|
|
144
|
-
"react-i18next": "
|
|
141
|
+
"react": "^18.3.1",
|
|
142
|
+
"react-dom": "^18.3.1",
|
|
143
|
+
"react-hook-form": "^7.53.0",
|
|
144
|
+
"react-i18next": "^14.1.0",
|
|
145
145
|
"rollup-plugin-pure": "^0.2.1",
|
|
146
|
-
"rollup-plugin-visualizer": "
|
|
146
|
+
"rollup-plugin-visualizer": "5.12.0",
|
|
147
147
|
"typescript-eslint": "^8.8.1",
|
|
148
|
-
"vite": "
|
|
149
|
-
"vite-plugin-dts": "
|
|
150
|
-
"
|
|
148
|
+
"vite": "^5.4.11",
|
|
149
|
+
"vite-plugin-dts": "^4.1.0",
|
|
150
|
+
"vite-tsconfig-paths": "^5.0.1",
|
|
151
|
+
"@edifice.io/client": "2.1.0-develop-b2school.20250204153130",
|
|
152
|
+
"@edifice.io/config": "2.1.0-develop-b2school.20250204153130"
|
|
151
153
|
},
|
|
152
154
|
"peerDependencies": {
|
|
153
|
-
"@react-spring/web": "
|
|
154
|
-
"@tanstack/react-query": "
|
|
155
|
-
"react": "
|
|
156
|
-
"react-dom": "
|
|
157
|
-
"react-hook-form": "
|
|
158
|
-
"react-i18next": "
|
|
155
|
+
"@react-spring/web": "^9.7.5",
|
|
156
|
+
"@tanstack/react-query": "5.62.7",
|
|
157
|
+
"react": "^18.3.1",
|
|
158
|
+
"react-dom": "^18.3.1",
|
|
159
|
+
"react-hook-form": "^7.53.0",
|
|
160
|
+
"react-i18next": "^14.1.0"
|
|
159
161
|
},
|
|
160
162
|
"optionalDependencies": {
|
|
161
163
|
"@tiptap-pro/extension-mathematics": "2.2.1"
|
|
@@ -167,11 +169,12 @@
|
|
|
167
169
|
"scripts": {
|
|
168
170
|
"build": "pnpm build:icons && vite build",
|
|
169
171
|
"build:icons": "svgr src/modules/icons/assets --config-file ./svgr.config.cjs",
|
|
170
|
-
"fix": "eslint
|
|
172
|
+
"fix": "eslint --fix --report-unused-disable-directives --max-warnings 0",
|
|
171
173
|
"format": "pnpm run format:write && pnpm run format:check",
|
|
172
|
-
"format:check": "npx prettier --check
|
|
173
|
-
"format:write": "npx prettier --write
|
|
174
|
-
"lint": "eslint
|
|
175
|
-
"test": "vitest"
|
|
174
|
+
"format:check": "npx prettier --check \"src/**/*.{ts,tsx}\"",
|
|
175
|
+
"format:write": "npx prettier --write \"src/**/*.{ts,tsx}\"",
|
|
176
|
+
"lint": "eslint",
|
|
177
|
+
"test": "vitest",
|
|
178
|
+
"test:watch": "vitest --watch"
|
|
176
179
|
}
|
|
177
180
|
}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export { default as useAvatar } from './useAvatar';
|
|
@@ -1,30 +0,0 @@
|
|
|
1
|
-
import { jsx } from "react/jsx-runtime";
|
|
2
|
-
import { odeServices } from "@edifice.io/client";
|
|
3
|
-
import { useMemo } from "react";
|
|
4
|
-
import { useTranslation } from "react-i18next";
|
|
5
|
-
import Badge from "../../components/Badge/Badge.js";
|
|
6
|
-
function useAvatar(userId, userProfile) {
|
|
7
|
-
const {
|
|
8
|
-
t
|
|
9
|
-
} = useTranslation(), badge = useMemo(() => {
|
|
10
|
-
const profile = (userProfile == null ? void 0 : userProfile.toLowerCase()) ?? "guest";
|
|
11
|
-
return ["teacher", "student", "relative", "personnel"].includes(profile) ? /* @__PURE__ */ jsx(Badge, { variant: {
|
|
12
|
-
type: "user",
|
|
13
|
-
profile
|
|
14
|
-
}, children: t(profile) }) : null;
|
|
15
|
-
}, [userProfile, t]);
|
|
16
|
-
function getAvatarURL(userId2) {
|
|
17
|
-
return odeServices.directory().getAvatarUrl(userId2, "user");
|
|
18
|
-
}
|
|
19
|
-
function getUserbookURL(userId2) {
|
|
20
|
-
return odeServices.directory().getDirectoryUrl(userId2, "user");
|
|
21
|
-
}
|
|
22
|
-
return {
|
|
23
|
-
badge,
|
|
24
|
-
avatarURL: getAvatarURL(userId),
|
|
25
|
-
userbookURL: getUserbookURL(userId)
|
|
26
|
-
};
|
|
27
|
-
}
|
|
28
|
-
export {
|
|
29
|
-
useAvatar as default
|
|
30
|
-
};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export { default as useHeader } from './useHeader';
|
|
@@ -1,28 +0,0 @@
|
|
|
1
|
-
import { ReactNode } from 'react';
|
|
2
|
-
import { App, GetContextParameters, IResource, ResourceType, WorkspaceElement } from '@edifice.io/client';
|
|
3
|
-
export interface MockedDataProps {
|
|
4
|
-
children: ReactNode;
|
|
5
|
-
mocks: {
|
|
6
|
-
/** Current app code */
|
|
7
|
-
app?: App;
|
|
8
|
-
/** User's granted workflow rights */
|
|
9
|
-
workflows?: string[];
|
|
10
|
-
/** List of pseudo-documents from workspace. */
|
|
11
|
-
workspaceDocuments?: WorkspaceElement[];
|
|
12
|
-
/** List of available apps. */
|
|
13
|
-
availableApps?: App[];
|
|
14
|
-
/** List of pseudo-IResource by type. */
|
|
15
|
-
appResources?: {
|
|
16
|
-
[resourceType: ResourceType]: IResource[];
|
|
17
|
-
};
|
|
18
|
-
};
|
|
19
|
-
}
|
|
20
|
-
export interface MockedContextProps {
|
|
21
|
-
app?: App;
|
|
22
|
-
availableApps?: Promise<App[]>;
|
|
23
|
-
hasWorkflow?: (workflow: string) => Promise<boolean>;
|
|
24
|
-
listWorkspaceDocuments?: () => Promise<WorkspaceElement[]>;
|
|
25
|
-
loadResources?: (filters: GetContextParameters) => Promise<IResource[]>;
|
|
26
|
-
}
|
|
27
|
-
export declare function MockedDataProvider({ children, mocks }: MockedDataProps): import("react/jsx-runtime").JSX.Element;
|
|
28
|
-
export declare function useMockedData(): MockedContextProps | null;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export * from './MockedDataProvider';
|