@everymatrix/user-login 1.55.0 → 1.56.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.
Files changed (26) hide show
  1. package/dist/cjs/{index-ce110273.js → index-a6009b28.js} +174 -74
  2. package/dist/cjs/loader.cjs.js +2 -2
  3. package/dist/cjs/user-login.cjs.entry.js +11911 -11020
  4. package/dist/cjs/user-login.cjs.js +3 -3
  5. package/dist/collection/collection-manifest.json +1 -1
  6. package/dist/collection/components/user-login/user-login.js +165 -75
  7. package/dist/esm/{index-824bb999.js → index-19313d5e.js} +174 -74
  8. package/dist/esm/loader.js +3 -3
  9. package/dist/esm/user-login.entry.js +11911 -11020
  10. package/dist/esm/user-login.js +4 -4
  11. package/dist/types/Users/adrian.pripon/Documents/Work/widgets-monorepo/packages/stencil/user-login/.stencil/packages/stencil/user-login/stencil.config.d.ts +2 -0
  12. package/dist/types/Users/adrian.pripon/Documents/Work/widgets-monorepo/packages/stencil/user-login/.stencil/packages/stencil/user-login/stencil.config.dev.d.ts +2 -0
  13. package/dist/types/components/user-login/user-login.d.ts +4 -18
  14. package/dist/types/components.d.ts +2 -0
  15. package/dist/user-login/p-49fced52.entry.js +2657 -0
  16. package/dist/user-login/p-614af01b.js +2 -0
  17. package/dist/user-login/user-login.esm.js +1 -1
  18. package/package.json +1 -1
  19. package/dist/types/Users/maria.bumbar/Desktop/widgets-monorepo/packages/stencil/user-login/.stencil/packages/stencil/user-login/stencil.config.d.ts +0 -2
  20. package/dist/types/Users/maria.bumbar/Desktop/widgets-monorepo/packages/stencil/user-login/.stencil/packages/stencil/user-login/stencil.config.dev.d.ts +0 -2
  21. package/dist/user-login/p-57aa7a6f.js +0 -2
  22. package/dist/user-login/p-87c4cda6.entry.js +0 -3119
  23. /package/dist/types/Users/{maria.bumbar/Desktop → adrian.pripon/Documents/Work}/widgets-monorepo/packages/stencil/user-login/.stencil/tools/plugins/index.d.ts +0 -0
  24. /package/dist/types/Users/{maria.bumbar/Desktop → adrian.pripon/Documents/Work}/widgets-monorepo/packages/stencil/user-login/.stencil/tools/plugins/stencil-clean-deps-plugin.d.ts +0 -0
  25. /package/dist/types/Users/{maria.bumbar/Desktop → adrian.pripon/Documents/Work}/widgets-monorepo/packages/stencil/user-login/.stencil/tools/plugins/vite-chunk-plugin.d.ts +0 -0
  26. /package/dist/types/Users/{maria.bumbar/Desktop → adrian.pripon/Documents/Work}/widgets-monorepo/packages/stencil/user-login/.stencil/tools/plugins/vite-clean-deps-plugin.d.ts +0 -0
@@ -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-a6009b28.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.26.0 | 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,7 +4,7 @@
4
4
  ],
5
5
  "compiler": {
6
6
  "name": "@stencil/core",
7
- "version": "4.22.3",
7
+ "version": "4.26.0",
8
8
  "typescriptVersion": "5.5.4"
9
9
  },
10
10
  "collections": [],
@@ -1,30 +1,98 @@
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
- this.errorCode = '';
7
7
  /**
8
- * Apply inline client styling
8
+ * API endpoint URL for login requests
9
9
  */
