@lingk/sync 0.0.16 → 0.0.18
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/README.md +6 -4
- package/build/lightning.js +2 -1
- package/build/lightning.js.map +1 -1
- package/build/lingk.js +3 -2
- package/build/lingk.js.map +1 -1
- package/build/main.js +105 -46
- package/build/main.js.map +1 -1
- package/build/reducer.js.map +1 -1
- package/package.json +1 -1
package/build/main.js
CHANGED
|
@@ -485,7 +485,11 @@ module.exports =
|
|
|
485
485
|
credentials: [{ name: 'Username' }, { name: 'Password' }, { name: 'Public Key' }]
|
|
486
486
|
},
|
|
487
487
|
Banner: {
|
|
488
|
-
credentials: null
|
|
488
|
+
credentials: null,
|
|
489
|
+
customStep: {
|
|
490
|
+
type: 'adapter',
|
|
491
|
+
title: 'Banner Adapter'
|
|
492
|
+
}
|
|
489
493
|
}
|
|
490
494
|
};
|
|
491
495
|
|
|
@@ -1860,13 +1864,13 @@ module.exports =
|
|
|
1860
1864
|
|
|
1861
1865
|
function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }
|
|
1862
1866
|
|
|
1863
|
-
var
|
|
1864
|
-
_inherits(
|
|
1867
|
+
var AdapterStep = function (_Component) {
|
|
1868
|
+
_inherits(AdapterStep, _Component);
|
|
1865
1869
|
|
|
1866
|
-
function
|
|
1867
|
-
_classCallCheck(this,
|
|
1870
|
+
function AdapterStep() {
|
|
1871
|
+
_classCallCheck(this, AdapterStep);
|
|
1868
1872
|
|
|
1869
|
-
var _this = _possibleConstructorReturn(this, (
|
|
1873
|
+
var _this = _possibleConstructorReturn(this, (AdapterStep.__proto__ || Object.getPrototypeOf(AdapterStep)).call(this));
|
|
1870
1874
|
|
|
1871
1875
|
_this.state = {
|
|
1872
1876
|
showSecret: false
|
|
@@ -1874,7 +1878,7 @@ module.exports =
|
|
|
1874
1878
|
return _this;
|
|
1875
1879
|
}
|
|
1876
1880
|
|
|
1877
|
-
_createClass(
|
|
1881
|
+
_createClass(AdapterStep, [{
|
|
1878
1882
|
key: 'render',
|
|
1879
1883
|
value: function render() {
|
|
1880
1884
|
var _this2 = this;
|
|
@@ -2018,7 +2022,7 @@ module.exports =
|
|
|
2018
2022
|
}
|
|
2019
2023
|
}]);
|
|
2020
2024
|
|
|
2021
|
-
return
|
|
2025
|
+
return AdapterStep;
|
|
2022
2026
|
}(_react.Component);
|
|
2023
2027
|
|
|
2024
2028
|
exports.default = (0, _reduxForm.reduxForm)({
|
|
@@ -2027,7 +2031,7 @@ module.exports =
|
|
|
2027
2031
|
forceUnregisterOnUnmount: true,
|
|
2028
2032
|
touchOnBlur: false,
|
|
2029
2033
|
validate: _validate2.default
|
|
2030
|
-
})(
|
|
2034
|
+
})(AdapterStep);
|
|
2031
2035
|
|
|
2032
2036
|
/***/ },
|
|
2033
2037
|
/* 37 */
|
|
@@ -2082,6 +2086,19 @@ module.exports =
|
|
|
2082
2086
|
|
|
2083
2087
|
change('deployment', formValues.deployment || Object.keys(step.options)[0]);
|
|
2084
2088
|
}
|
|
2089
|
+
}, {
|
|
2090
|
+
key: 'options',
|
|
2091
|
+
value: function options(ops) {
|
|
2092
|
+
var deploymentTitles = {
|
|
2093
|
+
'once': 'Run Once',
|
|
2094
|
+
'scheduled': 'Timed Schedule'
|
|
2095
|
+
};
|
|
2096
|
+
var obj = {};
|
|
2097
|
+
ops.forEach(function (o) {
|
|
2098
|
+
obj[o] = deploymentTitles[o];
|
|
2099
|
+
});
|
|
2100
|
+
return obj;
|
|
2101
|
+
}
|
|
2085
2102
|
}, {
|
|
2086
2103
|
key: 'render',
|
|
2087
2104
|
value: function render() {
|
|
@@ -2108,7 +2125,7 @@ module.exports =
|
|
|
2108
2125
|
'div',
|
|
2109
2126
|
{ style: { marginLeft: 16 } },
|
|
2110
2127
|
_react2.default.createElement(_reduxForm.Field, { name: 'deployment', component: inputs.rfRadioGroup, label: 'Deployment Type',
|
|
2111
|
-
options: step.options
|
|
2128
|
+
options: this.options(step.options)
|
|
2112
2129
|
}),
|
|
2113
2130
|
_react2.default.createElement('br', null),
|
|
2114
2131
|
step.options && formValues.deployment === 'scheduled' ? _react2.default.createElement(
|
|
@@ -3334,26 +3351,18 @@ module.exports =
|
|
|
3334
3351
|
'div',
|
|
3335
3352
|
{ style: { fontSize: 20 } },
|
|
3336
3353
|
step.mode.charAt(0).toUpperCase() + step.mode.slice(1),
|
|
3337
|
-
':
|
|
3354
|
+
': Build ',
|
|
3338
3355
|
step.provider,
|
|
3339
|
-
'
|
|
3356
|
+
' Dataset'
|
|
3340
3357
|
),
|
|
3341
3358
|
_react2.default.createElement('br', null),
|
|
3342
3359
|
_react2.default.createElement(
|
|
3343
3360
|
'div',
|
|
3344
3361
|
{ style: { marginLeft: 16 } },
|
|
3345
|
-
_react2.default.createElement(
|
|
3346
|
-
'div',
|
|
3347
|
-
{ style: { display: 'inline-block', width: 166 } },
|
|
3348
|
-
_react2.default.createElement(Select, { selectedDataEntity: this.state.selectedDataEntity, label: 'Add Default Entity',
|
|
3349
|
-
onSelect: this.addDefaultDataEntity, values: step.defaultSchema,
|
|
3350
|
-
selectedValues: formValues[step.mode + 'Schema']
|
|
3351
|
-
})
|
|
3352
|
-
),
|
|
3353
3362
|
_react2.default.createElement(
|
|
3354
3363
|
Button,
|
|
3355
3364
|
{ type: 'brand', onClick: this.loadDefault },
|
|
3356
|
-
'Load
|
|
3365
|
+
'Load Default Dataset'
|
|
3357
3366
|
),
|
|
3358
3367
|
'\xA0\xA0',
|
|
3359
3368
|
_react2.default.createElement(
|
|
@@ -3363,10 +3372,18 @@ module.exports =
|
|
|
3363
3372
|
),
|
|
3364
3373
|
_react2.default.createElement('br', null),
|
|
3365
3374
|
_react2.default.createElement('br', null),
|
|
3375
|
+
_react2.default.createElement(
|
|
3376
|
+
'div',
|
|
3377
|
+
{ style: { display: 'inline-block', width: 166 } },
|
|
3378
|
+
_react2.default.createElement(Select, { selectedDataEntity: this.state.selectedDataEntity, label: 'Add Default Entity',
|
|
3379
|
+
onSelect: this.addDefaultDataEntity, values: step.defaultSchema,
|
|
3380
|
+
selectedValues: formValues[step.mode + 'Schema'], title: 'Customize Dataset'
|
|
3381
|
+
})
|
|
3382
|
+
),
|
|
3366
3383
|
_react2.default.createElement(
|
|
3367
3384
|
'div',
|
|
3368
3385
|
{ style: { display: 'inline-block' } },
|
|
3369
|
-
_react2.default.createElement(Input, { label: '
|
|
3386
|
+
_react2.default.createElement(Input, { label: '', type: 'text', value: this.state.newEntity, onChange: function onChange(e) {
|
|
3370
3387
|
return !e.target.value.includes('.') ? _this2.setState({ newEntity: e.target.value }) : {};
|
|
3371
3388
|
},
|
|
3372
3389
|
style: { width: 245 }, placeholder: 'Add Custom Data Entity', onKeyPress: this.newEntityKeyPress })
|
|
@@ -3732,7 +3749,7 @@ module.exports =
|
|
|
3732
3749
|
} },
|
|
3733
3750
|
_react2.default.createElement(
|
|
3734
3751
|
'svg',
|
|
3735
|
-
{ style: { width: 18, height: 18 }, viewBox: '0 0 60 60' },
|
|
3752
|
+
{ xmlns: 'http://www.w3.org/2000/svg', style: { width: 18, height: 18 }, viewBox: '0 0 60 60' },
|
|
3736
3753
|
_react2.default.createElement('path', { style: { stroke: 'white', fill: 'white', strokeWidth: 5, strokeLinecap: 'round' },
|
|
3737
3754
|
d: 'M 15.674663,15.572746 L 44.587629,44.485711 M 45.118838,15.420972 L 15.522889,45.016920' })
|
|
3738
3755
|
)
|
|
@@ -3741,7 +3758,8 @@ module.exports =
|
|
|
3741
3758
|
_react2.default.createElement(
|
|
3742
3759
|
_reactAddonsCssTransitionGroup2.default,
|
|
3743
3760
|
{ transitionName: 'fieldslabel', transitionEnterTimeout: 200, transitionLeaveTimeout: 200 },
|
|
3744
|
-
innerSelectedEntity === entity ?
|
|
3761
|
+
innerSelectedEntity === entity ? // && Object.keys(values[entity]).length > 0
|
|
3762
|
+
_react2.default.createElement(
|
|
3745
3763
|
'div',
|
|
3746
3764
|
null,
|
|
3747
3765
|
_react2.default.createElement(
|
|
@@ -3879,9 +3897,9 @@ module.exports =
|
|
|
3879
3897
|
|
|
3880
3898
|
var _nameStep2 = _interopRequireDefault(_nameStep);
|
|
3881
3899
|
|
|
3882
|
-
var
|
|
3900
|
+
var _adapterStep = __webpack_require__(36);
|
|
3883
3901
|
|
|
3884
|
-
var
|
|
3902
|
+
var _adapterStep2 = _interopRequireDefault(_adapterStep);
|
|
3885
3903
|
|
|
3886
3904
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
3887
3905
|
|
|
@@ -3916,7 +3934,7 @@ module.exports =
|
|
|
3916
3934
|
map: _mapStep2.default,
|
|
3917
3935
|
preview: _previewStep2.default,
|
|
3918
3936
|
deploy: _deployStep2.default,
|
|
3919
|
-
|
|
3937
|
+
adapter: _adapterStep2.default,
|
|
3920
3938
|
name: _nameStep2.default
|
|
3921
3939
|
};
|
|
3922
3940
|
return _this;
|
|
@@ -4145,6 +4163,45 @@ module.exports =
|
|
|
4145
4163
|
|
|
4146
4164
|
function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }
|
|
4147
4165
|
|
|
4166
|
+
var wiz = {
|
|
4167
|
+
title: 'Banner to Salesforce',
|
|
4168
|
+
source: {
|
|
4169
|
+
type: 'Banner',
|
|
4170
|
+
name: 'Banner',
|
|
4171
|
+
env: true,
|
|
4172
|
+
defaultSchema: example.wizards[1].sourceDefaultSchema
|
|
4173
|
+
},
|
|
4174
|
+
destination: {
|
|
4175
|
+
type: 'Salesforce',
|
|
4176
|
+
name: 'Salesforce',
|
|
4177
|
+
env: false,
|
|
4178
|
+
defaultSchema: example.wizards[1].destinationDefaultSchema
|
|
4179
|
+
},
|
|
4180
|
+
deployment: ['once', 'scheduled'],
|
|
4181
|
+
autoMapData: example.wizards[1].autoMapData,
|
|
4182
|
+
dummyData: example.wizards[1].dummyData
|
|
4183
|
+
};
|
|
4184
|
+
/*
|
|
4185
|
+
id: 2,
|
|
4186
|
+
title: 'Banner to Salesforce',
|
|
4187
|
+
description: 'On-premise Banner instance to Salesforce Org.',
|
|
4188
|
+
tag:'Activated',
|
|
4189
|
+
source:{
|
|
4190
|
+
title: 'Banner',
|
|
4191
|
+
type: 'banner',
|
|
4192
|
+
defaultSchema: 'guid',
|
|
4193
|
+
env: true
|
|
4194
|
+
},
|
|
4195
|
+
destination:{
|
|
4196
|
+
title: 'Salesforce',
|
|
4197
|
+
type: 'salesforce',
|
|
4198
|
+
defaultSchema: 'guid',
|
|
4199
|
+
env: false
|
|
4200
|
+
},
|
|
4201
|
+
defaultMapping: 'guid',
|
|
4202
|
+
deployment: ['once', 'scheduled'], // keys for deployment options
|
|
4203
|
+
*/
|
|
4204
|
+
|
|
4148
4205
|
var LingkSync = function (_Component) {
|
|
4149
4206
|
_inherits(LingkSync, _Component);
|
|
4150
4207
|
|
|
@@ -4179,7 +4236,7 @@ module.exports =
|
|
|
4179
4236
|
mode: 'source'
|
|
4180
4237
|
}, {
|
|
4181
4238
|
type: 'schema',
|
|
4182
|
-
title: 'Source
|
|
4239
|
+
title: 'Source Dataset',
|
|
4183
4240
|
mode: 'source'
|
|
4184
4241
|
}, {
|
|
4185
4242
|
type: 'filter',
|
|
@@ -4190,7 +4247,7 @@ module.exports =
|
|
|
4190
4247
|
mode: 'destination'
|
|
4191
4248
|
}, {
|
|
4192
4249
|
type: 'schema',
|
|
4193
|
-
title: 'Destination
|
|
4250
|
+
title: 'Destination Dataset',
|
|
4194
4251
|
mode: 'destination'
|
|
4195
4252
|
}, {
|
|
4196
4253
|
type: 'map',
|
|
@@ -4208,7 +4265,7 @@ module.exports =
|
|
|
4208
4265
|
_createClass(LingkSync, [{
|
|
4209
4266
|
key: 'componentDidMount',
|
|
4210
4267
|
value: function componentDidMount() {
|
|
4211
|
-
var wizard =
|
|
4268
|
+
var wizard = wiz;
|
|
4212
4269
|
var stepList = [];
|
|
4213
4270
|
|
|
4214
4271
|
for (var i = 0; i < this.allSteps.length; i++) {
|
|
@@ -4217,35 +4274,37 @@ module.exports =
|
|
|
4217
4274
|
step.name = wizard.title;
|
|
4218
4275
|
stepList.push(step);
|
|
4219
4276
|
} else if (step.type === 'custom') {
|
|
4220
|
-
|
|
4221
|
-
|
|
4222
|
-
step.
|
|
4277
|
+
var customStep = examp.providerTypes[wizard.source.type].customStep;
|
|
4278
|
+
if (customStep) {
|
|
4279
|
+
step.type = customStep.type;
|
|
4280
|
+
step.title = customStep.title;
|
|
4223
4281
|
stepList.push(step);
|
|
4224
4282
|
}
|
|
4225
4283
|
} else if (step.type === 'environment') {
|
|
4226
|
-
if (step.mode === 'source') {
|
|
4227
|
-
step.provider = wizard.
|
|
4228
|
-
step.credentials = examp.providerTypes[wizard.
|
|
4229
|
-
|
|
4284
|
+
if (step.mode === 'source' && wizard.source.env) {
|
|
4285
|
+
step.provider = wizard.source.name;
|
|
4286
|
+
step.credentials = examp.providerTypes[wizard.source.type].credentials || null;
|
|
4287
|
+
stepList.push(step);
|
|
4288
|
+
} else if (step.mode === 'destination' && wizard.destination.env) {
|
|
4230
4289
|
step.provider = wizard.destinationProvider;
|
|
4231
|
-
step.credentials = examp.providerTypes[wizard.
|
|
4290
|
+
step.credentials = examp.providerTypes[wizard.destination.type].credentials || null;
|
|
4291
|
+
stepList.push(step);
|
|
4232
4292
|
}
|
|
4233
|
-
stepList.push(step);
|
|
4234
4293
|
} else if (step.type === 'schema') {
|
|
4235
4294
|
if (step.mode === 'source') {
|
|
4236
|
-
step.provider = wizard.
|
|
4237
|
-
step.defaultSchema = wizard.
|
|
4295
|
+
step.provider = wizard.source.name;
|
|
4296
|
+
step.defaultSchema = wizard.source.defaultSchema || null;
|
|
4238
4297
|
} else if (step.mode === 'destination') {
|
|
4239
|
-
step.provider = wizard.
|
|
4240
|
-
step.defaultSchema = wizard.
|
|
4298
|
+
step.provider = wizard.destination.name;
|
|
4299
|
+
step.defaultSchema = wizard.destination.defaultSchema || null;
|
|
4241
4300
|
}
|
|
4242
4301
|
stepList.push(step);
|
|
4243
4302
|
} else if (step.type === 'filter') {
|
|
4244
|
-
step.provider = wizard.
|
|
4303
|
+
step.provider = wizard.source.name;
|
|
4245
4304
|
stepList.push(step);
|
|
4246
4305
|
} else if (step.type === 'map') {
|
|
4247
|
-
step.sourceProvider = wizard.
|
|
4248
|
-
step.destinationProvider = wizard.
|
|
4306
|
+
step.sourceProvider = wizard.source.name;
|
|
4307
|
+
step.destinationProvider = wizard.destination.name;
|
|
4249
4308
|
step.autoMapData = wizard.autoMapData || null;
|
|
4250
4309
|
stepList.push(step);
|
|
4251
4310
|
} else if (step.type === 'preview') {
|