@lingk/sync 1.0.12 → 1.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.
package/build/main.js CHANGED
@@ -281,8 +281,9 @@ module.exports =
281
281
  if (wizard.savedBundles && wizard.savedBundles.bundles && sourceMetadata && destinationMetadata) {
282
282
 
283
283
  var resourceGroups = (0, _loadData2.default)(wizard.savedBundles, wizard.savedMapping, step.sourceProvider, step.destinationProvider, sourceMetadata, destinationMetadata, isReverse);
284
-
285
- change('resourceGroups', formValues['resourceGroups'] || resourceGroups);
284
+ if (resourceGroups) {
285
+ change('resourceGroups', resourceGroups);
286
+ }
286
287
  } // end if wizard.savedBundles and metadatas
287
288
  } // end if (!formValues['resourceGroups'])
288
289
 
@@ -2173,7 +2174,7 @@ module.exports =
2173
2174
 
2174
2175
  _this.setState({ uploading: true });
2175
2176
  setCsvFields(_this.state.meta, _this.state.fileContents, providerType).then(function () {
2176
- _this.setState({ meta: [], uploading: false });
2177
+ _this.setState({ meta: [], fileContents: [], uploading: false });
2177
2178
  });
2178
2179
  };
2179
2180
 
@@ -17121,6 +17122,7 @@ module.exports =
17121
17122
  }
17122
17123
 
17123
17124
  function uploadFilesToS3(tenantKey, appKey, metadata, d, contents) {
17125
+ console.log("UPLOAD", metadata, contents);
17124
17126
  var args = contents.map(function (fileContent, i) {
17125
17127
  return { tenantKey: tenantKey, appKey: appKey, fileContent: fileContent, d: d, fileName: metadata[i].name };
17126
17128
  });
@@ -22590,6 +22592,8 @@ module.exports =
22590
22592
 
22591
22593
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
22592
22594
 
22595
+ function _toConsumableArray(arr) { if (Array.isArray(arr)) { for (var i = 0, arr2 = Array(arr.length); i < arr.length; i++) { arr2[i] = arr[i]; } return arr2; } else { return Array.from(arr); } }
22596
+
22593
22597
  function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
22594
22598
 
22595
22599
  function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; }
@@ -22600,9 +22604,27 @@ module.exports =
22600
22604
  _inherits(FileProcessing, _Component);
22601
22605
 
22602
22606
  function FileProcessing() {
22607
+ var _ref;
22608
+
22609
+ var _temp, _this, _ret;
22610
+
22603
22611
  _classCallCheck(this, FileProcessing);
22604
22612
 
22605
- return _possibleConstructorReturn(this, (FileProcessing.__proto__ || Object.getPrototypeOf(FileProcessing)).apply(this, arguments));
22613
+ for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) {
22614
+ args[_key] = arguments[_key];
22615
+ }
22616
+
22617
+ return _ret = (_temp = (_this = _possibleConstructorReturn(this, (_ref = FileProcessing.__proto__ || Object.getPrototypeOf(FileProcessing)).call.apply(_ref, [this].concat(args))), _this), _this.removeFile = function (index) {
22618
+ var _this$props = _this.props,
22619
+ change = _this$props.change,
22620
+ step = _this$props.step,
22621
+ formValues = _this$props.formValues;
22622
+
22623
+ var fs = formValues[step.mode + 'FileSchema'];
22624
+ var fileSchema = [].concat(_toConsumableArray(fs));
22625
+ fileSchema.splice(index, 1);
22626
+ change(step.mode + 'FileSchema', fileSchema);
22627
+ }, _temp), _possibleConstructorReturn(_this, _ret);
22606
22628
  }
22607
22629
 
