@lingk/sync 1.0.62 → 1.0.63
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/lightning.js.map +1 -1
- package/build/lightningStyles.js.map +1 -1
- package/build/lingk.js +3 -2
- package/build/lingk.js.map +1 -1
- package/build/lingkStyles.js.map +1 -1
- package/build/loadData.js.map +1 -1
- package/build/main.js +104 -15
- 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
|
@@ -19378,12 +19378,15 @@ module.exports =
|
|
|
19378
19378
|
return m && m.propertyToName === field.label && m.isExternalKeyMapping;
|
|
19379
19379
|
})) return;
|
|
19380
19380
|
|
|
19381
|
-
var transform = 'none';
|
|
19381
|
+
var transform = { type: 'none' };
|
|
19382
19382
|
if (field.format) {
|
|
19383
19383
|
if (field.format === 'date-time') {
|
|
19384
|
-
transform = 'date';
|
|
19384
|
+
transform = { type: 'date' };
|
|
19385
19385
|
}
|
|
19386
19386
|
}
|
|
19387
|
+
if (field.type && field.type === 'boolean') {
|
|
19388
|
+
transform = { type: 'bool', args: ['T', 'F'] };
|
|
19389
|
+
}
|
|
19387
19390
|
|
|
19388
19391
|
//cant map multiple to same destination field
|
|
19389
19392
|
rscGroup.mappings = rscGroup.mappings && rscGroup.mappings.filter(function (m) {
|
|
@@ -19400,7 +19403,7 @@ module.exports =
|
|
|
19400
19403
|
propertyToName: field.label,
|
|
19401
19404
|
__propertyToName: field.name,
|
|
19402
19405
|
propertyToParents: parents,
|
|
19403
|
-
transformations: [
|
|
19406
|
+
transformations: [transform],
|
|
19404
19407
|
dataSourceIsDestinationEntity: selectedEntity.isDestinationEntity
|
|
19405
19408
|
});
|
|
19406
19409
|
change('resourceGroups', resourceGroups);
|
|
@@ -19895,6 +19898,12 @@ module.exports =
|
|
|
19895
19898
|
{ fill: '#000000', height: '19', viewBox: '0 0 24 24', width: '24', xmlns: 'http://www.w3.org/2000/svg' },
|
|
19896
19899
|
_react2.default.createElement('path', { d: 'M0 0h24v24H0z', fill: 'none' }),
|
|
19897
19900
|
_react2.default.createElement('path', { d: 'M12.45 16h2.09L9.43 3H7.57L2.46 16h2.09l1.12-3h5.64l1.14 3zm-6.02-5L8.5 5.48 10.57 11H6.43zm15.16.59l-8.09 8.09L9.83 16l-1.41 1.41 5.09 5.09L23 13l-1.41-1.41z' })
|
|
19901
|
+
),
|
|
19902
|
+
bool: _react2.default.createElement(
|
|
19903
|
+
'svg',
|
|
19904
|
+
{ fill: '#000000', height: '19', viewBox: '0 0 24 24', width: '24', xmlns: 'http://www.w3.org/2000/svg' },
|
|
19905
|
+
_react2.default.createElement('path', { d: 'M16 17.01V10h-2v7.01h-3L15 21l4-3.99h-3zM9 3L5 6.99h3V14h2V6.99h3L9 3z' }),
|
|
19906
|
+
_react2.default.createElement('path', { d: 'M0 0h24v24H0z', fill: 'none' })
|
|
19898
19907
|
)
|
|
19899
19908
|
|
|
19900
19909
|
};
|
|
@@ -21039,6 +21048,7 @@ module.exports =
|
|
|
21039
21048
|
'trim': 'Trim Field',
|
|
21040
21049
|
'date': 'Date Format',
|
|
21041
21050
|
'lookup': 'Lookup Table',
|
|
21051
|
+
'bool': 'Boolean',
|
|
21042
21052
|
'ifnull': 'Null Check'
|
|
21043
21053
|
};
|
|
21044
21054
|
_this.dataTypes = ['String', 'Number', 'Date', 'Boolean'];
|
|
@@ -21070,6 +21080,10 @@ module.exports =
|
|
|
21070
21080
|
var trans = resourceGroups[resourceGroupIndex].mappings[mappingIndex].transformations[0];
|
|
21071
21081
|
if (trans.type !== v) {
|
|
21072
21082
|
trans.args = [''];
|
|
21083
|
+
console.log(v);
|
|
21084
|
+
if (v === 'bool') {
|
|
21085
|
+
trans.args = ['', '', false];
|
|
21086
|
+
}
|
|
21073
21087
|
}
|
|
21074
21088
|
change('resourceGroups', groups);
|
|
21075
21089
|
}
|
|
@@ -21180,25 +21194,56 @@ module.exports =
|
|
|
21180
21194
|
change('resourceGroups', groups);
|
|
21181
21195
|
this.forceUpdate();
|
|
21182
21196
|
}
|
|
21197
|
+
}, {
|
|
21198
|
+
key: 'changeBool',
|
|
21199
|
+
value: function changeBool(v, i, mappingIndex) {
|
|
21200
|
+
var _props8 = this.props,
|
|
21201
|
+
change = _props8.change,
|
|
21202
|
+
resourceGroups = _props8.resourceGroups,
|
|
21203
|
+
resourceGroupIndex = _props8.resourceGroupIndex;
|
|
21204
|
+
|
|
21205
|
+
var groups = [].concat(_toConsumableArray(resourceGroups));
|
|
21206
|
+
var trans = resourceGroups[resourceGroupIndex].mappings[mappingIndex].transformations[0];
|
|
21207
|
+
trans.args = trans.args || [];
|
|
21208
|
+
trans.args[i] = v;
|
|
21209
|
+
change('resourceGroups', groups);
|
|
21210
|
+
this.forceUpdate();
|
|
21211
|
+
}
|
|
21212
|
+
}, {
|
|
21213
|
+
key: 'toggleNullBool',
|
|
21214
|
+
value: function toggleNullBool(v, mappingIndex) {
|
|
21215
|
+
var _props9 = this.props,
|
|
21216
|
+
change = _props9.change,
|
|
21217
|
+
resourceGroups = _props9.resourceGroups,
|
|
21218
|
+
resourceGroupIndex = _props9.resourceGroupIndex;
|
|
21219
|
+
|
|
21220
|
+
var groups = [].concat(_toConsumableArray(resourceGroups));
|
|
21221
|
+
var trans = resourceGroups[resourceGroupIndex].mappings[mappingIndex].transformations[0];
|
|
21222
|
+
trans.args = trans.args || [];
|
|
21223
|
+
trans.args[2] = v === 'true';
|
|
21224
|
+
change('resourceGroups', groups);
|
|
21225
|
+
this.forceUpdate();
|
|
21226
|
+
}
|
|
21183
21227
|
}, {
|
|
21184
21228
|
key: 'render',
|
|
21185
21229
|
value: function render() {
|
|
21186
21230
|
var _this3 = this;
|
|
21187
21231
|
|
|
21188
|
-
var
|
|
21189
|
-
inputs =
|
|
21190
|
-
opened =
|
|
21191
|
-
mapping =
|
|
21192
|
-
hideModal =
|
|
21193
|
-
resourceGroups =
|
|
21194
|
-
resourceGroupIndex =
|
|
21195
|
-
sourceSchema =
|
|
21196
|
-
destinationSchema =
|
|
21197
|
-
step =
|
|
21198
|
-
showApiNames =
|
|
21232
|
+
var _props10 = this.props,
|
|
21233
|
+
inputs = _props10.inputs,
|
|
21234
|
+
opened = _props10.opened,
|
|
21235
|
+
mapping = _props10.mapping,
|
|
21236
|
+
hideModal = _props10.hideModal,
|
|
21237
|
+
resourceGroups = _props10.resourceGroups,
|
|
21238
|
+
resourceGroupIndex = _props10.resourceGroupIndex,
|
|
21239
|
+
sourceSchema = _props10.sourceSchema,
|
|
21240
|
+
destinationSchema = _props10.destinationSchema,
|
|
21241
|
+
step = _props10.step,
|
|
21242
|
+
showApiNames = _props10.showApiNames;
|
|
21199
21243
|
|
|
21200
21244
|
var Modal = inputs.Modal;
|
|
21201
21245
|
var Input = inputs.Input;
|
|
21246
|
+
var ToggleButtonGroup = inputs.ToggleButtonGroup;
|
|
21202
21247
|
var groups = [].concat(_toConsumableArray(resourceGroups));
|
|
21203
21248
|
var group = groups[resourceGroupIndex];
|
|
21204
21249
|
|
|
@@ -21214,6 +21259,8 @@ module.exports =
|
|
|
21214
21259
|
var transformation = updatedMapping.transformations && updatedMapping.transformations[0];
|
|
21215
21260
|
var transformSelected = transformation && transformation.type || 'none';
|
|
21216
21261
|
var transformArgs = transformation && transformation.args || [''];
|
|
21262
|
+
console.log(transformArgs);
|
|
21263
|
+
|
|
21217
21264
|
// create an array of arrays (pairs) for lookup args
|
|
21218
21265
|
var lookupArgs = [];
|
|
21219
21266
|
if (transformSelected === 'lookup') {
|
|
@@ -21317,7 +21364,7 @@ module.exports =
|
|
|
21317
21364
|
{ style: { width: 150, display: 'inline-block', marginBottom: 20 } },
|
|
21318
21365
|
_react2.default.createElement(_reduxForm.Field, { name: 'resourceGroups.' + resourceGroupIndex + '.mappings.' + mappingIndex + '.transformations.0.type',
|
|
21319
21366
|
component: inputs.rfRadioGroup, label: 'Transformation Type', options: this.transformOptions,
|
|
21320
|
-
|
|
21367
|
+
onChange: function onChange(v) {
|
|
21321
21368
|
return _this3.clickRadio(v, mappingIndex);
|
|
21322
21369
|
} })
|
|
21323
21370
|
),
|
|
@@ -21414,6 +21461,48 @@ module.exports =
|
|
|
21414
21461
|
);
|
|
21415
21462
|
})
|
|
21416
21463
|
),
|
|
21464
|
+
transformSelected === 'bool' && _react2.default.createElement(
|
|
21465
|
+
'div',
|
|
21466
|
+
null,
|
|
21467
|
+
_react2.default.createElement(
|
|
21468
|
+
'div',
|
|
21469
|
+
{ style: { marginBottom: 8 } },
|
|
21470
|
+
'Values to map to booleans:'
|
|
21471
|
+
),
|
|
21472
|
+
['true', 'false'].map(function (b, i) {
|
|
21473
|
+
return _react2.default.createElement(
|
|
21474
|
+
'div',
|
|
21475
|
+
{ key: i, style: { marginBottom: 6 } },
|
|
21476
|
+
_react2.default.createElement(Input, { style: { width: 132, display: 'inline-block' },
|
|
21477
|
+
onChange: function onChange(e, v) {
|
|
21478
|
+
return _this3.changeBool(v, i, mappingIndex);
|
|
21479
|
+
},
|
|
21480
|
+
value: transformArgs[i] || '', placeholder: b + ' value' }),
|
|
21481
|
+
_react2.default.createElement(
|
|
21482
|
+
'span',
|
|
21483
|
+
null,
|
|
21484
|
+
'\xA0\xA0\u2192\xA0\xA0'
|
|
21485
|
+
),
|
|
21486
|
+
_react2.default.createElement(Input, { style: { width: 132, display: 'inline-block' },
|
|
21487
|
+
readOnly: true, value: b })
|
|
21488
|
+
);
|
|
21489
|
+
}),
|
|
21490
|
+
_react2.default.createElement(
|
|
21491
|
+
'div',
|
|
21492
|
+
{ style: { marginTop: 12 } },
|
|
21493
|
+
_react2.default.createElement(
|
|
21494
|
+
'div',
|
|
21495
|
+
{ className: 'labelz' },
|
|
21496
|
+
'Map null values to:'
|
|
21497
|
+
),
|
|
21498
|
+
_react2.default.createElement(ToggleButtonGroup, { options: ['false', 'true'],
|
|
21499
|
+
value: transformArgs[2] ? 'true' : 'false', lowercase: true,
|
|
21500
|
+
handleToggle: function handleToggle(e) {
|
|
21501
|
+
return _this3.toggleNullBool(e, mappingIndex);
|
|
21502
|
+
}
|
|
21503
|
+
})
|
|
21504
|
+
)
|
|
21505
|
+
),
|
|
21417
21506
|
transformSelected === 'concat' && _react2.default.createElement(
|
|
21418
21507
|
'div',
|
|
21419
21508
|
null,
|