@widergy/energy-ui 2.7.3 → 2.7.5
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/CHANGELOG.md +14 -0
- package/dist/components/EnergyThemeProvider/index.js +1 -2
- package/dist/components/Loading/constants.js +1 -2
- package/dist/components/Loading/index.js +1 -2
- package/dist/components/Loading/theme.js +2 -3
- package/dist/components/UTAlert/AlertHandler.js +1 -2
- package/dist/components/UTAlert/index.js +1 -2
- package/dist/components/UTAlert/theme.js +3 -5
- package/dist/components/UTAttachment/components/Preview/index.js +1 -2
- package/dist/components/UTAttachment/constants.js +7 -13
- package/dist/components/UTAttachment/index.js +65 -42
- package/dist/components/UTAttachment/layout.js +10 -6
- package/dist/components/UTAttachment/styles.module.scss +1 -1
- package/dist/components/UTAttachment/theme.js +2 -3
- package/dist/components/UTAttachment/utils.js +30 -32
- package/dist/components/UTAutocomplete/components/ListBox/index.js +1 -2
- package/dist/components/UTAutocomplete/components/ListBox/utils.js +2 -3
- package/dist/components/UTAutocomplete/constants.js +12 -23
- package/dist/components/UTAutocomplete/index.js +8 -3
- package/dist/components/UTAutocomplete/theme.js +10 -12
- package/dist/components/UTAvatar/constants.js +52 -28
- package/dist/components/UTAvatar/index.js +1 -2
- package/dist/components/UTBarChart/components/Bars/components/Bar/components/Rect/index.js +1 -2
- package/dist/components/UTBarChart/components/Bars/components/Bar/constants.js +1 -2
- package/dist/components/UTBarChart/components/Bars/components/Bar/index.js +1 -2
- package/dist/components/UTBarChart/components/Bars/constants.js +3 -6
- package/dist/components/UTBarChart/components/Bars/index.js +1 -2
- package/dist/components/UTBarChart/components/Legend/constants.js +4 -7
- package/dist/components/UTBarChart/components/Legend/index.js +4 -6
- package/dist/components/UTBarChart/components/Legend/utils.js +2 -3
- package/dist/components/UTBarChart/components/Levels/index.js +1 -2
- package/dist/components/UTBarChart/components/Levels/utils.js +2 -3
- package/dist/components/UTBarChart/components/LinearPlot/constants.js +3 -5
- package/dist/components/UTBarChart/components/LinearPlot/index.js +1 -2
- package/dist/components/UTBarChart/components/LinearPlot/utils.js +3 -5
- package/dist/components/UTBarChart/components/Pagination/constants.js +1 -2
- package/dist/components/UTBarChart/components/Pagination/index.js +2 -3
- package/dist/components/UTBarChart/components/XAxis/components/AxisElement/index.js +1 -2
- package/dist/components/UTBarChart/components/XAxis/components/Decoration/constants.js +2 -4
- package/dist/components/UTBarChart/components/XAxis/components/Decoration/index.js +1 -2
- package/dist/components/UTBarChart/components/XAxis/constants.js +1 -2
- package/dist/components/UTBarChart/components/XAxis/index.js +1 -2
- package/dist/components/UTBarChart/components/YAxis/AxisElement/index.js +1 -2
- package/dist/components/UTBarChart/components/YAxis/constants.js +1 -2
- package/dist/components/UTBarChart/components/YAxis/index.js +1 -2
- package/dist/components/UTBarChart/components/YAxis/utils.js +3 -5
- package/dist/components/UTBarChart/constants.js +4 -8
- package/dist/components/UTBarChart/hooks/use-dynamic-margins.js +1 -2
- package/dist/components/UTBarChart/index.js +1 -2
- package/dist/components/UTBarChart/theme.js +2 -3
- package/dist/components/UTBarChart/types.js +10 -19
- package/dist/components/UTBarChart/utils.js +12 -23
- package/dist/components/UTBreadcrumbs/constants.js +7 -13
- package/dist/components/UTBreadcrumbs/index.js +1 -2
- package/dist/components/UTBreadcrumbs/theme.js +2 -3
- package/dist/components/UTButton/constants.js +6 -12
- package/dist/components/UTButton/index.js +2 -3
- package/dist/components/UTButton/styles.module.scss +6 -0
- package/dist/components/UTButton/theme.js +3 -5
- package/dist/components/UTCBUInput/index.js +1 -2
- package/dist/components/UTCBUInput/theme.js +2 -3
- package/dist/components/UTCaptcha/index.js +1 -2
- package/dist/components/UTCard/components/UTCardFooter/index.js +1 -2
- package/dist/components/UTCard/index.js +1 -2
- package/dist/components/UTCard/theme.js +2 -3
- package/dist/components/UTCard/types.js +2 -3
- package/dist/components/UTCarousel/components/Button/index.js +1 -2
- package/dist/components/UTCarousel/components/Legend/index.js +1 -2
- package/dist/components/UTCarousel/components/Slider/component/Slide/index.js +1 -2
- package/dist/components/UTCarousel/components/Slider/constants.js +5 -10
- package/dist/components/UTCarousel/components/Slider/index.js +1 -2
- package/dist/components/UTCarousel/components/Slider/layout.js +1 -2
- package/dist/components/UTCarousel/index.js +1 -2
- package/dist/components/UTCarousel/theme.js +2 -3
- package/dist/components/UTCheckList/constants.js +1 -2
- package/dist/components/UTCheckList/index.js +1 -2
- package/dist/components/UTCheckList/theme.js +7 -9
- package/dist/components/UTCheckbox/constants.js +2 -3
- package/dist/components/UTCheckbox/index.js +1 -2
- package/dist/components/UTCheckbox/theme.js +4 -6
- package/dist/components/UTConsumptionBar/components/ConsumptionBarIndicator/index.js +1 -2
- package/dist/components/UTConsumptionBar/constants.js +3 -6
- package/dist/components/UTConsumptionBar/index.js +1 -2
- package/dist/components/UTCuit/index.js +1 -2
- package/dist/components/UTCuit/theme.js +4 -5
- package/dist/components/UTDatePicker/components/Day/constants.js +1 -2
- package/dist/components/UTDatePicker/components/Day/index.js +1 -2
- package/dist/components/UTDatePicker/constants.js +11 -21
- package/dist/components/UTDatePicker/index.js +7 -3
- package/dist/components/UTDatePicker/theme.js +10 -8
- package/dist/components/UTDatePicker/types.js +2 -3
- package/dist/components/UTDatePicker/utils.js +3 -5
- package/dist/components/UTDialog/constants.js +2 -4
- package/dist/components/UTDialog/index.js +1 -2
- package/dist/components/UTDialog/theme.js +2 -3
- package/dist/components/UTDialog/types.js +2 -3
- package/dist/components/UTDotMenu/index.js +1 -2
- package/dist/components/UTEmojiPicker/constants.js +6 -11
- package/dist/components/UTEmojiPicker/index.js +1 -2
- package/dist/components/UTEmojiPicker/theme.js +2 -3
- package/dist/components/UTEmojiPicker/utils.js +3 -5
- package/dist/components/UTExternalLink/constants.js +3 -5
- package/dist/components/UTExternalLink/index.js +1 -2
- package/dist/components/UTExternalLink/theme.js +3 -5
- package/dist/components/UTFileInput/constants.js +2 -4
- package/dist/components/UTFileInput/index.js +1 -2
- package/dist/components/UTFileInput/layout.js +1 -2
- package/dist/components/UTIconButton/index.js +1 -2
- package/dist/components/UTIconButton/theme.js +2 -3
- package/dist/components/UTImageRadio/components/ImageRadioCard/index.js +1 -2
- package/dist/components/UTImageRadio/constants.js +3 -6
- package/dist/components/UTImageRadio/index.js +1 -2
- package/dist/components/UTImageRadio/theme.js +2 -3
- package/dist/components/UTImageRadio/types.js +2 -3
- package/dist/components/UTImageRadio/utils.js +3 -5
- package/dist/components/UTLabel/constants.js +9 -17
- package/dist/components/UTLabel/index.js +1 -2
- package/dist/components/UTLabel/theme.js +4 -7
- package/dist/components/UTList/index.js +1 -2
- package/dist/components/UTLoading/index.js +1 -2
- package/dist/components/UTMap/components/GoogleMaps/constants.js +3 -5
- package/dist/components/UTMap/components/GoogleMaps/index.js +1 -2
- package/dist/components/UTMap/components/GoogleMaps/styles.js +2 -3
- package/dist/components/UTMap/constants.js +6 -12
- package/dist/components/UTMap/index.js +1 -2
- package/dist/components/UTMap/types.js +3 -5
- package/dist/components/UTMap/utils.js +7 -13
- package/dist/components/UTMap/withGoogleMapScript.js +1 -2
- package/dist/components/UTMenu/index.js +50 -52
- package/dist/components/UTMenu/theme.js +3 -5
- package/dist/components/UTMenu/utils.js +5 -9
- package/dist/components/UTModal/constants.js +4 -8
- package/dist/components/UTModal/index.js +1 -2
- package/dist/components/UTModal/theme.js +2 -3
- package/dist/components/UTPagination/components/PageSizeSelector/index.js +1 -2
- package/dist/components/UTPagination/components/PageSizeSelector/utils.js +2 -3
- package/dist/components/UTPagination/components/Pagination/components/NavigationButton/index.js +1 -2
- package/dist/components/UTPagination/components/Pagination/index.js +1 -2
- package/dist/components/UTPagination/components/Pagination/utils.js +2 -3
- package/dist/components/UTPagination/constants.js +3 -6
- package/dist/components/UTPagination/index.js +1 -2
- package/dist/components/UTPagination/theme.js +2 -3
- package/dist/components/UTPanel/index.js +1 -2
- package/dist/components/UTPasswordField/components/PasswordValidations/components/Error/index.js +1 -2
- package/dist/components/UTPasswordField/components/PasswordValidations/components/Validation/index.js +1 -2
- package/dist/components/UTPasswordField/components/PasswordValidations/index.js +1 -2
- package/dist/components/UTPasswordField/components/PasswordWarning/index.js +1 -2
- package/dist/components/UTPasswordField/index.js +1 -2
- package/dist/components/UTPasswordField/theme.js +2 -3
- package/dist/components/UTPhoneInput/constants.js +3 -6
- package/dist/components/UTPhoneInput/index.js +1 -2
- package/dist/components/UTPhoneInput/theme.js +6 -8
- package/dist/components/UTPieChart/components/ArrowLabel/constants.js +4 -8
- package/dist/components/UTPieChart/components/ArrowLabel/index.js +1 -2
- package/dist/components/UTPieChart/components/Legend/contants.js +3 -6
- package/dist/components/UTPieChart/components/Legend/index.js +1 -2
- package/dist/components/UTPieChart/constants.js +13 -26
- package/dist/components/UTPieChart/hooks/use-animated-value/index.js +1 -2
- package/dist/components/UTPieChart/index.js +1 -2
- package/dist/components/UTPieChart/theme.js +2 -3
- package/dist/components/UTPieChart/utils.js +2 -3
- package/dist/components/UTProgressBar/constants.js +2 -4
- package/dist/components/UTProgressBar/index.js +1 -2
- package/dist/components/UTProgressBar/theme.js +2 -3
- package/dist/components/UTProgressBar/types.js +2 -3
- package/dist/components/UTRadioGroup/index.js +1 -2
- package/dist/components/UTRadioGroup/theme.js +5 -7
- package/dist/components/UTRating/components/Circle/index.js +1 -2
- package/dist/components/UTRating/components/Star/index.js +1 -2
- package/dist/components/UTRating/constants.js +4 -8
- package/dist/components/UTRating/index.js +1 -2
- package/dist/components/UTRating/theme.js +2 -3
- package/dist/components/UTRipple/Ripple.js +1 -2
- package/dist/components/UTRipple/index.js +1 -2
- package/dist/components/UTSelect/components/Option/index.js +1 -2
- package/dist/components/UTSelect/constants.js +4 -8
- package/dist/components/UTSelect/index.js +2 -3
- package/dist/components/UTSelect/stylesJS.js +2 -3
- package/dist/components/UTSelect/theme.js +6 -8
- package/dist/components/UTSelect/utils.js +2 -3
- package/dist/components/UTSidebar/components/ListOption/index.js +14 -10
- package/dist/components/UTSidebar/components/LogosContainer/components/DynamicIcon/index.js +1 -2
- package/dist/components/UTSidebar/components/LogosContainer/index.js +1 -2
- package/dist/components/UTSidebar/components/Option/constants.js +2 -3
- package/dist/components/UTSidebar/components/Option/index.js +1 -2
- package/dist/components/UTSidebar/components/Toggler/index.js +1 -2
- package/dist/components/UTSidebar/index.js +2 -3
- package/dist/components/UTSidebar/theme.js +2 -3
- package/dist/components/UTSidebar/types.js +5 -10
- package/dist/components/UTSkeleton/index.js +1 -2
- package/dist/components/UTStatus/constants.js +5 -9
- package/dist/components/UTStatus/index.js +1 -2
- package/dist/components/UTStatus/theme.js +5 -9
- package/dist/components/UTSwitch/constants.js +3 -6
- package/dist/components/UTSwitch/index.js +1 -2
- package/dist/components/UTSwitch/theme.js +2 -3
- package/dist/components/UTTable/components/ActionIcons/constants.js +1 -2
- package/dist/components/UTTable/components/ActionIcons/index.js +2 -3
- package/dist/components/UTTable/components/ActionIcons/styles.module.scss +7 -5
- package/dist/components/UTTable/components/Cell/components/ActionButton/index.js +1 -2
- package/dist/components/UTTable/components/Cell/index.js +1 -2
- package/dist/components/UTTable/components/HeaderCell/constants.js +2 -3
- package/dist/components/UTTable/components/HeaderCell/index.js +1 -2
- package/dist/components/UTTable/components/HeaderCell/utils.js +2 -3
- package/dist/components/UTTable/components/PrimaryAction/index.js +1 -2
- package/dist/components/UTTable/components/ResponsiveCell/index.js +1 -2
- package/dist/components/UTTable/components/Status/index.js +1 -2
- package/dist/components/UTTable/components/TableFooter/components/PageSizeSelector/index.js +1 -2
- package/dist/components/UTTable/components/TableFooter/components/PageSizeSelector/utils.js +2 -3
- package/dist/components/UTTable/components/TableFooter/components/Pagination/components/NavigationButton/index.js +1 -2
- package/dist/components/UTTable/components/TableFooter/components/Pagination/index.js +1 -2
- package/dist/components/UTTable/components/TableFooter/components/Pagination/utils.js +2 -3
- package/dist/components/UTTable/components/TableFooter/constants.js +1 -2
- package/dist/components/UTTable/components/TableFooter/index.js +1 -2
- package/dist/components/UTTable/components/TableHeader/index.js +2 -3
- package/dist/components/UTTable/components/TableHeader/styles.module.scss +5 -0
- package/dist/components/UTTable/components/TableRow/constants.js +2 -3
- package/dist/components/UTTable/components/TableRow/index.js +1 -2
- package/dist/components/UTTable/constants.js +19 -38
- package/dist/components/UTTable/hook.js +2 -3
- package/dist/components/UTTable/index.js +1 -2
- package/dist/components/UTTable/theme.js +16 -9
- package/dist/components/UTTable/types.js +4 -8
- package/dist/components/UTTable/utils.js +10 -19
- package/dist/components/UTTabs/components/TooltipTab/index.js +1 -2
- package/dist/components/UTTabs/constants.js +4 -8
- package/dist/components/UTTabs/index.js +1 -2
- package/dist/components/UTTabs/theme.js +2 -3
- package/dist/components/UTTabs/utils.js +2 -3
- package/dist/components/UTTextArea/constants.js +2 -3
- package/dist/components/UTTextArea/index.js +6 -5
- package/dist/components/UTTextArea/theme.js +4 -5
- package/dist/components/UTTextInput/constants.js +2 -3
- package/dist/components/UTTextInput/index.js +1 -2
- package/dist/components/UTTextInput/theme.js +6 -8
- package/dist/components/UTThirdPartyCookieChecker/index.js +1 -2
- package/dist/components/UTToggle/components/ToggleOption/index.js +1 -2
- package/dist/components/UTToggle/index.js +1 -2
- package/dist/components/UTToggle/theme.js +2 -3
- package/dist/components/UTTooltip/index.js +1 -2
- package/dist/components/UTTooltip/theme.js +2 -3
- package/dist/components/UTTopbar/components/Notifications/index.js +1 -2
- package/dist/components/UTTopbar/components/UserMenu/index.js +3 -3
- package/dist/components/UTTopbar/index.js +9 -8
- package/dist/components/UTTopbar/theme.js +36 -45
- package/dist/components/UTTopbar/types.js +5 -9
- package/dist/components/UTTouchableWithoutFeedback/index.js +1 -2
- package/dist/components/UTVirtualizedList/components/VirtualizedData/components/ListRow/constants.js +2 -4
- package/dist/components/UTVirtualizedList/components/VirtualizedData/components/ListRow/index.js +1 -2
- package/dist/components/UTVirtualizedList/components/VirtualizedData/components/ListRow/utils.js +2 -3
- package/dist/components/UTVirtualizedList/components/VirtualizedData/constants.js +6 -12
- package/dist/components/UTVirtualizedList/components/VirtualizedData/hooks/use-ledger.js +1 -2
- package/dist/components/UTVirtualizedList/components/VirtualizedData/hooks/use-virtualized-data.js +1 -2
- package/dist/components/UTVirtualizedList/components/VirtualizedData/index.js +1 -2
- package/dist/components/UTVirtualizedList/components/VirtualizedData/utils.js +8 -15
- package/dist/components/UTVirtualizedList/constants.js +4 -8
- package/dist/components/UTVirtualizedList/index.js +1 -2
- package/dist/components/UTWorkflowContainer/components/ActionButton/index.js +1 -2
- package/dist/components/UTWorkflowContainer/constants.js +4 -12
- package/dist/components/UTWorkflowContainer/hooks/use-previous.js +2 -3
- package/dist/components/UTWorkflowContainer/index.js +8 -12
- package/dist/components/UTWorkflowContainer/styles.module.scss +1 -1
- package/dist/components/UTWorkflowContainer/theme.js +2 -3
- package/dist/components/UTWorkflowContainer/types.js +2 -3
- package/dist/components/WithLoading/index.js +1 -2
- package/dist/components/WithTheme/index.js +1 -2
- package/dist/components/WithTheme/layout.js +1 -2
- package/dist/components/WithTouch/index.js +1 -2
- package/dist/constants/UTTable.js +2 -3
- package/dist/theme.js +3 -6
- package/dist/types/commonTypes.js +3 -5
- package/dist/types/consumptionTypes.js +3 -5
- package/dist/types/formTypes.js +7 -10
- package/dist/types/tableTypes.js +2 -3
- package/dist/utils/classesUtils.js +3 -5
- package/dist/utils/componentUtils.js +2 -3
- package/dist/utils/helperFunctions.js +2 -3
- package/dist/utils/shadowUtils.js +2 -3
- package/dist/utils/useScreenSize.js +2 -3
- package/package.json +2 -2
|
@@ -8,15 +8,14 @@ var _react = _interopRequireDefault(require("react"));
|
|
|
8
8
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
9
9
|
/* eslint-disable react/prop-types */
|
|
10
10
|
|
|
11
|
-
var SHADES = {
|
|
11
|
+
var SHADES = exports.SHADES = {
|
|
12
12
|
shade01: '01',
|
|
13
13
|
shade02: '02',
|
|
14
14
|
shade03: '03',
|
|
15
15
|
shade04: '04',
|
|
16
16
|
shade05: '05'
|
|
17
17
|
};
|
|
18
|
-
exports.
|
|
19
|
-
var VARIANTS = {
|
|
18
|
+
var VARIANTS = exports.VARIANTS = {
|
|
20
19
|
title1: 'h1',
|
|
21
20
|
title2: 'h2',
|
|
22
21
|
title3: 'h3',
|
|
@@ -28,8 +27,7 @@ var VARIANTS = {
|
|
|
28
27
|
th: 'th',
|
|
29
28
|
td: 'td'
|
|
30
29
|
};
|
|
31
|
-
exports.
|
|
32
|
-
var VARIANTS_SIZES = {
|
|
30
|
+
var VARIANTS_SIZES = exports.VARIANTS_SIZES = {
|
|
33
31
|
title1: '1.875rem',
|
|
34
32
|
title2: '1.5rem',
|
|
35
33
|
title3: '1.375rem',
|
|
@@ -41,8 +39,7 @@ var VARIANTS_SIZES = {
|
|
|
41
39
|
th: '1rem',
|
|
42
40
|
td: '1rem'
|
|
43
41
|
};
|
|
44
|
-
exports.
|
|
45
|
-
var VARIANTS_LINE_HEIGHT = {
|
|
42
|
+
var VARIANTS_LINE_HEIGHT = exports.VARIANTS_LINE_HEIGHT = {
|
|
46
43
|
title1: '100%',
|
|
47
44
|
title2: '100%',
|
|
48
45
|
title3: '100%',
|
|
@@ -54,8 +51,7 @@ var VARIANTS_LINE_HEIGHT = {
|
|
|
54
51
|
th: '1.375rem',
|
|
55
52
|
td: '1.375rem'
|
|
56
53
|
};
|
|
57
|
-
exports.
|
|
58
|
-
var WEIGHTS = {
|
|
54
|
+
var WEIGHTS = exports.WEIGHTS = {
|
|
59
55
|
thin: 100,
|
|
60
56
|
extralight: 200,
|
|
61
57
|
light: 300,
|
|
@@ -66,8 +62,7 @@ var WEIGHTS = {
|
|
|
66
62
|
extrabold: 800,
|
|
67
63
|
black: 900
|
|
68
64
|
};
|
|
69
|
-
exports.
|
|
70
|
-
var COLOR_THEMES = {
|
|
65
|
+
var COLOR_THEMES = exports.COLOR_THEMES = {
|
|
71
66
|
dark: 'dark',
|
|
72
67
|
gray: 'gray',
|
|
73
68
|
light: 'light',
|
|
@@ -76,8 +71,7 @@ var COLOR_THEMES = {
|
|
|
76
71
|
warning: 'warning',
|
|
77
72
|
information: 'information'
|
|
78
73
|
};
|
|
79
|
-
exports.
|
|
80
|
-
var MARKDOWN_RENDERERS = {
|
|
74
|
+
var MARKDOWN_RENDERERS = exports.MARKDOWN_RENDERERS = {
|
|
81
75
|
a: function a(_ref) {
|
|
82
76
|
var href = _ref.href,
|
|
83
77
|
children = _ref.children;
|
|
@@ -88,13 +82,11 @@ var MARKDOWN_RENDERERS = {
|
|
|
88
82
|
}, children);
|
|
89
83
|
}
|
|
90
84
|
};
|
|
91
|
-
exports.
|
|
92
|
-
var DEFAULT_PROPS = {
|
|
85
|
+
var DEFAULT_PROPS = exports.DEFAULT_PROPS = {
|
|
93
86
|
colorTheme: 'dark',
|
|
94
87
|
field: {},
|
|
95
88
|
markdownRenderers: MARKDOWN_RENDERERS,
|
|
96
89
|
variant: 'body',
|
|
97
90
|
weight: 'regular',
|
|
98
91
|
withMarkdown: false
|
|
99
|
-
};
|
|
100
|
-
exports.DEFAULT_PROPS = DEFAULT_PROPS;
|
|
92
|
+
};
|
|
@@ -61,5 +61,4 @@ UTLabel.propTypes = {
|
|
|
61
61
|
variant: _propTypes.string,
|
|
62
62
|
withMarkdown: _propTypes.bool
|
|
63
63
|
};
|
|
64
|
-
var _default = (0, _WithTheme.default)(_theme.retrieveStyle)(UTLabel);
|
|
65
|
-
exports.default = _default;
|
|
64
|
+
var _default = exports.default = (0, _WithTheme.default)(_theme.retrieveStyle)(UTLabel);
|
|
@@ -10,18 +10,16 @@ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { de
|
|
|
10
10
|
var getDefaultColorShade = function getDefaultColorShade(colorTheme) {
|
|
11
11
|
return colorTheme === _constants.COLOR_THEMES.gray ? _constants.SHADES.shade04 : colorTheme === _constants.COLOR_THEMES.light ? _constants.SHADES.shade01 : _constants.SHADES.shade05;
|
|
12
12
|
};
|
|
13
|
-
var variantsColorTheme = function variantsColorTheme(colorTheme, shade, theme) {
|
|
13
|
+
var variantsColorTheme = exports.variantsColorTheme = function variantsColorTheme(colorTheme, shade, theme) {
|
|
14
14
|
var colorThemeDefinition = theme.Palette[colorTheme] || theme.Palette.actions[colorTheme] || theme.Palette[_constants.DEFAULT_PROPS.colorTheme];
|
|
15
15
|
var colorShade = Object.values(_constants.SHADES).includes(shade) ? shade : getDefaultColorShade(colorTheme);
|
|
16
16
|
return colorThemeDefinition[colorShade] || _colorsModule.default.black;
|
|
17
17
|
};
|
|
18
|
-
exports.
|
|
19
|
-
var linkColor = function linkColor(theme, colorTheme) {
|
|
18
|
+
var linkColor = exports.linkColor = function linkColor(theme, colorTheme) {
|
|
20
19
|
var color = colorTheme === _constants.COLOR_THEMES.light ? theme.Palette.actions.negative[_constants.SHADES.shade05] : colorTheme === _constants.COLOR_THEMES.error ? theme.Palette.actions.error[_constants.SHADES.shade05] : theme.Palette.actions.neutral[_constants.SHADES.shade05];
|
|
21
20
|
return color;
|
|
22
21
|
};
|
|
23
|
-
exports.
|
|
24
|
-
var retrieveStyle = function retrieveStyle(_ref) {
|
|
22
|
+
var retrieveStyle = exports.retrieveStyle = function retrieveStyle(_ref) {
|
|
25
23
|
var _field$configuration$, _field$configuration, _field$configuration$2, _field$configuration2, _theme$Fonts, _field$configuration$3, _field$configuration3, _field$configuration$4, _field$configuration4, _field$configuration$5, _field$configuration5;
|
|
26
24
|
var colorTheme = _ref.colorTheme,
|
|
27
25
|
field = _ref.field,
|
|
@@ -42,5 +40,4 @@ var retrieveStyle = function retrieveStyle(_ref) {
|
|
|
42
40
|
}
|
|
43
41
|
}
|
|
44
42
|
};
|
|
45
|
-
};
|
|
46
|
-
exports.retrieveStyle = retrieveStyle;
|
|
43
|
+
};
|
|
@@ -6,11 +6,10 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
6
6
|
exports.polygonDefaultOptions = exports.googleMapDefaultOptions = void 0;
|
|
7
7
|
var _colorsModule = _interopRequireDefault(require("../../../../scss/variables/colors.module.scss"));
|
|
8
8
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
9
|
-
var googleMapDefaultOptions = {
|
|
9
|
+
var googleMapDefaultOptions = exports.googleMapDefaultOptions = {
|
|
10
10
|
mapTypeControl: false
|
|
11
11
|
};
|
|
12
|
-
exports.
|
|
13
|
-
var polygonDefaultOptions = function polygonDefaultOptions(colorPolygon, colorBorderPolygon) {
|
|
12
|
+
var polygonDefaultOptions = exports.polygonDefaultOptions = function polygonDefaultOptions(colorPolygon, colorBorderPolygon) {
|
|
14
13
|
return {
|
|
15
14
|
strokeWeight: 2,
|
|
16
15
|
strokeOpacity: 0.8,
|
|
@@ -18,5 +17,4 @@ var polygonDefaultOptions = function polygonDefaultOptions(colorPolygon, colorBo
|
|
|
18
17
|
fillColor: colorPolygon || _colorsModule.default.map,
|
|
19
18
|
fillOpacity: 0.35
|
|
20
19
|
};
|
|
21
|
-
};
|
|
22
|
-
exports.polygonDefaultOptions = polygonDefaultOptions;
|
|
20
|
+
};
|
|
@@ -104,5 +104,4 @@ var GoogleMaps = /*#__PURE__*/function (_PureComponent) {
|
|
|
104
104
|
return GoogleMaps;
|
|
105
105
|
}(_react.PureComponent);
|
|
106
106
|
GoogleMaps.propTypes = _types.GoogleMapsPropTypes;
|
|
107
|
-
var _default = (0, _reactGoogleMaps.withGoogleMap)(GoogleMaps);
|
|
108
|
-
exports.default = _default;
|
|
107
|
+
var _default = exports.default = (0, _reactGoogleMaps.withGoogleMap)(GoogleMaps);
|
|
@@ -4,7 +4,7 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
6
|
exports.default = void 0;
|
|
7
|
-
var _default = {
|
|
7
|
+
var _default = exports.default = {
|
|
8
8
|
searchBox: {
|
|
9
9
|
border: "1px solid rgba(0,0,0,0.24)",
|
|
10
10
|
boxSizing: 'border-box',
|
|
@@ -19,5 +19,4 @@ var _default = {
|
|
|
19
19
|
textOverflow: 'ellipses',
|
|
20
20
|
textAlign: 'left'
|
|
21
21
|
}
|
|
22
|
-
};
|
|
23
|
-
exports.default = _default;
|
|
22
|
+
};
|
|
@@ -4,31 +4,25 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
6
|
exports.ZOOM_INITIAL = exports.ZOOM_ADDRESS_VALID = exports.TEXTS = exports.LOCATION_TYPES = exports.GMAP_PARAMS = exports.ADDRESS_TYPES = void 0;
|
|
7
|
-
var GMAP_PARAMS = {
|
|
7
|
+
var GMAP_PARAMS = exports.GMAP_PARAMS = {
|
|
8
8
|
latitude: 'latitude',
|
|
9
9
|
longitude: 'longitude',
|
|
10
10
|
formattedAddress: 'formatted_address'
|
|
11
11
|
};
|
|
12
|
-
exports.
|
|
13
|
-
var TEXTS = {
|
|
12
|
+
var TEXTS = exports.TEXTS = {
|
|
14
13
|
retrievingLocation: 'Estamos recuperando tu ubicación...',
|
|
15
14
|
retrieveLocationError: 'No pudimos determinar tu ubicación.',
|
|
16
15
|
invalidConfig: 'No se encuentran configuradas en el field las keys a utilizar para alguno de los siguientes campos: latitude, longitude y/o formatted_address',
|
|
17
16
|
placeholder: 'Ingresá una dirección'
|
|
18
17
|
};
|
|
19
|
-
exports.
|
|
20
|
-
var LOCATION_TYPES = {
|
|
18
|
+
var LOCATION_TYPES = exports.LOCATION_TYPES = {
|
|
21
19
|
rooftop: 'ROOFTOP',
|
|
22
20
|
rangeInterpolated: 'RANGE_INTERPOLATED',
|
|
23
21
|
geometricCenter: 'GEOMETRIC_CENTER'
|
|
24
22
|
};
|
|
25
|
-
exports.
|
|
26
|
-
var ADDRESS_TYPES = {
|
|
23
|
+
var ADDRESS_TYPES = exports.ADDRESS_TYPES = {
|
|
27
24
|
street: 'street_address',
|
|
28
25
|
route: 'route'
|
|
29
26
|
};
|
|
30
|
-
exports.
|
|
31
|
-
var
|
|
32
|
-
exports.ZOOM_INITIAL = ZOOM_INITIAL;
|
|
33
|
-
var ZOOM_ADDRESS_VALID = 15;
|
|
34
|
-
exports.ZOOM_ADDRESS_VALID = ZOOM_ADDRESS_VALID;
|
|
27
|
+
var ZOOM_INITIAL = exports.ZOOM_INITIAL = 10;
|
|
28
|
+
var ZOOM_ADDRESS_VALID = exports.ZOOM_ADDRESS_VALID = 15;
|
|
@@ -7,7 +7,7 @@ exports.UTMapPropTypes = exports.GoogleMapsPropTypes = void 0;
|
|
|
7
7
|
var _propTypes = require("prop-types");
|
|
8
8
|
var _formTypes = require("../../types/formTypes");
|
|
9
9
|
var coordinatePropType = (0, _propTypes.oneOfType)([_propTypes.number, _propTypes.func]);
|
|
10
|
-
var UTMapPropTypes = {
|
|
10
|
+
var UTMapPropTypes = exports.UTMapPropTypes = {
|
|
11
11
|
onChange: _propTypes.func.isRequired,
|
|
12
12
|
singleMarker: _propTypes.bool,
|
|
13
13
|
startLocation: (0, _propTypes.shape)({
|
|
@@ -36,8 +36,7 @@ var UTMapPropTypes = {
|
|
|
36
36
|
input: _formTypes.inputPropTypes,
|
|
37
37
|
disabled: _propTypes.bool
|
|
38
38
|
};
|
|
39
|
-
exports.
|
|
40
|
-
var GoogleMapsPropTypes = {
|
|
39
|
+
var GoogleMapsPropTypes = exports.GoogleMapsPropTypes = {
|
|
41
40
|
onMapClick: _propTypes.func.isRequired,
|
|
42
41
|
onMarkerRightClick: _propTypes.func.isRequired,
|
|
43
42
|
center: (0, _propTypes.shape)({
|
|
@@ -65,5 +64,4 @@ var GoogleMapsPropTypes = {
|
|
|
65
64
|
searchValue: _propTypes.any,
|
|
66
65
|
zoom: _propTypes.number,
|
|
67
66
|
showOnlyMap: _propTypes.bool
|
|
68
|
-
};
|
|
69
|
-
exports.GoogleMapsPropTypes = GoogleMapsPropTypes;
|
|
67
|
+
};
|
|
@@ -12,15 +12,14 @@ function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t =
|
|
|
12
12
|
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; }
|
|
13
13
|
function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return _typeof(key) === "symbol" ? key : String(key); }
|
|
14
14
|
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); }
|
|
15
|
-
var geolocation = function geolocation(message) {
|
|
15
|
+
var geolocation = exports.geolocation = function geolocation(message) {
|
|
16
16
|
return navigator.geolocation ? navigator.geolocation : {
|
|
17
17
|
getCurrentPosition: function getCurrentPosition(success, failure) {
|
|
18
18
|
failure(message);
|
|
19
19
|
}
|
|
20
20
|
};
|
|
21
21
|
};
|
|
22
|
-
exports.
|
|
23
|
-
var checkAddressIsValid = function checkAddressIsValid(latLng, usePolygon, polygon) {
|
|
22
|
+
var checkAddressIsValid = exports.checkAddressIsValid = function checkAddressIsValid(latLng, usePolygon, polygon) {
|
|
24
23
|
// Check if a position is included on Utility polygon or if utility hasn't setted a polygon
|
|
25
24
|
// To set map in this position
|
|
26
25
|
var utilityPolygon = new window.google.maps.Polygon({
|
|
@@ -28,8 +27,7 @@ var checkAddressIsValid = function checkAddressIsValid(latLng, usePolygon, polyg
|
|
|
28
27
|
});
|
|
29
28
|
return !usePolygon || window.google.maps.geometry.poly.containsLocation(latLng, utilityPolygon);
|
|
30
29
|
};
|
|
31
|
-
exports.
|
|
32
|
-
var retrieveAddressByCoords = function retrieveAddressByCoords(_ref, onAddressFoundCallback) {
|
|
30
|
+
var retrieveAddressByCoords = exports.retrieveAddressByCoords = function retrieveAddressByCoords(_ref, onAddressFoundCallback) {
|
|
33
31
|
var location = _ref.location,
|
|
34
32
|
address = _ref.address;
|
|
35
33
|
var geocoder = new window.google.maps.Geocoder();
|
|
@@ -63,15 +61,13 @@ var retrieveAddressByCoords = function retrieveAddressByCoords(_ref, onAddressFo
|
|
|
63
61
|
}
|
|
64
62
|
});
|
|
65
63
|
};
|
|
66
|
-
exports.
|
|
67
|
-
var findAddressComponent = function findAddressComponent(address, component) {
|
|
64
|
+
var findAddressComponent = exports.findAddressComponent = function findAddressComponent(address, component) {
|
|
68
65
|
var addrComponent = address.address_components.find(function (attribute) {
|
|
69
66
|
return attribute.types.includes(component);
|
|
70
67
|
});
|
|
71
68
|
return addrComponent && addrComponent.long_name;
|
|
72
69
|
};
|
|
73
|
-
exports.
|
|
74
|
-
var getValue = function getValue(address, latLng, paramName) {
|
|
70
|
+
var getValue = exports.getValue = function getValue(address, latLng, paramName) {
|
|
75
71
|
switch (paramName) {
|
|
76
72
|
case _constants.GMAP_PARAMS.latitude:
|
|
77
73
|
return latLng.lat();
|
|
@@ -84,8 +80,6 @@ var getValue = function getValue(address, latLng, paramName) {
|
|
|
84
80
|
}
|
|
85
81
|
};
|
|
86
82
|
// configuration.address_components
|
|
87
|
-
exports.
|
|
88
|
-
var isValidConfiguration = function isValidConfiguration(field) {
|
|
83
|
+
var isValidConfiguration = exports.isValidConfiguration = function isValidConfiguration(field) {
|
|
89
84
|
return field && field.configuration && field.configuration.address_components && field.configuration.address_components[_constants.GMAP_PARAMS.latitude] && field.configuration.address_components[_constants.GMAP_PARAMS.longitude] && field.configuration.address_components[_constants.GMAP_PARAMS.formattedAddress];
|
|
90
|
-
};
|
|
91
|
-
exports.isValidConfiguration = isValidConfiguration;
|
|
85
|
+
};
|
|
@@ -36,34 +36,34 @@ function _iterableToArrayLimit(r, l) { var t = null == r ? null : "undefined" !=
|
|
|
36
36
|
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
37
37
|
var UTMenu = function UTMenu(_ref) {
|
|
38
38
|
var anchor = _ref.anchor,
|
|
39
|
+
animation = _ref.animation,
|
|
40
|
+
animatorProps = _ref.animatorProps,
|
|
41
|
+
arrowProps = _ref.arrowProps,
|
|
42
|
+
themeClasses = _ref.classes,
|
|
43
|
+
classNames = _ref.classNames,
|
|
44
|
+
clickAwayListenerProps = _ref.clickAwayListenerProps,
|
|
39
45
|
_ref$contextData = _ref.contextData,
|
|
40
46
|
contextData = _ref$contextData === void 0 ? {} : _ref$contextData,
|
|
41
|
-
|
|
47
|
+
elevation = _ref.elevation,
|
|
48
|
+
iconBefore = _ref.iconBefore,
|
|
42
49
|
ItemComponent = _ref.ItemComponent,
|
|
50
|
+
itemIconProps = _ref.itemIconProps,
|
|
43
51
|
itemProps = _ref.itemProps,
|
|
44
52
|
items = _ref.items,
|
|
45
53
|
LastItem = _ref.LastItem,
|
|
54
|
+
lockScreenEnabled = _ref.lockScreenEnabled,
|
|
46
55
|
menuItemProps = _ref.menuItemProps,
|
|
47
|
-
popperProps = _ref.popperProps,
|
|
48
|
-
animatorProps = _ref.animatorProps,
|
|
49
|
-
paperProps = _ref.paperProps,
|
|
50
|
-
scrollBarProps = _ref.scrollBarProps,
|
|
51
|
-
arrowProps = _ref.arrowProps,
|
|
52
|
-
clickAwayListenerProps = _ref.clickAwayListenerProps,
|
|
53
56
|
menuListProps = _ref.menuListProps,
|
|
54
|
-
elevation = _ref.elevation,
|
|
55
57
|
menuPlacement = _ref.menuPlacement,
|
|
56
|
-
themeClasses = _ref.classes,
|
|
57
|
-
classNames = _ref.classNames,
|
|
58
|
-
withArrow = _ref.withArrow,
|
|
59
|
-
onClickItem = _ref.onClickItem,
|
|
60
|
-
lockScreenEnabled = _ref.lockScreenEnabled,
|
|
61
58
|
modifiers = _ref.modifiers,
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
59
|
+
onClickItem = _ref.onClickItem,
|
|
60
|
+
onClose = _ref.onClose,
|
|
61
|
+
paperProps = _ref.paperProps,
|
|
62
|
+
popperProps = _ref.popperProps,
|
|
63
|
+
scrollBarProps = _ref.scrollBarProps,
|
|
64
|
+
withArrow = _ref.withArrow,
|
|
65
|
+
withDivider = _ref.withDivider,
|
|
66
|
+
withMenuItem = _ref.withMenuItem;
|
|
67
67
|
var blockerRef = (0, _react.useRef)(null);
|
|
68
68
|
var classes = (0, _react.useMemo)(function () {
|
|
69
69
|
return (0, _classesUtils.mergeClasses)(themeClasses, classNames);
|
|
@@ -151,11 +151,11 @@ var UTMenu = function UTMenu(_ref) {
|
|
|
151
151
|
onClick: handleClick
|
|
152
152
|
}, menuItemProps), iconBefore && item.Icon && /*#__PURE__*/_react.default.createElement(item.Icon, _extends({
|
|
153
153
|
className: classes.menuItemIcon
|
|
154
|
-
}, itemIconProps)), /*#__PURE__*/_react.default.createElement(_UTLabel.default, _extends({
|
|
154
|
+
}, itemIconProps, item.iconProps)), /*#__PURE__*/_react.default.createElement(_UTLabel.default, _extends({
|
|
155
155
|
className: classes.menuItem
|
|
156
|
-
}, itemProps), item.label), !iconBefore && item.Icon && /*#__PURE__*/_react.default.createElement(item.Icon, _extends({
|
|
156
|
+
}, itemProps, item.labelProps), item.label), !iconBefore && item.Icon && /*#__PURE__*/_react.default.createElement(item.Icon, _extends({
|
|
157
157
|
className: classes.menuItemIcon
|
|
158
|
-
}, itemIconProps)));
|
|
158
|
+
}, itemIconProps, item.iconProps)));
|
|
159
159
|
}))), LastItem && /*#__PURE__*/_react.default.createElement(LastItem, null))))));
|
|
160
160
|
}), /*#__PURE__*/_react.default.createElement("div", {
|
|
161
161
|
ref: blockerRef,
|
|
@@ -163,53 +163,51 @@ var UTMenu = function UTMenu(_ref) {
|
|
|
163
163
|
}));
|
|
164
164
|
};
|
|
165
165
|
UTMenu.defaultProps = {
|
|
166
|
-
|
|
167
|
-
menuItemProps: {},
|
|
168
|
-
popperProps: {},
|
|
169
|
-
scrollBarProps: {},
|
|
166
|
+
animation: 'grow',
|
|
170
167
|
animatorProps: {},
|
|
171
|
-
|
|
168
|
+
arrowProps: {},
|
|
172
169
|
clickAwayListenerProps: {},
|
|
170
|
+
elevation: 5,
|
|
171
|
+
iconBefore: false,
|
|
172
|
+
lockScreenEnabled: false,
|
|
173
|
+
menuItemProps: {},
|
|
173
174
|
menuListProps: {},
|
|
174
175
|
menuPlacement: 'bottom',
|
|
175
|
-
withArrow: false,
|
|
176
|
-
arrowProps: {},
|
|
177
|
-
elevation: 5,
|
|
178
176
|
onClickItem: undefined,
|
|
179
|
-
|
|
180
|
-
|
|
177
|
+
paperProps: {},
|
|
178
|
+
popperProps: {},
|
|
179
|
+
scrollBarProps: {},
|
|
180
|
+
withArrow: false
|
|
181
181
|
};
|
|
182
182
|
UTMenu.propTypes = {
|
|
183
183
|
anchor: (0, _propTypes.oneOfType)([_commonTypes.refType, _propTypes.elementType]),
|
|
184
|
+
animation: _propTypes.string,
|
|
185
|
+
animatorProps: _propTypes.object,
|
|
186
|
+
arrowProps: _propTypes.object,
|
|
187
|
+
classes: (0, _propTypes.objectOf)(_propTypes.string),
|
|
188
|
+
classNames: (0, _propTypes.objectOf)(_propTypes.string),
|
|
189
|
+
clickAwayListenerProps: _propTypes.object,
|
|
184
190
|
contextData: _propTypes.object,
|
|
185
|
-
|
|
191
|
+
elevation: _propTypes.number,
|
|
192
|
+
iconBefore: _propTypes.bool,
|
|
186
193
|
ItemComponent: _propTypes.elementType,
|
|
187
|
-
|
|
194
|
+
itemIconProps: _propTypes.object,
|
|
188
195
|
itemProps: _propTypes.object,
|
|
196
|
+
items: _propTypes.array,
|
|
189
197
|
LastItem: _propTypes.elementType,
|
|
198
|
+
lockScreenEnabled: _propTypes.bool,
|
|
190
199
|
MenuItemClassName: _propTypes.string,
|
|
191
200
|
menuItemProps: _propTypes.object,
|
|
192
|
-
clickAwayListenerProps: _propTypes.object,
|
|
193
|
-
paperProps: _propTypes.object,
|
|
194
|
-
scrollBarProps: _propTypes.object,
|
|
195
|
-
itemIconProps: _propTypes.object,
|
|
196
|
-
animatorProps: _propTypes.object,
|
|
197
|
-
popperProps: _propTypes.object,
|
|
198
|
-
arrowProps: _propTypes.object,
|
|
199
201
|
menuListProps: _propTypes.object,
|
|
200
|
-
elevation: _propTypes.number,
|
|
201
202
|
menuPlacement: _propTypes.string,
|
|
202
|
-
classes: (0, _propTypes.objectOf)(_propTypes.string),
|
|
203
|
-
classNames: (0, _propTypes.objectOf)(_propTypes.string),
|
|
204
|
-
themeClasses: (0, _propTypes.objectOf)(_propTypes.string),
|
|
205
|
-
withArrow: _propTypes.bool,
|
|
206
|
-
lockScreenEnabled: _propTypes.bool,
|
|
207
203
|
modifiers: (0, _propTypes.objectOf)(_propTypes.string),
|
|
208
204
|
onClickItem: _propTypes.func,
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
205
|
+
onClose: _propTypes.func.isRequired,
|
|
206
|
+
paperProps: _propTypes.object,
|
|
207
|
+
popperProps: _propTypes.object,
|
|
208
|
+
scrollBarProps: _propTypes.object,
|
|
209
|
+
withArrow: _propTypes.bool,
|
|
210
|
+
withDivider: _propTypes.bool,
|
|
211
|
+
withMenuItem: _propTypes.bool
|
|
213
212
|
};
|
|
214
|
-
var _default = (0, _WithTheme.default)(_theme.retrieveStyle, _theme.retrieveMuiTheme)(UTMenu);
|
|
215
|
-
exports.default = _default;
|
|
213
|
+
var _default = exports.default = (0, _WithTheme.default)(_theme.retrieveStyle, _theme.retrieveMuiTheme)(UTMenu);
|
|
@@ -5,7 +5,7 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
5
5
|
});
|
|
6
6
|
exports.retrieveStyle = exports.retrieveMuiTheme = void 0;
|
|
7
7
|
var _styles = require("@material-ui/core/styles");
|
|
8
|
-
var retrieveStyle = function retrieveStyle(_ref) {
|
|
8
|
+
var retrieveStyle = exports.retrieveStyle = function retrieveStyle(_ref) {
|
|
9
9
|
var _theme$UTMenu, _theme$UTMenu2, _theme$UTMenu3, _theme$UTMenu4, _theme$UTMenu5, _theme$UTMenu6, _theme$UTMenu7, _theme$UTMenu8, _theme$UTMenu9, _theme$UTMenu10, _theme$UTMenu11, _theme$UTMenu12, _theme$UTMenu13, _theme$UTMenu14, _theme$UTMenu15, _theme$UTMenu16, _theme$UTMenu17, _theme$UTMenu18, _theme$UTMenu19;
|
|
10
10
|
var theme = _ref.theme;
|
|
11
11
|
return {
|
|
@@ -45,8 +45,7 @@ var retrieveStyle = function retrieveStyle(_ref) {
|
|
|
45
45
|
}
|
|
46
46
|
};
|
|
47
47
|
};
|
|
48
|
-
exports.
|
|
49
|
-
var retrieveMuiTheme = function retrieveMuiTheme(theme) {
|
|
48
|
+
var retrieveMuiTheme = exports.retrieveMuiTheme = function retrieveMuiTheme(theme) {
|
|
50
49
|
var _theme$UTMenu20, _theme$UTMenu21;
|
|
51
50
|
return (0, _styles.createTheme)({
|
|
52
51
|
overrides: {
|
|
@@ -58,5 +57,4 @@ var retrieveMuiTheme = function retrieveMuiTheme(theme) {
|
|
|
58
57
|
}
|
|
59
58
|
}
|
|
60
59
|
});
|
|
61
|
-
};
|
|
62
|
-
exports.retrieveMuiTheme = retrieveMuiTheme;
|
|
60
|
+
};
|
|
@@ -5,22 +5,18 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
5
5
|
});
|
|
6
6
|
exports.lockScreen = exports.getTransitionOrigin = exports.getScrollbarWidth = exports.bodyHasScroll = void 0;
|
|
7
7
|
var _browser = require("@widergy/web-utils/lib/browser");
|
|
8
|
-
var getTransitionOrigin = function getTransitionOrigin(placement) {
|
|
8
|
+
var getTransitionOrigin = exports.getTransitionOrigin = function getTransitionOrigin(placement) {
|
|
9
9
|
return placement.search('bottom') >= 0 ? placement.replace('bottom', 'top') : placement.search('top') >= 0 ? placement.replace('top', 'bottom') : placement;
|
|
10
10
|
};
|
|
11
|
-
exports.
|
|
12
|
-
var bodyHasScroll = function bodyHasScroll() {
|
|
11
|
+
var bodyHasScroll = exports.bodyHasScroll = function bodyHasScroll() {
|
|
13
12
|
return document.body && document.body.scrollHeight && window.innerHeight ? document.body.scrollHeight > window.innerHeight : false;
|
|
14
13
|
};
|
|
15
|
-
exports.
|
|
16
|
-
var getScrollbarWidth = function getScrollbarWidth() {
|
|
14
|
+
var getScrollbarWidth = exports.getScrollbarWidth = function getScrollbarWidth() {
|
|
17
15
|
return document.body && document.body.clientWidth && window.innerWidth ? window.innerWidth - document.body.clientWidth : 0;
|
|
18
16
|
};
|
|
19
|
-
exports.
|
|
20
|
-
var lockScreen = function lockScreen(blocker, lock) {
|
|
17
|
+
var lockScreen = exports.lockScreen = function lockScreen(blocker, lock) {
|
|
21
18
|
var body = document.getElementsByTagName('body')[0];
|
|
22
19
|
body.style.paddingRight = lock && (0, _browser.isDesktop)(1024) && bodyHasScroll() ? "".concat(getScrollbarWidth(), "px") : '';
|
|
23
20
|
body.style.overflow = lock ? 'hidden' : '';
|
|
24
21
|
blocker.current.style.display = lock ? 'initial' : '';
|
|
25
|
-
};
|
|
26
|
-
exports.lockScreen = lockScreen;
|
|
22
|
+
};
|
|
@@ -71,16 +71,12 @@ ErrorIcon.defaultProps = {
|
|
|
71
71
|
fill: "none",
|
|
72
72
|
xmlns: "http://www.w3.org/2000/svg"
|
|
73
73
|
};
|
|
74
|
-
var STATUSES = {
|
|
74
|
+
var STATUSES = exports.STATUSES = {
|
|
75
75
|
INFO: 'info',
|
|
76
76
|
WARNING: 'warning',
|
|
77
77
|
SUCCESS: 'success',
|
|
78
78
|
ERROR: 'error'
|
|
79
79
|
};
|
|
80
|
-
exports.
|
|
81
|
-
var
|
|
82
|
-
exports.
|
|
83
|
-
var CANCEL_BUTTON_TEXT = 'Cancelar';
|
|
84
|
-
exports.CANCEL_BUTTON_TEXT = CANCEL_BUTTON_TEXT;
|
|
85
|
-
var ACCEPT_BUTTON_TEXT = 'Aceptar';
|
|
86
|
-
exports.ACCEPT_BUTTON_TEXT = ACCEPT_BUTTON_TEXT;
|
|
80
|
+
var STATUS_ICONS = exports.STATUS_ICONS = (_STATUS_ICONS = {}, _defineProperty(_STATUS_ICONS, STATUSES.INFO, InfoIcon), _defineProperty(_STATUS_ICONS, STATUSES.WARNING, WarningIcon), _defineProperty(_STATUS_ICONS, STATUSES.SUCCESS, SuccessIcon), _defineProperty(_STATUS_ICONS, STATUSES.ERROR, ErrorIcon), _STATUS_ICONS);
|
|
81
|
+
var CANCEL_BUTTON_TEXT = exports.CANCEL_BUTTON_TEXT = 'Cancelar';
|
|
82
|
+
var ACCEPT_BUTTON_TEXT = exports.ACCEPT_BUTTON_TEXT = 'Aceptar';
|
|
@@ -103,5 +103,4 @@ UTModal.propTypes = {
|
|
|
103
103
|
status: _propTypes.string,
|
|
104
104
|
title: _propTypes.string
|
|
105
105
|
};
|
|
106
|
-
var _default = (0, _WithTheme.default)(_theme.retrieveStyle)(UTModal);
|
|
107
|
-
exports.default = _default;
|
|
106
|
+
var _default = exports.default = (0, _WithTheme.default)(_theme.retrieveStyle)(UTModal);
|
|
@@ -5,7 +5,7 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
5
5
|
});
|
|
6
6
|
exports.retrieveStyle = void 0;
|
|
7
7
|
var _shadowUtils = require("../../utils/shadowUtils");
|
|
8
|
-
var retrieveStyle = function retrieveStyle(_ref) {
|
|
8
|
+
var retrieveStyle = exports.retrieveStyle = function retrieveStyle(_ref) {
|
|
9
9
|
var _theme$Palette$shadow;
|
|
10
10
|
var theme = _ref.theme;
|
|
11
11
|
return {
|
|
@@ -51,5 +51,4 @@ var retrieveStyle = function retrieveStyle(_ref) {
|
|
|
51
51
|
borderTopColor: theme.Palette.light['04']
|
|
52
52
|
}
|
|
53
53
|
};
|
|
54
|
-
};
|
|
55
|
-
exports.retrieveStyle = retrieveStyle;
|
|
54
|
+
};
|
|
@@ -8,7 +8,7 @@ var _array = require("@widergy/web-utils/lib/array");
|
|
|
8
8
|
var getPrevOption = function getPrevOption(options, index) {
|
|
9
9
|
return index === 0 ? 0 : options[index - 1];
|
|
10
10
|
};
|
|
11
|
-
var getPageSizeOptions = function getPageSizeOptions(originalOptions, totalRows) {
|
|
11
|
+
var getPageSizeOptions = exports.getPageSizeOptions = function getPageSizeOptions(originalOptions, totalRows) {
|
|
12
12
|
var filteredOptions = originalOptions.filter(function (_, index) {
|
|
13
13
|
return getPrevOption(originalOptions, index) < totalRows;
|
|
14
14
|
});
|
|
@@ -22,5 +22,4 @@ var getPageSizeOptions = function getPageSizeOptions(originalOptions, totalRows)
|
|
|
22
22
|
label: Math.min(value, totalRows)
|
|
23
23
|
};
|
|
24
24
|
});
|
|
25
|
-
};
|
|
26
|
-
exports.getPageSizeOptions = getPageSizeOptions;
|
|
25
|
+
};
|
package/dist/components/UTPagination/components/Pagination/components/NavigationButton/index.js
CHANGED
|
@@ -41,5 +41,4 @@ NavigationButton.propTypes = {
|
|
|
41
41
|
label: (0, _propTypes.oneOfType)([_propTypes.string, _propTypes.number]),
|
|
42
42
|
onClick: _propTypes.func
|
|
43
43
|
};
|
|
44
|
-
var _default = /*#__PURE__*/(0, _react.memo)(NavigationButton);
|
|
45
|
-
exports.default = _default;
|
|
44
|
+
var _default = exports.default = /*#__PURE__*/(0, _react.memo)(NavigationButton);
|
|
@@ -11,7 +11,7 @@ function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o =
|
|
|
11
11
|
function _iterableToArray(iter) { if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter); }
|
|
12
12
|
function _arrayWithoutHoles(arr) { if (Array.isArray(arr)) return _arrayLikeToArray(arr); }
|
|
13
13
|
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; }
|
|
14
|
-
var getPageNumbers = function getPageNumbers(totalPages, currentPage, isResponsive) {
|
|
14
|
+
var getPageNumbers = exports.getPageNumbers = function getPageNumbers(totalPages, currentPage, isResponsive) {
|
|
15
15
|
if (isResponsive) return [currentPage];
|
|
16
16
|
if (totalPages <= _constants.MAX_PAGINATION_ITEMS) return _toConsumableArray(Array(totalPages).keys());
|
|
17
17
|
var paginationFactor = _constants.MAX_PAGINATION_ITEMS / 2;
|
|
@@ -20,5 +20,4 @@ var getPageNumbers = function getPageNumbers(totalPages, currentPage, isResponsi
|
|
|
20
20
|
var floorFactor = Math.floor(paginationFactor);
|
|
21
21
|
var ceilFactor = Math.ceil(paginationFactor);
|
|
22
22
|
return _toConsumableArray(Array(currentPage + ceilFactor).keys()).slice(currentPage - floorFactor);
|
|
23
|
-
};
|
|
24
|
-
exports.getPageNumbers = getPageNumbers;
|
|
23
|
+
};
|
|
@@ -4,9 +4,6 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
6
|
exports.PREPOSITION = exports.PAGINATION_LIMIT_DOUBLE_ARROWS = exports.MAX_PAGINATION_ITEMS = void 0;
|
|
7
|
-
var PREPOSITION = 'de';
|
|
8
|
-
exports.
|
|
9
|
-
var
|
|
10
|
-
exports.PAGINATION_LIMIT_DOUBLE_ARROWS = PAGINATION_LIMIT_DOUBLE_ARROWS;
|
|
11
|
-
var MAX_PAGINATION_ITEMS = 5;
|
|
12
|
-
exports.MAX_PAGINATION_ITEMS = MAX_PAGINATION_ITEMS;
|
|
7
|
+
var PREPOSITION = exports.PREPOSITION = 'de';
|
|
8
|
+
var PAGINATION_LIMIT_DOUBLE_ARROWS = exports.PAGINATION_LIMIT_DOUBLE_ARROWS = 10;
|
|
9
|
+
var MAX_PAGINATION_ITEMS = exports.MAX_PAGINATION_ITEMS = 5;
|