@stokr/components-library 0.9.1 → 0.9.3

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.
@@ -134,7 +134,7 @@ var UserChecklist = function UserChecklist(props) {
134
134
  message: algoWallets.length > 0 ? 'Opt-in into more assets' : 'Register an Algorand address and opt-in into a project you want to invest in ',
135
135
  state: algoWallets.length > 0 ? _ToDoList.ToDoTaskState.APPROVED : _ToDoList.ToDoTaskState.SKIPPED,
136
136
  disabled: true,
137
- tooltip: "Registering your Algorand address is currently disabled until we have a new offer using the algorand network.",
137
+ tooltip: 'Registering your Algorand address is currently disabled until we have a new offer using the Algorand network.',
138
138
  openModal: _ToDoList.ToDoModal.ALGO
139
139
  }, {
140
140
  title: 'Ethereum Address',
@@ -142,7 +142,7 @@ var UserChecklist = function UserChecklist(props) {
142
142
  state: ethWallets.length > 0 ? _ToDoList.ToDoTaskState.APPROVED : _ToDoList.ToDoTaskState.SKIPPED,
143
143
  //link: '', //`${platformURL}/register-ethereum`,
144
144
  disabled: true,
145
- tooltip: 'Registering your ethereum wallet is currently disabled until we have a new offer using the ethereum network.'
145
+ tooltip: 'Registering your Ethereum address is currently disabled until we have a new offer using the Ethereum network.'
146
146
  }]);
147
147
  setoptionalTasks([{
148
148
  title: 'Tax ID',
@@ -179,14 +179,14 @@ var UserChecklist = function UserChecklist(props) {
179
179
  state: algoWallets.length > 0 ? _ToDoList.ToDoTaskState.APPROVED : _ToDoList.ToDoTaskState.SKIPPED,
180
180
  openModal: _ToDoList.ToDoModal.ALGO,
181
181
  disabled: true,
182
- tooltip: "Registering your Algorand address is currently disabled until we have a new offer using the algorand network."
182
+ tooltip: 'Registering your Algorand address is currently disabled until we have a new offer using the Algorand network.'
183
183
  //link: '',
184
184
  }, {
185
185
  title: 'Ethereum Address',
186
186
  message: !isFromAllowedCountry ? 'Sorry, you are living in a country where this is not available' : ethWallets.length > 0 ? 'Your address is registered' : 'Register an Ethereum address where you will receive the securities',
187
187
  state: !isFromAllowedCountry ? _ToDoList.ToDoTaskState.NOT_AVAILABLE : ethWallets.length > 0 ? _ToDoList.ToDoTaskState.APPROVED : _ToDoList.ToDoTaskState.SKIPPED,
188
188
  disabled: true,
189
- tooltip: 'Registering your ethereum wallet is currently disabled until we have a new offer using the ethereum network.'
189
+ tooltip: 'Registering your Ethereum address is currently disabled until we have a new offer using the Ethereum network.'
190
190
  }]);
191
191
  var optionalTasks = [{
192
192
  title: 'Tax ID',
@@ -34,6 +34,7 @@ var CryptoAddress = function CryptoAddress(_ref) {
34
34
  radio = _ref.radio,
35
35
  sideOptions = _ref.sideOptions,
36
36
  src = _ref.src,
37
+ noHead = _ref.noHead,
37
38
  noBody = _ref.noBody,
38
39
  noBorderBottom = _ref.noBorderBottom,
39
40
  flexHead = _ref.flexHead,
@@ -44,7 +45,8 @@ var CryptoAddress = function CryptoAddress(_ref) {
44
45
  copiedAddressToClipboard = _useState2[0],
45
46
  setCopiedAddressToClipboard = _useState2[1];
46
47
  return /*#__PURE__*/_react.default.createElement(_CryptoAddress.Container, null, /*#__PURE__*/_react.default.createElement(_RadioWrap.default, {
47
- radio: radio
48
+ radio: radio,
49
+ hide: radio && radio.hide
48
50
  }, /*#__PURE__*/_react.default.createElement(_ComponentWrap.default, {
49
51
  wrapped: wrapped,
50
52
  borderTop: borderTop,
@@ -53,6 +55,7 @@ var CryptoAddress = function CryptoAddress(_ref) {
53
55
  withOptions: !!sideOptions
54
56
  }, radio && !radio.hide && /*#__PURE__*/_react.default.createElement(_CryptoAddress.CheckMark, null), /*#__PURE__*/_react.default.createElement(_CryptoAddress.Head, {
55
57
  noBody: noBody,
58
+ noHead: noHead,
56
59
  flexHead: flexHead
57
60
  }, /*#__PURE__*/_react.default.createElement(_CryptoAddress.Title, {
58
61
  color: titleColor
@@ -78,7 +81,13 @@ var CryptoAddress = function CryptoAddress(_ref) {
78
81
  noBody: noBody
79
82
  }, /*#__PURE__*/_react.default.createElement(_CryptoAddress.DataBox, null, data.value && /*#__PURE__*/_react.default.createElement(_CryptoAddress.Value, {
80
83
  fontSize: fontSize
81
- }, data.unit && "".concat(data.unit, " "), data.value, data.tooltip && /*#__PURE__*/_react.default.createElement("div", null, copyToClipBoard(data.value, copiedAddressToClipboard, setCopiedAddressToClipboard))), data.eqValue && /*#__PURE__*/_react.default.createElement(_CryptoAddress.Equal, null, '= ', data.eqUnit && "".concat(data.eqUnit, " "), data.eqValue)), /*#__PURE__*/_react.default.createElement(_CryptoAddress.InfoBox, null, /*#__PURE__*/_react.default.createElement(_CryptoAddress.Value, null, info.unit && /*#__PURE__*/_react.default.createElement("strong", null, info.unit), info.value), info.eqValue && /*#__PURE__*/_react.default.createElement(_CryptoAddress.Equal, null, info.noEqualsToSign ? ' ' : '= ', info.eqUnit && /*#__PURE__*/_react.default.createElement("strong", null, info.eqUnit), info.eqValue))), sideOptions && /*#__PURE__*/_react.default.createElement(_CryptoAddress.OptionsWrapper, null, sideOptions)))));
84
+ }, data.unit && "".concat(data.unit, " "), data.shortAddress ? /*#__PURE__*/_react.default.createElement(_reactTippy.Tooltip, {
85
+ position: "top",
86
+ title: data.value,
87
+ theme: "light",
88
+ arrow: true,
89
+ duration: 200
90
+ }, (0, _getShortAddress.default)(data.value)) : data.value, data.tooltip && /*#__PURE__*/_react.default.createElement("div", null, copyToClipBoard(data.value, copiedAddressToClipboard, setCopiedAddressToClipboard))), data.eqValue && /*#__PURE__*/_react.default.createElement(_CryptoAddress.Equal, null, '= ', data.eqUnit && "".concat(data.eqUnit, " "), data.eqValue)), /*#__PURE__*/_react.default.createElement(_CryptoAddress.InfoBox, null, /*#__PURE__*/_react.default.createElement(_CryptoAddress.Value, null, info.unit && /*#__PURE__*/_react.default.createElement("strong", null, info.unit), info.value), info.eqValue && /*#__PURE__*/_react.default.createElement(_CryptoAddress.Equal, null, info.noEqualsToSign ? ' ' : '= ', info.eqUnit && /*#__PURE__*/_react.default.createElement("strong", null, info.eqUnit), info.eqValue))), sideOptions && /*#__PURE__*/_react.default.createElement(_CryptoAddress.OptionsWrapper, null, sideOptions)))));
82
91
  };
