@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
|
@@ -486,6 +486,8 @@ module.exports =
|
|
|
486
486
|
value: true
|
|
487
487
|
});
|
|
488
488
|
|
|
489
|
+
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; }; }();
|
|
490
|
+
|
|
489
491
|
var _react = __webpack_require__(1);
|
|
490
492
|
|
|
491
493
|
var _react2 = _interopRequireDefault(_react);
|
|
@@ -494,6 +496,12 @@ module.exports =
|
|
|
494
496
|
|
|
495
497
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
496
498
|
|
|
499
|
+
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
|
500
|
+
|
|
501
|
+
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; }
|
|
502
|
+
|
|
503
|
+
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; }
|
|
504
|
+
|
|
497
505
|
// SKIP ON SERVER-SIDE RENDERING
|
|
498
506
|
var codemirror = null;
|
|
499
507
|
if (typeof window !== 'undefined' && typeof window.navigator !== 'undefined') {
|
|
@@ -507,96 +515,125 @@ module.exports =
|
|
|
507
515
|
});
|
|
508
516
|
}
|
|
509
517
|
|
|
510
|
-
var Google = function
|
|
511
|
-
|
|
512
|
-
|
|
513
|
-
|
|
514
|
-
|
|
515
|
-
inputs = props.inputs,
|
|
516
|
-
onCheck = props.onCheck;
|
|
518
|
+
var Google = function (_Component) {
|
|
519
|
+
_inherits(Google, _Component);
|
|
520
|
+
|
|
521
|
+
function Google() {
|
|
522
|
+
_classCallCheck(this, Google);
|
|
517
523
|
|
|
518
|
-
|
|
519
|
-
var Button = inputs.Button;
|
|
520
|
-
var Select = inputs.Select;
|
|
521
|
-
var CodeMirror = codemirror && codemirror.Controlled;
|
|
524
|
+
var _this = _possibleConstructorReturn(this, (Google.__proto__ || Object.getPrototypeOf(Google)).call(this));
|
|
522
525
|
|
|
523
|
-
|
|
526
|
+
_this.state = {
|
|
527
|
+
showPass: false
|
|
528
|
+
};
|
|
529
|
+
return _this;
|
|
530
|
+
}
|
|
524
531
|
|
|
525
|
-
|
|
532
|
+
_createClass(Google, [{
|
|
533
|
+
key: 'render',
|
|
534
|
+
value: function render() {
|
|
535
|
+
var _this2 = this;
|
|
526
536
|
|
|
527
|
-
|
|
528
|
-
|
|
529
|
-
|
|
530
|
-
|
|
531
|
-
|
|
532
|
-
|
|
533
|
-
|
|
534
|
-
|
|
535
|
-
|
|
536
|
-
|
|
537
|
-
|
|
538
|
-
|
|
539
|
-
|
|
540
|
-
|
|
537
|
+
var _props = this.props,
|
|
538
|
+
config = _props.config,
|
|
539
|
+
creds = _props.creds,
|
|
540
|
+
onChange = _props.onChange,
|
|
541
|
+
credsDisabledCheck = _props.credsDisabledCheck,
|
|
542
|
+
inputs = _props.inputs,
|
|
543
|
+
onCheck = _props.onCheck;
|
|
544
|
+
|
|
545
|
+
var Input = inputs.Input;
|
|
546
|
+
var Button = inputs.Button;
|
|
547
|
+
var Select = inputs.Select;
|
|
548
|
+
var CodeMirror = codemirror && codemirror.Controlled;
|
|
549
|
+
|
|
550
|
+
var CloudSQLTypes = [{ name: 'Postgres', satisfiesSearch: true, type: 'Postgres', title: 'Postgres' }, { name: 'MySQL', satisfiesSearch: true, type: 'MySQL', title: 'MySQL' }];
|
|
551
|
+
|
|
552
|
+
var onlyJson = config.credentials && config.credentials.length === 1 && config.credentials[0] === 'json';
|
|
553
|
+
|
|
554
|
+
return _react2.default.createElement(
|
|
541
555
|
'div',
|
|
542
|
-
|
|
543
|
-
config.credentials.
|
|
544
|
-
|
|
556
|
+
null,
|
|
557
|
+
config.credentials && _react2.default.createElement(
|
|
558
|
+
'div',
|
|
559
|
+
{ style: { marginLeft: 1 } },
|
|
560
|
+
_react2.default.createElement(
|
|
561
|
+
'label',
|
|
562
|
+
{ htmlFor: 'creds' },
|
|
563
|
+
config.label || config.type,
|
|
564
|
+
' Credentials'
|
|
565
|
+
),
|
|
566
|
+
_react2.default.createElement('br', null),
|
|
567
|
+
_react2.default.createElement(
|
|
545
568
|
'div',
|
|
546
|
-
{
|
|
547
|
-
|
|
548
|
-
|
|
549
|
-
|
|
550
|
-
|
|
551
|
-
|
|
552
|
-
|
|
553
|
-
|
|
554
|
-
|
|
555
|
-
|
|
556
|
-
|
|
557
|
-
|
|
558
|
-
|
|
559
|
-
|
|
560
|
-
|
|
561
|
-
|
|
562
|
-
|
|
563
|
-
|
|
564
|
-
|
|
565
|
-
|
|
566
|
-
|
|
567
|
-
|
|
568
|
-
|
|
569
|
-
|
|
570
|
-
|
|
571
|
-
|
|
572
|
-
|
|
573
|
-
|
|
574
|
-
|
|
575
|
-
|
|
576
|
-
|
|
577
|
-
|
|
578
|
-
|
|
579
|
-
|
|
580
|
-
|
|
581
|
-
|
|
582
|
-
|
|
583
|
-
|
|
584
|
-
|
|
585
|
-
|
|
586
|
-
|
|
587
|
-
|
|
588
|
-
|
|
589
|
-
|
|
590
|
-
|
|
591
|
-
|
|
592
|
-
|
|
593
|
-
|
|
594
|
-
|
|
595
|
-
|
|
596
|
-
|
|
597
|
-
|
|
598
|
-
|
|
599
|
-
|
|
569
|
+
{ style: { display: 'inline-block', marginLeft: 16, width: '100%' } },
|
|
570
|
+
config.credentials.map(function (credType, index) {
|
|
571
|
+
return _react2.default.createElement(
|
|
572
|
+
'div',
|
|
573
|
+
{ key: index, style: { marginTop: 8, width: '100%' } },
|
|
574
|
+
_react2.default.createElement(
|
|
575
|
+
'label',
|
|
576
|
+
{ htmlFor: credType, className: 'labelz', style: { fontWeight: 'normal' } },
|
|
577
|
+
credType !== 'json' ? unCamelize(credType) : 'API key (paste json or drag-and-drop file)'
|
|
578
|
+
),
|
|
579
|
+
_react2.default.createElement('br', null),
|
|
580
|
+
credType !== 'json' ? _react2.default.createElement(
|
|
581
|
+
'div',
|
|
582
|
+
{ style: { display: 'inline-block', width: credType !== 'databaseType' ? 300 : 164 } },
|
|
583
|
+
credType !== 'databaseType' ? _react2.default.createElement(Input, { name: credType,
|
|
584
|
+
datatype: credType === 'password' && !_this2.state.showPass ? 'password' : null,
|
|
585
|
+
value: creds[credType] || '', onChange: onChange }) : _react2.default.createElement(Select, { vals: CloudSQLTypes, fieldPropLabel: 'name',
|
|
586
|
+
label: creds[credType] || 'Database Types',
|
|
587
|
+
onSelect: function onSelect(v) {
|
|
588
|
+
return onChange({ target: { name: credType, value: v } });
|
|
589
|
+
},
|
|
590
|
+
size: 'small', style: { width: 160, height: 31, textAlign: 'left' }
|
|
591
|
+
})
|
|
592
|
+
) : _react2.default.createElement(CodeMirror, { value: creds[credType],
|
|
593
|
+
className: 'env-creds-json-codemirror',
|
|
594
|
+
options: {
|
|
595
|
+
lineNumbers: true,
|
|
596
|
+
theme: 'default',
|
|
597
|
+
mode: 'javascript',
|
|
598
|
+
dragDrop: true
|
|
599
|
+
},
|
|
600
|
+
onBeforeChange: function onBeforeChange(e, d, v) {
|
|
601
|
+
return onChange({ target: { name: credType, value: v } });
|
|
602
|
+
}
|
|
603
|
+
}),
|
|
604
|
+
credType === 'password' && _react2.default.createElement(Key, { showPass: _this2.state.showPass,
|
|
605
|
+
onClick: function onClick() {
|
|
606
|
+
return _this2.setState({ showPass: !_this2.state.showPass });
|
|
607
|
+
}
|
|
608
|
+
}),
|
|
609
|
+
index === 0 && _react2.default.createElement(
|
|
610
|
+
Button,
|
|
611
|
+
{ type: 'brand',
|
|
612
|
+
onClick: function onClick() {
|
|
613
|
+
return onCheck(creds);
|
|
614
|
+
},
|
|
615
|
+
style: { marginLeft: onlyJson ? 0 : 8, marginTop: onlyJson ? 8 : 0,
|
|
616
|
+
marginBottom: 2, height: 30, lineHeight: '10px'
|
|
617
|
+
},
|
|
618
|
+
disabled: credsDisabledCheck },
|
|
619
|
+
_react2.default.createElement(
|
|
620
|
+
'span',
|
|
621
|
+
{ style: { display: 'inline-block', verticalAlign: 'top', marginTop: 3 } },
|
|
622
|
+
'Test Connection'
|
|
623
|
+
),
|
|
624
|
+
'\xA0\xA0',
|
|
625
|
+
_react2.default.createElement(Loop, null)
|
|
626
|
+
)
|
|
627
|
+
);
|
|
628
|
+
})
|
|
629
|
+
)
|
|
630
|
+
)
|
|
631
|
+
);
|
|
632
|
+
}
|
|
633
|
+
}]);
|
|
634
|
+
|
|
635
|
+
return Google;
|
|
636
|
+
}(_react.Component);
|
|
600
637
|
|
|
601
638
|
var Loop = function Loop() {
|
|
602
639
|
return _react2.default.createElement(
|
|
@@ -608,6 +645,19 @@ module.exports =
|
|
|
608
645
|
);
|
|
609
646
|
};
|
|
610
647
|
|
|
648
|
+
var Key = function Key(_ref) {
|
|
649
|
+
var onClick = _ref.onClick,
|
|
650
|
+
showPass = _ref.showPass;
|
|
651
|
+
|
|
652
|
+
return _react2.default.createElement(
|
|
653
|
+
'svg',
|
|
654
|
+
{ onClick: onClick, style: showPass ? { fill: '#3a91dcb3' } : {},
|
|
655
|
+
height: '24', width: '24', className: 'pass-key-svg', viewBox: '0 0 24 24' },
|
|
656
|
+
_react2.default.createElement('path', { d: 'M0 0h24v24H0z', fill: 'none' }),
|
|
657
|
+
_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' })
|
|
658
|
+
);
|
|
659
|
+
};
|
|
660
|
+
|
|
611
661
|
exports.default = Google;
|
|
612
662
|
|
|
613
663
|
/***/ },
|