@openfin/fdc3-api 37.81.30 → 38.81.22

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/fdc3-api.js CHANGED
@@ -1292,7 +1292,9 @@ function requireInteropClient () {
1292
1292
  * ```
1293
1293
  *
1294
1294
  *
1295
- * Passing in a context type as the second parameter will cause the handler to only be invoked with that context type.
1295
+ * We are also testing the ability to add a context handler for specific contexts. If you would like to use
1296
+ * this, please make sure you add your context handlers at the top level of your application, on a page that
1297
+ * does not navigate/reload/re-render, to avoid memory leaks. This feature is experimental:
1296
1298
  *
1297
1299
  * ```js
1298
1300
  * function handleInstrumentContext(contextInfo) {
@@ -1321,6 +1323,7 @@ function requireInteropClient () {
1321
1323
  let handlerId;
1322
1324
  if (contextType) {
1323
1325
  handlerId = `invokeContextHandler-${contextType}-${(0, utils_1.generateId)()}`;
1326
+ console.warn(`Warning: By providing a contextType (${contextType}), you are using the experimental addContextHandler. To avoid issues, make sure you are adding your context handlers at the top level in your application.`);
1324
1327
  }
1325
1328
  else {
1326
1329
  handlerId = 'invokeContextHandler';
@@ -1819,14 +1822,6 @@ function requireFdc3Common () {
1819
1822
  throw new Error(errorToThrow);
1820
1823
  }
1821
1824
  }
1822
- async _getChannels() {
1823
- const channels = await this.client.getContextGroups();
1824
- // fdc3 implementation of getSystemChannels returns an array of channels, have to decorate over
1825
- // this so people know that these APIs are not supported
1826
- return channels.map((channel) => {
1827
- return { ...channel, type: 'system', ...(0, utils_1.getUnsupportedChannelApis)() };
1828
- });
1829
- }
1830
1825
  /**
1831
1826
  * Returns a Channel object for the specified channel, creating it as an App Channel if it does not exist.
1832
1827
  * @param channelId
@@ -1837,7 +1832,7 @@ function requireFdc3Common () {
1837
1832
  this.wire.sendAction('fdc3-get-or-create-channel').catch((e) => {
1838
1833
  // we do not want to expose this error, just continue if this analytics-only call fails
1839
1834
  });
1840
- const systemChannels = await this._getChannels();
1835
+ const systemChannels = await this.getSystemChannels();
1841
1836
  const userChannel = systemChannels.find((channel) => channel.id === channelId);
1842
1837
  if (userChannel) {
1843
1838
  return { ...userChannel, type: 'system', ...(0, utils_1.getUnsupportedChannelApis)() };
@@ -1861,7 +1856,12 @@ function requireFdc3Common () {
1861
1856
  this.wire.sendAction('fdc3-get-system-channels').catch((e) => {
1862
1857
  // we do not want to expose this error, just continue if this analytics-only call fails
1863
1858
  });
1864
- return this._getChannels();
1859
+ const channels = await this.client.getContextGroups();
1860
+ // fdc3 implementation of getSystemChannels returns on array of channels, have to decorate over
1861
+ // this so people know that these APIs are not supported
1862
+ return channels.map((channel) => {
1863
+ return { ...channel, type: 'system', ...(0, utils_1.getUnsupportedChannelApis)() };
1864
+ });
1865
1865
  }
1866
1866
  /**
1867
1867
  * Join all Interop Clients at the given identity to context group `contextGroupId`.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@openfin/fdc3-api",
3
- "version": "37.81.30",
3
+ "version": "38.81.22",
4
4
  "description": "OpenFin fdc3 module utilities and types.",
5
5
  "license": "SEE LICENSE IN LICENSE.MD",
6
6
  "private": false,