@everymatrix/user-login 1.54.12 → 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.
@@ -21,7 +21,7 @@ function _interopNamespace(e) {
21
21
  }
22
22
 
23
23
  const NAMESPACE = 'user-login';
24
- const BUILD = /* user-login */ { allRenderFn: true, appendChildSlotFix: false, asyncLoading: true, asyncQueue: false, attachStyles: true, cloneNodeFix: false, cmpDidLoad: true, cmpDidRender: true, cmpDidUnload: false, cmpDidUpdate: false, cmpShouldUpdate: false, cmpWillLoad: true, cmpWillRender: false, cmpWillUpdate: false, connectedCallback: false, constructableCSS: true, cssAnnotations: true, devTools: false, disconnectedCallback: true, element: false, event: false, experimentalScopedSlotChanges: false, experimentalSlotFixes: false, formAssociated: false, hasRenderFn: true, hostListener: false, hostListenerTarget: false, hostListenerTargetBody: false, hostListenerTargetDocument: false, hostListenerTargetParent: false, hostListenerTargetWindow: false, hotModuleReplacement: false, hydrateClientSide: false, hydrateServerSide: false, hydratedAttribute: false, hydratedClass: true, hydratedSelectorName: "hydrated", initializeNextTick: false, invisiblePrehydration: true, isDebug: false, isDev: false, isTesting: false, lazyLoad: true, lifecycle: true, lifecycleDOMEvents: false, member: true, method: false, mode: false, modernPropertyDecls: false, observeAttribute: true, profile: false, prop: true, propBoolean: false, propMutable: true, propNumber: false, propString: true, reflect: true, scoped: false, scopedSlotTextContentFix: false, scriptDataOpts: false, shadowDelegatesFocus: false, shadowDom: true, slot: false, slotChildNodesFix: false, slotRelocation: false, state: true, style: true, svg: true, taskQueue: true, transformTagName: false, updatable: true, vdomAttribute: true, vdomClass: true, vdomFunctional: false, vdomKey: true, vdomListener: true, vdomPropOrAttr: true, vdomRef: true, vdomRender: true, vdomStyle: false, vdomText: true, vdomXlink: false, watchCallback: true };
24
+ const BUILD = /* user-login */ { allRenderFn: true, appendChildSlotFix: false, asyncLoading: true, asyncQueue: false, attachStyles: true, cloneNodeFix: false, cmpDidLoad: true, cmpDidRender: false, cmpDidUnload: false, cmpDidUpdate: false, cmpShouldUpdate: false, cmpWillLoad: true, cmpWillRender: false, cmpWillUpdate: false, connectedCallback: false, constructableCSS: true, cssAnnotations: true, devTools: false, disconnectedCallback: true, element: false, event: false, experimentalScopedSlotChanges: false, experimentalSlotFixes: false, formAssociated: false, hasRenderFn: true, hostListener: false, hostListenerTarget: false, hostListenerTargetBody: false, hostListenerTargetDocument: false, hostListenerTargetParent: false, hostListenerTargetWindow: false, hotModuleReplacement: false, hydrateClientSide: false, hydrateServerSide: false, hydratedAttribute: false, hydratedClass: true, hydratedSelectorName: "hydrated", initializeNextTick: false, invisiblePrehydration: true, isDebug: false, isDev: false, isTesting: false, lazyLoad: true, lifecycle: true, lifecycleDOMEvents: false, member: true, method: false, mode: false, modernPropertyDecls: false, observeAttribute: true, profile: false, prop: true, propBoolean: false, propMutable: true, propNumber: false, propString: true, reflect: true, scoped: false, scopedSlotTextContentFix: false, scriptDataOpts: false, shadowDelegatesFocus: false, shadowDom: true, slot: false, slotChildNodesFix: false, slotRelocation: false, state: true, style: true, svg: true, taskQueue: true, transformTagName: false, updatable: true, vdomAttribute: true, vdomClass: true, vdomFunctional: false, vdomKey: true, vdomListener: true, vdomPropOrAttr: true, vdomRef: true, vdomRender: true, vdomStyle: false, vdomText: true, vdomXlink: false, watchCallback: true };
25
25
 
26
26
  /*
27
27
  Stencil Client Platform v4.26.0 | MIT Licensed | https://stenciljs.com
@@ -874,9 +874,6 @@ var postUpdateComponent = (hostRef) => {
874
874
  const endPostUpdate = createTime("postUpdate", tagName);
875
875
  const instance = hostRef.$lazyInstance$ ;
876
876
  const ancestorComponent = hostRef.$ancestorComponent$;
877
- {
878
- safeCall(instance, "componentDidRender", void 0, elm);
879
- }
880
877
  if (!(hostRef.$flags$ & 64 /* hasLoadedComponent */)) {
881
878
  hostRef.$flags$ |= 64 /* hasLoadedComponent */;
882
879
  {
@@ -2,13 +2,13 @@
2
2
 
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
- const index = require('./index-2f8c9e3a.js');
5
+ const index = require('./index-a6009b28.js');
6
6
  const appGlobals = require('./app-globals-3a1e7e63.js');
7
7
 
8
8
  const defineCustomElements = async (win, options) => {
9
9
  if (typeof window === 'undefined') return undefined;
10
10
  await appGlobals.globalScripts();
11
- 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);
11
+ 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);
12
12
  };
