@openfin/node-adapter 39.83.4 → 39.83.5
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
@@ -11447,7 +11447,7 @@ var __classPrivateFieldGet$4 = (commonjsGlobal && commonjsGlobal.__classPrivateF
|
|
11447
11447
|
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");
|
11448
11448
|
return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver);
|
11449
11449
|
};
|
11450
|
-
var _Layout_layoutClient;
|
11450
|
+
var _Layout_instances, _Layout_layoutClient, _Layout_forwardLayoutAction;
|
11451
11451
|
Object.defineProperty(Instance$1, "__esModule", { value: true });
|
11452
11452
|
Instance$1.Layout = void 0;
|
11453
11453
|
const lazy_1 = lazy;
|
@@ -11601,6 +11601,7 @@ class Layout extends base_1$5.Base {
|
|
11601
11601
|
// eslint-disable-next-line no-shadow
|
11602
11602
|
constructor(identity, wire) {
|
11603
11603
|
super(wire);
|
11604
|
+
_Layout_instances.add(this);
|
11604
11605
|
/**
|
11605
11606
|
* @internal
|
11606
11607
|
* Lazily constructed {@link LayoutEntitiesClient} bound to this platform's client and identity
|
@@ -11840,9 +11841,50 @@ class Layout extends base_1$5.Base {
|
|
11840
11841
|
}
|
11841
11842
|
return layout_entities_1.LayoutNode.getEntity(stack, client);
|
11842
11843
|
}
|
11844
|
+
/**
|
11845
|
+
* Adds a view to the platform layout. Behaves like @link{Platform#createView} with the current layout as the target.
|
11846
|
+
*
|
11847
|
+
* @param viewOptions - The options for creating the view.
|
11848
|
+
* @param options - Optional parameters for adding the view.
|
11849
|
+
* @param options.location - The location where the view should be added.
|
11850
|
+
* @param options.targetView - The target view to which the new view should be added.
|
11851
|
+
* @returns A promise that resolves to an object containing the identity of the added view.
|
11852
|
+
*/
|
11853
|
+
async addView(viewOptions, { location, targetView } = {}) {
|
11854
|
+
this.wire.sendAction('layout-add-view').catch((e) => {
|
11855
|
+
// don't expose
|
11856
|
+
});
|
11857
|
+
const { identity } = await __classPrivateFieldGet$4(this, _Layout_instances, "m", _Layout_forwardLayoutAction).call(this, 'layout-add-view', {
|
11858
|
+
viewOptions,
|
11859
|
+
location,
|
11860
|
+
targetView
|
11861
|
+
});
|
11862
|
+
return { identity };
|
11863
|
+
}
|
11864
|
+
/**
|
11865
|
+
* Closes a view by its identity. Throws an error if the view does not belong to the current layout.
|
11866
|
+
* Behaves like @link{Platform#closeView} but only closes the view if it belongs the current layout.
|
11867
|
+
*
|
11868
|
+
* @param viewIdentity - The identity of the view to close.
|
11869
|
+
* @returns A promise that resolves when the view is closed.
|
11870
|
+
*/
|
11871
|
+
async closeView(viewIdentity) {
|
11872
|
+
this.wire.sendAction('layout-close-view').catch((e) => {
|
11873
|
+
// don't expose
|
11874
|
+
});
|
11875
|
+
await __classPrivateFieldGet$4(this, _Layout_instances, "m", _Layout_forwardLayoutAction).call(this, 'layout-close-view', { viewIdentity });
|
11876
|
+
}
|
11843
11877
|
}
|
11844
11878
|
Instance$1.Layout = Layout;
|
11845
|
-
_Layout_layoutClient = new WeakMap()
|
11879
|
+
_Layout_layoutClient = new WeakMap(), _Layout_instances = new WeakSet(), _Layout_forwardLayoutAction =
|
11880
|
+
/**
|
11881
|
+
* @internal
|
11882
|
+
* Use to type-guard actions sent to the layout via the provider.
|
11883
|
+
*/
|
11884
|
+
async function _Layout_forwardLayoutAction(action, payload) {
|
11885
|
+
const client = await this.platform.getClient();
|
11886
|
+
return client.dispatch(action, { target: this.identity, opts: payload });
|
11887
|
+
};
|
11846
11888
|
|
11847
11889
|
var __classPrivateFieldGet$3 = (commonjsGlobal && commonjsGlobal.__classPrivateFieldGet) || function (receiver, state, kind, f) {
|
11848
11890
|
if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a getter");
|
@@ -17527,7 +17569,7 @@ class NodeEnvironment extends BaseEnvironment_1 {
|
|
17527
17569
|
};
|
17528
17570
|
}
|
17529
17571
|
getAdapterVersionSync() {
|
17530
|
-
return "39.83.
|
17572
|
+
return "39.83.5";
|
17531
17573
|
}
|
17532
17574
|
observeBounds(element, onChange) {
|
17533
17575
|
throw new Error('Method not implemented.');
|
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "@openfin/node-adapter",
|
3
|
-
"version": "39.83.
|
3
|
+
"version": "39.83.5",
|
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": "39.83.
|
26
|
+
"@openfin/core": "39.83.5",
|
27
27
|
"lodash": "^4.17.21",
|
28
28
|
"ws": "^7.3.0"
|
29
29
|
}
|