contentoh-components-library 21.0.5 → 21.0.8

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.
Files changed (87) hide show
  1. package/dist/components/atoms/CharCounter/CharCounter.stories.js +31 -0
  2. package/dist/components/atoms/CharCounter/index.js +22 -0
  3. package/dist/components/atoms/CharCounter/styles.js +20 -0
  4. package/dist/components/atoms/GeneralInput/index.js +78 -49
  5. package/dist/components/atoms/GeneralInput/styles.js +4 -1
  6. package/dist/components/atoms/GradientPanel/styles.js +2 -2
  7. package/dist/components/atoms/InputFormatter/index.js +132 -66
  8. package/dist/components/atoms/InputFormatter/styles.js +2 -2
  9. package/dist/components/atoms/ProgressBar/styles.js +1 -1
  10. package/dist/components/atoms/Select/index.js +4 -2
  11. package/dist/components/atoms/Select/style.js +1 -1
  12. package/dist/components/atoms/StatusTag/styles.js +1 -1
  13. package/dist/components/molecules/CarouselImagesLogin/CarouselImagesLogin.stories.js +37 -0
  14. package/dist/components/molecules/CarouselImagesLogin/index.js +94 -0
  15. package/dist/components/molecules/CarouselImagesLogin/styles.js +21 -0
  16. package/dist/components/molecules/LoginPasswordStrength/LoginPasswordStrength.stories.js +28 -0
  17. package/dist/components/molecules/LoginPasswordStrength/index.js +131 -0
  18. package/dist/components/molecules/LoginPasswordStrength/styles.js +78 -0
  19. package/dist/components/molecules/TagAndInput/index.js +4 -2
  20. package/dist/components/organisms/InputGroup/index.js +12 -10
  21. package/dist/components/pages/ChangePasswordLogin/ChangePasswordLogin.stories.js +38 -0
  22. package/dist/components/pages/ChangePasswordLogin/index.js +131 -0
  23. package/dist/components/pages/ChangePasswordLogin/styles.js +18 -0
  24. package/dist/components/pages/EmailResetPassword/EmailResetPassword.stories.js +37 -0
  25. package/dist/components/pages/EmailResetPassword/index.js +130 -0
  26. package/dist/components/pages/EmailResetPassword/styles.js +20 -0
  27. package/dist/components/pages/RegistrationLoginFirstStep/RegistrationLoginFirstStep.stories.js +37 -0
  28. package/dist/components/pages/RegistrationLoginFirstStep/index.js +269 -0
  29. package/dist/components/pages/RegistrationLoginFirstStep/styles.js +20 -0
  30. package/dist/components/pages/RegistrationLoginSecondStep/RegistrationLoginSecondStep.stories.js +38 -0
  31. package/dist/components/pages/RegistrationLoginSecondStep/index.js +176 -0
  32. package/dist/components/pages/RegistrationLoginSecondStep/styles.js +20 -0
  33. package/dist/components/pages/RegistrationLoginThirdStep/RegistrationLoginThirdStep.stories.js +37 -0
  34. package/dist/components/pages/RegistrationLoginThirdStep/index.js +178 -0
  35. package/dist/components/pages/RegistrationLoginThirdStep/styles.js +20 -0
  36. package/dist/components/pages/RetailerProductEdition/RetailerProductEdition.stories.js +15 -37
  37. package/dist/components/pages/RetailerProductEdition/index.js +92 -56
  38. package/dist/components/pages/VerificationCodeResetPassword/VerificationCodeResetPassword.stories.js +37 -0
  39. package/dist/components/pages/VerificationCodeResetPassword/index.js +121 -0
  40. package/dist/components/pages/VerificationCodeResetPassword/styles.js +20 -0
  41. package/dist/components/pages/VerificationCodeResetPassword/utils.js +69 -0
  42. package/package.json +2 -2
  43. package/src/assets/images/carouselImagesLogin/login2.svg +117 -0
  44. package/src/assets/images/carouselImagesLogin/login3.svg +147 -0
  45. package/src/assets/images/carouselImagesLogin/loginImage.svg +301 -0
  46. package/src/components/atoms/CharCounter/CharCounter.stories.js +11 -0
  47. package/src/components/atoms/CharCounter/index.js +13 -0
  48. package/src/components/atoms/CharCounter/styles.js +10 -0
  49. package/src/components/atoms/GeneralInput/index.js +74 -50
  50. package/src/components/atoms/GeneralInput/styles.js +9 -0
  51. package/src/components/atoms/GradientPanel/styles.js +7 -1
  52. package/src/components/atoms/InputFormatter/index.js +109 -46
  53. package/src/components/atoms/InputFormatter/styles.js +6 -0
  54. package/src/components/atoms/ProgressBar/styles.js +2 -1
  55. package/src/components/atoms/Select/index.js +3 -1
  56. package/src/components/atoms/Select/style.js +1 -2
  57. package/src/components/atoms/StatusTag/styles.js +2 -1
  58. package/src/components/molecules/CarouselImagesLogin/CarouselImagesLogin.stories.js +17 -0
  59. package/src/components/molecules/CarouselImagesLogin/index.js +68 -0
  60. package/src/components/molecules/CarouselImagesLogin/styles.js +60 -0
  61. package/src/components/molecules/LoginPasswordStrength/LoginPasswordStrength.stories.js +8 -0
  62. package/src/components/molecules/LoginPasswordStrength/index.js +89 -0
  63. package/src/components/molecules/LoginPasswordStrength/styles.js +87 -0
  64. package/src/components/molecules/TagAndInput/index.js +2 -0
  65. package/src/components/organisms/FullTabsMenu/index.js +1 -1
  66. package/src/components/organisms/InputGroup/index.js +19 -4
  67. package/src/components/pages/ChangePasswordLogin/ChangePasswordLogin.stories.js +18 -0
  68. package/src/components/pages/ChangePasswordLogin/index.js +78 -0
  69. package/src/components/pages/ChangePasswordLogin/styles.js +20 -0
  70. package/src/components/pages/EmailResetPassword/EmailResetPassword.stories.js +17 -0
  71. package/src/components/pages/EmailResetPassword/index.js +77 -0
  72. package/src/components/pages/EmailResetPassword/styles.js +27 -0
  73. package/src/components/pages/RegistrationLoginFirstStep/RegistrationLoginFirstStep.stories.js +17 -0
  74. package/src/components/pages/RegistrationLoginFirstStep/index.js +160 -0
  75. package/src/components/pages/RegistrationLoginFirstStep/styles.js +85 -0
  76. package/src/components/pages/RegistrationLoginSecondStep/RegistrationLoginSecondStep.stories.js +18 -0
  77. package/src/components/pages/RegistrationLoginSecondStep/index.js +111 -0
  78. package/src/components/pages/RegistrationLoginSecondStep/styles.js +64 -0
  79. package/src/components/pages/RegistrationLoginThirdStep/RegistrationLoginThirdStep.stories.js +17 -0
  80. package/src/components/pages/RegistrationLoginThirdStep/index.js +106 -0
  81. package/src/components/pages/RegistrationLoginThirdStep/styles.js +48 -0
  82. package/src/components/pages/RetailerProductEdition/RetailerProductEdition.stories.js +27 -51
  83. package/src/components/pages/RetailerProductEdition/index.js +172 -52
  84. package/src/components/pages/VerificationCodeResetPassword/VerificationCodeResetPassword.stories.js +17 -0
  85. package/src/components/pages/VerificationCodeResetPassword/index.js +92 -0
  86. package/src/components/pages/VerificationCodeResetPassword/styles.js +54 -0
  87. package/src/components/pages/VerificationCodeResetPassword/utils.js +56 -0
