@edifice.io/react 2.3.2-develop-pedago.20251006170018 → 2.3.2-develop-b2school.20251007084406

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.
@@ -70,8 +70,7 @@ const Header = ({
70
70
  conversationWorflow,
71
71
  searchWorkflow,
72
72
  isCollapsed,
73
- toggleCollapsedNav,
74
- handleLogout
73
+ toggleCollapsedNav
75
74
  } = useHeader({
76
75
  user,
77
76
  avatar
@@ -104,7 +103,7 @@ const Header = ({
104
103
  ] }),
105
104
  /* @__PURE__ */ jsx(Help, { isHelpOpen, setIsHelpOpen, parsedContent, parsedHeadline, error })
106
105
  ] }) : null,
107
- /* @__PURE__ */ jsx(NavItem, { children: /* @__PURE__ */ jsxs("button", { className: "nav-link", onClick: handleLogout, children: [
106
+ /* @__PURE__ */ jsx(NavItem, { children: /* @__PURE__ */ jsxs("a", { href: "/auth/logout?callback=" + ((theme == null ? void 0 : theme.logoutCallback) ?? "/"), className: "nav-link", children: [
108
107
  /* @__PURE__ */ jsx(SvgIconDisconnect, { className: "icon logout" }),
109
108
  /* @__PURE__ */ jsx(VisuallyHidden, { children: t("navbar.disconnect") })
110
109
  ] }) }),
@@ -14,7 +14,7 @@ const WidgetAppsFooter = () => {
14
14
  } = useTranslation();
15
15
  return /* @__PURE__ */ jsxs("div", { className: "widget-body d-flex flex-wrap", children: [
16
16
  !bookmarkedApps.length && /* @__PURE__ */ jsx("div", { className: "text-dark", children: t("navbar.myapps.more") }),
17
- bookmarkedApps.slice(0, 6).map((app, index) => /* @__PURE__ */ jsx("a", { href: app.address, className: "bookmarked-app", children: /* @__PURE__ */ jsx(AppIcon, { app, size: "32" }) }, index))
17
+ bookmarkedApps.slice(0, 6).map((app, index) => /* @__PURE__ */ jsx("a", { href: app.address, className: "bookmarked-app", target: app.isExternal || app.category === "connector" ? "_blank" : void 0, children: /* @__PURE__ */ jsx(AppIcon, { app, size: "32" }) }, index))
18
18
  ] });
19
19
  };
20
20
  export {
@@ -1,9 +1,7 @@
1
1
  import { useState, useId, useCallback, useMemo } from "react";
2
- import { odeServices } from "@edifice.io/client";
3
2
  import { useHover } from "@uidotdev/usehooks";
4
3
  import { useTranslation } from "react-i18next";
5
4
  import { useEdificeClient } from "../../../providers/EdificeClientProvider/EdificeClientProvider.hook.js";
6
- import { useEdificeTheme } from "../../../providers/EdificeThemeProvider/EdificeThemeProvider.hook.js";
7
5
  import useBookmark from "../../../hooks/useBookmark/useBookmark.js";
8
6
  import useHasWorkflow from "../../../hooks/useHasWorkflow/useHasWorkflow.js";
9
7
  function useHeader({
@@ -14,15 +12,11 @@ function useHeader({
14
12
  appCode
15
13
  } = useEdificeClient(), {
16
14
  t
17
- } = useTranslation(), {
18
- theme
19
- } = useEdificeTheme(), title = t(appCode), [isCollapsed, setIsCollapsed] = useState(!0), [appsRef, isAppsHovered] = useHover(), popoverAppsId = useId(), popoverSearchId = useId(), userAvatar = avatar, userName = user == null ? void 0 : user.username, welcomeUser = t("welcome", {
15
+ } = useTranslation(), title = t(appCode), [isCollapsed, setIsCollapsed] = useState(!0), [appsRef, isAppsHovered] = useHover(), popoverAppsId = useId(), popoverSearchId = useId(), userAvatar = avatar, userName = user == null ? void 0 : user.username, welcomeUser = t("welcome", {
20
16
  username: user == null ? void 0 : user.firstName
21
17
  }), bookmarkedApps = useBookmark(), communityWorkflow = useHasWorkflow("net.atos.entng.community.controllers.CommunityController|view"), conversationWorflow = useHasWorkflow("org.entcore.conversation.controllers.ConversationController|view"), searchWorkflow = useHasWorkflow("fr.openent.searchengine.controllers.SearchEngineController|view"), toggleCollapsedNav = useCallback(() => {
22
18
  setIsCollapsed(!isCollapsed);
23
- }, [isCollapsed]), handleLogout = async () => {
24
- await odeServices.session().logout(), window.location.href = (theme == null ? void 0 : theme.logoutCallback) ?? "/auth/login";
25
- };
19
+ }, [isCollapsed]);
26
20
  return useMemo(() => ({
27
21
  title,
28
22
  bookmarkedApps,
@@ -37,9 +31,8 @@ function useHeader({
37
31
  conversationWorflow,
38
32
  searchWorkflow,
39
33
  isCollapsed,
40
- toggleCollapsedNav,
41
- handleLogout
42
- }), [appsRef, bookmarkedApps, communityWorkflow, conversationWorflow, handleLogout, isAppsHovered, isCollapsed, popoverAppsId, popoverSearchId, searchWorkflow, title, toggleCollapsedNav, userAvatar, userName, welcomeUser]);
34
+ toggleCollapsedNav
35
+ }), [appsRef, bookmarkedApps, communityWorkflow, conversationWorflow, isAppsHovered, isCollapsed, popoverAppsId, popoverSearchId, searchWorkflow, title, toggleCollapsedNav, userAvatar, userName, welcomeUser]);
43
36
  }
44
37
  export {
45
38
  useHeader as default
@@ -16,6 +16,8 @@ export * from './useHover';
16
16
  export * from './useHttpErrorToast';
17
17
  export * from './useImage';
18
18
  export * from './useIsAdml';
19
+ export * from './useIsAdmc';
20
+ export * from './useIsAdmlcOrAdmc';
19
21
  export * from './useKeyPress';
20
22
  export * from './useLibraryUrl';
21
23
  export * from './useMediaLibrary';
@@ -1,3 +1,5 @@
1
1
  import { CustomToastOptions } from '../../hooks/useToast/useToast';
2
- declare const useHttpErrorToast: (options?: CustomToastOptions) => string | undefined;
2
+ export declare const useHttpErrorToast: ({ active, ...options }: {
3
+ active?: boolean;
4
+ } & CustomToastOptions) => string | undefined;
3
5
  export default useHttpErrorToast;
@@ -2,29 +2,35 @@ import React, { useRef, useEffect } from "react";
2
2
  import { odeServices, LAYER_NAME } from "@edifice.io/client";
3
3
  import { useTranslation } from "react-i18next";
4
4
  import useToast from "../useToast/useToast.js";
5
- const useHttpErrorToast = (options) => {
5
+ const useHttpErrorToast = ({
6
+ active = !0,
7
+ ...options
8
+ }) => {
6
9
  const message = useRef(), toast = useToast(), {
7
10
  t
8
11
  } = useTranslation();
9
12
  return useEffect(() => {
10
- const subscription = odeServices.notify().events().subscribe(LAYER_NAME.TRANSPORT, (event) => {
11
- var _a;
12
- if (!(event != null && event.data)) return;
13
- const {
14
- response
15
- } = event.data, i18nKey = (
16
- // The payload may include the i18n key of the error message to show,
17
- ((_a = event.data.payload) == null ? void 0 : _a.error) || // otherwise, try showing the translation of some known HTTP error code.
18
- ([400, 401, 403, 404, 408, 413, 500, 504].includes(response == null ? void 0 : response.status) ? `e${event.data.response.status}` : void 0) || // otherwise try showing the statusText (may be technical, in english),
19
- (response == null ? void 0 : response.statusText)
20
- );
21
- typeof i18nKey == "string" && (message.current = t(i18nKey), toast.error(/* @__PURE__ */ React.createElement("div", {
22
- children: [message.current]
23
- }), options));
24
- });
25
- return () => subscription.revoke();
26
- }, [t, toast]), message.current;
13
+ if (active) {
14
+ const subscription = odeServices.notify().events().subscribe(LAYER_NAME.TRANSPORT, (event) => {
15
+ var _a;
16
+ if (!(event != null && event.data)) return;
17
+ const {
18
+ response
19
+ } = event.data, i18nKey = (
20
+ // The payload may include the i18n key of the error message to show,
21
+ ((_a = event.data.payload) == null ? void 0 : _a.error) || // otherwise, try showing the translation of some known HTTP error code.
22
+ ([400, 401, 403, 404, 408, 413, 500, 504].includes(response == null ? void 0 : response.status) ? `e${event.data.response.status}` : void 0) || // otherwise try showing the statusText (may be technical, in english),
23
+ (response == null ? void 0 : response.statusText)
24
+ );
25
+ typeof i18nKey == "string" && (message.current = t(i18nKey), toast.error(/* @__PURE__ */ React.createElement("div", {
26
+ children: [message.current]
27
+ }), options));
28
+ });
29
+ return () => subscription.revoke();
30
+ }
31
+ }, [t, toast, active]), message.current;
27
32
  };
28
33
  export {
29
- useHttpErrorToast as default
34
+ useHttpErrorToast as default,
35
+ useHttpErrorToast
30
36
  };
@@ -0,0 +1 @@
1
+ export { default as useIsAdmc } from './useIsAdmc';
@@ -0,0 +1,3 @@
1
+ export default function useIsAdmc(): {
2
+ isAdmc: boolean;
3
+ };
@@ -0,0 +1,22 @@
1
+ import { useState, useEffect, useCallback } from "react";
2
+ import { odeServices } from "@edifice.io/client";
3
+ function useIsAdmc() {
4
+ const [isAdmc, setIsAdmc] = useState(!1);
5
+ useEffect(() => {
6
+ initIsAdmc();
7
+ }, []);
8
+ const initIsAdmc = useCallback(async () => {
9
+ try {
10
+ const user = await odeServices.session().getUser(), hasSuperAdmin = !!(user != null && user.functions && user.functions.SUPER_ADMIN);
11
+ setIsAdmc(!!hasSuperAdmin);
12
+ } catch {
13
+ setIsAdmc(!1);
14
+ }
15
+ }, []);
16
+ return {
17
+ isAdmc
18
+ };
19
+ }
20
+ export {
21
+ useIsAdmc as default
22
+ };
@@ -0,0 +1 @@
1
+ export { default as useIsAdmlcOrAdmc } from './useIsAdmlcOrAdmc';
@@ -0,0 +1,3 @@
1
+ export default function useIsAdmlcOrAdmc(): {
2
+ isAdmlcOrAdmc: boolean;
3
+ };
@@ -0,0 +1,16 @@
1
+ import { useMemo } from "react";
2
+ import useIsAdml from "../useIsAdml/useIsAdml.js";
3
+ import useIsAdmc from "../useIsAdmc/useIsAdmc.js";
4
+ function useIsAdmlcOrAdmc() {
5
+ const {
6
+ isAdml
7
+ } = useIsAdml(), {
8
+ isAdmc
9
+ } = useIsAdmc();
10
+ return {
11
+ isAdmlcOrAdmc: useMemo(() => !!(isAdml || isAdmc), [isAdml, isAdmc])
12
+ };
13
+ }
14
+ export {
15
+ useIsAdmlcOrAdmc as default
16
+ };
package/dist/index.js CHANGED
@@ -60,45 +60,47 @@ import { default as default59 } from "./hooks/useDropzone/useDropzone.js";
60
60
  import { default as default60 } from "./hooks/useEdificeIcons/useEdificeIcons.js";
61
61
  import { default as default61 } from "./hooks/useHasWorkflow/useHasWorkflow.js";
62
62
  import { default as default62 } from "./hooks/useHover/useHover.js";
63
- import { default as default63 } from "./hooks/useHttpErrorToast/useHttpErrorToast.js";
64
- import { default as default64 } from "./hooks/useImage/useImage.js";
65
- import { default as default65 } from "./hooks/useIsAdml/useIsAdml.js";
66
- import { default as default66 } from "./hooks/useKeyPress/useKeyPress.js";
67
- import { default as default67 } from "./hooks/useLibraryUrl/useLibraryUrl.js";
68
- import { default as default68 } from "./hooks/useMediaLibrary/useMediaLibrary.js";
69
- import { default as default69 } from "./hooks/useScrollToTop/useScrollToTop.js";
70
- import { default as default70 } from "./hooks/useTitle/useTitle.js";
71
- import { default as default71 } from "./hooks/useToast/useToast.js";
72
- import { default as default72 } from "./hooks/useToggle/useToggle.js";
73
- import { default as default73 } from "./hooks/useTrapFocus/useTrapFocus.js";
74
- import { default as default74 } from "./hooks/useTrashedResource/useTrashedResource.js";
75
- import { default as default75 } from "./hooks/useUpload/useUpload.js";
76
- import { default as default76 } from "./hooks/useUploadFiles/useUploadFiles.js";
77
- import { default as default77 } from "./hooks/useUser/useUser.js";
78
- import { default as default78 } from "./hooks/useWorkspaceFile/useWorkspaceFile.js";
79
- import { default as default79 } from "./hooks/useWorkspaceFolders/useWorkspaceFolders.js";
80
- import { WORKSPACE_SHARED_FOLDER_ID, WORKSPACE_USER_FOLDER_ID, default as default80 } from "./hooks/useWorkspaceFolders/useWorkspaceFoldersTree.js";
81
- import { default as default81 } from "./hooks/useWorkspaceSearch/useWorkspaceSearch.js";
82
- import { default as default82 } from "./hooks/useXitiTrackPageLoad/useXitiTrackPageLoad.js";
83
- import { default as default83 } from "./hooks/useZendeskGuide/useZendeskGuide.js";
84
- import { default as default84 } from "./modules/modals/ConfirmModal/ConfirmModal.js";
85
- import { default as default85 } from "./modules/modals/OnboardingModal/OnboardingModal.js";
86
- import { default as default86 } from "./modules/modals/PublishModal/PublishModal.js";
87
- import { default as default87 } from "./modules/modals/ResourceModal/apps/BlogPublic.js";
88
- import { default as default88 } from "./modules/modals/ResourceModal/hooks/useUpdateMutation.js";
89
- import { default as default89 } from "./modules/modals/ShareModal/ShareModal.js";
90
- import { default as default90 } from "./modules/modals/ShareModal/apps/ShareBlog.js";
91
- import { default as default91 } from "./modules/modals/ShareModal/hooks/useShareMutation.js";
92
- import { default as default92 } from "./modules/multimedia/AudioRecorder/AudioRecorder.js";
93
- import { default as default93 } from "./modules/multimedia/Embed/Embed.js";
94
- import { default as default94 } from "./modules/multimedia/ImageEditor/components/ImageEditor.js";
95
- import { default as default95 } from "./modules/multimedia/ImagePicker/ImagePicker.js";
96
- import { default as default96 } from "./modules/multimedia/FileCard/FileCard.js";
97
- import { default as default97 } from "./modules/multimedia/MediaLibrary/MediaLibrary.js";
98
- import { default as default98 } from "./modules/multimedia/VideoEmbed/VideoEmbed.js";
99
- import { default as default99 } from "./modules/multimedia/VideoRecorder/VideoRecorder.js";
100
- import { default as default100 } from "./modules/multimedia/Workspace/Workspace.js";
101
- import { default as default101 } from "./modules/multimedia/WorkspaceFolders/WorkspaceFolders.js";
63
+ import { useHttpErrorToast } from "./hooks/useHttpErrorToast/useHttpErrorToast.js";
64
+ import { default as default63 } from "./hooks/useImage/useImage.js";
65
+ import { default as default64 } from "./hooks/useIsAdml/useIsAdml.js";
66
+ import { default as default65 } from "./hooks/useIsAdmc/useIsAdmc.js";
67
+ import { default as default66 } from "./hooks/useIsAdmlcOrAdmc/useIsAdmlcOrAdmc.js";
68
+ import { default as default67 } from "./hooks/useKeyPress/useKeyPress.js";
69
+ import { default as default68 } from "./hooks/useLibraryUrl/useLibraryUrl.js";
70
+ import { default as default69 } from "./hooks/useMediaLibrary/useMediaLibrary.js";
71
+ import { default as default70 } from "./hooks/useScrollToTop/useScrollToTop.js";
72
+ import { default as default71 } from "./hooks/useTitle/useTitle.js";
73
+ import { default as default72 } from "./hooks/useToast/useToast.js";
74
+ import { default as default73 } from "./hooks/useToggle/useToggle.js";
75
+ import { default as default74 } from "./hooks/useTrapFocus/useTrapFocus.js";
76
+ import { default as default75 } from "./hooks/useTrashedResource/useTrashedResource.js";
77
+ import { default as default76 } from "./hooks/useUpload/useUpload.js";
78
+ import { default as default77 } from "./hooks/useUploadFiles/useUploadFiles.js";
79
+ import { default as default78 } from "./hooks/useUser/useUser.js";
80
+ import { default as default79 } from "./hooks/useWorkspaceFile/useWorkspaceFile.js";
81
+ import { default as default80 } from "./hooks/useWorkspaceFolders/useWorkspaceFolders.js";
82
+ import { WORKSPACE_SHARED_FOLDER_ID, WORKSPACE_USER_FOLDER_ID, default as default81 } from "./hooks/useWorkspaceFolders/useWorkspaceFoldersTree.js";
83
+ import { default as default82 } from "./hooks/useWorkspaceSearch/useWorkspaceSearch.js";
84
+ import { default as default83 } from "./hooks/useXitiTrackPageLoad/useXitiTrackPageLoad.js";
85
+ import { default as default84 } from "./hooks/useZendeskGuide/useZendeskGuide.js";
86
+ import { default as default85 } from "./modules/modals/ConfirmModal/ConfirmModal.js";
87
+ import { default as default86 } from "./modules/modals/OnboardingModal/OnboardingModal.js";
88
+ import { default as default87 } from "./modules/modals/PublishModal/PublishModal.js";
89
+ import { default as default88 } from "./modules/modals/ResourceModal/apps/BlogPublic.js";
90
+ import { default as default89 } from "./modules/modals/ResourceModal/hooks/useUpdateMutation.js";
91
+ import { default as default90 } from "./modules/modals/ShareModal/ShareModal.js";
92
+ import { default as default91 } from "./modules/modals/ShareModal/apps/ShareBlog.js";
93
+ import { default as default92 } from "./modules/modals/ShareModal/hooks/useShareMutation.js";
94
+ import { default as default93 } from "./modules/multimedia/AudioRecorder/AudioRecorder.js";
95
+ import { default as default94 } from "./modules/multimedia/Embed/Embed.js";
96
+ import { default as default95 } from "./modules/multimedia/ImageEditor/components/ImageEditor.js";
97
+ import { default as default96 } from "./modules/multimedia/ImagePicker/ImagePicker.js";
98
+ import { default as default97 } from "./modules/multimedia/FileCard/FileCard.js";
99
+ import { default as default98 } from "./modules/multimedia/MediaLibrary/MediaLibrary.js";
100
+ import { default as default99 } from "./modules/multimedia/VideoEmbed/VideoEmbed.js";
101
+ import { default as default100 } from "./modules/multimedia/VideoRecorder/VideoRecorder.js";
102
+ import { default as default101 } from "./modules/multimedia/Workspace/Workspace.js";
103
+ import { default as default102 } from "./modules/multimedia/WorkspaceFolders/WorkspaceFolders.js";
102
104
  import { AccessiblePalette, DefaultPalette } from "./components/ColorPicker/ColorPalette.js";
103
105
  import { DropzoneContext, useDropzoneContext } from "./components/Dropzone/DropzoneContext.js";
104
106
  import { Column, Grid } from "./components/Grid/Grid.js";
@@ -134,11 +136,11 @@ export {
134
136
  default4 as AppHeader,
135
137
  default5 as AppIcon,
136
138
  default6 as Attachment,
137
- default92 as AudioRecorder,
139
+ default93 as AudioRecorder,
138
140
  default7 as Avatar,
139
141
  default8 as AvatarGroup,
140
142
  default9 as Badge,
141
- default87 as BlogPublic,
143
+ default88 as BlogPublic,
142
144
  default10 as Breadcrumb,
143
145
  default11 as Button,
144
146
  default37 as ButtonSkeleton,
@@ -148,7 +150,7 @@ export {
148
150
  default17 as ColorPickerItem,
149
151
  Column,
150
152
  default18 as Combobox,
151
- default84 as ConfirmModal,
153
+ default85 as ConfirmModal,
152
154
  DefaultPalette,
153
155
  DndTree,
154
156
  default19 as Dropdown,
@@ -158,10 +160,10 @@ export {
158
160
  EdificeClientProvider,
159
161
  EdificeThemeContext,
160
162
  EdificeThemeProvider,
161
- default93 as Embed,
163
+ default94 as Embed,
162
164
  default21 as EmptyScreen,
163
165
  ExternalLinker,
164
- default96 as FileCard,
166
+ default97 as FileCard,
165
167
  default22 as Flex,
166
168
  default24 as FormControl,
167
169
  default23 as FormText,
@@ -169,8 +171,8 @@ export {
169
171
  default25 as Heading,
170
172
  default12 as IconButton,
171
173
  default26 as Image,
172
- default94 as ImageEditor,
173
- default95 as ImagePicker,
174
+ default95 as ImageEditor,
175
+ default96 as ImagePicker,
174
176
  default27 as Input,
175
177
  InternalLinker,
176
178
  default28 as Label,
@@ -179,24 +181,24 @@ export {
179
181
  default29 as Loading,
180
182
  default30 as LoadingScreen,
181
183
  default31 as Logo,
182
- default97 as MediaLibrary,
184
+ default98 as MediaLibrary,
183
185
  Menu,
184
186
  MockedProvider,
185
187
  default32 as Modal,
186
- default85 as OnboardingModal,
188
+ default86 as OnboardingModal,
187
189
  Popover,
188
190
  PopoverBody,
189
191
  PopoverFooter,
190
192
  PopoverHeader,
191
193
  default33 as PreventPropagation,
192
- default86 as PublishModal,
194
+ default87 as PublishModal,
193
195
  default34 as Radio,
194
196
  ResourceModal,
195
197
  default35 as SearchBar,
196
198
  default13 as SearchButton,
197
199
  default36 as Select,
198
- default90 as ShareBlog,
199
- default89 as ShareModal,
200
+ default91 as ShareBlog,
201
+ default90 as ShareModal,
200
202
  default45 as SortableTree,
201
203
  default39 as StackedGroup,
202
204
  default40 as Stepper,
@@ -211,13 +213,13 @@ export {
211
213
  TreeNode,
212
214
  TreeNodeFolderWrapper,
213
215
  default47 as TreeView,
214
- default98 as VideoEmbed,
215
- default99 as VideoRecorder,
216
+ default99 as VideoEmbed,
217
+ default100 as VideoRecorder,
216
218
  default48 as VisuallyHidden,
217
219
  WORKSPACE_SHARED_FOLDER_ID,
218
220
  WORKSPACE_USER_FOLDER_ID,
219
- default100 as Workspace,
220
- default101 as WorkspaceFolders,
221
+ default101 as Workspace,
222
+ default102 as WorkspaceFolders,
221
223
  addNode,
222
224
  arrayUnique,
223
225
  buildTree,
@@ -263,30 +265,32 @@ export {
263
265
  useEdificeTheme,
264
266
  default61 as useHasWorkflow,
265
267
  default62 as useHover,
266
- default63 as useHttpErrorToast,
267
- default64 as useImage,
268
- default65 as useIsAdml,
269
- default66 as useKeyPress,
270
- default67 as useLibraryUrl,
271
- default68 as useMediaLibrary,
272
- default69 as useScrollToTop,
273
- default91 as useShareMutation,
274
- default70 as useTitle,
275
- default71 as useToast,
276
- default72 as useToggle,
277
- default73 as useTrapFocus,
278
- default74 as useTrashedResource,
268
+ useHttpErrorToast,
269
+ default63 as useImage,
270
+ default65 as useIsAdmc,
271
+ default64 as useIsAdml,
272
+ default66 as useIsAdmlcOrAdmc,
273
+ default67 as useKeyPress,
274
+ default68 as useLibraryUrl,
275
+ default69 as useMediaLibrary,
276
+ default70 as useScrollToTop,
277
+ default92 as useShareMutation,
278
+ default71 as useTitle,
279
+ default72 as useToast,
280
+ default73 as useToggle,
281
+ default74 as useTrapFocus,
282
+ default75 as useTrashedResource,
279
283
  useTreeSortable,
280
284
  useTreeView,
281
- default88 as useUpdateMutation,
282
- default75 as useUpload,
283
- default76 as useUploadFiles,
284
- default77 as useUser,
285
- default78 as useWorkspaceFile,
286
- default79 as useWorkspaceFolders,
287
- default80 as useWorkspaceFoldersTree,
288
- default81 as useWorkspaceSearch,
289
- default82 as useXitiTrackPageLoad,
290
- default83 as useZendeskGuide,
285
+ default89 as useUpdateMutation,
286
+ default76 as useUpload,
287
+ default77 as useUploadFiles,
288
+ default78 as useUser,
289
+ default79 as useWorkspaceFile,
290
+ default80 as useWorkspaceFolders,
291
+ default81 as useWorkspaceFoldersTree,
292
+ default82 as useWorkspaceSearch,
293
+ default83 as useXitiTrackPageLoad,
294
+ default84 as useZendeskGuide,
291
295
  wrapTreeNode
292
296
  };
@@ -1,6 +1,6 @@
1
1
  import { jsxs, jsx } from "react/jsx-runtime";
2
2
  import { useState, useEffect } from "react";
3
- import Mathematics from "@tiptap-pro/extension-mathematics";
3
+ import Mathematics from "@tiptap/extension-mathematics";
4
4
  import { useEditor, EditorContent } from "@tiptap/react";
5
5
  import StarterKit from "@tiptap/starter-kit";
6
6
  import { useTranslation } from "react-i18next";
@@ -7,7 +7,7 @@ import { Hyperlink } from "@edifice.io/tiptap-extensions/hyperlink";
7
7
  import { SpeechRecognition } from "@edifice.io/tiptap-extensions/speech-recognition";
8
8
  import { SpeechSynthesis } from "@edifice.io/tiptap-extensions/speech-synthesis";
9
9
  import { TableCell } from "@edifice.io/tiptap-extensions/table-cell";
10
- import { Mathematics } from "@tiptap-pro/extension-mathematics";
10
+ import { Mathematics } from "@tiptap/extension-mathematics";
11
11
  import Color from "@tiptap/extension-color";
12
12
  import Focus from "@tiptap/extension-focus";
13
13
  import FontFamily from "@tiptap/extension-font-family";
@@ -66,7 +66,7 @@ const OnboardingModal = /* @__PURE__ */ forwardRef(({
66
66
  isOnboarding ? handleCloseWithPreference() : handleCloseWithoutPreference();
67
67
  }, children: t(closeText || "explorer.modal.onboarding.trash.close") })
68
68
  ] })
69
- ] }), document.getElementById("portal"));
69
+ ] }), document.getElementById("portal") || document.body);
70
70
  });
