@openfin/core 30.73.26 → 30.73.28

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.
Files changed (37) hide show
  1. package/package.json +1 -1
  2. package/src/OpenFin.d.ts +24 -25
  3. package/src/api/application/Instance.d.ts +1 -1
  4. package/src/api/base.d.ts +16 -14
  5. package/src/api/base.js +2 -2
  6. package/src/api/events/application.d.ts +65 -56
  7. package/src/api/events/base.d.ts +33 -15
  8. package/src/api/events/channel.d.ts +13 -8
  9. package/src/api/events/eventAggregator.js +1 -9
  10. package/src/api/events/externalApplication.d.ts +10 -5
  11. package/src/api/events/frame.d.ts +13 -7
  12. package/src/api/events/globalHotkey.d.ts +11 -12
  13. package/src/api/events/platform.d.ts +10 -16
  14. package/src/api/events/system.d.ts +41 -28
  15. package/src/api/events/typedEventEmitter.d.ts +15 -8
  16. package/src/api/events/view.d.ts +37 -54
  17. package/src/api/events/webcontents.d.ts +54 -28
  18. package/src/api/events/window.d.ts +147 -134
  19. package/src/api/external-application/Instance.d.ts +1 -1
  20. package/src/api/frame/Instance.d.ts +1 -1
  21. package/src/api/global-hotkey/index.d.ts +1 -3
  22. package/src/api/global-hotkey/index.js +6 -0
  23. package/src/api/interappbus/channel/index.d.ts +2 -2
  24. package/src/api/interappbus/channel/index.js +2 -0
  25. package/src/api/interop/InteropBroker.d.ts +1 -1
  26. package/src/api/interop/InteropBroker.js +1 -1
  27. package/src/api/platform/Factory.js +4 -0
  28. package/src/api/platform/Instance.d.ts +3 -4
  29. package/src/api/platform/Instance.js +2 -1
  30. package/src/api/system/index.d.ts +471 -2
  31. package/src/api/system/index.js +486 -0
  32. package/src/api/view/Instance.d.ts +2 -2
  33. package/src/api/webcontents/main.d.ts +2 -2
  34. package/src/api/webcontents/main.js +10 -0
  35. package/src/api/window/Instance.d.ts +1 -3
  36. package/src/api/window/Instance.js +2 -0
  37. package/src/transport/transport.d.ts +3 -3
@@ -1,57 +1,40 @@
1
1
  import type * as OpenFin from '../../OpenFin';
