@edifice.io/react 2.5.18 → 2.5.19-develop-pedago.20260513133752

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 (65) hide show
  1. package/dist/components/Card/Card.js +1 -1
  2. package/dist/components/Combobox/Combobox.js +1 -1
  3. package/dist/components/Dropdown/Dropdown.js +1 -1
  4. package/dist/components/Form/FormControl.js +1 -1
  5. package/dist/components/Layout/components/Header.js +7 -0
  6. package/dist/components/Layout/components/WidgetApps.js +1 -1
  7. package/dist/components/Layout/hooks/useHeader.js +3 -2
  8. package/dist/components/Modal/Modal.js +1 -1
  9. package/dist/components/PreventPropagation/PreventPropagation.js +1 -1
  10. package/dist/components/PromotionCard/PromotionCard.js +1 -1
  11. package/dist/components/SearchBar/SearchBar.d.ts +2 -2
  12. package/dist/components/Table/components/Table.js +1 -1
  13. package/dist/components/UserRightsList/UserRightsBookmarkRow.js +1 -1
  14. package/dist/components/UserRightsList/UserRightsItem.js +1 -1
  15. package/dist/components/UserRightsList/UserRightsList.js +1 -1
  16. package/dist/components/UserRightsList/types/types.d.ts +6 -1
  17. package/dist/hooks/useConf/useConf.d.ts +1 -1
  18. package/dist/hooks/useDropdown/useDropdown.js +2 -0
  19. package/dist/hooks/useSession/useSession.d.ts +1 -1
  20. package/dist/hooks/useThumbnail/useThumbnail.d.ts +1 -1
  21. package/dist/hooks/useThumbnail/useThumbnail.js +5 -1
  22. package/dist/hooks/useUpload/useUpload.js +2 -5
  23. package/dist/hooks/useWorkspaceFolders/useWorkspaceFolders.d.ts +12 -0
  24. package/dist/hooks/useWorkspaceFolders/useWorkspaceFolders.js +1 -1
  25. package/dist/modules/editor/components/Editor/EditorPreview.js +1 -1
  26. package/dist/modules/icons/components/nav/IconCommunities.js +1 -1
  27. package/dist/modules/modals/ResourceModal/ResourceModal.d.ts +1 -1
  28. package/dist/modules/modals/ResourceModal/ResourceModal.js +1 -1
  29. package/dist/modules/modals/ResourceModal/hooks/useUpdateMutation.d.ts +1 -1
  30. package/dist/modules/modals/ShareModal/ShareResources.d.ts +4 -53
  31. package/dist/modules/modals/ShareModal/apps/ShareBlog.d.ts +1 -1
  32. package/dist/modules/modals/ShareModal/hooks/useShareBookmark.js +2 -1
  33. package/dist/modules/modals/ShareModal/hooks/useShareMutation.d.ts +1 -1
  34. package/dist/modules/multimedia/ImageEditor/components/ImageEditor.js +24 -10
  35. package/dist/modules/multimedia/ImageEditor/effects/blur.d.ts +7 -5
  36. package/dist/modules/multimedia/ImageEditor/effects/blur.js +26 -18
  37. package/dist/modules/multimedia/ImageEditor/effects/constants.d.ts +2 -0
  38. package/dist/modules/multimedia/ImageEditor/effects/constants.js +4 -0
  39. package/dist/modules/multimedia/ImageEditor/effects/crop.d.ts +4 -5
  40. package/dist/modules/multimedia/ImageEditor/effects/crop.js +42 -26
  41. package/dist/modules/multimedia/ImageEditor/effects/misc.d.ts +10 -16
  42. package/dist/modules/multimedia/ImageEditor/effects/misc.js +27 -12
  43. package/dist/modules/multimedia/ImageEditor/effects/resize.d.ts +3 -7
  44. package/dist/modules/multimedia/ImageEditor/effects/resize.js +31 -22
  45. package/dist/modules/multimedia/ImageEditor/effects/rotate.js +2 -3
  46. package/dist/modules/multimedia/ImageEditor/hooks/useHistoryTool.js +40 -41
  47. package/dist/modules/multimedia/ImageEditor/hooks/useImageEditor.d.ts +1 -1
  48. package/dist/modules/multimedia/ImageEditor/hooks/useImageEditor.js +9 -3
  49. package/dist/modules/multimedia/ImageEditor/hooks/useImageEffects.js +4 -1
  50. package/dist/modules/multimedia/Linker/InternalLinker/InternalLinker.d.ts +13 -1
  51. package/dist/modules/multimedia/Linker/InternalLinker/InternalLinker.js +22 -6
  52. package/dist/modules/multimedia/LinkerCard/LinkerCard._.d.ts +1 -1
  53. package/dist/modules/multimedia/LinkerCard/LinkerCard.d.ts +8 -5
  54. package/dist/modules/multimedia/LinkerCard/LinkerCard.js +2 -6
  55. package/dist/modules/multimedia/MediaLibrary/MediaLibrary.js +1 -0
  56. package/dist/modules/multimedia/UploadCard/UploadCard._.d.ts +1 -1
  57. package/dist/modules/multimedia/UploadFiles/UploadFiles.js +4 -4
  58. package/dist/node_modules/.pnpm/dayjs@1.11.19/node_modules/dayjs/plugin/isSameOrAfter.js +1 -1
  59. package/dist/node_modules/.pnpm/dayjs@1.11.19/node_modules/dayjs/plugin/isToday.js +1 -1
  60. package/dist/node_modules/.pnpm/dayjs@1.11.19/node_modules/dayjs/plugin/localeData.js +1 -1
  61. package/dist/node_modules/.pnpm/dayjs@1.11.19/node_modules/dayjs/plugin/weekday.js +1 -1
  62. package/dist/providers/EdificeClientProvider/EdificeClientProvider.context.d.ts +1 -1
  63. package/dist/utilities/react-query/react-query-utils.d.ts +1 -1
  64. package/package.json +52 -53
  65. package/dist/modules/multimedia/FileCard/FileCard._.d.ts +0 -17
