@everymatrix/general-registration-multistep 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.
- package/dist/cjs/checkbox-group-input_15.cjs.entry.js +395 -392
- package/dist/cjs/general-registration-multistep.cjs.js +2 -2
- package/dist/cjs/{index-2b1397e1.js → index-67740284.js} +1 -4
- package/dist/cjs/loader.cjs.js +2 -2
- package/dist/collection/components/general-registration-multisteps/general-registration-multistep.js +23 -48
- package/dist/esm/checkbox-group-input_15.entry.js +395 -392
- package/dist/esm/general-registration-multistep.js +3 -3
- package/dist/esm/{index-9ed15dae.js → index-35614435.js} +1 -4
- package/dist/esm/loader.js +3 -3
- package/dist/general-registration-multistep/checkbox-group-input_15.entry.js +241 -241
- package/dist/general-registration-multistep/general-registration-multistep.esm.js +1 -1
- package/dist/general-registration-multistep/{index-9ed15dae.js → index-35614435.js} +2 -2
- package/dist/types/components/general-registration-multisteps/general-registration-multistep.d.ts +4 -6
- package/package.json +1 -1
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { r as registerInstance, c as createEvent, h, g as getElement, H as Host } from './index-
|
|
1
|
+
import { r as registerInstance, c as createEvent, h, g as getElement, H as Host } from './index-35614435.js';
|
|
2
2
|
|
|
3
3
|
const DEFAULT_LANGUAGE$1 = 'en';
|
|
4
4
|
const TRANSLATIONS$1 = {
|
|
@@ -374,6 +374,124 @@ const validateID = (id) => {
|
|
|
374
374
|
|
|
375
375
|
const tooltipIconSvg = 'data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTIiIGhlaWdodD0iMTIiIHZpZXdCb3g9IjAgMCAxMiAxMiIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KPGNpcmNsZSBjeD0iNiIgY3k9IjYiIHI9IjUuNSIgc3Ryb2tlPSIjOTc5Nzk3Ii8+CjxyZWN0IHg9IjUiIHk9IjUiIHdpZHRoPSIyIiBoZWlnaHQ9IjUiIGZpbGw9IiM5Nzk3OTciLz4KPGNpcmNsZSBjeD0iNiIgY3k9IjMiIHI9IjEiIGZpbGw9IiM5Nzk3OTciLz4KPC9zdmc+Cg==';
|
|
376
376
|
|
|
377
|
+
const StyleCacheKey = '__WIDGET_GLOBAL_STYLE_CACHE__';
|
|
378
|
+
|
|
379
|
+
/**
|
|
380
|
+
* @name setClientStyling
|
|
381
|
+
* @description Method used to create and append to the passed element of the widget a style element with the content received
|
|
382
|
+
* @param {HTMLElement} stylingContainer The reference element of the widget
|
|
383
|
+
* @param {string} clientStyling The style content
|
|
384
|
+
*/
|
|
385
|
+
function setClientStyling(stylingContainer, clientStyling) {
|
|
386
|
+
if (stylingContainer) {
|
|
387
|
+
const sheet = document.createElement('style');
|
|
388
|
+
sheet.innerHTML = clientStyling;
|
|
389
|
+
stylingContainer.appendChild(sheet);
|
|
390
|
+
}
|
|
391
|
+
}
|
|
392
|
+
|
|
393
|
+
/**
|
|
394
|
+
* @name setClientStylingURL
|
|
395
|
+
* @description Method used to create and append to the passed element of the widget a style element with the content fetched from a given URL
|
|
396
|
+
* @param {HTMLElement} stylingContainer The reference element of the widget
|
|
397
|
+
* @param {string} clientStylingUrl The URL of the style content
|
|
398
|
+
*/
|
|
399
|
+
function setClientStylingURL(stylingContainer, clientStylingUrl) {
|
|
400
|
+
if (!stylingContainer || !clientStylingUrl) return;
|
|
401
|
+
|
|
402
|
+
const url = new URL(clientStylingUrl);
|
|
403
|
+
|
|
404
|
+
fetch(url.href)
|
|
405
|
+
.then((res) => res.text())
|
|
406
|
+
.then((data) => {
|
|
407
|
+
const cssFile = document.createElement('style');
|
|
408
|
+
cssFile.innerHTML = data;
|
|
409
|
+
if (stylingContainer) {
|
|
410
|
+
stylingContainer.appendChild(cssFile);
|
|
411
|
+
}
|
|
412
|
+
})
|
|
413
|
+
.catch((err) => {
|
|
414
|
+
console.error('There was an error while trying to load client styling from URL', err);
|
|
415
|
+
});
|
|
416
|
+
}
|
|
417
|
+
|
|
418
|
+
/**
|
|
419
|
+
* @name setStreamLibrary
|
|
420
|
+
* @description Method used to create and append to the passed element of the widget a style element with content fetched from the MessageBus
|
|
421
|
+
* @param {HTMLElement} stylingContainer The highest element of the widget
|
|
422
|
+
* @param {string} domain The domain from where the content should be fetched (e.g. 'Casino.Style', 'App.Style', 'casino-footer.style', etc.)
|
|
423
|
+
* @param {ref} subscription A reference to a variable where the subscription should be saved for unsubscribing when no longer needed
|
|
424
|
+
* @param {boolean} useAdoptedStyleSheets A flag to gradually enable testing of adoptedStyleSheets
|
|
425
|
+
*/
|
|
426
|
+
function setStreamStyling(stylingContainer, domain, subscription, useAdoptedStyleSheets = false) {
|
|
427
|
+
if (!window.emMessageBus) return;
|
|
428
|
+
|
|
429
|
+
const supportAdoptStyle = 'adoptedStyleSheets' in Document.prototype;
|
|
430
|
+
|
|
431
|
+
if (!supportAdoptStyle || !useAdoptedStyleSheets) {
|
|
432
|
+
subscription = getStyleTagSubscription(stylingContainer, domain);
|
|
433
|
+
|
|
434
|
+
return subscription;
|
|
435
|
+
}
|
|
436
|
+
|
|
437
|
+
if (!window[StyleCacheKey]) {
|
|
438
|
+
window[StyleCacheKey] = {};
|
|
439
|
+
}
|
|
440
|
+
subscription = getAdoptStyleSubscription(stylingContainer, domain);
|
|
441
|
+
|
|
442
|
+
const originalUnsubscribe = subscription.unsubscribe.bind(subscription);
|
|
443
|
+
const wrappedUnsubscribe = () => {
|
|
444
|
+
if (window[StyleCacheKey][domain]) {
|
|
445
|
+
const cachedObject = window[StyleCacheKey][domain];
|
|
446
|
+
cachedObject.refCount > 1
|
|
447
|
+
? (cachedObject.refCount = cachedObject.refCount - 1)
|
|
448
|
+
: delete window[StyleCacheKey][domain];
|
|
449
|
+
}
|
|
450
|
+
|
|
451
|
+
originalUnsubscribe();
|
|
452
|
+
};
|
|
453
|
+
subscription.unsubscribe = wrappedUnsubscribe;
|
|
454
|
+
|
|
455
|
+
return subscription;
|
|
456
|
+
}
|
|
457
|
+
|
|
458
|
+
function getStyleTagSubscription(stylingContainer, domain) {
|
|
459
|
+
const sheet = document.createElement('style');
|
|
460
|
+
|
|
461
|
+
return window.emMessageBus.subscribe(domain, (data) => {
|
|
462
|
+
if (stylingContainer) {
|
|
463
|
+
sheet.innerHTML = data;
|
|
464
|
+
stylingContainer.appendChild(sheet);
|
|
465
|
+
}
|
|
466
|
+
});
|
|
467
|
+
}
|
|
468
|
+
|
|
469
|
+
function getAdoptStyleSubscription(stylingContainer, domain) {
|
|
470
|
+
return window.emMessageBus.subscribe(domain, (data) => {
|
|
471
|
+
if (!stylingContainer) return;
|
|
472
|
+
|
|
473
|
+
const shadowRoot = stylingContainer.getRootNode();
|
|
474
|
+
const cacheStyleObject = window[StyleCacheKey];
|
|
475
|
+
let cachedStyle = cacheStyleObject[domain] && cacheStyleObject[domain].sheet;
|
|
476
|
+
|
|
477
|
+
if (!cachedStyle) {
|
|
478
|
+
cachedStyle = new CSSStyleSheet();
|
|
479
|
+
cachedStyle.replaceSync(data);
|
|
480
|
+
cacheStyleObject[domain] = {
|
|
481
|
+
sheet: cachedStyle,
|
|
482
|
+
refCount: 1
|
|
483
|
+
};
|
|
484
|
+
} else {
|
|
485
|
+
cacheStyleObject[domain].refCount = cacheStyleObject[domain].refCount + 1;
|
|
486
|
+
}
|
|
487
|
+
|
|
488
|
+
const currentSheets = shadowRoot.adoptedStyleSheets || [];
|
|
489
|
+
if (!currentSheets.includes(cachedStyle)) {
|
|
490
|
+
shadowRoot.adoptedStyleSheets = [...currentSheets, cachedStyle];
|
|
491
|
+
}
|
|
492
|
+
});
|
|
493
|
+
}
|
|
494
|
+
|
|
377
495
|
const checkboxGroupInputCss = "*,*::before,*::after{padding:0;margin:0;box-sizing:border-box}vaadin-checkbox-group{margin-top:5px;margin-left:40px}.checkboxgroup{font-family:\"Roboto\";font-style:normal;font-size:15px}.checkboxgroup__wrapper{position:relative}.checkboxgroup__wrapper--flex{display:flex;gap:5px;align-content:flex-start}.checkboxgroup__wrapper--relative{position:relative;display:inline}.checkboxgroup__input{vertical-align:baseline}.checkboxgroup__input[indeterminate]::part(checkbox)::after,.checkboxgroup__input[indeterminate]::part(checkbox),.checkboxgroup__input[checked]::part(checkbox){background-color:var(--emw--login-color-primary, var(--emw--color-primary, #22B04E))}.checkboxgroup__label{font-style:inherit;font-family:inherit;font-weight:400;font-size:16px;color:var(--emw--registration-typography, var(--emw--color-black, #000000));line-height:1.5;padding-left:10px;vertical-align:baseline}.checkboxgroup__label-text{font-size:16px}.checkboxgroup__label a{color:var(--emw--login-color-primary, var(--emw--color-primary, #22B04E))}.checkboxgroup__error-message{position:absolute;top:calc(100% + 5px);left:0;color:var(--emw--color-error, var(--emw--color-red, #ed0909))}.checkboxgroup__tooltip-icon{width:16px;height:auto}.checkboxgroup__tooltip{position:absolute;top:0;right:0;background-color:var(--emw--color-white, #FFFFFF);border:1px solid var(--emw--color-gray-100, #E6E6E6);color:var(--emw--registration-typography, var(--emw--color-black, #000000));padding:10px;border-radius:5px;opacity:0;transition:opacity 0.3s ease-in-out;z-index:10}.checkboxgroup__tooltip.visible{opacity:1}.checkbox__input::part(checkbox){background-color:var(--emw--color-white, #FFFFFF);transform:scale(0.8, 0.8);border-radius:var(--emw--border-radius-small, 2px);box-shadow:0 0px 0px 2px var(--emw--color-gray, #7a7a7a)}.checkbox__input[indeterminate]::part(checkbox),.checkbox__input[checked]::part(checkbox){background-color:var(--emw--login-color-primary, var(--emw--color-primary, #22B04E));box-shadow:none}";
|
|
378
496
|
const CheckboxGroupInputStyle0 = checkboxGroupInputCss;
|
|
379
497
|
|
|
@@ -383,11 +501,6 @@ const CheckboxGroupInput = class {
|
|
|
383
501
|
this.sendValidityState = createEvent(this, "sendValidityState", 7);
|
|
384
502
|
this.sendInputValue = createEvent(this, "sendInputValue", 7);
|
|
385
503
|
this.value = null;
|
|
386
|
-
this.setClientStyling = () => {
|
|
387
|
-
let sheet = document.createElement('style');
|
|
388
|
-
sheet.innerHTML = this.clientStyling;
|
|
389
|
-
this.stylingContainer.prepend(sheet);
|
|
390
|
-
};
|
|
391
504
|
this.name = undefined;
|
|
392
505
|
this.displayName = undefined;
|
|
393
506
|
this.defaultValue = '';
|
|
@@ -398,16 +511,17 @@ const CheckboxGroupInput = class {
|
|
|
398
511
|
this.language = undefined;
|
|
399
512
|
this.emitValue = undefined;
|
|
400
513
|
this.clientStyling = '';
|
|
514
|
+
this.mbSource = undefined;
|
|
401
515
|
this.errorMessage = undefined;
|
|
402
516
|
this.isValid = undefined;
|
|
403
|
-
this.limitStylingAppends = false;
|
|
404
517
|
this.showTooltip = false;
|
|
405
518
|
this.selectedValues = [];
|
|
406
519
|
this.showCheckboxes = false;
|
|
407
520
|
}
|
|
408
|
-
|
|
409
|
-
if (newValue !== oldValue)
|
|
410
|
-
this.
|
|
521
|
+
handleClientStylingChange(newValue, oldValue) {
|
|
522
|
+
if (newValue !== oldValue) {
|
|
523
|
+
setClientStyling(this.stylingContainer, this.clientStyling);
|
|
524
|
+
}
|
|
411
525
|
}
|
|
412
526
|
validityChanged() {
|
|
413
527
|
this.validityStateHandler({ valid: this.isValid, name: this.name });
|
|
@@ -439,16 +553,17 @@ const CheckboxGroupInput = class {
|
|
|
439
553
|
this.showTooltip = false;
|
|
440
554
|
}
|
|
441
555
|
}
|
|
442
|
-
|
|
443
|
-
|
|
444
|
-
|
|
445
|
-
|
|
446
|
-
|
|
447
|
-
|
|
556
|
+
handleClientStyling() {
|
|
557
|
+
if (window.emMessageBus !== undefined) {
|
|
558
|
+
this.stylingSubscription = setStreamStyling(this.stylingContainer, `${this.mbSource}.Style`, this.stylingSubscription, true);
|
|
559
|
+
return;
|
|
560
|
+
}
|
|
561
|
+
if (this.clientStyling) {
|
|
562
|
+
setClientStyling(this.stylingContainer, this.clientStyling);
|
|
448
563
|
}
|
|
449
|
-
// end custom styling area
|
|
450
564
|
}
|
|
451
565
|
componentDidLoad() {
|
|
566
|
+
this.handleClientStyling();
|
|
452
567
|
this.inputReference = this.element.shadowRoot.querySelector('input');
|
|
453
568
|
// For now this input has no validation. Send isValid as true immediately.
|
|
454
569
|
//@TODO: add validation logic to it, if business reason arises.
|
|
@@ -485,14 +600,14 @@ const CheckboxGroupInput = class {
|
|
|
485
600
|
return (h("label", { class: 'checkbox__label', htmlFor: `${this.name}__input`, slot: 'label' }, h("div", { class: 'checkbox__label-text', innerHTML: `${this.displayName} ${this.validation.mandatory ? '*' : ''}` })));
|
|
486
601
|
}
|
|
487
602
|
render() {
|
|
488
|
-
return h("div", { key: '
|
|
489
|
-
h("img", { key: '
|
|
603
|
+
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 &&
|
|
604
|
+
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) => {
|
|
490
605
|
this.selectedValues = event.detail.value;
|
|
491
606
|
} }, this.options.map((checkbox) => h("vaadin-checkbox", { class: 'checkbox__input', name: checkbox.name, value: checkbox.name, label: checkbox.displayName })))));
|
|
492
607
|
}
|
|
493
608
|
get element() { return getElement(this); }
|
|
494
609
|
static get watchers() { return {
|
|
495
|
-
"clientStyling": ["
|
|
610
|
+
"clientStyling": ["handleClientStylingChange"],
|
|
496
611
|
"isValid": ["validityChanged"],
|
|
497
612
|
"selectedValues": ["setValue"],
|
|
498
613
|
"emitValue": ["emitValueHandler"]
|
|
@@ -509,11 +624,6 @@ const CheckboxInput = class {
|
|
|
509
624
|
this.sendValidityState = createEvent(this, "sendValidityState", 7);
|
|
510
625
|
this.sendInputValue = createEvent(this, "sendInputValue", 7);
|
|
511
626
|
this.value = '';
|
|
512
|
-
this.setClientStyling = () => {
|
|
513
|
-
let sheet = document.createElement('style');
|
|
514
|
-
sheet.innerHTML = this.clientStyling;
|
|
515
|
-
this.stylingContainer.prepend(sheet);
|
|
516
|
-
};
|
|
517
627
|
this.name = undefined;
|
|
518
628
|
this.displayName = undefined;
|
|
519
629
|
this.defaultValue = '';
|
|
@@ -523,14 +633,15 @@ const CheckboxInput = class {
|
|
|
523
633
|
this.language = undefined;
|
|
524
634
|
this.emitValue = undefined;
|
|
525
635
|
this.clientStyling = '';
|
|
636
|
+
this.mbSource = undefined;
|
|
526
637
|
this.errorMessage = undefined;
|
|
527
638
|
this.isValid = undefined;
|
|
528
|
-
this.limitStylingAppends = false;
|
|
529
639
|
this.showTooltip = false;
|
|
530
640
|
}
|
|
531
|
-
|
|
532
|
-
if (newValue !== oldValue)
|
|
533
|
-
this.
|
|
641
|
+
handleClientStylingChange(newValue, oldValue) {
|
|
642
|
+
if (newValue !== oldValue) {
|
|
643
|
+
setClientStyling(this.stylingContainer, this.clientStyling);
|
|
644
|
+
}
|
|
534
645
|
}
|
|
535
646
|
validityChanged() {
|
|
536
647
|
this.validityStateHandler({ valid: this.isValid, name: this.name });
|
|
@@ -555,16 +666,17 @@ const CheckboxInput = class {
|
|
|
555
666
|
this.showTooltip = false;
|
|
556
667
|
}
|
|
557
668
|
}
|
|
558
|
-
|
|
559
|
-
|
|
560
|
-
|
|
561
|
-
|
|
562
|
-
|
|
563
|
-
|
|
669
|
+
handleClientStyling() {
|
|
670
|
+
if (window.emMessageBus !== undefined) {
|
|
671
|
+
this.stylingSubscription = setStreamStyling(this.stylingContainer, `${this.mbSource}.Style`, this.stylingSubscription, true);
|
|
672
|
+
return;
|
|
673
|
+
}
|
|
674
|
+
if (this.clientStyling) {
|
|
675
|
+
setClientStyling(this.stylingContainer, this.clientStyling);
|
|
564
676
|
}
|
|
565
|
-
// end custom styling area
|
|
566
677
|
}
|
|
567
678
|
componentDidLoad() {
|
|
679
|
+
this.handleClientStyling();
|
|
568
680
|
this.inputReference = this.vaadinCheckbox.querySelector('input');
|
|
569
681
|
if (this.defaultValue) {
|
|
570
682
|
this.value = this.defaultValue;
|
|
@@ -599,10 +711,10 @@ const CheckboxInput = class {
|
|
|
599
711
|
return null;
|
|
600
712
|
}
|
|
601
713
|
render() {
|
|
602
|
-
return (h("div", { key: '
|
|
714
|
+
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()));
|
|
603
715
|
}
|
|
604
716
|
static get watchers() { return {
|
|
605
|
-
"clientStyling": ["
|
|
717
|
+
"clientStyling": ["handleClientStylingChange"],
|
|
606
718
|
"isValid": ["validityChanged"],
|
|
607
719
|
"emitValue": ["emitValueHandler"]
|
|
608
720
|
}; }
|
|
@@ -5993,11 +6105,6 @@ const DateInput = class {
|
|
|
5993
6105
|
const date = parse(inputValue, this.dateFormat, new Date());
|
|
5994
6106
|
return { year: date.getFullYear(), month: date.getMonth(), day: date.getDate() };
|
|
5995
6107
|
};
|
|
5996
|
-
this.setClientStyling = () => {
|
|
5997
|
-
let sheet = document.createElement('style');
|
|
5998
|
-
sheet.innerHTML = this.clientStyling;
|
|
5999
|
-
this.stylingContainer.prepend(sheet);
|
|
6000
|
-
};
|
|
6001
6108
|
this.handleDocumentIdUpdate = (e) => {
|
|
6002
6109
|
if (this.name !== CONSTANTS$1.BIRTHDATE) {
|
|
6003
6110
|
return;
|
|
@@ -6084,9 +6191,9 @@ const DateInput = class {
|
|
|
6084
6191
|
this.emitOnClick = false;
|
|
6085
6192
|
this.enableSouthAfricanMode = undefined;
|
|
6086
6193
|
this.enableManualDateInput = false;
|
|
6194
|
+
this.mbSource = undefined;
|
|
6087
6195
|
this.errorMessage = undefined;
|
|
6088
6196
|
this.isValid = undefined;
|
|
6089
|
-
this.limitStylingAppends = false;
|
|
6090
6197
|
this.showTooltip = false;
|
|
6091
6198
|
}
|
|
6092
6199
|
get formattedValue() {
|
|
@@ -6095,9 +6202,10 @@ const DateInput = class {
|
|
|
6095
6202
|
const parsedDate = parse(this.value, 'yyyy-MM-dd', new Date());
|
|
6096
6203
|
return format(parsedDate, this.dateFormat);
|
|
6097
6204
|
}
|
|
6098
|
-
|
|
6099
|
-
if (newValue !== oldValue)
|
|
6100
|
-
this.
|
|
6205
|
+
handleClientStylingChange(newValue, oldValue) {
|
|
6206
|
+
if (newValue !== oldValue) {
|
|
6207
|
+
setClientStyling(this.stylingContainer, this.clientStyling);
|
|
6208
|
+
}
|
|
6101
6209
|
}
|
|
6102
6210
|
validityChanged() {
|
|
6103
6211
|
this.validityStateHandler({ valid: this.isValid, name: this.name });
|
|
@@ -6135,17 +6243,18 @@ const DateInput = class {
|
|
|
6135
6243
|
this.minDate = parse(((_a = this.validation.min) === null || _a === void 0 ? void 0 : _a.toString()) || '', 'yyyy-MM-dd', new Date());
|
|
6136
6244
|
this.maxDate = parse(((_b = this.validation.max) === null || _b === void 0 ? void 0 : _b.toString()) || '', 'yyyy-MM-dd', new Date());
|
|
6137
6245
|
}
|
|
6138
|
-
|
|
6139
|
-
|
|
6140
|
-
|
|
6141
|
-
|
|
6142
|
-
|
|
6143
|
-
|
|
6246
|
+
handleClientStyling() {
|
|
6247
|
+
if (window.emMessageBus !== undefined) {
|
|
6248
|
+
this.stylingSubscription = setStreamStyling(this.stylingContainer, `${this.mbSource}.Style`, this.stylingSubscription, true);
|
|
6249
|
+
return;
|
|
6250
|
+
}
|
|
6251
|
+
if (this.clientStyling) {
|
|
6252
|
+
setClientStyling(this.stylingContainer, this.clientStyling);
|
|
6144
6253
|
}
|
|
6145
|
-
// end custom styling area
|
|
6146
6254
|
}
|
|
6147
6255
|
componentDidLoad() {
|
|
6148
6256
|
var _a;
|
|
6257
|
+
this.handleClientStyling();
|
|
6149
6258
|
this.datePicker = this.element.shadowRoot.querySelector('vaadin-date-picker');
|
|
6150
6259
|
this.inputReference = this.element.shadowRoot.querySelector('input');
|
|
6151
6260
|
if (this.datePicker) {
|
|
@@ -6300,12 +6409,12 @@ const DateInput = class {
|
|
|
6300
6409
|
if (this.touched) {
|
|
6301
6410
|
invalidClass = this.isValid == true || this.isValid == undefined ? '' : 'text__input--invalid';
|
|
6302
6411
|
}
|
|
6303
|
-
return h("div", { key: '
|
|
6304
|
-
h("img", { key: '
|
|
6412
|
+
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 &&
|
|
6413
|
+
h("img", { key: 'd91fcd13e1ae384b67b6d478834b65136ab77b77', class: 'date__tooltip-icon', src: tooltipIconSvg, alt: "", ref: (el) => this.tooltipIconReference = el, onClick: () => this.showTooltip = !this.showTooltip }), this.renderTooltip());
|
|
6305
6414
|
}
|
|
6306
6415
|
get element() { return getElement(this); }
|
|
6307
6416
|
static get watchers() { return {
|
|
6308
|
-
"clientStyling": ["
|
|
6417
|
+
"clientStyling": ["handleClientStylingChange"],
|
|
6309
6418
|
"isValid": ["validityChanged"],
|
|
6310
6419
|
"emitValue": ["emitValueHandler"],
|
|
6311
6420
|
"enableSouthAfricanMode": ["handleCustomRegistrationChange"]
|
|
@@ -6340,11 +6449,6 @@ const EmailInput = class {
|
|
|
6340
6449
|
this.errorMessage = this.setErrorMessage();
|
|
6341
6450
|
this.touched = true;
|
|
6342
6451
|
};
|
|
6343
|
-
this.setClientStyling = () => {
|
|
6344
|
-
let sheet = document.createElement('style');
|
|
6345
|
-
sheet.innerHTML = this.clientStyling;
|
|
6346
|
-
this.stylingContainer.prepend(sheet);
|
|
6347
|
-
};
|
|
6348
6452
|
this.name = undefined;
|
|
6349
6453
|
this.displayName = undefined;
|
|
6350
6454
|
this.placeholder = undefined;
|
|
@@ -6356,14 +6460,15 @@ const EmailInput = class {
|
|
|
6356
6460
|
this.emitValue = undefined;
|
|
6357
6461
|
this.isDuplicateInput = undefined;
|
|
6358
6462
|
this.clientStyling = '';
|
|
6463
|
+
this.mbSource = undefined;
|
|
6359
6464
|
this.errorMessage = undefined;
|
|
6360
6465
|
this.isValid = undefined;
|
|
6361
|
-
this.limitStylingAppends = false;
|
|
6362
6466
|
this.showTooltip = false;
|
|
6363
6467
|
}
|
|
6364
|
-
|
|
6365
|
-
if (newValue !== oldValue)
|
|
6366
|
-
this.
|
|
6468
|
+
handleClientStylingChange(newValue, oldValue) {
|
|
6469
|
+
if (newValue !== oldValue) {
|
|
6470
|
+
setClientStyling(this.stylingContainer, this.clientStyling);
|
|
6471
|
+
}
|
|
6367
6472
|
}
|
|
6368
6473
|
validityChanged() {
|
|
6369
6474
|
this.validityStateHandler({ valid: this.isValid, name: this.name });
|
|
@@ -6398,16 +6503,17 @@ const EmailInput = class {
|
|
|
6398
6503
|
connectedCallback() {
|
|
6399
6504
|
this.validationPattern = this.setPattern();
|
|
6400
6505
|
}
|
|
6401
|
-
|
|
6402
|
-
|
|
6403
|
-
|
|
6404
|
-
|
|
6405
|
-
|
|
6406
|
-
|
|
6506
|
+
handleClientStyling() {
|
|
6507
|
+
if (window.emMessageBus !== undefined) {
|
|
6508
|
+
this.stylingSubscription = setStreamStyling(this.stylingContainer, `${this.mbSource}.Style`, this.stylingSubscription, true);
|
|
6509
|
+
return;
|
|
6510
|
+
}
|
|
6511
|
+
if (this.clientStyling) {
|
|
6512
|
+
setClientStyling(this.stylingContainer, this.clientStyling);
|
|
6407
6513
|
}
|
|
6408
|
-
// end custom styling area
|
|
6409
6514
|
}
|
|
6410
6515
|
componentDidLoad() {
|
|
6516
|
+
this.handleClientStyling();
|
|
6411
6517
|
this.isValid = this.setValidity();
|
|
6412
6518
|
if (this.defaultValue) {
|
|
6413
6519
|
this.value = this.defaultValue;
|
|
@@ -6453,11 +6559,11 @@ const EmailInput = class {
|
|
|
6453
6559
|
if (this.touched) {
|
|
6454
6560
|
invalidClass = this.isValid == true || this.isValid == undefined ? '' : 'text__input--invalid';
|
|
6455
6561
|
}
|
|
6456
|
-
return h("div", { key: '
|
|
6457
|
-
h("img", { key: '
|
|
6562
|
+
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 &&
|
|
6563
|
+
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));
|
|
6458
6564
|
}
|
|
6459
6565
|
static get watchers() { return {
|
|
6460
|
-
"clientStyling": ["
|
|
6566
|
+
"clientStyling": ["handleClientStylingChange"],
|
|
6461
6567
|
"isValid": ["validityChanged"],
|
|
6462
6568
|
"emitValue": ["emitValueHandler"]
|
|
6463
6569
|
}; }
|
|
@@ -13131,32 +13237,6 @@ const GeneralInput = class {
|
|
|
13131
13237
|
constructor(hostRef) {
|
|
13132
13238
|
registerInstance(this, hostRef);
|
|
13133
13239
|
this.registrationWidgetLoaded = createEvent(this, "registrationWidgetLoaded", 7);
|
|
13134
|
-
this.setClientStyling = () => {
|
|
13135
|
-
let sheet = document.createElement('style');
|
|
13136
|
-
sheet.innerHTML = this.clientStyling;
|
|
13137
|
-
this.host.shadowRoot.prepend(sheet);
|
|
13138
|
-
};
|
|
13139
|
-
this.setStreamStyling = (domain) => {
|
|
13140
|
-
if (window.emMessageBus) {
|
|
13141
|
-
const sheet = document.createElement('style');
|
|
13142
|
-
this.stylingSubscription = window.emMessageBus.subscribe(domain, (data) => {
|
|
13143
|
-
sheet.innerHTML = data;
|
|
13144
|
-
this.clientStyling = data;
|
|
13145
|
-
this.host.shadowRoot.prepend(sheet);
|
|
13146
|
-
});
|
|
13147
|
-
}
|
|
13148
|
-
};
|
|
13149
|
-
this.setClientStylingURL = () => {
|
|
13150
|
-
let url = new URL(this.clientStylingUrl);
|
|
13151
|
-
let cssFile = document.createElement('style');
|
|
13152
|
-
fetch(url.href)
|
|
13153
|
-
.then((res) => res.text())
|
|
13154
|
-
.then((data) => {
|
|
13155
|
-
cssFile.innerHTML = data;
|
|
13156
|
-
this.clientStyling = data;
|
|
13157
|
-
setTimeout(() => { this.host.shadowRoot.prepend(cssFile); }, 1);
|
|
13158
|
-
});
|
|
13159
|
-
};
|
|
13160
13240
|
this.handleClick = (event) => {
|
|
13161
13241
|
if (this.emitOnClick) {
|
|
13162
13242
|
event.stopPropagation();
|
|
@@ -13193,15 +13273,17 @@ const GeneralInput = class {
|
|
|
13193
13273
|
this.enableManualDateInput = false;
|
|
13194
13274
|
this.pinAttemptsExceeded = undefined;
|
|
13195
13275
|
this.mbSource = undefined;
|
|
13196
|
-
this.limitStylingAppends = false;
|
|
13197
13276
|
}
|
|
13198
|
-
|
|
13199
|
-
if (newValue !== oldValue)
|
|
13200
|
-
this.
|
|
13277
|
+
handleClientStylingChange(newValue, oldValue) {
|
|
13278
|
+
if (newValue !== oldValue) {
|
|
13279
|
+
setClientStyling(this.stylingContainer, this.clientStyling);
|
|
13280
|
+
}
|
|
13201
13281
|
}
|
|
13202
|
-
|
|
13203
|
-
if (newValue !== oldValue)
|
|
13204
|
-
this.
|
|
13282
|
+
handleClientStylingChangeURL(newValue, oldValue) {
|
|
13283
|
+
if (newValue !== oldValue) {
|
|
13284
|
+
if (this.clientStylingUrl)
|
|
13285
|
+
setClientStylingURL(this.stylingContainer, this.clientStylingUrl);
|
|
13286
|
+
}
|
|
13205
13287
|
}
|
|
13206
13288
|
connectedCallback() {
|
|
13207
13289
|
if (this.translationUrl) {
|
|
@@ -13212,51 +13294,50 @@ const GeneralInput = class {
|
|
|
13212
13294
|
this.stylingSubscription && this.stylingSubscription.unsubscribe();
|
|
13213
13295
|
}
|
|
13214
13296
|
componentDidLoad() {
|
|
13297
|
+
this.handleClientStyling();
|
|
13215
13298
|
this.registrationWidgetLoaded.emit();
|
|
13216
13299
|
window.postMessage({ type: 'registrationWidgetLoaded' }, window.location.href);
|
|
13217
|
-
|
|
13218
|
-
|
|
13219
|
-
|
|
13220
|
-
}
|
|
13221
|
-
|
|
13222
|
-
if (this.clientStyling)
|
|
13223
|
-
this.setClientStyling();
|
|
13224
|
-
if (this.clientStylingUrl)
|
|
13225
|
-
this.setClientStylingURL();
|
|
13226
|
-
this.limitStylingAppends = true;
|
|
13227
|
-
}
|
|
13300
|
+
}
|
|
13301
|
+
handleClientStyling() {
|
|
13302
|
+
if (window.emMessageBus !== undefined) {
|
|
13303
|
+
this.stylingSubscription = setStreamStyling(this.stylingContainer, `${this.mbSource}.Style`, this.stylingSubscription, true);
|
|
13304
|
+
return;
|
|
13228
13305
|
}
|
|
13306
|
+
if (this.clientStyling)
|
|
13307
|
+
setClientStyling(this.stylingContainer, this.clientStyling);
|
|
13308
|
+
if (this.clientStylingUrl)
|
|
13309
|
+
setClientStylingURL(this.stylingContainer, this.clientStylingUrl);
|
|
13229
13310
|
}
|
|
13230
13311
|
renderInput() {
|
|
13231
13312
|
var _a;
|
|
13232
13313
|
switch ((_a = this.type) === null || _a === void 0 ? void 0 : _a.toLowerCase()) {
|
|
13233
13314
|
case 'text':
|
|
13234
13315
|
if (this.haspostalcodelookup && this.name === 'PostalCode') {
|
|
13235
|
-
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 });
|
|
13316
|
+
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 });
|
|
13236
13317
|
}
|
|
13237
13318
|
else {
|
|
13238
|
-
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 });
|
|
13319
|
+
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 });
|
|
13239
13320
|
}
|
|
13240
13321
|
case 'email':
|
|
13241
|
-
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 });
|
|
13322
|
+
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 });
|
|
13242
13323
|
case 'number':
|
|
13243
|
-
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 });
|
|
13324
|
+
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 });
|
|
13244
13325
|
case 'checkbox':
|
|
13245
|
-
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 });
|
|
13326
|
+
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 });
|
|
13246
13327
|
case 'checkboxgroup':
|
|
13247
|
-
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 });
|
|
13328
|
+
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 });
|
|
13248
13329
|
case 'togglecheckbox':
|
|
13249
|
-
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 });
|
|
13330
|
+
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 });
|
|
13250
13331
|
case 'datetime':
|
|
13251
|
-
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 });
|
|
13332
|
+
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 });
|
|
13252
13333
|
case 'password':
|
|
13253
|
-
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 });
|
|
13334
|
+
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 });
|
|
13254
13335
|
case 'radio':
|
|
13255
|
-
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 });
|
|
13336
|
+
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 });
|
|
13256
13337
|
case 'tel':
|
|
13257
|
-
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 });
|
|
13338
|
+
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 });
|
|
13258
13339
|
case 'dropdown':
|
|
13259
|
-
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 });
|
|
13340
|
+
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 });
|
|
13260
13341
|
case 'twofa':
|
|
13261
13342
|
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 });
|
|
13262
13343
|
case 'label':
|
|
@@ -13271,12 +13352,12 @@ const GeneralInput = class {
|
|
|
13271
13352
|
}
|
|
13272
13353
|
}
|
|
13273
13354
|
render() {
|
|
13274
|
-
return (h(Host, { key: '
|
|
13355
|
+
return (h(Host, { key: '12e3e43442ba3fd4a47bbc5c05456eb019405b1e', class: `general-input--${this.name}`, onClick: this.handleClick }, this.renderInput()));
|
|
13275
13356
|
}
|
|
13276
13357
|
get host() { return getElement(this); }
|
|
13277
13358
|
static get watchers() { return {
|
|
13278
|
-
"clientStyling": ["
|
|
13279
|
-
"clientStylingUrl": ["
|
|
13359
|
+
"clientStyling": ["handleClientStylingChange"],
|
|
13360
|
+
"clientStylingUrl": ["handleClientStylingChangeURL"]
|
|
13280
13361
|
}; }
|
|
13281
13362
|
};
|
|
13282
13363
|
GeneralInput.style = GeneralInputStyle0;
|
|
@@ -14478,32 +14559,6 @@ const GeneralRegistrationMultistep = class {
|
|
|
14478
14559
|
return "bullet checked";
|
|
14479
14560
|
return "bullet";
|
|
14480
14561
|
};
|
|
14481
|
-
this.setClientStyling = () => {
|
|
14482
|
-
let sheet = document.createElement('style');
|
|
14483
|
-
sheet.innerHTML = this.clientStyling;
|
|
14484
|
-
this.host.shadowRoot.prepend(sheet);
|
|
14485
|
-
};
|
|
14486
|
-
this.setClientStylingURL = () => {
|
|
14487
|
-
let url = new URL(this.clientStylingUrl);
|
|
14488
|
-
let cssFile = document.createElement('style');
|
|
14489
|
-
fetch(url.href)
|
|
14490
|
-
.then((res) => res.text())
|
|
14491
|
-
.then((data) => {
|
|
14492
|
-
cssFile.innerHTML = data;
|
|
14493
|
-
this.clientStyling = data;
|
|
14494
|
-
setTimeout(() => { this.host.shadowRoot.prepend(cssFile); }, 1);
|
|
14495
|
-
});
|
|
14496
|
-
};
|
|
14497
|
-
this.setStreamStyling = (domain) => {
|
|
14498
|
-
if (window.emMessageBus) {
|
|
14499
|
-
const sheet = document.createElement('style');
|
|
14500
|
-
this.stylingSubscription = window.emMessageBus.subscribe(domain, (data) => {
|
|
14501
|
-
sheet.innerHTML = data;
|
|
14502
|
-
this.clientStyling = data;
|
|
14503
|
-
this.host.shadowRoot.prepend(sheet);
|
|
14504
|
-
});
|
|
14505
|
-
}
|
|
14506
|
-
};
|
|
14507
14562
|
// handles sending a custom event for initial interaction with the registration form
|
|
14508
14563
|
this.handleInitialClick = (e) => {
|
|
14509
14564
|
if (!this.isInitalInteraction)
|
|
@@ -14532,7 +14587,6 @@ const GeneralRegistrationMultistep = class {
|
|
|
14532
14587
|
this.isLoadingPOST = false;
|
|
14533
14588
|
this.registrationStep = '';
|
|
14534
14589
|
this.forms = {};
|
|
14535
|
-
this.limitStylingAppends = false;
|
|
14536
14590
|
this.autofilled = false;
|
|
14537
14591
|
this.isInitalInteraction = true;
|
|
14538
14592
|
this.addresses = [];
|
|
@@ -14545,13 +14599,16 @@ const GeneralRegistrationMultistep = class {
|
|
|
14545
14599
|
const stepNum = Number(this.registrationStep.replace('Step', ''));
|
|
14546
14600
|
this.currentStep = stepNum;
|
|
14547
14601
|
}
|
|
14548
|
-
|
|
14549
|
-
if (newValue !== oldValue)
|
|
14550
|
-
this.
|
|
14602
|
+
handleClientStylingChange(newValue, oldValue) {
|
|
14603
|
+
if (newValue !== oldValue) {
|
|
14604
|
+
setClientStyling(this.stylingContainer, this.clientStyling);
|
|
14605
|
+
}
|
|
14551
14606
|
}
|
|
14552
|
-
|
|
14553
|
-
if (newValue !== oldValue)
|
|
14554
|
-
this.
|
|
14607
|
+
handleClientStylingChangeURL(newValue, oldValue) {
|
|
14608
|
+
if (newValue !== oldValue) {
|
|
14609
|
+
if (this.clientStylingUrl)
|
|
14610
|
+
setClientStylingURL(this.stylingContainer, this.clientStylingUrl);
|
|
14611
|
+
}
|
|
14555
14612
|
}
|
|
14556
14613
|
setFormValidity() {
|
|
14557
14614
|
this.errorMessage = '';
|
|
@@ -14810,21 +14867,20 @@ const GeneralRegistrationMultistep = class {
|
|
|
14810
14867
|
this.setupConditionalValidationMap();
|
|
14811
14868
|
this.isLoading = false;
|
|
14812
14869
|
}
|
|
14870
|
+
handleClientStyling() {
|
|
14871
|
+
if (window.emMessageBus !== undefined) {
|
|
14872
|
+
this.stylingSubscription = setStreamStyling(this.stylingContainer, `${this.mbSource}.Style`, this.stylingSubscription, true);
|
|
14873
|
+
return;
|
|
14874
|
+
}
|
|
14875
|
+
if (this.clientStyling)
|
|
14876
|
+
setClientStyling(this.stylingContainer, this.clientStyling);
|
|
14877
|
+
if (this.clientStylingUrl)
|
|
14878
|
+
setClientStylingURL(this.stylingContainer, this.clientStylingUrl);
|
|
14879
|
+
}
|
|
14813
14880
|
componentDidLoad() {
|
|
14814
14881
|
this.registrationWidgetLoaded.emit();
|
|
14815
14882
|
window.postMessage({ type: 'registrationWidgetLoaded' }, window.location.href);
|
|
14816
|
-
|
|
14817
|
-
if (window.emMessageBus != undefined) {
|
|
14818
|
-
this.setStreamStyling(`${this.mbSource}.Style`);
|
|
14819
|
-
}
|
|
14820
|
-
else {
|
|
14821
|
-
if (this.clientStyling)
|
|
14822
|
-
this.setClientStyling();
|
|
14823
|
-
if (this.clientStylingUrl)
|
|
14824
|
-
this.setClientStylingURL();
|
|
14825
|
-
this.limitStylingAppends = true;
|
|
14826
|
-
}
|
|
14827
|
-
}
|
|
14883
|
+
this.handleClientStyling();
|
|
14828
14884
|
}
|
|
14829
14885
|
disconnectedCallback() {
|
|
14830
14886
|
this.stylingSubscription && this.stylingSubscription.unsubscribe();
|
|
@@ -15692,8 +15748,8 @@ const GeneralRegistrationMultistep = class {
|
|
|
15692
15748
|
get host() { return getElement(this); }
|
|
15693
15749
|
static get watchers() { return {
|
|
15694
15750
|
"registrationStep": ["sendStep"],
|
|
15695
|
-
"clientStyling": ["
|
|
15696
|
-
"clientStylingUrl": ["
|
|
15751
|
+
"clientStyling": ["handleClientStylingChange"],
|
|
15752
|
+
"clientStylingUrl": ["handleClientStylingChangeURL"],
|
|
15697
15753
|
"forms": ["setFormValidity"],
|
|
15698
15754
|
"btag": ["addBtag"]
|
|
15699
15755
|
}; }
|
|
@@ -15727,11 +15783,6 @@ const NumberInput = class {
|
|
|
15727
15783
|
this.errorMessage = this.setErrorMessage();
|
|
15728
15784
|
this.touched = true;
|
|
15729
15785
|
};
|
|
15730
|
-
this.setClientStyling = () => {
|
|
15731
|
-
let sheet = document.createElement('style');
|
|
15732
|
-
sheet.innerHTML = this.clientStyling;
|
|
15733
|
-
this.stylingContainer.prepend(sheet);
|
|
15734
|
-
};
|
|
15735
15786
|
this.name = undefined;
|
|
15736
15787
|
this.displayName = undefined;
|
|
15737
15788
|
this.placeholder = undefined;
|
|
@@ -15742,14 +15793,15 @@ const NumberInput = class {
|
|
|
15742
15793
|
this.language = undefined;
|
|
15743
15794
|
this.emitValue = undefined;
|
|
15744
15795
|
this.clientStyling = '';
|
|
15796
|
+
this.mbSource = undefined;
|
|
15745
15797
|
this.errorMessage = undefined;
|
|
15746
15798
|
this.isValid = undefined;
|
|
15747
|
-
this.limitStylingAppends = false;
|
|
15748
15799
|
this.showTooltip = false;
|
|
15749
15800
|
}
|
|
15750
|
-
|
|
15751
|
-
if (newValue !== oldValue)
|
|
15752
|
-
this.
|
|
15801
|
+
handleClientStylingChange(newValue, oldValue) {
|
|
15802
|
+
if (newValue !== oldValue) {
|
|
15803
|
+
setClientStyling(this.stylingContainer, this.clientStyling);
|
|
15804
|
+
}
|
|
15753
15805
|
}
|
|
15754
15806
|
validityChanged() {
|
|
15755
15807
|
this.validityStateHandler({ valid: this.isValid, name: this.name });
|
|
@@ -15777,16 +15829,17 @@ const NumberInput = class {
|
|
|
15777
15829
|
connectedCallback() {
|
|
15778
15830
|
this.validationPattern = this.setPattern();
|
|
15779
15831
|
}
|
|
15780
|
-
|
|
15781
|
-
|
|
15782
|
-
|
|
15783
|
-
|
|
15784
|
-
|
|
15785
|
-
|
|
15832
|
+
handleClientStyling() {
|
|
15833
|
+
if (window.emMessageBus !== undefined) {
|
|
15834
|
+
this.stylingSubscription = setStreamStyling(this.stylingContainer, `${this.mbSource}.Style`, this.stylingSubscription, true);
|
|
15835
|
+
return;
|
|
15836
|
+
}
|
|
15837
|
+
if (this.clientStyling) {
|
|
15838
|
+
setClientStyling(this.stylingContainer, this.clientStyling);
|
|
15786
15839
|
}
|
|
15787
|
-
// end custom styling area
|
|
15788
15840
|
}
|
|
15789
15841
|
componentDidLoad() {
|
|
15842
|
+
this.handleClientStyling();
|
|
15790
15843
|
this.isValid = this.setValidity();
|
|
15791
15844
|
if (this.defaultValue) {
|
|
15792
15845
|
this.value = this.defaultValue;
|
|
@@ -15827,11 +15880,11 @@ const NumberInput = class {
|
|
|
15827
15880
|
if (this.touched) {
|
|
15828
15881
|
invalidClass = this.isValid == true || this.isValid == undefined ? '' : 'text__input--invalid';
|
|
15829
15882
|
}
|
|
15830
|
-
return h("div", { key: '
|
|
15831
|
-
h("img", { key: '
|
|
15883
|
+
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 &&
|
|
15884
|
+
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));
|
|
15832
15885
|
}
|
|
15833
15886
|
static get watchers() { return {
|
|
15834
|
-
"clientStyling": ["
|
|
15887
|
+
"clientStyling": ["handleClientStylingChange"],
|
|
15835
15888
|
"isValid": ["validityChanged"],
|
|
15836
15889
|
"emitValue": ["emitValueHandler"]
|
|
15837
15890
|
}; }
|
|
@@ -15880,11 +15933,6 @@ const PasswordInput = class {
|
|
|
15880
15933
|
this.showPopup = true;
|
|
15881
15934
|
this.calculateComplexity(this.value);
|
|
15882
15935
|
};
|
|
15883
|
-
this.setClientStyling = () => {
|
|
15884
|
-
let sheet = document.createElement('style');
|
|
15885
|
-
sheet.innerHTML = this.clientStyling;
|
|
15886
|
-
this.stylingContainer.prepend(sheet);
|
|
15887
|
-
};
|
|
15888
15936
|
this.name = undefined;
|
|
15889
15937
|
this.displayName = undefined;
|
|
15890
15938
|
this.placeholder = undefined;
|
|
@@ -15899,17 +15947,18 @@ const PasswordInput = class {
|
|
|
15899
15947
|
this.hidePasswordComplexity = false;
|
|
15900
15948
|
this.clientStyling = '';
|
|
15901
15949
|
this.enableSouthAfricanMode = undefined;
|
|
15950
|
+
this.mbSource = undefined;
|
|
15902
15951
|
this.isValid = undefined;
|
|
15903
15952
|
this.errorMessage = undefined;
|
|
15904
|
-
this.limitStylingAppends = false;
|
|
15905
15953
|
this.showTooltip = false;
|
|
15906
15954
|
this.passwordComplexity = undefined;
|
|
15907
15955
|
this.showPopup = undefined;
|
|
15908
15956
|
this.value = '';
|
|
15909
15957
|
}
|
|
15910
|
-
|
|
15911
|
-
if (newValue !== oldValue)
|
|
15912
|
-
this.
|
|
15958
|
+
handleClientStylingChange(newValue, oldValue) {
|
|
15959
|
+
if (newValue !== oldValue) {
|
|
15960
|
+
setClientStyling(this.stylingContainer, this.clientStyling);
|
|
15961
|
+
}
|
|
15913
15962
|
}
|
|
15914
15963
|
validityChanged() {
|
|
15915
15964
|
this.validityStateHandler({ valid: this.isValid, name: this.name });
|
|
@@ -15970,16 +16019,17 @@ const PasswordInput = class {
|
|
|
15970
16019
|
this.showTooltip = false;
|
|
15971
16020
|
}
|
|
15972
16021
|
}
|
|
15973
|
-
|
|
15974
|
-
|
|
15975
|
-
|
|
15976
|
-
|
|
15977
|
-
|
|
15978
|
-
|
|
16022
|
+
handleClientStyling() {
|
|
16023
|
+
if (window.emMessageBus !== undefined) {
|
|
16024
|
+
this.stylingSubscription = setStreamStyling(this.stylingContainer, `${this.mbSource}.Style`, this.stylingSubscription, true);
|
|
16025
|
+
return;
|
|
16026
|
+
}
|
|
16027
|
+
if (this.clientStyling) {
|
|
16028
|
+
setClientStyling(this.stylingContainer, this.clientStyling);
|
|
15979
16029
|
}
|
|
15980
|
-
// end custom styling area
|
|
15981
16030
|
}
|
|
15982
16031
|
componentDidLoad() {
|
|
16032
|
+
this.handleClientStyling();
|
|
15983
16033
|
this.inputReference = this.element.shadowRoot.querySelector('input');
|
|
15984
16034
|
this.passwordButton = this.element.shadowRoot.querySelector('vaadin-password-field-button');
|
|
15985
16035
|
this.passwordButton.tabIndex = -1;
|
|
@@ -16086,8 +16136,8 @@ const PasswordInput = class {
|
|
|
16086
16136
|
if (this.touched) {
|
|
16087
16137
|
invalidClass = this.isValid == true || this.isValid == undefined ? '' : 'text__input--invalid';
|
|
16088
16138
|
}
|
|
16089
|
-
return h("div", { key: '
|
|
16090
|
-
h("img", { key: '
|
|
16139
|
+
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 &&
|
|
16140
|
+
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 &&
|
|
16091
16141
|
this.showPopup &&
|
|
16092
16142
|
!this.hidePasswordComplexity &&
|
|
16093
16143
|
!this.isDuplicateInput &&
|
|
@@ -16097,7 +16147,7 @@ const PasswordInput = class {
|
|
|
16097
16147
|
}
|
|
16098
16148
|
get element() { return getElement(this); }
|
|
16099
16149
|
static get watchers() { return {
|
|
16100
|
-
"clientStyling": ["
|
|
16150
|
+
"clientStyling": ["handleClientStylingChange"],
|
|
16101
16151
|
"isValid": ["validityChanged"],
|
|
16102
16152
|
"value": ["valueChanged"],
|
|
16103
16153
|
"emitValue": ["emitValueHandler"]
|
|
@@ -16247,11 +16297,6 @@ const PostalCodeInput = class {
|
|
|
16247
16297
|
targetInput.focus();
|
|
16248
16298
|
}
|
|
16249
16299
|
};
|
|
16250
|
-
this.setClientStyling = () => {
|
|
16251
|
-
let sheet = document.createElement('style');
|
|
16252
|
-
sheet.innerHTML = this.clientStyling;
|
|
16253
|
-
this.stylingContainer.prepend(sheet);
|
|
16254
|
-
};
|
|
16255
16300
|
this.handleOutsideClick = (event) => {
|
|
16256
16301
|
if (!this.openAddressDropdown)
|
|
16257
16302
|
return;
|
|
@@ -16277,9 +16322,9 @@ const PostalCodeInput = class {
|
|
|
16277
16322
|
this.postalcodelength = undefined;
|
|
16278
16323
|
this.addresses = undefined;
|
|
16279
16324
|
this.ignoreCountry = false;
|
|
16325
|
+
this.mbSource = undefined;
|
|
16280
16326
|
this.isValid = undefined;
|
|
16281
16327
|
this.errorMessage = '';
|
|
16282
|
-
this.limitStylingAppends = false;
|
|
16283
16328
|
this.showTooltip = false;
|
|
16284
16329
|
this.selectedCountryCode = '';
|
|
16285
16330
|
this.currentPostalCode = '';
|
|
@@ -16288,9 +16333,10 @@ const PostalCodeInput = class {
|
|
|
16288
16333
|
this.refreshTrigger = 0;
|
|
16289
16334
|
this.isFetchingAddresses = false;
|
|
16290
16335
|
}
|
|
16291
|
-
|
|
16292
|
-
if (newValue !== oldValue)
|
|
16293
|
-
this.
|
|
16336
|
+
handleClientStylingChange(newValue, oldValue) {
|
|
16337
|
+
if (newValue !== oldValue) {
|
|
16338
|
+
setClientStyling(this.stylingContainer, this.clientStyling);
|
|
16339
|
+
}
|
|
16294
16340
|
}
|
|
16295
16341
|
validityChanged() {
|
|
16296
16342
|
this.validityStateHandler({ valid: this.isValid, name: this.name });
|
|
@@ -16351,19 +16397,22 @@ const PostalCodeInput = class {
|
|
|
16351
16397
|
connectedCallback() {
|
|
16352
16398
|
this.validationPattern = this.setPattern();
|
|
16353
16399
|
}
|
|
16354
|
-
componentDidRender() {
|
|
16355
|
-
if (!this.limitStylingAppends && this.stylingContainer) {
|
|
16356
|
-
if (this.clientStyling)
|
|
16357
|
-
this.setClientStyling();
|
|
16358
|
-
this.limitStylingAppends = true;
|
|
16359
|
-
}
|
|
16360
|
-
}
|
|
16361
16400
|
componentWillLoad() {
|
|
16362
16401
|
if (this.defaultValue) {
|
|
16363
16402
|
this.value = this.defaultValue;
|
|
16364
16403
|
}
|
|
16365
16404
|
}
|
|
16405
|
+
handleClientStyling() {
|
|
16406
|
+
if (window.emMessageBus !== undefined) {
|
|
16407
|
+
this.stylingSubscription = setStreamStyling(this.stylingContainer, `${this.mbSource}.Style`, this.stylingSubscription, true);
|
|
16408
|
+
return;
|
|
16409
|
+
}
|
|
16410
|
+
if (this.clientStyling) {
|
|
16411
|
+
setClientStyling(this.stylingContainer, this.clientStyling);
|
|
16412
|
+
}
|
|
16413
|
+
}
|
|
16366
16414
|
componentDidLoad() {
|
|
16415
|
+
this.handleClientStyling();
|
|
16367
16416
|
if (this.defaultValue) {
|
|
16368
16417
|
this.valueHandler({ name: this.name, value: this.value });
|
|
16369
16418
|
}
|
|
@@ -16455,10 +16504,10 @@ const PostalCodeInput = class {
|
|
|
16455
16504
|
let shouldShowNoResults = this.showNoResultsMessage && this.currentPostalCode &&
|
|
16456
16505
|
this.currentPostalCode.length >= this.postalcodelength && (((_b = this.addresses) === null || _b === void 0 ? void 0 : _b.length) === 0) && isUKCountry;
|
|
16457
16506
|
let showLoadingMessage = this.isFetchingAddresses && this.currentPostalCode.length >= this.postalcodelength;
|
|
16458
|
-
return (h("div", { key: '
|
|
16507
|
+
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$1('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$1('searchingForAddresses', this.language)))), shouldShowNoResults && (h("div", { key: '212a74fed94b3ee089aed5c9afb544966b5f11cd', class: "postalcode__no-results-message" }, translate$1('postalLookUpNoAddressFound', this.language)))), h("small", { key: '4f66e97dd811b9917c92ff4bcbf236817ac57933', class: 'text__error-message' }, this.errorMessage)));
|
|
16459
16508
|
}
|
|
16460
16509
|
static get watchers() { return {
|
|
16461
|
-
"clientStyling": ["
|
|
16510
|
+
"clientStyling": ["handleClientStylingChange"],
|
|
16462
16511
|
"isValid": ["validityChanged"],
|
|
16463
16512
|
"emitValue": ["emitValueHandler"],
|
|
16464
16513
|
"addresses": ["handleAddresses"]
|
|
@@ -16474,11 +16523,6 @@ const RadioInput = class {
|
|
|
16474
16523
|
registerInstance(this, hostRef);
|
|
16475
16524
|
this.sendInputValue = createEvent(this, "sendInputValue", 7);
|
|
16476
16525
|
this.sendValidityState = createEvent(this, "sendValidityState", 7);
|
|
16477
|
-
this.setClientStyling = () => {
|
|
16478
|
-
let sheet = document.createElement('style');
|
|
16479
|
-
sheet.innerHTML = this.clientStyling;
|
|
16480
|
-
this.stylingContainer.prepend(sheet);
|
|
16481
|
-
};
|
|
16482
16526
|
this.name = undefined;
|
|
16483
16527
|
this.displayName = undefined;
|
|
16484
16528
|
this.optionsGroup = undefined;
|
|
@@ -16487,14 +16531,15 @@ const RadioInput = class {
|
|
|
16487
16531
|
this.language = undefined;
|
|
16488
16532
|
this.emitValue = undefined;
|
|
16489
16533
|
this.clientStyling = '';
|
|
16534
|
+
this.mbSource = undefined;
|
|
16490
16535
|
this.errorMessage = undefined;
|
|
16491
16536
|
this.isValid = undefined;
|
|
16492
|
-
this.limitStylingAppends = false;
|
|
16493
16537
|
this.showTooltip = false;
|
|
16494
16538
|
}
|
|
16495
|
-
|
|
16496
|
-
if (newValue !== oldValue)
|
|
16497
|
-
this.
|
|
16539
|
+
handleClientStylingChange(newValue, oldValue) {
|
|
16540
|
+
if (newValue !== oldValue) {
|
|
16541
|
+
setClientStyling(this.stylingContainer, this.clientStyling);
|
|
16542
|
+
}
|
|
16498
16543
|
}
|
|
16499
16544
|
validityChanged() {
|
|
16500
16545
|
this.validityStateHandler({ valid: this.isValid, name: this.name });
|
|
@@ -16519,14 +16564,17 @@ const RadioInput = class {
|
|
|
16519
16564
|
this.showTooltip = false;
|
|
16520
16565
|
}
|
|
16521
16566
|
}
|
|
16522
|
-
|
|
16523
|
-
|
|
16524
|
-
|
|
16525
|
-
|
|
16526
|
-
this.setClientStyling();
|
|
16527
|
-
this.limitStylingAppends = true;
|
|
16567
|
+
handleClientStyling() {
|
|
16568
|
+
if (window.emMessageBus !== undefined) {
|
|
16569
|
+
this.stylingSubscription = setStreamStyling(this.stylingContainer, `${this.mbSource}.Style`, this.stylingSubscription, true);
|
|
16570
|
+
return;
|
|
16528
16571
|
}
|
|
16529
|
-
|
|
16572
|
+
if (this.clientStyling) {
|
|
16573
|
+
setClientStyling(this.stylingContainer, this.clientStyling);
|
|
16574
|
+
}
|
|
16575
|
+
}
|
|
16576
|
+
componentDidLoad() {
|
|
16577
|
+
this.handleClientStyling();
|
|
16530
16578
|
}
|
|
16531
16579
|
handleClick(event) {
|
|
16532
16580
|
this.value = event.target.value;
|
|
@@ -16549,11 +16597,11 @@ const RadioInput = class {
|
|
|
16549
16597
|
return null;
|
|
16550
16598
|
}
|
|
16551
16599
|
render() {
|
|
16552
|
-
return h("fieldset", { key: '
|
|
16553
|
-
h("img", { key: '
|
|
16600
|
+
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 &&
|
|
16601
|
+
h("img", { key: 'dfe155a429485b5c891db2943d9115cdc40e169b', class: 'radio__tooltip-icon', src: tooltipIconSvg, alt: "", ref: (el) => this.tooltipIconReference = el, onClick: () => this.showTooltip = !this.showTooltip }), this.renderTooltip());
|
|
16554
16602
|
}
|
|
16555
16603
|
static get watchers() { return {
|
|
16556
|
-
"clientStyling": ["
|
|
16604
|
+
"clientStyling": ["handleClientStylingChange"],
|
|
16557
16605
|
"isValid": ["validityChanged"],
|
|
16558
16606
|
"emitValue": ["emitValueHandler"]
|
|
16559
16607
|
}; }
|
|
@@ -16602,11 +16650,6 @@ const SelectInput = class {
|
|
|
16602
16650
|
this.validityStateHandler({ valid: this.isValid, name: this.name });
|
|
16603
16651
|
this.emitValueHandler(true);
|
|
16604
16652
|
};
|
|
16605
|
-
this.setClientStyling = () => {
|
|
16606
|
-
let sheet = document.createElement('style');
|
|
16607
|
-
sheet.innerHTML = this.clientStyling;
|
|
16608
|
-
this.stylingContainer.prepend(sheet);
|
|
16609
|
-
};
|
|
16610
16653
|
this.name = undefined;
|
|
16611
16654
|
this.displayName = undefined;
|
|
16612
16655
|
this.placeholder = undefined;
|
|
@@ -16619,14 +16662,15 @@ const SelectInput = class {
|
|
|
16619
16662
|
this.language = undefined;
|
|
16620
16663
|
this.emitValue = undefined;
|
|
16621
16664
|
this.clientStyling = '';
|
|
16665
|
+
this.mbSource = undefined;
|
|
16622
16666
|
this.errorMessage = undefined;
|
|
16623
16667
|
this.isValid = undefined;
|
|
16624
|
-
this.limitStylingAppends = false;
|
|
16625
16668
|
this.showTooltip = false;
|
|
16626
16669
|
}
|
|
16627
|
-
|
|
16628
|
-
if (newValue !== oldValue)
|
|
16629
|
-
this.
|
|
16670
|
+
handleClientStylingChange(newValue, oldValue) {
|
|
16671
|
+
if (newValue !== oldValue) {
|
|
16672
|
+
setClientStyling(this.stylingContainer, this.clientStyling);
|
|
16673
|
+
}
|
|
16630
16674
|
}
|
|
16631
16675
|
validityChanged() {
|
|
16632
16676
|
this.validityStateHandler({ valid: this.isValid, name: this.name });
|
|
@@ -16676,16 +16720,17 @@ const SelectInput = class {
|
|
|
16676
16720
|
}
|
|
16677
16721
|
}
|
|
16678
16722
|
}
|
|
16679
|
-
|
|
16680
|
-
|
|
16681
|
-
|
|
16682
|
-
|
|
16683
|
-
|
|
16684
|
-
|
|
16723
|
+
handleClientStyling() {
|
|
16724
|
+
if (window.emMessageBus !== undefined) {
|
|
16725
|
+
this.stylingSubscription = setStreamStyling(this.stylingContainer, `${this.mbSource}.Style`, this.stylingSubscription, true);
|
|
16726
|
+
return;
|
|
16727
|
+
}
|
|
16728
|
+
if (this.clientStyling) {
|
|
16729
|
+
setClientStyling(this.stylingContainer, this.clientStyling);
|
|
16685
16730
|
}
|
|
16686
|
-
// end custom styling area
|
|
16687
16731
|
}
|
|
16688
16732
|
componentDidLoad() {
|
|
16733
|
+
this.handleClientStyling();
|
|
16689
16734
|
this.inputReference = this.vaadinCombo.querySelector('input');
|
|
16690
16735
|
if (this.defaultValue) {
|
|
16691
16736
|
this.value = this.defaultValue;
|
|
@@ -16750,13 +16795,13 @@ const SelectInput = class {
|
|
|
16750
16795
|
if (this.touched) {
|
|
16751
16796
|
invalidClass = this.isValid == true || this.isValid == undefined ? '' : 'text__input--invalid';
|
|
16752
16797
|
}
|
|
16753
|
-
return h("div", { key: '
|
|
16754
|
-
h("img", { key: '
|
|
16798
|
+
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 &&
|
|
16799
|
+
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 })
|
|
16755
16800
|
:
|
|
16756
|
-
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: '
|
|
16801
|
+
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));
|
|
16757
16802
|
}
|
|
16758
16803
|
static get watchers() { return {
|
|
16759
|
-
"clientStyling": ["
|
|
16804
|
+
"clientStyling": ["handleClientStylingChange"],
|
|
16760
16805
|
"isValid": ["validityChanged"],
|
|
16761
16806
|
"emitValue": ["emitValueHandler"]
|
|
16762
16807
|
}; }
|
|
@@ -16791,11 +16836,6 @@ const TelInput = class {
|
|
|
16791
16836
|
this.isValid = this.isValidValue();
|
|
16792
16837
|
this.errorMessage = this.setErrorMessage();
|
|
16793
16838
|
};
|
|
16794
|
-
this.setClientStyling = () => {
|
|
16795
|
-
let sheet = document.createElement('style');
|
|
16796
|
-
sheet.innerHTML = this.clientStyling;
|
|
16797
|
-
this.stylingContainer.prepend(sheet);
|
|
16798
|
-
};
|
|
16799
16839
|
this.name = undefined;
|
|
16800
16840
|
this.displayName = undefined;
|
|
16801
16841
|
this.placeholder = undefined;
|
|
@@ -16808,9 +16848,9 @@ const TelInput = class {
|
|
|
16808
16848
|
this.language = undefined;
|
|
16809
16849
|
this.emitValue = undefined;
|
|
16810
16850
|
this.clientStyling = '';
|
|
16851
|
+
this.mbSource = undefined;
|
|
16811
16852
|
this.isValid = undefined;
|
|
16812
16853
|
this.errorMessage = undefined;
|
|
16813
|
-
this.limitStylingAppends = false;
|
|
16814
16854
|
this.showTooltip = false;
|
|
16815
16855
|
this.disablePhonePrefix = false;
|
|
16816
16856
|
this.phoneValue = '';
|
|
@@ -16822,9 +16862,10 @@ const TelInput = class {
|
|
|
16822
16862
|
if (this.inputReference)
|
|
16823
16863
|
this.inputReference.value = this.phoneValue;
|
|
16824
16864
|
}
|
|
16825
|
-
|
|
16826
|
-
if (newValue !== oldValue)
|
|
16827
|
-
this.
|
|
16865
|
+
handleClientStylingChange(newValue, oldValue) {
|
|
16866
|
+
if (newValue !== oldValue) {
|
|
16867
|
+
setClientStyling(this.stylingContainer, this.clientStyling);
|
|
16868
|
+
}
|
|
16828
16869
|
}
|
|
16829
16870
|
validityChanged() {
|
|
16830
16871
|
this.validityStateHandler({ valid: this.isValid, name: this.name });
|
|
@@ -16875,16 +16916,17 @@ const TelInput = class {
|
|
|
16875
16916
|
}
|
|
16876
16917
|
}
|
|
16877
16918
|
}
|
|
16878
|
-
|
|
16879
|
-
|
|
16880
|
-
|
|
16881
|
-
|
|
16882
|
-
|
|
16883
|
-
|
|
16919
|
+
handleClientStyling() {
|
|
16920
|
+
if (window.emMessageBus !== undefined) {
|
|
16921
|
+
this.stylingSubscription = setStreamStyling(this.stylingContainer, `${this.mbSource}.Style`, this.stylingSubscription, true);
|
|
16922
|
+
return;
|
|
16923
|
+
}
|
|
16924
|
+
if (this.clientStyling) {
|
|
16925
|
+
setClientStyling(this.stylingContainer, this.clientStyling);
|
|
16884
16926
|
}
|
|
16885
|
-
// end custom styling area
|
|
16886
16927
|
}
|
|
16887
16928
|
componentDidLoad() {
|
|
16929
|
+
this.handleClientStyling();
|
|
16888
16930
|
this.isValid = this.isValidValue();
|
|
16889
16931
|
if (this.defaultValue) {
|
|
16890
16932
|
this.value = this.defaultValue;
|
|
@@ -16976,11 +17018,11 @@ const TelInput = class {
|
|
|
16976
17018
|
if (this.touched) {
|
|
16977
17019
|
invalidClass = this.isValid == true || this.isValid == undefined ? '' : 'text__input--invalid';
|
|
16978
17020
|
}
|
|
16979
|
-
return h("div", { key: '
|
|
16980
|
-
h("img", { key: '
|
|
17021
|
+
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 &&
|
|
17022
|
+
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));
|
|
16981
17023
|
}
|
|
16982
17024
|
static get watchers() { return {
|
|
16983
|
-
"clientStyling": ["
|
|
17025
|
+
"clientStyling": ["handleClientStylingChange"],
|
|
16984
17026
|
"isValid": ["validityChanged"],
|
|
16985
17027
|
"emitValue": ["emitValueHandler"]
|
|
16986
17028
|
}; }
|
|
@@ -17024,11 +17066,6 @@ const TextInput = class {
|
|
|
17024
17066
|
this.touched = true;
|
|
17025
17067
|
this.updateValidationState();
|
|
17026
17068
|
};
|
|
17027
|
-
this.setClientStyling = () => {
|
|
17028
|
-
let sheet = document.createElement('style');
|
|
17029
|
-
sheet.innerHTML = this.clientStyling;
|
|
17030
|
-
this.stylingContainer.prepend(sheet);
|
|
17031
|
-
};
|
|
17032
17069
|
this.name = undefined;
|
|
17033
17070
|
this.displayName = undefined;
|
|
17034
17071
|
this.placeholder = undefined;
|
|
@@ -17043,15 +17080,16 @@ const TextInput = class {
|
|
|
17043
17080
|
this.clientStyling = '';
|
|
17044
17081
|
this.haspostalcodelookup = undefined;
|
|
17045
17082
|
this.enableSouthAfricanMode = undefined;
|
|
17083
|
+
this.mbSource = undefined;
|
|
17046
17084
|
this.isValid = undefined;
|
|
17047
17085
|
this.errorMessage = '';
|
|
17048
|
-
this.limitStylingAppends = false;
|
|
17049
17086
|
this.showTooltip = false;
|
|
17050
17087
|
this.selectedCountryCode = '';
|
|
17051
17088
|
}
|
|
17052
|
-
|
|
17053
|
-
if (newValue !== oldValue)
|
|
17054
|
-
this.
|
|
17089
|
+
handleClientStylingChange(newValue, oldValue) {
|
|
17090
|
+
if (newValue !== oldValue) {
|
|
17091
|
+
setClientStyling(this.stylingContainer, this.clientStyling);
|
|
17092
|
+
}
|
|
17055
17093
|
}
|
|
17056
17094
|
validityChanged() {
|
|
17057
17095
|
this.validityStateHandler({ valid: this.isValid, name: this.name });
|
|
@@ -17163,21 +17201,22 @@ const TextInput = class {
|
|
|
17163
17201
|
}
|
|
17164
17202
|
this.validityStateHandler({ valid: false, name: this.name });
|
|
17165
17203
|
}
|
|
17166
|
-
componentDidRender() {
|
|
17167
|
-
// start custom styling area
|
|
17168
|
-
if (!this.limitStylingAppends && this.stylingContainer) {
|
|
17169
|
-
if (this.clientStyling)
|
|
17170
|
-
this.setClientStyling();
|
|
17171
|
-
this.limitStylingAppends = true;
|
|
17172
|
-
}
|
|
17173
|
-
// end custom styling area
|
|
17174
|
-
}
|
|
17175
17204
|
componentWillLoad() {
|
|
17176
17205
|
if (this.defaultValue) {
|
|
17177
17206
|
this.value = this.defaultValue;
|
|
17178
17207
|
}
|
|
17179
17208
|
}
|
|
17209
|
+
handleClientStyling() {
|
|
17210
|
+
if (window.emMessageBus !== undefined) {
|
|
17211
|
+
this.stylingSubscription = setStreamStyling(this.stylingContainer, `${this.mbSource}.Style`, this.stylingSubscription, true);
|
|
17212
|
+
return;
|
|
17213
|
+
}
|
|
17214
|
+
if (this.clientStyling) {
|
|
17215
|
+
setClientStyling(this.stylingContainer, this.clientStyling);
|
|
17216
|
+
}
|
|
17217
|
+
}
|
|
17180
17218
|
componentDidLoad() {
|
|
17219
|
+
this.handleClientStyling();
|
|
17181
17220
|
if (this.defaultValue) {
|
|
17182
17221
|
this.value = this.defaultValue;
|
|
17183
17222
|
this.valueHandler({ name: this.name, value: this.value });
|
|
@@ -17289,11 +17328,11 @@ const TextInput = class {
|
|
|
17289
17328
|
if (this.touched) {
|
|
17290
17329
|
invalidClass = this.isValid == true || this.isValid == undefined ? '' : 'text__input--invalid';
|
|
17291
17330
|
}
|
|
17292
|
-
return h("div", { key: '
|
|
17293
|
-
h("img", { key: '
|
|
17331
|
+
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 &&
|
|
17332
|
+
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));
|
|
17294
17333
|
}
|
|
17295
17334
|
static get watchers() { return {
|
|
17296
|
-
"clientStyling": ["
|
|
17335
|
+
"clientStyling": ["handleClientStylingChange"],
|
|
17297
17336
|
"isValid": ["validityChanged"],
|
|
17298
17337
|
"emitValue": ["emitValueHandler"]
|
|
17299
17338
|
}; }
|
|
@@ -17315,11 +17354,6 @@ const ToggleCheckboxInput = class {
|
|
|
17315
17354
|
event.stopPropagation();
|
|
17316
17355
|
window.postMessage({ type: `registration${fieldName}Clicked` }, window.location.href);
|
|
17317
17356
|
};
|
|
17318
|
-
this.setClientStyling = () => {
|
|
17319
|
-
let sheet = document.createElement('style');
|
|
17320
|
-
sheet.innerHTML = this.clientStyling;
|
|
17321
|
-
this.stylingContainer.prepend(sheet);
|
|
17322
|
-
};
|
|
17323
17357
|
this.name = undefined;
|
|
17324
17358
|
this.displayName = undefined;
|
|
17325
17359
|
this.defaultValue = '';
|
|
@@ -17330,15 +17364,16 @@ const ToggleCheckboxInput = class {
|
|
|
17330
17364
|
this.language = undefined;
|
|
17331
17365
|
this.emitValue = undefined;
|
|
17332
17366
|
this.clientStyling = '';
|
|
17367
|
+
this.mbSource = undefined;
|
|
17333
17368
|
this.errorMessage = undefined;
|
|
17334
17369
|
this.isValid = undefined;
|
|
17335
|
-
this.limitStylingAppends = false;
|
|
17336
17370
|
this.showTooltip = false;
|
|
17337
17371
|
this.showFields = this.defaultValue === 'true';
|
|
17338
17372
|
}
|
|
17339
|
-
|
|
17340
|
-
if (newValue !== oldValue)
|
|
17341
|
-
this.
|
|
17373
|
+
handleClientStylingChange(newValue, oldValue) {
|
|
17374
|
+
if (newValue !== oldValue) {
|
|
17375
|
+
setClientStyling(this.stylingContainer, this.clientStyling);
|
|
17376
|
+
}
|
|
17342
17377
|
}
|
|
17343
17378
|
validityStateHandler(inputStateEvent) {
|
|
17344
17379
|
this.sendValidityState.emit(inputStateEvent);
|
|
@@ -17352,16 +17387,17 @@ const ToggleCheckboxInput = class {
|
|
|
17352
17387
|
this.showTooltip = false;
|
|
17353
17388
|
}
|
|
17354
17389
|
}
|
|
17355
|
-
|
|
17356
|
-
|
|
17357
|
-
|
|
17358
|
-
|
|
17359
|
-
|
|
17360
|
-
|
|
17390
|
+
handleClientStyling() {
|
|
17391
|
+
if (window.emMessageBus !== undefined) {
|
|
17392
|
+
this.stylingSubscription = setStreamStyling(this.stylingContainer, `${this.mbSource}.Style`, this.stylingSubscription, true);
|
|
17393
|
+
return;
|
|
17394
|
+
}
|
|
17395
|
+
if (this.clientStyling) {
|
|
17396
|
+
setClientStyling(this.stylingContainer, this.clientStyling);
|
|
17361
17397
|
}
|
|
17362
|
-
// end custom styling area
|
|
17363
17398
|
}
|
|
17364
17399
|
componentDidLoad() {
|
|
17400
|
+
this.handleClientStyling();
|
|
17365
17401
|
if (this.options.length === 0)
|
|
17366
17402
|
return;
|
|
17367
17403
|
this.options.forEach((subField) => {
|
|
@@ -17398,13 +17434,13 @@ const ToggleCheckboxInput = class {
|
|
|
17398
17434
|
return null;
|
|
17399
17435
|
}
|
|
17400
17436
|
render() {
|
|
17401
|
-
return h("div", { key: '
|
|
17402
|
-
h("img", { key: '
|
|
17437
|
+
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 &&
|
|
17438
|
+
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 => {
|
|
17403
17439
|
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 });
|
|
17404
17440
|
})));
|
|
17405
17441
|
}
|
|
17406
17442
|
static get watchers() { return {
|
|
17407
|
-
"clientStyling": ["
|
|
17443
|
+
"clientStyling": ["handleClientStylingChange"]
|
|
17408
17444
|
}; }
|
|
17409
17445
|
};
|
|
17410
17446
|
ToggleCheckboxInput.style = ToggleCheckboxInputStyle0;
|
|
@@ -17430,17 +17466,6 @@ const TwofaInput = class {
|
|
|
17430
17466
|
this.triggerResendInterval();
|
|
17431
17467
|
this.resendCode.emit();
|
|
17432
17468
|
};
|
|
17433
|
-
this.setClientStylingURL = () => {
|
|
17434
|
-
let url = new URL(this.clientStylingUrl);
|
|
17435
|
-
let cssFile = document.createElement('style');
|
|
17436
|
-
fetch(url.href)
|
|
17437
|
-
.then((res) => res.text())
|
|
17438
|
-
.then((data) => {
|
|
17439
|
-
cssFile.innerHTML = data;
|
|
17440
|
-
this.clientStyling = data;
|
|
17441
|
-
setTimeout(() => { this.host.shadowRoot.prepend(cssFile); }, 1);
|
|
17442
|
-
});
|
|
17443
|
-
};
|
|
17444
17469
|
this.setInputRef = (el, idx) => {
|
|
17445
17470
|
if (el) {
|
|
17446
17471
|
this.inputRefs[idx] = el;
|
|
@@ -17496,21 +17521,6 @@ const TwofaInput = class {
|
|
|
17496
17521
|
this.setValidity();
|
|
17497
17522
|
this.setErrorMessage();
|
|
17498
17523
|
};
|
|
17499
|
-
this.setClientStyling = () => {
|
|
17500
|
-
let sheet = document.createElement('style');
|
|
17501
|
-
sheet.innerHTML = this.clientStyling;
|
|
17502
|
-
this.stylingContainer.prepend(sheet);
|
|
17503
|
-
};
|
|
17504
|
-
this.setStreamStyling = (domain) => {
|
|
17505
|
-
if (window.emMessageBus) {
|
|
17506
|
-
const sheet = document.createElement('style');
|
|
17507
|
-
this.stylingSubscription = window.emMessageBus.subscribe(domain, (data) => {
|
|
17508
|
-
sheet.innerHTML = data;
|
|
17509
|
-
this.clientStyling = data;
|
|
17510
|
-
this.host.shadowRoot.prepend(sheet);
|
|
17511
|
-
});
|
|
17512
|
-
}
|
|
17513
|
-
};
|
|
17514
17524
|
this.name = '';
|
|
17515
17525
|
this.displayName = '';
|
|
17516
17526
|
this.placeholder = '';
|
|
@@ -17525,7 +17535,6 @@ const TwofaInput = class {
|
|
|
17525
17535
|
this.pinAttemptsExceeded = undefined;
|
|
17526
17536
|
this.clientStylingUrl = '';
|
|
17527
17537
|
this.mbSource = undefined;
|
|
17528
|
-
this.limitStylingAppends = false;
|
|
17529
17538
|
this.isValid = false;
|
|
17530
17539
|
this.isResendButtonAvailable = true;
|
|
17531
17540
|
this.showTooltip = false;
|
|
@@ -17545,9 +17554,16 @@ const TwofaInput = class {
|
|
|
17545
17554
|
this.valueHandler({ name: this.name, value: this.code.join('') });
|
|
17546
17555
|
}
|
|
17547
17556
|
}
|
|
17548
|
-
|
|
17549
|
-
if (newValue !== oldValue)
|
|
17550
|
-
this.
|
|
17557
|
+
handleClientStylingChange(newValue, oldValue) {
|
|
17558
|
+
if (newValue !== oldValue) {
|
|
17559
|
+
setClientStyling(this.stylingContainer, this.clientStyling);
|
|
17560
|
+
}
|
|
17561
|
+
}
|
|
17562
|
+
handleClientStylingChangeURL(newValue, oldValue) {
|
|
17563
|
+
if (newValue !== oldValue) {
|
|
17564
|
+
if (this.clientStylingUrl)
|
|
17565
|
+
setClientStylingURL(this.stylingContainer, this.clientStylingUrl);
|
|
17566
|
+
}
|
|
17551
17567
|
}
|
|
17552
17568
|
validityStateHandler(inputStateEvent) {
|
|
17553
17569
|
this.sendValidityState.emit(inputStateEvent);
|
|
@@ -17561,10 +17577,6 @@ const TwofaInput = class {
|
|
|
17561
17577
|
this.showTooltip = false;
|
|
17562
17578
|
}
|
|
17563
17579
|
}
|
|
17564
|
-
handleStylingChange(newValue, oldValue) {
|
|
17565
|
-
if (newValue !== oldValue)
|
|
17566
|
-
this.setClientStyling();
|
|
17567
|
-
}
|
|
17568
17580
|
connectedCallback() {
|
|
17569
17581
|
this.validationPattern = this.setPattern();
|
|
17570
17582
|
this.code = new Array(this.validation.maxLength).fill('');
|
|
@@ -17572,30 +17584,21 @@ const TwofaInput = class {
|
|
|
17572
17584
|
disconnectedCallback() {
|
|
17573
17585
|
this.stylingSubscription && this.stylingSubscription.unsubscribe();
|
|
17574
17586
|
}
|
|
17575
|
-
|
|
17576
|
-
if (
|
|
17577
|
-
|
|
17578
|
-
|
|
17579
|
-
}
|
|
17580
|
-
this.limitStylingAppends = true;
|
|
17587
|
+
handleClientStyling() {
|
|
17588
|
+
if (window.emMessageBus !== undefined) {
|
|
17589
|
+
this.stylingSubscription = setStreamStyling(this.stylingContainer, `${this.mbSource}.Style`, this.stylingSubscription, true);
|
|
17590
|
+
return;
|
|
17581
17591
|
}
|
|
17592
|
+
if (this.clientStyling)
|
|
17593
|
+
setClientStyling(this.stylingContainer, this.clientStyling);
|
|
17594
|
+
if (this.clientStylingUrl)
|
|
17595
|
+
setClientStylingURL(this.stylingContainer, this.clientStylingUrl);
|
|
17582
17596
|
}
|
|
17583
17597
|
componentDidLoad() {
|
|
17584
17598
|
this.setValidity();
|
|
17585
17599
|
this.registrationWidgetLoaded.emit();
|
|
17586
17600
|
window.postMessage({ type: 'registrationWidgetLoaded' }, window.location.href);
|
|
17587
|
-
|
|
17588
|
-
if (window.emMessageBus != undefined) {
|
|
17589
|
-
this.setStreamStyling(`${this.mbSource}.Style`);
|
|
17590
|
-
}
|
|
17591
|
-
else {
|
|
17592
|
-
if (this.clientStyling)
|
|
17593
|
-
this.setClientStyling();
|
|
17594
|
-
if (this.clientStylingUrl)
|
|
17595
|
-
this.setClientStylingURL();
|
|
17596
|
-
this.limitStylingAppends = true;
|
|
17597
|
-
}
|
|
17598
|
-
}
|
|
17601
|
+
this.handleClientStyling();
|
|
17599
17602
|
}
|
|
17600
17603
|
handleKeyDown(e, idx) {
|
|
17601
17604
|
if (e.key === 'Backspace') {
|
|
@@ -17686,9 +17689,9 @@ const TwofaInput = class {
|
|
|
17686
17689
|
return current;
|
|
17687
17690
|
}
|
|
17688
17691
|
render() {
|
|
17689
|
-
return (h("div", { key: '
|
|
17692
|
+
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$1('twofaDescription', this.language, { values: { destination: this.destination } }) }), h("div", { key: '702c342eb7be0001ab8de310cadd7e8684a8025d', class: "twofa__input-wrapper", ref: this.setContainerRef }, this.code.map((_, idx) => {
|
|
17690
17693
|
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) }));
|
|
17691
|
-
})), h("div", { key: '
|
|
17694
|
+
})), h("div", { key: '63564bd4a0442232f81058ba914ee86c537ce85a', class: "twofa__button-wrapper" }, h("p", { key: '219f5005c0d03189df48f05c5e0cd980eb0e1979', class: "twofa__resend-message" }, translate$1('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
|
|
17692
17695
|
? translate$1('twofaResendButton', this.language)
|
|
17693
17696
|
: this.formatTime()))));
|
|
17694
17697
|
}
|
|
@@ -17696,8 +17699,8 @@ const TwofaInput = class {
|
|
|
17696
17699
|
static get watchers() { return {
|
|
17697
17700
|
"isValid": ["validityChanged"],
|
|
17698
17701
|
"emitValue": ["emitValueHandler"],
|
|
17699
|
-
"
|
|
17700
|
-
"
|
|
17702
|
+
"clientStyling": ["handleClientStylingChange"],
|
|
17703
|
+
"clientStylingUrl": ["handleClientStylingChangeURL"]
|
|
17701
17704
|
}; }
|
|
17702
17705
|
};
|
|
17703
17706
|
TwofaInput.style = TwofaInputStyle0;
|