@edifice.io/react 2.5.9-develop.20260130161524 → 2.5.9
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/README.md +0 -5
- package/dist/components/DatePicker/DatePicker.js +3 -6
- package/dist/components/Layout/components/WidgetApps.js +2 -2
- package/dist/components/Modal/Modal.d.ts +0 -4
- package/dist/components/Modal/Modal.js +12 -13
- package/dist/hooks/useConversation/useConversation.js +1 -3
- package/dist/hooks/useDate/useDate.d.ts +1 -5
- package/dist/hooks/useDate/useDate.js +2 -18
- package/dist/hooks/useDropzone/useDropzone.js +16 -21
- package/dist/icons.js +350 -356
- package/dist/modules/audience/ViewsCounter.d.ts +17 -3
- package/dist/modules/audience/ViewsCounter.js +7 -9
- package/dist/modules/comments/components/Comment.js +4 -4
- package/dist/modules/comments/components/CommentDate.js +10 -7
- package/dist/modules/comments/components/CommentDeleted.js +1 -1
- package/dist/modules/comments/components/CommentForm.d.ts +1 -1
- package/dist/modules/comments/components/CommentForm.js +6 -6
- package/dist/modules/comments/components/CommentHeader.d.ts +3 -0
- package/dist/modules/comments/components/CommentHeader.js +8 -0
- package/dist/modules/comments/components/CommentTitle.js +1 -1
- package/dist/modules/comments/provider/CommentProvider.js +4 -4
- package/dist/modules/comments/types.d.ts +1 -3
- package/dist/modules/icons/components/index.d.ts +0 -3
- package/dist/modules/modals/OnboardingModal/OnboardingModal.js +5 -5
- package/dist/modules/modals/ShareModal/ShareResources.d.ts +0 -3
- package/dist/modules/modals/ShareModal/ShareResources.js +5 -9
- package/package.json +6 -6
- package/dist/_virtual/isSameOrAfter.js +0 -4
- package/dist/_virtual/isToday.js +0 -4
- package/dist/components/DatePicker/DatePicker.d.ts +0 -57
- package/dist/modules/icons/components/IconAdjustSettings.d.ts +0 -7
- package/dist/modules/icons/components/IconAdjustSettings.js +0 -12
- package/dist/modules/icons/components/IconCalendarEdit.d.ts +0 -7
- package/dist/modules/icons/components/IconCalendarEdit.js +0 -12
- package/dist/modules/icons/components/IconLabel.d.ts +0 -7
- package/dist/modules/icons/components/IconLabel.js +0 -12
- package/dist/node_modules/.pnpm/dayjs@1.11.19/node_modules/dayjs/plugin/isSameOrAfter.js +0 -18
- package/dist/node_modules/.pnpm/dayjs@1.11.19/node_modules/dayjs/plugin/isToday.js +0 -19
- package/dist/utilities/mime-types/index.d.ts +0 -1
- package/dist/utilities/mime-types/mime-types-utils.d.ts +0 -1
- package/dist/utilities/mime-types/mime-types-utils.js +0 -4
|
@@ -1,6 +1,20 @@
|
|
|
1
|
-
export interface ViewsCounterProps
|
|
2
|
-
/**
|
|
1
|
+
export interface ViewsCounterProps {
|
|
2
|
+
/**
|
|
3
|
+
* The number of views to display.
|
|
4
|
+
*
|
|
5
|
+
*/
|
|
3
6
|
viewsCounter: number;
|
|
7
|
+
/**
|
|
8
|
+
* Optional click handler for the counter button.
|
|
9
|
+
*/
|
|
10
|
+
onClick?: (event?: React.MouseEvent<HTMLButtonElement>) => void;
|
|
11
|
+
/**
|
|
12
|
+
* Optional CSS class name to apply to the counter component.
|
|
13
|
+
*/
|
|
14
|
+
className?: string;
|
|
4
15
|
}
|
|
5
|
-
declare const ViewsCounter:
|
|
16
|
+
declare const ViewsCounter: {
|
|
17
|
+
({ viewsCounter, onClick, className, }: ViewsCounterProps): import("react/jsx-runtime").JSX.Element;
|
|
18
|
+
displayName: string;
|
|
19
|
+
};
|
|
6
20
|
export default ViewsCounter;
|
|
@@ -1,20 +1,18 @@
|
|
|
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";
|
|
5
4
|
import SvgIconSee from "../icons/components/IconSee.js";
|
|
6
5
|
import Button from "../../components/Button/Button.js";
|
|
7
|
-
const ViewsCounter =
|
|
6
|
+
const ViewsCounter = ({
|
|
8
7
|
viewsCounter,
|
|
9
8
|
onClick,
|
|
10
|
-
className
|
|
11
|
-
|
|
12
|
-
}, ref) => {
|
|
9
|
+
className
|
|
10
|
+
}) => {
|
|
13
11
|
const handleButtonClick = (event) => {
|
|
14
|
-
event.preventDefault(), event.stopPropagation(), onClick == null || onClick(
|
|
15
|
-
}
|
|
16
|
-
return className = clsx("text-gray-700 fw-normal py-4 px-8 btn-icon", className), /* @__PURE__ */ jsx(Button, {
|
|
17
|
-
}
|
|
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
|
+
};
|
|
18
16
|
export {
|
|
19
17
|
ViewsCounter as default
|
|
20
18
|
};
|
|
@@ -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", {
|
|
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: [
|
|
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, {
|
|
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") })
|
|
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, {
|
|
79
|
+
userId === authorId && /* @__PURE__ */ jsx(Button, { 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, {
|
|
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") })
|
|
83
83
|
] })
|
|
84
84
|
] })
|
|
85
85
|
] })
|
|
@@ -9,14 +9,17 @@ const CommentDate = ({
|
|
|
9
9
|
fromNow
|
|
10
10
|
} = useDate(), {
|
|
11
11
|
t
|
|
12
|
-
} = useTranslation()
|
|
13
|
-
|
|
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: [
|
|
14
18
|
/* @__PURE__ */ jsx("span", { className: "small text-gray-700", children: "|" }),
|
|
15
|
-
/* @__PURE__ */ jsx("span", {
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
}))(createdAt) })
|
|
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) })
|
|
20
23
|
] }) : null;
|
|
21
24
|
};
|
|
22
25
|
export {
|
|
@@ -4,7 +4,7 @@ const CommentDeleted = () => {
|
|
|
4
4
|
const {
|
|
5
5
|
t
|
|
6
6
|
} = useTranslation();
|
|
7
|
-
return /* @__PURE__ */ jsx("div", {
|
|
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") });
|
|
8
8
|
};
|
|
9
9
|
export {
|
|
10
10
|
CommentDeleted
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { useState } from "react";
|
|
1
|
+
import { jsx, Fragment, jsxs } from "react/jsx-runtime";
|
|
3
2
|
import { useTranslation } from "react-i18next";
|
|
4
3
|
import SvgIconSend from "../../icons/components/IconSend.js";
|
|
5
4
|
import { useAutosizeTextarea } from "../hooks/useAutosizeTextarea.js";
|
|
6
5
|
import { useCommentsContext } from "../hooks/useCommentsContext.js";
|
|
7
6
|
import { CommentAvatar } from "./CommentAvatar.js";
|
|
8
7
|
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 type === "edit" && /* @__PURE__ */ jsxs("div", {
|
|
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: [
|
|
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",
|
|
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: {
|
|
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, {
|
|
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") })
|
|
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", {
|
|
4
|
+
}) => /* @__PURE__ */ jsx("span", { 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";
|
|
4
5
|
import { CommentList } from "../components/CommentList.js";
|
|
5
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";
|
|
6
7
|
import { CommentContext } from "../context/Context.js";
|
|
7
8
|
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(
|
|
74
|
+
/* @__PURE__ */ jsx(CommentHeader, { title }),
|
|
75
75
|
/* @__PURE__ */ jsxs("div", { className: "my-24", children: [
|
|
76
76
|
user && /* @__PURE__ */ jsx(CommentForm, { userId: user.userId }),
|
|
77
|
-
|
|
77
|
+
profilesQueries.isLoading ? null : /* @__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
|
|
82
|
+
!displayedComments.length && type === "edit" && /* @__PURE__ */ jsxs("div", { className: "comments-emptyscreen", 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,9 +71,7 @@ interface EditRootProps extends BaseProps {
|
|
|
71
71
|
*/
|
|
72
72
|
callbacks: CommentCallbacks;
|
|
73
73
|
/**
|
|
74
|
-
* Rights to perform CRUD on comment
|
|
75
|
-
* - manager => delete
|
|
76
|
-
* Also, comment's author can update, delete
|
|
74
|
+
* Rights to perform CRUD on comment
|
|
77
75
|
*/
|
|
78
76
|
rights?: Record<RightRole, boolean>;
|
|
79
77
|
}
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
export { default as IconAddUser } from './IconAddUser';
|
|
2
2
|
export { default as IconAdd } from './IconAdd';
|
|
3
|
-
export { default as IconAdjustSettings } from './IconAdjustSettings';
|
|
4
3
|
export { default as IconAlertCircle } from './IconAlertCircle';
|
|
5
4
|
export { default as IconAlertTriangle } from './IconAlertTriangle';
|
|
6
5
|
export { default as IconAlignCenter } from './IconAlignCenter';
|
|
@@ -18,7 +17,6 @@ export { default as IconBlur } from './IconBlur';
|
|
|
18
17
|
export { default as IconBookmark } from './IconBookmark';
|
|
19
18
|
export { default as IconBulletList } from './IconBulletList';
|
|
20
19
|
export { default as IconBurgerMenu } from './IconBurgerMenu';
|
|
21
|
-
export { default as IconCalendarEdit } from './IconCalendarEdit';
|
|
22
20
|
export { default as IconCalendarLight } from './IconCalendarLight';
|
|
23
21
|
export { default as IconCalendar } from './IconCalendar';
|
|
24
22
|
export { default as IconCamera } from './IconCamera';
|
|
@@ -70,7 +68,6 @@ export { default as IconImageSizeSmall } from './IconImageSizeSmall';
|
|
|
70
68
|
export { default as IconInbox } from './IconInbox';
|
|
71
69
|
export { default as IconInfoCircle } from './IconInfoCircle';
|
|
72
70
|
export { default as IconInfoRectangle } from './IconInfoRectangle';
|
|
73
|
-
export { default as IconLabel } from './IconLabel';
|
|
74
71
|
export { default as IconLandscape } from './IconLandscape';
|
|
75
72
|
export { default as IconLibrary } from './IconLibrary';
|
|
76
73
|
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",
|
|
47
|
+
return /* @__PURE__ */ createPortal(/* @__PURE__ */ jsxs(Modal, { id: "onboarding-modal", 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, {
|
|
63
|
-
swiperProgress > 0 && /* @__PURE__ */ jsx(Button, {
|
|
64
|
-
swiperProgress < 1 && /* @__PURE__ */ jsx(Button, { id: "nextButtonId",
|
|
65
|
-
swiperProgress === 1 && /* @__PURE__ */ jsx(Button, {
|
|
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: () => {
|
|
66
66
|
isOnboarding ? handleCloseWithPreference() : handleCloseWithoutPreference();
|
|
67
67
|
}, children: t(closeText || "explorer.modal.onboarding.trash.close") })
|
|
68
68
|
] })
|
|
@@ -7,7 +7,6 @@ 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
|
|
11
10
|
* @property {ShareRightActionDisplayName[]} [filteredActions] - Optional list of allowed actions to display
|
|
12
11
|
* @property {ShareUrls} [shareUrls] - Optional custom URLs for API endpoints related to sharing operations default endpoints are used if not provided
|
|
13
12
|
* default: {
|
|
@@ -43,7 +42,6 @@ import { UseMutationResult } from '../../../node_modules/@tanstack/react-query';
|
|
|
43
42
|
* resourceId: '12345',
|
|
44
43
|
* resourceRights: [],
|
|
45
44
|
* resourceCreatorId: 'user-67890',
|
|
46
|
-
* resourceCreatorDisplayName: 'Jim',
|
|
47
45
|
* filteredActions: ['read', 'contrib'],
|
|
48
46
|
* defaultActions: [
|
|
49
47
|
* {
|
|
@@ -63,7 +61,6 @@ export type ShareOptions = {
|
|
|
63
61
|
resourceId: ID;
|
|
64
62
|
resourceRights: RightStringified[];
|
|
65
63
|
resourceCreatorId: string;
|
|
66
|
-
resourceCreatorDisplayName?: string;
|
|
67
64
|
filteredActions?: ShareRightActionDisplayName[];
|
|
68
65
|
shareUrls?: ShareUrls;
|
|
69
66
|
defaultActions?: ShareRightAction[];
|
|
@@ -9,7 +9,6 @@ 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";
|
|
13
12
|
import Heading from "../../../components/Heading/Heading.js";
|
|
14
13
|
import Tooltip from "../../../components/Tooltip/Tooltip.js";
|
|
15
14
|
import Combobox from "../../../components/Combobox/Combobox.js";
|
|
@@ -32,7 +31,6 @@ const ShareResources = /* @__PURE__ */ forwardRef(({
|
|
|
32
31
|
const {
|
|
33
32
|
resourceId,
|
|
34
33
|
resourceCreatorId,
|
|
35
|
-
resourceCreatorDisplayName,
|
|
36
34
|
resourceRights,
|
|
37
35
|
filteredActions,
|
|
38
36
|
shareUrls,
|
|
@@ -97,9 +95,7 @@ const ShareResources = /* @__PURE__ */ forwardRef(({
|
|
|
97
95
|
shareDispatch
|
|
98
96
|
}), handleOnSaveBookmark = () => (setIsSavingBookmark(!0), handleOnSave().then(() => {
|
|
99
97
|
setIsSavingBookmark(!1);
|
|
100
|
-
}))
|
|
101
|
-
getAvatarURL
|
|
102
|
-
} = useDirectory();
|
|
98
|
+
}));
|
|
103
99
|
useImperativeHandle(ref, () => ({
|
|
104
100
|
handleShare
|
|
105
101
|
}), [handleShare]), useEffect(() => {
|
|
@@ -109,7 +105,7 @@ const ShareResources = /* @__PURE__ */ forwardRef(({
|
|
|
109
105
|
}, [isSavingBookmark, isSharing, onSubmit]);
|
|
110
106
|
const {
|
|
111
107
|
t
|
|
112
|
-
} = useTranslation(),
|
|
108
|
+
} = useTranslation(), searchPlaceholder = showSearchAdmlHint() ? t("explorer.search.adml.hint") : t("explorer.modal.share.search.placeholder");
|
|
113
109
|
return /* @__PURE__ */ jsxs("div", { children: [
|
|
114
110
|
/* @__PURE__ */ jsxs(Heading, { headingStyle: "h4", level: "h3", className: "mb-16 d-flex align-items-center", children: [
|
|
115
111
|
/* @__PURE__ */ jsx("div", { className: "me-8", children: t("explorer.modal.share.search") }),
|
|
@@ -124,9 +120,9 @@ const ShareResources = /* @__PURE__ */ forwardRef(({
|
|
|
124
120
|
/* @__PURE__ */ jsx("th", { scope: "col", children: /* @__PURE__ */ jsx(VisuallyHidden, { children: t("close") }) })
|
|
125
121
|
] }) }),
|
|
126
122
|
/* @__PURE__ */ jsxs("tbody", { children: [
|
|
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:
|
|
129
|
-
/* @__PURE__ */ jsx("td", { 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") }),
|
|
130
126
|
shareRightActions.map((shareRightAction) => /* @__PURE__ */ jsx("td", { style: {
|
|
131
127
|
width: "80px"
|
|
132
128
|
}, className: "text-center text-white", children: /* @__PURE__ */ jsx(Checkbox, { checked: !0, disabled: !0 }) }, shareRightAction.displayName)),
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@edifice.io/react",
|
|
3
|
-
"version": "2.5.9
|
|
3
|
+
"version": "2.5.9",
|
|
4
4
|
"description": "Edifice React Library",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"react",
|
|
@@ -134,9 +134,9 @@
|
|
|
134
134
|
"react-slugify": "^3.0.3",
|
|
135
135
|
"swiper": "^10.1.0",
|
|
136
136
|
"ua-parser-js": "^1.0.36",
|
|
137
|
-
"@edifice.io/bootstrap": "2.5.9
|
|
138
|
-
"@edifice.io/
|
|
139
|
-
"@edifice.io/
|
|
137
|
+
"@edifice.io/bootstrap": "2.5.9",
|
|
138
|
+
"@edifice.io/tiptap-extensions": "2.5.9",
|
|
139
|
+
"@edifice.io/utilities": "2.5.9"
|
|
140
140
|
},
|
|
141
141
|
"devDependencies": {
|
|
142
142
|
"@babel/plugin-transform-react-pure-annotations": "^7.23.3",
|
|
@@ -167,8 +167,8 @@
|
|
|
167
167
|
"vite": "^5.4.11",
|
|
168
168
|
"vite-plugin-dts": "^4.1.0",
|
|
169
169
|
"vite-tsconfig-paths": "^5.0.1",
|
|
170
|
-
"@edifice.io/client": "2.5.9
|
|
171
|
-
"@edifice.io/config": "2.5.9
|
|
170
|
+
"@edifice.io/client": "2.5.9",
|
|
171
|
+
"@edifice.io/config": "2.5.9"
|
|
172
172
|
},
|
|
173
173
|
"peerDependencies": {
|
|
174
174
|
"@react-spring/web": "^9.7.5",
|
package/dist/_virtual/isToday.js
DELETED
|
@@ -1,57 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* DatePicker component props
|
|
3
|
-
*
|
|
4
|
-
* Minimal interface that only exposes what is necessary.
|
|
5
|
-
* Ant Design implementation is hidden and no Ant Design-specific props are exposed.
|
|
6
|
-
* Standard HTML div attributes are supported (passed through to the underlying DOM element).
|
|
7
|
-
*/
|
|
8
|
-
export interface DatePickerProps extends Omit<React.HTMLAttributes<HTMLElement>, 'onChange' | 'value' | 'defaultValue'> {
|
|
9
|
-
/**
|
|
10
|
-
* Selected date values
|
|
11
|
-
* @default today's date is setted by ant design if no value is provided
|
|
12
|
-
*/
|
|
13
|
-
value?: Date;
|
|
14
|
-
/**
|
|
15
|
-
* Callback called when date changes
|
|
16
|
-
*/
|
|
17
|
-
onChange?: (date?: Date) => void;
|
|
18
|
-
/**
|
|
19
|
-
* Date format to display in the picker
|
|
20
|
-
* @default 'DD / MM / YYYY'
|
|
21
|
-
*/
|
|
22
|
-
dateFormat?: string;
|
|
23
|
-
/**
|
|
24
|
-
* Minimum selectable date
|
|
25
|
-
*/
|
|
26
|
-
minDate?: Date;
|
|
27
|
-
/**
|
|
28
|
-
* Maximum selectable date
|
|
29
|
-
*/
|
|
30
|
-
maxDate?: Date;
|
|
31
|
-
}
|
|
32
|
-
/**
|
|
33
|
-
* Type for DatePicker ref
|
|
34
|
-
*/
|
|
35
|
-
/**
|
|
36
|
-
* DatePicker component
|
|
37
|
-
*
|
|
38
|
-
* Date picker component for selecting a date.
|
|
39
|
-
*
|
|
40
|
-
* **Note:** This component uses Ant Design's DatePicker component internally.
|
|
41
|
-
* Only the props defined in DatePickerProps are allowed to prevent
|
|
42
|
-
* dependency on Ant Design-specific features. To replace the implementation,
|
|
43
|
-
* modify the component body below.
|
|
44
|
-
*
|
|
45
|
-
* @example
|
|
46
|
-
* ```tsx
|
|
47
|
-
* <DatePicker
|
|
48
|
-
* value={date}
|
|
49
|
-
* onChange={(date) => setDate(date)}
|
|
50
|
-
* dateFormat="YYYY-MM-DD"
|
|
51
|
-
* minDate={new Date(today.setDate(today.getDate() - 2))}
|
|
52
|
-
* maxDate={new Date(today.setDate(today.getDate() + 3))}
|
|
53
|
-
* />
|
|
54
|
-
* ```
|
|
55
|
-
*/
|
|
56
|
-
declare const DatePicker: import('react').ForwardRefExoticComponent<DatePickerProps & import('react').RefAttributes<HTMLElement>>;
|
|
57
|
-
export default DatePicker;
|
|
@@ -1,7 +0,0 @@
|
|
|
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;
|
|
@@ -1,12 +0,0 @@
|
|
|
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
|
-
};
|
|
@@ -1,7 +0,0 @@
|
|
|
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;
|
|
@@ -1,12 +0,0 @@
|
|
|
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
|
-
};
|
|
@@ -1,7 +0,0 @@
|
|
|
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;
|
|
@@ -1,12 +0,0 @@
|
|
|
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
|
-
};
|
|
@@ -1,18 +0,0 @@
|
|
|
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
|
-
};
|
|
@@ -1,19 +0,0 @@
|
|
|
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
|
-
};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export * from './mime-types-utils';
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export declare const HEIC_MIME_TYPES: string[];
|