13
13
 
14
14
  exports.setNonce = index.setNonce;
@@ -2,7 +2,7 @@
2
2
 
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
- const index = require('./index-2f8c9e3a.js');
5
+ const index = require('./index-a6009b28.js');
6
6
 
7
7
  const DEFAULT_LANGUAGE = 'en';
8
8
  const TRANSLATIONS = {
@@ -204,6 +204,63 @@ const translate$1 = (key, customLang, values) => {
204
204
  return translation;
205
205
  };
206
206
 
207
+ /**
208
+ * @name setClientStyling
209
+ * @description Method used to create and append to the passed element of the widget a style element with the content received
210
+ * @param {HTMLElement} stylingContainer The reference element of the widget
211
+ * @param {string} clientStyling The style content
212
+ */
213
+ function setClientStyling(stylingContainer, clientStyling) {
214
+ if (stylingContainer) {
215
+ const sheet = document.createElement('style');
216
+ sheet.innerHTML = clientStyling;
217
+ stylingContainer.appendChild(sheet);
218
+ }
219
+ }
220
+
221
+ /**
222
+ * @name setClientStylingURL
223
+ * @description Method used to create and append to the passed element of the widget a style element with the content fetched from a given URL
224
+ * @param {HTMLElement} stylingContainer The reference element of the widget
225
+ * @param {string} clientStylingUrl The URL of the style content
226
+ */
227
+ function setClientStylingURL(stylingContainer, clientStylingUrl) {
228
+ const url = new URL(clientStylingUrl);
229
+
230
+ fetch(url.href)
231
+ .then((res) => res.text())
232
+ .then((data) => {
233
+ const cssFile = document.createElement('style');
234
+ cssFile.innerHTML = data;
235
+ if (stylingContainer) {
236
+ stylingContainer.appendChild(cssFile);
237
+ }
238
+ })
239
+ .catch((err) => {
240
+ console.error('There was an error while trying to load client styling from URL', err);
241
+ });
242
+ }
243
+
244
+ /**
245
+ * @name setStreamLibrary
246
+ * @description Method used to create and append to the passed element of the widget a style element with content fetched from the MessageBus
247
+ * @param {HTMLElement} stylingContainer The highest element of the widget
248
+ * @param {string} domain The domain from where the content should be fetched (e.g. 'Casino.Style', 'App.Style', 'casino-footer.style', etc.)
249
+ * @param {ref} subscription A reference to a variable where the subscription should be saved for unsubscribing when no longer needed
250
+ */
251
+ function setStreamStyling(stylingContainer, domain, subscription) {
252
+ if (window.emMessageBus) {
253
+ const sheet = document.createElement('style');
254
+
255
+ window.emMessageBus.subscribe(domain, (data) => {
256
+ sheet.innerHTML = data;
257
+ if (stylingContainer) {
258
+ stylingContainer.appendChild(sheet);
259
+ }
260
+ });
261
+ }
262
+ }
263
+
207
264
  /**
208
265
  * @license
209
266
  * Copyright (c) 2021 - 2024 Vaadin Ltd.
@@ -219,7 +276,7 @@ function dashToCamelCase$1(dash) {
219
276
 
220
277
  const experimentalMap = {};
221
278
 
222
- function defineCustomElement(CustomElement, version = '24.6.4') {
279
+ function defineCustomElement(CustomElement, version = '24.6.5') {
223
280
  Object.defineProperty(CustomElement, 'version', {
224
281
  get() {
225
282
  return version;
@@ -13430,6 +13487,20 @@ class IronListAdapter {
13430
13487
  this.__resizeObserver.observe(this.scrollTarget);
13431
13488
  this.scrollTarget.addEventListener('scroll', () => this._scrollHandler());
13432
13489
 
13490
+ const attachObserver = new ResizeObserver(([{ contentRect }]) => {
13491
+ const isHidden = contentRect.width === 0 && contentRect.height === 0;
13492
+ if (!isHidden && this.__scrollTargetHidden && this.scrollTarget.scrollTop !== this._scrollPosition) {
13493
+ // When removing element from DOM, its scroll position is lost and
13494
+ // virtualizer doesn't re-render when adding it to the DOM again.
13495
+ // Restore scroll position when the scroll target becomes visible,
13496
+ // which is the case e.g. when virtualizer is used inside a dialog.
13497
+ this.scrollTarget.scrollTop = this._scrollPosition;
13498
+ }
13499
+
13500
+ this.__scrollTargetHidden = isHidden;
13501
+ });
13502
+ attachObserver.observe(this.scrollTarget);
13503
+
13433
13504
  this._scrollLineHeight = this._getScrollLineHeight();
13434
13505
  this.scrollTarget.addEventListener('wheel', (e) => this.__onWheel(e));
13435
13506
 
@@ -21886,10 +21957,6 @@ const UserLogin = class {
21886
21957
  * Toggles visibility of the password field
21887
21958
  */
21888
21959
  this.isPasswordVisible = false;
21889
- /**
21890
- * Internal flag to prevent duplicate client styling appends
21891
- */
21892
- this.limitStylingAppends = false;
21893
21960
  /**
21894
21961
  * Stores error message from the API
21895
21962
  */
@@ -21903,27 +21970,6 @@ const UserLogin = class {
21903
21970
  */
21904
21971
  this.isLoginLoading = false;
21905
21972
  this.errorCode = '';
21906
- /**
21907
- * Apply inline client styling
21908
- */
21909
- this.setClientStyling = () => {
21910
- let sheet = document.createElement('style');
21911
- sheet.innerHTML = this.clientStyling;
21912
- this.stylingContainer.appendChild(sheet);
21913
- };
21914
- /**
21915
- * Fetch and apply CSS from a provided URL
21916
- */
21917
- this.setClientStylingURL = () => {
21918
- let url = new URL(this.clientStylingUrl);
21919
- let cssFile = document.createElement('style');
21920
- fetch(url.href)
21921
- .then((res) => res.text())
21922
- .then((data) => {
21923
- cssFile.innerHTML = data;
21924
- setTimeout(() => { this.stylingContainer.appendChild(cssFile); }, 1);
21925
- });
21926
- };
21927
21973
  /**
21928
21974
  * Fetch phone prefixes from the API
21929
21975
  */
@@ -22179,9 +22225,10 @@ const UserLogin = class {
22179
22225
  * @param newValue - new client styling
22180
22226
  * @param oldValue - previous client styling
22181
22227
  */
22182
- handleStylingChange(newValue, oldValue) {
22183
- if (newValue !== oldValue)
22184
- this.setClientStyling();
22228
+ handleClientStylingChange(newValue, oldValue) {
22229
+ if (newValue != oldValue) {
22230
+ setClientStyling(this.stylingContainer, this.clientStyling);
22231
+ }
22185
22232
  }
22186
22233
  /**
22187
22234
  * Watch for changes in the client styling URL and fetch the new CSS
@@ -22189,9 +22236,11 @@ const UserLogin = class {
22189
22236
  * @param newValue - new client styling URL
22190
22237
  * @param oldValue - previous client styling URL
22191
22238
  */
22192
- handleStylingUrlChange(newValue, oldValue) {
22193
- if (newValue !== oldValue)
22194
- this.setClientStylingURL();
22239
+ handleClientStylingUrlChange(newValue, oldValue) {
22240
+ if (newValue != oldValue) {
22241
+ if (this.clientStylingUrl)
22242
+ setClientStylingURL(this.stylingContainer, this.clientStylingUrl);
22243
+ }
22195
22244
  }
22196
22245
  /**
22197
22246
  * Lifecycle method: Fetch translations on component load
@@ -22208,25 +22257,25 @@ const UserLogin = class {
22208
22257
  * Lifecycle method: Set up event listeners after the component is rendered
22209
22258
  */
22210
22259
  componentDidLoad() {
22260
+ if (this.stylingContainer) {
22261
+ if (window.emMessageBus != undefined) {
22262
+ setStreamStyling(this.stylingContainer, `${this.mbSource}.Style`);
22263
+ }
22264
+ else {
22265
+ if (this.clientStyling)
22266
+ setClientStyling(this.stylingContainer, this.clientStyling);
22267
+ if (this.clientStylingUrl)
22268
+ setClientStylingURL(this.stylingContainer, this.clientStylingUrl);
22269
+ }
22270
+ }
22211
22271
  window.addEventListener('LoginCredentials', this.autofillCredentialsHandler);
22212
22272
  window.postMessage({ type: 'UserLoginDidLoad' });
22213
22273
  }
22214
- /**
22215
- * Lifecycle method: Apply client styling after the component renders
22216
- */
22217
- componentDidRender() {
22218
- if (!this.limitStylingAppends && this.stylingContainer) {
22219
- if (this.clientStyling)
22220
- this.setClientStyling();
22221
- if (this.clientStylingUrl)
22222
- this.setClientStylingURL();
22223
- this.limitStylingAppends = true;
22224
- }
22225
- }
22226
22274
  /**
22227
22275
  * Lifecycle method: Clean up event listeners when the component is removed
22228
22276
  */
22229
22277
  disconnectedCallback() {
22278
+ this.stylingSubscription && this.stylingSubscription.unsubscribe();
22230
22279
  window.removeEventListener('LoginCredentials', this.autofillCredentialsHandler);
22231
22280
  }
22232
22281
  /**
@@ -22271,25 +22320,25 @@ const UserLogin = class {
22271
22320
  * Render function
22272
22321
  */
22273
22322
  render() {
22274
- let visibilityIcon = index.h("span", { key: '08e1b988b208738091d8e78fa1f73eb3c58076ba', class: "InputIcon" }, this.isPasswordVisible &&
22275
- index.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" }, index.h("g", { key: '24b728bd380f3661f1c382888aa4f0084bfe04c7', transform: "translate(-110.856 -23.242)" }, index.h("circle", { key: 'c0267c20cdca0b96a0ceedad3f92c41e3b3b6071', class: "PasswordVisibilityIcon", cx: "0.05", cy: "0.05", r: "0.05", transform: "translate(121.017 31.148)" }), index.h("g", { key: '87875ad14720b3da54b3c94ce020d62cb6eee8c4', transform: "translate(117.499 27.37)" }, index.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)" }), index.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)" })), index.h("g", { key: '996cd3f037a25e7e692a62e28f8bda18945291f8', transform: "translate(110.856 24.899)" }, index.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)" }), index.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)" })), index.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 &&
22276
- index.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" }, index.h("g", { key: 'c04390a04451b06ea6bb7e1ca7312d564e6e4b39', transform: "translate(-14.185 -27.832)" }, index.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)" }), index.h("circle", { key: 'e8ca3fd3f0dd3eef24071c0d13a874b04101a2c8', class: "PasswordVisibilityIcon", cx: "2.779", cy: "2.779", r: "2.779", transform: "translate(20.827 30.303)" }))));
22277
- let userIdentification = index.h("div", { key: '252275c3e3b91c3e7fa995d824e4c6d3b1a4d4e0', class: "FormBox" }, index.h("div", { key: 'acc4edcaa9cfb7608bd0a81245895c7e59473310', class: "FormValue" }, this.loginByPhoneNumber === 'true'
22323
+ let visibilityIcon = index.h("span", { key: '71afd6ceaadffb85628b778461b29de0902828ea', class: "InputIcon" }, this.isPasswordVisible &&
22324
+ index.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" }, index.h("g", { key: 'c9a519cf32a8091f4c300a772d29962a082830a2', transform: "translate(-110.856 -23.242)" }, index.h("circle", { key: '66e1c978ceeb22f0e253043299afad694e81ad63', class: "PasswordVisibilityIcon", cx: "0.05", cy: "0.05", r: "0.05", transform: "translate(121.017 31.148)" }), index.h("g", { key: '119088e31332f37b4a5e7dc217076865367f3f0f', transform: "translate(117.499 27.37)" }, index.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)" }), index.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)" })), index.h("g", { key: '9e4cba160d9616ebf07bafd444f75a88ce206727', transform: "translate(110.856 24.899)" }, index.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)" }), index.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)" })), index.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 &&
22325
+ index.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" }, index.h("g", { key: 'c339af52be1114881a0b86c5cc123f7416cf93fc', transform: "translate(-14.185 -27.832)" }, index.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)" }), index.h("circle", { key: '1eb8d4910f1e4cf0ef54c2c7e90c9c3682931c9c', class: "PasswordVisibilityIcon", cx: "2.779", cy: "2.779", r: "2.779", transform: "translate(20.827 30.303)" }))));
22326
+ let userIdentification = index.h("div", { key: '143c5be0c352d46e26842a815ed6a973121fd3f9', class: "FormBox" }, index.h("div", { key: '33f8723225e7d92f9be23787dc7ac596e68ef179', class: "FormValue" }, this.loginByPhoneNumber === 'true'
22278
22327
  ? index.h("div", { class: (!this.isValidUserPhone || this.hasError) ? 'InputBox InputInvalidBox' : 'InputBox ' }, index.h("div", { class: "PhoneInputBox" }, index.h("div", { class: "PrefixBox" }, index.h("vaadin-combo-box", { items: this.userPrefixOptions, value: this.userPrefix, onChange: this.handleInputChangePartial('prefix') }), index.h("label", { class: (this.userPrefix ? 'FieldFilledIn' : '') + ' ' + (!this.isValidUserPhone || this.hasError ? 'FieldInvalid' : '') }, translate$1('userPrefix', this.lang))), index.h("div", { class: "PhoneBox" }, index.h("input", { type: "text", placeholder: '', value: this.userPhone, onFocus: this.handleInputChangePartial('phone'), onInput: this.handleInputChangePartial('phone'), autocapitalize: "none", required: true }), index.h("label", { class: (this.userPhone ? 'FieldFilledIn' : '') + ' ' + (!this.isValidUserPhone || this.hasError ? 'FieldInvalid' : '') }, translate$1('userPhone', this.lang)))), !this.isValidUserPhone &&
22279
22328
  index.h("p", { class: "InvalidField" }, translate$1('invalidField', this.lang)))
22280
22329
  : index.h("div", { class: (!this.isValidUserEmail || this.hasError) ? 'InputBox InputInvalidBox' : 'InputBox' }, index.h("input", { type: "text", placeholder: '', value: this.userNameEmail, onFocus: this.handleInputChangePartial('user'), onInput: this.handleInputChangePartial('user'), autocapitalize: "none", required: true }), index.h("label", { class: (this.userNameEmail ? 'FieldFilledIn' : '') + ' ' + (!this.isValidUserEmail || this.hasError ? 'FieldInvalid' : '') }, translate$1('userEmail', this.lang)), !this.isValidUserEmail &&
22281
- index.h("p", { class: "InvalidField" }, translate$1('invalidField', this.lang))), index.h("div", { key: '3857740f5455b51c30028eda6bd18ab48badf07d', class: (!this.isValidPassword || this.hasError) ? 'InputBox InputInvalidBox' : 'InputBox' }, visibilityIcon, index.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 }), index.h("label", { key: '6aed12d32525695fdecde970846aeced269c6ada', class: (this.userPassword ? 'FieldFilledIn' : '') + ' ' + (!this.isValidPassword || this.hasError ? 'FieldInvalid' : '') }, translate$1('password', this.lang)), !this.isValidPassword &&
22282
- index.h("p", { key: '49fd647b8d6bdcd58416aa8df6622d9fec2fd908', class: "InvalidField" }, translate$1('invalidField', this.lang))), this.passwordReset == 'true' &&
22283
- index.h("div", { key: '77e4d49f8d35131c7deb4cf0c4b7553c2c214917', class: "ForgotPassword" }, index.h("button", { key: '3d4578732ff4b2888d67ca502338b259f67cd6ab', onClick: this.resetPassword }, translate$1('forgotPassword', this.lang))), index.h("button", { key: 'cbd21b5e3514c26f98a57ec6d331be8d013dbc96', disabled: ((this.loginByPhoneNumber !== 'true' && (!this.isValidUserEmail || !this.userNameEmail)) ||
22330
+ index.h("p", { class: "InvalidField" }, translate$1('invalidField', this.lang))), index.h("div", { key: '9419d55bcd0ad2b4150230adffbc91ab78a659de', class: (!this.isValidPassword || this.hasError) ? 'InputBox InputInvalidBox' : 'InputBox' }, visibilityIcon, index.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 }), index.h("label", { key: 'd0de7cc9e8eda5a7394c4c9331187ffb624a4f52', class: (this.userPassword ? 'FieldFilledIn' : '') + ' ' + (!this.isValidPassword || this.hasError ? 'FieldInvalid' : '') }, translate$1('password', this.lang)), !this.isValidPassword &&
22331
+ index.h("p", { key: 'd50953d4f715cee928867a225e761e1e1f1c79d2', class: "InvalidField" }, translate$1('invalidField', this.lang))), this.passwordReset == 'true' &&
22332
+ index.h("div", { key: '473140822bffab203e72484a412473b43c9489cb', class: "ForgotPassword" }, index.h("button", { key: '2a70704da11f44d41dd4a5cacef0cc9c16e502cd', onClick: this.resetPassword }, translate$1('forgotPassword', this.lang))), index.h("button", { key: 'f7e805bd942e78cedaf13386e3c2c28d77ca838e', disabled: ((this.loginByPhoneNumber !== 'true' && (!this.isValidUserEmail || !this.userNameEmail)) ||
22284
22333
  (this.loginByPhoneNumber === 'true' && (!this.isValidUserPhone || !this.userPhone || !this.userPrefix)) ||
22285
22334
  !this.userPassword || !this.isValidPassword) || this.isLoginLoading, class: "SubmitCredentials", onClick: this.handleLogin }, translate$1('login', this.lang)), this.hasError &&
