@adaptabletools/adaptable-plugin-ipushpull-cjs 18.1.13 → 18.1.15-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
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@adaptabletools/adaptable-plugin-ipushpull-cjs",
|
|
3
|
-
"version": "18.1.
|
|
3
|
+
"version": "18.1.15-canary.0",
|
|
4
4
|
"description": "",
|
|
5
5
|
"homepage": "http://www.adaptabletools.com/",
|
|
6
6
|
"author": {
|
|
@@ -20,7 +20,7 @@
|
|
|
20
20
|
"styled-components": "^4.4.1",
|
|
21
21
|
"tinycolor2": "^1.4.2",
|
|
22
22
|
"tslib": "^2.3.0",
|
|
23
|
-
"@adaptabletools/adaptable-cjs": "18.1.
|
|
23
|
+
"@adaptabletools/adaptable-cjs": "18.1.15-canary.0"
|
|
24
24
|
},
|
|
25
25
|
"peerDependencies": {}
|
|
26
26
|
}
|
package/src/IPushPullApiImpl.js
CHANGED
|
@@ -41,13 +41,13 @@ class IPushPullApiImpl extends ApiBase_1.ApiBase {
|
|
|
41
41
|
sendSnapshot(iPushPullReport) {
|
|
42
42
|
if (this.checkItemExists(iPushPullReport, iPushPullReport.ReportName, 'IPushPull Report')) {
|
|
43
43
|
this.dispatchAction(IPushPullRedux.IPushPullSendSnapshot(iPushPullReport));
|
|
44
|
-
this.
|
|
44
|
+
this.getAdaptableApi().exportApi.internalApi.publishLiveLiveDataChangedEvent('ipushpull', 'SnapshotSent');
|
|
45
45
|
}
|
|
46
46
|
}
|
|
47
47
|
startLiveData(iPushPullReport) {
|
|
48
48
|
if (this.checkItemExists(iPushPullReport, iPushPullReport.ReportName, 'IPushPull Report')) {
|
|
49
49
|
this.dispatchAction(IPushPullRedux.IPushPullLiveReportSet(iPushPullReport));
|
|
50
|
-
this.
|
|
50
|
+
this.getAdaptableApi().exportApi.internalApi.publishLiveLiveDataChangedEvent('ipushpull', 'LiveDataStarted', iPushPullReport);
|
|
51
51
|
}
|
|
52
52
|
}
|
|
53
53
|
stopLiveData() {
|
|
@@ -59,7 +59,7 @@ class IPushPullApiImpl extends ApiBase_1.ApiBase {
|
|
|
59
59
|
// clear the live report
|
|
60
60
|
this.dispatchAction(IPushPullRedux.IPushPullLiveReportClear());
|
|
61
61
|
// fire the Live Report event for Export Stopped
|
|
62
|
-
this.
|
|
62
|
+
this.getAdaptableApi().exportApi.internalApi.publishLiveLiveDataChangedEvent('ipushpull', 'LiveDataStopped', currentLiveReport);
|
|
63
63
|
}
|
|
64
64
|
isIPushPullReportLive(iPushPullReport) {
|
|
65
65
|
if (!iPushPullReport) {
|
|
@@ -125,11 +125,11 @@ class IPushPullApiImpl extends ApiBase_1.ApiBase {
|
|
|
125
125
|
}
|
|
126
126
|
setIPushPullRunningOn() {
|
|
127
127
|
this.dispatchAction(IPushPullRedux.SetIPushPullRunningOn());
|
|
128
|
-
this.
|
|
128
|
+
this.getAdaptableApi().exportApi.internalApi.publishLiveLiveDataChangedEvent('ipushpull', 'Connected');
|
|
129
129
|
}
|
|
130
130
|
setIPushPullRunningOff() {
|
|
131
131
|
this.dispatchAction(IPushPullRedux.SetIPushPullRunningOff());
|
|
132
|
-
this.
|
|
132
|
+
this.getAdaptableApi().exportApi.internalApi.publishLiveLiveDataChangedEvent('ipushpull', 'Disconnected');
|
|
133
133
|
}
|
|
134
134
|
isIPushPullLiveDataRunning() {
|
|
135
135
|
return Helper_1.default.objectExists(this.getCurrentLiveIPushPullReport());
|
|
@@ -82,8 +82,7 @@ class PushPullModule extends AdaptableModuleBase_1.AdaptableModuleBase {
|
|
|
82
82
|
this.AccessLevel = 'Hidden';
|
|
83
83
|
}
|
|
84
84
|
else {
|
|
85
|
-
this.AccessLevel = this.api.
|
|
86
|
-
.getEntitlementService()
|
|
85
|
+
this.AccessLevel = this.api.entitlementApi
|
|
87
86
|
.getEntitlementAccessLevelForModule(this.moduleInfo.ModuleName);
|
|
88
87
|
}
|
|
89
88
|
}
|
|
@@ -117,7 +116,7 @@ class PushPullModule extends AdaptableModuleBase_1.AdaptableModuleBase {
|
|
|
117
116
|
if (currentLiveIPushPullReport) {
|
|
118
117
|
this.isSendingData = true;
|
|
119
118
|
let report = this.api.exportApi.getReportByName(currentLiveIPushPullReport.ReportName);
|
|
120
|
-
let reportAsArray = this.
|
|
119
|
+
let reportAsArray = this.api.exportApi.internalApi.getReportDataAsArray(report);
|
|
121
120
|
const currentData = JSON.stringify(reportAsArray);
|
|
122
121
|
if (currentData === this.lastData) {
|
|
123
122
|
this.adaptable.logger.warn(EQUAL_DATA_ERR);
|
|
@@ -140,7 +139,7 @@ class PushPullModule extends AdaptableModuleBase_1.AdaptableModuleBase {
|
|
|
140
139
|
})
|
|
141
140
|
.then(() => {
|
|
142
141
|
this.lastData = currentData;
|
|
143
|
-
return this.
|
|
142
|
+
return this.api.exportApi.internalApi.publishLiveLiveDataChangedEvent('ipushpull', 'LiveDataUpdated', currentLiveIPushPullReport);
|
|
144
143
|
})
|
|
145
144
|
.catch((reason) => {
|
|
146
145
|
this.adaptable.logger.warn('Failed to send data to ipushpull for [' + currentLiveIPushPullReport.ReportName + ']', reason);
|
|
@@ -169,7 +168,7 @@ class PushPullModule extends AdaptableModuleBase_1.AdaptableModuleBase {
|
|
|
169
168
|
.then(() => {
|
|
170
169
|
let report = this.api.exportApi.getReportByName(iPushPullReport.ReportName);
|
|
171
170
|
if (report) {
|
|
172
|
-
let reportAsArray = this.
|
|
171
|
+
let reportAsArray = this.api.exportApi.internalApi.getReportDataAsArray(report);
|
|
173
172
|
if (reportAsArray) {
|
|
174
173
|
this.getIPPService().pushData(iPushPullReport.Page, reportAsArray);
|
|
175
174
|
}
|
|
@@ -100,7 +100,7 @@ const IPushPullSetCurrentPage = (page) => ({
|
|
|
100
100
|
});
|
|
101
101
|
exports.IPushPullSetCurrentPage = IPushPullSetCurrentPage;
|
|
102
102
|
const IPushPullSetCurrentAvailablePages = (availablePages) => ({
|
|
103
|
-
type: PluginsRedux_1.
|
|
103
|
+
type: PluginsRedux_1.IPUSHPULL_SET_AVAILABLE_PAGES,
|
|
104
104
|
availablePages,
|
|
105
105
|
});
|
|
106
106
|
exports.IPushPullSetCurrentAvailablePages = IPushPullSetCurrentAvailablePages;
|
|
@@ -166,7 +166,7 @@ state, action) => {
|
|
|
166
166
|
const actionTyped = action;
|
|
167
167
|
return Object.assign({}, state, { IPushPullCurrentPage: actionTyped.page });
|
|
168
168
|
}
|
|
169
|
-
case PluginsRedux_1.
|
|
169
|
+
case PluginsRedux_1.IPUSHPULL_SET_AVAILABLE_PAGES: {
|
|
170
170
|
const actionTyped = action;
|
|
171
171
|
return Object.assign({}, state, {
|
|
172
172
|
IPushPullCurrentAvailablePages: actionTyped.availablePages,
|
|
@@ -65,7 +65,7 @@ const IPushPullViewPanelComponent = (props) => {
|
|
|
65
65
|
? props.api.exportApi.getAvailableSystemReports()
|
|
66
66
|
: [];
|
|
67
67
|
let allReports = systemReports
|
|
68
|
-
.filter((s) => props.api.internalApi.
|
|
68
|
+
.filter((s) => props.api.exportApi.internalApi.isSystemReportActive(s))
|
|
69
69
|
.concat(props.Reports.map((r) => r.Name));
|
|
70
70
|
let availableReports = allReports.map((report) => {
|
|
71
71
|
return {
|
|
@@ -115,7 +115,7 @@ const IPushPullViewPanelComponent = (props) => {
|
|
|
115
115
|
React.createElement(rebass_1.Flex, { style: { minWidth: '148px' } },
|
|
116
116
|
React.createElement(ButtonExport_1.ButtonExport, { marginLeft: 1, className: `ab-${elementType}__IPushPull__export`, onClick: () => onIPushPullSendSnapshot(), tooltip: "Send Snapshot to ipushpull", disabled: isLiveIPushPullReport || !isCompletedReport, accessLevel: props.accessLevel }),
|
|
117
117
|
true ? (React.createElement(ButtonPause_1.ButtonPause, { fillColor: 'red', marginLeft: 1, className: `ab-${elementType}__IPushPull__pause`, onClick: () => props.onIPushPullStopLiveData(), tooltip: "Stop sync with ipushpull", disabled: !isLiveIPushPullReport, accessLevel: props.accessLevel })) : (React.createElement(ButtonPlay_1.ButtonPlay, { marginLeft: 1, className: `ab-${elementType}__IPushPull__play`, onClick: () => onIPushPullStartLiveData(), tooltip: "Start sync with ipushpull", disabled: isLiveIPushPullReport || !isCompletedReport, accessLevel: props.accessLevel })),
|
|
118
|
-
isCompletedReport && (React.createElement(rebass_1.Flex, { className: (0, join_1.default)(props.accessLevel == 'ReadOnly' ? GeneralConstants.READ_ONLY_STYLE : '', `ab-${elementType}__IPushPull__controls`), alignItems: "stretch" }, props.api.
|
|
118
|
+
isCompletedReport && (React.createElement(rebass_1.Flex, { className: (0, join_1.default)(props.accessLevel == 'ReadOnly' ? GeneralConstants.READ_ONLY_STYLE : '', `ab-${elementType}__IPushPull__controls`), alignItems: "stretch" }, props.api.entitlementApi.isModuleFullEntitlement('Schedule') && (React.createElement(ButtonSchedule_1.ButtonSchedule, { marginLeft: 1, className: `ab-${elementType}__IPushPull__schedule`, onClick: () => onNewIPushPullSchedule(), tooltip: "Schedule", disabled: isLiveIPushPullReport || !isCompletedReport, accessLevel: props.accessLevel })))),
|
|
119
119
|
' ',
|
|
120
120
|
React.createElement(ButtonNewPage_1.ButtonNewPage, { marginLeft: 1, className: `ab-${elementType}__IPushPull__newpage`, onClick: () => props.onShowAddIPushPullPage(), tooltip: "New Page", disabled: isLiveIPushPullReport, accessLevel: props.accessLevel }),
|
|
121
121
|
React.createElement(ButtonLogout_1.ButtonLogout, { marginLeft: 1, className: `ab-${elementType}__IPushPull__logout`, onClick: () => getIPPApi().logoutFromIPushPull(), tooltip: "Logout", disabled: isLiveIPushPullReport, accessLevel: props.accessLevel })))) : (React.createElement(ButtonLogin_1.ButtonLogin, { marginLeft: 1, className: `ab-${elementType}__IPushPull__login`, onClick: () => props.onShowIPushPullLogin(), tooltip: "Login to ipushpull", accessLevel: props.accessLevel },
|