@lingk/sync 1.0.43 → 1.0.45

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
@@ -561,10 +561,13 @@ module.exports =
561
561
  inputs = _props.inputs,
562
562
  selectedValues = _props.selectedValues,
563
563
  sectionLabels = _props.sectionLabels,
564
- fieldPropLabel = _props.fieldPropLabel;
564
+ sectionTypes = _props.sectionTypes,
565
+ fieldPropLabel = _props.fieldPropLabel,
566
+ fieldPropType = _props.fieldPropType,
567
+ showApiNames = _props.showApiNames;
565
568
  var searchTerms = this.state.searchTerms;
566
569
 
567
- var iterator = function (sectionValues, entity, sectionLabel, iteration, parents, newParent) {
570
+ var iterator = function (sectionValues, entity, sectionLabel, iteration, parents, newParent, sectionType) {
568
571
  if (newParent) {
569
572
  parents = parents.concat(newParent);
570
573
  }
@@ -574,17 +577,19 @@ module.exports =
574
577
  title += pt;
575
578
  title += ': ';
576
579
  });
577
- title += entity[fieldPropLabel];
580
+ // CHOOSE HERE TYPE OR LABEL
581
+ title += entity[showApiNames && fieldPropType ? fieldPropType : fieldPropLabel];
578
582
 
579
583
  var isExpanded = _nestExpand2.default.checkIfExpanded(entity[fieldPropLabel], parents, this.state.expanded);
580
584
  var isSelected = false;
581
585
  isSelected = selectedValues && selectedValues.length > 0 && selectedValues.some(function (rsc) {
582
586
  return rsc[fieldPropLabel] === entity[fieldPropLabel] && (!(parents && rsc.parents) || JSON.stringify(rsc.parents) === JSON.stringify(parents)) && (!rsc.section || sectionLabel === rsc.section);
583
587
  });
