@edifice.io/react 2.4.2-develop-b2school-actualites.20251113165447 → 2.4.2-develop-pedago.20251118152821

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 (41) hide show
  1. package/dist/components/AppIcon/index.d.ts +0 -1
  2. package/dist/components/Flex/Flex.js +1 -1
  3. package/dist/components/Menu/components/MenuButton.d.ts +0 -2
  4. package/dist/components/Menu/components/MenuButton.js +4 -13
  5. package/dist/components/Select/Select.d.ts +2 -6
  6. package/dist/components/Select/Select.js +4 -10
  7. package/dist/components/index.d.ts +0 -2
  8. package/dist/editor.js +36 -40
  9. package/dist/hooks/index.d.ts +0 -1
  10. package/dist/icons.js +292 -294
  11. package/dist/index.js +78 -86
  12. package/dist/modules/comments/components/Comment.js +2 -2
  13. package/dist/modules/comments/components/CommentList.js +1 -1
  14. package/dist/modules/comments/constants.d.ts +0 -4
  15. package/dist/modules/comments/constants.js +1 -2
  16. package/dist/modules/comments/provider/CommentProvider.js +1 -2
  17. package/dist/modules/comments/types.d.ts +0 -4
  18. package/dist/modules/editor/components/Editor/index.d.ts +0 -2
  19. package/dist/modules/icons/components/index.d.ts +0 -1
  20. package/dist/modules/multimedia/FileCard/FileCard.js +1 -1
  21. package/dist/modules/multimedia/FileCard/FileIcon.js +1 -1
  22. package/dist/utilities/index.d.ts +0 -1
  23. package/package.json +6 -6
  24. package/dist/components/Divider/Divider.d.ts +0 -5
  25. package/dist/components/Divider/Divider.js +0 -21
  26. package/dist/components/Divider/index.d.ts +0 -1
  27. package/dist/components/SeparatedInfo/SeparatedInfo.d.ts +0 -6
  28. package/dist/components/SeparatedInfo/SeparatedInfo.js +0 -13
  29. package/dist/components/SeparatedInfo/index.d.ts +0 -1
  30. package/dist/hooks/useInfiniteScroll/index.d.ts +0 -1
  31. package/dist/hooks/useInfiniteScroll/useInfiniteScroll.d.ts +0 -33
  32. package/dist/hooks/useInfiniteScroll/useInfiniteScroll.js +0 -20
  33. package/dist/modules/editor/components/Editor/EditorPreview.d.ts +0 -14
  34. package/dist/modules/editor/components/Editor/EditorPreview.js +0 -56
  35. package/dist/modules/editor/components/Editor/EditorPreviewSkeleton.d.ts +0 -8
  36. package/dist/modules/editor/components/Editor/EditorPreviewSkeleton.js +0 -24
  37. package/dist/modules/icons/components/IconClockAlert.d.ts +0 -7
  38. package/dist/modules/icons/components/IconClockAlert.js +0 -17
  39. package/dist/utilities/react-query/index.d.ts +0 -1
  40. package/dist/utilities/react-query/react-query-utils.d.ts +0 -21
  41. package/dist/utilities/react-query/react-query-utils.js +0 -13
package/dist/index.js CHANGED
@@ -63,55 +63,52 @@ import { default as default62 } from "./hooks/useHasWorkflow/useHasWorkflow.js";
63
63
  import { default as default63 } from "./hooks/useHover/useHover.js";
64
64
  import { useHttpErrorToast } from "./hooks/useHttpErrorToast/useHttpErrorToast.js";
65
65
  import { default as default64 } from "./hooks/useImage/useImage.js";
