@dao42/d42paas-front 0.5.69 → 0.5.70
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 +51 -21
- package/dist/DaoPaaS.umd.js +112 -111
- package/dist/editor.d.ts +2 -0
- package/package.json +1 -1
package/dist/DaoPaaS.es.js
CHANGED
|
@@ -42356,14 +42356,14 @@ class DaoPaaS {
|
|
|
42356
42356
|
tenantId,
|
|
42357
42357
|
username,
|
|
42358
42358
|
components,
|
|
42359
|
-
env: env2 = "develop"
|
|
42359
|
+
env: env2 = "develop",
|
|
42360
|
+
serviceWorkerOrigin
|
|
42360
42361
|
}) {
|
|
42361
42362
|
__publicField(this, "shellDOM");
|
|
42362
42363
|
__publicField(this, "editorDOM");
|
|
42363
42364
|
__publicField(this, "pageDOM");
|
|
42364
42365
|
__publicField(this, "storeProps");
|
|
42365
42366
|
__publicField(this, "ticket");
|
|
42366
|
-
__publicField(this, "playgroundId");
|
|
42367
42367
|
__publicField(this, "userId");
|
|
42368
42368
|
__publicField(this, "tenantId");
|
|
42369
42369
|
__publicField(this, "username");
|
|
@@ -42372,6 +42372,8 @@ class DaoPaaS {
|
|
|
42372
42372
|
__publicField(this, "env");
|
|
42373
42373
|
__publicField(this, "components");
|
|
42374
42374
|
__publicField(this, "mode");
|
|
42375
|
+
__publicField(this, "playgroundId");
|
|
42376
|
+
__publicField(this, "serviceWorkerOrigin");
|
|
42375
42377
|
this.mode = mode;
|
|
42376
42378
|
this.ticket = ticket;
|
|
42377
42379
|
this.playgroundId = playgroundId;
|
|
@@ -42380,6 +42382,7 @@ class DaoPaaS {
|
|
|
42380
42382
|
this.username = username ? username : "";
|
|
42381
42383
|
this.env = env2;
|
|
42382
42384
|
this.components = components;
|
|
42385
|
+
this.serviceWorkerOrigin = serviceWorkerOrigin;
|
|
42383
42386
|
sessionStorage.setItem("playgroundId", playgroundId);
|
|
42384
42387
|
this.init();
|
|
42385
42388
|
}
|
|
@@ -42539,7 +42542,9 @@ class DaoPaaS {
|
|
|
42539
42542
|
case "Editor":
|
|
42540
42543
|
this.Editor({
|
|
42541
42544
|
container,
|
|
42542
|
-
props: props2
|
|
42545
|
+
props: __spreadProps(__spreadValues({}, props2), {
|
|
42546
|
+
serviceWorkerOrigin: this.serviceWorkerOrigin
|
|
42547
|
+
})
|
|
42543
42548
|
});
|
|
42544
42549
|
break;
|
|
42545
42550
|
case "Console":
|
|
@@ -42581,7 +42586,9 @@ class DaoPaaS {
|
|
|
42581
42586
|
this.editorDOM = container ? isHTMLElement$1(container) : this.editorDOM;
|
|
42582
42587
|
reactDom.exports.render(/* @__PURE__ */ jsx(react.exports.Suspense, {
|
|
42583
42588
|
fallback: /* @__PURE__ */ jsx(Loading, {}),
|
|
42584
|
-
children: /* @__PURE__ */ jsx(LazyEditorComponent, __spreadValues({}, props2)
|
|
42589
|
+
children: /* @__PURE__ */ jsx(LazyEditorComponent, __spreadProps(__spreadValues({}, props2), {
|
|
42590
|
+
serviceWorkerOrigin: this.serviceWorkerOrigin
|
|
42591
|
+
}))
|
|
42585
42592
|
}), this.editorDOM);
|
|
42586
42593
|
}
|
|
42587
42594
|
Shell({
|
|
@@ -187735,7 +187742,8 @@ const Editor = ({
|
|
|
187735
187742
|
doc: doc2,
|
|
187736
187743
|
containerStyle,
|
|
187737
187744
|
menuStyle,
|
|
187738
|
-
editorStyle
|
|
187745
|
+
editorStyle,
|
|
187746
|
+
serviceWorkerOrigin
|
|
187739
187747
|
}) => {
|
|
187740
187748
|
const divEl = react.exports.useRef(null);
|
|
187741
187749
|
const file = oTStore((state) => state.doc);
|
|
@@ -188024,24 +188032,46 @@ const Editor = ({
|
|
|
188024
188032
|
}
|
|
188025
188033
|
};
|
|
188026
188034
|
react.exports.useEffect(() => {
|
|
188027
|
-
|
|
188028
|
-
|
|
188029
|
-
|
|
188030
|
-
|
|
188031
|
-
|
|
188032
|
-
|
|
188033
|
-
|
|
188034
|
-
|
|
188035
|
-
|
|
188036
|
-
|
|
188037
|
-
|
|
188035
|
+
if (serviceWorkerOrigin) {
|
|
188036
|
+
self.MonacoEnvironment = {
|
|
188037
|
+
globalAPI: true,
|
|
188038
|
+
getWorkerUrl(_moduleId, label) {
|
|
188039
|
+
if (label === "json") {
|
|
188040
|
+
return "./json.worker.bundle.js";
|
|
188041
|
+
}
|
|
188042
|
+
if (label === "css" || label === "scss" || label === "less") {
|
|
188043
|
+
return "./css.worker.bundle.js";
|
|
188044
|
+
}
|
|
188045
|
+
if (label === "html" || label === "handlebars" || label === "razor") {
|
|
188046
|
+
return "./html.worker.bundle.js";
|
|
188047
|
+
}
|
|
188048
|
+
if (label === "typescript" || label === "javascript") {
|
|
188049
|
+
return "./ts.worker.bundle.js";
|
|
188050
|
+
}
|
|
188051
|
+
return `data:text/javascript;charset=utf-8,${encodeURIComponent(`
|
|
188052
|
+
importScripts('${serviceWorkerOrigin}/assets/editor.worker.43309ac9.js');`)}`;
|
|
188038
188053
|
}
|
|
188039
|
-
|
|
188040
|
-
|
|
188054
|
+
};
|
|
188055
|
+
} else {
|
|
188056
|
+
self.MonacoEnvironment = {
|
|
188057
|
+
globalAPI: true,
|
|
188058
|
+
getWorker(_2, label) {
|
|
188059
|
+
if (label === "json") {
|
|
188060
|
+
return new WorkerWrapper$3();
|
|
188061
|
+
}
|
|
188062
|
+
if (label === "css" || label === "scss" || label === "less") {
|
|
188063
|
+
return new WorkerWrapper$2();
|
|
188064
|
+
}
|
|
188065
|
+
if (label === "html" || label === "handlebars" || label === "razor") {
|
|
188066
|
+
return new WorkerWrapper$1();
|
|
188067
|
+
}
|
|
188068
|
+
if (label === "typescript" || label === "javascript") {
|
|
188069
|
+
return new WorkerWrapper();
|
|
188070
|
+
}
|
|
188071
|
+
return new WorkerWrapper$4();
|
|
188041
188072
|
}
|
|
188042
|
-
|
|
188043
|
-
|
|
188044
|
-
};
|
|
188073
|
+
};
|
|
188074
|
+
}
|
|
188045
188075
|
editorInit();
|
|
188046
188076
|
return () => {
|
|
188047
188077
|
editor.dispose();
|