@cal.macconnachie/web-components 0.0.1
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/README.md +164 -0
- package/dist/components/cals-auth +2479 -0
- package/dist/components/index.d.ts +111 -0
- package/dist/index +2437 -0
- package/dist/index.d.ts +111 -0
- package/dist/stylesheets/main.css +1 -0
- package/package.json +73 -0
|
@@ -0,0 +1,111 @@
|
|
|
1
|
+
import { CSSResult } from 'lit';
|
|
2
|
+
import { LitElement } from 'lit';
|
|
3
|
+
import { nothing } from 'lit';
|
|
4
|
+
import { PropertyValues } from 'lit';
|
|
5
|
+
import { TemplateResult } from 'lit-html';
|
|
6
|
+
|
|
7
|
+
declare type AuthMode = 'signin' | 'signup';
|
|
8
|
+
|
|
9
|
+
export declare class CalsAuth extends LitElement {
|
|
10
|
+
open: boolean;
|
|
11
|
+
initialMode: AuthMode;
|
|
12
|
+
logoUrl: string;
|
|
13
|
+
baseUrl: string;
|
|
14
|
+
oauthDomain: string;
|
|
15
|
+
oauthRegion: string;
|
|
16
|
+
oauthUserPoolId: string;
|
|
17
|
+
oauthClientId: string;
|
|
18
|
+
oauthRedirectUri: string;
|
|
19
|
+
size: 'sm' | 'md' | 'lg';
|
|
20
|
+
theme: 'light' | 'dark';
|
|
21
|
+
private mode;
|
|
22
|
+
private resetStep;
|
|
23
|
+
private signupStep;
|
|
24
|
+
private isLoading;
|
|
25
|
+
private isClosing;
|
|
26
|
+
private isVisible;
|
|
27
|
+
private isLoggedIn;
|
|
28
|
+
private email;
|
|
29
|
+
private password;
|
|
30
|
+
private givenName;
|
|
31
|
+
private familyName;
|
|
32
|
+
private newPassword;
|
|
33
|
+
private confirmPassword;
|
|
34
|
+
private notice;
|
|
35
|
+
private error;
|
|
36
|
+
private errors;
|
|
37
|
+
private otpDigits;
|
|
38
|
+
private signupOtpDigits;
|
|
39
|
+
private isDragging;
|
|
40
|
+
private dragStartY;
|
|
41
|
+
private dragCurrentY;
|
|
42
|
+
private dragStartTime;
|
|
43
|
+
private lastDragEndTime;
|
|
44
|
+
private cookies;
|
|
45
|
+
private apiService?;
|
|
46
|
+
private oauthService?;
|
|
47
|
+
private modalContainer?;
|
|
48
|
+
private emailInput?;
|
|
49
|
+
private modalBody?;
|
|
50
|
+
private scrollPosition;
|
|
51
|
+
private transitionDuration;
|
|
52
|
+
private hasHandledOAuthCallback;
|
|
53
|
+
private boundKeyHandler;
|
|
54
|
+
private readonly baseUrlErrorMessage;
|
|
55
|
+
private hasApiBaseUrl;
|
|
56
|
+
private getNormalizedBaseUrl;
|
|
57
|
+
private getApiService;
|
|
58
|
+
connectedCallback(): void;
|
|
59
|
+
disconnectedCallback(): void;
|
|
60
|
+
firstUpdated(): void;
|
|
61
|
+
updated(changed: PropertyValues): void;
|
|
62
|
+
private lockBodyScroll;
|
|
63
|
+
private unlockBodyScroll;
|
|
64
|
+
private cleanupInlineStyles;
|
|
65
|
+
private resetState;
|
|
66
|
+
private handleClose;
|
|
67
|
+
private handleOverlayClick;
|
|
68
|
+
private handleDragStart;
|
|
69
|
+
private handleDragMove;
|
|
70
|
+
private handleDragEnd;
|
|
71
|
+
private handleHandleClick;
|
|
72
|
+
private toggleMode;
|
|
73
|
+
private startReset;
|
|
74
|
+
private cancelReset;
|
|
75
|
+
private backToRequest;
|
|
76
|
+
private backToSignupForm;
|
|
77
|
+
private validate;
|
|
78
|
+
private handleSubmit;
|
|
79
|
+
private setAuthTokens;
|
|
80
|
+
private handleSignIn;
|
|
81
|
+
private isOAuthConfigured;
|
|
82
|
+
private getOAuthService;
|
|
83
|
+
private stripOAuthParamsFromUrl;
|
|
84
|
+
private handleOAuthCallbackIfPresent;
|
|
85
|
+
private handleRequestSignupOtp;
|
|
86
|
+
private handleSignupWithOtp;
|
|
87
|
+
private handleRequestReset;
|
|
88
|
+
private handleConfirmReset;
|
|
89
|
+
logout(): Promise<void>;
|
|
90
|
+
private handleGoogleSignIn;
|
|
91
|
+
private handleAppleSignIn;
|
|
92
|
+
private handleOtpInput;
|
|
93
|
+
private handleOtpKeydown;
|
|
94
|
+
private handleOtpPaste;
|
|
95
|
+
render(): typeof nothing | TemplateResult<1>;
|
|
96
|
+
private renderContent;
|
|
97
|
+
private renderFormContent;
|
|
98
|
+
private renderActions;
|
|
99
|
+
private renderAlerts;
|
|
100
|
+
private renderFooter;
|
|
101
|
+
private renderGoogleIcon;
|
|
102
|
+
private renderAppleIcon;
|
|
103
|
+
setError(message: string): void;
|
|
104
|
+
setNotice(message: string): void;
|
|
105
|
+
closeModal(): void;
|
|
106
|
+
openModal(): void;
|
|
107
|
+
refresh(): Promise<void>;
|
|
108
|
+
static styles: CSSResult;
|
|
109
|
+
}
|
|
110
|
+
|
|
111
|
+
export { }
|