@desynova-digital/components 9.1.21 → 9.1.22
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/_helpers/utils.js +4 -4
- package/atoms/avatar/index.js +1 -2
- package/atoms/badge/index.js +1 -2
- package/atoms/button/button.js +1 -2
- package/atoms/card/index.js +1 -2
- package/atoms/cardStack/index.js +1 -2
- package/atoms/cardV2/cardV2.js +6 -7
- package/atoms/cardV2/content.js +7 -8
- package/atoms/cardV2/thumbnail.js +11 -12
- package/atoms/cardV2/timeline.js +1 -2
- package/atoms/customSelect/customSelect.js +1 -2
- package/atoms/datePicker/datePicker.js +11 -12
- package/atoms/draftInputText/draftInputText.js +44 -45
- package/atoms/dropdown/dropdown.js +1 -2
- package/atoms/dropdownList/dropdownList.js +1 -2
- package/atoms/graphs/circleDonut/circleDonut.js +1 -2
- package/atoms/graphs/circleGraph/circleGraph.js +1 -2
- package/atoms/graphs/circleNested/circleNested.js +1 -2
- package/atoms/graphs/pieChart/pieChart.js +1 -2
- package/atoms/graphs/verticalBarGraph/verticalBarGraph.js +1 -2
- package/atoms/icon/icons.json +1708 -1708
- package/atoms/icon/index.js +1 -2
- package/atoms/inputText/inputText.js +1 -2
- package/atoms/loader/CircleLoader.jsx +93 -93
- package/atoms/loader/ShimmerComponent/CollabShimmerCard.jsx +39 -39
- package/atoms/loader/ShimmerComponent/CollabShimmerCardTray.jsx +24 -24
- package/atoms/loader/ShimmerComponent/FiltersShimmer.jsx +19 -19
- package/atoms/loader/ShimmerComponent/GraphDetailShimmer.jsx +31 -31
- package/atoms/loader/ShimmerComponent/GraphTitleShimmer.jsx +23 -23
- package/atoms/loader/ShimmerComponent/GraphsComponentShimmer.jsx +23 -23
- package/atoms/loader/ShimmerComponent/Shimmer.js +1 -2
- package/atoms/loader/ShimmerComponent/Shimmer.jsx +48 -48
- package/atoms/loader/ThreeDotLoader.jsx +51 -51
- package/atoms/loader/index.js +1 -2
- package/atoms/loader/spinningLoader.jsx +69 -69
- package/atoms/popup/popup.js +1 -2
- package/atoms/radio/index.js +1 -2
- package/atoms/sideBar/sidebar.js +4 -5
- package/atoms/sideBar/sidebar.jsx +249 -249
- package/atoms/tag/index.js +1 -2
- package/atoms/thematicBreak/index.js +1 -2
- package/atoms/timeCodeInput/timeCodeInput.js +1 -2
- package/atoms/timeCodeInput/timeCodeMSInput.js +1 -2
- package/atoms/timeCodeInput/timeCodeMainInput.js +10 -11
- package/atoms/timeCodeInput/timeCodeStandardInput.js +4 -5
- package/atoms/timer/timer.js +1 -2
- package/atoms/toast/toast.js +1 -2
- package/atoms/videoCard/index.js +1 -2
- package/atoms/videoCard/videoCard.js +3 -3
- package/components.js +1 -2
- package/molecules/errorScreen/TableErrorScreen.jsx +85 -85
- package/molecules/errorScreen/errorScreen.js +9 -9
- package/molecules/errorScreen/errorScreen.jsx +149 -149
- package/molecules/filter/filter.js +39 -40
- package/molecules/graphDetailCard/graphDetailCard.js +1 -2
- package/molecules/pageHeader/index.js +1 -2
- package/molecules/richTextInput/RichTextInput.js +9 -10
- package/molecules/table/table.js +7 -8
- package/molecules/videoPlayer/videoPlayer.js +6 -6
- package/package.json +2 -2
package/atoms/toast/toast.js
CHANGED
|
@@ -18,8 +18,7 @@ var _styledComponents = _interopRequireDefault(require("styled-components"));
|
|
|
18
18
|
var _icon = _interopRequireDefault(require("../icon"));
|
|
19
19
|
var _tokens = require("../../../tokens");
|
|
20
20
|
var _templateObject, _templateObject2;
|
|
21
|
-
function
|
|
22
|
-
function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != _typeof(e) && "function" != typeof e) return { "default": e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && {}.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n["default"] = e, t && t.set(e, n), n; }
|
|
21
|
+
function _interopRequireWildcard(e, t) { if ("function" == typeof WeakMap) var r = new WeakMap(), n = new WeakMap(); return (_interopRequireWildcard = function _interopRequireWildcard(e, t) { if (!t && e && e.__esModule) return e; var o, i, f = { __proto__: null, "default": e }; if (null === e || "object" != _typeof(e) && "function" != typeof e) return f; if (o = t ? n : r) { if (o.has(e)) return o.get(e); o.set(e, f); } for (var _t in e) "default" !== _t && {}.hasOwnProperty.call(e, _t) && ((i = (o = Object.defineProperty) && Object.getOwnPropertyDescriptor(e, _t)) && (i.get || i.set) ? o(f, _t, i) : f[_t] = e[_t]); return f; })(e, t); }
|
|
23
22
|
function _callSuper(t, o, e) { return o = (0, _getPrototypeOf2["default"])(o), (0, _possibleConstructorReturn2["default"])(t, _isNativeReflectConstruct() ? Reflect.construct(o, e || [], (0, _getPrototypeOf2["default"])(t).constructor) : o.apply(t, e)); }
|
|
24
23
|
function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); }
|
|
25
24
|
var propTypes = {
|
package/atoms/videoCard/index.js
CHANGED
|
@@ -12,6 +12,5 @@ Object.defineProperty(exports, "StyledCard", {
|
|
|
12
12
|
});
|
|
13
13
|
exports["default"] = void 0;
|
|
14
14
|
var _videoCard = _interopRequireWildcard(require("./videoCard"));
|
|
15
|
-
function
|
|
16
|
-
function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != _typeof(e) && "function" != typeof e) return { "default": e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && {}.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n["default"] = e, t && t.set(e, n), n; }
|
|
15
|
+
function _interopRequireWildcard(e, t) { if ("function" == typeof WeakMap) var r = new WeakMap(), n = new WeakMap(); return (_interopRequireWildcard = function _interopRequireWildcard(e, t) { if (!t && e && e.__esModule) return e; var o, i, f = { __proto__: null, "default": e }; if (null === e || "object" != _typeof(e) && "function" != typeof e) return f; if (o = t ? n : r) { if (o.has(e)) return o.get(e); o.set(e, f); } for (var _t in e) "default" !== _t && {}.hasOwnProperty.call(e, _t) && ((i = (o = Object.defineProperty) && Object.getOwnPropertyDescriptor(e, _t)) && (i.get || i.set) ? o(f, _t, i) : f[_t] = e[_t]); return f; })(e, t); }
|
|
17
16
|
var _default = exports["default"] = _videoCard["default"];
|
package/components.js
CHANGED
|
@@ -418,5 +418,4 @@ var _Shimmer = _interopRequireDefault(require("./atoms/loader/ShimmerComponent/S
|
|
|
418
418
|
var _timeCodeInput = _interopRequireDefault(require("./atoms/timeCodeInput/timeCodeInput"));
|
|
419
419
|
var _timeCodeDisplay = _interopRequireDefault(require("./atoms/timeCodeDisplay/timeCodeDisplay"));
|
|
420
420
|
var _richTextInput = _interopRequireDefault(require("./molecules/richTextInput"));
|
|
421
|
-
function
|
|
422
|
-
function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != _typeof(e) && "function" != typeof e) return { "default": e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && {}.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n["default"] = e, t && t.set(e, n), n; }
|
|
421
|
+
function _interopRequireWildcard(e, t) { if ("function" == typeof WeakMap) var r = new WeakMap(), n = new WeakMap(); return (_interopRequireWildcard = function _interopRequireWildcard(e, t) { if (!t && e && e.__esModule) return e; var o, i, f = { __proto__: null, "default": e }; if (null === e || "object" != _typeof(e) && "function" != typeof e) return f; if (o = t ? n : r) { if (o.has(e)) return o.get(e); o.set(e, f); } for (var _t in e) "default" !== _t && {}.hasOwnProperty.call(e, _t) && ((i = (o = Object.defineProperty) && Object.getOwnPropertyDescriptor(e, _t)) && (i.get || i.set) ? o(f, _t, i) : f[_t] = e[_t]); return f; })(e, t); }
|
|
@@ -1,85 +1,85 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
|
|
3
|
-
const TableErrorScreen = ({ h1 = "No Results Found", h2 = "Try a different filter set" }) => {
|
|
4
|
-
return (
|
|
5
|
-
<div
|
|
6
|
-
style={{
|
|
7
|
-
height: '279px',
|
|
8
|
-
width: '100%',
|
|
9
|
-
display: 'flex',
|
|
10
|
-
justifyContent: 'center',
|
|
11
|
-
alignItems: 'center'
|
|
12
|
-
}}>
|
|
13
|
-
<div
|
|
14
|
-
style={{
|
|
15
|
-
width: '520px',
|
|
16
|
-
height: '130px',
|
|
17
|
-
display: 'flex',
|
|
18
|
-
alignItems: 'center',
|
|
19
|
-
justifyContent: 'center',
|
|
20
|
-
gap: '10px'
|
|
21
|
-
}}>
|
|
22
|
-
<div
|
|
23
|
-
style={{
|
|
24
|
-
height: '120px',
|
|
25
|
-
width: '120px',
|
|
26
|
-
background: '#303F51',
|
|
27
|
-
display: 'flex',
|
|
28
|
-
alignItems: 'center',
|
|
29
|
-
justifyContent: 'center',
|
|
30
|
-
borderRadius: '50%',
|
|
31
|
-
flexDirection: 'column'
|
|
32
|
-
}}>
|
|
33
|
-
<div
|
|
34
|
-
style={{
|
|
35
|
-
display: 'flex',
|
|
36
|
-
alignItems: 'flex-start',
|
|
37
|
-
justifyContent: 'center',
|
|
38
|
-
gap: '8px',
|
|
39
|
-
flexDirection: 'column'
|
|
40
|
-
}}>
|
|
41
|
-
<div style={{ height: '10px', width: '60px', background: '#182738', borderRadius: '10px' }}></div>
|
|
42
|
-
<div style={{ height: '10px', width: '40px', background: '#182738', borderRadius: '10px' }}></div>
|
|
43
|
-
<div style={{ height: '10px', width: '50px', background: '#182738', borderRadius: '10px' }}></div>
|
|
44
|
-
<div style={{ height: '10px', width: '30px', background: '#182738', borderRadius: '10px' }}></div>
|
|
45
|
-
<div style={{ height: '10px', width: '50px', background: '#182738', borderRadius: '10px' }}></div>
|
|
46
|
-
</div>
|
|
47
|
-
</div>
|
|
48
|
-
<div
|
|
49
|
-
style={{
|
|
50
|
-
height: '120px',
|
|
51
|
-
width: '300px ',
|
|
52
|
-
display: 'flex',
|
|
53
|
-
alignItems: 'flex-start',
|
|
54
|
-
justifyContent: 'center',
|
|
55
|
-
flexDirection: 'column'
|
|
56
|
-
}}>
|
|
57
|
-
<p
|
|
58
|
-
style={{
|
|
59
|
-
color: 'var(--color-text-color-pure-white, #FFF)',
|
|
60
|
-
fontSize: '24px',
|
|
61
|
-
fontWeight: '500',
|
|
62
|
-
lineHeight: '36px',
|
|
63
|
-
fontStyle: 'normal',
|
|
64
|
-
fontFamily: 'SFUIText-Medium'
|
|
65
|
-
}}>
|
|
66
|
-
{h1}
|
|
67
|
-
</p>
|
|
68
|
-
<p
|
|
69
|
-
style={{
|
|
70
|
-
color: 'var(--color-text-color-pure-white, #FFF)',
|
|
71
|
-
fontSize: '14px',
|
|
72
|
-
fontStyle: 'normal',
|
|
73
|
-
fontWeight: '300',
|
|
74
|
-
lineHeight: '21px',
|
|
75
|
-
fontFamily: 'SFUIText-Medium'
|
|
76
|
-
}}>
|
|
77
|
-
{h2}
|
|
78
|
-
</p>
|
|
79
|
-
</div>
|
|
80
|
-
</div>
|
|
81
|
-
</div>
|
|
82
|
-
);
|
|
83
|
-
};
|
|
84
|
-
|
|
85
|
-
export default TableErrorScreen;
|
|
1
|
+
import React from 'react';
|
|
2
|
+
|
|
3
|
+
const TableErrorScreen = ({ h1 = "No Results Found", h2 = "Try a different filter set" }) => {
|
|
4
|
+
return (
|
|
5
|
+
<div
|
|
6
|
+
style={{
|
|
7
|
+
height: '279px',
|
|
8
|
+
width: '100%',
|
|
9
|
+
display: 'flex',
|
|
10
|
+
justifyContent: 'center',
|
|
11
|
+
alignItems: 'center'
|
|
12
|
+
}}>
|
|
13
|
+
<div
|
|
14
|
+
style={{
|
|
15
|
+
width: '520px',
|
|
16
|
+
height: '130px',
|
|
17
|
+
display: 'flex',
|
|
18
|
+
alignItems: 'center',
|
|
19
|
+
justifyContent: 'center',
|
|
20
|
+
gap: '10px'
|
|
21
|
+
}}>
|
|
22
|
+
<div
|
|
23
|
+
style={{
|
|
24
|
+
height: '120px',
|
|
25
|
+
width: '120px',
|
|
26
|
+
background: '#303F51',
|
|
27
|
+
display: 'flex',
|
|
28
|
+
alignItems: 'center',
|
|
29
|
+
justifyContent: 'center',
|
|
30
|
+
borderRadius: '50%',
|
|
31
|
+
flexDirection: 'column'
|
|
32
|
+
}}>
|
|
33
|
+
<div
|
|
34
|
+
style={{
|
|
35
|
+
display: 'flex',
|
|
36
|
+
alignItems: 'flex-start',
|
|
37
|
+
justifyContent: 'center',
|
|
38
|
+
gap: '8px',
|
|
39
|
+
flexDirection: 'column'
|
|
40
|
+
}}>
|
|
41
|
+
<div style={{ height: '10px', width: '60px', background: '#182738', borderRadius: '10px' }}></div>
|
|
42
|
+
<div style={{ height: '10px', width: '40px', background: '#182738', borderRadius: '10px' }}></div>
|
|
43
|
+
<div style={{ height: '10px', width: '50px', background: '#182738', borderRadius: '10px' }}></div>
|
|
44
|
+
<div style={{ height: '10px', width: '30px', background: '#182738', borderRadius: '10px' }}></div>
|
|
45
|
+
<div style={{ height: '10px', width: '50px', background: '#182738', borderRadius: '10px' }}></div>
|
|
46
|
+
</div>
|
|
47
|
+
</div>
|
|
48
|
+
<div
|
|
49
|
+
style={{
|
|
50
|
+
height: '120px',
|
|
51
|
+
width: '300px ',
|
|
52
|
+
display: 'flex',
|
|
53
|
+
alignItems: 'flex-start',
|
|
54
|
+
justifyContent: 'center',
|
|
55
|
+
flexDirection: 'column'
|
|
56
|
+
}}>
|
|
57
|
+
<p
|
|
58
|
+
style={{
|
|
59
|
+
color: 'var(--color-text-color-pure-white, #FFF)',
|
|
60
|
+
fontSize: '24px',
|
|
61
|
+
fontWeight: '500',
|
|
62
|
+
lineHeight: '36px',
|
|
63
|
+
fontStyle: 'normal',
|
|
64
|
+
fontFamily: 'SFUIText-Medium'
|
|
65
|
+
}}>
|
|
66
|
+
{h1}
|
|
67
|
+
</p>
|
|
68
|
+
<p
|
|
69
|
+
style={{
|
|
70
|
+
color: 'var(--color-text-color-pure-white, #FFF)',
|
|
71
|
+
fontSize: '14px',
|
|
72
|
+
fontStyle: 'normal',
|
|
73
|
+
fontWeight: '300',
|
|
74
|
+
lineHeight: '21px',
|
|
75
|
+
fontFamily: 'SFUIText-Medium'
|
|
76
|
+
}}>
|
|
77
|
+
{h2}
|
|
78
|
+
</p>
|
|
79
|
+
</div>
|
|
80
|
+
</div>
|
|
81
|
+
</div>
|
|
82
|
+
);
|
|
83
|
+
};
|
|
84
|
+
|
|
85
|
+
export default TableErrorScreen;
|
|
@@ -23,11 +23,11 @@ var SubHeader = _styledComponents["default"].p(_templateObject4 || (_templateObj
|
|
|
23
23
|
var Line = _styledComponents["default"].div(_templateObject5 || (_templateObject5 = (0, _taggedTemplateLiteral2["default"])(["\n width: 50px;\n border-bottom: 3px solid #00cec6;\n"])));
|
|
24
24
|
var ErrorButtons = (0, _styledComponents["default"])(_button["default"])(_templateObject6 || (_templateObject6 = (0, _taggedTemplateLiteral2["default"])(["\n margin: 30px 0 0 0;\n width: 150px;\n border: none;\n padding: 15px 0;\n"])));
|
|
25
25
|
|
|
26
|
-
/*
|
|
27
|
-
* Image links
|
|
28
|
-
* https://ctdnstgthumbnail.contido.io/contido-assets/
|
|
29
|
-
* props that we recieve are names of images. the page renders content based on that
|
|
30
|
-
* Name of images are 404-error, no-ressults, went-wrong & network-error
|
|
26
|
+
/*
|
|
27
|
+
* Image links
|
|
28
|
+
* https://ctdnstgthumbnail.contido.io/contido-assets/
|
|
29
|
+
* props that we recieve are names of images. the page renders content based on that
|
|
30
|
+
* Name of images are 404-error, no-ressults, went-wrong & network-error
|
|
31
31
|
*/
|
|
32
32
|
|
|
33
33
|
var propTypes = {
|
|
@@ -38,10 +38,10 @@ var propTypes = {
|
|
|
38
38
|
showButton: _propTypes["default"].bool
|
|
39
39
|
};
|
|
40
40
|
|
|
41
|
-
/**
|
|
42
|
-
* @component
|
|
43
|
-
* @category App
|
|
44
|
-
* @subcategory Error Screen
|
|
41
|
+
/**
|
|
42
|
+
* @component
|
|
43
|
+
* @category App
|
|
44
|
+
* @subcategory Error Screen
|
|
45
45
|
*/
|
|
46
46
|
|
|
47
47
|
var ErrorScreen = function ErrorScreen(props) {
|
|
@@ -1,149 +1,149 @@
|
|
|
1
|
-
/* eslint-disable no-unused-expressions, no-restricted-globals */
|
|
2
|
-
import React from 'react';
|
|
3
|
-
import styled from 'styled-components';
|
|
4
|
-
import PropTypes from 'prop-types';
|
|
5
|
-
import Button from '../../atoms/button/button';
|
|
6
|
-
|
|
7
|
-
const Wrapper = styled.div`
|
|
8
|
-
display: flex;
|
|
9
|
-
font-size: 32px;
|
|
10
|
-
align-items: center;
|
|
11
|
-
color: #fff;
|
|
12
|
-
flex-direction: column;
|
|
13
|
-
justify-content: center;
|
|
14
|
-
font-family: 'SFUIText-Medium';
|
|
15
|
-
color: rgba(255, 255, 255, 0.8);
|
|
16
|
-
/* height: calc(100vh - 80px); */
|
|
17
|
-
height: ${(props => props.smallImage ? '' : '100vh')};
|
|
18
|
-
background: #0c141d;
|
|
19
|
-
.flex {
|
|
20
|
-
display: flex;
|
|
21
|
-
justify-content: center;
|
|
22
|
-
align-items: center;
|
|
23
|
-
}
|
|
24
|
-
`;
|
|
25
|
-
|
|
26
|
-
const ImageWrapper = styled.div`
|
|
27
|
-
width: ${(props => props.smallImage ? '240px' : '400px')};
|
|
28
|
-
margin-right: 50px;
|
|
29
|
-
img {
|
|
30
|
-
width: 100%;
|
|
31
|
-
}
|
|
32
|
-
`;
|
|
33
|
-
|
|
34
|
-
const Header = styled.p`
|
|
35
|
-
font-size: 50px;
|
|
36
|
-
margin-bottom: 40px;
|
|
37
|
-
font-weight: bold;
|
|
38
|
-
display: flex;
|
|
39
|
-
`;
|
|
40
|
-
|
|
41
|
-
const SubHeader = styled.p`
|
|
42
|
-
font-size: 20px;
|
|
43
|
-
font-weight: 300;
|
|
44
|
-
margin-top: 40px;
|
|
45
|
-
display: flex;
|
|
46
|
-
`;
|
|
47
|
-
|
|
48
|
-
const Line = styled.div`
|
|
49
|
-
width: 50px;
|
|
50
|
-
border-bottom: 3px solid #00cec6;
|
|
51
|
-
`;
|
|
52
|
-
|
|
53
|
-
const ErrorButtons = styled(Button)`
|
|
54
|
-
margin: 30px 0 0 0;
|
|
55
|
-
width: 150px;
|
|
56
|
-
border: none;
|
|
57
|
-
padding: 15px 0;
|
|
58
|
-
`;
|
|
59
|
-
|
|
60
|
-
/*
|
|
61
|
-
* Image links
|
|
62
|
-
* https://ctdnstgthumbnail.contido.io/contido-assets/
|
|
63
|
-
* props that we recieve are names of images. the page renders content based on that
|
|
64
|
-
* Name of images are 404-error, no-ressults, went-wrong & network-error
|
|
65
|
-
*/
|
|
66
|
-
|
|
67
|
-
const propTypes = {
|
|
68
|
-
type: PropTypes.oneOf(['no-result-found', 'went-wrong', '404-error', 'network-error' ]),
|
|
69
|
-
title: PropTypes.string,
|
|
70
|
-
subTitle: PropTypes.string,
|
|
71
|
-
smallImage: PropTypes.bool,
|
|
72
|
-
showButton: PropTypes.bool
|
|
73
|
-
};
|
|
74
|
-
|
|
75
|
-
/**
|
|
76
|
-
* @component
|
|
77
|
-
* @category App
|
|
78
|
-
* @subcategory Error Screen
|
|
79
|
-
*/
|
|
80
|
-
|
|
81
|
-
const ErrorScreen = (props) => {
|
|
82
|
-
const { type, smallImage, showButton } = props;
|
|
83
|
-
|
|
84
|
-
const data = {
|
|
85
|
-
'no-result-found': {
|
|
86
|
-
'title': 'No Results Found',
|
|
87
|
-
'subTitle': 'No data available for the selected filters',
|
|
88
|
-
'buttonText': ''
|
|
89
|
-
},
|
|
90
|
-
'went-wrong': {
|
|
91
|
-
'title': 'Something Went Wrong',
|
|
92
|
-
'subTitle': '',
|
|
93
|
-
'buttonText': ''
|
|
94
|
-
},
|
|
95
|
-
'404-error': {
|
|
96
|
-
'title': 'Page Not Found',
|
|
97
|
-
'subTitle': 'We can’t seem to find the page you are looking for.',
|
|
98
|
-
'buttonText': 'Go Home'
|
|
99
|
-
},
|
|
100
|
-
'network-error': {
|
|
101
|
-
'title': 'Network Error',
|
|
102
|
-
'subTitle': '',
|
|
103
|
-
'buttonText': ''
|
|
104
|
-
}
|
|
105
|
-
}
|
|
106
|
-
|
|
107
|
-
const title = props.title || data[type].title;
|
|
108
|
-
const subTitle = props.subTitle || data[type].subTitle;
|
|
109
|
-
const buttonText = props.buttonText || data[type].buttonText;
|
|
110
|
-
|
|
111
|
-
const ctaFunction = () => {
|
|
112
|
-
type === '404-error' ? (location.href = '/') : window.location.reload();
|
|
113
|
-
};
|
|
114
|
-
|
|
115
|
-
return (
|
|
116
|
-
<Wrapper smallImage={smallImage}>
|
|
117
|
-
<div className="flex">
|
|
118
|
-
<ImageWrapper smallImage={smallImage}>
|
|
119
|
-
<img src={`https://ctdnstgthumbnail.contido.io/contido-assets/${type}.svg`} alt="" />
|
|
120
|
-
</ImageWrapper>
|
|
121
|
-
<div className="text">
|
|
122
|
-
<Header>{title}</Header>
|
|
123
|
-
<Line />
|
|
124
|
-
<SubHeader>{subTitle}</SubHeader>
|
|
125
|
-
{showButton ?
|
|
126
|
-
<ErrorButtons
|
|
127
|
-
display="rounded"
|
|
128
|
-
onClick={() => {
|
|
129
|
-
ctaFunction();
|
|
130
|
-
}}>
|
|
131
|
-
{buttonText}
|
|
132
|
-
</ErrorButtons> :
|
|
133
|
-
null
|
|
134
|
-
}
|
|
135
|
-
</div>
|
|
136
|
-
</div>
|
|
137
|
-
</Wrapper>
|
|
138
|
-
);
|
|
139
|
-
};
|
|
140
|
-
|
|
141
|
-
ErrorScreen.propTypes = propTypes;
|
|
142
|
-
|
|
143
|
-
ErrorScreen.defaultProps = {
|
|
144
|
-
title: 'No Results Found',
|
|
145
|
-
subTitle: 'Refresh this page or try again later.',
|
|
146
|
-
buttonText: 'Refresh'
|
|
147
|
-
};
|
|
148
|
-
|
|
149
|
-
export default ErrorScreen;
|
|
1
|
+
/* eslint-disable no-unused-expressions, no-restricted-globals */
|
|
2
|
+
import React from 'react';
|
|
3
|
+
import styled from 'styled-components';
|
|
4
|
+
import PropTypes from 'prop-types';
|
|
5
|
+
import Button from '../../atoms/button/button';
|
|
6
|
+
|
|
7
|
+
const Wrapper = styled.div`
|
|
8
|
+
display: flex;
|
|
9
|
+
font-size: 32px;
|
|
10
|
+
align-items: center;
|
|
11
|
+
color: #fff;
|
|
12
|
+
flex-direction: column;
|
|
13
|
+
justify-content: center;
|
|
14
|
+
font-family: 'SFUIText-Medium';
|
|
15
|
+
color: rgba(255, 255, 255, 0.8);
|
|
16
|
+
/* height: calc(100vh - 80px); */
|
|
17
|
+
height: ${(props => props.smallImage ? '' : '100vh')};
|
|
18
|
+
background: #0c141d;
|
|
19
|
+
.flex {
|
|
20
|
+
display: flex;
|
|
21
|
+
justify-content: center;
|
|
22
|
+
align-items: center;
|
|
23
|
+
}
|
|
24
|
+
`;
|
|
25
|
+
|
|
26
|
+
const ImageWrapper = styled.div`
|
|
27
|
+
width: ${(props => props.smallImage ? '240px' : '400px')};
|
|
28
|
+
margin-right: 50px;
|
|
29
|
+
img {
|
|
30
|
+
width: 100%;
|
|
31
|
+
}
|
|
32
|
+
`;
|
|
33
|
+
|
|
34
|
+
const Header = styled.p`
|
|
35
|
+
font-size: 50px;
|
|
36
|
+
margin-bottom: 40px;
|
|
37
|
+
font-weight: bold;
|
|
38
|
+
display: flex;
|
|
39
|
+
`;
|
|
40
|
+
|
|
41
|
+
const SubHeader = styled.p`
|
|
42
|
+
font-size: 20px;
|
|
43
|
+
font-weight: 300;
|
|
44
|
+
margin-top: 40px;
|
|
45
|
+
display: flex;
|
|
46
|
+
`;
|
|
47
|
+
|
|
48
|
+
const Line = styled.div`
|
|
49
|
+
width: 50px;
|
|
50
|
+
border-bottom: 3px solid #00cec6;
|
|
51
|
+
`;
|
|
52
|
+
|
|
53
|
+
const ErrorButtons = styled(Button)`
|
|
54
|
+
margin: 30px 0 0 0;
|
|
55
|
+
width: 150px;
|
|
56
|
+
border: none;
|
|
57
|
+
padding: 15px 0;
|
|
58
|
+
`;
|
|
59
|
+
|
|
60
|
+
/*
|
|
61
|
+
* Image links
|
|
62
|
+
* https://ctdnstgthumbnail.contido.io/contido-assets/
|
|
63
|
+
* props that we recieve are names of images. the page renders content based on that
|
|
64
|
+
* Name of images are 404-error, no-ressults, went-wrong & network-error
|
|
65
|
+
*/
|
|
66
|
+
|
|
67
|
+
const propTypes = {
|
|
68
|
+
type: PropTypes.oneOf(['no-result-found', 'went-wrong', '404-error', 'network-error' ]),
|
|
69
|
+
title: PropTypes.string,
|
|
70
|
+
subTitle: PropTypes.string,
|
|
71
|
+
smallImage: PropTypes.bool,
|
|
72
|
+
showButton: PropTypes.bool
|
|
73
|
+
};
|
|
74
|
+
|
|
75
|
+
/**
|
|
76
|
+
* @component
|
|
77
|
+
* @category App
|
|
78
|
+
* @subcategory Error Screen
|
|
79
|
+
*/
|
|
80
|
+
|
|
81
|
+
const ErrorScreen = (props) => {
|
|
82
|
+
const { type, smallImage, showButton } = props;
|
|
83
|
+
|
|
84
|
+
const data = {
|
|
85
|
+
'no-result-found': {
|
|
86
|
+
'title': 'No Results Found',
|
|
87
|
+
'subTitle': 'No data available for the selected filters',
|
|
88
|
+
'buttonText': ''
|
|
89
|
+
},
|
|
90
|
+
'went-wrong': {
|
|
91
|
+
'title': 'Something Went Wrong',
|
|
92
|
+
'subTitle': '',
|
|
93
|
+
'buttonText': ''
|
|
94
|
+
},
|
|
95
|
+
'404-error': {
|
|
96
|
+
'title': 'Page Not Found',
|
|
97
|
+
'subTitle': 'We can’t seem to find the page you are looking for.',
|
|
98
|
+
'buttonText': 'Go Home'
|
|
99
|
+
},
|
|
100
|
+
'network-error': {
|
|
101
|
+
'title': 'Network Error',
|
|
102
|
+
'subTitle': '',
|
|
103
|
+
'buttonText': ''
|
|
104
|
+
}
|
|
105
|
+
}
|
|
106
|
+
|
|
107
|
+
const title = props.title || data[type].title;
|
|
108
|
+
const subTitle = props.subTitle || data[type].subTitle;
|
|
109
|
+
const buttonText = props.buttonText || data[type].buttonText;
|
|
110
|
+
|
|
111
|
+
const ctaFunction = () => {
|
|
112
|
+
type === '404-error' ? (location.href = '/') : window.location.reload();
|
|
113
|
+
};
|
|
114
|
+
|
|
115
|
+
return (
|
|
116
|
+
<Wrapper smallImage={smallImage}>
|
|
117
|
+
<div className="flex">
|
|
118
|
+
<ImageWrapper smallImage={smallImage}>
|
|
119
|
+
<img src={`https://ctdnstgthumbnail.contido.io/contido-assets/${type}.svg`} alt="" />
|
|
120
|
+
</ImageWrapper>
|
|
121
|
+
<div className="text">
|
|
122
|
+
<Header>{title}</Header>
|
|
123
|
+
<Line />
|
|
124
|
+
<SubHeader>{subTitle}</SubHeader>
|
|
125
|
+
{showButton ?
|
|
126
|
+
<ErrorButtons
|
|
127
|
+
display="rounded"
|
|
128
|
+
onClick={() => {
|
|
129
|
+
ctaFunction();
|
|
130
|
+
}}>
|
|
131
|
+
{buttonText}
|
|
132
|
+
</ErrorButtons> :
|
|
133
|
+
null
|
|
134
|
+
}
|
|
135
|
+
</div>
|
|
136
|
+
</div>
|
|
137
|
+
</Wrapper>
|
|
138
|
+
);
|
|
139
|
+
};
|
|
140
|
+
|
|
141
|
+
ErrorScreen.propTypes = propTypes;
|
|
142
|
+
|
|
143
|
+
ErrorScreen.defaultProps = {
|
|
144
|
+
title: 'No Results Found',
|
|
145
|
+
subTitle: 'Refresh this page or try again later.',
|
|
146
|
+
buttonText: 'Refresh'
|
|
147
|
+
};
|
|
148
|
+
|
|
149
|
+
export default ErrorScreen;
|