@adaptabletools/adaptable-plugin-openfin 11.0.0-canary.2 → 11.0.0-canary.6
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,10 +1,16 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@adaptabletools/adaptable-plugin-openfin",
|
|
3
|
-
"version": "11.0.0-canary.
|
|
3
|
+
"version": "11.0.0-canary.6",
|
|
4
4
|
"description": "",
|
|
5
|
+
"homepage": "http://www.adaptabletools.com/",
|
|
6
|
+
"author": {
|
|
7
|
+
"name": "Jonny Wolfson",
|
|
8
|
+
"email": "jonny.wolfson@adaptabletools.com"
|
|
9
|
+
},
|
|
5
10
|
"main": "src/index.js",
|
|
11
|
+
"typings": "src/index.d.ts",
|
|
6
12
|
"dependencies": {
|
|
7
|
-
"lodash
|
|
13
|
+
"lodash": "^4.17.15",
|
|
8
14
|
"openfin-fdc3": "^0.2.3",
|
|
9
15
|
"openfin-notifications": "^0.12.6",
|
|
10
16
|
"prop-types": "^15.6.2",
|
|
@@ -14,11 +20,6 @@
|
|
|
14
20
|
"redux": "4.0.5",
|
|
15
21
|
"styled-components": "^4.4.1",
|
|
16
22
|
"tslib": "^2.0.0",
|
|
17
|
-
"@adaptabletools/adaptable": "11.0.0-canary.
|
|
18
|
-
}
|
|
19
|
-
"author": {
|
|
20
|
-
"name": "Jonny Wolfson",
|
|
21
|
-
"email": "jonny.wolfson@adaptabletools.com"
|
|
22
|
-
},
|
|
23
|
-
"homepage": "http://www.adaptabletools.com/"
|
|
23
|
+
"@adaptabletools/adaptable": "11.0.0-canary.6"
|
|
24
|
+
}
|
|
24
25
|
}
|
|
@@ -4,7 +4,7 @@ exports.OpenFinModule = exports.EXCEL_VALIDATION_FAILED = void 0;
|
|
|
4
4
|
const tslib_1 = require("tslib");
|
|
5
5
|
const AdaptableModuleBase_1 = require("@adaptabletools/adaptable/src/Strategy/AdaptableModuleBase");
|
|
6
6
|
const ModuleConstants = tslib_1.__importStar(require("@adaptabletools/adaptable/src/Utilities/Constants/ModuleConstants"));
|
|
7
|
-
const throttle_1 = tslib_1.__importDefault(require("lodash
|
|
7
|
+
const throttle_1 = tslib_1.__importDefault(require("lodash/throttle"));
|
|
8
8
|
const logger_1 = require("../logger");
|
|
9
9
|
const GeneralConstants_1 = require("@adaptabletools/adaptable/src/Utilities/Constants/GeneralConstants");
|
|
10
10
|
exports.EXCEL_VALIDATION_FAILED = 'excelValidationFailed';
|
|
@@ -203,11 +203,11 @@ class OpenFinModule extends AdaptableModuleBase_1.AdaptableModuleBase {
|
|
|
203
203
|
this.adaptable.api.predicateApi.predicateToString((_a = failedValidationRules[0].Rule) === null || _a === void 0 ? void 0 : _a.Predicate);
|
|
204
204
|
const info = Object.assign({}, dataChangedInfo);
|
|
205
205
|
delete info.rowNode;
|
|
206
|
-
const
|
|
207
|
-
|
|
206
|
+
const alertOptions = api.getAlertOptions();
|
|
207
|
+
alertOptions.actionHandlers = (_b = alertOptions.actionHandlers) !== null && _b !== void 0 ? _b : [];
|
|
208
208
|
if (pluginOptions.onValidationFailureInExcel === 'show-undo-notification' &&
|
|
209
|
-
!
|
|
210
|
-
|
|
209
|
+
!alertOptions.actionHandlers.find((handler) => handler.name === 'openfin-plugin:excel-undo')) {
|
|
210
|
+
alertOptions.actionHandlers.push({
|
|
211
211
|
name: 'openfin-plugin:excel-undo',
|
|
212
212
|
handler: (button, context) => {
|
|
213
213
|
try {
|
package/src/OpenFinApiImpl.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { ApiBase } from '@adaptabletools/adaptable/src/Api/Implementation/ApiBase';
|
|
2
2
|
import { OpenFinApi } from '@adaptabletools/adaptable/src/Api/OpenFinApi';
|
|
3
3
|
import { OpenFinPluginOptions } from '@adaptabletools/adaptable/src/AdaptableOptions/OpenFinPluginOptions';
|
|
4
|
-
import { AdaptableAlert, NotificationsOptions } from '@adaptabletools/adaptable/types';
|
|
4
|
+
import { AdaptableAlert, NotificationsOptions, AlertOptions } from '@adaptabletools/adaptable/types';
|
|
5
5
|
import { OpenFinState, OpenFinReport, OpenFinSchedule } from '@adaptabletools/adaptable/src/PredefinedConfig/OpenFinState';
|
|
6
6
|
import { IAdaptable } from '@adaptabletools/adaptable/src/AdaptableInterfaces/IAdaptable';
|
|
7
7
|
export declare class OpenFinApiImpl extends ApiBase implements OpenFinApi {
|
|
@@ -20,6 +20,7 @@ export declare class OpenFinApiImpl extends ApiBase implements OpenFinApi {
|
|
|
20
20
|
getCurrentLiveOpenFinReport(): OpenFinReport | undefined;
|
|
21
21
|
getOpenFinSchedules(): OpenFinSchedule[];
|
|
22
22
|
getNotificationsOptions(): NotificationsOptions;
|
|
23
|
+
getAlertOptions(): AlertOptions;
|
|
23
24
|
startLiveData(OpenFinReport: OpenFinReport): void;
|
|
24
25
|
stopLiveData(): void;
|
|
25
26
|
showOpenFinPopup(): void;
|
package/src/OpenFinApiImpl.js
CHANGED
|
@@ -113,8 +113,7 @@ class OpenFinApiImpl extends ApiBase_1.ApiBase {
|
|
|
113
113
|
notification.expires = new Date(Date.now() + this.options.notificationTimeout);
|
|
114
114
|
}
|
|
115
115
|
const showIcon = this.options.showAppIconInNotifications;
|
|
116
|
-
const appIcon = (_a = this.adaptable.api.internalApi.getAdaptableOptions()
|
|
117
|
-
.userInterfaceOptions) === null || _a === void 0 ? void 0 : _a.applicationIcon;
|
|
116
|
+
const appIcon = (_a = this.adaptable.api.internalApi.getAdaptableOptions().userInterfaceOptions) === null || _a === void 0 ? void 0 : _a.applicationIcon;
|
|
118
117
|
if (!notification.icon && appIcon && showIcon) {
|
|
119
118
|
notification.icon = appIcon.src;
|
|
120
119
|
}
|
|
@@ -158,6 +157,9 @@ class OpenFinApiImpl extends ApiBase_1.ApiBase {
|
|
|
158
157
|
getNotificationsOptions() {
|
|
159
158
|
return this.getAdaptableApi().internalApi.getAdaptableOptions().notificationsOptions;
|
|
160
159
|
}
|
|
160
|
+
getAlertOptions() {
|
|
161
|
+
return this.getAdaptableApi().internalApi.getAdaptableOptions().alertOptions;
|
|
162
|
+
}
|
|
161
163
|
startLiveData(OpenFinReport) {
|
|
162
164
|
if (this.checkItemExists(OpenFinReport, OpenFinReport.ReportName, 'OpenFin Report')) {
|
|
163
165
|
this.dispatchAction(OpenFinRedux.OpenFinStartLiveData(OpenFinReport));
|