@edifice.io/react 2.6.9-develop-integration.20261015002252 → 2.6.9-develop-integration.20261015175127

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.
@@ -2,8 +2,6 @@ import { GoogleDriveDocument, ID } from '@edifice.io/client';
2
2
  import { TreeItem } from '../../components/Tree/types';
3
3
  export type GoogleDriveFolderNode = TreeItem & {
4
4
  files?: GoogleDriveDocument[];
5
- /** False when the folder's content can't be copied to the workspace. */
6
- canCopyToWorkspace?: boolean;
7
5
  };
8
6
  /**
9
7
  * Which documents a search browses from its root: the user's own Drive, or
@@ -11,23 +11,21 @@ function useGoogleDriveSearch(rootId, rootName, userId, filter = "mydrive") {
11
11
  setRoot((prev) => {
12
12
  const node = findNodeById(prev, folderId);
13
13
  if (!node) return prev;
14
- const restrict = (doc) => node.canCopyToWorkspace === !1 ? {
15
- ...doc,
16
- canCopyToWorkspace: !1
17
- } : doc, children = subfolders.map(restrict).map((f) => {
14
+ const children = subfolders.map((f) => {
18
15
  var _a;
19
- return {
20
- // Keep an already loaded subfolder's own content.
21
- ...(_a = node.children) == null ? void 0 : _a.find((c) => c.id === f.id),
16
+ const existing = (_a = node.children) == null ? void 0 : _a.find((c) => c.id === f.id);
17
+ return existing ? {
18
+ ...existing,
19
+ name: f.name
20
+ } : {
22
21
  id: f.id,
23
- name: f.name,
24
- canCopyToWorkspace: f.canCopyToWorkspace
22
+ name: f.name
25
23
  };
26
24
  });
27
25
  return modifyNode(prev, (n) => n.id === node.id ? {
28
26
  ...n,
29
27
  children,
30
- files: files.map(restrict)
28
+ files
31
29
  } : n);
32
30
  });
33
31
  }, []), queryClient = useQueryClient(), [loadError, setLoadError] = useState(null), loadContent = useCallback(async (folderId) => {
@@ -40,7 +38,7 @@ function useGoogleDriveSearch(rootId, rootName, userId, filter = "mydrive") {
40
38
  staleTime: 6e4
41
39
  }), subfolders = [], files = [];
42
40
  payload.filter((doc) => doc.id !== parentId).forEach((doc) => {
43
- doc.isFolder ? subfolders.push(doc) : files.push(doc);
41
+ doc.isFolder ? doc.canCopyToWorkspace && subfolders.push(doc) : files.push(doc);
44
42
  }), setLoadError(null), updateFolder(folderId, subfolders, files);
45
43
  } catch (error) {
46
44
  setLoadError(error);
@@ -8,7 +8,7 @@ import SvgIconSortAscendingLetters from "../../icons/components/IconSortAscendin
8
8
  import SvgIconSortDescendingLetters from "../../icons/components/IconSortDescendingLetters.js";
9
9
  import SvgIconSortTime from "../../icons/components/IconSortTime.js";
10
10
  import illuError from "@edifice.io/bootstrap/dist/images/emptyscreen/illu-error.svg";
11
- import illuNoContentInFolder from "@edifice.io/bootstrap/dist/images/emptyscreen/illu-no-content-in-folder.svg";
11
+ import illuConnectionLost from "@edifice.io/bootstrap/dist/images/emptyscreen/illu-connection-lost.svg";
12
12
  import illuTrash from "@edifice.io/bootstrap/dist/images/emptyscreen/illu-trash.svg";
13
13
  import useUser from "../../../hooks/useUser/useUser.js";
14
14
  import useToast from "../../../hooks/useToast/useToast.js";
@@ -83,7 +83,7 @@ const Nextcloud = ({
83
83
  /* @__PURE__ */ jsx(Button, { onClick: () => refetchAuthStatus(), children: t("retry") })
84
84
  ] }) : needsAuth ? /* @__PURE__ */ jsxs(Flex, { direction: "column", gap: "12", className: "h-full w-100", justify: "center", align: "center", children: [
85
85
  /* @__PURE__ */ jsxs(Flex, { direction: "column", gap: "8", justify: "center", align: "center", children: [
86
- /* @__PURE__ */ jsx(EmptyScreen, { imageSrc: illuNoContentInFolder }),
86
+ /* @__PURE__ */ jsx(EmptyScreen, { imageSrc: illuConnectionLost }),
87
87
  /* @__PURE__ */ jsx("h2", { className: "h2 text-secondary mb-8", children: t("nextcloud.auth.title") }),
88
88
  /* @__PURE__ */ jsx("div", { className: "text", children: t("nextcloud.auth.description") })
89
89
  ] }),
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@edifice.io/react",
3
- "version": "2.6.9-develop-integration.20261015002252",
3
+ "version": "2.6.9-develop-integration.20261015175127",
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.9-develop-integration.20261015002252",
144
- "@edifice.io/tiptap-extensions": "2.6.9-develop-integration.20261015002252",
145
- "@edifice.io/utilities": "2.6.9-develop-integration.20261015002252"
143
+ "@edifice.io/bootstrap": "2.6.9-develop-integration.20261015175127",
144
+ "@edifice.io/tiptap-extensions": "2.6.9-develop-integration.20261015175127",
145
+ "@edifice.io/utilities": "2.6.9-develop-integration.20261015175127"
146
146
  },
147
147
  "devDependencies": {
148
148
  "@babel/plugin-transform-react-pure-annotations": "7.27.1",
@@ -173,8 +173,8 @@
173
173
  "vite": "5.4.14",
174
174
  "vite-plugin-dts": "4.5.4",
175
175
  "vite-tsconfig-paths": "5.1.4",
176
- "@edifice.io/client": "2.6.9-develop-integration.20261015002252",
177
- "@edifice.io/config": "2.6.9-develop-integration.20261015002252"
176
+ "@edifice.io/config": "2.6.9-develop-integration.20261015175127",
177
+ "@edifice.io/client": "2.6.9-develop-integration.20261015175127"
178
178
  },
179
179
  "peerDependencies": {
180
180
  "@react-spring/web": "9.7.5",