@desynova-digital/components 9.0.26 → 9.1.0
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/globals.js +9 -10
- package/_helpers/pagination.js +10 -15
- package/_helpers/story-example.js +16 -39
- package/_helpers/story-helpers.js +15 -14
- package/_helpers/story-stack.js +22 -43
- package/_helpers/uniqueId.js +2 -5
- package/_helpers/utils.js +28 -4
- package/atoms/avatar/avatar.js +19 -42
- package/atoms/avatar/avatar.story.js +25 -58
- package/atoms/avatar/index.js +13 -11
- package/atoms/badge/badge.js +14 -37
- package/atoms/badge/badge.story.js +45 -103
- package/atoms/badge/index.js +12 -10
- package/atoms/button/button.js +85 -161
- package/atoms/button/button.story.js +354 -508
- package/atoms/button/index.js +5 -9
- package/atoms/card/card.js +26 -55
- package/atoms/card/card.story.js +39 -88
- package/atoms/card/index.js +12 -10
- package/atoms/cardStack/cardStack.js +88 -147
- package/atoms/cardStack/cardStack.story.js +106 -210
- package/atoms/cardStack/index.js +12 -10
- package/atoms/cardV2/cardV2.js +57 -106
- package/atoms/cardV2/cardV2.story.js +184 -232
- package/atoms/cardV2/content.js +154 -256
- package/atoms/cardV2/index.js +4 -8
- package/atoms/cardV2/thumbnail.js +138 -208
- package/atoms/cardV2/timeline.js +167 -123
- package/atoms/checkbox/checkbox.js +85 -157
- package/atoms/checkbox/checkbox.story.js +237 -365
- package/atoms/checkbox/index.js +4 -9
- package/atoms/customSelect/customSelect.js +136 -215
- package/atoms/customSelect/customSelect.story.js +745 -851
- package/atoms/customSelect/index.js +4 -8
- package/atoms/datePicker/datePicker.js +299 -431
- package/atoms/datePicker/datePicker.story.js +453 -501
- package/atoms/datePicker/index.js +4 -8
- package/atoms/dateTime/dateTime.js +3 -6
- package/atoms/dateTime/dateTime.story.js +17 -63
- package/atoms/dateTime/index.js +5 -9
- package/atoms/draftInputText/draftInputText.js +121 -189
- package/atoms/draftInputText/draftInputText.story.js +200 -249
- package/atoms/draftInputText/index.js +5 -9
- package/atoms/dropdown/dropdown.js +38 -66
- package/atoms/dropdown/dropdown.story.js +102 -262
- package/atoms/dropdown/index.js +4 -8
- package/atoms/dropdownList/dropdownList.js +78 -108
- package/atoms/dropdownList/dropdownList.story.js +1546 -1621
- package/atoms/dropdownList/index.js +4 -8
- package/atoms/graphs/barGraph/barGraph.js +95 -146
- package/atoms/graphs/barGraph/barGraph.story.js +65 -87
- package/atoms/graphs/barGraph/index.js +4 -8
- package/atoms/graphs/circleDonut/circleDonut.js +177 -229
- package/atoms/graphs/circleDonut/circleDonut.story.js +328 -394
- package/atoms/graphs/circleDonut/index.js +5 -9
- package/atoms/graphs/circleGraph/circleGraph.js +60 -90
- package/atoms/graphs/circleGraph/circleGraph.story.js +36 -54
- package/atoms/graphs/circleGraph/index.js +4 -8
- package/atoms/graphs/circleNested/circleNested.js +216 -262
- package/atoms/graphs/circleNested/circleNested.story.js +91 -116
- package/atoms/graphs/circleNested/index.js +5 -9
- package/atoms/graphs/pieChart/index.js +4 -8
- package/atoms/graphs/pieChart/pieChart.js +162 -191
- package/atoms/graphs/pieChart/pieChart.story.js +147 -176
- package/atoms/graphs/verticalBarGraph/index.js +5 -9
- package/atoms/graphs/verticalBarGraph/verticalBarGraph.js +75 -98
- package/atoms/graphs/verticalBarGraph/verticalBarGraph.story.js +26 -45
- package/atoms/icon/icon.js +41 -72
- package/atoms/icon/icon.story.js +831 -260
- package/atoms/icon/index.js +19 -12
- package/atoms/image/image.js +18 -32
- package/atoms/image/image.story.js +10 -19
- package/atoms/image/index.js +4 -8
- package/atoms/inputText/index.js +4 -8
- package/atoms/inputText/inputText.js +86 -131
- package/atoms/inputText/inputText.story.js +191 -255
- package/atoms/label/index.js +4 -8
- package/atoms/label/label.js +25 -50
- package/atoms/label/label.story.js +42 -83
- package/atoms/loader/CircleLoader.js +29 -63
- package/atoms/loader/ShimmerComponent/CollabShimmerCard.js +39 -50
- package/atoms/loader/ShimmerComponent/CollabShimmerCardTray.js +41 -42
- package/atoms/loader/ShimmerComponent/FiltersShimmer.js +30 -30
- package/atoms/loader/ShimmerComponent/GraphDetailShimmer.js +21 -34
- package/atoms/loader/ShimmerComponent/GraphTitleShimmer.js +30 -34
- package/atoms/loader/ShimmerComponent/GraphsComponentShimmer.js +23 -32
- package/atoms/loader/ShimmerComponent/Shimmer.js +24 -32
- package/atoms/loader/ThreeDotLoader.js +14 -29
- package/atoms/loader/index.js +13 -11
- package/atoms/loader/loader.js +34 -58
- package/atoms/loader/loader.story.js +48 -52
- package/atoms/loader/spinningLoader.js +23 -34
- package/atoms/popup/index.js +5 -9
- package/atoms/popup/popup.js +123 -208
- package/atoms/popup/popup.story.js +97 -131
- package/atoms/radio/index.js +18 -11
- package/atoms/radio/radio.js +58 -112
- package/atoms/radio/radio.story.js +197 -420
- package/atoms/select/index.js +4 -8
- package/atoms/select/select.js +48 -86
- package/atoms/sideBar/index.js +5 -9
- package/atoms/sideBar/sidebar.js +89 -140
- package/atoms/switch/index.js +4 -8
- package/atoms/switch/switch.js +56 -86
- package/atoms/switch/switch.story.js +268 -415
- package/atoms/tag/index.js +12 -10
- package/atoms/tag/tag.js +29 -63
- package/atoms/tag/tag.story.js +135 -209
- package/atoms/textarea/index.js +5 -9
- package/atoms/textarea/textarea.js +55 -99
- package/atoms/textarea/textarea.story.js +48 -41
- package/atoms/thematicBreak/index.js +12 -10
- package/atoms/thematicBreak/thematicBreak.js +20 -38
- package/atoms/thematicBreak/thematicBreak.story.js +25 -37
- package/atoms/timeCodeInput/index.js +4 -8
- package/atoms/timeCodeInput/timCodeInput.story.js +21 -35
- package/atoms/timeCodeInput/timeCodeInput.js +33 -51
- package/atoms/timer/index.js +5 -9
- package/atoms/timer/timer.js +57 -108
- package/atoms/timer/timer.story.js +13 -26
- package/atoms/toast/index.js +5 -9
- package/atoms/toast/toast.js +81 -116
- package/atoms/toast/toast.story.js +50 -76
- package/atoms/videoCard/index.js +12 -10
- package/atoms/videoCard/videoCard.js +265 -447
- package/atoms/videoCard/videoCard.story.js +495 -710
- package/components.js +411 -294
- package/index.js +350 -61
- package/molecules/carousel/carousel.js +121 -207
- package/molecules/carousel/carousel.story.js +240 -223
- package/molecules/carousel/index.js +5 -9
- package/molecules/errorScreen/CollabErrorScreen.js +35 -66
- package/molecules/errorScreen/TableErrorScreen.js +109 -102
- package/molecules/errorScreen/TableErrorScreen.jsx +7 -6
- package/molecules/errorScreen/errorScreen.js +41 -94
- package/molecules/filter/constants.js +1 -0
- package/molecules/filter/filter.js +378 -562
- package/molecules/filter/filter.story.js +79 -104
- package/molecules/filter/index.js +5 -9
- package/molecules/graphCard/graphCard.js +97 -193
- package/molecules/graphCard/graphCard.story.js +159 -191
- package/molecules/graphCard/index.js +4 -8
- package/molecules/graphCard/loader.js +28 -68
- package/molecules/graphDetailCard/graphDetailCard.js +115 -183
- package/molecules/graphDetailCard/graphDetailCard.story.js +218 -254
- package/molecules/graphDetailCard/index.js +5 -9
- package/molecules/pageHeader/index.js +12 -10
- package/molecules/pageHeader/pageHeader.js +38 -79
- package/molecules/pageHeader/pageHeader.story.js +34 -55
- package/molecules/pagination/index.js +4 -8
- package/molecules/pagination/pagination.js +126 -202
- package/molecules/pagination/pagination.story.js +40 -52
- package/molecules/richTextInput/RichTextInput.js +354 -0
- package/molecules/richTextInput/RichTextInput.story.js +50 -0
- package/molecules/richTextInput/index.js +9 -0
- package/molecules/table/index.js +4 -8
- package/molecules/table/table-column.js +10 -16
- package/molecules/table/table-header.js +31 -72
- package/molecules/table/table.js +743 -1075
- package/molecules/table/table.story.js +274 -304
- package/molecules/tabs/index.js +4 -8
- package/molecules/tabs/tabs.js +112 -184
- package/molecules/tabs/tabs.story.js +66 -133
- package/molecules/videoCardList/index.js +4 -8
- package/molecules/videoCardList/videoCardList.js +24 -41
- package/molecules/videoCardList/videoCardList.story.js +449 -664
- package/molecules/videoPlayer/index.js +4 -8
- package/molecules/videoPlayer/videoPlayer.js +1019 -1097
- package/molecules/videoPlayer/videoPlayer.story.js +10 -21
- package/package.json +2 -2
|
@@ -1,107 +1,114 @@
|
|
|
1
|
-
|
|
1
|
+
"use strict";
|
|
2
2
|
|
|
3
|
+
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
3
4
|
Object.defineProperty(exports, "__esModule", {
|
|
4
5
|
value: true
|
|
5
6
|
});
|
|
6
|
-
|
|
7
|
-
var _react = require(
|
|
8
|
-
|
|
9
|
-
var
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
'
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
7
|
+
exports["default"] = void 0;
|
|
8
|
+
var _react = _interopRequireDefault(require("react"));
|
|
9
|
+
var TableErrorScreen = function TableErrorScreen(_ref) {
|
|
10
|
+
var _ref$h = _ref.h1,
|
|
11
|
+
h1 = _ref$h === void 0 ? "No Results Found" : _ref$h,
|
|
12
|
+
_ref$h2 = _ref.h2,
|
|
13
|
+
h2 = _ref$h2 === void 0 ? "Try a different filter set" : _ref$h2;
|
|
14
|
+
return /*#__PURE__*/_react["default"].createElement("div", {
|
|
15
|
+
style: {
|
|
16
|
+
height: '279px',
|
|
17
|
+
width: '100%',
|
|
18
|
+
display: 'flex',
|
|
19
|
+
justifyContent: 'center',
|
|
20
|
+
alignItems: 'center'
|
|
21
|
+
}
|
|
22
|
+
}, /*#__PURE__*/_react["default"].createElement("div", {
|
|
23
|
+
style: {
|
|
24
|
+
width: '520px',
|
|
25
|
+
height: '130px',
|
|
26
|
+
display: 'flex',
|
|
27
|
+
alignItems: 'center',
|
|
28
|
+
justifyContent: 'center',
|
|
29
|
+
gap: '10px'
|
|
30
|
+
}
|
|
31
|
+
}, /*#__PURE__*/_react["default"].createElement("div", {
|
|
32
|
+
style: {
|
|
33
|
+
height: '120px',
|
|
34
|
+
width: '120px',
|
|
35
|
+
background: '#303F51',
|
|
36
|
+
display: 'flex',
|
|
37
|
+
alignItems: 'center',
|
|
38
|
+
justifyContent: 'center',
|
|
39
|
+
borderRadius: '50%',
|
|
40
|
+
flexDirection: 'column'
|
|
41
|
+
}
|
|
42
|
+
}, /*#__PURE__*/_react["default"].createElement("div", {
|
|
43
|
+
style: {
|
|
44
|
+
display: 'flex',
|
|
45
|
+
alignItems: 'flex-start',
|
|
46
|
+
justifyContent: 'center',
|
|
47
|
+
gap: '8px',
|
|
48
|
+
flexDirection: 'column'
|
|
49
|
+
}
|
|
50
|
+
}, /*#__PURE__*/_react["default"].createElement("div", {
|
|
51
|
+
style: {
|
|
52
|
+
height: '10px',
|
|
53
|
+
width: '60px',
|
|
54
|
+
background: '#182738',
|
|
55
|
+
borderRadius: '10px'
|
|
56
|
+
}
|
|
57
|
+
}), /*#__PURE__*/_react["default"].createElement("div", {
|
|
58
|
+
style: {
|
|
59
|
+
height: '10px',
|
|
60
|
+
width: '40px',
|
|
61
|
+
background: '#182738',
|
|
62
|
+
borderRadius: '10px'
|
|
63
|
+
}
|
|
64
|
+
}), /*#__PURE__*/_react["default"].createElement("div", {
|
|
65
|
+
style: {
|
|
66
|
+
height: '10px',
|
|
67
|
+
width: '50px',
|
|
68
|
+
background: '#182738',
|
|
69
|
+
borderRadius: '10px'
|
|
70
|
+
}
|
|
71
|
+
}), /*#__PURE__*/_react["default"].createElement("div", {
|
|
72
|
+
style: {
|
|
73
|
+
height: '10px',
|
|
74
|
+
width: '30px',
|
|
75
|
+
background: '#182738',
|
|
76
|
+
borderRadius: '10px'
|
|
77
|
+
}
|
|
78
|
+
}), /*#__PURE__*/_react["default"].createElement("div", {
|
|
79
|
+
style: {
|
|
80
|
+
height: '10px',
|
|
81
|
+
width: '50px',
|
|
82
|
+
background: '#182738',
|
|
83
|
+
borderRadius: '10px'
|
|
84
|
+
}
|
|
85
|
+
}))), /*#__PURE__*/_react["default"].createElement("div", {
|
|
86
|
+
style: {
|
|
87
|
+
height: '120px',
|
|
88
|
+
width: '300px ',
|
|
89
|
+
display: 'flex',
|
|
90
|
+
alignItems: 'flex-start',
|
|
91
|
+
justifyContent: 'center',
|
|
92
|
+
flexDirection: 'column'
|
|
93
|
+
}
|
|
94
|
+
}, /*#__PURE__*/_react["default"].createElement("p", {
|
|
95
|
+
style: {
|
|
96
|
+
color: 'var(--color-text-color-pure-white, #FFF)',
|
|
97
|
+
fontSize: '24px',
|
|
98
|
+
fontWeight: '500',
|
|
99
|
+
lineHeight: '36px',
|
|
100
|
+
fontStyle: 'normal',
|
|
101
|
+
fontFamily: 'SFUIText-Medium'
|
|
102
|
+
}
|
|
103
|
+
}, h1), /*#__PURE__*/_react["default"].createElement("p", {
|
|
104
|
+
style: {
|
|
105
|
+
color: 'var(--color-text-color-pure-white, #FFF)',
|
|
106
|
+
fontSize: '14px',
|
|
107
|
+
fontStyle: 'normal',
|
|
108
|
+
fontWeight: '300',
|
|
109
|
+
lineHeight: '21px',
|
|
110
|
+
fontFamily: 'SFUIText-Medium'
|
|
111
|
+
}
|
|
112
|
+
}, h2))));
|
|
105
113
|
};
|
|
106
|
-
|
|
107
|
-
exports.default = TableErrorScreen;
|
|
114
|
+
var _default = exports["default"] = TableErrorScreen;
|
|
@@ -1,13 +1,12 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
|
|
3
|
-
const TableErrorScreen = () => {
|
|
3
|
+
const TableErrorScreen = ({ h1 = "No Results Found", h2 = "Try a different filter set" }) => {
|
|
4
4
|
return (
|
|
5
5
|
<div
|
|
6
6
|
style={{
|
|
7
7
|
height: '279px',
|
|
8
8
|
width: '100%',
|
|
9
9
|
display: 'flex',
|
|
10
|
-
alignItems: 'center',
|
|
11
10
|
justifyContent: 'center',
|
|
12
11
|
alignItems: 'center'
|
|
13
12
|
}}>
|
|
@@ -61,9 +60,10 @@ const TableErrorScreen = () => {
|
|
|
61
60
|
fontSize: '24px',
|
|
62
61
|
fontWeight: '500',
|
|
63
62
|
lineHeight: '36px',
|
|
64
|
-
fontStyle: 'normal'
|
|
63
|
+
fontStyle: 'normal',
|
|
64
|
+
fontFamily: 'SFUIText-Medium'
|
|
65
65
|
}}>
|
|
66
|
-
|
|
66
|
+
{h1}
|
|
67
67
|
</p>
|
|
68
68
|
<p
|
|
69
69
|
style={{
|
|
@@ -71,9 +71,10 @@ const TableErrorScreen = () => {
|
|
|
71
71
|
fontSize: '14px',
|
|
72
72
|
fontStyle: 'normal',
|
|
73
73
|
fontWeight: '300',
|
|
74
|
-
lineHeight: '21px'
|
|
74
|
+
lineHeight: '21px',
|
|
75
|
+
fontFamily: 'SFUIText-Medium'
|
|
75
76
|
}}>
|
|
76
|
-
|
|
77
|
+
{h2}
|
|
77
78
|
</p>
|
|
78
79
|
</div>
|
|
79
80
|
</div>
|
|
@@ -1,52 +1,27 @@
|
|
|
1
|
-
|
|
1
|
+
"use strict";
|
|
2
2
|
|
|
3
|
+
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
3
4
|
Object.defineProperty(exports, "__esModule", {
|
|
4
5
|
value: true
|
|
5
6
|
});
|
|
6
|
-
|
|
7
|
-
var
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
var
|
|
15
|
-
|
|
16
|
-
var _react2 = _interopRequireDefault(_react);
|
|
17
|
-
|
|
18
|
-
var _styledComponents = require('styled-components');
|
|
19
|
-
|
|
20
|
-
var _styledComponents2 = _interopRequireDefault(_styledComponents);
|
|
21
|
-
|
|
22
|
-
var _propTypes = require('prop-types');
|
|
23
|
-
|
|
24
|
-
var _propTypes2 = _interopRequireDefault(_propTypes);
|
|
25
|
-
|
|
26
|
-
var _button = require('../../atoms/button/button');
|
|
27
|
-
|
|
28
|
-
var _button2 = _interopRequireDefault(_button);
|
|
29
|
-
|
|
30
|
-
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
31
|
-
|
|
32
|
-
function _taggedTemplateLiteral(strings, raw) { return Object.freeze(Object.defineProperties(strings, { raw: { value: Object.freeze(raw) } })); } /* eslint-disable no-unused-expressions, no-restricted-globals */
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
var Wrapper = _styledComponents2.default.div(_templateObject, function (props) {
|
|
7
|
+
exports["default"] = void 0;
|
|
8
|
+
var _taggedTemplateLiteral2 = _interopRequireDefault(require("@babel/runtime/helpers/taggedTemplateLiteral"));
|
|
9
|
+
var _react = _interopRequireDefault(require("react"));
|
|
10
|
+
var _styledComponents = _interopRequireDefault(require("styled-components"));
|
|
11
|
+
var _propTypes = _interopRequireDefault(require("prop-types"));
|
|
12
|
+
var _button = _interopRequireDefault(require("../../atoms/button/button"));
|
|
13
|
+
var _templateObject, _templateObject2, _templateObject3, _templateObject4, _templateObject5, _templateObject6;
|
|
14
|
+
/* eslint-disable no-unused-expressions, no-restricted-globals */
|
|
15
|
+
var Wrapper = _styledComponents["default"].div(_templateObject || (_templateObject = (0, _taggedTemplateLiteral2["default"])(["\n display: flex;\n font-size: 32px;\n align-items: center;\n color: #fff;\n flex-direction: column;\n justify-content: center;\n font-family: 'SFUIText-Medium';\n color: rgba(255, 255, 255, 0.8);\n /* height: calc(100vh - 80px); */\n height: ", ";\n background: #0c141d;\n .flex {\n display: flex;\n justify-content: center;\n align-items: center;\n }\n"])), function (props) {
|
|
36
16
|
return props.smallImage ? '' : '100vh';
|
|
37
17
|
});
|
|
38
|
-
|
|
39
|
-
var ImageWrapper = _styledComponents2.default.div(_templateObject2, function (props) {
|
|
18
|
+
var ImageWrapper = _styledComponents["default"].div(_templateObject2 || (_templateObject2 = (0, _taggedTemplateLiteral2["default"])(["\n width: ", ";\n margin-right: 50px;\n img {\n width: 100%;\n }\n"])), function (props) {
|
|
40
19
|
return props.smallImage ? '240px' : '400px';
|
|
41
20
|
});
|
|
42
|
-
|
|
43
|
-
var
|
|
44
|
-
|
|
45
|
-
var
|
|
46
|
-
|
|
47
|
-
var Line = _styledComponents2.default.div(_templateObject5);
|
|
48
|
-
|
|
49
|
-
var ErrorButtons = (0, _styledComponents2.default)(_button2.default)(_templateObject6);
|
|
21
|
+
var Header = _styledComponents["default"].p(_templateObject3 || (_templateObject3 = (0, _taggedTemplateLiteral2["default"])(["\n font-size: 50px;\n margin-bottom: 40px;\n font-weight: bold;\n display: flex;\n"])));
|
|
22
|
+
var SubHeader = _styledComponents["default"].p(_templateObject4 || (_templateObject4 = (0, _taggedTemplateLiteral2["default"])(["\n font-size: 20px;\n font-weight: 300;\n margin-top: 40px;\n display: flex;\n"])));
|
|
23
|
+
var Line = _styledComponents["default"].div(_templateObject5 || (_templateObject5 = (0, _taggedTemplateLiteral2["default"])(["\n width: 50px;\n border-bottom: 3px solid #00cec6;\n"])));
|
|
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"])));
|
|
50
25
|
|
|
51
26
|
/*
|
|
52
27
|
* Image links
|
|
@@ -56,11 +31,11 @@ var ErrorButtons = (0, _styledComponents2.default)(_button2.default)(_templateOb
|
|
|
56
31
|
*/
|
|
57
32
|
|
|
58
33
|
var propTypes = {
|
|
59
|
-
type:
|
|
60
|
-
title:
|
|
61
|
-
subTitle:
|
|
62
|
-
smallImage:
|
|
63
|
-
showButton:
|
|
34
|
+
type: _propTypes["default"].oneOf(['no-result-found', 'went-wrong', '404-error', 'network-error']),
|
|
35
|
+
title: _propTypes["default"].string,
|
|
36
|
+
subTitle: _propTypes["default"].string,
|
|
37
|
+
smallImage: _propTypes["default"].bool,
|
|
38
|
+
showButton: _propTypes["default"].bool
|
|
64
39
|
};
|
|
65
40
|
|
|
66
41
|
/**
|
|
@@ -71,10 +46,8 @@ var propTypes = {
|
|
|
71
46
|
|
|
72
47
|
var ErrorScreen = function ErrorScreen(props) {
|
|
73
48
|
var type = props.type,
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
49
|
+
smallImage = props.smallImage,
|
|
50
|
+
showButton = props.showButton;
|
|
78
51
|
var data = {
|
|
79
52
|
'no-result-found': {
|
|
80
53
|
'title': 'No Results Found',
|
|
@@ -97,60 +70,34 @@ var ErrorScreen = function ErrorScreen(props) {
|
|
|
97
70
|
'buttonText': ''
|
|
98
71
|
}
|
|
99
72
|
};
|
|
100
|
-
|
|
101
73
|
var title = props.title || data[type].title;
|
|
102
74
|
var subTitle = props.subTitle || data[type].subTitle;
|
|
103
75
|
var buttonText = props.buttonText || data[type].buttonText;
|
|
104
|
-
|
|
105
76
|
var ctaFunction = function ctaFunction() {
|
|
106
77
|
type === '404-error' ? location.href = '/' : window.location.reload();
|
|
107
78
|
};
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
null,
|
|
126
|
-
title
|
|
127
|
-
),
|
|
128
|
-
_react2.default.createElement(Line, null),
|
|
129
|
-
_react2.default.createElement(
|
|
130
|
-
SubHeader,
|
|
131
|
-
null,
|
|
132
|
-
subTitle
|
|
133
|
-
),
|
|
134
|
-
showButton ? _react2.default.createElement(
|
|
135
|
-
ErrorButtons,
|
|
136
|
-
{
|
|
137
|
-
display: 'rounded',
|
|
138
|
-
onClick: function onClick() {
|
|
139
|
-
ctaFunction();
|
|
140
|
-
} },
|
|
141
|
-
buttonText
|
|
142
|
-
) : null
|
|
143
|
-
)
|
|
144
|
-
)
|
|
145
|
-
);
|
|
79
|
+
return /*#__PURE__*/_react["default"].createElement(Wrapper, {
|
|
80
|
+
smallImage: smallImage
|
|
81
|
+
}, /*#__PURE__*/_react["default"].createElement("div", {
|
|
82
|
+
className: "flex"
|
|
83
|
+
}, /*#__PURE__*/_react["default"].createElement(ImageWrapper, {
|
|
84
|
+
smallImage: smallImage
|
|
85
|
+
}, /*#__PURE__*/_react["default"].createElement("img", {
|
|
86
|
+
src: "https://ctdnstgthumbnail.contido.io/contido-assets/".concat(type, ".svg"),
|
|
87
|
+
alt: ""
|
|
88
|
+
})), /*#__PURE__*/_react["default"].createElement("div", {
|
|
89
|
+
className: "text"
|
|
90
|
+
}, /*#__PURE__*/_react["default"].createElement(Header, null, title), /*#__PURE__*/_react["default"].createElement(Line, null), /*#__PURE__*/_react["default"].createElement(SubHeader, null, subTitle), showButton ? /*#__PURE__*/_react["default"].createElement(ErrorButtons, {
|
|
91
|
+
display: "rounded",
|
|
92
|
+
onClick: function onClick() {
|
|
93
|
+
ctaFunction();
|
|
94
|
+
}
|
|
95
|
+
}, buttonText) : null)));
|
|
146
96
|
};
|
|
147
|
-
|
|
148
97
|
ErrorScreen.propTypes = propTypes;
|
|
149
|
-
|
|
150
98
|
ErrorScreen.defaultProps = {
|
|
151
99
|
title: 'No Results Found',
|
|
152
100
|
subTitle: 'Refresh this page or try again later.',
|
|
153
101
|
buttonText: 'Refresh'
|
|
154
102
|
};
|
|
155
|
-
|
|
156
|
-
exports.default = ErrorScreen;
|
|
103
|
+
var _default = exports["default"] = ErrorScreen;
|
|
@@ -3,6 +3,7 @@
|
|
|
3
3
|
Object.defineProperty(exports, "__esModule", {
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
|
+
exports.WEEK_DATE = exports.THREE_MONTHS = exports.MONTH_DATE = exports.MONTHS = exports.CURRENT_DATE = exports.CONVERT = void 0;
|
|
6
7
|
var CURRENT_DATE = exports.CURRENT_DATE = new Date().getTime(); // current
|
|
7
8
|
var CONVERT = exports.CONVERT = 24 * 60 * 60 * 1000;
|
|
8
9
|
var WEEK_DATE = exports.WEEK_DATE = CURRENT_DATE - 7 * CONVERT; // subtracting 7 days from current
|