@everymatrix/pam-forgot-password 1.65.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/app-globals-3a1e7e63.js +5 -0
- package/dist/cjs/checkbox-group-input_14.cjs.entry.js +12780 -0
- package/dist/cjs/index-92e25484.js +1322 -0
- package/dist/cjs/index.cjs.js +10 -0
- package/dist/cjs/loader.cjs.js +15 -0
- package/dist/cjs/pam-forgot-password-71bc2709.js +603 -0
- package/dist/cjs/pam-forgot-password.cjs.js +25 -0
- package/dist/collection/collection-manifest.json +36 -0
- package/dist/collection/components/pam-forgot-password/index.js +1 -0
- package/dist/collection/components/pam-forgot-password/pam-forgot-password.css +152 -0
- package/dist/collection/components/pam-forgot-password/pam-forgot-password.js +461 -0
- package/dist/collection/components/pam-forgot-password/pam-forgot-password.stories.js +42 -0
- package/dist/collection/index.js +1 -0
- package/dist/collection/utils/locale.utils.js +210 -0
- package/dist/collection/utils/types.js +1 -0
- package/dist/collection/utils/utils.js +20 -0
- package/dist/esm/app-globals-0f993ce5.js +3 -0
- package/dist/esm/checkbox-group-input_14.entry.js +12763 -0
- package/dist/esm/index-6f00d158.js +1293 -0
- package/dist/esm/index.js +2 -0
- package/dist/esm/loader.js +11 -0
- package/dist/esm/pam-forgot-password-0f76562c.js +601 -0
- package/dist/esm/pam-forgot-password.js +20 -0
- package/dist/index.cjs.js +1 -0
- package/dist/index.js +1 -0
- package/dist/pam-forgot-password/index.esm.js +1 -0
- package/dist/pam-forgot-password/p-587a67ef.entry.js +5614 -0
- package/dist/pam-forgot-password/p-e1255160.js +1 -0
- package/dist/pam-forgot-password/p-f10ac9f7.js +1 -0
- package/dist/pam-forgot-password/p-f5cf4939.js +2 -0
- package/dist/pam-forgot-password/pam-forgot-password.esm.js +1 -0
- package/dist/stencil.config.dev.js +17 -0
- package/dist/stencil.config.js +18 -0
- package/dist/storybook/main.js +47 -0
- package/dist/storybook/preview.js +9 -0
- package/dist/types/Users/adrian.pripon/Documents/Work/widgets-monorepo/packages/stencil/pam-forgot-password/.stencil/libs/common/src/storybook/storybook-utils.d.ts +39 -0
- package/dist/types/Users/adrian.pripon/Documents/Work/widgets-monorepo/packages/stencil/pam-forgot-password/.stencil/packages/stencil/pam-forgot-password/stencil.config.d.ts +2 -0
- package/dist/types/Users/adrian.pripon/Documents/Work/widgets-monorepo/packages/stencil/pam-forgot-password/.stencil/packages/stencil/pam-forgot-password/stencil.config.dev.d.ts +2 -0
- package/dist/types/Users/adrian.pripon/Documents/Work/widgets-monorepo/packages/stencil/pam-forgot-password/.stencil/packages/stencil/pam-forgot-password/storybook/main.d.ts +3 -0
- package/dist/types/Users/adrian.pripon/Documents/Work/widgets-monorepo/packages/stencil/pam-forgot-password/.stencil/packages/stencil/pam-forgot-password/storybook/preview.d.ts +70 -0
- package/dist/types/Users/adrian.pripon/Documents/Work/widgets-monorepo/packages/stencil/pam-forgot-password/.stencil/tools/plugins/index.d.ts +3 -0
- package/dist/types/Users/adrian.pripon/Documents/Work/widgets-monorepo/packages/stencil/pam-forgot-password/.stencil/tools/plugins/stencil-clean-deps-plugin.d.ts +5 -0
- package/dist/types/Users/adrian.pripon/Documents/Work/widgets-monorepo/packages/stencil/pam-forgot-password/.stencil/tools/plugins/vite-chunk-plugin.d.ts +6 -0
- package/dist/types/Users/adrian.pripon/Documents/Work/widgets-monorepo/packages/stencil/pam-forgot-password/.stencil/tools/plugins/vite-clean-deps-plugin.d.ts +4 -0
- package/dist/types/components/pam-forgot-password/index.d.ts +1 -0
- package/dist/types/components/pam-forgot-password/pam-forgot-password.d.ts +144 -0
- package/dist/types/components/pam-forgot-password/pam-forgot-password.stories.d.ts +5 -0
- package/dist/types/components.d.ts +79 -0
- package/dist/types/index.d.ts +1 -0
- package/dist/types/stencil-public-runtime.d.ts +1674 -0
- package/dist/types/utils/locale.utils.d.ts +2 -0
- package/dist/types/utils/types.d.ts +45 -0
- package/dist/types/utils/utils.d.ts +2 -0
- package/loader/cdn.js +1 -0
- package/loader/index.cjs.js +1 -0
- package/loader/index.d.ts +24 -0
- package/loader/index.es2017.js +1 -0
- package/loader/index.js +2 -0
- package/loader/package.json +11 -0
- package/package.json +26 -0
|
@@ -0,0 +1,461 @@
|
|
|
1
|
+
import { h } from "@stencil/core";
|
|
2
|
+
import { getTranslations, translate } from "../../utils/locale.utils";
|
|
3
|
+
import { checkDeviceType } from "../../utils/utils";
|
|
4
|
+
import { setClientStyling, setClientStylingURL, setStreamStyling } from "../../../../../../../../libs/common/src/styling/index";
|
|
5
|
+
import "../../../../../general-input/dist/types/index";
|
|
6
|
+
import "../../../../../ui-skeleton/dist/types/index";
|
|
7
|
+
export class PamForgotPassword {
|
|
8
|
+
constructor() {
|
|
9
|
+
this.isContactValid = false;
|
|
10
|
+
this.validation = { mandatory: true, custom: [] };
|
|
11
|
+
/**
|
|
12
|
+
* Handles the submission of the forgot password request.
|
|
13
|
+
*
|
|
14
|
+
* @param e - The event object from the form submission.
|
|
15
|
+
*/
|
|
16
|
+
this.submitRequest = (e) => {
|
|
17
|
+
e.preventDefault();
|
|
18
|
+
// Construct the request URL
|
|
19
|
+
const url = new URL('/api/v1/players/password-management/password/forgot/request', this.endpoint);
|
|
20
|
+
// Set up request headers
|
|
21
|
+
const headers = new Headers();
|
|
22
|
+
if (this.captchaData.isEnabled && this.captchaData.token) {
|
|
23
|
+
headers.append('X-Captcha-Response', this.captchaData.token);
|
|
24
|
+
}
|
|
25
|
+
headers.append('Content-Type', 'application/json');
|
|
26
|
+
// Create the request body
|
|
27
|
+
const requestBody = JSON.stringify({ contact: this.contact });
|
|
28
|
+
// Define request parameters
|
|
29
|
+
const requestParams = {
|
|
30
|
+
method: 'POST',
|
|
31
|
+
headers: headers,
|
|
32
|
+
body: requestBody,
|
|
33
|
+
};
|
|
34
|
+
// Send the request
|
|
35
|
+
fetch(url.href, requestParams)
|
|
36
|
+
.then((response) => response.json())
|
|
37
|
+
.then((data) => {
|
|
38
|
+
if (!data.errorCode) {
|
|
39
|
+
// Success: Notify the parent window
|
|
40
|
+
window.postMessage({ type: 'ForgotPasswordSuccess' });
|
|
41
|
+
window.postMessage({ type: 'WidgetNotification', data: { type: 'success', message: translate('successMsg', this.language) } }, window.location.href);
|
|
42
|
+
}
|
|
43
|
+
else {
|
|
44
|
+
// API responded with an error
|
|
45
|
+
this.sendErrorNotification(translate('submitError', this.language));
|
|
46
|
+
}
|
|
47
|
+
})
|
|
48
|
+
.catch(() => {
|
|
49
|
+
// Network or server error
|
|
50
|
+
this.sendErrorNotification(translate('submitError', this.language));
|
|
51
|
+
});
|
|
52
|
+
};
|
|
53
|
+
/**
|
|
54
|
+
* Toggles the player account menu visibility.
|
|
55
|
+
*
|
|
56
|
+
* Sends a post message to notify that the player account menu has been activated.
|
|
57
|
+
*/
|
|
58
|
+
this.toggleScreen = () => {
|
|
59
|
+
window.postMessage({ type: 'PlayerAccountMenuActive', isMobile: this.isMobile }, window.location.href);
|
|
60
|
+
};
|
|
61
|
+
this.endpoint = undefined;
|
|
62
|
+
this.language = undefined;
|
|
63
|
+
this.clientStyling = undefined;
|
|
64
|
+
this.clientStylingUrl = undefined;
|
|
65
|
+
this.mbSource = undefined;
|
|
66
|
+
this.translationUrl = undefined;
|
|
67
|
+
this.contactType = '';
|
|
68
|
+
this.isBtnSubmitEnabled = false;
|
|
69
|
+
this.skeletonLoading = true;
|
|
70
|
+
this.hasError = false;
|
|
71
|
+
this.isMobile = checkDeviceType() === 'mobile' || checkDeviceType() === 'tablet';
|
|
72
|
+
this.captchaData = {
|
|
73
|
+
isEnabled: true,
|
|
74
|
+
token: '',
|
|
75
|
+
provider: '',
|
|
76
|
+
siteKey: ''
|
|
77
|
+
};
|
|
78
|
+
this.errorMessage = '';
|
|
79
|
+
}
|
|
80
|
+
/**
|
|
81
|
+
* Checks for input validity and set the flags accordingly.
|
|
82
|
+
*/
|
|
83
|
+
sendValidityStateHandler(e) {
|
|
84
|
+
if (e.detail.name === 'contact') {
|
|
85
|
+
this.isContactValid = e.detail.valid;
|
|
86
|
+
return;
|
|
87
|
+
}
|
|
88
|
+
}
|
|
89
|
+
/**
|
|
90
|
+
* Handles the 'sendInputValue' event to update component state based on the input field name.
|
|
91
|
+
*
|
|
92
|
+
* This function listens for a custom event that carries input values and updates corresponding properties:
|
|
93
|
+
* - Updates `contactType` if the input name is 'dropdown'.
|
|
94
|
+
* - Parses and assigns `contact` if the input name is 'contact' (handles phone numbers separately).
|
|
95
|
+
*
|
|
96
|
+
* Also determines whether the submit button should be enabled based on the validity of the inputs.
|
|
97
|
+
*
|
|
98
|
+
* @param {CustomEvent<InputValueEvent>} e - The custom event containing input details.
|
|
99
|
+
*/
|
|
100
|
+
sendInputValueHandler(e) {
|
|
101
|
+
switch (e.detail.name) {
|
|
102
|
+
case 'dropdown':
|
|
103
|
+
this.contactType = e.detail.value.toLowerCase();
|
|
104
|
+
break;
|
|
105
|
+
case 'contact':
|
|
106
|
+
this.contact = e.detail.value;
|
|
107
|
+
break;
|
|
108
|
+
}
|
|
109
|
+
this.updateSubmitButtonState();
|
|
110
|
+
}
|
|
111
|
+
/**
|
|
112
|
+
* Updates the state of the submit button based on form validation rules.
|
|
113
|
+
*
|
|
114
|
+
* The button is enabled only if:
|
|
115
|
+
* - The contact (email) input is valid.
|
|
116
|
+
* - CAPTCHA is either disabled or has a valid token.
|
|
117
|
+
*/
|
|
118
|
+
updateSubmitButtonState() {
|
|
119
|
+
this.isBtnSubmitEnabled = this.isContactValid &&
|
|
120
|
+
!!this.contact &&
|
|
121
|
+
(!this.captchaData.isEnabled || !!this.captchaData.token);
|
|
122
|
+
}
|
|
123
|
+
/**
|
|
124
|
+
* Watch for changes in the client styling and apply the new styling
|
|
125
|
+
*
|
|
126
|
+
* @param newValue - new client styling
|
|
127
|
+
* @param oldValue - previous client styling
|
|
128
|
+
*/
|
|
129
|
+
handleClientStylingChange(newValue, oldValue) {
|
|
130
|
+
if (newValue != oldValue) {
|
|
131
|
+
setClientStyling(this.stylingContainer, this.clientStyling);
|
|
132
|
+
}
|
|
133
|
+
}
|
|
134
|
+
/**
|
|
135
|
+
* Watch for changes in the client styling URL and fetch the new CSS
|
|
136
|
+
*
|
|
137
|
+
* @param newValue - new client styling URL
|
|
138
|
+
* @param oldValue - previous client styling URL
|
|
139
|
+
*/
|
|
140
|
+
handleClientStylingUrlChange(newValue, oldValue) {
|
|
141
|
+
if (newValue != oldValue) {
|
|
142
|
+
if (this.clientStylingUrl)
|
|
143
|
+
setClientStylingURL(this.stylingContainer, this.clientStylingUrl);
|
|
144
|
+
}
|
|
145
|
+
}
|
|
146
|
+
/**
|
|
147
|
+
* Send error notification as a post message
|
|
148
|
+
*/
|
|
149
|
+
sendErrorNotification(errorMessage) {
|
|
150
|
+
window.postMessage({ type: "HasError", error: errorMessage }, window.location.href);
|
|
151
|
+
window.postMessage({
|
|
152
|
+
type: 'WidgetNotification', data: {
|
|
153
|
+
type: 'error',
|
|
154
|
+
message: errorMessage
|
|
155
|
+
}
|
|
156
|
+
}, window.location.href);
|
|
157
|
+
}
|
|
158
|
+
/**
|
|
159
|
+
* Get the translations and get the configuration.
|
|
160
|
+
*
|
|
161
|
+
* Called once just after the component is first connected to the DOM.
|
|
162
|
+
*/
|
|
163
|
+
async componentWillLoad() {
|
|
164
|
+
// Get translations
|
|
165
|
+
if (this.translationUrl) {
|
|
166
|
+
await getTranslations(this.translationUrl);
|
|
167
|
+
}
|
|
168
|
+
// Get widget config
|
|
169
|
+
this.getConfig().then(() => {
|
|
170
|
+
this.appendCaptchaScript();
|
|
171
|
+
}).catch((error) => {
|
|
172
|
+
console.error(error);
|
|
173
|
+
this.hasError = true;
|
|
174
|
+
this.errorMessage = translate('configError', this.language);
|
|
175
|
+
this.sendErrorNotification(this.errorMessage);
|
|
176
|
+
}).finally(() => {
|
|
177
|
+
this.skeletonLoading = false;
|
|
178
|
+
});
|
|
179
|
+
}
|
|
180
|
+
/**
|
|
181
|
+
* Set the styling for the widget once it's loaded.
|
|
182
|
+
*
|
|
183
|
+
* Called once just after the component is fully loaded and the first render() occurs.
|
|
184
|
+
*/
|
|
185
|
+
componentDidLoad() {
|
|
186
|
+
if (this.stylingContainer) {
|
|
187
|
+
if (window.emMessageBus != undefined) {
|
|
188
|
+
setStreamStyling(this.stylingContainer, `${this.mbSource}.Style`, this.stylingSubscription);
|
|
189
|
+
}
|
|
190
|
+
else {
|
|
191
|
+
if (this.clientStyling)
|
|
192
|
+
setClientStyling(this.stylingContainer, this.clientStyling);
|
|
193
|
+
if (this.clientStylingUrl)
|
|
194
|
+
setClientStylingURL(this.stylingContainer, this.clientStylingUrl);
|
|
195
|
+
}
|
|
196
|
+
}
|
|
197
|
+
}
|
|
198
|
+
/**
|
|
199
|
+
* Fetches the forgot password configuration from the backend API.
|
|
200
|
+
*
|
|
201
|
+
* @returns A Promise that resolves once the configuration is fetched and set.
|
|
202
|
+
*/
|
|
203
|
+
getConfig() {
|
|
204
|
+
const url = new URL('/api/v1/players/password-management/password/forgot/config', this.endpoint);
|
|
205
|
+
return new Promise((resolve, reject) => {
|
|
206
|
+
fetch(url.href)
|
|
207
|
+
.then((res) => {
|
|
208
|
+
if (!res.ok) {
|
|
209
|
+
throw new Error(`HTTP error! Status: ${res.status}`);
|
|
210
|
+
}
|
|
211
|
+
return res.json();
|
|
212
|
+
})
|
|
213
|
+
.then((res) => {
|
|
214
|
+
const { captcha } = res;
|
|
215
|
+
if (captcha && typeof captcha.provider === 'string') {
|
|
216
|
+
captcha.provider = captcha.provider.toLowerCase();
|
|
217
|
+
}
|
|
218
|
+
this.captchaData = Object.assign({}, captcha);
|
|
219
|
+
resolve();
|
|
220
|
+
})
|
|
221
|
+
.catch((error) => {
|
|
222
|
+
console.error('Error fetching login configuration:', error);
|
|
223
|
+
reject(error);
|
|
224
|
+
});
|
|
225
|
+
});
|
|
226
|
+
}
|
|
227
|
+
/**
|
|
228
|
+
* Dynamically loads the captcha script and renders it when ready.
|
|
229
|
+
*
|
|
230
|
+
* @param src - The URL of the CAPTCHA script to load.
|
|
231
|
+
* @param captcha - The CAPTCHA configuration.
|
|
232
|
+
*/
|
|
233
|
+
appendCaptchaScript() {
|
|
234
|
+
const { isEnabled, provider } = this.captchaData;
|
|
235
|
+
if (!isEnabled) {
|
|
236
|
+
return;
|
|
237
|
+
}
|
|
238
|
+
const script = document.createElement('script');
|
|
239
|
+
if (provider === 'cloudflare') {
|
|
240
|
+
script.src = 'https://challenges.cloudflare.com/turnstile/v0/api.js';
|
|
241
|
+
}
|
|
242
|
+
else if (provider === 'google') {
|
|
243
|
+
script.src = 'https://www.google.com/recaptcha/api.js';
|
|
244
|
+
}
|
|
245
|
+
script.onload = this.handleCaptcha.bind(this);
|
|
246
|
+
document.head.appendChild(script);
|
|
247
|
+
}
|
|
248
|
+
/**
|
|
249
|
+
* Handles the integration of CAPTCHA based on the login configuration.
|
|
250
|
+
* Dynamically injects the necessary CAPTCHA script if enabled.
|
|
251
|
+
*/
|
|
252
|
+
handleCaptcha() {
|
|
253
|
+
const { isEnabled, provider, siteKey } = this.captchaData;
|
|
254
|
+
if (!isEnabled) {
|
|
255
|
+
return;
|
|
256
|
+
}
|
|
257
|
+
if (!['cloudflare', 'google'].includes(provider)) {
|
|
258
|
+
return;
|
|
259
|
+
}
|
|
260
|
+
if (provider === 'cloudflare') {
|
|
261
|
+
window.turnstile.render('#turnstileContainer', {
|
|
262
|
+
sitekey: siteKey,
|
|
263
|
+
theme: 'light',
|
|
264
|
+
callback: this.captchaCallback.bind(this),
|
|
265
|
+
});
|
|
266
|
+
}
|
|
267
|
+
else if (provider === 'google') {
|
|
268
|
+
window.grecaptcha.ready(() => {
|
|
269
|
+
window.grecaptcha.render('googleContainer', {
|
|
270
|
+
sitekey: siteKey,
|
|
271
|
+
callback: this.captchaCallback.bind(this),
|
|
272
|
+
theme: 'light'
|
|
273
|
+
});
|
|
274
|
+
});
|
|
275
|
+
}
|
|
276
|
+
}
|
|
277
|
+
/**
|
|
278
|
+
* Common callback function for CAPTCHA response handling.
|
|
279
|
+
* @param token CAPTCHA response token.
|
|
280
|
+
*/
|
|
281
|
+
captchaCallback(token) {
|
|
282
|
+
this.captchaData.token = token;
|
|
283
|
+
this.captchaData = Object.assign({}, this.captchaData); // Needed to tell Stencil something was changed
|
|
284
|
+
this.updateSubmitButtonState();
|
|
285
|
+
}
|
|
286
|
+
/**
|
|
287
|
+
* Lifecycle method: Clean up event listeners for styling.
|
|
288
|
+
* Called every time the component is disconnected from the DOM
|
|
289
|
+
*/
|
|
290
|
+
disconnectedCallback() {
|
|
291
|
+
this.stylingSubscription && this.stylingSubscription.unsubscribe();
|
|
292
|
+
}
|
|
293
|
+
/**
|
|
294
|
+
* The render function.
|
|
295
|
+
*/
|
|
296
|
+
render() {
|
|
297
|
+
if (this.skeletonLoading) {
|
|
298
|
+
return h("div", { class: "PlayerForgotPassword skeleton" }, h("form", { class: "Form" }, h("div", { class: "ButtonReturn" }, h("ui-skeleton", { structure: "text", width: "auto", height: "30px" })), h("section", { class: "FieldsSection" }, h("div", { class: "FieldContainer" }, h("div", { class: "FieldTitle" }, h("ui-skeleton", { structure: "title", width: "auto", height: "10px" })), h("ui-skeleton", { structure: "rectangle", width: "auto", height: "35px" }))), h("section", { class: "ButtonsSection" }, h("div", { class: "Button" }, h("ui-skeleton", { structure: "rectangle", width: "auto", height: "50px" })))));
|
|
299
|
+
}
|
|
300
|
+
if (this.hasError) {
|
|
301
|
+
return h("div", { class: "PlayerForgotPassword", ref: el => this.stylingContainer = el }, h("h4", { class: "Error" }, translate('configError', this.language)));
|
|
302
|
+
}
|
|
303
|
+
return h("div", { class: "PlayerForgotPassword", ref: el => this.stylingContainer = el }, h("form", { action: ".", class: "Form" }, h("div", { class: "ButtonReturn", onClick: this.toggleScreen }, h("svg", { xmlns: "http://www.w3.org/2000/svg", width: "15", height: "15", viewBox: "0 0 15 15" }, h("g", { transform: "translate(-20 -158)" }, h("g", { transform: "translate(20 158)" }, h("path", { class: "aaa", d: "M7.5,0,6.136,1.364,11.3,6.526H0V8.474H11.3L6.136,13.636,7.5,15,15,7.5Z", transform: "translate(15 15) rotate(180)" })))), h("h2", { class: "TitleMobile" }, translate('title', this.language))), h("h2", { class: "Title" }, translate('title', this.language)), h("section", { class: "FieldsSection" }, h("div", { class: `ContactWrapper${this.isMobile ? 'Mobile' : ''}` }, h("general-input", { class: "Contact", language: this.language, "client-styling": this.clientStyling, "mb-source": this.mbSource, type: "email", name: "contact", displayName: translate('emailDisplayName'), emitValue: true, validation: this.validation, placeholder: translate('emailPlaceholder') })), this.captchaData.isEnabled && this.captchaData.provider === 'cloudflare' &&
|
|
304
|
+
h("slot", { name: "turnstile" }), this.captchaData.isEnabled && this.captchaData.provider === 'google' &&
|
|
305
|
+
h("slot", { name: "google" })), h("section", { class: "ButtonsWrapper" }, h("button", { class: "Button", disabled: !this.isBtnSubmitEnabled, onClick: this.submitRequest }, translate('btnSubmit', this.language)))));
|
|
306
|
+
}
|
|
307
|
+
;
|
|
308
|
+
static get is() { return "pam-forgot-password"; }
|
|
309
|
+
static get encapsulation() { return "shadow"; }
|
|
310
|
+
static get originalStyleUrls() {
|
|
311
|
+
return {
|
|
312
|
+
"$": ["pam-forgot-password.scss"]
|
|
313
|
+
};
|
|
314
|
+
}
|
|
315
|
+
static get styleUrls() {
|
|
316
|
+
return {
|
|
317
|
+
"$": ["pam-forgot-password.css"]
|
|
318
|
+
};
|
|
319
|
+
}
|
|
320
|
+
static get properties() {
|
|
321
|
+
return {
|
|
322
|
+
"endpoint": {
|
|
323
|
+
"type": "string",
|
|
324
|
+
"mutable": false,
|
|
325
|
+
"complexType": {
|
|
326
|
+
"original": "string",
|
|
327
|
+
"resolved": "string",
|
|
328
|
+
"references": {}
|
|
329
|
+
},
|
|
330
|
+
"required": false,
|
|
331
|
+
"optional": false,
|
|
332
|
+
"docs": {
|
|
333
|
+
"tags": [],
|
|
334
|
+
"text": "endpoint"
|
|
335
|
+
},
|
|
336
|
+
"attribute": "endpoint",
|
|
337
|
+
"reflect": true
|
|
338
|
+
},
|
|
339
|
+
"language": {
|
|
340
|
+
"type": "string",
|
|
341
|
+
"mutable": false,
|
|
342
|
+
"complexType": {
|
|
343
|
+
"original": "string",
|
|
344
|
+
"resolved": "string",
|
|
345
|
+
"references": {}
|
|
346
|
+
},
|
|
347
|
+
"required": false,
|
|
348
|
+
"optional": false,
|
|
349
|
+
"docs": {
|
|
350
|
+
"tags": [],
|
|
351
|
+
"text": "language"
|
|
352
|
+
},
|
|
353
|
+
"attribute": "language",
|
|
354
|
+
"reflect": true
|
|
355
|
+
},
|
|
356
|
+
"clientStyling": {
|
|
357
|
+
"type": "string",
|
|
358
|
+
"mutable": false,
|
|
359
|
+
"complexType": {
|
|
360
|
+
"original": "string",
|
|
361
|
+
"resolved": "string",
|
|
362
|
+
"references": {}
|
|
363
|
+
},
|
|
364
|
+
"required": false,
|
|
365
|
+
"optional": false,
|
|
366
|
+
"docs": {
|
|
367
|
+
"tags": [],
|
|
368
|
+
"text": "clientStyling"
|
|
369
|
+
},
|
|
370
|
+
"attribute": "client-styling",
|
|
371
|
+
"reflect": true
|
|
372
|
+
},
|
|
373
|
+
"clientStylingUrl": {
|
|
374
|
+
"type": "string",
|
|
375
|
+
"mutable": false,
|
|
376
|
+
"complexType": {
|
|
377
|
+
"original": "string",
|
|
378
|
+
"resolved": "string",
|
|
379
|
+
"references": {}
|
|
380
|
+
},
|
|
381
|
+
"required": false,
|
|
382
|
+
"optional": false,
|
|
383
|
+
"docs": {
|
|
384
|
+
"tags": [],
|
|
385
|
+
"text": "clientStylingUrl"
|
|
386
|
+
},
|
|
387
|
+
"attribute": "client-styling-url",
|
|
388
|
+
"reflect": true
|
|
389
|
+
},
|
|
390
|
+
"mbSource": {
|
|
391
|
+
"type": "string",
|
|
392
|
+
"mutable": false,
|
|
393
|
+
"complexType": {
|
|
394
|
+
"original": "string",
|
|
395
|
+
"resolved": "string",
|
|
396
|
+
"references": {}
|
|
397
|
+
},
|
|
398
|
+
"required": false,
|
|
399
|
+
"optional": false,
|
|
400
|
+
"docs": {
|
|
401
|
+
"tags": [],
|
|
402
|
+
"text": ""
|
|
403
|
+
},
|
|
404
|
+
"attribute": "mb-source",
|
|
405
|
+
"reflect": false
|
|
406
|
+
},
|
|
407
|
+
"translationUrl": {
|
|
408
|
+
"type": "string",
|
|
409
|
+
"mutable": false,
|
|
410
|
+
"complexType": {
|
|
411
|
+
"original": "string",
|
|
412
|
+
"resolved": "string",
|
|
413
|
+
"references": {}
|
|
414
|
+
},
|
|
415
|
+
"required": false,
|
|
416
|
+
"optional": false,
|
|
417
|
+
"docs": {
|
|
418
|
+
"tags": [],
|
|
419
|
+
"text": "translationUrl"
|
|
420
|
+
},
|
|
421
|
+
"attribute": "translation-url",
|
|
422
|
+
"reflect": true
|
|
423
|
+
}
|
|
424
|
+
};
|
|
425
|
+
}
|
|
426
|
+
static get states() {
|
|
427
|
+
return {
|
|
428
|
+
"contactType": {},
|
|
429
|
+
"isBtnSubmitEnabled": {},
|
|
430
|
+
"skeletonLoading": {},
|
|
431
|
+
"hasError": {},
|
|
432
|
+
"isMobile": {},
|
|
433
|
+
"captchaData": {},
|
|
434
|
+
"errorMessage": {}
|
|
435
|
+
};
|
|
436
|
+
}
|
|
437
|
+
static get watchers() {
|
|
438
|
+
return [{
|
|
439
|
+
"propName": "clientStyling",
|
|
440
|
+
"methodName": "handleClientStylingChange"
|
|
441
|
+
}, {
|
|
442
|
+
"propName": "clientStylingUrl",
|
|
443
|
+
"methodName": "handleClientStylingUrlChange"
|
|
444
|
+
}];
|
|
445
|
+
}
|
|
446
|
+
static get listeners() {
|
|
447
|
+
return [{
|
|
448
|
+
"name": "sendValidityState",
|
|
449
|
+
"method": "sendValidityStateHandler",
|
|
450
|
+
"target": undefined,
|
|
451
|
+
"capture": false,
|
|
452
|
+
"passive": false
|
|
453
|
+
}, {
|
|
454
|
+
"name": "sendInputValue",
|
|
455
|
+
"method": "sendInputValueHandler",
|
|
456
|
+
"target": undefined,
|
|
457
|
+
"capture": false,
|
|
458
|
+
"passive": false
|
|
459
|
+
}];
|
|
460
|
+
}
|
|
461
|
+
}
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
import { html } from "lit";
|
|
2
|
+
import "@everymatrix/pam-forgot-password";
|
|
3
|
+
const meta = {
|
|
4
|
+
title: 'Player/Components/pam-forgot-password',
|
|
5
|
+
component: 'pam-forgot-password',
|
|
6
|
+
args: {
|
|
7
|
+
endpoint: "",
|
|
8
|
+
language: "",
|
|
9
|
+
clientStyling: "",
|
|
10
|
+
clientStylingUrl: "",
|
|
11
|
+
mbSource: "",
|
|
12
|
+
translationUrl: "",
|
|
13
|
+
},
|
|
14
|
+
argTypes: {
|
|
15
|
+
endpoint: { control: 'text', description: '' },
|
|
16
|
+
language: { control: 'text', description: '' },
|
|
17
|
+
clientStyling: { control: 'text', description: '' },
|
|
18
|
+
clientStylingUrl: { control: 'text', description: '' },
|
|
19
|
+
mbSource: { control: 'text', description: '' },
|
|
20
|
+
translationUrl: { control: 'text', description: '' },
|
|
21
|
+
},
|
|
22
|
+
};
|
|
23
|
+
export default meta;
|
|
24
|
+
const Template = (args) => {
|
|
25
|
+
return html `<pam-forgot-password
|
|
26
|
+
endpoint="${args.endpoint}"
|
|
27
|
+
language="${args.language}"
|
|
28
|
+
clientStyling="${args.clientStyling}"
|
|
29
|
+
clientStylingUrl="${args.clientStylingUrl}"
|
|
30
|
+
mbSource="${args.mbSource}"
|
|
31
|
+
translationUrl="${args.translationUrl}"
|
|
32
|
+
></pam-forgot-password>`;
|
|
33
|
+
};
|
|
34
|
+
export const Default = Template.bind({});
|
|
35
|
+
Default.args = {
|
|
36
|
+
endpoint: "",
|
|
37
|
+
language: "",
|
|
38
|
+
clientStyling: "",
|
|
39
|
+
clientStylingUrl: "",
|
|
40
|
+
mbSource: "",
|
|
41
|
+
translationUrl: "",
|
|
42
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './components/pam-forgot-password';
|