@lingk/sync 2.0.12 → 2.0.14

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/main.js CHANGED
@@ -6777,10 +6777,7 @@ module.exports =
6777
6777
  style: {
6778
6778
  height: 30,
6779
6779
  lineHeight: "10px",
6780
- marginTop: -1,
6781
- position: "absolute",
6782
- top: 130,
6783
- left: 850
6780
+ marginTop: 15
6784
6781
  },
6785
6782
  onClick: this.startOauth,
6786
6783
  disabled: credsDisabledCheck
@@ -7945,6 +7942,18 @@ module.exports =
7945
7942
 
7946
7943
  var _this = _possibleConstructorReturn(this, (EnvSection.__proto__ || Object.getPrototypeOf(EnvSection)).call(this));
7947
7944
 
7945
+ _this.onDefaultConnectionChange = function () {
7946
+ _this.setState({
7947
+ defaultConnection: !_this.state.defaultConnection
7948
+ });
7949
+ };
7950
+
7951
+ _this.onAPIAccessChange = function () {
7952
+ _this.setState({
7953
+ APIAccess: !_this.state.APIAccess
7954
+ });
7955
+ };
7956
+
7948
7957
  _this.credKeyPress = function (e) {
7949
7958
  var _this$props = _this.props,
7950
7959
  checking = _this$props.checking,
@@ -7973,7 +7982,8 @@ module.exports =
7973
7982
  _this.state = {
7974
7983
  actualCreds: {},
7975
7984
  showPass: false,
7976
- APIAccess: false
7985
+ APIAccess: false,
7986
+ defaultConnection: false
7977
7987
  };
7978
7988
  return _this;
7979
7989
  }
