@interopio/browser 3.5.10 → 4.0.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/browser.d.ts +513 -123
- package/changelog.md +2 -0
- package/dist/browser.es.js +3058 -1784
- package/dist/browser.es.js.map +1 -1
- package/dist/browser.umd.js +16934 -15660
- package/dist/browser.umd.js.map +1 -1
- package/dist/browser.umd.min.js +1 -1
- package/package.json +8 -8
package/browser.d.ts
CHANGED
|
@@ -6,6 +6,7 @@ import { IOConnectCore } from "@interopio/core";
|
|
|
6
6
|
import { IOConnectDesktop } from "@interopio/desktop";
|
|
7
7
|
import { IOConnectWorkspaces } from "@interopio/workspaces-api";
|
|
8
8
|
import { IOConnectSearch } from "@interopio/search-api";
|
|
9
|
+
import { IOConnectModals } from "@interopio/modals-api";
|
|
9
10
|
|
|
10
11
|
/**
|
|
11
12
|
* Factory function that creates a new ioconnect instance.
|
|
@@ -19,11 +20,12 @@ export default IOConnectBrowserFactory;
|
|
|
19
20
|
* @docname io.Connect Browser
|
|
20
21
|
* @intro
|
|
21
22
|
* **io.Connect Browser** allows web apps to integrate with other apps that are part of the same **io.Connect Browser** project via a set of APIs.
|
|
22
|
-
* **io.Connect Browser** enables you to share data between apps, expose functionality, manage windows and
|
|
23
|
+
* **io.Connect Browser** enables you to share data between apps, expose functionality, manage windows, notifications, and more.
|
|
23
24
|
*
|
|
24
25
|
* ## Referencing
|
|
25
26
|
*
|
|
26
|
-
* The [`@interopio/browser`](https://www.npmjs.com/package/@interopio/browser) library is available both as a single JavaScript file,
|
|
27
|
+
* The [`@interopio/browser`](https://www.npmjs.com/package/@interopio/browser) library is available both as a single JavaScript file,
|
|
28
|
+
* which you can include in your web apps using a `<script>` tag, and also as a module, which you can import in your apps:
|
|
27
29
|
*
|
|
28
30
|
* ```html
|
|
29
31
|
* <script type="text/javascript" src="browser.umd.js"></script>
|
|
@@ -35,30 +37,30 @@ export default IOConnectBrowserFactory;
|
|
|
35
37
|
* import IOBrowser from "@interopio/browser";
|
|
36
38
|
* ```
|
|
37
39
|
*
|
|
38
|
-
* When deploying your app in production, it's recommended to always reference a specific minified version:
|
|
39
|
-
*
|
|
40
|
-
* ```html
|
|
41
|
-
* <script type="text/javascript" src="browser.umd.min.js"></script>
|
|
42
|
-
* ```
|
|
43
|
-
*
|
|
44
40
|
* ## Initialization
|
|
45
41
|
*
|
|
46
|
-
* The [`@interopio/browser`](https://www.npmjs.com/package/@interopio/browser) library attaches
|
|
47
|
-
*
|
|
42
|
+
* The [`@interopio/browser`](https://www.npmjs.com/package/@interopio/browser) library attaches the `IOBrowser()` factory function
|
|
43
|
+
* to the global `window` object. Invoke this function to initialize the library and connect to the **io.Connect Browser** environment.
|
|
44
|
+
* The `IOBrowser()` factory function accepts an optional `Config` object as an argument, which you can use to provide settings for the library
|
|
45
|
+
* (e.g., initialize additional io.Connect libraries, configure the library behavior or some of its APIs).
|
|
46
|
+
* The factory function resolves with the initialized io.Connect API object, which you can use to access all available io.Connect APIs:
|
|
48
47
|
*
|
|
49
48
|
* ```javascript
|
|
49
|
+
* import IOBrowser from "@interopio/browser";
|
|
50
|
+
* import IOWorkspaces from "@interopio/workspaces-api";
|
|
51
|
+
*
|
|
50
52
|
* const initializeIOConnect = async () => {
|
|
51
53
|
*
|
|
52
|
-
* // Initializing the Workspaces
|
|
54
|
+
* // Initializing the Workspaces API.
|
|
53
55
|
* const initOptions = {
|
|
54
56
|
* libraries: [IOWorkspaces]
|
|
55
57
|
* };
|
|
56
58
|
*
|
|
57
|
-
* // Use the object
|
|
58
|
-
* // to access the IOConnect Browser APIs.
|
|
59
|
+
* // Use the initialized API object to access the io.Connect APIs.
|
|
59
60
|
* const io = await IOBrowser(initOptions);
|
|
60
61
|
*
|
|
61
|
-
* // Here the library is initialized and you can access all io.Connect
|
|
62
|
+
* // Here, the library is already initialized and you can access all available io.Connect APIs.
|
|
63
|
+
* const myWorkspace = await io.workspaces.restoreWorkspace("My Workspace");
|
|
62
64
|
* };
|
|
63
65
|
*
|
|
64
66
|
* initializeIOConnect().catch(console.error);
|
|
@@ -70,9 +72,58 @@ export namespace IOConnectBrowser {
|
|
|
70
72
|
export import Contexts = IOConnectCore.Contexts;
|
|
71
73
|
export import Logger = IOConnectCore.Logger;
|
|
72
74
|
|
|
75
|
+
/**
|
|
76
|
+
* @ignore
|
|
77
|
+
*/
|
|
78
|
+
export interface ProfileData {
|
|
79
|
+
license: {
|
|
80
|
+
type: "trial" | "paid";
|
|
81
|
+
expiration: number;
|
|
82
|
+
},
|
|
83
|
+
productsInfo: {
|
|
84
|
+
platform: {
|
|
85
|
+
apiVersion: string;
|
|
86
|
+
},
|
|
87
|
+
client: {
|
|
88
|
+
apiVersion: string;
|
|
89
|
+
},
|
|
90
|
+
workspaces?: {
|
|
91
|
+
apiVersion: string;
|
|
92
|
+
container?: {
|
|
93
|
+
type: string,
|
|
94
|
+
version: string;
|
|
95
|
+
}
|
|
96
|
+
},
|
|
97
|
+
home?: {
|
|
98
|
+
version: string
|
|
99
|
+
},
|
|
100
|
+
search?: {
|
|
101
|
+
apiVersion: string;
|
|
102
|
+
},
|
|
103
|
+
modals?: {
|
|
104
|
+
apiVersion: string;
|
|
105
|
+
}
|
|
106
|
+
},
|
|
107
|
+
plugins: Array<{ name: string, version: string }>,
|
|
108
|
+
user?: {
|
|
109
|
+
id: string;
|
|
110
|
+
username?: string;
|
|
111
|
+
firstName?: string;
|
|
112
|
+
lastName?: string;
|
|
113
|
+
email?: string;
|
|
114
|
+
type?: string;
|
|
115
|
+
role?: string;
|
|
116
|
+
meta?: any;
|
|
117
|
+
}
|
|
118
|
+
}
|
|
119
|
+
|
|
120
|
+
/**
|
|
121
|
+
* Describes the configuration for the `IOBrowser()` factory function.
|
|
122
|
+
*/
|
|
73
123
|
export interface Config {
|
|
124
|
+
|
|
74
125
|
/**
|
|
75
|
-
*
|
|
126
|
+
* Configures the system logger. Used mostly during development.
|
|
76
127
|
*/
|
|
77
128
|
systemLogger?: SystemLogger;
|
|
78
129
|
|
|
@@ -84,11 +135,13 @@ export namespace IOConnectBrowser {
|
|
|
84
135
|
inproc?: IOConnectCore.InprocGWSettings;
|
|
85
136
|
|
|
86
137
|
/**
|
|
87
|
-
*
|
|
138
|
+
* Settings for the Notifications API.
|
|
88
139
|
*/
|
|
89
140
|
notifications?: Notifications.Settings;
|
|
90
141
|
|
|
91
|
-
/**
|
|
142
|
+
/**
|
|
143
|
+
* Settings for the Contexts API.
|
|
144
|
+
*/
|
|
92
145
|
contexts?: IOConnectCore.ContextsConfig;
|
|
93
146
|
|
|
94
147
|
/**
|
|
@@ -99,121 +152,401 @@ export namespace IOConnectBrowser {
|
|
|
99
152
|
|
|
100
153
|
/**
|
|
101
154
|
* If `true`, when the io.Connect API factory function is invoked more than once in the same app,
|
|
102
|
-
* it will return the already initialized API object
|
|
155
|
+
* it will return the already initialized API object instead of throwing an error.
|
|
103
156
|
* @default false
|
|
104
157
|
*/
|
|
105
158
|
memoizeAPI?: boolean;
|
|
106
159
|
|
|
107
160
|
/**
|
|
108
|
-
*
|
|
161
|
+
* List of references to the factory functions of additional io.Connect libraries to be initialized internally (e.g., `@interopio/workspaces-api`, `@interopio/search-api`).
|
|
162
|
+
* The APIs provided by these libraries can then be accessed via the initialized io.Connect API object (e.g., `io.workspaces`, `io.search`).
|
|
109
163
|
*/
|
|
110
164
|
libraries?: Array<(io: IOConnectBrowser.API, config?: IOConnectBrowser.Config | IOConnectDesktop.Config) => Promise<void>>;
|
|
111
165
|
|
|
166
|
+
/* TODO: mark as deprecated in favor of configuring intentResolver in platform and browser config */
|
|
112
167
|
/* Enable and configure Intents Resolver UI */
|
|
168
|
+
/**
|
|
169
|
+
* Settings for the Intents Resolver UI.
|
|
170
|
+
*/
|
|
113
171
|
intents?: IOConnectBrowser.Intents.Config;
|
|
114
172
|
|
|
115
|
-
|
|
116
|
-
|
|
173
|
+
/**
|
|
174
|
+
* Settings for the io.Connect widget.
|
|
175
|
+
*/
|
|
176
|
+
widget?: WidgetConfig;
|
|
177
|
+
|
|
178
|
+
/**
|
|
179
|
+
* Settings for the io.Connect modals.
|
|
180
|
+
*/
|
|
181
|
+
modals?: ModalsUIConfig;
|
|
182
|
+
|
|
183
|
+
/* Configure Intent Resolver UI embedded in client's DOM */
|
|
184
|
+
intentResolver?: IntentResolverUIConfig;
|
|
117
185
|
}
|
|
118
186
|
|
|
119
|
-
|
|
120
|
-
|
|
187
|
+
/**
|
|
188
|
+
* Type of the Channel Selector to use in the widget.
|
|
189
|
+
*/
|
|
190
|
+
export type WidgetChannelSelectorType = "directional" | "default";
|
|
121
191
|
|
|
122
|
-
|
|
192
|
+
/**
|
|
193
|
+
* Determines which of the available Channels to display (all or only FDC3 ones).
|
|
194
|
+
*/
|
|
195
|
+
export type WidgetChannelsDisplayMode = "all" | "fdc3";
|
|
123
196
|
|
|
124
|
-
|
|
197
|
+
/**
|
|
198
|
+
* Initial position for the widget within the window.
|
|
199
|
+
*/
|
|
200
|
+
export type WidgetPosition = "top" | "bottom" | "left" | "right";
|
|
125
201
|
|
|
126
|
-
|
|
202
|
+
/**
|
|
203
|
+
* Mode for displaying the widget.
|
|
204
|
+
*/
|
|
205
|
+
export type WidgetMode = "compact" | "default";
|
|
127
206
|
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
207
|
+
/**
|
|
208
|
+
* Settings for the Widget Channel Selector UI.
|
|
209
|
+
*/
|
|
210
|
+
export interface WidgetChannelSelectorConfig {
|
|
211
|
+
/**
|
|
212
|
+
* If `true`, will enable the Channel Selector UI in the widget.
|
|
213
|
+
* @default true
|
|
214
|
+
*/
|
|
215
|
+
enable?: boolean;
|
|
216
|
+
|
|
217
|
+
/**
|
|
218
|
+
* Type of the Channel Selector UI.
|
|
219
|
+
* @default "default"
|
|
220
|
+
*/
|
|
221
|
+
type?: WidgetChannelSelectorType;
|
|
222
|
+
}
|
|
223
|
+
|
|
224
|
+
/**
|
|
225
|
+
* Settings for the Channel Selector UI.
|
|
226
|
+
*/
|
|
227
|
+
export interface WidgetChannels {
|
|
228
|
+
|
|
229
|
+
/**
|
|
230
|
+
* Settings for the Channel Selector UI.
|
|
231
|
+
*/
|
|
232
|
+
selector?: WidgetChannelSelectorConfig;
|
|
233
|
+
|
|
234
|
+
/**
|
|
235
|
+
* Determines which of the available Channels to display (all or only FDC3 ones).
|
|
236
|
+
* @default "all"
|
|
237
|
+
*/
|
|
238
|
+
displayMode?: WidgetChannelsDisplayMode;
|
|
239
|
+
}
|
|
240
|
+
|
|
241
|
+
/**
|
|
242
|
+
* Describes the configuration for the io.Connect widget.
|
|
243
|
+
*/
|
|
244
|
+
export interface WidgetConfig {
|
|
245
|
+
/**
|
|
246
|
+
* If `true`, will enable the widget for the Browser Client unless the app origin has been blocked in the Main app configuration.
|
|
247
|
+
*/
|
|
248
|
+
enable: boolean;
|
|
249
|
+
|
|
250
|
+
/**
|
|
251
|
+
* Settings for the Channel Selector UI.
|
|
252
|
+
*/
|
|
253
|
+
channels?: WidgetChannels;
|
|
254
|
+
|
|
255
|
+
/**
|
|
256
|
+
* Initial position for the widget within the window.
|
|
257
|
+
* @default "bottom"
|
|
258
|
+
*/
|
|
259
|
+
position?: WidgetPosition;
|
|
260
|
+
|
|
261
|
+
/**
|
|
262
|
+
* Mode for displaying the widget.
|
|
263
|
+
* @default "default"
|
|
264
|
+
*/
|
|
265
|
+
mode?: WidgetMode;
|
|
266
|
+
|
|
267
|
+
/**
|
|
268
|
+
* If `true`, the widget will be visible in the app even if the app is currently in a Workspace.
|
|
269
|
+
* @default false
|
|
270
|
+
*/
|
|
271
|
+
displayInWorkspace?: boolean;
|
|
272
|
+
|
|
273
|
+
/**
|
|
274
|
+
* If `true`, the `@interopio/browser` library will wait for the `IOBrowserWidget()` factory function to resolve before completing its initialization.
|
|
275
|
+
* @default true
|
|
276
|
+
*/
|
|
277
|
+
awaitFactory?: boolean;
|
|
278
|
+
|
|
279
|
+
/**
|
|
280
|
+
* Interval in milliseconds to wait for the `IOBrowserWidget()` factory function to be fetched from the remote source.
|
|
281
|
+
* @default 5000
|
|
282
|
+
*/
|
|
283
|
+
timeout?: number;
|
|
284
|
+
}
|
|
285
|
+
|
|
286
|
+
|
|
287
|
+
export interface IntentResolverUIConfig {
|
|
288
|
+
enable: boolean;
|
|
289
|
+
|
|
290
|
+
/**
|
|
291
|
+
* Whether to wait for IOBrowserIntentResolverUI factory to resolve
|
|
292
|
+
* @default true
|
|
293
|
+
*/
|
|
294
|
+
awaitFactory?: boolean;
|
|
295
|
+
/**
|
|
296
|
+
* Timeout to wait for the IOBrowserIntentResolverUI factory to be fetched from the remote source
|
|
297
|
+
* @default 5000
|
|
298
|
+
*/
|
|
299
|
+
timeout?: number;
|
|
300
|
+
}
|
|
301
|
+
|
|
302
|
+
/**
|
|
303
|
+
* @ignore
|
|
304
|
+
*/
|
|
305
|
+
export namespace IntentResolverUI {
|
|
306
|
+
export interface API {
|
|
307
|
+
open: (config: OpenConfig) => OpenResult;
|
|
308
|
+
close: (config: CloseConfig) => void;
|
|
136
309
|
}
|
|
137
310
|
|
|
138
|
-
export interface
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
* Configure whether to show only fdc3-enabled channels or all
|
|
142
|
-
* @default all
|
|
143
|
-
*/
|
|
144
|
-
displayMode?: ChannelsDisplayMode;
|
|
311
|
+
export interface OpenConfigWithIntentRequest {
|
|
312
|
+
intentRequest: IOConnectBrowser.Intents.IntentRequest;
|
|
313
|
+
handlerFilter?: never;
|
|
145
314
|
}
|
|
146
315
|
|
|
147
|
-
export interface
|
|
148
|
-
|
|
316
|
+
export interface OpenConfigWithHandlerFilter {
|
|
317
|
+
handlerFilter: IOConnectBrowser.Intents.HandlerFilter;
|
|
318
|
+
intentRequest?: never;
|
|
319
|
+
}
|
|
149
320
|
|
|
150
|
-
|
|
321
|
+
export interface UISettings {
|
|
322
|
+
showCloseButton?: boolean;
|
|
323
|
+
}
|
|
151
324
|
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
325
|
+
export type OpenConfig = (OpenConfigWithIntentRequest | OpenConfigWithHandlerFilter) & { onUserResponse: (response: { response: IntentResolverResponse }) => void, uiSettings?: UISettings };
|
|
326
|
+
|
|
327
|
+
export interface UserSettings {
|
|
328
|
+
preserveChoice: boolean;
|
|
329
|
+
}
|
|
330
|
+
|
|
331
|
+
export interface UserChoiceResponse {
|
|
332
|
+
intent: string;
|
|
333
|
+
handler: IOConnectBrowser.Intents.IntentHandler;
|
|
334
|
+
userSettings: UserSettings;
|
|
335
|
+
}
|
|
336
|
+
export interface IntentResolverResponse {
|
|
337
|
+
isExpired?: boolean;
|
|
338
|
+
isClosed?: boolean;
|
|
339
|
+
userChoice?: UserChoiceResponse;
|
|
340
|
+
}
|
|
341
|
+
|
|
342
|
+
export interface OpenResult {
|
|
343
|
+
id: string;
|
|
344
|
+
}
|
|
345
|
+
|
|
346
|
+
export interface CloseConfig {
|
|
347
|
+
id: string;
|
|
348
|
+
}
|
|
349
|
+
}
|
|
350
|
+
|
|
351
|
+
/**
|
|
352
|
+
* @intro
|
|
353
|
+
* The [`@interopio/modals-ui`](https://www.npmjs.com/package/@interopio/modals-ui) library provides components and APIs used
|
|
354
|
+
* in **io.Connect Browser** for displaying dialogs and alerts. When initializing the [`@interopio/browser`](https://www.npmjs.com/package/@interopio/browser) library,
|
|
355
|
+
* you can provide configuration for the Modals UI library (e.g., disable alerts and/or dialogs, and more).
|
|
356
|
+
*/
|
|
357
|
+
export interface ModalsUIConfig {
|
|
157
358
|
|
|
359
|
+
/**
|
|
360
|
+
* Settings for the io.Connect alerts.
|
|
361
|
+
*/
|
|
362
|
+
alerts?: {
|
|
158
363
|
/**
|
|
159
|
-
*
|
|
160
|
-
* @default default
|
|
364
|
+
* If `true`, will enable the io.Connect alerts.
|
|
161
365
|
*/
|
|
162
|
-
|
|
366
|
+
enabled: boolean;
|
|
367
|
+
};
|
|
163
368
|
|
|
369
|
+
/**
|
|
370
|
+
* Settings for the io.Connect dialogs.
|
|
371
|
+
*/
|
|
372
|
+
dialogs?: {
|
|
164
373
|
/**
|
|
165
|
-
* If `true`,
|
|
166
|
-
* @default false
|
|
374
|
+
* If `true`, will enable the io.Connect dialogs.
|
|
167
375
|
*/
|
|
168
|
-
|
|
169
|
-
}
|
|
170
|
-
}
|
|
171
|
-
|
|
376
|
+
enabled: boolean;
|
|
377
|
+
};
|
|
172
378
|
|
|
173
|
-
export interface Widget extends Widget.DefaultConfig {
|
|
174
379
|
/**
|
|
175
|
-
*
|
|
380
|
+
* If `true`, the `@interopio/browser` library will wait for the `IOBrowserModalsUI()` factory function to resolve before completing its initialization.
|
|
176
381
|
* @default true
|
|
177
382
|
*/
|
|
178
383
|
awaitFactory?: boolean;
|
|
384
|
+
|
|
179
385
|
/**
|
|
180
|
-
*
|
|
386
|
+
* Interval in milliseconds to wait for the `IOBrowserModalsUI()` factory function to be fetched from the remote source.
|
|
181
387
|
* @default 5000
|
|
182
388
|
*/
|
|
183
389
|
timeout?: number;
|
|
184
390
|
}
|
|
185
391
|
|
|
392
|
+
/**
|
|
393
|
+
* @ignore
|
|
394
|
+
*/
|
|
395
|
+
export namespace ModalsUI {
|
|
396
|
+
|
|
397
|
+
/**
|
|
398
|
+
* @ignore
|
|
399
|
+
*/
|
|
400
|
+
export interface API {
|
|
401
|
+
alerts: Alerts.API;
|
|
402
|
+
dialogs: Dialogs.API;
|
|
403
|
+
}
|
|
404
|
+
|
|
405
|
+
/**
|
|
406
|
+
* @ignore
|
|
407
|
+
*/
|
|
408
|
+
export namespace Alerts {
|
|
409
|
+
export interface API {
|
|
410
|
+
open: (config: OpenConfig) => OpenResult;
|
|
411
|
+
close: (config: CloseConfig) => void;
|
|
412
|
+
}
|
|
413
|
+
|
|
414
|
+
export interface InteropAction {
|
|
415
|
+
name: string;
|
|
416
|
+
settings: IOConnectModals.InteropSettings;
|
|
417
|
+
}
|
|
418
|
+
|
|
419
|
+
export type OpenConfig = Omit<IOConnectModals.AlertRequestConfig, "target" | "ttl"> & {
|
|
420
|
+
onClose: () => void;
|
|
421
|
+
onClick: (config: OnClickConfig) => void;
|
|
422
|
+
}
|
|
423
|
+
|
|
424
|
+
export interface OpenResult {
|
|
425
|
+
id: string;
|
|
426
|
+
}
|
|
427
|
+
|
|
428
|
+
export interface CloseConfig {
|
|
429
|
+
id: string;
|
|
430
|
+
}
|
|
431
|
+
|
|
432
|
+
export interface OnClickConfig {
|
|
433
|
+
interopAction: InteropAction;
|
|
434
|
+
}
|
|
435
|
+
}
|
|
436
|
+
|
|
437
|
+
/**
|
|
438
|
+
* @ignore
|
|
439
|
+
*/
|
|
440
|
+
export namespace Dialogs {
|
|
441
|
+
export interface API {
|
|
442
|
+
open: (config: OpenConfig) => OpenResult;
|
|
443
|
+
close: (config: CloseConfig) => void;
|
|
444
|
+
}
|
|
445
|
+
|
|
446
|
+
export interface OpenConfig<Name extends string = string, Variables = any> {
|
|
447
|
+
templateName: Name;
|
|
448
|
+
onCompletion: (config: OnCompletionConfig) => void;
|
|
449
|
+
size?: IOConnectModals.DialogRequestConfig["size"];
|
|
450
|
+
variables: Variables;
|
|
451
|
+
}
|
|
452
|
+
|
|
453
|
+
export interface OpenResult {
|
|
454
|
+
id: string;
|
|
455
|
+
}
|
|
456
|
+
|
|
457
|
+
export interface CloseConfig {
|
|
458
|
+
id: string;
|
|
459
|
+
}
|
|
460
|
+
|
|
461
|
+
export interface OnCompletionConfig {
|
|
462
|
+
response: IOConnectModals.DialogResponse;
|
|
463
|
+
}
|
|
464
|
+
}
|
|
465
|
+
}
|
|
466
|
+
|
|
186
467
|
export interface SystemLogger {
|
|
187
468
|
level?: IOConnectCore.Logger.LogLevel;
|
|
188
469
|
callback?: (logInfo: any) => void;
|
|
189
470
|
}
|
|
190
471
|
|
|
472
|
+
/**
|
|
473
|
+
* Describes an instance of the initialized io.Connect library.
|
|
474
|
+
*/
|
|
191
475
|
export interface API extends IOConnectCore.API {
|
|
476
|
+
|
|
477
|
+
/**
|
|
478
|
+
* Window Management API.
|
|
479
|
+
*/
|
|
192
480
|
windows: IOConnectBrowser.Windows.API;
|
|
481
|
+
|
|
482
|
+
/**
|
|
483
|
+
* Layouts API.
|
|
484
|
+
*/
|
|
193
485
|
layouts: IOConnectBrowser.Layouts.API;
|
|
486
|
+
|
|
487
|
+
/**
|
|
488
|
+
* Notifications API.
|
|
489
|
+
*/
|
|
194
490
|
notifications: IOConnectBrowser.Notifications.API;
|
|
491
|
+
|
|
492
|
+
/**
|
|
493
|
+
* Channels API.
|
|
494
|
+
*/
|
|
195
495
|
channels: IOConnectBrowser.Channels.API;
|
|
496
|
+
|
|
497
|
+
/**
|
|
498
|
+
* App Management API.
|
|
499
|
+
*/
|
|
196
500
|
appManager: IOConnectBrowser.AppManager.API;
|
|
501
|
+
|
|
502
|
+
/**
|
|
503
|
+
* Intents API.
|
|
504
|
+
*/
|
|
197
505
|
intents: IOConnectBrowser.Intents.API;
|
|
506
|
+
|
|
507
|
+
/**
|
|
508
|
+
* Themes API.
|
|
509
|
+
*/
|
|
198
510
|
themes?: IOConnectBrowser.Themes.API;
|
|
511
|
+
|
|
512
|
+
/**
|
|
513
|
+
* Workspaces API.
|
|
514
|
+
*/
|
|
199
515
|
workspaces?: IOConnectWorkspaces.API;
|
|
516
|
+
|
|
517
|
+
/**
|
|
518
|
+
* Search API.
|
|
519
|
+
*/
|
|
200
520
|
search?: IOConnectSearch.API;
|
|
521
|
+
|
|
522
|
+
/**
|
|
523
|
+
* @ignore
|
|
524
|
+
*/
|
|
201
525
|
webPlatform?: IOConnectBrowser.WebPlatform.API;
|
|
526
|
+
|
|
527
|
+
/**
|
|
528
|
+
* App Preferences API.
|
|
529
|
+
*/
|
|
202
530
|
prefs: IOConnectBrowser.Prefs.API;
|
|
531
|
+
|
|
532
|
+
/**
|
|
533
|
+
* Modals API.
|
|
534
|
+
*/
|
|
535
|
+
modals?: IOConnectModals.API;
|
|
203
536
|
}
|
|
204
537
|
|
|
205
538
|
/**
|
|
206
539
|
* @intro
|
|
207
|
-
* Using the Window Management API, your
|
|
540
|
+
* Using the Window Management API, your app can easily open and manipulate browser windows.
|
|
208
541
|
* This allows you to transform your traditional single-window web app into a multi-window native-like web application.
|
|
209
|
-
* The Window Management API enables
|
|
542
|
+
* The Window Management API enables apps to:
|
|
210
543
|
*
|
|
211
544
|
* - open multiple windows;
|
|
212
545
|
* - manipulate the position and size of opened windows;
|
|
213
546
|
* - pass context data upon opening new windows;
|
|
214
547
|
* - listen for and handle events related to opening and closing windows;
|
|
215
548
|
*
|
|
216
|
-
* The Window Management API is accessible
|
|
549
|
+
* The Window Management API is accessible via the [`io.windows`](#API) object.
|
|
217
550
|
*/
|
|
218
551
|
export namespace Windows {
|
|
219
552
|
export interface API {
|
|
@@ -417,14 +750,17 @@ export namespace IOConnectBrowser {
|
|
|
417
750
|
|
|
418
751
|
/**
|
|
419
752
|
* @intro
|
|
420
|
-
*
|
|
753
|
+
* **io.Connect Browser** enables you to to save and later restore the exact arrangement and context of your environment
|
|
754
|
+
* - windows, apps, Workspaces, and their respective bounds and context.
|
|
755
|
+
*
|
|
756
|
+
* The Layouts API offers the following features:
|
|
421
757
|
*
|
|
422
|
-
* - importing, exporting, removing and
|
|
758
|
+
* - importing, exporting, removing. and retrieving Layouts;
|
|
423
759
|
* - saving and restoring Layouts;
|
|
424
|
-
* - events related to adding, removing, changing or saving Layouts;
|
|
760
|
+
* - events related to adding, removing, changing, or saving Layouts;
|
|
425
761
|
* - requesting browser permission for the Multi-Screen Window Placement API;
|
|
426
762
|
*
|
|
427
|
-
* The Layouts API is accessible
|
|
763
|
+
* The Layouts API is accessible via the [`io.layouts`](#API) object.
|
|
428
764
|
*/
|
|
429
765
|
namespace Layouts {
|
|
430
766
|
|
|
@@ -453,6 +789,11 @@ export namespace IOConnectBrowser {
|
|
|
453
789
|
*/
|
|
454
790
|
get(name: string, type: LayoutType): Promise<Layout | undefined>;
|
|
455
791
|
|
|
792
|
+
/**
|
|
793
|
+
* Retrieves the last restored Global Layout (if any).
|
|
794
|
+
*/
|
|
795
|
+
getCurrentLayout(): Promise<Layout | undefined>;
|
|
796
|
+
|
|
456
797
|
/**
|
|
457
798
|
* Returns a lightweight description of all Layouts of the provided type, without the extensive objects describing the Layout components.
|
|
458
799
|
* @param type Type of the Layouts to fetch.
|
|
@@ -503,6 +844,13 @@ export namespace IOConnectBrowser {
|
|
|
503
844
|
*/
|
|
504
845
|
onChanged(callback: (layout: Layout) => void): () => void;
|
|
505
846
|
|
|
847
|
+
/**
|
|
848
|
+
* Notifies when a new default Global Layout has been selected or when the current one has been cleared.
|
|
849
|
+
* @param callback Callback function for handling the event. Receives as an argument an object with a `name` property
|
|
850
|
+
* holding the name of the newly selected default Global Layout. If the default Global Layout has been cleared, the argument will be `undefined`.
|
|
851
|
+
*/
|
|
852
|
+
onDefaultGlobalChanged(callback: (layout?: { name: string }) => void): () => void;
|
|
853
|
+
|
|
506
854
|
/**
|
|
507
855
|
* Notifies when a Layout is removed.
|
|
508
856
|
* @param callback Callback function to handle the event. Receives the `Layout` object as an argument and returns an unsubscribe function.
|
|
@@ -557,10 +905,17 @@ export namespace IOConnectBrowser {
|
|
|
557
905
|
rename(layout: Layout, newName: string): Promise<LayoutResult>;
|
|
558
906
|
|
|
559
907
|
/**
|
|
560
|
-
* Notifies when a Layout is renamed.
|
|
561
|
-
* @param callback Callback function
|
|
908
|
+
* Notifies when a Layout is renamed. Returns an unsubscribe function.
|
|
909
|
+
* @param callback Callback function for handling the event. Receives as a first argument the `Layout` object describing the renamed Layout.
|
|
910
|
+
* Receives as a second argument an object with a `name` property holding the previous Layout name.
|
|
562
911
|
*/
|
|
563
|
-
onRenamed(callback: (layout: Layout) => void): () => void;
|
|
912
|
+
onRenamed(callback: (layout: Layout, previous: { name: string }) => void): () => void;
|
|
913
|
+
|
|
914
|
+
/**
|
|
915
|
+
* Notifies when a Layout is restored.
|
|
916
|
+
* @param callback Callback function for handling the event. Receives as an argument the `Layout` object that was restored.
|
|
917
|
+
*/
|
|
918
|
+
onRestored(callback: (layout: Layout) => void): () => void;
|
|
564
919
|
|
|
565
920
|
/**
|
|
566
921
|
* Updates the metadata of a Layout.
|
|
@@ -583,8 +938,8 @@ export namespace IOConnectBrowser {
|
|
|
583
938
|
components: Array<WindowComponent | WorkspaceFrameComponent | IOConnectWorkspaces.WorkspaceComponent>;
|
|
584
939
|
|
|
585
940
|
/**
|
|
586
|
-
* Used internally to audit operations.
|
|
587
|
-
* @ignore
|
|
941
|
+
* Used internally to audit operations.
|
|
942
|
+
* @ignore
|
|
588
943
|
*/
|
|
589
944
|
token?: string;
|
|
590
945
|
|
|
@@ -787,11 +1142,11 @@ export namespace IOConnectBrowser {
|
|
|
787
1142
|
/**
|
|
788
1143
|
* @intro
|
|
789
1144
|
* The Notifications API provides a way to display native notifications with actions and to handle notification and action clicks.
|
|
790
|
-
* **io.Connect Browser** supports all available
|
|
1145
|
+
* **io.Connect Browser** supports all available notification settings as defined in the [DOM Notifications API](https://developer.mozilla.org/en-US/docs/Web/API/Notifications_API).
|
|
791
1146
|
*
|
|
792
1147
|
* The **io.Connect Browser** Notifications API extends the DOM Notifications API with the option to handle notification and action clicks using Interop methods.
|
|
793
1148
|
*
|
|
794
|
-
* The Notifications API is accessible
|
|
1149
|
+
* The Notifications API is accessible via the [`io.notifications`](#API) object.
|
|
795
1150
|
*/
|
|
796
1151
|
export namespace Notifications {
|
|
797
1152
|
export interface API {
|
|
@@ -826,19 +1181,25 @@ export namespace IOConnectBrowser {
|
|
|
826
1181
|
*/
|
|
827
1182
|
onClosed(callback: (notification: { id: string }) => void): UnsubscribeFunction;
|
|
828
1183
|
|
|
829
|
-
/**
|
|
830
|
-
* Notifies when the global notification settings are changed.
|
|
1184
|
+
/**
|
|
1185
|
+
* Notifies when the global notification settings are changed.
|
|
831
1186
|
* @param callback Callback function for handling the event.
|
|
832
1187
|
*/
|
|
833
1188
|
onConfigurationChanged(callback: (configuration: Configuration) => void): UnsubscribeFunction;
|
|
834
1189
|
|
|
835
|
-
/**
|
|
836
|
-
* Notifies when the number of active notification is changed.
|
|
1190
|
+
/**
|
|
1191
|
+
* Notifies when the number of active notification is changed.
|
|
837
1192
|
* @param callback Callback function for handling the event.
|
|
838
1193
|
*/
|
|
839
1194
|
onActiveCountChanged(callback: (info: { count: number; }) => void): UnsubscribeFunction;
|
|
840
1195
|
|
|
841
|
-
/**
|
|
1196
|
+
/**
|
|
1197
|
+
* Alias for `onActiveCountChanged()` for compatibility with **io.Connect Desktop**.
|
|
1198
|
+
* @param callback Callback function for handling the event.
|
|
1199
|
+
*/
|
|
1200
|
+
onCounterChanged(callback: (info: { count: number; }) => void): UnsubscribeFunction;
|
|
1201
|
+
|
|
1202
|
+
/** Notifies when the state of a notification is changed.
|
|
842
1203
|
* @param callback Callback function for handling the event.
|
|
843
1204
|
*/
|
|
844
1205
|
onStateChanged(callback: (notification: { id: string; }, state: State) => void): UnsubscribeFunction;
|
|
@@ -978,6 +1339,11 @@ export namespace IOConnectBrowser {
|
|
|
978
1339
|
enableToasts?: boolean;
|
|
979
1340
|
/** Filter with names of apps that are allowed or not allowed to raise notifications. */
|
|
980
1341
|
sourceFilter?: NotificationFilter;
|
|
1342
|
+
/**
|
|
1343
|
+
* If `true`, will enable showing a notification badge in the io.Connect Home App.
|
|
1344
|
+
* @default true
|
|
1345
|
+
*/
|
|
1346
|
+
showNotificationBadge?: boolean;
|
|
981
1347
|
}
|
|
982
1348
|
|
|
983
1349
|
/** Filter with names of apps that are allowed or not allowed to raise notifications. */
|
|
@@ -992,13 +1358,14 @@ export namespace IOConnectBrowser {
|
|
|
992
1358
|
/**
|
|
993
1359
|
* @intro
|
|
994
1360
|
* Channels are globally accessed named contexts that allow users to dynamically group apps, instructing them to work over the same shared data object.
|
|
1361
|
+
*
|
|
995
1362
|
* The Channels API enables you to:
|
|
996
1363
|
*
|
|
997
|
-
* -
|
|
998
|
-
* -
|
|
999
|
-
* - publish
|
|
1364
|
+
* - retrieve the names and contexts of all Channels;
|
|
1365
|
+
* - retrieve the current Channel, join and leave Channels, subscribe for the event which fires when the current Channel has changed;
|
|
1366
|
+
* - publish data to other apps on the same Channel and subscribe for Channel updates to react to data published by other apps;
|
|
1000
1367
|
*
|
|
1001
|
-
* The Channels API is accessible
|
|
1368
|
+
* The Channels API is accessible via the [`io.channels`](#API) object.
|
|
1002
1369
|
*/
|
|
1003
1370
|
namespace Channels {
|
|
1004
1371
|
/**
|
|
@@ -1115,7 +1482,7 @@ export namespace IOConnectBrowser {
|
|
|
1115
1482
|
onChanged(callback: (channel: string) => void): UnsubscribeFunction;
|
|
1116
1483
|
|
|
1117
1484
|
/**
|
|
1118
|
-
* Notifies when the current window joins or leaves a Channel. Can be used both in single and in multi Channel mode.
|
|
1485
|
+
* Notifies when the current window joins or leaves a Channel. Can be used both in single and in multi Channel mode.
|
|
1119
1486
|
* If used in single Channel mode, when the window joins a Channel, the array argument passed to the callback for handling the event
|
|
1120
1487
|
* will always contain a single member; when the window leaves the current Channel, the array will be empty. Returns an unsubscribe function.
|
|
1121
1488
|
* @param callback Callback function for handling the event. Receives a list with the names of the currently joined Channels as an argument.
|
|
@@ -1176,6 +1543,27 @@ export namespace IOConnectBrowser {
|
|
|
1176
1543
|
* @since io.Connect Browser 3.3
|
|
1177
1544
|
*/
|
|
1178
1545
|
restrictAll(restrictions: RestrictionsConfig): Promise<void>;
|
|
1546
|
+
|
|
1547
|
+
/**
|
|
1548
|
+
* Clears the context data of the current Channel. The `data` property of the Channel context is set to an empty object.
|
|
1549
|
+
* Pass a Channel name as an argument to clear the data of a specific Channel.
|
|
1550
|
+
* @param name Name of the Channel whose context data to clear.
|
|
1551
|
+
*/
|
|
1552
|
+
clearChannelData(name?: string): Promise<void>;
|
|
1553
|
+
|
|
1554
|
+
/**
|
|
1555
|
+
* Sets a specified path within the Channel context to the provided value. If the path doesn't exist, it will be created.
|
|
1556
|
+
* @param path Object containing the path to update and the value with which to update it. The path must be specified as a dot-separated string (e.g., `"prop1.prop2"`).
|
|
1557
|
+
* @param name Name of the Channel to update. If not specified, will update the current Channel.
|
|
1558
|
+
*/
|
|
1559
|
+
setPath(path: IOConnectBrowser.Contexts.PathValue, name?: string): Promise<void>;
|
|
1560
|
+
|
|
1561
|
+
/**
|
|
1562
|
+
* Sets a list of specified paths within the Channel context to the provided values. If a path doesn't exist, it will be created.
|
|
1563
|
+
* @param paths List of objects each containing a path to update and the value with which to update it. The path must be specified as a dot-separated string (e.g., `"prop1.prop2"`).
|
|
1564
|
+
* @param name Name of the Channel to update. If not specified, will update the current Channel.
|
|
1565
|
+
*/
|
|
1566
|
+
setPaths(paths: IOConnectBrowser.Contexts.PathValue[], name?: string): Promise<void>;
|
|
1179
1567
|
}
|
|
1180
1568
|
|
|
1181
1569
|
/**
|
|
@@ -1221,7 +1609,7 @@ export namespace IOConnectBrowser {
|
|
|
1221
1609
|
*/
|
|
1222
1610
|
export interface PublishOptions {
|
|
1223
1611
|
/**
|
|
1224
|
-
* The name of the Channel to update. If not provided, the current Channel will be updated.
|
|
1612
|
+
* The name of the Channel to update. If not provided, the current Channel will be updated.
|
|
1225
1613
|
*/
|
|
1226
1614
|
name?: string;
|
|
1227
1615
|
|
|
@@ -1281,11 +1669,11 @@ export namespace IOConnectBrowser {
|
|
|
1281
1669
|
* this channel in a UI, e.g: `#FF0000`. May be any color value supported by
|
|
1282
1670
|
* CSS, e.g. name, hex, rgba, etc.. */
|
|
1283
1671
|
color?: string;
|
|
1284
|
-
|
|
1672
|
+
|
|
1285
1673
|
/**
|
|
1286
1674
|
* A URL of an image that can be used to display this channel. */
|
|
1287
1675
|
glyph?: string;
|
|
1288
|
-
|
|
1676
|
+
}
|
|
1289
1677
|
|
|
1290
1678
|
export interface FDC3ChannelMeta {
|
|
1291
1679
|
id: string;
|
|
@@ -1381,12 +1769,14 @@ export namespace IOConnectBrowser {
|
|
|
1381
1769
|
* @intro
|
|
1382
1770
|
* The App Management API provides a way to manage **io.Connect Browser** apps. It offers abstractions for:
|
|
1383
1771
|
*
|
|
1384
|
-
* - **Application** - a web app as a logical entity, registered in **io.Connect Browser** with some metadata (name, title, version, etc.)
|
|
1385
|
-
*
|
|
1772
|
+
* - **Application** - a web app as a logical entity, registered in **io.Connect Browser** with some metadata (name, title, version, etc.)
|
|
1773
|
+
* and with all the configuration needed to spawn one or more instances of it.
|
|
1774
|
+
* The App Management API provides facilities for retrieving app metadata and for detecting when an app has been added or removed.
|
|
1386
1775
|
*
|
|
1387
|
-
* - **Instance** -
|
|
1776
|
+
* - **Instance** - a running copy of a web app hosted in an io.Connect Window. The App Management API provides facilities for
|
|
1777
|
+
* starting and stopping app instances and tracking app and instance related events.
|
|
1388
1778
|
*
|
|
1389
|
-
* The App Management API is accessible
|
|
1779
|
+
* The App Management API is accessible via the [`io.appManager`](#API) object.
|
|
1390
1780
|
*/
|
|
1391
1781
|
namespace AppManager {
|
|
1392
1782
|
/**
|
|
@@ -1551,7 +1941,7 @@ export namespace IOConnectBrowser {
|
|
|
1551
1941
|
*/
|
|
1552
1942
|
channelSelector?: ChannelSelector;
|
|
1553
1943
|
|
|
1554
|
-
/**
|
|
1944
|
+
/**
|
|
1555
1945
|
* Configuration for the `sandbox` attribute of the `<iframe>` element in which the app will be started when opened in a Workspace.
|
|
1556
1946
|
*/
|
|
1557
1947
|
iframePermissionsPolicy?: IFramePermissionsPolicyConfig;
|
|
@@ -1770,14 +2160,14 @@ export namespace IOConnectBrowser {
|
|
|
1770
2160
|
appId: string;
|
|
1771
2161
|
|
|
1772
2162
|
/**
|
|
1773
|
-
* The name of the application. The name should be unique within an FDC3 App Directory instance.
|
|
1774
|
-
* The exception to the uniqueness constraint is that an App Directory can hold definitions for multiple versions of the same app.
|
|
2163
|
+
* The name of the application. The name should be unique within an FDC3 App Directory instance.
|
|
2164
|
+
* The exception to the uniqueness constraint is that an App Directory can hold definitions for multiple versions of the same app.
|
|
1775
2165
|
* The same appName could occur in other directories. We are not currently specifying app name conventions in the document.
|
|
1776
2166
|
*/
|
|
1777
2167
|
name: string;
|
|
1778
2168
|
|
|
1779
2169
|
/**
|
|
1780
|
-
* Enum: "web" "native" "citrix" "onlineNative" "other".
|
|
2170
|
+
* Enum: "web" "native" "citrix" "onlineNative" "other".
|
|
1781
2171
|
* The technology type that is used to launch and run the application. Each application type implies a particular set of launch details
|
|
1782
2172
|
*/
|
|
1783
2173
|
type: FDC3DefinitionV2Types;
|
|
@@ -1816,7 +2206,7 @@ export namespace IOConnectBrowser {
|
|
|
1816
2206
|
description?: string;
|
|
1817
2207
|
|
|
1818
2208
|
/**
|
|
1819
|
-
* An array of string categories that describe the application.
|
|
2209
|
+
* An array of string categories that describe the application.
|
|
1820
2210
|
* These are meant as a hint to catalogs or stores listing FDC3-enabled apps and it is expected that these will make a best effort to find appropriate categories (or category) under which to list the app.
|
|
1821
2211
|
*/
|
|
1822
2212
|
categories?: string[];
|
|
@@ -1857,14 +2247,14 @@ export namespace IOConnectBrowser {
|
|
|
1857
2247
|
customConfig?: PropertiesObject[];
|
|
1858
2248
|
|
|
1859
2249
|
/**
|
|
1860
|
-
* A mapping from host name to a host-specific application manifest object or URI from which that manifest can be retrieved.
|
|
1861
|
-
* The manifest should provide details required to launch and use the application within the specified host.
|
|
2250
|
+
* A mapping from host name to a host-specific application manifest object or URI from which that manifest can be retrieved.
|
|
2251
|
+
* The manifest should provide details required to launch and use the application within the specified host.
|
|
1862
2252
|
* The manifest MAY duplicate or override information provided in the details field.
|
|
1863
2253
|
*/
|
|
1864
2254
|
hostManifests?: any;
|
|
1865
2255
|
|
|
1866
2256
|
/**
|
|
1867
|
-
* Metadata that describes how the application uses FDC3 APIs. This metadata serves multiple purposes:
|
|
2257
|
+
* Metadata that describes how the application uses FDC3 APIs. This metadata serves multiple purposes:
|
|
1868
2258
|
* - It supports intent resolution by a desktop agent, by declaring what intents an app listens for.
|
|
1869
2259
|
* - It may be used, for example in an app catalog UI, to find apps that 'interoperate with' other apps.\
|
|
1870
2260
|
* - It provides a standard location to document how the app interacts with user channels, app channels, and intents, for use by other app developers and desktop assemblers.
|
|
@@ -1872,7 +2262,7 @@ export namespace IOConnectBrowser {
|
|
|
1872
2262
|
interop?: InteropV2;
|
|
1873
2263
|
|
|
1874
2264
|
/**
|
|
1875
|
-
* Provides localized alternatives to any field of the AppD record, which may also refer to an alternative version of the application that is also localized
|
|
2265
|
+
* Provides localized alternatives to any field of the AppD record, which may also refer to an alternative version of the application that is also localized
|
|
1876
2266
|
* (e.g. by providing an alternative URL). The keys to this object should be language tags as defined by IETF RFC 5646, e.g. en, en-GB or fr-FR.
|
|
1877
2267
|
*/
|
|
1878
2268
|
localizedVersions?: { [languageTag: string]: LocalizedVersionDefinition };
|
|
@@ -2041,14 +2431,14 @@ export namespace IOConnectBrowser {
|
|
|
2041
2431
|
|
|
2042
2432
|
/**
|
|
2043
2433
|
* @intro
|
|
2044
|
-
* In certain workflow scenarios, your
|
|
2045
|
-
* For instance, you may have an
|
|
2046
|
-
* When the user clicks on an instrument, you want to start an
|
|
2047
|
-
* In other cases, you may want to present the user with several options for executing an action or handling data from the current
|
|
2434
|
+
* In certain workflow scenarios, your app may need to start (or activate) a specific app.
|
|
2435
|
+
* For instance, you may have an app showing client portfolios with financial instruments.
|
|
2436
|
+
* When the user clicks on an instrument, you want to start an app which shows a chart for that instrument.
|
|
2437
|
+
* In other cases, you may want to present the user with several options for executing an action or handling data from the current app.
|
|
2048
2438
|
*
|
|
2049
|
-
* The Intents API makes all that possible by enabling
|
|
2439
|
+
* The Intents API makes all that possible by enabling apps to register, find, and raise Intents.
|
|
2050
2440
|
*
|
|
2051
|
-
* The Intents API is accessible
|
|
2441
|
+
* The Intents API is accessible via the [`io.intents`](#API) object.
|
|
2052
2442
|
*/
|
|
2053
2443
|
namespace Intents {
|
|
2054
2444
|
export interface API {
|
|
@@ -2069,7 +2459,7 @@ export namespace IOConnectBrowser {
|
|
|
2069
2459
|
/**
|
|
2070
2460
|
* @ignore
|
|
2071
2461
|
* @deprecated Use register() method instead
|
|
2072
|
-
*
|
|
2462
|
+
*
|
|
2073
2463
|
* If your application is an intent handler use this method to handle incoming intent requests.
|
|
2074
2464
|
* Please note that when a new instance of your application is started as a result of a raised intent with
|
|
2075
2465
|
* e.g. `startNew` your application needs to call `addIntentListener()` on startup so that the intent can be resolved.
|
|
@@ -2138,7 +2528,7 @@ export namespace IOConnectBrowser {
|
|
|
2138
2528
|
}
|
|
2139
2529
|
export interface Config {
|
|
2140
2530
|
/**
|
|
2141
|
-
* Whether to use Intents Resolver UI to handle raising an intent.
|
|
2531
|
+
* Whether to use Intents Resolver UI to handle raising an intent.
|
|
2142
2532
|
* The UI provides the user with a list of all available applications and running instances which can handle the raised intent.
|
|
2143
2533
|
* Default value: true
|
|
2144
2534
|
*/
|
|
@@ -2151,7 +2541,7 @@ export namespace IOConnectBrowser {
|
|
|
2151
2541
|
intentsResolverAppName?: string;
|
|
2152
2542
|
|
|
2153
2543
|
/**
|
|
2154
|
-
* Timeout to wait for response from Intents Resolver UI
|
|
2544
|
+
* Timeout to wait for response from Intents Resolver UI
|
|
2155
2545
|
* @default 60000
|
|
2156
2546
|
*/
|
|
2157
2547
|
methodResponseTimeoutMs?: number;
|
|
@@ -2265,8 +2655,8 @@ export namespace IOConnectBrowser {
|
|
|
2265
2655
|
}
|
|
2266
2656
|
|
|
2267
2657
|
/**
|
|
2268
|
-
*
|
|
2269
|
-
* Use to define dynamic intents, that will have the same lifespan as your application instance
|
|
2658
|
+
*
|
|
2659
|
+
* Use to define dynamic intents, that will have the same lifespan as your application instance
|
|
2270
2660
|
* */
|
|
2271
2661
|
export interface AddIntentListenerRequest {
|
|
2272
2662
|
intent: string;
|
|
@@ -2294,7 +2684,7 @@ export namespace IOConnectBrowser {
|
|
|
2294
2684
|
|
|
2295
2685
|
/**
|
|
2296
2686
|
* Flag indicating whether the Intents Resolver UI will open to provide the user with the list of valid Intent handlers.
|
|
2297
|
-
* @default true
|
|
2687
|
+
* @default true
|
|
2298
2688
|
*/
|
|
2299
2689
|
openResolver?: boolean;
|
|
2300
2690
|
|
|
@@ -2455,8 +2845,8 @@ export namespace IOConnectBrowser {
|
|
|
2455
2845
|
*/
|
|
2456
2846
|
readonly timeout?: number;
|
|
2457
2847
|
/**
|
|
2458
|
-
* Whether to wait for the Intents Resolver UI to choose a handler for the raised intent.
|
|
2459
|
-
* If set to true, the timer starts after there's a chosen handler from the user.
|
|
2848
|
+
* Whether to wait for the Intents Resolver UI to choose a handler for the raised intent.
|
|
2849
|
+
* If set to true, the timer starts after there's a chosen handler from the user.
|
|
2460
2850
|
* Otherwise, the start point is the beginning of the raise invocation.
|
|
2461
2851
|
* @default: false
|
|
2462
2852
|
*/
|
|
@@ -2527,14 +2917,12 @@ export namespace IOConnectBrowser {
|
|
|
2527
2917
|
* @intro
|
|
2528
2918
|
* **io.Connect Browser** has two built-in themes - "Day" and "Night". You can control the themes programmatically by using the Themes API.
|
|
2529
2919
|
*
|
|
2530
|
-
* The Themes API is accessible
|
|
2920
|
+
* The Themes API is accessible via the [`io.themes`](#API) object.
|
|
2531
2921
|
*/
|
|
2532
2922
|
namespace Themes {
|
|
2533
2923
|
export interface API {
|
|
2534
2924
|
/**
|
|
2535
2925
|
* Returns the current theme.
|
|
2536
|
-
* @param request can be the intent's name or an IntentRequest object carrying the intent, and its optional target, context and start options (see "startNew").
|
|
2537
|
-
* @returns Promise that resolves with IntentResult.
|
|
2538
2926
|
*/
|
|
2539
2927
|
getCurrent(): Promise<Theme>;
|
|
2540
2928
|
|
|
@@ -2589,11 +2977,13 @@ export namespace IOConnectBrowser {
|
|
|
2589
2977
|
/**
|
|
2590
2978
|
* @docname App Preferences
|
|
2591
2979
|
* @intro
|
|
2592
|
-
* The App Preferences API enables apps to store custom user-specific data and retrieve it when necessary.
|
|
2593
|
-
*
|
|
2594
|
-
*
|
|
2595
|
-
*
|
|
2596
|
-
*
|
|
2980
|
+
* The App Preferences API enables apps to store custom user-specific data and retrieve it when necessary.
|
|
2981
|
+
* This allows you to enhance the UX of your apps by instrumenting them to preserve specific user settings and apply them when the app is relaunched.
|
|
2982
|
+
*
|
|
2983
|
+
* The App Preferences API provides methods for updating, replacing and clearing user settings stored for the current or a specific app,
|
|
2984
|
+
* as well as for all apps of the current user.
|
|
2985
|
+
*
|
|
2986
|
+
* The App Preferences API is accessible via the [`io.prefs`](#API) object.
|
|
2597
2987
|
*/
|
|
2598
2988
|
namespace Prefs {
|
|
2599
2989
|
/**
|