@adaptabletools/adaptable-plugin-openfin 19.1.0-canary.0 → 19.1.1

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@adaptabletools/adaptable-plugin-openfin",
3
- "version": "19.1.0-canary.0",
3
+ "version": "19.1.1",
4
4
  "description": "",
5
5
  "homepage": "http://www.adaptabletools.com/",
6
6
  "author": {
@@ -18,7 +18,7 @@
18
18
  "redux": "4.0.5",
19
19
  "styled-components": "^4.4.1",
20
20
  "tslib": "^2.3.0",
21
- "@adaptabletools/adaptable": "19.1.0-canary.0"
21
+ "@adaptabletools/adaptable": "19.1.1"
22
22
  },
23
23
  "type": "module",
24
24
  "module": "src/index.js"
@@ -7,7 +7,7 @@ import { IAdaptable } from '@adaptabletools/adaptable/src/AdaptableInterfaces/IA
7
7
  export declare class OpenFinApiImpl extends ApiBase implements OpenFinApi {
8
8
  private options;
9
9
  private OpenFinService;
10
- constructor(adaptable: IAdaptable, options: OpenFinPluginOptions);
10
+ constructor(_adaptable: IAdaptable, options: OpenFinPluginOptions);
11
11
  getPluginOptions(): OpenFinPluginOptions;
12
12
  showNotificationForAlert(alert: AdaptableAlert): void;
13
13
  showNotification(notification: any, alert?: AdaptableAlert): void;
@@ -16,8 +16,8 @@ if (typeof window !== 'undefined' && window.document) {
16
16
  }
17
17
  const CLICK_ALERT_BUTTON = 'adaptable-click-alert-button';
18
18
  export class OpenFinApiImpl extends ApiBase {
19
- constructor(adaptable, options) {
20
- super(adaptable);
19
+ constructor(_adaptable, options) {
20
+ super(_adaptable);
21
21
  this.OpenFinService = null;
22
22
  this.options = options;
23
23
  if (isRunningInOpenfin()) {
@@ -27,7 +27,7 @@ export class OpenFinApiImpl extends ApiBase {
27
27
  ((_a = event.notification.customData) === null || _a === void 0 ? void 0 : _a.name) === 'validation-failed') {
28
28
  if (this.getCurrentLiveOpenFinReport()) {
29
29
  try {
30
- let openFinModule = (this.adaptable.adaptableModules.get(ModuleConstants.OpenFinModuleId));
30
+ let openFinModule = (this.getAdaptableInternalApi().getModules().get(ModuleConstants.OpenFinModuleId));
31
31
  openFinModule.sendInitialLiveData(true);
32
32
  }
33
33
  catch (ex) {
@@ -37,20 +37,20 @@ export class OpenFinApiImpl extends ApiBase {
37
37
  }
38
38
  }
39
39
  const alertId = (_c = (_b = event.notification.customData) === null || _b === void 0 ? void 0 : _b.AlertId) !== null && _c !== void 0 ? _c : '';
40
- const alert = adaptable.api.alertApi.internalApi
41
- .getAdaptableAlerts()
40
+ const alert = this.getAlertApi()
41
+ .internalApi.getAdaptableAlerts()
42
42
  .find((alert) => alert.Uuid === alertId);
43
43
  if (event.result.task === CLICK_ALERT_BUTTON) {
44
44
  const clickedButton = event.result.customData;
45
45
  if (clickedButton) {
46
46
  const context = {
47
47
  alert: alert,
48
- adaptableApi: adaptable.api,
49
- userName: adaptable.adaptableOptions.userName,
50
- adaptableId: adaptable.adaptableOptions.adaptableId,
48
+ adaptableApi: this.getAdaptableApi(),
49
+ userName: this.getOptions().userName,
50
+ adaptableId: this.getOptions().adaptableId,
51
51
  formData: undefined,
52
52
  };
53
- adaptable.api.alertApi.internalApi.executeAlertButton(clickedButton, context);
53
+ this.getAlertApi().internalApi.executeAlertButton(clickedButton, context);
54
54
  }
55
55
  }
56
56
  event.notification.alert = alert;
@@ -106,7 +106,7 @@ export class OpenFinApiImpl extends ApiBase {
106
106
  notification.expires = new Date(Date.now() + this.options.notificationTimeout);
107
107
  }
108
108
  const showIcon = this.options.showAppIconInNotifications;
109
- const appIcon = (_a = this.adaptable.api.optionsApi.getUserInterfaceOptions()) === null || _a === void 0 ? void 0 : _a.applicationIcon;
109
+ const appIcon = (_a = this.getUserInterfaceOptions()) === null || _a === void 0 ? void 0 : _a.applicationIcon;
110
110
  if (!notification.icon && showIcon && isAdaptableCustomIcon(appIcon)) {
111
111
  notification.icon = appIcon.src;
112
112
  }