@openfin/node-adapter 40.82.21 → 40.82.22
Sign up to get free protection for your applications and to get access to all the features.
- package/out/node-adapter.js +45 -3
- package/package.json +2 -2
package/out/node-adapter.js
CHANGED
@@ -11605,7 +11605,7 @@ var __classPrivateFieldGet$4 = (commonjsGlobal && commonjsGlobal.__classPrivateF
|
|
11605
11605
|
if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot read private member from an object whose class did not declare it");
|
11606
11606
|
return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver);
|
11607
11607
|
};
|
11608
|
-
var _Layout_layoutClient;
|
11608
|
+
var _Layout_instances, _Layout_layoutClient, _Layout_forwardLayoutAction;
|
11609
11609
|
Object.defineProperty(Instance$1, "__esModule", { value: true });
|
11610
11610
|
Instance$1.Layout = void 0;
|
11611
11611
|
const lazy_1 = lazy;
|
@@ -11759,6 +11759,7 @@ class Layout extends base_1$5.Base {
|
|
11759
11759
|
// eslint-disable-next-line no-shadow
|
11760
11760
|
constructor(identity, wire) {
|
11761
11761
|
super(wire);
|
11762
|
+
_Layout_instances.add(this);
|
11762
11763
|
/**
|
11763
11764
|
* @internal
|
11764
11765
|
* Lazily constructed {@link LayoutEntitiesClient} bound to this platform's client and identity
|
@@ -11998,9 +11999,50 @@ class Layout extends base_1$5.Base {
|
|
11998
11999
|
}
|
11999
12000
|
return layout_entities_1.LayoutNode.getEntity(stack, client);
|
12000
12001
|
}
|
12002
|
+
/**
|
12003
|
+
* Adds a view to the platform layout. Behaves like @link{Platform#createView} with the current layout as the target.
|
12004
|
+
*
|
12005
|
+
* @param viewOptions - The options for creating the view.
|
12006
|
+
* @param options - Optional parameters for adding the view.
|
12007
|
+
* @param options.location - The location where the view should be added.
|
12008
|
+
* @param options.targetView - The target view to which the new view should be added.
|
12009
|
+
* @returns A promise that resolves to an object containing the identity of the added view.
|
12010
|
+
*/
|
12011
|
+
async addView(viewOptions, { location, targetView } = {}) {
|
12012
|
+
this.wire.sendAction('layout-add-view').catch((e) => {
|
12013
|
+
// don't expose
|
12014
|
+
});
|
12015
|
+
const { identity } = await __classPrivateFieldGet$4(this, _Layout_instances, "m", _Layout_forwardLayoutAction).call(this, 'layout-add-view', {
|
12016
|
+
viewOptions,
|
12017
|
+
location,
|
12018
|
+
targetView
|
12019
|
+
});
|
12020
|
+
return { identity };
|
12021
|
+
}
|
12022
|
+
/**
|
12023
|
+
* Closes a view by its identity. Throws an error if the view does not belong to the current layout.
|
12024
|
+
* Behaves like @link{Platform#closeView} but only closes the view if it belongs the current layout.
|
12025
|
+
*
|
12026
|
+
* @param viewIdentity - The identity of the view to close.
|
12027
|
+
* @returns A promise that resolves when the view is closed.
|
12028
|
+
*/
|
12029
|
+
async closeView(viewIdentity) {
|
12030
|
+
this.wire.sendAction('layout-close-view').catch((e) => {
|
12031
|
+
// don't expose
|
12032
|
+
});
|
12033
|
+
await __classPrivateFieldGet$4(this, _Layout_instances, "m", _Layout_forwardLayoutAction).call(this, 'layout-close-view', { viewIdentity });
|
12034
|
+
}
|
12001
12035
|
}
|
12002
12036
|
Instance$1.Layout = Layout;
|
12003
|
-
_Layout_layoutClient = new WeakMap()
|
12037
|
+
_Layout_layoutClient = new WeakMap(), _Layout_instances = new WeakSet(), _Layout_forwardLayoutAction =
|
12038
|
+
/**
|
12039
|
+
* @internal
|
12040
|
+
* Use to type-guard actions sent to the layout via the provider.
|
12041
|
+
*/
|
12042
|
+
async function _Layout_forwardLayoutAction(action, payload) {
|
12043
|
+
const client = await this.platform.getClient();
|
12044
|
+
return client.dispatch(action, { target: this.identity, opts: payload });
|
12045
|
+
};
|
12004
12046
|
|
12005
12047
|
var __classPrivateFieldGet$3 = (commonjsGlobal && commonjsGlobal.__classPrivateFieldGet) || function (receiver, state, kind, f) {
|
12006
12048
|
if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a getter");
|
@@ -17685,7 +17727,7 @@ class NodeEnvironment extends BaseEnvironment_1 {
|
|
17685
17727
|
};
|
17686
17728
|
}
|
17687
17729
|
getAdapterVersionSync() {
|
17688
|
-
return "40.82.
|
17730
|
+
return "40.82.22";
|
17689
17731
|
}
|
17690
17732
|
observeBounds(element, onChange) {
|
17691
17733
|
throw new Error('Method not implemented.');
|
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "@openfin/node-adapter",
|
3
|
-
"version": "40.82.
|
3
|
+
"version": "40.82.22",
|
4
4
|
"description": "See README.md",
|
5
5
|
"main": "out/node-adapter.js",
|
6
6
|
"types": "out/node-adapter.d.ts",
|
@@ -23,7 +23,7 @@
|
|
23
23
|
"author": "OpenFin",
|
24
24
|
"dependencies": {
|
25
25
|
"@types/node": "^20.14.2",
|
26
|
-
"@openfin/core": "40.82.
|
26
|
+
"@openfin/core": "40.82.22",
|
27
27
|
"lodash": "^4.17.21",
|
28
28
|
"ws": "^7.3.0"
|
29
29
|
}
|