@edifice.io/react 2.5.3 → 2.5.4-develop-pedago.20251208102449

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/icons.js CHANGED
@@ -150,26 +150,29 @@ import { default as default150 } from "./modules/icons/components/IconTextToSpee
150
150
  import { default as default151 } from "./modules/icons/components/IconTextTypo.js";
151
151
  import { default as default152 } from "./modules/icons/components/IconTextUnderline.js";
152
152
  import { default as default153 } from "./modules/icons/components/IconTextVanilla.js";
153
- import { default as default154 } from "./modules/icons/components/IconToolCenter.js";
154
- import { default as default155 } from "./modules/icons/components/IconTool.js";
155
- import { default as default156 } from "./modules/icons/components/IconTrendingUp.js";
156
- import { default as default157 } from "./modules/icons/components/IconUndoAll.js";
157
- import { default as default158 } from "./modules/icons/components/IconUndo.js";
158
- import { default as default159 } from "./modules/icons/components/IconUnion.js";
159
- import { default as default160 } from "./modules/icons/components/IconUnlink.js";
160
- import { default as default161 } from "./modules/icons/components/IconUnlock.js";
161
- import { default as default162 } from "./modules/icons/components/IconUnreadMail.js";
162
- import { default as default163 } from "./modules/icons/components/IconUpload.js";
163
- import { default as default164 } from "./modules/icons/components/IconUserSearch.js";
164
- import { default as default165 } from "./modules/icons/components/IconUser.js";
165
- import { default as default166 } from "./modules/icons/components/IconUsers.js";
166
- import { default as default167 } from "./modules/icons/components/IconVideo.js";
167
- import { default as default168 } from "./modules/icons/components/IconViewCalendar.js";
168
- import { default as default169 } from "./modules/icons/components/IconViewList.js";
169
- import { default as default170 } from "./modules/icons/components/IconWand.js";
170
- import { default as default171 } from "./modules/icons/components/IconWrite.js";
171
- import { default as default172 } from "./modules/icons/components/IconZoomIn.js";
172
- import { default as default173 } from "./modules/icons/components/IconZoomOut.js";
153
+ import { default as default154 } from "./modules/icons/components/IconThumbDown.js";
154
+ import { default as default155 } from "./modules/icons/components/IconThumbUp.js";
155
+ import { default as default156 } from "./modules/icons/components/IconToolCenter.js";
156
+ import { default as default157 } from "./modules/icons/components/IconTool.js";
157
+ import { default as default158 } from "./modules/icons/components/IconTrendingUp.js";
158
+ import { default as default159 } from "./modules/icons/components/IconUndoAll.js";
159
+ import { default as default160 } from "./modules/icons/components/IconUndoSlashed.js";
160
+ import { default as default161 } from "./modules/icons/components/IconUndo.js";
161
+ import { default as default162 } from "./modules/icons/components/IconUnion.js";
162
+ import { default as default163 } from "./modules/icons/components/IconUnlink.js";
163
+ import { default as default164 } from "./modules/icons/components/IconUnlock.js";
164
+ import { default as default165 } from "./modules/icons/components/IconUnreadMail.js";
165
+ import { default as default166 } from "./modules/icons/components/IconUpload.js";
166
+ import { default as default167 } from "./modules/icons/components/IconUserSearch.js";
167
+ import { default as default168 } from "./modules/icons/components/IconUser.js";
168
+ import { default as default169 } from "./modules/icons/components/IconUsers.js";
169
+ import { default as default170 } from "./modules/icons/components/IconVideo.js";
170
+ import { default as default171 } from "./modules/icons/components/IconViewCalendar.js";
171
+ import { default as default172 } from "./modules/icons/components/IconViewList.js";
172
+ import { default as default173 } from "./modules/icons/components/IconWand.js";
173
+ import { default as default174 } from "./modules/icons/components/IconWrite.js";
174
+ import { default as default175 } from "./modules/icons/components/IconZoomIn.js";
175
+ import { default as default176 } from "./modules/icons/components/IconZoomOut.js";
173
176
  export {
174
177
  default3 as IconAdd,
175
178
  default2 as IconAddUser,
@@ -323,24 +326,27 @@ export {
323
326
  default151 as IconTextTypo,
324
327
  default152 as IconTextUnderline,
325
328
  default153 as IconTextVanilla,
326
- default155 as IconTool,
327
- default154 as IconToolCenter,
328
- default156 as IconTrendingUp,
329
- default158 as IconUndo,
330
- default157 as IconUndoAll,
331
- default159 as IconUnion,
332
- default160 as IconUnlink,
333
- default161 as IconUnlock,
334
- default162 as IconUnreadMail,
335
- default163 as IconUpload,
336
- default165 as IconUser,
337
- default164 as IconUserSearch,
338
- default166 as IconUsers,
339
- default167 as IconVideo,
340
- default168 as IconViewCalendar,
341
- default169 as IconViewList,
342
- default170 as IconWand,
343
- default171 as IconWrite,
344
- default172 as IconZoomIn,
345
- default173 as IconZoomOut
329
+ default154 as IconThumbDown,
330
+ default155 as IconThumbUp,
331
+ default157 as IconTool,
332
+ default156 as IconToolCenter,
333
+ default158 as IconTrendingUp,
334
+ default161 as IconUndo,
335
+ default159 as IconUndoAll,
336
+ default160 as IconUndoSlashed,
337
+ default162 as IconUnion,
338
+ default163 as IconUnlink,
339
+ default164 as IconUnlock,
340
+ default165 as IconUnreadMail,
341
+ default166 as IconUpload,
342
+ default168 as IconUser,
343
+ default167 as IconUserSearch,
344
+ default169 as IconUsers,
345
+ default170 as IconVideo,
346
+ default171 as IconViewCalendar,
347
+ default172 as IconViewList,
348
+ default173 as IconWand,
349
+ default174 as IconWrite,
350
+ default175 as IconZoomIn,
351
+ default176 as IconZoomOut
346
352
  };
@@ -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 && /* @__PURE__ */ jsx(Button, { variant: "ghost", color: "tertiary", size: "sm", onClick: () => handleReplyToComment(comment.id), children: t("comment.reply") }),
76
+ !replyTo && options.allowReplies && /* @__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") }),
@@ -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
  /**
@@ -18,7 +18,7 @@ const MediaRenderer = (props) => {
18
18
  startVerticalResize,
19
19
  stopVerticalResize,
20
20
  isVerticalResizeActive
21
- } = useResizeMedia(props, resizableMedia), width = node.attrs.width || 560, height = node.attrs.height || Math.round(width * 9 / 16), alignContent = (textalign) => {
21
+ } = useResizeMedia(props, resizableMedia), alignContent = (textalign) => {
22
22
  switch (textalign) {
23
23
  case "center":
24
24
  case "justify":
@@ -66,7 +66,7 @@ const MediaRenderer = (props) => {
66
66
  case "iframe":
67
67
  return /* @__PURE__ */ jsxs(Fragment, { children: [
68
68
  /* @__PURE__ */ jsx("div", { className: "iframe-node-view" }),
69
- /* @__PURE__ */ jsx("iframe", { ref: resizableMedia, src: node.attrs.src, width, height, allowFullScreen: node.attrs.allowfullscreen ?? !0 })
69
+ /* @__PURE__ */ jsx("iframe", { ref: resizableMedia, src: node.attrs.src, width: node.attrs.width, height: node.attrs.height, allowFullScreen: node.attrs.allowfullscreen ?? !0 })
70
70
  ] });
71
71
  default:
72
72
  return null;
@@ -1,6 +1,6 @@
1
1
  import { useRef, useEffect } from "react";
2
- const MIN_WIDTH = 80, useResizeMedia = (props, refResizable, forcedAspectRatio) => {
3
- const aspectRatio = useRef(0), lastCursorX = useRef(-1), isVerticalResizeActive = useRef(!1), proseMirrorContainerWidth = useRef(0), limitWidth = (width) => width < MIN_WIDTH, readCurrentPixelWidth = () => {
2
+ const useResizeMedia = (props, refResizable, forcedAspectRatio) => {
3
+ const aspectRatio = useRef(0), lastCursorX = useRef(-1), isVerticalResizeActive = useRef(!1), proseMirrorContainerWidth = useRef(0), readCurrentPixelWidth = () => {
4
4
  const el = refResizable.current;
5
5
  if (!el) return 0;
6
6
  const rect = el.getBoundingClientRect();
@@ -22,7 +22,7 @@ const MIN_WIDTH = 80, useResizeMedia = (props, refResizable, forcedAspectRatio)
22
22
  }, []);
23
23
  const clampWidth = (w) => {
24
24
  let width = w;
25
- return proseMirrorContainerWidth.current > 0 && width > proseMirrorContainerWidth.current && (width = proseMirrorContainerWidth.current), limitWidth(width) && (width = MIN_WIDTH), Math.round(width);
25
+ return proseMirrorContainerWidth.current > 0 && width > proseMirrorContainerWidth.current && (width = proseMirrorContainerWidth.current), Math.round(width);
26
26
  }, onVerticalResize = (direction, diff) => {
27
27
  const currWidth = readCurrentPixelWidth();
28
28
  if (!currWidth) return;
@@ -0,0 +1,7 @@
1
+ import { SVGProps } from 'react';
2
+ interface SVGRProps {
3
+ title?: string;
4
+ titleId?: string;
5
+ }
6
+ declare const SvgIconThumbDown: ({ title, titleId, ...props }: SVGProps<SVGSVGElement> & SVGRProps) => import("react/jsx-runtime").JSX.Element;
7
+ export default SvgIconThumbDown;
@@ -0,0 +1,12 @@
1
+ import { jsxs, jsx } from "react/jsx-runtime";
2
+ const SvgIconThumbDown = ({
3
+ title,
4
+ titleId,
5
+ ...props
6
+ }) => /* @__PURE__ */ jsxs("svg", { xmlns: "http://www.w3.org/2000/svg", width: "24", height: "24", fill: "none", viewBox: "0 0 24 24", "aria-hidden": "true", "aria-labelledby": titleId, ...props, children: [
7
+ title ? /* @__PURE__ */ jsx("title", { id: titleId, children: title }) : null,
8
+ /* @__PURE__ */ jsx("path", { fill: "currentColor", fillRule: "evenodd", d: "M8.069 15a1.67 1.67 0 0 0 1.16 1.588l3.007-6.765V1.667H3.66a.834.834 0 0 0-.834.708v.002l-1.15 7.498-.009.09a.835.835 0 0 0 .843.869h4.726c.46 0 .833.373.833.833zm8.333-12.5a.833.833 0 0 0-.833-.833h-1.667v7.5h1.667a.833.833 0 0 0 .833-.833zm-10 10H2.52a2.5 2.5 0 0 1-2.49-2.875l1.15-7.5A2.5 2.5 0 0 1 3.668 0h11.9a2.5 2.5 0 0 1 2.5 2.5v5.833a2.5 2.5 0 0 1-2.5 2.5H13.61l-3.114 7.005-.057.108a.83.83 0 0 1-.704.387 3.333 3.333 0 0 1-3.334-3.333z", clipRule: "evenodd" })
9
+ ] });
10
+ export {
11
+ SvgIconThumbDown as default
12
+ };
@@ -0,0 +1,7 @@
1
+ import { SVGProps } from 'react';
2
+ interface SVGRProps {
3
+ title?: string;
4
+ titleId?: string;
5
+ }
6
+ declare const SvgIconThumbUp: ({ title, titleId, ...props }: SVGProps<SVGSVGElement> & SVGRProps) => import("react/jsx-runtime").JSX.Element;
7
+ export default SvgIconThumbUp;
@@ -0,0 +1,12 @@
1
+ import { jsxs, jsx } from "react/jsx-runtime";
2
+ const SvgIconThumbUp = ({
3
+ title,
4
+ titleId,
5
+ ...props
6
+ }) => /* @__PURE__ */ jsxs("svg", { xmlns: "http://www.w3.org/2000/svg", width: "24", height: "24", fill: "none", viewBox: "0 0 24 24", "aria-hidden": "true", "aria-labelledby": titleId, ...props, children: [
7
+ title ? /* @__PURE__ */ jsx("title", { id: titleId, children: title }) : null,
8
+ /* @__PURE__ */ jsx("path", { fill: "currentColor", fillRule: "evenodd", d: "M10 3.333a1.67 1.67 0 0 0-1.16-1.587L5.833 8.511v8.156h8.576a.834.834 0 0 0 .833-.708l.001-.002 1.15-7.498.008-.09a.834.834 0 0 0-.842-.869h-4.726A.833.833 0 0 1 10 6.667zm-8.333 12.5a.833.833 0 0 0 .833.834h1.667v-7.5H2.5a.833.833 0 0 0-.833.833zm10-10h3.883a2.5 2.5 0 0 1 2.49 2.876l-1.15 7.5a2.5 2.5 0 0 1-2.49 2.124H2.5a2.5 2.5 0 0 1-2.5-2.5V10a2.5 2.5 0 0 1 2.5-2.5h1.958L7.572.495l.057-.108A.83.83 0 0 1 8.333 0a3.333 3.333 0 0 1 3.334 3.333z", clipRule: "evenodd" })
9
+ ] });
10
+ export {
11
+ SvgIconThumbUp as default
12
+ };
@@ -0,0 +1,7 @@
1
+ import { SVGProps } from 'react';
2
+ interface SVGRProps {
3
+ title?: string;
4
+ titleId?: string;
5
+ }
6
+ declare const SvgIconUndoSlashed: ({ title, titleId, ...props }: SVGProps<SVGSVGElement> & SVGRProps) => import("react/jsx-runtime").JSX.Element;
7
+ export default SvgIconUndoSlashed;
@@ -0,0 +1,12 @@
1
+ import { jsxs, jsx } from "react/jsx-runtime";
2
+ const SvgIconUndoSlashed = ({
3
+ title,
4
+ titleId,
5
+ ...props
6
+ }) => /* @__PURE__ */ jsxs("svg", { xmlns: "http://www.w3.org/2000/svg", width: "24", height: "24", fill: "none", viewBox: "0 0 24 24", "aria-hidden": "true", "aria-labelledby": titleId, ...props, children: [
7
+ title ? /* @__PURE__ */ jsx("title", { id: titleId, children: title }) : null,
8
+ /* @__PURE__ */ jsx("path", { fill: "currentColor", d: "M19.775 8.466A5 5 0 0 1 22 12.625V21a1 1 0 0 1-2 0v-8.375c0-1.186-.69-2.208-1.689-2.695zM7.918 2.293a1 1 0 1 1 1.414 1.414L5.414 7.625h6.719l-2 2H5.414l2.36 2.36-1.415 1.414-4.066-4.067a1 1 0 0 1 0-1.414zM20.293 2.293a1 1 0 1 1 1.414 1.414l-17 17a1 1 0 1 1-1.414-1.414z" })
9
+ ] });
10
+ export {
11
+ SvgIconUndoSlashed as default
12
+ };
@@ -150,10 +150,13 @@ export { default as IconTextToSpeech } from './IconTextToSpeech';
150
150
  export { default as IconTextTypo } from './IconTextTypo';
151
151
  export { default as IconTextUnderline } from './IconTextUnderline';
152
152
  export { default as IconTextVanilla } from './IconTextVanilla';
153
+ export { default as IconThumbDown } from './IconThumbDown';
154
+ export { default as IconThumbUp } from './IconThumbUp';
153
155
  export { default as IconToolCenter } from './IconToolCenter';
154
156
  export { default as IconTool } from './IconTool';
155
157
  export { default as IconTrendingUp } from './IconTrendingUp';
156
158
  export { default as IconUndoAll } from './IconUndoAll';
159
+ export { default as IconUndoSlashed } from './IconUndoSlashed';
157
160
  export { default as IconUndo } from './IconUndo';
158
161
  export { default as IconUnion } from './IconUnion';
159
162
  export { default as IconUnlink } from './IconUnlink';
@@ -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
@@ -7,6 +7,7 @@ import { useTranslation } from "react-i18next";
7
7
  import ImagePicker from "../../multimedia/ImagePicker/ImagePicker.js";
8
8
  import { useThumb } from "./hooks/useThumb.js";
9
9
  import { useEdificeClient } from "../../../providers/EdificeClientProvider/EdificeClientProvider.hook.js";
10
+ import useHasWorkflow from "../../../hooks/useHasWorkflow/useHasWorkflow.js";
10
11
  import useToast from "../../../hooks/useToast/useToast.js";
11
12
  import useResource from "../../../hooks/useResource/useResource.js";
12
13
  import useMediaLibrary from "../../../hooks/useMediaLibrary/useMediaLibrary.js";
@@ -34,7 +35,7 @@ const DEFAULT_INPUT_MAX_LENGTH = 60, DEFAULT_TEXTAREA_MAX_LENGTH = 400, Resource
34
35
  const {
35
36
  appCode: contextAppCode,
36
37
  currentApp
37
- } = useEdificeClient(), application = customAppCode || contextAppCode, {
38
+ } = useEdificeClient(), application = customAppCode || contextAppCode, hasOptionalCommentRepliesWorkflow = useHasWorkflow("org.entcore.blog.controllers.BlogController|optionalCommentReplies"), {
38
39
  t
39
40
  } = useTranslation(), {
40
41
  mode
@@ -53,7 +54,8 @@ const DEFAULT_INPUT_MAX_LENGTH = 60, DEFAULT_TEXTAREA_MAX_LENGTH = 400, Resource
53
54
  description: isUpdating ? resource == null ? void 0 : resource.description : "",
54
55
  enablePublic: isUpdating ? resource == null ? void 0 : resource.public : !1,
55
56
  title: isUpdating ? resource == null ? void 0 : resource.name : "",
56
- formSlug: isUpdating ? resource == null ? void 0 : resource.slug : ""
57
+ formSlug: isUpdating ? resource == null ? void 0 : resource.slug : "",
58
+ allowReplies: isUpdating ? resource == null ? void 0 : resource.allowReplies : !0
57
59
  }
58
60
  }), {
59
61
  ref: mediaLibraryRef,
@@ -74,7 +76,8 @@ const DEFAULT_INPUT_MAX_LENGTH = 60, DEFAULT_TEXTAREA_MAX_LENGTH = 400, Resource
74
76
  name: formData.title,
75
77
  public: formData.enablePublic,
76
78
  slug: formData.enablePublic && formData.formSlug || "",
77
- thumbnail
79
+ thumbnail,
80
+ allowReplies: formData.allowReplies
78
81
  };
79
82
  let result, param;
80
83
  if (isCreating) {
@@ -139,6 +142,10 @@ const DEFAULT_INPUT_MAX_LENGTH = 60, DEFAULT_TEXTAREA_MAX_LENGTH = 400, Resource
139
142
  required: !1,
140
143
  maxLength: textareaMaxLength
141
144
  }), placeholder: ((_f = customT.placeholder) == null ? void 0 : _f.description) ?? t("explorer.resource.editModal.description.placeholder"), size: "md", maxLength: textareaMaxLength, showCounter: !0 })
