@dao42/d42paas-front 0.5.53 → 0.5.58
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 +84 -62
- package/dist/DaoPaaS.umd.js +219 -219
- package/package.json +2 -4
package/dist/DaoPaaS.es.js
CHANGED
|
@@ -14724,6 +14724,9 @@ async function setReplaySource(val) {
|
|
|
14724
14724
|
file: lodash$2.exports.omit(val.file, "value")
|
|
14725
14725
|
}), val.timestamp + "." + v4$1().split("-")[0]);
|
|
14726
14726
|
}
|
|
14727
|
+
async function getLocalFile(key) {
|
|
14728
|
+
return (await daopaasDB).get("files", key);
|
|
14729
|
+
}
|
|
14727
14730
|
async function getLocalReplayFile(key) {
|
|
14728
14731
|
return (await daopaasDB).get("replayFiles", key);
|
|
14729
14732
|
}
|
|
@@ -28508,10 +28511,14 @@ const PlaygroundInit = (arg) => {
|
|
|
28508
28511
|
}
|
|
28509
28512
|
});
|
|
28510
28513
|
io.on("serverAck", (d2) => {
|
|
28514
|
+
var _a2;
|
|
28511
28515
|
const _d2 = JSON.parse(d2);
|
|
28512
28516
|
setAsyncType("editor");
|
|
28513
28517
|
setReplaySource(__spreadProps(__spreadValues({}, _d2), {
|
|
28514
|
-
event: "editor"
|
|
28518
|
+
event: "editor",
|
|
28519
|
+
editor: __spreadProps(__spreadValues({}, _d2.editor), {
|
|
28520
|
+
revision: ((_a2 = _d2.editor) == null ? void 0 : _a2.revision) + 1
|
|
28521
|
+
})
|
|
28515
28522
|
}));
|
|
28516
28523
|
setServerAck();
|
|
28517
28524
|
});
|
|
@@ -30591,11 +30598,11 @@ const replay = async (item) => {
|
|
|
30591
30598
|
const filterReplayList = replayList.filter((replayItem) => replayItem.userInfo.uuid === item.userId);
|
|
30592
30599
|
const filterReplaySource = filterReplayList.find((f2) => f2.timestamp === item.timestamp);
|
|
30593
30600
|
if (filterReplaySource.file) {
|
|
30594
|
-
const
|
|
30595
|
-
filterReplaySource.file.value =
|
|
30596
|
-
if ((
|
|
30601
|
+
const doc2 = await getLocalFile(filterReplaySource.file.path);
|
|
30602
|
+
filterReplaySource.file.value = doc2;
|
|
30603
|
+
if ((doc2 == null ? void 0 : doc2.path) !== filterReplaySource.file.path) {
|
|
30597
30604
|
switchDoc == null ? void 0 : switchDoc({
|
|
30598
|
-
value:
|
|
30605
|
+
value: doc2.value,
|
|
30599
30606
|
path: filterReplaySource.file.path
|
|
30600
30607
|
});
|
|
30601
30608
|
}
|
|
@@ -187622,7 +187629,53 @@ function WorkerWrapper() {
|
|
|
187622
187629
|
"type": "module"
|
|
187623
187630
|
});
|
|
187624
187631
|
}
|
|
187632
|
+
const EditorLayout = newStyled.div`
|
|
187633
|
+
width: 100%;
|
|
187634
|
+
.contentWidgets {
|
|
187635
|
+
visibility: hidden;
|
|
187636
|
+
}
|
|
187637
|
+
.monaco-label {
|
|
187638
|
+
font-size: 12px;
|
|
187639
|
+
border-radius: 2px;
|
|
187640
|
+
padding: 2px 10px;
|
|
187641
|
+
transform: scale(0.8);
|
|
187642
|
+
visibility: hidden;
|
|
187643
|
+
}
|
|
187644
|
+
.label-visible {
|
|
187645
|
+
visibility: visible !important;
|
|
187646
|
+
}
|
|
187647
|
+
|
|
187648
|
+
.stack-list {
|
|
187649
|
+
width: 100%;
|
|
187650
|
+
height: 40px;
|
|
187651
|
+
transform: translate(0, -1px);
|
|
187652
|
+
overflow-x: auto;
|
|
187653
|
+
flex-wrap: nowrap;
|
|
187654
|
+
li {
|
|
187655
|
+
/* width: 100px; */
|
|
187656
|
+
height: 100%;
|
|
187657
|
+
padding: 15px;
|
|
187658
|
+
color: #fff;
|
|
187659
|
+
font-size: 12px;
|
|
187660
|
+
flex: 0 0 auto;
|
|
187661
|
+
}
|
|
187662
|
+
|
|
187663
|
+
.active {
|
|
187664
|
+
background: #1e1e1e;
|
|
187665
|
+
box-shadow: 0px 1px 0px 0 #333;
|
|
187666
|
+
/* border-left: 1px solid rgb(42 96 231);
|
|
187667
|
+
border-right: 1px solid rgb(42 96 231); */
|
|
187668
|
+
/* background: red; */
|
|
187669
|
+
}
|
|
187670
|
+
}
|
|
187671
|
+
`;
|
|
187672
|
+
const ContentLayout = newStyled.div`
|
|
187673
|
+
flex: 1;
|
|
187674
|
+
${(props2) => props2.userList.map((u2) => "." + u2.role + "{background:" + u2.color + ";width: 2px !important;}")}
|
|
187675
|
+
${(props2) => props2.userList.map((u2) => "." + u2.role + "-selection{background:" + u2.color + "a6;color: #fff;width: 2px !important;}")}
|
|
187676
|
+
`;
|
|
187625
187677
|
self.MonacoEnvironment = {
|
|
187678
|
+
baseUrl: "https://develop.1024paas.com",
|
|
187626
187679
|
getWorker(_2, label) {
|
|
187627
187680
|
if (label === "json") {
|
|
187628
187681
|
return new WorkerWrapper$3();
|
|
@@ -187678,51 +187731,6 @@ const useValue = create$3((set2) => ({
|
|
|
187678
187731
|
}))
|
|
187679
187732
|
}));
|
|
187680
187733
|
let editor;
|
|
187681
|
-
const EditorLayout = newStyled.div`
|
|
187682
|
-
width: 100%;
|
|
187683
|
-
.contentWidgets {
|
|
187684
|
-
visibility: hidden;
|
|
187685
|
-
}
|
|
187686
|
-
.monaco-label {
|
|
187687
|
-
font-size: 12px;
|
|
187688
|
-
border-radius: 2px;
|
|
187689
|
-
padding: 2px 10px;
|
|
187690
|
-
transform: scale(0.8);
|
|
187691
|
-
visibility: hidden;
|
|
187692
|
-
}
|
|
187693
|
-
.label-visible {
|
|
187694
|
-
visibility: visible !important;
|
|
187695
|
-
}
|
|
187696
|
-
|
|
187697
|
-
.stack-list {
|
|
187698
|
-
width: 100%;
|
|
187699
|
-
height: 40px;
|
|
187700
|
-
transform: translate(0, -1px);
|
|
187701
|
-
overflow-x: auto;
|
|
187702
|
-
flex-wrap: nowrap;
|
|
187703
|
-
li {
|
|
187704
|
-
/* width: 100px; */
|
|
187705
|
-
height: 100%;
|
|
187706
|
-
padding: 15px;
|
|
187707
|
-
color: #fff;
|
|
187708
|
-
font-size: 12px;
|
|
187709
|
-
flex: 0 0 auto;
|
|
187710
|
-
}
|
|
187711
|
-
|
|
187712
|
-
.active {
|
|
187713
|
-
background: #1e1e1e;
|
|
187714
|
-
box-shadow: 0px 1px 0px 0 #333;
|
|
187715
|
-
/* border-left: 1px solid rgb(42 96 231);
|
|
187716
|
-
border-right: 1px solid rgb(42 96 231); */
|
|
187717
|
-
/* background: red; */
|
|
187718
|
-
}
|
|
187719
|
-
}
|
|
187720
|
-
`;
|
|
187721
|
-
const ContentLayout = newStyled.div`
|
|
187722
|
-
flex: 1;
|
|
187723
|
-
${(props2) => props2.userList.map((u2) => "." + u2.role + "{background:" + u2.color + ";width: 2px !important;}")}
|
|
187724
|
-
${(props2) => props2.userList.map((u2) => "." + u2.role + "-selection{background:" + u2.color + "a6;color: #fff;width: 2px !important;}")}
|
|
187725
|
-
`;
|
|
187726
187734
|
const Editor = ({
|
|
187727
187735
|
doc: doc2,
|
|
187728
187736
|
containerStyle,
|
|
@@ -187739,7 +187747,7 @@ const Editor = ({
|
|
|
187739
187747
|
const setValue2 = useValue((state) => state.setValue);
|
|
187740
187748
|
useValue((state) => state.setDelta);
|
|
187741
187749
|
const [FileTreeStack, setFileTreeStack] = react.exports.useState([]);
|
|
187742
|
-
const
|
|
187750
|
+
const debounced = lodash$2.exports.debounce((callback) => {
|
|
187743
187751
|
callback();
|
|
187744
187752
|
}, 300);
|
|
187745
187753
|
const receiveOperation = (revision, operation, _path) => {
|
|
@@ -187787,12 +187795,16 @@ const Editor = ({
|
|
|
187787
187795
|
preOffset = change.rangeOffset + change.rangeLength;
|
|
187788
187796
|
});
|
|
187789
187797
|
client2.applyClient(operation);
|
|
187790
|
-
setLocalFile((doc22 == null ? void 0 : doc22.path) ? doc22 == null ? void 0 : doc22.path : "singleFile",
|
|
187798
|
+
setLocalFile((doc22 == null ? void 0 : doc22.path) ? doc22 == null ? void 0 : doc22.path : "singleFile", {
|
|
187799
|
+
value: editor.getValue(),
|
|
187800
|
+
revision: client2.revision + 1
|
|
187801
|
+
});
|
|
187791
187802
|
} else {
|
|
187792
187803
|
setValue2(changes[0].text);
|
|
187793
187804
|
}
|
|
187794
187805
|
});
|
|
187795
187806
|
editor.onDidScrollChange((evt) => {
|
|
187807
|
+
var _a2, _b2;
|
|
187796
187808
|
if (!evt.scrollLeftChanged && !evt.scrollTopChanged)
|
|
187797
187809
|
return;
|
|
187798
187810
|
const {
|
|
@@ -187809,10 +187821,7 @@ const Editor = ({
|
|
|
187809
187821
|
leftPercent
|
|
187810
187822
|
}
|
|
187811
187823
|
};
|
|
187812
|
-
|
|
187813
|
-
var _a2, _b2;
|
|
187814
|
-
(_b2 = (_a2 = useOT.getState()) == null ? void 0 : _a2.socket) == null ? void 0 : _b2.emit("extraSync", JSON.stringify(crdt));
|
|
187815
|
-
});
|
|
187824
|
+
(_b2 = (_a2 = useOT.getState()) == null ? void 0 : _a2.socket) == null ? void 0 : _b2.emit("extraSync", JSON.stringify(crdt));
|
|
187816
187825
|
});
|
|
187817
187826
|
editor.createContextKey("save", true);
|
|
187818
187827
|
editor.addCommand(KeyMod.CtrlCmd | KeyCode.KeyS, () => {
|
|
@@ -187829,7 +187838,6 @@ const Editor = ({
|
|
|
187829
187838
|
});
|
|
187830
187839
|
}, "save");
|
|
187831
187840
|
client2.sendOperation = function(revision, operation) {
|
|
187832
|
-
var _a2, _b2;
|
|
187833
187841
|
if (oTStore.getState().appStatus === "replay")
|
|
187834
187842
|
return;
|
|
187835
187843
|
const {
|
|
@@ -187851,7 +187859,10 @@ const Editor = ({
|
|
|
187851
187859
|
path: doc22 == null ? void 0 : doc22.path
|
|
187852
187860
|
}
|
|
187853
187861
|
};
|
|
187854
|
-
(
|
|
187862
|
+
debounced(() => {
|
|
187863
|
+
var _a2, _b2;
|
|
187864
|
+
(_b2 = (_a2 = useOT.getState()) == null ? void 0 : _a2.socket) == null ? void 0 : _b2.emit("editFile", JSON.stringify(crdt));
|
|
187865
|
+
});
|
|
187855
187866
|
};
|
|
187856
187867
|
};
|
|
187857
187868
|
const updateLspOps = ({
|
|
@@ -187879,7 +187890,10 @@ const Editor = ({
|
|
|
187879
187890
|
revision: client2.revision,
|
|
187880
187891
|
value: file.value
|
|
187881
187892
|
});
|
|
187882
|
-
oTStore.getState().appStatus !== "replay" && setLocalFile(doc22 == null ? void 0 : doc22.path,
|
|
187893
|
+
oTStore.getState().appStatus !== "replay" && setLocalFile(doc22 == null ? void 0 : doc22.path, {
|
|
187894
|
+
value: file.value,
|
|
187895
|
+
revision: client2.revision
|
|
187896
|
+
});
|
|
187883
187897
|
}
|
|
187884
187898
|
};
|
|
187885
187899
|
const lspServerInject = (_lan, useLsp) => {
|
|
@@ -187888,6 +187902,11 @@ const Editor = ({
|
|
|
187888
187902
|
extensions: [".rb"],
|
|
187889
187903
|
aliases: ["ruby", "RUBY"]
|
|
187890
187904
|
});
|
|
187905
|
+
languages.register({
|
|
187906
|
+
id: "python",
|
|
187907
|
+
extensions: [".py"],
|
|
187908
|
+
aliases: ["python", "PYTHON"]
|
|
187909
|
+
});
|
|
187891
187910
|
languages.register({
|
|
187892
187911
|
id: "java",
|
|
187893
187912
|
extensions: [".java"],
|
|
@@ -187921,7 +187940,7 @@ const Editor = ({
|
|
|
187921
187940
|
const languageClient = new lib.MonacoLanguageClient({
|
|
187922
187941
|
name: "Language Client",
|
|
187923
187942
|
clientOptions: {
|
|
187924
|
-
documentSelector: ["java", "ruby"],
|
|
187943
|
+
documentSelector: ["java", "ruby", "python"],
|
|
187925
187944
|
errorHandler: {
|
|
187926
187945
|
error: () => lib.ErrorAction.Continue,
|
|
187927
187946
|
closed: () => lib.CloseAction.DoNotRestart
|
|
@@ -187998,8 +188017,11 @@ const Editor = ({
|
|
|
187998
188017
|
}
|
|
187999
188018
|
return result;
|
|
188000
188019
|
};
|
|
188020
|
+
window.ot = __spreadProps(__spreadValues({}, ot), {
|
|
188021
|
+
oTStore,
|
|
188022
|
+
editor
|
|
188023
|
+
});
|
|
188001
188024
|
}
|
|
188002
|
-
window.ot = ot;
|
|
188003
188025
|
};
|
|
188004
188026
|
react.exports.useEffect(() => {
|
|
188005
188027
|
editorInit();
|
|
@@ -195679,7 +195701,7 @@ const TerminalComponent = (_i) => {
|
|
|
195679
195701
|
if (postUser && !IsMe(CRDTInfo.userInfo)) {
|
|
195680
195702
|
const helperContainer = (_c2 = terminal == null ? void 0 : terminal._core) == null ? void 0 : _c2._helperContainer;
|
|
195681
195703
|
const childNode = helperContainer == null ? void 0 : helperContainer.firstChild;
|
|
195682
|
-
userLabel.innerText = postUser.
|
|
195704
|
+
userLabel.innerText = postUser.username;
|
|
195683
195705
|
userLabel.style.backgroundColor = postUser.color;
|
|
195684
195706
|
userLabel.style.top = childNode.style.top;
|
|
195685
195707
|
userLabel.style.left = childNode.style.left;
|