@dao42/d42paas-front 0.7.25 → 0.7.30
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 +53 -53
- package/dist/DaoPaaS.umd.js +435 -435
- package/dist/editor.d.ts +64 -41
- package/package.json +3 -3
package/dist/editor.d.ts
CHANGED
|
@@ -8,19 +8,30 @@
|
|
|
8
8
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
9
9
|
* Licensed under the MIT License. See License.txt in the project root for license information.
|
|
10
10
|
*--------------------------------------------------------------------------------------------*/
|
|
11
|
+
export type Mode = 'tsdoc' | 'singleFile' | 'IDE';
|
|
11
12
|
|
|
12
|
-
export type
|
|
13
|
+
export type PlaygroundStatus = 'EMPTY' | 'ACTIVE' | 'INACTIVE';
|
|
13
14
|
|
|
14
|
-
export type
|
|
15
|
+
export type Replay = 'stop' | 'disabled' | 'pause';
|
|
15
16
|
|
|
16
|
-
export type
|
|
17
|
+
export type DockerStatus = 'RUNNING' | 'STOP';
|
|
17
18
|
|
|
18
|
-
|
|
19
|
+
type MessageType = {
|
|
20
|
+
PlaygroundStatus?: PlaygroundStatus;
|
|
21
|
+
dockerStatus?: DockerStatus;
|
|
22
|
+
userList?: UserInfo[];
|
|
23
|
+
};
|
|
24
|
+
|
|
25
|
+
type ErrorType = {
|
|
26
|
+
PlaygroundStatus?: any;
|
|
27
|
+
dockerStatus?: DockerStatus;
|
|
28
|
+
userList?: UserInfo[];
|
|
29
|
+
};
|
|
19
30
|
|
|
20
31
|
/**
|
|
21
|
-
*
|
|
32
|
+
* Userinfo type
|
|
22
33
|
*/
|
|
23
|
-
interface
|
|
34
|
+
interface UserInfo {
|
|
24
35
|
playgroundId?: string;
|
|
25
36
|
operation?: any;
|
|
26
37
|
uuid?: string;
|
|
@@ -33,15 +44,30 @@ interface TUserInfo {
|
|
|
33
44
|
onlineCount?: number;
|
|
34
45
|
}
|
|
35
46
|
|
|
47
|
+
type ReplayType = {
|
|
48
|
+
userId?: UserInfo['userId'];
|
|
49
|
+
timestamp: number;
|
|
50
|
+
};
|
|
51
|
+
|
|
36
52
|
/**
|
|
37
|
-
* the
|
|
53
|
+
* Passing the values to init the playground.
|
|
38
54
|
*/
|
|
39
|
-
interface
|
|
55
|
+
export interface Options {
|
|
40
56
|
debug?: boolean;
|
|
41
57
|
|
|
58
|
+
/**
|
|
59
|
+
*
|
|
60
|
+
* Error listener to the aplication.
|
|
61
|
+
* @param error
|
|
62
|
+
*/
|
|
42
63
|
onError?: (error: any) => void;
|
|
43
64
|
|
|
44
|
-
|
|
65
|
+
/**
|
|
66
|
+
*
|
|
67
|
+
* Message listener to the aplication.
|
|
68
|
+
* @param MessageType
|
|
69
|
+
*/
|
|
70
|
+
onMessage?: (message: MessageType) => void;
|
|
45
71
|
|
|
46
72
|
serviceWorkerOrigin?: string;
|
|
47
73
|
|
|
@@ -50,12 +76,11 @@ interface TConstructor {
|
|
|
50
76
|
* init the playground with the mode.
|
|
51
77
|
*
|
|
52
78
|
*/
|
|
53
|
-
|
|
54
|
-
mode?: TMode;
|
|
79
|
+
mode?: Mode;
|
|
55
80
|
|
|
56
81
|
/**
|
|
57
82
|
*
|
|
58
|
-
* init the playground with the
|
|
83
|
+
* init the playground with the paasDomain.
|
|
59
84
|
*
|
|
60
85
|
*/
|
|
61
86
|
paasDomain: string;
|
|
@@ -118,22 +143,21 @@ interface TConstructor {
|
|
|
118
143
|
*/
|
|
119
144
|
}
|
|
120
145
|
|
|
121
|
-
export interface UserComponent extends
|
|
146
|
+
export interface UserComponent extends ComponentArgs {
|
|
122
147
|
item: string;
|
|
123
148
|
}
|
|
124
149
|
|
|
125
150
|
/**
|
|
126
151
|
*
|
|
127
|
-
* @interface
|
|
152
|
+
* @interface ComponentArgs
|
|
128
153
|
* @desc
|
|
129
154
|
*
|
|
130
155
|
*/
|
|
131
|
-
export interface
|
|
156
|
+
export interface ComponentArgs {
|
|
132
157
|
/**
|
|
133
158
|
*
|
|
134
159
|
* the DOM for the component.
|
|
135
160
|
* @type {(string | HTMLElement | Element)}
|
|
136
|
-
* @memberof TComponentArgs
|
|
137
161
|
*
|
|
138
162
|
*/
|
|
139
163
|
container: string | HTMLElement | Element;
|
|
@@ -141,14 +165,17 @@ export interface TComponentArgs {
|
|
|
141
165
|
props?: any;
|
|
142
166
|
}
|
|
143
167
|
|
|
168
|
+
/**
|
|
169
|
+
* This is the entry point for the application.
|
|
170
|
+
*/
|
|
144
171
|
export class DaoPaaS {
|
|
145
|
-
constructor(
|
|
172
|
+
constructor(options: Options);
|
|
146
173
|
|
|
147
|
-
get playgroundStatus():
|
|
174
|
+
get playgroundStatus(): PlaygroundStatus;
|
|
148
175
|
|
|
149
|
-
get dockerStatus():
|
|
176
|
+
get dockerStatus(): DockerStatus;
|
|
150
177
|
|
|
151
|
-
get userList():
|
|
178
|
+
get userList(): UserInfo[];
|
|
152
179
|
|
|
153
180
|
/**
|
|
154
181
|
*
|
|
@@ -157,7 +184,7 @@ export class DaoPaaS {
|
|
|
157
184
|
*
|
|
158
185
|
*/
|
|
159
186
|
|
|
160
|
-
unFollowUser(user:
|
|
187
|
+
unFollowUser(user: UserInfo, callback: () => void): void;
|
|
161
188
|
|
|
162
189
|
/**
|
|
163
190
|
*
|
|
@@ -165,16 +192,15 @@ export class DaoPaaS {
|
|
|
165
192
|
* @param {followUser} args
|
|
166
193
|
*
|
|
167
194
|
*/
|
|
168
|
-
|
|
169
|
-
followUser(user: any, callback: () => void): void;
|
|
195
|
+
followUser(user: UserInfo, callback: () => void): void;
|
|
170
196
|
|
|
171
197
|
/**
|
|
172
198
|
*
|
|
173
199
|
* Replaying method for global calling.
|
|
174
|
-
* @param {
|
|
200
|
+
* @param {ReplayType} args
|
|
175
201
|
*
|
|
176
202
|
*/
|
|
177
|
-
replay(
|
|
203
|
+
replay(param: ReplayType): void;
|
|
178
204
|
|
|
179
205
|
/**
|
|
180
206
|
*
|
|
@@ -182,7 +208,7 @@ export class DaoPaaS {
|
|
|
182
208
|
* @param {boolean} arg
|
|
183
209
|
*
|
|
184
210
|
*/
|
|
185
|
-
record(arg
|
|
211
|
+
record(arg?: boolean): void;
|
|
186
212
|
|
|
187
213
|
/**
|
|
188
214
|
*
|
|
@@ -203,7 +229,6 @@ export class DaoPaaS {
|
|
|
203
229
|
/**
|
|
204
230
|
*
|
|
205
231
|
* Active the playground handler.
|
|
206
|
-
* @memberof DaoPaaS
|
|
207
232
|
*
|
|
208
233
|
*/
|
|
209
234
|
activePlayground(): void;
|
|
@@ -211,7 +236,6 @@ export class DaoPaaS {
|
|
|
211
236
|
/**
|
|
212
237
|
*
|
|
213
238
|
* Run the playground handler.
|
|
214
|
-
* @memberof DaoPaaS
|
|
215
239
|
*
|
|
216
240
|
*/
|
|
217
241
|
runPlayground(): void;
|
|
@@ -219,7 +243,6 @@ export class DaoPaaS {
|
|
|
219
243
|
/**
|
|
220
244
|
*
|
|
221
245
|
* Stop the playground.
|
|
222
|
-
* @memberof DaoPaaS
|
|
223
246
|
*
|
|
224
247
|
*/
|
|
225
248
|
stopPlayground(): void;
|
|
@@ -227,12 +250,12 @@ export class DaoPaaS {
|
|
|
227
250
|
/**
|
|
228
251
|
*
|
|
229
252
|
* Editor component.
|
|
230
|
-
* @
|
|
253
|
+
* @param ComponentArgs
|
|
231
254
|
* CSS.Properties<string | number>
|
|
232
255
|
*/
|
|
233
256
|
Editor(
|
|
234
257
|
args:
|
|
235
|
-
|
|
|
258
|
+
| ComponentArgs
|
|
236
259
|
| {
|
|
237
260
|
containerStyle: any;
|
|
238
261
|
editorStyle: any;
|
|
@@ -243,40 +266,40 @@ export class DaoPaaS {
|
|
|
243
266
|
/**
|
|
244
267
|
*
|
|
245
268
|
* Page component.
|
|
246
|
-
* @
|
|
269
|
+
* @param ComponentArgs
|
|
247
270
|
*
|
|
248
271
|
*/
|
|
249
|
-
Page(args:
|
|
272
|
+
Page(args: ComponentArgs): void;
|
|
250
273
|
|
|
251
274
|
/**
|
|
252
275
|
*
|
|
253
276
|
* Tree component.
|
|
254
|
-
* @
|
|
277
|
+
* @param ComponentArgs
|
|
255
278
|
*
|
|
256
279
|
*/
|
|
257
|
-
Tree(args:
|
|
280
|
+
Tree(args: ComponentArgs): void;
|
|
258
281
|
|
|
259
282
|
/**
|
|
260
283
|
*
|
|
261
284
|
* Shell component.
|
|
262
|
-
* @
|
|
285
|
+
* @param ComponentArgs
|
|
263
286
|
*
|
|
264
287
|
*/
|
|
265
|
-
Shell(args:
|
|
288
|
+
Shell(args: ComponentArgs): void;
|
|
266
289
|
|
|
267
290
|
/**
|
|
268
291
|
*
|
|
269
292
|
* Browser component.
|
|
270
|
-
* @
|
|
293
|
+
* @param ComponentArgs
|
|
271
294
|
*
|
|
272
295
|
*/
|
|
273
|
-
Browser(args:
|
|
296
|
+
Browser(args: ComponentArgs): void;
|
|
274
297
|
|
|
275
298
|
/**
|
|
276
299
|
*
|
|
277
300
|
* Console component.
|
|
278
|
-
* @
|
|
301
|
+
* @param ComponentArgs
|
|
279
302
|
*
|
|
280
303
|
*/
|
|
281
|
-
Console(args:
|
|
304
|
+
Console(args: ComponentArgs): void;
|
|
282
305
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@dao42/d42paas-front",
|
|
3
|
-
"version": "0.7.
|
|
3
|
+
"version": "0.7.30",
|
|
4
4
|
"description": "> TODO: description",
|
|
5
5
|
"author": "eric183 <kk297466058@gmail.com>",
|
|
6
6
|
"homepage": "https://github.com/dao42/d42paas_frontend#readme",
|
|
@@ -26,7 +26,7 @@
|
|
|
26
26
|
"scripts": {
|
|
27
27
|
"prebuild": "rimraf dist",
|
|
28
28
|
"webpack": "cross-env TS_NODE_PROJECT=\"tsconfig.dev.json\" webpack --config ./config/webpack.prod.config.ts",
|
|
29
|
-
"start:web": "yarn vite && yarn workNameSpaceToFix",
|
|
29
|
+
"start:web": "yarn vite && yarn workNameSpaceToFix && yarn typedoc",
|
|
30
30
|
"storybook": "start-storybook -p 6006",
|
|
31
31
|
"build-storybook": "build-storybook -o .storybook/dist",
|
|
32
32
|
"dev:disble": "cross-env TS_NODE_PROJECT=\"tsconfig.dev.json\" webpack serve --open --config ./config/webpack.dev.config.ts",
|
|
@@ -34,6 +34,7 @@
|
|
|
34
34
|
"dev": "vite serve --host --config ./config/vite.config.ts",
|
|
35
35
|
"dev:patch": "vite serve --host --config ./config/vite.dev.config.ts",
|
|
36
36
|
"vite": "cross-env NODE_ENV=production vite build --config ./config/vite.config.ts && yarn run copyTS",
|
|
37
|
+
"typedoc": "npx typedoc --tsconfig ./doc.tsconfig.json",
|
|
37
38
|
"fix": "eslint --fix --ext .jsx src/**",
|
|
38
39
|
"copyTS": "shx cp ./src/types/editor.d.ts ./dist",
|
|
39
40
|
"np": "npm publish --access-public",
|
|
@@ -83,7 +84,6 @@
|
|
|
83
84
|
"@types/react-dom": "^17.0.9",
|
|
84
85
|
"@types/tailwindcss": "^2.2.4",
|
|
85
86
|
"@types/uuid": "^8.3.1",
|
|
86
|
-
"@types/webpack": "^5.28.0",
|
|
87
87
|
"@vitejs/plugin-react": "^1.0.7",
|
|
88
88
|
"autoprefixer": "^10.0.2",
|
|
89
89
|
"babel-core": "^6.26.3",
|