@edifice.io/react 2.6.12-develop-integration-crna.20261104164618 → 2.6.12-develop-integration.20261104185123

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 (60) hide show
  1. package/dist/components/Dropdown/Dropdown.js +14 -19
  2. package/dist/components/Dropdown/DropdownContext.d.ts +0 -3
  3. package/dist/components/Dropdown/DropdownMenuGroup.js +6 -23
  4. package/dist/components/Dropdown/DropdownSearchInput.js +8 -16
  5. package/dist/components/Dropdown/DropdownTrigger.js +8 -24
  6. package/dist/components/Dropdown/useDropdownItemFilter.js +2 -2
  7. package/dist/components/Select/Select.d.ts +1 -14
  8. package/dist/components/Select/Select.js +5 -11
  9. package/dist/homepage.js +28 -24
  10. package/dist/hooks/index.d.ts +1 -0
  11. package/dist/hooks/useDropdown/useDropdown.d.ts +0 -1
  12. package/dist/hooks/useDropdown/useDropdown.js +7 -18
  13. package/dist/hooks/useGoogleDriveSearch/index.d.ts +1 -0
  14. package/dist/hooks/useGoogleDriveSearch/useGoogleDriveSearch.d.ts +19 -0
  15. package/dist/hooks/useGoogleDriveSearch/useGoogleDriveSearch.js +60 -0
  16. package/dist/hooks/useNextcloudSearch/useNextcloudSearch.d.ts +1 -1
  17. package/dist/hooks/useNextcloudSearch/useNextcloudSearch.js +2 -2
  18. package/dist/icons-apps.js +258 -254
  19. package/dist/index.js +198 -194
  20. package/dist/modules/homepage/components/AlloRegion/AlloRegion.d.ts +11 -0
  21. package/dist/modules/homepage/components/AlloRegion/AlloRegion.js +32 -0
  22. package/dist/modules/homepage/components/AlloRegion/AlloRegionContainer.d.ts +4 -0
  23. package/dist/modules/homepage/components/AlloRegion/AlloRegionContainer.js +10 -0
  24. package/dist/modules/homepage/components/AlloRegion/index.d.ts +3 -0
  25. package/dist/modules/homepage/components/Favorites/Favorites.js +4 -1
  26. package/dist/modules/homepage/components/Notifications/components/CommonNotificationItem.js +9 -9
  27. package/dist/modules/homepage/components/Notifications/components/notificationAdapter.d.ts +2 -1
  28. package/dist/modules/homepage/components/Notifications/components/notificationAdapter.js +2 -2
  29. package/dist/modules/homepage/components/index.d.ts +1 -0
  30. package/dist/modules/icons/components/apps/IconAlloregion.d.ts +7 -0
  31. package/dist/modules/icons/components/apps/IconAlloregion.js +17 -0
  32. package/dist/modules/icons/components/apps/IconElea.d.ts +7 -0
  33. package/dist/modules/icons/components/apps/IconElea.js +23 -0
  34. package/dist/modules/icons/components/apps/index.d.ts +2 -0
  35. package/dist/modules/multimedia/FileCard/GoogleDriveFileCard.d.ts +25 -0
  36. package/dist/modules/multimedia/FileCard/GoogleDriveFileCard.js +102 -0
  37. package/dist/modules/multimedia/FileCard/index.d.ts +2 -0
  38. package/dist/modules/multimedia/GoogleDrive/GoogleDrive.d.ts +24 -0
  39. package/dist/modules/multimedia/GoogleDrive/GoogleDrive.js +103 -0
  40. package/dist/modules/multimedia/GoogleDrive/index.d.ts +2 -0
  41. package/dist/modules/multimedia/Linker/InternalLinker/InternalLinker.d.ts +7 -1
  42. package/dist/modules/multimedia/Linker/InternalLinker/InternalLinker.js +2 -0
  43. package/dist/modules/multimedia/MediaLibrary/MediaLibrary.js +16 -5
  44. package/dist/modules/multimedia/MediaLibrary/innertabs/GoogleDrive.d.ts +1 -0
  45. package/dist/modules/multimedia/MediaLibrary/innertabs/GoogleDrive.js +61 -0
  46. package/dist/modules/multimedia/MediaLibrary/innertabs/index.d.ts +1 -0
  47. package/dist/modules/multimedia/MediaLibrary/innertabs/index.js +2 -0
  48. package/dist/modules/multimedia/Nextcloud/Nextcloud.js +19 -7
  49. package/dist/modules/multimedia/index.d.ts +1 -1
  50. package/dist/multimedia.js +26 -24
  51. package/package.json +6 -6
  52. package/dist/components/Dropdown/useMatchRegistry.d.ts +0 -5
  53. package/dist/components/Dropdown/useMatchRegistry.js +0 -20
  54. package/dist/modules/multimedia/Nextcloud/NextcloudLogin.d.ts +0 -12
  55. package/dist/modules/multimedia/Nextcloud/NextcloudLogin.js +0 -33
  56. package/dist/modules/multimedia/NextcloudFolders/NextcloudFolders.d.ts +0 -12
  57. package/dist/modules/multimedia/NextcloudFolders/NextcloudFolders.js +0 -51
  58. package/dist/modules/multimedia/NextcloudFolders/components/NewFolderForm.d.ts +0 -16
  59. package/dist/modules/multimedia/NextcloudFolders/components/NewFolderForm.js +0 -51
  60. package/dist/modules/multimedia/NextcloudFolders/index.d.ts +0 -1