22286
- index.h("p", { key: 'bfc16dd160acda7ba5f57e861e013581a1703481', class: "CredentialsError" }, this.errorMessage)));
22287
- return index.h("section", { key: 'f283f2a8e61feac8ec3003cc88fe47cf450df66c', ref: el => this.stylingContainer = el }, userIdentification);
22335
+ index.h("p", { key: '82d4a1726632e6f131f95c0ab90f92b76a6acbf4', class: "CredentialsError" }, this.errorMessage)));
22336
+ return index.h("section", { key: 'dd20c1edeb5425b4173fe86dd339d46aff0884db', ref: el => this.stylingContainer = el }, userIdentification);
22288
22337
  }
22289
22338
  static get watchers() { return {
22290
22339
  "translationUrl": ["handleNewTranslations"],
22291
- "clientStyling": ["handleStylingChange"],
22292
- "clientStylingUrl": ["handleStylingUrlChange"]
22340
+ "clientStyling": ["handleClientStylingChange"],
22341
+ "clientStylingUrl": ["handleClientStylingUrlChange"]
22293
22342
  }; }
22294
22343
  };
22295
22344
  UserLogin.style = UserLoginStyle0;
@@ -2,7 +2,7 @@
2
2
 
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
- const index = require('./index-2f8c9e3a.js');
5
+ const index = require('./index-a6009b28.js');
6
6
  const appGlobals = require('./app-globals-3a1e7e63.js');