66
- import { default as default65 } from "./hooks/useInfiniteScroll/useInfiniteScroll.js";
67
- import { default as default66 } from "./hooks/useIsAdml/useIsAdml.js";
68
- import { default as default67 } from "./hooks/useIsAdmc/useIsAdmc.js";
69
- import { default as default68 } from "./hooks/useIsAdmlcOrAdmc/useIsAdmlcOrAdmc.js";
70
- import { default as default69 } from "./hooks/useKeyPress/useKeyPress.js";
71
- import { default as default70 } from "./hooks/useLibraryUrl/useLibraryUrl.js";
72
- import { default as default71 } from "./hooks/useMediaLibrary/useMediaLibrary.js";
73
- import { default as default72 } from "./hooks/useScrollToTop/useScrollToTop.js";
74
- import { default as default73 } from "./hooks/useTitle/useTitle.js";
75
- import { default as default74 } from "./hooks/useToast/useToast.js";
76
- import { default as default75 } from "./hooks/useToggle/useToggle.js";
77
- import { default as default76 } from "./hooks/useTrapFocus/useTrapFocus.js";
78
- import { default as default77 } from "./hooks/useTrashedResource/useTrashedResource.js";
79
- import { default as default78 } from "./hooks/useUpload/useUpload.js";
80
- import { default as default79 } from "./hooks/useUploadFiles/useUploadFiles.js";
81
- import { default as default80 } from "./hooks/useUser/useUser.js";
82
- import { default as default81 } from "./hooks/useWorkspaceFile/useWorkspaceFile.js";
83
- import { default as default82 } from "./hooks/useWorkspaceFolders/useWorkspaceFolders.js";
84
- import { WORKSPACE_SHARED_FOLDER_ID, WORKSPACE_USER_FOLDER_ID, default as default83 } from "./hooks/useWorkspaceFolders/useWorkspaceFoldersTree.js";
85
- import { default as default84 } from "./hooks/useWorkspaceSearch/useWorkspaceSearch.js";
86
- import { default as default85 } from "./hooks/useXitiTrackPageLoad/useXitiTrackPageLoad.js";
87
- import { default as default86 } from "./hooks/useZendeskGuide/useZendeskGuide.js";
88
- import { default as default87 } from "./modules/modals/ConfirmModal/ConfirmModal.js";
89
- import { default as default88 } from "./modules/modals/OnboardingModal/OnboardingModal.js";
90
- import { default as default89 } from "./modules/modals/PublishModal/PublishModal.js";
91
- import { default as default90 } from "./modules/modals/ResourceModal/apps/BlogPublic.js";
92
- import { default as default91 } from "./modules/modals/ResourceModal/hooks/useUpdateMutation.js";
93
- import { default as default92 } from "./modules/modals/ShareModal/ShareModal.js";
94
- import { default as default93 } from "./modules/modals/ShareModal/apps/ShareBlog.js";
95
- import { default as default94 } from "./modules/modals/ShareModal/hooks/useShareMutation.js";
96
- import { default as default95 } from "./modules/multimedia/AudioRecorder/AudioRecorder.js";
97
- import { default as default96 } from "./modules/multimedia/Embed/Embed.js";
98
- import { default as default97 } from "./modules/multimedia/ImageEditor/components/ImageEditor.js";
99
- import { default as default98 } from "./modules/multimedia/ImagePicker/ImagePicker.js";
100
- import { default as default99 } from "./modules/multimedia/FileCard/FileCard.js";
101
- import { default as default100 } from "./modules/multimedia/MediaLibrary/MediaLibrary.js";
102
- import { default as default101 } from "./modules/multimedia/VideoEmbed/VideoEmbed.js";
103
- import { default as default102 } from "./modules/multimedia/VideoRecorder/VideoRecorder.js";
104
- import { default as default103 } from "./modules/multimedia/Workspace/Workspace.js";
105
- import { default as default104 } from "./modules/multimedia/WorkspaceFolders/WorkspaceFolders.js";
66
+ import { default as default65 } from "./hooks/useIsAdml/useIsAdml.js";
67
+ import { default as default66 } from "./hooks/useIsAdmc/useIsAdmc.js";
68
+ import { default as default67 } from "./hooks/useIsAdmlcOrAdmc/useIsAdmlcOrAdmc.js";
69
+ import { default as default68 } from "./hooks/useKeyPress/useKeyPress.js";
70
+ import { default as default69 } from "./hooks/useLibraryUrl/useLibraryUrl.js";
71
+ import { default as default70 } from "./hooks/useMediaLibrary/useMediaLibrary.js";
72
+ import { default as default71 } from "./hooks/useScrollToTop/useScrollToTop.js";
73
+ import { default as default72 } from "./hooks/useTitle/useTitle.js";
74
+ import { default as default73 } from "./hooks/useToast/useToast.js";
75
+ import { default as default74 } from "./hooks/useToggle/useToggle.js";
76
+ import { default as default75 } from "./hooks/useTrapFocus/useTrapFocus.js";
77
+ import { default as default76 } from "./hooks/useTrashedResource/useTrashedResource.js";
78
+ import { default as default77 } from "./hooks/useUpload/useUpload.js";
79
+ import { default as default78 } from "./hooks/useUploadFiles/useUploadFiles.js";
80
+ import { default as default79 } from "./hooks/useUser/useUser.js";
81
+ import { default as default80 } from "./hooks/useWorkspaceFile/useWorkspaceFile.js";
82
+ import { default as default81 } from "./hooks/useWorkspaceFolders/useWorkspaceFolders.js";
83
+ import { WORKSPACE_SHARED_FOLDER_ID, WORKSPACE_USER_FOLDER_ID, default as default82 } from "./hooks/useWorkspaceFolders/useWorkspaceFoldersTree.js";
84
+ import { default as default83 } from "./hooks/useWorkspaceSearch/useWorkspaceSearch.js";
85
+ import { default as default84 } from "./hooks/useXitiTrackPageLoad/useXitiTrackPageLoad.js";
86
+ import { default as default85 } from "./hooks/useZendeskGuide/useZendeskGuide.js";
87
+ import { default as default86 } from "./modules/modals/ConfirmModal/ConfirmModal.js";
88
+ import { default as default87 } from "./modules/modals/OnboardingModal/OnboardingModal.js";
89
+ import { default as default88 } from "./modules/modals/PublishModal/PublishModal.js";
90
+ import { default as default89 } from "./modules/modals/ResourceModal/apps/BlogPublic.js";
91
+ import { default as default90 } from "./modules/modals/ResourceModal/hooks/useUpdateMutation.js";
92
+ import { default as default91 } from "./modules/modals/ShareModal/ShareModal.js";
93
+ import { default as default92 } from "./modules/modals/ShareModal/apps/ShareBlog.js";
94
+ import { default as default93 } from "./modules/modals/ShareModal/hooks/useShareMutation.js";
95
+ import { default as default94 } from "./modules/multimedia/AudioRecorder/AudioRecorder.js";
96
+ import { default as default95 } from "./modules/multimedia/Embed/Embed.js";
97
+ import { default as default96 } from "./modules/multimedia/ImageEditor/components/ImageEditor.js";
98
+ import { default as default97 } from "./modules/multimedia/ImagePicker/ImagePicker.js";
99
+ import { default as default98 } from "./modules/multimedia/FileCard/FileCard.js";
100
+ import { default as default99 } from "./modules/multimedia/MediaLibrary/MediaLibrary.js";
101
+ import { default as default100 } from "./modules/multimedia/VideoEmbed/VideoEmbed.js";
102
+ import { default as default101 } from "./modules/multimedia/VideoRecorder/VideoRecorder.js";
103
+ import { default as default102 } from "./modules/multimedia/Workspace/Workspace.js";
104
+ import { default as default103 } from "./modules/multimedia/WorkspaceFolders/WorkspaceFolders.js";
106
105
  import { AccessiblePalette, DefaultPalette } from "./components/ColorPicker/ColorPalette.js";