@@ -5,8 +5,8 @@ export * from './ImagePicker';
5
5
  export * from './FileCard';
6
6
  export * from './Linker';
7
7
  export * from './MediaLibrary';
8
+ export * from './GoogleDrive';
8
9
  export * from './Nextcloud';
9
- export * from './NextcloudFolders';
10
10
  export * from './UploadCard';
11
11
  export * from './VideoEmbed';
12
12
  export * from './VideoRecorder';
@@ -1,18 +1,19 @@
1
1
  import { default as default2 } from "./modules/multimedia/AudioRecorder/AudioRecorder.js";
2
2
  import { default as default3 } from "./modules/multimedia/Embed/Embed.js";
3
3
  import { default as default4 } from "./modules/multimedia/FileCard/FileCard.js";
4
- import { default as default5 } from "./modules/multimedia/ImageEditor/components/ImageEditor.js";
5
- import { default as default6 } from "./modules/multimedia/ImagePicker/ImagePicker.js";
6
- import { default as default7 } from "./modules/multimedia/MediaLibrary/MediaLibrary.js";
7
- import { default as default8 } from "./modules/multimedia/Nextcloud/Nextcloud.js";
8
- import { default as default9 } from "./modules/multimedia/FileCard/NextcloudFileCard.js";
9
- import { default as default10 } from "./modules/multimedia/NextcloudFolders/NextcloudFolders.js";
10
- import { default as default11 } from "./modules/multimedia/UploadCard/UploadCard.js";
11
- import { default as default12 } from "./modules/multimedia/UploadFiles/UploadFiles.js";
12
- import { default as default13 } from "./modules/multimedia/VideoEmbed/VideoEmbed.js";
13
- import { default as default14 } from "./modules/multimedia/VideoRecorder/VideoRecorder.js";
14
- import { default as default15 } from "./modules/multimedia/Workspace/Workspace.js";
15
- import { default as default16 } from "./modules/multimedia/WorkspaceFolders/WorkspaceFolders.js";
4
+ import { default as default5 } from "./modules/multimedia/GoogleDrive/GoogleDrive.js";
5
+ import { default as default6 } from "./modules/multimedia/FileCard/GoogleDriveFileCard.js";
6
+ import { default as default7 } from "./modules/multimedia/ImageEditor/components/ImageEditor.js";
7
+ import { default as default8 } from "./modules/multimedia/ImagePicker/ImagePicker.js";
8
+ import { default as default9 } from "./modules/multimedia/MediaLibrary/MediaLibrary.js";
9
+ import { default as default10 } from "./modules/multimedia/Nextcloud/Nextcloud.js";
10
+ import { default as default11 } from "./modules/multimedia/FileCard/NextcloudFileCard.js";
11
+ import { default as default12 } from "./modules/multimedia/UploadCard/UploadCard.js";
12
+ import { default as default13 } from "./modules/multimedia/UploadFiles/UploadFiles.js";
13
+ import { default as default14 } from "./modules/multimedia/VideoEmbed/VideoEmbed.js";
14
+ import { default as default15 } from "./modules/multimedia/VideoRecorder/VideoRecorder.js";
15
+ import { default as default16 } from "./modules/multimedia/Workspace/Workspace.js";
16
+ import { default as default17 } from "./modules/multimedia/WorkspaceFolders/WorkspaceFolders.js";
16
17
  import { ExternalLinker } from "./modules/multimedia/Linker/ExternalLinker/ExternalLinker.js";