71
71
  export {
72
72
  OnboardingModal as default
@@ -11,8 +11,8 @@ 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";
15
14
  import useHasWorkflow from "../../../hooks/useHasWorkflow/useHasWorkflow.js";
15
+ import { useHttpErrorToast } from "../../../hooks/useHttpErrorToast/useHttpErrorToast.js";
16
16
  import Modal from "../../../components/Modal/Modal.js";
17
17
  import { Tabs } from "../../../components/Tabs/components/Tabs.js";
18
18
  import Button from "../../../components/Button/Button.js";
@@ -78,13 +78,16 @@ const orderedTabs = [
78
78
  showLink,
79
79
  type,
80
80
  ...refModal.current
81
- })), useHttpErrorToast({
81
+ }));
82
+ const {
83
+ t
84
+ } = useTranslation(), workspaceCreateWorkflow = useHasWorkflow("org.entcore.workspace.controllers.WorkspaceController|addDocument"), videoCaptureWorkflow = useHasWorkflow("com.opendigitaleducation.video.controllers.VideoController|capture"), [type, setType] = useState(null);
85
+ useHttpErrorToast({
86
+ active: !!type,
82
87
  isDismissible: !0,
83
88
  duration: 1 / 0
84
89
  });
85
- const {
86
- t
87
- } = useTranslation(), workspaceCreateWorkflow = useHasWorkflow("org.entcore.workspace.controllers.WorkspaceController|addDocument"), videoCaptureWorkflow = useHasWorkflow("com.opendigitaleducation.video.controllers.VideoController|capture"), [type, setType] = useState(null), availableTabs = {
90
+ const availableTabs = {
88
91
  workspace: {
89
92
  id: "workspace",
90
93
  icon: /* @__PURE__ */ jsx(SvgIconFolder, {}),
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@edifice.io/react",
3
- "version": "2.3.2-develop-pedago.20251006170018",
3
+ "version": "2.3.2-develop-b2school.20251007084406",
4
4
  "description": "Edifice React Library",
5
5
  "keywords": [
6
6
  "react",
@@ -90,6 +90,7 @@
90
90
  "@tiptap/extension-image": "2.11.0",
91
91
  "@tiptap/extension-link": "2.11.0",
92
92
  "@tiptap/extension-list-item": "2.11.0",
93
+ "@tiptap/extension-mathematics": "2.22.0",
93
94
  "@tiptap/extension-placeholder": "2.11.0",
94
95
  "@tiptap/extension-subscript": "2.11.0",
95
96
  "@tiptap/extension-superscript": "2.11.0",
@@ -130,9 +131,9 @@
130
131
  "react-slugify": "^3.0.3",
131
132
  "swiper": "^10.1.0",
132
133
  "ua-parser-js": "^1.0.36",
133
- "@edifice.io/bootstrap": "2.3.2-develop-pedago.20251006170018",
134
- "@edifice.io/tiptap-extensions": "2.3.2-develop-pedago.20251006170018",
135
- "@edifice.io/utilities": "2.3.2-develop-pedago.20251006170018"
134
+ "@edifice.io/bootstrap": "2.3.2-develop-b2school.20251007084406",
135
+ "@edifice.io/tiptap-extensions": "2.3.2-develop-b2school.20251007084406",
136
+ "@edifice.io/utilities": "2.3.2-develop-b2school.20251007084406"
136
137
  },
137
138
  "devDependencies": {
138
139
  "@babel/plugin-transform-react-pure-annotations": "^7.23.3",
@@ -163,8 +164,8 @@
163
164
  "vite": "^5.4.11",
164
165
  "vite-plugin-dts": "^4.1.0",
165
166
  "vite-tsconfig-paths": "^5.0.1",
166
- "@edifice.io/client": "2.3.2-develop-pedago.20251006170018",
167
- "@edifice.io/config": "2.3.2-develop-pedago.20251006170018"
167
+ "@edifice.io/config": "2.3.2-develop-b2school.20251007084406",
168
+ "@edifice.io/client": "2.3.2-develop-b2school.20251007084406"
168
169
  },
169
170
  "peerDependencies": {
170
171
  "@react-spring/web": "^9.7.5",
@@ -174,9 +175,6 @@
174
175
  "react-hook-form": "^7.53.0",
175
176
  "react-i18next": "^14.1.0"
176
177
  },
177
- "optionalDependencies": {
178
- "@tiptap-pro/extension-mathematics": "2.2.1"
179
- },
180
178
  "publishConfig": {
181
179
  "access": "public"
182
180
  },