107
- import { Divider } from "./components/Divider/Divider.js";
108
106
  import { DropzoneContext, useDropzoneContext } from "./components/Dropzone/DropzoneContext.js";
109
107
  import { Column, Grid } from "./components/Grid/Grid.js";
110
108
  import { Layout } from "./components/Layout/Layout.js";
111
109
  import { List } from "./components/List/List.js";
112
110
  import { Menu } from "./components/Menu/components/Menu.js";
113
111
  import { Popover, PopoverBody, PopoverFooter, PopoverHeader } from "./components/Popover/Popover.js";
114
- import { SeparatedInfo } from "./components/SeparatedInfo/SeparatedInfo.js";
115
112
  import { Tabs } from "./components/Tabs/components/Tabs.js";
116
113
  import { Toolbar } from "./components/Toolbar/Toolbar.js";
117
114
  import { useTreeSortable } from "./components/Tree/hooks/useTreeSortable.js";
@@ -132,7 +129,6 @@ import { useEdificeTheme } from "./providers/EdificeThemeProvider/EdificeThemePr
132
129
  import { MockedProvider } from "./providers/MockedProvider/MockedProvider.js";
133
130
  import { checkUserRight } from "./utilities/check-user-rights/check-user-rights.js";
134
131
  import { emptyScreenMapping } from "./utilities/emptyscreen-mapping/emptyscreen-mapping.js";
135
- import { invalidateQueriesWithFirstPage } from "./utilities/react-query/react-query-utils.js";
136
132
  import { mergeRefs, setRef } from "./utilities/refs/ref.js";
