@adaptabletools/adaptable-plugin-ipushpull-cjs 19.2.3 → 20.0.0-canary.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@adaptabletools/adaptable-plugin-ipushpull-cjs",
3
- "version": "19.2.3",
3
+ "version": "20.0.0-canary.0",
4
4
  "description": "",
5
5
  "homepage": "http://www.adaptabletools.com/",
6
6
  "author": {
@@ -13,14 +13,13 @@
13
13
  "ipushpull-js": "^2.25.0",
14
14
  "lodash": "^4.17.15",
15
15
  "prop-types": "^15.6.2",
16
- "react": "^16.8.0 || ^17.0.0 || ^18.0.0",
17
- "react-redux": "7.2.8",
18
- "rebass": "^3.2.2",
19
- "redux": "4.0.5",
16
+ "react": "^18.0.0 || ^19.0.0",
17
+ "react-redux": "^9.2.0",
18
+ "redux": "^5.0.1",
20
19
  "styled-components": "^4.4.1",
21
20
  "tinycolor2": "^1.4.2",
22
- "tslib": "^2.3.0",
23
- "@adaptabletools/adaptable-cjs": "19.2.3"
21
+ "tslib": "^2.8.1",
22
+ "@adaptabletools/adaptable-cjs": "20.0.0-canary.0"
24
23
  },
25
24
  "peerDependencies": {}
26
25
  }
@@ -14,10 +14,10 @@ class IPushPullApiImpl extends ApiBase_1.ApiBase {
14
14
  this.options = options;
15
15
  }
16
16
  getCurrentIPushPullUsername() {
17
- return this.getAdaptableState().System.CurrentIPushpullUsername;
17
+ return this.getAdaptableState().Internal.CurrentIPushpullUsername;
18
18
  }
19
19
  getCurrentIPushPullPassword() {
20
- return this.getAdaptableState().System.CurrentIPushpullPassword;
20
+ return this.getAdaptableState().Internal.CurrentIPushpullPassword;
21
21
  }
