@everymatrix/user-login 1.46.0 → 1.47.0
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/dist/cjs/loader.cjs.js +1 -1
- package/dist/cjs/user-login.cjs.entry.js +21168 -117
- package/dist/cjs/user-login.cjs.js +1 -1
- package/dist/collection/components/user-login/user-login.css +26 -9
- package/dist/collection/components/user-login/user-login.js +342 -50
- package/dist/collection/utils/locale.utils.js +63 -47
- package/dist/esm/loader.js +1 -1
- package/dist/esm/user-login.entry.js +21169 -118
- package/dist/esm/user-login.js +1 -1
- package/dist/types/Users/maria.bumbar/Desktop/widgets-monorepo/packages/stencil/user-login/.stencil/packages/stencil/user-login/stencil.config.d.ts +2 -0
- package/dist/types/Users/maria.bumbar/Desktop/widgets-monorepo/packages/stencil/user-login/.stencil/packages/stencil/user-login/stencil.config.dev.d.ts +2 -0
- package/dist/types/components/user-login/user-login.d.ts +157 -24
- package/dist/types/components.d.ts +52 -20
- package/dist/user-login/p-6627f5d8.entry.js +2640 -0
- package/dist/user-login/user-login.esm.js +1 -1
- package/package.json +1 -1
- package/dist/types/Users/adrian.pripon/Documents/Work/widgets-monorepo/packages/stencil/user-login/.stencil/packages/stencil/user-login/stencil.config.d.ts +0 -2
- package/dist/types/Users/adrian.pripon/Documents/Work/widgets-monorepo/packages/stencil/user-login/.stencil/packages/stencil/user-login/stencil.config.dev.d.ts +0 -2
- package/dist/user-login/p-9257717d.entry.js +0 -1
package/dist/esm/user-login.js
CHANGED
|
@@ -16,5 +16,5 @@ var patchBrowser = () => {
|
|
|
16
16
|
|
|
17
17
|
patchBrowser().then(async (options) => {
|
|
18
18
|
await globalScripts();
|
|
19
|
-
return bootstrapLazy([["user-login",[[1,"user-login",{"endpoint":[513],"lang":[1537],"clientStyling":[513,"client-styling"],"clientStylingUrl":[513,"client-styling-url"],"translationUrl":[513,"translation-url"],"passwordReset":[513,"password-reset"],"userEmailRegex":[513,"user-email-regex"],"userEmailRegexOptions":[513,"user-email-regex-options"],"passwordRegex":[513,"password-regex"],"passwordRegexOptions":[513,"password-regex-options"],"userNameEmail":[32],"userPassword":[32],"isValidUserEmail":[32],"isValidPassword":[32],"isPasswordVisible":[32],"limitStylingAppends":[32],"errorMessage":[32],"hasError":[32]},null,{"translationUrl":["handleNewTranslations"]}]]]], options);
|
|
19
|
+
return bootstrapLazy([["user-login",[[1,"user-login",{"endpoint":[513],"lang":[1537],"clientStyling":[513,"client-styling"],"clientStylingUrl":[513,"client-styling-url"],"translationUrl":[513,"translation-url"],"passwordReset":[513,"password-reset"],"userEmailRegex":[513,"user-email-regex"],"userEmailRegexOptions":[513,"user-email-regex-options"],"userPhoneRegex":[513,"user-phone-regex"],"userPhoneRegexOptions":[513,"user-phone-regex-options"],"passwordRegex":[513,"password-regex"],"passwordRegexOptions":[513,"password-regex-options"],"version":[513],"loginByPhoneNumber":[513,"login-by-phone-number"],"userNameEmail":[32],"userPassword":[32],"isValidUserEmail":[32],"userPhone":[32],"userPrefix":[32],"isValidPassword":[32],"isValidUserPhone":[32],"isPasswordVisible":[32],"limitStylingAppends":[32],"errorMessage":[32],"hasError":[32],"userPrefixOptions":[32]},null,{"translationUrl":["handleNewTranslations"],"clientStyling":["handleStylingChange"],"clientStylingUrl":["handleStylingUrlChange"]}]]]], options);
|
|
20
20
|
});
|
|
@@ -1,82 +1,215 @@
|
|
|
1
|
+
import '@vaadin/combo-box';
|
|
1
2
|
export declare class UserLogin {
|
|
2
3
|
/**
|
|
3
|
-
*
|
|
4
|
+
* API endpoint URL for login requests
|
|
4
5
|
*/
|
|
5
6
|
endpoint: string;
|
|
6
7
|
/**
|
|
7
|
-
|
|
8
|
-
|
|
8
|
+
* Language code for translations (default is 'en')
|
|
9
|
+
*/
|
|
9
10
|
lang: string;
|
|
10
11
|
/**
|
|
11
|
-
|
|
12
|
-
|
|
12
|
+
* Inline CSS styling provided by the client
|
|
13
|
+
*/
|
|
13
14
|
clientStyling: string;
|
|
14
15
|
/**
|
|
15
|
-
|
|
16
|
-
|
|
16
|
+
* URL to load additional CSS styling
|
|
17
|
+
*/
|
|
17
18
|
clientStylingUrl: string;
|
|
18
19
|
/**
|
|
19
|
-
|
|
20
|
-
|
|
20
|
+
* URL for fetching translations
|
|
21
|
+
*/
|
|
21
22
|
translationUrl: string;
|
|
22
23
|
/**
|
|
23
|
-
*
|
|
24
|
+
* Flag indicating whether the password reset feature is enabled
|
|
24
25
|
*/
|
|
25
26
|
passwordReset: string;
|
|
26
27
|
/**
|
|
27
|
-
*
|
|
28
|
+
* Regular expression for validating the user email
|
|
28
29
|
*/
|
|
29
30
|
userEmailRegex: string;
|
|
30
31
|
/**
|
|
31
|
-
*
|
|
32
|
+
* Regex options for user email validation
|
|
32
33
|
*/
|
|
33
34
|
userEmailRegexOptions: string;
|
|
34
35
|
/**
|
|
35
|
-
*
|
|
36
|
+
* User phone regex
|
|
37
|
+
*/
|
|
38
|
+
userPhoneRegex: string;
|
|
39
|
+
/**
|
|
40
|
+
* User phone regex options
|
|
41
|
+
*/
|
|
42
|
+
userPhoneRegexOptions: string;
|
|
43
|
+
/**
|
|
44
|
+
* Regular expression for validating the password
|
|
36
45
|
*/
|
|
37
46
|
passwordRegex: string;
|
|
38
47
|
/**
|
|
39
|
-
*
|
|
48
|
+
* Regex options for password validation
|
|
40
49
|
*/
|
|
41
50
|
passwordRegexOptions: string;
|
|
42
51
|
/**
|
|
43
|
-
*
|
|
52
|
+
* Flag to determine if the component uses version 2 of the API
|
|
53
|
+
*/
|
|
54
|
+
version: string;
|
|
55
|
+
/**
|
|
56
|
+
* If set to true, login will be done by phone number, else by username/email
|
|
57
|
+
*/
|
|
58
|
+
loginByPhoneNumber: string;
|
|
59
|
+
/**
|
|
60
|
+
* User email or username entered in the form
|
|
44
61
|
*/
|
|
45
62
|
userNameEmail: string;
|
|
46
63
|
/**
|
|
47
|
-
* Password
|
|
64
|
+
* Password entered in the form
|
|
48
65
|
*/
|
|
49
66
|
userPassword: string;
|
|
67
|
+
/**
|
|
68
|
+
* Flag to indicate whether the entered email is valid
|
|
69
|
+
*/
|
|
50
70
|
isValidUserEmail: boolean;
|
|
71
|
+
/**
|
|
72
|
+
* User phone entered in the form
|
|
73
|
+
*/
|
|
74
|
+
userPhone: string;
|
|
75
|
+
/**
|
|
76
|
+
* User prefix entered in the form
|
|
77
|
+
*/
|
|
78
|
+
userPrefix: string;
|
|
79
|
+
/**
|
|
80
|
+
* Flag to indicate whether the entered password is valid
|
|
81
|
+
*/
|
|
51
82
|
isValidPassword: boolean;
|
|
83
|
+
/**
|
|
84
|
+
* Flag to indicate whether the entered phone is valid
|
|
85
|
+
*/
|
|
86
|
+
isValidUserPhone: boolean;
|
|
87
|
+
/**
|
|
88
|
+
* Toggles visibility of the password field
|
|
89
|
+
*/
|
|
52
90
|
isPasswordVisible: boolean;
|
|
91
|
+
/**
|
|
92
|
+
* Internal flag to prevent duplicate client styling appends
|
|
93
|
+
*/
|
|
53
94
|
private limitStylingAppends;
|
|
95
|
+
/**
|
|
96
|
+
* Stores error message from the API
|
|
97
|
+
*/
|
|
54
98
|
private errorMessage;
|
|
99
|
+
/**
|
|
100
|
+
* Indicates whether an error has occurred
|
|
101
|
+
*/
|
|
55
102
|
private hasError;
|
|
103
|
+
/**
|
|
104
|
+
* User prefix options for phone number login
|
|
105
|
+
*/
|
|
106
|
+
userPrefixOptions: Array<Record<string, string>>;
|
|
56
107
|
private errorCode;
|
|
57
108
|
private stylingContainer;
|
|
58
109
|
updateLoginCredentialsEvent: CustomEvent;
|
|
110
|
+
/**
|
|
111
|
+
* Watch for changes in the translation URL and fetch new translations
|
|
112
|
+
*/
|
|
59
113
|
handleNewTranslations(): void;
|
|
114
|
+
/**
|
|
115
|
+
* Watch for changes in the client styling and apply the new styling
|
|
116
|
+
*
|
|
117
|
+
* @param newValue - new client styling
|
|
118
|
+
* @param oldValue - previous client styling
|
|
119
|
+
*/
|
|
120
|
+
handleStylingChange(newValue: string, oldValue: string): void;
|
|
121
|
+
/**
|
|
122
|
+
* Watch for changes in the client styling URL and fetch the new CSS
|
|
123
|
+
*
|
|
124
|
+
* @param newValue - new client styling URL
|
|
125
|
+
* @param oldValue - previous client styling URL
|
|
126
|
+
*/
|
|
127
|
+
handleStylingUrlChange(newValue: string, oldValue: string): void;
|
|
128
|
+
/**
|
|
129
|
+
* Lifecycle method: Fetch translations on component load
|
|
130
|
+
*/
|
|
60
131
|
componentWillLoad(): Promise<void>;
|
|
132
|
+
/**
|
|
133
|
+
* Lifecycle method: Set up event listeners after the component is rendered
|
|
134
|
+
*/
|
|
61
135
|
componentDidLoad(): void;
|
|
136
|
+
/**
|
|
137
|
+
* Lifecycle method: Apply client styling after the component renders
|
|
138
|
+
*/
|
|
62
139
|
componentDidRender(): void;
|
|
140
|
+
/**
|
|
141
|
+
* Lifecycle method: Clean up event listeners when the component is removed
|
|
142
|
+
*/
|
|
63
143
|
disconnectedCallback(): void;
|
|
144
|
+
/**
|
|
145
|
+
* Apply inline client styling
|
|
146
|
+
*/
|
|
64
147
|
setClientStyling: () => void;
|
|
148
|
+
/**
|
|
149
|
+
* Fetch and apply CSS from a provided URL
|
|
150
|
+
*/
|
|
65
151
|
setClientStylingURL: () => void;
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
152
|
+
/**
|
|
153
|
+
* Fetch phone prefixes from the API
|
|
154
|
+
*/
|
|
155
|
+
getPhonePrefixes: () => Promise<void>;
|
|
156
|
+
/**
|
|
157
|
+
* Handle autofilling of credentials from a dispatched event
|
|
158
|
+
*/
|
|
159
|
+
autofillCredentialsHandler: (e: CustomEvent) => void;
|
|
160
|
+
/**
|
|
161
|
+
* Login API call for Gm 1.7
|
|
162
|
+
*/
|
|
163
|
+
userLoginGm17: () => Promise<void>;
|
|
164
|
+
/**
|
|
165
|
+
* Function to send legislation login request
|
|
166
|
+
*/
|
|
167
|
+
sendLegislationLogin: (token: string) => Promise<void>;
|
|
168
|
+
/**
|
|
169
|
+
* Login API call
|
|
170
|
+
*/
|
|
171
|
+
userLogin: () => Promise<any>;
|
|
172
|
+
/**
|
|
173
|
+
* Send error notification as a post message
|
|
174
|
+
*/
|
|
71
175
|
sendErrorNotification(errorMessage: any): void;
|
|
176
|
+
/**
|
|
177
|
+
* Debounce function to limit API calls
|
|
178
|
+
*/
|
|
72
179
|
debounce(func: any, delay: any): (...args: any[]) => void;
|
|
73
|
-
|
|
180
|
+
/**
|
|
181
|
+
* Trigger login process
|
|
182
|
+
*/
|
|
74
183
|
handleLogin: () => void;
|
|
184
|
+
/**
|
|
185
|
+
* Dispatch event to notify about login credential updates
|
|
186
|
+
*/
|
|
75
187
|
dispatchUpdateLoginCredentialsEvent(): void;
|
|
188
|
+
/**
|
|
189
|
+
* Handle input changes for username/email and password
|
|
190
|
+
*
|
|
191
|
+
* @param event - input event
|
|
192
|
+
* @param location - 'user' | 'phone' | 'password'
|
|
193
|
+
*/
|
|
76
194
|
handleInputChange: (event: Event, location: string) => void;
|
|
77
|
-
|
|
78
|
-
|
|
195
|
+
handleInputChangePartial: (location: string) => (e: Event) => void;
|
|
196
|
+
/**
|
|
197
|
+
* Validate input based on the specific regex
|
|
198
|
+
*
|
|
199
|
+
* @param useRuleFor - 'user' | 'phone' | 'password'
|
|
200
|
+
* @param input - input value to validate
|
|
201
|
+
*/
|
|
202
|
+
validate: (useRuleFor: "user" | "phone" | "password", input: string) => boolean;
|
|
203
|
+
/**
|
|
204
|
+
* Toggle password
|
|
205
|
+
*/
|
|
79
206
|
togglePassword: () => void;
|
|
207
|
+
/**
|
|
208
|
+
* Reset password
|
|
209
|
+
*/
|
|
80
210
|
resetPassword: () => void;
|
|
211
|
+
/**
|
|
212
|
+
* Render function
|
|
213
|
+
*/
|
|
81
214
|
render(): any;
|
|
82
215
|
}
|
|
@@ -8,45 +8,61 @@ import { HTMLStencilElement, JSXBase } from "./stencil-public-runtime";
|
|
|
8
8
|
export namespace Components {
|
|
9
9
|
interface UserLogin {
|
|
10
10
|
/**
|
|
11
|
-
*
|
|
11
|
+
* Inline CSS styling provided by the client
|
|
12
12
|
*/
|
|
13
13
|
"clientStyling": string;
|
|
14
14
|
/**
|
|
15
|
-
*
|
|
15
|
+
* URL to load additional CSS styling
|
|
16
16
|
*/
|
|
17
17
|
"clientStylingUrl": string;
|
|
18
18
|
/**
|
|
19
|
-
*
|
|
19
|
+
* API endpoint URL for login requests
|
|
20
20
|
*/
|
|
21
21
|
"endpoint": string;
|
|
22
22
|
/**
|
|
23
|
-
* Language
|
|
23
|
+
* Language code for translations (default is 'en')
|
|
24
24
|
*/
|
|
25
25
|
"lang": string;
|
|
26
26
|
/**
|
|
27
|
-
*
|
|
27
|
+
* If set to true, login will be done by phone number, else by username/email
|
|
28
|
+
*/
|
|
29
|
+
"loginByPhoneNumber": string;
|
|
30
|
+
/**
|
|
31
|
+
* Regular expression for validating the password
|
|
28
32
|
*/
|
|
29
33
|
"passwordRegex": string;
|
|
30
34
|
/**
|
|
31
|
-
*
|
|
35
|
+
* Regex options for password validation
|
|
32
36
|
*/
|
|
33
37
|
"passwordRegexOptions": string;
|
|
34
38
|
/**
|
|
35
|
-
*
|
|
39
|
+
* Flag indicating whether the password reset feature is enabled
|
|
36
40
|
*/
|
|
37
41
|
"passwordReset": string;
|
|
38
42
|
/**
|
|
39
|
-
*
|
|
43
|
+
* URL for fetching translations
|
|
40
44
|
*/
|
|
41
45
|
"translationUrl": string;
|
|
42
46
|
/**
|
|
43
|
-
*
|
|
47
|
+
* Regular expression for validating the user email
|
|
44
48
|
*/
|
|
45
49
|
"userEmailRegex": string;
|
|
46
50
|
/**
|
|
47
|
-
*
|
|
51
|
+
* Regex options for user email validation
|
|
48
52
|
*/
|
|
49
53
|
"userEmailRegexOptions": string;
|
|
54
|
+
/**
|
|
55
|
+
* User phone regex
|
|
56
|
+
*/
|
|
57
|
+
"userPhoneRegex": string;
|
|
58
|
+
/**
|
|
59
|
+
* User phone regex options
|
|
60
|
+
*/
|
|
61
|
+
"userPhoneRegexOptions": string;
|
|
62
|
+
/**
|
|
63
|
+
* Flag to determine if the component uses version 2 of the API
|
|
64
|
+
*/
|
|
65
|
+
"version": string;
|
|
50
66
|
}
|
|
51
67
|
}
|
|
52
68
|
declare global {
|
|
@@ -63,45 +79,61 @@ declare global {
|
|
|
63
79
|
declare namespace LocalJSX {
|
|
64
80
|
interface UserLogin {
|
|
65
81
|
/**
|
|
66
|
-
*
|
|
82
|
+
* Inline CSS styling provided by the client
|
|
67
83
|
*/
|
|
68
84
|
"clientStyling"?: string;
|
|
69
85
|
/**
|
|
70
|
-
*
|
|
86
|
+
* URL to load additional CSS styling
|
|
71
87
|
*/
|
|
72
88
|
"clientStylingUrl"?: string;
|
|
73
89
|
/**
|
|
74
|
-
*
|
|
90
|
+
* API endpoint URL for login requests
|
|
75
91
|
*/
|
|
76
92
|
"endpoint"?: string;
|
|
77
93
|
/**
|
|
78
|
-
* Language
|
|
94
|
+
* Language code for translations (default is 'en')
|
|
79
95
|
*/
|
|
80
96
|
"lang"?: string;
|
|
81
97
|
/**
|
|
82
|
-
*
|
|
98
|
+
* If set to true, login will be done by phone number, else by username/email
|
|
99
|
+
*/
|
|
100
|
+
"loginByPhoneNumber"?: string;
|
|
101
|
+
/**
|
|
102
|
+
* Regular expression for validating the password
|
|
83
103
|
*/
|
|
84
104
|
"passwordRegex"?: string;
|
|
85
105
|
/**
|
|
86
|
-
*
|
|
106
|
+
* Regex options for password validation
|
|
87
107
|
*/
|
|
88
108
|
"passwordRegexOptions"?: string;
|
|
89
109
|
/**
|
|
90
|
-
*
|
|
110
|
+
* Flag indicating whether the password reset feature is enabled
|
|
91
111
|
*/
|
|
92
112
|
"passwordReset"?: string;
|
|
93
113
|
/**
|
|
94
|
-
*
|
|
114
|
+
* URL for fetching translations
|
|
95
115
|
*/
|
|
96
116
|
"translationUrl"?: string;
|
|
97
117
|
/**
|
|
98
|
-
*
|
|
118
|
+
* Regular expression for validating the user email
|
|
99
119
|
*/
|
|
100
120
|
"userEmailRegex"?: string;
|
|
101
121
|
/**
|
|
102
|
-
*
|
|
122
|
+
* Regex options for user email validation
|
|
103
123
|
*/
|
|
104
124
|
"userEmailRegexOptions"?: string;
|
|
125
|
+
/**
|
|
126
|
+
* User phone regex
|
|
127
|
+
*/
|
|
128
|
+
"userPhoneRegex"?: string;
|
|
129
|
+
/**
|
|
130
|
+
* User phone regex options
|
|
131
|
+
*/
|
|
132
|
+
"userPhoneRegexOptions"?: string;
|
|
133
|
+
/**
|
|
134
|
+
* Flag to determine if the component uses version 2 of the API
|
|
135
|
+
*/
|
|
136
|
+
"version"?: string;
|
|
105
137
|
}
|
|
106
138
|
interface IntrinsicElements {
|
|
107
139
|
"user-login": UserLogin;
|