@dao42/d42paas-front 0.7.25 → 0.7.30

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.
@@ -14944,7 +14944,7 @@ const dockerState = create$5(subscribeWithSelector$1((set2) => ({
14944
14944
  dockerStatus: arg
14945
14945
  })
14946
14946
  })));
14947
- const oTStore = create$5((set2) => ({
14947
+ const oTStore = create$5(subscribeWithSelector$1((set2) => ({
14948
14948
  asyncType: void 0,
14949
14949
  appStatus: "code",
14950
14950
  setAppStatus: (arg) => set2(() => ({
@@ -15059,7 +15059,7 @@ const oTStore = create$5((set2) => ({
15059
15059
  setAsyncType: (arg) => set2(() => ({
15060
15060
  asyncType: arg
15061
15061
  }))
15062
- }));
15062
+ })));
15063
15063
  const fileTreeStore = create$5((set2) => ({
15064
15064
  fileTree: {},
15065
15065
  switchFileTree: (arg) => set2(() => ({
@@ -31027,11 +31027,6 @@ var dayjs_min = { exports: {} };
31027
31027
  });
31028
31028
  })(dayjs_min);
31029
31029
  var dayjs = dayjs_min.exports;
31030
- var dayjs$1 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ _mergeNamespaces({
31031
- __proto__: null,
31032
- [Symbol.toStringTag]: "Module",
31033
- "default": dayjs
31034
- }, [dayjs_min.exports]));
31035
31030
  var textOperation = { exports: {} };
31036
31031
  (function(module2) {
31037
31032
  if (typeof ot === "undefined") {
@@ -32935,8 +32930,8 @@ const replay = async (passInData) => {
32935
32930
  setAppStatus("replay");
32936
32931
  let operation;
32937
32932
  const replayList = await getLocalCRDTs();
32938
- const filterReplayList = replayList.filter((replayItem) => replayItem.userInfo.uuid === passInData.userId);
32939
- const currentFilter = filterReplayList.filter((f2) => dayjs$1(passInData.timestamp).isSame(f2.timestamp) || dayjs$1(passInData.timestamp).isBefore(f2.timestamp));
32933
+ const filterReplayList = passInData.userId === void 0 ? replayList : replayList.filter((replayItem) => replayItem.userInfo.uuid === passInData.userId);
32934
+ const currentFilter = filterReplayList.filter((f2) => dayjs(passInData.timestamp).isSame(f2.timestamp) || dayjs(passInData.timestamp).isBefore(f2.timestamp));
32940
32935
  const filterReplaySource = currentFilter[0];
32941
32936
  const replayFile = await getLocalReplayFile(filterReplaySource.file.path);
32942
32937
  const localFile = await getLocalFile(filterReplaySource.file.path);
@@ -44288,7 +44283,6 @@ const DrawerComponent = ({
44288
44283
  onClick: () => {
44289
44284
  setDrawerOpen(false);
44290
44285
  replay({
44291
- userId: item.userInfo.uuid,
44292
44286
  timestamp: item.timestamp
44293
44287
  });
44294
44288
  },
@@ -44336,15 +44330,6 @@ const DrawerComponent = ({
44336
44330
  const CmdKey = () => {
44337
44331
  const ninjaKeys = react.exports.useRef(null);
44338
44332
  const actions = [
44339
- {
44340
- id: "replay",
44341
- title: "\u56DE\u653E",
44342
- hotkey: "r",
44343
- mdIcon: "alarm",
44344
- handler: () => {
44345
- setChildren();
44346
- }
44347
- },
44348
44333
  {
44349
44334
  id: "active",
44350
44335
  title: "\u6FC0\u6D3B\u5BB9\u5668",
@@ -44383,21 +44368,18 @@ const CmdKey = () => {
44383
44368
  {
44384
44369
  id: "clearCache",
44385
44370
  title: "\u6E05\u9664\u7F13\u5B58",
44386
- hotkey: "c",
44387
44371
  mdIcon: "autorenew",
44388
44372
  handler: () => {
44389
44373
  clearCache();
44390
44374
  }
44391
44375
  },
44392
44376
  {
44393
- id: "admClearCache",
44394
- title: "\u6E05\u9664\u7F13\u5B58\u3010ADMIN_ONLY\u3011",
44395
- hotkey: "k",
44396
- mdIcon: "admin_panel_settings",
44377
+ id: "replay",
44378
+ title: "\u56DE\u653E",
44379
+ hotkey: "r",
44380
+ mdIcon: "alarm",
44397
44381
  handler: () => {
44398
- if (prompt("\u8BF7\u8F93\u5165\u5BC6\u7801") === "kuangsa183") {
44399
- adminClearCache();
44400
- }
44382
+ setChildren();
44401
44383
  }
44402
44384
  },
44403
44385
  {
@@ -44413,30 +44395,35 @@ const CmdKey = () => {
44413
44395
  setShowGUI(!showGUI);
44414
44396
  }
44415
44397
  },
44398
+ {
44399
+ id: "admClearCache",
44400
+ title: "\u6E05\u9664\u7F13\u5B58\u3010ADMIN_ONLY\u3011",
44401
+ mdIcon: "admin_panel_settings",
44402
+ handler: () => {
44403
+ if (prompt("\u8BF7\u8F93\u5165\u5BC6\u7801") === "kuangsa183") {
44404
+ adminClearCache();
44405
+ }
44406
+ }
44407
+ },
44416
44408
  {
44417
44409
  id: "DOC",
44418
44410
  title: "\u6587\u6863",
44419
44411
  mdIcon: "desktop_windows",
44420
- children: [
44421
- {
44422
- id: "tsdoc",
44423
- title: "TS\u6587\u6863",
44424
- hotkey: "t",
44425
- mdIcon: "highlight",
44426
- handler: () => {
44427
- window.open("https://develop.1024paas.com/tsdoc");
44428
- }
44429
- },
44430
- {
44431
- id: "storybook",
44432
- title: "Storybook",
44433
- hotkey: "s",
44434
- mdIcon: "description",
44435
- handler: () => {
44436
- window.open("https://develop.1024paas.com/storybook");
44437
- }
44412
+ children: [{
44413
+ id: "tsdoc",
44414
+ title: "API \u6587\u6863",
44415
+ mdIcon: "highlight",
44416
+ handler: () => {
44417
+ window.open("https://develop.1024paas.com/tsdoc");
44438
44418
  }
44439
- ]
44419
+ }, {
44420
+ id: "storybook",
44421
+ title: "Storybook",
44422
+ mdIcon: "description",
44423
+ handler: () => {
44424
+ window.open("https://develop.1024paas.com/storybook");
44425
+ }
44426
+ }]
44440
44427
  }
44441
44428
  ];
44442
44429
  const [drawerOpen, setDrawerOpen] = react.exports.useState(false);
@@ -44511,7 +44498,6 @@ const GuiComponent = () => {
44511
44498
  File: {
44512
44499
  value: false,
44513
44500
  onChange: (v2) => {
44514
- console.log(v2);
44515
44501
  fobidComponent("file", v2);
44516
44502
  },
44517
44503
  transient: false
@@ -44697,7 +44683,15 @@ class DaoPaaS {
44697
44683
  this.mapRender(this.components);
44698
44684
  }
44699
44685
  reactDom.exports.render(/* @__PURE__ */ jsx(GuiComponent, {}), document.querySelector(".init-class"));
44700
- dockerState.subscribe((state2) => state2.dockerStatus, this.trigger);
44686
+ this.messageAndErrorInjection();
44687
+ }
44688
+ messageAndErrorInjection() {
44689
+ dockerState.subscribe((state2) => state2, (pre, next2) => {
44690
+ this.trigger(lodash$2.exports.pick(pre, ["dockerStatus"]), lodash$2.exports.pick(next2, ["dockerStatus"]));
44691
+ });
44692
+ userListStore.subscribe((next2, pre) => {
44693
+ this.trigger(lodash$2.exports.pick(pre, ["userList"]), lodash$2.exports.pick(next2, ["userList"]));
44694
+ });
44701
44695
  }
44702
44696
  trigger(_d2, data) {
44703
44697
  this.on(data);
@@ -44722,10 +44716,7 @@ class DaoPaaS {
44722
44716
  callback && callback();
44723
44717
  }
44724
44718
  replay(arg) {
44725
- replay({
44726
- userId: arg.userInfo.uuid,
44727
- timestamp: arg.timestamp
44728
- });
44719
+ replay(arg);
44729
44720
  }
44730
44721
  setIgnoreReplayers(arg) {
44731
44722
  ignoreReplayerStore.getState().setIgnoreReplayer(arg);
@@ -44830,7 +44821,9 @@ class DaoPaaS {
44830
44821
  this.pageDOM = container ? isHTMLElement$1(container) : this.pageDOM;
44831
44822
  reactDom.exports.render(/* @__PURE__ */ jsx(react.exports.Suspense, {
44832
44823
  fallback: /* @__PURE__ */ jsx(Loading, {}),
44833
- children: /* @__PURE__ */ jsx(LazyPageComponent, {})
44824
+ children: /* @__PURE__ */ jsx(LazyPageComponent, {
44825
+ serviceWorkerOrigin: this.serviceWorkerOrigin
44826
+ })
44834
44827
  }), this.pageDOM);
44835
44828
  }
44836
44829
  Editor({
@@ -220454,6 +220447,12 @@ const Editor = ({
220454
220447
  if (((_d3 = _d2.file) == null ? void 0 : _d3.path) !== path2) {
220455
220448
  otherClients == null ? void 0 : otherClients.removeCursor(_d2.userInfo);
220456
220449
  }
220450
+ setTimeout(() => {
220451
+ var _a3, _b3;
220452
+ if ((_b3 = (_a3 = _d2 == null ? void 0 : _d2.file) == null ? void 0 : _a3.path) == null ? void 0 : _b3.includes("md")) {
220453
+ setMarkdownVal(editor.getValue());
220454
+ }
220455
+ }, 100);
220457
220456
  }
220458
220457
  setCRDTInfo2(_d2);
220459
220458
  setAsyncType("editor");
@@ -228860,6 +228859,7 @@ const Index = (props2) => {
228860
228859
  count: 10
228861
228860
  }),
228862
228861
  children: /* @__PURE__ */ jsx(LazyEditorComponent, {
228862
+ serviceWorkerOrigin: props2.serviceWorkerOrigin,
228863
228863
  useLsp: true
228864
228864
  })
228865
228865
  }) : null