@edifice.io/react 2.3.2-develop-b2school-actualites.20251008121205 → 2.3.2-develop-integration.20251009160859

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 (35) 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/index.d.ts +0 -2
  4. package/dist/editor.js +36 -40
  5. package/dist/hooks/index.d.ts +2 -0
  6. package/dist/hooks/useIsAdmc/index.d.ts +1 -0
  7. package/dist/hooks/useIsAdmc/useIsAdmc.d.ts +3 -0
  8. package/dist/hooks/useIsAdmc/useIsAdmc.js +22 -0
  9. package/dist/hooks/useIsAdmlcOrAdmc/index.d.ts +1 -0
  10. package/dist/hooks/useIsAdmlcOrAdmc/useIsAdmlcOrAdmc.d.ts +3 -0
  11. package/dist/hooks/useIsAdmlcOrAdmc/useIsAdmlcOrAdmc.js +16 -0
  12. package/dist/icons.js +292 -294
  13. package/dist/index.js +76 -76
  14. package/dist/modules/comments/components/Comment.js +1 -1
  15. package/dist/modules/comments/constants.d.ts +1 -0
  16. package/dist/modules/comments/constants.js +2 -1
  17. package/dist/modules/comments/provider/CommentProvider.js +2 -1
  18. package/dist/modules/comments/types.d.ts +4 -0
  19. package/dist/modules/editor/components/Editor/index.d.ts +0 -2
  20. package/dist/modules/icons/components/index.d.ts +0 -1
  21. package/dist/modules/modals/ResourceModal/ResourceModal.d.ts +1 -0
  22. package/dist/modules/modals/ResourceModal/ResourceModal.js +10 -3
  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/modules/editor/components/Editor/EditorPreview.d.ts +0 -14
  31. package/dist/modules/editor/components/Editor/EditorPreview.js +0 -56
  32. package/dist/modules/editor/components/Editor/EditorPreviewSkeleton.d.ts +0 -8
  33. package/dist/modules/editor/components/Editor/EditorPreviewSkeleton.js +0 -24
  34. package/dist/modules/icons/components/IconClockAlert.d.ts +0 -7
  35. package/dist/modules/icons/components/IconClockAlert.js +0 -17
package/dist/index.js CHANGED
@@ -63,51 +63,51 @@ import { default as default62 } from "./hooks/useHover/useHover.js";
63
63
  import { default as default63 } from "./hooks/useHttpErrorToast/useHttpErrorToast.js";
64
64
  import { default as default64 } from "./hooks/useImage/useImage.js";
