contentoh-components-library 21.0.76 → 21.0.78
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/atoms/GeneralInput/index.js +3 -4
- package/dist/components/molecules/LoginPasswordStrength/index.js +2 -2
- package/dist/components/molecules/StatusAsignationInfo/index.js +3 -2
- package/dist/components/molecules/VerificationCodeResetPasswordLogin/index.js +1 -1
- package/dist/components/organisms/FullTabsMenu/index.js +4 -2
- package/dist/components/organisms/InputGroup/index.js +1 -0
- package/dist/components/pages/ProviderProductEdition/index.js +1 -0
- package/dist/components/pages/RetailerProductEdition/index.js +1 -0
- package/dist/components/pages/VerificationCodeResetPassword/index.js +1 -1
- package/package.json +4 -4
- package/src/components/atoms/GeneralInput/index.js +2 -3
- package/src/components/molecules/LoginPasswordStrength/index.js +2 -2
- package/src/components/molecules/StatusAsignationInfo/index.js +2 -1
- package/src/components/molecules/VerificationCodeResetPasswordLogin/index.js +9 -9
- package/src/components/organisms/FullTabsMenu/index.js +2 -0
- package/src/components/organisms/InputGroup/index.js +1 -0
- package/src/components/pages/ProviderProductEdition/index.js +1 -0
- package/src/components/pages/RetailerProductEdition/index.js +1 -0
- package/src/components/pages/VerificationCodeResetPassword/index.js +1 -1
|
@@ -36,8 +36,7 @@ var GeneralInput = function GeneralInput(_ref) {
|
|
|
36
36
|
setUpdatedDescriptions = _ref.setUpdatedDescriptions,
|
|
37
37
|
maxChar = _ref.maxChar,
|
|
38
38
|
isRequired = _ref.isRequired,
|
|
39
|
-
version = _ref.version
|
|
40
|
-
required = _ref.required;
|
|
39
|
+
version = _ref.version;
|
|
41
40
|
|
|
42
41
|
var _useState = (0, _react.useState)({
|
|
43
42
|
value: inputValue
|
|
@@ -109,8 +108,8 @@ var GeneralInput = function GeneralInput(_ref) {
|
|
|
109
108
|
onInput: function onInput(e) {
|
|
110
109
|
return onHandleChange(e);
|
|
111
110
|
},
|
|
112
|
-
|
|
113
|
-
|
|
111
|
+
maxLength: maxChar,
|
|
112
|
+
required: isRequired
|
|
114
113
|
}) : /*#__PURE__*/(0, _jsxRuntime.jsx)(_InputFormatter.InputFormatter, {
|
|
115
114
|
name: inputName,
|
|
116
115
|
inputId: inputId,
|
|
@@ -73,7 +73,7 @@ var LoginPasswordStrength = function LoginPasswordStrength(_ref) {
|
|
|
73
73
|
inputType: "password",
|
|
74
74
|
inputId: "newPasswordInput",
|
|
75
75
|
label: "Ingrese su nueva contraseña",
|
|
76
|
-
|
|
76
|
+
isRequired: required
|
|
77
77
|
}), emptyPassword && /*#__PURE__*/(0, _jsxRuntime.jsx)("label", {
|
|
78
78
|
children: "La contrase\xF1a debe ser minimo de 8 caracteres"
|
|
79
79
|
})]
|
|
@@ -118,7 +118,7 @@ var LoginPasswordStrength = function LoginPasswordStrength(_ref) {
|
|
|
118
118
|
inputType: "password",
|
|
119
119
|
inputId: "confirmPasswordInput",
|
|
120
120
|
label: "Confirme la nueva contraseña",
|
|
121
|
-
|
|
121
|
+
isRequired: required
|
|
122
122
|
}), emptyConfirmPassword && !emptyPassword && /*#__PURE__*/(0, _jsxRuntime.jsx)("label", {
|
|
123
123
|
children: "Confirme la contrase\xF1a"
|
|
124
124
|
}), !emptyConfirmPassword && !emptyPassword && !matchPasswords && /*#__PURE__*/(0, _jsxRuntime.jsx)("label", {
|
|
@@ -43,7 +43,8 @@ var StatusAsignationInfo = function StatusAsignationInfo(_ref) {
|
|
|
43
43
|
askToDeleteImages = _ref.askToDeleteImages,
|
|
44
44
|
_ref$id = _ref.id,
|
|
45
45
|
id = _ref$id === void 0 ? "default-id" : _ref$id,
|
|
46
|
-
onClickSave = _ref.onClickSave
|
|
46
|
+
onClickSave = _ref.onClickSave,
|
|
47
|
+
showSaveButton = _ref.showSaveButton;
|
|
47
48
|
|
|
48
49
|
var _useState = (0, _react.useState)(false),
|
|
49
50
|
_useState2 = (0, _slicedToArray2.default)(_useState, 2),
|
|
@@ -74,7 +75,7 @@ var StatusAsignationInfo = function StatusAsignationInfo(_ref) {
|
|
|
74
75
|
}, [showAsignationPanel]);
|
|
75
76
|
return /*#__PURE__*/(0, _jsxRuntime.jsxs)(_styles.Container, {
|
|
76
77
|
id: id,
|
|
77
|
-
children: [
|
|
78
|
+
children: [showSaveButton && /*#__PURE__*/(0, _jsxRuntime.jsx)(_GeneralButton.Button, {
|
|
78
79
|
buttonType: "circular-button save-button",
|
|
79
80
|
onClick: onClickSave
|
|
80
81
|
}), imagesSection && /*#__PURE__*/(0, _jsxRuntime.jsxs)("div", {
|
|
@@ -148,7 +148,7 @@ var VerificationCodeResetPasswordLogin = function VerificationCodeResetPasswordL
|
|
|
148
148
|
validateInput: _utils.validateInput,
|
|
149
149
|
inputsArray: inputCodeVerificationAll,
|
|
150
150
|
position: position,
|
|
151
|
-
|
|
151
|
+
maxChar: 1
|
|
152
152
|
});
|
|
153
153
|
})
|
|
154
154
|
}), emptyVerificationCode && /*#__PURE__*/(0, _jsxRuntime.jsx)("label", {
|
|
@@ -31,7 +31,8 @@ var FullTabsMenu = function FullTabsMenu(_ref) {
|
|
|
31
31
|
isRetailer = _ref.isRetailer,
|
|
32
32
|
downloadImages = _ref.downloadImages,
|
|
33
33
|
askToDeleteImages = _ref.askToDeleteImages,
|
|
34
|
-
onClickSave = _ref.onClickSave
|
|
34
|
+
onClickSave = _ref.onClickSave,
|
|
35
|
+
showSaveButton = _ref.showSaveButton;
|
|
35
36
|
|
|
36
37
|
var _useState = (0, _react.useState)(false),
|
|
37
38
|
_useState2 = (0, _slicedToArray2.default)(_useState, 2),
|
|
@@ -53,7 +54,8 @@ var FullTabsMenu = function FullTabsMenu(_ref) {
|
|
|
53
54
|
isRetailer: isRetailer,
|
|
54
55
|
downloadImages: downloadImages,
|
|
55
56
|
onClickSave: onClickSave,
|
|
56
|
-
askToDeleteImages: askToDeleteImages
|
|
57
|
+
askToDeleteImages: askToDeleteImages,
|
|
58
|
+
showSaveButton: showSaveButton
|
|
57
59
|
})]
|
|
58
60
|
});
|
|
59
61
|
};
|
|
@@ -1765,6 +1765,7 @@ var ProviderProductEdition = function ProviderProductEdition(_ref) {
|
|
|
1765
1765
|
assig: assig,
|
|
1766
1766
|
setAssignation: setAssignation,
|
|
1767
1767
|
isRetailer: isRetailer,
|
|
1768
|
+
showSaveButton: ["AP", "AC", "RC"].includes(product.version_status),
|
|
1768
1769
|
onClickSave: function onClickSave() {
|
|
1769
1770
|
switch (activeTab) {
|
|
1770
1771
|
case "Descripción":
|
|
@@ -1597,6 +1597,7 @@ var RetailerProductEdition = function RetailerProductEdition(_ref) {
|
|
|
1597
1597
|
assig: assig[activeTab],
|
|
1598
1598
|
setAssignation: setAssignation,
|
|
1599
1599
|
isRetailer: isRetailer,
|
|
1600
|
+
showSaveButton: true,
|
|
1600
1601
|
onClickSave: function onClickSave() {
|
|
1601
1602
|
var _product$services2, _product$services3, _product$services4;
|
|
1602
1603
|
|
|
@@ -73,7 +73,7 @@ var VerificationCodeResetPassword = function VerificationCodeResetPassword(_ref)
|
|
|
73
73
|
validateInput: _utils.validateInput,
|
|
74
74
|
inputsArray: inputCodeVerificationAll,
|
|
75
75
|
position: position,
|
|
76
|
-
|
|
76
|
+
maxChar: 1
|
|
77
77
|
});
|
|
78
78
|
})
|
|
79
79
|
}), emptyVerificationCode && /*#__PURE__*/(0, _jsxRuntime.jsx)("label", {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "contentoh-components-library",
|
|
3
|
-
"version": "21.0.
|
|
3
|
+
"version": "21.0.78",
|
|
4
4
|
"dependencies": {
|
|
5
5
|
"@aws-amplify/auth": "^4.5.3",
|
|
6
6
|
"@aws-amplify/datastore": "^3.11.0",
|
|
@@ -10,14 +10,14 @@
|
|
|
10
10
|
"@testing-library/jest-dom": "^5.11.4",
|
|
11
11
|
"@testing-library/react": "^11.1.0",
|
|
12
12
|
"@testing-library/user-event": "^12.1.10",
|
|
13
|
+
"aws-amplify": "^4.3.21",
|
|
13
14
|
"aws-sdk": "^2.1088.0",
|
|
14
15
|
"axios": "^0.25.0",
|
|
15
16
|
"babel-preset-react-app": "^10.0.1",
|
|
16
17
|
"chart.js": "^3.7.1",
|
|
18
|
+
"contentoh-components-library": "^21.0.18",
|
|
17
19
|
"draft-js": "^0.11.7",
|
|
18
20
|
"file-saver": "^2.0.5",
|
|
19
|
-
"contentoh-components-library": "^21.0.18",
|
|
20
|
-
"aws-amplify": "^4.3.21",
|
|
21
21
|
"js-base64": "^3.7.2",
|
|
22
22
|
"prop-types": "^15.7.2",
|
|
23
23
|
"react": "^17.0.2",
|
|
@@ -27,7 +27,7 @@
|
|
|
27
27
|
"react-dropzone": "^12.0.4",
|
|
28
28
|
"react-image-fallback": "^8.0.0",
|
|
29
29
|
"react-quill": "^1.3.5",
|
|
30
|
-
"react-router-dom": "^5.
|
|
30
|
+
"react-router-dom": "^5.3.3",
|
|
31
31
|
"styled-components": "^5.3.3",
|
|
32
32
|
"uuid": "^8.3.2",
|
|
33
33
|
"web-vitals": "^1.0.1"
|
|
@@ -21,7 +21,6 @@ export const GeneralInput = ({
|
|
|
21
21
|
maxChar,
|
|
22
22
|
isRequired,
|
|
23
23
|
version,
|
|
24
|
-
required,
|
|
25
24
|
}) => {
|
|
26
25
|
const [textValue, setTextValue] = useState({
|
|
27
26
|
value: inputValue,
|
|
@@ -88,8 +87,8 @@ export const GeneralInput = ({
|
|
|
88
87
|
placeholder={inputPlaceholder}
|
|
89
88
|
value={textValue.value}
|
|
90
89
|
onInput={(e) => onHandleChange(e)}
|
|
91
|
-
|
|
92
|
-
|
|
90
|
+
maxLength={maxChar}
|
|
91
|
+
required={isRequired}
|
|
93
92
|
/>
|
|
94
93
|
) : (
|
|
95
94
|
<InputFormatter
|
|
@@ -51,7 +51,7 @@ export const LoginPasswordStrength = ({
|
|
|
51
51
|
inputType={"password"}
|
|
52
52
|
inputId={"newPasswordInput"}
|
|
53
53
|
label={"Ingrese su nueva contraseña"}
|
|
54
|
-
|
|
54
|
+
isRequired={required}
|
|
55
55
|
/>
|
|
56
56
|
{emptyPassword && (
|
|
57
57
|
<label>La contraseña debe ser minimo de 8 caracteres</label>
|
|
@@ -80,7 +80,7 @@ export const LoginPasswordStrength = ({
|
|
|
80
80
|
inputType={"password"}
|
|
81
81
|
inputId={"confirmPasswordInput"}
|
|
82
82
|
label={"Confirme la nueva contraseña"}
|
|
83
|
-
|
|
83
|
+
isRequired={required}
|
|
84
84
|
/>
|
|
85
85
|
{emptyConfirmPassword && !emptyPassword && (
|
|
86
86
|
<label>Confirme la contraseña</label>
|
|
@@ -19,6 +19,7 @@ export const StatusAsignationInfo = ({
|
|
|
19
19
|
askToDeleteImages,
|
|
20
20
|
id = "default-id",
|
|
21
21
|
onClickSave,
|
|
22
|
+
showSaveButton,
|
|
22
23
|
}) => {
|
|
23
24
|
const [showAsignationPanel, setShowAsignationPanel] = useState(false);
|
|
24
25
|
const [layout, setLayout] = useState(false);
|
|
@@ -39,7 +40,7 @@ export const StatusAsignationInfo = ({
|
|
|
39
40
|
|
|
40
41
|
return (
|
|
41
42
|
<Container id={id}>
|
|
42
|
-
{
|
|
43
|
+
{showSaveButton && (
|
|
43
44
|
<Button
|
|
44
45
|
buttonType={"circular-button save-button"}
|
|
45
46
|
onClick={onClickSave}
|
|
@@ -38,11 +38,11 @@ export const VerificationCodeResetPasswordLogin = (props) => {
|
|
|
38
38
|
}
|
|
39
39
|
sessionStorage.setItem("confirmationCode", JSON.stringify(code));
|
|
40
40
|
valid &&
|
|
41
|
-
|
|
42
|
-
|
|
41
|
+
!sessionStorage.getItem("resetPasswordProcess") &&
|
|
42
|
+
props.setPaso(6);
|
|
43
43
|
valid &&
|
|
44
|
-
|
|
45
|
-
|
|
44
|
+
sessionStorage.getItem("resetPasswordProcess") &&
|
|
45
|
+
props.setPaso(8);
|
|
46
46
|
}
|
|
47
47
|
};
|
|
48
48
|
|
|
@@ -88,9 +88,9 @@ export const VerificationCodeResetPasswordLogin = (props) => {
|
|
|
88
88
|
)}
|
|
89
89
|
{!sessionStorage.getItem("email") && (
|
|
90
90
|
<ScreenHeader
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
91
|
+
text={`Ingrese código de verificación enviado a: ${
|
|
92
|
+
JSON.parse(sessionStorage.getItem("nuevoRegistro")).email
|
|
93
|
+
}`}
|
|
94
94
|
headerType={"input-name-header"}
|
|
95
95
|
/>
|
|
96
96
|
)}
|
|
@@ -103,7 +103,7 @@ export const VerificationCodeResetPasswordLogin = (props) => {
|
|
|
103
103
|
validateInput={validateInput}
|
|
104
104
|
inputsArray={inputCodeVerificationAll}
|
|
105
105
|
position={position}
|
|
106
|
-
|
|
106
|
+
maxChar={1}
|
|
107
107
|
/>
|
|
108
108
|
))}
|
|
109
109
|
</div>
|
|
@@ -156,7 +156,7 @@ export const VerificationCodeResetPasswordLogin = (props) => {
|
|
|
156
156
|
/>
|
|
157
157
|
</div>,
|
|
158
158
|
<div className="reset-password" key="6">
|
|
159
|
-
|
|
159
|
+
<p onClick={() => props.setPaso(10)}>Regresar...</p>
|
|
160
160
|
</div>,
|
|
161
161
|
];
|
|
162
162
|
return (
|
|
@@ -15,6 +15,7 @@ export const FullTabsMenu = ({
|
|
|
15
15
|
downloadImages,
|
|
16
16
|
askToDeleteImages,
|
|
17
17
|
onClickSave,
|
|
18
|
+
showSaveButton,
|
|
18
19
|
}) => {
|
|
19
20
|
const [imagesSection, setImagesSection] = useState(false);
|
|
20
21
|
|
|
@@ -36,6 +37,7 @@ export const FullTabsMenu = ({
|
|
|
36
37
|
downloadImages={downloadImages}
|
|
37
38
|
onClickSave={onClickSave}
|
|
38
39
|
askToDeleteImages={askToDeleteImages}
|
|
40
|
+
showSaveButton={showSaveButton}
|
|
39
41
|
/>
|
|
40
42
|
</Container>
|
|
41
43
|
);
|
|
@@ -1234,6 +1234,7 @@ export const ProviderProductEdition = ({
|
|
|
1234
1234
|
assig={assig}
|
|
1235
1235
|
setAssignation={setAssignation}
|
|
1236
1236
|
isRetailer={isRetailer}
|
|
1237
|
+
showSaveButton={["AP", "AC", "RC"].includes(product.version_status)}
|
|
1237
1238
|
onClickSave={() => {
|
|
1238
1239
|
switch (activeTab) {
|
|
1239
1240
|
case "Descripción":
|