10
- this.setClientStyling = () => {
11
- let sheet = document.createElement('style');
12
- sheet.innerHTML = this.clientStyling;
13
- this.stylingContainer.appendChild(sheet);
14
- };
10
+ this.endpoint = '';
15
11
  /**
16
- * Fetch and apply CSS from a provided URL
12
+ * Language code for translations (default is 'en')
17
13
  */
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
- };
14
+ this.lang = 'en';
15
+ /**
16
+ * Inline CSS styling provided by the client
17
+ */
18
+ this.clientStyling = '';
19
+ /**
20
+ * URL to load additional CSS styling
21
+ */
22
+ this.clientStylingUrl = '';
23
+ /**
24
+ * URL for fetching translations
25
+ */
26
+ this.translationUrl = '';
27
+ /**
28
+ * Flag indicating whether the password reset feature is enabled
29
+ */
30
+ this.passwordReset = 'false';
31
+ /**
32
+ * Regex options for user email validation
33
+ */
34
+ this.userEmailRegexOptions = 'i';
35
+ /**
36
+ * User phone regex options
37
+ */
38
+ this.userPhoneRegexOptions = '';
39
+ /**
40
+ * Regex options for password validation
41
+ */
42
+ this.passwordRegexOptions = '';
43
+ /**
44
+ * Flag to determine if the component uses version 2 of the API
45
+ */
46
+ this.version = 'gm16';
47
+ /**
48
+ * If set to true, login will be done by phone number, else by username/email
49
+ */
50
+ this.loginByPhoneNumber = 'false';
51
+ /**
52
+ * User email or username entered in the form
53
+ */
54
+ this.userNameEmail = '';
55
+ /**
56
+ * Password entered in the form
57
+ */
58
+ this.userPassword = '';
59
+ /**
60
+ * Flag to indicate whether the entered email is valid
61
+ */
62
+ this.isValidUserEmail = true;
63
+ /**
64
+ * User phone entered in the form
65
+ */
66
+ this.userPhone = '';
67
+ /**
68
+ * User prefix entered in the form
69
+ */
70
+ this.userPrefix = '';
71
+ /**
72
+ * Flag to indicate whether the entered password is valid
73
+ */
74
+ this.isValidPassword = true;
75
+ /**
76
+ * Flag to indicate whether the entered phone is valid
77
+ */
78
+ this.isValidUserPhone = true;
79
+ /**
80
+ * Toggles visibility of the password field
81
+ */
82
+ this.isPasswordVisible = false;
83
+ /**
84
+ * Stores error message from the API
85
+ */
86
+ this.errorMessage = '';
87
+ /**
88
+ * Indicates whether an error has occurred
89
+ */
90
+ this.hasError = false;
91
+ /**
92
+ * Boolean for preventing user for clicking multiple times the login button
93
+ */
94
+ this.isLoginLoading = false;
95
+ this.errorCode = '';
28
96
  /**
29
97
  * Fetch phone prefixes from the API
30
98
  */
@@ -267,33 +335,6 @@ export class UserLogin {
267
335
  this.resetPassword = () => {
268
336
  window.postMessage({ type: "NavForgotPassword" }, window.location.href);
269
337
  };
270
- this.endpoint = '';
271
- this.lang = 'en';
272
- this.clientStyling = '';
273
- this.clientStylingUrl = '';
274
- this.translationUrl = '';
275
- this.passwordReset = 'false';
276
- this.userEmailRegex = undefined;
277
- this.userEmailRegexOptions = 'i';
278
- this.userPhoneRegex = undefined;
279
- this.userPhoneRegexOptions = '';
280
- this.passwordRegex = undefined;
281
- this.passwordRegexOptions = '';
282
- this.version = 'gm16';
283
- this.loginByPhoneNumber = 'false';
284
- this.userNameEmail = '';
285
- this.userPassword = '';
286
- this.isValidUserEmail = true;
287
- this.userPhone = '';
288
- this.userPrefix = '';
289
- this.isValidPassword = true;
290
- this.isValidUserPhone = true;
291
- this.isPasswordVisible = false;
292
- this.limitStylingAppends = false;
293
- this.errorMessage = '';
294
- this.hasError = false;
295
- this.userPrefixOptions = undefined;
296
- this.isLoginLoading = false;
297
338
  }
298
339
  /**
299
340
  * Watch for changes in the translation URL and fetch new translations
@@ -307,9 +348,10 @@ export class UserLogin {
307
348
  * @param newValue - new client styling
308
349
  * @param oldValue - previous client styling
309
350
  */
