@stokr/components-library 2.3.58-beta.10 → 2.3.58-beta.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.
@@ -33,6 +33,9 @@ function ReactTable(props) {
33
33
  customRowHoverContent,
34
34
  customRowStyles,
35
35
  customTableStyles,
36
+ getRowDataCy,
37
+ // Function to generate data-cy attribute: (rowData, rowIndex) => string
38
+
36
39
  //instead of passing the subData, we pass a function that will calculate the subData
37
40
  //subData must be part of the data array (an array or whatever)
38
41
  //calculateSubData is a function that receives the row and returns the subData
@@ -98,7 +101,9 @@ function ReactTable(props) {
98
101
  prepareRow(row);
99
102
  return /*#__PURE__*/_react.default.createElement(_react.default.Fragment, {
100
103
  key: row.id
101
- }, /*#__PURE__*/_react.default.createElement(_Table.StyledReactTable.Tr, _extends({}, row.getRowProps(), {
104
+ }, /*#__PURE__*/_react.default.createElement(_Table.StyledReactTable.Tr, _extends({}, row.getRowProps({
105
+ 'data-cy': getRowDataCy ? getRowDataCy(row.original, i) : undefined
106
+ }), {
102
107
  customRowHoverStyles: customRowHoverStyles,
103
108
  customRowStyles: customRowStyles,
104
109
  rowIndex: i,
@@ -151,7 +156,8 @@ ReactTable.propTypes = {
151
156
  customRowHoverStyles: _propTypes.default.func,
152
157
  customRowHoverContent: _propTypes.default.func,
153
158
  customRowStyles: _propTypes.default.func,
154
- customTableStyles: _propTypes.default.func
159
+ customTableStyles: _propTypes.default.func,
160
+ getRowDataCy: _propTypes.default.func // (rowData, rowIndex) => string
155
161
  };
156
162
  ReactTable.defaultProps = {
157
163
  blue: false,
@@ -54,7 +54,7 @@ const footerGroups = exports.footerGroups = [{
54
54
  url: "".concat(_globalVariables.platformURL, "/101")
55
55
  }, {
56
56
  name: 'Support',
57
- url: 'https://stokr.zendesk.com/',
57
+ url: 'https://support.stokr.io/',
58
58
  external: true
59
59
  }, {
60
60
  name: 'STOKE POST',
@@ -43,7 +43,7 @@ FooterMenu1.args = {
43
43
  }, */
44
44
  {
45
45
  name: 'Support',
46
- url: 'https://stokr.zendesk.com/',
46
+ url: 'https://support.stokr.io/',
47
47
  external: true
48
48
  }, {
49
49
  name: 'STOKE POST',
@@ -480,14 +480,22 @@ class HeaderHoClass extends _react.Component {
480
480
  this.switchOpenModal('signUp', 'confirm');
481
481
  this.setIsActionLoading(undefined);
482
482
  } catch (error) {
483
+ var _error$response;
483
484
  console.log(error);
485
+ let errorMessage = 'Oops, something went wrong';
486
+ if ((error === null || error === void 0 || (_error$response = error.response) === null || _error$response === void 0 ? void 0 : _error$response.status) === 429) {
487
+ var _error$response$data;
488
+ errorMessage = (_error$response$data = error.response.data) === null || _error$response$data === void 0 ? void 0 : _error$response$data.message;
489
+ }
484
490
  this.setIsActionLoading(undefined);
485
491
  if ((error === null || error === void 0 ? void 0 : error.code) === 'auth/email-already-in-use') {
486
492
  this.setPopupError('register', 'This email address is already taken', 'email');
487
493
  } else if ((error === null || error === void 0 ? void 0 : error.code) === 'auth/weak-password') {
488
494
  this.setPopupError('register', 'The password is too weak. Please try again.', 'password');
495
+ } else if ((error === null || error === void 0 ? void 0 : error.code) === 'auth/error-code:-47') {
496
+ this.setPopupError('register', 'Too many signup attempts. Please try again later.');
489
497
  } else {
490
- this.setPopupError('register', 'Oops, something went wrong');
498
+ this.setPopupError('register', errorMessage);
491
499
  }
492
500
  }
493
501
  }
@@ -573,8 +581,14 @@ class HeaderHoClass extends _react.Component {
573
581
  this.setPopupSuccess('forgot', "We sent a message to ".concat(email, " (you might need to check your junk or spam folder) \u2014 tap the link inside to create a new password."));
574
582
  this.setIsActionLoading(undefined);
575
583
  } catch (error) {
584
+ var _error$response2;
576
585
  console.log(error);
577
- this.setPopupError('forgot', 'This email is not registered.');
586
+ let errorMessage = "Too many requests. Please try again later.";
587
+ if ((error === null || error === void 0 || (_error$response2 = error.response) === null || _error$response2 === void 0 ? void 0 : _error$response2.status) === 429) {
588
+ var _error$response$data2;
589
+ errorMessage = (_error$response$data2 = error.response.data) === null || _error$response$data2 === void 0 ? void 0 : _error$response$data2.message;
590
+ }
591
+ this.setPopupError('forgot', errorMessage);
578
592
  this.setIsActionLoading(undefined);
579
593
  }
580
594
  }
@@ -52,6 +52,7 @@ const colors = exports.colors = {
52
52
  grey4: '#DCDCDC',
53
53
  midRed: '#e3210d',
54
54
  warningYellow: '#facc33',
55
- darkRed: '#D2200D'
55
+ darkRed: '#D2200D',
56
+ warningOrange: '#EB8003'
56
57
  };
57
58
  var _default = exports.default = colors;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@stokr/components-library",
3
- "version": "2.3.58-beta.10",
3
+ "version": "2.3.58-beta.11",
4
4
  "description": "STOKR - Components Library",
5
5
  "main": "dist/index.js",
6
6
  "module": "dist/index.js",
@@ -31,7 +31,7 @@
31
31
  },
32
32
  "dependencies": {
33
33
  "ajv": "^8.17.1",
34
- "axios": "^0.30.2",
34
+ "axios": "^0.27.2",
35
35
  "bignumber.js": "^9.1.1",
36
36
  "cross-env": "^10.1.0",
37
37
  "d3": "^7.8.3",