@lingk/sync 0.0.15 → 0.0.16
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/css/lightning.css +17 -0
- package/build/css/main.css +35 -13
- package/build/lightning.js +2 -3
- package/build/lightning.js.map +1 -1
- package/build/lingk.js.map +1 -1
- package/build/main.js +80 -55
- package/build/main.js.map +1 -1
- package/build/reducer.js.map +1 -1
- package/package.json +1 -1
package/build/main.js
CHANGED
|
@@ -3191,6 +3191,7 @@ module.exports =
|
|
|
3191
3191
|
_this.addDefaultDataEntity = _this.addDefaultDataEntity.bind(_this);
|
|
3192
3192
|
_this.selectAll = _this.selectAll.bind(_this);
|
|
3193
3193
|
_this.deselectAll = _this.deselectAll.bind(_this);
|
|
3194
|
+
_this.removeEntity = _this.removeEntity.bind(_this);
|
|
3194
3195
|
return _this;
|
|
3195
3196
|
}
|
|
3196
3197
|
|
|
@@ -3233,7 +3234,8 @@ module.exports =
|
|
|
3233
3234
|
var obj = Object.assign({}, includedFields) || {};
|
|
3234
3235
|
obj[this.state.newEntity] = {};
|
|
3235
3236
|
change(step.mode + 'Schema', obj);
|
|
3236
|
-
this.
|
|
3237
|
+
this.pickEntity(this.state.newEntity);
|
|
3238
|
+
this.setState({ newEntity: '' });
|
|
3237
3239
|
}
|
|
3238
3240
|
}, {
|
|
3239
3241
|
key: 'addDefaultDataEntity',
|
|
@@ -3267,7 +3269,11 @@ module.exports =
|
|
|
3267
3269
|
|
|
3268
3270
|
var includedFields = formValues[step.mode + 'Schema'] || {};
|
|
3269
3271
|
var obj = Object.assign({}, includedFields) || {};
|
|
3270
|
-
obj[this.state.selectedDataEntity]
|
|
3272
|
+
var rsc = obj[this.state.selectedDataEntity] || {};
|
|
3273
|
+
Object.keys(rsc).forEach(function (field) {
|
|
3274
|
+
rsc[field] = true;
|
|
3275
|
+
});
|
|
3276
|
+
obj[this.state.selectedDataEntity] = rsc;
|
|
3271
3277
|
change(step.mode + 'Schema', obj);
|
|
3272
3278
|
}
|
|
3273
3279
|
}, {
|
|
@@ -3278,9 +3284,27 @@ module.exports =
|
|
|
3278
3284
|
step = _props6.step,
|
|
3279
3285
|
formValues = _props6.formValues;
|
|
3280
3286
|
|
|
3287
|
+
var includedFields = formValues[step.mode + 'Schema'] || {};
|
|
3288
|
+
var obj = Object.assign({}, includedFields) || {};
|
|
3289
|
+
var rsc = obj[this.state.selectedDataEntity] || {};
|
|
3290
|
+
Object.keys(rsc).forEach(function (field) {
|
|
3291
|
+
rsc[field] = false;
|
|
3292
|
+
});
|
|
3293
|
+
obj[this.state.selectedDataEntity] = rsc;
|
|
3294
|
+
change(step.mode + 'Schema', obj);
|
|
3295
|
+
}
|
|
3296
|
+
}, {
|
|
3297
|
+
key: 'removeEntity',
|
|
3298
|
+
value: function removeEntity(e, entity) {
|
|
3299
|
+
e.stopPropagation();
|
|
3300
|
+
var _props7 = this.props,
|
|
3301
|
+
change = _props7.change,
|
|
3302
|
+
step = _props7.step,
|
|
3303
|
+
formValues = _props7.formValues;
|
|
3304
|
+
|
|
3281
3305
|
var includedFields = formValues[step.mode + 'Schema'] || {};
|
|
3282
3306
|
var obj = Object.assign({}, includedFields);
|
|
3283
|
-
obj[
|
|
3307
|
+
delete obj[entity];
|
|
3284
3308
|
change(step.mode + 'Schema', obj);
|
|
3285
3309
|
}
|
|
3286
3310
|
}, {
|
|
@@ -3288,29 +3312,19 @@ module.exports =
|
|
|
3288
3312
|
value: function render() {
|
|
3289
3313
|
var _this2 = this;
|
|
3290
3314
|
|
|
3291
|
-
var
|
|
3292
|
-
inputs =
|
|
3293
|
-
handleSubmit =
|
|
3294
|
-
nav =
|
|
3295
|
-
formValues =
|
|
3296
|
-
step =
|
|
3297
|
-
reset =
|
|
3298
|
-
change =
|
|
3315
|
+
var _props8 = this.props,
|
|
3316
|
+
inputs = _props8.inputs,
|
|
3317
|
+
handleSubmit = _props8.handleSubmit,
|
|
3318
|
+
nav = _props8.nav,
|
|
3319
|
+
formValues = _props8.formValues,
|
|
3320
|
+
step = _props8.step,
|
|
3321
|
+
reset = _props8.reset,
|
|
3322
|
+
change = _props8.change;
|
|
3299
3323
|
|
|
3300
3324
|
var includedFields = formValues[step.mode + 'Schema'] || {};
|
|
3301
3325
|
var Button = inputs.Button;
|
|
3302
3326
|
var Input = inputs.Input;
|
|
3303
3327
|
var Select = inputs.Select;
|
|
3304
|
-
var smallButtonStyle = {
|
|
3305
|
-
marginLeft: 4,
|
|
3306
|
-
height: 22,
|
|
3307
|
-
width: 68,
|
|
3308
|
-
lineHeight: '20px',
|
|
3309
|
-
padding: 0,
|
|
3310
|
-
verticalAlign: 'middle',
|
|
3311
|
-
marginBottom: 4,
|
|
3312
|
-
fontSize: 10
|
|
3313
|
-
};
|
|
3314
3328
|
return _react2.default.createElement(
|
|
3315
3329
|
'form',
|
|
3316
3330
|
{ onKeyPress: function onKeyPress(e) {
|
|
@@ -3371,16 +3385,17 @@ module.exports =
|
|
|
3371
3385
|
_react2.default.createElement('br', null),
|
|
3372
3386
|
_react2.default.createElement('br', null)
|
|
3373
3387
|
),
|
|
3374
|
-
|
|
3388
|
+
includedFields && Object.keys(includedFields).length > 0 ? _react2.default.createElement(
|
|
3375
3389
|
'div',
|
|
3376
3390
|
{ style: { position: 'relative', width: 550, marginLeft: 16 } },
|
|
3377
|
-
|
|
3391
|
+
_react2.default.createElement(_schemaAccordion2.default, { values: includedFields,
|
|
3378
3392
|
pickEntity: this.pickEntity, inputs: inputs, step: step,
|
|
3379
3393
|
change: change, formValues: formValues,
|
|
3380
3394
|
selectedEntity: this.state.selectedDataEntity,
|
|
3381
3395
|
innerSelectedEntity: this.state.innerSelectedEntity,
|
|
3382
|
-
selectAll: this.selectAll, deselectAll: this.deselectAll
|
|
3383
|
-
|
|
3396
|
+
selectAll: this.selectAll, deselectAll: this.deselectAll,
|
|
3397
|
+
removeEntity: this.removeEntity
|
|
3398
|
+
}),
|
|
3384
3399
|
_react2.default.createElement('br', null)
|
|
3385
3400
|
) : null,
|
|
3386
3401
|
_react2.default.createElement(_navButtons2.default, { handleSubmit: handleSubmit, nav: nav, reset: reset, inputs: inputs }),
|
|
@@ -3477,7 +3492,7 @@ module.exports =
|
|
|
3477
3492
|
'div',
|
|
3478
3493
|
{ ref: function ref(_ref) {
|
|
3479
3494
|
_this2.main = _ref;
|
|
3480
|
-
},
|
|
3495
|
+
},
|
|
3481
3496
|
style: {
|
|
3482
3497
|
background: 'white', height: 288, width: 350, overflow: 'scroll',
|
|
3483
3498
|
border: '1px solid rgb(204, 205, 207)', padding: 12
|
|
@@ -3497,7 +3512,7 @@ module.exports =
|
|
|
3497
3512
|
style: { height: 35 },
|
|
3498
3513
|
onClick: function onClick() {
|
|
3499
3514
|
_this2.setState({ innerSelectedEntity: selectedEntity === entity && _this2.state.innerSelectedEntity === entity ? '' : entity });
|
|
3500
|
-
_this2.scrollToTop(_this2.main, 18, i *
|
|
3515
|
+
_this2.scrollToTop(_this2.main, 18, i * 43 + 6);
|
|
3501
3516
|
pickEntity(entity);
|
|
3502
3517
|
}
|
|
3503
3518
|
},
|
|
@@ -3507,7 +3522,7 @@ module.exports =
|
|
|
3507
3522
|
'div',
|
|
3508
3523
|
{ className: 'accordion-panel-collapse',
|
|
3509
3524
|
style: {
|
|
3510
|
-
height: _this2.state.innerSelectedEntity === entity ? Object.keys(values[entity]).length *
|
|
3525
|
+
height: _this2.state.innerSelectedEntity === entity ? Object.keys(values[entity]).length * 18 + 19 : 0
|
|
3511
3526
|
}
|
|
3512
3527
|
},
|
|
3513
3528
|
_react2.default.createElement('div', { style: { height: 9 } }),
|
|
@@ -3520,7 +3535,7 @@ module.exports =
|
|
|
3520
3535
|
style: {
|
|
3521
3536
|
paddingLeft: 5,
|
|
3522
3537
|
background: selectedField && selectedField === field ? '#dfe0e0' : 'initial',
|
|
3523
|
-
fontWeight: mode === 'source' && mappings && Object.keys(mappings).includes(entity + '.' + field) ? 'bold' : 'normal',
|
|
3538
|
+
fontWeight: mode === 'source' && mappings && Object.keys(mappings).includes(entity + '.' + field) || mode === 'destination' && mappings && Object.keys(mappings).includes(entity + '.' + field) ? 'bold' : 'normal',
|
|
3524
3539
|
color: mode === 'destination' && !selectedField ? 'grey' : 'black'
|
|
3525
3540
|
},
|
|
3526
3541
|
onClick: function onClick() {
|
|
@@ -3613,7 +3628,9 @@ module.exports =
|
|
|
3613
3628
|
value: function newFieldKeyPress(e) {
|
|
3614
3629
|
if (e.charCode === 13) {
|
|
3615
3630
|
e.preventDefault();
|
|
3616
|
-
this.
|
|
3631
|
+
if (this.state.newField) {
|
|
3632
|
+
this.addCustomField(e);
|
|
3633
|
+
}
|
|
3617
3634
|
}
|
|
3618
3635
|
}
|
|
3619
3636
|
}, {
|
|
@@ -3647,7 +3664,8 @@ module.exports =
|
|
|
3647
3664
|
pickEntity = _props2.pickEntity,
|
|
3648
3665
|
values = _props2.values,
|
|
3649
3666
|
selectedEntity = _props2.selectedEntity,
|
|
3650
|
-
innerSelectedEntity = _props2.innerSelectedEntity
|
|
3667
|
+
innerSelectedEntity = _props2.innerSelectedEntity,
|
|
3668
|
+
removeEntity = _props2.removeEntity;
|
|
3651
3669
|
|
|
3652
3670
|
var Button = inputs.Button;
|
|
3653
3671
|
var Input = inputs.Input;
|
|
@@ -3665,7 +3683,7 @@ module.exports =
|
|
|
3665
3683
|
'div',
|
|
3666
3684
|
{ ref: function ref(_ref) {
|
|
3667
3685
|
_this2.main = _ref;
|
|
3668
|
-
},
|
|
3686
|
+
},
|
|
3669
3687
|
style: {
|
|
3670
3688
|
background: 'white', height: 350, width: 550, overflow: 'scroll',
|
|
3671
3689
|
border: '1px solid rgb(204, 205, 207)', padding: 12
|
|
@@ -3689,28 +3707,35 @@ module.exports =
|
|
|
3689
3707
|
{ style: { paddingTop: 8, overflow: 'hidden', display: 'inline-block', width: 227, textDecoration: 'inherit' } },
|
|
3690
3708
|
entity
|
|
3691
3709
|
),
|
|
3692
|
-
_react2.default.createElement(
|
|
3693
|
-
|
|
3694
|
-
{
|
|
3695
|
-
|
|
3696
|
-
|
|
3697
|
-
|
|
3698
|
-
|
|
3699
|
-
|
|
3700
|
-
|
|
3701
|
-
|
|
3702
|
-
|
|
3703
|
-
|
|
3704
|
-
|
|
3705
|
-
|
|
3706
|
-
|
|
3707
|
-
|
|
3708
|
-
|
|
3709
|
-
|
|
3710
|
-
|
|
3711
|
-
|
|
3712
|
-
|
|
3713
|
-
|
|
3710
|
+
innerSelectedEntity === entity ? _react2.default.createElement(
|
|
3711
|
+
'div',
|
|
3712
|
+
{ style: { display: 'inline-block', verticalAlign: 'top' }, className: 'transition' },
|
|
3713
|
+
_react2.default.createElement(Input, { type: 'text', value: _this2.state.newField, disabled: !selectedEntity,
|
|
3714
|
+
onChange: function onChange(e) {
|
|
3715
|
+
return !e.target.value.includes('.') && e.target.value.charAt(0) !== ' ' ? _this2.setState({ newField: e.target.value }) : {};
|
|
3716
|
+
},
|
|
3717
|
+
style: { width: 200, display: 'inline-block' }, placeholder: 'Add Field', onKeyPress: _this2.newFieldKeyPress,
|
|
3718
|
+
onClick: function onClick(e) {
|
|
3719
|
+
return e.stopPropagation();
|
|
3720
|
+
}
|
|
3721
|
+
}),
|
|
3722
|
+
_react2.default.createElement(
|
|
3723
|
+
Button,
|
|
3724
|
+
{ type: 'neutral', onClick: _this2.addCustomField, disabled: !_this2.state.newField,
|
|
3725
|
+
style: { marginLeft: 10 } },
|
|
3726
|
+
'Add'
|
|
3727
|
+
)
|
|
3728
|
+
) : _react2.default.createElement(
|
|
3729
|
+
'div',
|
|
3730
|
+
{ className: 'accordion-panel-close', onClick: function onClick(e) {
|
|
3731
|
+
return removeEntity(e, entity);
|
|
3732
|
+
} },
|
|
3733
|
+
_react2.default.createElement(
|
|
3734
|
+
'svg',
|
|
3735
|
+
{ style: { width: 18, height: 18 }, viewBox: '0 0 60 60' },
|
|
3736
|
+
_react2.default.createElement('path', { style: { stroke: 'white', fill: 'white', strokeWidth: 5, strokeLinecap: 'round' },
|
|
3737
|
+
d: 'M 15.674663,15.572746 L 44.587629,44.485711 M 45.118838,15.420972 L 15.522889,45.016920' })
|
|
3738
|
+
)
|
|
3714
3739
|
)
|
|
3715
3740
|
),
|
|
3716
3741
|
_react2.default.createElement(
|
|
@@ -3756,7 +3781,7 @@ module.exports =
|
|
|
3756
3781
|
'div',
|
|
3757
3782
|
{ className: 'accordion-panel-collapse',
|
|
3758
3783
|
style: {
|
|
3759
|
-
height:
|
|
3784
|
+
height: Object.keys(values[entity]).length * 19 + 9
|
|
3760
3785
|
}
|
|
3761
3786
|
},
|
|
3762
3787
|
Object.keys(values[entity]).filter(function (f) {
|