2
- import { CertificateSelectionShownEvent, WebContentsEventMapping, WindowResourceLoadFailedEvent, WindowResourceResponseReceivedEvent } from './webcontents';
3
- import { BaseEventMap, WindowEvent } from './base';
4
- import { WindowNavigationRejectedEvent } from './window';
5
- import { CrashedEvent } from './application';
6
- export interface ViewEventMapping<Topic = string, Type = string> extends WebContentsEventMapping {
7
- 'attached': WindowEvent<Topic, Type>;
8
- 'created': WindowEvent<Topic, Type>;
9
- 'destroyed': WindowEvent<Topic, Type>;
10
- 'hidden': WindowEvent<Topic, Type>;
11
- 'hotkey': InputEvent & WindowEvent<Topic, Type>;
12
- 'shown': WindowEvent<Topic, Type>;
13
- 'target-changed': TargetChangedEvent<Topic, Type>;
14
- }
15
- interface PropagatedViewIdentity {
16
- viewIdentity: OpenFin.Identity;
17
- }
18
- export interface PropagatedViewEventMapping<Topic = string, Type = string> extends BaseEventMap {
19
- 'view-blurred': WindowEvent<Topic, Type> & PropagatedViewIdentity;
20
- 'view-certificate-selection-shown': CertificateSelectionShownEvent<Topic, Type> & PropagatedViewIdentity;
21
- 'view-crashed': CrashedEvent & WindowEvent<Topic, Type> & PropagatedViewIdentity;
22
- 'view-created': CrashedEvent & WindowEvent<Topic, Type> & PropagatedViewIdentity;
23
- 'view-destroyed': WindowEvent<Topic, Type> & PropagatedViewIdentity;
24
- 'view-did-change-theme-color': WindowEvent<Topic, Type> & PropagatedViewIdentity;
25
- 'view-focused': WindowEvent<Topic, Type> & PropagatedViewIdentity;
26
- 'view-hidden': WindowEvent<Topic, Type> & PropagatedViewIdentity;
27
- 'view-hotkey': InputEvent & WindowEvent<Topic, Type> & PropagatedViewIdentity;
28
- 'view-navigation-rejected': WindowNavigationRejectedEvent<Topic, Type> & PropagatedViewIdentity;
29
- 'view-page-favicon-updated': WindowEvent<Topic, Type> & PropagatedViewIdentity;
30
- 'view-page-title-updated': WindowEvent<Topic, Type> & PropagatedViewIdentity;
31
- 'view-resource-load-failed': WindowResourceLoadFailedEvent<Topic, Type> & PropagatedViewIdentity;
32
- 'view-resource-response-received': WindowResourceResponseReceivedEvent<Topic, Type> & PropagatedViewIdentity;
33
- 'view-shown': WindowEvent<Topic, Type> & PropagatedViewIdentity;
34
- 'view-target-changed': TargetChangedEvent<Topic, Type> & PropagatedViewIdentity;
35
- }
36
- export declare type ViewEvents = {
37
- [Type in keyof ViewEventMapping]: ViewEventMapping<'view', Type>[Type];
38
- };
39
- export declare type PropagatedViewEvents<Topic> = {
40
- [Type in keyof PropagatedViewEventMapping]: PropagatedViewEventMapping<Topic, Type>[Type];
41
- };
42
- export interface InputEvent {
43
- inputType: 'keyUp' | 'keyDown';
44
- ctrlKey: boolean;
45
- shiftKey: boolean;
46
- altKey: boolean;
47
- metaKey: boolean;
48
- key: string;
49
- code: string;
50
- repeat: boolean;
51
- command?: string;
52
- }
53
- export interface TargetChangedEvent<Topic, Type> extends WindowEvent<Topic, Type> {
2
+ import { NonPropagatedWebContentsEvent, WillPropagateWebContentsEvent } from './webcontents';
3
+ import { NamedEvent, PropagatedEvent } from './base';
4
+ export declare type TargetChangedEvent = NamedEvent & {
5
+ type: 'target-changed';
54
6
  previousTarget: OpenFin.Identity;
55
7
  target: OpenFin.Identity;
56
- }
57
- export {};
8
+ };
9
+ /**
10
+ * A View event that does not propagate to (republish on) parent topics.
11
+ */
12
+ export declare type NonPropagatedViewEvent = NonPropagatedWebContentsEvent;
13
+ export declare type AttachedEvent = NamedEvent & {
14
+ type: 'attached';
15
+ };
16
+ export declare type CreatedEvent = NamedEvent & {
17
+ type: 'created';
18
+ };
19
+ export declare type DestroyedEvent = NamedEvent & {
20
+ type: 'destroyed';
21
+ };
22
+ export declare type HiddenEvent = NamedEvent & {
23
+ type: 'hidden';
24
+ };
25
+ export declare type HotkeyEvent = NamedEvent & {
26
+ type: 'hotkey';
27
+ };
28
+ export declare type ShownEvent = NamedEvent & {
29
+ type: 'shown';
30
+ };
31
+ /**
32
+ * A View event that does propagate to (republish on) parent topics.
33
+ */
34
+ export declare type WillPropagateViewEvent = WillPropagateWebContentsEvent | AttachedEvent | CreatedEvent | DestroyedEvent | HiddenEvent | HotkeyEvent | ShownEvent | TargetChangedEvent;
35
+ export declare type ViewEvent = {
36
+ topic: 'view';
37
+ } & (NonPropagatedViewEvent | WillPropagateViewEvent);
38
+ export declare type ViewEventType = ViewEvent['type'];
39
+ export declare type PropagatedViewEvent = PropagatedEvent<'view', WillPropagateViewEvent>;
40
+ export declare type PropagatedViewEventType = PropagatedViewEvent['type'];
@@ -1,14 +1,15 @@
1
1
  import type * as OpenFin from '../../OpenFin';
2
- import { BaseEventMap, WindowEvent } from './base';
2
+ import { NamedEvent } from './base';
3
3
  import { CrashedEvent } from './application';
