@widergy/energy-ui 1.136.0 → 1.136.2
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/dist/components/EnergyThemeProvider/index.js +13 -36
- package/dist/components/Loading/constants.js +1 -2
- package/dist/components/Loading/index.js +13 -12
- package/dist/components/Loading/theme.js +9 -11
- package/dist/components/UTAlert/AlertHandler.js +75 -101
- package/dist/components/UTAlert/index.js +65 -87
- package/dist/components/UTAlert/theme.js +29 -31
- package/dist/components/UTAttachment/components/Preview/index.js +8 -9
- package/dist/components/UTAttachment/constants.js +7 -13
- package/dist/components/UTAttachment/index.js +153 -232
- package/dist/components/UTAttachment/layout.js +25 -26
- package/dist/components/UTAttachment/theme.js +12 -14
- package/dist/components/UTAttachment/utils.js +34 -117
- package/dist/components/UTAutocomplete/components/ListBox/index.js +13 -21
- package/dist/components/UTAutocomplete/components/ListBox/utils.js +9 -11
- package/dist/components/UTAutocomplete/constants.js +12 -23
- package/dist/components/UTAutocomplete/index.js +45 -66
- package/dist/components/UTAutocomplete/theme.js +3 -3
- package/dist/components/UTAvatar/constants.js +2 -3
- package/dist/components/UTAvatar/index.js +15 -12
- package/dist/components/UTBarChart/components/Bars/components/Bar/components/Rect/index.js +22 -22
- package/dist/components/UTBarChart/components/Bars/components/Bar/constants.js +1 -1
- package/dist/components/UTBarChart/components/Bars/components/Bar/index.js +21 -22
- package/dist/components/UTBarChart/components/Bars/constants.js +3 -6
- package/dist/components/UTBarChart/components/Bars/index.js +70 -80
- package/dist/components/UTBarChart/components/Legend/constants.js +12 -18
- package/dist/components/UTBarChart/components/Legend/index.js +73 -91
- package/dist/components/UTBarChart/components/Legend/utils.js +1 -5
- package/dist/components/UTBarChart/components/Levels/index.js +16 -14
- package/dist/components/UTBarChart/components/Levels/utils.js +25 -27
- package/dist/components/UTBarChart/components/LinearPlot/constants.js +3 -5
- package/dist/components/UTBarChart/components/LinearPlot/index.js +25 -20
- package/dist/components/UTBarChart/components/LinearPlot/utils.js +37 -39
- package/dist/components/UTBarChart/components/Pagination/constants.js +1 -2
- package/dist/components/UTBarChart/components/Pagination/index.js +20 -24
- package/dist/components/UTBarChart/components/XAxis/components/AxisElement/index.js +21 -32
- package/dist/components/UTBarChart/components/XAxis/components/Decoration/constants.js +2 -4
- package/dist/components/UTBarChart/components/XAxis/components/Decoration/index.js +20 -19
- package/dist/components/UTBarChart/components/XAxis/constants.js +1 -2
- package/dist/components/UTBarChart/components/XAxis/index.js +54 -65
- package/dist/components/UTBarChart/components/YAxis/AxisElement/index.js +12 -11
- package/dist/components/UTBarChart/components/YAxis/constants.js +1 -2
- package/dist/components/UTBarChart/components/YAxis/index.js +24 -31
- package/dist/components/UTBarChart/components/YAxis/utils.js +4 -6
- package/dist/components/UTBarChart/constants.js +4 -8
- package/dist/components/UTBarChart/hooks/use-dynamic-margins.js +23 -40
- package/dist/components/UTBarChart/index.js +148 -162
- package/dist/components/UTBarChart/theme.js +102 -104
- package/dist/components/UTBarChart/types.js +9 -17
- package/dist/components/UTBarChart/utils.js +107 -111
- package/dist/components/UTBreadcrumbs/constants.js +3 -6
- package/dist/components/UTBreadcrumbs/index.js +79 -106
- package/dist/components/UTBreadcrumbs/theme.js +21 -23
- package/dist/components/UTButton/index.js +48 -71
- package/dist/components/UTButton/theme.js +172 -174
- package/dist/components/UTCBUInput/index.js +36 -40
- package/dist/components/UTCBUInput/theme.js +5 -7
- package/dist/components/UTCaptcha/index.js +19 -45
- package/dist/components/UTCard/components/UTCardFooter/index.js +16 -17
- package/dist/components/UTCard/index.js +87 -122
- package/dist/components/UTCard/theme.js +8 -11
- package/dist/components/UTCard/types.js +2 -3
- package/dist/components/UTCarousel/components/Button/index.js +13 -13
- package/dist/components/UTCarousel/components/Legend/index.js +14 -16
- package/dist/components/UTCarousel/components/Slider/component/Slide/index.js +16 -16
- package/dist/components/UTCarousel/components/Slider/constants.js +5 -10
- package/dist/components/UTCarousel/components/Slider/index.js +181 -252
- package/dist/components/UTCarousel/components/Slider/layout.js +66 -93
- package/dist/components/UTCarousel/index.js +14 -15
- package/dist/components/UTCarousel/theme.js +35 -37
- package/dist/components/UTCheckList/constants.js +1 -2
- package/dist/components/UTCheckList/index.js +72 -91
- package/dist/components/UTCheckList/theme.js +66 -70
- package/dist/components/UTCheckbox/constants.js +3 -6
- package/dist/components/UTCheckbox/index.js +31 -42
- package/dist/components/UTCheckbox/theme.js +49 -53
- package/dist/components/UTConsumptionBar/components/ConsumptionBarIndicator/index.js +9 -9
- package/dist/components/UTConsumptionBar/constants.js +3 -6
- package/dist/components/UTConsumptionBar/index.js +49 -74
- package/dist/components/UTCuit/index.js +109 -133
- package/dist/components/UTCuit/theme.js +47 -49
- package/dist/components/UTDatePicker/components/Day/constants.js +1 -2
- package/dist/components/UTDatePicker/components/Day/index.js +12 -12
- package/dist/components/UTDatePicker/constants.js +20 -31
- package/dist/components/UTDatePicker/index.js +59 -101
- package/dist/components/UTDatePicker/theme.js +173 -177
- package/dist/components/UTDatePicker/types.js +2 -3
- package/dist/components/UTDatePicker/utils.js +2 -6
- package/dist/components/UTDialog/components/ActionButton/index.js +10 -9
- package/dist/components/UTDialog/constants.js +2 -4
- package/dist/components/UTDialog/index.js +39 -38
- package/dist/components/UTDialog/theme.js +93 -95
- package/dist/components/UTDialog/types.js +2 -3
- package/dist/components/UTDotMenu/index.js +33 -57
- package/dist/components/UTEmojiPicker/constants.js +6 -11
- package/dist/components/UTEmojiPicker/index.js +45 -65
- package/dist/components/UTEmojiPicker/theme.js +1 -1
- package/dist/components/UTEmojiPicker/utils.js +21 -51
- package/dist/components/UTExternalLink/index.js +17 -14
- package/dist/components/UTFileInput/constants.js +2 -4
- package/dist/components/UTFileInput/index.js +7 -31
- package/dist/components/UTFileInput/layout.js +67 -96
- package/dist/components/UTIconButton/index.js +49 -72
- package/dist/components/UTIconButton/theme.js +53 -55
- package/dist/components/UTImageRadio/components/ImageRadioCard/index.js +53 -58
- package/dist/components/UTImageRadio/constants.js +3 -6
- package/dist/components/UTImageRadio/index.js +39 -47
- package/dist/components/UTImageRadio/theme.js +8 -11
- package/dist/components/UTImageRadio/types.js +2 -3
- package/dist/components/UTImageRadio/utils.js +2 -6
- package/dist/components/UTLabel/index.js +69 -90
- package/dist/components/UTLabel/theme.js +84 -86
- package/dist/components/UTList/index.js +15 -18
- package/dist/components/UTLoading/index.js +15 -15
- package/dist/components/UTMap/components/GoogleMaps/constants.js +8 -11
- package/dist/components/UTMap/components/GoogleMaps/index.js +63 -91
- package/dist/components/UTMap/components/GoogleMaps/styles.js +2 -3
- package/dist/components/UTMap/constants.js +6 -12
- package/dist/components/UTMap/index.js +163 -198
- package/dist/components/UTMap/types.js +4 -6
- package/dist/components/UTMap/utils.js +29 -46
- package/dist/components/UTMap/withGoogleMapScript.js +12 -17
- package/dist/components/UTMenu/index.js +52 -69
- package/dist/components/UTMenu/theme.js +2 -2
- package/dist/components/UTMenu/utils.js +5 -11
- package/dist/components/UTPagination/theme.js +4 -2
- package/dist/components/UTPanel/index.js +38 -44
- package/dist/components/UTPasswordField/components/PasswordValidations/components/Error/index.js +14 -11
- package/dist/components/UTPasswordField/components/PasswordValidations/components/Validation/index.js +24 -21
- package/dist/components/UTPasswordField/components/PasswordValidations/index.js +63 -50
- package/dist/components/UTPasswordField/components/PasswordWarning/index.js +26 -27
- package/dist/components/UTPasswordField/index.js +26 -23
- package/dist/components/UTPasswordField/theme.js +37 -39
- package/dist/components/UTPhoneInput/constants.js +3 -6
- package/dist/components/UTPhoneInput/index.js +180 -205
- package/dist/components/UTPhoneInput/theme.js +109 -113
- package/dist/components/UTPieChart/components/ArrowLabel/constants.js +4 -8
- package/dist/components/UTPieChart/components/ArrowLabel/index.js +24 -23
- package/dist/components/UTPieChart/components/Legend/contants.js +3 -6
- package/dist/components/UTPieChart/components/Legend/index.js +27 -24
- package/dist/components/UTPieChart/constants.js +13 -26
- package/dist/components/UTPieChart/hooks/use-animated-value/index.js +15 -33
- package/dist/components/UTPieChart/index.js +73 -76
- package/dist/components/UTPieChart/theme.js +23 -25
- package/dist/components/UTPieChart/utils.js +4 -2
- package/dist/components/UTProgressBar/constants.js +2 -4
- package/dist/components/UTProgressBar/index.js +12 -11
- package/dist/components/UTProgressBar/theme.js +25 -27
- package/dist/components/UTProgressBar/types.js +2 -3
- package/dist/components/UTRadioGroup/index.js +45 -71
- package/dist/components/UTRadioGroup/theme.js +82 -86
- package/dist/components/UTRating/components/Circle/index.js +41 -56
- package/dist/components/UTRating/components/Faces/constants.js +2 -4
- package/dist/components/UTRating/components/Faces/index.js +34 -36
- package/dist/components/UTRating/components/Star/index.js +36 -40
- package/dist/components/UTRating/constants.js +4 -8
- package/dist/components/UTRating/index.js +31 -46
- package/dist/components/UTRating/theme.js +77 -79
- package/dist/components/UTRipple/Ripple.js +22 -39
- package/dist/components/UTRipple/index.js +18 -37
- package/dist/components/UTSelect/components/Option/index.js +13 -13
- package/dist/components/UTSelect/constants.js +4 -8
- package/dist/components/UTSelect/index.js +61 -81
- package/dist/components/UTSelect/stylesJS.js +2 -3
- package/dist/components/UTSelect/theme.js +43 -45
- package/dist/components/UTSelect/utils.js +3 -13
- package/dist/components/UTSidebar/components/ListOption/index.js +32 -47
- package/dist/components/UTSidebar/components/LogosContainer/components/DynamicIcon/index.js +8 -8
- package/dist/components/UTSidebar/components/LogosContainer/index.js +14 -14
- package/dist/components/UTSidebar/components/Option/constants.js +2 -3
- package/dist/components/UTSidebar/components/Option/index.js +28 -32
- package/dist/components/UTSidebar/components/Toggler/index.js +11 -11
- package/dist/components/UTSidebar/index.js +42 -53
- package/dist/components/UTSidebar/theme.js +1 -1
- package/dist/components/UTSidebar/types.js +5 -10
- package/dist/components/UTSkeleton/index.js +10 -36
- package/dist/components/UTSwitch/constants.js +3 -6
- package/dist/components/UTSwitch/index.js +42 -57
- package/dist/components/UTSwitch/theme.js +115 -117
- package/dist/components/UTTable/components/ActionIcons/constants.js +1 -2
- package/dist/components/UTTable/components/ActionIcons/index.js +44 -81
- package/dist/components/UTTable/components/Cell/index.js +18 -23
- package/dist/components/UTTable/components/HeaderCell/constants.js +2 -3
- package/dist/components/UTTable/components/HeaderCell/index.js +23 -30
- package/dist/components/UTTable/components/HeaderCell/utils.js +3 -3
- package/dist/components/UTTable/components/PrimaryAction/index.js +12 -11
- package/dist/components/UTTable/components/ResponsiveCell/index.js +19 -20
- package/dist/components/UTTable/components/Status/index.js +18 -19
- package/dist/components/UTTable/components/TableFooter/components/PageSizeSelector/index.js +10 -9
- package/dist/components/UTTable/components/TableFooter/components/PageSizeSelector/utils.js +7 -13
- package/dist/components/UTTable/components/TableFooter/components/Pagination/components/NavigationButton/index.js +12 -12
- package/dist/components/UTTable/components/TableFooter/components/Pagination/index.js +21 -32
- package/dist/components/UTTable/components/TableFooter/components/Pagination/utils.js +8 -14
- package/dist/components/UTTable/components/TableFooter/constants.js +1 -2
- package/dist/components/UTTable/components/TableFooter/index.js +15 -15
- package/dist/components/UTTable/components/TableHeader/index.js +11 -11
- package/dist/components/UTTable/components/TableRow/constants.js +3 -6
- package/dist/components/UTTable/components/TableRow/index.js +79 -94
- package/dist/components/UTTable/constants.js +26 -43
- package/dist/components/UTTable/hook.js +11 -26
- package/dist/components/UTTable/index.js +125 -213
- package/dist/components/UTTable/theme.js +13 -16
- package/dist/components/UTTable/types.js +4 -8
- package/dist/components/UTTable/utils.js +70 -74
- package/dist/components/UTTabs/components/TooltipTab/index.js +20 -30
- package/dist/components/UTTabs/constants.js +4 -8
- package/dist/components/UTTabs/index.js +55 -84
- package/dist/components/UTTabs/theme.js +112 -114
- package/dist/components/UTTabs/utils.js +1 -1
- package/dist/components/UTTextArea/constants.js +4 -6
- package/dist/components/UTTextArea/index.js +40 -24
- package/dist/components/UTTextArea/styles.module.scss +20 -1
- package/dist/components/UTTextArea/theme.js +1 -1
- package/dist/components/UTTextInput/constants.js +2 -3
- package/dist/components/UTTextInput/index.js +116 -146
- package/dist/components/UTTextInput/theme.js +28 -30
- package/dist/components/UTThirdPartyCookieChecker/index.js +17 -21
- package/dist/components/UTToggle/components/ToggleOption/index.js +16 -17
- package/dist/components/UTToggle/index.js +25 -26
- package/dist/components/UTToggle/theme.js +47 -49
- package/dist/components/UTTooltip/index.js +23 -30
- package/dist/components/UTTooltip/theme.js +1 -1
- package/dist/components/UTTopbar/theme.js +4 -2
- package/dist/components/UTTouchableWithoutFeedback/index.js +14 -27
- package/dist/components/UTVirtualizedList/components/VirtualizedData/components/ListRow/constants.js +2 -4
- package/dist/components/UTVirtualizedList/components/VirtualizedData/components/ListRow/index.js +34 -31
- package/dist/components/UTVirtualizedList/components/VirtualizedData/components/ListRow/utils.js +4 -4
- package/dist/components/UTVirtualizedList/components/VirtualizedData/constants.js +6 -12
- package/dist/components/UTVirtualizedList/components/VirtualizedData/hooks/use-ledger.js +8 -18
- package/dist/components/UTVirtualizedList/components/VirtualizedData/hooks/use-virtualized-data.js +23 -47
- package/dist/components/UTVirtualizedList/components/VirtualizedData/index.js +31 -34
- package/dist/components/UTVirtualizedList/components/VirtualizedData/utils.js +81 -93
- package/dist/components/UTVirtualizedList/constants.js +4 -8
- package/dist/components/UTVirtualizedList/index.js +26 -38
- package/dist/components/UTWorkflowContainer/components/ActionButton/index.js +11 -11
- package/dist/components/UTWorkflowContainer/constants.js +5 -9
- package/dist/components/UTWorkflowContainer/hooks/use-previous.js +3 -3
- package/dist/components/UTWorkflowContainer/index.js +31 -50
- package/dist/components/UTWorkflowContainer/theme.js +70 -64
- package/dist/components/UTWorkflowContainer/types.js +2 -3
- package/dist/components/WithLoading/index.js +10 -15
- package/dist/components/WithTheme/index.js +10 -17
- package/dist/components/WithTheme/layout.js +18 -41
- package/dist/components/WithTouch/index.js +12 -19
- package/dist/index.js +54 -54
- package/dist/scss/variables/colors.module.scss +1 -0
- package/dist/theme.js +5 -3
- package/dist/types/commonTypes.js +3 -5
- package/dist/types/consumptionTypes.js +3 -5
- package/dist/types/formTypes.js +4 -7
- package/dist/types/tableTypes.js +2 -3
- package/dist/utils/classesUtils.js +4 -10
- package/dist/utils/componentUtils.js +10 -13
- package/dist/utils/helperFunctions.js +4 -4
- package/dist/utils/useScreenSize.js +2 -3
- package/package.json +1 -1
|
@@ -7,131 +7,129 @@ exports.retrieveStyle = void 0;
|
|
|
7
7
|
var _seamlessImmutable = require("seamless-immutable");
|
|
8
8
|
var _colorsModule = _interopRequireDefault(require("../../scss/variables/colors.module.scss"));
|
|
9
9
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
10
|
+
const retrieveStyle = theme => ({
|
|
11
|
+
outerContainer: {
|
|
12
|
+
alignItems: (0, _seamlessImmutable.getIn)(theme, ['UTSwitch', 'outerContainer', 'alignItems'], 'center'),
|
|
13
|
+
color: (0, _seamlessImmutable.getIn)(theme, ['UTSwitch', 'outerContainer', 'color']),
|
|
14
|
+
columnGap: (0, _seamlessImmutable.getIn)(theme, ['UTSwitch', 'outerContainer', 'columnGap']),
|
|
15
|
+
display: (0, _seamlessImmutable.getIn)(theme, ['UTSwitch', 'outerContainer', 'display'], 'flex')
|
|
16
|
+
},
|
|
17
|
+
container: {
|
|
18
|
+
boxSizing: (0, _seamlessImmutable.getIn)(theme, ['UTSwitch', 'container', 'boxSizing'], 'border-box'),
|
|
19
|
+
cursor: (0, _seamlessImmutable.getIn)(theme, ['UTSwitch', 'container', 'cursor'], 'pointer'),
|
|
20
|
+
height: (0, _seamlessImmutable.getIn)(theme, ['UTSwitch', 'container', 'height'], '26px'),
|
|
21
|
+
position: (0, _seamlessImmutable.getIn)(theme, ['UTSwitch', 'container', 'position'], 'relative'),
|
|
22
|
+
flexShrink: (0, _seamlessImmutable.getIn)(theme, ['UTSwitch', 'container', 'flexShrink'], '0'),
|
|
23
|
+
width: (0, _seamlessImmutable.getIn)(theme, ['UTSwitch', 'container', 'width'], '54px'),
|
|
24
|
+
'&.disabled': {
|
|
25
|
+
cursor: (0, _seamlessImmutable.getIn)(theme, ['UTSwitch', 'container', 'disabled', 'cursor'], 'default')
|
|
17
26
|
},
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
position: (0, _seamlessImmutable.getIn)(theme, ['UTSwitch', 'container', 'position'], 'relative'),
|
|
23
|
-
flexShrink: (0, _seamlessImmutable.getIn)(theme, ['UTSwitch', 'container', 'flexShrink'], '0'),
|
|
24
|
-
width: (0, _seamlessImmutable.getIn)(theme, ['UTSwitch', 'container', 'width'], '54px'),
|
|
25
|
-
'&.disabled': {
|
|
26
|
-
cursor: (0, _seamlessImmutable.getIn)(theme, ['UTSwitch', 'container', 'disabled', 'cursor'], 'default')
|
|
27
|
-
},
|
|
28
|
-
padding: (0, _seamlessImmutable.getIn)(theme, ['UTSwitch', 'container', 'padding']),
|
|
29
|
-
margin: (0, _seamlessImmutable.getIn)(theme, ['UTSwitch', 'container', 'margin']),
|
|
30
|
-
'&:hover > $sliderContainer > $sliderBack': {
|
|
31
|
-
backgroundColor: (0, _seamlessImmutable.getIn)(theme, ['UTSwitch', 'sliderBack', 'hover', 'backgroundColor'], _colorsModule.default.switchGrayHover)
|
|
32
|
-
},
|
|
33
|
-
'&:hover > $sliderContainer > $sliderHover': {
|
|
34
|
-
backgroundColor: (0, _seamlessImmutable.getIn)(theme, ['UTSwitch', 'sliderHover', 'hover', 'backgroundColor'], _colorsModule.default.switchHover)
|
|
35
|
-
},
|
|
36
|
-
'&:hover > $sliderContainer > $slider': {
|
|
37
|
-
backgroundColor: (0, _seamlessImmutable.getIn)(theme, ['UTSwitch', 'slider', 'hover', 'backgroundColor'], (0, _seamlessImmutable.getIn)(['UTSwitch', 'slider', 'backgroundColor'], _colorsModule.default.switchGrayHover))
|
|
38
|
-
},
|
|
39
|
-
'&:Active > $sliderContainer > $sliderHover': {
|
|
40
|
-
backgroundColor: (0, _seamlessImmutable.getIn)(theme, ['UTSwitch', 'sliderHover', 'active', 'backgroundColor'], _colorsModule.default.switchActive)
|
|
41
|
-
}
|
|
27
|
+
padding: (0, _seamlessImmutable.getIn)(theme, ['UTSwitch', 'container', 'padding']),
|
|
28
|
+
margin: (0, _seamlessImmutable.getIn)(theme, ['UTSwitch', 'container', 'margin']),
|
|
29
|
+
'&:hover > $sliderContainer > $sliderBack': {
|
|
30
|
+
backgroundColor: (0, _seamlessImmutable.getIn)(theme, ['UTSwitch', 'sliderBack', 'hover', 'backgroundColor'], _colorsModule.default.switchGrayHover)
|
|
42
31
|
},
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
display: (0, _seamlessImmutable.getIn)(theme, ['UTSwitch', 'textContainer', 'display'], 'flex'),
|
|
46
|
-
height: (0, _seamlessImmutable.getIn)(theme, ['UTSwitch', 'textContainer', 'height'], '100%'),
|
|
47
|
-
width: (0, _seamlessImmutable.getIn)(theme, ['UTSwitch', 'textContainer', 'width'], '100%'),
|
|
48
|
-
position: (0, _seamlessImmutable.getIn)(theme, ['UTSwitch', 'textContainer', 'position'], 'absolute'),
|
|
49
|
-
padding: (0, _seamlessImmutable.getIn)(theme, ['UTSwitch', 'textContainer', 'padding'], '0'),
|
|
50
|
-
justifyContent: (0, _seamlessImmutable.getIn)(theme, ['UTSwitch', 'textContainer', 'justifyContent'], 'space-evenly'),
|
|
51
|
-
alignItems: (0, _seamlessImmutable.getIn)(theme, ['UTSwitch', 'textContainer', 'alignItems'], 'center')
|
|
32
|
+
'&:hover > $sliderContainer > $sliderHover': {
|
|
33
|
+
backgroundColor: (0, _seamlessImmutable.getIn)(theme, ['UTSwitch', 'sliderHover', 'hover', 'backgroundColor'], _colorsModule.default.switchHover)
|
|
52
34
|
},
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
color: (0, _seamlessImmutable.getIn)(theme, ['UTSwitch', 'checkedText', 'color'], _colorsModule.default.white),
|
|
56
|
-
fontSize: (0, _seamlessImmutable.getIn)(theme, ['UTSwitch', 'checkedText', 'fontSize'], (0, _seamlessImmutable.getIn)(theme, ['Fonts', 'small'])),
|
|
57
|
-
fontWeight: (0, _seamlessImmutable.getIn)(theme, ['UTSwitch', 'checkedText', 'fontWeight'], 500)
|
|
35
|
+
'&:hover > $sliderContainer > $slider': {
|
|
36
|
+
backgroundColor: (0, _seamlessImmutable.getIn)(theme, ['UTSwitch', 'slider', 'hover', 'backgroundColor'], (0, _seamlessImmutable.getIn)(['UTSwitch', 'slider', 'backgroundColor'], _colorsModule.default.switchGrayHover))
|
|
58
37
|
},
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
38
|
+
'&:Active > $sliderContainer > $sliderHover': {
|
|
39
|
+
backgroundColor: (0, _seamlessImmutable.getIn)(theme, ['UTSwitch', 'sliderHover', 'active', 'backgroundColor'], _colorsModule.default.switchActive)
|
|
40
|
+
}
|
|
41
|
+
},
|
|
42
|
+
textContainer: {
|
|
43
|
+
boxSizing: (0, _seamlessImmutable.getIn)(theme, ['UTSwitch', 'textContainer', 'boxSizing'], 'border-box'),
|
|
44
|
+
display: (0, _seamlessImmutable.getIn)(theme, ['UTSwitch', 'textContainer', 'display'], 'flex'),
|
|
45
|
+
height: (0, _seamlessImmutable.getIn)(theme, ['UTSwitch', 'textContainer', 'height'], '100%'),
|
|
46
|
+
width: (0, _seamlessImmutable.getIn)(theme, ['UTSwitch', 'textContainer', 'width'], '100%'),
|
|
47
|
+
position: (0, _seamlessImmutable.getIn)(theme, ['UTSwitch', 'textContainer', 'position'], 'absolute'),
|
|
48
|
+
padding: (0, _seamlessImmutable.getIn)(theme, ['UTSwitch', 'textContainer', 'padding'], '0'),
|
|
49
|
+
justifyContent: (0, _seamlessImmutable.getIn)(theme, ['UTSwitch', 'textContainer', 'justifyContent'], 'space-evenly'),
|
|
50
|
+
alignItems: (0, _seamlessImmutable.getIn)(theme, ['UTSwitch', 'textContainer', 'alignItems'], 'center')
|
|
51
|
+
},
|
|
52
|
+
checkedText: {
|
|
53
|
+
opacity: (0, _seamlessImmutable.getIn)(theme, ['UTSwitch', 'checkedText', 'opacity'], '0'),
|
|
54
|
+
color: (0, _seamlessImmutable.getIn)(theme, ['UTSwitch', 'checkedText', 'color'], _colorsModule.default.white),
|
|
55
|
+
fontSize: (0, _seamlessImmutable.getIn)(theme, ['UTSwitch', 'checkedText', 'fontSize'], (0, _seamlessImmutable.getIn)(theme, ['Fonts', 'small'])),
|
|
56
|
+
fontWeight: (0, _seamlessImmutable.getIn)(theme, ['UTSwitch', 'checkedText', 'fontWeight'], 500)
|
|
57
|
+
},
|
|
58
|
+
uncheckedText: {
|
|
59
|
+
transition: (0, _seamlessImmutable.getIn)(theme, ['UTSwitch', 'uncheckedText', 'transition'], 'all 0.3s ease'),
|
|
60
|
+
opacity: (0, _seamlessImmutable.getIn)(theme, ['UTSwitch', 'uncheckedText', 'opacity'], '1'),
|
|
61
|
+
color: (0, _seamlessImmutable.getIn)(theme, ['UTSwitch', 'uncheckedText', 'color'], _colorsModule.default.gray2),
|
|
62
|
+
fontSize: (0, _seamlessImmutable.getIn)(theme, ['UTSwitch', 'uncheckedText', 'fontSize'], (0, _seamlessImmutable.getIn)(theme, ['Fonts', 'small'])),
|
|
63
|
+
fontWeight: (0, _seamlessImmutable.getIn)(theme, ['UTSwitch', 'uncheckedText', 'fontWeight'], 500)
|
|
64
|
+
},
|
|
65
|
+
sliderContainer: {
|
|
66
|
+
height: (0, _seamlessImmutable.getIn)(theme, ['UTSwitch', 'sliderContainer', 'height'], '100%'),
|
|
67
|
+
width: (0, _seamlessImmutable.getIn)(theme, ['UTSwitch', 'sliderContainer', 'width'], '100%'),
|
|
68
|
+
display: (0, _seamlessImmutable.getIn)(theme, ['UTSwitch', 'sliderContainer', 'display'], 'flex'),
|
|
69
|
+
justifyContent: (0, _seamlessImmutable.getIn)(theme, ['UTSwitch', 'sliderContainer', 'justifyContent'], 'center'),
|
|
70
|
+
alignItems: (0, _seamlessImmutable.getIn)(theme, ['UTSwitch', 'sliderContainer', 'alignItems'], 'center')
|
|
71
|
+
},
|
|
72
|
+
disabled: {
|
|
73
|
+
filter: (0, _seamlessImmutable.getIn)(theme, ['UTSwitch', 'disabled', 'filter'], 'grayscale(1) contrast(0.5) brightness(1.2)'),
|
|
74
|
+
pointerEvents: (0, _seamlessImmutable.getIn)(theme, ['UTSwitch', 'disabled', 'pointerEvents'], 'none')
|
|
75
|
+
},
|
|
76
|
+
slider: {
|
|
77
|
+
backgroundColor: (0, _seamlessImmutable.getIn)(theme, ['UTSwitch', 'slider', 'backgroundColor'], _colorsModule.default.switchGray),
|
|
78
|
+
borderRadius: (0, _seamlessImmutable.getIn)(theme, ['UTSwitch', 'slider', 'borderRadius'], '26px'),
|
|
79
|
+
height: (0, _seamlessImmutable.getIn)(theme, ['UTSwitch', 'slider', 'height'], '18px'),
|
|
80
|
+
width: (0, _seamlessImmutable.getIn)(theme, ['UTSwitch', 'slider', 'width'], '18px'),
|
|
81
|
+
marginLeft: (0, _seamlessImmutable.getIn)(theme, ['UTSwitch', 'slider', 'marginLeft'], '-28px'),
|
|
82
|
+
zIndex: (0, _seamlessImmutable.getIn)(theme, ['UTSwitch', 'slider', 'zIndex'], '0'),
|
|
83
|
+
boxShadow: (0, _seamlessImmutable.getIn)(theme, ['UTSwitch', 'slider', 'boxShadow'], 'none'),
|
|
84
|
+
pointerEvents: (0, _seamlessImmutable.getIn)(theme, ['UTSwitch', 'slider', 'pointerEvents'], 'none'),
|
|
85
|
+
transition: (0, _seamlessImmutable.getIn)(theme, ['UTSwitch', 'slider', 'transition'], 'all 0.3s ease-in-out')
|
|
86
|
+
},
|
|
87
|
+
sliderHover: {
|
|
88
|
+
backgroundColor: (0, _seamlessImmutable.getIn)(theme, ['UTSwitch', 'sliderHover', 'backgroundColor'], _colorsModule.default.transparent),
|
|
89
|
+
transition: (0, _seamlessImmutable.getIn)(theme, ['UTSwitch', 'slider', 'transition'], 'all 0.3s ease-in-out'),
|
|
90
|
+
position: (0, _seamlessImmutable.getIn)(theme, ['UTSwitch', 'sliderHover', 'position'], 'absolute'),
|
|
91
|
+
width: (0, _seamlessImmutable.getIn)(theme, ['UTSwitch', 'sliderHover', 'width'], '40px'),
|
|
92
|
+
height: (0, _seamlessImmutable.getIn)(theme, ['UTSwitch', 'sliderHover', 'height'], '40px'),
|
|
93
|
+
marginLeft: (0, _seamlessImmutable.getIn)(theme, ['UTSwitch', 'slider', 'marginLeft'], '-28px'),
|
|
94
|
+
borderRadius: (0, _seamlessImmutable.getIn)(theme, ['UTSwitch', 'sliderHover', 'borderRadius'], '50%')
|
|
95
|
+
},
|
|
96
|
+
sliderBack: {
|
|
97
|
+
backgroundColor: (0, _seamlessImmutable.getIn)(theme, ['UTSwitch', 'sliderBack', 'backgroundColor'], _colorsModule.default.white),
|
|
98
|
+
borderRadius: (0, _seamlessImmutable.getIn)(theme, ['UTSwitch', 'sliderBack', 'borderRadius'], '26px'),
|
|
99
|
+
border: (0, _seamlessImmutable.getIn)(theme, ['UTSwitch', 'sliderBack', 'border'], "1px solid ".concat(_colorsModule.default.switchGray)),
|
|
100
|
+
height: (0, _seamlessImmutable.getIn)(theme, ['UTSwitch', 'sliderBack', 'height'], '100%'),
|
|
101
|
+
width: (0, _seamlessImmutable.getIn)(theme, ['UTSwitch', 'sliderBack', 'width'], '100%'),
|
|
102
|
+
position: (0, _seamlessImmutable.getIn)(theme, ['UTSwitch', 'sliderBack', 'position'], 'absolute'),
|
|
103
|
+
boxShadow: (0, _seamlessImmutable.getIn)(theme, ['UTSwitch', 'sliderBack', 'boxShadow'], 'none'),
|
|
104
|
+
transition: (0, _seamlessImmutable.getIn)(theme, ['UTSwitch', 'sliderBack', 'transition'], 'all 0.3s ease-in-out')
|
|
105
|
+
},
|
|
106
|
+
input: {
|
|
107
|
+
height: (0, _seamlessImmutable.getIn)(theme, ['UTSwitch', 'input', 'height'], '0'),
|
|
108
|
+
opacity: (0, _seamlessImmutable.getIn)(theme, ['UTSwitch', 'input', 'opacity'], '0'),
|
|
109
|
+
width: (0, _seamlessImmutable.getIn)(theme, ['UTSwitch', 'input', 'width'], '0'),
|
|
110
|
+
position: (0, _seamlessImmutable.getIn)(theme, ['UTSwitch', 'input', 'position'], 'absolute'),
|
|
111
|
+
'&:checked ~ $sliderContainer > $sliderBack': {
|
|
112
|
+
backgroundColor: (0, _seamlessImmutable.getIn)(theme, ['UTSwitch', 'sliderBack', 'checkedSlider', 'backgroundColor'], _colorsModule.default.blue),
|
|
113
|
+
border: (0, _seamlessImmutable.getIn)(theme, ['UTSwitch', 'sliderBack', 'checkedSlider', 'border'], "1px solid ".concat(_colorsModule.default.blue))
|
|
72
114
|
},
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
115
|
+
'&:checked ~ $sliderContainer:hover > $sliderBack': {
|
|
116
|
+
backgroundColor: (0, _seamlessImmutable.getIn)(theme, ['UTSwitch', 'sliderBack', 'checkedSlider', 'hover', 'backgroundColor'], _colorsModule.default.darkBlue),
|
|
117
|
+
border: (0, _seamlessImmutable.getIn)(theme, ['UTSwitch', 'sliderBack', 'checkedSlider', 'hover', 'border'])
|
|
76
118
|
},
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
borderRadius: (0, _seamlessImmutable.getIn)(theme, ['UTSwitch', 'slider', 'borderRadius'], '26px'),
|
|
80
|
-
height: (0, _seamlessImmutable.getIn)(theme, ['UTSwitch', 'slider', 'height'], '18px'),
|
|
81
|
-
width: (0, _seamlessImmutable.getIn)(theme, ['UTSwitch', 'slider', 'width'], '18px'),
|
|
82
|
-
marginLeft: (0, _seamlessImmutable.getIn)(theme, ['UTSwitch', 'slider', 'marginLeft'], '-28px'),
|
|
83
|
-
zIndex: (0, _seamlessImmutable.getIn)(theme, ['UTSwitch', 'slider', 'zIndex'], '0'),
|
|
84
|
-
boxShadow: (0, _seamlessImmutable.getIn)(theme, ['UTSwitch', 'slider', 'boxShadow'], 'none'),
|
|
85
|
-
pointerEvents: (0, _seamlessImmutable.getIn)(theme, ['UTSwitch', 'slider', 'pointerEvents'], 'none'),
|
|
86
|
-
transition: (0, _seamlessImmutable.getIn)(theme, ['UTSwitch', 'slider', 'transition'], 'all 0.3s ease-in-out')
|
|
119
|
+
'&:checked ~ $sliderContainer > $sliderHover': {
|
|
120
|
+
transform: (0, _seamlessImmutable.getIn)(theme, ['UTSwitch', 'slider', 'checkedSlider', 'transform'], 'translateX(27px)')
|
|
87
121
|
},
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
position: (0, _seamlessImmutable.getIn)(theme, ['UTSwitch', 'sliderHover', 'position'], 'absolute'),
|
|
92
|
-
width: (0, _seamlessImmutable.getIn)(theme, ['UTSwitch', 'sliderHover', 'width'], '40px'),
|
|
93
|
-
height: (0, _seamlessImmutable.getIn)(theme, ['UTSwitch', 'sliderHover', 'height'], '40px'),
|
|
94
|
-
marginLeft: (0, _seamlessImmutable.getIn)(theme, ['UTSwitch', 'slider', 'marginLeft'], '-28px'),
|
|
95
|
-
borderRadius: (0, _seamlessImmutable.getIn)(theme, ['UTSwitch', 'sliderHover', 'borderRadius'], '50%')
|
|
122
|
+
'&:checked ~ $sliderContainer > $slider': {
|
|
123
|
+
transform: (0, _seamlessImmutable.getIn)(theme, ['UTSwitch', 'slider', 'checkedSlider', 'transform'], 'translateX(27px)'),
|
|
124
|
+
backgroundColor: (0, _seamlessImmutable.getIn)(theme, ['UTSwitch', 'slider', 'checkedSlider', 'backgroundColor'], _colorsModule.default.switchGray)
|
|
96
125
|
},
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
border: (0, _seamlessImmutable.getIn)(theme, ['UTSwitch', 'sliderBack', 'border'], "1px solid ".concat(_colorsModule.default.switchGray)),
|
|
101
|
-
height: (0, _seamlessImmutable.getIn)(theme, ['UTSwitch', 'sliderBack', 'height'], '100%'),
|
|
102
|
-
width: (0, _seamlessImmutable.getIn)(theme, ['UTSwitch', 'sliderBack', 'width'], '100%'),
|
|
103
|
-
position: (0, _seamlessImmutable.getIn)(theme, ['UTSwitch', 'sliderBack', 'position'], 'absolute'),
|
|
104
|
-
boxShadow: (0, _seamlessImmutable.getIn)(theme, ['UTSwitch', 'sliderBack', 'boxShadow'], 'none'),
|
|
105
|
-
transition: (0, _seamlessImmutable.getIn)(theme, ['UTSwitch', 'sliderBack', 'transition'], 'all 0.3s ease-in-out')
|
|
126
|
+
'&:checked ~ $sliderContainer > $textContainer > $checkedText': {
|
|
127
|
+
transition: (0, _seamlessImmutable.getIn)(theme, ['UTSwitch', 'checkedText', 'checked', 'transition'], 'all 0.3s ease'),
|
|
128
|
+
opacity: (0, _seamlessImmutable.getIn)(theme, ['UTSwitch', 'checkedText', 'checked', 'opacity'], '1')
|
|
106
129
|
},
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
opacity: (0, _seamlessImmutable.getIn)(theme, ['UTSwitch', 'input', 'opacity'], '0'),
|
|
110
|
-
width: (0, _seamlessImmutable.getIn)(theme, ['UTSwitch', 'input', 'width'], '0'),
|
|
111
|
-
position: (0, _seamlessImmutable.getIn)(theme, ['UTSwitch', 'input', 'position'], 'absolute'),
|
|
112
|
-
'&:checked ~ $sliderContainer > $sliderBack': {
|
|
113
|
-
backgroundColor: (0, _seamlessImmutable.getIn)(theme, ['UTSwitch', 'sliderBack', 'checkedSlider', 'backgroundColor'], _colorsModule.default.blue),
|
|
114
|
-
border: (0, _seamlessImmutable.getIn)(theme, ['UTSwitch', 'sliderBack', 'checkedSlider', 'border'], "1px solid ".concat(_colorsModule.default.blue))
|
|
115
|
-
},
|
|
116
|
-
'&:checked ~ $sliderContainer:hover > $sliderBack': {
|
|
117
|
-
backgroundColor: (0, _seamlessImmutable.getIn)(theme, ['UTSwitch', 'sliderBack', 'checkedSlider', 'hover', 'backgroundColor'], _colorsModule.default.darkBlue),
|
|
118
|
-
border: (0, _seamlessImmutable.getIn)(theme, ['UTSwitch', 'sliderBack', 'checkedSlider', 'hover', 'border'])
|
|
119
|
-
},
|
|
120
|
-
'&:checked ~ $sliderContainer > $sliderHover': {
|
|
121
|
-
transform: (0, _seamlessImmutable.getIn)(theme, ['UTSwitch', 'slider', 'checkedSlider', 'transform'], 'translateX(27px)')
|
|
122
|
-
},
|
|
123
|
-
'&:checked ~ $sliderContainer > $slider': {
|
|
124
|
-
transform: (0, _seamlessImmutable.getIn)(theme, ['UTSwitch', 'slider', 'checkedSlider', 'transform'], 'translateX(27px)'),
|
|
125
|
-
backgroundColor: (0, _seamlessImmutable.getIn)(theme, ['UTSwitch', 'slider', 'checkedSlider', 'backgroundColor'], _colorsModule.default.switchGray)
|
|
126
|
-
},
|
|
127
|
-
'&:checked ~ $sliderContainer > $textContainer > $checkedText': {
|
|
128
|
-
transition: (0, _seamlessImmutable.getIn)(theme, ['UTSwitch', 'checkedText', 'checked', 'transition'], 'all 0.3s ease'),
|
|
129
|
-
opacity: (0, _seamlessImmutable.getIn)(theme, ['UTSwitch', 'checkedText', 'checked', 'opacity'], '1')
|
|
130
|
-
},
|
|
131
|
-
'&:checked ~ $sliderContainer > $textContainer > $uncheckedText': {
|
|
132
|
-
opacity: (0, _seamlessImmutable.getIn)(theme, ['UTSwitch', 'uncheckedText', 'checked', 'opacity'], '0')
|
|
133
|
-
}
|
|
130
|
+
'&:checked ~ $sliderContainer > $textContainer > $uncheckedText': {
|
|
131
|
+
opacity: (0, _seamlessImmutable.getIn)(theme, ['UTSwitch', 'uncheckedText', 'checked', 'opacity'], '0')
|
|
134
132
|
}
|
|
135
|
-
}
|
|
136
|
-
};
|
|
133
|
+
}
|
|
134
|
+
});
|
|
137
135
|
exports.retrieveStyle = retrieveStyle;
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
|
-
function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
|
|
4
3
|
Object.defineProperty(exports, "__esModule", {
|
|
5
4
|
value: true
|
|
6
5
|
});
|
|
@@ -15,87 +14,54 @@ var _types = require("../../types");
|
|
|
15
14
|
var _constants = require("./constants");
|
|
16
15
|
var _stylesModule = _interopRequireDefault(require("./styles.module.scss"));
|
|
17
16
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
18
|
-
function _getRequireWildcardCache(
|
|
19
|
-
function _interopRequireWildcard(
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
} : _ref2$isVisible,
|
|
51
|
-
_ref2$tooltipProps = _ref2.tooltipProps,
|
|
52
|
-
tooltipProps = _ref2$tooltipProps === void 0 ? {} : _ref2$tooltipProps,
|
|
53
|
-
_ref2$isDisabled = _ref2.isDisabled,
|
|
54
|
-
isDisabled = _ref2$isDisabled === void 0 ? function () {
|
|
55
|
-
return false;
|
|
56
|
-
} : _ref2$isDisabled,
|
|
57
|
-
_ref2$isLoading = _ref2.isLoading,
|
|
58
|
-
isLoading = _ref2$isLoading === void 0 ? function () {
|
|
59
|
-
return false;
|
|
60
|
-
} : _ref2$isLoading,
|
|
61
|
-
_ref2$menuItems = _ref2.menuItems,
|
|
62
|
-
menuItems = _ref2$menuItems === void 0 ? [] : _ref2$menuItems,
|
|
63
|
-
withMenuDivider = _ref2.withMenuDivider;
|
|
64
|
-
var _useState = (0, _react.useState)(),
|
|
65
|
-
_useState2 = _slicedToArray(_useState, 2),
|
|
66
|
-
menuAnchor = _useState2[0],
|
|
67
|
-
setMenuAnchor = _useState2[1];
|
|
68
|
-
var _useState3 = (0, _react.useState)(),
|
|
69
|
-
_useState4 = _slicedToArray(_useState3, 2),
|
|
70
|
-
menuRowContextData = _useState4[0],
|
|
71
|
-
setMenuRowConextData = _useState4[1];
|
|
72
|
-
var openMenu = function openMenu(event) {
|
|
73
|
-
return setMenuAnchor(event.currentTarget);
|
|
74
|
-
};
|
|
75
|
-
var closeMenu = function closeMenu() {
|
|
76
|
-
return setMenuAnchor();
|
|
77
|
-
};
|
|
78
|
-
var handleActionClick = function handleActionClick(event, eventRowData) {
|
|
17
|
+
function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function (e) { return e ? t : r; })(e); }
|
|
18
|
+
function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != typeof e && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && Object.prototype.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; }
|
|
19
|
+
const ActionIcons = _ref => {
|
|
20
|
+
let {
|
|
21
|
+
classes,
|
|
22
|
+
column,
|
|
23
|
+
rowData
|
|
24
|
+
} = _ref;
|
|
25
|
+
return /*#__PURE__*/_react.default.createElement(_react.Fragment, null, column.actions.map(_ref2 => {
|
|
26
|
+
let {
|
|
27
|
+
key,
|
|
28
|
+
Icon,
|
|
29
|
+
tooltip,
|
|
30
|
+
disabledTooltip,
|
|
31
|
+
onClick,
|
|
32
|
+
buttonClassName,
|
|
33
|
+
iconClassName,
|
|
34
|
+
disabledIconClassName,
|
|
35
|
+
loadingClassName,
|
|
36
|
+
loadingSize = _constants.DEAULT_LOADING_SIZE,
|
|
37
|
+
isVisible = () => true,
|
|
38
|
+
tooltipProps = {},
|
|
39
|
+
isDisabled = () => false,
|
|
40
|
+
isLoading = () => false,
|
|
41
|
+
menuItems = [],
|
|
42
|
+
withMenuDivider
|
|
43
|
+
} = _ref2;
|
|
44
|
+
const [menuAnchor, setMenuAnchor] = (0, _react.useState)();
|
|
45
|
+
const [menuRowContextData, setMenuRowConextData] = (0, _react.useState)();
|
|
46
|
+
const openMenu = event => setMenuAnchor(event.currentTarget);
|
|
47
|
+
const closeMenu = () => setMenuAnchor();
|
|
48
|
+
const handleActionClick = (event, eventRowData) => {
|
|
79
49
|
if ((0, _array.isEmpty)(menuItems)) onClick(eventRowData);else {
|
|
80
|
-
setMenuRowConextData(
|
|
50
|
+
setMenuRowConextData({
|
|
51
|
+
...eventRowData,
|
|
81
52
|
clickCallback: closeMenu
|
|
82
|
-
})
|
|
53
|
+
});
|
|
83
54
|
openMenu(event);
|
|
84
55
|
}
|
|
85
56
|
};
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
57
|
+
const visibleMenuItems = menuItems.filter(menuItem => !menuItem.isVisible || menuItem.isVisible(rowData));
|
|
58
|
+
const getDisabledTooltip = () => typeof disabledTooltip === 'function' ? disabledTooltip(rowData) : disabledTooltip;
|
|
59
|
+
const tooltipContent = isDisabled(rowData) && disabledTooltip ? getDisabledTooltip() : tooltip;
|
|
60
|
+
const tippyProps = {
|
|
61
|
+
appendTo: () => document.body,
|
|
62
|
+
interactive: false,
|
|
63
|
+
...tooltipProps
|
|
91
64
|
};
|
|
92
|
-
var tooltipContent = isDisabled(rowData) && disabledTooltip ? getDisabledTooltip() : tooltip;
|
|
93
|
-
var tippyProps = _objectSpread({
|
|
94
|
-
appendTo: function appendTo() {
|
|
95
|
-
return document.body;
|
|
96
|
-
},
|
|
97
|
-
interactive: false
|
|
98
|
-
}, tooltipProps);
|
|
99
65
|
return isVisible(rowData) && /*#__PURE__*/_react.default.createElement(_UTTooltip.default, {
|
|
100
66
|
key: key,
|
|
101
67
|
content: tooltipContent,
|
|
@@ -103,9 +69,7 @@ var ActionIcons = function ActionIcons(_ref) {
|
|
|
103
69
|
tippyProps: tippyProps
|
|
104
70
|
}, /*#__PURE__*/_react.default.createElement("span", null, /*#__PURE__*/_react.default.createElement("div", {
|
|
105
71
|
className: "".concat(_stylesModule.default.iconButton, " ").concat(classes.actionIconButton, " \n ").concat((isDisabled(rowData) || isLoading(rowData)) && _stylesModule.default.disabled, " ").concat(buttonClassName),
|
|
106
|
-
onClick:
|
|
107
|
-
return handleActionClick(event, rowData);
|
|
108
|
-
},
|
|
72
|
+
onClick: event => handleActionClick(event, rowData),
|
|
109
73
|
role: "button"
|
|
110
74
|
}, isLoading(rowData) ? /*#__PURE__*/_react.default.createElement(_CircularProgress.default, {
|
|
111
75
|
className: "".concat(classes.actionLoading, " ").concat(loadingClassName),
|
|
@@ -128,5 +92,4 @@ ActionIcons.propTypes = {
|
|
|
128
92
|
column: _types.columnType,
|
|
129
93
|
rowData: _propTypes.object
|
|
130
94
|
};
|
|
131
|
-
var _default = /*#__PURE__*/(0, _react.memo)(ActionIcons);
|
|
132
|
-
exports.default = _default;
|
|
95
|
+
var _default = exports.default = /*#__PURE__*/(0, _react.memo)(ActionIcons);
|
|
@@ -12,29 +12,25 @@ var _ActionIcons = _interopRequireDefault(require("../ActionIcons"));
|
|
|
12
12
|
var _Status = _interopRequireDefault(require("../Status"));
|
|
13
13
|
var _stylesModule = _interopRequireDefault(require("./styles.module.scss"));
|
|
14
14
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
15
|
-
function _getRequireWildcardCache(
|
|
16
|
-
function _interopRequireWildcard(
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
columnSizes = _ref.columnSizes,
|
|
29
|
-
rowData = _ref.rowData,
|
|
30
|
-
style = _ref.style,
|
|
31
|
-
defaultNullValue = _ref.defaultNullValue;
|
|
32
|
-
var cellAlignStyles = column.type === _constants.CELL_TYPES.ACTION_ICONS ? _stylesModule.default.centerAlign : _stylesModule.default["".concat(align, "Align")];
|
|
15
|
+
function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function (e) { return e ? t : r; })(e); }
|
|
16
|
+
function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != typeof e && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && Object.prototype.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; }
|
|
17
|
+
const Cell = _ref => {
|
|
18
|
+
let {
|
|
19
|
+
align = _constants.COLUMN_POSITION.LEFT,
|
|
20
|
+
classes,
|
|
21
|
+
column,
|
|
22
|
+
columnSizes,
|
|
23
|
+
rowData,
|
|
24
|
+
style,
|
|
25
|
+
defaultNullValue
|
|
26
|
+
} = _ref;
|
|
27
|
+
const cellAlignStyles = column.type === _constants.CELL_TYPES.ACTION_ICONS ? _stylesModule.default.centerAlign : _stylesModule.default["".concat(align, "Align")];
|
|
33
28
|
return /*#__PURE__*/_react.default.createElement("div", {
|
|
34
29
|
className: " ".concat(_stylesModule.default.rowElement, " ").concat(cellAlignStyles, " ").concat(classes.rowCell),
|
|
35
|
-
style:
|
|
36
|
-
width: columnSizes[column.key]
|
|
37
|
-
|
|
30
|
+
style: {
|
|
31
|
+
width: columnSizes[column.key],
|
|
32
|
+
...style
|
|
33
|
+
}
|
|
38
34
|
}, column.cellRenderer ? column.cellRenderer(rowData[column.key], rowData) : column.type === _constants.CELL_TYPES.ACTION_ICONS ? /*#__PURE__*/_react.default.createElement(_ActionIcons.default, {
|
|
39
35
|
column: column,
|
|
40
36
|
rowData: rowData,
|
|
@@ -55,5 +51,4 @@ Cell.propTypes = {
|
|
|
55
51
|
style: _propTypes.object,
|
|
56
52
|
defaultNullValue: _propTypes.string
|
|
57
53
|
};
|
|
58
|
-
var _default = /*#__PURE__*/(0, _react.memo)(Cell);
|
|
59
|
-
exports.default = _default;
|
|
54
|
+
var _default = exports.default = /*#__PURE__*/(0, _react.memo)(Cell);
|
|
@@ -4,8 +4,7 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
6
|
exports.ORDER_DIRECTION = void 0;
|
|
7
|
-
|
|
7
|
+
const ORDER_DIRECTION = exports.ORDER_DIRECTION = {
|
|
8
8
|
ASC: 'asc',
|
|
9
9
|
DESC: 'desc'
|
|
10
|
-
};
|
|
11
|
-
exports.ORDER_DIRECTION = ORDER_DIRECTION;
|
|
10
|
+
};
|
|
@@ -15,37 +15,31 @@ var _utils = require("./utils");
|
|
|
15
15
|
var _constants2 = require("./constants");
|
|
16
16
|
var _stylesModule = _interopRequireDefault(require("./styles.module.scss"));
|
|
17
17
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
18
|
-
function _getRequireWildcardCache(
|
|
19
|
-
function _interopRequireWildcard(
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
var handleClick = function handleClick() {
|
|
37
|
-
return handleOrder((0, _utils.getNewOrder)(order, column));
|
|
38
|
-
};
|
|
39
|
-
var OrderICon = order.key !== column.key ? _UnfoldMore.default : _ArrowUpward.default;
|
|
40
|
-
var cellAlignStyles = column.type === _constants.CELL_TYPES.ACTION_ICONS ? _stylesModule.default.centerAlign : _stylesModule.default["".concat(align, "Align")];
|
|
41
|
-
var activeCell = order.key === column.key;
|
|
42
|
-
var isSortable = column.sortable && !_constants.CELL_ACTION_TYPES.includes(column.type);
|
|
18
|
+
function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function (e) { return e ? t : r; })(e); }
|
|
19
|
+
function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != typeof e && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && Object.prototype.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; }
|
|
20
|
+
const HeaderCell = _ref => {
|
|
21
|
+
let {
|
|
22
|
+
align = _constants.COLUMN_POSITION.LEFT,
|
|
23
|
+
classes,
|
|
24
|
+
column,
|
|
25
|
+
columnSizes,
|
|
26
|
+
handleOrder,
|
|
27
|
+
order,
|
|
28
|
+
removeDefaultOrderIcon,
|
|
29
|
+
style
|
|
30
|
+
} = _ref;
|
|
31
|
+
const handleClick = () => handleOrder((0, _utils.getNewOrder)(order, column));
|
|
32
|
+
const OrderICon = order.key !== column.key ? _UnfoldMore.default : _ArrowUpward.default;
|
|
33
|
+
const cellAlignStyles = column.type === _constants.CELL_TYPES.ACTION_ICONS ? _stylesModule.default.centerAlign : _stylesModule.default["".concat(align, "Align")];
|
|
34
|
+
const activeCell = order.key === column.key;
|
|
35
|
+
const isSortable = column.sortable && !_constants.CELL_ACTION_TYPES.includes(column.type);
|
|
43
36
|
return /*#__PURE__*/_react.default.createElement(_UTTouchableWithoutFeedback.default, {
|
|
44
37
|
onClick: isSortable ? handleClick : null,
|
|
45
38
|
className: "\n ".concat(_stylesModule.default.rowElement, "\n ").concat(isSortable ? classes.headerCellHover : _stylesModule.default.disableClick, "\n ").concat(cellAlignStyles, "\n ").concat(classes.headerCell, "\n ").concat(activeCell ? classes.headerActiveCell : classes.headerInactiveCell, "\n "),
|
|
46
|
-
style:
|
|
47
|
-
width: columnSizes[column.key]
|
|
48
|
-
|
|
39
|
+
style: {
|
|
40
|
+
width: columnSizes[column.key],
|
|
41
|
+
...style
|
|
42
|
+
}
|
|
49
43
|
}, /*#__PURE__*/_react.default.createElement("div", null, column.categoryName && /*#__PURE__*/_react.default.createElement("div", {
|
|
50
44
|
className: "".concat(_stylesModule.default.headerCellCategoryName, " ").concat(classes.headerCellCategoryName)
|
|
51
45
|
}, column.categoryName), /*#__PURE__*/_react.default.createElement("span", {
|
|
@@ -69,5 +63,4 @@ HeaderCell.propTypes = {
|
|
|
69
63
|
removeDefaultOrderIcon: _propTypes.bool,
|
|
70
64
|
style: _propTypes.object
|
|
71
65
|
};
|
|
72
|
-
var _default = /*#__PURE__*/(0, _react.memo)(HeaderCell);
|
|
73
|
-
exports.default = _default;
|
|
66
|
+
var _default = exports.default = /*#__PURE__*/(0, _react.memo)(HeaderCell);
|
|
@@ -5,11 +5,11 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
5
5
|
});
|
|
6
6
|
exports.getNewOrder = void 0;
|
|
7
7
|
var _constants = require("./constants");
|
|
8
|
-
|
|
8
|
+
const getNewOrder = (order, column) => {
|
|
9
9
|
if (order.key === column.key && order.direction === _constants.ORDER_DIRECTION.DESC) return {};
|
|
10
|
-
|
|
10
|
+
const direction = order.key === column.key && order.direction === _constants.ORDER_DIRECTION.ASC ? _constants.ORDER_DIRECTION.DESC : _constants.ORDER_DIRECTION.ASC;
|
|
11
11
|
return {
|
|
12
|
-
direction
|
|
12
|
+
direction,
|
|
13
13
|
key: column.key
|
|
14
14
|
};
|
|
15
15
|
};
|