22
22
  getIPushPullUsername() {
23
23
  return this.options.username;
@@ -26,11 +26,10 @@ class IPushPullApiImpl extends ApiBase_1.ApiBase {
26
26
  return this.options.password;
27
27
  }
28
28
  getAutoLogin() {
29
- var _a;
30
- return (_a = this.options.autoLogin) !== null && _a !== void 0 ? _a : false;
29
+ return this.options.autoLogin ?? false;
31
30
  }
32
31
  getCurrentLiveIPushPullReport() {
33
- return this.getAdaptableState().System.CurrentLiveIPushPullReport;
32
+ return this.getAdaptableState().Internal.CurrentLiveIPushPullReport;
34
33
  }
35
34
  setIPushPullInstance(ippInstance) {
36
35
  this.ippInstance = ippInstance;
@@ -41,13 +40,13 @@ class IPushPullApiImpl extends ApiBase_1.ApiBase {
41
40
  sendSnapshot(iPushPullReport) {
42
41
  if (this.checkItemExists(iPushPullReport, iPushPullReport.ReportName, 'IPushPull Report')) {
43
42
  this.dispatchAction(IPushPullRedux.IPushPullSendSnapshot(iPushPullReport));
44
- this.getAdaptableApi().exportApi.internalApi.publishLiveLiveDataChangedEvent('ipushpull', 'SnapshotSent');
43
+ this.getExportApi().internalApi.publishLiveLiveDataChangedEvent('ipushpull', 'SnapshotSent');
45
44
  }
46
45
  }
47
46
  startLiveData(iPushPullReport) {
48
47
  if (this.checkItemExists(iPushPullReport, iPushPullReport.ReportName, 'IPushPull Report')) {
49
48
  this.dispatchAction(IPushPullRedux.IPushPullLiveReportSet(iPushPullReport));
50
- this.getAdaptableApi().exportApi.internalApi.publishLiveLiveDataChangedEvent('ipushpull', 'LiveDataStarted', iPushPullReport);
49
+ this.getExportApi().internalApi.publishLiveLiveDataChangedEvent('ipushpull', 'LiveDataStarted', iPushPullReport);
51
50
  }
52
51
  }
53
52
  stopLiveData() {
@@ -59,7 +58,7 @@ class IPushPullApiImpl extends ApiBase_1.ApiBase {
59
58
  // clear the live report
60
59
  this.dispatchAction(IPushPullRedux.IPushPullLiveReportClear());
61
60
  // fire the Live Report event for Export Stopped
62
- this.getAdaptableApi().exportApi.internalApi.publishLiveLiveDataChangedEvent('ipushpull', 'LiveDataStopped', currentLiveReport);
61
+ this.getExportApi().internalApi.publishLiveLiveDataChangedEvent('ipushpull', 'LiveDataStopped', currentLiveReport);
63
62
  }
64
63
  isIPushPullReportLive(iPushPullReport) {
65
64
  if (!iPushPullReport) {
@@ -72,10 +71,10 @@ class IPushPullApiImpl extends ApiBase_1.ApiBase {
72
71
  return true;
73
72
  }
74
73
  isIPushPullRunning() {
75
- return this.getAdaptableState().System.IsIPushPullRunning;
74
+ return this.getAdaptableState().Internal.IsIPushPullRunning;
76
75
  }
77
76
  getIPushPullDomains() {
78
- return this.getAdaptableState().System.IPushPullDomainsPages || [];
77
+ return this.getAdaptableState().Internal.IPushPullDomainsPages || [];
79
78
  }
80
79
  getPagesForIPushPullDomain(folderName) {
81
80
  let returnArray = [];
@@ -125,11 +124,11 @@ class IPushPullApiImpl extends ApiBase_1.ApiBase {
125
124
  }
126
125
  setIPushPullRunningOn() {
127
126
  this.dispatchAction(IPushPullRedux.SetIPushPullRunningOn());
128
- this.getAdaptableApi().exportApi.internalApi.publishLiveLiveDataChangedEvent('ipushpull', 'Connected');
127
+ this.getExportApi().internalApi.publishLiveLiveDataChangedEvent('ipushpull', 'Connected');
129
128
  }
130
129
  setIPushPullRunningOff() {
131
130
  this.dispatchAction(IPushPullRedux.SetIPushPullRunningOff());
132
- this.getAdaptableApi().exportApi.internalApi.publishLiveLiveDataChangedEvent('ipushpull', 'Disconnected');
131
+ this.getExportApi().internalApi.publishLiveLiveDataChangedEvent('ipushpull', 'Disconnected');
133
132
  }
134
133
  isIPushPullLiveDataRunning() {
135
134
  return Helper_1.default.objectExists(this.getCurrentLiveIPushPullReport());
@@ -17,59 +17,59 @@ class PushPullModule extends AdaptableModuleBase_1.AdaptableModuleBase {
17
17
  setTimeout(() => {
18
18
  this.throttledRecomputeAndSendLiveDataEvent = (0, throttle_1.default)(() => this.sendNewLiveData(), this.getThrottleTimeFromState());
19
19
  }, 1000);
20
- });
21
- // if a piece of data has updated then update any live reports except cell or row selected where the data change is relevant
22
- // currently we DONT send deltas - we simply send everything to ipushpull every time a relevant change happens
23
- this.api.internalApi
24
- .getDataService()
25
- .on('CellDataChanged', (cellDataChangedInfo) => {
26
- const api = this.getIPPApi();
27
- const exportApi = this.api.exportApi;
28
- if (api.isIPushPullLiveDataRunning()) {
29
- let currentLiveIPushPullReport = api.getCurrentLiveIPushPullReport();
30
- if (currentLiveIPushPullReport &&
31
- currentLiveIPushPullReport.ReportName !== GeneralConstants_1.SELECTED_CELLS_REPORT &&
32
- currentLiveIPushPullReport.ReportName !== GeneralConstants_1.SELECTED_ROWS_REPORT &&
33
- exportApi.internalApi.isDataChangeInReport(cellDataChangedInfo, this.getCurrentReport())) {
34
- this.throttledRecomputeAndSendLiveDataEvent();
35
- }
36
- }
37
- });
38
- // if the grid has refreshed then update all live reports
39
- this.adaptable._on('GridRefreshed', () => {
40
- if (this.getIPPApi().isIPushPullLiveDataRunning()) {
41
- this.throttledRecomputeAndSendLiveDataEvent();
42
- }
43
- });
44
- // if the grid filters have changed then update any live reports except cell or row selected
45
- this.adaptable._on('AdapTableFiltersApplied', () => {
46
- // Rerun all reports except selected cells / rows when filter changes
47
- if (this.getIPPApi().isIPushPullLiveDataRunning()) {
48
- let currentLiveIPushPullReport = this.getIPPApi().getCurrentLiveIPushPullReport();
49
- if (currentLiveIPushPullReport &&
50
- currentLiveIPushPullReport.ReportName !== GeneralConstants_1.SELECTED_CELLS_REPORT &&
51
- currentLiveIPushPullReport.ReportName !== GeneralConstants_1.SELECTED_ROWS_REPORT) {
52
- this.throttledRecomputeAndSendLiveDataEvent();
53
- }
54
- }
55
- });
56
- // if grid selection has changed and the ipushpull Live report is 'Selected Cells' or 'Selected Rows' then send updated data
57
- this.api.eventApi.on('CellSelectionChanged', () => {
58
- if (this.getIPPApi().isIPushPullLiveDataRunning()) {
59
- let currentLiveIPushPullReport = this.getIPPApi().getCurrentLiveIPushPullReport();
60
- if (currentLiveIPushPullReport &&
61
- currentLiveIPushPullReport.ReportName === GeneralConstants_1.SELECTED_CELLS_REPORT) {
62
- this.throttledRecomputeAndSendLiveDataEvent();
63
- }
64
- }
65
- });
66
- this.api.eventApi.on('RowSelectionChanged', () => {
67
- if (this.getIPPApi().isIPushPullLiveDataRunning()) {
68
- let currentLiveIPushPullReport = this.getIPPApi().getCurrentLiveIPushPullReport();
69
- if (currentLiveIPushPullReport &&
70
- currentLiveIPushPullReport.ReportName === GeneralConstants_1.SELECTED_ROWS_REPORT) {
71
- this.throttledRecomputeAndSendLiveDataEvent();
72
- }
20
+ if (this.getIPPApi().isIPushPullRunning()) {
21
+ // if a piece of data has updated then update any live reports except cell or row selected where the data change is relevant
22
+ // currently we DONT send deltas - we simply send everything to ipushpull every time a relevant change happens
23
+ this.api.internalApi
24
+ .getDataService()
25
+ .on('CellDataChanged', (cellDataChangedInfo) => {
26
+ const api = this.getIPPApi();
27
+ const exportApi = this.api.exportApi;
28
+ if (api.isIPushPullLiveDataRunning()) {
29
+ let currentLiveIPushPullReport = api.getCurrentLiveIPushPullReport();
30
+ if (currentLiveIPushPullReport &&
31
+ currentLiveIPushPullReport.ReportName !== GeneralConstants_1.SELECTED_DATA_REPORT &&
32
+ exportApi.internalApi.isDataChangeInReport(cellDataChangedInfo, this.getCurrentReport())) {
33
+ this.throttledRecomputeAndSendLiveDataEvent();
34
+ }
35
+ }
36
+ });
37
+ // if the grid has refreshed then update all live reports
38
+ this.adaptable._on('GridRefreshed', () => {
39
+ if (this.getIPPApi().isIPushPullLiveDataRunning()) {
40
+ this.throttledRecomputeAndSendLiveDataEvent();
41
+ }
42
+ });
43
+ // if the grid filters have changed then update any live reports except cell or row selected
44
+ this.adaptable._on('AdapTableFiltersApplied', () => {
45
+ // Rerun all reports except selected cells / rows when filter changes
46
+ if (this.getIPPApi().isIPushPullLiveDataRunning()) {
47
+ let currentLiveIPushPullReport = this.getIPPApi().getCurrentLiveIPushPullReport();
48
+ if (currentLiveIPushPullReport &&
49
+ currentLiveIPushPullReport.ReportName !== GeneralConstants_1.SELECTED_DATA_REPORT) {
50
+ this.throttledRecomputeAndSendLiveDataEvent();
51
+ }
52
+ }
53
+ });
54
+ // if grid selection has changed and the ipushpull Live report is 'Selected Cells' or 'Selected Rows' then send updated data
55
+ this.api.eventApi.on('CellSelectionChanged', () => {
56
+ if (this.getIPPApi().isIPushPullLiveDataRunning()) {
57
+ let currentLiveIPushPullReport = this.getIPPApi().getCurrentLiveIPushPullReport();
58
+ if (currentLiveIPushPullReport &&
59
+ currentLiveIPushPullReport.ReportName === GeneralConstants_1.SELECTED_DATA_REPORT) {
60
+ this.throttledRecomputeAndSendLiveDataEvent();
61
+ }
62
+ }
63
+ });
64
+ this.api.eventApi.on('RowSelectionChanged', () => {
65
+ if (this.getIPPApi().isIPushPullLiveDataRunning()) {
66
+ let currentLiveIPushPullReport = this.getIPPApi().getCurrentLiveIPushPullReport();
67
+ if (currentLiveIPushPullReport &&
68
+ currentLiveIPushPullReport.ReportName === GeneralConstants_1.SELECTED_DATA_REPORT) {
69
+ this.throttledRecomputeAndSendLiveDataEvent();
70
+ }
71
+ }
72
+ });
73
73
  }
74
74
  });
75
75
  }
@@ -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.entitlementApi
86
- .getEntitlementAccessLevelForModule(this.moduleInfo.ModuleName);
85
+ this.AccessLevel = this.api.entitlementApi.getEntitlementAccessLevelForModule(this.moduleInfo.ModuleName);
87
86
  }
88
87
  }
89
88
  getIPPApi() {
@@ -128,13 +128,24 @@ state, action) => {
128
128
  return Object.assign({}, state, { IsIPushPullRunning: false });
129
129
  case PluginsRedux_1.IPUSHPULL_SET_LOGIN_DETAILS: {
130
130
  let loginAction = action;
131
- return Object.assign(Object.assign({}, state), { CurrentIPushpullUsername: loginAction.username, CurrentIPushpullPassword: loginAction.password });
131
+ return {
132
+ ...state,
133
+ CurrentIPushpullUsername: loginAction.username,
134
+ CurrentIPushpullPassword: loginAction.password,
135
+ };
132
136
  }
133
137
  case PluginsRedux_1.IPUSHPULL_LOGOUT: {
134
- return Object.assign(Object.assign({}, state), { CurrentIPushpullUsername: undefined, CurrentIPushpullPassword: undefined });
138
+ return {
139
+ ...state,
140
+ CurrentIPushpullUsername: undefined,
141
+ CurrentIPushpullPassword: undefined,
142
+ };
135
143
  }
136
144
  case PluginsRedux_1.IPUSHPULL_SET_LOGIN_ERROR_MESSAGE: {
137
- return Object.assign(Object.assign({}, state), { IPushPullLoginErrorMessage: action.errorMessage });
145
+ return {
146
+ ...state,
147
+ IPushPullLoginErrorMessage: action.errorMessage,
148
+ };
138
149
  }
139
150
  case PluginsRedux_1.IPUSHPULL_DOMAIN_PAGES_SET: {
140
151
  return Object.assign({}, state, {
@@ -1,5 +1,5 @@
1
1
  import { ServiceStatus } from '../PushPullService';
2
- import { IPushPullDomain } from "@adaptabletools/adaptable-cjs/src/PredefinedConfig/SystemState";
2
+ import { IPushPullDomain } from "@adaptabletools/adaptable-cjs/src/PredefinedConfig/InternalState";
3
3
  export interface IPushPullService {
4
4
  login(login: string, password: string): Promise<any>;
5
5
  getDomainPages(): Promise<IPushPullDomain[]>;
@@ -1,7 +1,7 @@
1
1
  import { IAdaptable } from "@adaptabletools/adaptable-cjs/src/AdaptableInterfaces/IAdaptable";
2
2
  import { IPPStyle } from "@adaptabletools/adaptable-cjs/src/Utilities/Interface/IPPStyle";
3
3
  import { IPushPullService } from './Interface/IPushPullService';
4
- import { IPushPullDomain } from "@adaptabletools/adaptable-cjs/src/PredefinedConfig/SystemState";
4
+ import { IPushPullDomain } from "@adaptabletools/adaptable-cjs/src/PredefinedConfig/InternalState";
5
5
  export declare enum ServiceStatus {
6
6
  Unknown = "Unknown",
7
7
  Disconnected = "Disconnected",
@@ -10,7 +10,7 @@ var ServiceStatus;
10
10
  ServiceStatus["Disconnected"] = "Disconnected";
11
11
  ServiceStatus["Connected"] = "Connected";
12
12
  ServiceStatus["Error"] = "Error";
13
- })(ServiceStatus = exports.ServiceStatus || (exports.ServiceStatus = {}));
13
+ })(ServiceStatus || (exports.ServiceStatus = ServiceStatus = {}));
14
14
  class PushPullService {
15
15
  constructor(adaptable) {
16
16
  this.adaptable = adaptable;
@@ -232,7 +232,7 @@ class PushPullService {
232
232
  headerFontStyle: headerColStyle.fontStyle,
233
233
  headerFontWeight: headerColStyle.fontWeight,
234
234
  height: Number(headerColStyle.height.replace('px', '')),
235
- Columns: this.adaptable.api.columnApi.getColumns().map((col) => {
235
+ Columns: this.adaptable.api.columnApi.getUIAvailableColumns().map((col) => {
236
236
  const headerColumn = document.querySelector(`.ag-header-cell[col-id='${col.columnId}']`);
237
237
  const headerColumnStyle = window.getComputedStyle(headerColumn || headerFirstCol, null);
238
238
  return {
@@ -251,7 +251,7 @@ class PushPullService {
251
251
  fontStyle: firstRowStyle.fontStyle,
252
252
  fontWeight: firstRowStyle.fontWeight,
253
253
  height: Number(firstRowStyle.height.replace('px', '')),
254
- Columns: this.adaptable.api.columnApi.getColumns().map((col) => {
254
+ Columns: this.adaptable.api.columnApi.getUIAvailableColumns().map((col) => {
255
255
  const cellElement = document.querySelector(`.ag-cell[col-id='${col.columnId}']`);
256
256
  const headerColumnStyle = window.getComputedStyle(cellElement || firstRow, null);
257
257
  return {
@@ -273,7 +273,7 @@ class PushPullService {
273
273
  headerFontStyle: 'normal',
274
274
  headerFontWeight: '400',
275
275
  height: 65,
276
- Columns: this.adaptable.api.columnApi.getColumns().map((col) => {
276
+ Columns: this.adaptable.api.columnApi.getUIAvailableColumns().map((col) => {
277
277
  return {
278
278
  columnFriendlyName: col.friendlyName,
279
279
  width: 200,
@@ -290,7 +290,7 @@ class PushPullService {
290
290
  fontStyle: 'normal',
291
291
  fontWeight: '400',
292
292
  height: 30,
293
- Columns: this.adaptable.api.columnApi.getColumns().map((col) => {
293
+ Columns: this.adaptable.api.columnApi.getUIAvailableColumns().map((col) => {
294
294
  return {
295
295
  columnFriendlyName: col.friendlyName,
296
296
  width: 200,
@@ -1,4 +1,4 @@
1
- /// <reference types="react" />
1
+ import * as React from 'react';
2
2
  import * as IPushPullRedux from '../Redux/ActionReducers/IPushPullRedux';
3
3
  import { IPushPullDomain } from "@adaptabletools/adaptable-cjs/src/PredefinedConfig/IPushPullState";
4
4
  interface IPushPullAddPagePopupProps {
@@ -6,5 +6,8 @@ interface IPushPullAddPagePopupProps {
6
6
  onAddPage: (folder: string, page: string) => IPushPullRedux.IPushPullAddPageAction;
7
7
  onCancel: () => any;
8
8
  }
9
- export declare let IPushPullAddPagePopup: import("react-redux").ConnectedComponent<(props: IPushPullAddPagePopupProps) => JSX.Element, import("react-redux").Omit<JSX.LibraryManagedAttributes<C, import("react-redux").GetProps<C>>, "IPushPullDomainsPages" | "onCancel" | "onAddPage">>;
9
+ export declare let IPushPullAddPagePopup: import("react-redux").ConnectedComponent<(props: IPushPullAddPagePopupProps) => React.JSX.Element, {
10
+ context?: React.Context<import("react-redux").ReactReduxContextValue<any, import("redux").UnknownAction>>;
11
+ store?: import("redux").Store<any, import("redux").UnknownAction, unknown>;
12
+ }>;
10
13
  export {};
@@ -15,7 +15,7 @@ const PanelWithImage_1 = require("@adaptabletools/adaptable-cjs/src/View/Compone
15
15
  const PopupContext_1 = require("@adaptabletools/adaptable-cjs/src/View/Components/Popups/AdaptablePopup/PopupContext");
16
16
  const ErrorBox_1 = tslib_1.__importDefault(require("@adaptabletools/adaptable-cjs/src/components/ErrorBox"));
17
17
  const HelpBlock_1 = tslib_1.__importDefault(require("@adaptabletools/adaptable-cjs/src/components/HelpBlock"));
18
- const rebass_1 = require("rebass");
18
+ const Flex_1 = require("@adaptabletools/adaptable-cjs/src/components/Flex");
19
19
  const Dropdown_1 = tslib_1.__importDefault(require("@adaptabletools/adaptable-cjs/src/components/Dropdown"));
20
20
  const GeneralConstants_1 = require("@adaptabletools/adaptable-cjs/src/Utilities/Constants/GeneralConstants");
21
21
  const ArrayExtensions_1 = tslib_1.__importDefault(require("@adaptabletools/adaptable-cjs/src/Utilities/Extensions/ArrayExtensions"));
@@ -29,7 +29,7 @@ const IPushPullAddPageComponent = (props) => {
29
29
  const { hidePopup } = (0, PopupContext_1.usePopupContext)();
30
30
  const onSubmit = () => {
31
31
  if (ArrayExtensions_1.default.ContainsItem(state.AvailablePages, state.Page)) {
32
- setState(Object.assign(Object.assign({}, state), { ErrorMessage: 'A page with that name already exists in the folder' }));
32
+ setState({ ...state, ErrorMessage: 'A page with that name already exists in the folder' });
33
33
  }
34
34
  else {
35
35
  props.onAddPage(state.Folder, state.Page);
@@ -37,7 +37,7 @@ const IPushPullAddPageComponent = (props) => {
37
37
  };
38
38
  const onPageNameChange = (event) => {
39
39
  const e = event.target;
40
- setState(Object.assign(Object.assign({}, state), { Page: e.value }));
40
+ setState({ ...state, Page: e.value });
41
41
  };
42
42
  const onFolderChanged = (folderName) => {
43
43
  if (StringExtensions_1.StringExtensions.IsNotNullOrEmpty(folderName) && folderName !== 'Select Folder') {
@@ -78,7 +78,7 @@ const IPushPullAddPageComponent = (props) => {
78
78
  React.createElement("div", { style: { flex: 1 } }),
79
79
  React.createElement(SimpleButton_1.default, { tone: "accent", variant: "raised", type: "submit", disabled: StringExtensions_1.StringExtensions.IsNullOrEmpty(state.Folder) ||
80
80
  StringExtensions_1.StringExtensions.IsNullOrEmpty(state.Page), icon: 'check' }, "Add Page")) },
81
- React.createElement(rebass_1.Flex, { flexDirection: "column", padding: 2, margin: 2 },
81
+ React.createElement(Flex_1.Flex, { flexDirection: "column", padding: 2, margin: 2 },
82
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
83
  React.createElement(FormLayout_1.default, { margin: 3 },
84
84
  React.createElement(FormLayout_1.FormRow, { label: "Folder:" },
@@ -90,7 +90,7 @@ const IPushPullAddPageComponent = (props) => {
90
90
  };
91
91
  function mapStateToProps(state) {
92
92
  return {
93
- IPushPullDomainsPages: state.System.IPushPullDomainsPages,
93
+ IPushPullDomainsPages: state.Internal.IPushPullDomainsPages,
94
94
  };
95
95
  }
96
96
  function mapDispatchToProps(dispatch) {
@@ -1,4 +1,4 @@
1
- /// <reference types="react" />
1
+ import * as React from 'react';
2
2
  import * as IPushPullRedux from '../Redux/ActionReducers/IPushPullRedux';
3
3
  interface IPushPullLoginPopupProps {
4
4
  pushpullLogin: string | undefined;
@@ -7,5 +7,8 @@ interface IPushPullLoginPopupProps {
7
7
  onLogin: (login: string, password: string) => IPushPullRedux.IPushPullLoginAction;
8
8
  onCancel: () => any;
9
9
  }
10
- export declare let IPushPullLoginPopup: import("react-redux").ConnectedComponent<(props: IPushPullLoginPopupProps) => JSX.Element, import("react-redux").Omit<JSX.LibraryManagedAttributes<C, import("react-redux").GetProps<C>>, keyof IPushPullLoginPopupProps>>;
10
+ export declare let IPushPullLoginPopup: import("react-redux").ConnectedComponent<(props: IPushPullLoginPopupProps) => React.JSX.Element, {
11
+ context?: React.Context<import("react-redux").ReactReduxContextValue<any, import("redux").UnknownAction>>;
12
+ store?: import("redux").Store<any, import("redux").UnknownAction, unknown>;
13
+ }>;
11
14
  export {};
@@ -16,7 +16,7 @@ const PanelWithImage_1 = require("@adaptabletools/adaptable-cjs/src/View/Compone
16
16
  const PopupContext_1 = require("@adaptabletools/adaptable-cjs/src/View/Components/Popups/AdaptablePopup/PopupContext");
17
17
  const ErrorBox_1 = tslib_1.__importDefault(require("@adaptabletools/adaptable-cjs/src/components/ErrorBox"));
18
18
  const HelpBlock_1 = tslib_1.__importDefault(require("@adaptabletools/adaptable-cjs/src/components/HelpBlock"));
19
- const rebass_1 = require("rebass");
19
+ const Flex_1 = require("@adaptabletools/adaptable-cjs/src/components/Flex");
20
20
  const IPushPullLoginComponent = (props) => {
21
21
  const adaptable = (0, AdaptableContext_1.useAdaptable)();
22
22
  const options = adaptable.getPlugin('ipushpull').options;
@@ -30,11 +30,11 @@ const IPushPullLoginComponent = (props) => {
30
30
  };
31
31
  const onLoginChange = (event) => {
32
32
  const e = event.target;
33
- setState(Object.assign(Object.assign({}, state), { Login: e.value }));
33
+ setState({ ...state, Login: e.value });
34
34
  };
35
35
  const onPasswordChange = (event) => {
36
36
  const e = event.target;
37
- setState(Object.assign(Object.assign({}, state), { Password: e.value }));
37
+ setState({ ...state, Password: e.value });
38
38
  };
39
39
  return (React.createElement(PanelWithImage_1.PanelWithImage, { header: "ipushpull Login Details", glyphicon: "login", variant: "primary", style: { height: '100%' } },
40
40
  React.createElement(FlexWithFooter_1.default, { as: "form", onSubmit: (e) => {
@@ -49,7 +49,7 @@ const IPushPullLoginComponent = (props) => {
49
49
  } }, "CLOSE"),
50
50
  React.createElement("div", { style: { flex: 1 } }),
51
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 },
52
+ React.createElement(Flex_1.Flex, { flexDirection: "column", padding: 2, margin: 2 },
53
53
  React.createElement(HelpBlock_1.default, { marginBottom: 1 }, "Login to ipushpull using your login (email address) and password."),
54
54
  React.createElement(FormLayout_1.default, { margin: 3 },
55
55
  React.createElement(FormLayout_1.FormRow, { label: "ipushpull login:" },
@@ -64,7 +64,7 @@ function mapStateToProps(state) {
64
64
  // pushpullLogin: state.IPushPull ? state.IPushPull!.Username : undefined,
65
65
  // pushpullPassword: state.IPushPull ? state.IPushPull!.Password : undefined,
66
66
  // pushpullLoginErrorMessage: state.IPushPull.IPushPullLoginErrorMessage,
67
- pushpullLoginErrorMessage: state.System.IPushPullLoginErrorMessage,
67
+ pushpullLoginErrorMessage: state.Internal.IPushPullLoginErrorMessage,
68
68
  };
69
69
  }
70
70
  function mapDispatchToProps(dispatch) {
@@ -1,4 +1,5 @@
1
1
  import * as React from 'react';
2
+ import * as Redux from 'redux';
2
3
  import * as IPushPullRedux from '../Redux/ActionReducers/IPushPullRedux';
3
4
  import { ModuleViewPopupProps } from "@adaptabletools/adaptable-cjs/src/View/Components/SharedProps/ModuleViewPopupProps";
4
5
  import * as TeamSharingRedux from "@adaptabletools/adaptable-cjs/src/Redux/ActionsReducers/TeamSharingRedux";
@@ -15,8 +16,11 @@ declare class IPushPullPopupComponent extends React.Component<IPushPullPopupProp
15
16
  constructor(props: IPushPullPopupProps);
16
17
  shouldClosePopupOnFinishWizard: boolean;
17
18
  componentDidMount(): void;
18
- render(): JSX.Element;
19
+ render(): React.JSX.Element;
19
20
  onApplyExport(iPushPullReport: IPushPullReport): void;
20
21
  }
21
- export declare let IPushPullPopup: import("react-redux").ConnectedComponent<typeof IPushPullPopupComponent, import("react-redux").Omit<JSX.LibraryManagedAttributes<C, import("react-redux").GetProps<C>>, keyof IPushPullPopupProps>>;
22
+ export declare let IPushPullPopup: import("react-redux").ConnectedComponent<typeof IPushPullPopupComponent, {
23
+ context?: React.Context<import("react-redux").ReactReduxContextValue<any, Redux.UnknownAction>>;
24
+ store?: Redux.Store<any, Redux.UnknownAction, unknown>;
25
+ }>;
22
26
  export {};
@@ -1,10 +1,10 @@
1
- /// <reference types="react" />
2
1
  import { ViewPanelProps } from "@adaptabletools/adaptable-cjs/src/View/Components/SharedProps/ViewPanelProps";
3
2
  import { IPushPullDomain, IPushPullReport, IPushPullSchedule } from "@adaptabletools/adaptable-cjs/src/PredefinedConfig/IPushPullState";
4
3
  import * as IPushPullRedux from '../Redux/ActionReducers/IPushPullRedux';
5
4
  import * as PopupRedux from "@adaptabletools/adaptable-cjs/src/Redux/ActionsReducers/PopupRedux";
6
5
  import { AdaptableColumn } from "@adaptabletools/adaptable-cjs/src/PredefinedConfig/Common/AdaptableColumn";
7
6
  import { Report } from "@adaptabletools/adaptable-cjs/src/PredefinedConfig/ExportState";
7
+ import * as React from 'react';
8
8
  export interface IPushPullViewPanelComponentProps extends ViewPanelProps {
9
9
  onIPushPullSendSnapshot: (iPushPulleport: IPushPullReport) => IPushPullRedux.IPushPullSendSnapshotAction;
10
10
  onIPushPullStartLiveData: (iPushPulleport: IPushPullReport) => IPushPullRedux.IPushPullStartLiveDataAction;
@@ -25,4 +25,7 @@ export interface IPushPullViewPanelComponentProps extends ViewPanelProps {
25
25
  onCurrentIPushPullFolderChange: (folder: string) => IPushPullRedux.IPushPullSetCurrentFolderAction;
26
26
  onCurrentIPushPullPageChange: (page: string) => IPushPullRedux.IPushPullSetCurrentPageAction;
27
27
  }
28
- export declare const IPushPullViewPanelControl: import("react-redux").ConnectedComponent<(props: IPushPullViewPanelComponentProps) => JSX.Element, import("react-redux").Omit<JSX.LibraryManagedAttributes<C, import("react-redux").GetProps<C>>, keyof IPushPullViewPanelComponentProps>>;
28
+ export declare const IPushPullViewPanelControl: import("react-redux").ConnectedComponent<(props: IPushPullViewPanelComponentProps) => React.JSX.Element, {
29
+ context?: React.Context<import("react-redux").ReactReduxContextValue<any, import("redux").UnknownAction>>;
30
+ store?: import("redux").Store<any, import("redux").UnknownAction, unknown>;
31
+ }>;
@@ -7,7 +7,7 @@ const PopupRedux = tslib_1.__importStar(require("@adaptabletools/adaptable-cjs/s
7
7
  const React = tslib_1.__importStar(require("react"));
8
8
  const ObjectFactory_1 = tslib_1.__importDefault(require("@adaptabletools/adaptable-cjs/src/Utilities/ObjectFactory"));
9
9
  const StringExtensions_1 = require("@adaptabletools/adaptable-cjs/src/Utilities/Extensions/StringExtensions");
10
- const rebass_1 = require("rebass");
10
+ const Flex_1 = require("@adaptabletools/adaptable-cjs/src/components/Flex");
11
11
  const DropdownButton_1 = tslib_1.__importDefault(require("@adaptabletools/adaptable-cjs/src/components/DropdownButton"));
12
12
  const ButtonExport_1 = require("@adaptabletools/adaptable-cjs/src/View/Components/Buttons/ButtonExport");
13
13
  const ButtonPause_1 = require("@adaptabletools/adaptable-cjs/src/View/Components/Buttons/ButtonPause");
@@ -21,7 +21,6 @@ const ButtonLogin_1 = require("@adaptabletools/adaptable-cjs/src/View/Components
21
21
  const ModuleConstants = tslib_1.__importStar(require("@adaptabletools/adaptable-cjs/src/Utilities/Constants/ModuleConstants"));
22
22
  const react_redux_1 = require("react-redux");
23
23
  const IPushPullViewPanelComponent = (props) => {
24
- var _a, _b, _c, _d;
25
24
  const [_, update] = React.useState(0);
26
25
  const forceUpdate = () => update((x) => x + 1);
27
26
  const onLiveDataChanged = React.useCallback((liveDataChangedInfo) => {
@@ -74,20 +73,20 @@ const IPushPullViewPanelComponent = (props) => {
74
73
  onClick: () => onSelectedReportChanged(report),
75
74
  };
76
75
  });
77
- let availableFolders = (_b = (_a = props.IPushPullDomainsPages) === null || _a === void 0 ? void 0 : _a.map((iPushPullDomain) => {
76
+ let availableFolders = props.IPushPullDomainsPages?.map((iPushPullDomain) => {
78
77
  return {
79
78
  label: iPushPullDomain.Name,
80
79
  value: iPushPullDomain.Name,
81
80
  onClick: () => onFolderChanged(iPushPullDomain.Name),
82
81
  };
83
- })) !== null && _b !== void 0 ? _b : [];
84
- let availablePages = (_d = (_c = props.CurrentIPushPullAvailablePages) === null || _c === void 0 ? void 0 : _c.map((page) => {
82
+ }) ?? [];
83
+ let availablePages = props.CurrentIPushPullAvailablePages?.map((page) => {
85
84
  return {
86
85
  label: page,
87
86
  value: page,
88
87
  onClick: () => onPageChanged(page),
89
88
  };
90
- })) !== null && _d !== void 0 ? _d : [];
89
+ }) ?? [];
91
90
  // this is clearly ridiculous!
92
91
  // im getting tired...
93
92
  let isCompletedReport = StringExtensions_1.StringExtensions.IsNotNullOrEmpty(props.CurrentIPushPullReportName) &&
@@ -99,23 +98,23 @@ const IPushPullViewPanelComponent = (props) => {
99
98
  props.CurrentIPushPullFolder == props.CurrentLiveIPushPullReport.Folder &&
100
99
  props.CurrentIPushPullPage == props.CurrentLiveIPushPullReport.Page;
101
100
  const elementType = props.viewType === 'Toolbar' ? 'DashboardToolbar' : 'ToolPanel';
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,
101
+ return props.IsIPushPullRunning ? (React.createElement(Flex_1.Flex, { flexDirection: "row", className: `ab-${elementType}__IPushPull__wrap`, flexWrap: props.viewType === 'ToolPanel' ? 'wrap' : 'nowrap' },
102
+ React.createElement(Flex_1.Flex, null,
104
103
  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)
105
104
  ? props.CurrentIPushPullReportName
106
105
  : 'Select Report')),
107
- React.createElement(rebass_1.Flex, null,
106
+ React.createElement(Flex_1.Flex, null,
108
107
  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)
109
108
  ? props.CurrentIPushPullFolder
110
109
  : 'Select Folder')),
111
- React.createElement(rebass_1.Flex, null,
110
+ React.createElement(Flex_1.Flex, null,
112
111
  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)
113
112
  ? props.CurrentIPushPullPage
114
113
  : 'Select Page')),
115
- React.createElement(rebass_1.Flex, { style: { minWidth: '148px' } },
114
+ React.createElement(Flex_1.Flex, { style: { minWidth: '148px' } },
116
115
  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
116
  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.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 })))),
117
+ isCompletedReport && (React.createElement(Flex_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
118
  ' ',
120
119
  React.createElement(ButtonNewPage_1.ButtonNewPage, { marginLeft: 1, className: `ab-${elementType}__IPushPull__newpage`, onClick: () => props.onShowAddIPushPullPage(), tooltip: "New Page", disabled: isLiveIPushPullReport, accessLevel: props.accessLevel }),
121
120
  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 },
@@ -124,14 +123,14 @@ const IPushPullViewPanelComponent = (props) => {
124
123
  };
125
124
  function mapStateToProps(state) {
126
125
  return {
127
- CurrentLiveIPushPullReport: state.System.CurrentLiveIPushPullReport,
126
+ CurrentLiveIPushPullReport: state.Internal.CurrentLiveIPushPullReport,
128
127
  Reports: state.Export.Reports,
129
- IPushPullDomainsPages: state.System.IPushPullDomainsPages,
130
- IsIPushPullRunning: state.System.IsIPushPullRunning,
131
- CurrentIPushPullReportName: state.System.IPushPullCurrentReportName,
132
- CurrentIPushPullFolder: state.System.IPushPullCurrentFolder,
133
- CurrentIPushPullPage: state.System.IPushPullCurrentPage,
134
- CurrentIPushPullAvailablePages: state.System.IPushPullCurrentAvailablePages,
128
+ IPushPullDomainsPages: state.Internal.IPushPullDomainsPages,
129
+ IsIPushPullRunning: state.Internal.IsIPushPullRunning,
130
+ CurrentIPushPullReportName: state.Internal.IPushPullCurrentReportName,
131
+ CurrentIPushPullFolder: state.Internal.IPushPullCurrentFolder,
132
+ CurrentIPushPullPage: state.Internal.IPushPullCurrentPage,
133
+ CurrentIPushPullAvailablePages: state.Internal.IPushPullCurrentAvailablePages,
135
134
  };
136
135
  }
137
136
  function mapDispatchToProps(dispatch) {
package/src/index.d.ts CHANGED
@@ -4,6 +4,7 @@ import { IPushPullState } from "@adaptabletools/adaptable-cjs/src/PredefinedConf
4
4
  import { IPushPullApi } from "@adaptabletools/adaptable-cjs/src/Api/IPushPullApi";
5
5
  import { IPushPullPluginOptions } from "@adaptabletools/adaptable-cjs/src/AdaptableOptions/IPushPullPluginOptions";
6
6
  import { IAdaptable } from "@adaptabletools/adaptable-cjs/src/AdaptableInterfaces/IAdaptable";
7
+ import type { Middleware, Action } from 'redux';
7
8
  declare class IPushPullPlugin extends AdaptablePlugin {
8
9
  options: IPushPullPluginOptions;
9
10
  pluginId: string;
@@ -14,7 +15,7 @@ declare class IPushPullPlugin extends AdaptablePlugin {
14
15
  rootReducer: (rootReducer: any) => {
15
16
  System: (state: IPushPullState, action: Redux.Action) => IPushPullState;
16
17
  };
17
- reduxMiddleware: (adaptable: IAdaptable) => Redux.Middleware;
18
+ reduxMiddleware: (adaptable: IAdaptable) => Middleware;
18
19
  afterInitStore(adaptable: IAdaptable): void;
19
20
  }
20
21
  declare const _default: (options?: IPushPullPluginOptions) => IPushPullPlugin;
package/src/index.js CHANGED
@@ -4,8 +4,8 @@ const tslib_1 = require("tslib");
4
4
  const types_1 = require("@adaptabletools/adaptable-cjs/types");
5
5
  const env_1 = tslib_1.__importDefault(require("./env"));
6
6
  // TODO in the future, try to put back the version check
7
- // import { version, name } from '../package.json';
8
- // import { version as coreVersion } from '@adaptabletools/adaptable/package.json';
7
+ const package_json_1 = require("../package.json");
8
+ const package_json_2 = require("@adaptabletools/adaptable-cjs/package.json");
9
9
  const ModuleConstants = tslib_1.__importStar(require("@adaptabletools/adaptable-cjs/src/Utilities/Constants/ModuleConstants"));
10
10
  const ModuleConstants_1 = require("@adaptabletools/adaptable-cjs/src/Utilities/Constants/ModuleConstants");
11
11
  const PopupRedux = tslib_1.__importStar(require("@adaptabletools/adaptable-cjs/src/Redux/ActionsReducers/PopupRedux"));
@@ -20,14 +20,14 @@ const IPushPullAddPagePopup_1 = require("./View/IPushPullAddPagePopup");
20
20
  const PluginsRedux_1 = require("@adaptabletools/adaptable-cjs/src/Redux/ActionsReducers/PluginsRedux");
21
21
  const StringExtensions_1 = tslib_1.__importDefault(require("@adaptabletools/adaptable-cjs/src/Utilities/Extensions/StringExtensions"));
22
22
  const IPushPullViewPanel_1 = require("./View/IPushPullViewPanel");
23
- // const suffix = name.endsWith('-cjs') ? '-cjs' : '';
24
- // if (version !== coreVersion) {
25
- // console.warn(`
26
- // !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
27
- // !!!!!!! "@adaptabletools/adaptable-plugin-ipushpull${suffix}" (v @${version}) and "@adaptabletools/adaptable${suffix}" (v @${coreVersion}) have different versions - they should have the exact same version.
28
- // !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
29
- // `);
30
- // }
23
+ const suffix = package_json_1.name.endsWith('-cjs') ? '-cjs' : '';
24
+ if (package_json_1.version !== package_json_2.version) {
25
+ console.warn(`
26
+ !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
27
+ !!!!!!! "@adaptabletools/adaptable-plugin-ipushpull${suffix}" (v @${package_json_1.version}) and "@adaptabletools/adaptable${suffix}" (v @${package_json_2.version}) have different versions - they should have the exact same version.
28
+ !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
29
+ `);
30
+ }
31
31
  const getApiKey = () => {
32
32
  let key = env_1.default.IPUSHPULL_API_KEY; // need to make sure that is always there
33
33
  return key;
@@ -117,7 +117,7 @@ class IPushPullPlugin extends types_1.AdaptablePlugin {
117
117
  }
118
118
  case PluginsRedux_1.IPUSHPULL_DOMAIN_PAGES_SET: {
119
119
  //refresh the available pages
120
- const currentFolder = middlewareAPI.getState().System.IPushPullCurrentFolder;
120
+ const currentFolder = middlewareAPI.getState().Internal.IPushPullCurrentFolder;
121
121
  const isFolderValid = StringExtensions_1.default.IsNotNullOrEmpty(currentFolder);
122
122
  if (isFolderValid) {
123
123
  const availablePages = adaptable.api.pluginsApi
@@ -134,14 +134,21 @@ class IPushPullPlugin extends types_1.AdaptablePlugin {
134
134
  };
135
135
  };
136
136
  };
137
- const ippConfig = Object.assign(Object.assign({}, defaultOptions.ippConfig), (options || {}).ippConfig);
137
+ const ippConfig = {
138
+ ...defaultOptions.ippConfig,
139
+ ...(options || {}).ippConfig,
140
+ };
138
141
  if (!ippConfig.api_key) {
139
142
  ippConfig.api_key = defaultOptions.ippConfig.api_key;
140
143
  }
141
144
  if (!ippConfig.api_secret) {
142
145
  ippConfig.api_secret = defaultOptions.ippConfig.api_secret;
143
146
  }
144
- this.options = Object.assign(Object.assign(Object.assign({}, defaultOptions), options), { ippConfig });
147
+ this.options = {
148
+ ...defaultOptions,
149
+ ...options,
150
+ ippConfig,
151
+ };
145
152
  /**
146
153
  * Contains the objects required to export (snapshot or live) data to ipushpull from AdapTable.
147
154
  *