@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,54 +1,26 @@
|
|
|
1
|
-
|
|
1
|
+
"use strict";
|
|
2
2
|
|
|
3
|
+
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
4
|
+
var _typeof = require("@babel/runtime/helpers/typeof");
|
|
3
5
|
Object.defineProperty(exports, "__esModule", {
|
|
4
6
|
value: true
|
|
5
7
|
});
|
|
6
|
-
|
|
7
|
-
var
|
|
8
|
-
|
|
9
|
-
var
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
var
|
|
17
|
-
|
|
18
|
-
var _react2 = _interopRequireDefault(_react);
|
|
19
|
-
|
|
20
|
-
var _styledComponents = require('styled-components');
|
|
21
|
-
|
|
22
|
-
var _styledComponents2 = _interopRequireDefault(_styledComponents);
|
|
23
|
-
|
|
24
|
-
var _propTypes = require('prop-types');
|
|
25
|
-
|
|
26
|
-
var _propTypes2 = _interopRequireDefault(_propTypes);
|
|
27
|
-
|
|
28
|
-
var _tokens = require('@desynova-digital/tokens');
|
|
29
|
-
|
|
30
|
-
var _icon = require('../../atoms/icon');
|
|
31
|
-
|
|
32
|
-
var _icon2 = _interopRequireDefault(_icon);
|
|
33
|
-
|
|
34
|
-
var _tokens2 = require('../../../tokens');
|
|
35
|
-
|
|
36
|
-
var _cardV = require('./cardV2');
|
|
37
|
-
|
|
38
|
-
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
39
|
-
|
|
40
|
-
function _taggedTemplateLiteral(strings, raw) { return Object.freeze(Object.defineProperties(strings, { raw: { value: Object.freeze(raw) } })); }
|
|
41
|
-
// atoms
|
|
42
|
-
|
|
43
|
-
|
|
8
|
+
exports["default"] = void 0;
|
|
9
|
+
var _slicedToArray2 = _interopRequireDefault(require("@babel/runtime/helpers/slicedToArray"));
|
|
10
|
+
var _taggedTemplateLiteral2 = _interopRequireDefault(require("@babel/runtime/helpers/taggedTemplateLiteral"));
|
|
11
|
+
var _react = _interopRequireWildcard(require("react"));
|
|
12
|
+
var _styledComponents = _interopRequireWildcard(require("styled-components"));
|
|
13
|
+
var _propTypes = _interopRequireDefault(require("prop-types"));
|
|
14
|
+
var _tokens = require("@desynova-digital/tokens");
|
|
15
|
+
var _icon = _interopRequireDefault(require("../../atoms/icon"));
|
|
16
|
+
var _tokens2 = require("../../../tokens");
|
|
17
|
+
var _cardV = require("./cardV2");
|
|
18
|
+
var _templateObject, _templateObject2, _templateObject3, _templateObject4, _templateObject5, _templateObject6; // atoms
|
|
44
19
|
// tokens
|
|
45
|
-
|
|
46
|
-
|
|
47
20
|
// styles
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
var OverlayBackgroundStyles = (0, _styledComponents.css)(_templateObject);
|
|
51
|
-
|
|
21
|
+
function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(e) { return e ? t : r; })(e); }
|
|
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; }
|
|
23
|
+
var OverlayBackgroundStyles = (0, _styledComponents.css)(_templateObject || (_templateObject = (0, _taggedTemplateLiteral2["default"])(["\n background: rgba(0, 0, 0, 0.5);\n"])));
|
|
52
24
|
var assetStyles = {
|
|
53
25
|
"folder": {
|
|
54
26
|
backgroundColor: '#121D29',
|
|
@@ -56,12 +28,12 @@ var assetStyles = {
|
|
|
56
28
|
},
|
|
57
29
|
"asset": {
|
|
58
30
|
backgroundColor: 'inherit',
|
|
59
|
-
backgroundSize: 'cover'
|
|
31
|
+
backgroundSize: 'cover'
|
|
32
|
+
}
|
|
60
33
|
};
|
|
61
|
-
|
|
62
|
-
var ThumbnailStyles = _styledComponents2.default.div(_templateObject2, function (_ref) {
|
|
34
|
+
var ThumbnailStyles = _styledComponents["default"].div(_templateObject2 || (_templateObject2 = (0, _taggedTemplateLiteral2["default"])(["\n position: relative;\n background: ", ";\n background-color:", ";\n background-size: ", ";\n width: ", ";\n height: ", ";\n\n .iframe-image-block {\n cursor: ", ";\n background: #000;\n opacity: 0;\n &:hover {\n opacity: 1;\n }\n .hover-pointer {\n position: absolute;\n width: 1px;\n height: 100%;\n top: 0;\n background: #fff;\n pointer-events: none;\n z-index: 1;\n }\n }\n .background-block {\n position: absolute;\n z-index: 1;\n width: 100%;\n height: 100%;\n left: 0;\n top: 0;\n overflow: hidden;\n .circle {\n width: 40px;\n height: 40px;\n border-radius: 50%;\n position: absolute;\n left: 50%;\n top: 50%;\n transform: translate(-50%, -50%);\n background-color: #15212f;\n }\n i {\n position: absolute;\n left: 50%;\n top: 50%;\n transform: translate(-50%, -50%);\n }\n img {\n position: absolute;\n top: 0;\n left: 0;\n width: 100%;\n height: auto;\n }\n }\n .thumbnail-image-block {\n cursor: pointer;\n background: #182738;\n }\n"])), function (_ref) {
|
|
63
35
|
var thumbnail = _ref.thumbnail;
|
|
64
|
-
return
|
|
36
|
+
return "url(".concat(thumbnail, ") no-repeat 50%");
|
|
65
37
|
}, function (_ref2) {
|
|
66
38
|
var data_type = _ref2.data_type;
|
|
67
39
|
return assetStyles[data_type] && assetStyles[data_type].backgroundColor ? assetStyles[data_type].backgroundColor : 'inherit';
|
|
@@ -78,50 +50,42 @@ var ThumbnailStyles = _styledComponents2.default.div(_templateObject2, function
|
|
|
78
50
|
var isClickPrevented = _ref6.isClickPrevented;
|
|
79
51
|
return !isClickPrevented ? 'pointer' : 'default';
|
|
80
52
|
});
|
|
81
|
-
|
|
82
|
-
var UploadTypeContainer = _styledComponents2.default.div(_templateObject3, function (props) {
|
|
53
|
+
var UploadTypeContainer = _styledComponents["default"].div(_templateObject3 || (_templateObject3 = (0, _taggedTemplateLiteral2["default"])(["\n z-index: 2;\n .uploadWrapper {\n border-radius: 50%;\n background: ", ";\n\n color: ", ";\n width: 25px;\n height: 25px;\n display: flex;\n justify-content: center;\n align-items: center;\n .wrapper {\n font-size: 10px;\n font-family: 'SFUIText-Regular';\n line-height: 1.1;\n text-transform: uppercase;\n }\n }\n"])), function (props) {
|
|
83
54
|
return props.upload_type === 'rc' ? '#FF6327' : _tokens.colors[props.theme].card.themeColor;
|
|
84
55
|
}, function (props) {
|
|
85
56
|
return props.upload_type === 'rc' ? '#FFFFFF' : '#0C141D';
|
|
86
57
|
});
|
|
87
|
-
|
|
88
|
-
var StatusBoxStyles = _styledComponents2.default.div(_templateObject4, OverlayBackgroundStyles, function (_ref7) {
|
|
58
|
+
var StatusBoxStyles = _styledComponents["default"].div(_templateObject4 || (_templateObject4 = (0, _taggedTemplateLiteral2["default"])(["\n position: relative;\n padding: 5px 8px;\n width: fit-content;\n border-radius: 15px;\n margin-right: 5px;\n display: flex;\n align-items: center;\n ", ";\n\n .status-color {\n height: 6px;\n width: 6px;\n border-radius: 100%;\n background-color: ", ";\n margin-right: 5px;\n }\n\n .status-text {\n display: -webkit-box;\n -webkit-box-orient: vertical;\n overflow: hidden;\n text-overflow: ellipsis;\n -webkit-line-clamp: 1;\n height: 10px;\n }\n"])), OverlayBackgroundStyles, function (_ref7) {
|
|
89
59
|
var hex = _ref7.hex;
|
|
90
60
|
return hex.background;
|
|
91
61
|
});
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
})(_templateObject5, OverlayBackgroundStyles, function (props) {
|
|
62
|
+
var IconButtonStyles = (0, _styledComponents["default"])(function (props) {
|
|
63
|
+
return /*#__PURE__*/_react["default"].createElement(_cardV.BaseButtonStyles, props);
|
|
64
|
+
})(_templateObject5 || (_templateObject5 = (0, _taggedTemplateLiteral2["default"])(["\n ", ";\n\n .tooltip {\n position: absolute;\n bottom: 130%;\n left: 30%;\n transform: translateX(-50%);\n padding: 5px 9px;\n box-sizing: border-box;\n background: #000000;\n color: #fff;\n border-radius: 10px;\n visibility: hidden;\n opacity: 0;\n z-index: 10;\n transition: all 350ms ease-in-out 0s;\n &:after {\n content: '';\n position: absolute;\n border-left: 5px solid transparent;\n border-right: 5px solid transparent;\n border-top: 5px solid #000;\n bottom: -5px;\n left: 50%;\n }\n .details-header {\n color: #666666;\n font-family: 'SFUIText-Regular';\n text-transform: none;\n margin-bottom: 8px;\n }\n .details-value {\n color: #999999;\n font-family: 'SFUIText-Light';\n text-transform: none;\n font-size: 10px;\n }\n }\n\n &:hover {\n background-color: ", ";\n .tooltip {\n opacity: 1;\n visibility: visible;\n }\n }\n &:active,\n &:focus {\n outline: none;\n }\n"])), OverlayBackgroundStyles, function (props) {
|
|
96
65
|
return _tokens.colors[props.theme].card.themeColor;
|
|
97
66
|
});
|
|
98
|
-
|
|
99
|
-
var CardHeader = _styledComponents2.default.div(_templateObject6);
|
|
100
|
-
|
|
67
|
+
var CardHeader = _styledComponents["default"].div(_templateObject6 || (_templateObject6 = (0, _taggedTemplateLiteral2["default"])(["\n display: flex;\n justify-content: space-between;\n padding: 10px;\n"])));
|
|
101
68
|
var Thumbnail = function Thumbnail(props) {
|
|
102
69
|
var theme = props.theme,
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
70
|
+
width = props.width,
|
|
71
|
+
thumbnail = props.thumbnail,
|
|
72
|
+
iframeurl = props.iframeurl,
|
|
73
|
+
card_status = props.card_status,
|
|
74
|
+
actions = props.actions,
|
|
75
|
+
ingest_db_id = props.ingest_db_id,
|
|
76
|
+
actionClick = props.actionClick,
|
|
77
|
+
upload_status = props.upload_status,
|
|
78
|
+
upload_type = props.upload_type,
|
|
79
|
+
file_type = props.file_type,
|
|
80
|
+
data_type = props.data_type;
|
|
115
81
|
var _useState = (0, _react.useState)(null),
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
82
|
+
_useState2 = (0, _slicedToArray2["default"])(_useState, 2),
|
|
83
|
+
statusIndex = _useState2[0],
|
|
84
|
+
setStatusIndex = _useState2[1];
|
|
120
85
|
var _useState3 = (0, _react.useState)(false),
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
86
|
+
_useState4 = (0, _slicedToArray2["default"])(_useState3, 2),
|
|
87
|
+
isClickPrevented = _useState4[0],
|
|
88
|
+
setClickPreventation = _useState4[1];
|
|
125
89
|
var iframeImageBlockRef = (0, _react.useRef)(null);
|
|
126
90
|
var iframeImageRef = (0, _react.useRef)(null);
|
|
127
91
|
var hoverPointerRef = (0, _react.useRef)(null);
|
|
@@ -130,10 +94,9 @@ var Thumbnail = function Thumbnail(props) {
|
|
|
130
94
|
return item.field === 'upload' || item.field === 'phupload_ingest';
|
|
131
95
|
}) // can add multiple condition in future to prevent click
|
|
132
96
|
) {
|
|
133
|
-
|
|
134
|
-
|
|
97
|
+
setClickPreventation(true);
|
|
98
|
+
}
|
|
135
99
|
}, [actions && JSON.stringify(actions).length > 0]);
|
|
136
|
-
|
|
137
100
|
(0, _react.useEffect)(function () {
|
|
138
101
|
/**
|
|
139
102
|
* will return the hex based status passed
|
|
@@ -147,7 +110,6 @@ var Thumbnail = function Thumbnail(props) {
|
|
|
147
110
|
});
|
|
148
111
|
setStatusIndex(index);
|
|
149
112
|
}, [upload_status, card_status]);
|
|
150
|
-
|
|
151
113
|
var handleMouseMove = (0, _react.useCallback)(function () {
|
|
152
114
|
if (iframeImageBlockRef && hoverPointerRef && iframeImageRef) {
|
|
153
115
|
var iframeBlockHeight = iframeImageBlockRef.current.offsetHeight;
|
|
@@ -181,137 +143,105 @@ var Thumbnail = function Thumbnail(props) {
|
|
|
181
143
|
e.preventDefault();
|
|
182
144
|
}
|
|
183
145
|
}, [isClickPrevented]);
|
|
184
|
-
return
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
146
|
+
return /*#__PURE__*/_react["default"].createElement(ThumbnailStyles, {
|
|
147
|
+
width: width,
|
|
148
|
+
thumbnail: thumbnail,
|
|
149
|
+
isClickPrevented: isClickPrevented,
|
|
150
|
+
onClick: handleThumbnailClick,
|
|
151
|
+
theme: props.theme,
|
|
152
|
+
data_type: data_type
|
|
153
|
+
}, /*#__PURE__*/_react["default"].createElement(CardHeader, null, upload_type && /*#__PURE__*/_react["default"].createElement(UploadTypeContainer, {
|
|
154
|
+
theme: props.theme,
|
|
155
|
+
upload_type: upload_type && upload_type.toLowerCase()
|
|
156
|
+
}, /*#__PURE__*/_react["default"].createElement("div", {
|
|
157
|
+
className: "uploadWrapper"
|
|
158
|
+
}, /*#__PURE__*/_react["default"].createElement("p", {
|
|
159
|
+
className: "wrapper"
|
|
160
|
+
}, upload_type))), /*#__PURE__*/_react["default"].createElement(_cardV.DivStyles, {
|
|
161
|
+
theme: props.theme,
|
|
162
|
+
className: "asset-card-thumbnail-head",
|
|
163
|
+
display: "flex",
|
|
164
|
+
justify: "flex-end",
|
|
165
|
+
align: "center",
|
|
166
|
+
position: "relative",
|
|
167
|
+
zIndex: "2",
|
|
168
|
+
marginLeft: "auto"
|
|
169
|
+
}, (card_status || upload_status) && statusIndex > -1 && /*#__PURE__*/_react["default"].createElement(StatusBoxStyles, {
|
|
170
|
+
theme: props.theme,
|
|
171
|
+
hex: _tokens2.CARD_ASSET_STATUS[statusIndex] ? _tokens2.CARD_ASSET_STATUS[statusIndex].hex : {
|
|
172
|
+
background: '#AFB2BA'
|
|
173
|
+
}
|
|
174
|
+
}, /*#__PURE__*/_react["default"].createElement("div", {
|
|
175
|
+
className: "status-color"
|
|
176
|
+
}), /*#__PURE__*/_react["default"].createElement(_cardV.BaseParaStyles, {
|
|
177
|
+
theme: props.theme,
|
|
178
|
+
className: "status-text",
|
|
179
|
+
display: "inline-block",
|
|
180
|
+
fontSize: "10px",
|
|
181
|
+
color: "#FFF"
|
|
182
|
+
}, card_status || upload_status)) || null, actions && actions.length && actions.map(function (item, i) {
|
|
183
|
+
return item.icon && /*#__PURE__*/_react["default"].createElement(IconButtonStyles, {
|
|
191
184
|
theme: props.theme,
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
theme: props.theme,
|
|
236
|
-
className: 'status-text',
|
|
237
|
-
display: 'inline-block',
|
|
238
|
-
fontSize: '10px',
|
|
239
|
-
color: '#FFF'
|
|
240
|
-
},
|
|
241
|
-
card_status || upload_status
|
|
242
|
-
)
|
|
243
|
-
) || null,
|
|
244
|
-
actions && actions.length && actions.map(function (item, i) {
|
|
245
|
-
return item.icon && _react2.default.createElement(
|
|
246
|
-
IconButtonStyles,
|
|
247
|
-
{
|
|
248
|
-
theme: props.theme,
|
|
249
|
-
className: 'asset-card-thumbnail-icon-button',
|
|
250
|
-
type: 'button',
|
|
251
|
-
key: i,
|
|
252
|
-
position: 'relative',
|
|
253
|
-
border: 'none',
|
|
254
|
-
cursor: 'pointer',
|
|
255
|
-
borderRadius: '15px',
|
|
256
|
-
height: '26px',
|
|
257
|
-
padding: '0px',
|
|
258
|
-
width: '26px',
|
|
259
|
-
margin: actions.length === i + 1 ? '0' : '0 5px 0px 0px',
|
|
260
|
-
onClick: function onClick(e) {
|
|
261
|
-
e.stopPropagation();
|
|
262
|
-
actionClick(e, item.field);
|
|
263
|
-
}
|
|
264
|
-
},
|
|
265
|
-
_react2.default.createElement(_icon2.default, { name: item.icon, width: 14, height: 14, theme: props.theme }),
|
|
266
|
-
_react2.default.createElement(
|
|
267
|
-
'div',
|
|
268
|
-
{ className: 'tooltip' },
|
|
269
|
-
item.title
|
|
270
|
-
)
|
|
271
|
-
);
|
|
272
|
-
}) || null
|
|
273
|
-
)
|
|
274
|
-
),
|
|
275
|
-
file_type && !thumbnail ? _react2.default.createElement(
|
|
276
|
-
'div',
|
|
277
|
-
{ className: 'thumbnail-image-block background-block' },
|
|
278
|
-
_react2.default.createElement(
|
|
279
|
-
'div',
|
|
280
|
-
{ className: 'circle' },
|
|
281
|
-
_react2.default.createElement(_icon2.default, { name: file_type + '-icon', width: 20, height: 20 })
|
|
282
|
-
)
|
|
283
|
-
) : null,
|
|
284
|
-
iframeurl && _react2.default.createElement(
|
|
285
|
-
'div',
|
|
286
|
-
{
|
|
287
|
-
onMouseMove: handleMouseMove,
|
|
288
|
-
className: 'iframe-image-block background-block',
|
|
289
|
-
ref: iframeImageBlockRef
|
|
290
|
-
},
|
|
291
|
-
_react2.default.createElement('div', { className: 'hover-pointer', ref: hoverPointerRef }),
|
|
292
|
-
_react2.default.createElement('img', { ref: iframeImageRef, className: 'iframe-image', src: iframeurl })
|
|
293
|
-
) || null
|
|
294
|
-
);
|
|
185
|
+
className: "asset-card-thumbnail-icon-button",
|
|
186
|
+
type: "button",
|
|
187
|
+
key: i,
|
|
188
|
+
position: "relative",
|
|
189
|
+
border: "none",
|
|
190
|
+
cursor: "pointer",
|
|
191
|
+
borderRadius: "15px",
|
|
192
|
+
height: "26px",
|
|
193
|
+
padding: "0px",
|
|
194
|
+
width: "26px",
|
|
195
|
+
margin: actions.length === i + 1 ? '0' : '0 5px 0px 0px',
|
|
196
|
+
onClick: function onClick(e) {
|
|
197
|
+
e.stopPropagation();
|
|
198
|
+
actionClick(e, item.field);
|
|
199
|
+
}
|
|
200
|
+
}, /*#__PURE__*/_react["default"].createElement(_icon["default"], {
|
|
201
|
+
name: item.icon,
|
|
202
|
+
width: 14,
|
|
203
|
+
height: 14,
|
|
204
|
+
theme: props.theme
|
|
205
|
+
}), /*#__PURE__*/_react["default"].createElement("div", {
|
|
206
|
+
className: "tooltip"
|
|
207
|
+
}, item.title));
|
|
208
|
+
}) || null)), file_type && !thumbnail ? /*#__PURE__*/_react["default"].createElement("div", {
|
|
209
|
+
className: "thumbnail-image-block background-block"
|
|
210
|
+
}, /*#__PURE__*/_react["default"].createElement("div", {
|
|
211
|
+
className: "circle"
|
|
212
|
+
}, /*#__PURE__*/_react["default"].createElement(_icon["default"], {
|
|
213
|
+
name: "".concat(file_type, "-icon"),
|
|
214
|
+
width: 20,
|
|
215
|
+
height: 20
|
|
216
|
+
}))) : null, iframeurl && /*#__PURE__*/_react["default"].createElement("div", {
|
|
217
|
+
onMouseMove: handleMouseMove,
|
|
218
|
+
className: "iframe-image-block background-block",
|
|
219
|
+
ref: iframeImageBlockRef
|
|
220
|
+
}, /*#__PURE__*/_react["default"].createElement("div", {
|
|
221
|
+
className: "hover-pointer",
|
|
222
|
+
ref: hoverPointerRef
|
|
223
|
+
}), /*#__PURE__*/_react["default"].createElement("img", {
|
|
224
|
+
ref: iframeImageRef,
|
|
225
|
+
className: "iframe-image",
|
|
226
|
+
src: iframeurl
|
|
227
|
+
})) || null);
|
|
295
228
|
};
|
|
296
|
-
|
|
297
229
|
Thumbnail.propTypes = {
|
|
298
|
-
theme:
|
|
299
|
-
width:
|
|
300
|
-
thumbnail:
|
|
301
|
-
file_type:
|
|
302
|
-
iframeurl:
|
|
303
|
-
upload_status:
|
|
304
|
-
card_status:
|
|
305
|
-
ingest_db_id:
|
|
306
|
-
actions:
|
|
307
|
-
actionClick:
|
|
230
|
+
theme: _propTypes["default"].oneOf(['light', 'dark', 'nexc']),
|
|
231
|
+
width: _propTypes["default"].string,
|
|
232
|
+
thumbnail: _propTypes["default"].string,
|
|
233
|
+
file_type: _propTypes["default"].string,
|
|
234
|
+
iframeurl: _propTypes["default"].string,
|
|
235
|
+
upload_status: _propTypes["default"].string,
|
|
236
|
+
card_status: _propTypes["default"].string,
|
|
237
|
+
ingest_db_id: _propTypes["default"].string,
|
|
238
|
+
actions: _propTypes["default"].instanceOf(Array),
|
|
239
|
+
actionClick: _propTypes["default"].func
|
|
308
240
|
};
|
|
309
|
-
|
|
310
241
|
Thumbnail.defaultProps = {
|
|
311
242
|
theme: 'dark',
|
|
312
243
|
width: 'lg',
|
|
313
244
|
thumbnail: 'https://thumbnail.desynova.com/default_placeholder/Contido_Placeholder_Image.png',
|
|
314
245
|
iframeurl: ''
|
|
315
246
|
};
|
|
316
|
-
|
|
317
|
-
exports.default = Thumbnail;
|
|
247
|
+
var _default = exports["default"] = Thumbnail;
|