7
7
 
8
8
  /*
@@ -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;
@@ -1,5 +1,6 @@
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() {
@@ -79,10 +80,6 @@ export class UserLogin {
79
80
  * Toggles visibility of the password field
80
81
  */
81
82
  this.isPasswordVisible = false;
82
- /**
83
- * Internal flag to prevent duplicate client styling appends
84
- */
85
- this.limitStylingAppends = false;
86
83
  /**
87
84
  * Stores error message from the API
88
85
  */
@@ -96,27 +93,6 @@ export class UserLogin {
96
93
  */
97
94
  this.isLoginLoading = false;
98
95
  this.errorCode = '';
99
- /**
100
- * Apply inline client styling
101
- */
102
- this.setClientStyling = () => {
103
- let sheet = document.createElement('style');
104
- sheet.innerHTML = this.clientStyling;
105
- this.stylingContainer.appendChild(sheet);
106
- };
107
- /**
108
- * Fetch and apply CSS from a provided URL
109
- */
110
- this.setClientStylingURL = () => {
111
- let url = new URL(this.clientStylingUrl);
112
- let cssFile = document.createElement('style');
113
- fetch(url.href)
114
- .then((res) => res.text())
115
- .then((data) => {
116
- cssFile.innerHTML = data;
117
- setTimeout(() => { this.stylingContainer.appendChild(cssFile); }, 1);
118
- });
119
- };
120
96
  /**
121
97
  * Fetch phone prefixes from the API
122
98
  */
@@ -372,9 +348,10 @@ export class UserLogin {
372
348
  * @param newValue - new client styling
373
349
  * @param oldValue - previous client styling
374
350
  */
375
- handleStylingChange(newValue, oldValue) {
376
- if (newValue !== oldValue)
377
- this.setClientStyling();
351
+ handleClientStylingChange(newValue, oldValue) {
352
+ if (newValue != oldValue) {
353
+ setClientStyling(this.stylingContainer, this.clientStyling);
354
+ }
378
355
  }
379
356
  /**
380
357
  * Watch for changes in the client styling URL and fetch the new CSS
@@ -382,9 +359,11 @@ export class UserLogin {
382
359
  * @param newValue - new client styling URL
383
360
  * @param oldValue - previous client styling URL
384
361
  */
385
- handleStylingUrlChange(newValue, oldValue) {
386
- if (newValue !== oldValue)
387
- this.setClientStylingURL();
362
+ handleClientStylingUrlChange(newValue, oldValue) {
363
+ if (newValue != oldValue) {
364
+ if (this.clientStylingUrl)
365
+ setClientStylingURL(this.stylingContainer, this.clientStylingUrl);
366
+ }
388
367
  }
389
368
  /**
390
369
  * Lifecycle method: Fetch translations on component load
@@ -401,25 +380,25 @@ export class UserLogin {
401
380
  * Lifecycle method: Set up event listeners after the component is rendered
402
381
  */
403
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
+ }
404
394
  window.addEventListener('LoginCredentials', this.autofillCredentialsHandler);
405
395
  window.postMessage({ type: 'UserLoginDidLoad' });
406
396
  }
407
- /**
408
- * Lifecycle method: Apply client styling after the component renders
409
- */
410
- componentDidRender() {
411
- if (!this.limitStylingAppends && this.stylingContainer) {
412
- if (this.clientStyling)
413
- this.setClientStyling();
414
- if (this.clientStylingUrl)
415
- this.setClientStylingURL();
416
- this.limitStylingAppends = true;
417
- }
418
- }
419
397
  /**
420
398
  * Lifecycle method: Clean up event listeners when the component is removed
421
399
  */
422
400
  disconnectedCallback() {
401
+ this.stylingSubscription && this.stylingSubscription.unsubscribe();
423
402
  window.removeEventListener('LoginCredentials', this.autofillCredentialsHandler);
424
403
  }
425
404
  /**
@@ -464,20 +443,20 @@ export class UserLogin {
464
443
  * Render function
465
444
  */
466
445
  render() {
467
- let visibilityIcon = h("span", { key: '08e1b988b208738091d8e78fa1f73eb3c58076ba', class: "InputIcon" }, this.isPasswordVisible &&
468
- 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 &&
469
- 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)" }))));
470
- 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'
471
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 &&
472
451
  h("p", { class: "InvalidField" }, translate('invalidField', this.lang)))
473
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 &&
474
- 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 &&
475
- h("p", { key: '49fd647b8d6bdcd58416aa8df6622d9fec2fd908', class: "InvalidField" }, translate('invalidField', this.lang))), this.passwordReset == 'true' &&
476
- 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)) ||
477
456
  (this.loginByPhoneNumber === 'true' && (!this.isValidUserPhone || !this.userPhone || !this.userPrefix)) ||
