@dao42/d42paas-front 0.9.168 → 0.9.170
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/README.md +130 -0
- package/dist/DaoPaaS.cjs +503 -460
- package/dist/DaoPaaS.d.ts +3 -0
- package/dist/sdk/docs/assets/highlight.css +46 -32
- package/dist/sdk/docs/assets/search.js +1 -1
- package/dist/sdk/docs/enums/I18nLanguageType.html +2 -2
- package/dist/sdk/docs/enums/Messages.html +1 -1
- package/dist/sdk/docs/enums/ThemeType.html +2 -2
- package/dist/sdk/docs/index.html +401 -321
- package/dist/sdk/docs/interfaces/Component.html +2 -2
- package/dist/sdk/docs/interfaces/I18nResourcesType.html +1 -1
- package/dist/sdk/docs/interfaces/IDaoPaaS.html +33 -33
- package/dist/sdk/docs/interfaces/IExtralAction.html +1 -1
- package/dist/sdk/docs/interfaces/IXtermFontStyle.html +1 -1
- package/dist/sdk/docs/interfaces/PaaSOptions.html +29 -27
- package/dist/sdk/docs/interfaces/XtermStyleType.html +1 -1
- package/dist/sdk/docs/modules.html +6 -6
- package/package.json +2 -2
package/README.md
CHANGED
|
@@ -1,5 +1,135 @@
|
|
|
1
1
|
# 更新日志
|
|
2
|
+
## v0.9.170
|
|
3
|
+
### 新增
|
|
4
|
+
+ 新增支持修改过的文件显示`M`标记,
|
|
5
|
+
```ts
|
|
6
|
+
const dao = new DaoPaaS({
|
|
7
|
+
...
|
|
8
|
+
showModifyIcon: true, // 默认false, 是否展示文件修改的Icon
|
|
9
|
+
...
|
|
10
|
+
```
|
|
11
|
+
+ 新增`M`标记的文件树`Item` 样式名称`is-modified-file-item`,业务方可以参考如下覆盖自定义样式
|
|
12
|
+
```css
|
|
13
|
+
.is-modified-file-item {
|
|
14
|
+
background-color: #a4a2a2;
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
.is-modified-file-item .d42-item-title {
|
|
18
|
+
color: #fff;
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
.is-modified-file-item .rct-tree-item-arrow-path {
|
|
22
|
+
fill: #fff;
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
.is-modified-file-item .d42-action-item {
|
|
26
|
+
color: #fff;
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
.is-modified-file-item .d42-action-item path {
|
|
30
|
+
fill: #fff;
|
|
31
|
+
}
|
|
32
|
+
```
|
|
33
|
+
+ 新增支持`LSP`如果选择的是`Method`,自动补全括号
|
|
34
|
+
### 优化
|
|
35
|
+
+ 优化`FileTree`拖动文件立即展开文件夹的行为
|
|
36
|
+
+ 优化后台自动生成文件,不进入回放操作
|
|
37
|
+
+ 优化回放文件树和实际展示内容不一致问题
|
|
38
|
+
|
|
39
|
+
## v0.9.169
|
|
40
|
+
### 新增
|
|
41
|
+
+ 新增打开文件默认聚焦`Editor`, 默认聚焦文件底部`BOTTOM`,并提供配置参数`focusEditorPosition`
|
|
42
|
+
```ts
|
|
43
|
+
const dao = new DaoPaaS({
|
|
44
|
+
paasDomain:
|
|
45
|
+
process.env.PAAS_MANAGER_API_ORIGIN + (mockSdkInitFail ? '1' : ''),
|
|
46
|
+
tenantId: '3',
|
|
47
|
+
ticket: dataRes?.ticket,
|
|
48
|
+
openLspDiagnostic: true, // 默认是true,
|
|
49
|
+
focusEditorPosition: 'BOTTOM', // TOP | BOTTOM | number
|
|
50
|
+
....
|
|
51
|
+
```
|
|
52
|
+
+ 新增文件打开完成事件`fileOpenDone`,用于处理文件打开完成后要处理的事情,如跳转到上次打开位置
|
|
53
|
+
```ts
|
|
54
|
+
dao.onMessage((message: Message) => {
|
|
55
|
+
const { name, payload } = message;
|
|
56
|
+
let status: PlaygroundStatus;
|
|
57
|
+
let dockerStatus: DockerStatus;
|
|
58
|
+
let lspStatus: LspStatusEnum;
|
|
59
|
+
switch (name) {
|
|
60
|
+
case Messages.FileOpenDone: {
|
|
61
|
+
messageBox.info('FileOpenDone:' + JSON.stringify(payload));
|
|
62
|
+
const editorInfo = JSON.parse(
|
|
63
|
+
localStorage.getItem('UnFocusEditor') || '{}',
|
|
64
|
+
);
|
|
65
|
+
const prevOpenInfo = editorInfo[payload.openPath];
|
|
66
|
+
if (prevOpenInfo) {
|
|
67
|
+
// 定位光标
|
|
68
|
+
dao.focuseEditorByCursorPosition(
|
|
69
|
+
prevOpenInfo.openFile,
|
|
70
|
+
prevOpenInfo.cursorPosition,
|
|
71
|
+
);
|
|
72
|
+
}
|
|
73
|
+
break;
|
|
74
|
+
}
|
|
75
|
+
```
|
|
76
|
+
+ 新增`Editor`失去焦点事件,业务方可以在此事件记录对应文件上次编辑的位置
|
|
77
|
+
```ts
|
|
78
|
+
case Messages.UnFocusEditor: {
|
|
79
|
+
messageBox.info('UnFocusEditor:' + JSON.stringify(payload));
|
|
80
|
+
const editorInfo = JSON.parse(
|
|
81
|
+
localStorage.getItem('UnFocusEditor') || '{}',
|
|
82
|
+
);
|
|
83
|
+
editorInfo[payload.openPath] = payload;
|
|
84
|
+
localStorage.setItem('UnFocusEditor', JSON.stringify(editorInfo));
|
|
85
|
+
break;
|
|
86
|
+
}
|
|
87
|
+
```
|
|
88
|
+
+ 新增跳转到指定文件的指定位置方法`focuseEditorByCursorPosition`,可以配合`FileOpenDone` 事件使用
|
|
89
|
+
```ts
|
|
90
|
+
dao.focuseEditorByCursorPosition(
|
|
91
|
+
prevOpenInfo.openFile,
|
|
92
|
+
prevOpenInfo.cursorPosition,
|
|
93
|
+
);
|
|
94
|
+
```
|
|
95
|
+
+ 新增设置文件树指定路径文件样式`setFileStyle`
|
|
96
|
+
```ts
|
|
97
|
+
daoPaasObj?.setFileStyle({
|
|
98
|
+
paths: ['a/b/c.js', 'a/c/c.js', 'c/index.js'],
|
|
99
|
+
styles: {
|
|
100
|
+
title: 'customizeTitle',
|
|
101
|
+
icon: 'customizeIcon',
|
|
102
|
+
arrowIcon: 'customizeArrowIcon',
|
|
103
|
+
background: 'customizeBackground',
|
|
104
|
+
},
|
|
105
|
+
});
|
|
106
|
+
```
|
|
107
|
+
### 修复
|
|
108
|
+
+ 修复`C++`格式化代码问题
|
|
109
|
+
+ 修复回放模式下显示跟随模式Icon问题
|
|
2
110
|
## v0.9.168
|
|
111
|
+
### 新增
|
|
112
|
+
+ 添加跟随模式下,如果被跟随者打卡一个隐藏文件, 跟随着没有权限, 会广播对应的事件:
|
|
113
|
+
```ts
|
|
114
|
+
dao.onMessage((message: Message) => {
|
|
115
|
+
const { name, payload } = message;
|
|
116
|
+
let status: PlaygroundStatus;
|
|
117
|
+
let dockerStatus: DockerStatus;
|
|
118
|
+
let lspStatus: LspStatusEnum;
|
|
119
|
+
switch (name) {
|
|
120
|
+
case 'openLimitFile': {
|
|
121
|
+
messageBox.success('OpenLimitFile: ' + JSON.stringify(payload));
|
|
122
|
+
break;
|
|
123
|
+
}
|
|
124
|
+
...
|
|
125
|
+
setAgentUsers(payload.agentUsers);
|
|
126
|
+
if (payload.xtermKey) {
|
|
127
|
+
setActiveKey(payload.xtermKey);
|
|
128
|
+
}
|
|
129
|
+
break;
|
|
130
|
+
}
|
|
131
|
+
});
|
|
132
|
+
```
|
|
3
133
|
### 优化
|
|
4
134
|
+ 优化`markdown`预览`postion`超出文档问题
|
|
5
135
|
+ 优化非`ideserver`更新文件,文件被覆盖问题(vim编辑)
|