@widergy/energy-ui 2.12.1 → 2.12.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 +36 -13
- package/dist/components/Loading/constants.js +2 -1
- package/dist/components/Loading/index.js +12 -13
- package/dist/components/Loading/theme.js +2 -4
- package/dist/components/UTAlert/AlertHandler.js +101 -75
- package/dist/components/UTAlert/index.js +87 -65
- package/dist/components/UTAlert/theme.js +32 -32
- package/dist/components/UTAttachment/components/Preview/index.js +9 -8
- package/dist/components/UTAttachment/constants.js +13 -7
- package/dist/components/UTAttachment/index.js +250 -159
- package/dist/components/UTAttachment/layout.js +27 -26
- package/dist/components/UTAttachment/theme.js +2 -4
- package/dist/components/UTAttachment/utils.js +117 -34
- package/dist/components/UTAutocomplete/components/ListBox/index.js +21 -13
- package/dist/components/UTAutocomplete/components/ListBox/utils.js +11 -9
- package/dist/components/UTAutocomplete/constants.js +23 -12
- package/dist/components/UTAutocomplete/index.js +94 -54
- package/dist/components/UTAutocomplete/theme.js +4 -6
- package/dist/components/UTAvatar/constants.js +3 -2
- package/dist/components/UTAvatar/index.js +17 -18
- 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 +22 -21
- package/dist/components/UTBarChart/components/Bars/constants.js +6 -3
- package/dist/components/UTBarChart/components/Bars/index.js +80 -70
- package/dist/components/UTBarChart/components/Legend/constants.js +18 -12
- package/dist/components/UTBarChart/components/Legend/index.js +93 -75
- package/dist/components/UTBarChart/components/Legend/utils.js +5 -1
- package/dist/components/UTBarChart/components/Levels/index.js +14 -16
- package/dist/components/UTBarChart/components/Levels/utils.js +27 -25
- package/dist/components/UTBarChart/components/LinearPlot/constants.js +5 -3
- package/dist/components/UTBarChart/components/LinearPlot/index.js +20 -25
- package/dist/components/UTBarChart/components/LinearPlot/utils.js +39 -37
- package/dist/components/UTBarChart/components/Pagination/constants.js +2 -1
- package/dist/components/UTBarChart/components/Pagination/index.js +24 -20
- package/dist/components/UTBarChart/components/XAxis/components/AxisElement/index.js +32 -21
- package/dist/components/UTBarChart/components/XAxis/components/Decoration/constants.js +4 -2
- package/dist/components/UTBarChart/components/XAxis/components/Decoration/index.js +19 -20
- package/dist/components/UTBarChart/components/XAxis/constants.js +2 -1
- package/dist/components/UTBarChart/components/XAxis/index.js +65 -54
- package/dist/components/UTBarChart/components/YAxis/AxisElement/index.js +11 -12
- package/dist/components/UTBarChart/components/YAxis/constants.js +2 -1
- package/dist/components/UTBarChart/components/YAxis/index.js +37 -30
- package/dist/components/UTBarChart/components/YAxis/utils.js +6 -4
- package/dist/components/UTBarChart/constants.js +8 -4
- package/dist/components/UTBarChart/hooks/use-dynamic-margins.js +40 -23
- package/dist/components/UTBarChart/index.js +166 -152
- package/dist/components/UTBarChart/theme.js +2 -4
- package/dist/components/UTBarChart/types.js +19 -10
- package/dist/components/UTBarChart/utils.js +111 -107
- package/dist/components/UTBreadcrumbs/constants.js +31 -23
- package/dist/components/UTBreadcrumbs/index.js +101 -76
- package/dist/components/UTBreadcrumbs/theme.js +2 -4
- package/dist/components/UTButton/constants.js +17 -11
- package/dist/components/UTButton/index.js +31 -28
- package/dist/components/UTButton/theme.js +23 -23
- package/dist/components/UTCBUInput/index.js +40 -36
- package/dist/components/UTCBUInput/theme.js +2 -4
- package/dist/components/UTCaptcha/index.js +45 -19
- package/dist/components/UTCard/components/UTCardFooter/index.js +16 -15
- package/dist/components/UTCard/index.js +120 -85
- package/dist/components/UTCard/theme.js +12 -11
- package/dist/components/UTCard/types.js +3 -2
- package/dist/components/UTCarousel/components/Button/index.js +13 -13
- package/dist/components/UTCarousel/components/Legend/index.js +15 -13
- package/dist/components/UTCarousel/components/Slider/component/Slide/index.js +16 -16
- package/dist/components/UTCarousel/components/Slider/constants.js +10 -5
- package/dist/components/UTCarousel/components/Slider/index.js +273 -204
- package/dist/components/UTCarousel/components/Slider/layout.js +94 -67
- package/dist/components/UTCarousel/index.js +15 -14
- package/dist/components/UTCarousel/theme.js +2 -4
- package/dist/components/UTCheckList/constants.js +2 -1
- package/dist/components/UTCheckList/index.js +93 -72
- package/dist/components/UTCheckList/theme.js +31 -31
- package/dist/components/UTCheckbox/constants.js +6 -3
- package/dist/components/UTCheckbox/index.js +44 -32
- package/dist/components/UTCheckbox/theme.js +35 -35
- package/dist/components/UTConsumptionBar/components/ConsumptionBarIndicator/index.js +9 -9
- package/dist/components/UTConsumptionBar/constants.js +6 -3
- package/dist/components/UTConsumptionBar/index.js +80 -53
- package/dist/components/UTCuit/index.js +133 -109
- package/dist/components/UTCuit/theme.js +53 -51
- package/dist/components/UTDatePicker/components/Day/constants.js +2 -1
- package/dist/components/UTDatePicker/components/Day/index.js +12 -12
- package/dist/components/UTDatePicker/constants.js +31 -20
- package/dist/components/UTDatePicker/index.js +102 -60
- package/dist/components/UTDatePicker/theme.js +3 -5
- package/dist/components/UTDatePicker/types.js +3 -2
- package/dist/components/UTDatePicker/utils.js +6 -2
- package/dist/components/UTDialog/constants.js +4 -2
- package/dist/components/UTDialog/index.js +37 -38
- package/dist/components/UTDialog/theme.js +2 -4
- package/dist/components/UTDialog/types.js +3 -2
- package/dist/components/UTDotMenu/index.js +61 -39
- package/dist/components/UTEmojiPicker/constants.js +11 -6
- package/dist/components/UTEmojiPicker/index.js +65 -45
- package/dist/components/UTEmojiPicker/theme.js +2 -4
- package/dist/components/UTEmojiPicker/utils.js +51 -21
- package/dist/components/UTExternalLink/constants.js +5 -3
- package/dist/components/UTExternalLink/index.js +15 -18
- package/dist/components/UTExternalLink/theme.js +6 -8
- package/dist/components/UTFileInput/constants.js +4 -2
- package/dist/components/UTFileInput/index.js +31 -7
- package/dist/components/UTFileInput/layout.js +97 -68
- package/dist/components/UTIconButton/index.js +72 -49
- package/dist/components/UTIconButton/theme.js +2 -4
- package/dist/components/UTImageRadio/components/ImageRadioCard/index.js +58 -53
- package/dist/components/UTImageRadio/constants.js +6 -3
- package/dist/components/UTImageRadio/index.js +47 -39
- package/dist/components/UTImageRadio/theme.js +12 -11
- package/dist/components/UTImageRadio/types.js +3 -2
- package/dist/components/UTImageRadio/utils.js +6 -2
- package/dist/components/UTLabel/constants.js +20 -14
- package/dist/components/UTLabel/index.js +20 -18
- package/dist/components/UTLabel/theme.js +15 -15
- package/dist/components/UTList/index.js +18 -15
- package/dist/components/UTLoading/index.js +15 -15
- package/dist/components/UTMap/components/GoogleMaps/constants.js +11 -8
- package/dist/components/UTMap/components/GoogleMaps/index.js +91 -63
- package/dist/components/UTMap/components/GoogleMaps/styles.js +3 -2
- package/dist/components/UTMap/constants.js +12 -6
- package/dist/components/UTMap/index.js +198 -163
- package/dist/components/UTMap/types.js +6 -4
- package/dist/components/UTMap/utils.js +46 -29
- package/dist/components/UTMap/withGoogleMapScript.js +22 -18
- package/dist/components/UTMenu/index.js +69 -52
- package/dist/components/UTMenu/theme.js +3 -5
- package/dist/components/UTMenu/utils.js +11 -5
- package/dist/components/UTModal/constants.js +13 -9
- package/dist/components/UTModal/index.js +30 -26
- package/dist/components/UTModal/theme.js +2 -4
- package/dist/components/UTPagination/components/PageSizeSelector/index.js +10 -11
- package/dist/components/UTPagination/components/PageSizeSelector/utils.js +13 -7
- package/dist/components/UTPagination/components/Pagination/components/NavigationButton/index.js +12 -12
- package/dist/components/UTPagination/components/Pagination/index.js +39 -28
- package/dist/components/UTPagination/components/Pagination/utils.js +14 -8
- package/dist/components/UTPagination/constants.js +6 -3
- package/dist/components/UTPagination/index.js +17 -16
- package/dist/components/UTPagination/theme.js +2 -4
- package/dist/components/UTPanel/index.js +44 -38
- package/dist/components/UTPasswordField/components/PasswordValidations/components/Error/index.js +10 -13
- package/dist/components/UTPasswordField/components/PasswordValidations/components/Validation/index.js +19 -22
- package/dist/components/UTPasswordField/components/PasswordValidations/index.js +50 -63
- package/dist/components/UTPasswordField/components/PasswordWarning/index.js +26 -25
- package/dist/components/UTPasswordField/index.js +23 -26
- package/dist/components/UTPasswordField/theme.js +2 -4
- package/dist/components/UTPhoneInput/constants.js +6 -3
- package/dist/components/UTPhoneInput/index.js +205 -180
- package/dist/components/UTPhoneInput/theme.js +77 -77
- package/dist/components/UTPieChart/components/ArrowLabel/constants.js +8 -4
- package/dist/components/UTPieChart/components/ArrowLabel/index.js +23 -24
- package/dist/components/UTPieChart/components/Legend/contants.js +6 -3
- package/dist/components/UTPieChart/components/Legend/index.js +24 -27
- package/dist/components/UTPieChart/constants.js +26 -13
- package/dist/components/UTPieChart/hooks/use-animated-value/index.js +33 -15
- package/dist/components/UTPieChart/index.js +76 -73
- package/dist/components/UTPieChart/theme.js +2 -4
- package/dist/components/UTPieChart/utils.js +2 -4
- package/dist/components/UTProgressBar/constants.js +4 -2
- package/dist/components/UTProgressBar/index.js +17 -15
- package/dist/components/UTProgressBar/theme.js +2 -4
- package/dist/components/UTProgressBar/types.js +3 -2
- package/dist/components/UTRadioGroup/index.js +83 -56
- package/dist/components/UTRadioGroup/theme.js +52 -52
- package/dist/components/UTRating/components/Circle/index.js +56 -41
- package/dist/components/UTRating/components/Faces/constants.js +4 -2
- package/dist/components/UTRating/components/Faces/index.js +36 -34
- package/dist/components/UTRating/components/Star/index.js +40 -36
- package/dist/components/UTRating/constants.js +8 -4
- package/dist/components/UTRating/index.js +46 -31
- package/dist/components/UTRating/theme.js +2 -4
- package/dist/components/UTRipple/Ripple.js +39 -22
- package/dist/components/UTRipple/index.js +37 -18
- package/dist/components/UTSelect/components/Option/index.js +13 -13
- package/dist/components/UTSelect/constants.js +8 -4
- package/dist/components/UTSelect/index.js +85 -63
- package/dist/components/UTSelect/stylesJS.js +3 -2
- package/dist/components/UTSelect/theme.js +4 -6
- package/dist/components/UTSelect/utils.js +13 -3
- package/dist/components/UTSidebar/components/ListOption/index.js +49 -34
- 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 +3 -2
- package/dist/components/UTSidebar/components/Option/index.js +32 -28
- package/dist/components/UTSidebar/components/Toggler/index.js +11 -11
- package/dist/components/UTSidebar/index.js +53 -42
- package/dist/components/UTSidebar/theme.js +2 -4
- package/dist/components/UTSidebar/types.js +10 -5
- package/dist/components/UTSkeleton/index.js +36 -10
- package/dist/components/UTStatus/constants.js +9 -5
- package/dist/components/UTStatus/index.js +15 -16
- package/dist/components/UTStatus/theme.js +49 -66
- package/dist/components/UTSwitch/constants.js +6 -3
- package/dist/components/UTSwitch/index.js +57 -42
- package/dist/components/UTSwitch/theme.js +2 -4
- package/dist/components/UTTable/components/ActionIcons/constants.js +2 -1
- package/dist/components/UTTable/components/ActionIcons/index.js +85 -47
- package/dist/components/UTTable/components/Cell/components/ActionButton/index.js +12 -10
- package/dist/components/UTTable/components/Cell/index.js +23 -18
- package/dist/components/UTTable/components/HeaderCell/constants.js +3 -2
- package/dist/components/UTTable/components/HeaderCell/index.js +30 -23
- package/dist/components/UTTable/components/HeaderCell/utils.js +3 -3
- package/dist/components/UTTable/components/PrimaryAction/index.js +11 -12
- package/dist/components/UTTable/components/ResponsiveCell/index.js +20 -19
- package/dist/components/UTTable/components/Status/index.js +19 -18
- package/dist/components/UTTable/components/TableFooter/components/PageSizeSelector/index.js +9 -10
- package/dist/components/UTTable/components/TableFooter/components/PageSizeSelector/utils.js +13 -7
- package/dist/components/UTTable/components/TableFooter/components/Pagination/components/NavigationButton/index.js +12 -12
- package/dist/components/UTTable/components/TableFooter/components/Pagination/index.js +32 -21
- package/dist/components/UTTable/components/TableFooter/components/Pagination/utils.js +14 -8
- package/dist/components/UTTable/components/TableFooter/constants.js +2 -1
- 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 +6 -3
- package/dist/components/UTTable/components/TableRow/index.js +94 -79
- package/dist/components/UTTable/constants.js +43 -26
- package/dist/components/UTTable/hook.js +26 -11
- package/dist/components/UTTable/index.js +223 -132
- package/dist/components/UTTable/theme.js +17 -17
- package/dist/components/UTTable/types.js +8 -4
- package/dist/components/UTTable/utils.js +74 -70
- package/dist/components/UTTabs/components/TooltipTab/index.js +30 -20
- package/dist/components/UTTabs/constants.js +8 -4
- package/dist/components/UTTabs/index.js +86 -57
- package/dist/components/UTTabs/theme.js +2 -4
- package/dist/components/UTTabs/utils.js +1 -1
- package/dist/components/UTTextArea/constants.js +6 -3
- package/dist/components/UTTextArea/index.js +23 -23
- package/dist/components/UTTextArea/theme.js +2 -4
- package/dist/components/UTTextInput/constants.js +3 -2
- package/dist/components/UTTextInput/index.js +165 -137
- package/dist/components/UTTextInput/theme.js +4 -6
- package/dist/components/UTThirdPartyCookieChecker/index.js +21 -17
- package/dist/components/UTToggle/components/ToggleOption/index.js +17 -16
- package/dist/components/UTToggle/index.js +26 -25
- package/dist/components/UTToggle/theme.js +2 -4
- package/dist/components/UTTooltip/index.js +30 -23
- package/dist/components/UTTooltip/theme.js +2 -4
- package/dist/components/UTTopbar/components/Notifications/index.js +14 -11
- package/dist/components/UTTopbar/components/UserMenu/index.js +15 -15
- package/dist/components/UTTopbar/index.js +31 -28
- package/dist/components/UTTopbar/theme.js +2 -4
- package/dist/components/UTTopbar/types.js +9 -5
- package/dist/components/UTTouchableWithoutFeedback/index.js +27 -14
- package/dist/components/UTVirtualizedList/components/VirtualizedData/components/ListRow/constants.js +4 -2
- package/dist/components/UTVirtualizedList/components/VirtualizedData/components/ListRow/index.js +31 -34
- package/dist/components/UTVirtualizedList/components/VirtualizedData/components/ListRow/utils.js +4 -4
- package/dist/components/UTVirtualizedList/components/VirtualizedData/constants.js +12 -6
- package/dist/components/UTVirtualizedList/components/VirtualizedData/hooks/use-ledger.js +18 -8
- package/dist/components/UTVirtualizedList/components/VirtualizedData/hooks/use-virtualized-data.js +47 -23
- package/dist/components/UTVirtualizedList/components/VirtualizedData/index.js +34 -31
- package/dist/components/UTVirtualizedList/components/VirtualizedData/utils.js +93 -81
- package/dist/components/UTVirtualizedList/constants.js +8 -4
- package/dist/components/UTVirtualizedList/index.js +38 -26
- package/dist/components/UTWorkflowContainer/components/ActionButton/index.js +21 -17
- package/dist/components/UTWorkflowContainer/constants.js +6 -3
- package/dist/components/UTWorkflowContainer/hooks/use-previous.js +3 -3
- package/dist/components/UTWorkflowContainer/index.js +51 -32
- package/dist/components/UTWorkflowContainer/theme.js +53 -60
- package/dist/components/UTWorkflowContainer/types.js +3 -2
- package/dist/components/WithLoading/index.js +15 -10
- package/dist/components/WithTheme/index.js +17 -10
- package/dist/components/WithTheme/layout.js +28 -22
- package/dist/components/WithTouch/index.js +19 -12
- package/dist/constants/UTTable.js +3 -2
- package/dist/index.js +58 -58
- package/dist/theme.js +5 -6
- package/dist/types/commonTypes.js +5 -3
- package/dist/types/consumptionTypes.js +5 -3
- package/dist/types/formTypes.js +7 -4
- package/dist/types/tableTypes.js +3 -2
- package/dist/utils/classesUtils.js +13 -5
- package/dist/utils/componentUtils.js +13 -10
- package/dist/utils/helperFunctions.js +4 -4
- package/dist/utils/shadowUtils.js +11 -13
- package/dist/utils/useScreenSize.js +3 -2
- package/package.json +1 -1
|
@@ -1,5 +1,6 @@
|
|
|
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); }
|
|
3
4
|
Object.defineProperty(exports, "__esModule", {
|
|
4
5
|
value: true
|
|
5
6
|
});
|
|
@@ -12,73 +13,98 @@ var _stylesModule = _interopRequireDefault(require("./styles.module.scss"));
|
|
|
12
13
|
var _Slide = _interopRequireDefault(require("./component/Slide"));
|
|
13
14
|
var _constants = require("./constants");
|
|
14
15
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
15
|
-
function _getRequireWildcardCache(
|
|
16
|
-
function _interopRequireWildcard(
|
|
17
|
-
class
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
const animationTime = timeAnimation === 35 ? 0.035 : 0.4;
|
|
36
|
-
return /*#__PURE__*/_react.default.createElement(_react.Fragment, null, arrow && arrow.position === _constants.INSIDE && /*#__PURE__*/_react.default.createElement(_Button.default, {
|
|
37
|
-
ArrowCustom: arrow.arrowCustomLeft,
|
|
38
|
-
callback: arrow.callbackLeft,
|
|
39
|
-
left: true,
|
|
40
|
-
onPress: handlePrevSlide,
|
|
41
|
-
className: _stylesModule.default.arrowLeft,
|
|
42
|
-
classes: classes
|
|
43
|
-
}), /*#__PURE__*/_react.default.createElement("div", {
|
|
44
|
-
style: {
|
|
45
|
-
transform: "translate3d(".concat(transitionSlide, "px, 0px, 0px)"),
|
|
46
|
-
width: "".concat(containerWidth * slideArray.length, "px"),
|
|
47
|
-
transition: "".concat(shouldAnimate ? "transform ".concat(animationTime, "s linear 0s") : 'none')
|
|
48
|
-
},
|
|
49
|
-
className: "".concat(_stylesModule.default.slideContainer),
|
|
50
|
-
draggable: "false"
|
|
51
|
-
}, slideArray.map((slide, _index) => /*#__PURE__*/_react.default.createElement(_Slide.default, {
|
|
52
|
-
animationTime: animationTime,
|
|
53
|
-
border: withBorder,
|
|
54
|
-
classes: classes,
|
|
55
|
-
currentSlide: index - 1,
|
|
56
|
-
imgSrc: slide.imgSrc,
|
|
57
|
-
key: "slide-".concat(slide.id || slide.imgSrc),
|
|
58
|
-
onClick: slide.onClick,
|
|
59
|
-
position: _index - 1,
|
|
60
|
-
shouldAnimate: shouldAnimate,
|
|
61
|
-
widthContainer: containerWidth
|
|
62
|
-
}))), legend && legend.position === _constants.INSIDE && /*#__PURE__*/_react.default.createElement("div", {
|
|
63
|
-
className: _stylesModule.default.legendContainer
|
|
64
|
-
}, /*#__PURE__*/_react.default.createElement("div", {
|
|
65
|
-
className: _stylesModule.default.legend
|
|
66
|
-
}, slides.map((slide, itemIndex) => /*#__PURE__*/_react.default.createElement(_Legend.default, {
|
|
67
|
-
key: "legend-in-".concat(slide.id || slide.imgSrc),
|
|
68
|
-
classes: classes,
|
|
69
|
-
currentSlide: index === slideArray.length - 1 ? 0 : index === 0 ? 1 : index - 1,
|
|
70
|
-
index: itemIndex,
|
|
71
|
-
LegendCustom: legend.legendCustom,
|
|
72
|
-
onClick: handleLegend
|
|
73
|
-
})))), arrow && arrow.position === _constants.INSIDE && /*#__PURE__*/_react.default.createElement(_Button.default, {
|
|
74
|
-
ArrowCustom: arrow.arrowCustomRight,
|
|
75
|
-
callback: arrow.callbackRight,
|
|
76
|
-
onPress: handleNextSlide,
|
|
77
|
-
className: _stylesModule.default.arrowRight,
|
|
78
|
-
classes: classes
|
|
79
|
-
}));
|
|
16
|
+
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
|
|
17
|
+
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
|
|
18
|
+
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
|
19
|
+
function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, _toPropertyKey(descriptor.key), descriptor); } }
|
|
20
|
+
function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; }
|
|
21
|
+
function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return _typeof(key) === "symbol" ? key : String(key); }
|
|
22
|
+
function _toPrimitive(input, hint) { if (_typeof(input) !== "object" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || "default"); if (_typeof(res) !== "object") return res; throw new TypeError("@@toPrimitive must return a primitive value."); } return (hint === "string" ? String : Number)(input); }
|
|
23
|
+
function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); Object.defineProperty(subClass, "prototype", { writable: false }); if (superClass) _setPrototypeOf(subClass, superClass); }
|
|
24
|
+
function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
|
|
25
|
+
function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }
|
|
26
|
+
function _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === "object" || typeof call === "function")) { return call; } else if (call !== void 0) { throw new TypeError("Derived constructors may only return object or undefined"); } return _assertThisInitialized(self); }
|
|
27
|
+
function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
|
|
28
|
+
function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }
|
|
29
|
+
function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }
|
|
30
|
+
var Slider = /*#__PURE__*/function (_PureComponent) {
|
|
31
|
+
_inherits(Slider, _PureComponent);
|
|
32
|
+
var _super = _createSuper(Slider);
|
|
33
|
+
function Slider() {
|
|
34
|
+
_classCallCheck(this, Slider);
|
|
35
|
+
return _super.apply(this, arguments);
|
|
80
36
|
}
|
|
81
|
-
|
|
37
|
+
_createClass(Slider, [{
|
|
38
|
+
key: "render",
|
|
39
|
+
value: function render() {
|
|
40
|
+
var _this$props = this.props,
|
|
41
|
+
transitionSlide = _this$props.transitionSlide,
|
|
42
|
+
slides = _this$props.slides,
|
|
43
|
+
containerWidth = _this$props.containerWidth,
|
|
44
|
+
slideArray = _this$props.slideArray,
|
|
45
|
+
shouldAnimate = _this$props.shouldAnimate,
|
|
46
|
+
index = _this$props.index,
|
|
47
|
+
withBorder = _this$props.withBorder,
|
|
48
|
+
handleLegend = _this$props.handleLegend,
|
|
49
|
+
handlePrevSlide = _this$props.handlePrevSlide,
|
|
50
|
+
handleNextSlide = _this$props.handleNextSlide,
|
|
51
|
+
timeAnimation = _this$props.timeAnimation,
|
|
52
|
+
arrow = _this$props.arrow,
|
|
53
|
+
legend = _this$props.legend,
|
|
54
|
+
classes = _this$props.classes;
|
|
55
|
+
var animationTime = timeAnimation === 35 ? 0.035 : 0.4;
|
|
56
|
+
return /*#__PURE__*/_react.default.createElement(_react.Fragment, null, arrow && arrow.position === _constants.INSIDE && /*#__PURE__*/_react.default.createElement(_Button.default, {
|
|
57
|
+
ArrowCustom: arrow.arrowCustomLeft,
|
|
58
|
+
callback: arrow.callbackLeft,
|
|
59
|
+
left: true,
|
|
60
|
+
onPress: handlePrevSlide,
|
|
61
|
+
className: _stylesModule.default.arrowLeft,
|
|
62
|
+
classes: classes
|
|
63
|
+
}), /*#__PURE__*/_react.default.createElement("div", {
|
|
64
|
+
style: {
|
|
65
|
+
transform: "translate3d(".concat(transitionSlide, "px, 0px, 0px)"),
|
|
66
|
+
width: "".concat(containerWidth * slideArray.length, "px"),
|
|
67
|
+
transition: "".concat(shouldAnimate ? "transform ".concat(animationTime, "s linear 0s") : 'none')
|
|
68
|
+
},
|
|
69
|
+
className: "".concat(_stylesModule.default.slideContainer),
|
|
70
|
+
draggable: "false"
|
|
71
|
+
}, slideArray.map(function (slide, _index) {
|
|
72
|
+
return /*#__PURE__*/_react.default.createElement(_Slide.default, {
|
|
73
|
+
animationTime: animationTime,
|
|
74
|
+
border: withBorder,
|
|
75
|
+
classes: classes,
|
|
76
|
+
currentSlide: index - 1,
|
|
77
|
+
imgSrc: slide.imgSrc,
|
|
78
|
+
key: "slide-".concat(slide.id || slide.imgSrc),
|
|
79
|
+
onClick: slide.onClick,
|
|
80
|
+
position: _index - 1,
|
|
81
|
+
shouldAnimate: shouldAnimate,
|
|
82
|
+
widthContainer: containerWidth
|
|
83
|
+
});
|
|
84
|
+
})), legend && legend.position === _constants.INSIDE && /*#__PURE__*/_react.default.createElement("div", {
|
|
85
|
+
className: _stylesModule.default.legendContainer
|
|
86
|
+
}, /*#__PURE__*/_react.default.createElement("div", {
|
|
87
|
+
className: _stylesModule.default.legend
|
|
88
|
+
}, slides.map(function (slide, itemIndex) {
|
|
89
|
+
return /*#__PURE__*/_react.default.createElement(_Legend.default, {
|
|
90
|
+
key: "legend-in-".concat(slide.id || slide.imgSrc),
|
|
91
|
+
classes: classes,
|
|
92
|
+
currentSlide: index === slideArray.length - 1 ? 0 : index === 0 ? 1 : index - 1,
|
|
93
|
+
index: itemIndex,
|
|
94
|
+
LegendCustom: legend.legendCustom,
|
|
95
|
+
onClick: handleLegend
|
|
96
|
+
});
|
|
97
|
+
}))), arrow && arrow.position === _constants.INSIDE && /*#__PURE__*/_react.default.createElement(_Button.default, {
|
|
98
|
+
ArrowCustom: arrow.arrowCustomRight,
|
|
99
|
+
callback: arrow.callbackRight,
|
|
100
|
+
onPress: handleNextSlide,
|
|
101
|
+
className: _stylesModule.default.arrowRight,
|
|
102
|
+
classes: classes
|
|
103
|
+
}));
|
|
104
|
+
}
|
|
105
|
+
}]);
|
|
106
|
+
return Slider;
|
|
107
|
+
}(_react.PureComponent);
|
|
82
108
|
Slider.propTypes = {
|
|
83
109
|
slideArray: (0, _propTypes.arrayOf)((0, _propTypes.shape)({
|
|
84
110
|
imgSrc: _propTypes.string,
|
|
@@ -110,4 +136,5 @@ Slider.propTypes = {
|
|
|
110
136
|
timeAnimation: _propTypes.number,
|
|
111
137
|
classes: (0, _propTypes.objectOf)(_propTypes.string)
|
|
112
138
|
};
|
|
113
|
-
var _default =
|
|
139
|
+
var _default = Slider;
|
|
140
|
+
exports.default = _default;
|
|
@@ -11,19 +11,19 @@ var _WithTheme = _interopRequireDefault(require("../WithTheme"));
|
|
|
11
11
|
var _theme = require("./theme");
|
|
12
12
|
var _Slider = _interopRequireDefault(require("./components/Slider"));
|
|
13
13
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
autoPlayDelay = 2000,
|
|
22
|
-
classes,
|
|
23
|
-
height =
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
14
|
+
var UTCarousel = function UTCarousel(_ref) {
|
|
15
|
+
var arrow = _ref.arrow,
|
|
16
|
+
legend = _ref.legend,
|
|
17
|
+
imgArray = _ref.imgArray,
|
|
18
|
+
borderSize = _ref.borderSize,
|
|
19
|
+
autoPlay = _ref.autoPlay,
|
|
20
|
+
_ref$autoPlayDelay = _ref.autoPlayDelay,
|
|
21
|
+
autoPlayDelay = _ref$autoPlayDelay === void 0 ? 2000 : _ref$autoPlayDelay,
|
|
22
|
+
classes = _ref.classes,
|
|
23
|
+
_ref$height = _ref.height,
|
|
24
|
+
height = _ref$height === void 0 ? _sizesModule.default.defaultCarrouselHeight : _ref$height,
|
|
25
|
+
activeEvents = _ref.activeEvents,
|
|
26
|
+
className = _ref.className;
|
|
27
27
|
return /*#__PURE__*/_react.default.createElement(_Slider.default, {
|
|
28
28
|
arrow: arrow,
|
|
29
29
|
legend: legend,
|
|
@@ -60,4 +60,5 @@ UTCarousel.propTypes = {
|
|
|
60
60
|
className: _propTypes.string,
|
|
61
61
|
classes: (0, _propTypes.objectOf)(_propTypes.string)
|
|
62
62
|
};
|
|
63
|
-
var _default =
|
|
63
|
+
var _default = (0, _WithTheme.default)(_theme.retrieveStyle)(UTCarousel);
|
|
64
|
+
exports.default = _default;
|
|
@@ -8,10 +8,8 @@ var _seamlessImmutable = require("seamless-immutable");
|
|
|
8
8
|
var _colorsModule = _interopRequireDefault(require("../../scss/variables/colors.module.scss"));
|
|
9
9
|
var _sizesModule = _interopRequireDefault(require("../../scss/variables/sizes.module.scss"));
|
|
10
10
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
theme
|
|
14
|
-
} = _ref;
|
|
11
|
+
var retrieveStyle = function retrieveStyle(_ref) {
|
|
12
|
+
var theme = _ref.theme;
|
|
15
13
|
return {
|
|
16
14
|
arrowStyle: {
|
|
17
15
|
fontSize: (0, _seamlessImmutable.getIn)(theme, ['UTCarousel', 'arrowStyle', 'fontSize'], _sizesModule.default.defaultCarrouselArrowSize),
|
|
@@ -4,4 +4,5 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
6
|
exports.defaultAdditionalInfoHeader = void 0;
|
|
7
|
-
|
|
7
|
+
var defaultAdditionalInfoHeader = 'Seleccionar Todo';
|
|
8
|
+
exports.defaultAdditionalInfoHeader = defaultAdditionalInfoHeader;
|
|
@@ -1,5 +1,6 @@
|
|
|
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); }
|
|
3
4
|
Object.defineProperty(exports, "__esModule", {
|
|
4
5
|
value: true
|
|
5
6
|
});
|
|
@@ -18,63 +19,74 @@ var _theme = require("./theme");
|
|
|
18
19
|
var _constants = require("./constants");
|
|
19
20
|
var _stylesModule = _interopRequireDefault(require("./styles.module.scss"));
|
|
20
21
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
21
|
-
function _getRequireWildcardCache(
|
|
22
|
-
function _interopRequireWildcard(
|
|
22
|
+
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
|
|
23
|
+
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
|
|
23
24
|
function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
|
|
24
|
-
|
|
25
|
+
function _toConsumableArray(arr) { return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread(); }
|
|
26
|
+
function _nonIterableSpread() { throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
|
|
27
|
+
function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
|
|
28
|
+
function _iterableToArray(iter) { if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter); }
|
|
29
|
+
function _arrayWithoutHoles(arr) { if (Array.isArray(arr)) return _arrayLikeToArray(arr); }
|
|
30
|
+
function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i]; return arr2; }
|
|
31
|
+
var UTCheckList = function UTCheckList(_ref) {
|
|
25
32
|
var _field$configuration;
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
className,
|
|
35
|
-
classNames,
|
|
36
|
-
disabled,
|
|
37
|
-
disabledItemTooltip,
|
|
38
|
-
field,
|
|
39
|
-
getSelectAllNewValues,
|
|
40
|
-
header,
|
|
41
|
-
headerLabel,
|
|
42
|
-
input,
|
|
43
|
-
labelKey,
|
|
44
|
-
list,
|
|
45
|
-
meta,
|
|
46
|
-
shouldShowErrors,
|
|
47
|
-
titleProps,
|
|
48
|
-
useCustomIcons,
|
|
49
|
-
valueKey,
|
|
50
|
-
withCheckRow,
|
|
51
|
-
withUpperTitle
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
33
|
+
var additionalInfo = _ref.additionalInfo,
|
|
34
|
+
allChecked = _ref.allChecked,
|
|
35
|
+
CustomCheckedIcon = _ref.CustomCheckedIcon,
|
|
36
|
+
CustomUncheckedIcon = _ref.CustomUncheckedIcon,
|
|
37
|
+
CustomRowLabel = _ref.customRowLabel,
|
|
38
|
+
CustomSelectAllRowLabel = _ref.customSelectAllRowLabel,
|
|
39
|
+
_ref$classes = _ref.classes,
|
|
40
|
+
themeClasses = _ref$classes === void 0 ? {} : _ref$classes,
|
|
41
|
+
className = _ref.className,
|
|
42
|
+
classNames = _ref.classNames,
|
|
43
|
+
disabled = _ref.disabled,
|
|
44
|
+
disabledItemTooltip = _ref.disabledItemTooltip,
|
|
45
|
+
field = _ref.field,
|
|
46
|
+
getSelectAllNewValues = _ref.getSelectAllNewValues,
|
|
47
|
+
header = _ref.header,
|
|
48
|
+
headerLabel = _ref.headerLabel,
|
|
49
|
+
input = _ref.input,
|
|
50
|
+
labelKey = _ref.labelKey,
|
|
51
|
+
list = _ref.list,
|
|
52
|
+
meta = _ref.meta,
|
|
53
|
+
shouldShowErrors = _ref.shouldShowErrors,
|
|
54
|
+
titleProps = _ref.titleProps,
|
|
55
|
+
useCustomIcons = _ref.useCustomIcons,
|
|
56
|
+
valueKey = _ref.valueKey,
|
|
57
|
+
withCheckRow = _ref.withCheckRow,
|
|
58
|
+
withUpperTitle = _ref.withUpperTitle;
|
|
59
|
+
var shouldShowUpperTitle = (field === null || field === void 0 || (_field$configuration = field.configuration) === null || _field$configuration === void 0 ? void 0 : _field$configuration.ignore_title) && withUpperTitle;
|
|
60
|
+
var handleChange = function handleChange(id) {
|
|
61
|
+
var newValues = input.value.indexOf(id) === -1 ? [].concat(_toConsumableArray(input.value), [id]) : input.value.filter(function (elem) {
|
|
62
|
+
return elem !== id;
|
|
63
|
+
});
|
|
56
64
|
input.onChange((0, _array.isEmpty)(newValues) ? null : newValues);
|
|
57
65
|
};
|
|
58
|
-
|
|
66
|
+
var handleCheckAll = function handleCheckAll() {
|
|
59
67
|
if (getSelectAllNewValues) {
|
|
60
68
|
input.onChange(getSelectAllNewValues());
|
|
61
69
|
} else if (list.length !== input.value.length) {
|
|
62
|
-
input.onChange(list.map(
|
|
70
|
+
input.onChange(list.map(function (item) {
|
|
71
|
+
return item[valueKey];
|
|
72
|
+
}));
|
|
63
73
|
} else {
|
|
64
74
|
input.onChange(null);
|
|
65
75
|
}
|
|
66
76
|
};
|
|
67
|
-
(0, _react.useEffect)(()
|
|
77
|
+
(0, _react.useEffect)(function () {
|
|
68
78
|
if (allChecked) handleCheckAll();
|
|
69
79
|
}, []);
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
return key.map(
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
80
|
+
var classes = (0, _classesUtils.mergeClasses)(themeClasses, classNames);
|
|
81
|
+
var label = function label() {
|
|
82
|
+
var key = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : [];
|
|
83
|
+
var item = arguments.length > 1 ? arguments[1] : undefined;
|
|
84
|
+
return key.map(function (keyValue) {
|
|
85
|
+
return /*#__PURE__*/_react.default.createElement(_UTLabel.default, {
|
|
86
|
+
variant: "xsmall",
|
|
87
|
+
className: classes.rowItem
|
|
88
|
+
}, item[keyValue]);
|
|
89
|
+
});
|
|
78
90
|
};
|
|
79
91
|
return /*#__PURE__*/_react.default.createElement("div", {
|
|
80
92
|
className: "".concat(_stylesModule.default.container, " ").concat(className)
|
|
@@ -84,11 +96,13 @@ const UTCheckList = _ref => {
|
|
|
84
96
|
withMarkdown: true
|
|
85
97
|
}), field.title), /*#__PURE__*/_react.default.createElement("div", {
|
|
86
98
|
className: header ? classes.tableHeader : classes.selectAll
|
|
87
|
-
}, header && header.map(
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
99
|
+
}, header && header.map(function (item) {
|
|
100
|
+
return /*#__PURE__*/_react.default.createElement(_UTLabel.default, {
|
|
101
|
+
weight: "bold",
|
|
102
|
+
className: classes.headerItem,
|
|
103
|
+
key: item.text
|
|
104
|
+
}, item.text);
|
|
105
|
+
}), /*#__PURE__*/_react.default.createElement(_UTCheckbox.default, {
|
|
92
106
|
disabled: disabled,
|
|
93
107
|
onChange: handleCheckAll,
|
|
94
108
|
value: list.length === input.value.length,
|
|
@@ -104,28 +118,34 @@ const UTCheckList = _ref => {
|
|
|
104
118
|
CustomUncheckedIcon: CustomUncheckedIcon
|
|
105
119
|
})), /*#__PURE__*/_react.default.createElement(_FormGroup.default, {
|
|
106
120
|
className: "".concat(_stylesModule.default.rows, " ").concat(classes.rowContainerClassName)
|
|
107
|
-
}, list.map(
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
121
|
+
}, list.map(function (item) {
|
|
122
|
+
return /*#__PURE__*/_react.default.createElement("div", {
|
|
123
|
+
className: "\n ".concat(_stylesModule.default.row, "\n ").concat(withCheckRow && classes.checkRowContainer, "\n ").concat(!(0, _array.isEmpty)(input.value) && !!input.value.find(function (val) {
|
|
124
|
+
return val === item[valueKey];
|
|
125
|
+
}) && classes.customRowRootChecked, " "),
|
|
126
|
+
key: item[valueKey]
|
|
127
|
+
}, withCheckRow && label([valueKey, labelKey], item), /*#__PURE__*/_react.default.createElement(_UTCheckbox.default, {
|
|
128
|
+
disabled: disabled || item.disabled,
|
|
129
|
+
item: item,
|
|
130
|
+
key: item[valueKey],
|
|
131
|
+
value: input.value.indexOf(item[valueKey]) !== -1,
|
|
132
|
+
label: withCheckRow ? '' : item[labelKey],
|
|
133
|
+
onChange: function onChange() {
|
|
134
|
+
return handleChange(item[valueKey]);
|
|
135
|
+
},
|
|
136
|
+
customRowLabel: CustomRowLabel,
|
|
137
|
+
classNames: {
|
|
138
|
+
root: !withCheckRow && classes.customRowRoot,
|
|
139
|
+
checkedIcon: classes.checkedIcon,
|
|
140
|
+
uncheckedIcon: classes.uncheckedIcon,
|
|
141
|
+
label: classes.label
|
|
142
|
+
},
|
|
143
|
+
useCustomIcons: useCustomIcons,
|
|
144
|
+
CustomCheckedIcon: CustomCheckedIcon,
|
|
145
|
+
CustomUncheckedIcon: CustomUncheckedIcon,
|
|
146
|
+
tooltipContent: item.disabled && disabledItemTooltip ? disabledItemTooltip(item, list) : undefined
|
|
147
|
+
}));
|
|
148
|
+
})), additionalInfo && additionalInfo.footer && /*#__PURE__*/_react.default.createElement(_FormHelperText.default, null, additionalInfo.footer), shouldShowErrors && /*#__PURE__*/_react.default.createElement(_FormHelperText.default, {
|
|
129
149
|
error: true
|
|
130
150
|
}, meta && meta.error));
|
|
131
151
|
};
|
|
@@ -171,4 +191,5 @@ UTCheckList.propTypes = {
|
|
|
171
191
|
withCheckRow: _propTypes.bool,
|
|
172
192
|
withUpperTitle: _propTypes.bool
|
|
173
193
|
};
|
|
174
|
-
var _default =
|
|
194
|
+
var _default = (0, _WithTheme.default)(_theme.retrieveStyle, _theme.retrieveMuiTheme)(UTCheckList);
|
|
195
|
+
exports.default = _default;
|
|
@@ -9,45 +9,45 @@ var _styles = require("@material-ui/core/styles");
|
|
|
9
9
|
var _colorsModule = _interopRequireDefault(require("../../scss/variables/colors.module.scss"));
|
|
10
10
|
var _classesUtils = require("../../utils/classesUtils");
|
|
11
11
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
overrides: {
|
|
17
|
-
MuiFormControlLabel: {
|
|
18
|
-
label: {
|
|
19
|
-
fontSize: (0, _seamlessImmutable.getIn)(theme, ['UTCheckList', 'label', 'fontSize'], 14),
|
|
20
|
-
color: (0, _seamlessImmutable.getIn)(theme, ['UTCheckList', 'label', 'color'], _colorsModule.default.primary)
|
|
21
|
-
}
|
|
12
|
+
var retrieveMuiTheme = function retrieveMuiTheme(theme) {
|
|
13
|
+
return (0, _styles.createTheme)({
|
|
14
|
+
typography: {
|
|
15
|
+
fontFamily: (0, _seamlessImmutable.getIn)(theme, ['Fonts', 'fontFamily'])
|
|
22
16
|
},
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
color: theme.Palette.error['05']
|
|
17
|
+
overrides: {
|
|
18
|
+
MuiFormControlLabel: {
|
|
19
|
+
label: {
|
|
20
|
+
fontSize: (0, _seamlessImmutable.getIn)(theme, ['UTCheckList', 'label', 'fontSize'], 14),
|
|
21
|
+
color: (0, _seamlessImmutable.getIn)(theme, ['UTCheckList', 'label', 'color'], _colorsModule.default.primary)
|
|
29
22
|
}
|
|
30
|
-
}
|
|
31
|
-
},
|
|
32
|
-
MuiCheckbox: {
|
|
33
|
-
root: {
|
|
34
|
-
color: (0, _seamlessImmutable.getIn)(theme, ['UTCheckList', 'checkbox', 'color'], _colorsModule.default.gray)
|
|
35
23
|
},
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
color: (0, _seamlessImmutable.getIn)(theme, ['UTCheckList', '
|
|
24
|
+
MuiFormHelperText: {
|
|
25
|
+
root: {
|
|
26
|
+
fontSize: (0, _seamlessImmutable.getIn)(theme, ['UTCheckList', 'helperText', 'fontSize'], 14),
|
|
27
|
+
color: (0, _seamlessImmutable.getIn)(theme, ['UTCheckList', 'helperText', 'color'], _colorsModule.default.primary),
|
|
28
|
+
'&$error': {
|
|
29
|
+
color: theme.Palette.error['05']
|
|
30
|
+
}
|
|
31
|
+
}
|
|
32
|
+
},
|
|
33
|
+
MuiCheckbox: {
|
|
34
|
+
root: {
|
|
35
|
+
color: (0, _seamlessImmutable.getIn)(theme, ['UTCheckList', 'checkbox', 'color'], _colorsModule.default.gray)
|
|
36
|
+
},
|
|
37
|
+
colorPrimary: {
|
|
38
|
+
color: (0, _seamlessImmutable.getIn)(theme, ['UTCheckList', 'checkbox', 'color'], _colorsModule.default.gray),
|
|
39
|
+
'&$checked': {
|
|
40
|
+
color: (0, _seamlessImmutable.getIn)(theme, ['UTCheckList', 'checkbox', 'checkedColor'], _colorsModule.default.inputPrimary)
|
|
41
|
+
}
|
|
40
42
|
}
|
|
41
43
|
}
|
|
42
44
|
}
|
|
43
|
-
}
|
|
44
|
-
}
|
|
45
|
+
});
|
|
46
|
+
};
|
|
45
47
|
exports.retrieveMuiTheme = retrieveMuiTheme;
|
|
46
|
-
|
|
48
|
+
var retrieveStyle = function retrieveStyle(_ref) {
|
|
47
49
|
var _theme$UTCheckList, _theme$UTCheckList2;
|
|
48
|
-
|
|
49
|
-
theme
|
|
50
|
-
} = _ref;
|
|
50
|
+
var theme = _ref.theme;
|
|
51
51
|
return {
|
|
52
52
|
selectAllRowRoot: {
|
|
53
53
|
color: (0, _seamlessImmutable.getIn)(theme, ['UTCheckList', 'selectAllRow', 'root', 'color']),
|
|
@@ -4,8 +4,11 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
6
|
exports.tippyProps = void 0;
|
|
7
|
-
|
|
8
|
-
appendTo: ()
|
|
7
|
+
var tippyProps = {
|
|
8
|
+
appendTo: function appendTo() {
|
|
9
|
+
return document.body;
|
|
10
|
+
},
|
|
9
11
|
interactive: false,
|
|
10
12
|
maxWidth: 'none'
|
|
11
|
-
};
|
|
13
|
+
};
|
|
14
|
+
exports.tippyProps = tippyProps;
|