478
457
  !this.userPassword || !this.isValidPassword) || this.isLoginLoading, class: "SubmitCredentials", onClick: this.handleLogin }, translate('login', this.lang)), this.hasError &&
479
- h("p", { key: 'bfc16dd160acda7ba5f57e861e013581a1703481', class: "CredentialsError" }, this.errorMessage)));
480
- 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);
481
460
  }
482
461
  static get is() { return "user-login"; }
483
462
  static get encapsulation() { return "shadow"; }
@@ -769,6 +748,25 @@ export class UserLogin {
769
748
  "attribute": "login-by-phone-number",
770
749
  "reflect": true,
771
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
772
770
  }
773
771
  };
774
772
  }
@@ -782,7 +780,6 @@ export class UserLogin {
782
780
  "isValidPassword": {},
783
781
  "isValidUserPhone": {},
784
782
  "isPasswordVisible": {},
785
- "limitStylingAppends": {},
786
783
  "errorMessage": {},
787
784
  "hasError": {},
788
785
  "userPrefixOptions": {},
@@ -795,10 +792,10 @@ export class UserLogin {
795
792
  "methodName": "handleNewTranslations"
796
793
  }, {
797
794
  "propName": "clientStyling",
798
- "methodName": "handleStylingChange"
795
+ "methodName": "handleClientStylingChange"
799
796
  }, {
800
797
  "propName": "clientStylingUrl",
801
- "methodName": "handleStylingUrlChange"
798
+ "methodName": "handleClientStylingUrlChange"
802
799
  }];
