@adaptabletools/adaptable-plugin-interopio 23.0.4-canary.0 → 23.0.5-canary.0

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.
Files changed (2) hide show
  1. package/package.json +1 -1
  2. package/src/index.js +0 -16
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@adaptabletools/adaptable-plugin-interopio",
3
- "version": "23.0.4-canary.0",
3
+ "version": "23.0.5-canary.0",
4
4
  "description": "",
5
5
  "homepage": "http://www.adaptabletools.com/",
6
6
  "author": {
package/src/index.js CHANGED
@@ -31,23 +31,10 @@ class InteropioPlugin extends AdaptablePlugin {
31
31
  this.adaptableInteropApi = new InteropioPluginApiImpl(adaptable, this.options);
32
32
  this.registerProperty('api', () => this.adaptableInteropApi);
33
33
  }
34
- /**
35
- * Interopio Notifications logic has two main parts:
36
- * - a handler that is registered using the interop API;
37
- * -- This handler is invoked when a notification action is clicked.
38
- * -- We have a map in which we register actions for a given alert.
39
- * - rising a notification using the Interopio API
40
- * -- here for each action an interop method is registered
41
- * -- information is passed to indicate which button and lert was clicked
42
- * -- using this information the action map is populated
43
- */
44
34
  async integrateAdaptableAlerts() {
45
35
  if (!this.options.showAdaptableAlertsAsNotifications) {
46
36
  return;
47
37
  }
48
- /**
49
- * A way to keep in memory what actions were registered for a given alert.
50
- */
51
38
  const actionsMap = new Map();
52
39
  const ADAPTABLE_INTEROP_NOTIFICATION_HANDLER = `ADAPTABLE_INTEROP_NOTIFICATION_HANDLER_${Date.now()}}`;
53
40
  const adaptableInteropNotificationHandler = ({ buttonId }) => {
@@ -60,8 +47,6 @@ class InteropioPlugin extends AdaptablePlugin {
60
47
  ...this.adaptable.api.internalApi.buildBaseContext(),
61
48
  };
62
49
  this.adaptable.api.alertApi.internalApi.executeAlertButton(button, context);
63
- // we need to delete all actions for the given alert
64
- // because once the button is clicked, the notification is closed
65
50
  for (const [key, value] of actionsMap.entries()) {
66
51
  if (value.alert === alert) {
67
52
  actionsMap.delete(key);
@@ -102,7 +87,6 @@ class InteropioPlugin extends AdaptablePlugin {
102
87
  actions: adaptableActions,
103
88
  };
104
89
  this.interopApi.notifications.raise(notificationOptions);
105
- // Returning false prevents adaptable from showing the alert notification.
106
90
  return false;
107
91
  });
108
92
  }