@openfin/core 41.100.120 → 41.100.122

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.
@@ -12249,6 +12249,10 @@ declare interface ProtocolMap extends ProtocolMapBase {
12249
12249
  transitions: OpenFin_2.Transition;
12250
12250
  options: OpenFin_2.TransitionOptions;
12251
12251
  }>;
12252
+ 'activate-window-and-focus': ApiCall<{
12253
+ winIdentity: OpenFin_2.Identity;
12254
+ focusIdentity: OpenFin_2.Identity;
12255
+ }, boolean>;
12252
12256
  'get-all-frames': IdentityCall<{}, OpenFin_2.FrameInfo[]>;
12253
12257
  'get-window-bounds': IdentityCall<{
12254
12258
  options?: OpenFin_2.GetBoundsOptions;
@@ -17798,6 +17802,30 @@ declare class _Window extends WebContents<OpenFin_2.WindowEvent> {
17798
17802
  * ```
17799
17803
  */
17800
17804
  getAllFrames(): Promise<Array<OpenFin_2.FrameInfo>>;
17805
+ /**
17806
+ * Activates the current window and focuses the child entity if it exists. If this does
17807
+ * not succeed - say the child does not belong to this window, or the identity does not exist -
17808
+ * it will return false.
17809
+ *
17810
+ * @example
17811
+ * ```js
17812
+ * const win = fin.Window.wrapSync({ uuid: 'myApp', name: 'myOtherWindow' });
17813
+ *
17814
+ * win.getCurrentViews()
17815
+ * .then(([view1]) => {
17816
+ * return win.activateAndFocus(view1.identity);
17817
+ * })
17818
+ * .then(success => {
17819
+ * if (success) {
17820
+ * console.log('Window activated and child focused');
17821
+ * } else {
17822
+ * console.log('Window activation failed, focus state unchanged');
17823
+ * }
17824
+ * })
17825
+ * .catch(console.error);
17826
+ * ```
17827
+ */
17828
+ activateAndFocus(childIdentityToFocus: OpenFin_2.Identity): Promise<boolean>;
17801
17829
  /**
17802
17830
  * Gets the current bounds (top, bottom, right, left, width, height) of the window.
17803
17831
  *
@@ -12249,6 +12249,10 @@ declare interface ProtocolMap extends ProtocolMapBase {
12249
12249
  transitions: OpenFin_2.Transition;
12250
12250
  options: OpenFin_2.TransitionOptions;
12251
12251
  }>;
12252
+ 'activate-window-and-focus': ApiCall<{
12253
+ winIdentity: OpenFin_2.Identity;
12254
+ focusIdentity: OpenFin_2.Identity;
12255
+ }, boolean>;
12252
12256
  'get-all-frames': IdentityCall<{}, OpenFin_2.FrameInfo[]>;
12253
12257
  'get-window-bounds': IdentityCall<{
12254
12258
  options?: OpenFin_2.GetBoundsOptions;
@@ -17798,6 +17802,30 @@ declare class _Window extends WebContents<OpenFin_2.WindowEvent> {
17798
17802
  * ```
17799
17803
  */
17800
17804
  getAllFrames(): Promise<Array<OpenFin_2.FrameInfo>>;
17805
+ /**
17806
+ * Activates the current window and focuses the child entity if it exists. If this does
17807
+ * not succeed - say the child does not belong to this window, or the identity does not exist -
17808
+ * it will return false.
17809
+ *
17810
+ * @example
17811
+ * ```js
17812
+ * const win = fin.Window.wrapSync({ uuid: 'myApp', name: 'myOtherWindow' });
17813
+ *
17814
+ * win.getCurrentViews()
17815
+ * .then(([view1]) => {
17816
+ * return win.activateAndFocus(view1.identity);
17817
+ * })
17818
+ * .then(success => {
17819
+ * if (success) {
17820
+ * console.log('Window activated and child focused');
17821
+ * } else {
17822
+ * console.log('Window activation failed, focus state unchanged');
17823
+ * }
17824
+ * })
17825
+ * .catch(console.error);
17826
+ * ```
17827
+ */
17828
+ activateAndFocus(childIdentityToFocus: OpenFin_2.Identity): Promise<boolean>;
17801
17829
  /**
17802
17830
  * Gets the current bounds (top, bottom, right, left, width, height) of the window.
17803
17831
  *
@@ -12249,6 +12249,10 @@ declare interface ProtocolMap extends ProtocolMapBase {
12249
12249
  transitions: OpenFin_2.Transition;
12250
12250
  options: OpenFin_2.TransitionOptions;
12251
12251
  }>;
12252
+ 'activate-window-and-focus': ApiCall<{
12253
+ winIdentity: OpenFin_2.Identity;
12254
+ focusIdentity: OpenFin_2.Identity;
12255
+ }, boolean>;
12252
12256
  'get-all-frames': IdentityCall<{}, OpenFin_2.FrameInfo[]>;
12253
12257
  'get-window-bounds': IdentityCall<{
12254
12258
  options?: OpenFin_2.GetBoundsOptions;
@@ -17798,6 +17802,30 @@ declare class _Window extends WebContents<OpenFin_2.WindowEvent> {
17798
17802
  * ```
17799
17803
  */
17800
17804
  getAllFrames(): Promise<Array<OpenFin_2.FrameInfo>>;
17805
+ /**
17806
+ * Activates the current window and focuses the child entity if it exists. If this does
17807
+ * not succeed - say the child does not belong to this window, or the identity does not exist -
17808
+ * it will return false.
17809
+ *
17810
+ * @example
17811
+ * ```js
17812
+ * const win = fin.Window.wrapSync({ uuid: 'myApp', name: 'myOtherWindow' });
17813
+ *
17814
+ * win.getCurrentViews()
17815
+ * .then(([view1]) => {
17816
+ * return win.activateAndFocus(view1.identity);
17817
+ * })
17818
+ * .then(success => {
17819
+ * if (success) {
17820
+ * console.log('Window activated and child focused');
17821
+ * } else {
17822
+ * console.log('Window activation failed, focus state unchanged');
17823
+ * }
17824
+ * })
17825
+ * .catch(console.error);
17826
+ * ```
17827
+ */
17828
+ activateAndFocus(childIdentityToFocus: OpenFin_2.Identity): Promise<boolean>;
17801
17829
  /**
17802
17830
  * Gets the current bounds (top, bottom, right, left, width, height) of the window.
17803
17831
  *
package/out/stub.d.ts CHANGED
@@ -12650,6 +12650,10 @@ declare interface ProtocolMap extends ProtocolMapBase {
12650
12650
  transitions: OpenFin_2.Transition;
12651
12651
  options: OpenFin_2.TransitionOptions;
12652
12652
  }>;
12653
+ 'activate-window-and-focus': ApiCall<{
12654
+ winIdentity: OpenFin_2.Identity;
12655
+ focusIdentity: OpenFin_2.Identity;
12656
+ }, boolean>;
12653
12657
  'get-all-frames': IdentityCall<{}, OpenFin_2.FrameInfo[]>;
12654
12658
  'get-window-bounds': IdentityCall<{
12655
12659
  options?: OpenFin_2.GetBoundsOptions;
@@ -18252,6 +18256,30 @@ declare class _Window extends WebContents<OpenFin_2.WindowEvent> {
18252
18256
  * ```
18253
18257
  */
18254
18258
  getAllFrames(): Promise<Array<OpenFin_2.FrameInfo>>;
18259
+ /**
18260
+ * Activates the current window and focuses the child entity if it exists. If this does
18261
+ * not succeed - say the child does not belong to this window, or the identity does not exist -
18262
+ * it will return false.
18263
+ *
18264
+ * @example
18265
+ * ```js
18266
+ * const win = fin.Window.wrapSync({ uuid: 'myApp', name: 'myOtherWindow' });
18267
+ *
18268
+ * win.getCurrentViews()
18269
+ * .then(([view1]) => {
18270
+ * return win.activateAndFocus(view1.identity);
18271
+ * })
18272
+ * .then(success => {
18273
+ * if (success) {
18274
+ * console.log('Window activated and child focused');
18275
+ * } else {
18276
+ * console.log('Window activation failed, focus state unchanged');
18277
+ * }
18278
+ * })
18279
+ * .catch(console.error);
18280
+ * ```
18281
+ */
18282
+ activateAndFocus(childIdentityToFocus: OpenFin_2.Identity): Promise<boolean>;
18255
18283
  /**
18256
18284
  * Gets the current bounds (top, bottom, right, left, width, height) of the window.
18257
18285
  *
package/out/stub.js CHANGED
@@ -4044,6 +4044,37 @@ function requireInstance () {
4044
4044
  getAllFrames() {
4045
4045
  return this.wire.sendAction('get-all-frames', this.identity).then(({ payload }) => payload.data);
4046
4046
  }
4047
+ /**
4048
+ * Activates the current window and focuses the child entity if it exists. If this does
4049
+ * not succeed - say the child does not belong to this window, or the identity does not exist -
4050
+ * it will return false.
4051
+ *
4052
+ * @example
4053
+ * ```js
4054
+ * const win = fin.Window.wrapSync({ uuid: 'myApp', name: 'myOtherWindow' });
4055
+ *
4056
+ * win.getCurrentViews()
4057
+ * .then(([view1]) => {
4058
+ * return win.activateAndFocus(view1.identity);
4059
+ * })
4060
+ * .then(success => {
4061
+ * if (success) {
4062
+ * console.log('Window activated and child focused');
4063
+ * } else {
4064
+ * console.log('Window activation failed, focus state unchanged');
4065
+ * }
4066
+ * })
4067
+ * .catch(console.error);
4068
+ * ```
4069
+ */
4070
+ activateAndFocus(childIdentityToFocus) {
4071
+ return this.wire
4072
+ .sendAction('activate-window-and-focus', {
4073
+ winIdentity: this.identity,
4074
+ focusIdentity: childIdentityToFocus
4075
+ })
4076
+ .then(({ payload }) => payload.data);
4077
+ }
4047
4078
  /**
4048
4079
  * Gets the current bounds (top, bottom, right, left, width, height) of the window.
4049
4080
  *
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@openfin/core",
3
- "version": "41.100.120",
3
+ "version": "41.100.122",
4
4
  "description": "The core renderer entry point of OpenFin",
5
5
  "license": "SEE LICENSE IN LICENSE.md",
6
6
  "main": "out/stub.js",