@lingk/sync 1.0.44 → 1.0.46
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/credentialSections.js.map +1 -1
- package/build/css/main.css +8 -0
- package/build/lightning.js +6 -5
- package/build/lightning.js.map +1 -1
- package/build/lightningStyles.js.map +1 -1
- package/build/lingk.js +7 -6
- package/build/lingk.js.map +1 -1
- package/build/lingkStyles.js.map +1 -1
- package/build/loadData.js +24 -5
- package/build/loadData.js.map +1 -1
- package/build/main.js +304 -126
- package/build/main.js.map +1 -1
- package/build/metadataFunctions.js.map +1 -1
- package/build/reducer.js.map +1 -1
- package/build/saveData.js +21 -12
- package/build/saveData.js.map +1 -1
- package/package.json +1 -1
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
|
-
|
|
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
|
-
|
|
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
|
-
|
|
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
|
-
|
|
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
|
-
|
|
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 =
|
|
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) {
|
|
@@ -1570,12 +1580,16 @@ module.exports =
|
|
|
1570
1580
|
|
|
1571
1581
|
if (sourceResource && nestedSourceProp.property && destinationResource && destinationProperty) {
|
|
1572
1582
|
mappings = mappings.concat(Object.assign({ // add to mappings obj
|
|
1573
|
-
|
|
1583
|
+
resourceFromNameAndProvider: singleMapping.dataSourceIsDestinationEntity ? sourceResource.type + '_' + targetProvider.toLowerCase() : sourceResource.type + '_' + sourceProvider.toLowerCase(),
|
|
1574
1584
|
resourceFromName: sourceResource.type,
|
|
1575
|
-
|
|
1585
|
+
resourceFromLabel: sourceResource.name,
|
|
1586
|
+
propertyFromName: nestedSourceProp.property,
|
|
1587
|
+
propertyFromLabel: nestedSourceProp.__property
|
|
1576
1588
|
}, nestedSourceProp.parentsArray && nestedSourceProp.parentsArray.length > 0 && { propertyFromParents: nestedSourceProp.parentsArray }, {
|
|
1577
1589
|
resourceToName: destinationResource.type,
|
|
1590
|
+
resourceToLabel: destinationResource.name,
|
|
1578
1591
|
propertyToName: destinationProperty.name,
|
|
1592
|
+
propertyToLabel: destinationProperty.label,
|
|
1579
1593
|
bundleIndex: index
|
|
1580
1594
|
}, singleMapping.isExternalKeyMapping && { isExternalKeyMapping: true }, singleMapping.dataSourceIsDestinationEntity && { isDestinationResource: true }, singleMapping.isUnique && { isUnique: true }, singleMapping.transformations && singleMapping.transformations.length > 0 && !singleMapping.transformations.every(function (t) {
|
|
1581
1595
|
return t.type === 'none';
|
|
@@ -1583,9 +1597,9 @@ module.exports =
|
|
|
1583
1597
|
}
|
|
1584
1598
|
});
|
|
1585
1599
|
delete group.mappings; // remove the mapping obj from a resourceGroup
|
|
1586
|
-
|
|
1587
|
-
|
|
1588
|
-
|
|
1600
|
+
if (group.lingkSourceKey) delete group.lingkSourceKey;
|
|
1601
|
+
if (group.lingkSourceKeyObject) delete group.lingkSourceKeyObject;
|
|
1602
|
+
if (group.lingkSourceKeyParents) delete group.lingkSourceKeyParents;
|
|
1589
1603
|
}
|
|
1590
1604
|
|
|
1591
1605
|
// BUNDLES
|
|
@@ -1656,6 +1670,8 @@ module.exports =
|
|
|
1656
1670
|
return pf.val;
|
|
1657
1671
|
}) : [],
|
|
1658
1672
|
level: rsc.level || (rscIndex === 0 ? 0 : 1),
|
|
1673
|
+
// THIS ONE IS ACTUALLY PARENT LABEL AND PROVIDER!
|
|
1674
|
+
// So we know what Account to join to (if they have the same Name)
|
|
1659
1675
|
parentNameAndProvider: primaryKeyResourceLabel && primaryResourceProvider ? primaryKeyResourceLabel + '_' + primaryResourceProvider.toLowerCase() : ''
|
|
1660
1676
|
};
|
|
1661
1677
|
} else return null;
|
|
@@ -1667,6 +1683,7 @@ module.exports =
|
|
|
1667
1683
|
|
|
1668
1684
|
function findNestedProp(prop, parents, rsc) {
|
|
1669
1685
|
var property = '';
|
|
1686
|
+
var __property = '';
|
|
1670
1687
|
var parentsArray = [];
|
|
1671
1688
|
if (parents && parents.length > 0) {
|
|
1672
1689
|
(function () {
|
|
@@ -1687,19 +1704,21 @@ module.exports =
|
|
|
1687
1704
|
if (nestedRsc.properties && nestedRsc.properties.find(function (p) {
|
|
1688
1705
|
return p.label === prop;
|
|
1689
1706
|
})) {
|
|
1690
|
-
|
|
1707
|
+
var theProp = nestedRsc.properties.find(function (p) {
|
|
1691
1708
|
return p.label === prop;
|
|
1692
|
-
})
|
|
1709
|
+
});
|
|
1710
|
+
property = theProp.name;
|
|
1711
|
+
__property = theProp.label;
|
|
1693
1712
|
}
|
|
1694
1713
|
})();
|
|
1695
1714
|
} else {
|
|
1696
|
-
|
|
1697
|
-
return p.label === prop;
|
|
1698
|
-
}) && rsc.properties.find(function (p) {
|
|
1715
|
+
var theProp = prop && rsc && rsc.properties && rsc.properties.find(function (p) {
|
|
1699
1716
|
return p.label === prop;
|
|
1700
|
-
})
|
|
1717
|
+
});
|
|
1718
|
+
property = theProp.name;
|
|
1719
|
+
__property = theProp.label;
|
|
1701
1720
|
}
|
|
1702
|
-
return { property: property, parentsArray: parentsArray };
|
|
1721
|
+
return { property: property, parentsArray: parentsArray, __property: __property };
|
|
1703
1722
|
}
|
|
1704
1723
|
|
|
1705
1724
|
exports.default = saveData;
|
|
@@ -3303,6 +3322,7 @@ module.exports =
|
|
|
3303
3322
|
var rscResource = null;
|
|
3304
3323
|
var deNestedJoinKey = {};
|
|
3305
3324
|
var joinKeyResourceName = null;
|
|
3325
|
+
var __joinKeyResourceName = null;
|
|
3306
3326
|
if (dataSourceMetadata) {
|
|
3307
3327
|
rscResource = dataSourceMetadata.find(function (r) {
|
|
3308
3328
|
return r.name === rsc.resourceLabel;
|
|
@@ -3312,6 +3332,7 @@ module.exports =
|
|
|
3312
3332
|
// joinKeyName coming from parameter from another resource
|
|
3313
3333
|
deNestedJoinKey = { property: rsc.joinKeyName };
|
|
3314
3334
|
joinKeyResourceName = rsc.joinKeyResource;
|
|
3335
|
+
__joinKeyResourceName = rsc.joinKeyResource;
|
|
3315
3336
|
|
|
3316
3337
|
// joinKeyName coming from field on this resource
|
|
3317
3338
|
if (rsc.resourceName === rsc.joinKeyResource) {
|
|
@@ -3321,6 +3342,7 @@ module.exports =
|
|
|
3321
3342
|
if (joinKeyResource) {
|
|
3322
3343
|
deNestedJoinKey = deNest(rsc.joinKeyName, rsc.joinKeyParents, joinKeyResource);
|
|
3323
3344
|
joinKeyResourceName = joinKeyResource.name;
|
|
3345
|
+
__joinKeyResourceName = joinKeyResource.type;
|
|
3324
3346
|
}
|
|
3325
3347
|
}
|
|
3326
3348
|
}
|
|
@@ -3334,14 +3356,17 @@ module.exports =
|
|
|
3334
3356
|
|
|
3335
3357
|
var deNestedPrimaryKey = {};
|
|
3336
3358
|
var primaryKeyResourceName = null;
|
|
3359
|
+
var __primaryKeyResourceName = null;
|
|
3337
3360
|
if (primaryDataSourceMetadata) {
|
|
3338
3361
|
if (rsc.primaryKeyName) {
|
|
3339
3362
|
(function () {
|
|
3340
3363
|
//primaryKeyName coming from parameter (another resource)
|
|
3341
3364
|
deNestedPrimaryKey = { property: rsc.primaryKeyName };
|
|
3342
3365
|
primaryKeyResourceName = rsc.primaryKeyResource;
|
|
3366
|
+
__primaryKeyResourceName = rsc.primaryKeyResource;
|
|
3343
3367
|
|
|
3344
3368
|
// primaryKeyName coming from resource IN THIS BUNDLE
|
|
3369
|
+
// FIND ITS BY THE LABEL, NOT THE NAME!!! THIS IS HOW IT IS SAVED.
|
|
3345
3370
|
var primaryKeyResourceResource = bundle.resources.find(function (r) {
|
|
3346
3371
|
return primaryResourceName === r.resourceLabel;
|
|
3347
3372
|
});
|
|
@@ -3353,6 +3378,7 @@ module.exports =
|
|
|
3353
3378
|
if (rscPrimaryResource) {
|
|
3354
3379
|
deNestedPrimaryKey = deNest(rsc.primaryKeyName, rsc.primaryKeyParents, rscPrimaryResource);
|
|
3355
3380
|
primaryKeyResourceName = rscPrimaryResource.name;
|
|
3381
|
+
__primaryKeyResourceName = rscPrimaryResource.type;
|
|
3356
3382
|
}
|
|
3357
3383
|
}
|
|
3358
3384
|
})();
|
|
@@ -3385,8 +3411,9 @@ module.exports =
|
|
|
3385
3411
|
if (rscResource) {
|
|
3386
3412
|
resources.push(Object.assign({
|
|
3387
3413
|
name: rscResource.name,
|
|
3414
|
+
__name: rscResource.type,
|
|
3388
3415
|
provider: resourceProvider
|
|
3389
|
-
}, deNestedJoinKey.property && { joinKeyName: deNestedJoinKey.property }, joinKeyResourceName && { joinKeyResource: joinKeyResourceName }, deNestedJoinKey.parentsArray && deNestedJoinKey.parentsArray.length > 0 && { joinKeyParents: deNestedJoinKey.parentsArray }, deNestedPrimaryKey.property && { primaryKeyName: deNestedPrimaryKey.property }, primaryKeyResourceName && { primaryKeyResource: primaryKeyResourceName }, deNestedPrimaryKey.parentsArray && deNestedPrimaryKey.parentsArray.length > 0 && { primaryKeyParents: deNestedPrimaryKey.parentsArray }, {
|
|
3416
|
+
}, deNestedJoinKey.property && { joinKeyName: deNestedJoinKey.property }, deNestedJoinKey.__property && { __joinKeyName: deNestedJoinKey.__property }, joinKeyResourceName && { joinKeyResource: joinKeyResourceName }, __joinKeyResourceName && { __joinKeyResource: __joinKeyResourceName }, deNestedJoinKey.parentsArray && deNestedJoinKey.parentsArray.length > 0 && { joinKeyParents: deNestedJoinKey.parentsArray }, deNestedPrimaryKey.property && { primaryKeyName: deNestedPrimaryKey.property }, deNestedPrimaryKey.__property && { __primaryKeyName: deNestedPrimaryKey.__property }, primaryKeyResourceName && { primaryKeyResource: primaryKeyResourceName }, __primaryKeyResourceName && { __primaryKeyResource: __primaryKeyResourceName }, deNestedPrimaryKey.parentsArray && deNestedPrimaryKey.parentsArray.length > 0 && { primaryKeyParents: deNestedPrimaryKey.parentsArray }, {
|
|
3390
3417
|
joinType: rsc.joinType || 'LEFT JOIN'
|
|
3391
3418
|
}, rscResource.parentRef && { parentRef: rscResource.parentRef }, rsc.parameterFilters && { parameterFilters: rsc.parameterFilters }, {
|
|
3392
3419
|
level: rsc.level || (rscIndex === 0 ? 0 : 1)
|
|
@@ -3459,10 +3486,14 @@ module.exports =
|
|
|
3459
3486
|
if (sourceResource && sourceProperty && destinationProperty) {
|
|
3460
3487
|
mappings.push(Object.assign({
|
|
3461
3488
|
resourceFromName: sourceResource.name,
|
|
3462
|
-
|
|
3489
|
+
__resourceFromName: sourceResource.type,
|
|
3490
|
+
propertyFromName: deNestedProp.property,
|
|
3491
|
+
__propertyFromName: deNestedProp.__property
|
|
3463
3492
|
}, deNestedProp.parentsArray && deNestedProp.parentsArray.length > 0 && { propertyFromParents: deNestedProp.parentsArray }, {
|
|
3464
3493
|
resourceToName: bundleResource.name,
|
|
3465
|
-
|
|
3494
|
+
__resourceToName: bundleResource.type,
|
|
3495
|
+
propertyToName: destinationProperty.label,
|
|
3496
|
+
__propertyToName: destinationProperty.name
|
|
3466
3497
|
}, m.isDestinationResource && { dataSourceIsDestinationEntity: true }, m.isExternalKeyMapping && { isExternalKeyMapping: true }, m.isUnique && { isUnique: true }, {
|
|
3467
3498
|
transformations: transformations
|
|
3468
3499
|
}));
|
|
@@ -3470,6 +3501,7 @@ module.exports =
|
|
|
3470
3501
|
}); // end wizard.savedMappings.forEach
|
|
3471
3502
|
resourceGroups.push(Object.assign({
|
|
3472
3503
|
name: bundleResource.name,
|
|
3504
|
+
__name: bundleResource.type,
|
|
3473
3505
|
resources: resources, mappings: mappings,
|
|
3474
3506
|
customExternalKeys: bundle.customExternalKeys || false
|
|
3475
3507
|
}, bundle.customExternalKeys === true && { sourceKeys: sourceKeys, sourceKeysObjects: sourceKeysObjects, sourceKeysParents: sourceKeysParents, destinationKeys: destinationKeys }, bundle.customExternalKeys === false && { lingkSourceKey: sourceKeys[0], lingkSourceKeyObject: sourceKeysObjects[0],
|
|
@@ -3488,6 +3520,7 @@ module.exports =
|
|
|
3488
3520
|
|
|
3489
3521
|
function deNest(prop, parents, rsc) {
|
|
3490
3522
|
var property = '';
|
|
3523
|
+
var __property = '';
|
|
3491
3524
|
var parentsArray = [];
|
|
3492
3525
|
if (rsc) {
|
|
3493
3526
|
if (parents && parents.length > 0) {
|
|
@@ -3507,6 +3540,7 @@ module.exports =
|
|
|
3507
3540
|
});
|
|
3508
3541
|
if (sourceKeyProperty) {
|
|
3509
3542
|
property = sourceKeyProperty.label;
|
|
3543
|
+
__property = sourceKeyProperty.name;
|
|
3510
3544
|
}
|
|
3511
3545
|
})();
|
|
3512
3546
|
} else {
|
|
@@ -3515,11 +3549,15 @@ module.exports =
|
|
|
3515
3549
|
});
|
|
3516
3550
|
if (sourceKeyProperty) {
|
|
3517
3551
|
property = sourceKeyProperty.label;
|
|
3552
|
+
__property = sourceKeyProperty.name;
|
|
3518
3553
|
}
|
|
3519
3554
|
}
|
|
3520
3555
|
}
|
|
3521
|
-
if (prop === 'Lingk_External_Id__c')
|
|
3522
|
-
|
|
3556
|
+
if (prop === 'Lingk_External_Id__c') {
|
|
3557
|
+
property = 'Lingk External Id';
|
|
3558
|
+
__property = prop;
|
|
3559
|
+
}
|
|
3560
|
+
return { property: property, parentsArray: parentsArray, __property: __property };
|
|
3523
3561
|
}
|
|
3524
3562
|
|
|
3525
3563
|
exports.default = loadData;
|
|
@@ -14501,7 +14539,9 @@ module.exports =
|
|
|
14501
14539
|
inputs = _props3.inputs,
|
|
14502
14540
|
step = _props3.step,
|
|
14503
14541
|
sourceSchema = _props3.sourceSchema,
|
|
14504
|
-
direction = _props3.direction
|
|
14542
|
+
direction = _props3.direction,
|
|
14543
|
+
showApiNames = _props3.showApiNames,
|
|
14544
|
+
toggleShowApiNames = _props3.toggleShowApiNames;
|
|
14505
14545
|
var _state = this.state,
|
|
14506
14546
|
resourceGroupIndex = _state.resourceGroupIndex,
|
|
14507
14547
|
paneToggle = _state.paneToggle,
|
|
@@ -14571,7 +14611,8 @@ module.exports =
|
|
|
14571
14611
|
'div',
|
|
14572
14612
|
{ style: { zIndex: 99 } },
|
|
14573
14613
|
_react2.default.createElement(_selectWrapper2.default, { label: "Add Data Target", type: 'brand',
|
|
14574
|
-
style: { height: 40, width: 160 }, minWidth: 260,
|
|
14614
|
+
style: { height: 40, width: 160 }, minWidth: 260,
|
|
14615
|
+
fieldPropLabel: 'name', fieldPropType: 'type', showApiNames: showApiNames,
|
|
14575
14616
|
onSelect: this.addDefaultResourceGroup,
|
|
14576
14617
|
values: newTargetObjectMetadata,
|
|
14577
14618
|
title: 'Available Target Objects', inputs: inputs, sectionLabelSuffix: 'Objects',
|
|
@@ -14605,6 +14646,21 @@ module.exports =
|
|
|
14605
14646
|
'Top One'
|
|
14606
14647
|
)
|
|
14607
14648
|
) : null,
|
|
14649
|
+
resourceGroups && resourceGroups.length > 0 && _react2.default.createElement(
|
|
14650
|
+
'div',
|
|
14651
|
+
{
|
|
14652
|
+
style: { position: 'absolute', right: style.width - 717, top: 0, zIndex: 999, width: 100 } },
|
|
14653
|
+
_react2.default.createElement(
|
|
14654
|
+
'div',
|
|
14655
|
+
{ className: 'labelz' },
|
|
14656
|
+
'Labels:'
|
|
14657
|
+
),
|
|
14658
|
+
_react2.default.createElement(
|
|
14659
|
+
'div',
|
|
14660
|
+
{ className: 'show-label-or-api-names', onClick: toggleShowApiNames },
|
|
14661
|
+
showApiNames ? 'System Names' : 'Friendly Names'
|
|
14662
|
+
)
|
|
14663
|
+
),
|
|
14608
14664
|
resourceGroups && resourceGroups.length > 0 && _react2.default.createElement(
|
|
14609
14665
|
'div',
|
|
14610
14666
|
null,
|
|
@@ -14648,7 +14704,7 @@ module.exports =
|
|
|
14648
14704
|
return _react2.default.createElement(
|
|
14649
14705
|
'div',
|
|
14650
14706
|
{ className: 'schema-group-name', key: i },
|
|
14651
|
-
g.name
|
|
14707
|
+
showApiNames && g.__name ? g.__name : g.name
|
|
14652
14708
|
);
|
|
14653
14709
|
})
|
|
14654
14710
|
)
|
|
@@ -18461,13 +18517,16 @@ module.exports =
|
|
|
18461
18517
|
})*/
|
|
18462
18518
|
|
|
18463
18519
|
var groupName = group.name;
|
|
18520
|
+
if (_this3.props.showApiNames && group.__name) {
|
|
18521
|
+
groupName = group.__name;
|
|
18522
|
+
}
|
|
18464
18523
|
if (isReverse) {
|
|
18465
18524
|
if (group.provider.toLowerCase() === step.destinationProvider.toLowerCase()) {
|
|
18466
|
-
groupName =
|
|
18525
|
+
groupName = groupName + ' (' + step.destinationProvider + ')';
|
|
18467
18526
|
}
|
|
18468
18527
|
} else {
|
|
18469
18528
|
if (group.provider.toLowerCase() === step.sourceProvider.toLowerCase()) {
|
|
18470
|
-
groupName =
|
|
18529
|
+
groupName = groupName + ' (' + step.sourceProvider + ')';
|
|
18471
18530
|
}
|
|
18472
18531
|
}
|
|
18473
18532
|
|
|
@@ -18508,13 +18567,16 @@ module.exports =
|
|
|
18508
18567
|
textOverflow: 'ellipsis', maxWidth: 'calc(100% - 32px)', whiteSpace: 'nowrap' } },
|
|
18509
18568
|
group.resources && group.resources.map(function (rsc, ii) {
|
|
18510
18569
|
var rscName = rsc.name;
|
|
18570
|
+
if (_this3.props.showApiNames && rsc.__name) {
|
|
18571
|
+
rscName = rsc.__name;
|
|
18572
|
+
}
|
|
18511
18573
|
if (isReverse) {
|
|
18512
18574
|
if (rsc.provider.toLowerCase() === step.sourceProvider.toLowerCase()) {
|
|
18513
|
-
rscName =
|
|
18575
|
+
rscName = rscName + ' (' + step.sourceProvider + ')';
|
|
18514
18576
|
}
|
|
18515
18577
|
} else {
|
|
18516
18578
|
if (rsc.provider.toLowerCase() === step.destinationProvider.toLowerCase()) {
|
|
18517
|
-
rscName =
|
|
18579
|
+
rscName = rscName + ' (' + step.destinationProvider + ')';
|
|
18518
18580
|
}
|
|
18519
18581
|
}
|
|
18520
18582
|
return _react2.default.createElement(
|
|
@@ -18630,7 +18692,8 @@ module.exports =
|
|
|
18630
18692
|
sourceSchema = props.sourceSchema,
|
|
18631
18693
|
destinationSchema = props.destinationSchema,
|
|
18632
18694
|
change = props.change,
|
|
18633
|
-
direction = props.direction
|
|
18695
|
+
direction = props.direction,
|
|
18696
|
+
showApiNames = props.showApiNames;
|
|
18634
18697
|
|
|
18635
18698
|
var Modal = inputs.Modal;
|
|
18636
18699
|
var Button = inputs.Button;
|
|
@@ -18651,9 +18714,13 @@ module.exports =
|
|
|
18651
18714
|
var map = Object.assign({
|
|
18652
18715
|
isExternalKeyMapping: true,
|
|
18653
18716
|
resourceFromName: group.sourceKeysObjects[i],
|
|
18717
|
+
__resourceFromName: group.__sourceKeysObjects[i],
|
|
18654
18718
|
propertyFromName: sk,
|
|
18719
|
+
__propertyFromName: group.__sourceKeys[i],
|
|
18655
18720
|
resourceToName: group.name,
|
|
18721
|
+
__resourceToName: group.__name,
|
|
18656
18722
|
propertyToName: group.destinationKeys[i],
|
|
18723
|
+
__propertyToName: group.__destinationKeys[i],
|
|
18657
18724
|
propertyFromParents: group.sourceKeysParents[i]
|
|
18658
18725
|
}, rsc.provider.toLowerCase() === step.destinationProvider.toLowerCase() && { dataSourceIsDestinationEntity: true });
|
|
18659
18726
|
group.mappings = group.mappings || [];
|
|
@@ -18668,10 +18735,14 @@ module.exports =
|
|
|
18668
18735
|
var map = Object.assign({
|
|
18669
18736
|
isExternalKeyMapping: true,
|
|
18670
18737
|
resourceFromName: group.lingkSourceKeyObject,
|
|
18738
|
+
__resourceFromName: group.__lingkSourceKeyObject,
|
|
18671
18739
|
propertyFromParents: group.lingkSourceKeyParents,
|
|
18672
18740
|
propertyFromName: group.lingkSourceKey,
|
|
18741
|
+
__propertyFromName: group.__lingkSourceKey,
|
|
18673
18742
|
resourceToName: group.name,
|
|
18674
|
-
|
|
18743
|
+
__resourceToName: group.__name,
|
|
18744
|
+
propertyToName: 'Lingk External Id',
|
|
18745
|
+
__propertyToName: 'Lingk_External_Id__c'
|
|
18675
18746
|
}, rsc.provider.toLowerCase() === step.destinationProvider.toLowerCase() && { dataSourceIsDestinationEntity: true });
|
|
18676
18747
|
group.mappings = group.mappings || [];
|
|
18677
18748
|
group.mappings.push(map);
|
|
@@ -18712,8 +18783,10 @@ module.exports =
|
|
|
18712
18783
|
var selectSourceKeyForLingk = function selectSourceKeyForLingk(key, i, field) {
|
|
18713
18784
|
var rgs = [].concat(_toConsumableArray(resourceGroups));
|
|
18714
18785
|
var group = rgs[bundleIndex];
|
|
18715
|
-
group.lingkSourceKey =
|
|
18786
|
+
group.lingkSourceKey = field.label;
|
|
18787
|
+
group.__lingkSourceKey = field.name;
|
|
18716
18788
|
group.lingkSourceKeyObject = field.section;
|
|
18789
|
+
group.__lingkSourceKeyObject = field.__section;
|
|
18717
18790
|
group.lingkSourceKeyParents = field.parents;
|
|
18718
18791
|
change('resourceGroups', rgs);
|
|
18719
18792
|
props.update();
|
|
@@ -18724,13 +18797,17 @@ module.exports =
|
|
|
18724
18797
|
var group = rgs[bundleIndex];
|
|
18725
18798
|
if (i === 0) {
|
|
18726
18799
|
// create array
|
|
18727
|
-
group.sourceKeys = [
|
|
18800
|
+
group.sourceKeys = [field.label];
|
|
18801
|
+
group.__sourceKeys = [field.name];
|
|
18728
18802
|
group.sourceKeysObjects = [field.section];
|
|
18803
|
+
group.__sourceKeysObjects = [field.__section];
|
|
18729
18804
|
group.sourceKeysParents = [field.parents];
|
|
18730
18805
|
} else {
|
|
18731
18806
|
// add to array
|
|
18732
|
-
group.sourceKeys[i] =
|
|
18807
|
+
group.sourceKeys[i] = field.label;
|
|
18808
|
+
group.__sourceKeys[i] = field.name;
|
|
18733
18809
|
group.sourceKeysObjects[i] = field.section;
|
|
18810
|
+
group.__sourceKeysObjects[i] = field.__section;
|
|
18734
18811
|
group.sourceKeysParents[i] = field.parents;
|
|
18735
18812
|
}
|
|
18736
18813
|
change('resourceGroups', rgs);
|
|
@@ -18741,10 +18818,12 @@ module.exports =
|
|
|
18741
18818
|
var rgs = [].concat(_toConsumableArray(resourceGroups));
|
|
18742
18819
|
var group = rgs[bundleIndex];
|
|
18743
18820
|
if (i === 0) {
|
|
18744
|
-
group.destinationKeys = [
|
|
18821
|
+
group.destinationKeys = [field.label];
|
|
18822
|
+
group.__destinationKeys = [field.name];
|
|
18745
18823
|
group.destinationKeysParents = [field.parents];
|
|
18746
18824
|
} else {
|
|
18747
|
-
group.destinationKeys[i] =
|
|
18825
|
+
group.destinationKeys[i] = field.label;
|
|
18826
|
+
group.__destinationKeys[i] = field.name;
|
|
18748
18827
|
group.destinationKeysParents[i] = field.parents;
|
|
18749
18828
|
}
|
|
18750
18829
|
change('resourceGroups', rgs);
|
|
@@ -18755,9 +18834,11 @@ module.exports =
|
|
|
18755
18834
|
var group = rgs[bundleIndex];
|
|
18756
18835
|
|
|
18757
18836
|
var sectionLabels = [];
|
|
18837
|
+
var sectionTypes = [];
|
|
18758
18838
|
var sectionProviders = [];
|
|
18759
18839
|
var vals = bundle.resources.map(function (br, i) {
|
|
18760
18840
|
sectionLabels.push(br.name);
|
|
18841
|
+
sectionTypes.push(br.__name);
|
|
18761
18842
|
sectionProviders.push(br.provider);
|
|
18762
18843
|
return bundle.resources[i].provider.toLowerCase() === step.destinationProvider.toLowerCase() ? destinationSchema && destinationSchema.find(function (defaultRsc) {
|
|
18763
18844
|
return defaultRsc.name === bundle.resources[i].name;
|
|
@@ -18860,6 +18941,15 @@ module.exports =
|
|
|
18860
18941
|
sourceLabel += sk;
|
|
18861
18942
|
}
|
|
18862
18943
|
|
|
18944
|
+
if (showApiNames && group.__sourceKeys && group.__sourceKeys[i]) {
|
|
18945
|
+
sourceLabel = group.__sourceKeys[i];
|
|
18946
|
+
}
|
|
18947
|
+
|
|
18948
|
+
var destinationLabel = group.destinationKeys && group.destinationKeys[i];
|
|
18949
|
+
if (showApiNames && group.__destinationKeys && group.__destinationKeys[i]) {
|
|
18950
|
+
destinationLabel = group.__destinationKeys[i];
|
|
18951
|
+
}
|
|
18952
|
+
|
|
18863
18953
|
return _react2.default.createElement(
|
|
18864
18954
|
'div',
|
|
18865
18955
|
{ className: 'external-keys-row', key: i },
|
|
@@ -18870,15 +18960,16 @@ module.exports =
|
|
|
18870
18960
|
onSelect: function onSelect(v, iii, field) {
|
|
18871
18961
|
return selectCustomSourceKey(v, i, field);
|
|
18872
18962
|
},
|
|
18873
|
-
inputs: inputs,
|
|
18874
|
-
|
|
18875
|
-
|
|
18963
|
+
inputs: inputs, values: vals, type: 'brand',
|
|
18964
|
+
fieldPropLabel: 'label', fieldPropType: 'name',
|
|
18965
|
+
sectionLabels: sectionLabels, sectionTypes: sectionTypes,
|
|
18876
18966
|
selectedValues: group.sourceKeys && [{
|
|
18877
18967
|
label: group.sourceKeys && group.sourceKeys[i],
|
|
18878
18968
|
parents: group.sourceKeysParents && group.sourceKeysParents[i],
|
|
18879
18969
|
section: group.sourceKeysObjects && group.sourceKeysObjects[i]
|
|
18880
18970
|
}],
|
|
18881
|
-
sectionLabelSuffix: 'Fields'
|
|
18971
|
+
sectionLabelSuffix: 'Fields',
|
|
18972
|
+
showApiNames: showApiNames
|
|
18882
18973
|
})
|
|
18883
18974
|
),
|
|
18884
18975
|
_react2.default.createElement(
|
|
@@ -18889,18 +18980,19 @@ module.exports =
|
|
|
18889
18980
|
_react2.default.createElement(
|
|
18890
18981
|
'div',
|
|
18891
18982
|
{ className: 'external-keys-column' },
|
|
18892
|
-
_react2.default.createElement(_selectWrapper2.default, { label:
|
|
18983
|
+
_react2.default.createElement(_selectWrapper2.default, { label: destinationLabel || 'Choose Key',
|
|
18893
18984
|
onSelect: function onSelect(v, iii, field) {
|
|
18894
18985
|
return selectCustomDestinationKey(v, i, field);
|
|
18895
18986
|
},
|
|
18896
|
-
type: 'brand', inputs: inputs,
|
|
18897
|
-
|
|
18898
|
-
|
|
18987
|
+
type: 'brand', inputs: inputs, values: destinationVals,
|
|
18988
|
+
sectionLabels: [bundle.name], sectionTypes: [bundle.__name],
|
|
18989
|
+
fieldPropLabel: 'label', fieldPropType: 'name',
|
|
18899
18990
|
selectedValues: group.destinationKeys && [{
|
|
18900
18991
|
label: group.destinationKeys && group.destinationKeys[i],
|
|
18901
18992
|
parents: group.destinationKeysParents && group.destinationKeysParents[i]
|
|
18902
18993
|
}],
|
|
18903
|
-
sectionLabelSuffix: 'Fields'
|
|
18994
|
+
sectionLabelSuffix: 'Fields',
|
|
18995
|
+
showApiNames: showApiNames
|
|
18904
18996
|
})
|
|
18905
18997
|
),
|
|
18906
18998
|
i !== 0 && _react2.default.createElement(
|
|
@@ -18947,6 +19039,10 @@ module.exports =
|
|
|
18947
19039
|
sourceLabel += group.lingkSourceKey;
|
|
18948
19040
|
}
|
|
18949
19041
|
|
|
19042
|
+
if (showApiNames && group.__lingkSourceKey) {
|
|
19043
|
+
sourceLabel = group.__lingkSourceKey;
|
|
19044
|
+
}
|
|
19045
|
+
|
|
18950
19046
|
return _react2.default.createElement(
|
|
18951
19047
|
'div',
|
|
18952
19048
|
{ key: 'one' },
|
|
@@ -18993,15 +19089,16 @@ module.exports =
|
|
|
18993
19089
|
onSelect: function onSelect(v, i, field) {
|
|
18994
19090
|
return selectSourceKeyForLingk(v, i, field);
|
|
18995
19091
|
},
|
|
18996
|
-
type: 'brand', inputs: inputs,
|
|
18997
|
-
|
|
18998
|
-
fieldPropLabel: 'label',
|
|
19092
|
+
type: 'brand', inputs: inputs, values: vals,
|
|
19093
|
+
sectionLabels: sectionLabels, sectionTypes: sectionTypes,
|
|
19094
|
+
fieldPropLabel: 'label', fieldPropType: 'name',
|
|
18999
19095
|
selectedValues: [{
|
|
19000
19096
|
label: group.lingkSourceKey,
|
|
19001
19097
|
parents: group.lingkSourceKeyParents,
|
|
19002
19098
|
section: group.lingkSourceKeyObject
|
|
19003
19099
|
}],
|
|
19004
|
-
sectionLabelSuffix: 'Fields'
|
|
19100
|
+
sectionLabelSuffix: 'Fields',
|
|
19101
|
+
showApiNames: showApiNames
|
|
19005
19102
|
})
|
|
19006
19103
|
),
|
|
19007
19104
|
_react2.default.createElement(
|
|
@@ -19012,7 +19109,7 @@ module.exports =
|
|
|
19012
19109
|
_react2.default.createElement(
|
|
19013
19110
|
'div',
|
|
19014
19111
|
{ className: 'external-keys-column' },
|
|
19015
|
-
'Lingk External ID'
|
|
19112
|
+
showApiNames ? 'Lingk_External_Id__c' : 'Lingk External ID'
|
|
19016
19113
|
)
|
|
19017
19114
|
)
|
|
19018
19115
|
);
|
|
@@ -19071,7 +19168,6 @@ module.exports =
|
|
|
19071
19168
|
|
|
19072
19169
|
_this.state = {
|
|
19073
19170
|
selectedField: null,
|
|
19074
|
-
selectedFieldParents: null,
|
|
19075
19171
|
customFieldValue: '',
|
|
19076
19172
|
addNewButtonText: 'Add New',
|
|
19077
19173
|
setDuplicateRules: false,
|
|
@@ -19168,6 +19264,7 @@ module.exports =
|
|
|
19168
19264
|
}, {
|
|
19169
19265
|
key: 'onSelectDestinationField',
|
|
19170
19266
|
value: function onSelectDestinationField(group, field, format) {
|
|
19267
|
+
//group.name, field.label, field.format
|
|
19171
19268
|
var _props2 = this.props,
|
|
19172
19269
|
change = _props2.change,
|
|
19173
19270
|
formValues = _props2.formValues,
|
|
@@ -19175,36 +19272,41 @@ module.exports =
|
|
|
19175
19272
|
resourceGroupIndex = _props2.resourceGroupIndex;
|
|
19176
19273
|
|
|
19177
19274
|
var selectedEntity = selectedEntities[resourceGroupIndex];
|
|
19178
|
-
if (this.state.selectedField) {
|
|
19275
|
+
if (this.state.selectedField && this.state.selectedField.label) {
|
|
19179
19276
|
var resourceGroups = [].concat(_toConsumableArray(formValues['resourceGroups']));
|
|
19180
19277
|
var rscGroup = resourceGroups[resourceGroupIndex];
|
|
19181
19278
|
|
|
19182
19279
|
//cant overwrite externalKey mapping
|
|
19183
19280
|
if (rscGroup.mappings && rscGroup.mappings.find(function (m) {
|
|
19184
|
-
return m && m.propertyToName === field && m.isExternalKeyMapping;
|
|
19281
|
+
return m && m.propertyToName === field.label && m.isExternalKeyMapping;
|
|
19185
19282
|
})) return;
|
|
19186
19283
|
|
|
19187
19284
|
var transform = 'none';
|
|
19188
|
-
if (format) {
|
|
19189
|
-
if (format === 'date-time') {
|
|
19285
|
+
if (field.format) {
|
|
19286
|
+
if (field.format === 'date-time') {
|
|
19190
19287
|
transform = 'date';
|
|
19191
19288
|
}
|
|
19192
19289
|
}
|
|
19290
|
+
|
|
19193
19291
|
//cant map multiple to same destination field
|
|
19194
19292
|
rscGroup.mappings = rscGroup.mappings && rscGroup.mappings.filter(function (m) {
|
|
19195
|
-
return m.propertyToName !== field;
|
|
19293
|
+
return m.propertyToName !== field.label;
|
|
19196
19294
|
}) || [];
|
|
19197
19295
|
rscGroup.mappings.push({
|
|
19198
19296
|
resourceFromName: selectedEntity.name,
|
|
19199
|
-
|
|
19200
|
-
|
|
19201
|
-
|
|
19202
|
-
|
|
19297
|
+
__resourceFromName: selectedEntity.__name,
|
|
19298
|
+
resourceToName: group.name,
|
|
19299
|
+
__resourceToName: group.__name,
|
|
19300
|
+
propertyFromName: this.state.selectedField.label,
|
|
19301
|
+
__propertyFromName: this.state.selectedField.name,
|
|
19302
|
+
propertyFromParents: this.state.selectedField.parents,
|
|
19303
|
+
propertyToName: field.label,
|
|
19304
|
+
__propertyToName: field.name,
|
|
19203
19305
|
transformations: [{ type: transform }],
|
|
19204
19306
|
dataSourceIsDestinationEntity: selectedEntity.isDestinationEntity
|
|
19205
19307
|
});
|
|
19206
19308
|
change('resourceGroups', resourceGroups);
|
|
19207
|
-
this.setState({ selectedField:
|
|
19309
|
+
this.setState({ selectedField: {} });
|
|
19208
19310
|
this.props.update();
|
|
19209
19311
|
this.props.disableMultiple();
|
|
19210
19312
|
}
|
|
@@ -19225,10 +19327,9 @@ module.exports =
|
|
|
19225
19327
|
toggle = _props3.toggle,
|
|
19226
19328
|
step = _props3.step,
|
|
19227
19329
|
customizingGroup = _props3.customizingGroup,
|
|
19228
|
-
inputs = _props3.inputs
|
|
19229
|
-
|
|
19230
|
-
|
|
19231
|
-
selectedFieldParents = _state.selectedFieldParents;
|
|
19330
|
+
inputs = _props3.inputs,
|
|
19331
|
+
showApiNames = _props3.showApiNames;
|
|
19332
|
+
var selectedField = this.state.selectedField;
|
|
19232
19333
|
|
|
19233
19334
|
var Button = inputs.Button;
|
|
19234
19335
|
var Input = inputs.Input;
|
|
@@ -19297,13 +19398,16 @@ module.exports =
|
|
|
19297
19398
|
var isSelected = selectedEntity.name === rsc.name && selectedEntity.isDestinationEntity === isDestinationEntity;
|
|
19298
19399
|
|
|
19299
19400
|
var rscName = rsc.name;
|
|
19401
|
+
if (showApiNames && rsc.__name) {
|
|
19402
|
+
rscName = rsc.__name;
|
|
19403
|
+
}
|
|
19300
19404
|
if (isReverse) {
|
|
19301
19405
|
if (rsc.provider.toLowerCase() === step.sourceProvider.toLowerCase()) {
|
|
19302
|
-
rscName =
|
|
19406
|
+
rscName = rscName + ' (' + step.sourceProvider + ')';
|
|
19303
19407
|
}
|
|
19304
19408
|
} else {
|
|
19305
19409
|
if (rsc.provider.toLowerCase() === step.destinationProvider.toLowerCase()) {
|
|
19306
|
-
rscName =
|
|
19410
|
+
rscName = rscName + ' (' + step.destinationProvider + ')';
|
|
19307
19411
|
}
|
|
19308
19412
|
}
|
|
19309
19413
|
|
|
@@ -19318,9 +19422,10 @@ module.exports =
|
|
|
19318
19422
|
_this4.scrollToTop(_this4['scroller-' + ii], 18, i * 43 + 6);
|
|
19319
19423
|
_this4.props.pickEntity({
|
|
19320
19424
|
name: rsc.name,
|
|
19425
|
+
__name: rsc.__name,
|
|
19321
19426
|
isDestinationEntity: rsc.provider.toLowerCase() === step.destinationProvider.toLowerCase()
|
|
19322
19427
|
});
|
|
19323
|
-
_this4.setState({ selectedField:
|
|
19428
|
+
_this4.setState({ selectedField: {} });
|
|
19324
19429
|
}
|
|
19325
19430
|
},
|
|
19326
19431
|
_react2.default.createElement(
|
|
@@ -19354,16 +19459,21 @@ module.exports =
|
|
|
19354
19459
|
}).map(function (field, ii) {
|
|
19355
19460
|
return _react2.default.createElement(_nestedField2.default, { key: ii, field: field,
|
|
19356
19461
|
selectedField: selectedField,
|
|
19357
|
-
selectedFieldParents: selectedFieldParents,
|
|
19358
19462
|
filteredMappings: filteredMappings, parents: [],
|
|
19359
19463
|
onExpand: function onExpand(expanded) {
|
|
19360
19464
|
return _this4.setState({ expanded: expanded });
|
|
19361
19465
|
},
|
|
19362
|
-
click: function click(
|
|
19466
|
+
click: function click(field, parents) {
|
|
19363
19467
|
return _this4.setState({
|
|
19364
|
-
selectedField:
|
|
19468
|
+
selectedField: {
|
|
19469
|
+
label: field.label,
|
|
19470
|
+
name: field.name,
|
|
19471
|
+
parents: parents
|
|
19472
|
+
}
|
|
19365
19473
|
});
|
|
19366
|
-
}, expanded: _this4.state.expanded
|
|
19474
|
+
}, expanded: _this4.state.expanded,
|
|
19475
|
+
showApiNames: showApiNames
|
|
19476
|
+
});
|
|
19367
19477
|
}),
|
|
19368
19478
|
_react2.default.createElement('div', { style: { height: 9 } })
|
|
19369
19479
|
)
|
|
@@ -19432,17 +19542,18 @@ module.exports =
|
|
|
19432
19542
|
return !p.readOnly;
|
|
19433
19543
|
}).map(function (field, i) {
|
|
19434
19544
|
var isMapped = mappings && Object.keys(mappings).includes(field.label);
|
|
19545
|
+
var title = showApiNames ? field.name : field.label;
|
|
19435
19546
|
return _react2.default.createElement(
|
|
19436
19547
|
'div',
|
|
19437
19548
|
{ key: i,
|
|
19438
|
-
className: selectedField ? "wizard-map-field" : '',
|
|
19549
|
+
className: selectedField && selectedField.label ? "wizard-map-field" : '',
|
|
19439
19550
|
style: { paddingLeft: 5, width: 335,
|
|
19440
19551
|
fontWeight: isMapped ? 'bold' : 'normal',
|
|
19441
|
-
color: isMapped ? '#16325c' : selectedField ? 'black' : 'grey'
|
|
19552
|
+
color: isMapped ? '#16325c' : selectedField && selectedField.label ? 'black' : 'grey'
|
|
19442
19553
|
}, onClick: function onClick() {
|
|
19443
|
-
return _this4.onSelectDestinationField(group
|
|
19554
|
+
return _this4.onSelectDestinationField(group, field);
|
|
19444
19555
|
} },
|
|
19445
|
-
|
|
19556
|
+
title,
|
|
19446
19557
|
' ',
|
|
19447
19558
|
field.required ? '*' : ''
|
|
19448
19559
|
);
|
|
@@ -19499,7 +19610,8 @@ module.exports =
|
|
|
19499
19610
|
var MapTableSourceRow = exports.MapTableSourceRow = function MapTableSourceRow(props) {
|
|
19500
19611
|
var group = props.group,
|
|
19501
19612
|
step = props.step,
|
|
19502
|
-
isReverse = props.isReverse
|
|
19613
|
+
isReverse = props.isReverse,
|
|
19614
|
+
showApiNames = props.showApiNames;
|
|
19503
19615
|
|
|
19504
19616
|
return _react2.default.createElement(
|
|
19505
19617
|
'div',
|
|
@@ -19515,13 +19627,16 @@ module.exports =
|
|
|
19515
19627
|
var fieldNum = mapz ? mapz.length : 0;
|
|
19516
19628
|
|
|
19517
19629
|
var rscName = rsc.name;
|
|
19630
|
+
if (showApiNames && rsc.__name) {
|
|
19631
|
+
rscName = rsc.__name;
|
|
19632
|
+
}
|
|
19518
19633
|
if (isReverse) {
|
|
19519
19634
|
if (rsc.provider.toLowerCase() === step.sourceProvider.toLowerCase()) {
|
|
19520
|
-
rscName =
|
|
19635
|
+
rscName = rscName + ' (' + step.sourceProvider + ')';
|
|
19521
19636
|
}
|
|
19522
19637
|
} else {
|
|
19523
19638
|
if (rsc.provider.toLowerCase() === step.destinationProvider.toLowerCase()) {
|
|
19524
|
-
rscName =
|
|
19639
|
+
rscName = rscName + ' (' + step.destinationProvider + ')';
|
|
19525
19640
|
}
|
|
19526
19641
|
}
|
|
19527
19642
|
|
|
@@ -19545,7 +19660,8 @@ module.exports =
|
|
|
19545
19660
|
var MapTableMappingRow = exports.MapTableMappingRow = function MapTableMappingRow(props) {
|
|
19546
19661
|
var group = props.group,
|
|
19547
19662
|
i = props.i,
|
|
19548
|
-
clearMapping = props.clearMapping
|
|
19663
|
+
clearMapping = props.clearMapping,
|
|
19664
|
+
showApiNames = props.showApiNames;
|
|
19549
19665
|
|
|
19550
19666
|
return _react2.default.createElement(
|
|
19551
19667
|
'div',
|
|
@@ -19571,6 +19687,14 @@ module.exports =
|
|
|
19571
19687
|
});
|
|
19572
19688
|
}
|
|
19573
19689
|
fromString += m.propertyFromName;
|
|
19690
|
+
if (showApiNames && m.__propertyFromName) {
|
|
19691
|
+
fromString = m.__propertyFromName;
|
|
19692
|
+
}
|
|
19693
|
+
|
|
19694
|
+
var toStr = m.propertyToName;
|
|
19695
|
+
if (showApiNames && m.__propertyToName) {
|
|
19696
|
+
toStr = m.__propertyToName;
|
|
19697
|
+
}
|
|
19574
19698
|
return _react2.default.createElement(
|
|
19575
19699
|
'div',
|
|
19576
19700
|
{ key: iv, style: { height: 19, minWidth: 220, whiteSpace: 'nowrap' } },
|
|
@@ -19585,7 +19709,7 @@ module.exports =
|
|
|
19585
19709
|
_react2.default.createElement(
|
|
19586
19710
|
'div',
|
|
19587
19711
|
{ className: 'mapping-entry' },
|
|
19588
|
-
fromString + ' \u2192 ' +
|
|
19712
|
+
fromString + ' \u2192 ' + toStr
|
|
19589
19713
|
)
|
|
19590
19714
|
);
|
|
19591
19715
|
})
|
|
@@ -19597,7 +19721,8 @@ module.exports =
|
|
|
19597
19721
|
var MapTableTransformRow = exports.MapTableTransformRow = function MapTableTransformRow(props) {
|
|
19598
19722
|
var group = props.group,
|
|
19599
19723
|
i = props.i,
|
|
19600
|
-
selectMapping = props.selectMapping
|
|
19724
|
+
selectMapping = props.selectMapping,
|
|
19725
|
+
showApiNames = props.showApiNames;
|
|
19601
19726
|
|
|
19602
19727
|
var icons = {
|
|
19603
19728
|
none: _react2.default.createElement(
|
|
@@ -19716,17 +19841,21 @@ module.exports =
|
|
|
19716
19841
|
var MapTableDestinationRow = exports.MapTableDestinationRow = function MapTableDestinationRow(_ref) {
|
|
19717
19842
|
var group = _ref.group,
|
|
19718
19843
|
step = _ref.step,
|
|
19719
|
-
isReverse = _ref.isReverse
|
|
19844
|
+
isReverse = _ref.isReverse,
|
|
19845
|
+
showApiNames = _ref.showApiNames;
|
|
19720
19846
|
|
|
19721
19847
|
|
|
19722
19848
|
var groupName = group.name;
|
|
19849
|
+
if (showApiNames && group.__name) {
|
|
19850
|
+
groupName = group.__name;
|
|
19851
|
+
}
|
|
19723
19852
|
if (isReverse) {
|
|
19724
19853
|
if (group.provider.toLowerCase() === step.destinationProvider.toLowerCase()) {
|
|
19725
|
-
groupName =
|
|
19854
|
+
groupName = groupName + ' (' + step.destinationProvider + ')';
|
|
19726
19855
|
}
|
|
19727
19856
|
} else {
|
|
19728
19857
|
if (group.provider.toLowerCase() === step.sourceProvider.toLowerCase()) {
|
|
19729
|
-
groupName =
|
|
19858
|
+
groupName = groupName + ' (' + step.sourceProvider + ')';
|
|
19730
19859
|
}
|
|
19731
19860
|
}
|
|
19732
19861
|
|
|
@@ -20168,7 +20297,8 @@ module.exports =
|
|
|
20168
20297
|
showOverflow = _props3.showOverflow,
|
|
20169
20298
|
step = _props3.step,
|
|
20170
20299
|
isReverse = _props3.isReverse,
|
|
20171
|
-
changeEntityLevel = _props3.changeEntityLevel
|
|
20300
|
+
changeEntityLevel = _props3.changeEntityLevel,
|
|
20301
|
+
showApiNames = _props3.showApiNames;
|
|
20172
20302
|
var parameterModalResourceIndex = this.state.parameterModalResourceIndex;
|
|
20173
20303
|
|
|
20174
20304
|
|
|
@@ -20267,6 +20397,7 @@ module.exports =
|
|
|
20267
20397
|
var primaryResource = null;
|
|
20268
20398
|
var primaryRscVals = null;
|
|
20269
20399
|
var primaryRscSectionLabels = null;
|
|
20400
|
+
var primaryRscSectionTypes = null;
|
|
20270
20401
|
|
|
20271
20402
|
if (rsc.parentNameAndProvider) {
|
|
20272
20403
|
primaryResource = group.resources.find(function (gr) {
|
|
@@ -20288,6 +20419,7 @@ module.exports =
|
|
|
20288
20419
|
});
|
|
20289
20420
|
|
|
20290
20421
|
primaryRscSectionLabels = [primaryResource.name];
|
|
20422
|
+
primaryRscSectionTypes = [primaryResource.__name];
|
|
20291
20423
|
|
|
20292
20424
|
if (primaryHasParameters) {
|
|
20293
20425
|
primaryResource.parentRef.forEach(function (pr) {
|
|
@@ -20324,6 +20456,7 @@ module.exports =
|
|
|
20324
20456
|
})];
|
|
20325
20457
|
|
|
20326
20458
|
var joinRscSectionLabels = [rsc.name];
|
|
20459
|
+
var joinRscSectionTypes = [rsc.__name];
|
|
20327
20460
|
|
|
20328
20461
|
if (hasParameters) {
|
|
20329
20462
|
rsc.parentRef.forEach(function (pr) {
|
|
@@ -20344,6 +20477,9 @@ module.exports =
|
|
|
20344
20477
|
if (rsc.primaryKeyName) {
|
|
20345
20478
|
primaryKeyLabel += rsc.primaryKeyName;
|
|
20346
20479
|
}
|
|
20480
|
+
if (showApiNames && rsc.__primaryKeyName) {
|
|
20481
|
+
primaryKeyLabel = rsc.__primaryKeyName;
|
|
20482
|
+
}
|
|
20347
20483
|
|
|
20348
20484
|
var joinKeyLabel = '';
|
|
20349
20485
|
rsc.joinKeyParents && rsc.joinKeyParents.forEach(function (skp) {
|
|
@@ -20353,15 +20489,21 @@ module.exports =
|
|
|
20353
20489
|
if (rsc.joinKeyName) {
|
|
20354
20490
|
joinKeyLabel += rsc.joinKeyName;
|
|
20355
20491
|
}
|
|
20492
|
+
if (showApiNames && rsc.__joinKeyName) {
|
|
20493
|
+
joinKeyLabel = rsc.__joinKeyName;
|
|
20494
|
+
}
|
|
20356
20495
|
|
|
20357
20496
|
var rscName = rsc.name;
|
|
20497
|
+
if (showApiNames && rsc.__name) {
|
|
20498
|
+
rscName = rsc.__name;
|
|
20499
|
+
}
|
|
20358
20500
|
if (isReverse) {
|
|
20359
20501
|
if (rsc.provider.toLowerCase() === step.sourceProvider.toLowerCase()) {
|
|
20360
|
-
rscName =
|
|
20502
|
+
rscName = rscName + ' (' + step.sourceProvider + ')';
|
|
20361
20503
|
}
|
|
20362
20504
|
} else {
|
|
20363
20505
|
if (rsc.provider.toLowerCase() === step.destinationProvider.toLowerCase()) {
|
|
20364
|
-
rscName =
|
|
20506
|
+
rscName = rscName + ' (' + step.destinationProvider + ')';
|
|
20365
20507
|
}
|
|
20366
20508
|
}
|
|
20367
20509
|
|
|
@@ -20513,13 +20655,16 @@ module.exports =
|
|
|
20513
20655
|
type: 'neutral', inputs: inputs,
|
|
20514
20656
|
values: primaryRscVals,
|
|
20515
20657
|
sectionLabels: primaryRscSectionLabels,
|
|
20658
|
+
sectionTypes: primaryRscSectionTypes,
|
|
20516
20659
|
fieldPropLabel: 'label',
|
|
20660
|
+
fieldPropType: 'name',
|
|
20517
20661
|
selectedValues: [{
|
|
20518
20662
|
label: rsc.primaryKeyName,
|
|
20519
20663
|
parents: rsc.primaryKeyParents,
|
|
20520
20664
|
section: rsc.primaryKeyResource
|
|
20521
20665
|
}],
|
|
20522
|
-
sectionLabelSuffix: 'Fields'
|
|
20666
|
+
sectionLabelSuffix: 'Fields',
|
|
20667
|
+
showApiNames: showApiNames
|
|
20523
20668
|
})
|
|
20524
20669
|
),
|
|
20525
20670
|
_react2.default.createElement(
|
|
@@ -20550,12 +20695,15 @@ module.exports =
|
|
|
20550
20695
|
type: 'neutral', inputs: inputs,
|
|
20551
20696
|
values: joinRscVals,
|
|
20552
20697
|
sectionLabels: joinRscSectionLabels,
|
|
20698
|
+
sectionTypes: joinRscSectionTypes,
|
|
20553
20699
|
fieldPropLabel: 'label',
|
|
20700
|
+
fieldPropType: 'name',
|
|
20554
20701
|
selectedValues: [{
|
|
20555
20702
|
label: rsc.joinKeyName,
|
|
20556
20703
|
parents: rsc.joinKeyParents
|
|
20557
20704
|
}],
|
|
20558
|
-
sectionLabelSuffix: 'Fields'
|
|
20705
|
+
sectionLabelSuffix: 'Fields',
|
|
20706
|
+
showApiNames: showApiNames
|
|
20559
20707
|
})
|
|
20560
20708
|
),
|
|
20561
20709
|
_react2.default.createElement(
|
|
@@ -20606,7 +20754,8 @@ module.exports =
|
|
|
20606
20754
|
//resourceGroups[resourceGroupIndex].resources}
|
|
20607
20755
|
, values: !isReverse ? [sourceSchema, destinationSchema] : [destinationSchema, sourceSchema],
|
|
20608
20756
|
sectionLabels: !isReverse ? [step.sourceProvider, step.destinationProvider] : [step.destinationProvider, step.sourceProvider],
|
|
20609
|
-
sectionLabelSuffix: 'Objects', fieldPropLabel: 'name'
|
|
20757
|
+
sectionLabelSuffix: 'Objects', fieldPropLabel: 'name', fieldPropType: 'type',
|
|
20758
|
+
showApiNames: showApiNames
|
|
20610
20759
|
})
|
|
20611
20760
|
) : null
|
|
20612
20761
|
) : null
|
|
@@ -20774,7 +20923,7 @@ module.exports =
|
|
|
20774
20923
|
|
|
20775
20924
|
Modal that opens when a transformation icon is clicked in the Field Mapping table
|
|
20776
20925
|
transformations are an array on the mapping object
|
|
20777
|
-
each transformation also has an array of args
|
|
20926
|
+
each transformation also has an array of arguments (args)
|
|
20778
20927
|
|
|
20779
20928
|
**************************/
|
|
20780
20929
|
|
|
@@ -20951,7 +21100,8 @@ module.exports =
|
|
|
20951
21100
|
resourceGroupIndex = _props8.resourceGroupIndex,
|
|
20952
21101
|
sourceSchema = _props8.sourceSchema,
|
|
20953
21102
|
destinationSchema = _props8.destinationSchema,
|
|
20954
|
-
step = _props8.step
|
|
21103
|
+
step = _props8.step,
|
|
21104
|
+
showApiNames = _props8.showApiNames;
|
|
20955
21105
|
|
|
20956
21106
|
var Modal = inputs.Modal;
|
|
20957
21107
|
var Input = inputs.Input;
|
|
@@ -20985,6 +21135,7 @@ module.exports =
|
|
|
20985
21135
|
}
|
|
20986
21136
|
|
|
20987
21137
|
var sectionLabels = [];
|
|
21138
|
+
var sectionTypes = [];
|
|
20988
21139
|
var sectionProviders = [];
|
|
20989
21140
|
var vals = [];
|
|
20990
21141
|
if (transformSelected === 'concat') {
|
|
@@ -20993,6 +21144,7 @@ module.exports =
|
|
|
20993
21144
|
}
|
|
20994
21145
|
vals = group.resources.map(function (br, i) {
|
|
20995
21146
|
sectionLabels.push(br.name);
|
|
21147
|
+
sectionTypes.push(br.__name);
|
|
20996
21148
|
sectionProviders.push(br.provider);
|
|
20997
21149
|
return group.resources[i].provider.toLowerCase() === step.destinationProvider.toLowerCase() ? destinationSchema && destinationSchema.find(function (defaultRsc) {
|
|
20998
21150
|
return defaultRsc.name === group.resources[i].name;
|
|
@@ -21027,6 +21179,11 @@ module.exports =
|
|
|
21027
21179
|
};
|
|
21028
21180
|
}
|
|
21029
21181
|
|
|
21182
|
+
var rscFrom = showApiNames ? mapping.__resourceFromName : mapping.resourceFromName;
|
|
21183
|
+
var propFrom = showApiNames ? mapping.__propertyFromName : propertyFromLabel;
|
|
21184
|
+
var rscTo = showApiNames ? mapping.__resourceToName : mapping.resourceToName;
|
|
21185
|
+
var propTo = showApiNames ? mapping.__propertyToName : mapping.propertyToName;
|
|
21186
|
+
|
|
21030
21187
|
return _react2.default.createElement(
|
|
21031
21188
|
Modal,
|
|
21032
21189
|
{ opened: opened, hideModal: hideModal, submitModal: hideModal, title: 'Transform Data' },
|
|
@@ -21039,25 +21196,25 @@ module.exports =
|
|
|
21039
21196
|
_react2.default.createElement(
|
|
21040
21197
|
'strong',
|
|
21041
21198
|
null,
|
|
21042
|
-
|
|
21199
|
+
rscFrom
|
|
21043
21200
|
),
|
|
21044
21201
|
': ',
|
|
21045
21202
|
_react2.default.createElement(
|
|
21046
21203
|
'span',
|
|
21047
21204
|
null,
|
|
21048
|
-
|
|
21205
|
+
propFrom
|
|
21049
21206
|
),
|
|
21050
21207
|
'\xA0\xA0\u2192\xA0\xA0',
|
|
21051
21208
|
_react2.default.createElement(
|
|
21052
21209
|
'strong',
|
|
21053
21210
|
null,
|
|
21054
|
-
|
|
21211
|
+
rscTo
|
|
21055
21212
|
),
|
|
21056
21213
|
': ',
|
|
21057
21214
|
_react2.default.createElement(
|
|
21058
21215
|
'span',
|
|
21059
21216
|
null,
|
|
21060
|
-
|
|
21217
|
+
propTo
|
|
21061
21218
|
)
|
|
21062
21219
|
),
|
|
21063
21220
|
_react2.default.createElement('br', null),
|
|
@@ -21192,11 +21349,11 @@ module.exports =
|
|
|
21192
21349
|
onSelect: function onSelect(v, iii, field) {
|
|
21193
21350
|
return _this3.changeConcatField(v, field, mappingIndex);
|
|
21194
21351
|
},
|
|
21195
|
-
inputs: inputs,
|
|
21196
|
-
|
|
21197
|
-
|
|
21352
|
+
inputs: inputs, type: 'brand', values: vals,
|
|
21353
|
+
fieldPropLabel: 'label', fieldPropType: 'name',
|
|
21354
|
+
sectionLabels: sectionLabels, sectionTypes: sectionTypes,
|
|
21198
21355
|
selectedValues: label && [{ label: label, parents: parents, section: section }],
|
|
21199
|
-
sectionLabelSuffix: 'Fields'
|
|
21356
|
+
sectionLabelSuffix: 'Fields', showApiNames: showApiNames
|
|
21200
21357
|
});
|
|
21201
21358
|
}),
|
|
21202
21359
|
_react2.default.createElement('br', null),
|
|
@@ -21242,7 +21399,7 @@ module.exports =
|
|
|
21242
21399
|
var ConcatExampleResult = function ConcatExampleResult(props) {
|
|
21243
21400
|
var delimiter = props.transformArgs[0];
|
|
21244
21401
|
var concatFields = '';
|
|
21245
|
-
concatFields += delimiter;
|
|
21402
|
+
concatFields += delimiter || '';
|
|
21246
21403
|
props.transformArgs.filter(function (arg, i) {
|
|
21247
21404
|
return i !== 0;
|
|
21248
21405
|
}).forEach(function (ta) {
|
|
@@ -21689,7 +21846,6 @@ module.exports =
|
|
|
21689
21846
|
|
|
21690
21847
|
change(mode + 'Credentials', credentials);
|
|
21691
21848
|
this.setState(_defineProperty({}, mode + 'EnvChecking', true));
|
|
21692
|
-
console.log(config);
|
|
21693
21849
|
actions.callGetMetadata(tenantId, accountId, mode, step[mode + 'Provider'], config, endpoint || '_blank', step.isFramework, credentials, env, isReload).then(function (metadata) {
|
|
21694
21850
|
_this2.setState(_defineProperty({}, mode + 'EnvChecking', false));
|
|
21695
21851
|
// set meta for File Schema step if needed
|
|
@@ -23351,7 +23507,9 @@ module.exports =
|
|
|
23351
23507
|
step = _props3.step,
|
|
23352
23508
|
reset = _props3.reset,
|
|
23353
23509
|
wizard = _props3.wizard,
|
|
23354
|
-
actions = _props3.actions
|
|
23510
|
+
actions = _props3.actions,
|
|
23511
|
+
showApiNames = _props3.showApiNames,
|
|
23512
|
+
toggleShowApiNames = _props3.toggleShowApiNames;
|
|
23355
23513
|
|
|
23356
23514
|
var MapTable = inputs.MapTable;
|
|
23357
23515
|
var Button = inputs.Button;
|
|
@@ -23401,14 +23559,15 @@ module.exports =
|
|
|
23401
23559
|
_react2.default.createElement(
|
|
23402
23560
|
_groupNav2.default,
|
|
23403
23561
|
{ resourceGroups: resourceGroups, isBundleStep: false, inputs: inputs,
|
|
23404
|
-
style: { position: 'relative', width: 640, height: 69, zIndex: 9000 }, step: step
|
|
23562
|
+
style: { position: 'relative', width: 640, height: 69, zIndex: 9000 }, step: step,
|
|
23563
|
+
showApiNames: showApiNames, toggleShowApiNames: toggleShowApiNames },
|
|
23405
23564
|
_react2.default.createElement(_mapAccordion2.default, { sourceSchema: sourceSchema, destinationSchema: destinationSchema,
|
|
23406
23565
|
formValues: formValues, change: change, update: this.update, step: step,
|
|
23407
|
-
actions: actions, isReverse: isReverse }),
|
|
23566
|
+
actions: actions, isReverse: isReverse, showApiNames: showApiNames }),
|
|
23408
23567
|
_react2.default.createElement(
|
|
23409
23568
|
MapTable,
|
|
23410
23569
|
{ clearOneMapping: this.clearOneMapping,
|
|
23411
|
-
selectMapping: this.selectMapping,
|
|
23570
|
+
selectMapping: this.selectMapping, showApiNames: showApiNames,
|
|
23412
23571
|
mode: formValues.direction, step: step },
|
|
23413
23572
|
_react2.default.createElement(Rows.MapTableSourceRow, null),
|
|
23414
23573
|
_react2.default.createElement(Rows.MapTableMappingRow, null),
|
|
@@ -23426,7 +23585,9 @@ module.exports =
|
|
|
23426
23585
|
mapping: this.state.selectedTransform, opened: this.state.showModal,
|
|
23427
23586
|
change: change, resourceGroups: resourceGroups, step: step,
|
|
23428
23587
|
resourceGroupIndex: this.state.selectedTransformResourceGroupIndex,
|
|
23429
|
-
sourceSchema: sourceSchema, destinationSchema: destinationSchema
|
|
23588
|
+
sourceSchema: sourceSchema, destinationSchema: destinationSchema,
|
|
23589
|
+
showApiNames: showApiNames
|
|
23590
|
+
})
|
|
23430
23591
|
) : null,
|
|
23431
23592
|
_react2.default.createElement('br', null),
|
|
23432
23593
|
(step.isFramework || step.isOrgAdmin) && _react2.default.createElement(
|
|
@@ -24617,7 +24778,9 @@ module.exports =
|
|
|
24617
24778
|
step = _props14.step,
|
|
24618
24779
|
reset = _props14.reset,
|
|
24619
24780
|
wizard = _props14.wizard,
|
|
24620
|
-
change = _props14.change
|
|
24781
|
+
change = _props14.change,
|
|
24782
|
+
showApiNames = _props14.showApiNames,
|
|
24783
|
+
toggleShowApiNames = _props14.toggleShowApiNames;
|
|
24621
24784
|
|
|
24622
24785
|
|
|
24623
24786
|
var resourceGroups = [];
|
|
@@ -24681,16 +24844,20 @@ module.exports =
|
|
|
24681
24844
|
changeGroupOrder: this.changeGroupOrder, step: step,
|
|
24682
24845
|
inputs: inputs, addDefaultEntity: this.addDefaultEntity,
|
|
24683
24846
|
didRemoveEntity: this.removeEntity,
|
|
24684
|
-
sourceSchema: sourceSchema,
|
|
24685
|
-
direction: formValues.direction
|
|
24847
|
+
sourceSchema: sourceSchema, showApiNames: showApiNames,
|
|
24848
|
+
direction: formValues.direction,
|
|
24849
|
+
toggleShowApiNames: toggleShowApiNames },
|
|
24686
24850
|
_react2.default.createElement(_schemaAccordion2.default, {
|
|
24687
24851
|
sourceSchema: sourceSchema, destinationSchema: destinationSchema,
|
|
24688
24852
|
changeEntityOrder: this.changeEntityOrder,
|
|
24689
|
-
isReverse: isReverse, step: step,
|
|
24853
|
+
isReverse: isReverse, step: step, showApiNames: showApiNames,
|
|
24690
24854
|
selectPrimaryKey: this.selectPrimaryKey,
|
|
24691
24855
|
selectJoinKey: this.selectJoinKey, change: change,
|
|
24692
24856
|
changeEntityLevel: this.changeEntityLevel }),
|
|
24693
|
-
_react2.default.createElement(_bundleTable2.default, { openConnectionModal: this.openConnectionModal,
|
|
24857
|
+
_react2.default.createElement(_bundleTable2.default, { openConnectionModal: this.openConnectionModal,
|
|
24858
|
+
mode: formValues.direction,
|
|
24859
|
+
showApiNames: showApiNames
|
|
24860
|
+
})
|
|
24694
24861
|
),
|
|
24695
24862
|
_react2.default.createElement('br', null)
|
|
24696
24863
|
),
|
|
@@ -24704,7 +24871,8 @@ module.exports =
|
|
|
24704
24871
|
sourceSchema: sourceSchema, destinationSchema: destinationSchema,
|
|
24705
24872
|
update: function update() {
|
|
24706
24873
|
return _this3.forceUpdate();
|
|
24707
|
-
}, direction: formValues.direction
|
|
24874
|
+
}, direction: formValues.direction,
|
|
24875
|
+
showApiNames: showApiNames
|
|
24708
24876
|
})
|
|
24709
24877
|
),
|
|
24710
24878
|
_react2.default.createElement('br', null),
|
|
@@ -24803,17 +24971,17 @@ module.exports =
|
|
|
24803
24971
|
var SourceField = function SourceField(props) {
|
|
24804
24972
|
var field = props.field,
|
|
24805
24973
|
selectedField = props.selectedField,
|
|
24806
|
-
selectedFieldParents = props.selectedFieldParents,
|
|
24807
24974
|
filteredMappings = props.filteredMappings,
|
|
24808
24975
|
click = props.click,
|
|
24809
24976
|
onExpand = props.onExpand,
|
|
24810
24977
|
expanded = props.expanded,
|
|
24811
|
-
parents = props.parents
|
|
24978
|
+
parents = props.parents,
|
|
24979
|
+
showApiNames = props.showApiNames;
|
|
24812
24980
|
|
|
24813
24981
|
var isMapped = filteredMappings && Object.values(filteredMappings).find(function (fm) {
|
|
24814
24982
|
return fm.propFrom === field.label && JSON.stringify(fm.parentsFrom) === JSON.stringify(parents);
|
|
24815
24983
|
}) ? true : false;
|
|
24816
|
-
var isSelected = selectedField && selectedField === field.label && JSON.stringify(
|
|
24984
|
+
var isSelected = selectedField && selectedField.label && selectedField.label === field.label && JSON.stringify(selectedField.parents) === JSON.stringify(parents);
|
|
24817
24985
|
var style = {
|
|
24818
24986
|
paddingLeft: 5,
|
|
24819
24987
|
background: isSelected ? '#dfe0e0' : 'initial',
|
|
@@ -24833,6 +25001,9 @@ module.exports =
|
|
|
24833
25001
|
if (field.label) {
|
|
24834
25002
|
title += field.label;
|
|
24835
25003
|
}
|
|
25004
|
+
if (showApiNames) {
|
|
25005
|
+
title = field.name;
|
|
25006
|
+
}
|
|
24836
25007
|
var isExpanded = false;
|
|
24837
25008
|
if (field.object) {
|
|
24838
25009
|
isExpanded = _nestExpand2.default.checkIfExpanded(field.label, parents, expanded);
|
|
@@ -24847,7 +25018,7 @@ module.exports =
|
|
|
24847
25018
|
fontWeight: 'bold' } : style,
|
|
24848
25019
|
onClick: function onClick() {
|
|
24849
25020
|
if (!field.object) {
|
|
24850
|
-
click(field
|
|
25021
|
+
click(field, parents);
|
|
24851
25022
|
} else {
|
|
24852
25023
|
onExpand(_nestExpand2.default.expand(field.label, parents, expanded));
|
|
24853
25024
|
}
|
|
@@ -24876,9 +25047,9 @@ module.exports =
|
|
|
24876
25047
|
{ className: 'fields-expander' },
|
|
24877
25048
|
field.object && field.object.properties.map(function (nestedField, i) {
|
|
24878
25049
|
return _react2.default.createElement(SourceField, { key: i, field: nestedField, selectedField: selectedField,
|
|
24879
|
-
selectedFieldParents: selectedFieldParents,
|
|
24880
25050
|
filteredMappings: filteredMappings, parents: parents.concat(field.label),
|
|
24881
|
-
click: click, onExpand: onExpand, expanded: expanded
|
|
25051
|
+
click: click, onExpand: onExpand, expanded: expanded
|
|
25052
|
+
});
|
|
24882
25053
|
})
|
|
24883
25054
|
) : null
|
|
24884
25055
|
)
|
|
@@ -25470,7 +25641,8 @@ module.exports =
|
|
|
25470
25641
|
_this.limitBackToCurrentPage = _this.limitBackToCurrentPage.bind(_this);
|
|
25471
25642
|
_this.state = {
|
|
25472
25643
|
currentPage: 1,
|
|
25473
|
-
highestPage: 1
|
|
25644
|
+
highestPage: 1,
|
|
25645
|
+
showApiNames: false
|
|
25474
25646
|
};
|
|
25475
25647
|
_this.possibleSteps = {
|
|
25476
25648
|
account: _accountStep2.default,
|
|
@@ -25595,7 +25767,9 @@ module.exports =
|
|
|
25595
25767
|
value: function render() {
|
|
25596
25768
|
var _this3 = this;
|
|
25597
25769
|
|
|
25598
|
-
var
|
|
25770
|
+
var _state = this.state,
|
|
25771
|
+
currentPage = _state.currentPage,
|
|
25772
|
+
showApiNames = _state.showApiNames;
|
|
25599
25773
|
var _props2 = this.props,
|
|
25600
25774
|
steps = _props2.steps,
|
|
25601
25775
|
actions = _props2.actions,
|
|
@@ -25671,7 +25845,11 @@ module.exports =
|
|
|
25671
25845
|
accountKey: accountKey,
|
|
25672
25846
|
configUrls: config,
|
|
25673
25847
|
isAdmin: isAdmin,
|
|
25674
|
-
onUpdateScenarios: _this3.props.onUpdateScenarios
|
|
25848
|
+
onUpdateScenarios: _this3.props.onUpdateScenarios,
|
|
25849
|
+
showApiNames: showApiNames,
|
|
25850
|
+
toggleShowApiNames: function toggleShowApiNames() {
|
|
25851
|
+
return _this3.setState({ showApiNames: !showApiNames });
|
|
25852
|
+
}
|
|
25675
25853
|
})
|
|
25676
25854
|
);
|
|
25677
25855
|
})
|