@interopio/workspaces-api 4.6.0 → 5.0.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 +9 -2
- package/dist/workspaces.es.js +122 -14
- package/dist/workspaces.es.js.map +1 -1
- package/dist/workspaces.umd.js +122 -14
- 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 +93 -16
package/workspaces.d.ts
CHANGED
|
@@ -20,7 +20,10 @@ export namespace IOConnectWorkspaces {
|
|
|
20
20
|
|
|
21
21
|
/** An object describing a workspace layout. */
|
|
22
22
|
export interface WorkspaceLayout {
|
|
23
|
-
/**
|
|
23
|
+
/** A unique string identifier of the layout */
|
|
24
|
+
id?: string;
|
|
25
|
+
|
|
26
|
+
/** name of the layout */
|
|
24
27
|
name: string;
|
|
25
28
|
|
|
26
29
|
/** The type of the workspace element. */
|
|
@@ -185,6 +188,10 @@ export namespace IOConnectWorkspaces {
|
|
|
185
188
|
allowSystemHibernation?: boolean;
|
|
186
189
|
}
|
|
187
190
|
|
|
191
|
+
export interface RestoreWorkspaceByIdConfig extends RestoreWorkspaceConfig {
|
|
192
|
+
layoutId: string;
|
|
193
|
+
}
|
|
194
|
+
|
|
188
195
|
/**
|
|
189
196
|
* Settings for showing a previously hidden Workspaces Frame instance.
|
|
190
197
|
*/
|
|
@@ -480,6 +487,22 @@ export namespace IOConnectWorkspaces {
|
|
|
480
487
|
* @default true
|
|
481
488
|
*/
|
|
482
489
|
allowSystemHibernation?: boolean;
|
|
490
|
+
|
|
491
|
+
appRestrictions?: AppRestrictions | undefined;
|
|
492
|
+
}
|
|
493
|
+
|
|
494
|
+
export interface AppRestrictionRule {
|
|
495
|
+
allowInApplicationPopup?: boolean;
|
|
496
|
+
allowDrop?: boolean;
|
|
497
|
+
}
|
|
498
|
+
|
|
499
|
+
export interface AppRestrictionEntry extends AppRestrictionRule {
|
|
500
|
+
appName: string;
|
|
501
|
+
}
|
|
502
|
+
|
|
503
|
+
export interface AppRestrictions {
|
|
504
|
+
apps?: AppRestrictionEntry[];
|
|
505
|
+
default?: AppRestrictionRule;
|
|
483
506
|
}
|
|
484
507
|
|
|
485
508
|
/** A config object which provides fine grain control when locking a workspace */
|
|
@@ -775,6 +798,18 @@ export namespace IOConnectWorkspaces {
|
|
|
775
798
|
frame?: FrameTargetingOptions;
|
|
776
799
|
}
|
|
777
800
|
|
|
801
|
+
export interface RestoreWorkspaceByIdDefinition {
|
|
802
|
+
/**
|
|
803
|
+
* The id of a saved workspace layout, which will be restored.
|
|
804
|
+
*/
|
|
805
|
+
id: string;
|
|
806
|
+
|
|
807
|
+
/**
|
|
808
|
+
* An optional object containing various workspace restore options.
|
|
809
|
+
*/
|
|
810
|
+
restoreOptions?: RestoreWorkspaceConfig;
|
|
811
|
+
}
|
|
812
|
+
|
|
778
813
|
/** An object describing the possible options when restoring a workspace */
|
|
779
814
|
export interface RestoreWorkspaceDefinition {
|
|
780
815
|
/**
|
|
@@ -843,6 +878,8 @@ export namespace IOConnectWorkspaces {
|
|
|
843
878
|
|
|
844
879
|
/** An object describing a workspace layout without the underlying structure */
|
|
845
880
|
export interface WorkspaceLayoutSummary {
|
|
881
|
+
id?: string;
|
|
882
|
+
|
|
846
883
|
/** An unique string name and identifier of the layout */
|
|
847
884
|
name: string;
|
|
848
885
|
|
|
@@ -880,7 +917,7 @@ export namespace IOConnectWorkspaces {
|
|
|
880
917
|
/**
|
|
881
918
|
* Array of workspace definitions with which the frame should be opened
|
|
882
919
|
*/
|
|
883
|
-
workspaces: Array<IOConnectWorkspaces.WorkspaceDefinition | RestoreWorkspaceDefinition>;
|
|
920
|
+
workspaces: Array<IOConnectWorkspaces.WorkspaceDefinition | RestoreWorkspaceDefinition | RestoreWorkspaceByIdDefinition>;
|
|
884
921
|
}
|
|
885
922
|
|
|
886
923
|
export interface FrameInitializationContext {
|
|
@@ -980,11 +1017,11 @@ export namespace IOConnectWorkspaces {
|
|
|
980
1017
|
}
|
|
981
1018
|
|
|
982
1019
|
/**
|
|
983
|
-
*
|
|
1020
|
+
* Settings for placing a Workspaces App instance on top of the z-order.
|
|
984
1021
|
*/
|
|
985
1022
|
export interface FrameSetOnTopOptions {
|
|
986
1023
|
/**
|
|
987
|
-
* If `true`, the
|
|
1024
|
+
* If `true`, the Workspaces App instance will be set on top of the z-order.
|
|
988
1025
|
*/
|
|
989
1026
|
onTop: boolean;
|
|
990
1027
|
}
|
|
@@ -1287,9 +1324,11 @@ export namespace IOConnectWorkspaces {
|
|
|
1287
1324
|
showDialog<T>(options: FrameDialogOptions): Promise<T>;
|
|
1288
1325
|
|
|
1289
1326
|
/**
|
|
1290
|
-
* Sets
|
|
1327
|
+
* Sets a Workspaces App instance on top of the z-order.
|
|
1291
1328
|
* *Available only in **io.Connect Desktop**.*
|
|
1292
|
-
* @param options
|
|
1329
|
+
* @param options Settings for placing the Workspaces App instance on top of the z-order.
|
|
1330
|
+
* @since io.Connect Desktop 10.3
|
|
1331
|
+
* @since @interopio/workspaces-api 4.5
|
|
1293
1332
|
*/
|
|
1294
1333
|
setOnTop(options: FrameSetOnTopOptions): Promise<void>;
|
|
1295
1334
|
|
|
@@ -1397,6 +1436,9 @@ export namespace IOConnectWorkspaces {
|
|
|
1397
1436
|
/** The name of the originating layout of the current workspace if any */
|
|
1398
1437
|
layoutName: string | undefined;
|
|
1399
1438
|
|
|
1439
|
+
/** The id of the originating layout of the current workspace if any. Can be undefined if using with an older version of **io.Connect Desktop** or **io.Connect Browser**. */
|
|
1440
|
+
layoutId?: string;
|
|
1441
|
+
|
|
1400
1442
|
/** Indicates if the workspace is hibernated */
|
|
1401
1443
|
isHibernated?: boolean;
|
|
1402
1444
|
|
|
@@ -1480,6 +1522,8 @@ export namespace IOConnectWorkspaces {
|
|
|
1480
1522
|
* This setting doesn't apply to programmatic hibernation via the `hibernate()` method of a `Workspace` instance.
|
|
1481
1523
|
*/
|
|
1482
1524
|
allowSystemHibernation?: boolean;
|
|
1525
|
+
|
|
1526
|
+
appRestrictions?: AppRestrictions;
|
|
1483
1527
|
}
|
|
1484
1528
|
|
|
1485
1529
|
export type SaveLayoutConfig = Omit<Omit<IOConnectWorkspaces.WorkspaceLayoutSaveConfig, "name">, "workspaceId">;
|
|
@@ -1714,19 +1758,21 @@ export namespace IOConnectWorkspaces {
|
|
|
1714
1758
|
*/
|
|
1715
1759
|
onResumed(callback: () => void): Promise<IOConnectWorkspaces.Unsubscribe>;
|
|
1716
1760
|
|
|
1717
|
-
|
|
1718
|
-
|
|
1719
|
-
|
|
1720
|
-
|
|
1721
|
-
|
|
1722
|
-
|
|
1761
|
+
/**
|
|
1762
|
+
* Notifies when the Workspace tab has been reordered. Returns an unsubscribe function.
|
|
1763
|
+
* @param callback Callback function for handling the event.
|
|
1764
|
+
* @since io.Connect Desktop 10.3
|
|
1765
|
+
* @since io.Connect Browser 4.4
|
|
1766
|
+
* @since @interopio/workspaces-api 4.4
|
|
1767
|
+
*/
|
|
1723
1768
|
onTabReordered(callback: () => void): Promise<IOConnectWorkspaces.Unsubscribe>;
|
|
1724
1769
|
|
|
1725
1770
|
/**
|
|
1726
1771
|
* Notifies when the tab of a window participating in the Workspace has been reordered. Returns an unsubscribe function.
|
|
1727
1772
|
* @param callback Callback function for handling the event. Receives as an argument the `WorkspaceWindow` object describing the window whose tab has been reordered.
|
|
1728
|
-
*
|
|
1773
|
+
* @since io.Connect Desktop 10.3
|
|
1729
1774
|
* @since io.Connect Browser 4.4
|
|
1775
|
+
* @since @interopio/workspaces-api 4.4
|
|
1730
1776
|
*/
|
|
1731
1777
|
onWindowTabReordered(callback: (window: WorkspaceWindow) => void): Promise<IOConnectWorkspaces.Unsubscribe>;
|
|
1732
1778
|
|
|
@@ -2213,8 +2259,9 @@ export namespace IOConnectWorkspaces {
|
|
|
2213
2259
|
/**
|
|
2214
2260
|
* Notifies when the tab of the Workspace window has been reordered. Returns an unsubscribe function.
|
|
2215
2261
|
* @param callback Callback function for handling the event.
|
|
2216
|
-
*
|
|
2262
|
+
* @since io.Connect Desktop 10.3
|
|
2217
2263
|
* @since io.Connect Browser 4.4
|
|
2264
|
+
* @since @interopio/workspaces-api 4.4
|
|
2218
2265
|
*/
|
|
2219
2266
|
onTabReordered(callback: () => void): Promise<IOConnectWorkspaces.Unsubscribe>;
|
|
2220
2267
|
}
|
|
@@ -2286,6 +2333,7 @@ export namespace IOConnectWorkspaces {
|
|
|
2286
2333
|
|
|
2287
2334
|
/** A configuration object used to save a current workspace as a layout */
|
|
2288
2335
|
export interface WorkspaceLayoutSaveConfig {
|
|
2336
|
+
id?: string;
|
|
2289
2337
|
/**
|
|
2290
2338
|
* A string used as name (doubles as id) of the layout, which is later used when restoring it.
|
|
2291
2339
|
*/
|
|
@@ -2321,6 +2369,14 @@ export namespace IOConnectWorkspaces {
|
|
|
2321
2369
|
saveWindowContexts?: boolean;
|
|
2322
2370
|
}
|
|
2323
2371
|
|
|
2372
|
+
/** A configuration object used to overwrite an existing workspace layout, identified by its id */
|
|
2373
|
+
export interface WorkspaceLayoutSaveByIdConfig extends WorkspaceLayoutSaveConfig {
|
|
2374
|
+
/**
|
|
2375
|
+
* The id of the layout to overwrite.
|
|
2376
|
+
*/
|
|
2377
|
+
id?: string;
|
|
2378
|
+
}
|
|
2379
|
+
|
|
2324
2380
|
export interface SetMaximizationBoundaryConfig {
|
|
2325
2381
|
/**
|
|
2326
2382
|
* Represents the new value of the maximizationBoundary property
|
|
@@ -2397,6 +2453,12 @@ export namespace IOConnectWorkspaces {
|
|
|
2397
2453
|
*/
|
|
2398
2454
|
delete(name: string): Promise<void>;
|
|
2399
2455
|
|
|
2456
|
+
/**
|
|
2457
|
+
* Deletes a previously saved layout by its id.
|
|
2458
|
+
* @param layoutId The id of the layout to delete.
|
|
2459
|
+
*/
|
|
2460
|
+
deleteById(layoutId: string): Promise<void>;
|
|
2461
|
+
|
|
2400
2462
|
/**
|
|
2401
2463
|
* Returns all layouts which satisfy the predicate. This collection of all saved layouts includes the layouts structure. If no predicate is provided, it returns all saved layouts.
|
|
2402
2464
|
* @param predicate A filtering function (predicate) called for each saved layout.
|
|
@@ -2415,6 +2477,13 @@ export namespace IOConnectWorkspaces {
|
|
|
2415
2477
|
*/
|
|
2416
2478
|
save(config: WorkspaceLayoutSaveConfig): Promise<WorkspaceLayout>;
|
|
2417
2479
|
|
|
2480
|
+
/**
|
|
2481
|
+
* Overwrites the layout with the specified id with the structure of an existing, open workspace.
|
|
2482
|
+
* Prefer this over `save()` when layout names aren't guaranteed to be unique (e.g. when layout sharing is enabled).
|
|
2483
|
+
* @param config An object describing the id of the layout to overwrite, the layout name and the id of the workspace, whose structure will be saved.
|
|
2484
|
+
*/
|
|
2485
|
+
saveById(config: WorkspaceLayoutSaveByIdConfig): Promise<WorkspaceLayout>;
|
|
2486
|
+
|
|
2418
2487
|
/**
|
|
2419
2488
|
* Notifies when a layouts has been saved. This event is fired when a new layout has been saved and an existing layout has been updated.
|
|
2420
2489
|
* @param callback Callback function to handle the event. Receives the saved layout as a parameter.
|
|
@@ -2512,6 +2581,12 @@ export namespace IOConnectWorkspaces {
|
|
|
2512
2581
|
*/
|
|
2513
2582
|
restoreWorkspace(name: string, options?: RestoreWorkspaceConfig): Promise<Workspace>;
|
|
2514
2583
|
|
|
2584
|
+
/**
|
|
2585
|
+
* Opens a new workspace by restoring a previously saved workspace layout by its id.
|
|
2586
|
+
* @param options An object containing the id of the layout to restore and various workspace restore options.
|
|
2587
|
+
*/
|
|
2588
|
+
restoreWorkspaceById(options: RestoreWorkspaceByIdConfig): Promise<Workspace>;
|
|
2589
|
+
|
|
2515
2590
|
/**
|
|
2516
2591
|
* Opens a new workspace based on the provided definition.
|
|
2517
2592
|
* @param definition An object describing the shape and options of the workspace.
|
|
@@ -2581,8 +2656,9 @@ export namespace IOConnectWorkspaces {
|
|
|
2581
2656
|
/**
|
|
2582
2657
|
* Notifies when the tab of any Workspace in any Workspaces App has been reordered. Returns an unsubscribe function.
|
|
2583
2658
|
* @param callback Callback function for handling the event. Receives as an argument the `Workspace` object describing the Workspace whose tab has been reordered.
|
|
2584
|
-
*
|
|
2659
|
+
* @since io.Connect Desktop 10.3
|
|
2585
2660
|
* @since io.Connect Browser 4.4
|
|
2661
|
+
* @since @interopio/workspaces-api 4.4
|
|
2586
2662
|
*/
|
|
2587
2663
|
onWorkspaceTabReordered(callback: (workspace: IOConnectWorkspaces.Workspace) => void): Promise<IOConnectWorkspaces.Unsubscribe>;
|
|
2588
2664
|
/**
|
|
@@ -2628,8 +2704,9 @@ export namespace IOConnectWorkspaces {
|
|
|
2628
2704
|
/**
|
|
2629
2705
|
* Notifies when the tab of a Workspace window participating in any Workspace in any Workspaces App has been reordered. Returns an unsubscribe function.
|
|
2630
2706
|
* @param callback Callback function for handling the event. Receives as an argument the `WorkspaceWindow` object describing the Workspace window whose tab has been reordered.
|
|
2631
|
-
*
|
|
2707
|
+
* @since io.Connect Desktop 10.3
|
|
2632
2708
|
* @since io.Connect Browser 4.4
|
|
2709
|
+
* @since @interopio/workspaces-api 4.4
|
|
2633
2710
|
*/
|
|
2634
2711
|
onWindowTabReordered(callback: (workspaceWindow: IOConnectWorkspaces.WorkspaceWindow) => void): Promise<IOConnectWorkspaces.Unsubscribe>;
|
|
2635
2712
|
|