@lingk/sync 0.2.13 → 0.2.15
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/build/credentialSections.js.map +1 -1
- package/build/css/main.css +3 -4
- package/build/lightning.js.map +1 -1
- package/build/lightningStyles.js.map +1 -1
- package/build/lingk.js +59 -25
- package/build/lingk.js.map +1 -1
- package/build/lingkStyles.js.map +1 -1
- package/build/loadData.js +2 -1
- package/build/loadData.js.map +1 -1
- package/build/main.js +82 -14
- 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.map +1 -1
- package/package.json +1 -1
package/build/main.js
CHANGED
|
@@ -521,9 +521,11 @@ module.exports =
|
|
|
521
521
|
var _this = _possibleConstructorReturn(this, (SelectWrapper.__proto__ || Object.getPrototypeOf(SelectWrapper)).call(this));
|
|
522
522
|
|
|
523
523
|
_this.state = {
|
|
524
|
-
expanded: {}
|
|
524
|
+
expanded: {},
|
|
525
|
+
searchTerms: {} // {sectionname: searchterm}
|
|
525
526
|
};
|
|
526
527
|
_this.expand = _this.expand.bind(_this);
|
|
528
|
+
_this.changeSearchTerm = _this.changeSearchTerm.bind(_this);
|
|
527
529
|
return _this;
|
|
528
530
|
}
|
|
529
531
|
|
|
@@ -532,6 +534,13 @@ module.exports =
|
|
|
532
534
|
value: function expand(v, parents) {
|
|
533
535
|
this.setState({ expanded: _nestExpand2.default.expand(v, parents, this.state.expanded) });
|
|
534
536
|
}
|
|
537
|
+
}, {
|
|
538
|
+
key: 'changeSearchTerm',
|
|
539
|
+
value: function changeSearchTerm(v, section) {
|
|
540
|
+
var searchTerms = Object.assign({}, this.state.searchTerms);
|
|
541
|
+
searchTerms[section] = v;
|
|
542
|
+
this.setState({ searchTerms: searchTerms });
|
|
543
|
+
}
|
|
535
544
|
}, {
|
|
536
545
|
key: 'render',
|
|
537
546
|
value: function render() {
|
|
@@ -541,6 +550,7 @@ module.exports =
|
|
|
541
550
|
selectedValues = _props.selectedValues,
|
|
542
551
|
sectionLabels = _props.sectionLabels,
|
|
543
552
|
fieldPropLabel = _props.fieldPropLabel;
|
|
553
|
+
var searchTerms = this.state.searchTerms;
|
|
544
554
|
|
|
545
555
|
var iterator = function (sectionValues, entity, sectionLabel, iteration, parents, newParent) {
|
|
546
556
|
if (newParent) {
|
|
@@ -578,6 +588,7 @@ module.exports =
|
|
|
578
588
|
}.bind(this);
|
|
579
589
|
|
|
580
590
|
var vals = values && [].concat(_toConsumableArray(values));
|
|
591
|
+
|
|
581
592
|
if (sectionLabels) {
|
|
582
593
|
var v = [];
|
|
583
594
|
sectionLabels.forEach(function (s, i) {
|
|
@@ -588,6 +599,37 @@ module.exports =
|
|
|
588
599
|
values[i].forEach(function (entity) {
|
|
589
600
|
iterator(sectionValues, entity, sectionLabels[i], 0, []);
|
|
590
601
|
});
|
|
602
|
+
//search
|
|
603
|
+
sectionValues.forEach(function (sv, ii) {
|
|
604
|
+
var satisfiesSearch = searchTerms && searchTerms[sectionLabels[i]] ? sv[fieldPropLabel].toLowerCase().indexOf(searchTerms[sectionLabels[i]].toLowerCase()) > -1 : true;
|
|
605
|
+
sv.satisfiesSearch = satisfiesSearch;
|
|
606
|
+
//satisfy parents
|
|
607
|
+
if (searchTerms && satisfiesSearch) {
|
|
608
|
+
// for nested resources (parentRef)
|
|
609
|
+
if (sv.parentRef) {
|
|
610
|
+
sv.parentRef.forEach(function (pr) {
|
|
611
|
+
var parentString = pr.ref.split('/')[2];
|
|
612
|
+
var parent = sectionValues.find(function (p) {
|
|
613
|
+
return parentString === p[fieldPropLabel];
|
|
614
|
+
});
|
|
615
|
+
if (parent) {
|
|
616
|
+
parent.satisfiesSearch = true;
|
|
617
|
+
}
|
|
618
|
+
});
|
|
619
|
+
}
|
|
620
|
+
// for nested props (parents array)
|
|
621
|
+
if (sv.parents) {
|
|
622
|
+
sv.parents.forEach(function (pr) {
|
|
623
|
+
var parent = sectionValues.find(function (p) {
|
|
624
|
+
return pr === p[fieldPropLabel];
|
|
625
|
+
});
|
|
626
|
+
if (parent) {
|
|
627
|
+
parent.satisfiesSearch = true;
|
|
628
|
+
}
|
|
629
|
+
});
|
|
630
|
+
}
|
|
631
|
+
}
|
|
632
|
+
});
|
|
591
633
|
v = v.concat(sectionValues);
|
|
592
634
|
})();
|
|
593
635
|
}
|
|
@@ -599,6 +641,9 @@ module.exports =
|
|
|
599
641
|
values && values.forEach(function (entity) {
|
|
600
642
|
iterator(sectionValues, entity, '', 0, []);
|
|
601
643
|
});
|
|
644
|
+
sectionValues.forEach(function (sv) {
|
|
645
|
+
sv.satisfiesSearch = true; // no sections = no search
|
|
646
|
+
});
|
|
602
647
|
vals = sectionValues;
|
|
603
648
|
})();
|
|
604
649
|
}
|
|
@@ -606,7 +651,8 @@ module.exports =
|
|
|
606
651
|
return _react2.default.createElement(
|
|
607
652
|
'div',
|
|
608
653
|
null,
|
|
609
|
-
_react2.default.createElement(inputs.Select, Object.assign({}, this.props, { vals: vals, expand: this.expand
|
|
654
|
+
_react2.default.createElement(inputs.Select, Object.assign({}, this.props, { vals: vals, expand: this.expand,
|
|
655
|
+
changeSearchTerm: this.changeSearchTerm }))
|
|
610
656
|
);
|
|
611
657
|
}
|
|
612
658
|
}]);
|
|
@@ -3033,7 +3079,8 @@ module.exports =
|
|
|
3033
3079
|
lingkSourceKeyParents: sourceKeysParents[0] }, {
|
|
3034
3080
|
provider: bundle.provider,
|
|
3035
3081
|
//...bundle.recordTypeId && {recordTypeId: bundle.recordTypeId},
|
|
3036
|
-
deleteEnabled: bundle.deleteEnabled || false
|
|
3082
|
+
deleteEnabled: bundle.deleteEnabled || false,
|
|
3083
|
+
writeMode: bundle.writeMode || (bundle.deleteEnabled ? 'delete' : 'default')
|
|
3037
3084
|
})); // end push each bundle (contains resources AND mappings)
|
|
3038
3085
|
})();
|
|
3039
3086
|
} // end if bundleResource
|
|
@@ -19550,6 +19597,12 @@ module.exports =
|
|
|
19550
19597
|
})
|
|
19551
19598
|
})*/
|
|
19552
19599
|
|
|
19600
|
+
var writeModes = {
|
|
19601
|
+
default: 'Add/Update',
|
|
19602
|
+
delete: 'Add/Update/Delete',
|
|
19603
|
+
updateonly: 'Update Only'
|
|
19604
|
+
};
|
|
19605
|
+
|
|
19553
19606
|
return _react2.default.createElement(
|
|
19554
19607
|
'div',
|
|
19555
19608
|
{ style: { position: 'relative' } },
|
|
@@ -19578,7 +19631,7 @@ module.exports =
|
|
|
19578
19631
|
'span',
|
|
19579
19632
|
null,
|
|
19580
19633
|
'Mode: ',
|
|
19581
|
-
group && group.
|
|
19634
|
+
group && writeModes[group.writeMode]
|
|
19582
19635
|
)
|
|
19583
19636
|
) : null
|
|
19584
19637
|
);
|
|
@@ -19983,31 +20036,45 @@ module.exports =
|
|
|
19983
20036
|
{ className: 'bundle-mode-options-content' },
|
|
19984
20037
|
_react2.default.createElement(Radio, { label: 'Add/Update',
|
|
19985
20038
|
onChange: function onChange() {
|
|
19986
|
-
|
|
20039
|
+
_this3.props.change('resourceGroups.' + resourceGroupIndex + '.writeMode', 'default');
|
|
19987
20040
|
},
|
|
19988
|
-
checked: group &&
|
|
20041
|
+
checked: group && group.writeMode === 'default',
|
|
20042
|
+
style: { cursor: 'pointer' }
|
|
19989
20043
|
}),
|
|
19990
20044
|
_react2.default.createElement('br', null),
|
|
19991
20045
|
_react2.default.createElement(
|
|
19992
|
-
'
|
|
19993
|
-
{ className: 'labelz' },
|
|
20046
|
+
'div',
|
|
20047
|
+
{ className: 'labelz', style: { fontSize: '13px' } },
|
|
19994
20048
|
'If record exists in destination, update it. Otherwise, add it.'
|
|
19995
20049
|
),
|
|
19996
20050
|
_react2.default.createElement('br', null),
|
|
19997
|
-
_react2.default.createElement('br', null),
|
|
19998
20051
|
_react2.default.createElement(Radio, { label: 'Add/Update/Delete',
|
|
19999
20052
|
onChange: function onChange() {
|
|
20000
|
-
|
|
20053
|
+
_this3.props.change('resourceGroups.' + resourceGroupIndex + '.writeMode', 'delete');
|
|
20001
20054
|
},
|
|
20002
|
-
checked: group && group.
|
|
20055
|
+
checked: group && group.writeMode === 'delete',
|
|
20056
|
+
style: { cursor: 'pointer' }
|
|
20003
20057
|
}),
|
|
20004
20058
|
_react2.default.createElement('br', null),
|
|
20005
20059
|
_react2.default.createElement(
|
|
20006
|
-
'
|
|
20007
|
-
{ className: 'labelz' },
|
|
20008
|
-
'Delete records that exist in the
|
|
20060
|
+
'div',
|
|
20061
|
+
{ className: 'labelz', style: { fontSize: '13px' } },
|
|
20062
|
+
'Delete records that exist in the target but not the source.'
|
|
20009
20063
|
),
|
|
20010
20064
|
_react2.default.createElement('br', null),
|
|
20065
|
+
_react2.default.createElement(Radio, { label: 'Update Only',
|
|
20066
|
+
onChange: function onChange() {
|
|
20067
|
+
_this3.props.change('resourceGroups.' + resourceGroupIndex + '.writeMode', 'updateonly');
|
|
20068
|
+
},
|
|
20069
|
+
checked: group && group.writeMode === 'updateonly',
|
|
20070
|
+
style: { cursor: 'pointer' }
|
|
20071
|
+
}),
|
|
20072
|
+
_react2.default.createElement('br', null),
|
|
20073
|
+
_react2.default.createElement(
|
|
20074
|
+
'div',
|
|
20075
|
+
{ className: 'labelz', style: { fontSize: '13px' } },
|
|
20076
|
+
'Only update existing records, do not insert new ones.'
|
|
20077
|
+
),
|
|
20011
20078
|
_react2.default.createElement('br', null)
|
|
20012
20079
|
)
|
|
20013
20080
|
) : null
|
|
@@ -23301,6 +23368,7 @@ module.exports =
|
|
|
23301
23368
|
resources: null,
|
|
23302
23369
|
recordTypeId: newGroup.recordTypeId,
|
|
23303
23370
|
provider: newGroup.section,
|
|
23371
|
+
writeMode: 'default',
|
|
23304
23372
|
// only Salesforce has ability to add "Lingk External Id"
|
|
23305
23373
|
customExternalKeys: newGroup.section !== 'Salesforce'
|
|
23306
23374
|
});
|