@openfin/core 31.74.10 → 31.74.14

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.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@openfin/core",
3
- "version": "31.74.10",
3
+ "version": "31.74.14",
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
@@ -2199,6 +2199,22 @@ export type FindInPageOptions = {
2199
2199
  */
2200
2200
  medialCapitalAsWordStart?: boolean;
2201
2201
  };
2202
+ export type FindInPageResult = {
2203
+ requestId: number;
2204
+ /**
2205
+ * Position of the active match.
2206
+ */
2207
+ activeMatchOrdinal: number;
2208
+ /**
2209
+ * Number of Matches.
2210
+ */
2211
+ matches: number;
2212
+ /**
2213
+ * Coordinates of first match region.
2214
+ */
2215
+ selectionArea: Rectangle;
2216
+ finalUpdate: boolean;
2217
+ };
2202
2218
  export type FrameInfo = {
2203
2219
  name: string;
2204
2220
  uuid: string;
@@ -204,7 +204,7 @@ class ApplicationModule extends base_1.Base {
204
204
  });
205
205
  const app = await this._createFromManifest(manifestUrl);
206
206
  // eslint-disable-next-line @typescript-eslint/ban-ts-comment
207
- // @ts-ignore using private method without warning.
207
+ // @ts-expect-error using private method without warning.
208
208
  await app._run(opts); // eslint-disable-line no-underscore-dangle
209
209
  return app;
210
210
  }
@@ -1,4 +1,3 @@
1
- import type * as OpenFin from '../../OpenFin';
2
1
  /**
3
2
  * Modifies an event key to reflect propagation by prefixing with the topic.
4
3
  */
@@ -13,8 +12,6 @@ export type PropagatedEvent<Topic extends string, Event extends {
13
12
  type: string;
14
13
  } ? Omit<E, 'type'> & {
15
14
  type: PropagatedEventType<Topic, E['type']>;
16
- } & {
17
- [topic in `${Topic}Identity`]: OpenFin.Identity;
18
15
  } : never;
19
16
  /**
20
17
  * Handler for an event on an EventEmitter; selects the correct type for the event
@@ -1,15 +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
+ export type BaseViewEvent = {
5
+ target: OpenFin.Identity;
6
+ viewIdentity: OpenFin.Identity;
7
+ };
4
8
  export type TargetChangedEvent = NamedEvent & {
5
9
  type: 'target-changed';
6
10
  previousTarget: OpenFin.Identity;
7
- target: OpenFin.Identity;
8
11
  };
9
12
  /**
10
13
  * A View event that does not propagate to (republish on) parent topics.
11
14
  */
12
- export type NonPropagatedViewEvent = NonPropagatedWebContentsEvent;
15
+ export type NonPropagatedViewEvent = BaseViewEvent & NonPropagatedWebContentsEvent;
13
16
  export type AttachedEvent = NamedEvent & {
14
17
  type: 'attached';
15
18
  };
@@ -31,7 +34,7 @@ export type ShownEvent = NamedEvent & {
31
34
  /**
32
35
  * A View event that does propagate to (republish on) parent topics.
33
36
  */
34
- export type WillPropagateViewEvent = WillPropagateWebContentsEvent | AttachedEvent | CreatedEvent | DestroyedEvent | HiddenEvent | HotkeyEvent | ShownEvent | TargetChangedEvent;
37
+ export type WillPropagateViewEvent = BaseViewEvent & (WillPropagateWebContentsEvent | AttachedEvent | CreatedEvent | DestroyedEvent | HiddenEvent | HotkeyEvent | ShownEvent | TargetChangedEvent);
35
38
  export type ViewEvent = {
36
39
  topic: 'view';
37
40
  } & (NonPropagatedViewEvent | WillPropagateViewEvent);
@@ -64,6 +64,8 @@ export type DidFailLoadEvent = BaseLoadFailedEvent & {
64
64
  };
65
65
  export type FoundInPageEvent = NamedEvent & {
66
66
  type: 'found-in-page';
67
+ } & {
68
+ result: OpenFin.FindInPageResult;
67
69
  };
68
70
  /**
69
71
  * A WebContents event that does not propagate to (republish on) parent topics.
@@ -1,6 +1,6 @@
1
1
  import type * as OpenFin from '../../OpenFin';
2
2
  import { NamedEvent, PropagatedEvent } from './base';
3
- import { PropagatedViewEvent } from './view';
3
+ import { BaseViewEvent, PropagatedViewEvent, AttachedEvent as ViewAttachedEvent } from './view';
4
4
  import { NonPropagatedWebContentsEvent, WillPropagateWebContentsEvent } from './webcontents';
5
5
  export type AlertRequestedEvent = NamedEvent & {
6
6
  type: 'alert-requested';
@@ -84,11 +84,9 @@ export type WillMoveOrResizeEvent = NamedEvent & {
84
84
  export type PerformanceReportEvent = Performance & NamedEvent & {
85
85
  type: 'performance-report';
86
86
  };
87
- export type ViewDetachedEvent = NamedEvent & {
87
+ export type ViewDetachedEvent = NamedEvent & BaseViewEvent & {
88
88
  type: 'view-detached';
89
89
  previousTarget: OpenFin.Identity;
90
- target: OpenFin.Identity;
91
- viewIdentity: OpenFin.Identity;
92
90
  };
93
91
  export type InputEvent = {
94
92
  inputType: 'keyUp' | 'keyDown';
@@ -101,6 +99,18 @@ export type InputEvent = {
101
99
  repeat: boolean;
102
100
  command?: string;
103
101
  };
102
+ export type LayoutInitializedEvent = NamedEvent & {
103
+ type: 'layout-initialized';
104
+ ofViews: (OpenFin.Identity & {
105
+ entityType: 'view';
106
+ })[];
107
+ };
108
+ export type LayoutReadyEvent = NamedEvent & {
109
+ type: 'layout-ready';
110
+ views: (OpenFin.Identity & {
111
+ success: boolean;
112
+ })[];
113
+ };
104
114
  /**
105
115
  * A Window event that does not propagate to (republish on) parent topics.
106
116
  */
@@ -141,12 +151,6 @@ export type WindowHotkeyEvent = InputEvent & NamedEvent & {
141
151
  export type WindowInitializedEvent = NamedEvent & {
142
152
  type: 'initialized';
143
153
  };
144
- export type LayoutInitializedEvent = NamedEvent & {
145
- type: 'layout-initialized';
146
- };
147
- export type LayoutReadyEvent = NamedEvent & {
148
- type: 'layout-ready';
149
- };
150
154
  export type MaximizedEvent = NamedEvent & {
151
155
  type: 'maximized';
152
156
  };
@@ -180,13 +184,17 @@ export type WillMoveEvent = WillMoveOrResizeEvent & {
180
184
  export type WillResizeEvent = WillMoveOrResizeEvent & {
181
185
  type: 'will-resize';
182
186
  };
187
+ /**
188
+ * A propagated view event that is re-propagated from window.
189
+ */
190
+ export type PropagatedViewAttachedEvent = PropagatedEvent<'view', ViewAttachedEvent>;
183
191
  /**
184
192
  * A Window event that does propagate to (republish on) parent topics.
185
193
  */
186
- export 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;
194
+ 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;
187
195
  export type WindowEvent = {
188
196
  topic: 'window';
189
- } & (WillPropagateWindowEvent | NonPropagatedWindowEvent);
197
+ } & (WillPropagateWindowEvent | NonPropagatedWindowEvent | PropagatedViewEvent);
190
198
  export type WindowEventType = WindowEvent['type'];
191
- export type PropagatedWindowEvent = PropagatedEvent<'window', WillPropagateWindowEvent>;
199
+ export type PropagatedWindowEvent = PropagatedEvent<'window', Exclude<WillPropagateWindowEvent, WindowCloseRequestedEvent>>;
192
200
  export type PropagatedWindowEventType = PropagatedWindowEvent['type'];
@@ -1009,8 +1009,6 @@ class InteropBroker extends base_1.Base {
1009
1009
  });
1010
1010
  this.clientDisconnected(clientIdentity);
1011
1011
  });
