@interopio/workspaces-api 4.2.8-next.0 → 4.4.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/workspaces.d.ts CHANGED
@@ -748,18 +748,30 @@ export namespace IOConnectWorkspaces {
748
748
  icon?: string;
749
749
  }
750
750
 
751
- /** An object describing the possible options when defining a new workspace */
751
+ /**
752
+ * Describes a Workspace to be created.
753
+ */
752
754
  export interface WorkspaceDefinition {
753
- /** An array of all the workspace's children which will also be opened. */
755
+
756
+ /**
757
+ * Array of objects describing the Workspace windows and box elements (rows, columns, groups) that the Workspace will contain.
758
+ */
754
759
  children?: Array<WorkspaceWindowDefinition | BoxDefinition>;
755
760
 
756
- /** An object which will be set as the window context of all windows inside this workspace. */
761
+ /**
762
+ * Context object for the Workspace. Can contain any data relevant to the Workspace
763
+ * which the Workspace or the apps loaded in it can use after the Workspace has been created.
764
+ */
757
765
  context?: any;
758
766
 
759
- /** Workspace-specific options. */
767
+ /**
768
+ * Configuration for the new Workspace.
769
+ */
760
770
  config?: WorkspaceConfig;
761
771
 
762
- /** Options regarding the frame where this workspace will be opened in. */
772
+ /**
773
+ * Options for targeting a Workspaces App instance that will host the newly created Workspace.
774
+ */
763
775
  frame?: FrameTargetingOptions;
764
776
  }
765
777
 
@@ -1453,6 +1465,8 @@ export namespace IOConnectWorkspaces {
1453
1465
  allowSystemHibernation?: boolean;
1454
1466
  }
1455
1467
 
1468
+ export type SaveLayoutConfig = Omit<Omit<IOConnectWorkspaces.WorkspaceLayoutSaveConfig, "name">, "workspaceId">;
1469
+
1456
1470
  /** An object describing a workspace */
