@dao42/d42paas-front 0.5.40 → 0.5.48

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/editor.d.ts CHANGED
@@ -4,33 +4,65 @@
4
4
  * Released under the MIT license
5
5
  *-----------------------------------------------------------*/
6
6
 
7
- // import React from 'react';
8
-
9
7
  /*---------------------------------------------------------------------------------------------
10
8
  * Copyright (c) Microsoft Corporation. All rights reserved.
11
9
  * Licensed under the MIT License. See License.txt in the project root for license information.
12
10
  *--------------------------------------------------------------------------------------------*/
13
- // type TStyle = HTMLAttributes<T>.style?: React.CSSProperties | undefined;
14
- // type TStyle = React.CSSProperties | undefined;
15
- // import * as CSS from 'csstype';
11
+
12
+ export type TMode = 'tsdoc' | 'singleFile' | 'IDE';
16
13
 
17
14
  export type T_PlaygroundStatus = 'EMPTY' | 'ACTIVE' | 'INACTIVE';
15
+
18
16
  export type TReplay = 'stop' | 'disabled' | 'pause';
19
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
+
20
44
  /**
21
45
  * the arguments of the Playground.
22
46
  */
23
47
  interface TConstructor {
24
48
  /**
25
49
  *
26
- * initing the playground ticket needed.
50
+ * init the playground with the mode.
51
+ *
52
+ */
53
+
54
+ mode?: TMode;
55
+
56
+ /**
57
+ *
58
+ * init the playground with the env.
27
59
  *
28
60
  */
29
61
  env?: string;
30
62
 
31
63
  /**
32
64
  *
33
- * initing the playground ticket needed.
65
+ * init the playground ticket needed.
34
66
  *
35
67
  */
36
68
  ticket: string;
@@ -63,13 +95,6 @@ interface TConstructor {
63
95
  */
64
96
  username?: string;
65
97
 
66
- /**
67
- *
68
- * avatar for the playground but not necessarily.
69
- *
70
- */
71
- avatar?: string;
72
-
73
98
  /**
74
99
  *
75
100
  * avatarUrl for the playground but not necessarily.
@@ -99,7 +124,6 @@ export interface UserComponent extends TComponentArgs {
99
124
  * @desc
100
125
  *
101
126
  */
102
-
103
127
  export interface TComponentArgs {
104
128
  /**
105
129
  *
@@ -118,6 +142,10 @@ export class DaoPaaS {
118
142
 
119
143
  get playgroundStatus(): T_PlaygroundStatus;
120
144
 
145
+ get dockerStatus(): T_DockerStatus;
146
+
147
+ get userList(): TUserInfo[];
148
+
121
149
  /**
122
150
  *
123
151
  * Replaying method for global calling.
@@ -140,7 +168,7 @@ export class DaoPaaS {
140
168
  * @param {keyof D42_FrontType['CRDT'][]} arg
141
169
  *
142
170
  */
143
- setReplayers(arg: keyof D42_FrontType['CRDT'][]): void;
171
+ setReplayers(arg: string[]): void;
144
172
 
145
173
  /**
146
174
  *
package/dist/index.html CHANGED
@@ -32,10 +32,13 @@
32
32
  window.daopaas = DaoPaaS;
33
33
 
34
34
  var qs = new URLSearchParams(document.location.search.substring(1));
35
- const env = qs.get('env')
35
+ const env = qs.get('env');
36
+ const ticket = qs.get('ticket');
37
+ const playgroundId = qs.get('playgroundId');
38
+
36
39
  window.daopaas = new DaoPaaS.DaoPaaS({
37
- ticket: 'MXwzNDUwMTU4NjU4MDYyOTA5NDR8MXx8MTczNzg5MjAwMDAwMA==',
38
- playgroundId: '345015865806290944',
40
+ ticket,
41
+ playgroundId,
39
42
  userId: qs.get('userId'),
40
43
  tenantId: '1',
41
44
  username: qs.get('username'),