@openfin/remote-adapter 44.100.57 → 44.100.58

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.
@@ -6288,9 +6288,20 @@ function requireInstance$1 () {
6288
6288
  * @returns {Promise<void>}
6289
6289
  * A promise that resolves once the request to show the download bubble
6290
6290
  * has been processed.
6291
+ * @example
6292
+ * ```js
6293
+ * const w = fin.Window.getCurrentSync();
6294
+ * const el = document.getElementById("download-bubble-button");
6295
+ * const rect = el.getBoundingClientRect();
6296
+ * const anchor = {
6297
+ * bounds: rect,
6298
+ * location: "topRight"
6299
+ * };
6300
+ * w.showDownloadBubble(anchor);
6301
+ * ```
6291
6302
  */
6292
- async showDownloadBubble(options) {
6293
- return this.wire.sendAction('show-download-bubble', { ...this.identity, options }).then(() => undefined);
6303
+ async showDownloadBubble(anchor) {
6304
+ return this.wire.sendAction('show-download-bubble', { ...this.identity, anchor }).then(() => undefined);
6294
6305
  }
6295
6306
  /**
6296
6307
  * Updates the anchor used for positioning the download bubble. This allows
@@ -6303,10 +6314,29 @@ function requireInstance$1 () {
6303
6314
  *
6304
6315
  * @returns {Promise<void>}
6305
6316
  * A promise that resolves once the anchor update has been applied.
6317
+ * @example
6318
+ * ```js
6319
+ * var w = fin.Window.getCurrentSync();
6320
+ * w.on('download-button-visibility-changed', (evt) => {
6321
+ * if (evt.visible) {
6322
+ * const el = document.getElementById("download-bubble-button");
6323
+ * //We show our button and get it's bounding rect
6324
+ * el.classList.remove("hidden");
6325
+ * const rect = el.getBoundingClientRect();
6326
+ * const anchor = {
6327
+ * bounds: rect,
6328
+ * location: "topRight"
6329
+ * }
6330
+ * w.updateDownloadBubbleAnchor(anchor);
6331
+ * } else {
6332
+ * //We hide our button
6333
+ * document.getElementById("download-bubble-button")?.classList.add("hidden");
6334
+ * }
6335
+ });
6306
6336
  */
6307
- async updateDownloadBubbleAnchor(options) {
6337
+ async updateDownloadBubbleAnchor(anchor) {
6308
6338
  return this.wire
6309
- .sendAction('update-download-bubble-anchor', { ...this.identity, options })
6339
+ .sendAction('update-download-bubble-anchor', { ...this.identity, anchor })
6310
6340
  .then(() => undefined);
6311
6341
  }
6312
6342
  }
@@ -8766,15 +8796,15 @@ class System extends base_1$h.EmitterBase {
8766
8796
  * Writes the passed message into both the log file and the console.
8767
8797
  * @param level The log level for the entry. Can be either "info", "warning" or "error"
8768
8798
  * @param message The log message text
8769
- * @param target.type Optional. The the log stream this message will be sent to, defaults to 'debug.log'. Specify 'app.log' to log to the app log of the sending View / Window. Note, when using `app.log`, it will always log to app.log irrespective of the `enableAppLogging` setting for the sender. This is particularly useful if you wish to log certain things from a View / Window but ignore generic console logs.
8799
+ * @param target The log stream this message will be sent to, defaults to 'debug.log'. Specify 'app.log' to log to the app log of the sending View / Window. Note, when using `app.log`, it will always log to app.log irrespective of the `enableAppLogging` setting for the sender. This is particularly useful if you wish to log certain things from a View / Window but ignore generic console logs.
8770
8800
  *
8771
8801
  * @example
8772
8802
  * ```js
8773
8803
  * fin.System.log("info", "An example log message", { type: 'debug.log' }).then(() => console.log('Log info message')).catch(err => console.log(err));
8774
8804
  * ```
8775
8805
  */
8776
- log(level, message, { type = 'debug.log' } = {}) {
8777
- return this.wire.sendAction('write-to-log', { level, message, target: { type } }).then(() => undefined);
8806
+ log(level, message, target) {
8807
+ return this.wire.sendAction('write-to-log', { level, message, target: target ?? {} }).then(() => undefined);
8778
8808
  }
8779
8809
  /**
8780
8810
  * Opens the passed URL in the default web browser.
@@ -9882,6 +9912,25 @@ class System extends base_1$h.EmitterBase {
9882
9912
  /**
9883
9913
  * Overrides original Chromium theme color providers matching key (currently except high contrast ones). Only colors passed in the map will be overridden.
9884
9914
  * @param overrides - Array of ColorProviderOverrides objects
9915
+ * @example
9916
+ * ```ts
9917
+ * await fin.System.setThemePalette([
9918
+ * {
9919
+ * colorProviderKey: { colorMode: 'light' },
9920
+ * colorsMap: {
9921
+ * kColorLabelForeground: 4278190080,
9922
+ * kColorBubbleBackground: 4293980400
9923
+ * }
9924
+ * },
9925
+ * {
9926
+ * colorProviderKey: { colorMode: 'dark' },
9927
+ * colorsMap: {
9928
+ * kColorLabelForeground: 4293980400,
9929
+ * kColorBubbleBackground: 4293980400
9930
+ * }
9931
+ * }
9932
+ * ]);
9933
+ * ```
9885
9934
  */
9886
9935
  async setThemePalette(themePalette) {
9887
9936
  return (await this.wire.sendAction('set-theme-palette', { themePalette })).payload.data;
@@ -9889,6 +9938,11 @@ class System extends base_1$h.EmitterBase {
9889
9938
  /**
9890
9939
  * Retrieves currently used color overrides
9891
9940
  * @returns Array of ColorProviderOverrides objects
9941
+ * @example
9942
+ * ```ts
9943
+ * const themePalette = await fin.System.getThemePalette();
9944
+ * console.log(themePalette);
9945
+ * ```
9892
9946
  */
9893
9947
  async getThemePalette() {
9894
9948
  const { payload } = await this.wire.sendAction('get-theme-palette');
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@openfin/remote-adapter",
3
- "version": "44.100.57",
3
+ "version": "44.100.58",
4
4
  "description": "Establish intermachine runtime connections using webRTC.",
5
5
  "license": "SEE LICENSE IN LICENSE.md",
6
6
  "private": false,
@@ -20,6 +20,6 @@
20
20
  "author": "OpenFin",
21
21
  "dependencies": {
22
22
  "lodash": "^4.17.21",
23
- "@openfin/core": "44.100.57"
23
+ "@openfin/core": "44.100.58"
24
24
  }
25
25
  }