@lingk/sync 1.0.69 → 1.0.71
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 +134 -84
- 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.map +1 -1
- package/build/lingkStyles.js.map +1 -1
- package/build/loadData.js.map +1 -1
- package/build/main.js +199 -110
- 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
|
@@ -2391,6 +2391,8 @@ module.exports =
|
|
|
2391
2391
|
value: true
|
|
2392
2392
|
});
|
|
2393
2393
|
|
|
2394
|
+
var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();
|
|
2395
|
+
|
|
2394
2396
|
var _react = __webpack_require__(1);
|
|
2395
2397
|
|
|
2396
2398
|
var _react2 = _interopRequireDefault(_react);
|
|
@@ -2399,6 +2401,12 @@ module.exports =
|
|
|
2399
2401
|
|
|
2400
2402
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
2401
2403
|
|
|
2404
|
+
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
|
2405
|
+
|
|
2406
|
+
function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; }
|
|
2407
|
+
|
|
2408
|
+
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; }
|
|
2409
|
+
|
|
2402
2410
|
// SKIP ON SERVER-SIDE RENDERING
|
|
2403
2411
|
var codemirror = null;
|
|
2404
2412
|
if (typeof window !== 'undefined' && typeof window.navigator !== 'undefined') {
|
|
@@ -2412,96 +2420,125 @@ module.exports =
|
|
|
2412
2420
|
});
|
|
2413
2421
|
}
|
|
2414
2422
|
|
|
2415
|
-
var Google = function
|
|
2416
|
-
|
|
2417
|
-
creds = props.creds,
|
|
2418
|
-
onChange = props.onChange,
|
|
2419
|
-
credsDisabledCheck = props.credsDisabledCheck,
|
|
2420
|
-
inputs = props.inputs,
|
|
2421
|
-
onCheck = props.onCheck;
|
|
2423
|
+
var Google = function (_Component) {
|
|
2424
|
+
_inherits(Google, _Component);
|
|
2422
2425
|
|
|
2423
|
-
|
|
2424
|
-
|
|
2425
|
-
var Select = inputs.Select;
|
|
2426
|
-
var CodeMirror = codemirror && codemirror.Controlled;
|
|
2426
|
+
function Google() {
|
|
2427
|
+
_classCallCheck(this, Google);
|
|
2427
2428
|
|
|
2428
|
-
|
|
2429
|
+
var _this = _possibleConstructorReturn(this, (Google.__proto__ || Object.getPrototypeOf(Google)).call(this));
|
|
2429
2430
|
|
|
2430
|
-
|
|
2431
|
+
_this.state = {
|
|
2432
|
+
showPass: false
|
|
2433
|
+
};
|
|
2434
|
+
return _this;
|
|
2435
|
+
}
|
|
2431
2436
|
|
|
2432
|
-
|
|
2433
|
-
'
|
|
2434
|
-
|
|
2435
|
-
|
|
2436
|
-
|
|
2437
|
-
|
|
2438
|
-
|
|
2439
|
-
|
|
2440
|
-
|
|
2441
|
-
|
|
2442
|
-
|
|
2443
|
-
|
|
2444
|
-
|
|
2445
|
-
|
|
2437
|
+
_createClass(Google, [{
|
|
2438
|
+
key: 'render',
|
|
2439
|
+
value: function render() {
|
|
2440
|
+
var _this2 = this;
|
|
2441
|
+
|
|
2442
|
+
var _props = this.props,
|
|
2443
|
+
config = _props.config,
|
|
2444
|
+
creds = _props.creds,
|
|
2445
|
+
onChange = _props.onChange,
|
|
2446
|
+
credsDisabledCheck = _props.credsDisabledCheck,
|
|
2447
|
+
inputs = _props.inputs,
|
|
2448
|
+
onCheck = _props.onCheck;
|
|
2449
|
+
|
|
2450
|
+
var Input = inputs.Input;
|
|
2451
|
+
var Button = inputs.Button;
|
|
2452
|
+
var Select = inputs.Select;
|
|
2453
|
+
var CodeMirror = codemirror && codemirror.Controlled;
|
|
2454
|
+
|
|
2455
|
+
var CloudSQLTypes = [{ name: 'Postgres', satisfiesSearch: true, type: 'Postgres', title: 'Postgres' }, { name: 'MySQL', satisfiesSearch: true, type: 'MySQL', title: 'MySQL' }];
|
|
2456
|
+
|
|
2457
|
+
var onlyJson = config.credentials && config.credentials.length === 1 && config.credentials[0] === 'json';
|
|
2458
|
+
|
|
2459
|
+
return _react2.default.createElement(
|
|
2446
2460
|
'div',
|
|
2447
|
-
|
|
2448
|
-
config.credentials.
|
|
2449
|
-
|
|
2461
|
+
null,
|
|
2462
|
+
config.credentials && _react2.default.createElement(
|
|
2463
|
+
'div',
|
|
2464
|
+
{ style: { marginLeft: 1 } },
|
|
2465
|
+
_react2.default.createElement(
|
|
2466
|
+
'label',
|
|
2467
|
+
{ htmlFor: 'creds' },
|
|
2468
|
+
config.label || config.type,
|
|
2469
|
+
' Credentials'
|
|
2470
|
+
),
|
|
2471
|
+
_react2.default.createElement('br', null),
|
|
2472
|
+
_react2.default.createElement(
|
|
2450
2473
|
'div',
|
|
2451
|
-
{
|
|
2452
|
-
|
|
2453
|
-
|
|
2454
|
-
|
|
2455
|
-
|
|
2456
|
-
|
|
2457
|
-
|
|
2458
|
-
|
|
2459
|
-
|
|
2460
|
-
|
|
2461
|
-
|
|
2462
|
-
|
|
2463
|
-
|
|
2464
|
-
|
|
2465
|
-
|
|
2466
|
-
|
|
2467
|
-
|
|
2468
|
-
|
|
2469
|
-
|
|
2470
|
-
|
|
2471
|
-
|
|
2472
|
-
|
|
2473
|
-
|
|
2474
|
-
|
|
2475
|
-
|
|
2476
|
-
|
|
2477
|
-
|
|
2478
|
-
|
|
2479
|
-
|
|
2480
|
-
|
|
2481
|
-
|
|
2482
|
-
|
|
2483
|
-
|
|
2484
|
-
|
|
2485
|
-
|
|
2486
|
-
|
|
2487
|
-
|
|
2488
|
-
|
|
2489
|
-
|
|
2490
|
-
|
|
2491
|
-
|
|
2492
|
-
|
|
2493
|
-
|
|
2494
|
-
|
|
2495
|
-
|
|
2496
|
-
|
|
2497
|
-
|
|
2498
|
-
|
|
2499
|
-
|
|
2500
|
-
|
|
2501
|
-
|
|
2502
|
-
|
|
2503
|
-
|
|
2504
|
-
|
|
2474
|
+
{ style: { display: 'inline-block', marginLeft: 16, width: '100%' } },
|
|
2475
|
+
config.credentials.map(function (credType, index) {
|
|
2476
|
+
return _react2.default.createElement(
|
|
2477
|
+
'div',
|
|
2478
|
+
{ key: index, style: { marginTop: 8, width: '100%' } },
|
|
2479
|
+
_react2.default.createElement(
|
|
2480
|
+
'label',
|
|
2481
|
+
{ htmlFor: credType, className: 'labelz', style: { fontWeight: 'normal' } },
|
|
2482
|
+
credType !== 'json' ? unCamelize(credType) : 'API key (paste json or drag-and-drop file)'
|
|
2483
|
+
),
|
|
2484
|
+
_react2.default.createElement('br', null),
|
|
2485
|
+
credType !== 'json' ? _react2.default.createElement(
|
|
2486
|
+
'div',
|
|
2487
|
+
{ style: { display: 'inline-block', width: credType !== 'databaseType' ? 300 : 164 } },
|
|
2488
|
+
credType !== 'databaseType' ? _react2.default.createElement(Input, { name: credType,
|
|
2489
|
+
datatype: credType === 'password' && !_this2.state.showPass ? 'password' : null,
|
|
2490
|
+
value: creds[credType] || '', onChange: onChange }) : _react2.default.createElement(Select, { vals: CloudSQLTypes, fieldPropLabel: 'name',
|
|
2491
|
+
label: creds[credType] || 'Database Types',
|
|
2492
|
+
onSelect: function onSelect(v) {
|
|
2493
|
+
return onChange({ target: { name: credType, value: v } });
|
|
2494
|
+
},
|
|
2495
|
+
size: 'small', style: { width: 160, height: 31, textAlign: 'left' }
|
|
2496
|
+
})
|
|
2497
|
+
) : _react2.default.createElement(CodeMirror, { value: creds[credType],
|
|
2498
|
+
className: 'env-creds-json-codemirror',
|
|
2499
|
+
options: {
|
|
2500
|
+
lineNumbers: true,
|
|
2501
|
+
theme: 'default',
|
|
2502
|
+
mode: 'javascript',
|
|
2503
|
+
dragDrop: true
|
|
2504
|
+
},
|
|
2505
|
+
onBeforeChange: function onBeforeChange(e, d, v) {
|
|
2506
|
+
return onChange({ target: { name: credType, value: v } });
|
|
2507
|
+
}
|
|
2508
|
+
}),
|
|
2509
|
+
credType === 'password' && _react2.default.createElement(Key, { showPass: _this2.state.showPass,
|
|
2510
|
+
onClick: function onClick() {
|
|
2511
|
+
return _this2.setState({ showPass: !_this2.state.showPass });
|
|
2512
|
+
}
|
|
2513
|
+
}),
|
|
2514
|
+
index === 0 && _react2.default.createElement(
|
|
2515
|
+
Button,
|
|
2516
|
+
{ type: 'brand',
|
|
2517
|
+
onClick: function onClick() {
|
|
2518
|
+
return onCheck(creds);
|
|
2519
|
+
},
|
|
2520
|
+
style: { marginLeft: onlyJson ? 0 : 8, marginTop: onlyJson ? 8 : 0,
|
|
2521
|
+
marginBottom: 2, height: 30, lineHeight: '10px'
|
|
2522
|
+
},
|
|
2523
|
+
disabled: credsDisabledCheck },
|
|
2524
|
+
_react2.default.createElement(
|
|
2525
|
+
'span',
|
|
2526
|
+
{ style: { display: 'inline-block', verticalAlign: 'top', marginTop: 3 } },
|
|
2527
|
+
'Test Connection'
|
|
2528
|
+
),
|
|
2529
|
+
'\xA0\xA0',
|
|
2530
|
+
_react2.default.createElement(Loop, null)
|
|
2531
|
+
)
|
|
2532
|
+
);
|
|
2533
|
+
})
|
|
2534
|
+
)
|
|
2535
|
+
)
|
|
2536
|
+
);
|
|
2537
|
+
}
|
|
2538
|
+
}]);
|
|
2539
|
+
|
|
2540
|
+
return Google;
|
|
2541
|
+
}(_react.Component);
|
|
2505
2542
|
|
|
2506
2543
|
var Loop = function Loop() {
|
|
2507
2544
|
return _react2.default.createElement(
|
|
@@ -2513,6 +2550,19 @@ module.exports =
|
|
|
2513
2550
|
);
|
|
2514
2551
|
};
|
|
2515
2552
|
|
|
2553
|
+
var Key = function Key(_ref) {
|
|
2554
|
+
var onClick = _ref.onClick,
|
|
2555
|
+
showPass = _ref.showPass;
|
|
2556
|
+
|
|
2557
|
+
return _react2.default.createElement(
|
|
2558
|
+
'svg',
|
|
2559
|
+
{ onClick: onClick, style: showPass ? { fill: '#3a91dcb3' } : {},
|
|
2560
|
+
height: '24', width: '24', className: 'pass-key-svg', viewBox: '0 0 24 24' },
|
|
2561
|
+
_react2.default.createElement('path', { d: 'M0 0h24v24H0z', fill: 'none' }),
|
|
2562
|
+
_react2.default.createElement('path', { d: 'M12.65 10C11.83 7.67 9.61 6 7 6c-3.31 0-6 2.69-6 6s2.69 6 6 6c2.61 0 4.83-1.67 5.65-4H17v4h4v-4h2v-4H12.65zM7 14c-1.1 0-2-.9-2-2s.9-2 2-2 2 .9 2 2-.9 2-2 2z' })
|
|
2563
|
+
);
|
|
2564
|
+
};
|
|
2565
|
+
|
|
2516
2566
|
exports.default = Google;
|
|
2517
2567
|
|
|
2518
2568
|
/***/ },
|
|
@@ -17278,12 +17328,11 @@ module.exports =
|
|
|
17278
17328
|
if (fileSchemaGuid) {
|
|
17279
17329
|
schemaGuid = fileSchemaGuid; // for SFTP guid is in wiz config
|
|
17280
17330
|
}
|
|
17281
|
-
|
|
17282
|
-
if
|
|
17283
|
-
|
|
17284
|
-
|
|
17285
|
-
|
|
17286
|
-
return dispatch(callGetProviderMetadata(tenantId, appId, metadataEndpoint, metadataApi, mode, providerType, endpoint, isOauth, environment.name, schemaGuid, resFromCheckConnection, creds, extraQuery));
|
|
17331
|
+
// let resFromCheckConnection = null
|
|
17332
|
+
// if(r && r.schema){ // currently only for SFTP check connection
|
|
17333
|
+
// resFromCheckConnection = r.schema // skip callGetProviderMetadata network call
|
|
17334
|
+
// }
|
|
17335
|
+
return dispatch(callGetProviderMetadata(tenantId, appId, providerConfig, mode, providerType, endpoint, isOauth, environment.name, schemaGuid, creds, extraQuery));
|
|
17287
17336
|
}).then(function (m) {
|
|
17288
17337
|
metadata = m;
|
|
17289
17338
|
var isIntro = endpoint === '_blank';
|
|
@@ -17448,11 +17497,15 @@ module.exports =
|
|
|
17448
17497
|
};
|
|
17449
17498
|
}
|
|
17450
17499
|
|
|
17451
|
-
function callGetProviderMetadata(tenantId, appId,
|
|
17500
|
+
function callGetProviderMetadata(tenantId, appId, providerConfig, mode, providerType, endpoint, isOauth, envName, schemaGuid, creds, extraQuery) {
|
|
17452
17501
|
// urlSuffix for getMetadata. If checkConnection returns meta, skip this one
|
|
17453
|
-
|
|
17502
|
+
var metadataEndpoint = providerConfig.metadataEndpoint,
|
|
17503
|
+
metadataApi = providerConfig.metadataApi,
|
|
17504
|
+
credentialType = providerConfig.credentialType;
|
|
17505
|
+
|
|
17506
|
+
if (!metadataEndpoint) {
|
|
17454
17507
|
return function () {
|
|
17455
|
-
return Promise.resolve(
|
|
17508
|
+
return Promise.resolve(null);
|
|
17456
17509
|
};
|
|
17457
17510
|
}
|
|
17458
17511
|
return function (dispatch, getState, api) {
|
|
@@ -17460,25 +17513,36 @@ module.exports =
|
|
|
17460
17513
|
config = _getState4.config;
|
|
17461
17514
|
|
|
17462
17515
|
var isAdapter = false;
|
|
17463
|
-
if (
|
|
17464
|
-
|
|
17516
|
+
if (metadataEndpoint === 'adaptermetadata') {
|
|
17517
|
+
metadataEndpoint = 'adaptermetadata?url=' + endpoint;
|
|
17465
17518
|
isAdapter = true;
|
|
17466
17519
|
}
|
|
17467
|
-
if (
|
|
17468
|
-
|
|
17520
|
+
if (metadataEndpoint === 'fileschema') {
|
|
17521
|
+
metadataEndpoint = 'fileschema?schemaGuid=' + schemaGuid;
|
|
17469
17522
|
}
|
|
17470
|
-
if (
|
|
17471
|
-
|
|
17523
|
+
if (metadataEndpoint === 'schema/swagger/moodle' && creds.swaggerUrl) {
|
|
17524
|
+
metadataEndpoint = 'schema/swagger/moodle?swaggerUrl=' + creds.swaggerUrl;
|
|
17472
17525
|
}
|
|
17473
|
-
if (
|
|
17474
|
-
|
|
17475
|
-
|
|
17476
|
-
|
|
17526
|
+
if (metadataApi === 'TEST_CONN_API_URL') {
|
|
17527
|
+
return api.post(tenantId + '/' + appId + '/' + metadataEndpoint, {
|
|
17528
|
+
endpoint: config[metadataApi],
|
|
17529
|
+
data: {
|
|
17530
|
+
credentialType: credentialType,
|
|
17531
|
+
credentialsJson: creds,
|
|
17532
|
+
providerLabel: providerType
|
|
17533
|
+
}
|
|
17477
17534
|
});
|
|
17478
17535
|
} else {
|
|
17479
|
-
|
|
17480
|
-
|
|
17481
|
-
|
|
17536
|
+
if (isOauth || isAdapter || providerType === 'Ethos') {
|
|
17537
|
+
// USE ONLY ENVS!!!
|
|
17538
|
+
return api.get(tenantId + '/' + appId + '/environments/' + envName + '/' + metadataEndpoint + (extraQuery || ''), {
|
|
17539
|
+
endpoint: config[metadataApi]
|
|
17540
|
+
});
|
|
17541
|
+
} else {
|
|
17542
|
+
return api.get(tenantId + '/' + appId + '/' + metadataEndpoint + (extraQuery || ''), {
|
|
17543
|
+
endpoint: config[metadataApi]
|
|
17544
|
+
});
|
|
17545
|
+
}
|
|
17482
17546
|
}
|
|
17483
17547
|
};
|
|
17484
17548
|
}
|
|
@@ -19657,7 +19721,6 @@ module.exports =
|
|
|
19657
19721
|
return !p.readOnly;
|
|
19658
19722
|
}).map(function (field, i) {
|
|
19659
19723
|
return _react2.default.createElement(_nestedField2.default, { key: i, field: field,
|
|
19660
|
-
selectedField: selectedField,
|
|
19661
19724
|
filteredMappings: mappings, parents: [],
|
|
19662
19725
|
onExpand: function onExpand(ex) {
|
|
19663
19726
|
return _this4.setState({ destinationExpanded: ex });
|
|
@@ -24791,6 +24854,28 @@ module.exports =
|
|
|
24791
24854
|
change('resourceGroups', resourceGroups);
|
|
24792
24855
|
this.assignAllParents(groupIndex);
|
|
24793
24856
|
}
|
|
24857
|
+
|
|
24858
|
+
/*addIntelligentMapping = () => {
|
|
24859
|
+
// only do for different providers
|
|
24860
|
+
// lowercase, remove spaces, compare labels only
|
|
24861
|
+
const group = {}
|
|
24862
|
+
const i=0; const sk=0; const rsc=0; const step=0;
|
|
24863
|
+
const map = {
|
|
24864
|
+
isExternalKeyMapping:true,
|
|
24865
|
+
resourceFromName:group.sourceKeysObjects[i],
|
|
24866
|
+
__resourceFromName:group.__sourceKeysObjects[i],
|
|
24867
|
+
propertyFromName:sk,
|
|
24868
|
+
__propertyFromName:group.__sourceKeys[i],
|
|
24869
|
+
resourceToName:group.name,
|
|
24870
|
+
__resourceToName:group.__name,
|
|
24871
|
+
propertyToName:group.destinationKeys[i],
|
|
24872
|
+
__propertyToName:group.__destinationKeys[i],
|
|
24873
|
+
propertyFromParents:group.sourceKeysParents[i],
|
|
24874
|
+
propertyToParents:group.destinationKeysParents[i],
|
|
24875
|
+
...rsc.provider.toLowerCase()===step.destinationProvider.toLowerCase() && {dataSourceIsDestinationEntity: true}
|
|
24876
|
+
}
|
|
24877
|
+
}*/
|
|
24878
|
+
|
|
24794
24879
|
}, {
|
|
24795
24880
|
key: 'newEntityKeyPress',
|
|
24796
24881
|
value: function newEntityKeyPress(e) {
|
|
@@ -25252,9 +25337,13 @@ module.exports =
|
|
|
25252
25337
|
'div',
|
|
25253
25338
|
{ className: 'fields-expander' },
|
|
25254
25339
|
field.object && field.object.properties.map(function (nestedField, i) {
|
|
25255
|
-
return _react2.default.createElement(NestedField, { key: i, field: nestedField,
|
|
25256
|
-
|
|
25257
|
-
|
|
25340
|
+
return _react2.default.createElement(NestedField, { key: i, field: nestedField,
|
|
25341
|
+
selectedField: selectedField,
|
|
25342
|
+
filteredMappings: filteredMappings,
|
|
25343
|
+
parents: parents.concat(field.label),
|
|
25344
|
+
click: click, onExpand: onExpand,
|
|
25345
|
+
expanded: expanded,
|
|
25346
|
+
showApiNames: showApiNames,
|
|
25258
25347
|
isDestination: isDestination
|
|
25259
25348
|
});
|
|
25260
25349
|
})
|