65
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";
66
+ import { default as default66 } from "./hooks/useIsAdmc/useIsAdmc.js";
67
+ import { default as default67 } from "./hooks/useIsAdmlcOrAdmc/useIsAdmlcOrAdmc.js";
68
+ import { default as default68 } from "./hooks/useKeyPress/useKeyPress.js";
69
+ import { default as default69 } from "./hooks/useLibraryUrl/useLibraryUrl.js";
70
+ import { default as default70 } from "./hooks/useMediaLibrary/useMediaLibrary.js";
71
+ import { default as default71 } from "./hooks/useScrollToTop/useScrollToTop.js";
72
+ import { default as default72 } from "./hooks/useTitle/useTitle.js";
73
+ import { default as default73 } from "./hooks/useToast/useToast.js";
74
+ import { default as default74 } from "./hooks/useToggle/useToggle.js";
75
+ import { default as default75 } from "./hooks/useTrapFocus/useTrapFocus.js";
76
+ import { default as default76 } from "./hooks/useTrashedResource/useTrashedResource.js";
77
+ import { default as default77 } from "./hooks/useUpload/useUpload.js";
78
+ import { default as default78 } from "./hooks/useUploadFiles/useUploadFiles.js";
79
+ import { default as default79 } from "./hooks/useUser/useUser.js";
80
+ import { default as default80 } from "./hooks/useWorkspaceFile/useWorkspaceFile.js";
81
+ import { default as default81 } from "./hooks/useWorkspaceFolders/useWorkspaceFolders.js";
82
+ import { WORKSPACE_SHARED_FOLDER_ID, WORKSPACE_USER_FOLDER_ID, default as default82 } from "./hooks/useWorkspaceFolders/useWorkspaceFoldersTree.js";
83
+ import { default as default83 } from "./hooks/useWorkspaceSearch/useWorkspaceSearch.js";
84
+ import { default as default84 } from "./hooks/useXitiTrackPageLoad/useXitiTrackPageLoad.js";
85
+ import { default as default85 } from "./hooks/useZendeskGuide/useZendeskGuide.js";
86
+ import { default as default86 } from "./modules/modals/ConfirmModal/ConfirmModal.js";
87
+ import { default as default87 } from "./modules/modals/OnboardingModal/OnboardingModal.js";
88
+ import { default as default88 } from "./modules/modals/PublishModal/PublishModal.js";
89
+ import { default as default89 } from "./modules/modals/ResourceModal/apps/BlogPublic.js";
90
+ import { default as default90 } from "./modules/modals/ResourceModal/hooks/useUpdateMutation.js";
91
+ import { default as default91 } from "./modules/modals/ShareModal/ShareModal.js";
92
+ import { default as default92 } from "./modules/modals/ShareModal/apps/ShareBlog.js";
93
+ import { default as default93 } from "./modules/modals/ShareModal/hooks/useShareMutation.js";
94
+ import { default as default94 } from "./modules/multimedia/AudioRecorder/AudioRecorder.js";
95
+ import { default as default95 } from "./modules/multimedia/Embed/Embed.js";
96
+ import { default as default96 } from "./modules/multimedia/ImageEditor/components/ImageEditor.js";
97
+ import { default as default97 } from "./modules/multimedia/ImagePicker/ImagePicker.js";
98
+ import { default as default98 } from "./modules/multimedia/FileCard/FileCard.js";
99
+ import { default as default99 } from "./modules/multimedia/MediaLibrary/MediaLibrary.js";
100
+ import { default as default100 } from "./modules/multimedia/VideoEmbed/VideoEmbed.js";
101
+ import { default as default101 } from "./modules/multimedia/VideoRecorder/VideoRecorder.js";
102
+ import { default as default102 } from "./modules/multimedia/Workspace/Workspace.js";
103
+ import { default as default103 } from "./modules/multimedia/WorkspaceFolders/WorkspaceFolders.js";
102
104
  import { AccessiblePalette, DefaultPalette } from "./components/ColorPicker/ColorPalette.js";
103
- import { Divider } from "./components/Divider/Divider.js";
104
105
  import { DropzoneContext, useDropzoneContext } from "./components/Dropzone/DropzoneContext.js";
105
106
  import { Column, Grid } from "./components/Grid/Grid.js";
106
107
  import { Layout } from "./components/Layout/Layout.js";
107
108
  import { List } from "./components/List/List.js";
108
109
  import { Menu } from "./components/Menu/components/Menu.js";
109
110
  import { Popover, PopoverBody, PopoverFooter, PopoverHeader } from "./components/Popover/Popover.js";
110
- import { SeparatedInfo } from "./components/SeparatedInfo/SeparatedInfo.js";
111
111
  import { Tabs } from "./components/Tabs/components/Tabs.js";
112
112
  import { Toolbar } from "./components/Toolbar/Toolbar.js";
113
113
  import { useTreeSortable } from "./components/Tree/hooks/useTreeSortable.js";
