@everymatrix/general-registration 1.47.1 → 1.47.3
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_13.cjs.entry.js → checkbox-group-input_14.cjs.entry.js} +389 -56
- package/dist/cjs/general-registration.cjs.js +2 -2
- package/dist/cjs/{index-f6c5854f.js → index-0186f043.js} +4 -3
- package/dist/cjs/loader.cjs.js +2 -2
- package/dist/collection/collection-manifest.json +6 -0
- package/dist/collection/components/general-registration/general-registration.js +42 -1
- package/dist/esm/{checkbox-group-input_13.entry.js → checkbox-group-input_14.entry.js} +389 -57
- package/dist/esm/general-registration.js +3 -3
- package/dist/esm/{index-8b4a4c93.js → index-613144f0.js} +4 -3
- package/dist/esm/loader.js +3 -3
- package/dist/general-registration/general-registration.esm.js +1 -1
- package/dist/general-registration/{p-7f98f290.entry.js → p-9ce83c86.entry.js} +113 -113
- package/dist/general-registration/{p-35ed5ec5.js → p-c4f9a319.js} +1 -1
- package/dist/types/Users/adrian.pripon/Documents/Work/widgets-monorepo/packages/stencil/general-registration/.stencil/packages/stencil/general-registration/stencil.config.d.ts +2 -0
- package/dist/types/Users/adrian.pripon/Documents/Work/widgets-monorepo/packages/stencil/general-registration/.stencil/packages/stencil/general-registration/stencil.config.dev.d.ts +2 -0
- package/dist/types/components/general-registration/general-registration.d.ts +5 -0
- package/package.json +3 -2
- package/dist/types/Users/maria.bumbar/Desktop/widgets-monorepo/packages/stencil/general-registration/.stencil/packages/stencil/general-registration/stencil.config.d.ts +0 -2
- package/dist/types/Users/maria.bumbar/Desktop/widgets-monorepo/packages/stencil/general-registration/.stencil/packages/stencil/general-registration/stencil.config.dev.d.ts +0 -2
- /package/dist/types/Users/{maria.bumbar/Desktop → adrian.pripon/Documents/Work}/widgets-monorepo/packages/stencil/general-registration/.stencil/packages/stencil/general-input/src/utils/types.d.ts +0 -0
package/dist/cjs/{checkbox-group-input_13.cjs.entry.js → checkbox-group-input_14.cjs.entry.js}
RENAMED
|
@@ -2,10 +2,10 @@
|
|
|
2
2
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
|
-
const index = require('./index-
|
|
5
|
+
const index = require('./index-0186f043.js');
|
|
6
6
|
|
|
7
|
-
const DEFAULT_LANGUAGE$
|
|
8
|
-
const TRANSLATIONS$
|
|
7
|
+
const DEFAULT_LANGUAGE$2 = 'en';
|
|
8
|
+
const TRANSLATIONS$2 = {
|
|
9
9
|
"en": {
|
|
10
10
|
"dateError": "The selected date should be between {min} and {max}",
|
|
11
11
|
"dateError2": "The selected date is not within the accepted range",
|
|
@@ -120,9 +120,9 @@ const TRANSLATIONS$1 = {
|
|
|
120
120
|
"OnlyNumbers": "Solo debe contener números"
|
|
121
121
|
}
|
|
122
122
|
};
|
|
123
|
-
const translate$
|
|
123
|
+
const translate$3 = (key, customLang, values) => {
|
|
124
124
|
const lang = customLang;
|
|
125
|
-
let translation = TRANSLATIONS$
|
|
125
|
+
let translation = TRANSLATIONS$2[lang !== undefined ? lang : DEFAULT_LANGUAGE$2][key];
|
|
126
126
|
if (values !== undefined) {
|
|
127
127
|
for (const [key, value] of Object.entries(values.values)) {
|
|
128
128
|
const regex = new RegExp(`{${key}}`, 'g');
|
|
@@ -131,7 +131,7 @@ const translate$2 = (key, customLang, values) => {
|
|
|
131
131
|
}
|
|
132
132
|
return translation;
|
|
133
133
|
};
|
|
134
|
-
const getTranslations$
|
|
134
|
+
const getTranslations$2 = (url) => {
|
|
135
135
|
// fetch url, get the data, replace the TRANSLATIONS content
|
|
136
136
|
return new Promise((resolve) => {
|
|
137
137
|
fetch(url)
|
|
@@ -139,7 +139,7 @@ const getTranslations$1 = (url) => {
|
|
|
139
139
|
.then((data) => {
|
|
140
140
|
Object.keys(data).forEach((item) => {
|
|
141
141
|
for (let key in data[item]) {
|
|
142
|
-
TRANSLATIONS$
|
|
142
|
+
TRANSLATIONS$2[item][key] = data[item][key];
|
|
143
143
|
}
|
|
144
144
|
});
|
|
145
145
|
resolve(true);
|
|
@@ -147,7 +147,7 @@ const getTranslations$1 = (url) => {
|
|
|
147
147
|
});
|
|
148
148
|
};
|
|
149
149
|
|
|
150
|
-
const tooltipIconSvg = 'data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTIiIGhlaWdodD0iMTIiIHZpZXdCb3g9IjAgMCAxMiAxMiIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KPGNpcmNsZSBjeD0iNiIgY3k9IjYiIHI9IjUuNSIgc3Ryb2tlPSIjOTc5Nzk3Ii8+CjxyZWN0IHg9IjUiIHk9IjUiIHdpZHRoPSIyIiBoZWlnaHQ9IjUiIGZpbGw9IiM5Nzk3OTciLz4KPGNpcmNsZSBjeD0iNiIgY3k9IjMiIHI9IjEiIGZpbGw9IiM5Nzk3OTciLz4KPC9zdmc+Cg==';
|
|
150
|
+
const tooltipIconSvg$1 = 'data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTIiIGhlaWdodD0iMTIiIHZpZXdCb3g9IjAgMCAxMiAxMiIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KPGNpcmNsZSBjeD0iNiIgY3k9IjYiIHI9IjUuNSIgc3Ryb2tlPSIjOTc5Nzk3Ii8+CjxyZWN0IHg9IjUiIHk9IjUiIHdpZHRoPSIyIiBoZWlnaHQ9IjUiIGZpbGw9IiM5Nzk3OTciLz4KPGNpcmNsZSBjeD0iNiIgY3k9IjMiIHI9IjEiIGZpbGw9IiM5Nzk3OTciLz4KPC9zdmc+Cg==';
|
|
151
151
|
|
|
152
152
|
/**
|
|
153
153
|
* @license
|
|
@@ -1972,7 +1972,7 @@ function isDescendant(base, path) {
|
|
|
1972
1972
|
* @param {string} path Path to translate
|
|
1973
1973
|
* @return {string} Translated string
|
|
1974
1974
|
*/
|
|
1975
|
-
function translate$
|
|
1975
|
+
function translate$2(base, newBase, path) {
|
|
1976
1976
|
return newBase + path.slice(base.length);
|
|
1977
1977
|
}
|
|
1978
1978
|
|
|
@@ -4173,7 +4173,7 @@ function handleNotification(event, inst, fromProp, toPath, negate) {
|
|
|
4173
4173
|
let detail = /** @type {Object} */(event.detail);
|
|
4174
4174
|
let fromPath = detail && detail.path;
|
|
4175
4175
|
if (fromPath) {
|
|
4176
|
-
toPath = translate$
|
|
4176
|
+
toPath = translate$2(fromProp, toPath, fromPath);
|
|
4177
4177
|
value = detail && detail.value;
|
|
4178
4178
|
} else {
|
|
4179
4179
|
value = event.currentTarget[fromProp];
|
|
@@ -4459,10 +4459,10 @@ function computeLinkedPaths(inst, path, value) {
|
|
|
4459
4459
|
for (let a in links) {
|
|
4460
4460
|
let b = links[a];
|
|
4461
4461
|
if (isDescendant(a, path)) {
|
|
4462
|
-
link = translate$
|
|
4462
|
+
link = translate$2(a, b, path);
|
|
4463
4463
|
inst._setPendingPropertyOrPath(link, value, true, true);
|
|
4464
4464
|
} else if (isDescendant(b, path)) {
|
|
4465
|
-
link = translate$
|
|
4465
|
+
link = translate$2(b, a, path);
|
|
4466
4466
|
inst._setPendingPropertyOrPath(link, value, true, true);
|
|
4467
4467
|
}
|
|
4468
4468
|
}
|
|
@@ -4574,7 +4574,7 @@ function runBindingEffect(inst, path, props, oldProps, info, hasPaths, nodeList)
|
|
|
4574
4574
|
node.__isPropertyEffectsClient &&
|
|
4575
4575
|
node.__dataHasAccessor && node.__dataHasAccessor[binding.target]) {
|
|
4576
4576
|
let value = props[path];
|
|
4577
|
-
path = translate$
|
|
4577
|
+
path = translate$2(part.source, binding.target, path);
|
|
4578
4578
|
if (node._setPendingPropertyOrPath(path, value, false, true)) {
|
|
4579
4579
|
inst._enqueueClient(node);
|
|
4580
4580
|
}
|
|
@@ -14561,7 +14561,7 @@ const CheckboxGroupInput = class {
|
|
|
14561
14561
|
}
|
|
14562
14562
|
setErrorMessage() {
|
|
14563
14563
|
if (this.inputReference.validity.valueMissing) {
|
|
14564
|
-
return translate$
|
|
14564
|
+
return translate$3('requiredError', this.language);
|
|
14565
14565
|
}
|
|
14566
14566
|
}
|
|
14567
14567
|
renderTooltip() {
|
|
@@ -14581,7 +14581,7 @@ const CheckboxGroupInput = class {
|
|
|
14581
14581
|
}
|
|
14582
14582
|
render() {
|
|
14583
14583
|
return index.h("div", { key: 'fa45026502fd8d46aa537aee03210ad68d30e577', class: `checkboxgroup__wrapper ${this.name}__input`, ref: el => this.stylingContainer = el }, index.h("div", { key: '15ded4fd896920c6244806e49f300c124c27186d', class: 'checkboxgroup__wrapper--flex' }, index.h("vaadin-checkbox", { key: 'd7eaa205877f8f12c9ef7d4f77018665806f5c7c', 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 &&
|
|
14584
|
-
index.h("img", { key: 'aca39ed398415a6e2cef861be40dad33e0398759', class: 'checkboxgroup__tooltip-icon', src: tooltipIconSvg, alt: "", ref: (el) => this.tooltipIconReference = el, onClick: () => this.showTooltip = !this.showTooltip }), this.renderTooltip()), index.h("small", { key: 'a1a6e1c3c02edcca572b8826ffba06835ca451c3', class: 'checkboxgroup__error-message' }, this.errorMessage), index.h("vaadin-checkbox-group", { key: '9f5f8a945e4ba13d7d0da6d362c15d00a7796b71', theme: "vertical", value: this.selectedValues, "on-value-changed": (event) => {
|
|
14584
|
+
index.h("img", { key: 'aca39ed398415a6e2cef861be40dad33e0398759', class: 'checkboxgroup__tooltip-icon', src: tooltipIconSvg$1, alt: "", ref: (el) => this.tooltipIconReference = el, onClick: () => this.showTooltip = !this.showTooltip }), this.renderTooltip()), index.h("small", { key: 'a1a6e1c3c02edcca572b8826ffba06835ca451c3', class: 'checkboxgroup__error-message' }, this.errorMessage), index.h("vaadin-checkbox-group", { key: '9f5f8a945e4ba13d7d0da6d362c15d00a7796b71', theme: "vertical", value: this.selectedValues, "on-value-changed": (event) => {
|
|
14585
14585
|
this.selectedValues = event.detail.value;
|
|
14586
14586
|
} }, this.options.map((checkbox) => index.h("vaadin-checkbox", { class: 'checkbox__input', name: checkbox.name, value: checkbox.name, label: checkbox.displayName }))));
|
|
14587
14587
|
}
|
|
@@ -14671,7 +14671,7 @@ const CheckboxInput = class {
|
|
|
14671
14671
|
}
|
|
14672
14672
|
setErrorMessage() {
|
|
14673
14673
|
if (this.inputReference.validity.valueMissing) {
|
|
14674
|
-
return translate$
|
|
14674
|
+
return translate$3('requiredError', this.language);
|
|
14675
14675
|
}
|
|
14676
14676
|
}
|
|
14677
14677
|
renderLabel() {
|
|
@@ -14685,7 +14685,7 @@ const CheckboxInput = class {
|
|
|
14685
14685
|
}
|
|
14686
14686
|
render() {
|
|
14687
14687
|
return index.h("div", { key: '0aae00d291d1da02adae1bc91e79ccd579aa5c7f', class: `checkbox__wrapper ${this.name}__input`, ref: el => this.stylingContainer = el }, index.h("input", { key: '4b8c61d322b5065d8abe4e2687e270511fadc97f', class: 'checkbox__input', type: "checkbox", id: `${this.name}__input`, ref: (el) => this.inputReference = el, name: this.name, checked: this.defaultValue === "true", readOnly: this.autofilled, required: this.validation.mandatory, value: this.value, onClick: () => this.handleClick() }), this.renderLabel(), index.h("small", { key: '934263cb58a0d379e8b7dc1f5004ad7e61c63ce0', class: 'checkbox__error-message' }, this.errorMessage), index.h("div", { key: '88cc71329d88b6325d792226e64ff7f93e940178', class: 'checkbox__wrapper--relative' }, this.tooltip &&
|
|
14688
|
-
index.h("img", { key: '3708dc613dc920bac6557f2a8020bbafd97d9127', class: 'checkbox__tooltip-icon', src: tooltipIconSvg, alt: "", ref: (el) => this.tooltipIconReference = el, onClick: () => this.showTooltip = !this.showTooltip }), this.renderTooltip()));
|
|
14688
|
+
index.h("img", { key: '3708dc613dc920bac6557f2a8020bbafd97d9127', class: 'checkbox__tooltip-icon', src: tooltipIconSvg$1, alt: "", ref: (el) => this.tooltipIconReference = el, onClick: () => this.showTooltip = !this.showTooltip }), this.renderTooltip()));
|
|
14689
14689
|
}
|
|
14690
14690
|
static get watchers() { return {
|
|
14691
14691
|
"isValid": ["validityChanged"],
|
|
@@ -21242,7 +21242,7 @@ class DomRepeat extends domRepeatBase {
|
|
|
21242
21242
|
if (prop == this.as) {
|
|
21243
21243
|
this.items[idx] = value;
|
|
21244
21244
|
}
|
|
21245
|
-
let path = translate$
|
|
21245
|
+
let path = translate$2(this.as, `${JSCompiler_renameProperty('items', this)}.${idx}`, prop);
|
|
21246
21246
|
this.notifyPath(path, value);
|
|
21247
21247
|
}
|
|
21248
21248
|
}
|
|
@@ -30767,13 +30767,13 @@ const DateInput = class {
|
|
|
30767
30767
|
}
|
|
30768
30768
|
setErrorMessage() {
|
|
30769
30769
|
if (isBefore(this.valueAsDate, this.minDate) || isAfter(this.valueAsDate, this.maxDate)) {
|
|
30770
|
-
return translate$
|
|
30770
|
+
return translate$3('dateError2', this.language);
|
|
30771
30771
|
}
|
|
30772
30772
|
if (this.inputReference.validity.rangeUnderflow || this.inputReference.validity.rangeOverflow) {
|
|
30773
|
-
return translate$
|
|
30773
|
+
return translate$3('dateError', this.language, { values: { min: this.validation.min, max: this.validation.max } });
|
|
30774
30774
|
}
|
|
30775
30775
|
if (this.inputReference.validity.valueMissing) {
|
|
30776
|
-
return translate$
|
|
30776
|
+
return translate$3('requiredError', this.language);
|
|
30777
30777
|
}
|
|
30778
30778
|
}
|
|
30779
30779
|
renderTooltip() {
|
|
@@ -30788,7 +30788,7 @@ const DateInput = class {
|
|
|
30788
30788
|
invalidClass = this.isValid == true || this.isValid == undefined ? '' : 'text__input--invalid';
|
|
30789
30789
|
}
|
|
30790
30790
|
return index.h("div", { key: 'fc9cd0a618c7b6e62962c0800399a470fffa1fc4', class: `date__wrapper ${this.autofilled ? 'date__wrapper--autofilled' : ''} ${this.name}__input`, ref: el => this.stylingContainer = el }, index.h("label", { key: 'abc7c1715dd2d0c60dd2ac6d028355de910be501', class: `date__label ${this.validation.mandatory ? 'date__label--required' : ''}}`, htmlFor: `${this.name}__input` }, this.displayName, " ", this.validation.mandatory ? '*' : ''), index.h("vaadin-date-picker", { key: 'a6b40a978b573d41490457d708f9a7ac78622a6f', id: `${this.name}__input`, type: 'date', class: `date__input ${invalidClass}`, 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), onBlur: this.handleBlur }), index.h("small", { key: 'd802ea7b25a64802aca3a7491107fcee7af2a23c', class: 'date__error-message' }, this.errorMessage), this.tooltip &&
|
|
30791
|
-
index.h("img", { key: '46edd200a9ce9eba27414a6434c6b3d5e9dc9964', class: 'date__tooltip-icon', src: tooltipIconSvg, alt: "", ref: (el) => this.tooltipIconReference = el, onClick: () => this.showTooltip = !this.showTooltip }), this.renderTooltip());
|
|
30791
|
+
index.h("img", { key: '46edd200a9ce9eba27414a6434c6b3d5e9dc9964', class: 'date__tooltip-icon', src: tooltipIconSvg$1, alt: "", ref: (el) => this.tooltipIconReference = el, onClick: () => this.showTooltip = !this.showTooltip }), this.renderTooltip());
|
|
30792
30792
|
}
|
|
30793
30793
|
get element() { return index.getElement(this); }
|
|
30794
30794
|
static get watchers() { return {
|
|
@@ -30909,18 +30909,18 @@ const EmailInput = class {
|
|
|
30909
30909
|
if (this.inputReference.validity.patternMismatch) {
|
|
30910
30910
|
const errorCode = (_a = this.validation.custom.find(customValidation => customValidation.rule === 'regex')) === null || _a === void 0 ? void 0 : _a.errorKey;
|
|
30911
30911
|
const errorMessage = (_b = this.validation.custom.find(customValidation => customValidation.rule === 'regex')) === null || _b === void 0 ? void 0 : _b.errorMessage;
|
|
30912
|
-
return translate$
|
|
30912
|
+
return translate$3(`${errorCode}`, this.language) ? translate$3(`${errorCode}`, this.language) : errorMessage;
|
|
30913
30913
|
}
|
|
30914
30914
|
if (this.inputReference.validity.tooShort || this.inputReference.validity.tooLong) {
|
|
30915
|
-
return translate$
|
|
30915
|
+
return translate$3('lengthError', this.language, { values: { minLength: this.validation.minLength, maxLength: this.validation.maxLength } });
|
|
30916
30916
|
}
|
|
30917
30917
|
if (this.inputReference.validity.valueMissing) {
|
|
30918
|
-
return translate$
|
|
30918
|
+
return translate$3('requiredError', this.language);
|
|
30919
30919
|
}
|
|
30920
30920
|
if (this.isDuplicateInput && this.duplicateInputValue !== this.value) {
|
|
30921
30921
|
const errorCode = (_c = this.validation.custom.find(customRule => customRule.rule === 'duplicate-input')) === null || _c === void 0 ? void 0 : _c.errorKey;
|
|
30922
30922
|
const errorMessage = (_d = this.validation.custom.find(customRule => customRule.rule === 'duplicate-input')) === null || _d === void 0 ? void 0 : _d.errorMessage;
|
|
30923
|
-
return translate$
|
|
30923
|
+
return translate$3(`${errorCode}`, this.language) ? translate$3(`${errorCode}`, this.language) : errorMessage;
|
|
30924
30924
|
}
|
|
30925
30925
|
}
|
|
30926
30926
|
renderTooltip() {
|
|
@@ -30935,7 +30935,7 @@ const EmailInput = class {
|
|
|
30935
30935
|
invalidClass = this.isValid == true || this.isValid == undefined ? '' : 'text__input--invalid';
|
|
30936
30936
|
}
|
|
30937
30937
|
return index.h("div", { key: '23ac67984ab7a0f4db01e5fe01f4f326b4c6a912', class: `email__wrapper ${this.autofilled ? 'number__wrapper--autofilled' : ''} ${this.name}__input`, ref: el => this.stylingContainer = el }, index.h("div", { key: 'aa2405e435aea20f1678dd74776a8ce4094bc95b', class: 'email__wrapper--flex' }, index.h("label", { key: '970b83bbcf082d1721c1647993fecd076939b65d', class: `email__label ${this.validation.mandatory ? 'email__label--required' : ''}`, htmlFor: `${this.name}__input` }, this.displayName), index.h("div", { key: '2f03eaf161aab9b45282c1bc0de15bea8455427c', class: 'email__wrapper--relative' }, this.tooltip &&
|
|
30938
|
-
index.h("img", { key: '3c34b91f0b478cf04f5aabc5fdd33a8ed73d091b', class: 'email__tooltip-icon', src: tooltipIconSvg, alt: "", ref: (el) => this.tooltipIconReference = el, onClick: () => this.showTooltip = !this.showTooltip }), this.renderTooltip())), index.h("input", { key: '491f83c0f562893c02e3425b4d54eecc214e3c95', 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 }), index.h("small", { key: 'edb6660d958cc5d0cb41b0db195bd7e847ecbefe', class: 'email__error-message' }, this.errorMessage));
|
|
30938
|
+
index.h("img", { key: '3c34b91f0b478cf04f5aabc5fdd33a8ed73d091b', class: 'email__tooltip-icon', src: tooltipIconSvg$1, alt: "", ref: (el) => this.tooltipIconReference = el, onClick: () => this.showTooltip = !this.showTooltip }), this.renderTooltip())), index.h("input", { key: '491f83c0f562893c02e3425b4d54eecc214e3c95', 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 }), index.h("small", { key: 'edb6660d958cc5d0cb41b0db195bd7e847ecbefe', class: 'email__error-message' }, this.errorMessage));
|
|
30939
30939
|
}
|
|
30940
30940
|
static get watchers() { return {
|
|
30941
30941
|
"isValid": ["validityChanged"],
|
|
@@ -30944,6 +30944,306 @@ const EmailInput = class {
|
|
|
30944
30944
|
};
|
|
30945
30945
|
EmailInput.style = EmailInputStyle0;
|
|
30946
30946
|
|
|
30947
|
+
const DEFAULT_LANGUAGE$1 = 'en';
|
|
30948
|
+
const TRANSLATIONS$1 = {
|
|
30949
|
+
"en": {
|
|
30950
|
+
"termsandconditions__description": "Needed to prove user accepted terms and conditions.",
|
|
30951
|
+
"emailmarketing__description": "Needed to prove email marketing consent.",
|
|
30952
|
+
"sms__description": "Needed to prove sms marketing consent.",
|
|
30953
|
+
"3rdparty__description": "Needed to prove 3rd party marketing consent.",
|
|
30954
|
+
"noDataFound": "No data found for consents.",
|
|
30955
|
+
"loading": "Loading...please wait",
|
|
30956
|
+
"requiredError": "This field is mandatory",
|
|
30957
|
+
},
|
|
30958
|
+
"hu": {
|
|
30959
|
+
"termsandconditions__description": "Szükséges annak igazolására, hogy a felhasználó elfogadta a feltételeket és kikötéseket.",
|
|
30960
|
+
"emailmarketing__description": "Szükséges annak igazolására, hogy a felhasználó beleegyezett az e-mail marketingbe.",
|
|
30961
|
+
"sms__description": "Szükséges annak igazolására, hogy a felhasználó beleegyezett az SMS marketingbe.",
|
|
30962
|
+
"3rdparty__description": "Szükséges annak igazolására, hogy a felhasználó beleegyezett a harmadik fél általi marketingbe.",
|
|
30963
|
+
"noDataFound": "Nincs adat a hozzájárulásokról.",
|
|
30964
|
+
"loading": "Betöltés...kérem várjon",
|
|
30965
|
+
"requiredError": "Ez a mező kötelező"
|
|
30966
|
+
},
|
|
30967
|
+
"hr": {
|
|
30968
|
+
"termsandconditions__description": "Potrebno za dokazivanje da je korisnik prihvatio uvjete i odredbe.",
|
|
30969
|
+
"emailmarketing__description": "Potrebno za dokazivanje pristanka na email marketing.",
|
|
30970
|
+
"sms__description": "Potrebno za dokazivanje pristanka na SMS marketing.",
|
|
30971
|
+
"3rdparty__description": "Potrebno za dokazivanje pristanka na marketing trećih strana.",
|
|
30972
|
+
"noDataFound": "Nema podataka o privolama.",
|
|
30973
|
+
"loading": "Učitavanje...molimo pričekajte",
|
|
30974
|
+
"requiredError": "Ovo polje je obavezno"
|
|
30975
|
+
},
|
|
30976
|
+
"tr": {
|
|
30977
|
+
"termsandconditions__description": "Kullanıcının şartlar ve koşulları kabul ettiğini kanıtlamak için gereklidir.",
|
|
30978
|
+
"emailmarketing__description": "E-posta pazarlama onayını kanıtlamak için gereklidir.",
|
|
30979
|
+
"sms__description": "SMS pazarlama onayını kanıtlamak için gereklidir.",
|
|
30980
|
+
"3rdparty__description": "Üçüncü taraf pazarlama onayını kanıtlamak için gereklidir.",
|
|
30981
|
+
"noDataFound": "Onaylarla ilgili veri bulunamadı.",
|
|
30982
|
+
"loading": "Yükleniyor...lütfen bekleyin",
|
|
30983
|
+
"requiredError": "Bu alan zorunludur"
|
|
30984
|
+
},
|
|
30985
|
+
"pt-br": {
|
|
30986
|
+
"termsandconditions__description": "Necessário para comprovar que o usuário aceitou os termos e condições.",
|
|
30987
|
+
"emailmarketing__description": "Necessário para comprovar o consentimento para marketing por e-mail.",
|
|
30988
|
+
"sms__description": "Necessário para comprovar o consentimento para marketing por SMS.",
|
|
30989
|
+
"3rdparty__description": "Necessário para comprovar o consentimento para marketing de terceiros.",
|
|
30990
|
+
"noDataFound": "Nenhum dado encontrado para consentimentos.",
|
|
30991
|
+
"loading": "Carregando...por favor aguarde",
|
|
30992
|
+
"requiredError": "Este campo é obrigatório"
|
|
30993
|
+
},
|
|
30994
|
+
"es-mx": {
|
|
30995
|
+
"termsandconditions__description": "Necesario para demostrar que el usuario aceptó los términos y condiciones.",
|
|
30996
|
+
"emailmarketing__description": "Necesario para demostrar el consentimiento para el marketing por correo electrónico.",
|
|
30997
|
+
"sms__description": "Necesario para demostrar el consentimiento para el marketing por SMS.",
|
|
30998
|
+
"3rdparty__description": "Necesario para demostrar el consentimiento para el marketing de terceros.",
|
|
30999
|
+
"noDataFound": "No se encontraron datos para los consentimientos.",
|
|
31000
|
+
"loading": "Cargando...por favor espera",
|
|
31001
|
+
"requiredError": "Este campo es obligatorio"
|
|
31002
|
+
}
|
|
31003
|
+
};
|
|
31004
|
+
const translate$1 = (key, customLang, values) => {
|
|
31005
|
+
const lang = customLang;
|
|
31006
|
+
let translation = TRANSLATIONS$1[lang !== undefined ? lang : DEFAULT_LANGUAGE$1][key];
|
|
31007
|
+
if (values !== undefined) {
|
|
31008
|
+
for (const [key, value] of Object.entries(values.values)) {
|
|
31009
|
+
const regex = new RegExp(`{${key}}`, 'g');
|
|
31010
|
+
translation = translation.replace(regex, value);
|
|
31011
|
+
}
|
|
31012
|
+
}
|
|
31013
|
+
return translation;
|
|
31014
|
+
};
|
|
31015
|
+
const getTranslations$1 = (url) => {
|
|
31016
|
+
// fetch url, get the data, replace the TRANSLATIONS content
|
|
31017
|
+
return new Promise((resolve) => {
|
|
31018
|
+
fetch(url)
|
|
31019
|
+
.then((res) => res.json())
|
|
31020
|
+
.then((data) => {
|
|
31021
|
+
Object.keys(data).forEach((item) => {
|
|
31022
|
+
for (let key in data[item]) {
|
|
31023
|
+
TRANSLATIONS$1[item][key] = data[item][key];
|
|
31024
|
+
}
|
|
31025
|
+
});
|
|
31026
|
+
resolve(true);
|
|
31027
|
+
});
|
|
31028
|
+
});
|
|
31029
|
+
};
|
|
31030
|
+
|
|
31031
|
+
const tooltipIconSvg = 'data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTIiIGhlaWdodD0iMTIiIHZpZXdCb3g9IjAgMCAxMiAxMiIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KPGNpcmNsZSBjeD0iNiIgY3k9IjYiIHI9IjUuNSIgc3Ryb2tlPSIjOTc5Nzk3Ii8+CjxyZWN0IHg9IjUiIHk9IjUiIHdpZHRoPSIyIiBoZWlnaHQ9IjUiIGZpbGw9IiM5Nzk3OTciLz4KPGNpcmNsZSBjeD0iNiIgY3k9IjMiIHI9IjEiIGZpbGw9IiM5Nzk3OTciLz4KPC9zdmc+Cg==';
|
|
31032
|
+
|
|
31033
|
+
const generalConsentsCss = "*,*::before,*::after{padding:0;margin:0;box-sizing:border-box}.checkbox{font-family:\"Roboto\";font-style:normal}.checkbox .checkbox__wrapper{display:flex;gap:10px;position:relative;align-items:baseline;margin-bottom:30px}.checkbox .checkbox__wrapper .checkbox__wrapper--relative{position:relative}.checkbox .checkbox__input{transform:scale(1.307, 1.307);margin-left:2px;accent-color:var(--emfe-w-login-color-primary, var(--emfe-w-color-primary, #D0046C))}.checkbox .checkbox__label{font-style:inherit;font-family:inherit;font-weight:400;font-size:var(--emw--font-size-medium, 16px);color:var(--emfe-w-registration-typography, var(--emfe-w-color-black, #000000));line-height:1.5;cursor:pointer;padding:0}.checkbox .checkbox__label .checkbox__label-text{font-size:var(--emw--font-size-medium, 16px)}.checkbox .checkbox__label .checkbox__label a{color:var(--emfe-w-login-color-primary, var(--emfe-w-color-primary, #D0046C))}.checkbox .checkbox__error-message{position:absolute;top:calc(100% + 5px);left:0;color:var(--emfe-w-color-error, var(--emfe-w-color-red, #ed0909))}.checkbox .checkbox__tooltip-icon{width:16px;height:auto}.checkbox .checkbox__tooltip{position:absolute;top:0;right:20px;background-color:var(--emfe-w-color-white, #FFFFFF);border:1px solid var(--emfe-w-color-gray-100, #E6E6E6);color:var(--emfe-w-registration-typography, var(--emfe-w-color-black, #000000));padding:10px;border-radius:5px;opacity:0;transition:opacity 0.3s ease-in-out;z-index:10}.checkbox .checkbox__tooltip.visible{opacity:1}";
|
|
31034
|
+
const GeneralConsentsStyle0 = generalConsentsCss;
|
|
31035
|
+
|
|
31036
|
+
const GeneralConsents = class {
|
|
31037
|
+
constructor(hostRef) {
|
|
31038
|
+
index.registerInstance(this, hostRef);
|
|
31039
|
+
this.value = '';
|
|
31040
|
+
this.registerErrors = false;
|
|
31041
|
+
this.setClientStyling = () => {
|
|
31042
|
+
let sheet = document.createElement('style');
|
|
31043
|
+
sheet.innerHTML = this.clientStyling;
|
|
31044
|
+
this.host.shadowRoot.prepend(sheet);
|
|
31045
|
+
};
|
|
31046
|
+
this.setClientStylingURL = () => {
|
|
31047
|
+
let url = new URL(this.clientStylingUrl);
|
|
31048
|
+
let cssFile = document.createElement('style');
|
|
31049
|
+
fetch(url.href)
|
|
31050
|
+
.then((res) => res.text())
|
|
31051
|
+
.then((data) => {
|
|
31052
|
+
cssFile.innerHTML = data;
|
|
31053
|
+
this.clientStyling = data;
|
|
31054
|
+
setTimeout(() => { this.host.shadowRoot.prepend(cssFile); }, 1);
|
|
31055
|
+
});
|
|
31056
|
+
};
|
|
31057
|
+
//Debounce to stop user from multiple calls
|
|
31058
|
+
this.debouncedHandleClick = this.debounce(this.handleClick, 500);
|
|
31059
|
+
this.endpoint = undefined;
|
|
31060
|
+
this.language = 'en';
|
|
31061
|
+
this.clientStyling = '';
|
|
31062
|
+
this.clientStylingUrl = '';
|
|
31063
|
+
this.translationUrl = '';
|
|
31064
|
+
this.name = undefined;
|
|
31065
|
+
this.tooltip = undefined;
|
|
31066
|
+
this.isLoading = true;
|
|
31067
|
+
this.consentsData = undefined;
|
|
31068
|
+
this.showTooltip = false;
|
|
31069
|
+
this.playerConsents = [];
|
|
31070
|
+
this.isValid = undefined;
|
|
31071
|
+
}
|
|
31072
|
+
handleStylingChange(newValue, oldValue) {
|
|
31073
|
+
if (newValue !== oldValue)
|
|
31074
|
+
this.setClientStyling();
|
|
31075
|
+
}
|
|
31076
|
+
handleStylingUrlChange(newValue, oldValue) {
|
|
31077
|
+
if (newValue !== oldValue)
|
|
31078
|
+
this.setClientStylingURL();
|
|
31079
|
+
}
|
|
31080
|
+
handleNewTranslations() {
|
|
31081
|
+
this.isLoading = true;
|
|
31082
|
+
getTranslations$1(this.translationUrl).then(() => {
|
|
31083
|
+
this.isLoading = false;
|
|
31084
|
+
});
|
|
31085
|
+
}
|
|
31086
|
+
//Watch only executes if newVal !== oldVal
|
|
31087
|
+
sendMessage() {
|
|
31088
|
+
window.postMessage({
|
|
31089
|
+
type: 'isConsentsValid',
|
|
31090
|
+
isValid: this.isValid
|
|
31091
|
+
});
|
|
31092
|
+
}
|
|
31093
|
+
//Listener for registration message so the sendConsents is made when the user is heading to the next step
|
|
31094
|
+
messageHandler(e) {
|
|
31095
|
+
//Handle Consents Message
|
|
31096
|
+
if (e.data && e.data.type != "setUpPlayerConsents")
|
|
31097
|
+
return;
|
|
31098
|
+
this.sendConsents(e.data.registerid);
|
|
31099
|
+
}
|
|
31100
|
+
handleClickOutside(event) {
|
|
31101
|
+
if (event.composedPath()[0] === this.tooltipIconReference)
|
|
31102
|
+
return;
|
|
31103
|
+
if (event.composedPath()[0] !== this.tooltipReference)
|
|
31104
|
+
this.showTooltip = false;
|
|
31105
|
+
}
|
|
31106
|
+
async componentWillLoad() {
|
|
31107
|
+
if (this.translationUrl.length > 2) {
|
|
31108
|
+
await getTranslations$1(this.translationUrl);
|
|
31109
|
+
}
|
|
31110
|
+
this.getConsents();
|
|
31111
|
+
}
|
|
31112
|
+
addTranslation(field) {
|
|
31113
|
+
const lang = TRANSLATIONS$1[this.language];
|
|
31114
|
+
if (TRANSLATIONS$1[lang][field.name]) {
|
|
31115
|
+
Object.keys(TRANSLATIONS$1[this.language][field.name]).forEach((key) => {
|
|
31116
|
+
field[key] = TRANSLATIONS$1[this.language][field.name][key];
|
|
31117
|
+
});
|
|
31118
|
+
}
|
|
31119
|
+
}
|
|
31120
|
+
getConsents() {
|
|
31121
|
+
this.isLoading = true;
|
|
31122
|
+
this.registerErrors = false;
|
|
31123
|
+
const url = new URL(`${this.endpoint}/api/v2/gm/legislation/consents`), headers = {
|
|
31124
|
+
'Content-Type': 'application/json',
|
|
31125
|
+
'Accept': 'application/json'
|
|
31126
|
+
}, options = {
|
|
31127
|
+
method: 'GET',
|
|
31128
|
+
headers
|
|
31129
|
+
};
|
|
31130
|
+
fetch(url.href, options)
|
|
31131
|
+
.then((res) => {
|
|
31132
|
+
if (!res.ok) {
|
|
31133
|
+
this.registerErrors = true;
|
|
31134
|
+
return res.json().then(error => {
|
|
31135
|
+
return console.error(error);
|
|
31136
|
+
});
|
|
31137
|
+
}
|
|
31138
|
+
return res.json();
|
|
31139
|
+
})
|
|
31140
|
+
.then((data) => {
|
|
31141
|
+
if (!this.registerErrors) {
|
|
31142
|
+
this.consentsData = data;
|
|
31143
|
+
//If consents are in the localStorage user it instead of the one from the call
|
|
31144
|
+
if (localStorage.getItem("playerConsents")) {
|
|
31145
|
+
try {
|
|
31146
|
+
this.playerConsents = JSON.parse(localStorage.getItem('playerConsents'));
|
|
31147
|
+
}
|
|
31148
|
+
catch (error) {
|
|
31149
|
+
console.error(error);
|
|
31150
|
+
}
|
|
31151
|
+
return;
|
|
31152
|
+
}
|
|
31153
|
+
this.playerConsents = this.consentsData.map((consent) => ({
|
|
31154
|
+
status: '3',
|
|
31155
|
+
tagCode: consent.tagCode,
|
|
31156
|
+
}));
|
|
31157
|
+
//Setup default localStorage consents
|
|
31158
|
+
localStorage.setItem('playerConsents', JSON.stringify(this.playerConsents));
|
|
31159
|
+
}
|
|
31160
|
+
})
|
|
31161
|
+
.catch((err) => {
|
|
31162
|
+
console.error(err);
|
|
31163
|
+
})
|
|
31164
|
+
.finally(() => {
|
|
31165
|
+
this.isLoading = false;
|
|
31166
|
+
});
|
|
31167
|
+
}
|
|
31168
|
+
sendConsents(registerID) {
|
|
31169
|
+
const url = new URL(`${this.endpoint}/api/v2/gm/legislation/consents`), headers = {
|
|
31170
|
+
'Content-Type': 'application/json',
|
|
31171
|
+
'Accept': 'application/json'
|
|
31172
|
+
}, body = {
|
|
31173
|
+
playerConsents: this.playerConsents,
|
|
31174
|
+
registrationId: registerID
|
|
31175
|
+
}, options = {
|
|
31176
|
+
method: 'POST',
|
|
31177
|
+
body: JSON.stringify(body),
|
|
31178
|
+
headers
|
|
31179
|
+
};
|
|
31180
|
+
fetch(url.href, options)
|
|
31181
|
+
.then((res) => {
|
|
31182
|
+
if (!res.ok) {
|
|
31183
|
+
this.registerErrors = true;
|
|
31184
|
+
}
|
|
31185
|
+
})
|
|
31186
|
+
.catch((err) => {
|
|
31187
|
+
console.error(err);
|
|
31188
|
+
})
|
|
31189
|
+
.finally(() => {
|
|
31190
|
+
this.isLoading = false;
|
|
31191
|
+
});
|
|
31192
|
+
}
|
|
31193
|
+
handleClick(data) {
|
|
31194
|
+
const consent = this.consentsData.find((consent) => data.tagCode === consent.tagCode && data.status === "3" && consent.mustAccept);
|
|
31195
|
+
//Setup value for the consent in localStorage
|
|
31196
|
+
localStorage.setItem('playerConsents', JSON.stringify(this.playerConsents));
|
|
31197
|
+
//Show error for mandatory fields when they are not seleted
|
|
31198
|
+
this[`errorMessage__${data.tagCode}`].innerHTML = consent ? this.setErrorMessage() : "";
|
|
31199
|
+
//Check form validity
|
|
31200
|
+
this.isValid = this.checkValidity();
|
|
31201
|
+
}
|
|
31202
|
+
//Handle the input when user select a consent
|
|
31203
|
+
handleInput(index, event) {
|
|
31204
|
+
const target = event.target;
|
|
31205
|
+
this.playerConsents[index].status = target.checked ? '1' : '3';
|
|
31206
|
+
this.debouncedHandleClick(this.playerConsents[index]);
|
|
31207
|
+
}
|
|
31208
|
+
handleTooltipClick() { this.showTooltip = !this.showTooltip; }
|
|
31209
|
+
debounce(func, delay) {
|
|
31210
|
+
let timer;
|
|
31211
|
+
return function (...args) {
|
|
31212
|
+
clearTimeout(timer);
|
|
31213
|
+
timer = setTimeout(() => {
|
|
31214
|
+
func.apply(this, args);
|
|
31215
|
+
}, delay);
|
|
31216
|
+
};
|
|
31217
|
+
}
|
|
31218
|
+
checkValidity() {
|
|
31219
|
+
const invalidConsents = this.playerConsents.filter((formConsent) => this.consentsData.some((consent) => formConsent.tagCode === consent.tagCode &&
|
|
31220
|
+
consent.mustAccept &&
|
|
31221
|
+
formConsent.status === "3"));
|
|
31222
|
+
return invalidConsents.length === 0;
|
|
31223
|
+
}
|
|
31224
|
+
setErrorMessage() {
|
|
31225
|
+
return translate$1('requiredError', this.language);
|
|
31226
|
+
}
|
|
31227
|
+
render() {
|
|
31228
|
+
if (this.isLoading) {
|
|
31229
|
+
return index.h("p", null, translate$1('loading', this.language));
|
|
31230
|
+
}
|
|
31231
|
+
if (!this.consentsData) {
|
|
31232
|
+
return index.h("p", null, translate$1('noDataFound', this.language));
|
|
31233
|
+
}
|
|
31234
|
+
return (index.h("form", { class: "checkbox" }, this.consentsData.map((consent, index$1) => (index.h("div", { class: `checkbox__wrapper ${consent.tagCode}__input`, ref: (host) => (this[consent.tagCode] = host) }, index.h("input", { class: 'checkbox__input', type: "checkbox", checked: this.playerConsents[index$1].status === '1', id: `${consent.tagCode}__input`, onInput: this.handleInput.bind(this, index$1) }), index.h("label", { class: 'checkbox__label', htmlFor: `${consent.tagCode}__input` }, index.h("div", { class: 'checkbox__label-text', innerHTML: `${translate$1(`${consent.tagCode}__description`, this.language)} ${consent.mustAccept ? '*' : ''}` })), index.h("small", { class: 'checkbox__error-message', ref: (host) => (this[`errorMessage__${consent.tagCode}`] = host) }), index.h("div", { class: 'checkbox__wrapper--relative' }, this.tooltip &&
|
|
31235
|
+
index.h("img", { class: 'checkbox__tooltip-icon', src: tooltipIconSvg, alt: "", ref: (el) => this.tooltipIconReference = el, onClick: () => this.handleTooltipClick() }), index.h("div", { class: `checkbox__tooltip ${this.showTooltip ? 'visible' : ''}`, ref: (host) => this.tooltipReference = host, innerHTML: this.tooltip })))))));
|
|
31236
|
+
}
|
|
31237
|
+
get host() { return index.getElement(this); }
|
|
31238
|
+
static get watchers() { return {
|
|
31239
|
+
"clientStyling": ["handleStylingChange"],
|
|
31240
|
+
"clientStylingUrl": ["handleStylingUrlChange"],
|
|
31241
|
+
"translationUrl": ["handleNewTranslations"],
|
|
31242
|
+
"isValid": ["sendMessage"]
|
|
31243
|
+
}; }
|
|
31244
|
+
};
|
|
31245
|
+
GeneralConsents.style = GeneralConsentsStyle0;
|
|
31246
|
+
|
|
30947
31247
|
const generalInputCss = ":host{display:block;height:100%}";
|
|
30948
31248
|
const GeneralInputStyle0 = generalInputCss;
|
|
30949
31249
|
|
|
@@ -30976,7 +31276,7 @@ const GeneralInput = class {
|
|
|
30976
31276
|
}
|
|
30977
31277
|
connectedCallback() {
|
|
30978
31278
|
if (this.translationUrl) {
|
|
30979
|
-
getTranslations$
|
|
31279
|
+
getTranslations$2(this.translationUrl);
|
|
30980
31280
|
}
|
|
30981
31281
|
}
|
|
30982
31282
|
renderInput() {
|
|
@@ -31378,6 +31678,8 @@ const GeneralRegistration = class {
|
|
|
31378
31678
|
this.emitOnClick = false;
|
|
31379
31679
|
this.errorMessage = undefined;
|
|
31380
31680
|
this.isFormValid = undefined;
|
|
31681
|
+
this.isConsentValid = false;
|
|
31682
|
+
this.isConsentReady = false;
|
|
31381
31683
|
this.isLoading = true;
|
|
31382
31684
|
this.isLoadingPOST = undefined;
|
|
31383
31685
|
this.registrationStep = undefined;
|
|
@@ -31444,6 +31746,14 @@ const GeneralRegistration = class {
|
|
|
31444
31746
|
this.limitStylingAppends = true;
|
|
31445
31747
|
}
|
|
31446
31748
|
}
|
|
31749
|
+
messageHandler(e) {
|
|
31750
|
+
//Handle Consents Message
|
|
31751
|
+
if (e.data && e.data.type != "isConsentsValid")
|
|
31752
|
+
return;
|
|
31753
|
+
this.listOfInputValidity.find((input) => input.name === "Consents").isValid = e.data.isValid ? true : false;
|
|
31754
|
+
this.isConsentValid = e.data.isValid ? true : false;
|
|
31755
|
+
this.isFormValid = !this.getInvalidStatus(this.listOfInputValidity);
|
|
31756
|
+
}
|
|
31447
31757
|
nextHandler(e) {
|
|
31448
31758
|
e.preventDefault();
|
|
31449
31759
|
// Trigger events in subwidgets.
|
|
@@ -31540,6 +31850,7 @@ const GeneralRegistration = class {
|
|
|
31540
31850
|
}
|
|
31541
31851
|
});
|
|
31542
31852
|
}
|
|
31853
|
+
this.isConsentReady = this.listOfActions.some(action => action === '/Consents');
|
|
31543
31854
|
this.isFormValid = !this.getInvalidStatus(this.listOfInputValidity);
|
|
31544
31855
|
break;
|
|
31545
31856
|
}
|
|
@@ -31645,9 +31956,15 @@ const GeneralRegistration = class {
|
|
|
31645
31956
|
if (this.listOfActions.some(action => action == '/generate-2FA-code/Generate2FACode')) {
|
|
31646
31957
|
this.extraActions.push('2fa');
|
|
31647
31958
|
}
|
|
31959
|
+
if (localStorage.getItem('playerConsents')) {
|
|
31960
|
+
localStorage.removeItem("playerConsents");
|
|
31961
|
+
}
|
|
31648
31962
|
this.setRegister();
|
|
31649
31963
|
}
|
|
31650
31964
|
else {
|
|
31965
|
+
if (this.isConsentValid) {
|
|
31966
|
+
window.postMessage({ type: 'setUpPlayerConsents', registerid: this.registrationID });
|
|
31967
|
+
}
|
|
31651
31968
|
// After sending the current step, increment and check if the next one is in state.
|
|
31652
31969
|
this.registrationStep = this.stepChange('increment');
|
|
31653
31970
|
// If step is present in state do NOT fetch the next config.
|
|
@@ -31794,6 +32111,18 @@ const GeneralRegistration = class {
|
|
|
31794
32111
|
if (this.listOfActions.some(action => action == '/register')) {
|
|
31795
32112
|
this.lastStep = this.registrationStep;
|
|
31796
32113
|
}
|
|
32114
|
+
if (this.listOfActions.some(action => action == '/Consents')) {
|
|
32115
|
+
if (this.isConsentReady) {
|
|
32116
|
+
this.listOfInputValidity.find((input) => input.name === "Consents").isValid = false;
|
|
32117
|
+
this.isFormValid = !this.getInvalidStatus(this.listOfInputValidity);
|
|
32118
|
+
return;
|
|
32119
|
+
}
|
|
32120
|
+
this.listOfInputValidity.push({ name: 'Consents', isValid: false });
|
|
32121
|
+
this.isConsentReady = true;
|
|
32122
|
+
}
|
|
32123
|
+
else {
|
|
32124
|
+
this.isConsentReady = false;
|
|
32125
|
+
}
|
|
31797
32126
|
// The translations for fields happens here.
|
|
31798
32127
|
if (this.translationUrl) {
|
|
31799
32128
|
getTranslations(this.translationUrl).then(() => {
|
|
@@ -31879,10 +32208,13 @@ const GeneralRegistration = class {
|
|
|
31879
32208
|
? (input.inputType.toLowerCase() == 'checkboxgroup' || input.inputType.toLowerCase() == 'togglecheckbox')
|
|
31880
32209
|
? input.data.subFields
|
|
31881
32210
|
: input.data.values
|
|
31882
|
-
: [], defaultValue: input.defaultValue, autofilled: input.autofill, emitValue: this.emitValue, language: this.language, isDuplicateInput: input.isDuplicateInput, "client-styling": this.clientStyling, tooltip: input.tooltip, placeholder: input.placeholder == null ? '' : input.placeholder, dateFormat: this.dateFormat, "translation-url": this.translationUrl, emitOnClick: this.emitOnClick })), this.buttonInsideForm && this.renderButtons(), index.h("div", { class: 'registration__wrapper--flex' }, index.h("p", { class: 'registration__error-message', innerHTML: this.errorMessage })));
|
|
32211
|
+
: [], defaultValue: input.defaultValue, autofilled: input.autofill, emitValue: this.emitValue, language: this.language, isDuplicateInput: input.isDuplicateInput, "client-styling": this.clientStyling, tooltip: input.tooltip, placeholder: input.placeholder == null ? '' : input.placeholder, dateFormat: this.dateFormat, "translation-url": this.translationUrl, emitOnClick: this.emitOnClick })), this.isConsentReady && this.renderConsents(), this.buttonInsideForm && this.renderButtons(), index.h("div", { class: 'registration__wrapper--flex' }, index.h("p", { class: 'registration__error-message', innerHTML: this.errorMessage })));
|
|
31883
32212
|
});
|
|
31884
32213
|
}
|
|
31885
32214
|
;
|
|
32215
|
+
renderConsents() {
|
|
32216
|
+
return (index.h("div", { class: "consentsContainer" }, index.h("general-consents", { endpoint: this.endpoint })));
|
|
32217
|
+
}
|
|
31886
32218
|
renderButtons() {
|
|
31887
32219
|
return (index.h("div", { class: `registration__buttons-wrapper ${this.autofilled ? 'registration__buttons-wrapper--autofilled' : ''}` }, this.isLoadingPOST
|
|
31888
32220
|
&& index.h("slot", { name: 'spinner' })
|
|
@@ -32008,13 +32340,13 @@ const NumberInput = class {
|
|
|
32008
32340
|
if (this.inputReference.validity.patternMismatch) {
|
|
32009
32341
|
const errorCode = (_a = this.validation.custom.find(customValidation => customValidation.rule === 'regex')) === null || _a === void 0 ? void 0 : _a.errorKey;
|
|
32010
32342
|
const errorMessage = (_b = this.validation.custom.find(customValidation => customValidation.rule === 'regex')) === null || _b === void 0 ? void 0 : _b.errorMessage;
|
|
32011
|
-
return translate$
|
|
32343
|
+
return translate$3(`${errorCode}`, this.language) ? translate$3(`${errorCode}`, this.language) : errorMessage;
|
|
32012
32344
|
}
|
|
32013
32345
|
if (this.inputReference.validity.rangeUnderflow || this.inputReference.validity.rangeOverflow) {
|
|
32014
|
-
return translate$
|
|
32346
|
+
return translate$3('numberLengthError', this.language, { values: { min: this.validation.min, max: this.validation.max } });
|
|
32015
32347
|
}
|
|
32016
32348
|
if (this.inputReference.validity.valueMissing) {
|
|
32017
|
-
return translate$
|
|
32349
|
+
return translate$3('requiredError', this.language);
|
|
32018
32350
|
}
|
|
32019
32351
|
}
|
|
32020
32352
|
renderTooltip() {
|
|
@@ -32029,7 +32361,7 @@ const NumberInput = class {
|
|
|
32029
32361
|
invalidClass = this.isValid == true || this.isValid == undefined ? '' : 'text__input--invalid';
|
|
32030
32362
|
}
|
|
32031
32363
|
return index.h("div", { key: '2032f77ca52b330ae2e8f484d7a0aba60ee7b9d5', class: `number__wrapper ${this.autofilled ? 'number__wrapper--autofilled' : ''} ${this.name}__input`, ref: el => this.stylingContainer = el }, index.h("div", { key: '0786901cd928bba86597180f058bff43fba522b6', class: 'number__wrapper--flex' }, index.h("label", { key: 'ff7f39306cef7aeba3e0e4508df03c5a945e748b', class: `number__label ${this.validation.mandatory ? 'number__label--required' : ''}`, htmlFor: `${this.name}__input` }, this.displayName), index.h("div", { key: 'dced91223621551472fee374d56f1ad7476f4191', class: 'number__wrapper--relative' }, this.tooltip &&
|
|
32032
|
-
index.h("img", { key: 'a804a983e342e4d117126720a32c4c34a2b267dc', class: 'number__tooltip-icon', src: tooltipIconSvg, alt: "", ref: (el) => this.tooltipIconReference = el, onClick: () => this.showTooltip = !this.showTooltip }), this.renderTooltip())), index.h("input", { key: 'fd59afaedf7d9f761684b057a1809474d735cc26', 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 }), index.h("small", { key: 'ca11558b5704b69311626736ab84a298449b98d7', class: 'number__error-message' }, this.errorMessage));
|
|
32364
|
+
index.h("img", { key: 'a804a983e342e4d117126720a32c4c34a2b267dc', class: 'number__tooltip-icon', src: tooltipIconSvg$1, alt: "", ref: (el) => this.tooltipIconReference = el, onClick: () => this.showTooltip = !this.showTooltip }), this.renderTooltip())), index.h("input", { key: 'fd59afaedf7d9f761684b057a1809474d735cc26', 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 }), index.h("small", { key: 'ca11558b5704b69311626736ab84a298449b98d7', class: 'number__error-message' }, this.errorMessage));
|
|
32033
32365
|
}
|
|
32034
32366
|
static get watchers() { return {
|
|
32035
32367
|
"isValid": ["validityChanged"],
|
|
@@ -33870,23 +34202,23 @@ const PasswordInput = class {
|
|
|
33870
34202
|
setErrorMessage() {
|
|
33871
34203
|
var _a, _b, _c, _d;
|
|
33872
34204
|
if (this.isDuplicateInput && !this.originalValid) {
|
|
33873
|
-
return translate$
|
|
34205
|
+
return translate$3('invalidOriginalPasswordError', this.language);
|
|
33874
34206
|
}
|
|
33875
34207
|
if (this.inputReference.validity.patternMismatch) {
|
|
33876
34208
|
const errorCode = (_a = this.validation.custom.find(customValidation => customValidation.rule === 'regex')) === null || _a === void 0 ? void 0 : _a.errorKey;
|
|
33877
34209
|
const errorMessage = (_b = this.validation.custom.find(customValidation => customValidation.rule === 'regex')) === null || _b === void 0 ? void 0 : _b.errorMessage;
|
|
33878
|
-
return translate$
|
|
34210
|
+
return translate$3(`${errorCode}`, this.language) ? translate$3(`${errorCode}`, this.language) : errorMessage;
|
|
33879
34211
|
}
|
|
33880
34212
|
if (this.inputReference.validity.tooShort || this.inputReference.validity.tooLong) {
|
|
33881
|
-
return translate$
|
|
34213
|
+
return translate$3('lengthError', this.language, { values: { minLength: this.validation.minLength, maxLength: this.validation.maxLength } });
|
|
33882
34214
|
}
|
|
33883
34215
|
if (this.inputReference.validity.valueMissing) {
|
|
33884
|
-
return translate$
|
|
34216
|
+
return translate$3('requiredError', this.language);
|
|
33885
34217
|
}
|
|
33886
34218
|
if (this.isDuplicateInput && this.duplicateInputValue !== this.value) {
|
|
33887
34219
|
const errorCode = (_c = this.validation.custom.find(customRule => customRule.rule === 'duplicate-input')) === null || _c === void 0 ? void 0 : _c.errorKey;
|
|
33888
34220
|
const errorMessage = (_d = this.validation.custom.find(customRule => customRule.rule === 'duplicate-input')) === null || _d === void 0 ? void 0 : _d.errorMessage;
|
|
33889
|
-
return translate$
|
|
34221
|
+
return translate$3(`${errorCode}`, this.language) ? translate$3(`${errorCode}`, this.language) : errorMessage;
|
|
33890
34222
|
}
|
|
33891
34223
|
}
|
|
33892
34224
|
renderTooltip() {
|
|
@@ -33900,8 +34232,8 @@ const PasswordInput = class {
|
|
|
33900
34232
|
const passedRules = this.passwordComplexity.filter(complexity => complexity.passed).length;
|
|
33901
34233
|
const meterValue = passedRules / totalRules;
|
|
33902
34234
|
const allRulesPassed = this.passwordComplexity.every(complexity => complexity.passed);
|
|
33903
|
-
return (index.h("div", { class: `password__complexity ${!this.showPopup ? 'password__complexity--hidden' : ''}` }, index.h("div", { class: 'password__complexity--strength' }, index.h("p", { class: 'password__complexity--text' }, translate$
|
|
33904
|
-
return (index.h("div", { key: index$1 }, index.h("input", { class: 'password__complexity--checkbox', type: "checkbox", checked: complexity.passed, disabled: true }), index.h("span", null, translate$
|
|
34235
|
+
return (index.h("div", { class: `password__complexity ${!this.showPopup ? 'password__complexity--hidden' : ''}` }, index.h("div", { class: 'password__complexity--strength' }, index.h("p", { class: 'password__complexity--text' }, translate$3('passwordStrength', this.language), "\u00A0", index.h("span", { class: 'password__complexity--text-bold' }, translate$3(`${allRulesPassed ? 'passwordStrengthStrong' : 'passwordStrengthWeak'}`, this.language))), index.h("meter", { value: meterValue, min: "0", max: "1" })), index.h("div", null, this.passwordComplexity.map((complexity, index$1) => {
|
|
34236
|
+
return (index.h("div", { key: index$1 }, index.h("input", { class: 'password__complexity--checkbox', type: "checkbox", checked: complexity.passed, disabled: true }), index.h("span", null, translate$3(`${complexity.ruleKey}`, this.language) ? translate$3(`${complexity.ruleKey}`, this.language) : complexity.rule)));
|
|
33905
34237
|
}))));
|
|
33906
34238
|
}
|
|
33907
34239
|
render() {
|
|
@@ -33910,7 +34242,7 @@ const PasswordInput = class {
|
|
|
33910
34242
|
invalidClass = this.isValid == true || this.isValid == undefined ? '' : 'text__input--invalid';
|
|
33911
34243
|
}
|
|
33912
34244
|
return index.h("div", { key: '7f6a07f3c7e3aa53e1d97d674cc7a5591c33f7ce', class: `password__wrapper ${this.autofilled ? 'password__wrapper--autofilled' : ''} ${this.name}__input`, ref: el => this.stylingContainer = el }, index.h("div", { key: 'a487d206585a3eb30441509070a6ab0747b911b4', class: 'password__wrapper--flex' }, index.h("label", { key: 'e8c471fa0836cb842f529c3733491249400b534c', class: `password__label ${this.validation.mandatory ? 'password__label--required' : ''}`, htmlFor: `${this.name}__input` }, this.displayName), index.h("div", { key: '4d90f18a711b27a621ebf5043906d5f35387a7e5', class: 'password__wrapper--relative' }, this.tooltip &&
|
|
33913
|
-
index.h("img", { key: 'c44c2d9bf69b37761da9d0c5485326391627b8b4', class: 'password__tooltip-icon', src: tooltipIconSvg, alt: "", ref: (el) => this.tooltipIconReference = el, onClick: () => this.showTooltip = !this.showTooltip }), this.renderTooltip())), index.h("vaadin-password-field", { key: '582dde61d4f34b09e8894168c0d09ed5a7b571d8', 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 }), index.h("small", { key: '6fb3a91b1872805085f4d028c0760be8f6383b10', class: 'password__error-message' }, this.errorMessage), this.passwordComplexity && this.showPopup && !this.isDuplicateInput && this.renderComplexityPopup());
|
|
34245
|
+
index.h("img", { key: 'c44c2d9bf69b37761da9d0c5485326391627b8b4', class: 'password__tooltip-icon', src: tooltipIconSvg$1, alt: "", ref: (el) => this.tooltipIconReference = el, onClick: () => this.showTooltip = !this.showTooltip }), this.renderTooltip())), index.h("vaadin-password-field", { key: '582dde61d4f34b09e8894168c0d09ed5a7b571d8', 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 }), index.h("small", { key: '6fb3a91b1872805085f4d028c0760be8f6383b10', class: 'password__error-message' }, this.errorMessage), this.passwordComplexity && this.showPopup && !this.isDuplicateInput && this.renderComplexityPopup());
|
|
33914
34246
|
}
|
|
33915
34247
|
get element() { return index.getElement(this); }
|
|
33916
34248
|
static get watchers() { return {
|
|
@@ -33990,7 +34322,7 @@ const RadioInput = class {
|
|
|
33990
34322
|
}
|
|
33991
34323
|
setErrorMessage() {
|
|
33992
34324
|
if (this.inputReference.validity.valueMissing) {
|
|
33993
|
-
return translate$
|
|
34325
|
+
return translate$3('requiredError', this.language);
|
|
33994
34326
|
}
|
|
33995
34327
|
}
|
|
33996
34328
|
renderTooltip() {
|
|
@@ -34001,7 +34333,7 @@ const RadioInput = class {
|
|
|
34001
34333
|
}
|
|
34002
34334
|
render() {
|
|
34003
34335
|
return index.h("fieldset", { key: '3d90735f7dc8fef6a96dc85b8f9ba22880cb205f', class: `radio__fieldset ${this.name}__input`, ref: el => this.stylingContainer = el }, index.h("legend", { key: '9472ed76f5c7fabb90d2b3d39eeb9e18f05a30dd', class: 'radio__legend' }, this.displayName, ":"), this.optionsGroup.map(option => index.h("div", { class: 'radio__wrapper' }, index.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) }), index.h("label", { htmlFor: `${option.label}__input` }, option.label))), index.h("small", { key: '2ae0947580bb8a0a3d889a2d9ebd0b82458fdfd2', class: 'radio__error-message' }, this.errorMessage), this.tooltip &&
|
|
34004
|
-
index.h("img", { key: '4f3cbf341f1c559bbdf44ca5d169be7a64d46e97', class: 'radio__tooltip-icon', src: tooltipIconSvg, alt: "", ref: (el) => this.tooltipIconReference = el, onClick: () => this.showTooltip = !this.showTooltip }), this.renderTooltip());
|
|
34336
|
+
index.h("img", { key: '4f3cbf341f1c559bbdf44ca5d169be7a64d46e97', class: 'radio__tooltip-icon', src: tooltipIconSvg$1, alt: "", ref: (el) => this.tooltipIconReference = el, onClick: () => this.showTooltip = !this.showTooltip }), this.renderTooltip());
|
|
34005
34337
|
}
|
|
34006
34338
|
static get watchers() { return {
|
|
34007
34339
|
"isValid": ["validityChanged"],
|
|
@@ -38954,7 +39286,7 @@ const SelectInput = class {
|
|
|
38954
39286
|
}
|
|
38955
39287
|
setErrorMessage() {
|
|
38956
39288
|
if (this.inputReference.validity.valueMissing) {
|
|
38957
|
-
return translate$
|
|
39289
|
+
return translate$3('requiredError', this.language);
|
|
38958
39290
|
}
|
|
38959
39291
|
}
|
|
38960
39292
|
renderTooltip() {
|
|
@@ -38969,7 +39301,7 @@ const SelectInput = class {
|
|
|
38969
39301
|
invalidClass = this.isValid == true || this.isValid == undefined ? '' : 'text__input--invalid';
|
|
38970
39302
|
}
|
|
38971
39303
|
return index.h("div", { key: 'c235991f572ea3f8659f66d660fd1fb41b0094ad', class: `select__wrapper ${this.autofilled ? 'select__wrapper--autofilled' : ''} ${this.name}__input`, ref: el => this.stylingContainer = el }, index.h("div", { key: '50931d2e1345bb8337820409a6aff2eee4d33cd5', class: 'select__wrapper--flex' }, index.h("label", { key: '28a05e2a88132fb8ad279ec0fbc0d49253d3ffbc', class: 'select__label', htmlFor: `${this.name}__input` }, `${this.displayName} ${this.validation.mandatory ? '*' : ''}`), index.h("div", { key: '1d53254871214080c3f1d25c73380a9b9df19aab', class: 'select__wrapper--relative' }, this.tooltip &&
|
|
38972
|
-
index.h("img", { key: '020465f83dd9a03a37b223521bfce37a66df818d', class: 'select__tooltip-icon', src: tooltipIconSvg, alt: "", ref: (el) => this.tooltipIconReference = el, onClick: () => this.showTooltip = !this.showTooltip }), this.renderTooltip())), index.h("vaadin-combo-box", { key: 'bbf7aff9102f6c849c84ff7cb390ed57e5b992b2', name: this.name, id: `${this.name}__input`, class: `select__input ${invalidClass} ${this.autofilled ? 'select__input--autofilled' : ''}`, "item-label-path": "label", "item-value-path": "value", readOnly: this.autofilled, required: this.validation.mandatory, value: this.defaultValue, placeholder: `${this.placeholder}`, items: this.displayedOptions, onChange: this.handleChange }), index.h("small", { key: '4cda22e9fdccb3960107a661fa24649946d6bb14', class: 'select__error-message' }, this.errorMessage));
|
|
39304
|
+
index.h("img", { key: '020465f83dd9a03a37b223521bfce37a66df818d', class: 'select__tooltip-icon', src: tooltipIconSvg$1, alt: "", ref: (el) => this.tooltipIconReference = el, onClick: () => this.showTooltip = !this.showTooltip }), this.renderTooltip())), index.h("vaadin-combo-box", { key: 'bbf7aff9102f6c849c84ff7cb390ed57e5b992b2', name: this.name, id: `${this.name}__input`, class: `select__input ${invalidClass} ${this.autofilled ? 'select__input--autofilled' : ''}`, "item-label-path": "label", "item-value-path": "value", readOnly: this.autofilled, required: this.validation.mandatory, value: this.defaultValue, placeholder: `${this.placeholder}`, items: this.displayedOptions, onChange: this.handleChange }), index.h("small", { key: '4cda22e9fdccb3960107a661fa24649946d6bb14', class: 'select__error-message' }, this.errorMessage));
|
|
38973
39305
|
}
|
|
38974
39306
|
get element() { return index.getElement(this); }
|
|
38975
39307
|
static get watchers() { return {
|
|
@@ -39119,13 +39451,13 @@ const TelInput = class {
|
|
|
39119
39451
|
if (this.inputReference.validity.patternMismatch) {
|
|
39120
39452
|
const errorCode = (_a = this.validation.custom.find(customValidation => customValidation.rule === 'regex')) === null || _a === void 0 ? void 0 : _a.errorKey;
|
|
39121
39453
|
const errorMessage = (_b = this.validation.custom.find(customValidation => customValidation.rule === 'regex')) === null || _b === void 0 ? void 0 : _b.errorMessage;
|
|
39122
|
-
return translate$
|
|
39454
|
+
return translate$3(`${errorCode}`, this.language) ? translate$3(`${errorCode}`, this.language) : errorMessage;
|
|
39123
39455
|
}
|
|
39124
39456
|
if (this.inputReference.validity.tooShort || this.inputReference.validity.tooLong) {
|
|
39125
|
-
return translate$
|
|
39457
|
+
return translate$3('lengthError', this.language, { values: { minLength: this.validation.minLength, maxLength: this.validation.maxLength } });
|
|
39126
39458
|
}
|
|
39127
39459
|
if (this.inputReference.validity.valueMissing) {
|
|
39128
|
-
return translate$
|
|
39460
|
+
return translate$3('requiredError', this.language);
|
|
39129
39461
|
}
|
|
39130
39462
|
}
|
|
39131
39463
|
renderTooltip() {
|
|
@@ -39140,7 +39472,7 @@ const TelInput = class {
|
|
|
39140
39472
|
invalidClass = this.isValid == true || this.isValid == undefined ? '' : 'text__input--invalid';
|
|
39141
39473
|
}
|
|
39142
39474
|
return index.h("div", { key: '5febd36c339710683111039d477196daac87853c', class: `tel__wrapper ${this.autofilled ? 'tel__wrapper--autofilled' : ''} ${this.name}__input`, ref: el => this.stylingContainer = el }, index.h("div", { key: 'fb779beee03992b23478ffcaac85095420048ceb', class: 'tel__wrapper--flex-label' }, index.h("label", { key: '5b69271c1c8bf403a003d765adb40a553e09466e', class: `tel__label ${this.validation.mandatory ? 'tel__label--required' : ''}`, htmlFor: `${this.name}__input` }, this.displayName), index.h("div", { key: '040c487308231459fc92eba2e643a80639df09d6', class: 'tel__wrapper--relative' }, this.tooltip &&
|
|
39143
|
-
index.h("img", { key: '91efd4656c718c75e5047413daf10c22c37e8f93', class: 'tel__tooltip-icon', src: tooltipIconSvg, alt: "", ref: (el) => this.tooltipIconReference = el, onClick: () => this.showTooltip = !this.showTooltip }), this.renderTooltip())), index.h("div", { key: '6215f80b6bccb3dfb03dbbc485c850725633627c', class: `tel__wrapper--flex ${invalidClass}` }, index.h("vaadin-combo-box", { key: '3b7b1ef3415619c51d74f5fc7c5e034acb8f037f', class: 'tel__prefix', items: this.phoneCodesOptions, value: this.prefixValue, readOnly: this.autofilled, onChange: (e) => this.handlePrefixInput(e) }), index.h("input", { key: '886553206896c367ba96f015d81b44ea86f741ea', type: "tel", ref: (el) => this.inputReference = el, id: `${this.name}__input`, readOnly: this.autofilled, class: `tel__input`, value: this.phoneValue, placeholder: `${this.placeholder}`, required: this.validation.mandatory, minlength: this.validation.minLength, maxlength: this.validation.maxLength, pattern: this.validationPattern, onInput: this.handleInput, onBlur: this.handleBlur })), index.h("small", { key: 'd4c88d386c3342c789527d925e9cd061494b785c', class: 'tel__error-message' }, this.errorMessage));
|
|
39475
|
+
index.h("img", { key: '91efd4656c718c75e5047413daf10c22c37e8f93', class: 'tel__tooltip-icon', src: tooltipIconSvg$1, alt: "", ref: (el) => this.tooltipIconReference = el, onClick: () => this.showTooltip = !this.showTooltip }), this.renderTooltip())), index.h("div", { key: '6215f80b6bccb3dfb03dbbc485c850725633627c', class: `tel__wrapper--flex ${invalidClass}` }, index.h("vaadin-combo-box", { key: '3b7b1ef3415619c51d74f5fc7c5e034acb8f037f', class: 'tel__prefix', items: this.phoneCodesOptions, value: this.prefixValue, readOnly: this.autofilled, onChange: (e) => this.handlePrefixInput(e) }), index.h("input", { key: '886553206896c367ba96f015d81b44ea86f741ea', type: "tel", ref: (el) => this.inputReference = el, id: `${this.name}__input`, readOnly: this.autofilled, class: `tel__input`, value: this.phoneValue, placeholder: `${this.placeholder}`, required: this.validation.mandatory, minlength: this.validation.minLength, maxlength: this.validation.maxLength, pattern: this.validationPattern, onInput: this.handleInput, onBlur: this.handleBlur })), index.h("small", { key: 'd4c88d386c3342c789527d925e9cd061494b785c', class: 'tel__error-message' }, this.errorMessage));
|
|
39144
39476
|
}
|
|
39145
39477
|
static get watchers() { return {
|
|
39146
39478
|
"isValid": ["validityChanged"],
|
|
@@ -39283,18 +39615,18 @@ const TextInput = class {
|
|
|
39283
39615
|
if (this.inputReference.validity.patternMismatch) {
|
|
39284
39616
|
const errorCode = (_a = this.validation.custom.find(customValidation => customValidation.rule === 'regex')) === null || _a === void 0 ? void 0 : _a.errorKey;
|
|
39285
39617
|
const errorMessage = (_b = this.validation.custom.find(customValidation => customValidation.rule === 'regex')) === null || _b === void 0 ? void 0 : _b.errorMessage;
|
|
39286
|
-
return translate$
|
|
39618
|
+
return translate$3(`${errorCode}`, this.language) ? translate$3(`${errorCode}`, this.language) : errorMessage;
|
|
39287
39619
|
}
|
|
39288
39620
|
if (this.inputReference.validity.tooShort || this.inputReference.validity.tooLong) {
|
|
39289
|
-
return translate$
|
|
39621
|
+
return translate$3('lengthError', this.language, { values: { minLength: this.validation.minLength, maxLength: this.validation.maxLength } });
|
|
39290
39622
|
}
|
|
39291
39623
|
if (this.inputReference.validity.valueMissing) {
|
|
39292
|
-
return translate$
|
|
39624
|
+
return translate$3('requiredError', this.language);
|
|
39293
39625
|
}
|
|
39294
39626
|
if (this.isDuplicateInput && this.duplicateInputValue !== this.value) {
|
|
39295
39627
|
const errorCode = (_c = this.validation.custom.find(customRule => customRule.rule === 'duplicate-input')) === null || _c === void 0 ? void 0 : _c.errorKey;
|
|
39296
39628
|
const errorMessage = (_d = this.validation.custom.find(customRule => customRule.rule === 'duplicate-input')) === null || _d === void 0 ? void 0 : _d.errorMessage;
|
|
39297
|
-
return translate$
|
|
39629
|
+
return translate$3(`${errorCode}`, this.language) ? translate$3(`${errorCode}`, this.language) : errorMessage;
|
|
39298
39630
|
}
|
|
39299
39631
|
}
|
|
39300
39632
|
renderTooltip() {
|
|
@@ -39309,7 +39641,7 @@ const TextInput = class {
|
|
|
39309
39641
|
invalidClass = this.isValid == true || this.isValid == undefined ? '' : 'text__input--invalid';
|
|
39310
39642
|
}
|
|
39311
39643
|
return index.h("div", { key: 'bfb803110a70b89dd484e993c204b572f0115a17', class: `text__wrapper ${this.name}__input ${this.autofilled ? 'text__wrapper--autofilled' : ''}`, ref: el => this.stylingContainer = el }, index.h("div", { key: '6e9f8f5aada98821d5dc78ccb8b1431ba23b81ab', class: 'text__wrapper--flex' }, index.h("label", { key: '05cf07855121a79641475a5b020774cf8120d1ed', class: `text__label ${this.validation.mandatory ? 'text__label--required' : ''}`, htmlFor: `${this.name}__input` }, this.displayName), index.h("div", { key: 'f8c48a999f6827a61ec392ce99858c19559c77d2', class: 'text__wrapper--relative' }, this.tooltip &&
|
|
39312
|
-
index.h("img", { key: 'e866f1df104ce57c29164e73b4ad4d017c7201cd', class: 'text__tooltip-icon', src: tooltipIconSvg, alt: "", ref: (el) => this.tooltipIconReference = el, onClick: () => this.showTooltip = !this.showTooltip }), this.renderTooltip())), index.h("input", { key: 'd761c265b1487fe73af54568b6da7fed82656b8d', name: this.name, id: `${this.name}__input`, value: this.defaultValue, type: 'text', class: `text__input ${invalidClass}`, placeholder: `${this.placeholder}`, ref: (el) => this.inputReference = el, readOnly: this.autofilled, pattern: this.validationPattern, required: this.validation.mandatory, minlength: this.validation.minLength, maxlength: this.validation.maxLength, onInput: this.handleInput, onBlur: this.handleBlur }), index.h("small", { key: '5c8df34dd47959eb1668cdf389524d145c69fa84', class: 'text__error-message' }, this.errorMessage));
|
|
39644
|
+
index.h("img", { key: 'e866f1df104ce57c29164e73b4ad4d017c7201cd', class: 'text__tooltip-icon', src: tooltipIconSvg$1, alt: "", ref: (el) => this.tooltipIconReference = el, onClick: () => this.showTooltip = !this.showTooltip }), this.renderTooltip())), index.h("input", { key: 'd761c265b1487fe73af54568b6da7fed82656b8d', name: this.name, id: `${this.name}__input`, value: this.defaultValue, type: 'text', class: `text__input ${invalidClass}`, placeholder: `${this.placeholder}`, ref: (el) => this.inputReference = el, readOnly: this.autofilled, pattern: this.validationPattern, required: this.validation.mandatory, minlength: this.validation.minLength, maxlength: this.validation.maxLength, onInput: this.handleInput, onBlur: this.handleBlur }), index.h("small", { key: '5c8df34dd47959eb1668cdf389524d145c69fa84', class: 'text__error-message' }, this.errorMessage));
|
|
39313
39645
|
}
|
|
39314
39646
|
static get watchers() { return {
|
|
39315
39647
|
"isValid": ["validityChanged"],
|
|
@@ -39380,7 +39712,7 @@ const ToggleCheckboxInput = class {
|
|
|
39380
39712
|
}
|
|
39381
39713
|
setErrorMessage() {
|
|
39382
39714
|
if (this.checkboxReference.validity.valueMissing) {
|
|
39383
|
-
return translate$
|
|
39715
|
+
return translate$3('requiredError', this.language);
|
|
39384
39716
|
}
|
|
39385
39717
|
}
|
|
39386
39718
|
renderLabel() {
|
|
@@ -39394,7 +39726,7 @@ const ToggleCheckboxInput = class {
|
|
|
39394
39726
|
}
|
|
39395
39727
|
render() {
|
|
39396
39728
|
return index.h("div", { key: '8c8e9bb2ae7feadf3a5fc38b9913e38d7ccb9aed', class: `togglecheckbox__wrapper ${this.name}__input`, ref: el => this.stylingContainer = el }, index.h("div", { key: '18e2ec43ff98738323ddab1e134d6d215978e1c7', class: 'togglecheckbox__wrapper--flex' }, index.h("input", { key: '640b3ba4fd34bd813239533236e51f452e735409', 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()), index.h("small", { key: 'efd70a691559cfa98e93561dd945a0fe92909718', class: 'togglecheckbox__error-message' }, this.errorMessage), index.h("div", { key: 'e56a8fafa17da25d01f894fe6e6c143c318d2aab', class: 'togglecheckbox__wrapper--relative' }, this.tooltip &&
|
|
39397
|
-
index.h("img", { key: '8b59366827b8f4f8ca5581203a2dca44ae8132d5', class: 'togglecheckbox__tooltip-icon', src: tooltipIconSvg, alt: "", ref: (el) => this.tooltipIconReference = el, onClick: () => this.showTooltip = !this.showTooltip }), this.renderTooltip()), index.h("div", { key: '475e27345b51396c36e78b5a1e06edd980bc3ae1', class: `togglecheckbox__fields-wrapper ${this.showFields ? '' : 'hidden'}` }, this.options.map(subfield => {
|
|
39729
|
+
index.h("img", { key: '8b59366827b8f4f8ca5581203a2dca44ae8132d5', class: 'togglecheckbox__tooltip-icon', src: tooltipIconSvg$1, alt: "", ref: (el) => this.tooltipIconReference = el, onClick: () => this.showTooltip = !this.showTooltip }), this.renderTooltip()), index.h("div", { key: '475e27345b51396c36e78b5a1e06edd980bc3ae1', class: `togglecheckbox__fields-wrapper ${this.showFields ? '' : 'hidden'}` }, this.options.map(subfield => {
|
|
39398
39730
|
return index.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 });
|
|
39399
39731
|
})));
|
|
39400
39732
|
}
|
|
@@ -39405,6 +39737,7 @@ exports.checkbox_group_input = CheckboxGroupInput;
|
|
|
39405
39737
|
exports.checkbox_input = CheckboxInput;
|
|
39406
39738
|
exports.date_input = DateInput;
|
|
39407
39739
|
exports.email_input = EmailInput;
|
|
39740
|
+
exports.general_consents = GeneralConsents;
|
|
39408
39741
|
exports.general_input = GeneralInput;
|
|
39409
39742
|
exports.general_registration = GeneralRegistration;
|
|
39410
39743
|
exports.number_input = NumberInput;
|