@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
|
});
|
|
@@ -14,21 +15,20 @@ var _constants = require("./constants");
|
|
|
14
15
|
var _stylesModule = _interopRequireDefault(require("./styles.module.scss"));
|
|
15
16
|
var _theme = require("./theme");
|
|
16
17
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
17
|
-
function _getRequireWildcardCache(
|
|
18
|
-
function _interopRequireWildcard(
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
colorThemes = {},
|
|
23
|
-
isResponsive,
|
|
24
|
-
onChangePage,
|
|
25
|
-
onChangeRowPerPage,
|
|
26
|
-
page,
|
|
27
|
-
rowsPerPage,
|
|
28
|
-
rowsPerPageOptions,
|
|
29
|
-
totalRows,
|
|
30
|
-
totalRowsLabel
|
|
31
|
-
} = _ref;
|
|
18
|
+
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); }
|
|
19
|
+
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; }
|
|
20
|
+
var UTPagination = function UTPagination(_ref) {
|
|
21
|
+
var classes = _ref.classes,
|
|
22
|
+
_ref$colorThemes = _ref.colorThemes,
|
|
23
|
+
colorThemes = _ref$colorThemes === void 0 ? {} : _ref$colorThemes,
|
|
24
|
+
isResponsive = _ref.isResponsive,
|
|
25
|
+
onChangePage = _ref.onChangePage,
|
|
26
|
+
onChangeRowPerPage = _ref.onChangeRowPerPage,
|
|
27
|
+
page = _ref.page,
|
|
28
|
+
rowsPerPage = _ref.rowsPerPage,
|
|
29
|
+
rowsPerPageOptions = _ref.rowsPerPageOptions,
|
|
30
|
+
totalRows = _ref.totalRows,
|
|
31
|
+
totalRowsLabel = _ref.totalRowsLabel;
|
|
32
32
|
return /*#__PURE__*/_react.default.createElement("div", {
|
|
33
33
|
className: "".concat(_stylesModule.default.paginationContainer, " ").concat(classes.paginationContainer)
|
|
34
34
|
}, /*#__PURE__*/_react.default.createElement(_PageSizeSelector.default, {
|
|
@@ -65,4 +65,5 @@ UTPagination.propTypes = {
|
|
|
65
65
|
totalRows: _propTypes.number,
|
|
66
66
|
totalRowsLabel: _propTypes.string
|
|
67
67
|
};
|
|
68
|
-
var _default =
|
|
68
|
+
var _default = (0, _WithTheme.default)(_theme.retrieveStyle)( /*#__PURE__*/(0, _react.memo)(UTPagination));
|
|
69
|
+
exports.default = _default;
|
|
@@ -6,11 +6,9 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
6
6
|
exports.retrieveStyle = 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
|
-
|
|
9
|
+
var retrieveStyle = function retrieveStyle(_ref) {
|
|
10
10
|
var _theme$UTPagination, _theme$UTPagination2, _theme$Fonts, _theme$UTPagination3, _theme$UTPagination4, _theme$UTPagination5, _theme$UTPagination6, _theme$UTPagination7, _theme$UTPagination8;
|
|
11
|
-
|
|
12
|
-
theme
|
|
13
|
-
} = _ref;
|
|
11
|
+
var theme = _ref.theme;
|
|
14
12
|
return {
|
|
15
13
|
paginationContainer: {
|
|
16
14
|
marginTop: (theme === null || theme === void 0 || (_theme$UTPagination = theme.UTPagination) === null || _theme$UTPagination === void 0 || (_theme$UTPagination = _theme$UTPagination.paginationContainer) === null || _theme$UTPagination === void 0 ? void 0 : _theme$UTPagination.marginTop) || 32
|
|
@@ -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
|
});
|
|
@@ -14,33 +15,40 @@ var _UTButton = _interopRequireDefault(require("../UTButton"));
|
|
|
14
15
|
var _UTLabel = _interopRequireDefault(require("../UTLabel"));
|
|
15
16
|
var _commonTypes = require("../../types/commonTypes");
|
|
16
17
|
var _stylesModule = _interopRequireDefault(require("./styles.module.scss"));
|
|
18
|
+
var _excluded = ["title", "titleIcon", "titleContainer", "perfectScrollbar", "closeButton", "iconClose"];
|
|
17
19
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
20
|
+
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; }
|
|
21
|
+
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; }
|
|
22
|
+
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; }
|
|
23
|
+
function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return _typeof(key) === "symbol" ? key : String(key); }
|
|
24
|
+
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); }
|
|
25
|
+
function _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }
|
|
26
|
+
function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }
|
|
27
|
+
var UTPanel = function UTPanel(_ref) {
|
|
28
|
+
var children = _ref.children,
|
|
29
|
+
_ref$classes = _ref.classes,
|
|
30
|
+
classes = _ref$classes === void 0 ? {} : _ref$classes,
|
|
31
|
+
containerRef = _ref.containerRef,
|
|
32
|
+
_ref$disableScrollbar = _ref.disableScrollbar,
|
|
33
|
+
disableScrollbar = _ref$disableScrollbar === void 0 ? false : _ref$disableScrollbar,
|
|
34
|
+
modalProps = _ref.modalProps,
|
|
35
|
+
onClose = _ref.onClose,
|
|
36
|
+
onEndReachedCallback = _ref.onEndReachedCallback,
|
|
37
|
+
_ref$onOpen = _ref.onOpen,
|
|
38
|
+
onOpen = _ref$onOpen === void 0 ? function () {} : _ref$onOpen,
|
|
39
|
+
open = _ref.open,
|
|
40
|
+
panelSide = _ref.panelSide,
|
|
41
|
+
perfectScrollbarOptions = _ref.perfectScrollbarOptions,
|
|
42
|
+
title = _ref.title,
|
|
43
|
+
TitleComponent = _ref.TitleComponent,
|
|
44
|
+
TitleIcon = _ref.TitleIcon;
|
|
45
|
+
var titleClass = classes.title,
|
|
46
|
+
titleIconClass = classes.titleIcon,
|
|
47
|
+
titleContainerClass = classes.titleContainer,
|
|
48
|
+
perfectScrollbarClass = classes.perfectScrollbar,
|
|
49
|
+
closeButtonClass = classes.closeButton,
|
|
50
|
+
iconCloseClass = classes.iconClose,
|
|
51
|
+
drawerClasses = _objectWithoutProperties(classes, _excluded);
|
|
44
52
|
return /*#__PURE__*/_react.default.createElement(_SwipeableDrawer.default, {
|
|
45
53
|
anchor: panelSide,
|
|
46
54
|
open: open,
|
|
@@ -48,16 +56,14 @@ const UTPanel = _ref => {
|
|
|
48
56
|
onClose: onClose,
|
|
49
57
|
disableSwipeToOpen: true,
|
|
50
58
|
swipeAreaWidth: 0,
|
|
51
|
-
ModalProps: {
|
|
59
|
+
ModalProps: _objectSpread({
|
|
52
60
|
container: containerRef,
|
|
53
|
-
keepMounted: !!containerRef
|
|
54
|
-
|
|
55
|
-
},
|
|
56
|
-
classes: {
|
|
57
|
-
...drawerClasses,
|
|
61
|
+
keepMounted: !!containerRef
|
|
62
|
+
}, modalProps),
|
|
63
|
+
classes: _objectSpread(_objectSpread({}, drawerClasses), {}, {
|
|
58
64
|
paper: "".concat(_stylesModule.default.paper, " ").concat(drawerClasses.paper),
|
|
59
65
|
root: "".concat(containerRef && _stylesModule.default.root, " ").concat(drawerClasses.root)
|
|
60
|
-
}
|
|
66
|
+
})
|
|
61
67
|
}, /*#__PURE__*/_react.default.createElement("div", {
|
|
62
68
|
className: "".concat(_stylesModule.default.titleContainer, " ").concat(titleContainerClass)
|
|
63
69
|
}, TitleComponent || /*#__PURE__*/_react.default.createElement("div", {
|
|
@@ -78,10 +84,9 @@ const UTPanel = _ref => {
|
|
|
78
84
|
})), disableScrollbar ? children : /*#__PURE__*/_react.default.createElement(_reactPerfectScrollbar.default, {
|
|
79
85
|
onYReachEnd: onEndReachedCallback,
|
|
80
86
|
className: "".concat(_stylesModule.default.perfectScrollbar, " ").concat(perfectScrollbarClass),
|
|
81
|
-
options: {
|
|
82
|
-
suppressScrollX: true
|
|
83
|
-
|
|
84
|
-
}
|
|
87
|
+
options: _objectSpread({
|
|
88
|
+
suppressScrollX: true
|
|
89
|
+
}, perfectScrollbarOptions)
|
|
85
90
|
}, children));
|
|
86
91
|
};
|
|
87
92
|
UTPanel.propTypes = {
|
|
@@ -99,4 +104,5 @@ UTPanel.propTypes = {
|
|
|
99
104
|
TitleComponent: (0, _propTypes.oneOfType)([_propTypes.element, _propTypes.elementType]),
|
|
100
105
|
TitleIcon: _propTypes.elementType
|
|
101
106
|
};
|
|
102
|
-
var _default =
|
|
107
|
+
var _default = UTPanel;
|
|
108
|
+
exports.default = _default;
|
package/dist/components/UTPasswordField/components/PasswordValidations/components/Error/index.js
CHANGED
|
@@ -10,18 +10,14 @@ var _propTypes = require("prop-types");
|
|
|
10
10
|
var _UTLabel = _interopRequireDefault(require("../../../../../UTLabel"));
|
|
11
11
|
var _stylesModule = _interopRequireDefault(require("./styles.module.scss"));
|
|
12
12
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
failedIconStyle,
|
|
22
|
-
iconStyle
|
|
23
|
-
} = classes;
|
|
24
|
-
const Icon = ErrorIcon || _Info.default;
|
|
13
|
+
var ErrorMessage = function ErrorMessage(_ref) {
|
|
14
|
+
var assertion = _ref.assertion,
|
|
15
|
+
ErrorIcon = _ref.ErrorIcon,
|
|
16
|
+
classes = _ref.classes,
|
|
17
|
+
error = _ref.error;
|
|
18
|
+
var failedIconStyle = classes.failedIconStyle,
|
|
19
|
+
iconStyle = classes.iconStyle;
|
|
20
|
+
var Icon = ErrorIcon || _Info.default;
|
|
25
21
|
return !assertion && /*#__PURE__*/_react.default.createElement("div", {
|
|
26
22
|
className: _stylesModule.default.container
|
|
27
23
|
}, /*#__PURE__*/_react.default.createElement(Icon, {
|
|
@@ -39,4 +35,5 @@ ErrorMessage.propTypes = {
|
|
|
39
35
|
classes: (0, _propTypes.objectOf)(_propTypes.string),
|
|
40
36
|
error: _propTypes.string
|
|
41
37
|
};
|
|
42
|
-
var _default =
|
|
38
|
+
var _default = ErrorMessage;
|
|
39
|
+
exports.default = _default;
|
|
@@ -12,27 +12,23 @@ var _propTypes = require("prop-types");
|
|
|
12
12
|
var _UTLabel = _interopRequireDefault(require("../../../../../UTLabel"));
|
|
13
13
|
var _stylesModule = _interopRequireDefault(require("./styles.module.scss"));
|
|
14
14
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
const PassedIcon = ValidationPassedIcon || _CheckCircle.default;
|
|
33
|
-
const FailedIcon = ValidationFailedIcon || _Cancel.default;
|
|
34
|
-
const NoValue = NoValueIcon || _FiberManualRecord.default;
|
|
35
|
-
const labelColor = !value && !shouldShowError ? 'gray' : assertion ? 'success' : 'error';
|
|
15
|
+
var Validation = function Validation(_ref) {
|
|
16
|
+
var assertion = _ref.assertion,
|
|
17
|
+
classes = _ref.classes,
|
|
18
|
+
disabled = _ref.disabled,
|
|
19
|
+
NoValueIcon = _ref.NoValueIcon,
|
|
20
|
+
requirement = _ref.requirement,
|
|
21
|
+
shouldShowError = _ref.shouldShowError,
|
|
22
|
+
ValidationFailedIcon = _ref.ValidationFailedIcon,
|
|
23
|
+
ValidationPassedIcon = _ref.ValidationPassedIcon,
|
|
24
|
+
value = _ref.value;
|
|
25
|
+
var passedIconStyle = classes.passedIconStyle,
|
|
26
|
+
failedIconStyle = classes.failedIconStyle,
|
|
27
|
+
iconStyle = classes.iconStyle;
|
|
28
|
+
var PassedIcon = ValidationPassedIcon || _CheckCircle.default;
|
|
29
|
+
var FailedIcon = ValidationFailedIcon || _Cancel.default;
|
|
30
|
+
var NoValue = NoValueIcon || _FiberManualRecord.default;
|
|
31
|
+
var labelColor = !value && !shouldShowError ? 'gray' : assertion ? 'success' : 'error';
|
|
36
32
|
return /*#__PURE__*/_react.default.createElement("div", {
|
|
37
33
|
className: _stylesModule.default.container
|
|
38
34
|
}, value || shouldShowError && !disabled ? assertion ? /*#__PURE__*/_react.default.createElement(PassedIcon, {
|
|
@@ -59,4 +55,5 @@ Validation.propTypes = {
|
|
|
59
55
|
ValidationPassedIcon: _propTypes.elementType,
|
|
60
56
|
value: _propTypes.string
|
|
61
57
|
};
|
|
62
|
-
var _default =
|
|
58
|
+
var _default = Validation;
|
|
59
|
+
exports.default = _default;
|
|
@@ -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
|
});
|
|
@@ -9,76 +10,63 @@ var _propTypes = require("prop-types");
|
|
|
9
10
|
var _formTypes = require("../../../../types/formTypes");
|
|
10
11
|
var _Validation = _interopRequireDefault(require("./components/Validation"));
|
|
11
12
|
var _Error = _interopRequireDefault(require("./components/Error"));
|
|
13
|
+
var _excluded = ["expression"];
|
|
12
14
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
13
|
-
function _getRequireWildcardCache(
|
|
14
|
-
function _interopRequireWildcard(
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
15
|
+
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); }
|
|
16
|
+
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; }
|
|
17
|
+
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; }
|
|
18
|
+
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; }
|
|
19
|
+
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; }
|
|
20
|
+
function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return _typeof(key) === "symbol" ? key : String(key); }
|
|
21
|
+
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); }
|
|
22
|
+
function _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }
|
|
23
|
+
function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }
|
|
24
|
+
var PasswordValidations = function PasswordValidations(_ref) {
|
|
25
|
+
var passwordValidations = _ref.passwordValidations,
|
|
26
|
+
value = _ref.value,
|
|
27
|
+
classes = _ref.classes,
|
|
28
|
+
ValidationFailedIcon = _ref.ValidationFailedIcon,
|
|
29
|
+
ValidationPassedIcon = _ref.ValidationPassedIcon,
|
|
30
|
+
ErrorIcon = _ref.ErrorIcon,
|
|
31
|
+
NoValueIcon = _ref.NoValueIcon,
|
|
32
|
+
meta = _ref.meta,
|
|
33
|
+
disabled = _ref.disabled,
|
|
34
|
+
passwordValidationsWarning = _ref.passwordValidationsWarning;
|
|
35
|
+
var validatedRegExps = passwordValidations.map(function (_ref2) {
|
|
36
|
+
var expression = _ref2.expression,
|
|
37
|
+
regex = _objectWithoutProperties(_ref2, _excluded);
|
|
38
|
+
return _objectSpread({
|
|
39
|
+
assertion: new RegExp(expression).test(value)
|
|
40
|
+
}, regex);
|
|
37
41
|
});
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
error: metaError
|
|
44
|
-
} = meta;
|
|
45
|
-
const validations = validatedRegExps.filter(_ref3 => {
|
|
46
|
-
let {
|
|
47
|
-
requirement
|
|
48
|
-
} = _ref3;
|
|
42
|
+
var errorsContainerStyle = classes.errorsContainerStyle;
|
|
43
|
+
var submitFailed = meta.submitFailed,
|
|
44
|
+
metaError = meta.error;
|
|
45
|
+
var validations = validatedRegExps.filter(function (_ref3) {
|
|
46
|
+
var requirement = _ref3.requirement;
|
|
49
47
|
return requirement;
|
|
50
48
|
});
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
requirement
|
|
54
|
-
} = _ref4;
|
|
49
|
+
var errors = validatedRegExps.filter(function (_ref4) {
|
|
50
|
+
var requirement = _ref4.requirement;
|
|
55
51
|
return !requirement;
|
|
56
52
|
});
|
|
57
|
-
if (metaError && !passwordValidations.map(_ref5
|
|
58
|
-
|
|
59
|
-
error
|
|
60
|
-
} = _ref5;
|
|
53
|
+
if (metaError && !passwordValidations.map(function (_ref5) {
|
|
54
|
+
var error = _ref5.error;
|
|
61
55
|
return error;
|
|
62
56
|
}).includes(metaError)) errors.push({
|
|
63
57
|
error: metaError
|
|
64
58
|
});
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
return !assertion && !(passwordValidationsWarning !== null && passwordValidationsWarning !== void 0 && passwordValidationsWarning.some(_ref7 => {
|
|
71
|
-
let {
|
|
72
|
-
error: warningError
|
|
73
|
-
} = _ref7;
|
|
59
|
+
var showErrors = errors.some(function (_ref6) {
|
|
60
|
+
var assertion = _ref6.assertion,
|
|
61
|
+
error = _ref6.error;
|
|
62
|
+
return !assertion && !(passwordValidationsWarning !== null && passwordValidationsWarning !== void 0 && passwordValidationsWarning.some(function (_ref7) {
|
|
63
|
+
var warningError = _ref7.error;
|
|
74
64
|
return error === warningError;
|
|
75
65
|
}));
|
|
76
66
|
});
|
|
77
|
-
return /*#__PURE__*/_react.default.createElement(_react.Fragment, null, validations.map(_ref8
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
assertion
|
|
81
|
-
} = _ref8;
|
|
67
|
+
return /*#__PURE__*/_react.default.createElement(_react.Fragment, null, validations.map(function (_ref8) {
|
|
68
|
+
var requirement = _ref8.requirement,
|
|
69
|
+
assertion = _ref8.assertion;
|
|
82
70
|
return /*#__PURE__*/_react.default.createElement(_Validation.default, {
|
|
83
71
|
assertion: assertion,
|
|
84
72
|
classes: classes,
|
|
@@ -93,11 +81,9 @@ const PasswordValidations = _ref => {
|
|
|
93
81
|
});
|
|
94
82
|
}), submitFailed && showErrors && /*#__PURE__*/_react.default.createElement("div", {
|
|
95
83
|
className: errorsContainerStyle
|
|
96
|
-
}, errors.map(_ref9
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
assertion
|
|
100
|
-
} = _ref9;
|
|
84
|
+
}, errors.map(function (_ref9) {
|
|
85
|
+
var error = _ref9.error,
|
|
86
|
+
assertion = _ref9.assertion;
|
|
101
87
|
return /*#__PURE__*/_react.default.createElement(_Error.default, {
|
|
102
88
|
ErrorIcon: ErrorIcon,
|
|
103
89
|
classes: classes,
|
|
@@ -127,4 +113,5 @@ PasswordValidations.propTypes = {
|
|
|
127
113
|
meta: _formTypes.metaPropTypes,
|
|
128
114
|
disabled: _propTypes.bool
|
|
129
115
|
};
|
|
130
|
-
var _default =
|
|
116
|
+
var _default = PasswordValidations;
|
|
117
|
+
exports.default = _default;
|
|
@@ -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
|
});
|
|
@@ -9,32 +10,31 @@ var _propTypes = require("prop-types");
|
|
|
9
10
|
var _Divider = _interopRequireDefault(require("@material-ui/core/Divider"));
|
|
10
11
|
var _UTLabel = _interopRequireDefault(require("../../../UTLabel"));
|
|
11
12
|
var _stylesModule = _interopRequireDefault(require("./styles.module.scss"));
|
|
13
|
+
var _excluded = ["expression"];
|
|
12
14
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
};
|
|
15
|
+
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; }
|
|
16
|
+
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; }
|
|
17
|
+
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; }
|
|
18
|
+
function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return _typeof(key) === "symbol" ? key : String(key); }
|
|
19
|
+
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); }
|
|
20
|
+
function _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }
|
|
21
|
+
function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }
|
|
22
|
+
var PasswordWarning = function PasswordWarning(_ref) {
|
|
23
|
+
var classes = _ref.classes,
|
|
24
|
+
passwordValidationsWarning = _ref.passwordValidationsWarning,
|
|
25
|
+
value = _ref.value,
|
|
26
|
+
WarningIcon = _ref.WarningIcon;
|
|
27
|
+
var warningDivider = classes.warningDivider;
|
|
28
|
+
var validatedRegExps = passwordValidationsWarning.map(function (_ref2) {
|
|
29
|
+
var expression = _ref2.expression,
|
|
30
|
+
regex = _objectWithoutProperties(_ref2, _excluded);
|
|
31
|
+
return _objectSpread({
|
|
32
|
+
assertion: new RegExp(expression).test(value)
|
|
33
|
+
}, regex);
|
|
32
34
|
});
|
|
33
|
-
return validatedRegExps.map(_ref3
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
assertion
|
|
37
|
-
} = _ref3;
|
|
35
|
+
return validatedRegExps.map(function (_ref3) {
|
|
36
|
+
var error = _ref3.error,
|
|
37
|
+
assertion = _ref3.assertion;
|
|
38
38
|
return /*#__PURE__*/_react.default.createElement("div", {
|
|
39
39
|
className: assertion ? _stylesModule.default.hide : _stylesModule.default.warningContainer
|
|
40
40
|
}, /*#__PURE__*/_react.default.createElement(_Divider.default, {
|
|
@@ -58,4 +58,5 @@ PasswordWarning.propTypes = {
|
|
|
58
58
|
value: _propTypes.string,
|
|
59
59
|
WarningIcon: _propTypes.elementType
|
|
60
60
|
};
|
|
61
|
-
var _default =
|
|
61
|
+
var _default = PasswordWarning;
|
|
62
|
+
exports.default = _default;
|
|
@@ -12,33 +12,29 @@ var _formTypes = require("../../types/formTypes");
|
|
|
12
12
|
var _theme = require("./theme");
|
|
13
13
|
var _PasswordValidations = _interopRequireDefault(require("./components/PasswordValidations"));
|
|
14
14
|
var _PasswordWarning = _interopRequireDefault(require("./components/PasswordWarning"));
|
|
15
|
+
var _excluded = ["field", "input", "classes", "ValidationPassedIcon", "ValidationFailedIcon", "NoValueIcon", "ErrorIcon", "meta", "disabled", "WarningIcon"];
|
|
15
16
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
16
17
|
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); }
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
showValidations,
|
|
34
|
-
passwordValidationsWarning
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
value
|
|
38
|
-
} = input;
|
|
39
|
-
const {
|
|
40
|
-
validationContainer
|
|
41
|
-
} = classes;
|
|
18
|
+
function _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }
|
|
19
|
+
function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }
|
|
20
|
+
var UTPasswordField = function UTPasswordField(_ref) {
|
|
21
|
+
var field = _ref.field,
|
|
22
|
+
input = _ref.input,
|
|
23
|
+
_ref$classes = _ref.classes,
|
|
24
|
+
classes = _ref$classes === void 0 ? {} : _ref$classes,
|
|
25
|
+
ValidationPassedIcon = _ref.ValidationPassedIcon,
|
|
26
|
+
ValidationFailedIcon = _ref.ValidationFailedIcon,
|
|
27
|
+
NoValueIcon = _ref.NoValueIcon,
|
|
28
|
+
ErrorIcon = _ref.ErrorIcon,
|
|
29
|
+
meta = _ref.meta,
|
|
30
|
+
disabled = _ref.disabled,
|
|
31
|
+
WarningIcon = _ref.WarningIcon,
|
|
32
|
+
otherProps = _objectWithoutProperties(_ref, _excluded);
|
|
33
|
+
var passwordValidations = field.passwordValidations,
|
|
34
|
+
showValidations = field.showValidations,
|
|
35
|
+
passwordValidationsWarning = field.passwordValidationsWarning;
|
|
36
|
+
var value = input.value;
|
|
37
|
+
var validationContainer = classes.validationContainer;
|
|
42
38
|
return /*#__PURE__*/_react.default.createElement("div", null, /*#__PURE__*/_react.default.createElement(_UTTextInput.default, _extends({
|
|
43
39
|
field: field,
|
|
44
40
|
input: input,
|
|
@@ -83,4 +79,5 @@ UTPasswordField.propTypes = {
|
|
|
83
79
|
disabled: _propTypes.bool,
|
|
84
80
|
WarningIcon: _propTypes.elementType
|
|
85
81
|
};
|
|
86
|
-
var _default =
|
|
82
|
+
var _default = (0, _WithTheme.default)(_theme.retrieveStyle)(UTPasswordField);
|
|
83
|
+
exports.default = _default;
|
|
@@ -5,11 +5,9 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
5
5
|
});
|
|
6
6
|
exports.retrieveStyle = void 0;
|
|
7
7
|
var _classesUtils = require("../../utils/classesUtils");
|
|
8
|
-
|
|
8
|
+
var retrieveStyle = function retrieveStyle(_ref) {
|
|
9
9
|
var _theme$UTPasswordFiel, _theme$UTPasswordFiel2, _theme$UTPasswordFiel3, _theme$UTPasswordFiel4;
|
|
10
|
-
|
|
11
|
-
theme
|
|
12
|
-
} = _ref;
|
|
10
|
+
var theme = _ref.theme;
|
|
13
11
|
return {
|
|
14
12
|
iconStyle: {
|
|
15
13
|
height: (theme === null || theme === void 0 || (_theme$UTPasswordFiel = theme.UTPasswordField) === null || _theme$UTPasswordFiel === void 0 || (_theme$UTPasswordFiel = _theme$UTPasswordFiel.icon) === null || _theme$UTPasswordFiel === void 0 ? void 0 : _theme$UTPasswordFiel.size) || '1rem',
|
|
@@ -4,7 +4,7 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
6
|
exports.AREA_CODE_PLACEHOLDER = exports.AREA_CODE_LABEL = exports.AREA_CODES = void 0;
|
|
7
|
-
|
|
7
|
+
var AREA_CODES = [{
|
|
8
8
|
code: '11',
|
|
9
9
|
city: 'AMBA'
|
|
10
10
|
}, {
|
|
@@ -908,5 +908,8 @@ const AREA_CODES = exports.AREA_CODES = [{
|
|
|
908
908
|
code: '3894',
|
|
909
909
|
city: 'BURRUYACÚ'
|
|
910
910
|
}];
|
|
911
|
-
|
|
912
|
-
|
|
911
|
+
exports.AREA_CODES = AREA_CODES;
|
|
912
|
+
var AREA_CODE_PLACEHOLDER = 'Sin 0';
|
|
913
|
+
exports.AREA_CODE_PLACEHOLDER = AREA_CODE_PLACEHOLDER;
|
|
914
|
+
var AREA_CODE_LABEL = 'Cod. área';
|
|
915
|
+
exports.AREA_CODE_LABEL = AREA_CODE_LABEL;
|