@lingk/sync 1.1.52 → 1.1.54

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.
@@ -5131,11 +5131,14 @@ module.exports =
5131
5131
  onChange = _props.onChange,
5132
5132
  credsDisabledCheck = _props.credsDisabledCheck,
5133
5133
  inputs = _props.inputs,
5134
- onCheck = _props.onCheck;
5134
+ onCheck = _props.onCheck,
5135
+ checking = _props.checking,
5136
+ envCheckResult = _props.envCheckResult;
5135
5137
 
5136
5138
  var Input = inputs.Input;
5137
5139
  var Button = inputs.Button;
5138
5140
  var Select = inputs.Select;
5141
+ var Spinner = inputs.Spinner;
5139
5142
  var CodeMirror = codemirror && codemirror.Controlled;
5140
5143
 
5141
5144
  var CloudSQLTypes = [{ name: 'Postgres', satisfiesSearch: true, type: 'Postgres', title: 'Postgres' }, { name: 'MySQL', satisfiesSearch: true, type: 'MySQL', title: 'MySQL' }];
@@ -5214,6 +5217,16 @@ module.exports =
5214
5217
  ),
5215
5218
  '\xA0\xA0',
5216
5219
  _react2.default.createElement(Loop, null)
5220
+ ),
5221
+ index === 0 && checking && _react2.default.createElement(
5222
+ 'span',
5223
+ { style: { marginLeft: 10 } },
5224
+ _react2.default.createElement(Spinner, null)
5225
+ ),
5226
+ index === 0 && envCheckResult && _react2.default.createElement(
5227
+ 'span',
5228
+ { style: { marginLeft: 10 } },
5229
+ envCheckResult
5217
5230
  )
5218
5231
  );
5219
5232
  })
@@ -5376,6 +5389,11 @@ module.exports =
5376
5389
  this.setState({ actualCreds: newProps.creds });
5377
5390
  }
5378
5391
  }
