@dao42/d42paas-front 0.5.7 → 0.5.8

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.
@@ -31191,6 +31191,7 @@ class DaoPaaS {
31191
31191
  __publicField(this, "userId");
31192
31192
  __publicField(this, "tenantId");
31193
31193
  __publicField(this, "userInfo", {});
31194
+ __publicField(this, "socketTemple");
31194
31195
  const {
31195
31196
  setSocket,
31196
31197
  socket: socket2
@@ -31231,17 +31232,16 @@ class DaoPaaS {
31231
31232
  return oTStore.getState();
31232
31233
  }
31233
31234
  get io() {
31234
- const _socket = useOT.getState().socket;
31235
- if (!_socket) {
31236
- throw "websocket\u8FD8\u672A\u521D\u59CB\u5316!!";
31237
- }
31238
- return _socket;
31235
+ return this.socketTemple;
31236
+ }
31237
+ set io(arg) {
31238
+ this.socketTemple = arg;
31239
31239
  }
31240
31240
  get playgroundStatus() {
31241
31241
  return this.otstore.playgroundStatus;
31242
31242
  }
31243
31243
  async init(args) {
31244
- window.onerror = function(message) {
31244
+ window.onerror = (message) => {
31245
31245
  if (/dError/.test(message)) {
31246
31246
  Toast.message({
31247
31247
  type: "error",
@@ -31271,24 +31271,24 @@ class DaoPaaS {
31271
31271
  });
31272
31272
  }
31273
31273
  clearIDB() {
31274
- indexedDB.deleteDatabase("daopaas").onsuccess = () => {
31275
- };
31276
31274
  }
31277
31275
  replay(arg) {
31278
31276
  replay(arg);
31279
31277
  }
31280
31278
  activePlayground() {
31281
- this.io.emit("active");
31279
+ var _a2;
31280
+ (_a2 = this.io) == null ? void 0 : _a2.emit("active");
31282
31281
  }
31283
31282
  switchLspServer(arg) {
31284
31283
  this.otstore.switchLspServer(arg);
31285
31284
  }
31286
31285
  record(setBoolean) {
31286
+ var _a2, _b2;
31287
31287
  if (setBoolean === "undefined") {
31288
31288
  this.otstore.setGlobalData({
31289
31289
  isRecording: !!setBoolean
31290
31290
  });
31291
- this.io.emit("globalData", {
31291
+ (_a2 = this.io) == null ? void 0 : _a2.emit("globalData", {
31292
31292
  isRecording: !!setBoolean
31293
31293
  });
31294
31294
  return;
@@ -31296,7 +31296,7 @@ class DaoPaaS {
31296
31296
  this.otstore.setGlobalData({
31297
31297
  isRecording: !!setBoolean
31298
31298
  });
31299
- this.io.emit("globalData", {
31299
+ (_b2 = this.io) == null ? void 0 : _b2.emit("globalData", {
31300
31300
  isRecording: !!setBoolean
31301
31301
  });
31302
31302
  }