@@ -136,11 +136,11 @@ export {
136
136
  default4 as AppHeader,
137
137
  default5 as AppIcon,
138
138
  default6 as Attachment,
139
- default92 as AudioRecorder,
139
+ default94 as AudioRecorder,
140
140
  default7 as Avatar,
141
141
  default8 as AvatarGroup,
142
142
  default9 as Badge,
143
- default87 as BlogPublic,
143
+ default89 as BlogPublic,
144
144
  default10 as Breadcrumb,
145
145
  default11 as Button,
146
146
  default37 as ButtonSkeleton,
@@ -150,9 +150,8 @@ export {
150
150
  default17 as ColorPickerItem,
151
151
  Column,
152
152
  default18 as Combobox,
153
- default84 as ConfirmModal,
153
+ default86 as ConfirmModal,
154
154
  DefaultPalette,
155
- Divider,
156
155
  DndTree,
157
156
  default19 as Dropdown,
158
157
  default20 as Dropzone,
@@ -161,10 +160,10 @@ export {
161
160
  EdificeClientProvider,
162
161
  EdificeThemeContext,
163
162
  EdificeThemeProvider,
164
- default93 as Embed,
163
+ default95 as Embed,
165
164
  default21 as EmptyScreen,
166
165
  ExternalLinker,
167
- default96 as FileCard,
166
+ default98 as FileCard,
168
167
  default22 as Flex,
169
168
  default24 as FormControl,
170
169
  default23 as FormText,
@@ -172,8 +171,8 @@ export {
172
171
  default25 as Heading,
173
172
  default12 as IconButton,
174
173
  default26 as Image,
175
- default94 as ImageEditor,
176
- default95 as ImagePicker,
174
+ default96 as ImageEditor,
175
+ default97 as ImagePicker,
177
176
  default27 as Input,
178
177
  InternalLinker,
179
178
  default28 as Label,
@@ -182,25 +181,24 @@ export {
182
181
  default29 as Loading,
183
182
  default30 as LoadingScreen,
184
183
  default31 as Logo,
185
- default97 as MediaLibrary,
184
+ default99 as MediaLibrary,
186
185
  Menu,
187
186
  MockedProvider,
188
187
  default32 as Modal,
189
- default85 as OnboardingModal,
188
+ default87 as OnboardingModal,
190
189
  Popover,
191
190
  PopoverBody,
192
191
  PopoverFooter,
193
192
  PopoverHeader,
194
193
  default33 as PreventPropagation,
195
- default86 as PublishModal,
194
+ default88 as PublishModal,
196
195
  default34 as Radio,
197
196
  ResourceModal,
198
197
  default35 as SearchBar,
199
198
  default13 as SearchButton,
200
199
  default36 as Select,
201
- SeparatedInfo,
202
- default90 as ShareBlog,
203
- default89 as ShareModal,
200
+ default92 as ShareBlog,
201
+ default91 as ShareModal,
204
202
  default45 as SortableTree,
205
203
  default39 as StackedGroup,
206
204
  default40 as Stepper,
@@ -215,13 +213,13 @@ export {
215
213
  TreeNode,
216
214
  TreeNodeFolderWrapper,
217
215
  default47 as TreeView,
218
- default98 as VideoEmbed,
219
- default99 as VideoRecorder,
216
+ default100 as VideoEmbed,
217
+ default101 as VideoRecorder,
220
218
  default48 as VisuallyHidden,
221
219
  WORKSPACE_SHARED_FOLDER_ID,
222
220
  WORKSPACE_USER_FOLDER_ID,
223
- default100 as Workspace,
224
- default101 as WorkspaceFolders,
221
+ default102 as Workspace,
222
+ default103 as WorkspaceFolders,
225
223
  addNode,
226
224
  arrayUnique,
227
225
  buildTree,
@@ -269,28 +267,30 @@ export {
269
267
  default62 as useHover,
270
268
  default63 as useHttpErrorToast,
271
269
  default64 as useImage,
270
+ default66 as useIsAdmc,
272
271
  default65 as useIsAdml,
273
- default66 as useKeyPress,
274
- default67 as useLibraryUrl,
275
- default68 as useMediaLibrary,
276
- default69 as useScrollToTop,
277
- default91 as useShareMutation,
278
- default70 as useTitle,
279
- default71 as useToast,
280
- default72 as useToggle,
281
- default73 as useTrapFocus,
282
- default74 as useTrashedResource,
272
+ default67 as useIsAdmlcOrAdmc,
273
+ default68 as useKeyPress,
274
+ default69 as useLibraryUrl,
275
+ default70 as useMediaLibrary,
276
+ default71 as useScrollToTop,
277
+ default93 as useShareMutation,
278
+ default72 as useTitle,
279
+ default73 as useToast,
280
+ default74 as useToggle,
281
+ default75 as useTrapFocus,
282
+ default76 as useTrashedResource,
283
283
  useTreeSortable,
284
284
  useTreeView,
285
- default88 as useUpdateMutation,
286
- default75 as useUpload,
287
- default76 as useUploadFiles,
288
- default77 as useUser,
289
- default78 as useWorkspaceFile,
290
- default79 as useWorkspaceFolders,
291
- default80 as useWorkspaceFoldersTree,
292
- default81 as useWorkspaceSearch,
293
- default82 as useXitiTrackPageLoad,
294
- default83 as useZendeskGuide,
285
+ default90 as useUpdateMutation,
286
+ default77 as useUpload,
287
+ default78 as useUploadFiles,
288
+ default79 as useUser,
289
+ default80 as useWorkspaceFile,
290
+ default81 as useWorkspaceFolders,
291
+ default82 as useWorkspaceFoldersTree,
292
+ default83 as useWorkspaceSearch,
293
+ default84 as useXitiTrackPageLoad,
294
+ default85 as useZendeskGuide,
295
295
  wrapTreeNode
296
296
  };
@@ -71,7 +71,7 @@ const DeleteModal = /* @__PURE__ */ lazy(() => import("./DeleteModal.js")), Comm
71
71
  ] }) : /* @__PURE__ */ jsxs(Fragment, { children: [
72
72
  /* @__PURE__ */ jsx("div", { className: "mt-8 mb-4", children: content }),
73
73
  type === "edit" && /* @__PURE__ */ jsxs("div", { className: "ms-n8", children: [
74
- !replyTo && /* @__PURE__ */ jsx(Button, { variant: "ghost", color: "tertiary", size: "sm", onClick: () => handleReplyToComment(comment.id), children: t("comment.reply") }),
74
+ !replyTo && options.allowReplies && /* @__PURE__ */ jsx(Button, { variant: "ghost", color: "tertiary", size: "sm", onClick: () => handleReplyToComment(comment.id), children: t("comment.reply") }),
75
75
  userId === authorId && /* @__PURE__ */ jsx(Button, { variant: "ghost", color: "tertiary", size: "sm", onClick: () => {
76
76
  handleModifyComment(comment.id), setValue(content);
77
77
  }, children: t("comment.edit") }),
@@ -22,3 +22,4 @@ 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
+ export declare const DEFAULT_ALLOW_REPLIES = true;
@@ -1,7 +1,8 @@
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;
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_ALLOW_REPLIES = !0;
2
2
  export {
3
3
  DEFAULT_ADD_COMMENTS,
4
4
  DEFAULT_ADD_REPLIES,
5
+ DEFAULT_ALLOW_REPLIES,
5
6
  DEFAULT_MAX_COMMENTS,
6
7
  DEFAULT_MAX_COMMENT_LENGTH,
7
8
  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_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_ALLOW_REPLIES, 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,6 +20,7 @@ const CommentProvider = ({
20
20
  additionalComments: DEFAULT_ADD_COMMENTS,
21
21
  maxReplies: DEFAULT_MAX_REPLIES,
22
22
  additionalReplies: DEFAULT_ADD_REPLIES,
23
+ allowReplies: DEFAULT_ALLOW_REPLIES,
23
24
  ...commentOptions
24
25
  }, {
25
26
  type
@@ -104,6 +104,10 @@ export type CommentOptions = {
104
104
  * Number of replies to load additionally in the limited list
105
105
  */
106
106
  additionalReplies: number;
107
+ /**
108
+ * Allow replying to comments
109
+ */
110
+ allowReplies: boolean;
107
111
  };
108
112
  export interface UserProfileResult {
109
113
  /**
@@ -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';
@@ -6,6 +6,7 @@ export interface FormInputs {
6
6
  description: string;
7
7
  enablePublic: boolean;
8
8
  formSlug: string;
9
+ allowReplies: boolean;
9
10
  }
10
11
  /**
11
12
  * Custom translations interface for overriding default translations
@@ -8,6 +8,7 @@ import { TextareaCounter } from "../../../components/TextArea/TextareaCounter.js
8
8
  import ImagePicker from "../../multimedia/ImagePicker/ImagePicker.js";
9
9
  import { useThumb } from "./hooks/useThumb.js";
10
10
  import { useEdificeClient } from "../../../providers/EdificeClientProvider/EdificeClientProvider.hook.js";
11
+ import useHasWorkflow from "../../../hooks/useHasWorkflow/useHasWorkflow.js";
11
12
  import useToast from "../../../hooks/useToast/useToast.js";
12
13
  import useResource from "../../../hooks/useResource/useResource.js";
13
14
  import useMediaLibrary from "../../../hooks/useMediaLibrary/useMediaLibrary.js";
@@ -35,7 +36,7 @@ const DEFAULT_INPUT_MAX_LENGTH = 60, DEFAULT_TEXTAREA_MAX_LENGTH = 400, Resource
35
36
  const {
36
37
  appCode: contextAppCode,
37
38
  currentApp
38
- } = useEdificeClient(), application = customAppCode || contextAppCode, {
39
+ } = useEdificeClient(), application = customAppCode || contextAppCode, hasOptionalCommentRepliesWorkflow = useHasWorkflow("org.entcore.blog.controllers.optionalCommentReplies"), {
39
40
  t
40
41
  } = useTranslation(), {
41
42
  mode
@@ -54,7 +55,8 @@ const DEFAULT_INPUT_MAX_LENGTH = 60, DEFAULT_TEXTAREA_MAX_LENGTH = 400, Resource
54
55
  description: isUpdating ? resource == null ? void 0 : resource.description : "",
55
56
  enablePublic: isUpdating ? resource == null ? void 0 : resource.public : !1,
56
57
  title: isUpdating ? resource == null ? void 0 : resource.name : "",
57
- formSlug: isUpdating ? resource == null ? void 0 : resource.slug : ""
58
+ formSlug: isUpdating ? resource == null ? void 0 : resource.slug : "",
59
+ allowReplies: isUpdating ? resource == null ? void 0 : resource.allowReplies : !0
58
60
  }
59
61
  }), {
60
62
  ref: mediaLibraryRef,
@@ -75,7 +77,8 @@ const DEFAULT_INPUT_MAX_LENGTH = 60, DEFAULT_TEXTAREA_MAX_LENGTH = 400, Resource
75
77
  name: formData.title,
76
78
  public: formData.enablePublic,
77
79
  slug: formData.enablePublic && formData.formSlug || "",
78
- thumbnail
80
+ thumbnail,
81
+ allowReplies: formData.allowReplies
79
82
  };
80
83
  let result, param;
81
84
  if (isCreating) {
@@ -141,6 +144,10 @@ const DEFAULT_INPUT_MAX_LENGTH = 60, DEFAULT_TEXTAREA_MAX_LENGTH = 400, Resource
141
144
  maxLength: textareaMaxLength
142
145
  }), placeholder: ((_f = customT.placeholder) == null ? void 0 : _f.description) ?? t("explorer.resource.editModal.description.placeholder"), size: "md", maxLength: textareaMaxLength }),
143
146
  watchedDescription && /* @__PURE__ */ jsx(TextareaCounter, { content: watchedDescription, maxLength: textareaMaxLength })
147
+ ] }),
148
+ application === "blog" && hasOptionalCommentRepliesWorkflow === !0 && /* @__PURE__ */ jsxs(FormControl, { id: "allowReplies", className: "d-flex gap-8 mt-16 mb-8", children: [
149
+ /* @__PURE__ */ jsx(FormControl.Input, { type: "checkbox", defaultChecked: isUpdating ? resource.allowReplies : !0, ...register("allowReplies"), className: "form-check-input mt-0", size: "sm" }),
150
+ /* @__PURE__ */ jsx(FormControl.Label, { className: "form-check-label mb-0", children: t("explorer.comments.allowReplies") })
144
151
  ] })
145
152
  ] })
146
153
  ] }),
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@edifice.io/react",
3
- "version": "2.3.2-develop-b2school-actualites.20251008121205",
3
+ "version": "2.3.2-develop-integration.20251009160859",
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.3.2-develop-b2school-actualites.20251008121205",
135
- "@edifice.io/tiptap-extensions": "2.3.2-develop-b2school-actualites.20251008121205",
136
- "@edifice.io/utilities": "2.3.2-develop-b2school-actualites.20251008121205"
134
+ "@edifice.io/bootstrap": "2.3.2-develop-integration.20251009160859",
135
+ "@edifice.io/tiptap-extensions": "2.3.2-develop-integration.20251009160859",
136
+ "@edifice.io/utilities": "2.3.2-develop-integration.20251009160859"
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.3.2-develop-b2school-actualites.20251008121205",
168
- "@edifice.io/config": "2.3.2-develop-b2school-actualites.20251008121205"
167
+ "@edifice.io/client": "2.3.2-develop-integration.20251009160859",
168
+ "@edifice.io/config": "2.3.2-develop-integration.20251009160859"
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,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", children: summaryContent }),
39
- /* @__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 ", {
40
- "d-none d-md-block": index >= 1
41
- }), style: {
42
- maxWidth: "150px"
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;
@@ -1,24 +0,0 @@
1
- import { jsx, jsxs } from "react/jsx-runtime";
2
- import clsx from "clsx";
3
- import TextSkeleton from "../../../../components/Skeleton/TextSkeleton.js";
4
- import Image from "../../../../components/Image/Image.js";
5
- const EditorPreview = ({
6
- variant = "outline"
7
- }) => {
8
- const borderClass = clsx(variant === "outline" && "border rounded-3"), contentClass = clsx("mt-16", variant === "outline" && "my-12 mx-16");
9
- return /* @__PURE__ */ jsx("div", { className: borderClass, "data-testid": "editor-preview", children: /* @__PURE__ */ jsxs("div", { className: contentClass, children: [
10
- /* @__PURE__ */ jsx(TextSkeleton, { className: "col-12" }),
11
- /* @__PURE__ */ jsx(TextSkeleton, { className: "col-12" }),
12
- /* @__PURE__ */ jsxs("div", { className: "d-flex justify-content-center gap-24 px-32 pt-16", children: [
13
- /* @__PURE__ */ jsx("div", { style: {
14
- maxWidth: "150px"
15
- }, className: "col-12 col-md-4", children: /* @__PURE__ */ jsx(Image, { alt: "", objectFit: "cover", ratio: "16", className: "rounded placeholder", src: "", sizes: "" }) }),
16
- /* @__PURE__ */ jsx("div", { style: {
17
- maxWidth: "150px"
18
- }, className: "col-12 col-md-4", children: /* @__PURE__ */ jsx(Image, { alt: "", objectFit: "cover", ratio: "16", className: "rounded placeholder", src: "", sizes: "" }) })
19
- ] })
20
- ] }) });
21
- };
22
- export {
23
- EditorPreview as default
24
- };
@@ -1,7 +0,0 @@
1
- import { SVGProps } from 'react';
2
- interface SVGRProps {
3
- title?: string;
4
- titleId?: string;
5
- }
6
- declare const SvgIconClockAlert: ({ title, titleId, ...props }: SVGProps<SVGSVGElement> & SVGRProps) => import("react/jsx-runtime").JSX.Element;
7
- export default SvgIconClockAlert;
@@ -1,17 +0,0 @@
1
- import { jsxs, jsx } from "react/jsx-runtime";
2
- const SvgIconClockAlert = ({
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", clipPath: "url(#icon-clock-alert_svg__a)", children: [
9
- /* @__PURE__ */ jsx("path", { d: "M0 10.075C0 4.51 4.51 0 10.075 0c4.573 0 8.431 3.046 9.663 7.217a1 1 0 0 1-1.918.566A8.075 8.075 0 1 0 7.783 17.82a1 1 0 0 1-.566 1.918C3.046 18.506 0 14.648 0 10.075" }),
10
- /* @__PURE__ */ jsx("path", { d: "M10.075 4.108a1 1 0 0 1 1 1v5.43a1 1 0 0 1-.357.767L7.83 13.728a1 1 0 1 1-1.286-1.532l2.53-2.123V5.108a1 1 0 0 1 1-1M17 13.3a1 1 0 0 1 1 1v2.2a1 1 0 1 1-2 0v-2.2a1 1 0 0 1 1-1M17 18.4a1 1 0 1 0 0 2h.006a1 1 0 1 0 0-2z" }),
11
- /* @__PURE__ */ jsx("path", { fillRule: "evenodd", d: "M17 10a7 7 0 1 0 0 14 7 7 0 0 0 0-14m-5 7a5 5 0 1 1 10 0 5 5 0 0 1-10 0", clipRule: "evenodd" })
12
- ] }),
13
- /* @__PURE__ */ jsx("defs", { children: /* @__PURE__ */ jsx("clipPath", { id: "icon-clock-alert_svg__a", children: /* @__PURE__ */ jsx("path", { fill: "#fff", d: "M0 0h24v24H0z" }) }) })
14
- ] });
15
- export {
16
- SvgIconClockAlert as default
17
- };