1457
1471
  export interface Workspace extends WorkspaceSummary {
1458
1472
 
@@ -1514,8 +1528,9 @@ export namespace IOConnectWorkspaces {
1514
1528
  /**
1515
1529
  * Saves the current workspace structure as a layout. In **io.Connect Browser** this will throw an error if the name matches the name of a read-only layout.
1516
1530
  * @param name A string representing the name (also ID) of the new workspace layout.
1531
+ * @param config An optional object used to set various options for saving the workspace layout.
1517
1532
  */
1518
- saveLayout(name: string, config?: { saveContext?: boolean, allowMultiple?: boolean }): Promise<void>;
1533
+ saveLayout(name: string, config?: SaveLayoutConfig): Promise<void>;
1519
1534
 
1520
1535
  /**
1521
1536
  * Returns the first box in this workspace, which satisfies the provided predicate.
@@ -1682,6 +1697,22 @@ export namespace IOConnectWorkspaces {
1682
1697
  */
1683
1698
  onResumed(callback: () => void): Promise<IOConnectWorkspaces.Unsubscribe>;
1684
1699
 
1700
+ /**
1701
+ * Notifies when the Workspace tab has been reordered. Returns an unsubscribe function.
1702
+ * @param callback Callback function for handling the event.
1703
+ * *Available only in **io.Connect Browser**.*
1704
+ * @since io.Connect Browser 4.4
1705
+ */
1706
+ onTabReordered(callback: () => void): Promise<IOConnectWorkspaces.Unsubscribe>;
1707
+
1708
+ /**
1709
+ * Notifies when the tab of a window participating in the Workspace has been reordered. Returns an unsubscribe function.
1710
+ * @param callback Callback function for handling the event. Receives as an argument the `WorkspaceWindow` object describing the window whose tab has been reordered.
1711
+ * *Available only in **io.Connect Browser**.*
1712
+ * @since io.Connect Browser 4.4
1713
+ */
1714
+ onWindowTabReordered(callback: (window: WorkspaceWindow) => void): Promise<IOConnectWorkspaces.Unsubscribe>;
1715
+
1685
1716
  /**
1686
1717
  * Notifies when a new window was added to this workspace and returns an unsubscribe function.
1687
1718
  * An added window means that the window has a place in the workspace (it is a valid workspace element), but does not guarantee that the contents of the window are loaded.
@@ -2161,6 +2192,14 @@ export namespace IOConnectWorkspaces {
2161
2192
  * @param callback Callback function to handle the event. Receives the new lock configuration as a parameter
2162
2193
  */
2163
2194
  onLockConfigurationChanged(callback: (config: IOConnectWorkspaces.WorkspaceWindowLockConfig) => void): Promise<IOConnectWorkspaces.Unsubscribe>
2195
+
2196
+ /**
2197
+ * Notifies when the tab of the Workspace window has been reordered. Returns an unsubscribe function.
2198
+ * @param callback Callback function for handling the event.
2199
+ * *Available only in **io.Connect Browser**.*
2200
+ * @since io.Connect Browser 4.4
2201
+ */
2202
+ onTabReordered(callback: () => void): Promise<IOConnectWorkspaces.Unsubscribe>;
2164
2203
  }
2165
2204
 
2166
2205
  /** An object describing a builder user to create workspaces */
@@ -2251,6 +2290,18 @@ export namespace IOConnectWorkspaces {
2251
2290
 
2252
2291
  /** Object which will be saved as part of the layout */
2253
2292
  metadata?: object;
2293
+
2294
+ /**
2295
+ * If `true`, the context objects of individual io.Connect Windows set via the `setContext()` method of a `WebWindow` instance
2296
+ * will be saved when the Workspace Layout is saved. This is valid both for Browser Client apps, as well as for windows that have been
2297
+ * opened by the Main app or by a Browser Client, but aren't Browser Clients themselves (i.e., don't use the io.Connect libraries).
2298
+ * If a Browser Client has subscribed for the `onSaveRequested()` event and its context has also been set via the `setContext()` method,
2299
+ * the context returned by the `onSaveRequested()` event handler will take precedence.
2300
+ * *Available only in **io.Connect Browser**.*
2301
+ * @default false
2302
+ * @since io.Connect Browser 4.4
2303
+ */
2304
+ saveWindowContexts?: boolean;
2254
2305
  }
2255
2306
 
2256
2307
  export interface SetMaximizationBoundaryConfig {
@@ -2510,6 +2561,13 @@ export namespace IOConnectWorkspaces {
2510
2561
  */
2511
2562
  onWorkspaceResumed(callback: (workspace: IOConnectWorkspaces.Workspace) => void): Promise<IOConnectWorkspaces.Unsubscribe>;
2512
2563
 
2564
+ /**
2565
+ * Notifies when the tab of any Workspace in any Workspaces App has been reordered. Returns an unsubscribe function.
2566
+ * @param callback Callback function for handling the event. Receives as an argument the `Workspace` object describing the Workspace whose tab has been reordered.
2567
+ * *Available only in **io.Connect Browser**.*
2568
+ * @since io.Connect Browser 4.4
2569
+ */
2570
+ onWorkspaceTabReordered(callback: (workspace: IOConnectWorkspaces.Workspace) => void): Promise<IOConnectWorkspaces.Unsubscribe>;
2513
2571
  /**
2514
2572
  * Notifies when a new window was added to any workspace in any frame and returns an unsubscribe function.
2515
2573
  * An added window means that the window has a place in a workspace (it is a valid workspace element), but does not guarantee that the contents of the window are loaded.
@@ -2550,11 +2608,15 @@ export namespace IOConnectWorkspaces {
2550
2608
  */
2551
2609
  onWindowSelected(callback: (workspaceWindow: IOConnectWorkspaces.WorkspaceWindow) => void): Promise<IOConnectWorkspaces.Unsubscribe>;
2552
2610
 
2611
+ /**
2612
+ * Notifies when the tab of a Workspace window participating in any Workspace in any Workspaces App has been reordered. Returns an unsubscribe function.
2613
+ * @param callback Callback function for handling the event. Receives as an argument the `WorkspaceWindow` object describing the Workspace window whose tab has been reordered.
2614
+ * *Available only in **io.Connect Browser**.*
2615
+ * @since io.Connect Browser 4.4
2616
+ */
2617
+ onWindowTabReordered(callback: (workspaceWindow: IOConnectWorkspaces.WorkspaceWindow) => void): Promise<IOConnectWorkspaces.Unsubscribe>;
2618
+
2553
2619
  /** The io.Connect Workspaces API version. */
2554
2620
  version: string;
2555
2621
  }
2556
2622
  }
2557
-
2558
-
2559
-
2560
-