@lingk/sync 1.0.14 → 1.0.15

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
@@ -274,17 +274,17 @@ module.exports =
274
274
  }
275
275
  }
276
276
 
277
- if (!formValues['resourceGroups']) {
277
+ if (!formValues['resourceGroups'] || formValues['resourceGroups'] && formValues['resourceGroups'].length < 1) {
278
+ // rgs default to []
278
279
  var sourceMetadata = wizard.sourceMetadata,
279
280
  destinationMetadata = wizard.destinationMetadata;
280
281
 
281
282
  if (wizard.savedBundles && wizard.savedBundles.bundles && sourceMetadata && destinationMetadata) {
282
-
283
283
  var resourceGroups = (0, _loadData2.default)(wizard.savedBundles, wizard.savedMapping, step.sourceProvider, step.destinationProvider, sourceMetadata, destinationMetadata, isReverse);
284
284
  if (resourceGroups) {
285
285
  change('resourceGroups', resourceGroups);
286
286
  }
287
- } // end if wizard.savedBundles and metadatas
287
+ }
288
288
  } // end if (!formValues['resourceGroups'])
289
289
 
290
290
 
@@ -16981,6 +16981,7 @@ module.exports =
16981
16981
  });
16982
16982
  exports.callGetMetadata = callGetMetadata;
16983
16983
  exports.setCsvFields = setCsvFields;
16984
+ exports.removeFileResourceFromMetadata = removeFileResourceFromMetadata;
16984
16985
  exports.clearCsvFields = clearCsvFields;
16985
16986
  exports.uploadFilesToS3 = uploadFilesToS3;
16986
16987
  exports.singleFileToS3 = singleFileToS3;
@@ -17044,6 +17045,8 @@ module.exports =
17044
17045
 
17045
17046
  function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
17046
17047
 
17048
+ 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); } }
17049
+
17047
17050
  // isReload means that the "Check Connection" button was NOT clicked
17048
17051
  function callGetMetadata(tenantId, appId, mode, providerType, urlSuffix, apiUrl, endpoint, credsConfig, isFramework, creds, environment, isReload, fileSchemaGuid) {
17049
17052
  var metadata = null;
@@ -17114,6 +17117,26 @@ module.exports =
17114
17117
  };
17115
17118
  }
17116
17119
 
17120
+ function removeFileResourceFromMetadata(mode, r, providerType) {
17121
+ return function (dispatch, getState, api) {
17122
+ var _getState2 = getState(),
17123
+ wizard = _getState2.wizard;
17124
+
17125
+ var metadata = [].concat(_toConsumableArray(wizard[mode + 'Metadata']));
17126
+ var i = metadata.findIndex(function (rsc) {
17127
+ return r.name === rsc.name && r.type === rsc.type;
17128
+ });
17129
+ if (i > -1) {
17130
+ metadata.splice(i, 1);
17131
+ console.log('send now', { resources: metadata });
17132
+ dispatch({
17133
+ type: types.FINISH_WIZARD_ENV_CHECK,
17134
+ data: { metadata: { resources: metadata }, mode: mode, code: '200 OK', providerType: providerType }
17135
+ });
17136
+ }
17137
+ };
17138
+ }
17139
+
17117
17140
  function clearCsvFields(mode) {
17118
17141
  return {
17119
17142
  type: types.FINISH_WIZARD_ENV_CHECK,
@@ -17188,8 +17211,8 @@ module.exports =
17188
17211
  var isOauth = credsConfig && credsConfig[0] === 'Oauth';
17189
17212
  var isAdapter = urlSuffix === 'testconnection' || urlSuffix === 'adaptermetadata';
17190
17213
 
17191
- var _getState2 = getState(),
17192
- config = _getState2.config;
17214
+ var _getState3 = getState(),
17215
+ config = _getState3.config;
17193
17216
  // if demo creds are entered, skip this
17194
17217
  // ADD: OR IF adaptermetadata SKIP THIS
17195
17218
 
@@ -17214,8 +17237,8 @@ module.exports =
17214
17237
  };
17215
17238
  }
