@dao42/d42paas-front 0.7.32 → 0.7.35

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
@@ -1,305 +1,305 @@
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
- export type Mode = 'tsdoc' | 'singleFile' | 'IDE';
12
-
13
- export type PlaygroundStatus = 'EMPTY' | 'ACTIVE' | 'INACTIVE';
14
-
15
- export type Replay = 'stop' | 'disabled' | 'pause';
16
-
17
- export type DockerStatus = 'RUNNING' | 'STOP';
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
- };
30
-
31
- /**
32
- * Userinfo type
33
- */
34
- interface UserInfo {
35
- playgroundId?: string;
36
- operation?: any;
37
- uuid?: string;
38
- color?: string;
39
- name?: string;
40
- username?: string;
41
- userId?: string;
42
- role?: string;
43
- avatar?: string;
44
- onlineCount?: number;
45
- }
46
-
47
- type ReplayType = {
48
- userId?: UserInfo['userId'];
49
- timestamp: number;
50
- };
51
-
52
- /**
53
- * Passing the values to init the playground.
54
- */
55
- export interface Options {
56
- debug?: boolean;
57
-
58
- /**
59
- *
60
- * Error listener to the aplication.
61
- * @param error
62
- */
63
- onError?: (error: any) => void;
64
-
65
- /**
66
- *
67
- * Message listener to the aplication.
68
- * @param MessageType
69
- */
70
- onMessage?: (message: MessageType) => void;
71
-
72
- serviceWorkerOrigin?: string;
73
-
74
- /**
75
- *
76
- * init the playground with the mode.
77
- *
78
- */
79
- mode?: Mode;
80
-
81
- /**
82
- *
83
- * init the playground with the paasDomain.
84
- *
85
- */
86
- paasDomain: string;
87
-
88
- /**
89
- *
90
- * init the playground ticket needed.
91
- *
92
- */
93
- ticket: string;
94
-
95
- /**
96
- *
97
- * to init the playground with this id.
98
- *
99
- */
100
- playgroundId: string;
101
-
102
- /**
103
- *
104
- * userId for the playground.
105
- *
106
- */
107
- userId: string;
108
-
109
- /**
110
- *
111
- * tenantId for the playground.
112
- *
113
- */
114
- tenantId: string;
115
-
116
- /**
117
- *
118
- * username for the playground.
119
- *
120
- */
121
- username?: string;
122
-
123
- /**
124
- *
125
- * avatarUrl for the playground but not necessarily.
126
- *
127
- */
128
- avatarUrl?: string;
129
-
130
- /**
131
- *
132
- * this argument is to ingnore replaying patterns.
133
- *
134
- */
135
- ignoreReplayers?: string[];
136
-
137
- components?: UserComponent[];
138
-
139
- /**
140
- * @deprecated to fix the issue of the playground.
141
- *
142
- * render?: () => TComponentArgs[]; keyof D42_FrontType['CRDT'][]
143
- */
144
- }
145
-
146
- export interface UserComponent extends ComponentArgs {
147
- item: string;
148
- }
149
-
150
- /**
151
- *
152
- * @interface ComponentArgs
153
- * @desc
154
- *
155
- */
156
- export interface ComponentArgs {
157
- /**
158
- *
159
- * the DOM for the component.
160
- * @type {(string | HTMLElement | Element)}
161
- *
162
- */
163
- container: string | HTMLElement | Element;
164
-
165
- props?: any;
166
- }
167
-
168
- /**
169
- * This is the entry point for the application.
170
- */
171
- export class DaoPaaS {
172
- constructor(options: Options);
173
-
174
- get playgroundStatus(): PlaygroundStatus;
175
-
176
- get dockerStatus(): DockerStatus;
177
-
178
- get userList(): UserInfo[];
179
-
180
- /**
181
- *
182
- * Replaying method for global calling.
183
- * @param {unFollowUser} args
184
- *
185
- */
186
-
187
- unFollowUser(user: UserInfo, callback: () => void): void;
188
-
189
- /**
190
- *
191
- * Replaying method for global calling.
192
- * @param {followUser} args
193
- *
194
- */
195
- followUser(user: UserInfo, callback: () => void): void;
196
-
197
- /**
198
- *
199
- * Replaying method for global calling.
200
- * @param {ReplayType} args
201
- *
202
- */
203
- replay(param: ReplayType): void;
204
-
205
- /**
206
- *
207
- * Recording method for global calling.
208
- * @param {boolean} arg
209
- *
210
- */
211
- record(arg?: boolean): void;
212
-
213
- /**
214
- *
215
- * async method to set Replayers.
216
- * @param {keyof D42_FrontType['CRDT'][]} arg
217
- *
218
- */
219
- setReplayers(arg: string[]): void;
220
-
221
- /**
222
- *
223
- * Here you can switch language services by calling this method.
224
- * @param {boolean} arg
225
- *
226
- */
227
- switchLspServer(arg: boolean): void;
228
-
229
- /**
230
- *
231
- * Active the playground handler.
232
- *
233
- */
234
- activePlayground(): void;
235
-
236
- /**
237
- *
238
- * Run the playground handler.
239
- *
240
- */
241
- runPlayground(): void;
242
-
243
- /**
244
- *
245
- * Stop the playground.
246
- *
247
- */
248
- stopPlayground(): void;
249
-
250
- /**
251
- *
252
- * Editor component.
253
- * @param ComponentArgs
254
- * CSS.Properties<string | number>
255
- */
256
- Editor(
257
- args:
258
- | ComponentArgs
259
- | {
260
- containerStyle: any;
261
- editorStyle: any;
262
- menuStyle: any;
263
- },
264
- ): void;
265
-
266
- /**
267
- *
268
- * Page component.
269
- * @param ComponentArgs
270
- *
271
- */
272
- Page(args: ComponentArgs): void;
273
-
274
- /**
275
- *
276
- * Tree component.
277
- * @param ComponentArgs
278
- *
279
- */
280
- Tree(args: ComponentArgs): void;
281
-
282
- /**
283
- *
284
- * Shell component.
285
- * @param ComponentArgs
286
- *
287
- */
288
- Shell(args: ComponentArgs): void;
289
-
290
- /**
291
- *
292
- * Browser component.
293
- * @param ComponentArgs
294
- *
295
- */
296
- Browser(args: ComponentArgs): void;
297
-
298
- /**
299
- *
300
- * Console component.
301
- * @param ComponentArgs
302
- *
303
- */
304
- Console(args: ComponentArgs): void;
305
- }
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
+ export type Mode = 'tsdoc' | 'singleFile' | 'IDE';
12
+
13
+ export type PlaygroundStatus = 'EMPTY' | 'ACTIVE' | 'INACTIVE';
14
+
15
+ export type Replay = 'stop' | 'disabled' | 'pause';
16
+
17
+ export type DockerStatus = 'RUNNING' | 'STOP';
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
+ };
30
+
31
+ /**
32
+ * Userinfo type
33
+ */
34
+ interface UserInfo {
35
+ playgroundId?: string;
36
+ operation?: any;
37
+ uuid?: string;
38
+ color?: string;
39
+ name?: string;
40
+ username?: string;
41
+ userId?: string;
42
+ role?: string;
43
+ avatar?: string;
44
+ onlineCount?: number;
45
+ }
46
+
47
+ type ReplayType = {
48
+ userId?: UserInfo['userId'];
49
+ timestamp: number;
50
+ };
51
+
52
+ /**
53
+ * Passing the values to init the playground.
54
+ */
55
+ export interface Options {
56
+ debug?: boolean;
57
+
58
+ /**
59
+ *
60
+ * Error listener to the aplication.
61
+ * @param error
62
+ */
63
+ onError?: (error: any) => void;
64
+
65
+ /**
66
+ *
67
+ * Message listener to the aplication.
68
+ * @param MessageType
69
+ */
70
+ onMessage?: (message: MessageType) => void;
71
+
72
+ serviceWorkerOrigin?: string;
73
+
74
+ /**
75
+ *
76
+ * init the playground with the mode.
77
+ *
78
+ */
79
+ mode?: Mode;
80
+
81
+ /**
82
+ *
83
+ * init the playground with the paasDomain.
84
+ *
85
+ */
86
+ paasDomain: string;
87
+
88
+ /**
89
+ *
90
+ * init the playground ticket needed.
91
+ *
92
+ */
93
+ ticket: string;
94
+
95
+ /**
96
+ *
97
+ * to init the playground with this id.
98
+ *
99
+ */
100
+ playgroundId: string;
101
+
102
+ /**
103
+ *
104
+ * userId for the playground.
105
+ *
106
+ */
107
+ userId: string;
108
+
109
+ /**
110
+ *
111
+ * tenantId for the playground.
112
+ *
113
+ */
114
+ tenantId: string;
115
+
116
+ /**
117
+ *
118
+ * username for the playground.
119
+ *
120
+ */
121
+ username?: string;
122
+
123
+ /**
124
+ *
125
+ * avatarUrl for the playground but not necessarily.
126
+ *
127
+ */
128
+ avatarUrl?: string;
129
+
130
+ /**
131
+ *
132
+ * this argument is to ingnore replaying patterns.
133
+ *
134
+ */
135
+ ignoreReplayers?: string[];
136
+
137
+ components?: UserComponent[];
138
+
139
+ /**
140
+ * @deprecated to fix the issue of the playground.
141
+ *
142
+ * render?: () => TComponentArgs[]; keyof D42_FrontType['CRDT'][]
143
+ */
144
+ }
145
+
146
+ export interface UserComponent extends ComponentArgs {
147
+ item: string;
148
+ }
149
+
150
+ /**
151
+ *
152
+ * @interface ComponentArgs
153
+ * @desc
154
+ *
155
+ */
156
+ export interface ComponentArgs {
157
+ /**
158
+ *
159
+ * the DOM for the component.
160
+ * @type {(string | HTMLElement | Element)}
161
+ *
162
+ */
163
+ container: string | HTMLElement | Element;
164
+
165
+ props?: any;
166
+ }
167
+
168
+ /**
169
+ * This is the entry point for the application.
170
+ */
171
+ export class DaoPaaS {
172
+ constructor(options: Options);
173
+
174
+ get playgroundStatus(): PlaygroundStatus;
175
+
176
+ get dockerStatus(): DockerStatus;
177
+
178
+ get userList(): UserInfo[];
179
+
180
+ /**
181
+ *
182
+ * Replaying method for global calling.
183
+ * @param {unFollowUser} args
184
+ *
185
+ */
186
+
187
+ unFollowUser(user: UserInfo, callback: (userInfo: UserInfo) => void): void;
188
+
189
+ /**
190
+ *
191
+ * Replaying method for global calling.
192
+ * @param {followUser} args
193
+ *
194
+ */
195
+ followUser(userId: string, callback: (userInfo: UserInfo) => void): void;
196
+
197
+ /**
198
+ *
199
+ * Replaying method for global calling.
200
+ * @param {ReplayType} args
201
+ *
202
+ */
203
+ replay(param: ReplayType): void;
204
+
205
+ /**
206
+ *
207
+ * Recording method for global calling.
208
+ * @param {boolean} arg
209
+ *
210
+ */
211
+ record(arg?: boolean): void;
212
+
213
+ /**
214
+ *
215
+ * async method to set Replayers.
216
+ * @param {keyof D42_FrontType['CRDT'][]} arg
217
+ *
218
+ */
219
+ setReplayers(arg: string[]): void;
220
+
221
+ /**
222
+ *
223
+ * Here you can switch language services by calling this method.
224
+ * @param {boolean} arg
225
+ *
226
+ */
227
+ switchLspServer(arg: boolean): void;
228
+
229
+ /**
230
+ *
231
+ * Active the playground handler.
232
+ *
233
+ */
234
+ activePlayground(): void;
235
+
236
+ /**
237
+ *
238
+ * Run the playground handler.
239
+ *
240
+ */
241
+ runPlayground(): void;
242
+
243
+ /**
244
+ *
245
+ * Stop the playground.
246
+ *
247
+ */
248
+ stopPlayground(): void;
249
+
250
+ /**
251
+ *
252
+ * Editor component.
253
+ * @param ComponentArgs
254
+ * CSS.Properties<string | number>
255
+ */
256
+ Editor(
257
+ args:
258
+ | ComponentArgs
259
+ | {
260
+ containerStyle: any;
261
+ editorStyle: any;
262
+ menuStyle: any;
263
+ },
264
+ ): void;
265
+
266
+ /**
267
+ *
268
+ * Page component.
269
+ * @param ComponentArgs
270
+ *
271
+ */
272
+ Page(args: ComponentArgs): void;
273
+
274
+ /**
275
+ *
276
+ * Tree component.
277
+ * @param ComponentArgs
278
+ *
279
+ */
280
+ Tree(args: ComponentArgs): void;
281
+
282
+ /**
283
+ *
284
+ * Shell component.
285
+ * @param ComponentArgs
286
+ *
287
+ */
288
+ Shell(args: ComponentArgs): void;
289
+
290
+ /**
291
+ *
292
+ * Browser component.
293
+ * @param ComponentArgs
294
+ *
295
+ */
296
+ Browser(args: ComponentArgs): void;
297
+
298
+ /**
299
+ *
300
+ * Console component.
301
+ * @param ComponentArgs
302
+ *
303
+ */
304
+ Console(args: ComponentArgs): void;
305
+ }