@dao42/d42paas-front 0.7.56 → 0.7.59
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 +104510 -100430
- package/dist/DaoPaaS.umd.js +1926 -1822
- package/dist/editor.d.ts +684 -644
- package/dist/style.css +2 -2
- package/package.json +188 -204
package/dist/editor.d.ts
CHANGED
|
@@ -1,644 +1,684 @@
|
|
|
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
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
| '
|
|
19
|
-
| '
|
|
20
|
-
| '
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
//
|
|
102
|
-
//
|
|
103
|
-
//
|
|
104
|
-
//
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
*
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
/**
|
|
149
|
-
* The
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
/**
|
|
220
|
-
* The
|
|
221
|
-
*/
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
/**
|
|
225
|
-
* The
|
|
226
|
-
*/
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
/**
|
|
258
|
-
* The
|
|
259
|
-
*/
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
/**
|
|
263
|
-
*
|
|
264
|
-
*/
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
/**
|
|
268
|
-
* The
|
|
269
|
-
*/
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
/**
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
/**
|
|
320
|
-
*
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
|
|
335
|
-
|
|
336
|
-
|
|
337
|
-
|
|
338
|
-
|
|
339
|
-
|
|
340
|
-
|
|
341
|
-
|
|
342
|
-
|
|
343
|
-
|
|
344
|
-
|
|
345
|
-
|
|
346
|
-
|
|
347
|
-
|
|
348
|
-
|
|
349
|
-
|
|
350
|
-
|
|
351
|
-
|
|
352
|
-
|
|
353
|
-
|
|
354
|
-
|
|
355
|
-
|
|
356
|
-
|
|
357
|
-
|
|
358
|
-
|
|
359
|
-
|
|
360
|
-
|
|
361
|
-
|
|
362
|
-
|
|
363
|
-
|
|
364
|
-
|
|
365
|
-
|
|
366
|
-
|
|
367
|
-
|
|
368
|
-
*
|
|
369
|
-
|
|
370
|
-
|
|
371
|
-
|
|
372
|
-
|
|
373
|
-
|
|
374
|
-
|
|
375
|
-
|
|
376
|
-
|
|
377
|
-
|
|
378
|
-
|
|
379
|
-
|
|
380
|
-
|
|
381
|
-
|
|
382
|
-
|
|
383
|
-
|
|
384
|
-
|
|
385
|
-
|
|
386
|
-
|
|
387
|
-
|
|
388
|
-
|
|
389
|
-
|
|
390
|
-
|
|
391
|
-
|
|
392
|
-
|
|
393
|
-
|
|
394
|
-
|
|
395
|
-
|
|
396
|
-
|
|
397
|
-
|
|
398
|
-
|
|
399
|
-
|
|
400
|
-
|
|
401
|
-
|
|
402
|
-
|
|
403
|
-
|
|
404
|
-
|
|
405
|
-
|
|
406
|
-
|
|
407
|
-
|
|
408
|
-
|
|
409
|
-
|
|
410
|
-
|
|
411
|
-
|
|
412
|
-
|
|
413
|
-
*
|
|
414
|
-
*
|
|
415
|
-
|
|
416
|
-
|
|
417
|
-
|
|
418
|
-
|
|
419
|
-
|
|
420
|
-
*
|
|
421
|
-
*
|
|
422
|
-
|
|
423
|
-
|
|
424
|
-
|
|
425
|
-
|
|
426
|
-
|
|
427
|
-
|
|
428
|
-
|
|
429
|
-
|
|
430
|
-
|
|
431
|
-
|
|
432
|
-
|
|
433
|
-
|
|
434
|
-
*
|
|
435
|
-
*
|
|
436
|
-
*
|
|
437
|
-
*/
|
|
438
|
-
|
|
439
|
-
|
|
440
|
-
|
|
441
|
-
|
|
442
|
-
*
|
|
443
|
-
|
|
444
|
-
|
|
445
|
-
|
|
446
|
-
|
|
447
|
-
|
|
448
|
-
|
|
449
|
-
|
|
450
|
-
|
|
451
|
-
|
|
452
|
-
|
|
453
|
-
|
|
454
|
-
|
|
455
|
-
|
|
456
|
-
|
|
457
|
-
*
|
|
458
|
-
*
|
|
459
|
-
|
|
460
|
-
|
|
461
|
-
|
|
462
|
-
|
|
463
|
-
|
|
464
|
-
|
|
465
|
-
|
|
466
|
-
|
|
467
|
-
|
|
468
|
-
|
|
469
|
-
|
|
470
|
-
|
|
471
|
-
|
|
472
|
-
|
|
473
|
-
*
|
|
474
|
-
*/
|
|
475
|
-
|
|
476
|
-
|
|
477
|
-
|
|
478
|
-
|
|
479
|
-
|
|
480
|
-
|
|
481
|
-
|
|
482
|
-
|
|
483
|
-
|
|
484
|
-
|
|
485
|
-
|
|
486
|
-
|
|
487
|
-
|
|
488
|
-
|
|
489
|
-
|
|
490
|
-
|
|
491
|
-
|
|
492
|
-
|
|
493
|
-
|
|
494
|
-
|
|
495
|
-
|
|
496
|
-
|
|
497
|
-
|
|
498
|
-
|
|
499
|
-
|
|
500
|
-
|
|
501
|
-
|
|
502
|
-
|
|
503
|
-
*
|
|
504
|
-
*
|
|
505
|
-
|
|
506
|
-
|
|
507
|
-
|
|
508
|
-
|
|
509
|
-
|
|
510
|
-
|
|
511
|
-
*
|
|
512
|
-
*
|
|
513
|
-
*
|
|
514
|
-
|
|
515
|
-
|
|
516
|
-
|
|
517
|
-
|
|
518
|
-
|
|
519
|
-
*
|
|
520
|
-
*
|
|
521
|
-
*
|
|
522
|
-
|
|
523
|
-
|
|
524
|
-
|
|
525
|
-
|
|
526
|
-
|
|
527
|
-
*
|
|
528
|
-
*
|
|
529
|
-
|
|
530
|
-
|
|
531
|
-
|
|
532
|
-
|
|
533
|
-
|
|
534
|
-
|
|
535
|
-
*
|
|
536
|
-
|
|
537
|
-
|
|
538
|
-
|
|
539
|
-
|
|
540
|
-
|
|
541
|
-
|
|
542
|
-
|
|
543
|
-
*
|
|
544
|
-
*
|
|
545
|
-
*
|
|
546
|
-
*
|
|
547
|
-
|
|
548
|
-
|
|
549
|
-
|
|
550
|
-
|
|
551
|
-
*
|
|
552
|
-
*
|
|
553
|
-
*
|
|
554
|
-
|
|
555
|
-
|
|
556
|
-
|
|
557
|
-
|
|
558
|
-
|
|
559
|
-
*
|
|
560
|
-
*
|
|
561
|
-
*
|
|
562
|
-
|
|
563
|
-
|
|
564
|
-
|
|
565
|
-
|
|
566
|
-
|
|
567
|
-
|
|
568
|
-
*
|
|
569
|
-
|
|
570
|
-
|
|
571
|
-
|
|
572
|
-
|
|
573
|
-
*
|
|
574
|
-
*
|
|
575
|
-
*
|
|
576
|
-
|
|
577
|
-
|
|
578
|
-
|
|
579
|
-
|
|
580
|
-
*
|
|
581
|
-
*
|
|
582
|
-
*
|
|
583
|
-
|
|
584
|
-
|
|
585
|
-
|
|
586
|
-
|
|
587
|
-
*
|
|
588
|
-
*
|
|
589
|
-
|
|
590
|
-
*
|
|
591
|
-
*
|
|
592
|
-
*
|
|
593
|
-
*
|
|
594
|
-
|
|
595
|
-
|
|
596
|
-
|
|
597
|
-
|
|
598
|
-
*
|
|
599
|
-
*
|
|
600
|
-
* @
|
|
601
|
-
* @
|
|
602
|
-
*
|
|
603
|
-
|
|
604
|
-
|
|
605
|
-
|
|
606
|
-
|
|
607
|
-
|
|
608
|
-
*
|
|
609
|
-
*
|
|
610
|
-
*
|
|
611
|
-
*
|
|
612
|
-
*
|
|
613
|
-
*
|
|
614
|
-
*
|
|
615
|
-
*
|
|
616
|
-
|
|
617
|
-
|
|
618
|
-
*
|
|
619
|
-
*
|
|
620
|
-
* @
|
|
621
|
-
*
|
|
622
|
-
|
|
623
|
-
|
|
624
|
-
|
|
625
|
-
|
|
626
|
-
|
|
627
|
-
*
|
|
628
|
-
*
|
|
629
|
-
*
|
|
630
|
-
*
|
|
631
|
-
*
|
|
632
|
-
*
|
|
633
|
-
*
|
|
634
|
-
*
|
|
635
|
-
*
|
|
636
|
-
|
|
637
|
-
|
|
638
|
-
*
|
|
639
|
-
*
|
|
640
|
-
* @
|
|
641
|
-
*
|
|
642
|
-
|
|
643
|
-
|
|
644
|
-
|
|
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 interface DiffPatternInfo {
|
|
13
|
+
value: string;
|
|
14
|
+
type: string;
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
export type ComponentType =
|
|
18
|
+
| 'Page'
|
|
19
|
+
| 'Tree'
|
|
20
|
+
| 'Editor'
|
|
21
|
+
| 'Console'
|
|
22
|
+
| 'Browser'
|
|
23
|
+
| 'Shell';
|
|
24
|
+
|
|
25
|
+
export type Mode = 'tsdoc' | 'singleFile' | 'IDE';
|
|
26
|
+
|
|
27
|
+
export type PlaygroundStatus = 'EMPTY' | 'ACTIVE' | 'INACTIVE';
|
|
28
|
+
|
|
29
|
+
export type DockerStatus = 'RUNNING' | 'STOP';
|
|
30
|
+
|
|
31
|
+
// export type Replay = 'stop' | 'disabled' | 'pause';
|
|
32
|
+
interface MessageType {
|
|
33
|
+
/**
|
|
34
|
+
* The message type is use to show up the playground status.
|
|
35
|
+
*/
|
|
36
|
+
playgroundStatus?: PlaygroundStatus;
|
|
37
|
+
|
|
38
|
+
/**
|
|
39
|
+
* The message type is used to show up the docker status.
|
|
40
|
+
*/
|
|
41
|
+
dockerStatus?: DockerStatus;
|
|
42
|
+
|
|
43
|
+
/**
|
|
44
|
+
* The message type is used to list the users in the room
|
|
45
|
+
*/
|
|
46
|
+
userList?: UserInfo[];
|
|
47
|
+
|
|
48
|
+
/**
|
|
49
|
+
* The message type is used to identify the user you following.
|
|
50
|
+
*/
|
|
51
|
+
followingUser?: UserInfo;
|
|
52
|
+
|
|
53
|
+
/**
|
|
54
|
+
* The message type is used to indicate the users who following you.
|
|
55
|
+
*/
|
|
56
|
+
usersFollowYou?: UserInfo[];
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
interface ErrorType {
|
|
60
|
+
/**
|
|
61
|
+
* The error message block
|
|
62
|
+
*/
|
|
63
|
+
message: {
|
|
64
|
+
/**
|
|
65
|
+
* The error message content
|
|
66
|
+
*/
|
|
67
|
+
content: string;
|
|
68
|
+
|
|
69
|
+
/**
|
|
70
|
+
* The error playground you started
|
|
71
|
+
*/
|
|
72
|
+
playgroundId: string;
|
|
73
|
+
|
|
74
|
+
/**
|
|
75
|
+
* The error timestamp
|
|
76
|
+
*/
|
|
77
|
+
timestamp: number;
|
|
78
|
+
};
|
|
79
|
+
}
|
|
80
|
+
|
|
81
|
+
/**
|
|
82
|
+
* Userinfo type
|
|
83
|
+
*/
|
|
84
|
+
interface UserInfo {
|
|
85
|
+
/**
|
|
86
|
+
* The playground id show up in the user info
|
|
87
|
+
*/
|
|
88
|
+
playgroundId?: string;
|
|
89
|
+
|
|
90
|
+
operation?: any;
|
|
91
|
+
uuid?: string;
|
|
92
|
+
color?: string;
|
|
93
|
+
name?: string;
|
|
94
|
+
username?: string;
|
|
95
|
+
userId?: string;
|
|
96
|
+
role?: string;
|
|
97
|
+
avatar?: string;
|
|
98
|
+
onlineCount?: number;
|
|
99
|
+
}
|
|
100
|
+
|
|
101
|
+
// interface ReplayType {
|
|
102
|
+
// /**
|
|
103
|
+
// * The userId of the user who started the replay
|
|
104
|
+
// */
|
|
105
|
+
// userId?: UserInfo['userId'];
|
|
106
|
+
|
|
107
|
+
// /**
|
|
108
|
+
// * The timestamp of the replay
|
|
109
|
+
// */
|
|
110
|
+
// timestamp: number;
|
|
111
|
+
// }
|
|
112
|
+
|
|
113
|
+
export interface TreeProps {
|
|
114
|
+
/**
|
|
115
|
+
* The tree Item height
|
|
116
|
+
*/
|
|
117
|
+
treeItemHeight?: string;
|
|
118
|
+
/**
|
|
119
|
+
* The background color of the tree
|
|
120
|
+
*/
|
|
121
|
+
bgColor?: string;
|
|
122
|
+
|
|
123
|
+
/**
|
|
124
|
+
* The text color of the tree
|
|
125
|
+
*/
|
|
126
|
+
fontColor?: string;
|
|
127
|
+
|
|
128
|
+
/**
|
|
129
|
+
* The drop background color
|
|
130
|
+
*/
|
|
131
|
+
dropBgColor?: string;
|
|
132
|
+
|
|
133
|
+
/**
|
|
134
|
+
* The drop Text color
|
|
135
|
+
*/
|
|
136
|
+
dropTextColor?: string;
|
|
137
|
+
|
|
138
|
+
/**
|
|
139
|
+
* The hover background color
|
|
140
|
+
*/
|
|
141
|
+
hoverBgColor?: string;
|
|
142
|
+
|
|
143
|
+
/**
|
|
144
|
+
* The hover Text color
|
|
145
|
+
*/
|
|
146
|
+
hoverTextColor?: string;
|
|
147
|
+
|
|
148
|
+
/**
|
|
149
|
+
* The tree item will fire the event when you click on it
|
|
150
|
+
*
|
|
151
|
+
* @param The path of the item
|
|
152
|
+
* @param The uri of the item
|
|
153
|
+
* @event
|
|
154
|
+
*/
|
|
155
|
+
onClick?: (arg: { path: string; uri: string }) => void;
|
|
156
|
+
}
|
|
157
|
+
|
|
158
|
+
export interface MenuTagProps {
|
|
159
|
+
/**
|
|
160
|
+
* The style of the menu tag block
|
|
161
|
+
*/
|
|
162
|
+
menuStyle?: {
|
|
163
|
+
/**
|
|
164
|
+
* The background color
|
|
165
|
+
*/
|
|
166
|
+
backgroundColor?: string;
|
|
167
|
+
|
|
168
|
+
/**
|
|
169
|
+
* The text color
|
|
170
|
+
*/
|
|
171
|
+
textColor?: string;
|
|
172
|
+
|
|
173
|
+
/**
|
|
174
|
+
* The hover background color
|
|
175
|
+
*/
|
|
176
|
+
hoverBgColor?: string;
|
|
177
|
+
|
|
178
|
+
/**
|
|
179
|
+
* The hover text color
|
|
180
|
+
*/
|
|
181
|
+
hoverTextColor?: string;
|
|
182
|
+
|
|
183
|
+
/**
|
|
184
|
+
* The icon color
|
|
185
|
+
*/
|
|
186
|
+
iconColor?: string;
|
|
187
|
+
|
|
188
|
+
/**
|
|
189
|
+
* The icon hover color
|
|
190
|
+
*/
|
|
191
|
+
hoverIconColor?: string;
|
|
192
|
+
|
|
193
|
+
/**
|
|
194
|
+
* The menu tag height
|
|
195
|
+
*/
|
|
196
|
+
height?: string;
|
|
197
|
+
};
|
|
198
|
+
}
|
|
199
|
+
|
|
200
|
+
interface EditorProps extends MenuTagProps {
|
|
201
|
+
/**
|
|
202
|
+
* The editor font size
|
|
203
|
+
*/
|
|
204
|
+
fontSize: string;
|
|
205
|
+
|
|
206
|
+
/**
|
|
207
|
+
* The editor line height
|
|
208
|
+
*/
|
|
209
|
+
lineHeight: string;
|
|
210
|
+
|
|
211
|
+
/**
|
|
212
|
+
*
|
|
213
|
+
*/
|
|
214
|
+
|
|
215
|
+
/**
|
|
216
|
+
* The Theme of the editor block
|
|
217
|
+
*/
|
|
218
|
+
theme?: {
|
|
219
|
+
/**
|
|
220
|
+
* The color of the margin view overlay
|
|
221
|
+
*/
|
|
222
|
+
marginViewOverlaysBgColor?: string;
|
|
223
|
+
|
|
224
|
+
/**
|
|
225
|
+
* The width of the margin view overlay
|
|
226
|
+
*/
|
|
227
|
+
marginViewOverlaysWidth?: string;
|
|
228
|
+
|
|
229
|
+
/**
|
|
230
|
+
* The left position of the margin view overlay
|
|
231
|
+
*/
|
|
232
|
+
marginViewOverlaysLeft?: string;
|
|
233
|
+
|
|
234
|
+
/**
|
|
235
|
+
* The line number color
|
|
236
|
+
*/
|
|
237
|
+
lineNumbersColor?: string;
|
|
238
|
+
|
|
239
|
+
/**
|
|
240
|
+
* The line number with
|
|
241
|
+
*/
|
|
242
|
+
lineNumbersWidth?: string;
|
|
243
|
+
|
|
244
|
+
/**
|
|
245
|
+
* The line number left
|
|
246
|
+
*/
|
|
247
|
+
lineNumbersLeft?: string;
|
|
248
|
+
|
|
249
|
+
/**
|
|
250
|
+
* The active line number color
|
|
251
|
+
*/
|
|
252
|
+
activeLineNumberColor?: string;
|
|
253
|
+
};
|
|
254
|
+
}
|
|
255
|
+
|
|
256
|
+
export interface ConsoleOrShellProps {
|
|
257
|
+
/**
|
|
258
|
+
* The font size of the shell
|
|
259
|
+
*/
|
|
260
|
+
fontSize?: number;
|
|
261
|
+
|
|
262
|
+
/**
|
|
263
|
+
* The font family of the shell
|
|
264
|
+
*/
|
|
265
|
+
fontFamily?: string;
|
|
266
|
+
|
|
267
|
+
/**
|
|
268
|
+
* The line height of the shell
|
|
269
|
+
*/
|
|
270
|
+
lineHeight?: number;
|
|
271
|
+
|
|
272
|
+
/**
|
|
273
|
+
* The cursor color of the shell
|
|
274
|
+
*/
|
|
275
|
+
cursorBlink?: boolean;
|
|
276
|
+
|
|
277
|
+
/**
|
|
278
|
+
* The cursor width of the shell
|
|
279
|
+
*/
|
|
280
|
+
cursorWidth?: number;
|
|
281
|
+
|
|
282
|
+
/**
|
|
283
|
+
* The cursor style of the shell
|
|
284
|
+
*/
|
|
285
|
+
cursorStyle?: string;
|
|
286
|
+
|
|
287
|
+
/**
|
|
288
|
+
* if the shell can be right click to open the context menu
|
|
289
|
+
*/
|
|
290
|
+
rightClickSelectsWord?: boolean;
|
|
291
|
+
|
|
292
|
+
/**
|
|
293
|
+
* The theme of the shell block
|
|
294
|
+
*/
|
|
295
|
+
theme?: {
|
|
296
|
+
/**
|
|
297
|
+
* The background color
|
|
298
|
+
*/
|
|
299
|
+
background?: string;
|
|
300
|
+
};
|
|
301
|
+
}
|
|
302
|
+
|
|
303
|
+
export interface BrowserProps {
|
|
304
|
+
/**
|
|
305
|
+
* The url of the browser
|
|
306
|
+
*/
|
|
307
|
+
url?: string;
|
|
308
|
+
|
|
309
|
+
/**
|
|
310
|
+
* if the browser can show the url
|
|
311
|
+
*/
|
|
312
|
+
showURL?: boolean;
|
|
313
|
+
|
|
314
|
+
/**
|
|
315
|
+
* The fresh icon color
|
|
316
|
+
*/
|
|
317
|
+
freshIconColor?: string;
|
|
318
|
+
|
|
319
|
+
/**
|
|
320
|
+
* The input text color
|
|
321
|
+
*/
|
|
322
|
+
inputColor?: string;
|
|
323
|
+
|
|
324
|
+
/**
|
|
325
|
+
* The open icon color
|
|
326
|
+
*/
|
|
327
|
+
openIconColor?: string;
|
|
328
|
+
|
|
329
|
+
inputTextColor?: string;
|
|
330
|
+
inputBgColor?: string;
|
|
331
|
+
bgColor?: string;
|
|
332
|
+
navBgColor?: string;
|
|
333
|
+
navBorder?: string;
|
|
334
|
+
}
|
|
335
|
+
|
|
336
|
+
/**
|
|
337
|
+
* The Component props type collection
|
|
338
|
+
*/
|
|
339
|
+
export type ComponentPropsType =
|
|
340
|
+
| EditorProps
|
|
341
|
+
| TreeProps
|
|
342
|
+
| BrowserProps
|
|
343
|
+
| ConsoleOrShellProps;
|
|
344
|
+
|
|
345
|
+
/**
|
|
346
|
+
* Passing the values to init the playground.
|
|
347
|
+
* @category PaaS Options [Required]
|
|
348
|
+
*/
|
|
349
|
+
export interface Options {
|
|
350
|
+
/**
|
|
351
|
+
* @ignore
|
|
352
|
+
*
|
|
353
|
+
*/
|
|
354
|
+
debug?: boolean;
|
|
355
|
+
|
|
356
|
+
/**
|
|
357
|
+
*
|
|
358
|
+
* Error listener to the application.
|
|
359
|
+
* @param The error message block
|
|
360
|
+
* @event
|
|
361
|
+
*/
|
|
362
|
+
onError?: (error: ErrorType) => void;
|
|
363
|
+
|
|
364
|
+
/**
|
|
365
|
+
*
|
|
366
|
+
* Message listener to the application.
|
|
367
|
+
* @param MessageType
|
|
368
|
+
* @event
|
|
369
|
+
*/
|
|
370
|
+
onMessage?: (message: MessageType) => void;
|
|
371
|
+
|
|
372
|
+
/**
|
|
373
|
+
* The service worker origin
|
|
374
|
+
*/
|
|
375
|
+
serviceWorkerOrigin?: string;
|
|
376
|
+
|
|
377
|
+
/**
|
|
378
|
+
*
|
|
379
|
+
* init the playground with the mode.
|
|
380
|
+
*
|
|
381
|
+
*/
|
|
382
|
+
mode?: Mode;
|
|
383
|
+
|
|
384
|
+
/**
|
|
385
|
+
*
|
|
386
|
+
* init the playground with the paasDomain.
|
|
387
|
+
*
|
|
388
|
+
*/
|
|
389
|
+
paasDomain: string;
|
|
390
|
+
|
|
391
|
+
/**
|
|
392
|
+
*
|
|
393
|
+
* init the playground ticket needed.
|
|
394
|
+
*
|
|
395
|
+
*/
|
|
396
|
+
ticket: string;
|
|
397
|
+
|
|
398
|
+
/**
|
|
399
|
+
*
|
|
400
|
+
* to init the playground with this id.
|
|
401
|
+
*
|
|
402
|
+
*/
|
|
403
|
+
playgroundId: string;
|
|
404
|
+
|
|
405
|
+
/**
|
|
406
|
+
*
|
|
407
|
+
* userId for the playground.
|
|
408
|
+
*
|
|
409
|
+
*/
|
|
410
|
+
userId: string;
|
|
411
|
+
|
|
412
|
+
/**
|
|
413
|
+
*
|
|
414
|
+
* tenantId for the playground.
|
|
415
|
+
*
|
|
416
|
+
*/
|
|
417
|
+
tenantId: string;
|
|
418
|
+
|
|
419
|
+
/**
|
|
420
|
+
*
|
|
421
|
+
* username for the playground.
|
|
422
|
+
*
|
|
423
|
+
*/
|
|
424
|
+
username?: string;
|
|
425
|
+
|
|
426
|
+
/**
|
|
427
|
+
*
|
|
428
|
+
* avatarUrl for the playground but not necessarily.
|
|
429
|
+
*
|
|
430
|
+
*/
|
|
431
|
+
avatarUrl?: string;
|
|
432
|
+
|
|
433
|
+
/**
|
|
434
|
+
*
|
|
435
|
+
* this argument is to ingnore replaying patterns.
|
|
436
|
+
*
|
|
437
|
+
*/
|
|
438
|
+
ignoreReplayers?: string[];
|
|
439
|
+
|
|
440
|
+
/**
|
|
441
|
+
*
|
|
442
|
+
* Here you can map the components to the playground.
|
|
443
|
+
*
|
|
444
|
+
* @category ComponentsMapper
|
|
445
|
+
*
|
|
446
|
+
*/
|
|
447
|
+
components?: Component<ComponentPropsType>[];
|
|
448
|
+
|
|
449
|
+
/**
|
|
450
|
+
* @deprecated to fix the issue of the playground.
|
|
451
|
+
*
|
|
452
|
+
* render?: () => TComponent[]; keyof D42_FrontType['CRDT'][]
|
|
453
|
+
*/
|
|
454
|
+
}
|
|
455
|
+
|
|
456
|
+
/**
|
|
457
|
+
*
|
|
458
|
+
* @interface Component
|
|
459
|
+
* @desc The props of the component.
|
|
460
|
+
*
|
|
461
|
+
*/
|
|
462
|
+
export interface Component<T> {
|
|
463
|
+
/**
|
|
464
|
+
*
|
|
465
|
+
* The DOM for the component.
|
|
466
|
+
* @type {(string | HTMLElement | Element)}
|
|
467
|
+
*
|
|
468
|
+
*/
|
|
469
|
+
container: string | HTMLElement | Element;
|
|
470
|
+
|
|
471
|
+
item: ComponentType;
|
|
472
|
+
/**
|
|
473
|
+
* The component props
|
|
474
|
+
*/
|
|
475
|
+
props?: T;
|
|
476
|
+
}
|
|
477
|
+
|
|
478
|
+
/**
|
|
479
|
+
* * This is the entry point for the application.
|
|
480
|
+
*
|
|
481
|
+
* * like:
|
|
482
|
+
*
|
|
483
|
+
*
|
|
484
|
+
* ```ts
|
|
485
|
+
let options = {...};
|
|
486
|
+
let Dao = new DaoPaaS(options);
|
|
487
|
+
```
|
|
488
|
+
*
|
|
489
|
+
* See {@link Options} for more details.
|
|
490
|
+
*/
|
|
491
|
+
export class DaoPaaS {
|
|
492
|
+
constructor(options: Options);
|
|
493
|
+
|
|
494
|
+
get playgroundStatus(): PlaygroundStatus;
|
|
495
|
+
|
|
496
|
+
get dockerStatus(): DockerStatus;
|
|
497
|
+
|
|
498
|
+
get userList(): UserInfo[];
|
|
499
|
+
|
|
500
|
+
/**
|
|
501
|
+
*
|
|
502
|
+
* Replaying method for global calling.
|
|
503
|
+
* @param {unFollowUser} args
|
|
504
|
+
*
|
|
505
|
+
*/
|
|
506
|
+
|
|
507
|
+
unFollowUser(user: UserInfo, callback: (userInfo: UserInfo) => void): void;
|
|
508
|
+
|
|
509
|
+
/**
|
|
510
|
+
*
|
|
511
|
+
* Replaying method for global calling.
|
|
512
|
+
* @param {followUser} args
|
|
513
|
+
*
|
|
514
|
+
*/
|
|
515
|
+
followUser(userId: string, callback: (userInfo: UserInfo) => void): void;
|
|
516
|
+
|
|
517
|
+
/**
|
|
518
|
+
*
|
|
519
|
+
* Replaying method for global calling.
|
|
520
|
+
* @param {DiffPatternInfo} args
|
|
521
|
+
* @param {DiffPatternInfo} args
|
|
522
|
+
*
|
|
523
|
+
*/
|
|
524
|
+
setDiff(current: DiffPatternInfo, next: DiffPatternInfo): void;
|
|
525
|
+
|
|
526
|
+
/**
|
|
527
|
+
*
|
|
528
|
+
* Replaying method for global calling.
|
|
529
|
+
* @param {ReplayType} args
|
|
530
|
+
*
|
|
531
|
+
*/
|
|
532
|
+
replay(userId: Pick<UserInfo, 'userId'>): void;
|
|
533
|
+
|
|
534
|
+
/**
|
|
535
|
+
*
|
|
536
|
+
* Recording method for global calling.
|
|
537
|
+
* @param {boolean} arg
|
|
538
|
+
*
|
|
539
|
+
*/
|
|
540
|
+
record(arg?: boolean): void;
|
|
541
|
+
|
|
542
|
+
/**
|
|
543
|
+
*
|
|
544
|
+
* async method to set Replayers.
|
|
545
|
+
* @param {keyof D42_FrontType['CRDT'][]} arg
|
|
546
|
+
*
|
|
547
|
+
*/
|
|
548
|
+
setReplayers(arg: string[]): void;
|
|
549
|
+
|
|
550
|
+
/**
|
|
551
|
+
*
|
|
552
|
+
* Here you can switch language services by calling this method.
|
|
553
|
+
* @param {boolean} arg
|
|
554
|
+
*
|
|
555
|
+
*/
|
|
556
|
+
switchLspServer(arg: boolean): void;
|
|
557
|
+
|
|
558
|
+
/**
|
|
559
|
+
*
|
|
560
|
+
* Active the playground handler.
|
|
561
|
+
*
|
|
562
|
+
*/
|
|
563
|
+
activePlayground(): void;
|
|
564
|
+
|
|
565
|
+
/**
|
|
566
|
+
*
|
|
567
|
+
* Run the playground handler.
|
|
568
|
+
*
|
|
569
|
+
*/
|
|
570
|
+
runPlayground(): void;
|
|
571
|
+
|
|
572
|
+
/**
|
|
573
|
+
*
|
|
574
|
+
* Stop the playground.
|
|
575
|
+
*
|
|
576
|
+
*/
|
|
577
|
+
stopPlayground(): void;
|
|
578
|
+
|
|
579
|
+
/**
|
|
580
|
+
* Editor component.
|
|
581
|
+
*
|
|
582
|
+
*
|
|
583
|
+
* ```ts
|
|
584
|
+
* Dao.Editor({
|
|
585
|
+
* container: '#editor',
|
|
586
|
+
* item: 'editor',
|
|
587
|
+
* props: {...EditorProps}
|
|
588
|
+
* });
|
|
589
|
+
```
|
|
590
|
+
*
|
|
591
|
+
* @category Components
|
|
592
|
+
*
|
|
593
|
+
*
|
|
594
|
+
*/
|
|
595
|
+
Editor(args: Component<EditorProps>): void;
|
|
596
|
+
|
|
597
|
+
/**
|
|
598
|
+
*
|
|
599
|
+
* Page component.
|
|
600
|
+
* @ignore
|
|
601
|
+
* @category Components
|
|
602
|
+
* @param Component
|
|
603
|
+
*
|
|
604
|
+
*/
|
|
605
|
+
Page(args: Component<TreeProps>): void;
|
|
606
|
+
|
|
607
|
+
/**
|
|
608
|
+
*
|
|
609
|
+
* Tree component.
|
|
610
|
+
*
|
|
611
|
+
* ```ts
|
|
612
|
+
* Dao.Tree({
|
|
613
|
+
* container: '#tree',
|
|
614
|
+
* item: 'tree',
|
|
615
|
+
* props: {...TreeProps}
|
|
616
|
+
* });
|
|
617
|
+
```
|
|
618
|
+
*
|
|
619
|
+
*
|
|
620
|
+
* @category Components
|
|
621
|
+
* @param Component
|
|
622
|
+
*
|
|
623
|
+
*/
|
|
624
|
+
Tree(args: Component<TreeProps>): void;
|
|
625
|
+
|
|
626
|
+
/**
|
|
627
|
+
*
|
|
628
|
+
* Shell component.
|
|
629
|
+
*
|
|
630
|
+
*
|
|
631
|
+
* ```ts
|
|
632
|
+
* Dao.Shell({
|
|
633
|
+
* container: '#shell',
|
|
634
|
+
* item: 'shell',
|
|
635
|
+
* props: {...ConsoleOrShellProps}
|
|
636
|
+
* });
|
|
637
|
+
```
|
|
638
|
+
*
|
|
639
|
+
*
|
|
640
|
+
* @category Components
|
|
641
|
+
* @param Component
|
|
642
|
+
*
|
|
643
|
+
*/
|
|
644
|
+
Shell(args: Component<ConsoleOrShellProps>): void;
|
|
645
|
+
|
|
646
|
+
/**
|
|
647
|
+
*
|
|
648
|
+
* Browser component.
|
|
649
|
+
*
|
|
650
|
+
* ```ts
|
|
651
|
+
* Dao.Browser({
|
|
652
|
+
* container: '#browser',
|
|
653
|
+
* item: 'browser',
|
|
654
|
+
* props: {...BrowserProps}
|
|
655
|
+
* });
|
|
656
|
+
```
|
|
657
|
+
*
|
|
658
|
+
*
|
|
659
|
+
* @category Components
|
|
660
|
+
* @param Component
|
|
661
|
+
*
|
|
662
|
+
*/
|
|
663
|
+
Browser(args: Component<BrowserProps>): void;
|
|
664
|
+
|
|
665
|
+
/**
|
|
666
|
+
*
|
|
667
|
+
* Console component.
|
|
668
|
+
*
|
|
669
|
+
*
|
|
670
|
+
* ```ts
|
|
671
|
+
* Dao.Console({
|
|
672
|
+
* container: '#console',
|
|
673
|
+
* item: 'console',
|
|
674
|
+
* props: {...ConsoleOrShellProps}
|
|
675
|
+
* });
|
|
676
|
+
```
|
|
677
|
+
*
|
|
678
|
+
*
|
|
679
|
+
* @category Components
|
|
680
|
+
* @param Component
|
|
681
|
+
*
|
|
682
|
+
*/
|
|
683
|
+
Console(args: Component<ConsoleOrShellProps>): void;
|
|
684
|
+
}
|