@edifice.io/react 2.5.15-develop-pedago.20260324175543 → 2.5.15-develop-enabling.20260326100838

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 (72) hide show
  1. package/dist/components/AddAttachments/AddAttachments.d.ts +3 -6
  2. package/dist/components/AddAttachments/AddAttachments.js +29 -17
  3. package/dist/components/AddAttachments/models/attachment.d.ts +0 -1
  4. package/dist/components/Card/Card.js +1 -1
  5. package/dist/components/Combobox/Combobox.js +1 -1
  6. package/dist/components/Dropdown/Dropdown.js +1 -1
  7. package/dist/components/Form/FormControl.js +1 -1
  8. package/dist/components/Layout/components/WidgetApps.js +1 -1
  9. package/dist/components/Modal/Modal.js +1 -1
  10. package/dist/components/PreventPropagation/PreventPropagation.js +1 -1
  11. package/dist/components/PromotionCard/PromotionCard.js +1 -1
  12. package/dist/components/SearchBar/SearchBar.d.ts +2 -2
  13. package/dist/components/Table/components/Table.js +1 -1
  14. package/dist/components/index.d.ts +0 -1
  15. package/dist/hooks/useConf/useConf.d.ts +1 -1
  16. package/dist/hooks/useDropdown/useDropdown.js +2 -0
  17. package/dist/hooks/useDropzone/useDropzone.js +4 -4
  18. package/dist/hooks/useSession/useSession.d.ts +1 -1
  19. package/dist/hooks/useThumbnail/useThumbnail.d.ts +1 -1
  20. package/dist/hooks/useThumbnail/useThumbnail.js +5 -1
  21. package/dist/hooks/useUpload/useUpload.js +2 -5
  22. package/dist/hooks/useWorkspaceFolders/useWorkspaceFolders.d.ts +12 -0
  23. package/dist/hooks/useWorkspaceFolders/useWorkspaceFolders.js +1 -1
  24. package/dist/icons.js +176 -180
  25. package/dist/index.js +0 -6
  26. package/dist/modules/editor/components/Editor/EditorPreview.js +1 -1
  27. package/dist/modules/icons/components/index.d.ts +0 -2
  28. package/dist/modules/modals/ResourceModal/ResourceModal.d.ts +1 -1
  29. package/dist/modules/modals/ResourceModal/ResourceModal.js +1 -1
  30. package/dist/modules/modals/ResourceModal/hooks/useUpdateMutation.d.ts +1 -1
  31. package/dist/modules/modals/ShareModal/ShareResources.d.ts +4 -53
  32. package/dist/modules/modals/ShareModal/apps/ShareBlog.d.ts +1 -1
  33. package/dist/modules/modals/ShareModal/hooks/useShareBookmark.js +2 -1
  34. package/dist/modules/modals/ShareModal/hooks/useShareMutation.d.ts +1 -1
  35. package/dist/modules/multimedia/ImageEditor/components/ImageEditor.js +24 -10
  36. package/dist/modules/multimedia/ImageEditor/effects/blur.d.ts +7 -5
  37. package/dist/modules/multimedia/ImageEditor/effects/blur.js +26 -18
  38. package/dist/modules/multimedia/ImageEditor/effects/constants.d.ts +2 -0
  39. package/dist/modules/multimedia/ImageEditor/effects/constants.js +4 -0
  40. package/dist/modules/multimedia/ImageEditor/effects/crop.d.ts +4 -5
  41. package/dist/modules/multimedia/ImageEditor/effects/crop.js +42 -26
  42. package/dist/modules/multimedia/ImageEditor/effects/misc.d.ts +10 -16
  43. package/dist/modules/multimedia/ImageEditor/effects/misc.js +27 -12
  44. package/dist/modules/multimedia/ImageEditor/effects/resize.d.ts +3 -7
  45. package/dist/modules/multimedia/ImageEditor/effects/resize.js +31 -22
  46. package/dist/modules/multimedia/ImageEditor/effects/rotate.js +2 -3
  47. package/dist/modules/multimedia/ImageEditor/hooks/useHistoryTool.js +40 -41
  48. package/dist/modules/multimedia/ImageEditor/hooks/useImageEditor.d.ts +1 -1
  49. package/dist/modules/multimedia/ImageEditor/hooks/useImageEditor.js +9 -3
  50. package/dist/modules/multimedia/ImageEditor/hooks/useImageEffects.js +4 -1
  51. package/dist/modules/multimedia/Linker/InternalLinker/InternalLinker.d.ts +1 -3
  52. package/dist/modules/multimedia/Linker/InternalLinker/InternalLinker.js +1 -2
  53. package/dist/modules/multimedia/LinkerCard/LinkerCard._.d.ts +1 -1
  54. package/dist/modules/multimedia/MediaLibrary/MediaLibrary.js +1 -0
  55. package/dist/modules/multimedia/UploadCard/UploadCard._.d.ts +1 -1
  56. package/dist/modules/multimedia/UploadFiles/UploadFiles.js +4 -4
  57. package/dist/providers/EdificeClientProvider/EdificeClientProvider.context.d.ts +1 -1
  58. package/dist/utilities/react-query/react-query-utils.d.ts +1 -1
  59. package/package.json +53 -54
  60. package/dist/components/AddAttachments/hooks/useFileToAttachment.d.ts +0 -3
  61. package/dist/components/AddAttachments/hooks/useFileToAttachment.js +0 -16
  62. package/dist/components/UserSearch/UserSearch.d.ts +0 -7
  63. package/dist/components/UserSearch/UserSearch.js +0 -82
  64. package/dist/components/UserSearch/index.d.ts +0 -3
  65. package/dist/components/UserSearch/types/types.d.ts +0 -29
  66. package/dist/components/UserSearch/types/visible.d.ts +0 -24
  67. package/dist/components/UserSearch/types/visible.js +0 -4
  68. package/dist/modules/icons/components/IconParcoursCitoyen.d.ts +0 -7
  69. package/dist/modules/icons/components/IconParcoursCitoyen.js +0 -14
  70. package/dist/modules/icons/components/IconParcoursSecours.d.ts +0 -7
  71. package/dist/modules/icons/components/IconParcoursSecours.js +0 -14
  72. package/dist/modules/multimedia/FileCard/FileCard._.d.ts +0 -17
