@openfin/node-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.
- package/out/node-adapter.js +86 -2
- package/package.json +2 -2
package/out/node-adapter.js
CHANGED
|
@@ -6999,6 +6999,88 @@ class System extends base_1$m.EmitterBase {
|
|
|
6999
6999
|
async serveAsset(options) {
|
|
7000
7000
|
return (await this.wire.sendAction('serve-asset', { options })).payload.data;
|
|
7001
7001
|
}
|
|
7002
|
+
/**
|
|
7003
|
+
* Get's the native theme preferences for the current runtime.
|
|
7004
|
+
* Prefer css media-queries wherever possible, but this can be useful to see if the system setting has been overridden.
|
|
7005
|
+
* See @link OpenFin.NativeTheme for more information.
|
|
7006
|
+
* @example Theme selector menu
|
|
7007
|
+
* ```ts
|
|
7008
|
+
async function handleThemeMenu(e: React.MouseEvent<HTMLDivElement>) {
|
|
7009
|
+
const currentTheme = await fin.System.getThemePreferences();
|
|
7010
|
+
const result = await (fin.me as OpenFin.Window).showPopupMenu({
|
|
7011
|
+
x: e.clientX,
|
|
7012
|
+
y: e.clientY,
|
|
7013
|
+
template: [
|
|
7014
|
+
{
|
|
7015
|
+
label: 'Light',
|
|
7016
|
+
type: 'checkbox',
|
|
7017
|
+
checked: currentTheme.themeSource === 'light',
|
|
7018
|
+
data: { themeSource: 'light' } as const
|
|
7019
|
+
},
|
|
7020
|
+
{
|
|
7021
|
+
label: 'Dark',
|
|
7022
|
+
type: 'checkbox',
|
|
7023
|
+
checked: currentTheme.themeSource === 'dark',
|
|
7024
|
+
data: { themeSource: 'dark' } as const
|
|
7025
|
+
},
|
|
7026
|
+
{
|
|
7027
|
+
label: 'System',
|
|
7028
|
+
type: 'checkbox',
|
|
7029
|
+
checked: currentTheme.themeSource === 'system',
|
|
7030
|
+
data: { themeSource: 'system' } as const
|
|
7031
|
+
}
|
|
7032
|
+
]
|
|
7033
|
+
});
|
|
7034
|
+
if (result.result === 'clicked') {
|
|
7035
|
+
await fin.System.setThemePreferences(result.data);
|
|
7036
|
+
}
|
|
7037
|
+
}
|
|
7038
|
+
```
|
|
7039
|
+
*/
|
|
7040
|
+
async getThemePreferences() {
|
|
7041
|
+
return (await this.wire.sendAction('get-theme-preferences')).payload.data;
|
|
7042
|
+
}
|
|
7043
|
+
/**
|
|
7044
|
+
* Sets the native theme preferences for the current runtime.
|
|
7045
|
+
* Can be used to force runtime-wide light or dark mode.
|
|
7046
|
+
* @important Due to this impacting all applications on a runtime, this method is only usable if a security realm has been set.
|
|
7047
|
+
* @example Theme selector menu
|
|
7048
|
+
* ```ts
|
|
7049
|
+
async function handleThemeMenu(e: React.MouseEvent<HTMLDivElement>) {
|
|
7050
|
+
const currentTheme = await fin.System.getThemePreferences();
|
|
7051
|
+
const result = await (fin.me as OpenFin.Window).showPopupMenu({
|
|
7052
|
+
x: e.clientX,
|
|
7053
|
+
y: e.clientY,
|
|
7054
|
+
template: [
|
|
7055
|
+
{
|
|
7056
|
+
label: 'Light',
|
|
7057
|
+
type: 'checkbox',
|
|
7058
|
+
checked: currentTheme.themeSource === 'light',
|
|
7059
|
+
data: { themeSource: 'light' } as const
|
|
7060
|
+
},
|
|
7061
|
+
{
|
|
7062
|
+
label: 'Dark',
|
|
7063
|
+
type: 'checkbox',
|
|
7064
|
+
checked: currentTheme.themeSource === 'dark',
|
|
7065
|
+
data: { themeSource: 'dark' } as const
|
|
7066
|
+
},
|
|
7067
|
+
{
|
|
7068
|
+
label: 'System',
|
|
7069
|
+
type: 'checkbox',
|
|
7070
|
+
checked: currentTheme.themeSource === 'system',
|
|
7071
|
+
data: { themeSource: 'system' } as const
|
|
7072
|
+
}
|
|
7073
|
+
]
|
|
7074
|
+
});
|
|
7075
|
+
if (result.result === 'clicked') {
|
|
7076
|
+
await fin.System.setThemePreferences(result.data);
|
|
7077
|
+
}
|
|
7078
|
+
}
|
|
7079
|
+
```
|
|
7080
|
+
*/
|
|
7081
|
+
async setThemePreferences(preferences) {
|
|
7082
|
+
return (await this.wire.sendAction('set-theme-preferences', { preferences })).payload.data;
|
|
7083
|
+
}
|
|
7002
7084
|
/**
|
|
7003
7085
|
* Launches the Log Uploader. Full documentation can be found [here](https://resources.here.io/docs/core/develop/debug/log-uploader/).
|
|
7004
7086
|
* @experimental
|
|
@@ -11400,7 +11482,7 @@ class LayoutNode {
|
|
|
11400
11482
|
* Known Issue: If the number of views to add overflows the tab-container, the added views will be set as active
|
|
11401
11483
|
* during each render, and then placed at the front of the tab-stack, while the underlying order of tabs will remain unchanged.
|
|
11402
11484
|
* This means the views you pass to createAdjacentStack() may not render in the order given by the array.
|
|
11403
|
-
*
|
|
11485
|
+
* Note: This issue does not occur when using `tabOverflowBehavior: 'scroll'` in the layout configuration.
|
|
11404
11486
|
*
|
|
11405
11487
|
* @param views The views that will populate the new TabStack.
|
|
11406
11488
|
* @param options Additional options that control new TabStack creation.
|
|
@@ -11536,6 +11618,7 @@ class TabStack extends LayoutNode {
|
|
|
11536
11618
|
* and rendered at the front of the tab-stack, while the underlying order of tabs will remain unchanged.
|
|
11537
11619
|
* If that happens and then getViews() is called, it will return the identities in a different order than
|
|
11538
11620
|
* than the currently rendered tab order.
|
|
11621
|
+
* Note: This issue does not occur when using `tabOverflowBehavior: 'scroll'` in the layout configuration.
|
|
11539
11622
|
*
|
|
11540
11623
|
*
|
|
11541
11624
|
* @throws If the {@link TabStack} has been destroyed.
|
|
@@ -11560,6 +11643,7 @@ class TabStack extends LayoutNode {
|
|
|
11560
11643
|
*
|
|
11561
11644
|
* @remarks Known Issue: If adding a view overflows the tab-container, the added view will be set as active
|
|
11562
11645
|
* and rendered at the front of the tab-stack, while the underlying order of tabs will remain unchanged.
|
|
11646
|
+
* Note: This issue does not occur when using `tabOverflowBehavior: 'scroll'` in the layout configuration.
|
|
11563
11647
|
*
|
|
11564
11648
|
* @param view The identity of an existing view to add, or options to create a view.
|
|
11565
11649
|
* @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)
|
|
@@ -18024,7 +18108,7 @@ class NodeEnvironment extends BaseEnvironment_1 {
|
|
|
18024
18108
|
};
|
|
18025
18109
|
}
|
|
18026
18110
|
getAdapterVersionSync() {
|
|
18027
|
-
return "44.100.
|
|
18111
|
+
return "44.100.49";
|
|
18028
18112
|
}
|
|
18029
18113
|
observeBounds(element, onChange) {
|
|
18030
18114
|
throw new Error('Method not implemented.');
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@openfin/node-adapter",
|
|
3
|
-
"version": "44.100.
|
|
3
|
+
"version": "44.100.49",
|
|
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": "44.100.
|
|
27
|
+
"@openfin/core": "44.100.49",
|
|
28
28
|
"lodash": "^4.17.21",
|
|
29
29
|
"ws": "^7.3.0"
|
|
30
30
|
}
|