5392
+ }, {
5393
+ key: 'saveCreds',
5394
+ value: function saveCreds() {
5395
+ this.props.postCredentials(this.state.actualCreds);
5396
+ }
5379
5397
  }, {
5380
5398
  key: 'render',
5381
5399
  value: function render() {
@@ -5389,6 +5407,7 @@ module.exports =
5389
5407
  adapterSecret = _props2.adapterSecret,
5390
5408
  checkOauthCreds = _props2.checkOauthCreds,
5391
5409
  fileSchema = _props2.fileSchema,
5410
+ postCredentials = _props2.postCredentials,
5392
5411
  getOauthUrl = _props2.getOauthUrl,
5393
5412
  generateNewAdapterSecret = _props2.generateNewAdapterSecret,
5394
5413
  setCsvFields = _props2.setCsvFields,
@@ -5411,7 +5430,6 @@ module.exports =
5411
5430
  var providerType = config && config.type;
5412
5431
  var creds = this.state.actualCreds;
5413
5432
  var hasEndpoint = creds && creds.rootUrl && creds.rootUrl.length > 8;
5414
-
5415
5433
  var isOauth = config.credentials && config.credentials.length === 1 && config.credentials[0] === 'Oauth';
5416
5434
 
5417
5435
  var isFlatFile = config.type === 'LocalFile';
@@ -5426,9 +5444,6 @@ module.exports =
5426
5444
 
5427
5445
  var isSFTP = config.type === 'SFTP';
5428
5446
  var noRootUrl = isSFTP || isAWS;
5429
-
5430
- // all credential fields are filled
5431
-
5432
5447
  var credsDisabledCheck = config && config.credentials && config.credentials.some(function (c) {
5433
5448
  var formCreds = creds;
5434
5449
  return !Object.keys(formCreds).includes(c.split(' ').join(''));
@@ -5460,10 +5475,10 @@ module.exports =
5460
5475
  deleteFlatFile: deleteFlatFile
5461
5476
  }) : isGoogle ? _react2.default.createElement(_google2.default, { config: config, creds: creds, onChange: this.onChange,
5462
5477
  credsDisabledCheck: credsDisabledCheck, inputs: inputs,
5463
- onCheck: check
5478
+ onCheck: check, envCheckResult: envCheckResult, checking: checking
5464
5479
  }) : isSFTP ? _react2.default.createElement(_sftp2.default, { config: config, creds: creds, onChange: this.onChange,
5465
5480
  credsDisabledCheck: credsDisabledCheck, inputs: inputs,
5466
- onCheck: check
5481
+ onCheck: check, envCheckResult: envCheckResult, checking: checking
5467
5482
  }) : isWebSocket ? _react2.default.createElement(_websocket2.default, { wizard: wizard, creds: creds, onChange: this.onChange, checking: checking, gencerts: gencerts,
5468
5483
  credsDisabledCheck: credsDisabledCheck, inputs: inputs, credKeyPress: this.credKeyPress,
5469
5484
  onCheck: check, actualCreds: this.state.actualCreds, envCheckResult: envCheckResult,
@@ -5572,6 +5587,16 @@ module.exports =
5572
5587
  '\xA0\xA0',
5573
5588
  _react2.default.createElement(Loop, null)
5574
5589
  ),
5590
+ index === 0 && noRootUrl && checking && _react2.default.createElement(
5591
+ 'span',
5592
+ { style: { marginLeft: 10 } },
5593
+ _react2.default.createElement(Spinner, null)
5594
+ ),
5595
+ index === 0 && noRootUrl && envCheckResult && _react2.default.createElement(
5596
+ 'span',
5597
+ { style: { marginLeft: 10 } },
5598
+ envCheckResult
5599
+ ),
5575
5600
  credType === 'password' && _react2.default.createElement(Key, { showPass: _this2.state.showPass,
5576
5601
  onClick: function onClick() {
5577
5602
  return _this2.setState({ showPass: !_this2.state.showPass });
@@ -6009,7 +6034,9 @@ module.exports =
6009
6034
  onCheck = _props2.onCheck,
6010
6035
  inputs = _props2.inputs,
6011
6036
  creds = _props2.creds,
6012
- onChange = _props2.onChange;
6037
+ onChange = _props2.onChange,
6038
+ checking = _props2.checking,
6039
+ envCheckResult = _props2.envCheckResult;
6013
6040
  var credentialType = this.state.credentialType;
6014
6041
 
6015
6042
 
@@ -6018,6 +6045,7 @@ module.exports =
6018
6045
  var Button = inputs.Button;
6019
6046
  var Input = inputs.Input;
6020
6047
  var Toggle = inputs.ToggleButtonGroup;
6048
+ var Spinner = inputs.Spinner;
6021
6049
 
6022
6050
  var credentials = config && config.credentials.filter(function (o) {
6023
6051
  if (o === 'privateKey') {
@@ -6049,7 +6077,17 @@ module.exports =
6049
6077
  null,
6050
6078
  credentials && _react2.default.createElement(
6051
6079
  'div',
6052
- { style: { marginLeft: 0 } },
6080
+ { style: { display: 'inline-block' } },
6081
+ _react2.default.createElement(
6082
+ 'div',
6083
+ { style: { marginLeft: 15, marginTop: 40, float: 'right' } },
6084
+ checking && _react2.default.createElement(Spinner, null),
6085
+ envCheckResult && _react2.default.createElement(
6086
+ 'span',
6087
+ null,
6088
+ envCheckResult
6089
+ )
6090
+ ),
6053
6091
  _react2.default.createElement(
6054
6092
  'div',
6055
6093
  { style: { display: 'inline-block', marginLeft: 16 } },
@@ -6065,9 +6103,6 @@ module.exports =
6065
6103
  })
6066
6104
  ),
6067
6105
  credentials.map(function (credType, index) {
6068
-
6069
- console.log(creds[credType]);
6070
-
6071
6106
  return _react2.default.createElement(
6072
6107
  'div',
6073
6108
  { key: index, style: { marginTop: 8 } },