@openfin/core 33.76.18 → 33.76.19

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.
Binary file
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@openfin/core",
3
- "version": "33.76.18",
3
+ "version": "33.76.19",
4
4
  "license": "SEE LICENSE IN LICENSE.MD",
5
5
  "main": "./src/mock.js",
6
6
  "types": "./src/mock.d.ts",
package/src/OpenFin.d.ts CHANGED
@@ -3002,6 +3002,7 @@ export type AppVersionRuntimeStatusEvent = {
3002
3002
  type: 'runtime-status';
3003
3003
  } & AppVersionRuntimeInfo;
3004
3004
  import type * as BaseEvents from './api/events/base';
3005
+ import type * as ChannelEvents from './api/events/channel';
3005
3006
  import type * as WebContentsEvents from './api/events/webcontents';
3006
3007
  import type * as SystemEvents from './api/events/system';
3007
3008
  import type * as ApplicationEvents from './api/events/application';
@@ -3011,8 +3012,9 @@ import type * as GlobalHotkeyEvents from './api/events/globalHotkey';
3011
3012
  import type * as FrameEvents from './api/events/frame';
3012
3013
  import type * as PlatformEvents from './api/events/platform';
3013
3014
  import type * as ExternalApplicationEvents from './api/events/externalApplication';
3014
- export type { BaseEvents, WebContentsEvents, SystemEvents, ApplicationEvents, WindowEvents, ViewEvents, GlobalHotkeyEvents, FrameEvents, PlatformEvents, ExternalApplicationEvents };
3015
+ export type { BaseEvents, ChannelEvents, WebContentsEvents, SystemEvents, ApplicationEvents, WindowEvents, ViewEvents, GlobalHotkeyEvents, FrameEvents, PlatformEvents, ExternalApplicationEvents };
3015
3016
  export type BaseEvent = BaseEvents.BaseEvent;
3017
+ export type ChannelEvent = ChannelEvents.ChannelEvent;
3016
3018
  export type WebContentsEvent = WebContentsEvents.WebContentsEvent;
3017
3019
  export type SystemEvent = SystemEvents.SystemEvent;
3018
3020
  export type ApplicationEvent = ApplicationEvents.ApplicationEvent;
@@ -2,6 +2,9 @@ import type * as OpenFin from '../../OpenFin';
2
2
  import { IdentityEvent, NamedEvent, PropagatedEvent } from './base';
3
3
  import { PropagatedWindowEvent } from './window';
4
4
  import { PropagatedViewEvent } from './view';
5
+ /**
6
+ * Generated when an application has crashed.
7
+ */
5
8
  export type CrashedEvent = NamedEvent & {
6
9
  type: 'crashed';
7
10
  reason: 'normal-termination' | 'abnormal-termination' | 'killed' | 'crashed' | 'still-running' | 'launch-failed' | 'out-of-memory' | 'integrity-failure';
@@ -11,14 +14,24 @@ export type CrashedEvent = NamedEvent & {
11
14
  exitCode: number;
12
15
  };
13
16
  };
17
+ /**
18
+ * Generated when setFileDownloadLocation api is called.
19
+ * @remarks This event will not include the file download location itself. In order to get the new file download location, the user will have to access the secured query API 'getFileDownloadLocation'.
20
+ */
14
21
  export type FileDownloadLocationChangedEvent = NamedEvent & {
15
22
  type: 'file-download-location-changed';
16
23
  };
24
+ /**
25
+ * Generated when Application.run() is called for an already running application.
26
+ */
17
27
  export type RunRequestedEvent = IdentityEvent & {
18
28
  type: 'run-requested';
19
29
  userAppConfigArgs: Record<string, any>;
20
30
  manifest: OpenFin.ManifestInfo;
21
31
  };
