@openfin/core 34.78.28 → 34.78.30

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.
@@ -15148,6 +15148,47 @@ declare class View_2 extends WebContents<OpenFin_2.ViewEvent> {
15148
15148
  * @experimental
15149
15149
  */
15150
15150
  show: () => Promise<void>;
15151
+ /**
15152
+ * Sets the bounds (top, left, width, height) of the view relative to its window and shows it if it is hidden.
15153
+ * This method ensures the view is both positioned and showing. It will reposition a visible view and both show and reposition a hidden view.
15154
+ *
15155
+ * @remarks View position is relative to the bounds of the window.
15156
+ * ({top: 0, left: 0} represents the top left corner of the window)
15157
+ *
15158
+ * @example
15159
+ * ```js
15160
+ * let view;
15161
+ * async function createView() {
15162
+ * const me = await fin.Window.getCurrent();
15163
+ * return fin.View.create({
15164
+ * name: 'viewNameSetBounds',
15165
+ * target: me.identity,
15166
+ * bounds: {top: 10, left: 10, width: 200, height: 200}
15167
+ * });
15168
+ * }
15169
+ *
15170
+ * async function showViewAt() {
15171
+ * view = await createView();
15172
+ * console.log('View created.');
15173
+ *
15174
+ * await view.navigate('https://google.com');
15175
+ * console.log('View navigated to given url.');
15176
+ *
15177
+ * await view.showAt({
15178
+ * top: 100,
15179
+ * left: 100,
15180
+ * width: 300,
15181
+ * height: 300
15182
+ * });
15183
+ * }
15184
+ *
15185
+ * showViewAt()
15186
+ * .then(() => console.log('View set to new bounds and shown.'))
15187
+ * .catch(err => console.log(err));
15188
+ * ```
15189
+ * @experimental
15190
+ */
15191
+ showAt: (bounds: OpenFin_2.Bounds) => Promise<void>;
15151
15192
  /**
15152
15193
  * Hides the current view if it is currently visible.
15153
15194
  *
@@ -15148,6 +15148,47 @@ declare class View_2 extends WebContents<OpenFin_2.ViewEvent> {
15148
15148
  * @experimental
15149
15149
  */
15150
15150
  show: () => Promise<void>;
15151
+ /**
15152
+ * Sets the bounds (top, left, width, height) of the view relative to its window and shows it if it is hidden.
15153
+ * This method ensures the view is both positioned and showing. It will reposition a visible view and both show and reposition a hidden view.
15154
+ *
15155
+ * @remarks View position is relative to the bounds of the window.
15156
+ * ({top: 0, left: 0} represents the top left corner of the window)
15157
+ *
15158
+ * @example
15159
+ * ```js
15160
+ * let view;
15161
+ * async function createView() {
15162
+ * const me = await fin.Window.getCurrent();
15163
+ * return fin.View.create({
15164
+ * name: 'viewNameSetBounds',
15165
+ * target: me.identity,
15166
+ * bounds: {top: 10, left: 10, width: 200, height: 200}
15167
+ * });
15168
+ * }
15169
+ *
15170
+ * async function showViewAt() {
15171
+ * view = await createView();
15172
+ * console.log('View created.');
15173
+ *
15174
+ * await view.navigate('https://google.com');
15175
+ * console.log('View navigated to given url.');
15176
+ *
15177
+ * await view.showAt({
15178
+ * top: 100,
15179
+ * left: 100,
15180
+ * width: 300,
15181
+ * height: 300
15182
+ * });
15183
+ * }
15184
+ *
15185
+ * showViewAt()
15186
+ * .then(() => console.log('View set to new bounds and shown.'))
15187
+ * .catch(err => console.log(err));
15188
+ * ```
15189
+ * @experimental
15190
+ */
15191
+ showAt: (bounds: OpenFin_2.Bounds) => Promise<void>;
15151
15192
  /**
15152
15193
  * Hides the current view if it is currently visible.
15153
15194
  *
@@ -15148,6 +15148,47 @@ declare class View_2 extends WebContents<OpenFin_2.ViewEvent> {
15148
15148
  * @experimental
15149
15149
  */
15150
15150
  show: () => Promise<void>;
15151
+ /**
15152
+ * Sets the bounds (top, left, width, height) of the view relative to its window and shows it if it is hidden.
15153
+ * This method ensures the view is both positioned and showing. It will reposition a visible view and both show and reposition a hidden view.
15154
+ *
15155
+ * @remarks View position is relative to the bounds of the window.
15156
+ * ({top: 0, left: 0} represents the top left corner of the window)
15157
+ *
15158
+ * @example
15159
+ * ```js
15160
+ * let view;
15161
+ * async function createView() {
15162
+ * const me = await fin.Window.getCurrent();
15163
+ * return fin.View.create({
15164
+ * name: 'viewNameSetBounds',
15165
+ * target: me.identity,
15166
+ * bounds: {top: 10, left: 10, width: 200, height: 200}
15167
+ * });
15168
+ * }
15169
+ *
15170
+ * async function showViewAt() {
15171
+ * view = await createView();
15172
+ * console.log('View created.');
15173
+ *
15174
+ * await view.navigate('https://google.com');
15175
+ * console.log('View navigated to given url.');
15176
+ *
15177
+ * await view.showAt({
15178
+ * top: 100,
15179
+ * left: 100,
15180
+ * width: 300,
15181
+ * height: 300
15182
+ * });
15183
+ * }
15184
+ *
15185
+ * showViewAt()
15186
+ * .then(() => console.log('View set to new bounds and shown.'))
15187
+ * .catch(err => console.log(err));
15188
+ * ```
15189
+ * @experimental
15190
+ */
15191
+ showAt: (bounds: OpenFin_2.Bounds) => Promise<void>;
15151
15192
  /**
15152
15193
  * Hides the current view if it is currently visible.
15153
15194
  *
package/out/mock.d.ts CHANGED
@@ -15720,6 +15720,47 @@ declare class View_2 extends WebContents<OpenFin_2.ViewEvent> {
15720
15720
  * @experimental
15721
15721
  */
15722
15722
  show: () => Promise<void>;
15723
+ /**
15724
+ * Sets the bounds (top, left, width, height) of the view relative to its window and shows it if it is hidden.
15725
+ * This method ensures the view is both positioned and showing. It will reposition a visible view and both show and reposition a hidden view.
15726
+ *
15727
+ * @remarks View position is relative to the bounds of the window.
15728
+ * ({top: 0, left: 0} represents the top left corner of the window)
15729
+ *
15730
+ * @example
15731
+ * ```js
15732
+ * let view;
15733
+ * async function createView() {
15734
+ * const me = await fin.Window.getCurrent();
15735
+ * return fin.View.create({
15736
+ * name: 'viewNameSetBounds',
15737
+ * target: me.identity,
15738
+ * bounds: {top: 10, left: 10, width: 200, height: 200}
15739
+ * });
15740
+ * }
15741
+ *
15742
+ * async function showViewAt() {
15743
+ * view = await createView();
15744
+ * console.log('View created.');
15745
+ *
15746
+ * await view.navigate('https://google.com');
15747
+ * console.log('View navigated to given url.');
15748
+ *
15749
+ * await view.showAt({
15750
+ * top: 100,
15751
+ * left: 100,
15752
+ * width: 300,
15753
+ * height: 300
15754
+ * });
15755
+ * }
15756
+ *
15757
+ * showViewAt()
15758
+ * .then(() => console.log('View set to new bounds and shown.'))
15759
+ * .catch(err => console.log(err));
15760
+ * ```
15761
+ * @experimental
15762
+ */
15763
+ showAt: (bounds: OpenFin_2.Bounds) => Promise<void>;
15723
15764
  /**
15724
15765
  * Hides the current view if it is currently visible.
15725
15766
  *
package/out/mock.js CHANGED
@@ -2982,6 +2982,49 @@ function requireInstance$2 () {
2982
2982
  this.show = async () => {
2983
2983
  await this.wire.sendAction('show-view', { ...this.identity });
2984
2984
  };
2985
+ /**
2986
+ * Sets the bounds (top, left, width, height) of the view relative to its window and shows it if it is hidden.
2987
+ * This method ensures the view is both positioned and showing. It will reposition a visible view and both show and reposition a hidden view.
2988
+ *
2989
+ * @remarks View position is relative to the bounds of the window.
2990
+ * ({top: 0, left: 0} represents the top left corner of the window)
2991
+ *
2992
+ * @example
2993
+ * ```js
2994
+ * let view;
2995
+ * async function createView() {
2996
+ * const me = await fin.Window.getCurrent();
2997
+ * return fin.View.create({
2998
+ * name: 'viewNameSetBounds',
2999
+ * target: me.identity,
3000
+ * bounds: {top: 10, left: 10, width: 200, height: 200}
3001
+ * });
3002
+ * }
3003
+ *
3004
+ * async function showViewAt() {
3005
+ * view = await createView();
3006
+ * console.log('View created.');
3007
+ *
3008
+ * await view.navigate('https://google.com');
3009
+ * console.log('View navigated to given url.');
3010
+ *
3011
+ * await view.showAt({
3012
+ * top: 100,
3013
+ * left: 100,
3014
+ * width: 300,
3015
+ * height: 300
3016
+ * });
3017
+ * }
3018
+ *
3019
+ * showViewAt()
3020
+ * .then(() => console.log('View set to new bounds and shown.'))
3021
+ * .catch(err => console.log(err));
3022
+ * ```
3023
+ * @experimental
3024
+ */
3025
+ this.showAt = async (bounds) => {
3026
+ await this.wire.sendAction('show-view-at', { bounds, ...this.identity });
3027
+ };
2985
3028
  /**
2986
3029
  * Hides the current view if it is currently visible.
2987
3030
  *
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@openfin/core",
3
- "version": "34.78.28",
3
+ "version": "34.78.30",
4
4
  "description": "The core renderer entry point of OpenFin",
5
5
  "license": "SEE LICENSE IN LICENSE.MD",
6
6
  "main": "out/mock.js",