contentoh-components-library 21.0.51 → 21.0.55
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/Loading/index.js +4 -6
- package/dist/components/atoms/Loading/styles.js +8 -4
- package/dist/components/atoms/LogoImage/index.js +1 -0
- package/dist/components/molecules/LoginPasswordStrength/styles.js +1 -1
- 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/SignInLogin/index.js +11 -9
- package/dist/components/molecules/SignInLoginCreationApp/index.js +12 -11
- package/dist/components/organisms/ChangePassword/styles.js +1 -1
- package/package.json +2 -2
- package/src/components/atoms/Loading/index.js +4 -6
- package/src/components/atoms/Loading/styles.js +45 -54
- package/src/components/atoms/LogoImage/index.js +1 -1
- package/src/components/molecules/LoginPasswordStrength/styles.js +3 -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/SignInLogin/index.js +30 -26
- package/src/components/molecules/SignInLoginCreationApp/index.js +5 -3
- package/src/components/organisms/ChangePassword/styles.js +2 -4
|
@@ -7,14 +7,12 @@ exports.Loading = void 0;
|
|
|
7
7
|
|
|
8
8
|
var _styles = require("./styles");
|
|
9
9
|
|
|
10
|
-
var _LogoImage = require("../LogoImage");
|
|
11
|
-
|
|
12
10
|
var _jsxRuntime = require("react/jsx-runtime");
|
|
13
11
|
|
|
14
12
|
var Loading = function Loading() {
|
|
15
|
-
return /*#__PURE__*/(0, _jsxRuntime.
|
|
16
|
-
|
|
17
|
-
|
|
13
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsx)(_styles.Container, {
|
|
14
|
+
className: "loading",
|
|
15
|
+
children: /*#__PURE__*/(0, _jsxRuntime.jsxs)(_styles.Loader, {
|
|
18
16
|
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)("span", {
|
|
19
17
|
className: "first"
|
|
20
18
|
}), /*#__PURE__*/(0, _jsxRuntime.jsx)("span", {
|
|
@@ -22,7 +20,7 @@ var Loading = function Loading() {
|
|
|
22
20
|
}), /*#__PURE__*/(0, _jsxRuntime.jsx)("span", {
|
|
23
21
|
className: "third"
|
|
24
22
|
})]
|
|
25
|
-
})
|
|
23
|
+
})
|
|
26
24
|
});
|
|
27
25
|
};
|
|
28
26
|
|
|
@@ -5,14 +5,18 @@ var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefau
|
|
|
5
5
|
Object.defineProperty(exports, "__esModule", {
|
|
6
6
|
value: true
|
|
7
7
|
});
|
|
8
|
-
exports.Container = void 0;
|
|
8
|
+
exports.Loader = exports.Container = void 0;
|
|
9
9
|
|
|
10
10
|
var _taggedTemplateLiteral2 = _interopRequireDefault(require("@babel/runtime/helpers/esm/taggedTemplateLiteral"));
|
|
11
11
|
|
|
12
12
|
var _styledComponents = _interopRequireDefault(require("styled-components"));
|
|
13
13
|
|
|
14
|
-
var _templateObject;
|
|
14
|
+
var _templateObject, _templateObject2;
|
|
15
15
|
|
|
16
|
-
var Container = _styledComponents.default.div(_templateObject || (_templateObject = (0, _taggedTemplateLiteral2.default)(["\n
|
|
16
|
+
var Container = _styledComponents.default.div(_templateObject || (_templateObject = (0, _taggedTemplateLiteral2.default)(["\n display: flex;\n justify-content: center;\n align-items: center;\n height: 100%;\n width: 100%;\n"])));
|
|
17
17
|
|
|
18
|
-
exports.Container = Container;
|
|
18
|
+
exports.Container = Container;
|
|
19
|
+
|
|
20
|
+
var Loader = _styledComponents.default.div(_templateObject2 || (_templateObject2 = (0, _taggedTemplateLiteral2.default)(["\n display: flex;\n justify-content: center;\n align-items: center;\n height: 100%;\n width: 100%;\n span {\n display: inline-block;\n border-radius: 100%;\n margin: 35px 5px;\n opacity: 1;\n }\n .first {\n background-color: #ff75cf;\n }\n .second {\n background-color: #e33aa9;\n }\n .third {\n background-color: #b12d84;\n }\n span:nth-child(1) {\n width: 16px;\n height: 16px;\n animation: opacitychange 1s ease-in-out infinite;\n }\n span:nth-child(2) {\n width: 18px;\n height: 18px;\n\n animation: opacitychange 1s ease-in-out 0.33s infinite;\n }\n span:nth-child(3) {\n width: 20px;\n height: 20px;\n\n animation: opacitychange 1s ease-in-out 0.66s infinite;\n }\n @keyframes opacitychange {\n 0%,\n 100% {\n opacity: 0;\n }\n 60% {\n opacity: 1;\n }\n }\n"])));
|
|
21
|
+
|
|
22
|
+
exports.Loader = Loader;
|
|
@@ -15,6 +15,7 @@ var _jsxRuntime = require("react/jsx-runtime");
|
|
|
15
15
|
|
|
16
16
|
var LogoImage = function LogoImage() {
|
|
17
17
|
return /*#__PURE__*/(0, _jsxRuntime.jsx)(_styles.Container, {
|
|
18
|
+
className: "logo",
|
|
18
19
|
children: /*#__PURE__*/(0, _jsxRuntime.jsx)("img", {
|
|
19
20
|
src: _logoLogin.default,
|
|
20
21
|
alt: "logo"
|
|
@@ -15,7 +15,7 @@ var _variables = require("../../../global-files/variables");
|
|
|
15
15
|
|
|
16
16
|
var _templateObject, _templateObject2, _templateObject3;
|
|
17
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);
|
|
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 & + *{\n margin-top: 20px;\n }\n"])), _variables.FontFamily.Raleway_700);
|
|
19
19
|
|
|
20
20
|
exports.Container = Container;
|
|
21
21
|
|
|
@@ -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.LogoLoadingDefault = 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/LogoLoading",
|
|
18
|
+
component: _index.LogoLoading
|
|
19
|
+
};
|
|
20
|
+
exports.default = _default;
|
|
21
|
+
|
|
22
|
+
var Template = function Template(args) {
|
|
23
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsx)(_index.LogoLoading, (0, _objectSpread2.default)({}, args));
|
|
24
|
+
};
|
|
25
|
+
|
|
26
|
+
var LogoLoadingDefault = Template.bind({});
|
|
27
|
+
exports.LogoLoadingDefault = LogoLoadingDefault;
|
|
28
|
+
LogoLoadingDefault.args = {};
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.LogoLoading = void 0;
|
|
7
|
+
|
|
8
|
+
var _styles = require("./styles");
|
|
9
|
+
|
|
10
|
+
var _Loading = require("../../atoms/Loading");
|
|
11
|
+
|
|
12
|
+
var _LogoImage = require("../../atoms/LogoImage");
|
|
13
|
+
|
|
14
|
+
var _jsxRuntime = require("react/jsx-runtime");
|
|
15
|
+
|
|
16
|
+
var LogoLoading = function LogoLoading() {
|
|
17
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsxs)(_styles.Container, {
|
|
18
|
+
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_LogoImage.LogoImage, {}), /*#__PURE__*/(0, _jsxRuntime.jsx)(_Loading.Loading, {})]
|
|
19
|
+
});
|
|
20
|
+
};
|
|
21
|
+
|
|
22
|
+
exports.LogoLoading = LogoLoading;
|
|
@@ -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 height: 100vh;\n width: 50%;\n padding-top: 25%;\n .logo {\n text-align: center;\n img {\n width: 65%;\n }\n }\n .loading {\n height: 10%;\n }\n"])));
|
|
17
|
+
|
|
18
|
+
exports.Container = Container;
|
|
@@ -103,7 +103,7 @@ var SignInLogin = function SignInLogin(props) {
|
|
|
103
103
|
}
|
|
104
104
|
|
|
105
105
|
if (!valid) {
|
|
106
|
-
_context.next =
|
|
106
|
+
_context.next = 36;
|
|
107
107
|
break;
|
|
108
108
|
}
|
|
109
109
|
|
|
@@ -122,7 +122,7 @@ var SignInLogin = function SignInLogin(props) {
|
|
|
122
122
|
|
|
123
123
|
props.setUser(session);
|
|
124
124
|
props.setPaso(8);
|
|
125
|
-
_context.next =
|
|
125
|
+
_context.next = 28;
|
|
126
126
|
break;
|
|
127
127
|
|
|
128
128
|
case 20:
|
|
@@ -136,6 +136,8 @@ var SignInLogin = function SignInLogin(props) {
|
|
|
136
136
|
|
|
137
137
|
case 23:
|
|
138
138
|
response = _context.sent;
|
|
139
|
+
console.log(userGroup);
|
|
140
|
+
console.log(userGroup[0]);
|
|
139
141
|
userGroupValue = typeof userGroup === "string" ? userGroup : userGroup[0];
|
|
140
142
|
|
|
141
143
|
if (userGroupValue === "usuario_contentoh") {
|
|
@@ -157,12 +159,12 @@ var SignInLogin = function SignInLogin(props) {
|
|
|
157
159
|
setLoading(false);
|
|
158
160
|
}
|
|
159
161
|
|
|
160
|
-
case
|
|
161
|
-
_context.next =
|
|
162
|
+
case 28:
|
|
163
|
+
_context.next = 36;
|
|
162
164
|
break;
|
|
163
165
|
|
|
164
|
-
case
|
|
165
|
-
_context.prev =
|
|
166
|
+
case 30:
|
|
167
|
+
_context.prev = 30;
|
|
166
168
|
_context.t0 = _context["catch"](10);
|
|
167
169
|
console.log(_context.t0);
|
|
168
170
|
setLoading(false);
|
|
@@ -179,12 +181,12 @@ var SignInLogin = function SignInLogin(props) {
|
|
|
179
181
|
console.log("error 2");
|
|
180
182
|
}
|
|
181
183
|
|
|
182
|
-
case
|
|
184
|
+
case 36:
|
|
183
185
|
case "end":
|
|
184
186
|
return _context.stop();
|
|
185
187
|
}
|
|
186
188
|
}
|
|
187
|
-
}, _callee, null, [[10,
|
|
189
|
+
}, _callee, null, [[10, 30]]);
|
|
188
190
|
}));
|
|
189
191
|
|
|
190
192
|
return function validate(_x) {
|
|
@@ -258,7 +260,7 @@ var SignInLogin = function SignInLogin(props) {
|
|
|
258
260
|
return validate(e);
|
|
259
261
|
}
|
|
260
262
|
})
|
|
261
|
-
}), /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
|
|
263
|
+
}), props.registration && /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
|
|
262
264
|
className: "new-login",
|
|
263
265
|
children: /*#__PURE__*/(0, _jsxRuntime.jsxs)("p", {
|
|
264
266
|
className: "pre-registro",
|
|
@@ -103,14 +103,14 @@ var SignInLoginCreationApp = function SignInLoginCreationApp(props) {
|
|
|
103
103
|
}
|
|
104
104
|
|
|
105
105
|
if (!valid) {
|
|
106
|
-
_context.next =
|
|
106
|
+
_context.next = 35;
|
|
107
107
|
break;
|
|
108
108
|
}
|
|
109
109
|
|
|
110
110
|
_context.prev = 10;
|
|
111
111
|
setLoading(true);
|
|
112
112
|
_context.next = 14;
|
|
113
|
-
return Auth.signIn(email, password);
|
|
113
|
+
return props.Auth.signIn(email, password);
|
|
114
114
|
|
|
115
115
|
case 14:
|
|
116
116
|
session = _context.sent;
|
|
@@ -122,7 +122,7 @@ var SignInLoginCreationApp = function SignInLoginCreationApp(props) {
|
|
|
122
122
|
|
|
123
123
|
props.setUser(session);
|
|
124
124
|
props.setPaso(8);
|
|
125
|
-
_context.next =
|
|
125
|
+
_context.next = 28;
|
|
126
126
|
break;
|
|
127
127
|
|
|
128
128
|
case 20:
|
|
@@ -136,14 +136,15 @@ var SignInLoginCreationApp = function SignInLoginCreationApp(props) {
|
|
|
136
136
|
|
|
137
137
|
case 23:
|
|
138
138
|
response = _context.sent;
|
|
139
|
+
console.log(userGroup);
|
|
140
|
+
console.log(userGroup[0]);
|
|
139
141
|
userGroupValue = typeof userGroup === "string" ? userGroup : userGroup[0];
|
|
140
142
|
|
|
141
143
|
if (userGroupValue === "colaboradores_contentoh") {
|
|
142
144
|
sessionStorage.setItem("auth", true);
|
|
143
145
|
sessionStorage.setItem("jwt", session.signInUserSession.idToken.jwtToken);
|
|
144
146
|
user = JSON.parse(response.data.body).data[0];
|
|
145
|
-
company = JSON.parse(response.data.body).data[1];
|
|
146
|
-
|
|
147
|
+
company = JSON.parse(response.data.body).data[1];
|
|
147
148
|
caches.keys().then(function (names) {
|
|
148
149
|
names.forEach(function (name) {
|
|
149
150
|
caches.delete(name);
|
|
@@ -158,12 +159,12 @@ var SignInLoginCreationApp = function SignInLoginCreationApp(props) {
|
|
|
158
159
|
setLoading(false);
|
|
159
160
|
}
|
|
160
161
|
|
|
161
|
-
case
|
|
162
|
-
_context.next =
|
|
162
|
+
case 28:
|
|
163
|
+
_context.next = 35;
|
|
163
164
|
break;
|
|
164
165
|
|
|
165
|
-
case
|
|
166
|
-
_context.prev =
|
|
166
|
+
case 30:
|
|
167
|
+
_context.prev = 30;
|
|
167
168
|
_context.t0 = _context["catch"](10);
|
|
168
169
|
console.log(_context.t0);
|
|
169
170
|
setLoading(false);
|
|
@@ -177,12 +178,12 @@ var SignInLoginCreationApp = function SignInLoginCreationApp(props) {
|
|
|
177
178
|
setSignInError("Error");
|
|
178
179
|
}
|
|
179
180
|
|
|
180
|
-
case
|
|
181
|
+
case 35:
|
|
181
182
|
case "end":
|
|
182
183
|
return _context.stop();
|
|
183
184
|
}
|
|
184
185
|
}
|
|
185
|
-
}, _callee, null, [[10,
|
|
186
|
+
}, _callee, null, [[10, 30]]);
|
|
186
187
|
}));
|
|
187
188
|
|
|
188
189
|
return function validate(_x) {
|
|
@@ -13,6 +13,6 @@ var _styledComponents = _interopRequireDefault(require("styled-components"));
|
|
|
13
13
|
|
|
14
14
|
var _templateObject;
|
|
15
15
|
|
|
16
|
-
var Container = _styledComponents.default.div(_templateObject || (_templateObject = (0, _taggedTemplateLiteral2.default)(["\n
|
|
16
|
+
var Container = _styledComponents.default.div(_templateObject || (_templateObject = (0, _taggedTemplateLiteral2.default)(["\n width: 50%;\n height: 100vh;\n .button-center {\n display: flex;\n justify-content: center;\n .general-default-button {\n width: 160px;\n }\n }\n"])));
|
|
17
17
|
|
|
18
18
|
exports.Container = Container;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "contentoh-components-library",
|
|
3
|
-
"version": "21.0.
|
|
3
|
+
"version": "21.0.55",
|
|
4
4
|
"dependencies": {
|
|
5
5
|
"@aws-amplify/auth": "^4.5.3",
|
|
6
6
|
"@aws-amplify/datastore": "^3.11.0",
|
|
@@ -77,7 +77,7 @@
|
|
|
77
77
|
"auto": "^10.36.5",
|
|
78
78
|
"babel-loader": "^8.2.3",
|
|
79
79
|
"chromatic": "^6.3.3",
|
|
80
|
-
"contentoh-components-library": "^21.0.
|
|
80
|
+
"contentoh-components-library": "^21.0.52",
|
|
81
81
|
"cross-env": "^7.0.3",
|
|
82
82
|
"storybook-css-modules-preset": "^1.1.1"
|
|
83
83
|
},
|
|
@@ -1,15 +1,13 @@
|
|
|
1
|
-
import { Container } from "./styles";
|
|
2
|
-
import { LogoImage } from "../LogoImage";
|
|
1
|
+
import { Container,Loader } from "./styles";
|
|
3
2
|
|
|
4
3
|
export const Loading = () => {
|
|
5
4
|
return (
|
|
6
|
-
<Container >
|
|
7
|
-
<
|
|
8
|
-
<div className="loader">
|
|
5
|
+
<Container className="loading">
|
|
6
|
+
<Loader>
|
|
9
7
|
<span className="first"></span>
|
|
10
8
|
<span className="second"></span>
|
|
11
9
|
<span className="third"></span>
|
|
12
|
-
</
|
|
10
|
+
</Loader>
|
|
13
11
|
</Container>
|
|
14
12
|
);
|
|
15
13
|
};
|
|
@@ -1,66 +1,57 @@
|
|
|
1
1
|
import styled from "styled-components";
|
|
2
2
|
|
|
3
3
|
export const Container = styled.div`
|
|
4
|
+
display: flex;
|
|
4
5
|
justify-content: center;
|
|
5
6
|
align-items: center;
|
|
6
|
-
height:
|
|
7
|
-
width:
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
7
|
+
height: 100%;
|
|
8
|
+
width: 100%;
|
|
9
|
+
`;
|
|
10
|
+
export const Loader = styled.div`
|
|
11
|
+
display: flex;
|
|
12
|
+
justify-content: center;
|
|
13
|
+
align-items: center;
|
|
14
|
+
height: 100%;
|
|
15
|
+
width: 100%;
|
|
16
|
+
span {
|
|
17
|
+
display: inline-block;
|
|
18
|
+
border-radius: 100%;
|
|
19
|
+
margin: 35px 5px;
|
|
20
|
+
opacity: 1;
|
|
14
21
|
}
|
|
15
|
-
.
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
}
|
|
33
|
-
.second {
|
|
34
|
-
background-color: #e33aa9;
|
|
35
|
-
}
|
|
36
|
-
.third {
|
|
37
|
-
background-color: #b12d84;
|
|
38
|
-
}
|
|
39
|
-
span:nth-child(1) {
|
|
40
|
-
width: 16px;
|
|
41
|
-
height: 16px;
|
|
42
|
-
animation: opacitychange 1s ease-in-out infinite;
|
|
43
|
-
}
|
|
44
|
-
span:nth-child(2) {
|
|
45
|
-
width: 18px;
|
|
46
|
-
height: 18px;
|
|
22
|
+
.first {
|
|
23
|
+
background-color: #ff75cf;
|
|
24
|
+
}
|
|
25
|
+
.second {
|
|
26
|
+
background-color: #e33aa9;
|
|
27
|
+
}
|
|
28
|
+
.third {
|
|
29
|
+
background-color: #b12d84;
|
|
30
|
+
}
|
|
31
|
+
span:nth-child(1) {
|
|
32
|
+
width: 16px;
|
|
33
|
+
height: 16px;
|
|
34
|
+
animation: opacitychange 1s ease-in-out infinite;
|
|
35
|
+
}
|
|
36
|
+
span:nth-child(2) {
|
|
37
|
+
width: 18px;
|
|
38
|
+
height: 18px;
|
|
47
39
|
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
40
|
+
animation: opacitychange 1s ease-in-out 0.33s infinite;
|
|
41
|
+
}
|
|
42
|
+
span:nth-child(3) {
|
|
43
|
+
width: 20px;
|
|
44
|
+
height: 20px;
|
|
53
45
|
|
|
54
|
-
|
|
46
|
+
animation: opacitychange 1s ease-in-out 0.66s infinite;
|
|
47
|
+
}
|
|
48
|
+
@keyframes opacitychange {
|
|
49
|
+
0%,
|
|
50
|
+
100% {
|
|
51
|
+
opacity: 0;
|
|
55
52
|
}
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
100% {
|
|
59
|
-
opacity: 0;
|
|
60
|
-
}
|
|
61
|
-
60% {
|
|
62
|
-
opacity: 1;
|
|
63
|
-
}
|
|
53
|
+
60% {
|
|
54
|
+
opacity: 1;
|
|
64
55
|
}
|
|
65
56
|
}
|
|
66
57
|
`;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { LogoLoading } from "./index";
|
|
2
|
+
|
|
3
|
+
export default {
|
|
4
|
+
title: "Components/molecules/LogoLoading",
|
|
5
|
+
component: LogoLoading,
|
|
6
|
+
};
|
|
7
|
+
const Template = (args) => <LogoLoading {...args} />;
|
|
8
|
+
export const LogoLoadingDefault = Template.bind({});
|
|
9
|
+
|
|
10
|
+
LogoLoadingDefault.args = {};
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { Container } from "./styles";
|
|
2
|
+
import { Loading } from "../../atoms/Loading";
|
|
3
|
+
import { LogoImage } from "../../atoms/LogoImage";
|
|
4
|
+
|
|
5
|
+
export const LogoLoading = () => {
|
|
6
|
+
return (
|
|
7
|
+
<Container>
|
|
8
|
+
<LogoImage/>
|
|
9
|
+
<Loading/>
|
|
10
|
+
</Container>
|
|
11
|
+
);
|
|
12
|
+
};
|
|
@@ -60,6 +60,8 @@ export const SignInLogin = (props) => {
|
|
|
60
60
|
},
|
|
61
61
|
}
|
|
62
62
|
);
|
|
63
|
+
console.log(userGroup);
|
|
64
|
+
console.log(userGroup[0]);
|
|
63
65
|
const userGroupValue =
|
|
64
66
|
typeof userGroup === "string" ? userGroup : userGroup[0];
|
|
65
67
|
if (userGroupValue === "usuario_contentoh") {
|
|
@@ -175,32 +177,34 @@ export const SignInLogin = (props) => {
|
|
|
175
177
|
onClick={(e) => validate(e)}
|
|
176
178
|
/>
|
|
177
179
|
</div>
|
|
178
|
-
|
|
179
|
-
<
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
180
|
+
{props.registration && (
|
|
181
|
+
<div className="new-login">
|
|
182
|
+
<p
|
|
183
|
+
className="pre-registro"
|
|
184
|
+
onClick={() => {
|
|
185
|
+
props.setPaso(1);
|
|
186
|
+
sessionStorage.setItem(
|
|
187
|
+
"nuevoRegistro",
|
|
188
|
+
JSON.stringify({
|
|
189
|
+
name: "",
|
|
190
|
+
lastName: "",
|
|
191
|
+
email: "",
|
|
192
|
+
position: "",
|
|
193
|
+
country: "",
|
|
194
|
+
phone: "",
|
|
195
|
+
commercialName: "",
|
|
196
|
+
companyName: "",
|
|
197
|
+
rfc: "",
|
|
198
|
+
adress: "",
|
|
199
|
+
})
|
|
200
|
+
);
|
|
201
|
+
sessionStorage.setItem("countryCode", JSON.stringify("+52"));
|
|
202
|
+
}}
|
|
203
|
+
>
|
|
204
|
+
¿Aún no tienes cuenta?<span> Regístrate</span>
|
|
205
|
+
</p>
|
|
206
|
+
</div>
|
|
207
|
+
)}
|
|
204
208
|
</div>
|
|
205
209
|
</Container>
|
|
206
210
|
{upgradePlanRedirect && <Redirect to={{ pathname: "/dashboard" }} />}
|
|
@@ -18,6 +18,7 @@ export const SignInLoginCreationApp = (props) => {
|
|
|
18
18
|
const [signInError, setSignInError] = useState("");
|
|
19
19
|
const [loading, setLoading] = useState(false);
|
|
20
20
|
const [upgradePlanRedirect, setUpgradePlanRedirect] = useState(false);
|
|
21
|
+
|
|
21
22
|
const validate = async (e) => {
|
|
22
23
|
e.preventDefault();
|
|
23
24
|
setSignInError("");
|
|
@@ -45,7 +46,7 @@ export const SignInLoginCreationApp = (props) => {
|
|
|
45
46
|
if (valid) {
|
|
46
47
|
try {
|
|
47
48
|
setLoading(true);
|
|
48
|
-
const session = await Auth.signIn(email, password);
|
|
49
|
+
const session = await props.Auth.signIn(email, password);
|
|
49
50
|
if (session.challengeName === "NEW_PASSWORD_REQUIRED") {
|
|
50
51
|
props.setUser(session);
|
|
51
52
|
props.setPaso(8);
|
|
@@ -60,7 +61,8 @@ export const SignInLoginCreationApp = (props) => {
|
|
|
60
61
|
},
|
|
61
62
|
}
|
|
62
63
|
);
|
|
63
|
-
|
|
64
|
+
console.log(userGroup);
|
|
65
|
+
console.log(userGroup[0]);
|
|
64
66
|
const userGroupValue =
|
|
65
67
|
typeof userGroup === "string" ? userGroup : userGroup[0];
|
|
66
68
|
if (userGroupValue === "colaboradores_contentoh") {
|
|
@@ -71,7 +73,7 @@ export const SignInLoginCreationApp = (props) => {
|
|
|
71
73
|
);
|
|
72
74
|
const user = JSON.parse(response.data.body).data[0];
|
|
73
75
|
const company = JSON.parse(response.data.body).data[1];
|
|
74
|
-
|
|
76
|
+
|
|
75
77
|
caches.keys().then((names) => {
|
|
76
78
|
names.forEach((name) => {
|
|
77
79
|
caches.delete(name);
|
|
@@ -1,13 +1,11 @@
|
|
|
1
1
|
import styled from "styled-components";
|
|
2
2
|
|
|
3
3
|
export const Container = styled.div`
|
|
4
|
-
display: flex;
|
|
5
4
|
width: 50%;
|
|
6
5
|
height: 100vh;
|
|
7
6
|
.button-center {
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
left: 18%;
|
|
7
|
+
display: flex;
|
|
8
|
+
justify-content: center;
|
|
11
9
|
.general-default-button {
|
|
12
10
|
width: 160px;
|
|
13
11
|
}
|