@webiny/app-admin-cognito 0.0.0-mt-2 → 0.0.0-unstable.06b2ede40f

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 (46) hide show
  1. package/components/Divider.d.ts +2 -0
  2. package/components/Divider.js +16 -0
  3. package/components/Divider.js.map +1 -0
  4. package/components/FederatedProviders.d.ts +44 -0
  5. package/components/FederatedProviders.js +14 -0
  6. package/components/FederatedProviders.js.map +1 -0
  7. package/components/View.d.ts +98 -0
  8. package/components/View.js +66 -0
  9. package/components/View.js.map +1 -0
  10. package/federatedIdentityProviders.d.ts +9 -0
  11. package/federatedIdentityProviders.js +9 -0
  12. package/federatedIdentityProviders.js.map +1 -0
  13. package/index.d.ts +136 -8
  14. package/index.js +130 -150
  15. package/index.js.map +1 -0
  16. package/package.json +22 -29
  17. package/types.js +3 -0
  18. package/types.js.map +1 -0
  19. package/views/FederatedLogin.d.ts +7 -0
  20. package/views/FederatedLogin.js +32 -0
  21. package/views/FederatedLogin.js.map +1 -0
  22. package/views/ForgotPassword.d.ts +2 -3
  23. package/views/ForgotPassword.js +91 -98
  24. package/views/ForgotPassword.js.map +1 -0
  25. package/views/LoggingIn.d.ts +2 -0
  26. package/views/LoggingIn.js +9 -0
  27. package/views/LoggingIn.js.map +1 -0
  28. package/views/RequireNewPassword.d.ts +2 -3
  29. package/views/RequireNewPassword.js +61 -70
  30. package/views/RequireNewPassword.js.map +1 -0
  31. package/views/SetNewPassword.d.ts +2 -3
  32. package/views/SetNewPassword.js +56 -63
  33. package/views/SetNewPassword.js.map +1 -0
  34. package/views/SignIn.d.ts +36 -3
  35. package/views/SignIn.js +94 -82
  36. package/views/SignIn.js.map +1 -0
  37. package/views/SignedIn.d.ts +6 -4
  38. package/views/SignedIn.js +7 -8
  39. package/views/SignedIn.js.map +1 -0
  40. package/views/CheckingUser.d.ts +0 -3
  41. package/views/CheckingUser.js +0 -14
  42. package/views/StateContainer.d.ts +0 -5
  43. package/views/StateContainer.js +0 -12
  44. package/views/StyledComponents.d.ts +0 -10
  45. package/views/StyledComponents.js +0 -74
  46. package/views/webiny-orange-logo.svg +0 -23
