@interopio/browser 3.0.5 → 3.1.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/browser.d.ts +312 -2
- package/changelog.md +11 -0
- package/dist/browser.es.js +1780 -437
- package/dist/browser.es.js.map +1 -1
- package/dist/browser.umd.js +1780 -437
- package/dist/browser.umd.js.map +1 -1
- package/dist/browser.umd.min.js +1 -1
- package/package.json +6 -5
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 { WindowOnChannelInfo, WindowWithChannelFilter } from "./src/channels/protocol";
|
|
9
10
|
|
|
10
11
|
/**
|
|
11
12
|
* Factory function that creates a new ioconnect instance.
|
|
@@ -271,6 +272,11 @@ export namespace IOConnectBrowser {
|
|
|
271
272
|
* @param callback Callback function to handle the event. Returns an unsubscribe function.
|
|
272
273
|
*/
|
|
273
274
|
onFocusChanged(callback: (window: WebWindow) => void): UnsubscribeFunction;
|
|
275
|
+
|
|
276
|
+
/**
|
|
277
|
+
* Retrieves the current Channel of the window, if any.
|
|
278
|
+
*/
|
|
279
|
+
getChannel(): Promise<string>;
|
|
274
280
|
}
|
|
275
281
|
export interface Settings {
|
|
276
282
|
|
|
@@ -897,6 +903,26 @@ export namespace IOConnectBrowser {
|
|
|
897
903
|
* @returns Promise that resolves with the initial channel context.
|
|
898
904
|
*/
|
|
899
905
|
add(info: ChannelContext): Promise<ChannelContext>;
|
|
906
|
+
|
|
907
|
+
/**
|
|
908
|
+
* Retrieves the context of the current Channel.
|
|
909
|
+
* @returns Promise that resolves with the context of the current Channel.
|
|
910
|
+
*/
|
|
911
|
+
getMy(): Promise<ChannelContext | undefined>;
|
|
912
|
+
|
|
913
|
+
/**
|
|
914
|
+
* Retrieves all windows on a specified Channel.
|
|
915
|
+
* @param channel The name of the Channel for which windows should be returned.
|
|
916
|
+
* @returns Promise that resolves with the list of all windows on a specified Channel.
|
|
917
|
+
*/
|
|
918
|
+
getWindowsOnChannel(channel: string): Promise<IOConnectBrowser.Windows.WebWindow[]>
|
|
919
|
+
|
|
920
|
+
/**
|
|
921
|
+
* Retrieves all windows that can use Channels together with their current Channel.
|
|
922
|
+
* @param filter Filter describing which windows to retrieve. If no filter is supplied, will return all windows that can use Channels.
|
|
923
|
+
* @returns Promise that resolves with the list of all windows that can use Channels together with their current Channel.
|
|
924
|
+
*/
|
|
925
|
+
getWindowsWithChannels(filter?: WindowWithChannelFilter): Promise<WindowOnChannelInfo[]>
|
|
900
926
|
}
|
|
901
927
|
|
|
902
928
|
/**
|
|
@@ -997,7 +1023,7 @@ export namespace IOConnectBrowser {
|
|
|
997
1023
|
* @param definitions A collection of application definition objects to be imported.
|
|
998
1024
|
* @param mode Import mode, by default it is "replace". "replace" mode replaces all existing definitions with the provided collection, "merge" mode adds (if new) or updates (if already existing) the provided definitions.
|
|
999
1025
|
*/
|
|
1000
|
-
import(definitions: Definition[], mode?: "replace" | "merge"): Promise<ImportResult>;
|
|
1026
|
+
import(definitions: (Definition | FDC3DefinitionV1 | FDC3DefinitionV2)[], mode?: "replace" | "merge"): Promise<ImportResult>;
|
|
1001
1027
|
|
|
1002
1028
|
/**
|
|
1003
1029
|
* Removed an application definition. This method will fire onAppRemoved if a definition was removed and it will do nothing if an app with this was was not found.
|
|
@@ -1006,7 +1032,7 @@ export namespace IOConnectBrowser {
|
|
|
1006
1032
|
remove(name: string): Promise<void>;
|
|
1007
1033
|
|
|
1008
1034
|
/** Exports all known application definitions */
|
|
1009
|
-
export(): Promise<Definition[]>;
|
|
1035
|
+
export(): Promise<(Definition | FDC3DefinitionV1 | FDC3DefinitionV2)[]>;
|
|
1010
1036
|
|
|
1011
1037
|
/** Removes all applications from the memory */
|
|
1012
1038
|
clear(): Promise<void>;
|
|
@@ -1143,6 +1169,285 @@ export namespace IOConnectBrowser {
|
|
|
1143
1169
|
* If set to true, the application will not be listed in the **io.Connect Browser** Launchpad. Defaults to false.
|
|
1144
1170
|
*/
|
|
1145
1171
|
hidden?: boolean;
|
|
1172
|
+
|
|
1173
|
+
/**
|
|
1174
|
+
* The FDC3 2.0 version of the definition. If set, this means the current definition was imported as FDC3 2.0 and parsed to IOConnectBrowser one.
|
|
1175
|
+
*/
|
|
1176
|
+
fdc3?: FDC3DefinitionV2;
|
|
1177
|
+
}
|
|
1178
|
+
|
|
1179
|
+
export interface FDC3DefinitionV1 {
|
|
1180
|
+
/**
|
|
1181
|
+
* Application name. Should be unique.
|
|
1182
|
+
*/
|
|
1183
|
+
name: string;
|
|
1184
|
+
|
|
1185
|
+
/**
|
|
1186
|
+
* The title of the application. Sets the window's title.
|
|
1187
|
+
*/
|
|
1188
|
+
title?: string;
|
|
1189
|
+
|
|
1190
|
+
/**
|
|
1191
|
+
* Application version.
|
|
1192
|
+
*/
|
|
1193
|
+
version?: string;
|
|
1194
|
+
|
|
1195
|
+
/**
|
|
1196
|
+
* The unique application identifier located within a specific application directory instance.
|
|
1197
|
+
*/
|
|
1198
|
+
appId: string;
|
|
1199
|
+
|
|
1200
|
+
/**
|
|
1201
|
+
* URI or full JSON of the application manifest providing all details related to launch and use requirements as described by the vendor.
|
|
1202
|
+
* The format of this manifest is vendor specific, but can be identified by the manifestType attribute.
|
|
1203
|
+
*/
|
|
1204
|
+
manifest: string;
|
|
1205
|
+
|
|
1206
|
+
/**
|
|
1207
|
+
* The manifest type which relates to the format and structure of the manifest content. The definition is based on the vendor specific format and definition outside of this specification.
|
|
1208
|
+
*/
|
|
1209
|
+
manifestType: string;
|
|
1210
|
+
|
|
1211
|
+
/**
|
|
1212
|
+
* Optional tooltip description e.g. for a launcher.
|
|
1213
|
+
*/
|
|
1214
|
+
tooltip?: string;
|
|
1215
|
+
|
|
1216
|
+
/**
|
|
1217
|
+
* Description of the application.This will typically be a 1 - 2 paragraph style blurb about the application.Allow mark up language.
|
|
1218
|
+
*/
|
|
1219
|
+
description?: string;
|
|
1220
|
+
|
|
1221
|
+
/**
|
|
1222
|
+
* Optional e - mail to receive queries about the application.
|
|
1223
|
+
*/
|
|
1224
|
+
contactEmail?: string;
|
|
1225
|
+
|
|
1226
|
+
/**
|
|
1227
|
+
* Optional e - mail to receive support requests for the application.
|
|
1228
|
+
*/
|
|
1229
|
+
supportEmail?: string;
|
|
1230
|
+
|
|
1231
|
+
/**
|
|
1232
|
+
* The name of the company that owns the application.The publisher has control over their namespace / app / signature.
|
|
1233
|
+
*/
|
|
1234
|
+
publisher?: string;
|
|
1235
|
+
|
|
1236
|
+
/**
|
|
1237
|
+
* Array of images to show the user when they are looking at app description.Each image can have an optional description / tooltip.
|
|
1238
|
+
*/
|
|
1239
|
+
images?: ImageV1[];
|
|
1240
|
+
|
|
1241
|
+
/**
|
|
1242
|
+
* Holds Icons used for the application, a Launcher may be able to use multiple Icon sizes or there may be a 'button' Icon.
|
|
1243
|
+
*/
|
|
1244
|
+
icons?: IconV1[];
|
|
1245
|
+
|
|
1246
|
+
/**
|
|
1247
|
+
* An optional set of name value pairs that can be used to deliver custom data from an App Directory to a launcher.
|
|
1248
|
+
*/
|
|
1249
|
+
customConfig?: PropertiesObject;
|
|
1250
|
+
|
|
1251
|
+
/**
|
|
1252
|
+
* The list of intents implemented by the Application
|
|
1253
|
+
*/
|
|
1254
|
+
intents?: Intent[];
|
|
1255
|
+
}
|
|
1256
|
+
|
|
1257
|
+
/** App Image holder */
|
|
1258
|
+
interface ImageV1 {
|
|
1259
|
+
/**
|
|
1260
|
+
* App Image URL.
|
|
1261
|
+
*/
|
|
1262
|
+
url?: string;
|
|
1263
|
+
}
|
|
1264
|
+
|
|
1265
|
+
/** Icon holder */
|
|
1266
|
+
interface IconV1 {
|
|
1267
|
+
/**
|
|
1268
|
+
* Icon URL.
|
|
1269
|
+
*/
|
|
1270
|
+
icon?: string;
|
|
1271
|
+
}
|
|
1272
|
+
|
|
1273
|
+
interface LocalizedVersionDefinition {
|
|
1274
|
+
appId?: string;
|
|
1275
|
+
name?: string;
|
|
1276
|
+
type?: FDC3DefinitionV2Types;
|
|
1277
|
+
details?: {
|
|
1278
|
+
url: string;
|
|
1279
|
+
};
|
|
1280
|
+
version?: string;
|
|
1281
|
+
title?: string;
|
|
1282
|
+
tooltip?: string;
|
|
1283
|
+
lang?: string;
|
|
1284
|
+
description?: string;
|
|
1285
|
+
categories?: string[];
|
|
1286
|
+
icons?: IconV2[];
|
|
1287
|
+
screenshots?: ImageV2[];
|
|
1288
|
+
contactEmail?: string;
|
|
1289
|
+
supportEmail?: string;
|
|
1290
|
+
moreInfo?: string;
|
|
1291
|
+
publisher?: string;
|
|
1292
|
+
customConfig?: PropertiesObject[];
|
|
1293
|
+
hostManifests?: any;
|
|
1294
|
+
interop?: InteropV2;
|
|
1295
|
+
localizedVersions?: { [languageTag: string]: LocalizedVersionDefinition };
|
|
1296
|
+
}
|
|
1297
|
+
|
|
1298
|
+
export interface FDC3DefinitionV2 {
|
|
1299
|
+
/**
|
|
1300
|
+
* The unique application identifier located within a specific application directory instance.
|
|
1301
|
+
*/
|
|
1302
|
+
appId: string;
|
|
1303
|
+
|
|
1304
|
+
/**
|
|
1305
|
+
* The name of the application. The name should be unique within an FDC3 App Directory instance.
|
|
1306
|
+
* The exception to the uniqueness constraint is that an App Directory can hold definitions for multiple versions of the same app.
|
|
1307
|
+
* The same appName could occur in other directories. We are not currently specifying app name conventions in the document.
|
|
1308
|
+
*/
|
|
1309
|
+
name: string;
|
|
1310
|
+
|
|
1311
|
+
/**
|
|
1312
|
+
* Enum: "web" "native" "citrix" "onlineNative" "other".
|
|
1313
|
+
* The technology type that is used to launch and run the application. Each application type implies a particular set of launch details
|
|
1314
|
+
*/
|
|
1315
|
+
type: FDC3DefinitionV2Types;
|
|
1316
|
+
|
|
1317
|
+
/**
|
|
1318
|
+
* The type specific launch details of the application.
|
|
1319
|
+
* These details are intended to be vendor-agnostic and MAY be duplicated or overridden by details provided in the hostManifests object for a specific host.
|
|
1320
|
+
*/
|
|
1321
|
+
details: {
|
|
1322
|
+
url: string;
|
|
1323
|
+
};
|
|
1324
|
+
|
|
1325
|
+
/**
|
|
1326
|
+
* Version of the application. This allows multiple app versions to be defined using the same app name. This can be a triplet but can also include things like 1.2.5 (BETA)
|
|
1327
|
+
*/
|
|
1328
|
+
version?: string;
|
|
1329
|
+
|
|
1330
|
+
/**
|
|
1331
|
+
* Optional title for the application, if missing use appName, typically used in a launcher UI.
|
|
1332
|
+
*/
|
|
1333
|
+
title?: string;
|
|
1334
|
+
|
|
1335
|
+
/**
|
|
1336
|
+
* Optional tooltip description e.g. for a launcher
|
|
1337
|
+
*/
|
|
1338
|
+
tooltip?: string;
|
|
1339
|
+
|
|
1340
|
+
/**
|
|
1341
|
+
* A language tag that specifies the primary language of both the application and its AppD entry, as defined by IETF RFC 5646.
|
|
1342
|
+
*/
|
|
1343
|
+
lang?: string;
|
|
1344
|
+
|
|
1345
|
+
/**
|
|
1346
|
+
* Description of the application. This will typically be a 1-2 paragraph style blurb about the application.
|
|
1347
|
+
*/
|
|
1348
|
+
description?: string;
|
|
1349
|
+
|
|
1350
|
+
/**
|
|
1351
|
+
* An array of string categories that describe the application.
|
|
1352
|
+
* 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.
|
|
1353
|
+
*/
|
|
1354
|
+
categories?: string[];
|
|
1355
|
+
|
|
1356
|
+
/**
|
|
1357
|
+
* Holds Icons used for the application, a Launcher may be able to use multiple Icon sizes or there may be a 'button' Icon
|
|
1358
|
+
*/
|
|
1359
|
+
icons?: IconV2[];
|
|
1360
|
+
|
|
1361
|
+
/**
|
|
1362
|
+
* Array of images to show the user when they are looking at app description. Each image can have an optional description/tooltip
|
|
1363
|
+
*/
|
|
1364
|
+
screenshots?: ImageV2[];
|
|
1365
|
+
|
|
1366
|
+
/**
|
|
1367
|
+
* Optional e-mail to receive queries about the application
|
|
1368
|
+
*/
|
|
1369
|
+
contactEmail?: string;
|
|
1370
|
+
|
|
1371
|
+
/**
|
|
1372
|
+
* Optional e-mail to receive support requests for the application
|
|
1373
|
+
*/
|
|
1374
|
+
supportEmail?: string;
|
|
1375
|
+
|
|
1376
|
+
/**
|
|
1377
|
+
* Optional URL that provides more information about the application
|
|
1378
|
+
*/
|
|
1379
|
+
moreInfo?: string;
|
|
1380
|
+
|
|
1381
|
+
/**
|
|
1382
|
+
* The name of the company that owns the application. The publisher has control over their namespace/app/signature.
|
|
1383
|
+
*/
|
|
1384
|
+
publisher?: string;
|
|
1385
|
+
|
|
1386
|
+
/**
|
|
1387
|
+
* An optional set of name value pairs that can be used to deliver custom data from an App Directory to a launcher
|
|
1388
|
+
*/
|
|
1389
|
+
customConfig?: PropertiesObject[];
|
|
1390
|
+
|
|
1391
|
+
/**
|
|
1392
|
+
* A mapping from host name to a host-specific application manifest object or URI from which that manifest can be retrieved.
|
|
1393
|
+
* The manifest should provide details required to launch and use the application within the specified host.
|
|
1394
|
+
* The manifest MAY duplicate or override information provided in the details field.
|
|
1395
|
+
*/
|
|
1396
|
+
hostManifests?: any;
|
|
1397
|
+
|
|
1398
|
+
/**
|
|
1399
|
+
* Metadata that describes how the application uses FDC3 APIs. This metadata serves multiple purposes:
|
|
1400
|
+
* - It supports intent resolution by a desktop agent, by declaring what intents an app listens for.
|
|
1401
|
+
* - It may be used, for example in an app catalog UI, to find apps that 'interoperate with' other apps.\
|
|
1402
|
+
* - 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.
|
|
1403
|
+
*/
|
|
1404
|
+
interop?: InteropV2;
|
|
1405
|
+
|
|
1406
|
+
/**
|
|
1407
|
+
* 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
|
|
1408
|
+
* (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.
|
|
1409
|
+
*/
|
|
1410
|
+
localizedVersions?: { [languageTag: string]: LocalizedVersionDefinition };
|
|
1411
|
+
}
|
|
1412
|
+
|
|
1413
|
+
type FDC3DefinitionV2Types = "web" | "native" | "citrix" | "onlineNative" | "other";
|
|
1414
|
+
|
|
1415
|
+
interface IconV2 {
|
|
1416
|
+
src: string;
|
|
1417
|
+
size?: string;
|
|
1418
|
+
type?: string;
|
|
1419
|
+
}
|
|
1420
|
+
|
|
1421
|
+
interface ImageV2 {
|
|
1422
|
+
src: string;
|
|
1423
|
+
size?: string;
|
|
1424
|
+
type?: string;
|
|
1425
|
+
label?: string;
|
|
1426
|
+
}
|
|
1427
|
+
|
|
1428
|
+
type IntentV2 = Omit<Intent, "name">;
|
|
1429
|
+
|
|
1430
|
+
interface InteropIntentsV2 {
|
|
1431
|
+
listensFor?: { [intentName: string]: IntentV2 };
|
|
1432
|
+
raises?: { [intentName: string]: string[] };
|
|
1433
|
+
}
|
|
1434
|
+
|
|
1435
|
+
interface InteropUserChannelV2 {
|
|
1436
|
+
broadcasts?: string[];
|
|
1437
|
+
listensFor?: string[];
|
|
1438
|
+
}
|
|
1439
|
+
|
|
1440
|
+
interface InteropAppChannelV2 {
|
|
1441
|
+
name: string;
|
|
1442
|
+
description?: string;
|
|
1443
|
+
broadcasts?: string[];
|
|
1444
|
+
listensFor?: string[];
|
|
1445
|
+
}
|
|
1446
|
+
|
|
1447
|
+
interface InteropV2 {
|
|
1448
|
+
intents?: InteropIntentsV2;
|
|
1449
|
+
userChannels?: InteropUserChannelV2;
|
|
1450
|
+
appChannels?: InteropAppChannelV2[];
|
|
1146
1451
|
}
|
|
1147
1452
|
|
|
1148
1453
|
/** Object describing an app. */
|
|
@@ -1234,6 +1539,11 @@ export namespace IOConnectBrowser {
|
|
|
1234
1539
|
relativeDirection?: "top" | "left" | "right" | "bottom";
|
|
1235
1540
|
|
|
1236
1541
|
waitForAGMReady?: boolean;
|
|
1542
|
+
|
|
1543
|
+
/**
|
|
1544
|
+
* Name of the Channel which the window will join.
|
|
1545
|
+
*/
|
|
1546
|
+
channelId?: string;
|
|
1237
1547
|
}
|
|
1238
1548
|
|
|
1239
1549
|
/** Generic object for passing properties, settings, etc., in the for of key/value pairs. */
|
package/changelog.md
CHANGED
|
@@ -1,3 +1,14 @@
|
|
|
1
|
+
3.1.1
|
|
2
|
+
chore: bump due to utils update
|
|
3
|
+
3.1.0
|
|
4
|
+
fix: Update application title to be optional in intent handler interface
|
|
5
|
+
feat: Added the option to configure the iframe sandboxing
|
|
6
|
+
feat: Introduce parsing of FDC3 2.0 definitions
|
|
7
|
+
feat: join a specified window to a channel
|
|
8
|
+
feat: add getChannel method to the webWindow
|
|
9
|
+
feat: enable starting an application instance on a passed channel
|
|
10
|
+
feat: add getMy, getWindowsOnChannel and getWindowsWithChannels methods to the Channels API
|
|
11
|
+
fix: preserve an active channel after reloading the window
|
|
1
12
|
3.0.4
|
|
2
13
|
chore: migrated @glue42/desktop to @interopio/desktop
|
|
3
14
|
3.0.3
|