584
- //console.log(entity.name)
588
+
585
589
  sectionValues.push(Object.assign({}, entity, {
586
590
  title: title,
587
591
  section: sectionLabel,
592
+ __section: sectionType,
588
593
  iteration: iteration,
589
594
  parents: parents,
590
595
  isExpanded: isExpanded,
@@ -593,7 +598,7 @@ module.exports =
593
598
 
594
599
  if (entity.object && isExpanded) {
595
600
  entity.object.properties.forEach(function (p) {
596
- iterator(sectionValues, p, sectionLabel, iteration + 1, parents, entity[fieldPropLabel]);
601
+ iterator(sectionValues, p, sectionLabel, iteration + 1, parents, entity[fieldPropLabel], sectionType);
597
602
  });
598
603
  }
599
604
  return sectionValues;
@@ -606,14 +611,19 @@ module.exports =
606
611
  sectionLabels.forEach(function (s, i) {
607
612
  if (values && values[i] && values[i].length > 0) {
608
613
  (function () {
609
- v = v.concat(sectionLabels[i]);
614
+ // ADD TITLE OF SECTION HERE
615
+ v = v.concat(showApiNames && sectionTypes ? sectionTypes[i] : sectionLabels[i]);
610
616
  var sectionValues = [];
611
617
  values[i].forEach(function (entity) {
612
- iterator(sectionValues, entity, sectionLabels[i], 0, []);
618
+ var sectionType = sectionTypes && sectionTypes[i];
619
+ iterator(sectionValues, entity, sectionLabels[i], 0, [], null, sectionType);
613
620
  });
614
621
  //search
615
622
  sectionValues.forEach(function (sv, ii) {
616
- var satisfiesSearch = searchTerms && searchTerms[sectionLabels[i]] ? sv[fieldPropLabel].toLowerCase().indexOf(searchTerms[sectionLabels[i]].toLowerCase()) > -1 : true;
623
+ var satisfiesSearch = true; // default show everything
624
+ if (searchTerms && searchTerms[sectionLabels[i]]) {
625
+ satisfiesSearch = sv[showApiNames ? fieldPropType : fieldPropLabel].toLowerCase().indexOf(searchTerms[sectionLabels[i]].toLowerCase()) > -1;
626
+ }
617
627
  sv.satisfiesSearch = satisfiesSearch;
618
628
  //satisfy parents
619
629
  if (searchTerms && satisfiesSearch) {
@@ -1571,6 +1581,7 @@ module.exports =
1571
1581
  if (sourceResource && nestedSourceProp.property && destinationResource && destinationProperty) {
1572
1582
  mappings = mappings.concat(Object.assign({ // add to mappings obj
1573
1583
  resourceFromLabel: singleMapping.dataSourceIsDestinationEntity ? sourceResource.type + '_' + targetProvider.toLowerCase() : sourceResource.type + '_' + sourceProvider.toLowerCase(),
1584
+ resourceFromNameAndProvider: singleMapping.dataSourceIsDestinationEntity ? sourceResource.type + '_' + targetProvider.toLowerCase() : sourceResource.type + '_' + sourceProvider.toLowerCase(),
1574
1585
  resourceFromName: sourceResource.type,
1575
1586
  propertyFromName: nestedSourceProp.property
1576
1587
  }, nestedSourceProp.parentsArray && nestedSourceProp.parentsArray.length > 0 && { propertyFromParents: nestedSourceProp.parentsArray }, {
@@ -1656,6 +1667,8 @@ module.exports =
1656
1667
  return pf.val;
1657
1668
  }) : [],
1658
1669
  level: rsc.level || (rscIndex === 0 ? 0 : 1),
1670
+ // THIS ONE IS ACTUALLY PARENT LABEL AND PROVIDER!
1671
+ // So we know what Account to join to (if they have the same Name)
1659
1672
  parentNameAndProvider: primaryKeyResourceLabel && primaryResourceProvider ? primaryKeyResourceLabel + '_' + primaryResourceProvider.toLowerCase() : ''
1660
1673
  };
1661
1674
  } else return null;
@@ -3342,6 +3355,7 @@ module.exports =
3342
3355
  primaryKeyResourceName = rsc.primaryKeyResource;
3343
3356
 
3344
3357
  // primaryKeyName coming from resource IN THIS BUNDLE
3358
+ // FIND ITS BY THE LABEL, NOT THE NAME!!! THIS IS HOW IT IS SAVED.
3345
3359
  var primaryKeyResourceResource = bundle.resources.find(function (r) {
3346
3360
  return primaryResourceName === r.resourceLabel;
3347
3361
  });
@@ -14501,7 +14515,8 @@ module.exports =
14501
14515
  inputs = _props3.inputs,
14502
14516
  step = _props3.step,
14503
14517
  sourceSchema = _props3.sourceSchema,
14504
- direction = _props3.direction;
14518
+ direction = _props3.direction,
14519
+ showApiNames = _props3.showApiNames;
14505
14520
  var _state = this.state,
14506
14521
  resourceGroupIndex = _state.resourceGroupIndex,
14507
14522
  paneToggle = _state.paneToggle,
@@ -14571,7 +14586,8 @@ module.exports =
14571
14586
  'div',
14572
14587
  { style: { zIndex: 99 } },
14573
14588
  _react2.default.createElement(_selectWrapper2.default, { label: "Add Data Target", type: 'brand',
14574
- style: { height: 40, width: 160 }, minWidth: 260, fieldPropLabel: 'name',
14589
+ style: { height: 40, width: 160 }, minWidth: 260,
14590
+ fieldPropLabel: 'name', fieldPropType: 'type', showApiNames: showApiNames,
14575
14591
  onSelect: this.addDefaultResourceGroup,
14576
14592
  values: newTargetObjectMetadata,
14577
14593
  title: 'Available Target Objects', inputs: inputs, sectionLabelSuffix: 'Objects',
@@ -14648,7 +14664,7 @@ module.exports =
14648
14664
  return _react2.default.createElement(
14649
14665
  'div',
14650
14666
  { className: 'schema-group-name', key: i },
14651
- g.name
14667
+ showApiNames && g.__name ? g.__name : g.name
14652
14668
  );
14653
14669
  })
14654
14670
  )
@@ -18461,13 +18477,16 @@ module.exports =
18461
18477
  })*/
18462
18478
 
18463
18479
  var groupName = group.name;
18480
+ if (_this3.props.showApiNames && group.__name) {
18481
+ groupName = group.__name;
18482
+ }
18464
18483
  if (isReverse) {
18465
18484
  if (group.provider.toLowerCase() === step.destinationProvider.toLowerCase()) {
18466
- groupName = group.name + ' (' + step.destinationProvider + ')';
18485
+ groupName = groupName + ' (' + step.destinationProvider + ')';
18467
18486
  }
18468
18487
  } else {
18469
18488
  if (group.provider.toLowerCase() === step.sourceProvider.toLowerCase()) {
18470
- groupName = group.name + ' (' + step.sourceProvider + ')';
18489
+ groupName = groupName + ' (' + step.sourceProvider + ')';
18471
18490
  }
18472
18491
  }
18473
18492
 
@@ -18508,13 +18527,16 @@ module.exports =
18508
18527
  textOverflow: 'ellipsis', maxWidth: 'calc(100% - 32px)', whiteSpace: 'nowrap' } },
18509
18528
  group.resources && group.resources.map(function (rsc, ii) {
18510
18529
  var rscName = rsc.name;
18530
+ if (_this3.props.showApiNames && rsc.__name) {
18531
+ rscName = rsc.__name;
18532
+ }
18511
18533
  if (isReverse) {
18512
18534
  if (rsc.provider.toLowerCase() === step.sourceProvider.toLowerCase()) {
18513
- rscName = rsc.name + ' (' + step.sourceProvider + ')';
18535
+ rscName = rscName + ' (' + step.sourceProvider + ')';
18514
18536
  }
18515
18537
  } else {
18516
18538
  if (rsc.provider.toLowerCase() === step.destinationProvider.toLowerCase()) {
18517
- rscName = rsc.name + ' (' + step.destinationProvider + ')';
18539
+ rscName = rscName + ' (' + step.destinationProvider + ')';
18518
18540
  }
18519
18541
  }
18520
18542
  return _react2.default.createElement(
@@ -18630,7 +18652,8 @@ module.exports =
18630
18652
  sourceSchema = props.sourceSchema,
18631
18653
  destinationSchema = props.destinationSchema,
18632
18654
  change = props.change,
18633
- direction = props.direction;
18655
+ direction = props.direction,
18656
+ showApiNames = props.showApiNames;
18634
18657
 
18635
18658
  var Modal = inputs.Modal;
18636
18659
  var Button = inputs.Button;
@@ -18651,9 +18674,13 @@ module.exports =
18651
18674
  var map = Object.assign({
18652
18675
  isExternalKeyMapping: true,
18653
18676
  resourceFromName: group.sourceKeysObjects[i],
18677
+ __resourceFromName: group.__sourceKeysObjects[i],
18654
18678
  propertyFromName: sk,
18679
+ __propertyFromName: group.__sourceKeys[i],
18655
18680
  resourceToName: group.name,
18681
+ __resourceToName: group.__name,
18656
18682
  propertyToName: group.destinationKeys[i],
18683
+ __propertyToName: group.__destinationKeys[i],
18657
18684
  propertyFromParents: group.sourceKeysParents[i]
18658
18685
  }, rsc.provider.toLowerCase() === step.destinationProvider.toLowerCase() && { dataSourceIsDestinationEntity: true });
18659
18686
  group.mappings = group.mappings || [];
@@ -18668,10 +18695,14 @@ module.exports =
18668
18695
  var map = Object.assign({
18669
18696
  isExternalKeyMapping: true,
18670
18697
  resourceFromName: group.lingkSourceKeyObject,
18698
+ __resourceFromName: group.__lingkSourceKeyObject,
18671
18699
  propertyFromParents: group.lingkSourceKeyParents,
18672
18700
  propertyFromName: group.lingkSourceKey,
18701
+ __propertyFromName: group.__lingkSourceKey,
18673
18702
  resourceToName: group.name,
18674
- propertyToName: 'Lingk External Id'
18703
+ __resourceToName: group.__name,
18704
+ propertyToName: 'Lingk External Id',
18705
+ __propertyToName: 'Lingk_External_Id__c'
18675
18706
  }, rsc.provider.toLowerCase() === step.destinationProvider.toLowerCase() && { dataSourceIsDestinationEntity: true });
18676
18707
  group.mappings = group.mappings || [];
18677
18708
  group.mappings.push(map);
@@ -18712,8 +18743,10 @@ module.exports =
18712
18743
  var selectSourceKeyForLingk = function selectSourceKeyForLingk(key, i, field) {
18713
18744
  var rgs = [].concat(_toConsumableArray(resourceGroups));
18714
18745
  var group = rgs[bundleIndex];
18715
- group.lingkSourceKey = key;
18746
+ group.lingkSourceKey = field.label;
18747
+ group.__lingkSourceKey = field.name;
18716
18748
  group.lingkSourceKeyObject = field.section;
18749
+ group.__lingkSourceKeyObject = field.__section;
18717
18750
  group.lingkSourceKeyParents = field.parents;
18718
18751
  change('resourceGroups', rgs);
18719
18752
  props.update();
@@ -18724,13 +18757,17 @@ module.exports =
18724
18757
  var group = rgs[bundleIndex];
18725
18758
  if (i === 0) {
18726
18759
  // create array
18727
- group.sourceKeys = [key];
18760
+ group.sourceKeys = [field.label];
18761
+ group.__sourceKeys = [field.name];
18728
18762
  group.sourceKeysObjects = [field.section];
18763
+ group.__sourceKeysObjects = [field.__section];
18729
18764
  group.sourceKeysParents = [field.parents];
18730
18765
  } else {
18731
18766
  // add to array
18732
- group.sourceKeys[i] = key;
18767
+ group.sourceKeys[i] = field.label;
18768
+ group.__sourceKeys[i] = field.name;
18733
18769
  group.sourceKeysObjects[i] = field.section;
18770
+ group.__sourceKeysObjects[i] = field.__section;
18734
18771
  group.sourceKeysParents[i] = field.parents;
18735
18772
  }
18736
18773
  change('resourceGroups', rgs);
@@ -18741,10 +18778,12 @@ module.exports =
18741
18778
  var rgs = [].concat(_toConsumableArray(resourceGroups));
18742
18779
  var group = rgs[bundleIndex];
18743
18780
  if (i === 0) {
18744
- group.destinationKeys = [key];
18781
+ group.destinationKeys = [field.label];
18782
+ group.__destinationKeys = [field.name];
18745
18783
  group.destinationKeysParents = [field.parents];
18746
18784
  } else {
18747
- group.destinationKeys[i] = key;
18785
+ group.destinationKeys[i] = field.label;
18786
+ group.__destinationKeys[i] = field.name;
18748
18787
  group.destinationKeysParents[i] = field.parents;
18749
18788
  }
18750
18789
  change('resourceGroups', rgs);
@@ -18755,9 +18794,11 @@ module.exports =
18755
18794
  var group = rgs[bundleIndex];
18756
18795
 
18757
18796
  var sectionLabels = [];
18797
+ var sectionTypes = [];
18758
18798
  var sectionProviders = [];
18759
18799
  var vals = bundle.resources.map(function (br, i) {
18760
18800
  sectionLabels.push(br.name);
18801
+ sectionTypes.push(br.__name);
18761
18802
  sectionProviders.push(br.provider);
18762
18803
  return bundle.resources[i].provider.toLowerCase() === step.destinationProvider.toLowerCase() ? destinationSchema && destinationSchema.find(function (defaultRsc) {
18763
18804
  return defaultRsc.name === bundle.resources[i].name;
@@ -18860,6 +18901,15 @@ module.exports =
18860
18901
  sourceLabel += sk;
18861
18902
  }
18862
18903
 
18904
+ if (showApiNames && group.__sourceKeys && group.__sourceKeys[i]) {
18905
+ sourceLabel = group.__sourceKeys[i];
18906
+ }
18907
+
18908
+ var destinationLabel = group.destinationKeys && group.destinationKeys[i];
18909
+ if (showApiNames && group.__destinationKeys && group.__destinationKeys[i]) {
18910
+ destinationLabel = group.__destinationKeys[i];
18911
+ }
18912
+
18863
18913
  return _react2.default.createElement(
18864
18914
  'div',
18865
18915
  { className: 'external-keys-row', key: i },
@@ -18870,15 +18920,16 @@ module.exports =
18870
18920
  onSelect: function onSelect(v, iii, field) {
18871
18921
  return selectCustomSourceKey(v, i, field);
18872
18922
  },
18873
- inputs: inputs,
18874
- type: 'brand', fieldPropLabel: 'label',
18875
- values: vals, sectionLabels: sectionLabels,
18923
+ inputs: inputs, values: vals, type: 'brand',
18924
+ fieldPropLabel: 'label', fieldPropType: 'name',
18925
+ sectionLabels: sectionLabels, sectionTypes: sectionTypes,
18876
18926
  selectedValues: group.sourceKeys && [{
18877
18927
  label: group.sourceKeys && group.sourceKeys[i],
18878
18928
  parents: group.sourceKeysParents && group.sourceKeysParents[i],
18879
18929
  section: group.sourceKeysObjects && group.sourceKeysObjects[i]
18880
18930
  }],
18881
- sectionLabelSuffix: 'Fields'
18931
+ sectionLabelSuffix: 'Fields',
18932
+ showApiNames: showApiNames
18882
18933
  })
18883
18934
  ),
18884
18935
  _react2.default.createElement(
@@ -18889,18 +18940,19 @@ module.exports =
18889
18940
  _react2.default.createElement(
18890
18941
  'div',
18891
18942
  { className: 'external-keys-column' },
18892
- _react2.default.createElement(_selectWrapper2.default, { label: group.destinationKeys && group.destinationKeys[i] || 'Choose Key',
18943
+ _react2.default.createElement(_selectWrapper2.default, { label: destinationLabel || 'Choose Key',
18893
18944
  onSelect: function onSelect(v, iii, field) {
18894
18945
  return selectCustomDestinationKey(v, i, field);
18895
18946
  },
18896
- type: 'brand', inputs: inputs,
18897
- values: destinationVals,
18898
- sectionLabels: [bundle.name], fieldPropLabel: 'label',
18947
+ type: 'brand', inputs: inputs, values: destinationVals,
18948
+ sectionLabels: [bundle.name], sectionTypes: [bundle.__name],
18949
+ fieldPropLabel: 'label', fieldPropType: 'name',
18899
18950
  selectedValues: group.destinationKeys && [{
18900
18951
  label: group.destinationKeys && group.destinationKeys[i],
18901
18952
  parents: group.destinationKeysParents && group.destinationKeysParents[i]
18902
18953
  }],
18903
- sectionLabelSuffix: 'Fields'
18954
+ sectionLabelSuffix: 'Fields',
18955
+ showApiNames: showApiNames
18904
18956
  })
18905
18957
  ),
18906
18958
  i !== 0 && _react2.default.createElement(
@@ -18947,6 +18999,10 @@ module.exports =
18947
18999
  sourceLabel += group.lingkSourceKey;
18948
19000
  }
18949
19001
 
19002
+ if (showApiNames && group.__lingkSourceKey) {
19003
+ sourceLabel = group.__lingkSourceKey;
19004
+ }
19005
+
18950
19006
  return _react2.default.createElement(
18951
19007
  'div',
18952
19008
  { key: 'one' },
@@ -18993,15 +19049,16 @@ module.exports =
18993
19049
  onSelect: function onSelect(v, i, field) {
18994
19050
  return selectSourceKeyForLingk(v, i, field);
18995
19051
  },
18996
- type: 'brand', inputs: inputs,
18997
- values: vals, sectionLabels: sectionLabels,
18998
- fieldPropLabel: 'label',
19052
+ type: 'brand', inputs: inputs, values: vals,
19053
+ sectionLabels: sectionLabels, sectionTypes: sectionTypes,
19054
+ fieldPropLabel: 'label', fieldPropType: 'name',
18999
19055
  selectedValues: [{
19000
19056
  label: group.lingkSourceKey,
19001
19057
  parents: group.lingkSourceKeyParents,
19002
19058
  section: group.lingkSourceKeyObject
19003
19059
  }],
19004
- sectionLabelSuffix: 'Fields'
19060
+ sectionLabelSuffix: 'Fields',
19061
+ showApiNames: showApiNames
19005
19062
  })
19006
19063
  ),
19007
19064
  _react2.default.createElement(
@@ -19012,7 +19069,7 @@ module.exports =
19012
19069
  _react2.default.createElement(
19013
19070
  'div',
19014
19071
  { className: 'external-keys-column' },
19015
- 'Lingk External ID'
19072
+ showApiNames ? 'Lingk_External_Id__c' : 'Lingk External ID'
19016
19073
  )
19017
19074
  )
19018
19075
  );
@@ -19071,7 +19128,6 @@ module.exports =
19071
19128
 
19072
19129
  _this.state = {
19073
19130
  selectedField: null,
19074
- selectedFieldParents: null,
19075
19131
  customFieldValue: '',
19076
19132
  addNewButtonText: 'Add New',
19077
19133
  setDuplicateRules: false,
@@ -19168,6 +19224,7 @@ module.exports =
19168
19224
  }, {
19169
19225
  key: 'onSelectDestinationField',
19170
19226
  value: function onSelectDestinationField(group, field, format) {
19227
+ //group.name, field.label, field.format
19171
19228
  var _props2 = this.props,
19172
19229
  change = _props2.change,
19173
19230
  formValues = _props2.formValues,
@@ -19175,36 +19232,41 @@ module.exports =
19175
19232
  resourceGroupIndex = _props2.resourceGroupIndex;
19176
19233
 
19177
19234
  var selectedEntity = selectedEntities[resourceGroupIndex];
19178
- if (this.state.selectedField) {
19235
+ if (this.state.selectedField && this.state.selectedField.label) {
19179
19236
  var resourceGroups = [].concat(_toConsumableArray(formValues['resourceGroups']));
19180
19237
  var rscGroup = resourceGroups[resourceGroupIndex];
19181
19238
 
19182
19239
  //cant overwrite externalKey mapping
19183
19240
  if (rscGroup.mappings && rscGroup.mappings.find(function (m) {
19184
- return m && m.propertyToName === field && m.isExternalKeyMapping;
19241
+ return m && m.propertyToName === field.label && m.isExternalKeyMapping;
19185
19242
  })) return;
19186
19243
 
19187
19244
  var transform = 'none';
19188
- if (format) {
19189
- if (format === 'date-time') {
19245
+ if (field.format) {
19246
+ if (field.format === 'date-time') {
19190
19247
  transform = 'date';
19191
19248
  }
19192
19249
  }
19250
+
19193
19251
  //cant map multiple to same destination field
19194
19252
  rscGroup.mappings = rscGroup.mappings && rscGroup.mappings.filter(function (m) {
19195
- return m.propertyToName !== field;
19253
+ return m.propertyToName !== field.label;
19196
19254
  }) || [];
19197
19255
  rscGroup.mappings.push({
19198
19256
  resourceFromName: selectedEntity.name,
19199
- resourceToName: group,
19200
- propertyFromName: this.state.selectedField,
19201
- propertyFromParents: this.state.selectedFieldParents,
19202
- propertyToName: field,
19257
+ __resourceFromName: selectedEntity.__name,
19258
+ resourceToName: group.name,
19259
+ __resourceToName: group.__name,
19260
+ propertyFromName: this.state.selectedField.label,
19261
+ __propertyFromName: this.state.selectedField.name,
19262
+ propertyFromParents: this.state.selectedField.parents,
19263
+ propertyToName: field.label,
19264
+ __propertyToName: field.name,
19203
19265
  transformations: [{ type: transform }],
19204
19266
  dataSourceIsDestinationEntity: selectedEntity.isDestinationEntity
19205
19267
  });
19206
19268
  change('resourceGroups', resourceGroups);
19207
- this.setState({ selectedField: null, selectedFieldParents: null });
19269
+ this.setState({ selectedField: {} });
19208
19270
  this.props.update();
19209
19271
  this.props.disableMultiple();
19210
19272
  }
@@ -19225,10 +19287,9 @@ module.exports =
19225
19287
  toggle = _props3.toggle,
19226
19288
  step = _props3.step,
19227
19289
  customizingGroup = _props3.customizingGroup,
19228
- inputs = _props3.inputs;
19229
- var _state = this.state,
19230
- selectedField = _state.selectedField,
19231
- selectedFieldParents = _state.selectedFieldParents;
19290
+ inputs = _props3.inputs,
19291
+ showApiNames = _props3.showApiNames;
19292
+ var selectedField = this.state.selectedField;
19232
19293
 
19233
19294
  var Button = inputs.Button;
19234
19295
  var Input = inputs.Input;
@@ -19297,13 +19358,16 @@ module.exports =
19297
19358
  var isSelected = selectedEntity.name === rsc.name && selectedEntity.isDestinationEntity === isDestinationEntity;
19298
19359
 
19299
19360
  var rscName = rsc.name;
19361
+ if (showApiNames && rsc.__name) {
19362
+ rscName = rsc.__name;
19363
+ }
19300
19364
  if (isReverse) {
19301
19365
  if (rsc.provider.toLowerCase() === step.sourceProvider.toLowerCase()) {
19302
- rscName = rsc.name + ' (' + step.sourceProvider + ')';
19366
+ rscName = rscName + ' (' + step.sourceProvider + ')';
19303
19367
  }
19304
19368
  } else {
19305
19369
  if (rsc.provider.toLowerCase() === step.destinationProvider.toLowerCase()) {
19306
- rscName = rsc.name + ' (' + step.destinationProvider + ')';
19370
+ rscName = rscName + ' (' + step.destinationProvider + ')';
19307
19371
  }
19308
19372
  }
19309
19373
 
@@ -19318,9 +19382,10 @@ module.exports =
19318
19382
  _this4.scrollToTop(_this4['scroller-' + ii], 18, i * 43 + 6);
19319
19383
  _this4.props.pickEntity({
19320
19384
  name: rsc.name,
19385
+ __name: rsc.__name,
19321
19386
  isDestinationEntity: rsc.provider.toLowerCase() === step.destinationProvider.toLowerCase()
19322
19387
  });
19323
- _this4.setState({ selectedField: null, selectedFieldParents: null });
19388
+ _this4.setState({ selectedField: {} });
19324
19389
  }
19325
19390
  },
19326
19391
  _react2.default.createElement(
@@ -19354,16 +19419,21 @@ module.exports =
19354
19419
  }).map(function (field, ii) {
19355
19420
  return _react2.default.createElement(_nestedField2.default, { key: ii, field: field,
19356
19421
  selectedField: selectedField,
19357
- selectedFieldParents: selectedFieldParents,
19358
19422
  filteredMappings: filteredMappings, parents: [],
19359
19423
  onExpand: function onExpand(expanded) {
19360
19424
  return _this4.setState({ expanded: expanded });
19361
19425
  },
19362
- click: function click(v, parents) {
19426
+ click: function click(field, parents) {
19363
19427
  return _this4.setState({
19364
- selectedField: v, selectedFieldParents: parents
19428
+ selectedField: {
19429
+ label: field.label,
19430
+ name: field.name,
19431
+ parents: parents
19432
+ }
19365
19433
  });
19366
- }, expanded: _this4.state.expanded });
19434
+ }, expanded: _this4.state.expanded,
19435
+ showApiNames: showApiNames
19436
+ });
19367
19437
  }),
19368
19438
  _react2.default.createElement('div', { style: { height: 9 } })
19369
19439
  )
@@ -19432,17 +19502,18 @@ module.exports =
19432
19502
  return !p.readOnly;
19433
19503
  }).map(function (field, i) {
19434
19504
  var isMapped = mappings && Object.keys(mappings).includes(field.label);
19505
+ var title = showApiNames ? field.name : field.label;
19435
19506
  return _react2.default.createElement(
19436
19507
  'div',
19437
19508
  { key: i,
19438
- className: selectedField ? "wizard-map-field" : '',
19509
+ className: selectedField && selectedField.label ? "wizard-map-field" : '',
19439
19510
  style: { paddingLeft: 5, width: 335,
19440
19511
  fontWeight: isMapped ? 'bold' : 'normal',
19441
- color: isMapped ? '#16325c' : selectedField ? 'black' : 'grey'
19512
+ color: isMapped ? '#16325c' : selectedField && selectedField.label ? 'black' : 'grey'
19442
19513
  }, onClick: function onClick() {
19443
- return _this4.onSelectDestinationField(group.name, field.label, field.format);
19514
+ return _this4.onSelectDestinationField(group, field);
19444
19515
  } },
19445
- field.label,
19516
+ title,
19446
19517
  ' ',
19447
19518
  field.required ? '*' : ''
19448
19519
  );
@@ -19499,7 +19570,8 @@ module.exports =
19499
19570
  var MapTableSourceRow = exports.MapTableSourceRow = function MapTableSourceRow(props) {
19500
19571
  var group = props.group,
19501
19572
  step = props.step,
19502
- isReverse = props.isReverse;
19573
+ isReverse = props.isReverse,
19574
+ showApiNames = props.showApiNames;
19503
19575
 
19504
19576
  return _react2.default.createElement(
19505
19577
  'div',
@@ -19515,13 +19587,16 @@ module.exports =
19515
19587
  var fieldNum = mapz ? mapz.length : 0;
19516
19588
 
19517
19589
  var rscName = rsc.name;
19590
+ if (showApiNames && rsc.__name) {
19591
+ rscName = rsc.__name;
19592
+ }
19518
19593
  if (isReverse) {
19519
19594
  if (rsc.provider.toLowerCase() === step.sourceProvider.toLowerCase()) {
19520
- rscName = rsc.name + ' (' + step.sourceProvider + ')';
19595
+ rscName = rscName + ' (' + step.sourceProvider + ')';
19521
19596
  }
19522
19597
  } else {
19523
19598
  if (rsc.provider.toLowerCase() === step.destinationProvider.toLowerCase()) {
19524
- rscName = rsc.name + ' (' + step.destinationProvider + ')';
19599
+ rscName = rscName + ' (' + step.destinationProvider + ')';
19525
19600
  }
19526
19601
  }
19527
19602
 
@@ -19545,7 +19620,8 @@ module.exports =
19545
19620
  var MapTableMappingRow = exports.MapTableMappingRow = function MapTableMappingRow(props) {
19546
19621
  var group = props.group,
19547
19622
  i = props.i,
19548
- clearMapping = props.clearMapping;
19623
+ clearMapping = props.clearMapping,
19624
+ showApiNames = props.showApiNames;
19549
19625
 
19550
19626
  return _react2.default.createElement(
19551
19627
  'div',
@@ -19571,6 +19647,14 @@ module.exports =
19571
19647
  });
19572
19648
  }
19573
19649
  fromString += m.propertyFromName;
19650
+ if (showApiNames && m.__propertyFromName) {
19651
+ fromString = m.__propertyFromName;
19652
+ }
19653
+
19654
+ var toStr = m.propertyToName;
19655
+ if (showApiNames && m.__propertyToName) {
19656
+ toStr = m.__propertyToName;
19657
+ }
19574
19658
  return _react2.default.createElement(
19575
19659
  'div',
19576
19660
  { key: iv, style: { height: 19, minWidth: 220, whiteSpace: 'nowrap' } },
@@ -19585,7 +19669,7 @@ module.exports =
19585
19669
  _react2.default.createElement(
19586
19670
  'div',
19587
19671
  { className: 'mapping-entry' },
19588
- fromString + ' \u2192 ' + m.propertyToName
19672
+ fromString + ' \u2192 ' + toStr
19589
19673
  )
19590
19674
  );
19591
19675
  })
@@ -19597,7 +19681,8 @@ module.exports =
19597
19681
  var MapTableTransformRow = exports.MapTableTransformRow = function MapTableTransformRow(props) {
19598
19682
  var group = props.group,
19599
19683
  i = props.i,
19600
- selectMapping = props.selectMapping;
19684
+ selectMapping = props.selectMapping,
19685
+ showApiNames = props.showApiNames;
19601
19686
 
19602
19687
  var icons = {
19603
19688
  none: _react2.default.createElement(
@@ -19716,17 +19801,21 @@ module.exports =
19716
19801
  var MapTableDestinationRow = exports.MapTableDestinationRow = function MapTableDestinationRow(_ref) {
19717
19802
  var group = _ref.group,
19718
19803
  step = _ref.step,
19719
- isReverse = _ref.isReverse;
19804
+ isReverse = _ref.isReverse,
19805
+ showApiNames = _ref.showApiNames;
19720
19806
 
19721
19807
 
19722
19808
  var groupName = group.name;
19809
+ if (showApiNames && group.__name) {
19810
+ groupName = group.__name;
19811
+ }
19723
19812
  if (isReverse) {
19724
19813
  if (group.provider.toLowerCase() === step.destinationProvider.toLowerCase()) {
19725
- groupName = group.name + ' (' + step.destinationProvider + ')';
19814
+ groupName = groupName + ' (' + step.destinationProvider + ')';
19726
19815
  }
19727
19816
  } else {
19728
19817
  if (group.provider.toLowerCase() === step.sourceProvider.toLowerCase()) {
19729
- groupName = group.name + ' (' + step.sourceProvider + ')';
19818
+ groupName = groupName + ' (' + step.sourceProvider + ')';
19730
19819
  }
19731
19820
  }
19732
19821
 
@@ -20168,7 +20257,8 @@ module.exports =
20168
20257
  showOverflow = _props3.showOverflow,
20169
20258
  step = _props3.step,
20170
20259
  isReverse = _props3.isReverse,
20171
- changeEntityLevel = _props3.changeEntityLevel;
20260
+ changeEntityLevel = _props3.changeEntityLevel,
20261
+ showApiNames = _props3.showApiNames;
20172
20262
  var parameterModalResourceIndex = this.state.parameterModalResourceIndex;
20173
20263
 
20174
20264
 
@@ -20267,6 +20357,7 @@ module.exports =
20267
20357
  var primaryResource = null;
20268
20358
  var primaryRscVals = null;
20269
20359
  var primaryRscSectionLabels = null;
20360
+ var primaryRscSectionTypes = null;
20270
20361
 
20271
20362
  if (rsc.parentNameAndProvider) {
20272
20363
  primaryResource = group.resources.find(function (gr) {
@@ -20288,6 +20379,7 @@ module.exports =
20288
20379
  });
20289
20380
 
20290
20381
  primaryRscSectionLabels = [primaryResource.name];
20382
+ primaryRscSectionTypes = [primaryResource.__name];
20291
20383
 
20292
20384
  if (primaryHasParameters) {
20293
20385
  primaryResource.parentRef.forEach(function (pr) {
@@ -20324,6 +20416,7 @@ module.exports =
20324
20416
  })];
20325
20417
 
20326
20418
  var joinRscSectionLabels = [rsc.name];
20419
+ var joinRscSectionTypes = [rsc.__name];
20327
20420
 
20328
20421
  if (hasParameters) {
20329
20422
  rsc.parentRef.forEach(function (pr) {
@@ -20344,6 +20437,9 @@ module.exports =
20344
20437
  if (rsc.primaryKeyName) {
20345
20438
  primaryKeyLabel += rsc.primaryKeyName;
20346
20439
  }
20440
+ if (showApiNames && rsc.__primaryKeyName) {
20441
+ primaryKeyLabel = rsc.__primaryKeyName;
20442
+ }
20347
20443
 
20348
20444
  var joinKeyLabel = '';
20349
20445
  rsc.joinKeyParents && rsc.joinKeyParents.forEach(function (skp) {
@@ -20353,15 +20449,21 @@ module.exports =
20353
20449
  if (rsc.joinKeyName) {
20354
20450
  joinKeyLabel += rsc.joinKeyName;
20355
20451
  }
20452
+ if (showApiNames && rsc.__joinKeyName) {
20453
+ joinKeyLabel = rsc.__joinKeyName;
20454
+ }
20356
20455
 
20357
20456
  var rscName = rsc.name;
20457
+ if (showApiNames && rsc.__name) {
20458
+ rscName = rsc.__name;
20459
+ }
20358
20460
  if (isReverse) {
20359
20461
  if (rsc.provider.toLowerCase() === step.sourceProvider.toLowerCase()) {
20360
- rscName = rsc.name + ' (' + step.sourceProvider + ')';
20462
+ rscName = rscName + ' (' + step.sourceProvider + ')';
20361
20463
  }
20362
20464
  } else {
20363
20465
  if (rsc.provider.toLowerCase() === step.destinationProvider.toLowerCase()) {
20364
- rscName = rsc.name + ' (' + step.destinationProvider + ')';
20466
+ rscName = rscName + ' (' + step.destinationProvider + ')';
20365
20467
  }
20366
20468
  }
20367
20469
 
@@ -20513,13 +20615,16 @@ module.exports =
20513
20615
  type: 'neutral', inputs: inputs,
20514
20616
  values: primaryRscVals,
20515
20617
  sectionLabels: primaryRscSectionLabels,
20618
+ sectionTypes: primaryRscSectionTypes,
20516
20619
  fieldPropLabel: 'label',
20620
+ fieldPropType: 'name',
20517
20621
  selectedValues: [{
20518
20622
  label: rsc.primaryKeyName,
20519
20623
  parents: rsc.primaryKeyParents,
20520
20624
  section: rsc.primaryKeyResource
20521
20625
  }],
20522
- sectionLabelSuffix: 'Fields'
20626
+ sectionLabelSuffix: 'Fields',
20627
+ showApiNames: showApiNames
20523
20628
  })
20524
20629
  ),
20525
20630
  _react2.default.createElement(
@@ -20550,12 +20655,15 @@ module.exports =
20550
20655
  type: 'neutral', inputs: inputs,
20551
20656
  values: joinRscVals,
20552
20657
  sectionLabels: joinRscSectionLabels,
20658
+ sectionTypes: joinRscSectionTypes,
20553
20659
  fieldPropLabel: 'label',
20660
+ fieldPropType: 'name',
20554
20661
  selectedValues: [{
20555
20662
  label: rsc.joinKeyName,
20556
20663
  parents: rsc.joinKeyParents
20557
20664
  }],
20558
- sectionLabelSuffix: 'Fields'
20665
+ sectionLabelSuffix: 'Fields',
20666
+ showApiNames: showApiNames
20559
20667
  })
20560
20668
  ),
20561
20669
  _react2.default.createElement(
@@ -20606,7 +20714,8 @@ module.exports =
20606
20714
  //resourceGroups[resourceGroupIndex].resources}
20607
20715
  , values: !isReverse ? [sourceSchema, destinationSchema] : [destinationSchema, sourceSchema],
20608
20716
  sectionLabels: !isReverse ? [step.sourceProvider, step.destinationProvider] : [step.destinationProvider, step.sourceProvider],
20609
- sectionLabelSuffix: 'Objects', fieldPropLabel: 'name'
20717
+ sectionLabelSuffix: 'Objects', fieldPropLabel: 'name', fieldPropType: 'type',
20718
+ showApiNames: showApiNames
20610
20719
  })
20611
20720
  ) : null
20612
20721
  ) : null
@@ -20951,7 +21060,8 @@ module.exports =
20951
21060
  resourceGroupIndex = _props8.resourceGroupIndex,
20952
21061
  sourceSchema = _props8.sourceSchema,
20953
21062
  destinationSchema = _props8.destinationSchema,
20954
- step = _props8.step;
21063
+ step = _props8.step,
21064
+ showApiNames = _props8.showApiNames;
20955
21065
 
20956
21066
  var Modal = inputs.Modal;
20957
21067
  var Input = inputs.Input;
@@ -20985,6 +21095,7 @@ module.exports =
20985
21095
  }
20986
21096
 
20987
21097
  var sectionLabels = [];
21098
+ var sectionTypes = [];
20988
21099
  var sectionProviders = [];
20989
21100
  var vals = [];
20990
21101
  if (transformSelected === 'concat') {
@@ -20993,6 +21104,7 @@ module.exports =
20993
21104
  }
20994
21105
  vals = group.resources.map(function (br, i) {
20995
21106
  sectionLabels.push(br.name);
21107
+ sectionTypes.push(br.__name);
20996
21108
  sectionProviders.push(br.provider);
20997
21109
  return group.resources[i].provider.toLowerCase() === step.destinationProvider.toLowerCase() ? destinationSchema && destinationSchema.find(function (defaultRsc) {
20998
21110
  return defaultRsc.name === group.resources[i].name;
@@ -21027,6 +21139,11 @@ module.exports =
21027
21139
  };
21028
21140
  }
21029
21141
 
21142
+ var rscFrom = showApiNames ? mapping.__resourceFromName : mapping.resourceFromName;
21143
+ var propFrom = showApiNames ? mapping.__propertyFromName : propertyFromLabel;
21144
+ var rscTo = showApiNames ? mapping.__resourceToName : mapping.resourceToName;
21145
+ var propTo = showApiNames ? mapping.__propertyToName : mapping.propertyToName;
21146
+
21030
21147
  return _react2.default.createElement(
21031
21148
  Modal,
21032
21149
  { opened: opened, hideModal: hideModal, submitModal: hideModal, title: 'Transform Data' },
@@ -21039,25 +21156,25 @@ module.exports =
21039
21156
  _react2.default.createElement(
21040
21157
  'strong',
21041
21158
  null,
21042
- mapping.resourceFromName
21159
+ rscFrom
21043
21160
  ),
21044
21161
  ': ',
21045
21162
  _react2.default.createElement(
21046
21163
  'span',
21047
21164
  null,
21048
- propertyFromLabel
21165
+ propFrom
21049
21166
  ),
21050
21167
  '\xA0\xA0\u2192\xA0\xA0',
21051
21168
  _react2.default.createElement(
21052
21169
  'strong',
21053
21170
  null,
21054
- mapping.resourceToName
21171
+ rscTo
21055
21172
  ),
21056
21173
  ': ',
21057
21174
  _react2.default.createElement(
21058
21175
  'span',
21059
21176
  null,
21060
- mapping.propertyToName
21177
+ propTo
21061
21178
  )
21062
21179
  ),
21063
21180
  _react2.default.createElement('br', null),
@@ -21192,11 +21309,11 @@ module.exports =
21192
21309
  onSelect: function onSelect(v, iii, field) {
21193
21310
  return _this3.changeConcatField(v, field, mappingIndex);
21194
21311
  },
21195
- inputs: inputs,
21196
- type: 'brand', fieldPropLabel: 'label',
21197
- values: vals, sectionLabels: sectionLabels,
21312
+ inputs: inputs, type: 'brand', values: vals,
21313
+ fieldPropLabel: 'label', fieldPropType: 'name',
21314
+ sectionLabels: sectionLabels, sectionTypes: sectionTypes,
21198
21315
  selectedValues: label && [{ label: label, parents: parents, section: section }],
21199
- sectionLabelSuffix: 'Fields'
21316
+ sectionLabelSuffix: 'Fields', showApiNames: showApiNames
21200
21317
  });
21201
21318
  }),
21202
21319
  _react2.default.createElement('br', null),
@@ -21242,7 +21359,7 @@ module.exports =
21242
21359
  var ConcatExampleResult = function ConcatExampleResult(props) {
21243
21360
  var delimiter = props.transformArgs[0];
21244
21361
  var concatFields = '';
21245
- concatFields += delimiter;
21362
+ concatFields += delimiter || '';
21246
21363
  props.transformArgs.filter(function (arg, i) {
21247
21364
  return i !== 0;
21248
21365
  }).forEach(function (ta) {
@@ -21689,7 +21806,6 @@ module.exports =
21689
21806
 
21690
21807
  change(mode + 'Credentials', credentials);
21691
21808
  this.setState(_defineProperty({}, mode + 'EnvChecking', true));
21692
- console.log(config);
21693
21809
  actions.callGetMetadata(tenantId, accountId, mode, step[mode + 'Provider'], config, endpoint || '_blank', step.isFramework, credentials, env, isReload).then(function (metadata) {
21694
21810
  _this2.setState(_defineProperty({}, mode + 'EnvChecking', false));
21695
21811
  // set meta for File Schema step if needed
@@ -23351,7 +23467,9 @@ module.exports =
23351
23467
  step = _props3.step,
23352
23468
  reset = _props3.reset,
23353
23469
  wizard = _props3.wizard,
23354
- actions = _props3.actions;
23470
+ actions = _props3.actions,
23471
+ showApiNames = _props3.showApiNames,
23472
+ toggleShowApiNames = _props3.toggleShowApiNames;
23355
23473
 
23356
23474
  var MapTable = inputs.MapTable;
23357
23475
  var Button = inputs.Button;
@@ -23378,6 +23496,16 @@ module.exports =
23378
23496
  { style: { fontSize: 20, display: 'inline-block' } },
23379
23497
  isReverse ? 'Map ' + destLabel + ' Fields to ' + srcLabel : 'Map ' + srcLabel + ' Fields to ' + destLabel
23380
23498
  ),
23499
+ _react2.default.createElement(
23500
+ 'div',
23501
+ { style: { float: 'right', padding: '5px 5px', userSelect: 'none' } },
23502
+ 'Showing: ',
23503
+ _react2.default.createElement(
23504
+ 'span',
23505
+ { className: 'show-label-or-api-names', onClick: toggleShowApiNames },
23506
+ showApiNames ? 'Api Names' : 'Labels'
23507
+ )
23508
+ ),
23381
23509
  _react2.default.createElement('br', null),
23382
23510
  _react2.default.createElement('br', null),
23383
23511
  _react2.default.createElement(
@@ -23401,14 +23529,15 @@ module.exports =
23401
23529
  _react2.default.createElement(
23402
23530
  _groupNav2.default,
23403
23531
  { resourceGroups: resourceGroups, isBundleStep: false, inputs: inputs,
23404
- style: { position: 'relative', width: 640, height: 69, zIndex: 9000 }, step: step },
23532
+ style: { position: 'relative', width: 640, height: 69, zIndex: 9000 }, step: step,
23533
+ showApiNames: showApiNames },
23405
23534
  _react2.default.createElement(_mapAccordion2.default, { sourceSchema: sourceSchema, destinationSchema: destinationSchema,
23406
23535
  formValues: formValues, change: change, update: this.update, step: step,
23407
- actions: actions, isReverse: isReverse }),
23536
+ actions: actions, isReverse: isReverse, showApiNames: showApiNames }),
23408
23537
  _react2.default.createElement(
23409
23538
  MapTable,
23410
23539
  { clearOneMapping: this.clearOneMapping,
23411
- selectMapping: this.selectMapping,
23540
+ selectMapping: this.selectMapping, showApiNames: showApiNames,
23412
23541
  mode: formValues.direction, step: step },
23413
23542
  _react2.default.createElement(Rows.MapTableSourceRow, null),
23414
23543
  _react2.default.createElement(Rows.MapTableMappingRow, null),
@@ -23426,7 +23555,9 @@ module.exports =
23426
23555
  mapping: this.state.selectedTransform, opened: this.state.showModal,
23427
23556
  change: change, resourceGroups: resourceGroups, step: step,
23428
23557
  resourceGroupIndex: this.state.selectedTransformResourceGroupIndex,
23429
- sourceSchema: sourceSchema, destinationSchema: destinationSchema })
23558
+ sourceSchema: sourceSchema, destinationSchema: destinationSchema,
23559
+ showApiNames: showApiNames
23560
+ })
23430
23561
  ) : null,
23431
23562
  _react2.default.createElement('br', null),
23432
23563
  (step.isFramework || step.isOrgAdmin) && _react2.default.createElement(
@@ -24617,7 +24748,9 @@ module.exports =
24617
24748
  step = _props14.step,
24618
24749
  reset = _props14.reset,
24619
24750
  wizard = _props14.wizard,
24620
- change = _props14.change;
24751
+ change = _props14.change,
24752
+ showApiNames = _props14.showApiNames,
24753
+ toggleShowApiNames = _props14.toggleShowApiNames;
24621
24754
 
24622
24755
 
24623
24756
  var resourceGroups = [];
@@ -24655,6 +24788,16 @@ module.exports =
24655
24788
  { style: { fontSize: 20, display: 'inline-block' } },
24656
24789
  isReverse ? 'Map ' + destLabel + ' Objects to ' + srcLabel : 'Map ' + srcLabel + ' Objects to ' + destLabel
24657
24790
  ),
24791
+ _react2.default.createElement(
24792
+ 'div',
24793
+ { style: { float: 'right', padding: '5px 5px', userSelect: 'none' } },
24794
+ 'Showing: ',
24795
+ _react2.default.createElement(
24796
+ 'span',
24797
+ { className: 'show-label-or-api-names', onClick: toggleShowApiNames },
24798
+ showApiNames ? 'Api Names' : 'Labels'
24799
+ )
24800
+ ),
24658
24801
  _react2.default.createElement('br', null),
24659
24802
  _react2.default.createElement('br', null),
24660
24803
  _react2.default.createElement(
@@ -24681,16 +24824,19 @@ module.exports =
24681
24824
  changeGroupOrder: this.changeGroupOrder, step: step,
24682
24825
  inputs: inputs, addDefaultEntity: this.addDefaultEntity,
24683
24826
  didRemoveEntity: this.removeEntity,
24684
- sourceSchema: sourceSchema,
24827
+ sourceSchema: sourceSchema, showApiNames: showApiNames,
24685
24828
  direction: formValues.direction },
24686
24829
  _react2.default.createElement(_schemaAccordion2.default, {
24687
24830
  sourceSchema: sourceSchema, destinationSchema: destinationSchema,
24688
24831
  changeEntityOrder: this.changeEntityOrder,
24689
- isReverse: isReverse, step: step,
24832
+ isReverse: isReverse, step: step, showApiNames: showApiNames,
24690
24833
  selectPrimaryKey: this.selectPrimaryKey,
24691
24834
  selectJoinKey: this.selectJoinKey, change: change,
24692
24835
  changeEntityLevel: this.changeEntityLevel }),
24693
- _react2.default.createElement(_bundleTable2.default, { openConnectionModal: this.openConnectionModal, mode: formValues.direction })
24836
+ _react2.default.createElement(_bundleTable2.default, { openConnectionModal: this.openConnectionModal,
24837
+ mode: formValues.direction,
24838
+ showApiNames: showApiNames
24839
+ })
24694
24840
  ),
24695
24841
  _react2.default.createElement('br', null)
24696
24842
  ),
@@ -24704,7 +24850,8 @@ module.exports =
24704
24850
  sourceSchema: sourceSchema, destinationSchema: destinationSchema,
24705
24851
  update: function update() {
24706
24852
  return _this3.forceUpdate();
24707
- }, direction: formValues.direction
24853
+ }, direction: formValues.direction,
24854
+ showApiNames: showApiNames
24708
24855
  })
24709
24856
  ),
24710
24857
  _react2.default.createElement('br', null),
@@ -24803,17 +24950,17 @@ module.exports =
24803
24950
  var SourceField = function SourceField(props) {
24804
24951
  var field = props.field,
24805
24952
  selectedField = props.selectedField,
24806
- selectedFieldParents = props.selectedFieldParents,
24807
24953
  filteredMappings = props.filteredMappings,
24808
24954
  click = props.click,
24809
24955
  onExpand = props.onExpand,
24810
24956
  expanded = props.expanded,
24811
- parents = props.parents;
24957
+ parents = props.parents,
24958
+ showApiNames = props.showApiNames;
24812
24959
 
24813
24960
  var isMapped = filteredMappings && Object.values(filteredMappings).find(function (fm) {
24814
24961
  return fm.propFrom === field.label && JSON.stringify(fm.parentsFrom) === JSON.stringify(parents);
24815
24962
  }) ? true : false;
24816
- var isSelected = selectedField && selectedField === field.label && JSON.stringify(selectedFieldParents) === JSON.stringify(parents);
24963
+ var isSelected = selectedField && selectedField.label && selectedField.label === field.label && JSON.stringify(selectedField.parents) === JSON.stringify(parents);
24817
24964
  var style = {
24818
24965
  paddingLeft: 5,
24819
24966
  background: isSelected ? '#dfe0e0' : 'initial',
@@ -24833,6 +24980,9 @@ module.exports =
24833
24980
  if (field.label) {
24834
24981
  title += field.label;
24835
24982
  }
24983
+ if (showApiNames) {
24984
+ title = field.name;
24985
+ }
24836
24986
  var isExpanded = false;
24837
24987
  if (field.object) {
24838
24988
  isExpanded = _nestExpand2.default.checkIfExpanded(field.label, parents, expanded);
@@ -24847,7 +24997,7 @@ module.exports =
24847
24997
  fontWeight: 'bold' } : style,
24848
24998
  onClick: function onClick() {
24849
24999
  if (!field.object) {
24850
- click(field.label, parents);
25000
+ click(field, parents);
24851
25001
  } else {
24852
25002
  onExpand(_nestExpand2.default.expand(field.label, parents, expanded));
24853
25003
  }
@@ -24876,9 +25026,9 @@ module.exports =
24876
25026
  { className: 'fields-expander' },
24877
25027
  field.object && field.object.properties.map(function (nestedField, i) {
24878
25028
  return _react2.default.createElement(SourceField, { key: i, field: nestedField, selectedField: selectedField,
24879
- selectedFieldParents: selectedFieldParents,
24880
25029
  filteredMappings: filteredMappings, parents: parents.concat(field.label),
24881
- click: click, onExpand: onExpand, expanded: expanded });
25030
+ click: click, onExpand: onExpand, expanded: expanded
25031
+ });
24882
25032
  })
24883
25033
  ) : null
24884
25034
  )