@@ -7983,7 +7993,15 @@ module.exports =
7983
7993
  value: function componentWillMount() {
7984
7994
  var _props = this.props,
7985
7995
  creds = _props.creds,
7986
- config = _props.config;
7996
+ config = _props.config,
7997
+ connectionInfo = _props.connectionInfo;
7998
+
7999
+ if (connectionInfo) {
8000
+ this.setState({
8001
+ defaultConnection: connectionInfo.defaultConnection,
8002
+ APIAccess: connectionInfo.ApiAccessible
8003
+ });
8004
+ }
7987
8005
 
7988
8006
  if (config.type === "SFTP") {
7989
8007
  this.setState({
@@ -8039,7 +8057,11 @@ module.exports =
8039
8057
  }, {
8040
8058
  key: "saveCreds",
8041
8059
  value: function saveCreds() {
8042
- this.props.postCredentials(this.state.actualCreds);
8060
+ var _state = this.state,
8061
+ APIAccess = _state.APIAccess,
8062
+ defaultConnection = _state.defaultConnection;
8063
+
8064
+ this.props.postCredentials(this.state.actualCreds, APIAccess, defaultConnection);
8043
8065
  }
8044
8066
  }, {
8045
8067
  key: "render",
@@ -8055,7 +8077,6 @@ module.exports =
8055
8077
  checkOauthCreds = _props2.checkOauthCreds,
8056
8078
  getDocuSignOauthUrl = _props2.getDocuSignOauthUrl,
8057
8079
  fileSchema = _props2.fileSchema,
8058
- postCredentials = _props2.postCredentials,
8059
8080
  getOauthUrl = _props2.getOauthUrl,
8060
8081
  generateNewAdapterSecret = _props2.generateNewAdapterSecret,
8061
8082
  setCsvFields = _props2.setCsvFields,
@@ -8070,7 +8091,6 @@ module.exports =
8070
8091
  deleteFlatFile = _props2.deleteFlatFile,
8071
8092
  gencerts = _props2.gencerts,
8072
8093
  downloadcerts = _props2.downloadcerts,
8073
- onAPIAccessChange = _props2.onAPIAccessChange,
8074
8094
  getOauthCreds = _props2.getOauthCreds;
8075
8095
 
8076
8096
  var Button = inputs.Button;
@@ -8086,10 +8106,12 @@ module.exports =
8086
8106
  var isBVA = config.type === "BrightSpaceValenceApi";
8087
8107
 
8088
8108
  var isGoogle = config.type.startsWith("Google");
8109
+
8089
8110
  var isAdapter = config && (config.metadataEndpoint === "testconnection" || config.metadataEndpoint === "adaptermetadata");
8111
+
8090
8112
  var isWebSocket = config.type === "LingkWebSocket";
8091
8113
  var isAWS = config.type.startsWith("AWS");
8092
- var isMSSQL = config.type.toLowerCase().startsWith("sqlserver");
8114
+ var isMSSQL = config.type.startsWith("MSSQL");
8093
8115
  var isSFTP = config.type === "SFTP";
8094
8116
 
8095
8117
  var isDocuSign = config.type === "DocuSign";
@@ -8392,8 +8414,11 @@ module.exports =
8392
8414
  ),
8393
8415
  _react2.default.createElement("br", null),
8394
8416
  config.type != "LocalFile" && _react2.default.createElement(APIAcessHandle, {
8395
- APIAccess: wizard.APIAccess,
8396
- onChangeHandle: onAPIAccessChange
8417
+ APIAccess: this.state.APIAccess,
8418
+ onChangeHandle: this.onAPIAccessChange,
8419
+ defaultConnection: this.state.defaultConnection,
8420
+ onDefaultConnectionChange: this.onDefaultConnectionChange,
8421
+ disableMarkConnection: wizard.disableMarkConnection
8397
8422
  })
8398
8423
  );
8399
8424
  }
@@ -8465,12 +8490,30 @@ module.exports =
8465
8490
 
8466
8491
  var APIAcessHandle = function APIAcessHandle(_ref3) {
8467
8492
  var APIAccess = _ref3.APIAccess,
8468
- onChangeHandle = _ref3.onChangeHandle;
8493
+ onChangeHandle = _ref3.onChangeHandle,
8494
+ defaultConnection = _ref3.defaultConnection,
8495
+ onDefaultConnectionChange = _ref3.onDefaultConnectionChange,
8496
+ disableMarkConnection = _ref3.disableMarkConnection;
8469
8497
 
8470
8498
  return _react2.default.createElement(
8471
- _reactBootstrap.Checkbox,
8472
- { checked: APIAccess, onChange: onChangeHandle },
8473
- "Make these credentials available via API"
8499
+ "div",
8500
+ null,
8501
+ _react2.default.createElement(
8502
+ _reactBootstrap.Checkbox,
8503
+ {
8504
+ checked: defaultConnection,
8505
+ onChange: onDefaultConnectionChange,
8506
+ disabled: disableMarkConnection
8507
+ },
8508
+ "Make this my default connection",
8509
+ " "
8510
+ ),
8511
+ _react2.default.createElement(
8512
+ _reactBootstrap.Checkbox,
8513
+ { checked: APIAccess, onChange: onChangeHandle },
8514
+ "Make this available via API",
8515
+ " "
8516
+ )
8474
8517
  );
8475
8518
  };
8476
8519
 
@@ -8558,7 +8601,6 @@ module.exports =
8558
8601
  isWiz = _props.isWiz,
8559
8602
  change = _props.change;
8560
8603
 
8561
- console.log("OAUTH Creds", creds);
8562
8604
  var Spinner = inputs.Spinner;
8563
8605
  var Button = inputs.Button;
8564
8606
  var userName = creds && creds.userName;
@@ -8625,7 +8667,7 @@ module.exports =
8625
8667
  {
8626
8668
  type: "brand",
8627
8669
  onClick: function onClick() {
8628
- return onCheck(creds, formValues.includeSystemResources ? "?all=true" : "");
8670
+ return onCheck(creds, formValues && formValues.includeSystemResources ? "?all=true" : "");
8629
8671
  },
8630
8672
  style: Object.assign({ marginLeft: 8 }, btnStyle)
8631
8673
  },