@@ -1,11 +1,8 @@
1
1
  import { Attachment } from './models/attachment';
2
- export type SingleAttachmentType = Attachment;
3
- export { useFileToAttachment } from './hooks/useFileToAttachment';
4
2
  export interface AddAttachmentsProps {
5
3
  attachments: Attachment[];
6
- onChange?: (attachments: Attachment[]) => void;
7
- onFilesSelected?: (files: File[]) => void;
8
- onRemoveAttachment?: (attachmentId: string) => void;
4
+ onFilesSelected: (files: File[]) => void;
5
+ onRemoveAttachment: (attachmentId: string) => void;
9
6
  editMode?: boolean;
10
7
  isMutating?: boolean;
11
8
  onCopyToWorkspace?: (attachments: Attachment[], folderId: string) => Promise<boolean>;
@@ -15,7 +12,7 @@ export interface AddAttachmentsProps {
15
12
  downloadAllUrl?: string;
16
13
  }
17
14
  export declare const AddAttachments: {
18
- ({ attachments, onChange, onFilesSelected, onRemoveAttachment, editMode, isMutating, onCopyToWorkspace, getDownloadUrl, downloadAllUrl, }: AddAttachmentsProps): import("react/jsx-runtime").JSX.Element | null;
15
+ ({ attachments, onFilesSelected, onRemoveAttachment, editMode, isMutating, onCopyToWorkspace, getDownloadUrl, downloadAllUrl, }: AddAttachmentsProps): import("react/jsx-runtime").JSX.Element | null;
19
16
  displayName: string;
20
17
  };
21
18
  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 } from "react";
3
+ import { useRef, useState, useEffect } 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,13 +8,22 @@ 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";
12
11
  import Flex from "../Flex/Flex.js";