4
- import { WindowNavigationRejectedEvent } from './window';
5
- export interface WindowResourceLoadFailedEvent<Topic, Type> extends WindowEvent<Topic, Type> {
4
+ export declare type ResourceLoadFailedEvent = NamedEvent & {
5
+ type: 'resource-load-failed';
6
6
  errorCode: number;
7
7
  errorDescription: string;
8
8
  validatedURL: string;
9
9
  isMainFrame: boolean;
10
- }
11
- export interface WindowResourceResponseReceivedEvent<Topic, Type> extends WindowEvent<Topic, Type> {
10
+ };
11
+ export declare type ResourceResponseReceivedEvent = NamedEvent & {
12
+ type: 'response-received';
12
13
  status: boolean;
13
14
  newUrl: string;
14
15
  originalUrl: string;
@@ -17,33 +18,58 @@ export interface WindowResourceResponseReceivedEvent<Topic, Type> extends Window
17
18
  referrer: string;
18
19
  headers: any;
19
20
  resourceType: 'mainFrame' | 'subFrame' | 'styleSheet' | 'script' | 'image' | 'object' | 'xhr' | 'other';
20
- }
21
- export interface PageTitleUpdatedEvent<Topic, Type> extends WindowEvent<Topic, Type> {
21
+ };
22
+ export declare type PageTitleUpdatedEvent = NamedEvent & {
23
+ type: 'page-title-updated';
22
24
  title: string;
23
- }
24
- export interface CertificateErrorEvent<Topic, Type> extends WindowEvent<Topic, Type> {
25
+ };
26
+ export declare type CertificateErrorEvent = NamedEvent & {
27
+ type: 'certificate-error';
25
28
  error: string;
26
29
  url: string;
27
30
  certificate: OpenFin.Certificate;
28
- }
29
- export interface CertificateSelectionShownEvent<Topic, Type> extends WindowEvent<Topic, Type> {
31
+ };
32
+ export declare type CertificateSelectionShownEvent = NamedEvent & {
33
+ type: 'certificate-selection-shown';
30
34
  url: string;
31
35
  certificates: OpenFin.Certificate[];
32
- }
33
- export interface FaviconUpdatedEvent<Topic, Type> extends WindowEvent<Topic, Type> {
36
+ };
37
+ export declare type FaviconUpdatedEvent = NamedEvent & {
38
+ type: 'page-favicon-updated';
34
39
  favicons: string[];
35
- }
36
- export interface WebContentsEventMapping<Topic = string, Type = string> extends BaseEventMap {
37
- 'blurred': WindowEvent<Topic, Type>;
38
- 'certificate-error': CertificateErrorEvent<Topic, Type>;
39
- 'certificate-selection-shown': CertificateSelectionShownEvent<Topic, Type>;
40
- 'crashed': CrashedEvent & WindowEvent<Topic, Type>;
41
- 'did-change-theme-color': WindowEvent<Topic, Type>;
42
- 'focused': WindowEvent<Topic, Type>;
43
- 'found-in-page': WindowEvent<Topic, Type>;
44
- 'navigation-rejected': WindowNavigationRejectedEvent<Topic, Type>;
45
- 'page-favicon-updated': FaviconUpdatedEvent<Topic, Type>;
46
- 'page-title-updated': PageTitleUpdatedEvent<Topic, Type>;
47
- 'resource-load-failed': WindowResourceLoadFailedEvent<Topic, Type>;
48
- 'resource-response-received': WindowResourceResponseReceivedEvent<Topic, Type>;
49
- }
40
+ };
41
+ export declare type NavigationRejectedEvent = NamedEvent & {
42
+ type: 'navigation-rejected';
43
+ sourceName?: string;
44
+ url: string;
45
+ };
46
+ export declare type FoundInPageEvent = NamedEvent & {
47
+ type: 'found-in-page';
48
+ };
49
+ /**
50
+ * A WebContents event that does not propagate to (republish on) parent topics.
51
+ */
52
+ export declare type NonPropagatedWebContentsEvent = FoundInPageEvent | CertificateErrorEvent;
53
+ export declare type BlurredEvent = NamedEvent & {
54
+ type: 'blurred';
55
+ };
56
+ export declare type DidChangeThemeColorEvent = NamedEvent & {
57
+ type: 'did-change-theme-color';
58
+ };
59
+ export declare type FocusedEvent = NamedEvent & {
60
+ type: 'focused';
61
+ };
62
+ export declare type ChildContentBlockedEvent = NamedEvent & {
63
+ type: 'child-content-blocked';
64
+ };
65
+ export declare type ChildContentOpenedInBrowserEvent = NamedEvent & {
66
+ type: 'child-content-opened-in-browser';
67
+ };
68
+ export declare type ChildViewCreatedEvent = NamedEvent & {
69
+ type: 'child-view-created';
70
+ };
71
+ /**
72
+ * A WebContents event that does propagate to (republish on) parent topics.
73
+ */
74
+ export declare type WillPropagateWebContentsEvent = BlurredEvent | CertificateSelectionShownEvent | CrashedEvent | DidChangeThemeColorEvent | FocusedEvent | NavigationRejectedEvent | FaviconUpdatedEvent | PageTitleUpdatedEvent | ResourceLoadFailedEvent | ResourceResponseReceivedEvent | ChildContentBlockedEvent | ChildContentOpenedInBrowserEvent | ChildViewCreatedEvent;
75
+ export declare type WebContentsEvent = NonPropagatedWebContentsEvent | WillPropagateWebContentsEvent;
@@ -1,13 +1,14 @@
1
1
  import type * as OpenFin from '../../OpenFin';
