@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
package/molecules/table/table.js
CHANGED
|
@@ -1,130 +1,59 @@
|
|
|
1
|
-
|
|
1
|
+
"use strict";
|
|
2
2
|
|
|
3
|
+
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
4
|
+
var _typeof3 = 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
|
-
var
|
|
12
|
-
|
|
13
|
-
var
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
_templateObject5 = _taggedTemplateLiteral(['\n display: flex;\n align-items: center;\n justify-content: space-between;\n margin-bottom: 20px;\n .table-title {\n font-family: \'SFUIText-Medium\';\n font-size: 18px;\n letter-spacing: 0.3px;\n color: ', ';\n }\n .title-right-area {\n display: flex;\n align-items: center;\n & > div {\n margin-left: 10px;\n }\n\n .refresh-section {\n position: relative;\n\n @keyframes glowing {\n 0% {\n box-shadow: 0 2px 8px 4px rgb(0 206 198 / 0%);\n }\n 15% {\n box-shadow: 0 2px 8px 4px rgb(0 206 198 / 54%);\n }\n 30% {\n box-shadow: 0 2px 8px 4px rgb(0 206 198 / 0%);\n }\n 45% {\n box-shadow: 0 2px 8px 4px rgb(0 206 198 / 54%);\n }\n 60% {\n box-shadow: 0 2px 8px 4px rgb(0 206 198 / 0%);\n }\n 75% {\n box-shadow: 0 2px 8px 4px rgb(0 206 198 / 54%);\n }\n 90% {\n box-shadow: 0 2px 8px 4px rgb(0 206 198 / 54%);\n }\n 100% {\n box-shadow: 0 8px 8px 0 rgba(18, 29, 41, 0.2);\n }\n }\n\n .red-dot {\n position: absolute;\n top: 0;\n right 0;\n width: 16px\n height: 16px;\n border-radius: 100%;\n background-color: rgba(255, 108, 86, 0.1);\n &:after {\n content: \'\';\n position: absolute;\n top: 50%;\n left: 50%;\n width: 6px;\n height: 6px;\n background-color: #FF6C56;\n border-radius: 100%;\n transform: translate(-50%, -50%);\n }\n \n }\n\n .tooltip {\n font-family: \'SFUIText-Regular\';\n font-size: 12px;\n top: -38px;\n right: -66px;\n position: absolute;\n display: flex;\n justify-content: center;\n width: 170px;\n background-color: ', ';\n color: #0c141d;\n border-radius: 20px;\n padding: 10px 5px;\n &:after {\n content: \'\';\n border-top: 6px dashed ', ';\n border-right: 6px solid transparent;\n border-left: 6px solid transparent;\n position: absolute;\n bottom: -6px;\n right: 76px;\n }\n }\n\n .refresh-btn {\n background-color: #121d28;\n border: 1px solid #121d28;\n padding: 7px;\n border-radius: 50%;\n cursor: pointer;\n\n &:hover {\n path {\n fill: #fff;\n }\n }\n \n &.active {\n background-color: ', ';\n border-color: ', ';\n transition: all 0.2s ease-in-out;\n path {\n transition: all 0.2s ease-in-out;\n fill: #fff;\n }\n }\n\n &.active {\n animation: glowing 5000ms infinite;\n }\n\n > button {\n border: none;\n background-color: transparent;\n position: relative;\n path {\n fill: #afb2ba;\n }\n }\n }\n }\n }\n .column-show-holder {\n position: relative;\n text-align: left;\n\n .column-show-icon {\n width: 30px;\n height: 30px;\n background: #121d28;\n border-radius: 50%;\n padding: 7px 7px;\n\n &:hover {\n path {\n fill: #fff;\n transition: all 0.4s ease-out;\n }\n }\n }\n\n .column-show-list-box {\n position: absolute;\n display: none;\n //display:block;\n width: 345px;\n right: 0;\n z-index: 101;\n padding-top: 7px;\n top: 29px;\n\n & > div {\n box-shadow: 0 12px 24px 0 rgba(0, 0, 0, 1);\n }\n\n &:before {\n content: \'\';\n position: absolute;\n /* left: 42%; */\n /* top: 100%; */\n width: 0;\n height: 0;\n\n border-left: 4px solid transparent;\n border-right: 4px solid transparent;\n border-bottom: 6px solid ', ';\n transform: translate(327px, -6px);\n }\n\n .column-show-info {\n background: #182738;\n color: #afb2ba;\n font-family: \'SFUIText-Regular\';\n padding: 15px;\n font-size: 12px;\n border-bottom: solid 1px #303f51;\n line-height: 15px;\n border-top-left-radius: 2px;\n border-top-right-radius: 2px;\n .column-show-info-header {\n font-family: SFUIText-Medium;\n font-size: 14px;\n padding-bottom: 5px;\n }\n }\n\n .column-show-list {\n background: #182738;\n color: #fff;\n padding: 5px;\n border-bottom-left-radius: 2px;\n border-bottom-right-radius: 2px;\n & .label {\n margin-right: 0px;\n\n & > input {\n & ~ span {\n color: #fff;\n background: #303f51;\n &:hover {\n background: #303f51;\n color: ', ';\n }\n }\n\n &:checked ~ span {\n background: ', ';\n &:hover {\n background: ', ';\n color: #fff;\n }\n }\n }\n }\n }\n }\n\n &:hover {\n .column-show-list-box {\n display: block;\n }\n }\n }\n'], ['\n display: flex;\n align-items: center;\n justify-content: space-between;\n margin-bottom: 20px;\n .table-title {\n font-family: \'SFUIText-Medium\';\n font-size: 18px;\n letter-spacing: 0.3px;\n color: ', ';\n }\n .title-right-area {\n display: flex;\n align-items: center;\n & > div {\n margin-left: 10px;\n }\n\n .refresh-section {\n position: relative;\n\n @keyframes glowing {\n 0% {\n box-shadow: 0 2px 8px 4px rgb(0 206 198 / 0%);\n }\n 15% {\n box-shadow: 0 2px 8px 4px rgb(0 206 198 / 54%);\n }\n 30% {\n box-shadow: 0 2px 8px 4px rgb(0 206 198 / 0%);\n }\n 45% {\n box-shadow: 0 2px 8px 4px rgb(0 206 198 / 54%);\n }\n 60% {\n box-shadow: 0 2px 8px 4px rgb(0 206 198 / 0%);\n }\n 75% {\n box-shadow: 0 2px 8px 4px rgb(0 206 198 / 54%);\n }\n 90% {\n box-shadow: 0 2px 8px 4px rgb(0 206 198 / 54%);\n }\n 100% {\n box-shadow: 0 8px 8px 0 rgba(18, 29, 41, 0.2);\n }\n }\n\n .red-dot {\n position: absolute;\n top: 0;\n right 0;\n width: 16px\n height: 16px;\n border-radius: 100%;\n background-color: rgba(255, 108, 86, 0.1);\n &:after {\n content: \'\';\n position: absolute;\n top: 50%;\n left: 50%;\n width: 6px;\n height: 6px;\n background-color: #FF6C56;\n border-radius: 100%;\n transform: translate(-50%, -50%);\n }\n \n }\n\n .tooltip {\n font-family: \'SFUIText-Regular\';\n font-size: 12px;\n top: -38px;\n right: -66px;\n position: absolute;\n display: flex;\n justify-content: center;\n width: 170px;\n background-color: ', ';\n color: #0c141d;\n border-radius: 20px;\n padding: 10px 5px;\n &:after {\n content: \'\';\n border-top: 6px dashed ', ';\n border-right: 6px solid transparent;\n border-left: 6px solid transparent;\n position: absolute;\n bottom: -6px;\n right: 76px;\n }\n }\n\n .refresh-btn {\n background-color: #121d28;\n border: 1px solid #121d28;\n padding: 7px;\n border-radius: 50%;\n cursor: pointer;\n\n &:hover {\n path {\n fill: #fff;\n }\n }\n \n &.active {\n background-color: ', ';\n border-color: ', ';\n transition: all 0.2s ease-in-out;\n path {\n transition: all 0.2s ease-in-out;\n fill: #fff;\n }\n }\n\n &.active {\n animation: glowing 5000ms infinite;\n }\n\n > button {\n border: none;\n background-color: transparent;\n position: relative;\n path {\n fill: #afb2ba;\n }\n }\n }\n }\n }\n .column-show-holder {\n position: relative;\n text-align: left;\n\n .column-show-icon {\n width: 30px;\n height: 30px;\n background: #121d28;\n border-radius: 50%;\n padding: 7px 7px;\n\n &:hover {\n path {\n fill: #fff;\n transition: all 0.4s ease-out;\n }\n }\n }\n\n .column-show-list-box {\n position: absolute;\n display: none;\n //display:block;\n width: 345px;\n right: 0;\n z-index: 101;\n padding-top: 7px;\n top: 29px;\n\n & > div {\n box-shadow: 0 12px 24px 0 rgba(0, 0, 0, 1);\n }\n\n &:before {\n content: \'\';\n position: absolute;\n /* left: 42%; */\n /* top: 100%; */\n width: 0;\n height: 0;\n\n border-left: 4px solid transparent;\n border-right: 4px solid transparent;\n border-bottom: 6px solid ', ';\n transform: translate(327px, -6px);\n }\n\n .column-show-info {\n background: #182738;\n color: #afb2ba;\n font-family: \'SFUIText-Regular\';\n padding: 15px;\n font-size: 12px;\n border-bottom: solid 1px #303f51;\n line-height: 15px;\n border-top-left-radius: 2px;\n border-top-right-radius: 2px;\n .column-show-info-header {\n font-family: SFUIText-Medium;\n font-size: 14px;\n padding-bottom: 5px;\n }\n }\n\n .column-show-list {\n background: #182738;\n color: #fff;\n padding: 5px;\n border-bottom-left-radius: 2px;\n border-bottom-right-radius: 2px;\n & .label {\n margin-right: 0px;\n\n & > input {\n & ~ span {\n color: #fff;\n background: #303f51;\n &:hover {\n background: #303f51;\n color: ', ';\n }\n }\n\n &:checked ~ span {\n background: ', ';\n &:hover {\n background: ', ';\n color: #fff;\n }\n }\n }\n }\n }\n }\n\n &:hover {\n .column-show-list-box {\n display: block;\n }\n }\n }\n']),
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
var
|
|
28
|
-
|
|
29
|
-
var
|
|
30
|
-
|
|
31
|
-
var
|
|
32
|
-
|
|
33
|
-
var
|
|
34
|
-
|
|
35
|
-
var
|
|
36
|
-
|
|
37
|
-
var
|
|
38
|
-
|
|
39
|
-
var
|
|
40
|
-
|
|
41
|
-
var _button = require('../../atoms/button');
|
|
42
|
-
|
|
43
|
-
var _button2 = _interopRequireDefault(_button);
|
|
44
|
-
|
|
45
|
-
var _label = require('../../atoms/label');
|
|
46
|
-
|
|
47
|
-
var _label2 = _interopRequireDefault(_label);
|
|
48
|
-
|
|
49
|
-
var _card = require('../../atoms/card');
|
|
50
|
-
|
|
51
|
-
var _card2 = _interopRequireDefault(_card);
|
|
52
|
-
|
|
53
|
-
var _icon = require('../../atoms/icon');
|
|
54
|
-
|
|
55
|
-
var _icon2 = _interopRequireDefault(_icon);
|
|
56
|
-
|
|
57
|
-
var _checkbox = require('../../atoms/checkbox');
|
|
58
|
-
|
|
59
|
-
var _checkbox2 = _interopRequireDefault(_checkbox);
|
|
60
|
-
|
|
61
|
-
var _tokens = require('@desynova-digital/tokens');
|
|
62
|
-
|
|
63
|
-
var _tableColumn = require('./table-column');
|
|
64
|
-
|
|
65
|
-
var _tableColumn2 = _interopRequireDefault(_tableColumn);
|
|
66
|
-
|
|
67
|
-
var _tableHeader = require('./table-header');
|
|
68
|
-
|
|
69
|
-
var _tableHeader2 = _interopRequireDefault(_tableHeader);
|
|
70
|
-
|
|
71
|
-
var _dateTime = require('../../atoms/dateTime/dateTime');
|
|
72
|
-
|
|
73
|
-
var _dateTime2 = _interopRequireDefault(_dateTime);
|
|
74
|
-
|
|
75
|
-
var _filter = require('../../molecules/filter/filter');
|
|
76
|
-
|
|
77
|
-
var _filter2 = _interopRequireDefault(_filter);
|
|
78
|
-
|
|
79
|
-
var _permissionIconMap = require('../../../tokens/permissionIconMap');
|
|
80
|
-
|
|
81
|
-
var _permissionIconMap2 = _interopRequireDefault(_permissionIconMap);
|
|
82
|
-
|
|
83
|
-
var _TableErrorScreen = require('../../molecules/errorScreen/TableErrorScreen');
|
|
84
|
-
|
|
85
|
-
var _TableErrorScreen2 = _interopRequireDefault(_TableErrorScreen);
|
|
86
|
-
|
|
87
|
-
var _inputText = require('../../atoms/inputText');
|
|
88
|
-
|
|
89
|
-
var _inputText2 = _interopRequireDefault(_inputText);
|
|
90
|
-
|
|
91
|
-
var _Shimmer = require('../../atoms/loader/ShimmerComponent/Shimmer');
|
|
92
|
-
|
|
93
|
-
var _Shimmer2 = _interopRequireDefault(_Shimmer);
|
|
94
|
-
|
|
95
|
-
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
96
|
-
|
|
97
|
-
function _taggedTemplateLiteral(strings, raw) { return Object.freeze(Object.defineProperties(strings, { raw: { value: Object.freeze(raw) } })); }
|
|
98
|
-
|
|
99
|
-
function _toConsumableArray(arr) { if (Array.isArray(arr)) { for (var i = 0, arr2 = Array(arr.length); i < arr.length; i++) { arr2[i] = arr[i]; } return arr2; } else { return Array.from(arr); } }
|
|
100
|
-
|
|
101
|
-
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
|
102
|
-
|
|
103
|
-
function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; }
|
|
104
|
-
|
|
105
|
-
function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }
|
|
106
|
-
|
|
107
|
-
var Table = function (_Component) {
|
|
108
|
-
_inherits(Table, _Component);
|
|
109
|
-
|
|
8
|
+
exports["default"] = void 0;
|
|
9
|
+
var _taggedTemplateLiteral2 = _interopRequireDefault(require("@babel/runtime/helpers/taggedTemplateLiteral"));
|
|
10
|
+
var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends"));
|
|
11
|
+
var _typeof2 = _interopRequireDefault(require("@babel/runtime/helpers/typeof"));
|
|
12
|
+
var _toConsumableArray2 = _interopRequireDefault(require("@babel/runtime/helpers/toConsumableArray"));
|
|
13
|
+
var _classCallCheck2 = _interopRequireDefault(require("@babel/runtime/helpers/classCallCheck"));
|
|
14
|
+
var _createClass2 = _interopRequireDefault(require("@babel/runtime/helpers/createClass"));
|
|
15
|
+
var _possibleConstructorReturn2 = _interopRequireDefault(require("@babel/runtime/helpers/possibleConstructorReturn"));
|
|
16
|
+
var _getPrototypeOf2 = _interopRequireDefault(require("@babel/runtime/helpers/getPrototypeOf"));
|
|
17
|
+
var _inherits2 = _interopRequireDefault(require("@babel/runtime/helpers/inherits"));
|
|
18
|
+
var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
|
|
19
|
+
var _react = _interopRequireWildcard(require("react"));
|
|
20
|
+
var _propTypes = _interopRequireDefault(require("prop-types"));
|
|
21
|
+
var _styledComponents = _interopRequireWildcard(require("styled-components"));
|
|
22
|
+
var _lodash = require("lodash");
|
|
23
|
+
var _button = _interopRequireDefault(require("../../atoms/button"));
|
|
24
|
+
var _label = _interopRequireDefault(require("../../atoms/label"));
|
|
25
|
+
var _card = _interopRequireDefault(require("../../atoms/card"));
|
|
26
|
+
var _icon = _interopRequireDefault(require("../../atoms/icon"));
|
|
27
|
+
var _checkbox = _interopRequireDefault(require("../../atoms/checkbox"));
|
|
28
|
+
var _tokens = require("@desynova-digital/tokens");
|
|
29
|
+
var _tableColumn = _interopRequireDefault(require("./table-column"));
|
|
30
|
+
var _tableHeader = _interopRequireDefault(require("./table-header"));
|
|
31
|
+
var _dateTime = _interopRequireDefault(require("../../atoms/dateTime/dateTime"));
|
|
32
|
+
var _filter = _interopRequireDefault(require("../../molecules/filter/filter"));
|
|
33
|
+
var _permissionIconMap = _interopRequireDefault(require("../../../tokens/permissionIconMap"));
|
|
34
|
+
var _TableErrorScreen = _interopRequireDefault(require("../../molecules/errorScreen/TableErrorScreen"));
|
|
35
|
+
var _inputText = _interopRequireDefault(require("../../atoms/inputText"));
|
|
36
|
+
var _Shimmer = _interopRequireDefault(require("../../atoms/loader/ShimmerComponent/Shimmer"));
|
|
37
|
+
var _templateObject, _templateObject2, _templateObject3, _templateObject4, _templateObject5, _templateObject6, _templateObject7, _templateObject8, _templateObject9, _templateObject10, _templateObject11, _templateObject12, _templateObject13, _templateObject14;
|
|
38
|
+
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); }
|
|
39
|
+
function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != _typeof3(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; }
|
|
40
|
+
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)); }
|
|
41
|
+
function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); }
|
|
42
|
+
var Table = /*#__PURE__*/function (_Component) {
|
|
110
43
|
function Table(props) {
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
_this.spiltColumns = function () {
|
|
44
|
+
var _this;
|
|
45
|
+
(0, _classCallCheck2["default"])(this, Table);
|
|
46
|
+
_this = _callSuper(this, Table, [props]);
|
|
47
|
+
(0, _defineProperty2["default"])(_this, "spiltColumns", function () {
|
|
116
48
|
_this.defaultShowColumns = [];
|
|
117
49
|
_this.extraColumns = [];
|
|
118
50
|
_this.nestedTable = [];
|
|
119
|
-
|
|
120
51
|
_this.actionIconCol = [];
|
|
121
|
-
|
|
122
52
|
var extraColumnsSchema = {
|
|
123
53
|
title: '',
|
|
124
54
|
field: 'extra_columns',
|
|
125
55
|
type: 'extra_columns'
|
|
126
56
|
};
|
|
127
|
-
|
|
128
57
|
_this.columns = _this.columns.filter(function (item, idx) {
|
|
129
58
|
if (item.type === 'action_icon') {
|
|
130
59
|
_this.actionIconCol.push(item);
|
|
@@ -134,32 +63,26 @@ var Table = function (_Component) {
|
|
|
134
63
|
return item;
|
|
135
64
|
}
|
|
136
65
|
});
|
|
137
|
-
|
|
138
66
|
_this.defaultShowColumns = JSON.parse(JSON.stringify(_this.columns));
|
|
139
67
|
_this.extraColumns = JSON.parse(JSON.stringify(_this.columns));
|
|
140
|
-
|
|
141
68
|
if (_this.columns.length <= _this.props.maxShowNoOfColumns && !_this.props.showActions) {} else if (_this.columns.length <= _this.props.maxShowNoOfColumns - 1 && _this.props.showActions) {
|
|
142
69
|
var _this$defaultShowColu;
|
|
143
|
-
|
|
144
70
|
/*
|
|
145
71
|
* console.log(this.columns);
|
|
146
72
|
* this.defaultShowColumns.push({ title: '', field: 'video_src' });
|
|
147
73
|
*/
|
|
148
|
-
if (_this.actionIconCol.length > 0) (_this$defaultShowColu = _this.defaultShowColumns).push.apply(_this$defaultShowColu,
|
|
74
|
+
if (_this.actionIconCol.length > 0) (_this$defaultShowColu = _this.defaultShowColumns).push.apply(_this$defaultShowColu, (0, _toConsumableArray2["default"])(_this.actionIconCol));
|
|
149
75
|
} else if (_this.columns.length > _this.props.maxShowNoOfColumns - 1 && _this.props.showActions) {
|
|
150
76
|
var _this$defaultShowColu2;
|
|
151
|
-
|
|
152
77
|
_this.defaultShowColumns.splice(_this.props.maxShowNoOfColumns - 1, _this.defaultShowColumns.length);
|
|
153
78
|
|
|
154
79
|
// this.defaultShowColumns.push({ title: '', field: 'video_src' });
|
|
155
|
-
if (_this.actionIconCol.length > 0) (_this$defaultShowColu2 = _this.defaultShowColumns).push.apply(_this$defaultShowColu2,
|
|
156
|
-
|
|
80
|
+
if (_this.actionIconCol.length > 0) (_this$defaultShowColu2 = _this.defaultShowColumns).push.apply(_this$defaultShowColu2, (0, _toConsumableArray2["default"])(_this.actionIconCol));
|
|
157
81
|
_this.defaultShowColumns.push(extraColumnsSchema);
|
|
158
82
|
_this.extraColumns.splice(0, _this.props.maxShowNoOfColumns - 1);
|
|
159
83
|
} else if (_this.columns.length > _this.props.maxShowNoOfColumns && !_this.props.showActions) {
|
|
160
84
|
_this.defaultShowColumns.splice(_this.props.maxShowNoOfColumns, _this.defaultShowColumns.length);
|
|
161
85
|
_this.defaultShowColumns.push(extraColumnsSchema);
|
|
162
|
-
|
|
163
86
|
_this.extraColumns.splice(0, _this.props.maxShowNoOfColumns);
|
|
164
87
|
}
|
|
165
88
|
|
|
@@ -190,30 +113,33 @@ var Table = function (_Component) {
|
|
|
190
113
|
nestedTable: _this.nestedTable,
|
|
191
114
|
showColumnArr: _this.getFieldArr(_this.defaultShowColumns)
|
|
192
115
|
};
|
|
193
|
-
};
|
|
194
|
-
|
|
195
|
-
_this.getFieldArr = function (cols) {
|
|
116
|
+
});
|
|
117
|
+
(0, _defineProperty2["default"])(_this, "getFieldArr", function (cols) {
|
|
196
118
|
return cols.map(function (item) {
|
|
197
119
|
return item.field;
|
|
198
120
|
});
|
|
199
|
-
};
|
|
200
|
-
|
|
201
|
-
_this
|
|
121
|
+
});
|
|
122
|
+
// actions onClick event
|
|
123
|
+
(0, _defineProperty2["default"])(_this, "actionClickEvents", function (e, action, idx) {
|
|
202
124
|
// action eg. play, ingest_delete etc
|
|
203
125
|
var actionClickHandler = _this.props.actionClickHandler;
|
|
204
126
|
var items = _this.state.items;
|
|
205
|
-
|
|
206
127
|
if (actionClickHandler) {
|
|
207
128
|
actionClickHandler(action, items[idx], e);
|
|
208
|
-
_this.setState({
|
|
129
|
+
_this.setState({
|
|
130
|
+
isAllRowsSelected: false
|
|
131
|
+
});
|
|
209
132
|
} else {
|
|
210
133
|
console.log("pass func as props named 'actionClickHandler'... receive args as actionItem name and event obj. ");
|
|
211
134
|
}
|
|
212
|
-
};
|
|
213
|
-
|
|
214
|
-
_this
|
|
135
|
+
});
|
|
136
|
+
// actions elements
|
|
137
|
+
(0, _defineProperty2["default"])(_this, "actionElements", function (item, column, idx) {
|
|
215
138
|
if (item[column.field] === undefined) {
|
|
216
|
-
return
|
|
139
|
+
return /*#__PURE__*/_react["default"].createElement(_Shimmer["default"], {
|
|
140
|
+
height: "16px",
|
|
141
|
+
width: "100%"
|
|
142
|
+
});
|
|
217
143
|
}
|
|
218
144
|
var arrLength = item[column.field].length;
|
|
219
145
|
var elements = item[column.field].reduce(function (acc, curr) {
|
|
@@ -227,133 +153,108 @@ var Table = function (_Component) {
|
|
|
227
153
|
acc.remaining.push(curr);
|
|
228
154
|
}
|
|
229
155
|
return acc;
|
|
230
|
-
}, {
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
),
|
|
290
|
-
_react2.default.createElement(
|
|
291
|
-
'div',
|
|
292
|
-
null,
|
|
293
|
-
_this.props.actionLable && _this.props.actionLable[action]
|
|
294
|
-
)
|
|
295
|
-
);
|
|
296
|
-
})
|
|
297
|
-
)
|
|
298
|
-
)
|
|
299
|
-
)
|
|
300
|
-
) : null
|
|
301
|
-
);
|
|
302
|
-
};
|
|
303
|
-
|
|
304
|
-
_this.defaultCellRenderer = function (item, column, idx) {
|
|
156
|
+
}, {
|
|
157
|
+
first: [],
|
|
158
|
+
remaining: []
|
|
159
|
+
});
|
|
160
|
+
return /*#__PURE__*/_react["default"].createElement("div", {
|
|
161
|
+
className: "action-icons-cell"
|
|
162
|
+
}, item[column.field] && (0, _typeof2["default"])(item[column.field]) === 'object' ? /*#__PURE__*/_react["default"].createElement("div", {
|
|
163
|
+
style: {
|
|
164
|
+
display: 'flex',
|
|
165
|
+
alignItems: 'center'
|
|
166
|
+
}
|
|
167
|
+
}, elements.first.map(function (action, i) {
|
|
168
|
+
return /*#__PURE__*/_react["default"].createElement(_button["default"], {
|
|
169
|
+
theme: _this.props.theme,
|
|
170
|
+
key: action,
|
|
171
|
+
className: "action-item-btn",
|
|
172
|
+
style: {
|
|
173
|
+
border: 'none'
|
|
174
|
+
},
|
|
175
|
+
appearance: "cta",
|
|
176
|
+
width: 20,
|
|
177
|
+
height: 20,
|
|
178
|
+
iconWidth: 13,
|
|
179
|
+
iconHeight: 13,
|
|
180
|
+
label: _this.props.actionLable[action],
|
|
181
|
+
icon: column.valueIconMap && column.valueIconMap[action] ? column.valueIconMap[action] : _permissionIconMap["default"][action],
|
|
182
|
+
onClick: function onClick(e) {
|
|
183
|
+
return _this.actionClickEvents(e, action, idx);
|
|
184
|
+
}
|
|
185
|
+
});
|
|
186
|
+
}), elements.remaining.length > 0 && /*#__PURE__*/_react["default"].createElement("div", {
|
|
187
|
+
className: "more-action-holder"
|
|
188
|
+
}, /*#__PURE__*/_react["default"].createElement("div", {
|
|
189
|
+
className: "more-action-icon"
|
|
190
|
+
}, /*#__PURE__*/_react["default"].createElement(_icon["default"], {
|
|
191
|
+
name: "more-ver",
|
|
192
|
+
width: 3,
|
|
193
|
+
height: 13,
|
|
194
|
+
theme: _this.props.theme
|
|
195
|
+
})), /*#__PURE__*/_react["default"].createElement("div", {
|
|
196
|
+
className: "more-action-list-box"
|
|
197
|
+
}, /*#__PURE__*/_react["default"].createElement("div", {
|
|
198
|
+
className: "more-action-list"
|
|
199
|
+
}, elements.remaining.map(function (action, i) {
|
|
200
|
+
return /*#__PURE__*/_react["default"].createElement("div", {
|
|
201
|
+
className: "action-item-btn nested",
|
|
202
|
+
key: i,
|
|
203
|
+
onClick: function onClick(e) {
|
|
204
|
+
return _this.actionClickEvents(e, action, idx);
|
|
205
|
+
}
|
|
206
|
+
}, /*#__PURE__*/_react["default"].createElement("div", null, /*#__PURE__*/_react["default"].createElement(_icon["default"], {
|
|
207
|
+
theme: _this.props.theme,
|
|
208
|
+
name: column.valueIconMap && column.valueIconMap[action] ? column.valueIconMap[action] : _permissionIconMap["default"][action],
|
|
209
|
+
width: 14,
|
|
210
|
+
height: 14
|
|
211
|
+
})), /*#__PURE__*/_react["default"].createElement("div", null, _this.props.actionLable && _this.props.actionLable[action]));
|
|
212
|
+
}))))) : null);
|
|
213
|
+
});
|
|
214
|
+
(0, _defineProperty2["default"])(_this, "defaultCellRenderer", function (item, column, idx) {
|
|
305
215
|
var tableLoading = _this.props.tableLoading;
|
|
306
|
-
|
|
307
216
|
switch (column.type) {
|
|
308
217
|
case 'video_src':
|
|
309
218
|
{
|
|
310
|
-
return
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
height: 25,
|
|
326
|
-
iconWidth: 8,
|
|
327
|
-
iconHeight: 10
|
|
328
|
-
})
|
|
329
|
-
)
|
|
330
|
-
));
|
|
219
|
+
return /*#__PURE__*/_react["default"].createElement('div', {}, /*#__PURE__*/_react["default"].createElement("div", null, /*#__PURE__*/_react["default"].createElement("span", {
|
|
220
|
+
className: "video-button-box"
|
|
221
|
+
}, /*#__PURE__*/_react["default"].createElement(_button["default"], {
|
|
222
|
+
theme: _this.props.theme,
|
|
223
|
+
onClick: function onClick(e) {
|
|
224
|
+
_this.videoPlayBtnClickHandler(e, idx, item[column.field]);
|
|
225
|
+
},
|
|
226
|
+
appearance: "cta",
|
|
227
|
+
icon: "play",
|
|
228
|
+
display: "rounded",
|
|
229
|
+
width: 25,
|
|
230
|
+
height: 25,
|
|
231
|
+
iconWidth: 8,
|
|
232
|
+
iconHeight: 10
|
|
233
|
+
}))));
|
|
331
234
|
}
|
|
332
|
-
|
|
333
235
|
case 'extra_columns':
|
|
334
236
|
{
|
|
335
237
|
if (tableLoading) {
|
|
336
|
-
return
|
|
238
|
+
return /*#__PURE__*/_react["default"].createElement(_Shimmer["default"], {
|
|
239
|
+
height: "16px",
|
|
240
|
+
width: "100%"
|
|
241
|
+
});
|
|
337
242
|
} else {
|
|
338
|
-
return
|
|
243
|
+
return /*#__PURE__*/_react["default"].createElement('div', {
|
|
339
244
|
onClick: function onClick(e) {
|
|
340
245
|
_this.toggleExtraDetails(e, idx);
|
|
341
246
|
}
|
|
342
|
-
},
|
|
343
|
-
'
|
|
344
|
-
|
|
345
|
-
|
|
346
|
-
|
|
347
|
-
|
|
348
|
-
|
|
349
|
-
|
|
350
|
-
|
|
351
|
-
|
|
352
|
-
|
|
353
|
-
color: _tokens.colors[_this.props.theme].table.tdColor
|
|
354
|
-
})
|
|
355
|
-
)
|
|
356
|
-
));
|
|
247
|
+
}, /*#__PURE__*/_react["default"].createElement("div", {
|
|
248
|
+
className: _this.state.showExtraRow === idx ? 'show-row' : 'hide-row'
|
|
249
|
+
}, /*#__PURE__*/_react["default"].createElement("span", {
|
|
250
|
+
className: "open-close-extra"
|
|
251
|
+
}, /*#__PURE__*/_react["default"].createElement(_icon["default"], {
|
|
252
|
+
theme: _this.props.theme,
|
|
253
|
+
name: "chevron-down",
|
|
254
|
+
width: 12,
|
|
255
|
+
height: 10,
|
|
256
|
+
color: _tokens.colors[_this.props.theme].table.tdColor
|
|
257
|
+
}))));
|
|
357
258
|
}
|
|
358
259
|
}
|
|
359
260
|
/**
|
|
@@ -362,23 +263,25 @@ var Table = function (_Component) {
|
|
|
362
263
|
case 'link_text':
|
|
363
264
|
{
|
|
364
265
|
if (tableLoading) {
|
|
365
|
-
return
|
|
266
|
+
return /*#__PURE__*/_react["default"].createElement(_Shimmer["default"], {
|
|
267
|
+
height: "16px",
|
|
268
|
+
width: "100%"
|
|
269
|
+
});
|
|
366
270
|
} else {
|
|
367
271
|
if (item.actions === undefined) {
|
|
368
|
-
return
|
|
272
|
+
return /*#__PURE__*/_react["default"].createElement(_Shimmer["default"], {
|
|
273
|
+
height: "16px",
|
|
274
|
+
width: "100%"
|
|
275
|
+
});
|
|
369
276
|
} else {
|
|
370
277
|
var isPlayable = Array.isArray(item.actions) ? item.actions.includes("play") : false;
|
|
371
|
-
return
|
|
372
|
-
'
|
|
373
|
-
|
|
374
|
-
|
|
375
|
-
|
|
376
|
-
|
|
377
|
-
|
|
378
|
-
}
|
|
379
|
-
},
|
|
380
|
-
item[column.field].toString()
|
|
381
|
-
);
|
|
278
|
+
return /*#__PURE__*/_react["default"].createElement("div", {
|
|
279
|
+
className: "text-box ".concat(isPlayable ? 'asset-play' : ''),
|
|
280
|
+
title: item[column.field],
|
|
281
|
+
onClick: function onClick(e) {
|
|
282
|
+
return isPlayable ? _this.actionClickEvents(e, 'play', idx) : e.preventDefault();
|
|
283
|
+
}
|
|
284
|
+
}, item[column.field].toString());
|
|
382
285
|
}
|
|
383
286
|
}
|
|
384
287
|
}
|
|
@@ -388,70 +291,78 @@ var Table = function (_Component) {
|
|
|
388
291
|
case 'link_field':
|
|
389
292
|
{
|
|
390
293
|
if (tableLoading) {
|
|
391
|
-
return
|
|
294
|
+
return /*#__PURE__*/_react["default"].createElement(_Shimmer["default"], {
|
|
295
|
+
height: "16px",
|
|
296
|
+
width: "100%"
|
|
297
|
+
});
|
|
392
298
|
} else {
|
|
393
299
|
var _isPlayable = true;
|
|
394
|
-
return
|
|
395
|
-
'
|
|
396
|
-
|
|
397
|
-
|
|
398
|
-
|
|
399
|
-
|
|
400
|
-
|
|
401
|
-
}
|
|
402
|
-
},
|
|
403
|
-
item[column.field].toString()
|
|
404
|
-
);
|
|
300
|
+
return /*#__PURE__*/_react["default"].createElement("div", {
|
|
301
|
+
className: "text-box ".concat(_isPlayable ? 'asset-play' : ''),
|
|
302
|
+
title: item[column.field],
|
|
303
|
+
onClick: function onClick(e) {
|
|
304
|
+
return _isPlayable ? _this.actionClickEvents(e, 'play', idx) : e.preventDefault();
|
|
305
|
+
}
|
|
306
|
+
}, item[column.field].toString());
|
|
405
307
|
}
|
|
406
308
|
}
|
|
407
|
-
|
|
408
309
|
case 'action_icon':
|
|
409
310
|
if (tableLoading) {
|
|
410
|
-
return
|
|
311
|
+
return /*#__PURE__*/_react["default"].createElement(_Shimmer["default"], {
|
|
312
|
+
height: "16px",
|
|
313
|
+
width: "100%"
|
|
314
|
+
});
|
|
411
315
|
} else {
|
|
412
316
|
return _this.actionElements(item, column, idx);
|
|
413
317
|
}
|
|
414
|
-
|
|
415
318
|
case 'avatar':
|
|
416
319
|
return _this.getAvatar(item[column.field]);
|
|
417
|
-
|
|
418
320
|
case 'date':
|
|
419
321
|
if (tableLoading) {
|
|
420
|
-
return
|
|
322
|
+
return /*#__PURE__*/_react["default"].createElement(_Shimmer["default"], {
|
|
323
|
+
height: "16px",
|
|
324
|
+
width: "100%"
|
|
325
|
+
});
|
|
421
326
|
} else {
|
|
422
|
-
return
|
|
423
|
-
|
|
424
|
-
|
|
425
|
-
|
|
426
|
-
|
|
327
|
+
return /*#__PURE__*/_react["default"].createElement("div", {
|
|
328
|
+
className: "text-box",
|
|
329
|
+
style: {
|
|
330
|
+
whiteSpace: 'nowrap'
|
|
331
|
+
}
|
|
332
|
+
}, item[column.field] ? _dateTime["default"].toDateString(new Date(item[column.field]), 'DD/MM/YYYY') : null);
|
|
427
333
|
}
|
|
428
|
-
|
|
429
334
|
case 'time':
|
|
430
335
|
if (tableLoading) {
|
|
431
|
-
return
|
|
336
|
+
return /*#__PURE__*/_react["default"].createElement(_Shimmer["default"], {
|
|
337
|
+
height: "16px",
|
|
338
|
+
width: "100%"
|
|
339
|
+
});
|
|
432
340
|
} else {
|
|
433
|
-
return
|
|
434
|
-
|
|
435
|
-
|
|
436
|
-
|
|
437
|
-
|
|
341
|
+
return /*#__PURE__*/_react["default"].createElement("div", {
|
|
342
|
+
className: "text-box",
|
|
343
|
+
style: {
|
|
344
|
+
whiteSpace: 'nowrap'
|
|
345
|
+
}
|
|
346
|
+
}, item[column.field] ? _dateTime["default"].toTimeString(new Date(item[column.field]), 'HH:MM AP') : null);
|
|
438
347
|
}
|
|
439
|
-
|
|
440
348
|
case 'datetime':
|
|
441
349
|
if (tableLoading) {
|
|
442
|
-
return
|
|
350
|
+
return /*#__PURE__*/_react["default"].createElement(_Shimmer["default"], {
|
|
351
|
+
height: "16px",
|
|
352
|
+
width: "100%"
|
|
353
|
+
});
|
|
443
354
|
} else {
|
|
444
|
-
return
|
|
445
|
-
|
|
446
|
-
|
|
447
|
-
|
|
448
|
-
|
|
355
|
+
return /*#__PURE__*/_react["default"].createElement("div", {
|
|
356
|
+
className: "text-box",
|
|
357
|
+
style: {
|
|
358
|
+
whiteSpace: 'nowrap'
|
|
359
|
+
}
|
|
360
|
+
}, item[column.field] ? _dateTime["default"].toDateTimeString(new Date(item[column.field])) : null);
|
|
449
361
|
}
|
|
450
|
-
|
|
451
362
|
case 'icon':
|
|
452
363
|
if (item[column.field] && Array.isArray(item[column.field])) {
|
|
453
364
|
return item[column.field].map(function (iconItem) {
|
|
454
|
-
return
|
|
365
|
+
return /*#__PURE__*/_react["default"].createElement(_icon["default"], {
|
|
455
366
|
theme: _this.props.theme,
|
|
456
367
|
name: column.valueIconMap && column.valueIconMap[iconItem] ? column.valueIconMap[iconItem] : iconItem,
|
|
457
368
|
width: 18,
|
|
@@ -461,124 +372,111 @@ var Table = function (_Component) {
|
|
|
461
372
|
});
|
|
462
373
|
}
|
|
463
374
|
return null;
|
|
464
|
-
|
|
465
375
|
case 'icon_circle':
|
|
466
376
|
if (item[column.field] && Array.isArray(item[column.field])) {
|
|
467
377
|
return item[column.field].map(function (iconItem) {
|
|
468
|
-
return
|
|
469
|
-
|
|
470
|
-
{
|
|
471
|
-
|
|
472
|
-
|
|
473
|
-
|
|
474
|
-
|
|
475
|
-
|
|
476
|
-
|
|
477
|
-
|
|
478
|
-
|
|
479
|
-
|
|
480
|
-
|
|
481
|
-
|
|
482
|
-
|
|
483
|
-
|
|
484
|
-
|
|
485
|
-
|
|
486
|
-
|
|
487
|
-
|
|
488
|
-
|
|
489
|
-
|
|
490
|
-
height: 14,
|
|
491
|
-
color: column.iconColorMap && column.iconColorMap[iconItem] && column.iconColorMap[iconItem].color ? column.iconColorMap[iconItem].color : '#FFF'
|
|
492
|
-
})
|
|
493
|
-
);
|
|
378
|
+
return /*#__PURE__*/_react["default"].createElement("div", {
|
|
379
|
+
className: "icon-circle",
|
|
380
|
+
style: {
|
|
381
|
+
background: column.iconColorMap && column.iconColorMap[iconItem] && column.iconColorMap[iconItem].background ? column.iconColorMap[iconItem].background : _tokens.colors[_this.props.theme].table.titleBackgroundColor
|
|
382
|
+
}
|
|
383
|
+
// style={{
|
|
384
|
+
// background:
|
|
385
|
+
// column.iconColorMap &&
|
|
386
|
+
// column.iconColorMap[iconItem] &&
|
|
387
|
+
// column.iconColorMap[iconItem].background
|
|
388
|
+
// ? column.iconColorMap[iconItem].background
|
|
389
|
+
// : this.props.theme == 'nexc'
|
|
390
|
+
// ? '#60BEF8'
|
|
391
|
+
// : '#00cec6'
|
|
392
|
+
// }}
|
|
393
|
+
}, /*#__PURE__*/_react["default"].createElement(_icon["default"], {
|
|
394
|
+
theme: _this.props.theme,
|
|
395
|
+
name: column.valueIconMap && column.valueIconMap[iconItem] ? column.valueIconMap[iconItem] : iconItem,
|
|
396
|
+
width: 14,
|
|
397
|
+
height: 14,
|
|
398
|
+
color: column.iconColorMap && column.iconColorMap[iconItem] && column.iconColorMap[iconItem].color ? column.iconColorMap[iconItem].color : '#FFF'
|
|
399
|
+
}));
|
|
494
400
|
});
|
|
495
401
|
}
|
|
496
402
|
return null;
|
|
497
|
-
|
|
498
403
|
case 'label':
|
|
499
404
|
{
|
|
500
405
|
if (tableLoading) {
|
|
501
|
-
return
|
|
406
|
+
return /*#__PURE__*/_react["default"].createElement(_Shimmer["default"], {
|
|
407
|
+
height: "16px",
|
|
408
|
+
width: "100%"
|
|
409
|
+
});
|
|
502
410
|
} else {
|
|
503
411
|
if (item[column.field] || column.percentageField && column.percentageField.field && item[column.percentageField.field]) {
|
|
504
|
-
return
|
|
505
|
-
|
|
506
|
-
|
|
507
|
-
|
|
508
|
-
|
|
509
|
-
status: item[column.field]
|
|
510
|
-
},
|
|
511
|
-
item[column.field]
|
|
512
|
-
);
|
|
412
|
+
return /*#__PURE__*/_react["default"].createElement(_label["default"], {
|
|
413
|
+
percentageStatus: column.percentageField && column.percentageField.field && item[column.percentageField.field],
|
|
414
|
+
percentageField: column.percentageField,
|
|
415
|
+
status: item[column.field]
|
|
416
|
+
}, item[column.field]);
|
|
513
417
|
}
|
|
514
418
|
}
|
|
515
|
-
|
|
516
419
|
return null;
|
|
517
420
|
}
|
|
518
|
-
|
|
519
421
|
case 'dubbing_status':
|
|
520
422
|
{
|
|
521
423
|
if (tableLoading) {
|
|
522
|
-
return
|
|
424
|
+
return /*#__PURE__*/_react["default"].createElement(_Shimmer["default"], {
|
|
425
|
+
height: "16px",
|
|
426
|
+
width: "100%"
|
|
427
|
+
});
|
|
523
428
|
} else {
|
|
524
429
|
if (item[column.field] && Array.isArray(item[column.field])) {
|
|
525
|
-
return
|
|
526
|
-
|
|
527
|
-
|
|
528
|
-
|
|
529
|
-
|
|
530
|
-
|
|
531
|
-
|
|
532
|
-
|
|
533
|
-
|
|
534
|
-
|
|
535
|
-
|
|
536
|
-
|
|
537
|
-
)
|
|
538
|
-
);
|
|
539
|
-
})
|
|
540
|
-
);
|
|
430
|
+
return /*#__PURE__*/_react["default"].createElement(DubbingStatusStyles, {
|
|
431
|
+
theme: _this.props.theme
|
|
432
|
+
}, item[column.field].map(function (el) {
|
|
433
|
+
return /*#__PURE__*/_react["default"].createElement("div", {
|
|
434
|
+
className: "detail-block",
|
|
435
|
+
key: el.language
|
|
436
|
+
}, /*#__PURE__*/_react["default"].createElement("div", {
|
|
437
|
+
className: "status-color ".concat(el.review_status.toLowerCase())
|
|
438
|
+
}), /*#__PURE__*/_react["default"].createElement("p", {
|
|
439
|
+
className: "language-name"
|
|
440
|
+
}, el.language));
|
|
441
|
+
}));
|
|
541
442
|
}
|
|
542
443
|
}
|
|
543
444
|
break;
|
|
544
445
|
}
|
|
545
|
-
|
|
546
446
|
case 'rowChecked':
|
|
547
447
|
{
|
|
548
448
|
if (tableLoading) {
|
|
549
|
-
return
|
|
449
|
+
return /*#__PURE__*/_react["default"].createElement(_Shimmer["default"], {
|
|
450
|
+
height: "16px",
|
|
451
|
+
width: "100%"
|
|
452
|
+
});
|
|
550
453
|
} else {
|
|
551
|
-
return
|
|
552
|
-
|
|
553
|
-
|
|
554
|
-
|
|
555
|
-
|
|
556
|
-
|
|
557
|
-
|
|
558
|
-
|
|
559
|
-
_react2.default.createElement(
|
|
560
|
-
'label',
|
|
561
|
-
null,
|
|
562
|
-
_react2.default.createElement('span', null)
|
|
563
|
-
)
|
|
564
|
-
);
|
|
454
|
+
return /*#__PURE__*/_react["default"].createElement("div", {
|
|
455
|
+
onClick: function onClick(e) {
|
|
456
|
+
_this.rowCheckChange(e, !item.rowChecked, item, idx);
|
|
457
|
+
}
|
|
458
|
+
}, /*#__PURE__*/_react["default"].createElement("input", {
|
|
459
|
+
checked: item.rowChecked ? true : false,
|
|
460
|
+
type: "checkbox"
|
|
461
|
+
}), /*#__PURE__*/_react["default"].createElement("label", null, /*#__PURE__*/_react["default"].createElement("span", null)));
|
|
565
462
|
}
|
|
566
463
|
}
|
|
567
|
-
|
|
568
464
|
default:
|
|
569
465
|
if (tableLoading) {
|
|
570
|
-
return
|
|
466
|
+
return /*#__PURE__*/_react["default"].createElement(_Shimmer["default"], {
|
|
467
|
+
height: "16px",
|
|
468
|
+
width: "100%"
|
|
469
|
+
});
|
|
571
470
|
} else {
|
|
572
471
|
if (typeof item[column.field] === 'string' || typeof item[column.field] === 'number' || Array.isArray(item[column.field])) {
|
|
573
472
|
var className = 'text-box';
|
|
574
473
|
if (item[column.field]) {
|
|
575
474
|
className = className + ' text-' + item[column.field].toString().toLowerCase().split(' ').join('');
|
|
576
475
|
}
|
|
577
|
-
return
|
|
578
|
-
|
|
579
|
-
|
|
580
|
-
|
|
581
|
-
);
|
|
476
|
+
return /*#__PURE__*/_react["default"].createElement("div", {
|
|
477
|
+
className: className,
|
|
478
|
+
title: item[column.field]
|
|
479
|
+
}, item[column.field].toString());
|
|
582
480
|
}
|
|
583
481
|
if (item[column.field]) {
|
|
584
482
|
return item[column.field];
|
|
@@ -603,55 +501,34 @@ var Table = function (_Component) {
|
|
|
603
501
|
* </div>
|
|
604
502
|
* )
|
|
605
503
|
*/
|
|
606
|
-
};
|
|
607
|
-
|
|
608
|
-
_this.getActionArrayOfString = function (jsonObj) {
|
|
504
|
+
});
|
|
505
|
+
(0, _defineProperty2["default"])(_this, "getActionArrayOfString", function (jsonObj) {
|
|
609
506
|
var arrObj = [];
|
|
610
507
|
Object.keys(jsonObj).forEach(function (k) {
|
|
611
508
|
if (jsonObj[k]) {
|
|
612
509
|
arrObj.push(k);
|
|
613
510
|
}
|
|
614
511
|
});
|
|
615
|
-
|
|
616
512
|
return arrObj;
|
|
617
|
-
};
|
|
618
|
-
|
|
619
|
-
_this.getAvatar = function (data) {
|
|
513
|
+
});
|
|
514
|
+
(0, _defineProperty2["default"])(_this, "getAvatar", function (data) {
|
|
620
515
|
var returnDom = null;
|
|
621
516
|
if (data && data.user_image && data.user_image !== '') {
|
|
622
|
-
returnDom =
|
|
623
|
-
'div',
|
|
624
|
-
null,
|
|
625
|
-
'image'
|
|
626
|
-
);
|
|
517
|
+
returnDom = /*#__PURE__*/_react["default"].createElement("div", null, "image");
|
|
627
518
|
} else {
|
|
628
|
-
returnDom = data && data.name ?
|
|
629
|
-
|
|
630
|
-
|
|
631
|
-
|
|
632
|
-
|
|
633
|
-
|
|
634
|
-
data.name ? data.name.split(' ')[0] ? data.name.split(' ')[1] ? data.name.split(' ')[0][0] + '' + data.name.split(' ')[1][0] : data.name.split(' ')[0][0] : null : null
|
|
635
|
-
),
|
|
636
|
-
_react2.default.createElement(
|
|
637
|
-
'div',
|
|
638
|
-
{ className: 'avatar-details' },
|
|
639
|
-
'FUll NAme ',
|
|
640
|
-
_react2.default.createElement('br', null),
|
|
641
|
-
'email@address.com'
|
|
642
|
-
)
|
|
643
|
-
) : null;
|
|
519
|
+
returnDom = data && data.name ? /*#__PURE__*/_react["default"].createElement("div", null, /*#__PURE__*/_react["default"].createElement("div", {
|
|
520
|
+
className: "initial-placeholder",
|
|
521
|
+
title: data.name
|
|
522
|
+
}, data.name ? data.name.split(' ')[0] ? data.name.split(' ')[1] ? data.name.split(' ')[0][0] + '' + data.name.split(' ')[1][0] : data.name.split(' ')[0][0] : null : null), /*#__PURE__*/_react["default"].createElement("div", {
|
|
523
|
+
className: "avatar-details"
|
|
524
|
+
}, "FUll NAme ", /*#__PURE__*/_react["default"].createElement("br", null), "email@address.com")) : null;
|
|
644
525
|
}
|
|
645
|
-
|
|
646
|
-
|
|
647
|
-
|
|
648
|
-
|
|
649
|
-
|
|
650
|
-
);
|
|
651
|
-
};
|
|
652
|
-
|
|
653
|
-
_this.showCloumnCheckChange = function (field, isChecked) {
|
|
654
|
-
var colsSelected = [].concat(_toConsumableArray(_this.state.showColumnArr));
|
|
526
|
+
return /*#__PURE__*/_react["default"].createElement(AvatarBox, {
|
|
527
|
+
className: "avatar-box"
|
|
528
|
+
}, returnDom);
|
|
529
|
+
});
|
|
530
|
+
(0, _defineProperty2["default"])(_this, "showCloumnCheckChange", function (field, isChecked) {
|
|
531
|
+
var colsSelected = (0, _toConsumableArray2["default"])(_this.state.showColumnArr);
|
|
655
532
|
if (isChecked) {
|
|
656
533
|
colsSelected.push(field);
|
|
657
534
|
} else {
|
|
@@ -660,35 +537,43 @@ var Table = function (_Component) {
|
|
|
660
537
|
colsSelected.splice(colsSelected.indexOf(field), 1);
|
|
661
538
|
}
|
|
662
539
|
}
|
|
663
|
-
|
|
664
540
|
_this.setState({
|
|
665
541
|
showColumnArr: colsSelected
|
|
666
542
|
});
|
|
667
|
-
};
|
|
668
|
-
|
|
669
|
-
|
|
543
|
+
});
|
|
544
|
+
/**
|
|
545
|
+
* This function hadles the onchange event for search input field
|
|
546
|
+
* @param {string} text Input Filed value
|
|
547
|
+
*/
|
|
548
|
+
(0, _defineProperty2["default"])(_this, "handleInputChange", function (text) {
|
|
670
549
|
_this.setState({
|
|
671
550
|
searchedText: text
|
|
672
551
|
});
|
|
673
552
|
_this.handleDebounce(text);
|
|
674
|
-
};
|
|
675
|
-
|
|
676
|
-
|
|
553
|
+
});
|
|
554
|
+
/**
|
|
555
|
+
* This function reset Search & filters.
|
|
556
|
+
*/
|
|
557
|
+
(0, _defineProperty2["default"])(_this, "resetSearchTextAndFilters", function () {
|
|
677
558
|
_this.handleInputChange('');
|
|
678
559
|
_this._filterRef && _this._filterRef.current && this_filterRef.current.resetSelectedUserFilter();
|
|
679
|
-
};
|
|
680
|
-
|
|
681
|
-
|
|
560
|
+
});
|
|
561
|
+
/**
|
|
562
|
+
* This function triggers API call with the text as searched keyword
|
|
563
|
+
* @param {string} text the searched text
|
|
564
|
+
*/
|
|
565
|
+
(0, _defineProperty2["default"])(_this, "handleDebounce", (0, _lodash.debounce)(function (text) {
|
|
682
566
|
var getSearchedRows = _this.props.getSearchedRows;
|
|
683
|
-
|
|
684
567
|
getSearchedRows(text);
|
|
685
|
-
}, 250);
|
|
686
|
-
|
|
687
|
-
|
|
568
|
+
}, 250));
|
|
569
|
+
/**
|
|
570
|
+
* This function performs operations on the table based on type.
|
|
571
|
+
* @param {string} operation the operation that need to be performed
|
|
572
|
+
*/
|
|
573
|
+
(0, _defineProperty2["default"])(_this, "tableOperation", function (operation) {
|
|
688
574
|
var _this$props = _this.props,
|
|
689
|
-
|
|
690
|
-
|
|
691
|
-
|
|
575
|
+
refreshDashboard = _this$props.refreshDashboard,
|
|
576
|
+
getSearchedRows = _this$props.getSearchedRows;
|
|
692
577
|
_this.setState({
|
|
693
578
|
searchedText: ''
|
|
694
579
|
});
|
|
@@ -701,17 +586,16 @@ var Table = function (_Component) {
|
|
|
701
586
|
getSearchedRows('');
|
|
702
587
|
break;
|
|
703
588
|
}
|
|
704
|
-
};
|
|
705
|
-
|
|
589
|
+
});
|
|
706
590
|
_this.columns = _this.getColumns(props);
|
|
707
591
|
var spiltColumns = _this.spiltColumns();
|
|
708
|
-
|
|
709
592
|
_this.state = {
|
|
710
593
|
items: _this.getDisplayedItems(_this.columns, props.items),
|
|
711
594
|
originalRows: props.items,
|
|
712
595
|
defaultShowColumns: spiltColumns.defaultShowColumns,
|
|
713
596
|
extraColumns: spiltColumns.extraColumns,
|
|
714
|
-
nestedTable: spiltColumns.nestedTable,
|
|
597
|
+
nestedTable: spiltColumns.nestedTable,
|
|
598
|
+
// especially for dubbing
|
|
715
599
|
selectedRows: [],
|
|
716
600
|
showColumnArr: spiltColumns.showColumnArr ? spiltColumns.showColumnArr : [],
|
|
717
601
|
isAllRowsSelected: false,
|
|
@@ -721,9 +605,9 @@ var Table = function (_Component) {
|
|
|
721
605
|
};
|
|
722
606
|
return _this;
|
|
723
607
|
}
|
|
724
|
-
|
|
725
|
-
|
|
726
|
-
key:
|
|
608
|
+
(0, _inherits2["default"])(Table, _Component);
|
|
609
|
+
return (0, _createClass2["default"])(Table, [{
|
|
610
|
+
key: "componentDidUpdate",
|
|
727
611
|
value: function componentDidUpdate(prevProps, prevState) {
|
|
728
612
|
if (prevState.items !== this.state.items) {
|
|
729
613
|
this.setState({
|
|
@@ -738,7 +622,7 @@ var Table = function (_Component) {
|
|
|
738
622
|
}
|
|
739
623
|
}
|
|
740
624
|
}, {
|
|
741
|
-
key:
|
|
625
|
+
key: "toggleExtraDetails",
|
|
742
626
|
value: function toggleExtraDetails(e, idx) {
|
|
743
627
|
if (this.state.showExtraRow !== idx) {
|
|
744
628
|
this.setState({
|
|
@@ -749,22 +633,15 @@ var Table = function (_Component) {
|
|
|
749
633
|
showExtraRow: null
|
|
750
634
|
});
|
|
751
635
|
}
|
|
752
|
-
|
|
753
636
|
this.props.onToggleExtraDetails(e, idx);
|
|
754
637
|
}
|
|
755
638
|
}, {
|
|
756
|
-
key:
|
|
639
|
+
key: "videoPlayBtnClickHandler",
|
|
757
640
|
value: function videoPlayBtnClickHandler(e, idx, videoObj) {
|
|
758
641
|
this.props.onVideoPlayClick(e, idx, videoObj);
|
|
759
642
|
}
|
|
760
|
-
|
|
761
|
-
// actions onClick event
|
|
762
|
-
|
|
763
|
-
|
|
764
|
-
// actions elements
|
|
765
|
-
|
|
766
643
|
}, {
|
|
767
|
-
key:
|
|
644
|
+
key: "componentWillReceiveProps",
|
|
768
645
|
value: function componentWillReceiveProps(newProps) {
|
|
769
646
|
this.setState({
|
|
770
647
|
showExtraRow: null
|
|
@@ -790,33 +667,29 @@ var Table = function (_Component) {
|
|
|
790
667
|
this.forceUpdate();
|
|
791
668
|
}
|
|
792
669
|
}, {
|
|
793
|
-
key:
|
|
670
|
+
key: "getColumns",
|
|
794
671
|
value: function getColumns(props) {
|
|
795
|
-
return
|
|
672
|
+
return _react["default"].Children.toArray(props.children).map(function (element) {
|
|
796
673
|
return element.props;
|
|
797
674
|
});
|
|
798
675
|
}
|
|
799
676
|
}, {
|
|
800
|
-
key:
|
|
677
|
+
key: "getDisplayedItems",
|
|
801
678
|
value: function getDisplayedItems(columns, allItems) {
|
|
802
|
-
var items = []
|
|
679
|
+
var items = (0, _toConsumableArray2["default"])(allItems);
|
|
803
680
|
var sortColumn = columns.find(function (column) {
|
|
804
681
|
return column.sort;
|
|
805
682
|
});
|
|
806
|
-
|
|
807
683
|
if (!sortColumn || items.length === 0) return items;
|
|
808
|
-
|
|
809
684
|
var comparator = sortColumn.comparator || this.guessComparator(items[0], sortColumn);
|
|
810
685
|
items.sort(function (row1, row2) {
|
|
811
686
|
return comparator(sortColumn, row1, row2);
|
|
812
687
|
});
|
|
813
|
-
|
|
814
688
|
if (sortColumn.sort === 'desc') items.reverse();
|
|
815
|
-
|
|
816
689
|
return items;
|
|
817
690
|
}
|
|
818
691
|
}, {
|
|
819
|
-
key:
|
|
692
|
+
key: "guessComparator",
|
|
820
693
|
value: function guessComparator(firstItem, sortColumn) {
|
|
821
694
|
// If a comparator isn't specified, try to guess based on the type of the data.
|
|
822
695
|
var sampleValue = firstItem[sortColumn.field];
|
|
@@ -828,9 +701,8 @@ var Table = function (_Component) {
|
|
|
828
701
|
* @param {array of selected asset items} array
|
|
829
702
|
* @returns array of all actions common b/w selected items
|
|
830
703
|
*/
|
|
831
|
-
|
|
832
704
|
}, {
|
|
833
|
-
key:
|
|
705
|
+
key: "findCommon",
|
|
834
706
|
value: function findCommon(array) {
|
|
835
707
|
if (array.length === 0) {
|
|
836
708
|
return [];
|
|
@@ -849,19 +721,17 @@ var Table = function (_Component) {
|
|
|
849
721
|
* @param {index of selected item} indexesToRemove
|
|
850
722
|
* @returns
|
|
851
723
|
*/
|
|
852
|
-
|
|
853
724
|
}, {
|
|
854
|
-
key:
|
|
725
|
+
key: "removeObjects",
|
|
855
726
|
value: function removeObjects(arr, indexesToRemove) {
|
|
856
727
|
return arr.filter(function (obj, index) {
|
|
857
728
|
return indexesToRemove.includes(index);
|
|
858
729
|
});
|
|
859
730
|
}
|
|
860
731
|
}, {
|
|
861
|
-
key:
|
|
732
|
+
key: "execute",
|
|
862
733
|
value: function execute(allChecked) {
|
|
863
734
|
var _this2 = this;
|
|
864
|
-
|
|
865
735
|
if (allChecked) {
|
|
866
736
|
this.state.items.map(function (itemSelectedRows, i) {
|
|
867
737
|
itemSelectedRows.rowChecked = true;
|
|
@@ -899,22 +769,19 @@ var Table = function (_Component) {
|
|
|
899
769
|
}
|
|
900
770
|
}
|
|
901
771
|
}, {
|
|
902
|
-
key:
|
|
772
|
+
key: "rowCheckChange",
|
|
903
773
|
value: function rowCheckChange(e, value, item, idx) {
|
|
904
|
-
var
|
|
905
|
-
|
|
906
|
-
|
|
907
|
-
|
|
774
|
+
var _this$state = this.state,
|
|
775
|
+
items = _this$state.items,
|
|
776
|
+
selectedRows = _this$state.selectedRows;
|
|
908
777
|
if (selectedRows.length == items.length - 1 && value === true) {
|
|
909
778
|
this.execute(true);
|
|
910
779
|
} else {
|
|
911
|
-
var
|
|
912
|
-
|
|
913
|
-
|
|
914
|
-
|
|
780
|
+
var _this$props2 = this.props,
|
|
781
|
+
dashboard_common_actions = _this$props2.dashboard_common_actions,
|
|
782
|
+
common_actions = _this$props2.common_actions;
|
|
915
783
|
var table = e.target.closest('table');
|
|
916
784
|
var checkboxNodes = table.querySelectorAll('thead tr th input[type="checkbox"]');
|
|
917
|
-
|
|
918
785
|
if (value) {
|
|
919
786
|
items.map(function (itemSelectedRows, i) {
|
|
920
787
|
if (idx === i) {
|
|
@@ -922,7 +789,6 @@ var Table = function (_Component) {
|
|
|
922
789
|
}
|
|
923
790
|
return itemSelectedRows;
|
|
924
791
|
});
|
|
925
|
-
|
|
926
792
|
var selected_row_items = this.removeObjects(items, selectedRows);
|
|
927
793
|
selected_row_items = selected_row_items.concat(items[idx]);
|
|
928
794
|
var arrayIngestDbId = selected_row_items.map(function (ele) {
|
|
@@ -962,14 +828,11 @@ var Table = function (_Component) {
|
|
|
962
828
|
}
|
|
963
829
|
return itemSelectedRows;
|
|
964
830
|
});
|
|
965
|
-
|
|
966
831
|
var arrOfSelected = selectedRows;
|
|
967
832
|
var idxOfSelected = arrOfSelected.indexOf(idx);
|
|
968
|
-
|
|
969
833
|
if (idxOfSelected >= 0) {
|
|
970
834
|
arrOfSelected.splice(idxOfSelected, 1);
|
|
971
835
|
}
|
|
972
|
-
|
|
973
836
|
var _selected_row_items = this.removeObjects(items, arrOfSelected);
|
|
974
837
|
var _arrayIngestDbId = _selected_row_items.map(function (ele) {
|
|
975
838
|
return ele.ingest_db_id;
|
|
@@ -979,7 +842,6 @@ var Table = function (_Component) {
|
|
|
979
842
|
* finalAns is an array of all selected asset items common Actions
|
|
980
843
|
*/
|
|
981
844
|
var _finalAns = this.findCommon(_selected_row_items);
|
|
982
|
-
|
|
983
845
|
if (_finalAns.length != 0) {
|
|
984
846
|
var _intersectionDashboardCommonActions = common_actions.filter(function (item) {
|
|
985
847
|
return _finalAns.includes(item);
|
|
@@ -997,24 +859,23 @@ var Table = function (_Component) {
|
|
|
997
859
|
ingestedDbIdArray: _arrayIngestDbId
|
|
998
860
|
});
|
|
999
861
|
}
|
|
1000
|
-
|
|
1001
862
|
this.setState({
|
|
1002
863
|
selectedRows: arrOfSelected,
|
|
1003
864
|
isAllRowsSelected: false
|
|
1004
|
-
|
|
1005
|
-
|
|
1006
|
-
|
|
1007
|
-
|
|
1008
|
-
|
|
1009
|
-
}
|
|
865
|
+
}
|
|
866
|
+
// () => {
|
|
867
|
+
// this.setState({
|
|
868
|
+
// isAllRowsSelected: false,
|
|
869
|
+
// })
|
|
870
|
+
// }
|
|
871
|
+
);
|
|
1010
872
|
}
|
|
1011
873
|
}
|
|
1012
874
|
}
|
|
1013
875
|
}, {
|
|
1014
|
-
key:
|
|
876
|
+
key: "allRowCheckChange",
|
|
1015
877
|
value: function allRowCheckChange(e, value) {
|
|
1016
878
|
var _this3 = this;
|
|
1017
|
-
|
|
1018
879
|
/*
|
|
1019
880
|
* var table = e.target.parentNode.parentNode.parentNode.parentNode.parentNode
|
|
1020
881
|
* console.log(table );
|
|
@@ -1036,7 +897,6 @@ var Table = function (_Component) {
|
|
|
1036
897
|
return itemSelectedRows;
|
|
1037
898
|
// }
|
|
1038
899
|
});
|
|
1039
|
-
|
|
1040
900
|
this.setState(function (prevState) {
|
|
1041
901
|
return {
|
|
1042
902
|
selectedRows: _this3.props.items.map(function (item, idx) {
|
|
@@ -1061,7 +921,6 @@ var Table = function (_Component) {
|
|
|
1061
921
|
return itemSelectedRows;
|
|
1062
922
|
// }
|
|
1063
923
|
});
|
|
1064
|
-
|
|
1065
924
|
this.setState(function (prevState) {
|
|
1066
925
|
return {
|
|
1067
926
|
selectedRows: [],
|
|
@@ -1072,596 +931,415 @@ var Table = function (_Component) {
|
|
|
1072
931
|
});
|
|
1073
932
|
}
|
|
1074
933
|
}
|
|
1075
|
-
|
|
1076
|
-
/**
|
|
1077
|
-
* This function hadles the onchange event for search input field
|
|
1078
|
-
* @param {string} text Input Filed value
|
|
1079
|
-
*/
|
|
1080
|
-
|
|
1081
|
-
|
|
1082
|
-
/**
|
|
1083
|
-
* This function reset Search & filters.
|
|
1084
|
-
*/
|
|
1085
|
-
|
|
1086
|
-
|
|
1087
|
-
/**
|
|
1088
|
-
* This function triggers API call with the text as searched keyword
|
|
1089
|
-
* @param {string} text the searched text
|
|
1090
|
-
*/
|
|
1091
|
-
|
|
1092
|
-
|
|
1093
|
-
/**
|
|
1094
|
-
* This function performs operations on the table based on type.
|
|
1095
|
-
* @param {string} operation the operation that need to be performed
|
|
1096
|
-
*/
|
|
1097
|
-
|
|
1098
934
|
}, {
|
|
1099
|
-
key:
|
|
935
|
+
key: "refreshClicked",
|
|
1100
936
|
value: function refreshClicked() {
|
|
1101
937
|
this.props.tableLoadingActionFunc(true);
|
|
1102
|
-
return getTableData({
|
|
938
|
+
return getTableData({
|
|
939
|
+
page: 1
|
|
940
|
+
}, false, true);
|
|
1103
941
|
}
|
|
1104
942
|
}, {
|
|
1105
|
-
key:
|
|
943
|
+
key: "tableLoadingFirst",
|
|
1106
944
|
value: function tableLoadingFirst() {
|
|
1107
945
|
var divArray = new Array(15).fill(null);
|
|
1108
|
-
return
|
|
1109
|
-
|
|
1110
|
-
|
|
1111
|
-
|
|
1112
|
-
|
|
1113
|
-
'
|
|
1114
|
-
|
|
1115
|
-
|
|
1116
|
-
|
|
1117
|
-
|
|
1118
|
-
|
|
1119
|
-
|
|
1120
|
-
|
|
1121
|
-
|
|
1122
|
-
|
|
1123
|
-
|
|
1124
|
-
|
|
1125
|
-
|
|
1126
|
-
|
|
1127
|
-
|
|
1128
|
-
|
|
1129
|
-
|
|
1130
|
-
|
|
1131
|
-
|
|
1132
|
-
|
|
1133
|
-
|
|
946
|
+
return /*#__PURE__*/_react["default"].createElement("div", null, divArray.map(function (_, index) {
|
|
947
|
+
return /*#__PURE__*/_react["default"].createElement("div", {
|
|
948
|
+
style: {
|
|
949
|
+
display: 'flex',
|
|
950
|
+
alignItems: 'center',
|
|
951
|
+
justifyContent: 'space-between',
|
|
952
|
+
marginBottom: '15px'
|
|
953
|
+
}
|
|
954
|
+
}, /*#__PURE__*/_react["default"].createElement(_Shimmer["default"], {
|
|
955
|
+
height: "16px",
|
|
956
|
+
width: "100px"
|
|
957
|
+
}), /*#__PURE__*/_react["default"].createElement(_Shimmer["default"], {
|
|
958
|
+
height: "16px",
|
|
959
|
+
width: "110px"
|
|
960
|
+
}), /*#__PURE__*/_react["default"].createElement(_Shimmer["default"], {
|
|
961
|
+
height: "16px",
|
|
962
|
+
width: "110px"
|
|
963
|
+
}), /*#__PURE__*/_react["default"].createElement(_Shimmer["default"], {
|
|
964
|
+
height: "16px",
|
|
965
|
+
width: "120px"
|
|
966
|
+
}), /*#__PURE__*/_react["default"].createElement(_Shimmer["default"], {
|
|
967
|
+
height: "16px",
|
|
968
|
+
width: "100px"
|
|
969
|
+
}), /*#__PURE__*/_react["default"].createElement(_Shimmer["default"], {
|
|
970
|
+
height: "16px",
|
|
971
|
+
width: "110px"
|
|
972
|
+
}), /*#__PURE__*/_react["default"].createElement(_Shimmer["default"], {
|
|
973
|
+
height: "16px",
|
|
974
|
+
width: "100px"
|
|
975
|
+
}), /*#__PURE__*/_react["default"].createElement(_Shimmer["default"], {
|
|
976
|
+
height: "16px",
|
|
977
|
+
width: "100px"
|
|
978
|
+
}), /*#__PURE__*/_react["default"].createElement(_Shimmer["default"], {
|
|
979
|
+
height: "16px",
|
|
980
|
+
width: "50px"
|
|
981
|
+
}));
|
|
982
|
+
}));
|
|
1134
983
|
}
|
|
1135
984
|
}, {
|
|
1136
|
-
key:
|
|
985
|
+
key: "returnTableStatus",
|
|
1137
986
|
value: function returnTableStatus() {
|
|
1138
987
|
if (this.props.tableLoading && !this.props.tableLoadingAction) {
|
|
1139
|
-
return
|
|
1140
|
-
|
|
1141
|
-
|
|
1142
|
-
|
|
1143
|
-
);
|
|
988
|
+
return /*#__PURE__*/_react["default"].createElement("div", {
|
|
989
|
+
style: {
|
|
990
|
+
padding: '10px'
|
|
991
|
+
}
|
|
992
|
+
}, this.tableLoadingFirst());
|
|
1144
993
|
} else {
|
|
1145
994
|
if (this.state.items.length == 0) {
|
|
1146
995
|
if (this.props.tableLoading === false) {
|
|
1147
|
-
return
|
|
1148
|
-
|
|
1149
|
-
|
|
1150
|
-
|
|
1151
|
-
|
|
1152
|
-
|
|
1153
|
-
_react2.default.createElement(Table.Header, {
|
|
1154
|
-
theme: this.props.theme,
|
|
1155
|
-
columns: this.defaultShowColumns,
|
|
1156
|
-
selectedColumns: this.state.showColumnArr,
|
|
1157
|
-
onSort: this.props.onSort
|
|
1158
|
-
})
|
|
1159
|
-
),
|
|
1160
|
-
_react2.default.createElement(_TableErrorScreen2.default, null)
|
|
1161
|
-
);
|
|
996
|
+
return /*#__PURE__*/_react["default"].createElement("div", null, /*#__PURE__*/_react["default"].createElement(Table.Element, this.props, /*#__PURE__*/_react["default"].createElement(Table.Header, {
|
|
997
|
+
theme: this.props.theme,
|
|
998
|
+
columns: this.defaultShowColumns,
|
|
999
|
+
selectedColumns: this.state.showColumnArr,
|
|
1000
|
+
onSort: this.props.onSort
|
|
1001
|
+
})), /*#__PURE__*/_react["default"].createElement(_TableErrorScreen["default"], null));
|
|
1162
1002
|
} else {
|
|
1163
|
-
return
|
|
1164
|
-
|
|
1165
|
-
|
|
1166
|
-
|
|
1167
|
-
|
|
1168
|
-
|
|
1169
|
-
|
|
1170
|
-
|
|
1171
|
-
|
|
1172
|
-
|
|
1173
|
-
onSort: this.props.onSort
|
|
1174
|
-
})
|
|
1175
|
-
),
|
|
1176
|
-
_react2.default.createElement(
|
|
1177
|
-
'div',
|
|
1178
|
-
{ style: { padding: '10px' } },
|
|
1179
|
-
this.tableLoadingFirst()
|
|
1180
|
-
),
|
|
1181
|
-
';'
|
|
1182
|
-
);
|
|
1003
|
+
return /*#__PURE__*/_react["default"].createElement("div", null, /*#__PURE__*/_react["default"].createElement(Table.Element, this.props, /*#__PURE__*/_react["default"].createElement(Table.Header, {
|
|
1004
|
+
theme: this.props.theme,
|
|
1005
|
+
columns: this.defaultShowColumns,
|
|
1006
|
+
selectedColumns: this.state.showColumnArr,
|
|
1007
|
+
onSort: this.props.onSort
|
|
1008
|
+
})), /*#__PURE__*/_react["default"].createElement("div", {
|
|
1009
|
+
style: {
|
|
1010
|
+
padding: '10px'
|
|
1011
|
+
}
|
|
1012
|
+
}, this.tableLoadingFirst()), ";");
|
|
1183
1013
|
}
|
|
1184
1014
|
}
|
|
1185
1015
|
}
|
|
1186
1016
|
}
|
|
1187
1017
|
}, {
|
|
1188
|
-
key:
|
|
1018
|
+
key: "render",
|
|
1189
1019
|
value: function render() {
|
|
1190
1020
|
var _this4 = this;
|
|
1191
|
-
|
|
1192
|
-
|
|
1193
|
-
|
|
1194
|
-
|
|
1195
|
-
|
|
1196
|
-
|
|
1197
|
-
|
|
1198
|
-
|
|
1199
|
-
|
|
1200
|
-
|
|
1201
|
-
|
|
1202
|
-
|
|
1203
|
-
|
|
1204
|
-
|
|
1205
|
-
|
|
1206
|
-
|
|
1207
|
-
|
|
1208
|
-
|
|
1209
|
-
|
|
1210
|
-
items = _state2.items;
|
|
1211
|
-
|
|
1021
|
+
var _this$props3 = this.props,
|
|
1022
|
+
theme = _this$props3.theme,
|
|
1023
|
+
refreshDashboard = _this$props3.refreshDashboard,
|
|
1024
|
+
isRefreshActivated = _this$props3.isRefreshActivated,
|
|
1025
|
+
isRefreshDotVisible = _this$props3.isRefreshDotVisible,
|
|
1026
|
+
showSearchBox = _this$props3.showSearchBox,
|
|
1027
|
+
showTableHeader = _this$props3.showTableHeader,
|
|
1028
|
+
pageDropdown = _this$props3.pageDropdown,
|
|
1029
|
+
getTableData = _this$props3.getTableData,
|
|
1030
|
+
downloadAvailable = _this$props3.downloadAvailable,
|
|
1031
|
+
tableLoading = _this$props3.tableLoading,
|
|
1032
|
+
tableLoadingAction = _this$props3.tableLoadingAction,
|
|
1033
|
+
filtersStructure = _this$props3.filtersStructure,
|
|
1034
|
+
dropDownHandle = _this$props3.dropDownHandle,
|
|
1035
|
+
downloadHandle = _this$props3.downloadHandle;
|
|
1036
|
+
var _this$state2 = this.state,
|
|
1037
|
+
nestedTable = _this$state2.nestedTable,
|
|
1038
|
+
searchedText = _this$state2.searchedText,
|
|
1039
|
+
items = _this$state2.items;
|
|
1212
1040
|
var rows = this.state.items.map(function (item, index) {
|
|
1213
|
-
return
|
|
1214
|
-
|
|
1215
|
-
|
|
1216
|
-
|
|
1217
|
-
|
|
1218
|
-
|
|
1041
|
+
return /*#__PURE__*/_react["default"].createElement(_react["default"].Fragment, {
|
|
1042
|
+
key: index
|
|
1043
|
+
}, /*#__PURE__*/_react["default"].createElement(Table.Row, {
|
|
1044
|
+
theme: _this4.props.theme,
|
|
1045
|
+
key: index,
|
|
1046
|
+
className: item.rowChecked ? 'selected-row ' + (item._divider_ ? 'divider-row' : '') : item._divider_ ? 'divider-row' : ''
|
|
1047
|
+
}, _this4.defaultShowColumns.map(function (column) {
|
|
1048
|
+
var cellRenderer = column.children || _this4.defaultCellRenderer;
|
|
1049
|
+
if (_this4.state.showColumnArr.indexOf(column.field) > -1) {
|
|
1050
|
+
return /*#__PURE__*/_react["default"].createElement(Table.Cell, {
|
|
1051
|
+
className: "table-cell",
|
|
1219
1052
|
theme: _this4.props.theme,
|
|
1220
|
-
key: index,
|
|
1221
|
-
|
|
1222
|
-
|
|
1223
|
-
|
|
1224
|
-
|
|
1225
|
-
if (_this4.state.showColumnArr.indexOf(column.field) > -1) {
|
|
1226
|
-
return _react2.default.createElement(
|
|
1227
|
-
Table.Cell,
|
|
1228
|
-
{
|
|
1229
|
-
className: 'table-cell',
|
|
1230
|
-
theme: _this4.props.theme,
|
|
1231
|
-
key: index + column.title + Math.random(),
|
|
1232
|
-
maxWidth: column.maxWidth,
|
|
1233
|
-
column: {
|
|
1234
|
-
column: column,
|
|
1235
|
-
width: column.field === 'extra_columns' ? '40px' : 'auto'
|
|
1236
|
-
}
|
|
1237
|
-
},
|
|
1238
|
-
cellRenderer(item, column, index)
|
|
1239
|
-
);
|
|
1053
|
+
key: index + column.title + Math.random(),
|
|
1054
|
+
maxWidth: column.maxWidth,
|
|
1055
|
+
column: {
|
|
1056
|
+
column: column,
|
|
1057
|
+
width: column.field === 'extra_columns' ? '40px' : 'auto'
|
|
1240
1058
|
}
|
|
1241
|
-
})
|
|
1242
|
-
|
|
1243
|
-
|
|
1244
|
-
|
|
1245
|
-
|
|
1246
|
-
|
|
1247
|
-
|
|
1248
|
-
|
|
1249
|
-
|
|
1250
|
-
|
|
1251
|
-
|
|
1252
|
-
|
|
1253
|
-
|
|
1254
|
-
|
|
1255
|
-
|
|
1256
|
-
|
|
1257
|
-
|
|
1258
|
-
|
|
1259
|
-
|
|
1260
|
-
|
|
1261
|
-
|
|
1262
|
-
|
|
1263
|
-
|
|
1264
|
-
|
|
1265
|
-
|
|
1266
|
-
|
|
1267
|
-
|
|
1268
|
-
|
|
1269
|
-
|
|
1270
|
-
|
|
1271
|
-
|
|
1272
|
-
|
|
1273
|
-
|
|
1274
|
-
|
|
1275
|
-
|
|
1276
|
-
|
|
1277
|
-
|
|
1278
|
-
|
|
1279
|
-
|
|
1280
|
-
|
|
1281
|
-
|
|
1282
|
-
|
|
1283
|
-
|
|
1284
|
-
|
|
1285
|
-
|
|
1286
|
-
|
|
1287
|
-
|
|
1288
|
-
|
|
1289
|
-
|
|
1290
|
-
|
|
1291
|
-
|
|
1292
|
-
|
|
1293
|
-
|
|
1294
|
-
|
|
1295
|
-
|
|
1296
|
-
|
|
1297
|
-
|
|
1298
|
-
_react2.default.createElement(Table.Header, {
|
|
1299
|
-
theme: _this4.props.theme,
|
|
1300
|
-
columns: _this4.extraColumns,
|
|
1301
|
-
selectedColumns: _this4.extraColumns.map(function (column) {
|
|
1302
|
-
return column.field;
|
|
1303
|
-
})
|
|
1304
|
-
// displayAs="extraDetails"
|
|
1305
|
-
, onSort: _this4.props.onSort
|
|
1306
|
-
}),
|
|
1307
|
-
_react2.default.createElement(
|
|
1308
|
-
Table.Body,
|
|
1309
|
-
null,
|
|
1310
|
-
_react2.default.createElement(
|
|
1311
|
-
Table.Row,
|
|
1312
|
-
{ theme: _this4.props.theme, key: 'row-' + index + 'child' },
|
|
1313
|
-
_this4.extraColumns.map(function (column) {
|
|
1314
|
-
var cellRenderer = column.children || _this4.defaultCellRenderer;
|
|
1315
|
-
return _react2.default.createElement(
|
|
1316
|
-
TableInner.Cell,
|
|
1317
|
-
{
|
|
1318
|
-
theme: _this4.props.theme,
|
|
1319
|
-
key: column.title + 'c',
|
|
1320
|
-
column: column
|
|
1321
|
-
},
|
|
1322
|
-
cellRenderer(item, column, index)
|
|
1323
|
-
);
|
|
1324
|
-
})
|
|
1325
|
-
)
|
|
1326
|
-
)
|
|
1327
|
-
)
|
|
1328
|
-
)
|
|
1329
|
-
)
|
|
1330
|
-
) : null
|
|
1331
|
-
);
|
|
1059
|
+
}, cellRenderer(item, column, index));
|
|
1060
|
+
}
|
|
1061
|
+
})), _this4.state.showExtraRow === index ? /*#__PURE__*/_react["default"].createElement(Table.Row, {
|
|
1062
|
+
theme: _this4.props.theme,
|
|
1063
|
+
key: 'row-' + index + 'extra'
|
|
1064
|
+
}, /*#__PURE__*/_react["default"].createElement(Table.Cell, {
|
|
1065
|
+
className: "table-inner-cell",
|
|
1066
|
+
theme: _this4.props.theme,
|
|
1067
|
+
column: {},
|
|
1068
|
+
colSpan: _this4.props.maxShowNoOfColumns + 1
|
|
1069
|
+
// className="tableHolder"
|
|
1070
|
+
}, nestedTable.length > 0 && item[nestedTable[0].field].rows.length > 0 ? /*#__PURE__*/_react["default"].createElement(Table.Card, {
|
|
1071
|
+
theme: _this4.props.theme,
|
|
1072
|
+
width: "100%"
|
|
1073
|
+
}, /*#__PURE__*/_react["default"].createElement(TableInner.Element, {
|
|
1074
|
+
theme: _this4.props.theme,
|
|
1075
|
+
className: "nested-table"
|
|
1076
|
+
}, /*#__PURE__*/_react["default"].createElement(Table.Header, {
|
|
1077
|
+
theme: _this4.props.theme,
|
|
1078
|
+
columns: item[nestedTable[0].field].column_elements,
|
|
1079
|
+
selectedColumns: item[nestedTable[0].field].column_elements.map(function (column) {
|
|
1080
|
+
return column.field;
|
|
1081
|
+
})
|
|
1082
|
+
}), item[nestedTable[0].field].rows.map(function (element, i) {
|
|
1083
|
+
return /*#__PURE__*/_react["default"].createElement(Table.Body, {
|
|
1084
|
+
theme: _this4.props.theme,
|
|
1085
|
+
key: "nested-table-".concat(i)
|
|
1086
|
+
}, /*#__PURE__*/_react["default"].createElement("tr", null, item[nestedTable[0].field].column_elements.map(function (inner) {
|
|
1087
|
+
var cellRenderer = inner.children || _this4.defaultCellRenderer;
|
|
1088
|
+
return /*#__PURE__*/_react["default"].createElement(TableInner.Cell, {
|
|
1089
|
+
theme: _this4.props.theme,
|
|
1090
|
+
key: inner.title + 'n',
|
|
1091
|
+
column: inner
|
|
1092
|
+
}, cellRenderer(element, inner, i));
|
|
1093
|
+
})));
|
|
1094
|
+
}))) : null, /*#__PURE__*/_react["default"].createElement(Table.Card, (0, _extends2["default"])({}, _this4.props, {
|
|
1095
|
+
width: "100%"
|
|
1096
|
+
}), /*#__PURE__*/_react["default"].createElement(TableInner.Element, _this4.props, /*#__PURE__*/_react["default"].createElement(Table.Header, {
|
|
1097
|
+
theme: _this4.props.theme,
|
|
1098
|
+
columns: _this4.extraColumns,
|
|
1099
|
+
selectedColumns: _this4.extraColumns.map(function (column) {
|
|
1100
|
+
return column.field;
|
|
1101
|
+
})
|
|
1102
|
+
// displayAs="extraDetails"
|
|
1103
|
+
,
|
|
1104
|
+
onSort: _this4.props.onSort
|
|
1105
|
+
}), /*#__PURE__*/_react["default"].createElement(Table.Body, null, /*#__PURE__*/_react["default"].createElement(Table.Row, {
|
|
1106
|
+
theme: _this4.props.theme,
|
|
1107
|
+
key: 'row-' + index + 'child'
|
|
1108
|
+
}, _this4.extraColumns.map(function (column) {
|
|
1109
|
+
var cellRenderer = column.children || _this4.defaultCellRenderer;
|
|
1110
|
+
return /*#__PURE__*/_react["default"].createElement(TableInner.Cell, {
|
|
1111
|
+
theme: _this4.props.theme,
|
|
1112
|
+
key: column.title + 'c',
|
|
1113
|
+
column: column
|
|
1114
|
+
}, cellRenderer(item, column, index));
|
|
1115
|
+
}))))))) : null);
|
|
1332
1116
|
});
|
|
1333
|
-
|
|
1334
|
-
|
|
1335
|
-
|
|
1336
|
-
|
|
1337
|
-
|
|
1338
|
-
|
|
1339
|
-
|
|
1340
|
-
|
|
1341
|
-
|
|
1342
|
-
|
|
1343
|
-
|
|
1344
|
-
|
|
1345
|
-
|
|
1346
|
-
|
|
1347
|
-
|
|
1348
|
-
|
|
1349
|
-
|
|
1350
|
-
|
|
1351
|
-
|
|
1352
|
-
|
|
1353
|
-
|
|
1354
|
-
|
|
1355
|
-
|
|
1356
|
-
|
|
1357
|
-
|
|
1358
|
-
|
|
1359
|
-
|
|
1360
|
-
|
|
1361
|
-
|
|
1362
|
-
|
|
1363
|
-
|
|
1364
|
-
|
|
1365
|
-
|
|
1366
|
-
|
|
1367
|
-
|
|
1368
|
-
|
|
1369
|
-
|
|
1370
|
-
|
|
1371
|
-
|
|
1372
|
-
|
|
1373
|
-
|
|
1374
|
-
|
|
1375
|
-
|
|
1376
|
-
|
|
1377
|
-
|
|
1378
|
-
|
|
1379
|
-
|
|
1380
|
-
|
|
1381
|
-
|
|
1382
|
-
|
|
1383
|
-
|
|
1384
|
-
|
|
1385
|
-
|
|
1386
|
-
|
|
1387
|
-
|
|
1388
|
-
|
|
1389
|
-
|
|
1390
|
-
|
|
1391
|
-
|
|
1392
|
-
|
|
1393
|
-
|
|
1394
|
-
|
|
1395
|
-
|
|
1396
|
-
|
|
1397
|
-
|
|
1398
|
-
|
|
1399
|
-
|
|
1400
|
-
|
|
1401
|
-
|
|
1402
|
-
|
|
1403
|
-
|
|
1404
|
-
|
|
1405
|
-
|
|
1406
|
-
|
|
1407
|
-
|
|
1408
|
-
|
|
1409
|
-
|
|
1410
|
-
|
|
1411
|
-
|
|
1412
|
-
|
|
1413
|
-
|
|
1414
|
-
|
|
1415
|
-
|
|
1416
|
-
|
|
1417
|
-
|
|
1418
|
-
|
|
1419
|
-
|
|
1420
|
-
|
|
1421
|
-
|
|
1422
|
-
|
|
1423
|
-
|
|
1424
|
-
|
|
1425
|
-
|
|
1426
|
-
|
|
1427
|
-
|
|
1428
|
-
|
|
1429
|
-
|
|
1430
|
-
|
|
1431
|
-
|
|
1432
|
-
|
|
1433
|
-
|
|
1434
|
-
|
|
1435
|
-
|
|
1436
|
-
|
|
1437
|
-
|
|
1438
|
-
|
|
1439
|
-
|
|
1440
|
-
|
|
1441
|
-
|
|
1442
|
-
|
|
1443
|
-
|
|
1444
|
-
|
|
1445
|
-
|
|
1446
|
-
|
|
1447
|
-
|
|
1448
|
-
|
|
1449
|
-
|
|
1450
|
-
|
|
1451
|
-
|
|
1452
|
-
|
|
1453
|
-
|
|
1454
|
-
|
|
1455
|
-
|
|
1456
|
-
|
|
1457
|
-
|
|
1458
|
-
|
|
1459
|
-
|
|
1460
|
-
|
|
1461
|
-
|
|
1462
|
-
|
|
1463
|
-
|
|
1464
|
-
|
|
1465
|
-
|
|
1466
|
-
|
|
1467
|
-
|
|
1468
|
-
|
|
1469
|
-
|
|
1470
|
-
|
|
1471
|
-
|
|
1472
|
-
|
|
1473
|
-
|
|
1474
|
-
|
|
1475
|
-
|
|
1476
|
-
|
|
1477
|
-
|
|
1478
|
-
|
|
1479
|
-
|
|
1480
|
-
|
|
1481
|
-
|
|
1482
|
-
|
|
1483
|
-
|
|
1484
|
-
|
|
1485
|
-
|
|
1486
|
-
|
|
1487
|
-
|
|
1488
|
-
|
|
1489
|
-
|
|
1490
|
-
|
|
1491
|
-
|
|
1492
|
-
|
|
1493
|
-
|
|
1494
|
-
|
|
1495
|
-
|
|
1496
|
-
|
|
1497
|
-
|
|
1498
|
-
|
|
1499
|
-
|
|
1500
|
-
|
|
1501
|
-
|
|
1502
|
-
|
|
1503
|
-
|
|
1504
|
-
|
|
1505
|
-
|
|
1506
|
-
|
|
1507
|
-
|
|
1508
|
-
|
|
1509
|
-
|
|
1510
|
-
|
|
1511
|
-
|
|
1512
|
-
|
|
1513
|
-
|
|
1514
|
-
|
|
1515
|
-
|
|
1516
|
-
|
|
1517
|
-
|
|
1518
|
-
|
|
1519
|
-
|
|
1520
|
-
|
|
1521
|
-
|
|
1522
|
-
|
|
1523
|
-
|
|
1524
|
-
theme: this.props.theme,
|
|
1525
|
-
name: 'example2',
|
|
1526
|
-
type: 'label',
|
|
1527
|
-
onChange: function onChange(e) {
|
|
1528
|
-
_this4.showCloumnCheckChange(e.target.value, e.target.checked);
|
|
1529
|
-
},
|
|
1530
|
-
align: 'horizontal',
|
|
1531
|
-
selected: this.state.showColumnArr ? this.state.showColumnArr : []
|
|
1532
|
-
},
|
|
1533
|
-
this.columns ? this.columns.map(function (item) {
|
|
1534
|
-
return _react2.default.createElement(
|
|
1535
|
-
_checkbox2.default,
|
|
1536
|
-
{ theme: _this4.props.theme, value: item.field },
|
|
1537
|
-
item.title
|
|
1538
|
-
);
|
|
1539
|
-
}) : null
|
|
1540
|
-
)
|
|
1541
|
-
)
|
|
1542
|
-
)
|
|
1543
|
-
)
|
|
1544
|
-
)
|
|
1545
|
-
)
|
|
1546
|
-
)
|
|
1547
|
-
),
|
|
1548
|
-
rows.length && this.state.showColumnArr[0] === 'rowChecked' && this.props.selectAllRows && !tableLoading ? _react2.default.createElement(
|
|
1549
|
-
SelectAllButton,
|
|
1550
|
-
{
|
|
1551
|
-
theme: this.props.theme,
|
|
1552
|
-
isActive: !this.state.isAllRowsSelected,
|
|
1553
|
-
onClick: function onClick(e) {
|
|
1554
|
-
_this4.execute(!_this4.state.isAllRowsSelected);
|
|
1117
|
+
return /*#__PURE__*/_react["default"].createElement(_react["default"].Fragment, null, showTableHeader && /*#__PURE__*/_react["default"].createElement(Table.Title, {
|
|
1118
|
+
style: {
|
|
1119
|
+
display: 'flex'
|
|
1120
|
+
},
|
|
1121
|
+
className: "table-title-holder",
|
|
1122
|
+
theme: this.props.theme
|
|
1123
|
+
}, /*#__PURE__*/_react["default"].createElement("div", {
|
|
1124
|
+
className: "table-title"
|
|
1125
|
+
}, /*#__PURE__*/_react["default"].createElement("p", null, this.props.tableTitle)), /*#__PURE__*/_react["default"].createElement(_react["default"].Fragment, null, tableLoading && !tableLoadingAction && /*#__PURE__*/_react["default"].createElement(TableTitleLoadingInitial, {
|
|
1126
|
+
theme: this.props.theme
|
|
1127
|
+
}, /*#__PURE__*/_react["default"].createElement(_Shimmer["default"], {
|
|
1128
|
+
height: "24px",
|
|
1129
|
+
width: "150px"
|
|
1130
|
+
})), /*#__PURE__*/_react["default"].createElement("div", {
|
|
1131
|
+
className: "title-right-area"
|
|
1132
|
+
}, showSearchBox && (!tableLoading || tableLoading && tableLoadingAction) && /*#__PURE__*/_react["default"].createElement(SearchContainer, {
|
|
1133
|
+
theme: this.props.theme
|
|
1134
|
+
}, /*#__PURE__*/_react["default"].createElement("span", {
|
|
1135
|
+
className: "search-icon-wrapper"
|
|
1136
|
+
}, /*#__PURE__*/_react["default"].createElement(_icon["default"], {
|
|
1137
|
+
name: "search",
|
|
1138
|
+
width: 12,
|
|
1139
|
+
height: 12,
|
|
1140
|
+
color: "#999999"
|
|
1141
|
+
})), /*#__PURE__*/_react["default"].createElement(_inputText["default"], {
|
|
1142
|
+
className: "input-field",
|
|
1143
|
+
label: "Search",
|
|
1144
|
+
value: searchedText,
|
|
1145
|
+
onChange: function onChange(e) {
|
|
1146
|
+
_this4.props.tableLoadingActionFunc(true);
|
|
1147
|
+
_this4.handleInputChange(e.target.value);
|
|
1148
|
+
}
|
|
1149
|
+
}), searchedText && searchedText.length && /*#__PURE__*/_react["default"].createElement("span", {
|
|
1150
|
+
className: "close-icon-wrapper",
|
|
1151
|
+
onClick: function onClick() {
|
|
1152
|
+
return _this4.tableOperation('clearInput');
|
|
1153
|
+
}
|
|
1154
|
+
}, /*#__PURE__*/_react["default"].createElement(_icon["default"], {
|
|
1155
|
+
theme: this.props.theme,
|
|
1156
|
+
name: "cross",
|
|
1157
|
+
width: 12,
|
|
1158
|
+
height: 10,
|
|
1159
|
+
color: "#999999"
|
|
1160
|
+
}))) || /*#__PURE__*/_react["default"].createElement(_Shimmer["default"], {
|
|
1161
|
+
height: "24px",
|
|
1162
|
+
width: "322px"
|
|
1163
|
+
}), !tableLoading && pageDropdown && pageDropdown || tableLoadingAction ? pageDropdown : dropDownHandle ? null : /*#__PURE__*/_react["default"].createElement(_Shimmer["default"], {
|
|
1164
|
+
height: "24px",
|
|
1165
|
+
width: "100px"
|
|
1166
|
+
}), this.props.searchable ? /*#__PURE__*/_react["default"].createElement("div", null, /*#__PURE__*/_react["default"].createElement(_button["default"], {
|
|
1167
|
+
theme: this.props.theme,
|
|
1168
|
+
appearance: "cta",
|
|
1169
|
+
icon: "search",
|
|
1170
|
+
display: "rounded",
|
|
1171
|
+
width: 34,
|
|
1172
|
+
height: 34,
|
|
1173
|
+
iconWidth: 16,
|
|
1174
|
+
iconHeight: 16
|
|
1175
|
+
})) : null, /*#__PURE__*/_react["default"].createElement("div", {
|
|
1176
|
+
className: "refresh-section"
|
|
1177
|
+
}, isRefreshActivated && /*#__PURE__*/_react["default"].createElement("div", {
|
|
1178
|
+
className: "tooltip"
|
|
1179
|
+
}, "Refresh to get updated reports"), isRefreshDotVisible && /*#__PURE__*/_react["default"].createElement("div", {
|
|
1180
|
+
className: "red-dot"
|
|
1181
|
+
}), (!tableLoading || tableLoadingAction) && /*#__PURE__*/_react["default"].createElement("div", {
|
|
1182
|
+
className: "".concat(isRefreshActivated ? "refresh-btn active" : "refresh-btn"),
|
|
1183
|
+
onClick: function onClick() {
|
|
1184
|
+
return _this4.tableOperation('refresh');
|
|
1185
|
+
}
|
|
1186
|
+
}, /*#__PURE__*/_react["default"].createElement(_button["default"], {
|
|
1187
|
+
theme: this.props.theme,
|
|
1188
|
+
display: "rounded",
|
|
1189
|
+
appearance: "cta",
|
|
1190
|
+
icon: "data-refresh",
|
|
1191
|
+
width: 16,
|
|
1192
|
+
height: 16
|
|
1193
|
+
})) || /*#__PURE__*/_react["default"].createElement(_Shimmer["default"], {
|
|
1194
|
+
height: "24px",
|
|
1195
|
+
width: "30px"
|
|
1196
|
+
})), this.props.filtersStructure && this.props.filtersStructure.length && !tableLoading || tableLoadingAction && filtersStructure.length ? /*#__PURE__*/_react["default"].createElement(_filter["default"], {
|
|
1197
|
+
theme: this.props.theme,
|
|
1198
|
+
ref: this._filterRef,
|
|
1199
|
+
initialFilters: this.props.initialFilters,
|
|
1200
|
+
refreshDashboard: this.props.refreshDashboard,
|
|
1201
|
+
tableLoadingActionFunc: this.props.tableLoadingActionFunc,
|
|
1202
|
+
filtersStructure: this.props.filtersStructure,
|
|
1203
|
+
selectedFilters: this.props.selectedFilters,
|
|
1204
|
+
applyFilters: this.props.applyFilters,
|
|
1205
|
+
showSelectedFiltersAsChip: this.props.showSelectedFiltersAsChip,
|
|
1206
|
+
filterMessage: this.props.filterMessage,
|
|
1207
|
+
handleUserIdFilterChange: this.props.handleUserIdFilterChange,
|
|
1208
|
+
userIdsList: this.props.userIdsList
|
|
1209
|
+
}) : tableLoading && filtersStructure.length ? /*#__PURE__*/_react["default"].createElement(_Shimmer["default"], {
|
|
1210
|
+
height: "24px",
|
|
1211
|
+
width: "30px"
|
|
1212
|
+
}) : null, downloadAvailable && (!tableLoading || tableLoading && tableLoadingAction) && /*#__PURE__*/_react["default"].createElement("div", {
|
|
1213
|
+
className: "refresh-section"
|
|
1214
|
+
}, /*#__PURE__*/_react["default"].createElement("div", {
|
|
1215
|
+
className: "refresh-btn",
|
|
1216
|
+
onClick: function onClick() {
|
|
1217
|
+
return getTableData({
|
|
1218
|
+
page: 1
|
|
1219
|
+
}, false, true);
|
|
1220
|
+
}
|
|
1221
|
+
}, /*#__PURE__*/_react["default"].createElement(_button["default"], {
|
|
1222
|
+
theme: this.props.theme,
|
|
1223
|
+
display: "rounded",
|
|
1224
|
+
appearance: "cta",
|
|
1225
|
+
icon: "download-icon",
|
|
1226
|
+
width: 16,
|
|
1227
|
+
height: 16,
|
|
1228
|
+
iconWidth: 12,
|
|
1229
|
+
iconHeight: 12
|
|
1230
|
+
}))) || (downloadHandle ? null : /*#__PURE__*/_react["default"].createElement(_Shimmer["default"], {
|
|
1231
|
+
height: "24px",
|
|
1232
|
+
width: "30px"
|
|
1233
|
+
})), false && /*#__PURE__*/_react["default"].createElement("div", {
|
|
1234
|
+
className: "column-show-holder"
|
|
1235
|
+
}, /*#__PURE__*/_react["default"].createElement("div", {
|
|
1236
|
+
className: "column-show-icon"
|
|
1237
|
+
}, /*#__PURE__*/_react["default"].createElement(_icon["default"], {
|
|
1238
|
+
theme: this.props.theme,
|
|
1239
|
+
name: "controls",
|
|
1240
|
+
width: 16,
|
|
1241
|
+
height: 16,
|
|
1242
|
+
color: "#afb2ba"
|
|
1243
|
+
})), /*#__PURE__*/_react["default"].createElement("div", {
|
|
1244
|
+
className: "column-show-list-box"
|
|
1245
|
+
}, /*#__PURE__*/_react["default"].createElement("div", null, /*#__PURE__*/_react["default"].createElement("div", {
|
|
1246
|
+
className: "column-show-info"
|
|
1247
|
+
}, /*#__PURE__*/_react["default"].createElement("div", {
|
|
1248
|
+
className: "column-show-info-header"
|
|
1249
|
+
}, "Table Filters"), /*#__PURE__*/_react["default"].createElement("div", null, "Select/deselect to show/hide columns."), /*#__PURE__*/_react["default"].createElement("div", null, "Drag and arrange the column order.")), /*#__PURE__*/_react["default"].createElement("div", {
|
|
1250
|
+
className: "column-show-list"
|
|
1251
|
+
}, /*#__PURE__*/_react["default"].createElement(_checkbox["default"].Group, {
|
|
1252
|
+
theme: this.props.theme,
|
|
1253
|
+
name: "example2",
|
|
1254
|
+
type: "label",
|
|
1255
|
+
onChange: function onChange(e) {
|
|
1256
|
+
_this4.showCloumnCheckChange(e.target.value, e.target.checked);
|
|
1257
|
+
},
|
|
1258
|
+
align: "horizontal",
|
|
1259
|
+
selected: this.state.showColumnArr ? this.state.showColumnArr : []
|
|
1260
|
+
}, this.columns ? this.columns.map(function (item) {
|
|
1261
|
+
return /*#__PURE__*/_react["default"].createElement(_checkbox["default"], {
|
|
1262
|
+
theme: _this4.props.theme,
|
|
1263
|
+
value: item.field
|
|
1264
|
+
}, item.title);
|
|
1265
|
+
}) : null)))))))), rows.length && this.state.showColumnArr[0] === 'rowChecked' && this.props.selectAllRows && !tableLoading ? /*#__PURE__*/_react["default"].createElement(SelectAllButton, {
|
|
1266
|
+
theme: this.props.theme,
|
|
1267
|
+
isActive: !this.state.isAllRowsSelected,
|
|
1268
|
+
onClick: function onClick(e) {
|
|
1269
|
+
_this4.execute(!_this4.state.isAllRowsSelected);
|
|
1270
|
+
}
|
|
1271
|
+
}, /*#__PURE__*/_react["default"].createElement("input", {
|
|
1272
|
+
className: "input-select-all-button",
|
|
1273
|
+
type: "checkbox"
|
|
1274
|
+
}), /*#__PURE__*/_react["default"].createElement("label", {
|
|
1275
|
+
className: "label-select-all-button"
|
|
1276
|
+
}, /*#__PURE__*/_react["default"].createElement("span", {
|
|
1277
|
+
className: "span-select-all-button"
|
|
1278
|
+
}))) : null, /*#__PURE__*/_react["default"].createElement(Table.Card, (0, _extends2["default"])({
|
|
1279
|
+
theme: this.props.theme,
|
|
1280
|
+
className: "table-card"
|
|
1281
|
+
}, this.props, {
|
|
1282
|
+
width: "100%",
|
|
1283
|
+
radius: 2
|
|
1284
|
+
}), this.state.commonActionsSelected.length > 0 ? /*#__PURE__*/_react["default"].createElement(_react["default"].Fragment, null, /*#__PURE__*/_react["default"].createElement(Table.SelectedAction, {
|
|
1285
|
+
theme: this.props.theme,
|
|
1286
|
+
className: this.state.selectedRows.length > 0 && this.state.commonActionsSelected.length > 0 ? 'selectedAction show' : 'selectedAction'
|
|
1287
|
+
}, /*#__PURE__*/_react["default"].createElement("div", {
|
|
1288
|
+
className: "action-icons-common"
|
|
1289
|
+
}, this.state.commonActionsSelected.map(function (item, idx) {
|
|
1290
|
+
return item !== 'play' ? /*#__PURE__*/_react["default"].createElement(_button["default"], {
|
|
1291
|
+
theme: _this4.props.theme,
|
|
1292
|
+
className: 'action-button ' + (item === 'play' ? 'play' : 'default'),
|
|
1293
|
+
key: idx,
|
|
1294
|
+
onClick: function onClick(e) {
|
|
1295
|
+
if (_this4.props.commonActionClickHandler) {
|
|
1296
|
+
items.map(function (ele) {
|
|
1297
|
+
return ele.rowChecked = false;
|
|
1298
|
+
});
|
|
1299
|
+
_this4.setState({
|
|
1300
|
+
ingestedDbIdArray: [],
|
|
1301
|
+
isAllRowsSelected: false,
|
|
1302
|
+
commonActionsSelected: [],
|
|
1303
|
+
selectedRows: []
|
|
1304
|
+
});
|
|
1305
|
+
_this4.props.commonActionClickHandler(item, e, _this4.state.ingestedDbIdArray, 'common-action');
|
|
1306
|
+
} else {
|
|
1307
|
+
console.log("pass func as props named 'commonActionClickHandler'... receive args as actionItem name and event obj. ");
|
|
1555
1308
|
}
|
|
1556
1309
|
},
|
|
1557
|
-
|
|
1558
|
-
|
|
1559
|
-
|
|
1560
|
-
|
|
1561
|
-
|
|
1562
|
-
|
|
1563
|
-
|
|
1564
|
-
|
|
1565
|
-
|
|
1566
|
-
|
|
1567
|
-
|
|
1568
|
-
|
|
1569
|
-
|
|
1570
|
-
|
|
1571
|
-
|
|
1572
|
-
}),
|
|
1573
|
-
this.state.commonActionsSelected.length > 0 ? _react2.default.createElement(
|
|
1574
|
-
_react2.default.Fragment,
|
|
1575
|
-
null,
|
|
1576
|
-
_react2.default.createElement(
|
|
1577
|
-
Table.SelectedAction,
|
|
1578
|
-
{
|
|
1579
|
-
theme: this.props.theme,
|
|
1580
|
-
className: this.state.selectedRows.length > 0 && this.state.commonActionsSelected.length > 0 ? 'selectedAction show' : 'selectedAction'
|
|
1581
|
-
},
|
|
1582
|
-
_react2.default.createElement(
|
|
1583
|
-
'div',
|
|
1584
|
-
{ className: 'action-icons-common' },
|
|
1585
|
-
this.state.commonActionsSelected.map(function (item, idx) {
|
|
1586
|
-
return item !== 'play' ? _react2.default.createElement(_button2.default, {
|
|
1587
|
-
theme: _this4.props.theme,
|
|
1588
|
-
className: 'action-button ' + (item === 'play' ? 'play' : 'default'),
|
|
1589
|
-
key: idx,
|
|
1590
|
-
onClick: function onClick(e) {
|
|
1591
|
-
if (_this4.props.commonActionClickHandler) {
|
|
1592
|
-
items.map(function (ele) {
|
|
1593
|
-
return ele.rowChecked = false;
|
|
1594
|
-
});
|
|
1595
|
-
_this4.setState({
|
|
1596
|
-
ingestedDbIdArray: [],
|
|
1597
|
-
isAllRowsSelected: false,
|
|
1598
|
-
commonActionsSelected: [],
|
|
1599
|
-
selectedRows: []
|
|
1600
|
-
});
|
|
1601
|
-
|
|
1602
|
-
_this4.props.commonActionClickHandler(item, e, _this4.state.ingestedDbIdArray, 'common-action');
|
|
1603
|
-
} else {
|
|
1604
|
-
console.log("pass func as props named 'commonActionClickHandler'... receive args as actionItem name and event obj. ");
|
|
1605
|
-
}
|
|
1606
|
-
},
|
|
1607
|
-
display: 'rounded',
|
|
1608
|
-
appearance: 'primary',
|
|
1609
|
-
icon: _permissionIconMap2.default[item],
|
|
1610
|
-
iconWidth: 10,
|
|
1611
|
-
iconHeight: 10,
|
|
1612
|
-
label: _this4.props.actionLable && _this4.props.actionLable[item] ? _this4.props.actionLable[item] : item,
|
|
1613
|
-
width: 24,
|
|
1614
|
-
height: 24
|
|
1615
|
-
}) : null;
|
|
1616
|
-
})
|
|
1617
|
-
)
|
|
1618
|
-
)
|
|
1619
|
-
) : null,
|
|
1620
|
-
rows.length ? _react2.default.createElement(
|
|
1621
|
-
Table.Element,
|
|
1622
|
-
this.props,
|
|
1623
|
-
_react2.default.createElement(Table.Header, {
|
|
1624
|
-
theme: this.props.theme,
|
|
1625
|
-
columns: this.defaultShowColumns,
|
|
1626
|
-
selectedColumns: !tableLoading || tableLoading && tableLoadingAction ? this.state.showColumnArr : [],
|
|
1627
|
-
onSort: this.props.onSort
|
|
1628
|
-
}),
|
|
1629
|
-
_react2.default.createElement(
|
|
1630
|
-
Table.Body,
|
|
1631
|
-
null,
|
|
1632
|
-
rows
|
|
1633
|
-
)
|
|
1634
|
-
) : _react2.default.createElement(
|
|
1635
|
-
_react2.default.Fragment,
|
|
1636
|
-
null,
|
|
1637
|
-
this.returnTableStatus()
|
|
1638
|
-
)
|
|
1639
|
-
)
|
|
1640
|
-
);
|
|
1310
|
+
display: "rounded",
|
|
1311
|
+
appearance: "primary",
|
|
1312
|
+
icon: _permissionIconMap["default"][item],
|
|
1313
|
+
iconWidth: 10,
|
|
1314
|
+
iconHeight: 10,
|
|
1315
|
+
label: _this4.props.actionLable && _this4.props.actionLable[item] ? _this4.props.actionLable[item] : item,
|
|
1316
|
+
width: 24,
|
|
1317
|
+
height: 24
|
|
1318
|
+
}) : null;
|
|
1319
|
+
})))) : null, rows.length ? /*#__PURE__*/_react["default"].createElement(Table.Element, this.props, /*#__PURE__*/_react["default"].createElement(Table.Header, {
|
|
1320
|
+
theme: this.props.theme,
|
|
1321
|
+
columns: this.defaultShowColumns,
|
|
1322
|
+
selectedColumns: !tableLoading || tableLoading && tableLoadingAction ? this.state.showColumnArr : [],
|
|
1323
|
+
onSort: this.props.onSort
|
|
1324
|
+
}), /*#__PURE__*/_react["default"].createElement(Table.Body, null, rows)) : /*#__PURE__*/_react["default"].createElement(_react["default"].Fragment, null, this.returnTableStatus())));
|
|
1641
1325
|
}
|
|
1642
1326
|
}]);
|
|
1643
|
-
|
|
1644
|
-
return Table;
|
|
1645
1327
|
}(_react.Component);
|
|
1646
|
-
|
|
1647
|
-
Table.
|
|
1648
|
-
|
|
1649
|
-
|
|
1650
|
-
|
|
1651
|
-
|
|
1652
|
-
var AvatarBox = _styledComponents2.default.div(_templateObject2);
|
|
1653
|
-
Table.SelectedAction = _styledComponents2.default.div(_templateObject3, function (props) {
|
|
1328
|
+
Table.Header = _tableHeader["default"];
|
|
1329
|
+
Table.Column = _tableColumn["default"];
|
|
1330
|
+
var SearchContainer = _styledComponents["default"].div(_templateObject || (_templateObject = (0, _taggedTemplateLiteral2["default"])(["\n border-bottom: 1px solid #303f51;\n display: flex;\n align-items: center;\n input:focus {\n outline: none;\n }\n .search-icon-wrapper {\n padding-right: 10px;\n }\n .input-field {\n border: none;\n color: #999999;\n min-width: 300px;\n margin-top: 0px;\n }\n .close-icon-wrapper {\n cursor: pointer;\n &:hover {\n path {\n fill: white;\n }\n }\n }\n"])));
|
|
1331
|
+
var AvatarBox = _styledComponents["default"].div(_templateObject2 || (_templateObject2 = (0, _taggedTemplateLiteral2["default"])(["\n & .avatar-details {\n display: none;\n }\n\n .initial-placeholder {\n background: #78909c;\n width: 24px;\n height: 24px;\n text-align: center;\n border-radius: 100%;\n font-size: 12px;\n color: #fff;\n }\n"])));
|
|
1332
|
+
Table.SelectedAction = _styledComponents["default"].div(_templateObject3 || (_templateObject3 = (0, _taggedTemplateLiteral2["default"])(["\n\n position: absolute;\n top: 0;\n left: 55px;\n width: 0px;\n overflow: hidden;\n transition: all 0.4s ease;\n height: 38px;\n background: ", ";//#ccc;\n display: flex;\n align-items: center;\n &.show{\n width: 146px;\n overflow: visible;\n }\n\n div.action-icons-common{\n white-space: nowrap;\n &>button{\n margin-right: 15px;\n display: inline-flex;\n }\n &>button:last-child{\n margin-right: 0px;\n }\n\n .tooltip-container{\n display: inline-block;\n margin: 0px 5px;\n }\n\n .action-button{\n // padding: 0px;\n // border-radius: 50%;\n // -webkit-appearance: none;\n // cursor:pointer;\n // align-items: center;\n // justify-content: center;\n // height: 25px;\n // width: 25px;\n\n &.default{\n //background: #666666;\n //border:1px solid #666666;\n &:hover{\n //background: #8e8e8e;\n //border:1px solid #8e8e8e;\n }\n }\n &.play{\n background: ", ";\n border:1px solid ", ";\n &:hover{\n background: #39cac2;\n border:1px solid #39cac2;\n }\n }\n }\n\n"])), function (props) {
|
|
1654
1333
|
return _tokens.colors[props.theme].table.background;
|
|
1655
1334
|
}, function (props) {
|
|
1656
1335
|
return _tokens.colors[props.theme].table.otherThemeShade;
|
|
1657
1336
|
}, function (props) {
|
|
1658
1337
|
return _tokens.colors[props.theme].table.otherThemeShade;
|
|
1659
1338
|
});
|
|
1660
|
-
|
|
1661
|
-
Table.Card = (0, _styledComponents2.default)(_card2.default)(_templateObject4, function (props) {
|
|
1339
|
+
Table.Card = (0, _styledComponents["default"])(_card["default"])(_templateObject4 || (_templateObject4 = (0, _taggedTemplateLiteral2["default"])(["\n width: 100%;\n height: 100%;\n // overflow-x: auto;\n // overflow-y: hidden;\n margin: 10px 0;\n /* box-shadow: 0 0 10px 0 rgba(18, 29, 41); */\n box-shadow: 0 12px 24px 0 rgba(0, 0, 0, 0.1);\n position:relative\n\n ", "\n\ninput[type='checkbox']{ height: 0; width: 0; display:none;}\n\ninput[type='checkbox'] + label{\n position: relative;\n display: flex;\n margin:0;\n align-items: center;\n color: #9e9e9e;\n transition: color 250ms cubic-bezier(.4,.0,.23,1);\n}\ninput[type='checkbox'] + label > span{\n display: flex;\n justify-content: center;\n align-items: center;\n width: 20px;\n height: 20px;\n background: transparent;\n border: 1px solid #9E9E9E;\n border-radius: 50%;\n cursor: pointer; \n transition: all 250ms cubic-bezier(.4,.0,.23,1);\n}\n\n\ninput[type='checkbox'] + label:hover > span,\ninput[type='checkbox']:focus + label > span{\n background: rgba(255,255,255,.1);\n}\n\ninput[type='checkbox']:checked + label > span{\n border: 10px solid #49dad0\n animation: shrink-bounce 200ms cubic-bezier(.4,.0,.23,1);\n}\ninput[type='checkbox']:checked + label > span:before{\n content: \"\";\n position: absolute;\n top: 6px;\n left: 4px;\n border-right: 2px solid transparent;\n border-bottom: 2px solid transparent;\n transform: rotate(45deg);\n transform-origin: 0% 100%;\n animation: checkbox-check 125ms 250ms cubic-bezier(.4,.0,.23,1) forwards;\n}\n\n@keyframes shrink-bounce{\n 0%{\n transform: scale(1);\n }\n 33%{ \n transform: scale(.85);\n }\n 100%{\n transform: scale(1); \n }\n}\n@keyframes checkbox-check{\n 0%{\n width: 0;\n height: 0;\n border-color: #FFF;\n transform: translate3d(0,0,0) rotate(45deg);\n }\n 33%{\n width: 4px;\n height: 0;\n transform: translate3d(0,0,0) rotate(45deg);\n }\n 100%{ \n width: 4px;\n height: 9px; \n border-color: #FFF;\n transform: translate3d(0,-.5em,0) rotate(45deg);\n }\n}\n \n"])), function (props) {
|
|
1662
1340
|
// console.log(props.theme);
|
|
1663
1341
|
});
|
|
1664
|
-
Table.Title =
|
|
1342
|
+
Table.Title = _styledComponents["default"].div(_templateObject5 || (_templateObject5 = (0, _taggedTemplateLiteral2["default"])(["\n display: flex;\n align-items: center;\n justify-content: space-between;\n margin-bottom: 20px;\n .table-title {\n font-family: 'SFUIText-Medium';\n font-size: 18px;\n letter-spacing: 0.3px;\n color: ", ";\n }\n .title-right-area {\n display: flex;\n align-items: center;\n & > div {\n margin-left: 10px;\n }\n\n .refresh-section {\n position: relative;\n\n @keyframes glowing {\n 0% {\n box-shadow: 0 2px 8px 4px rgb(0 206 198 / 0%);\n }\n 15% {\n box-shadow: 0 2px 8px 4px rgb(0 206 198 / 54%);\n }\n 30% {\n box-shadow: 0 2px 8px 4px rgb(0 206 198 / 0%);\n }\n 45% {\n box-shadow: 0 2px 8px 4px rgb(0 206 198 / 54%);\n }\n 60% {\n box-shadow: 0 2px 8px 4px rgb(0 206 198 / 0%);\n }\n 75% {\n box-shadow: 0 2px 8px 4px rgb(0 206 198 / 54%);\n }\n 90% {\n box-shadow: 0 2px 8px 4px rgb(0 206 198 / 54%);\n }\n 100% {\n box-shadow: 0 8px 8px 0 rgba(18, 29, 41, 0.2);\n }\n }\n\n .red-dot {\n position: absolute;\n top: 0;\n right 0;\n width: 16px\n height: 16px;\n border-radius: 100%;\n background-color: rgba(255, 108, 86, 0.1);\n &:after {\n content: '';\n position: absolute;\n top: 50%;\n left: 50%;\n width: 6px;\n height: 6px;\n background-color: #FF6C56;\n border-radius: 100%;\n transform: translate(-50%, -50%);\n }\n \n }\n\n .tooltip {\n font-family: 'SFUIText-Regular';\n font-size: 12px;\n top: -38px;\n right: -66px;\n position: absolute;\n display: flex;\n justify-content: center;\n width: 170px;\n background-color: ", ";\n color: #0c141d;\n border-radius: 20px;\n padding: 10px 5px;\n &:after {\n content: '';\n border-top: 6px dashed ", ";\n border-right: 6px solid transparent;\n border-left: 6px solid transparent;\n position: absolute;\n bottom: -6px;\n right: 76px;\n }\n }\n\n .refresh-btn {\n background-color: #121d28;\n border: 1px solid #121d28;\n padding: 7px;\n border-radius: 50%;\n cursor: pointer;\n\n &:hover {\n path {\n fill: #fff;\n }\n }\n \n &.active {\n background-color: ", ";\n border-color: ", ";\n transition: all 0.2s ease-in-out;\n path {\n transition: all 0.2s ease-in-out;\n fill: #fff;\n }\n }\n\n &.active {\n animation: glowing 5000ms infinite;\n }\n\n > button {\n border: none;\n background-color: transparent;\n position: relative;\n path {\n fill: #afb2ba;\n }\n }\n }\n }\n }\n .column-show-holder {\n position: relative;\n text-align: left;\n\n .column-show-icon {\n width: 30px;\n height: 30px;\n background: #121d28;\n border-radius: 50%;\n padding: 7px 7px;\n\n &:hover {\n path {\n fill: #fff;\n transition: all 0.4s ease-out;\n }\n }\n }\n\n .column-show-list-box {\n position: absolute;\n display: none;\n //display:block;\n width: 345px;\n right: 0;\n z-index: 101;\n padding-top: 7px;\n top: 29px;\n\n & > div {\n box-shadow: 0 12px 24px 0 rgba(0, 0, 0, 1);\n }\n\n &:before {\n content: '';\n position: absolute;\n /* left: 42%; */\n /* top: 100%; */\n width: 0;\n height: 0;\n\n border-left: 4px solid transparent;\n border-right: 4px solid transparent;\n border-bottom: 6px solid ", ";\n transform: translate(327px, -6px);\n }\n\n .column-show-info {\n background: #182738;\n color: #afb2ba;\n font-family: 'SFUIText-Regular';\n padding: 15px;\n font-size: 12px;\n border-bottom: solid 1px #303f51;\n line-height: 15px;\n border-top-left-radius: 2px;\n border-top-right-radius: 2px;\n .column-show-info-header {\n font-family: SFUIText-Medium;\n font-size: 14px;\n padding-bottom: 5px;\n }\n }\n\n .column-show-list {\n background: #182738;\n color: #fff;\n padding: 5px;\n border-bottom-left-radius: 2px;\n border-bottom-right-radius: 2px;\n & .label {\n margin-right: 0px;\n\n & > input {\n & ~ span {\n color: #fff;\n background: #303f51;\n &:hover {\n background: #303f51;\n color: ", ";\n }\n }\n\n &:checked ~ span {\n background: ", ";\n &:hover {\n background: ", ";\n color: #fff;\n }\n }\n }\n }\n }\n }\n\n &:hover {\n .column-show-list-box {\n display: block;\n }\n }\n }\n"])), function (props) {
|
|
1665
1343
|
return _tokens.colors[props.theme].table.titleColor;
|
|
1666
1344
|
}, function (props) {
|
|
1667
1345
|
return _tokens.colors[props.theme].table.titleBackgroundColor;
|
|
@@ -1691,20 +1369,16 @@ Table.compare = {
|
|
|
1691
1369
|
return String(row1[column.field]) - String(row2[column.field]);
|
|
1692
1370
|
}
|
|
1693
1371
|
};
|
|
1694
|
-
|
|
1695
|
-
Table.Element = _styledComponents2.default.table(_templateObject6);
|
|
1372
|
+
Table.Element = _styledComponents["default"].table(_templateObject6 || (_templateObject6 = (0, _taggedTemplateLiteral2["default"])(["\n width: 100%;\n border-spacing: 0;\n border-collapse: collapse;\n"])));
|
|
1696
1373
|
var TableInner = {};
|
|
1697
|
-
TableInner.Element =
|
|
1698
|
-
|
|
1699
|
-
TableInner.Cell = _styledComponents2.default.td(_templateObject7, function (props) {
|
|
1374
|
+
TableInner.Element = _styledComponents["default"].table(_templateObject7 || (_templateObject7 = (0, _taggedTemplateLiteral2["default"])(["\n width: 100%;\n border-spacing: 0;\n border-collapse: collapse;\n"])));
|
|
1375
|
+
TableInner.Cell = _styledComponents["default"].td(_templateObject8 || (_templateObject8 = (0, _taggedTemplateLiteral2["default"])(["\n font-family: 'SFUIText-Regular';\n font-size: 12px;\n letter-spacing: 0.4px;\n color: ", ";\n padding: 7px 14px;\n border-top: 1px solid ", ";\n text-align: left;\n vertical-align: middle;\n line-height: 2;\n width: auto;\n"])), function (props) {
|
|
1700
1376
|
return _tokens.colors[props.theme].table.InnerTdColor;
|
|
1701
1377
|
}, function (props) {
|
|
1702
1378
|
return _tokens.colors[props.theme].table.border;
|
|
1703
1379
|
});
|
|
1704
|
-
|
|
1705
|
-
Table.
|
|
1706
|
-
|
|
1707
|
-
Table.Row = _styledComponents2.default.tr(_templateObject9, function (props) {
|
|
1380
|
+
Table.Body = _styledComponents["default"].tbody(_templateObject9 || (_templateObject9 = (0, _taggedTemplateLiteral2["default"])([""])));
|
|
1381
|
+
Table.Row = _styledComponents["default"].tr(_templateObject10 || (_templateObject10 = (0, _taggedTemplateLiteral2["default"])(["\n .show-row {\n transform: rotate(-180deg);\n -webkit-transform: rotate(-180deg);\n -moz-transform: rotate(-180deg);\n -ms-transform: rotate(-180deg);\n -o-transform: rotate(-180deg);\n }\n .hide-row {\n transform: rotate(0deg);\n -webkit-transform: rotate(0deg);\n -moz-transform: rotate(0deg);\n -ms-transform: rotate(0deg);\n -o-transform: rotate(0deg);\n }\n .show-row,\n .hide-row {\n transition: transform 0.5s ease-in-out;\n -webkit-transition: transform 0.5s ease-in-out;\n -moz-transition: transform 0.5s ease-in-out;\n -ms-transition: transform 0.5s ease-in-out;\n -o-transition: transform 0.5s ease-in-out;\n text-align: right;\n cursor: pointer;\n }\n\n &.selected-row > td,\n &.selected-row:nth-child(even) > td {\n background: ", ";\n }\n\n &:nth-child(even) > td {\n background: ", ";\n }\n\n &:hover {\n .asset-play {\n color: ", ";\n }\n }\n\n ", " {\n margin: 0px;\n box-shadow: 0px 0px 0px transparent;\n ", ";\n }\n"])), function (props) {
|
|
1708
1382
|
return _tokens.colors[props.theme].table.rowSelectedBackground;
|
|
1709
1383
|
}, function (props) {
|
|
1710
1384
|
return _tokens.colors[props.theme].table.evenRowBackground;
|
|
@@ -1713,8 +1387,7 @@ Table.Row = _styledComponents2.default.tr(_templateObject9, function (props) {
|
|
|
1713
1387
|
}, Table.Card, function (props) {
|
|
1714
1388
|
if (typeof props.theme === 'string') return 'background:' + _tokens.colors[props.theme].table.innerTableBackground;
|
|
1715
1389
|
});
|
|
1716
|
-
|
|
1717
|
-
Table.Cell = _styledComponents2.default.td(_templateObject10, function (props) {
|
|
1390
|
+
Table.Cell = _styledComponents["default"].td(_templateObject11 || (_templateObject11 = (0, _taggedTemplateLiteral2["default"])(["\n font-family: 'SFUIText-Regular';\n font-size: 12px;\n letter-spacing: 0.4px;\n color: ", "; \n padding: 7px 14px;\n // border-top: 1px solid ", "; \n text-align: left;\n vertical-align: middle;\n line-height: 2;\n width: ", ";\n max-width: ", ";\n\n &.tableHolder{\n padding:0px;\n }\n\n .asset-play {\n cursor: pointer;\n background-color: transparent;\n border: none;\n color: #dddddd;\n &:hover, &:focus {\n outline: none;\n color: ", ";\n text-decoration: underline;\n }\n }\n\n .icon-circle {\n border-radius: 50%;\n width: 24px;\n height: 24px;\n display: flex;\n text-align: center;\n justify-content: center;\n align-items: center;\n i {\n line-height: 0;\n }\n }\n\n // max-width: 0;\n // overflow: hidden;\n // text-overflow: ellipsis;\n // white-space: nowrap;\n\n & > div.text-box {\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n &.text-linkexpired {\n color: #FF6C56;\n }\n }\n & > div.action-icons-cell{\n white-space: nowrap;\n\n .tooltip-block {\n top: -50px;\n }\n \n .action-item-btn {\n padding: 0 15px;\n cursor: pointer;\n background-color: transparent;\n\n &.nested {\n border-bottom: 1px solid #303f51;\n display: flex;\n padding: 10px;\n align-items: center;\n &>div:first-child{\n margin-right:10px;\n }\n &:last-child{\n border-bottom: 0px none;\n }\n }\n\n &:hover {\n transition: color 0.4s ease-out;\n color: ", ";\n path{\n fill: ", ";\n transition: fill 0.4s ease-out;\n }\n }\n }\n\n\n &>button{\n margin-right: 15px;\n display: inline-flex;\n }\n &>button:last-child{\n margin-right: 0px;\n }\n\n .more-action-holder {\n position: relative;\n\n &:hover {\n .more-action-list-box{\n display:block;\n }\n .more-action-icon{\n transition: all 0.4s ease-out;\n background: ", ";\n }\n }\n\n .more-action-icon{\n height: 24px;\n width: 24px;\n background: #303f51;\n border-radius: 50%;\n padding: 0px 10px;\n transform: translate(0px, -1px);\n }\n .more-action-list-box{\n position: absolute;\n z-index:100;\n display:none;\n //display:block;\n padding-top: 11px;\n transform: translate(-136px,-2px);\n \n .more-action-list {\n box-shadow: 0 12px 24px 0 rgba(0, 0, 0, 0.2);\n background: ", ";\n min-width: 200px;\n }\n\n &:before{\n content: '';\n position: absolute;\n /* left: 42%; */\n /* top: 100%; */\n width: 0;\n height: 0;\n \n border-left: 4px solid transparent;\n border-right: 4px solid transparent;\n border-bottom: 6px solid ", ";\n transform: translate(144px,-6px);\n }\n\n }\n\n }\n }\n\n .nested-table {\n background: #182738;\n border-left: 2px solid ", ";\n }\n\n\n"])), function (props) {
|
|
1718
1391
|
return _tokens.colors[props.theme].table.tdColor;
|
|
1719
1392
|
}, function (props) {
|
|
1720
1393
|
return _tokens.colors[props.theme].table.border;
|
|
@@ -1737,13 +1410,11 @@ Table.Cell = _styledComponents2.default.td(_templateObject10, function (props) {
|
|
|
1737
1410
|
}, function (props) {
|
|
1738
1411
|
return _tokens.colors[props.theme].table.CellNestedTableBorderLeft;
|
|
1739
1412
|
});
|
|
1740
|
-
|
|
1741
|
-
var
|
|
1742
|
-
|
|
1743
|
-
var DubbingStatusStyles = _styledComponents2.default.div(_templateObject12, function (props) {
|
|
1413
|
+
var TableTitleLoadingInitial = _styledComponents["default"].div(_templateObject12 || (_templateObject12 = (0, _taggedTemplateLiteral2["default"])(["\n height: 30px;\n position: absolute;\n left: -1px;\n z-index: 2;\n display: flex;\n width: 100%;\n top: -1px;\n"])));
|
|
1414
|
+
var DubbingStatusStyles = _styledComponents["default"].div(_templateObject13 || (_templateObject13 = (0, _taggedTemplateLiteral2["default"])(["\n display: flex;\n align-items: center;\n .detail-block {\n display: flex;\n justify-content: center;\n align-items: center;\n\n &:not(:last-child) {\n margin-right: 7px;\n }\n\n .status-color {\n width: 7px;\n height: 7px;\n margin-right: 6px;\n border-radius: 100%;\n background: rgba(255, 255, 255, 0.3);\n &.approved {\n background: ", ";\n }\n &.rejected {\n background: #ef5350;\n }\n }\n .language-name {\n text-transform: capitalize;\n font-size: 12px;\n font-family: SFUIText-Regular;\n color: #fff;\n }\n }\n"])), function (props) {
|
|
1744
1415
|
return _tokens.colors[props.theme].table.ApprovedBackground;
|
|
1745
1416
|
});
|
|
1746
|
-
var SelectAllButton =
|
|
1417
|
+
var SelectAllButton = _styledComponents["default"].div(_templateObject14 || (_templateObject14 = (0, _taggedTemplateLiteral2["default"])(["\n width: 20px;\n height: 20px;\n background: transparent;\n border: ", ";\n border-radius: 50%;\n cursor: pointer;\n position: absolute;\n left: 14px;\n z-index: 2;\n top: 75px;\n .input-select-all-button {\n height: 0px;\n width: 0px;\n display: none;\n }\n .label-select-all-button {\n position: relative;\n cursor: pointer;\n display: flex;\n margin: 0px;\n height: 20px;\n align-items: center;\n border-radius: 50%;\n background: ", ";\n .span-select-all-button {\n display: ", ";\n position: absolute;\n top: 10px;\n left: 5px;\n border-right: 2px solid transparent;\n border-bottom: 2px solid transparent;\n transform: rotate(45deg);\n transform-origin: 0 100%;\n animation: ", ";\n }\n }\n"])), function (props) {
|
|
1747
1418
|
return props.isActive ? '1px solid #9E9E9E' : '';
|
|
1748
1419
|
}, function (props) {
|
|
1749
1420
|
return !props.isActive ? '#49dad0' : '';
|
|
@@ -1752,22 +1423,20 @@ var SelectAllButton = _styledComponents2.default.div(_templateObject13, function
|
|
|
1752
1423
|
}, function (props) {
|
|
1753
1424
|
return !props.isActive ? 'checkbox-check 125ms 250ms cubic-bezier(.4,.0,.23,1) forwards' : '';
|
|
1754
1425
|
});
|
|
1755
|
-
|
|
1756
1426
|
Table.propTypes = {
|
|
1757
|
-
theme:
|
|
1758
|
-
items:
|
|
1759
|
-
tableTitle:
|
|
1760
|
-
onSort:
|
|
1761
|
-
refreshDashboard:
|
|
1762
|
-
isRefreshActivated:
|
|
1763
|
-
isRefreshDotVisible:
|
|
1764
|
-
getSearchedRows:
|
|
1765
|
-
showSearchBox:
|
|
1766
|
-
handleUserIdFilterChange:
|
|
1767
|
-
userIdsList:
|
|
1768
|
-
pageDropdown:
|
|
1427
|
+
theme: _propTypes["default"].oneOf(['light', 'dark', 'nexc']),
|
|
1428
|
+
items: _propTypes["default"].arrayOf(_propTypes["default"].object).isRequired,
|
|
1429
|
+
tableTitle: _propTypes["default"].string,
|
|
1430
|
+
onSort: _propTypes["default"].func,
|
|
1431
|
+
refreshDashboard: _propTypes["default"].func,
|
|
1432
|
+
isRefreshActivated: _propTypes["default"].bool,
|
|
1433
|
+
isRefreshDotVisible: _propTypes["default"].bool,
|
|
1434
|
+
getSearchedRows: _propTypes["default"].func,
|
|
1435
|
+
showSearchBox: _propTypes["default"].bool,
|
|
1436
|
+
handleUserIdFilterChange: _propTypes["default"].func,
|
|
1437
|
+
userIdsList: _propTypes["default"].instanceOf(Object),
|
|
1438
|
+
pageDropdown: _propTypes["default"].instanceOf(Object)
|
|
1769
1439
|
};
|
|
1770
|
-
|
|
1771
1440
|
Table.defaultProps = {
|
|
1772
1441
|
theme: 'dark',
|
|
1773
1442
|
videoPlayBtn: false,
|
|
@@ -1780,5 +1449,4 @@ Table.defaultProps = {
|
|
|
1780
1449
|
selectable: false,
|
|
1781
1450
|
showTableHeader: true
|
|
1782
1451
|
};
|
|
1783
|
-
|
|
1784
|
-
exports.default = Table;
|
|
1452
|
+
var _default = exports["default"] = Table;
|