@openfin/core 40.82.16 → 40.82.17
Sign up to get free protection for your applications and to get access to all the features.
- package/out/mock-alpha.d.ts +1 -0
- package/out/mock-beta.d.ts +1 -0
- package/out/mock-public.d.ts +1 -0
- package/out/mock.d.ts +1 -0
- package/out/mock.js +15 -7
- package/package.json +1 -1
package/out/mock-alpha.d.ts
CHANGED
@@ -7622,6 +7622,7 @@ declare class Layout extends Base {
|
|
7622
7622
|
* ```
|
7623
7623
|
*/
|
7624
7624
|
getRootItem(): Promise<OpenFin_2.ColumnOrRow | OpenFin_2.TabStack>;
|
7625
|
+
getStackByView(identity: OpenFin_2.Identity): Promise<OpenFin_2.TabStack>;
|
7625
7626
|
/**
|
7626
7627
|
* Replaces the specified view with a view with the provided configuration.
|
7627
7628
|
*
|
package/out/mock-beta.d.ts
CHANGED
@@ -7622,6 +7622,7 @@ declare class Layout extends Base {
|
|
7622
7622
|
* ```
|
7623
7623
|
*/
|
7624
7624
|
getRootItem(): Promise<OpenFin_2.ColumnOrRow | OpenFin_2.TabStack>;
|
7625
|
+
getStackByView(identity: OpenFin_2.Identity): Promise<OpenFin_2.TabStack>;
|
7625
7626
|
/**
|
7626
7627
|
* Replaces the specified view with a view with the provided configuration.
|
7627
7628
|
*
|
package/out/mock-public.d.ts
CHANGED
@@ -7622,6 +7622,7 @@ declare class Layout extends Base {
|
|
7622
7622
|
* ```
|
7623
7623
|
*/
|
7624
7624
|
getRootItem(): Promise<OpenFin_2.ColumnOrRow | OpenFin_2.TabStack>;
|
7625
|
+
getStackByView(identity: OpenFin_2.Identity): Promise<OpenFin_2.TabStack>;
|
7625
7626
|
/**
|
7626
7627
|
* Replaces the specified view with a view with the provided configuration.
|
7627
7628
|
*
|
package/out/mock.d.ts
CHANGED
@@ -7745,6 +7745,7 @@ declare class Layout extends Base {
|
|
7745
7745
|
* ```
|
7746
7746
|
*/
|
7747
7747
|
getRootItem(): Promise<OpenFin_2.ColumnOrRow | OpenFin_2.TabStack>;
|
7748
|
+
getStackByView(identity: OpenFin_2.Identity): Promise<OpenFin_2.TabStack>;
|
7748
7749
|
/**
|
7749
7750
|
* Replaces the specified view with a view with the provided configuration.
|
7750
7751
|
*
|
package/out/mock.js
CHANGED
@@ -3278,11 +3278,8 @@ function requireInstance$2 () {
|
|
3278
3278
|
// don't expose
|
3279
3279
|
});
|
3280
3280
|
try {
|
3281
|
-
const
|
3282
|
-
|
3283
|
-
const client = await layout_entities_1.LayoutNode.newLayoutEntitiesClient(providerChannelClient, layout_constants_1.LAYOUT_CONTROLLER_ID, layoutWindow.identity);
|
3284
|
-
const stackDefinition = (await client.getStackByView(this.identity));
|
3285
|
-
return layout_entities_1.LayoutNode.getEntity(stackDefinition, client);
|
3281
|
+
const layout = await this.getParentLayout();
|
3282
|
+
return layout.getStackByView(this.identity);
|
3286
3283
|
}
|
3287
3284
|
catch (error) {
|
3288
3285
|
throw new transport_errors_1.RuntimeError({ reason: 'This view does not belong to a stack.', error });
|
@@ -12274,6 +12271,17 @@ class Layout extends base_1$5.Base {
|
|
12274
12271
|
const root = await client.getRoot('layoutName' in this.identity ? this.identity : undefined);
|
12275
12272
|
return layout_entities_1.LayoutNode.getEntity(root, client);
|
12276
12273
|
}
|
12274
|
+
async getStackByView(identity) {
|
12275
|
+
this.wire.sendAction('layout-get-stack-by-view').catch(() => {
|
12276
|
+
// don't expose
|
12277
|
+
});
|
12278
|
+
const client = await __classPrivateFieldGet$4(this, _Layout_layoutClient, "f").getValue();
|
12279
|
+
const stack = await client.getStackByView(identity);
|
12280
|
+
if (!stack) {
|
12281
|
+
throw new Error(`No stack found for view: ${identity.uuid}/${identity.name}`);
|
12282
|
+
}
|
12283
|
+
return layout_entities_1.LayoutNode.getEntity(stack, client);
|
12284
|
+
}
|
12277
12285
|
}
|
12278
12286
|
Instance$1.Layout = Layout;
|
12279
12287
|
_Layout_layoutClient = new WeakMap();
|
@@ -12467,7 +12475,7 @@ class LayoutModule extends base_1$4.Base {
|
|
12467
12475
|
this.wire.sendAction('layout-get-current').catch((e) => {
|
12468
12476
|
// don't expose
|
12469
12477
|
});
|
12470
|
-
if (!this.fin.me.isWindow) {
|
12478
|
+
if (this.wire.environment.type === 'openfin' && !this.fin.me.isWindow) {
|
12471
12479
|
throw new Error('You are not in a Window context. Only Windows can have a Layout.');
|
12472
12480
|
}
|
12473
12481
|
const { uuid, name } = this.fin.me;
|
@@ -12490,7 +12498,7 @@ class LayoutModule extends base_1$4.Base {
|
|
12490
12498
|
this.wire.sendAction('layout-get-current-sync').catch((e) => {
|
12491
12499
|
// don't expose
|
12492
12500
|
});
|
12493
|
-
if (!this.fin.me.isWindow) {
|
12501
|
+
if (this.wire.environment.type === 'openfin' && !this.fin.me.isWindow) {
|
12494
12502
|
throw new Error('You are not in a Window context. Only Windows can have a Layout.');
|
12495
12503
|
}
|
12496
12504
|
const { uuid, name } = this.fin.me;
|