137
133
  export {
138
134
  AccessiblePalette,
@@ -141,11 +137,11 @@ export {
141
137
  default4 as AppHeader,
142
138
  default5 as AppIcon,
143
139
  default6 as Attachment,
144
- default95 as AudioRecorder,
140
+ default94 as AudioRecorder,
145
141
  default7 as Avatar,
146
142
  default8 as AvatarGroup,
147
143
  default9 as Badge,
148
- default90 as BlogPublic,
144
+ default89 as BlogPublic,
149
145
  default10 as Breadcrumb,
150
146
  default11 as Button,
151
147
  default38 as ButtonSkeleton,
@@ -155,9 +151,8 @@ export {
155
151
  default17 as ColorPickerItem,
156
152
  Column,
157
153
  default18 as Combobox,
158
- default87 as ConfirmModal,
154
+ default86 as ConfirmModal,
159
155
  DefaultPalette,
160
- Divider,
161
156
  DndTree,
162
157
  default19 as Dropdown,
163
158
  default20 as Dropzone,
@@ -166,10 +161,10 @@ export {
166
161
  EdificeClientProvider,
167
162
  EdificeThemeContext,
168
163
  EdificeThemeProvider,
169
- default96 as Embed,
164
+ default95 as Embed,
170
165
  default21 as EmptyScreen,
171
166
  ExternalLinker,
172
- default99 as FileCard,
167
+ default98 as FileCard,
173
168
  default22 as Flex,
174
169
  default24 as FormControl,
175
170
  default23 as FormText,
@@ -177,8 +172,8 @@ export {
177
172
  default25 as Heading,
178
173
  default12 as IconButton,
179
174
  default26 as Image,
180
- default97 as ImageEditor,
181
- default98 as ImagePicker,
175
+ default96 as ImageEditor,
176
+ default97 as ImagePicker,
182
177
  default27 as Input,
183
178
  InternalLinker,
184
179
  default28 as Label,
@@ -187,26 +182,25 @@ export {
187
182
  default29 as Loading,
188
183
  default30 as LoadingScreen,
189
184
  default31 as Logo,
190
- default100 as MediaLibrary,
185
+ default99 as MediaLibrary,
191
186
  Menu,
192
187
  MockedProvider,
193
188
  default32 as Modal,
194
- default88 as OnboardingModal,
189
+ default87 as OnboardingModal,
195
190
  Popover,
196
191
  PopoverBody,
197
192
  PopoverFooter,
198
193
  PopoverHeader,
199
194
  default33 as PreventPropagation,
200
- default89 as PublishModal,
195
+ default88 as PublishModal,
201
196
  default34 as Radio,
202
197
  default35 as RadioCard,
203
198
  ResourceModal,
204
199
  default36 as SearchBar,
205
200
  default13 as SearchButton,
206
201
  default37 as Select,
207
- SeparatedInfo,
208
- default93 as ShareBlog,
209
- default92 as ShareModal,
202
+ default92 as ShareBlog,
203
+ default91 as ShareModal,
210
204
  default46 as SortableTree,
211
205
  default40 as StackedGroup,
212
206
  default41 as Stepper,
@@ -221,13 +215,13 @@ export {
221
215
  TreeNode,
222
216
  TreeNodeFolderWrapper,
223
217
  default48 as TreeView,
224
- default101 as VideoEmbed,
225
- default102 as VideoRecorder,
218
+ default100 as VideoEmbed,
219
+ default101 as VideoRecorder,
226
220
  default49 as VisuallyHidden,
227
221
  WORKSPACE_SHARED_FOLDER_ID,
228
222
  WORKSPACE_USER_FOLDER_ID,
229
- default103 as Workspace,
230
- default104 as WorkspaceFolders,
223
+ default102 as Workspace,
224
+ default103 as WorkspaceFolders,
231
225
  addNode,
232
226
  arrayUnique,
233
227
  buildTree,
@@ -249,7 +243,6 @@ export {
249
243
  getIndicesToUpdate,
250
244
  getProjection,
251
245
  hasChildren,
252
- invalidateQueriesWithFirstPage,
253
246
  mergeRefs,
254
247
  modifyNode,
255
248
  moveNode,
@@ -276,31 +269,30 @@ export {
276
269
  default63 as useHover,
277
270
  useHttpErrorToast,
278
271
  default64 as useImage,
279
- default65 as useInfiniteScroll,
280
- default67 as useIsAdmc,
281
- default66 as useIsAdml,
282
- default68 as useIsAdmlcOrAdmc,
283
- default69 as useKeyPress,
284
- default70 as useLibraryUrl,
285
- default71 as useMediaLibrary,
286
- default72 as useScrollToTop,
287
- default94 as useShareMutation,
288
- default73 as useTitle,
289
- default74 as useToast,
290
- default75 as useToggle,
291
- default76 as useTrapFocus,
292
- default77 as useTrashedResource,
272
+ default66 as useIsAdmc,
273
+ default65 as useIsAdml,
274
+ default67 as useIsAdmlcOrAdmc,
275
+ default68 as useKeyPress,
276
+ default69 as useLibraryUrl,
277
+ default70 as useMediaLibrary,
278
+ default71 as useScrollToTop,
279
+ default93 as useShareMutation,
280
+ default72 as useTitle,
281
+ default73 as useToast,
282
+ default74 as useToggle,
283
+ default75 as useTrapFocus,
284
+ default76 as useTrashedResource,
293
285
  useTreeSortable,
294
286
  useTreeView,
295
- default91 as useUpdateMutation,
296
- default78 as useUpload,
297
- default79 as useUploadFiles,
298
- default80 as useUser,
299
- default81 as useWorkspaceFile,
300
- default82 as useWorkspaceFolders,
301
- default83 as useWorkspaceFoldersTree,
302
- default84 as useWorkspaceSearch,
303
- default85 as useXitiTrackPageLoad,
304
- default86 as useZendeskGuide,
287
+ default90 as useUpdateMutation,
288
+ default77 as useUpload,
289
+ default78 as useUploadFiles,
290
+ default79 as useUser,
291
+ default80 as useWorkspaceFile,
292
+ default81 as useWorkspaceFolders,
293
+ default82 as useWorkspaceFoldersTree,
294
+ default83 as useWorkspaceSearch,
295
+ default84 as useXitiTrackPageLoad,
296
+ default85 as useZendeskGuide,
305
297
  wrapTreeNode
306
298
  };
@@ -8,9 +8,9 @@ import { BadgeProfile } from "./BadgeProfile.js";
8
8
  import { CommentAvatar } from "./CommentAvatar.js";
9
9
  import { CommentDate } from "./CommentDate.js";
10
10
  import { CommentTitle } from "./CommentTitle.js";
11
+ import { TextCounter } from "./TextCounter.js";
11
12
  import { CommentDeleted } from "./CommentDeleted.js";
12
13
  import { CommentReplies } from "./CommentReplies.js";
13
- import { TextCounter } from "./TextCounter.js";
14
14
  import Button from "../../../components/Button/Button.js";
15
15
  import LoadingScreen from "../../../components/LoadingScreen/LoadingScreen.js";
16
16
  const DeleteModal = /* @__PURE__ */ lazy(() => import("./DeleteModal.js")), Comment = ({
@@ -73,7 +73,7 @@ const DeleteModal = /* @__PURE__ */ lazy(() => import("./DeleteModal.js")), Comm
73
73
  whiteSpace: "pre-line"
74
74
  }, children: content }),
75
75
  type === "edit" && /* @__PURE__ */ jsxs("div", { className: "ms-n8", children: [
76
- !(replyTo || options.disableReply) && /* @__PURE__ */ jsx(Button, { variant: "ghost", color: "tertiary", size: "sm", onClick: () => handleReplyToComment(comment.id), children: t("comment.reply") }),
76
+ !replyTo && /* @__PURE__ */ jsx(Button, { variant: "ghost", color: "tertiary", size: "sm", onClick: () => handleReplyToComment(comment.id), children: t("comment.reply") }),
77
77
  userId === authorId && /* @__PURE__ */ jsx(Button, { variant: "ghost", color: "tertiary", size: "sm", onClick: () => {
78
78
  handleModifyComment(comment.id), setValue(content);
79
79
  }, children: t("comment.edit") }),
@@ -14,7 +14,7 @@ function CommentList() {
14
14
  const {
15
15
  authorId
16
16
  } = comment, profile = ((_a = profiles == null ? void 0 : profiles.find((user2) => (user2 == null ? void 0 : user2.userId) === authorId)) == null ? void 0 : _a.profile) ?? "Guest";
17
- return /* @__PURE__ */ jsx("div", { id: `comment-${comment.id}`, children: /* @__PURE__ */ jsx(Comment, { comment, profile, userId: user == null ? void 0 : user.userId }) }, comment.id);
17
+ return /* @__PURE__ */ jsx("div", { children: /* @__PURE__ */ jsx(Comment, { comment, profile, userId: user == null ? void 0 : user.userId }) }, comment.id);
18
18
  });
19
19
  }
20
20
  export {
@@ -22,7 +22,3 @@ export declare const DEFAULT_MAX_REPLIES = 5;
22
22
  * Number of comments to add when adding more comment in the limited list
23
23
  */
24
24
  export declare const DEFAULT_ADD_REPLIES = 5;
25
- /**
26
- * Forbid replying to a comment. Defaults to false.
27
- */
28
- export declare const DEFAULT_DISABLE_REPLY = false;
@@ -1,8 +1,7 @@
1
- const DEFAULT_MAX_COMMENT_LENGTH = 200, DEFAULT_MAX_REPLY_LENGTH = 200, DEFAULT_MAX_COMMENTS = 4, DEFAULT_ADD_COMMENTS = 5, DEFAULT_MAX_REPLIES = 5, DEFAULT_ADD_REPLIES = 5, DEFAULT_DISABLE_REPLY = !1;
1
+ const DEFAULT_MAX_COMMENT_LENGTH = 200, DEFAULT_MAX_REPLY_LENGTH = 200, DEFAULT_MAX_COMMENTS = 4, DEFAULT_ADD_COMMENTS = 5, DEFAULT_MAX_REPLIES = 5, DEFAULT_ADD_REPLIES = 5;
2
2
  export {
3
3
  DEFAULT_ADD_COMMENTS,
4
4
  DEFAULT_ADD_REPLIES,
5
- DEFAULT_DISABLE_REPLY,
6
5
  DEFAULT_MAX_COMMENTS,
7
6
  DEFAULT_MAX_COMMENT_LENGTH,
8
7
  DEFAULT_MAX_REPLIES,
@@ -3,7 +3,7 @@ import { useMemo } from "react";
3
3
  import { CommentForm } from "../components/CommentForm.js";
4
4
  import { CommentHeader } from "../components/CommentHeader.js";
5
5
  import { CommentList } from "../components/CommentList.js";
6
- import { DEFAULT_DISABLE_REPLY, DEFAULT_ADD_REPLIES, DEFAULT_MAX_REPLIES, DEFAULT_ADD_COMMENTS, DEFAULT_MAX_COMMENTS, DEFAULT_MAX_REPLY_LENGTH, DEFAULT_MAX_COMMENT_LENGTH } from "../constants.js";
6
+ import { DEFAULT_ADD_REPLIES, DEFAULT_MAX_REPLIES, DEFAULT_ADD_COMMENTS, DEFAULT_MAX_COMMENTS, DEFAULT_MAX_REPLY_LENGTH, DEFAULT_MAX_COMMENT_LENGTH } from "../constants.js";
7
7
  import { CommentContext } from "../context/Context.js";
8
8
  import { useComments } from "../hooks/useComments.js";
9
9
  import Button from "../../../components/Button/Button.js";
@@ -20,7 +20,6 @@ const CommentProvider = ({
20
20
  additionalComments: DEFAULT_ADD_COMMENTS,
21
21
  maxReplies: DEFAULT_MAX_REPLIES,
22
22
  additionalReplies: DEFAULT_ADD_REPLIES,
23
- disableReply: DEFAULT_DISABLE_REPLY,
24
23
  ...commentOptions
25
24
  }, {
26
25
  type
@@ -104,10 +104,6 @@ export type CommentOptions = {
104
104
  * Number of replies to load additionally in the limited list
105
105
  */
106
106
  additionalReplies: number;
107
- /**
108
- * Forbid replying to a comment. Defaults to false.
109
- */
110
- disableReply: boolean;
111
107
  };
112
108
  export interface UserProfileResult {
113
109
  /**
@@ -1,5 +1,3 @@
1
1
  export * from './Editor';
2
2
  export { default as Editor } from './Editor';
3
- export { default as EditorPreview } from './EditorPreview';
4
- export { default as EditorPreviewSkeleton } from './EditorPreviewSkeleton';
5
3
  export { default as EditorSkeleton } from './EditorSkeleton';
@@ -24,7 +24,6 @@ export { default as IconCantoo } from './IconCantoo';
24
24
  export { default as IconCenter } from './IconCenter';
25
25
  export { default as IconCheck } from './IconCheck';
26
26
  export { default as IconChecklist } from './IconChecklist';
27
- export { default as IconClockAlert } from './IconClockAlert';
28
27
  export { default as IconClock } from './IconClock';
29
28
  export { default as IconCloseFullScreen } from './IconCloseFullScreen';
30
29
  export { default as IconClose } from './IconClose';
@@ -82,7 +82,7 @@ const FileCard = ({
82
82
  };
83
83
  return roleMappings[type2] || roleMappings.unknown;
84
84
  }
85
- const roleMap = getRoleMap(type ?? "unknown"), file = clsx("file position-relative rounded", (roleMap == null ? void 0 : roleMap.color) ?? "bg-yellow-200"), mediaSrc = type === "img" || type === "video" ? odeServices.workspace().getThumbnailUrl(doc) : null, hasThumbnail = useThumbnail(mediaSrc, {
85
+ const roleMap = getRoleMap(type ?? "unknown"), file = clsx("file position-relative rounded", (roleMap == null ? void 0 : roleMap.color) ?? "bg-yellow-200"), mediaSrc = doc.eType === "resource" ? doc.thumbnail : type === "img" || type === "video" ? odeServices.workspace().getThumbnailUrl(doc) : null, hasThumbnail = useThumbnail(mediaSrc, {
86
86
  ref
87
87
  }), imageStyles = hasThumbnail && {
88
88
  backgroundImage: `url(${mediaSrc})`,
@@ -5,7 +5,7 @@ const FileIcon = ({
5
5
  type,
6
6
  roleMap
7
7
  }) => {
8
- const hasShadow = typeof (roleMap == null ? void 0 : roleMap.icon) != "string" && type !== "unknown" && (roleMap == null ? void 0 : roleMap.hasShadow) !== !1, fileicon = clsx("position-absolute top-50 start-50 translate-middle", {
8
+ const hasShadow = typeof (roleMap == null ? void 0 : roleMap.icon) != "string" && type !== "unknown" && (roleMap == null ? void 0 : roleMap.hasShadow) !== !1, fileicon = clsx("position-absolute rounded-circle top-50 start-50 translate-middle", {
9
9
  "p-12 rounded-circle shadow": hasShadow
10
10
  }, roleMap == null ? void 0 : roleMap.color);
11
11
  return /* @__PURE__ */ jsx("div", { className: fileicon, children: (roleMap == null ? void 0 : roleMap.icon) ?? /* @__PURE__ */ jsx(SvgIconPaperclip, {}) });
@@ -1,4 +1,3 @@
1
1
  export * from './check-user-rights';
2
2
  export * from './emptyscreen-mapping';
3
- export * from './react-query';
4
3
  export * from './refs';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@edifice.io/react",
3
- "version": "2.4.2-develop-b2school-actualites.20251113165447",
3
+ "version": "2.4.2-develop-pedago.20251118152821",
4
4
  "description": "Edifice React Library",
5
5
  "keywords": [
6
6
  "react",
@@ -131,9 +131,9 @@
131
131
  "react-slugify": "^3.0.3",
132
132
  "swiper": "^10.1.0",
133
133
  "ua-parser-js": "^1.0.36",
134
- "@edifice.io/bootstrap": "2.4.2-develop-b2school-actualites.20251113165447",
135
- "@edifice.io/tiptap-extensions": "2.4.2-develop-b2school-actualites.20251113165447",
136
- "@edifice.io/utilities": "2.4.2-develop-b2school-actualites.20251113165447"
134
+ "@edifice.io/bootstrap": "2.4.2-develop-pedago.20251118152821",
135
+ "@edifice.io/tiptap-extensions": "2.4.2-develop-pedago.20251118152821",
136
+ "@edifice.io/utilities": "2.4.2-develop-pedago.20251118152821"
137
137
  },
138
138
  "devDependencies": {
139
139
  "@babel/plugin-transform-react-pure-annotations": "^7.23.3",
@@ -164,8 +164,8 @@
164
164
  "vite": "^5.4.11",
165
165
  "vite-plugin-dts": "^4.1.0",
166
166
  "vite-tsconfig-paths": "^5.0.1",
167
- "@edifice.io/client": "2.4.2-develop-b2school-actualites.20251113165447",
168
- "@edifice.io/config": "2.4.2-develop-b2school-actualites.20251113165447"
167
+ "@edifice.io/client": "2.4.2-develop-pedago.20251118152821",
168
+ "@edifice.io/config": "2.4.2-develop-pedago.20251118152821"
169
169
  },
170
170
  "peerDependencies": {
171
171
  "@react-spring/web": "^9.7.5",
@@ -1,5 +0,0 @@
1
- import { ReactNode } from 'react';
2
- export declare function Divider({ children, color, }: {
3
- children: ReactNode[];
4
- color: string;
5
- }): import("react/jsx-runtime").JSX.Element;
@@ -1,21 +0,0 @@
1
- import { jsxs, jsx } from "react/jsx-runtime";
2
- import Flex from "../Flex/Flex.js";
3
- function Divider({
4
- children,
5
- color = "var(--edifice-gray-400)"
6
- }) {
7
- return /* @__PURE__ */ jsxs(Flex, { align: "center", justify: "around", gap: "16", wrap: "nowrap", className: "flex-fill", children: [
8
- /* @__PURE__ */ jsx("hr", { className: "divider m-12 ms-0 flex-fill", style: {
9
- borderColor: color
10
- } }),
11
- /* @__PURE__ */ jsxs(Flex, { gap: "12", align: "center", justify: "around", children: [
12
- ...children
13
- ] }),
14
- /* @__PURE__ */ jsx("hr", { className: "divider m-12 me-0 flex-fill", style: {
15
- borderColor: color
16
- } })
17
- ] });
18
- }
19
- export {
20
- Divider
21
- };
@@ -1 +0,0 @@
1
- export * from './Divider';
@@ -1,6 +0,0 @@
1
- import { ReactNode } from 'react';
2
- export type SeparatedInfoProps = {
3
- children: ReactNode[];
4
- className?: string;
5
- };
6
- export declare function SeparatedInfo({ children, className }: SeparatedInfoProps): import("react/jsx-runtime").JSX.Element;
@@ -1,13 +0,0 @@
1
- import { jsxs } from "react/jsx-runtime";
2
- import Flex from "../Flex/Flex.js";
3
- function SeparatedInfo({
4
- children,
5
- className
6
- }) {
7
- return /* @__PURE__ */ jsxs(Flex, { direction: "row", className: `separated-info ${className}`, children: [
8
- ...children
9
- ] });
10
- }
11
- export {
12
- SeparatedInfo
13
- };
@@ -1 +0,0 @@
1
- export * from './SeparatedInfo';
@@ -1 +0,0 @@
1
- export { default as useInfiniteScroll } from './useInfiniteScroll';
@@ -1,33 +0,0 @@
1
- /**
2
- * A custom React hook that provides infinite scroll functionality using the Intersection Observer API.
3
- *
4
- * This hook returns a ref callback that can be attached to a DOM element (typically at the bottom
5
- * of a scrollable list). When that element becomes visible in the viewport, the provided callback
6
- * function is executed, allowing you to load more content.
7
- *
8
- * @param params - Configuration object for the infinite scroll hook
9
- * @param params.callback - Function to execute when the observed element intersects with the viewport
10
- * @param params.options - Optional Intersection Observer configuration options (defaults to { threshold: 0.1 })
11
- *
12
- * @returns A ref callback function that should be attached to the target DOM element
13
- *
14
- * @example
15
- * ```typescript
16
- * const loadMoreRef = useInfiniteScroll({
17
- * // Load more data when the element is visible
18
- * callback: loadMoreItems,
19
- * options: { threshold: 0.5 } // Trigger when 50% of element is visible
20
- * });
21
- *
22
- * return (
23
- * <div>
24
- * {items.map(item => <Item key={item.id} {...item} />)}
25
- * <div ref={loadMoreRef}>Loading...</div>
26
- * </div>
27
- * );
28
- * ```
29
- */
30
- export default function useInfiniteScroll({ callback, options, }: {
31
- callback: () => void;
32
- options?: IntersectionObserverInit;
33
- }): (node: HTMLElement | null) => void;
@@ -1,20 +0,0 @@
1
- import { useRef, useCallback } from "react";
2
- function useInfiniteScroll({
3
- callback,
4
- options = {
5
- threshold: 0.1
6
- }
7
- }) {
8
- const observerRef = useRef(null);
9
- return useCallback((node) => {
10
- if (observerRef.current && (observerRef.current.disconnect(), observerRef.current = null), !node) return;
11
- const observer = new IntersectionObserver(async (entries) => {
12
- for (const entry of entries)
13
- entry.isIntersecting && await callback();
14
- }, options);
15
- observer.observe(node), observerRef.current = observer;
16
- }, [callback, options]);
17
- }
18
- export {
19
- useInfiniteScroll as default
20
- };
@@ -1,14 +0,0 @@
1
- /**
2
- * Editor component properties
3
- */
4
- export interface EditorPreviewProps {
5
- /** Rich content to render. */
6
- content: string;
7
- /** Display with or without a border */
8
- variant?: 'outline' | 'ghost';
9
- onDetailClick?: () => void;
10
- onMediaClick?: () => void;
11
- maxMediaDisplayed?: number;
12
- }
13
- declare const EditorPreview: ({ content, variant, onDetailClick, onMediaClick, maxMediaDisplayed, }: EditorPreviewProps) => import("react/jsx-runtime").JSX.Element;
14
- export default EditorPreview;
@@ -1,56 +0,0 @@
1
- import { jsxs, jsx } from "react/jsx-runtime";
2
- import { useState, useEffect } from "react";
3
- import clsx from "clsx";
4
- import { getThumbnail } from "@edifice.io/utilities";
5
- import { useTranslation } from "react-i18next";
6
- import Image from "../../../../components/Image/Image.js";
7
- const EditorPreview = ({
8
- content,
9
- variant = "outline",
10
- onDetailClick,
11
- onMediaClick,
12
- maxMediaDisplayed = 3
13
- }) => {
14
- const {
15
- t
16
- } = useTranslation(), [summaryContent, setSummaryContent] = useState(""), [medias, setMedias] = useState([]), borderClass = clsx(variant === "outline" && "border rounded-3 py-12 px-16"), hasMediaCallback = onDetailClick || onMediaClick, handleMediaClick = (e) => {
17
- onMediaClick && (e.stopPropagation(), onMediaClick());
18
- };
19
- return useEffect(() => {
20
- const contentHTML = content;
21
- if (contentHTML) {
22
- const doc = new DOMParser().parseFromString(contentHTML, "text/html"), mediaElements = Array.from(doc.querySelectorAll("img, video, iframe, audio, embed"));
23
- setMedias(mediaElements.filter((el) => el.tagName.toLowerCase() === "img").map((el) => {
24
- const image = el;
25
- return image.src ? {
26
- url: getThumbnail(image.src, 0, 300),
27
- alt: image.alt
28
- } : {
29
- url: "",
30
- alt: ""
31
- };
32
- })), mediaElements.forEach((el) => {
33
- var _a;
34
- return (_a = el.parentNode) == null ? void 0 : _a.removeChild(el);
35
- }), setSummaryContent(doc.body.textContent || "");
36
- }
37
- }, [content]), /* @__PURE__ */ jsxs("div", { className: borderClass, "data-testid": "editor-preview", onClick: onDetailClick, tabIndex: onDetailClick ? -1 : void 0, role: onDetailClick ? "button" : void 0, children: [
38
- /* @__PURE__ */ jsx("div", { className: "flex-fill text-truncate text-truncate-2 post-preview-content overflow-hidden", style: {
39
- overflowWrap: "anywhere"
40
- }, children: summaryContent }),
41
- /* @__PURE__ */ jsx("div", { onClick: handleMediaClick, tabIndex: hasMediaCallback ? -1 : void 0, role: hasMediaCallback ? "button" : void 0, className: "d-flex align-items-center justify-content-center gap-24 px-32 pt-16", children: medias.slice(0, maxMediaDisplayed).map((media, index) => /* @__PURE__ */ jsxs("div", { className: clsx("position-relative col-12 col-md-4 ", {
42
- "d-none d-md-block": index >= 1
43
- }), children: [
44
- /* @__PURE__ */ jsx(Image, { alt: media.alt, objectFit: "cover", ratio: "16", className: "rounded", src: media.url, sizes: "" }),
45
- (index === 0 || index === 2) && medias.length - (index + 1) > 0 && /* @__PURE__ */ jsx("div", { className: clsx("position-absolute top-0 bottom-0 start-0 end-0 d-flex justify-content-center align-items-center rounded text-light bg-dark bg-opacity-50", {
46
- "d-flex d-md-none": index === 0,
47
- "d-none d-md-flex": index === 2
48
- }), children: t("editor.preview.moreMedia", {
49
- mediaCount: medias.length - (index + 1)
50
- }) })
51
- ] }, media.url)) })
52
- ] });
53
- };
54
- export {
55
- EditorPreview as default
56
- };
@@ -1,8 +0,0 @@
1
- /**
2
- * Editor component properties
3
- */
4
- export interface EditorPreviewSkeletonProps {
5
- variant?: 'outline' | 'ghost';
6
- }
7
- declare const EditorPreview: ({ variant }: EditorPreviewSkeletonProps) => import("react/jsx-runtime").JSX.Element;
8
- export default EditorPreview;