32
+ /**
33
+ * Generated when the tray icon is clicked.
34
+ */
22
35
  export type TrayIconClickedEvent = IdentityEvent & {
23
36
  type: 'tray-icon-clicked';
24
37
  button: 0 | 1 | 2;
@@ -27,21 +40,39 @@ export type TrayIconClickedEvent = IdentityEvent & {
27
40
  y: number;
28
41
  monitorInfo: any;
29
42
  };
43
+ /**
44
+ * Generated when an alert is fired and suppressed due to the customWindowAlert flag being true.
45
+ */
30
46
  export type WindowAlertRequestedEvent = NamedEvent & {
31
47
  type: 'window-alert-requested';
32
48
  };
49
+ /**
50
+ * Generated when a child window is created.
51
+ */
33
52
  export type WindowCreatedEvent = NamedEvent & {
34
53
  type: 'window-created';
35
54
  };
55
+ /**
56
+ * Generated when a child window ends loading.
57
+ */
36
58
  export type WindowEndLoadEvent = NamedEvent & {
37
59
  type: 'window-end-load';
38
60
  };
61
+ /**
62
+ * Generated when a child window is not responding.
63
+ */
39
64
  export type WindowNotRespondingEvent = NamedEvent & {
40
65
  type: 'window-not-responding';
41
66
  };
67
+ /**
68
+ * Generated when a child window is responding.
69
+ */
42
70
  export type WindowRespondingEvent = NamedEvent & {
43
71
  type: 'window-responding';
44
72
  };
73
+ /**
74
+ * Generated when a child window starts loading.
75
+ */
45
76
  export type WindowStartLoadEvent = NamedEvent & {
46
77
  type: 'window-start-load';
47
78
  };
@@ -49,24 +80,45 @@ export type WindowStartLoadEvent = NamedEvent & {
49
80
  * A Window event that is natively published at the Application level (not Window).
50
81
  */
51
82
  export type ApplicationWindowEvent = WindowAlertRequestedEvent | WindowCreatedEvent | WindowEndLoadEvent | WindowNotRespondingEvent | WindowRespondingEvent | WindowStartLoadEvent;
83
+ /**
84
+ * Generated when an application is closed.
85
+ */
52
86
  export type ClosedEvent = IdentityEvent & {
53
87
  type: 'closed';
54
88
  };
89
+ /**
90
+ * Generated when an application has authenticated and is connected.
91
+ */
55
92
  export type ApplicationConnectedEvent = IdentityEvent & {
56
93
  type: 'connected';
57
94
  };
95
+ /**
96
+ * Generated when an application has initialized.
97
+ */
58
98
  export type InitializedEvent = IdentityEvent & {
59
99
  type: 'initialized';
60
100
  };
101
+ /**
102
+ * Generated when the RVM notifies an application that the manifest has changed.
103
+ */
61
104
  export type ManifestChangedEvent = IdentityEvent & {
62
105
  type: 'manifest-changed';
63
106
  };
107
+ /**
108
+ * Generated when an application is not responding.
109
+ */
64
110
  export type NotRespondingEvent = IdentityEvent & {
65
111
  type: 'not-responding';
66
112
  };
113
+ /**
114
+ * Generated when an application is responding.
115
+ */
67
116
  export type RespondingEvent = IdentityEvent & {
68
117
  type: 'responding';
69
118
  };
119
+ /**
120
+ * Generated when an application has started.
121
+ */
70
122
  export type StartedEvent = IdentityEvent & {
71
123
  type: 'started';
72
124
  };
@@ -74,9 +126,21 @@ export type StartedEvent = IdentityEvent & {
74
126
  * An Application event that does propagate to (republish on) parent topics.
75
127
  */
76
128
  export type WillPropagateApplicationEvent = ClosedEvent | ApplicationConnectedEvent | CrashedEvent | InitializedEvent | ManifestChangedEvent | NotRespondingEvent | RespondingEvent | RunRequestedEvent | StartedEvent | TrayIconClickedEvent | FileDownloadLocationChangedEvent;
129
+ /**
130
+ * An Application event.
131
+ */
77
132
  export type ApplicationEvent = {
78
133
  topic: 'application';
79
134
  } & (PropagatedViewEvent | PropagatedWindowEvent | ApplicationWindowEvent | WillPropagateApplicationEvent);
135
+ /**
136
+ * An Application event type.
137
+ */
80
138
  export type ApplicationEventType = ApplicationEvent['type'];
139
+ /**
140
+ * A propagated Application event.
141
+ */
81
142
  export type PropagatedApplicationEvent = PropagatedEvent<'application', WillPropagateApplicationEvent> | ApplicationWindowEvent;
143
+ /**
144
+ * A propagated Application event type.
145
+ */
82
146
  export type PropagatedApplicationEventType = PropagatedApplicationEvent['type'];
@@ -3,8 +3,8 @@
3
3
  */
4
4
  export type PropagatedEventType<Topic extends string, Type extends string> = `${Topic}-${Type}`;
5
5
  /**
6
- * Modifies an event shape to reflect propagation to a parent topic. The 'type' field
7
- * is prefixed with the original topic, and a new property is added with the original topic's identity.
6
+ * Modifies an event shape to reflect propagation to a parent topic.
7
+ * @remarks The 'type' field is prefixed with the original topic, and a new property is added with the original topic's identity.
8
8
  */
9
9
  export type PropagatedEvent<Topic extends string, Event extends {
10
10
  type: string;
@@ -14,19 +14,29 @@ export type PropagatedEvent<Topic extends string, Event extends {
14
14
  type: PropagatedEventType<Topic, E['type']>;
15
15
  } : never;
16
16
  /**
17
- * Handler for an event on an EventEmitter; selects the correct type for the event
17
+ * Handler for an event on an EventEmitter.
18
+ * @remarks Selects the correct type for the event
18
19
  * payload from the provided union based on the provided string literal type.
19
20
  */
20
21
  export type EventHandler<EmitterEvent extends BaseEvent, EventType extends string> = (payload: Extract<EmitterEvent, {
21
22
  type: EventType;
22
23
  }>, ...args: any[]) => void;
24
+ /**
25
+ * A base event.
26
+ */
23
27
  export type BaseEvent = {
24
28
  topic: string;
25
29
  type: string;
26
30
  };
31
+ /**
32
+ * An Identity event.
33
+ */
27
34
  export type IdentityEvent = BaseEvent & {
28
35
  uuid: string;
29
36
  };
37
+ /**
38
+ * A Name event.
39
+ */
30
40
  export type NamedEvent = IdentityEvent & {
31
41
  name: string;
32
42
  };
@@ -1,15 +1,30 @@
1
1
  import { NamedEvent } from './base';
2
+ /**
3
+ * A base Channel event.
4
+ */
2
5
  export type BaseChannelEvent = NamedEvent & {
3
6
  channelName: string;
4
7
  channelId: string;
5
8
  };
9
+ /**
10
+ * Generated when a Channel client is connected.
11
+ */
6
12
  export type ChannelConnectedEvent = BaseChannelEvent & {
7
13
  type: 'connected';
8
14
  };
15
+ /**
16
+ * Generated when a Channel client has disconnected.
17
+ */
9
18
  export type ChannelDisconnectedEvent = BaseChannelEvent & {
10
19
  type: 'disconnected';
11
20
  };
21
+ /**
22
+ * A Channel event.
23
+ */
12
24
  export type ChannelEvent = {
13
25
  topic: 'channel';
14
26
  } & (ChannelConnectedEvent | ChannelDisconnectedEvent);
27
+ /**
28
+ * A Channel event type.
29
+ */
15
30
  export type ChannelEventType = ChannelEvent['type'];
@@ -1,10 +1,19 @@
1
1
  import { BaseEvent } from './base';
2
+ /**
3
+ * Generated when an external application has authenticated and is connected.
4
+ */
2
5
  export type ExternalApplicationConnectedEvent = BaseEvent & {
3
6
  type: 'connected';
4
7
  };
8
+ /**
9
+ * Generated when an external application has disconnected.
10
+ */
5
11
  export type ExternalApplicationDisconnectedEvent = BaseEvent & {
6
12
  type: 'disconnected';
7
13
  };
14
+ /**
15
+ * An external application event.
16
+ */
8
17
  export type ExternalApplicationEvent = {
9
18
  topic: 'externalapplication';
10
19
  } & (ExternalApplicationConnectedEvent | ExternalApplicationDisconnectedEvent);
@@ -1,15 +1,30 @@
1
1
  import { NamedEvent } from './base';
2
+ /**
3
+ * The base frame event.
4
+ */
2
5
  export type BaseFrameEvent = NamedEvent & {
3
6
  entityType: 'iframe';
4
7
  frameName: string;
5
8
  };
9
+ /**
10
+ * Generated when a frame is connected.
11
+ */
6
12
  export type FrameConnectedEvent = BaseFrameEvent & {
7
13
  type: 'connected';
8
14
  };
15
+ /**
16
+ * Generated when a frame has disconnected.
17
+ */
9
18
  export type FrameDisconnectedEvent = BaseFrameEvent & {
10
19
  type: 'disconnected';
11
20
  };
21
+ /**
22
+ * A Frame event.
23
+ */
12
24
  export type FrameEvent = {
13
25
  topic: 'frame';
14
26
  } & (FrameConnectedEvent | FrameDisconnectedEvent);
27
+ /**
28
+ * A Frame event type.
29
+ */
15
30
  export type FrameEventType = FrameEvent['type'];
@@ -1,10 +1,19 @@
1
1
  import { BaseEvent } from './base';
2
+ /**
3
+ * Generated when a hotkey has been registered with the operating system.
4
+ */
2
5
  export type RegisteredEvent = BaseEvent & {
3
6
  type: 'registered';
4
7
  };
8
+ /**
9
+ * Generated when a hotkey has been unregistered with the operating system.
10
+ */
5
11
  export type UnregisteredEvent = BaseEvent & {
6
12
  type: 'unregistered';
7
13
  };
14
+ /**
15
+ * A global hotkey event.
16
+ */
8
17
  export type GlobalHotkeyEvent = {
9
18
  topic: 'global-hotkey';
10
19
  hotkey: 'string';
@@ -1,11 +1,26 @@
1
1
  import { ApplicationEvent } from './application';
2
2
  import { BaseEvent } from './base';
3
+ /**
4
+ * Generated when a new Platform's API becomes responsive.
5
+ */
3
6
  export type PlatformApiReadyEvent = BaseEvent & {
4
7
  topic: 'application';
5
8
  type: 'platform-api-ready';
6
9
  };
10
+ /**
11
+ * Generated when a <a href="tutorial-Platform.applySnapshot.html">platform.ApplySnapshot</a> call is resolved.
12
+ * @remarks The call is resolved when the following conditions are met for all windows in the snapshot:
13
+ * 1. The window has been created
14
+ * 2. The window has a responsive API
15
+ * 3. If a window has a layout property, the 'layout-ready' event has fired
16
+ *
17
+ * _Note_ - In the case of using a custom provider, if a window has a layout property but does not call _Layout.init_ this event may not fire.
18
+ */
7
19
  export type PlatformSnapshotAppliedEvent = BaseEvent & {
8
20
  topic: 'application';
9
21
  type: 'platform-snapshot-applied';
10
22
  };
23
+ /**
24
+ * A Platform event.
25
+ */
11
26
  export type PlatformEvent = ApplicationEvent | PlatformApiReadyEvent | PlatformSnapshotAppliedEvent;
@@ -4,32 +4,73 @@ import { BaseEvent, IdentityEvent } from './base';
4
4
  import { PropagatedViewEvent } from './view';
5
5
  import { PropagatedWindowEvent } from './window';
6
6
  import { AppVersionCompleteEvent, AppVersionErrorEvent, AppVersionProgressEvent, AppVersionRuntimeStatusEvent } from '../../OpenFin';
7
+ /**
8
+ * @internal
9
+ */
7
10
  export type NotRequested<EventType> = EventType extends `${infer U}-requested` ? never : EventType;
11
+ /**
12
+ * @internal
13
+ */
8
14
  export type ExcludeRequested<Event extends {
9
15
  type: string;
10
16
  }> = Extract<Event, {
11
17
  type: NotRequested<Event['type']>;
12
18
  }>;
19
+ /**
20
+ * Generated when a user enters or returns from idle state.
21
+ * @remarks This method is continuously generated every minute while the user is in idle.
22
+ * A user enters idle state when the computer is locked or when there has been no keyboard/mouse activity for 1 minute.
23
+ * A user returns from idle state when the computer is unlocked or keyboard/mouse activity has resumed.
24
+ */
13
25
  export type IdleEvent = {
14
26
  type: 'idle-state-changed';
15
27
  elapsedTime: number;
16
28
  isIdle: boolean;
17
29
  };
30
+ /**
31
+ * Generated on changes of a monitor's size/location.
32
+ * @remarks A monitor's size changes when the taskbar is resized or relocated.
33
+ * The available space of a monitor defines a rectangle that is not occupied by the taskbar
34
+ */
18
35
  export type MonitorEvent = OpenFin.MonitorInfo & {
19
36
  type: 'monitor-info-changed';
20
37
  };
38
+ /**
39
+ * Generated on changes to a user’s local computer session.
40
+ */
21
41
  export type SessionChangedEvent = {
22
42
  type: 'session-changed';
23
43
  reason: 'lock' | 'unlock' | 'remote-connect' | 'remote-disconnect' | 'unknown';
24
44
  };
45
+ /**
46
+ * An app versioning event.
47
+ */
25
48
  export type AppVersionEvent = AppVersionProgressEvent | AppVersionRuntimeStatusEvent | AppVersionCompleteEvent | AppVersionErrorEvent;
49
+ /**
50
+ * An app versioning event type.
51
+ */
26
52
  export type AppVersionEventType = AppVersionEvent['type'];
53
+ /**
54
+ * @internal
55
+ */
27
56
  export type IdEventType = WithId<AppVersionEventType>;
57
+ /**
58
+ * @internal
59
+ */
28
60
  export type WithId<T extends AppVersionEventType> = `${T}.${string}`;
61
+ /**
62
+ * @internal
63
+ */
29
64
  export type WithoutId<T extends string> = T extends WithId<infer U> ? U : never;
65
+ /**
66
+ * @internal
67
+ */
30
68
  export type AppVersionTypeFromIdEvent<T extends IdEventType> = Extract<AppVersionEvent, {
31
69
  type: WithoutId<T>;
32
70
  }>;
71
+ /**
72
+ * @internal
73
+ */
33
74
  export type EventWithId<Event extends AppVersionEvent> = Event extends infer E extends {
34
75
  type: AppVersionEventType;
35
76
  } ? Omit<E, 'type'> & {
@@ -37,17 +78,36 @@ export type EventWithId<Event extends AppVersionEvent> = Event extends infer E e
37
78
  topic: 'system';
38
79
  appVersionId: string;
39
80
  } : never;
81
+ /**
82
+ * @internal
83
+ */
40
84
  export type AppVersionEventWithId = EventWithId<AppVersionEvent>;
85
+ /**
86
+ * Generated when an application is created.
87
+ */
41
88
  export type ApplicationCreatedEvent = IdentityEvent & {
42
89
  type: 'application-created';
43
90
  };
91
+ /**
92
+ * Generated when the desktop icon is clicked while it's already running.
93
+ */
44
94
  export type DesktopIconClickedEvent = BaseEvent & {
45
95
  type: 'desktop-icon-clicked';
46
96
  };
97
+ /**
98
+ * Generated when system shutdown or log off.
99
+ * @internal
100
+ */
47
101
  export type SystemShutdownEvent = BaseEvent & {
48
102
  type: 'system-shutdown';
49
103
  };
104
+ /**
105
+ * A system event.
106
+ */
50
107
  export type SystemEvent = {
51
108
  topic: 'system';
52
109
  } & (ExcludeRequested<PropagatedWindowEvent> | PropagatedViewEvent | PropagatedApplicationEvent | ApplicationCreatedEvent | DesktopIconClickedEvent | IdleEvent | MonitorEvent | SessionChangedEvent | AppVersionEventWithId | SystemShutdownEvent);
110
+ /**
111
+ * A system event type.
112
+ */
53
113
  export type SystemEventType = SystemEvent['type'];
@@ -1,10 +1,18 @@
1
1
  import type * as OpenFin from '../../OpenFin';
2
2
  import { NonPropagatedWebContentsEvent, WillPropagateWebContentsEvent } from './webcontents';
3
3
  import { NamedEvent, PropagatedEvent } from './base';
4
+ /**
5
+ * A base View event.
6
+ */
4
7
  export type BaseViewEvent = {
5
8
  target: OpenFin.Identity;
6
9
  viewIdentity: OpenFin.Identity;
7
10
  };
11
+ /**
12
+ * Generated when a View changes its window target.
13
+ * @remarks This event will fire during creation of a View.
14
+ * In that case, previousTarget identity will be the same as target identity.
15
+ */
8
16
  export type TargetChangedEvent = NamedEvent & {
9
17
  type: 'target-changed';
10
18
  previousTarget: OpenFin.Identity;
@@ -13,21 +21,40 @@ export type TargetChangedEvent = NamedEvent & {
13
21
  * A View event that does not propagate to (republish on) parent topics.
14
22
  */
15
23
  export type NonPropagatedViewEvent = BaseViewEvent & NonPropagatedWebContentsEvent;
24
+ /**
25
+ * Generated when a View is attached to a window.
26
+ */
16
27
  export type AttachedEvent = NamedEvent & {
17
28
  type: 'attached';
18
29
  };
30
+ /**
31
+ * Generated when a View is created.
32
+ */
19
33
  export type CreatedEvent = NamedEvent & {
20
34
  type: 'created';
21
35
  };
36
+ /**
37
+ * Generated when a View is destroyed.
38
+ */
22
39
  export type DestroyedEvent = NamedEvent & {
23
40
  type: 'destroyed';
24
41
  };
42
+ /**
43
+ * Generated when a View is hidden.
44
+ */
25
45
  export type HiddenEvent = NamedEvent & {
26
46
  type: 'hidden';
27
47
  };
48
+ /**
49
+ * Generated when a keyboard shortcut defined in the `hotkeys` array in [View options](OpenFin.ViewOptions.html) is pressed inside the view.
50
+ * @remarks For reference on keyboard event properties see [KeyboardEvent](https://developer.mozilla.org/en-US/docs/Web/API/KeyboardEvent).
51
+ */
28
52
  export type HotkeyEvent = NamedEvent & {
29
53
  type: 'hotkey';
30
54
  };
55
+ /**
56
+ * Generated when a View is shown. This event will fire during creation of a View.
57
+ */
31
58
  export type ShownEvent = NamedEvent & {
32
59
  type: 'shown';
33
60
  };
@@ -35,9 +62,21 @@ export type ShownEvent = NamedEvent & {
35
62
  * A View event that does propagate to (republish on) parent topics.
36
63
  */
37
64
  export type WillPropagateViewEvent = BaseViewEvent & (WillPropagateWebContentsEvent | AttachedEvent | CreatedEvent | DestroyedEvent | HiddenEvent | HotkeyEvent | ShownEvent | TargetChangedEvent);
65
+ /**
66
+ * A View event.
67
+ */
38
68
  export type ViewEvent = {
39
69
  topic: 'view';
40
70
  } & (NonPropagatedViewEvent | WillPropagateViewEvent);
71
+ /**
72
+ * A View event type.
73
+ */
41
74
  export type ViewEventType = ViewEvent['type'];
75
+ /**
76
+ * A propagated View event.
77
+ */
42
78
  export type PropagatedViewEvent = PropagatedEvent<'view', WillPropagateViewEvent>;
79
+ /**
80
+ * A propagated View event type.
81
+ */
43
82
  export type PropagatedViewEventType = PropagatedViewEvent['type'];
@@ -7,11 +7,17 @@ type BaseLoadFailedEvent = NamedEvent & {
7
7
  validatedURL: string;
8
8
  isMainFrame: boolean;
9
9
  };
10
+ /**
11
+ * Generated when an HTTP load was cancelled or failed.
12
+ */
10
13
  export type ResourceLoadFailedEvent = BaseLoadFailedEvent & {
11
14
  type: 'resource-load-failed';
12
15
  };
16
+ /**
17
+ * Generated when an HTTP resource request has received response details.
18
+ */
13
19
  export type ResourceResponseReceivedEvent = NamedEvent & {
14
- type: 'response-received';
20
+ type: 'resource-response-received';
15
21
  status: boolean;
16
22
  newUrl: string;
17
23
  originalUrl: string;
@@ -21,25 +27,41 @@ export type ResourceResponseReceivedEvent = NamedEvent & {
21
27
  headers: any;
22
28
  resourceType: 'mainFrame' | 'subFrame' | 'styleSheet' | 'script' | 'image' | 'object' | 'xhr' | 'other';
23
29
  };
30
+ /**
31
+ * Generated when page title is set during navigation.
32
+ * @remarks explicitSet is false when title is synthesized from file url.
33
+ */
24
34
  export type PageTitleUpdatedEvent = NamedEvent & {
25
35
  type: 'page-title-updated';
26
36
  title: string;
27
37
  };
38
+ /**
39
+ * Generated when navigating to a URL that fails certificate validation.
40
+ */
28
41
  export type CertificateErrorEvent = NamedEvent & {
29
42
  type: 'certificate-error';
30
43
  error: string;
31
44
  url: string;
32
45
  certificate: OpenFin.Certificate;
33
46
  };
47
+ /**
48
+ * Generated when the certificate selection dialog is shown.
49
+ */
34
50
  export type CertificateSelectionShownEvent = NamedEvent & {
35
51
  type: 'certificate-selection-shown';
36
52
  url: string;
37
53
  certificates: OpenFin.Certificate[];
38
54
  };
55
+ /**
56
+ * Generated when page receives favicon urls.
57
+ */
39
58
  export type FaviconUpdatedEvent = NamedEvent & {
40
59
  type: 'page-favicon-updated';
41
60
  favicons: string[];
42
61
  };
62
+ /**
63
+ * Generated when view navigation is rejected as per contentNavigation whitelist/blacklist rules.
64
+ */
43
65
  export type NavigationRejectedEvent = NamedEvent & {
44
66
  type: 'navigation-rejected';
45
67
  sourceName?: string;
@@ -49,6 +71,11 @@ type BaseUrlEvent = NamedEvent & {
49
71
  type: 'url-changed';
50
72
  url: string;
51
73
  };
74
+ /**
75
+ * Generated when navigation or redirect is completed.
76
+ * @remarks Also emitted for in-page navigations, examples of this occurring are when anchor links are clicked or when the DOM hashchange event is triggered, indicated by isInPage=true.
77
+ * Note that navigating to a url with an anchor in it like http://openfin.co/#my-inpage-anchor will fire 2 events indicating the original navigation (isInPage=false) and then the in-page navigation event (isInPage=true).
78
+ */
52
79
  export type UrlChangedEvent = BaseUrlEvent & ({
53
80
  isInPage: true;
54
81
  } | {
@@ -56,50 +83,89 @@ export type UrlChangedEvent = BaseUrlEvent & ({
56
83
  httpResponseCode: number;
57
84
  httpStatusText: string;
58
85
  });
86
+ /**
87
+ * Generated when the navigation is done, i.e. the spinner of the tab will stop spinning, and the onload event is dispatched.
88
+ */
59
89
  export type DidFinishLoadEvent = NamedEvent & {
60
90
  type: 'did-finish-load';
61
91
  };
92
+ /**
93
+ * Generated when load failed.
94
+ */
62
95
  export type DidFailLoadEvent = BaseLoadFailedEvent & {
63
96
  type: 'did-fail-load';
64
97
  };
98
+ /**
99
+ * Generated when a result is available when calling findInPage.
100
+ */
65
101
  export type FoundInPageEvent = NamedEvent & {
66
102
  type: 'found-in-page';
67
103
  } & {
68
104
  result: OpenFin.FindInPageResult;
69
105
  };
106
+ /**
107
+ * Generated when a WebContents loses focus.
108
+ */
70
109
  export type BlurredEvent = NamedEvent & {
71
110
  type: 'blurred';
72
111
  };
112
+ /**
113
+ * Generated when a page's theme color changes. This is usually due to encountering a meta tag.
114
+ */
73
115
  export type DidChangeThemeColorEvent = NamedEvent & {
74
116
  type: 'did-change-theme-color';
75
117
  };
118
+ /**
119
+ * Generated when a WebContents gains focus.
120
+ */
76
121
  export type FocusedEvent = NamedEvent & {
77
122
  type: 'focused';
78
123
  };
124
+ /**
125
+ * Generated when a child content is blocked to load.
126
+ */
79
127
  export type ChildContentBlockedEvent = NamedEvent & {
80
128
  type: 'child-content-blocked';
81
129
  };
130
+ /**
131
+ * Generated when a child content is loaded into a browser.
132
+ */
82
133
  export type ChildContentOpenedInBrowserEvent = NamedEvent & {
83
134
  type: 'child-content-opened-in-browser';
84
135
  };
136
+ /**
137
+ * Generated when a child View is created.
138
+ */
85
139
  export type ChildViewCreatedEvent = NamedEvent & {
86
140
  type: 'child-view-created';
87
141
  };
88
- export type FileDownloadEvent = NamedEvent & {
142
+ /**
143
+ * A general file download event without event type.
144
+ */
145
+ export type FileDownloadEvent = {
146
+ /**
147
+ * The file download state.
148
+ */
89
149
  state: 'started' | 'progressing' | 'cancelled' | 'interrupted' | 'completed';
90
150
  /**
91
151
  * The url from which the file is being downloaded.
92
152
  */
93
153
  url: string;
154
+ /**
155
+ * The file mime type.
156
+ */
94
157
  mimeType: string;
95
158
  /**
96
- * Name used to save the file locally.
159
+ * The name used to save the file locally.
97
160
  */
98
161
  fileName: string;
99
162
  /**
100
- * Original name of the file.
163
+ * The original name of the file.
101
164
  */
102
165
  originalFileName: string;
166
+ /**
167
+ * The total size in bytes of the file.
168
+ */
103
169
  totalBytes: number;
104
170
  /**
105
171
  * The number of seconds since the UNIX epoch when the download was started.
@@ -121,15 +187,24 @@ export type FileDownloadEvent = NamedEvent & {
121
187
  * The number of bytes of the item that have already been downloaded.
122
188
  */
123
189
  downloadedBytes: number;
124
- };
190
+ } & NamedEvent;
191
+ /**
192
+ * Generated when a file download has started.
193
+ */
125
194
  export type FileDownloadStartedEvent = FileDownloadEvent & {
126
195
  type: 'file-download-started';
127
196
  state: 'started';
128
197
  };
198
+ /**
199
+ * Generated during file download progress.
200
+ */
129
201
  export type FileDownloadProgressEvent = FileDownloadEvent & {
130
202
  type: 'file-download-progress';
131
203
  state: 'progressing' | 'interrupted';
132
204
  };
205
+ /**
206
+ * Generated when a file download has completed.
207
+ */
133
208
  export type FileDownloadCompletedEvent = FileDownloadEvent & {
134
209
  type: 'file-download-completed';
135
210
  state: 'completed' | 'interrupted' | 'cancelled';
@@ -142,5 +217,8 @@ export type WillPropagateWebContentsEvent = BlurredEvent | CertificateSelectionS
142
217
  * A WebContents event that does not propagate to (republish on) parent topics.
143
218
  */
144
219
  export type NonPropagatedWebContentsEvent = FoundInPageEvent | CertificateErrorEvent;
220
+ /**
221
+ * A WebContents event.
222
+ */
145
223
  export type WebContentsEvent = NonPropagatedWebContentsEvent | WillPropagateWebContentsEvent;
146
224
  export {};
@@ -2,11 +2,18 @@ import type * as OpenFin from '../../OpenFin';
2
2
  import { NamedEvent, PropagatedEvent } from './base';
3
3
  import { BaseViewEvent, PropagatedViewEvent, AttachedEvent as ViewAttachedEvent } from './view';
4
4
  import { NonPropagatedWebContentsEvent, WillPropagateWebContentsEvent } from './webcontents';
5
+ /**
6
+ * Generated when an alert is fired and suppressed due to the customWindowAlert flag being true.
7
+ */
5
8
  export type AlertRequestedEvent = NamedEvent & {
6
9
  type: 'alert-requested';
7
10
  message: string;
8
11
  url: string;
9
12
  };
13
+ /**
14
+ * Generated when a window within this application requires credentials from the user.
15
+ * @remarks If there is a proxy, please see {@tutorial Proxy.behaviorChange} for more details.
16
+ */
10
17
  export type AuthRequestedEvent = NamedEvent & {
11
18
  type: 'auth-requested';
12
19
  authInfo: {
@@ -17,48 +24,82 @@ export type AuthRequestedEvent = NamedEvent & {
17
24
  scheme: string;
18
25
  };
19
26
  };
27
+ /**
28
+ * Generated when a window ends loading.
29
+ */
20
30
  export type EndLoadEvent = NamedEvent & {
21
31
  type: 'end-load';
22
32
  documentName: string;
23
33
  isMain: boolean;
24
34
  };
35
+ /**
36
+ * Generated when window is being redirected as per contentRedirect whitelist/blacklist rules.
37
+ */
25
38
  export type WillRedirectEvent = NamedEvent & {
26
39
  type: 'will-redirect';
27
40
  blocked: boolean;
28
41
  isInPlace: boolean;
29
42
  url: string;
30
43
  };
44
+ /**
45
+ * Generated when a window has been reloaded.
46
+ */
31
47
  export type ReloadedEvent = NamedEvent & {
32
48
  type: 'reloaded';
33
49
  url: string;
34
50
  };
51
+ /**
52
+ * Generated after window options are changed using the window.updateOptions method.
53
+ * @remarks Will not fire if the diff object is empty.
54
+ */
35
55
  export type WindowOptionsChangedEvent = NamedEvent & {
36
56
  type: 'options-changed';
37
57
  options: OpenFin.WindowOptions;
38
58
  diff: OpenFin.WindowOptionDiff;
39
59
  };
60
+ /**
61
+ * Generated when an external process has exited.
62
+ */
40
63
  export type ExternalProcessExitedEvent = NamedEvent & {
41
64
  type: 'external-process-exited';
42
65
  processUuid: string;
43
66
  exitCode: number;
44
67
  };
68
+ /**
69
+ * Generated when an external process has started.
70
+ */
45
71
  export type ExternalProcessStartedEvent = NamedEvent & {
46
72
  type: 'external-process-started';
47
73
  processUuid: string;
48
74
  };
75
+ /**
76
+ * Generated when a window has been hidden.
77
+ */
49
78
  export type HiddenEvent = NamedEvent & {
50
79
  type: 'hidden';
51
80
  reason: 'closing' | 'hide' | 'hide-on-close';
52
81
  };
82
+ /**
83
+ * Preload script running state info during the execution of a window's preload script.
84
+ */
53
85
  export type PreloadScriptInfoRunning = {
54
86
  state: 'load-started' | 'load-failed' | 'load-succeeded' | 'failed' | 'succeeded';
55
87
  };
88
+ /**
89
+ * Preload script final state info after the execution of all of a window's preload scripts.
90
+ */
56
91
  export type PreloadScriptInfo = {
57
92
  state: 'load-failed' | 'failed' | 'succeeded';
58
93
  };
94
+ /**
95
+ * A general preload scripts state change event without event type.
96
+ */
59
97
  export type PreloadScriptsStateChangeEvent = NamedEvent & {
60
98
  preloadScripts: (PreloadScriptInfoRunning & any)[];
61
99
  };
100
+ /**
101
+ * A general user bounds change event without event type.
102
+ */
62
103
  export type UserBoundsChangeEvent = NamedEvent & {
63
104
  height: number;
64
105
  left: number;
@@ -66,6 +107,9 @@ export type UserBoundsChangeEvent = NamedEvent & {
66
107
  width: number;
67
108
  windowState: 'minimized' | 'normal' | 'maximized';
68
109
  };
110
+ /**
111
+ * A general bounds change event without event type.
112
+ */
69
113
  export type BoundsChangeEvent = NamedEvent & {
70
114
  changeType: 0 | 1 | 2;
71
115
  deferred: boolean;
@@ -74,6 +118,9 @@ export type BoundsChangeEvent = NamedEvent & {
74
118
  top: number;
75
119
  width: number;
76
120
  };
121
+ /**
122
+ * A general will-move or will-resize event without event type.
123
+ */
77
124
  export type WillMoveOrResizeEvent = NamedEvent & {
78
125
  height: number;
79
126
  left: number;
@@ -81,13 +128,23 @@ export type WillMoveOrResizeEvent = NamedEvent & {
81
128
  width: number;
82
129
  monitorScaleFactor: number;
83
130
  };
131
+ /**
132
+ * Generated when window finishes loading. Provides performance and navigation data.
133
+ */
84
134
  export type PerformanceReportEvent = Performance & NamedEvent & {
85
135
  type: 'performance-report';
86
136
  };
137
+ /**
138
+ * Generated when a window has a view detached from it.
139
+ * @remarks Will fire when a view is destroyed in which case `target` will be null.
140
+ */
87
141
  export type ViewDetachedEvent = NamedEvent & BaseViewEvent & {
88
142
  type: 'view-detached';
89
143
  previousTarget: OpenFin.Identity;
90
144
  };
145
+ /**
146
+ * Generated when the value of the element changes.
147
+ */
91
148
  export type InputEvent = {
92
149
  inputType: 'keyUp' | 'keyDown';
93
150
  ctrlKey: boolean;
@@ -99,12 +156,18 @@ export type InputEvent = {
99
156
  repeat: boolean;
100
157
  command?: string;
101
158
  };
159
+ /**
160
+ * Generated when a window and all of its layout's views have either finished or failed navigation.
161
+ */
102
162
  export type LayoutInitializedEvent = NamedEvent & {
103
163
  type: 'layout-initialized';
104
164
  ofViews: (OpenFin.Identity & {
105
165
  entityType: 'view';
106
166
  })[];
107
167
  };
168
+ /**
169
+ * Generated when a window and all of its layout's views have been created and can receive API calls.
170
+ */
108
171
  export type LayoutReadyEvent = NamedEvent & {
109
172
  type: 'layout-ready';
110
173
  views: (OpenFin.Identity & {
@@ -115,86 +178,175 @@ export type LayoutReadyEvent = NamedEvent & {
115
178
  * A Window event that does not propagate to (republish on) parent topics.
116
179
  */
117
180
  export type NonPropagatedWindowEvent = NonPropagatedWebContentsEvent;
181
+ /**
182
+ * Generated at the beginning of a user-driven change to a window's size or position.
183
+ */
118
184
  export type BeginUserBoundsChangingEvent = UserBoundsChangeEvent & {
119
185
  type: 'begin-user-bounds-changing';
120
186
  };
187
+ /**
188
+ * Generated after changes in a window's size and/or position.
189
+ */
121
190
  export type BoundsChangedEvent = BoundsChangeEvent & {
122
191
  type: 'bounds-changed';
123
192
  };
193
+ /**
194
+ * Generated during changes to a window's size and/or position.
195
+ */
124
196
  export type BoundsChangingEvent = BoundsChangeEvent & {
125
197
  type: 'bounds-changing';
126
198
  };
199
+ /**
200
+ * Generated when a window has been prevented from closing.
201
+ * @remarks A window will be prevented from closing by default, either through the API or by a user when ‘close-requested’ has been subscribed to and the Window.close(force) flag is false.
202
+ */
127
203
  export type WindowCloseRequestedEvent = NamedEvent & {
128
204
  type: 'close-requested';
129
205
  };
206
+ /**
207
+ * Generated when a window has closed.
208
+ */
130
209
  export type WindowClosedEvent = NamedEvent & {
131
210
  type: 'closed';
132
211
  };
212
+ /**
213
+ * Generated when a window has initiated the closing routine.
214
+ */
133
215
  export type WindowClosingEvent = NamedEvent & {
134
216
  type: 'closing';
135
217
  };
218
+ /**
219
+ * Generated after a change to a window's size and/or position is attempted while window movement is disabled.
220
+ */
136
221
  export type DisabledMovementBoundsChangedEvent = BoundsChangeEvent & {
137
222
  type: 'disabled-movement-bounds-changed';
138
223
  };
224
+ /**
225
+ * Generated while a change to a window's size and/or position is attempted while window movement is disabled.
226
+ */
139
227
  export type DisabledMovementBoundsChangingEvent = BoundsChangeEvent & {
140
228
  type: 'disabled-movement-bounds-changing';
141
229
  };
230
+ /**
231
+ * Generated when a window has been embedded.
232
+ */
142
233
  export type EmbeddedEvent = NamedEvent & {
143
234
  type: 'embedded';
144
235
  };
236
+ /**
237
+ * Generated at the end of a user-driven change to a window's size or position.
238
+ */
145
239
  export type EndUserBoundsChangingEvent = UserBoundsChangeEvent & {
146
240
  type: 'end-user-bounds-changing';
147
241
  };
242
+ /**
243
+ * Generated when a keyboard shortcut defined in the `hotkeys` array in [Window options](OpenFin.WindowOptions.html) is pressed inside the window.
244
+ * @remarks For reference on keyboard event properties see [KeyboardEvent](https://developer.mozilla.org/en-US/docs/Web/API/KeyboardEvent).
245
+ */
148
246
  export type WindowHotkeyEvent = InputEvent & NamedEvent & {
149
247
  type: 'hotkey';
150
248
  };
249
+ /**
250
+ * Generated when a window is initialized.
251
+ */
151
252
  export type WindowInitializedEvent = NamedEvent & {
152
253
  type: 'initialized';
153
254
  };
255
+ /**
256
+ * Generated when a window is maximized.
257
+ */
154
258
  export type MaximizedEvent = NamedEvent & {
155
259
  type: 'maximized';
156
260
  };
261
+ /**
262
+ * Generated when a window is minimized.
263
+ */
157
264
  export type MinimizedEvent = NamedEvent & {
158
265
  type: 'minimized';
159
266
  };
267
+ /**
268
+ * Generated after the execution of all of a window's preload scripts.
269
+ * @remarks Contains information about all window's preload scripts' final states.
270
+ */
160
271
  export type PreloadScriptsStateChangedEvent = PreloadScriptsStateChangeEvent & {
161
272
  type: 'preload-script-state-changed';
162
273
  };
274
+ /**
275
+ * Generated during the execution of a window's preload script.
276
+ * @remarks Contains information about a single window's preload script's state, for which the event has been raised.
277
+ */
163
278
  export type PreloadScriptsStateChangingEvent = PreloadScriptsStateChangeEvent & {
164
279
  type: 'preload-script-state-changing';
165
280
  };
281
+ /**
282
+ * Generated when a window is displayed after having been minimized or when a window leaves the maximize state without minimizing.
283
+ */
166
284
  export type WindowRestoredEvent = NamedEvent & {
167
285
  type: 'restored';
168
286
  };
287
+ /**
288
+ * Generated when a window has been prevented from showing.
289
+ * @remarks A window will be prevented from showing by default, either through the API or by a user when ‘show-requested’ has been subscribed to on the window or 'window-show-requested' on the parent application and the Window.show(force) flag is false.
290
+ */
169
291
  export type WindowShowRequestedEvent = NamedEvent & {
170
292
  type: 'show-requested';
171
293
  };
294
+ /**
295
+ * Generated when a hidden window has been shown.
296
+ */
172
297
  export type WindowShownEvent = NamedEvent & {
173
298
  type: 'shown';
174
299
  };
300
+ /**
301
+ * Generated when a window's user movement becomes enabled.
302
+ */
175
303
  export type UserMovementEnabledEvent = NamedEvent & {
176
304
  type: 'user-movement-enabled';
177
305
  };
306
+ /**
307
+ * Generated when a window's user movement becomes disabled.
308
+ */
178
309
  export type UserMovementDisabledEvent = NamedEvent & {
179
310
  type: 'user-movement-disabled';
180
311
  };
312
+ /**
313
+ * Generated when a window is being moved by the user.
314
+ * @remarks For use with monitor scaling that is not 100%. Bounds are given in DIP (adjusted for monitor scale factor).
315
+ */
181
316
  export type WillMoveEvent = WillMoveOrResizeEvent & {
182
317
  type: 'will-move';
183
318
  };
319
+ /**
320
+ * Generated when a window is being resized by the user.
321
+ * @remarks For use with monitor scaling that is not 100%. Bounds are given in DIP (adjusted for monitor scale factor).
322
+ * The event will fire when a user resize is blocked by window options such as maxWidth or minHeight but not if the window is not resizable.
323
+ */
184
324
  export type WillResizeEvent = WillMoveOrResizeEvent & {
185
325
  type: 'will-resize';
186
326
  };
187
327
  /**
188
- * A propagated view event that is re-propagated from window.
328
+ * A propagated View event that is re-propagated from window.
189
329
  */
190
330
  export type PropagatedViewAttachedEvent = PropagatedEvent<'view', ViewAttachedEvent>;
191
331
  /**
192
332
  * A Window event that does propagate to (republish on) parent topics.
193
333
  */
194
334
  export type WillPropagateWindowEvent = WillPropagateWebContentsEvent | PropagatedViewAttachedEvent | ViewDetachedEvent | AuthRequestedEvent | BeginUserBoundsChangingEvent | BoundsChangedEvent | BoundsChangingEvent | WindowCloseRequestedEvent | WindowClosedEvent | WindowClosingEvent | DisabledMovementBoundsChangedEvent | DisabledMovementBoundsChangingEvent | EmbeddedEvent | EndUserBoundsChangingEvent | ExternalProcessExitedEvent | ExternalProcessStartedEvent | HiddenEvent | WindowHotkeyEvent | WindowInitializedEvent | LayoutInitializedEvent | LayoutReadyEvent | MaximizedEvent | MinimizedEvent | WindowOptionsChangedEvent | PerformanceReportEvent | PreloadScriptsStateChangedEvent | PreloadScriptsStateChangingEvent | ReloadedEvent | WindowRestoredEvent | WindowShowRequestedEvent | WindowShownEvent | UserMovementDisabledEvent | UserMovementEnabledEvent | WillMoveEvent | WillRedirectEvent | WillResizeEvent;
335
+ /**
336
+ * A Window event.
337
+ */
195
338
  export type WindowEvent = {
196
339
  topic: 'window';
197
340
  } & (WillPropagateWindowEvent | NonPropagatedWindowEvent | PropagatedViewEvent);
341
+ /**
342
+ * A Window event type.
343
+ */
198
344
  export type WindowEventType = WindowEvent['type'];
345
+ /**
346
+ * A propagated Window event.
347
+ */
199
348
  export type PropagatedWindowEvent = PropagatedEvent<'window', Exclude<WillPropagateWindowEvent, WindowCloseRequestedEvent>>;
349
+ /**
350
+ * A propagated Window event type.
351
+ */
200
352
  export type PropagatedWindowEventType = PropagatedWindowEvent['type'];
@@ -1010,12 +1010,13 @@ export declare class _Window extends WebContents<OpenFin.WindowEvent> {
1010
1010
  */
1011
1011
  /**
1012
1012
  * @typedef {object} MenuItemTemplate
1013
- * @property {*} data Data to be returned if the user selects the element. Must be serializable. Large objects can have a performance impact.
1013
+ * @property {*} data - Data to be returned if the user selects the element. Must be serializable. Large objects can have a performance impact.
1014
1014
  * @property {'normal' | 'separator' | 'submenu' | 'checkbox'} [type] - Defaults to 'normal' unless a 'submenu' key exists
1015
1015
  * @property {string} [label] - The text to show on the menu item. Should be left undefined for `type: 'separator'`
1016
1016
  * @property {boolean} [enabled] - If false, the menu item will be greyed out and unclickable.
1017
1017
  * @property {boolean} [visible] - If false, the menu item will be entirely hidden.
1018
1018
  * @property {boolean} [checked] - Should only be specified for `checkbox` type menu items.
1019
+ * @property {string} [icon] - Image Data URI with image dimensions inferred from the encoded string
1019
1020
  * @property {Array<MenuItemTemplate>} [submenu] Should be specified for `submenu` type menu items. If `submenu` is specified, the `type: 'submenu'` can be omitted.
1020
1021
  */
1021
1022
  /**
@@ -1246,12 +1246,13 @@ class _Window extends main_1.WebContents {
1246
1246
  */
1247
1247
  /**
1248
1248
  * @typedef {object} MenuItemTemplate
1249
- * @property {*} data Data to be returned if the user selects the element. Must be serializable. Large objects can have a performance impact.
1249
+ * @property {*} data - Data to be returned if the user selects the element. Must be serializable. Large objects can have a performance impact.
1250
1250
  * @property {'normal' | 'separator' | 'submenu' | 'checkbox'} [type] - Defaults to 'normal' unless a 'submenu' key exists
1251
1251
  * @property {string} [label] - The text to show on the menu item. Should be left undefined for `type: 'separator'`
1252
1252
  * @property {boolean} [enabled] - If false, the menu item will be greyed out and unclickable.
1253
1253
  * @property {boolean} [visible] - If false, the menu item will be entirely hidden.
1254
1254
  * @property {boolean} [checked] - Should only be specified for `checkbox` type menu items.
1255
+ * @property {string} [icon] - Image Data URI with image dimensions inferred from the encoded string
1255
1256
  * @property {Array<MenuItemTemplate>} [submenu] Should be specified for `submenu` type menu items. If `submenu` is specified, the `type: 'submenu'` can be omitted.
1256
1257
  */
1257
1258
  /**
Binary file