contentoh-components-library 21.0.52 → 21.0.56

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 (27) hide show
  1. package/dist/components/atoms/Loading/index.js +4 -6
  2. package/dist/components/atoms/Loading/styles.js +8 -4
  3. package/dist/components/atoms/LogoImage/index.js +1 -0
  4. package/dist/components/molecules/LoginPasswordStrength/styles.js +1 -1
  5. package/dist/components/molecules/LogoLoading/Loading.stories.js +28 -0
  6. package/dist/components/molecules/LogoLoading/index.js +22 -0
  7. package/dist/components/molecules/LogoLoading/styles.js +18 -0
  8. package/dist/components/molecules/SignInLogin/index.js +13 -14
  9. package/dist/components/molecules/SignInLogin/styles.js +1 -1
  10. package/dist/components/molecules/SignInLoginCreationApp/index.js +12 -11
  11. package/dist/components/organisms/ChangePassword/styles.js +1 -1
  12. package/dist/index.js +70 -57
  13. package/package.json +2 -2
  14. package/src/components/atoms/Loading/index.js +4 -6
  15. package/src/components/atoms/Loading/styles.js +45 -54
  16. package/src/components/atoms/LogoImage/index.js +1 -1
  17. package/src/components/molecules/LoginPasswordStrength/styles.js +3 -0
  18. package/src/components/molecules/LogoLoading/Loading.stories.js +10 -0
  19. package/src/components/molecules/LogoLoading/index.js +12 -0
  20. package/src/components/molecules/LogoLoading/styles.js +16 -0
  21. package/src/components/molecules/SignInLogin/index.js +31 -31
  22. package/src/components/molecules/SignInLogin/styles.js +1 -1
  23. package/src/components/organisms/ChangePassword/styles.js +2 -4
  24. package/src/index.js +3 -2
  25. package/src/components/molecules/SignInLoginCreationApp/SignInLogin.stories.js +0 -11
  26. package/src/components/molecules/SignInLoginCreationApp/index.js +0 -180
  27. package/src/components/molecules/SignInLoginCreationApp/styles.js +0 -79