17216
17239
  return function (dispatch, getState, api) {
17217
- var _getState3 = getState(),
17218
- config = _getState3.config;
17240
+ var _getState4 = getState(),
17241
+ config = _getState4.config;
17219
17242
  // 'testconnection' GET route is for adapter. Should be called 'adaptermetadata'
17220
17243
 
17221
17244
 
@@ -17252,8 +17275,8 @@ module.exports =
17252
17275
  mode: mode
17253
17276
  });
17254
17277
 
17255
- var _getState4 = getState(),
17256
- config = _getState4.config;
17278
+ var _getState5 = getState(),
17279
+ config = _getState5.config;
17257
17280
 
17258
17281
  return api.get(tenantId + '/' + appId + '/environments/' + envName + '/oauthurl/9090b61412a74d97ad9ed02c5fx7e705/' + orgType, {
17259
17282
  endpoint: config.SF_AGENT_API_URL
@@ -17270,9 +17293,9 @@ module.exports =
17270
17293
 
17271
17294
  function generateNewAdapterSecret(tenantId, accountId, envName, mode) {
17272
17295
  return function (dispatch, getState, api) {
17273
- var _getState5 = getState(),
17274
- config = _getState5.config,
17275
- wizard = _getState5.wizard;
17296
+ var _getState6 = getState(),
17297
+ config = _getState6.config,
17298
+ wizard = _getState6.wizard;
17276
17299
 
17277
17300
  var TRANS_API_URL = config.TRANS_API_URL;
17278
17301
 
@@ -17289,8 +17312,8 @@ module.exports =
17289
17312
 
17290
17313
  function createLingkExternalIds(tenantId, appId, bundles, mappings, metadata, envName) {
17291
17314
  return function (dispatch, getState, api) {
17292
- var _getState6 = getState(),
17293
- config = _getState6.config;
17315
+ var _getState7 = getState(),
17316
+ config = _getState7.config;
17294
17317
 
17295
17318
  var externalIdlessObjects = [];
17296
17319
  // only run for Salesforce
@@ -17328,8 +17351,8 @@ module.exports =
17328
17351
 
17329
17352
  function callAddCustomField(tenantId, appId, objectType, fieldName, completedCallback, envName) {
17330
17353
  return function (dispatch, getState, api) {
17331
- var _getState7 = getState(),
17332
- config = _getState7.config;
17354
+ var _getState8 = getState(),
17355
+ config = _getState8.config;
17333
17356
 
17334
17357
  return api.post(tenantId + '/' + appId + '/environments/' + envName + '/salesforceschema/field', {
17335
17358
  endpoint: config.SF_AGENT_API_URL,
@@ -17381,8 +17404,8 @@ module.exports =
17381
17404
 
17382
17405
  function callGetScenarioList(tenantId, appId, typeGuid) {
17383
17406
  return function (dispatch, getState, api) {
17384
- var _getState8 = getState(),
17385
- config = _getState8.config;
17407
+ var _getState9 = getState(),
17408
+ config = _getState9.config;
17386
17409
 
17387
17410
  return api.get(tenantId + '/' + appId + '/scenarios/' + typeGuid, {
17388
17411
  endpoint: config.TRANS_API_URL
@@ -17392,8 +17415,8 @@ module.exports =
17392
17415
 
17393
17416
  function callCreateScenario(tenantId, appId, data) {
17394
17417
  return function (dispatch, getState, api) {
17395
- var _getState9 = getState(),
17396
- config = _getState9.config;
17418
+ var _getState10 = getState(),
17419
+ config = _getState10.config;
17397
17420
 
17398
17421
  return api.post(tenantId + '/' + appId + '/scenario', {
17399
17422
  endpoint: config.TRANS_API_URL,
@@ -17404,8 +17427,8 @@ module.exports =
17404
17427
 
17405
17428
  function callUpdateScenarioList(tenantId, appId, typeGuid, scenarioIds) {
17406
17429
  return function (dispatch, getState, api) {
17407
- var _getState10 = getState(),
17408
- config = _getState10.config;
17430
+ var _getState11 = getState(),
17431
+ config = _getState11.config;
17409
17432
 
17410
17433
  return api.post(tenantId + '/' + appId + '/scenarios/' + typeGuid, {
17411
17434
  endpoint: config.TRANS_API_URL,
@@ -17418,8 +17441,8 @@ module.exports =
17418
17441
 
17419
17442
  function callPostBundles(tenantId, appId, bundles, onGenerationError) {
17420
17443
  return function (dispatch, getState, api) {
17421
- var _getState11 = getState(),
17422
- config = _getState11.config;
17444
+ var _getState12 = getState(),
17445
+ config = _getState12.config;
17423
17446
 
17424
17447
  var data = { bundles: bundles };
17425
17448
  return api.post(tenantId + '/' + appId + '/bundle', {
@@ -17434,8 +17457,8 @@ module.exports =
17434
17457
 
17435
17458
  function callPostMapping(tenantId, appId, mappings, onGenerationError) {
17436
17459
  return function (dispatch, getState, api) {
17437
- var _getState12 = getState(),
17438
- config = _getState12.config;
17460
+ var _getState13 = getState(),
17461
+ config = _getState13.config;
17439
17462
 
17440
17463
  var data = { mappings: mappings };
17441
17464
  return api.post(tenantId + '/' + appId + '/schemamappings', {
@@ -17450,8 +17473,8 @@ module.exports =
17450
17473
 
17451
17474
  function callPostProductizedIntegration(tenantId, appId, schemaMappingGuid, bundlePackGuid, configuration, title, typeGuid, piGuid, onGenerationError) {
17452
17475
  return function (dispatch, getState, api) {
17453
- var _getState13 = getState(),
17454
- config = _getState13.config;
17476
+ var _getState14 = getState(),
17477
+ config = _getState14.config;
17455
17478
 
17456
17479
  var data = Object.assign({
17457
17480
  schemaMappingGuid: schemaMappingGuid,
@@ -17472,8 +17495,8 @@ module.exports =
17472
17495
 
17473
17496
  function callUpdateProductizedIntegration(tenantId, appId, schemaMappingGuid, bundlePackGuid, configuration, title, typeGuid, piGuid, onGenerationError) {
17474
17497
  return function (dispatch, getState, api) {
17475
- var _getState14 = getState(),
17476
- config = _getState14.config;
17498
+ var _getState15 = getState(),
17499
+ config = _getState15.config;
17477
17500
 
17478
17501
  var data = {
17479
17502
  schemaMappingGuid: schemaMappingGuid,
@@ -17494,8 +17517,8 @@ module.exports =
17494
17517
 
17495
17518
  function callGenerateRecipe(tenantId, appId, typeId, typeGuid, title, piGuid, mappingGuid, sourceMetadata, destinationMetadata, isManagedPackage, onGenerationError, envName, envId) {
17496
17519
  return function (dispatch, getState, api) {
17497
- var _getState15 = getState(),
17498
- config = _getState15.config;
17520
+ var _getState16 = getState(),
17521
+ config = _getState16.config;
17499
17522
 
17500
17523
  return api.post(tenantId + '/' + appId + '/productizedintegrations/' + piGuid + '/generate', {
17501
17524
  endpoint: config.TRANS_API_URL,
@@ -17514,8 +17537,8 @@ module.exports =
17514
17537
 
17515
17538
  function trySaveFileSchema(tenantId, appId, schema) {
17516
17539
  return function (dispatch, getState, api) {
17517
- var _getState16 = getState(),
17518
- config = _getState16.config;
17540
+ var _getState17 = getState(),
17541
+ config = _getState17.config;
17519
17542
 
17520
17543
  if (schema && schema.resources) {
17521
17544
  return api.post(tenantId + '/' + appId + '/fileschema', {
@@ -17602,8 +17625,8 @@ module.exports =
17602
17625
 
17603
17626
  function callPostEventContext(data, transBaseId) {
17604
17627
  return function (dispatch, getState, api) {
17605
- var _getState17 = getState(),
17606
- config = _getState17.config;
17628
+ var _getState18 = getState(),
17629
+ config = _getState18.config;
17607
17630
 
17608
17631
  var TRANS_API_URL = config.TRANS_API_URL;
17609
17632
 
@@ -17616,8 +17639,8 @@ module.exports =
17616
17639
 
17617
17640
  function callExecuteTransformer(transId) {
17618
17641
  return function (dispatch, getState, api) {
17619
- var _getState18 = getState(),
17620
- config = _getState18.config;
17642
+ var _getState19 = getState(),
17643
+ config = _getState19.config;
17621
17644
 
17622
17645
  var query = '';
17623
17646
  var d = new Date();
@@ -17637,8 +17660,8 @@ module.exports =
17637
17660
 
17638
17661
  function callLookupLogData(tenantId, externalExecutionId, index, onFinish, generatedRecipe, pi) {
17639
17662
  return function (dispatch, getState, api) {
17640
- var _getState19 = getState(),
17641
- config = _getState19.config;
17663
+ var _getState20 = getState(),
17664
+ config = _getState20.config;
17642
17665
 
17643
17666
  return api.get(tenantId + '/logs/transformers/externalExecutionId/' + externalExecutionId, {
17644
17667
  endpoint: config.TRANS_API_URL
@@ -17682,8 +17705,8 @@ module.exports =
17682
17705
  };
17683
17706
  }
17684
17707
  return function (dispatch, getState, api) {
17685
- var _getState20 = getState(),
17686
- config = _getState20.config;
17708
+ var _getState21 = getState(),
17709
+ config = _getState21.config;
17687
17710
 
17688
17711
  return api.post(tenantId + '/createtrigger', {
17689
17712
  endpoint: config.TRANS_API_URL,
@@ -17721,8 +17744,8 @@ module.exports =
17721
17744
 
17722
17745
  if (piGuid && piGuid !== '_') {
17723
17746
  return function (dispatch, getState, api) {
17724
- var _getState21 = getState(),
17725
- config = _getState21.config;
17747
+ var _getState22 = getState(),
17748
+ config = _getState22.config;
17726
17749
 
17727
17750
  return api.get(tenantId + '/' + accountId + '/productizedintegrations/' + piGuid + '/versions', {
17728
17751
  endpoint: config.TRANS_API_URL
@@ -17794,8 +17817,8 @@ module.exports =
17794
17817
 
17795
17818
  function clearAdapterSecrets() {
17796
17819
  return function (dispatch, getState, api) {
17797
- var _getState22 = getState(),
17798
- wizard = _getState22.wizard;
17820
+ var _getState23 = getState(),
17821
+ wizard = _getState23.wizard;
17799
17822
 
17800
17823
  dispatch({
17801
17824
  type: types.SET_WIZARD_SAVED_CREDENTIALS,
@@ -17809,8 +17832,8 @@ module.exports =
17809
17832
 
17810
17833
  function setLoadedAdapterSecret(cred, mode) {
17811
17834
  return function (dispatch, getState, api) {
17812
- var _getState23 = getState(),
17813
- wizard = _getState23.wizard;
17835
+ var _getState24 = getState(),
17836
+ wizard = _getState24.wizard;
17814
17837
 
17815
17838
  dispatch({
17816
17839
  type: types.SET_WIZARD_SAVED_CREDENTIALS,
@@ -17821,8 +17844,8 @@ module.exports =
17821
17844
 
17822
17845
  function getCredentialForEnvironment(tenantId, appId, credentialType, envName, mode) {
17823
17846
  return function (dispatch, getState, api) {
17824
- var _getState24 = getState(),
17825
- config = _getState24.config;
17847
+ var _getState25 = getState(),
17848
+ config = _getState25.config;
17826
17849
 
17827
17850
  return api.get(tenantId + '/' + appId + '/credentials/' + credentialType + '/' + envName, {
17828
17851
  endpoint: config.TRANS_API_URL
@@ -17874,8 +17897,8 @@ module.exports =
17874
17897
  function callGetBundles(tenantId, accountId, bundlePackGuid) {
17875
17898
  if (bundlePackGuid) {
17876
17899
  return function (dispatch, getState, api) {
17877
- var _getState25 = getState(),
17878
- config = _getState25.config;
17900
+ var _getState26 = getState(),
17901
+ config = _getState26.config;
17879
17902
 
17880
17903
  return api.get(tenantId + '/' + accountId + '/bundle/' + bundlePackGuid, {
17881
17904
  endpoint: config.TRANS_API_URL
@@ -17892,8 +17915,8 @@ module.exports =
17892
17915
  function callGetMapping(tenantId, accountId, mappingGuid) {
17893
17916
  if (mappingGuid) {
17894
17917
  return function (dispatch, getState, api) {
17895
- var _getState26 = getState(),
17896
- config = _getState26.config;
17918
+ var _getState27 = getState(),
17919
+ config = _getState27.config;
17897
17920
 
17898
17921
  return api.get(tenantId + '/' + accountId + '/schemamappings/' + mappingGuid, {
17899
17922
  endpoint: config.TRANS_API_URL
@@ -17914,8 +17937,8 @@ module.exports =
17914
17937
  mode: mode
17915
17938
  });
17916
17939
 
17917
- var _getState27 = getState(),
17918
- config = _getState27.config;
17940
+ var _getState28 = getState(),
17941
+ config = _getState28.config;
17919
17942
 
17920
17943
  return api.post(tenantId + '/' + appId + '/environments/' + envId + '/credentials', {
17921
17944
  endpoint: config.TRANS_API_URL,
@@ -17929,8 +17952,8 @@ module.exports =
17929
17952
 
17930
17953
  function getEnvironments(tenantId, appId) {
17931
17954
  return function (dispatch, getState, api) {
17932
- var _getState28 = getState(),
17933
- config = _getState28.config;
17955
+ var _getState29 = getState(),
17956
+ config = _getState29.config;
17934
17957
 
17935
17958
  return api.get(tenantId + '/' + appId + '/environments', {
17936
17959
  endpoint: config.TRANS_API_URL
@@ -17950,8 +17973,8 @@ module.exports =
17950
17973
 
17951
17974
  function callGetTrigger(transBaseId, envId) {
17952
17975
  return function (dispatch, getState, api) {
17953
- var _getState29 = getState(),
17954
- config = _getState29.config;
17976
+ var _getState30 = getState(),
17977
+ config = _getState30.config;
17955
17978
 
17956
17979
  if (transBaseId) {
17957
17980
  return api.get('gettriggers/' + transBaseId, {
@@ -21182,8 +21205,8 @@ module.exports =
21182
21205
  }
21183
21206
 
21184
21207
  _createClass(DeployStep, [{
21185
- key: 'componentDidMount',
21186
- value: function componentDidMount() {
21208
+ key: 'componentWillMount',
21209
+ value: function componentWillMount() {
21187
21210
  //const { step, change, formValues } = this.props
21188
21211
  //change('deployment', formValues.deployment || {type: step.options[0]})
21189
21212
  var _props = this.props,
@@ -21396,6 +21419,8 @@ module.exports =
21396
21419
 
21397
21420
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
21398
21421
 
21422
+ 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); } }
21423
+
21399
21424
  function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
21400
21425
 
21401
21426
  function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
@@ -21483,8 +21508,8 @@ module.exports =
21483
21508
  x.focus();
21484
21509
  }
21485
21510
  }, {
21486
- key: 'componentDidMount',
21487
- value: function componentDidMount() {
21511
+ key: 'componentWillMount',
21512
+ value: function componentWillMount() {
21488
21513
  var _props2 = this.props,
21489
21514
  step = _props2.step,
21490
21515
  change = _props2.change,
@@ -21532,14 +21557,22 @@ module.exports =
21532
21557
  // set defaults of filename and delimiter
21533
21558
  var isFileSchema = metadata && metadata.providerType === 'SFTP';
21534
21559
  if (isFileSchema) {
21535
- change(mode + 'FileSchema', metadata.resources.filter(function (m) {
21536
- return !m.parentRef;
21537
- }).map(function (r) {
21538
- return Object.assign({}, r, {
21539
- filePattern: r.name,
21540
- delimiter: ','
21541
- });
21542
- }));
21560
+ (function () {
21561
+ var savedFileSchema = [];
21562
+ if (_this2.props.formValues[mode + 'FileSchema']) {
21563
+ savedFileSchema = [].concat(_toConsumableArray(formValues[mode + 'FileSchema']));
21564
+ }
21565
+ change(mode + 'FileSchema', metadata.resources.map(function (r) {
21566
+ var existing = savedFileSchema.find(function (rsc) {
21567
+ return r.name === rsc.name && r.type === rsc.type;
21568
+ });
21569
+ if (existing) return existing;
21570
+ return Object.assign({}, r, {
21571
+ filePattern: r.name,
21572
+ delimiter: ','
21573
+ });
21574
+ }));
21575
+ })();
21543
21576
  }
21544
21577
  //change(`${mode}Credentials`, credentials)
21545
21578
  });
@@ -22175,8 +22208,8 @@ module.exports =
22175
22208
  x.focus();
22176
22209
  }
22177
22210
  }, {
22178
- key: 'componentDidMount',
22179
- value: function componentDidMount() {
22211
+ key: 'componentWillMount',
22212
+ value: function componentWillMount() {
22180
22213
  var _props2 = this.props,
22181
22214
  step = _props2.step,
22182
22215
  change = _props2.change,
@@ -22614,22 +22647,25 @@ module.exports =
22614
22647
  args[_key] = arguments[_key];
22615
22648
  }
22616
22649
 
22617
- return _ret = (_temp = (_this = _possibleConstructorReturn(this, (_ref = FileProcessing.__proto__ || Object.getPrototypeOf(FileProcessing)).call.apply(_ref, [this].concat(args))), _this), _this.removeFile = function (index) {
22650
+ return _ret = (_temp = (_this = _possibleConstructorReturn(this, (_ref = FileProcessing.__proto__ || Object.getPrototypeOf(FileProcessing)).call.apply(_ref, [this].concat(args))), _this), _this.removeFile = function (file, index) {
22618
22651
  var _this$props = _this.props,
22619
22652
  change = _this$props.change,
22620
22653
  step = _this$props.step,
22621
- formValues = _this$props.formValues;
22654
+ formValues = _this$props.formValues,
22655
+ actions = _this$props.actions;
22622
22656
 
22657
+ var providerType = step[step.mode + 'Provider'];
22623
22658
  var fs = formValues[step.mode + 'FileSchema'];
22624
22659
  var fileSchema = [].concat(_toConsumableArray(fs));
22625
22660
  fileSchema.splice(index, 1);
22626
22661
  change(step.mode + 'FileSchema', fileSchema);
22662
+ actions.removeFileResourceFromMetadata(step.mode, file, providerType);
22627
22663
  }, _temp), _possibleConstructorReturn(_this, _ret);
22628
22664
  }
22629
22665
 
22630
22666
  _createClass(FileProcessing, [{
22631
- key: 'componentDidMount',
22632
- value: function componentDidMount() {
22667
+ key: 'componentWillMount',
22668
+ value: function componentWillMount() {
22633
22669
  var _props = this.props,
22634
22670
  step = _props.step,
22635
22671
  wizard = _props.wizard,
@@ -22654,11 +22690,17 @@ module.exports =
22654
22690
 
22655
22691
  var fileSchema = formValues[step.mode + 'FileSchema'];
22656
22692
  var filledOut = true;
22657
- fileSchema.forEach(function (f) {
22658
- if (!f.delimiter || !f.filePattern) {
22693
+ if (fileSchema) {
22694
+ fileSchema.forEach(function (f) {
22695
+ if (!f.delimiter || !f.filePattern) {
22696
+ filledOut = false;
22697
+ }
22698
+ });
22699
+ if (fileSchema.length < 1) {
22659
22700
  filledOut = false;
22660
22701
  }
22661
- });
22702
+ }
22703
+
22662
22704
  var FileTable = inputs.FileTable;
22663
22705
  return _react2.default.createElement(
22664
22706
  'form',
@@ -22680,9 +22722,10 @@ module.exports =
22680
22722
  _react2.default.createElement(
22681
22723
  'div',
22682
22724
  { className: 'labelz', style: { fontSize: '14px', marginBottom: 5 } },
22683
- 'Available Files:'
22725
+ fileSchema && fileSchema.length > 0 ? 'Available Files:' : 'No available files. Please upload files to your SFTP server and click Check Connection in the Environments step.'
22684
22726
  ),
22685
- _react2.default.createElement(FileTable, { files: fileSchema, inputs: inputs, mode: step.mode,
22727
+ fileSchema && fileSchema.length > 0 && _react2.default.createElement(FileTable, {
22728
+ files: fileSchema, inputs: inputs, mode: step.mode,
22686
22729
  removeFile: this.removeFile
22687
22730
  }),
22688
22731
  _react2.default.createElement('br', null),
@@ -23068,8 +23111,8 @@ module.exports =
23068
23111
  }
23069
23112
 
23070
23113
  _createClass(MapStep, [{
23071
- key: 'componentDidMount',
23072
- value: function componentDidMount() {
23114
+ key: 'componentWillMount',
23115
+ value: function componentWillMount() {
23073
23116
  var _props = this.props,
23074
23117
  step = _props.step,
23075
23118
  wizard = _props.wizard,
@@ -23323,8 +23366,8 @@ module.exports =
23323
23366
  }
23324
23367
 
23325
23368
  _createClass(NameStep, [{
23326
- key: 'componentDidMount',
23327
- value: function componentDidMount() {
23369
+ key: 'componentWillMount',
23370
+ value: function componentWillMount() {
23328
23371
  var _props = this.props,
23329
23372
  step = _props.step,
23330
23373
  wizard = _props.wizard,
@@ -23722,8 +23765,8 @@ module.exports =
23722
23765
  }
23723
23766
 
23724
23767
  _createClass(DefaultDatasetStep, [{
23725
- key: 'componentDidMount',
23726
- value: function componentDidMount() {
23768
+ key: 'componentWillMount',
23769
+ value: function componentWillMount() {
23727
23770
  var _this2 = this;
23728
23771
 
23729
23772
  var _props = this.props,
@@ -23758,7 +23801,7 @@ module.exports =
23758
23801
  actions = _props2.actions,
23759
23802
  change = _props2.change;
23760
23803
 
23761
- change('resourceGroups', null); //clear old data
23804
+ change('resourceGroups', []); //clear old data
23762
23805
  change('scenario', String(o.id));
23763
23806
  if (String(o.id) === '0') {
23764
23807
  actions.gotEmptyScenario();
@@ -23960,8 +24003,8 @@ module.exports =
23960
24003
  }
23961
24004
 
23962
24005
  _createClass(SchemaStep, [{
23963
- key: 'componentDidMount',
23964
- value: function componentDidMount() {
24006
+ key: 'componentWillMount',
24007
+ value: function componentWillMount() {
23965
24008
  var _this2 = this;
23966
24009
 
23967
24010
  var _props = this.props,
@@ -24295,9 +24338,11 @@ module.exports =
24295
24338
  wizard = _props14.wizard,
24296
24339
  change = _props14.change;
24297
24340
 
24298
- if (!formValues['resourceGroups']) return _react2.default.createElement('div', null);
24299
24341
 
24300
- var resourceGroups = [].concat(_toConsumableArray(formValues['resourceGroups'])) || null;
24342
+ var resourceGroups = [];
24343
+ if (formValues['resourceGroups']) {
24344
+ resourceGroups = [].concat(_toConsumableArray(formValues['resourceGroups']));
24345
+ }
24301
24346
 
24302
24347
  var sourceSchema = wizard['sourceMetadata'] ? wizard['sourceMetadata'] : null;
24303
24348