contentoh-components-library 12.0.0 → 12.1.17
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/.env.development +8 -2
- package/.env.production +8 -2
- package/CHANGELOG.md +39 -0
- package/dist/assets/images/carouselImagesLogin/login2.svg +117 -0
- package/dist/assets/images/carouselImagesLogin/login3.svg +147 -0
- package/dist/assets/images/carouselImagesLogin/loginImage.svg +301 -0
- package/dist/assets/images/editField/showPassword.png +0 -0
- package/dist/assets/images/generalButton/downloadIcon.svg +3 -0
- package/dist/assets/images/genericModal/closeWhite.svg +3 -0
- package/dist/assets/images/genericModal/errorModal.svg +3 -0
- package/dist/assets/images/genericModal/yellowAlert.svg +12 -0
- package/dist/assets/images/sliderToolTip/infoIcon.svg +4 -0
- package/dist/assets/images/sliderToolTip/slide1.svg +5 -0
- package/dist/assets/images/sliderToolTip/slide2.svg +9 -0
- package/dist/assets/images/sliderToolTip/slide3.svg +9 -0
- package/dist/assets/images/sliderToolTip/slide4.svg +9 -0
- package/dist/assets/images/sliderToolTip/slide5.svg +40 -0
- package/dist/assets/images/verticalSideMenuMainPage/closeMenu.svg +4 -0
- package/dist/assets/images/verticalSideMenuMainPage/iconFAQS.svg +12 -0
- package/dist/assets/images/verticalSideMenuMainPage/iconGroup.svg +3 -0
- package/dist/assets/images/verticalSideMenuMainPage/iconLogo.svg +12 -0
- package/dist/assets/images/verticalSideMenuMainPage/iconLogoContentoh.svg +15 -0
- package/dist/assets/images/verticalSideMenuMainPage/iconProduct.svg +3 -0
- package/dist/assets/images/verticalSideMenuMainPage/iconSpeedometer.svg +12 -0
- package/dist/assets/images/verticalSideMenuMainPage/iconTask.svg +10 -0
- package/dist/assets/images/verticalSideMenuMainPage/openMenu.svg +4 -0
- package/dist/components/atoms/AsignationOption/index.js +24 -2
- package/dist/components/atoms/AsignationOption/styles.js +1 -1
- package/dist/components/atoms/CharCounter/CharCounter.stories.js +31 -0
- package/dist/components/atoms/CharCounter/index.js +22 -0
- package/dist/components/atoms/CharCounter/styles.js +20 -0
- package/dist/components/atoms/CheckBox/index.js +4 -2
- package/dist/components/atoms/DropDownButton/styles.js +1 -1
- package/dist/components/atoms/GeneralButton/styles.js +4 -2
- package/dist/components/atoms/GeneralInput/index.js +121 -65
- package/dist/components/atoms/GeneralInput/styles.js +8 -2
- package/dist/components/atoms/GenericModal/index.js +4 -2
- package/dist/components/atoms/GenericModal/styles.js +1 -1
- package/dist/components/atoms/GradientPanel/styles.js +2 -2
- package/dist/components/atoms/Input/index.js +1 -1
- package/dist/components/atoms/Input/style.js +4 -4
- package/dist/components/atoms/InputFormatter/Wysiwyg.stories.js +30 -0
- package/dist/components/atoms/InputFormatter/index.js +187 -0
- package/dist/components/atoms/InputFormatter/styles.js +33 -0
- package/dist/components/atoms/LabelToInput/index.js +0 -1
- package/dist/components/atoms/LabelToInput/style.js +3 -3
- package/dist/components/atoms/Loading/Loading.stories.js +28 -0
- package/dist/components/atoms/Loading/index.js +27 -0
- package/dist/components/atoms/Loading/styles.js +22 -0
- package/dist/components/atoms/LogoImage/index.js +1 -0
- package/dist/components/atoms/ProductPercentCard/Percent.stories.js +41 -0
- package/dist/components/atoms/ProductPercentCard/index.js +45 -0
- package/dist/components/atoms/ProductPercentCard/styles.js +20 -0
- package/dist/components/atoms/ProgressBar/styles.js +1 -1
- package/dist/components/atoms/ScreenHeader/index.js +1 -1
- package/dist/components/atoms/ScreenHeader/styles.js +1 -1
- package/dist/components/atoms/Select/index.js +4 -2
- package/dist/components/atoms/Select/style.js +1 -1
- package/dist/components/atoms/SliderToolTip/SliderToolTip.stories.js +47 -0
- package/dist/components/atoms/SliderToolTip/index.js +200 -0
- package/dist/components/atoms/SliderToolTip/styles.js +24 -0
- package/dist/components/atoms/StatusTag/index.js +37 -2
- package/dist/components/atoms/StatusTag/styles.js +1 -1
- package/dist/components/atoms/ValidationPanel/index.js +4 -3
- package/dist/components/atoms/VerticalSideMenuMainPage/VerticalSideMenuMainPage.stories.js +28 -0
- package/dist/components/atoms/VerticalSideMenuMainPage/index.js +98 -0
- package/dist/components/atoms/VerticalSideMenuMainPage/styles.js +24 -0
- package/dist/components/molecules/AvatarAndValidation/index.js +9 -12
- package/dist/components/molecules/CarouselImagesLogin/CarouselImagesLogin.stories.js +37 -0
- package/dist/components/molecules/CarouselImagesLogin/index.js +92 -0
- package/dist/components/molecules/CarouselImagesLogin/styles.js +21 -0
- package/dist/components/molecules/EmailResetPasswordLogin/EmailResetPasswordLogin.stories.js +28 -0
- package/dist/components/molecules/EmailResetPasswordLogin/index.js +153 -0
- package/dist/components/molecules/EmailResetPasswordLogin/styles.js +20 -0
- package/dist/components/molecules/GalleryElement/index.js +32 -7
- package/dist/components/molecules/GalleryHeader/index.js +19 -2
- package/dist/components/molecules/LoginPasswordStrength/LoginPasswordStrength.stories.js +28 -0
- package/dist/components/molecules/LoginPasswordStrength/index.js +126 -0
- package/dist/components/molecules/LoginPasswordStrength/styles.js +78 -0
- package/dist/components/molecules/LogoLoading/Loading.stories.js +28 -0
- package/dist/components/molecules/LogoLoading/index.js +22 -0
- package/dist/components/molecules/LogoLoading/styles.js +18 -0
- package/dist/components/molecules/RegistrationFirstStep/RegistrationFirstStep.stories.js +28 -0
- package/dist/components/molecules/RegistrationFirstStep/index.js +308 -0
- package/dist/components/molecules/RegistrationFirstStep/styles.js +20 -0
- package/dist/components/molecules/RegistrationSecondStep/RegistrationSecondStep.stories.js +28 -0
- package/dist/components/molecules/RegistrationSecondStep/index.js +172 -0
- package/dist/components/molecules/RegistrationSecondStep/styles.js +20 -0
- package/dist/components/molecules/RegistrationThirdStep/RegistrationThirdStep.stories.js +28 -0
- package/dist/components/molecules/RegistrationThirdStep/index.js +155 -0
- package/dist/components/molecules/RegistrationThirdStep/styles.js +20 -0
- package/dist/components/molecules/RetailerSelector/index.js +11 -3
- package/dist/components/molecules/RetailerSelector/styles.js +1 -1
- package/dist/components/molecules/SignInLogin/SignInLogin.stories.js +28 -0
- package/dist/components/molecules/SignInLogin/index.js +315 -0
- package/dist/components/molecules/SignInLogin/styles.js +20 -0
- package/dist/components/molecules/StatusAsignationInfo/index.js +19 -33
- package/dist/components/molecules/TableHeader/index.js +7 -3
- package/dist/components/molecules/TableHeader/styles.js +1 -1
- package/dist/components/molecules/TagAndInput/index.js +23 -5
- package/dist/components/molecules/TagAndInput/styles.js +10 -2
- package/dist/components/molecules/VerificationCodeResetPasswordLogin/VerificationCodeResetPasswordLogin.stories.js +28 -0
- package/dist/components/molecules/VerificationCodeResetPasswordLogin/index.js +211 -0
- package/dist/components/molecules/VerificationCodeResetPasswordLogin/styles.js +20 -0
- package/dist/components/molecules/VerificationCodeResetPasswordLogin/utils.js +69 -0
- package/dist/components/organisms/ChangePassword/ChangePassword.stories.js +28 -0
- package/dist/components/organisms/ChangePassword/index.js +124 -0
- package/dist/components/organisms/ChangePassword/styles.js +18 -0
- package/dist/components/organisms/FullProductNameHeader/index.js +40 -15
- package/dist/components/organisms/FullTabsMenu/index.js +11 -11
- package/dist/components/organisms/GlobalModal/index.js +73 -0
- package/dist/components/organisms/GlobalModal/styles.js +66 -0
- package/dist/components/organisms/ImageDataTable/index.js +19 -13
- package/dist/components/organisms/InputGroup/index.js +17 -12
- package/dist/components/organisms/InputGroup/styles.js +1 -1
- package/dist/components/organisms/ProductImageModal/index.js +3 -6
- package/dist/components/organisms/ProductImageModal/styles.js +1 -1
- package/dist/components/pages/ChangePasswordLogin/ChangePasswordLogin.stories.js +38 -0
- package/dist/components/pages/ChangePasswordLogin/index.js +108 -0
- package/dist/components/pages/ChangePasswordLogin/styles.js +18 -0
- package/dist/components/pages/EmailResetPassword/EmailResetPassword.stories.js +37 -0
- package/dist/components/pages/EmailResetPassword/index.js +130 -0
- package/dist/components/pages/EmailResetPassword/styles.js +20 -0
- package/dist/components/pages/ProviderProductEdition/ProviderProductEdition.stories.js +175 -0
- package/dist/components/pages/ProviderProductEdition/index.js +1800 -0
- package/dist/components/pages/ProviderProductEdition/styles.js +23 -0
- package/dist/components/pages/RegistrationLoginFirstStep/RegistrationLoginFirstStep.stories.js +37 -0
- package/dist/components/pages/RegistrationLoginFirstStep/index.js +269 -0
- package/dist/components/pages/RegistrationLoginFirstStep/styles.js +20 -0
- package/dist/components/pages/RegistrationLoginSecondStep/RegistrationLoginSecondStep.stories.js +38 -0
- package/dist/components/pages/RegistrationLoginSecondStep/index.js +176 -0
- package/dist/components/pages/RegistrationLoginSecondStep/styles.js +20 -0
- package/dist/components/pages/RegistrationLoginThirdStep/RegistrationLoginThirdStep.stories.js +37 -0
- package/dist/components/pages/RegistrationLoginThirdStep/index.js +178 -0
- package/dist/components/pages/RegistrationLoginThirdStep/styles.js +20 -0
- package/dist/components/pages/RetailerProductEdition/RetailerProductEdition.stories.js +34 -75
- package/dist/components/pages/RetailerProductEdition/index.js +937 -641
- package/dist/components/pages/RetailerProductEdition/styles.js +1 -1
- package/dist/components/pages/VerificationCodeResetPassword/VerificationCodeResetPassword.stories.js +37 -0
- package/dist/components/pages/VerificationCodeResetPassword/index.js +121 -0
- package/dist/components/pages/VerificationCodeResetPassword/styles.js +20 -0
- package/dist/components/pages/VerificationCodeResetPassword/utils.js +69 -0
- package/dist/global-files/data.js +36 -12
- package/dist/index.js +316 -100
- package/package.json +21 -8
- package/src/assets/images/carouselImagesLogin/login2.svg +117 -0
- package/src/assets/images/carouselImagesLogin/login3.svg +147 -0
- package/src/assets/images/carouselImagesLogin/loginImage.svg +301 -0
- package/src/assets/images/editField/showPassword.png +0 -0
- package/src/assets/images/generalButton/downloadIcon.svg +3 -0
- package/src/assets/images/genericModal/closeWhite.svg +3 -0
- package/src/assets/images/genericModal/errorModal.svg +3 -0
- package/src/assets/images/genericModal/yellowAlert.svg +12 -0
- package/src/assets/images/sliderToolTip/infoIcon.svg +4 -0
- package/src/assets/images/sliderToolTip/slide1.svg +5 -0
- package/src/assets/images/sliderToolTip/slide2.svg +9 -0
- package/src/assets/images/sliderToolTip/slide3.svg +9 -0
- package/src/assets/images/sliderToolTip/slide4.svg +9 -0
- package/src/assets/images/sliderToolTip/slide5.svg +40 -0
- package/src/assets/images/verticalSideMenuMainPage/closeMenu.svg +4 -0
- package/src/assets/images/verticalSideMenuMainPage/iconFAQS.svg +12 -0
- package/src/assets/images/verticalSideMenuMainPage/iconGroup.svg +3 -0
- package/src/assets/images/verticalSideMenuMainPage/iconLogo.svg +12 -0
- package/src/assets/images/verticalSideMenuMainPage/iconLogoContentoh.svg +15 -0
- package/src/assets/images/verticalSideMenuMainPage/iconProduct.svg +3 -0
- package/src/assets/images/verticalSideMenuMainPage/iconSpeedometer.svg +12 -0
- package/src/assets/images/verticalSideMenuMainPage/iconTask.svg +10 -0
- package/src/assets/images/verticalSideMenuMainPage/openMenu.svg +4 -0
- package/src/components/atoms/AsignationOption/index.js +17 -0
- package/src/components/atoms/AsignationOption/styles.js +13 -1
- package/src/components/atoms/CharCounter/CharCounter.stories.js +11 -0
- package/src/components/atoms/CharCounter/index.js +13 -0
- package/src/components/atoms/CharCounter/styles.js +10 -0
- package/src/components/atoms/CheckBox/index.js +8 -2
- package/src/components/atoms/DropDownButton/styles.js +6 -0
- package/src/components/atoms/GeneralButton/styles.js +14 -0
- package/src/components/atoms/GeneralInput/index.js +109 -68
- package/src/components/atoms/GeneralInput/styles.js +34 -0
- package/src/components/atoms/GenericModal/index.js +2 -2
- package/src/components/atoms/GenericModal/styles.js +11 -3
- package/src/components/atoms/GradientPanel/styles.js +8 -1
- package/src/components/atoms/Input/index.js +2 -1
- package/src/components/atoms/Input/style.js +9 -5
- package/src/components/atoms/InputFormatter/Wysiwyg.stories.js +12 -0
- package/src/components/atoms/InputFormatter/index.js +146 -0
- package/src/components/atoms/InputFormatter/styles.js +41 -0
- package/src/components/atoms/LabelToInput/index.js +0 -1
- package/src/components/atoms/LabelToInput/style.js +15 -4
- package/src/components/atoms/Loading/Loading.stories.js +10 -0
- package/src/components/atoms/Loading/index.js +13 -0
- package/src/components/atoms/Loading/styles.js +57 -0
- package/src/components/atoms/LogoImage/index.js +1 -1
- package/src/components/atoms/ProductPercentCard/Percent.stories.js +41 -0
- package/src/components/atoms/ProductPercentCard/index.js +23 -0
- package/src/components/atoms/{Percent → ProductPercentCard}/styles.js +11 -7
- package/src/components/atoms/ProgressBar/styles.js +2 -1
- package/src/components/atoms/ScreenHeader/index.js +7 -3
- package/src/components/atoms/ScreenHeader/styles.js +14 -2
- package/src/components/atoms/Select/index.js +3 -1
- package/src/components/atoms/Select/style.js +1 -2
- package/src/components/atoms/SliderToolTip/SliderToolTip.stories.js +23 -0
- package/src/components/atoms/SliderToolTip/index.js +182 -0
- package/src/components/atoms/SliderToolTip/styles.js +168 -0
- package/src/components/atoms/StatusTag/index.js +30 -2
- package/src/components/atoms/StatusTag/styles.js +9 -4
- package/src/components/atoms/ValidationPanel/index.js +4 -3
- package/src/components/atoms/VerticalSideMenuMainPage/VerticalSideMenuMainPage.stories.js +12 -0
- package/src/components/atoms/VerticalSideMenuMainPage/index.js +54 -0
- package/src/components/atoms/VerticalSideMenuMainPage/styles.js +45 -0
- package/src/components/molecules/AvatarAndValidation/index.js +14 -15
- package/src/components/molecules/CarouselImagesLogin/CarouselImagesLogin.stories.js +17 -0
- package/src/components/molecules/CarouselImagesLogin/index.js +65 -0
- package/src/components/molecules/CarouselImagesLogin/styles.js +60 -0
- package/src/components/molecules/EmailResetPasswordLogin/EmailResetPasswordLogin.stories.js +11 -0
- package/src/components/molecules/EmailResetPasswordLogin/index.js +85 -0
- package/src/components/molecules/EmailResetPasswordLogin/styles.js +23 -0
- package/src/components/molecules/GalleryElement/index.js +26 -6
- package/src/components/molecules/GalleryHeader/index.js +8 -2
- package/src/components/molecules/LoginPasswordStrength/LoginPasswordStrength.stories.js +8 -0
- package/src/components/molecules/LoginPasswordStrength/index.js +84 -0
- package/src/components/molecules/LoginPasswordStrength/styles.js +91 -0
- package/src/components/molecules/LogoLoading/Loading.stories.js +10 -0
- package/src/components/molecules/LogoLoading/index.js +12 -0
- package/src/components/molecules/LogoLoading/styles.js +16 -0
- package/src/components/molecules/RegistrationFirstStep/RegistrationFirstStep.stories.js +11 -0
- package/src/components/molecules/RegistrationFirstStep/index.js +227 -0
- package/src/components/molecules/RegistrationFirstStep/styles.js +87 -0
- package/src/components/molecules/RegistrationSecondStep/RegistrationSecondStep.stories.js +11 -0
- package/src/components/molecules/RegistrationSecondStep/index.js +135 -0
- package/src/components/molecules/RegistrationSecondStep/styles.js +64 -0
- package/src/components/molecules/RegistrationThirdStep/RegistrationThirdStep.stories.js +11 -0
- package/src/components/molecules/RegistrationThirdStep/index.js +130 -0
- package/src/components/molecules/RegistrationThirdStep/styles.js +44 -0
- package/src/components/molecules/RetailerSelector/index.js +7 -1
- package/src/components/molecules/RetailerSelector/styles.js +3 -0
- package/src/components/molecules/SignInLogin/SignInLogin.stories.js +11 -0
- package/src/components/molecules/SignInLogin/index.js +226 -0
- package/src/components/molecules/SignInLogin/styles.js +120 -0
- package/src/components/molecules/StatusAsignationInfo/index.js +23 -30
- package/src/components/molecules/TableHeader/index.js +5 -1
- package/src/components/molecules/TableHeader/styles.js +8 -0
- package/src/components/molecules/TagAndInput/index.js +19 -1
- package/src/components/molecules/TagAndInput/styles.js +28 -0
- package/src/components/molecules/VerificationCodeResetPasswordLogin/VerificationCodeResetPasswordLogin.stories.js +11 -0
- package/src/components/molecules/VerificationCodeResetPasswordLogin/index.js +171 -0
- package/src/components/molecules/VerificationCodeResetPasswordLogin/styles.js +54 -0
- package/src/components/molecules/VerificationCodeResetPasswordLogin/utils.js +54 -0
- package/src/components/organisms/ChangePassword/ChangePassword.stories.js +11 -0
- package/src/components/organisms/ChangePassword/index.js +77 -0
- package/src/components/organisms/ChangePassword/styles.js +13 -0
- package/src/components/organisms/FullProductNameHeader/index.js +47 -16
- package/src/components/organisms/FullTabsMenu/index.js +9 -9
- package/src/components/organisms/GlobalModal/index.js +68 -0
- package/src/components/organisms/GlobalModal/styles.js +113 -0
- package/src/components/organisms/ImageDataTable/index.js +25 -8
- package/src/components/organisms/InputGroup/index.js +28 -8
- package/src/components/organisms/InputGroup/styles.js +2 -2
- package/src/components/organisms/ProductImageModal/index.js +8 -5
- package/src/components/organisms/ProductImageModal/styles.js +3 -0
- package/src/components/pages/ChangePasswordLogin/ChangePasswordLogin.stories.js +18 -0
- package/src/components/pages/ChangePasswordLogin/index.js +77 -0
- package/src/components/pages/ChangePasswordLogin/styles.js +20 -0
- package/src/components/pages/EmailResetPassword/EmailResetPassword.stories.js +17 -0
- package/src/components/pages/EmailResetPassword/index.js +77 -0
- package/src/components/pages/EmailResetPassword/styles.js +27 -0
- package/src/components/pages/ProviderProductEdition/ProviderProductEdition.stories.js +172 -0
- package/src/components/pages/ProviderProductEdition/index.js +1275 -0
- package/src/components/pages/ProviderProductEdition/styles.js +118 -0
- package/src/components/pages/RegistrationLoginFirstStep/RegistrationLoginFirstStep.stories.js +17 -0
- package/src/components/pages/RegistrationLoginFirstStep/index.js +160 -0
- package/src/components/pages/RegistrationLoginFirstStep/styles.js +85 -0
- package/src/components/pages/RegistrationLoginSecondStep/RegistrationLoginSecondStep.stories.js +18 -0
- package/src/components/pages/RegistrationLoginSecondStep/index.js +111 -0
- package/src/components/pages/RegistrationLoginSecondStep/styles.js +64 -0
- package/src/components/pages/RegistrationLoginThirdStep/RegistrationLoginThirdStep.stories.js +17 -0
- package/src/components/pages/RegistrationLoginThirdStep/index.js +106 -0
- package/src/components/pages/RegistrationLoginThirdStep/styles.js +48 -0
- package/src/components/pages/RetailerProductEdition/RetailerProductEdition.stories.js +31 -66
- package/src/components/pages/RetailerProductEdition/index.js +790 -448
- package/src/components/pages/RetailerProductEdition/styles.js +13 -3
- package/src/components/pages/VerificationCodeResetPassword/VerificationCodeResetPassword.stories.js +17 -0
- package/src/components/pages/VerificationCodeResetPassword/index.js +92 -0
- package/src/components/pages/VerificationCodeResetPassword/styles.js +54 -0
- package/src/components/pages/VerificationCodeResetPassword/utils.js +56 -0
- package/src/global-files/data.js +27 -6
- package/src/index.js +23 -8
- package/src/components/atoms/Percent/Percent.stories.js +0 -38
- package/src/components/atoms/Percent/index.js +0 -15
|
@@ -34,26 +34,24 @@ var StatusAsignationInfo = function StatusAsignationInfo(_ref) {
|
|
|
34
34
|
status = _ref$status === void 0 ? "-" : _ref$status,
|
|
35
35
|
imagesSection = _ref.imagesSection,
|
|
36
36
|
setImageLayout = _ref.setImageLayout,
|
|
37
|
-
asignationsList = _ref.asignationsList,
|
|
38
37
|
_ref$percent = _ref.percent,
|
|
39
38
|
percent = _ref$percent === void 0 ? 0 : _ref$percent,
|
|
40
|
-
activeTab = _ref.activeTab,
|
|
41
|
-
deleteImages = _ref.deleteImages,
|
|
42
|
-
saveDatasheets = _ref.saveDatasheets,
|
|
43
|
-
saveDescriptions = _ref.saveDescriptions,
|
|
44
|
-
updateImages = _ref.updateImages,
|
|
45
39
|
assignationsImages = _ref.assignationsImages,
|
|
46
40
|
setAssignation = _ref.setAssignation,
|
|
47
41
|
isRetailer = _ref.isRetailer,
|
|
42
|
+
downloadImages = _ref.downloadImages,
|
|
43
|
+
askToDeleteImages = _ref.askToDeleteImages,
|
|
48
44
|
_ref$id = _ref.id,
|
|
49
|
-
id = _ref$id === void 0 ? "default-id" : _ref$id
|
|
45
|
+
id = _ref$id === void 0 ? "default-id" : _ref$id,
|
|
46
|
+
onClickSave = _ref.onClickSave,
|
|
47
|
+
showSaveButton = _ref.showSaveButton;
|
|
50
48
|
|
|
51
49
|
var _useState = (0, _react.useState)(false),
|
|
52
50
|
_useState2 = (0, _slicedToArray2.default)(_useState, 2),
|
|
53
51
|
showAsignationPanel = _useState2[0],
|
|
54
52
|
setShowAsignationPanel = _useState2[1];
|
|
55
53
|
|
|
56
|
-
var _useState3 = (0, _react.useState)(
|
|
54
|
+
var _useState3 = (0, _react.useState)(false),
|
|
57
55
|
_useState4 = (0, _slicedToArray2.default)(_useState3, 2),
|
|
58
56
|
layout = _useState4[0],
|
|
59
57
|
setLayout = _useState4[1];
|
|
@@ -77,32 +75,23 @@ var StatusAsignationInfo = function StatusAsignationInfo(_ref) {
|
|
|
77
75
|
}, [showAsignationPanel]);
|
|
78
76
|
return /*#__PURE__*/(0, _jsxRuntime.jsxs)(_styles.Container, {
|
|
79
77
|
id: id,
|
|
80
|
-
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(
|
|
78
|
+
children: [status !== "-" && /*#__PURE__*/(0, _jsxRuntime.jsx)(_index2.StatusTag, {
|
|
79
|
+
statusType: status,
|
|
80
|
+
ovalForm: true
|
|
81
|
+
}), showSaveButton && /*#__PURE__*/(0, _jsxRuntime.jsx)(_GeneralButton.Button, {
|
|
81
82
|
buttonType: "circular-button save-button",
|
|
82
|
-
onClick:
|
|
83
|
-
switch (activeTab) {
|
|
84
|
-
case "Descripción":
|
|
85
|
-
saveDescriptions && saveDescriptions();
|
|
86
|
-
break;
|
|
87
|
-
|
|
88
|
-
case "Ficha técnica":
|
|
89
|
-
saveDatasheets && saveDatasheets();
|
|
90
|
-
break;
|
|
91
|
-
|
|
92
|
-
case "Imágenes":
|
|
93
|
-
updateImages && updateImages();
|
|
94
|
-
break;
|
|
95
|
-
|
|
96
|
-
default:
|
|
97
|
-
break;
|
|
98
|
-
}
|
|
99
|
-
}
|
|
83
|
+
onClick: onClickSave
|
|
100
84
|
}), imagesSection && /*#__PURE__*/(0, _jsxRuntime.jsxs)("div", {
|
|
101
85
|
className: "images-buttons",
|
|
102
|
-
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_GeneralButton.Button, {
|
|
86
|
+
children: [showSaveButton && /*#__PURE__*/(0, _jsxRuntime.jsx)(_GeneralButton.Button, {
|
|
103
87
|
buttonType: "circular-button delete-button",
|
|
104
88
|
onClick: function onClick() {
|
|
105
|
-
|
|
89
|
+
askToDeleteImages && askToDeleteImages();
|
|
90
|
+
}
|
|
91
|
+
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(_GeneralButton.Button, {
|
|
92
|
+
buttonType: "circular-button download-button",
|
|
93
|
+
onClick: function onClick() {
|
|
94
|
+
downloadImages();
|
|
106
95
|
}
|
|
107
96
|
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(_GeneralButton.Button, {
|
|
108
97
|
buttonType: layout ? "grid-layout" : "row-layout",
|
|
@@ -111,9 +100,6 @@ var StatusAsignationInfo = function StatusAsignationInfo(_ref) {
|
|
|
111
100
|
setImageLayout && setImageLayout(!layout);
|
|
112
101
|
}
|
|
113
102
|
})]
|
|
114
|
-
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(_index2.StatusTag, {
|
|
115
|
-
statusType: status,
|
|
116
|
-
ovalForm: true
|
|
117
103
|
}), /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
|
|
118
104
|
className: "assignations-container",
|
|
119
105
|
children: assignationsImages === null || assignationsImages === void 0 ? void 0 : (_assignationsImages$a = assignationsImages.assignations) === null || _assignationsImages$a === void 0 ? void 0 : _assignationsImages$a.map(function (assignation, index) {
|
|
@@ -167,7 +153,7 @@ var StatusAsignationInfo = function StatusAsignationInfo(_ref) {
|
|
|
167
153
|
className: "no-asignations",
|
|
168
154
|
children: "Sin personas para asignar"
|
|
169
155
|
})
|
|
170
|
-
}), isRetailer ===
|
|
156
|
+
}), isRetailer === 1 && /*#__PURE__*/(0, _jsxRuntime.jsxs)("div", {
|
|
171
157
|
className: "default-asignations-list",
|
|
172
158
|
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_index3.AsignationOption, {
|
|
173
159
|
asignationType: "provider",
|
|
@@ -20,17 +20,21 @@ var TableHeader = function TableHeader(_ref) {
|
|
|
20
20
|
activeImage = _ref.activeImage,
|
|
21
21
|
assignationsImages = _ref.assignationsImages,
|
|
22
22
|
setAssignation = _ref.setAssignation,
|
|
23
|
-
isRetailer = _ref.isRetailer
|
|
23
|
+
isRetailer = _ref.isRetailer,
|
|
24
|
+
onClickSave = _ref.onClickSave,
|
|
25
|
+
showSaveButton = _ref.showSaveButton;
|
|
24
26
|
return /*#__PURE__*/(0, _jsxRuntime.jsxs)(_styles.Container, {
|
|
25
27
|
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_ScreenHeader.ScreenHeader, {
|
|
26
|
-
text: activeImage === null || activeImage === void 0 ? void 0 : activeImage.name,
|
|
28
|
+
text: (activeImage === null || activeImage === void 0 ? void 0 : activeImage.name) || "-",
|
|
27
29
|
color: _variables.GlobalColors.s5,
|
|
28
30
|
headerType: "input-name-header"
|
|
29
31
|
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(_StatusAsignationInfo.StatusAsignationInfo, {
|
|
30
32
|
status: imagesStatus,
|
|
31
33
|
assignationsImages: assignationsImages,
|
|
32
34
|
setAssignation: setAssignation,
|
|
33
|
-
isRetailer: isRetailer
|
|
35
|
+
isRetailer: isRetailer,
|
|
36
|
+
onClickSave: onClickSave,
|
|
37
|
+
showSaveButton: showSaveButton
|
|
34
38
|
})]
|
|
35
39
|
});
|
|
36
40
|
};
|
|
@@ -15,6 +15,6 @@ var _variables = require("../../../global-files/variables");
|
|
|
15
15
|
|
|
16
16
|
var _templateObject;
|
|
17
17
|
|
|
18
|
-
var Container = _styledComponents.default.div(_templateObject || (_templateObject = (0, _taggedTemplateLiteral2.default)(["\n display: flex;\n justify-content: space-between;\n padding-bottom: 5px;\n border-bottom: 1px solid ", ";\n\n .status-asignation-info {\n display: flex;\n align-items: center;\n\n * + * {\n margin-left: 5px;\n }\n }\n\n & + * {\n margin-top: 4px;\n }\n"])), _variables.GlobalColors.s2);
|
|
18
|
+
var Container = _styledComponents.default.div(_templateObject || (_templateObject = (0, _taggedTemplateLiteral2.default)(["\n display: flex;\n justify-content: space-between;\n padding-bottom: 5px;\n border-bottom: 1px solid ", ";\n\n .input-name-header {\n overflow-x: auto;\n max-width: 40%;\n white-space: nowrap;\n height: 23px;\n line-height: 23px;\n text-overflow: initial;\n }\n .status-asignation-info {\n display: flex;\n align-items: center;\n\n * + * {\n margin-left: 5px;\n }\n }\n\n & + * {\n margin-top: 4px;\n }\n"])), _variables.GlobalColors.s2);
|
|
19
19
|
|
|
20
20
|
exports.Container = Container;
|
|
@@ -29,13 +29,26 @@ 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,
|
|
34
|
+
required = _ref.required,
|
|
35
|
+
optionList = _ref.optionList,
|
|
36
|
+
description = _ref.description,
|
|
37
|
+
inputOnChange = _ref.inputOnChange,
|
|
38
|
+
color = _ref.color;
|
|
33
39
|
return /*#__PURE__*/(0, _jsxRuntime.jsxs)(_styles.Container, {
|
|
34
40
|
inputType: inputType,
|
|
35
41
|
className: "input-container",
|
|
36
|
-
children: [/*#__PURE__*/(0, _jsxRuntime.
|
|
37
|
-
|
|
38
|
-
|
|
42
|
+
children: [/*#__PURE__*/(0, _jsxRuntime.jsxs)("div", {
|
|
43
|
+
className: "title-container",
|
|
44
|
+
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_index.ScreenHeader, {
|
|
45
|
+
text: label,
|
|
46
|
+
headerType: "input-name-header",
|
|
47
|
+
color: color
|
|
48
|
+
}), /*#__PURE__*/(0, _jsxRuntime.jsx)("span", {
|
|
49
|
+
className: "tooltip",
|
|
50
|
+
children: label
|
|
51
|
+
})]
|
|
39
52
|
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(_index2.GeneralInput, {
|
|
40
53
|
inputId: inputId,
|
|
41
54
|
inputType: inputType,
|
|
@@ -51,7 +64,12 @@ var TagAndInput = function TagAndInput(_ref) {
|
|
|
51
64
|
version: version,
|
|
52
65
|
dinamicHeight: dinamicHeight,
|
|
53
66
|
inputCols: inputCols,
|
|
54
|
-
inputRows: inputRows
|
|
67
|
+
inputRows: inputRows,
|
|
68
|
+
maxChar: maxChar,
|
|
69
|
+
required: required,
|
|
70
|
+
optionList: optionList,
|
|
71
|
+
description: description,
|
|
72
|
+
inputOnChange: inputOnChange
|
|
55
73
|
})]
|
|
56
74
|
}, "generalTagInput-".concat(inputType));
|
|
57
75
|
};
|
|
@@ -11,11 +11,19 @@ var _taggedTemplateLiteral2 = _interopRequireDefault(require("@babel/runtime/hel
|
|
|
11
11
|
|
|
12
12
|
var _styledComponents = _interopRequireDefault(require("styled-components"));
|
|
13
13
|
|
|
14
|
+
var _variables = require("../../../global-files/variables");
|
|
15
|
+
|
|
14
16
|
var _templateObject;
|
|
15
17
|
|
|
16
|
-
var Container = _styledComponents.default.div(_templateObject || (_templateObject = (0, _taggedTemplateLiteral2.default)(["\n & > :first-child {\n & + * {\n margin-top: ", "px;\n }\n }\n"])), function (_ref) {
|
|
17
|
-
var
|
|
18
|
+
var Container = _styledComponents.default.div(_templateObject || (_templateObject = (0, _taggedTemplateLiteral2.default)(["\n .title-container {\n position: relative;\n\n .tooltip {\n display: none;\n position: absolute;\n background-color: ", ";\n color: ", ";\n font-family: ", ";\n font-size: 14px;\n line-height: 19px;\n left: 0;\n top: 0;\n height: fit-content;\n transition: display 2s;\n }\n\n &:hover {\n .tooltip {\n display: block;\n }\n }\n }\n\n & > :first-child {\n & + * {\n margin-top: ", "px;\n }\n }\n & + * {\n margin-top: ", "px;\n }\n"])), _variables.GlobalColors.white, function (_ref) {
|
|
19
|
+
var color = _ref.color;
|
|
20
|
+
return color ? color : _variables.GlobalColors.s5;
|
|
21
|
+
}, _variables.FontFamily.Raleway, function (_ref2) {
|
|
22
|
+
var inputType = _ref2.inputType;
|
|
18
23
|
return inputType !== "textarea" ? 4 : 15;
|
|
24
|
+
}, function (_ref3) {
|
|
25
|
+
var inputType = _ref3.inputType;
|
|
26
|
+
return inputType !== "textarea" ? 0 : 10;
|
|
19
27
|
});
|
|
20
28
|
|
|
21
29
|
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.VerificationCodeResetPasswordLoginDefault = 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/VerificationCodeResetPasswordLogin",
|
|
18
|
+
component: _index.VerificationCodeResetPasswordLogin
|
|
19
|
+
};
|
|
20
|
+
exports.default = _default;
|
|
21
|
+
|
|
22
|
+
var Template = function Template(args) {
|
|
23
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsx)(_index.VerificationCodeResetPasswordLogin, (0, _objectSpread2.default)({}, args));
|
|
24
|
+
};
|
|
25
|
+
|
|
26
|
+
var VerificationCodeResetPasswordLoginDefault = Template.bind({});
|
|
27
|
+
exports.VerificationCodeResetPasswordLoginDefault = VerificationCodeResetPasswordLoginDefault;
|
|
28
|
+
VerificationCodeResetPasswordLoginDefault.args = {};
|
|
@@ -0,0 +1,211 @@
|
|
|
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.VerificationCodeResetPasswordLogin = 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 _GradientPanel = require("../../atoms/GradientPanel");
|
|
19
|
+
|
|
20
|
+
var _react = require("react");
|
|
21
|
+
|
|
22
|
+
var _LogoImage = require("../../atoms/LogoImage");
|
|
23
|
+
|
|
24
|
+
var _ScreenHeader = require("../../atoms/ScreenHeader");
|
|
25
|
+
|
|
26
|
+
var _variables = require("../../../global-files/variables");
|
|
27
|
+
|
|
28
|
+
var _GeneralInput = require("../../atoms/GeneralInput");
|
|
29
|
+
|
|
30
|
+
var _GeneralButton = require("../../atoms/GeneralButton");
|
|
31
|
+
|
|
32
|
+
var _utils = require("./utils");
|
|
33
|
+
|
|
34
|
+
var _jsxRuntime = require("react/jsx-runtime");
|
|
35
|
+
|
|
36
|
+
var VerificationCodeResetPasswordLogin = function VerificationCodeResetPasswordLogin(props) {
|
|
37
|
+
var _useState = (0, _react.useState)(false),
|
|
38
|
+
_useState2 = (0, _slicedToArray2.default)(_useState, 2),
|
|
39
|
+
resend = _useState2[0],
|
|
40
|
+
setResend = _useState2[1];
|
|
41
|
+
|
|
42
|
+
var _useState3 = (0, _react.useState)(""),
|
|
43
|
+
_useState4 = (0, _slicedToArray2.default)(_useState3, 2),
|
|
44
|
+
awsError = _useState4[0],
|
|
45
|
+
setAwsError = _useState4[1];
|
|
46
|
+
|
|
47
|
+
var _useState5 = (0, _react.useState)(false),
|
|
48
|
+
_useState6 = (0, _slicedToArray2.default)(_useState5, 2),
|
|
49
|
+
emptyVerificationCode = _useState6[0],
|
|
50
|
+
setEmptyVerificationCode = _useState6[1];
|
|
51
|
+
|
|
52
|
+
var _useState7 = (0, _react.useState)(document.querySelectorAll("[id^='verificationCodeInput']")),
|
|
53
|
+
_useState8 = (0, _slicedToArray2.default)(_useState7, 2),
|
|
54
|
+
inputCodeVerificationAll = _useState8[0],
|
|
55
|
+
setInputCodeVerificationAll = _useState8[1];
|
|
56
|
+
|
|
57
|
+
var inputPositions = [1, 2, 3, 4, 5, 6];
|
|
58
|
+
(0, _react.useEffect)(function () {
|
|
59
|
+
props.confirmationError !== "" && setEmptyVerificationCode(false);
|
|
60
|
+
}, [props.confirmationError]);
|
|
61
|
+
|
|
62
|
+
var checkCode = function checkCode(e, flag) {
|
|
63
|
+
var valid = true;
|
|
64
|
+
e.preventDefault();
|
|
65
|
+
var code = "";
|
|
66
|
+
|
|
67
|
+
if (awsError === "" && !flag) {
|
|
68
|
+
inputPositions.map(function (position) {
|
|
69
|
+
return code = code + document.querySelector("#verificationCodeInput".concat(position)).value;
|
|
70
|
+
});
|
|
71
|
+
|
|
72
|
+
if (sessionStorage.getItem("resetError")) {
|
|
73
|
+
JSON.parse(sessionStorage.getItem("confirmationCode")) === code && (valid = false);
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
sessionStorage.setItem("confirmationCode", JSON.stringify(code));
|
|
77
|
+
valid && !sessionStorage.getItem("resetPasswordProcess") && props.setPaso(6);
|
|
78
|
+
valid && sessionStorage.getItem("resetPasswordProcess") && props.setPaso(8);
|
|
79
|
+
}
|
|
80
|
+
};
|
|
81
|
+
|
|
82
|
+
var validateResend = /*#__PURE__*/function () {
|
|
83
|
+
var _ref = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee(e) {
|
|
84
|
+
var email;
|
|
85
|
+
return _regenerator.default.wrap(function _callee$(_context) {
|
|
86
|
+
while (1) {
|
|
87
|
+
switch (_context.prev = _context.next) {
|
|
88
|
+
case 0:
|
|
89
|
+
e.preventDefault();
|
|
90
|
+
email = JSON.parse(sessionStorage.getItem("email"));
|
|
91
|
+
_context.prev = 2;
|
|
92
|
+
_context.next = 5;
|
|
93
|
+
return props.Auth.forgotPassword(email);
|
|
94
|
+
|
|
95
|
+
case 5:
|
|
96
|
+
sessionStorage.setItem("email", JSON.stringify(email));
|
|
97
|
+
sessionStorage.setItem("resetPasswordProcess", JSON.stringify("true"));
|
|
98
|
+
props.setPaso(5);
|
|
99
|
+
setEmptyVerificationCode(false);
|
|
100
|
+
setResend(true);
|
|
101
|
+
_context.next = 16;
|
|
102
|
+
break;
|
|
103
|
+
|
|
104
|
+
case 12:
|
|
105
|
+
_context.prev = 12;
|
|
106
|
+
_context.t0 = _context["catch"](2);
|
|
107
|
+
setAwsError(_context.t0.code);
|
|
108
|
+
console.log(_context.t0.message);
|
|
109
|
+
|
|
110
|
+
case 16:
|
|
111
|
+
case "end":
|
|
112
|
+
return _context.stop();
|
|
113
|
+
}
|
|
114
|
+
}
|
|
115
|
+
}, _callee, null, [[2, 12]]);
|
|
116
|
+
}));
|
|
117
|
+
|
|
118
|
+
return function validateResend(_x) {
|
|
119
|
+
return _ref.apply(this, arguments);
|
|
120
|
+
};
|
|
121
|
+
}();
|
|
122
|
+
|
|
123
|
+
(0, _react.useEffect)(function () {
|
|
124
|
+
setInputCodeVerificationAll(document.querySelectorAll("[id^='verificationCodeInput']"));
|
|
125
|
+
}, []);
|
|
126
|
+
var loginRight = [/*#__PURE__*/(0, _jsxRuntime.jsx)(_LogoImage.LogoImage, {}, "1"), /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
|
|
127
|
+
className: "credenciales",
|
|
128
|
+
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_ScreenHeader.ScreenHeader, {
|
|
129
|
+
fontFamily: _variables.FontFamily.AvenirNext,
|
|
130
|
+
color: _variables.GlobalColors.s5,
|
|
131
|
+
text: "Ingresa tus credenciales"
|
|
132
|
+
})
|
|
133
|
+
}, "2"), /*#__PURE__*/(0, _jsxRuntime.jsxs)("div", {
|
|
134
|
+
className: "user",
|
|
135
|
+
children: [sessionStorage.getItem("email") && /*#__PURE__*/(0, _jsxRuntime.jsx)(_ScreenHeader.ScreenHeader, {
|
|
136
|
+
text: "Ingrese el c\xF3digo de verificaci\xF3n enviado a: ".concat(JSON.parse(sessionStorage.getItem("email"))),
|
|
137
|
+
headerType: "input-name-header"
|
|
138
|
+
}), !sessionStorage.getItem("email") && /*#__PURE__*/(0, _jsxRuntime.jsx)(_ScreenHeader.ScreenHeader, {
|
|
139
|
+
text: "Ingrese c\xF3digo de verificaci\xF3n enviado a: ".concat(JSON.parse(sessionStorage.getItem("nuevoRegistro")).email),
|
|
140
|
+
headerType: "input-name-header"
|
|
141
|
+
}), /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
|
|
142
|
+
className: "verification-code",
|
|
143
|
+
children: inputPositions.map(function (position) {
|
|
144
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsx)(_GeneralInput.GeneralInput, {
|
|
145
|
+
inputId: "verificationCodeInput".concat(position),
|
|
146
|
+
inputType: "text",
|
|
147
|
+
inputPlaceholder: "X",
|
|
148
|
+
validateInput: _utils.validateInput,
|
|
149
|
+
inputsArray: inputCodeVerificationAll,
|
|
150
|
+
position: position,
|
|
151
|
+
maxChar: 1
|
|
152
|
+
});
|
|
153
|
+
})
|
|
154
|
+
}), emptyVerificationCode && /*#__PURE__*/(0, _jsxRuntime.jsx)("label", {
|
|
155
|
+
children: "Ingrese su c\xF3digo de verificaci\xF3n"
|
|
156
|
+
}), sessionStorage.getItem("resetError") && /*#__PURE__*/(0, _jsxRuntime.jsx)("label", {
|
|
157
|
+
children: "C\xF3digo de verifiaci\xF3n incorrecto"
|
|
158
|
+
}), props.confirmationError === "LimitExceededException" && !emptyVerificationCode && /*#__PURE__*/(0, _jsxRuntime.jsx)("label", {
|
|
159
|
+
children: "Haz realizado demasiados intentos, intentalo m\xE1s tarde"
|
|
160
|
+
}), props.confirmationError === "CodeMismatchException" && !emptyVerificationCode && /*#__PURE__*/(0, _jsxRuntime.jsx)("label", {
|
|
161
|
+
children: "C\xF3digo de verificaci\xF3n incorrecto"
|
|
162
|
+
}), props.confirmationError === "ExpiredCodeException" && !emptyVerificationCode && /*#__PURE__*/(0, _jsxRuntime.jsx)("label", {
|
|
163
|
+
children: "El c\xF3digo ingresado est\xE1 expirado"
|
|
164
|
+
}), props.confirmationError === "InternalErrorException" && !emptyVerificationCode && /*#__PURE__*/(0, _jsxRuntime.jsx)("label", {
|
|
165
|
+
children: "Algo sali\xF3 mal, porfavor vuelva a intentarlo"
|
|
166
|
+
}), awsError === "LimitExceededException" && /*#__PURE__*/(0, _jsxRuntime.jsx)("label", {
|
|
167
|
+
children: "Haz realizado demasiados intentos, intentalo m\xE1s tarde"
|
|
168
|
+
}), awsError === "InternalErrorException" && /*#__PURE__*/(0, _jsxRuntime.jsx)("label", {
|
|
169
|
+
children: "Algo sali\xF3 mal, porfavor vuelva a intentarlo"
|
|
170
|
+
}), resend && awsError === "" && /*#__PURE__*/(0, _jsxRuntime.jsx)("label", {
|
|
171
|
+
className: "resendTrue",
|
|
172
|
+
children: "Se reenvi\xF3 el c\xF3digo de verificaci\xF3n correctamente"
|
|
173
|
+
})]
|
|
174
|
+
}, "3"), /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
|
|
175
|
+
className: "resend-code",
|
|
176
|
+
children: /*#__PURE__*/(0, _jsxRuntime.jsx)("p", {
|
|
177
|
+
onClick: function onClick(e) {
|
|
178
|
+
return validateResend(e);
|
|
179
|
+
},
|
|
180
|
+
children: "Reenviar c\xF3digo de verificaci\xF3n"
|
|
181
|
+
})
|
|
182
|
+
}, "4"), /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
|
|
183
|
+
className: "button-center",
|
|
184
|
+
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_GeneralButton.Button, {
|
|
185
|
+
buttonType: "general-default-button",
|
|
186
|
+
label: "Enviar",
|
|
187
|
+
onClick: function onClick(e) {
|
|
188
|
+
var flag = (0, _utils.validate)(inputCodeVerificationAll);
|
|
189
|
+
checkCode(e, flag);
|
|
190
|
+
setEmptyVerificationCode(flag);
|
|
191
|
+
}
|
|
192
|
+
})
|
|
193
|
+
}, "5"), /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
|
|
194
|
+
className: "reset-password",
|
|
195
|
+
children: /*#__PURE__*/(0, _jsxRuntime.jsx)("p", {
|
|
196
|
+
onClick: function onClick() {
|
|
197
|
+
return props.setPaso(10);
|
|
198
|
+
},
|
|
199
|
+
children: "Regresar..."
|
|
200
|
+
})
|
|
201
|
+
}, "6")];
|
|
202
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsx)(_styles.Container, {
|
|
203
|
+
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_GradientPanel.GradientPanel, {
|
|
204
|
+
componentsArray: loginRight,
|
|
205
|
+
panelType: "home-login",
|
|
206
|
+
panelColor: _variables.GlobalColors.white
|
|
207
|
+
})
|
|
208
|
+
});
|
|
209
|
+
};
|
|
210
|
+
|
|
211
|
+
exports.VerificationCodeResetPasswordLogin = VerificationCodeResetPasswordLogin;
|
|
@@ -0,0 +1,20 @@
|
|
|
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 _variables = require("../../../global-files/variables");
|
|
15
|
+
|
|
16
|
+
var _templateObject;
|
|
17
|
+
|
|
18
|
+
var Container = _styledComponents.default.div(_templateObject || (_templateObject = (0, _taggedTemplateLiteral2.default)(["\n display: flex;\n height: 100vh;\n width: 50%;\n align-items: center;\n justify-content: center;\n .button-center {\n text-align: center;\n .general-default-button {\n width: 160px;\n }\n }\n .reset-password {\n text-align: center;\n margin: 15px !important;\n color: ", ";\n cursor: pointer;\n font-weight: bold;\n font-family: ", ";\n font-size: 13px;\n }\n .resend-code {\n margin-top: 8px !important;\n color: ", ";\n font-family: ", ";\n font-size: 11px;\n text-decoration: underline rgb(228, 81, 172);\n cursor: pointer;\n & + * {\n margin-top: 30px;\n }\n }\n .verification-code {\n display: flex;\n text-align: center;\n margin: auto;\n margin-top: 10px;\n input[type=\"number\"]::-webkit-inner-spin-button,\n input[type=\"number\"]::-webkit-outer-spin-button {\n -webkit-appearance: none;\n margin: 0;\n }\n input {\n width: 70%;\n text-align: center;\n }\n }\n .resendTrue{\n color: ", ";\n }\n"])), _variables.GlobalColors.secondary_magenta, _variables.FontFamily.Raleway, _variables.GlobalColors.magenta_s2, _variables.FontFamily.AvenirNext, _variables.GlobalColors.exported);
|
|
19
|
+
|
|
20
|
+
exports.Container = Container;
|
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.validateInput = exports.validate = void 0;
|
|
7
|
+
|
|
8
|
+
/**
|
|
9
|
+
*
|
|
10
|
+
* @param {event} e event received triggered by verification code input
|
|
11
|
+
* @param {number} index index position from the verification code(VC) input array (i.e. digit 1,2,3 etc...)
|
|
12
|
+
* @param {array<html nodes>} inputsArray array which contains every VC digit input (used to change focus on input change)
|
|
13
|
+
*/
|
|
14
|
+
var validateInput = function validateInput(e, index, inputsArray) {
|
|
15
|
+
var isValid = false;
|
|
16
|
+
var inputNotEmpty = e.target.value.length > 0;
|
|
17
|
+
|
|
18
|
+
if (inputNotEmpty) {
|
|
19
|
+
if (validateInputNumber(e) !== null) {
|
|
20
|
+
isValid = true;
|
|
21
|
+
nextInputFocus(inputsArray, index++);
|
|
22
|
+
}
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
return isValid ? e.target.value : "";
|
|
26
|
+
};
|
|
27
|
+
/**
|
|
28
|
+
*
|
|
29
|
+
* @param {event} e event received triggered by verification code input
|
|
30
|
+
* @returns {boolean} if digit is a number
|
|
31
|
+
*/
|
|
32
|
+
|
|
33
|
+
|
|
34
|
+
exports.validateInput = validateInput;
|
|
35
|
+
|
|
36
|
+
var validateInputNumber = function validateInputNumber(e) {
|
|
37
|
+
return (e.target.value || String.fromCharCode(e.keyCode)).match(/[0-9]{1}/);
|
|
38
|
+
};
|
|
39
|
+
/**
|
|
40
|
+
*
|
|
41
|
+
* @param {array<html nodes>} inputsArray array which contains every VC digit input (used to change focus on input change)
|
|
42
|
+
* @param {number} index index position from the verification code(VC) input array (i.e. digit 1,2,3 etc...)
|
|
43
|
+
* changes focus to next input if digit typed is a number and there wasn't any before
|
|
44
|
+
*/
|
|
45
|
+
|
|
46
|
+
|
|
47
|
+
var nextInputFocus = function nextInputFocus(inputsArray, index) {
|
|
48
|
+
var _inputsArray$index;
|
|
49
|
+
|
|
50
|
+
var button = document.getElementsByClassName("general-default-button");
|
|
51
|
+
inputsArray !== null && inputsArray !== void 0 && inputsArray.length && index === (inputsArray === null || inputsArray === void 0 ? void 0 : inputsArray.length) ? button[0].focus() : (_inputsArray$index = inputsArray[index]) === null || _inputsArray$index === void 0 ? void 0 : _inputsArray$index.focus();
|
|
52
|
+
};
|
|
53
|
+
/**
|
|
54
|
+
*
|
|
55
|
+
* @param {array<html nodes>} inputsArray array which contains every VC digit input (used to check if there's any empty)
|
|
56
|
+
* @param {function} setEmptyVerificationCode function to update flag which handles if there's an empty char
|
|
57
|
+
* updates emptyVerificationFlag from father component
|
|
58
|
+
*/
|
|
59
|
+
|
|
60
|
+
|
|
61
|
+
var validate = function validate(inputsArray) {
|
|
62
|
+
var contInputEmpty = 0;
|
|
63
|
+
inputsArray.forEach(function (element) {
|
|
64
|
+
element.value === "" ? 0 : contInputEmpty++;
|
|
65
|
+
});
|
|
66
|
+
return contInputEmpty !== inputsArray.length;
|
|
67
|
+
};
|
|
68
|
+
|
|
69
|
+
exports.validate = validate;
|
|
@@ -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.ChangePasswordDefault = 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/organisms/ChangePassword",
|
|
18
|
+
component: _index.ChangePassword
|
|
19
|
+
};
|
|
20
|
+
exports.default = _default;
|
|
21
|
+
|
|
22
|
+
var Template = function Template(args) {
|
|
23
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsx)(_index.ChangePassword, (0, _objectSpread2.default)({}, args));
|
|
24
|
+
};
|
|
25
|
+
|
|
26
|
+
var ChangePasswordDefault = Template.bind({});
|
|
27
|
+
exports.ChangePasswordDefault = ChangePasswordDefault;
|
|
28
|
+
ChangePasswordDefault.args = {};
|