@@ -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 {
@@ -81,7 +81,7 @@ const Root = /* @__PURE__ */ forwardRef(({
81
81
  return useEffect(() => {
82
82
  onToggle == null || onToggle(visible), visible || setSearchQuery("");
83
83
  }, [visible]), /* @__PURE__ */ jsx(DropdownContext.Provider, { value, children: /* @__PURE__ */ jsx("div", { ref, className: dropdown, children: typeof children == "function" ? children(triggerProps, itemRefs, setVisible) : children }) });
84
- }), Dropdown = /* @__PURE__ */ Object.assign(Root, {
84
+ }), Dropdown = Object.assign(Root, {
85
85
  Trigger: DropdownTrigger,
86
86
  Menu: DropdownMenu,
87
87
  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
@@ -4,6 +4,7 @@ import { useTranslation } from "react-i18next";
4
4
  import { useEdificeClient } from "../../../providers/EdificeClientProvider/EdificeClientProvider.hook.js";
5
5
  import { useEdificeTheme } from "../../../providers/EdificeThemeProvider/EdificeThemeProvider.hook.js";
6
6
  import SvgIconRafterDown from "../../../modules/icons/components/IconRafterDown.js";
7
+ import SvgIconCommunities from "../../../modules/icons/components/nav/IconCommunities.js";
7
8
  import SvgIconCommunity from "../../../modules/icons/components/nav/IconCommunity.js";
8
9
  import SvgIconDisconnect from "../../../modules/icons/components/nav/IconDisconnect.js";
9
10
  import SvgIconHome from "../../../modules/icons/components/nav/IconHome.js";
@@ -67,6 +68,7 @@ const Header = ({
67
68
  userName,
68
69
  welcomeUser,
69
70
  communityWorkflow,
71
+ communitiesWorkflow,
70
72
  conversationWorflow,
71
73
  searchWorkflow,
72
74
  isCollapsed,
@@ -97,6 +99,7 @@ const Header = ({
97
99
  /* @__PURE__ */ jsx(SvgIconOneMessaging, { className: "icon notification" }),
98
100
  /* @__PURE__ */ jsx(VisuallyHidden, { children: t("navbar.messages") })
99
101
  ] }) }),
102
+ communitiesWorkflow && /* @__PURE__ */ jsx(NavItem, { children: /* @__PURE__ */ jsx(NavLink, { link: "/communities", translate: t("navbar.community"), children: /* @__PURE__ */ jsx(SvgIconCommunities, { className: "icon communities text-purple-500" }) }) }),
100
103
  /* @__PURE__ */ jsx(NavItem, { children: /* @__PURE__ */ jsx(NavLink, { link: "/userbook/mon-compte", className: "dropdown-item", translate: t("navbar.myaccount"), children: /* @__PURE__ */ jsx(SvgIconOneProfile, { className: "icon user" }) }) }),
101
104
  currentLanguage === "fr" && hasOldHelpEnableWorkflow ? /* @__PURE__ */ jsxs(NavItem, { children: [
102
105
  /* @__PURE__ */ jsxs("button", { className: "nav-link", onClick: () => {
@@ -177,6 +180,10 @@ const Header = ({
177
180
  /* @__PURE__ */ jsx(SvgIconCommunity, { className: "icon community" }),
178
181
  /* @__PURE__ */ jsx("span", { className: "nav-text", children: t("navbar.community") })
179
182
  ] }) }),
183
+ communitiesWorkflow && /* @__PURE__ */ jsx(NavItem, { children: /* @__PURE__ */ jsxs("a", { href: "/communities", className: "nav-link dropdown-item", children: [
184
+ /* @__PURE__ */ jsx(SvgIconCommunities, { className: "icon communities" }),
185
+ /* @__PURE__ */ jsx("span", { className: "nav-text", children: t("navbar.community") })
186
+ ] }) }),
180
187
  searchWorkflow ? /* @__PURE__ */ jsx(SearchEngine, {}) : null,
181
188
  /* @__PURE__ */ jsx(NavItem, { children: /* @__PURE__ */ jsxs("a", { href: "/userbook/mon-compte", className: "nav-link dropdown-item", children: [
182
189
  /* @__PURE__ */ jsx(Avatar, { alt: userName, size: "sm", src: userAvatar, variant: "circle", className: "bg-white", width: "32", height: "32" }),
@@ -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 {
@@ -14,7 +14,7 @@ function useHeader({
14
14
  t
15
15
  } = useTranslation(), title = t(appCode), [isCollapsed, setIsCollapsed] = useState(!0), [appsRef, isAppsHovered] = useHover(), popoverAppsId = useId(), popoverSearchId = useId(), userAvatar = avatar, userName = user == null ? void 0 : user.username, welcomeUser = t("welcome", {
16
16
  username: user == null ? void 0 : user.firstName
17
- }), bookmarkedApps = useBookmark(), communityWorkflow = useHasWorkflow("net.atos.entng.community.controllers.CommunityController|view"), conversationWorflow = useHasWorkflow("org.entcore.conversation.controllers.ConversationController|view"), searchWorkflow = useHasWorkflow("fr.openent.searchengine.controllers.SearchEngineController|view"), toggleCollapsedNav = useCallback(() => {
17
+ }), bookmarkedApps = useBookmark(), communityWorkflow = useHasWorkflow("net.atos.entng.community.controllers.CommunityController|view"), communitiesWorkflow = useHasWorkflow("community.access"), conversationWorflow = useHasWorkflow("org.entcore.conversation.controllers.ConversationController|view"), searchWorkflow = useHasWorkflow("fr.openent.searchengine.controllers.SearchEngineController|view"), toggleCollapsedNav = useCallback(() => {
18
18
  setIsCollapsed(!isCollapsed);
19
19
  }, [isCollapsed]);
20
20
  return useMemo(() => ({
@@ -28,11 +28,12 @@ function useHeader({
28
28
  userName,
29
29
  welcomeUser,
30
30
  communityWorkflow,
31
+ communitiesWorkflow,
31
32
  conversationWorflow,
32
33
  searchWorkflow,
33
34
  isCollapsed,
34
35
  toggleCollapsedNav
35
- }), [appsRef, bookmarkedApps, communityWorkflow, conversationWorflow, isAppsHovered, isCollapsed, popoverAppsId, popoverSearchId, searchWorkflow, title, toggleCollapsedNav, userAvatar, userName, welcomeUser]);
36
+ }), [appsRef, bookmarkedApps, communitiesWorkflow, communityWorkflow, conversationWorflow, isAppsHovered, isCollapsed, popoverAppsId, popoverSearchId, searchWorkflow, title, toggleCollapsedNav, userAvatar, userName, welcomeUser]);
36
37
  }
37
38
  export {
38
39
  useHeader as default
@@ -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,
@@ -21,7 +21,7 @@ const UserRightsBookmarkRow = ({
21
21
  return /* @__PURE__ */ jsxs("tr", { "data-testid": "user-rights-list-bookmark-row", children: [
22
22
  /* @__PURE__ */ jsx("td", { children: /* @__PURE__ */ jsx(SvgIconBookmark, {}) }),
23
23
  /* @__PURE__ */ jsx("td", { children: /* @__PURE__ */ jsx(Button, { color: "tertiary", variant: "ghost", className: "fw-normal ps-0", "aria-expanded": bookmark.isExpanded, rightIcon: /* @__PURE__ */ jsx(SvgIconRafterDown, { title: bookmark.isExpanded ? t("hide") : t("show"), className: "w-16 min-w-0", style: getRotateTransitionStyle(bookmark.isExpanded) }), onClick: () => onToggleExpand(bookmark.id), children: bookmark.name }) }),
24
- Object.entries(resourceRights).map(([rightName]) => /* @__PURE__ */ jsx("td", { children: /* @__PURE__ */ jsx(Checkbox, { checked: bookmark.permission.includes(rightName), onChange: () => onToggleRight(bookmark.id, rightName), disabled: isReadOnly, "aria-label": `${bookmark.name} - ${rightName}`, "data-testid": `user-rights-list-bookmark-${rightName}-checkbox` }) }, rightName)),
24
+ Object.entries(resourceRights).map(([rightName, rightDef]) => /* @__PURE__ */ jsx("td", { children: /* @__PURE__ */ jsx(Checkbox, { checked: bookmark.permission.includes(rightName), onChange: () => onToggleRight(bookmark.id, rightName), disabled: isReadOnly || rightDef.isReadOnlyCheckbox, "aria-label": `${bookmark.name} - ${rightName}`, "data-testid": `user-rights-list-bookmark-${rightName}-checkbox` }) }, rightName)),
25
25
  /* @__PURE__ */ jsx("td", { children: !isReadOnly && /* @__PURE__ */ jsx(IconButton, { "data-testid": "user-rights-list-bookmark-close-button", color: "tertiary", onClick: () => onDelete(bookmark.id), icon: /* @__PURE__ */ jsx(SvgIconClose, {}), title: `${t("close")} ${bookmark.name}`, variant: "ghost" }) })
26
26
  ] });
27
27
  };
@@ -27,7 +27,7 @@ const UserRightsItem = ({
27
27
  return /* @__PURE__ */ jsxs("tr", { "data-testid": "user-rights-list-item-row", className: rowClassName, "aria-label": bookmarkName ? `${item.displayName} - ${bookmarkName}` : void 0, children: [
28
28
  /* @__PURE__ */ jsx("td", { children: /* @__PURE__ */ jsx(Avatar, { src: getAvatarURL(item.recipientId, item.recipientType), size: "xs", alt: item.displayName, variant: "circle" }) }),
29
29
  /* @__PURE__ */ jsx("td", { children: item.displayName }),
30
- Object.entries(resourceRights).map(([rightName]) => /* @__PURE__ */ jsx("td", { "data-testid": `user-rights-list-item-${rightName}-checkbox`, children: /* @__PURE__ */ jsx(Checkbox, { checked: item.permission.includes(rightName), onChange: () => handleChange(rightName), disabled: isReadOnly, "aria-label": `${item.displayName} - ${rightName}` }) }, rightName)),
30
+ Object.entries(resourceRights).map(([rightName, rightDef]) => /* @__PURE__ */ jsx("td", { "data-testid": `user-rights-list-item-${rightName}-checkbox`, children: /* @__PURE__ */ jsx(Checkbox, { checked: item.permission.includes(rightName), onChange: isReadOnly || rightDef.isReadOnlyCheckbox ? void 0 : () => handleChange(rightName), disabled: isReadOnly || rightDef.isReadOnlyCheckbox, "aria-label": `${item.displayName} - ${rightName}` }) }, rightName)),
31
31
  /* @__PURE__ */ jsx("td", { children: !isReadOnly && isDeletable && /* @__PURE__ */ jsx(IconButton, { "data-testid": "user-rights-list-close-button", color: "tertiary", onClick: () => handleDeleteItem(), icon: /* @__PURE__ */ jsx(SvgIconClose, {}), title: `${t("close")} ${item.displayName}`, variant: "ghost", type: "button" }) })
32
32
  ] });
33
33
  };
@@ -68,7 +68,7 @@ const UserRightsList = /* @__PURE__ */ forwardRef(({
68
68
  /* @__PURE__ */ jsx("thead", { children: /* @__PURE__ */ jsxs("tr", { children: [
69
69
  /* @__PURE__ */ jsx("th", { scope: "col", className: "w-32", children: /* @__PURE__ */ jsx(VisuallyHidden, { children: t("explorer.modal.share.avatar.shared.alt") }) }),
70
70
  /* @__PURE__ */ jsx("th", { scope: "col", children: /* @__PURE__ */ jsx(VisuallyHidden, { children: t("explorer.modal.share.search.placeholder") }) }),
71
- Object.entries(resourceRights).map(([rightName]) => /* @__PURE__ */ jsx("th", { children: rightName }, rightName)),
71
+ Object.entries(resourceRights).map(([rightName, rightDef]) => /* @__PURE__ */ jsx("th", { children: rightDef.displayName ?? rightName }, rightName)),
72
72
  !isReadOnly && /* @__PURE__ */ jsx("th", { scope: "col", children: /* @__PURE__ */ jsx(VisuallyHidden, { children: t("close") }) })
73
73
  ] }) }),
74
74
  /* @__PURE__ */ jsxs("tbody", { children: [
@@ -6,8 +6,13 @@ export type ResourceRightDefinition = {
6
6
  default: boolean;
7
7
  requires: ResourceRightName[];
8
8
  excludes: ResourceRightName[];
9
+ displayName?: string;
10
+ isReadOnlyCheckbox?: boolean;
9
11
  };
10
- export type ResourceRights = Record<ResourceRightName, ResourceRightDefinition>;
12
+ type AtLeastOne<T extends object> = Partial<T> & {
13
+ [K in keyof T]: Pick<T, K>;
14
+ }[keyof T];
15
+ export type ResourceRights = AtLeastOne<Record<ResourceRightName, ResourceRightDefinition>>;
11
16
  export interface BookmarkUser {
12
17
  id: string;
13
18
  displayName: string;
@@ -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>;
@@ -72,6 +72,8 @@ const useDropdown = (placement, extraTriggerKeyDownHandler, isTriggerHovered = !
72
72
  case "Space":
73
73
  if (!openOnSpace)
74
74
  break;
75
+ openDropdown(), flag = !0;
76
+ break;
75
77
  case "Enter":
76
78
  case "ArrowDown":
77
79
  case "Down":
@@ -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(), {
@@ -48,7 +48,7 @@ const EditorPreview = ({
48
48
  }), children: t("editor.preview.moreMedia", {
49
49
  mediaCount: medias.length - (index + 1)
50
50
  }) })
51
- ] }, media.url)) })
51
+ ] }, `${index}-${media.url}`)) })
52
52
  ] });
53
53
  };
54
54
  export {
@@ -5,7 +5,7 @@ const SvgIconCommunities = ({
5
5
  ...props
6
6
  }) => /* @__PURE__ */ jsxs("svg", { xmlns: "http://www.w3.org/2000/svg", width: "24", height: "24", viewBox: "0 0 50 50", "aria-hidden": "true", "aria-labelledby": titleId, ...props, children: [
7
7
  title ? /* @__PURE__ */ jsx("title", { id: titleId, children: title }) : null,
8
- /* @__PURE__ */ jsx("path", { d: "M25.807 33.165c4.726.17 8 3.997 8 8.5 0 .984-.795 1.775-1.775 1.775H18.977a1.774 1.774 0 0 1-1.776-1.775v-.201h-.004a8.303 8.303 0 0 1 8.61-8.299M8.61 24.451c4.726.17 8.001 3.997 8.001 8.5 0 .984-.796 1.776-1.775 1.776H1.776A1.774 1.774 0 0 1 0 32.95v-.201a8.303 8.303 0 0 1 8.61-8.299M41.61 24.006c4.499.162 8.001 3.996 8.001 8.5 0 .984-.796 1.775-1.775 1.775H34.779a1.774 1.774 0 0 1-1.775-1.775v-.201H33a8.303 8.303 0 0 1 8.61-8.3M25.142 20a5.143 5.143 0 1 1 0 10.285 5.143 5.143 0 0 1 0-10.285M8.308 11.627a5.141 5.141 0 1 1 0 10.282 5.141 5.141 0 0 1 0-10.282M41.691 11.627a5.142 5.142 0 1 1 .001 10.284 5.142 5.142 0 0 1 0-10.284M24.997 5.557a5.143 5.143 0 1 1 0 10.285 5.143 5.143 0 0 1 0-10.285" })
8
+ /* @__PURE__ */ jsx("path", { fill: "currentColor", d: "M25.807 33.165c4.726.17 8 3.997 8 8.5 0 .984-.795 1.775-1.775 1.775H18.977a1.774 1.774 0 0 1-1.776-1.775v-.201h-.004a8.303 8.303 0 0 1 8.61-8.299M8.61 24.451c4.726.17 8.001 3.997 8.001 8.5 0 .984-.796 1.776-1.775 1.776H1.776A1.774 1.774 0 0 1 0 32.95v-.201a8.303 8.303 0 0 1 8.61-8.299M41.61 24.006c4.499.162 8.001 3.996 8.001 8.5 0 .984-.796 1.775-1.775 1.775H34.779a1.774 1.774 0 0 1-1.775-1.775v-.201H33a8.303 8.303 0 0 1 8.61-8.3M25.142 20a5.143 5.143 0 1 1 0 10.285 5.143 5.143 0 0 1 0-10.285M8.308 11.627a5.141 5.141 0 1 1 0 10.282 5.141 5.141 0 0 1 0-10.282M41.691 11.627a5.142 5.142 0 1 1 .001 10.284 5.142 5.142 0 0 1 0-10.284M24.997 5.557a5.143 5.143 0 1 1 0 10.285 5.143 5.143 0 0 1 0-10.285" })
9
9
  ] });
10
10
  export {
11
11
  SvgIconCommunities as default
@@ -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 '../../../../node_modules/@tanstack/react-query';
3
+ import { UseMutationResult } from '@tanstack/react-query';
4
4
  export interface FormInputs {
5
5
  title: string;
6
6
  description: string;
@@ -157,7 +157,7 @@ const DEFAULT_INPUT_MAX_LENGTH = 60, DEFAULT_TEXTAREA_MAX_LENGTH = 400, Resource
157
157
  /* @__PURE__ */ jsx(Button, { form: formId, type: "submit", color: "primary", isLoading: isSubmitting, variant: "filled", disabled: !isValid || isSubmitting, children: isCreating ? customT.create ?? t("explorer.create") : customT.save ?? t("save") })
158
158
  ] }),
159
159
  /* @__PURE__ */ jsx(MediaLibrary, { appCode: application, ref: mediaLibraryRef, multiple: !1, visibility: "protected", ...mediaLibraryHandlers })
160
- ] }), document.getElementById("portal"));
160
+ ] }), document.getElementById("portal") || document.body);
161
161
  };