803
800
  }
804
801
  }
@@ -1,5 +1,5 @@
1
1
  const NAMESPACE = 'user-login';
2
- const BUILD = /* user-login */ { allRenderFn: true, appendChildSlotFix: false, asyncLoading: true, asyncQueue: false, attachStyles: true, cloneNodeFix: false, cmpDidLoad: true, cmpDidRender: true, cmpDidUnload: false, cmpDidUpdate: false, cmpShouldUpdate: false, cmpWillLoad: true, cmpWillRender: false, cmpWillUpdate: false, connectedCallback: false, constructableCSS: true, cssAnnotations: true, devTools: false, disconnectedCallback: true, element: false, event: false, experimentalScopedSlotChanges: false, experimentalSlotFixes: false, formAssociated: false, hasRenderFn: true, hostListener: false, hostListenerTarget: false, hostListenerTargetBody: false, hostListenerTargetDocument: false, hostListenerTargetParent: false, hostListenerTargetWindow: false, hotModuleReplacement: false, hydrateClientSide: false, hydrateServerSide: false, hydratedAttribute: false, hydratedClass: true, hydratedSelectorName: "hydrated", initializeNextTick: false, invisiblePrehydration: true, isDebug: false, isDev: false, isTesting: false, lazyLoad: true, lifecycle: true, lifecycleDOMEvents: false, member: true, method: false, mode: false, modernPropertyDecls: false, observeAttribute: true, profile: false, prop: true, propBoolean: false, propMutable: true, propNumber: false, propString: true, reflect: true, scoped: false, scopedSlotTextContentFix: false, scriptDataOpts: false, shadowDelegatesFocus: false, shadowDom: true, slot: false, slotChildNodesFix: false, slotRelocation: false, state: true, style: true, svg: true, taskQueue: true, transformTagName: false, updatable: true, vdomAttribute: true, vdomClass: true, vdomFunctional: false, vdomKey: true, vdomListener: true, vdomPropOrAttr: true, vdomRef: true, vdomRender: true, vdomStyle: false, vdomText: true, vdomXlink: false, watchCallback: true };
2
+ const BUILD = /* user-login */ { allRenderFn: true, appendChildSlotFix: false, asyncLoading: true, asyncQueue: false, attachStyles: true, cloneNodeFix: false, cmpDidLoad: true, cmpDidRender: false, cmpDidUnload: false, cmpDidUpdate: false, cmpShouldUpdate: false, cmpWillLoad: true, cmpWillRender: false, cmpWillUpdate: false, connectedCallback: false, constructableCSS: true, cssAnnotations: true, devTools: false, disconnectedCallback: true, element: false, event: false, experimentalScopedSlotChanges: false, experimentalSlotFixes: false, formAssociated: false, hasRenderFn: true, hostListener: false, hostListenerTarget: false, hostListenerTargetBody: false, hostListenerTargetDocument: false, hostListenerTargetParent: false, hostListenerTargetWindow: false, hotModuleReplacement: false, hydrateClientSide: false, hydrateServerSide: false, hydratedAttribute: false, hydratedClass: true, hydratedSelectorName: "hydrated", initializeNextTick: false, invisiblePrehydration: true, isDebug: false, isDev: false, isTesting: false, lazyLoad: true, lifecycle: true, lifecycleDOMEvents: false, member: true, method: false, mode: false, modernPropertyDecls: false, observeAttribute: true, profile: false, prop: true, propBoolean: false, propMutable: true, propNumber: false, propString: true, reflect: true, scoped: false, scopedSlotTextContentFix: false, scriptDataOpts: false, shadowDelegatesFocus: false, shadowDom: true, slot: false, slotChildNodesFix: false, slotRelocation: false, state: true, style: true, svg: true, taskQueue: true, transformTagName: false, updatable: true, vdomAttribute: true, vdomClass: true, vdomFunctional: false, vdomKey: true, vdomListener: true, vdomPropOrAttr: true, vdomRef: true, vdomRender: true, vdomStyle: false, vdomText: true, vdomXlink: false, watchCallback: true };
3
3
 
