@adaptabletools/adaptable-plugin-openfin 10.0.0-canary.1 → 10.0.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,10 +1,9 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@adaptabletools/adaptable-plugin-openfin",
|
|
3
|
-
"version": "10.0.
|
|
3
|
+
"version": "10.0.1",
|
|
4
4
|
"description": "",
|
|
5
5
|
"main": "src/index.js",
|
|
6
6
|
"dependencies": {
|
|
7
|
-
"@grid-utils/openfin": "^9.1.0",
|
|
8
7
|
"lodash-es": "^4.17.15",
|
|
9
8
|
"openfin-fdc3": "^0.2.3",
|
|
10
9
|
"openfin-notifications": "^0.12.6",
|
|
@@ -14,7 +13,7 @@
|
|
|
14
13
|
"rebass": "^3.2.2",
|
|
15
14
|
"redux": "4.0.5",
|
|
16
15
|
"styled-components": "^4.4.1",
|
|
17
|
-
"@adaptabletools/adaptable": "10.0.
|
|
16
|
+
"@adaptabletools/adaptable": "10.0.1"
|
|
18
17
|
},
|
|
19
18
|
"author": {
|
|
20
19
|
"name": "Jonny Wolfson",
|
|
@@ -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 notificationsOptions = api.getNotificationsOptions();
|
|
207
|
+
notificationsOptions.actionHandlers = (_b = notificationsOptions.actionHandlers) !== null && _b !== void 0 ? _b : [];
|
|
208
208
|
if (pluginOptions.onValidationFailureInExcel === 'show-undo-notification' &&
|
|
209
|
-
!
|
|
210
|
-
|
|
209
|
+
!notificationsOptions.actionHandlers.find((handler) => handler.name === 'openfin-plugin:excel-undo')) {
|
|
210
|
+
notificationsOptions.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,
|
|
4
|
+
import { AdaptableAlert, NotificationsOptions } 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 {
|
|
@@ -19,7 +19,7 @@ export declare class OpenFinApiImpl extends ApiBase implements OpenFinApi {
|
|
|
19
19
|
getOpenFinThrottleTime(): number | undefined;
|
|
20
20
|
getCurrentLiveOpenFinReport(): OpenFinReport | undefined;
|
|
21
21
|
getOpenFinSchedules(): OpenFinSchedule[];
|
|
22
|
-
|
|
22
|
+
getNotificationsOptions(): NotificationsOptions;
|
|
23
23
|
startLiveData(OpenFinReport: OpenFinReport): void;
|
|
24
24
|
stopLiveData(): void;
|
|
25
25
|
showOpenFinPopup(): void;
|
package/src/OpenFinApiImpl.js
CHANGED
|
@@ -155,8 +155,8 @@ class OpenFinApiImpl extends ApiBase_1.ApiBase {
|
|
|
155
155
|
getOpenFinSchedules() {
|
|
156
156
|
return this.getAdaptableState().Schedule.OpenFinSchedules || [];
|
|
157
157
|
}
|
|
158
|
-
|
|
159
|
-
return this.getAdaptableApi().internalApi.getAdaptableOptions().
|
|
158
|
+
getNotificationsOptions() {
|
|
159
|
+
return this.getAdaptableApi().internalApi.getAdaptableOptions().notificationsOptions;
|
|
160
160
|
}
|
|
161
161
|
startLiveData(OpenFinReport) {
|
|
162
162
|
if (this.checkItemExists(OpenFinReport, OpenFinReport.ReportName, 'OpenFin Report')) {
|
|
@@ -64,7 +64,7 @@ class OpenFinViewPanelComponent extends React.Component {
|
|
|
64
64
|
React.createElement(rebass_1.Flex, null,
|
|
65
65
|
React.createElement(Dropdown_1.default, { disabled: !IS_OPENFIN || allReports.length == 0 || isLiveOpenFinReport, style: { minWidth: 160 }, options: availableReports, className: `ab-${elementType}__OpenFin__select`, placeholder: !IS_OPENFIN ? 'Not available' : 'Select Report', onChange: (reportName) => this.onSelectedReportChanged(reportName), value: this.props.currentReportName, showClearButton: true, marginRight: 2 })),
|
|
66
66
|
React.createElement(rebass_1.Flex, null,
|
|
67
|
-
isLiveOpenFinReport ? (React.createElement(ButtonPause_1.ButtonPause, { marginLeft: 1, className: `ab-${elementType}__OpenFin__pause`, onClick: () => this.getOpenFinApi().stopLiveData(), tooltip: "Stop sync with OpenFin", disabled: !isLiveOpenFinReport, accessLevel: this.props.accessLevel })) : (React.createElement(ButtonPlay_1.ButtonPlay, { marginLeft: 1, className: `ab-${elementType}__OpenFin__play`, onClick: () => this.onOpenFinStartLiveData(), tooltip: "Start sync with OpenFin", disabled: isLiveOpenFinReport || !isCompletedReport, accessLevel: this.props.accessLevel })),
|
|
67
|
+
isLiveOpenFinReport ? (React.createElement(ButtonPause_1.ButtonPause, { fillColor: 'red', marginLeft: 1, className: `ab-${elementType}__OpenFin__pause`, onClick: () => this.getOpenFinApi().stopLiveData(), tooltip: "Stop sync with OpenFin", disabled: !isLiveOpenFinReport, accessLevel: this.props.accessLevel })) : (React.createElement(ButtonPlay_1.ButtonPlay, { marginLeft: 1, className: `ab-${elementType}__OpenFin__play`, onClick: () => this.onOpenFinStartLiveData(), tooltip: "Start sync with OpenFin", disabled: isLiveOpenFinReport || !isCompletedReport, accessLevel: this.props.accessLevel })),
|
|
68
68
|
React.createElement(rebass_1.Flex, { className: join_1.default(this.props.accessLevel == 'ReadOnly' ? GeneralConstants.READ_ONLY_STYLE : '', `ab-${elementType}__OpenFin__controls`), alignItems: "stretch" },
|
|
69
69
|
React.createElement(ButtonSchedule_1.ButtonSchedule, { marginLeft: 1, className: `ab-${elementType}__OpenFin__schedule`, onClick: () => this.onNewOpenFinSchedule(), tooltip: "Schedule", disabled: !IS_OPENFIN, accessLevel: this.props.accessLevel })))));
|
|
70
70
|
}
|
package/src/index.js
CHANGED
|
@@ -14,7 +14,6 @@ const OpenFinService_1 = require("./Utilities/Services/OpenFinService");
|
|
|
14
14
|
const OpenFinRedux_1 = require("./Redux/ActionReducers/OpenFinRedux");
|
|
15
15
|
const PluginsRedux_1 = require("@adaptabletools/adaptable/src/Redux/ActionsReducers/PluginsRedux");
|
|
16
16
|
const OpenFinViewPanel_1 = require("./View/OpenFinViewPanel");
|
|
17
|
-
const openfin_1 = require("@grid-utils/openfin");
|
|
18
17
|
if (package_json_1.version !== version_1.default) {
|
|
19
18
|
console.warn(`
|
|
20
19
|
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
|
|
@@ -69,7 +68,6 @@ class OpenFinPlugin extends types_1.AdaptablePlugin {
|
|
|
69
68
|
};
|
|
70
69
|
};
|
|
71
70
|
this.options = Object.assign(Object.assign({}, defaultOptions), options);
|
|
72
|
-
const isAlive = new openfin_1.CoreUtils().isAlive();
|
|
73
71
|
}
|
|
74
72
|
beforeInit(adaptableOptions) {
|
|
75
73
|
/*
|