13
12
  import IconButton from "../Button/IconButton.js";
14
13
  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
+ }
15
25
  const AddAttachments = ({
16
26
  attachments,
17
- onChange,
18
27
  onFilesSelected,
19
28
  onRemoveAttachment,
20
29
  editMode = !1,
@@ -25,8 +34,10 @@ const AddAttachments = ({
25
34
  }) => {
26
35
  const {
27
36
  t
28
- } = useTranslation(), inputRef = useRef(null), fileToAttachment = useFileToAttachment(), [attachmentsToAddToWorkspace, setAttachmentsToAddToWorkspace] = useState(void 0);
29
- if (!editMode && !attachments.length) return null;
37
+ } = useTranslation(), inputRef = useRef(null), [optimisticAttachments, setOptimisticAttachments] = useState([]), [attachmentsToAddToWorkspace, setAttachmentsToAddToWorkspace] = useState(void 0), prevAttachmentsLengthRef = useRef(attachments.length), displayedAttachments = [...attachments, ...optimisticAttachments];
38
+ if (useEffect(() => {
39
+ attachments.length > prevAttachmentsLengthRef.current && setOptimisticAttachments([]), prevAttachmentsLengthRef.current = attachments.length;
40
+ }, [attachments.length]), !editMode && !displayedAttachments.length) return null;
30
41
  const resetInputValue = () => {
31
42
  inputRef.current && (inputRef.current.value = "");
32
43
  }, handleAttachClick = () => {
@@ -35,34 +46,36 @@ const AddAttachments = ({
35
46
  }, handleFileChange = (event) => {
36
47
  const files = Array.from(event.target.files ?? []);
37
48
  if (files.length > 0) {
38
- const newAttachments = files.map(fileToAttachment);
39
- onChange == null || onChange([...attachments, ...newAttachments]), onFilesSelected == null || onFilesSelected(files);
49
+ onFilesSelected(files);
50
+ const newOptimistic = files.map(fileToAttachment);
51
+ setOptimisticAttachments((prev) => [...prev, ...newOptimistic]);
40
52
  }
41
53
  resetInputValue();
42
54
  }, handleDetachAllClick = () => {
43
- onChange == null || onChange([]), attachments.forEach((a) => onRemoveAttachment == null ? void 0 : onRemoveAttachment(a.id)), resetInputValue();
55
+ setOptimisticAttachments([]), attachments.forEach((attachment) => {
56
+ onRemoveAttachment(attachment.id);
57
+ }), resetInputValue();
44
58
  }, handleDetachClick = (attachmentId) => {
45
- const next = attachments.filter((a) => a.id !== attachmentId);
46
- onChange == null || onChange(next), onRemoveAttachment == null || onRemoveAttachment(attachmentId), resetInputValue();
59
+ optimisticAttachments.some((attachment) => attachment.id === attachmentId) ? setOptimisticAttachments((prev) => prev.filter((attachment) => attachment.id !== attachmentId)) : onRemoveAttachment(attachmentId), resetInputValue();
47
60
  }, handleCopyToWorkspace = (attachments2) => {
48
61
  setAttachmentsToAddToWorkspace(attachments2);
49
62
  }, className = clsx("bg-gray-200 rounded px-12 py-8 message-attachments align-self-start gap-8 d-flex flex-column mw-100", {
50
63
  "border add-attachments-edit mx-16": editMode
51
64
  });
52
65
  return /* @__PURE__ */ jsxs("div", { className, "data-drag-handle": !0, children: [
53
- !!attachments.length && /* @__PURE__ */ jsxs(Fragment, { children: [
66
+ !!displayedAttachments.length && /* @__PURE__ */ jsxs(Fragment, { children: [
54
67
  /* @__PURE__ */ jsxs(Flex, { direction: "row", align: "center", justify: "between", className: "border-bottom", children: [
55
68
  /* @__PURE__ */ jsx("span", { className: "caption fw-bold my-8", children: t("attachments") }),
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" }),
69
+ displayedAttachments.length > 1 && /* @__PURE__ */ jsxs("div", { children: [
70
+ onCopyToWorkspace && /* @__PURE__ */ jsx(IconButton, { title: t("conversation.copy.all.toworkspace"), color: "tertiary", type: "button", icon: /* @__PURE__ */ jsx(SvgIconFolderAdd, {}), onClick: () => handleCopyToWorkspace(displayedAttachments), variant: "ghost" }),
58
71
  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" }) }),
59
72
  editMode && /* @__PURE__ */ jsx(IconButton, { title: t("remove.all.attachment"), color: "danger", type: "button", icon: /* @__PURE__ */ jsx(SvgIconDelete, {}), variant: "ghost", onClick: handleDetachAllClick, disabled: isMutating })
60
73
  ] })
61
74
  ] }),
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}`)) })
75
+ /* @__PURE__ */ jsx("ul", { className: "d-flex gap-8 flex-column list-unstyled m-0", children: displayedAttachments.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)) })
63
76
  ] }),
64
77
  editMode && /* @__PURE__ */ jsxs(Fragment, { children: [
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") }),
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") }),
66
79
  /* @__PURE__ */ jsx("input", { ref: inputRef, multiple: !0, type: "file", name: "attachment-input", id: "attachment-input", onChange: handleFileChange, hidden: !0 })
67
80
  ] }),
68
81
  onCopyToWorkspace && !!attachmentsToAddToWorkspace && /* @__PURE__ */ jsx(AddAttachmentToWorkspaceModal, { isOpen: !0, onModalClose: () => setAttachmentsToAddToWorkspace(void 0), attachments: attachmentsToAddToWorkspace, onCopyToWorkspace })
@@ -70,6 +83,5 @@ const AddAttachments = ({
70
83
  };
71
84
  export {
72
85
  AddAttachments,
73
- AddAttachments as default,
74
- useFileToAttachment
86
+ AddAttachments as default
75
87
  };
@@ -6,5 +6,4 @@ export type Attachment = {
6
6
  filename: string;
7
7
  name: string;
8
8
  size: number;
9
- file: File;
10
9
  };
@@ -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 = /* @__PURE__ */ Object.assign(Root, {
42
+ }), Card = 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 = /* @__PURE__ */ Object.assign(ComboboxComponent, {
56
+ }), Combobox = 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 = /* @__PURE__ */ Object.assign(Root, {
70
+ }), Dropdown = 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 = /* @__PURE__ */ Object.assign(Root, {
25
+ }), FormControl = Object.assign(Root, {
26
26
  Label,
27
27
  Input,
28
28
  Text: FormText
@@ -14,7 +14,7 @@ const WidgetAppsFooter = () => {
14
14
  } = useTranslation(), getAppName = (data) => data.prefix && data.prefix.length > 1 ? t(data.prefix.substring(1)) : t(data.displayName) || "";
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, title: getAppName(app), 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))
17
+ bookmarkedApps.slice(0, 6).map((app, index) => /* @__PURE__ */ jsx("a", { href: app.address, title: getAppName(app), className: "bookmarked-app", target: appToOpenOnBlank.includes(app.name) || app.isExternal || app.target === "_blank" ? "_blank" : void 0, rel: appToOpenOnBlank.includes(app.name) || app.isExternal || app.target === "_blank" ? "noopener noreferrer" : void 0, children: /* @__PURE__ */ jsx(AppIcon, { app, size: "32" }) }, index))
18
18
  ] });
19
19
  };
20
20
  export {
@@ -62,7 +62,7 @@ const Root = /* @__PURE__ */ forwardRef(({
62
62
  opacity: 0.65
63
63
  } })
64
64
  ] })) });
65
- }), Modal = /* @__PURE__ */ Object.assign(Root, {
65
+ }), Modal = Object.assign(Root, {
66
66
  Header: ModalHeader,
67
67
  Subtitle: ModalSubtitle,
68
68
  Body: ModalBody,
@@ -3,7 +3,7 @@ const Root = ({
3
3
  children
4
4
  }) => /* @__PURE__ */ jsx("div", { onClick: (e) => {
5
5
  e.stopPropagation();
6
- }, children }), PreventPropagation = /* @__PURE__ */ Object.assign(Root, {});
6
+ }, children }), PreventPropagation = 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 = /* @__PURE__ */ Object.assign(Root, {
20
+ }, PromotionCard = 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
- export interface BaseProps extends Omit<React.ComponentPropsWithoutRef<'input'>, 'size'> {
6
+ 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
- export type Props = DefaultSearchBar | DynamicSearchBar;
70
+ 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 = /* @__PURE__ */ Object.assign(Root, {
16
+ }, children }) })), Table = Object.assign(Root, {
17
17
  Thead: TableThead,
18
18
  Th: TableTh,
19
19
  Tbody: TableTbody,
@@ -52,5 +52,4 @@ export * from './Toolbar';
52
52
  export * from './Tooltip';
53
53
  export * from './Tree';
54
54
  export * from './TreeView';
55
- export * from './UserSearch';
56
55
  export * from './VisuallyHidden';
@@ -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('../../../node_modules/@tanstack/react-query').UseQueryResult<IGetConf, Error>;
4
+ }): import('@tanstack/react-query').UseQueryResult<IGetConf, Error>;
@@ -73,6 +73,8 @@ const useDropdown = (placement, extraTriggerKeyDownHandler, isTriggerHovered = !
73
73
  case "Space":
74
74
  if (!openOnSpace)
75
75
  break;
76
+ openDropdown(), flag = !0;
77
+ break;
76
78
  case "Enter":
77
79
  case "ArrowDown":
78
80
  case "Down":
@@ -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 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 && heicToLib.isHeic(file))
38
+ let heic2any;
39
+ return files2.some((file) => HEIC_MIME_TYPES.includes(file.type)) && (heic2any = (await import("heic2any")).default), Promise.all(files2.map(async (file) => {
40
+ if (HEIC_MIME_TYPES.includes(file.type) && heic2any)
41
41
  try {
42
- const converted = await heicToLib.heicTo({
42
+ const converted = await heic2any({
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('../../../node_modules/@tanstack/react-query').UseQueryResult<IGetSession, Error>;
2
+ export default function useSession(): import('@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, options?: LazyLoadOptions): boolean | null;
13
+ export default function useThumbnail(src: string | null | undefined, options?: LazyLoadOptions): boolean | null;
14
14
  export {};
@@ -13,6 +13,10 @@ 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
+ }
16
20
  const img = new Image();
17
21
  return img.src = src, img.onload = () => {
18
22
  setStatus(!0);
@@ -22,7 +26,7 @@ function useThumbnail(src, options) {
22
26
  img.onload = null, img.onerror = null, setStatus(null);
23
27
  };
24
28
  }
25
- }, [inView]), status;
29
+ }, [inView, src]), status;
26
30
  }
27
31
  export {
28
32
  useThumbnail as default
@@ -87,11 +87,8 @@ const useUpload = (visibility, application = "media-library") => {
87
87
  children: [],
88
88
  created: /* @__PURE__ */ new Date(),
89
89
  _shared: [],
90
- _isShared: !1,
91
- owner: {
92
- userId: "",
93
- displayName: ""
94
- }
90
+ isShared: !1,
91
+ owner: ""
95
92
  };
96
93
  throw uploadResponse.state === "error" ? new Error(uploadResponse.code || "Error while uploading video") : new Error("Video encoding is still running");
97
94
  };
@@ -0,0 +1,12 @@
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;
@@ -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 { useEdificeClient } from "../../providers/EdificeClientProvider/EdificeClientProvider.hook.js";
5
4
  import { useTranslation } from "react-i18next";
5
+ import { useEdificeClient } from "../../providers/EdificeClientProvider/EdificeClientProvider.hook.js";
6
6
  import useToast from "../useToast/useToast.js";
7
7
  function useWorkspaceFolders() {
8
8
  const queryClient = useQueryClient(), {