@adaptabletools/adaptable-plugin-ipushpull 18.1.14 → 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",
|
3
|
-
"version": "18.1.
|
3
|
+
"version": "18.1.15-canary.0",
|
4
4
|
"description": "",
|
5
5
|
"homepage": "http://www.adaptabletools.com/",
|
6
6
|
"author": {
|
@@ -19,7 +19,7 @@
|
|
19
19
|
"styled-components": "^4.4.1",
|
20
20
|
"tinycolor2": "^1.4.2",
|
21
21
|
"tslib": "^2.3.0",
|
22
|
-
"@adaptabletools/adaptable": "18.1.
|
22
|
+
"@adaptabletools/adaptable": "18.1.15-canary.0"
|
23
23
|
},
|
24
24
|
"type": "module",
|
25
25
|
"module": "src/index.js"
|
package/src/IPushPullApiImpl.js
CHANGED
@@ -37,13 +37,13 @@ export class IPushPullApiImpl extends ApiBase {
|
|
37
37
|
sendSnapshot(iPushPullReport) {
|
38
38
|
if (this.checkItemExists(iPushPullReport, iPushPullReport.ReportName, 'IPushPull Report')) {
|
39
39
|
this.dispatchAction(IPushPullRedux.IPushPullSendSnapshot(iPushPullReport));
|
40
|
-
this.
|
40
|
+
this.getAdaptableApi().exportApi.internalApi.publishLiveLiveDataChangedEvent('ipushpull', 'SnapshotSent');
|
41
41
|
}
|
42
42
|
}
|
43
43
|
startLiveData(iPushPullReport) {
|
44
44
|
if (this.checkItemExists(iPushPullReport, iPushPullReport.ReportName, 'IPushPull Report')) {
|
45
45
|
this.dispatchAction(IPushPullRedux.IPushPullLiveReportSet(iPushPullReport));
|
46
|
-
this.
|
46
|
+
this.getAdaptableApi().exportApi.internalApi.publishLiveLiveDataChangedEvent('ipushpull', 'LiveDataStarted', iPushPullReport);
|
47
47
|
}
|
48
48
|
}
|
49
49
|
stopLiveData() {
|
@@ -55,7 +55,7 @@ export class IPushPullApiImpl extends ApiBase {
|
|
55
55
|
// clear the live report
|
56
56
|
this.dispatchAction(IPushPullRedux.IPushPullLiveReportClear());
|
57
57
|
// fire the Live Report event for Export Stopped
|
58
|
-
this.
|
58
|
+
this.getAdaptableApi().exportApi.internalApi.publishLiveLiveDataChangedEvent('ipushpull', 'LiveDataStopped', currentLiveReport);
|
59
59
|
}
|
60
60
|
isIPushPullReportLive(iPushPullReport) {
|
61
61
|
if (!iPushPullReport) {
|
@@ -121,11 +121,11 @@ export class IPushPullApiImpl extends ApiBase {
|
|
121
121
|
}
|
122
122
|
setIPushPullRunningOn() {
|
123
123
|
this.dispatchAction(IPushPullRedux.SetIPushPullRunningOn());
|
124
|
-
this.
|
124
|
+
this.getAdaptableApi().exportApi.internalApi.publishLiveLiveDataChangedEvent('ipushpull', 'Connected');
|
125
125
|
}
|
126
126
|
setIPushPullRunningOff() {
|
127
127
|
this.dispatchAction(IPushPullRedux.SetIPushPullRunningOff());
|
128
|
-
this.
|
128
|
+
this.getAdaptableApi().exportApi.internalApi.publishLiveLiveDataChangedEvent('ipushpull', 'Disconnected');
|
129
129
|
}
|
130
130
|
isIPushPullLiveDataRunning() {
|
131
131
|
return Helper.objectExists(this.getCurrentLiveIPushPullReport());
|
@@ -78,8 +78,7 @@ export class PushPullModule extends AdaptableModuleBase {
|
|
78
78
|
this.AccessLevel = 'Hidden';
|
79
79
|
}
|
80
80
|
else {
|
81
|
-
this.AccessLevel = this.api.
|
82
|
-
.getEntitlementService()
|
81
|
+
this.AccessLevel = this.api.entitlementApi
|
83
82
|
.getEntitlementAccessLevelForModule(this.moduleInfo.ModuleName);
|
84
83
|
}
|
85
84
|
}
|
@@ -113,7 +112,7 @@ export class PushPullModule extends AdaptableModuleBase {
|
|
113
112
|
if (currentLiveIPushPullReport) {
|
114
113
|
this.isSendingData = true;
|
115
114
|
let report = this.api.exportApi.getReportByName(currentLiveIPushPullReport.ReportName);
|
116
|
-
let reportAsArray = this.
|
115
|
+
let reportAsArray = this.api.exportApi.internalApi.getReportDataAsArray(report);
|
117
116
|
const currentData = JSON.stringify(reportAsArray);
|
118
117
|
if (currentData === this.lastData) {
|
119
118
|
this.adaptable.logger.warn(EQUAL_DATA_ERR);
|
@@ -136,7 +135,7 @@ export class PushPullModule extends AdaptableModuleBase {
|
|
136
135
|
})
|
137
136
|
.then(() => {
|
138
137
|
this.lastData = currentData;
|
139
|
-
return this.
|
138
|
+
return this.api.exportApi.internalApi.publishLiveLiveDataChangedEvent('ipushpull', 'LiveDataUpdated', currentLiveIPushPullReport);
|
140
139
|
})
|
141
140
|
.catch((reason) => {
|
142
141
|
this.adaptable.logger.warn('Failed to send data to ipushpull for [' + currentLiveIPushPullReport.ReportName + ']', reason);
|
@@ -165,7 +164,7 @@ export class PushPullModule extends AdaptableModuleBase {
|
|
165
164
|
.then(() => {
|
166
165
|
let report = this.api.exportApi.getReportByName(iPushPullReport.ReportName);
|
167
166
|
if (report) {
|
168
|
-
let reportAsArray = this.
|
167
|
+
let reportAsArray = this.api.exportApi.internalApi.getReportDataAsArray(report);
|
169
168
|
if (reportAsArray) {
|
170
169
|
this.getIPPService().pushData(iPushPullReport.Page, reportAsArray);
|
171
170
|
}
|
@@ -1,5 +1,5 @@
|
|
1
1
|
import { EMPTY_ARRAY, EMPTY_STRING, } from '@adaptabletools/adaptable/src/Utilities/Constants/GeneralConstants';
|
2
|
-
import { IPUSHPULL_SET_THROTTLE_TIME, IPUSHPULL_SEND_SNAPSHOT, IPUSHPULL_START_LIVE_DATA, IPUSHPULL_STOP_LIVE_DATA, IPUSHPULL_LOGIN, IPUSHPULL_LOGOUT, IPUSHPULL_SET_LOGIN_DETAILS, IPUSHPULL_SET_LOGIN_ERROR_MESSAGE, IPUSHPULL_ADD_PAGE, IPUSHPULL_SET_AVAILABLE_ON, IPUSHPULL_SET_AVAILABLE_OFF, IPUSHPULL_SET_RUNNING_ON, IPUSHPULL_SET_RUNNING_OFF, IPUSHPULL_DOMAIN_PAGES_SET, IPUSHPULL_DOMAIN_PAGES_CLEAR, IPUSHPULL_LIVE_REPORT_SET, IPUSHPULL_LIVE_REPORT_CLEAR, IPUSHPULL_SET_CURRENT_REPORTNAME, IPUSHPULL_SET_CURRENT_FOLDER, IPUSHPULL_SET_CURRENT_PAGE,
|
2
|
+
import { IPUSHPULL_SET_THROTTLE_TIME, IPUSHPULL_SEND_SNAPSHOT, IPUSHPULL_START_LIVE_DATA, IPUSHPULL_STOP_LIVE_DATA, IPUSHPULL_LOGIN, IPUSHPULL_LOGOUT, IPUSHPULL_SET_LOGIN_DETAILS, IPUSHPULL_SET_LOGIN_ERROR_MESSAGE, IPUSHPULL_ADD_PAGE, IPUSHPULL_SET_AVAILABLE_ON, IPUSHPULL_SET_AVAILABLE_OFF, IPUSHPULL_SET_RUNNING_ON, IPUSHPULL_SET_RUNNING_OFF, IPUSHPULL_DOMAIN_PAGES_SET, IPUSHPULL_DOMAIN_PAGES_CLEAR, IPUSHPULL_LIVE_REPORT_SET, IPUSHPULL_LIVE_REPORT_CLEAR, IPUSHPULL_SET_CURRENT_REPORTNAME, IPUSHPULL_SET_CURRENT_FOLDER, IPUSHPULL_SET_CURRENT_PAGE, IPUSHPULL_SET_AVAILABLE_PAGES, } from '@adaptabletools/adaptable/src/Redux/ActionsReducers/PluginsRedux';
|
3
3
|
export const IPushPullSetThrottleTime = (throttleTime) => ({
|
4
4
|
type: IPUSHPULL_SET_THROTTLE_TIME,
|
5
5
|
throttleTime,
|
@@ -77,7 +77,7 @@ export const IPushPullSetCurrentPage = (page) => ({
|
|
77
77
|
page,
|
78
78
|
});
|
79
79
|
export const IPushPullSetCurrentAvailablePages = (availablePages) => ({
|
80
|
-
type:
|
80
|
+
type: IPUSHPULL_SET_AVAILABLE_PAGES,
|
81
81
|
availablePages,
|
82
82
|
});
|
83
83
|
export const iPushPullInitialState = {
|
@@ -142,7 +142,7 @@ state, action) => {
|
|
142
142
|
const actionTyped = action;
|
143
143
|
return Object.assign({}, state, { IPushPullCurrentPage: actionTyped.page });
|
144
144
|
}
|
145
|
-
case
|
145
|
+
case IPUSHPULL_SET_AVAILABLE_PAGES: {
|
146
146
|
const actionTyped = action;
|
147
147
|
return Object.assign({}, state, {
|
148
148
|
IPushPullCurrentAvailablePages: actionTyped.availablePages,
|
@@ -61,7 +61,7 @@ const IPushPullViewPanelComponent = (props) => {
|
|
61
61
|
? props.api.exportApi.getAvailableSystemReports()
|
62
62
|
: [];
|
63
63
|
let allReports = systemReports
|
64
|
-
.filter((s) => props.api.internalApi.
|
64
|
+
.filter((s) => props.api.exportApi.internalApi.isSystemReportActive(s))
|
65
65
|
.concat(props.Reports.map((r) => r.Name));
|
66
66
|
let availableReports = allReports.map((report) => {
|
67
67
|
return {
|
@@ -111,7 +111,7 @@ const IPushPullViewPanelComponent = (props) => {
|
|
111
111
|
React.createElement(Flex, { style: { minWidth: '148px' } },
|
112
112
|
React.createElement(ButtonExport, { marginLeft: 1, className: `ab-${elementType}__IPushPull__export`, onClick: () => onIPushPullSendSnapshot(), tooltip: "Send Snapshot to ipushpull", disabled: isLiveIPushPullReport || !isCompletedReport, accessLevel: props.accessLevel }),
|
113
113
|
true ? (React.createElement(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, { marginLeft: 1, className: `ab-${elementType}__IPushPull__play`, onClick: () => onIPushPullStartLiveData(), tooltip: "Start sync with ipushpull", disabled: isLiveIPushPullReport || !isCompletedReport, accessLevel: props.accessLevel })),
|
114
|
-
isCompletedReport && (React.createElement(Flex, { className: join(props.accessLevel == 'ReadOnly' ? GeneralConstants.READ_ONLY_STYLE : '', `ab-${elementType}__IPushPull__controls`), alignItems: "stretch" }, props.api.
|
114
|
+
isCompletedReport && (React.createElement(Flex, { className: join(props.accessLevel == 'ReadOnly' ? GeneralConstants.READ_ONLY_STYLE : '', `ab-${elementType}__IPushPull__controls`), alignItems: "stretch" }, props.api.entitlementApi.isModuleFullEntitlement('Schedule') && (React.createElement(ButtonSchedule, { marginLeft: 1, className: `ab-${elementType}__IPushPull__schedule`, onClick: () => onNewIPushPullSchedule(), tooltip: "Schedule", disabled: isLiveIPushPullReport || !isCompletedReport, accessLevel: props.accessLevel })))),
|
115
115
|
' ',
|
116
116
|
React.createElement(ButtonNewPage, { marginLeft: 1, className: `ab-${elementType}__IPushPull__newpage`, onClick: () => props.onShowAddIPushPullPage(), tooltip: "New Page", disabled: isLiveIPushPullReport, accessLevel: props.accessLevel }),
|
117
117
|
React.createElement(ButtonLogout, { marginLeft: 1, className: `ab-${elementType}__IPushPull__logout`, onClick: () => getIPPApi().logoutFromIPushPull(), tooltip: "Logout", disabled: isLiveIPushPullReport, accessLevel: props.accessLevel })))) : (React.createElement(ButtonLogin, { marginLeft: 1, className: `ab-${elementType}__IPushPull__login`, onClick: () => props.onShowIPushPullLogin(), tooltip: "Login to ipushpull", accessLevel: props.accessLevel },
|