@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
|
@@ -18,43 +18,50 @@ var _types = require("../../types");
|
|
|
18
18
|
var _constants2 = require("./constants");
|
|
19
19
|
var _stylesModule = _interopRequireDefault(require("./styles.module.scss"));
|
|
20
20
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
21
|
-
function _getRequireWildcardCache(
|
|
22
|
-
function _interopRequireWildcard(
|
|
21
|
+
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); }
|
|
22
|
+
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
|
+
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); }
|
|
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
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
25
|
+
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
26
|
+
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
27
|
+
function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
|
28
|
+
function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return _typeof(key) === "symbol" ? key : String(key); }
|
|
29
|
+
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); }
|
|
30
|
+
var TableRow = function TableRow(_ref) {
|
|
31
|
+
var CellComponent = _ref.CellComponent,
|
|
32
|
+
cellProps = _ref.cellProps,
|
|
33
|
+
checkBoxOnChange = _ref.checkBoxOnChange,
|
|
34
|
+
checkBoxSelected = _ref.checkBoxSelected,
|
|
35
|
+
checkBoxClassName = _ref.checkBoxClassName,
|
|
36
|
+
className = _ref.className,
|
|
37
|
+
columnsDefinition = _ref.columnsDefinition,
|
|
38
|
+
columnSizes = _ref.columnSizes,
|
|
39
|
+
containerStyle = _ref.containerStyle,
|
|
40
|
+
exclusiveSelection = _ref.exclusiveSelection,
|
|
41
|
+
selectable = _ref.selectable,
|
|
42
|
+
disableRowSelection = _ref.disableRowSelection,
|
|
43
|
+
disabledRowSelectionTooltip = _ref.disabledRowSelectionTooltip,
|
|
44
|
+
fixedRowsLeftClassName = _ref.fixedRowsLeftClassName,
|
|
45
|
+
fixedRowsRightClassName = _ref.fixedRowsRightClassName,
|
|
46
|
+
handleRowClick = _ref.handleRowClick,
|
|
47
|
+
removeFixedRowsDivisors = _ref.removeFixedRowsDivisors,
|
|
48
|
+
rowClassName = _ref.rowClassName,
|
|
49
|
+
rowStyles = _ref.rowStyles,
|
|
50
|
+
tableSize = _ref.tableSize,
|
|
51
|
+
isResponsive = _ref.isResponsive,
|
|
52
|
+
pageRows = _ref.pageRows;
|
|
53
|
+
var _columnsDefinition$fi = columnsDefinition.fixedLeftColumns,
|
|
54
|
+
fixedLeftColumns = _columnsDefinition$fi === void 0 ? [] : _columnsDefinition$fi,
|
|
55
|
+
_columnsDefinition$fi2 = columnsDefinition.fixedRightColumns,
|
|
56
|
+
fixedRightColumns = _columnsDefinition$fi2 === void 0 ? [] : _columnsDefinition$fi2,
|
|
57
|
+
_columnsDefinition$se = columnsDefinition.secondaryColumns,
|
|
58
|
+
secondaryColumns = _columnsDefinition$se === void 0 ? [] : _columnsDefinition$se,
|
|
59
|
+
_columnsDefinition$pr = columnsDefinition.primaryActions,
|
|
60
|
+
primaryActions = _columnsDefinition$pr === void 0 ? [] : _columnsDefinition$pr,
|
|
61
|
+
_columnsDefinition$se2 = columnsDefinition.secondaryActions,
|
|
62
|
+
secondaryActions = _columnsDefinition$se2 === void 0 ? [] : _columnsDefinition$se2;
|
|
63
|
+
var SelectionComponent = exclusiveSelection ? _Radio.default : _Checkbox.default;
|
|
64
|
+
var selectableCellStyles = isResponsive ? "".concat(_stylesModule.default.secondaryActionsContainer, "\n ").concat(cellProps.classes.responsiveCell, "\n ").concat(selectable || !(0, _array.isEmpty)(secondaryActions) ? cellProps.classes.responsiveRowTopBorder : _stylesModule.default.hidden) : "\n\t".concat(_stylesModule.default.fixedRowLeft, "\n\t").concat(fixedRowsLeftClassName, "\n\t").concat((removeFixedRowsDivisors || (0, _array.isEmpty)(fixedLeftColumns)) && _stylesModule.default.disableBorderRight, "\n\t").concat(!selectable && (0, _array.isEmpty)(fixedLeftColumns) && _stylesModule.default.cleanFixedColumns, "\n");
|
|
58
65
|
return /*#__PURE__*/_react.default.createElement(_react.Fragment, null, /*#__PURE__*/_react.default.createElement(_UTTouchableWithoutFeedback.default, {
|
|
59
66
|
onClick: handleRowClick,
|
|
60
67
|
className: "\n ".concat(_stylesModule.default.row, "\n ").concat((!handleRowClick || isResponsive) && _stylesModule.default.noClick, "\n ").concat(isResponsive && cellProps.classes.responsiveRow, "\n ").concat(className, "\n "),
|
|
@@ -63,16 +70,14 @@ const TableRow = _ref => {
|
|
|
63
70
|
className: _stylesModule.default.stickyRowBackground
|
|
64
71
|
}, /*#__PURE__*/_react.default.createElement("div", {
|
|
65
72
|
className: "".concat(_stylesModule.default.rowBackground, " ").concat(rowClassName),
|
|
66
|
-
style: {
|
|
67
|
-
width: tableSize
|
|
68
|
-
|
|
69
|
-
}
|
|
73
|
+
style: _objectSpread({
|
|
74
|
+
width: tableSize
|
|
75
|
+
}, rowStyles.rowBackground)
|
|
70
76
|
})), /*#__PURE__*/_react.default.createElement("div", {
|
|
71
77
|
className: selectableCellStyles,
|
|
72
|
-
style: {
|
|
73
|
-
...rowStyles.fixedRowsLeft,
|
|
78
|
+
style: _objectSpread(_objectSpread({}, rowStyles.fixedRowsLeft), {}, {
|
|
74
79
|
width: isResponsive ? 'auto' : columnSizes.leftColumnsSize
|
|
75
|
-
}
|
|
80
|
+
})
|
|
76
81
|
}, selectable && /*#__PURE__*/_react.default.createElement("div", {
|
|
77
82
|
className: "\n ".concat(_stylesModule.default.checkBoxCell, "\n ").concat(checkBoxSelected ? cellProps.classes.headerDecoratorSelected : cellProps.classes.headerDecoratorUnselected, "\n ").concat(checkBoxClassName, "\n ").concat(isResponsive && checkBoxSelected && cellProps.classes.selectedResponsiveCell, "\n "),
|
|
78
83
|
style: rowStyles.selectCell
|
|
@@ -90,48 +95,57 @@ const TableRow = _ref => {
|
|
|
90
95
|
checked: checkBoxSelected,
|
|
91
96
|
onChange: checkBoxOnChange,
|
|
92
97
|
disabled: disableRowSelection && disableRowSelection(cellProps.rowData, pageRows)
|
|
93
|
-
})))), fixedLeftColumns.map(
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
+
})))), fixedLeftColumns.map(function (column) {
|
|
99
|
+
return /*#__PURE__*/_react.default.createElement(CellComponent, _extends({
|
|
100
|
+
key: "cell_".concat(column.key),
|
|
101
|
+
column: column,
|
|
102
|
+
columnSizes: columnSizes
|
|
103
|
+
}, cellProps));
|
|
104
|
+
}), !(0, _array.isEmpty)(secondaryActions) && /*#__PURE__*/_react.default.createElement("div", {
|
|
98
105
|
className: _stylesModule.default.secondaryActions
|
|
99
|
-
}, secondaryActions.map(
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
106
|
+
}, secondaryActions.map(function (action) {
|
|
107
|
+
return /*#__PURE__*/_react.default.createElement(_ActionIcons.default, {
|
|
108
|
+
column: action,
|
|
109
|
+
key: "action_".concat(action.key),
|
|
110
|
+
rowData: cellProps.rowData,
|
|
111
|
+
classes: cellProps.classes
|
|
112
|
+
});
|
|
113
|
+
}))), !(0, _array.isEmpty)(secondaryColumns) && /*#__PURE__*/_react.default.createElement("div", {
|
|
105
114
|
className: "\n ".concat(_stylesModule.default.secondaryColumns, " \n ").concat(isResponsive && checkBoxSelected && cellProps.classes.selectedResponsiveCell, "\n ").concat(isResponsive && selectable && _stylesModule.default.hideTopBorder, "\n "),
|
|
106
115
|
style: {
|
|
107
116
|
width: isResponsive ? 'auto' : columnSizes.secondaryColumnsSize
|
|
108
117
|
}
|
|
109
|
-
}, secondaryColumns.map((column, index)
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
118
|
+
}, secondaryColumns.map(function (column, index) {
|
|
119
|
+
return /*#__PURE__*/_react.default.createElement(CellComponent, _extends({
|
|
120
|
+
key: "cell_".concat(column.key),
|
|
121
|
+
column: column,
|
|
122
|
+
columnSizes: columnSizes
|
|
123
|
+
}, cellProps, {
|
|
124
|
+
rowStyles: rowStyles,
|
|
125
|
+
showBottomBorder: index === secondaryColumns.length - 1 && (0, _array.isEmpty)(primaryActions)
|
|
126
|
+
}));
|
|
127
|
+
}), primaryActions.map(function (column, index) {
|
|
128
|
+
return /*#__PURE__*/_react.default.createElement(_PrimaryAction.default, _extends({
|
|
129
|
+
key: "cell_".concat(column.key),
|
|
130
|
+
column: column
|
|
131
|
+
}, cellProps, {
|
|
132
|
+
rowStyles: rowStyles,
|
|
133
|
+
showBottomRadius: index === primaryActions.length - 1,
|
|
134
|
+
showBottomBorder: index === primaryActions.length - 1
|
|
135
|
+
}));
|
|
136
|
+
})), !isResponsive && /*#__PURE__*/_react.default.createElement("div", {
|
|
124
137
|
className: "\n ".concat(_stylesModule.default.fixedRowRight, "\n ").concat(fixedRowsRightClassName, "\n ").concat((removeFixedRowsDivisors || (0, _array.isEmpty)(fixedRightColumns)) && _stylesModule.default.disableBorderLeft, "\n ").concat((0, _array.isEmpty)(fixedRightColumns) && _stylesModule.default.cleanFixedColumns, "\n "),
|
|
125
|
-
style: {
|
|
126
|
-
...rowStyles.fixedRowsRight,
|
|
138
|
+
style: _objectSpread(_objectSpread({}, rowStyles.fixedRowsRight), {}, {
|
|
127
139
|
width: columnSizes.rightColumnsSize
|
|
128
|
-
}
|
|
129
|
-
}, fixedRightColumns.map(
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
140
|
+
})
|
|
141
|
+
}, fixedRightColumns.map(function (column) {
|
|
142
|
+
return /*#__PURE__*/_react.default.createElement(CellComponent, _extends({
|
|
143
|
+
key: "cell_".concat(column.key),
|
|
144
|
+
column: column,
|
|
145
|
+
columnSizes: columnSizes,
|
|
146
|
+
align: _constants.COLUMN_POSITION.RIGHT
|
|
147
|
+
}, cellProps));
|
|
148
|
+
}))));
|
|
135
149
|
};
|
|
136
150
|
TableRow.propTypes = {
|
|
137
151
|
CellComponent: _propTypes.elementType,
|
|
@@ -161,4 +175,5 @@ TableRow.propTypes = {
|
|
|
161
175
|
isResponsive: _propTypes.bool,
|
|
162
176
|
pageRows: (0, _propTypes.arrayOf)(_propTypes.object)
|
|
163
177
|
};
|
|
164
|
-
var _default =
|
|
178
|
+
var _default = /*#__PURE__*/(0, _react.memo)(TableRow);
|
|
179
|
+
exports.default = _default;
|
|
@@ -4,7 +4,12 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
6
|
exports.TOTAL_ROW_LABEL = exports.TOTAL_ROWS_LABEL = exports.ROW_SPACING_NAMES = exports.ROW_SPACING = exports.ROW_SIDE_PADDING = exports.ROW_PADDING_NAMES = exports.ROW_PADDING = exports.ROW_KEY = exports.ROWS_PER_PAGE = exports.ROWS_BORDER_SIZE = exports.PAGINATION_LIMIT_DOUBLE_ARROWS = exports.NO_RESULTS_LABEL = exports.MAX_PAGINATION_ITEMS = exports.DEFAULT_TABLET_BREAKPOINT = exports.COLUMN_SIZES = exports.COLUMN_POSITION = exports.CELL_TYPES = exports.CELL_SIDE_PADDING = exports.CELL_ACTION_TYPES = void 0;
|
|
7
|
-
|
|
7
|
+
var _ROW_SPACING, _ROW_PADDING;
|
|
8
|
+
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); }
|
|
9
|
+
function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
|
10
|
+
function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return _typeof(key) === "symbol" ? key : String(key); }
|
|
11
|
+
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); }
|
|
12
|
+
var COLUMN_SIZES = {
|
|
8
13
|
xsmall: 70,
|
|
9
14
|
small: 90,
|
|
10
15
|
medium: 120,
|
|
@@ -12,43 +17,55 @@ const COLUMN_SIZES = exports.COLUMN_SIZES = {
|
|
|
12
17
|
xlarge: 260,
|
|
13
18
|
xxlarge: 350
|
|
14
19
|
};
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
20
|
+
exports.COLUMN_SIZES = COLUMN_SIZES;
|
|
21
|
+
var ROW_SIDE_PADDING = 16;
|
|
22
|
+
exports.ROW_SIDE_PADDING = ROW_SIDE_PADDING;
|
|
23
|
+
var CELL_SIDE_PADDING = 16;
|
|
24
|
+
exports.CELL_SIDE_PADDING = CELL_SIDE_PADDING;
|
|
25
|
+
var ROW_SPACING_NAMES = {
|
|
18
26
|
NONE: 'none',
|
|
19
27
|
SMALL: 'small',
|
|
20
28
|
MEDIUM: 'medium'
|
|
21
29
|
};
|
|
22
|
-
|
|
30
|
+
exports.ROW_SPACING_NAMES = ROW_SPACING_NAMES;
|
|
31
|
+
var ROW_PADDING_NAMES = {
|
|
23
32
|
SMALL: 'small',
|
|
24
33
|
MEDIUM: 'medium'
|
|
25
34
|
};
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
[ROW_PADDING_NAMES.SMALL]: 16,
|
|
33
|
-
[ROW_PADDING_NAMES.MEDIUM]: 24
|
|
34
|
-
};
|
|
35
|
-
const COLUMN_POSITION = exports.COLUMN_POSITION = {
|
|
35
|
+
exports.ROW_PADDING_NAMES = ROW_PADDING_NAMES;
|
|
36
|
+
var ROW_SPACING = (_ROW_SPACING = {}, _defineProperty(_ROW_SPACING, ROW_SPACING_NAMES.NONE, 0), _defineProperty(_ROW_SPACING, ROW_SPACING_NAMES.SMALL, 5), _defineProperty(_ROW_SPACING, ROW_SPACING_NAMES.MEDIUM, 10), _ROW_SPACING);
|
|
37
|
+
exports.ROW_SPACING = ROW_SPACING;
|
|
38
|
+
var ROW_PADDING = (_ROW_PADDING = {}, _defineProperty(_ROW_PADDING, ROW_PADDING_NAMES.SMALL, 16), _defineProperty(_ROW_PADDING, ROW_PADDING_NAMES.MEDIUM, 24), _ROW_PADDING);
|
|
39
|
+
exports.ROW_PADDING = ROW_PADDING;
|
|
40
|
+
var COLUMN_POSITION = {
|
|
36
41
|
LEFT: 'left',
|
|
37
42
|
RIGHT: 'right'
|
|
38
43
|
};
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
44
|
+
exports.COLUMN_POSITION = COLUMN_POSITION;
|
|
45
|
+
var ROWS_PER_PAGE = [10, 25, 50];
|
|
46
|
+
exports.ROWS_PER_PAGE = ROWS_PER_PAGE;
|
|
47
|
+
var ROWS_BORDER_SIZE = 1;
|
|
48
|
+
exports.ROWS_BORDER_SIZE = ROWS_BORDER_SIZE;
|
|
49
|
+
var TOTAL_ROWS_LABEL = 'resultados';
|
|
50
|
+
exports.TOTAL_ROWS_LABEL = TOTAL_ROWS_LABEL;
|
|
51
|
+
var TOTAL_ROW_LABEL = 'resultado';
|
|
52
|
+
exports.TOTAL_ROW_LABEL = TOTAL_ROW_LABEL;
|
|
53
|
+
var NO_RESULTS_LABEL = 'Aún no hay resultados';
|
|
54
|
+
exports.NO_RESULTS_LABEL = NO_RESULTS_LABEL;
|
|
55
|
+
var ROW_KEY = 'id';
|
|
56
|
+
exports.ROW_KEY = ROW_KEY;
|
|
57
|
+
var MAX_PAGINATION_ITEMS = 5;
|
|
58
|
+
exports.MAX_PAGINATION_ITEMS = MAX_PAGINATION_ITEMS;
|
|
59
|
+
var PAGINATION_LIMIT_DOUBLE_ARROWS = 10;
|
|
60
|
+
exports.PAGINATION_LIMIT_DOUBLE_ARROWS = PAGINATION_LIMIT_DOUBLE_ARROWS;
|
|
61
|
+
var CELL_TYPES = {
|
|
48
62
|
STATUS: 'status',
|
|
49
63
|
ACTION_ICONS: 'action-icons',
|
|
50
64
|
ACTION_BUTTON: 'action-button',
|
|
51
65
|
TEXT: 'text'
|
|
52
66
|
};
|
|
53
|
-
|
|
54
|
-
|
|
67
|
+
exports.CELL_TYPES = CELL_TYPES;
|
|
68
|
+
var CELL_ACTION_TYPES = [CELL_TYPES.ACTION_ICONS, CELL_TYPES.ACTION_BUTTON];
|
|
69
|
+
exports.CELL_ACTION_TYPES = CELL_ACTION_TYPES;
|
|
70
|
+
var DEFAULT_TABLET_BREAKPOINT = 1024;
|
|
71
|
+
exports.DEFAULT_TABLET_BREAKPOINT = DEFAULT_TABLET_BREAKPOINT;
|
|
@@ -5,27 +5,42 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
5
5
|
});
|
|
6
6
|
exports.useResizeObserver = void 0;
|
|
7
7
|
var _react = require("react");
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
8
|
+
function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
|
|
9
|
+
function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
|
|
10
|
+
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); }
|
|
11
|
+
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; }
|
|
12
|
+
function _iterableToArrayLimit(r, l) { var t = null == r ? null : "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (null != t) { var e, n, i, u, a = [], f = !0, o = !1; try { if (i = (t = t.call(r)).next, 0 === l) { if (Object(t) !== t) return; f = !1; } else for (; !(f = (e = i.call(t)).done) && (a.push(e.value), a.length !== l); f = !0); } catch (r) { o = !0, n = r; } finally { try { if (!f && null != t.return && (u = t.return(), Object(u) !== u)) return; } finally { if (o) throw n; } } return a; } }
|
|
13
|
+
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
14
|
+
var useResizeObserver = function useResizeObserver() {
|
|
15
|
+
var _useState = (0, _react.useState)({}),
|
|
16
|
+
_useState2 = _slicedToArray(_useState, 2),
|
|
17
|
+
observerEntry = _useState2[0],
|
|
18
|
+
setObserverEntry = _useState2[1];
|
|
19
|
+
var _useState3 = (0, _react.useState)(null),
|
|
20
|
+
_useState4 = _slicedToArray(_useState3, 2),
|
|
21
|
+
node = _useState4[0],
|
|
22
|
+
setNode = _useState4[1];
|
|
23
|
+
var observer = (0, _react.useRef)(null);
|
|
24
|
+
var disconnect = (0, _react.useCallback)(function () {
|
|
13
25
|
var _observer$current;
|
|
14
26
|
return (_observer$current = observer.current) === null || _observer$current === void 0 ? void 0 : _observer$current.disconnect();
|
|
15
27
|
}, []);
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
28
|
+
var callback = function callback(_ref) {
|
|
29
|
+
var _ref2 = _slicedToArray(_ref, 1),
|
|
30
|
+
entry = _ref2[0];
|
|
31
|
+
window.requestAnimationFrame(function () {
|
|
19
32
|
setObserverEntry(entry);
|
|
20
33
|
});
|
|
21
34
|
};
|
|
22
|
-
|
|
35
|
+
var observe = (0, _react.useCallback)(function () {
|
|
23
36
|
observer.current = new ResizeObserver(callback);
|
|
24
37
|
if (node) observer.current.observe(node);
|
|
25
38
|
}, [node]);
|
|
26
|
-
(0, _react.useLayoutEffect)(()
|
|
39
|
+
(0, _react.useLayoutEffect)(function () {
|
|
27
40
|
observe();
|
|
28
|
-
return ()
|
|
41
|
+
return function () {
|
|
42
|
+
return disconnect();
|
|
43
|
+
};
|
|
29
44
|
}, [disconnect, observe]);
|
|
30
45
|
return [setNode, observerEntry];
|
|
31
46
|
};
|