@stokr/components-library 2.3.53 → 2.3.54

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.
@@ -113,7 +113,9 @@ function ReactTable(props) {
113
113
  }
114
114
  }), row.cells.map(function (cell) {
115
115
  var cellStyles = customTdStyles ? customTdStyles(i, row.original) : {};
116
- return /*#__PURE__*/_react.default.createElement(_Table.StyledReactTable.Td, _extends({}, cell.row.getToggleRowExpandedProps(), cell.getCellProps({
116
+ return /*#__PURE__*/_react.default.createElement(_Table.StyledReactTable.Td, _extends({}, cell.row.getToggleRowExpandedProps(), {
117
+ title: ""
118
+ }, cell.getCellProps({
117
119
  className: cell.column.collapse ? 'collapse' : '',
118
120
  style: _objectSpread({}, cellStyles)
119
121
  }), {
@@ -35,7 +35,18 @@ function _asyncToGenerator(fn) { return function () { var self = this, args = ar
35
35
  var NewVentureModal = function NewVentureModal(props) {
36
36
  var _useContext = (0, _react.useContext)(_AuthContext.AuthContext),
37
37
  user = _useContext.user;
38
- var _useNewVentureForm = (0, _useNewVentureForm2.useNewVentureForm)(props.project, user),
38
+ var title = props.title,
39
+ description = props.description,
40
+ isModalOpen = props.isModalOpen,
41
+ onModalClose = props.onModalClose,
42
+ onFormSend = props.onFormSend,
43
+ popupError = props.popupError,
44
+ project = props.project,
45
+ _props$salesChannel = props.salesChannel,
46
+ salesChannel = _props$salesChannel === void 0 ? 'investor' : _props$salesChannel,
47
+ modalBotContent = props.modalBotContent,
48
+ onSuccessMessageBtnClick = props.onSuccessMessageBtnClick;
49
+ var _useNewVentureForm = (0, _useNewVentureForm2.useNewVentureForm)(props.project, user, salesChannel),
39
50
  email = _useNewVentureForm.email,
40
51
  name = _useNewVentureForm.name,
41
52
  mailingList = _useNewVentureForm.mailingList,
@@ -57,18 +68,6 @@ var NewVentureModal = function NewVentureModal(props) {
57
68
  email: Yup.string().matches(_globalVariables.emailRegex, "Oops, that's not a valid address").required("Oops, this can't be blank"),
58
69
  name: Yup.string().required("Oops, this can't be blank")
59
70
  });
60
- var title = props.title,
61
- description = props.description,
62
- isModalOpen = props.isModalOpen,
63
- onModalClose = props.onModalClose,
64
- onFormSend = props.onFormSend,
65
- popupError = props.popupError,
66
- project = props.project,
67
- _props$salesChannel = props.salesChannel,
68
- salesChannel = _props$salesChannel === void 0 ? 'investor' : _props$salesChannel,
69
- successMsg = props.successMsg,
70
- errorMsg = props.errorMsg,
71
- modalBotContent = props.modalBotContent;
72
71
  return /*#__PURE__*/_react.default.createElement(_Modal.Modal, {
73
72
  isOpen: isModalOpen,
74
73
  onClose: function onClose(e) {
@@ -88,10 +87,14 @@ var NewVentureModal = function NewVentureModal(props) {
88
87
  fluid: true,
89
88
  id: "private-investor-success-button",
90
89
  onClick: function onClick() {
91
- if (user !== null && user !== void 0 && user._id) {
92
- window.location.href = "https://dashboard.".concat(process.env.REACT_APP_WEBSITE_DOMAIN, "/checklist");
90
+ if (onSuccessMessageBtnClick) {
91
+ onSuccessMessageBtnClick();
93
92
  } else {
94
- window.location.href = "/signup?email=".concat(email);
93
+ if (user !== null && user !== void 0 && user._id) {
94
+ window.location.href = "https://dashboard.".concat(process.env.REACT_APP_WEBSITE_DOMAIN, "/checklist");
95
+ } else {
96
+ window.location.href = "/signup?email=".concat(email);
97
+ }
95
98
  }
96
99
  }
97
100
  }, "Continue"))) : /*#__PURE__*/_react.default.createElement(_formik.Formik, {
@@ -107,7 +107,7 @@ var updateUserSubscription = function updateUserSubscription(user, project, upda
107
107
  // Single project mode
108
108
  return _objectSpread(_objectSpread({}, user), updates);
109
109
  };
110
- var useNewVentureForm = function useNewVentureForm(project, user) {
110
+ var useNewVentureForm = function useNewVentureForm(project, user, salesChannel) {
111
111
  var _useState = (0, _react.useState)(initialState),
112
112
  _useState2 = _slicedToArray(_useState, 2),
113
113
  formValues = _useState2[0],
@@ -178,7 +178,7 @@ var useNewVentureForm = function useNewVentureForm(project, user) {
178
178
  projectId: project._id,
179
179
  name: values.name,
180
180
  checkedCheckboxes: formValues.checkedCheckboxes,
181
- salesChannel: window.location.pathname.includes('featured-assets') ? 'featuredAssets' : 'investor'
181
+ salesChannel: salesChannel ? salesChannel : window.location.pathname.includes('featured-assets') ? 'featuredAssets' : 'investor'
182
182
  };
183
183
  if (values.privateInvestorList && !formValues.privateInvestorListDisabled) {
184
184
  dataToSend.createPrivateInvestor = true;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@stokr/components-library",
3
- "version": "2.3.53",
3
+ "version": "2.3.54",
4
4
  "description": "STOKR - Components Library",
5
5
  "main": "dist/index.js",
6
6
  "module": "dist/index.js",