@lingk/sync 0.0.9 → 0.0.11

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/lingk.js CHANGED
@@ -232,8 +232,10 @@ module.exports =
232
232
  function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key]; } } newObj.default = obj; return newObj; } }
233
233
 
234
234
  var axios = __webpack_require__(26);
235
- function testAjax() {
235
+ function testAjax(typeGuid, accountId, tenantId) {
236
236
  return function (dispatch, getState, api) {
237
+ console.log(typeGuid, accountId, tenantId);
238
+
237
239
  var _getState = getState(),
238
240
  config = _getState.config;
239
241
 
@@ -401,7 +403,7 @@ module.exports =
401
403
  };
402
404
  }
403
405
 
404
- function callPostProductizedIntegration(tenantId, appId, schemaMappingGuid, configuration, title) {
406
+ function callPostProductizedIntegration(tenantId, appId, schemaMappingGuid, configuration, title, typeGuid) {
405
407
  return function (dispatch, getState, api) {
406
408
  var _getState8 = getState(),
407
409
  config = _getState8.config;
@@ -410,7 +412,7 @@ module.exports =
410
412
 
411
413
  var data = {
412
414
  schemaMappingGuid: schemaMappingGuid,
413
- integrationTypeGuid: '9090b61412a74d97ad9ed02c5fc7e704',
415
+ integrationTypeGuid: typeGuid,
414
416
  name: title,
415
417
  configuration: configuration
416
418
  };
@@ -457,11 +459,11 @@ module.exports =
457
459
  };
458
460
  }
459
461
 
460
- function submitWizardData(tenantId, appId, sourceSchema, destinationSchema, mapping, configuration, title) {
462
+ function submitWizardData(tenantId, appId, sourceSchema, destinationSchema, mapping, configuration, title, typeGuid) {
461
463
  return function (dispatch) {
462
464
  return Promise.all([dispatch(callPostSchema(tenantId, appId, sourceSchema)), dispatch(callPostSchema(tenantId, appId, destinationSchema))]).then(function (guids) {
463
465
  return dispatch(callPostMapping(tenantId, appId, guids[0], guids[1], mapping)).then(function (res) {
464
- dispatch(callPostProductizedIntegration(tenantId, appId, res.schemaMappingGuid, configuration, title)).then(function (pi) {
466
+ dispatch(callPostProductizedIntegration(tenantId, appId, res.schemaMappingGuid, configuration, title, typeGuid)).then(function (pi) {
465
467
  dispatch(callGenerateIntegration(tenantId, appId, pi.productizedIntegrationGuid));
466
468
  });
467
469
  });
@@ -3136,7 +3138,7 @@ module.exports =
3136
3138
  _react2.default.createElement('br', null),
3137
3139
  _react2.default.createElement(
3138
3140
  Button,
3139
- { type: 'brand', className: 'btn btn-primary', onClick: this.preview },
3141
+ { type: 'brand', onClick: this.preview },
3140
3142
  'Preview Integration'
3141
3143
  ),
3142
3144
  this.state.previewing ? _react2.default.createElement(
@@ -3952,11 +3954,19 @@ module.exports =
3952
3954
  //----------------------------------
3953
3955
  // Post
3954
3956
  //----------------------------------
3957
+ var _props = this.props,
3958
+ actions = _props.actions,
3959
+ redux = _props.redux,
3960
+ onFinish = _props.onFinish,
3961
+ typeGuid = _props.typeGuid,
3962
+ accountId = _props.accountId,
3963
+ tenantId = _props.tenantId;
3964
+
3955
3965
  var appId = values.existingAccount; // need to add "new account" here as well
3956
3966
  if (parseInt(1, 10) === 6) {
3957
- this.props.actions.submitWizardData(this.props.redux.main.tenantInfo.TenantId, appId, schemas.source, schemas.destination, mapping, configuration, config.title);
3967
+ actions.submitWizardData(redux.main.tenantInfo.TenantId, appId, schemas.source, schemas.destination, mapping, configuration, config.title, typeGuid);
3958
3968
  }
3959
- this.props.actions.testAjax();
3969
+ onFinish();
3960
3970
  }
3961
3971
  }, {
3962
3972
  key: 'nextPage',
@@ -3984,12 +3994,12 @@ module.exports =
3984
3994
  var _this3 = this;
3985
3995
 
3986
3996
  var currentPage = this.state.currentPage;
3987
- var _props = this.props,
3988
- steps = _props.steps,
3989
- actions = _props.actions,
3990
- wizard = _props.wizard,
3991
- formValues = _props.formValues,
3992
- inputs = _props.inputs;
3997
+ var _props2 = this.props,
3998
+ steps = _props2.steps,
3999
+ actions = _props2.actions,
4000
+ wizard = _props2.wizard,
4001
+ formValues = _props2.formValues,
4002
+ inputs = _props2.inputs;
3993
4003
  var Sidebar = inputs.Sidebar;
3994
4004
 
3995
4005
  return _react2.default.createElement(
@@ -4111,13 +4121,13 @@ module.exports =
4111
4121
 
4112
4122
  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; }
4113
4123
 
4114
- var WizardFormLoader = function (_Component) {
4115
- _inherits(WizardFormLoader, _Component);
4124
+ var LingkSync = function (_Component) {
4125
+ _inherits(LingkSync, _Component);
4116
4126
 
4117
- function WizardFormLoader() {
4118
- _classCallCheck(this, WizardFormLoader);
4127
+ function LingkSync() {
4128
+ _classCallCheck(this, LingkSync);
4119
4129
 
4120
- var _this = _possibleConstructorReturn(this, (WizardFormLoader.__proto__ || Object.getPrototypeOf(WizardFormLoader)).call(this));
4130
+ var _this = _possibleConstructorReturn(this, (LingkSync.__proto__ || Object.getPrototypeOf(LingkSync)).call(this));
4121
4131
 
4122
4132
  _this.state = {
4123
4133
  steps: null,
@@ -4171,7 +4181,7 @@ module.exports =
4171
4181
  return _this;
4172
4182
  }
4173
4183
 
4174
- _createClass(WizardFormLoader, [{
4184
+ _createClass(LingkSync, [{
4175
4185
  key: 'componentDidMount',
4176
4186
  value: function componentDidMount() {
4177
4187
  var wizard = example.wizards[1];
@@ -4244,9 +4254,9 @@ module.exports =
4244
4254
  return _react2.default.createElement(
4245
4255
  'div',
4246
4256
  { style: {
4247
- position: 'fixed',
4257
+ position: 'absolute',
4248
4258
  width: '100%',
4249
- height: '100%'
4259
+ height: 'calc(100% - 50px)'
4250
4260
  } },
4251
4261
  _react2.default.createElement(_wizardForm2.default, Object.assign({
4252
4262
  steps: steps,
@@ -4256,7 +4266,7 @@ module.exports =
4256
4266
  }
4257
4267
  }]);
4258
4268
 
4259
- return WizardFormLoader;
4269
+ return LingkSync;
4260
4270
  }(_react.Component);
4261
4271
 
4262
4272
  function mapStateToProps(state, props) {
@@ -4271,7 +4281,7 @@ module.exports =
4271
4281
  };
4272
4282
  }
4273
4283
 
4274
- exports.default = (0, _reactRedux.connect)(mapStateToProps, mapDispatchToProps)(WizardFormLoader);
4284
+ exports.default = (0, _reactRedux.connect)(mapStateToProps, mapDispatchToProps)(LingkSync);
4275
4285
 
4276
4286
  /***/ },
4277
4287
  /* 25 */
@@ -4667,7 +4677,7 @@ module.exports =
4667
4677
  ),
4668
4678
  _react2.default.createElement(
4669
4679
  'div',
4670
- { style: { width: 190, padding: '2px 2px 4px 0', height: 'calc(100% - 94px)' } },
4680
+ { style: { width: 190, padding: '2px 2px 4px 0', height: 'calc(100% - 44px)' } },
4671
4681
  _react2.default.createElement(
4672
4682
  'div',
4673
4683
  { style: { overflowY: 'scroll', overflowX: 'hidden', height: '100%', width: 187 }, className: 'wizard-sidebar-content' },