310
- handleStylingChange(newValue, oldValue) {
311
- if (newValue !== oldValue)
312
- this.setClientStyling();
351
+ handleClientStylingChange(newValue, oldValue) {
352
+ if (newValue != oldValue) {
353
+ setClientStyling(this.stylingContainer, this.clientStyling);
354
+ }
313
355
  }
314
356
  /**
315
357
  * Watch for changes in the client styling URL and fetch the new CSS
@@ -317,9 +359,11 @@ export class UserLogin {
317
359
  * @param newValue - new client styling URL
318
360
  * @param oldValue - previous client styling URL
319
361
  */
320
- handleStylingUrlChange(newValue, oldValue) {
321
- if (newValue !== oldValue)
322
- this.setClientStylingURL();
362
+ handleClientStylingUrlChange(newValue, oldValue) {
363
+ if (newValue != oldValue) {
364
+ if (this.clientStylingUrl)
365
+ setClientStylingURL(this.stylingContainer, this.clientStylingUrl);
366
+ }
323
367
  }
324
368
  /**
325
369
  * Lifecycle method: Fetch translations on component load
@@ -336,25 +380,25 @@ export class UserLogin {
336
380
  * Lifecycle method: Set up event listeners after the component is rendered
337
381
  */
338
382
  componentDidLoad() {
383
+ if (this.stylingContainer) {
384
+ if (window.emMessageBus != undefined) {
385
+ setStreamStyling(this.stylingContainer, `${this.mbSource}.Style`, this.stylingSubscription);
386
+ }
387
+ else {
388
+ if (this.clientStyling)
389
+ setClientStyling(this.stylingContainer, this.clientStyling);
390
+ if (this.clientStylingUrl)
391
+ setClientStylingURL(this.stylingContainer, this.clientStylingUrl);
392
+ }
393
+ }
339
394
  window.addEventListener('LoginCredentials', this.autofillCredentialsHandler);
340
395
  window.postMessage({ type: 'UserLoginDidLoad' });
341
396
  }
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
397
  /**
355
398
  * Lifecycle method: Clean up event listeners when the component is removed
356
399
  */
357
400
  disconnectedCallback() {
401
+ this.stylingSubscription && this.stylingSubscription.unsubscribe();
358
402
  window.removeEventListener('LoginCredentials', this.autofillCredentialsHandler);
359
403
  }
360
404
  /**
@@ -399,20 +443,20 @@ export class UserLogin {
399
443
  * Render function
400
444
  */
401
445
  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'
446
+ let visibilityIcon = h("span", { key: '71afd6ceaadffb85628b778461b29de0902828ea', class: "InputIcon" }, this.isPasswordVisible &&
447
+ h("svg", { key: '6a225b596b01f40e27905815fd0d9ffba26cfdf0', 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: 'c9a519cf32a8091f4c300a772d29962a082830a2', transform: "translate(-110.856 -23.242)" }, h("circle", { key: '66e1c978ceeb22f0e253043299afad694e81ad63', class: "PasswordVisibilityIcon", cx: "0.05", cy: "0.05", r: "0.05", transform: "translate(121.017 31.148)" }), h("g", { key: '119088e31332f37b4a5e7dc217076865367f3f0f', transform: "translate(117.499 27.37)" }, h("path", { key: '3c681ad519dd9c44a76d9a7492defa6090b10de2', 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: '848eec923e9836a2afdb22c10e31880722303872', 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: '9e4cba160d9616ebf07bafd444f75a88ce206727', transform: "translate(110.856 24.899)" }, h("path", { key: '5e10308f7dfb63ebcd9cc79a889bd294d350cc70', 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: '8edfb9e3cd9a5311ff6110d8b3ee259b3b147948', 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: '49043741301adab184dc1d59991ef3b27b0ccf06', class: "PasswordVisibilityIcon", width: "0.972", height: "15.861", rx: "0.486", transform: "translate(114.827 23.858) rotate(-39.315)" }))), !this.isPasswordVisible &&
448
+ h("svg", { key: 'd2d81b2e62b82d727f3cf213e8648b1234756d24', 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: 'c339af52be1114881a0b86c5cc123f7416cf93fc', transform: "translate(-14.185 -27.832)" }, h("path", { key: 'd2943c5428f9b1c614456174a9a61e2218a976c9', 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: '1eb8d4910f1e4cf0ef54c2c7e90c9c3682931c9c', class: "PasswordVisibilityIcon", cx: "2.779", cy: "2.779", r: "2.779", transform: "translate(20.827 30.303)" }))));
449
+ let userIdentification = h("div", { key: '143c5be0c352d46e26842a815ed6a973121fd3f9', class: "FormBox" }, h("div", { key: '33f8723225e7d92f9be23787dc7ac596e68ef179', class: "FormValue" }, this.loginByPhoneNumber === 'true'
406
450
  ? 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
451
  h("p", { class: "InvalidField" }, translate('invalidField', this.lang)))
408
452
  : 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)) ||
453
+ h("p", { class: "InvalidField" }, translate('invalidField', this.lang))), h("div", { key: '9419d55bcd0ad2b4150230adffbc91ab78a659de', class: (!this.isValidPassword || this.hasError) ? 'InputBox InputInvalidBox' : 'InputBox' }, visibilityIcon, h("input", { key: '6d19dad4378cf2017b23eb178afe965024959efd', type: this.isPasswordVisible ? "text" : "password", placeholder: '', value: this.userPassword, onFocus: this.handleInputChangePartial('password'), onInput: this.handleInputChangePartial('password'), autocapitalize: "none", required: true }), h("label", { key: 'd0de7cc9e8eda5a7394c4c9331187ffb624a4f52', class: (this.userPassword ? 'FieldFilledIn' : '') + ' ' + (!this.isValidPassword || this.hasError ? 'FieldInvalid' : '') }, translate('password', this.lang)), !this.isValidPassword &&
454
+ h("p", { key: 'd50953d4f715cee928867a225e761e1e1f1c79d2', class: "InvalidField" }, translate('invalidField', this.lang))), this.passwordReset == 'true' &&
455
+ h("div", { key: '473140822bffab203e72484a412473b43c9489cb', class: "ForgotPassword" }, h("button", { key: '2a70704da11f44d41dd4a5cacef0cc9c16e502cd', onClick: this.resetPassword }, translate('forgotPassword', this.lang))), h("button", { key: 'f7e805bd942e78cedaf13386e3c2c28d77ca838e', disabled: ((this.loginByPhoneNumber !== 'true' && (!this.isValidUserEmail || !this.userNameEmail)) ||
412
456
  (this.loginByPhoneNumber === 'true' && (!this.isValidUserPhone || !this.userPhone || !this.userPrefix)) ||
413
457
  !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);
458
+ h("p", { key: '82d4a1726632e6f131f95c0ab90f92b76a6acbf4', class: "CredentialsError" }, this.errorMessage)));
459
+ return h("section", { key: 'dd20c1edeb5425b4173fe86dd339d46aff0884db', ref: el => this.stylingContainer = el }, userIdentification);
416
460
  }
