@stokr/components-library 0.9.4 → 0.9.6
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/dist/components/CryptoAddress/CryptoAddress.js +31 -7
- package/dist/components/CryptoAddress/CryptoAddress.stories.js +36 -0
- package/dist/components/CryptoAddress/CryptoAddress.styles.js +3 -1
- package/dist/components/Header/Header.stories.js +1 -1
- package/dist/components/RegisterAlgorand/Algorand.stories.js +2 -1
- package/dist/components/StepsProgress/StepsProgress.js +3 -4
- package/dist/constants/globalVariables.js +1 -1
- package/dist/model/axios.js +1 -1
- package/dist/model/axiosPublic.js +1 -1
- package/package.json +3 -2
|
@@ -39,7 +39,11 @@ var CryptoAddress = function CryptoAddress(_ref) {
|
|
|
39
39
|
noBorderBottom = _ref.noBorderBottom,
|
|
40
40
|
flexHead = _ref.flexHead,
|
|
41
41
|
fontSize = _ref.fontSize,
|
|
42
|
-
|
|
42
|
+
eqValueFontSize = _ref.eqValueFontSize,
|
|
43
|
+
titleColor = _ref.titleColor,
|
|
44
|
+
dataBoxStyle = _ref.dataBoxStyle,
|
|
45
|
+
headStyle = _ref.headStyle,
|
|
46
|
+
infoBoxStyle = _ref.infoBoxStyle;
|
|
43
47
|
var _useState = (0, _react.useState)(false),
|
|
44
48
|
_useState2 = _slicedToArray(_useState, 2),
|
|
45
49
|
copiedAddressToClipboard = _useState2[0],
|
|
@@ -56,7 +60,8 @@ var CryptoAddress = function CryptoAddress(_ref) {
|
|
|
56
60
|
}, radio && !radio.hide && /*#__PURE__*/_react.default.createElement(_CryptoAddress.CheckMark, null), /*#__PURE__*/_react.default.createElement(_CryptoAddress.Head, {
|
|
57
61
|
noBody: noBody,
|
|
58
62
|
noHead: noHead,
|
|
59
|
-
flexHead: flexHead
|
|
63
|
+
flexHead: flexHead,
|
|
64
|
+
style: headStyle
|
|
60
65
|
}, /*#__PURE__*/_react.default.createElement(_CryptoAddress.Title, {
|
|
61
66
|
color: titleColor
|
|
62
67
|
}, title, status && /*#__PURE__*/_react.default.createElement(_CryptoAddress.Status, null, status)), /*#__PURE__*/_react.default.createElement(_CryptoAddress.TitleSide, null, address && /*#__PURE__*/_react.default.createElement(_CryptoAddress.AddressWrap, null, /*#__PURE__*/_react.default.createElement(_reactTippy.Tooltip, {
|
|
@@ -79,15 +84,26 @@ var CryptoAddress = function CryptoAddress(_ref) {
|
|
|
79
84
|
}
|
|
80
85
|
}))), /*#__PURE__*/_react.default.createElement(_CryptoAddress.Body, {
|
|
81
86
|
noBody: noBody
|
|
82
|
-
}, /*#__PURE__*/_react.default.createElement(_CryptoAddress.DataBox,
|
|
87
|
+
}, /*#__PURE__*/_react.default.createElement(_CryptoAddress.DataBox, {
|
|
88
|
+
style: dataBoxStyle
|
|
89
|
+
}, data.value && /*#__PURE__*/_react.default.createElement(_CryptoAddress.Value, {
|
|
83
90
|
fontSize: fontSize
|
|
84
91
|
}, data.unit && "".concat(data.unit, " "), data.shortAddress ? /*#__PURE__*/_react.default.createElement(_reactTippy.Tooltip, {
|
|
85
92
|
position: "top",
|
|
86
93
|
title: data.value,
|
|
87
94
|
theme: "light",
|
|
88
95
|
arrow: true,
|
|
89
|
-
duration: 200
|
|
90
|
-
|
|
96
|
+
duration: 200,
|
|
97
|
+
style: {
|
|
98
|
+
margin: 0
|
|
99
|
+
}
|
|
100
|
+
}, (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, {
|
|
101
|
+
fontSize: eqValueFontSize
|
|
102
|
+
}, '= ', data.eqUnit && "".concat(data.eqUnit, " "), data.eqValue)), /*#__PURE__*/_react.default.createElement(_CryptoAddress.InfoBox, {
|
|
103
|
+
style: infoBoxStyle
|
|
104
|
+
}, /*#__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, {
|
|
105
|
+
fontSize: eqValueFontSize
|
|
106
|
+
}, info.noEqualsToSign ? ' ' : '= ', info.eqUnit && /*#__PURE__*/_react.default.createElement("strong", null, info.eqUnit), " ".concat(info.eqValue)))), sideOptions && /*#__PURE__*/_react.default.createElement(_CryptoAddress.OptionsWrapper, null, sideOptions)))));
|
|
91
107
|
};
|
|
92
108
|
exports.CryptoAddress = CryptoAddress;
|
|
93
109
|
var copyToClipBoard = function copyToClipBoard(value, isCopied, setCopy) {
|
|
@@ -128,7 +144,11 @@ CryptoAddress.propTypes = {
|
|
|
128
144
|
sideOptions: _propTypes.default.node,
|
|
129
145
|
// fontSize from IIS
|
|
130
146
|
fontSize: _propTypes.default.number,
|
|
131
|
-
|
|
147
|
+
eqValueFontSize: _propTypes.default.number,
|
|
148
|
+
noHead: _propTypes.default.bool,
|
|
149
|
+
dataBoxStyle: _propTypes.default.object,
|
|
150
|
+
headStyle: _propTypes.default.object,
|
|
151
|
+
infoBoxStyle: _propTypes.default.object
|
|
132
152
|
};
|
|
133
153
|
//address not required in IIS, instead wrapping {address &&( .. now doing both which is redundant
|
|
134
154
|
|
|
@@ -155,7 +175,11 @@ CryptoAddress.defaultProps = {
|
|
|
155
175
|
},
|
|
156
176
|
// fontSize from IIS
|
|
157
177
|
fontSize: 22,
|
|
158
|
-
|
|
178
|
+
eqValueFontSize: 9,
|
|
179
|
+
sideOptions: null,
|
|
180
|
+
dataBoxStyle: {},
|
|
181
|
+
headStyle: {},
|
|
182
|
+
infoBoxStyle: {}
|
|
159
183
|
};
|
|
160
184
|
var MemoCryptoAddress = /*#__PURE__*/_react.default.memo(CryptoAddress);
|
|
161
185
|
exports.MemoCryptoAddress = MemoCryptoAddress;
|
|
@@ -27,11 +27,23 @@ var _default = {
|
|
|
27
27
|
defaultValue: '',
|
|
28
28
|
required: true
|
|
29
29
|
},
|
|
30
|
+
titleColor: {
|
|
31
|
+
type: 'string',
|
|
32
|
+
defaultValue: ''
|
|
33
|
+
},
|
|
30
34
|
capital: {
|
|
31
35
|
type: 'number',
|
|
32
36
|
defaultValue: 0,
|
|
33
37
|
required: true
|
|
34
38
|
},
|
|
39
|
+
fontSize: {
|
|
40
|
+
type: 'number',
|
|
41
|
+
defaultValue: 22
|
|
42
|
+
},
|
|
43
|
+
eqValueFontSize: {
|
|
44
|
+
type: 'number',
|
|
45
|
+
defaultValue: 9
|
|
46
|
+
},
|
|
35
47
|
wrapped: {
|
|
36
48
|
type: 'boolean',
|
|
37
49
|
defaultValue: false
|
|
@@ -40,6 +52,18 @@ var _default = {
|
|
|
40
52
|
type: 'boolean',
|
|
41
53
|
defaultValue: false
|
|
42
54
|
},
|
|
55
|
+
noHead: {
|
|
56
|
+
type: 'boolean',
|
|
57
|
+
defaultValue: false
|
|
58
|
+
},
|
|
59
|
+
noBody: {
|
|
60
|
+
type: 'boolean',
|
|
61
|
+
defaultValue: false
|
|
62
|
+
},
|
|
63
|
+
flexHead: {
|
|
64
|
+
type: 'boolean',
|
|
65
|
+
defaultValue: false
|
|
66
|
+
},
|
|
43
67
|
borderBottom: {
|
|
44
68
|
type: 'boolean',
|
|
45
69
|
defaultValue: false
|
|
@@ -56,6 +80,18 @@ var _default = {
|
|
|
56
80
|
type: 'shape',
|
|
57
81
|
defaultValue: {}
|
|
58
82
|
},
|
|
83
|
+
dataBoxStyle: {
|
|
84
|
+
type: 'shape',
|
|
85
|
+
defaultValue: {}
|
|
86
|
+
},
|
|
87
|
+
headStyle: {
|
|
88
|
+
type: 'shape',
|
|
89
|
+
defaultValue: {}
|
|
90
|
+
},
|
|
91
|
+
infoBoxStyle: {
|
|
92
|
+
type: 'shape',
|
|
93
|
+
defaultValue: {}
|
|
94
|
+
},
|
|
59
95
|
sideOptions: {
|
|
60
96
|
type: 'node',
|
|
61
97
|
defaultValue: null
|
|
@@ -118,7 +118,9 @@ exports.Value = Value;
|
|
|
118
118
|
var Equal = _styledComponents.default.div.withConfig({
|
|
119
119
|
displayName: "CryptoAddressstyles__Equal",
|
|
120
120
|
componentId: "sc-1wjvdgu-13"
|
|
121
|
-
})(["position:relative;font-size:9px;font-style:italic;line-height:16px;letter-spacing:0.4px;margin-top:8px;"])
|
|
121
|
+
})(["position:relative;font-size:9px;font-size:", "px;font-style:italic;line-height:16px;letter-spacing:0.4px;margin-top:8px;"], function (props) {
|
|
122
|
+
return props.fontSize;
|
|
123
|
+
});
|
|
122
124
|
exports.Equal = Equal;
|
|
123
125
|
var DataWrapper = _styledComponents.default.div.withConfig({
|
|
124
126
|
displayName: "CryptoAddressstyles__DataWrapper",
|
|
@@ -206,7 +206,7 @@ var HeaderWithProgressSignup = Template.bind({});
|
|
|
206
206
|
exports.HeaderWithProgressSignup = HeaderWithProgressSignup;
|
|
207
207
|
HeaderWithProgressSignup.args = {
|
|
208
208
|
user: _objectSpread(_objectSpread({}, userDev), {}, {
|
|
209
|
-
kyc_status: '
|
|
209
|
+
kyc_status: 'Rejected'
|
|
210
210
|
}),
|
|
211
211
|
progress: {},
|
|
212
212
|
signupFlow: true
|
|
@@ -8,6 +8,7 @@ var _react = _interopRequireDefault(require("react"));
|
|
|
8
8
|
var _flow = _interopRequireDefault(require("./flow"));
|
|
9
9
|
var _flowWithMemo = _interopRequireDefault(require("./flowWithMemo"));
|
|
10
10
|
var _AuthContext = require("../context/AuthContext");
|
|
11
|
+
var _reactRouterDom = require("react-router-dom");
|
|
11
12
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
12
13
|
// import { AlgoAdressSelect } from 'index'
|
|
13
14
|
var _default = {
|
|
@@ -30,7 +31,7 @@ var _default = {
|
|
|
30
31
|
};
|
|
31
32
|
exports.default = _default;
|
|
32
33
|
var Template = function Template(args) {
|
|
33
|
-
return /*#__PURE__*/_react.default.createElement(_AuthContext.AuthProvider, null, /*#__PURE__*/_react.default.createElement(_flow.default, args));
|
|
34
|
+
return /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, /*#__PURE__*/_react.default.createElement(_reactRouterDom.BrowserRouter, null, /*#__PURE__*/_react.default.createElement(_AuthContext.AuthProvider, null, /*#__PURE__*/_react.default.createElement(_flow.default, args))));
|
|
34
35
|
};
|
|
35
36
|
var algoFlowWithoutProject = function algoFlowWithoutProject() {
|
|
36
37
|
return /*#__PURE__*/_react.default.createElement(_AuthContext.AuthProvider, null, /*#__PURE__*/_react.default.createElement(_flow.default, {
|
|
@@ -25,12 +25,11 @@ var StepsProgressSignup = function StepsProgressSignup(props) {
|
|
|
25
25
|
taxId = user.taxId,
|
|
26
26
|
_user$wallets = user.wallets,
|
|
27
27
|
wallets = _user$wallets === void 0 ? [] : _user$wallets;
|
|
28
|
-
var
|
|
29
|
-
var isPoAPendingOrApproved = KYCDocuments.status === 'Pending' || KYCDocuments.status === 'Approved';
|
|
28
|
+
var isKYCRejected = !kyc_status || kyc_status === 'Reaply' || kyc_status === 'Draft';
|
|
30
29
|
var hasLiquidWallet = (wallets === null || wallets === void 0 ? void 0 : wallets.filter(function (wallet) {
|
|
31
30
|
return wallet.type === _globalVariables.walletTypes.LIQUID;
|
|
32
31
|
}).length) > 0;
|
|
33
|
-
var areAllDoneInvestor = !!country &&
|
|
32
|
+
var areAllDoneInvestor = !!country && !isKYCRejected && hasLiquidWallet && !!taxId && !!is_risk_questionnaire_finished;
|
|
34
33
|
var areAllDoneEntity = hasLiquidWallet && !!is_risk_questionnaire_finished;
|
|
35
34
|
var isActiveStep = function isActiveStep(path) {
|
|
36
35
|
return window.location.pathname.includes(path);
|
|
@@ -75,7 +74,7 @@ var StepsProgressSignup = function StepsProgressSignup(props) {
|
|
|
75
74
|
handleClick: function handleClick() {
|
|
76
75
|
return navigate('/verify-identity');
|
|
77
76
|
},
|
|
78
|
-
isDone:
|
|
77
|
+
isDone: !isKYCRejected,
|
|
79
78
|
isActive: isActiveStep('/verify-identity')
|
|
80
79
|
}, {
|
|
81
80
|
id: 'taxId',
|
|
@@ -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
|
|
7
|
+
var platformDomain = process.env.REACT_APP_WEBSITE_DOMAIN;
|
|
8
8
|
exports.platformDomain = platformDomain;
|
|
9
9
|
var platformURL = 'https://' + platformDomain;
|
|
10
10
|
exports.platformURL = platformURL;
|
package/dist/model/axios.js
CHANGED
|
@@ -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
|
|
11
|
+
var BASE_URL = process.env.REACT_APP_API_URL;
|
|
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
|
|
11
|
+
var BASE_URL = process.env.REACT_APP_BASE_URL_PUBLIC;
|
|
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.
|
|
3
|
+
"version": "0.9.6",
|
|
4
4
|
"description": "STOKR - Components Library",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"module": "dist/index.js",
|
|
@@ -25,7 +25,8 @@
|
|
|
25
25
|
"start": "npm run storybook",
|
|
26
26
|
"chromatic": "CHROMATIC_APP_CODE=7kzdke5umep chromatic",
|
|
27
27
|
"release": "auto shipit",
|
|
28
|
-
"pub": "rm -rf ./dist && npm publish --access public"
|
|
28
|
+
"pub": "rm -rf ./dist && npm publish --access public",
|
|
29
|
+
"start:script": "react-scripts start"
|
|
29
30
|
},
|
|
30
31
|
"dependencies": {
|
|
31
32
|
"@fortawesome/fontawesome-svg-core": "^6.3.0",
|