@edifice.io/react 2.5.8 → 2.5.9-develop.20260130161524

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 (61) hide show
  1. package/README.md +5 -0
  2. package/dist/_virtual/isSameOrAfter.js +4 -0
  3. package/dist/_virtual/isToday.js +4 -0
  4. package/dist/components/DatePicker/DatePicker.d.ts +57 -0
  5. package/dist/components/DatePicker/DatePicker.js +6 -3
  6. package/dist/components/Dropdown/DropdownContext.js +1 -1
  7. package/dist/components/Form/FormContext.js +1 -1
  8. package/dist/components/Layout/Layout.js +1 -2
  9. package/dist/components/Layout/components/Header.js +5 -2
  10. package/dist/components/Layout/components/WidgetApps.js +2 -2
  11. package/dist/components/Modal/Modal.d.ts +4 -0
  12. package/dist/components/Modal/Modal.js +13 -12
  13. package/dist/components/Toolbar/Toolbar.js +1 -1
  14. package/dist/editor.js +40 -40
  15. package/dist/hooks/useConversation/useConversation.js +3 -1
  16. package/dist/hooks/useDate/useDate.d.ts +5 -1
  17. package/dist/hooks/useDate/useDate.js +18 -2
  18. package/dist/hooks/useDropdown/useDropdown.js +1 -1
  19. package/dist/hooks/useDropzone/useDropzone.js +21 -16
  20. package/dist/icons-apps.js +234 -232
  21. package/dist/icons.js +356 -350
  22. package/dist/index.js +224 -224
  23. package/dist/modals.js +18 -18
  24. package/dist/modules/audience/ViewsCounter.d.ts +3 -17
  25. package/dist/modules/audience/ViewsCounter.js +9 -7
  26. package/dist/modules/comments/components/Comment.js +4 -4
  27. package/dist/modules/comments/components/CommentDate.js +7 -10
  28. package/dist/modules/comments/components/CommentDeleted.js +1 -1
  29. package/dist/modules/comments/components/CommentForm.d.ts +1 -1
  30. package/dist/modules/comments/components/CommentForm.js +6 -6
  31. package/dist/modules/comments/components/CommentTitle.js +1 -1
  32. package/dist/modules/comments/provider/CommentProvider.js +4 -4
  33. package/dist/modules/comments/types.d.ts +3 -1
  34. package/dist/modules/editor/hooks/useTipTapEditor.js +4 -4
  35. package/dist/modules/icons/components/IconAdjustSettings.d.ts +7 -0
  36. package/dist/modules/icons/components/IconAdjustSettings.js +12 -0
  37. package/dist/modules/icons/components/IconCalendarEdit.d.ts +7 -0
  38. package/dist/modules/icons/components/IconCalendarEdit.js +12 -0
  39. package/dist/modules/icons/components/IconLabel.d.ts +7 -0
  40. package/dist/modules/icons/components/IconLabel.js +12 -0
  41. package/dist/modules/icons/components/apps/IconAssistancetic.d.ts +7 -0
  42. package/dist/modules/icons/components/apps/IconAssistancetic.js +14 -0
  43. package/dist/modules/icons/components/apps/index.d.ts +1 -0
  44. package/dist/modules/icons/components/index.d.ts +3 -0
  45. package/dist/modules/modals/OnboardingModal/OnboardingModal.js +5 -5
  46. package/dist/modules/modals/ResourceModal/ResourceModal.js +1 -2
  47. package/dist/modules/modals/ShareModal/ShareResources.d.ts +3 -0
  48. package/dist/modules/modals/ShareModal/ShareResources.js +9 -5
  49. package/dist/modules/multimedia/Linker/ExternalLinker/ExternalLinker.js +1 -2
  50. package/dist/modules/multimedia/Linker/InternalLinker/InternalLinker.js +1 -2
  51. package/dist/modules/multimedia/MediaLibrary/MediaLibrary.js +1 -1
  52. package/dist/multimedia.js +10 -10
  53. package/dist/node_modules/.pnpm/dayjs@1.11.19/node_modules/dayjs/plugin/isSameOrAfter.js +18 -0
  54. package/dist/node_modules/.pnpm/dayjs@1.11.19/node_modules/dayjs/plugin/isToday.js +19 -0
  55. package/dist/providers/AntThemeProvider/antThemeConfig.js +1 -2
  56. package/dist/utilities/mime-types/index.d.ts +1 -0
  57. package/dist/utilities/mime-types/mime-types-utils.d.ts +1 -0
  58. package/dist/utilities/mime-types/mime-types-utils.js +4 -0
  59. package/package.json +6 -6
  60. package/dist/modules/comments/components/CommentHeader.d.ts +0 -3
  61. package/dist/modules/comments/components/CommentHeader.js +0 -8
@@ -1,18 +1,20 @@
1
1
  import { jsx } from "react/jsx-runtime";
2
2
  import { StringUtils } from "@edifice.io/utilities";
3
3
  import clsx from "clsx";
4
+ import { forwardRef } from "react";
4
5
  import SvgIconSee from "../icons/components/IconSee.js";
5
6
  import Button from "../../components/Button/Button.js";
