@lingk/sync 2.0.13 → 2.0.14

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.
@@ -5019,10 +5019,7 @@ module.exports =
5019
5019
  style: {
5020
5020
  height: 30,
5021
5021
  lineHeight: "10px",
5022
- marginTop: -1,
5023
- position: "absolute",
5024
- top: 130,
5025
- left: 850
5022
+ marginTop: 15
5026
5023
  },
5027
5024
  onClick: this.startOauth,
5028
5025
  disabled: credsDisabledCheck
@@ -6187,6 +6184,18 @@ module.exports =
6187
6184
 
6188
6185
  var _this = _possibleConstructorReturn(this, (EnvSection.__proto__ || Object.getPrototypeOf(EnvSection)).call(this));
6189
6186
 
6187
+ _this.onDefaultConnectionChange = function () {
6188
+ _this.setState({
6189
+ defaultConnection: !_this.state.defaultConnection
6190
+ });
6191
+ };
6192
+
6193
+ _this.onAPIAccessChange = function () {
6194
+ _this.setState({
6195
+ APIAccess: !_this.state.APIAccess
6196
+ });
6197
+ };
6198
+
6190
6199
  _this.credKeyPress = function (e) {
6191
6200
  var _this$props = _this.props,
6192
6201
  checking = _this$props.checking,
@@ -6215,7 +6224,8 @@ module.exports =
6215
6224
  _this.state = {
6216
6225
  actualCreds: {},
6217
6226
  showPass: false,
6218
- APIAccess: false
6227
+ APIAccess: false,
6228
+ defaultConnection: false
6219
6229
  };
6220
6230
  return _this;
6221
6231
  }
@@ -6225,7 +6235,15 @@ module.exports =
6225
6235
  value: function componentWillMount() {
6226
6236
  var _props = this.props,
6227
6237
  creds = _props.creds,
6228
- config = _props.config;
6238
+ config = _props.config,
6239
+ connectionInfo = _props.connectionInfo;
6240
+
6241
+ if (connectionInfo) {
6242
+ this.setState({
6243
+ defaultConnection: connectionInfo.defaultConnection,
6244
+ APIAccess: connectionInfo.ApiAccessible
6245
+ });
6246
+ }
6229
6247
 
6230
6248
  if (config.type === "SFTP") {
6231
6249
  this.setState({
@@ -6281,7 +6299,11 @@ module.exports =
6281
6299
  }, {
6282
6300
  key: "saveCreds",
6283
6301
  value: function saveCreds() {
6284
- this.props.postCredentials(this.state.actualCreds);
6302
+ var _state = this.state,
6303
+ APIAccess = _state.APIAccess,
6304
+ defaultConnection = _state.defaultConnection;
6305
+
6306
+ this.props.postCredentials(this.state.actualCreds, APIAccess, defaultConnection);
6285
6307
  }
6286
6308
  }, {
6287
6309
  key: "render",
@@ -6297,7 +6319,6 @@ module.exports =
6297
6319
  checkOauthCreds = _props2.checkOauthCreds,
6298
6320
  getDocuSignOauthUrl = _props2.getDocuSignOauthUrl,
6299
6321
  fileSchema = _props2.fileSchema,
6300
- postCredentials = _props2.postCredentials,
6301
6322
  getOauthUrl = _props2.getOauthUrl,
6302
6323
  generateNewAdapterSecret = _props2.generateNewAdapterSecret,
6303
6324
  setCsvFields = _props2.setCsvFields,
@@ -6312,7 +6333,6 @@ module.exports =
6312
6333
  deleteFlatFile = _props2.deleteFlatFile,
6313
6334
  gencerts = _props2.gencerts,
6314
6335
  downloadcerts = _props2.downloadcerts,
6315
- onAPIAccessChange = _props2.onAPIAccessChange,
6316
6336
  getOauthCreds = _props2.getOauthCreds;
6317
6337
 
6318
6338
  var Button = inputs.Button;
@@ -6636,8 +6656,11 @@ module.exports =
6636
6656
  ),
6637
6657
  _react2.default.createElement("br", null),
6638
6658
  config.type != "LocalFile" && _react2.default.createElement(APIAcessHandle, {
6639
- APIAccess: wizard.APIAccess,
6640
- onChangeHandle: onAPIAccessChange
6659
+ APIAccess: this.state.APIAccess,
6660
+ onChangeHandle: this.onAPIAccessChange,
6661
+ defaultConnection: this.state.defaultConnection,
6662
+ onDefaultConnectionChange: this.onDefaultConnectionChange,
6663
+ disableMarkConnection: wizard.disableMarkConnection
6641
6664
  })
6642
6665
  );
6643
6666
  }
@@ -6709,12 +6732,30 @@ module.exports =
6709
6732
 
6710
6733
  var APIAcessHandle = function APIAcessHandle(_ref3) {
6711
6734
  var APIAccess = _ref3.APIAccess,
6712
- onChangeHandle = _ref3.onChangeHandle;
6735
+ onChangeHandle = _ref3.onChangeHandle,
6736
+ defaultConnection = _ref3.defaultConnection,
6737
+ onDefaultConnectionChange = _ref3.onDefaultConnectionChange,
6738
+ disableMarkConnection = _ref3.disableMarkConnection;
6713
6739
 
6714
6740
  return _react2.default.createElement(
6715
- _reactBootstrap.Checkbox,
6716
- { checked: APIAccess, onChange: onChangeHandle },
6717
- "Make these credentials available via API"
6741
+ "div",
6742
+ null,
6743
+ _react2.default.createElement(
6744
+ _reactBootstrap.Checkbox,
6745
+ {
6746
+ checked: defaultConnection,
6747
+ onChange: onDefaultConnectionChange,
6748
+ disabled: disableMarkConnection
6749
+ },
6750
+ "Make this my default connection",
6751
+ " "
6752
+ ),
6753
+ _react2.default.createElement(
6754
+ _reactBootstrap.Checkbox,
6755
+ { checked: APIAccess, onChange: onChangeHandle },
6756
+ "Make this available via API",
6757
+ " "
6758
+ )
6718
6759
  );
6719
6760
  };
6720
6761