@everymatrix/pam-forgot-password 1.90.7 → 1.90.8

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.
@@ -1,5 +1,6 @@
1
- import { r as registerInstance, c as createEvent, h, g as getElement, H as Host } from './index-3a596979.js';
2
- export { P as pam_forgot_password } from './pam-forgot-password-a764638a.js';
1
+ import { r as registerInstance, c as createEvent, h, g as getElement, H as Host } from './index-d9386cc5.js';
2
+ import { s as setClientStyling, a as setStreamStyling, b as setClientStylingURL } from './pam-forgot-password-eafcadca.js';
3
+ export { P as pam_forgot_password } from './pam-forgot-password-eafcadca.js';
3
4
 
4
5
  const DEFAULT_LANGUAGE = 'en';
5
6
  const TRANSLATIONS = {
@@ -384,11 +385,6 @@ const CheckboxGroupInput = class {
384
385
  this.sendValidityState = createEvent(this, "sendValidityState", 7);
385
386
  this.sendInputValue = createEvent(this, "sendInputValue", 7);
386
387
  this.value = null;
387
- this.setClientStyling = () => {
388
- let sheet = document.createElement('style');
389
- sheet.innerHTML = this.clientStyling;
390
- this.stylingContainer.prepend(sheet);
391
- };
392
388
  this.name = undefined;
393
389
  this.displayName = undefined;
394
390
  this.defaultValue = '';
@@ -399,16 +395,17 @@ const CheckboxGroupInput = class {
399
395
  this.language = undefined;
400
396
  this.emitValue = undefined;
401
397
  this.clientStyling = '';
398
+ this.mbSource = undefined;
402
399
  this.errorMessage = undefined;
403
400
  this.isValid = undefined;
404
- this.limitStylingAppends = false;
405
401
  this.showTooltip = false;
406
402
  this.selectedValues = [];
407
403
  this.showCheckboxes = false;
408
404
  }
409
- handleStylingChange(newValue, oldValue) {
410
- if (newValue !== oldValue)
411
- this.setClientStyling();
405
+ handleClientStylingChange(newValue, oldValue) {
406
+ if (newValue !== oldValue) {
407
+ setClientStyling(this.stylingContainer, this.clientStyling);
408
+ }
412
409
  }
413
410
  validityChanged() {
414
411
  this.validityStateHandler({ valid: this.isValid, name: this.name });
@@ -440,16 +437,17 @@ const CheckboxGroupInput = class {
440
437
  this.showTooltip = false;
441
438
  }
442
439
  }
443
- componentDidRender() {
444
- // start custom styling area
445
- if (!this.limitStylingAppends && this.stylingContainer) {
446
- if (this.clientStyling)
447
- this.setClientStyling();
448
- this.limitStylingAppends = true;
440
+ handleClientStyling() {
441
+ if (window.emMessageBus !== undefined) {
442
+ this.stylingSubscription = setStreamStyling(this.stylingContainer, `${this.mbSource}.Style`, this.stylingSubscription, true);
443
+ return;
444
+ }
445
+ if (this.clientStyling) {
446
+ setClientStyling(this.stylingContainer, this.clientStyling);
449
447
  }
450
- // end custom styling area
451
448
  }
452
449
  componentDidLoad() {
450
+ this.handleClientStyling();
453
451
  this.inputReference = this.element.shadowRoot.querySelector('input');
454
452
  // For now this input has no validation. Send isValid as true immediately.
455
453
  //@TODO: add validation logic to it, if business reason arises.
@@ -486,14 +484,14 @@ const CheckboxGroupInput = class {
486
484
  return (h("label", { class: 'checkbox__label', htmlFor: `${this.name}__input`, slot: 'label' }, h("div", { class: 'checkbox__label-text', innerHTML: `${this.displayName} ${this.validation.mandatory ? '*' : ''}` })));
487
485
  }
488
486
  render() {
489
- return h("div", { key: '9985f4050655bc2233090f63abb0e22f2fe0b556', class: `checkboxgroup__wrapper ${this.name}__input`, ref: el => this.stylingContainer = el }, h("div", { key: '9922e45ae7ee74b137ffc8552b3d714b7e3b1f59', class: 'checkboxgroup__wrapper--flex' }, h("vaadin-checkbox", { key: 'f18bae7c3ee6df76edcde75924eb1ad51a227443', class: 'checkbox__input', checked: this.selectedValues.length === this.options.length || this.defaultValue === 'true', indeterminate: this.selectedValues.length > 0 && this.selectedValues.length < this.options.length, onChange: (e) => this.handleParentCheckbox(e) }, this.renderLabel()), this.tooltip &&
490
- h("img", { key: '3dc2ce07e4d5f8de7ed4707b5e140fb4752ca86b', class: 'checkboxgroup__tooltip-icon', src: tooltipIconSvg, alt: "", ref: (el) => this.tooltipIconReference = el, onClick: () => this.showTooltip = !this.showTooltip }), this.renderTooltip()), h("small", { key: 'd55f25f75aa20007ff58cf45b6632517f49b6c00', class: 'checkboxgroup__error-message' }, this.errorMessage), this.showCheckboxes && (h("vaadin-checkbox-group", { key: '210c3cc2868a07a403494e04336c4f3091eea0e4', theme: "vertical", value: this.selectedValues, "on-value-changed": (event) => {
487
+ return h("div", { key: '342900ae923094f2746fd43917743d01efba942e', class: `checkboxgroup__wrapper ${this.name}__input`, ref: el => this.stylingContainer = el }, h("div", { key: '8f3b470274047b355741b438a4e15c7c46504f5a', class: 'checkboxgroup__wrapper--flex' }, h("vaadin-checkbox", { key: 'c7a74f9da877304f4d71607d58eba90dd0a29de7', class: 'checkbox__input', checked: this.selectedValues.length === this.options.length || this.defaultValue === 'true', indeterminate: this.selectedValues.length > 0 && this.selectedValues.length < this.options.length, onChange: (e) => this.handleParentCheckbox(e) }, this.renderLabel()), this.tooltip &&
488
+ h("img", { key: '75d807ad544e043a2e3beed46bf0c7dfa2125324', class: 'checkboxgroup__tooltip-icon', src: tooltipIconSvg, alt: "", ref: (el) => this.tooltipIconReference = el, onClick: () => this.showTooltip = !this.showTooltip }), this.renderTooltip()), h("small", { key: '4b17e1e613c7561fb3c99f334926544ef2ba787a', class: 'checkboxgroup__error-message' }, this.errorMessage), this.showCheckboxes && (h("vaadin-checkbox-group", { key: '9a8d573a7cb48bb2d68cceec5f39f1e0886ea05f', theme: "vertical", value: this.selectedValues, "on-value-changed": (event) => {
491
489
  this.selectedValues = event.detail.value;
492
490
  } }, this.options.map((checkbox) => h("vaadin-checkbox", { class: 'checkbox__input', name: checkbox.name, value: checkbox.name, label: checkbox.displayName })))));
493
491
  }
494
492
  get element() { return getElement(this); }
495
493
  static get watchers() { return {
496
- "clientStyling": ["handleStylingChange"],
494
+ "clientStyling": ["handleClientStylingChange"],
497
495
  "isValid": ["validityChanged"],
498
496
  "selectedValues": ["setValue"],
499
497
  "emitValue": ["emitValueHandler"]
@@ -510,11 +508,6 @@ const CheckboxInput = class {
510
508
  this.sendValidityState = createEvent(this, "sendValidityState", 7);
511
509
  this.sendInputValue = createEvent(this, "sendInputValue", 7);
512
510
  this.value = '';
513
- this.setClientStyling = () => {
514
- let sheet = document.createElement('style');
515
- sheet.innerHTML = this.clientStyling;
516
- this.stylingContainer.prepend(sheet);
517
- };
518
511
  this.name = undefined;
519
512
  this.displayName = undefined;
520
513
  this.defaultValue = '';
@@ -524,14 +517,15 @@ const CheckboxInput = class {
524
517
  this.language = undefined;
525
518
  this.emitValue = undefined;
526
519
  this.clientStyling = '';
520
+ this.mbSource = undefined;
527
521
  this.errorMessage = undefined;
528
522
  this.isValid = undefined;
529
- this.limitStylingAppends = false;
530
523
  this.showTooltip = false;
531
524
  }
532
- handleStylingChange(newValue, oldValue) {
533
- if (newValue !== oldValue)
534
- this.setClientStyling();
525
+ handleClientStylingChange(newValue, oldValue) {
526
+ if (newValue !== oldValue) {
527
+ setClientStyling(this.stylingContainer, this.clientStyling);
528
+ }
535
529
  }
536
530
  validityChanged() {
537
531
  this.validityStateHandler({ valid: this.isValid, name: this.name });
@@ -556,16 +550,17 @@ const CheckboxInput = class {
556
550
  this.showTooltip = false;
557
551
  }
558
552
  }
559
- componentDidRender() {
560
- // start custom styling area
561
- if (!this.limitStylingAppends && this.stylingContainer) {
562
- if (this.clientStyling)
563
- this.setClientStyling();
564
- this.limitStylingAppends = true;
553
+ handleClientStyling() {
554
+ if (window.emMessageBus !== undefined) {
555
+ this.stylingSubscription = setStreamStyling(this.stylingContainer, `${this.mbSource}.Style`, this.stylingSubscription, true);
556
+ return;
557
+ }
558
+ if (this.clientStyling) {
559
+ setClientStyling(this.stylingContainer, this.clientStyling);
565
560
  }
566
- // end custom styling area
567
561
  }
568
562
  componentDidLoad() {
563
+ this.handleClientStyling();
569
564
  this.inputReference = this.vaadinCheckbox.querySelector('input');
570
565
  if (this.defaultValue) {
571
566
  this.value = this.defaultValue;
@@ -600,10 +595,10 @@ const CheckboxInput = class {
600
595
  return null;
601
596
  }
602
597
  render() {
603
- return (h("div", { key: '80ed581cec5bb009ea5ea009f11c6453fe24ef7b', class: `checkbox__wrapper ${this.name}__input`, ref: (el) => (this.stylingContainer = el) }, h("vaadin-checkbox", { key: '42d793f607af77435f629218f9bdac7736522bc3', class: "checkbox__input", required: this.validation.mandatory, checked: this.defaultValue === 'true', onChange: (e) => this.handleCheckbox(e), "error-message": !this.isValid && this.errorMessage, ref: (el) => (this.vaadinCheckbox = el) }, this.renderLabel()), this.tooltip && (h("img", { key: 'ce3870810ede8f3905fd8c07c0892ab0d909bab5', class: "checkboxgroup__tooltip-icon", src: tooltipIconSvg, alt: "", ref: (el) => (this.tooltipIconReference = el), onClick: () => (this.showTooltip = !this.showTooltip) })), this.renderTooltip()));
598
+ return (h("div", { key: 'a8d8bf6aa2001b6aee44d728a198244819ae169e', class: `checkbox__wrapper ${this.name}__input`, ref: (el) => (this.stylingContainer = el) }, h("vaadin-checkbox", { key: '13a5589a78bef4277922535e59c5718d36b1f318', class: "checkbox__input", required: this.validation.mandatory, checked: this.defaultValue === 'true', onChange: (e) => this.handleCheckbox(e), "error-message": !this.isValid && this.errorMessage, ref: (el) => (this.vaadinCheckbox = el) }, this.renderLabel()), this.tooltip && (h("img", { key: '008bb9a318c914b4b40e80b15080f7f174cc1262', class: "checkboxgroup__tooltip-icon", src: tooltipIconSvg, alt: "", ref: (el) => (this.tooltipIconReference = el), onClick: () => (this.showTooltip = !this.showTooltip) })), this.renderTooltip()));
604
599
  }
605
600
  static get watchers() { return {
606
- "clientStyling": ["handleStylingChange"],
601
+ "clientStyling": ["handleClientStylingChange"],
607
602
  "isValid": ["validityChanged"],
608
603
  "emitValue": ["emitValueHandler"]
609
604
  }; }
@@ -5994,11 +5989,6 @@ const DateInput = class {
5994
5989
  const date = parse(inputValue, this.dateFormat, new Date());
5995
5990
  return { year: date.getFullYear(), month: date.getMonth(), day: date.getDate() };
5996
5991
  };
5997
- this.setClientStyling = () => {
5998
- let sheet = document.createElement('style');
5999
- sheet.innerHTML = this.clientStyling;
6000
- this.stylingContainer.prepend(sheet);
6001
- };
6002
5992
  this.handleDocumentIdUpdate = (e) => {
6003
5993
  if (this.name !== CONSTANTS.BIRTHDATE) {
6004
5994
  return;
@@ -6085,9 +6075,9 @@ const DateInput = class {
6085
6075
  this.emitOnClick = false;
6086
6076
  this.enableSouthAfricanMode = undefined;
6087
6077
  this.enableManualDateInput = false;
6078
+ this.mbSource = undefined;
6088
6079
  this.errorMessage = undefined;
6089
6080
  this.isValid = undefined;
6090
- this.limitStylingAppends = false;
6091
6081
  this.showTooltip = false;
6092
6082
  }
6093
6083
  get formattedValue() {
@@ -6096,9 +6086,10 @@ const DateInput = class {
6096
6086
  const parsedDate = parse(this.value, 'yyyy-MM-dd', new Date());
6097
6087
  return format(parsedDate, this.dateFormat);
6098
6088
  }
6099
- handleStylingChange(newValue, oldValue) {
6100
- if (newValue !== oldValue)
6101
- this.setClientStyling();
6089
+ handleClientStylingChange(newValue, oldValue) {
6090
+ if (newValue !== oldValue) {
6091
+ setClientStyling(this.stylingContainer, this.clientStyling);
6092
+ }
6102
6093
  }
6103
6094
  validityChanged() {
6104
6095
  this.validityStateHandler({ valid: this.isValid, name: this.name });
@@ -6136,17 +6127,18 @@ const DateInput = class {
6136
6127
  this.minDate = parse(((_a = this.validation.min) === null || _a === void 0 ? void 0 : _a.toString()) || '', 'yyyy-MM-dd', new Date());
6137
6128
  this.maxDate = parse(((_b = this.validation.max) === null || _b === void 0 ? void 0 : _b.toString()) || '', 'yyyy-MM-dd', new Date());
6138
6129
  }
6139
- componentDidRender() {
6140
- // start custom styling area
6141
- if (!this.limitStylingAppends && this.stylingContainer) {
6142
- if (this.clientStyling)
6143
- this.setClientStyling();
6144
- this.limitStylingAppends = true;
6130
+ handleClientStyling() {
6131
+ if (window.emMessageBus !== undefined) {
6132
+ this.stylingSubscription = setStreamStyling(this.stylingContainer, `${this.mbSource}.Style`, this.stylingSubscription, true);
6133
+ return;
6134
+ }
6135
+ if (this.clientStyling) {
6136
+ setClientStyling(this.stylingContainer, this.clientStyling);
6145
6137
  }
6146
- // end custom styling area
6147
6138
  }
6148
6139
  componentDidLoad() {
6149
6140
  var _a;
6141
+ this.handleClientStyling();
6150
6142
  this.datePicker = this.element.shadowRoot.querySelector('vaadin-date-picker');
6151
6143
  this.inputReference = this.element.shadowRoot.querySelector('input');
6152
6144
  if (this.datePicker) {
@@ -6301,12 +6293,12 @@ const DateInput = class {
6301
6293
  if (this.touched) {
6302
6294
  invalidClass = this.isValid == true || this.isValid == undefined ? '' : 'text__input--invalid';
6303
6295
  }
6304
- return h("div", { key: 'f8011520dee6f11203da18cc27a6f278283daace', class: `date__wrapper ${this.autofilled ? 'date__wrapper--autofilled' : ''} ${this.name}__input`, ref: el => this.stylingContainer = el }, h("label", { key: 'e1e21a234b5f20f05a5c2d6eb38095bb50748ad6', class: `date__label ${this.validation.mandatory ? 'date__label--required' : ''}}`, htmlFor: `${this.name}__input` }, this.displayName, h("span", { key: '8dbd7ecb2e8fc686afc02a15a247f5f78484ec22', class: this.validation.mandatory ? 'date__label--required' : '' })), h("vaadin-date-picker", { key: '40b5106d0b80799cd81b154889461fa5378264b8', id: `${this.name}__input`, type: 'date', class: `date__input ${invalidClass} ${this.enableManualDateInput && 'date__manual-mode'}`, value: this.defaultValue, readOnly: this.autofilled, placeholder: `${this.placeholder}`, required: this.validation.mandatory, max: this.validation.max, min: this.validation.min, onChange: (e) => this.handleInput(e), onValidated: () => this.handleValidated(), autoOpenDisabled: this.enableManualDateInput }), h("small", { key: 'cd96dd3bb68896ea44d5071d783a7a2e2d75738f', class: 'date__error-message' }, this.errorMessage), this.tooltip &&
6305
- h("img", { key: '971aeba271d68264bb9ff23b86bed878699d81b1', class: 'date__tooltip-icon', src: tooltipIconSvg, alt: "", ref: (el) => this.tooltipIconReference = el, onClick: () => this.showTooltip = !this.showTooltip }), this.renderTooltip());
6296
+ return h("div", { key: 'ffff8be16fb22a41ea8c5168a79e40b9f410c63b', class: `date__wrapper ${this.autofilled ? 'date__wrapper--autofilled' : ''} ${this.name}__input`, ref: el => this.stylingContainer = el }, h("label", { key: '60da1ad0bc4cc7757e6f1096866667a97bd146b5', class: `date__label ${this.validation.mandatory ? 'date__label--required' : ''}}`, htmlFor: `${this.name}__input` }, this.displayName, h("span", { key: '450b4638efa34f4490035b0d99b0b186f053a2d0', class: this.validation.mandatory ? 'date__label--required' : '' })), h("vaadin-date-picker", { key: '421875a710bb4508e3218d28bf2c28dcd0e9793b', id: `${this.name}__input`, type: 'date', class: `date__input ${invalidClass} ${this.enableManualDateInput && 'date__manual-mode'}`, value: this.defaultValue, readOnly: this.autofilled, placeholder: `${this.placeholder}`, required: this.validation.mandatory, max: this.validation.max, min: this.validation.min, onChange: (e) => this.handleInput(e), onValidated: () => this.handleValidated(), autoOpenDisabled: this.enableManualDateInput }), h("small", { key: '33a6fed8057a84cb648f94a318c3ec0b1e495fff', class: 'date__error-message' }, this.errorMessage), this.tooltip &&
6297
+ h("img", { key: 'd91fcd13e1ae384b67b6d478834b65136ab77b77', class: 'date__tooltip-icon', src: tooltipIconSvg, alt: "", ref: (el) => this.tooltipIconReference = el, onClick: () => this.showTooltip = !this.showTooltip }), this.renderTooltip());
6306
6298
  }
6307
6299
  get element() { return getElement(this); }
6308
6300
  static get watchers() { return {
6309
- "clientStyling": ["handleStylingChange"],
6301
+ "clientStyling": ["handleClientStylingChange"],
6310
6302
  "isValid": ["validityChanged"],
6311
6303
  "emitValue": ["emitValueHandler"],
6312
6304
  "enableSouthAfricanMode": ["handleCustomRegistrationChange"]
@@ -6341,11 +6333,6 @@ const EmailInput = class {
6341
6333
  this.errorMessage = this.setErrorMessage();
6342
6334
  this.touched = true;
6343
6335
  };
6344
- this.setClientStyling = () => {
6345
- let sheet = document.createElement('style');
6346
- sheet.innerHTML = this.clientStyling;
6347
- this.stylingContainer.prepend(sheet);
6348
- };
6349
6336
  this.name = undefined;
6350
6337
  this.displayName = undefined;
6351
6338
  this.placeholder = undefined;
@@ -6357,14 +6344,15 @@ const EmailInput = class {
6357
6344
  this.emitValue = undefined;
6358
6345
  this.isDuplicateInput = undefined;
6359
6346
  this.clientStyling = '';
6347
+ this.mbSource = undefined;
6360
6348
  this.errorMessage = undefined;
6361
6349
  this.isValid = undefined;
6362
- this.limitStylingAppends = false;
6363
6350
  this.showTooltip = false;
6364
6351
  }
6365
- handleStylingChange(newValue, oldValue) {
6366
- if (newValue !== oldValue)
6367
- this.setClientStyling();
6352
+ handleClientStylingChange(newValue, oldValue) {
6353
+ if (newValue !== oldValue) {
6354
+ setClientStyling(this.stylingContainer, this.clientStyling);
6355
+ }
6368
6356
  }
6369
6357
  validityChanged() {
6370
6358
  this.validityStateHandler({ valid: this.isValid, name: this.name });
@@ -6399,16 +6387,17 @@ const EmailInput = class {
6399
6387
  connectedCallback() {
6400
6388
  this.validationPattern = this.setPattern();
6401
6389
  }
6402
- componentDidRender() {
6403
- // start custom styling area
6404
- if (!this.limitStylingAppends && this.stylingContainer) {
6405
- if (this.clientStyling)
6406
- this.setClientStyling();
6407
- this.limitStylingAppends = true;
6390
+ handleClientStyling() {
6391
+ if (window.emMessageBus !== undefined) {
6392
+ this.stylingSubscription = setStreamStyling(this.stylingContainer, `${this.mbSource}.Style`, this.stylingSubscription, true);
6393
+ return;
6394
+ }
6395
+ if (this.clientStyling) {
6396
+ setClientStyling(this.stylingContainer, this.clientStyling);
6408
6397
  }
6409
- // end custom styling area
6410
6398
  }
6411
6399
  componentDidLoad() {
6400
+ this.handleClientStyling();
6412
6401
  this.isValid = this.setValidity();
6413
6402
  if (this.defaultValue) {
6414
6403
  this.value = this.defaultValue;
@@ -6454,11 +6443,11 @@ const EmailInput = class {
6454
6443
  if (this.touched) {
6455
6444
  invalidClass = this.isValid == true || this.isValid == undefined ? '' : 'text__input--invalid';
6456
6445
  }
6457
- return h("div", { key: '723df8f3a6e8c57fe19082400971daf50f5c981d', class: `email__wrapper ${this.autofilled ? 'number__wrapper--autofilled' : ''} ${this.name}__input`, ref: el => this.stylingContainer = el }, h("div", { key: '581d6e02b63d1c659ae44424518f64db450d5365', class: 'email__wrapper--flex' }, h("label", { key: '11e6a848f6f04903989b3ab2075865f6e279c087', class: `email__label ${this.validation.mandatory ? 'email__label--required' : ''}`, htmlFor: `${this.name}__input` }, this.displayName), h("div", { key: '73e11520cffbddda1a2aeb4b560e7f4cf456e2fb', class: 'email__wrapper--relative' }, this.tooltip &&
6458
- h("img", { key: 'e8571ce14b9b98311daf1712ebde7d6da9b5a6a6', class: 'email__tooltip-icon', src: tooltipIconSvg, alt: "", ref: (el) => this.tooltipIconReference = el, onClick: () => this.showTooltip = !this.showTooltip }), this.renderTooltip())), h("input", { key: 'dd05ef0b4d906598c6d5775a78ccbdc9ea81cb8c', id: `${this.name}__input`, type: 'email', class: `email__input ${invalidClass}`, value: this.defaultValue, readOnly: this.autofilled, placeholder: `${this.placeholder}`, ref: (el) => this.inputReference = el, pattern: this.validationPattern, required: this.validation.mandatory, minlength: this.validation.minLength, maxlength: this.validation.maxLength, onInput: this.handleInput, onBlur: this.handleBlur }), h("small", { key: '0d2d41207f8274d8c6f69143131265ef5b458689', class: 'email__error-message' }, this.errorMessage));
6446
+ return h("div", { key: 'f852525fe8d8b695e638fdd83e8b0c2c20d98771', class: `email__wrapper ${this.autofilled ? 'number__wrapper--autofilled' : ''} ${this.name}__input`, ref: el => this.stylingContainer = el }, h("div", { key: 'd6a6dec4e76ba1fbe15bed09f82cecde12cabe1a', class: 'email__wrapper--flex' }, h("label", { key: '4498ae1bac287cb80544c4d743afad2ec678e3bd', class: `email__label ${this.validation.mandatory ? 'email__label--required' : ''}`, htmlFor: `${this.name}__input` }, this.displayName), h("div", { key: 'e54d1258e48f54304a553cffb83466e4a4fadb4c', class: 'email__wrapper--relative' }, this.tooltip &&
6447
+ h("img", { key: '29d7b95f22c8cb70d505f74a7ea18284faa908ee', class: 'email__tooltip-icon', src: tooltipIconSvg, alt: "", ref: (el) => this.tooltipIconReference = el, onClick: () => this.showTooltip = !this.showTooltip }), this.renderTooltip())), h("input", { key: '08754b178e395f26c1d8a61ff667b91df3fb0ec7', id: `${this.name}__input`, type: 'email', class: `email__input ${invalidClass}`, value: this.defaultValue, readOnly: this.autofilled, placeholder: `${this.placeholder}`, ref: (el) => this.inputReference = el, pattern: this.validationPattern, required: this.validation.mandatory, minlength: this.validation.minLength, maxlength: this.validation.maxLength, onInput: this.handleInput, onBlur: this.handleBlur }), h("small", { key: '3024a57f5d0897f34013eb4397d78babc2333192', class: 'email__error-message' }, this.errorMessage));
6459
6448
  }
6460
6449
  static get watchers() { return {
6461
- "clientStyling": ["handleStylingChange"],
6450
+ "clientStyling": ["handleClientStylingChange"],
6462
6451
  "isValid": ["validityChanged"],
6463
6452
  "emitValue": ["emitValueHandler"]
6464
6453
  }; }
@@ -13132,32 +13121,6 @@ const GeneralInput = class {
13132
13121
  constructor(hostRef) {
13133
13122
  registerInstance(this, hostRef);
13134
13123
  this.registrationWidgetLoaded = createEvent(this, "registrationWidgetLoaded", 7);
13135
- this.setClientStyling = () => {
13136
- let sheet = document.createElement('style');
13137
- sheet.innerHTML = this.clientStyling;
13138
- this.host.shadowRoot.prepend(sheet);
13139
- };
13140
- this.setStreamStyling = (domain) => {
13141
- if (window.emMessageBus) {
13142
- const sheet = document.createElement('style');
13143
- this.stylingSubscription = window.emMessageBus.subscribe(domain, (data) => {
13144
- sheet.innerHTML = data;
13145
- this.clientStyling = data;
13146
- this.host.shadowRoot.prepend(sheet);
13147
- });
13148
- }
13149
- };
13150
- this.setClientStylingURL = () => {
13151
- let url = new URL(this.clientStylingUrl);
13152
- let cssFile = document.createElement('style');
13153
- fetch(url.href)
13154
- .then((res) => res.text())
13155
- .then((data) => {
13156
- cssFile.innerHTML = data;
13157
- this.clientStyling = data;
13158
- setTimeout(() => { this.host.shadowRoot.prepend(cssFile); }, 1);
13159
- });
13160
- };
13161
13124
  this.handleClick = (event) => {
13162
13125
  if (this.emitOnClick) {
13163
13126
  event.stopPropagation();
@@ -13194,15 +13157,17 @@ const GeneralInput = class {
13194
13157
  this.enableManualDateInput = false;
13195
13158
  this.pinAttemptsExceeded = undefined;
13196
13159
  this.mbSource = undefined;
13197
- this.limitStylingAppends = false;
13198
13160
  }
13199
- handleStylingChange(newValue, oldValue) {
13200
- if (newValue !== oldValue)
13201
- this.setClientStyling();
13161
+ handleClientStylingChange(newValue, oldValue) {
13162
+ if (newValue !== oldValue) {
13163
+ setClientStyling(this.stylingContainer, this.clientStyling);
13164
+ }
13202
13165
  }
13203
- handleStylingUrlChange(newValue, oldValue) {
13204
- if (newValue !== oldValue)
13205
- this.setClientStylingURL();
13166
+ handleClientStylingChangeURL(newValue, oldValue) {
13167
+ if (newValue !== oldValue) {
13168
+ if (this.clientStylingUrl)
13169
+ setClientStylingURL(this.stylingContainer, this.clientStylingUrl);
13170
+ }
13206
13171
  }
13207
13172
  connectedCallback() {
13208
13173
  if (this.translationUrl) {
@@ -13213,51 +13178,50 @@ const GeneralInput = class {
13213
13178
  this.stylingSubscription && this.stylingSubscription.unsubscribe();
13214
13179
  }
13215
13180
  componentDidLoad() {
13181
+ this.handleClientStyling();
13216
13182
  this.registrationWidgetLoaded.emit();
13217
13183
  window.postMessage({ type: 'registrationWidgetLoaded' }, window.location.href);
13218
- if (!this.limitStylingAppends && this.host) {
13219
- if (window.emMessageBus != undefined) {
13220
- this.setStreamStyling(`${this.mbSource}.Style`);
13221
- }
13222
- else {
13223
- if (this.clientStyling)
13224
- this.setClientStyling();
13225
- if (this.clientStylingUrl)
13226
- this.setClientStylingURL();
13227
- this.limitStylingAppends = true;
13228
- }
13184
+ }
13185
+ handleClientStyling() {
13186
+ if (window.emMessageBus !== undefined) {
13187
+ this.stylingSubscription = setStreamStyling(this.stylingContainer, `${this.mbSource}.Style`, this.stylingSubscription, true);
13188
+ return;
13229
13189
  }
13190
+ if (this.clientStyling)
13191
+ setClientStyling(this.stylingContainer, this.clientStyling);
13192
+ if (this.clientStylingUrl)
13193
+ setClientStylingURL(this.stylingContainer, this.clientStylingUrl);
13230
13194
  }
13231
13195
  renderInput() {
13232
13196
  var _a;
13233
13197
  switch ((_a = this.type) === null || _a === void 0 ? void 0 : _a.toLowerCase()) {
13234
13198
  case 'text':
13235
13199
  if (this.haspostalcodelookup && this.name === 'PostalCode') {
13236
- return h("postalcode-input", { name: this.name, displayName: this.displayName, validation: this.validation, defaultValue: this.defaultValue, autofilled: this.autofilled, emitValue: this.emitValue, language: this.language, "client-styling": this.clientStyling, tooltip: this.tooltip, placeholder: this.placeholder, postalcodelength: this.postalcodelength, addresses: this.addresses, ignoreCountry: this.ignoreCountry });
13200
+ return h("postalcode-input", { name: this.name, displayName: this.displayName, validation: this.validation, defaultValue: this.defaultValue, autofilled: this.autofilled, emitValue: this.emitValue, language: this.language, "client-styling": this.clientStyling, tooltip: this.tooltip, placeholder: this.placeholder, postalcodelength: this.postalcodelength, addresses: this.addresses, ignoreCountry: this.ignoreCountry, "mb-source": this.mbSource });
13237
13201
  }
13238
13202
  else {
13239
- return h("text-input", { name: this.name, displayName: this.displayName, validation: this.validation, defaultValue: this.defaultValue, autofilled: this.autofilled, emitValue: this.emitValue, language: this.language, isDuplicateInput: this.isDuplicateInput, "client-styling": this.clientStyling, tooltip: this.tooltip, placeholder: this.placeholder, haspostalcodelookup: this.haspostalcodelookup, "enable-south-african-mode": this.enableSouthAfricanMode });
13203
+ return h("text-input", { name: this.name, displayName: this.displayName, validation: this.validation, defaultValue: this.defaultValue, autofilled: this.autofilled, emitValue: this.emitValue, language: this.language, isDuplicateInput: this.isDuplicateInput, "client-styling": this.clientStyling, tooltip: this.tooltip, placeholder: this.placeholder, haspostalcodelookup: this.haspostalcodelookup, "enable-south-african-mode": this.enableSouthAfricanMode, "mb-source": this.mbSource });
13240
13204
  }
13241
13205
  case 'email':
13242
- return h("email-input", { name: this.name, displayName: this.displayName, validation: this.validation, defaultValue: this.defaultValue, autofilled: this.autofilled, emitValue: this.emitValue, language: this.language, isDuplicateInput: this.isDuplicateInput, "client-styling": this.clientStyling, tooltip: this.tooltip, placeholder: this.placeholder });
13206
+ return h("email-input", { name: this.name, displayName: this.displayName, validation: this.validation, defaultValue: this.defaultValue, autofilled: this.autofilled, emitValue: this.emitValue, language: this.language, isDuplicateInput: this.isDuplicateInput, "client-styling": this.clientStyling, tooltip: this.tooltip, placeholder: this.placeholder, "mb-source": this.mbSource });
13243
13207
  case 'number':
13244
- return h("number-input", { name: this.name, displayName: this.displayName, validation: this.validation, defaultValue: this.defaultValue, autofilled: this.autofilled, emitValue: this.emitValue, language: this.language, "client-styling": this.clientStyling, tooltip: this.tooltip, placeholder: this.placeholder });
13208
+ return h("number-input", { name: this.name, displayName: this.displayName, validation: this.validation, defaultValue: this.defaultValue, autofilled: this.autofilled, emitValue: this.emitValue, language: this.language, "client-styling": this.clientStyling, tooltip: this.tooltip, placeholder: this.placeholder, "mb-source": this.mbSource });
13245
13209
  case 'checkbox':
13246
- return h("checkbox-input", { name: this.name, displayName: this.displayName, validation: this.validation, emitValue: this.emitValue, defaultValue: this.defaultValue, autofilled: this.autofilled, language: this.language, "client-styling": this.clientStyling, tooltip: this.tooltip });
13210
+ return h("checkbox-input", { name: this.name, displayName: this.displayName, validation: this.validation, emitValue: this.emitValue, defaultValue: this.defaultValue, autofilled: this.autofilled, language: this.language, "client-styling": this.clientStyling, tooltip: this.tooltip, "mb-source": this.mbSource });
13247
13211
  case 'checkboxgroup':
13248
- return h("checkbox-group-input", { name: this.name, displayName: this.displayName, validation: this.validation, defaultValue: this.defaultValue, autofilled: this.autofilled, emitValue: this.emitValue, language: this.language, "client-styling": this.clientStyling, tooltip: this.tooltip, options: this.options });
13212
+ return h("checkbox-group-input", { name: this.name, displayName: this.displayName, validation: this.validation, defaultValue: this.defaultValue, autofilled: this.autofilled, emitValue: this.emitValue, language: this.language, "client-styling": this.clientStyling, tooltip: this.tooltip, options: this.options, "mb-source": this.mbSource });
13249
13213
  case 'togglecheckbox':
13250
- return h("toggle-checkbox-input", { name: this.name, displayName: this.displayName, validation: this.validation, defaultValue: this.defaultValue, autofilled: this.autofilled, emitValue: this.emitValue, language: this.language, "client-styling": this.clientStyling, tooltip: this.tooltip, options: this.options, "emit-on-click": this.emitOnClick });
13214
+ return h("toggle-checkbox-input", { name: this.name, displayName: this.displayName, validation: this.validation, defaultValue: this.defaultValue, autofilled: this.autofilled, emitValue: this.emitValue, language: this.language, "client-styling": this.clientStyling, tooltip: this.tooltip, options: this.options, "emit-on-click": this.emitOnClick, "mb-source": this.mbSource });
13251
13215
  case 'datetime':
13252
- return h("date-input", { name: this.name, displayName: this.displayName, validation: this.validation, defaultValue: this.defaultValue, autofilled: this.autofilled, emitValue: this.emitValue, language: this.language, "client-styling": this.clientStyling, tooltip: this.tooltip, placeholder: this.placeholder, dateFormat: this.dateFormat, "emit-on-click": this.emitOnClick, "enable-south-african-mode": this.enableSouthAfricanMode, "enable-manual-date-input": this.enableManualDateInput });
13216
+ return h("date-input", { name: this.name, displayName: this.displayName, validation: this.validation, defaultValue: this.defaultValue, autofilled: this.autofilled, emitValue: this.emitValue, language: this.language, "client-styling": this.clientStyling, tooltip: this.tooltip, placeholder: this.placeholder, dateFormat: this.dateFormat, "emit-on-click": this.emitOnClick, "enable-south-african-mode": this.enableSouthAfricanMode, "enable-manual-date-input": this.enableManualDateInput, "mb-source": this.mbSource });
13253
13217
  case 'password':
13254
- return h("password-input", { name: this.name, displayName: this.displayName, validation: this.validation, defaultValue: this.defaultValue, autofilled: this.autofilled, emitValue: this.emitValue, language: this.language, isDuplicateInput: this.isDuplicateInput, hidePasswordComplexity: this.hidePasswordComplexity, "no-validation": this.noValidation, "client-styling": this.clientStyling, tooltip: this.tooltip, placeholder: this.placeholder, "enable-south-african-mode": this.enableSouthAfricanMode });
13218
+ return h("password-input", { name: this.name, displayName: this.displayName, validation: this.validation, defaultValue: this.defaultValue, autofilled: this.autofilled, emitValue: this.emitValue, language: this.language, isDuplicateInput: this.isDuplicateInput, hidePasswordComplexity: this.hidePasswordComplexity, "no-validation": this.noValidation, "client-styling": this.clientStyling, tooltip: this.tooltip, placeholder: this.placeholder, "enable-south-african-mode": this.enableSouthAfricanMode, "mb-source": this.mbSource });
13255
13219
  case 'radio':
13256
- return h("radio-input", { name: this.name, displayName: this.displayName, optionsGroup: this.options, validation: this.validation, emitValue: this.emitValue, language: this.language, "client-styling": this.clientStyling });
13220
+ return h("radio-input", { name: this.name, displayName: this.displayName, optionsGroup: this.options, validation: this.validation, emitValue: this.emitValue, language: this.language, "client-styling": this.clientStyling, "mb-source": this.mbSource });
13257
13221
  case 'tel':
13258
- return h("tel-input", { name: this.name, action: this.action, displayName: this.displayName, validation: this.validation, defaultValue: this.defaultValue, emitValue: this.emitValue, language: this.language, autofilled: this.autofilled, "client-styling": this.clientStyling, tooltip: this.tooltip, placeholder: this.placeholder });
13222
+ return h("tel-input", { name: this.name, action: this.action, displayName: this.displayName, validation: this.validation, defaultValue: this.defaultValue, emitValue: this.emitValue, language: this.language, autofilled: this.autofilled, "client-styling": this.clientStyling, tooltip: this.tooltip, placeholder: this.placeholder, "mb-source": this.mbSource });
13259
13223
  case 'dropdown':
13260
- return h("select-input", { name: this.name, action: this.action, defaultValue: this.defaultValue, displayName: this.displayName, options: this.options, validation: this.validation, emitValue: this.emitValue, autofilled: this.autofilled, language: this.language, "client-styling": this.clientStyling, tooltip: this.tooltip, placeholder: this.placeholder });
13224
+ return h("select-input", { name: this.name, action: this.action, defaultValue: this.defaultValue, displayName: this.displayName, options: this.options, validation: this.validation, emitValue: this.emitValue, autofilled: this.autofilled, language: this.language, "client-styling": this.clientStyling, tooltip: this.tooltip, placeholder: this.placeholder, "mb-source": this.mbSource });
13261
13225
  case 'twofa':
13262
13226
  return h("twofa-input", { name: this.name, displayName: this.displayName, validation: this.validation, emitValue: this.emitValue, language: this.language, "client-styling": this.clientStyling, tooltip: this.tooltip, destination: this.twofaDestination, "resend-interval-seconds": this.twofaResendIntervalSeconds, "enable-south-african-mode": this.enableSouthAfricanMode, "pin-attempts-exceeded": this.pinAttemptsExceeded, "mb-source": this.mbSource });
13263
13227
  case 'label':
@@ -13272,12 +13236,12 @@ const GeneralInput = class {
13272
13236
  }
13273
13237
  }
13274
13238
  render() {
13275
- return (h(Host, { key: '7a7805c641082de9c5da4859187765002ab6f32d', class: `general-input--${this.name}`, onClick: this.handleClick }, this.renderInput()));
13239
+ return (h(Host, { key: '12e3e43442ba3fd4a47bbc5c05456eb019405b1e', class: `general-input--${this.name}`, onClick: this.handleClick }, this.renderInput()));
13276
13240
  }
13277
13241
  get host() { return getElement(this); }
13278
13242
  static get watchers() { return {
13279
- "clientStyling": ["handleStylingChange"],
13280
- "clientStylingUrl": ["handleStylingUrlChange"]
13243
+ "clientStyling": ["handleClientStylingChange"],
13244
+ "clientStylingUrl": ["handleClientStylingChangeURL"]
13281
13245
  }; }
13282
13246
  };
13283
13247
  GeneralInput.style = GeneralInputStyle0;
@@ -13309,11 +13273,6 @@ const NumberInput = class {
13309
13273
  this.errorMessage = this.setErrorMessage();
13310
13274
  this.touched = true;
13311
13275
  };
13312
- this.setClientStyling = () => {
13313
- let sheet = document.createElement('style');
13314
- sheet.innerHTML = this.clientStyling;
13315
- this.stylingContainer.prepend(sheet);
13316
- };
13317
13276
  this.name = undefined;
13318
13277
  this.displayName = undefined;
13319
13278
  this.placeholder = undefined;
@@ -13324,14 +13283,15 @@ const NumberInput = class {
13324
13283
  this.language = undefined;
13325
13284
  this.emitValue = undefined;
13326
13285
  this.clientStyling = '';
13286
+ this.mbSource = undefined;
13327
13287
  this.errorMessage = undefined;
13328
13288
  this.isValid = undefined;
13329
- this.limitStylingAppends = false;
13330
13289
  this.showTooltip = false;
13331
13290
  }
13332
- handleStylingChange(newValue, oldValue) {
13333
- if (newValue !== oldValue)
13334
- this.setClientStyling();
13291
+ handleClientStylingChange(newValue, oldValue) {
13292
+ if (newValue !== oldValue) {
13293
+ setClientStyling(this.stylingContainer, this.clientStyling);
13294
+ }
13335
13295
  }
13336
13296
  validityChanged() {
13337
13297
  this.validityStateHandler({ valid: this.isValid, name: this.name });
@@ -13359,16 +13319,17 @@ const NumberInput = class {
13359
13319
  connectedCallback() {
13360
13320
  this.validationPattern = this.setPattern();
13361
13321
  }
13362
- componentDidRender() {
13363
- // start custom styling area
13364
- if (!this.limitStylingAppends && this.stylingContainer) {
13365
- if (this.clientStyling)
13366
- this.setClientStyling();
13367
- this.limitStylingAppends = true;
13322
+ handleClientStyling() {
13323
+ if (window.emMessageBus !== undefined) {
13324
+ this.stylingSubscription = setStreamStyling(this.stylingContainer, `${this.mbSource}.Style`, this.stylingSubscription, true);
13325
+ return;
13326
+ }
13327
+ if (this.clientStyling) {
13328
+ setClientStyling(this.stylingContainer, this.clientStyling);
13368
13329
  }
13369
- // end custom styling area
13370
13330
  }
13371
13331
  componentDidLoad() {
13332
+ this.handleClientStyling();
13372
13333
  this.isValid = this.setValidity();
13373
13334
  if (this.defaultValue) {
13374
13335
  this.value = this.defaultValue;
@@ -13409,11 +13370,11 @@ const NumberInput = class {
13409
13370
  if (this.touched) {
13410
13371
  invalidClass = this.isValid == true || this.isValid == undefined ? '' : 'text__input--invalid';
13411
13372
  }
13412
- return h("div", { key: 'aea370172d0e55d32dc665a1c340c734334e1caf', class: `number__wrapper ${this.autofilled ? 'number__wrapper--autofilled' : ''} ${this.name}__input`, ref: el => this.stylingContainer = el }, h("div", { key: '10e16d10b956c5a647bc68ecffbc2eb0b06fa92a', class: 'number__wrapper--flex' }, h("label", { key: '0827d47c7278c6fdf8ebdd1dff03b91c39be6812', class: `number__label ${this.validation.mandatory ? 'number__label--required' : ''}`, htmlFor: `${this.name}__input` }, this.displayName), h("div", { key: 'cb868d01e8555f5e3333240f54d86f0a56641d0f', class: 'number__wrapper--relative' }, this.tooltip &&
13413
- h("img", { key: '1aa2b16b59f4bfd4b1dadf2641ec6cb4cfc251bf', class: 'number__tooltip-icon', src: tooltipIconSvg, alt: "", ref: (el) => this.tooltipIconReference = el, onClick: () => this.showTooltip = !this.showTooltip }), this.renderTooltip())), h("input", { key: '365b70a2eb333878d367d1d414ee0e296c91b3ec', ref: (el) => this.inputReference = el, type: "number", value: this.defaultValue, readOnly: this.autofilled, id: `${this.name}__input`, class: `number__input ${invalidClass}`, pattern: this.validationPattern, placeholder: `${this.placeholder}`, required: this.validation.mandatory, max: this.validation.max, min: this.validation.min, onInput: this.handleInput, onBlur: this.handleBlur }), h("small", { key: 'a8639df7ef1e98807a7daffc9da4afd347b1c292', class: 'number__error-message' }, this.errorMessage));
13373
+ return h("div", { key: 'bd11140dc6c8ddb6b800d4fe6544df733c5157c4', class: `number__wrapper ${this.autofilled ? 'number__wrapper--autofilled' : ''} ${this.name}__input`, ref: el => this.stylingContainer = el }, h("div", { key: 'c8318c687bc471fc225b9aba52686e38ecb400de', class: 'number__wrapper--flex' }, h("label", { key: '7eaf64057ef71b07a0defc1e372fd85baab2bd68', class: `number__label ${this.validation.mandatory ? 'number__label--required' : ''}`, htmlFor: `${this.name}__input` }, this.displayName), h("div", { key: '99f4151f50a7fb0abb9a8e53bacc8c8bd303d659', class: 'number__wrapper--relative' }, this.tooltip &&
13374
+ h("img", { key: '875d6284697dc06ac05c682509856faeade3d8be', class: 'number__tooltip-icon', src: tooltipIconSvg, alt: "", ref: (el) => this.tooltipIconReference = el, onClick: () => this.showTooltip = !this.showTooltip }), this.renderTooltip())), h("input", { key: 'f1f563567cde4a744c68e27ab91a3d795f596be6', ref: (el) => this.inputReference = el, type: "number", value: this.defaultValue, readOnly: this.autofilled, id: `${this.name}__input`, class: `number__input ${invalidClass}`, pattern: this.validationPattern, placeholder: `${this.placeholder}`, required: this.validation.mandatory, max: this.validation.max, min: this.validation.min, onInput: this.handleInput, onBlur: this.handleBlur }), h("small", { key: '0226f04a059fd8763822483de42bd7e647040bf3', class: 'number__error-message' }, this.errorMessage));
13414
13375
  }
13415
13376
  static get watchers() { return {
13416
- "clientStyling": ["handleStylingChange"],
13377
+ "clientStyling": ["handleClientStylingChange"],
13417
13378
  "isValid": ["validityChanged"],
13418
13379
  "emitValue": ["emitValueHandler"]
13419
13380
  }; }
@@ -13462,11 +13423,6 @@ const PasswordInput = class {
13462
13423
  this.showPopup = true;
13463
13424
  this.calculateComplexity(this.value);
13464
13425
  };
13465
- this.setClientStyling = () => {
13466
- let sheet = document.createElement('style');
13467
- sheet.innerHTML = this.clientStyling;
13468
- this.stylingContainer.prepend(sheet);
13469
- };
13470
13426
  this.name = undefined;
13471
13427
  this.displayName = undefined;
13472
13428
  this.placeholder = undefined;
@@ -13481,17 +13437,18 @@ const PasswordInput = class {
13481
13437
  this.hidePasswordComplexity = false;
13482
13438
  this.clientStyling = '';
13483
13439
  this.enableSouthAfricanMode = undefined;
13440
+ this.mbSource = undefined;
13484
13441
  this.isValid = undefined;
13485
13442
  this.errorMessage = undefined;
13486
- this.limitStylingAppends = false;
13487
13443
  this.showTooltip = false;
13488
13444
  this.passwordComplexity = undefined;
13489
13445
  this.showPopup = undefined;
13490
13446
  this.value = '';
13491
13447
  }
13492
- handleStylingChange(newValue, oldValue) {
13493
- if (newValue !== oldValue)
13494
- this.setClientStyling();
13448
+ handleClientStylingChange(newValue, oldValue) {
13449
+ if (newValue !== oldValue) {
13450
+ setClientStyling(this.stylingContainer, this.clientStyling);
13451
+ }
13495
13452
  }
13496
13453
  validityChanged() {
13497
13454
  this.validityStateHandler({ valid: this.isValid, name: this.name });
@@ -13552,16 +13509,17 @@ const PasswordInput = class {
13552
13509
  this.showTooltip = false;
13553
13510
  }
13554
13511
  }
13555
- componentDidRender() {
13556
- // start custom styling area
13557
- if (!this.limitStylingAppends && this.stylingContainer) {
13558
- if (this.clientStyling)
13559
- this.setClientStyling();
13560
- this.limitStylingAppends = true;
13512
+ handleClientStyling() {
13513
+ if (window.emMessageBus !== undefined) {
13514
+ this.stylingSubscription = setStreamStyling(this.stylingContainer, `${this.mbSource}.Style`, this.stylingSubscription, true);
13515
+ return;
13516
+ }
13517
+ if (this.clientStyling) {
13518
+ setClientStyling(this.stylingContainer, this.clientStyling);
13561
13519
  }
13562
- // end custom styling area
13563
13520
  }
13564
13521
  componentDidLoad() {
13522
+ this.handleClientStyling();
13565
13523
  this.inputReference = this.element.shadowRoot.querySelector('input');
13566
13524
  this.passwordButton = this.element.shadowRoot.querySelector('vaadin-password-field-button');
13567
13525
  this.passwordButton.tabIndex = -1;
@@ -13668,8 +13626,8 @@ const PasswordInput = class {
13668
13626
  if (this.touched) {
13669
13627
  invalidClass = this.isValid == true || this.isValid == undefined ? '' : 'text__input--invalid';
13670
13628
  }
13671
- return h("div", { key: 'fe895585dd908f75eee4ba797dc9c02b237bed7f', class: `password__wrapper ${this.autofilled ? 'password__wrapper--autofilled' : ''} ${this.name}__input`, ref: el => this.stylingContainer = el }, h("div", { key: '844bdb3dab98e62cc5d92a761b85adcdc44831d0', class: 'password__wrapper--flex' }, h("label", { key: '28041267a6df666e7df3660a907f995eff092ae1', class: `password__label ${this.validation.mandatory ? 'password__label--required' : ''}`, htmlFor: `${this.name}__input` }, this.displayName), h("div", { key: '79c300643134802f04d8f909fe7bb3895911c88a', class: 'password__wrapper--relative' }, this.tooltip &&
13672
- h("img", { key: '43ae58549e42ba59054162c25887ec36eb826aaa', class: 'password__tooltip-icon', src: tooltipIconSvg, alt: "", ref: (el) => this.tooltipIconReference = el, onClick: () => this.showTooltip = !this.showTooltip }), this.renderTooltip())), h("vaadin-password-field", { key: '0edcfed0ea65666537240f531e5239bd5b11181e', type: "password", id: `${this.name}__input`, class: `password__input ${invalidClass}`, name: this.name, readOnly: this.autofilled, value: this.defaultValue, required: this.validation.mandatory, maxlength: this.validation.maxLength, minlength: this.validation.minLength, pattern: this.validationPattern, placeholder: `${this.placeholder}`, onInput: this.handleInput, onBlur: this.handleBlur, onFocus: this.handleFocus }), !this.noValidation && h("small", { key: 'c8aeba074e66b771d745194fec535aa0b82de6d8', class: 'password__error-message' }, this.errorMessage), this.passwordComplexity &&
13629
+ return h("div", { key: '18213d251639938165f3e4ad58bdc904fb953fe2', class: `password__wrapper ${this.autofilled ? 'password__wrapper--autofilled' : ''} ${this.name}__input`, ref: el => this.stylingContainer = el }, h("div", { key: '092c431b178682d0006cf6ad5c14b0a7e6fb5569', class: 'password__wrapper--flex' }, h("label", { key: '64c101b7d70305ecf09735234d902a6b33823551', class: `password__label ${this.validation.mandatory ? 'password__label--required' : ''}`, htmlFor: `${this.name}__input` }, this.displayName), h("div", { key: '189929eefa1caf71a1be39f0d663eef914d241d5', class: 'password__wrapper--relative' }, this.tooltip &&
13630
+ h("img", { key: '95ee0d824b5be14ab4e62fc0b5f1731fe6ca5775', class: 'password__tooltip-icon', src: tooltipIconSvg, alt: "", ref: (el) => this.tooltipIconReference = el, onClick: () => this.showTooltip = !this.showTooltip }), this.renderTooltip())), h("vaadin-password-field", { key: 'bf85dde83305233c566b1c50d0286548ba0f48a5', type: "password", id: `${this.name}__input`, class: `password__input ${invalidClass}`, name: this.name, readOnly: this.autofilled, value: this.defaultValue, required: this.validation.mandatory, maxlength: this.validation.maxLength, minlength: this.validation.minLength, pattern: this.validationPattern, placeholder: `${this.placeholder}`, onInput: this.handleInput, onBlur: this.handleBlur, onFocus: this.handleFocus }), !this.noValidation && h("small", { key: '3acbe164ff532bcfcd9e4a237a6f352df0cfdc2d', class: 'password__error-message' }, this.errorMessage), this.passwordComplexity &&
13673
13631
  this.showPopup &&
13674
13632
  !this.hidePasswordComplexity &&
13675
13633
  !this.isDuplicateInput &&
@@ -13679,7 +13637,7 @@ const PasswordInput = class {
13679
13637
  }
13680
13638
  get element() { return getElement(this); }
13681
13639
  static get watchers() { return {
13682
- "clientStyling": ["handleStylingChange"],
13640
+ "clientStyling": ["handleClientStylingChange"],
13683
13641
  "isValid": ["validityChanged"],
13684
13642
  "value": ["valueChanged"],
13685
13643
  "emitValue": ["emitValueHandler"]
@@ -13829,11 +13787,6 @@ const PostalCodeInput = class {
13829
13787
  targetInput.focus();
13830
13788
  }
13831
13789
  };
13832
- this.setClientStyling = () => {
13833
- let sheet = document.createElement('style');
13834
- sheet.innerHTML = this.clientStyling;
13835
- this.stylingContainer.prepend(sheet);
13836
- };
13837
13790
  this.handleOutsideClick = (event) => {
13838
13791
  if (!this.openAddressDropdown)
13839
13792
  return;
@@ -13859,9 +13812,9 @@ const PostalCodeInput = class {
13859
13812
  this.postalcodelength = undefined;
13860
13813
  this.addresses = undefined;
13861
13814
  this.ignoreCountry = false;
13815
+ this.mbSource = undefined;
13862
13816
  this.isValid = undefined;
13863
13817
  this.errorMessage = '';
13864
- this.limitStylingAppends = false;
13865
13818
  this.showTooltip = false;
13866
13819
  this.selectedCountryCode = '';
13867
13820
  this.currentPostalCode = '';
@@ -13870,9 +13823,10 @@ const PostalCodeInput = class {
13870
13823
  this.refreshTrigger = 0;
13871
13824
  this.isFetchingAddresses = false;
13872
13825
  }
13873
- handleStylingChange(newValue, oldValue) {
13874
- if (newValue !== oldValue)
13875
- this.setClientStyling();
13826
+ handleClientStylingChange(newValue, oldValue) {
13827
+ if (newValue !== oldValue) {
13828
+ setClientStyling(this.stylingContainer, this.clientStyling);
13829
+ }
13876
13830
  }
13877
13831
  validityChanged() {
13878
13832
  this.validityStateHandler({ valid: this.isValid, name: this.name });
@@ -13933,19 +13887,22 @@ const PostalCodeInput = class {
13933
13887
  connectedCallback() {
13934
13888
  this.validationPattern = this.setPattern();
13935
13889
  }
13936
- componentDidRender() {
13937
- if (!this.limitStylingAppends && this.stylingContainer) {
13938
- if (this.clientStyling)
13939
- this.setClientStyling();
13940
- this.limitStylingAppends = true;
13941
- }
13942
- }
13943
13890
  componentWillLoad() {
13944
13891
  if (this.defaultValue) {
13945
13892
  this.value = this.defaultValue;
13946
13893
  }
13947
13894
  }
13895
+ handleClientStyling() {
13896
+ if (window.emMessageBus !== undefined) {
13897
+ this.stylingSubscription = setStreamStyling(this.stylingContainer, `${this.mbSource}.Style`, this.stylingSubscription, true);
13898
+ return;
13899
+ }
13900
+ if (this.clientStyling) {
13901
+ setClientStyling(this.stylingContainer, this.clientStyling);
13902
+ }
13903
+ }
13948
13904
  componentDidLoad() {
13905
+ this.handleClientStyling();
13949
13906
  if (this.defaultValue) {
13950
13907
  this.valueHandler({ name: this.name, value: this.value });
13951
13908
  }
@@ -14037,10 +13994,10 @@ const PostalCodeInput = class {
14037
13994
  let shouldShowNoResults = this.showNoResultsMessage && this.currentPostalCode &&
14038
13995
  this.currentPostalCode.length >= this.postalcodelength && (((_b = this.addresses) === null || _b === void 0 ? void 0 : _b.length) === 0) && isUKCountry;
14039
13996
  let showLoadingMessage = this.isFetchingAddresses && this.currentPostalCode.length >= this.postalcodelength;
14040
- return (h("div", { key: 'e358dddfc4b20b0847d03e3f12ff637922470105', class: `text__wrapper ${this.name}__input ${this.autofilled ? 'text__wrapper--autofilled' : ''}`, ref: el => this.stylingContainer = el }, h("div", { key: 'b806cac9ad62480a1be6bf802528c60c79804e94', class: 'text__wrapper--flex' }, h("label", { key: '4fb327989e8b828559c01601eea47bdd58da4bd3', class: `text__label ${this.validation.mandatory ? 'text__label--required' : ''}`, htmlFor: `${this.name}__input` }, this.displayName), h("div", { key: '6c293495a8935db477cbcac2eb9102bffeb85ddb', class: 'text__wrapper--relative' }, this.tooltip && (h("img", { key: '848bb5b44d834c4f0e4a78cfebef0ecf1b88fd2e', class: 'text__tooltip-icon', src: tooltipIconSvg, alt: "", ref: (el) => this.tooltipIconReference = el, onClick: () => this.showTooltip = !this.showTooltip })), this.renderTooltip())), h("div", { key: '7f6195e5cfc5bfabc9854ec6acc19c1e52e70f1b', class: 'input__text-wrapper' }, h("input", { key: '4369b4a99016a7aebbb396bdda35c31d92e4d557', name: this.name, id: `${this.name}__input`, value: this.determineInputValue(), type: 'text', class: `text__input ${invalidClass}`, placeholder: `${this.placeholder}`, ref: (el) => this.inputReference = el, readOnly: this.autofilled, required: this.validation.mandatory, minlength: this.validation.minLength, maxlength: this.maxPostalCodeLength, onInput: this.handleInput, onBlur: this.handleBlur, onFocus: this.handleFocus }), !isUKCountry && (h("p", { key: '0e3c0fcb974d2f3dae76f9afdbf173fcc25d258f', class: "address__manual-input-msg", onClick: () => this.enterAddressManually() }, translate('enterIEAddressManually', this.language))), showAddressesDropdown && (h("div", { key: '1c644f87f2617180e6356c724d72b6d3fc8e472e', class: "input__addresses-container", ref: (el) => (this.addressesDropdownRef = el) }, h("div", { key: 'f2a7b8133908441a3cf67eb48928a2d61d17e32f', class: "options" }, this.addresses.map((addr, index) => (h("div", { key: index, class: "option", onClick: (e) => this.handlePostalCode(e, addr) }, addr.number, " ", addr.street, " ", addr.city)))))), showLoadingMessage && (h("div", { key: 'c0cb29f7d174ca8981c8b9dfd2ee9b972b0fd1ea', class: "postalcode__loading-spinner" }, h("div", { key: '76f17cb0a440f7ed9cc8de3620b55136549586e6', class: "loading-spinner" }), h("span", { key: 'e10c4177fb0f21f142fd3120177e450413687cf3' }, translate('searchingForAddresses', this.language)))), shouldShowNoResults && (h("div", { key: 'f729f6206cc900a2c94e3df0e8b08cc3dc5b751f', class: "postalcode__no-results-message" }, translate('postalLookUpNoAddressFound', this.language)))), h("small", { key: 'c8a79e601f22444b34dc7d037c94f92875f51aad', class: 'text__error-message' }, this.errorMessage)));
13997
+ return (h("div", { key: 'f0dda39cf9a02d53213848926908c0cb39d1cd3f', class: `text__wrapper ${this.name}__input ${this.autofilled ? 'text__wrapper--autofilled' : ''}`, ref: el => this.stylingContainer = el }, h("div", { key: '5e1c51af264392d2be986e305e6526310f55f40b', class: 'text__wrapper--flex' }, h("label", { key: 'c12c45d88bdf42aeb6be505d473ab0f55da2be87', class: `text__label ${this.validation.mandatory ? 'text__label--required' : ''}`, htmlFor: `${this.name}__input` }, this.displayName), h("div", { key: '7b93a75f19590b445227fa1a64c90fd20c0afd5d', class: 'text__wrapper--relative' }, this.tooltip && (h("img", { key: '504004a13595694307c1e3450b69982150dc55fd', class: 'text__tooltip-icon', src: tooltipIconSvg, alt: "", ref: (el) => this.tooltipIconReference = el, onClick: () => this.showTooltip = !this.showTooltip })), this.renderTooltip())), h("div", { key: '19de66fd72fd0a6befe3bbaebb6c8f99ec5f850b', class: 'input__text-wrapper' }, h("input", { key: '78cd4229ed5104518b991df0bc6bf527df2ec3e2', name: this.name, id: `${this.name}__input`, value: this.determineInputValue(), type: 'text', class: `text__input ${invalidClass}`, placeholder: `${this.placeholder}`, ref: (el) => this.inputReference = el, readOnly: this.autofilled, required: this.validation.mandatory, minlength: this.validation.minLength, maxlength: this.maxPostalCodeLength, onInput: this.handleInput, onBlur: this.handleBlur, onFocus: this.handleFocus }), !isUKCountry && (h("p", { key: '6b9e307d59fb9fed93f4df6c07a091d299844c62', class: "address__manual-input-msg", onClick: () => this.enterAddressManually() }, translate('enterIEAddressManually', this.language))), showAddressesDropdown && (h("div", { key: 'ecb7892a9a8d967540d8fd013518ae19498fcd48', class: "input__addresses-container", ref: (el) => (this.addressesDropdownRef = el) }, h("div", { key: 'a5ef3f81a85207a821964e23b21aaf783be807cc', class: "options" }, this.addresses.map((addr, index) => (h("div", { key: index, class: "option", onClick: (e) => this.handlePostalCode(e, addr) }, addr.number, " ", addr.street, " ", addr.city)))))), showLoadingMessage && (h("div", { key: '338c17e484721efb387e608f3ce4416a0e47b8af', class: "postalcode__loading-spinner" }, h("div", { key: '7638cea4fba975e3a27d4cb00bce217129bd0750', class: "loading-spinner" }), h("span", { key: 'b59a8a9c3d7ecf209a68717346d1d29062994f79' }, translate('searchingForAddresses', this.language)))), shouldShowNoResults && (h("div", { key: '212a74fed94b3ee089aed5c9afb544966b5f11cd', class: "postalcode__no-results-message" }, translate('postalLookUpNoAddressFound', this.language)))), h("small", { key: '4f66e97dd811b9917c92ff4bcbf236817ac57933', class: 'text__error-message' }, this.errorMessage)));
14041
13998
  }
14042
13999
  static get watchers() { return {
14043
- "clientStyling": ["handleStylingChange"],
14000
+ "clientStyling": ["handleClientStylingChange"],
14044
14001
  "isValid": ["validityChanged"],
14045
14002
  "emitValue": ["emitValueHandler"],
14046
14003
  "addresses": ["handleAddresses"]
@@ -14056,11 +14013,6 @@ const RadioInput = class {
14056
14013
  registerInstance(this, hostRef);
14057
14014
  this.sendInputValue = createEvent(this, "sendInputValue", 7);
14058
14015
  this.sendValidityState = createEvent(this, "sendValidityState", 7);
14059
- this.setClientStyling = () => {
14060
- let sheet = document.createElement('style');
14061
- sheet.innerHTML = this.clientStyling;
14062
- this.stylingContainer.prepend(sheet);
14063
- };
14064
14016
  this.name = undefined;
14065
14017
  this.displayName = undefined;
14066
14018
  this.optionsGroup = undefined;
@@ -14069,14 +14021,15 @@ const RadioInput = class {
14069
14021
  this.language = undefined;
14070
14022
  this.emitValue = undefined;
14071
14023
  this.clientStyling = '';
14024
+ this.mbSource = undefined;
14072
14025
  this.errorMessage = undefined;
14073
14026
  this.isValid = undefined;
14074
- this.limitStylingAppends = false;
14075
14027
  this.showTooltip = false;
14076
14028
  }
14077
- handleStylingChange(newValue, oldValue) {
14078
- if (newValue !== oldValue)
14079
- this.setClientStyling();
14029
+ handleClientStylingChange(newValue, oldValue) {
14030
+ if (newValue !== oldValue) {
14031
+ setClientStyling(this.stylingContainer, this.clientStyling);
14032
+ }
14080
14033
  }
14081
14034
  validityChanged() {
14082
14035
  this.validityStateHandler({ valid: this.isValid, name: this.name });
@@ -14101,14 +14054,17 @@ const RadioInput = class {
14101
14054
  this.showTooltip = false;
14102
14055
  }
14103
14056
  }
14104
- componentDidRender() {
14105
- // start custom styling area
14106
- if (!this.limitStylingAppends && this.stylingContainer) {
14107
- if (this.clientStyling)
14108
- this.setClientStyling();
14109
- this.limitStylingAppends = true;
14057
+ handleClientStyling() {
14058
+ if (window.emMessageBus !== undefined) {
14059
+ this.stylingSubscription = setStreamStyling(this.stylingContainer, `${this.mbSource}.Style`, this.stylingSubscription, true);
14060
+ return;
14061
+ }
14062
+ if (this.clientStyling) {
14063
+ setClientStyling(this.stylingContainer, this.clientStyling);
14110
14064
  }
14111
- // end custom styling area
14065
+ }
14066
+ componentDidLoad() {
14067
+ this.handleClientStyling();
14112
14068
  }
14113
14069
  handleClick(event) {
14114
14070
  this.value = event.target.value;
@@ -14131,11 +14087,11 @@ const RadioInput = class {
14131
14087
  return null;
14132
14088
  }
14133
14089
  render() {
14134
- return h("fieldset", { key: '33493de460303a32a37d253a0fd5f9da59676542', class: `radio__fieldset ${this.name}__input`, ref: el => this.stylingContainer = el }, h("legend", { key: '8aef7aa84a119742e05d72d976c936a560154b3f', class: 'radio__legend' }, this.displayName, ":"), this.optionsGroup.map(option => h("div", { class: 'radio__wrapper' }, h("input", { type: "radio", class: 'radio__input', id: `${option.label}__input`, ref: (el) => this.inputReference = el, value: option.value, name: this.name, required: this.validation.mandatory, onClick: (e) => this.handleClick(e) }), h("label", { htmlFor: `${option.label}__input` }, option.label))), h("small", { key: 'bec44ed4007e408ddeb0b0293b82e034c8e165f2', class: 'radio__error-message' }, this.errorMessage), this.tooltip &&
14135
- h("img", { key: 'a3b0a041beabe3f14661c0af8cd970040d060435', class: 'radio__tooltip-icon', src: tooltipIconSvg, alt: "", ref: (el) => this.tooltipIconReference = el, onClick: () => this.showTooltip = !this.showTooltip }), this.renderTooltip());
14090
+ return h("fieldset", { key: '7048de0e37c9541af1c9788e8b46c789ca788c31', class: `radio__fieldset ${this.name}__input`, ref: el => this.stylingContainer = el }, h("legend", { key: '403b739c966d510740ca59621c094872b93e2cba', class: 'radio__legend' }, this.displayName, ":"), this.optionsGroup.map(option => h("div", { class: 'radio__wrapper' }, h("input", { type: "radio", class: 'radio__input', id: `${option.label}__input`, ref: (el) => this.inputReference = el, value: option.value, name: this.name, required: this.validation.mandatory, onClick: (e) => this.handleClick(e) }), h("label", { htmlFor: `${option.label}__input` }, option.label))), h("small", { key: '46dce1082a6aa9f2a5bdc3e3654c924fcd2a8357', class: 'radio__error-message' }, this.errorMessage), this.tooltip &&
14091
+ h("img", { key: 'dfe155a429485b5c891db2943d9115cdc40e169b', class: 'radio__tooltip-icon', src: tooltipIconSvg, alt: "", ref: (el) => this.tooltipIconReference = el, onClick: () => this.showTooltip = !this.showTooltip }), this.renderTooltip());
14136
14092
  }
14137
14093
  static get watchers() { return {
14138
- "clientStyling": ["handleStylingChange"],
14094
+ "clientStyling": ["handleClientStylingChange"],
14139
14095
  "isValid": ["validityChanged"],
14140
14096
  "emitValue": ["emitValueHandler"]
14141
14097
  }; }
@@ -14184,11 +14140,6 @@ const SelectInput = class {
14184
14140
  this.validityStateHandler({ valid: this.isValid, name: this.name });
14185
14141
  this.emitValueHandler(true);
14186
14142
  };
14187
- this.setClientStyling = () => {
14188
- let sheet = document.createElement('style');
14189
- sheet.innerHTML = this.clientStyling;
14190
- this.stylingContainer.prepend(sheet);
14191
- };
14192
14143
  this.name = undefined;
14193
14144
  this.displayName = undefined;
14194
14145
  this.placeholder = undefined;
@@ -14201,14 +14152,15 @@ const SelectInput = class {
14201
14152
  this.language = undefined;
14202
14153
  this.emitValue = undefined;
14203
14154
  this.clientStyling = '';
14155
+ this.mbSource = undefined;
14204
14156
  this.errorMessage = undefined;
14205
14157
  this.isValid = undefined;
14206
- this.limitStylingAppends = false;
14207
14158
  this.showTooltip = false;
14208
14159
  }
14209
- handleStylingChange(newValue, oldValue) {
14210
- if (newValue !== oldValue)
14211
- this.setClientStyling();
14160
+ handleClientStylingChange(newValue, oldValue) {
14161
+ if (newValue !== oldValue) {
14162
+ setClientStyling(this.stylingContainer, this.clientStyling);
14163
+ }
14212
14164
  }
14213
14165
  validityChanged() {
14214
14166
  this.validityStateHandler({ valid: this.isValid, name: this.name });
@@ -14258,16 +14210,17 @@ const SelectInput = class {
14258
14210
  }
14259
14211
  }
14260
14212
  }
14261
- componentDidRender() {
14262
- // start custom styling area
14263
- if (!this.limitStylingAppends && this.stylingContainer) {
14264
- if (this.clientStyling)
14265
- this.setClientStyling();
14266
- this.limitStylingAppends = true;
14213
+ handleClientStyling() {
14214
+ if (window.emMessageBus !== undefined) {
14215
+ this.stylingSubscription = setStreamStyling(this.stylingContainer, `${this.mbSource}.Style`, this.stylingSubscription, true);
14216
+ return;
14217
+ }
14218
+ if (this.clientStyling) {
14219
+ setClientStyling(this.stylingContainer, this.clientStyling);
14267
14220
  }
14268
- // end custom styling area
14269
14221
  }
14270
14222
  componentDidLoad() {
14223
+ this.handleClientStyling();
14271
14224
  this.inputReference = this.vaadinCombo.querySelector('input');
14272
14225
  if (this.defaultValue) {
14273
14226
  this.value = this.defaultValue;
@@ -14332,13 +14285,13 @@ const SelectInput = class {
14332
14285
  if (this.touched) {
14333
14286
  invalidClass = this.isValid == true || this.isValid == undefined ? '' : 'text__input--invalid';
14334
14287
  }
14335
- return h("div", { key: 'b0ed504667761e5fd77e0ac13382b467448a1944', class: `select__wrapper ${this.autofilled ? 'select__wrapper--autofilled' : ''} ${this.name}__input`, ref: el => this.stylingContainer = el }, h("div", { key: 'b48d38dc4c2cb3442ff6773a1b1d13191ec4d0e6', class: 'select__wrapper--flex' }, h("label", { key: 'ad592c8c98ecbec1961d22cdfeb8cec910291ea8', class: 'select__label', htmlFor: `${this.name}__input` }, this.displayName, h("span", { key: 'b3c0f2fe9a2d26ade1626878ed9bc1f0b86a23ad', class: this.validation.mandatory ? 'select__label--required' : '' })), h("div", { key: '29d0f504d0f51175818dffffb882ac4e6e9c3bde', class: 'select__wrapper--relative' }, this.tooltip &&
14336
- h("img", { key: '66e524ffebc43f9418e90b3bd2d7ae62eba47da3', class: 'select__tooltip-icon', src: tooltipIconSvg, alt: "", ref: (el) => this.tooltipIconReference = el, onClick: () => this.showTooltip = !this.showTooltip }), this.renderTooltip())), this.isComboBox ? h("vaadin-combo-box", { name: this.name, id: `${this.name}__input`, class: `select__input ${invalidClass} ${this.autofilled ? 'select__input--autofilled' : ''}`, "item-label-path": "label", "item-value-path": "value", ref: (el) => this.vaadinCombo = el, readOnly: this.autofilled, required: (_a = this.validation) === null || _a === void 0 ? void 0 : _a.mandatory, value: this.value, placeholder: `${this.placeholder}`, items: this.displayedOptions, onChange: this.handleComboChange, onBlur: this.handleBlur })
14288
+ return h("div", { key: 'eb6c9d7d85546159d44d06a0635f173263edd7d1', class: `select__wrapper ${this.autofilled ? 'select__wrapper--autofilled' : ''} ${this.name}__input`, ref: el => this.stylingContainer = el }, h("div", { key: '0fd71c528870966fdb23049b1806a267e9e6ca5c', class: 'select__wrapper--flex' }, h("label", { key: '44aeb4e50ab2f79df06741ff07ac03131c987447', class: 'select__label', htmlFor: `${this.name}__input` }, this.displayName, h("span", { key: '796a83aeadd480a571b6bae035a46138d7b10b24', class: this.validation.mandatory ? 'select__label--required' : '' })), h("div", { key: '6d7b2d785c6b0bdd05c7444f563b21cedf26ff7c', class: 'select__wrapper--relative' }, this.tooltip &&
14289
+ h("img", { key: 'f33e43a9d42e8b8d1cf136374505eeaedcbede26', class: 'select__tooltip-icon', src: tooltipIconSvg, alt: "", ref: (el) => this.tooltipIconReference = el, onClick: () => this.showTooltip = !this.showTooltip }), this.renderTooltip())), this.isComboBox ? h("vaadin-combo-box", { name: this.name, id: `${this.name}__input`, class: `select__input ${invalidClass} ${this.autofilled ? 'select__input--autofilled' : ''}`, "item-label-path": "label", "item-value-path": "value", ref: (el) => this.vaadinCombo = el, readOnly: this.autofilled, required: (_a = this.validation) === null || _a === void 0 ? void 0 : _a.mandatory, value: this.value, placeholder: `${this.placeholder}`, items: this.displayedOptions, onChange: this.handleComboChange, onBlur: this.handleBlur })
14337
14290
  :
14338
- h("vaadin-select", { name: this.name, popover: false, id: `${this.name}__input`, class: `select__input ${invalidClass} ${this.autofilled ? 'select__input--autofilled' : ''}`, "item-label-path": "label", "item-value-path": "value", ref: (el) => this.vaadinCombo = el, readOnly: this.autofilled, required: (_b = this.validation) === null || _b === void 0 ? void 0 : _b.mandatory, value: this.value, placeholder: `${this.placeholder}`, items: this.displayedOptions, onChange: this.handleSelectChange, "no-vertical-overlap": true, noVerticalOverlap: true }), h("small", { key: '0143b538740c3a8e9bfcab6bbb44660355c40cf7', class: 'select__error-message' }, this.errorMessage));
14291
+ h("vaadin-select", { name: this.name, popover: false, id: `${this.name}__input`, class: `select__input ${invalidClass} ${this.autofilled ? 'select__input--autofilled' : ''}`, "item-label-path": "label", "item-value-path": "value", ref: (el) => this.vaadinCombo = el, readOnly: this.autofilled, required: (_b = this.validation) === null || _b === void 0 ? void 0 : _b.mandatory, value: this.value, placeholder: `${this.placeholder}`, items: this.displayedOptions, onChange: this.handleSelectChange, "no-vertical-overlap": true, noVerticalOverlap: true }), h("small", { key: '261b3c4abc9b360e6b937d851f8bfc810280a8c6', class: 'select__error-message' }, this.errorMessage));
14339
14292
  }
14340
14293
  static get watchers() { return {
14341
- "clientStyling": ["handleStylingChange"],
14294
+ "clientStyling": ["handleClientStylingChange"],
14342
14295
  "isValid": ["validityChanged"],
14343
14296
  "emitValue": ["emitValueHandler"]
14344
14297
  }; }
@@ -14373,11 +14326,6 @@ const TelInput = class {
14373
14326
  this.isValid = this.isValidValue();
14374
14327
  this.errorMessage = this.setErrorMessage();
14375
14328
  };
14376
- this.setClientStyling = () => {
14377
- let sheet = document.createElement('style');
14378
- sheet.innerHTML = this.clientStyling;
14379
- this.stylingContainer.prepend(sheet);
14380
- };
14381
14329
  this.name = undefined;
14382
14330
  this.displayName = undefined;
14383
14331
  this.placeholder = undefined;
@@ -14390,9 +14338,9 @@ const TelInput = class {
14390
14338
  this.language = undefined;
14391
14339
  this.emitValue = undefined;
14392
14340
  this.clientStyling = '';
14341
+ this.mbSource = undefined;
14393
14342
  this.isValid = undefined;
14394
14343
  this.errorMessage = undefined;
14395
- this.limitStylingAppends = false;
14396
14344
  this.showTooltip = false;
14397
14345
  this.disablePhonePrefix = false;
14398
14346
  this.phoneValue = '';
@@ -14404,9 +14352,10 @@ const TelInput = class {
14404
14352
  if (this.inputReference)
14405
14353
  this.inputReference.value = this.phoneValue;
14406
14354
  }
14407
- handleStylingChange(newValue, oldValue) {
14408
- if (newValue !== oldValue)
14409
- this.setClientStyling();
14355
+ handleClientStylingChange(newValue, oldValue) {
14356
+ if (newValue !== oldValue) {
14357
+ setClientStyling(this.stylingContainer, this.clientStyling);
14358
+ }
14410
14359
  }
14411
14360
  validityChanged() {
14412
14361
  this.validityStateHandler({ valid: this.isValid, name: this.name });
@@ -14457,16 +14406,17 @@ const TelInput = class {
14457
14406
  }
14458
14407
  }
14459
14408
  }
14460
- componentDidRender() {
14461
- // start custom styling area
14462
- if (!this.limitStylingAppends && this.stylingContainer) {
14463
- if (this.clientStyling)
14464
- this.setClientStyling();
14465
- this.limitStylingAppends = true;
14409
+ handleClientStyling() {
14410
+ if (window.emMessageBus !== undefined) {
14411
+ this.stylingSubscription = setStreamStyling(this.stylingContainer, `${this.mbSource}.Style`, this.stylingSubscription, true);
14412
+ return;
14413
+ }
14414
+ if (this.clientStyling) {
14415
+ setClientStyling(this.stylingContainer, this.clientStyling);
14466
14416
  }
14467
- // end custom styling area
14468
14417
  }
14469
14418
  componentDidLoad() {
14419
+ this.handleClientStyling();
14470
14420
  this.isValid = this.isValidValue();
14471
14421
  if (this.defaultValue) {
14472
14422
  this.value = this.defaultValue;
@@ -14558,11 +14508,11 @@ const TelInput = class {
14558
14508
  if (this.touched) {
14559
14509
  invalidClass = this.isValid == true || this.isValid == undefined ? '' : 'text__input--invalid';
14560
14510
  }
14561
- return h("div", { key: 'bf824bf310bec50746fb6b82cd8f7decbcfc284b', class: `tel__wrapper ${this.autofilled ? 'tel__wrapper--autofilled' : ''} ${this.name}__input`, ref: el => this.stylingContainer = el }, h("div", { key: '0b6c42e7aca5686f310ffdcecb96cf909e83521f', class: 'tel__wrapper--flex-label' }, h("label", { key: 'ddf2fa885ac53e7f337525357a7dce52f911213d', class: `tel__label ${this.validation.mandatory ? 'tel__label--required' : ''}`, htmlFor: `${this.name}__input` }, this.displayName), h("div", { key: 'e21a84509b32f379bb3ce92137255caf99a86dc5', class: 'tel__wrapper--relative' }, this.tooltip &&
14562
- h("img", { key: '9ff0a8c19aa067c1e7799227617405e373b344e4', class: 'tel__tooltip-icon', src: tooltipIconSvg, alt: "", ref: (el) => this.tooltipIconReference = el, onClick: () => this.showTooltip = !this.showTooltip }), this.renderTooltip())), h("div", { key: '5db13af7e421480b89253970a5f2470f999c922d', class: `tel__wrapper--flex ${invalidClass}` }, h("vaadin-combo-box", { key: '164fe2bd2940bd5a251fda48b28f1af1bc3e78be', class: 'tel__prefix', items: this.phoneCodesOptions, value: this.prefixValue, readOnly: this.disablePhonePrefix, onChange: (e) => this.handlePrefixInput(e) }), h("input", { key: '90ae038a383645d6579fb68bc5adbe8a2b1d676c', type: "tel", ref: (el) => this.inputReference = el, id: `${this.name}__input`, readOnly: this.autofilled, class: `tel__input`, value: (_a = this.phoneValue) !== null && _a !== void 0 ? _a : '', placeholder: `${this.placeholder}`, required: this.validation.mandatory, minlength: this.validation.minLength, maxlength: this.validation.maxLength, pattern: this.validationPattern, onInput: this.handleInput, onBlur: this.handleBlur })), h("small", { key: 'a68f95384965384a67d042b89264dbda03f25b7a', class: 'tel__error-message' }, this.errorMessage));
14511
+ return h("div", { key: '9cf9eb751bca1978d8554fffc912ef2039c42e41', class: `tel__wrapper ${this.autofilled ? 'tel__wrapper--autofilled' : ''} ${this.name}__input`, ref: el => this.stylingContainer = el }, h("div", { key: 'cc88d6e9aa7a0f3801fad75e3ca509fbd01b0538', class: 'tel__wrapper--flex-label' }, h("label", { key: 'c8a35af4ddd2d4f9751d7f60c9e075ae8eccb441', class: `tel__label ${this.validation.mandatory ? 'tel__label--required' : ''}`, htmlFor: `${this.name}__input` }, this.displayName), h("div", { key: '73fcdcc25dde1be087ee60062dc5eee2d1e5d29e', class: 'tel__wrapper--relative' }, this.tooltip &&
14512
+ h("img", { key: '56df66fddf599fbafb179c7cd90ea7d58b008ea6', class: 'tel__tooltip-icon', src: tooltipIconSvg, alt: "", ref: (el) => this.tooltipIconReference = el, onClick: () => this.showTooltip = !this.showTooltip }), this.renderTooltip())), h("div", { key: '20eb5689932c2f71322102229cc7346d18e9bc87', class: `tel__wrapper--flex ${invalidClass}` }, h("vaadin-combo-box", { key: '9ec4142dc84e0022ced7e34248d5f4f8f59c34af', class: 'tel__prefix', items: this.phoneCodesOptions, value: this.prefixValue, readOnly: this.disablePhonePrefix, onChange: (e) => this.handlePrefixInput(e) }), h("input", { key: 'c083b17f71de36b84892a8080f776debf1fe7351', type: "tel", ref: (el) => this.inputReference = el, id: `${this.name}__input`, readOnly: this.autofilled, class: `tel__input`, value: (_a = this.phoneValue) !== null && _a !== void 0 ? _a : '', placeholder: `${this.placeholder}`, required: this.validation.mandatory, minlength: this.validation.minLength, maxlength: this.validation.maxLength, pattern: this.validationPattern, onInput: this.handleInput, onBlur: this.handleBlur })), h("small", { key: '2201c2d7b968731042624b265cf535c656c86933', class: 'tel__error-message' }, this.errorMessage));
14563
14513
  }
14564
14514
  static get watchers() { return {
14565
- "clientStyling": ["handleStylingChange"],
14515
+ "clientStyling": ["handleClientStylingChange"],
14566
14516
  "isValid": ["validityChanged"],
14567
14517
  "emitValue": ["emitValueHandler"]
14568
14518
  }; }
@@ -14606,11 +14556,6 @@ const TextInput = class {
14606
14556
  this.touched = true;
14607
14557
  this.updateValidationState();
14608
14558
  };
14609
- this.setClientStyling = () => {
14610
- let sheet = document.createElement('style');
14611
- sheet.innerHTML = this.clientStyling;
14612
- this.stylingContainer.prepend(sheet);
14613
- };
14614
14559
  this.name = undefined;
14615
14560
  this.displayName = undefined;
14616
14561
  this.placeholder = undefined;
@@ -14625,15 +14570,16 @@ const TextInput = class {
14625
14570
  this.clientStyling = '';
14626
14571
  this.haspostalcodelookup = undefined;
14627
14572
  this.enableSouthAfricanMode = undefined;
14573
+ this.mbSource = undefined;
14628
14574
  this.isValid = undefined;
14629
14575
  this.errorMessage = '';
14630
- this.limitStylingAppends = false;
14631
14576
  this.showTooltip = false;
14632
14577
  this.selectedCountryCode = '';
14633
14578
  }
14634
- handleStylingChange(newValue, oldValue) {
14635
- if (newValue !== oldValue)
14636
- this.setClientStyling();
14579
+ handleClientStylingChange(newValue, oldValue) {
14580
+ if (newValue !== oldValue) {
14581
+ setClientStyling(this.stylingContainer, this.clientStyling);
14582
+ }
14637
14583
  }
14638
14584
  validityChanged() {
14639
14585
  this.validityStateHandler({ valid: this.isValid, name: this.name });
@@ -14745,21 +14691,22 @@ const TextInput = class {
14745
14691
  }
14746
14692
  this.validityStateHandler({ valid: false, name: this.name });
14747
14693
  }
14748
- componentDidRender() {
14749
- // start custom styling area
14750
- if (!this.limitStylingAppends && this.stylingContainer) {
14751
- if (this.clientStyling)
14752
- this.setClientStyling();
14753
- this.limitStylingAppends = true;
14754
- }
14755
- // end custom styling area
14756
- }
14757
14694
  componentWillLoad() {
14758
14695
  if (this.defaultValue) {
14759
14696
  this.value = this.defaultValue;
14760
14697
  }
14761
14698
  }
14699
+ handleClientStyling() {
14700
+ if (window.emMessageBus !== undefined) {
14701
+ this.stylingSubscription = setStreamStyling(this.stylingContainer, `${this.mbSource}.Style`, this.stylingSubscription, true);
14702
+ return;
14703
+ }
14704
+ if (this.clientStyling) {
14705
+ setClientStyling(this.stylingContainer, this.clientStyling);
14706
+ }
14707
+ }
14762
14708
  componentDidLoad() {
14709
+ this.handleClientStyling();
14763
14710
  if (this.defaultValue) {
14764
14711
  this.value = this.defaultValue;
14765
14712
  this.valueHandler({ name: this.name, value: this.value });
@@ -14871,11 +14818,11 @@ const TextInput = class {
14871
14818
  if (this.touched) {
14872
14819
  invalidClass = this.isValid == true || this.isValid == undefined ? '' : 'text__input--invalid';
14873
14820
  }
14874
- return h("div", { key: 'aacb35e1808720cfdb24708254c01cb5be0fe6b6', class: `text__wrapper ${this.name}__input ${this.autofilled ? 'text__wrapper--autofilled' : ''}`, ref: el => this.stylingContainer = el }, h("div", { key: '14a292cc7661d663698384d989d57d21786210b9', class: 'text__wrapper--flex' }, h("label", { key: 'c04b29364c4b54e9aad3036264044177e4a2dc51', class: `text__label ${this.validation.mandatory ? 'text__label--required' : ''}`, htmlFor: `${this.name}__input` }, this.displayName), h("div", { key: 'eb8aee30e47241b533c7ca8fcb354c782b4e2be1', class: 'text__wrapper--relative' }, this.tooltip &&
14875
- h("img", { key: '23d4b70d93910f43ce0ea54c1bcffd81dfc54ebc', class: 'text__tooltip-icon', src: tooltipIconSvg, alt: "", ref: (el) => this.tooltipIconReference = el, onClick: () => this.showTooltip = !this.showTooltip }), this.renderTooltip())), h("input", { key: '3f901d85111256370811f4abe51bcd5b2971b60c', name: this.name, id: `${this.name}__input`, value: this.value, type: 'text', class: `text__input ${invalidClass}`, placeholder: `${this.placeholder}`, ref: (el) => this.inputReference = el, readOnly: this.autofilled, required: this.validation.mandatory, minlength: this.enableSouthAfricanMode ? '' : this.validation.minLength, maxlength: this.enableSouthAfricanMode ? '' : this.validation.maxLength, onInput: this.handleInput, onBlur: this.handleBlur }), h("small", { key: '1661215687f1eecd622b2610c3e056f45944fee3', class: 'text__error-message' }, this.errorMessage));
14821
+ return h("div", { key: 'f48e592bac049022b283bac917c095772b1508f5', class: `text__wrapper ${this.name}__input ${this.autofilled ? 'text__wrapper--autofilled' : ''}`, ref: el => this.stylingContainer = el }, h("div", { key: 'fe3626ead38dd18dfa14795ee2332e93f5f09652', class: 'text__wrapper--flex' }, h("label", { key: '6b2854b460e0ac7d4ae0ebccc06dbe64770581d5', class: `text__label ${this.validation.mandatory ? 'text__label--required' : ''}`, htmlFor: `${this.name}__input` }, this.displayName), h("div", { key: 'f29d266973bd700a4270495bc4eb6e8296b6eeaf', class: 'text__wrapper--relative' }, this.tooltip &&
14822
+ h("img", { key: '68e69abbb78250e763822608e963bc16d702f099', class: 'text__tooltip-icon', src: tooltipIconSvg, alt: "", ref: (el) => this.tooltipIconReference = el, onClick: () => this.showTooltip = !this.showTooltip }), this.renderTooltip())), h("input", { key: '99b8eab15ab32656f86fedd3f36a09a5bbe108d3', name: this.name, id: `${this.name}__input`, value: this.value, type: 'text', class: `text__input ${invalidClass}`, placeholder: `${this.placeholder}`, ref: (el) => this.inputReference = el, readOnly: this.autofilled, required: this.validation.mandatory, minlength: this.enableSouthAfricanMode ? '' : this.validation.minLength, maxlength: this.enableSouthAfricanMode ? '' : this.validation.maxLength, onInput: this.handleInput, onBlur: this.handleBlur }), h("small", { key: 'cc28c1c19370faa94fa1f738066042dce8d694ce', class: 'text__error-message' }, this.errorMessage));
14876
14823
  }
14877
14824
  static get watchers() { return {
14878
- "clientStyling": ["handleStylingChange"],
14825
+ "clientStyling": ["handleClientStylingChange"],
14879
14826
  "isValid": ["validityChanged"],
14880
14827
  "emitValue": ["emitValueHandler"]
14881
14828
  }; }
@@ -14897,11 +14844,6 @@ const ToggleCheckboxInput = class {
14897
14844
  event.stopPropagation();
14898
14845
  window.postMessage({ type: `registration${fieldName}Clicked` }, window.location.href);
14899
14846
  };
14900
- this.setClientStyling = () => {
14901
- let sheet = document.createElement('style');
14902
- sheet.innerHTML = this.clientStyling;
14903
- this.stylingContainer.prepend(sheet);
14904
- };
14905
14847
  this.name = undefined;
14906
14848
  this.displayName = undefined;
14907
14849
  this.defaultValue = '';
@@ -14912,15 +14854,16 @@ const ToggleCheckboxInput = class {
14912
14854
  this.language = undefined;
14913
14855
  this.emitValue = undefined;
14914
14856
  this.clientStyling = '';
14857
+ this.mbSource = undefined;
14915
14858
  this.errorMessage = undefined;
14916
14859
  this.isValid = undefined;
14917
- this.limitStylingAppends = false;
14918
14860
  this.showTooltip = false;
14919
14861
  this.showFields = this.defaultValue === 'true';
14920
14862
  }
14921
- handleStylingChange(newValue, oldValue) {
14922
- if (newValue !== oldValue)
14923
- this.setClientStyling();
14863
+ handleClientStylingChange(newValue, oldValue) {
14864
+ if (newValue !== oldValue) {
14865
+ setClientStyling(this.stylingContainer, this.clientStyling);
14866
+ }
14924
14867
  }
14925
14868
  validityStateHandler(inputStateEvent) {
14926
14869
  this.sendValidityState.emit(inputStateEvent);
@@ -14934,16 +14877,17 @@ const ToggleCheckboxInput = class {
14934
14877
  this.showTooltip = false;
14935
14878
  }
14936
14879
  }
14937
- componentDidRender() {
14938
- // start custom styling area
14939
- if (!this.limitStylingAppends && this.stylingContainer) {
14940
- if (this.clientStyling)
14941
- this.setClientStyling();
14942
- this.limitStylingAppends = true;
14880
+ handleClientStyling() {
14881
+ if (window.emMessageBus !== undefined) {
14882
+ this.stylingSubscription = setStreamStyling(this.stylingContainer, `${this.mbSource}.Style`, this.stylingSubscription, true);
14883
+ return;
14884
+ }
14885
+ if (this.clientStyling) {
14886
+ setClientStyling(this.stylingContainer, this.clientStyling);
14943
14887
  }
14944
- // end custom styling area
14945
14888
  }
14946
14889
  componentDidLoad() {
14890
+ this.handleClientStyling();
14947
14891
  if (this.options.length === 0)
14948
14892
  return;
14949
14893
  this.options.forEach((subField) => {
@@ -14980,13 +14924,13 @@ const ToggleCheckboxInput = class {
14980
14924
  return null;
14981
14925
  }
14982
14926
  render() {
14983
- return h("div", { key: '828751327e59e9649afc04c6c9f7a02ef7dcae8d', class: `togglecheckbox__wrapper ${this.name}__input`, ref: el => this.stylingContainer = el }, h("div", { key: 'd02a2a6ef595aaf7142cbc6e9681394ee4db8fee', class: 'togglecheckbox__wrapper--flex' }, h("input", { key: 'fca6401ef6eb178f53471362444d54ed69086429', class: 'togglecheckbox__input', type: "checkbox", id: `${this.name}__input`, ref: (el) => this.checkboxReference = el, name: this.name, checked: this.defaultValue === "true", readOnly: this.autofilled, required: this.validation.mandatory, value: this.value, onClick: () => this.handleClick() }), this.renderLabel()), h("small", { key: '3781a8fdfeb719422693bcd541a4a3fe708e705a', class: 'togglecheckbox__error-message' }, this.errorMessage), h("div", { key: '27a4c6b047cd332407ee40c82cf7be1914ed34c9', class: 'togglecheckbox__wrapper--relative' }, this.tooltip &&
14984
- h("img", { key: 'f1367d7e061d20ad68c24dfbe3147e6b67df746f', class: 'togglecheckbox__tooltip-icon', src: tooltipIconSvg, alt: "", ref: (el) => this.tooltipIconReference = el, onClick: () => this.showTooltip = !this.showTooltip }), this.renderTooltip()), h("div", { key: '98d42103554de4d14a65eafd1722bf9d587a27f1', class: `togglecheckbox__fields-wrapper ${this.showFields ? '' : 'hidden'}` }, this.options.map(subfield => {
14927
+ return h("div", { key: '31cd24b5da24368eef2f53952714395d6d9f6285', class: `togglecheckbox__wrapper ${this.name}__input`, ref: el => this.stylingContainer = el }, h("div", { key: 'aa14784bd8a3870f7015db79d23226521706ad58', class: 'togglecheckbox__wrapper--flex' }, h("input", { key: '0237f06c99b8b2ed7de80433f5b93b9eae7c25f5', class: 'togglecheckbox__input', type: "checkbox", id: `${this.name}__input`, ref: (el) => this.checkboxReference = el, name: this.name, checked: this.defaultValue === "true", readOnly: this.autofilled, required: this.validation.mandatory, value: this.value, onClick: () => this.handleClick() }), this.renderLabel()), h("small", { key: '7e26bea1cfcc725d5aa5a795fd0f999d99abe39d', class: 'togglecheckbox__error-message' }, this.errorMessage), h("div", { key: '4256fc552545b7a1050ff5cdeb005f5ea83cc5c1', class: 'togglecheckbox__wrapper--relative' }, this.tooltip &&
14928
+ h("img", { key: 'be3c3e036f0bfe46658fce870ae0ffa258229e7d', class: 'togglecheckbox__tooltip-icon', src: tooltipIconSvg, alt: "", ref: (el) => this.tooltipIconReference = el, onClick: () => this.showTooltip = !this.showTooltip }), this.renderTooltip()), h("div", { key: '2d61bedaac02f21116318b10a21b361e70e0213f', class: `togglecheckbox__fields-wrapper ${this.showFields ? '' : 'hidden'}` }, this.options.map(subfield => {
14985
14929
  return h("general-input", { type: subfield.inputType, name: subfield.name, displayName: subfield.displayName, validation: subfield.validate, action: subfield.action || null, defaultValue: subfield.defaultValue, autofilled: subfield.autofill, emitValue: this.emitValue, language: this.language, "client-styling": this.clientStyling, tooltip: subfield.tooltip, placeholder: subfield.placeholder == null ? '' : subfield.placeholder, ref: el => this.subFieldsObject[subfield.name] = el });
14986
14930
  })));
14987
14931
  }
14988
14932
  static get watchers() { return {
14989
- "clientStyling": ["handleStylingChange"]
14933
+ "clientStyling": ["handleClientStylingChange"]
14990
14934
  }; }
14991
14935
  };
14992
14936
  ToggleCheckboxInput.style = ToggleCheckboxInputStyle0;
@@ -15012,17 +14956,6 @@ const TwofaInput = class {
15012
14956
  this.triggerResendInterval();
15013
14957
  this.resendCode.emit();
15014
14958
  };
15015
- this.setClientStylingURL = () => {
15016
- let url = new URL(this.clientStylingUrl);
15017
- let cssFile = document.createElement('style');
15018
- fetch(url.href)
15019
- .then((res) => res.text())
15020
- .then((data) => {
15021
- cssFile.innerHTML = data;
15022
- this.clientStyling = data;
15023
- setTimeout(() => { this.host.shadowRoot.prepend(cssFile); }, 1);
15024
- });
15025
- };
15026
14959
  this.setInputRef = (el, idx) => {
15027
14960
  if (el) {
15028
14961
  this.inputRefs[idx] = el;
@@ -15078,21 +15011,6 @@ const TwofaInput = class {
15078
15011
  this.setValidity();
15079
15012
  this.setErrorMessage();
15080
15013
  };
15081
- this.setClientStyling = () => {
15082
- let sheet = document.createElement('style');
15083
- sheet.innerHTML = this.clientStyling;
15084
- this.stylingContainer.prepend(sheet);
15085
- };
15086
- this.setStreamStyling = (domain) => {
15087
- if (window.emMessageBus) {
15088
- const sheet = document.createElement('style');
15089
- this.stylingSubscription = window.emMessageBus.subscribe(domain, (data) => {
15090
- sheet.innerHTML = data;
15091
- this.clientStyling = data;
15092
- this.host.shadowRoot.prepend(sheet);
15093
- });
15094
- }
15095
- };
15096
15014
  this.name = '';
15097
15015
  this.displayName = '';
15098
15016
  this.placeholder = '';
@@ -15107,7 +15025,6 @@ const TwofaInput = class {
15107
15025
  this.pinAttemptsExceeded = undefined;
15108
15026
  this.clientStylingUrl = '';
15109
15027
  this.mbSource = undefined;
15110
- this.limitStylingAppends = false;
15111
15028
  this.isValid = false;
15112
15029
  this.isResendButtonAvailable = true;
15113
15030
  this.showTooltip = false;
@@ -15127,9 +15044,16 @@ const TwofaInput = class {
15127
15044
  this.valueHandler({ name: this.name, value: this.code.join('') });
15128
15045
  }
15129
15046
  }
15130
- handleStylingUrlChange(newValue, oldValue) {
15131
- if (newValue !== oldValue)
15132
- this.setClientStylingURL();
15047
+ handleClientStylingChange(newValue, oldValue) {
15048
+ if (newValue !== oldValue) {
15049
+ setClientStyling(this.stylingContainer, this.clientStyling);
15050
+ }
15051
+ }
15052
+ handleClientStylingChangeURL(newValue, oldValue) {
15053
+ if (newValue !== oldValue) {
15054
+ if (this.clientStylingUrl)
15055
+ setClientStylingURL(this.stylingContainer, this.clientStylingUrl);
15056
+ }
15133
15057
  }
15134
15058
  validityStateHandler(inputStateEvent) {
15135
15059
  this.sendValidityState.emit(inputStateEvent);
@@ -15143,10 +15067,6 @@ const TwofaInput = class {
15143
15067
  this.showTooltip = false;
15144
15068
  }
15145
15069
  }
15146
- handleStylingChange(newValue, oldValue) {
15147
- if (newValue !== oldValue)
15148
- this.setClientStyling();
15149
- }
15150
15070
  connectedCallback() {
15151
15071
  this.validationPattern = this.setPattern();
15152
15072
  this.code = new Array(this.validation.maxLength).fill('');
@@ -15154,30 +15074,21 @@ const TwofaInput = class {
15154
15074
  disconnectedCallback() {
15155
15075
  this.stylingSubscription && this.stylingSubscription.unsubscribe();
15156
15076
  }
15157
- componentDidRender() {
15158
- if (!this.limitStylingAppends && this.stylingContainer) {
15159
- if (this.clientStyling) {
15160
- this.setClientStyling();
15161
- }
15162
- this.limitStylingAppends = true;
15077
+ handleClientStyling() {
15078
+ if (window.emMessageBus !== undefined) {
15079
+ this.stylingSubscription = setStreamStyling(this.stylingContainer, `${this.mbSource}.Style`, this.stylingSubscription, true);
15080
+ return;
15163
15081
  }
15082
+ if (this.clientStyling)
15083
+ setClientStyling(this.stylingContainer, this.clientStyling);
15084
+ if (this.clientStylingUrl)
15085
+ setClientStylingURL(this.stylingContainer, this.clientStylingUrl);
15164
15086
  }
15165
15087
  componentDidLoad() {
15166
15088
  this.setValidity();
15167
15089
  this.registrationWidgetLoaded.emit();
15168
15090
  window.postMessage({ type: 'registrationWidgetLoaded' }, window.location.href);
15169
- if (!this.limitStylingAppends && this.host) {
15170
- if (window.emMessageBus != undefined) {
15171
- this.setStreamStyling(`${this.mbSource}.Style`);
15172
- }
15173
- else {
15174
- if (this.clientStyling)
15175
- this.setClientStyling();
15176
- if (this.clientStylingUrl)
15177
- this.setClientStylingURL();
15178
- this.limitStylingAppends = true;
15179
- }
15180
- }
15091
+ this.handleClientStyling();
15181
15092
  }
15182
15093
  handleKeyDown(e, idx) {
15183
15094
  if (e.key === 'Backspace') {
@@ -15268,9 +15179,9 @@ const TwofaInput = class {
15268
15179
  return current;
15269
15180
  }
15270
15181
  render() {
15271
- return (h("div", { key: '08b9139f1c2236dd40a045517a9623ad966f29d3', class: "twofa", ref: el => this.stylingContainer = el }, h("div", { key: '7528885100be3d450ec52aafd6085a4c852710c8', class: 'twofa__error-message' }, h("p", { key: '51dab3f02156b5eb3b7408f06f2d359cfbda11a7' }, this.errorMessage)), h("div", { key: 'f336f89ecee0724663b1bbb4d443bb834336b5c1', class: "twofa__description", innerHTML: translate('twofaDescription', this.language, { values: { destination: this.destination } }) }), h("div", { key: '5127127ccc8e50428f8319fddc9e21606f3b4148', class: "twofa__input-wrapper", ref: this.setContainerRef }, this.code.map((_, idx) => {
15182
+ return (h("div", { key: 'cd5396afccaf4016201281f5cc53898c0a2052ed', class: "twofa", ref: el => this.stylingContainer = el }, h("div", { key: '008dd54682a0d93190e9e5b2b49673262ed01763', class: 'twofa__error-message' }, h("p", { key: '41db51d6b396ccd1f3149e4473e96960e92d05ca' }, this.errorMessage)), h("div", { key: '67e9e4ac90cf95f2269e75b121ed220a02c5f139', class: "twofa__description", innerHTML: translate('twofaDescription', this.language, { values: { destination: this.destination } }) }), h("div", { key: '702c342eb7be0001ab8de310cadd7e8684a8025d', class: "twofa__input-wrapper", ref: this.setContainerRef }, this.code.map((_, idx) => {
15272
15183
  return (h("input", { key: idx, ref: el => this.setInputRef(el, idx), id: `otp-input-${idx}`, type: "text", maxLength: 2, value: this.getInputDisplayValue(idx), onInput: (event) => this.handleInput(event, idx), onKeyDown: (event) => this.handleKeyDown(event, idx), onPaste: (event) => this.handlePaste(event) }));
15273
- })), h("div", { key: 'be82ae1192129d571275b78c8097c3023468cf3e', class: "twofa__button-wrapper" }, h("p", { key: '11de61d738ffa74bfd44f0d7c88fc4e456647d0c', class: "twofa__resend-message" }, translate('twofaResendMessage', this.language)), h("button", { key: '84d5c55c4d9bf024164ec52e2100cfcc8c236ac2', class: `twofa__resend-button ${this.pinAttemptsExceeded ? 'twofa__resend-button--disabled' : ''}`, onClick: this.resendCodeHandler, disabled: !this.isResendButtonAvailable || this.pinAttemptsExceeded }, this.isResendButtonAvailable
15184
+ })), h("div", { key: '63564bd4a0442232f81058ba914ee86c537ce85a', class: "twofa__button-wrapper" }, h("p", { key: '219f5005c0d03189df48f05c5e0cd980eb0e1979', class: "twofa__resend-message" }, translate('twofaResendMessage', this.language)), h("button", { key: '12b7b4bc3ea165994f2c50107f406c64e708cf4d', class: `twofa__resend-button ${this.pinAttemptsExceeded ? 'twofa__resend-button--disabled' : ''}`, onClick: this.resendCodeHandler, disabled: !this.isResendButtonAvailable || this.pinAttemptsExceeded }, this.isResendButtonAvailable
15274
15185
  ? translate('twofaResendButton', this.language)
15275
15186
  : this.formatTime()))));
15276
15187
  }
@@ -15278,8 +15189,8 @@ const TwofaInput = class {
15278
15189
  static get watchers() { return {
15279
15190
  "isValid": ["validityChanged"],
15280
15191
  "emitValue": ["emitValueHandler"],
15281
- "clientStylingUrl": ["handleStylingUrlChange"],
15282
- "clientStyling": ["handleStylingChange"]
15192
+ "clientStyling": ["handleClientStylingChange"],
15193
+ "clientStylingUrl": ["handleClientStylingChangeURL"]
15283
15194
  }; }
15284
15195
  };
15285
15196
  TwofaInput.style = TwofaInputStyle0;