@interopio/workspaces-api 5.0.0 → 5.1.0-next.1
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/CHANGELOG.md +7 -0
- package/changelog.md +7 -0
- package/dist/workspaces.es.js +37 -19
- package/dist/workspaces.es.js.map +1 -1
- package/dist/workspaces.umd.js +37 -19
- package/dist/workspaces.umd.js.map +1 -1
- package/dist/workspaces.umd.min.js +1 -1
- package/package.json +1 -1
- package/workspaces.d.ts +1488 -695
package/workspaces.d.ts
CHANGED
|
@@ -7,177 +7,281 @@ export default WorkspacesFactory;
|
|
|
7
7
|
/**
|
|
8
8
|
* @docname Workspaces
|
|
9
9
|
* @intro
|
|
10
|
-
* The Workspaces API offers advanced window management functionalities.
|
|
11
|
-
*
|
|
12
|
-
*
|
|
13
|
-
*
|
|
14
|
-
*
|
|
15
|
-
*
|
|
10
|
+
* The Workspaces API offers advanced window management functionalities. Workspaces allow you to arrange multiple apps within the same visual window
|
|
11
|
+
* called a Workspaces App (or `Frame`). This is performed either programmatically or by dragging and dropping floating windows in a Workspace,
|
|
12
|
+
* rearranging windows that are already in the Workspace, or extracting windows from the Workspace. Each app is treated as an individual building block
|
|
13
|
+
* that can be added, removed, moved, or resized within the unifying Workspaces App instance. Workspace Layouts can be saved and restored within the same
|
|
14
|
+
* or in different Workspaces App instances. When a Workspace Layout is restored, the arrangement of the apps participating in it is preserved
|
|
15
|
+
* and you can also save their context data, allowing you to resume working right from where you left off.
|
|
16
16
|
*
|
|
17
17
|
* The Workspaces API is accessible via the [`io.workspaces`](#API) object.
|
|
18
18
|
*/
|
|
19
19
|
export namespace IOConnectWorkspaces {
|
|
20
20
|
|
|
21
|
-
/**
|
|
21
|
+
/**
|
|
22
|
+
* Describes a Workspace Layout.
|
|
23
|
+
*/
|
|
22
24
|
export interface WorkspaceLayout {
|
|
23
|
-
/**
|
|
25
|
+
/**
|
|
26
|
+
* Unique ID of the Workspace Layout, assigned by the platform.
|
|
27
|
+
* *Available only in **io.Connect Desktop**.*
|
|
28
|
+
* @since io.Connect Desktop 10.5
|
|
29
|
+
* @since @interopio/workspaces-api 5.0.0
|
|
30
|
+
*/
|
|
24
31
|
id?: string;
|
|
25
32
|
|
|
26
|
-
/**
|
|
33
|
+
/**
|
|
34
|
+
* Name of the Workspace Layout.
|
|
35
|
+
*/
|
|
27
36
|
name: string;
|
|
28
37
|
|
|
29
|
-
/**
|
|
38
|
+
/**
|
|
39
|
+
* Type of the Layout.
|
|
40
|
+
*/
|
|
30
41
|
type: "Workspace";
|
|
31
42
|
|
|
32
|
-
/**
|
|
43
|
+
/**
|
|
44
|
+
* Components of the Workspace Layout. The array must contain only one member, which must be a Workspace component.
|
|
45
|
+
*/
|
|
33
46
|
components: Array<WorkspaceComponent>;
|
|
34
47
|
|
|
35
|
-
/**
|
|
48
|
+
/**
|
|
49
|
+
* Metadata of the Workspace Layout.
|
|
50
|
+
*/
|
|
36
51
|
metadata?: any;
|
|
37
52
|
}
|
|
38
53
|
|
|
54
|
+
/**
|
|
55
|
+
* Describes the state of a Workspace component in a Workspace Layout.
|
|
56
|
+
*/
|
|
39
57
|
export interface WorkspaceLayoutComponentState {
|
|
40
|
-
/**
|
|
58
|
+
/**
|
|
59
|
+
* Array of objects, each describing a child element of the Workspace.
|
|
60
|
+
*/
|
|
41
61
|
children: Array<RowLayoutItem | ColumnLayoutItem | GroupLayoutItem | WindowLayoutItem>;
|
|
42
62
|
|
|
43
|
-
/**
|
|
63
|
+
/**
|
|
64
|
+
* Settings of the Workspace.
|
|
65
|
+
*/
|
|
44
66
|
config: any;
|
|
45
67
|
|
|
46
|
-
/**
|
|
68
|
+
/**
|
|
69
|
+
* Context of the Workspace.
|
|
70
|
+
*/
|
|
47
71
|
context: any;
|
|
48
72
|
}
|
|
49
73
|
|
|
50
|
-
/**
|
|
74
|
+
/**
|
|
75
|
+
* Describes a Workspace component in a Workspace Layout.
|
|
76
|
+
*/
|
|
51
77
|
export interface WorkspaceComponent {
|
|
52
|
-
/**
|
|
78
|
+
/**
|
|
79
|
+
* Type of the component.
|
|
80
|
+
*/
|
|
53
81
|
type: "Workspace";
|
|
54
82
|
|
|
55
83
|
/**
|
|
56
|
-
*
|
|
84
|
+
* Name of the Workspaces App with which the Workspace Layout is associated.
|
|
57
85
|
* *Available only in **io.Connect Desktop**.*
|
|
58
86
|
*/
|
|
59
87
|
application?: string;
|
|
60
88
|
|
|
89
|
+
/**
|
|
90
|
+
* State of the Workspace component.
|
|
91
|
+
*/
|
|
61
92
|
state: WorkspaceLayoutComponentState;
|
|
62
93
|
}
|
|
63
94
|
|
|
64
|
-
/**
|
|
95
|
+
/**
|
|
96
|
+
* Describes a row in a Workspace Layout.
|
|
97
|
+
*/
|
|
65
98
|
export interface RowLayoutItem {
|
|
66
|
-
/**
|
|
99
|
+
/**
|
|
100
|
+
* Type of the Workspace element.
|
|
101
|
+
*/
|
|
67
102
|
type: "row";
|
|
68
103
|
|
|
69
|
-
/**
|
|
104
|
+
/**
|
|
105
|
+
* Array of objects, each describing a child element of the row.
|
|
106
|
+
*/
|
|
70
107
|
children: Array<RowLayoutItem | ColumnLayoutItem | GroupLayoutItem | WindowLayoutItem>;
|
|
71
108
|
|
|
72
|
-
/**
|
|
109
|
+
/**
|
|
110
|
+
* Settings of the row.
|
|
111
|
+
*/
|
|
73
112
|
config: any;
|
|
74
113
|
}
|
|
75
114
|
|
|
76
|
-
/**
|
|
115
|
+
/**
|
|
116
|
+
* Describes a column in a Workspace Layout.
|
|
117
|
+
*/
|
|
77
118
|
export interface ColumnLayoutItem {
|
|
78
|
-
/**
|
|
119
|
+
/**
|
|
120
|
+
* Type of the Workspace element.
|
|
121
|
+
*/
|
|
79
122
|
type: "column";
|
|
80
123
|
|
|
81
|
-
/**
|
|
124
|
+
/**
|
|
125
|
+
* Array of objects, each describing a child element of the column.
|
|
126
|
+
*/
|
|
82
127
|
children: Array<RowLayoutItem | ColumnLayoutItem | GroupLayoutItem | WindowLayoutItem>;
|
|
83
128
|
|
|
84
|
-
/**
|
|
129
|
+
/**
|
|
130
|
+
* Settings of the column.
|
|
131
|
+
*/
|
|
85
132
|
config: any;
|
|
86
133
|
}
|
|
87
134
|
|
|
88
|
-
/**
|
|
135
|
+
/**
|
|
136
|
+
* Describes a window group in a Workspace Layout.
|
|
137
|
+
*/
|
|
89
138
|
export interface GroupLayoutItem {
|
|
90
|
-
/**
|
|
139
|
+
/**
|
|
140
|
+
* Type of the Workspace element.
|
|
141
|
+
*/
|
|
91
142
|
type: "group";
|
|
92
143
|
|
|
93
|
-
/**
|
|
144
|
+
/**
|
|
145
|
+
* Array of objects, each describing a window in the group. Groups can contain only windows.
|
|
146
|
+
*/
|
|
94
147
|
children: WindowLayoutItem[];
|
|
95
148
|
|
|
96
|
-
/**
|
|
149
|
+
/**
|
|
150
|
+
* Settings of the window group.
|
|
151
|
+
*/
|
|
97
152
|
config: any;
|
|
98
153
|
}
|
|
99
154
|
|
|
155
|
+
/**
|
|
156
|
+
* Describes the configuration of a window in a Workspace Layout.
|
|
157
|
+
*/
|
|
100
158
|
export interface WindowLayoutItemConfig {
|
|
101
|
-
/**
|
|
159
|
+
/**
|
|
160
|
+
* Name of the app as specified in its definition.
|
|
161
|
+
*/
|
|
102
162
|
appName: string;
|
|
103
|
-
|
|
163
|
+
|
|
164
|
+
/**
|
|
165
|
+
* ID of the window.
|
|
166
|
+
*/
|
|
104
167
|
windowId?: string;
|
|
105
|
-
|
|
168
|
+
|
|
169
|
+
/**
|
|
170
|
+
* URL of the window, if the window isn't defined as an app.
|
|
171
|
+
*/
|
|
106
172
|
url?: string;
|
|
107
|
-
|
|
173
|
+
|
|
174
|
+
/**
|
|
175
|
+
* Title of the window.
|
|
176
|
+
*/
|
|
108
177
|
title?: string;
|
|
109
|
-
|
|
178
|
+
|
|
179
|
+
/**
|
|
180
|
+
* Context of the window that will be used when restoring the window.
|
|
181
|
+
*/
|
|
110
182
|
context?: any;
|
|
111
|
-
|
|
183
|
+
|
|
184
|
+
/**
|
|
185
|
+
* ID used for correlating window instances with Layout objects.
|
|
186
|
+
*/
|
|
112
187
|
instanceId?: string;
|
|
113
188
|
}
|
|
114
189
|
|
|
115
|
-
/**
|
|
190
|
+
/**
|
|
191
|
+
* Describes a window in a Workspace Layout.
|
|
192
|
+
*/
|
|
116
193
|
export interface WindowLayoutItem {
|
|
117
|
-
/**
|
|
194
|
+
/**
|
|
195
|
+
* Type of the Workspace element.
|
|
196
|
+
*/
|
|
118
197
|
type: "window";
|
|
119
|
-
|
|
198
|
+
|
|
199
|
+
/**
|
|
200
|
+
* Configuration of the window.
|
|
201
|
+
*/
|
|
120
202
|
config: WindowLayoutItemConfig;
|
|
121
203
|
}
|
|
122
204
|
|
|
123
|
-
/**
|
|
205
|
+
/**
|
|
206
|
+
* Function for unsubscribing from further notifications.
|
|
207
|
+
*/
|
|
124
208
|
export type Unsubscribe = () => void;
|
|
125
209
|
|
|
126
|
-
/**
|
|
210
|
+
/**
|
|
211
|
+
* Options for restoring a Workspace from a Workspace Layout.
|
|
212
|
+
*/
|
|
127
213
|
export interface RestoreWorkspaceConfig {
|
|
128
|
-
/**
|
|
214
|
+
/**
|
|
215
|
+
* Object that will be set as a window context for all windows in the Workspace.
|
|
216
|
+
*/
|
|
129
217
|
context?: object;
|
|
130
218
|
|
|
131
|
-
/**
|
|
219
|
+
/**
|
|
220
|
+
* Title for the Workspace.
|
|
221
|
+
*/
|
|
132
222
|
title?: string;
|
|
133
223
|
|
|
134
|
-
/**
|
|
224
|
+
/**
|
|
225
|
+
* ID of an existing `Frame` instance. If provided, the Workspace will be opened in that `Frame` instance.
|
|
226
|
+
*/
|
|
135
227
|
frameId?: string;
|
|
136
228
|
|
|
137
229
|
/**
|
|
138
|
-
*
|
|
230
|
+
* Name of the Workspaces App that will be used for creating the new `Frame` instance.
|
|
139
231
|
* *Available only in **io.Connect Desktop**.*
|
|
140
232
|
*/
|
|
141
233
|
applicationName?: string;
|
|
142
234
|
|
|
143
|
-
/**
|
|
235
|
+
/**
|
|
236
|
+
* If `true`, the Workspace will be opened in a new `Frame` instance.
|
|
237
|
+
* Pass a `NewFrameConfig` object to provide settings for the new `Frame` instance.
|
|
238
|
+
*/
|
|
144
239
|
newFrame?: NewFrameConfig | boolean;
|
|
145
240
|
|
|
241
|
+
/**
|
|
242
|
+
* Loading strategy for the Workspace.
|
|
243
|
+
*/
|
|
146
244
|
loadingStrategy?: LoadingStrategy;
|
|
147
245
|
|
|
148
|
-
/**
|
|
246
|
+
/**
|
|
247
|
+
* ID of an existing Workspace that will be replaced by the restored Workspace.
|
|
248
|
+
*/
|
|
149
249
|
reuseWorkspaceId?: string;
|
|
150
250
|
|
|
151
|
-
/**
|
|
251
|
+
/**
|
|
252
|
+
* If `true`, the Workspace will be opened without a Workspace tab.
|
|
253
|
+
*/
|
|
152
254
|
noTabHeader?: boolean;
|
|
153
255
|
|
|
154
256
|
/**
|
|
155
|
-
*
|
|
257
|
+
* If `true`, the Workspace will be opened in a pinned state.
|
|
156
258
|
*/
|
|
157
259
|
isPinned?: boolean;
|
|
158
260
|
|
|
159
261
|
/**
|
|
160
|
-
*
|
|
262
|
+
* Icon for the Workspace. The icon will represent the Workspace tab when the Workspace is pinned.
|
|
161
263
|
*/
|
|
162
264
|
icon?: string;
|
|
163
265
|
|
|
164
266
|
/**
|
|
165
|
-
*
|
|
267
|
+
* If `true`, the Workspace will be selected (on focus) in the `Frame` instance when opened.
|
|
166
268
|
*/
|
|
167
269
|
isSelected?: boolean;
|
|
168
270
|
|
|
169
271
|
/**
|
|
170
|
-
*
|
|
171
|
-
* This index
|
|
272
|
+
* Position for the Workspace within the `Frame` instance.
|
|
273
|
+
* This index will be ignored by the `init()` method when initializing an empty `Frame` instance.
|
|
172
274
|
*/
|
|
173
275
|
positionIndex?: number;
|
|
174
276
|
|
|
175
277
|
/**
|
|
176
|
-
* If `true`, the
|
|
177
|
-
* This means that the
|
|
278
|
+
* If `true`, the `Frame` instance containing the restored Workspace will be activated.
|
|
279
|
+
* This means that the window of the `Frame` instance will gain focus, will be restored to its normal state (e.g., if it has been previously minimized),
|
|
178
280
|
* and will be brought in front of other existing windows.
|
|
179
281
|
* Defaults to the configuration passed in the `workspaces.json` file or to `false`.
|
|
180
282
|
* *Available only in **io.Connect Desktop**.*
|
|
283
|
+
* @since io.Connect Desktop 9.4
|
|
284
|
+
* @since @interopio/workspaces-api 3.3.2
|
|
181
285
|
*/
|
|
182
286
|
activateFrame?: boolean;
|
|
183
287
|
|
|
@@ -188,17 +292,27 @@ export namespace IOConnectWorkspaces {
|
|
|
188
292
|
allowSystemHibernation?: boolean;
|
|
189
293
|
}
|
|
190
294
|
|
|
295
|
+
/**
|
|
296
|
+
* Options for restoring a Workspace from a Workspace Layout by the unique ID of the Layout.
|
|
297
|
+
* *Available only in **io.Connect Desktop**.*
|
|
298
|
+
* @since io.Connect Desktop 10.5
|
|
299
|
+
* @since @interopio/workspaces-api 5.0.0
|
|
300
|
+
*/
|
|
191
301
|
export interface RestoreWorkspaceByIdConfig extends RestoreWorkspaceConfig {
|
|
302
|
+
/**
|
|
303
|
+
* Unique ID of the Workspace Layout to restore.
|
|
304
|
+
* The Workspace Layout with the specified ID must exist, otherwise the operation will fail.
|
|
305
|
+
*/
|
|
192
306
|
layoutId: string;
|
|
193
307
|
}
|
|
194
308
|
|
|
195
309
|
/**
|
|
196
|
-
* Settings for showing a previously hidden
|
|
310
|
+
* Settings for showing a previously hidden `Frame` instance.
|
|
197
311
|
*/
|
|
198
312
|
export interface FrameShowConfig {
|
|
199
313
|
|
|
200
314
|
/**
|
|
201
|
-
* If `true`, the
|
|
315
|
+
* If `true`, the `Frame` instance will be activated. This means that the window of the `Frame` instance will gain focus,
|
|
202
316
|
* will be restored to its normal state (e.g., if it has been previously minimized), and will be brought in front of other existing windows.
|
|
203
317
|
* @default false
|
|
204
318
|
*/
|
|
@@ -206,7 +320,7 @@ export namespace IOConnectWorkspaces {
|
|
|
206
320
|
}
|
|
207
321
|
|
|
208
322
|
/**
|
|
209
|
-
* Describes the size of an io.Connect
|
|
323
|
+
* Describes the size of an io.Connect Window.
|
|
210
324
|
*/
|
|
211
325
|
export interface Size {
|
|
212
326
|
|
|
@@ -238,14 +352,18 @@ export namespace IOConnectWorkspaces {
|
|
|
238
352
|
}
|
|
239
353
|
|
|
240
354
|
/**
|
|
241
|
-
* Describes the bounds of a Frame instance.
|
|
355
|
+
* Describes the bounds of a `Frame` instance.
|
|
242
356
|
*/
|
|
243
357
|
export type FrameBounds = Bounds;
|
|
244
358
|
|
|
245
|
-
/**
|
|
359
|
+
/**
|
|
360
|
+
* Settings for a new `Frame` instance.
|
|
361
|
+
*/
|
|
246
362
|
export interface NewFrameConfig {
|
|
247
363
|
|
|
248
|
-
/**
|
|
364
|
+
/**
|
|
365
|
+
* Bounds for the new `Frame` instance.
|
|
366
|
+
*/
|
|
249
367
|
bounds?: {
|
|
250
368
|
top?: number;
|
|
251
369
|
left?: number;
|
|
@@ -254,61 +372,91 @@ export namespace IOConnectWorkspaces {
|
|
|
254
372
|
};
|
|
255
373
|
|
|
256
374
|
/**
|
|
257
|
-
* If `true`, the newly created
|
|
375
|
+
* If `true`, the newly created `Frame` instance will be visible.
|
|
258
376
|
* *Available only in **io.Connect Desktop**.*
|
|
259
377
|
* @since io.Connect Desktop 9.10
|
|
378
|
+
* @since @interopio/workspaces-api 4.1.1
|
|
260
379
|
* @default true
|
|
261
380
|
*/
|
|
262
381
|
isVisible?: boolean;
|
|
263
382
|
|
|
264
|
-
/**
|
|
383
|
+
/**
|
|
384
|
+
* ID for the new `Frame` instance. The operation will be rejected if a `Frame` instance with the same ID already exists.
|
|
385
|
+
*/
|
|
265
386
|
frameId?: string;
|
|
266
387
|
}
|
|
267
388
|
|
|
268
|
-
/**
|
|
389
|
+
/**
|
|
390
|
+
* Options for resizing a `Frame` instance.
|
|
391
|
+
*/
|
|
269
392
|
export interface ResizeConfig {
|
|
270
|
-
/**
|
|
393
|
+
/**
|
|
394
|
+
* Width in pixels for the `Frame` instance.
|
|
395
|
+
*/
|
|
271
396
|
width?: number;
|
|
272
397
|
|
|
273
|
-
/**
|
|
398
|
+
/**
|
|
399
|
+
* Height in pixels for the `Frame` instance.
|
|
400
|
+
*/
|
|
274
401
|
height?: number;
|
|
275
402
|
|
|
276
|
-
/**
|
|
403
|
+
/**
|
|
404
|
+
* If `true`, the provided width and height values will be treated as relative to the current ones instead of as absolute values.
|
|
405
|
+
*/
|
|
277
406
|
relative?: boolean;
|
|
278
407
|
}
|
|
279
408
|
|
|
280
|
-
/**
|
|
409
|
+
/**
|
|
410
|
+
* Options for moving a `Frame` instance.
|
|
411
|
+
*/
|
|
281
412
|
export interface MoveConfig {
|
|
282
|
-
/**
|
|
413
|
+
/**
|
|
414
|
+
* Distance in pixels of the top left corner of the `Frame` instance from the top edge of the screen.
|
|
415
|
+
*/
|
|
283
416
|
top?: number;
|
|
284
417
|
|
|
285
|
-
/**
|
|
418
|
+
/**
|
|
419
|
+
* Distance in pixels of the top left corner of the `Frame` instance from the left edge of the screen.
|
|
420
|
+
*/
|
|
286
421
|
left?: number;
|
|
287
422
|
|
|
288
|
-
/**
|
|
423
|
+
/**
|
|
424
|
+
* If `true`, the provided top and left values will be treated as relative to the current ones instead of as absolute values.
|
|
425
|
+
*/
|
|
289
426
|
relative?: boolean;
|
|
290
427
|
}
|
|
291
428
|
|
|
292
429
|
/**
|
|
293
|
-
* Options for closing a Frame.
|
|
294
|
-
* *Available only in **io.Connect Desktop**.*
|
|
430
|
+
* Options for closing a `Frame` instance.
|
|
295
431
|
* @since io.Connect Desktop 9.9
|
|
432
|
+
* @since io.Connect Browser 5.0
|
|
433
|
+
* @since @interopio/workspaces-api 3.5.7
|
|
296
434
|
*/
|
|
297
|
-
export interface FrameCloseOptions {
|
|
435
|
+
export interface FrameCloseOptions extends CloseOptions { }
|
|
436
|
+
|
|
437
|
+
/**
|
|
438
|
+
* Options for closing a `Frame` instance.
|
|
439
|
+
* @since @interopio/workspaces-api 5.1
|
|
440
|
+
*/
|
|
441
|
+
export interface CloseOptions {
|
|
298
442
|
/**
|
|
299
|
-
* If `true`, will allow preventing the operation for closing the Frame.
|
|
443
|
+
* If `true`, will allow preventing the operation for closing the `Frame` instance.
|
|
300
444
|
*/
|
|
301
445
|
allowPrevent?: boolean;
|
|
302
446
|
|
|
303
447
|
/**
|
|
304
|
-
* If `true`, will show a dialog for the user to confirm or cancel closing the Frame.
|
|
448
|
+
* If `true`, will show a dialog for the user to confirm or cancel closing the `Frame` instance.
|
|
305
449
|
*/
|
|
306
450
|
showDialog?: boolean;
|
|
307
451
|
}
|
|
308
452
|
|
|
309
|
-
/**
|
|
453
|
+
/**
|
|
454
|
+
* Settings for creating a Workspace.
|
|
455
|
+
*/
|
|
310
456
|
export interface WorkspaceCreateConfig {
|
|
311
|
-
/**
|
|
457
|
+
/**
|
|
458
|
+
* If `true`, the Workspace will also be saved as a Workspace Layout when created.
|
|
459
|
+
*/
|
|
312
460
|
saveLayout?: boolean;
|
|
313
461
|
}
|
|
314
462
|
|
|
@@ -320,164 +468,191 @@ export namespace IOConnectWorkspaces {
|
|
|
320
468
|
*/
|
|
321
469
|
export type LoadingStrategy = "direct" | "delayed" | "lazy";
|
|
322
470
|
|
|
323
|
-
/**
|
|
471
|
+
/**
|
|
472
|
+
* Workspace element. Can be a box element or a Workspace window.
|
|
473
|
+
*/
|
|
324
474
|
export type WorkspaceElement = WorkspaceBox | WorkspaceWindow;
|
|
325
475
|
|
|
326
|
-
/**
|
|
476
|
+
/**
|
|
477
|
+
* Box element in a Workspace - a row, a column, or a window group. Box elements can contain other Workspace elements.
|
|
478
|
+
*/
|
|
327
479
|
export type WorkspaceBox = Row | Column | Group;
|
|
328
480
|
|
|
329
|
-
/**
|
|
481
|
+
/**
|
|
482
|
+
* Window state of a `Frame` instance.
|
|
483
|
+
*/
|
|
330
484
|
export type FrameState = "maximized" | "minimized" | "normal";
|
|
331
485
|
|
|
332
|
-
/**
|
|
486
|
+
/**
|
|
487
|
+
* Mode for dragging the windows in a Workspace.
|
|
488
|
+
*/
|
|
333
489
|
export type WindowDragMode = "keepInside" | "autoEject";
|
|
334
490
|
|
|
335
|
-
/**
|
|
491
|
+
/**
|
|
492
|
+
* Options for creating a builder.
|
|
493
|
+
*/
|
|
336
494
|
export interface BuilderConfig {
|
|
337
|
-
/**
|
|
495
|
+
/**
|
|
496
|
+
* Type of the builder.
|
|
497
|
+
*/
|
|
338
498
|
type: "workspace" | "row" | "column" | "group";
|
|
339
499
|
|
|
340
|
-
/**
|
|
500
|
+
/**
|
|
501
|
+
* Definition for the Workspace or the box element that will be built.
|
|
502
|
+
*/
|
|
341
503
|
definition?: WorkspaceDefinition | BoxDefinition;
|
|
342
504
|
}
|
|
343
505
|
|
|
344
|
-
/**
|
|
506
|
+
/**
|
|
507
|
+
* Settings for a Workspace.
|
|
508
|
+
*/
|
|
345
509
|
export interface WorkspaceConfig {
|
|
346
|
-
/**
|
|
510
|
+
/**
|
|
511
|
+
* Title for the Workspace.
|
|
512
|
+
*/
|
|
347
513
|
title?: string;
|
|
348
514
|
|
|
349
|
-
/**
|
|
515
|
+
/**
|
|
516
|
+
* Position for the Workspace relative to the other Workspaces in the `Frame` instance.
|
|
517
|
+
*/
|
|
350
518
|
position?: number;
|
|
351
519
|
|
|
352
520
|
/**
|
|
353
|
-
*
|
|
521
|
+
* If `true`, the Workspace will be opened without a Workspace tab.
|
|
354
522
|
* @default false
|
|
355
523
|
*/
|
|
356
524
|
noTabHeader?: boolean;
|
|
357
525
|
|
|
358
|
-
/**
|
|
526
|
+
/**
|
|
527
|
+
* ID of an existing Workspace that will be replaced by the new Workspace.
|
|
528
|
+
*/
|
|
359
529
|
reuseWorkspaceId?: string;
|
|
360
530
|
|
|
361
|
-
/**
|
|
531
|
+
/**
|
|
532
|
+
* Loading strategy for the windows in the Workspace when the Workspace is created or restored.
|
|
533
|
+
*/
|
|
362
534
|
loadStrategy?: LoadingStrategy;
|
|
363
535
|
|
|
364
536
|
/**
|
|
365
|
-
*
|
|
537
|
+
* If `true`, will allow the user to add windows by dropping them in the Workspace.
|
|
538
|
+
* *Available only in **io.Connect Desktop**.*
|
|
366
539
|
* @default true
|
|
367
540
|
*/
|
|
368
541
|
allowDrop?: boolean;
|
|
369
542
|
|
|
370
543
|
/**
|
|
371
|
-
*
|
|
544
|
+
* If `true`, will allow the user to add windows by dropping them in the leftmost area of the Workspace.
|
|
372
545
|
* @default true
|
|
373
546
|
*/
|
|
374
547
|
allowDropLeft?: boolean;
|
|
375
548
|
|
|
376
549
|
/**
|
|
377
|
-
*
|
|
550
|
+
* If `true`, will allow the user to add windows by dropping them in the topmost area of the Workspace.
|
|
378
551
|
* @default true
|
|
379
552
|
*/
|
|
380
553
|
allowDropTop?: boolean;
|
|
381
554
|
|
|
382
555
|
/**
|
|
383
|
-
*
|
|
556
|
+
* If `true`, will allow the user to add windows by dropping them in the rightmost area of the Workspace.
|
|
384
557
|
* @default true
|
|
385
558
|
*/
|
|
386
559
|
allowDropRight?: boolean;
|
|
387
560
|
|
|
388
561
|
/**
|
|
389
|
-
*
|
|
562
|
+
* If `true`, will allow the user to add windows by dropping them in the bottommost area of the Workspace.
|
|
390
563
|
* @default true
|
|
391
564
|
*/
|
|
392
565
|
allowDropBottom?: boolean;
|
|
393
566
|
|
|
394
567
|
/**
|
|
395
|
-
*
|
|
568
|
+
* If `true`, will allow the user to extract windows from the Workspace.
|
|
396
569
|
* @default true
|
|
397
570
|
*/
|
|
398
571
|
allowExtract?: boolean;
|
|
399
572
|
|
|
400
573
|
/**
|
|
401
|
-
*
|
|
574
|
+
* If `true`, will allow the user to reorder windows in the Workspace.
|
|
402
575
|
* @default true
|
|
403
576
|
*/
|
|
404
577
|
allowWindowReorder?: boolean;
|
|
405
578
|
|
|
406
579
|
/**
|
|
407
|
-
*
|
|
580
|
+
* If `true`, will show the "Rename", "Save", and "Save As" options in the Workspace tab menu.
|
|
408
581
|
* @default true
|
|
409
582
|
*/
|
|
410
583
|
showSaveButton?: boolean;
|
|
411
584
|
|
|
412
585
|
/**
|
|
413
|
-
*
|
|
586
|
+
* If `true`, will allow the user to reorder the Workspace tab in the Workspaces App.
|
|
414
587
|
* @default true
|
|
415
588
|
*/
|
|
416
589
|
allowWorkspaceTabReorder?: boolean;
|
|
417
590
|
|
|
418
591
|
/**
|
|
419
|
-
*
|
|
592
|
+
* If `true`, will allow the user to extract the Workspace tab from the Workspaces App.
|
|
420
593
|
* *Available only in **io.Connect Desktop**.*
|
|
421
594
|
* @default true
|
|
422
595
|
*/
|
|
423
596
|
allowWorkspaceTabExtract?: boolean;
|
|
424
597
|
|
|
425
598
|
/**
|
|
426
|
-
*
|
|
599
|
+
* If `true`, will show the "Close" button in the Workspace tab.
|
|
427
600
|
* @default true
|
|
428
601
|
*/
|
|
429
602
|
showCloseButton?: boolean;
|
|
430
603
|
|
|
431
604
|
/**
|
|
432
|
-
*
|
|
605
|
+
* If `true`, will allow the user to resize the Workspace elements by dragging the splitters.
|
|
433
606
|
* @default true
|
|
434
607
|
*/
|
|
435
608
|
allowSplitters?: boolean;
|
|
436
609
|
|
|
437
610
|
/**
|
|
438
|
-
*
|
|
611
|
+
* If `true`, will show the "Close" buttons in the window tabs.
|
|
439
612
|
* @default true
|
|
440
613
|
*/
|
|
441
614
|
showWindowCloseButtons?: boolean;
|
|
442
615
|
|
|
443
616
|
/**
|
|
444
|
-
*
|
|
617
|
+
* If `true`, will show the "Eject" buttons in the headers of the window groups.
|
|
445
618
|
* @default true
|
|
446
619
|
*/
|
|
447
620
|
showEjectButtons?: boolean;
|
|
448
621
|
|
|
449
622
|
/**
|
|
450
|
-
*
|
|
623
|
+
* If `true`, will show the "Add Window" buttons (the "+" buttons) in the headers of the window groups.
|
|
451
624
|
* @default true
|
|
452
625
|
*/
|
|
453
626
|
showAddWindowButtons?: boolean;
|
|
454
627
|
|
|
455
628
|
/**
|
|
456
|
-
*
|
|
629
|
+
* If `true`, the Workspace will be opened in a pinned state.
|
|
457
630
|
* @default false
|
|
458
631
|
*/
|
|
459
632
|
isPinned?: boolean;
|
|
460
633
|
|
|
461
634
|
/**
|
|
462
|
-
*
|
|
635
|
+
* Icon for the Workspace. The icon will represent the Workspace tab when the Workspace is pinned.
|
|
463
636
|
*/
|
|
464
637
|
icon?: string;
|
|
465
638
|
|
|
466
639
|
/**
|
|
467
|
-
*
|
|
640
|
+
* If `true`, the Workspace will be selected (on focus) in the `Frame` instance when opened.
|
|
468
641
|
* @default true
|
|
469
642
|
*/
|
|
470
643
|
isSelected?: boolean;
|
|
471
644
|
|
|
472
645
|
/**
|
|
473
|
-
*
|
|
474
|
-
* This index
|
|
646
|
+
* Position for the Workspace within the `Frame` instance.
|
|
647
|
+
* This index will be ignored by the `init()` method when initializing an empty `Frame` instance.
|
|
475
648
|
*/
|
|
476
649
|
positionIndex?: number;
|
|
477
650
|
|
|
478
651
|
/**
|
|
479
652
|
* Mode for dragging the windows that are part of the Workspace. If set to `"autoEject"` (available only in **io.Connect Desktop**), when the user drags a Workspace window, it will be ejected from the Workspace during the dragging operation and the user will be able to drop it back inside the Workspace, or out of the Workspace.
|
|
480
653
|
* If set to `"keepInside"`, the window won't be ejected from the Workspace when being dragged and the user will be able to drop it only inside the Workspace.
|
|
654
|
+
* @since io.Connect Desktop 9.5
|
|
655
|
+
* @since @interopio/workspaces-api 3.5.2
|
|
481
656
|
*/
|
|
482
657
|
windowDragMode?: "keepInside" | "autoEject";
|
|
483
658
|
|
|
@@ -540,7 +715,7 @@ export namespace IOConnectWorkspaces {
|
|
|
540
715
|
export interface AppRestrictions {
|
|
541
716
|
|
|
542
717
|
/**
|
|
543
|
-
* Array of objects describing the restrictions
|
|
718
|
+
* Array of objects, each describing the restrictions for a specific app.
|
|
544
719
|
* The restrictions specified here will override the default restrictions specified via the `default` property.
|
|
545
720
|
*/
|
|
546
721
|
apps?: AppRestrictionEntry[];
|
|
@@ -552,54 +727,85 @@ export namespace IOConnectWorkspaces {
|
|
|
552
727
|
default?: AppRestrictionRule;
|
|
553
728
|
}
|
|
554
729
|
|
|
555
|
-
/**
|
|
730
|
+
/**
|
|
731
|
+
* Lock settings for a Workspace.
|
|
732
|
+
*/
|
|
556
733
|
export interface WorkspaceLockConfig {
|
|
557
|
-
/**
|
|
734
|
+
/**
|
|
735
|
+
* If `true`, will allow the user to resize the Workspace elements by dragging the splitters.
|
|
736
|
+
*/
|
|
558
737
|
allowSplitters?: boolean;
|
|
559
738
|
|
|
560
|
-
/**
|
|
739
|
+
/**
|
|
740
|
+
* If `true`, will allow the user to add windows by dropping them in the Workspace.
|
|
741
|
+
* *Available only in **io.Connect Desktop**.*
|
|
742
|
+
*/
|
|
561
743
|
allowDrop?: boolean;
|
|
562
744
|
|
|
563
|
-
/**
|
|
745
|
+
/**
|
|
746
|
+
* If `true`, will allow the user to add windows by dropping them in the leftmost area of the Workspace.
|
|
747
|
+
*/
|
|
564
748
|
allowDropLeft?: boolean;
|
|
565
749
|
|
|
566
|
-
/**
|
|
750
|
+
/**
|
|
751
|
+
* If `true`, will allow the user to add windows by dropping them in the topmost area of the Workspace.
|
|
752
|
+
*/
|
|
567
753
|
allowDropTop?: boolean;
|
|
568
754
|
|
|
569
|
-
/**
|
|
755
|
+
/**
|
|
756
|
+
* If `true`, will allow the user to add windows by dropping them in the rightmost area of the Workspace.
|
|
757
|
+
*/
|
|
570
758
|
allowDropRight?: boolean;
|
|
571
759
|
|
|
572
|
-
/**
|
|
760
|
+
/**
|
|
761
|
+
* If `true`, will allow the user to add windows by dropping them in the bottommost area of the Workspace.
|
|
762
|
+
*/
|
|
573
763
|
allowDropBottom?: boolean;
|
|
574
764
|
|
|
575
|
-
/**
|
|
765
|
+
/**
|
|
766
|
+
* If `true`, will allow the user to extract (or rearrange) windows inside the Workspace.
|
|
767
|
+
*/
|
|
576
768
|
allowExtract?: boolean;
|
|
577
769
|
|
|
578
|
-
/**
|
|
770
|
+
/**
|
|
771
|
+
* If `true`, will allow the user to reorder windows in the Workspace.
|
|
772
|
+
*/
|
|
579
773
|
allowWindowReorder?: boolean;
|
|
580
774
|
|
|
581
|
-
/**
|
|
775
|
+
/**
|
|
776
|
+
* If `true`, will show the "Close" button in the Workspace tab.
|
|
777
|
+
*/
|
|
582
778
|
showCloseButton?: boolean;
|
|
583
779
|
|
|
584
|
-
/**
|
|
780
|
+
/**
|
|
781
|
+
* If `true`, will show the "Rename", "Save", and "Save As" options in the Workspace tab menu.
|
|
782
|
+
*/
|
|
585
783
|
showSaveButton?: boolean;
|
|
586
784
|
|
|
587
|
-
/**
|
|
785
|
+
/**
|
|
786
|
+
* If `true`, will allow the user to reorder the Workspace tab in the Workspaces App.
|
|
787
|
+
*/
|
|
588
788
|
allowWorkspaceTabReorder?: boolean;
|
|
589
789
|
|
|
590
790
|
/**
|
|
591
|
-
*
|
|
791
|
+
* If `true`, will allow the user to extract the Workspace tab from the Workspaces App.
|
|
592
792
|
* *Available only in **io.Connect Desktop**.*
|
|
593
793
|
*/
|
|
594
794
|
allowWorkspaceTabExtract?: boolean;
|
|
595
795
|
|
|
596
|
-
/**
|
|
796
|
+
/**
|
|
797
|
+
* If `true`, will show the "Add Window" buttons (the "+" buttons) in the headers of the window groups.
|
|
798
|
+
*/
|
|
597
799
|
showAddWindowButtons?: boolean;
|
|
598
800
|
|
|
599
|
-
/**
|
|
801
|
+
/**
|
|
802
|
+
* If `true`, will show the "Eject" buttons in the headers of the window groups.
|
|
803
|
+
*/
|
|
600
804
|
showEjectButtons?: boolean;
|
|
601
805
|
|
|
602
|
-
/**
|
|
806
|
+
/**
|
|
807
|
+
* If `true`, will show the "Close" buttons in the window tabs.
|
|
808
|
+
*/
|
|
603
809
|
showWindowCloseButtons?: boolean;
|
|
604
810
|
|
|
605
811
|
/**
|
|
@@ -609,211 +815,395 @@ export namespace IOConnectWorkspaces {
|
|
|
609
815
|
allowSystemHibernation?: boolean;
|
|
610
816
|
}
|
|
611
817
|
|
|
612
|
-
/**
|
|
818
|
+
/**
|
|
819
|
+
* Lock settings for a Workspace window.
|
|
820
|
+
*/
|
|
613
821
|
export interface WorkspaceWindowLockConfig {
|
|
614
|
-
/**
|
|
822
|
+
/**
|
|
823
|
+
* If `true`, will allow the user to extract the window from the Workspace.
|
|
824
|
+
*/
|
|
615
825
|
allowExtract?: boolean;
|
|
616
826
|
|
|
617
|
-
/**
|
|
827
|
+
/**
|
|
828
|
+
* If `true`, will allow the user to reorder the window in the window group.
|
|
829
|
+
*/
|
|
618
830
|
allowReorder?: boolean;
|
|
619
831
|
|
|
620
|
-
/**
|
|
832
|
+
/**
|
|
833
|
+
* If `true`, will show the "Close" button in the window tab.
|
|
834
|
+
*/
|
|
621
835
|
showCloseButton?: boolean;
|
|
622
836
|
}
|
|
623
837
|
|
|
624
|
-
/**
|
|
838
|
+
/**
|
|
839
|
+
* Lock settings for a window group.
|
|
840
|
+
*/
|
|
625
841
|
export interface GroupLockConfig {
|
|
626
|
-
/**
|
|
842
|
+
/**
|
|
843
|
+
* If `true`, will allow the user to extract windows from the window group.
|
|
844
|
+
*/
|
|
627
845
|
allowExtract?: boolean;
|
|
628
846
|
|
|
629
|
-
/**
|
|
847
|
+
/**
|
|
848
|
+
* If `true`, will allow the user to reorder the windows in the window group.
|
|
849
|
+
*/
|
|
630
850
|
allowReorder?: boolean;
|
|
631
851
|
|
|
632
|
-
/**
|
|
852
|
+
/**
|
|
853
|
+
* If `true`, will allow the user to add windows by dropping them in the window group.
|
|
854
|
+
* *Available only in **io.Connect Desktop**.*
|
|
855
|
+
*/
|
|
633
856
|
allowDrop?: boolean;
|
|
634
857
|
|
|
635
|
-
/**
|
|
858
|
+
/**
|
|
859
|
+
* If `true`, will allow the user to add windows by dropping them in the leftmost area of the window group.
|
|
860
|
+
*/
|
|
636
861
|
allowDropLeft?: boolean;
|
|
637
862
|
|
|
638
|
-
/**
|
|
863
|
+
/**
|
|
864
|
+
* If `true`, will allow the user to add windows by dropping them in the rightmost area of the window group.
|
|
865
|
+
*/
|
|
639
866
|
allowDropRight?: boolean;
|
|
640
867
|
|
|
641
|
-
/**
|
|
868
|
+
/**
|
|
869
|
+
* If `true`, will allow the user to add windows by dropping them in the topmost area of the window group.
|
|
870
|
+
*/
|
|
642
871
|
allowDropTop?: boolean;
|
|
643
872
|
|
|
644
|
-
/**
|
|
873
|
+
/**
|
|
874
|
+
* If `true`, will allow the user to add windows by dropping them in the bottommost area of the window group.
|
|
875
|
+
*/
|
|
645
876
|
allowDropBottom?: boolean;
|
|
646
877
|
|
|
647
|
-
/**
|
|
878
|
+
/**
|
|
879
|
+
* If `true`, will allow the user to add windows by dropping them in the header area of the window group.
|
|
880
|
+
*/
|
|
648
881
|
allowDropHeader?: boolean;
|
|
649
882
|
|
|
650
|
-
/**
|
|
883
|
+
/**
|
|
884
|
+
* If `true`, will show the "Maximize" button in the header of the window group.
|
|
885
|
+
*/
|
|
651
886
|
showMaximizeButton?: boolean;
|
|
652
887
|
|
|
653
|
-
/**
|
|
888
|
+
/**
|
|
889
|
+
* If `true`, will show the "Eject" button in the header of the window group.
|
|
890
|
+
*/
|
|
654
891
|
showEjectButton?: boolean;
|
|
655
892
|
|
|
656
|
-
/**
|
|
893
|
+
/**
|
|
894
|
+
* If `true`, will show the "Add Window" button (the "+" button) in the header of the window group.
|
|
895
|
+
*/
|
|
657
896
|
showAddWindowButton?: boolean;
|
|
658
897
|
}
|
|
659
898
|
|
|
660
|
-
/**
|
|
899
|
+
/**
|
|
900
|
+
* Lock settings for a Workspace row.
|
|
901
|
+
*/
|
|
661
902
|
export interface RowLockConfig {
|
|
662
|
-
/**
|
|
903
|
+
/**
|
|
904
|
+
* If `true`, will allow the user to add windows by dropping them in the Workspace row.
|
|
905
|
+
* *Available only in **io.Connect Desktop**.*
|
|
906
|
+
*/
|
|
663
907
|
allowDrop?: boolean;
|
|
664
908
|
|
|
665
|
-
/**
|
|
909
|
+
/**
|
|
910
|
+
* If `true`, will allow the user to resize the Workspace row by dragging the splitters.
|
|
911
|
+
*/
|
|
666
912
|
allowSplitters?: boolean;
|
|
667
913
|
}
|
|
668
914
|
|
|
669
|
-
/**
|
|
915
|
+
/**
|
|
916
|
+
* Lock settings for a Workspace column.
|
|
917
|
+
*/
|
|
670
918
|
export interface ColumnLockConfig {
|
|
671
|
-
/**
|
|
919
|
+
/**
|
|
920
|
+
* If `true`, will allow the user to add windows by dropping them in the Workspace column.
|
|
921
|
+
* *Available only in **io.Connect Desktop**.*
|
|
922
|
+
*/
|
|
672
923
|
allowDrop?: boolean;
|
|
673
924
|
|
|
674
|
-
/**
|
|
925
|
+
/**
|
|
926
|
+
* If `true`, will allow the user to resize the Workspace column by dragging the splitters.
|
|
927
|
+
*/
|
|
675
928
|
allowSplitters?: boolean;
|
|
676
929
|
}
|
|
677
930
|
|
|
678
|
-
/**
|
|
931
|
+
/**
|
|
932
|
+
* Settings for a Workspace window.
|
|
933
|
+
*/
|
|
679
934
|
export interface WorkspaceWindowDefinitionConfig {
|
|
680
|
-
/**
|
|
935
|
+
/**
|
|
936
|
+
* Minimum width in pixels for the Workspace window.
|
|
937
|
+
*/
|
|
681
938
|
minWidth?: number;
|
|
682
939
|
|
|
683
|
-
/**
|
|
940
|
+
/**
|
|
941
|
+
* Maximum width in pixels for the Workspace window.
|
|
942
|
+
*/
|
|
684
943
|
maxWidth?: number;
|
|
685
944
|
|
|
686
|
-
/**
|
|
945
|
+
/**
|
|
946
|
+
* Minimum height in pixels for the Workspace window.
|
|
947
|
+
*/
|
|
687
948
|
minHeight?: number;
|
|
688
949
|
|
|
689
|
-
/**
|
|
950
|
+
/**
|
|
951
|
+
* Maximum height in pixels for the Workspace window.
|
|
952
|
+
*/
|
|
690
953
|
maxHeight?: number;
|
|
691
954
|
|
|
692
|
-
/**
|
|
955
|
+
/**
|
|
956
|
+
* If `true`, will allow the user to extract the window from the Workspace.
|
|
957
|
+
*/
|
|
693
958
|
allowExtract?: boolean;
|
|
694
959
|
|
|
695
|
-
/**
|
|
960
|
+
/**
|
|
961
|
+
* If `true`, will allow the user to reorder the window in the window group.
|
|
962
|
+
*/
|
|
696
963
|
allowReorder?: boolean;
|
|
697
964
|
|
|
698
|
-
/**
|
|
965
|
+
/**
|
|
966
|
+
* If `true`, will show the "Close" button in the window tab.
|
|
967
|
+
*/
|
|
699
968
|
showCloseButton?: boolean;
|
|
969
|
+
|
|
970
|
+
/**
|
|
971
|
+
* Zero-based position at which the window will be inserted among the children of the element to which it's added.
|
|
972
|
+
* When the window is added to a group, this is the position of its tab within the group.
|
|
973
|
+
* When the window is added to a Workspace, the position is among the children of the box in which the window is placed.
|
|
974
|
+
* Applies only to the window passed to an `addWindow()` method. Ignored for windows defined in a `children` array, whose position is determined by their order in the array.
|
|
975
|
+
* If the position is greater than the number of children, the window will be added as the last child.
|
|
976
|
+
* @since io.Connect Desktop 10.6
|
|
977
|
+
* @since io.Connect Browser 5.0
|
|
978
|
+
* @since @interopio/workspaces-api 5.1
|
|
979
|
+
*/
|
|
980
|
+
positionIndex?: number;
|
|
700
981
|
}
|
|
701
982
|
|
|
702
|
-
/**
|
|
983
|
+
/**
|
|
984
|
+
* Settings for a window group.
|
|
985
|
+
*/
|
|
703
986
|
export interface GroupDefinitionConfig {
|
|
704
|
-
/**
|
|
987
|
+
/**
|
|
988
|
+
* Minimum width in pixels for the window group.
|
|
989
|
+
*/
|
|
705
990
|
minWidth?: number;
|
|
706
991
|
|
|
707
|
-
/**
|
|
992
|
+
/**
|
|
993
|
+
* Maximum width in pixels for the window group.
|
|
994
|
+
*/
|
|
708
995
|
maxWidth?: number;
|
|
709
996
|
|
|
710
|
-
/**
|
|
997
|
+
/**
|
|
998
|
+
* Minimum height in pixels for the window group.
|
|
999
|
+
*/
|
|
711
1000
|
minHeight?: number;
|
|
712
1001
|
|
|
713
|
-
/**
|
|
1002
|
+
/**
|
|
1003
|
+
* Maximum height in pixels for the window group.
|
|
1004
|
+
*/
|
|
714
1005
|
maxHeight?: number;
|
|
715
1006
|
|
|
716
|
-
/**
|
|
1007
|
+
/**
|
|
1008
|
+
* If `true`, will allow the user to extract windows from the window group.
|
|
1009
|
+
*/
|
|
717
1010
|
allowExtract?: boolean;
|
|
718
1011
|
|
|
719
|
-
/**
|
|
1012
|
+
/**
|
|
1013
|
+
* If `true`, will allow the user to reorder the windows in the window group.
|
|
1014
|
+
*/
|
|
720
1015
|
allowReorder?: boolean;
|
|
721
1016
|
|
|
722
|
-
/**
|
|
1017
|
+
/**
|
|
1018
|
+
* If `true`, will show the "Maximize" button in the header of the window group.
|
|
1019
|
+
*/
|
|
723
1020
|
showMaximizeButton?: boolean;
|
|
724
1021
|
|
|
725
|
-
/**
|
|
1022
|
+
/**
|
|
1023
|
+
* If `true`, will show the "Eject" button in the header of the window group.
|
|
1024
|
+
*/
|
|
726
1025
|
showEjectButton?: boolean;
|
|
727
1026
|
|
|
728
|
-
/**
|
|
1027
|
+
/**
|
|
1028
|
+
* If `true`, will allow the user to add windows by dropping them in the window group.
|
|
1029
|
+
* *Available only in **io.Connect Desktop**.*
|
|
1030
|
+
*/
|
|
729
1031
|
allowDrop?: boolean;
|
|
730
1032
|
|
|
731
|
-
/**
|
|
1033
|
+
/**
|
|
1034
|
+
* If `true`, will allow the user to add windows by dropping them in the leftmost area of the window group.
|
|
1035
|
+
*/
|
|
732
1036
|
allowDropLeft?: boolean;
|
|
733
1037
|
|
|
734
|
-
/**
|
|
1038
|
+
/**
|
|
1039
|
+
* If `true`, will allow the user to add windows by dropping them in the rightmost area of the window group.
|
|
1040
|
+
*/
|
|
735
1041
|
allowDropRight?: boolean;
|
|
736
1042
|
|
|
737
|
-
/**
|
|
1043
|
+
/**
|
|
1044
|
+
* If `true`, will allow the user to add windows by dropping them in the topmost area of the window group.
|
|
1045
|
+
*/
|
|
738
1046
|
allowDropTop?: boolean;
|
|
739
1047
|
|
|
740
|
-
/**
|
|
1048
|
+
/**
|
|
1049
|
+
* If `true`, will allow the user to add windows by dropping them in the bottommost area of the window group.
|
|
1050
|
+
*/
|
|
741
1051
|
allowDropBottom?: boolean;
|
|
742
1052
|
|
|
743
|
-
/**
|
|
1053
|
+
/**
|
|
1054
|
+
* If `true`, will allow the user to add windows by dropping them in the header area of the window group.
|
|
1055
|
+
*/
|
|
744
1056
|
allowDropHeader?: boolean;
|
|
745
1057
|
|
|
746
|
-
/**
|
|
1058
|
+
/**
|
|
1059
|
+
* If `true`, will show the "Add Window" button (the "+" button) in the header of the window group.
|
|
1060
|
+
*/
|
|
747
1061
|
showAddWindowButton?: boolean;
|
|
1062
|
+
|
|
1063
|
+
/**
|
|
1064
|
+
* Zero-based position at which the group will be inserted among the children of the element to which it's added.
|
|
1065
|
+
* When the group is added to a Workspace, the position is among the children of the box in which the group is placed.
|
|
1066
|
+
* Applies only to the group passed to an `addGroup()` method. Ignored for groups defined in a `children` array, whose position is determined by their order in the array.
|
|
1067
|
+
* If the position is greater than the number of children, the group will be added as the last child.
|
|
1068
|
+
* @since io.Connect Desktop 10.6
|
|
1069
|
+
* @since io.Connect Browser 5.0
|
|
1070
|
+
* @since @interopio/workspaces-api 5.1
|
|
1071
|
+
*/
|
|
1072
|
+
positionIndex?: number;
|
|
748
1073
|
}
|
|
749
1074
|
|
|
750
|
-
/**
|
|
1075
|
+
/**
|
|
1076
|
+
* Settings for a Workspace row.
|
|
1077
|
+
*/
|
|
751
1078
|
export interface RowDefinitionConfig {
|
|
752
|
-
/**
|
|
1079
|
+
/**
|
|
1080
|
+
* Minimum height in pixels for the row.
|
|
1081
|
+
*/
|
|
753
1082
|
minHeight?: number;
|
|
754
1083
|
|
|
755
|
-
/**
|
|
1084
|
+
/**
|
|
1085
|
+
* Maximum height in pixels for the row.
|
|
1086
|
+
*/
|
|
756
1087
|
maxHeight?: number;
|
|
757
1088
|
|
|
758
|
-
/**
|
|
1089
|
+
/**
|
|
1090
|
+
* If `true`, will allow the user to add windows by dropping them in the row.
|
|
1091
|
+
* *Available only in **io.Connect Desktop**.*
|
|
1092
|
+
*/
|
|
759
1093
|
allowDrop?: boolean;
|
|
760
1094
|
|
|
761
|
-
/**
|
|
1095
|
+
/**
|
|
1096
|
+
* If `true`, will allow the user to resize the row by dragging the splitters.
|
|
1097
|
+
*/
|
|
762
1098
|
allowSplitters?: boolean;
|
|
763
1099
|
|
|
764
|
-
/**
|
|
1100
|
+
/**
|
|
1101
|
+
* If `true`, the row will be pinned. A pinned row will always maintain its height, unless the user changes it manually by dragging the splitter.
|
|
1102
|
+
*/
|
|
765
1103
|
isPinned?: boolean;
|
|
766
1104
|
|
|
767
|
-
/**
|
|
1105
|
+
/**
|
|
1106
|
+
* If `true`, the width and height of any maximized child element will be constrained to the current size of the row.
|
|
1107
|
+
*/
|
|
768
1108
|
maximizationBoundary?: boolean;
|
|
1109
|
+
|
|
1110
|
+
/**
|
|
1111
|
+
* Zero-based position at which the row will be inserted among the children of the element to which it's added.
|
|
1112
|
+
* When the row is added to a Workspace, the position is among the children of the box in which the row is placed.
|
|
1113
|
+
* Applies only to the row passed to an `addRow()` method. Ignored for rows defined in a `children` array, whose position is determined by their order in the array.
|
|
1114
|
+
* If the position is greater than the number of children, the row will be added as the last child.
|
|
1115
|
+
* @since io.Connect Desktop 10.6
|
|
1116
|
+
* @since io.Connect Browser 5.0
|
|
1117
|
+
* @since @interopio/workspaces-api 5.1
|
|
1118
|
+
*/
|
|
1119
|
+
positionIndex?: number;
|
|
769
1120
|
}
|
|
770
1121
|
|
|
771
|
-
/**
|
|
1122
|
+
/**
|
|
1123
|
+
* Settings for a Workspace column.
|
|
1124
|
+
*/
|
|
772
1125
|
export interface ColumnDefinitionConfig {
|
|
773
|
-
/**
|
|
1126
|
+
/**
|
|
1127
|
+
* Minimum width in pixels for the column.
|
|
1128
|
+
*/
|
|
774
1129
|
minWidth?: number;
|
|
775
1130
|
|
|
776
|
-
/**
|
|
1131
|
+
/**
|
|
1132
|
+
* Maximum width in pixels for the column.
|
|
1133
|
+
*/
|
|
777
1134
|
maxWidth?: number;
|
|
778
1135
|
|
|
779
|
-
/**
|
|
1136
|
+
/**
|
|
1137
|
+
* If `true`, will allow the user to add windows by dropping them in the column.
|
|
1138
|
+
* *Available only in **io.Connect Desktop**.*
|
|
1139
|
+
*/
|
|
780
1140
|
allowDrop?: boolean;
|
|
781
1141
|
|
|
782
|
-
/**
|
|
1142
|
+
/**
|
|
1143
|
+
* If `true`, will allow the user to resize the column by dragging the splitters.
|
|
1144
|
+
*/
|
|
783
1145
|
allowSplitters?: boolean;
|
|
784
1146
|
|
|
785
|
-
/**
|
|
1147
|
+
/**
|
|
1148
|
+
* If `true`, the column will be pinned. A pinned column will always maintain its width, unless the user changes it manually by dragging the splitter.
|
|
1149
|
+
*/
|
|
786
1150
|
isPinned?: boolean;
|
|
787
1151
|
|
|
788
|
-
/**
|
|
1152
|
+
/**
|
|
1153
|
+
* If `true`, the width and height of any maximized child element will be constrained to the current size of the column.
|
|
1154
|
+
*/
|
|
789
1155
|
maximizationBoundary?: boolean;
|
|
1156
|
+
|
|
1157
|
+
/**
|
|
1158
|
+
* Zero-based position at which the column will be inserted among the children of the element to which it's added.
|
|
1159
|
+
* When the column is added to a Workspace, the position is among the children of the box in which the column is placed.
|
|
1160
|
+
* Applies only to the column passed to an `addColumn()` method. Ignored for columns defined in a `children` array, whose position is determined by their order in the array.
|
|
1161
|
+
* If the position is greater than the number of children, the column will be added as the last child.
|
|
1162
|
+
* @since io.Connect Desktop 10.6
|
|
1163
|
+
* @since io.Connect Browser 5.0
|
|
1164
|
+
* @since @interopio/workspaces-api 5.1
|
|
1165
|
+
*/
|
|
1166
|
+
positionIndex?: number;
|
|
790
1167
|
}
|
|
791
1168
|
|
|
1169
|
+
/**
|
|
1170
|
+
* Options for targeting the `Frame` instance that will host a Workspace.
|
|
1171
|
+
*/
|
|
792
1172
|
export interface FrameTargetingOptions {
|
|
793
1173
|
/**
|
|
794
|
-
* If `true`, the targeted
|
|
1174
|
+
* If `true`, the targeted `Frame` instance will be activated. This means that the window of the `Frame` instance will gain focus,
|
|
795
1175
|
* will be restored to its normal state (e.g., if it has been previously minimized), and will be brought in front of other existing windows.
|
|
796
1176
|
* Defaults to the configuration passed in the `workspaces.json` file or to `false`.
|
|
797
1177
|
* *Available only in **io.Connect Desktop**.*
|
|
1178
|
+
* @since io.Connect Desktop 9.4
|
|
1179
|
+
* @since @interopio/workspaces-api 3.3.2
|
|
798
1180
|
*/
|
|
799
1181
|
activate?: boolean;
|
|
800
1182
|
|
|
801
|
-
/**
|
|
1183
|
+
/**
|
|
1184
|
+
* ID of an existing `Frame` instance. If provided, the Workspace will be opened in that `Frame` instance.
|
|
1185
|
+
*/
|
|
802
1186
|
reuseFrameId?: string;
|
|
803
1187
|
|
|
804
1188
|
/**
|
|
805
|
-
*
|
|
1189
|
+
* Name of the Workspaces App that will be used for creating the new `Frame` instance.
|
|
806
1190
|
* *Available only in **io.Connect Desktop**.*
|
|
807
1191
|
*/
|
|
808
1192
|
applicationName?: string;
|
|
809
1193
|
|
|
810
|
-
/**
|
|
1194
|
+
/**
|
|
1195
|
+
* If `true`, the Workspace will be opened in a new `Frame` instance.
|
|
1196
|
+
* Pass a `NewFrameConfig` object to provide settings for the new `Frame` instance.
|
|
1197
|
+
*/
|
|
811
1198
|
newFrame?: NewFrameConfig | boolean;
|
|
812
1199
|
}
|
|
813
1200
|
|
|
1201
|
+
/**
|
|
1202
|
+
* Options for pinning a Workspace.
|
|
1203
|
+
*/
|
|
814
1204
|
export interface WorkspacePinOptions {
|
|
815
1205
|
/**
|
|
816
|
-
* Icon
|
|
1206
|
+
* Icon for the pinned Workspace.
|
|
817
1207
|
*/
|
|
818
1208
|
icon?: string;
|
|
819
1209
|
}
|
|
@@ -845,141 +1235,212 @@ export namespace IOConnectWorkspaces {
|
|
|
845
1235
|
frame?: FrameTargetingOptions;
|
|
846
1236
|
}
|
|
847
1237
|
|
|
1238
|
+
/**
|
|
1239
|
+
* Describes a Workspace to be restored from a Workspace Layout by the unique ID of the Layout.
|
|
1240
|
+
* *Available only in **io.Connect Desktop**.*
|
|
1241
|
+
* @since io.Connect Desktop 10.5
|
|
1242
|
+
* @since @interopio/workspaces-api 5.0.0
|
|
1243
|
+
*/
|
|
848
1244
|
export interface RestoreWorkspaceByIdDefinition {
|
|
849
1245
|
/**
|
|
850
|
-
|
|
851
|
-
|
|
1246
|
+
* Unique ID of the Workspace Layout to restore.
|
|
1247
|
+
* The Workspace Layout with the specified ID must exist, otherwise the operation will fail.
|
|
1248
|
+
*/
|
|
852
1249
|
id: string;
|
|
853
1250
|
|
|
854
1251
|
/**
|
|
855
|
-
|
|
856
|
-
|
|
1252
|
+
* Options for restoring the Workspace.
|
|
1253
|
+
*/
|
|
857
1254
|
restoreOptions?: RestoreWorkspaceConfig;
|
|
858
1255
|
}
|
|
859
1256
|
|
|
860
|
-
/**
|
|
1257
|
+
/**
|
|
1258
|
+
* Describes a Workspace to be restored from a Workspace Layout.
|
|
1259
|
+
*/
|
|
861
1260
|
export interface RestoreWorkspaceDefinition {
|
|
862
1261
|
/**
|
|
863
|
-
*
|
|
1262
|
+
* Name of the Workspace Layout to restore.
|
|
864
1263
|
*/
|
|
865
1264
|
name: string;
|
|
1265
|
+
|
|
866
1266
|
/**
|
|
867
|
-
*
|
|
1267
|
+
* Options for restoring the Workspace.
|
|
868
1268
|
*/
|
|
869
1269
|
restoreOptions?: RestoreWorkspaceConfig;
|
|
870
1270
|
}
|
|
871
1271
|
|
|
872
|
-
/**
|
|
1272
|
+
/**
|
|
1273
|
+
* Describes a box element to be created in a Workspace.
|
|
1274
|
+
*/
|
|
873
1275
|
export interface BoxDefinition {
|
|
874
|
-
/**
|
|
1276
|
+
/**
|
|
1277
|
+
* Type of the box element.
|
|
1278
|
+
*/
|
|
875
1279
|
type?: "column" | "row" | "group";
|
|
876
1280
|
|
|
877
|
-
/**
|
|
1281
|
+
/**
|
|
1282
|
+
* Array of objects describing the Workspace windows and box elements that the box element will contain.
|
|
1283
|
+
*/
|
|
878
1284
|
children?: Array<WorkspaceWindowDefinition | BoxDefinition>;
|
|
879
1285
|
|
|
880
|
-
/**
|
|
1286
|
+
/**
|
|
1287
|
+
* Settings for the box element.
|
|
1288
|
+
*/
|
|
881
1289
|
config?: GroupDefinitionConfig | RowDefinitionConfig | ColumnDefinitionConfig;
|
|
882
1290
|
}
|
|
883
1291
|
|
|
884
|
-
/**
|
|
1292
|
+
/**
|
|
1293
|
+
* Describes a window to be opened in a Workspace.
|
|
1294
|
+
*/
|
|
885
1295
|
export interface WorkspaceWindowDefinition {
|
|
886
|
-
/**
|
|
1296
|
+
/**
|
|
1297
|
+
* Type of the Workspace element.
|
|
1298
|
+
*/
|
|
887
1299
|
type?: "window";
|
|
888
1300
|
|
|
889
|
-
/**
|
|
1301
|
+
/**
|
|
1302
|
+
* Name of the app to open, as defined within the io.Connect framework.
|
|
1303
|
+
*/
|
|
890
1304
|
appName?: string;
|
|
891
1305
|
|
|
892
|
-
/**
|
|
1306
|
+
/**
|
|
1307
|
+
* ID of an existing standalone window that will be added to the Workspace.
|
|
1308
|
+
*/
|
|
893
1309
|
windowId?: string;
|
|
894
1310
|
|
|
895
|
-
/**
|
|
1311
|
+
/**
|
|
1312
|
+
* Context for the new window. The context will be accessible via the Window Management API.
|
|
1313
|
+
*/
|
|
896
1314
|
context?: any;
|
|
897
1315
|
|
|
898
|
-
/**
|
|
1316
|
+
/**
|
|
1317
|
+
* Settings for the Workspace window.
|
|
1318
|
+
*/
|
|
899
1319
|
config?: WorkspaceWindowDefinitionConfig;
|
|
900
1320
|
}
|
|
901
1321
|
|
|
902
|
-
/**
|
|
1322
|
+
/**
|
|
1323
|
+
* Describes the size constraints of a `Frame` instance, calculated using the constraints of all elements in it.
|
|
1324
|
+
*/
|
|
903
1325
|
export interface FrameConstraints {
|
|
904
|
-
/**
|
|
1326
|
+
/**
|
|
1327
|
+
* Minimum width in pixels of the `Frame` instance.
|
|
1328
|
+
*/
|
|
905
1329
|
minWidth: number;
|
|
906
1330
|
|
|
907
|
-
/**
|
|
1331
|
+
/**
|
|
1332
|
+
* Maximum width in pixels of the `Frame` instance.
|
|
1333
|
+
*/
|
|
908
1334
|
maxWidth: number;
|
|
909
1335
|
|
|
910
|
-
/**
|
|
1336
|
+
/**
|
|
1337
|
+
* Minimum height in pixels of the `Frame` instance.
|
|
1338
|
+
*/
|
|
911
1339
|
minHeight: number;
|
|
912
1340
|
|
|
913
|
-
/**
|
|
1341
|
+
/**
|
|
1342
|
+
* Maximum height in pixels of the `Frame` instance.
|
|
1343
|
+
*/
|
|
914
1344
|
maxHeight: number;
|
|
915
1345
|
}
|
|
916
1346
|
|
|
917
|
-
/**
|
|
1347
|
+
/**
|
|
1348
|
+
* Options for resizing a Workspace element.
|
|
1349
|
+
*/
|
|
918
1350
|
export interface ElementResizeConfig {
|
|
919
|
-
/**
|
|
1351
|
+
/**
|
|
1352
|
+
* Width in pixels for the element.
|
|
1353
|
+
*/
|
|
920
1354
|
width?: number;
|
|
921
1355
|
|
|
922
|
-
/**
|
|
1356
|
+
/**
|
|
1357
|
+
* Height in pixels for the element.
|
|
1358
|
+
*/
|
|
923
1359
|
height?: number;
|
|
924
1360
|
}
|
|
925
1361
|
|
|
926
|
-
/**
|
|
1362
|
+
/**
|
|
1363
|
+
* Describes a Workspace Layout without its underlying structure.
|
|
1364
|
+
*/
|
|
927
1365
|
export interface WorkspaceLayoutSummary {
|
|
1366
|
+
/**
|
|
1367
|
+
* Unique ID of the Workspace Layout.
|
|
1368
|
+
* *Available only in **io.Connect Desktop**.*
|
|
1369
|
+
* @since io.Connect Desktop 10.5
|
|
1370
|
+
* @since @interopio/workspaces-api 5.0.0
|
|
1371
|
+
*/
|
|
928
1372
|
id?: string;
|
|
929
1373
|
|
|
930
|
-
/**
|
|
1374
|
+
/**
|
|
1375
|
+
* Name of the Workspace Layout.
|
|
1376
|
+
*/
|
|
931
1377
|
name: string;
|
|
932
1378
|
|
|
933
1379
|
/**
|
|
934
|
-
*
|
|
1380
|
+
* Name of the Workspaces App with which the Workspace Layout is associated.
|
|
935
1381
|
* *Available only in **io.Connect Desktop**.*
|
|
936
1382
|
*/
|
|
937
1383
|
applicationName?: string;
|
|
938
1384
|
}
|
|
939
1385
|
|
|
1386
|
+
/**
|
|
1387
|
+
* Describes an empty `Frame` instance to be created.
|
|
1388
|
+
*/
|
|
940
1389
|
export interface EmptyFrameDefinition {
|
|
941
1390
|
/**
|
|
942
|
-
*
|
|
1391
|
+
* Name of the Workspaces App that will be used for creating the empty `Frame` instance.
|
|
943
1392
|
* *Available only in **io.Connect Desktop**.*
|
|
944
1393
|
*/
|
|
945
1394
|
applicationName?: string;
|
|
946
1395
|
|
|
947
1396
|
/**
|
|
948
|
-
*
|
|
1397
|
+
* Settings for the empty `Frame` instance.
|
|
949
1398
|
*/
|
|
950
1399
|
frameConfig?: IOConnectWorkspaces.NewFrameConfig;
|
|
951
1400
|
|
|
952
1401
|
/**
|
|
953
|
-
*
|
|
1402
|
+
* Context for the empty `Frame` instance. The context will be passed to the callback for handling the `onInitializationRequested()` event of the `Frame` instance.
|
|
954
1403
|
*/
|
|
955
1404
|
context?: object;
|
|
956
1405
|
|
|
957
1406
|
/**
|
|
958
|
-
*
|
|
1407
|
+
* ID of the Layout component that is being restored.
|
|
959
1408
|
*/
|
|
960
1409
|
layoutComponentId?: string;
|
|
961
1410
|
}
|
|
962
1411
|
|
|
1412
|
+
/**
|
|
1413
|
+
* Settings for initializing an empty `Frame` instance.
|
|
1414
|
+
*/
|
|
963
1415
|
export interface FrameInitializationConfig {
|
|
964
1416
|
/**
|
|
965
|
-
* Array of
|
|
1417
|
+
* Array of objects, each describing a Workspace to be created or restored in the `Frame` instance.
|
|
966
1418
|
*/
|
|
967
1419
|
workspaces: Array<IOConnectWorkspaces.WorkspaceDefinition | RestoreWorkspaceDefinition | RestoreWorkspaceByIdDefinition>;
|
|
968
1420
|
}
|
|
969
1421
|
|
|
1422
|
+
/**
|
|
1423
|
+
* Describes the context for initializing an empty `Frame` instance.
|
|
1424
|
+
*/
|
|
970
1425
|
export interface FrameInitializationContext {
|
|
971
1426
|
/**
|
|
972
|
-
* Context passed when the
|
|
1427
|
+
* Context passed when creating the empty `Frame` instance.
|
|
973
1428
|
*/
|
|
974
1429
|
context?: object;
|
|
975
1430
|
}
|
|
976
1431
|
|
|
977
|
-
/**
|
|
1432
|
+
/**
|
|
1433
|
+
* Describes the basic details of a `Frame` instance.
|
|
1434
|
+
*/
|
|
978
1435
|
export interface FrameSummary {
|
|
979
|
-
/**
|
|
1436
|
+
/**
|
|
1437
|
+
* Unique ID of the `Frame` instance.
|
|
1438
|
+
*/
|
|
980
1439
|
id: string;
|
|
981
1440
|
|
|
982
|
-
/**
|
|
1441
|
+
/**
|
|
1442
|
+
* Flag indicating whether the `Frame` instance has been initialized.
|
|
1443
|
+
*/
|
|
983
1444
|
isInitialized: boolean;
|
|
984
1445
|
}
|
|
985
1446
|
|
|
@@ -1030,19 +1491,20 @@ export namespace IOConnectWorkspaces {
|
|
|
1030
1491
|
* If `true`, the popup window will gain focus when shown and will hide automatically when it loses focus. If `false`, the popup window won't be on focus when shown and won't hide automatically if it gains and loses focus afterwards. If you set this to `false`, you will be responsible for implementing the conditions and the mechanism for hiding/closing the popup window.
|
|
1031
1492
|
* @default true
|
|
1032
1493
|
* @since io.Connect Desktop 10.0
|
|
1494
|
+
* @since @interopio/workspaces-api 4.1.4
|
|
1033
1495
|
*/
|
|
1034
1496
|
focus?: boolean;
|
|
1035
1497
|
}
|
|
1036
1498
|
/**
|
|
1037
|
-
|
|
1038
|
-
|
|
1039
|
-
|
|
1040
|
-
|
|
1041
|
-
|
|
1042
|
-
|
|
1043
|
-
|
|
1044
|
-
|
|
1045
|
-
|
|
1499
|
+
* Type of the dialog to show. Can be either a predefined io.Connect dialog type, or a custom one.
|
|
1500
|
+
*
|
|
1501
|
+
* - `YesNo` - dialog with "Yes" and "No" buttons;
|
|
1502
|
+
* - `YesNoCancel` - dialog with "Yes", "No", and "Cancel" buttons;
|
|
1503
|
+
* - `OkCancel` - dialog with "OK" and "Cancel" buttons;
|
|
1504
|
+
* - `Ok` - dialog with an "OK" button;
|
|
1505
|
+
* - `Custom` - custom dialog;
|
|
1506
|
+
* - `SingleInputDialog` - dialog with a text input field;
|
|
1507
|
+
*/
|
|
1046
1508
|
export const enum DialogType {
|
|
1047
1509
|
YesNo = "YesNo",
|
|
1048
1510
|
YesNoCancel = "YesNoCancel",
|
|
@@ -1055,7 +1517,7 @@ export namespace IOConnectWorkspaces {
|
|
|
1055
1517
|
/**
|
|
1056
1518
|
* Mode for the dialog.
|
|
1057
1519
|
*
|
|
1058
|
-
* - `WindowContainer` - only the container (e.g.,
|
|
1520
|
+
* - `WindowContainer` - only the container (e.g., a `Frame` instance) of the window that is showing the dialog will be blocked for user interaction.
|
|
1059
1521
|
* - `Global` - all visible containers (including frameless io.Connect Windows) will be blocked. All windows within a blocked container will be blocked too.
|
|
1060
1522
|
*/
|
|
1061
1523
|
export const enum DialogMode {
|
|
@@ -1074,7 +1536,7 @@ export namespace IOConnectWorkspaces {
|
|
|
1074
1536
|
}
|
|
1075
1537
|
|
|
1076
1538
|
/**
|
|
1077
|
-
* Options for showing a dialog from
|
|
1539
|
+
* Options for showing a dialog from a `Frame` instance.
|
|
1078
1540
|
*/
|
|
1079
1541
|
export interface FrameDialogOptions {
|
|
1080
1542
|
|
|
@@ -1156,13 +1618,13 @@ export namespace IOConnectWorkspaces {
|
|
|
1156
1618
|
|
|
1157
1619
|
/**
|
|
1158
1620
|
* If `true`, the negative response button will be shown in the dialog.
|
|
1159
|
-
* The default value is for custom dialogs, predefined dialog types have different defaults.
|
|
1621
|
+
* The default value is for custom dialogs, as predefined dialog types have different defaults.
|
|
1160
1622
|
* @default false
|
|
1161
1623
|
*/
|
|
1162
1624
|
showNegativeButton?: boolean;
|
|
1163
1625
|
|
|
1164
1626
|
/**
|
|
1165
|
-
*
|
|
1627
|
+
* Default button for the dialog.
|
|
1166
1628
|
* The action tied to the default button will be executed when the user presses `ENTER` when no button is active
|
|
1167
1629
|
* (i.e., when the buttons aren't on focus and none is selected).
|
|
1168
1630
|
*/
|
|
@@ -1185,13 +1647,13 @@ export namespace IOConnectWorkspaces {
|
|
|
1185
1647
|
showTimer?: boolean;
|
|
1186
1648
|
|
|
1187
1649
|
/**
|
|
1188
|
-
*
|
|
1650
|
+
* Maximum number of characters that can be entered in the input field of a `SingleInputDialog`.
|
|
1189
1651
|
*/
|
|
1190
1652
|
inputMaxLength?: number;
|
|
1191
1653
|
|
|
1192
1654
|
/**
|
|
1193
1655
|
* String pattern that serves as a regular expression for validating the input from the user in a `SingleInputDialog`.
|
|
1194
|
-
* If such pattern is specified and the input doesn't match it, an error will be displayed and the input field
|
|
1656
|
+
* If such a pattern is specified and the input doesn't match it, an error will be displayed and the input field
|
|
1195
1657
|
* will indicate visually that the user input is invalid.
|
|
1196
1658
|
*/
|
|
1197
1659
|
inputPattern?: string;
|
|
@@ -1207,151 +1669,158 @@ export namespace IOConnectWorkspaces {
|
|
|
1207
1669
|
inputPlaceholder?: string;
|
|
1208
1670
|
|
|
1209
1671
|
/**
|
|
1210
|
-
|
|
1211
|
-
|
|
1212
|
-
|
|
1213
|
-
|
|
1214
|
-
|
|
1215
|
-
|
|
1216
|
-
|
|
1672
|
+
* If `true`, will blur the area around the dialog displayed by the `Frame` instance.
|
|
1673
|
+
* This property is valid only in the advanced platform mode and only if the `"mode"` property of the `"transparencyControl"` object
|
|
1674
|
+
* under the `"windowManagement"` top-level key in the system configuration of **io.Connect Desktop** is set to `"Transparent"`.
|
|
1675
|
+
* *Available only in **io.Connect Desktop**.*
|
|
1676
|
+
* @default false
|
|
1677
|
+
* @since io.Connect Desktop 10.0.3
|
|
1678
|
+
* @since @interopio/workspaces-api 4.2.1
|
|
1679
|
+
*/
|
|
1217
1680
|
blur?: boolean;
|
|
1218
1681
|
}
|
|
1219
1682
|
|
|
1220
1683
|
/**
|
|
1221
|
-
* Describes a Frame (a Workspaces App instance).
|
|
1684
|
+
* Describes a `Frame` instance (a Workspaces App instance).
|
|
1222
1685
|
*/
|
|
1223
1686
|
export interface Frame extends FrameSummary {
|
|
1224
1687
|
/**
|
|
1225
|
-
* Registers a keyboard shortcut for the current Frame.
|
|
1226
|
-
* @param shortcut Keyboard combination to register as a shortcut for the Frame (e.g., "ctrl+w").
|
|
1227
|
-
* @param callback Callback that will be invoked when the Frame for which the shortcut is registered
|
|
1228
|
-
* is on focus and the user presses the registered keyboard combination.
|
|
1688
|
+
* Registers a keyboard shortcut for the current `Frame` instance.
|
|
1229
1689
|
* *Available only in **io.Connect Desktop**.*
|
|
1690
|
+
* @param shortcut Keyboard combination to register as a shortcut for the `Frame` instance (e.g., `"ctrl+w"`).
|
|
1691
|
+
* @param callback Callback that will be invoked when the `Frame` instance for which the shortcut is registered
|
|
1692
|
+
* is on focus and the user presses the registered keyboard combination.
|
|
1230
1693
|
*/
|
|
1231
1694
|
registerShortcut(shortcut: string, callback: () => void): Promise<Unsubscribe>;
|
|
1232
1695
|
|
|
1233
1696
|
/**
|
|
1234
|
-
* Retrieves the current bounds of the Frame.
|
|
1697
|
+
* Retrieves the current bounds of the `Frame` instance.
|
|
1235
1698
|
*/
|
|
1236
1699
|
getBounds(): Promise<FrameBounds>;
|
|
1237
1700
|
|
|
1238
1701
|
/**
|
|
1239
|
-
* Resizes the Frame.
|
|
1240
|
-
* @param config Options for resizing the Frame.
|
|
1702
|
+
* Resizes the `Frame` instance.
|
|
1703
|
+
* @param config Options for resizing the `Frame` instance.
|
|
1241
1704
|
*/
|
|
1242
1705
|
resize(config: ResizeConfig): Promise<void>;
|
|
1243
1706
|
|
|
1244
1707
|
/**
|
|
1245
|
-
* Moves the Frame.
|
|
1246
|
-
* @param config Options for moving the Frame.
|
|
1708
|
+
* Moves the `Frame` instance.
|
|
1709
|
+
* @param config Options for moving the `Frame` instance.
|
|
1247
1710
|
*/
|
|
1248
1711
|
move(config: MoveConfig): Promise<void>;
|
|
1249
1712
|
|
|
1250
1713
|
/**
|
|
1251
|
-
* Focuses the Frame.
|
|
1714
|
+
* Focuses the `Frame` instance.
|
|
1252
1715
|
*/
|
|
1253
1716
|
focus(): Promise<void>;
|
|
1254
1717
|
|
|
1255
1718
|
/**
|
|
1256
|
-
*
|
|
1719
|
+
* Retrieves the current state of the `Frame` instance.
|
|
1257
1720
|
* *Available only in **io.Connect Desktop**.*
|
|
1258
1721
|
*/
|
|
1259
1722
|
state(): Promise<FrameState>;
|
|
1260
1723
|
|
|
1261
1724
|
/**
|
|
1262
|
-
* Minimizes the Frame.
|
|
1725
|
+
* Minimizes the `Frame` instance.
|
|
1263
1726
|
* *Available only in **io.Connect Desktop**.*
|
|
1264
1727
|
*/
|
|
1265
1728
|
minimize(): Promise<void>;
|
|
1266
1729
|
|
|
1267
1730
|
/**
|
|
1268
|
-
* Maximizes the Frame.
|
|
1731
|
+
* Maximizes the `Frame` instance.
|
|
1269
1732
|
* *Available only in **io.Connect Desktop**.*
|
|
1270
1733
|
*/
|
|
1271
1734
|
maximize(): Promise<void>;
|
|
1272
1735
|
|
|
1273
1736
|
/**
|
|
1274
|
-
* Restores the Frame.
|
|
1737
|
+
* Restores the `Frame` instance.
|
|
1275
1738
|
* *Available only in **io.Connect Desktop**.*
|
|
1276
1739
|
*/
|
|
1277
1740
|
restore(): Promise<void>;
|
|
1278
1741
|
|
|
1279
1742
|
/**
|
|
1280
|
-
* Closes the Frame.
|
|
1743
|
+
* Closes the `Frame` instance.
|
|
1281
1744
|
* The result from using this method in **io.Connect Browser** projects may vary depending on whether the browser will allow the closing operation.
|
|
1282
|
-
* @param options Options for closing the Frame.
|
|
1745
|
+
* @param options Options for closing the `Frame` instance.
|
|
1283
1746
|
*/
|
|
1284
1747
|
close(options?: FrameCloseOptions): Promise<void>;
|
|
1285
1748
|
|
|
1286
1749
|
/**
|
|
1287
|
-
* Initializes an empty `Frame` with the Workspaces provided via the `FrameInitializationConfig` object.
|
|
1288
|
-
* The order of the Workspaces loaded in the `Frame` depends solely on the order in the provided array (the `positionIndex` property in the Workspace configuration has no effect).
|
|
1289
|
-
* @param config Configuration for initializing an empty `Frame
|
|
1750
|
+
* Initializes an empty `Frame` instance with the Workspaces provided via the `FrameInitializationConfig` object.
|
|
1751
|
+
* The order of the Workspaces loaded in the `Frame` instance depends solely on the order in the provided array (the `positionIndex` property in the Workspace configuration has no effect).
|
|
1752
|
+
* @param config Configuration for initializing an empty `Frame` instance.
|
|
1290
1753
|
*/
|
|
1291
1754
|
init(config: FrameInitializationConfig): Promise<void>;
|
|
1292
1755
|
|
|
1293
1756
|
/**
|
|
1294
|
-
|
|
1295
|
-
|
|
1296
|
-
|
|
1297
|
-
|
|
1757
|
+
* Retrieves the taskbar icon of the `Frame` instance.
|
|
1758
|
+
* *Available only in **io.Connect Desktop**.*
|
|
1759
|
+
* @since io.Connect Desktop 9.9
|
|
1760
|
+
* @since @interopio/workspaces-api 3.5.7
|
|
1761
|
+
*/
|
|
1298
1762
|
getIcon(): Promise<Icon>;
|
|
1299
1763
|
|
|
1300
1764
|
/**
|
|
1301
1765
|
* Sets the taskbar icon of the `Frame` instance.
|
|
1302
1766
|
* *Available only in **io.Connect Desktop**.*
|
|
1303
|
-
* @param icon
|
|
1767
|
+
* @param icon Icon to be displayed in the taskbar for the `Frame` instance. The icon must be encoded as a Base64 string.
|
|
1304
1768
|
* @since io.Connect Desktop 9.9
|
|
1769
|
+
* @since @interopio/workspaces-api 3.5.7
|
|
1305
1770
|
*/
|
|
1306
1771
|
setIcon(icon: Icon): Promise<void>;
|
|
1307
1772
|
|
|
1308
1773
|
/**
|
|
1309
|
-
*
|
|
1774
|
+
* Retrieves a snapshot of the current state of the `Frame` instance.
|
|
1310
1775
|
*/
|
|
1311
1776
|
snapshot(): Promise<FrameSnapshot>;
|
|
1312
1777
|
|
|
1313
1778
|
/**
|
|
1314
|
-
*
|
|
1779
|
+
* Retrieves all Workspaces in the `Frame` instance.
|
|
1315
1780
|
*/
|
|
1316
1781
|
workspaces(): Promise<Workspace[]>;
|
|
1317
1782
|
|
|
1318
1783
|
/**
|
|
1319
|
-
|
|
1320
|
-
|
|
1784
|
+
* Retrieves the current size constraints of the `Frame` instance. The constraints are calculated using the individual constraints of all elements within the Workspaces in the `Frame` instance.
|
|
1785
|
+
*/
|
|
1321
1786
|
getConstraints(): Promise<FrameConstraints>;
|
|
1322
1787
|
|
|
1323
1788
|
/**
|
|
1324
|
-
* Retrieves the current visibility state of the
|
|
1789
|
+
* Retrieves the current visibility state of the `Frame` instance.
|
|
1325
1790
|
* *Available only in **io.Connect Desktop**.*
|
|
1326
1791
|
* @since io.Connect Desktop 9.10
|
|
1792
|
+
* @since @interopio/workspaces-api 4.1.1
|
|
1327
1793
|
*/
|
|
1328
1794
|
isVisible(): Promise<boolean>;
|
|
1329
1795
|
|
|
1330
1796
|
/**
|
|
1331
|
-
* Shows the
|
|
1797
|
+
* Shows the `Frame` instance if it has been previously hidden.
|
|
1332
1798
|
* *Available only in **io.Connect Desktop**.*
|
|
1799
|
+
* @param config Settings for showing the `Frame` instance.
|
|
1333
1800
|
* @since io.Connect Desktop 9.10
|
|
1801
|
+
* @since @interopio/workspaces-api 4.1.1
|
|
1334
1802
|
*/
|
|
1335
1803
|
show(config?: FrameShowConfig): Promise<void>;
|
|
1336
1804
|
|
|
1337
1805
|
/**
|
|
1338
|
-
* Hides the
|
|
1806
|
+
* Hides the `Frame` instance if it's currently visible.
|
|
1339
1807
|
* *Available only in **io.Connect Desktop**.*
|
|
1340
1808
|
* @since io.Connect Desktop 9.10
|
|
1809
|
+
* @since @interopio/workspaces-api 4.1.1
|
|
1341
1810
|
*/
|
|
1342
1811
|
hide(): Promise<void>;
|
|
1343
1812
|
|
|
1344
1813
|
/**
|
|
1345
|
-
*
|
|
1346
|
-
* @param name
|
|
1347
|
-
* @param options
|
|
1814
|
+
* Restores a Workspace in the `Frame` instance from a previously saved Workspace Layout.
|
|
1815
|
+
* @param name Name of the Workspace Layout to restore.
|
|
1816
|
+
* @param options Options for restoring the Workspace.
|
|
1348
1817
|
*/
|
|
1349
1818
|
restoreWorkspace(name: string, options?: RestoreWorkspaceConfig): Promise<Workspace>;
|
|
1350
1819
|
|
|
1351
1820
|
/**
|
|
1352
|
-
*
|
|
1353
|
-
* @param definition
|
|
1354
|
-
* @param
|
|
1821
|
+
* Creates a new Workspace in the `Frame` instance based on the provided definition.
|
|
1822
|
+
* @param definition Definition for the Workspace.
|
|
1823
|
+
* @param config Settings for creating the Workspace.
|
|
1355
1824
|
*/
|
|
1356
1825
|
createWorkspace(definition: WorkspaceDefinition, config?: WorkspaceCreateConfig): Promise<Workspace>;
|
|
1357
1826
|
|
|
@@ -1360,13 +1829,16 @@ export namespace IOConnectWorkspaces {
|
|
|
1360
1829
|
* *Available only in **io.Connect Desktop**.*
|
|
1361
1830
|
* @param config Options for creating a popup window.
|
|
1362
1831
|
* @since io.Connect Desktop 10.0
|
|
1832
|
+
* @since @interopio/workspaces-api 4.1.4
|
|
1363
1833
|
*/
|
|
1364
1834
|
showPopup(config: PopupOptions): Promise<any>;
|
|
1365
1835
|
|
|
1366
1836
|
/**
|
|
1367
1837
|
* Shows a dialog with a title, message, and response buttons to the user.
|
|
1368
1838
|
* *Available only in **io.Connect Desktop**.*
|
|
1839
|
+
* @param options Options for the dialog.
|
|
1369
1840
|
* @since io.Connect Desktop 10.0
|
|
1841
|
+
* @since @interopio/workspaces-api 4.1.2
|
|
1370
1842
|
*/
|
|
1371
1843
|
showDialog<T>(options: FrameDialogOptions): Promise<T>;
|
|
1372
1844
|
|
|
@@ -1380,192 +1852,257 @@ export namespace IOConnectWorkspaces {
|
|
|
1380
1852
|
setOnTop(options: FrameSetOnTopOptions): Promise<void>;
|
|
1381
1853
|
|
|
1382
1854
|
/**
|
|
1383
|
-
* Notifies when the Frame is about to be closed.
|
|
1384
|
-
*
|
|
1385
|
-
* @param callback Callback function for handling the event. Receives as an argument an object with options for closing the Frame.
|
|
1855
|
+
* Notifies when the `Frame` instance is about to be closed. Returns an unsubscribe function.
|
|
1856
|
+
* In **io.Connect Browser**, requires `@interopio/workspaces-api` 5.1 or later.
|
|
1857
|
+
* @param callback Callback function for handling the event. Receives as an argument an object with options for closing the `Frame` instance.
|
|
1386
1858
|
* @since io.Connect Desktop 9.9
|
|
1859
|
+
* @since io.Connect Browser 5.0
|
|
1860
|
+
* @since @interopio/workspaces-api 3.5.7
|
|
1387
1861
|
*/
|
|
1388
1862
|
onClosing(callback: (options: FrameClosingData) => void | Promise<void>): Promise<Unsubscribe>;
|
|
1389
1863
|
|
|
1390
1864
|
/**
|
|
1391
|
-
* Notifies when
|
|
1392
|
-
* @param callback Callback function
|
|
1865
|
+
* Notifies when the `Frame` instance has been closed. Returns an unsubscribe function.
|
|
1866
|
+
* @param callback Callback function for handling the event. Receives as an argument an object describing the closed `Frame` instance.
|
|
1393
1867
|
*/
|
|
1394
1868
|
onClosed(callback: (closed: FrameClosedData) => void): Promise<Unsubscribe>;
|
|
1395
1869
|
|
|
1396
1870
|
/**
|
|
1397
|
-
* Notifies when
|
|
1398
|
-
*
|
|
1399
|
-
* @param callback Callback function
|
|
1871
|
+
* Notifies when the `Frame` instance has been maximized. Returns an unsubscribe function.
|
|
1872
|
+
* *Available only in **io.Connect Desktop**.*
|
|
1873
|
+
* @param callback Callback function for handling the event.
|
|
1400
1874
|
*/
|
|
1401
1875
|
onMaximized(callback: () => void): Promise<Unsubscribe>;
|
|
1402
1876
|
|
|
1403
1877
|
/**
|
|
1404
|
-
* Notifies when
|
|
1405
|
-
*
|
|
1406
|
-
* @param callback Callback function
|
|
1878
|
+
* Notifies when the `Frame` instance has been minimized. Returns an unsubscribe function.
|
|
1879
|
+
* *Available only in **io.Connect Desktop**.*
|
|
1880
|
+
* @param callback Callback function for handling the event.
|
|
1407
1881
|
*/
|
|
1408
1882
|
onMinimized(callback: () => void): Promise<Unsubscribe>;
|
|
1409
1883
|
|
|
1410
1884
|
/**
|
|
1411
|
-
* Notifies when
|
|
1412
|
-
*
|
|
1413
|
-
* @param callback Callback function
|
|
1885
|
+
* Notifies when the `Frame` instance has been restored to its normal state. Returns an unsubscribe function.
|
|
1886
|
+
* *Available only in **io.Connect Desktop**.*
|
|
1887
|
+
* @param callback Callback function for handling the event.
|
|
1414
1888
|
*/
|
|
1415
1889
|
onNormal(callback: () => void): Promise<Unsubscribe>;
|
|
1416
1890
|
|
|
1417
1891
|
/**
|
|
1418
|
-
*
|
|
1892
|
+
* Notifies when the `Frame` instance or a window in it has gained or lost focus. Returns an unsubscribe function.
|
|
1419
1893
|
* *Available only in **io.Connect Desktop**.*
|
|
1420
|
-
* @param callback Callback function
|
|
1894
|
+
* @param callback Callback function for handling the event. Receives as an argument an object indicating whether the `Frame` instance is on focus.
|
|
1421
1895
|
*/
|
|
1422
1896
|
onFocusChanged(callback: (data: FrameFocusChangedData) => void): Promise<IOConnectWorkspaces.Unsubscribe>;
|
|
1423
1897
|
|
|
1424
1898
|
/**
|
|
1425
|
-
* Notifies when
|
|
1426
|
-
* @param callback Callback function
|
|
1899
|
+
* Notifies when the `Frame` instance has been created without being initialized (i.e., as an empty `Frame` instance). Returns an unsubscribe function.
|
|
1900
|
+
* @param callback Callback function for handling the event. Receives as an argument the context for the initialization request.
|
|
1427
1901
|
*/
|
|
1428
1902
|
onInitializationRequested(callback: (context?: IOConnectWorkspaces.FrameInitializationContext) => void): Promise<Unsubscribe>;
|
|
1429
1903
|
|
|
1430
1904
|
/**
|
|
1431
|
-
* Notifies when a new
|
|
1432
|
-
* @param callback Callback function
|
|
1905
|
+
* Notifies when a new Workspace has been opened in the `Frame` instance. Returns an unsubscribe function.
|
|
1906
|
+
* @param callback Callback function for handling the event. Receives as an argument the `Workspace` object describing the opened Workspace.
|
|
1433
1907
|
*/
|
|
1434
1908
|
onWorkspaceOpened(callback: (workspace: Workspace) => void): Promise<Unsubscribe>;
|
|
1435
1909
|
|
|
1436
1910
|
/**
|
|
1437
|
-
* Notifies when a
|
|
1438
|
-
* @param callback Callback function
|
|
1911
|
+
* Notifies when a Workspace has been selected in the `Frame` instance. Returns an unsubscribe function.
|
|
1912
|
+
* @param callback Callback function for handling the event. Receives as an argument the `Workspace` object describing the selected Workspace.
|
|
1439
1913
|
*/
|
|
1440
1914
|
onWorkspaceSelected(callback: (workspace: Workspace) => void): Promise<Unsubscribe>;
|
|
1441
1915
|
|
|
1442
1916
|
/**
|
|
1443
|
-
* Notifies when a
|
|
1444
|
-
* @param callback Callback function
|
|
1917
|
+
* Notifies when a Workspace in the `Frame` instance has been closed. Returns an unsubscribe function.
|
|
1918
|
+
* @param callback Callback function for handling the event. Receives as an argument an object with the IDs of the closed Workspace and its `Frame` instance.
|
|
1445
1919
|
*/
|
|
1446
1920
|
onWorkspaceClosed(callback: (closed: { frameId: string; workspaceId: string }) => void): Promise<Unsubscribe>;
|
|
1447
1921
|
|
|
1448
1922
|
/**
|
|
1449
|
-
* Notifies when a new window
|
|
1450
|
-
* An added window
|
|
1451
|
-
* @param callback Callback function
|
|
1923
|
+
* Notifies when a new window has been added to a Workspace in the `Frame` instance. Returns an unsubscribe function.
|
|
1924
|
+
* An added window has a place in the Workspace (it's a valid Workspace element), but this doesn't guarantee that the contents of the window have been loaded.
|
|
1925
|
+
* @param callback Callback function for handling the event. Receives as an argument the `WorkspaceWindow` object describing the added window.
|
|
1452
1926
|
*/
|
|
1453
1927
|
onWindowAdded(callback: (window: WorkspaceWindow) => void): Promise<Unsubscribe>;
|
|
1454
1928
|
|
|
1455
1929
|
/**
|
|
1456
|
-
* Notifies when a window
|
|
1457
|
-
* @param callback Callback function
|
|
1930
|
+
* Notifies when a window has been removed from a Workspace in the `Frame` instance. Returns an unsubscribe function.
|
|
1931
|
+
* @param callback Callback function for handling the event. Receives as an argument an object with the IDs of the removed window and of its Workspace and `Frame` instance.
|
|
1458
1932
|
*/
|
|
1459
1933
|
onWindowRemoved(callback: (removed: { windowId?: string; workspaceId: string; frameId: string }) => void): Promise<Unsubscribe>;
|
|
1460
1934
|
|
|
1461
1935
|
/**
|
|
1462
|
-
* Notifies when a window
|
|
1463
|
-
* A loaded window is a window
|
|
1464
|
-
* @param callback Callback function
|
|
1936
|
+
* Notifies when the contents of a window in a Workspace in the `Frame` instance have been loaded. Returns an unsubscribe function.
|
|
1937
|
+
* A loaded window is a window that has been added to a Workspace, whose contents have been loaded, and which is present in the windows collection.
|
|
1938
|
+
* @param callback Callback function for handling the event. Receives as an argument the `WorkspaceWindow` object describing the loaded window.
|
|
1465
1939
|
*/
|
|
1466
1940
|
onWindowLoaded(callback: (window: WorkspaceWindow) => void): Promise<Unsubscribe>;
|
|
1467
1941
|
}
|
|
1468
1942
|
|
|
1469
|
-
/**
|
|
1943
|
+
/**
|
|
1944
|
+
* Describes the basic details of a Workspace.
|
|
1945
|
+
*/
|
|
1470
1946
|
export interface WorkspaceSummary {
|
|
1471
|
-
/**
|
|
1947
|
+
/**
|
|
1948
|
+
* Unique ID of the Workspace.
|
|
1949
|
+
*/
|
|
1472
1950
|
id: string;
|
|
1473
1951
|
|
|
1474
|
-
/**
|
|
1952
|
+
/**
|
|
1953
|
+
* ID of the `Frame` instance containing the Workspace.
|
|
1954
|
+
*/
|
|
1475
1955
|
frameId: string;
|
|
1476
1956
|
|
|
1477
|
-
/**
|
|
1957
|
+
/**
|
|
1958
|
+
* Position of the Workspace relative to the other Workspaces in the `Frame` instance.
|
|
1959
|
+
*/
|
|
1478
1960
|
positionIndex: number;
|
|
1479
1961
|
|
|
1480
|
-
/**
|
|
1962
|
+
/**
|
|
1963
|
+
* Title of the Workspace.
|
|
1964
|
+
*/
|
|
1481
1965
|
title: string;
|
|
1482
1966
|
|
|
1483
|
-
/**
|
|
1967
|
+
/**
|
|
1968
|
+
* Name of the Workspace Layout from which the Workspace originates, if any.
|
|
1969
|
+
*/
|
|
1484
1970
|
layoutName: string | undefined;
|
|
1485
1971
|
|
|
1486
|
-
/**
|
|
1972
|
+
/**
|
|
1973
|
+
* Unique ID of the Workspace Layout from which the Workspace originates.
|
|
1974
|
+
* *Available only in **io.Connect Desktop**.*
|
|
1975
|
+
* @since io.Connect Desktop 10.5
|
|
1976
|
+
* @since @interopio/workspaces-api 5.0.0
|
|
1977
|
+
*/
|
|
1487
1978
|
layoutId?: string;
|
|
1488
1979
|
|
|
1489
|
-
/**
|
|
1980
|
+
/**
|
|
1981
|
+
* Flag indicating whether the Workspace is hibernated.
|
|
1982
|
+
*/
|
|
1490
1983
|
isHibernated?: boolean;
|
|
1491
1984
|
|
|
1492
|
-
/**
|
|
1985
|
+
/**
|
|
1986
|
+
* Flag indicating whether the Workspace is selected in its `Frame` instance.
|
|
1987
|
+
*/
|
|
1493
1988
|
isSelected?: boolean;
|
|
1494
1989
|
|
|
1495
|
-
/**
|
|
1990
|
+
/**
|
|
1991
|
+
* Flag indicating whether the user can resize the Workspace elements by dragging the splitters.
|
|
1992
|
+
*/
|
|
1496
1993
|
allowSplitters?: boolean;
|
|
1497
1994
|
|
|
1498
|
-
/**
|
|
1995
|
+
/**
|
|
1996
|
+
* Flag indicating whether the user can add windows by dropping them in the Workspace.
|
|
1997
|
+
*/
|
|
1499
1998
|
allowDrop?: boolean;
|
|
1500
1999
|
|
|
1501
|
-
/**
|
|
2000
|
+
/**
|
|
2001
|
+
* Flag indicating whether the user can add windows by dropping them in the leftmost area of the Workspace.
|
|
2002
|
+
*/
|
|
1502
2003
|
allowDropLeft?: boolean;
|
|
1503
2004
|
|
|
1504
|
-
/**
|
|
2005
|
+
/**
|
|
2006
|
+
* Flag indicating whether the user can add windows by dropping them in the topmost area of the Workspace.
|
|
2007
|
+
*/
|
|
1505
2008
|
allowDropTop?: boolean;
|
|
1506
2009
|
|
|
1507
|
-
/**
|
|
2010
|
+
/**
|
|
2011
|
+
* Flag indicating whether the user can add windows by dropping them in the rightmost area of the Workspace.
|
|
2012
|
+
*/
|
|
1508
2013
|
allowDropRight?: boolean;
|
|
1509
2014
|
|
|
1510
|
-
/**
|
|
2015
|
+
/**
|
|
2016
|
+
* Flag indicating whether the user can add windows by dropping them in the bottommost area of the Workspace.
|
|
2017
|
+
*/
|
|
1511
2018
|
allowDropBottom?: boolean;
|
|
1512
2019
|
|
|
1513
|
-
/**
|
|
2020
|
+
/**
|
|
2021
|
+
* Flag indicating whether the user can extract windows from the Workspace.
|
|
2022
|
+
*/
|
|
1514
2023
|
allowExtract?: boolean;
|
|
1515
2024
|
|
|
1516
|
-
/**
|
|
2025
|
+
/**
|
|
2026
|
+
* Flag indicating whether the user can reorder windows in the Workspace.
|
|
2027
|
+
*/
|
|
1517
2028
|
allowWindowReorder?: boolean;
|
|
1518
2029
|
|
|
1519
|
-
/**
|
|
2030
|
+
/**
|
|
2031
|
+
* Flag indicating whether the "Close" button in the Workspace tab is visible.
|
|
2032
|
+
*/
|
|
1520
2033
|
showCloseButton?: boolean;
|
|
1521
2034
|
|
|
1522
|
-
/**
|
|
2035
|
+
/**
|
|
2036
|
+
* Flag indicating whether the "Rename", "Save", and "Save As" options in the Workspace tab menu are visible.
|
|
2037
|
+
*/
|
|
1523
2038
|
showSaveButton?: boolean;
|
|
1524
2039
|
|
|
1525
2040
|
/**
|
|
1526
|
-
*
|
|
2041
|
+
* Flag indicating whether the user can extract the Workspace tab from the Workspaces App.
|
|
1527
2042
|
* *Available only in **io.Connect Desktop**.*
|
|
1528
2043
|
*/
|
|
1529
2044
|
allowWorkspaceTabExtract?: boolean;
|
|
1530
2045
|
|
|
1531
|
-
/**
|
|
2046
|
+
/**
|
|
2047
|
+
* Flag indicating whether the user can reorder the Workspace tab in the Workspaces App.
|
|
2048
|
+
*/
|
|
1532
2049
|
allowWorkspaceTabReorder?: boolean;
|
|
1533
2050
|
|
|
1534
|
-
/**
|
|
2051
|
+
/**
|
|
2052
|
+
* Minimum width in pixels of the Workspace, calculated using the constraints of all elements in it.
|
|
2053
|
+
*/
|
|
1535
2054
|
minWidth?: number;
|
|
1536
2055
|
|
|
1537
|
-
/**
|
|
2056
|
+
/**
|
|
2057
|
+
* Minimum height in pixels of the Workspace, calculated using the constraints of all elements in it.
|
|
2058
|
+
*/
|
|
1538
2059
|
minHeight?: number;
|
|
1539
2060
|
|
|
1540
|
-
/**
|
|
2061
|
+
/**
|
|
2062
|
+
* Maximum width in pixels of the Workspace, calculated using the constraints of all elements in it.
|
|
2063
|
+
*/
|
|
1541
2064
|
maxWidth?: number;
|
|
1542
2065
|
|
|
1543
|
-
/**
|
|
2066
|
+
/**
|
|
2067
|
+
* Maximum height in pixels of the Workspace, calculated using the constraints of all elements in it.
|
|
2068
|
+
*/
|
|
1544
2069
|
maxHeight?: number;
|
|
1545
2070
|
|
|
1546
|
-
/**
|
|
2071
|
+
/**
|
|
2072
|
+
* Width in pixels of the Workspace.
|
|
2073
|
+
*/
|
|
1547
2074
|
width?: number;
|
|
1548
2075
|
|
|
1549
|
-
/**
|
|
2076
|
+
/**
|
|
2077
|
+
* Height in pixels of the Workspace.
|
|
2078
|
+
*/
|
|
1550
2079
|
height?: number;
|
|
1551
2080
|
|
|
1552
|
-
/**
|
|
2081
|
+
/**
|
|
2082
|
+
* Flag indicating whether the "Close" buttons in the window tabs are visible.
|
|
2083
|
+
*/
|
|
1553
2084
|
showWindowCloseButtons?: boolean;
|
|
1554
2085
|
|
|
1555
|
-
/**
|
|
2086
|
+
/**
|
|
2087
|
+
* Flag indicating whether the "Eject" buttons in the headers of the window groups are visible.
|
|
2088
|
+
*/
|
|
1556
2089
|
showEjectButtons?: boolean;
|
|
1557
2090
|
|
|
1558
|
-
/**
|
|
2091
|
+
/**
|
|
2092
|
+
* Flag indicating whether the "Add Window" buttons (the "+" buttons) in the headers of the window groups are visible.
|
|
2093
|
+
*/
|
|
1559
2094
|
showAddWindowButtons?: boolean;
|
|
1560
2095
|
|
|
1561
2096
|
/**
|
|
1562
|
-
*
|
|
2097
|
+
* Loading strategy of the Workspace.
|
|
1563
2098
|
* *Available only in **io.Connect Desktop**.*
|
|
2099
|
+
* @since io.Connect Desktop 9.8
|
|
2100
|
+
* @since @interopio/workspaces-api 3.5.6
|
|
1564
2101
|
*/
|
|
1565
2102
|
loadingStrategy?: LoadingStrategy;
|
|
1566
2103
|
|
|
1567
2104
|
/**
|
|
1568
|
-
*
|
|
2105
|
+
* Flag indicating whether the Workspace can be hibernated via the platform configuration.
|
|
1569
2106
|
* This setting doesn't apply to programmatic hibernation via the `hibernate()` method of a `Workspace` instance.
|
|
1570
2107
|
*/
|
|
1571
2108
|
allowSystemHibernation?: boolean;
|
|
@@ -1579,192 +2116,205 @@ export namespace IOConnectWorkspaces {
|
|
|
1579
2116
|
appRestrictions?: AppRestrictions;
|
|
1580
2117
|
}
|
|
1581
2118
|
|
|
2119
|
+
/**
|
|
2120
|
+
* Options for saving a Workspace Layout via the `saveLayout()` method of a `Workspace` instance.
|
|
2121
|
+
*/
|
|
1582
2122
|
export type SaveLayoutConfig = Omit<Omit<IOConnectWorkspaces.WorkspaceLayoutSaveConfig, "name">, "workspaceId">;
|
|
1583
2123
|
|
|
1584
|
-
/**
|
|
2124
|
+
/**
|
|
2125
|
+
* Describes a Workspace.
|
|
2126
|
+
*/
|
|
1585
2127
|
export interface Workspace extends WorkspaceSummary {
|
|
1586
2128
|
|
|
1587
|
-
/**
|
|
2129
|
+
/**
|
|
2130
|
+
* Array of objects, each describing an immediate child element of the Workspace.
|
|
2131
|
+
*/
|
|
1588
2132
|
children: WorkspaceElement[];
|
|
1589
2133
|
|
|
1590
|
-
/**
|
|
2134
|
+
/**
|
|
2135
|
+
* `Frame` instance containing the Workspace.
|
|
2136
|
+
*/
|
|
1591
2137
|
frame: Frame;
|
|
1592
2138
|
|
|
1593
2139
|
/**
|
|
1594
|
-
*
|
|
2140
|
+
* Focuses the Workspace.
|
|
1595
2141
|
*/
|
|
1596
2142
|
focus(): Promise<void>;
|
|
1597
2143
|
|
|
1598
2144
|
/**
|
|
1599
|
-
* Closes
|
|
2145
|
+
* Closes the Workspace and all its child elements.
|
|
1600
2146
|
*/
|
|
1601
2147
|
close(): Promise<void>;
|
|
1602
2148
|
|
|
1603
2149
|
/**
|
|
1604
|
-
*
|
|
2150
|
+
* Retrieves a snapshot of the current state of the Workspace.
|
|
1605
2151
|
*/
|
|
1606
2152
|
snapshot(): Promise<WorkspaceSnapshot>;
|
|
1607
2153
|
|
|
1608
2154
|
/**
|
|
1609
|
-
* Sets
|
|
1610
|
-
* @param title
|
|
2155
|
+
* Sets the title of the Workspace.
|
|
2156
|
+
* @param title Title for the Workspace.
|
|
1611
2157
|
*/
|
|
1612
2158
|
setTitle(title: string): Promise<void>;
|
|
1613
2159
|
|
|
1614
2160
|
/**
|
|
1615
|
-
*
|
|
2161
|
+
* Retrieves the context of the Workspace.
|
|
1616
2162
|
*/
|
|
1617
2163
|
getContext(): Promise<any>;
|
|
1618
2164
|
|
|
1619
2165
|
/**
|
|
1620
|
-
* Sets the context
|
|
1621
|
-
* @param data
|
|
2166
|
+
* Sets the context of the Workspace. This operation will overwrite entirely the existing context.
|
|
2167
|
+
* @param data Context for the Workspace.
|
|
1622
2168
|
*/
|
|
1623
2169
|
setContext(data: any): Promise<void>;
|
|
1624
2170
|
|
|
1625
2171
|
/**
|
|
1626
|
-
*
|
|
1627
|
-
* @param data
|
|
2172
|
+
* Updates the context of the Workspace. This operation will merge the update with the existing context.
|
|
2173
|
+
* @param data Context data with which to update the Workspace context.
|
|
1628
2174
|
*/
|
|
1629
2175
|
updateContext(data: any): Promise<void>;
|
|
1630
2176
|
|
|
1631
2177
|
/**
|
|
1632
|
-
* Notifies when the context
|
|
1633
|
-
* @param callback Callback function
|
|
2178
|
+
* Notifies when the context of the Workspace has been updated. Returns an unsubscribe function.
|
|
2179
|
+
* @param callback Callback function for handling the event. Receives as an argument the updated context.
|
|
1634
2180
|
*/
|
|
1635
2181
|
onContextUpdated(callback: (data: any) => void): Promise<Unsubscribe>;
|
|
1636
2182
|
|
|
1637
2183
|
/**
|
|
1638
|
-
* Updates
|
|
2184
|
+
* Updates the `Workspace` object to reflect the current state of the Workspace.
|
|
1639
2185
|
*/
|
|
1640
2186
|
refreshReference(): Promise<void>;
|
|
1641
2187
|
|
|
1642
2188
|
/**
|
|
1643
|
-
* Saves the current
|
|
1644
|
-
*
|
|
1645
|
-
* @param
|
|
2189
|
+
* Saves the current structure of the Workspace as a Workspace Layout.
|
|
2190
|
+
* In **io.Connect Browser**, this will throw an error if the name matches the name of a read-only Workspace Layout.
|
|
2191
|
+
* @param name Name for the Workspace Layout.
|
|
2192
|
+
* @param config Options for saving the Workspace Layout.
|
|
1646
2193
|
*/
|
|
1647
2194
|
saveLayout(name: string, config?: SaveLayoutConfig): Promise<void>;
|
|
1648
2195
|
|
|
1649
2196
|
/**
|
|
1650
|
-
*
|
|
1651
|
-
* @param predicate
|
|
2197
|
+
* Retrieves the first box element in the Workspace that satisfies the provided predicate.
|
|
2198
|
+
* @param predicate Filtering function (predicate) that will be invoked for each box element in the Workspace.
|
|
1652
2199
|
*/
|
|
1653
2200
|
getBox(predicate: (box: WorkspaceBox) => boolean): WorkspaceBox | undefined;
|
|
1654
2201
|
|
|
1655
2202
|
/**
|
|
1656
|
-
*
|
|
1657
|
-
* @param predicate
|
|
2203
|
+
* Retrieves all box elements in the Workspace that satisfy the provided predicate. If no predicate is provided, will return all box elements.
|
|
2204
|
+
* @param predicate Filtering function (predicate) that will be invoked for each box element in the Workspace.
|
|
1658
2205
|
*/
|
|
1659
2206
|
getAllBoxes(predicate?: (box: WorkspaceBox) => boolean): WorkspaceBox[];
|
|
1660
2207
|
|
|
1661
2208
|
/**
|
|
1662
|
-
*
|
|
1663
|
-
* @param predicate
|
|
2209
|
+
* Retrieves the first row in the Workspace that satisfies the provided predicate.
|
|
2210
|
+
* @param predicate Filtering function (predicate) that will be invoked for each row in the Workspace.
|
|
1664
2211
|
*/
|
|
1665
2212
|
getRow(predicate: (row: Row) => boolean): Row | undefined;
|
|
1666
2213
|
|
|
1667
2214
|
/**
|
|
1668
|
-
*
|
|
1669
|
-
* @param predicate
|
|
2215
|
+
* Retrieves all rows in the Workspace that satisfy the provided predicate. If no predicate is provided, will return all rows.
|
|
2216
|
+
* @param predicate Filtering function (predicate) that will be invoked for each row in the Workspace.
|
|
1670
2217
|
*/
|
|
1671
2218
|
getAllRows(predicate?: (row: Row) => boolean): Row[];
|
|
1672
2219
|
|
|
1673
2220
|
/**
|
|
1674
|
-
*
|
|
1675
|
-
* @param predicate
|
|
2221
|
+
* Retrieves the first column in the Workspace that satisfies the provided predicate.
|
|
2222
|
+
* @param predicate Filtering function (predicate) that will be invoked for each column in the Workspace.
|
|
1676
2223
|
*/
|
|
1677
2224
|
getColumn(predicate: (column: Column) => boolean): Column | undefined;
|
|
1678
2225
|
|
|
1679
2226
|
/**
|
|
1680
|
-
*
|
|
1681
|
-
* @param predicate
|
|
2227
|
+
* Retrieves all columns in the Workspace that satisfy the provided predicate. If no predicate is provided, will return all columns.
|
|
2228
|
+
* @param predicate Filtering function (predicate) that will be invoked for each column in the Workspace.
|
|
1682
2229
|
*/
|
|
1683
2230
|
getAllColumns(predicate?: (columns: Column) => boolean): Column[];
|
|
1684
2231
|
|
|
1685
2232
|
/**
|
|
1686
|
-
*
|
|
1687
|
-
* @param predicate
|
|
2233
|
+
* Retrieves the first window group in the Workspace that satisfies the provided predicate.
|
|
2234
|
+
* @param predicate Filtering function (predicate) that will be invoked for each window group in the Workspace.
|
|
1688
2235
|
*/
|
|
1689
2236
|
getGroup(predicate: (group: Group) => boolean): Group | undefined;
|
|
1690
2237
|
|
|
1691
2238
|
/**
|
|
1692
|
-
*
|
|
1693
|
-
* @param predicate
|
|
2239
|
+
* Retrieves all window groups in the Workspace that satisfy the provided predicate. If no predicate is provided, will return all window groups.
|
|
2240
|
+
* @param predicate Filtering function (predicate) that will be invoked for each window group in the Workspace.
|
|
1694
2241
|
*/
|
|
1695
2242
|
getAllGroups(predicate?: (group: Group) => boolean): Group[];
|
|
1696
2243
|
|
|
1697
2244
|
/**
|
|
1698
|
-
*
|
|
1699
|
-
* @param predicate
|
|
2245
|
+
* Retrieves the first window in the Workspace that satisfies the provided predicate.
|
|
2246
|
+
* @param predicate Filtering function (predicate) that will be invoked for each window in the Workspace.
|
|
1700
2247
|
*/
|
|
1701
2248
|
getWindow(predicate: (window: WorkspaceWindow) => boolean): WorkspaceWindow | undefined;
|
|
1702
2249
|
|
|
1703
2250
|
/**
|
|
1704
|
-
*
|
|
1705
|
-
* @param predicate
|
|
2251
|
+
* Retrieves all windows in the Workspace that satisfy the provided predicate. If no predicate is provided, will return all windows.
|
|
2252
|
+
* @param predicate Filtering function (predicate) that will be invoked for each window in the Workspace.
|
|
1706
2253
|
*/
|
|
1707
2254
|
getAllWindows(predicate?: (window: WorkspaceWindow) => boolean): WorkspaceWindow[];
|
|
1708
2255
|
|
|
1709
2256
|
/**
|
|
1710
|
-
* Adds a new row to
|
|
1711
|
-
* @param definition
|
|
2257
|
+
* Adds a new row to the Workspace.
|
|
2258
|
+
* @param definition Definition for the row.
|
|
1712
2259
|
*/
|
|
1713
2260
|
addRow(definition?: BoxDefinition): Promise<Row>;
|
|
1714
2261
|
|
|
1715
2262
|
/**
|
|
1716
|
-
* Adds a new column to
|
|
1717
|
-
* @param definition
|
|
2263
|
+
* Adds a new column to the Workspace.
|
|
2264
|
+
* @param definition Definition for the column.
|
|
1718
2265
|
*/
|
|
1719
2266
|
addColumn(definition?: BoxDefinition): Promise<Column>;
|
|
1720
2267
|
|
|
1721
2268
|
/**
|
|
1722
|
-
* Adds a new group to
|
|
1723
|
-
* @param definition
|
|
2269
|
+
* Adds a new window group to the Workspace.
|
|
2270
|
+
* @param definition Definition for the window group.
|
|
1724
2271
|
*/
|
|
1725
2272
|
addGroup(definition?: BoxDefinition): Promise<Group>;
|
|
1726
2273
|
|
|
1727
2274
|
/**
|
|
1728
|
-
* Adds a new window to
|
|
1729
|
-
* @param definition
|
|
2275
|
+
* Adds a new window to the Workspace.
|
|
2276
|
+
* @param definition Definition for the window.
|
|
1730
2277
|
*/
|
|
1731
2278
|
addWindow(definition: WorkspaceWindowDefinition): Promise<WorkspaceWindow>;
|
|
1732
2279
|
|
|
1733
2280
|
/**
|
|
1734
|
-
* Removes the first element
|
|
1735
|
-
* @param predicate
|
|
2281
|
+
* Removes the first element in the Workspace that satisfies the provided predicate.
|
|
2282
|
+
* @param predicate Filtering function (predicate) that will be invoked for each element in the Workspace.
|
|
1736
2283
|
*/
|
|
1737
2284
|
remove(predicate: (child: WorkspaceElement) => boolean): Promise<void>;
|
|
1738
2285
|
|
|
1739
2286
|
/**
|
|
1740
|
-
* Removes the first immediate child of
|
|
1741
|
-
* @param predicate
|
|
2287
|
+
* Removes the first immediate child element of the Workspace that satisfies the provided predicate.
|
|
2288
|
+
* @param predicate Filtering function (predicate) that will be invoked for each immediate child element of the Workspace.
|
|
1742
2289
|
*/
|
|
1743
2290
|
removeChild(predicate: (child: WorkspaceElement) => boolean): Promise<void>;
|
|
1744
2291
|
|
|
1745
2292
|
/**
|
|
1746
|
-
* Transforms
|
|
2293
|
+
* Transforms the Workspace into a Workspace with a single immediate child element of type row that will contain all existing elements.
|
|
1747
2294
|
*/
|
|
1748
2295
|
bundleToRow(): Promise<void>;
|
|
1749
2296
|
|
|
1750
2297
|
/**
|
|
1751
|
-
* Transforms
|
|
2298
|
+
* Transforms the Workspace into a Workspace with a single immediate child element of type column that will contain all existing elements.
|
|
1752
2299
|
*/
|
|
1753
2300
|
bundleToColumn(): Promise<void>;
|
|
1754
2301
|
|
|
1755
2302
|
/**
|
|
1756
|
-
*
|
|
2303
|
+
* Hibernates the Workspace. All windows in the Workspace will be closed, but the Workspace structure will be preserved.
|
|
1757
2304
|
*/
|
|
1758
2305
|
hibernate(): Promise<void>;
|
|
1759
2306
|
|
|
1760
2307
|
/**
|
|
1761
|
-
* Resumes
|
|
2308
|
+
* Resumes the hibernated Workspace. All windows that have been closed during hibernation will be reloaded.
|
|
1762
2309
|
*/
|
|
1763
2310
|
resume(): Promise<void>;
|
|
1764
2311
|
|
|
1765
2312
|
/**
|
|
1766
|
-
* Locks the
|
|
1767
|
-
*
|
|
2313
|
+
* Locks the Workspace in order to restrict the ability of the user to modify it.
|
|
2314
|
+
* If no lock settings are provided, all lock properties will be set to `false`.
|
|
2315
|
+
* @param config Object or function for setting the lock properties. If an object is provided, it will override all current lock settings.
|
|
2316
|
+
* If a function is provided, it will be invoked with the current lock settings as an argument and must return an object with lock settings that will override the current ones.
|
|
2317
|
+
* Using a function is recommended when you don't want to override all current lock settings.
|
|
1768
2318
|
*/
|
|
1769
2319
|
lock(config?: WorkspaceLockConfig | ((config: WorkspaceLockConfig) => WorkspaceLockConfig)): Promise<void>;
|
|
1770
2320
|
|
|
@@ -1773,40 +2323,43 @@ export namespace IOConnectWorkspaces {
|
|
|
1773
2323
|
* *Available only in **io.Connect Desktop**.*
|
|
1774
2324
|
* @param mode Mode for dragging the Workspace windows. If set to `"autoEject"`, when the user drags a Workspace window, it will be ejected from the Workspace during the dragging operation and the user will be able to drop it back inside the Workspace, or out of the Workspace.
|
|
1775
2325
|
* If set to `"keepInside"`, the window won't be ejected from the Workspace when being dragged and the user will be able to drop it only inside the Workspace.
|
|
2326
|
+
* @since io.Connect Desktop 9.5
|
|
2327
|
+
* @since @interopio/workspaces-api 3.5.2
|
|
1776
2328
|
*/
|
|
1777
2329
|
setWindowDragMode(mode: "keepInside" | "autoEject"): Promise<void>;
|
|
1778
2330
|
|
|
1779
2331
|
/**
|
|
1780
|
-
* Sets the loading strategy
|
|
2332
|
+
* Sets the loading strategy of the Workspace at runtime.
|
|
1781
2333
|
* This will override the current loading strategy for the Workspace that may have been specified via configuration or programmatically
|
|
1782
2334
|
* when creating or restoring the Workspace. The loading strategy specified via this method will be preserved in the Workspace Layout
|
|
1783
2335
|
* only if the Workspace is saved afterwards and the `"persistCurrentStrategy"` flag is set to `true` in the Workspaces App definition.
|
|
1784
2336
|
* *Available only in **io.Connect Desktop**.*
|
|
1785
2337
|
* @since io.Connect Desktop 9.8
|
|
2338
|
+
* @since @interopio/workspaces-api 3.5.6
|
|
1786
2339
|
* @param strategy Loading strategy for the Workspace.
|
|
1787
2340
|
*/
|
|
1788
2341
|
setLoadingStrategy(strategy: LoadingStrategy): Promise<void>;
|
|
1789
2342
|
|
|
1790
2343
|
/**
|
|
1791
|
-
* Notifies when
|
|
1792
|
-
* @param callback Callback function
|
|
2344
|
+
* Notifies when the Workspace has been closed. Returns an unsubscribe function.
|
|
2345
|
+
* @param callback Callback function for handling the event. Receives as an argument an object describing the closed Workspace.
|
|
1793
2346
|
*/
|
|
1794
2347
|
onClosed(callback: (closed?: WorkspaceClosedData) => void): Promise<Unsubscribe>;
|
|
1795
2348
|
|
|
1796
2349
|
/**
|
|
1797
|
-
* Notifies when the
|
|
1798
|
-
* @param callback Callback function
|
|
2350
|
+
* Notifies when the lock settings of the Workspace have changed. Returns an unsubscribe function.
|
|
2351
|
+
* @param callback Callback function for handling the event. Receives as an argument the new lock settings.
|
|
1799
2352
|
*/
|
|
1800
2353
|
onLockConfigurationChanged(callback: (config: IOConnectWorkspaces.WorkspaceLockConfig) => void): Promise<IOConnectWorkspaces.Unsubscribe>;
|
|
1801
2354
|
|
|
1802
2355
|
/**
|
|
1803
|
-
* Notifies when the Workspace
|
|
2356
|
+
* Notifies when the Workspace has been hibernated. Returns an unsubscribe function.
|
|
1804
2357
|
* @param callback Callback function for handling the event.
|
|
1805
2358
|
*/
|
|
1806
2359
|
onHibernated(callback: () => void): Promise<IOConnectWorkspaces.Unsubscribe>;
|
|
1807
2360
|
|
|
1808
2361
|
/**
|
|
1809
|
-
* Notifies when the Workspace
|
|
2362
|
+
* Notifies when the Workspace has been resumed after being hibernated. Returns an unsubscribe function.
|
|
1810
2363
|
* @param callback Callback function for handling the event.
|
|
1811
2364
|
*/
|
|
1812
2365
|
onResumed(callback: () => void): Promise<IOConnectWorkspaces.Unsubscribe>;
|
|
@@ -1830,482 +2383,637 @@ export namespace IOConnectWorkspaces {
|
|
|
1830
2383
|
onWindowTabReordered(callback: (window: WorkspaceWindow) => void): Promise<IOConnectWorkspaces.Unsubscribe>;
|
|
1831
2384
|
|
|
1832
2385
|
/**
|
|
1833
|
-
* Notifies when a new window
|
|
1834
|
-
* An added window
|
|
1835
|
-
* @param callback Callback function
|
|
2386
|
+
* Notifies when a new window has been added to the Workspace. Returns an unsubscribe function.
|
|
2387
|
+
* An added window has a place in the Workspace (it's a valid Workspace element), but this doesn't guarantee that the contents of the window have been loaded.
|
|
2388
|
+
* @param callback Callback function for handling the event. Receives as an argument the `WorkspaceWindow` object describing the added window.
|
|
1836
2389
|
*/
|
|
1837
2390
|
onWindowAdded(callback: (window: WorkspaceWindow) => void): Promise<Unsubscribe>;
|
|
1838
2391
|
|
|
1839
2392
|
/**
|
|
1840
|
-
* Notifies when a window
|
|
1841
|
-
*
|
|
1842
|
-
* @param callback Callback function
|
|
2393
|
+
* Notifies when a window has been removed from the Workspace. Returns an unsubscribe function.
|
|
2394
|
+
* *Available only in **io.Connect Desktop**.*
|
|
2395
|
+
* @param callback Callback function for handling the event. Receives as an argument an object with the IDs of the removed window and of its Workspace and `Frame` instance.
|
|
1843
2396
|
*/
|
|
1844
2397
|
onWindowRemoved(callback: (removed: { windowId?: string; workspaceId: string; frameId: string }) => void): Promise<Unsubscribe>;
|
|
1845
2398
|
|
|
1846
2399
|
/**
|
|
1847
|
-
* Notifies when a window
|
|
1848
|
-
* A loaded window is a window
|
|
1849
|
-
* @param callback Callback function
|
|
2400
|
+
* Notifies when the contents of a window in the Workspace have been loaded. Returns an unsubscribe function.
|
|
2401
|
+
* A loaded window is a window that has been added to a Workspace, whose contents have been loaded, and which is present in the windows collection.
|
|
2402
|
+
* @param callback Callback function for handling the event. Receives as an argument the `WorkspaceWindow` object describing the loaded window.
|
|
1850
2403
|
*/
|
|
1851
2404
|
onWindowLoaded(callback: (window: WorkspaceWindow) => void): Promise<Unsubscribe>;
|
|
2405
|
+
|
|
1852
2406
|
/**
|
|
1853
|
-
|
|
1854
|
-
|
|
1855
|
-
|
|
1856
|
-
|
|
2407
|
+
* Notifies when a window in the Workspace has been maximized. Returns an unsubscribe function.
|
|
2408
|
+
* The window can be maximized programmatically or by the user via the "Maximize" button.
|
|
2409
|
+
* @param callback Callback function for handling the event. Receives as an argument the `WorkspaceWindow` object describing the maximized window.
|
|
2410
|
+
*/
|
|
1857
2411
|
onWindowMaximized(callback: (window: IOConnectWorkspaces.WorkspaceWindow) => void): Promise<IOConnectWorkspaces.Unsubscribe>;
|
|
1858
2412
|
|
|
1859
2413
|
/**
|
|
1860
|
-
|
|
1861
|
-
|
|
1862
|
-
|
|
1863
|
-
|
|
2414
|
+
* Notifies when a window in the Workspace has been restored from a maximized state. Returns an unsubscribe function.
|
|
2415
|
+
* The window can be restored programmatically or by the user via the "Restore" button.
|
|
2416
|
+
* @param callback Callback function for handling the event. Receives as an argument the `WorkspaceWindow` object describing the restored window.
|
|
2417
|
+
*/
|
|
1864
2418
|
onWindowRestored(callback: (window: IOConnectWorkspaces.WorkspaceWindow) => void): Promise<IOConnectWorkspaces.Unsubscribe>;
|
|
1865
2419
|
|
|
1866
2420
|
/**
|
|
1867
|
-
* Notifies when a window
|
|
1868
|
-
* @param callback Callback function
|
|
2421
|
+
* Notifies when a window in the Workspace has been selected. Returns an unsubscribe function.
|
|
2422
|
+
* @param callback Callback function for handling the event. Receives as an argument the `WorkspaceWindow` object describing the selected window.
|
|
1869
2423
|
*/
|
|
1870
2424
|
onWindowSelected(callback: (window: IOConnectWorkspaces.WorkspaceWindow) => void): Promise<IOConnectWorkspaces.Unsubscribe>;
|
|
1871
2425
|
|
|
1872
2426
|
/**
|
|
1873
|
-
*
|
|
2427
|
+
* Flag indicating whether the Workspace is pinned.
|
|
1874
2428
|
*/
|
|
1875
2429
|
isPinned?: boolean;
|
|
1876
2430
|
|
|
1877
2431
|
/**
|
|
1878
2432
|
* Mode for dragging the windows that are part of the Workspace. If set to `"autoEject"` (available only in **io.Connect Desktop**), when the user drags a Workspace window, it will be ejected from the Workspace during the dragging operation and the user will be able to drop it back inside the Workspace, or out of the Workspace.
|
|
1879
2433
|
* If set to `"keepInside"`, the window won't be ejected from the Workspace when being dragged and the user will be able to drop it only inside the Workspace.
|
|
2434
|
+
* @since io.Connect Desktop 9.5
|
|
2435
|
+
* @since @interopio/workspaces-api 3.5.2
|
|
1880
2436
|
*/
|
|
1881
2437
|
windowDragMode?: "keepInside" | "autoEject";
|
|
1882
2438
|
|
|
1883
2439
|
/**
|
|
1884
|
-
*
|
|
2440
|
+
* Icon of the Workspace in the format in which it has been provided.
|
|
1885
2441
|
*/
|
|
1886
2442
|
icon?: string;
|
|
1887
2443
|
|
|
1888
2444
|
/**
|
|
1889
|
-
*
|
|
1890
|
-
*
|
|
2445
|
+
* Pins the Workspace. The Workspace tab will be moved before all unpinned Workspace tabs,
|
|
2446
|
+
* the title, the Workspace tab menu, and the "Close" button will be removed, and the Workspace icon will be shown.
|
|
2447
|
+
* @param options Options for pinning the Workspace.
|
|
1891
2448
|
*/
|
|
1892
2449
|
pin(options?: WorkspacePinOptions): Promise<void>;
|
|
1893
2450
|
|
|
1894
2451
|
/**
|
|
1895
|
-
*
|
|
2452
|
+
* Unpins the Workspace. The Workspace tab will be moved after all pinned Workspace tabs,
|
|
2453
|
+
* the title, the Workspace tab menu, and the "Close" button will be returned, and the Workspace icon will be hidden.
|
|
1896
2454
|
*/
|
|
1897
2455
|
unpin(): Promise<void>;
|
|
1898
2456
|
|
|
1899
2457
|
/**
|
|
1900
|
-
*
|
|
2458
|
+
* Retrieves the icon of the Workspace.
|
|
1901
2459
|
*/
|
|
1902
2460
|
getIcon(): Promise<string>;
|
|
1903
2461
|
|
|
1904
2462
|
/**
|
|
1905
|
-
*
|
|
1906
|
-
* @param icon
|
|
2463
|
+
* Sets the icon of the Workspace.
|
|
2464
|
+
* @param icon Icon for the Workspace. Can be a path to a web resource or a string representation of an image, such as Base64.
|
|
1907
2465
|
*/
|
|
1908
2466
|
setIcon(icon: string): Promise<void>;
|
|
1909
2467
|
|
|
1910
2468
|
/**
|
|
1911
|
-
* Shows the loading animation of the
|
|
2469
|
+
* Shows the loading animation of the Workspace.
|
|
1912
2470
|
* *Available only in **io.Connect Desktop**.*
|
|
1913
2471
|
*/
|
|
1914
2472
|
showLoadingAnimation(): Promise<void>;
|
|
1915
2473
|
|
|
1916
2474
|
/**
|
|
1917
|
-
* Hides the loading animation of the
|
|
2475
|
+
* Hides the loading animation of the Workspace.
|
|
1918
2476
|
* *Available only in **io.Connect Desktop**.*
|
|
1919
2477
|
*/
|
|
1920
2478
|
hideLoadingAnimation(): Promise<void>;
|
|
1921
2479
|
}
|
|
1922
2480
|
|
|
1923
|
-
/**
|
|
2481
|
+
/**
|
|
2482
|
+
* Describes the basic details of a box element.
|
|
2483
|
+
*/
|
|
1924
2484
|
export interface BoxSummary {
|
|
1925
2485
|
|
|
1926
|
-
/**
|
|
2486
|
+
/**
|
|
2487
|
+
* Unique ID of the box element.
|
|
2488
|
+
*/
|
|
1927
2489
|
id: string;
|
|
1928
2490
|
|
|
1929
|
-
/**
|
|
2491
|
+
/**
|
|
2492
|
+
* ID of the `Frame` instance containing the box element.
|
|
2493
|
+
*/
|
|
1930
2494
|
frameId: string;
|
|
1931
2495
|
|
|
1932
|
-
/**
|
|
2496
|
+
/**
|
|
2497
|
+
* ID of the Workspace containing the box element.
|
|
2498
|
+
*/
|
|
1933
2499
|
workspaceId: string;
|
|
1934
2500
|
|
|
1935
|
-
/**
|
|
2501
|
+
/**
|
|
2502
|
+
* Position of the box element relative to its sibling elements.
|
|
2503
|
+
*/
|
|
1936
2504
|
positionIndex: number;
|
|
1937
2505
|
|
|
1938
|
-
/**
|
|
2506
|
+
/**
|
|
2507
|
+
* Flag indicating whether the user can add windows by dropping them in the box element.
|
|
2508
|
+
*/
|
|
1939
2509
|
allowDrop?: boolean;
|
|
1940
2510
|
|
|
1941
|
-
/**
|
|
2511
|
+
/**
|
|
2512
|
+
* Minimum width in pixels of the box element, calculated using the size constraints of the elements in it.
|
|
2513
|
+
*/
|
|
1942
2514
|
minWidth?: number;
|
|
1943
2515
|
|
|
1944
|
-
/**
|
|
2516
|
+
/**
|
|
2517
|
+
* Minimum height in pixels of the box element, calculated using the size constraints of the elements in it.
|
|
2518
|
+
*/
|
|
1945
2519
|
minHeight?: number;
|
|
1946
2520
|
|
|
1947
|
-
/**
|
|
2521
|
+
/**
|
|
2522
|
+
* Maximum width in pixels of the box element, calculated using the size constraints of the elements in it.
|
|
2523
|
+
*/
|
|
1948
2524
|
maxWidth?: number;
|
|
1949
2525
|
|
|
1950
|
-
/**
|
|
2526
|
+
/**
|
|
2527
|
+
* Maximum height in pixels of the box element, calculated using the size constraints of the elements in it.
|
|
2528
|
+
*/
|
|
1951
2529
|
maxHeight?: number;
|
|
1952
2530
|
|
|
1953
|
-
/**
|
|
2531
|
+
/**
|
|
2532
|
+
* Width in pixels of the box element.
|
|
2533
|
+
*/
|
|
1954
2534
|
width?: number;
|
|
1955
2535
|
|
|
1956
|
-
/**
|
|
2536
|
+
/**
|
|
2537
|
+
* Height in pixels of the box element.
|
|
2538
|
+
*/
|
|
1957
2539
|
height?: number;
|
|
1958
2540
|
|
|
1959
|
-
/**
|
|
2541
|
+
/**
|
|
2542
|
+
* Flag indicating whether the box element is maximized.
|
|
2543
|
+
*/
|
|
1960
2544
|
isMaximized?: boolean;
|
|
1961
2545
|
}
|
|
1962
2546
|
|
|
1963
|
-
/**
|
|
2547
|
+
/**
|
|
2548
|
+
* Describes a box element in a Workspace.
|
|
2549
|
+
*/
|
|
1964
2550
|
export interface Box extends BoxSummary {
|
|
1965
2551
|
|
|
1966
|
-
/**
|
|
2552
|
+
/**
|
|
2553
|
+
* Array of objects, each describing an immediate child element of the box element.
|
|
2554
|
+
*/
|
|
1967
2555
|
children: WorkspaceElement[];
|
|
1968
2556
|
|
|
1969
|
-
/**
|
|
2557
|
+
/**
|
|
2558
|
+
* Parent of the box element - a Workspace or another box element.
|
|
2559
|
+
*/
|
|
1970
2560
|
parent: Workspace | WorkspaceBox;
|
|
1971
2561
|
|
|
1972
|
-
/**
|
|
2562
|
+
/**
|
|
2563
|
+
* `Frame` instance containing the box element.
|
|
2564
|
+
*/
|
|
1973
2565
|
frame: Frame;
|
|
1974
2566
|
|
|
1975
|
-
/**
|
|
2567
|
+
/**
|
|
2568
|
+
* Workspace containing the box element.
|
|
2569
|
+
*/
|
|
1976
2570
|
workspace: Workspace;
|
|
1977
2571
|
|
|
1978
2572
|
/**
|
|
1979
|
-
* Opens a new window
|
|
1980
|
-
* @param definition
|
|
2573
|
+
* Opens a new window in the box element and loads its contents.
|
|
2574
|
+
* @param definition Definition for the window.
|
|
1981
2575
|
*/
|
|
1982
2576
|
addWindow(definition: WorkspaceWindowDefinition): Promise<WorkspaceWindow>;
|
|
1983
2577
|
|
|
1984
2578
|
/**
|
|
1985
|
-
* Adds a new group
|
|
1986
|
-
* @param definition
|
|
2579
|
+
* Adds a new window group to the box element.
|
|
2580
|
+
* @param definition Definition or a builder for the window group.
|
|
1987
2581
|
*/
|
|
1988
2582
|
addGroup(definition?: BoxDefinition | BoxBuilder): Promise<Group>;
|
|
1989
2583
|
|
|
1990
2584
|
/**
|
|
1991
|
-
* Adds a new column
|
|
1992
|
-
* @param definition
|
|
2585
|
+
* Adds a new column to the box element.
|
|
2586
|
+
* @param definition Definition or a builder for the column.
|
|
1993
2587
|
*/
|
|
1994
2588
|
addColumn(definition?: BoxDefinition | BoxBuilder): Promise<Column>;
|
|
1995
2589
|
|
|
1996
2590
|
/**
|
|
1997
|
-
* Adds a new row
|
|
1998
|
-
* @param definition
|
|
2591
|
+
* Adds a new row to the box element.
|
|
2592
|
+
* @param definition Definition or a builder for the row.
|
|
1999
2593
|
*/
|
|
2000
2594
|
addRow(definition?: BoxDefinition | BoxBuilder): Promise<Row>;
|
|
2001
2595
|
|
|
2002
2596
|
/**
|
|
2003
|
-
* Removes the first immediate child of
|
|
2004
|
-
* @param predicate
|
|
2597
|
+
* Removes the first immediate child element of the box element that satisfies the provided predicate.
|
|
2598
|
+
* @param predicate Filtering function (predicate) that will be invoked for each immediate child element of the box element.
|
|
2005
2599
|
*/
|
|
2006
2600
|
removeChild(predicate: (child: WorkspaceElement) => boolean): Promise<void>;
|
|
2007
2601
|
|
|
2008
2602
|
/**
|
|
2009
|
-
* Maximizes
|
|
2603
|
+
* Maximizes the box element within the bounds of the Workspace, or within the nearest parent element set as a maximization boundary.
|
|
2010
2604
|
*/
|
|
2011
2605
|
maximize(): Promise<void>;
|
|
2012
2606
|
|
|
2013
2607
|
/**
|
|
2014
|
-
* Restores
|
|
2608
|
+
* Restores the box element if it has been previously maximized.
|
|
2015
2609
|
*/
|
|
2016
2610
|
restore(): Promise<void>;
|
|
2017
2611
|
|
|
2018
2612
|
/**
|
|
2019
|
-
* Closes
|
|
2613
|
+
* Closes the box element and all its child elements.
|
|
2020
2614
|
*/
|
|
2021
2615
|
close(): Promise<void>;
|
|
2022
2616
|
}
|
|
2023
2617
|
|
|
2024
|
-
/**
|
|
2618
|
+
/**
|
|
2619
|
+
* Describes a Workspace row.
|
|
2620
|
+
*/
|
|
2025
2621
|
export interface Row extends Box {
|
|
2622
|
+
/**
|
|
2623
|
+
* Type of the box element.
|
|
2624
|
+
*/
|
|
2026
2625
|
type: "row";
|
|
2027
2626
|
|
|
2028
|
-
/**
|
|
2627
|
+
/**
|
|
2628
|
+
* Flag indicating whether the user can resize the row by dragging the splitters.
|
|
2629
|
+
*/
|
|
2029
2630
|
allowSplitters?: boolean;
|
|
2030
2631
|
|
|
2031
|
-
/**
|
|
2632
|
+
/**
|
|
2633
|
+
* Flag indicating whether the row is pinned.
|
|
2634
|
+
*/
|
|
2032
2635
|
isPinned?: boolean;
|
|
2033
2636
|
|
|
2034
|
-
/**
|
|
2637
|
+
/**
|
|
2638
|
+
* Flag indicating whether the width and height of any maximized child element will be constrained to the current size of the row.
|
|
2639
|
+
*/
|
|
2035
2640
|
maximizationBoundary?: boolean;
|
|
2036
2641
|
|
|
2037
2642
|
/**
|
|
2038
|
-
* Locks the row
|
|
2039
|
-
*
|
|
2643
|
+
* Locks the row in order to restrict the ability of the user to modify it.
|
|
2644
|
+
* If no lock settings are provided, all lock properties will be set to `false`.
|
|
2645
|
+
* @param config Object or function for setting the lock properties. If an object is provided, it will override all current lock settings.
|
|
2646
|
+
* If a function is provided, it will be invoked with the current lock settings as an argument and must return an object with lock settings that will override the current ones.
|
|
2647
|
+
* Using a function is recommended when you don't want to override all current lock settings.
|
|
2040
2648
|
*/
|
|
2041
2649
|
lock(config?: RowLockConfig | ((config: RowLockConfig) => RowLockConfig)): Promise<void>;
|
|
2042
2650
|
|
|
2043
2651
|
/**
|
|
2044
|
-
* Sets
|
|
2045
|
-
* @param height
|
|
2652
|
+
* Sets the height of the row.
|
|
2653
|
+
* @param height Height in pixels for the row.
|
|
2046
2654
|
*/
|
|
2047
2655
|
setHeight(height: number): Promise<void>;
|
|
2048
2656
|
|
|
2049
2657
|
/**
|
|
2050
|
-
|
|
2051
|
-
|
|
2052
|
-
|
|
2053
|
-
|
|
2658
|
+
* Sets whether the row will act as a maximization boundary.
|
|
2659
|
+
* If enabled, the width and height of any maximized child element will be constrained to the current size of the row.
|
|
2660
|
+
* @param config Settings for the maximization boundary.
|
|
2661
|
+
*/
|
|
2662
|
+
setMaximizationBoundary(config: SetMaximizationBoundaryConfig): Promise<void>;
|
|
2054
2663
|
|
|
2055
2664
|
/**
|
|
2056
|
-
* Notifies when the
|
|
2057
|
-
* @param callback Callback function
|
|
2665
|
+
* Notifies when the lock settings of the row have changed. Returns an unsubscribe function.
|
|
2666
|
+
* @param callback Callback function for handling the event. Receives as an argument the new lock settings.
|
|
2058
2667
|
*/
|
|
2059
2668
|
onLockConfigurationChanged(callback: (config: IOConnectWorkspaces.RowLockConfig) => void): Promise<IOConnectWorkspaces.Unsubscribe>
|
|
2060
2669
|
}
|
|
2061
2670
|
|
|
2062
|
-
/**
|
|
2671
|
+
/**
|
|
2672
|
+
* Describes a Workspace column.
|
|
2673
|
+
*/
|
|
2063
2674
|
export interface Column extends Box {
|
|
2675
|
+
/**
|
|
2676
|
+
* Type of the box element.
|
|
2677
|
+
*/
|
|
2064
2678
|
type: "column";
|
|
2065
2679
|
|
|
2066
|
-
/**
|
|
2680
|
+
/**
|
|
2681
|
+
* Flag indicating whether the user can resize the column by dragging the splitters.
|
|
2682
|
+
*/
|
|
2067
2683
|
allowSplitters?: boolean;
|
|
2068
2684
|
|
|
2069
|
-
/**
|
|
2685
|
+
/**
|
|
2686
|
+
* Flag indicating whether the column is pinned.
|
|
2687
|
+
*/
|
|
2070
2688
|
isPinned?: boolean;
|
|
2071
2689
|
|
|
2072
|
-
/**
|
|
2690
|
+
/**
|
|
2691
|
+
* Flag indicating whether the width and height of any maximized child element will be constrained to the current size of the column.
|
|
2692
|
+
*/
|
|
2073
2693
|
maximizationBoundary?: boolean;
|
|
2074
2694
|
|
|
2075
2695
|
/**
|
|
2076
|
-
* Locks the column
|
|
2077
|
-
*
|
|
2696
|
+
* Locks the column in order to restrict the ability of the user to modify it.
|
|
2697
|
+
* If no lock settings are provided, all lock properties will be set to `false`.
|
|
2698
|
+
* @param config Object or function for setting the lock properties. If an object is provided, it will override all current lock settings.
|
|
2699
|
+
* If a function is provided, it will be invoked with the current lock settings as an argument and must return an object with lock settings that will override the current ones.
|
|
2700
|
+
* Using a function is recommended when you don't want to override all current lock settings.
|
|
2078
2701
|
*/
|
|
2079
2702
|
lock(config?: ColumnLockConfig | ((config: ColumnLockConfig) => ColumnLockConfig)): Promise<void>;
|
|
2080
2703
|
|
|
2081
2704
|
/**
|
|
2082
|
-
* Sets
|
|
2083
|
-
* @param width
|
|
2705
|
+
* Sets the width of the column.
|
|
2706
|
+
* @param width Width in pixels for the column.
|
|
2084
2707
|
*/
|
|
2085
2708
|
setWidth(width: number): Promise<void>;
|
|
2086
2709
|
|
|
2087
2710
|
/**
|
|
2088
|
-
*
|
|
2089
|
-
*
|
|
2711
|
+
* Sets whether the column will act as a maximization boundary.
|
|
2712
|
+
* If enabled, the width and height of any maximized child element will be constrained to the current size of the column.
|
|
2713
|
+
* @param config Settings for the maximization boundary.
|
|
2090
2714
|
*/
|
|
2091
|
-
setMaximizationBoundary(config: SetMaximizationBoundaryConfig): Promise<void
|
|
2715
|
+
setMaximizationBoundary(config: SetMaximizationBoundaryConfig): Promise<void>;
|
|
2092
2716
|
|
|
2093
2717
|
/**
|
|
2094
|
-
* Notifies when the
|
|
2095
|
-
* @param callback Callback function
|
|
2718
|
+
* Notifies when the lock settings of the column have changed. Returns an unsubscribe function.
|
|
2719
|
+
* @param callback Callback function for handling the event. Receives as an argument the new lock settings.
|
|
2096
2720
|
*/
|
|
2097
2721
|
onLockConfigurationChanged(callback: (config: IOConnectWorkspaces.ColumnLockConfig) => void): Promise<IOConnectWorkspaces.Unsubscribe>
|
|
2098
2722
|
}
|
|
2099
2723
|
|
|
2100
|
-
/**
|
|
2724
|
+
/**
|
|
2725
|
+
* Describes a window group in a Workspace.
|
|
2726
|
+
*/
|
|
2101
2727
|
export interface Group extends Box {
|
|
2728
|
+
/**
|
|
2729
|
+
* Type of the box element.
|
|
2730
|
+
*/
|
|
2102
2731
|
type: "group";
|
|
2103
2732
|
|
|
2104
|
-
/**
|
|
2733
|
+
/**
|
|
2734
|
+
* Flag indicating whether the user can extract windows from the window group.
|
|
2735
|
+
*/
|
|
2105
2736
|
allowExtract?: boolean;
|
|
2106
2737
|
|
|
2107
|
-
/**
|
|
2738
|
+
/**
|
|
2739
|
+
* Flag indicating whether the user can reorder the windows in the window group.
|
|
2740
|
+
*/
|
|
2108
2741
|
allowReorder?: boolean;
|
|
2109
2742
|
|
|
2110
|
-
/**
|
|
2743
|
+
/**
|
|
2744
|
+
* Flag indicating whether the user can add windows by dropping them in the leftmost area of the window group.
|
|
2745
|
+
*/
|
|
2111
2746
|
allowDropLeft?: boolean;
|
|
2112
2747
|
|
|
2113
|
-
/**
|
|
2748
|
+
/**
|
|
2749
|
+
* Flag indicating whether the user can add windows by dropping them in the rightmost area of the window group.
|
|
2750
|
+
*/
|
|
2114
2751
|
allowDropRight?: boolean;
|
|
2115
2752
|
|
|
2116
|
-
/**
|
|
2753
|
+
/**
|
|
2754
|
+
* Flag indicating whether the user can add windows by dropping them in the topmost area of the window group.
|
|
2755
|
+
*/
|
|
2117
2756
|
allowDropTop?: boolean;
|
|
2118
2757
|
|
|
2119
|
-
/**
|
|
2758
|
+
/**
|
|
2759
|
+
* Flag indicating whether the user can add windows by dropping them in the bottommost area of the window group.
|
|
2760
|
+
*/
|
|
2120
2761
|
allowDropBottom?: boolean;
|
|
2121
2762
|
|
|
2122
|
-
/**
|
|
2763
|
+
/**
|
|
2764
|
+
* Flag indicating whether the user can add windows by dropping them in the header area of the window group.
|
|
2765
|
+
*/
|
|
2123
2766
|
allowDropHeader?: boolean;
|
|
2124
2767
|
|
|
2125
|
-
/**
|
|
2768
|
+
/**
|
|
2769
|
+
* Flag indicating whether the "Maximize" button in the header of the window group is visible.
|
|
2770
|
+
*/
|
|
2126
2771
|
showMaximizeButton?: boolean;
|
|
2127
2772
|
|
|
2128
|
-
/**
|
|
2773
|
+
/**
|
|
2774
|
+
* Flag indicating whether the "Eject" button in the header of the window group is visible.
|
|
2775
|
+
*/
|
|
2129
2776
|
showEjectButton?: boolean;
|
|
2130
2777
|
|
|
2131
|
-
/**
|
|
2778
|
+
/**
|
|
2779
|
+
* Flag indicating whether the "Add Window" button (the "+" button) in the header of the window group is visible.
|
|
2780
|
+
*/
|
|
2132
2781
|
showAddWindowButton?: boolean;
|
|
2133
2782
|
|
|
2134
2783
|
/**
|
|
2135
|
-
* Locks the group
|
|
2136
|
-
*
|
|
2784
|
+
* Locks the window group in order to restrict the ability of the user to modify it.
|
|
2785
|
+
* If no lock settings are provided, all lock properties will be set to `false`.
|
|
2786
|
+
* @param config Object or function for setting the lock properties. If an object is provided, it will override all current lock settings.
|
|
2787
|
+
* If a function is provided, it will be invoked with the current lock settings as an argument and must return an object with lock settings that will override the current ones.
|
|
2788
|
+
* Using a function is recommended when you don't want to override all current lock settings.
|
|
2137
2789
|
*/
|
|
2138
2790
|
lock(config?: GroupLockConfig | ((config: GroupLockConfig) => GroupLockConfig)): Promise<void>;
|
|
2139
2791
|
|
|
2140
2792
|
/**
|
|
2141
|
-
* Sets
|
|
2142
|
-
* @param sizeConfig
|
|
2793
|
+
* Sets the size of the window group.
|
|
2794
|
+
* @param sizeConfig Size for the window group.
|
|
2143
2795
|
*/
|
|
2144
2796
|
setSize(sizeConfig: ElementResizeConfig): Promise<void>;
|
|
2145
2797
|
|
|
2146
2798
|
/**
|
|
2147
|
-
* Changes the parent of the group to a new column that
|
|
2799
|
+
* Changes the parent of the window group to a new column that will be added in place of the window group.
|
|
2148
2800
|
*/
|
|
2149
2801
|
bundleToColumn(): Promise<void>;
|
|
2150
2802
|
|
|
2151
2803
|
/**
|
|
2152
|
-
* Changes the parent of the group to a new row that
|
|
2804
|
+
* Changes the parent of the window group to a new row that will be added in place of the window group.
|
|
2153
2805
|
*/
|
|
2154
2806
|
bundleToRow(): Promise<void>;
|
|
2155
2807
|
|
|
2156
2808
|
/**
|
|
2157
|
-
* Notifies when
|
|
2158
|
-
* @param
|
|
2809
|
+
* Notifies when the lock settings of the window group have changed. Returns an unsubscribe function.
|
|
2810
|
+
* @param callback Callback function for handling the event. Receives as an argument the new lock settings.
|
|
2159
2811
|
*/
|
|
2160
2812
|
onLockConfigurationChanged(callback: (config: IOConnectWorkspaces.GroupLockConfig) => void): Promise<IOConnectWorkspaces.Unsubscribe>
|
|
2161
2813
|
}
|
|
2162
2814
|
|
|
2163
|
-
/**
|
|
2815
|
+
/**
|
|
2816
|
+
* Describes the basic details of a Workspace window.
|
|
2817
|
+
*/
|
|
2164
2818
|
export interface WorkspaceWindowSummary {
|
|
2165
|
-
/**
|
|
2819
|
+
/**
|
|
2820
|
+
* Unique ID of the window.
|
|
2821
|
+
*/
|
|
2166
2822
|
id: string | undefined;
|
|
2167
2823
|
|
|
2168
|
-
/**
|
|
2824
|
+
/**
|
|
2825
|
+
* Unique ID of the Workspace element hosting the window.
|
|
2826
|
+
*/
|
|
2169
2827
|
elementId: string;
|
|
2170
2828
|
|
|
2171
|
-
/**
|
|
2829
|
+
/**
|
|
2830
|
+
* Type of the Workspace element.
|
|
2831
|
+
*/
|
|
2172
2832
|
type: "window";
|
|
2173
2833
|
|
|
2174
|
-
/**
|
|
2834
|
+
/**
|
|
2835
|
+
* ID of the `Frame` instance containing the window.
|
|
2836
|
+
*/
|
|
2175
2837
|
frameId: string;
|
|
2176
2838
|
|
|
2177
|
-
/**
|
|
2839
|
+
/**
|
|
2840
|
+
* Name of the app, if the window is defined as an app.
|
|
2841
|
+
*/
|
|
2178
2842
|
appName: string;
|
|
2179
2843
|
|
|
2180
|
-
/**
|
|
2844
|
+
/**
|
|
2845
|
+
* ID of the Workspace containing the window.
|
|
2846
|
+
*/
|
|
2181
2847
|
workspaceId: string;
|
|
2182
2848
|
|
|
2183
|
-
/**
|
|
2849
|
+
/**
|
|
2850
|
+
* Position of the window relative to its sibling elements.
|
|
2851
|
+
*/
|
|
2184
2852
|
positionIndex: number;
|
|
2185
2853
|
|
|
2186
|
-
/**
|
|
2854
|
+
/**
|
|
2855
|
+
* Flag indicating whether the window is maximized within its parent element.
|
|
2856
|
+
*/
|
|
2187
2857
|
isMaximized: boolean;
|
|
2188
2858
|
|
|
2189
|
-
/**
|
|
2859
|
+
/**
|
|
2860
|
+
* Flag indicating whether the window is selected.
|
|
2861
|
+
*/
|
|
2190
2862
|
isSelected: boolean;
|
|
2191
2863
|
|
|
2192
|
-
/**
|
|
2864
|
+
/**
|
|
2865
|
+
* Flag indicating whether the contents of the window have been loaded.
|
|
2866
|
+
*/
|
|
2193
2867
|
isLoaded: boolean;
|
|
2194
2868
|
|
|
2195
|
-
/**
|
|
2869
|
+
/**
|
|
2870
|
+
* Flag indicating whether the window is on focus.
|
|
2871
|
+
*/
|
|
2196
2872
|
focused: boolean;
|
|
2197
2873
|
|
|
2198
|
-
/**
|
|
2874
|
+
/**
|
|
2875
|
+
* Title of the window.
|
|
2876
|
+
*/
|
|
2199
2877
|
title: string;
|
|
2200
2878
|
|
|
2201
|
-
/**
|
|
2879
|
+
/**
|
|
2880
|
+
* Flag indicating whether the user can extract the window from the Workspace.
|
|
2881
|
+
*/
|
|
2202
2882
|
allowExtract?: boolean;
|
|
2203
2883
|
|
|
2204
|
-
/**
|
|
2884
|
+
/**
|
|
2885
|
+
* Flag indicating whether the user can reorder the window in the window group.
|
|
2886
|
+
*/
|
|
2205
2887
|
allowReorder?: boolean;
|
|
2206
2888
|
|
|
2207
|
-
/**
|
|
2889
|
+
/**
|
|
2890
|
+
* Flag indicating whether the "Close" button in the window tab is visible.
|
|
2891
|
+
*/
|
|
2208
2892
|
showCloseButton?: boolean;
|
|
2209
2893
|
|
|
2210
|
-
/**
|
|
2894
|
+
/**
|
|
2895
|
+
* Width in pixels of the window.
|
|
2896
|
+
*/
|
|
2211
2897
|
width?: number;
|
|
2212
2898
|
|
|
2213
|
-
/**
|
|
2899
|
+
/**
|
|
2900
|
+
* Height in pixels of the window.
|
|
2901
|
+
*/
|
|
2214
2902
|
height?: number;
|
|
2215
2903
|
|
|
2216
|
-
/**
|
|
2904
|
+
/**
|
|
2905
|
+
* Minimum width in pixels of the window.
|
|
2906
|
+
*/
|
|
2217
2907
|
minWidth?: number;
|
|
2218
2908
|
|
|
2219
|
-
/**
|
|
2909
|
+
/**
|
|
2910
|
+
* Minimum height in pixels of the window.
|
|
2911
|
+
*/
|
|
2220
2912
|
minHeight?: number;
|
|
2221
2913
|
|
|
2222
|
-
/**
|
|
2914
|
+
/**
|
|
2915
|
+
* Maximum width in pixels of the window.
|
|
2916
|
+
*/
|
|
2223
2917
|
maxWidth?: number;
|
|
2224
2918
|
|
|
2225
|
-
/**
|
|
2919
|
+
/**
|
|
2920
|
+
* Maximum height in pixels of the window.
|
|
2921
|
+
*/
|
|
2226
2922
|
maxHeight?: number;
|
|
2227
2923
|
}
|
|
2228
2924
|
|
|
2229
|
-
/**
|
|
2925
|
+
/**
|
|
2926
|
+
* Describes a window in a Workspace.
|
|
2927
|
+
*/
|
|
2230
2928
|
export interface WorkspaceWindow extends WorkspaceWindowSummary {
|
|
2231
2929
|
|
|
2232
|
-
/**
|
|
2930
|
+
/**
|
|
2931
|
+
* Workspace containing the window.
|
|
2932
|
+
*/
|
|
2233
2933
|
workspace: Workspace;
|
|
2234
2934
|
|
|
2235
|
-
/**
|
|
2935
|
+
/**
|
|
2936
|
+
* `Frame` instance containing the window.
|
|
2937
|
+
*/
|
|
2236
2938
|
frame: Frame;
|
|
2237
2939
|
|
|
2238
|
-
/**
|
|
2940
|
+
/**
|
|
2941
|
+
* Parent of the window - a Workspace or a box element.
|
|
2942
|
+
*/
|
|
2239
2943
|
parent: Workspace | WorkspaceBox;
|
|
2240
2944
|
|
|
2241
2945
|
/**
|
|
2242
|
-
* Forces
|
|
2946
|
+
* Forces the window to load its contents. Use for windows that have been added to the Workspace, but whose contents haven't been loaded yet.
|
|
2243
2947
|
*/
|
|
2244
2948
|
forceLoad(): Promise<void>;
|
|
2245
2949
|
|
|
2246
2950
|
/**
|
|
2247
|
-
*
|
|
2951
|
+
* Focuses the window.
|
|
2248
2952
|
*/
|
|
2249
2953
|
focus(): Promise<void>;
|
|
2250
2954
|
|
|
2251
2955
|
/**
|
|
2252
|
-
* Closes the
|
|
2956
|
+
* Closes the window.
|
|
2253
2957
|
*/
|
|
2254
2958
|
close(): Promise<void>;
|
|
2255
2959
|
|
|
2256
2960
|
/**
|
|
2257
|
-
* Sets
|
|
2258
|
-
* @param title
|
|
2961
|
+
* Sets the title of the window.
|
|
2962
|
+
* @param title Title for the window.
|
|
2259
2963
|
*/
|
|
2260
2964
|
setTitle(title: string): Promise<void>;
|
|
2261
2965
|
|
|
2262
2966
|
/**
|
|
2263
|
-
* Maximizes the
|
|
2967
|
+
* Maximizes the window within the bounds of the Workspace, or within the nearest parent element set as a maximization boundary.
|
|
2264
2968
|
*/
|
|
2265
2969
|
maximize(): Promise<void>;
|
|
2266
2970
|
|
|
2267
2971
|
/**
|
|
2268
|
-
* Restores
|
|
2972
|
+
* Restores the window if it has been previously maximized.
|
|
2269
2973
|
*/
|
|
2270
2974
|
restore(): Promise<void>;
|
|
2271
2975
|
|
|
2272
2976
|
/**
|
|
2273
|
-
* Removes
|
|
2977
|
+
* Removes the window from the Workspace and turns it into a standalone window.
|
|
2274
2978
|
*/
|
|
2275
2979
|
eject(): Promise<any>;
|
|
2276
2980
|
|
|
2277
2981
|
/**
|
|
2278
|
-
*
|
|
2982
|
+
* Retrieves the underlying io.Connect Window object of the Workspace window -
|
|
2983
|
+
* a `IOConnectWindow` object in **io.Connect Desktop**, or a `WebWindow` object in **io.Connect Browser**.
|
|
2279
2984
|
*/
|
|
2280
2985
|
getGdWindow(): any;
|
|
2281
2986
|
|
|
2282
2987
|
/**
|
|
2283
|
-
* Moves the
|
|
2284
|
-
* @param box
|
|
2988
|
+
* Moves the window to another box element. In **io.Connect Browser**, the box element must be part of the same `Frame` instance.
|
|
2989
|
+
* @param box Box element in which the window will be placed.
|
|
2285
2990
|
*/
|
|
2286
2991
|
moveTo(box: WorkspaceBox): Promise<void>;
|
|
2287
2992
|
|
|
2288
2993
|
/**
|
|
2289
|
-
* Sets
|
|
2290
|
-
* @param sizeConfig
|
|
2994
|
+
* Sets the size of the window.
|
|
2995
|
+
* @param sizeConfig Size for the window.
|
|
2291
2996
|
*/
|
|
2292
2997
|
setSize(sizeConfig: ElementResizeConfig): Promise<void>;
|
|
2293
2998
|
|
|
2294
2999
|
/**
|
|
2295
|
-
* Locks the window
|
|
2296
|
-
*
|
|
3000
|
+
* Locks the window in order to restrict the ability of the user to modify it.
|
|
3001
|
+
* If no lock settings are provided, all lock properties will be set to `false`.
|
|
3002
|
+
* @param config Object or function for setting the lock properties. If an object is provided, it will override all current lock settings.
|
|
3003
|
+
* If a function is provided, it will be invoked with the current lock settings as an argument and must return an object with lock settings that will override the current ones.
|
|
3004
|
+
* Using a function is recommended when you don't want to override all current lock settings.
|
|
2297
3005
|
*/
|
|
2298
3006
|
lock(config?: IOConnectWorkspaces.WorkspaceWindowLockConfig | ((config: IOConnectWorkspaces.WorkspaceWindowLockConfig) => IOConnectWorkspaces.WorkspaceWindowLockConfig)): Promise<void>;
|
|
2299
3007
|
|
|
2300
3008
|
/**
|
|
2301
|
-
* Notifies when
|
|
2302
|
-
* @param callback Callback function
|
|
3009
|
+
* Notifies when the window has been removed from the Workspace. Returns an unsubscribe function.
|
|
3010
|
+
* @param callback Callback function for handling the event.
|
|
2303
3011
|
*/
|
|
2304
3012
|
onRemoved(callback: () => void): Promise<Unsubscribe>;
|
|
2305
3013
|
|
|
2306
3014
|
/**
|
|
2307
|
-
* Notifies when
|
|
2308
|
-
* @param callback Callback function
|
|
3015
|
+
* Notifies when the lock settings of the window have changed. Returns an unsubscribe function.
|
|
3016
|
+
* @param callback Callback function for handling the event. Receives as an argument the new lock settings.
|
|
2309
3017
|
*/
|
|
2310
3018
|
onLockConfigurationChanged(callback: (config: IOConnectWorkspaces.WorkspaceWindowLockConfig) => void): Promise<IOConnectWorkspaces.Unsubscribe>
|
|
2311
3019
|
|
|
@@ -2319,94 +3027,114 @@ export namespace IOConnectWorkspaces {
|
|
|
2319
3027
|
onTabReordered(callback: () => void): Promise<IOConnectWorkspaces.Unsubscribe>;
|
|
2320
3028
|
}
|
|
2321
3029
|
|
|
2322
|
-
/**
|
|
3030
|
+
/**
|
|
3031
|
+
* Describes a builder for creating Workspaces.
|
|
3032
|
+
*/
|
|
2323
3033
|
export interface WorkspaceBuilder {
|
|
2324
3034
|
/**
|
|
2325
|
-
* Adds a new row to the
|
|
2326
|
-
* @param
|
|
3035
|
+
* Adds a new row to the Workspace. Returns a builder for the new row.
|
|
3036
|
+
* @param definition Definition for the row.
|
|
2327
3037
|
*/
|
|
2328
3038
|
addRow(definition?: BoxDefinition): BoxBuilder;
|
|
2329
3039
|
|
|
2330
3040
|
/**
|
|
2331
|
-
* Adds a new column to the
|
|
2332
|
-
* @param
|
|
3041
|
+
* Adds a new column to the Workspace. Returns a builder for the new column.
|
|
3042
|
+
* @param definition Definition for the column.
|
|
2333
3043
|
*/
|
|
2334
3044
|
addColumn(definition?: BoxDefinition): BoxBuilder;
|
|
2335
3045
|
|
|
2336
3046
|
/**
|
|
2337
|
-
* Adds a new group to the
|
|
2338
|
-
* @param
|
|
3047
|
+
* Adds a new window group to the Workspace. Returns a builder for the new window group.
|
|
3048
|
+
* @param definition Definition for the window group.
|
|
2339
3049
|
*/
|
|
2340
3050
|
addGroup(definition?: BoxDefinition): BoxBuilder;
|
|
2341
3051
|
|
|
2342
3052
|
/**
|
|
2343
|
-
* Adds a new window to the
|
|
2344
|
-
* @param
|
|
3053
|
+
* Adds a new window to the Workspace. Returns the Workspace builder.
|
|
3054
|
+
* @param definition Definition for the window.
|
|
2345
3055
|
*/
|
|
2346
3056
|
addWindow(definition: WorkspaceWindowDefinition): WorkspaceBuilder;
|
|
2347
3057
|
|
|
2348
3058
|
/**
|
|
2349
|
-
* Creates a new
|
|
2350
|
-
* @param config
|
|
3059
|
+
* Creates a new Workspace using the builder as a blueprint for its structure and contents.
|
|
3060
|
+
* @param config Settings for creating the Workspace.
|
|
2351
3061
|
*/
|
|
2352
3062
|
create(config?: WorkspaceCreateConfig): Promise<Workspace>;
|
|
2353
3063
|
}
|
|
2354
3064
|
|
|
2355
|
-
/**
|
|
3065
|
+
/**
|
|
3066
|
+
* Describes a builder for creating box elements.
|
|
3067
|
+
*/
|
|
2356
3068
|
export interface BoxBuilder {
|
|
2357
3069
|
/**
|
|
2358
|
-
* Adds a new row to the
|
|
2359
|
-
* @param
|
|
3070
|
+
* Adds a new row to the box element. Returns a builder for the new row.
|
|
3071
|
+
* @param definition Definition for the row.
|
|
2360
3072
|
*/
|
|
2361
3073
|
addRow(definition?: BoxDefinition): BoxBuilder;
|
|
2362
3074
|
|
|
2363
3075
|
/**
|
|
2364
|
-
* Adds a new column to the
|
|
2365
|
-
* @param
|
|
3076
|
+
* Adds a new column to the box element. Returns a builder for the new column.
|
|
3077
|
+
* @param definition Definition for the column.
|
|
2366
3078
|
*/
|
|
2367
3079
|
addColumn(definition?: BoxDefinition): BoxBuilder;
|
|
2368
3080
|
|
|
2369
3081
|
/**
|
|
2370
|
-
* Adds a new group to the
|
|
2371
|
-
* @param
|
|
3082
|
+
* Adds a new window group to the box element. Returns a builder for the new window group.
|
|
3083
|
+
* @param definition Definition for the window group.
|
|
2372
3084
|
*/
|
|
2373
3085
|
addGroup(definition?: BoxDefinition): BoxBuilder;
|
|
2374
3086
|
|
|
2375
3087
|
/**
|
|
2376
|
-
* Adds a new window to the
|
|
2377
|
-
* @param
|
|
3088
|
+
* Adds a new window to the box element. Returns the builder for the box element.
|
|
3089
|
+
* @param definition Definition for the window.
|
|
2378
3090
|
*/
|
|
2379
3091
|
addWindow(definition: WorkspaceWindowDefinition): BoxBuilder;
|
|
2380
3092
|
|
|
2381
3093
|
/**
|
|
2382
|
-
* Returns
|
|
3094
|
+
* Returns an object describing the full structure of the box element.
|
|
2383
3095
|
*/
|
|
2384
3096
|
serialize(): BoxDefinition;
|
|
2385
3097
|
}
|
|
2386
3098
|
|
|
2387
|
-
/**
|
|
3099
|
+
/**
|
|
3100
|
+
* Options for saving a Workspace as a Workspace Layout.
|
|
3101
|
+
*/
|
|
2388
3102
|
export interface WorkspaceLayoutSaveConfig {
|
|
3103
|
+
/**
|
|
3104
|
+
* ID for the Workspace Layout.
|
|
3105
|
+
* *Available only in **io.Connect Desktop**.*
|
|
3106
|
+
* @since io.Connect Desktop 10.5
|
|
3107
|
+
* @since @interopio/workspaces-api 5.0.0
|
|
3108
|
+
*/
|
|
2389
3109
|
id?: string;
|
|
3110
|
+
|
|
2390
3111
|
/**
|
|
2391
|
-
*
|
|
3112
|
+
* Name for the Workspace Layout.
|
|
2392
3113
|
*/
|
|
2393
3114
|
name: string;
|
|
2394
3115
|
|
|
2395
3116
|
/**
|
|
2396
|
-
*
|
|
3117
|
+
* ID of the Workspace whose structure will be saved as a Workspace Layout.
|
|
2397
3118
|
*/
|
|
2398
3119
|
workspaceId: string;
|
|
2399
3120
|
|
|
2400
|
-
/**
|
|
3121
|
+
/**
|
|
3122
|
+
* If `true`, the current Workspace context will be saved in the Workspace Layout.
|
|
3123
|
+
*/
|
|
2401
3124
|
saveContext?: boolean;
|
|
2402
3125
|
|
|
2403
3126
|
/**
|
|
2404
3127
|
* If `true`, will allow opening multiple instances of the same Workspace simultaneously.
|
|
2405
3128
|
* @default true
|
|
3129
|
+
* @since io.Connect Desktop 9.8
|
|
3130
|
+
* @since io.Connect Browser 3.5
|
|
3131
|
+
* @since @interopio/workspaces-api 3.5.5
|
|
2406
3132
|
*/
|
|
2407
3133
|
allowMultiple?: boolean;
|
|
2408
3134
|
|
|
2409
|
-
/**
|
|
3135
|
+
/**
|
|
3136
|
+
* Metadata that will be saved as part of the Workspace Layout.
|
|
3137
|
+
*/
|
|
2410
3138
|
metadata?: object;
|
|
2411
3139
|
|
|
2412
3140
|
/**
|
|
@@ -2418,59 +3146,108 @@ export namespace IOConnectWorkspaces {
|
|
|
2418
3146
|
* *Available only in **io.Connect Browser**.*
|
|
2419
3147
|
* @default false
|
|
2420
3148
|
* @since io.Connect Browser 4.4
|
|
3149
|
+
* @since @interopio/workspaces-api 4.4
|
|
2421
3150
|
*/
|
|
2422
3151
|
saveWindowContexts?: boolean;
|
|
2423
3152
|
}
|
|
2424
3153
|
|
|
2425
|
-
/**
|
|
3154
|
+
/**
|
|
3155
|
+
* Options for saving a Workspace as a Workspace Layout by ID.
|
|
3156
|
+
* When Layout sharing is enabled, each Workspace Layout has a unique ID and Workspace Layout names aren't guaranteed to be unique.
|
|
3157
|
+
* *Available only in **io.Connect Desktop**.*
|
|
3158
|
+
* @since io.Connect Desktop 10.5
|
|
3159
|
+
* @since @interopio/workspaces-api 5.0.0
|
|
3160
|
+
*/
|
|
2426
3161
|
export interface WorkspaceLayoutSaveByIdConfig extends WorkspaceLayoutSaveConfig {
|
|
2427
3162
|
/**
|
|
2428
|
-
*
|
|
3163
|
+
* Uniques ID of an existing Workspace Layout to be overwritten with the structure of the current Workspace.
|
|
3164
|
+
* The Workspace Layout with the specified ID must exist, otherwise the operation will fail.
|
|
2429
3165
|
*/
|
|
2430
3166
|
id?: string;
|
|
2431
3167
|
}
|
|
2432
3168
|
|
|
3169
|
+
/**
|
|
3170
|
+
* Settings for the maximization boundary of a box element.
|
|
3171
|
+
*/
|
|
2433
3172
|
export interface SetMaximizationBoundaryConfig {
|
|
2434
3173
|
/**
|
|
2435
|
-
*
|
|
3174
|
+
* If `true`, the box element will act as a maximization boundary.
|
|
2436
3175
|
*/
|
|
2437
3176
|
enabled: boolean;
|
|
2438
3177
|
}
|
|
2439
3178
|
|
|
2440
|
-
/**
|
|
3179
|
+
/**
|
|
3180
|
+
* Describes the state of a `Frame` instance at the time of taking the snapshot.
|
|
3181
|
+
*/
|
|
2441
3182
|
export interface FrameSnapshot {
|
|
2442
3183
|
/**
|
|
2443
|
-
*
|
|
3184
|
+
* Unique ID of the `Frame` instance.
|
|
2444
3185
|
*/
|
|
2445
3186
|
id: string;
|
|
2446
3187
|
|
|
3188
|
+
/**
|
|
3189
|
+
* Array of objects, each describing the state of a Workspace in the `Frame` instance.
|
|
3190
|
+
*/
|
|
2447
3191
|
workspaces: WorkspaceSnapshot[];
|
|
2448
3192
|
|
|
3193
|
+
/**
|
|
3194
|
+
* Settings of the `Frame` instance.
|
|
3195
|
+
*/
|
|
2449
3196
|
config: any;
|
|
2450
3197
|
}
|
|
2451
3198
|
|
|
2452
3199
|
/**
|
|
2453
|
-
* Describes the data passed to the callback for handling the event which fires when a Frame is about to be closed.
|
|
3200
|
+
* Describes the data passed to the callback for handling the event which fires when a `Frame` instance is about to be closed.
|
|
2454
3201
|
*/
|
|
2455
3202
|
export interface FrameClosingData {
|
|
2456
3203
|
/**
|
|
2457
|
-
* Function that can be used to prevent closing a Frame.
|
|
3204
|
+
* Function that can be used to prevent closing a `Frame` instance.
|
|
2458
3205
|
*/
|
|
2459
3206
|
prevent: () => void;
|
|
2460
3207
|
}
|
|
2461
3208
|
|
|
3209
|
+
/**
|
|
3210
|
+
* Describes the data passed to the callback for handling the event which fires when a `Frame` instance has been closed.
|
|
3211
|
+
*/
|
|
2462
3212
|
export interface FrameClosedData {
|
|
3213
|
+
/**
|
|
3214
|
+
* ID of the closed `Frame` instance.
|
|
3215
|
+
*/
|
|
2463
3216
|
frameId: string;
|
|
3217
|
+
|
|
3218
|
+
/**
|
|
3219
|
+
* Bounds of the closed `Frame` instance.
|
|
3220
|
+
*/
|
|
2464
3221
|
frameBounds?: FrameBounds;
|
|
2465
3222
|
}
|
|
2466
3223
|
|
|
3224
|
+
/**
|
|
3225
|
+
* Describes the data passed to the callback for handling the event which fires when the `Frame` instance or a window in it has gained or lost focus.
|
|
3226
|
+
*/
|
|
2467
3227
|
export interface FrameFocusChangedData {
|
|
3228
|
+
/**
|
|
3229
|
+
* Flag indicating whether the `Frame` instance is on focus.
|
|
3230
|
+
*/
|
|
2468
3231
|
isFocused: boolean;
|
|
2469
3232
|
}
|
|
2470
3233
|
|
|
3234
|
+
/**
|
|
3235
|
+
* Describes the data passed to the callback for handling the event which fires when a Workspace has been closed.
|
|
3236
|
+
*/
|
|
2471
3237
|
export interface WorkspaceClosedData {
|
|
3238
|
+
/**
|
|
3239
|
+
* ID of the `Frame` instance that contained the closed Workspace.
|
|
3240
|
+
*/
|
|
2472
3241
|
frameId: string;
|
|
3242
|
+
|
|
3243
|
+
/**
|
|
3244
|
+
* ID of the closed Workspace.
|
|
3245
|
+
*/
|
|
2473
3246
|
workspaceId: string;
|
|
3247
|
+
|
|
3248
|
+
/**
|
|
3249
|
+
* Bounds of the `Frame` instance that contained the closed Workspace.
|
|
3250
|
+
*/
|
|
2474
3251
|
frameBounds?: FrameBounds;
|
|
2475
3252
|
}
|
|
2476
3253
|
|
|
@@ -2484,224 +3261,237 @@ export namespace IOConnectWorkspaces {
|
|
|
2484
3261
|
base64Image: string;
|
|
2485
3262
|
}
|
|
2486
3263
|
|
|
2487
|
-
/**
|
|
3264
|
+
/**
|
|
3265
|
+
* Describes the state of a Workspace at the time of taking the snapshot.
|
|
3266
|
+
*/
|
|
2488
3267
|
export interface WorkspaceSnapshot extends WorkspaceLayoutComponentState {
|
|
2489
3268
|
/**
|
|
2490
|
-
*
|
|
3269
|
+
* Unique ID of the Workspace.
|
|
2491
3270
|
*/
|
|
2492
3271
|
id: string;
|
|
2493
3272
|
}
|
|
2494
3273
|
|
|
2495
|
-
/**
|
|
3274
|
+
/**
|
|
3275
|
+
* Workspaces Layouts API for saving, deleting, exporting, and importing Workspace Layouts.
|
|
3276
|
+
*/
|
|
2496
3277
|
export interface WorkspaceLayoutsAPI {
|
|
2497
3278
|
/**
|
|
2498
|
-
*
|
|
2499
|
-
* This is helpful in cases where a simple query of existing layouts is needed without the complexity of transmitting the full layouts structure.
|
|
3279
|
+
* Retrieves the summaries of all Workspace Layouts without the extensive data describing their structure.
|
|
2500
3280
|
*/
|
|
2501
3281
|
getSummaries(): Promise<WorkspaceLayoutSummary[]>;
|
|
2502
3282
|
|
|
2503
3283
|
/**
|
|
2504
|
-
* Deletes a
|
|
2505
|
-
* @param name
|
|
3284
|
+
* Deletes a Workspace Layout. In **io.Connect Browser**, the operation will fail if you try to delete a read-only Workspace Layout.
|
|
3285
|
+
* @param name Name of the Workspace Layout to delete.
|
|
2506
3286
|
*/
|
|
2507
3287
|
delete(name: string): Promise<void>;
|
|
2508
3288
|
|
|
2509
3289
|
/**
|
|
2510
|
-
* Deletes a
|
|
2511
|
-
*
|
|
3290
|
+
* Deletes a Workspace Layout by its unique ID.
|
|
3291
|
+
* Use this method instead of `delete()` when Layout sharing is enabled and Workspace Layout names aren't guaranteed to be unique.
|
|
3292
|
+
* *Available only in **io.Connect Desktop**.*
|
|
3293
|
+
* @param layoutId Unique ID of the Workspace Layout to delete.
|
|
3294
|
+
* @since io.Connect Desktop 10.5
|
|
3295
|
+
* @since @interopio/workspaces-api 5.0.0
|
|
2512
3296
|
*/
|
|
2513
3297
|
deleteById(layoutId: string): Promise<void>;
|
|
2514
3298
|
|
|
2515
3299
|
/**
|
|
2516
|
-
*
|
|
2517
|
-
*
|
|
3300
|
+
* Retrieves all Workspace Layouts, including their structure, that satisfy the provided predicate.
|
|
3301
|
+
* If no predicate is provided, will return all Workspace Layouts.
|
|
3302
|
+
* @param predicate Filtering function (predicate) that will be invoked for each Workspace Layout.
|
|
2518
3303
|
*/
|
|
2519
3304
|
export(predicate?: (layout: WorkspaceLayout) => boolean): Promise<WorkspaceLayout[]>;
|
|
2520
3305
|
|
|
2521
3306
|
/**
|
|
2522
|
-
*
|
|
2523
|
-
*
|
|
3307
|
+
* Imports one or more Workspace Layouts. In **io.Connect Browser**, the operation will fail if the name of an imported Workspace Layout
|
|
3308
|
+
* matches the name of a read-only Workspace Layout.
|
|
3309
|
+
* @param layouts Array of Workspace Layouts to import.
|
|
3310
|
+
* @param mode Mode for importing the Workspace Layouts. Use `"replace"` to remove all existing Workspace Layouts and replace them
|
|
3311
|
+
* with the imported ones, or `"merge"` to merge the imported Workspace Layouts with the existing ones.
|
|
2524
3312
|
*/
|
|
2525
3313
|
import(layouts: WorkspaceLayout[], mode?: "replace" | "merge"): Promise<void>;
|
|
2526
3314
|
|
|
2527
3315
|
/**
|
|
2528
|
-
* Saves an
|
|
2529
|
-
* @param config
|
|
3316
|
+
* Saves an open Workspace as a Workspace Layout.
|
|
3317
|
+
* @param config Options for saving the Workspace Layout.
|
|
2530
3318
|
*/
|
|
2531
3319
|
save(config: WorkspaceLayoutSaveConfig): Promise<WorkspaceLayout>;
|
|
2532
3320
|
|
|
2533
3321
|
/**
|
|
2534
|
-
*
|
|
2535
|
-
*
|
|
2536
|
-
*
|
|
3322
|
+
* Saves an open Workspace as a Workspace Layout.
|
|
3323
|
+
* Use this method instead of `save()` when Layout sharing is enabled and Workspace Layout names aren't guaranteed to be unique.
|
|
3324
|
+
* *Available only in **io.Connect Desktop**.*
|
|
3325
|
+
* @param config Options for saving the Workspace Layout.
|
|
3326
|
+
* @since io.Connect Desktop 10.5
|
|
3327
|
+
* @since @interopio/workspaces-api 5.0.0
|
|
2537
3328
|
*/
|
|
2538
3329
|
saveById(config: WorkspaceLayoutSaveByIdConfig): Promise<WorkspaceLayout>;
|
|
2539
3330
|
|
|
2540
3331
|
/**
|
|
2541
|
-
* Notifies when a
|
|
2542
|
-
*
|
|
3332
|
+
* Notifies when a Workspace Layout has been saved. Returns an unsubscribe function.
|
|
3333
|
+
* The event will fire both when a new Workspace Layout has been saved and when an existing one has been updated.
|
|
3334
|
+
* @param callback Callback function for handling the event. Receives as an argument the saved Workspace Layout.
|
|
2543
3335
|
*/
|
|
2544
3336
|
onSaved(callback: (layout: WorkspaceLayout) => void): Promise<Unsubscribe>;
|
|
2545
3337
|
|
|
2546
3338
|
/**
|
|
2547
|
-
* Notifies when a
|
|
2548
|
-
* @param callback Callback function
|
|
3339
|
+
* Notifies when a Workspace Layout has been removed. Returns an unsubscribe function.
|
|
3340
|
+
* @param callback Callback function for handling the event. Receives as an argument the removed Workspace Layout.
|
|
2549
3341
|
*/
|
|
2550
3342
|
onRemoved(callback: (layout: WorkspaceLayout) => void): Promise<Unsubscribe>;
|
|
2551
3343
|
}
|
|
2552
3344
|
|
|
2553
3345
|
/**
|
|
3346
|
+
* Workspaces API.
|
|
2554
3347
|
* @docmenuorder 1
|
|
2555
3348
|
*/
|
|
2556
3349
|
export interface API {
|
|
2557
3350
|
/**
|
|
2558
|
-
* Checks whether
|
|
3351
|
+
* Checks whether the current window is in a Workspace.
|
|
2559
3352
|
*/
|
|
2560
3353
|
inWorkspace(): Promise<boolean>;
|
|
2561
3354
|
|
|
2562
3355
|
/**
|
|
2563
|
-
*
|
|
2564
|
-
*
|
|
2565
|
-
* @param config An object describing the type of the requested builder, alongside other settings.
|
|
3356
|
+
* Retrieves a builder for creating a Workspace or a box element, depending on the type specified in the provided options.
|
|
3357
|
+
* @param config Options for the builder.
|
|
2566
3358
|
*/
|
|
2567
3359
|
getBuilder(config: BuilderConfig): WorkspaceBuilder | BoxBuilder;
|
|
2568
3360
|
|
|
2569
3361
|
/**
|
|
2570
|
-
*
|
|
3362
|
+
* Retrieves the `Frame` instance of the current window. Will throw an error if the current window isn't part of a Workspace.
|
|
2571
3363
|
*/
|
|
2572
3364
|
getMyFrame(): Promise<Frame>;
|
|
2573
3365
|
|
|
2574
3366
|
/**
|
|
2575
|
-
*
|
|
2576
|
-
* @param predicate
|
|
3367
|
+
* Retrieves the first `Frame` instance that satisfies the provided predicate, or `undefined` if none does.
|
|
3368
|
+
* @param predicate Filtering function (predicate) that will be invoked for each open `Frame` instance.
|
|
2577
3369
|
*/
|
|
2578
3370
|
getFrame(predicate: (frame: Frame) => boolean): Promise<Frame | undefined>;
|
|
2579
3371
|
|
|
2580
3372
|
/**
|
|
2581
|
-
*
|
|
2582
|
-
* @param predicate
|
|
3373
|
+
* Retrieves all `Frame` instances that satisfy the provided predicate. If no predicate is provided, will return all `Frame` instances.
|
|
3374
|
+
* @param predicate Filtering function (predicate) that will be invoked for each open `Frame` instance.
|
|
2583
3375
|
*/
|
|
2584
3376
|
getAllFrames(predicate?: (frame: Frame) => boolean): Promise<Frame[]>;
|
|
2585
3377
|
|
|
2586
3378
|
/**
|
|
2587
|
-
*
|
|
2588
|
-
* This function was designed for easy and quick listing of existing workspaces without adding the complexity of transmitting the entire structure of each workspace.
|
|
3379
|
+
* Retrieves the summaries of all open Workspaces without the extensive data describing their structure.
|
|
2589
3380
|
*/
|
|
2590
3381
|
getAllWorkspacesSummaries(): Promise<WorkspaceSummary[]>;
|
|
2591
3382
|
|
|
2592
3383
|
/**
|
|
2593
|
-
*
|
|
2594
|
-
* Throws an error if the calling window is not not part of any workspace.
|
|
3384
|
+
* Retrieves the Workspace of the current window. Will throw an error if the current window isn't part of a Workspace.
|
|
2595
3385
|
*/
|
|
2596
3386
|
getMyWorkspace(): Promise<Workspace>;
|
|
2597
3387
|
|
|
2598
3388
|
/**
|
|
2599
|
-
*
|
|
2600
|
-
* @param predicate
|
|
3389
|
+
* Retrieves the first Workspace that satisfies the provided predicate, or `undefined` if none does.
|
|
3390
|
+
* @param predicate Filtering function (predicate) that will be invoked for each open Workspace.
|
|
2601
3391
|
*/
|
|
2602
3392
|
getWorkspace(predicate: (workspace: Workspace) => boolean): Promise<Workspace | undefined>;
|
|
2603
3393
|
|
|
2604
3394
|
/**
|
|
2605
|
-
*
|
|
2606
|
-
* @param workspaceId
|
|
3395
|
+
* Retrieves a Workspace by its ID. Performs better than `getWorkspace()` when searching for a Workspace by ID.
|
|
3396
|
+
* @param workspaceId ID of the Workspace to retrieve.
|
|
2607
3397
|
*/
|
|
2608
3398
|
getWorkspaceById(workspaceId: string): Promise<Workspace>;
|
|
2609
3399
|
|
|
2610
3400
|
/**
|
|
2611
|
-
*
|
|
2612
|
-
* @param predicate
|
|
3401
|
+
* Retrieves all Workspaces that satisfy the provided predicate. If no predicate is provided, will return all Workspaces.
|
|
3402
|
+
* @param predicate Filtering function (predicate) that will be invoked for each open Workspace.
|
|
2613
3403
|
*/
|
|
2614
3404
|
getAllWorkspaces(predicate?: (workspace: Workspace) => boolean): Promise<Workspace[]>;
|
|
2615
3405
|
|
|
2616
3406
|
/**
|
|
2617
|
-
*
|
|
2618
|
-
*
|
|
2619
|
-
* @param predicate A filtering function (predicate) called for each window in each open workspace.
|
|
3407
|
+
* Retrieves the first Workspace window that satisfies the provided predicate. Will search recursively in all open Workspaces.
|
|
3408
|
+
* @param predicate Filtering function (predicate) that will be invoked for each window in each open Workspace.
|
|
2620
3409
|
*/
|
|
2621
3410
|
getWindow(predicate: (workspaceWindow: WorkspaceWindow) => boolean): Promise<WorkspaceWindow | undefined>;
|
|
2622
3411
|
|
|
2623
3412
|
/**
|
|
2624
|
-
*
|
|
2625
|
-
*
|
|
2626
|
-
* @param predicate A filtering function (predicate) called for each box in each open workspace.
|
|
3413
|
+
* Retrieves the first box element that satisfies the provided predicate. Will search recursively in all open Workspaces.
|
|
3414
|
+
* @param predicate Filtering function (predicate) that will be invoked for each box element in each open Workspace.
|
|
2627
3415
|
*/
|
|
2628
3416
|
getBox(predicate: (box: WorkspaceBox) => boolean): Promise<WorkspaceBox | undefined>;
|
|
2629
3417
|
|
|
2630
3418
|
/**
|
|
2631
|
-
*
|
|
2632
|
-
* @param name
|
|
2633
|
-
* @param options
|
|
3419
|
+
* Restores a Workspace from a previously saved Workspace Layout.
|
|
3420
|
+
* @param name Name of the Workspace Layout to restore.
|
|
3421
|
+
* @param options Options for restoring the Workspace.
|
|
2634
3422
|
*/
|
|
2635
3423
|
restoreWorkspace(name: string, options?: RestoreWorkspaceConfig): Promise<Workspace>;
|
|
2636
3424
|
|
|
2637
3425
|
/**
|
|
2638
|
-
*
|
|
2639
|
-
*
|
|
3426
|
+
* Restores a Workspace from a previously saved Workspace Layout by the unique ID of the Layout.
|
|
3427
|
+
* Use this method instead of `restoreWorkspace()` when Layout sharing is enabled and Workspace Layout names aren't guaranteed to be unique.
|
|
3428
|
+
* *Available only in **io.Connect Desktop**.*
|
|
3429
|
+
* @param options Options for restoring the Workspace.
|
|
3430
|
+
* @since io.Connect Desktop 10.5
|
|
3431
|
+
* @since @interopio/workspaces-api 5.0.0
|
|
2640
3432
|
*/
|
|
2641
3433
|
restoreWorkspaceById(options: RestoreWorkspaceByIdConfig): Promise<Workspace>;
|
|
2642
3434
|
|
|
2643
3435
|
/**
|
|
2644
|
-
*
|
|
2645
|
-
* @param definition
|
|
2646
|
-
* @param saveConfig
|
|
3436
|
+
* Creates a new Workspace based on the provided definition.
|
|
3437
|
+
* @param definition Definition for the Workspace.
|
|
3438
|
+
* @param saveConfig Settings for creating the Workspace.
|
|
2647
3439
|
*/
|
|
2648
3440
|
createWorkspace(definition: WorkspaceDefinition, saveConfig?: WorkspaceCreateConfig): Promise<Workspace>;
|
|
2649
3441
|
|
|
2650
3442
|
/**
|
|
2651
|
-
*
|
|
2652
|
-
* @param definition
|
|
3443
|
+
* Creates an empty `Frame` instance with no Workspaces in it.
|
|
3444
|
+
* @param definition Definition for the empty `Frame` instance.
|
|
2653
3445
|
*/
|
|
2654
3446
|
createEmptyFrame(definition?: EmptyFrameDefinition): Promise<IOConnectWorkspaces.Frame>;
|
|
2655
3447
|
|
|
2656
3448
|
/**
|
|
2657
|
-
*
|
|
2658
|
-
*
|
|
2659
|
-
*
|
|
2660
|
-
* @param id
|
|
3449
|
+
* Waits for the `Frame` instance with the specified ID to be loaded.
|
|
3450
|
+
* Use this method in a custom Workspaces App when you have the ID of the `Frame` instance, but the `Frame` instance isn't available in the API yet
|
|
3451
|
+
* (e.g., when the `Frame` instance is in the pool).
|
|
3452
|
+
* @param id ID of the `Frame` instance.
|
|
2661
3453
|
*/
|
|
2662
3454
|
waitForFrame(id: string): Promise<Frame>;
|
|
2663
3455
|
|
|
2664
3456
|
/**
|
|
2665
|
-
*
|
|
3457
|
+
* Workspaces Layouts API for saving, deleting, exporting, and importing Workspace Layouts.
|
|
2666
3458
|
*/
|
|
2667
3459
|
layouts: WorkspaceLayoutsAPI;
|
|
2668
3460
|
|
|
2669
3461
|
/**
|
|
2670
|
-
* Notifies when a new
|
|
2671
|
-
* @param callback Callback function
|
|
3462
|
+
* Notifies when a new `Frame` instance has been opened. Returns an unsubscribe function.
|
|
3463
|
+
* @param callback Callback function for handling the event. Receives as an argument the opened `Frame` instance.
|
|
2672
3464
|
*/
|
|
2673
3465
|
onFrameOpened(callback: (frame: Frame) => void): Promise<Unsubscribe>;
|
|
2674
3466
|
|
|
2675
3467
|
/**
|
|
2676
|
-
* Notifies when a
|
|
2677
|
-
* @param callback Callback function
|
|
3468
|
+
* Notifies when a `Frame` instance has been closed. Returns an unsubscribe function.
|
|
3469
|
+
* @param callback Callback function for handling the event. Receives as an argument an object describing the closed `Frame` instance.
|
|
2678
3470
|
*/
|
|
2679
3471
|
onFrameClosed(callback: (closed: FrameClosedData) => void): Promise<Unsubscribe>;
|
|
2680
3472
|
|
|
2681
3473
|
/**
|
|
2682
|
-
* Notifies when a new
|
|
2683
|
-
* @param callback Callback function
|
|
3474
|
+
* Notifies when a new Workspace has been opened in any `Frame` instance. Returns an unsubscribe function.
|
|
3475
|
+
* @param callback Callback function for handling the event. Receives as an argument the `Workspace` object describing the opened Workspace.
|
|
2684
3476
|
*/
|
|
2685
3477
|
onWorkspaceOpened(callback: (workspace: Workspace) => void): Promise<Unsubscribe>;
|
|
2686
3478
|
|
|
2687
3479
|
/**
|
|
2688
|
-
* Notifies when a
|
|
2689
|
-
* @param callback Callback function
|
|
3480
|
+
* Notifies when a Workspace in any `Frame` instance has been closed. Returns an unsubscribe function.
|
|
3481
|
+
* @param callback Callback function for handling the event. Receives as an argument an object describing the closed Workspace.
|
|
2690
3482
|
*/
|
|
2691
3483
|
onWorkspaceClosed(callback: (closed: WorkspaceClosedData) => void): Promise<Unsubscribe>;
|
|
2692
3484
|
|
|
2693
3485
|
/**
|
|
2694
|
-
* Notifies when a Workspace
|
|
2695
|
-
*
|
|
2696
|
-
* Returns an unsubscribe function.
|
|
3486
|
+
* Notifies when a Workspace has been hibernated. Returns an unsubscribe function.
|
|
3487
|
+
* The event will fire for any Workspace hibernated in any running instance of a Workspaces App.
|
|
2697
3488
|
* @param callback Callback function for handling the event. Receives as an argument the `Workspace` object describing the hibernated Workspace.
|
|
2698
3489
|
*/
|
|
2699
3490
|
onWorkspaceHibernated(callback: (workspace: IOConnectWorkspaces.Workspace) => void): Promise<IOConnectWorkspaces.Unsubscribe>;
|
|
2700
3491
|
|
|
2701
3492
|
/**
|
|
2702
|
-
* Notifies when a Workspace
|
|
2703
|
-
*
|
|
2704
|
-
* Returns an unsubscribe function.
|
|
3493
|
+
* Notifies when a Workspace has been resumed after being hibernated. Returns an unsubscribe function.
|
|
3494
|
+
* The event will fire for any Workspace resumed in any running instance of a Workspaces App.
|
|
2705
3495
|
* @param callback Callback function for handling the event. Receives as an argument the `Workspace` object describing the resumed Workspace.
|
|
2706
3496
|
*/
|
|
2707
3497
|
onWorkspaceResumed(callback: (workspace: IOConnectWorkspaces.Workspace) => void): Promise<IOConnectWorkspaces.Unsubscribe>;
|
|
@@ -2714,43 +3504,44 @@ export namespace IOConnectWorkspaces {
|
|
|
2714
3504
|
* @since @interopio/workspaces-api 4.4
|
|
2715
3505
|
*/
|
|
2716
3506
|
onWorkspaceTabReordered(callback: (workspace: IOConnectWorkspaces.Workspace) => void): Promise<IOConnectWorkspaces.Unsubscribe>;
|
|
3507
|
+
|
|
2717
3508
|
/**
|
|
2718
|
-
* Notifies when a new window
|
|
2719
|
-
* An added window
|
|
2720
|
-
* @param callback Callback function
|
|
3509
|
+
* Notifies when a new window has been added to any Workspace in any `Frame` instance. Returns an unsubscribe function.
|
|
3510
|
+
* An added window has a place in the Workspace (it's a valid Workspace element), but this doesn't guarantee that the contents of the window have been loaded.
|
|
3511
|
+
* @param callback Callback function for handling the event. Receives as an argument the `WorkspaceWindow` object describing the added window.
|
|
2721
3512
|
*/
|
|
2722
3513
|
onWindowAdded(callback: (workspaceWindow: WorkspaceWindow) => void): Promise<Unsubscribe>;
|
|
2723
3514
|
|
|
2724
3515
|
/**
|
|
2725
|
-
* Notifies when
|
|
2726
|
-
* A loaded window is a window
|
|
2727
|
-
* @param callback Callback function
|
|
3516
|
+
* Notifies when the contents of a window in any Workspace in any `Frame` instance have been loaded. Returns an unsubscribe function.
|
|
3517
|
+
* A loaded window is a window that has been added to a Workspace, whose contents have been loaded, and which is present in the windows collection.
|
|
3518
|
+
* @param callback Callback function for handling the event. Receives as an argument the `WorkspaceWindow` object describing the loaded window.
|
|
2728
3519
|
*/
|
|
2729
3520
|
onWindowLoaded(callback: (workspaceWindow: WorkspaceWindow) => void): Promise<Unsubscribe>;
|
|
2730
3521
|
|
|
2731
3522
|
/**
|
|
2732
|
-
* Notifies when a window
|
|
2733
|
-
* @param callback Callback function
|
|
3523
|
+
* Notifies when a window has been removed from any Workspace in any `Frame` instance. Returns an unsubscribe function.
|
|
3524
|
+
* @param callback Callback function for handling the event. Receives as an argument an object with the IDs of the removed window and of its Workspace and `Frame` instance.
|
|
2734
3525
|
*/
|
|
2735
3526
|
onWindowRemoved(callback: (removed: { windowId?: string; workspaceId: string; frameId: string }) => void): Promise<Unsubscribe>;
|
|
2736
3527
|
|
|
2737
3528
|
/**
|
|
2738
|
-
* Notifies when a window
|
|
2739
|
-
*
|
|
2740
|
-
* @param callback Callback function
|
|
3529
|
+
* Notifies when a window in any Workspace in any `Frame` instance has been maximized. Returns an unsubscribe function.
|
|
3530
|
+
* The window can be maximized programmatically or by the user via the "Maximize" button.
|
|
3531
|
+
* @param callback Callback function for handling the event. Receives as an argument the `WorkspaceWindow` object describing the maximized window.
|
|
2741
3532
|
*/
|
|
2742
3533
|
onWindowMaximized(callback: (workspaceWindow: IOConnectWorkspaces.WorkspaceWindow) => void): Promise<IOConnectWorkspaces.Unsubscribe>;
|
|
2743
3534
|
|
|
2744
3535
|
/**
|
|
2745
|
-
* Notifies when a window
|
|
2746
|
-
*
|
|
2747
|
-
* @param callback Callback function
|
|
3536
|
+
* Notifies when a window in any Workspace in any `Frame` instance has been restored from a maximized state. Returns an unsubscribe function.
|
|
3537
|
+
* The window can be restored programmatically or by the user via the "Restore" button.
|
|
3538
|
+
* @param callback Callback function for handling the event. Receives as an argument the `WorkspaceWindow` object describing the restored window.
|
|
2748
3539
|
*/
|
|
2749
3540
|
onWindowRestored(callback: (workspaceWindow: IOConnectWorkspaces.WorkspaceWindow) => void): Promise<IOConnectWorkspaces.Unsubscribe>;
|
|
2750
3541
|
|
|
2751
3542
|
/**
|
|
2752
|
-
* Notifies when a window
|
|
2753
|
-
* @param callback Callback function
|
|
3543
|
+
* Notifies when a window in any Workspace in any `Frame` instance has been selected. Returns an unsubscribe function.
|
|
3544
|
+
* @param callback Callback function for handling the event. Receives as an argument the `WorkspaceWindow` object describing the selected window.
|
|
2754
3545
|
*/
|
|
2755
3546
|
onWindowSelected(callback: (workspaceWindow: IOConnectWorkspaces.WorkspaceWindow) => void): Promise<IOConnectWorkspaces.Unsubscribe>;
|
|
2756
3547
|
|
|
@@ -2763,7 +3554,9 @@ export namespace IOConnectWorkspaces {
|
|
|
2763
3554
|
*/
|
|
2764
3555
|
onWindowTabReordered(callback: (workspaceWindow: IOConnectWorkspaces.WorkspaceWindow) => void): Promise<IOConnectWorkspaces.Unsubscribe>;
|
|
2765
3556
|
|
|
2766
|
-
/**
|
|
3557
|
+
/**
|
|
3558
|
+
* Version of the Workspaces API.
|
|
3559
|
+
*/
|
|
2767
3560
|
version: string;
|
|
2768
3561
|
}
|
|
2769
3562
|
}
|