@openfin/workspace 45.3.4 → 45.3.6

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.
@@ -267,11 +267,15 @@ export interface CopyPagePayload {
267
267
  /** Specifies the trigger for creating a copy. */
268
268
  reason: 'save-as' | 'duplicate';
269
269
  }
270
+ /** The user interaction that created a new page. Reported in the `Create Page` analytics event. */
271
+ export type PageCreationOrigin = 'new-tab-button' | 'menu' | 'hotkey' | 'dock' | 'new-window';
270
272
  export type AddDefaultPagePayload = {
271
273
  /** The OF window identity to attach the pages to. */
272
274
  identity: OpenFin.Identity;
273
275
  /** The page to attach. */
274
276
  page: PageWithUpdatableRuntimeAttribs;
277
+ /** The user interaction that requested the page. */
278
+ origin?: PageCreationOrigin;
275
279
  };
276
280
  export type AddPagePayload = {
277
281
  /** The OF window identity to attach the pages to. */
@@ -0,0 +1,30 @@
1
+ import type OpenFin from '@openfin/core';
2
+ export declare enum InteropEventType {
3
+ JoinedContextGroup = "joined-context-group",
4
+ RemovedFromContextGroup = "removed-from-context-group"
5
+ }
6
+ type InteropEventPayload<E extends InteropEventType> = {
7
+ [InteropEventType.JoinedContextGroup]: {
8
+ viewIdentity: OpenFin.Identity;
9
+ contextGroupId: string;
10
+ };
11
+ [InteropEventType.RemovedFromContextGroup]: {
12
+ viewIdentity: OpenFin.Identity;
13
+ };
14
+ }[E];
15
+ export type InteropListener<EventType extends InteropEventType> = (payload: InteropEventPayload<EventType>) => void;
16
+ /**
17
+ * Returns contextGroup data.
18
+ * @returns Promise<ContextGroup[]>
19
+ */
20
+ export declare function getContextGroups(): Promise<OpenFin.ContextGroupInfo[]>;
21
+ export declare const joinContextGroup: (viewIdentity: OpenFin.Identity, contextGroupId: string) => Promise<void>;
22
+ export declare const removeFromGroup: (viewIdentity: OpenFin.Identity) => Promise<void>;
23
+ export declare function getViewContextGroupId(viewIdentity: OpenFin.Identity): Promise<string | null | undefined>;
24
+ /**
25
+ * Listen for interop events.
26
+ * @param event the interop event to listen for.
27
+ * @param listener the function to call when the event occurs.
28
+ */
29
+ export declare const addInteropListener: <Event extends InteropEventType>(event: Event, listener: InteropListener<Event>) => Promise<void>;
30
+ export {};
@@ -1,4 +1,5 @@
1
1
  import type OpenFin from '@openfin/core';
2
+ import type { Page, PageCreationOrigin } from '../../../common/src/api/pages/shapes';
2
3
  import { AttachedPage } from '../../../client-api-platform/src/shapes';
3
4
  export interface RegisterUsageStatus {
4
5
  apiVersion?: string;
@@ -63,6 +64,10 @@ export interface AnalyticsEventInternal extends AnalyticsEvent {
63
64
  export type AnalyticsEventRaise = Omit<AnalyticsEventInternal, 'source'>;
64
65
  export declare const raiseBrowserAnalytics: (payload: AnalyticsEventRaise) => Promise<void>;
65
66
  export declare const raiseBrowserPageAnalytics: (pages: AttachedPage[], action: string) => Promise<void>;
67
+ /**
68
+ * Raised when a new page ID is minted, as opposed to `Open Page`, which also fires for restored pages.
69
+ */
70
+ export declare const raiseCreatePageAnalytics: (page: Pick<Page, "pageId" | "title">, windowName: string, origin?: PageCreationOrigin) => Promise<void>;
66
71
  export declare const raiseHomeAnalytics: (platformIdentity: OpenFin.Identity, payload: AnalyticsEventRaise) => Promise<void>;
67
72
  export declare const raiseDockAnalytics: (platformIdentity: OpenFin.Identity, payload: AnalyticsEventRaise) => Promise<void>;
68
73
  export declare const raiseStorefrontAnalytics: (platformIdentity: OpenFin.Identity, payload: AnalyticsEventRaise) => Promise<void>;
@@ -27,6 +27,12 @@
27
27
  "version": "3.0.3",
28
28
  "packageName": "common/package.json",
29
29
  "issuer": "common/src/utils/color-channels.ts"
30
+ },
31
+ {
32
+ "type": "explicit",
33
+ "version": "3.0.3",
34
+ "packageName": "client-api-platform/package.json",
35
+ "issuer": "client-api-platform/src/api/context-menu/browser-pagetab-handler.ts"
30
36
  }
31
37
  ],
32
38
  "lodash.debounce": [
@@ -43,14 +49,6 @@
43
49
  "issuer": "common/src/utils/layout.ts"
44
50
  }
45
51
  ],
46
- "lodash.clonedeep": [
47
- {
48
- "type": "explicit",
49
- "version": "4.5.0",
50
- "packageName": "common/package.json",
51
- "issuer": "common/src/utils/layout.ts"
52
- }
53
- ],
54
52
  "react-i18next": [
55
53
  {
56
54
  "type": "explicit",
@@ -100,5 +98,13 @@
100
98
  "packageName": "common/package.json",
101
99
  "issuer": "common/src/utils/create-and-migrate-ibd-store.ts"
102
100
  }
101
+ ],
102
+ "lodash.clonedeep": [
103
+ {
104
+ "type": "explicit",
105
+ "version": "4.5.0",
106
+ "packageName": "common/package.json",
107
+ "issuer": "common/src/utils/layout.ts"
108
+ }
103
109
  ]
104
110
  }