@dao42/d42paas-front 0.6.2 → 0.6.3
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/package.json +1 -1
- package/dist/DaoPaaS.es.js +0 -229895
- package/dist/DaoPaaS.umd.js +0 -2753
- package/dist/assets/css.worker.5157db2f.js +0 -62
- package/dist/assets/editor.worker.43309ac9.js +0 -4
- package/dist/assets/html.worker.3f2697f1.js +0 -452
- package/dist/assets/json.worker.66c12891.js +0 -35
- package/dist/assets/ts.worker.d75e32f4.js +0 -35320
- package/dist/dev.html +0 -35
- package/dist/editor.d.ts +0 -262
- package/dist/index.html +0 -61
- package/dist/sdkserver.html +0 -36
- package/dist/style.css +0 -33
- package/dist/tsdoc.html +0 -59
package/dist/dev.html
DELETED
|
@@ -1,35 +0,0 @@
|
|
|
1
|
-
<!DOCTYPE html>
|
|
2
|
-
<html lang="en">
|
|
3
|
-
<head>
|
|
4
|
-
<meta charset="UTF-8">
|
|
5
|
-
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
|
6
|
-
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
|
7
|
-
<title>DaoPaaS</title>
|
|
8
|
-
<link rel="stylesheet" href="https://cdn.jsdelivr.net/gh/devicons/devicon@v2.14.0/devicon.min.css" crossorigin="anonymous" />
|
|
9
|
-
<script src="https://cdn.tailwindcss.com"></script>
|
|
10
|
-
</head>
|
|
11
|
-
<body>
|
|
12
|
-
<main>
|
|
13
|
-
<div class="edit-container"></div>
|
|
14
|
-
</main>
|
|
15
|
-
<script>
|
|
16
|
-
window.onload = () => {
|
|
17
|
-
var qs = new URLSearchParams(document.location.search.substring(1));
|
|
18
|
-
window.daopaas = new DaoPaaS({
|
|
19
|
-
ticket: qs.get('ticket'),
|
|
20
|
-
playgroundId: qs.get('playgroundId'),
|
|
21
|
-
userId: qs.get('userId'),
|
|
22
|
-
tenantId: qs.get('tenantId'),
|
|
23
|
-
username: qs.get('username')
|
|
24
|
-
});
|
|
25
|
-
daopaas.Page({
|
|
26
|
-
container: document.querySelector('main'),
|
|
27
|
-
// props: {
|
|
28
|
-
// playgroundId: search,
|
|
29
|
-
// }
|
|
30
|
-
}
|
|
31
|
-
)
|
|
32
|
-
}
|
|
33
|
-
</script>
|
|
34
|
-
</body>
|
|
35
|
-
</html>
|
package/dist/editor.d.ts
DELETED
|
@@ -1,262 +0,0 @@
|
|
|
1
|
-
/*!-----------------------------------------------------------
|
|
2
|
-
* Copyright (c) dao42. All rights reserved.
|
|
3
|
-
* Type definitions for @dao42/d42paas-front
|
|
4
|
-
* Released under the MIT license
|
|
5
|
-
*-----------------------------------------------------------*/
|
|
6
|
-
|
|
7
|
-
/*---------------------------------------------------------------------------------------------
|
|
8
|
-
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
9
|
-
* Licensed under the MIT License. See License.txt in the project root for license information.
|
|
10
|
-
*--------------------------------------------------------------------------------------------*/
|
|
11
|
-
|
|
12
|
-
export type TMode = 'tsdoc' | 'singleFile' | 'IDE';
|
|
13
|
-
|
|
14
|
-
export type T_PlaygroundStatus = 'EMPTY' | 'ACTIVE' | 'INACTIVE';
|
|
15
|
-
|
|
16
|
-
export type TReplay = 'stop' | 'disabled' | 'pause';
|
|
17
|
-
|
|
18
|
-
export type T_DockerStatus = 'RUNNING' | 'STOP';
|
|
19
|
-
|
|
20
|
-
/**
|
|
21
|
-
* UserInfo for caller.
|
|
22
|
-
*/
|
|
23
|
-
interface TUserInfo {
|
|
24
|
-
playgroundId?: string;
|
|
25
|
-
operation?: any;
|
|
26
|
-
uuid?: string;
|
|
27
|
-
color?: string;
|
|
28
|
-
name?: string;
|
|
29
|
-
username?: string;
|
|
30
|
-
userId?: string;
|
|
31
|
-
role?: string;
|
|
32
|
-
avatar?: string;
|
|
33
|
-
onlineCount?: number;
|
|
34
|
-
// [x: string]:
|
|
35
|
-
// | string
|
|
36
|
-
// | number
|
|
37
|
-
// | qs.ParsedQs
|
|
38
|
-
// | string[]
|
|
39
|
-
// | number[]
|
|
40
|
-
// | qs.ParsedQs[];
|
|
41
|
-
// [x: string]: string | qs.ParsedQs | string[] | qs.ParsedQs[];
|
|
42
|
-
}
|
|
43
|
-
|
|
44
|
-
/**
|
|
45
|
-
* the arguments of the Playground.
|
|
46
|
-
*/
|
|
47
|
-
interface TConstructor {
|
|
48
|
-
serviceWorkerOrigin?: string;
|
|
49
|
-
|
|
50
|
-
/**
|
|
51
|
-
*
|
|
52
|
-
* init the playground with the mode.
|
|
53
|
-
*
|
|
54
|
-
*/
|
|
55
|
-
|
|
56
|
-
mode?: TMode;
|
|
57
|
-
|
|
58
|
-
/**
|
|
59
|
-
*
|
|
60
|
-
* init the playground with the env.
|
|
61
|
-
*
|
|
62
|
-
*/
|
|
63
|
-
env?: string;
|
|
64
|
-
|
|
65
|
-
/**
|
|
66
|
-
*
|
|
67
|
-
* init the playground ticket needed.
|
|
68
|
-
*
|
|
69
|
-
*/
|
|
70
|
-
ticket: string;
|
|
71
|
-
|
|
72
|
-
/**
|
|
73
|
-
*
|
|
74
|
-
* to init the playground with this id.
|
|
75
|
-
*
|
|
76
|
-
*/
|
|
77
|
-
playgroundId: string;
|
|
78
|
-
|
|
79
|
-
/**
|
|
80
|
-
*
|
|
81
|
-
* userId for the playground.
|
|
82
|
-
*
|
|
83
|
-
*/
|
|
84
|
-
userId: string;
|
|
85
|
-
|
|
86
|
-
/**
|
|
87
|
-
*
|
|
88
|
-
* tenantId for the playground.
|
|
89
|
-
*
|
|
90
|
-
*/
|
|
91
|
-
tenantId: string;
|
|
92
|
-
|
|
93
|
-
/**
|
|
94
|
-
*
|
|
95
|
-
* username for the playground.
|
|
96
|
-
*
|
|
97
|
-
*/
|
|
98
|
-
username?: string;
|
|
99
|
-
|
|
100
|
-
/**
|
|
101
|
-
*
|
|
102
|
-
* avatarUrl for the playground but not necessarily.
|
|
103
|
-
*
|
|
104
|
-
*/
|
|
105
|
-
avatarUrl?: string;
|
|
106
|
-
|
|
107
|
-
/**
|
|
108
|
-
*
|
|
109
|
-
* this argument is to ingnore replaying patterns.
|
|
110
|
-
*
|
|
111
|
-
*/
|
|
112
|
-
ignoreReplayers?: keyof D42_FrontType['CRDT'][];
|
|
113
|
-
|
|
114
|
-
components?: UserComponent[];
|
|
115
|
-
|
|
116
|
-
// render?: () => TComponentArgs[];
|
|
117
|
-
}
|
|
118
|
-
|
|
119
|
-
export interface UserComponent extends TComponentArgs {
|
|
120
|
-
item: string;
|
|
121
|
-
}
|
|
122
|
-
|
|
123
|
-
/**
|
|
124
|
-
*
|
|
125
|
-
* @interface TComponentArgs
|
|
126
|
-
* @desc
|
|
127
|
-
*
|
|
128
|
-
*/
|
|
129
|
-
export interface TComponentArgs {
|
|
130
|
-
/**
|
|
131
|
-
*
|
|
132
|
-
* the DOM for the component.
|
|
133
|
-
* @type {(string | HTMLElement | Element)}
|
|
134
|
-
* @memberof TComponentArgs
|
|
135
|
-
*
|
|
136
|
-
*/
|
|
137
|
-
container: string | HTMLElement | Element;
|
|
138
|
-
|
|
139
|
-
props?: any;
|
|
140
|
-
}
|
|
141
|
-
|
|
142
|
-
export class DaoPaaS {
|
|
143
|
-
constructor(args: TConstructor);
|
|
144
|
-
|
|
145
|
-
get playgroundStatus(): T_PlaygroundStatus;
|
|
146
|
-
|
|
147
|
-
get dockerStatus(): T_DockerStatus;
|
|
148
|
-
|
|
149
|
-
get userList(): TUserInfo[];
|
|
150
|
-
|
|
151
|
-
/**
|
|
152
|
-
*
|
|
153
|
-
* Replaying method for global calling.
|
|
154
|
-
* @param {TReplay} args
|
|
155
|
-
*
|
|
156
|
-
*/
|
|
157
|
-
replay(args: { userId: TUserInfo['userId']; timestamp: string }): void;
|
|
158
|
-
|
|
159
|
-
/**
|
|
160
|
-
*
|
|
161
|
-
* Recording method for global calling.
|
|
162
|
-
* @param {boolean} arg
|
|
163
|
-
*
|
|
164
|
-
*/
|
|
165
|
-
record(arg: boolean): void;
|
|
166
|
-
|
|
167
|
-
/**
|
|
168
|
-
*
|
|
169
|
-
* async method to set Replayers.
|
|
170
|
-
* @param {keyof D42_FrontType['CRDT'][]} arg
|
|
171
|
-
*
|
|
172
|
-
*/
|
|
173
|
-
setReplayers(arg: string[]): void;
|
|
174
|
-
|
|
175
|
-
/**
|
|
176
|
-
*
|
|
177
|
-
* Here you can switch language services by calling this method.
|
|
178
|
-
* @param {boolean} arg
|
|
179
|
-
*
|
|
180
|
-
*/
|
|
181
|
-
switchLspServer(arg: boolean): void;
|
|
182
|
-
|
|
183
|
-
/**
|
|
184
|
-
*
|
|
185
|
-
* Active the playground handler.
|
|
186
|
-
* @memberof DaoPaaS
|
|
187
|
-
*
|
|
188
|
-
*/
|
|
189
|
-
activePlayground(): void;
|
|
190
|
-
|
|
191
|
-
/**
|
|
192
|
-
*
|
|
193
|
-
* Run the playground handler.
|
|
194
|
-
* @memberof DaoPaaS
|
|
195
|
-
*
|
|
196
|
-
*/
|
|
197
|
-
runPlayground(): void;
|
|
198
|
-
|
|
199
|
-
/**
|
|
200
|
-
*
|
|
201
|
-
* Stop the playground.
|
|
202
|
-
* @memberof DaoPaaS
|
|
203
|
-
*
|
|
204
|
-
*/
|
|
205
|
-
stopPlayground(): void;
|
|
206
|
-
|
|
207
|
-
/**
|
|
208
|
-
*
|
|
209
|
-
* Editor component.
|
|
210
|
-
* @memberof DaoPaaS
|
|
211
|
-
* CSS.Properties<string | number>
|
|
212
|
-
*/
|
|
213
|
-
Editor(
|
|
214
|
-
args:
|
|
215
|
-
| TComponentArgs
|
|
216
|
-
| {
|
|
217
|
-
containerStyle: any;
|
|
218
|
-
editorStyle: any;
|
|
219
|
-
menuStyle: any;
|
|
220
|
-
},
|
|
221
|
-
): void;
|
|
222
|
-
|
|
223
|
-
/**
|
|
224
|
-
*
|
|
225
|
-
* Page component.
|
|
226
|
-
* @memberof DaoPaaS
|
|
227
|
-
*
|
|
228
|
-
*/
|
|
229
|
-
Page(args: TComponentArgs): void;
|
|
230
|
-
|
|
231
|
-
/**
|
|
232
|
-
*
|
|
233
|
-
* Tree component.
|
|
234
|
-
* @memberof DaoPaaS
|
|
235
|
-
*
|
|
236
|
-
*/
|
|
237
|
-
Tree(args: TComponentArgs): void;
|
|
238
|
-
|
|
239
|
-
/**
|
|
240
|
-
*
|
|
241
|
-
* Shell component.
|
|
242
|
-
* @memberof DaoPaaS
|
|
243
|
-
*
|
|
244
|
-
*/
|
|
245
|
-
Shell(args: TComponentArgs): void;
|
|
246
|
-
|
|
247
|
-
/**
|
|
248
|
-
*
|
|
249
|
-
* Browser component.
|
|
250
|
-
* @memberof DaoPaaS
|
|
251
|
-
*
|
|
252
|
-
*/
|
|
253
|
-
Browser(args: TComponentArgs): void;
|
|
254
|
-
|
|
255
|
-
/**
|
|
256
|
-
*
|
|
257
|
-
* Console component.
|
|
258
|
-
* @memberof DaoPaaS
|
|
259
|
-
*
|
|
260
|
-
*/
|
|
261
|
-
Console(args: TComponentArgs): void;
|
|
262
|
-
}
|
package/dist/index.html
DELETED
|
@@ -1,61 +0,0 @@
|
|
|
1
|
-
<!DOCTYPE html>
|
|
2
|
-
<html lang="en">
|
|
3
|
-
<head>
|
|
4
|
-
<meta charset="UTF-8">
|
|
5
|
-
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
|
6
|
-
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
|
7
|
-
<title>DaoPaaS</title>
|
|
8
|
-
<style>
|
|
9
|
-
main {
|
|
10
|
-
width: 100%;
|
|
11
|
-
height: 100vh;
|
|
12
|
-
overflow: hidden;
|
|
13
|
-
}
|
|
14
|
-
.edit-container {
|
|
15
|
-
height: 100%;
|
|
16
|
-
}
|
|
17
|
-
</style>
|
|
18
|
-
<link rel="stylesheet" href="https://cdn.jsdelivr.net/gh/devicons/devicon@v2.14.0/devicon.min.css" crossorigin="anonymous" />
|
|
19
|
-
<!-- <script src="https://cdn.tailwindcss.com"></script> -->
|
|
20
|
-
<link rel="stylesheet" href="./style.css" crossorigin="anonymous" />
|
|
21
|
-
|
|
22
|
-
</head>
|
|
23
|
-
<body>
|
|
24
|
-
<main>
|
|
25
|
-
<div class="edit-container"></div>
|
|
26
|
-
</main>
|
|
27
|
-
<!-- <script src="/dist/daoPaaS.js"></script> -->
|
|
28
|
-
<script type="module" src="./DaoPaaS.umd.js"></script>
|
|
29
|
-
|
|
30
|
-
<script>
|
|
31
|
-
window.onload = () => {
|
|
32
|
-
window.daopaas = DaoPaaS;
|
|
33
|
-
|
|
34
|
-
var qs = new URLSearchParams(document.location.search.substring(1));
|
|
35
|
-
const env = qs.get('env');
|
|
36
|
-
const ticket = qs.get('ticket');
|
|
37
|
-
const playgroundId = qs.get('playgroundId');
|
|
38
|
-
|
|
39
|
-
window.daopaas = new DaoPaaS.DaoPaaS({
|
|
40
|
-
ticket,
|
|
41
|
-
playgroundId,
|
|
42
|
-
userId: qs.get('userId'),
|
|
43
|
-
tenantId: '1',
|
|
44
|
-
username: qs.get('username'),
|
|
45
|
-
env: env ? env : 'develop',
|
|
46
|
-
serviceWorkerOrigin: 'https://develop.1024paas.com',
|
|
47
|
-
// playgroundId: qs.get('playgroundId'),
|
|
48
|
-
// playgroundId: qs.get('playgroundId'),
|
|
49
|
-
// tenantId: qs.get('tenantId'),
|
|
50
|
-
});
|
|
51
|
-
daopaas.Page({
|
|
52
|
-
container: document.querySelector('.edit-container'),
|
|
53
|
-
// props: {
|
|
54
|
-
// playgroundId: search,
|
|
55
|
-
// }
|
|
56
|
-
}
|
|
57
|
-
)
|
|
58
|
-
}
|
|
59
|
-
</script>
|
|
60
|
-
</body>
|
|
61
|
-
</html>
|
package/dist/sdkserver.html
DELETED
|
@@ -1,36 +0,0 @@
|
|
|
1
|
-
<!DOCTYPE html>
|
|
2
|
-
<html lang="en">
|
|
3
|
-
<head>
|
|
4
|
-
<meta charset="UTF-8">
|
|
5
|
-
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
|
6
|
-
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
|
7
|
-
<title>DaoPaaS</title>
|
|
8
|
-
<link rel="stylesheet" href="https://cdn.jsdelivr.net/gh/devicons/devicon@v2.14.0/devicon.min.css" crossorigin="anonymous" />
|
|
9
|
-
<script src="https://cdn.tailwindcss.com"></script>
|
|
10
|
-
|
|
11
|
-
</head>
|
|
12
|
-
<body>
|
|
13
|
-
<main></main>
|
|
14
|
-
<script>
|
|
15
|
-
window.onload = () => {
|
|
16
|
-
var qs = new URLSearchParams(document.location.search.substring(1));
|
|
17
|
-
// console.log(DaoPaaS);
|
|
18
|
-
var daopaas = new DaoPaaS({
|
|
19
|
-
ticket: qs.get('ticket'),
|
|
20
|
-
playgroundId: qs.get('playgroundId'),
|
|
21
|
-
userId: qs.get('userId'),
|
|
22
|
-
tenantId: qs.get('tenantId'),
|
|
23
|
-
username: qs.get('username')
|
|
24
|
-
});
|
|
25
|
-
daopaas.Page({
|
|
26
|
-
container: document.querySelector('main'),
|
|
27
|
-
// props: {
|
|
28
|
-
// playgroundId: search,
|
|
29
|
-
// }
|
|
30
|
-
}
|
|
31
|
-
)
|
|
32
|
-
}
|
|
33
|
-
|
|
34
|
-
</script>
|
|
35
|
-
</body>
|
|
36
|
-
</html>
|