@openfin/workspace-platform 12.1.4 → 12.6.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.
@@ -1,6 +1,5 @@
1
1
  export type { Action, DispatchedAction, DispatchedSearchResult, SearchListenerRequest, SearchListenerResponse, SearchProviderInfo, SearchResult, ScoreOrder, SearchTag, SearchProvider, UserInputListener, ResultDispatchListener, SearchResponse } from '../../../search-api/src/index';
2
2
  export type { Workspace } from '../../../common/src/api/workspaces';
3
- export type { LayoutExtended, LayoutContentExtended, LayoutSettingsExtended, LayoutContentItemExtended, LayoutComponentExtended, LayoutComponentStateExtended, LayoutStack } from '../../../common/src/utils/layout';
4
3
  export type { Page, PageLayout, PageLayoutDetails, PanelConfig, PanelConfigHorizontal, PanelConfigVertical, PanelPosition } from '../../../common/src/api/pages/shapes';
5
4
  export { SearchTagBackground, ActionTrigger } from '../../../search-api/src/shapes';
6
5
  export type { ProviderInfo } from './provider';
@@ -8,10 +7,8 @@ export type { BaseCustomButtonConfig, BaseCustomDropdownConfig, BaseCustomDropdo
8
7
  /**
9
8
  * return by component.register function
10
9
  */
11
- export interface RegisterMetaInfo {
12
- workspaceVersion: string;
13
- }
14
10
  export interface RegistrationMetaInfo {
15
11
  clientAPIVersion: string;
16
12
  workspaceVersion: string;
17
13
  }
14
+ export declare type RegisterMetaInfoInternal = Pick<RegistrationMetaInfo, 'workspaceVersion'>;
@@ -237,17 +237,54 @@ export interface StoreRegistration extends RegistrationMetaInfo {
237
237
  * used to update button configuration returned by provider for an app.
238
238
  *
239
239
  * ```ts
240
- * registration = await Store.register(provider);
241
- * registration.updateAppCardButtons({
242
- * appId: request.payload.appId,
243
- * primaryButton: {
244
- * ...request.payload.sourcePrimaryButton,
245
- * title: "Primary button is now disabled",
246
- * disabled: true
247
- * },
248
- * secondaryButtons: request.payload.sourceSecondaryButtons
240
+ * let storeRegistration: StoreRegistration | undefined;
241
+ *
242
+ * await WorkspacePlatform.init({
243
+ * customActions: {
244
+ * storeButtonCustomActionHandler: async (payload: StoreCustomButtonActionPayload) => {
245
+ * if (storeRegistration) {
246
+ * await storeRegistration.updateAppCardButtons({
247
+ * appId: payload.appId,
248
+ * primaryButton: {
249
+ * ...payload.primaryButton,
250
+ * title: 'Disabled Button',
251
+ * disabled: true,
252
+ * },
253
+ * secondaryButtons: payload.secondaryButtons
254
+ * });
255
+ * }
256
+ * }
257
+ * }
249
258
  * });
250
- * ```
259
+ *
260
+ * const sampleApp: App = {
261
+ * title: 'Sample Application',
262
+ * addId: 'sampleAppId',
263
+ * icons: [],
264
+ * publisher: 'Sample',
265
+ * primaryButton: {
266
+ * title: 'Sample Button',
267
+ * action: {
268
+ * id: 'storeButtonCustomActionHandler',
269
+ * }
270
+ * }
271
+ * },
272
+ *
273
+ * const storefrontProvider: StorefrontProvider = {
274
+ * title: 'Sample Store',
275
+ * id: 'sampleStoreId',
276
+ * icon: {...},
277
+ * getApps: () => Promise.resolve([sampleApp]),
278
+ * getLandingPage: {...},
279
+ * getNavigation: {...},
280
+ * getFooter: {...},
281
+ * launchApp: (app: App) => WR.getCurrentSync().launchApp({app})
282
+ * };
283
+ *
284
+ * storeRegistration = await Store.register(storefrontProvider);
285
+ * await Store.show();
286
+ *
287
+ * ```
251
288
  */
252
289
  updateAppCardButtons: (request: UpdateButtonConfigRequest) => Promise<void>;
253
290
  }
@@ -1,4 +1,4 @@
1
- import { AnalyticsEvent } from '../../../common/src/utils/usage-register';
1
+ import { AnalyticsEventInternal } from '../../../common/src/utils/usage-register';
2
2
  import { AnalyticsConfig, WorkspacePlatformProvider } from '../../../client-api-platform/src/shapes';
3
3
  declare global {
4
4
  interface Window {
@@ -9,5 +9,5 @@ declare global {
9
9
  };
10
10
  }
11
11
  }
12
- export declare function analyticsInternal(this: WorkspacePlatformProvider, events: AnalyticsEvent[]): Promise<void>;
12
+ export declare function analyticsInternal(this: WorkspacePlatformProvider, events: AnalyticsEventInternal[]): Promise<void>;
13
13
  export declare const initPlatformAnalytics: (config?: AnalyticsConfig) => Promise<void>;
@@ -0,0 +1,5 @@
1
+ import { AnalyticsEventInternal } from '../../../../common/src/utils/usage-register';
2
+ import { Page } from '../../../../client-api-platform/src/shapes';
3
+ export declare const addOpenPageToCache: (pageId: Page['pageId'], event: AnalyticsEventInternal) => Map<string, AnalyticsEventInternal>;
4
+ export declare const removeOpenPageFromCache: (pageId: Page['pageId']) => boolean;
5
+ export declare const raiseMissedPageCloseEvents: () => Promise<void>;
@@ -1 +1,2 @@
1
1
  export declare const handleNameCollision: (initialName: string, existingNames: string[]) => string;
2
+ export declare const listenForStoreClose: () => void;
@@ -1,8 +1,11 @@
1
- import type { CreateSavedWorkspaceRequest, Workspace } from '../../../../client-api-platform/src/shapes';
1
+ import type { ApplyWorkspacePayload, CreateSavedWorkspaceRequest, Workspace } from '../../../../client-api-platform/src/shapes';
2
2
  /**
3
3
  * Apply the given workspace and set it as active.
4
+ * @param payload, the workspace to apply and the options to apply it with.
5
+ *
6
+ * @returns true if the workspace was applied, false if the user cancelled the switch or an error occurred.
4
7
  */
5
- export declare function applyWorkspace(workspace: Workspace): Promise<void>;
8
+ export declare function applyWorkspace({ options, ...workspace }: ApplyWorkspacePayload): Promise<boolean>;
6
9
  /**
7
10
  * Set the current active workspace.
8
11
  */
@@ -17,7 +20,7 @@ export declare function getInitialWorkspace(): Promise<Workspace>;
17
20
  * @returns the current active workspace.
18
21
  */
19
22
  export declare function getCurrentWorkspace(): Promise<Workspace>;
20
- export declare function getLastSavedWorkspace(): Promise<Workspace>;
23
+ export declare function getLastSavedWorkspace(): Promise<Workspace | undefined>;
21
24
  export declare const createWorkspaceInStorage: (req: CreateSavedWorkspaceRequest) => Promise<any>;
22
25
  export declare const getWorkspacesInStorage: () => Promise<Workspace[]>;
23
26
  export declare const getWorkspaceInStorage: (id: string) => Promise<Workspace>;
@@ -1,6 +1,6 @@
1
1
  import type OpenFin from '@openfin/core';
2
2
  import { IconProps } from '@openfin/ui-library';
3
- import type { AnalyticsEvent } from '../../common/src/utils/usage-register';
3
+ import type { AnalyticsEvent, AnalyticsEventInternal } from '../../common/src/utils/usage-register';
4
4
  import { CustomActionSpecifier, CustomButtonConfig } from '../../common/src/api/action';
5
5
  import type { AttachedPage, Page, PageWithUpdatableRuntimeAttribs } from '../../common/src/api/pages/shapes';
6
6
  import type { CustomThemes } from '../../common/src/api/theming';
@@ -1094,6 +1094,8 @@ export interface WorkspacePlatformModule extends OpenFin.Platform {
1094
1094
  /**
1095
1095
  * Launch an application.
1096
1096
  *
1097
+ * @deprecated This method is deprecated. It is recommended to use [createView](https://developers.openfin.co/of-docs/docs/platform-getting-started#add-a-view-to-an-existing-window) or [createWindow](https://developers.openfin.co/of-docs/docs/platform-getting-started#create-a-platform-window) instead.
1098
+ *
1097
1099
  * ```ts
1098
1100
  * import * as WorkspacePlatform from '@openfin/workspace-platform';
1099
1101
  *
@@ -1129,11 +1131,34 @@ export interface WorkspacePlatformModule extends OpenFin.Platform {
1129
1131
  */
1130
1132
  setActiveWorkspace(workspace: Workspace): Promise<void>;
1131
1133
  /**
1132
- * Closes content from the current workspace and applies the given workspace to the user's desktop. Makes that
1133
- * workspace the active workspace.
1134
+ * Applies the given workspace to the user's desktop. Makes that workspace the active workspace.
1135
+ *
1134
1136
  * @param workspace the workspace to apply to the desktop and set as the current active workspace.
1137
+ * @param options see {@link ApplyWorkspaceOptions}.
1138
+ *
1139
+ * @returns true if the workspace was applied, false if the workspace was not applied.
1140
+ *
1141
+ * @example Brief example of how to apply a workspace, currently stored in storage, to the desktop.
1142
+ *
1143
+ * ```ts
1144
+ * const workspacePlatform = getCurrentSync();
1145
+
1146
+ * // This assumes that there is at least one workspace in storage.
1147
+ * const allWorkspaces = await workspacePlatform.Storage.getWorkspaces();
1148
+ *
1149
+ * // Apply the first workspace in storage to the desktop.
1150
+ * await workspacePlatform.applyWorkspace(allWorkspaces[0], {
1151
+ * // Customize the behavior of the applyWorkspace call.
1152
+ * skipPrompt: false,
1153
+ * applySnapshotOptions: {
1154
+ * closeExistingWindows: false,
1155
+ * closeSnapshotWindows: false,
1156
+ * skipOutOfBoundsCheck: false,
1157
+ * },
1158
+ * });
1159
+ * ```
1135
1160
  */
1136
- applyWorkspace(workspace: Workspace): Promise<void>;
1161
+ applyWorkspace(workspace: Workspace, options?: ApplyWorkspaceOptions): Promise<boolean>;
1137
1162
  /**
1138
1163
  * The browser window factory for the Workspace Platform.
1139
1164
  */
@@ -1146,7 +1171,7 @@ export interface WorkspacePlatformModule extends OpenFin.Platform {
1146
1171
  * Theme API for the Workspace Platform.
1147
1172
  */
1148
1173
  Theme: ThemeApi;
1149
- _raiseAnalytics(events: AnalyticsEvent[]): Promise<void>;
1174
+ _raiseAnalytics(events: AnalyticsEventInternal[]): Promise<void>;
1150
1175
  }
1151
1176
  export interface WorkspacePlatformProvider extends OpenFin.PlatformProvider {
1152
1177
  /**
@@ -1199,6 +1224,13 @@ export interface WorkspacePlatformProvider extends OpenFin.PlatformProvider {
1199
1224
  * @param id of the id of the workspace to delete.
1200
1225
  */
1201
1226
  deleteSavedWorkspace(id: string): Promise<void>;
1227
+ /**
1228
+ * Applies a workspace to the user's desktop. Makes that workspace the active workspace.
1229
+ * @param applyWorkspacePayload {@link ApplyWorkspacePayload}
1230
+ *
1231
+ * @returns true if the workspace was applied, false if the workspace was not applied.
1232
+ */
1233
+ applyWorkspace(payload: ApplyWorkspacePayload): Promise<boolean>;
1202
1234
  /**
1203
1235
  * Implementation for showing a global context menu given a menu template,
1204
1236
  * handler callback, and screen coordinates. For an example of overriding, see {@link WorkspacePlatformOverrideCallback}.
@@ -1261,6 +1293,46 @@ export declare enum CustomActionCallerType {
1261
1293
  export declare type CustomActionPayload = {
1262
1294
  callerType: CustomActionCallerType.API;
1263
1295
  } | CustomButtonActionPayload | StoreCustomButtonActionPayload | CustomDropdownItemActionPayload | GlobalContextMenuOptionActionPayload | ViewTabCustomActionPayload | PageTabContextMenuOptionActionPayload | OpenSaveContextMenuOptionActionPayload;
1296
+ /**
1297
+ * Options for the {@link WorkspacePlatformModule.applyWorkspace applyWorkspace} method.
1298
+ *
1299
+ */
1300
+ export interface ApplyWorkspaceOptions {
1301
+ /**
1302
+ * If true, the workspace will be applied without prompting the user to confirm.
1303
+ * If false, the user will be prompted to confirm the workspace application.
1304
+ * @default false
1305
+ */
1306
+ skipPrompt?: boolean;
1307
+ /**
1308
+ * The window to use as the parent for the workspace switch confirmation dialog.
1309
+ */
1310
+ promptContainerWindowIdentity?: OpenFin.Identity;
1311
+ /**
1312
+ * Options to apply the workspace spanshot with.
1313
+ */
1314
+ applySnapshotOptions?: ApplySnapshotOptions;
1315
+ }
1316
+ /**
1317
+ * Options used within the {@link WorkspacePlatformModule.applyWorkspace applyWorkspace} method.
1318
+ *
1319
+ * @inheritdoc OpenFin.ApplySnapshotOptions
1320
+ */
1321
+ export interface ApplySnapshotOptions extends OpenFin.ApplySnapshotOptions {
1322
+ /**
1323
+ * When true, applyWorkspace will close all existing windows,
1324
+ * replacing current Platform state with the given snapshot.
1325
+ *
1326
+ * @default true
1327
+ */
1328
+ closeExistingWindows?: boolean;
1329
+ }
1330
+ /**
1331
+ * Payload received by applyWorkspace platform provider method
1332
+ */
1333
+ export declare type ApplyWorkspacePayload = Workspace & {
1334
+ options?: ApplyWorkspaceOptions;
1335
+ };
1264
1336
  /**
1265
1337
  * Defines custom action map where the key is the custom action ID and value is the action handler
1266
1338
  */
@@ -1271,7 +1343,7 @@ export interface AnalyticsConfig {
1271
1343
  /**
1272
1344
  * Enable sending of Analytics data to OpenFin
1273
1345
  */
1274
- enableOpenFinAnalytics: boolean;
1346
+ sendToOpenFin: boolean;
1275
1347
  }
1276
1348
  /**
1277
1349
  * Configuration for initializing a Workspace platform.
@@ -1336,6 +1408,10 @@ export interface WorkspacePlatformInitConfig {
1336
1408
  * https://cdn.openfin.co/docs/javascript/stable/InteropBroker.html
1337
1409
  */
1338
1410
  interopOverride?: OpenFin.OverrideCallback<OpenFin.InteropBroker, OpenFin.InteropBroker>;
1411
+ /**
1412
+ * Config for Workspace Platform analytics
1413
+ */
1414
+ analytics?: AnalyticsConfig;
1339
1415
  }
1340
1416
  /**
1341
1417
  * Extend or replace default functionality in order to customize behavior of a Workspace Platform Provider.
@@ -14,7 +14,8 @@ export interface Overrides {
14
14
  [key: string]: boolean;
15
15
  };
16
16
  disableRuntimeValidation: boolean;
17
- enableOpenFinAnalytics: boolean;
17
+ disableOpenFinAnalytics: boolean;
18
+ analyticsEndpoint: string;
18
19
  }
19
20
  export declare function getOverrides(): Promise<Partial<Overrides>>;
20
21
  export declare const useOverrides: () => Partial<Overrides>;
@@ -1,4 +1,4 @@
1
- import { LayoutExtended } from '../../../../common/src/utils/layout';
1
+ import type OpenFin from '@openfin/core';
2
2
  import type { AttachedPage, Page, PageLayout, PageWithUpdatableRuntimeAttribs } from './shapes';
3
3
  export declare function getLegacyPages(): Promise<Page[]>;
4
4
  export declare function cleanPage<T extends AttachedPage | Page>(page: T): T;
@@ -13,7 +13,7 @@ export declare const getPageLayout: (layout: PageLayout) => Promise<PageLayout>;
13
13
  * @param title the title for the page.
14
14
  * @param layout the layout for the page.
15
15
  */
16
- export declare const makePage: (title: string, layout: LayoutExtended) => Promise<PageWithUpdatableRuntimeAttribs>;
16
+ export declare const makePage: (title: string, layout: OpenFin.LayoutOptions) => Promise<PageWithUpdatableRuntimeAttribs>;
17
17
  /**
18
18
  * Clone a page.
19
19
  * @param page the page to clone.
@@ -1,14 +1,44 @@
1
1
  import type OpenFin from '@openfin/core';
2
- import type { LayoutExtended } from '../../utils/layout';
3
2
  export interface PageLayoutDetails {
4
- /** The id of the machine that created the page. */
3
+ /**
4
+ * The id of the machine that created the page.
5
+ */
5
6
  machineId: string;
6
- /** The name of the machine that created the page. */
7
+ /**
8
+ * The name of the machine that created the page.
9
+ */
7
10
  machineName?: string;
8
11
  }
9
- export declare type PageLayout = LayoutExtended & {
12
+ export declare type PageLayout = OpenFin.LayoutOptions & {
10
13
  layoutDetails?: PageLayoutDetails;
11
14
  };
15
+ /**
16
+ * Provides configuration options for a set of Workspace Views. An array of Page objects is a required option of the {@link workspacePlatform}
17
+ * property of the {@link BrowserCreateWindowRequest} interface.
18
+ *```ts
19
+ * const page: Page = {
20
+ * title: 'myPageTitle',
21
+ * pageId: 'myPageID',
22
+ * layout: {
23
+ * content: [
24
+ * {
25
+ * type: 'stack',
26
+ * content: [
27
+ * {
28
+ * type: 'component',
29
+ * componentName: 'view',
30
+ * componentState: {
31
+ * name: 'myViewName',
32
+ * url: 'http://google.com'
33
+ * }
34
+ * }
35
+ * ]
36
+ * }
37
+ * ]
38
+ * }
39
+ * };
40
+ * ```
41
+ */
12
42
  export interface Page {
13
43
  /** A UI friendly title for the page. */
14
44
  title: string;
@@ -0,0 +1,23 @@
1
+ import { AnalyticsEventInternal } from './usage-register';
2
+ export declare const generateHash: (text: string) => Promise<string>;
3
+ interface AnalyticsBackendPayload {
4
+ d: {
5
+ app_config: string;
6
+ app_name: string;
7
+ app_uuid: string;
8
+ clientId: string;
9
+ combined_id: string;
10
+ content_url: string;
11
+ machine_id: string;
12
+ manifest_type: 'platform';
13
+ os: string;
14
+ runtime_version: string;
15
+ rvm_version: string;
16
+ type: 'workspace-analytics';
17
+ u: string;
18
+ data: AnalyticsEventInternal;
19
+ timestamp: string;
20
+ };
21
+ }
22
+ export declare const decorateAnalyticsPayload: (event: AnalyticsEventInternal) => Promise<AnalyticsBackendPayload>;
23
+ export {};
@@ -1,26 +1,6 @@
1
1
  import type OpenFin from '@openfin/core';
2
2
  import { AttachedPage, PageLayout } from '../../../client-api-platform/src/shapes';
3
3
  import { WindowIdentity } from './window';
4
- export declare type LayoutComponentStateExtended = OpenFin.LayoutComponent['componentState'] & {
5
- name: string;
6
- uuid: string;
7
- };
8
- export declare type LayoutComponentExtended = Omit<OpenFin.LayoutComponent, 'componentState'> & {
9
- componentState: LayoutComponentStateExtended;
10
- };
11
- export declare type LayoutStack = {
12
- type: 'stack';
13
- content: OpenFin.LayoutContent;
14
- };
15
- export declare type LayoutContentItemExtended = OpenFin.LayoutRow | OpenFin.LayoutColumn | LayoutStack | LayoutComponentExtended | OpenFin.LayoutItemConfig;
16
- export declare type LayoutContentExtended = LayoutContentItemExtended[];
17
- export declare type LayoutSettingsExtended = OpenFin.LayoutOptions['settings'] & {
18
- reorderEnabled?: boolean;
19
- };
20
- export declare type LayoutExtended = {
21
- settings?: LayoutSettingsExtended;
22
- content: LayoutContentExtended;
23
- };
24
4
  export declare enum LayoutDOMEventType {
25
5
  TabCreated = "tab-created",
26
6
  ContainerCreated = "container-created",
@@ -66,11 +46,11 @@ export declare const cloneViewComponentWithoutName: (componentState: any) => any
66
46
  * @returns A copy of the layout with names removed
67
47
  */
68
48
  export declare const cloneLayoutAndRemoveNames: (layout: PageLayout) => any;
69
- export declare const mapContentComponentState: (content: OpenFin.LayoutContent | LayoutContentExtended) => LayoutComponentStateExtended[];
49
+ export declare const mapContentComponentState: (content: OpenFin.LayoutContent) => OpenFin.LayoutComponent['componentState'][];
70
50
  export declare const getLayoutWithSingleView: (title: string, url: string, winIdentity?: OpenFin.Identity) => Promise<any>;
71
51
  export declare const isLayoutTabActive: (tabSelector: string) => boolean;
72
52
  export declare const containerId = "layout_container";
73
- export declare const getViewComponents: () => LayoutContentExtended;
53
+ export declare const getViewComponents: () => OpenFin.LayoutContent;
74
54
  export declare const removeLayoutView: (name: string) => Promise<void>;
75
55
  export declare const addLayoutEventListener: (event: LayoutDOMEventType, listener: LayoutDOMEventListener) => void;
76
56
  /**
@@ -23,7 +23,7 @@ declare type WindowOptionsWithBounds = OptionalExceptFor<OpenFin.WindowOptions,
23
23
  top: number;
24
24
  left: number;
25
25
  };
26
- export declare function createChildWindow(opts: OptionalExceptFor<OpenFin.WindowOptions, 'name' | 'url'>, route?: string, bounds?: OpenFin.Bounds): Promise<OpenFin.Window | null>;
26
+ export declare function createChildWindow(opts: OptionalExceptFor<OpenFin.WindowOptions, 'name' | 'url'>, route?: string, bounds?: Partial<OpenFin.Bounds>): Promise<OpenFin.Window>;
27
27
  export interface ShowChildOptions {
28
28
  options: WindowOptionsWithBounds;
29
29
  parameters?: URLSearchParams;
@@ -5,7 +5,7 @@ import { ResponseModalConfig } from './menu-config';
5
5
  * this will return the correct bounds regardless of whether the window is maximized
6
6
  *
7
7
  * @param modalOptions window options including height/width so that we can calculate the correct bounds
8
- * @param parentWindowIdentity the window to get the bounds from
8
+ * @param parentWindowIdentity the window to get the bounds from. If this is undefined, the primary monitor will be used
9
9
  * @param centerOnMonitor whether the modal should be centered on the monitor
10
10
  * @returns a point (top/left) as to where the window should be placed
11
11
  */
@@ -21,7 +21,8 @@ export declare enum PageRoute {
21
21
  ResponseModal = "/browser/popup-menu/response-modal/",
22
22
  Docs = "/provider/docs/",
23
23
  Storefront = "/storefront/",
24
- DeprecatedAlert = "/provider/deprecated-alert/"
24
+ DeprecatedAlert = "/provider/deprecated-alert/",
25
+ Analytics = "/provider/analytics/"
25
26
  }
26
27
  /**
27
28
  * All routes that serve assets. (icons, json, etc.)
@@ -57,6 +58,7 @@ declare const _default: {
57
58
  Docs: PageRoute.Docs;
58
59
  Storefront: PageRoute.Storefront;
59
60
  DeprecatedAlert: PageRoute.DeprecatedAlert;
61
+ Analytics: PageRoute.Analytics;
60
62
  IconOpenFinLogo: AssetRoute.IconOpenFinLogo;
61
63
  IconFilter: AssetRoute.IconFilter;
62
64
  LightStorefront: AssetRoute.LightStorefront;
@@ -43,10 +43,17 @@ export declare type AnalyticsEvent = {
43
43
  entityId?: OpenFin.Identity;
44
44
  data?: any;
45
45
  };
46
- export declare type AnalyticsEventInternal = Omit<AnalyticsEvent, 'source'>;
47
- export declare const raiseBrowserAnalytics: (payload: AnalyticsEventInternal) => Promise<void>;
46
+ export interface AnalyticsEventInternal extends AnalyticsEvent {
47
+ /**
48
+ * By default, all event values are redacted before sending to OF.
49
+ * For events not containing any identifiable information, set this to true.
50
+ */
51
+ skipValueHashing?: boolean;
52
+ }
53
+ export declare type AnalyticsEventRaise = Omit<AnalyticsEventInternal, 'source'>;
54
+ export declare const raiseBrowserAnalytics: (payload: AnalyticsEventRaise) => Promise<void>;
48
55
  export declare const raiseBrowserPageAnalytics: (pages: AttachedPage[], action: string) => Promise<void>;
49
- export declare const raiseHomeAnalytics: (platformIdentity: OpenFin.Identity, payload: AnalyticsEventInternal) => Promise<void>;
50
- export declare const raiseDockAnalytics: (platformIdentity: OpenFin.Identity, payload: AnalyticsEventInternal) => Promise<void>;
51
- export declare const raiseStorefrontAnalytics: (platformIdentity: OpenFin.Identity, payload: AnalyticsEventInternal) => Promise<void>;
52
- export declare const raiseInteropAnalytics: (payload: AnalyticsEventInternal) => Promise<void>;
56
+ export declare const raiseHomeAnalytics: (platformIdentity: OpenFin.Identity, payload: AnalyticsEventRaise) => Promise<void>;
57
+ export declare const raiseDockAnalytics: (platformIdentity: OpenFin.Identity, payload: AnalyticsEventRaise) => Promise<void>;
58
+ export declare const raiseStorefrontAnalytics: (platformIdentity: OpenFin.Identity, payload: AnalyticsEventRaise) => Promise<void>;
59
+ export declare const raiseInteropAnalytics: (payload: AnalyticsEventRaise) => Promise<void>;
@@ -27,10 +27,18 @@ interface Size {
27
27
  }
28
28
  /**
29
29
  * Gets the center point of a window given its bounds
30
- * @param bounds OpenFin bounds - left, top, height, width
31
- * @returns coords representing the center - left, top
30
+ *
31
+ * @param bounds OpenFin WindowBounds - left, top, height, width
32
+ * @returns A {@link OpenFin.Point} representing the center of the monitor
32
33
  */
33
34
  export declare const getCenterFromBounds: (bounds: OpenFin.WindowBounds) => Point;
35
+ /**
36
+ * Gets the center point of a monitor given its bounds
37
+ *
38
+ * @param bounds RectangleByEdgePositions - left, top, right, bottom. The bounds of the monitor
39
+ * @returns A {@link OpenFin.Point} representing the center of the monitor
40
+ */
41
+ export declare const getCenterFromMonitorBounds: (bounds: OpenFin.RectangleByEdgePositions) => Point;
34
42
  /**
35
43
  * Gets the top and left coords of a window given its size and center point
36
44
  * @param center point representing the desired center coords
@@ -1,7 +1,7 @@
1
1
  import type OpenFin from '@openfin/core';
2
2
  import { ResponseModalConfig } from '../../../common/src/utils/menu-config';
3
3
  export declare const restoreChangesMenu: (windowIdentity: OpenFin.Identity) => Promise<ResponseModalConfig>;
4
- export declare const showSwitchWorkspaceModal: (windowIdentity: OpenFin.Identity, workspaceTitle: string) => Promise<boolean>;
4
+ export declare const showSwitchWorkspaceModal: (targetWindowIdentity: OpenFin.Identity | undefined, workspaceTitle: string) => Promise<boolean>;
5
5
  export declare const showDeleteWorkspaceModal: (windowIdentity: OpenFin.Identity, workspaceTitle: string) => Promise<boolean>;
6
6
  /**
7
7
  *