@@ -0,0 +1,94 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.CarouselImagesLogin = void 0;
7
+
8
+ var _styles = require("./styles");
9
+
10
+ var _ScreenHeader = require("../../atoms/ScreenHeader");
11
+
12
+ var _variables = require("../../../global-files/variables");
13
+
14
+ var _react = require("react");
15
+
16
+ var _jsxRuntime = require("react/jsx-runtime");
17
+
18
+ var CarouselImagesLogin = function CarouselImagesLogin(_ref) {
19
+ var _ref$panelImg = _ref.panelImg,
20
+ panelImg = _ref$panelImg === void 0 ? [] : _ref$panelImg,
21
+ panelText = _ref.panelText,
22
+ panelColor = _ref.panelColor;
23
+
24
+ var carouselStart = function carouselStart() {
25
+ addEventListener("DOMContentLoaded", function () {
26
+ var images = panelImg;
27
+ var i = 1;
28
+ var img1 = document.querySelector("#img1");
29
+ var img2 = document.querySelector("#img2");
30
+ var divIndicadores = document.querySelector("#indicadores");
31
+
32
+ for (var index = 0; index < images.length; index++) {
33
+ var div = document.createElement("div");
34
+ div.classList.add("circles");
35
+ div.id = index;
36
+ divIndicadores.appendChild(div);
37
+ }
38
+
39
+ img1.src = images[0];
40
+ var circulos = document.querySelectorAll(".circles");
41
+ circulos[0].classList.add("resaltado");
42
+
43
+ var slideshow = function slideshow() {
44
+ img2.src = images[i];
45
+ var circulo_actual = Array.from(circulos).find(function (el) {
46
+ return el.id == i;
47
+ });
48
+ Array.from(circulos).forEach(function (cir) {
49
+ return cir.classList.remove("resaltado");
50
+ });
51
+ circulo_actual.classList.add("resaltado");
52
+ img1.classList.add("right");
53
+ img2.classList.add("active");
54
+ i++;
55
+
56
+ if (i == images.length) {
57
+ i = 0;
58
+ }
59
+
60
+ setTimeout(function () {
61
+ img1.src = img2.src;
62
+ img2.classList.remove("active");
63
+ img1.classList.remove("right");
64
+ }, 1000);
65
+ };
66
+
67
+ setInterval(slideshow, 4000);
68
+ });
69
+ };
70
+
71
+ (0, _react.useEffect)(function () {
72
+ carouselStart();
73
+ }, []);
74
+ return /*#__PURE__*/(0, _jsxRuntime.jsxs)(_styles.Container, {
75
+ panelColor: panelColor,
76
+ children: [/*#__PURE__*/(0, _jsxRuntime.jsxs)("div", {
77
+ id: "slideshow",
78
+ children: [/*#__PURE__*/(0, _jsxRuntime.jsx)("img", {
79
+ id: "img1"
80
+ }), /*#__PURE__*/(0, _jsxRuntime.jsx)("img", {
81
+ id: "img2"
82
+ })]
83
+ }), /*#__PURE__*/(0, _jsxRuntime.jsx)(_ScreenHeader.ScreenHeader, {
84
+ fontFamily: _variables.FontFamily.Raleway,
85
+ color: _variables.GlobalColors.white,
86
+ headerType: "product-name-header",
87
+ text: panelText
88
+ }), /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
89
+ id: "indicadores"
90
+ })]
91
+ });
92
+ };
93
+
94
+ exports.CarouselImagesLogin = CarouselImagesLogin;
@@ -0,0 +1,21 @@
1
+ "use strict";
2
+
3
+ var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault").default;
4
+
5
+ Object.defineProperty(exports, "__esModule", {
6
+ value: true
7
+ });
8
+ exports.Container = void 0;
9
+
10
+ var _taggedTemplateLiteral2 = _interopRequireDefault(require("@babel/runtime/helpers/esm/taggedTemplateLiteral"));
11
+
12
+ var _styledComponents = _interopRequireDefault(require("styled-components"));
13
+
14
+ var _templateObject;
15
+
16
+ var Container = _styledComponents.default.div(_templateObject || (_templateObject = (0, _taggedTemplateLiteral2.default)(["\n background: ", ";\n position: relative;\n overflow: hidden;\n width: 100%;\n height: 100%;\n text-align: center;\n #slideshow {\n position: relative;\n height: 65%;\n img {\n position: absolute;\n height: 100%;\n width: 100%;\n top: 8%;\n left: 0;\n }\n #img2 {\n left: 100%;\n }\n .right {\n transform: translate(-100%, 0);\n transition: all 1s;\n }\n .active {\n left: 0 !important;\n transition: all 1s;\n }\n }\n .product-name-header {\n position: absolute;\n bottom: 16%;\n right: 50%;\n transform: translateX(50%);\n }\n #indicadores {\n width: 100%;\n text-align: center;\n position: absolute;\n bottom: 7%;\n .circles {\n background-color: white;\n border: white 2px solid;\n width: 20px;\n height: 20px;\n display: inline-block;\n margin: 0 5px;\n border-radius: 50%;\n &.resaltado {\n background-color: rgba(255, 255, 255, 0);\n transition: background-color 0.8s;\n }\n }\n }\n"])), function (_ref) {
17
+ var panelColor = _ref.panelColor;
18
+ return panelColor ? panelColor : "linear-gradient(180deg,#ffffff 0%,rgba(255, 255, 255, 0.887706) 49.27%,rgba(255, 255, 255, 0) 100%),#d43594";
19
+ });
20
+
21
+ exports.Container = Container;
@@ -0,0 +1,28 @@
1
+ "use strict";
2
+
3
+ var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault").default;
4
+
5
+ Object.defineProperty(exports, "__esModule", {
6
+ value: true
7
+ });
8
+ exports.default = exports.LoginPasswordStrengthDefault = void 0;
9
+
10
+ var _objectSpread2 = _interopRequireDefault(require("@babel/runtime/helpers/esm/objectSpread2"));
11
+
12
+ var _index = require("./index");
13
+
14
+ var _jsxRuntime = require("react/jsx-runtime");
15
+
16
+ var _default = {
17
+ title: "Components/molecules/LoginPasswordStrength",
18
+ component: _index.LoginPasswordStrength
19
+ };
20
+ exports.default = _default;
21
+
22
+ var Template = function Template(args) {
23
+ return /*#__PURE__*/(0, _jsxRuntime.jsx)(_index.LoginPasswordStrength, (0, _objectSpread2.default)({}, args));
24
+ };
25
+
26
+ var LoginPasswordStrengthDefault = Template.bind({});
27
+ exports.LoginPasswordStrengthDefault = LoginPasswordStrengthDefault;
28
+ LoginPasswordStrengthDefault.args = {};
@@ -0,0 +1,131 @@
1
+ "use strict";
2
+
3
+ var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault").default;
4
+
5
+ Object.defineProperty(exports, "__esModule", {
6
+ value: true
7
+ });
8
+ exports.LoginPasswordStrength = void 0;
9
+
10
+ var _slicedToArray2 = _interopRequireDefault(require("@babel/runtime/helpers/esm/slicedToArray"));
11
+
12
+ var _styles = require("./styles");
13
+
14
+ var _react = require("react");
15
+
16
+ var _TagAndInput = require("../TagAndInput");
17
+
18
+ var _jsxRuntime = require("react/jsx-runtime");
19
+
20
+ var LoginPasswordStrength = function LoginPasswordStrength(_ref) {
21
+ var emptyPassword = _ref.emptyPassword,
22
+ emptyConfirmPassword = _ref.emptyConfirmPassword,
23
+ matchPasswords = _ref.matchPasswords;
24
+
25
+ var _useState = (0, _react.useState)(0),
26
+ _useState2 = (0, _slicedToArray2.default)(_useState, 2),
27
+ passwordStrength = _useState2[0],
28
+ setPasswordStrength = _useState2[1];
29
+
30
+ var upperCaseLetters = /[A-Z]/g;
31
+ var numbers = /[0-9]/g;
32
+ var specialChar = /[‘!’,‘@’,‘#’,‘$’,‘%’,‘^’,‘&’,‘*’]/g;
33
+ (0, _react.useEffect)(function () {
34
+ var inputValue = document.getElementById("newPasswordInput");
35
+ inputValue.addEventListener("input", function (e) {
36
+ updateInfo(e, e.target.value);
37
+ }, false);
38
+ }, []);
39
+
40
+ var updateInfo = function updateInfo(e, newValue) {
41
+ switch (e.target.id) {
42
+ case "newPasswordInput":
43
+ setPasswordStrength(0);
44
+
45
+ if (newValue.length >= 8) {
46
+ setPasswordStrength(function (passwordStrength) {
47
+ return passwordStrength + 1;
48
+ });
49
+ } //Verificar si la contraseña contiene mayuscula, numeros y un caracter especial
50
+
51
+
52
+ newValue.match(upperCaseLetters) && setPasswordStrength(function (passwordStrength) {
53
+ return passwordStrength + 1;
54
+ });
55
+ newValue.match(numbers) && setPasswordStrength(function (passwordStrength) {
56
+ return passwordStrength + 1;
57
+ });
58
+ newValue.match(specialChar) && setPasswordStrength(function (passwordStrength) {
59
+ return passwordStrength + 1;
60
+ });
61
+ break;
62
+
63
+ case "confirmPasswordInput":
64
+ break;
65
+
66
+ default:
67
+ return;
68
+ }
69
+ };
70
+
71
+ return /*#__PURE__*/(0, _jsxRuntime.jsxs)(_styles.Container, {
72
+ children: [/*#__PURE__*/(0, _jsxRuntime.jsxs)("div", {
73
+ className: "user",
74
+ children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_TagAndInput.TagAndInput, {
75
+ inputType: "password",
76
+ inputId: "newPasswordInput",
77
+ label: "Ingrese su nueva contraseña"
78
+ }), emptyPassword && /*#__PURE__*/(0, _jsxRuntime.jsx)("label", {
79
+ children: "La contrase\xF1a debe ser minimo de 8 caracteres"
80
+ })]
81
+ }, "3"), /*#__PURE__*/(0, _jsxRuntime.jsxs)("div", {
82
+ className: "divPasswordStrength",
83
+ children: [/*#__PURE__*/(0, _jsxRuntime.jsxs)(_styles.ItemPasswordStrength, {
84
+ paso: 1,
85
+ children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_styles.Password, {
86
+ level: 1,
87
+ passwordStrength: passwordStrength
88
+ }), passwordStrength === 1 && /*#__PURE__*/(0, _jsxRuntime.jsx)("p", {
89
+ children: "Baja"
90
+ })]
91
+ }), /*#__PURE__*/(0, _jsxRuntime.jsxs)(_styles.ItemPasswordStrength, {
92
+ paso: 2,
93
+ children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_styles.Password, {
94
+ level: 2,
95
+ passwordStrength: passwordStrength
96
+ }), passwordStrength === 2 && /*#__PURE__*/(0, _jsxRuntime.jsx)("p", {
97
+ children: "Regular"
98
+ })]
99
+ }), /*#__PURE__*/(0, _jsxRuntime.jsxs)(_styles.ItemPasswordStrength, {
100
+ paso: 3,
101
+ children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_styles.Password, {
102
+ level: 3,
103
+ passwordStrength: passwordStrength
104
+ }), passwordStrength === 3 && /*#__PURE__*/(0, _jsxRuntime.jsx)("p", {
105
+ children: "Segura"
106
+ })]
107
+ }), /*#__PURE__*/(0, _jsxRuntime.jsxs)(_styles.ItemPasswordStrength, {
108
+ paso: 4,
109
+ children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_styles.Password, {
110
+ level: 4,
111
+ passwordStrength: passwordStrength
112
+ }), passwordStrength === 4 && /*#__PURE__*/(0, _jsxRuntime.jsx)("p", {
113
+ children: "Fuerte"
114
+ })]
115
+ })]
116
+ }, "4"), /*#__PURE__*/(0, _jsxRuntime.jsxs)("div", {
117
+ className: "user",
118
+ children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_TagAndInput.TagAndInput, {
119
+ inputType: "password",
120
+ inputId: "confirmPasswordInput",
121
+ label: "Confirme la nueva contraseña"
122
+ }), emptyConfirmPassword && !emptyPassword && /*#__PURE__*/(0, _jsxRuntime.jsx)("label", {
123
+ children: "Confirme la contrase\xF1a"
124
+ }), !emptyConfirmPassword && !emptyPassword && !matchPasswords && /*#__PURE__*/(0, _jsxRuntime.jsx)("label", {
125
+ children: "La contrase\xF1a no coincide"
126
+ })]
127
+ }, "5")]
128
+ });
129
+ };
130
+
131
+ exports.LoginPasswordStrength = LoginPasswordStrength;
@@ -0,0 +1,78 @@
1
+ "use strict";
2
+
3
+ var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault").default;
4
+
5
+ Object.defineProperty(exports, "__esModule", {
6
+ value: true
7
+ });
8
+ exports.Password = exports.ItemPasswordStrength = exports.Container = void 0;
9
+
10
+ var _taggedTemplateLiteral2 = _interopRequireDefault(require("@babel/runtime/helpers/esm/taggedTemplateLiteral"));
11
+
12
+ var _styledComponents = _interopRequireDefault(require("styled-components"));
13
+
14
+ var _variables = require("../../../global-files/variables");
15
+
16
+ var _templateObject, _templateObject2, _templateObject3;
17
+
18
+ var Container = _styledComponents.default.div(_templateObject || (_templateObject = (0, _taggedTemplateLiteral2.default)(["\n width: 100%;\n .divPasswordStrength {\n width: 100%;\n display: flex;\n align-items: center;\n justify-content: space-between;\n margin-top: 30px;\n & + * {\n margin-top: 40px;\n }\n }\n label {\n color: red;\n margin-top: 3px;\n margin-left: 15px;\n font-family: ", ";\n font-size: 11px;\n }\n"])), _variables.FontFamily.Raleway_700);
19
+
20
+ exports.Container = Container;
21
+
22
+ var Password = _styledComponents.default.div(_templateObject2 || (_templateObject2 = (0, _taggedTemplateLiteral2.default)(["\n height: 8px;\n width: 100%;\n background-color: ", ";\n"])), function (props) {
23
+ switch (props.passwordStrength) {
24
+ case 0:
25
+ return "#F0F0F0";
26
+
27
+ case 1:
28
+ if (props.level === 1) {
29
+ return "#E67432";
30
+ } else {
31
+ return "#F0F0F0";
32
+ }
33
+
34
+ case 2:
35
+ if (props.level <= 2) {
36
+ return "#EDD34D";
37
+ } else {
38
+ return "#F0F0F0";
39
+ }
40
+
41
+ case 3:
42
+ if (props.level <= 3) {
43
+ return "#71DE56";
44
+ } else {
45
+ return "#F0F0F0";
46
+ }
47
+
48
+ case 4:
49
+ if (props.level <= 4) {
50
+ return "#71DE56";
51
+ } else {
52
+ return "#F0F0F0";
53
+ }
54
+
55
+ default:
56
+ return;
57
+ }
58
+ });
59
+
60
+ exports.Password = Password;
61
+
62
+ var ItemPasswordStrength = _styledComponents.default.div(_templateObject3 || (_templateObject3 = (0, _taggedTemplateLiteral2.default)(["\n width: 24%;\n position: relative;\n p {\n margin-top: 1.5%;\n font-weight: 700;\n display: flex;\n justify-content: flex-end;\n font-size: 11px;\n position: absolute;\n right: 0;\n top: 100%;\n color: ", ";\n }\n"])), function (props) {
63
+ switch (props.paso) {
64
+ case 1:
65
+ return "#E67432";
66
+
67
+ case 2:
68
+ return "#EDD34D";
69
+
70
+ case 3:
71
+ return "#71DE56";
72
+
73
+ case 4:
74
+ return "#71DE56";
75
+ }
76
+ });
77
+
78
+ exports.ItemPasswordStrength = ItemPasswordStrength;
@@ -29,7 +29,8 @@ var TagAndInput = function TagAndInput(_ref) {
29
29
  isRequired = _ref.isRequired,
30
30
  dinamicHeight = _ref.dinamicHeight,
31
31
  inputCols = _ref.inputCols,
32
- inputRows = _ref.inputRows;
32
+ inputRows = _ref.inputRows,
33
+ maxChar = _ref.maxChar;
33
34
  return /*#__PURE__*/(0, _jsxRuntime.jsxs)(_styles.Container, {
34
35
  inputType: inputType,
35
36
  className: "input-container",
@@ -51,7 +52,8 @@ var TagAndInput = function TagAndInput(_ref) {
51
52
  version: version,
52
53
  dinamicHeight: dinamicHeight,
53
54
  inputCols: inputCols,
54
- inputRows: inputRows
55
+ inputRows: inputRows,
56
+ maxChar: maxChar
55
57
  })]
56
58
  }, "generalTagInput-".concat(inputType));