@@ -0,0 +1,2 @@
1
+ import React from "react";
2
+ export declare const Divider: () => React.JSX.Element;
@@ -0,0 +1,16 @@
1
+ import React from "react";
2
+ import { Separator, Text } from "@webiny/admin-ui";
3
+ export const Divider = () => {
4
+ return /*#__PURE__*/React.createElement("div", {
5
+ className: "wby-relative wby-my-lg"
6
+ }, /*#__PURE__*/React.createElement("div", {
7
+ className: "wby-absolute wby-inset-0 wby-flex wby-items-center"
8
+ }, /*#__PURE__*/React.createElement(Separator, null)), /*#__PURE__*/React.createElement("div", {
9
+ className: "wby-relative wby-flex wby-justify-center"
10
+ }, /*#__PURE__*/React.createElement(Text, {
11
+ size: "sm",
12
+ className: "wby-text-neutral-strong wby-px-sm wby-bg-neutral-base wby-uppercase"
13
+ }, "Or continue with")));
14
+ };
15
+
16
+ //# sourceMappingURL=Divider.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["React","Separator","Text","Divider","createElement","className","size"],"sources":["Divider.tsx"],"sourcesContent":["import React from \"react\";\nimport { Separator, Text } from \"@webiny/admin-ui\";\n\nexport const Divider = () => {\n return (\n <div className={\"wby-relative wby-my-lg\"}>\n <div className={\"wby-absolute wby-inset-0 wby-flex wby-items-center\"}>\n <Separator />\n </div>\n <div className={\"wby-relative wby-flex wby-justify-center\"}>\n <Text\n size={\"sm\"}\n className={\n \"wby-text-neutral-strong wby-px-sm wby-bg-neutral-base wby-uppercase\"\n }\n >\n {\"Or continue with\"}\n </Text>\n </div>\n </div>\n );\n};\n"],"mappings":"AAAA,OAAOA,KAAK,MAAM,OAAO;AACzB,SAASC,SAAS,EAAEC,IAAI,QAAQ,kBAAkB;AAElD,OAAO,MAAMC,OAAO,GAAGA,CAAA,KAAM;EACzB,oBACIH,KAAA,CAAAI,aAAA;IAAKC,SAAS,EAAE;EAAyB,gBACrCL,KAAA,CAAAI,aAAA;IAAKC,SAAS,EAAE;EAAqD,gBACjEL,KAAA,CAAAI,aAAA,CAACH,SAAS,MAAE,CACX,CAAC,eACND,KAAA,CAAAI,aAAA;IAAKC,SAAS,EAAE;EAA2C,gBACvDL,KAAA,CAAAI,aAAA,CAACF,IAAI;IACDI,IAAI,EAAE,IAAK;IACXD,SAAS,EACL;EACH,GAEA,kBACC,CACL,CACJ,CAAC;AAEd,CAAC","ignoreList":[]}
@@ -0,0 +1,44 @@
1
+ import React from "react";
2
+ export interface ContainerProps {
3
+ children: React.ReactNode;
4
+ }
5
+ export declare const Container: (({ children }: ContainerProps) => React.JSX.Element) & {
6
+ original: ({ children }: ContainerProps) => React.JSX.Element;
7
+ originalName: string;
8
+ displayName: string;
9
+ } & {
10
+ original: (({ children }: ContainerProps) => React.JSX.Element) & {
11
+ original: ({ children }: ContainerProps) => React.JSX.Element;
12
+ originalName: string;
13
+ displayName: string;
14
+ };
15
+ originalName: string;
16
+ displayName: string;
17
+ } & {
18
+ createDecorator: (decorator: import("@webiny/app-admin").ComponentDecorator<(({ children }: ContainerProps) => React.JSX.Element) & {
19
+ original: ({ children }: ContainerProps) => React.JSX.Element;
20
+ originalName: string;
21
+ displayName: string;
22
+ }>) => (props: unknown) => React.JSX.Element;
23
+ };
24
+ export declare const FederatedProviders: {
25
+ Container: (({ children }: ContainerProps) => React.JSX.Element) & {
26
+ original: ({ children }: ContainerProps) => React.JSX.Element;
27
+ originalName: string;
28
+ displayName: string;
29
+ } & {
30
+ original: (({ children }: ContainerProps) => React.JSX.Element) & {
31
+ original: ({ children }: ContainerProps) => React.JSX.Element;
32
+ originalName: string;
33
+ displayName: string;
34
+ };
35
+ originalName: string;
36
+ displayName: string;
37
+ } & {
38
+ createDecorator: (decorator: import("@webiny/app-admin").ComponentDecorator<(({ children }: ContainerProps) => React.JSX.Element) & {
39
+ original: ({ children }: ContainerProps) => React.JSX.Element;
40
+ originalName: string;
41
+ displayName: string;
42
+ }>) => (props: unknown) => React.JSX.Element;
43
+ };
44
+ };
@@ -0,0 +1,14 @@
1
+ import React from "react";
2
+ import { makeDecoratable } from "@webiny/app-admin";
3
+ export const Container = makeDecoratable("FederatedProvidersContainer", ({
4
+ children
5
+ }) => {
6
+ return /*#__PURE__*/React.createElement("div", {
7
+ className: "wby-flex wby-flex-col wby-gap-xs"
8
+ }, children);
9
+ });
10
+ export const FederatedProviders = {
11
+ Container
12
+ };
13
+
14
+ //# sourceMappingURL=FederatedProviders.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["React","makeDecoratable","Container","children","createElement","className","FederatedProviders"],"sources":["FederatedProviders.tsx"],"sourcesContent":["import React from \"react\";\nimport { makeDecoratable } from \"@webiny/app-admin\";\n\nexport interface ContainerProps {\n children: React.ReactNode;\n}\n\nexport const Container = makeDecoratable(\n \"FederatedProvidersContainer\",\n ({ children }: ContainerProps) => {\n return <div className={\"wby-flex wby-flex-col wby-gap-xs\"}>{children}</div>;\n }\n);\n\nexport const FederatedProviders = {\n Container\n};\n"],"mappings":"AAAA,OAAOA,KAAK,MAAM,OAAO;AACzB,SAASC,eAAe,QAAQ,mBAAmB;AAMnD,OAAO,MAAMC,SAAS,GAAGD,eAAe,CACpC,6BAA6B,EAC7B,CAAC;EAAEE;AAAyB,CAAC,KAAK;EAC9B,oBAAOH,KAAA,CAAAI,aAAA;IAAKC,SAAS,EAAE;EAAmC,GAAEF,QAAc,CAAC;AAC/E,CACJ,CAAC;AAED,OAAO,MAAMG,kBAAkB,GAAG;EAC9BJ;AACJ,CAAC","ignoreList":[]}
@@ -0,0 +1,98 @@
1
+ import * as React from "react";
2
+ export interface ContainerProps {
3
+ children: React.ReactNode;
4
+ }
5
+ export interface ContentProps {
6
+ children: React.ReactNode;
7
+ }
8
+ export interface FooterProps {
9
+ children: React.ReactNode;
10
+ }
11
+ export interface TitleProps {
12
+ title: string;
13
+ description?: React.ReactNode;
14
+ }
15
+ export interface ErrorProps {
16
+ title?: string;
17
+ description?: string | null;
18
+ }
19
+ export declare const Error: ({ title, description }: ErrorProps) => React.JSX.Element | null;
20
+ export declare const View: {
21
+ Container: (({ children }: ContainerProps) => React.JSX.Element) & {
22
+ original: ({ children }: ContainerProps) => React.JSX.Element;
23
+ originalName: string;
24
+ displayName: string;
25
+ } & {
26
+ original: (({ children }: ContainerProps) => React.JSX.Element) & {
27
+ original: ({ children }: ContainerProps) => React.JSX.Element;
28
+ originalName: string;
29
+ displayName: string;
30
+ };
31
+ originalName: string;
32
+ displayName: string;
33
+ } & {
34
+ createDecorator: (decorator: import("@webiny/app-admin").ComponentDecorator<(({ children }: ContainerProps) => React.JSX.Element) & {
35
+ original: ({ children }: ContainerProps) => React.JSX.Element;
36
+ originalName: string;
37
+ displayName: string;
38
+ }>) => (props: unknown) => React.JSX.Element;
39
+ };
40
+ Content: (({ children }: ContentProps) => React.JSX.Element) & {
41
+ original: ({ children }: ContentProps) => React.JSX.Element;
42
+ originalName: string;
43
+ displayName: string;
44
+ } & {
45
+ original: (({ children }: ContentProps) => React.JSX.Element) & {
46
+ original: ({ children }: ContentProps) => React.JSX.Element;
47
+ originalName: string;
48
+ displayName: string;
49
+ };
50
+ originalName: string;
51
+ displayName: string;
52
+ } & {
53
+ createDecorator: (decorator: import("@webiny/app-admin").ComponentDecorator<(({ children }: ContentProps) => React.JSX.Element) & {
54
+ original: ({ children }: ContentProps) => React.JSX.Element;
55
+ originalName: string;
56
+ displayName: string;
57
+ }>) => (props: unknown) => React.JSX.Element;
58
+ };
59
+ Title: (({ title, description }: TitleProps) => React.JSX.Element) & {
60
+ original: ({ title, description }: TitleProps) => React.JSX.Element;
61
+ originalName: string;
62
+ displayName: string;
63
+ } & {
64
+ original: (({ title, description }: TitleProps) => React.JSX.Element) & {
65
+ original: ({ title, description }: TitleProps) => React.JSX.Element;
66
+ originalName: string;
67
+ displayName: string;
68
+ };
69
+ originalName: string;
70
+ displayName: string;
71
+ } & {
72
+ createDecorator: (decorator: import("@webiny/app-admin").ComponentDecorator<(({ title, description }: TitleProps) => React.JSX.Element) & {
73
+ original: ({ title, description }: TitleProps) => React.JSX.Element;
74
+ originalName: string;
75
+ displayName: string;
76
+ }>) => (props: unknown) => React.JSX.Element;
77
+ };
78
+ Footer: (({ children }: FooterProps) => React.JSX.Element) & {
79
+ original: ({ children }: FooterProps) => React.JSX.Element;
80
+ originalName: string;
81
+ displayName: string;
82
+ } & {
83
+ original: (({ children }: FooterProps) => React.JSX.Element) & {
84
+ original: ({ children }: FooterProps) => React.JSX.Element;
85
+ originalName: string;
86
+ displayName: string;
87
+ };
88
+ originalName: string;
89
+ displayName: string;
90
+ } & {
91
+ createDecorator: (decorator: import("@webiny/app-admin").ComponentDecorator<(({ children }: FooterProps) => React.JSX.Element) & {
92
+ original: ({ children }: FooterProps) => React.JSX.Element;
93
+ originalName: string;
94
+ displayName: string;
95
+ }>) => (props: unknown) => React.JSX.Element;
96
+ };
97
+ Error: ({ title, description }: ErrorProps) => React.JSX.Element | null;
98
+ };
@@ -0,0 +1,66 @@
1
+ import * as React from "react";
2
+ import { Logo, makeDecoratable } from "@webiny/app-admin";
3
+ import { Alert, Grid, Heading, Text } from "@webiny/admin-ui";
4
+ const Container = makeDecoratable("ViewContainer", ({
5
+ children
6
+ }) => {
7
+ return /*#__PURE__*/React.createElement("div", {
8
+ className: "wby-w-full wby-h-screen wby-bg-neutral-light wby-flex-1"
9
+ }, /*#__PURE__*/React.createElement("section", {
10
+ className: "wby-m-auto wby-flex wby-flex-col wby-justify-center wby-min-h-screen"
11
+ }, /*#__PURE__*/React.createElement("div", {
12
+ className: "wby-mx-auto"
13
+ }, /*#__PURE__*/React.createElement(Logo, null)), /*#__PURE__*/React.createElement("div", {
14
+ className: "wby-w-full wby-max-w-[480px] wby-mx-auto wby-my-lg"
15
+ }, children)));
16
+ });
17
+ const Content = makeDecoratable("ViewContent", ({
18
+ children
19
+ }) => /*#__PURE__*/React.createElement("div", {
20
+ className: "wby-relative wby-p-lg wby-pt-md wby-bg-neutral-base wby-rounded-xl"
21
+ }, children));
22
+ const Footer = makeDecoratable("ViewFooter", ({
23
+ children
24
+ }) => {
25
+ return /*#__PURE__*/React.createElement(Grid, null, /*#__PURE__*/React.createElement(Grid.Column, {
26
+ span: 12,
27
+ className: "wby-text-center wby-mt-lg"
28
+ }, children));
29
+ });
30
+ const Title = makeDecoratable("ViewTitle", ({
31
+ title,
32
+ description
33
+ }) => {
34
+ return /*#__PURE__*/React.createElement("div", {
35
+ className: "wby-mb-md"
36
+ }, /*#__PURE__*/React.createElement(Heading, {
37
+ level: 4
38
+ }, title), description && /*#__PURE__*/React.createElement(Text, {
39
+ as: "div",
40
+ size: "sm",
41
+ className: "wby-text-neutral-strong"
42
+ }, description));
43
+ });
44
+ export const Error = ({
45
+ title = "Something went wrong",
46
+ description
47
+ }) => {
48
+ if (!description) {
49
+ return null;
50
+ }
51
+ return /*#__PURE__*/React.createElement("div", {
52
+ className: "wby-mb-lg"
53
+ }, /*#__PURE__*/React.createElement(Alert, {
54
+ title: title,
55
+ type: "danger"
56
+ }, description));
57
+ };
58
+ export const View = {
59
+ Container,
60
+ Content,
61
+ Title,
62
+ Footer,
63
+ Error
64
+ };
65
+
66
+ //# sourceMappingURL=View.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["React","Logo","makeDecoratable","Alert","Grid","Heading","Text","Container","children","createElement","className","Content","Footer","Column","span","Title","title","description","level","as","size","Error","type","View"],"sources":["View.tsx"],"sourcesContent":["import * as React from \"react\";\nimport { Logo, makeDecoratable } from \"@webiny/app-admin\";\nimport { Alert, Grid, Heading, Text } from \"@webiny/admin-ui\";\n\nexport interface ContainerProps {\n children: React.ReactNode;\n}\n\nconst Container = makeDecoratable(\"ViewContainer\", ({ children }: ContainerProps) => {\n return (\n <div className={\"wby-w-full wby-h-screen wby-bg-neutral-light wby-flex-1\"}>\n <section\n className={\"wby-m-auto wby-flex wby-flex-col wby-justify-center wby-min-h-screen\"}\n >\n <div className={\"wby-mx-auto\"}>\n <Logo />\n </div>\n <div className={\"wby-w-full wby-max-w-[480px] wby-mx-auto wby-my-lg\"}>\n {children}\n </div>\n </section>\n </div>\n );\n});\n\nexport interface ContentProps {\n children: React.ReactNode;\n}\n\nconst Content = makeDecoratable(\"ViewContent\", ({ children }: ContentProps) => (\n <div className={\"wby-relative wby-p-lg wby-pt-md wby-bg-neutral-base wby-rounded-xl\"}>\n {children}\n </div>\n));\n\nexport interface FooterProps {\n children: React.ReactNode;\n}\n\nconst Footer = makeDecoratable(\"ViewFooter\", ({ children }: FooterProps) => {\n return (\n <Grid>\n <Grid.Column span={12} className={\"wby-text-center wby-mt-lg\"}>\n {children}\n </Grid.Column>\n </Grid>\n );\n});\n\nexport interface TitleProps {\n title: string;\n description?: React.ReactNode;\n}\n\nconst Title = makeDecoratable(\"ViewTitle\", ({ title, description }: TitleProps) => {\n return (\n <div className={\"wby-mb-md\"}>\n <Heading level={4}>{title}</Heading>\n {description && (\n <Text as={\"div\"} size={\"sm\"} className={\"wby-text-neutral-strong\"}>\n {description}\n </Text>\n )}\n </div>\n );\n});\n\nexport interface ErrorProps {\n title?: string;\n description?: string | null;\n}\n\nexport const Error = ({ title = \"Something went wrong\", description }: ErrorProps) => {\n if (!description) {\n return null;\n }\n\n return (\n <div className={\"wby-mb-lg\"}>\n <Alert title={title} type={\"danger\"}>\n {description}\n </Alert>\n </div>\n );\n};\n\nexport const View = {\n Container,\n Content,\n Title,\n Footer,\n Error\n};\n"],"mappings":"AAAA,OAAO,KAAKA,KAAK,MAAM,OAAO;AAC9B,SAASC,IAAI,EAAEC,eAAe,QAAQ,mBAAmB;AACzD,SAASC,KAAK,EAAEC,IAAI,EAAEC,OAAO,EAAEC,IAAI,QAAQ,kBAAkB;AAM7D,MAAMC,SAAS,GAAGL,eAAe,CAAC,eAAe,EAAE,CAAC;EAAEM;AAAyB,CAAC,KAAK;EACjF,oBACIR,KAAA,CAAAS,aAAA;IAAKC,SAAS,EAAE;EAA0D,gBACtEV,KAAA,CAAAS,aAAA;IACIC,SAAS,EAAE;EAAuE,gBAElFV,KAAA,CAAAS,aAAA;IAAKC,SAAS,EAAE;EAAc,gBAC1BV,KAAA,CAAAS,aAAA,CAACR,IAAI,MAAE,CACN,CAAC,eACND,KAAA,CAAAS,aAAA;IAAKC,SAAS,EAAE;EAAqD,GAChEF,QACA,CACA,CACR,CAAC;AAEd,CAAC,CAAC;AAMF,MAAMG,OAAO,GAAGT,eAAe,CAAC,aAAa,EAAE,CAAC;EAAEM;AAAuB,CAAC,kBACtER,KAAA,CAAAS,aAAA;EAAKC,SAAS,EAAE;AAAqE,GAChFF,QACA,CACR,CAAC;AAMF,MAAMI,MAAM,GAAGV,eAAe,CAAC,YAAY,EAAE,CAAC;EAAEM;AAAsB,CAAC,KAAK;EACxE,oBACIR,KAAA,CAAAS,aAAA,CAACL,IAAI,qBACDJ,KAAA,CAAAS,aAAA,CAACL,IAAI,CAACS,MAAM;IAACC,IAAI,EAAE,EAAG;IAACJ,SAAS,EAAE;EAA4B,GACzDF,QACQ,CACX,CAAC;AAEf,CAAC,CAAC;AAOF,MAAMO,KAAK,GAAGb,eAAe,CAAC,WAAW,EAAE,CAAC;EAAEc,KAAK;EAAEC;AAAwB,CAAC,KAAK;EAC/E,oBACIjB,KAAA,CAAAS,aAAA;IAAKC,SAAS,EAAE;EAAY,gBACxBV,KAAA,CAAAS,aAAA,CAACJ,OAAO;IAACa,KAAK,EAAE;EAAE,GAAEF,KAAe,CAAC,EACnCC,WAAW,iBACRjB,KAAA,CAAAS,aAAA,CAACH,IAAI;IAACa,EAAE,EAAE,KAAM;IAACC,IAAI,EAAE,IAAK;IAACV,SAAS,EAAE;EAA0B,GAC7DO,WACC,CAET,CAAC;AAEd,CAAC,CAAC;AAOF,OAAO,MAAMI,KAAK,GAAGA,CAAC;EAAEL,KAAK,GAAG,sBAAsB;EAAEC;AAAwB,CAAC,KAAK;EAClF,IAAI,CAACA,WAAW,EAAE;IACd,OAAO,IAAI;EACf;EAEA,oBACIjB,KAAA,CAAAS,aAAA;IAAKC,SAAS,EAAE;EAAY,gBACxBV,KAAA,CAAAS,aAAA,CAACN,KAAK;IAACa,KAAK,EAAEA,KAAM;IAACM,IAAI,EAAE;EAAS,GAC/BL,WACE,CACN,CAAC;AAEd,CAAC;AAED,OAAO,MAAMM,IAAI,GAAG;EAChBhB,SAAS;EACTI,OAAO;EACPI,KAAK;EACLH,MAAM;EACNS;AACJ,CAAC","ignoreList":[]}
@@ -0,0 +1,9 @@
1
+ import type React from "react";
2
+ export declare const federatedIdentityProviders: Record<string, string>;
3
+ export interface SignInProps {
4
+ signIn: () => void;
5
+ }
6
+ export type FederatedIdentityProvider = {
7
+ name: string;
8
+ component: React.FunctionComponent<SignInProps>;
9
+ };
@@ -0,0 +1,9 @@
1
+ export const federatedIdentityProviders = {
2
+ cognito: "COGNITO",
3
+ google: "Google",
4
+ facebook: "Facebook",
5
+ amazon: "LoginWithAmazon",
6
+ apple: "SignInWithApple"
7
+ };
8
+
9
+ //# sourceMappingURL=federatedIdentityProviders.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["federatedIdentityProviders","cognito","google","facebook","amazon","apple"],"sources":["federatedIdentityProviders.ts"],"sourcesContent":["import type React from \"react\";\n\nexport const federatedIdentityProviders: Record<string, string> = {\n cognito: \"COGNITO\",\n google: \"Google\",\n facebook: \"Facebook\",\n amazon: \"LoginWithAmazon\",\n apple: \"SignInWithApple\"\n};\n\nexport interface SignInProps {\n signIn: () => void;\n}\n\nexport type FederatedIdentityProvider = {\n name: string;\n component: React.FunctionComponent<SignInProps>;\n};\n"],"mappings":"AAEA,OAAO,MAAMA,0BAAkD,GAAG;EAC9DC,OAAO,EAAE,SAAS;EAClBC,MAAM,EAAE,QAAQ;EAChBC,QAAQ,EAAE,UAAU;EACpBC,MAAM,EAAE,iBAAiB;EACzBC,KAAK,EAAE;AACX,CAAC","ignoreList":[]}
package/index.d.ts CHANGED
@@ -1,18 +1,146 @@
1
1
  import React from "react";