83
92
  exports.CryptoAddress = CryptoAddress;
84
93
  var copyToClipBoard = function copyToClipBoard(value, isCopied, setCopy) {
@@ -118,7 +127,8 @@ CryptoAddress.propTypes = {
118
127
  info: dataShape,
119
128
  sideOptions: _propTypes.default.node,
120
129
  // fontSize from IIS
121
- fontSize: _propTypes.default.number
130
+ fontSize: _propTypes.default.number,
131
+ noHead: _propTypes.default.bool
122
132
  };
123
133
  //address not required in IIS, instead wrapping {address &&( .. now doing both which is redundant
124
134
 
@@ -129,11 +139,13 @@ CryptoAddress.defaultProps = {
129
139
  borderBottom: false,
130
140
  radio: null,
131
141
  address: '',
142
+ noHead: false,
132
143
  data: {
133
144
  value: '',
134
145
  unit: '',
135
146
  eqValue: '',
136
- eqUnit: ''
147
+ eqUnit: '',
148
+ tooltip: false
137
149
  },
138
150
  info: {
139
151
  value: '',
@@ -24,12 +24,15 @@ exports.Container = Container;
24
24
  var Head = _styledComponents.default.div.withConfig({
25
25
  displayName: "CryptoAddressstyles__Head",
26
26
  componentId: "sc-1wjvdgu-1"
27
- })(["position:relative;margin-bottom:5px;&:after{content:'';display:block;width:100%;height:0;clear:both;}", " ", ""], function (_ref) {
27
+ })(["position:relative;margin-bottom:5px;&:after{content:'';display:block;width:100%;height:0;clear:both;}", " ", " ", ""], function (_ref) {
28
28
  var noBody = _ref.noBody;
29
29
  return noBody && "margin-bottom: 0";
30
30
  }, function (_ref2) {
31
31
  var flexHead = _ref2.flexHead;
32
32
  return flexHead && "\n display:flex;\n justify-content:space-between;\n align-items:center;\n flex-wrap:wrap;\n ";
33
+ }, function (_ref3) {
34
+ var noHead = _ref3.noHead;
35
+ return noHead && "display: none";
33
36
  });
34
37
  //think I took flexhead out of CL ..
35
38
  //seems it is something passed from Algorand
@@ -38,8 +41,8 @@ exports.Head = Head;
38
41
  var Body = _styledComponents.default.div.withConfig({
39
42
  displayName: "CryptoAddressstyles__Body",
40
43
  componentId: "sc-1wjvdgu-2"
41
- })(["position:relative;&:after{content:'';display:block;width:100%;height:0;clear:both;}", ""], function (_ref3) {
42
- var noBody = _ref3.noBody;
44
+ })(["position:relative;&:after{content:'';display:block;width:100%;height:0;clear:both;}", ""], function (_ref4) {
45
+ var noBody = _ref4.noBody;
43
46
  return noBody && "display: none";
44
47
  });
45
48
  exports.Body = Body;
@@ -14,6 +14,12 @@ function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj &&
14
14
  var RadioWrap = function RadioWrap(_ref) {
15
15
  var children = _ref.children,
16
16
  radio = _ref.radio;
17
+ var handleOnClick = function handleOnClick(e) {
18
+ if (radio) {
19
+ radio.handleCheckedAddressRadio(e.target.id);
20
+ radio.handleSelectedCryptoAddress(radio.address);
21
+ }
22
+ };
17
23
  return radio ? /*#__PURE__*/_react.default.createElement(_CryptoAddress.Radio, {
18
24
  hide: radio.hide
19
25
  }, /*#__PURE__*/_react.default.createElement("input", {
@@ -24,7 +30,8 @@ var RadioWrap = function RadioWrap(_ref) {
24
30
  checked: radio.checked,
25
31
  disabled: radio.disabled,
26
32
  onChange: radio.onChange,
27
- onBlur: radio.onBlur
33
+ onBlur: radio.onBlur,
34
+ onClick: handleOnClick
28
35
  }), /*#__PURE__*/_react.default.createElement("label", {
29
36
  htmlFor: radio.id
30
37
  }, children)) : /*#__PURE__*/_react.default.createElement(_react.Fragment, null, children);
@@ -154,7 +154,7 @@ var Auth = /*#__PURE__*/function () {
154
154
  return _regeneratorRuntime().wrap(function _callee$(_context) {
155
155
  while (1) switch (_context.prev = _context.next) {
156
156
  case 0:
157
- _axios.default.post("https://kycdocs.stokr-staging.de/kyc/upload?ip=".concat(ip), data, {
157
+ _axios.default.post("https://kycdocs.stokr.io/kyc/upload?ip=".concat(ip), data, {
158
158
  headers: {
159
159
  'Content-Type': 'multipart/form-data'
160
160
  }
@@ -4,7 +4,7 @@ Object.defineProperty(exports, "__esModule", {
4
4
  value: true
5
5
  });
6
6
  exports.walletTypes = exports.platformURL = exports.platformDomain = void 0;
7
- var platformDomain = process.env.REACT_APP_WEBSITE_DOMAIN || 'stokr.info';
7
+ var platformDomain = process.env.REACT_APP_WEBSITE_DOMAIN || 'stokr.io';
8
8
  exports.platformDomain = platformDomain;
9
9
  var platformURL = 'https://' + platformDomain;
10
10
  exports.platformURL = platformURL;
@@ -8,7 +8,7 @@ var _axios = _interopRequireDefault(require("axios"));
8
8
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
9
9
  /* Libraries */
10
10
 
11
- var BASE_URL = process.env.REACT_APP_API_URL || 'https://platform-api.stokr.info/api/v1/';
11
+ var BASE_URL = process.env.REACT_APP_API_URL || 'https://platform-api.stokr.io/api/v1/';
12
12
  var _default = _axios.default.create({
13
13
  headers: {
14
14
  'Content-Type': 'application/json'
@@ -8,7 +8,7 @@ var _axios = _interopRequireDefault(require("axios"));
8
8
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
9
9
  /* Libraries */
10
10
 
11
- var BASE_URL = process.env.REACT_APP_BASE_URL_PUBLIC || 'https://platform-api-no-auth.stokr.info/api/v1/';
11
+ var BASE_URL = process.env.REACT_APP_BASE_URL_PUBLIC || 'https://platform-api-no-auth.stokr.io/api/v1/';
12
12
  var _default = _axios.default.create({
13
13
  headers: {
14
14
  'Content-Type': 'application/json'
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@stokr/components-library",
3
- "version": "0.9.1",
3
+ "version": "0.9.3",
4
4
  "description": "STOKR - Components Library",
5
5
  "main": "dist/index.js",
6
6
  "module": "dist/index.js",