@openfin/core 37.80.35 → 37.80.38
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/mock-alpha.d.ts +12 -2
- package/out/mock-beta.d.ts +12 -2
- package/out/mock-public.d.ts +12 -2
- package/out/mock.d.ts +12 -2
- package/out/mock.js +31 -21
- package/package.json +1 -1
package/out/mock-alpha.d.ts
CHANGED
@@ -7147,6 +7147,15 @@ declare class InteropBroker extends Base {
|
|
7147
7147
|
setContext({ context }: {
|
7148
7148
|
context: OpenFin_2.Context;
|
7149
7149
|
}, clientIdentity: OpenFin_2.ClientIdentity): void;
|
7150
|
+
/**
|
7151
|
+
* Sets a context for the context group.
|
7152
|
+
* @param setContextOptions - New context to set.
|
7153
|
+
* @param contextGroupId - Context group id.
|
7154
|
+
*
|
7155
|
+
*/
|
7156
|
+
setContextForGroup({ context }: {
|
7157
|
+
context: OpenFin_2.Context;
|
7158
|
+
}, contextGroupId: string): void;
|
7150
7159
|
/**
|
7151
7160
|
* Get current context for a client subscribed to a Context Group.
|
7152
7161
|
*
|
@@ -11936,7 +11945,7 @@ declare type PreloadScriptInfoRunning = {
|
|
11936
11945
|
* @interface
|
11937
11946
|
*/
|
11938
11947
|
declare type PreloadScriptsStateChangedEvent = PreloadScriptsStateChangeEvent & {
|
11939
|
-
type: 'preload-
|
11948
|
+
type: 'preload-scripts-state-changed';
|
11940
11949
|
};
|
11941
11950
|
|
11942
11951
|
/**
|
@@ -11953,7 +11962,7 @@ declare type PreloadScriptsStateChangeEvent = BaseEvent_5 & {
|
|
11953
11962
|
* @interface
|
11954
11963
|
*/
|
11955
11964
|
declare type PreloadScriptsStateChangingEvent = PreloadScriptsStateChangeEvent & {
|
11956
|
-
type: 'preload-
|
11965
|
+
type: 'preload-scripts-state-changing';
|
11957
11966
|
};
|
11958
11967
|
|
11959
11968
|
declare type PresetLayoutOptions = OpenFin_2.PresetLayoutOptions;
|
@@ -12379,6 +12388,7 @@ declare interface ProtocolMap extends ProtocolMapBase {
|
|
12379
12388
|
'interop-broker-remove-client-from-context-group': VoidCall;
|
12380
12389
|
'interop-broker-remove-from-context-group': VoidCall;
|
12381
12390
|
'interop-broker-set-context': VoidCall;
|
12391
|
+
'interop-broker-set-context-for-group': VoidCall;
|
12382
12392
|
'query-permission-for-current-context': {
|
12383
12393
|
request: {
|
12384
12394
|
apiName: string;
|
package/out/mock-beta.d.ts
CHANGED
@@ -7147,6 +7147,15 @@ declare class InteropBroker extends Base {
|
|
7147
7147
|
setContext({ context }: {
|
7148
7148
|
context: OpenFin_2.Context;
|
7149
7149
|
}, clientIdentity: OpenFin_2.ClientIdentity): void;
|
7150
|
+
/**
|
7151
|
+
* Sets a context for the context group.
|
7152
|
+
* @param setContextOptions - New context to set.
|
7153
|
+
* @param contextGroupId - Context group id.
|
7154
|
+
*
|
7155
|
+
*/
|
7156
|
+
setContextForGroup({ context }: {
|
7157
|
+
context: OpenFin_2.Context;
|
7158
|
+
}, contextGroupId: string): void;
|
7150
7159
|
/**
|
7151
7160
|
* Get current context for a client subscribed to a Context Group.
|
7152
7161
|
*
|
@@ -11936,7 +11945,7 @@ declare type PreloadScriptInfoRunning = {
|
|
11936
11945
|
* @interface
|
11937
11946
|
*/
|
11938
11947
|
declare type PreloadScriptsStateChangedEvent = PreloadScriptsStateChangeEvent & {
|
11939
|
-
type: 'preload-
|
11948
|
+
type: 'preload-scripts-state-changed';
|
11940
11949
|
};
|
11941
11950
|
|
11942
11951
|
/**
|
@@ -11953,7 +11962,7 @@ declare type PreloadScriptsStateChangeEvent = BaseEvent_5 & {
|
|
11953
11962
|
* @interface
|
11954
11963
|
*/
|
11955
11964
|
declare type PreloadScriptsStateChangingEvent = PreloadScriptsStateChangeEvent & {
|
11956
|
-
type: 'preload-
|
11965
|
+
type: 'preload-scripts-state-changing';
|
11957
11966
|
};
|
11958
11967
|
|
11959
11968
|
declare type PresetLayoutOptions = OpenFin_2.PresetLayoutOptions;
|
@@ -12379,6 +12388,7 @@ declare interface ProtocolMap extends ProtocolMapBase {
|
|
12379
12388
|
'interop-broker-remove-client-from-context-group': VoidCall;
|
12380
12389
|
'interop-broker-remove-from-context-group': VoidCall;
|
12381
12390
|
'interop-broker-set-context': VoidCall;
|
12391
|
+
'interop-broker-set-context-for-group': VoidCall;
|
12382
12392
|
'query-permission-for-current-context': {
|
12383
12393
|
request: {
|
12384
12394
|
apiName: string;
|
package/out/mock-public.d.ts
CHANGED
@@ -7147,6 +7147,15 @@ declare class InteropBroker extends Base {
|
|
7147
7147
|
setContext({ context }: {
|
7148
7148
|
context: OpenFin_2.Context;
|
7149
7149
|
}, clientIdentity: OpenFin_2.ClientIdentity): void;
|
7150
|
+
/**
|
7151
|
+
* Sets a context for the context group.
|
7152
|
+
* @param setContextOptions - New context to set.
|
7153
|
+
* @param contextGroupId - Context group id.
|
7154
|
+
*
|
7155
|
+
*/
|
7156
|
+
setContextForGroup({ context }: {
|
7157
|
+
context: OpenFin_2.Context;
|
7158
|
+
}, contextGroupId: string): void;
|
7150
7159
|
/**
|
7151
7160
|
* Get current context for a client subscribed to a Context Group.
|
7152
7161
|
*
|
@@ -11936,7 +11945,7 @@ declare type PreloadScriptInfoRunning = {
|
|
11936
11945
|
* @interface
|
11937
11946
|
*/
|
11938
11947
|
declare type PreloadScriptsStateChangedEvent = PreloadScriptsStateChangeEvent & {
|
11939
|
-
type: 'preload-
|
11948
|
+
type: 'preload-scripts-state-changed';
|
11940
11949
|
};
|
11941
11950
|
|
11942
11951
|
/**
|
@@ -11953,7 +11962,7 @@ declare type PreloadScriptsStateChangeEvent = BaseEvent_5 & {
|
|
11953
11962
|
* @interface
|
11954
11963
|
*/
|
11955
11964
|
declare type PreloadScriptsStateChangingEvent = PreloadScriptsStateChangeEvent & {
|
11956
|
-
type: 'preload-
|
11965
|
+
type: 'preload-scripts-state-changing';
|
11957
11966
|
};
|
11958
11967
|
|
11959
11968
|
declare type PresetLayoutOptions = OpenFin_2.PresetLayoutOptions;
|
@@ -12379,6 +12388,7 @@ declare interface ProtocolMap extends ProtocolMapBase {
|
|
12379
12388
|
'interop-broker-remove-client-from-context-group': VoidCall;
|
12380
12389
|
'interop-broker-remove-from-context-group': VoidCall;
|
12381
12390
|
'interop-broker-set-context': VoidCall;
|
12391
|
+
'interop-broker-set-context-for-group': VoidCall;
|
12382
12392
|
'query-permission-for-current-context': {
|
12383
12393
|
request: {
|
12384
12394
|
apiName: string;
|
package/out/mock.d.ts
CHANGED
@@ -7252,6 +7252,15 @@ declare class InteropBroker extends Base {
|
|
7252
7252
|
setContext({ context }: {
|
7253
7253
|
context: OpenFin_2.Context;
|
7254
7254
|
}, clientIdentity: OpenFin_2.ClientIdentity): void;
|
7255
|
+
/**
|
7256
|
+
* Sets a context for the context group.
|
7257
|
+
* @param setContextOptions - New context to set.
|
7258
|
+
* @param contextGroupId - Context group id.
|
7259
|
+
*
|
7260
|
+
*/
|
7261
|
+
setContextForGroup({ context }: {
|
7262
|
+
context: OpenFin_2.Context;
|
7263
|
+
}, contextGroupId: string): void;
|
7255
7264
|
/**
|
7256
7265
|
* Get current context for a client subscribed to a Context Group.
|
7257
7266
|
*
|
@@ -12325,7 +12334,7 @@ declare type PreloadScriptInfoRunning = {
|
|
12325
12334
|
* @interface
|
12326
12335
|
*/
|
12327
12336
|
declare type PreloadScriptsStateChangedEvent = PreloadScriptsStateChangeEvent & {
|
12328
|
-
type: 'preload-
|
12337
|
+
type: 'preload-scripts-state-changed';
|
12329
12338
|
};
|
12330
12339
|
|
12331
12340
|
/**
|
@@ -12342,7 +12351,7 @@ declare type PreloadScriptsStateChangeEvent = BaseEvent_5 & {
|
|
12342
12351
|
* @interface
|
12343
12352
|
*/
|
12344
12353
|
declare type PreloadScriptsStateChangingEvent = PreloadScriptsStateChangeEvent & {
|
12345
|
-
type: 'preload-
|
12354
|
+
type: 'preload-scripts-state-changing';
|
12346
12355
|
};
|
12347
12356
|
|
12348
12357
|
declare type PresetLayoutOptions = OpenFin_2.PresetLayoutOptions;
|
@@ -12768,6 +12777,7 @@ declare interface ProtocolMap extends ProtocolMapBase {
|
|
12768
12777
|
'interop-broker-remove-client-from-context-group': VoidCall;
|
12769
12778
|
'interop-broker-remove-from-context-group': VoidCall;
|
12770
12779
|
'interop-broker-set-context': VoidCall;
|
12780
|
+
'interop-broker-set-context-for-group': VoidCall;
|
12771
12781
|
'query-permission-for-current-context': {
|
12772
12782
|
request: {
|
12773
12783
|
apiName: string;
|
package/out/mock.js
CHANGED
@@ -13443,27 +13443,7 @@ function requireInteropBroker () {
|
|
13443
13443
|
const clientState = this.getClientState(clientIdentity);
|
13444
13444
|
if (clientState && clientState.contextGroupId) {
|
13445
13445
|
const { contextGroupId } = clientState;
|
13446
|
-
|
13447
|
-
// Theoretically not possible.
|
13448
|
-
throw new Error(`Client has a context group that isn't in the context group mapping: ${contextGroupId}.`);
|
13449
|
-
}
|
13450
|
-
const contextIntegrityCheckResult = InteropBroker.checkContextIntegrity(context);
|
13451
|
-
if (contextIntegrityCheckResult.isValid === false) {
|
13452
|
-
throw new Error(`Failed to set Context - bad Context. Reason: ${contextIntegrityCheckResult.reason}. Context: ${JSON.stringify(context)}`);
|
13453
|
-
}
|
13454
|
-
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion
|
13455
|
-
const contextGroupState = this.contextGroupsById.get(contextGroupId);
|
13456
|
-
const broadcastedContextType = context.type;
|
13457
|
-
contextGroupState.set(broadcastedContextType, context);
|
13458
|
-
this.lastContextMap.set(contextGroupId, broadcastedContextType);
|
13459
|
-
const clientsInSameContextGroup = Array.from(this.interopClients.values()).filter((connectedClient) => connectedClient.contextGroupId === contextGroupId);
|
13460
|
-
clientsInSameContextGroup.forEach((client) => {
|
13461
|
-
for (const [, handlerInfo] of client.contextHandlers) {
|
13462
|
-
if (InteropBroker.isContextTypeCompatible(broadcastedContextType, handlerInfo.contextType)) {
|
13463
|
-
this.invokeContextHandler(client.clientIdentity, handlerInfo.handlerId, context);
|
13464
|
-
}
|
13465
|
-
}
|
13466
|
-
});
|
13446
|
+
this.setContextForGroup({ context }, contextGroupId);
|
13467
13447
|
}
|
13468
13448
|
else if (clientState) {
|
13469
13449
|
// Client has not joined any context group behavior.
|
@@ -13474,6 +13454,36 @@ function requireInteropBroker () {
|
|
13474
13454
|
throw new Error(`Client with Identity: ${clientIdentity.uuid} ${clientIdentity.name} not in Client State Map`);
|
13475
13455
|
}
|
13476
13456
|
}
|
13457
|
+
/**
|
13458
|
+
* Sets a context for the context group.
|
13459
|
+
* @param setContextOptions - New context to set.
|
13460
|
+
* @param contextGroupId - Context group id.
|
13461
|
+
*
|
13462
|
+
*/
|
13463
|
+
setContextForGroup({ context }, contextGroupId) {
|
13464
|
+
this.wire.sendAction('interop-broker-set-context-for-group').catch((e) => {
|
13465
|
+
// don't expose, analytics-only call
|
13466
|
+
});
|
13467
|
+
const contextGroupState = this.contextGroupsById.get(contextGroupId);
|
13468
|
+
if (!contextGroupState) {
|
13469
|
+
throw new Error(`Unable to set context for context group that isn't in the context group mapping: ${contextGroupId}.`);
|
13470
|
+
}
|
13471
|
+
const contextIntegrityCheckResult = InteropBroker.checkContextIntegrity(context);
|
13472
|
+
if (contextIntegrityCheckResult.isValid === false) {
|
13473
|
+
throw new Error(`Failed to set Context - bad Context. Reason: ${contextIntegrityCheckResult.reason}. Context: ${JSON.stringify(context)}`);
|
13474
|
+
}
|
13475
|
+
const broadcastedContextType = context.type;
|
13476
|
+
contextGroupState.set(broadcastedContextType, context);
|
13477
|
+
this.lastContextMap.set(contextGroupId, broadcastedContextType);
|
13478
|
+
const clientsInSameContextGroup = Array.from(this.interopClients.values()).filter((connectedClient) => connectedClient.contextGroupId === contextGroupId);
|
13479
|
+
clientsInSameContextGroup.forEach((client) => {
|
13480
|
+
for (const [, handlerInfo] of client.contextHandlers) {
|
13481
|
+
if (InteropBroker.isContextTypeCompatible(broadcastedContextType, handlerInfo.contextType)) {
|
13482
|
+
this.invokeContextHandler(client.clientIdentity, handlerInfo.handlerId, context);
|
13483
|
+
}
|
13484
|
+
}
|
13485
|
+
});
|
13486
|
+
}
|
13477
13487
|
/**
|
13478
13488
|
* Get current context for a client subscribed to a Context Group.
|
13479
13489
|
*
|