@openfin/node-adapter 36.80.8 → 36.80.10

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.
@@ -5310,7 +5310,7 @@ declare type Event_4 = (WebContentsEvents.Event<'view'> & {
5310
5310
  */
5311
5311
  declare type Event_5<Topic extends string> = {
5312
5312
  topic: Topic;
5313
- } & (BlurredEvent | CertificateSelectionShownEvent | CrashedEvent_2 | DidChangeThemeColorEvent | FocusedEvent | NavigationRejectedEvent | UrlChangedEvent | DidFailLoadEvent | DidFinishLoadEvent | PageFaviconUpdatedEvent | PageTitleUpdatedEvent | ResourceLoadFailedEvent | ResourceResponseReceivedEvent | ChildContentBlockedEvent | ChildContentOpenedInBrowserEvent | ChildViewCreatedEvent | ChildWindowCreatedEvent | FileDownloadStartedEvent | FileDownloadProgressEvent | FileDownloadCompletedEvent | FoundInPageEvent | CertificateErrorEvent);
5313
+ } & (BlurredEvent | CertificateSelectionShownEvent | CrashedEvent_2 | DidChangeThemeColorEvent | FocusedEvent | NavigationRejectedEvent | UrlChangedEvent | DidFailLoadEvent | DidFinishLoadEvent | PageFaviconUpdatedEvent | PageTitleUpdatedEvent | ResourceLoadFailedEvent | ResourceResponseReceivedEvent | ChildContentBlockedEvent | ChildContentOpenedInBrowserEvent | ChildViewCreatedEvent | ChildWindowCreatedEvent | FileDownloadStartedEvent | FileDownloadProgressEvent | FileDownloadCompletedEvent | FoundInPageEvent | CertificateErrorEvent | WillRedirectEvent);
5314
5314
 
5315
5315
  /**
5316
5316
  * [Union](https://www.typescriptlang.org/docs/handbook/2/everyday-types.html#union-types) containing every possible event that can be emitted by a {@link Window}. Events are
@@ -17363,7 +17363,8 @@ declare namespace WebContentsEvents {
17363
17363
  Event_5 as Event,
17364
17364
  WebContentsEvent,
17365
17365
  WillPropagateWebContentsEvent,
17366
- NonPropagatedWebContentsEvent
17366
+ NonPropagatedWebContentsEvent,
17367
+ WillRedirectEvent
17367
17368
  }
17368
17369
  }
17369
17370
 
@@ -17441,14 +17442,15 @@ declare type WillPropagateWebContentsEvent = Event_5<string>;
17441
17442
  declare type WillPropagateWindowEvent = WindowSourcedEvent;
17442
17443
 
17443
17444
  /**
17444
- * Generated when window is being redirected as per contentRedirect allowlist/denylist rules.
17445
+ * Generated whenever a redirection occurs.
17445
17446
  * @interface
17446
17447
  */
17447
- declare type WillRedirectEvent = BaseEvent_5 & {
17448
+ declare type WillRedirectEvent = NamedEvent & {
17448
17449
  type: 'will-redirect';
17449
17450
  blocked: boolean;
17450
17451
  isInPlace: boolean;
17451
17452
  url: string;
17453
+ isMainFrame: boolean;
17452
17454
  };
17453
17455
 
17454
17456
  /**
@@ -17470,7 +17472,7 @@ declare type WillResizeEvent = WillMoveOrResizeEvent & {
17470
17472
  */
17471
17473
  declare class _Window extends WebContents<OpenFin.WindowEvent> {
17472
17474
  /* Excluded from this release type: __constructor */
17473
- /* Excluded from this release type: createWindow */
17475
+ createWindow(options: OpenFin.WindowCreationOptions): Promise<OpenFin.Window>;
17474
17476
  /**
17475
17477
  * Retrieves an array of frame info objects representing the main frame and any
17476
17478
  * iframes that are currently on the page.
@@ -18593,7 +18595,6 @@ declare namespace WindowEvents {
18593
18595
  AlertRequestedEvent,
18594
18596
  AuthRequestedEvent,
18595
18597
  EndLoadEvent,
18596
- WillRedirectEvent,
18597
18598
  ReloadedEvent,
18598
18599
  OptionsChangedEvent,
18599
18600
  WindowOptionsChangedEvent_2 as WindowOptionsChangedEvent,
@@ -18841,7 +18842,7 @@ declare type WindowShowRequestedEvent = ShowRequestedEvent;
18841
18842
  * A union of all events that emit natively on the `Window` topic, i.e. excluding those that propagate
18842
18843
  * from {@link OpenFin.ViewEvents}.
18843
18844
  */
18844
- declare type WindowSourcedEvent = WebContentsEvents.Event<'window'> | WindowViewEvent | AuthRequestedEvent | BeginUserBoundsChangingEvent | BoundsChangedEvent | BoundsChangingEvent | ContextChangedEvent | CloseRequestedEvent | ClosedEvent_2 | ClosingEvent | DisabledMovementBoundsChangedEvent | DisabledMovementBoundsChangingEvent | EmbeddedEvent | EndUserBoundsChangingEvent | ExternalProcessExitedEvent | ExternalProcessStartedEvent | HiddenEvent_2 | HotkeyEvent_2 | InitializedEvent_2 | LayoutInitializedEvent | LayoutReadyEvent | MaximizedEvent | MinimizedEvent | OptionsChangedEvent | PerformanceReportEvent | PreloadScriptsStateChangedEvent | PreloadScriptsStateChangingEvent | ReloadedEvent | RestoredEvent | ShowRequestedEvent | ShownEvent_2 | UserMovementDisabledEvent | UserMovementEnabledEvent | WillMoveEvent | WillRedirectEvent | WillResizeEvent | ShowAllDownloadsEvent | DownloadShelfVisibilityChangedEvent;
18845
+ declare type WindowSourcedEvent = WebContentsEvents.Event<'window'> | WindowViewEvent | AuthRequestedEvent | BeginUserBoundsChangingEvent | BoundsChangedEvent | BoundsChangingEvent | ContextChangedEvent | CloseRequestedEvent | ClosedEvent_2 | ClosingEvent | DisabledMovementBoundsChangedEvent | DisabledMovementBoundsChangingEvent | EmbeddedEvent | EndUserBoundsChangingEvent | ExternalProcessExitedEvent | ExternalProcessStartedEvent | HiddenEvent_2 | HotkeyEvent_2 | InitializedEvent_2 | LayoutInitializedEvent | LayoutReadyEvent | MaximizedEvent | MinimizedEvent | OptionsChangedEvent | PerformanceReportEvent | PreloadScriptsStateChangedEvent | PreloadScriptsStateChangingEvent | ReloadedEvent | RestoredEvent | ShowRequestedEvent | ShownEvent_2 | UserMovementDisabledEvent | UserMovementEnabledEvent | WillMoveEvent | WillResizeEvent | ShowAllDownloadsEvent | DownloadShelfVisibilityChangedEvent;
18845
18846
 
18846
18847
  /**
18847
18848
  * Generated when a child window starts loading.
@@ -5310,7 +5310,7 @@ declare type Event_4 = (WebContentsEvents.Event<'view'> & {
5310
5310
  */
5311
5311
  declare type Event_5<Topic extends string> = {
5312
5312
  topic: Topic;
5313
- } & (BlurredEvent | CertificateSelectionShownEvent | CrashedEvent_2 | DidChangeThemeColorEvent | FocusedEvent | NavigationRejectedEvent | UrlChangedEvent | DidFailLoadEvent | DidFinishLoadEvent | PageFaviconUpdatedEvent | PageTitleUpdatedEvent | ResourceLoadFailedEvent | ResourceResponseReceivedEvent | ChildContentBlockedEvent | ChildContentOpenedInBrowserEvent | ChildViewCreatedEvent | ChildWindowCreatedEvent | FileDownloadStartedEvent | FileDownloadProgressEvent | FileDownloadCompletedEvent | FoundInPageEvent | CertificateErrorEvent);
5313
+ } & (BlurredEvent | CertificateSelectionShownEvent | CrashedEvent_2 | DidChangeThemeColorEvent | FocusedEvent | NavigationRejectedEvent | UrlChangedEvent | DidFailLoadEvent | DidFinishLoadEvent | PageFaviconUpdatedEvent | PageTitleUpdatedEvent | ResourceLoadFailedEvent | ResourceResponseReceivedEvent | ChildContentBlockedEvent | ChildContentOpenedInBrowserEvent | ChildViewCreatedEvent | ChildWindowCreatedEvent | FileDownloadStartedEvent | FileDownloadProgressEvent | FileDownloadCompletedEvent | FoundInPageEvent | CertificateErrorEvent | WillRedirectEvent);
5314
5314
 
5315
5315
  /**
5316
5316
  * [Union](https://www.typescriptlang.org/docs/handbook/2/everyday-types.html#union-types) containing every possible event that can be emitted by a {@link Window}. Events are
@@ -17363,7 +17363,8 @@ declare namespace WebContentsEvents {
17363
17363
  Event_5 as Event,
17364
17364
  WebContentsEvent,
17365
17365
  WillPropagateWebContentsEvent,
17366
- NonPropagatedWebContentsEvent
17366
+ NonPropagatedWebContentsEvent,
17367
+ WillRedirectEvent
17367
17368
  }
17368
17369
  }
17369
17370
 
@@ -17441,14 +17442,15 @@ declare type WillPropagateWebContentsEvent = Event_5<string>;
17441
17442
  declare type WillPropagateWindowEvent = WindowSourcedEvent;
17442
17443
 
17443
17444
  /**
17444
- * Generated when window is being redirected as per contentRedirect allowlist/denylist rules.
17445
+ * Generated whenever a redirection occurs.
17445
17446
  * @interface
17446
17447
  */
17447
- declare type WillRedirectEvent = BaseEvent_5 & {
17448
+ declare type WillRedirectEvent = NamedEvent & {
17448
17449
  type: 'will-redirect';
17449
17450
  blocked: boolean;
17450
17451
  isInPlace: boolean;
17451
17452
  url: string;
17453
+ isMainFrame: boolean;
17452
17454
  };
17453
17455
 
17454
17456
  /**
@@ -17470,7 +17472,7 @@ declare type WillResizeEvent = WillMoveOrResizeEvent & {
17470
17472
  */
17471
17473
  declare class _Window extends WebContents<OpenFin.WindowEvent> {
17472
17474
  /* Excluded from this release type: __constructor */
17473
- /* Excluded from this release type: createWindow */
17475
+ createWindow(options: OpenFin.WindowCreationOptions): Promise<OpenFin.Window>;
17474
17476
  /**
17475
17477
  * Retrieves an array of frame info objects representing the main frame and any
17476
17478
  * iframes that are currently on the page.
@@ -18593,7 +18595,6 @@ declare namespace WindowEvents {
18593
18595
  AlertRequestedEvent,
18594
18596
  AuthRequestedEvent,
18595
18597
  EndLoadEvent,
18596
- WillRedirectEvent,
18597
18598
  ReloadedEvent,
18598
18599
  OptionsChangedEvent,
18599
18600
  WindowOptionsChangedEvent_2 as WindowOptionsChangedEvent,
@@ -18841,7 +18842,7 @@ declare type WindowShowRequestedEvent = ShowRequestedEvent;
18841
18842
  * A union of all events that emit natively on the `Window` topic, i.e. excluding those that propagate
18842
18843
  * from {@link OpenFin.ViewEvents}.
18843
18844
  */
18844
- declare type WindowSourcedEvent = WebContentsEvents.Event<'window'> | WindowViewEvent | AuthRequestedEvent | BeginUserBoundsChangingEvent | BoundsChangedEvent | BoundsChangingEvent | ContextChangedEvent | CloseRequestedEvent | ClosedEvent_2 | ClosingEvent | DisabledMovementBoundsChangedEvent | DisabledMovementBoundsChangingEvent | EmbeddedEvent | EndUserBoundsChangingEvent | ExternalProcessExitedEvent | ExternalProcessStartedEvent | HiddenEvent_2 | HotkeyEvent_2 | InitializedEvent_2 | LayoutInitializedEvent | LayoutReadyEvent | MaximizedEvent | MinimizedEvent | OptionsChangedEvent | PerformanceReportEvent | PreloadScriptsStateChangedEvent | PreloadScriptsStateChangingEvent | ReloadedEvent | RestoredEvent | ShowRequestedEvent | ShownEvent_2 | UserMovementDisabledEvent | UserMovementEnabledEvent | WillMoveEvent | WillRedirectEvent | WillResizeEvent | ShowAllDownloadsEvent | DownloadShelfVisibilityChangedEvent;
18845
+ declare type WindowSourcedEvent = WebContentsEvents.Event<'window'> | WindowViewEvent | AuthRequestedEvent | BeginUserBoundsChangingEvent | BoundsChangedEvent | BoundsChangingEvent | ContextChangedEvent | CloseRequestedEvent | ClosedEvent_2 | ClosingEvent | DisabledMovementBoundsChangedEvent | DisabledMovementBoundsChangingEvent | EmbeddedEvent | EndUserBoundsChangingEvent | ExternalProcessExitedEvent | ExternalProcessStartedEvent | HiddenEvent_2 | HotkeyEvent_2 | InitializedEvent_2 | LayoutInitializedEvent | LayoutReadyEvent | MaximizedEvent | MinimizedEvent | OptionsChangedEvent | PerformanceReportEvent | PreloadScriptsStateChangedEvent | PreloadScriptsStateChangingEvent | ReloadedEvent | RestoredEvent | ShowRequestedEvent | ShownEvent_2 | UserMovementDisabledEvent | UserMovementEnabledEvent | WillMoveEvent | WillResizeEvent | ShowAllDownloadsEvent | DownloadShelfVisibilityChangedEvent;
18845
18846
 
18846
18847
  /**
18847
18848
  * Generated when a child window starts loading.
@@ -5310,7 +5310,7 @@ declare type Event_4 = (WebContentsEvents.Event<'view'> & {
5310
5310
  */
5311
5311
  declare type Event_5<Topic extends string> = {
5312
5312
  topic: Topic;
5313
- } & (BlurredEvent | CertificateSelectionShownEvent | CrashedEvent_2 | DidChangeThemeColorEvent | FocusedEvent | NavigationRejectedEvent | UrlChangedEvent | DidFailLoadEvent | DidFinishLoadEvent | PageFaviconUpdatedEvent | PageTitleUpdatedEvent | ResourceLoadFailedEvent | ResourceResponseReceivedEvent | ChildContentBlockedEvent | ChildContentOpenedInBrowserEvent | ChildViewCreatedEvent | ChildWindowCreatedEvent | FileDownloadStartedEvent | FileDownloadProgressEvent | FileDownloadCompletedEvent | FoundInPageEvent | CertificateErrorEvent);
5313
+ } & (BlurredEvent | CertificateSelectionShownEvent | CrashedEvent_2 | DidChangeThemeColorEvent | FocusedEvent | NavigationRejectedEvent | UrlChangedEvent | DidFailLoadEvent | DidFinishLoadEvent | PageFaviconUpdatedEvent | PageTitleUpdatedEvent | ResourceLoadFailedEvent | ResourceResponseReceivedEvent | ChildContentBlockedEvent | ChildContentOpenedInBrowserEvent | ChildViewCreatedEvent | ChildWindowCreatedEvent | FileDownloadStartedEvent | FileDownloadProgressEvent | FileDownloadCompletedEvent | FoundInPageEvent | CertificateErrorEvent | WillRedirectEvent);
5314
5314
 
5315
5315
  /**
5316
5316
  * [Union](https://www.typescriptlang.org/docs/handbook/2/everyday-types.html#union-types) containing every possible event that can be emitted by a {@link Window}. Events are
@@ -17363,7 +17363,8 @@ declare namespace WebContentsEvents {
17363
17363
  Event_5 as Event,
17364
17364
  WebContentsEvent,
17365
17365
  WillPropagateWebContentsEvent,
17366
- NonPropagatedWebContentsEvent
17366
+ NonPropagatedWebContentsEvent,
17367
+ WillRedirectEvent
17367
17368
  }
17368
17369
  }
17369
17370
 
@@ -17441,14 +17442,15 @@ declare type WillPropagateWebContentsEvent = Event_5<string>;
17441
17442
  declare type WillPropagateWindowEvent = WindowSourcedEvent;
17442
17443
 
17443
17444
  /**
17444
- * Generated when window is being redirected as per contentRedirect allowlist/denylist rules.
17445
+ * Generated whenever a redirection occurs.
17445
17446
  * @interface
17446
17447
  */
17447
- declare type WillRedirectEvent = BaseEvent_5 & {
17448
+ declare type WillRedirectEvent = NamedEvent & {
17448
17449
  type: 'will-redirect';
17449
17450
  blocked: boolean;
17450
17451
  isInPlace: boolean;
17451
17452
  url: string;
17453
+ isMainFrame: boolean;
17452
17454
  };
17453
17455
 
17454
17456
  /**
@@ -17470,7 +17472,7 @@ declare type WillResizeEvent = WillMoveOrResizeEvent & {
17470
17472
  */
17471
17473
  declare class _Window extends WebContents<OpenFin.WindowEvent> {
17472
17474
  /* Excluded from this release type: __constructor */
17473
- /* Excluded from this release type: createWindow */
17475
+ createWindow(options: OpenFin.WindowCreationOptions): Promise<OpenFin.Window>;
17474
17476
  /**
17475
17477
  * Retrieves an array of frame info objects representing the main frame and any
17476
17478
  * iframes that are currently on the page.
@@ -18593,7 +18595,6 @@ declare namespace WindowEvents {
18593
18595
  AlertRequestedEvent,
18594
18596
  AuthRequestedEvent,
18595
18597
  EndLoadEvent,
18596
- WillRedirectEvent,
18597
18598
  ReloadedEvent,
18598
18599
  OptionsChangedEvent,
18599
18600
  WindowOptionsChangedEvent_2 as WindowOptionsChangedEvent,
@@ -18841,7 +18842,7 @@ declare type WindowShowRequestedEvent = ShowRequestedEvent;
18841
18842
  * A union of all events that emit natively on the `Window` topic, i.e. excluding those that propagate
18842
18843
  * from {@link OpenFin.ViewEvents}.
18843
18844
  */
18844
- declare type WindowSourcedEvent = WebContentsEvents.Event<'window'> | WindowViewEvent | AuthRequestedEvent | BeginUserBoundsChangingEvent | BoundsChangedEvent | BoundsChangingEvent | ContextChangedEvent | CloseRequestedEvent | ClosedEvent_2 | ClosingEvent | DisabledMovementBoundsChangedEvent | DisabledMovementBoundsChangingEvent | EmbeddedEvent | EndUserBoundsChangingEvent | ExternalProcessExitedEvent | ExternalProcessStartedEvent | HiddenEvent_2 | HotkeyEvent_2 | InitializedEvent_2 | LayoutInitializedEvent | LayoutReadyEvent | MaximizedEvent | MinimizedEvent | OptionsChangedEvent | PerformanceReportEvent | PreloadScriptsStateChangedEvent | PreloadScriptsStateChangingEvent | ReloadedEvent | RestoredEvent | ShowRequestedEvent | ShownEvent_2 | UserMovementDisabledEvent | UserMovementEnabledEvent | WillMoveEvent | WillRedirectEvent | WillResizeEvent | ShowAllDownloadsEvent | DownloadShelfVisibilityChangedEvent;
18845
+ declare type WindowSourcedEvent = WebContentsEvents.Event<'window'> | WindowViewEvent | AuthRequestedEvent | BeginUserBoundsChangingEvent | BoundsChangedEvent | BoundsChangingEvent | ContextChangedEvent | CloseRequestedEvent | ClosedEvent_2 | ClosingEvent | DisabledMovementBoundsChangedEvent | DisabledMovementBoundsChangingEvent | EmbeddedEvent | EndUserBoundsChangingEvent | ExternalProcessExitedEvent | ExternalProcessStartedEvent | HiddenEvent_2 | HotkeyEvent_2 | InitializedEvent_2 | LayoutInitializedEvent | LayoutReadyEvent | MaximizedEvent | MinimizedEvent | OptionsChangedEvent | PerformanceReportEvent | PreloadScriptsStateChangedEvent | PreloadScriptsStateChangingEvent | ReloadedEvent | RestoredEvent | ShowRequestedEvent | ShownEvent_2 | UserMovementDisabledEvent | UserMovementEnabledEvent | WillMoveEvent | WillResizeEvent | ShowAllDownloadsEvent | DownloadShelfVisibilityChangedEvent;
18845
18846
 
18846
18847
  /**
18847
18848
  * Generated when a child window starts loading.
@@ -5370,7 +5370,7 @@ declare type Event_4 = (WebContentsEvents.Event<'view'> & {
5370
5370
  */
5371
5371
  declare type Event_5<Topic extends string> = {
5372
5372
  topic: Topic;
5373
- } & (BlurredEvent | CertificateSelectionShownEvent | CrashedEvent_2 | DidChangeThemeColorEvent | FocusedEvent | NavigationRejectedEvent | UrlChangedEvent | DidFailLoadEvent | DidFinishLoadEvent | PageFaviconUpdatedEvent | PageTitleUpdatedEvent | ResourceLoadFailedEvent | ResourceResponseReceivedEvent | ChildContentBlockedEvent | ChildContentOpenedInBrowserEvent | ChildViewCreatedEvent | ChildWindowCreatedEvent | FileDownloadStartedEvent | FileDownloadProgressEvent | FileDownloadCompletedEvent | FoundInPageEvent | CertificateErrorEvent);
5373
+ } & (BlurredEvent | CertificateSelectionShownEvent | CrashedEvent_2 | DidChangeThemeColorEvent | FocusedEvent | NavigationRejectedEvent | UrlChangedEvent | DidFailLoadEvent | DidFinishLoadEvent | PageFaviconUpdatedEvent | PageTitleUpdatedEvent | ResourceLoadFailedEvent | ResourceResponseReceivedEvent | ChildContentBlockedEvent | ChildContentOpenedInBrowserEvent | ChildViewCreatedEvent | ChildWindowCreatedEvent | FileDownloadStartedEvent | FileDownloadProgressEvent | FileDownloadCompletedEvent | FoundInPageEvent | CertificateErrorEvent | WillRedirectEvent);
5374
5374
 
5375
5375
  /**
5376
5376
  * [Union](https://www.typescriptlang.org/docs/handbook/2/everyday-types.html#union-types) containing every possible event that can be emitted by a {@link Window}. Events are
@@ -17824,7 +17824,8 @@ declare namespace WebContentsEvents {
17824
17824
  Event_5 as Event,
17825
17825
  WebContentsEvent,
17826
17826
  WillPropagateWebContentsEvent,
17827
- NonPropagatedWebContentsEvent
17827
+ NonPropagatedWebContentsEvent,
17828
+ WillRedirectEvent
17828
17829
  }
17829
17830
  }
17830
17831
 
@@ -17902,14 +17903,15 @@ declare type WillPropagateWebContentsEvent = Event_5<string>;
17902
17903
  declare type WillPropagateWindowEvent = WindowSourcedEvent;
17903
17904
 
17904
17905
  /**
17905
- * Generated when window is being redirected as per contentRedirect allowlist/denylist rules.
17906
+ * Generated whenever a redirection occurs.
17906
17907
  * @interface
17907
17908
  */
17908
- declare type WillRedirectEvent = BaseEvent_5 & {
17909
+ declare type WillRedirectEvent = NamedEvent & {
17909
17910
  type: 'will-redirect';
17910
17911
  blocked: boolean;
17911
17912
  isInPlace: boolean;
17912
17913
  url: string;
17914
+ isMainFrame: boolean;
17913
17915
  };
17914
17916
 
17915
17917
  /**
@@ -17934,10 +17936,6 @@ declare class _Window extends WebContents<OpenFin.WindowEvent> {
17934
17936
  * @internal
17935
17937
  */
17936
17938
  constructor(wire: Transport, identity: OpenFin.Identity);
17937
- /**
17938
- * create a new window
17939
- * @internal
17940
- */
17941
17939
  createWindow(options: OpenFin.WindowCreationOptions): Promise<OpenFin.Window>;
17942
17940
  /**
17943
17941
  * Retrieves an array of frame info objects representing the main frame and any
@@ -19061,7 +19059,6 @@ declare namespace WindowEvents {
19061
19059
  AlertRequestedEvent,
19062
19060
  AuthRequestedEvent,
19063
19061
  EndLoadEvent,
19064
- WillRedirectEvent,
19065
19062
  ReloadedEvent,
19066
19063
  OptionsChangedEvent,
19067
19064
  WindowOptionsChangedEvent_2 as WindowOptionsChangedEvent,
@@ -19309,7 +19306,7 @@ declare type WindowShowRequestedEvent = ShowRequestedEvent;
19309
19306
  * A union of all events that emit natively on the `Window` topic, i.e. excluding those that propagate
19310
19307
  * from {@link OpenFin.ViewEvents}.
19311
19308
  */
19312
- declare type WindowSourcedEvent = WebContentsEvents.Event<'window'> | WindowViewEvent | AuthRequestedEvent | BeginUserBoundsChangingEvent | BoundsChangedEvent | BoundsChangingEvent | ContextChangedEvent | CloseRequestedEvent | ClosedEvent_2 | ClosingEvent | DisabledMovementBoundsChangedEvent | DisabledMovementBoundsChangingEvent | EmbeddedEvent | EndUserBoundsChangingEvent | ExternalProcessExitedEvent | ExternalProcessStartedEvent | HiddenEvent_2 | HotkeyEvent_2 | InitializedEvent_2 | LayoutInitializedEvent | LayoutReadyEvent | MaximizedEvent | MinimizedEvent | OptionsChangedEvent | PerformanceReportEvent | PreloadScriptsStateChangedEvent | PreloadScriptsStateChangingEvent | ReloadedEvent | RestoredEvent | ShowRequestedEvent | ShownEvent_2 | UserMovementDisabledEvent | UserMovementEnabledEvent | WillMoveEvent | WillRedirectEvent | WillResizeEvent | ShowAllDownloadsEvent | DownloadShelfVisibilityChangedEvent;
19309
+ declare type WindowSourcedEvent = WebContentsEvents.Event<'window'> | WindowViewEvent | AuthRequestedEvent | BeginUserBoundsChangingEvent | BoundsChangedEvent | BoundsChangingEvent | ContextChangedEvent | CloseRequestedEvent | ClosedEvent_2 | ClosingEvent | DisabledMovementBoundsChangedEvent | DisabledMovementBoundsChangingEvent | EmbeddedEvent | EndUserBoundsChangingEvent | ExternalProcessExitedEvent | ExternalProcessStartedEvent | HiddenEvent_2 | HotkeyEvent_2 | InitializedEvent_2 | LayoutInitializedEvent | LayoutReadyEvent | MaximizedEvent | MinimizedEvent | OptionsChangedEvent | PerformanceReportEvent | PreloadScriptsStateChangedEvent | PreloadScriptsStateChangingEvent | ReloadedEvent | RestoredEvent | ShowRequestedEvent | ShownEvent_2 | UserMovementDisabledEvent | UserMovementEnabledEvent | WillMoveEvent | WillResizeEvent | ShowAllDownloadsEvent | DownloadShelfVisibilityChangedEvent;
19313
19310
 
19314
19311
  /**
19315
19312
  * Generated when a child window starts loading.
@@ -4122,6 +4122,37 @@ function requireApplication () {
4122
4122
  return application$1;
4123
4123
  }
4124
4124
 
4125
+ var promisifySubscription$1 = {};
4126
+
4127
+ Object.defineProperty(promisifySubscription$1, "__esModule", { value: true });
4128
+ promisifySubscription$1.promisifySubscription = void 0;
4129
+ const promisifySubscription = async (emitter, eventName, predicate = () => true, timeout) => {
4130
+ let resolve;
4131
+ let reject;
4132
+ let timer;
4133
+ const valuePromise = new Promise((y, n) => {
4134
+ resolve = y;
4135
+ reject = n;
4136
+ });
4137
+ const listener = (e) => {
4138
+ if (predicate(e)) {
4139
+ clearTimeout(timer);
4140
+ resolve(e);
4141
+ }
4142
+ };
4143
+ await emitter.on(eventName, listener);
4144
+ if (timeout) {
4145
+ timer = setTimeout(() => reject(new Error('event timed out')), timeout);
4146
+ }
4147
+ valuePromise.finally(() => {
4148
+ emitter.removeListener(eventName, listener).catch(() => null);
4149
+ });
4150
+ return {
4151
+ getValue: () => valuePromise
4152
+ };
4153
+ };
4154
+ promisifySubscription$1.promisifySubscription = promisifySubscription;
4155
+
4125
4156
  var hasRequiredInstance;
4126
4157
 
4127
4158
  function requireInstance () {
@@ -4137,6 +4168,7 @@ function requireInstance () {
4137
4168
  const main_1 = main;
4138
4169
  const view_1 = requireView();
4139
4170
  const warnings_1 = warnings;
4171
+ const promisifySubscription_1 = promisifySubscription$1;
4140
4172
  /**
4141
4173
  * A basic window that wraps a native HTML window. Provides more fine-grained
4142
4174
  * control over the window state such as the ability to minimize, maximize, restore, etc.
@@ -4152,79 +4184,60 @@ function requireInstance () {
4152
4184
  constructor(wire, identity) {
4153
4185
  super(wire, identity, 'window');
4154
4186
  }
4155
- /**
4156
- * create a new window
4157
- * @internal
4158
- */
4159
- createWindow(options) {
4187
+ async createWindow(options) {
4160
4188
  this.wire.sendAction('window-create-window', this.identity).catch((e) => {
4161
4189
  // we do not want to expose this error, just continue if this analytics-only call fails
4162
4190
  });
4163
- return new Promise((resolve, reject) => {
4164
- const CONSTRUCTOR_CB_TOPIC = 'fire-constructor-callback';
4165
- // need to call pageResponse, otherwise when a child window is created, page is not loaded
4166
- const pageResponse = new Promise((resolve) => {
4167
- // TODO: fix typing (internal)
4168
- // @ts-expect-error
4169
- this.on(CONSTRUCTOR_CB_TOPIC, function fireConstructor(response) {
4170
- let cbPayload;
4171
- const { success } = response;
4172
- const responseData = response.data;
4173
- const { message } = responseData;
4174
- if (success) {
4175
- cbPayload = {
4176
- httpResponseCode: responseData.httpResponseCode,
4177
- apiInjected: responseData.apiInjected
4178
- };
4179
- }
4180
- else {
4181
- cbPayload = {
4182
- message: responseData.message,
4183
- networkErrorCode: responseData.networkErrorCode,
4184
- stack: responseData.stack
4185
- };
4186
- }
4187
- this.removeListener(CONSTRUCTOR_CB_TOPIC, fireConstructor);
4188
- resolve({
4189
- message,
4190
- cbPayload,
4191
- success
4192
- });
4193
- });
4194
- });
4195
- // set defaults:
4196
- if (options.waitForPageLoad === undefined) {
4197
- options.waitForPageLoad = false;
4198
- }
4199
- if (options.autoShow === undefined) {
4200
- options.autoShow = true;
4201
- }
4202
- (0, warnings_1.handleDeprecatedWarnings)(options);
4203
- const windowCreation = this.wire.environment.createChildContent({ entityType: 'window', options });
4204
- Promise.all([pageResponse, windowCreation])
4205
- .then((resolvedArr) => {
4206
- const pageResolve = resolvedArr[0];
4207
- if (pageResolve.success) {
4208
- resolve(this);
4209
- }
4210
- else {
4211
- reject(pageResolve);
4212
- }
4213
- try {
4214
- // this is to enforce a 5.0 contract that the child's main function
4215
- // will not fire before the parent's success callback on creation.
4216
- // if the child window is not accessible (CORS) this contract does
4217
- // not hold.
4218
- const webWindow = this.getWebWindow();
4219
- webWindow.fin.__internal_.openerSuccessCBCalled();
4220
- }
4221
- catch (e) {
4222
- // common for main windows, we do not want to expose this error. here just to have a debug target.
4223
- // console.error(e);
4224
- }
4225
- })
4226
- .catch(reject);
4227
- });
4191
+ const CONSTRUCTOR_CB_TOPIC = 'fire-constructor-callback';
4192
+ const responseSubscription = await (0, promisifySubscription_1.promisifySubscription)(this, CONSTRUCTOR_CB_TOPIC);
4193
+ // set defaults:
4194
+ if (options.waitForPageLoad === undefined) {
4195
+ options.waitForPageLoad = false;
4196
+ }
4197
+ if (options.autoShow === undefined) {
4198
+ options.autoShow = true;
4199
+ }
4200
+ (0, warnings_1.handleDeprecatedWarnings)(options);
4201
+ const windowCreation = this.wire.environment.createChildContent({ entityType: 'window', options });
4202
+ const [response] = await Promise.all([responseSubscription.getValue(), windowCreation]);
4203
+ let cbPayload;
4204
+ const { success } = response;
4205
+ const responseData = response.data;
4206
+ const { message } = responseData;
4207
+ if (success) {
4208
+ cbPayload = {
4209
+ httpResponseCode: responseData.httpResponseCode,
4210
+ apiInjected: responseData.apiInjected
4211
+ };
4212
+ }
4213
+ else {
4214
+ cbPayload = {
4215
+ message: responseData.message,
4216
+ networkErrorCode: responseData.networkErrorCode,
4217
+ stack: responseData.stack
4218
+ };
4219
+ }
4220
+ const pageResolve = {
4221
+ message,
4222
+ cbPayload,
4223
+ success
4224
+ };
4225
+ try {
4226
+ // this is to enforce a 5.0 contract that the child's main function
4227
+ // will not fire before the parent's success callback on creation.
4228
+ // if the child window is not accessible (CORS) this contract does
4229
+ // not hold.
4230
+ const webWindow = this.getWebWindow();
4231
+ webWindow.fin.__internal_.openerSuccessCBCalled();
4232
+ }
4233
+ catch (e) {
4234
+ // common for main windows, we do not want to expose this error. here just to have a debug target.
4235
+ // console.error(e);
4236
+ }
4237
+ if (pageResolve.success) {
4238
+ return this;
4239
+ }
4240
+ return Promise.reject(pageResolve);
4228
4241
  }
4229
4242
  /**
4230
4243
  * Retrieves an array of frame info objects representing the main frame and any
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@openfin/node-adapter",
3
- "version": "36.80.8",
3
+ "version": "36.80.10",
4
4
  "description": "See README.md",
5
5
  "main": "out/node-adapter.js",
6
6
  "types": "out/node-adapter.d.ts",