@openfin/node-adapter 43.100.105 → 43.100.106

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.
@@ -4902,9 +4902,20 @@ function requireInstance () {
4902
4902
  * @returns {Promise<void>}
4903
4903
  * A promise that resolves once the request to show the download bubble
4904
4904
  * has been processed.
4905
+ * @example
4906
+ * ```js
4907
+ * const w = fin.Window.getCurrentSync();
4908
+ * const el = document.getElementById("download-bubble-button");
4909
+ * const rect = el.getBoundingClientRect();
4910
+ * const anchor = {
4911
+ * bounds: rect,
4912
+ * location: "topRight"
4913
+ * };
4914
+ * w.showDownloadBubble(anchor);
4915
+ * ```
4905
4916
  */
4906
- async showDownloadBubble(options) {
4907
- return this.wire.sendAction('show-download-bubble', { ...this.identity, options }).then(() => undefined);
4917
+ async showDownloadBubble(anchor) {
4918
+ return this.wire.sendAction('show-download-bubble', { ...this.identity, anchor }).then(() => undefined);
4908
4919
  }
4909
4920
  /**
4910
4921
  * Updates the anchor used for positioning the download bubble. This allows
@@ -4917,10 +4928,29 @@ function requireInstance () {
4917
4928
  *
4918
4929
  * @returns {Promise<void>}
4919
4930
  * A promise that resolves once the anchor update has been applied.
4931
+ * @example
4932
+ * ```js
4933
+ * var w = fin.Window.getCurrentSync();
4934
+ * w.on('download-button-visibility-changed', (evt) => {
4935
+ * if (evt.visible) {
4936
+ * const el = document.getElementById("download-bubble-button");
4937
+ * //We show our button and get it's bounding rect
4938
+ * el.classList.remove("hidden");
4939
+ * const rect = el.getBoundingClientRect();
4940
+ * const anchor = {
4941
+ * bounds: rect,
4942
+ * location: "topRight"
4943
+ * }
4944
+ * w.updateDownloadBubbleAnchor(anchor);
4945
+ * } else {
4946
+ * //We hide our button
4947
+ * document.getElementById("download-bubble-button")?.classList.add("hidden");
4948
+ * }
4949
+ });
4920
4950
  */
4921
- async updateDownloadBubbleAnchor(options) {
4951
+ async updateDownloadBubbleAnchor(anchor) {
4922
4952
  return this.wire
4923
- .sendAction('update-download-bubble-anchor', { ...this.identity, options })
4953
+ .sendAction('update-download-bubble-anchor', { ...this.identity, anchor })
4924
4954
  .then(() => undefined);
4925
4955
  }
4926
4956
  }
@@ -6008,15 +6038,15 @@ class System extends base_1$m.EmitterBase {
6008
6038
  * Writes the passed message into both the log file and the console.
6009
6039
  * @param level The log level for the entry. Can be either "info", "warning" or "error"
6010
6040
  * @param message The log message text
6011
- * @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.
6041
+ * @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.
6012
6042
  *
6013
6043
  * @example
6014
6044
  * ```js
6015
6045
  * fin.System.log("info", "An example log message", { type: 'debug.log' }).then(() => console.log('Log info message')).catch(err => console.log(err));
6016
6046
  * ```
6017
6047
  */
6018
- log(level, message, { type = 'debug.log' } = {}) {
6019
- return this.wire.sendAction('write-to-log', { level, message, target: { type } }).then(() => undefined);
6048
+ log(level, message, target) {
6049
+ return this.wire.sendAction('write-to-log', { level, message, target: target ?? {} }).then(() => undefined);
6020
6050
  }
6021
6051
  /**
6022
6052
  * Opens the passed URL in the default web browser.
@@ -7124,6 +7154,25 @@ class System extends base_1$m.EmitterBase {
7124
7154
  /**
7125
7155
  * Overrides original Chromium theme color providers matching key (currently except high contrast ones). Only colors passed in the map will be overridden.
7126
7156
  * @param overrides - Array of ColorProviderOverrides objects
7157
+ * @example
7158
+ * ```ts
7159
+ * await fin.System.setThemePalette([
7160
+ * {
7161
+ * colorProviderKey: { colorMode: 'light' },
7162
+ * colorsMap: {
7163
+ * kColorLabelForeground: 4278190080,
7164
+ * kColorBubbleBackground: 4293980400
7165
+ * }
7166
+ * },
7167
+ * {
7168
+ * colorProviderKey: { colorMode: 'dark' },
7169
+ * colorsMap: {
7170
+ * kColorLabelForeground: 4293980400,
7171
+ * kColorBubbleBackground: 4293980400
7172
+ * }
7173
+ * }
7174
+ * ]);
7175
+ * ```
7127
7176
  */
7128
7177
  async setThemePalette(themePalette) {
7129
7178
  return (await this.wire.sendAction('set-theme-palette', { themePalette })).payload.data;
@@ -7131,6 +7180,11 @@ class System extends base_1$m.EmitterBase {
7131
7180
  /**
7132
7181
  * Retrieves currently used color overrides
7133
7182
  * @returns Array of ColorProviderOverrides objects
7183
+ * @example
7184
+ * ```ts
7185
+ * const themePalette = await fin.System.getThemePalette();
7186
+ * console.log(themePalette);
7187
+ * ```
7134
7188
  */
7135
7189
  async getThemePalette() {
7136
7190
  const { payload } = await this.wire.sendAction('get-theme-palette');
@@ -18156,7 +18210,7 @@ class NodeEnvironment extends BaseEnvironment_1 {
18156
18210
  };
18157
18211
  }
18158
18212
  getAdapterVersionSync() {
18159
- return "43.100.105";
18213
+ return "43.100.106";
18160
18214
  }
18161
18215
  observeBounds(element, onChange) {
18162
18216
  throw new Error('Method not implemented.');
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@openfin/node-adapter",
3
- "version": "43.100.105",
3
+ "version": "43.100.106",
4
4
  "description": "See README.md",
5
5
  "main": "out/node-adapter.js",
6
6
  "types": "out/node-adapter.d.ts",
@@ -24,7 +24,7 @@
24
24
  "author": "OpenFin",
25
25
  "dependencies": {
26
26
  "@types/node": "^20.14.2",
27
- "@openfin/core": "43.100.105",
27
+ "@openfin/core": "43.100.106",
28
28
  "lodash": "^4.17.21",
29
29
  "ws": "^7.3.0"
30
30
  }