@openfin/remote-adapter 44.100.47 → 44.100.49

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.
@@ -9757,6 +9757,88 @@ class System extends base_1$h.EmitterBase {
9757
9757
  async serveAsset(options) {
9758
9758
  return (await this.wire.sendAction('serve-asset', { options })).payload.data;
9759
9759
  }
9760
+ /**
9761
+ * Get's the native theme preferences for the current runtime.
9762
+ * Prefer css media-queries wherever possible, but this can be useful to see if the system setting has been overridden.
9763
+ * See @link OpenFin.NativeTheme for more information.
9764
+ * @example Theme selector menu
9765
+ * ```ts
9766
+ async function handleThemeMenu(e: React.MouseEvent<HTMLDivElement>) {
9767
+ const currentTheme = await fin.System.getThemePreferences();
9768
+ const result = await (fin.me as OpenFin.Window).showPopupMenu({
9769
+ x: e.clientX,
9770
+ y: e.clientY,
9771
+ template: [
9772
+ {
9773
+ label: 'Light',
9774
+ type: 'checkbox',
9775
+ checked: currentTheme.themeSource === 'light',
9776
+ data: { themeSource: 'light' } as const
9777
+ },
9778
+ {
9779
+ label: 'Dark',
9780
+ type: 'checkbox',
9781
+ checked: currentTheme.themeSource === 'dark',
9782
+ data: { themeSource: 'dark' } as const
9783
+ },
9784
+ {
9785
+ label: 'System',
9786
+ type: 'checkbox',
9787
+ checked: currentTheme.themeSource === 'system',
9788
+ data: { themeSource: 'system' } as const
9789
+ }
9790
+ ]
9791
+ });
9792
+ if (result.result === 'clicked') {
9793
+ await fin.System.setThemePreferences(result.data);
9794
+ }
9795
+ }
9796
+ ```
9797
+ */
9798
+ async getThemePreferences() {
9799
+ return (await this.wire.sendAction('get-theme-preferences')).payload.data;
9800
+ }
9801
+ /**
9802
+ * Sets the native theme preferences for the current runtime.
9803
+ * Can be used to force runtime-wide light or dark mode.
9804
+ * @important Due to this impacting all applications on a runtime, this method is only usable if a security realm has been set.
9805
+ * @example Theme selector menu
9806
+ * ```ts
9807
+ async function handleThemeMenu(e: React.MouseEvent<HTMLDivElement>) {
9808
+ const currentTheme = await fin.System.getThemePreferences();
9809
+ const result = await (fin.me as OpenFin.Window).showPopupMenu({
9810
+ x: e.clientX,
9811
+ y: e.clientY,
9812
+ template: [
9813
+ {
9814
+ label: 'Light',
9815
+ type: 'checkbox',
9816
+ checked: currentTheme.themeSource === 'light',
9817
+ data: { themeSource: 'light' } as const
9818
+ },
9819
+ {
9820
+ label: 'Dark',
9821
+ type: 'checkbox',
9822
+ checked: currentTheme.themeSource === 'dark',
9823
+ data: { themeSource: 'dark' } as const
9824
+ },
9825
+ {
9826
+ label: 'System',
9827
+ type: 'checkbox',
9828
+ checked: currentTheme.themeSource === 'system',
9829
+ data: { themeSource: 'system' } as const
9830
+ }
9831
+ ]
9832
+ });
9833
+ if (result.result === 'clicked') {
9834
+ await fin.System.setThemePreferences(result.data);
9835
+ }
9836
+ }
9837
+ ```
9838
+ */
9839
+ async setThemePreferences(preferences) {
9840
+ return (await this.wire.sendAction('set-theme-preferences', { preferences })).payload.data;
9841
+ }
9760
9842
  /**
9761
9843
  * Launches the Log Uploader. Full documentation can be found [here](https://resources.here.io/docs/core/develop/debug/log-uploader/).
9762
9844
  * @experimental
@@ -13814,7 +13896,7 @@ class LayoutNode {
13814
13896
  * Known Issue: If the number of views to add overflows the tab-container, the added views will be set as active
13815
13897
  * during each render, and then placed at the front of the tab-stack, while the underlying order of tabs will remain unchanged.
13816
13898
  * This means the views you pass to createAdjacentStack() may not render in the order given by the array.
13817
- * Until fixed, this problem can be avoided only if your window is wide enough to fit creating all the views in the tabstack.
13899
+ * Note: This issue does not occur when using `tabOverflowBehavior: 'scroll'` in the layout configuration.
13818
13900
  *
13819
13901
  * @param views The views that will populate the new TabStack.
13820
13902
  * @param options Additional options that control new TabStack creation.
@@ -13950,6 +14032,7 @@ class TabStack extends LayoutNode {
13950
14032
  * and rendered at the front of the tab-stack, while the underlying order of tabs will remain unchanged.
13951
14033
  * If that happens and then getViews() is called, it will return the identities in a different order than
13952
14034
  * than the currently rendered tab order.
14035
+ * Note: This issue does not occur when using `tabOverflowBehavior: 'scroll'` in the layout configuration.
13953
14036
  *
13954
14037
  *
13955
14038
  * @throws If the {@link TabStack} has been destroyed.
@@ -13974,6 +14057,7 @@ class TabStack extends LayoutNode {
13974
14057
  *
13975
14058
  * @remarks Known Issue: If adding a view overflows the tab-container, the added view will be set as active
13976
14059
  * and rendered at the front of the tab-stack, while the underlying order of tabs will remain unchanged.
14060
+ * Note: This issue does not occur when using `tabOverflowBehavior: 'scroll'` in the layout configuration.
13977
14061
  *
13978
14062
  * @param view The identity of an existing view to add, or options to create a view.
13979
14063
  * @param options Optional view options: index number used to insert the view into the stack at that index. Defaults to 0 (front of the stack)
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@openfin/remote-adapter",
3
- "version": "44.100.47",
3
+ "version": "44.100.49",
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.47"
23
+ "@openfin/core": "44.100.49"
24
24
  }
25
25
  }