@dao42/d42paas-front 0.5.45 → 0.5.47
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.
- package/dist/DaoPaaS.es.js +25 -20
- package/dist/DaoPaaS.umd.js +421 -421
- package/dist/editor.d.ts +28 -11
- package/dist/style.css +1 -1
- package/package.json +1 -1
package/dist/DaoPaaS.es.js
CHANGED
|
@@ -14918,13 +14918,6 @@ const oTStore = create$3((set2) => ({
|
|
|
14918
14918
|
client: null,
|
|
14919
14919
|
senders: [],
|
|
14920
14920
|
doc: {},
|
|
14921
|
-
fileTree: {
|
|
14922
|
-
data: {
|
|
14923
|
-
type: "DIRECTORY",
|
|
14924
|
-
name: "/",
|
|
14925
|
-
children: []
|
|
14926
|
-
}
|
|
14927
|
-
},
|
|
14928
14921
|
isRecording: false,
|
|
14929
14922
|
CRDTInfo: {
|
|
14930
14923
|
operation: [],
|
|
@@ -14975,9 +14968,6 @@ const oTStore = create$3((set2) => ({
|
|
|
14975
14968
|
switchDoc: (arg) => set2(() => ({
|
|
14976
14969
|
doc: arg
|
|
14977
14970
|
})),
|
|
14978
|
-
switchDocTree: (arg) => set2(() => ({
|
|
14979
|
-
fileTree: arg
|
|
14980
|
-
})),
|
|
14981
14971
|
setSenders: (arg) => set2(() => ({
|
|
14982
14972
|
senders: arg
|
|
14983
14973
|
})),
|
|
@@ -15031,6 +15021,15 @@ const oTStore = create$3((set2) => ({
|
|
|
15031
15021
|
asyncType: arg
|
|
15032
15022
|
}))
|
|
15033
15023
|
}));
|
|
15024
|
+
const fileTreeStore = create$3(persist((set2) => ({
|
|
15025
|
+
fileTree: {},
|
|
15026
|
+
switchFileTree: (arg) => set2(() => ({
|
|
15027
|
+
fileTree: arg
|
|
15028
|
+
}))
|
|
15029
|
+
}), {
|
|
15030
|
+
name: "fileTree",
|
|
15031
|
+
getStorage: () => localStorage
|
|
15032
|
+
}));
|
|
15034
15033
|
const userStore = create$3(persist((set2) => ({
|
|
15035
15034
|
userInfo: {},
|
|
15036
15035
|
setUserInfo: (arg) => set2(() => ({
|
|
@@ -27258,6 +27257,9 @@ const PlaygroundInit = (arg) => {
|
|
|
27258
27257
|
reactDom.exports.unstable_batchedUpdates(() => {
|
|
27259
27258
|
const setUserInfo = userStore.getState().setUserInfo;
|
|
27260
27259
|
const setUserList = userListStore.getState().setUserList;
|
|
27260
|
+
const {
|
|
27261
|
+
switchFileTree
|
|
27262
|
+
} = fileTreeStore.getState();
|
|
27261
27263
|
const {
|
|
27262
27264
|
switchDoc,
|
|
27263
27265
|
setSenders,
|
|
@@ -27265,7 +27267,6 @@ const PlaygroundInit = (arg) => {
|
|
|
27265
27267
|
setAsyncType,
|
|
27266
27268
|
setServerAck,
|
|
27267
27269
|
setCustomAck,
|
|
27268
|
-
switchDocTree,
|
|
27269
27270
|
setPlaygroundInfo,
|
|
27270
27271
|
setDockerInfo,
|
|
27271
27272
|
setQueryObject,
|
|
@@ -27312,9 +27313,6 @@ const PlaygroundInit = (arg) => {
|
|
|
27312
27313
|
avatar: avatarGenerator(lodash$2.exports.random(0, 6), userData.uuid)
|
|
27313
27314
|
}), "coUsers");
|
|
27314
27315
|
setUserInfo(originUser);
|
|
27315
|
-
if (oTStore.getState().playgroundStatus === "INACTIVE") {
|
|
27316
|
-
io == null ? void 0 : io.emit("active");
|
|
27317
|
-
}
|
|
27318
27316
|
}
|
|
27319
27317
|
const userInfoList = [originUser, ...userData.coUsers.filter((f2) => f2.uuid !== originUser.uuid).map((user) => {
|
|
27320
27318
|
return __spreadProps(__spreadValues({}, user), {
|
|
@@ -27332,7 +27330,7 @@ const PlaygroundInit = (arg) => {
|
|
|
27332
27330
|
} = JSON.parse(data);
|
|
27333
27331
|
setPlaygroundInfo(playgroundInfo);
|
|
27334
27332
|
setDockerInfo(__spreadValues(__spreadValues({}, oTStore.getState().dockerInfo), dockerInfo));
|
|
27335
|
-
dockerInfo.fileTree &&
|
|
27333
|
+
dockerInfo.fileTree && switchFileTree({
|
|
27336
27334
|
data: dockerInfo.fileTree
|
|
27337
27335
|
});
|
|
27338
27336
|
setCRDTInfo(crdt);
|
|
@@ -27407,7 +27405,7 @@ const PlaygroundInit = (arg) => {
|
|
|
27407
27405
|
});
|
|
27408
27406
|
io.on("fileNode", (data) => {
|
|
27409
27407
|
const res = JSON.parse(data);
|
|
27410
|
-
|
|
27408
|
+
switchFileTree({
|
|
27411
27409
|
data: res
|
|
27412
27410
|
});
|
|
27413
27411
|
});
|
|
@@ -29466,15 +29464,17 @@ const REPLAY_INTERVAL = 250;
|
|
|
29466
29464
|
let timer;
|
|
29467
29465
|
let timeOutT;
|
|
29468
29466
|
const replayHandler = async () => {
|
|
29467
|
+
const {
|
|
29468
|
+
switchFileTree
|
|
29469
|
+
} = fileTreeStore.getState();
|
|
29469
29470
|
const {
|
|
29470
29471
|
setAppStatus,
|
|
29471
29472
|
switchDoc,
|
|
29472
|
-
switchDocTree,
|
|
29473
29473
|
setCRDTInfo,
|
|
29474
29474
|
dockerInfo,
|
|
29475
29475
|
doc
|
|
29476
29476
|
} = oTStore.getState();
|
|
29477
|
-
|
|
29477
|
+
switchFileTree == null ? void 0 : switchFileTree({
|
|
29478
29478
|
data: dockerInfo.fileTree
|
|
29479
29479
|
});
|
|
29480
29480
|
const crdts = await getLocalCRDTs();
|
|
@@ -40916,6 +40916,9 @@ class DaoPaaS {
|
|
|
40916
40916
|
get ignoreReplayers() {
|
|
40917
40917
|
return ignoreReplayerStore.getState().ignoreReplayers;
|
|
40918
40918
|
}
|
|
40919
|
+
get userList() {
|
|
40920
|
+
return userListStore.getState().userList;
|
|
40921
|
+
}
|
|
40919
40922
|
async init() {
|
|
40920
40923
|
if (this.mode === "tsdoc")
|
|
40921
40924
|
return;
|
|
@@ -43333,14 +43336,16 @@ const FileTree = ({
|
|
|
43333
43336
|
} = oTStore((state) => state);
|
|
43334
43337
|
const {
|
|
43335
43338
|
fileTree
|
|
43336
|
-
} =
|
|
43339
|
+
} = fileTreeStore((state) => state);
|
|
43337
43340
|
const [treeData, setTreeData] = react.exports.useState({});
|
|
43338
43341
|
react.exports.useEffect(() => {
|
|
43339
43342
|
if (oTStore.getState().appStatus === "replay") {
|
|
43340
43343
|
setSelectedItems([]);
|
|
43341
43344
|
setExpandedItems([]);
|
|
43342
43345
|
}
|
|
43343
|
-
|
|
43346
|
+
if (!fileTree.data)
|
|
43347
|
+
return;
|
|
43348
|
+
const newData = formatFileToTree(fileTree == null ? void 0 : fileTree.data);
|
|
43344
43349
|
setSelectedItems(selectedItems.filter((item) => newData[item]));
|
|
43345
43350
|
setExpandedItems(expandedItems.filter((item) => newData[item]));
|
|
43346
43351
|
setTreeData(newData);
|