417
461
  static get is() { return "user-login"; }
418
462
  static get encapsulation() { return "shadow"; }
@@ -442,6 +486,8 @@ export class UserLogin {
442
486
  "tags": [],
443
487
  "text": "API endpoint URL for login requests"
444
488
  },
489
+ "getter": false,
490
+ "setter": false,
445
491
  "attribute": "endpoint",
446
492
  "reflect": true,
447
493
  "defaultValue": "''"
@@ -460,6 +506,8 @@ export class UserLogin {
460
506
  "tags": [],
461
507
  "text": "Language code for translations (default is 'en')"
462
508
  },
509
+ "getter": false,
510
+ "setter": false,
463
511
  "attribute": "lang",
464
512
  "reflect": true,
465
513
  "defaultValue": "'en'"
@@ -478,6 +526,8 @@ export class UserLogin {
478
526
  "tags": [],
479
527
  "text": "Inline CSS styling provided by the client"
480
528
  },
529
+ "getter": false,
530
+ "setter": false,
481
531
  "attribute": "client-styling",
482
532
  "reflect": true,
483
533
  "defaultValue": "''"
@@ -496,6 +546,8 @@ export class UserLogin {
496
546
  "tags": [],
497
547
  "text": "URL to load additional CSS styling"
498
548
  },
549
+ "getter": false,
550
+ "setter": false,
499
551
  "attribute": "client-styling-url",
500
552
  "reflect": true,
501
553
  "defaultValue": "''"
@@ -514,6 +566,8 @@ export class UserLogin {
514
566
  "tags": [],
515
567
  "text": "URL for fetching translations"
516
568
  },
569
+ "getter": false,
570
+ "setter": false,
517
571
  "attribute": "translation-url",
518
572
  "reflect": true,
519
573
  "defaultValue": "''"
@@ -532,6 +586,8 @@ export class UserLogin {
532
586
  "tags": [],
533
587
  "text": "Flag indicating whether the password reset feature is enabled"
534
588
  },
