@lingk/sync 1.0.13 → 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
 
@@ -22591,6 +22592,8 @@ module.exports =
22591
22592
 
22592
22593
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
22593
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
+
22594
22597
  function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
22595
22598
 
22596
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; }
@@ -22601,9 +22604,27 @@ module.exports =
22601
22604
  _inherits(FileProcessing, _Component);
22602
22605
 
22603
22606
  function FileProcessing() {
22607
+ var _ref;
22608
+
22609
+ var _temp, _this, _ret;
22610
+
22604
22611
  _classCallCheck(this, FileProcessing);
22605
22612
 
22606
- 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);
22607
22628
  }
22608
22629
 
22609
22630
  _createClass(FileProcessing, [{
@@ -22661,7 +22682,9 @@ module.exports =
22661
22682
  { className: 'labelz', style: { fontSize: '14px', marginBottom: 5 } },
22662
22683
  'Available Files:'
22663
22684
  ),
22664
- _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
+ }),
22665
22688
  _react2.default.createElement('br', null),
22666
22689
  _react2.default.createElement(_navButtons2.default, { handleSubmit: handleSubmit, nav: nav, reset: reset, inputs: inputs,
22667
22690
  nextDisabled: !filledOut,
@@ -23701,6 +23724,8 @@ module.exports =
23701
23724
  _createClass(DefaultDatasetStep, [{
23702
23725
  key: 'componentDidMount',
23703
23726
  value: function componentDidMount() {
23727
+ var _this2 = this;
23728
+
23704
23729
  var _props = this.props,
23705
23730
  step = _props.step,
23706
23731
  wizard = _props.wizard,
@@ -23711,9 +23736,9 @@ module.exports =
23711
23736
  if (!wizard.dataLoaded) {
23712
23737
  (function () {
23713
23738
  (0, _initialize2.default)(step, wizard, change, formValues, actions);
23714
- var scenario = formValues['scenario'];
23739
+ var scenario = _this2.props.formValues['scenario'];
23715
23740
  if (scenario && !(step.options && step.options.find(function (o) {
23716
- return o.id === scenario;
23741
+ return o.id === parseInt(scenario, 10);
23717
23742
  }))) {
23718
23743
  change('scenario', '0');
23719
23744
  }
@@ -23746,7 +23771,7 @@ module.exports =
23746
23771
  }, {
23747
23772
  key: 'render',
23748
23773
  value: function render() {
23749
- var _this2 = this;
23774
+ var _this3 = this;
23750
23775
 
23751
23776
  var _props3 = this.props,
23752
23777
  inputs = _props3.inputs,
@@ -23803,9 +23828,9 @@ module.exports =
23803
23828
  'div',
23804
23829
  { key: i },
23805
23830
  _react2.default.createElement(Radio, { onChange: function onChange() {
23806
- return _this2.select(o);
23831
+ return _this3.select(o);
23807
23832
  },
23808
- 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 : ''),
23809
23834
  checked: String(o.id) === scenario, style: { cursor: 'pointer' }
23810
23835
  }),
23811
23836
  _react2.default.createElement('br', null),
@@ -23949,15 +23974,15 @@ module.exports =
23949
23974
  var isReverse = formValues.direction === 'reverse';
23950
23975
  if (!wizard.dataLoaded) {
23951
23976
  (0, _initialize2.default)(step, wizard, change, formValues, actions, isReverse);
23952
- }
23953
- if (formValues['resourceGroups']) {
23954
- var resourceGroups = [].concat(_toConsumableArray(formValues['resourceGroups']));
23955
- resourceGroups && resourceGroups.forEach(function (rg, i) {
23956
- _this2.assignAllParents(i);
23957
- _this2.forceUpdate();
23958
- });
23959
- } else {
23960
- 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);
23961
23986
  }
23962
23987
  }
23963
23988
  }, {