145
+ ] }),
146
+ application === "blog" && hasOptionalCommentRepliesWorkflow === !0 && /* @__PURE__ */ jsxs(FormControl, { id: "allowReplies", className: "d-flex gap-8 mt-16 mb-8", children: [
147
+ /* @__PURE__ */ jsx(FormControl.Input, { type: "checkbox", defaultChecked: isUpdating ? resource.allowReplies : !0, ...register("allowReplies"), className: "form-check-input mt-0", size: "sm" }),
148
+ /* @__PURE__ */ jsx(FormControl.Label, { className: "form-check-label mb-0", children: t("explorer.resource.editModal.comments.allowReplies") })
142
149
  ] })
143
150
  ] })
144
151
  ] }),
@@ -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, {}) });
@@ -111,7 +111,10 @@ const InternalLinker = ({
111
111
  }, [resources]), /* @__PURE__ */ jsxs("div", { className: "d-flex flex-column flex-fill overflow-hidden", children: [
112
112
  /* @__PURE__ */ jsxs("div", { className: "search d-flex bg-light rounded-top border border-bottom-0", children: [
113
113
  showApplicationSelector && /* @__PURE__ */ jsx("div", { className: "flex-shrink-1 px-8 py-12 border-end", children: /* @__PURE__ */ jsxs(Dropdown, { overflow: !0, children: [
114
- /* @__PURE__ */ jsx(Dropdown.Trigger, { icon: /* @__PURE__ */ jsx("div", { className: "pe-8", children: (selectedApplication == null ? void 0 : selectedApplication.icon) || /* @__PURE__ */ jsx(SvgIconApplications, {}) }), label: t((selectedApplication == null ? void 0 : selectedApplication.displayName) || "bbm.linker.int.choose"), variant: "ghost", size: "md" }),
114
+ /* @__PURE__ */ jsx(Dropdown.Trigger, { icon: /* @__PURE__ */ jsx("div", { className: "pe-8", children: (selectedApplication == null ? void 0 : selectedApplication.icon) || /* @__PURE__ */ jsx(SvgIconApplications, {}) }), label: /* @__PURE__ */ jsxs("span", { className: "d-md-inline d-sm-none", children: [
115
+ " ",
116
+ t((selectedApplication == null ? void 0 : selectedApplication.displayName) || "bbm.linker.int.choose")
117
+ ] }), variant: "ghost", size: "md" }),
115
118
  /* @__PURE__ */ jsx(Dropdown.Menu, { children: options == null ? void 0 : options.map((option) => /* @__PURE__ */ jsx(Dropdown.Item, { icon: option.icon, onClick: () => handleOptionClick(option), children: option.displayName }, option.application)) })
116
119
  ] }) }),
117
120
  /* @__PURE__ */ jsx("div", { className: "flex-grow-1 align-self-center", children: /* @__PURE__ */ jsx("form", { className: "gap-16 d-flex w-100 align-items-center px-16 py-8", onSubmit: handleSubmit, children: /* @__PURE__ */ jsx(SearchBar, { isVariant: !0, placeholder: t("search"), size: "lg", className: "w-100", disabled: !selectedApplication, onChange: handleSearchChange }) }) })
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@edifice.io/react",
3
- "version": "2.5.3",
3
+ "version": "2.5.4-develop-pedago.20251208102449",
4
4
  "description": "Edifice React Library",
5
5
  "keywords": [
6
6
  "react",
@@ -73,7 +73,7 @@
73
73
  "dist"
74
74
  ],
75
75
  "dependencies": {
76
- "@ant-design/icons": "^6.0.2",
76
+ "@ant-design/icons": "^5.4.0",
77
77
  "@dnd-kit/core": "^6.1.0",
78
78
  "@dnd-kit/sortable": "^8.0.0",
79
79
  "@dnd-kit/utilities": "^3.2.2",
@@ -119,7 +119,7 @@
119
119
  "@tiptap/react": "2.11.0",
120
120
  "@tiptap/starter-kit": "2.11.0",
121
121
  "@uidotdev/usehooks": "^2.4.1",
122
- "antd": "^6.0.0",
122
+ "antd": "^5.29.1",
123
123
  "clsx": "^2.1.1",
124
124
  "dayjs": "1.11.10",
125
125
  "emoji-picker-react": "4.5.2",
@@ -133,9 +133,9 @@
133
133
  "react-slugify": "^3.0.3",
134
134
  "swiper": "^10.1.0",
135
135
  "ua-parser-js": "^1.0.36",
136
- "@edifice.io/bootstrap": "2.5.3",
137
- "@edifice.io/tiptap-extensions": "2.5.3",
138
- "@edifice.io/utilities": "2.5.3"
136
+ "@edifice.io/bootstrap": "2.5.4-develop-pedago.20251208102449",
137
+ "@edifice.io/tiptap-extensions": "2.5.4-develop-pedago.20251208102449",
138
+ "@edifice.io/utilities": "2.5.4-develop-pedago.20251208102449"
139
139
  },
140
140
  "devDependencies": {
141
141
  "@babel/plugin-transform-react-pure-annotations": "^7.23.3",
@@ -166,8 +166,8 @@
166
166
  "vite": "^5.4.11",
167
167
  "vite-plugin-dts": "^4.1.0",
168
168
  "vite-tsconfig-paths": "^5.0.1",
169
- "@edifice.io/client": "2.5.3",
170
- "@edifice.io/config": "2.5.3"
169
+ "@edifice.io/client": "2.5.4-develop-pedago.20251208102449",
170
+ "@edifice.io/config": "2.5.4-develop-pedago.20251208102449"
171
171
  },
172
172
  "peerDependencies": {
173
173
  "@react-spring/web": "^9.7.5",