22608
22630
  _createClass(FileProcessing, [{
@@ -22660,7 +22682,9 @@ module.exports =
22660
22682
  { className: 'labelz', style: { fontSize: '14px', marginBottom: 5 } },
22661
22683
  'Available Files:'
22662
22684
  ),
22663
- _react2.default.createElement(FileTable, { files: fileSchema, inputs: inputs, mode: step.mode }),
22685
+ _react2.default.createElement(FileTable, { files: fileSchema, inputs: inputs, mode: step.mode,
22686
+ removeFile: this.removeFile
22687
+ }),
22664
22688
  _react2.default.createElement('br', null),
22665
22689
  _react2.default.createElement(_navButtons2.default, { handleSubmit: handleSubmit, nav: nav, reset: reset, inputs: inputs,
22666
22690
  nextDisabled: !filledOut,
@@ -23700,6 +23724,8 @@ module.exports =
23700
23724
  _createClass(DefaultDatasetStep, [{
23701
23725
  key: 'componentDidMount',
23702
23726
  value: function componentDidMount() {
23727
+ var _this2 = this;
23728
+
23703
23729
  var _props = this.props,
23704
23730
  step = _props.step,
23705
23731
  wizard = _props.wizard,
@@ -23710,9 +23736,9 @@ module.exports =
23710
23736
  if (!wizard.dataLoaded) {
23711
23737
  (function () {
23712
23738
  (0, _initialize2.default)(step, wizard, change, formValues, actions);
23713
- var scenario = formValues['scenario'];
23739
+ var scenario = _this2.props.formValues['scenario'];
23714
23740
  if (scenario && !(step.options && step.options.find(function (o) {
23715
- return o.id === scenario;
23741
+ return o.id === parseInt(scenario, 10);
23716
23742
  }))) {
23717
23743
  change('scenario', '0');
23718
23744
  }
@@ -23745,7 +23771,7 @@ module.exports =
23745
23771
  }, {
23746
23772
  key: 'render',
23747
23773
  value: function render() {
23748
- var _this2 = this;
23774
+ var _this3 = this;
23749
23775
 
23750
23776
  var _props3 = this.props,
23751
23777
  inputs = _props3.inputs,
@@ -23802,9 +23828,9 @@ module.exports =
23802
23828
  'div',
23803
23829
  { key: i },
23804
23830
  _react2.default.createElement(Radio, { onChange: function onChange() {
23805
- return _this2.select(o);
23831
+ return _this3.select(o);
23806
23832
  },
23807
- label: '' + o.title + (_this2.state.currentlyLoadingScenario === String(o.id) ? _this2.state.loadingDots : ''),
23833
+ label: '' + o.title + (_this3.state.currentlyLoadingScenario === String(o.id) ? _this3.state.loadingDots : ''),
23808
23834
  checked: String(o.id) === scenario, style: { cursor: 'pointer' }
23809
23835
  }),
23810
23836
  _react2.default.createElement('br', null),
@@ -23948,15 +23974,15 @@ module.exports =
23948
23974
  var isReverse = formValues.direction === 'reverse';
23949
23975
  if (!wizard.dataLoaded) {
23950
23976
  (0, _initialize2.default)(step, wizard, change, formValues, actions, isReverse);
23951
- }
23952
- if (formValues['resourceGroups']) {
23953
- var resourceGroups = [].concat(_toConsumableArray(formValues['resourceGroups']));
23954
- resourceGroups && resourceGroups.forEach(function (rg, i) {
23955
- _this2.assignAllParents(i);
23956
- _this2.forceUpdate();
23957
- });
23958
- } else {
23959
- change('resourceGroups', []);
23977
+ setTimeout(function () {
23978
+ if (_this2.props.formValues['resourceGroups']) {
23979
+ var resourceGroups = [].concat(_toConsumableArray(_this2.props.formValues['resourceGroups']));
23980
+ resourceGroups && resourceGroups.forEach(function (rg, i) {
23981
+ _this2.assignAllParents(i);
23982
+ _this2.forceUpdate();
23983
+ });
23984
+ }
23985
+ }, 10);
23960
23986
  }
23961
23987
  }
23962
23988
  }, {