@@ -25044,9 +25194,7 @@ module.exports =
25044
25194
  }, {
25045
25195
  key: 'deleteScenario',
25046
25196
  value: function deleteScenario(id, i) {
25047
- var scenarios = [].concat(_toConsumableArray(this.state.scenarios.filter(function (s) {
25048
- return !s.deleted;
25049
- })));
25197
+ var scenarios = [].concat(_toConsumableArray(this.state.scenarios));
25050
25198
  scenarios[i].deleted = true;
25051
25199
  // put deleted ones on the end, to simplify updating order
25052
25200
  scenarios.splice(scenarios.length - 1, 0, scenarios.splice(i, 1)[0]);
@@ -25055,9 +25203,7 @@ module.exports =
25055
25203
  }, {
25056
25204
  key: 'moveUp',
25057
25205
  value: function moveUp(id, i) {
25058
- var scenarios = [].concat(_toConsumableArray(this.state.scenarios.filter(function (s) {
25059
- return !s.deleted;
25060
- })));
25206
+ var scenarios = [].concat(_toConsumableArray(this.state.scenarios));
25061
25207
  if (i !== 0) {
25062
25208
  scenarios.splice(i - 1, 0, scenarios.splice(i, 1)[0]);
25063
25209
  this.setState({ scenarios: scenarios });
@@ -25066,9 +25212,7 @@ module.exports =
25066
25212
  }, {
25067
25213
  key: 'moveDown',
25068
25214
  value: function moveDown(id, i) {
25069
- var scenarios = [].concat(_toConsumableArray(this.state.scenarios.filter(function (s) {
25070
- return !s.deleted;
25071
- })));
25215
+ var scenarios = [].concat(_toConsumableArray(this.state.scenarios));
25072
25216
  if (i !== scenarios.length - 1) {
25073
25217
  scenarios.splice(i + 1, 0, scenarios.splice(i, 1)[0]);
25074
25218
  this.setState({ scenarios: scenarios });
@@ -25476,7 +25620,8 @@ module.exports =
25476
25620
  _this.limitBackToCurrentPage = _this.limitBackToCurrentPage.bind(_this);
25477
25621
  _this.state = {
25478
25622
  currentPage: 1,
25479
- highestPage: 1
25623
+ highestPage: 1,
25624
+ showApiNames: false
25480
25625
  };
25481
25626
  _this.possibleSteps = {
25482
25627
  account: _accountStep2.default,
@@ -25601,7 +25746,9 @@ module.exports =
25601
25746
  value: function render() {
25602
25747
  var _this3 = this;
25603
25748
 
25604
- var currentPage = this.state.currentPage;
25749
+ var _state = this.state,
25750
+ currentPage = _state.currentPage,
25751
+ showApiNames = _state.showApiNames;
25605
25752
  var _props2 = this.props,
25606
25753
  steps = _props2.steps,
25607
25754
  actions = _props2.actions,
@@ -25677,7 +25824,11 @@ module.exports =
25677
25824
  accountKey: accountKey,
25678
25825
  configUrls: config,
25679
25826
  isAdmin: isAdmin,
25680
- onUpdateScenarios: _this3.props.onUpdateScenarios
25827
+ onUpdateScenarios: _this3.props.onUpdateScenarios,
25828
+ showApiNames: showApiNames,
25829
+ toggleShowApiNames: function toggleShowApiNames() {
25830
+ return _this3.setState({ showApiNames: !showApiNames });
25831
+ }
25681
25832
  })
25682
25833
  );
25683
25834
  })