@openfin/workspace 45.1.0-alpha.b3d8b89c → 45.1.0-alpha.b60eecc8

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.
@@ -160,6 +160,8 @@ export interface AttachPagesToWindowPayload {
160
160
  insertionIndex?: number;
161
161
  /** Whether to replace the active page with the first new page, if true insertionIndex is ignored and pages are inserted at the active page's index */
162
162
  replaceActivePage?: boolean;
163
+ /** Whether to insert the first new page as the active page in the same state update. */
164
+ activateOnAdd?: boolean;
163
165
  }
164
166
  export interface ExtendedAttachPagesToWindowPayload extends AttachPagesToWindowPayload {
165
167
  /** The pages to attach. */
@@ -283,6 +285,8 @@ export type AddPagePayload = {
283
285
  /** Index at which the page should be added */
284
286
  insertionIndex?: number;
285
287
  multiInstanceViewBehavior?: OpenFin.MultiInstanceViewBehavior;
288
+ /** Whether to insert the page as active in the same state update. */
289
+ activateOnAdd?: boolean;
286
290
  };
287
291
  /**
288
292
  * A node that represents either a bookmark or folder in the bookmark tree.
@@ -153,6 +153,19 @@ export declare const findViewInLayout: (node: any, viewId: OpenFin.Identity) =>
153
153
  * @returns The total number of views in the layout configuration.
154
154
  */
155
155
  export declare const countViews: (node: OpenFin.LayoutContent) => number;
156
+ /**
157
+ * Returns the sole view component when a page layout contains exactly one view.
158
+ * Used to decide whether a page-tab drag should emit a single-view merge payload.
159
+ *
160
+ * Importantly this counts views recursively across the layout tree, not just
161
+ * top-level sections — a one-section/tab-strip supertab with multiple views
162
+ * must not be treated as a single-view page.
163
+ *
164
+ * Also requires a non-empty `componentState.name`. Core types mark
165
+ * `componentState` / `name` as optional, and a merge payload without a name
166
+ * is invalid — treat those layouts as non-mergeable page drags instead.
167
+ */
168
+ export declare const getSingleViewComponent: (content: OpenFin.LayoutContent | undefined) => OpenFin.LayoutComponent | null;
156
169
  export declare const getLayoutConfig: (layoutContainerKey: string) => Promise<any>;
157
170
  export declare const findPageForView: (viewName: string, browserWindowIdentity?: WindowIdentity) => Promise<AttachedPage | undefined>;
158
171
  /**
@@ -2,6 +2,10 @@
2
2
  * All routes that serve HTML pages for the app.
3
3
  * Routes should include the zone that the HTML page is a part of.
4
4
  * Make sure to include trailing slash, as it is essential for deployed version to route correctly.
5
+ *
6
+ * Offline: zone `pages/` HTML is auto-precached at build time via
7
+ * `common/scripts/offline-document-routes.js` (used by createWorkspaceNextConfig).
8
+ * Adding a new page under `pages/` is enough — no manual SW list update.
5
9
  */
6
10
  declare enum WorkspaceRoute {
7
11
  Home = "/home/",
@@ -12,6 +12,8 @@ export interface BasePageOpts {
12
12
  */
13
13
  export interface PageOpts extends BasePageOpts {
14
14
  index?: number;
15
+ /** Add the page and make it active in the same state update. */
16
+ activateOnAdd?: boolean;
15
17
  }
16
18
  /**
17
19
  * Options for adding pages, either by index or by replacing the active page.
@@ -2,7 +2,7 @@
2
2
  "@openfin/notifications": [
3
3
  {
4
4
  "type": "explicit",
5
- "version": "45.1.0-alpha-4882",
5
+ "version": "45.1.0-alpha-4945",
6
6
  "packageName": "client-api/package.json",
7
7
  "issuer": "client-api/src/notifications.ts"
8
8
  }