@lingk/sync 0.0.64 → 0.0.66

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
@@ -17243,7 +17243,7 @@ module.exports =
17243
17243
  };
17244
17244
  }
17245
17245
 
17246
- function callGetPiConfig(tenantId, accountId, piGuid, providers, metadataEndpoints, defaultBundlePackGuid, defaultMappingGuid) {
17246
+ function callGetPiConfig(tenantId, accountId, piGuid, providers, metadataEndpoints) {
17247
17247
  if (piGuid) {
17248
17248
  return function (dispatch, getState, api) {
17249
17249
  var _getState11 = getState(),
@@ -17277,8 +17277,7 @@ module.exports =
17277
17277
  });
17278
17278
  };
17279
17279
  } else return function (dispatch) {
17280
- return Promise.all([dispatch(tryGetMetadata(tenantId, accountId, 'source', providers.source, metadataEndpoints.source, null)), dispatch(tryGetMetadata(tenantId, accountId, 'destination', providers.destination, metadataEndpoints.destination, null)), dispatch(callGetMapping(tenantId, accountId, defaultMappingGuid)), // DEFAULT (diff. endpoint?)
17281
- dispatch(callGetBundles(tenantId, accountId, defaultBundlePackGuid))]);
17280
+ return Promise.all([dispatch(tryGetMetadata(tenantId, accountId, 'source', providers.source, metadataEndpoints.source, null)), dispatch(tryGetMetadata(tenantId, accountId, 'destination', providers.destination, metadataEndpoints.destination, null))]);
17282
17281
  };
17283
17282
  }
17284
17283
 