162
162
  export {
163
163
  ResourceModal
@@ -1,5 +1,5 @@
1
1
  import { UpdateParameters, UpdateResult } from '@edifice.io/client';
2
- import { UseMutationOptions, UseMutationResult } from '../../../../../node_modules/@tanstack/react-query';
2
+ import { UseMutationOptions, UseMutationResult } from '@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 '../../../../node_modules/@tanstack/react-query';
2
+ import { UseMutationResult } from '@tanstack/react-query';
3
3
  /**
4
4
  * Configuration options for sharing a resource
5
5
  *
@@ -118,21 +118,11 @@ interface ShareResourceProps {
118
118
  classNameSearchInput?: string;
119
119
  }
120
120
  /**
121
- * Ref interface exposed by ShareResources component
121
+ * Ref interface exposed by ShareResources component.
122
+ * Use useRef with this type and call ref.current?.handleShare() to trigger share programmatically.
122
123
  *
123
124
  * @interface ShareResourcesRef
124
125
  * @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
- * ```
136
126
  */
137
127
  export interface ShareResourcesRef {
138
128
  handleShare: (notify?: boolean) => void;
@@ -142,46 +132,7 @@ export interface ShareResourcesRef {
142
132
  *
143
133
  * A component for managing resource sharing permissions with users and groups.
144
134
  * Provides search functionality, bookmark management, and granular rights control.
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
- * ```
135
+ * Use forwardRef to get a ref with handleShare(). See ShareResourcesRef interface.
185
136
  *
186
137
  * @component
187
138
  * @forwardRef
@@ -1,5 +1,5 @@
1
1
  import { ID, UpdateParameters, UpdateResult } from '@edifice.io/client';
2
- import { UseMutationResult } from '../../../../../node_modules/@tanstack/react-query';
2
+ import { UseMutationResult } from '@tanstack/react-query';
3
3
  export type PublicationType = 'RESTRAINT' | 'IMMEDIATE' | undefined;
4
4
  export interface ShareBlogProps {
5
5
  resourceId: ID;
@@ -35,7 +35,8 @@ const useShareBookmark = ({
35
35
  ...shareRights,
36
36
  visibleBookmarks: [...shareRights.visibleBookmarks, {
37
37
  displayName: name,
38
- id: res.id
38
+ id: res.id,
39
+ notVisibleCount: 0
39
40
  }]
40
41
  }
41
42
  }), setBookmark((prev) => ({
@@ -1,5 +1,5 @@
1
1
  import { PutShareResponse, ShareRight } from '@edifice.io/client';
2
- import { UseMutationOptions, UseMutationResult } from '../../../../../node_modules/@tanstack/react-query';
2
+ import { UseMutationOptions, UseMutationResult } from '@tanstack/react-query';
3
3
  declare const useShareMutation: ({ application, options, }: {
4
4
  application: string;
5
5
  options?: UseMutationOptions<PutShareResponse, Error, {
@@ -1,6 +1,6 @@
1
1
  import { jsxs, jsx } from "react/jsx-runtime";
2
- import { useState } from "react";
3
- import { Stage } from "@pixi/react";
2
+ import { useState, useEffect, useRef, useCallback } from "react";
3
+ import * as PIXI from "pixi.js";
4
4
  import { useTranslation } from "react-i18next";
5
5
  import useImageEditor from "../hooks/useImageEditor.js";
6
6
  import ImageEditorToolbar from "./ImageEditorToolbar.js";
@@ -21,7 +21,11 @@ const ImageEditor = ({
21
21
  }) => {
22
22
  const {
23
23
  t
24
- } = useTranslation(), [currentOperation, setCurrentOperation] = useState(void 0), [isSaving, setSaving] = useState(!1), [altText, setAltText] = useState(altTextParam ?? ""), [legend, setLegend] = useState(legendParam ?? ""), [dirty, setDirty] = useState(!1), {
24
+ } = useTranslation(), [currentOperation, setCurrentOperation] = useState(void 0), [isSaving, setSaving] = useState(!1), [altText, setAltText] = useState(altTextParam ?? ""), [legend, setLegend] = useState(legendParam ?? ""), [dirty, setDirty] = useState(!1);
25
+ useEffect(() => {
26
+ setAltText(altTextParam ?? ""), setLegend(legendParam ?? ""), setDirty(!1);
27
+ }, [altTextParam, legendParam]);
28
+ const {
25
29
  toBlob,
26
30
  setApplication,
27
31
  startBlur,
@@ -36,7 +40,21 @@ const ImageEditor = ({
36
40
  loading
37
41
  } = useImageEditor({
38
42
  imageSrc
39
- }), stopAll = () => {
43
+ }), appRef = useRef(null), containerRef = useCallback((node) => {
44
+ if (node && !appRef.current) {
45
+ const app = new PIXI.Application();
46
+ appRef.current = app, app.init({
47
+ backgroundAlpha: 0,
48
+ resolution: 1,
49
+ preserveDrawingBuffer: !0
50
+ }).then(() => {
51
+ appRef.current === app && (node.appendChild(app.canvas), setApplication(app));
52
+ }).catch(() => {
53
+ appRef.current === app && (appRef.current = null);
54
+ });
55
+ }
56
+ !node && appRef.current && (appRef.current.destroy(!0), appRef.current = null);
57
+ }, [setApplication]), stopAll = () => {
40
58
  stopBlur(), stopCrop(currentOperation === "CROP"), stopResize(currentOperation === "RESIZE");
41
59
  }, handleSave = async () => {
42
60
  try {
@@ -83,12 +101,8 @@ const ImageEditor = ({
83
101
  /* @__PURE__ */ jsx(Modal.Body, { className: "d-flex flex-column align-items-center", children: /* @__PURE__ */ jsxs("div", { className: "d-flex flex-column gap-12 w-100 flex-grow-1", children: [
84
102
  /* @__PURE__ */ jsx(ImageEditorToolbar, { handle: handleOperation, historyCount }),
85
103
  /* @__PURE__ */ jsxs("div", { className: "position-relative d-flex flex-column align-items-center justify-content-center flex-grow-1 w-100 image-editor", children: [
86
- /* @__PURE__ */ jsx(Stage, { onMount: (app) => setApplication(app), options: {
87
- preserveDrawingBuffer: !0,
88
- backgroundAlpha: 0,
89
- resolution: 1
90
- } }),
91
- !!loading && /* @__PURE__ */ jsx("div", { className: "position-absolute top-0 start-0 bottom-0 end-0 m-10 d-flex align-items-center justify-content-center bg-black opacity-25", children: /* @__PURE__ */ jsx(LoadingScreen, {}) })
104
+ /* @__PURE__ */ jsx("div", { ref: containerRef, className: "d-flex justify-content-center w-100" }),
105
+ loading && /* @__PURE__ */ jsx("div", { className: "position-absolute top-0 start-0 bottom-0 end-0 m-10 d-flex align-items-center justify-content-center bg-black opacity-25", children: /* @__PURE__ */ jsx(LoadingScreen, {}) })
92
106
  ] }),
93
107
  /* @__PURE__ */ jsxs("div", { className: "d-flex flex-column flex-md-row m-10 gap-12 w-100", children: [
94
108
  /* @__PURE__ */ jsxs(FormControl, { id: "alt", className: "flex-grow-1", children: [
@@ -1,18 +1,20 @@
1
1
  import * as PIXI from 'pixi.js';
2
2
  /**
3
- * This function start the blur controler
3
+ * This function starts the blur controller:
4
4
  * - drawing cursor
5
5
  * - listening mouse move to move cursor
6
- * - listening
6
+ * - listening pointer events to apply blur
7
7
  *
8
- * @param application
9
- * @param param1
8
+ * @param application The PIXI.Application context
9
+ * @param spriteName The name of the sprite identifying the original image
10
10
  */
11
11
  export declare function start(application: PIXI.Application, { spriteName }: {
12
12
  spriteName: string;
13
13
  }): void;
14
14
  /**
15
- * This function remove cursor and all mouse event listeners
15
+ * This function removes cursor and all mouse event listeners.
16
+ * The blur layer is kept on stage so it gets captured by toBlob/generateTexture
17
+ * when the image is saved or another operation is applied.
16
18
  *
17
19
  * @param application the PIXI.Application context
18
20
  */