6
- const ViewsCounter = ({
7
+ const ViewsCounter = /* @__PURE__ */ forwardRef(({
7
8
  viewsCounter,
8
9
  onClick,
9
- className
10
- }) => {
10
+ className,
11
+ ...restProps
12
+ }, ref) => {
11
13
  const handleButtonClick = (event) => {
12
- event.preventDefault(), event.stopPropagation(), onClick == null || onClick();
13
- };
14
- return className = clsx("text-gray-700 fw-normal py-4 px-8 btn-icon", className), /* @__PURE__ */ jsx(Button, { rightIcon: /* @__PURE__ */ jsx(SvgIconSee, {}), variant: "ghost", type: "button", className, onClick: handleButtonClick, disabled: !viewsCounter, children: StringUtils.toCounter(viewsCounter) });
15
- };
14
+ event.preventDefault(), event.stopPropagation(), onClick == null || onClick(event);
15
+ }, isDisabled = viewsCounter <= 0;
16
+ return className = clsx("text-gray-700 fw-normal py-4 px-8 btn-icon", className), /* @__PURE__ */ jsx(Button, { ref, rightIcon: /* @__PURE__ */ jsx(SvgIconSee, {}), className, onClick: handleButtonClick, disabled: isDisabled, ...restProps, color: "tertiary", variant: "ghost", children: StringUtils.toCounter(viewsCounter) });
17
+ });
16
18
  export {
17
19
  ViewsCounter as default
18
20
  };
@@ -50,7 +50,7 @@ const DeleteModal = /* @__PURE__ */ lazy(() => import("./DeleteModal.js")), Comm
50
50
  /* @__PURE__ */ jsx(CommentReplies, { parentComment: comment })
51
51
  ] }),