2
- import { CrashedEvent } from './application';
3
- import { BaseEventMap, WindowEvent } from './base';
4
- import { CertificateSelectionShownEvent, WebContentsEventMapping, WindowResourceLoadFailedEvent, WindowResourceResponseReceivedEvent } from './webcontents';
5
- import { InputEvent, PropagatedViewEventMapping } from './view';
6
- export interface WindowAlertRequestedEvent<Topic, Type> extends WindowEvent<Topic, Type> {
2
+ import { NamedEvent, PropagatedEvent } from './base';
3
+ import { PropagatedViewEvent } from './view';
4
+ import { NonPropagatedWebContentsEvent, WillPropagateWebContentsEvent } from './webcontents';
5
+ export declare type AlertRequestedEvent = NamedEvent & {
6
+ type: 'alert-requested';
7
7
  message: string;
8
8
  url: string;
9
- }
10
- export interface WindowAuthRequestedEvent<Topic, Type> extends WindowEvent<Topic, Type> {
9
+ };
10
+ export declare type AuthRequestedEvent = NamedEvent & {
11
+ type: 'auth-requested';
11
12
  authInfo: {
12
13
  host: string;
13
14
  isProxy: boolean;
@@ -15,165 +16,177 @@ export interface WindowAuthRequestedEvent<Topic, Type> extends WindowEvent<Topic
15
16
  realm: string;
16
17
  scheme: string;
17
18
  };
18
- }
19
- export interface WindowEndLoadEvent<Topic, Type> extends WindowEvent<Topic, Type> {
19
+ };
20
+ export declare type EndLoadEvent = NamedEvent & {
21
+ type: 'end-load';
20
22
  documentName: string;
21
23
  isMain: boolean;
22
- }
23
- export interface WindowNavigationRejectedEvent<Topic, Type> extends WindowEvent<Topic, Type> {
24
- sourceName?: string;
25
- url: string;
26
- }
27
- export interface WillRedirectEvent<Topic, Type> extends WindowEvent<Topic, Type> {
24
+ };
25
+ export declare type WillRedirectEvent = NamedEvent & {
26
+ type: 'will-redirect';
28
27
  blocked: boolean;
29
28
  isInPlace: boolean;
30
29
  url: string;
31
- }
32
- export interface WindowReloadedEvent<Topic, Type> extends WindowEvent<Topic, Type> {
30
+ };
31
+ export declare type ReloadedEvent = NamedEvent & {
32
+ type: 'reloaded';
33
33
  url: string;
34
- }
35
- export interface WindowOptionsChangedEvent<Topic, Type> extends WindowEvent<Topic, Type> {
34
+ };
35
+ export declare type WindowOptionsChangedEvent = NamedEvent & {
36
+ type: 'options-changed';
36
37
  options: OpenFin.WindowOptions;
37
38
  diff: OpenFin.WindowOptionDiff;
38
- }
39
- export interface WindowExternalProcessExitedEvent<Topic, Type> extends WindowEvent<Topic, Type> {
39
+ };
40
+ export declare type ExternalProcessExitedEvent = NamedEvent & {
41
+ type: 'external-process-exited';
40
42
  processUuid: string;
41
43
  exitCode: number;
42
- }
43
- export interface WindowExternalProcessStartedEvent<Topic, Type> extends WindowEvent<Topic, Type> {
44
+ };
45
+ export declare type ExternalProcessStartedEvent = NamedEvent & {
46
+ type: 'external-process-started';
44
47
  processUuid: string;
45
- }
46
- export interface WindowHiddenEvent<Topic, Type> extends WindowEvent<Topic, Type> {
48
+ };
49
+ export declare type HiddenEvent = NamedEvent & {
50
+ type: 'hidden';
47
51
  reason: 'closing' | 'hide' | 'hide-on-close';
48
- }
49
- export interface PreloadScriptInfoRunning {
52
+ };
53
+ export declare type PreloadScriptInfoRunning = {
50
54
  state: 'load-started' | 'load-failed' | 'load-succeeded' | 'failed' | 'succeeded';
51
- }
52
- export interface PreloadScriptInfo {
55
+ };
56
+ export declare type PreloadScriptInfo = {
53
57
  state: 'load-failed' | 'failed' | 'succeeded';
54
- }
55
- export interface WindowPreloadScriptsStateChangeEvent<Topic, Type> extends WindowEvent<Topic, Type> {
56
- preloadScripts: (PreloadScriptInfoRunning & any)[];
57
- }
58
- export interface WindowPreloadScriptsStateChangedEvent<Topic, Type> extends WindowEvent<Topic, Type> {
58
+ };
59
+ export declare type PreloadScriptsStateChangeEvent = NamedEvent & {
59
60
  preloadScripts: (PreloadScriptInfoRunning & any)[];
60
- }
61
- export interface WindowBeginBoundsChangingEvent<Topic, Type> extends WindowEvent<Topic, Type> {
62
- height: number;
63
- left: number;
64
- top: number;
65
- width: number;
66
- windowState: 'minimized' | 'normal' | 'maximized';
67
- }
68
- export interface WindowEndBoundsChangingEvent<Topic, Type> extends WindowEvent<Topic, Type> {
61
+ };
62
+ export declare type UserBoundsChangeEvent = NamedEvent & {
69
63
  height: number;
70
64
  left: number;
71
65
  top: number;
72
66
  width: number;
73
67
  windowState: 'minimized' | 'normal' | 'maximized';
74
- }
75
- export interface WindowBoundsChange<Topic, Type> extends WindowEvent<Topic, Type> {
68
+ };
69
+ export declare type BoundsChangeEvent = NamedEvent & {
76
70
  changeType: 0 | 1 | 2;
77
71
  deferred: boolean;
78
72
  height: number;
79
73
  left: number;
80
74
  top: number;
81
75
  width: number;
82
- }
83
- export interface WillMoveOrResize<Topic, Type> extends WindowEvent<Topic, Type> {
76
+ };
77
+ export declare type WillMoveOrResizeEvent = NamedEvent & {
84
78
  height: number;
85
79
  left: number;
86
80
  top: number;
87
81
  width: number;
88
82
  monitorScaleFactor: number;
89
- }
90
- export declare type WindowPerformanceReport<Topic, Type> = Performance & WindowEvent<Topic, Type>;
91
- export interface ViewDetached<Topic, Type> extends WindowEvent<Topic, Type> {
83
+ };
84
+ export declare type PerformanceReportEvent = Performance & NamedEvent & {
85
+ type: 'performance-report';
86
+ };
87
+ export declare type ViewDetachedEvent = NamedEvent & {
88
+ type: 'view-detached';
92
89
  previousTarget: OpenFin.Identity;
93
90
  target: OpenFin.Identity;
94
91
  viewIdentity: OpenFin.Identity;
95
- }
96
- export interface WindowEventMapping<Topic = string, Type = string> extends WebContentsEventMapping {
97
- 'auth-requested': WindowAuthRequestedEvent<Topic, Type>;
98
- 'begin-user-bounds-changing': WindowBeginBoundsChangingEvent<Topic, Type>;
99
- 'bounds-changed': WindowBoundsChange<Topic, Type>;
100
- 'bounds-changing': WindowBoundsChange<Topic, Type>;
101
- 'close-requested': WindowEvent<Topic, Type>;
102
- 'closed': WindowEvent<Topic, Type>;
103
- 'closing': WindowEvent<Topic, Type>;
104
- 'disabled-movement-bounds-changed': WindowBoundsChange<Topic, Type>;
105
- 'disabled-movement-bounds-changing': WindowBoundsChange<Topic, Type>;
106
- 'embedded': WindowEvent<Topic, Type>;
107
- 'end-user-bounds-changing': WindowEndBoundsChangingEvent<Topic, Type>;
108
- 'external-process-exited': WindowExternalProcessExitedEvent<Topic, Type>;
109
- 'external-process-started': WindowExternalProcessStartedEvent<Topic, Type>;
110
- 'hidden': WindowHiddenEvent<Topic, Type>;
111
- 'hotkey': InputEvent & WindowEvent<Topic, Type>;
112
- 'initialized': WindowEvent<Topic, Type>;
113
- 'layout-initialized': WindowEvent<Topic, Type>;
114
- 'layout-ready': WindowEvent<Topic, Type>;
115
- 'maximized': WindowEvent<Topic, Type>;
116
- 'minimized': WindowEvent<Topic, Type>;
117
- 'options-changed': WindowOptionsChangedEvent<Topic, Type>;
118
- 'performance-report': WindowPerformanceReport<Topic, Type>;
119
- 'preload-scripts-state-changed': WindowPreloadScriptsStateChangeEvent<Topic, Type>;
120
- 'preload-scripts-state-changing': WindowPreloadScriptsStateChangeEvent<Topic, Type>;
121
- 'reloaded': WindowReloadedEvent<Topic, Type>;
122
- 'restored': WindowEvent<Topic, Type>;
123
- 'show-requested': WindowEvent<Topic, Type>;
124
- 'shown': WindowEvent<Topic, Type>;
125
- 'user-movement-disabled': WindowEvent<Topic, Type>;
126
- 'user-movement-enabled': WindowEvent<Topic, Type>;
127
- 'view-attached': WindowEvent<Topic, Type>;
128
- 'view-detached': ViewDetached<Topic, Type>;
129
- 'will-move': WillMoveOrResize<Topic, Type>;
130
- 'will-redirect': WillRedirectEvent<Topic, Type>;
131
- 'will-resize': WillMoveOrResize<Topic, Type>;
132
- }
133
- export interface PropagatedWindowEventMapping<Topic = string, Type = string> extends BaseEventMap {
134
- 'window-begin-user-bounds-changing': WindowBeginBoundsChangingEvent<Topic, Type>;
135
- 'window-blurred': WindowEvent<Topic, Type>;
136
- 'window-bounds-changed': WindowBoundsChange<Topic, Type>;
137
- 'window-bounds-changing': WindowBoundsChange<Topic, Type>;
138
- 'window-certificate-selection-shown': CertificateSelectionShownEvent<Topic, Type>;
139
- 'window-closed': WindowEvent<Topic, Type>;
140
- 'window-closing': WindowEvent<Topic, Type>;
141
- 'window-crashed': CrashedEvent & WindowEvent<Topic, Type>;
142
- 'window-disabled-movement-bounds-changed': WindowBoundsChange<Topic, Type>;
143
- 'window-disabled-movement-bounds-changing': WindowBoundsChange<Topic, Type>;
144
- 'window-embedded': WindowEvent<Topic, Type>;
145
- 'window-end-user-bounds-changing': WindowBeginBoundsChangingEvent<Topic, Type>;
146
- 'window-external-process-exited': WindowExternalProcessExitedEvent<Topic, Type>;
147
- 'window-external-process-started': WindowExternalProcessStartedEvent<Topic, Type>;
148
- 'window-focused': WindowEvent<Topic, Type>;
149
- 'window-hidden': WindowHiddenEvent<Topic, Type>;
150
- 'window-hotkey': InputEvent & WindowEvent<Topic, Type>;
151
- 'window-initialized': WindowEvent<Topic, Type>;
152
- 'window-layout-initialized': WindowEvent<Topic, Type>;
153
- 'window-layout-ready': WindowEvent<Topic, Type>;
154
- 'window-maximized': WindowEvent<Topic, Type>;
155
- 'window-minimized': WindowEvent<Topic, Type>;
156
- 'window-navigation-rejected': WindowNavigationRejectedEvent<Topic, Type>;
157
- 'window-options-changed': WindowOptionsChangedEvent<Topic, Type>;
158
- 'window-performance-report': WindowPerformanceReport<Topic, Type>;
159
- 'window-preload-scripts-state-changed': WindowPreloadScriptsStateChangeEvent<Topic, Type>;
160
- 'window-preload-scripts-state-changing': WindowPreloadScriptsStateChangedEvent<Topic, Type>;
161
- 'window-resource-load-failed': WindowResourceLoadFailedEvent<Topic, Type>;
162
- 'window-resource-response-received': WindowResourceResponseReceivedEvent<Topic, Type>;
163
- 'window-reloaded': WindowReloadedEvent<Topic, Type>;
164
- 'window-restored': WindowEvent<Topic, Type>;
165
- 'window-shown': WindowEvent<Topic, Type>;
166
- 'window-user-movement-disabled': WindowEvent<Topic, Type>;
167
- 'window-user-movement-enabled': WindowEvent<Topic, Type>;
168
- 'window-view-attached': WindowEvent<Topic, Type>;
169
- 'window-view-detached': ViewDetached<Topic, Type>;
170
- 'window-will-move': WillMoveOrResize<Topic, Type>;
171
- 'window-will-redirect': WillRedirectEvent<Topic, Type>;
172
- 'window-will-resize': WillMoveOrResize<Topic, Type>;
173
- }
174
- export declare type WindowEvents = PropagatedViewEventMapping<'window'> & {
175
- [Type in keyof WindowEventMapping]: WindowEventMapping<'window', Type>[Type];
176
- };
177
- export declare type PropagatedWindowEvents<Topic> = {
178
- [Type in keyof PropagatedWindowEventMapping]: PropagatedWindowEventMapping<Topic, Type>[Type];
179
92
  };
93
+ export declare type InputEvent = {
94
+ inputType: 'keyUp' | 'keyDown';
95
+ ctrlKey: boolean;
96
+ shiftKey: boolean;
97
+ altKey: boolean;
98
+ metaKey: boolean;
99
+ key: string;
100
+ code: string;
101
+ repeat: boolean;
102
+ command?: string;
103
+ };
104
+ /**
105
+ * A Window event that does not propagate to (republish on) parent topics.
106
+ */
107
+ export declare type NonPropagatedWindowEvent = NonPropagatedWebContentsEvent;
108
+ export declare type BeginUserBoundsChangingEvent = UserBoundsChangeEvent & {
109
+ type: 'begin-user-bounds-changing';
110
+ };
111
+ export declare type BoundsChangedEvent = BoundsChangeEvent & {
112
+ type: 'bounds-changed';
113
+ };
114
+ export declare type BoundsChangingEvent = BoundsChangeEvent & {
115
+ type: 'bounds-changing';
116
+ };
117
+ export declare type WindowCloseRequestedEvent = NamedEvent & {
118
+ type: 'close-requested';
119
+ };
120
+ export declare type WindowClosedEvent = NamedEvent & {
121
+ type: 'closed';
122
+ };
123
+ export declare type WindowClosingEvent = NamedEvent & {
124
+ type: 'closing';
125
+ };
126
+ export declare type DisabledMovementBoundsChangedEvent = BoundsChangeEvent & {
127
+ type: 'disabled-movement-bounds-changed';
128
+ };
129
+ export declare type DisabledMovementBoundsChangingEvent = BoundsChangeEvent & {
130
+ type: 'disabled-movement-bounds-changing';
131
+ };
132
+ export declare type EmbeddedEvent = NamedEvent & {
133
+ type: 'embedded';
134
+ };
135
+ export declare type EndUserBoundsChangingEvent = UserBoundsChangeEvent & {
136
+ type: 'end-user-bounds-changing';
137
+ };
138
+ export declare type WindowHotkeyEvent = InputEvent & NamedEvent & {
139
+ type: 'hotkey';
140
+ };
141
+ export declare type WindowInitializedEvent = NamedEvent & {
142
+ type: 'initialized';
143
+ };
144
+ export declare type LayoutInitializedEvent = NamedEvent & {
145
+ type: 'layout-initialized';
146
+ };
147
+ export declare type LayoutReadyEvent = NamedEvent & {
148
+ type: 'layout-ready';
149
+ };
150
+ export declare type MaximizedEvent = NamedEvent & {
151
+ type: 'maximized';
152
+ };
153
+ export declare type MinimizedEvent = NamedEvent & {
154
+ type: 'minimized';
155
+ };
156
+ export declare type PreloadScriptsStateChangedEvent = PreloadScriptsStateChangeEvent & {
157
+ type: 'preload-script-state-changed';
158
+ };
159
+ export declare type PreloadScriptsStateChangingEvent = PreloadScriptsStateChangeEvent & {
160
+ type: 'preload-script-state-changing';
161
+ };
162
+ export declare type WindowRestoredEvent = NamedEvent & {
163
+ type: 'restored';
164
+ };
165
+ export declare type WindowShowRequestedEvent = NamedEvent & {
166
+ type: 'show-requested';
167
+ };
168
+ export declare type WindowShownEvent = NamedEvent & {
169
+ type: 'shown';
170
+ };
171
+ export declare type UserMovementEnabledEvent = NamedEvent & {
172
+ type: 'user-movement-enabled';
173
+ };
174
+ export declare type UserMovementDisabledEvent = NamedEvent & {
175
+ type: 'user-movement-disabled';
176
+ };
177
+ export declare type WillMoveEvent = WillMoveOrResizeEvent & {
178
+ type: 'will-move';
179
+ };
180
+ export declare type WillResizeEvent = WillMoveOrResizeEvent & {
181
+ type: 'will-resize';
182
+ };
183
+ /**
184
+ * A Window event that does propagate to (republish on) parent topics.
185
+ */
186
+ export declare type WillPropagateWindowEvent = WillPropagateWebContentsEvent | PropagatedViewEvent | 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;
187
+ export declare type WindowEvent = {
188
+ topic: 'window';
189
+ } & (WillPropagateWindowEvent | NonPropagatedWindowEvent);
190
+ export declare type WindowEventType = WindowEvent['type'];
191
+ export declare type PropagatedWindowEvent = PropagatedEvent<'window', WillPropagateWindowEvent>;
192
+ export declare type PropagatedWindowEventType = PropagatedWindowEvent['type'];
@@ -13,7 +13,7 @@ import Transport from '../../transport/transport';
13
13
  * @class
14
14
  * @hideconstructor
15
15
  */
16
- export declare class ExternalApplication extends EmitterBase<OpenFin.ExternalApplicationEvents> {
16
+ export declare class ExternalApplication extends EmitterBase<OpenFin.ExternalApplicationEvent> {
17
17
  identity: OpenFin.ApplicationIdentity;
18
18
  constructor(wire: Transport, identity: OpenFin.ApplicationIdentity);
19
19
  /**
@@ -1,7 +1,7 @@
1
1
  import type * as OpenFin from '../../OpenFin';
2
2
  import { EmitterBase } from '../base';
3
3
  import Transport from '../../transport/transport';
4
- declare type FrameEvents = OpenFin.FrameEvents;
4
+ declare type FrameEvents = OpenFin.FrameEvent;
5
5
  /**
6
6
  * @classdesc
7
7
  * An iframe represents an embedded HTML page within a parent HTML page. Because this embedded page
@@ -1,12 +1,11 @@
1
1
  import type * as OpenFin from '../../OpenFin';
2
2
  import { EmitterBase } from '../base';
3
3
  import Transport from '../../transport/transport';
4
- declare type GlobalHotkeyEvents = OpenFin.GlobalHotkeyEvents;
5
4
  /**
6
5
  * The GlobalHotkey module can register/unregister a global hotkeys.
7
6
  * @namespace
8
7
  */
9
- export default class GlobalHotkey extends EmitterBase<GlobalHotkeyEvents> {
8
+ export default class GlobalHotkey extends EmitterBase<OpenFin.GlobalHotkeyEvent> {
10
9
  constructor(wire: Transport);
11
10
  /**
12
11
  * Registers a global hotkey with the operating system.
@@ -37,4 +36,3 @@ export default class GlobalHotkey extends EmitterBase<GlobalHotkeyEvents> {
37
36
  */
38
37
  isRegistered(hotkey: string): Promise<boolean>;
39
38
  }
40
- export {};
@@ -17,6 +17,8 @@ class GlobalHotkey extends base_1.EmitterBase {
17
17
  * @tutorial GlobalHotkey.register
18
18
  */
19
19
  async register(hotkey, listener) {
20
+ // TODO: fix typing (hotkey events are not typed)
21
+ // @ts-expect-error
20
22
  await this.on(hotkey, listener);
21
23
  await this.wire.sendAction('global-hotkey-register', { hotkey });
22
24
  return undefined;
@@ -28,6 +30,8 @@ class GlobalHotkey extends base_1.EmitterBase {
28
30
  * @tutorial GlobalHotkey.unregister
29
31
  */
30
32
  async unregister(hotkey) {
33
+ // TODO: fix typing (hotkey events are not typed)
34
+ // @ts-expect-error
31
35
  await this.removeAllListeners(hotkey);
32
36
  await this.wire.sendAction('global-hotkey-unregister', { hotkey });
33
37
  return undefined;
@@ -40,6 +44,8 @@ class GlobalHotkey extends base_1.EmitterBase {
40
44
  async unregisterAll() {
41
45
  await Promise.all(this.eventNames()
42
46
  .filter((name) => !(name === 'registered' || name === 'unregistered'))
47
+ // TODO: fix typing (hotkey events are not typed)
48
+ // @ts-expect-error
43
49
  .map((name) => this.removeAllListeners(name)));
44
50
  await this.wire.sendAction('global-hotkey-unregister-all', {});
45
51
  return undefined;
@@ -3,7 +3,7 @@ import ChannelClient from './client';
3
3
  import { ChannelProvider } from './provider';
4
4
  import { EmitterBase } from '../../base';
5
5
  import Transport, { Message } from '../../../transport/transport';
6
- import { ChannelEvents } from '../../events/channel';
6
+ import { ChannelEvent } from '../../events/channel';
7
7
  declare type ProviderIdentity = OpenFin.ProviderIdentity;
8
8
  declare type Identity = OpenFin.Identity;
9
9
  export interface ChannelMessage extends Message<any> {
@@ -12,7 +12,7 @@ export interface ChannelMessage extends Message<any> {
12
12
  providerIdentity: ProviderIdentity;
13
13
  connectAction: boolean;
14
14
  }
15
- export declare class Channel extends EmitterBase<ChannelEvents> {
15
+ export declare class Channel extends EmitterBase<ChannelEvent> {
16
16
  #private;
17
17
  constructor(wire: Transport);
18
18
  getAllChannels(): Promise<ProviderIdentity[]>;
@@ -120,6 +120,8 @@ class Channel extends base_1.EmitterBase {
120
120
  }
121
121
  const { payload: { data: providerIdentity } } = await this.wire.sendAction('create-channel', { channelName });
122
122
  const channel = __classPrivateFieldGet(this, _Channel_connectionManager, "f").createProvider(options, providerIdentity);
123
+ // TODO: fix typing (internal)
124
+ // @ts-expect-error
123
125
  this.on('client-disconnected', (eventPayload) => {
124
126
  if (eventPayload.channelName === channelName) {
125
127
  provider_1.ChannelProvider.handleClientDisconnection(channel, eventPayload);
@@ -416,7 +416,7 @@ export declare class InteropBroker extends Base {
416
416
  * FDC3 2.0: Use the endpointId in the ClientInfo as the instanceId when generating
417
417
  * an AppIdentifier.
418
418
  * @return { Promise<Array<ClientInfo>> }
419
- * @tutorial interop.getAllClientInfo()
419
+ * @tutorial interop.getAllClientInfo
420
420
  */
421
421
  getAllClientInfo(): Promise<Array<OpenFin.ClientInfo>>;
422
422
  decorateSnapshot(snapshot: OpenFin.Snapshot): OpenFin.Snapshot;
@@ -746,7 +746,7 @@ class InteropBroker extends base_1.Base {
746
746
  * FDC3 2.0: Use the endpointId in the ClientInfo as the instanceId when generating
747
747
  * an AppIdentifier.
748
748
  * @return { Promise<Array<ClientInfo>> }
749
- * @tutorial interop.getAllClientInfo()
749
+ * @tutorial interop.getAllClientInfo
750
750
  */
751
751
  async getAllClientInfo() {
752
752
  const provider = await this.getProvider();