2
- import { AuthOptions } from "@aws-amplify/auth/lib-esm/types";
3
- import ApolloClient from "apollo-client";
4
- export interface Props {
2
+ import type { AuthOptions } from "@aws-amplify/auth/lib-esm/types";
3
+ import type ApolloClient from "apollo-client";
4
+ import type { FederatedIdentityProvider } from "./federatedIdentityProviders";
5
+ export declare const Components: {
6
+ View: {
7
+ Container: (({ children }: import("./components/View").ContainerProps) => React.JSX.Element) & {
8
+ original: ({ children }: import("./components/View").ContainerProps) => React.JSX.Element;
9
+ originalName: string;
10
+ displayName: string;
11
+ } & {
12
+ original: (({ children }: import("./components/View").ContainerProps) => React.JSX.Element) & {
13
+ original: ({ children }: import("./components/View").ContainerProps) => React.JSX.Element;
14
+ originalName: string;
15
+ displayName: string;
16
+ };
17
+ originalName: string;
18
+ displayName: string;
19
+ } & {
20
+ createDecorator: (decorator: import("@webiny/react-composition").ComponentDecorator<(({ children }: import("./components/View").ContainerProps) => React.JSX.Element) & {
21
+ original: ({ children }: import("./components/View").ContainerProps) => React.JSX.Element;
22
+ originalName: string;
23
+ displayName: string;
24
+ }>) => (props: unknown) => React.JSX.Element;
25
+ };
26
+ Content: (({ children }: import("./components/View").ContentProps) => React.JSX.Element) & {
27
+ original: ({ children }: import("./components/View").ContentProps) => React.JSX.Element;
28
+ originalName: string;
29
+ displayName: string;
30
+ } & {
31
+ original: (({ children }: import("./components/View").ContentProps) => React.JSX.Element) & {
32
+ original: ({ children }: import("./components/View").ContentProps) => React.JSX.Element;
33
+ originalName: string;
34
+ displayName: string;
35
+ };
36
+ originalName: string;
37
+ displayName: string;
38
+ } & {
39
+ createDecorator: (decorator: import("@webiny/react-composition").ComponentDecorator<(({ children }: import("./components/View").ContentProps) => React.JSX.Element) & {
40
+ original: ({ children }: import("./components/View").ContentProps) => React.JSX.Element;
41
+ originalName: string;
42
+ displayName: string;
43
+ }>) => (props: unknown) => React.JSX.Element;
44
+ };
45
+ Title: (({ title, description }: import("./components/View").TitleProps) => React.JSX.Element) & {
46
+ original: ({ title, description }: import("./components/View").TitleProps) => React.JSX.Element;
47
+ originalName: string;
48
+ displayName: string;
49
+ } & {
50
+ original: (({ title, description }: import("./components/View").TitleProps) => React.JSX.Element) & {
51
+ original: ({ title, description }: import("./components/View").TitleProps) => React.JSX.Element;
52
+ originalName: string;
53
+ displayName: string;
54
+ };
55
+ originalName: string;
56
+ displayName: string;
57
+ } & {
58
+ createDecorator: (decorator: import("@webiny/react-composition").ComponentDecorator<(({ title, description }: import("./components/View").TitleProps) => React.JSX.Element) & {
59
+ original: ({ title, description }: import("./components/View").TitleProps) => React.JSX.Element;
60
+ originalName: string;
61
+ displayName: string;
62
+ }>) => (props: unknown) => React.JSX.Element;
63
+ };
64
+ Footer: (({ children }: import("./components/View").FooterProps) => React.JSX.Element) & {
65
+ original: ({ children }: import("./components/View").FooterProps) => React.JSX.Element;
66
+ originalName: string;
67
+ displayName: string;
68
+ } & {
69
+ original: (({ children }: import("./components/View").FooterProps) => React.JSX.Element) & {
70
+ original: ({ children }: import("./components/View").FooterProps) => React.JSX.Element;
71
+ originalName: string;
72
+ displayName: string;
73
+ };
74
+ originalName: string;
75
+ displayName: string;
76
+ } & {
77
+ createDecorator: (decorator: import("@webiny/react-composition").ComponentDecorator<(({ children }: import("./components/View").FooterProps) => React.JSX.Element) & {
78
+ original: ({ children }: import("./components/View").FooterProps) => React.JSX.Element;
79
+ originalName: string;
80
+ displayName: string;
81
+ }>) => (props: unknown) => React.JSX.Element;
82
+ };
83
+ Error: ({ title, description }: import("./components/View").ErrorProps) => React.JSX.Element | null;
84
+ };
85
+ FederatedProviders: {
86
+ Container: (({ children }: import("./components/FederatedProviders").ContainerProps) => React.JSX.Element) & {
87
+ original: ({ children }: import("./components/FederatedProviders").ContainerProps) => React.JSX.Element;
88
+ originalName: string;
89
+ displayName: string;
90
+ } & {
91
+ original: (({ children }: import("./components/FederatedProviders").ContainerProps) => React.JSX.Element) & {
92
+ original: ({ children }: import("./components/FederatedProviders").ContainerProps) => React.JSX.Element;
93
+ originalName: string;
94
+ displayName: string;
95
+ };
96
+ originalName: string;
97
+ displayName: string;
98
+ } & {
99
+ createDecorator: (decorator: import("@webiny/react-composition").ComponentDecorator<(({ children }: import("./components/FederatedProviders").ContainerProps) => React.JSX.Element) & {
100
+ original: ({ children }: import("./components/FederatedProviders").ContainerProps) => React.JSX.Element;
101
+ originalName: string;
102
+ displayName: string;
103
+ }>) => (props: unknown) => React.JSX.Element;
104
+ };
105
+ };
106
+ SignIn: ((props: import("./views/SignIn").SignInProps) => React.JSX.Element | null) & {
107
+ original: (props: import("./views/SignIn").SignInProps) => React.JSX.Element | null;
108
+ originalName: string;
109
+ displayName: string;
110
+ } & {
111
+ original: ((props: import("./views/SignIn").SignInProps) => React.JSX.Element | null) & {
112
+ original: (props: import("./views/SignIn").SignInProps) => React.JSX.Element | null;
113
+ originalName: string;
114
+ displayName: string;
115
+ };
116
+ originalName: string;
117
+ displayName: string;
118
+ } & {
119
+ createDecorator: (decorator: import("@webiny/react-composition").ComponentDecorator<((props: import("./views/SignIn").SignInProps) => React.JSX.Element | null) & {
120
+ original: (props: import("./views/SignIn").SignInProps) => React.JSX.Element | null;
121
+ originalName: string;
122
+ displayName: string;
123
+ }>) => (props: unknown) => React.JSX.Element;
124
+ };
125
+ };
126
+ export interface AuthenticationProps {
5
127
  children: React.ReactNode;
6
128
  }
7
- export interface Config extends AuthOptions {
8
- onError?(error: Error): void;
9
- getIdentityData(params: {
129
+ export interface AuthenticationFactoryConfig extends AuthOptions {
130
+ allowSignInWithCredentials?: boolean;
131
+ federatedProviders?: FederatedIdentityProvider[];
132
+ onError?: (error: Error) => void;
133
+ getIdentityData: (params: {
10
134
  client: ApolloClient<any>;
11
135
  payload: {
12
136
  [key: string]: any;
13
137
  };
14
- }): Promise<{
138
+ }) => Promise<{
15
139
  [key: string]: any;
16
140
  }>;
17
141
  }
18
- export declare const createAuthentication: ({ getIdentityData, onError, ...config }: Config) => (props: Props) => JSX.Element;
142
+ interface AuthenticationFactory {
143
+ (params: AuthenticationFactoryConfig): React.ComponentType<AuthenticationProps>;
144
+ }
145
+ export declare const createAuthentication: AuthenticationFactory;
146
+ export {};