@lingk/sync 1.1.16 → 1.1.18

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.
@@ -3845,12 +3845,19 @@ module.exports =
3845
3845
  _this.props.downloadFileFromAws(file);
3846
3846
  };
3847
3847
 
3848
+ _this.deleteFlatFile = function (fileName) {
3849
+ _this.setState({ isDeletingFile: fileName });
3850
+ _this.props.deleteFlatFile(fileName);
3851
+ };
3852
+
3848
3853
  _this.state = {
3849
3854
  meta: [],
3850
3855
  fileContents: [],
3851
3856
  uploading: false,
3852
3857
  dropError: null,
3853
- sortFileTableBy: 'uploadedTime' };
3858
+ sortFileTableBy: 'uploadedTime', // name, byteSize, uploadedTime
3859
+ isDeletingFile: null
3860
+ };
3854
3861
  return _this;
3855
3862
  }
3856
3863
 
@@ -3863,7 +3870,8 @@ module.exports =
3863
3870
  meta = _state.meta,
3864
3871
  uploading = _state.uploading,
3865
3872
  dropError = _state.dropError,
3866
- sortFileTableBy = _state.sortFileTableBy;
3873
+ sortFileTableBy = _state.sortFileTableBy,
3874
+ isDeletingFile = _state.isDeletingFile;
3867
3875
  var inputs = this.props.inputs;
3868
3876
 
3869
3877
  var Button = inputs.Button;
@@ -4050,6 +4058,19 @@ module.exports =
4050
4058
  'td',
4051
4059
  null,
4052
4060
  (0, _moment2.default)(file.uploadedTime).format('MMM Do, h:mm a')
4061
+ ),
4062
+ _react2.default.createElement(
4063
+ 'td',
4064
+ null,
4065
+ !(isDeletingFile === file.name) && _react2.default.createElement(
4066
+ 'svg',
4067
+ { style: { width: 18, height: 18 },
4068
+ onClick: function onClick() {
4069
+ return _this2.deleteFlatFile(file.name);
4070
+ },
4071
+ className: 'delete-flat-file', viewBox: '0 0 60 60' },
4072
+ _react2.default.createElement('path', { d: 'M 15.674663,15.572746 L 44.587629,44.485711 M 45.118838,15.420972 L 15.522889,45.016920' })
4073
+ )
4053
4074
  )
4054
4075
  );
4055
4076
  })
@@ -4378,7 +4399,8 @@ module.exports =
4378
4399
  clearCsvFields = _props.clearCsvFields,
4379
4400
  formValues = _props.formValues,
4380
4401
  change = _props.change,
4381
- downloadFileFromAws = _props.downloadFileFromAws;
4402
+ downloadFileFromAws = _props.downloadFileFromAws,
4403
+ deleteFlatFile = _props.deleteFlatFile;
4382
4404
 
4383
4405
 
4384
4406
  var Button = inputs.Button;
@@ -4430,7 +4452,8 @@ module.exports =
4430
4452
  checking: checking, setCsvFields: setCsvFields,
4431
4453
  providerType: providerType, inputs: inputs,
4432
4454
  accountKey: accountKey, tenantKey: tenantKey,
4433
- onDrop: clearCsvFields, downloadFileFromAws: downloadFileFromAws
4455
+ onDrop: clearCsvFields, downloadFileFromAws: downloadFileFromAws,
4456
+ deleteFlatFile: deleteFlatFile
4434
4457
  }) : isGoogle ? _react2.default.createElement(_google2.default, { config: config, creds: creds, onChange: this.onChange,
4435
4458
  credsDisabledCheck: credsDisabledCheck, inputs: inputs,
4436
4459
  onCheck: check