@openfin/core 36.80.6 → 36.80.8
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 +10 -0
- package/out/mock-beta.d.ts +10 -0
- package/out/mock-public.d.ts +10 -0
- package/out/mock.d.ts +10 -0
- package/out/mock.js +31 -21
- package/package.json +1 -1
package/out/mock-alpha.d.ts
CHANGED
@@ -7202,6 +7202,15 @@ declare class InteropBroker extends Base {
|
|
7202
7202
|
setContext({ context }: {
|
7203
7203
|
context: OpenFin_2.Context;
|
7204
7204
|
}, clientIdentity: OpenFin_2.ClientIdentity): void;
|
7205
|
+
/**
|
7206
|
+
* Sets a context for the context group.
|
7207
|
+
* @param setContextOptions - New context to set.
|
7208
|
+
* @param contextGroupId - Context group id.
|
7209
|
+
*
|
7210
|
+
*/
|
7211
|
+
setContextForGroup({ context }: {
|
7212
|
+
context: OpenFin_2.Context;
|
7213
|
+
}, contextGroupId: string): void;
|
7205
7214
|
/**
|
7206
7215
|
* Get current context for a client subscribed to a Context Group.
|
7207
7216
|
*
|
@@ -12457,6 +12466,7 @@ declare interface ProtocolMap extends ProtocolMapBase {
|
|
12457
12466
|
'interop-broker-remove-client-from-context-group': VoidCall;
|
12458
12467
|
'interop-broker-remove-from-context-group': VoidCall;
|
12459
12468
|
'interop-broker-set-context': VoidCall;
|
12469
|
+
'interop-broker-set-context-for-group': VoidCall;
|
12460
12470
|
'query-permission-for-current-context': {
|
12461
12471
|
request: {
|
12462
12472
|
apiName: string;
|
package/out/mock-beta.d.ts
CHANGED
@@ -7202,6 +7202,15 @@ declare class InteropBroker extends Base {
|
|
7202
7202
|
setContext({ context }: {
|
7203
7203
|
context: OpenFin_2.Context;
|
7204
7204
|
}, clientIdentity: OpenFin_2.ClientIdentity): void;
|
7205
|
+
/**
|
7206
|
+
* Sets a context for the context group.
|
7207
|
+
* @param setContextOptions - New context to set.
|
7208
|
+
* @param contextGroupId - Context group id.
|
7209
|
+
*
|
7210
|
+
*/
|
7211
|
+
setContextForGroup({ context }: {
|
7212
|
+
context: OpenFin_2.Context;
|
7213
|
+
}, contextGroupId: string): void;
|
7205
7214
|
/**
|
7206
7215
|
* Get current context for a client subscribed to a Context Group.
|
7207
7216
|
*
|
@@ -12457,6 +12466,7 @@ declare interface ProtocolMap extends ProtocolMapBase {
|
|
12457
12466
|
'interop-broker-remove-client-from-context-group': VoidCall;
|
12458
12467
|
'interop-broker-remove-from-context-group': VoidCall;
|
12459
12468
|
'interop-broker-set-context': VoidCall;
|
12469
|
+
'interop-broker-set-context-for-group': VoidCall;
|
12460
12470
|
'query-permission-for-current-context': {
|
12461
12471
|
request: {
|
12462
12472
|
apiName: string;
|
package/out/mock-public.d.ts
CHANGED
@@ -7202,6 +7202,15 @@ declare class InteropBroker extends Base {
|
|
7202
7202
|
setContext({ context }: {
|
7203
7203
|
context: OpenFin_2.Context;
|
7204
7204
|
}, clientIdentity: OpenFin_2.ClientIdentity): void;
|
7205
|
+
/**
|
7206
|
+
* Sets a context for the context group.
|
7207
|
+
* @param setContextOptions - New context to set.
|
7208
|
+
* @param contextGroupId - Context group id.
|
7209
|
+
*
|
7210
|
+
*/
|
7211
|
+
setContextForGroup({ context }: {
|
7212
|
+
context: OpenFin_2.Context;
|
7213
|
+
}, contextGroupId: string): void;
|
7205
7214
|
/**
|
7206
7215
|
* Get current context for a client subscribed to a Context Group.
|
7207
7216
|
*
|
@@ -12457,6 +12466,7 @@ declare interface ProtocolMap extends ProtocolMapBase {
|
|
12457
12466
|
'interop-broker-remove-client-from-context-group': VoidCall;
|
12458
12467
|
'interop-broker-remove-from-context-group': VoidCall;
|
12459
12468
|
'interop-broker-set-context': VoidCall;
|
12469
|
+
'interop-broker-set-context-for-group': VoidCall;
|
12460
12470
|
'query-permission-for-current-context': {
|
12461
12471
|
request: {
|
12462
12472
|
apiName: string;
|
package/out/mock.d.ts
CHANGED
@@ -7307,6 +7307,15 @@ declare class InteropBroker extends Base {
|
|
7307
7307
|
setContext({ context }: {
|
7308
7308
|
context: OpenFin_2.Context;
|
7309
7309
|
}, clientIdentity: OpenFin_2.ClientIdentity): void;
|
7310
|
+
/**
|
7311
|
+
* Sets a context for the context group.
|
7312
|
+
* @param setContextOptions - New context to set.
|
7313
|
+
* @param contextGroupId - Context group id.
|
7314
|
+
*
|
7315
|
+
*/
|
7316
|
+
setContextForGroup({ context }: {
|
7317
|
+
context: OpenFin_2.Context;
|
7318
|
+
}, contextGroupId: string): void;
|
7310
7319
|
/**
|
7311
7320
|
* Get current context for a client subscribed to a Context Group.
|
7312
7321
|
*
|
@@ -12846,6 +12855,7 @@ declare interface ProtocolMap extends ProtocolMapBase {
|
|
12846
12855
|
'interop-broker-remove-client-from-context-group': VoidCall;
|
12847
12856
|
'interop-broker-remove-from-context-group': VoidCall;
|
12848
12857
|
'interop-broker-set-context': VoidCall;
|
12858
|
+
'interop-broker-set-context-for-group': VoidCall;
|
12849
12859
|
'query-permission-for-current-context': {
|
12850
12860
|
request: {
|
12851
12861
|
apiName: string;
|
package/out/mock.js
CHANGED
@@ -13392,27 +13392,7 @@ function requireInteropBroker () {
|
|
13392
13392
|
const clientState = this.getClientState(clientIdentity);
|
13393
13393
|
if (clientState && clientState.contextGroupId) {
|
13394
13394
|
const { contextGroupId } = clientState;
|
13395
|
-
|
13396
|
-
// Theoretically not possible.
|
13397
|
-
throw new Error(`Client has a context group that isn't in the context group mapping: ${contextGroupId}.`);
|
13398
|
-
}
|
13399
|
-
const contextIntegrityCheckResult = InteropBroker.checkContextIntegrity(context);
|
13400
|
-
if (contextIntegrityCheckResult.isValid === false) {
|
13401
|
-
throw new Error(`Failed to set Context - bad Context. Reason: ${contextIntegrityCheckResult.reason}. Context: ${JSON.stringify(context)}`);
|
13402
|
-
}
|
13403
|
-
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion
|
13404
|
-
const contextGroupState = this.contextGroupsById.get(contextGroupId);
|
13405
|
-
const broadcastedContextType = context.type;
|
13406
|
-
contextGroupState.set(broadcastedContextType, context);
|
13407
|
-
this.lastContextMap.set(contextGroupId, broadcastedContextType);
|
13408
|
-
const clientsInSameContextGroup = Array.from(this.interopClients.values()).filter((connectedClient) => connectedClient.contextGroupId === contextGroupId);
|
13409
|
-
clientsInSameContextGroup.forEach((client) => {
|
13410
|
-
for (const [, handlerInfo] of client.contextHandlers) {
|
13411
|
-
if (InteropBroker.isContextTypeCompatible(broadcastedContextType, handlerInfo.contextType)) {
|
13412
|
-
this.invokeContextHandler(client.clientIdentity, handlerInfo.handlerId, context);
|
13413
|
-
}
|
13414
|
-
}
|
13415
|
-
});
|
13395
|
+
this.setContextForGroup({ context }, contextGroupId);
|
13416
13396
|
}
|
13417
13397
|
else if (clientState) {
|
13418
13398
|
// Client has not joined any context group behavior.
|
@@ -13423,6 +13403,36 @@ function requireInteropBroker () {
|
|
13423
13403
|
throw new Error(`Client with Identity: ${clientIdentity.uuid} ${clientIdentity.name} not in Client State Map`);
|
13424
13404
|
}
|
13425
13405
|
}
|
13406
|
+
/**
|
13407
|
+
* Sets a context for the context group.
|
13408
|
+
* @param setContextOptions - New context to set.
|
13409
|
+
* @param contextGroupId - Context group id.
|
13410
|
+
*
|
13411
|
+
*/
|
13412
|
+
setContextForGroup({ context }, contextGroupId) {
|
13413
|
+
this.wire.sendAction('interop-broker-set-context-for-group').catch((e) => {
|
13414
|
+
// don't expose, analytics-only call
|
13415
|
+
});
|
13416
|
+
const contextGroupState = this.contextGroupsById.get(contextGroupId);
|
13417
|
+
if (!contextGroupState) {
|
13418
|
+
throw new Error(`Unable to set context for context group that isn't in the context group mapping: ${contextGroupId}.`);
|
13419
|
+
}
|
13420
|
+
const contextIntegrityCheckResult = InteropBroker.checkContextIntegrity(context);
|
13421
|
+
if (contextIntegrityCheckResult.isValid === false) {
|
13422
|
+
throw new Error(`Failed to set Context - bad Context. Reason: ${contextIntegrityCheckResult.reason}. Context: ${JSON.stringify(context)}`);
|
13423
|
+
}
|
13424
|
+
const broadcastedContextType = context.type;
|
13425
|
+
contextGroupState.set(broadcastedContextType, context);
|
13426
|
+
this.lastContextMap.set(contextGroupId, broadcastedContextType);
|
13427
|
+
const clientsInSameContextGroup = Array.from(this.interopClients.values()).filter((connectedClient) => connectedClient.contextGroupId === contextGroupId);
|
13428
|
+
clientsInSameContextGroup.forEach((client) => {
|
13429
|
+
for (const [, handlerInfo] of client.contextHandlers) {
|
13430
|
+
if (InteropBroker.isContextTypeCompatible(broadcastedContextType, handlerInfo.contextType)) {
|
13431
|
+
this.invokeContextHandler(client.clientIdentity, handlerInfo.handlerId, context);
|
13432
|
+
}
|
13433
|
+
}
|
13434
|
+
});
|
13435
|
+
}
|
13426
13436
|
/**
|
13427
13437
|
* Get current context for a client subscribed to a Context Group.
|
13428
13438
|
*
|