589
+ "getter": false,
590
+ "setter": false,
535
591
  "attribute": "password-reset",
536
592
  "reflect": true,
537
593
  "defaultValue": "'false'"
@@ -550,6 +606,8 @@ export class UserLogin {
550
606
  "tags": [],
551
607
  "text": "Regular expression for validating the user email"
552
608
  },
609
+ "getter": false,
610
+ "setter": false,
553
611
  "attribute": "user-email-regex",
554
612
  "reflect": true
555
613
  },
@@ -567,6 +625,8 @@ export class UserLogin {
567
625
  "tags": [],
568
626
  "text": "Regex options for user email validation"
569
627
  },
628
+ "getter": false,
629
+ "setter": false,
570
630
  "attribute": "user-email-regex-options",
571
631
  "reflect": true,
572
632
  "defaultValue": "'i'"
@@ -585,6 +645,8 @@ export class UserLogin {
585
645
  "tags": [],
586
646
  "text": "User phone regex"
587
647
  },
648
+ "getter": false,
649
+ "setter": false,
588
650
  "attribute": "user-phone-regex",
589
651
  "reflect": true
590
652
  },
@@ -602,6 +664,8 @@ export class UserLogin {
602
664
  "tags": [],
603
665
  "text": "User phone regex options"
604
666
  },
667
+ "getter": false,
668
+ "setter": false,
605
669
  "attribute": "user-phone-regex-options",
606
670
  "reflect": true,
607
671
  "defaultValue": "''"
@@ -620,6 +684,8 @@ export class UserLogin {
620
684
  "tags": [],
621
685
  "text": "Regular expression for validating the password"
622
686
  },
687
+ "getter": false,
688
+ "setter": false,
623
689
  "attribute": "password-regex",
624
690
  "reflect": true
625
691
  },
@@ -637,6 +703,8 @@ export class UserLogin {
637
703
  "tags": [],
638
704
  "text": "Regex options for password validation"
639
705
  },
706
+ "getter": false,
707
+ "setter": false,
640
708
  "attribute": "password-regex-options",
641
709
  "reflect": true,
642
710
  "defaultValue": "''"
@@ -655,6 +723,8 @@ export class UserLogin {
655
723
  "tags": [],
656
724
  "text": "Flag to determine if the component uses version 2 of the API"
657
725
  },
726
+ "getter": false,
727
+ "setter": false,
658
728
  "attribute": "version",
659
729
  "reflect": true,
660
730
  "defaultValue": "'gm16'"
@@ -673,9 +743,30 @@ export class UserLogin {
673
743
  "tags": [],
674
744
  "text": "If set to true, login will be done by phone number, else by username/email"
675
745
  },
746
+ "getter": false,
747
+ "setter": false,
676
748
  "attribute": "login-by-phone-number",
677
749
  "reflect": true,
678
750
  "defaultValue": "'false'"
751
+ },
752
+ "mbSource": {
753
+ "type": "string",
754
+ "mutable": false,
755
+ "complexType": {
756
+ "original": "string",
757
+ "resolved": "string",
758
+ "references": {}
759
+ },
760
+ "required": false,
761
+ "optional": false,
762
+ "docs": {
763
+ "tags": [],
764
+ "text": ""
765
+ },
766
+ "getter": false,
767
+ "setter": false,
768
+ "attribute": "mb-source",
769
+ "reflect": true
679
770
  }
680
771
  };
681
772
  }
@@ -689,7 +780,6 @@ export class UserLogin {
689
780
  "isValidPassword": {},
690
781
  "isValidUserPhone": {},
691
782
  "isPasswordVisible": {},
692
- "limitStylingAppends": {},
693
783
  "errorMessage": {},
694
784
  "hasError": {},
695
785
  "userPrefixOptions": {},
@@ -702,10 +792,10 @@ export class UserLogin {
702
792
  "methodName": "handleNewTranslations"
703
793
  }, {
704
794
  "propName": "clientStyling",
705
- "methodName": "handleStylingChange"
795
+ "methodName": "handleClientStylingChange"
706
796
  }, {
707
797
  "propName": "clientStylingUrl",
708
- "methodName": "handleStylingUrlChange"
798
+ "methodName": "handleClientStylingUrlChange"
709
799
  }];
710
800
  }
711
801
  }