52
52
  !comment.deleted && /* @__PURE__ */ jsxs(Fragment, { children: [
53
- /* @__PURE__ */ jsxs("div", { className: `${isEditing ? "border rounded-3 p-12 pb-8 d-flex gap-12 bg-gray-200 my-16" : "border rounded-3 p-12 pb-8 d-flex gap-12 mt-16"}`, children: [
53
+ /* @__PURE__ */ jsxs("div", { "data-testid": "div-comment-read", className: `${isEditing ? "border rounded-3 p-12 pb-8 d-flex gap-12 bg-gray-200 my-16" : "border rounded-3 p-12 pb-8 d-flex gap-12 mt-16"}`, children: [
54
54
  /* @__PURE__ */ jsx(CommentAvatar, { id: authorId }),
55
55
  /* @__PURE__ */ jsxs("div", { className: "flex flex-fill", children: [
56
56
  /* @__PURE__ */ jsxs("div", { className: "d-flex align-items-center gap-12", children: [
@@ -67,7 +67,7 @@ const DeleteModal = /* @__PURE__ */ lazy(() => import("./DeleteModal.js")), Comm
67
67
  /* @__PURE__ */ jsx(Button, { variant: "ghost", color: "tertiary", size: "sm", onClick: handleReset, children: t("comment.cancel") }),
68
68
  /* @__PURE__ */ jsxs("div", { className: "d-flex justify-content-end align-items-center gap-4", children: [
69
69
  /* @__PURE__ */ jsx(TextCounter, { content: value, maxLength: options.maxCommentLength }),
70
- /* @__PURE__ */ jsx(Button, { type: "submit", variant: "ghost", size: "sm", leftIcon: /* @__PURE__ */ jsx(SvgIconSave, {}), disabled: !(content != null && content.length), onClick: () => handleUpdateComment(value), children: t("comment.save") })
70
+ /* @__PURE__ */ jsx(Button, { "data-testid": "comment-save", type: "submit", variant: "ghost", size: "sm", leftIcon: /* @__PURE__ */ jsx(SvgIconSave, {}), disabled: !(content != null && content.length), onClick: () => handleUpdateComment(value), children: t("comment.save") })
71
71
  ] })
72
72
  ] })
73
73
  ] }) : /* @__PURE__ */ jsxs(Fragment, { children: [
@@ -76,10 +76,10 @@ const DeleteModal = /* @__PURE__ */ lazy(() => import("./DeleteModal.js")), Comm
76
76
  }, children: content }),
77
77
  type === "edit" && /* @__PURE__ */ jsxs("div", { className: "ms-n8", children: [
78
78
  !replyTo && options.allowReplies && /* @__PURE__ */ jsx(Button, { variant: "ghost", color: "tertiary", size: "sm", onClick: () => handleReplyToComment(comment.id), children: t("comment.reply") }),
79
- userId === authorId && /* @__PURE__ */ jsx(Button, { variant: "ghost", color: "tertiary", size: "sm", onClick: () => {
79
+ userId === authorId && /* @__PURE__ */ jsx(Button, { "data-testid": "comment-edit", variant: "ghost", color: "tertiary", size: "sm", onClick: () => {
80
80
  handleModifyComment(comment.id), setValue(content);
81
81
  }, children: t("comment.edit") }),
82
- (userId === authorId || (userRights == null ? void 0 : userRights.manager)) && /* @__PURE__ */ jsx(Button, { variant: "ghost", color: "tertiary", size: "sm", onClick: () => setIsDeleteModalOpen(!0), children: t("comment.remove") })
82
+ (userId === authorId || (userRights == null ? void 0 : userRights.manager)) && /* @__PURE__ */ jsx(Button, { "data-testid": "comment-delete", variant: "ghost", color: "tertiary", size: "sm", onClick: () => setIsDeleteModalOpen(!0), children: t("comment.remove") })
83
83
  ] })
84
84
  ] })
85
85
  ] })
@@ -9,17 +9,14 @@ const CommentDate = ({
9
9
  fromNow
10
10
  } = useDate(), {
11
11
  t
12
- } = useTranslation(), getPublishedDate = (date) => t("comment.publish.date", {
13
- date: fromNow(date)
14
- }), getUpdatedDate = (date) => t("comment.update.date", {
15
- date: fromNow(date)
16
- });
17
- return updatedAt ? /* @__PURE__ */ jsxs(Fragment, { children: [
12
+ } = useTranslation();
13
+ return updatedAt || createdAt ? /* @__PURE__ */ jsxs(Fragment, { children: [
18
14
  /* @__PURE__ */ jsx("span", { className: "small text-gray-700", children: "|" }),
19
- /* @__PURE__ */ jsx("span", { className: "small text-gray-700", children: getUpdatedDate(updatedAt) })
20
- ] }) : createdAt ? /* @__PURE__ */ jsxs(Fragment, { children: [
21
- /* @__PURE__ */ jsx("span", { className: "small text-gray-700", children: "|" }),
22
- /* @__PURE__ */ jsx("span", { className: "small text-gray-700", children: getPublishedDate(createdAt) })
15
+ /* @__PURE__ */ jsx("span", { "data-testid": "comment-info-date", className: "small text-gray-700", children: updatedAt ? ((date) => t("comment.update.date", {
16
+ date: fromNow(date)
17
+ }))(updatedAt) : ((date) => t("comment.publish.date", {
18
+ date: fromNow(date)
19
+ }))(createdAt) })
23
20
  ] }) : null;
24
21
  };
25
22
  export {
@@ -4,7 +4,7 @@ const CommentDeleted = () => {
4
4
  const {
5
5
  t
6
6
  } = useTranslation();
7
- return /* @__PURE__ */ jsx("div", { className: "border rounded-3 p-12 pb-8 d-flex gap-12 bg-gray-200 my-16", children: t("comment.deleted") });
7
+ return /* @__PURE__ */ jsx("div", { "data-testid": "div-comment-deleted", className: "border rounded-3 p-12 pb-8 d-flex gap-12 bg-gray-200 my-16", children: t("comment.deleted") });
8
8
  };
9
9
  export {
10
10
  CommentDeleted
@@ -1,4 +1,4 @@
1
1
  export declare const CommentForm: ({ userId, replyTo, }: {
2
2
  userId: string;
3
3
  replyTo?: string;
4
- }) => import("react/jsx-runtime").JSX.Element;
4
+ }) => false | import("react/jsx-runtime").JSX.Element;
@@ -1,11 +1,11 @@
1
- import { jsx, Fragment, jsxs } from "react/jsx-runtime";
1
+ import { jsxs, jsx } from "react/jsx-runtime";
2
+ import { useState } from "react";
2
3
  import { useTranslation } from "react-i18next";
3
4
  import SvgIconSend from "../../icons/components/IconSend.js";
4
5
  import { useAutosizeTextarea } from "../hooks/useAutosizeTextarea.js";
5
6
  import { useCommentsContext } from "../hooks/useCommentsContext.js";
6
7
  import { CommentAvatar } from "./CommentAvatar.js";
7
8
  import { TextCounter } from "./TextCounter.js";
8
- import { useState } from "react";
9
9
  import Button from "../../../components/Button/Button.js";
10
10
  const CommentForm = ({
11
11
  userId,
@@ -22,19 +22,19 @@ const CommentForm = ({
22
22
  }, handleSubmit = () => {
23
23
  handleCreateComment(content, replyTo), setContent("");
24
24
  };
25
- return /* @__PURE__ */ jsx(Fragment, { children: type === "edit" && /* @__PURE__ */ jsxs("div", { className: "border rounded-3 p-12 pb-8 d-flex gap-12 bg-gray-200", children: [
25
+ return type === "edit" && /* @__PURE__ */ jsxs("div", { "data-testid": "div-comment-create", className: "border rounded-3 p-12 pb-8 d-flex gap-12 bg-gray-200 d-print-none", children: [
26
26
  /* @__PURE__ */ jsx(CommentAvatar, { id: userId }),
27
27
  /* @__PURE__ */ jsxs("div", { className: "d-flex flex-column flex-fill gap-4", children: [
28
- /* @__PURE__ */ jsx("textarea", { id: "add-comment", ref, value: content, className: "form-control", placeholder: t("comment.placeholder.textarea"), maxLength: options.maxCommentLength, onChange: handleChangeContent, onFocus, rows: 1, style: {
28
+ /* @__PURE__ */ jsx("textarea", { id: "add-comment", "data-testid": "comment-form", ref, value: content, className: "form-control", placeholder: t("comment.placeholder.textarea"), maxLength: options.maxCommentLength, onChange: handleChangeContent, onFocus, rows: 1, style: {
29
29
  resize: "none",
30
30
  overflow: "hidden"
31
31
  } }),
32
32
  /* @__PURE__ */ jsxs("div", { className: "d-flex justify-content-end align-items-center gap-4", children: [
33
33
  /* @__PURE__ */ jsx(TextCounter, { content, maxLength: options.maxCommentLength }),
34
- /* @__PURE__ */ jsx(Button, { type: "submit", variant: "ghost", size: "sm", leftIcon: /* @__PURE__ */ jsx(SvgIconSend, {}), disabled: !(content != null && content.length), onClick: handleSubmit, children: t("comment.post") })
34
+ /* @__PURE__ */ jsx(Button, { "data-testid": "comment-publish", type: "submit", variant: "ghost", size: "sm", leftIcon: /* @__PURE__ */ jsx(SvgIconSend, {}), disabled: !(content != null && content.length), onClick: handleSubmit, children: t("comment.post") })
35
35
  ] })
36
36
  ] })
37
- ] }) });
37
+ ] });
38
38
  };
39
39
  export {
40
40
  CommentForm
@@ -1,7 +1,7 @@
1
1
  import { jsx } from "react/jsx-runtime";
2
2
  const CommentTitle = ({
3
3
  children
4
- }) => /* @__PURE__ */ jsx("span", { className: "small text-gray-800", children });
4
+ }) => /* @__PURE__ */ jsx("span", { "data-testid": "comment-info-author", className: "small text-gray-800", children });
5
5
  export {
6
6
  CommentTitle
7
7
  };
@@ -1,11 +1,11 @@
1
1
  import { jsx, jsxs, Fragment } from "react/jsx-runtime";
2
2
  import { useMemo } from "react";
3
3
  import { CommentForm } from "../components/CommentForm.js";
4
- import { CommentHeader } from "../components/CommentHeader.js";
5
4
  import { CommentList } from "../components/CommentList.js";
6
5
  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
6
  import { CommentContext } from "../context/Context.js";
8
7
  import { useComments } from "../hooks/useComments.js";
8
+ import Heading from "../../../components/Heading/Heading.js";
9
9
  import Button from "../../../components/Button/Button.js";
10
10
  import EmptyScreen from "../../../components/EmptyScreen/EmptyScreen.js";
11
11
  const CommentProvider = ({
@@ -71,15 +71,15 @@ const CommentProvider = ({
71
71
  [displayedComments, editCommentId, profilesQueries, options]
72
72
  );
73
73
  return /* @__PURE__ */ jsx(CommentContext.Provider, { value: values, children: /* @__PURE__ */ jsxs("div", { className: "my-24", children: [
74
- /* @__PURE__ */ jsx(CommentHeader, { title }),
74
+ /* @__PURE__ */ jsx(Heading, { "data-testid": "comments-info-count-text", level: "h3", headingStyle: "h3", className: displayedComments.length === 0 ? "d-print-none" : "", children: title }),
75
75
  /* @__PURE__ */ jsxs("div", { className: "my-24", children: [
76
76
  user && /* @__PURE__ */ jsx(CommentForm, { userId: user.userId }),
77
- profilesQueries.isLoading ? null : /* @__PURE__ */ jsxs(Fragment, { children: [
77
+ !profilesQueries.isLoading && /* @__PURE__ */ jsxs(Fragment, { children: [
78
78
  /* @__PURE__ */ jsx(CommentList, {}),
79
79
  showMoreComments && /* @__PURE__ */ jsx(Button, { variant: "ghost", color: "tertiary", onClick: handleMoreComments, className: "my-16", children: t("comment.more") })
80
80
  ] })
81
81
  ] }),
82
- !displayedComments.length && type === "edit" && /* @__PURE__ */ jsxs("div", { className: "comments-emptyscreen", children: [
82
+ !displayedComments.length && type === "edit" && /* @__PURE__ */ jsxs("div", { className: "comments-emptyscreen d-print-none", children: [
83
83
  /* @__PURE__ */ jsx("div", { className: "comments-emptyscreen-wrapper", children: /* @__PURE__ */ jsx(EmptyScreen, { imageSrc: emptyscreenPath, size: 150 }) }),
84
84
  /* @__PURE__ */ jsx("p", { children: t("comment.emptyscreen") })
85
85
  ] })
@@ -71,7 +71,9 @@ interface EditRootProps extends BaseProps {
71
71
  */
72
72
  callbacks: CommentCallbacks;
73
73
  /**
74
- * Rights to perform CRUD on comment
74
+ * Rights to perform CRUD on comment (type=`edit` required):
75
+ * - manager => delete
76
+ * Also, comment's author can update, delete
75
77
  */
76
78
  rights?: Record<RightRole, boolean>;
77
79
  }
@@ -27,16 +27,16 @@ import { useTranslation } from "react-i18next";
27
27
  import { useEdificeClient } from "../../../providers/EdificeClientProvider/EdificeClientProvider.hook.js";
28
28
  import useUpload from "../../../hooks/useUpload/useUpload.js";
29
29
  import IframeNodeView from "../components/NodeView/IframeNodeView.js";
30
+ import MediaRenderer from "../components/Renderer/MediaRenderer.js";
30
31
  import VideoNodeView from "../components/NodeView/VideoNodeView.js";
31
32
  import AudioNodeView from "../components/NodeView/AudioNodeView.js";
33
+ import AudioRenderer from "../components/Renderer/AudioRenderer.js";
32
34
  import LinkerNodeView from "../components/NodeView/LinkerNodeView.js";
35
+ import LinkerRenderer from "../components/Renderer/LinkerRenderer.js";
33
36
  import ImageNodeView from "../components/NodeView/ImageNodeView.js";
34
37
  import AttachmentNodeView from "../components/NodeView/AttachmentNodeView.js";
35
- import InformationPaneNodeView from "../components/NodeView/InformationPaneNodeView.js";
36
- import MediaRenderer from "../components/Renderer/MediaRenderer.js";
37
- import AudioRenderer from "../components/Renderer/AudioRenderer.js";
38
- import LinkerRenderer from "../components/Renderer/LinkerRenderer.js";
39
38
  import AttachmentRenderer from "../components/Renderer/AttachmentRenderer.js";
39
+ import InformationPaneNodeView from "../components/NodeView/InformationPaneNodeView.js";
40
40
  import InformationPaneRenderer from "../components/Renderer/InformationPaneRenderer.js";
41
41
  const useTipTapEditor = (editable, content, focus, placeholder, onContentChange, visibility = "protected", extensions) => {
42
42
  const {
@@ -0,0 +1,7 @@
1
+ import { SVGProps } from 'react';
2
+ interface SVGRProps {
3
+ title?: string;
4
+ titleId?: string;
5
+ }
6
+ declare const SvgIconAdjustSettings: ({ title, titleId, ...props }: SVGProps<SVGSVGElement> & SVGRProps) => import("react/jsx-runtime").JSX.Element;
7
+ export default SvgIconAdjustSettings;
@@ -0,0 +1,12 @@
1
+ import { jsxs, jsx } from "react/jsx-runtime";
2
+ const SvgIconAdjustSettings = ({
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: "M10 17c1.306 0 2.414.835 2.826 2H21.9c.608 0 1.1.448 1.1 1s-.492 1-1.1 1h-9.074a2.998 2.998 0 0 1-5.652 0H2.1c-.608 0-1.1-.448-1.1-1s.492-1 1.1-1h5.074c.412-1.165 1.52-2 2.826-2m8-8c1.306 0 2.414.835 2.826 2H21.9c.608 0 1.1.448 1.1 1s-.492 1-1.1 1h-1.074a2.998 2.998 0 0 1-5.652 0H2.1c-.608 0-1.1-.448-1.1-1s.492-1 1.1-1h13.074c.412-1.165 1.52-2 2.826-2M7 1c1.306 0 2.414.835 2.826 2H21.9c.608 0 1.1.448 1.1 1s-.492 1-1.1 1H9.826A3 3 0 0 1 7 7a3 3 0 0 1-2.826-2H2.1C1.492 5 1 4.552 1 4s.492-1 1.1-1h2.074C4.586 1.835 5.694 1 7 1" })
9
+ ] });
10
+ export {
11
+ SvgIconAdjustSettings 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 SvgIconCalendarEdit: ({ title, titleId, ...props }: SVGProps<SVGSVGElement> & SVGRProps) => import("react/jsx-runtime").JSX.Element;
7
+ export default SvgIconCalendarEdit;
@@ -0,0 +1,12 @@
1
+ import { jsxs, jsx } from "react/jsx-runtime";
2
+ const SvgIconCalendarEdit = ({
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: "M16 1a1 1 0 0 1 1 1v1h1.5a1 1 0 1 1 0 2H17v1a1 1 0 1 1-2 0V5H9v1a1 1 0 0 1-2 0V5H5a1 1 0 0 0-1 1v3h7a1 1 0 1 1 0 2H4v9a1 1 0 0 0 1 1h14a1 1 0 0 0 1-1v-4a1 1 0 1 1 2 0v4a3 3 0 0 1-3 3H5a3 3 0 0 1-3-3V6a3 3 0 0 1 3-3h2V2a1 1 0 0 1 2 0v1h6V2a1 1 0 0 1 1-1m3.584 5.92a2.685 2.685 0 0 1 3.142 4.353l-11.38 8.21c-.147.106-.32.17-.501.185l-3.261.277a1 1 0 0 1-1.003-1.391l1.29-3.007.063-.121q.106-.176.272-.296zm1.68 1.503a.69.69 0 0 0-.51.12L9.599 16.591l-.523 1.22 1.325-.113 11.154-8.046a.686.686 0 0 0-.041-1.136.7.7 0 0 0-.25-.093" })
9
+ ] });
10
+ export {
11
+ SvgIconCalendarEdit 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 SvgIconLabel: ({ title, titleId, ...props }: SVGProps<SVGSVGElement> & SVGRProps) => import("react/jsx-runtime").JSX.Element;
7
+ export default SvgIconLabel;
@@ -0,0 +1,12 @@
1
+ import { jsxs, jsx } from "react/jsx-runtime";
2
+ const SvgIconLabel = ({
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 18 12", "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: "M2.25 1.5a.75.75 0 0 0-.75.75v7.5c0 .414.336.75.75.75h9.512a.75.75 0 0 0 .552-.242l3.45-3.75a.75.75 0 0 0 0-1.016l-3.45-3.75a.75.75 0 0 0-.552-.242zM0 2.25A2.25 2.25 0 0 1 2.25 0h9.512c.63 0 1.23.264 1.656.727l3.45 3.75a2.25 2.25 0 0 1 0 3.046l-3.45 3.75a2.25 2.25 0 0 1-1.656.727H2.25A2.25 2.25 0 0 1 0 9.75z", clipRule: "evenodd" })
9
+ ] });
10
+ export {
11
+ SvgIconLabel 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 SvgIconAssistancetic: ({ title, titleId, ...props }: SVGProps<SVGSVGElement> & SVGRProps) => import("react/jsx-runtime").JSX.Element;
7
+ export default SvgIconAssistancetic;
@@ -0,0 +1,14 @@
1
+ import { jsxs, jsx } from "react/jsx-runtime";
2
+ const SvgIconAssistancetic = ({
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 60 60", "aria-hidden": "true", "aria-labelledby": titleId, ...props, children: [
7
+ title ? /* @__PURE__ */ jsx("title", { id: titleId, children: title }) : null,
8
+ /* @__PURE__ */ jsx("path", { fill: "#ECBE30", d: "M0 8a8 8 0 0 1 8-8h44a8 8 0 0 1 8 8v44a8 8 0 0 1-8 8H8a8 8 0 0 1-8-8z" }),
9
+ /* @__PURE__ */ jsx("path", { fill: "#fff", fillRule: "evenodd", d: "M30 22.667c1.013 0 1.833.82 1.833 1.833v9.167a1.833 1.833 0 0 1-3.666 0V24.5c0-1.012.82-1.833 1.833-1.833M28.167 40.083c0-1.012.82-1.833 1.833-1.833h.018a1.833 1.833 0 0 1 0 3.667H30a1.833 1.833 0 0 1-1.833-1.834", clipRule: "evenodd" }),
10
+ /* @__PURE__ */ jsx("path", { fill: "#fff", fillRule: "evenodd", d: "M26.787 11.87c1.393-2.532 5.033-2.532 6.426 0L50.279 42.9c1.344 2.443-.424 5.433-3.213 5.433H12.934c-2.789 0-4.557-2.99-3.213-5.433zm20.28 32.796L30 13.638l-17.066 31.03z", clipRule: "evenodd" })
11
+ ] });
12
+ export {
13
+ SvgIconAssistancetic as default
14
+ };
@@ -7,6 +7,7 @@ export { default as IconAgenda } from './IconAgenda';
7
7
  export { default as IconAppointments } from './IconAppointments';
8
8
  export { default as IconArchive } from './IconArchive';
9
9
  export { default as IconAssistance } from './IconAssistance';
10
+ export { default as IconAssistancetic } from './IconAssistancetic';
10
11
  export { default as IconAssr } from './IconAssr';
11
12
  export { default as IconAward } from './IconAward';
12
13
  export { default as IconBanquesavoir } from './IconBanquesavoir';
@@ -1,5 +1,6 @@
1
1
  export { default as IconAddUser } from './IconAddUser';
2
2
  export { default as IconAdd } from './IconAdd';
3
+ export { default as IconAdjustSettings } from './IconAdjustSettings';
3
4
  export { default as IconAlertCircle } from './IconAlertCircle';
4
5
  export { default as IconAlertTriangle } from './IconAlertTriangle';
5
6
  export { default as IconAlignCenter } from './IconAlignCenter';
@@ -17,6 +18,7 @@ export { default as IconBlur } from './IconBlur';
17
18
  export { default as IconBookmark } from './IconBookmark';
18
19
  export { default as IconBulletList } from './IconBulletList';
19
20
  export { default as IconBurgerMenu } from './IconBurgerMenu';
21
+ export { default as IconCalendarEdit } from './IconCalendarEdit';
20
22
  export { default as IconCalendarLight } from './IconCalendarLight';
21
23
  export { default as IconCalendar } from './IconCalendar';
22
24
  export { default as IconCamera } from './IconCamera';
@@ -68,6 +70,7 @@ export { default as IconImageSizeSmall } from './IconImageSizeSmall';
68
70
  export { default as IconInbox } from './IconInbox';
69
71
  export { default as IconInfoCircle } from './IconInfoCircle';
70
72
  export { default as IconInfoRectangle } from './IconInfoRectangle';
73
+ export { default as IconLabel } from './IconLabel';
71
74
  export { default as IconLandscape } from './IconLandscape';
72
75
  export { default as IconLibrary } from './IconLibrary';
73
76
  export { default as IconLink } from './IconLink';
@@ -44,7 +44,7 @@ const OnboardingModal = /* @__PURE__ */ forwardRef(({
44
44
  }, handleCloseWithoutPreference = () => {
45
45
  setIsOpen(!1), setSwiperprogress(0);
46
46
  };
47
- return /* @__PURE__ */ createPortal(/* @__PURE__ */ jsxs(Modal, { id: "onboarding-modal", size: "md", isOpen, focusId: "nextButtonId", onModalClose: handleCloseWithoutPreference, children: [
47
+ return /* @__PURE__ */ createPortal(/* @__PURE__ */ jsxs(Modal, { id: "onboarding-modal", "data-testid": "modal-onboarding", size: "md", isOpen, focusId: "nextButtonId", onModalClose: handleCloseWithoutPreference, children: [
48
48
  /* @__PURE__ */ jsx(Modal.Header, { onModalClose: handleCloseWithoutPreference, centered: !0, children: t(currentTitle || "explorer.modal.onboarding.trash.title") }),
49
49
  /* @__PURE__ */ jsx(Modal.Body, { children: /* @__PURE__ */ jsx(Swiper, { modules: [Pagination], onSwiper: (swiper) => {
50
50
  setSwiperInstance(swiper);
@@ -59,10 +59,10 @@ const OnboardingModal = /* @__PURE__ */ forwardRef(({
59
59
  } })
60
60
  ] }, index)) }) }),
61
61
  /* @__PURE__ */ jsxs(Modal.Footer, { children: [
62
- /* @__PURE__ */ jsx(Button, { type: "button", color: "tertiary", variant: "ghost", onClick: handleCloseWithoutPreference, children: t("explorer.modal.onboarding.trash.later") }),
63
- swiperProgress > 0 && /* @__PURE__ */ jsx(Button, { type: "button", color: "primary", variant: "outline", onClick: () => swiperInstance.slidePrev(), children: t(prevText || "explorer.modal.onboarding.trash.prev") }),
64
- swiperProgress < 1 && /* @__PURE__ */ jsx(Button, { id: "nextButtonId", type: "button", color: "primary", variant: "filled", onClick: () => swiperInstance.slideNext(), children: t(nextText || "explorer.modal.onboarding.trash.next") }),
65
- swiperProgress === 1 && /* @__PURE__ */ jsx(Button, { type: "button", color: "primary", variant: "filled", onClick: () => {
62
+ /* @__PURE__ */ jsx(Button, { "data-testid": "modal-onboarding-later", type: "button", color: "tertiary", variant: "ghost", onClick: handleCloseWithoutPreference, children: t("explorer.modal.onboarding.trash.later") }),
63
+ swiperProgress > 0 && /* @__PURE__ */ jsx(Button, { "data-testid": "modal-onboarding-previous", type: "button", color: "primary", variant: "outline", onClick: () => swiperInstance.slidePrev(), children: t(prevText || "explorer.modal.onboarding.trash.prev") }),
64
+ swiperProgress < 1 && /* @__PURE__ */ jsx(Button, { id: "nextButtonId", "data-testid": "modal-onboarding-next", type: "button", color: "primary", variant: "filled", onClick: () => swiperInstance.slideNext(), children: t(nextText || "explorer.modal.onboarding.trash.next") }),
65
+ swiperProgress === 1 && /* @__PURE__ */ jsx(Button, { "data-testid": "modal-onboarding-close", type: "button", color: "primary", variant: "filled", onClick: () => {
66
66
  isOnboarding ? handleCloseWithPreference() : handleCloseWithoutPreference();
67
67
  }, children: t(closeText || "explorer.modal.onboarding.trash.close") })
68
68
  ] })
@@ -160,6 +160,5 @@ const DEFAULT_INPUT_MAX_LENGTH = 60, DEFAULT_TEXTAREA_MAX_LENGTH = 400, Resource
160
160
  ] }), document.getElementById("portal"));
161
161
  };
162
162
  export {
163
- ResourceModal,
164
- ResourceModal as default
163
+ ResourceModal
165
164
  };
@@ -7,6 +7,7 @@ import { UseMutationResult } from '../../../node_modules/@tanstack/react-query';
7
7
  * @property {ID} resourceId - Unique identifier of the resource to share
8
8
  * @property {RightStringified[]} resourceRights - Current rights assigned to the resource
9
9
  * @property {string} resourceCreatorId - User ID of the resource creator
10
+ * @property {string} resourceCreatorDisplayName - (optional) Name of the resource creator to display
10
11
  * @property {ShareRightActionDisplayName[]} [filteredActions] - Optional list of allowed actions to display
11
12
  * @property {ShareUrls} [shareUrls] - Optional custom URLs for API endpoints related to sharing operations default endpoints are used if not provided
12
13
  * default: {
@@ -42,6 +43,7 @@ import { UseMutationResult } from '../../../node_modules/@tanstack/react-query';
42
43
  * resourceId: '12345',
43
44
  * resourceRights: [],
44
45
  * resourceCreatorId: 'user-67890',
46
+ * resourceCreatorDisplayName: 'Jim',
45
47
  * filteredActions: ['read', 'contrib'],
46
48
  * defaultActions: [
47
49
  * {
@@ -61,6 +63,7 @@ export type ShareOptions = {
61
63
  resourceId: ID;
62
64
  resourceRights: RightStringified[];
63
65
  resourceCreatorId: string;
66
+ resourceCreatorDisplayName?: string;
64
67
  filteredActions?: ShareRightActionDisplayName[];
65
68
  shareUrls?: ShareUrls;
66
69
  defaultActions?: ShareRightAction[];
@@ -9,6 +9,7 @@ import { ShareBookmarkLine } from "./ShareBookmarkLine.js";
9
9
  import { useSearch } from "./hooks/useSearch.js";
10
10
  import useShare from "./hooks/useShare.js";
11
11
  import { useShareBookmark } from "./hooks/useShareBookmark.js";
12
+ import useDirectory from "../../../hooks/useDirectory/useDirectory.js";
12
13
  import Heading from "../../../components/Heading/Heading.js";
13
14
  import Tooltip from "../../../components/Tooltip/Tooltip.js";
14
15
  import Combobox from "../../../components/Combobox/Combobox.js";
@@ -31,6 +32,7 @@ const ShareResources = /* @__PURE__ */ forwardRef(({
31
32
  const {
32
33
  resourceId,
33
34
  resourceCreatorId,
35
+ resourceCreatorDisplayName,
34
36
  resourceRights,
35
37
  filteredActions,
36
38
  shareUrls,
@@ -95,7 +97,9 @@ const ShareResources = /* @__PURE__ */ forwardRef(({
95
97
  shareDispatch
96
98
  }), handleOnSaveBookmark = () => (setIsSavingBookmark(!0), handleOnSave().then(() => {
97
99
  setIsSavingBookmark(!1);
98
- }));
100
+ })), {
101
+ getAvatarURL
102
+ } = useDirectory();
99
103
  useImperativeHandle(ref, () => ({
100
104
  handleShare
101
105
  }), [handleShare]), useEffect(() => {
@@ -105,7 +109,7 @@ const ShareResources = /* @__PURE__ */ forwardRef(({
105
109
  }, [isSavingBookmark, isSharing, onSubmit]);
106
110
  const {
107
111
  t
108
- } = useTranslation(), searchPlaceholder = showSearchAdmlHint() ? t("explorer.search.adml.hint") : t("explorer.modal.share.search.placeholder");
112
+ } = useTranslation(), userIsAuthor = currentIsAuthor(), searchPlaceholder = showSearchAdmlHint() ? t("explorer.search.adml.hint") : t("explorer.modal.share.search.placeholder");
109
113
  return /* @__PURE__ */ jsxs("div", { children: [
110
114
  /* @__PURE__ */ jsxs(Heading, { headingStyle: "h4", level: "h3", className: "mb-16 d-flex align-items-center", children: [
111
115
  /* @__PURE__ */ jsx("div", { className: "me-8", children: t("explorer.modal.share.search") }),
@@ -120,9 +124,9 @@ const ShareResources = /* @__PURE__ */ forwardRef(({
120
124
  /* @__PURE__ */ jsx("th", { scope: "col", children: /* @__PURE__ */ jsx(VisuallyHidden, { children: t("close") }) })
121
125
  ] }) }),
122
126
  /* @__PURE__ */ jsxs("tbody", { children: [
123
- currentIsAuthor() && /* @__PURE__ */ jsxs("tr", { children: [
124
- /* @__PURE__ */ jsx("th", { scope: "row", children: /* @__PURE__ */ jsx(Avatar, { alt: t("explorer.modal.share.avatar.me.alt"), size: "xs", src: myAvatar, variant: "circle" }) }),
125
- /* @__PURE__ */ jsx("td", { children: t("share.me") }),
127
+ /* @__PURE__ */ jsxs("tr", { children: [
128
+ /* @__PURE__ */ jsx("th", { scope: "row", children: /* @__PURE__ */ jsx(Avatar, { alt: t("explorer.modal.share.avatar.me.alt"), size: "xs", src: userIsAuthor ? myAvatar : getAvatarURL(resourceCreatorId, "user"), variant: "circle" }) }),
129
+ /* @__PURE__ */ jsx("td", { children: userIsAuthor ? t("share.me") : resourceCreatorDisplayName ?? t("share.author") }),
126
130
  shareRightActions.map((shareRightAction) => /* @__PURE__ */ jsx("td", { style: {
127
131
  width: "80px"
128
132
  }, className: "text-center text-white", children: /* @__PURE__ */ jsx(Checkbox, { checked: !0, disabled: !0 }) }, shareRightAction.displayName)),
@@ -41,6 +41,5 @@ const ExternalLinker = ({
41
41
  ] }) });
42
42
  };
43
43
  export {
44
- ExternalLinker,
45
- ExternalLinker as default
44
+ ExternalLinker
46
45
  };
@@ -130,6 +130,5 @@ const InternalLinker = ({
130
130
  ] });
131
131
  };
132
132
  export {
133
- InternalLinker,
134
- InternalLinker as default
133
+ InternalLinker
135
134
  };
@@ -12,7 +12,7 @@ import SvgIconSmartphone from "../../icons/components/IconSmartphone.js";
12
12
  import { InnerTabs } from "./innertabs/index.js";
13
13
  import { MediaLibraryContext } from "./MediaLibraryContext.js";
14
14
  import useHasWorkflow from "../../../hooks/useHasWorkflow/useHasWorkflow.js";
15
- import { useHttpErrorToast } from "../../../hooks/useHttpErrorToast/useHttpErrorToast.js";
15
+ import useHttpErrorToast from "../../../hooks/useHttpErrorToast/useHttpErrorToast.js";
16
16
  import Modal from "../../../components/Modal/Modal.js";
17
17
  import { Tabs } from "../../../components/Tabs/components/Tabs.js";
18
18
  import Button from "../../../components/Button/Button.js";
@@ -1,11 +1,11 @@
1
1
  import { default as default2 } from "./modules/multimedia/AudioRecorder/AudioRecorder.js";
2
2
  import { default as default3 } from "./modules/multimedia/Embed/Embed.js";
3
- import { default as default4 } from "./modules/multimedia/ImageEditor/components/ImageEditor.js";
4
- import { default as default5 } from "./modules/multimedia/ImagePicker/ImagePicker.js";
5
- import { default as default6 } from "./modules/multimedia/FileCard/FileCard.js";
3
+ import { default as default4 } from "./modules/multimedia/FileCard/FileCard.js";
4
+ import { default as default5 } from "./modules/multimedia/ImageEditor/components/ImageEditor.js";
5
+ import { default as default6 } from "./modules/multimedia/ImagePicker/ImagePicker.js";
6
6
  import { default as default7 } from "./modules/multimedia/MediaLibrary/MediaLibrary.js";
7
- import { default as default8 } from "./modules/multimedia/UploadFiles/UploadFiles.js";
8
- import { default as default9 } from "./modules/multimedia/UploadCard/UploadCard.js";
7
+ import { default as default8 } from "./modules/multimedia/UploadCard/UploadCard.js";
8
+ import { default as default9 } from "./modules/multimedia/UploadFiles/UploadFiles.js";
9
9
  import { default as default10 } from "./modules/multimedia/VideoEmbed/VideoEmbed.js";
10
10
  import { default as default11 } from "./modules/multimedia/VideoRecorder/VideoRecorder.js";
11
11
  import { default as default12 } from "./modules/multimedia/Workspace/Workspace.js";
@@ -17,14 +17,14 @@ export {
17
17
  default2 as AudioRecorder,
18
18
  default3 as Embed,
19
19
  ExternalLinker,
20
- default6 as FileCard,
21
- default4 as ImageEditor,
22
- default5 as ImagePicker,
20
+ default4 as FileCard,
21
+ default5 as ImageEditor,
22
+ default6 as ImagePicker,
23
23
  InternalLinker,
24
24
  default7 as MediaLibrary,
25
25
  Upload,
26
- default9 as UploadCard,
27
- default8 as UploadFiles,
26
+ default8 as UploadCard,
27
+ default9 as UploadFiles,
28
28
  default10 as VideoEmbed,
29
29
  default11 as VideoRecorder,
30
30
  default12 as Workspace,
@@ -0,0 +1,18 @@
1
+ import { commonjsGlobal, getDefaultExportFromCjs } from "../../../../../../_virtual/_commonjsHelpers.js";
2
+ import { __module as isSameOrAfter$1 } from "../../../../../../_virtual/isSameOrAfter.js";
3
+ (function(module, exports$1) {
4
+ (function(e, t) {
5
+ module.exports = t();
6
+ })(commonjsGlobal, function() {
7
+ return function(e, t) {
8
+ t.prototype.isSameOrAfter = function(e2, t2) {
9
+ return this.isSame(e2, t2) || this.isAfter(e2, t2);
10
+ };
11
+ };
12
+ });
13
+ })(isSameOrAfter$1);
14
+ var isSameOrAfterExports = isSameOrAfter$1.exports;
15
+ const isSameOrAfter = /* @__PURE__ */ getDefaultExportFromCjs(isSameOrAfterExports);
16
+ export {
17
+ isSameOrAfter as default
18
+ };
@@ -0,0 +1,19 @@
1
+ import { commonjsGlobal, getDefaultExportFromCjs } from "../../../../../../_virtual/_commonjsHelpers.js";
2
+ import { __module as isToday$1 } from "../../../../../../_virtual/isToday.js";
3
+ (function(module, exports$1) {
4
+ (function(e, o) {
5
+ module.exports = o();
6
+ })(commonjsGlobal, function() {
7
+ return function(e, o, t) {
8
+ o.prototype.isToday = function() {
9
+ var e2 = "YYYY-MM-DD", o2 = t();
10
+ return this.format(e2) === o2.format(e2);
11
+ };
12
+ };
13
+ });
14
+ })(isToday$1);
15
+ var isTodayExports = isToday$1.exports;
16
+ const isToday = /* @__PURE__ */ getDefaultExportFromCjs(isTodayExports);
17
+ export {
18
+ isToday as default
19
+ };
@@ -5,6 +5,5 @@ const antTheme = {
5
5
  hashed: !1
6
6
  };
7
7
  export {
8
- antTheme,
9
- antTheme as default
8
+ antTheme
10
9
  };
@@ -0,0 +1 @@
1
+ export * from './mime-types-utils';
@@ -0,0 +1 @@
1
+ export declare const HEIC_MIME_TYPES: string[];
@@ -0,0 +1,4 @@
1
+ const HEIC_MIME_TYPES = ["image/heic", "image/heif"];
2
+ export {
3
+ HEIC_MIME_TYPES
4
+ };