1012
- // eslint-disable-next-line @typescript-eslint/ban-ts-comment
1013
- // @ts-ignore
1014
1012
  channel.beforeAction(async (action, payload, clientIdentity) => {
1015
1013
  var _a, _b;
1016
1014
  if (!(await this.isActionAuthorized(action, payload, clientIdentity))) {
@@ -77,7 +77,7 @@ class PlatformModule extends base_1.Base {
77
77
  const overrideCallback = options === null || options === void 0 ? void 0 : options.overrideCallback;
78
78
  const interopBroker = await this.fin.Interop.init(this.fin.me.uuid, options === null || options === void 0 ? void 0 : options.interopOverride);
79
79
  // eslint-disable-next-line @typescript-eslint/ban-ts-comment
80
- // @ts-ignore debugging purposes
80
+ // @ts-expect-error debugging purposes
81
81
  window.interopBroker = interopBroker;
82
82
  return this._initializer(overrideCallback, interopBroker);
83
83
  }
@@ -147,8 +147,7 @@ class PlatformModule extends base_1.Base {
147
147
  return new Promise(async (resolve, reject) => {
148
148
  try {
149
149
  const { uuid } = platformOptions;
150
- // eslint-disable-next-line @typescript-eslint/ban-ts-comment
151
- // @ts-ignore using private variable.
150
+ // @ts-expect-error using private variable.
152
151
  const app = await this.fin.Application._create({ ...platformOptions, isPlatformController: true });
153
152
  // TODO: fix typing (internal)
154
153
  // @ts-expect-error
@@ -179,13 +178,13 @@ class PlatformModule extends base_1.Base {
179
178
  return new Promise(async (resolve, reject) => {
180
179
  try {
181
180
  // eslint-disable-next-line @typescript-eslint/ban-ts-comment
182
- // @ts-ignore using private variable.
181
+ // @ts-expect-error using private variable.
183
182
  const app = await this.fin.Application._createFromManifest(manifestUrl);
184
183
  // TODO: fix typing (internal)
185
184
  // @ts-expect-error
186
185
  app.once('platform-api-ready', () => resolve(this.wrapSync({ uuid: app.identity.uuid })));
187
186
  // eslint-disable-next-line @typescript-eslint/ban-ts-comment
188
- // @ts-ignore using private method without warning.
187
+ // @ts-expect-error using private method without warning.
189
188
  app._run(opts);
190
189
  }
191
190
  catch (e) {
@@ -114,8 +114,7 @@ class LayoutModule extends base_1.Base {
114
114
  const splitterController = new splitter_controller_1.SplitterController(viewOverlay);
115
115
  const tabDragController = new tab_drag_controller_1.TabDragController(viewOverlay);
116
116
  __classPrivateFieldSet(this, _LayoutModule_layoutManager, new ManagerConstructor(splitterController, tabDragController), "f");
117
- // eslint-disable-next-line @typescript-eslint/ban-ts-comment
118
- // @ts-ignore - layout warning here for backwards compatibility, can remove layout check in .52
117
+ // @ts-expect-error - layout warning here for backwards compatibility, can remove layout check in .52
119
118
  let { layout, containerId } = options;
120
119
  if (layout) {
121
120
  console.warn(`We recommend using a layout in window options.