@@ -18624,8 +18623,9 @@ module.exports =
18624
18623
  resourceGroups && resourceGroups.length > 0 ? _react2.default.createElement(
18625
18624
  'div',
18626
18625
  null,
18627
- this.state.showModal && _react2.default.createElement(_transformModal2.default, { inputs: inputs, hideModal: this.hideModal, mapping: this.state.selectedTransform,
18628
- opened: this.state.showModal, change: change, resourceGroups: resourceGroups,
18626
+ this.state.showModal && _react2.default.createElement(_transformModal2.default, { inputs: inputs, hideModal: this.hideModal,
18627
+ mapping: this.state.selectedTransform, opened: this.state.showModal,
18628
+ change: change, resourceGroups: resourceGroups,
18629
18629
  resourceGroupIndex: this.state.selectedTransformResourceGroupIndex })
18630
18630
  ) : null,
18631
18631
  _react2.default.createElement('br', null),
@@ -19033,25 +19033,47 @@ module.exports =
19033
19033
  _inherits(DefaultDatasetStep, _Component);
19034
19034
 
19035
19035
  function DefaultDatasetStep() {
19036
- var _ref;
19036
+ _classCallCheck(this, DefaultDatasetStep);
19037
19037
 
19038
- var _temp, _this, _ret;
19038
+ var _this = _possibleConstructorReturn(this, (DefaultDatasetStep.__proto__ || Object.getPrototypeOf(DefaultDatasetStep)).call(this));
19039
19039
 
19040
- _classCallCheck(this, DefaultDatasetStep);
19040
+ _this.openModal = function (o) {
19041
+ _this.setState({
19042
+ showModal: true,
19043
+ modalOption: o
19044
+ });
19045
+ };
19041
19046
 
19042
- for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) {
19043
- args[_key] = arguments[_key];
19044
- }
19047
+ _this.hideModal = function () {
19048
+ _this.setState({
19049
+ showModal: false,
19050
+ modalOption: null
19051
+ });
19052
+ };
19045
19053
 
19046
- return _ret = (_temp = (_this = _possibleConstructorReturn(this, (_ref = DefaultDatasetStep.__proto__ || Object.getPrototypeOf(DefaultDatasetStep)).call.apply(_ref, [this].concat(args))), _this), _this.select = function (o) {
19047
- var _this$props = _this.props,
19048
- step = _this$props.step,
19049
- actions = _this$props.actions,
19050
- change = _this$props.change;
19054
+ _this.submitModal = function () {
19055
+ _this.changeScenario(_this.state.modalOption);
19056
+ _this.setState({
19057
+ showModal: false,
19058
+ modalOption: null
19059
+ });
19060
+ };
19051
19061
 
19052
- actions.callGetScenario(step.magicNumber, o.bundleGuid, o.mappingGuid);
19053
- change('scenario', o.name);
19054
- }, _temp), _possibleConstructorReturn(_this, _ret);
19062
+ _this.select = function (o) {
19063
+ var wizard = _this.props.wizard;
19064
+
19065
+ if (wizard.savedConfiguration && wizard.savedConfiguration.scenario) {
19066
+ _this.openModal(o);
19067
+ } else {
19068
+ _this.changeScenario(o);
19069
+ }
19070
+ };
19071
+
19072
+ _this.state = {
19073
+ showModal: false,
19074
+ modalOption: null
19075
+ };
19076
+ return _this;
19055
19077
  }
19056
19078
 
19057
19079
  _createClass(DefaultDatasetStep, [{
@@ -19077,24 +19099,35 @@ module.exports =
19077
19099
  });
19078
19100
  return obj;
19079
19101
  }
19102
+ }, {
19103
+ key: 'changeScenario',
19104
+ value: function changeScenario(o) {
19105
+ var _props2 = this.props,
19106
+ step = _props2.step,
19107
+ actions = _props2.actions,
19108
+ change = _props2.change;
19109
+
19110
+ change('resourceGroups', null); //clear old data
19111
+ change('scenario', o.name);
19112
+ actions.callGetScenario(step.magicNumber, o.bundleGuid, o.mappingGuid);
19113
+ }
19080
19114
  }, {
19081
19115
  key: 'render',
19082
19116
  value: function render() {
19083
19117
  var _this2 = this;
19084
19118
 
19085
- var _props2 = this.props,
19086
- inputs = _props2.inputs,
19087
- handleSubmit = _props2.handleSubmit,
19088
- nav = _props2.nav,
19089
- step = _props2.step,
19090
- reset = _props2.reset,
19091
- wizard = _props2.wizard,
19092
- formValues = _props2.formValues;
19119
+ var _props3 = this.props,
19120
+ inputs = _props3.inputs,
19121
+ handleSubmit = _props3.handleSubmit,
19122
+ nav = _props3.nav,
19123
+ step = _props3.step,
19124
+ reset = _props3.reset,
19125
+ wizard = _props3.wizard,
19126
+ formValues = _props3.formValues;
19093
19127
 
19094
19128
  var Radio = inputs.Radio;
19095
19129
  var scenario = formValues['scenario'];
19096
-
19097
- console.log(wizard);
19130
+ var Modal = inputs.Modal;
19098
19131
 
19099
19132
  return _react2.default.createElement(
19100
19133
  'form',
@@ -19121,7 +19154,7 @@ module.exports =
19121
19154
  'div',
19122
19155
  { key: i },
19123
19156
  _react2.default.createElement(Radio, { label: o.title, checked: o.name === scenario, style: { cursor: 'pointer' },
19124
- onClick: function onClick() {
19157
+ onChange: function onChange() {
19125
19158
  return _this2.select(o);
19126
19159
  } }),
19127
19160
  _react2.default.createElement('br', null),
@@ -19139,7 +19172,17 @@ module.exports =
19139
19172
  _react2.default.createElement(_navButtons2.default, { nextDisabled: !(wizard.savedConfiguration && wizard.savedConfiguration.scenario) && !wizard.gotScenario, handleSubmit: handleSubmit,
19140
19173
  nav: nav, reset: reset, inputs: inputs }),
19141
19174
  _react2.default.createElement('br', null),
19142
- _react2.default.createElement('br', null)
19175
+ _react2.default.createElement('br', null),
19176
+ _react2.default.createElement(
19177
+ Modal,
19178
+ { opened: this.state.showModal, hideModal: this.hideModal, title: 'Are you sure?', showCancel: true,
19179
+ submitModal: this.submitModal, submitLabel: 'Change Scenario' },
19180
+ _react2.default.createElement(
19181
+ 'div',
19182
+ { style: { textAlign: 'center' } },
19183
+ 'Choosing a different Scenario will erase your saved Object and Field Mappings.'
19184
+ )
19185
+ )
19143
19186
  );
19144
19187
  }
19145
19188
  }]);
