@adaptabletools/adaptable-plugin-ipushpull 17.0.0-canary.3 → 17.0.0-canary.5

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,12 +1,13 @@
1
1
  {
2
2
  "name": "@adaptabletools/adaptable-plugin-ipushpull",
3
- "version": "17.0.0-canary.3",
3
+ "version": "17.0.0-canary.5",
4
4
  "description": "",
5
5
  "homepage": "http://www.adaptabletools.com/",
6
6
  "author": {
7
7
  "name": "Jonny Wolfson",
8
8
  "email": "jonny.wolfson@adaptabletools.com"
9
9
  },
10
+ "main": "src/index.js",
10
11
  "typings": "src/index.d.ts",
11
12
  "dependencies": {
12
13
  "ipushpull-js": "^2.25.0",
@@ -18,8 +19,6 @@
18
19
  "redux": "4.0.5",
19
20
  "styled-components": "^4.4.1",
20
21
  "tslib": "^2.3.0",
21
- "@adaptabletools/adaptable": "17.0.0-canary.3"
22
- },
23
- "type": "module",
24
- "module": "src/index.js"
22
+ "@adaptabletools/adaptable": "17.0.0-canary.5"
23
+ }
25
24
  }
@@ -1,9 +1,13 @@
1
- import { ApiBase } from '@adaptabletools/adaptable/src/Api/Implementation/ApiBase';
2
- import * as ModuleConstants from '@adaptabletools/adaptable/src/Utilities/Constants/ModuleConstants';
3
- import * as IPushPullRedux from './Redux/ActionReducers/IPushPullRedux';
4
- import ArrayExtensions from '@adaptabletools/adaptable/src/Utilities/Extensions/ArrayExtensions';
5
- import Helper from '@adaptabletools/adaptable/src/Utilities/Helpers/Helper';
6
- export class IPushPullApiImpl extends ApiBase {
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.IPushPullApiImpl = void 0;
4
+ const tslib_1 = require("tslib");
5
+ const ApiBase_1 = require("@adaptabletools/adaptable/src/Api/Implementation/ApiBase");
6
+ const ModuleConstants = tslib_1.__importStar(require("@adaptabletools/adaptable/src/Utilities/Constants/ModuleConstants"));
7
+ const IPushPullRedux = tslib_1.__importStar(require("./Redux/ActionReducers/IPushPullRedux"));
8
+ const ArrayExtensions_1 = tslib_1.__importDefault(require("@adaptabletools/adaptable/src/Utilities/Extensions/ArrayExtensions"));
9
+ const Helper_1 = tslib_1.__importDefault(require("@adaptabletools/adaptable/src/Utilities/Helpers/Helper"));
10
+ class IPushPullApiImpl extends ApiBase_1.ApiBase {
7
11
  constructor(adaptable, options) {
8
12
  super(adaptable);
9
13
  this.ippService = null;
@@ -76,7 +80,7 @@ export class IPushPullApiImpl extends ApiBase {
76
80
  getPagesForIPushPullDomain(folderName) {
77
81
  let returnArray = [];
78
82
  let iPushPullDomains = this.getIPushPullDomains();
79
- if (ArrayExtensions.IsNotNullOrEmpty(iPushPullDomains)) {
83
+ if (ArrayExtensions_1.default.IsNotNullOrEmpty(iPushPullDomains)) {
80
84
  let iPushPullDomain = iPushPullDomains.find((f) => f.Name == folderName);
81
85
  if (iPushPullDomain) {
82
86
  returnArray = iPushPullDomain.Pages;
@@ -128,7 +132,7 @@ export class IPushPullApiImpl extends ApiBase {
128
132
  this.adaptable.ReportService.PublishLiveLiveDataChangedEvent('ipushpull', 'Disconnected');
129
133
  }
130
134
  isIPushPullLiveDataRunning() {
131
- return Helper.objectExists(this.getCurrentLiveIPushPullReport());
135
+ return Helper_1.default.objectExists(this.getCurrentLiveIPushPullReport());
132
136
  }
133
137
  getIPPService() {
134
138
  if (!this.ippService) {
@@ -165,3 +169,4 @@ export class IPushPullApiImpl extends ApiBase {
165
169
  this.dispatchAction(IPushPullRedux.IPushPullLiveReportClear());
166
170
  }
167
171
  }
172
+ exports.IPushPullApiImpl = IPushPullApiImpl;
@@ -1 +1,2 @@
1
- export {};
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -1,9 +1,13 @@
1
- import { AdaptableModuleBase } from '@adaptabletools/adaptable/src/Strategy/AdaptableModuleBase';
2
- import * as ModuleConstants from '@adaptabletools/adaptable/src/Utilities/Constants/ModuleConstants';
3
- import throttle from 'lodash/throttle';
4
- import { SELECTED_CELLS_REPORT, DEFAULT_LIVE_REPORT_THROTTLE_TIME, SELECTED_ROWS_REPORT, } from '@adaptabletools/adaptable/src/Utilities/Constants/GeneralConstants';
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.PushPullModule = void 0;
4
+ const tslib_1 = require("tslib");
5
+ const AdaptableModuleBase_1 = require("@adaptabletools/adaptable/src/Strategy/AdaptableModuleBase");
6
+ const ModuleConstants = tslib_1.__importStar(require("@adaptabletools/adaptable/src/Utilities/Constants/ModuleConstants"));
7
+ const throttle_1 = tslib_1.__importDefault(require("lodash/throttle"));
8
+ const GeneralConstants_1 = require("@adaptabletools/adaptable/src/Utilities/Constants/GeneralConstants");
5
9
  const EQUAL_DATA_ERR = 'equal data, so not sending';
6
- export class PushPullModule extends AdaptableModuleBase {
10
+ class PushPullModule extends AdaptableModuleBase_1.AdaptableModuleBase {
7
11
  constructor(api) {
8
12
  super(ModuleConstants.IPushPullModuleId, 'ipushpull', 'download', null, 'Send data from AdapTable to ipushpull', api);
9
13
  this.isSendingData = false;
@@ -11,7 +15,7 @@ export class PushPullModule extends AdaptableModuleBase {
11
15
  this.adaptable = api.internalApi.getAdaptableInstance();
12
16
  this.api.eventApi.on('AdaptableReady', () => {
13
17
  setTimeout(() => {
14
- this.throttledRecomputeAndSendLiveDataEvent = throttle(() => this.sendNewLiveData(), this.getThrottleTimeFromState());
18
+ this.throttledRecomputeAndSendLiveDataEvent = (0, throttle_1.default)(() => this.sendNewLiveData(), this.getThrottleTimeFromState());
15
19
  }, 1000);
16
20
  });
17
21
  // if a piece of data has updated then update any live reports except cell or row selected where the data change is relevant
@@ -24,8 +28,8 @@ export class PushPullModule extends AdaptableModuleBase {
24
28
  if (api.isIPushPullLiveDataRunning()) {
25
29
  let currentLiveIPushPullReport = api.getCurrentLiveIPushPullReport();
26
30
  if (currentLiveIPushPullReport &&
27
- currentLiveIPushPullReport.ReportName !== SELECTED_CELLS_REPORT &&
28
- currentLiveIPushPullReport.ReportName !== SELECTED_ROWS_REPORT &&
31
+ currentLiveIPushPullReport.ReportName !== GeneralConstants_1.SELECTED_CELLS_REPORT &&
32
+ currentLiveIPushPullReport.ReportName !== GeneralConstants_1.SELECTED_ROWS_REPORT &&
29
33
  exportApi.internalApi.isDataChangeInReport(cellDataChangedInfo, this.getCurrentReport())) {
30
34
  this.throttledRecomputeAndSendLiveDataEvent();
31
35
  }
@@ -43,8 +47,8 @@ export class PushPullModule extends AdaptableModuleBase {
43
47
  if (this.getIPPApi().isIPushPullLiveDataRunning()) {
44
48
  let currentLiveIPushPullReport = this.getIPPApi().getCurrentLiveIPushPullReport();
45
49
  if (currentLiveIPushPullReport &&
46
- currentLiveIPushPullReport.ReportName !== SELECTED_CELLS_REPORT &&
47
- currentLiveIPushPullReport.ReportName !== SELECTED_ROWS_REPORT) {
50
+ currentLiveIPushPullReport.ReportName !== GeneralConstants_1.SELECTED_CELLS_REPORT &&
51
+ currentLiveIPushPullReport.ReportName !== GeneralConstants_1.SELECTED_ROWS_REPORT) {
48
52
  this.throttledRecomputeAndSendLiveDataEvent();
49
53
  }
50
54
  }
@@ -54,8 +58,8 @@ export class PushPullModule extends AdaptableModuleBase {
54
58
  if (this.getIPPApi().isIPushPullLiveDataRunning()) {
55
59
  let currentLiveIPushPullReport = this.getIPPApi().getCurrentLiveIPushPullReport();
56
60
  if (currentLiveIPushPullReport &&
57
- (currentLiveIPushPullReport.ReportName === SELECTED_CELLS_REPORT ||
58
- currentLiveIPushPullReport.ReportName === SELECTED_ROWS_REPORT)) {
61
+ (currentLiveIPushPullReport.ReportName === GeneralConstants_1.SELECTED_CELLS_REPORT ||
62
+ currentLiveIPushPullReport.ReportName === GeneralConstants_1.SELECTED_ROWS_REPORT)) {
59
63
  this.throttledRecomputeAndSendLiveDataEvent();
60
64
  }
61
65
  }
@@ -180,6 +184,7 @@ export class PushPullModule extends AdaptableModuleBase {
180
184
  if (this.getIPPApi().isIPushPullRunning()) {
181
185
  iPushPullThrottleTime = this.getIPPApi().getIPushPullThrottleTime();
182
186
  }
183
- return iPushPullThrottleTime ? iPushPullThrottleTime : DEFAULT_LIVE_REPORT_THROTTLE_TIME;
187
+ return iPushPullThrottleTime ? iPushPullThrottleTime : GeneralConstants_1.DEFAULT_LIVE_REPORT_THROTTLE_TIME;
184
188
  }
185
189
  }
190
+ exports.PushPullModule = PushPullModule;
@@ -1,148 +1,172 @@
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, IPUSHPULL_SET_CURRENT_AVAILABLE_PAGES, } from '@adaptabletools/adaptable/src/Redux/ActionsReducers/PluginsRedux';
3
- export const IPushPullSetThrottleTime = (throttleTime) => ({
4
- type: IPUSHPULL_SET_THROTTLE_TIME,
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.IPushPullReducer = exports.iPushPullInitialState = exports.IPushPullSetCurrentAvailablePages = exports.IPushPullSetCurrentPage = exports.IPushPullSetCurrentFolder = exports.IPushPullSetCurrentReportName = exports.IPushPullLiveReportClear = exports.IPushPullLiveReportSet = exports.IPushPullClearDomainsPages = exports.IPushPullSetDomainsPages = exports.SetIPushPullRunningOff = exports.SetIPushPullRunningOn = exports.SetIPushPullAvailableOff = exports.SetIPushPullAvailableOn = exports.IPushPullAddPage = exports.IPushPullSetLoginErrorMessage = exports.IPushPullSetLoginDetails = exports.IPushPullLogout = exports.IPushPullLogin = exports.IPushPullStopLiveData = exports.IPushPullStartLiveData = exports.IPushPullSendSnapshot = exports.IPushPullSetThrottleTime = void 0;
4
+ const GeneralConstants_1 = require("@adaptabletools/adaptable/src/Utilities/Constants/GeneralConstants");
5
+ const PluginsRedux_1 = require("@adaptabletools/adaptable/src/Redux/ActionsReducers/PluginsRedux");
6
+ const IPushPullSetThrottleTime = (throttleTime) => ({
7
+ type: PluginsRedux_1.IPUSHPULL_SET_THROTTLE_TIME,
5
8
  throttleTime,
6
9
  });
7
- export const IPushPullSendSnapshot = (iPushPullReport) => ({
8
- type: IPUSHPULL_SEND_SNAPSHOT,
10
+ exports.IPushPullSetThrottleTime = IPushPullSetThrottleTime;
11
+ const IPushPullSendSnapshot = (iPushPullReport) => ({
12
+ type: PluginsRedux_1.IPUSHPULL_SEND_SNAPSHOT,
9
13
  iPushPullReport,
10
14
  });
11
- export const IPushPullStartLiveData = (iPushPullReport) => ({
12
- type: IPUSHPULL_START_LIVE_DATA,
15
+ exports.IPushPullSendSnapshot = IPushPullSendSnapshot;
16
+ const IPushPullStartLiveData = (iPushPullReport) => ({
17
+ type: PluginsRedux_1.IPUSHPULL_START_LIVE_DATA,
13
18
  iPushPullReport,
14
19
  });
15
- export const IPushPullStopLiveData = () => ({
16
- type: IPUSHPULL_STOP_LIVE_DATA,
20
+ exports.IPushPullStartLiveData = IPushPullStartLiveData;
21
+ const IPushPullStopLiveData = () => ({
22
+ type: PluginsRedux_1.IPUSHPULL_STOP_LIVE_DATA,
17
23
  });
18
- export const IPushPullLogin = (username, password) => ({
19
- type: IPUSHPULL_LOGIN,
24
+ exports.IPushPullStopLiveData = IPushPullStopLiveData;
25
+ const IPushPullLogin = (username, password) => ({
26
+ type: PluginsRedux_1.IPUSHPULL_LOGIN,
20
27
  username,
21
28
  password,
22
29
  });
23
- export const IPushPullLogout = () => ({
24
- type: IPUSHPULL_LOGOUT,
30
+ exports.IPushPullLogin = IPushPullLogin;
31
+ const IPushPullLogout = () => ({
32
+ type: PluginsRedux_1.IPUSHPULL_LOGOUT,
25
33
  });
26
- export const IPushPullSetLoginDetails = (username, password) => ({
27
- type: IPUSHPULL_SET_LOGIN_DETAILS,
34
+ exports.IPushPullLogout = IPushPullLogout;
35
+ const IPushPullSetLoginDetails = (username, password) => ({
36
+ type: PluginsRedux_1.IPUSHPULL_SET_LOGIN_DETAILS,
28
37
  username,
29
38
  password,
30
39
  });
31
- export const IPushPullSetLoginErrorMessage = (errorMessage) => ({
32
- type: IPUSHPULL_SET_LOGIN_ERROR_MESSAGE,
40
+ exports.IPushPullSetLoginDetails = IPushPullSetLoginDetails;
41
+ const IPushPullSetLoginErrorMessage = (errorMessage) => ({
42
+ type: PluginsRedux_1.IPUSHPULL_SET_LOGIN_ERROR_MESSAGE,
33
43
  errorMessage,
34
44
  });
35
- export const IPushPullAddPage = (folder, page) => ({
36
- type: IPUSHPULL_ADD_PAGE,
45
+ exports.IPushPullSetLoginErrorMessage = IPushPullSetLoginErrorMessage;
46
+ const IPushPullAddPage = (folder, page) => ({
47
+ type: PluginsRedux_1.IPUSHPULL_ADD_PAGE,
37
48
  folder,
38
49
  page,
39
50
  });
40
- export const SetIPushPullAvailableOn = () => ({
41
- type: IPUSHPULL_SET_AVAILABLE_ON,
51
+ exports.IPushPullAddPage = IPushPullAddPage;
52
+ const SetIPushPullAvailableOn = () => ({
53
+ type: PluginsRedux_1.IPUSHPULL_SET_AVAILABLE_ON,
42
54
  });
43
- export const SetIPushPullAvailableOff = () => ({
44
- type: IPUSHPULL_SET_AVAILABLE_OFF,
55
+ exports.SetIPushPullAvailableOn = SetIPushPullAvailableOn;
56
+ const SetIPushPullAvailableOff = () => ({
57
+ type: PluginsRedux_1.IPUSHPULL_SET_AVAILABLE_OFF,
45
58
  });
46
- export const SetIPushPullRunningOn = () => ({
47
- type: IPUSHPULL_SET_RUNNING_ON,
59
+ exports.SetIPushPullAvailableOff = SetIPushPullAvailableOff;
60
+ const SetIPushPullRunningOn = () => ({
61
+ type: PluginsRedux_1.IPUSHPULL_SET_RUNNING_ON,
48
62
  });
49
- export const SetIPushPullRunningOff = () => ({
50
- type: IPUSHPULL_SET_RUNNING_OFF,
63
+ exports.SetIPushPullRunningOn = SetIPushPullRunningOn;
64
+ const SetIPushPullRunningOff = () => ({
65
+ type: PluginsRedux_1.IPUSHPULL_SET_RUNNING_OFF,
51
66
  });
52
- export const IPushPullSetDomainsPages = (IPushPullDomainsPages) => {
67
+ exports.SetIPushPullRunningOff = SetIPushPullRunningOff;
68
+ const IPushPullSetDomainsPages = (IPushPullDomainsPages) => {
53
69
  return {
54
- type: IPUSHPULL_DOMAIN_PAGES_SET,
70
+ type: PluginsRedux_1.IPUSHPULL_DOMAIN_PAGES_SET,
55
71
  IPushPullDomainsPages,
56
72
  };
57
73
  };
58
- export const IPushPullClearDomainsPages = () => {
74
+ exports.IPushPullSetDomainsPages = IPushPullSetDomainsPages;
75
+ const IPushPullClearDomainsPages = () => {
59
76
  return {
60
- type: IPUSHPULL_DOMAIN_PAGES_CLEAR,
77
+ type: PluginsRedux_1.IPUSHPULL_DOMAIN_PAGES_CLEAR,
61
78
  };
62
79
  };
63
- export const IPushPullLiveReportSet = (iPushPullReport) => ({
64
- type: IPUSHPULL_LIVE_REPORT_SET,
80
+ exports.IPushPullClearDomainsPages = IPushPullClearDomainsPages;
81
+ const IPushPullLiveReportSet = (iPushPullReport) => ({
82
+ type: PluginsRedux_1.IPUSHPULL_LIVE_REPORT_SET,
65
83
  iPushPullReport,
66
84
  });
67
- export const IPushPullLiveReportClear = () => ({
68
- type: IPUSHPULL_LIVE_REPORT_CLEAR,
85
+ exports.IPushPullLiveReportSet = IPushPullLiveReportSet;
86
+ const IPushPullLiveReportClear = () => ({
87
+ type: PluginsRedux_1.IPUSHPULL_LIVE_REPORT_CLEAR,
69
88
  });
70
- export const IPushPullSetCurrentReportName = (reportName) => ({ type: IPUSHPULL_SET_CURRENT_REPORTNAME, reportName });
71
- export const IPushPullSetCurrentFolder = (folder) => ({
72
- type: IPUSHPULL_SET_CURRENT_FOLDER,
89
+ exports.IPushPullLiveReportClear = IPushPullLiveReportClear;
90
+ const IPushPullSetCurrentReportName = (reportName) => ({ type: PluginsRedux_1.IPUSHPULL_SET_CURRENT_REPORTNAME, reportName });
91
+ exports.IPushPullSetCurrentReportName = IPushPullSetCurrentReportName;
92
+ const IPushPullSetCurrentFolder = (folder) => ({
93
+ type: PluginsRedux_1.IPUSHPULL_SET_CURRENT_FOLDER,
73
94
  folder,
74
95
  });
75
- export const IPushPullSetCurrentPage = (page) => ({
76
- type: IPUSHPULL_SET_CURRENT_PAGE,
96
+ exports.IPushPullSetCurrentFolder = IPushPullSetCurrentFolder;
97
+ const IPushPullSetCurrentPage = (page) => ({
98
+ type: PluginsRedux_1.IPUSHPULL_SET_CURRENT_PAGE,
77
99
  page,
78
100
  });
79
- export const IPushPullSetCurrentAvailablePages = (availablePages) => ({
80
- type: IPUSHPULL_SET_CURRENT_AVAILABLE_PAGES,
101
+ exports.IPushPullSetCurrentPage = IPushPullSetCurrentPage;
102
+ const IPushPullSetCurrentAvailablePages = (availablePages) => ({
103
+ type: PluginsRedux_1.IPUSHPULL_SET_CURRENT_AVAILABLE_PAGES,
81
104
  availablePages,
82
105
  });
83
- export const iPushPullInitialState = {
106
+ exports.IPushPullSetCurrentAvailablePages = IPushPullSetCurrentAvailablePages;
107
+ exports.iPushPullInitialState = {
84
108
  IsIPushPullRunning: false,
85
- IPushPullDomainsPages: EMPTY_ARRAY,
109
+ IPushPullDomainsPages: GeneralConstants_1.EMPTY_ARRAY,
86
110
  CurrentLiveIPushPullReport: undefined,
87
111
  IPushPullLoginErrorMessage: undefined,
88
- IPushPullCurrentReportName: EMPTY_STRING,
89
- IPushPullCurrentFolder: EMPTY_STRING,
90
- IPushPullCurrentPage: EMPTY_STRING,
91
- IPushPullCurrentAvailablePages: EMPTY_ARRAY,
112
+ IPushPullCurrentReportName: GeneralConstants_1.EMPTY_STRING,
113
+ IPushPullCurrentFolder: GeneralConstants_1.EMPTY_STRING,
114
+ IPushPullCurrentPage: GeneralConstants_1.EMPTY_STRING,
115
+ IPushPullCurrentAvailablePages: GeneralConstants_1.EMPTY_ARRAY,
92
116
  };
93
- export const IPushPullReducer = (
117
+ const IPushPullReducer = (
94
118
  // initial state is handled in the plugin rootReducer
95
119
  state, action) => {
96
120
  switch (action.type) {
97
- case IPUSHPULL_SET_AVAILABLE_ON:
121
+ case PluginsRedux_1.IPUSHPULL_SET_AVAILABLE_ON:
98
122
  return Object.assign({}, state, { IsIPushPullAvailable: true });
99
- case IPUSHPULL_SET_AVAILABLE_OFF:
123
+ case PluginsRedux_1.IPUSHPULL_SET_AVAILABLE_OFF:
100
124
  return Object.assign({}, state, { IsIPushPullAvailable: false });
101
- case IPUSHPULL_SET_RUNNING_ON:
125
+ case PluginsRedux_1.IPUSHPULL_SET_RUNNING_ON:
102
126
  return Object.assign({}, state, { IsIPushPullRunning: true });
103
- case IPUSHPULL_SET_RUNNING_OFF:
127
+ case PluginsRedux_1.IPUSHPULL_SET_RUNNING_OFF:
104
128
  return Object.assign({}, state, { IsIPushPullRunning: false });
105
- case IPUSHPULL_SET_LOGIN_DETAILS: {
129
+ case PluginsRedux_1.IPUSHPULL_SET_LOGIN_DETAILS: {
106
130
  let loginAction = action;
107
131
  return Object.assign(Object.assign({}, state), { CurrentIPushpullUsername: loginAction.username, CurrentIPushpullPassword: loginAction.password });
108
132
  }
109
- case IPUSHPULL_LOGOUT: {
133
+ case PluginsRedux_1.IPUSHPULL_LOGOUT: {
110
134
  return Object.assign(Object.assign({}, state), { CurrentIPushpullUsername: undefined, CurrentIPushpullPassword: undefined });
111
135
  }
112
- case IPUSHPULL_SET_LOGIN_ERROR_MESSAGE: {
136
+ case PluginsRedux_1.IPUSHPULL_SET_LOGIN_ERROR_MESSAGE: {
113
137
  return Object.assign(Object.assign({}, state), { IPushPullLoginErrorMessage: action.errorMessage });
114
138
  }
115
- case IPUSHPULL_DOMAIN_PAGES_SET: {
139
+ case PluginsRedux_1.IPUSHPULL_DOMAIN_PAGES_SET: {
116
140
  return Object.assign({}, state, {
117
141
  IPushPullDomainsPages: action.IPushPullDomainsPages || [],
118
142
  });
119
143
  }
120
- case IPUSHPULL_DOMAIN_PAGES_CLEAR: {
144
+ case PluginsRedux_1.IPUSHPULL_DOMAIN_PAGES_CLEAR: {
121
145
  return Object.assign({}, state, {
122
146
  IPushPullDomainsPages: [],
123
147
  });
124
148
  }
125
- case IPUSHPULL_LIVE_REPORT_SET: {
149
+ case PluginsRedux_1.IPUSHPULL_LIVE_REPORT_SET: {
126
150
  const actionType = action;
127
151
  return Object.assign({}, state, { CurrentLiveIPushPullReport: actionType.iPushPullReport });
128
152
  }
129
- case IPUSHPULL_LIVE_REPORT_CLEAR: {
153
+ case PluginsRedux_1.IPUSHPULL_LIVE_REPORT_CLEAR: {
130
154
  // const atctionType = action as IPushPullLiveReportSetAction;
131
155
  return Object.assign({}, state, { CurrentLiveIPushPullReport: undefined });
132
156
  }
133
- case IPUSHPULL_SET_CURRENT_REPORTNAME: {
157
+ case PluginsRedux_1.IPUSHPULL_SET_CURRENT_REPORTNAME: {
134
158
  const actionTyped = action;
135
159
  return Object.assign({}, state, { IPushPullCurrentReportName: actionTyped.reportName });
136
160
  }
137
- case IPUSHPULL_SET_CURRENT_FOLDER: {
161
+ case PluginsRedux_1.IPUSHPULL_SET_CURRENT_FOLDER: {
138
162
  const actionTyped = action;
139
163
  return Object.assign({}, state, { IPushPullCurrentFolder: actionTyped.folder });
140
164
  }
141
- case IPUSHPULL_SET_CURRENT_PAGE: {
165
+ case PluginsRedux_1.IPUSHPULL_SET_CURRENT_PAGE: {
142
166
  const actionTyped = action;
143
167
  return Object.assign({}, state, { IPushPullCurrentPage: actionTyped.page });
144
168
  }
145
- case IPUSHPULL_SET_CURRENT_AVAILABLE_PAGES: {
169
+ case PluginsRedux_1.IPUSHPULL_SET_CURRENT_AVAILABLE_PAGES: {
146
170
  const actionTyped = action;
147
171
  return Object.assign({}, state, {
148
172
  IPushPullCurrentAvailablePages: actionTyped.availablePages,
@@ -152,3 +176,4 @@ state, action) => {
152
176
  return state;
153
177
  }
154
178
  };
179
+ exports.IPushPullReducer = IPushPullReducer;
@@ -1 +1,2 @@
1
- export {};
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -1,12 +1,16 @@
1
- import StringExtensions from '@adaptabletools/adaptable/src/Utilities/Extensions/StringExtensions';
2
- export var ServiceStatus;
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.PushPullService = exports.ServiceStatus = void 0;
4
+ const tslib_1 = require("tslib");
5
+ const StringExtensions_1 = tslib_1.__importDefault(require("@adaptabletools/adaptable/src/Utilities/Extensions/StringExtensions"));
6
+ var ServiceStatus;
3
7
  (function (ServiceStatus) {
4
8
  ServiceStatus["Unknown"] = "Unknown";
5
9
  ServiceStatus["Disconnected"] = "Disconnected";
6
10
  ServiceStatus["Connected"] = "Connected";
7
11
  ServiceStatus["Error"] = "Error";
8
- })(ServiceStatus || (ServiceStatus = {}));
9
- export class PushPullService {
12
+ })(ServiceStatus = exports.ServiceStatus || (exports.ServiceStatus = {}));
13
+ class PushPullService {
10
14
  constructor(adaptable) {
11
15
  this.adaptable = adaptable;
12
16
  this.ppInstance = null;
@@ -27,8 +31,8 @@ export class PushPullService {
27
31
  // get the username and passwrord from the options
28
32
  let userName = this.getIPPApi().getIPushPullUsername();
29
33
  let password = this.getIPPApi().getIPushPullPassword();
30
- if (StringExtensions.IsNotNullOrEmpty(userName) &&
31
- StringExtensions.IsNotNullOrEmpty(password)) {
34
+ if (StringExtensions_1.default.IsNotNullOrEmpty(userName) &&
35
+ StringExtensions_1.default.IsNotNullOrEmpty(password)) {
32
36
  try {
33
37
  // slightly circular but it means tht we do the logic in one go..
34
38
  this.getIPPApi().loginToIPushPull(userName, password);
@@ -207,3 +211,4 @@ export class PushPullService {
207
211
  });
208
212
  }
209
213
  }
214
+ exports.PushPullService = PushPullService;
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  import * as IPushPullRedux from '../Redux/ActionReducers/IPushPullRedux';
3
2
  import { IPushPullDomain } from '@adaptabletools/adaptable/src/PredefinedConfig/IPushPullState';
4
3
  interface IPushPullAddPagePopupProps {
@@ -1,30 +1,34 @@
1
- import * as React from 'react';
2
- import { connect } from 'react-redux';
3
- import * as PopupRedux from '@adaptabletools/adaptable/src/Redux/ActionsReducers/PopupRedux';
4
- import * as IPushPullRedux from '../Redux/ActionReducers/IPushPullRedux';
5
- import { StringExtensions } from '@adaptabletools/adaptable/src/Utilities/Extensions/StringExtensions';
6
- import FormLayout, { FormRow } from '@adaptabletools/adaptable/src/components/FormLayout';
7
- import Input from '@adaptabletools/adaptable/src/components/Input';
8
- import SimpleButton from '@adaptabletools/adaptable/src/components/SimpleButton';
9
- import FlexWithFooter from '@adaptabletools/adaptable/src/components/FlexWithFooter';
10
- import { PanelWithImage } from '@adaptabletools/adaptable/src/View/Components/Panels/PanelWithImage';
11
- import { usePopupContext } from '@adaptabletools/adaptable/src/View/Components/Popups/AdaptablePopup/PopupContext';
12
- import ErrorBox from '@adaptabletools/adaptable/src/components/ErrorBox';
13
- import HelpBlock from '@adaptabletools/adaptable/src/components/HelpBlock';
14
- import { Flex } from 'rebass';
15
- import Dropdown from '@adaptabletools/adaptable/src/components/Dropdown';
16
- import { EMPTY_STRING, EMPTY_ARRAY, } from '@adaptabletools/adaptable/src/Utilities/Constants/GeneralConstants';
17
- import ArrayExtensions from '@adaptabletools/adaptable/src/Utilities/Extensions/ArrayExtensions';
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.IPushPullAddPagePopup = void 0;
4
+ const tslib_1 = require("tslib");
5
+ const React = tslib_1.__importStar(require("react"));
6
+ const react_redux_1 = require("react-redux");
7
+ const PopupRedux = tslib_1.__importStar(require("@adaptabletools/adaptable/src/Redux/ActionsReducers/PopupRedux"));
8
+ const IPushPullRedux = tslib_1.__importStar(require("../Redux/ActionReducers/IPushPullRedux"));
9
+ const StringExtensions_1 = require("@adaptabletools/adaptable/src/Utilities/Extensions/StringExtensions");
10
+ const FormLayout_1 = tslib_1.__importStar(require("@adaptabletools/adaptable/src/components/FormLayout"));
11
+ const Input_1 = tslib_1.__importDefault(require("@adaptabletools/adaptable/src/components/Input"));
12
+ const SimpleButton_1 = tslib_1.__importDefault(require("@adaptabletools/adaptable/src/components/SimpleButton"));
13
+ const FlexWithFooter_1 = tslib_1.__importDefault(require("@adaptabletools/adaptable/src/components/FlexWithFooter"));
14
+ const PanelWithImage_1 = require("@adaptabletools/adaptable/src/View/Components/Panels/PanelWithImage");
15
+ const PopupContext_1 = require("@adaptabletools/adaptable/src/View/Components/Popups/AdaptablePopup/PopupContext");
16
+ const ErrorBox_1 = tslib_1.__importDefault(require("@adaptabletools/adaptable/src/components/ErrorBox"));
17
+ const HelpBlock_1 = tslib_1.__importDefault(require("@adaptabletools/adaptable/src/components/HelpBlock"));
18
+ const rebass_1 = require("rebass");
19
+ const Dropdown_1 = tslib_1.__importDefault(require("@adaptabletools/adaptable/src/components/Dropdown"));
20
+ const GeneralConstants_1 = require("@adaptabletools/adaptable/src/Utilities/Constants/GeneralConstants");
21
+ const ArrayExtensions_1 = tslib_1.__importDefault(require("@adaptabletools/adaptable/src/Utilities/Extensions/ArrayExtensions"));
18
22
  const IPushPullAddPageComponent = (props) => {
19
23
  const [state, setState] = React.useState({
20
24
  Folder: '',
21
25
  Page: '',
22
- AvailablePages: EMPTY_ARRAY,
26
+ AvailablePages: GeneralConstants_1.EMPTY_ARRAY,
23
27
  ErrorMessage: '',
24
28
  });
25
- const { hidePopup } = usePopupContext();
29
+ const { hidePopup } = (0, PopupContext_1.usePopupContext)();
26
30
  const onSubmit = () => {
27
- if (ArrayExtensions.ContainsItem(state.AvailablePages, state.Page)) {
31
+ if (ArrayExtensions_1.default.ContainsItem(state.AvailablePages, state.Page)) {
28
32
  setState(Object.assign(Object.assign({}, state), { ErrorMessage: 'A page with that name already exists in the folder' }));
29
33
  }
30
34
  else {
@@ -36,21 +40,21 @@ const IPushPullAddPageComponent = (props) => {
36
40
  setState(Object.assign(Object.assign({}, state), { Page: e.value }));
37
41
  };
38
42
  const onFolderChanged = (folderName) => {
39
- if (StringExtensions.IsNotNullOrEmpty(folderName) && folderName !== 'Select Folder') {
43
+ if (StringExtensions_1.StringExtensions.IsNotNullOrEmpty(folderName) && folderName !== 'Select Folder') {
40
44
  let avaialablePages = props.IPushPullDomainsPages.find((f) => f.Name == folderName).Pages;
41
45
  setState({
42
46
  Folder: folderName,
43
47
  AvailablePages: avaialablePages,
44
- Page: EMPTY_STRING,
45
- ErrorMessage: EMPTY_STRING,
48
+ Page: GeneralConstants_1.EMPTY_STRING,
49
+ ErrorMessage: GeneralConstants_1.EMPTY_STRING,
46
50
  });
47
51
  }
48
52
  else {
49
53
  setState({
50
- Folder: EMPTY_STRING,
54
+ Folder: GeneralConstants_1.EMPTY_STRING,
51
55
  AvailablePages: [],
52
- Page: EMPTY_STRING,
53
- ErrorMessage: EMPTY_STRING,
56
+ Page: GeneralConstants_1.EMPTY_STRING,
57
+ ErrorMessage: GeneralConstants_1.EMPTY_STRING,
54
58
  });
55
59
  }
56
60
  };
@@ -60,29 +64,29 @@ const IPushPullAddPageComponent = (props) => {
60
64
  value: iPushPullDomain.Name,
61
65
  };
62
66
  });
63
- return (React.createElement(PanelWithImage, { header: "Add ipushpull Page", glyphicon: "newpage", variant: "primary", style: { height: '100%' } },
64
- React.createElement(FlexWithFooter, { as: "form", onSubmit: (e) => {
67
+ return (React.createElement(PanelWithImage_1.PanelWithImage, { header: "Add ipushpull Page", glyphicon: "newpage", variant: "primary", style: { height: '100%' } },
68
+ React.createElement(FlexWithFooter_1.default, { as: "form", onSubmit: (e) => {
65
69
  e.preventDefault();
66
70
  onSubmit();
67
71
  }, footerProps: {
68
72
  fontSize: 'var(--ab-font-size-4)',
69
73
  }, footer: React.createElement(React.Fragment, null,
70
- React.createElement(SimpleButton, { tone: "neutral", variant: "text", tooltip: "Close", onClick: (e) => {
74
+ React.createElement(SimpleButton_1.default, { tone: "neutral", variant: "text", tooltip: "Close", onClick: (e) => {
71
75
  e.stopPropagation();
72
76
  hidePopup();
73
77
  } }, "CLOSE"),
74
78
  React.createElement("div", { style: { flex: 1 } }),
75
- React.createElement(SimpleButton, { tone: "accent", variant: "raised", type: "submit", disabled: StringExtensions.IsNullOrEmpty(state.Folder) ||
76
- StringExtensions.IsNullOrEmpty(state.Page), icon: 'check' }, "Add Page")) },
77
- React.createElement(Flex, { flexDirection: "column", padding: 2, margin: 2 },
78
- React.createElement(HelpBlock, { marginBottom: 1 }, "Select a folder and then choose the name of the new ipushpull page it should contain."),
79
- React.createElement(FormLayout, { margin: 3 },
80
- React.createElement(FormRow, { label: "Folder:" },
81
- React.createElement(Dropdown, { disabled: availableFolders.length == 0, style: { minWidth: '50%' }, options: availableFolders, className: "ab-Popup__IPushPull__select", onChange: (folder) => onFolderChanged(folder), value: state.Folder ? state.Folder : null, placeholder: "Select Folder", marginRight: 2 })),
82
- React.createElement(FormRow, { label: "Page" },
83
- React.createElement(Input, { width: "50%", type: "text", placeholder: "Page Name", value: state.Page, onChange: onPageNameChange })),
84
- state.ErrorMessage ? (React.createElement(FormRow, { label: "" },
85
- React.createElement(ErrorBox, null, state.ErrorMessage))) : null)))));
79
+ React.createElement(SimpleButton_1.default, { tone: "accent", variant: "raised", type: "submit", disabled: StringExtensions_1.StringExtensions.IsNullOrEmpty(state.Folder) ||
80
+ StringExtensions_1.StringExtensions.IsNullOrEmpty(state.Page), icon: 'check' }, "Add Page")) },
81
+ React.createElement(rebass_1.Flex, { flexDirection: "column", padding: 2, margin: 2 },
82
+ React.createElement(HelpBlock_1.default, { marginBottom: 1 }, "Select a folder and then choose the name of the new ipushpull page it should contain."),
83
+ React.createElement(FormLayout_1.default, { margin: 3 },
84
+ React.createElement(FormLayout_1.FormRow, { label: "Folder:" },
85
+ React.createElement(Dropdown_1.default, { disabled: availableFolders.length == 0, style: { minWidth: '50%' }, options: availableFolders, className: "ab-Popup__IPushPull__select", onChange: (folder) => onFolderChanged(folder), value: state.Folder ? state.Folder : null, placeholder: "Select Folder", marginRight: 2 })),
86
+ React.createElement(FormLayout_1.FormRow, { label: "Page" },
87
+ React.createElement(Input_1.default, { width: "50%", type: "text", placeholder: "Page Name", value: state.Page, onChange: onPageNameChange })),
88
+ state.ErrorMessage ? (React.createElement(FormLayout_1.FormRow, { label: "" },
89
+ React.createElement(ErrorBox_1.default, null, state.ErrorMessage))) : null)))));
86
90
  };
87
91
  function mapStateToProps(state) {
88
92
  return {
@@ -97,4 +101,4 @@ function mapDispatchToProps(dispatch) {
97
101
  },
98
102
  };
99
103
  }
100
- export let IPushPullAddPagePopup = connect(mapStateToProps, mapDispatchToProps)(IPushPullAddPageComponent);
104
+ exports.IPushPullAddPagePopup = (0, react_redux_1.connect)(mapStateToProps, mapDispatchToProps)(IPushPullAddPageComponent);
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  import * as IPushPullRedux from '../Redux/ActionReducers/IPushPullRedux';
3
2
  interface IPushPullLoginPopupProps {
4
3
  pushpullLogin: string | undefined;
@@ -1,26 +1,30 @@
1
- import * as React from 'react';
2
- import { connect } from 'react-redux';
3
- import { useAdaptable } from '@adaptabletools/adaptable/src/View/AdaptableContext';
4
- import * as PopupRedux from '@adaptabletools/adaptable/src/Redux/ActionsReducers/PopupRedux';
5
- import * as IPushPullRedux from '../Redux/ActionReducers/IPushPullRedux';
6
- import { StringExtensions } from '@adaptabletools/adaptable/src/Utilities/Extensions/StringExtensions';
7
- import FormLayout, { FormRow } from '@adaptabletools/adaptable/src/components/FormLayout';
8
- import Input from '@adaptabletools/adaptable/src/components/Input';
9
- import SimpleButton from '@adaptabletools/adaptable/src/components/SimpleButton';
10
- import FlexWithFooter from '@adaptabletools/adaptable/src/components/FlexWithFooter';
11
- import { PanelWithImage } from '@adaptabletools/adaptable/src/View/Components/Panels/PanelWithImage';
12
- import { usePopupContext } from '@adaptabletools/adaptable/src/View/Components/Popups/AdaptablePopup/PopupContext';
13
- import ErrorBox from '@adaptabletools/adaptable/src/components/ErrorBox';
14
- import HelpBlock from '@adaptabletools/adaptable/src/components/HelpBlock';
15
- import { Flex } from 'rebass';
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.IPushPullLoginPopup = void 0;
4
+ const tslib_1 = require("tslib");
5
+ const React = tslib_1.__importStar(require("react"));
6
+ const react_redux_1 = require("react-redux");
7
+ const AdaptableContext_1 = require("@adaptabletools/adaptable/src/View/AdaptableContext");
8
+ const PopupRedux = tslib_1.__importStar(require("@adaptabletools/adaptable/src/Redux/ActionsReducers/PopupRedux"));
9
+ const IPushPullRedux = tslib_1.__importStar(require("../Redux/ActionReducers/IPushPullRedux"));
10
+ const StringExtensions_1 = require("@adaptabletools/adaptable/src/Utilities/Extensions/StringExtensions");
11
+ const FormLayout_1 = tslib_1.__importStar(require("@adaptabletools/adaptable/src/components/FormLayout"));
12
+ const Input_1 = tslib_1.__importDefault(require("@adaptabletools/adaptable/src/components/Input"));
13
+ const SimpleButton_1 = tslib_1.__importDefault(require("@adaptabletools/adaptable/src/components/SimpleButton"));
14
+ const FlexWithFooter_1 = tslib_1.__importDefault(require("@adaptabletools/adaptable/src/components/FlexWithFooter"));
15
+ const PanelWithImage_1 = require("@adaptabletools/adaptable/src/View/Components/Panels/PanelWithImage");
16
+ const PopupContext_1 = require("@adaptabletools/adaptable/src/View/Components/Popups/AdaptablePopup/PopupContext");
17
+ const ErrorBox_1 = tslib_1.__importDefault(require("@adaptabletools/adaptable/src/components/ErrorBox"));
18
+ const HelpBlock_1 = tslib_1.__importDefault(require("@adaptabletools/adaptable/src/components/HelpBlock"));
19
+ const rebass_1 = require("rebass");
16
20
  const IPushPullLoginComponent = (props) => {
17
- const adaptable = useAdaptable();
21
+ const adaptable = (0, AdaptableContext_1.useAdaptable)();
18
22
  const options = adaptable.getPlugin('ipushpull').options;
19
23
  const [state, setState] = React.useState({
20
24
  Login: options.username || '',
21
25
  Password: options.password || '',
22
26
  });
23
- const { hidePopup } = usePopupContext();
27
+ const { hidePopup } = (0, PopupContext_1.usePopupContext)();
24
28
  const onSubmit = () => {
25
29
  props.onLogin(state.Login || '', state.Password || '');
26
30
  };
@@ -32,28 +36,28 @@ const IPushPullLoginComponent = (props) => {
32
36
  const e = event.target;
33
37
  setState(Object.assign(Object.assign({}, state), { Password: e.value }));
34
38
  };
35
- return (React.createElement(PanelWithImage, { header: "ipushpull Login Details", glyphicon: "login", variant: "primary", style: { height: '100%' } },
36
- React.createElement(FlexWithFooter, { as: "form", onSubmit: (e) => {
39
+ return (React.createElement(PanelWithImage_1.PanelWithImage, { header: "ipushpull Login Details", glyphicon: "login", variant: "primary", style: { height: '100%' } },
40
+ React.createElement(FlexWithFooter_1.default, { as: "form", onSubmit: (e) => {
37
41
  e.preventDefault();
38
42
  onSubmit();
39
43
  }, footerProps: {
40
44
  fontSize: 'var(--ab-font-size-4)',
41
45
  }, footer: React.createElement(React.Fragment, null,
42
- React.createElement(SimpleButton, { tone: "neutral", variant: "text", tooltip: "Close", onClick: (e) => {
46
+ React.createElement(SimpleButton_1.default, { tone: "neutral", variant: "text", tooltip: "Close", onClick: (e) => {
43
47
  e.stopPropagation();
44
48
  hidePopup();
45
49
  } }, "CLOSE"),
46
50
  React.createElement("div", { style: { flex: 1 } }),
47
- React.createElement(SimpleButton, { tone: "accent", variant: "raised", type: "submit", disabled: StringExtensions.IsNullOrEmpty(state.Password), icon: 'check' }, "Login")) },
48
- React.createElement(Flex, { flexDirection: "column", padding: 2, margin: 2 },
49
- React.createElement(HelpBlock, { marginBottom: 1 }, "Login to ipushpull using your login (email address) and password."),
50
- React.createElement(FormLayout, { margin: 3 },
51
- React.createElement(FormRow, { label: "ipushpull login:" },
52
- React.createElement(Input, { width: "100%", type: "email", placeholder: "Email address", value: state.Login, onChange: onLoginChange })),
53
- React.createElement(FormRow, { label: "ipushpull password:" },
54
- React.createElement(Input, { width: "100%", type: "password", placeholder: "Password", value: state.Password, onChange: onPasswordChange })),
55
- props.pushpullLoginErrorMessage ? (React.createElement(FormRow, { label: "" },
56
- React.createElement(ErrorBox, null, props.pushpullLoginErrorMessage))) : null)))));
51
+ React.createElement(SimpleButton_1.default, { tone: "accent", variant: "raised", type: "submit", disabled: StringExtensions_1.StringExtensions.IsNullOrEmpty(state.Password), icon: 'check' }, "Login")) },
52
+ React.createElement(rebass_1.Flex, { flexDirection: "column", padding: 2, margin: 2 },
53
+ React.createElement(HelpBlock_1.default, { marginBottom: 1 }, "Login to ipushpull using your login (email address) and password."),
54
+ React.createElement(FormLayout_1.default, { margin: 3 },
55
+ React.createElement(FormLayout_1.FormRow, { label: "ipushpull login:" },
56
+ React.createElement(Input_1.default, { width: "100%", type: "email", placeholder: "Email address", value: state.Login, onChange: onLoginChange })),
57
+ React.createElement(FormLayout_1.FormRow, { label: "ipushpull password:" },
58
+ React.createElement(Input_1.default, { width: "100%", type: "password", placeholder: "Password", value: state.Password, onChange: onPasswordChange })),
59
+ props.pushpullLoginErrorMessage ? (React.createElement(FormLayout_1.FormRow, { label: "" },
60
+ React.createElement(ErrorBox_1.default, null, props.pushpullLoginErrorMessage))) : null)))));
57
61
  };
58
62
  function mapStateToProps(state) {
59
63
  return {
@@ -72,4 +76,4 @@ function mapDispatchToProps(dispatch) {
72
76
  },
73
77
  };
74
78
  }
75
- export let IPushPullLoginPopup = connect(mapStateToProps, mapDispatchToProps)(IPushPullLoginComponent);
79
+ exports.IPushPullLoginPopup = (0, react_redux_1.connect)(mapStateToProps, mapDispatchToProps)(IPushPullLoginComponent);
@@ -1,15 +1,19 @@
1
- import * as React from 'react';
2
- import { connect } from 'react-redux';
3
- import { PanelWithButton } from '@adaptabletools/adaptable/src/View/Components/Panels/PanelWithButton';
4
- import * as IPushPullRedux from '../Redux/ActionReducers/IPushPullRedux';
5
- import * as TeamSharingRedux from '@adaptabletools/adaptable/src/Redux/ActionsReducers/TeamSharingRedux';
6
- import * as ModuleConstants from '@adaptabletools/adaptable/src/Utilities/Constants/ModuleConstants';
7
- import { UIHelper } from '@adaptabletools/adaptable/src/View/UIHelper';
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.IPushPullPopup = void 0;
4
+ const tslib_1 = require("tslib");
5
+ const React = tslib_1.__importStar(require("react"));
6
+ const react_redux_1 = require("react-redux");
7
+ const PanelWithButton_1 = require("@adaptabletools/adaptable/src/View/Components/Panels/PanelWithButton");
8
+ const IPushPullRedux = tslib_1.__importStar(require("../Redux/ActionReducers/IPushPullRedux"));
9
+ const TeamSharingRedux = tslib_1.__importStar(require("@adaptabletools/adaptable/src/Redux/ActionsReducers/TeamSharingRedux"));
10
+ const ModuleConstants = tslib_1.__importStar(require("@adaptabletools/adaptable/src/Utilities/Constants/ModuleConstants"));
11
+ const UIHelper_1 = require("@adaptabletools/adaptable/src/View/UIHelper");
8
12
  class IPushPullPopupComponent extends React.Component {
9
13
  constructor(props) {
10
14
  super(props);
11
15
  this.shouldClosePopupOnFinishWizard = false;
12
- this.state = UIHelper.getEmptyConfigState();
16
+ this.state = UIHelper_1.UIHelper.getEmptyConfigState();
13
17
  }
14
18
  componentDidMount() {
15
19
  if (this.props.popupParams) {
@@ -18,7 +22,7 @@ class IPushPullPopupComponent extends React.Component {
18
22
  }
19
23
  }
20
24
  render() {
21
- return (React.createElement(PanelWithButton, { headerText: this.props.moduleInfo.FriendlyName, bodyProps: { padding: 0 }, glyphicon: this.props.moduleInfo.Glyph, infoLink: this.props.moduleInfo.HelpPage, infoLinkDisabled: !this.props.api.internalApi.isDocumentationLinksDisplayed() }));
25
+ return (React.createElement(PanelWithButton_1.PanelWithButton, { headerText: this.props.moduleInfo.FriendlyName, bodyProps: { padding: 0 }, glyphicon: this.props.moduleInfo.Glyph, infoLink: this.props.moduleInfo.HelpPage, infoLinkDisabled: !this.props.api.internalApi.isDocumentationLinksDisplayed() }));
22
26
  }
23
27
  onApplyExport(iPushPullReport) {
24
28
  this.props.onIPushPullSendSnapshot(iPushPullReport);
@@ -34,4 +38,4 @@ function mapDispatchToProps(dispatch) {
34
38
  onShare: (entity, config) => dispatch(TeamSharingRedux.TeamSharingShare(entity, ModuleConstants.IPushPullModuleId, config)),
35
39
  };
36
40
  }
37
- export let IPushPullPopup = connect(mapStateToProps, mapDispatchToProps)(IPushPullPopupComponent);
41
+ exports.IPushPullPopup = (0, react_redux_1.connect)(mapStateToProps, mapDispatchToProps)(IPushPullPopupComponent);
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  import { ViewPanelProps } from '@adaptabletools/adaptable/src/View/Components/SharedProps/ViewPanelProps';
3
2
  import { IPushPullDomain, IPushPullReport, IPushPullSchedule } from '@adaptabletools/adaptable/src/PredefinedConfig/IPushPullState';
4
3
  import * as IPushPullRedux from '../Redux/ActionReducers/IPushPullRedux';
@@ -1,21 +1,25 @@
1
- import * as IPushPullRedux from '../Redux/ActionReducers/IPushPullRedux';
2
- import * as PopupRedux from '@adaptabletools/adaptable/src/Redux/ActionsReducers/PopupRedux';
3
- import * as React from 'react';
4
- import ObjectFactory from '@adaptabletools/adaptable/src/Utilities/ObjectFactory';
5
- import { StringExtensions } from '@adaptabletools/adaptable/src/Utilities/Extensions/StringExtensions';
6
- import { Flex } from 'rebass';
7
- import DropdownButton from '@adaptabletools/adaptable/src/components/DropdownButton';
8
- import { ButtonExport } from '@adaptabletools/adaptable/src/View/Components/Buttons/ButtonExport';
9
- import { ButtonPause } from '@adaptabletools/adaptable/src/View/Components/Buttons/ButtonPause';
10
- import { ButtonPlay } from '@adaptabletools/adaptable/src/View/Components/Buttons/ButtonPlay';
11
- import join from '@adaptabletools/adaptable/src/components/utils/join';
12
- import * as GeneralConstants from '@adaptabletools/adaptable/src/Utilities/Constants/GeneralConstants';
13
- import { ButtonSchedule } from '@adaptabletools/adaptable/src/View/Components/Buttons/ButtonSchedule';
14
- import { ButtonNewPage } from '@adaptabletools/adaptable/src/View/Components/Buttons/ButtonNewPage';
15
- import { ButtonLogout } from '@adaptabletools/adaptable/src/View/Components/Buttons/ButtonLogout';
16
- import { ButtonLogin } from '@adaptabletools/adaptable/src/View/Components/Buttons/ButtonLogin';
17
- import * as ModuleConstants from '@adaptabletools/adaptable/src/Utilities/Constants/ModuleConstants';
18
- import { connect } from 'react-redux';
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.IPushPullViewPanelControl = void 0;
4
+ const tslib_1 = require("tslib");
5
+ const IPushPullRedux = tslib_1.__importStar(require("../Redux/ActionReducers/IPushPullRedux"));
6
+ const PopupRedux = tslib_1.__importStar(require("@adaptabletools/adaptable/src/Redux/ActionsReducers/PopupRedux"));
7
+ const React = tslib_1.__importStar(require("react"));
8
+ const ObjectFactory_1 = tslib_1.__importDefault(require("@adaptabletools/adaptable/src/Utilities/ObjectFactory"));
9
+ const StringExtensions_1 = require("@adaptabletools/adaptable/src/Utilities/Extensions/StringExtensions");
10
+ const rebass_1 = require("rebass");
11
+ const DropdownButton_1 = tslib_1.__importDefault(require("@adaptabletools/adaptable/src/components/DropdownButton"));
12
+ const ButtonExport_1 = require("@adaptabletools/adaptable/src/View/Components/Buttons/ButtonExport");
13
+ const ButtonPause_1 = require("@adaptabletools/adaptable/src/View/Components/Buttons/ButtonPause");
14
+ const ButtonPlay_1 = require("@adaptabletools/adaptable/src/View/Components/Buttons/ButtonPlay");
15
+ const join_1 = tslib_1.__importDefault(require("@adaptabletools/adaptable/src/components/utils/join"));
16
+ const GeneralConstants = tslib_1.__importStar(require("@adaptabletools/adaptable/src/Utilities/Constants/GeneralConstants"));
17
+ const ButtonSchedule_1 = require("@adaptabletools/adaptable/src/View/Components/Buttons/ButtonSchedule");
18
+ const ButtonNewPage_1 = require("@adaptabletools/adaptable/src/View/Components/Buttons/ButtonNewPage");
19
+ const ButtonLogout_1 = require("@adaptabletools/adaptable/src/View/Components/Buttons/ButtonLogout");
20
+ const ButtonLogin_1 = require("@adaptabletools/adaptable/src/View/Components/Buttons/ButtonLogin");
21
+ const ModuleConstants = tslib_1.__importStar(require("@adaptabletools/adaptable/src/Utilities/Constants/ModuleConstants"));
22
+ const react_redux_1 = require("react-redux");
19
23
  const IPushPullViewPanelComponent = (props) => {
20
24
  var _a, _b, _c, _d;
21
25
  const [_, update] = React.useState(0);
@@ -46,7 +50,7 @@ const IPushPullViewPanelComponent = (props) => {
46
50
  props.onIPushPullStartLiveData(createIPushPullReportFromState());
47
51
  };
48
52
  const onNewIPushPullSchedule = () => {
49
- let iPushPullSchedule = ObjectFactory.CreateIPushPullSchedule(createIPushPullReportFromState());
53
+ let iPushPullSchedule = ObjectFactory_1.default.CreateIPushPullSchedule(createIPushPullReportFromState());
50
54
  props.onNewIPushPullSchedule(iPushPullSchedule);
51
55
  };
52
56
  // perhaps this should be props and in real state?
@@ -86,35 +90,35 @@ const IPushPullViewPanelComponent = (props) => {
86
90
  })) !== null && _d !== void 0 ? _d : [];
87
91
  // this is clearly ridiculous!
88
92
  // im getting tired...
89
- let isCompletedReport = StringExtensions.IsNotNullOrEmpty(props.CurrentIPushPullReportName) &&
90
- StringExtensions.IsNotNullOrEmpty(props.CurrentIPushPullFolder) &&
91
- StringExtensions.IsNotNullOrEmpty(props.CurrentIPushPullPage);
93
+ let isCompletedReport = StringExtensions_1.StringExtensions.IsNotNullOrEmpty(props.CurrentIPushPullReportName) &&
94
+ StringExtensions_1.StringExtensions.IsNotNullOrEmpty(props.CurrentIPushPullFolder) &&
95
+ StringExtensions_1.StringExtensions.IsNotNullOrEmpty(props.CurrentIPushPullPage);
92
96
  let isLiveIPushPullReport = isCompletedReport &&
93
97
  props.CurrentLiveIPushPullReport &&
94
98
  props.CurrentIPushPullReportName == props.CurrentLiveIPushPullReport.ReportName &&
95
99
  props.CurrentIPushPullFolder == props.CurrentLiveIPushPullReport.Folder &&
96
100
  props.CurrentIPushPullPage == props.CurrentLiveIPushPullReport.Page;
97
101
  const elementType = props.viewType === 'Toolbar' ? 'DashboardToolbar' : 'ToolPanel';
98
- return props.IsIPushPullRunning ? (React.createElement(Flex, { flexDirection: "row", className: `ab-${elementType}__IPushPull__wrap`, flexWrap: props.viewType === 'ToolPanel' ? 'wrap' : 'nowrap' },
99
- React.createElement(Flex, null,
100
- React.createElement(DropdownButton, { disabled: allReports.length == 0 || isLiveIPushPullReport, style: { minWidth: 140, fontSize: 'small' }, items: availableReports, columns: ['label'], className: `ab-${elementType}__IPushPull__select`, onClear: () => onSelectedReportChanged(''), showClearButton: StringExtensions.IsNotNullOrEmpty(props.CurrentIPushPullReportName), variant: "outlined", marginRight: 2 }, StringExtensions.IsNotNullOrEmpty(props.CurrentIPushPullReportName)
102
+ return props.IsIPushPullRunning ? (React.createElement(rebass_1.Flex, { flexDirection: "row", className: `ab-${elementType}__IPushPull__wrap`, flexWrap: props.viewType === 'ToolPanel' ? 'wrap' : 'nowrap' },
103
+ React.createElement(rebass_1.Flex, null,
104
+ React.createElement(DropdownButton_1.default, { disabled: allReports.length == 0 || isLiveIPushPullReport, style: { minWidth: 140, fontSize: 'small' }, items: availableReports, columns: ['label'], className: `ab-${elementType}__IPushPull__select`, onClear: () => onSelectedReportChanged(''), showClearButton: StringExtensions_1.StringExtensions.IsNotNullOrEmpty(props.CurrentIPushPullReportName), variant: "outlined", marginRight: 2 }, StringExtensions_1.StringExtensions.IsNotNullOrEmpty(props.CurrentIPushPullReportName)
101
105
  ? props.CurrentIPushPullReportName
102
106
  : 'Select Report')),
103
- React.createElement(Flex, null,
104
- React.createElement(DropdownButton, { disabled: allReports.length == 0 || isLiveIPushPullReport, style: { minWidth: 140, fontSize: 'small' }, items: availableFolders, columns: ['label'], className: `ab-${elementType}__IPushPull__select`, onClear: () => onFolderChanged(''), showClearButton: StringExtensions.IsNotNullOrEmpty(props.CurrentIPushPullFolder), variant: "outlined", marginRight: 2 }, StringExtensions.IsNotNullOrEmpty(props.CurrentIPushPullFolder)
107
+ React.createElement(rebass_1.Flex, null,
108
+ React.createElement(DropdownButton_1.default, { disabled: allReports.length == 0 || isLiveIPushPullReport, style: { minWidth: 140, fontSize: 'small' }, items: availableFolders, columns: ['label'], className: `ab-${elementType}__IPushPull__select`, onClear: () => onFolderChanged(''), showClearButton: StringExtensions_1.StringExtensions.IsNotNullOrEmpty(props.CurrentIPushPullFolder), variant: "outlined", marginRight: 2 }, StringExtensions_1.StringExtensions.IsNotNullOrEmpty(props.CurrentIPushPullFolder)
105
109
  ? props.CurrentIPushPullFolder
106
110
  : 'Select Folder')),
107
- React.createElement(Flex, null,
108
- React.createElement(DropdownButton, { disabled: allReports.length == 0 || isLiveIPushPullReport, style: { minWidth: 140, fontSize: 'small' }, items: availablePages, columns: ['label'], className: `ab-${elementType}__IPushPull__select`, onClear: () => onPageChanged(''), showClearButton: StringExtensions.IsNotNullOrEmpty(props.CurrentIPushPullPage), variant: "outlined", marginRight: 2 }, StringExtensions.IsNotNullOrEmpty(props.CurrentIPushPullPage)
111
+ React.createElement(rebass_1.Flex, null,
112
+ React.createElement(DropdownButton_1.default, { disabled: allReports.length == 0 || isLiveIPushPullReport, style: { minWidth: 140, fontSize: 'small' }, items: availablePages, columns: ['label'], className: `ab-${elementType}__IPushPull__select`, onClear: () => onPageChanged(''), showClearButton: StringExtensions_1.StringExtensions.IsNotNullOrEmpty(props.CurrentIPushPullPage), variant: "outlined", marginRight: 2 }, StringExtensions_1.StringExtensions.IsNotNullOrEmpty(props.CurrentIPushPullPage)
109
113
  ? props.CurrentIPushPullPage
110
114
  : 'Select Page')),
111
- React.createElement(Flex, { style: { minWidth: '148px' } },
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
- 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.internalApi.getEntitlementService().isModuleFullEntitlement('Schedule') && (React.createElement(ButtonSchedule, { marginLeft: 1, className: `ab-${elementType}__IPushPull__schedule`, onClick: () => onNewIPushPullSchedule(), tooltip: "Schedule", disabled: isLiveIPushPullReport || !isCompletedReport, accessLevel: props.accessLevel })))),
115
+ React.createElement(rebass_1.Flex, { style: { minWidth: '148px' } },
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
+ 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.internalApi.getEntitlementService().isModuleFullEntitlement('Schedule') && (React.createElement(ButtonSchedule_1.ButtonSchedule, { marginLeft: 1, className: `ab-${elementType}__IPushPull__schedule`, onClick: () => onNewIPushPullSchedule(), tooltip: "Schedule", disabled: isLiveIPushPullReport || !isCompletedReport, accessLevel: props.accessLevel })))),
115
119
  ' ',
116
- React.createElement(ButtonNewPage, { marginLeft: 1, className: `ab-${elementType}__IPushPull__newpage`, onClick: () => props.onShowAddIPushPullPage(), tooltip: "New Page", disabled: isLiveIPushPullReport, accessLevel: props.accessLevel }),
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 },
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
+ 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 },
118
122
  ' ',
119
123
  "Login"));
120
124
  };
@@ -151,4 +155,4 @@ function mapDispatchToProps(dispatch) {
151
155
  onCurrentIPushPullPageChange: (page) => dispatch(IPushPullRedux.IPushPullSetCurrentPage(page)),
152
156
  };
153
157
  }
154
- export const IPushPullViewPanelControl = connect(mapStateToProps, mapDispatchToProps)(IPushPullViewPanelComponent);
158
+ exports.IPushPullViewPanelControl = (0, react_redux_1.connect)(mapStateToProps, mapDispatchToProps)(IPushPullViewPanelComponent);
package/src/env.js CHANGED
@@ -1,4 +1,6 @@
1
- export default {
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.default = {
2
4
  IPUSHPULL_API_KEY: "CbBaMaoqHVifScrYwKssGnGyNkv5xHOhQVGm3cYP",
3
5
  IPUSHPULL_API_SECRET: "xYzE51kuHyyt9kQCvMe0tz0H2sDSjyEQcF5SOBlPQmcL9em0NqcCzyqLYj5fhpuZxQ8BiVcYl6zoOHeI6GYZj1TkUiiLVFoW3HUxiCdEUjlPS8Vl2YHUMEPD5qkLYnGj",
4
6
  };
package/src/index.js CHANGED
@@ -1,35 +1,37 @@
1
- import { AdaptablePlugin } from '@adaptabletools/adaptable/types';
2
- import env from './env';
3
- import { version, name } from '../package.json';
4
- import { version as coreVersion } from '@adaptabletools/adaptable/package.json';
5
- import * as ModuleConstants from '@adaptabletools/adaptable/src/Utilities/Constants/ModuleConstants';
6
- import { IPushPullModuleId } from '@adaptabletools/adaptable/src/Utilities/Constants/ModuleConstants';
7
- import * as PopupRedux from '@adaptabletools/adaptable/src/Redux/ActionsReducers/PopupRedux';
8
- import { AdaptableViewFactory, AdaptableViewPanelFactory, } from '@adaptabletools/adaptable/src/View/AdaptableViewFactory';
9
- import { PushPullModule } from './Module/PushPullModule';
10
- import { IPushPullApiImpl } from './IPushPullApiImpl';
11
- import { PushPullService } from './Utilities/Services/PushPullService';
12
- import ipushpull from 'ipushpull-js';
13
- import { iPushPullInitialState, IPushPullReducer, IPushPullSetCurrentAvailablePages, IPushPullSetCurrentPage, } from './Redux/ActionReducers/IPushPullRedux';
14
- import { IPushPullLoginPopup } from './View/IPushPullLoginPopup';
15
- import { IPushPullAddPagePopup } from './View/IPushPullAddPagePopup';
16
- import { IPUSHPULL_ADD_PAGE, IPUSHPULL_DOMAIN_PAGES_SET, IPUSHPULL_LOGIN, IPUSHPULL_SEND_SNAPSHOT, IPUSHPULL_SET_CURRENT_FOLDER, IPUSHPULL_START_LIVE_DATA, IPUSHPULL_STOP_LIVE_DATA, } from '@adaptabletools/adaptable/src/Redux/ActionsReducers/PluginsRedux';
17
- import StringExtensions from '@adaptabletools/adaptable/src/Utilities/Extensions/StringExtensions';
18
- import { IPushPullViewPanelControl } from './View/IPushPullViewPanel';
19
- const suffix = name.endsWith('-cjs') ? '-cjs' : '';
20
- if (version !== coreVersion) {
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ const tslib_1 = require("tslib");
4
+ const types_1 = require("@adaptabletools/adaptable/types");
5
+ const env_1 = tslib_1.__importDefault(require("./env"));
6
+ const package_json_1 = require("../package.json");
7
+ const version_1 = tslib_1.__importDefault(require("@adaptabletools/adaptable/version"));
8
+ const ModuleConstants = tslib_1.__importStar(require("@adaptabletools/adaptable/src/Utilities/Constants/ModuleConstants"));
9
+ const ModuleConstants_1 = require("@adaptabletools/adaptable/src/Utilities/Constants/ModuleConstants");
10
+ const PopupRedux = tslib_1.__importStar(require("@adaptabletools/adaptable/src/Redux/ActionsReducers/PopupRedux"));
11
+ const AdaptableViewFactory_1 = require("@adaptabletools/adaptable/src/View/AdaptableViewFactory");
12
+ const PushPullModule_1 = require("./Module/PushPullModule");
13
+ const IPushPullApiImpl_1 = require("./IPushPullApiImpl");
14
+ const PushPullService_1 = require("./Utilities/Services/PushPullService");
15
+ const ipushpull_js_1 = tslib_1.__importDefault(require("ipushpull-js"));
16
+ const IPushPullRedux_1 = require("./Redux/ActionReducers/IPushPullRedux");
17
+ const IPushPullLoginPopup_1 = require("./View/IPushPullLoginPopup");
18
+ const IPushPullAddPagePopup_1 = require("./View/IPushPullAddPagePopup");
19
+ const PluginsRedux_1 = require("@adaptabletools/adaptable/src/Redux/ActionsReducers/PluginsRedux");
20
+ const StringExtensions_1 = tslib_1.__importDefault(require("@adaptabletools/adaptable/src/Utilities/Extensions/StringExtensions"));
21
+ const IPushPullViewPanel_1 = require("./View/IPushPullViewPanel");
22
+ if (package_json_1.version !== version_1.default) {
21
23
  console.warn(`
22
24
  !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
23
- !!!!!!! "@adaptabletools/adaptable-plugin-ipushpull${suffix}" (v @${version}) and "@adaptabletools/adaptable${suffix}" (v @${coreVersion}) have different versions - they should have the exact same version.
25
+ !!!!!!! "@adaptabletools/adaptable-plugin-ipushpull" (v @${package_json_1.version}) and "@adaptabletools/adaptable" (v @${version_1.default}) have different versions - they should have the exact same version.
24
26
  !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
25
27
  `);
26
28
  }
27
29
  const getApiKey = () => {
28
- let key = env.IPUSHPULL_API_KEY; // need to make sure that is always there
30
+ let key = env_1.default.IPUSHPULL_API_KEY; // need to make sure that is always there
29
31
  return key;
30
32
  };
31
33
  const getApiSecret = () => {
32
- let secret = env.IPUSHPULL_API_SECRET; // need to make sure that is always there
34
+ let secret = env_1.default.IPUSHPULL_API_SECRET; // need to make sure that is always there
33
35
  return secret;
34
36
  };
35
37
  const defaultOptions = {
@@ -48,7 +50,7 @@ const defaultOptions = {
48
50
  throttleTime: 2000,
49
51
  includeSystemReports: true,
50
52
  };
51
- class IPushPullPlugin extends AdaptablePlugin {
53
+ class IPushPullPlugin extends types_1.AdaptablePlugin {
52
54
  constructor(options) {
53
55
  super(options);
54
56
  this.pluginId = 'ipushpull';
@@ -59,9 +61,9 @@ class IPushPullPlugin extends AdaptablePlugin {
59
61
  if (!state) {
60
62
  // required for store initialization
61
63
  // (idiomatic way of default parameter value in reducer is not feasible because the passed argument is already initialized by the System reducer)
62
- augmentedState = Object.assign({}, augmentedState, iPushPullInitialState);
64
+ augmentedState = Object.assign({}, augmentedState, IPushPullRedux_1.iPushPullInitialState);
63
65
  }
64
- return IPushPullReducer(augmentedState, action);
66
+ return (0, IPushPullRedux_1.IPushPullReducer)(augmentedState, action);
65
67
  },
66
68
  };
67
69
  };
@@ -69,57 +71,57 @@ class IPushPullPlugin extends AdaptablePlugin {
69
71
  return (next) => {
70
72
  return (action) => {
71
73
  switch (action.type) {
72
- case IPUSHPULL_LOGIN: {
74
+ case PluginsRedux_1.IPUSHPULL_LOGIN: {
73
75
  const actionTyped = action;
74
76
  this.iPushPullApi.loginToIPushPull(actionTyped.username, actionTyped.password);
75
77
  return next(action);
76
78
  }
77
- case IPUSHPULL_SEND_SNAPSHOT: {
79
+ case PluginsRedux_1.IPUSHPULL_SEND_SNAPSHOT: {
78
80
  let iPushPullModule = (adaptable.adaptableModules.get(ModuleConstants.IPushPullModuleId));
79
81
  const actionTyped = action;
80
82
  iPushPullModule.sendSnapshot(actionTyped.iPushPullReport);
81
83
  middlewareAPI.dispatch(PopupRedux.PopupHideScreen());
82
84
  return next(action);
83
85
  }
84
- case IPUSHPULL_START_LIVE_DATA: {
86
+ case PluginsRedux_1.IPUSHPULL_START_LIVE_DATA: {
85
87
  let iPushPullModule = (adaptable.adaptableModules.get(ModuleConstants.IPushPullModuleId));
86
88
  const actionTyped = action;
87
89
  iPushPullModule.startLiveData(actionTyped.iPushPullReport);
88
90
  middlewareAPI.dispatch(PopupRedux.PopupHideScreen());
89
91
  return next(action);
90
92
  }
91
- case IPUSHPULL_STOP_LIVE_DATA: {
93
+ case PluginsRedux_1.IPUSHPULL_STOP_LIVE_DATA: {
92
94
  let iPushPullModule = (adaptable.adaptableModules.get(ModuleConstants.IPushPullModuleId));
93
95
  iPushPullModule.stopLiveData();
94
96
  return next(action);
95
97
  }
96
- case IPUSHPULL_ADD_PAGE: {
98
+ case PluginsRedux_1.IPUSHPULL_ADD_PAGE: {
97
99
  const actionTyped = action;
98
100
  this.iPushPullApi.addNewIPushPullPage(actionTyped.folder, actionTyped.page);
99
101
  return next(action);
100
102
  }
101
- case IPUSHPULL_SET_CURRENT_FOLDER: {
103
+ case PluginsRedux_1.IPUSHPULL_SET_CURRENT_FOLDER: {
102
104
  const actionTyped = action;
103
105
  const currentFolder = actionTyped.folder;
104
- const isFolderValid = StringExtensions.IsNotNullOrEmpty(currentFolder);
106
+ const isFolderValid = StringExtensions_1.default.IsNotNullOrEmpty(currentFolder);
105
107
  const availablePages = isFolderValid
106
108
  ? adaptable.api.pluginsApi
107
109
  .getipushpullPluginApi()
108
110
  .getPagesForIPushPullDomain(currentFolder)
109
111
  : [];
110
- middlewareAPI.dispatch(IPushPullSetCurrentAvailablePages(availablePages));
111
- middlewareAPI.dispatch(IPushPullSetCurrentPage(''));
112
+ middlewareAPI.dispatch((0, IPushPullRedux_1.IPushPullSetCurrentAvailablePages)(availablePages));
113
+ middlewareAPI.dispatch((0, IPushPullRedux_1.IPushPullSetCurrentPage)(''));
112
114
  return next(action);
113
115
  }
114
- case IPUSHPULL_DOMAIN_PAGES_SET: {
116
+ case PluginsRedux_1.IPUSHPULL_DOMAIN_PAGES_SET: {
115
117
  //refresh the available pages
116
118
  const currentFolder = middlewareAPI.getState().System.IPushPullCurrentFolder;
117
- const isFolderValid = StringExtensions.IsNotNullOrEmpty(currentFolder);
119
+ const isFolderValid = StringExtensions_1.default.IsNotNullOrEmpty(currentFolder);
118
120
  if (isFolderValid) {
119
121
  const availablePages = adaptable.api.pluginsApi
120
122
  .getipushpullPluginApi()
121
123
  .getPagesForIPushPullDomain(currentFolder);
122
- middlewareAPI.dispatch(IPushPullSetCurrentAvailablePages(availablePages));
124
+ middlewareAPI.dispatch((0, IPushPullRedux_1.IPushPullSetCurrentAvailablePages)(availablePages));
123
125
  }
124
126
  return next(action);
125
127
  }
@@ -144,20 +146,20 @@ class IPushPullPlugin extends AdaptablePlugin {
144
146
  * Includes ipushpull config and objects and, optionally, any ipushpull Reports (including schedules).
145
147
  */
146
148
  // IPushPull?: IPushPullState;
147
- ipushpull.config.set(this.options.ippConfig);
149
+ ipushpull_js_1.default.config.set(this.options.ippConfig);
148
150
  }
149
151
  afterInitApi(adaptable) {
150
- this.iPushPullApi = new IPushPullApiImpl(adaptable, this.options);
151
- this.PushPullService = new PushPullService(adaptable);
152
- this.iPushPullApi.setIPushPullInstance(ipushpull);
152
+ this.iPushPullApi = new IPushPullApiImpl_1.IPushPullApiImpl(adaptable, this.options);
153
+ this.PushPullService = new PushPullService_1.PushPullService(adaptable);
154
+ this.iPushPullApi.setIPushPullInstance(ipushpull_js_1.default);
153
155
  this.registerProperty('api', () => this.iPushPullApi);
154
156
  this.registerProperty('service', () => this.PushPullService);
155
157
  }
156
158
  afterInitModules(adaptable, modules) {
157
- modules.set(IPushPullModuleId, new PushPullModule(adaptable.api));
158
- AdaptableViewFactory.IPushPullLoginPopup = IPushPullLoginPopup;
159
- AdaptableViewFactory.IPushPullAddPagePopup = IPushPullAddPagePopup;
160
- AdaptableViewPanelFactory.set(IPushPullModuleId, IPushPullViewPanelControl);
159
+ modules.set(ModuleConstants_1.IPushPullModuleId, new PushPullModule_1.PushPullModule(adaptable.api));
160
+ AdaptableViewFactory_1.AdaptableViewFactory.IPushPullLoginPopup = IPushPullLoginPopup_1.IPushPullLoginPopup;
161
+ AdaptableViewFactory_1.AdaptableViewFactory.IPushPullAddPagePopup = IPushPullAddPagePopup_1.IPushPullAddPagePopup;
162
+ AdaptableViewFactory_1.AdaptableViewPanelFactory.set(ModuleConstants_1.IPushPullModuleId, IPushPullViewPanel_1.IPushPullViewPanelControl);
161
163
  }
162
164
  }
163
- export default (options) => new IPushPullPlugin(options);
165
+ exports.default = (options) => new IPushPullPlugin(options);
package/README.md DELETED
@@ -1,113 +0,0 @@
1
- # AdapTable ipushpull Plugin Read Me
2
-
3
- The ipushpull plugin connects AdapTable with [ipushpull](https://www.ipushpull.com) the market-leading collaborative software.
4
-
5
- It allows user to send Reports - either System Reports shipped by AdapTable or those created via the AdapTable Export function - to ipushpull and from their to Symphony and other destinations.
6
-
7
- ## Version 7
8
- Version 7 of AdapTable made significant changes to how ipushpull is set up, primarily by using this dedicated plugin.
9
-
10
- As a consequence, the ipushpull section from Predefined Config was removed and no ipushpull information is provided by users that way.
11
-
12
- Similarly all ipushpull state is now transient and **not persisted** when the application ends.
13
-
14
- Instead we now use the `ipushpullPluginOptions` object in a similar way to other plugins.
15
-
16
- The actual ipushpull functionality is unchanged, and the information required to be supplied by the user is identical but it now done through Options and not Predefined Config - isolating it in this way enables us to add more ipushpull-related functionality in a much quicker and safer way, isolated from the rest of the application.
17
-
18
- ## ipushpull Options
19
-
20
- The ipushpull plugin contains an `ipushpullPluginOptions` object which allows users to set up their instance.
21
-
22
- It contains credential details, useful properties (e.g. `throttleTime`, `autoLogin` etc.) and the ipupshpull config object.
23
-
24
- ## ipushpull Api
25
-
26
- The `ipushpullApi` is available for full runtime programmatic access to ipushpull objects and methods.
27
-
28
- > Note: because ipushpull is a plugin, you can get hold of this object through the `getPluginApi` method of pluginsApi.
29
-
30
- ## ipushpull Setup Example
31
-
32
- ```ts
33
-
34
- // set up AdaptableOptions
35
- const adaptableOptions: AdaptableOptions = {
36
- ******
37
- plugins: [
38
- ipp({
39
- username: process.env.IPUSHPULL_USERNAME,
40
- password: process.env.IPUSHPULL_PASSWORD,
41
- throttleTime: 5000,
42
- includeSystemReports: true,
43
- ippConfig: {
44
- api_secret: process.env.IPUSHPULL_API_KEY,
45
- api_key: process.env.IPUSHPULL_API_KEY,
46
- api_url: 'https://www.ipushpull.com/api/1.0',
47
- ws_url: 'https://www.ipushpull.com',
48
- web_url: 'https://www.ipushpull.com',
49
- docs_url: 'https://docs.ipushpull.com',
50
- storage_prefix: 'ipp_local',
51
- transport: 'polling',
52
- hsts: false, // strict cors policy
53
- },
54
- }),
55
- ],
56
- ******
57
- };
58
-
59
- // Instantitate AdapTable and get the main Api object
60
- adaptableApi = await Adaptable.init(adaptableOptions);
61
-
62
- // use the plugins api to get the IPushPullApi object
63
- const ipushpullApi: IPushPullApi = adaptableApi.pluginsApi.getPluginApi(
64
- 'ipushpull'
65
- );
66
-
67
- ```
68
-
69
- ## ipushpull Toolbar
70
-
71
- The ipushpull plugin includes a dedicated ipushpull Toolbar - the main way to interact with ipushpull inside AdapTable.
72
-
73
- At start-up this simply displays a login button that, when clicked, opens a login screen asking for username and password.
74
-
75
- > There is a `AutoLogin` property option which will automatically log the user in to ipushpull (if the correct credentials have been provided in ipushpull Plugin Options).
76
-
77
- Once the user is successfully logged in, the Toolbar will contain a number of elements (primarily dropdowns and buttons). These include:
78
-
79
- ### Dropdowns
80
-
81
- 1. **Reports Dropdown** - this shows all the Reports that have been created via the Export function.
82
- > This dropdown will also include any System Reports that AdapTable ships by default (e.g. Selected Cells); however these can be removed by setting `IncludeSystemReports` to false
83
-
84
- 2. **Folders Dropdown** - lists all the folders (aka 'Domains') to which the user has access in ipushpull
85
-
86
- 3. **Pages Dropdown** - lists all the ipushpull pages in the currently selected Folder (in the Folders Dropdown).
87
-
88
- ### Buttons
89
-
90
- 1. **Send Snapshot** - this will run the current report and send the data to the currently selected ipushpull page. This is a **one-off** action.
91
-
92
- 2. **Run Live Report** - this will run the current report and send the data to the currently selected ipushpull page. It will also send live updates so as the data in the grid ticks and the report updaes, ipushpull will be updated in real time.
93
- > The button displays a 'Play' icon; however, when a Live Report is running this changes to a 'Pause' icon.
94
-
95
- 3. **New ipushpull Page** - alllows the user to create a new ipushpull page in the folder of his choice.
96
-
97
- 4. **Create Schedule** - enables an ipushpull report to be sent at a schedule of the user's choice
98
- >This leverages AdapTable Scheduling which enables actions to be performed either at a one off date and time or to be repeated daily at a scheduled time.
99
-
100
- 5. **Logout Button** - logs the User out of ipushpull (and displays the login button).
101
-
102
-
103
- ## Help
104
-
105
- Developers can learn how to access AdapTable programmatically at [AdapTable Documentation](https://docs.adaptabletools.com).
106
-
107
- ## More Information
108
-
109
- General information about Adaptable Tools is available at our [Website](http://www.adaptabletools.com)
110
-
111
- ## Support
112
-
113
- For all support enquiries please email [`support@adaptabletools.com`](mailto:support@adaptabletools.com) or [raise a Support Ticket](https://adaptabletools.zendesk.com/hc/en-us/requests/new).