@desynova-digital/components 9.1.44 → 9.1.45
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/cardV2/cardV2.js +5 -5
- package/atoms/cardV2/content.js +6 -6
- package/atoms/cardV2/thumbnail.js +10 -10
- package/atoms/draftInputText/draftInputText.js +40 -40
- package/atoms/icon/icons.json +1836 -1836
- package/atoms/loader/CircleLoader.jsx +93 -93
- package/atoms/loader/ShimmerComponent/CollabShimmerCard.js +14 -3
- 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.jsx +48 -48
- package/atoms/loader/ThreeDotLoader.jsx +51 -51
- package/atoms/loader/spinningLoader.jsx +69 -69
- package/atoms/sideBar/sidebar.js +3 -3
- package/atoms/sideBar/sidebar.jsx +262 -262
- package/atoms/timeCodeInput/timeCodeMainInput.js +7 -7
- package/atoms/videoCard/videoCard.js +3 -3
- 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 +38 -38
- package/molecules/richTextInput/RichTextInput.js +8 -8
- package/package.json +2 -2
|
@@ -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;
|
|
@@ -76,10 +76,10 @@ var Filter = /*#__PURE__*/function (_Component) {
|
|
|
76
76
|
var _this;
|
|
77
77
|
(0, _classCallCheck2["default"])(this, Filter);
|
|
78
78
|
_this = _callSuper(this, Filter, [props]);
|
|
79
|
-
/**
|
|
80
|
-
* This function handle the onChange event in the filter.
|
|
81
|
-
* @param {Object} groupItem GUI elements for the particular section
|
|
82
|
-
* @param {Object} optionItem the item from the options of that section
|
|
79
|
+
/**
|
|
80
|
+
* This function handle the onChange event in the filter.
|
|
81
|
+
* @param {Object} groupItem GUI elements for the particular section
|
|
82
|
+
* @param {Object} optionItem the item from the options of that section
|
|
83
83
|
*/
|
|
84
84
|
(0, _defineProperty2["default"])(_this, "onSelection", function (groupItem, optionItem) {
|
|
85
85
|
var selectedFiltersObj = _this.state.selectedFiltersObj;
|
|
@@ -105,9 +105,9 @@ var Filter = /*#__PURE__*/function (_Component) {
|
|
|
105
105
|
var multiple = filters[groupItem.field].value || []; // initial from filters object
|
|
106
106
|
filters[groupItem.field].label = groupItem.title;
|
|
107
107
|
|
|
108
|
-
/*
|
|
109
|
-
* multiselect will always have groupItem.title as filter Title
|
|
110
|
-
* because we cant show option.title as its value changes
|
|
108
|
+
/*
|
|
109
|
+
* multiselect will always have groupItem.title as filter Title
|
|
110
|
+
* because we cant show option.title as its value changes
|
|
111
111
|
*/
|
|
112
112
|
|
|
113
113
|
var optionIndex = multiple.findIndex(function (item) {
|
|
@@ -190,10 +190,10 @@ var Filter = /*#__PURE__*/function (_Component) {
|
|
|
190
190
|
}
|
|
191
191
|
_this.changeFilters("selected", filters);
|
|
192
192
|
});
|
|
193
|
-
/**
|
|
194
|
-
* This function performs action based on forAction on filters object
|
|
195
|
-
* @param {String} forAction action performed on the filter object
|
|
196
|
-
* @param {Object} filters Object containing current filters selected values
|
|
193
|
+
/**
|
|
194
|
+
* This function performs action based on forAction on filters object
|
|
195
|
+
* @param {String} forAction action performed on the filter object
|
|
196
|
+
* @param {Object} filters Object containing current filters selected values
|
|
197
197
|
*/
|
|
198
198
|
(0, _defineProperty2["default"])(_this, "changeFilters", function (forAction, filters) {
|
|
199
199
|
var initialFilters = _this.props.initialFilters;
|
|
@@ -215,10 +215,10 @@ var Filter = /*#__PURE__*/function (_Component) {
|
|
|
215
215
|
}
|
|
216
216
|
});
|
|
217
217
|
});
|
|
218
|
-
/**
|
|
219
|
-
* This function hadles the onchange event for search input field inside filter
|
|
220
|
-
* @param {string} query Input Filed value
|
|
221
|
-
* @param {string} permission Type of dashboard
|
|
218
|
+
/**
|
|
219
|
+
* This function hadles the onchange event for search input field inside filter
|
|
220
|
+
* @param {string} query Input Filed value
|
|
221
|
+
* @param {string} permission Type of dashboard
|
|
222
222
|
*/
|
|
223
223
|
(0, _defineProperty2["default"])(_this, "handleDebounce", (0, _lodash.debounce)(function (permission, query) {
|
|
224
224
|
if (query.length > 1) _this.props.handleUserIdFilterChange(permission, query);
|
|
@@ -230,10 +230,10 @@ var Filter = /*#__PURE__*/function (_Component) {
|
|
|
230
230
|
if (selectedFiltersObj[element.field]) {
|
|
231
231
|
if (element.select_type === "select") {
|
|
232
232
|
if (element.field === "date") {
|
|
233
|
-
/*
|
|
234
|
-
* for date we have value as Object which contains fromDate and toDate
|
|
235
|
-
* so we add "key" in that object and check based on that key
|
|
236
|
-
* key is nothing but the value of selected label
|
|
233
|
+
/*
|
|
234
|
+
* for date we have value as Object which contains fromDate and toDate
|
|
235
|
+
* so we add "key" in that object and check based on that key
|
|
236
|
+
* key is nothing but the value of selected label
|
|
237
237
|
*/
|
|
238
238
|
selectedStyle = selectedFiltersObj[element.field].value.key === option.field ? "checked" : "";
|
|
239
239
|
} else {
|
|
@@ -274,9 +274,9 @@ var Filter = /*#__PURE__*/function (_Component) {
|
|
|
274
274
|
}
|
|
275
275
|
return "".concat(element.title === "Date" ? "" : "".concat(element.title, ": ")).concat(label);
|
|
276
276
|
});
|
|
277
|
-
/**
|
|
278
|
-
* This function toggle filters menu - show & hide.
|
|
279
|
-
* @param {boolean} flag contains value true/false to show/ hide filter.
|
|
277
|
+
/**
|
|
278
|
+
* This function toggle filters menu - show & hide.
|
|
279
|
+
* @param {boolean} flag contains value true/false to show/ hide filter.
|
|
280
280
|
*/
|
|
281
281
|
(0, _defineProperty2["default"])(_this, "toggleFiltersMenu", function (flag) {
|
|
282
282
|
var selectedFilters = _this.props.selectedFilters;
|
|
@@ -312,9 +312,9 @@ var Filter = /*#__PURE__*/function (_Component) {
|
|
|
312
312
|
}
|
|
313
313
|
}
|
|
314
314
|
});
|
|
315
|
-
/**
|
|
316
|
-
* This function hides the dropdown list when user clicks outside the area of input box
|
|
317
|
-
* @param {Object} e click event that gets fired.
|
|
315
|
+
/**
|
|
316
|
+
* This function hides the dropdown list when user clicks outside the area of input box
|
|
317
|
+
* @param {Object} e click event that gets fired.
|
|
318
318
|
*/
|
|
319
319
|
(0, _defineProperty2["default"])(_this, "toggleDropDown", function (e) {
|
|
320
320
|
var showDropDownOptions = _this.state.showDropDownOptions;
|
|
@@ -324,9 +324,9 @@ var Filter = /*#__PURE__*/function (_Component) {
|
|
|
324
324
|
});
|
|
325
325
|
}
|
|
326
326
|
});
|
|
327
|
-
/**
|
|
328
|
-
* This function applies the selected filter based on forData.
|
|
329
|
-
* @param {string} forData action that needs to be performed on the filter.
|
|
327
|
+
/**
|
|
328
|
+
* This function applies the selected filter based on forData.
|
|
329
|
+
* @param {string} forData action that needs to be performed on the filter.
|
|
330
330
|
*/
|
|
331
331
|
(0, _defineProperty2["default"])(_this, "applyFilters", function (forData) {
|
|
332
332
|
var _this$state = _this.state,
|
|
@@ -363,10 +363,10 @@ var Filter = /*#__PURE__*/function (_Component) {
|
|
|
363
363
|
applyFilters(selectedFiltersObj, "apply");
|
|
364
364
|
}
|
|
365
365
|
});
|
|
366
|
-
/**
|
|
367
|
-
* This function takes the current user object from the dropdown list and checks if it is pre-selected.
|
|
368
|
-
* @param {Objec} user object that contains details for the user
|
|
369
|
-
* @returns the name of class with active state or not.
|
|
366
|
+
/**
|
|
367
|
+
* This function takes the current user object from the dropdown list and checks if it is pre-selected.
|
|
368
|
+
* @param {Objec} user object that contains details for the user
|
|
369
|
+
* @returns the name of class with active state or not.
|
|
370
370
|
*/
|
|
371
371
|
(0, _defineProperty2["default"])(_this, "getClassName", function (user, indx) {
|
|
372
372
|
var _this$state2 = _this.state,
|
|
@@ -379,8 +379,8 @@ var Filter = /*#__PURE__*/function (_Component) {
|
|
|
379
379
|
return index >= 0 ? "dropdown-options active" : "dropdown-options";
|
|
380
380
|
}
|
|
381
381
|
});
|
|
382
|
-
/**
|
|
383
|
-
* This function reset userIds in the filter.
|
|
382
|
+
/**
|
|
383
|
+
* This function reset userIds in the filter.
|
|
384
384
|
*/
|
|
385
385
|
(0, _defineProperty2["default"])(_this, "resetSelectedUserFilter", function () {
|
|
386
386
|
_this.setState({
|
|
@@ -659,10 +659,10 @@ var Filter = /*#__PURE__*/function (_Component) {
|
|
|
659
659
|
return (0, _createClass2["default"])(Filter, [{
|
|
660
660
|
key: "onKeyDown",
|
|
661
661
|
value:
|
|
662
|
-
/**
|
|
663
|
-
* This function handles the keypress traverse over the dropdown option list
|
|
664
|
-
* @param {Object} e the event object that is fired
|
|
665
|
-
* @param {Object} groupItem Object containing groupitem details
|
|
662
|
+
/**
|
|
663
|
+
* This function handles the keypress traverse over the dropdown option list
|
|
664
|
+
* @param {Object} e the event object that is fired
|
|
665
|
+
* @param {Object} groupItem Object containing groupitem details
|
|
666
666
|
*/
|
|
667
667
|
function onKeyDown(e, groupItem) {
|
|
668
668
|
var autoSelectIndex = this.state.autoSelectIndex;
|