@webiny/app-admin-cognito 0.0.0-mt-2 → 0.0.0-unstable.5e7233243f

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/index.d.ts CHANGED
@@ -1,10 +1,10 @@
1
1
  import React from "react";
2
2
  import { AuthOptions } from "@aws-amplify/auth/lib-esm/types";
3
3
  import ApolloClient from "apollo-client";
4
- export interface Props {
4
+ export interface AuthenticationProps {
5
5
  children: React.ReactNode;
6
6
  }
7
- export interface Config extends AuthOptions {
7
+ export interface AuthenticationFactoryConfig extends AuthOptions {
8
8
  onError?(error: Error): void;
9
9
  getIdentityData(params: {
10
10
  client: ApolloClient<any>;
@@ -15,4 +15,8 @@ export interface Config extends AuthOptions {
15
15
  [key: string]: any;
16
16
  }>;
17
17
  }
18
- export declare const createAuthentication: ({ getIdentityData, onError, ...config }: Config) => (props: Props) => JSX.Element;
18
+ interface AuthenticationFactory {
19
+ (params: AuthenticationFactoryConfig): React.FC<AuthenticationProps>;
20
+ }
21
+ export declare const createAuthentication: AuthenticationFactory;
22
+ export {};
package/index.js CHANGED
@@ -1,36 +1,69 @@
1
- import _objectWithoutProperties from "@babel/runtime/helpers/objectWithoutProperties";
2
- import _objectSpread from "@babel/runtime/helpers/objectSpread2";
3
- import _asyncToGenerator from "@babel/runtime/helpers/asyncToGenerator";
1
+ "use strict";
2
+
3
+ var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault").default;
4
+
5
+ var _interopRequireWildcard = require("@babel/runtime/helpers/interopRequireWildcard").default;
6
+
7
+ Object.defineProperty(exports, "__esModule", {
8
+ value: true
9
+ });
10
+ exports.createAuthentication = void 0;
11
+
12
+ var _slicedToArray2 = _interopRequireDefault(require("@babel/runtime/helpers/slicedToArray"));
13
+
14
+ var _objectWithoutProperties2 = _interopRequireDefault(require("@babel/runtime/helpers/objectWithoutProperties"));
15
+
16
+ var _regeneratorRuntime2 = _interopRequireDefault(require("@babel/runtime/helpers/regeneratorRuntime"));
17
+
18
+ var _objectSpread2 = _interopRequireDefault(require("@babel/runtime/helpers/objectSpread2"));
19
+
20
+ var _asyncToGenerator2 = _interopRequireDefault(require("@babel/runtime/helpers/asyncToGenerator"));
21
+
22
+ var _react = _interopRequireWildcard(require("react"));
23
+
24
+ var _auth = require("@aws-amplify/auth");
25
+
26
+ var _reactHooks = require("@apollo/react-hooks");
27
+
28
+ var _apolloLinkContext = require("apollo-link-context");
29
+
30
+ var _plugins = require("@webiny/plugins");
31
+
32
+ var _ApolloLinkPlugin = require("@webiny/app/plugins/ApolloLinkPlugin");
33
+
34
+ var _Authenticator = require("@webiny/app-cognito-authenticator/Authenticator");
35
+
36
+ var _SignIn = _interopRequireDefault(require("./views/SignIn"));
37
+
38
+ var _RequireNewPassword = _interopRequireDefault(require("./views/RequireNewPassword"));
39
+
40
+ var _ForgotPassword = _interopRequireDefault(require("./views/ForgotPassword"));
41
+
42
+ var _SetNewPassword = _interopRequireDefault(require("./views/SetNewPassword"));
43
+
44
+ var _SignedIn = _interopRequireDefault(require("./views/SignedIn"));
45
+
46
+ var _appSecurity = require("@webiny/app-security");
47
+
48
+ var _config = require("@webiny/app/config");
49
+
50
+ var _LoggingIn = _interopRequireDefault(require("./views/LoggingIn"));
51
+
4
52
  var _excluded = ["getIdentityData", "onError"],
5
53
  _excluded2 = ["id", "displayName", "type", "permissions"];
6
- import _regeneratorRuntime from "@babel/runtime/regenerator";
7
- import React, { useCallback, useEffect } from "react";
8
- import { Auth } from "@aws-amplify/auth";
9
- import { useApolloClient } from "@apollo/react-hooks";
10
- import { setContext } from "apollo-link-context";
11
- import { plugins } from "@webiny/plugins";
12
- import { ApolloLinkPlugin } from "@webiny/app/plugins/ApolloLinkPlugin";
13
- import { Authenticator } from "@webiny/app-cognito-authenticator/Authenticator";
14
- import CheckingUser from "./views/CheckingUser";
15
- import SignIn from "./views/SignIn";
16
- import RequireNewPassword from "./views/RequireNewPassword";
17
- import ForgotPassword from "./views/ForgotPassword";
18
- import SetNewPassword from "./views/SetNewPassword";
19
- import SignedIn from "./views/SignedIn";
20
- import { useSecurity } from "@webiny/app-security";
21
54
 
22
55
  var createApolloLinkPlugin = function createApolloLinkPlugin() {
23
- return new ApolloLinkPlugin(function () {
24
- return setContext( /*#__PURE__*/function () {
25
- var _ref2 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee(_, _ref) {
56
+ return new _ApolloLinkPlugin.ApolloLinkPlugin(function () {
57
+ return (0, _apolloLinkContext.setContext)( /*#__PURE__*/function () {
58
+ var _ref2 = (0, _asyncToGenerator2.default)( /*#__PURE__*/(0, _regeneratorRuntime2.default)().mark(function _callee(_, _ref) {
26
59
  var headers, user, idToken;
27
- return _regeneratorRuntime.wrap(function _callee$(_context) {
60
+ return (0, _regeneratorRuntime2.default)().wrap(function _callee$(_context) {
28
61
  while (1) {
29
62
  switch (_context.prev = _context.next) {
30
63
  case 0:
31
64
  headers = _ref.headers;
32
65
  _context.next = 3;
33
- return Auth.currentSession();
66
+ return _auth.Auth.currentSession();
34
67
 
35
68
  case 3:
36
69
  user = _context.sent;
@@ -57,7 +90,7 @@ var createApolloLinkPlugin = function createApolloLinkPlugin() {
57
90
 
58
91
  case 9:
59
92
  return _context.abrupt("return", {
60
- headers: _objectSpread(_objectSpread({}, headers), {}, {
93
+ headers: (0, _objectSpread2.default)((0, _objectSpread2.default)({}, headers), {}, {
61
94
  Authorization: "Bearer ".concat(idToken.getJwtToken())
62
95
  })
63
96
  });
@@ -78,64 +111,78 @@ var createApolloLinkPlugin = function createApolloLinkPlugin() {
78
111
  };
79
112
 
80
113
  var defaultOptions = {
81
- region: process.env.REACT_APP_USER_POOL_REGION,
82
- userPoolId: process.env.REACT_APP_USER_POOL_ID,
83
- userPoolWebClientId: process.env.REACT_APP_USER_POOL_WEB_CLIENT_ID
114
+ region: _config.config.getKey("USER_POOL_REGION", process.env.REACT_APP_USER_POOL_REGION),
115
+ userPoolId: _config.config.getKey("USER_POOL_ID", process.env.REACT_APP_USER_POOL_ID),
116
+ userPoolWebClientId: _config.config.getKey("USER_POOL_WEB_CLIENT_ID", process.env.REACT_APP_USER_POOL_WEB_CLIENT_ID)
84
117
  };
85
- export var createAuthentication = function createAuthentication(_ref3) {
118
+
119
+ var createAuthentication = function createAuthentication(_ref3) {
86
120
  var getIdentityData = _ref3.getIdentityData,
87
121
  onError = _ref3.onError,
88
- config = _objectWithoutProperties(_ref3, _excluded);
122
+ config = (0, _objectWithoutProperties2.default)(_ref3, _excluded);
89
123
 
124
+ /**
125
+ * TODO @ts-refactor
126
+ */
127
+ // @ts-ignore
90
128
  Object.keys(config).forEach(function (key) {
91
129
  return config[key] === undefined && delete config[key];
92
130
  });
93
- Auth.configure(_objectSpread(_objectSpread({}, defaultOptions), config));
131
+
132
+ _auth.Auth.configure((0, _objectSpread2.default)((0, _objectSpread2.default)({}, defaultOptions), config));
94
133
 
95
134
  var Authentication = function Authentication(props) {
96
135
  var children = props.children;
97
136
 
98
- var _useSecurity = useSecurity(),
137
+ var _useState = (0, _react.useState)(false),
138
+ _useState2 = (0, _slicedToArray2.default)(_useState, 2),
139
+ loadingIdentity = _useState2[0],
140
+ setLoadingIdentity = _useState2[1];
141
+
142
+ var _useSecurity = (0, _appSecurity.useSecurity)(),
99
143
  setIdentity = _useSecurity.setIdentity;
100
144
 
101
- var client = useApolloClient();
102
- var onToken = useCallback( /*#__PURE__*/function () {
103
- var _ref4 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee2(token) {
145
+ var client = (0, _reactHooks.useApolloClient)();
146
+ var onToken = (0, _react.useCallback)( /*#__PURE__*/function () {
147
+ var _ref4 = (0, _asyncToGenerator2.default)( /*#__PURE__*/(0, _regeneratorRuntime2.default)().mark(function _callee2(token) {
104
148
  var payload, logout, _yield$getIdentityDat, id, displayName, type, permissions, data;
105
149
 
106
- return _regeneratorRuntime.wrap(function _callee2$(_context2) {
150
+ return (0, _regeneratorRuntime2.default)().wrap(function _callee2$(_context2) {
107
151
  while (1) {
108
152
  switch (_context2.prev = _context2.next) {
109
153
  case 0:
110
154
  payload = token.payload, logout = token.logout;
111
- _context2.prev = 1;
112
- _context2.next = 4;
155
+ setLoadingIdentity(true);
156
+ _context2.prev = 2;
157
+ _context2.next = 5;
113
158
  return getIdentityData({
114
159
  client: client,
115
160
  payload: payload
116
161
  });
117
162
 
118
- case 4:
163
+ case 5:
119
164
  _yield$getIdentityDat = _context2.sent;
120
165
  id = _yield$getIdentityDat.id;
121
166
  displayName = _yield$getIdentityDat.displayName;
122
167
  type = _yield$getIdentityDat.type;
123
168
  permissions = _yield$getIdentityDat.permissions;
124
- data = _objectWithoutProperties(_yield$getIdentityDat, _excluded2);
125
- setIdentity(_objectSpread(_objectSpread({
169
+ data = (0, _objectWithoutProperties2.default)(_yield$getIdentityDat, _excluded2);
170
+ setIdentity((0, _objectSpread2.default)((0, _objectSpread2.default)({
126
171
  id: id,
127
172
  displayName: displayName,
128
173
  type: type,
129
174
  permissions: permissions
130
175
  }, data), {}, {
131
- logout: logout
176
+ logout: logout || function () {
177
+ return void 0;
178
+ }
132
179
  }));
133
- _context2.next = 17;
180
+ _context2.next = 18;
134
181
  break;
135
182
 
136
- case 13:
137
- _context2.prev = 13;
138
- _context2.t0 = _context2["catch"](1);
183
+ case 14:
184
+ _context2.prev = 14;
185
+ _context2.t0 = _context2["catch"](2);
139
186
  console.log("ERROR", _context2.t0);
140
187
 
141
188
  if (typeof onError === "function") {
@@ -144,25 +191,32 @@ export var createAuthentication = function createAuthentication(_ref3) {
144
191
  console.error(_context2.t0);
145
192
  }
146
193
 
147
- case 17:
194
+ case 18:
195
+ _context2.prev = 18;
196
+ setLoadingIdentity(false);
197
+ return _context2.finish(18);
198
+
199
+ case 21:
148
200
  case "end":
149
201
  return _context2.stop();
150
202
  }
151
203
  }
152
- }, _callee2, null, [[1, 13]]);
204
+ }, _callee2, null, [[2, 14, 18, 21]]);
153
205
  }));
154
206
 
155
207
  return function (_x3) {
156
208
  return _ref4.apply(this, arguments);
157
209
  };
158
210
  }(), []);
159
- useEffect(function () {
160
- plugins.register(createApolloLinkPlugin());
211
+ (0, _react.useEffect)(function () {
212
+ _plugins.plugins.register(createApolloLinkPlugin());
161
213
  }, []);
162
- return /*#__PURE__*/React.createElement(Authenticator, {
214
+ return /*#__PURE__*/_react.default.createElement(_Authenticator.Authenticator, {
163
215
  onToken: onToken
164
- }, /*#__PURE__*/React.createElement(CheckingUser, null), /*#__PURE__*/React.createElement(SignIn, null), /*#__PURE__*/React.createElement(RequireNewPassword, null), /*#__PURE__*/React.createElement(ForgotPassword, null), /*#__PURE__*/React.createElement(SetNewPassword, null), /*#__PURE__*/React.createElement(SignedIn, null, children));
216
+ }, loadingIdentity ? /*#__PURE__*/_react.default.createElement(_LoggingIn.default, null) : /*#__PURE__*/_react.default.createElement(_SignIn.default, null), /*#__PURE__*/_react.default.createElement(_RequireNewPassword.default, null), /*#__PURE__*/_react.default.createElement(_ForgotPassword.default, null), /*#__PURE__*/_react.default.createElement(_SetNewPassword.default, null), /*#__PURE__*/_react.default.createElement(_SignedIn.default, null, children));
165
217
  };
166
218
 
167
219
  return Authentication;
168
- };
220
+ };
221
+
222
+ exports.createAuthentication = createAuthentication;
package/index.js.map ADDED
@@ -0,0 +1 @@
1
+ {"version":3,"names":["createApolloLinkPlugin","ApolloLinkPlugin","setContext","_","headers","Auth","currentSession","user","idToken","getIdToken","Authorization","getJwtToken","defaultOptions","region","appConfig","getKey","process","env","REACT_APP_USER_POOL_REGION","userPoolId","REACT_APP_USER_POOL_ID","userPoolWebClientId","REACT_APP_USER_POOL_WEB_CLIENT_ID","createAuthentication","getIdentityData","onError","config","Object","keys","forEach","key","undefined","configure","Authentication","props","children","useState","loadingIdentity","setLoadingIdentity","useSecurity","setIdentity","client","useApolloClient","onToken","useCallback","token","payload","logout","id","displayName","type","permissions","data","console","log","error","useEffect","plugins","register"],"sources":["index.tsx"],"sourcesContent":["import React, { useCallback, useEffect, useState } from \"react\";\nimport { Auth } from \"@aws-amplify/auth\";\nimport { AuthOptions } from \"@aws-amplify/auth/lib-esm/types\";\nimport ApolloClient from \"apollo-client\";\nimport { useApolloClient } from \"@apollo/react-hooks\";\nimport { setContext } from \"apollo-link-context\";\nimport { plugins } from \"@webiny/plugins\";\nimport { ApolloLinkPlugin } from \"@webiny/app/plugins/ApolloLinkPlugin\";\nimport { CognitoIdToken } from \"@webiny/app-cognito-authenticator/types\";\nimport { Authenticator } from \"@webiny/app-cognito-authenticator/Authenticator\";\nimport SignIn from \"~/views/SignIn\";\nimport RequireNewPassword from \"~/views/RequireNewPassword\";\nimport ForgotPassword from \"~/views/ForgotPassword\";\nimport SetNewPassword from \"~/views/SetNewPassword\";\nimport SignedIn from \"~/views/SignedIn\";\nimport { useSecurity } from \"@webiny/app-security\";\nimport { config as appConfig } from \"@webiny/app/config\";\nimport LoggingIn from \"~/views/LoggingIn\";\n\nconst createApolloLinkPlugin = (): ApolloLinkPlugin => {\n return new ApolloLinkPlugin(() => {\n return setContext(async (_, { headers }) => {\n const user = await Auth.currentSession();\n const idToken = user.getIdToken();\n\n if (!idToken) {\n return { headers };\n }\n\n // If \"Authorization\" header is already set, don't overwrite it.\n if (headers && headers.Authorization) {\n return { headers };\n }\n\n return {\n headers: {\n ...headers,\n Authorization: `Bearer ${idToken.getJwtToken()}`\n }\n };\n });\n });\n};\n\nconst defaultOptions = {\n region: appConfig.getKey(\"USER_POOL_REGION\", process.env.REACT_APP_USER_POOL_REGION),\n userPoolId: appConfig.getKey(\"USER_POOL_ID\", process.env.REACT_APP_USER_POOL_ID),\n userPoolWebClientId: appConfig.getKey(\n \"USER_POOL_WEB_CLIENT_ID\",\n process.env.REACT_APP_USER_POOL_WEB_CLIENT_ID\n )\n};\n\nexport interface AuthenticationProps {\n children: React.ReactNode;\n}\n\nexport interface AuthenticationFactoryConfig extends AuthOptions {\n onError?(error: Error): void;\n getIdentityData(params: {\n client: ApolloClient<any>;\n payload: { [key: string]: any };\n }): Promise<{ [key: string]: any }>;\n}\n\ninterface AuthenticationFactory {\n (params: AuthenticationFactoryConfig): React.FC<AuthenticationProps>;\n}\nexport const createAuthentication: AuthenticationFactory = ({\n getIdentityData,\n onError,\n ...config\n}) => {\n /**\n * TODO @ts-refactor\n */\n // @ts-ignore\n Object.keys(config).forEach(key => config[key] === undefined && delete config[key]);\n Auth.configure({ ...defaultOptions, ...config });\n\n const Authentication: React.FC<AuthenticationProps> = props => {\n const { children } = props;\n const [loadingIdentity, setLoadingIdentity] = useState(false);\n const { setIdentity } = useSecurity();\n const client = useApolloClient();\n\n const onToken = useCallback(async (token: CognitoIdToken) => {\n const { payload, logout } = token;\n\n setLoadingIdentity(true);\n\n try {\n const { id, displayName, type, permissions, ...data } = await getIdentityData({\n client,\n payload\n });\n\n setIdentity({\n id,\n displayName,\n type,\n permissions,\n ...data,\n logout:\n logout ||\n (() => {\n return void 0;\n })\n });\n } catch (err) {\n console.log(\"ERROR\", err);\n if (typeof onError === \"function\") {\n onError(err);\n } else {\n console.error(err);\n }\n } finally {\n setLoadingIdentity(false);\n }\n }, []);\n\n useEffect(() => {\n plugins.register(createApolloLinkPlugin());\n }, []);\n\n return (\n <Authenticator onToken={onToken}>\n {loadingIdentity ? <LoggingIn /> : <SignIn />}\n <RequireNewPassword />\n <ForgotPassword />\n <SetNewPassword />\n <SignedIn>{children}</SignedIn>\n </Authenticator>\n );\n };\n\n return Authentication;\n};\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;AAAA;;AACA;;AAGA;;AACA;;AACA;;AACA;;AAEA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;;;;AAEA,IAAMA,sBAAsB,GAAG,SAAzBA,sBAAyB,GAAwB;EACnD,OAAO,IAAIC,kCAAJ,CAAqB,YAAM;IAC9B,OAAO,IAAAC,6BAAA;MAAA,mGAAW,iBAAOC,CAAP;QAAA;QAAA;UAAA;YAAA;cAAA;gBAAYC,OAAZ,QAAYA,OAAZ;gBAAA;gBAAA,OAC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4B,OAAO,CAACE,KAAR;gBACH;;cA7BmB;gBAAA;gBA+BpBjB,kBAAkB,CAAC,KAAD,CAAlB;gBA/BoB;;cAAA;cAAA;gBAAA;YAAA;UAAA;QAAA;MAAA,CAAZ;;MAAA;QAAA;MAAA;IAAA,KAiCb,EAjCa,CAAhB;IAmCA,IAAAkB,gBAAA,EAAU,YAAM;MACZC,gBAAA,CAAQC,QAAR,CAAiB1D,sBAAsB,EAAvC;IACH,CAFD,EAEG,EAFH;IAIA,oBACI,6BAAC,4BAAD;MAAe,OAAO,EAAE2C;IAAxB,GACKN,eAAe,gBAAG,6BAAC,kBAAD,OAAH,gBAAmB,6BAAC,eAAD,OADvC,eAEI,6BAAC,2BAAD,OAFJ,eAGI,6BAAC,uBAAD,OAHJ,eAII,6BAAC,uBAAD,OAJJ,eAKI,6BAAC,iBAAD,QAAWF,QAAX,CALJ,CADJ;EASH,CAtDD;;EAwDA,OAAOF,cAAP;AACH,CArEM"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@webiny/app-admin-cognito",
3
- "version": "0.0.0-mt-2",
3
+ "version": "0.0.0-unstable.5e7233243f",
4
4
  "main": "index.js",
5
5
  "repository": {
6
6
  "type": "git",
@@ -13,35 +13,36 @@
13
13
  "license": "MIT",
14
14
  "dependencies": {
15
15
  "@apollo/react-hooks": "3.1.5",
16
- "@aws-amplify/auth": "4.3.10",
17
- "@emotion/styled": "10.0.27",
18
- "@webiny/app": "0.0.0-mt-2",
19
- "@webiny/app-cognito-authenticator": "0.0.0-mt-2",
20
- "@webiny/app-security": "0.0.0-mt-2",
21
- "@webiny/form": "0.0.0-mt-2",
22
- "@webiny/plugins": "0.0.0-mt-2",
23
- "@webiny/ui": "0.0.0-mt-2",
24
- "@webiny/validation": "0.0.0-mt-2",
16
+ "@aws-amplify/auth": "4.6.1",
17
+ "@emotion/styled": "10.3.0",
18
+ "@webiny/app": "0.0.0-unstable.5e7233243f",
19
+ "@webiny/app-admin": "0.0.0-unstable.5e7233243f",
20
+ "@webiny/app-cognito-authenticator": "0.0.0-unstable.5e7233243f",
21
+ "@webiny/app-security": "0.0.0-unstable.5e7233243f",
22
+ "@webiny/form": "0.0.0-unstable.5e7233243f",
23
+ "@webiny/plugins": "0.0.0-unstable.5e7233243f",
24
+ "@webiny/ui": "0.0.0-unstable.5e7233243f",
25
+ "@webiny/validation": "0.0.0-unstable.5e7233243f",
25
26
  "apollo-client": "2.6.10",
26
27
  "apollo-link-context": "1.0.20",
27
28
  "emotion": "10.0.27",
28
- "react": "16.14.0",
29
- "react-dom": "16.14.0"
29
+ "react": "17.0.2",
30
+ "react-dom": "17.0.2"
30
31
  },
31
32
  "devDependencies": {
32
- "@babel/cli": "^7.5.5",
33
- "@babel/core": "^7.5.5",
34
- "@babel/plugin-proposal-class-properties": "^7.5.5",
35
- "@babel/plugin-proposal-throw-expressions": "^7.7.4",
36
- "@babel/preset-env": "^7.5.5",
37
- "@babel/preset-react": "^7.0.0",
38
- "@babel/preset-typescript": "^7.8.3",
39
- "@webiny/cli": "^0.0.0-mt-2",
40
- "@webiny/project-utils": "^0.0.0-mt-2",
33
+ "@babel/cli": "^7.16.0",
34
+ "@babel/core": "^7.16.0",
35
+ "@babel/plugin-proposal-class-properties": "^7.16.0",
36
+ "@babel/plugin-proposal-throw-expressions": "^7.16.0",
37
+ "@babel/preset-env": "^7.16.4",
38
+ "@babel/preset-react": "^7.16.0",
39
+ "@babel/preset-typescript": "^7.16.0",
40
+ "@webiny/cli": "^0.0.0-unstable.5e7233243f",
41
+ "@webiny/project-utils": "^0.0.0-unstable.5e7233243f",
41
42
  "babel-plugin-lodash": "^3.3.4",
42
43
  "rimraf": "^3.0.2",
43
44
  "ttypescript": "^1.5.12",
44
- "typescript": "^4.1.3"
45
+ "typescript": "4.7.4"
45
46
  },
46
47
  "publishConfig": {
47
48
  "access": "public",
@@ -58,5 +59,5 @@
58
59
  ]
59
60
  }
60
61
  },
61
- "gitHead": "3c0dcfb3c22c9f83107fdb97b25014cd03d9db7d"
62
+ "gitHead": "995a4b337db9b8497c6615e335dcd206afe26f8f"
62
63
  }
package/types.js CHANGED
@@ -0,0 +1 @@
1
+ "use strict";
package/types.js.map ADDED
@@ -0,0 +1 @@
1
+ {"version":3,"names":[],"sources":["types.ts"],"sourcesContent":[""],"mappings":""}
@@ -1,3 +1,3 @@
1
- /// <reference types="react" />
2
- declare const ForgotPassword: () => JSX.Element;
1
+ import * as React from "react";
2
+ declare const ForgotPassword: React.FC;
3
3
  export default ForgotPassword;
@@ -1,25 +1,48 @@
1
- import * as React from "react";
2
- import { Form } from "@webiny/form";
3
- import { validation } from "@webiny/validation";
4
- import { ButtonPrimary, ButtonDefault } from "@webiny/ui/Button";
5
- import { Input } from "@webiny/ui/Input";
6
- import { Grid, Cell } from "@webiny/ui/Grid";
7
- import { Typography } from "@webiny/ui/Typography";
8
- import { Alert } from "@webiny/ui/Alert";
9
- import { Elevation } from "@webiny/ui/Elevation";
10
- import StateContainer from "./StateContainer";
11
- import { alignRight, InnerContent, Title } from "./StyledComponents";
12
- import { CircularProgress } from "@webiny/ui/Progress";
13
- import { useAuthenticator } from "@webiny/app-cognito-authenticator/hooks/useAuthenticator";
14
- import { useForgotPassword } from "@webiny/app-cognito-authenticator/hooks/useForgotPassword";
1
+ "use strict";
2
+
3
+ var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault").default;
4
+
5
+ var _interopRequireWildcard = require("@babel/runtime/helpers/interopRequireWildcard").default;
6
+
7
+ Object.defineProperty(exports, "__esModule", {
8
+ value: true
9
+ });
10
+ exports.default = void 0;
11
+
12
+ var React = _interopRequireWildcard(require("react"));
13
+
14
+ var _form = require("@webiny/form");
15
+
16
+ var _validation = require("@webiny/validation");
17
+
18
+ var _Button = require("@webiny/ui/Button");
19
+
20
+ var _Input = require("@webiny/ui/Input");
21
+
22
+ var _Grid = require("@webiny/ui/Grid");
23
+
24
+ var _Typography = require("@webiny/ui/Typography");
25
+
26
+ var _Alert = require("@webiny/ui/Alert");
27
+
28
+ var _Elevation = require("@webiny/ui/Elevation");
29
+
30
+ var _StateContainer = _interopRequireDefault(require("./StateContainer"));
31
+
32
+ var _StyledComponents = require("./StyledComponents");
33
+
34
+ var _Progress = require("@webiny/ui/Progress");
35
+
36
+ var _useAuthenticator2 = require("@webiny/app-cognito-authenticator/hooks/useAuthenticator");
37
+
38
+ var _useForgotPassword2 = require("@webiny/app-cognito-authenticator/hooks/useForgotPassword");
15
39
 
16
40
  var ForgotPassword = function ForgotPassword() {
17
- var _useAuthenticator = useAuthenticator(),
18
- checkingUser = _useAuthenticator.checkingUser,
41
+ var _useAuthenticator = (0, _useAuthenticator2.useAuthenticator)(),
19
42
  authData = _useAuthenticator.authData,
20
43
  changeState = _useAuthenticator.changeState;
21
44
 
22
- var _useForgotPassword = useForgotPassword(),
45
+ var _useForgotPassword = (0, _useForgotPassword2.useForgotPassword)(),
23
46
  loading = _useForgotPassword.loading,
24
47
  codeSent = _useForgotPassword.codeSent,
25
48
  shouldRender = _useForgotPassword.shouldRender,
@@ -27,7 +50,7 @@ var ForgotPassword = function ForgotPassword() {
27
50
  requestCode = _useForgotPassword.requestCode,
28
51
  error = _useForgotPassword.error;
29
52
 
30
- if (!shouldRender || checkingUser) {
53
+ if (!shouldRender) {
31
54
  return null;
32
55
  }
33
56
 
@@ -35,7 +58,7 @@ var ForgotPassword = function ForgotPassword() {
35
58
  _ref$username = _ref.username,
36
59
  username = _ref$username === void 0 ? "" : _ref$username;
37
60
 
38
- return /*#__PURE__*/React.createElement(StateContainer, null, /*#__PURE__*/React.createElement(Form, {
61
+ return /*#__PURE__*/React.createElement(_StateContainer.default, null, /*#__PURE__*/React.createElement(_form.Form, {
39
62
  data: {
40
63
  username: username
41
64
  },
@@ -52,49 +75,54 @@ var ForgotPassword = function ForgotPassword() {
52
75
  var Bind = _ref3.Bind,
53
76
  submit = _ref3.submit,
54
77
  data = _ref3.data;
55
- return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(Elevation, {
78
+ return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(_Elevation.Elevation, {
56
79
  z: 2
57
- }, /*#__PURE__*/React.createElement(InnerContent, null, loading && /*#__PURE__*/React.createElement(CircularProgress, null), /*#__PURE__*/React.createElement(Title, null, /*#__PURE__*/React.createElement("h1", null, /*#__PURE__*/React.createElement(Typography, {
80
+ }, /*#__PURE__*/React.createElement(_StyledComponents.InnerContent, null, loading && /*#__PURE__*/React.createElement(_Progress.CircularProgress, null), /*#__PURE__*/React.createElement(_StyledComponents.Title, null, /*#__PURE__*/React.createElement("h1", null, /*#__PURE__*/React.createElement(_Typography.Typography, {
58
81
  use: "headline4"
59
- }, "Password Recovery")), /*#__PURE__*/React.createElement("p", null, /*#__PURE__*/React.createElement(Typography, {
82
+ }, "Password Recovery")), /*#__PURE__*/React.createElement("p", null, /*#__PURE__*/React.createElement(_Typography.Typography, {
60
83
  use: "subtitle2"
61
- }, "request a password reset code"))), error && /*#__PURE__*/React.createElement(Grid, null, /*#__PURE__*/React.createElement(Cell, {
84
+ }, "request a password reset code"))), error && /*#__PURE__*/React.createElement(_Grid.Grid, null, /*#__PURE__*/React.createElement(_Grid.Cell, {
62
85
  span: 12
63
- }, /*#__PURE__*/React.createElement(Alert, {
86
+ }, /*#__PURE__*/React.createElement(_Alert.Alert, {
64
87
  title: "Something went wrong",
65
88
  type: "danger"
66
- }, error))), !codeSent ? /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(Grid, null, /*#__PURE__*/React.createElement(Cell, {
89
+ }, error))), !codeSent ? /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(_Grid.Grid, null, /*#__PURE__*/React.createElement(_Grid.Cell, {
67
90
  span: 12
68
91
  }, /*#__PURE__*/React.createElement(Bind, {
69
92
  name: "username",
70
- validators: validation.create("required"),
93
+ validators: _validation.validation.create("required"),
71
94
  beforeChange: function beforeChange(val, cb) {
72
95
  return cb(val.toLowerCase());
73
96
  }
74
- }, /*#__PURE__*/React.createElement(Input, {
97
+ }, /*#__PURE__*/React.createElement(_Input.Input, {
75
98
  label: "Email",
76
99
  description: "A reset code will be sent to your email."
77
- })))), /*#__PURE__*/React.createElement(Grid, null, /*#__PURE__*/React.createElement(Cell, {
100
+ })))), /*#__PURE__*/React.createElement(_Grid.Grid, null, /*#__PURE__*/React.createElement(_Grid.Cell, {
78
101
  span: 12,
79
- className: alignRight
80
- }, /*#__PURE__*/React.createElement(ButtonPrimary, {
81
- onClick: submit
82
- }, "Send me the code")))) : /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(Grid, null, /*#__PURE__*/React.createElement(Cell, {
102
+ className: _StyledComponents.alignRight
103
+ }, /*#__PURE__*/React.createElement(_Button.ButtonPrimary, {
104
+ onClick: function onClick(ev) {
105
+ submit(ev);
106
+ },
107
+ "data-testid": "send-code"
108
+ }, "Send me the code")))) : /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(_Grid.Grid, null, /*#__PURE__*/React.createElement(_Grid.Cell, {
83
109
  span: 12
84
- }, /*#__PURE__*/React.createElement(Typography, {
110
+ }, /*#__PURE__*/React.createElement(_Typography.Typography, {
85
111
  use: "body1"
86
- }, "We have sent you a code to reset your password!", /*#__PURE__*/React.createElement("br", null), /*#__PURE__*/React.createElement("br", null), "Click the \"Resend code\" button below to resend the code in case you haven't received it the first time."))), /*#__PURE__*/React.createElement(Grid, null, /*#__PURE__*/React.createElement(Cell, {
112
+ }, "We have sent you a code to reset your password!", /*#__PURE__*/React.createElement("br", null), /*#__PURE__*/React.createElement("br", null), "Click the \"Resend code\" button below to resend the code in case you haven't received it the first time."))), /*#__PURE__*/React.createElement(_Grid.Grid, null, /*#__PURE__*/React.createElement(_Grid.Cell, {
87
113
  span: 12,
88
- className: alignRight
89
- }, /*#__PURE__*/React.createElement(ButtonDefault, {
114
+ className: _StyledComponents.alignRight
115
+ }, /*#__PURE__*/React.createElement(_Button.ButtonDefault, {
90
116
  onClick: function onClick() {
91
- return requestCode({
117
+ requestCode({
92
118
  username: data.username
93
119
  });
94
120
  }
95
- }, "Resend code"), /*#__PURE__*/React.createElement(ButtonPrimary, {
96
- onClick: submit
97
- }, "I got the code!")))))), /*#__PURE__*/React.createElement(Grid, null, /*#__PURE__*/React.createElement(Cell, {
121
+ }, "Resend code"), /*#__PURE__*/React.createElement(_Button.ButtonPrimary, {
122
+ onClick: function onClick(ev) {
123
+ submit(ev);
124
+ }
125
+ }, "I got the code!")))))), /*#__PURE__*/React.createElement(_Grid.Grid, null, /*#__PURE__*/React.createElement(_Grid.Cell, {
98
126
  span: 12,
99
127
  style: {
100
128
  textAlign: "center"
@@ -108,4 +136,5 @@ var ForgotPassword = function ForgotPassword() {
108
136
  }));
109
137
  };
110
138
 
111
- export default ForgotPassword;
139
+ var _default = ForgotPassword;
140
+ exports.default = _default;
@@ -0,0 +1 @@
1
+ {"version":3,"names":["ForgotPassword","useAuthenticator","authData","changeState","useForgotPassword","loading","codeSent","shouldRender","setPassword","requestCode","error","username","Bind","submit","data","validation","create","val","cb","toLowerCase","alignRight","ev","textAlign"],"sources":["ForgotPassword.tsx"],"sourcesContent":["import * as React from \"react\";\nimport { Form } from \"@webiny/form\";\nimport { validation } from \"@webiny/validation\";\nimport { ButtonPrimary, ButtonDefault } from \"@webiny/ui/Button\";\nimport { Input } from \"@webiny/ui/Input\";\nimport { Grid, Cell } from \"@webiny/ui/Grid\";\nimport { Typography } from \"@webiny/ui/Typography\";\nimport { Alert } from \"@webiny/ui/Alert\";\nimport { Elevation } from \"@webiny/ui/Elevation\";\nimport StateContainer from \"./StateContainer\";\nimport { alignRight, InnerContent, Title } from \"./StyledComponents\";\nimport { CircularProgress } from \"@webiny/ui/Progress\";\nimport { useAuthenticator } from \"@webiny/app-cognito-authenticator/hooks/useAuthenticator\";\nimport { useForgotPassword } from \"@webiny/app-cognito-authenticator/hooks/useForgotPassword\";\n\nconst ForgotPassword: React.FC = () => {\n const { authData, changeState } = useAuthenticator();\n const { loading, codeSent, shouldRender, setPassword, requestCode, error } =\n useForgotPassword();\n\n if (!shouldRender) {\n return null;\n }\n\n const { username = \"\" } = authData || {};\n\n return (\n <StateContainer>\n <Form\n data={{ username }}\n onSubmit={({ username }) =>\n codeSent ? setPassword({ username }) : requestCode({ username })\n }\n submitOnEnter\n >\n {({ Bind, submit, data }) => (\n <>\n <Elevation z={2}>\n <InnerContent>\n {loading && <CircularProgress />}\n <Title>\n <h1>\n <Typography use=\"headline4\">Password Recovery</Typography>\n </h1>\n <p>\n <Typography use=\"subtitle2\">\n request a password reset code\n </Typography>\n </p>\n </Title>\n\n {error && (\n <Grid>\n <Cell span={12}>\n <Alert title={\"Something went wrong\"} type={\"danger\"}>\n {error}\n </Alert>\n </Cell>\n </Grid>\n )}\n\n {!codeSent ? (\n <>\n <Grid>\n <Cell span={12}>\n <Bind\n name=\"username\"\n validators={validation.create(\"required\")}\n beforeChange={(\n val: string,\n cb: (value: string) => void\n ) => cb(val.toLowerCase())}\n >\n <Input\n label={\"Email\"}\n description={\n \"A reset code will be sent to your email.\"\n }\n />\n </Bind>\n </Cell>\n </Grid>\n\n <Grid>\n <Cell span={12} className={alignRight}>\n <ButtonPrimary\n onClick={ev => {\n submit(ev);\n }}\n data-testid=\"send-code\"\n >\n {\"Send me the code\"}\n </ButtonPrimary>\n </Cell>\n </Grid>\n </>\n ) : (\n <>\n <Grid>\n <Cell span={12}>\n <Typography use=\"body1\">\n We have sent you a code to reset your password!\n <br />\n <br />\n Click the &quot;Resend code&quot; button below\n to resend the code in case you haven&apos;t\n received it the first time.\n </Typography>\n </Cell>\n </Grid>\n <Grid>\n <Cell span={12} className={alignRight}>\n <ButtonDefault\n onClick={() => {\n requestCode({ username: data.username });\n }}\n >\n {\"Resend code\"}\n </ButtonDefault>\n <ButtonPrimary\n onClick={ev => {\n submit(ev);\n }}\n >\n I got the code!\n </ButtonPrimary>\n </Cell>\n </Grid>\n </>\n )}\n </InnerContent>\n </Elevation>\n <Grid>\n <Cell span={12} style={{ textAlign: \"center\" }}>\n Want to sign in? {/* eslint-disable-next-line */}\n <a href={\"#\"} onClick={() => changeState(\"signIn\")}>\n Sign in\n </a>\n </Cell>\n </Grid>\n </>\n )}\n </Form>\n </StateContainer>\n );\n};\n\nexport default ForgotPassword;\n"],"mappings":";;;;;;;;;;;AAAA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AAEA,IAAMA,cAAwB,GAAG,SAA3BA,cAA2B,GAAM;EACnC,wBAAkC,IAAAC,mCAAA,GAAlC;EAAA,IAAQC,QAAR,qBAAQA,QAAR;EAAA,IAAkBC,WAAlB,qBAAkBA,WAAlB;;EACA,yBACI,IAAAC,qCAAA,GADJ;EAAA,IAAQC,OAAR,sBAAQA,OAAR;EAAA,IAAiBC,QAAjB,sBAAiBA,QAAjB;EAAA,IAA2BC,YAA3B,sBAA2BA,YAA3B;EAAA,IAAyCC,WAAzC,sBAAyCA,WAAzC;EAAA,IAAsDC,WAAtD,sBAAsDA,WAAtD;EAAA,IAAmEC,KAAnE,sBAAmEA,KAAnE;;EAGA,IAAI,CAACH,YAAL,EAAmB;IACf,OAAO,IAAP;EACH;;EAED,WAA0BL,QAAQ,IAAI,EAAtC;EAAA,yBAAQS,QAAR;EAAA,IAAQA,QAAR,8BAAmB,EAAnB;;EAEA,oBACI,oBAAC,uBAAD,qBACI,oBAAC,UAAD;IACI,IAAI,EAAE;MAAEA,QAAQ,EAARA;IAAF,CADV;IAEI,QAAQ,EAAE;MAAA,IAAGA,QAAH,SAAGA,QAAH;MAAA,OACNL,QAAQ,GAAGE,WAAW,CAAC;QAAEG,QAAQ,EAARA;MAAF,CAAD,CAAd,GAA+BF,WAAW,CAAC;QAAEE,QAAQ,EAARA;MAAF,CAAD,CAD5C;IAAA,CAFd;IAKI,aAAa;EALjB,GAOK;IAAA,IAAGC,IAAH,SAAG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IAAZ,gBACI,oBAAC,sBAAD;MAAY,GAAG,EAAC;IAAhB,mEAEI,+BAFJ,eAGI,+BAHJ,8GADJ,CADJ,CADJ,eAaI,oBAAC,UAAD,qBACI,oBAAC,UAAD;MAAM,IAAI,EAAE,EAAZ;MAAgB,SAAS,EAAED;IAA3B,gBACI,oBAAC,qBAAD;MACI,OAAO,EAAE,mBAAM;QACXX,WAAW,CAAC;UAAEE,QAAQ,EAAEG,IAAI,CAACH;QAAjB,CAAD,CAAX;MACH;IAHL,GAKK,aALL,CADJ,eAQI,oBAAC,qBAAD;MACI,OAAO,EAAE,iBAAAU,EAAE,EAAI;QACXR,MAAM,CAACQ,EAAD,CAAN;MACH;IAHL,qBARJ,CADJ,CAbJ,CA3DR,CADJ,CADJ,eAgGI,oBAAC,UAAD,qBACI,oBAAC,UAAD;MAAM,IAAI,EAAE,EAAZ;MAAgB,KAAK,EAAE;QAAEC,SAAS,EAAE;MAAb;IAAvB,qCAEI;MAAG,IAAI,EAAE,GAAT;MAAc,OAAO,EAAE;QAAA,OAAMnB,WAAW,CAAC,QAAD,CAAjB;MAAA;IAAvB,aAFJ,CADJ,CAhGJ,CADH;EAAA,CAPL,CADJ,CADJ;AAuHH,CAlID;;eAoIeH,c"}
@@ -0,0 +1,3 @@
1
+ import React from "react";
2
+ declare const LoggingIn: React.FC;
3
+ export default LoggingIn;
@@ -0,0 +1,21 @@
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 = void 0;
9
+
10
+ var _react = _interopRequireDefault(require("react"));
11
+
12
+ var _Progress = require("@webiny/ui/Progress");
13
+
14
+ var LoggingIn = function LoggingIn() {
15
+ return /*#__PURE__*/_react.default.createElement(_Progress.CircularProgress, {
16
+ label: "Loading identity..."
17
+ });
18
+ };
19
+
20
+ var _default = LoggingIn;
21
+ exports.default = _default;
@@ -0,0 +1 @@
1
+ {"version":3,"names":["LoggingIn"],"sources":["LoggingIn.tsx"],"sourcesContent":["import React from \"react\";\nimport { CircularProgress } from \"@webiny/ui/Progress\";\n\nconst LoggingIn: React.FC = () => {\n return <CircularProgress label={\"Loading identity...\"} />;\n};\n\nexport default LoggingIn;\n"],"mappings":";;;;;;;;;AAAA;;AACA;;AAEA,IAAMA,SAAmB,GAAG,SAAtBA,SAAsB,GAAM;EAC9B,oBAAO,6BAAC,0BAAD;IAAkB,KAAK,EAAE;EAAzB,EAAP;AACH,CAFD;;eAIeA,S"}
@@ -1,3 +1,3 @@
1
- /// <reference types="react" />
2
- declare const RequireNewPassword: () => JSX.Element;
1
+ import React from "react";
2
+ declare const RequireNewPassword: React.FC;
3
3
  export default RequireNewPassword;