@everymatrix/user-login 1.55.0 → 1.56.2

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.
@@ -2,11 +2,11 @@
2
2
 
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
- const index = require('./index-ce110273.js');
5
+ const index = require('./index-2eb404c0.js');
6
6
  const appGlobals = require('./app-globals-3a1e7e63.js');
7
7
 
8
8
  /*
9
- Stencil Client Patch Browser v4.22.3 | MIT Licensed | https://stenciljs.com
9
+ Stencil Client Patch Browser v4.19.2 | MIT Licensed | https://stenciljs.com
10
10
  */
11
11
  var patchBrowser = () => {
12
12
  const importMeta = (typeof document === 'undefined' ? new (require('u' + 'rl').URL)('file:' + __filename).href : (document.currentScript && document.currentScript.src || new URL('user-login.cjs.js', document.baseURI).href));
@@ -19,7 +19,7 @@ var patchBrowser = () => {
19
19
 
20
20
  patchBrowser().then(async (options) => {
21
21
  await appGlobals.globalScripts();
22
- return index.bootstrapLazy([["user-login.cjs",[[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],"isLoginLoading":[32]},null,{"translationUrl":["handleNewTranslations"],"clientStyling":["handleStylingChange"],"clientStylingUrl":["handleStylingUrlChange"]}]]]], options);
22
+ return index.bootstrapLazy([["user-login.cjs",[[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"],"mbSource":[513,"mb-source"],"userNameEmail":[32],"userPassword":[32],"isValidUserEmail":[32],"userPhone":[32],"userPrefix":[32],"isValidPassword":[32],"isValidUserPhone":[32],"isPasswordVisible":[32],"errorMessage":[32],"hasError":[32],"userPrefixOptions":[32],"isLoginLoading":[32]},null,{"translationUrl":["handleNewTranslations"],"clientStyling":["handleClientStylingChange"],"clientStylingUrl":["handleClientStylingUrlChange"]}]]]], options);
23
23
  });
24
24
 
25
25
  exports.setNonce = index.setNonce;
@@ -4,8 +4,8 @@
4
4
  ],
5
5
  "compiler": {
6
6
  "name": "@stencil/core",
7
- "version": "4.22.3",
8
- "typescriptVersion": "5.5.4"
7
+ "version": "4.19.2",
8
+ "typescriptVersion": "5.4.5"
9
9
  },
10
10
  "collections": [],
11
11
  "bundles": []
@@ -1,30 +1,10 @@
1
1
  import { h } from "@stencil/core";
2
2
  import { getTranslations, translate } from "../../utils/locale.utils";
3
+ import { setClientStyling, setClientStylingURL, setStreamStyling } from "../../../../../../../../libs/common/src/styling/index";
3
4
  import "@vaadin/combo-box";
4
5
  export class UserLogin {
5
6
  constructor() {
6
7
  this.errorCode = '';
7
- /**
8
- * Apply inline client styling
9
- */
10
- this.setClientStyling = () => {
11
- let sheet = document.createElement('style');
12
- sheet.innerHTML = this.clientStyling;
13
- this.stylingContainer.appendChild(sheet);
14
- };
15
- /**
16
- * Fetch and apply CSS from a provided URL
17
- */
18
- this.setClientStylingURL = () => {
19
- let url = new URL(this.clientStylingUrl);
20
- let cssFile = document.createElement('style');
21
- fetch(url.href)
22
- .then((res) => res.text())
23
- .then((data) => {
24
- cssFile.innerHTML = data;
25
- setTimeout(() => { this.stylingContainer.appendChild(cssFile); }, 1);
26
- });
27
- };
28
8
  /**
29
9
  * Fetch phone prefixes from the API
30
10
  */
@@ -157,7 +137,11 @@ export class UserLogin {
157
137
  window.postMessage({ type: 'PlayerActions', gmversion: 'gm16' }, window.location.href);
158
138
  }
159
139
  if ((data === null || data === void 0 ? void 0 : data.hasToSetPass) === true) {
140
+ this.hasError = true;
141
+ this.errorMessage = translate(`setUpPassowrd`, this.lang);
142
+ this.sendErrorNotification(translate(`setUpPassowrd`, this.lang));
160
143
  window.postMessage({ type: 'HasToSetPass' }, window.location.href);
144
+ return;
161
145
  }
162
146
  if (data.sessionId) {
163
147
  window.postMessage({ type: 'UserSessionID', session: data.sessionId, userid: data.userId }, window.location.href);
@@ -289,11 +273,11 @@ export class UserLogin {
289
273
  this.isValidPassword = true;
290
274
  this.isValidUserPhone = true;
291
275
  this.isPasswordVisible = false;
292
- this.limitStylingAppends = false;
293
276
  this.errorMessage = '';
294
277
  this.hasError = false;
295
278
  this.userPrefixOptions = undefined;
296
279
  this.isLoginLoading = false;
280
+ this.mbSource = undefined;
297
281
  }
298
282
  /**
299
283
  * Watch for changes in the translation URL and fetch new translations
@@ -307,9 +291,10 @@ export class UserLogin {
307
291
  * @param newValue - new client styling
308
292
  * @param oldValue - previous client styling
309
293
  */
310
- handleStylingChange(newValue, oldValue) {
311
- if (newValue !== oldValue)
312
- this.setClientStyling();
294
+ handleClientStylingChange(newValue, oldValue) {
295
+ if (newValue != oldValue) {
296
+ setClientStyling(this.stylingContainer, this.clientStyling);
297
+ }
313
298
  }
314
299
  /**
315
300
  * Watch for changes in the client styling URL and fetch the new CSS
@@ -317,9 +302,11 @@ export class UserLogin {
317
302
  * @param newValue - new client styling URL
318
303
  * @param oldValue - previous client styling URL
319
304
  */
320
- handleStylingUrlChange(newValue, oldValue) {
321
- if (newValue !== oldValue)
322
- this.setClientStylingURL();
305
+ handleClientStylingUrlChange(newValue, oldValue) {
306
+ if (newValue != oldValue) {
307
+ if (this.clientStylingUrl)
308
+ setClientStylingURL(this.stylingContainer, this.clientStylingUrl);
309
+ }
323
310
  }
324
311
  /**
325
312
  * Lifecycle method: Fetch translations on component load
@@ -336,25 +323,25 @@ export class UserLogin {
336
323
  * Lifecycle method: Set up event listeners after the component is rendered
337
324
  */
338
325
  componentDidLoad() {
326
+ if (this.stylingContainer) {
327
+ if (window.emMessageBus != undefined) {
328
+ setStreamStyling(this.stylingContainer, `${this.mbSource}.Style`, this.stylingSubscription);
329
+ }
330
+ else {
331
+ if (this.clientStyling)
332
+ setClientStyling(this.stylingContainer, this.clientStyling);
333
+ if (this.clientStylingUrl)
334
+ setClientStylingURL(this.stylingContainer, this.clientStylingUrl);
335
+ }
336
+ }
339
337
  window.addEventListener('LoginCredentials', this.autofillCredentialsHandler);
340
338
  window.postMessage({ type: 'UserLoginDidLoad' });
341
339
  }
342
- /**
343
- * Lifecycle method: Apply client styling after the component renders
344
- */
345
- componentDidRender() {
346
- if (!this.limitStylingAppends && this.stylingContainer) {
347
- if (this.clientStyling)
348
- this.setClientStyling();
349
- if (this.clientStylingUrl)
350
- this.setClientStylingURL();
351
- this.limitStylingAppends = true;
352
- }
353
- }
354
340
  /**
355
341
  * Lifecycle method: Clean up event listeners when the component is removed
356
342
  */
357
343
  disconnectedCallback() {
344
+ this.stylingSubscription && this.stylingSubscription.unsubscribe();
358
345
  window.removeEventListener('LoginCredentials', this.autofillCredentialsHandler);
359
346
  }
360
347
  /**
@@ -399,20 +386,20 @@ export class UserLogin {
399
386
  * Render function
400
387
  */
401
388
  render() {
402
- let visibilityIcon = h("span", { key: '08e1b988b208738091d8e78fa1f73eb3c58076ba', class: "InputIcon" }, this.isPasswordVisible &&
403
- h("svg", { key: '5dfdfa39e8e2b3dbc84099a8496abf20382db924', onClick: () => this.togglePassword(), class: "TogglePasswordVisibility", part: "TogglePasswordVisibility", xmlns: "http://www.w3.org/2000/svg", width: "18.844", height: "12.887", viewBox: "0 0 18.844 12.887" }, h("g", { key: '24b728bd380f3661f1c382888aa4f0084bfe04c7', transform: "translate(-110.856 -23.242)" }, h("circle", { key: 'c0267c20cdca0b96a0ceedad3f92c41e3b3b6071', class: "PasswordVisibilityIcon", cx: "0.05", cy: "0.05", r: "0.05", transform: "translate(121.017 31.148)" }), h("g", { key: '87875ad14720b3da54b3c94ce020d62cb6eee8c4', transform: "translate(117.499 27.37)" }, h("path", { key: '3c1dba505232ea8e94b90861cc659d5a536dd8a9', class: "PasswordVisibilityIcon", d: "M147.413,43.174a2.774,2.774,0,0,0-3.229-3.943Z", transform: "translate(-142.164 -39.123)" }), h("path", { key: '8980532d12d0dfb5bf7a4334e478dbc801a47c0e', class: "PasswordVisibilityIcon", d: "M137.031,43.1a2.778,2.778,0,0,0,3.447,4.209Z", transform: "translate(-136.413 -42.068)" })), h("g", { key: '996cd3f037a25e7e692a62e28f8bda18945291f8', transform: "translate(110.856 24.899)" }, h("path", { key: '39b27797893b81aa835163eeb70f7db8103033d4', class: "PasswordVisibilityIcon", d: "M122.538,42.061a7.043,7.043,0,0,1-2.325.53,10.373,10.373,0,0,1-4.393-1.482,36.509,36.509,0,0,1-3.873-2.391.13.13,0,0,1,0-.208,44.141,44.141,0,0,1,3.873-2.651c.394-.233.768-.437,1.13-.622l-.686-.838c-.322.167-.651.347-.99.55a37.989,37.989,0,0,0-3.977,2.729,1.21,1.21,0,0,0-.442.962,1.1,1.1,0,0,0,.494.936,34.416,34.416,0,0,0,3.977,2.469,11.468,11.468,0,0,0,4.886,1.611,8.427,8.427,0,0,0,3.039-.725Z", transform: "translate(-110.856 -33.157)" }), h("path", { key: '076267866a6e0791a906068c2ba5b9862f11ef6a', class: "PasswordVisibilityIcon", d: "M149.119,34.14a45.875,45.875,0,0,0-4.055-2.729,20.541,20.541,0,0,0-2.547-1.248,5.6,5.6,0,0,0-4.79-.017l.7.856a5.254,5.254,0,0,1,1.672-.346,10.072,10.072,0,0,1,4.445,1.663,34.132,34.132,0,0,1,3.925,2.651.13.13,0,0,1,0,.208,40.2,40.2,0,0,1-3.925,2.391c-.179.092-.352.176-.525.26l.684.835c.1-.054.2-.1.309-.159a36.356,36.356,0,0,0,4.055-2.469,1.067,1.067,0,0,0,.52-.936A1.159,1.159,0,0,0,149.119,34.14Z", transform: "translate(-130.743 -29.617)" })), h("rect", { key: 'cbeab68f4b831cedc7d57a68a35f3e0a979ec83a', class: "PasswordVisibilityIcon", width: "0.972", height: "15.861", rx: "0.486", transform: "translate(114.827 23.858) rotate(-39.315)" }))), !this.isPasswordVisible &&
404
- h("svg", { key: 'b990b881b6fa53140440ac0646f36149b8111adf', onClick: () => this.togglePassword(), class: "TogglePasswordVisibility PasswordVisible", part: "TogglePasswordVisibility", xmlns: "http://www.w3.org/2000/svg", width: "18.843", height: "10.5", viewBox: "0 0 18.843 10.5" }, h("g", { key: 'c04390a04451b06ea6bb7e1ca7312d564e6e4b39', transform: "translate(-14.185 -27.832)" }, h("path", { key: '02123a609b24029bce696bfc98aa4f565ca12853', class: "PasswordVisibilityIcon", d: "M23.541,38.332a11.467,11.467,0,0,1-4.886-1.611,34.413,34.413,0,0,1-3.976-2.469,1.1,1.1,0,0,1-.494-.936,1.21,1.21,0,0,1,.442-.962A37.986,37.986,0,0,1,18.6,29.625a16.06,16.06,0,0,1,2.521-1.248,6.862,6.862,0,0,1,2.417-.546,6.862,6.862,0,0,1,2.417.546,20.541,20.541,0,0,1,2.547,1.248,45.872,45.872,0,0,1,4.054,2.729,1.159,1.159,0,0,1,.468.962,1.067,1.067,0,0,1-.52.936,36.353,36.353,0,0,1-4.054,2.469A11.2,11.2,0,0,1,23.541,38.332Zm0-9.46a9.813,9.813,0,0,0-4.392,1.663,44.138,44.138,0,0,0-3.873,2.651.13.13,0,0,0,0,.208,36.5,36.5,0,0,0,3.873,2.391,10.372,10.372,0,0,0,4.392,1.481,11.051,11.051,0,0,0,4.444-1.481,40.2,40.2,0,0,0,3.925-2.391.13.13,0,0,0,0-.208h0a34.132,34.132,0,0,0-3.925-2.651A10.072,10.072,0,0,0,23.541,28.872Z", transform: "translate(0)" }), h("circle", { key: 'e8ca3fd3f0dd3eef24071c0d13a874b04101a2c8', class: "PasswordVisibilityIcon", cx: "2.779", cy: "2.779", r: "2.779", transform: "translate(20.827 30.303)" }))));
405
- let userIdentification = h("div", { key: '252275c3e3b91c3e7fa995d824e4c6d3b1a4d4e0', class: "FormBox" }, h("div", { key: 'acc4edcaa9cfb7608bd0a81245895c7e59473310', class: "FormValue" }, this.loginByPhoneNumber === 'true'
389
+ let visibilityIcon = h("span", { key: '8faa0976496b69519a0197f7091d0236fa8fd730', class: "InputIcon" }, this.isPasswordVisible &&
390
+ h("svg", { key: '09bdd37ae2a2f3f66d642d665dd665ad63de447e', onClick: () => this.togglePassword(), class: "TogglePasswordVisibility", part: "TogglePasswordVisibility", xmlns: "http://www.w3.org/2000/svg", width: "18.844", height: "12.887", viewBox: "0 0 18.844 12.887" }, h("g", { key: 'f7e3c9b5065fde29b80d16f73333f152bd15a66e', transform: "translate(-110.856 -23.242)" }, h("circle", { key: '9ecc3218d6cf3873c69b215f670121fab31e1aec', class: "PasswordVisibilityIcon", cx: "0.05", cy: "0.05", r: "0.05", transform: "translate(121.017 31.148)" }), h("g", { key: 'd57cbfb0ff90a839297c0e018602c25350cdd5b4', transform: "translate(117.499 27.37)" }, h("path", { key: '2c8992bc61850da7aad512762db6e10e6a4bfc17', class: "PasswordVisibilityIcon", d: "M147.413,43.174a2.774,2.774,0,0,0-3.229-3.943Z", transform: "translate(-142.164 -39.123)" }), h("path", { key: 'b2696439c6cdaeacc4db04fc599f454692b6b9d4', class: "PasswordVisibilityIcon", d: "M137.031,43.1a2.778,2.778,0,0,0,3.447,4.209Z", transform: "translate(-136.413 -42.068)" })), h("g", { key: 'e83a07b29f3559f536f8792a07add684974279cb', transform: "translate(110.856 24.899)" }, h("path", { key: 'ac216185b12b7dbf505c0d4c679a2b44c76c8a00', class: "PasswordVisibilityIcon", d: "M122.538,42.061a7.043,7.043,0,0,1-2.325.53,10.373,10.373,0,0,1-4.393-1.482,36.509,36.509,0,0,1-3.873-2.391.13.13,0,0,1,0-.208,44.141,44.141,0,0,1,3.873-2.651c.394-.233.768-.437,1.13-.622l-.686-.838c-.322.167-.651.347-.99.55a37.989,37.989,0,0,0-3.977,2.729,1.21,1.21,0,0,0-.442.962,1.1,1.1,0,0,0,.494.936,34.416,34.416,0,0,0,3.977,2.469,11.468,11.468,0,0,0,4.886,1.611,8.427,8.427,0,0,0,3.039-.725Z", transform: "translate(-110.856 -33.157)" }), h("path", { key: '9985a70080cc4d4b3089a2c7315f506f2f8a32bc', class: "PasswordVisibilityIcon", d: "M149.119,34.14a45.875,45.875,0,0,0-4.055-2.729,20.541,20.541,0,0,0-2.547-1.248,5.6,5.6,0,0,0-4.79-.017l.7.856a5.254,5.254,0,0,1,1.672-.346,10.072,10.072,0,0,1,4.445,1.663,34.132,34.132,0,0,1,3.925,2.651.13.13,0,0,1,0,.208,40.2,40.2,0,0,1-3.925,2.391c-.179.092-.352.176-.525.26l.684.835c.1-.054.2-.1.309-.159a36.356,36.356,0,0,0,4.055-2.469,1.067,1.067,0,0,0,.52-.936A1.159,1.159,0,0,0,149.119,34.14Z", transform: "translate(-130.743 -29.617)" })), h("rect", { key: 'e02cc8f65db8593a3b08d618a623f76a3da81ce1', class: "PasswordVisibilityIcon", width: "0.972", height: "15.861", rx: "0.486", transform: "translate(114.827 23.858) rotate(-39.315)" }))), !this.isPasswordVisible &&
391
+ h("svg", { key: '43c407d82e8bdcea2cfb3a43bfda2c98e5804436', onClick: () => this.togglePassword(), class: "TogglePasswordVisibility PasswordVisible", part: "TogglePasswordVisibility", xmlns: "http://www.w3.org/2000/svg", width: "18.843", height: "10.5", viewBox: "0 0 18.843 10.5" }, h("g", { key: '6405d54694b21612833f9d1d22d66d60f2d9d871', transform: "translate(-14.185 -27.832)" }, h("path", { key: '2ed25088274ee5f42893872a568531515fb2e307', class: "PasswordVisibilityIcon", d: "M23.541,38.332a11.467,11.467,0,0,1-4.886-1.611,34.413,34.413,0,0,1-3.976-2.469,1.1,1.1,0,0,1-.494-.936,1.21,1.21,0,0,1,.442-.962A37.986,37.986,0,0,1,18.6,29.625a16.06,16.06,0,0,1,2.521-1.248,6.862,6.862,0,0,1,2.417-.546,6.862,6.862,0,0,1,2.417.546,20.541,20.541,0,0,1,2.547,1.248,45.872,45.872,0,0,1,4.054,2.729,1.159,1.159,0,0,1,.468.962,1.067,1.067,0,0,1-.52.936,36.353,36.353,0,0,1-4.054,2.469A11.2,11.2,0,0,1,23.541,38.332Zm0-9.46a9.813,9.813,0,0,0-4.392,1.663,44.138,44.138,0,0,0-3.873,2.651.13.13,0,0,0,0,.208,36.5,36.5,0,0,0,3.873,2.391,10.372,10.372,0,0,0,4.392,1.481,11.051,11.051,0,0,0,4.444-1.481,40.2,40.2,0,0,0,3.925-2.391.13.13,0,0,0,0-.208h0a34.132,34.132,0,0,0-3.925-2.651A10.072,10.072,0,0,0,23.541,28.872Z", transform: "translate(0)" }), h("circle", { key: '55db780da0e461d20f3feae2723a982ad705823c', class: "PasswordVisibilityIcon", cx: "2.779", cy: "2.779", r: "2.779", transform: "translate(20.827 30.303)" }))));
392
+ let userIdentification = h("div", { key: '7dabe085c16690665908703468baac7e60888e9f', class: "FormBox" }, h("div", { key: '701c9d1f0297e53d8204bd8f7e75450bd601bd6e', class: "FormValue" }, this.loginByPhoneNumber === 'true'
406
393
  ? h("div", { class: (!this.isValidUserPhone || this.hasError) ? 'InputBox InputInvalidBox' : 'InputBox ' }, h("div", { class: "PhoneInputBox" }, h("div", { class: "PrefixBox" }, h("vaadin-combo-box", { items: this.userPrefixOptions, value: this.userPrefix, onChange: this.handleInputChangePartial('prefix') }), h("label", { class: (this.userPrefix ? 'FieldFilledIn' : '') + ' ' + (!this.isValidUserPhone || this.hasError ? 'FieldInvalid' : '') }, translate('userPrefix', this.lang))), h("div", { class: "PhoneBox" }, h("input", { type: "text", placeholder: '', value: this.userPhone, onFocus: this.handleInputChangePartial('phone'), onInput: this.handleInputChangePartial('phone'), autocapitalize: "none", required: true }), h("label", { class: (this.userPhone ? 'FieldFilledIn' : '') + ' ' + (!this.isValidUserPhone || this.hasError ? 'FieldInvalid' : '') }, translate('userPhone', this.lang)))), !this.isValidUserPhone &&
407
394
  h("p", { class: "InvalidField" }, translate('invalidField', this.lang)))
408
395
  : h("div", { class: (!this.isValidUserEmail || this.hasError) ? 'InputBox InputInvalidBox' : 'InputBox' }, h("input", { type: "text", placeholder: '', value: this.userNameEmail, onFocus: this.handleInputChangePartial('user'), onInput: this.handleInputChangePartial('user'), autocapitalize: "none", required: true }), h("label", { class: (this.userNameEmail ? 'FieldFilledIn' : '') + ' ' + (!this.isValidUserEmail || this.hasError ? 'FieldInvalid' : '') }, translate('userEmail', this.lang)), !this.isValidUserEmail &&
409
- h("p", { class: "InvalidField" }, translate('invalidField', this.lang))), h("div", { key: '3857740f5455b51c30028eda6bd18ab48badf07d', class: (!this.isValidPassword || this.hasError) ? 'InputBox InputInvalidBox' : 'InputBox' }, visibilityIcon, h("input", { key: '94f24b493711ed60bb56570e75ad0f5151b770a0', type: this.isPasswordVisible ? "text" : "password", placeholder: '', value: this.userPassword, onFocus: this.handleInputChangePartial('password'), onInput: this.handleInputChangePartial('password'), autocapitalize: "none", required: true }), h("label", { key: '6aed12d32525695fdecde970846aeced269c6ada', class: (this.userPassword ? 'FieldFilledIn' : '') + ' ' + (!this.isValidPassword || this.hasError ? 'FieldInvalid' : '') }, translate('password', this.lang)), !this.isValidPassword &&
410
- h("p", { key: '49fd647b8d6bdcd58416aa8df6622d9fec2fd908', class: "InvalidField" }, translate('invalidField', this.lang))), this.passwordReset == 'true' &&
411
- h("div", { key: '77e4d49f8d35131c7deb4cf0c4b7553c2c214917', class: "ForgotPassword" }, h("button", { key: '3d4578732ff4b2888d67ca502338b259f67cd6ab', onClick: this.resetPassword }, translate('forgotPassword', this.lang))), h("button", { key: 'cbd21b5e3514c26f98a57ec6d331be8d013dbc96', disabled: ((this.loginByPhoneNumber !== 'true' && (!this.isValidUserEmail || !this.userNameEmail)) ||
396
+ h("p", { class: "InvalidField" }, translate('invalidField', this.lang))), h("div", { key: '3cd3fde43f1e060d98bc17cd021d40ac0a3daf25', class: (!this.isValidPassword || this.hasError) ? 'InputBox InputInvalidBox' : 'InputBox' }, visibilityIcon, h("input", { key: '33d7b8b4db8976dd8677444165a1138917d05c68', type: this.isPasswordVisible ? "text" : "password", placeholder: '', value: this.userPassword, onFocus: this.handleInputChangePartial('password'), onInput: this.handleInputChangePartial('password'), autocapitalize: "none", required: true }), h("label", { key: '11decfd4b4bd61163e8c5c002b46c84ee9ff3020', class: (this.userPassword ? 'FieldFilledIn' : '') + ' ' + (!this.isValidPassword || this.hasError ? 'FieldInvalid' : '') }, translate('password', this.lang)), !this.isValidPassword &&
397
+ h("p", { key: '5c2d02b6a329227b9e73c36195ed7e160832a733', class: "InvalidField" }, translate('invalidField', this.lang))), this.passwordReset == 'true' &&
398
+ h("div", { key: '40a59ed73a4247180b179267e3b7a83a010d6649', class: "ForgotPassword" }, h("button", { key: 'b3045a97541f13bcab8b2997af26b595d6dd2b6f', onClick: this.resetPassword }, translate('forgotPassword', this.lang))), h("button", { key: 'ca3f956411dca0a6bf54894c5e14bbe2767a53a0', disabled: ((this.loginByPhoneNumber !== 'true' && (!this.isValidUserEmail || !this.userNameEmail)) ||
412
399
  (this.loginByPhoneNumber === 'true' && (!this.isValidUserPhone || !this.userPhone || !this.userPrefix)) ||
413
400
  !this.userPassword || !this.isValidPassword) || this.isLoginLoading, class: "SubmitCredentials", onClick: this.handleLogin }, translate('login', this.lang)), this.hasError &&
414
- h("p", { key: 'bfc16dd160acda7ba5f57e861e013581a1703481', class: "CredentialsError" }, this.errorMessage)));
415
- return h("section", { key: 'f283f2a8e61feac8ec3003cc88fe47cf450df66c', ref: el => this.stylingContainer = el }, userIdentification);
401
+ h("p", { key: '6641f60f97cd7f9e81e3097935dfcfb4b8ab6552', class: "CredentialsError" }, this.errorMessage)));
402
+ return h("section", { key: '49d2252c207e8148d230f2f90bf4d1d567df4aae', ref: el => this.stylingContainer = el }, userIdentification);
416
403
  }
417
404
  static get is() { return "user-login"; }
418
405
  static get encapsulation() { return "shadow"; }
@@ -676,6 +663,23 @@ export class UserLogin {
676
663
  "attribute": "login-by-phone-number",
677
664
  "reflect": true,
678
665
  "defaultValue": "'false'"
666
+ },
667
+ "mbSource": {
668
+ "type": "string",
669
+ "mutable": false,
670
+ "complexType": {
671
+ "original": "string",
672
+ "resolved": "string",
673
+ "references": {}
674
+ },
675
+ "required": false,
676
+ "optional": false,
677
+ "docs": {
678
+ "tags": [],
679
+ "text": ""
680
+ },
681
+ "attribute": "mb-source",
682
+ "reflect": true
679
683
  }
680
684
  };
681
685
  }
@@ -689,7 +693,6 @@ export class UserLogin {
689
693
  "isValidPassword": {},
690
694
  "isValidUserPhone": {},
691
695
  "isPasswordVisible": {},
692
- "limitStylingAppends": {},
693
696
  "errorMessage": {},
694
697
  "hasError": {},
695
698
  "userPrefixOptions": {},
@@ -702,10 +705,10 @@ export class UserLogin {
702
705
  "methodName": "handleNewTranslations"
703
706
  }, {
704
707
  "propName": "clientStyling",
705
- "methodName": "handleStylingChange"
708
+ "methodName": "handleClientStylingChange"
706
709
  }, {
707
710
  "propName": "clientStylingUrl",
708
- "methodName": "handleStylingUrlChange"
711
+ "methodName": "handleClientStylingUrlChange"
709
712
  }];
710
713
  }
711
714
  }
@@ -1,20 +1,21 @@
1
1
  const DEFAULT_LANGUAGE = 'en';
2
2
  const TRANSLATIONS = {
3
- en: {
4
- invalidField: 'This field is invalid',
5
- forgotPassword: 'Forgot Password',
6
- userEmail: 'Username or Email',
7
- userPhone: 'Phone number',
8
- userPrefix: 'Phone prefix',
9
- password: 'Password',
10
- login: 'Login',
11
- genericError: 'An unexpected error has occured',
12
- successMessage: 'Login successful',
13
- Forbidden_UserAccount_Blocked: 'Player account blocked',
14
- Unauthorized: 'The player account number, e-mail address or password is incorrect',
15
- CountryRestricted: 'Registration is not possible from a restricted jurisdiction. If you encounter further issues, please contact support.'
3
+ "en": {
4
+ "invalidField": "This field is invalid",
5
+ "forgotPassword": "Forgot Password",
6
+ "userEmail": "Username or Email",
7
+ "userPhone": "Phone number",
8
+ "userPrefix": "Phone prefix",
9
+ "password": "Password",
10
+ "login": "Login",
11
+ "genericError": "An unexpected error has occured",
12
+ "successMessage": "Login successful",
13
+ "Forbidden_UserAccount_Blocked": "Player account blocked",
14
+ "setUpPassowrd": "You need to reset your password",
15
+ "Unauthorized": "The player account number, e-mail address or password is incorrect",
16
+ "CountryRestricted": "Registration is not possible from a restricted jurisdiction. If you encounter further issues, please contact support."
16
17
  },
17
- tr: {
18
+ "tr": {
18
19
  "invalidField": "Bu alan geçersiz",
19
20
  "forgotPassword": "Şifremi Unuttum",
20
21
  "userEmail": "Kullanıcı Adı veya E-posta",
@@ -25,148 +26,159 @@ const TRANSLATIONS = {
25
26
  "genericError": "Beklenmeyen bir hata oluştu",
26
27
  "successMessage": "Giriş başarılı",
27
28
  "Forbidden_UserAccount_Blocked": "Oyuncu hesabı engellendi",
29
+ "setUpPassowrd": "Şifrenizi sıfırlamanız gerekiyor",
28
30
  "Unauthorized": "Oyuncu hesap numarası, e-posta adresi veya şifre hatalı",
29
31
  "CountryRestricted": "Kısıtlı bir yargı bölgesinden kayıt yapılamaz. Daha fazla sorunla karşılaşırsanız, lütfen destek ile iletişime geçin."
30
32
  },
31
- 'en-us': {
32
- invalidField: 'This field is invalid',
33
- forgotPassword: 'Forgot Password',
34
- userEmail: 'Username or Email',
35
- userPhone: 'Phone number',
36
- userPrefix: 'Phone prefix',
37
- password: 'Password',
38
- login: 'Login',
39
- genericError: 'An unexpected error has occured',
40
- successMessage: 'Login successful',
41
- Forbidden_UserAccount_Blocked: 'Player account blocked',
42
- Unauthorized: 'The player account number, e-mail address or password is incorrect',
43
- CountryRestricted: 'Registration is not possible from a restricted jurisdiction. If you encounter further issues, please contact support.'
33
+ "en-us": {
34
+ "invalidField": "This field is invalid",
35
+ "forgotPassword": "Forgot Password",
36
+ "userEmail": "Username or Email",
37
+ "userPhone": "Phone number",
38
+ "userPrefix": "Phone prefix",
39
+ "password": "Password",
40
+ "login": "Login",
41
+ "genericError": "An unexpected error has occured",
42
+ "successMessage": "Login successful",
43
+ "Forbidden_UserAccount_Blocked": "Player account blocked",
44
+ "setUpPassowrd": "You need to reset your password",
45
+ "Unauthorized": "The player account number, e-mail address or password is incorrect",
46
+ "CountryRestricted": "Registration is not possible from a restricted jurisdiction. If you encounter further issues, please contact support."
44
47
  },
45
- ro: {
46
- invalidField: "Acest câmp este invalid",
47
- forgotPassword: "Ați uitat parola",
48
- userEmail: "Nume utilizator sau email",
49
- userPhone: "Număr de telefon",
50
- userPrefix: "Prefix telefon",
51
- password: "Parolă",
52
- login: "Autentificare",
53
- genericError: "A apărut o eroare neașteptată",
54
- successMessage: "Autentificare reușită",
55
- Forbidden_UserAccount_Blocked: "Contul de jucător este blocat",
56
- Unauthorized: "Numărul contului de jucător, adresa de e-mail sau parola sunt incorecte",
57
- CountryRestricted: 'Înregistrarea nu este posibilă dintr-o jurisdicție restricționată. Dacă întâmpinați alte probleme, vă rugăm să contactați asistența.'
48
+ "ro": {
49
+ "invalidField": "Acest câmp este invalid",
50
+ "forgotPassword": "Ați uitat parola",
51
+ "userEmail": "Nume utilizator sau email",
52
+ "userPhone": "Număr de telefon",
53
+ "userPrefix": "Prefix telefon",
54
+ "password": "Parolă",
55
+ "login": "Autentificare",
56
+ "genericError": "A apărut o eroare neașteptată",
57
+ "successMessage": "Autentificare reușită",
58
+ "Forbidden_UserAccount_Blocked": "Contul de jucător este blocat",
59
+ "setUpPassowrd": "Trebuie resetați parola",
60
+ "Unauthorized": "Numărul contului de jucător, adresa de e-mail sau parola sunt incorecte",
61
+ "CountryRestricted": "Înregistrarea nu este posibilă dintr-o jurisdicție restricționată. Dacă întâmpinați alte probleme, vă rugăm să contactați asistența."
58
62
  },
59
- hr: {
60
- invalidField: 'Ovo polje je nevažeće',
61
- forgotPassword: 'Zaboravljena lozinka',
62
- userEmail: 'Korisničko ime ili email',
63
- userPhone: 'Broj telefona',
64
- userPrefix: 'Telefonski prefix',
65
- password: 'Lozinka',
66
- login: 'Prijava',
67
- genericError: 'Došlo je do neočekivane pogreške',
68
- successMessage: 'Prijava uspješna',
69
- Forbidden_UserAccount_Blocked: 'Vaš račun je blokiran',
70
- Unauthorized: 'Lozinka, e-mail adresa ili korisničko ime su pogrešno uneseni',
71
- CountryRestricted: 'Prijava nije moguća iz zemlje ograničene jurisdikcije. U slučaju daljnjih poteškoća, molimo kontaktirajte podršku.'
63
+ "hr": {
64
+ "invalidField": "Ovo polje je nevažeće",
65
+ "forgotPassword": "Zaboravljena lozinka",
66
+ "userEmail": "Korisničko ime ili email",
67
+ "userPhone": "Broj telefona",
68
+ "userPrefix": "Telefonski prefix",
69
+ "password": "Lozinka",
70
+ "login": "Prijava",
71
+ "genericError": "Došlo je do neočekivane pogreške",
72
+ "successMessage": "Prijava uspješna",
73
+ "setUpPassowrd": "Morate resetirati svoju lozinku",
74
+ "Forbidden_UserAccount_Blocked": "Vaš račun je blokiran",
75
+ "Unauthorized": "Lozinka, e-mail adresa ili korisničko ime su pogrešno uneseni",
76
+ "CountryRestricted": "Prijava nije moguća iz zemlje ograničene jurisdikcije. U slučaju daljnjih poteškoća, molimo kontaktirajte podršku."
72
77
  },
73
- fr: {
74
- invalidField: "Ce champ est invalide",
75
- forgotPassword: "Mot de passe oublié",
76
- userEmail: "Nom d'utilisateur ou email",
77
- userPhone: "Numéro de téléphone",
78
- userPrefix: "Préfixe téléphonique",
79
- password: "Mot de passe",
80
- login: "Connexion",
81
- genericError: "Une erreur inattendue est survenue",
82
- successMessage: "Connexion réussie",
83
- Forbidden_UserAccount_Blocked: "Compte joueur bloqué",
84
- Unauthorized: "Le numéro de compte joueur, l'adresse e-mail ou le mot de passe est incorrect",
85
- CountryRestricted: "L'inscription n'est pas possible depuis une juridiction restreinte. Si vous rencontrez d'autres problèmes, veuillez contacter le support."
78
+ "fr": {
79
+ "invalidField": "Ce champ est invalide",
80
+ "forgotPassword": "Mot de passe oublié",
81
+ "userEmail": "Nom d'utilisateur ou email",
82
+ "userPhone": "Numéro de téléphone",
83
+ "userPrefix": "Préfixe téléphonique",
84
+ "password": "Mot de passe",
85
+ "login": "Connexion",
86
+ "genericError": "Une erreur inattendue est survenue",
87
+ "successMessage": "Connexion réussie",
88
+ "Forbidden_UserAccount_Blocked": "Compte joueur bloqué",
89
+ "setUpPassowrd": "Vous devez réinitialiser votre mot de passe",
90
+ "Unauthorized": "Le numéro de compte joueur, l'adresse e-mail ou le mot de passe est incorrect",
91
+ "CountryRestricted": "L'inscription n'est pas possible depuis une juridiction restreinte. Si vous rencontrez d'autres problèmes, veuillez contacter le support."
86
92
  },
87
- cs: {
88
- invalidField: 'Ovo polje je nevažeće.',
89
- forgotPassword: 'Zaboravio sam lozinku ',
90
- userEmail: 'Korisničko ime ili email',
91
- userPhone: 'Telefonní číslo',
92
- userPrefix: 'Telefonní předvolba',
93
- password: 'Lozinka',
94
- login: 'Prijava',
95
- genericError: 'An unexpected error has occured',
96
- successMessage: 'Login successful',
97
- Forbidden_UserAccount_Blocked: 'Player account blocked',
98
- Unauthorized: 'Číslo účtu hráče, e-mailová adresa nebo heslo je nesprávné',
99
- CountryRestricted: 'Registrace není možná z omezené jurisdikce. Pokud narazíte na další potíže, kontaktujte prosím podporu.'
93
+ "cs": {
94
+ "invalidField": "Ovo polje je nevažeće.",
95
+ "forgotPassword": "Zaboravio sam lozinku ",
96
+ "userEmail": "Korisničko ime ili email",
97
+ "userPhone": "Telefonní číslo",
98
+ "userPrefix": "Telefonní předvolba",
99
+ "password": "Lozinka",
100
+ "login": "Prijava",
101
+ "genericError": "An unexpected error has occured",
102
+ "successMessage": "Login successful",
103
+ "Forbidden_UserAccount_Blocked": "Player account blocked",
104
+ "setUpPassowrd": "Musíte resetovat své heslo",
105
+ "Unauthorized": "Číslo účtu hráče, e-mailová adresa nebo heslo je nesprávné",
106
+ "CountryRestricted": "Registrace není možná z omezené jurisdikce. Pokud narazíte na další potíže, kontaktujte prosím podporu."
100
107
  },
101
- de: {
102
- invalidField: "Dieses Feld ist ungültig",
103
- forgotPassword: "Passwort vergessen",
104
- userEmail: "Benutzername oder E-Mail",
105
- userPhone: "Telefonnummer",
106
- userPrefix: "Telefonvorwahl",
107
- password: "Passwort",
108
- login: "Anmelden",
109
- genericError: "Ein unerwarteter Fehler ist aufgetreten",
110
- successMessage: "Erfolgreich angemeldet",
111
- Forbidden_UserAccount_Blocked: "Spielerkonto gesperrt",
112
- Unauthorized: "Die Spieler-Kontonummer, E-Mail-Adresse oder das Passwort ist falsch",
113
- CountryRestricted: 'Eine Registrierung ist aus einer eingeschränkten Gerichtsbarkeit nicht möglich. Wenn Sie weitere Probleme haben, wenden Sie sich bitte an den Support.'
108
+ "de": {
109
+ "invalidField": "Dieses Feld ist ungültig",
110
+ "forgotPassword": "Passwort vergessen",
111
+ "userEmail": "Benutzername oder E-Mail",
112
+ "userPhone": "Telefonnummer",
113
+ "userPrefix": "Telefonvorwahl",
114
+ "password": "Passwort",
115
+ "login": "Anmelden",
116
+ "genericError": "Ein unerwarteter Fehler ist aufgetreten",
117
+ "successMessage": "Erfolgreich angemeldet",
118
+ "Forbidden_UserAccount_Blocked": "Spielerkonto gesperrt",
119
+ "setUpPassowrd": "Sie müssen Ihr Passwort zurücksetzen",
120
+ "Unauthorized": "Die Spieler-Kontonummer, E-Mail-Adresse oder das Passwort ist falsch",
121
+ "CountryRestricted": "Eine Registrierung ist aus einer eingeschränkten Gerichtsbarkeit nicht möglich. Wenn Sie weitere Probleme haben, wenden Sie sich bitte an den Support."
114
122
  },
115
- 'pt-br': {
116
- invalidField: "Este campo é inválido",
117
- forgotPassword: "Esqueceu a senha",
118
- userEmail: "Nome de usuário ou e-mail",
119
- userPhone: "Número de telefone",
120
- userPrefix: "Prefixo de telefone",
121
- password: "Senha",
122
- login: "Login",
123
- genericError: "Ocorreu um erro inesperado",
124
- successMessage: "Login bem-sucedido",
125
- Forbidden_UserAccount_Blocked: "Conta de jogador bloqueada",
126
- Unauthorized: "O número da conta de jogador, o endereço de e-mail ou a senha estão incorretos",
127
- CountryRestricted: 'O registro não é possível a partir de uma jurisdição restrita. Caso encontre outros problemas, entre em contato com o suporte.'
123
+ "pt-br": {
124
+ "invalidField": "Este campo é inválido",
125
+ "forgotPassword": "Esqueceu a senha",
126
+ "userEmail": "Nome de usuário ou e-mail",
127
+ "userPhone": "Número de telefone",
128
+ "userPrefix": "Prefixo de telefone",
129
+ "password": "Senha",
130
+ "login": "Login",
131
+ "genericError": "Ocorreu um erro inesperado",
132
+ "successMessage": "Login bem-sucedido",
133
+ "Forbidden_UserAccount_Blocked": "Conta de jogador bloqueada",
134
+ "setUpPassowrd": "Você precisa redefinir sua senha",
135
+ "Unauthorized": "O número da conta de jogador, o endereço de e-mail ou a senha estão incorretos",
136
+ "CountryRestricted": "O registro não é possível a partir de uma jurisdição restrita. Caso encontre outros problemas, entre em contato com o suporte."
128
137
  },
129
- 'es-mx': {
130
- invalidField: "Este campo es inválido",
131
- forgotPassword: "Olvidé la contraseña",
132
- userEmail: "Nombre de usuario o correo electrónico",
133
- userPhone: "Número de teléfono",
134
- userPrefix: "Prefijo telefónico",
135
- password: "Contraseña",
136
- login: "Iniciar sesión",
137
- genericError: "Ocurrió un error inesperado",
138
- successMessage: "Inicio de sesión exitoso",
139
- Forbidden_UserAccount_Blocked: "Cuenta de jugador bloqueada",
140
- Unauthorized: "El número de cuenta de jugador, la dirección de correo electrónico o la contraseña son incorrectos",
141
- CountryRestricted: 'El registro no es posible desde una jurisdicción restringida. Si encuentra más problemas, por favor contacte al soporte.'
138
+ "es-mx": {
139
+ "invalidField": "Este campo es inválido",
140
+ "forgotPassword": "Olvidé la contraseña",
141
+ "userEmail": "Nombre de usuario o correo electrónico",
142
+ "userPhone": "Número de teléfono",
143
+ "userPrefix": "Prefijo telefónico",
144
+ "password": "Contraseña",
145
+ "login": "Iniciar sesión",
146
+ "genericError": "Ocurrió un error inesperado",
147
+ "successMessage": "Inicio de sesión exitoso",
148
+ "Forbidden_UserAccount_Blocked": "Cuenta de jugador bloqueada",
149
+ "setUpPassowrd": "Necesitas restablecer tu contraseña",
150
+ "Unauthorized": "El número de cuenta de jugador, la dirección de correo electrónico o la contraseña son incorrectos",
151
+ "CountryRestricted": "El registro no es posible desde una jurisdicción restringida. Si encuentra más problemas, por favor contacte al soporte."
142
152
  },
143
- es: {
144
- invalidField: 'Este campo no es válido',
145
- forgotPassword: 'Olvidé mi contraseña',
146
- userEmail: 'Nombre de usuario o correo electrónico',
147
- userPhone: 'Número de teléfono',
148
- userPrefix: 'Prefijo de teléfono',
149
- password: 'Contraseña',
150
- login: 'Iniciar sesión',
151
- genericError: 'Se ha producido un error inesperado',
152
- successMessage: 'Inicio de sesión exitoso',
153
- Forbidden_UserAccount_Blocked: 'Cuenta de jugador bloqueada',
154
- Unauthorized: 'El número de cuenta, correo electrónico o contraseña es incorrecto',
155
- CountryRestricted: 'No es posible registrarse desde una jurisdicción restringida. Si encuentra más problemas, comuníquese con el soporte.'
153
+ "es": {
154
+ "invalidField": "Este campo no es válido",
155
+ "forgotPassword": "Olvidé mi contraseña",
156
+ "userEmail": "Nombre de usuario o correo electrónico",
157
+ "userPhone": "Número de teléfono",
158
+ "userPrefix": "Prefijo de teléfono",
159
+ "password": "Contraseña",
160
+ "login": "Iniciar sesión",
161
+ "genericError": "Se ha producido un error inesperado",
162
+ "successMessage": "Inicio de sesión exitoso",
163
+ "Forbidden_UserAccount_Blocked": "Cuenta de jugador bloqueada",
164
+ "setUpPassowrd": "Necesitas restablecer tu contraseña",
165
+ "Unauthorized": "El número de cuenta, correo electrónico o contraseña es incorrecto",
166
+ "CountryRestricted": "No es posible registrarse desde una jurisdicción restringida. Si encuentra más problemas, comuníquese con el soporte."
156
167
  },
157
- pt: {
158
- invalidField: 'Este campo é inválido',
159
- forgotPassword: 'Esqueceu a senha',
160
- userEmail: 'Nome de usuário ou email',
161
- userPhone: 'Número de telefone',
162
- userPrefix: 'Prefixo de telefone',
163
- password: 'Senha',
164
- login: 'Entrar',
165
- genericError: 'Ocorreu um erro inesperado',
166
- successMessage: 'Login realizado com sucesso',
167
- Forbidden_UserAccount_Blocked: 'Conta de jogador bloqueada',
168
- Unauthorized: 'O número da conta, e-mail ou senha está incorreto',
169
- CountryRestricted: 'Não é possível se registrar de uma jurisdição restrita. Se encontrar mais problemas, entre em contato com o suporte.'
168
+ "pt": {
169
+ "invalidField": "Este campo é inválido",
170
+ "forgotPassword": "Esqueceu a senha",
171
+ "userEmail": "Nome de usuário ou email",
172
+ "userPhone": "Número de telefone",
173
+ "userPrefix": "Prefixo de telefone",
174
+ "password": "Senha",
175
+ "login": "Entrar",
176
+ "genericError": "Ocorreu um erro inesperado",
177
+ "successMessage": "Login realizado com sucesso",
178
+ "Forbidden_UserAccount_Blocked": "Conta de jogador bloqueada",
179
+ "setUpPassowrd": "Você precisa redefinir a sua senha",
180
+ "Unauthorized": "O número da conta, e-mail ou senha está incorreto",
181
+ "CountryRestricted": "Não é possível se registrar de uma jurisdição restrita. Se encontrar mais problemas, entre em contato com o suporte."
170
182
  }
171
183
  };
172
184
  export const getTranslations = (url) => {