17
18
  import { InternalLinker } from "./modules/multimedia/Linker/InternalLinker/InternalLinker.js";
18
19
  import { Upload } from "./modules/multimedia/MediaLibrary/innertabs/Upload.js";
@@ -21,18 +22,19 @@ export {
21
22
  default3 as Embed,
22
23
  ExternalLinker,
23
24
  default4 as FileCard,
24
- default5 as ImageEditor,
25
- default6 as ImagePicker,
25
+ default5 as GoogleDrive,
26
+ default6 as GoogleDriveFileCard,
27
+ default7 as ImageEditor,
28
+ default8 as ImagePicker,
26
29
  InternalLinker,
27
- default7 as MediaLibrary,
28
- default8 as Nextcloud,
29
- default9 as NextcloudFileCard,
30
- default10 as NextcloudFolders,
30
+ default9 as MediaLibrary,
31
+ default10 as Nextcloud,
32
+ default11 as NextcloudFileCard,
31
33
  Upload,
32
- default11 as UploadCard,
33
- default12 as UploadFiles,
34
- default13 as VideoEmbed,
35
- default14 as VideoRecorder,
36
- default15 as Workspace,
37
- default16 as WorkspaceFolders
34
+ default12 as UploadCard,
35
+ default13 as UploadFiles,
36
+ default14 as VideoEmbed,
37
+ default15 as VideoRecorder,
38
+ default16 as Workspace,
39
+ default17 as WorkspaceFolders
38
40
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@edifice.io/react",
3
- "version": "2.6.12-develop-integration-crna.20261104164618",
3
+ "version": "2.6.12-develop-integration.20261104185123",
4
4
  "description": "Edifice React Library",
5
5
  "keywords": [
6
6
  "react",
@@ -140,9 +140,9 @@
140
140
  "swiper": "10.1.0",
141
141
  "ua-parser-js": "1.0.36",
142
142
  "zustand": "4.5.7",
143
- "@edifice.io/bootstrap": "2.6.12-develop-integration-crna.20261104164618",
144
- "@edifice.io/tiptap-extensions": "2.6.12-develop-integration-crna.20261104164618",
145
- "@edifice.io/utilities": "2.6.12-develop-integration-crna.20261104164618"
143
+ "@edifice.io/bootstrap": "2.6.12-develop-integration.20261104185123",
144
+ "@edifice.io/tiptap-extensions": "2.6.12-develop-integration.20261104185123",
145
+ "@edifice.io/utilities": "2.6.12-develop-integration.20261104185123"
146
146
  },
147
147
  "devDependencies": {
148
148
  "@babel/plugin-transform-react-pure-annotations": "7.27.1",
@@ -174,8 +174,8 @@
174
174
  "vite": "5.4.14",
175
175
  "vite-plugin-dts": "4.5.4",
176
176
  "vite-tsconfig-paths": "5.1.4",
177
- "@edifice.io/client": "2.6.12-develop-integration-crna.20261104164618",
178
- "@edifice.io/config": "2.6.12-develop-integration-crna.20261104164618"
177
+ "@edifice.io/client": "2.6.12-develop-integration.20261104185123",
178
+ "@edifice.io/config": "2.6.12-develop-integration.20261104185123"
179
179
  },
180
180
  "peerDependencies": {
181
181
  "@react-spring/web": "9.7.5",
@@ -1,5 +0,0 @@
1
- export declare const useMatchRegistry: () => {
2
- hasMatches: boolean;
3
- reportMatch: (id: string, isMatch: boolean) => void;
4
- unregisterMatch: (id: string) => void;
5
- };
@@ -1,20 +0,0 @@
1
- import { useState, useRef, useCallback } from "react";
2
- const useMatchRegistry = () => {
3
- const [hasMatches, setHasMatches] = useState(!0), matchMapRef = useRef(/* @__PURE__ */ new Map()), reportMatch = useCallback((id, isMatch) => {
4
- matchMapRef.current.set(id, isMatch);
5
- const next = [...matchMapRef.current.values()].some(Boolean);
6
- setHasMatches((prev) => prev !== next ? next : prev);
7
- }, []), unregisterMatch = useCallback((id) => {
8
- matchMapRef.current.delete(id);
9
- const next = matchMapRef.current.size === 0 || [...matchMapRef.current.values()].some(Boolean);
10
- setHasMatches((prev) => prev !== next ? next : prev);
11
- }, []);
12
- return {
13
- hasMatches,
14
- reportMatch,
15
- unregisterMatch
16
- };
17
- };
18
- export {
19
- useMatchRegistry
20
- };
@@ -1,12 +0,0 @@
1
- export interface NextcloudLoginProps {
2
- /**
3
- * Called once the user is connected through the OAuth2 popup.
4
- */
5
- onConnected: () => void;
6
- /**
7
- * Replaces the default description, which is about inserting Nextcloud files.
8
- */
9
- description?: string;
10
- }
11
- declare const NextcloudLogin: ({ onConnected, description }: NextcloudLoginProps) => import("react/jsx-runtime").JSX.Element;
12
- export default NextcloudLogin;
@@ -1,33 +0,0 @@
1
- import { jsxs, jsx } from "react/jsx-runtime";
2
- import { useRef, useEffect } from "react";
3
- import { useTranslation } from "react-i18next";
4
- import illuConnectionLost from "@edifice.io/bootstrap/dist/images/emptyscreen/illu-connection-lost.svg";
5
- import useToast from "../../../hooks/useToast/useToast.js";
6
- import Flex from "../../../components/Flex/Flex.js";
7
- import EmptyScreen from "../../../components/EmptyScreen/EmptyScreen.js";
8
- import Button from "../../../components/Button/Button.js";
9
- const NextcloudLogin = ({
10
- onConnected,
11
- description
12
- }) => {
13
- const {
14
- t
15
- } = useTranslation(), toast = useToast(), popupRef = useRef(null);
16
- useEffect(() => {
17
- function handleMessage(event) {
18
- var _a;
19
- event.origin !== window.location.origin || ((_a = event.data) == null ? void 0 : _a.type) !== "nextcloud-connected" || (popupRef.current && !popupRef.current.closed && popupRef.current.close(), onConnected());
20
- }
21
- return window.addEventListener("message", handleMessage), () => window.removeEventListener("message", handleMessage);
22
- }, [onConnected]);
23
- const openLoginPopup = () => {
24
- popupRef.current = window.open(`${window.location.origin}/nextcloud/user/oauth2/init`, "", "popup, height=600, width=400"), popupRef.current || toast.error(t("nextcloud.auth.popupBlocked"));
25
- };
26
- return /* @__PURE__ */ jsxs(Flex, { direction: "column", gap: "12", className: "h-full w-100", justify: "center", align: "center", children: [
27
- /* @__PURE__ */ jsx(EmptyScreen, { imageSrc: illuConnectionLost, title: t("nextcloud.auth.title"), text: description ?? t("nextcloud.auth.description") }),
28
- /* @__PURE__ */ jsx(Button, { onClick: openLoginPopup, children: t("nextcloud.auth.connect") })
29
- ] });
30
- };
31
- export {
32
- NextcloudLogin as default
33
- };
@@ -1,12 +0,0 @@
1
- interface NextcloudFoldersProps {
2
- /**
3
- * Function called with the path of the selected folder, relative to the user's Nextcloud root
4
- */
5
- onFolderSelected: (path: string) => void;
6
- /**
7
- * Description of the login screen shown when the user is not connected to Nextcloud
8
- */
9
- loginDescription?: string;
10
- }
11
- export default function NextcloudFolders({ onFolderSelected, loginDescription, }: NextcloudFoldersProps): import("react/jsx-runtime").JSX.Element;
12
- export {};
@@ -1,51 +0,0 @@
1
- import { jsx, jsxs } from "react/jsx-runtime";
2
- import { useState, useEffect } from "react";
3
- import { useTranslation } from "react-i18next";
4
- import SvgIconFolderAdd from "../../icons/components/IconFolderAdd.js";
5
- import NextcloudLogin from "../Nextcloud/NextcloudLogin.js";
6
- import NewFolderForm from "./components/NewFolderForm.js";
7
- import illuError from "@edifice.io/bootstrap/dist/images/emptyscreen/illu-error.svg";
8
- import useUser from "../../../hooks/useUser/useUser.js";
9
- import useNextcloudSearch from "../../../hooks/useNextcloudSearch/useNextcloudSearch.js";
10
- import Loading from "../../../components/Loading/Loading.js";
11
- import Flex from "../../../components/Flex/Flex.js";
12
- import EmptyScreen from "../../../components/EmptyScreen/EmptyScreen.js";
13
- import Button from "../../../components/Button/Button.js";
14
- import Tree from "../../../components/Tree/components/Tree.js";
15
- const ROOT_ID = "root", ROOT_PATH = "/";
16
- function NextcloudFolders({
17
- onFolderSelected,
18
- loginDescription
19
- }) {
20
- const {
21
- t
22
- } = useTranslation(), {
23
- user
24
- } = useUser(), {
25
- root,
26
- needsAuth,
27
- isCheckingAuth,
28
- isAuthError,
29
- refetchAuthStatus,
30
- loadContent,
31
- loadError
32
- } = useNextcloudSearch(ROOT_ID, t("nextcloud"), user == null ? void 0 : user.userId), [selectedFolderId, setSelectedFolderId] = useState(), [showNewFolderForm, setShowNewFolderForm] = useState(!1), selectedPath = selectedFolderId === ROOT_ID ? ROOT_PATH : selectedFolderId;
33
- useEffect(() => {
34
- needsAuth || loadContent(ROOT_ID);
35
- }, [loadContent, needsAuth]);
36
- const handleFolderSelected = (folderId) => {
37
- setShowNewFolderForm(!1), setSelectedFolderId(folderId), loadContent(folderId), onFolderSelected(folderId === ROOT_ID ? ROOT_PATH : folderId);
38
- }, handleFolderCreated = (path) => {
39
- loadContent(selectedFolderId, !0), setSelectedFolderId(path), onFolderSelected(path);
40
- }, handleRetry = () => isAuthError ? refetchAuthStatus() : loadContent(selectedFolderId ?? ROOT_ID, !0);
41
- return isCheckingAuth ? /* @__PURE__ */ jsx(Loading, { isLoading: !0, className: "justify-content-center" }) : isAuthError || loadError ? /* @__PURE__ */ jsxs(Flex, { direction: "column", gap: "12", align: "center", children: [
42
- /* @__PURE__ */ jsx(EmptyScreen, { imageSrc: illuError, title: t("nextcloud.error.title"), text: t("nextcloud.error.description") }),
43
- /* @__PURE__ */ jsx(Button, { onClick: handleRetry, children: t("retry") })
44
- ] }) : needsAuth ? /* @__PURE__ */ jsx(NextcloudLogin, { onConnected: refetchAuthStatus, description: loginDescription }) : /* @__PURE__ */ jsxs("div", { className: "border border-gray-400 rounded", children: [
45
- /* @__PURE__ */ jsx("div", { className: "p-12", children: /* @__PURE__ */ jsx(Tree, { nodes: root, selectedNodeId: selectedFolderId, showIcon: !0, onTreeItemClick: handleFolderSelected, onTreeItemUnfold: (nodeId) => loadContent(nodeId) }) }),
46
- /* @__PURE__ */ jsx("div", { className: "d-flex justify-content-end border-top border-gray-400 px-8 py-4", children: showNewFolderForm && selectedPath ? /* @__PURE__ */ jsx(NewFolderForm, { parentPath: selectedPath, onClose: () => setShowNewFolderForm(!1), onFolderCreated: handleFolderCreated }) : /* @__PURE__ */ jsx(Button, { color: "primary", variant: "ghost", leftIcon: /* @__PURE__ */ jsx(SvgIconFolderAdd, {}), onClick: () => setShowNewFolderForm(!0), disabled: !selectedPath, children: t("workspace.folder.create") }) })
47
- ] });
48
- }
49
- export {
50
- NextcloudFolders as default
51
- };
@@ -1,16 +0,0 @@
1
- type Props = {
2
- /**
3
- * Path of the folder in which the new folder is created
4
- */
5
- parentPath: string;
6
- /**
7
- * Function called when the form is closed
8
- */
9
- onClose: () => void;
10
- /**
11
- * Function called with the path of the created folder
12
- */
13
- onFolderCreated: (path: string) => void;
14
- };
15
- export default function NewFolderForm({ parentPath, onClose, onFolderCreated, }: Props): import("react/jsx-runtime").JSX.Element;
16
- export {};
@@ -1,51 +0,0 @@
1
- import { jsx, jsxs } from "react/jsx-runtime";
2
- import { useRef, useEffect } from "react";
3
- import { odeServices } from "@edifice.io/client";
4
- import { useMutation } from "@tanstack/react-query";
5
- import { useTranslation } from "react-i18next";
6
- import SvgIconSave from "../../../icons/components/IconSave.js";
7
- import useUser from "../../../../hooks/useUser/useUser.js";
8
- import useToast from "../../../../hooks/useToast/useToast.js";
9
- import FormControl from "../../../../components/Form/FormControl.js";
10
- import IconButton from "../../../../components/Button/IconButton.js";
11
- function NewFolderForm({
12
- parentPath,
13
- onClose,
14
- onFolderCreated
15
- }) {
16
- const {
17
- t
18
- } = useTranslation(), {
19
- user
20
- } = useUser(), toast = useToast(), refInputName = useRef(null), createFolderMutation = useMutation({
21
- mutationFn: ({
22
- userId,
23
- path
24
- }) => odeServices.nextcloud().createFolder(userId, path)
25
- });
26
- return useEffect(() => {
27
- var _a;
28
- (_a = refInputName.current) == null || _a.focus();
29
- }, []), /* @__PURE__ */ jsx("form", { id: "modalNextcloudNewFolderForm", onSubmit: (event) => {
30
- var _a;
31
- event.preventDefault();
32
- const folderName = (_a = refInputName.current) == null ? void 0 : _a.value.trim().replace(/\//g, "-");
33
- if (!folderName || !user) return;
34
- const path = `${parentPath.replace(/\/?$/, "/")}${folderName}/`;
35
- createFolderMutation.mutate({
36
- userId: user.userId,
37
- path
38
- }, {
39
- onSuccess: () => {
40
- onFolderCreated(path), onClose();
41
- },
42
- onError: () => toast.error(t("e400"))
43
- });
44
- }, children: /* @__PURE__ */ jsxs("div", { className: "d-flex gap-4 flex-row", children: [
45
- /* @__PURE__ */ jsx(FormControl, { id: "modalNextcloudNewFolderForm", isRequired: !0, children: /* @__PURE__ */ jsx(FormControl.Input, { ref: refInputName, size: "md", type: "text", placeholder: t("workspace.folder.new.placeholder") }) }),
46
- /* @__PURE__ */ jsx(IconButton, { type: "submit", color: "primary", variant: "ghost", title: t("workspace.folder.new.create"), disabled: createFolderMutation.isPending, isLoading: createFolderMutation.isPending, icon: /* @__PURE__ */ jsx(SvgIconSave, {}) })
47
- ] }) });
48
- }
49
- export {
50
- NewFolderForm as default
51
- };
@@ -1 +0,0 @@
1
- export { default as NextcloudFolders } from './NextcloudFolders';