57
59
  };
@@ -50,26 +50,28 @@ var InputGroup = function InputGroup(_ref) {
50
50
  }), /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
51
51
  className: "inputs-container",
52
52
  children: inputGroup === null || inputGroup === void 0 ? void 0 : (_inputGroup$inputs = inputGroup.inputs) === null || _inputGroup$inputs === void 0 ? void 0 : _inputGroup$inputs.map(function (input, index) {
53
- var _dataInputs$input, _dataInputs$input2, _dataInputs$input3, _dataInputs$input4, _dataInputs$input5, _dataInputs$input6;
53
+ var _dataInputs$input, _dataInputs$input2, _dataInputs$input3, _dataInputs$input4, _dataInputs$input5, _dataInputs$input6, _dataInputs$input7, _dataInputs$input8, _dataInputs$input9, _dataInputs$input10;
54
54
 
55
55
  return activeSection === "Ficha técnica" ? /*#__PURE__*/(0, _jsxRuntime.jsx)(_TagAndInput.TagAndInput, {
56
- inputId: (_dataInputs$input2 = dataInputs[input]) === null || _dataInputs$input2 === void 0 ? void 0 : _dataInputs$input2.id,
56
+ inputId: (_dataInputs$input3 = dataInputs[input]) === null || _dataInputs$input3 === void 0 ? void 0 : _dataInputs$input3.id,
57
57
  version: version,
58
- inputType: inputTypeValue((_dataInputs$input3 = dataInputs[input]) === null || _dataInputs$input3 === void 0 ? void 0 : _dataInputs$input3.type),
59
- label: (_dataInputs$input4 = dataInputs[input]) === null || _dataInputs$input4 === void 0 ? void 0 : _dataInputs$input4.name,
60
- value: (_dataInputs$input5 = dataInputs[input]) === null || _dataInputs$input5 === void 0 ? void 0 : _dataInputs$input5.value,
58
+ inputType: inputTypeValue((_dataInputs$input4 = dataInputs[input]) === null || _dataInputs$input4 === void 0 ? void 0 : _dataInputs$input4.type),
59
+ label: ((_dataInputs$input5 = dataInputs[input]) === null || _dataInputs$input5 === void 0 ? void 0 : _dataInputs$input5.name) + ((_dataInputs$input6 = dataInputs[input]) !== null && _dataInputs$input6 !== void 0 && _dataInputs$input6.required ? "*" : ""),
60
+ value: (_dataInputs$input7 = dataInputs[input]) === null || _dataInputs$input7 === void 0 ? void 0 : _dataInputs$input7.value,
61
61
  inputPlaceHolder: input === null || input === void 0 ? void 0 : input.placeholder,
62
62
  articleId: articleId,
63
- isRequired: (_dataInputs$input6 = dataInputs[input]) === null || _dataInputs$input6 === void 0 ? void 0 : _dataInputs$input6.required,
63
+ isRequired: (_dataInputs$input8 = dataInputs[input]) === null || _dataInputs$input8 === void 0 ? void 0 : _dataInputs$input8.required,
64
64
  updatedDatasheets: updatedDatasheets,
65
- setUpdatedDatasheets: setUpdatedDatasheets
66
- }, index + "-" + ((_dataInputs$input = dataInputs[input]) === null || _dataInputs$input === void 0 ? void 0 : _dataInputs$input.value)) : /*#__PURE__*/(0, _jsxRuntime.jsx)(_TagAndInput.TagAndInput, {
67
- inputId: input === null || input === void 0 ? void 0 : input.id,
65
+ setUpdatedDatasheets: setUpdatedDatasheets,
66
+ maxChar: (_dataInputs$input9 = dataInputs[input]) !== null && _dataInputs$input9 !== void 0 && _dataInputs$input9.max_chars ? (_dataInputs$input10 = dataInputs[input]) === null || _dataInputs$input10 === void 0 ? void 0 : _dataInputs$input10.max_chars : 999
67
+ }, index + "-" + ((_dataInputs$input = dataInputs[input]) === null || _dataInputs$input === void 0 ? void 0 : _dataInputs$input.value) + "-" + ((_dataInputs$input2 = dataInputs[input]) === null || _dataInputs$input2 === void 0 ? void 0 : _dataInputs$input2.id)) : /*#__PURE__*/(0, _jsxRuntime.jsx)(_TagAndInput.TagAndInput, {
68
+ inputId: input.id,
68
69
  index: index,
69
70
  inputType: "textarea",
70
- label: input === null || input === void 0 ? void 0 : input.name,
71
+ label: (input === null || input === void 0 ? void 0 : input.name) + (input.required ? "*" : ""),
71
72
  value: input === null || input === void 0 ? void 0 : input.value,
72
73
  isRequired: input.required,
74
+ maxChar: input.max_chars,
73
75
  inputPlaceHolder: input === null || input === void 0 ? void 0 : input.placeholder,
74
76
  updatedDescriptions: updatedDescriptions,
75
77
  setUpdatedDescriptions: setUpdatedDescriptions,
@@ -0,0 +1,38 @@
1
+ "use strict";
2
+
3
+ var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault").default;
4
+
5
+ Object.defineProperty(exports, "__esModule", {
6
+ value: true
7
+ });
8
+ exports.default = exports.ChangePasswordLoginDefault = void 0;
9
+
10
+ var _objectSpread2 = _interopRequireDefault(require("@babel/runtime/helpers/esm/objectSpread2"));
11
+
12
+ var _index = require("./index");
13
+
14
+ var _loginImage = _interopRequireDefault(require("../../../assets/images/carouselImagesLogin/loginImage.svg"));
15
+
16
+ var _login = _interopRequireDefault(require("../../../assets/images/carouselImagesLogin/login2.svg"));
17
+
18
+ var _login2 = _interopRequireDefault(require("../../../assets/images/carouselImagesLogin/login3.svg"));
19
+
20
+ var _jsxRuntime = require("react/jsx-runtime");
21
+
22
+ var _default = {
23
+ title: "Components/pages/ChangePasswordLogin",
24
+ component: _index.ChangePasswordLogin
25
+ };
26
+ exports.default = _default;
27
+
28
+ var Template = function Template(args) {
29
+ return /*#__PURE__*/(0, _jsxRuntime.jsx)(_index.ChangePasswordLogin, (0, _objectSpread2.default)({}, args));
30
+ };
31
+
32
+ var ChangePasswordLoginDefault = Template.bind({});
33
+ exports.ChangePasswordLoginDefault = ChangePasswordLoginDefault;
34
+ ChangePasswordLoginDefault.args = {
35
+ imageArrayCarousel: [_loginImage.default, _login.default, _login2.default],
36
+ textCarousel: "Elige la plataforma que conecta proovedores y retailers",
37
+ textHeaderRight: "Ingresa tus credenciales"
38
+ };
@@ -0,0 +1,131 @@
1
+ "use strict";
2
+
3
+ var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault").default;
4
+
5
+ Object.defineProperty(exports, "__esModule", {
6
+ value: true
7
+ });
8
+ exports.ChangePasswordLogin = void 0;
9
+
10
+ var _regenerator = _interopRequireDefault(require("@babel/runtime/regenerator"));
11
+
12
+ var _asyncToGenerator2 = _interopRequireDefault(require("@babel/runtime/helpers/esm/asyncToGenerator"));
13
+
14
+ var _slicedToArray2 = _interopRequireDefault(require("@babel/runtime/helpers/esm/slicedToArray"));
15
+
16
+ var _styles = require("./styles");
17
+
18
+ var _CarouselImagesLogin = require("../../molecules/CarouselImagesLogin");
19
+
20
+ var _LoginPasswordStrength = require("../../molecules/LoginPasswordStrength");
21
+
22
+ var _react = require("react");
23
+
24
+ var _GeneralButton = require("../../atoms/GeneralButton");
25
+
26
+ var _LogoImage = require("../../atoms/LogoImage");
27
+
28
+ var _ScreenHeader = require("../../atoms/ScreenHeader");
29
+
30
+ var _variables = require("../../../global-files/variables");
31
+
32
+ var _GradientPanel = require("../../atoms/GradientPanel");
33
+
34
+ var _jsxRuntime = require("react/jsx-runtime");
35
+
36
+ var ChangePasswordLogin = function ChangePasswordLogin(_ref) {
37
+ var _ref$imageArrayCarous = _ref.imageArrayCarousel,
38
+ imageArrayCarousel = _ref$imageArrayCarous === void 0 ? [] : _ref$imageArrayCarous,
39
+ textCarousel = _ref.textCarousel,
40
+ backogroundColorCarousel = _ref.backogroundColorCarousel,
41
+ textHeaderRight = _ref.textHeaderRight;
42
+
43
+ var _useState = (0, _react.useState)(false),
44
+ _useState2 = (0, _slicedToArray2.default)(_useState, 2),
45
+ emptyPassword = _useState2[0],
46
+ setEmptyPassword = _useState2[1];
47
+
48
+ var _useState3 = (0, _react.useState)(false),
49
+ _useState4 = (0, _slicedToArray2.default)(_useState3, 2),
50
+ emptyConfirmPassword = _useState4[0],
51
+ setEmptyConfirmPassword = _useState4[1];
52
+
53
+ var _useState5 = (0, _react.useState)(true),
54
+ _useState6 = (0, _slicedToArray2.default)(_useState5, 2),
55
+ matchPasswords = _useState6[0],
56
+ setMatchPasswords = _useState6[1];
57
+
58
+ var validate = /*#__PURE__*/function () {
59
+ var _ref2 = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee(e) {
60
+ var password, confirmPassword;
61
+ return _regenerator.default.wrap(function _callee$(_context) {
62
+ while (1) {
63
+ switch (_context.prev = _context.next) {
64
+ case 0:
65
+ e.preventDefault();
66
+ password = document.querySelector("#newPasswordInput").value;
67
+ password.length < 8 ? setEmptyPassword(true) : setEmptyPassword(false);
68
+ confirmPassword = document.querySelector("#confirmPasswordInput").value;
69
+ confirmPassword === "" ? setEmptyConfirmPassword(true) : setEmptyConfirmPassword(false);
70
+
71
+ if (password === confirmPassword) {
72
+ setMatchPasswords(true);
73
+ } else {
74
+ setMatchPasswords(false);
75
+ }
76
+
77
+ case 6:
78
+ case "end":
79
+ return _context.stop();
80
+ }
81
+ }
82
+ }, _callee);
83
+ }));
84
+
85
+ return function validate(_x) {
86
+ return _ref2.apply(this, arguments);
87
+ };
88
+ }();
89
+
90
+ var loginRight = [/*#__PURE__*/(0, _jsxRuntime.jsx)(_LogoImage.LogoImage, {}, "1"), /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
91
+ className: "credenciales",
92
+ children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_ScreenHeader.ScreenHeader, {
93
+ fontFamily: _variables.FontFamily.AvenirNext,
94
+ color: _variables.GlobalColors.s5,
95
+ text: textHeaderRight
96
+ })
97
+ }, "2"), /*#__PURE__*/(0, _jsxRuntime.jsx)(_LoginPasswordStrength.LoginPasswordStrength, {
98
+ emptyPassword: emptyPassword,
99
+ emptyConfirmPassword: emptyConfirmPassword,
100
+ matchPasswords: matchPasswords,
101
+ textTittle: textHeaderRight
102
+ }, "3"), /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
103
+ className: "button-center",
104
+ children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_GeneralButton.Button, {
105
+ buttonType: "general-default-button",
106
+ label: "Enviar",
107
+ onClick: function onClick(e) {
108
+ return validate(e);
109
+ }
110
+ })
111
+ }, "4")];
112
+ return /*#__PURE__*/(0, _jsxRuntime.jsxs)(_styles.Container, {
113
+ children: [/*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
114
+ className: "home-retailer",
115
+ children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_CarouselImagesLogin.CarouselImagesLogin, {
116
+ panelImg: imageArrayCarousel,
117
+ panelText: textCarousel,
118
+ panelColor: backogroundColorCarousel
119
+ })
120
+ }), /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
121
+ className: "home-login-retailer",
122
+ children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_GradientPanel.GradientPanel, {
123
+ panelColor: _variables.GlobalColors.white,
124
+ componentsArray: loginRight,
125
+ panelType: "home-login"
126
+ })
127
+ })]
128
+ });
129
+ };
130
+
131
+ exports.ChangePasswordLogin = ChangePasswordLogin;
@@ -0,0 +1,18 @@
1
+ "use strict";
2
+
3
+ var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault").default;
4
+
5
+ Object.defineProperty(exports, "__esModule", {
6
+ value: true
7
+ });
8
+ exports.Container = void 0;
9
+
10
+ var _taggedTemplateLiteral2 = _interopRequireDefault(require("@babel/runtime/helpers/esm/taggedTemplateLiteral"));
11
+
12
+ var _styledComponents = _interopRequireDefault(require("styled-components"));
13
+
14
+ var _templateObject;
15
+
16
+ var Container = _styledComponents.default.div(_templateObject || (_templateObject = (0, _taggedTemplateLiteral2.default)(["\n display: flex;\n width: 100%;\n height: 100vh;\n .home-login-retailer,\n .home-retailer {\n width: 50%;\n .button-center {\n text-align: center;\n position: absolute;\n bottom: 5%;\n left: calc(75% - 80px);\n .general-default-button {\n width: 160px;\n }\n }\n }\n"])));
17
+
18
+ exports.Container = Container;
@@ -0,0 +1,37 @@
1
+ "use strict";
2
+
3
+ var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault").default;
4
+
5
+ Object.defineProperty(exports, "__esModule", {
6
+ value: true
7
+ });
8
+ exports.default = exports.EmailResetPasswordDefault = void 0;
9
+
10
+ var _objectSpread2 = _interopRequireDefault(require("@babel/runtime/helpers/esm/objectSpread2"));
11
+
12
+ var _index = require("./index");
13
+
14
+ var _loginImage = _interopRequireDefault(require("../../../assets/images/carouselImagesLogin/loginImage.svg"));
15
+
16
+ var _login = _interopRequireDefault(require("../../../assets/images/carouselImagesLogin/login2.svg"));
17
+
18
+ var _login2 = _interopRequireDefault(require("../../../assets/images/carouselImagesLogin/login3.svg"));
19
+
20
+ var _jsxRuntime = require("react/jsx-runtime");
21
+
22
+ var _default = {
23
+ title: "Components/pages/EmailResetPassword",
24
+ component: _index.EmailResetPassword
25
+ };
26
+ exports.default = _default;
27
+
28
+ var Template = function Template(args) {
29
+ return /*#__PURE__*/(0, _jsxRuntime.jsx)(_index.EmailResetPassword, (0, _objectSpread2.default)({}, args));
30
+ };
31
+
32
+ var EmailResetPasswordDefault = Template.bind({});
33
+ exports.EmailResetPasswordDefault = EmailResetPasswordDefault;
34
+ EmailResetPasswordDefault.args = {
35
+ imageArrayCarousel: [_loginImage.default, _login.default, _login2.default],
36
+ textCarousel: "Elige la plataforma que conecta proovedores y retailers"
37
+ };