@dao42/d42paas-front 0.7.1 → 0.7.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.
@@ -190049,48 +190049,46 @@ const Editor = ({
190049
190049
  path: model.uri.path.replace(APP_DIR, "")
190050
190050
  });
190051
190051
  };
190052
- const clientInit = () => {
190053
- client.sendOperation = (revision, operation) => {
190054
- if (oTStore.getState().appStatus === "replay")
190055
- return;
190056
- const {
190057
- userInfo: userInfo2
190058
- } = userStore.getState();
190059
- const {
190060
- doc: doc22,
190061
- switchDoc: switchDoc22
190062
- } = oTStore.getState();
190063
- let path;
190064
- if (doc22 == null ? void 0 : doc22.path) {
190065
- path = doc22.path;
190066
- } else {
190067
- path = `temp-${temps.length + 1}`;
190068
- switchDoc22({
190069
- path: `temp-${temps.length + 1}`
190070
- });
190071
- temps.push(path);
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(() => {