@edifice.io/react 2.5.12-develop-enabling.20260227103812 → 2.5.12-develop-pedago.20260227152929
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/components/AddAttachments/AddAttachments.d.ts +6 -3
- package/dist/components/AddAttachments/AddAttachments.js +17 -29
- package/dist/components/AddAttachments/hooks/useFileToAttachment.d.ts +3 -0
- package/dist/components/AddAttachments/hooks/useFileToAttachment.js +16 -0
- package/dist/components/AddAttachments/models/attachment.d.ts +1 -0
- package/dist/components/Badge/Badge.js +1 -0
- package/dist/components/Card/Card.js +1 -1
- package/dist/components/Combobox/Combobox.js +1 -1
- package/dist/components/Dropdown/Dropdown.js +1 -1
- package/dist/components/Form/FormControl.js +1 -1
- package/dist/components/Layout/components/WidgetApps.js +1 -1
- package/dist/components/Modal/Modal.js +1 -1
- package/dist/components/PreventPropagation/PreventPropagation.js +1 -1
- package/dist/components/PromotionCard/PromotionCard.js +1 -1
- package/dist/components/SearchBar/SearchBar.d.ts +2 -2
- package/dist/components/Table/components/Table.js +1 -1
- package/dist/hooks/useBrowserInfo/useBrowserInfo.d.ts +3 -4
- package/dist/hooks/useBrowserInfo/useBrowserInfo.js +1 -1
- package/dist/hooks/useConf/useConf.d.ts +1 -1
- package/dist/hooks/useDropdown/useDropdown.js +0 -2
- package/dist/hooks/useDropzone/useDropzone.js +4 -4
- package/dist/hooks/useSession/useSession.d.ts +1 -1
- package/dist/hooks/useThumbnail/useThumbnail.d.ts +1 -1
- package/dist/hooks/useThumbnail/useThumbnail.js +1 -5
- package/dist/hooks/useUpload/useUpload.js +5 -2
- package/dist/hooks/useWorkspaceFolders/useWorkspaceFolders.js +1 -1
- package/dist/index.js +2 -0
- package/dist/modules/editor/components/Editor/EditorPreview.js +1 -1
- package/dist/modules/modals/ResourceModal/ResourceModal.d.ts +1 -1
- package/dist/modules/modals/ResourceModal/hooks/useUpdateMutation.d.ts +1 -1
- package/dist/modules/modals/ShareModal/ShareResources.d.ts +53 -4
- package/dist/modules/modals/ShareModal/apps/ShareBlog.d.ts +1 -1
- package/dist/modules/modals/ShareModal/hooks/useShareBookmark.js +1 -2
- package/dist/modules/modals/ShareModal/hooks/useShareMutation.d.ts +1 -1
- package/dist/modules/multimedia/MediaLibrary/MediaLibrary.js +0 -1
- package/dist/node_modules/.pnpm/{antd@5.29.1_react-dom@18.3.1_react@18.3.1__react@18.3.1 → antd@5.29.3_react-dom@18.3.1_react@18.3.1__react@18.3.1}/node_modules/antd/lib/date-picker/locale/de_DE.js +2 -2
- package/dist/node_modules/.pnpm/{antd@5.29.1_react-dom@18.3.1_react@18.3.1__react@18.3.1 → antd@5.29.3_react-dom@18.3.1_react@18.3.1__react@18.3.1}/node_modules/antd/lib/date-picker/locale/es_ES.js +2 -2
- package/dist/node_modules/.pnpm/{antd@5.29.1_react-dom@18.3.1_react@18.3.1__react@18.3.1 → antd@5.29.3_react-dom@18.3.1_react@18.3.1__react@18.3.1}/node_modules/antd/lib/date-picker/locale/fr_FR.js +2 -2
- package/dist/node_modules/.pnpm/{antd@5.29.1_react-dom@18.3.1_react@18.3.1__react@18.3.1 → antd@5.29.3_react-dom@18.3.1_react@18.3.1__react@18.3.1}/node_modules/antd/lib/date-picker/locale/it_IT.js +2 -2
- package/dist/node_modules/.pnpm/{antd@5.29.1_react-dom@18.3.1_react@18.3.1__react@18.3.1 → antd@5.29.3_react-dom@18.3.1_react@18.3.1__react@18.3.1}/node_modules/antd/lib/date-picker/locale/pt_PT.js +2 -2
- package/dist/providers/AntThemeProvider/AntProvider.js +5 -5
- package/dist/providers/EdificeClientProvider/EdificeClientProvider.context.d.ts +1 -1
- package/dist/utilities/react-query/react-query-utils.d.ts +1 -1
- package/package.json +51 -52
- package/dist/hooks/useWorkspaceFolders/useWorkspaceFolders.d.ts +0 -12
- /package/dist/node_modules/.pnpm/{antd@5.29.1_react-dom@18.3.1_react@18.3.1__react@18.3.1 → antd@5.29.3_react-dom@18.3.1_react@18.3.1__react@18.3.1}/node_modules/antd/lib/calendar/locale/de_DE.js +0 -0
- /package/dist/node_modules/.pnpm/{antd@5.29.1_react-dom@18.3.1_react@18.3.1__react@18.3.1 → antd@5.29.3_react-dom@18.3.1_react@18.3.1__react@18.3.1}/node_modules/antd/lib/calendar/locale/es_ES.js +0 -0
- /package/dist/node_modules/.pnpm/{antd@5.29.1_react-dom@18.3.1_react@18.3.1__react@18.3.1 → antd@5.29.3_react-dom@18.3.1_react@18.3.1__react@18.3.1}/node_modules/antd/lib/calendar/locale/fr_FR.js +0 -0
- /package/dist/node_modules/.pnpm/{antd@5.29.1_react-dom@18.3.1_react@18.3.1__react@18.3.1 → antd@5.29.3_react-dom@18.3.1_react@18.3.1__react@18.3.1}/node_modules/antd/lib/calendar/locale/it_IT.js +0 -0
- /package/dist/node_modules/.pnpm/{antd@5.29.1_react-dom@18.3.1_react@18.3.1__react@18.3.1 → antd@5.29.3_react-dom@18.3.1_react@18.3.1__react@18.3.1}/node_modules/antd/lib/calendar/locale/pt_PT.js +0 -0
- /package/dist/node_modules/.pnpm/{antd@5.29.1_react-dom@18.3.1_react@18.3.1__react@18.3.1 → antd@5.29.3_react-dom@18.3.1_react@18.3.1__react@18.3.1}/node_modules/antd/lib/locale/de_DE.js +0 -0
- /package/dist/node_modules/.pnpm/{antd@5.29.1_react-dom@18.3.1_react@18.3.1__react@18.3.1 → antd@5.29.3_react-dom@18.3.1_react@18.3.1__react@18.3.1}/node_modules/antd/lib/locale/es_ES.js +0 -0
- /package/dist/node_modules/.pnpm/{antd@5.29.1_react-dom@18.3.1_react@18.3.1__react@18.3.1 → antd@5.29.3_react-dom@18.3.1_react@18.3.1__react@18.3.1}/node_modules/antd/lib/locale/fr_FR.js +0 -0
- /package/dist/node_modules/.pnpm/{antd@5.29.1_react-dom@18.3.1_react@18.3.1__react@18.3.1 → antd@5.29.3_react-dom@18.3.1_react@18.3.1__react@18.3.1}/node_modules/antd/lib/locale/it_IT.js +0 -0
- /package/dist/node_modules/.pnpm/{antd@5.29.1_react-dom@18.3.1_react@18.3.1__react@18.3.1 → antd@5.29.3_react-dom@18.3.1_react@18.3.1__react@18.3.1}/node_modules/antd/lib/locale/pt_PT.js +0 -0
- /package/dist/node_modules/.pnpm/{antd@5.29.1_react-dom@18.3.1_react@18.3.1__react@18.3.1 → antd@5.29.3_react-dom@18.3.1_react@18.3.1__react@18.3.1}/node_modules/antd/lib/time-picker/locale/de_DE.js +0 -0
- /package/dist/node_modules/.pnpm/{antd@5.29.1_react-dom@18.3.1_react@18.3.1__react@18.3.1 → antd@5.29.3_react-dom@18.3.1_react@18.3.1__react@18.3.1}/node_modules/antd/lib/time-picker/locale/es_ES.js +0 -0
- /package/dist/node_modules/.pnpm/{antd@5.29.1_react-dom@18.3.1_react@18.3.1__react@18.3.1 → antd@5.29.3_react-dom@18.3.1_react@18.3.1__react@18.3.1}/node_modules/antd/lib/time-picker/locale/fr_FR.js +0 -0
- /package/dist/node_modules/.pnpm/{antd@5.29.1_react-dom@18.3.1_react@18.3.1__react@18.3.1 → antd@5.29.3_react-dom@18.3.1_react@18.3.1__react@18.3.1}/node_modules/antd/lib/time-picker/locale/it_IT.js +0 -0
- /package/dist/node_modules/.pnpm/{antd@5.29.1_react-dom@18.3.1_react@18.3.1__react@18.3.1 → antd@5.29.3_react-dom@18.3.1_react@18.3.1__react@18.3.1}/node_modules/antd/lib/time-picker/locale/pt_PT.js +0 -0
- /package/dist/node_modules/.pnpm/{antd@5.29.1_react-dom@18.3.1_react@18.3.1__react@18.3.1 → antd@5.29.3_react-dom@18.3.1_react@18.3.1__react@18.3.1}/node_modules/antd/locale/de_DE.js +0 -0
- /package/dist/node_modules/.pnpm/{antd@5.29.1_react-dom@18.3.1_react@18.3.1__react@18.3.1 → antd@5.29.3_react-dom@18.3.1_react@18.3.1__react@18.3.1}/node_modules/antd/locale/es_ES.js +0 -0
- /package/dist/node_modules/.pnpm/{antd@5.29.1_react-dom@18.3.1_react@18.3.1__react@18.3.1 → antd@5.29.3_react-dom@18.3.1_react@18.3.1__react@18.3.1}/node_modules/antd/locale/fr_FR.js +0 -0
- /package/dist/node_modules/.pnpm/{antd@5.29.1_react-dom@18.3.1_react@18.3.1__react@18.3.1 → antd@5.29.3_react-dom@18.3.1_react@18.3.1__react@18.3.1}/node_modules/antd/locale/it_IT.js +0 -0
- /package/dist/node_modules/.pnpm/{antd@5.29.1_react-dom@18.3.1_react@18.3.1__react@18.3.1 → antd@5.29.3_react-dom@18.3.1_react@18.3.1__react@18.3.1}/node_modules/antd/locale/pt_PT.js +0 -0
|
@@ -1,8 +1,11 @@
|
|
|
1
1
|
import { Attachment } from './models/attachment';
|
|
2
|
+
export type SingleAttachmentType = Attachment;
|
|
3
|
+
export { useFileToAttachment } from './hooks/useFileToAttachment';
|
|
2
4
|
export interface AddAttachmentsProps {
|
|
3
5
|
attachments: Attachment[];
|
|
4
|
-
|
|
5
|
-
|
|
6
|
+
onChange?: (attachments: Attachment[]) => void;
|
|
7
|
+
onFilesSelected?: (files: File[]) => void;
|
|
8
|
+
onRemoveAttachment?: (attachmentId: string) => void;
|
|
6
9
|
editMode?: boolean;
|
|
7
10
|
isMutating?: boolean;
|
|
8
11
|
onCopyToWorkspace?: (attachments: Attachment[], folderId: string) => Promise<boolean>;
|
|
@@ -12,7 +15,7 @@ export interface AddAttachmentsProps {
|
|
|
12
15
|
downloadAllUrl?: string;
|
|
13
16
|
}
|
|
14
17
|
export declare const AddAttachments: {
|
|
15
|
-
({ attachments, onFilesSelected, onRemoveAttachment, editMode, isMutating, onCopyToWorkspace, getDownloadUrl, downloadAllUrl, }: AddAttachmentsProps): import("react/jsx-runtime").JSX.Element | null;
|
|
18
|
+
({ attachments, onChange, onFilesSelected, onRemoveAttachment, editMode, isMutating, onCopyToWorkspace, getDownloadUrl, downloadAllUrl, }: AddAttachmentsProps): import("react/jsx-runtime").JSX.Element | null;
|
|
16
19
|
displayName: string;
|
|
17
20
|
};
|
|
18
21
|
export default AddAttachments;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { jsxs, Fragment, jsx } from "react/jsx-runtime";
|
|
2
2
|
import clsx from "clsx";
|
|
3
|
-
import { useRef, useState
|
|
3
|
+
import { useRef, useState } from "react";
|
|
4
4
|
import { useTranslation } from "react-i18next";
|
|
5
5
|
import SvgIconDelete from "../../modules/icons/components/IconDelete.js";
|
|
6
6
|
import SvgIconDownload from "../../modules/icons/components/IconDownload.js";
|
|
@@ -8,22 +8,13 @@ import SvgIconFolderAdd from "../../modules/icons/components/IconFolderAdd.js";
|
|
|
8
8
|
import SvgIconPlus from "../../modules/icons/components/IconPlus.js";
|
|
9
9
|
import { AddAttachmentToWorkspaceModal } from "./components/AddAttachmentToWorkspaceModal.js";
|
|
10
10
|
import { SingleAttachment } from "./components/SingleAttachment.js";
|
|
11
|
+
import { useFileToAttachment } from "./hooks/useFileToAttachment.js";
|
|
11
12
|
import Flex from "../Flex/Flex.js";
|
|
12
13
|
import IconButton from "../Button/IconButton.js";
|
|
13
14
|
import Button from "../Button/Button.js";
|
|
14
|
-
function fileToAttachment(file) {
|
|
15
|
-
return {
|
|
16
|
-
id: `${file.name}-${Date.now()}-${Math.random().toString(36).slice(2, 9)}`,
|
|
17
|
-
charset: "UTF-8",
|
|
18
|
-
contentTransferEncoding: "binary",
|
|
19
|
-
contentType: file.type || "application/octet-stream",
|
|
20
|
-
filename: file.name,
|
|
21
|
-
name: file.name,
|
|
22
|
-
size: file.size
|
|
23
|
-
};
|
|
24
|
-
}
|
|
25
15
|
const AddAttachments = ({
|
|
26
16
|
attachments,
|
|
17
|
+
onChange,
|
|
27
18
|
onFilesSelected,
|
|
28
19
|
onRemoveAttachment,
|
|
29
20
|
editMode = !1,
|
|
@@ -34,10 +25,8 @@ const AddAttachments = ({
|
|
|
34
25
|
}) => {
|
|
35
26
|
const {
|
|
36
27
|
t
|
|
37
|
-
} = useTranslation(), inputRef = useRef(null),
|
|
38
|
-
if (
|
|
39
|
-
attachments.length > prevAttachmentsLengthRef.current && setOptimisticAttachments([]), prevAttachmentsLengthRef.current = attachments.length;
|
|
40
|
-
}, [attachments.length]), !editMode && !displayedAttachments.length) return null;
|
|
28
|
+
} = useTranslation(), inputRef = useRef(null), fileToAttachment = useFileToAttachment(), [attachmentsToAddToWorkspace, setAttachmentsToAddToWorkspace] = useState(void 0);
|
|
29
|
+
if (!editMode && !attachments.length) return null;
|
|
41
30
|
const resetInputValue = () => {
|
|
42
31
|
inputRef.current && (inputRef.current.value = "");
|
|
43
32
|
}, handleAttachClick = () => {
|
|
@@ -46,36 +35,34 @@ const AddAttachments = ({
|
|
|
46
35
|
}, handleFileChange = (event) => {
|
|
47
36
|
const files = Array.from(event.target.files ?? []);
|
|
48
37
|
if (files.length > 0) {
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
setOptimisticAttachments((prev) => [...prev, ...newOptimistic]);
|
|
38
|
+
const newAttachments = files.map(fileToAttachment);
|
|
39
|
+
onChange == null || onChange([...attachments, ...newAttachments]), onFilesSelected == null || onFilesSelected(files);
|
|
52
40
|
}
|
|
53
41
|
resetInputValue();
|
|
54
42
|
}, handleDetachAllClick = () => {
|
|
55
|
-
|
|
56
|
-
onRemoveAttachment(attachment.id);
|
|
57
|
-
}), resetInputValue();
|
|
43
|
+
onChange == null || onChange([]), attachments.forEach((a) => onRemoveAttachment == null ? void 0 : onRemoveAttachment(a.id)), resetInputValue();
|
|
58
44
|
}, handleDetachClick = (attachmentId) => {
|
|
59
|
-
|
|
45
|
+
const next = attachments.filter((a) => a.id !== attachmentId);
|
|
46
|
+
onChange == null || onChange(next), onRemoveAttachment == null || onRemoveAttachment(attachmentId), resetInputValue();
|
|
60
47
|
}, handleCopyToWorkspace = (attachments2) => {
|
|
61
48
|
setAttachmentsToAddToWorkspace(attachments2);
|
|
62
49
|
}, className = clsx("bg-gray-200 rounded px-12 py-8 message-attachments align-self-start gap-8 d-flex flex-column mw-100", {
|
|
63
50
|
"border add-attachments-edit mx-16": editMode
|
|
64
51
|
});
|
|
65
52
|
return /* @__PURE__ */ jsxs("div", { className, "data-drag-handle": !0, children: [
|
|
66
|
-
!!
|
|
53
|
+
!!attachments.length && /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
67
54
|
/* @__PURE__ */ jsxs(Flex, { direction: "row", align: "center", justify: "between", className: "border-bottom", children: [
|
|
68
55
|
/* @__PURE__ */ jsx("span", { className: "caption fw-bold my-8", children: t("attachments") }),
|
|
69
|
-
|
|
70
|
-
onCopyToWorkspace && /* @__PURE__ */ jsx(IconButton, { title: t("conversation.copy.all.toworkspace"), color: "tertiary", type: "button", icon: /* @__PURE__ */ jsx(SvgIconFolderAdd, {}), onClick: () => handleCopyToWorkspace(
|
|
56
|
+
attachments.length > 1 && /* @__PURE__ */ jsxs("div", { children: [
|
|
57
|
+
onCopyToWorkspace && /* @__PURE__ */ jsx(IconButton, { title: t("conversation.copy.all.toworkspace"), color: "tertiary", type: "button", icon: /* @__PURE__ */ jsx(SvgIconFolderAdd, {}), onClick: () => handleCopyToWorkspace(attachments), variant: "ghost" }),
|
|
71
58
|
downloadAllUrl && /* @__PURE__ */ jsx("a", { href: downloadAllUrl, download: !0, children: /* @__PURE__ */ jsx(IconButton, { title: t("download.all.attachment"), color: "tertiary", type: "button", icon: /* @__PURE__ */ jsx(SvgIconDownload, {}), variant: "ghost" }) }),
|
|
72
59
|
editMode && /* @__PURE__ */ jsx(IconButton, { title: t("remove.all.attachment"), color: "danger", type: "button", icon: /* @__PURE__ */ jsx(SvgIconDelete, {}), variant: "ghost", onClick: handleDetachAllClick, disabled: isMutating })
|
|
73
60
|
] })
|
|
74
61
|
] }),
|
|
75
|
-
/* @__PURE__ */ jsx("ul", { className: "d-flex gap-8 flex-column list-unstyled m-0", children:
|
|
62
|
+
/* @__PURE__ */ jsx("ul", { className: "d-flex gap-8 flex-column list-unstyled m-0", children: attachments.map((attachment) => /* @__PURE__ */ jsx("li", { className: "mw-100", children: /* @__PURE__ */ jsx(SingleAttachment, { attachment, editMode, onDelete: handleDetachClick, onCopyToWorkspace: onCopyToWorkspace ? (attachment2) => handleCopyToWorkspace([attachment2]) : void 0, getDownloadUrl, disabled: isMutating }) }, `${attachment.id}-${attachment.name}`)) })
|
|
76
63
|
] }),
|
|
77
64
|
editMode && /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
78
|
-
/* @__PURE__ */ jsx(Button, { color: "secondary", variant: "ghost", isLoading: isMutating, onClick: handleAttachClick, disabled: isMutating, className: "align-self-start", leftIcon: /* @__PURE__ */ jsx(SvgIconPlus, {}), children: t("add.attachment") }),
|
|
65
|
+
/* @__PURE__ */ jsx(Button, { color: "secondary", variant: "ghost", isLoading: isMutating, onClick: handleAttachClick, disabled: isMutating, className: "align-self-start", leftIcon: /* @__PURE__ */ jsx(SvgIconPlus, {}), "data-testid": "common-add-attachments-button-add-attachment", children: t("add.attachment") }),
|
|
79
66
|
/* @__PURE__ */ jsx("input", { ref: inputRef, multiple: !0, type: "file", name: "attachment-input", id: "attachment-input", onChange: handleFileChange, hidden: !0 })
|
|
80
67
|
] }),
|
|
81
68
|
onCopyToWorkspace && !!attachmentsToAddToWorkspace && /* @__PURE__ */ jsx(AddAttachmentToWorkspaceModal, { isOpen: !0, onModalClose: () => setAttachmentsToAddToWorkspace(void 0), attachments: attachmentsToAddToWorkspace, onCopyToWorkspace })
|
|
@@ -83,5 +70,6 @@ const AddAttachments = ({
|
|
|
83
70
|
};
|
|
84
71
|
export {
|
|
85
72
|
AddAttachments,
|
|
86
|
-
AddAttachments as default
|
|
73
|
+
AddAttachments as default,
|
|
74
|
+
useFileToAttachment
|
|
87
75
|
};
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { useCallback } from "react";
|
|
2
|
+
function useFileToAttachment() {
|
|
3
|
+
return useCallback((file) => ({
|
|
4
|
+
id: `${file.name}-${Date.now()}-${Math.random().toString(36).slice(2, 9)}`,
|
|
5
|
+
charset: "UTF-8",
|
|
6
|
+
contentTransferEncoding: "binary",
|
|
7
|
+
contentType: file.type || "application/octet-stream",
|
|
8
|
+
filename: file.name,
|
|
9
|
+
name: file.name,
|
|
10
|
+
size: file.size,
|
|
11
|
+
file
|
|
12
|
+
}), []);
|
|
13
|
+
}
|
|
14
|
+
export {
|
|
15
|
+
useFileToAttachment
|
|
16
|
+
};
|
|
@@ -21,6 +21,7 @@ const Badge = /* @__PURE__ */ forwardRef(({
|
|
|
21
21
|
const colorAppClassName = getIconClass(variant.app), backgroundLightAppClassName = getBackgroundLightIconClass(variant.app), borderAppClassName = getBorderIconClass(variant.app);
|
|
22
22
|
badgeColorClassName = `${colorAppClassName} ${backgroundLightAppClassName} ${borderAppClassName}`;
|
|
23
23
|
}
|
|
24
|
+
console.log(badgeColorClassName);
|
|
24
25
|
const classes = clsx("badge rounded-pill", (variant.type === "content" || variant.type === "user") && "background" in variant ? "bg-gray-200" : (variant.type === "content" || variant.type === "user") && !("background" in variant) ? "border border-0" : "", variant.type === "content" && `text-${variant.level}`, variant.type === "notification" && `badge-notification bg-${variant.level} text-light border border-0`, variant.type === "user" && `badge-profile-${variant.profile.toLowerCase()}`, variant.type === "link" && "badge-link border border-0", variant.type === "chip" && "bg-gray-200", variant.type === "beta" && badgeColorClassName, className);
|
|
25
26
|
return /* @__PURE__ */ jsxs("span", { ref, className: classes, ...restProps, children: [
|
|
26
27
|
variant.type === "chip" && /* @__PURE__ */ jsx("div", { className: "d-flex fw-800 align-items-center", children }),
|
|
@@ -39,7 +39,7 @@ const Root = /* @__PURE__ */ forwardRef(({
|
|
|
39
39
|
/* @__PURE__ */ jsx(Card.Header, {}),
|
|
40
40
|
typeof children == "function" ? children(appCode) : children
|
|
41
41
|
] }) });
|
|
42
|
-
}), Card = Object.assign(Root, {
|
|
42
|
+
}), Card = /* @__PURE__ */ Object.assign(Root, {
|
|
43
43
|
Title: CardTitle,
|
|
44
44
|
Text: CardText,
|
|
45
45
|
Image: CardImage,
|
|
@@ -53,7 +53,7 @@ const ComboboxComponent = /* @__PURE__ */ forwardRef(({
|
|
|
53
53
|
}, value, variant, renderInputGroup, renderSelectedItems, hasDefault: !!options.length, onFocus, onBlur, inputRef }),
|
|
54
54
|
/* @__PURE__ */ jsx(Dropdown.Menu, { "data-testid": "combobox-search-menu", children: renderContent() })
|
|
55
55
|
] });
|
|
56
|
-
}), Combobox = Object.assign(ComboboxComponent, {
|
|
56
|
+
}), Combobox = /* @__PURE__ */ Object.assign(ComboboxComponent, {
|
|
57
57
|
Trigger: ComboboxTrigger
|
|
58
58
|
});
|
|
59
59
|
export {
|
|
@@ -67,7 +67,7 @@ const Root = /* @__PURE__ */ forwardRef(({
|
|
|
67
67
|
return useEffect(() => {
|
|
68
68
|
onToggle == null || onToggle(visible);
|
|
69
69
|
}, [visible]), /* @__PURE__ */ jsx(DropdownContext.Provider, { value, children: /* @__PURE__ */ jsx("div", { ref, className: dropdown, children: typeof children == "function" ? children(triggerProps, itemRefs, setVisible) : children }) });
|
|
70
|
-
}), Dropdown = Object.assign(Root, {
|
|
70
|
+
}), Dropdown = /* @__PURE__ */ Object.assign(Root, {
|
|
71
71
|
Trigger: DropdownTrigger,
|
|
72
72
|
Menu: DropdownMenu,
|
|
73
73
|
Item: DropdownItem,
|
|
@@ -22,7 +22,7 @@ const Root = /* @__PURE__ */ forwardRef(({
|
|
|
22
22
|
status
|
|
23
23
|
}), [id, isOptional, isReadOnly, isRequired, status]);
|
|
24
24
|
return /* @__PURE__ */ jsx(Context.Provider, { value: values, children: /* @__PURE__ */ jsx("div", { ref, className, ...restProps, children }) });
|
|
25
|
-
}), FormControl = Object.assign(Root, {
|
|
25
|
+
}), FormControl = /* @__PURE__ */ Object.assign(Root, {
|
|
26
26
|
Label,
|
|
27
27
|
Input,
|
|
28
28
|
Text: FormText
|
|
@@ -14,7 +14,7 @@ const WidgetAppsFooter = () => {
|
|
|
14
14
|
} = useTranslation();
|
|
15
15
|
return /* @__PURE__ */ jsxs("div", { className: "widget-body d-flex flex-wrap", children: [
|
|
16
16
|
!bookmarkedApps.length && /* @__PURE__ */ jsx("div", { className: "text-dark", children: t("navbar.myapps.more") }),
|
|
17
|
-
bookmarkedApps.slice(0, 6).map((app, index) => /* @__PURE__ */ jsx("a", { href: app.address, className: "bookmarked-app", target: appToOpenOnBlank.includes(app.name) || app.isExternal || app.
|
|
17
|
+
bookmarkedApps.slice(0, 6).map((app, index) => /* @__PURE__ */ jsx("a", { href: app.address, className: "bookmarked-app", target: appToOpenOnBlank.includes(app.name) || app.isExternal || app.category === "connector" ? "_blank" : void 0, rel: appToOpenOnBlank.includes(app.name) || app.isExternal || app.category === "connector" ? "noopener noreferrer" : void 0, children: /* @__PURE__ */ jsx(AppIcon, { app, size: "32" }) }, index))
|
|
18
18
|
] });
|
|
19
19
|
};
|
|
20
20
|
export {
|
|
@@ -3,7 +3,7 @@ const Root = ({
|
|
|
3
3
|
children
|
|
4
4
|
}) => /* @__PURE__ */ jsx("div", { onClick: (e) => {
|
|
5
5
|
e.stopPropagation();
|
|
6
|
-
}, children }), PreventPropagation = Object.assign(Root, {});
|
|
6
|
+
}, children }), PreventPropagation = /* @__PURE__ */ Object.assign(Root, {});
|
|
7
7
|
export {
|
|
8
8
|
PreventPropagation as default
|
|
9
9
|
};
|
|
@@ -17,7 +17,7 @@ const Root = ({
|
|
|
17
17
|
borderColor,
|
|
18
18
|
backgroundColor
|
|
19
19
|
}, children });
|
|
20
|
-
}, PromotionCard = Object.assign(Root, {
|
|
20
|
+
}, PromotionCard = /* @__PURE__ */ Object.assign(Root, {
|
|
21
21
|
Header: PromotionCardHeader,
|
|
22
22
|
Body: PromotionCardBody,
|
|
23
23
|
Icon: PromotionCardIcon,
|
|
@@ -3,7 +3,7 @@ import { Size } from '../../types';
|
|
|
3
3
|
/**
|
|
4
4
|
* Base props shared by both SearchBar variants
|
|
5
5
|
*/
|
|
6
|
-
interface BaseProps extends Omit<React.ComponentPropsWithoutRef<'input'>, 'size'> {
|
|
6
|
+
export interface BaseProps extends Omit<React.ComponentPropsWithoutRef<'input'>, 'size'> {
|
|
7
7
|
/**
|
|
8
8
|
* String or template literal key for i18next translation
|
|
9
9
|
*/
|
|
@@ -67,7 +67,7 @@ type DynamicSearchBar = {
|
|
|
67
67
|
/**
|
|
68
68
|
* Props for the SearchBar component
|
|
69
69
|
*/
|
|
70
|
-
type Props = DefaultSearchBar | DynamicSearchBar;
|
|
70
|
+
export type Props = DefaultSearchBar | DynamicSearchBar;
|
|
71
71
|
export type SearchBarProps = BaseProps & Props;
|
|
72
72
|
/**
|
|
73
73
|
* SearchBar component to handle dynamic or static search input
|
|
@@ -13,7 +13,7 @@ const Root = /* @__PURE__ */ forwardRef(({
|
|
|
13
13
|
overflowY: "auto"
|
|
14
14
|
} : {}, children: /* @__PURE__ */ jsx("table", { ref, className: "table align-middle mb-0", style: {
|
|
15
15
|
overflow: maxHeight ? "visible" : "hidden"
|
|
16
|
-
}, children }) })), Table = Object.assign(Root, {
|
|
16
|
+
}, children }) })), Table = /* @__PURE__ */ Object.assign(Root, {
|
|
17
17
|
Thead: TableThead,
|
|
18
18
|
Th: TableTh,
|
|
19
19
|
Tbody: TableTbody,
|
|
@@ -1,8 +1,7 @@
|
|
|
1
|
-
import { default as UAParser } from 'ua-parser-js';
|
|
2
1
|
export default function useBrowserInfo(userAgent?: string): {
|
|
3
|
-
os:
|
|
4
|
-
device:
|
|
5
|
-
browser:
|
|
2
|
+
os: import('ua-parser-js').IOS;
|
|
3
|
+
device: import('ua-parser-js').IDevice;
|
|
4
|
+
browser: import('ua-parser-js').IBrowser;
|
|
6
5
|
isIphone: boolean;
|
|
7
6
|
isIpod: boolean;
|
|
8
7
|
isIpad: boolean;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import UAParser from "ua-parser-js";
|
|
1
|
+
import { UAParser } from "ua-parser-js";
|
|
2
2
|
function useBrowserInfo(userAgent) {
|
|
3
3
|
var _a, _b, _c;
|
|
4
4
|
const uaParser = new UAParser(userAgent), os = uaParser.getOS(), device = uaParser.getDevice(), browser = uaParser.getBrowser(), isIphone = ((_a = device.model) == null ? void 0 : _a.indexOf("iPhone")) != -1, isIpod = ((_b = device.model) == null ? void 0 : _b.indexOf("iPod")) != -1, isIpad = ((_c = device.model) == null ? void 0 : _c.indexOf("iPad")) != -1;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import { App, IGetConf } from '@edifice.io/client';
|
|
2
2
|
export default function useConf({ appCode }: {
|
|
3
3
|
appCode: App;
|
|
4
|
-
}): import('
|
|
4
|
+
}): import('../../../node_modules/@tanstack/react-query').UseQueryResult<IGetConf, Error>;
|
|
@@ -35,11 +35,11 @@ const useDropzone = (props) => {
|
|
|
35
35
|
}, convertHEICImages = async (files2) => {
|
|
36
36
|
if (files2 === null || files2.length === 0)
|
|
37
37
|
return [];
|
|
38
|
-
let
|
|
39
|
-
return files2.some((file) => HEIC_MIME_TYPES.includes(file.type)) && (
|
|
40
|
-
if (
|
|
38
|
+
let heicToLib;
|
|
39
|
+
return files2.some((file) => HEIC_MIME_TYPES.includes(file.type)) && (heicToLib = await import("heic-to")), Promise.all(files2.map(async (file) => {
|
|
40
|
+
if (heicToLib.isHeic(file))
|
|
41
41
|
try {
|
|
42
|
-
const converted = await
|
|
42
|
+
const converted = await heicToLib.heicTo({
|
|
43
43
|
blob: file,
|
|
44
44
|
toType: "image/jpeg"
|
|
45
45
|
});
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
import { IGetSession } from '@edifice.io/client';
|
|
2
|
-
export default function useSession(): import('
|
|
2
|
+
export default function useSession(): import('../../../node_modules/@tanstack/react-query').UseQueryResult<IGetSession, Error>;
|
|
@@ -10,5 +10,5 @@ type LazyLoadOptions = {
|
|
|
10
10
|
* with respect to the [`intersectionOptions`](https://github.com/thebuilder/react-intersection-observer/tree/dceba7f52aebea4d62d539bc55a1db129226bb6c?tab=readme-ov-file#options)
|
|
11
11
|
* @return `true` if `src` is available, or false otherwise, or `null` while not tested.
|
|
12
12
|
*/
|
|
13
|
-
export default function useThumbnail(src: string
|
|
13
|
+
export default function useThumbnail(src: string, options?: LazyLoadOptions): boolean | null;
|
|
14
14
|
export {};
|
|
@@ -13,10 +13,6 @@ function useThumbnail(src, options) {
|
|
|
13
13
|
(_a = options == null ? void 0 : options.ref) != null && _a.current && (inViewRef == null || inViewRef(options.ref.current));
|
|
14
14
|
}, [options == null ? void 0 : options.ref, inViewRef]), useEffect(() => {
|
|
15
15
|
if ((options == null ? void 0 : options.ref) === void 0 || inView) {
|
|
16
|
-
if (!src) {
|
|
17
|
-
setStatus(!1);
|
|
18
|
-
return;
|
|
19
|
-
}
|
|
20
16
|
const img = new Image();
|
|
21
17
|
return img.src = src, img.onload = () => {
|
|
22
18
|
setStatus(!0);
|
|
@@ -26,7 +22,7 @@ function useThumbnail(src, options) {
|
|
|
26
22
|
img.onload = null, img.onerror = null, setStatus(null);
|
|
27
23
|
};
|
|
28
24
|
}
|
|
29
|
-
}, [inView
|
|
25
|
+
}, [inView]), status;
|
|
30
26
|
}
|
|
31
27
|
export {
|
|
32
28
|
useThumbnail as default
|
|
@@ -87,8 +87,11 @@ const useUpload = (visibility, application = "media-library") => {
|
|
|
87
87
|
children: [],
|
|
88
88
|
created: /* @__PURE__ */ new Date(),
|
|
89
89
|
_shared: [],
|
|
90
|
-
|
|
91
|
-
owner:
|
|
90
|
+
_isShared: !1,
|
|
91
|
+
owner: {
|
|
92
|
+
userId: "",
|
|
93
|
+
displayName: ""
|
|
94
|
+
}
|
|
92
95
|
};
|
|
93
96
|
throw uploadResponse.state === "error" ? new Error(uploadResponse.code || "Error while uploading video") : new Error("Video encoding is still running");
|
|
94
97
|
};
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { odeServices } from "@edifice.io/client";
|
|
2
2
|
import { useQueryClient, useQuery, useMutation } from "@tanstack/react-query";
|
|
3
3
|
import { useMemo, useCallback } from "react";
|
|
4
|
-
import { useTranslation } from "react-i18next";
|
|
5
4
|
import { useEdificeClient } from "../../providers/EdificeClientProvider/EdificeClientProvider.hook.js";
|
|
5
|
+
import { useTranslation } from "react-i18next";
|
|
6
6
|
import useToast from "../useToast/useToast.js";
|
|
7
7
|
function useWorkspaceFolders() {
|
|
8
8
|
const queryClient = useQueryClient(), {
|
package/dist/index.js
CHANGED
|
@@ -141,6 +141,7 @@ import { mergeRefs, setRef } from "./utilities/refs/ref.js";
|
|
|
141
141
|
import { useCheckable } from "./hooks/useCheckable/useCheckable.js";
|
|
142
142
|
import { useEdificeClient } from "./providers/EdificeClientProvider/EdificeClientProvider.hook.js";
|
|
143
143
|
import { useEdificeTheme } from "./providers/EdificeThemeProvider/EdificeThemeProvider.hook.js";
|
|
144
|
+
import { useFileToAttachment } from "./components/AddAttachments/hooks/useFileToAttachment.js";
|
|
144
145
|
import { useTreeSortable } from "./components/Tree/hooks/useTreeSortable.js";
|
|
145
146
|
import { useTreeView } from "./components/TreeView/hooks/useTreeView.js";
|
|
146
147
|
export {
|
|
@@ -291,6 +292,7 @@ export {
|
|
|
291
292
|
useEdificeClient,
|
|
292
293
|
default85 as useEdificeIcons,
|
|
293
294
|
useEdificeTheme,
|
|
295
|
+
useFileToAttachment,
|
|
294
296
|
default86 as useHasWorkflow,
|
|
295
297
|
default87 as useHover,
|
|
296
298
|
default88 as useHttpErrorToast,
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { ReactNode } from 'react';
|
|
2
2
|
import { CreateParameters, CreateResult, ID, IFolder, UpdateParameters, UpdateResult } from '@edifice.io/client';
|
|
3
|
-
import { UseMutationResult } from '
|
|
3
|
+
import { UseMutationResult } from '../../../../node_modules/@tanstack/react-query';
|
|
4
4
|
export interface FormInputs {
|
|
5
5
|
title: string;
|
|
6
6
|
description: string;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { UpdateParameters, UpdateResult } from '@edifice.io/client';
|
|
2
|
-
import { UseMutationOptions, UseMutationResult } from '
|
|
2
|
+
import { UseMutationOptions, UseMutationResult } from '../../../../../node_modules/@tanstack/react-query';
|
|
3
3
|
declare const useUpdateMutation: ({ application, options, }: {
|
|
4
4
|
application: string;
|
|
5
5
|
options?: UseMutationOptions<UpdateResult, Error, UpdateParameters>;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { ID, PutShareResponse, RightStringified, ShareRight, ShareRightAction, ShareRightActionDisplayName, ShareUrls } from '@edifice.io/client';
|
|
2
|
-
import { UseMutationResult } from '
|
|
2
|
+
import { UseMutationResult } from '../../../../node_modules/@tanstack/react-query';
|
|
3
3
|
/**
|
|
4
4
|
* Configuration options for sharing a resource
|
|
5
5
|
*
|
|
@@ -118,11 +118,21 @@ interface ShareResourceProps {
|
|
|
118
118
|
classNameSearchInput?: string;
|
|
119
119
|
}
|
|
120
120
|
/**
|
|
121
|
-
* Ref interface exposed by ShareResources component
|
|
122
|
-
* Use useRef with this type and call ref.current?.handleShare() to trigger share programmatically.
|
|
121
|
+
* Ref interface exposed by ShareResources component
|
|
123
122
|
*
|
|
124
123
|
* @interface ShareResourcesRef
|
|
125
124
|
* @property {() => void} handleShare - Method to trigger the share operation
|
|
125
|
+
*
|
|
126
|
+
* @example
|
|
127
|
+
* ```tsx
|
|
128
|
+
* const ref = useRef<ShareResourcesRef>(null);
|
|
129
|
+
*
|
|
130
|
+
* // Trigger share programmatically
|
|
131
|
+
* ref.current?.handleShare();
|
|
132
|
+
*
|
|
133
|
+
* // Check sharing status
|
|
134
|
+
* const sharing = ref.current?.isSharing();
|
|
135
|
+
* ```
|
|
126
136
|
*/
|
|
127
137
|
export interface ShareResourcesRef {
|
|
128
138
|
handleShare: (notify?: boolean) => void;
|
|
@@ -132,7 +142,46 @@ export interface ShareResourcesRef {
|
|
|
132
142
|
*
|
|
133
143
|
* A component for managing resource sharing permissions with users and groups.
|
|
134
144
|
* Provides search functionality, bookmark management, and granular rights control.
|
|
135
|
-
*
|
|
145
|
+
*
|
|
146
|
+
* @example
|
|
147
|
+
* ```tsx
|
|
148
|
+
* import { useRef } from 'react';
|
|
149
|
+
* import ShareResources, { ShareResourcesRef, ShareOptions } from './ShareResources';
|
|
150
|
+
*
|
|
151
|
+
* function MyComponent() {
|
|
152
|
+
* const shareRef = useRef<ShareResourcesRef>(null);
|
|
153
|
+
*
|
|
154
|
+
* const shareOptions: ShareOptions = {
|
|
155
|
+
* resourceId: '123',
|
|
156
|
+
* resourceRights: [],
|
|
157
|
+
* resourceCreatorId: 'user-456',
|
|
158
|
+
* filteredActions: ['read', 'contrib'],
|
|
159
|
+
* urls: {
|
|
160
|
+
* getResourceRights: '/api/share/rights',
|
|
161
|
+
* putResourceRights: '/api/share/update'
|
|
162
|
+
* }
|
|
163
|
+
* };
|
|
164
|
+
*
|
|
165
|
+
* const handleSave = () => {
|
|
166
|
+
* if (shareRef.current) {
|
|
167
|
+
* shareRef.current.handleShare();
|
|
168
|
+
* }
|
|
169
|
+
* };
|
|
170
|
+
*
|
|
171
|
+
* return (
|
|
172
|
+
* <>
|
|
173
|
+
* <ShareResources
|
|
174
|
+
* ref={shareRef}
|
|
175
|
+
* shareOptions={shareOptions}
|
|
176
|
+
* onSuccess={() => console.log('Shared successfully')}
|
|
177
|
+
* onChange={(rights, isDirty) => console.log('Rights changed:', isDirty)}
|
|
178
|
+
* onSubmit={(isSubmitting) => console.log('Submitting share...', isSubmitting)}
|
|
179
|
+
* />
|
|
180
|
+
* <button onClick={handleSave}>Save Changes</button>
|
|
181
|
+
* </>
|
|
182
|
+
* );
|
|
183
|
+
* }
|
|
184
|
+
* ```
|
|
136
185
|
*
|
|
137
186
|
* @component
|
|
138
187
|
* @forwardRef
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { ID, UpdateParameters, UpdateResult } from '@edifice.io/client';
|
|
2
|
-
import { UseMutationResult } from '
|
|
2
|
+
import { UseMutationResult } from '../../../../../node_modules/@tanstack/react-query';
|
|
3
3
|
export type PublicationType = 'RESTRAINT' | 'IMMEDIATE' | undefined;
|
|
4
4
|
export interface ShareBlogProps {
|
|
5
5
|
resourceId: ID;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { PutShareResponse, ShareRight } from '@edifice.io/client';
|
|
2
|
-
import { UseMutationOptions, UseMutationResult } from '
|
|
2
|
+
import { UseMutationOptions, UseMutationResult } from '../../../../../node_modules/@tanstack/react-query';
|
|
3
3
|
declare const useShareMutation: ({ application, options, }: {
|
|
4
4
|
application: string;
|
|
5
5
|
options?: UseMutationOptions<PutShareResponse, Error, {
|
|
@@ -11,12 +11,12 @@ Object.defineProperty(de_DE, "__esModule", {
|
|
|
11
11
|
de_DE.default = void 0;
|
|
12
12
|
var _de_DE = _interopRequireDefault(de_DE$1), _de_DE2 = _interopRequireDefault(de_DE$2);
|
|
13
13
|
const locale = {
|
|
14
|
-
lang: Object.assign({
|
|
14
|
+
lang: /* @__PURE__ */ Object.assign({
|
|
15
15
|
placeholder: "Datum auswählen",
|
|
16
16
|
rangePlaceholder: ["Startdatum", "Enddatum"],
|
|
17
17
|
shortWeekDays: ["So", "Mo", "Di", "Mi", "Do", "Fr", "Sa"],
|
|
18
18
|
shortMonths: ["Jan", "Feb", "Mär", "Apr", "Mai", "Jun", "Jul", "Aug", "Sep", "Okt", "Nov", "Dez"]
|
|
19
19
|
}, _de_DE.default),
|
|
20
|
-
timePickerLocale: Object.assign({}, _de_DE2.default)
|
|
20
|
+
timePickerLocale: /* @__PURE__ */ Object.assign({}, _de_DE2.default)
|
|
21
21
|
};
|
|
22
22
|
de_DE.default = locale;
|
|
@@ -11,12 +11,12 @@ Object.defineProperty(es_ES, "__esModule", {
|
|
|
11
11
|
es_ES.default = void 0;
|
|
12
12
|
var _es_ES = _interopRequireDefault(es_ES$1), _es_ES2 = _interopRequireDefault(es_ES$2);
|
|
13
13
|
const locale = {
|
|
14
|
-
lang: Object.assign({
|
|
14
|
+
lang: /* @__PURE__ */ Object.assign({
|
|
15
15
|
placeholder: "Seleccionar fecha",
|
|
16
16
|
rangePlaceholder: ["Fecha inicial", "Fecha final"],
|
|
17
17
|
shortWeekDays: ["Dom", "Lun", "Mar", "Mié", "Jue", "Vie", "Sáb"],
|
|
18
18
|
shortMonths: ["Ene", "Feb", "Mar", "Abr", "May", "Jun", "Jul", "Ago", "Sep", "Oct", "Nov", "Dic"]
|
|
19
19
|
}, _es_ES.default),
|
|
20
|
-
timePickerLocale: Object.assign({}, _es_ES2.default)
|
|
20
|
+
timePickerLocale: /* @__PURE__ */ Object.assign({}, _es_ES2.default)
|
|
21
21
|
};
|
|
22
22
|
es_ES.default = locale;
|
|
@@ -11,7 +11,7 @@ Object.defineProperty(fr_FR, "__esModule", {
|
|
|
11
11
|
fr_FR.default = void 0;
|
|
12
12
|
var _fr_FR = _interopRequireDefault(fr_FR$1), _fr_FR2 = _interopRequireDefault(fr_FR$2);
|
|
13
13
|
const locale = {
|
|
14
|
-
lang: Object.assign({
|
|
14
|
+
lang: /* @__PURE__ */ Object.assign({
|
|
15
15
|
placeholder: "Sélectionner une date",
|
|
16
16
|
yearPlaceholder: "Sélectionner une année",
|
|
17
17
|
quarterPlaceholder: "Sélectionner un trimestre",
|
|
@@ -22,6 +22,6 @@ const locale = {
|
|
|
22
22
|
rangeMonthPlaceholder: ["Mois de début", "Mois de fin"],
|
|
23
23
|
rangeWeekPlaceholder: ["Semaine de début", "Semaine de fin"]
|
|
24
24
|
}, _fr_FR.default),
|
|
25
|
-
timePickerLocale: Object.assign({}, _fr_FR2.default)
|
|
25
|
+
timePickerLocale: /* @__PURE__ */ Object.assign({}, _fr_FR2.default)
|
|
26
26
|
};
|
|
27
27
|
fr_FR.default = locale;
|
|
@@ -11,10 +11,10 @@ Object.defineProperty(it_IT, "__esModule", {
|
|
|
11
11
|
it_IT.default = void 0;
|
|
12
12
|
var _it_IT = _interopRequireDefault(it_IT$1), _it_IT2 = _interopRequireDefault(it_IT$2);
|
|
13
13
|
const locale = {
|
|
14
|
-
lang: Object.assign({
|
|
14
|
+
lang: /* @__PURE__ */ Object.assign({
|
|
15
15
|
placeholder: "Selezionare la data",
|
|
16
16
|
rangePlaceholder: ["Data d'inizio", "Data di fine"]
|
|
17
17
|
}, _it_IT.default),
|
|
18
|
-
timePickerLocale: Object.assign({}, _it_IT2.default)
|
|
18
|
+
timePickerLocale: /* @__PURE__ */ Object.assign({}, _it_IT2.default)
|
|
19
19
|
};
|
|
20
20
|
it_IT.default = locale;
|
|
@@ -11,7 +11,7 @@ Object.defineProperty(pt_PT, "__esModule", {
|
|
|
11
11
|
pt_PT.default = void 0;
|
|
12
12
|
var _pt_PT = _interopRequireDefault(pt_PT$1), _pt_PT2 = _interopRequireDefault(pt_PT$2);
|
|
13
13
|
const locale = {
|
|
14
|
-
lang: Object.assign(Object.assign({}, _pt_PT.default), {
|
|
14
|
+
lang: /* @__PURE__ */ Object.assign(/* @__PURE__ */ Object.assign({}, _pt_PT.default), {
|
|
15
15
|
placeholder: "Data",
|
|
16
16
|
rangePlaceholder: ["Data inicial", "Data final"],
|
|
17
17
|
today: "Hoje",
|
|
@@ -38,7 +38,7 @@ const locale = {
|
|
|
38
38
|
previousCentury: "Último século",
|
|
39
39
|
nextCentury: "Próximo século"
|
|
40
40
|
}),
|
|
41
|
-
timePickerLocale: Object.assign(Object.assign({}, _pt_PT2.default), {
|
|
41
|
+
timePickerLocale: /* @__PURE__ */ Object.assign(/* @__PURE__ */ Object.assign({}, _pt_PT2.default), {
|
|
42
42
|
placeholder: "Hora"
|
|
43
43
|
})
|
|
44
44
|
};
|
|
@@ -3,11 +3,11 @@ import { ConfigProvider } from "antd";
|
|
|
3
3
|
import { antTheme } from "./antThemeConfig.js";
|
|
4
4
|
/* empty css */
|
|
5
5
|
import { useEdificeClient } from "../EdificeClientProvider/EdificeClientProvider.hook.js";
|
|
6
|
-
import frFR from "../../node_modules/.pnpm/antd@5.29.
|
|
7
|
-
import deDE from "../../node_modules/.pnpm/antd@5.29.
|
|
8
|
-
import esES from "../../node_modules/.pnpm/antd@5.29.
|
|
9
|
-
import itIT from "../../node_modules/.pnpm/antd@5.29.
|
|
10
|
-
import ptPT from "../../node_modules/.pnpm/antd@5.29.
|
|
6
|
+
import frFR from "../../node_modules/.pnpm/antd@5.29.3_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/antd/locale/fr_FR.js";
|
|
7
|
+
import deDE from "../../node_modules/.pnpm/antd@5.29.3_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/antd/locale/de_DE.js";
|
|
8
|
+
import esES from "../../node_modules/.pnpm/antd@5.29.3_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/antd/locale/es_ES.js";
|
|
9
|
+
import itIT from "../../node_modules/.pnpm/antd@5.29.3_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/antd/locale/it_IT.js";
|
|
10
|
+
import ptPT from "../../node_modules/.pnpm/antd@5.29.3_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/antd/locale/pt_PT.js";
|
|
11
11
|
const antdLocaleMap = {
|
|
12
12
|
fr: frFR,
|
|
13
13
|
de: deDE,
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { ReactNode } from 'react';
|
|
2
2
|
import { App, IGetConf, IGetSession, IUserDescription, IUserInfo, IWebApp, UserProfile } from '@edifice.io/client';
|
|
3
|
-
import { UseQueryResult } from '
|
|
3
|
+
import { UseQueryResult } from '../../../node_modules/@tanstack/react-query';
|
|
4
4
|
export interface EdificeClientParams {
|
|
5
5
|
alternativeApp?: boolean;
|
|
6
6
|
app: App;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { InvalidateQueryFilters, QueryClient } from '
|
|
1
|
+
import { InvalidateQueryFilters, QueryClient } from '../../../node_modules/@tanstack/react-query';
|
|
2
2
|
/**
|
|
3
3
|
* Invalidates queries and resets infinite query data to only contain the first page.
|
|
4
4
|
*
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@edifice.io/react",
|
|
3
|
-
"version": "2.5.12-develop-
|
|
3
|
+
"version": "2.5.12-develop-pedago.20260227152929",
|
|
4
4
|
"description": "Edifice React Library",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"react",
|
|
@@ -73,10 +73,10 @@
|
|
|
73
73
|
"dist"
|
|
74
74
|
],
|
|
75
75
|
"dependencies": {
|
|
76
|
-
"@ant-design/icons": "5.4.0",
|
|
77
|
-
"@dnd-kit/core": "6.
|
|
78
|
-
"@dnd-kit/sortable": "8.0.0",
|
|
79
|
-
"@dnd-kit/utilities": "3.2.2",
|
|
76
|
+
"@ant-design/icons": "^5.4.0",
|
|
77
|
+
"@dnd-kit/core": "^6.1.0",
|
|
78
|
+
"@dnd-kit/sortable": "^8.0.0",
|
|
79
|
+
"@dnd-kit/utilities": "^3.2.2",
|
|
80
80
|
"@floating-ui/react": "0.26.0",
|
|
81
81
|
"@pixi/mixin-get-child-by-name": "7.4.2",
|
|
82
82
|
"@pixi/react": "7.1.2",
|
|
@@ -118,66 +118,66 @@
|
|
|
118
118
|
"@tiptap/pm": "2.11.0",
|
|
119
119
|
"@tiptap/react": "2.11.0",
|
|
120
120
|
"@tiptap/starter-kit": "2.11.0",
|
|
121
|
-
"@uidotdev/usehooks": "2.4.1",
|
|
122
|
-
"antd": "5.29.1",
|
|
123
|
-
"clsx": "2.1.1",
|
|
121
|
+
"@uidotdev/usehooks": "^2.4.1",
|
|
122
|
+
"antd": "^5.29.1",
|
|
123
|
+
"clsx": "^2.1.1",
|
|
124
124
|
"dayjs": "1.11.19",
|
|
125
|
-
"emoji-picker-react": "4.
|
|
126
|
-
"
|
|
125
|
+
"emoji-picker-react": "4.5.2",
|
|
126
|
+
"heic-to": "1.4.2",
|
|
127
127
|
"html-react-parser": "4.2.1",
|
|
128
128
|
"ohash": "1.1.3",
|
|
129
129
|
"pako": "2.1.0",
|
|
130
130
|
"pixi.js": "7.4.2",
|
|
131
|
-
"react-hot-toast": "2.
|
|
131
|
+
"react-hot-toast": "^2.4.1",
|
|
132
132
|
"react-intersection-observer": "9.5.3",
|
|
133
|
-
"react-
|
|
134
|
-
"react-
|
|
135
|
-
"
|
|
136
|
-
"
|
|
137
|
-
"
|
|
138
|
-
"@edifice.io/
|
|
139
|
-
"@edifice.io/
|
|
140
|
-
"@edifice.io/
|
|
133
|
+
"react-popper": "^2.3.0",
|
|
134
|
+
"react-slugify": "^3.0.3",
|
|
135
|
+
"swiper": "^10.1.0",
|
|
136
|
+
"ua-parser-js": "^1.0.36",
|
|
137
|
+
"react-pdf": "10.2.0",
|
|
138
|
+
"@edifice.io/tiptap-extensions": "2.5.12-develop-pedago.20260227152929",
|
|
139
|
+
"@edifice.io/utilities": "2.5.12-develop-pedago.20260227152929",
|
|
140
|
+
"@edifice.io/bootstrap": "2.5.12-develop-pedago.20260227152929"
|
|
141
141
|
},
|
|
142
142
|
"devDependencies": {
|
|
143
|
-
"@babel/plugin-transform-react-pure-annotations": "7.
|
|
144
|
-
"@eslint/js": "9.
|
|
145
|
-
"@react-spring/web": "9.7.5",
|
|
146
|
-
"@svgr/cli": "8.1.0",
|
|
147
|
-
"@tanstack/query-core": "5.
|
|
143
|
+
"@babel/plugin-transform-react-pure-annotations": "^7.23.3",
|
|
144
|
+
"@eslint/js": "^9.12.0",
|
|
145
|
+
"@react-spring/web": "^9.7.5",
|
|
146
|
+
"@svgr/cli": "^8.1.0",
|
|
147
|
+
"@tanstack/query-core": "5.62.7",
|
|
148
148
|
"@tanstack/react-query": "5.62.7",
|
|
149
|
-
"@testing-library/jest-dom": "6.5.0",
|
|
150
|
-
"@testing-library/react": "16.0.1",
|
|
151
|
-
"@testing-library/user-event": "14.5.2",
|
|
152
|
-
"@types/node": "22.
|
|
153
|
-
"@types/pako": "2.0.
|
|
154
|
-
"@types/react": "18.
|
|
155
|
-
"@types/react-dom": "18.
|
|
156
|
-
"@types/ua-parser-js": "0.7.37",
|
|
157
|
-
"@vitejs/plugin-react": "4.
|
|
158
|
-
"eslint": "9.
|
|
149
|
+
"@testing-library/jest-dom": "^6.5.0",
|
|
150
|
+
"@testing-library/react": "^16.0.1",
|
|
151
|
+
"@testing-library/user-event": "^14.5.2",
|
|
152
|
+
"@types/node": "^22.9.1",
|
|
153
|
+
"@types/pako": "^2.0.3",
|
|
154
|
+
"@types/react": "^18.2.33",
|
|
155
|
+
"@types/react-dom": "^18.2.14",
|
|
156
|
+
"@types/ua-parser-js": "^0.7.37",
|
|
157
|
+
"@vitejs/plugin-react": "^4.3.2",
|
|
158
|
+
"eslint": "^9.12.0",
|
|
159
159
|
"eslint-plugin-react-hooks": "5.1.0-rc.0",
|
|
160
|
-
"eslint-plugin-react-refresh": "0.4.
|
|
161
|
-
"react": "18.3.1",
|
|
162
|
-
"react-dom": "18.3.1",
|
|
163
|
-
"react-hook-form": "7.
|
|
164
|
-
"react-i18next": "14.1.
|
|
165
|
-
"rollup-plugin-pure": "0.
|
|
160
|
+
"eslint-plugin-react-refresh": "^0.4.12",
|
|
161
|
+
"react": "^18.3.1",
|
|
162
|
+
"react-dom": "^18.3.1",
|
|
163
|
+
"react-hook-form": "^7.53.0",
|
|
164
|
+
"react-i18next": "^14.1.0",
|
|
165
|
+
"rollup-plugin-pure": "^0.2.1",
|
|
166
166
|
"rollup-plugin-visualizer": "5.12.0",
|
|
167
|
-
"typescript-eslint": "8.
|
|
168
|
-
"vite": "5.4.
|
|
169
|
-
"vite-plugin-dts": "4.
|
|
170
|
-
"vite-tsconfig-paths": "5.1
|
|
171
|
-
"@edifice.io/
|
|
172
|
-
"@edifice.io/
|
|
167
|
+
"typescript-eslint": "^8.8.1",
|
|
168
|
+
"vite": "^5.4.11",
|
|
169
|
+
"vite-plugin-dts": "^4.1.0",
|
|
170
|
+
"vite-tsconfig-paths": "^5.0.1",
|
|
171
|
+
"@edifice.io/client": "2.5.12-develop-pedago.20260227152929",
|
|
172
|
+
"@edifice.io/config": "2.5.12-develop-pedago.20260227152929"
|
|
173
173
|
},
|
|
174
174
|
"peerDependencies": {
|
|
175
|
-
"@react-spring/web": "9.7.5",
|
|
175
|
+
"@react-spring/web": "^9.7.5",
|
|
176
176
|
"@tanstack/react-query": "5.62.7",
|
|
177
|
-
"react": "18.3.1",
|
|
178
|
-
"react-dom": "18.3.1",
|
|
179
|
-
"react-hook-form": "7.
|
|
180
|
-
"react-i18next": "14.1.
|
|
177
|
+
"react": "^18.3.1",
|
|
178
|
+
"react-dom": "^18.3.1",
|
|
179
|
+
"react-hook-form": "^7.53.0",
|
|
180
|
+
"react-i18next": "^14.1.0"
|
|
181
181
|
},
|
|
182
182
|
"publishConfig": {
|
|
183
183
|
"access": "public"
|
|
@@ -186,7 +186,6 @@
|
|
|
186
186
|
"scripts": {
|
|
187
187
|
"build": "pnpm build:icons && vite build",
|
|
188
188
|
"build:icons": "svgr src/modules/icons/assets --config-file ./svgr.config.cjs",
|
|
189
|
-
"build:analyze": "vite build --mode analyze",
|
|
190
189
|
"fix": "eslint --fix --report-unused-disable-directives --max-warnings 0",
|
|
191
190
|
"format": "pnpm run format:write && pnpm run format:check",
|
|
192
191
|
"format:check": "npx prettier --check \"src/**/*.{ts,tsx}\"",
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
import { WorkspaceElement } from '@edifice.io/client';
|
|
2
|
-
export interface CreateFolderParams {
|
|
3
|
-
folderName: string;
|
|
4
|
-
folderParentId?: string;
|
|
5
|
-
}
|
|
6
|
-
declare function useWorkspaceFolders(): {
|
|
7
|
-
folders: WorkspaceElement[];
|
|
8
|
-
createFolderMutation: import('@tanstack/react-query').UseMutationResult<any, Error, CreateFolderParams, unknown>;
|
|
9
|
-
canCopyFileIntoFolder: (folderId: string) => boolean;
|
|
10
|
-
isLoading: boolean;
|
|
11
|
-
};
|
|
12
|
-
export default useWorkspaceFolders;
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|