@@ -19499,9 +19542,10 @@ module.exports =
19499
19542
  _react2.default.createElement(
19500
19543
  'div',
19501
19544
  { className: 'connect-modal' },
19502
- resourceGroups && resourceGroups.length > 0 && this.state.showModal && _react2.default.createElement(_connectModal2.default, { inputs: inputs, hideModal: this.hideModal, bundle: this.state.selectedBundle,
19503
- opened: this.state.showModal, change: change, resourceGroups: resourceGroups, step: step,
19504
- bundleIndex: this.state.selectedBundleIndex, sourceSchema: sourceSchema, destinationSchema: destinationSchema,
19545
+ resourceGroups && resourceGroups.length > 0 && this.state.showModal && _react2.default.createElement(_connectModal2.default, { inputs: inputs, hideModal: this.hideModal,
19546
+ bundle: this.state.selectedBundle, opened: this.state.showModal, change: change,
19547
+ resourceGroups: resourceGroups, step: step, bundleIndex: this.state.selectedBundleIndex,
19548
+ sourceSchema: sourceSchema, destinationSchema: destinationSchema,
19505
19549
  update: function update() {
19506
19550
  return _this2.forceUpdate();
19507
19551
  }
@@ -19798,7 +19842,7 @@ module.exports =
19798
19842
 
19799
19843
  return _react2.default.createElement(
19800
19844
  Modal,
19801
- { opened: opened, hideModal: closeModal, title: 'Connect Source to Target' },
19845
+ { opened: opened, hideModal: closeModal, submitModal: closeModal, title: 'Connect Source to Target' },
19802
19846
  _react2.default.createElement(
19803
19847
  'div',
19804
19848
  null,
@@ -20782,9 +20826,8 @@ module.exports =
20782
20826
  _react2.default.createElement(
20783
20827
  'p',
20784
20828
  null,
20785
- 'Choose a Join Key for this resource, whose value should equal the Join Key for (',
20786
- group.resources[0].name,
20787
- ')'
20829
+ 'Choose a Join Key for this resource, whose value should equal the Join Key for ',
20830
+ group.resources[0].name
20788
20831
  )
20789
20832
  ),
20790
20833
  _react2.default.createElement(_reduxForm.Field, { component: inputs.rfSelect, type: 'input',
@@ -20840,13 +20883,13 @@ module.exports =
20840
20883
  'p',
20841
20884
  null,
20842
20885
  'All: ',
20843
- 'All matching ' + rsc.name + 's and ' + group.resources[0].name + 's'
20886
+ rsc.name + ' records may or may not have a related ' + group.resources[0].name + ' record'
20844
20887
  ),
20845
20888
  _react2.default.createElement(
20846
20889
  'p',
20847
20890
  { style: { marginTop: 6 } },
20848
20891
  'Matching: ',
20849
- 'All ' + rsc.name + 's and matching ' + group.resources[0].name + 's'
20892
+ 'Each ' + rsc.name + ' must have at least one related ' + group.resources[0].name + ' record'
20850
20893
  )
20851
20894
  ),
20852
20895
  _react2.default.createElement(_reduxForm.Field, { name: 'resourceGroups.' + resourceGroupIndex + '.resources.' + i + '.joinType',
@@ -20989,7 +21032,7 @@ module.exports =
20989
21032
 
20990
21033
  return _react2.default.createElement(
20991
21034
  Modal,
20992
- { opened: opened, hideModal: hideModal, title: 'Transform Data' },
21035
+ { opened: opened, hideModal: hideModal, submitModal: hideModal, title: 'Transform Data' },
20993
21036
  _react2.default.createElement(
20994
21037
  'div',
20995
21038
  null,
@@ -21175,11 +21218,9 @@ module.exports =
21175
21218
  tenantId = _props.tenantId,
21176
21219
  accountId = _props.accountId,
21177
21220
  metadataEndpoints = _props.metadataEndpoints,
21178
- providers = _props.providers,
21179
- defaultBundlePackGuid = _props.defaultBundlePackGuid,
21180
- defaultMappingGuid = _props.defaultMappingGuid;
21221
+ providers = _props.providers;
21181
21222
 
21182
- actions.callInit(tenantId, accountId, piGuid, providers, metadataEndpoints, defaultBundlePackGuid, defaultMappingGuid);
21223
+ actions.callInit(tenantId, accountId, piGuid, providers, metadataEndpoints);
21183
21224
  }
21184
21225
  }]);
21185
21226