@dao42/d42paas-front 0.9.1 → 0.9.2

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.
@@ -19202,7 +19202,7 @@ class DaoPaaS {
19202
19202
  return daoStore.getState();
19203
19203
  }
19204
19204
  async init() {
19205
- const SDK_VERSION = "0.9.0";
19205
+ const SDK_VERSION = "0.9.1";
19206
19206
  const initClassDIV = document.createElement("div");
19207
19207
  initClassDIV.className = "init-class";
19208
19208
  document.body.appendChild(initClassDIV);
@@ -160852,7 +160852,7 @@ const FileTree = ({
160852
160852
  root: "",
160853
160853
  path: ""
160854
160854
  });
160855
- const channel = daoStore.getState().channel;
160855
+ const channel = daoStore((state) => state.channel);
160856
160856
  react.exports.useEffect(() => {
160857
160857
  if (daoStore.getState().amDoing === "replaying") {
160858
160858
  setExpandedItems([]);
@@ -160872,7 +160872,7 @@ const FileTree = ({
160872
160872
  }, [fileTree, oldFileTree, fileTreeIgnore, fileTree == null ? void 0 : fileTree.children.length]);
160873
160873
  react.exports.useEffect(() => {
160874
160874
  ["uploadFolder", "uploadFile"].forEach((eventName) => {
160875
- channel.on(eventName, async ({
160875
+ channel == null ? void 0 : channel.on(eventName, async ({
160876
160876
  path,
160877
160877
  status: status2
160878
160878
  }) => {
@@ -160914,12 +160914,12 @@ const FileTree = ({
160914
160914
  loadingStore.getState().setModuleLoading({
160915
160915
  Editor: true
160916
160916
  });
160917
- channel.send("fileContent", crdt);
160917
+ channel == null ? void 0 : channel.send("fileContent", crdt);
160918
160918
  } else {
160919
- channel.send("fileDir", crdt);
160919
+ channel == null ? void 0 : channel.send("fileDir", crdt);
160920
160920
  }
160921
160921
  if (currentAgentUser.followingAgentUserId) {
160922
- daoStore.getState().channel.unFollowingAgentUser();
160922
+ channel == null ? void 0 : channel.unFollowingAgentUser();
160923
160923
  }
160924
160924
  }
160925
160925
  }
@@ -160990,7 +160990,7 @@ const FileTree = ({
160990
160990
  setFileLoading((prev2) => __spreadProps(__spreadValues({}, prev2), {
160991
160991
  [path]: true
160992
160992
  }));
160993
- channel.send("uploadFile", {
160993
+ channel == null ? void 0 : channel.send("uploadFile", {
160994
160994
  path,
160995
160995
  file: await getArrayBufferFromFile(file)
160996
160996
  });
@@ -161043,7 +161043,7 @@ const FileTree = ({
161043
161043
  setFileLoading((prev2) => __spreadProps(__spreadValues({}, prev2), {
161044
161044
  [path]: true
161045
161045
  }));
161046
- channel.send("uploadFolder", {
161046
+ channel == null ? void 0 : channel.send("uploadFolder", {
161047
161047
  folderRoot: path,
161048
161048
  files
161049
161049
  });
@@ -161208,12 +161208,12 @@ const FileTree = ({
161208
161208
  payload.newPath = newPath.join("/");
161209
161209
  }
161210
161210
  payload.isDir = !!treeData[tempFileOrFolder.current.path].hasChildren;
161211
- channel.send("fileTreeOp", payload);
161211
+ channel == null ? void 0 : channel.send("fileTreeOp", payload);
161212
161212
  clearTempFileOrFolder();
161213
161213
  };
161214
161214
  const handleDeleteFileFolder = (path) => {
161215
161215
  EditorData.setFileTreeStack(EditorData.fileTreeStack.filter((file) => file.path !== path));
161216
- channel.send("fileTreeOp", {
161216
+ channel == null ? void 0 : channel.send("fileTreeOp", {
161217
161217
  action: "DELETE",
161218
161218
  path
161219
161219
  });
@@ -161241,7 +161241,7 @@ const FileTree = ({
161241
161241
  };
161242
161242
  const isDir = (_c2 = newTreeData[path]) == null ? void 0 : _c2.hasChildren;
161243
161243
  const eventName = isDir ? "fileDir" : "fileTreeOp";
161244
- channel.send(eventName, payload);
161244
+ channel == null ? void 0 : channel.send(eventName, payload);
161245
161245
  setFileOrFolderName("");
161246
161246
  }
161247
161247
  clearTempFileOrFolder();
@@ -161373,7 +161373,7 @@ const FileTree = ({
161373
161373
  const parentItem = target.parentItem;
161374
161374
  if (parentItem) {
161375
161375
  const path = `${parentItem}/${suffix}`;
161376
- channel.send("moveFile", {
161376
+ channel == null ? void 0 : channel.send("moveFile", {
161377
161377
  path: treeNode.index,
161378
161378
  newPath: path
161379
161379
  });
@@ -161434,7 +161434,7 @@ const FileTree = ({
161434
161434
  fontColor,
161435
161435
  treeItemHeight,
161436
161436
  onClick: () => {
161437
- daoStore.getState().channel.followingFocusComponent("Tree");
161437
+ channel == null ? void 0 : channel.followingFocusComponent("Tree");
161438
161438
  },
161439
161439
  children: [/* @__PURE__ */ jsx("input", {
161440
161440
  id: "manual-upload-file",