4
4
  /*
5
5
  Stencil Client Platform v4.26.0 | MIT Licensed | https://stenciljs.com
@@ -852,9 +852,6 @@ var postUpdateComponent = (hostRef) => {
852
852
  const endPostUpdate = createTime("postUpdate", tagName);
853
853
  const instance = hostRef.$lazyInstance$ ;
854
854
  const ancestorComponent = hostRef.$ancestorComponent$;
855
- {
856
- safeCall(instance, "componentDidRender", void 0, elm);
857
- }
858
855
  if (!(hostRef.$flags$ & 64 /* hasLoadedComponent */)) {
859
856
  hostRef.$flags$ |= 64 /* hasLoadedComponent */;
860
857
  {
@@ -1,11 +1,11 @@
1
- import { b as bootstrapLazy } from './index-1918fa2a.js';
2
- export { s as setNonce } from './index-1918fa2a.js';
1
+ import { b as bootstrapLazy } from './index-19313d5e.js';
2
+ export { s as setNonce } from './index-19313d5e.js';
3
3
  import { g as globalScripts } from './app-globals-0f993ce5.js';
4
4
 
5
5
  const defineCustomElements = async (win, options) => {
6
6
  if (typeof window === 'undefined') return undefined;
7
7
  await globalScripts();
8
- return bootstrapLazy([["user-login",[[1,"user-login",{"endpoint":[513],"lang":[1537],"clientStyling":[513,"client-styling"],"clientStylingUrl":[513,"client-styling-url"],"translationUrl":[513,"translation-url"],"passwordReset":[513,"password-reset"],"userEmailRegex":[513,"user-email-regex"],"userEmailRegexOptions":[513,"user-email-regex-options"],"userPhoneRegex":[513,"user-phone-regex"],"userPhoneRegexOptions":[513,"user-phone-regex-options"],"passwordRegex":[513,"password-regex"],"passwordRegexOptions":[513,"password-regex-options"],"version":[513],"loginByPhoneNumber":[513,"login-by-phone-number"],"userNameEmail":[32],"userPassword":[32],"isValidUserEmail":[32],"userPhone":[32],"userPrefix":[32],"isValidPassword":[32],"isValidUserPhone":[32],"isPasswordVisible":[32],"limitStylingAppends":[32],"errorMessage":[32],"hasError":[32],"userPrefixOptions":[32],"isLoginLoading":[32]},null,{"translationUrl":["handleNewTranslations"],"clientStyling":["handleStylingChange"],"clientStylingUrl":["handleStylingUrlChange"]}]]]], options);
8
+ return bootstrapLazy([["user-login",[[1,"user-login",{"endpoint":[513],"lang":[1537],"clientStyling":[513,"client-styling"],"clientStylingUrl":[513,"client-styling-url"],"translationUrl":[513,"translation-url"],"passwordReset":[513,"password-reset"],"userEmailRegex":[513,"user-email-regex"],"userEmailRegexOptions":[513,"user-email-regex-options"],"userPhoneRegex":[513,"user-phone-regex"],"userPhoneRegexOptions":[513,"user-phone-regex-options"],"passwordRegex":[513,"password-regex"],"passwordRegexOptions":[513,"password-regex-options"],"version":[513],"loginByPhoneNumber":[513,"login-by-phone-number"],"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);
9
9
  };
10
10
 
11
11
  export { defineCustomElements };