contentoh-components-library 21.0.30 → 21.0.33
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
CHANGED
|
@@ -1,3 +1,7 @@
|
|
|
1
1
|
REACT_APP_ARTICLE_DATA_DATASHEET_ENDPOINT=https://zhx2nmgyce.execute-api.us-east-1.amazonaws.com/dev/articles-data/datasheets
|
|
2
2
|
REACT_APP_ARTICLE_DATA_DESCRIPTION_ENDPOINT=https://zhx2nmgyce.execute-api.us-east-1.amazonaws.com/dev/articles-data/descriptions
|
|
3
|
-
REACT_APP_ARTICLE_DATA_IMAGES_ENDPOINT=https://zhx2nmgyce.execute-api.us-east-1.amazonaws.com/dev/articles-data/images
|
|
3
|
+
REACT_APP_ARTICLE_DATA_IMAGES_ENDPOINT=https://zhx2nmgyce.execute-api.us-east-1.amazonaws.com/dev/articles-data/images
|
|
4
|
+
REACT_APP_USER_ENDPOINT=https://lqrc8jfjqi.execute-api.us-east-1.amazonaws.com/dev/users
|
|
5
|
+
REACT_APP_IMAGES_PROFILE_BUCKET=content-management-profile
|
|
6
|
+
REACT_APP_USER_POOL_ID=us-east-1_XMZQdqkGj
|
|
7
|
+
REACT_APP_USER_POOL_WEB_CLIENT_ID=5ac8tpgs6gbsq13frvrpieep40
|
package/.env.production
CHANGED
|
@@ -1,3 +1,7 @@
|
|
|
1
1
|
REACT_APP_ARTICLE_DATA_DATASHEET_ENDPOINT=https://6jqnpjf841.execute-api.us-east-1.amazonaws.com/prod/articles-data/datasheets
|
|
2
2
|
REACT_APP_ARTICLE_DATA_DESCRIPTION_ENDPOINT=https://6jqnpjf841.execute-api.us-east-1.amazonaws.com/prod/articles-data/descriptions
|
|
3
|
-
REACT_APP_ARTICLE_DATA_IMAGES_ENDPOINT=https://6jqnpjf841.execute-api.us-east-1.amazonaws.com/prod/articles-data/images
|
|
3
|
+
REACT_APP_ARTICLE_DATA_IMAGES_ENDPOINT=https://6jqnpjf841.execute-api.us-east-1.amazonaws.com/prod/articles-data/images
|
|
4
|
+
REACT_APP_IMAGES_PROFILE_BUCKET=content-management-profile-prod
|
|
5
|
+
REACT_APP_USER_ENDPOINT=https://6jqnpjf841.execute-api.us-east-1.amazonaws.com/prod/users
|
|
6
|
+
REACT_APP_USER_POOL_ID=us-east-1_XMZQdqkGj
|
|
7
|
+
REACT_APP_USER_POOL_WEB_CLIENT_ID=5ac8tpgs6gbsq13frvrpieep40
|
|
@@ -112,7 +112,7 @@ var SignInLogin = function SignInLogin(props) {
|
|
|
112
112
|
_context.prev = 10;
|
|
113
113
|
setLoading(true);
|
|
114
114
|
_context.next = 14;
|
|
115
|
-
return
|
|
115
|
+
return _awsAmplify.Auth.signIn(email, password);
|
|
116
116
|
|
|
117
117
|
case 14:
|
|
118
118
|
session = _context.sent;
|
|
@@ -281,7 +281,7 @@ var SignInLogin = function SignInLogin(props) {
|
|
|
281
281
|
})
|
|
282
282
|
})]
|
|
283
283
|
})
|
|
284
|
-
}), upgradePlanRedirect && /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactRouterDom.
|
|
284
|
+
}), upgradePlanRedirect && /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactRouterDom.Navigate, {
|
|
285
285
|
to: {
|
|
286
286
|
pathname: "/dashboard"
|
|
287
287
|
}
|
package/package.json
CHANGED
|
@@ -1,14 +1,17 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "contentoh-components-library",
|
|
3
|
-
"version": "21.0.
|
|
3
|
+
"version": "21.0.33",
|
|
4
4
|
"dependencies": {
|
|
5
|
-
"@aws-amplify/auth": "^4.5.
|
|
5
|
+
"@aws-amplify/auth": "^4.5.3",
|
|
6
|
+
"@aws-amplify/datastore": "^3.11.0",
|
|
7
|
+
"@aws-amplify/ui-react": "^2.17.0",
|
|
6
8
|
"@babel/runtime": "^7.17.2",
|
|
7
9
|
"@storybook/addon-postcss": "^2.0.0",
|
|
8
10
|
"@testing-library/jest-dom": "^5.11.4",
|
|
9
11
|
"@testing-library/react": "^11.1.0",
|
|
10
12
|
"@testing-library/user-event": "^12.1.10",
|
|
11
|
-
"aws-amplify": "^4.3.
|
|
13
|
+
"aws-amplify": "^4.3.21",
|
|
14
|
+
"aws-sdk": "^2.959.0",
|
|
12
15
|
"axios": "^0.25.0",
|
|
13
16
|
"babel-preset-react-app": "^10.0.1",
|
|
14
17
|
"chart.js": "^3.7.1",
|
|
@@ -7,8 +7,7 @@ import { TagAndInput } from "../TagAndInput";
|
|
|
7
7
|
import { FontFamily, GlobalColors } from "../../../global-files/variables";
|
|
8
8
|
import { useState, useEffect } from "react";
|
|
9
9
|
import { Loading } from "../../atoms/Loading";
|
|
10
|
-
import {
|
|
11
|
-
import { Auth } from "aws-amplify";
|
|
10
|
+
import { Navigate } from "react-router-dom";
|
|
12
11
|
import axios from "axios";
|
|
13
12
|
|
|
14
13
|
export const SignInLogin = (props) => {
|
|
@@ -46,7 +45,7 @@ export const SignInLogin = (props) => {
|
|
|
46
45
|
if (valid) {
|
|
47
46
|
try {
|
|
48
47
|
setLoading(true);
|
|
49
|
-
const session = await Auth.signIn(email, password);
|
|
48
|
+
const session = await props.Auth.signIn(email, password);
|
|
50
49
|
if (session.challengeName === "NEW_PASSWORD_REQUIRED") {
|
|
51
50
|
props.setUser(session);
|
|
52
51
|
props.setPaso(8);
|
|
@@ -92,6 +91,7 @@ export const SignInLogin = (props) => {
|
|
|
92
91
|
} catch (error) {
|
|
93
92
|
console.log(error);
|
|
94
93
|
setLoading(false);
|
|
94
|
+
console.log("error 1")
|
|
95
95
|
if (error.code === "NotAuthorizedException") {
|
|
96
96
|
setSignInError("NotAuthorizedException");
|
|
97
97
|
} else if (error.code === "UserNotConfirmedException") {
|
|
@@ -105,6 +105,7 @@ export const SignInLogin = (props) => {
|
|
|
105
105
|
props.setPaso(5);
|
|
106
106
|
} else {
|
|
107
107
|
setSignInError("Error");
|
|
108
|
+
console.log("error 2")
|
|
108
109
|
}
|
|
109
110
|
}
|
|
110
111
|
}
|
|
@@ -199,7 +200,7 @@ export const SignInLogin = (props) => {
|
|
|
199
200
|
</div>
|
|
200
201
|
</div>
|
|
201
202
|
</Container>
|
|
202
|
-
{upgradePlanRedirect && <
|
|
203
|
+
{upgradePlanRedirect && <Navigate to={{ pathname: "/dashboard" }} />}
|
|
203
204
|
</>
|
|
204
205
|
);
|
|
205
206
|
};
|
package/src/index.js
CHANGED
|
@@ -1,3 +1,19 @@
|
|
|
1
|
+
import ReactDOM from "react-dom";
|
|
2
|
+
import App from "./App.jsx";
|
|
3
|
+
import Amplify from "aws-amplify";
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
ReactDOM.render(<App />, document.getElementById("root"));
|
|
7
|
+
|
|
8
|
+
Amplify.configure({
|
|
9
|
+
Auth: {
|
|
10
|
+
region: "us-east-1",
|
|
11
|
+
userPoolId: process.env.REACT_APP_USER_POOL_ID,
|
|
12
|
+
userPoolWebClientId: process.env.REACT_APP_USER_POOL_WEB_CLIENT_ID,
|
|
13
|
+
mandatorySignIn: true,
|
|
14
|
+
},
|
|
15
|
+
});
|
|
16
|
+
|
|
1
17
|
//atoms
|
|
2
18
|
export * from "./components/atoms/ActivedFilter/index";
|
|
3
19
|
export * from "./components/atoms/AsignationOption/index";
|