@edifice.io/react 2.5.9-develop-enabling.20260212131111 → 2.5.9-develop-pedago.20260213101441

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 (58) hide show
  1. package/dist/components/AddAttachments/AddAttachments.d.ts +14 -0
  2. package/dist/components/AddAttachments/components/AddAttachmentToWorkspaceModal.d.ts +9 -0
  3. package/dist/components/AddAttachments/components/SingleAttachment.d.ts +13 -0
  4. package/dist/components/AddAttachments/models/attachment.d.ts +9 -0
  5. package/dist/components/Badge/Badge.js +2 -10
  6. package/dist/components/Card/Card.js +1 -1
  7. package/dist/components/Combobox/Combobox.js +1 -1
  8. package/dist/components/Dropdown/Dropdown.js +1 -1
  9. package/dist/components/Form/FormControl.js +1 -1
  10. package/dist/components/Layout/components/WidgetApps.js +1 -1
  11. package/dist/components/Modal/Modal.js +1 -1
  12. package/dist/components/PreventPropagation/PreventPropagation.js +1 -1
  13. package/dist/components/PromotionCard/PromotionCard.js +1 -1
  14. package/dist/components/SearchBar/SearchBar.d.ts +2 -2
  15. package/dist/components/Table/components/Table.js +1 -1
  16. package/dist/hooks/useDropdown/useDropdown.js +0 -2
  17. package/dist/hooks/useThumbnail/useThumbnail.d.ts +1 -1
  18. package/dist/hooks/useThumbnail/useThumbnail.js +1 -5
  19. package/dist/hooks/useUpload/useUpload.js +5 -2
  20. package/dist/hooks/useWorkspaceFolders/useWorkspaceFolders.js +1 -1
  21. package/dist/icons.js +302 -298
  22. package/dist/modules/editor/components/Editor/EditorPreview.js +1 -1
  23. package/dist/modules/icons/components/IconCollect.d.ts +7 -0
  24. package/dist/modules/icons/components/IconCollect.js +12 -0
  25. package/dist/modules/icons/components/IconSubmission.d.ts +7 -0
  26. package/dist/modules/icons/components/IconSubmission.js +12 -0
  27. package/dist/modules/icons/components/index.d.ts +2 -0
  28. package/dist/modules/modals/ShareModal/ShareResources.d.ts +52 -3
  29. package/dist/modules/modals/ShareModal/hooks/useShareBookmark.js +1 -2
  30. package/dist/modules/multimedia/MediaLibrary/MediaLibrary.js +0 -1
  31. 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
  32. 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
  33. 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
  34. 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
  35. 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
  36. package/dist/providers/AntThemeProvider/AntProvider.js +5 -5
  37. package/package.json +50 -50
  38. package/dist/hooks/useWorkspaceFolders/useWorkspaceFolders.d.ts +0 -12
  39. /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
  40. /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
  41. /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
  42. /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
  43. /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
  44. /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
  45. /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
  46. /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
  47. /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
  48. /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
  49. /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
  50. /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
  51. /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
  52. /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
  53. /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
  54. /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
  55. /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
  56. /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
  57. /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
  58. /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
@@ -0,0 +1,14 @@
1
+ import { Attachment } from './models/attachment';
2
+ export interface AddAttachmentsProps {
3
+ attachments: Attachment[];
4
+ onFilesSelected: (files: File[]) => void;
5
+ onRemoveAttachment: (attachmentId: string) => void;
6
+ editMode?: boolean;
7
+ isMutating?: boolean;
8
+ onCopyToWorkspace?: (attachments: Attachment[], folderId: string) => Promise<boolean>;
9
+ /** Si fourni, chaque pièce jointe affiche un bouton télécharger avec l'URL retournée. */
10
+ getDownloadUrl?: (attachmentId: string) => string;
11
+ /** Si fourni et qu'il y a plusieurs pièces jointes, affiche un bouton « télécharger tout ». */
12
+ downloadAllUrl?: string;
13
+ }
14
+ export declare function AddAttachments({ attachments, onFilesSelected, onRemoveAttachment, editMode, isMutating, onCopyToWorkspace, getDownloadUrl, downloadAllUrl, }: AddAttachmentsProps): import("react/jsx-runtime").JSX.Element | null;
@@ -0,0 +1,9 @@
1
+ import { Attachment } from '../models/attachment';
2
+ interface AddAttachmentToWorkspaceModalProps {
3
+ attachments: Attachment[];
4
+ onModalClose: () => void;
5
+ isOpen?: boolean;
6
+ onCopyToWorkspace: (attachments: Attachment[], folderId: string) => Promise<boolean>;
7
+ }
8
+ export declare function AddAttachmentToWorkspaceModal({ attachments, isOpen, onModalClose, onCopyToWorkspace, }: AddAttachmentToWorkspaceModalProps): import('react').ReactPortal;
9
+ export {};
@@ -0,0 +1,13 @@
1
+ import { Attachment } from '../models/attachment';
2
+ export interface SingleAttachmentProps {
3
+ attachment: Attachment;
4
+ onDelete: (attachmentId: string) => void;
5
+ editMode?: boolean;
6
+ /** Si fourni, affiche le bouton « copier vers l'espace » et appelle ce callback au clic. */
7
+ onCopyToWorkspace?: (attachment: Attachment) => void;
8
+ /** Si fourni, affiche le bouton télécharger avec l'URL retournée. */
9
+ getDownloadUrl?: (attachmentId: string) => string;
10
+ /** Désactive les boutons d'action (ex. pendant une suppression). */
11
+ disabled?: boolean;
12
+ }
13
+ export declare function SingleAttachment({ attachment, onDelete, editMode, onCopyToWorkspace, getDownloadUrl, disabled, }: SingleAttachmentProps): import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,9 @@
1
+ export type Attachment = {
2
+ id: string;
3
+ charset: string;
4
+ contentTransferEncoding: string;
5
+ contentType: string;
6
+ filename: string;
7
+ name: string;
8
+ size: number;
9
+ };
@@ -21,17 +21,9 @@ 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
- return /* @__PURE__ */ jsxs("span", { ref, className: classes, style: (() => {
26
- if (variant.type !== "beta") return;
27
- const color = variant.color ?? "#000000";
28
- return {
29
- borderColor: color,
30
- color,
31
- backgroundColor: `${color}10`
32
- // the 2 last hexadecimal numbers are for opacity
33
- };
34
- })(), ...restProps, children: [
26
+ return /* @__PURE__ */ jsxs("span", { ref, className: classes, ...restProps, children: [
35
27
  variant.type === "chip" && /* @__PURE__ */ jsx("div", { className: "d-flex fw-800 align-items-center", children }),
36
28
  variant.type === "beta" && (children ?? "BÊTA"),
37
29
  variant.type !== "chip" && variant.type !== "beta" && 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.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))
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 {
@@ -62,7 +62,7 @@ const Root = /* @__PURE__ */ forwardRef(({
62
62
  opacity: 0.65
63
63
  } })
64
64
  ] })) });
65
- }), Modal = Object.assign(Root, {
65
+ }), Modal = /* @__PURE__ */ 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 = 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,
@@ -73,8 +73,6 @@ const useDropdown = (placement, extraTriggerKeyDownHandler, isTriggerHovered = !
73
73
  case "Space":
74
74
  if (!openOnSpace)
75
75
  break;
76
- openDropdown(), flag = !0;
77
- break;
78
76
  case "Enter":
79
77
  case "ArrowDown":
80
78
  case "Down":
@@ -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 | null | undefined, options?: LazyLoadOptions): boolean | null;
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, src]), status;
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
- isShared: !1,
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(), {