@adaptabletools/adaptable-plugin-openfin-cjs 21.2.2-canary.0 → 22.0.0-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.
- package/package.json +1 -1
- package/src/OpenFinHelper.js +8 -8
- package/src/Utilities/Services/OpenFinService.d.ts +1 -1
- package/src/Utilities/Services/OpenFinService.js +2 -2
- package/src/Utilities/isRunningInOpenfin.js +1 -2
- package/src/View/OpenFinPopup.d.ts +2 -1
- package/src/View/OpenFinPopup.js +1 -1
- package/src/View/OpenFinViewPanel.js +3 -3
package/package.json
CHANGED
package/src/OpenFinHelper.js
CHANGED
|
@@ -1,7 +1,14 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
/*import { ExcelWorkbook } from '../Services/OpenfinLiveExcel/ExcelWorkbook';*/
|
|
3
3
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
|
-
exports.OpenfinHelper = exports.
|
|
4
|
+
exports.OpenfinHelper = exports.EventDispatcher = void 0;
|
|
5
|
+
exports.OnExcelDisconnected = OnExcelDisconnected;
|
|
6
|
+
exports.OnWorkbookDisconnected = OnWorkbookDisconnected;
|
|
7
|
+
exports.OnWorkbookSaved = OnWorkbookSaved;
|
|
8
|
+
exports.isRunningInOpenfin = isRunningInOpenfin;
|
|
9
|
+
exports.isExcelOpenfinLoaded = isExcelOpenfinLoaded;
|
|
10
|
+
exports.pushData = pushData;
|
|
11
|
+
exports.initOpenFinExcel = initOpenFinExcel;
|
|
5
12
|
// putting this here as we dont use it elswhere - so keeping it here until we redo the OpenFin one day...
|
|
6
13
|
const AdaptableLogger_1 = require("@adaptabletools/adaptable-cjs/src/agGrid/AdaptableLogger");
|
|
7
14
|
class EventDispatcher {
|
|
@@ -41,23 +48,18 @@ let _onWorkbookSaved = new EventDispatcher();
|
|
|
41
48
|
function OnExcelDisconnected() {
|
|
42
49
|
return _onExcelDisconnected;
|
|
43
50
|
}
|
|
44
|
-
exports.OnExcelDisconnected = OnExcelDisconnected;
|
|
45
51
|
function OnWorkbookDisconnected() {
|
|
46
52
|
return _onWorkbookDisconnected;
|
|
47
53
|
}
|
|
48
|
-
exports.OnWorkbookDisconnected = OnWorkbookDisconnected;
|
|
49
54
|
function OnWorkbookSaved() {
|
|
50
55
|
return _onWorkbookSaved;
|
|
51
56
|
}
|
|
52
|
-
exports.OnWorkbookSaved = OnWorkbookSaved;
|
|
53
57
|
function isRunningInOpenfin() {
|
|
54
58
|
return 'fin' in window && 'desktop' in fin;
|
|
55
59
|
}
|
|
56
|
-
exports.isRunningInOpenfin = isRunningInOpenfin;
|
|
57
60
|
function isExcelOpenfinLoaded() {
|
|
58
61
|
return isRunningInOpenfin() && 'Excel' in fin.desktop;
|
|
59
62
|
}
|
|
60
|
-
exports.isExcelOpenfinLoaded = isExcelOpenfinLoaded;
|
|
61
63
|
function addWorkbook() {
|
|
62
64
|
return new Promise((resolve, reject) => {
|
|
63
65
|
AdaptableLogger_1.AdaptableLogger.consoleLogBase('Creating new workbook');
|
|
@@ -103,7 +105,6 @@ function pushData(workBookName, data) {
|
|
|
103
105
|
resolve();
|
|
104
106
|
});
|
|
105
107
|
}
|
|
106
|
-
exports.pushData = pushData;
|
|
107
108
|
/**
|
|
108
109
|
* @deprecated not used anymore
|
|
109
110
|
*/
|
|
@@ -133,7 +134,6 @@ function initOpenFinExcel() {
|
|
|
133
134
|
}
|
|
134
135
|
// });
|
|
135
136
|
}
|
|
136
|
-
exports.initOpenFinExcel = initOpenFinExcel;
|
|
137
137
|
function initExcelPluginService() {
|
|
138
138
|
var installFolder = '%localappdata%\\OpenFin\\shared\\assets\\excel-api-addin';
|
|
139
139
|
var servicePath = 'OpenFin.ExcelService.exe';
|
|
@@ -32,5 +32,5 @@ export declare class OpenFinService implements IOpenFinService {
|
|
|
32
32
|
waitForExcel: () => Promise<unknown>;
|
|
33
33
|
constructor(adaptable: IAdaptable, options: OpenFinPluginOptions);
|
|
34
34
|
on: (eventName: string, callback: EmitterCallback) => (() => void);
|
|
35
|
-
emit: (eventName:
|
|
35
|
+
emit: (eventName: "sheetchanged", data: any) => Promise<any>;
|
|
36
36
|
}
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.OpenFinService =
|
|
3
|
+
exports.OpenFinService = void 0;
|
|
4
|
+
exports.isExcelOpenfinLoaded = isExcelOpenfinLoaded;
|
|
4
5
|
const tslib_1 = require("tslib");
|
|
5
6
|
const Emitter_1 = tslib_1.__importDefault(require("@adaptabletools/adaptable-cjs/src/Utilities/Emitter"));
|
|
6
7
|
const setup_1 = require("./setup");
|
|
@@ -13,7 +14,6 @@ if ((0, isRunningInOpenfin_1.isRunningInOpenfin)()) {
|
|
|
13
14
|
function isExcelOpenfinLoaded() {
|
|
14
15
|
return (0, isRunningInOpenfin_1.isRunningInOpenfin)() && 'Excel' in fin.desktop;
|
|
15
16
|
}
|
|
16
|
-
exports.isExcelOpenfinLoaded = isExcelOpenfinLoaded;
|
|
17
17
|
class OpenFinService {
|
|
18
18
|
getOpenFinApi() {
|
|
19
19
|
return this.adaptable.api.pluginsApi.getOpenFinPluginApi();
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.isRunningInOpenfin =
|
|
3
|
+
exports.isRunningInOpenfin = isRunningInOpenfin;
|
|
4
4
|
function isRunningInOpenfin() {
|
|
5
5
|
return 'fin' in window && 'desktop' in fin;
|
|
6
6
|
}
|
|
7
|
-
exports.isRunningInOpenfin = isRunningInOpenfin;
|
|
@@ -10,5 +10,6 @@ interface OpenFinPopupProps extends ModuleViewPopupProps<any> {
|
|
|
10
10
|
onOpenFinSendSnapshot: (OpenFineport: OpenFinReport) => OpenFinRedux.OpenFinSendSnapshotAction;
|
|
11
11
|
onShare: (entity: AdaptableObject, config: AdaptableSharedEntityConfig) => TeamSharingRedux.TeamSharingShareAction;
|
|
12
12
|
}
|
|
13
|
-
|
|
13
|
+
declare const OpenFinPopupComponent: React.FC<OpenFinPopupProps>;
|
|
14
|
+
export declare const OpenFinPopup: ConnectedComponent<typeof OpenFinPopupComponent, Pick<OpenFinPopupProps, never>>;
|
|
14
15
|
export {};
|
package/src/View/OpenFinPopup.js
CHANGED
|
@@ -18,7 +18,7 @@ const OpenFinPopupComponent = (props) => {
|
|
|
18
18
|
// const onApplyExport = (OpenFinReport: OpenFinReport) => {
|
|
19
19
|
// props.onOpenFinSendSnapshot(OpenFinReport);
|
|
20
20
|
// };
|
|
21
|
-
return (React.createElement(PanelWithButton_1.PanelWithButton, { headerText: props.moduleInfo.FriendlyName, bodyProps: {
|
|
21
|
+
return (React.createElement(PanelWithButton_1.PanelWithButton, { headerText: props.moduleInfo.FriendlyName, bodyProps: { className: 'twa:p-0' }, glyphicon: props.moduleInfo.Glyph, infoLink: props.moduleInfo.HelpPage, infoLinkDisabled: !props.api.internalApi.isDocumentationLinksDisplayed() }));
|
|
22
22
|
};
|
|
23
23
|
function mapStateToProps(state) {
|
|
24
24
|
return {};
|
|
@@ -61,11 +61,11 @@ class OpenFinViewPanelComponent extends React.Component {
|
|
|
61
61
|
const elementType = this.props.viewType === 'Toolbar' ? 'DashboardToolbar' : 'ToolPanel';
|
|
62
62
|
return (React.createElement(rebass_1.Flex, { flexDirection: "row", className: `ab-${elementType}__OpenFin__wrap`, flexWrap: this.props.viewType === 'ToolPanel' ? 'wrap' : 'nowrap' },
|
|
63
63
|
React.createElement(rebass_1.Flex, null,
|
|
64
|
-
React.createElement(Dropdown_1.default, { disabled: !IS_OPENFIN || allReports.length == 0 || isLiveOpenFinReport,
|
|
64
|
+
React.createElement(Dropdown_1.default, { disabled: !IS_OPENFIN || allReports.length == 0 || isLiveOpenFinReport, options: availableReports, className: `ab-${elementType}__OpenFin__select twa:mr-2 twa:min-w-[160px]`, placeholder: !IS_OPENFIN ? 'Not available' : 'Select Report', onChange: (reportName) => this.onSelectedReportChanged(reportName), value: this.props.currentReportName, showClearButton: true })),
|
|
65
65
|
React.createElement(rebass_1.Flex, null,
|
|
66
|
-
isLiveOpenFinReport ? (React.createElement(ButtonPause_1.ButtonPause, { fillColor: 'red',
|
|
66
|
+
isLiveOpenFinReport ? (React.createElement(ButtonPause_1.ButtonPause, { fillColor: 'red', className: `ab-${elementType}__OpenFin__pause twa:ml-1`, onClick: () => this.getOpenFinApi().stopLiveData(), tooltip: "Stop sync with OpenFin", disabled: !isLiveOpenFinReport, accessLevel: this.props.accessLevel })) : (React.createElement(ButtonPlay_1.ButtonPlay, { className: `ab-${elementType}__OpenFin__play twa:ml-1`, onClick: () => this.onOpenFinStartLiveData(), tooltip: "Start sync with OpenFin", disabled: isLiveOpenFinReport || !isCompletedReport, accessLevel: this.props.accessLevel })),
|
|
67
67
|
React.createElement(rebass_1.Flex, { className: (0, join_1.default)(this.props.accessLevel == 'ReadOnly' ? GeneralConstants.READ_ONLY_STYLE : '', `ab-${elementType}__OpenFin__controls`), alignItems: "stretch" },
|
|
68
|
-
React.createElement(ButtonSchedule_1.ButtonSchedule, {
|
|
68
|
+
React.createElement(ButtonSchedule_1.ButtonSchedule, { className: `ab-${elementType}__OpenFin__schedule twa:ml-1`, onClick: () => this.onNewOpenFinSchedule(), tooltip: "Schedule", disabled: !IS_OPENFIN, accessLevel: this.props.accessLevel })))));
|
|
69
69
|
}
|
|
70
70
|
onSelectedReportChanged(reportName) {
|
|
71
71
|
if (reportName == undefined) {
|