@interopio/workspaces-api 5.0.0-next.0 → 5.1.0-next.0
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 +10 -2
- 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 +1549 -703
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
|
|
|
@@ -488,71 +663,149 @@ export namespace IOConnectWorkspaces {
|
|
|
488
663
|
*/
|
|
489
664
|
allowSystemHibernation?: boolean;
|
|
490
665
|
|
|
666
|
+
/**
|
|
667
|
+
* Restrictions for dropping apps in the Workspace and allowing apps to appear in the "Add Apps" popup menu of the Workspace.
|
|
668
|
+
* @since io.Connect Desktop 10.5
|
|
669
|
+
* @since io.Connect Browser 4.6
|
|
670
|
+
* @since @interopio/workspaces-api 5.0.0
|
|
671
|
+
*/
|
|
491
672
|
appRestrictions?: AppRestrictions | undefined;
|
|
492
673
|
}
|
|
493
674
|
|
|
675
|
+
/**
|
|
676
|
+
* Describes the default restrictions for dropping apps in a Workspace and allowing apps to appear in the "Add Apps" popup menu of a Workspace.
|
|
677
|
+
* @since io.Connect Desktop 10.5
|
|
678
|
+
* @since io.Connect Browser 4.6
|
|
679
|
+
* @since @interopio/workspaces-api 5.0.0
|
|
680
|
+
*/
|
|
494
681
|
export interface AppRestrictionRule {
|
|
682
|
+
|
|
683
|
+
/**
|
|
684
|
+
* If `true`, will allow an app to appear in the "Add Apps" popup menu of a Workspace.
|
|
685
|
+
*/
|
|
495
686
|
allowInApplicationPopup?: boolean;
|
|
687
|
+
|
|
688
|
+
/**
|
|
689
|
+
* If `true`, will allow an app to be dropped in a Workspace.
|
|
690
|
+
* *Available only in **io.Connect Desktop**.*
|
|
691
|
+
*/
|
|
496
692
|
allowDrop?: boolean;
|
|
497
693
|
}
|
|
498
694
|
|
|
695
|
+
/**
|
|
696
|
+
* Describes the restrictions for dropping a specific app in a Workspace and allowing it to appear in the "Add Apps" popup menu of a Workspace.
|
|
697
|
+
* @since io.Connect Desktop 10.5
|
|
698
|
+
* @since io.Connect Browser 4.6
|
|
699
|
+
* @since @interopio/workspaces-api 5.0.0
|
|
700
|
+
*/
|
|
499
701
|
export interface AppRestrictionEntry extends AppRestrictionRule {
|
|
702
|
+
|
|
703
|
+
/**
|
|
704
|
+
* Name of the app, as defined within the io.Connect framework, for which to apply the specified restrictions.
|
|
705
|
+
*/
|
|
500
706
|
appName: string;
|
|
501
707
|
}
|
|
502
708
|
|
|
709
|
+
/**
|
|
710
|
+
* Describes the restrictions for dropping apps in a Workspace and allowing apps to appear in the "Add Apps" popup menu of a Workspace.
|
|
711
|
+
* @since io.Connect Desktop 10.5
|
|
712
|
+
* @since io.Connect Browser 4.6
|
|
713
|
+
* @since @interopio/workspaces-api 5.0.0
|
|
714
|
+
*/
|
|
503
715
|
export interface AppRestrictions {
|
|
716
|
+
|
|
717
|
+
/**
|
|
718
|
+
* Array of objects, each describing the restrictions for a specific app.
|
|
719
|
+
* The restrictions specified here will override the default restrictions specified via the `default` property.
|
|
720
|
+
*/
|
|
504
721
|
apps?: AppRestrictionEntry[];
|
|
722
|
+
|
|
723
|
+
/**
|
|
724
|
+
* Default restrictions that will be applied to all apps.
|
|
725
|
+
* The restrictions specified here can be overridden per app via the `apps` array.
|
|
726
|
+
*/
|
|
505
727
|
default?: AppRestrictionRule;
|
|
506
728
|
}
|
|
507
729
|
|
|
508
|
-
/**
|
|
730
|
+
/**
|
|
731
|
+
* Lock settings for a Workspace.
|
|
732
|
+
*/
|
|
509
733
|
export interface WorkspaceLockConfig {
|
|
510
|
-
/**
|
|
734
|
+
/**
|
|
735
|
+
* If `true`, will allow the user to resize the Workspace elements by dragging the splitters.
|
|
736
|
+
*/
|
|
511
737
|
allowSplitters?: boolean;
|
|
512
738
|
|
|
513
|
-
/**
|
|
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
|
+
*/
|
|
514
743
|
allowDrop?: boolean;
|
|
515
744
|
|
|
516
|
-
/**
|
|
745
|
+
/**
|
|
746
|
+
* If `true`, will allow the user to add windows by dropping them in the leftmost area of the Workspace.
|
|
747
|
+
*/
|
|
517
748
|
allowDropLeft?: boolean;
|
|
518
749
|
|
|
519
|
-
/**
|
|
750
|
+
/**
|
|
751
|
+
* If `true`, will allow the user to add windows by dropping them in the topmost area of the Workspace.
|
|
752
|
+
*/
|
|
520
753
|
allowDropTop?: boolean;
|
|
521
754
|
|
|
522
|
-
/**
|
|
755
|
+
/**
|
|
756
|
+
* If `true`, will allow the user to add windows by dropping them in the rightmost area of the Workspace.
|
|
757
|
+
*/
|
|
523
758
|
allowDropRight?: boolean;
|
|
524
759
|
|
|
525
|
-
/**
|
|
760
|
+
/**
|
|
761
|
+
* If `true`, will allow the user to add windows by dropping them in the bottommost area of the Workspace.
|
|
762
|
+
*/
|
|
526
763
|
allowDropBottom?: boolean;
|
|
527
764
|
|
|
528
|
-
/**
|
|
765
|
+
/**
|
|
766
|
+
* If `true`, will allow the user to extract (or rearrange) windows inside the Workspace.
|
|
767
|
+
*/
|
|
529
768
|
allowExtract?: boolean;
|
|
530
769
|
|
|
531
|
-
/**
|
|
770
|
+
/**
|
|
771
|
+
* If `true`, will allow the user to reorder windows in the Workspace.
|
|
772
|
+
*/
|
|
532
773
|
allowWindowReorder?: boolean;
|
|
533
774
|
|
|
534
|
-
/**
|
|
775
|
+
/**
|
|
776
|
+
* If `true`, will show the "Close" button in the Workspace tab.
|
|
777
|
+
*/
|
|
535
778
|
showCloseButton?: boolean;
|
|
536
779
|
|
|
537
|
-
/**
|
|
780
|
+
/**
|
|
781
|
+
* If `true`, will show the "Rename", "Save", and "Save As" options in the Workspace tab menu.
|
|
782
|
+
*/
|
|
538
783
|
showSaveButton?: boolean;
|
|
539
784
|
|
|
540
|
-
/**
|
|
785
|
+
/**
|
|
786
|
+
* If `true`, will allow the user to reorder the Workspace tab in the Workspaces App.
|
|
787
|
+
*/
|
|
541
788
|
allowWorkspaceTabReorder?: boolean;
|
|
542
789
|
|
|
543
790
|
/**
|
|
544
|
-
*
|
|
791
|
+
* If `true`, will allow the user to extract the Workspace tab from the Workspaces App.
|
|
545
792
|
* *Available only in **io.Connect Desktop**.*
|
|
546
793
|
*/
|
|
547
794
|
allowWorkspaceTabExtract?: boolean;
|
|
548
795
|
|
|
549
|
-
/**
|
|
796
|
+
/**
|
|
797
|
+
* If `true`, will show the "Add Window" buttons (the "+" buttons) in the headers of the window groups.
|
|
798
|
+
*/
|
|
550
799
|
showAddWindowButtons?: boolean;
|
|
551
800
|
|
|
552
|
-
/**
|
|
801
|
+
/**
|
|
802
|
+
* If `true`, will show the "Eject" buttons in the headers of the window groups.
|
|
803
|
+
*/
|
|
553
804
|
showEjectButtons?: boolean;
|
|
554
805
|
|
|
555
|
-
/**
|
|
806
|
+
/**
|
|
807
|
+
* If `true`, will show the "Close" buttons in the window tabs.
|
|
808
|
+
*/
|
|
556
809
|
showWindowCloseButtons?: boolean;
|
|
557
810
|
|
|
558
811
|
/**
|
|
@@ -562,211 +815,395 @@ export namespace IOConnectWorkspaces {
|
|
|
562
815
|
allowSystemHibernation?: boolean;
|
|
563
816
|
}
|
|
564
817
|
|
|
565
|
-
/**
|
|
818
|
+
/**
|
|
819
|
+
* Lock settings for a Workspace window.
|
|
820
|
+
*/
|
|
566
821
|
export interface WorkspaceWindowLockConfig {
|
|
567
|
-
/**
|
|
822
|
+
/**
|
|
823
|
+
* If `true`, will allow the user to extract the window from the Workspace.
|
|
824
|
+
*/
|
|
568
825
|
allowExtract?: boolean;
|
|
569
826
|
|
|
570
|
-
/**
|
|
827
|
+
/**
|
|
828
|
+
* If `true`, will allow the user to reorder the window in the window group.
|
|
829
|
+
*/
|
|
571
830
|
allowReorder?: boolean;
|
|
572
831
|
|
|
573
|
-
/**
|
|
832
|
+
/**
|
|
833
|
+
* If `true`, will show the "Close" button in the window tab.
|
|
834
|
+
*/
|
|
574
835
|
showCloseButton?: boolean;
|
|
575
836
|
}
|
|
576
837
|
|
|
577
|
-
/**
|
|
838
|
+
/**
|
|
839
|
+
* Lock settings for a window group.
|
|
840
|
+
*/
|
|
578
841
|
export interface GroupLockConfig {
|
|
579
|
-
/**
|
|
842
|
+
/**
|
|
843
|
+
* If `true`, will allow the user to extract windows from the window group.
|
|
844
|
+
*/
|
|
580
845
|
allowExtract?: boolean;
|
|
581
846
|
|
|
582
|
-
/**
|
|
847
|
+
/**
|
|
848
|
+
* If `true`, will allow the user to reorder the windows in the window group.
|
|
849
|
+
*/
|
|
583
850
|
allowReorder?: boolean;
|
|
584
851
|
|
|
585
|
-
/**
|
|
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
|
+
*/
|
|
586
856
|
allowDrop?: boolean;
|
|
587
857
|
|
|
588
|
-
/**
|
|
858
|
+
/**
|
|
859
|
+
* If `true`, will allow the user to add windows by dropping them in the leftmost area of the window group.
|
|
860
|
+
*/
|
|
589
861
|
allowDropLeft?: boolean;
|
|
590
862
|
|
|
591
|
-
/**
|
|
863
|
+
/**
|
|
864
|
+
* If `true`, will allow the user to add windows by dropping them in the rightmost area of the window group.
|
|
865
|
+
*/
|
|
592
866
|
allowDropRight?: boolean;
|
|
593
867
|
|
|
594
|
-
/**
|
|
868
|
+
/**
|
|
869
|
+
* If `true`, will allow the user to add windows by dropping them in the topmost area of the window group.
|
|
870
|
+
*/
|
|
595
871
|
allowDropTop?: boolean;
|
|
596
872
|
|
|
597
|
-
/**
|
|
873
|
+
/**
|
|
874
|
+
* If `true`, will allow the user to add windows by dropping them in the bottommost area of the window group.
|
|
875
|
+
*/
|
|
598
876
|
allowDropBottom?: boolean;
|
|
599
877
|
|
|
600
|
-
/**
|
|
878
|
+
/**
|
|
879
|
+
* If `true`, will allow the user to add windows by dropping them in the header area of the window group.
|
|
880
|
+
*/
|
|
601
881
|
allowDropHeader?: boolean;
|
|
602
882
|
|
|
603
|
-
/**
|
|
883
|
+
/**
|
|
884
|
+
* If `true`, will show the "Maximize" button in the header of the window group.
|
|
885
|
+
*/
|
|
604
886
|
showMaximizeButton?: boolean;
|
|
605
887
|
|
|
606
|
-
/**
|
|
888
|
+
/**
|
|
889
|
+
* If `true`, will show the "Eject" button in the header of the window group.
|
|
890
|
+
*/
|
|
607
891
|
showEjectButton?: boolean;
|
|
608
892
|
|
|
609
|
-
/**
|
|
893
|
+
/**
|
|
894
|
+
* If `true`, will show the "Add Window" button (the "+" button) in the header of the window group.
|
|
895
|
+
*/
|
|
610
896
|
showAddWindowButton?: boolean;
|
|
611
897
|
}
|
|
612
898
|
|
|
613
|
-
/**
|
|
899
|
+
/**
|
|
900
|
+
* Lock settings for a Workspace row.
|
|
901
|
+
*/
|
|
614
902
|
export interface RowLockConfig {
|
|
615
|
-
/**
|
|
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
|
+
*/
|
|
616
907
|
allowDrop?: boolean;
|
|
617
908
|
|
|
618
|
-
/**
|
|
909
|
+
/**
|
|
910
|
+
* If `true`, will allow the user to resize the Workspace row by dragging the splitters.
|
|
911
|
+
*/
|
|
619
912
|
allowSplitters?: boolean;
|
|
620
913
|
}
|
|
621
914
|
|
|
622
|
-
/**
|
|
915
|
+
/**
|
|
916
|
+
* Lock settings for a Workspace column.
|
|
917
|
+
*/
|
|
623
918
|
export interface ColumnLockConfig {
|
|
624
|
-
/**
|
|
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
|
+
*/
|
|
625
923
|
allowDrop?: boolean;
|
|
626
924
|
|
|
627
|
-
/**
|
|
925
|
+
/**
|
|
926
|
+
* If `true`, will allow the user to resize the Workspace column by dragging the splitters.
|
|
927
|
+
*/
|
|
628
928
|
allowSplitters?: boolean;
|
|
629
929
|
}
|
|
630
930
|
|
|
631
|
-
/**
|
|
931
|
+
/**
|
|
932
|
+
* Settings for a Workspace window.
|
|
933
|
+
*/
|
|
632
934
|
export interface WorkspaceWindowDefinitionConfig {
|
|
633
|
-
/**
|
|
935
|
+
/**
|
|
936
|
+
* Minimum width in pixels for the Workspace window.
|
|
937
|
+
*/
|
|
634
938
|
minWidth?: number;
|
|
635
939
|
|
|
636
|
-
/**
|
|
940
|
+
/**
|
|
941
|
+
* Maximum width in pixels for the Workspace window.
|
|
942
|
+
*/
|
|
637
943
|
maxWidth?: number;
|
|
638
944
|
|
|
639
|
-
/**
|
|
945
|
+
/**
|
|
946
|
+
* Minimum height in pixels for the Workspace window.
|
|
947
|
+
*/
|
|
640
948
|
minHeight?: number;
|
|
641
949
|
|
|
642
|
-
/**
|
|
950
|
+
/**
|
|
951
|
+
* Maximum height in pixels for the Workspace window.
|
|
952
|
+
*/
|
|
643
953
|
maxHeight?: number;
|
|
644
954
|
|
|
645
|
-
/**
|
|
955
|
+
/**
|
|
956
|
+
* If `true`, will allow the user to extract the window from the Workspace.
|
|
957
|
+
*/
|
|
646
958
|
allowExtract?: boolean;
|
|
647
959
|
|
|
648
|
-
/**
|
|
960
|
+
/**
|
|
961
|
+
* If `true`, will allow the user to reorder the window in the window group.
|
|
962
|
+
*/
|
|
649
963
|
allowReorder?: boolean;
|
|
650
964
|
|
|
651
|
-
/**
|
|
965
|
+
/**
|
|
966
|
+
* If `true`, will show the "Close" button in the window tab.
|
|
967
|
+
*/
|
|
652
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;
|
|
653
981
|
}
|
|
654
982
|
|
|
655
|
-
/**
|
|
983
|
+
/**
|
|
984
|
+
* Settings for a window group.
|
|
985
|
+
*/
|
|
656
986
|
export interface GroupDefinitionConfig {
|
|
657
|
-
/**
|
|
987
|
+
/**
|
|
988
|
+
* Minimum width in pixels for the window group.
|
|
989
|
+
*/
|
|
658
990
|
minWidth?: number;
|
|
659
991
|
|
|
660
|
-
/**
|
|
992
|
+
/**
|
|
993
|
+
* Maximum width in pixels for the window group.
|
|
994
|
+
*/
|
|
661
995
|
maxWidth?: number;
|
|
662
996
|
|
|
663
|
-
/**
|
|
997
|
+
/**
|
|
998
|
+
* Minimum height in pixels for the window group.
|
|
999
|
+
*/
|
|
664
1000
|
minHeight?: number;
|
|
665
1001
|
|
|
666
|
-
/**
|
|
1002
|
+
/**
|
|
1003
|
+
* Maximum height in pixels for the window group.
|
|
1004
|
+
*/
|
|
667
1005
|
maxHeight?: number;
|
|
668
1006
|
|
|
669
|
-
/**
|
|
1007
|
+
/**
|
|
1008
|
+
* If `true`, will allow the user to extract windows from the window group.
|
|
1009
|
+
*/
|
|
670
1010
|
allowExtract?: boolean;
|
|
671
1011
|
|
|
672
|
-
/**
|
|
1012
|
+
/**
|
|
1013
|
+
* If `true`, will allow the user to reorder the windows in the window group.
|
|
1014
|
+
*/
|
|
673
1015
|
allowReorder?: boolean;
|
|
674
1016
|
|
|
675
|
-
/**
|
|
1017
|
+
/**
|
|
1018
|
+
* If `true`, will show the "Maximize" button in the header of the window group.
|
|
1019
|
+
*/
|
|
676
1020
|
showMaximizeButton?: boolean;
|
|
677
1021
|
|
|
678
|
-
/**
|
|
1022
|
+
/**
|
|
1023
|
+
* If `true`, will show the "Eject" button in the header of the window group.
|
|
1024
|
+
*/
|
|
679
1025
|
showEjectButton?: boolean;
|
|
680
1026
|
|
|
681
|
-
/**
|
|
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
|
+
*/
|
|
682
1031
|
allowDrop?: boolean;
|
|
683
1032
|
|
|
684
|
-
/**
|
|
1033
|
+
/**
|
|
1034
|
+
* If `true`, will allow the user to add windows by dropping them in the leftmost area of the window group.
|
|
1035
|
+
*/
|
|
685
1036
|
allowDropLeft?: boolean;
|
|
686
1037
|
|
|
687
|
-
/**
|
|
1038
|
+
/**
|
|
1039
|
+
* If `true`, will allow the user to add windows by dropping them in the rightmost area of the window group.
|
|
1040
|
+
*/
|
|
688
1041
|
allowDropRight?: boolean;
|
|
689
1042
|
|
|
690
|
-
/**
|
|
1043
|
+
/**
|
|
1044
|
+
* If `true`, will allow the user to add windows by dropping them in the topmost area of the window group.
|
|
1045
|
+
*/
|
|
691
1046
|
allowDropTop?: boolean;
|
|
692
1047
|
|
|
693
|
-
/**
|
|
1048
|
+
/**
|
|
1049
|
+
* If `true`, will allow the user to add windows by dropping them in the bottommost area of the window group.
|
|
1050
|
+
*/
|
|
694
1051
|
allowDropBottom?: boolean;
|
|
695
1052
|
|
|
696
|
-
/**
|
|
1053
|
+
/**
|
|
1054
|
+
* If `true`, will allow the user to add windows by dropping them in the header area of the window group.
|
|
1055
|
+
*/
|
|
697
1056
|
allowDropHeader?: boolean;
|
|
698
1057
|
|
|
699
|
-
/**
|
|
1058
|
+
/**
|
|
1059
|
+
* If `true`, will show the "Add Window" button (the "+" button) in the header of the window group.
|
|
1060
|
+
*/
|
|
700
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;
|
|
701
1073
|
}
|
|
702
1074
|
|
|
703
|
-
/**
|
|
1075
|
+
/**
|
|
1076
|
+
* Settings for a Workspace row.
|
|
1077
|
+
*/
|
|
704
1078
|
export interface RowDefinitionConfig {
|
|
705
|
-
/**
|
|
1079
|
+
/**
|
|
1080
|
+
* Minimum height in pixels for the row.
|
|
1081
|
+
*/
|
|
706
1082
|
minHeight?: number;
|
|
707
1083
|
|
|
708
|
-
/**
|
|
1084
|
+
/**
|
|
1085
|
+
* Maximum height in pixels for the row.
|
|
1086
|
+
*/
|
|
709
1087
|
maxHeight?: number;
|
|
710
1088
|
|
|
711
|
-
/**
|
|
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
|
+
*/
|
|
712
1093
|
allowDrop?: boolean;
|
|
713
1094
|
|
|
714
|
-
/**
|
|
1095
|
+
/**
|
|
1096
|
+
* If `true`, will allow the user to resize the row by dragging the splitters.
|
|
1097
|
+
*/
|
|
715
1098
|
allowSplitters?: boolean;
|
|
716
1099
|
|
|
717
|
-
/**
|
|
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
|
+
*/
|
|
718
1103
|
isPinned?: boolean;
|
|
719
1104
|
|
|
720
|
-
/**
|
|
1105
|
+
/**
|
|
1106
|
+
* If `true`, the width and height of any maximized child element will be constrained to the current size of the row.
|
|
1107
|
+
*/
|
|
721
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;
|
|
722
1120
|
}
|
|
723
1121
|
|
|
724
|
-
/**
|
|
1122
|
+
/**
|
|
1123
|
+
* Settings for a Workspace column.
|
|
1124
|
+
*/
|
|
725
1125
|
export interface ColumnDefinitionConfig {
|
|
726
|
-
/**
|
|
1126
|
+
/**
|
|
1127
|
+
* Minimum width in pixels for the column.
|
|
1128
|
+
*/
|
|
727
1129
|
minWidth?: number;
|
|
728
1130
|
|
|
729
|
-
/**
|
|
1131
|
+
/**
|
|
1132
|
+
* Maximum width in pixels for the column.
|
|
1133
|
+
*/
|
|
730
1134
|
maxWidth?: number;
|
|
731
1135
|
|
|
732
|
-
/**
|
|
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
|
+
*/
|
|
733
1140
|
allowDrop?: boolean;
|
|
734
1141
|
|
|
735
|
-
/**
|
|
1142
|
+
/**
|
|
1143
|
+
* If `true`, will allow the user to resize the column by dragging the splitters.
|
|
1144
|
+
*/
|
|
736
1145
|
allowSplitters?: boolean;
|
|
737
1146
|
|
|
738
|
-
/**
|
|
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
|
+
*/
|
|
739
1150
|
isPinned?: boolean;
|
|
740
1151
|
|
|
741
|
-
/**
|
|
1152
|
+
/**
|
|
1153
|
+
* If `true`, the width and height of any maximized child element will be constrained to the current size of the column.
|
|
1154
|
+
*/
|
|
742
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;
|
|
743
1167
|
}
|
|
744
1168
|
|
|
1169
|
+
/**
|
|
1170
|
+
* Options for targeting the `Frame` instance that will host a Workspace.
|
|
1171
|
+
*/
|
|
745
1172
|
export interface FrameTargetingOptions {
|
|
746
1173
|
/**
|
|
747
|
-
* 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,
|
|
748
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.
|
|
749
1176
|
* Defaults to the configuration passed in the `workspaces.json` file or to `false`.
|
|
750
1177
|
* *Available only in **io.Connect Desktop**.*
|
|
1178
|
+
* @since io.Connect Desktop 9.4
|
|
1179
|
+
* @since @interopio/workspaces-api 3.3.2
|
|
751
1180
|
*/
|
|
752
1181
|
activate?: boolean;
|
|
753
1182
|
|
|
754
|
-
/**
|
|
1183
|
+
/**
|
|
1184
|
+
* ID of an existing `Frame` instance. If provided, the Workspace will be opened in that `Frame` instance.
|
|
1185
|
+
*/
|
|
755
1186
|
reuseFrameId?: string;
|
|
756
1187
|
|
|
757
1188
|
/**
|
|
758
|
-
*
|
|
1189
|
+
* Name of the Workspaces App that will be used for creating the new `Frame` instance.
|
|
759
1190
|
* *Available only in **io.Connect Desktop**.*
|
|
760
1191
|
*/
|
|
761
1192
|
applicationName?: string;
|
|
762
1193
|
|
|
763
|
-
/**
|
|
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
|
+
*/
|
|
764
1198
|
newFrame?: NewFrameConfig | boolean;
|
|
765
1199
|
}
|
|
766
1200
|
|
|
1201
|
+
/**
|
|
1202
|
+
* Options for pinning a Workspace.
|
|
1203
|
+
*/
|
|
767
1204
|
export interface WorkspacePinOptions {
|
|
768
1205
|
/**
|
|
769
|
-
* Icon
|
|
1206
|
+
* Icon for the pinned Workspace.
|
|
770
1207
|
*/
|
|
771
1208
|
icon?: string;
|
|
772
1209
|
}
|
|
@@ -798,141 +1235,212 @@ export namespace IOConnectWorkspaces {
|
|
|
798
1235
|
frame?: FrameTargetingOptions;
|
|
799
1236
|
}
|
|
800
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
|
+
*/
|
|
801
1244
|
export interface RestoreWorkspaceByIdDefinition {
|
|
802
1245
|
/**
|
|
803
|
-
|
|
804
|
-
|
|
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
|
+
*/
|
|
805
1249
|
id: string;
|
|
806
1250
|
|
|
807
1251
|
/**
|
|
808
|
-
|
|
809
|
-
|
|
1252
|
+
* Options for restoring the Workspace.
|
|
1253
|
+
*/
|
|
810
1254
|
restoreOptions?: RestoreWorkspaceConfig;
|
|
811
1255
|
}
|
|
812
1256
|
|
|
813
|
-
/**
|
|
1257
|
+
/**
|
|
1258
|
+
* Describes a Workspace to be restored from a Workspace Layout.
|
|
1259
|
+
*/
|
|
814
1260
|
export interface RestoreWorkspaceDefinition {
|
|
815
1261
|
/**
|
|
816
|
-
*
|
|
1262
|
+
* Name of the Workspace Layout to restore.
|
|
817
1263
|
*/
|
|
818
1264
|
name: string;
|
|
1265
|
+
|
|
819
1266
|
/**
|
|
820
|
-
*
|
|
1267
|
+
* Options for restoring the Workspace.
|
|
821
1268
|
*/
|
|
822
1269
|
restoreOptions?: RestoreWorkspaceConfig;
|
|
823
1270
|
}
|
|
824
1271
|
|
|
825
|
-
/**
|
|
1272
|
+
/**
|
|
1273
|
+
* Describes a box element to be created in a Workspace.
|
|
1274
|
+
*/
|
|
826
1275
|
export interface BoxDefinition {
|
|
827
|
-
/**
|
|
1276
|
+
/**
|
|
1277
|
+
* Type of the box element.
|
|
1278
|
+
*/
|
|
828
1279
|
type?: "column" | "row" | "group";
|
|
829
1280
|
|
|
830
|
-
/**
|
|
1281
|
+
/**
|
|
1282
|
+
* Array of objects describing the Workspace windows and box elements that the box element will contain.
|
|
1283
|
+
*/
|
|
831
1284
|
children?: Array<WorkspaceWindowDefinition | BoxDefinition>;
|
|
832
1285
|
|
|
833
|
-
/**
|
|
1286
|
+
/**
|
|
1287
|
+
* Settings for the box element.
|
|
1288
|
+
*/
|
|
834
1289
|
config?: GroupDefinitionConfig | RowDefinitionConfig | ColumnDefinitionConfig;
|
|
835
1290
|
}
|
|
836
1291
|
|
|
837
|
-
/**
|
|
1292
|
+
/**
|
|
1293
|
+
* Describes a window to be opened in a Workspace.
|
|
1294
|
+
*/
|
|
838
1295
|
export interface WorkspaceWindowDefinition {
|
|
839
|
-
/**
|
|
1296
|
+
/**
|
|
1297
|
+
* Type of the Workspace element.
|
|
1298
|
+
*/
|
|
840
1299
|
type?: "window";
|
|
841
1300
|
|
|
842
|
-
/**
|
|
1301
|
+
/**
|
|
1302
|
+
* Name of the app to open, as defined within the io.Connect framework.
|
|
1303
|
+
*/
|
|
843
1304
|
appName?: string;
|
|
844
1305
|
|
|
845
|
-
/**
|
|
1306
|
+
/**
|
|
1307
|
+
* ID of an existing standalone window that will be added to the Workspace.
|
|
1308
|
+
*/
|
|
846
1309
|
windowId?: string;
|
|
847
1310
|
|
|
848
|
-
/**
|
|
1311
|
+
/**
|
|
1312
|
+
* Context for the new window. The context will be accessible via the Window Management API.
|
|
1313
|
+
*/
|
|
849
1314
|
context?: any;
|
|
850
1315
|
|
|
851
|
-
/**
|
|
1316
|
+
/**
|
|
1317
|
+
* Settings for the Workspace window.
|
|
1318
|
+
*/
|
|
852
1319
|
config?: WorkspaceWindowDefinitionConfig;
|
|
853
1320
|
}
|
|
854
1321
|
|
|
855
|
-
/**
|
|
1322
|
+
/**
|
|
1323
|
+
* Describes the size constraints of a `Frame` instance, calculated using the constraints of all elements in it.
|
|
1324
|
+
*/
|
|
856
1325
|
export interface FrameConstraints {
|
|
857
|
-
/**
|
|
1326
|
+
/**
|
|
1327
|
+
* Minimum width in pixels of the `Frame` instance.
|
|
1328
|
+
*/
|
|
858
1329
|
minWidth: number;
|
|
859
1330
|
|
|
860
|
-
/**
|
|
1331
|
+
/**
|
|
1332
|
+
* Maximum width in pixels of the `Frame` instance.
|
|
1333
|
+
*/
|
|
861
1334
|
maxWidth: number;
|
|
862
1335
|
|
|
863
|
-
/**
|
|
1336
|
+
/**
|
|
1337
|
+
* Minimum height in pixels of the `Frame` instance.
|
|
1338
|
+
*/
|
|
864
1339
|
minHeight: number;
|
|
865
1340
|
|
|
866
|
-
/**
|
|
1341
|
+
/**
|
|
1342
|
+
* Maximum height in pixels of the `Frame` instance.
|
|
1343
|
+
*/
|
|
867
1344
|
maxHeight: number;
|
|
868
1345
|
}
|
|
869
1346
|
|
|
870
|
-
/**
|
|
1347
|
+
/**
|
|
1348
|
+
* Options for resizing a Workspace element.
|
|
1349
|
+
*/
|
|
871
1350
|
export interface ElementResizeConfig {
|
|
872
|
-
/**
|
|
1351
|
+
/**
|
|
1352
|
+
* Width in pixels for the element.
|
|
1353
|
+
*/
|
|
873
1354
|
width?: number;
|
|
874
1355
|
|
|
875
|
-
/**
|
|
1356
|
+
/**
|
|
1357
|
+
* Height in pixels for the element.
|
|
1358
|
+
*/
|
|
876
1359
|
height?: number;
|
|
877
1360
|
}
|
|
878
1361
|
|
|
879
|
-
/**
|
|
1362
|
+
/**
|
|
1363
|
+
* Describes a Workspace Layout without its underlying structure.
|
|
1364
|
+
*/
|
|
880
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
|
+
*/
|
|
881
1372
|
id?: string;
|
|
882
1373
|
|
|
883
|
-
/**
|
|
1374
|
+
/**
|
|
1375
|
+
* Name of the Workspace Layout.
|
|
1376
|
+
*/
|
|
884
1377
|
name: string;
|
|
885
1378
|
|
|
886
1379
|
/**
|
|
887
|
-
*
|
|
1380
|
+
* Name of the Workspaces App with which the Workspace Layout is associated.
|
|
888
1381
|
* *Available only in **io.Connect Desktop**.*
|
|
889
1382
|
*/
|
|
890
1383
|
applicationName?: string;
|
|
891
1384
|
}
|
|
892
1385
|
|
|
1386
|
+
/**
|
|
1387
|
+
* Describes an empty `Frame` instance to be created.
|
|
1388
|
+
*/
|
|
893
1389
|
export interface EmptyFrameDefinition {
|
|
894
1390
|
/**
|
|
895
|
-
*
|
|
1391
|
+
* Name of the Workspaces App that will be used for creating the empty `Frame` instance.
|
|
896
1392
|
* *Available only in **io.Connect Desktop**.*
|
|
897
1393
|
*/
|
|
898
1394
|
applicationName?: string;
|
|
899
1395
|
|
|
900
1396
|
/**
|
|
901
|
-
*
|
|
1397
|
+
* Settings for the empty `Frame` instance.
|
|
902
1398
|
*/
|
|
903
1399
|
frameConfig?: IOConnectWorkspaces.NewFrameConfig;
|
|
904
1400
|
|
|
905
1401
|
/**
|
|
906
|
-
*
|
|
1402
|
+
* Context for the empty `Frame` instance. The context will be passed to the callback for handling the `onInitializationRequested()` event of the `Frame` instance.
|
|
907
1403
|
*/
|
|
908
1404
|
context?: object;
|
|
909
1405
|
|
|
910
1406
|
/**
|
|
911
|
-
*
|
|
1407
|
+
* ID of the Layout component that is being restored.
|
|
912
1408
|
*/
|
|
913
1409
|
layoutComponentId?: string;
|
|
914
1410
|
}
|
|
915
1411
|
|
|
1412
|
+
/**
|
|
1413
|
+
* Settings for initializing an empty `Frame` instance.
|
|
1414
|
+
*/
|
|
916
1415
|
export interface FrameInitializationConfig {
|
|
917
1416
|
/**
|
|
918
|
-
* Array of
|
|
1417
|
+
* Array of objects, each describing a Workspace to be created or restored in the `Frame` instance.
|
|
919
1418
|
*/
|
|
920
1419
|
workspaces: Array<IOConnectWorkspaces.WorkspaceDefinition | RestoreWorkspaceDefinition | RestoreWorkspaceByIdDefinition>;
|
|
921
1420
|
}
|
|
922
1421
|
|
|
1422
|
+
/**
|
|
1423
|
+
* Describes the context for initializing an empty `Frame` instance.
|
|
1424
|
+
*/
|
|
923
1425
|
export interface FrameInitializationContext {
|
|
924
1426
|
/**
|
|
925
|
-
* Context passed when the
|
|
1427
|
+
* Context passed when creating the empty `Frame` instance.
|
|
926
1428
|
*/
|
|
927
1429
|
context?: object;
|
|
928
1430
|
}
|
|
929
1431
|
|
|
930
|
-
/**
|
|
1432
|
+
/**
|
|
1433
|
+
* Describes the basic details of a `Frame` instance.
|
|
1434
|
+
*/
|
|
931
1435
|
export interface FrameSummary {
|
|
932
|
-
/**
|
|
1436
|
+
/**
|
|
1437
|
+
* Unique ID of the `Frame` instance.
|
|
1438
|
+
*/
|
|
933
1439
|
id: string;
|
|
934
1440
|
|
|
935
|
-
/**
|
|
1441
|
+
/**
|
|
1442
|
+
* Flag indicating whether the `Frame` instance has been initialized.
|
|
1443
|
+
*/
|
|
936
1444
|
isInitialized: boolean;
|
|
937
1445
|
}
|
|
938
1446
|
|
|
@@ -983,19 +1491,20 @@ export namespace IOConnectWorkspaces {
|
|
|
983
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.
|
|
984
1492
|
* @default true
|
|
985
1493
|
* @since io.Connect Desktop 10.0
|
|
1494
|
+
* @since @interopio/workspaces-api 4.1.4
|
|
986
1495
|
*/
|
|
987
1496
|
focus?: boolean;
|
|
988
1497
|
}
|
|
989
1498
|
/**
|
|
990
|
-
|
|
991
|
-
|
|
992
|
-
|
|
993
|
-
|
|
994
|
-
|
|
995
|
-
|
|
996
|
-
|
|
997
|
-
|
|
998
|
-
|
|
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
|
+
*/
|
|
999
1508
|
export const enum DialogType {
|
|
1000
1509
|
YesNo = "YesNo",
|
|
1001
1510
|
YesNoCancel = "YesNoCancel",
|
|
@@ -1008,7 +1517,7 @@ export namespace IOConnectWorkspaces {
|
|
|
1008
1517
|
/**
|
|
1009
1518
|
* Mode for the dialog.
|
|
1010
1519
|
*
|
|
1011
|
-
* - `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.
|
|
1012
1521
|
* - `Global` - all visible containers (including frameless io.Connect Windows) will be blocked. All windows within a blocked container will be blocked too.
|
|
1013
1522
|
*/
|
|
1014
1523
|
export const enum DialogMode {
|
|
@@ -1027,7 +1536,7 @@ export namespace IOConnectWorkspaces {
|
|
|
1027
1536
|
}
|
|
1028
1537
|
|
|
1029
1538
|
/**
|
|
1030
|
-
* Options for showing a dialog from
|
|
1539
|
+
* Options for showing a dialog from a `Frame` instance.
|
|
1031
1540
|
*/
|
|
1032
1541
|
export interface FrameDialogOptions {
|
|
1033
1542
|
|
|
@@ -1109,13 +1618,13 @@ export namespace IOConnectWorkspaces {
|
|
|
1109
1618
|
|
|
1110
1619
|
/**
|
|
1111
1620
|
* If `true`, the negative response button will be shown in the dialog.
|
|
1112
|
-
* 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.
|
|
1113
1622
|
* @default false
|
|
1114
1623
|
*/
|
|
1115
1624
|
showNegativeButton?: boolean;
|
|
1116
1625
|
|
|
1117
1626
|
/**
|
|
1118
|
-
*
|
|
1627
|
+
* Default button for the dialog.
|
|
1119
1628
|
* The action tied to the default button will be executed when the user presses `ENTER` when no button is active
|
|
1120
1629
|
* (i.e., when the buttons aren't on focus and none is selected).
|
|
1121
1630
|
*/
|
|
@@ -1138,13 +1647,13 @@ export namespace IOConnectWorkspaces {
|
|
|
1138
1647
|
showTimer?: boolean;
|
|
1139
1648
|
|
|
1140
1649
|
/**
|
|
1141
|
-
*
|
|
1650
|
+
* Maximum number of characters that can be entered in the input field of a `SingleInputDialog`.
|
|
1142
1651
|
*/
|
|
1143
1652
|
inputMaxLength?: number;
|
|
1144
1653
|
|
|
1145
1654
|
/**
|
|
1146
1655
|
* String pattern that serves as a regular expression for validating the input from the user in a `SingleInputDialog`.
|
|
1147
|
-
* 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
|
|
1148
1657
|
* will indicate visually that the user input is invalid.
|
|
1149
1658
|
*/
|
|
1150
1659
|
inputPattern?: string;
|
|
@@ -1160,151 +1669,158 @@ export namespace IOConnectWorkspaces {
|
|
|
1160
1669
|
inputPlaceholder?: string;
|
|
1161
1670
|
|
|
1162
1671
|
/**
|
|
1163
|
-
|
|
1164
|
-
|
|
1165
|
-
|
|
1166
|
-
|
|
1167
|
-
|
|
1168
|
-
|
|
1169
|
-
|
|
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
|
+
*/
|
|
1170
1680
|
blur?: boolean;
|
|
1171
1681
|
}
|
|
1172
1682
|
|
|
1173
1683
|
/**
|
|
1174
|
-
* Describes a Frame (a Workspaces App instance).
|
|
1684
|
+
* Describes a `Frame` instance (a Workspaces App instance).
|
|
1175
1685
|
*/
|
|
1176
1686
|
export interface Frame extends FrameSummary {
|
|
1177
1687
|
/**
|
|
1178
|
-
* Registers a keyboard shortcut for the current Frame.
|
|
1179
|
-
* @param shortcut Keyboard combination to register as a shortcut for the Frame (e.g., "ctrl+w").
|
|
1180
|
-
* @param callback Callback that will be invoked when the Frame for which the shortcut is registered
|
|
1181
|
-
* is on focus and the user presses the registered keyboard combination.
|
|
1688
|
+
* Registers a keyboard shortcut for the current `Frame` instance.
|
|
1182
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.
|
|
1183
1693
|
*/
|
|
1184
1694
|
registerShortcut(shortcut: string, callback: () => void): Promise<Unsubscribe>;
|
|
1185
1695
|
|
|
1186
1696
|
/**
|
|
1187
|
-
* Retrieves the current bounds of the Frame.
|
|
1697
|
+
* Retrieves the current bounds of the `Frame` instance.
|
|
1188
1698
|
*/
|
|
1189
1699
|
getBounds(): Promise<FrameBounds>;
|
|
1190
1700
|
|
|
1191
1701
|
/**
|
|
1192
|
-
* Resizes the Frame.
|
|
1193
|
-
* @param config Options for resizing the Frame.
|
|
1702
|
+
* Resizes the `Frame` instance.
|
|
1703
|
+
* @param config Options for resizing the `Frame` instance.
|
|
1194
1704
|
*/
|
|
1195
1705
|
resize(config: ResizeConfig): Promise<void>;
|
|
1196
1706
|
|
|
1197
1707
|
/**
|
|
1198
|
-
* Moves the Frame.
|
|
1199
|
-
* @param config Options for moving the Frame.
|
|
1708
|
+
* Moves the `Frame` instance.
|
|
1709
|
+
* @param config Options for moving the `Frame` instance.
|
|
1200
1710
|
*/
|
|
1201
1711
|
move(config: MoveConfig): Promise<void>;
|
|
1202
1712
|
|
|
1203
1713
|
/**
|
|
1204
|
-
* Focuses the Frame.
|
|
1714
|
+
* Focuses the `Frame` instance.
|
|
1205
1715
|
*/
|
|
1206
1716
|
focus(): Promise<void>;
|
|
1207
1717
|
|
|
1208
1718
|
/**
|
|
1209
|
-
*
|
|
1719
|
+
* Retrieves the current state of the `Frame` instance.
|
|
1210
1720
|
* *Available only in **io.Connect Desktop**.*
|
|
1211
1721
|
*/
|
|
1212
1722
|
state(): Promise<FrameState>;
|
|
1213
1723
|
|
|
1214
1724
|
/**
|
|
1215
|
-
* Minimizes the Frame.
|
|
1725
|
+
* Minimizes the `Frame` instance.
|
|
1216
1726
|
* *Available only in **io.Connect Desktop**.*
|
|
1217
1727
|
*/
|
|
1218
1728
|
minimize(): Promise<void>;
|
|
1219
1729
|
|
|
1220
1730
|
/**
|
|
1221
|
-
* Maximizes the Frame.
|
|
1731
|
+
* Maximizes the `Frame` instance.
|
|
1222
1732
|
* *Available only in **io.Connect Desktop**.*
|
|
1223
1733
|
*/
|
|
1224
1734
|
maximize(): Promise<void>;
|
|
1225
1735
|
|
|
1226
1736
|
/**
|
|
1227
|
-
* Restores the Frame.
|
|
1737
|
+
* Restores the `Frame` instance.
|
|
1228
1738
|
* *Available only in **io.Connect Desktop**.*
|
|
1229
1739
|
*/
|
|
1230
1740
|
restore(): Promise<void>;
|
|
1231
1741
|
|
|
1232
1742
|
/**
|
|
1233
|
-
* Closes the Frame.
|
|
1743
|
+
* Closes the `Frame` instance.
|
|
1234
1744
|
* The result from using this method in **io.Connect Browser** projects may vary depending on whether the browser will allow the closing operation.
|
|
1235
|
-
* @param options Options for closing the Frame.
|
|
1745
|
+
* @param options Options for closing the `Frame` instance.
|
|
1236
1746
|
*/
|
|
1237
1747
|
close(options?: FrameCloseOptions): Promise<void>;
|
|
1238
1748
|
|
|
1239
1749
|
/**
|
|
1240
|
-
* Initializes an empty `Frame` with the Workspaces provided via the `FrameInitializationConfig` object.
|
|
1241
|
-
* 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).
|
|
1242
|
-
* @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.
|
|
1243
1753
|
*/
|
|
1244
1754
|
init(config: FrameInitializationConfig): Promise<void>;
|
|
1245
1755
|
|
|
1246
1756
|
/**
|
|
1247
|
-
|
|
1248
|
-
|
|
1249
|
-
|
|
1250
|
-
|
|
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
|
+
*/
|
|
1251
1762
|
getIcon(): Promise<Icon>;
|
|
1252
1763
|
|
|
1253
1764
|
/**
|
|
1254
1765
|
* Sets the taskbar icon of the `Frame` instance.
|
|
1255
1766
|
* *Available only in **io.Connect Desktop**.*
|
|
1256
|
-
* @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.
|
|
1257
1768
|
* @since io.Connect Desktop 9.9
|
|
1769
|
+
* @since @interopio/workspaces-api 3.5.7
|
|
1258
1770
|
*/
|
|
1259
1771
|
setIcon(icon: Icon): Promise<void>;
|
|
1260
1772
|
|
|
1261
1773
|
/**
|
|
1262
|
-
*
|
|
1774
|
+
* Retrieves a snapshot of the current state of the `Frame` instance.
|
|
1263
1775
|
*/
|
|
1264
1776
|
snapshot(): Promise<FrameSnapshot>;
|
|
1265
1777
|
|
|
1266
1778
|
/**
|
|
1267
|
-
*
|
|
1779
|
+
* Retrieves all Workspaces in the `Frame` instance.
|
|
1268
1780
|
*/
|
|
1269
1781
|
workspaces(): Promise<Workspace[]>;
|
|
1270
1782
|
|
|
1271
1783
|
/**
|
|
1272
|
-
|
|
1273
|
-
|
|
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
|
+
*/
|
|
1274
1786
|
getConstraints(): Promise<FrameConstraints>;
|
|
1275
1787
|
|
|
1276
1788
|
/**
|
|
1277
|
-
* Retrieves the current visibility state of the
|
|
1789
|
+
* Retrieves the current visibility state of the `Frame` instance.
|
|
1278
1790
|
* *Available only in **io.Connect Desktop**.*
|
|
1279
1791
|
* @since io.Connect Desktop 9.10
|
|
1792
|
+
* @since @interopio/workspaces-api 4.1.1
|
|
1280
1793
|
*/
|
|
1281
1794
|
isVisible(): Promise<boolean>;
|
|
1282
1795
|
|
|
1283
1796
|
/**
|
|
1284
|
-
* Shows the
|
|
1797
|
+
* Shows the `Frame` instance if it has been previously hidden.
|
|
1285
1798
|
* *Available only in **io.Connect Desktop**.*
|
|
1799
|
+
* @param config Settings for showing the `Frame` instance.
|
|
1286
1800
|
* @since io.Connect Desktop 9.10
|
|
1801
|
+
* @since @interopio/workspaces-api 4.1.1
|
|
1287
1802
|
*/
|
|
1288
1803
|
show(config?: FrameShowConfig): Promise<void>;
|
|
1289
1804
|
|
|
1290
1805
|
/**
|
|
1291
|
-
* Hides the
|
|
1806
|
+
* Hides the `Frame` instance if it's currently visible.
|
|
1292
1807
|
* *Available only in **io.Connect Desktop**.*
|
|
1293
1808
|
* @since io.Connect Desktop 9.10
|
|
1809
|
+
* @since @interopio/workspaces-api 4.1.1
|
|
1294
1810
|
*/
|
|
1295
1811
|
hide(): Promise<void>;
|
|
1296
1812
|
|
|
1297
1813
|
/**
|
|
1298
|
-
*
|
|
1299
|
-
* @param name
|
|
1300
|
-
* @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.
|
|
1301
1817
|
*/
|
|
1302
1818
|
restoreWorkspace(name: string, options?: RestoreWorkspaceConfig): Promise<Workspace>;
|
|
1303
1819
|
|
|
1304
1820
|
/**
|
|
1305
|
-
*
|
|
1306
|
-
* @param definition
|
|
1307
|
-
* @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.
|
|
1308
1824
|
*/
|
|
1309
1825
|
createWorkspace(definition: WorkspaceDefinition, config?: WorkspaceCreateConfig): Promise<Workspace>;
|
|
1310
1826
|
|
|
@@ -1313,13 +1829,16 @@ export namespace IOConnectWorkspaces {
|
|
|
1313
1829
|
* *Available only in **io.Connect Desktop**.*
|
|
1314
1830
|
* @param config Options for creating a popup window.
|
|
1315
1831
|
* @since io.Connect Desktop 10.0
|
|
1832
|
+
* @since @interopio/workspaces-api 4.1.4
|
|
1316
1833
|
*/
|
|
1317
1834
|
showPopup(config: PopupOptions): Promise<any>;
|
|
1318
1835
|
|
|
1319
1836
|
/**
|
|
1320
1837
|
* Shows a dialog with a title, message, and response buttons to the user.
|
|
1321
1838
|
* *Available only in **io.Connect Desktop**.*
|
|
1839
|
+
* @param options Options for the dialog.
|
|
1322
1840
|
* @since io.Connect Desktop 10.0
|
|
1841
|
+
* @since @interopio/workspaces-api 4.1.2
|
|
1323
1842
|
*/
|
|
1324
1843
|
showDialog<T>(options: FrameDialogOptions): Promise<T>;
|
|
1325
1844
|
|
|
@@ -1333,385 +1852,469 @@ export namespace IOConnectWorkspaces {
|
|
|
1333
1852
|
setOnTop(options: FrameSetOnTopOptions): Promise<void>;
|
|
1334
1853
|
|
|
1335
1854
|
/**
|
|
1336
|
-
* Notifies when the Frame is about to be closed.
|
|
1337
|
-
*
|
|
1338
|
-
* @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.
|
|
1339
1858
|
* @since io.Connect Desktop 9.9
|
|
1859
|
+
* @since io.Connect Browser 5.0
|
|
1860
|
+
* @since @interopio/workspaces-api 3.5.7
|
|
1340
1861
|
*/
|
|
1341
1862
|
onClosing(callback: (options: FrameClosingData) => void | Promise<void>): Promise<Unsubscribe>;
|
|
1342
1863
|
|
|
1343
1864
|
/**
|
|
1344
|
-
* Notifies when
|
|
1345
|
-
* @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.
|
|
1346
1867
|
*/
|
|
1347
1868
|
onClosed(callback: (closed: FrameClosedData) => void): Promise<Unsubscribe>;
|
|
1348
1869
|
|
|
1349
1870
|
/**
|
|
1350
|
-
* Notifies when
|
|
1351
|
-
*
|
|
1352
|
-
* @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.
|
|
1353
1874
|
*/
|
|
1354
1875
|
onMaximized(callback: () => void): Promise<Unsubscribe>;
|
|
1355
1876
|
|
|
1356
1877
|
/**
|
|
1357
|
-
* Notifies when
|
|
1358
|
-
*
|
|
1359
|
-
* @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.
|
|
1360
1881
|
*/
|
|
1361
1882
|
onMinimized(callback: () => void): Promise<Unsubscribe>;
|
|
1362
1883
|
|
|
1363
1884
|
/**
|
|
1364
|
-
* Notifies when
|
|
1365
|
-
*
|
|
1366
|
-
* @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.
|
|
1367
1888
|
*/
|
|
1368
1889
|
onNormal(callback: () => void): Promise<Unsubscribe>;
|
|
1369
1890
|
|
|
1370
1891
|
/**
|
|
1371
|
-
*
|
|
1892
|
+
* Notifies when the `Frame` instance or a window in it has gained or lost focus. Returns an unsubscribe function.
|
|
1372
1893
|
* *Available only in **io.Connect Desktop**.*
|
|
1373
|
-
* @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.
|
|
1374
1895
|
*/
|
|
1375
1896
|
onFocusChanged(callback: (data: FrameFocusChangedData) => void): Promise<IOConnectWorkspaces.Unsubscribe>;
|
|
1376
1897
|
|
|
1377
1898
|
/**
|
|
1378
|
-
* Notifies when
|
|
1379
|
-
* @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.
|
|
1380
1901
|
*/
|
|
1381
1902
|
onInitializationRequested(callback: (context?: IOConnectWorkspaces.FrameInitializationContext) => void): Promise<Unsubscribe>;
|
|
1382
1903
|
|
|
1383
1904
|
/**
|
|
1384
|
-
* Notifies when a new
|
|
1385
|
-
* @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.
|
|
1386
1907
|
*/
|
|
1387
1908
|
onWorkspaceOpened(callback: (workspace: Workspace) => void): Promise<Unsubscribe>;
|
|
1388
1909
|
|
|
1389
1910
|
/**
|
|
1390
|
-
* Notifies when a
|
|
1391
|
-
* @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.
|
|
1392
1913
|
*/
|
|
1393
1914
|
onWorkspaceSelected(callback: (workspace: Workspace) => void): Promise<Unsubscribe>;
|
|
1394
1915
|
|
|
1395
1916
|
/**
|
|
1396
|
-
* Notifies when a
|
|
1397
|
-
* @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.
|
|
1398
1919
|
*/
|
|
1399
1920
|
onWorkspaceClosed(callback: (closed: { frameId: string; workspaceId: string }) => void): Promise<Unsubscribe>;
|
|
1400
1921
|
|
|
1401
1922
|
/**
|
|
1402
|
-
* Notifies when a new window
|
|
1403
|
-
* An added window
|
|
1404
|
-
* @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.
|
|
1405
1926
|
*/
|
|
1406
1927
|
onWindowAdded(callback: (window: WorkspaceWindow) => void): Promise<Unsubscribe>;
|
|
1407
1928
|
|
|
1408
1929
|
/**
|
|
1409
|
-
* Notifies when a window
|
|
1410
|
-
* @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.
|
|
1411
1932
|
*/
|
|
1412
1933
|
onWindowRemoved(callback: (removed: { windowId?: string; workspaceId: string; frameId: string }) => void): Promise<Unsubscribe>;
|
|
1413
1934
|
|
|
1414
1935
|
/**
|
|
1415
|
-
* Notifies when a window
|
|
1416
|
-
* A loaded window is a window
|
|
1417
|
-
* @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.
|
|
1418
1939
|
*/
|
|
1419
1940
|
onWindowLoaded(callback: (window: WorkspaceWindow) => void): Promise<Unsubscribe>;
|
|
1420
1941
|
}
|
|
1421
1942
|
|
|
1422
|
-
/**
|
|
1943
|
+
/**
|
|
1944
|
+
* Describes the basic details of a Workspace.
|
|
1945
|
+
*/
|
|
1423
1946
|
export interface WorkspaceSummary {
|
|
1424
|
-
/**
|
|
1947
|
+
/**
|
|
1948
|
+
* Unique ID of the Workspace.
|
|
1949
|
+
*/
|
|
1425
1950
|
id: string;
|
|
1426
1951
|
|
|
1427
|
-
/**
|
|
1952
|
+
/**
|
|
1953
|
+
* ID of the `Frame` instance containing the Workspace.
|
|
1954
|
+
*/
|
|
1428
1955
|
frameId: string;
|
|
1429
1956
|
|
|
1430
|
-
/**
|
|
1957
|
+
/**
|
|
1958
|
+
* Position of the Workspace relative to the other Workspaces in the `Frame` instance.
|
|
1959
|
+
*/
|
|
1431
1960
|
positionIndex: number;
|
|
1432
1961
|
|
|
1433
|
-
/**
|
|
1962
|
+
/**
|
|
1963
|
+
* Title of the Workspace.
|
|
1964
|
+
*/
|
|
1434
1965
|
title: string;
|
|
1435
1966
|
|
|
1436
|
-
/**
|
|
1967
|
+
/**
|
|
1968
|
+
* Name of the Workspace Layout from which the Workspace originates, if any.
|
|
1969
|
+
*/
|
|
1437
1970
|
layoutName: string | undefined;
|
|
1438
1971
|
|
|
1439
|
-
/**
|
|
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
|
+
*/
|
|
1440
1978
|
layoutId?: string;
|
|
1441
1979
|
|
|
1442
|
-
/**
|
|
1980
|
+
/**
|
|
1981
|
+
* Flag indicating whether the Workspace is hibernated.
|
|
1982
|
+
*/
|
|
1443
1983
|
isHibernated?: boolean;
|
|
1444
1984
|
|
|
1445
|
-
/**
|
|
1985
|
+
/**
|
|
1986
|
+
* Flag indicating whether the Workspace is selected in its `Frame` instance.
|
|
1987
|
+
*/
|
|
1446
1988
|
isSelected?: boolean;
|
|
1447
1989
|
|
|
1448
|
-
/**
|
|
1990
|
+
/**
|
|
1991
|
+
* Flag indicating whether the user can resize the Workspace elements by dragging the splitters.
|
|
1992
|
+
*/
|
|
1449
1993
|
allowSplitters?: boolean;
|
|
1450
1994
|
|
|
1451
|
-
/**
|
|
1995
|
+
/**
|
|
1996
|
+
* Flag indicating whether the user can add windows by dropping them in the Workspace.
|
|
1997
|
+
*/
|
|
1452
1998
|
allowDrop?: boolean;
|
|
1453
1999
|
|
|
1454
|
-
/**
|
|
2000
|
+
/**
|
|
2001
|
+
* Flag indicating whether the user can add windows by dropping them in the leftmost area of the Workspace.
|
|
2002
|
+
*/
|
|
1455
2003
|
allowDropLeft?: boolean;
|
|
1456
2004
|
|
|
1457
|
-
/**
|
|
2005
|
+
/**
|
|
2006
|
+
* Flag indicating whether the user can add windows by dropping them in the topmost area of the Workspace.
|
|
2007
|
+
*/
|
|
1458
2008
|
allowDropTop?: boolean;
|
|
1459
2009
|
|
|
1460
|
-
/**
|
|
2010
|
+
/**
|
|
2011
|
+
* Flag indicating whether the user can add windows by dropping them in the rightmost area of the Workspace.
|
|
2012
|
+
*/
|
|
1461
2013
|
allowDropRight?: boolean;
|
|
1462
2014
|
|
|
1463
|
-
/**
|
|
2015
|
+
/**
|
|
2016
|
+
* Flag indicating whether the user can add windows by dropping them in the bottommost area of the Workspace.
|
|
2017
|
+
*/
|
|
1464
2018
|
allowDropBottom?: boolean;
|
|
1465
2019
|
|
|
1466
|
-
/**
|
|
2020
|
+
/**
|
|
2021
|
+
* Flag indicating whether the user can extract windows from the Workspace.
|
|
2022
|
+
*/
|
|
1467
2023
|
allowExtract?: boolean;
|
|
1468
2024
|
|
|
1469
|
-
/**
|
|
2025
|
+
/**
|
|
2026
|
+
* Flag indicating whether the user can reorder windows in the Workspace.
|
|
2027
|
+
*/
|
|
1470
2028
|
allowWindowReorder?: boolean;
|
|
1471
2029
|
|
|
1472
|
-
/**
|
|
2030
|
+
/**
|
|
2031
|
+
* Flag indicating whether the "Close" button in the Workspace tab is visible.
|
|
2032
|
+
*/
|
|
1473
2033
|
showCloseButton?: boolean;
|
|
1474
2034
|
|
|
1475
|
-
/**
|
|
2035
|
+
/**
|
|
2036
|
+
* Flag indicating whether the "Rename", "Save", and "Save As" options in the Workspace tab menu are visible.
|
|
2037
|
+
*/
|
|
1476
2038
|
showSaveButton?: boolean;
|
|
1477
2039
|
|
|
1478
2040
|
/**
|
|
1479
|
-
*
|
|
2041
|
+
* Flag indicating whether the user can extract the Workspace tab from the Workspaces App.
|
|
1480
2042
|
* *Available only in **io.Connect Desktop**.*
|
|
1481
2043
|
*/
|
|
1482
2044
|
allowWorkspaceTabExtract?: boolean;
|
|
1483
2045
|
|
|
1484
|
-
/**
|
|
2046
|
+
/**
|
|
2047
|
+
* Flag indicating whether the user can reorder the Workspace tab in the Workspaces App.
|
|
2048
|
+
*/
|
|
1485
2049
|
allowWorkspaceTabReorder?: boolean;
|
|
1486
2050
|
|
|
1487
|
-
/**
|
|
2051
|
+
/**
|
|
2052
|
+
* Minimum width in pixels of the Workspace, calculated using the constraints of all elements in it.
|
|
2053
|
+
*/
|
|
1488
2054
|
minWidth?: number;
|
|
1489
2055
|
|
|
1490
|
-
/**
|
|
2056
|
+
/**
|
|
2057
|
+
* Minimum height in pixels of the Workspace, calculated using the constraints of all elements in it.
|
|
2058
|
+
*/
|
|
1491
2059
|
minHeight?: number;
|
|
1492
2060
|
|
|
1493
|
-
/**
|
|
2061
|
+
/**
|
|
2062
|
+
* Maximum width in pixels of the Workspace, calculated using the constraints of all elements in it.
|
|
2063
|
+
*/
|
|
1494
2064
|
maxWidth?: number;
|
|
1495
2065
|
|
|
1496
|
-
/**
|
|
2066
|
+
/**
|
|
2067
|
+
* Maximum height in pixels of the Workspace, calculated using the constraints of all elements in it.
|
|
2068
|
+
*/
|
|
1497
2069
|
maxHeight?: number;
|
|
1498
2070
|
|
|
1499
|
-
/**
|
|
2071
|
+
/**
|
|
2072
|
+
* Width in pixels of the Workspace.
|
|
2073
|
+
*/
|
|
1500
2074
|
width?: number;
|
|
1501
2075
|
|
|
1502
|
-
/**
|
|
2076
|
+
/**
|
|
2077
|
+
* Height in pixels of the Workspace.
|
|
2078
|
+
*/
|
|
1503
2079
|
height?: number;
|
|
1504
2080
|
|
|
1505
|
-
/**
|
|
2081
|
+
/**
|
|
2082
|
+
* Flag indicating whether the "Close" buttons in the window tabs are visible.
|
|
2083
|
+
*/
|
|
1506
2084
|
showWindowCloseButtons?: boolean;
|
|
1507
2085
|
|
|
1508
|
-
/**
|
|
2086
|
+
/**
|
|
2087
|
+
* Flag indicating whether the "Eject" buttons in the headers of the window groups are visible.
|
|
2088
|
+
*/
|
|
1509
2089
|
showEjectButtons?: boolean;
|
|
1510
2090
|
|
|
1511
|
-
/**
|
|
2091
|
+
/**
|
|
2092
|
+
* Flag indicating whether the "Add Window" buttons (the "+" buttons) in the headers of the window groups are visible.
|
|
2093
|
+
*/
|
|
1512
2094
|
showAddWindowButtons?: boolean;
|
|
1513
2095
|
|
|
1514
2096
|
/**
|
|
1515
|
-
*
|
|
2097
|
+
* Loading strategy of the Workspace.
|
|
1516
2098
|
* *Available only in **io.Connect Desktop**.*
|
|
2099
|
+
* @since io.Connect Desktop 9.8
|
|
2100
|
+
* @since @interopio/workspaces-api 3.5.6
|
|
1517
2101
|
*/
|
|
1518
2102
|
loadingStrategy?: LoadingStrategy;
|
|
1519
2103
|
|
|
1520
2104
|
/**
|
|
1521
|
-
*
|
|
2105
|
+
* Flag indicating whether the Workspace can be hibernated via the platform configuration.
|
|
1522
2106
|
* This setting doesn't apply to programmatic hibernation via the `hibernate()` method of a `Workspace` instance.
|
|
1523
2107
|
*/
|
|
1524
2108
|
allowSystemHibernation?: boolean;
|
|
1525
2109
|
|
|
2110
|
+
/**
|
|
2111
|
+
* Restrictions for dropping apps in the Workspace and allowing apps to appear in the "Add Apps" popup menu of the Workspace.
|
|
2112
|
+
* @since io.Connect Desktop 10.5
|
|
2113
|
+
* @since io.Connect Browser 4.6
|
|
2114
|
+
* @since @interopio/workspaces-api 5.0.0
|
|
2115
|
+
*/
|
|
1526
2116
|
appRestrictions?: AppRestrictions;
|
|
1527
2117
|
}
|
|
1528
2118
|
|
|
2119
|
+
/**
|
|
2120
|
+
* Options for saving a Workspace Layout via the `saveLayout()` method of a `Workspace` instance.
|
|
2121
|
+
*/
|
|
1529
2122
|
export type SaveLayoutConfig = Omit<Omit<IOConnectWorkspaces.WorkspaceLayoutSaveConfig, "name">, "workspaceId">;
|
|
1530
2123
|
|
|
1531
|
-
/**
|
|
2124
|
+
/**
|
|
2125
|
+
* Describes a Workspace.
|
|
2126
|
+
*/
|
|
1532
2127
|
export interface Workspace extends WorkspaceSummary {
|
|
1533
2128
|
|
|
1534
|
-
/**
|
|
2129
|
+
/**
|
|
2130
|
+
* Array of objects, each describing an immediate child element of the Workspace.
|
|
2131
|
+
*/
|
|
1535
2132
|
children: WorkspaceElement[];
|
|
1536
2133
|
|
|
1537
|
-
/**
|
|
2134
|
+
/**
|
|
2135
|
+
* `Frame` instance containing the Workspace.
|
|
2136
|
+
*/
|
|
1538
2137
|
frame: Frame;
|
|
1539
2138
|
|
|
1540
2139
|
/**
|
|
1541
|
-
*
|
|
2140
|
+
* Focuses the Workspace.
|
|
1542
2141
|
*/
|
|
1543
2142
|
focus(): Promise<void>;
|
|
1544
2143
|
|
|
1545
2144
|
/**
|
|
1546
|
-
* Closes
|
|
2145
|
+
* Closes the Workspace and all its child elements.
|
|
1547
2146
|
*/
|
|
1548
2147
|
close(): Promise<void>;
|
|
1549
2148
|
|
|
1550
2149
|
/**
|
|
1551
|
-
*
|
|
2150
|
+
* Retrieves a snapshot of the current state of the Workspace.
|
|
1552
2151
|
*/
|
|
1553
2152
|
snapshot(): Promise<WorkspaceSnapshot>;
|
|
1554
2153
|
|
|
1555
2154
|
/**
|
|
1556
|
-
* Sets
|
|
1557
|
-
* @param title
|
|
2155
|
+
* Sets the title of the Workspace.
|
|
2156
|
+
* @param title Title for the Workspace.
|
|
1558
2157
|
*/
|
|
1559
2158
|
setTitle(title: string): Promise<void>;
|
|
1560
2159
|
|
|
1561
2160
|
/**
|
|
1562
|
-
*
|
|
2161
|
+
* Retrieves the context of the Workspace.
|
|
1563
2162
|
*/
|
|
1564
2163
|
getContext(): Promise<any>;
|
|
1565
2164
|
|
|
1566
2165
|
/**
|
|
1567
|
-
* Sets the context
|
|
1568
|
-
* @param data
|
|
2166
|
+
* Sets the context of the Workspace. This operation will overwrite entirely the existing context.
|
|
2167
|
+
* @param data Context for the Workspace.
|
|
1569
2168
|
*/
|
|
1570
2169
|
setContext(data: any): Promise<void>;
|
|
1571
2170
|
|
|
1572
2171
|
/**
|
|
1573
|
-
*
|
|
1574
|
-
* @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.
|
|
1575
2174
|
*/
|
|
1576
2175
|
updateContext(data: any): Promise<void>;
|
|
1577
2176
|
|
|
1578
2177
|
/**
|
|
1579
|
-
* Notifies when the context
|
|
1580
|
-
* @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.
|
|
1581
2180
|
*/
|
|
1582
2181
|
onContextUpdated(callback: (data: any) => void): Promise<Unsubscribe>;
|
|
1583
2182
|
|
|
1584
2183
|
/**
|
|
1585
|
-
* Updates
|
|
2184
|
+
* Updates the `Workspace` object to reflect the current state of the Workspace.
|
|
1586
2185
|
*/
|
|
1587
2186
|
refreshReference(): Promise<void>;
|
|
1588
2187
|
|
|
1589
2188
|
/**
|
|
1590
|
-
* Saves the current
|
|
1591
|
-
*
|
|
1592
|
-
* @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.
|
|
1593
2193
|
*/
|
|
1594
2194
|
saveLayout(name: string, config?: SaveLayoutConfig): Promise<void>;
|
|
1595
2195
|
|
|
1596
2196
|
/**
|
|
1597
|
-
*
|
|
1598
|
-
* @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.
|
|
1599
2199
|
*/
|
|
1600
|
-
getBox(predicate: (box: WorkspaceBox) => boolean): WorkspaceBox;
|
|
2200
|
+
getBox(predicate: (box: WorkspaceBox) => boolean): WorkspaceBox | undefined;
|
|
1601
2201
|
|
|
1602
2202
|
/**
|
|
1603
|
-
*
|
|
1604
|
-
* @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.
|
|
1605
2205
|
*/
|
|
1606
2206
|
getAllBoxes(predicate?: (box: WorkspaceBox) => boolean): WorkspaceBox[];
|
|
1607
2207
|
|
|
1608
2208
|
/**
|
|
1609
|
-
*
|
|
1610
|
-
* @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.
|
|
1611
2211
|
*/
|
|
1612
|
-
getRow(predicate: (row: Row) => boolean): Row;
|
|
2212
|
+
getRow(predicate: (row: Row) => boolean): Row | undefined;
|
|
1613
2213
|
|
|
1614
2214
|
/**
|
|
1615
|
-
*
|
|
1616
|
-
* @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.
|
|
1617
2217
|
*/
|
|
1618
2218
|
getAllRows(predicate?: (row: Row) => boolean): Row[];
|
|
1619
2219
|
|
|
1620
2220
|
/**
|
|
1621
|
-
*
|
|
1622
|
-
* @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.
|
|
1623
2223
|
*/
|
|
1624
|
-
getColumn(predicate: (column: Column) => boolean): Column;
|
|
2224
|
+
getColumn(predicate: (column: Column) => boolean): Column | undefined;
|
|
1625
2225
|
|
|
1626
2226
|
/**
|
|
1627
|
-
*
|
|
1628
|
-
* @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.
|
|
1629
2229
|
*/
|
|
1630
2230
|
getAllColumns(predicate?: (columns: Column) => boolean): Column[];
|
|
1631
2231
|
|
|
1632
2232
|
/**
|
|
1633
|
-
*
|
|
1634
|
-
* @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.
|
|
1635
2235
|
*/
|
|
1636
|
-
getGroup(predicate: (group: Group) => boolean): Group;
|
|
2236
|
+
getGroup(predicate: (group: Group) => boolean): Group | undefined;
|
|
1637
2237
|
|
|
1638
2238
|
/**
|
|
1639
|
-
*
|
|
1640
|
-
* @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.
|
|
1641
2241
|
*/
|
|
1642
2242
|
getAllGroups(predicate?: (group: Group) => boolean): Group[];
|
|
1643
2243
|
|
|
1644
2244
|
/**
|
|
1645
|
-
*
|
|
1646
|
-
* @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.
|
|
1647
2247
|
*/
|
|
1648
|
-
getWindow(predicate: (window: WorkspaceWindow) => boolean): WorkspaceWindow;
|
|
2248
|
+
getWindow(predicate: (window: WorkspaceWindow) => boolean): WorkspaceWindow | undefined;
|
|
1649
2249
|
|
|
1650
2250
|
/**
|
|
1651
|
-
*
|
|
1652
|
-
* @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.
|
|
1653
2253
|
*/
|
|
1654
2254
|
getAllWindows(predicate?: (window: WorkspaceWindow) => boolean): WorkspaceWindow[];
|
|
1655
2255
|
|
|
1656
2256
|
/**
|
|
1657
|
-
* Adds a new row to
|
|
1658
|
-
* @param definition
|
|
2257
|
+
* Adds a new row to the Workspace.
|
|
2258
|
+
* @param definition Definition for the row.
|
|
1659
2259
|
*/
|
|
1660
2260
|
addRow(definition?: BoxDefinition): Promise<Row>;
|
|
1661
2261
|
|
|
1662
2262
|
/**
|
|
1663
|
-
* Adds a new column to
|
|
1664
|
-
* @param definition
|
|
2263
|
+
* Adds a new column to the Workspace.
|
|
2264
|
+
* @param definition Definition for the column.
|
|
1665
2265
|
*/
|
|
1666
2266
|
addColumn(definition?: BoxDefinition): Promise<Column>;
|
|
1667
2267
|
|
|
1668
2268
|
/**
|
|
1669
|
-
* Adds a new group to
|
|
1670
|
-
* @param definition
|
|
2269
|
+
* Adds a new window group to the Workspace.
|
|
2270
|
+
* @param definition Definition for the window group.
|
|
1671
2271
|
*/
|
|
1672
2272
|
addGroup(definition?: BoxDefinition): Promise<Group>;
|
|
1673
2273
|
|
|
1674
2274
|
/**
|
|
1675
|
-
* Adds a new window to
|
|
1676
|
-
* @param definition
|
|
2275
|
+
* Adds a new window to the Workspace.
|
|
2276
|
+
* @param definition Definition for the window.
|
|
1677
2277
|
*/
|
|
1678
2278
|
addWindow(definition: WorkspaceWindowDefinition): Promise<WorkspaceWindow>;
|
|
1679
2279
|
|
|
1680
2280
|
/**
|
|
1681
|
-
* Removes the first element
|
|
1682
|
-
* @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.
|
|
1683
2283
|
*/
|
|
1684
2284
|
remove(predicate: (child: WorkspaceElement) => boolean): Promise<void>;
|
|
1685
2285
|
|
|
1686
2286
|
/**
|
|
1687
|
-
* Removes the first immediate child of
|
|
1688
|
-
* @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.
|
|
1689
2289
|
*/
|
|
1690
2290
|
removeChild(predicate: (child: WorkspaceElement) => boolean): Promise<void>;
|
|
1691
2291
|
|
|
1692
2292
|
/**
|
|
1693
|
-
* Transforms
|
|
2293
|
+
* Transforms the Workspace into a Workspace with a single immediate child element of type row that will contain all existing elements.
|
|
1694
2294
|
*/
|
|
1695
2295
|
bundleToRow(): Promise<void>;
|
|
1696
2296
|
|
|
1697
2297
|
/**
|
|
1698
|
-
* Transforms
|
|
2298
|
+
* Transforms the Workspace into a Workspace with a single immediate child element of type column that will contain all existing elements.
|
|
1699
2299
|
*/
|
|
1700
2300
|
bundleToColumn(): Promise<void>;
|
|
1701
2301
|
|
|
1702
2302
|
/**
|
|
1703
|
-
*
|
|
2303
|
+
* Hibernates the Workspace. All windows in the Workspace will be closed, but the Workspace structure will be preserved.
|
|
1704
2304
|
*/
|
|
1705
2305
|
hibernate(): Promise<void>;
|
|
1706
2306
|
|
|
1707
2307
|
/**
|
|
1708
|
-
* Resumes
|
|
2308
|
+
* Resumes the hibernated Workspace. All windows that have been closed during hibernation will be reloaded.
|
|
1709
2309
|
*/
|
|
1710
2310
|
resume(): Promise<void>;
|
|
1711
2311
|
|
|
1712
2312
|
/**
|
|
1713
|
-
* Locks the
|
|
1714
|
-
*
|
|
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.
|
|
1715
2318
|
*/
|
|
1716
2319
|
lock(config?: WorkspaceLockConfig | ((config: WorkspaceLockConfig) => WorkspaceLockConfig)): Promise<void>;
|
|
1717
2320
|
|
|
@@ -1720,40 +2323,43 @@ export namespace IOConnectWorkspaces {
|
|
|
1720
2323
|
* *Available only in **io.Connect Desktop**.*
|
|
1721
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.
|
|
1722
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
|
|
1723
2328
|
*/
|
|
1724
2329
|
setWindowDragMode(mode: "keepInside" | "autoEject"): Promise<void>;
|
|
1725
2330
|
|
|
1726
2331
|
/**
|
|
1727
|
-
* Sets the loading strategy
|
|
2332
|
+
* Sets the loading strategy of the Workspace at runtime.
|
|
1728
2333
|
* This will override the current loading strategy for the Workspace that may have been specified via configuration or programmatically
|
|
1729
2334
|
* when creating or restoring the Workspace. The loading strategy specified via this method will be preserved in the Workspace Layout
|
|
1730
2335
|
* only if the Workspace is saved afterwards and the `"persistCurrentStrategy"` flag is set to `true` in the Workspaces App definition.
|
|
1731
2336
|
* *Available only in **io.Connect Desktop**.*
|
|
1732
2337
|
* @since io.Connect Desktop 9.8
|
|
2338
|
+
* @since @interopio/workspaces-api 3.5.6
|
|
1733
2339
|
* @param strategy Loading strategy for the Workspace.
|
|
1734
2340
|
*/
|
|
1735
2341
|
setLoadingStrategy(strategy: LoadingStrategy): Promise<void>;
|
|
1736
2342
|
|
|
1737
2343
|
/**
|
|
1738
|
-
* Notifies when
|
|
1739
|
-
* @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.
|
|
1740
2346
|
*/
|
|
1741
2347
|
onClosed(callback: (closed?: WorkspaceClosedData) => void): Promise<Unsubscribe>;
|
|
1742
2348
|
|
|
1743
2349
|
/**
|
|
1744
|
-
* Notifies when the
|
|
1745
|
-
* @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.
|
|
1746
2352
|
*/
|
|
1747
2353
|
onLockConfigurationChanged(callback: (config: IOConnectWorkspaces.WorkspaceLockConfig) => void): Promise<IOConnectWorkspaces.Unsubscribe>;
|
|
1748
2354
|
|
|
1749
2355
|
/**
|
|
1750
|
-
* Notifies when the Workspace
|
|
2356
|
+
* Notifies when the Workspace has been hibernated. Returns an unsubscribe function.
|
|
1751
2357
|
* @param callback Callback function for handling the event.
|
|
1752
2358
|
*/
|
|
1753
2359
|
onHibernated(callback: () => void): Promise<IOConnectWorkspaces.Unsubscribe>;
|
|
1754
2360
|
|
|
1755
2361
|
/**
|
|
1756
|
-
* Notifies when the Workspace
|
|
2362
|
+
* Notifies when the Workspace has been resumed after being hibernated. Returns an unsubscribe function.
|
|
1757
2363
|
* @param callback Callback function for handling the event.
|
|
1758
2364
|
*/
|
|
1759
2365
|
onResumed(callback: () => void): Promise<IOConnectWorkspaces.Unsubscribe>;
|
|
@@ -1777,482 +2383,637 @@ export namespace IOConnectWorkspaces {
|
|
|
1777
2383
|
onWindowTabReordered(callback: (window: WorkspaceWindow) => void): Promise<IOConnectWorkspaces.Unsubscribe>;
|
|
1778
2384
|
|
|
1779
2385
|
/**
|
|
1780
|
-
* Notifies when a new window
|
|
1781
|
-
* An added window
|
|
1782
|
-
* @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.
|
|
1783
2389
|
*/
|
|
1784
2390
|
onWindowAdded(callback: (window: WorkspaceWindow) => void): Promise<Unsubscribe>;
|
|
1785
2391
|
|
|
1786
2392
|
/**
|
|
1787
|
-
* Notifies when a window
|
|
1788
|
-
*
|
|
1789
|
-
* @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.
|
|
1790
2396
|
*/
|
|
1791
2397
|
onWindowRemoved(callback: (removed: { windowId?: string; workspaceId: string; frameId: string }) => void): Promise<Unsubscribe>;
|
|
1792
2398
|
|
|
1793
2399
|
/**
|
|
1794
|
-
* Notifies when a window
|
|
1795
|
-
* A loaded window is a window
|
|
1796
|
-
* @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.
|
|
1797
2403
|
*/
|
|
1798
2404
|
onWindowLoaded(callback: (window: WorkspaceWindow) => void): Promise<Unsubscribe>;
|
|
2405
|
+
|
|
1799
2406
|
/**
|
|
1800
|
-
|
|
1801
|
-
|
|
1802
|
-
|
|
1803
|
-
|
|
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
|
+
*/
|
|
1804
2411
|
onWindowMaximized(callback: (window: IOConnectWorkspaces.WorkspaceWindow) => void): Promise<IOConnectWorkspaces.Unsubscribe>;
|
|
1805
2412
|
|
|
1806
2413
|
/**
|
|
1807
|
-
|
|
1808
|
-
|
|
1809
|
-
|
|
1810
|
-
|
|
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
|
+
*/
|
|
1811
2418
|
onWindowRestored(callback: (window: IOConnectWorkspaces.WorkspaceWindow) => void): Promise<IOConnectWorkspaces.Unsubscribe>;
|
|
1812
2419
|
|
|
1813
2420
|
/**
|
|
1814
|
-
* Notifies when a window
|
|
1815
|
-
* @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.
|
|
1816
2423
|
*/
|
|
1817
2424
|
onWindowSelected(callback: (window: IOConnectWorkspaces.WorkspaceWindow) => void): Promise<IOConnectWorkspaces.Unsubscribe>;
|
|
1818
2425
|
|
|
1819
2426
|
/**
|
|
1820
|
-
*
|
|
2427
|
+
* Flag indicating whether the Workspace is pinned.
|
|
1821
2428
|
*/
|
|
1822
2429
|
isPinned?: boolean;
|
|
1823
2430
|
|
|
1824
2431
|
/**
|
|
1825
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.
|
|
1826
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
|
|
1827
2436
|
*/
|
|
1828
2437
|
windowDragMode?: "keepInside" | "autoEject";
|
|
1829
2438
|
|
|
1830
2439
|
/**
|
|
1831
|
-
*
|
|
2440
|
+
* Icon of the Workspace in the format in which it has been provided.
|
|
1832
2441
|
*/
|
|
1833
2442
|
icon?: string;
|
|
1834
2443
|
|
|
1835
2444
|
/**
|
|
1836
|
-
*
|
|
1837
|
-
*
|
|
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.
|
|
1838
2448
|
*/
|
|
1839
2449
|
pin(options?: WorkspacePinOptions): Promise<void>;
|
|
1840
2450
|
|
|
1841
2451
|
/**
|
|
1842
|
-
*
|
|
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.
|
|
1843
2454
|
*/
|
|
1844
2455
|
unpin(): Promise<void>;
|
|
1845
2456
|
|
|
1846
2457
|
/**
|
|
1847
|
-
*
|
|
2458
|
+
* Retrieves the icon of the Workspace.
|
|
1848
2459
|
*/
|
|
1849
2460
|
getIcon(): Promise<string>;
|
|
1850
2461
|
|
|
1851
2462
|
/**
|
|
1852
|
-
*
|
|
1853
|
-
* @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.
|
|
1854
2465
|
*/
|
|
1855
2466
|
setIcon(icon: string): Promise<void>;
|
|
1856
2467
|
|
|
1857
2468
|
/**
|
|
1858
|
-
* Shows the loading animation of the
|
|
2469
|
+
* Shows the loading animation of the Workspace.
|
|
1859
2470
|
* *Available only in **io.Connect Desktop**.*
|
|
1860
2471
|
*/
|
|
1861
2472
|
showLoadingAnimation(): Promise<void>;
|
|
1862
2473
|
|
|
1863
2474
|
/**
|
|
1864
|
-
* Hides the loading animation of the
|
|
2475
|
+
* Hides the loading animation of the Workspace.
|
|
1865
2476
|
* *Available only in **io.Connect Desktop**.*
|
|
1866
2477
|
*/
|
|
1867
2478
|
hideLoadingAnimation(): Promise<void>;
|
|
1868
2479
|
}
|
|
1869
2480
|
|
|
1870
|
-
/**
|
|
2481
|
+
/**
|
|
2482
|
+
* Describes the basic details of a box element.
|
|
2483
|
+
*/
|
|
1871
2484
|
export interface BoxSummary {
|
|
1872
2485
|
|
|
1873
|
-
/**
|
|
2486
|
+
/**
|
|
2487
|
+
* Unique ID of the box element.
|
|
2488
|
+
*/
|
|
1874
2489
|
id: string;
|
|
1875
2490
|
|
|
1876
|
-
/**
|
|
2491
|
+
/**
|
|
2492
|
+
* ID of the `Frame` instance containing the box element.
|
|
2493
|
+
*/
|
|
1877
2494
|
frameId: string;
|
|
1878
2495
|
|
|
1879
|
-
/**
|
|
2496
|
+
/**
|
|
2497
|
+
* ID of the Workspace containing the box element.
|
|
2498
|
+
*/
|
|
1880
2499
|
workspaceId: string;
|
|
1881
2500
|
|
|
1882
|
-
/**
|
|
2501
|
+
/**
|
|
2502
|
+
* Position of the box element relative to its sibling elements.
|
|
2503
|
+
*/
|
|
1883
2504
|
positionIndex: number;
|
|
1884
2505
|
|
|
1885
|
-
/**
|
|
2506
|
+
/**
|
|
2507
|
+
* Flag indicating whether the user can add windows by dropping them in the box element.
|
|
2508
|
+
*/
|
|
1886
2509
|
allowDrop?: boolean;
|
|
1887
2510
|
|
|
1888
|
-
/**
|
|
2511
|
+
/**
|
|
2512
|
+
* Minimum width in pixels of the box element, calculated using the size constraints of the elements in it.
|
|
2513
|
+
*/
|
|
1889
2514
|
minWidth?: number;
|
|
1890
2515
|
|
|
1891
|
-
/**
|
|
2516
|
+
/**
|
|
2517
|
+
* Minimum height in pixels of the box element, calculated using the size constraints of the elements in it.
|
|
2518
|
+
*/
|
|
1892
2519
|
minHeight?: number;
|
|
1893
2520
|
|
|
1894
|
-
/**
|
|
2521
|
+
/**
|
|
2522
|
+
* Maximum width in pixels of the box element, calculated using the size constraints of the elements in it.
|
|
2523
|
+
*/
|
|
1895
2524
|
maxWidth?: number;
|
|
1896
2525
|
|
|
1897
|
-
/**
|
|
2526
|
+
/**
|
|
2527
|
+
* Maximum height in pixels of the box element, calculated using the size constraints of the elements in it.
|
|
2528
|
+
*/
|
|
1898
2529
|
maxHeight?: number;
|
|
1899
2530
|
|
|
1900
|
-
/**
|
|
2531
|
+
/**
|
|
2532
|
+
* Width in pixels of the box element.
|
|
2533
|
+
*/
|
|
1901
2534
|
width?: number;
|
|
1902
2535
|
|
|
1903
|
-
/**
|
|
2536
|
+
/**
|
|
2537
|
+
* Height in pixels of the box element.
|
|
2538
|
+
*/
|
|
1904
2539
|
height?: number;
|
|
1905
2540
|
|
|
1906
|
-
/**
|
|
2541
|
+
/**
|
|
2542
|
+
* Flag indicating whether the box element is maximized.
|
|
2543
|
+
*/
|
|
1907
2544
|
isMaximized?: boolean;
|
|
1908
2545
|
}
|
|
1909
2546
|
|
|
1910
|
-
/**
|
|
2547
|
+
/**
|
|
2548
|
+
* Describes a box element in a Workspace.
|
|
2549
|
+
*/
|
|
1911
2550
|
export interface Box extends BoxSummary {
|
|
1912
2551
|
|
|
1913
|
-
/**
|
|
2552
|
+
/**
|
|
2553
|
+
* Array of objects, each describing an immediate child element of the box element.
|
|
2554
|
+
*/
|
|
1914
2555
|
children: WorkspaceElement[];
|
|
1915
2556
|
|
|
1916
|
-
/**
|
|
2557
|
+
/**
|
|
2558
|
+
* Parent of the box element - a Workspace or another box element.
|
|
2559
|
+
*/
|
|
1917
2560
|
parent: Workspace | WorkspaceBox;
|
|
1918
2561
|
|
|
1919
|
-
/**
|
|
2562
|
+
/**
|
|
2563
|
+
* `Frame` instance containing the box element.
|
|
2564
|
+
*/
|
|
1920
2565
|
frame: Frame;
|
|
1921
2566
|
|
|
1922
|
-
/**
|
|
2567
|
+
/**
|
|
2568
|
+
* Workspace containing the box element.
|
|
2569
|
+
*/
|
|
1923
2570
|
workspace: Workspace;
|
|
1924
2571
|
|
|
1925
2572
|
/**
|
|
1926
|
-
* Opens a new window
|
|
1927
|
-
* @param definition
|
|
2573
|
+
* Opens a new window in the box element and loads its contents.
|
|
2574
|
+
* @param definition Definition for the window.
|
|
1928
2575
|
*/
|
|
1929
2576
|
addWindow(definition: WorkspaceWindowDefinition): Promise<WorkspaceWindow>;
|
|
1930
2577
|
|
|
1931
2578
|
/**
|
|
1932
|
-
* Adds a new group
|
|
1933
|
-
* @param definition
|
|
2579
|
+
* Adds a new window group to the box element.
|
|
2580
|
+
* @param definition Definition or a builder for the window group.
|
|
1934
2581
|
*/
|
|
1935
2582
|
addGroup(definition?: BoxDefinition | BoxBuilder): Promise<Group>;
|
|
1936
2583
|
|
|
1937
2584
|
/**
|
|
1938
|
-
* Adds a new column
|
|
1939
|
-
* @param definition
|
|
2585
|
+
* Adds a new column to the box element.
|
|
2586
|
+
* @param definition Definition or a builder for the column.
|
|
1940
2587
|
*/
|
|
1941
2588
|
addColumn(definition?: BoxDefinition | BoxBuilder): Promise<Column>;
|
|
1942
2589
|
|
|
1943
2590
|
/**
|
|
1944
|
-
* Adds a new row
|
|
1945
|
-
* @param definition
|
|
2591
|
+
* Adds a new row to the box element.
|
|
2592
|
+
* @param definition Definition or a builder for the row.
|
|
1946
2593
|
*/
|
|
1947
2594
|
addRow(definition?: BoxDefinition | BoxBuilder): Promise<Row>;
|
|
1948
2595
|
|
|
1949
2596
|
/**
|
|
1950
|
-
* Removes the first immediate child of
|
|
1951
|
-
* @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.
|
|
1952
2599
|
*/
|
|
1953
2600
|
removeChild(predicate: (child: WorkspaceElement) => boolean): Promise<void>;
|
|
1954
2601
|
|
|
1955
2602
|
/**
|
|
1956
|
-
* Maximizes
|
|
2603
|
+
* Maximizes the box element within the bounds of the Workspace, or within the nearest parent element set as a maximization boundary.
|
|
1957
2604
|
*/
|
|
1958
2605
|
maximize(): Promise<void>;
|
|
1959
2606
|
|
|
1960
2607
|
/**
|
|
1961
|
-
* Restores
|
|
2608
|
+
* Restores the box element if it has been previously maximized.
|
|
1962
2609
|
*/
|
|
1963
2610
|
restore(): Promise<void>;
|
|
1964
2611
|
|
|
1965
2612
|
/**
|
|
1966
|
-
* Closes
|
|
2613
|
+
* Closes the box element and all its child elements.
|
|
1967
2614
|
*/
|
|
1968
2615
|
close(): Promise<void>;
|
|
1969
2616
|
}
|
|
1970
2617
|
|
|
1971
|
-
/**
|
|
2618
|
+
/**
|
|
2619
|
+
* Describes a Workspace row.
|
|
2620
|
+
*/
|
|
1972
2621
|
export interface Row extends Box {
|
|
2622
|
+
/**
|
|
2623
|
+
* Type of the box element.
|
|
2624
|
+
*/
|
|
1973
2625
|
type: "row";
|
|
1974
2626
|
|
|
1975
|
-
/**
|
|
2627
|
+
/**
|
|
2628
|
+
* Flag indicating whether the user can resize the row by dragging the splitters.
|
|
2629
|
+
*/
|
|
1976
2630
|
allowSplitters?: boolean;
|
|
1977
2631
|
|
|
1978
|
-
/**
|
|
2632
|
+
/**
|
|
2633
|
+
* Flag indicating whether the row is pinned.
|
|
2634
|
+
*/
|
|
1979
2635
|
isPinned?: boolean;
|
|
1980
2636
|
|
|
1981
|
-
/**
|
|
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
|
+
*/
|
|
1982
2640
|
maximizationBoundary?: boolean;
|
|
1983
2641
|
|
|
1984
2642
|
/**
|
|
1985
|
-
* Locks the row
|
|
1986
|
-
*
|
|
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.
|
|
1987
2648
|
*/
|
|
1988
2649
|
lock(config?: RowLockConfig | ((config: RowLockConfig) => RowLockConfig)): Promise<void>;
|
|
1989
2650
|
|
|
1990
2651
|
/**
|
|
1991
|
-
* Sets
|
|
1992
|
-
* @param height
|
|
2652
|
+
* Sets the height of the row.
|
|
2653
|
+
* @param height Height in pixels for the row.
|
|
1993
2654
|
*/
|
|
1994
2655
|
setHeight(height: number): Promise<void>;
|
|
1995
2656
|
|
|
1996
2657
|
/**
|
|
1997
|
-
|
|
1998
|
-
|
|
1999
|
-
|
|
2000
|
-
|
|
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>;
|
|
2001
2663
|
|
|
2002
2664
|
/**
|
|
2003
|
-
* Notifies when the
|
|
2004
|
-
* @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.
|
|
2005
2667
|
*/
|
|
2006
2668
|
onLockConfigurationChanged(callback: (config: IOConnectWorkspaces.RowLockConfig) => void): Promise<IOConnectWorkspaces.Unsubscribe>
|
|
2007
2669
|
}
|
|
2008
2670
|
|
|
2009
|
-
/**
|
|
2671
|
+
/**
|
|
2672
|
+
* Describes a Workspace column.
|
|
2673
|
+
*/
|
|
2010
2674
|
export interface Column extends Box {
|
|
2675
|
+
/**
|
|
2676
|
+
* Type of the box element.
|
|
2677
|
+
*/
|
|
2011
2678
|
type: "column";
|
|
2012
2679
|
|
|
2013
|
-
/**
|
|
2680
|
+
/**
|
|
2681
|
+
* Flag indicating whether the user can resize the column by dragging the splitters.
|
|
2682
|
+
*/
|
|
2014
2683
|
allowSplitters?: boolean;
|
|
2015
2684
|
|
|
2016
|
-
/**
|
|
2685
|
+
/**
|
|
2686
|
+
* Flag indicating whether the column is pinned.
|
|
2687
|
+
*/
|
|
2017
2688
|
isPinned?: boolean;
|
|
2018
2689
|
|
|
2019
|
-
/**
|
|
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
|
+
*/
|
|
2020
2693
|
maximizationBoundary?: boolean;
|
|
2021
2694
|
|
|
2022
2695
|
/**
|
|
2023
|
-
* Locks the column
|
|
2024
|
-
*
|
|
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.
|
|
2025
2701
|
*/
|
|
2026
2702
|
lock(config?: ColumnLockConfig | ((config: ColumnLockConfig) => ColumnLockConfig)): Promise<void>;
|
|
2027
2703
|
|
|
2028
2704
|
/**
|
|
2029
|
-
* Sets
|
|
2030
|
-
* @param width
|
|
2705
|
+
* Sets the width of the column.
|
|
2706
|
+
* @param width Width in pixels for the column.
|
|
2031
2707
|
*/
|
|
2032
2708
|
setWidth(width: number): Promise<void>;
|
|
2033
2709
|
|
|
2034
2710
|
/**
|
|
2035
|
-
*
|
|
2036
|
-
*
|
|
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.
|
|
2037
2714
|
*/
|
|
2038
|
-
setMaximizationBoundary(config: SetMaximizationBoundaryConfig): Promise<void
|
|
2715
|
+
setMaximizationBoundary(config: SetMaximizationBoundaryConfig): Promise<void>;
|
|
2039
2716
|
|
|
2040
2717
|
/**
|
|
2041
|
-
* Notifies when the
|
|
2042
|
-
* @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.
|
|
2043
2720
|
*/
|
|
2044
2721
|
onLockConfigurationChanged(callback: (config: IOConnectWorkspaces.ColumnLockConfig) => void): Promise<IOConnectWorkspaces.Unsubscribe>
|
|
2045
2722
|
}
|
|
2046
2723
|
|
|
2047
|
-
/**
|
|
2724
|
+
/**
|
|
2725
|
+
* Describes a window group in a Workspace.
|
|
2726
|
+
*/
|
|
2048
2727
|
export interface Group extends Box {
|
|
2728
|
+
/**
|
|
2729
|
+
* Type of the box element.
|
|
2730
|
+
*/
|
|
2049
2731
|
type: "group";
|
|
2050
2732
|
|
|
2051
|
-
/**
|
|
2733
|
+
/**
|
|
2734
|
+
* Flag indicating whether the user can extract windows from the window group.
|
|
2735
|
+
*/
|
|
2052
2736
|
allowExtract?: boolean;
|
|
2053
2737
|
|
|
2054
|
-
/**
|
|
2738
|
+
/**
|
|
2739
|
+
* Flag indicating whether the user can reorder the windows in the window group.
|
|
2740
|
+
*/
|
|
2055
2741
|
allowReorder?: boolean;
|
|
2056
2742
|
|
|
2057
|
-
/**
|
|
2743
|
+
/**
|
|
2744
|
+
* Flag indicating whether the user can add windows by dropping them in the leftmost area of the window group.
|
|
2745
|
+
*/
|
|
2058
2746
|
allowDropLeft?: boolean;
|
|
2059
2747
|
|
|
2060
|
-
/**
|
|
2748
|
+
/**
|
|
2749
|
+
* Flag indicating whether the user can add windows by dropping them in the rightmost area of the window group.
|
|
2750
|
+
*/
|
|
2061
2751
|
allowDropRight?: boolean;
|
|
2062
2752
|
|
|
2063
|
-
/**
|
|
2753
|
+
/**
|
|
2754
|
+
* Flag indicating whether the user can add windows by dropping them in the topmost area of the window group.
|
|
2755
|
+
*/
|
|
2064
2756
|
allowDropTop?: boolean;
|
|
2065
2757
|
|
|
2066
|
-
/**
|
|
2758
|
+
/**
|
|
2759
|
+
* Flag indicating whether the user can add windows by dropping them in the bottommost area of the window group.
|
|
2760
|
+
*/
|
|
2067
2761
|
allowDropBottom?: boolean;
|
|
2068
2762
|
|
|
2069
|
-
/**
|
|
2763
|
+
/**
|
|
2764
|
+
* Flag indicating whether the user can add windows by dropping them in the header area of the window group.
|
|
2765
|
+
*/
|
|
2070
2766
|
allowDropHeader?: boolean;
|
|
2071
2767
|
|
|
2072
|
-
/**
|
|
2768
|
+
/**
|
|
2769
|
+
* Flag indicating whether the "Maximize" button in the header of the window group is visible.
|
|
2770
|
+
*/
|
|
2073
2771
|
showMaximizeButton?: boolean;
|
|
2074
2772
|
|
|
2075
|
-
/**
|
|
2773
|
+
/**
|
|
2774
|
+
* Flag indicating whether the "Eject" button in the header of the window group is visible.
|
|
2775
|
+
*/
|
|
2076
2776
|
showEjectButton?: boolean;
|
|
2077
2777
|
|
|
2078
|
-
/**
|
|
2778
|
+
/**
|
|
2779
|
+
* Flag indicating whether the "Add Window" button (the "+" button) in the header of the window group is visible.
|
|
2780
|
+
*/
|
|
2079
2781
|
showAddWindowButton?: boolean;
|
|
2080
2782
|
|
|
2081
2783
|
/**
|
|
2082
|
-
* Locks the group
|
|
2083
|
-
*
|
|
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.
|
|
2084
2789
|
*/
|
|
2085
2790
|
lock(config?: GroupLockConfig | ((config: GroupLockConfig) => GroupLockConfig)): Promise<void>;
|
|
2086
2791
|
|
|
2087
2792
|
/**
|
|
2088
|
-
* Sets
|
|
2089
|
-
* @param sizeConfig
|
|
2793
|
+
* Sets the size of the window group.
|
|
2794
|
+
* @param sizeConfig Size for the window group.
|
|
2090
2795
|
*/
|
|
2091
2796
|
setSize(sizeConfig: ElementResizeConfig): Promise<void>;
|
|
2092
2797
|
|
|
2093
2798
|
/**
|
|
2094
|
-
* 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.
|
|
2095
2800
|
*/
|
|
2096
2801
|
bundleToColumn(): Promise<void>;
|
|
2097
2802
|
|
|
2098
2803
|
/**
|
|
2099
|
-
* 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.
|
|
2100
2805
|
*/
|
|
2101
2806
|
bundleToRow(): Promise<void>;
|
|
2102
2807
|
|
|
2103
2808
|
/**
|
|
2104
|
-
* Notifies when
|
|
2105
|
-
* @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.
|
|
2106
2811
|
*/
|
|
2107
2812
|
onLockConfigurationChanged(callback: (config: IOConnectWorkspaces.GroupLockConfig) => void): Promise<IOConnectWorkspaces.Unsubscribe>
|
|
2108
2813
|
}
|
|
2109
2814
|
|
|
2110
|
-
/**
|
|
2815
|
+
/**
|
|
2816
|
+
* Describes the basic details of a Workspace window.
|
|
2817
|
+
*/
|
|
2111
2818
|
export interface WorkspaceWindowSummary {
|
|
2112
|
-
/**
|
|
2819
|
+
/**
|
|
2820
|
+
* Unique ID of the window.
|
|
2821
|
+
*/
|
|
2113
2822
|
id: string | undefined;
|
|
2114
2823
|
|
|
2115
|
-
/**
|
|
2824
|
+
/**
|
|
2825
|
+
* Unique ID of the Workspace element hosting the window.
|
|
2826
|
+
*/
|
|
2116
2827
|
elementId: string;
|
|
2117
2828
|
|
|
2118
|
-
/**
|
|
2829
|
+
/**
|
|
2830
|
+
* Type of the Workspace element.
|
|
2831
|
+
*/
|
|
2119
2832
|
type: "window";
|
|
2120
2833
|
|
|
2121
|
-
/**
|
|
2834
|
+
/**
|
|
2835
|
+
* ID of the `Frame` instance containing the window.
|
|
2836
|
+
*/
|
|
2122
2837
|
frameId: string;
|
|
2123
2838
|
|
|
2124
|
-
/**
|
|
2839
|
+
/**
|
|
2840
|
+
* Name of the app, if the window is defined as an app.
|
|
2841
|
+
*/
|
|
2125
2842
|
appName: string;
|
|
2126
2843
|
|
|
2127
|
-
/**
|
|
2844
|
+
/**
|
|
2845
|
+
* ID of the Workspace containing the window.
|
|
2846
|
+
*/
|
|
2128
2847
|
workspaceId: string;
|
|
2129
2848
|
|
|
2130
|
-
/**
|
|
2849
|
+
/**
|
|
2850
|
+
* Position of the window relative to its sibling elements.
|
|
2851
|
+
*/
|
|
2131
2852
|
positionIndex: number;
|
|
2132
2853
|
|
|
2133
|
-
/**
|
|
2854
|
+
/**
|
|
2855
|
+
* Flag indicating whether the window is maximized within its parent element.
|
|
2856
|
+
*/
|
|
2134
2857
|
isMaximized: boolean;
|
|
2135
2858
|
|
|
2136
|
-
/**
|
|
2859
|
+
/**
|
|
2860
|
+
* Flag indicating whether the window is selected.
|
|
2861
|
+
*/
|
|
2137
2862
|
isSelected: boolean;
|
|
2138
2863
|
|
|
2139
|
-
/**
|
|
2864
|
+
/**
|
|
2865
|
+
* Flag indicating whether the contents of the window have been loaded.
|
|
2866
|
+
*/
|
|
2140
2867
|
isLoaded: boolean;
|
|
2141
2868
|
|
|
2142
|
-
/**
|
|
2869
|
+
/**
|
|
2870
|
+
* Flag indicating whether the window is on focus.
|
|
2871
|
+
*/
|
|
2143
2872
|
focused: boolean;
|
|
2144
2873
|
|
|
2145
|
-
/**
|
|
2874
|
+
/**
|
|
2875
|
+
* Title of the window.
|
|
2876
|
+
*/
|
|
2146
2877
|
title: string;
|
|
2147
2878
|
|
|
2148
|
-
/**
|
|
2879
|
+
/**
|
|
2880
|
+
* Flag indicating whether the user can extract the window from the Workspace.
|
|
2881
|
+
*/
|
|
2149
2882
|
allowExtract?: boolean;
|
|
2150
2883
|
|
|
2151
|
-
/**
|
|
2884
|
+
/**
|
|
2885
|
+
* Flag indicating whether the user can reorder the window in the window group.
|
|
2886
|
+
*/
|
|
2152
2887
|
allowReorder?: boolean;
|
|
2153
2888
|
|
|
2154
|
-
/**
|
|
2889
|
+
/**
|
|
2890
|
+
* Flag indicating whether the "Close" button in the window tab is visible.
|
|
2891
|
+
*/
|
|
2155
2892
|
showCloseButton?: boolean;
|
|
2156
2893
|
|
|
2157
|
-
/**
|
|
2894
|
+
/**
|
|
2895
|
+
* Width in pixels of the window.
|
|
2896
|
+
*/
|
|
2158
2897
|
width?: number;
|
|
2159
2898
|
|
|
2160
|
-
/**
|
|
2899
|
+
/**
|
|
2900
|
+
* Height in pixels of the window.
|
|
2901
|
+
*/
|
|
2161
2902
|
height?: number;
|
|
2162
2903
|
|
|
2163
|
-
/**
|
|
2904
|
+
/**
|
|
2905
|
+
* Minimum width in pixels of the window.
|
|
2906
|
+
*/
|
|
2164
2907
|
minWidth?: number;
|
|
2165
2908
|
|
|
2166
|
-
/**
|
|
2909
|
+
/**
|
|
2910
|
+
* Minimum height in pixels of the window.
|
|
2911
|
+
*/
|
|
2167
2912
|
minHeight?: number;
|
|
2168
2913
|
|
|
2169
|
-
/**
|
|
2914
|
+
/**
|
|
2915
|
+
* Maximum width in pixels of the window.
|
|
2916
|
+
*/
|
|
2170
2917
|
maxWidth?: number;
|
|
2171
2918
|
|
|
2172
|
-
/**
|
|
2919
|
+
/**
|
|
2920
|
+
* Maximum height in pixels of the window.
|
|
2921
|
+
*/
|
|
2173
2922
|
maxHeight?: number;
|
|
2174
2923
|
}
|
|
2175
2924
|
|
|
2176
|
-
/**
|
|
2925
|
+
/**
|
|
2926
|
+
* Describes a window in a Workspace.
|
|
2927
|
+
*/
|
|
2177
2928
|
export interface WorkspaceWindow extends WorkspaceWindowSummary {
|
|
2178
2929
|
|
|
2179
|
-
/**
|
|
2930
|
+
/**
|
|
2931
|
+
* Workspace containing the window.
|
|
2932
|
+
*/
|
|
2180
2933
|
workspace: Workspace;
|
|
2181
2934
|
|
|
2182
|
-
/**
|
|
2935
|
+
/**
|
|
2936
|
+
* `Frame` instance containing the window.
|
|
2937
|
+
*/
|
|
2183
2938
|
frame: Frame;
|
|
2184
2939
|
|
|
2185
|
-
/**
|
|
2940
|
+
/**
|
|
2941
|
+
* Parent of the window - a Workspace or a box element.
|
|
2942
|
+
*/
|
|
2186
2943
|
parent: Workspace | WorkspaceBox;
|
|
2187
2944
|
|
|
2188
2945
|
/**
|
|
2189
|
-
* 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.
|
|
2190
2947
|
*/
|
|
2191
2948
|
forceLoad(): Promise<void>;
|
|
2192
2949
|
|
|
2193
2950
|
/**
|
|
2194
|
-
*
|
|
2951
|
+
* Focuses the window.
|
|
2195
2952
|
*/
|
|
2196
2953
|
focus(): Promise<void>;
|
|
2197
2954
|
|
|
2198
2955
|
/**
|
|
2199
|
-
* Closes the
|
|
2956
|
+
* Closes the window.
|
|
2200
2957
|
*/
|
|
2201
2958
|
close(): Promise<void>;
|
|
2202
2959
|
|
|
2203
2960
|
/**
|
|
2204
|
-
* Sets
|
|
2205
|
-
* @param title
|
|
2961
|
+
* Sets the title of the window.
|
|
2962
|
+
* @param title Title for the window.
|
|
2206
2963
|
*/
|
|
2207
2964
|
setTitle(title: string): Promise<void>;
|
|
2208
2965
|
|
|
2209
2966
|
/**
|
|
2210
|
-
* Maximizes the
|
|
2967
|
+
* Maximizes the window within the bounds of the Workspace, or within the nearest parent element set as a maximization boundary.
|
|
2211
2968
|
*/
|
|
2212
2969
|
maximize(): Promise<void>;
|
|
2213
2970
|
|
|
2214
2971
|
/**
|
|
2215
|
-
* Restores
|
|
2972
|
+
* Restores the window if it has been previously maximized.
|
|
2216
2973
|
*/
|
|
2217
2974
|
restore(): Promise<void>;
|
|
2218
2975
|
|
|
2219
2976
|
/**
|
|
2220
|
-
* Removes
|
|
2977
|
+
* Removes the window from the Workspace and turns it into a standalone window.
|
|
2221
2978
|
*/
|
|
2222
2979
|
eject(): Promise<any>;
|
|
2223
2980
|
|
|
2224
2981
|
/**
|
|
2225
|
-
*
|
|
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**.
|
|
2226
2984
|
*/
|
|
2227
2985
|
getGdWindow(): any;
|
|
2228
2986
|
|
|
2229
2987
|
/**
|
|
2230
|
-
* Moves the
|
|
2231
|
-
* @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.
|
|
2232
2990
|
*/
|
|
2233
2991
|
moveTo(box: WorkspaceBox): Promise<void>;
|
|
2234
2992
|
|
|
2235
2993
|
/**
|
|
2236
|
-
* Sets
|
|
2237
|
-
* @param sizeConfig
|
|
2994
|
+
* Sets the size of the window.
|
|
2995
|
+
* @param sizeConfig Size for the window.
|
|
2238
2996
|
*/
|
|
2239
2997
|
setSize(sizeConfig: ElementResizeConfig): Promise<void>;
|
|
2240
2998
|
|
|
2241
2999
|
/**
|
|
2242
|
-
* Locks the window
|
|
2243
|
-
*
|
|
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.
|
|
2244
3005
|
*/
|
|
2245
3006
|
lock(config?: IOConnectWorkspaces.WorkspaceWindowLockConfig | ((config: IOConnectWorkspaces.WorkspaceWindowLockConfig) => IOConnectWorkspaces.WorkspaceWindowLockConfig)): Promise<void>;
|
|
2246
3007
|
|
|
2247
3008
|
/**
|
|
2248
|
-
* Notifies when
|
|
2249
|
-
* @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.
|
|
2250
3011
|
*/
|
|
2251
3012
|
onRemoved(callback: () => void): Promise<Unsubscribe>;
|
|
2252
3013
|
|
|
2253
3014
|
/**
|
|
2254
|
-
* Notifies when
|
|
2255
|
-
* @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.
|
|
2256
3017
|
*/
|
|
2257
3018
|
onLockConfigurationChanged(callback: (config: IOConnectWorkspaces.WorkspaceWindowLockConfig) => void): Promise<IOConnectWorkspaces.Unsubscribe>
|
|
2258
3019
|
|
|
@@ -2266,94 +3027,114 @@ export namespace IOConnectWorkspaces {
|
|
|
2266
3027
|
onTabReordered(callback: () => void): Promise<IOConnectWorkspaces.Unsubscribe>;
|
|
2267
3028
|
}
|
|
2268
3029
|
|
|
2269
|
-
/**
|
|
3030
|
+
/**
|
|
3031
|
+
* Describes a builder for creating Workspaces.
|
|
3032
|
+
*/
|
|
2270
3033
|
export interface WorkspaceBuilder {
|
|
2271
3034
|
/**
|
|
2272
|
-
* Adds a new row to the
|
|
2273
|
-
* @param
|
|
3035
|
+
* Adds a new row to the Workspace. Returns a builder for the new row.
|
|
3036
|
+
* @param definition Definition for the row.
|
|
2274
3037
|
*/
|
|
2275
3038
|
addRow(definition?: BoxDefinition): BoxBuilder;
|
|
2276
3039
|
|
|
2277
3040
|
/**
|
|
2278
|
-
* Adds a new column to the
|
|
2279
|
-
* @param
|
|
3041
|
+
* Adds a new column to the Workspace. Returns a builder for the new column.
|
|
3042
|
+
* @param definition Definition for the column.
|
|
2280
3043
|
*/
|
|
2281
3044
|
addColumn(definition?: BoxDefinition): BoxBuilder;
|
|
2282
3045
|
|
|
2283
3046
|
/**
|
|
2284
|
-
* Adds a new group to the
|
|
2285
|
-
* @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.
|
|
2286
3049
|
*/
|
|
2287
3050
|
addGroup(definition?: BoxDefinition): BoxBuilder;
|
|
2288
3051
|
|
|
2289
3052
|
/**
|
|
2290
|
-
* Adds a new window to the
|
|
2291
|
-
* @param
|
|
3053
|
+
* Adds a new window to the Workspace. Returns the Workspace builder.
|
|
3054
|
+
* @param definition Definition for the window.
|
|
2292
3055
|
*/
|
|
2293
3056
|
addWindow(definition: WorkspaceWindowDefinition): WorkspaceBuilder;
|
|
2294
3057
|
|
|
2295
3058
|
/**
|
|
2296
|
-
* Creates a new
|
|
2297
|
-
* @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.
|
|
2298
3061
|
*/
|
|
2299
3062
|
create(config?: WorkspaceCreateConfig): Promise<Workspace>;
|
|
2300
3063
|
}
|
|
2301
3064
|
|
|
2302
|
-
/**
|
|
3065
|
+
/**
|
|
3066
|
+
* Describes a builder for creating box elements.
|
|
3067
|
+
*/
|
|
2303
3068
|
export interface BoxBuilder {
|
|
2304
3069
|
/**
|
|
2305
|
-
* Adds a new row to the
|
|
2306
|
-
* @param
|
|
3070
|
+
* Adds a new row to the box element. Returns a builder for the new row.
|
|
3071
|
+
* @param definition Definition for the row.
|
|
2307
3072
|
*/
|
|
2308
3073
|
addRow(definition?: BoxDefinition): BoxBuilder;
|
|
2309
3074
|
|
|
2310
3075
|
/**
|
|
2311
|
-
* Adds a new column to the
|
|
2312
|
-
* @param
|
|
3076
|
+
* Adds a new column to the box element. Returns a builder for the new column.
|
|
3077
|
+
* @param definition Definition for the column.
|
|
2313
3078
|
*/
|
|
2314
3079
|
addColumn(definition?: BoxDefinition): BoxBuilder;
|
|
2315
3080
|
|
|
2316
3081
|
/**
|
|
2317
|
-
* Adds a new group to the
|
|
2318
|
-
* @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.
|
|
2319
3084
|
*/
|
|
2320
3085
|
addGroup(definition?: BoxDefinition): BoxBuilder;
|
|
2321
3086
|
|
|
2322
3087
|
/**
|
|
2323
|
-
* Adds a new window to the
|
|
2324
|
-
* @param
|
|
3088
|
+
* Adds a new window to the box element. Returns the builder for the box element.
|
|
3089
|
+
* @param definition Definition for the window.
|
|
2325
3090
|
*/
|
|
2326
3091
|
addWindow(definition: WorkspaceWindowDefinition): BoxBuilder;
|
|
2327
3092
|
|
|
2328
3093
|
/**
|
|
2329
|
-
* Returns
|
|
3094
|
+
* Returns an object describing the full structure of the box element.
|
|
2330
3095
|
*/
|
|
2331
3096
|
serialize(): BoxDefinition;
|
|
2332
3097
|
}
|
|
2333
3098
|
|
|
2334
|
-
/**
|
|
3099
|
+
/**
|
|
3100
|
+
* Options for saving a Workspace as a Workspace Layout.
|
|
3101
|
+
*/
|
|
2335
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
|
+
*/
|
|
2336
3109
|
id?: string;
|
|
3110
|
+
|
|
2337
3111
|
/**
|
|
2338
|
-
*
|
|
3112
|
+
* Name for the Workspace Layout.
|
|
2339
3113
|
*/
|
|
2340
3114
|
name: string;
|
|
2341
3115
|
|
|
2342
3116
|
/**
|
|
2343
|
-
*
|
|
3117
|
+
* ID of the Workspace whose structure will be saved as a Workspace Layout.
|
|
2344
3118
|
*/
|
|
2345
3119
|
workspaceId: string;
|
|
2346
3120
|
|
|
2347
|
-
/**
|
|
3121
|
+
/**
|
|
3122
|
+
* If `true`, the current Workspace context will be saved in the Workspace Layout.
|
|
3123
|
+
*/
|
|
2348
3124
|
saveContext?: boolean;
|
|
2349
3125
|
|
|
2350
3126
|
/**
|
|
2351
3127
|
* If `true`, will allow opening multiple instances of the same Workspace simultaneously.
|
|
2352
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
|
|
2353
3132
|
*/
|
|
2354
3133
|
allowMultiple?: boolean;
|
|
2355
3134
|
|
|
2356
|
-
/**
|
|
3135
|
+
/**
|
|
3136
|
+
* Metadata that will be saved as part of the Workspace Layout.
|
|
3137
|
+
*/
|
|
2357
3138
|
metadata?: object;
|
|
2358
3139
|
|
|
2359
3140
|
/**
|
|
@@ -2365,59 +3146,108 @@ export namespace IOConnectWorkspaces {
|
|
|
2365
3146
|
* *Available only in **io.Connect Browser**.*
|
|
2366
3147
|
* @default false
|
|
2367
3148
|
* @since io.Connect Browser 4.4
|
|
3149
|
+
* @since @interopio/workspaces-api 4.4
|
|
2368
3150
|
*/
|
|
2369
3151
|
saveWindowContexts?: boolean;
|
|
2370
3152
|
}
|
|
2371
3153
|
|
|
2372
|
-
/**
|
|
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
|
+
*/
|
|
2373
3161
|
export interface WorkspaceLayoutSaveByIdConfig extends WorkspaceLayoutSaveConfig {
|
|
2374
3162
|
/**
|
|
2375
|
-
*
|
|
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.
|
|
2376
3165
|
*/
|
|
2377
3166
|
id?: string;
|
|
2378
3167
|
}
|
|
2379
3168
|
|
|
3169
|
+
/**
|
|
3170
|
+
* Settings for the maximization boundary of a box element.
|
|
3171
|
+
*/
|
|
2380
3172
|
export interface SetMaximizationBoundaryConfig {
|
|
2381
3173
|
/**
|
|
2382
|
-
*
|
|
3174
|
+
* If `true`, the box element will act as a maximization boundary.
|
|
2383
3175
|
*/
|
|
2384
3176
|
enabled: boolean;
|
|
2385
3177
|
}
|
|
2386
3178
|
|
|
2387
|
-
/**
|
|
3179
|
+
/**
|
|
3180
|
+
* Describes the state of a `Frame` instance at the time of taking the snapshot.
|
|
3181
|
+
*/
|
|
2388
3182
|
export interface FrameSnapshot {
|
|
2389
3183
|
/**
|
|
2390
|
-
*
|
|
3184
|
+
* Unique ID of the `Frame` instance.
|
|
2391
3185
|
*/
|
|
2392
3186
|
id: string;
|
|
2393
3187
|
|
|
3188
|
+
/**
|
|
3189
|
+
* Array of objects, each describing the state of a Workspace in the `Frame` instance.
|
|
3190
|
+
*/
|
|
2394
3191
|
workspaces: WorkspaceSnapshot[];
|
|
2395
3192
|
|
|
3193
|
+
/**
|
|
3194
|
+
* Settings of the `Frame` instance.
|
|
3195
|
+
*/
|
|
2396
3196
|
config: any;
|
|
2397
3197
|
}
|
|
2398
3198
|
|
|
2399
3199
|
/**
|
|
2400
|
-
* 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.
|
|
2401
3201
|
*/
|
|
2402
3202
|
export interface FrameClosingData {
|
|
2403
3203
|
/**
|
|
2404
|
-
* Function that can be used to prevent closing a Frame.
|
|
3204
|
+
* Function that can be used to prevent closing a `Frame` instance.
|
|
2405
3205
|
*/
|
|
2406
3206
|
prevent: () => void;
|
|
2407
3207
|
}
|
|
2408
3208
|
|
|
3209
|
+
/**
|
|
3210
|
+
* Describes the data passed to the callback for handling the event which fires when a `Frame` instance has been closed.
|
|
3211
|
+
*/
|
|
2409
3212
|
export interface FrameClosedData {
|
|
3213
|
+
/**
|
|
3214
|
+
* ID of the closed `Frame` instance.
|
|
3215
|
+
*/
|
|
2410
3216
|
frameId: string;
|
|
3217
|
+
|
|
3218
|
+
/**
|
|
3219
|
+
* Bounds of the closed `Frame` instance.
|
|
3220
|
+
*/
|
|
2411
3221
|
frameBounds?: FrameBounds;
|
|
2412
3222
|
}
|
|
2413
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
|
+
*/
|
|
2414
3227
|
export interface FrameFocusChangedData {
|
|
3228
|
+
/**
|
|
3229
|
+
* Flag indicating whether the `Frame` instance is on focus.
|
|
3230
|
+
*/
|
|
2415
3231
|
isFocused: boolean;
|
|
2416
3232
|
}
|
|
2417
3233
|
|
|
3234
|
+
/**
|
|
3235
|
+
* Describes the data passed to the callback for handling the event which fires when a Workspace has been closed.
|
|
3236
|
+
*/
|
|
2418
3237
|
export interface WorkspaceClosedData {
|
|
3238
|
+
/**
|
|
3239
|
+
* ID of the `Frame` instance that contained the closed Workspace.
|
|
3240
|
+
*/
|
|
2419
3241
|
frameId: string;
|
|
3242
|
+
|
|
3243
|
+
/**
|
|
3244
|
+
* ID of the closed Workspace.
|
|
3245
|
+
*/
|
|
2420
3246
|
workspaceId: string;
|
|
3247
|
+
|
|
3248
|
+
/**
|
|
3249
|
+
* Bounds of the `Frame` instance that contained the closed Workspace.
|
|
3250
|
+
*/
|
|
2421
3251
|
frameBounds?: FrameBounds;
|
|
2422
3252
|
}
|
|
2423
3253
|
|
|
@@ -2431,224 +3261,237 @@ export namespace IOConnectWorkspaces {
|
|
|
2431
3261
|
base64Image: string;
|
|
2432
3262
|
}
|
|
2433
3263
|
|
|
2434
|
-
/**
|
|
3264
|
+
/**
|
|
3265
|
+
* Describes the state of a Workspace at the time of taking the snapshot.
|
|
3266
|
+
*/
|
|
2435
3267
|
export interface WorkspaceSnapshot extends WorkspaceLayoutComponentState {
|
|
2436
3268
|
/**
|
|
2437
|
-
*
|
|
3269
|
+
* Unique ID of the Workspace.
|
|
2438
3270
|
*/
|
|
2439
3271
|
id: string;
|
|
2440
3272
|
}
|
|
2441
3273
|
|
|
2442
|
-
/**
|
|
3274
|
+
/**
|
|
3275
|
+
* Workspaces Layouts API for saving, deleting, exporting, and importing Workspace Layouts.
|
|
3276
|
+
*/
|
|
2443
3277
|
export interface WorkspaceLayoutsAPI {
|
|
2444
3278
|
/**
|
|
2445
|
-
*
|
|
2446
|
-
* 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.
|
|
2447
3280
|
*/
|
|
2448
3281
|
getSummaries(): Promise<WorkspaceLayoutSummary[]>;
|
|
2449
3282
|
|
|
2450
3283
|
/**
|
|
2451
|
-
* Deletes a
|
|
2452
|
-
* @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.
|
|
2453
3286
|
*/
|
|
2454
3287
|
delete(name: string): Promise<void>;
|
|
2455
3288
|
|
|
2456
3289
|
/**
|
|
2457
|
-
* Deletes a
|
|
2458
|
-
*
|
|
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
|
|
2459
3296
|
*/
|
|
2460
3297
|
deleteById(layoutId: string): Promise<void>;
|
|
2461
3298
|
|
|
2462
3299
|
/**
|
|
2463
|
-
*
|
|
2464
|
-
*
|
|
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.
|
|
2465
3303
|
*/
|
|
2466
3304
|
export(predicate?: (layout: WorkspaceLayout) => boolean): Promise<WorkspaceLayout[]>;
|
|
2467
3305
|
|
|
2468
3306
|
/**
|
|
2469
|
-
*
|
|
2470
|
-
*
|
|
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.
|
|
2471
3312
|
*/
|
|
2472
3313
|
import(layouts: WorkspaceLayout[], mode?: "replace" | "merge"): Promise<void>;
|
|
2473
3314
|
|
|
2474
3315
|
/**
|
|
2475
|
-
* Saves an
|
|
2476
|
-
* @param config
|
|
3316
|
+
* Saves an open Workspace as a Workspace Layout.
|
|
3317
|
+
* @param config Options for saving the Workspace Layout.
|
|
2477
3318
|
*/
|
|
2478
3319
|
save(config: WorkspaceLayoutSaveConfig): Promise<WorkspaceLayout>;
|
|
2479
3320
|
|
|
2480
3321
|
/**
|
|
2481
|
-
*
|
|
2482
|
-
*
|
|
2483
|
-
*
|
|
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
|
|
2484
3328
|
*/
|
|
2485
3329
|
saveById(config: WorkspaceLayoutSaveByIdConfig): Promise<WorkspaceLayout>;
|
|
2486
3330
|
|
|
2487
3331
|
/**
|
|
2488
|
-
* Notifies when a
|
|
2489
|
-
*
|
|
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.
|
|
2490
3335
|
*/
|
|
2491
3336
|
onSaved(callback: (layout: WorkspaceLayout) => void): Promise<Unsubscribe>;
|
|
2492
3337
|
|
|
2493
3338
|
/**
|
|
2494
|
-
* Notifies when a
|
|
2495
|
-
* @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.
|
|
2496
3341
|
*/
|
|
2497
3342
|
onRemoved(callback: (layout: WorkspaceLayout) => void): Promise<Unsubscribe>;
|
|
2498
3343
|
}
|
|
2499
3344
|
|
|
2500
3345
|
/**
|
|
3346
|
+
* Workspaces API.
|
|
2501
3347
|
* @docmenuorder 1
|
|
2502
3348
|
*/
|
|
2503
3349
|
export interface API {
|
|
2504
3350
|
/**
|
|
2505
|
-
* Checks whether
|
|
3351
|
+
* Checks whether the current window is in a Workspace.
|
|
2506
3352
|
*/
|
|
2507
3353
|
inWorkspace(): Promise<boolean>;
|
|
2508
3354
|
|
|
2509
3355
|
/**
|
|
2510
|
-
*
|
|
2511
|
-
*
|
|
2512
|
-
* @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.
|
|
2513
3358
|
*/
|
|
2514
3359
|
getBuilder(config: BuilderConfig): WorkspaceBuilder | BoxBuilder;
|
|
2515
3360
|
|
|
2516
3361
|
/**
|
|
2517
|
-
*
|
|
3362
|
+
* Retrieves the `Frame` instance of the current window. Will throw an error if the current window isn't part of a Workspace.
|
|
2518
3363
|
*/
|
|
2519
3364
|
getMyFrame(): Promise<Frame>;
|
|
2520
3365
|
|
|
2521
3366
|
/**
|
|
2522
|
-
*
|
|
2523
|
-
* @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.
|
|
2524
3369
|
*/
|
|
2525
|
-
getFrame(predicate: (frame: Frame) => boolean): Promise<Frame>;
|
|
3370
|
+
getFrame(predicate: (frame: Frame) => boolean): Promise<Frame | undefined>;
|
|
2526
3371
|
|
|
2527
3372
|
/**
|
|
2528
|
-
*
|
|
2529
|
-
* @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.
|
|
2530
3375
|
*/
|
|
2531
3376
|
getAllFrames(predicate?: (frame: Frame) => boolean): Promise<Frame[]>;
|
|
2532
3377
|
|
|
2533
3378
|
/**
|
|
2534
|
-
*
|
|
2535
|
-
* 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.
|
|
2536
3380
|
*/
|
|
2537
3381
|
getAllWorkspacesSummaries(): Promise<WorkspaceSummary[]>;
|
|
2538
3382
|
|
|
2539
3383
|
/**
|
|
2540
|
-
*
|
|
2541
|
-
* 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.
|
|
2542
3385
|
*/
|
|
2543
3386
|
getMyWorkspace(): Promise<Workspace>;
|
|
2544
3387
|
|
|
2545
3388
|
/**
|
|
2546
|
-
*
|
|
2547
|
-
* @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.
|
|
2548
3391
|
*/
|
|
2549
|
-
getWorkspace(predicate: (workspace: Workspace) => boolean): Promise<Workspace>;
|
|
3392
|
+
getWorkspace(predicate: (workspace: Workspace) => boolean): Promise<Workspace | undefined>;
|
|
2550
3393
|
|
|
2551
3394
|
/**
|
|
2552
|
-
*
|
|
2553
|
-
* @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.
|
|
2554
3397
|
*/
|
|
2555
3398
|
getWorkspaceById(workspaceId: string): Promise<Workspace>;
|
|
2556
3399
|
|
|
2557
3400
|
/**
|
|
2558
|
-
*
|
|
2559
|
-
* @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.
|
|
2560
3403
|
*/
|
|
2561
3404
|
getAllWorkspaces(predicate?: (workspace: Workspace) => boolean): Promise<Workspace[]>;
|
|
2562
3405
|
|
|
2563
3406
|
/**
|
|
2564
|
-
*
|
|
2565
|
-
*
|
|
2566
|
-
* @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.
|
|
2567
3409
|
*/
|
|
2568
|
-
getWindow(predicate: (workspaceWindow: WorkspaceWindow) => boolean): Promise<WorkspaceWindow>;
|
|
3410
|
+
getWindow(predicate: (workspaceWindow: WorkspaceWindow) => boolean): Promise<WorkspaceWindow | undefined>;
|
|
2569
3411
|
|
|
2570
3412
|
/**
|
|
2571
|
-
*
|
|
2572
|
-
*
|
|
2573
|
-
* @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.
|
|
2574
3415
|
*/
|
|
2575
|
-
getBox(predicate: (box: WorkspaceBox) => boolean): Promise<WorkspaceBox>;
|
|
3416
|
+
getBox(predicate: (box: WorkspaceBox) => boolean): Promise<WorkspaceBox | undefined>;
|
|
2576
3417
|
|
|
2577
3418
|
/**
|
|
2578
|
-
*
|
|
2579
|
-
* @param name
|
|
2580
|
-
* @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.
|
|
2581
3422
|
*/
|
|
2582
3423
|
restoreWorkspace(name: string, options?: RestoreWorkspaceConfig): Promise<Workspace>;
|
|
2583
3424
|
|
|
2584
3425
|
/**
|
|
2585
|
-
*
|
|
2586
|
-
*
|
|
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
|
|
2587
3432
|
*/
|
|
2588
3433
|
restoreWorkspaceById(options: RestoreWorkspaceByIdConfig): Promise<Workspace>;
|
|
2589
3434
|
|
|
2590
3435
|
/**
|
|
2591
|
-
*
|
|
2592
|
-
* @param definition
|
|
2593
|
-
* @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.
|
|
2594
3439
|
*/
|
|
2595
3440
|
createWorkspace(definition: WorkspaceDefinition, saveConfig?: WorkspaceCreateConfig): Promise<Workspace>;
|
|
2596
3441
|
|
|
2597
3442
|
/**
|
|
2598
|
-
*
|
|
2599
|
-
* @param definition
|
|
3443
|
+
* Creates an empty `Frame` instance with no Workspaces in it.
|
|
3444
|
+
* @param definition Definition for the empty `Frame` instance.
|
|
2600
3445
|
*/
|
|
2601
3446
|
createEmptyFrame(definition?: EmptyFrameDefinition): Promise<IOConnectWorkspaces.Frame>;
|
|
2602
3447
|
|
|
2603
3448
|
/**
|
|
2604
|
-
*
|
|
2605
|
-
*
|
|
2606
|
-
*
|
|
2607
|
-
* @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.
|
|
2608
3453
|
*/
|
|
2609
3454
|
waitForFrame(id: string): Promise<Frame>;
|
|
2610
3455
|
|
|
2611
3456
|
/**
|
|
2612
|
-
*
|
|
3457
|
+
* Workspaces Layouts API for saving, deleting, exporting, and importing Workspace Layouts.
|
|
2613
3458
|
*/
|
|
2614
3459
|
layouts: WorkspaceLayoutsAPI;
|
|
2615
3460
|
|
|
2616
3461
|
/**
|
|
2617
|
-
* Notifies when a new
|
|
2618
|
-
* @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.
|
|
2619
3464
|
*/
|
|
2620
3465
|
onFrameOpened(callback: (frame: Frame) => void): Promise<Unsubscribe>;
|
|
2621
3466
|
|
|
2622
3467
|
/**
|
|
2623
|
-
* Notifies when a
|
|
2624
|
-
* @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.
|
|
2625
3470
|
*/
|
|
2626
3471
|
onFrameClosed(callback: (closed: FrameClosedData) => void): Promise<Unsubscribe>;
|
|
2627
3472
|
|
|
2628
3473
|
/**
|
|
2629
|
-
* Notifies when a new
|
|
2630
|
-
* @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.
|
|
2631
3476
|
*/
|
|
2632
3477
|
onWorkspaceOpened(callback: (workspace: Workspace) => void): Promise<Unsubscribe>;
|
|
2633
3478
|
|
|
2634
3479
|
/**
|
|
2635
|
-
* Notifies when a
|
|
2636
|
-
* @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.
|
|
2637
3482
|
*/
|
|
2638
3483
|
onWorkspaceClosed(callback: (closed: WorkspaceClosedData) => void): Promise<Unsubscribe>;
|
|
2639
3484
|
|
|
2640
3485
|
/**
|
|
2641
|
-
* Notifies when a Workspace
|
|
2642
|
-
*
|
|
2643
|
-
* 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.
|
|
2644
3488
|
* @param callback Callback function for handling the event. Receives as an argument the `Workspace` object describing the hibernated Workspace.
|
|
2645
3489
|
*/
|
|
2646
3490
|
onWorkspaceHibernated(callback: (workspace: IOConnectWorkspaces.Workspace) => void): Promise<IOConnectWorkspaces.Unsubscribe>;
|
|
2647
3491
|
|
|
2648
3492
|
/**
|
|
2649
|
-
* Notifies when a Workspace
|
|
2650
|
-
*
|
|
2651
|
-
* 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.
|
|
2652
3495
|
* @param callback Callback function for handling the event. Receives as an argument the `Workspace` object describing the resumed Workspace.
|
|
2653
3496
|
*/
|
|
2654
3497
|
onWorkspaceResumed(callback: (workspace: IOConnectWorkspaces.Workspace) => void): Promise<IOConnectWorkspaces.Unsubscribe>;
|
|
@@ -2661,43 +3504,44 @@ export namespace IOConnectWorkspaces {
|
|
|
2661
3504
|
* @since @interopio/workspaces-api 4.4
|
|
2662
3505
|
*/
|
|
2663
3506
|
onWorkspaceTabReordered(callback: (workspace: IOConnectWorkspaces.Workspace) => void): Promise<IOConnectWorkspaces.Unsubscribe>;
|
|
3507
|
+
|
|
2664
3508
|
/**
|
|
2665
|
-
* Notifies when a new window
|
|
2666
|
-
* An added window
|
|
2667
|
-
* @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.
|
|
2668
3512
|
*/
|
|
2669
3513
|
onWindowAdded(callback: (workspaceWindow: WorkspaceWindow) => void): Promise<Unsubscribe>;
|
|
2670
3514
|
|
|
2671
3515
|
/**
|
|
2672
|
-
* Notifies when
|
|
2673
|
-
* A loaded window is a window
|
|
2674
|
-
* @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.
|
|
2675
3519
|
*/
|
|
2676
3520
|
onWindowLoaded(callback: (workspaceWindow: WorkspaceWindow) => void): Promise<Unsubscribe>;
|
|
2677
3521
|
|
|
2678
3522
|
/**
|
|
2679
|
-
* Notifies when a window
|
|
2680
|
-
* @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.
|
|
2681
3525
|
*/
|
|
2682
3526
|
onWindowRemoved(callback: (removed: { windowId?: string; workspaceId: string; frameId: string }) => void): Promise<Unsubscribe>;
|
|
2683
3527
|
|
|
2684
3528
|
/**
|
|
2685
|
-
* Notifies when a window
|
|
2686
|
-
*
|
|
2687
|
-
* @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.
|
|
2688
3532
|
*/
|
|
2689
3533
|
onWindowMaximized(callback: (workspaceWindow: IOConnectWorkspaces.WorkspaceWindow) => void): Promise<IOConnectWorkspaces.Unsubscribe>;
|
|
2690
3534
|
|
|
2691
3535
|
/**
|
|
2692
|
-
* Notifies when a window
|
|
2693
|
-
*
|
|
2694
|
-
* @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.
|
|
2695
3539
|
*/
|
|
2696
3540
|
onWindowRestored(callback: (workspaceWindow: IOConnectWorkspaces.WorkspaceWindow) => void): Promise<IOConnectWorkspaces.Unsubscribe>;
|
|
2697
3541
|
|
|
2698
3542
|
/**
|
|
2699
|
-
* Notifies when a window
|
|
2700
|
-
* @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.
|
|
2701
3545
|
*/
|
|
2702
3546
|
onWindowSelected(callback: (workspaceWindow: IOConnectWorkspaces.WorkspaceWindow) => void): Promise<IOConnectWorkspaces.Unsubscribe>;
|
|
2703
3547
|
|
|
@@ -2710,7 +3554,9 @@ export namespace IOConnectWorkspaces {
|
|
|
2710
3554
|
*/
|
|
2711
3555
|
onWindowTabReordered(callback: (workspaceWindow: IOConnectWorkspaces.WorkspaceWindow) => void): Promise<IOConnectWorkspaces.Unsubscribe>;
|
|
2712
3556
|
|
|
2713
|
-
/**
|
|
3557
|
+
/**
|
|
3558
|
+
* Version of the Workspaces API.
|
|
3559
|
+
*/
|
|
2714
3560
|
version: string;
|
|
2715
3561
|
}
|
|
2716
3562
|
}
|