@@ -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.jsxs)(_styles.Container, {
16
- children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_LogoImage.LogoImage, {}), /*#__PURE__*/(0, _jsxRuntime.jsxs)("div", {
17
- className: "loader",
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 justify-content: center;\n align-items: center;\n height: 100vh;\n width: 50%;\n position: relative;\n img {\n width: 75% !important;\n position: absolute;\n bottom: 55%;\n left: 10%;\n }\n .loader {\n display: flex;\n justify-content: center;\n align-items: center;\n height: 10%;\n width: 50%;\n position: absolute;\n bottom: 45%;\n left:25%;\n span {\n display: inline-block;\n border-radius: 100%;\n margin-left: 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 }\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;
@@ -29,7 +29,7 @@ var _variables = require("../../../global-files/variables");
29
29
 
30
30
  var _react = require("react");
31
31
 
32
- var _Loading = require("../../atoms/Loading");
32
+ var _LogoLoading = require("../LogoLoading");
33
33
 
34
34
  var _reactRouterDom = require("react-router-dom");
35
35
 
@@ -75,7 +75,7 @@ var SignInLogin = function SignInLogin(props) {
75
75
 
76
76
  var validate = /*#__PURE__*/function () {
77
77
  var _ref = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee(e) {
78
- var valid, email, password, session, userGroup, response, userGroupValue, user, company;
78
+ var valid, email, password, session, userGroup, response, user, company;
79
79
  return _regenerator.default.wrap(function _callee$(_context) {
80
80
  while (1) {
81
81
  switch (_context.prev = _context.next) {
@@ -103,7 +103,7 @@ var SignInLogin = function SignInLogin(props) {
103
103
  }
104
104
 
105
105
  if (!valid) {
106
- _context.next = 34;
106
+ _context.next = 33;
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 = 26;
125
+ _context.next = 25;
126
126
  break;
127
127
 
128
128
  case 20:
@@ -136,9 +136,8 @@ var SignInLogin = function SignInLogin(props) {
136
136
 
137
137
  case 23:
138
138
  response = _context.sent;
139
- userGroupValue = typeof userGroup === "string" ? userGroup : userGroup[0];
140
139
 
141
- if (userGroupValue === "usuario_contentoh") {
140
+ if (userGroup[0] === props.users) {
142
141
  sessionStorage.setItem("auth", true);
143
142
  sessionStorage.setItem("jwt", session.signInUserSession.idToken.jwtToken);
144
143
  user = JSON.parse(response.data.body).data[0];
@@ -157,12 +156,12 @@ var SignInLogin = function SignInLogin(props) {
157
156
  setLoading(false);
158
157
  }
159
158
 
160
- case 26:
161
- _context.next = 34;
159
+ case 25:
160
+ _context.next = 33;
162
161
  break;
163
162
 
164
- case 28:
165
- _context.prev = 28;
163
+ case 27:
164
+ _context.prev = 27;
166
165
  _context.t0 = _context["catch"](10);
167
166
  console.log(_context.t0);
168
167
  setLoading(false);
@@ -179,12 +178,12 @@ var SignInLogin = function SignInLogin(props) {
179
178
  console.log("error 2");
180
179
  }
181
180
 
182
- case 34:
181
+ case 33:
183
182
  case "end":
184
183
  return _context.stop();
185
184
  }
186
185
  }
187
- }, _callee, null, [[10, 28]]);
186
+ }, _callee, null, [[10, 27]]);
188
187
  }));
189
188
 
190
189
  return function validate(_x) {
@@ -198,7 +197,7 @@ var SignInLogin = function SignInLogin(props) {
198
197
  (0, _react.useEffect)(function () {
199
198
  if (upgradePlanRedirect) setLoading(false);
200
199
  }, [upgradePlanRedirect]);
201
- return loading ? /*#__PURE__*/(0, _jsxRuntime.jsx)(_Loading.Loading, {}) : /*#__PURE__*/(0, _jsxRuntime.jsxs)(_jsxRuntime.Fragment, {
200
+ return loading ? /*#__PURE__*/(0, _jsxRuntime.jsx)(_LogoLoading.LogoLoading, {}) : /*#__PURE__*/(0, _jsxRuntime.jsxs)(_jsxRuntime.Fragment, {
202
201
  children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_styles.Container, {
203
202
  className: "home-login",
204
203
  children: /*#__PURE__*/(0, _jsxRuntime.jsxs)("div", {
@@ -258,7 +257,7 @@ var SignInLogin = function SignInLogin(props) {
258
257
  return validate(e);
259
258
  }
260
259
  })
261
- }), /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
260
+ }), props.registration && /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
262
261
  className: "new-login",
263
262
  children: /*#__PURE__*/(0, _jsxRuntime.jsxs)("p", {
264
263
  className: "pre-registro",
@@ -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 background: \"white\";\n display: flex;\n height: 100%;\n width: 50%;\n justify-content: center;\n align-items: center;\n label {\n color: red;\n margin-top: 3px;\n margin-left: 15px;\n font-family: ", ";\n font-size: 11px;\n & + * {\n margin-top: 12px;\n }\n }\n\n &.home-login {\n .credenciales {\n & + * {\n margin-top: 30px;\n }\n }\n .user {\n & + * {\n margin-top: 20px;\n }\n }\n .password {\n & + * {\n margin-top: 20px;\n }\n }\n .select {\n display: flex;\n justify-content: space-between;\n .active-right {\n font-family: ", ";\n font-weight: 500;\n font-size: 13px;\n line-height: 24px;\n letter-spacing: -0.015em;\n color: ", ";\n cursor: pointer;\n }\n & + * {\n margin-top: 50px;\n }\n }\n .button-right {\n text-align: right;\n & + * {\n margin-top: 55px;\n }\n }\n .new-login {\n p {\n font-family: ", ";\n text-align: right;\n font-weight: 500;\n font-size: 13px;\n line-height: 24px;\n color: ", ";\n cursor: pointer;\n span {\n color: ", ";\n }\n }\n }\n }\n .main-container {\n max-width: 80%;\n max-height: 80%;\n }\n"])), _variables.FontFamily.Raleway_700, _variables.FontFamily.AvenirNext, _variables.GlobalColors.s5, _variables.FontFamily.AvenirNext, _variables.GlobalColors.s5, _variables.GlobalColors.secondary_magenta);
18
+ var Container = _styledComponents.default.div(_templateObject || (_templateObject = (0, _taggedTemplateLiteral2.default)(["\n background: \"white\";\n display: flex;\n height: 100vh;\n width: 50%;\n justify-content: center;\n align-items: center;\n label {\n color: red;\n margin-top: 3px;\n margin-left: 15px;\n font-family: ", ";\n font-size: 11px;\n & + * {\n margin-top: 12px;\n }\n }\n\n &.home-login {\n .credenciales {\n & + * {\n margin-top: 30px;\n }\n }\n .user {\n & + * {\n margin-top: 20px;\n }\n }\n .password {\n & + * {\n margin-top: 20px;\n }\n }\n .select {\n display: flex;\n justify-content: space-between;\n .active-right {\n font-family: ", ";\n font-weight: 500;\n font-size: 13px;\n line-height: 24px;\n letter-spacing: -0.015em;\n color: ", ";\n cursor: pointer;\n }\n & + * {\n margin-top: 50px;\n }\n }\n .button-right {\n text-align: right;\n & + * {\n margin-top: 55px;\n }\n }\n .new-login {\n p {\n font-family: ", ";\n text-align: right;\n font-weight: 500;\n font-size: 13px;\n line-height: 24px;\n color: ", ";\n cursor: pointer;\n span {\n color: ", ";\n }\n }\n }\n }\n .main-container {\n max-width: 80%;\n max-height: 80%;\n }\n"])), _variables.FontFamily.Raleway_700, _variables.FontFamily.AvenirNext, _variables.GlobalColors.s5, _variables.FontFamily.AvenirNext, _variables.GlobalColors.s5, _variables.GlobalColors.secondary_magenta);
19
19
 
20
20
  exports.Container = Container;
@@ -103,14 +103,14 @@ var SignInLoginCreationApp = function SignInLoginCreationApp(props) {
103
103
  }
104
104
 
105
105
  if (!valid) {
106
- _context.next = 33;
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 = 26;
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]; // const picture = getProfilePicture(user.id_user, 83, 83);
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 26:
162
- _context.next = 33;
162
+ case 28:
163
+ _context.next = 35;
163
164
  break;
164
165
 
165
- case 28:
166
- _context.prev = 28;
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 33:
181
+ case 35:
181
182
  case "end":
182
183
  return _context.stop();
183
184
  }
184
185
  }
185
- }, _callee, null, [[10, 28]]);
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 display: flex;\n width: 50%;\n height: 100vh;\n .button-center {\n position: absolute;\n bottom: 13%;\n left: 67%;\n .general-default-button {\n width: 160px;\n }\n }\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;