@dao42/d42paas-front 0.7.1 → 0.7.5
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 +44 -47
- package/dist/DaoPaaS.umd.js +66 -66
- package/dist/assets/{css.worker.5157db2f.js → css.worker.js} +0 -0
- package/dist/assets/{editor.worker.43309ac9.js → editor.worker.js} +0 -0
- package/dist/assets/{html.worker.3f2697f1.js → html.worker.js} +0 -0
- package/dist/assets/{json.worker.66c12891.js → json.worker.js} +0 -0
- package/dist/assets/{ts.worker.d75e32f4.js → ts.worker.js} +0 -0
- package/package.json +4 -3
package/dist/DaoPaaS.es.js
CHANGED
|
@@ -189711,22 +189711,22 @@ class MonacoAdapter {
|
|
|
189711
189711
|
getWorkerUrl(_moduleId, label) {
|
|
189712
189712
|
if (label === "json") {
|
|
189713
189713
|
return `data:text/javascript;charset=utf-8,${encodeURIComponent(`
|
|
189714
|
-
importScripts('${serviceWorkerOrigin}/assets/
|
|
189714
|
+
importScripts('${serviceWorkerOrigin}/assets/json.worker.js');`)}`;
|
|
189715
189715
|
}
|
|
189716
189716
|
if (label === "css" || label === "scss" || label === "less") {
|
|
189717
189717
|
return `data:text/javascript;charset=utf-8,${encodeURIComponent(`
|
|
189718
|
-
importScripts('${serviceWorkerOrigin}/assets/
|
|
189718
|
+
importScripts('${serviceWorkerOrigin}/assets/css.worker.js');`)}`;
|
|
189719
189719
|
}
|
|
189720
189720
|
if (label === "html" || label === "handlebars" || label === "razor") {
|
|
189721
189721
|
return `data:text/javascript;charset=utf-8,${encodeURIComponent(`
|
|
189722
|
-
importScripts('${serviceWorkerOrigin}/assets/
|
|
189722
|
+
importScripts('${serviceWorkerOrigin}/assets/html.worker.js');`)}`;
|
|
189723
189723
|
}
|
|
189724
189724
|
if (label === "typescript" || label === "javascript") {
|
|
189725
189725
|
return `data:text/javascript;charset=utf-8,${encodeURIComponent(`
|
|
189726
|
-
importScripts('${serviceWorkerOrigin}/assets/
|
|
189726
|
+
importScripts('${serviceWorkerOrigin}/assets/ts.worker.js');`)}`;
|
|
189727
189727
|
}
|
|
189728
189728
|
return `data:text/javascript;charset=utf-8,${encodeURIComponent(`
|
|
189729
|
-
importScripts('${serviceWorkerOrigin}/assets/editor.worker.
|
|
189729
|
+
importScripts('${serviceWorkerOrigin}/assets/editor.worker.js');`)}`;
|
|
189730
189730
|
}
|
|
189731
189731
|
};
|
|
189732
189732
|
} else {
|
|
@@ -190049,48 +190049,46 @@ const Editor = ({
|
|
|
190049
190049
|
path: model.uri.path.replace(APP_DIR, "")
|
|
190050
190050
|
});
|
|
190051
190051
|
};
|
|
190052
|
-
|
|
190053
|
-
|
|
190054
|
-
|
|
190055
|
-
|
|
190056
|
-
|
|
190057
|
-
|
|
190058
|
-
|
|
190059
|
-
|
|
190060
|
-
|
|
190061
|
-
|
|
190062
|
-
|
|
190063
|
-
|
|
190064
|
-
|
|
190065
|
-
|
|
190066
|
-
|
|
190067
|
-
|
|
190068
|
-
|
|
190069
|
-
|
|
190070
|
-
|
|
190071
|
-
|
|
190052
|
+
client.sendOperation = (revision, operation) => {
|
|
190053
|
+
if (oTStore.getState().appStatus === "replay")
|
|
190054
|
+
return;
|
|
190055
|
+
const {
|
|
190056
|
+
userInfo: userInfo2
|
|
190057
|
+
} = userStore.getState();
|
|
190058
|
+
const {
|
|
190059
|
+
doc: doc22,
|
|
190060
|
+
switchDoc: switchDoc22
|
|
190061
|
+
} = oTStore.getState();
|
|
190062
|
+
let path;
|
|
190063
|
+
if (doc22 == null ? void 0 : doc22.path) {
|
|
190064
|
+
path = doc22.path;
|
|
190065
|
+
} else {
|
|
190066
|
+
path = `temp-${temps.length + 1}`;
|
|
190067
|
+
switchDoc22({
|
|
190068
|
+
path: `temp-${temps.length + 1}`
|
|
190069
|
+
});
|
|
190070
|
+
temps.push(path);
|
|
190071
|
+
}
|
|
190072
|
+
const crdt = {
|
|
190073
|
+
timestamp: Date.now(),
|
|
190074
|
+
userInfo: lodash$2.exports.pick(userInfo2, ["role", "uuid"]),
|
|
190075
|
+
cursor: __spreadProps(__spreadValues({}, clientEditor.getCursor()), {
|
|
190076
|
+
path
|
|
190077
|
+
}),
|
|
190078
|
+
editor: {
|
|
190079
|
+
operation,
|
|
190080
|
+
revision,
|
|
190081
|
+
evtType: "Editor"
|
|
190082
|
+
},
|
|
190083
|
+
file: {
|
|
190084
|
+
action: "Update",
|
|
190085
|
+
path
|
|
190072
190086
|
}
|
|
190073
|
-
const crdt = {
|
|
190074
|
-
timestamp: Date.now(),
|
|
190075
|
-
userInfo: lodash$2.exports.pick(userInfo2, ["role", "uuid"]),
|
|
190076
|
-
cursor: __spreadProps(__spreadValues({}, clientEditor.getCursor()), {
|
|
190077
|
-
path
|
|
190078
|
-
}),
|
|
190079
|
-
editor: {
|
|
190080
|
-
operation,
|
|
190081
|
-
revision,
|
|
190082
|
-
evtType: "Editor"
|
|
190083
|
-
},
|
|
190084
|
-
file: {
|
|
190085
|
-
action: "Update",
|
|
190086
|
-
path
|
|
190087
|
-
}
|
|
190088
|
-
};
|
|
190089
|
-
io == null ? void 0 : io.emit("editFile", JSON.stringify(crdt));
|
|
190090
|
-
};
|
|
190091
|
-
client.applyOperation = (operation) => {
|
|
190092
|
-
clientEditor.applyOperation(operation);
|
|
190093
190087
|
};
|
|
190088
|
+
io == null ? void 0 : io.emit("editFile", JSON.stringify(crdt));
|
|
190089
|
+
};
|
|
190090
|
+
client.applyOperation = (operation) => {
|
|
190091
|
+
clientEditor.applyOperation(operation);
|
|
190094
190092
|
};
|
|
190095
190093
|
const onChange = (operation) => {
|
|
190096
190094
|
client.applyClient(operation);
|
|
@@ -190225,7 +190223,6 @@ const Editor = ({
|
|
|
190225
190223
|
blur: onBlur,
|
|
190226
190224
|
focus: onFocus
|
|
190227
190225
|
});
|
|
190228
|
-
clientInit();
|
|
190229
190226
|
clientEditor == null ? void 0 : clientEditor.onCursorActivity();
|
|
190230
190227
|
}, [clientEditor]);
|
|
190231
190228
|
react.exports.useEffect(() => {
|
|
@@ -190287,7 +190284,7 @@ const Editor = ({
|
|
|
190287
190284
|
io == null ? void 0 : io.off("selection");
|
|
190288
190285
|
io == null ? void 0 : io.off("cursor");
|
|
190289
190286
|
};
|
|
190290
|
-
}, [clientEditor]);
|
|
190287
|
+
}, [clientEditor, io]);
|
|
190291
190288
|
react.exports.useEffect(() => {
|
|
190292
190289
|
otherClients == null ? void 0 : otherClients.updateList(userList.filter((x2) => !IsMe(x2)));
|
|
190293
190290
|
}, [userList]);
|