@dao42/d42paas-front 0.5.42 → 0.5.45

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.
@@ -40733,14 +40733,23 @@ const CmdKey = () => {
40733
40733
  }
40734
40734
  },
40735
40735
  {
40736
- id: "doc",
40737
- title: "\u6587\u6863",
40736
+ id: "storybook",
40737
+ title: "storybook",
40738
40738
  hotkey: "d",
40739
40739
  mdIcon: "description",
40740
40740
  handler: () => {
40741
40741
  window.open("https://develop.1024paas.com/storybook");
40742
40742
  }
40743
40743
  },
40744
+ {
40745
+ id: "tsdoc",
40746
+ title: "TS\u6587\u6863",
40747
+ hotkey: "t",
40748
+ mdIcon: "highlight",
40749
+ handler: () => {
40750
+ window.open("https://develop.1024paas.com/tsdoc");
40751
+ }
40752
+ },
40744
40753
  {
40745
40754
  id: "clearCache",
40746
40755
  title: "\u6E05\u9664\u7F13\u5B58",
@@ -40864,13 +40873,14 @@ const LazyPageComponent = lazy$2(async () => await Promise.resolve().then(functi
40864
40873
  }));
40865
40874
  class DaoPaaS {
40866
40875
  constructor({
40876
+ mode,
40867
40877
  ticket,
40868
40878
  playgroundId,
40869
40879
  userId,
40870
40880
  tenantId,
40871
40881
  username,
40872
- env: env2 = "develop",
40873
- components
40882
+ components,
40883
+ env: env2 = "develop"
40874
40884
  }) {
40875
40885
  __publicField(this, "shellDOM");
40876
40886
  __publicField(this, "editorDOM");
@@ -40885,6 +40895,8 @@ class DaoPaaS {
40885
40895
  __publicField(this, "io");
40886
40896
  __publicField(this, "env");
40887
40897
  __publicField(this, "components");
40898
+ __publicField(this, "mode");
40899
+ this.mode = mode;
40888
40900
  this.ticket = ticket;
40889
40901
  this.playgroundId = playgroundId;
40890
40902
  this.userId = userId;
@@ -40905,6 +40917,8 @@ class DaoPaaS {
40905
40917
  return ignoreReplayerStore.getState().ignoreReplayers;
40906
40918
  }
40907
40919
  async init() {
40920
+ if (this.mode === "tsdoc")
40921
+ return;
40908
40922
  const {
40909
40923
  setSocket,
40910
40924
  socket: socket2
@@ -41026,7 +41040,7 @@ class DaoPaaS {
41026
41040
  container,
41027
41041
  props: props2,
41028
41042
  item
41029
- }, index2) => {
41043
+ }, _index) => {
41030
41044
  switch (item) {
41031
41045
  case "Tree":
41032
41046
  this.Tree({
@@ -186244,14 +186258,11 @@ const ContentLayout = newStyled.div`
186244
186258
  `;
186245
186259
  const Editor = ({
186246
186260
  doc,
186247
- docType,
186248
186261
  containerStyle,
186249
186262
  menuStyle,
186250
186263
  editorStyle
186251
186264
  }) => {
186252
186265
  const divEl = react.exports.useRef(null);
186253
- react.exports.useState(doc ? doc : "");
186254
- react.exports.useState(null);
186255
186266
  const file = oTStore((state) => state.doc);
186256
186267
  const setFromServer = oTStore((state) => state.setFromServer);
186257
186268
  const [client2, setClient] = react.exports.useState(new IoClient(0));
@@ -186734,9 +186745,11 @@ const Editor = ({
186734
186745
  }
186735
186746
  }, [file == null ? void 0 : file.path]);
186736
186747
  react.exports.useEffect(() => {
186737
- }, [docType]);
186738
- react.exports.useEffect(() => {
186739
- }, [doc, docType]);
186748
+ if (!!editor && (doc == null ? void 0 : doc.type)) {
186749
+ editor$1.setModelLanguage(editor.getModel(), doc == null ? void 0 : doc.type);
186750
+ editor.setValue(doc.value ? doc.value : "");
186751
+ }
186752
+ }, [doc]);
186740
186753
  react.exports.useEffect(() => {
186741
186754
  const {
186742
186755
  usersDelta,