@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
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { r as registerInstance, c as createEvent, h as h$2, g as getElement, H as Host } from './index-
|
|
1
|
+
import { r as registerInstance, c as createEvent, h as h$2, g as getElement, H as Host } from './index-613144f0.js';
|
|
2
2
|
|
|
3
|
-
const DEFAULT_LANGUAGE$
|
|
4
|
-
const TRANSLATIONS$
|
|
3
|
+
const DEFAULT_LANGUAGE$2 = 'en';
|
|
4
|
+
const TRANSLATIONS$2 = {
|
|
5
5
|
"en": {
|
|
6
6
|
"dateError": "The selected date should be between {min} and {max}",
|
|
7
7
|
"dateError2": "The selected date is not within the accepted range",
|
|
@@ -116,9 +116,9 @@ const TRANSLATIONS$1 = {
|
|
|
116
116
|
"OnlyNumbers": "Solo debe contener números"
|
|
117
117
|
}
|
|
118
118
|
};
|
|
119
|
-
const translate$
|
|
119
|
+
const translate$3 = (key, customLang, values) => {
|
|
120
120
|
const lang = customLang;
|
|
121
|
-
let translation = TRANSLATIONS$
|
|
121
|
+
let translation = TRANSLATIONS$2[lang !== undefined ? lang : DEFAULT_LANGUAGE$2][key];
|
|
122
122
|
if (values !== undefined) {
|
|
123
123
|
for (const [key, value] of Object.entries(values.values)) {
|
|
124
124
|
const regex = new RegExp(`{${key}}`, 'g');
|
|
@@ -127,7 +127,7 @@ const translate$2 = (key, customLang, values) => {
|
|
|
127
127
|
}
|
|
128
128
|
return translation;
|
|
129
129
|
};
|
|
130
|
-
const getTranslations$
|
|
130
|
+
const getTranslations$2 = (url) => {
|
|
131
131
|
// fetch url, get the data, replace the TRANSLATIONS content
|
|
132
132
|
return new Promise((resolve) => {
|
|
133
133
|
fetch(url)
|
|
@@ -135,7 +135,7 @@ const getTranslations$1 = (url) => {
|
|
|
135
135
|
.then((data) => {
|
|
136
136
|
Object.keys(data).forEach((item) => {
|
|
137
137
|
for (let key in data[item]) {
|
|
138
|
-
TRANSLATIONS$
|
|
138
|
+
TRANSLATIONS$2[item][key] = data[item][key];
|
|
139
139
|
}
|
|
140
140
|
});
|
|
141
141
|
resolve(true);
|
|
@@ -143,7 +143,7 @@ const getTranslations$1 = (url) => {
|
|
|
143
143
|
});
|
|
144
144
|
};
|
|
145
145
|
|
|
146
|
-
const tooltipIconSvg = 'data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTIiIGhlaWdodD0iMTIiIHZpZXdCb3g9IjAgMCAxMiAxMiIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KPGNpcmNsZSBjeD0iNiIgY3k9IjYiIHI9IjUuNSIgc3Ryb2tlPSIjOTc5Nzk3Ii8+CjxyZWN0IHg9IjUiIHk9IjUiIHdpZHRoPSIyIiBoZWlnaHQ9IjUiIGZpbGw9IiM5Nzk3OTciLz4KPGNpcmNsZSBjeD0iNiIgY3k9IjMiIHI9IjEiIGZpbGw9IiM5Nzk3OTciLz4KPC9zdmc+Cg==';
|
|
146
|
+
const tooltipIconSvg$1 = 'data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTIiIGhlaWdodD0iMTIiIHZpZXdCb3g9IjAgMCAxMiAxMiIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KPGNpcmNsZSBjeD0iNiIgY3k9IjYiIHI9IjUuNSIgc3Ryb2tlPSIjOTc5Nzk3Ii8+CjxyZWN0IHg9IjUiIHk9IjUiIHdpZHRoPSIyIiBoZWlnaHQ9IjUiIGZpbGw9IiM5Nzk3OTciLz4KPGNpcmNsZSBjeD0iNiIgY3k9IjMiIHI9IjEiIGZpbGw9IiM5Nzk3OTciLz4KPC9zdmc+Cg==';
|
|
147
147
|
|
|
148
148
|
/**
|
|
149
149
|
* @license
|
|
@@ -1968,7 +1968,7 @@ function isDescendant(base, path) {
|
|
|
1968
1968
|
* @param {string} path Path to translate
|
|
1969
1969
|
* @return {string} Translated string
|
|
1970
1970
|
*/
|
|
1971
|
-
function translate$
|
|
1971
|
+
function translate$2(base, newBase, path) {
|
|
1972
1972
|
return newBase + path.slice(base.length);
|
|
1973
1973
|
}
|
|
1974
1974
|
|
|
@@ -4169,7 +4169,7 @@ function handleNotification(event, inst, fromProp, toPath, negate) {
|
|
|
4169
4169
|
let detail = /** @type {Object} */(event.detail);
|
|
4170
4170
|
let fromPath = detail && detail.path;
|
|
4171
4171
|
if (fromPath) {
|
|
4172
|
-
toPath = translate$
|
|
4172
|
+
toPath = translate$2(fromProp, toPath, fromPath);
|
|
4173
4173
|
value = detail && detail.value;
|
|
4174
4174
|
} else {
|
|
4175
4175
|
value = event.currentTarget[fromProp];
|
|
@@ -4455,10 +4455,10 @@ function computeLinkedPaths(inst, path, value) {
|
|
|
4455
4455
|
for (let a in links) {
|
|
4456
4456
|
let b = links[a];
|
|
4457
4457
|
if (isDescendant(a, path)) {
|
|
4458
|
-
link = translate$
|
|
4458
|
+
link = translate$2(a, b, path);
|
|
4459
4459
|
inst._setPendingPropertyOrPath(link, value, true, true);
|
|
4460
4460
|
} else if (isDescendant(b, path)) {
|
|
4461
|
-
link = translate$
|
|
4461
|
+
link = translate$2(b, a, path);
|
|
4462
4462
|
inst._setPendingPropertyOrPath(link, value, true, true);
|
|
4463
4463
|
}
|
|
4464
4464
|
}
|
|
@@ -4570,7 +4570,7 @@ function runBindingEffect(inst, path, props, oldProps, info, hasPaths, nodeList)
|
|
|
4570
4570
|
node.__isPropertyEffectsClient &&
|
|
4571
4571
|
node.__dataHasAccessor && node.__dataHasAccessor[binding.target]) {
|
|
4572
4572
|
let value = props[path];
|
|
4573
|
-
path = translate$
|
|
4573
|
+
path = translate$2(part.source, binding.target, path);
|
|
4574
4574
|
if (node._setPendingPropertyOrPath(path, value, false, true)) {
|
|
4575
4575
|
inst._enqueueClient(node);
|
|
4576
4576
|
}
|
|
@@ -14557,7 +14557,7 @@ const CheckboxGroupInput = class {
|
|
|
14557
14557
|
}
|
|
14558
14558
|
setErrorMessage() {
|
|
14559
14559
|
if (this.inputReference.validity.valueMissing) {
|
|
14560
|
-
return translate$
|
|
14560
|
+
return translate$3('requiredError', this.language);
|
|
14561
14561
|
}
|
|
14562
14562
|
}
|
|
14563
14563
|
renderTooltip() {
|
|
@@ -14577,7 +14577,7 @@ const CheckboxGroupInput = class {
|
|
|
14577
14577
|
}
|
|
14578
14578
|
render() {
|
|
14579
14579
|
return h$2("div", { key: 'fa45026502fd8d46aa537aee03210ad68d30e577', class: `checkboxgroup__wrapper ${this.name}__input`, ref: el => this.stylingContainer = el }, h$2("div", { key: '15ded4fd896920c6244806e49f300c124c27186d', class: 'checkboxgroup__wrapper--flex' }, h$2("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 &&
|
|
14580
|
-
h$2("img", { key: 'aca39ed398415a6e2cef861be40dad33e0398759', class: 'checkboxgroup__tooltip-icon', src: tooltipIconSvg, alt: "", ref: (el) => this.tooltipIconReference = el, onClick: () => this.showTooltip = !this.showTooltip }), this.renderTooltip()), h$2("small", { key: 'a1a6e1c3c02edcca572b8826ffba06835ca451c3', class: 'checkboxgroup__error-message' }, this.errorMessage), h$2("vaadin-checkbox-group", { key: '9f5f8a945e4ba13d7d0da6d362c15d00a7796b71', theme: "vertical", value: this.selectedValues, "on-value-changed": (event) => {
|
|
14580
|
+
h$2("img", { key: 'aca39ed398415a6e2cef861be40dad33e0398759', class: 'checkboxgroup__tooltip-icon', src: tooltipIconSvg$1, alt: "", ref: (el) => this.tooltipIconReference = el, onClick: () => this.showTooltip = !this.showTooltip }), this.renderTooltip()), h$2("small", { key: 'a1a6e1c3c02edcca572b8826ffba06835ca451c3', class: 'checkboxgroup__error-message' }, this.errorMessage), h$2("vaadin-checkbox-group", { key: '9f5f8a945e4ba13d7d0da6d362c15d00a7796b71', theme: "vertical", value: this.selectedValues, "on-value-changed": (event) => {
|
|
14581
14581
|
this.selectedValues = event.detail.value;
|
|
14582
14582
|
} }, this.options.map((checkbox) => h$2("vaadin-checkbox", { class: 'checkbox__input', name: checkbox.name, value: checkbox.name, label: checkbox.displayName }))));
|
|
14583
14583
|
}
|
|
@@ -14667,7 +14667,7 @@ const CheckboxInput = class {
|
|
|
14667
14667
|
}
|
|
14668
14668
|
setErrorMessage() {
|
|
14669
14669
|
if (this.inputReference.validity.valueMissing) {
|
|
14670
|
-
return translate$
|
|
14670
|
+
return translate$3('requiredError', this.language);
|
|
14671
14671
|
}
|
|
14672
14672
|
}
|
|
14673
14673
|
renderLabel() {
|
|
@@ -14681,7 +14681,7 @@ const CheckboxInput = class {
|
|
|
14681
14681
|
}
|
|
14682
14682
|
render() {
|
|
14683
14683
|
return h$2("div", { key: '0aae00d291d1da02adae1bc91e79ccd579aa5c7f', class: `checkbox__wrapper ${this.name}__input`, ref: el => this.stylingContainer = el }, h$2("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(), h$2("small", { key: '934263cb58a0d379e8b7dc1f5004ad7e61c63ce0', class: 'checkbox__error-message' }, this.errorMessage), h$2("div", { key: '88cc71329d88b6325d792226e64ff7f93e940178', class: 'checkbox__wrapper--relative' }, this.tooltip &&
|
|
14684
|
-
h$2("img", { key: '3708dc613dc920bac6557f2a8020bbafd97d9127', class: 'checkbox__tooltip-icon', src: tooltipIconSvg, alt: "", ref: (el) => this.tooltipIconReference = el, onClick: () => this.showTooltip = !this.showTooltip }), this.renderTooltip()));
|
|
14684
|
+
h$2("img", { key: '3708dc613dc920bac6557f2a8020bbafd97d9127', class: 'checkbox__tooltip-icon', src: tooltipIconSvg$1, alt: "", ref: (el) => this.tooltipIconReference = el, onClick: () => this.showTooltip = !this.showTooltip }), this.renderTooltip()));
|
|
14685
14685
|
}
|
|
14686
14686
|
static get watchers() { return {
|
|
14687
14687
|
"isValid": ["validityChanged"],
|
|
@@ -21238,7 +21238,7 @@ class DomRepeat extends domRepeatBase {
|
|
|
21238
21238
|
if (prop == this.as) {
|
|
21239
21239
|
this.items[idx] = value;
|
|
21240
21240
|
}
|
|
21241
|
-
let path = translate$
|
|
21241
|
+
let path = translate$2(this.as, `${JSCompiler_renameProperty('items', this)}.${idx}`, prop);
|
|
21242
21242
|
this.notifyPath(path, value);
|
|
21243
21243
|
}
|
|
21244
21244
|
}
|
|
@@ -30763,13 +30763,13 @@ const DateInput = class {
|
|
|
30763
30763
|
}
|
|
30764
30764
|
setErrorMessage() {
|
|
30765
30765
|
if (isBefore(this.valueAsDate, this.minDate) || isAfter(this.valueAsDate, this.maxDate)) {
|
|
30766
|
-
return translate$
|
|
30766
|
+
return translate$3('dateError2', this.language);
|
|
30767
30767
|
}
|
|
30768
30768
|
if (this.inputReference.validity.rangeUnderflow || this.inputReference.validity.rangeOverflow) {
|
|
30769
|
-
return translate$
|
|
30769
|
+
return translate$3('dateError', this.language, { values: { min: this.validation.min, max: this.validation.max } });
|
|
30770
30770
|
}
|
|
30771
30771
|
if (this.inputReference.validity.valueMissing) {
|
|
30772
|
-
return translate$
|
|
30772
|
+
return translate$3('requiredError', this.language);
|
|
30773
30773
|
}
|
|
30774
30774
|
}
|
|
30775
30775
|
renderTooltip() {
|
|
@@ -30784,7 +30784,7 @@ const DateInput = class {
|
|
|
30784
30784
|
invalidClass = this.isValid == true || this.isValid == undefined ? '' : 'text__input--invalid';
|
|
30785
30785
|
}
|
|
30786
30786
|
return h$2("div", { key: 'fc9cd0a618c7b6e62962c0800399a470fffa1fc4', class: `date__wrapper ${this.autofilled ? 'date__wrapper--autofilled' : ''} ${this.name}__input`, ref: el => this.stylingContainer = el }, h$2("label", { key: 'abc7c1715dd2d0c60dd2ac6d028355de910be501', class: `date__label ${this.validation.mandatory ? 'date__label--required' : ''}}`, htmlFor: `${this.name}__input` }, this.displayName, " ", this.validation.mandatory ? '*' : ''), h$2("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 }), h$2("small", { key: 'd802ea7b25a64802aca3a7491107fcee7af2a23c', class: 'date__error-message' }, this.errorMessage), this.tooltip &&
|
|
30787
|
-
h$2("img", { key: '46edd200a9ce9eba27414a6434c6b3d5e9dc9964', class: 'date__tooltip-icon', src: tooltipIconSvg, alt: "", ref: (el) => this.tooltipIconReference = el, onClick: () => this.showTooltip = !this.showTooltip }), this.renderTooltip());
|
|
30787
|
+
h$2("img", { key: '46edd200a9ce9eba27414a6434c6b3d5e9dc9964', class: 'date__tooltip-icon', src: tooltipIconSvg$1, alt: "", ref: (el) => this.tooltipIconReference = el, onClick: () => this.showTooltip = !this.showTooltip }), this.renderTooltip());
|
|
30788
30788
|
}
|
|
30789
30789
|
get element() { return getElement(this); }
|
|
30790
30790
|
static get watchers() { return {
|
|
@@ -30905,18 +30905,18 @@ const EmailInput = class {
|
|
|
30905
30905
|
if (this.inputReference.validity.patternMismatch) {
|
|
30906
30906
|
const errorCode = (_a = this.validation.custom.find(customValidation => customValidation.rule === 'regex')) === null || _a === void 0 ? void 0 : _a.errorKey;
|
|
30907
30907
|
const errorMessage = (_b = this.validation.custom.find(customValidation => customValidation.rule === 'regex')) === null || _b === void 0 ? void 0 : _b.errorMessage;
|
|
30908
|
-
return translate$
|
|
30908
|
+
return translate$3(`${errorCode}`, this.language) ? translate$3(`${errorCode}`, this.language) : errorMessage;
|
|
30909
30909
|
}
|
|
30910
30910
|
if (this.inputReference.validity.tooShort || this.inputReference.validity.tooLong) {
|
|
30911
|
-
return translate$
|
|
30911
|
+
return translate$3('lengthError', this.language, { values: { minLength: this.validation.minLength, maxLength: this.validation.maxLength } });
|
|
30912
30912
|
}
|
|
30913
30913
|
if (this.inputReference.validity.valueMissing) {
|
|
30914
|
-
return translate$
|
|
30914
|
+
return translate$3('requiredError', this.language);
|
|
30915
30915
|
}
|
|
30916
30916
|
if (this.isDuplicateInput && this.duplicateInputValue !== this.value) {
|
|
30917
30917
|
const errorCode = (_c = this.validation.custom.find(customRule => customRule.rule === 'duplicate-input')) === null || _c === void 0 ? void 0 : _c.errorKey;
|
|
30918
30918
|
const errorMessage = (_d = this.validation.custom.find(customRule => customRule.rule === 'duplicate-input')) === null || _d === void 0 ? void 0 : _d.errorMessage;
|
|
30919
|
-
return translate$
|
|
30919
|
+
return translate$3(`${errorCode}`, this.language) ? translate$3(`${errorCode}`, this.language) : errorMessage;
|
|
30920
30920
|
}
|
|
30921
30921
|
}
|
|
30922
30922
|
renderTooltip() {
|
|
@@ -30931,7 +30931,7 @@ const EmailInput = class {
|
|
|
30931
30931
|
invalidClass = this.isValid == true || this.isValid == undefined ? '' : 'text__input--invalid';
|
|
30932
30932
|
}
|
|
30933
30933
|
return h$2("div", { key: '23ac67984ab7a0f4db01e5fe01f4f326b4c6a912', class: `email__wrapper ${this.autofilled ? 'number__wrapper--autofilled' : ''} ${this.name}__input`, ref: el => this.stylingContainer = el }, h$2("div", { key: 'aa2405e435aea20f1678dd74776a8ce4094bc95b', class: 'email__wrapper--flex' }, h$2("label", { key: '970b83bbcf082d1721c1647993fecd076939b65d', class: `email__label ${this.validation.mandatory ? 'email__label--required' : ''}`, htmlFor: `${this.name}__input` }, this.displayName), h$2("div", { key: '2f03eaf161aab9b45282c1bc0de15bea8455427c', class: 'email__wrapper--relative' }, this.tooltip &&
|
|
30934
|
-
h$2("img", { key: '3c34b91f0b478cf04f5aabc5fdd33a8ed73d091b', class: 'email__tooltip-icon', src: tooltipIconSvg, alt: "", ref: (el) => this.tooltipIconReference = el, onClick: () => this.showTooltip = !this.showTooltip }), this.renderTooltip())), h$2("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 }), h$2("small", { key: 'edb6660d958cc5d0cb41b0db195bd7e847ecbefe', class: 'email__error-message' }, this.errorMessage));
|
|
30934
|
+
h$2("img", { key: '3c34b91f0b478cf04f5aabc5fdd33a8ed73d091b', class: 'email__tooltip-icon', src: tooltipIconSvg$1, alt: "", ref: (el) => this.tooltipIconReference = el, onClick: () => this.showTooltip = !this.showTooltip }), this.renderTooltip())), h$2("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 }), h$2("small", { key: 'edb6660d958cc5d0cb41b0db195bd7e847ecbefe', class: 'email__error-message' }, this.errorMessage));
|
|
30935
30935
|
}
|
|
30936
30936
|
static get watchers() { return {
|
|
30937
30937
|
"isValid": ["validityChanged"],
|
|
@@ -30940,6 +30940,306 @@ const EmailInput = class {
|
|
|
30940
30940
|
};
|
|
30941
30941
|
EmailInput.style = EmailInputStyle0;
|
|
30942
30942
|
|
|
30943
|
+
const DEFAULT_LANGUAGE$1 = 'en';
|
|
30944
|
+
const TRANSLATIONS$1 = {
|
|
30945
|
+
"en": {
|
|
30946
|
+
"termsandconditions__description": "Needed to prove user accepted terms and conditions.",
|
|
30947
|
+
"emailmarketing__description": "Needed to prove email marketing consent.",
|
|
30948
|
+
"sms__description": "Needed to prove sms marketing consent.",
|
|
30949
|
+
"3rdparty__description": "Needed to prove 3rd party marketing consent.",
|
|
30950
|
+
"noDataFound": "No data found for consents.",
|
|
30951
|
+
"loading": "Loading...please wait",
|
|
30952
|
+
"requiredError": "This field is mandatory",
|
|
30953
|
+
},
|
|
30954
|
+
"hu": {
|
|
30955
|
+
"termsandconditions__description": "Szükséges annak igazolására, hogy a felhasználó elfogadta a feltételeket és kikötéseket.",
|
|
30956
|
+
"emailmarketing__description": "Szükséges annak igazolására, hogy a felhasználó beleegyezett az e-mail marketingbe.",
|
|
30957
|
+
"sms__description": "Szükséges annak igazolására, hogy a felhasználó beleegyezett az SMS marketingbe.",
|
|
30958
|
+
"3rdparty__description": "Szükséges annak igazolására, hogy a felhasználó beleegyezett a harmadik fél általi marketingbe.",
|
|
30959
|
+
"noDataFound": "Nincs adat a hozzájárulásokról.",
|
|
30960
|
+
"loading": "Betöltés...kérem várjon",
|
|
30961
|
+
"requiredError": "Ez a mező kötelező"
|
|
30962
|
+
},
|
|
30963
|
+
"hr": {
|
|
30964
|
+
"termsandconditions__description": "Potrebno za dokazivanje da je korisnik prihvatio uvjete i odredbe.",
|
|
30965
|
+
"emailmarketing__description": "Potrebno za dokazivanje pristanka na email marketing.",
|
|
30966
|
+
"sms__description": "Potrebno za dokazivanje pristanka na SMS marketing.",
|
|
30967
|
+
"3rdparty__description": "Potrebno za dokazivanje pristanka na marketing trećih strana.",
|
|
30968
|
+
"noDataFound": "Nema podataka o privolama.",
|
|
30969
|
+
"loading": "Učitavanje...molimo pričekajte",
|
|
30970
|
+
"requiredError": "Ovo polje je obavezno"
|
|
30971
|
+
},
|
|
30972
|
+
"tr": {
|
|
30973
|
+
"termsandconditions__description": "Kullanıcının şartlar ve koşulları kabul ettiğini kanıtlamak için gereklidir.",
|
|
30974
|
+
"emailmarketing__description": "E-posta pazarlama onayını kanıtlamak için gereklidir.",
|
|
30975
|
+
"sms__description": "SMS pazarlama onayını kanıtlamak için gereklidir.",
|
|
30976
|
+
"3rdparty__description": "Üçüncü taraf pazarlama onayını kanıtlamak için gereklidir.",
|
|
30977
|
+
"noDataFound": "Onaylarla ilgili veri bulunamadı.",
|
|
30978
|
+
"loading": "Yükleniyor...lütfen bekleyin",
|
|
30979
|
+
"requiredError": "Bu alan zorunludur"
|
|
30980
|
+
},
|
|
30981
|
+
"pt-br": {
|
|
30982
|
+
"termsandconditions__description": "Necessário para comprovar que o usuário aceitou os termos e condições.",
|
|
30983
|
+
"emailmarketing__description": "Necessário para comprovar o consentimento para marketing por e-mail.",
|
|
30984
|
+
"sms__description": "Necessário para comprovar o consentimento para marketing por SMS.",
|
|
30985
|
+
"3rdparty__description": "Necessário para comprovar o consentimento para marketing de terceiros.",
|
|
30986
|
+
"noDataFound": "Nenhum dado encontrado para consentimentos.",
|
|
30987
|
+
"loading": "Carregando...por favor aguarde",
|
|
30988
|
+
"requiredError": "Este campo é obrigatório"
|
|
30989
|
+
},
|
|
30990
|
+
"es-mx": {
|
|
30991
|
+
"termsandconditions__description": "Necesario para demostrar que el usuario aceptó los términos y condiciones.",
|
|
30992
|
+
"emailmarketing__description": "Necesario para demostrar el consentimiento para el marketing por correo electrónico.",
|
|
30993
|
+
"sms__description": "Necesario para demostrar el consentimiento para el marketing por SMS.",
|
|
30994
|
+
"3rdparty__description": "Necesario para demostrar el consentimiento para el marketing de terceros.",
|
|
30995
|
+
"noDataFound": "No se encontraron datos para los consentimientos.",
|
|
30996
|
+
"loading": "Cargando...por favor espera",
|
|
30997
|
+
"requiredError": "Este campo es obligatorio"
|
|
30998
|
+
}
|
|
30999
|
+
};
|
|
31000
|
+
const translate$1 = (key, customLang, values) => {
|
|
31001
|
+
const lang = customLang;
|
|
31002
|
+
let translation = TRANSLATIONS$1[lang !== undefined ? lang : DEFAULT_LANGUAGE$1][key];
|
|
31003
|
+
if (values !== undefined) {
|
|
31004
|
+
for (const [key, value] of Object.entries(values.values)) {
|
|
31005
|
+
const regex = new RegExp(`{${key}}`, 'g');
|
|
31006
|
+
translation = translation.replace(regex, value);
|
|
31007
|
+
}
|
|
31008
|
+
}
|
|
31009
|
+
return translation;
|
|
31010
|
+
};
|
|
31011
|
+
const getTranslations$1 = (url) => {
|
|
31012
|
+
// fetch url, get the data, replace the TRANSLATIONS content
|
|
31013
|
+
return new Promise((resolve) => {
|
|
31014
|
+
fetch(url)
|
|
31015
|
+
.then((res) => res.json())
|
|
31016
|
+
.then((data) => {
|
|
31017
|
+
Object.keys(data).forEach((item) => {
|
|
31018
|
+
for (let key in data[item]) {
|
|
31019
|
+
TRANSLATIONS$1[item][key] = data[item][key];
|
|
31020
|
+
}
|
|
31021
|
+
});
|
|
31022
|
+
resolve(true);
|
|
31023
|
+
});
|
|
31024
|
+
});
|
|
31025
|
+
};
|
|
31026
|
+
|
|
31027
|
+
const tooltipIconSvg = 'data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTIiIGhlaWdodD0iMTIiIHZpZXdCb3g9IjAgMCAxMiAxMiIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KPGNpcmNsZSBjeD0iNiIgY3k9IjYiIHI9IjUuNSIgc3Ryb2tlPSIjOTc5Nzk3Ii8+CjxyZWN0IHg9IjUiIHk9IjUiIHdpZHRoPSIyIiBoZWlnaHQ9IjUiIGZpbGw9IiM5Nzk3OTciLz4KPGNpcmNsZSBjeD0iNiIgY3k9IjMiIHI9IjEiIGZpbGw9IiM5Nzk3OTciLz4KPC9zdmc+Cg==';
|
|
31028
|
+
|
|
31029
|
+
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}";
|
|
31030
|
+
const GeneralConsentsStyle0 = generalConsentsCss;
|
|
31031
|
+
|
|
31032
|
+
const GeneralConsents = class {
|
|
31033
|
+
constructor(hostRef) {
|
|
31034
|
+
registerInstance(this, hostRef);
|
|
31035
|
+
this.value = '';
|
|
31036
|
+
this.registerErrors = false;
|
|
31037
|
+
this.setClientStyling = () => {
|
|
31038
|
+
let sheet = document.createElement('style');
|
|
31039
|
+
sheet.innerHTML = this.clientStyling;
|
|
31040
|
+
this.host.shadowRoot.prepend(sheet);
|
|
31041
|
+
};
|
|
31042
|
+
this.setClientStylingURL = () => {
|
|
31043
|
+
let url = new URL(this.clientStylingUrl);
|
|
31044
|
+
let cssFile = document.createElement('style');
|
|
31045
|
+
fetch(url.href)
|
|
31046
|
+
.then((res) => res.text())
|
|
31047
|
+
.then((data) => {
|
|
31048
|
+
cssFile.innerHTML = data;
|
|
31049
|
+
this.clientStyling = data;
|
|
31050
|
+
setTimeout(() => { this.host.shadowRoot.prepend(cssFile); }, 1);
|
|
31051
|
+
});
|
|
31052
|
+
};
|
|
31053
|
+
//Debounce to stop user from multiple calls
|
|
31054
|
+
this.debouncedHandleClick = this.debounce(this.handleClick, 500);
|
|
31055
|
+
this.endpoint = undefined;
|
|
31056
|
+
this.language = 'en';
|
|
31057
|
+
this.clientStyling = '';
|
|
31058
|
+
this.clientStylingUrl = '';
|
|
31059
|
+
this.translationUrl = '';
|
|
31060
|
+
this.name = undefined;
|
|
31061
|
+
this.tooltip = undefined;
|
|
31062
|
+
this.isLoading = true;
|
|
31063
|
+
this.consentsData = undefined;
|
|
31064
|
+
this.showTooltip = false;
|
|
31065
|
+
this.playerConsents = [];
|
|
31066
|
+
this.isValid = undefined;
|
|
31067
|
+
}
|
|
31068
|
+
handleStylingChange(newValue, oldValue) {
|
|
31069
|
+
if (newValue !== oldValue)
|
|
31070
|
+
this.setClientStyling();
|
|
31071
|
+
}
|
|
31072
|
+
handleStylingUrlChange(newValue, oldValue) {
|
|
31073
|
+
if (newValue !== oldValue)
|
|
31074
|
+
this.setClientStylingURL();
|
|
31075
|
+
}
|
|
31076
|
+
handleNewTranslations() {
|
|
31077
|
+
this.isLoading = true;
|
|
31078
|
+
getTranslations$1(this.translationUrl).then(() => {
|
|
31079
|
+
this.isLoading = false;
|
|
31080
|
+
});
|
|
31081
|
+
}
|
|
31082
|
+
//Watch only executes if newVal !== oldVal
|
|
31083
|
+
sendMessage() {
|
|
31084
|
+
window.postMessage({
|
|
31085
|
+
type: 'isConsentsValid',
|
|
31086
|
+
isValid: this.isValid
|
|
31087
|
+
});
|
|
31088
|
+
}
|
|
31089
|
+
//Listener for registration message so the sendConsents is made when the user is heading to the next step
|
|
31090
|
+
messageHandler(e) {
|
|
31091
|
+
//Handle Consents Message
|
|
31092
|
+
if (e.data && e.data.type != "setUpPlayerConsents")
|
|
31093
|
+
return;
|
|
31094
|
+
this.sendConsents(e.data.registerid);
|
|
31095
|
+
}
|
|
31096
|
+
handleClickOutside(event) {
|
|
31097
|
+
if (event.composedPath()[0] === this.tooltipIconReference)
|
|
31098
|
+
return;
|
|
31099
|
+
if (event.composedPath()[0] !== this.tooltipReference)
|
|
31100
|
+
this.showTooltip = false;
|
|
31101
|
+
}
|
|
31102
|
+
async componentWillLoad() {
|
|
31103
|
+
if (this.translationUrl.length > 2) {
|
|
31104
|
+
await getTranslations$1(this.translationUrl);
|
|
31105
|
+
}
|
|
31106
|
+
this.getConsents();
|
|
31107
|
+
}
|
|
31108
|
+
addTranslation(field) {
|
|
31109
|
+
const lang = TRANSLATIONS$1[this.language];
|
|
31110
|
+
if (TRANSLATIONS$1[lang][field.name]) {
|
|
31111
|
+
Object.keys(TRANSLATIONS$1[this.language][field.name]).forEach((key) => {
|
|
31112
|
+
field[key] = TRANSLATIONS$1[this.language][field.name][key];
|
|
31113
|
+
});
|
|
31114
|
+
}
|
|
31115
|
+
}
|
|
31116
|
+
getConsents() {
|
|
31117
|
+
this.isLoading = true;
|
|
31118
|
+
this.registerErrors = false;
|
|
31119
|
+
const url = new URL(`${this.endpoint}/api/v2/gm/legislation/consents`), headers = {
|
|
31120
|
+
'Content-Type': 'application/json',
|
|
31121
|
+
'Accept': 'application/json'
|
|
31122
|
+
}, options = {
|
|
31123
|
+
method: 'GET',
|
|
31124
|
+
headers
|
|
31125
|
+
};
|
|
31126
|
+
fetch(url.href, options)
|
|
31127
|
+
.then((res) => {
|
|
31128
|
+
if (!res.ok) {
|
|
31129
|
+
this.registerErrors = true;
|
|
31130
|
+
return res.json().then(error => {
|
|
31131
|
+
return console.error(error);
|
|
31132
|
+
});
|
|
31133
|
+
}
|
|
31134
|
+
return res.json();
|
|
31135
|
+
})
|
|
31136
|
+
.then((data) => {
|
|
31137
|
+
if (!this.registerErrors) {
|
|
31138
|
+
this.consentsData = data;
|
|
31139
|
+
//If consents are in the localStorage user it instead of the one from the call
|
|
31140
|
+
if (localStorage.getItem("playerConsents")) {
|
|
31141
|
+
try {
|
|
31142
|
+
this.playerConsents = JSON.parse(localStorage.getItem('playerConsents'));
|
|
31143
|
+
}
|
|
31144
|
+
catch (error) {
|
|
31145
|
+
console.error(error);
|
|
31146
|
+
}
|
|
31147
|
+
return;
|
|
31148
|
+
}
|
|
31149
|
+
this.playerConsents = this.consentsData.map((consent) => ({
|
|
31150
|
+
status: '3',
|
|
31151
|
+
tagCode: consent.tagCode,
|
|
31152
|
+
}));
|
|
31153
|
+
//Setup default localStorage consents
|
|
31154
|
+
localStorage.setItem('playerConsents', JSON.stringify(this.playerConsents));
|
|
31155
|
+
}
|
|
31156
|
+
})
|
|
31157
|
+
.catch((err) => {
|
|
31158
|
+
console.error(err);
|
|
31159
|
+
})
|
|
31160
|
+
.finally(() => {
|
|
31161
|
+
this.isLoading = false;
|
|
31162
|
+
});
|
|
31163
|
+
}
|
|
31164
|
+
sendConsents(registerID) {
|
|
31165
|
+
const url = new URL(`${this.endpoint}/api/v2/gm/legislation/consents`), headers = {
|
|
31166
|
+
'Content-Type': 'application/json',
|
|
31167
|
+
'Accept': 'application/json'
|
|
31168
|
+
}, body = {
|
|
31169
|
+
playerConsents: this.playerConsents,
|
|
31170
|
+
registrationId: registerID
|
|
31171
|
+
}, options = {
|
|
31172
|
+
method: 'POST',
|
|
31173
|
+
body: JSON.stringify(body),
|
|
31174
|
+
headers
|
|
31175
|
+
};
|
|
31176
|
+
fetch(url.href, options)
|
|
31177
|
+
.then((res) => {
|
|
31178
|
+
if (!res.ok) {
|
|
31179
|
+
this.registerErrors = true;
|
|
31180
|
+
}
|
|
31181
|
+
})
|
|
31182
|
+
.catch((err) => {
|
|
31183
|
+
console.error(err);
|
|
31184
|
+
})
|
|
31185
|
+
.finally(() => {
|
|
31186
|
+
this.isLoading = false;
|
|
31187
|
+
});
|
|
31188
|
+
}
|
|
31189
|
+
handleClick(data) {
|
|
31190
|
+
const consent = this.consentsData.find((consent) => data.tagCode === consent.tagCode && data.status === "3" && consent.mustAccept);
|
|
31191
|
+
//Setup value for the consent in localStorage
|
|
31192
|
+
localStorage.setItem('playerConsents', JSON.stringify(this.playerConsents));
|
|
31193
|
+
//Show error for mandatory fields when they are not seleted
|
|
31194
|
+
this[`errorMessage__${data.tagCode}`].innerHTML = consent ? this.setErrorMessage() : "";
|
|
31195
|
+
//Check form validity
|
|
31196
|
+
this.isValid = this.checkValidity();
|
|
31197
|
+
}
|
|
31198
|
+
//Handle the input when user select a consent
|
|
31199
|
+
handleInput(index, event) {
|
|
31200
|
+
const target = event.target;
|
|
31201
|
+
this.playerConsents[index].status = target.checked ? '1' : '3';
|
|
31202
|
+
this.debouncedHandleClick(this.playerConsents[index]);
|
|
31203
|
+
}
|
|
31204
|
+
handleTooltipClick() { this.showTooltip = !this.showTooltip; }
|
|
31205
|
+
debounce(func, delay) {
|
|
31206
|
+
let timer;
|
|
31207
|
+
return function (...args) {
|
|
31208
|
+
clearTimeout(timer);
|
|
31209
|
+
timer = setTimeout(() => {
|
|
31210
|
+
func.apply(this, args);
|
|
31211
|
+
}, delay);
|
|
31212
|
+
};
|
|
31213
|
+
}
|
|
31214
|
+
checkValidity() {
|
|
31215
|
+
const invalidConsents = this.playerConsents.filter((formConsent) => this.consentsData.some((consent) => formConsent.tagCode === consent.tagCode &&
|
|
31216
|
+
consent.mustAccept &&
|
|
31217
|
+
formConsent.status === "3"));
|
|
31218
|
+
return invalidConsents.length === 0;
|
|
31219
|
+
}
|
|
31220
|
+
setErrorMessage() {
|
|
31221
|
+
return translate$1('requiredError', this.language);
|
|
31222
|
+
}
|
|
31223
|
+
render() {
|
|
31224
|
+
if (this.isLoading) {
|
|
31225
|
+
return h$2("p", null, translate$1('loading', this.language));
|
|
31226
|
+
}
|
|
31227
|
+
if (!this.consentsData) {
|
|
31228
|
+
return h$2("p", null, translate$1('noDataFound', this.language));
|
|
31229
|
+
}
|
|
31230
|
+
return (h$2("form", { class: "checkbox" }, this.consentsData.map((consent, index) => (h$2("div", { class: `checkbox__wrapper ${consent.tagCode}__input`, ref: (host) => (this[consent.tagCode] = host) }, h$2("input", { class: 'checkbox__input', type: "checkbox", checked: this.playerConsents[index].status === '1', id: `${consent.tagCode}__input`, onInput: this.handleInput.bind(this, index) }), h$2("label", { class: 'checkbox__label', htmlFor: `${consent.tagCode}__input` }, h$2("div", { class: 'checkbox__label-text', innerHTML: `${translate$1(`${consent.tagCode}__description`, this.language)} ${consent.mustAccept ? '*' : ''}` })), h$2("small", { class: 'checkbox__error-message', ref: (host) => (this[`errorMessage__${consent.tagCode}`] = host) }), h$2("div", { class: 'checkbox__wrapper--relative' }, this.tooltip &&
|
|
31231
|
+
h$2("img", { class: 'checkbox__tooltip-icon', src: tooltipIconSvg, alt: "", ref: (el) => this.tooltipIconReference = el, onClick: () => this.handleTooltipClick() }), h$2("div", { class: `checkbox__tooltip ${this.showTooltip ? 'visible' : ''}`, ref: (host) => this.tooltipReference = host, innerHTML: this.tooltip })))))));
|
|
31232
|
+
}
|
|
31233
|
+
get host() { return getElement(this); }
|
|
31234
|
+
static get watchers() { return {
|
|
31235
|
+
"clientStyling": ["handleStylingChange"],
|
|
31236
|
+
"clientStylingUrl": ["handleStylingUrlChange"],
|
|
31237
|
+
"translationUrl": ["handleNewTranslations"],
|
|
31238
|
+
"isValid": ["sendMessage"]
|
|
31239
|
+
}; }
|
|
31240
|
+
};
|
|
31241
|
+
GeneralConsents.style = GeneralConsentsStyle0;
|
|
31242
|
+
|
|
30943
31243
|
const generalInputCss = ":host{display:block;height:100%}";
|
|
30944
31244
|
const GeneralInputStyle0 = generalInputCss;
|
|
30945
31245
|
|
|
@@ -30972,7 +31272,7 @@ const GeneralInput = class {
|
|
|
30972
31272
|
}
|
|
30973
31273
|
connectedCallback() {
|
|
30974
31274
|
if (this.translationUrl) {
|
|
30975
|
-
getTranslations$
|
|
31275
|
+
getTranslations$2(this.translationUrl);
|
|
30976
31276
|
}
|
|
30977
31277
|
}
|
|
30978
31278
|
renderInput() {
|
|
@@ -31374,6 +31674,8 @@ const GeneralRegistration = class {
|
|
|
31374
31674
|
this.emitOnClick = false;
|
|
31375
31675
|
this.errorMessage = undefined;
|
|
31376
31676
|
this.isFormValid = undefined;
|
|
31677
|
+
this.isConsentValid = false;
|
|
31678
|
+
this.isConsentReady = false;
|
|
31377
31679
|
this.isLoading = true;
|
|
31378
31680
|
this.isLoadingPOST = undefined;
|
|
31379
31681
|
this.registrationStep = undefined;
|
|
@@ -31440,6 +31742,14 @@ const GeneralRegistration = class {
|
|
|
31440
31742
|
this.limitStylingAppends = true;
|
|
31441
31743
|
}
|
|
31442
31744
|
}
|
|
31745
|
+
messageHandler(e) {
|
|
31746
|
+
//Handle Consents Message
|
|
31747
|
+
if (e.data && e.data.type != "isConsentsValid")
|
|
31748
|
+
return;
|
|
31749
|
+
this.listOfInputValidity.find((input) => input.name === "Consents").isValid = e.data.isValid ? true : false;
|
|
31750
|
+
this.isConsentValid = e.data.isValid ? true : false;
|
|
31751
|
+
this.isFormValid = !this.getInvalidStatus(this.listOfInputValidity);
|
|
31752
|
+
}
|
|
31443
31753
|
nextHandler(e) {
|
|
31444
31754
|
e.preventDefault();
|
|
31445
31755
|
// Trigger events in subwidgets.
|
|
@@ -31536,6 +31846,7 @@ const GeneralRegistration = class {
|
|
|
31536
31846
|
}
|
|
31537
31847
|
});
|
|
31538
31848
|
}
|
|
31849
|
+
this.isConsentReady = this.listOfActions.some(action => action === '/Consents');
|
|
31539
31850
|
this.isFormValid = !this.getInvalidStatus(this.listOfInputValidity);
|
|
31540
31851
|
break;
|
|
31541
31852
|
}
|
|
@@ -31641,9 +31952,15 @@ const GeneralRegistration = class {
|
|
|
31641
31952
|
if (this.listOfActions.some(action => action == '/generate-2FA-code/Generate2FACode')) {
|
|
31642
31953
|
this.extraActions.push('2fa');
|
|
31643
31954
|
}
|
|
31955
|
+
if (localStorage.getItem('playerConsents')) {
|
|
31956
|
+
localStorage.removeItem("playerConsents");
|
|
31957
|
+
}
|
|
31644
31958
|
this.setRegister();
|
|
31645
31959
|
}
|
|
31646
31960
|
else {
|
|
31961
|
+
if (this.isConsentValid) {
|
|
31962
|
+
window.postMessage({ type: 'setUpPlayerConsents', registerid: this.registrationID });
|
|
31963
|
+
}
|
|
31647
31964
|
// After sending the current step, increment and check if the next one is in state.
|
|
31648
31965
|
this.registrationStep = this.stepChange('increment');
|
|
31649
31966
|
// If step is present in state do NOT fetch the next config.
|
|
@@ -31790,6 +32107,18 @@ const GeneralRegistration = class {
|
|
|
31790
32107
|
if (this.listOfActions.some(action => action == '/register')) {
|
|
31791
32108
|
this.lastStep = this.registrationStep;
|
|
31792
32109
|
}
|
|
32110
|
+
if (this.listOfActions.some(action => action == '/Consents')) {
|
|
32111
|
+
if (this.isConsentReady) {
|
|
32112
|
+
this.listOfInputValidity.find((input) => input.name === "Consents").isValid = false;
|
|
32113
|
+
this.isFormValid = !this.getInvalidStatus(this.listOfInputValidity);
|
|
32114
|
+
return;
|
|
32115
|
+
}
|
|
32116
|
+
this.listOfInputValidity.push({ name: 'Consents', isValid: false });
|
|
32117
|
+
this.isConsentReady = true;
|
|
32118
|
+
}
|
|
32119
|
+
else {
|
|
32120
|
+
this.isConsentReady = false;
|
|
32121
|
+
}
|
|
31793
32122
|
// The translations for fields happens here.
|
|
31794
32123
|
if (this.translationUrl) {
|
|
31795
32124
|
getTranslations(this.translationUrl).then(() => {
|
|
@@ -31875,10 +32204,13 @@ const GeneralRegistration = class {
|
|
|
31875
32204
|
? (input.inputType.toLowerCase() == 'checkboxgroup' || input.inputType.toLowerCase() == 'togglecheckbox')
|
|
31876
32205
|
? input.data.subFields
|
|
31877
32206
|
: input.data.values
|
|
31878
|
-
: [], 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(), h$2("div", { class: 'registration__wrapper--flex' }, h$2("p", { class: 'registration__error-message', innerHTML: this.errorMessage })));
|
|
32207
|
+
: [], 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(), h$2("div", { class: 'registration__wrapper--flex' }, h$2("p", { class: 'registration__error-message', innerHTML: this.errorMessage })));
|
|
31879
32208
|
});
|
|
31880
32209
|
}
|
|
31881
32210
|
;
|
|
32211
|
+
renderConsents() {
|
|
32212
|
+
return (h$2("div", { class: "consentsContainer" }, h$2("general-consents", { endpoint: this.endpoint })));
|
|
32213
|
+
}
|
|
31882
32214
|
renderButtons() {
|
|
31883
32215
|
return (h$2("div", { class: `registration__buttons-wrapper ${this.autofilled ? 'registration__buttons-wrapper--autofilled' : ''}` }, this.isLoadingPOST
|
|
31884
32216
|
&& h$2("slot", { name: 'spinner' })
|
|
@@ -32004,13 +32336,13 @@ const NumberInput = class {
|
|
|
32004
32336
|
if (this.inputReference.validity.patternMismatch) {
|
|
32005
32337
|
const errorCode = (_a = this.validation.custom.find(customValidation => customValidation.rule === 'regex')) === null || _a === void 0 ? void 0 : _a.errorKey;
|
|
32006
32338
|
const errorMessage = (_b = this.validation.custom.find(customValidation => customValidation.rule === 'regex')) === null || _b === void 0 ? void 0 : _b.errorMessage;
|
|
32007
|
-
return translate$
|
|
32339
|
+
return translate$3(`${errorCode}`, this.language) ? translate$3(`${errorCode}`, this.language) : errorMessage;
|
|
32008
32340
|
}
|
|
32009
32341
|
if (this.inputReference.validity.rangeUnderflow || this.inputReference.validity.rangeOverflow) {
|
|
32010
|
-
return translate$
|
|
32342
|
+
return translate$3('numberLengthError', this.language, { values: { min: this.validation.min, max: this.validation.max } });
|
|
32011
32343
|
}
|
|
32012
32344
|
if (this.inputReference.validity.valueMissing) {
|
|
32013
|
-
return translate$
|
|
32345
|
+
return translate$3('requiredError', this.language);
|
|
32014
32346
|
}
|
|
32015
32347
|
}
|
|
32016
32348
|
renderTooltip() {
|
|
@@ -32025,7 +32357,7 @@ const NumberInput = class {
|
|
|
32025
32357
|
invalidClass = this.isValid == true || this.isValid == undefined ? '' : 'text__input--invalid';
|
|
32026
32358
|
}
|
|
32027
32359
|
return h$2("div", { key: '2032f77ca52b330ae2e8f484d7a0aba60ee7b9d5', class: `number__wrapper ${this.autofilled ? 'number__wrapper--autofilled' : ''} ${this.name}__input`, ref: el => this.stylingContainer = el }, h$2("div", { key: '0786901cd928bba86597180f058bff43fba522b6', class: 'number__wrapper--flex' }, h$2("label", { key: 'ff7f39306cef7aeba3e0e4508df03c5a945e748b', class: `number__label ${this.validation.mandatory ? 'number__label--required' : ''}`, htmlFor: `${this.name}__input` }, this.displayName), h$2("div", { key: 'dced91223621551472fee374d56f1ad7476f4191', class: 'number__wrapper--relative' }, this.tooltip &&
|
|
32028
|
-
h$2("img", { key: 'a804a983e342e4d117126720a32c4c34a2b267dc', class: 'number__tooltip-icon', src: tooltipIconSvg, alt: "", ref: (el) => this.tooltipIconReference = el, onClick: () => this.showTooltip = !this.showTooltip }), this.renderTooltip())), h$2("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 }), h$2("small", { key: 'ca11558b5704b69311626736ab84a298449b98d7', class: 'number__error-message' }, this.errorMessage));
|
|
32360
|
+
h$2("img", { key: 'a804a983e342e4d117126720a32c4c34a2b267dc', class: 'number__tooltip-icon', src: tooltipIconSvg$1, alt: "", ref: (el) => this.tooltipIconReference = el, onClick: () => this.showTooltip = !this.showTooltip }), this.renderTooltip())), h$2("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 }), h$2("small", { key: 'ca11558b5704b69311626736ab84a298449b98d7', class: 'number__error-message' }, this.errorMessage));
|
|
32029
32361
|
}
|
|
32030
32362
|
static get watchers() { return {
|
|
32031
32363
|
"isValid": ["validityChanged"],
|
|
@@ -33866,23 +34198,23 @@ const PasswordInput = class {
|
|
|
33866
34198
|
setErrorMessage() {
|
|
33867
34199
|
var _a, _b, _c, _d;
|
|
33868
34200
|
if (this.isDuplicateInput && !this.originalValid) {
|
|
33869
|
-
return translate$
|
|
34201
|
+
return translate$3('invalidOriginalPasswordError', this.language);
|
|
33870
34202
|
}
|
|
33871
34203
|
if (this.inputReference.validity.patternMismatch) {
|
|
33872
34204
|
const errorCode = (_a = this.validation.custom.find(customValidation => customValidation.rule === 'regex')) === null || _a === void 0 ? void 0 : _a.errorKey;
|
|
33873
34205
|
const errorMessage = (_b = this.validation.custom.find(customValidation => customValidation.rule === 'regex')) === null || _b === void 0 ? void 0 : _b.errorMessage;
|
|
33874
|
-
return translate$
|
|
34206
|
+
return translate$3(`${errorCode}`, this.language) ? translate$3(`${errorCode}`, this.language) : errorMessage;
|
|
33875
34207
|
}
|
|
33876
34208
|
if (this.inputReference.validity.tooShort || this.inputReference.validity.tooLong) {
|
|
33877
|
-
return translate$
|
|
34209
|
+
return translate$3('lengthError', this.language, { values: { minLength: this.validation.minLength, maxLength: this.validation.maxLength } });
|
|
33878
34210
|
}
|
|
33879
34211
|
if (this.inputReference.validity.valueMissing) {
|
|
33880
|
-
return translate$
|
|
34212
|
+
return translate$3('requiredError', this.language);
|
|
33881
34213
|
}
|
|
33882
34214
|
if (this.isDuplicateInput && this.duplicateInputValue !== this.value) {
|
|
33883
34215
|
const errorCode = (_c = this.validation.custom.find(customRule => customRule.rule === 'duplicate-input')) === null || _c === void 0 ? void 0 : _c.errorKey;
|
|
33884
34216
|
const errorMessage = (_d = this.validation.custom.find(customRule => customRule.rule === 'duplicate-input')) === null || _d === void 0 ? void 0 : _d.errorMessage;
|
|
33885
|
-
return translate$
|
|
34217
|
+
return translate$3(`${errorCode}`, this.language) ? translate$3(`${errorCode}`, this.language) : errorMessage;
|
|
33886
34218
|
}
|
|
33887
34219
|
}
|
|
33888
34220
|
renderTooltip() {
|
|
@@ -33896,8 +34228,8 @@ const PasswordInput = class {
|
|
|
33896
34228
|
const passedRules = this.passwordComplexity.filter(complexity => complexity.passed).length;
|
|
33897
34229
|
const meterValue = passedRules / totalRules;
|
|
33898
34230
|
const allRulesPassed = this.passwordComplexity.every(complexity => complexity.passed);
|
|
33899
|
-
return (h$2("div", { class: `password__complexity ${!this.showPopup ? 'password__complexity--hidden' : ''}` }, h$2("div", { class: 'password__complexity--strength' }, h$2("p", { class: 'password__complexity--text' }, translate$
|
|
33900
|
-
return (h$2("div", { key: index }, h$2("input", { class: 'password__complexity--checkbox', type: "checkbox", checked: complexity.passed, disabled: true }), h$2("span", null, translate$
|
|
34231
|
+
return (h$2("div", { class: `password__complexity ${!this.showPopup ? 'password__complexity--hidden' : ''}` }, h$2("div", { class: 'password__complexity--strength' }, h$2("p", { class: 'password__complexity--text' }, translate$3('passwordStrength', this.language), "\u00A0", h$2("span", { class: 'password__complexity--text-bold' }, translate$3(`${allRulesPassed ? 'passwordStrengthStrong' : 'passwordStrengthWeak'}`, this.language))), h$2("meter", { value: meterValue, min: "0", max: "1" })), h$2("div", null, this.passwordComplexity.map((complexity, index) => {
|
|
34232
|
+
return (h$2("div", { key: index }, h$2("input", { class: 'password__complexity--checkbox', type: "checkbox", checked: complexity.passed, disabled: true }), h$2("span", null, translate$3(`${complexity.ruleKey}`, this.language) ? translate$3(`${complexity.ruleKey}`, this.language) : complexity.rule)));
|
|
33901
34233
|
}))));
|
|
33902
34234
|
}
|
|
33903
34235
|
render() {
|
|
@@ -33906,7 +34238,7 @@ const PasswordInput = class {
|
|
|
33906
34238
|
invalidClass = this.isValid == true || this.isValid == undefined ? '' : 'text__input--invalid';
|
|
33907
34239
|
}
|
|
33908
34240
|
return h$2("div", { key: '7f6a07f3c7e3aa53e1d97d674cc7a5591c33f7ce', class: `password__wrapper ${this.autofilled ? 'password__wrapper--autofilled' : ''} ${this.name}__input`, ref: el => this.stylingContainer = el }, h$2("div", { key: 'a487d206585a3eb30441509070a6ab0747b911b4', class: 'password__wrapper--flex' }, h$2("label", { key: 'e8c471fa0836cb842f529c3733491249400b534c', class: `password__label ${this.validation.mandatory ? 'password__label--required' : ''}`, htmlFor: `${this.name}__input` }, this.displayName), h$2("div", { key: '4d90f18a711b27a621ebf5043906d5f35387a7e5', class: 'password__wrapper--relative' }, this.tooltip &&
|
|
33909
|
-
h$2("img", { key: 'c44c2d9bf69b37761da9d0c5485326391627b8b4', class: 'password__tooltip-icon', src: tooltipIconSvg, alt: "", ref: (el) => this.tooltipIconReference = el, onClick: () => this.showTooltip = !this.showTooltip }), this.renderTooltip())), h$2("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 }), h$2("small", { key: '6fb3a91b1872805085f4d028c0760be8f6383b10', class: 'password__error-message' }, this.errorMessage), this.passwordComplexity && this.showPopup && !this.isDuplicateInput && this.renderComplexityPopup());
|
|
34241
|
+
h$2("img", { key: 'c44c2d9bf69b37761da9d0c5485326391627b8b4', class: 'password__tooltip-icon', src: tooltipIconSvg$1, alt: "", ref: (el) => this.tooltipIconReference = el, onClick: () => this.showTooltip = !this.showTooltip }), this.renderTooltip())), h$2("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 }), h$2("small", { key: '6fb3a91b1872805085f4d028c0760be8f6383b10', class: 'password__error-message' }, this.errorMessage), this.passwordComplexity && this.showPopup && !this.isDuplicateInput && this.renderComplexityPopup());
|
|
33910
34242
|
}
|
|
33911
34243
|
get element() { return getElement(this); }
|
|
33912
34244
|
static get watchers() { return {
|
|
@@ -33986,7 +34318,7 @@ const RadioInput = class {
|
|
|
33986
34318
|
}
|
|
33987
34319
|
setErrorMessage() {
|
|
33988
34320
|
if (this.inputReference.validity.valueMissing) {
|
|
33989
|
-
return translate$
|
|
34321
|
+
return translate$3('requiredError', this.language);
|
|
33990
34322
|
}
|
|
33991
34323
|
}
|
|
33992
34324
|
renderTooltip() {
|
|
@@ -33997,7 +34329,7 @@ const RadioInput = class {
|
|
|
33997
34329
|
}
|
|
33998
34330
|
render() {
|
|
33999
34331
|
return h$2("fieldset", { key: '3d90735f7dc8fef6a96dc85b8f9ba22880cb205f', class: `radio__fieldset ${this.name}__input`, ref: el => this.stylingContainer = el }, h$2("legend", { key: '9472ed76f5c7fabb90d2b3d39eeb9e18f05a30dd', class: 'radio__legend' }, this.displayName, ":"), this.optionsGroup.map(option => h$2("div", { class: 'radio__wrapper' }, h$2("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$2("label", { htmlFor: `${option.label}__input` }, option.label))), h$2("small", { key: '2ae0947580bb8a0a3d889a2d9ebd0b82458fdfd2', class: 'radio__error-message' }, this.errorMessage), this.tooltip &&
|
|
34000
|
-
h$2("img", { key: '4f3cbf341f1c559bbdf44ca5d169be7a64d46e97', class: 'radio__tooltip-icon', src: tooltipIconSvg, alt: "", ref: (el) => this.tooltipIconReference = el, onClick: () => this.showTooltip = !this.showTooltip }), this.renderTooltip());
|
|
34332
|
+
h$2("img", { key: '4f3cbf341f1c559bbdf44ca5d169be7a64d46e97', class: 'radio__tooltip-icon', src: tooltipIconSvg$1, alt: "", ref: (el) => this.tooltipIconReference = el, onClick: () => this.showTooltip = !this.showTooltip }), this.renderTooltip());
|
|
34001
34333
|
}
|
|
34002
34334
|
static get watchers() { return {
|
|
34003
34335
|
"isValid": ["validityChanged"],
|
|
@@ -38950,7 +39282,7 @@ const SelectInput = class {
|
|
|
38950
39282
|
}
|
|
38951
39283
|
setErrorMessage() {
|
|
38952
39284
|
if (this.inputReference.validity.valueMissing) {
|
|
38953
|
-
return translate$
|
|
39285
|
+
return translate$3('requiredError', this.language);
|
|
38954
39286
|
}
|
|
38955
39287
|
}
|
|
38956
39288
|
renderTooltip() {
|
|
@@ -38965,7 +39297,7 @@ const SelectInput = class {
|
|
|
38965
39297
|
invalidClass = this.isValid == true || this.isValid == undefined ? '' : 'text__input--invalid';
|
|
38966
39298
|
}
|
|
38967
39299
|
return h$2("div", { key: 'c235991f572ea3f8659f66d660fd1fb41b0094ad', class: `select__wrapper ${this.autofilled ? 'select__wrapper--autofilled' : ''} ${this.name}__input`, ref: el => this.stylingContainer = el }, h$2("div", { key: '50931d2e1345bb8337820409a6aff2eee4d33cd5', class: 'select__wrapper--flex' }, h$2("label", { key: '28a05e2a88132fb8ad279ec0fbc0d49253d3ffbc', class: 'select__label', htmlFor: `${this.name}__input` }, `${this.displayName} ${this.validation.mandatory ? '*' : ''}`), h$2("div", { key: '1d53254871214080c3f1d25c73380a9b9df19aab', class: 'select__wrapper--relative' }, this.tooltip &&
|
|
38968
|
-
h$2("img", { key: '020465f83dd9a03a37b223521bfce37a66df818d', class: 'select__tooltip-icon', src: tooltipIconSvg, alt: "", ref: (el) => this.tooltipIconReference = el, onClick: () => this.showTooltip = !this.showTooltip }), this.renderTooltip())), h$2("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 }), h$2("small", { key: '4cda22e9fdccb3960107a661fa24649946d6bb14', class: 'select__error-message' }, this.errorMessage));
|
|
39300
|
+
h$2("img", { key: '020465f83dd9a03a37b223521bfce37a66df818d', class: 'select__tooltip-icon', src: tooltipIconSvg$1, alt: "", ref: (el) => this.tooltipIconReference = el, onClick: () => this.showTooltip = !this.showTooltip }), this.renderTooltip())), h$2("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 }), h$2("small", { key: '4cda22e9fdccb3960107a661fa24649946d6bb14', class: 'select__error-message' }, this.errorMessage));
|
|
38969
39301
|
}
|
|
38970
39302
|
get element() { return getElement(this); }
|
|
38971
39303
|
static get watchers() { return {
|
|
@@ -39115,13 +39447,13 @@ const TelInput = class {
|
|
|
39115
39447
|
if (this.inputReference.validity.patternMismatch) {
|
|
39116
39448
|
const errorCode = (_a = this.validation.custom.find(customValidation => customValidation.rule === 'regex')) === null || _a === void 0 ? void 0 : _a.errorKey;
|
|
39117
39449
|
const errorMessage = (_b = this.validation.custom.find(customValidation => customValidation.rule === 'regex')) === null || _b === void 0 ? void 0 : _b.errorMessage;
|
|
39118
|
-
return translate$
|
|
39450
|
+
return translate$3(`${errorCode}`, this.language) ? translate$3(`${errorCode}`, this.language) : errorMessage;
|
|
39119
39451
|
}
|
|
39120
39452
|
if (this.inputReference.validity.tooShort || this.inputReference.validity.tooLong) {
|
|
39121
|
-
return translate$
|
|
39453
|
+
return translate$3('lengthError', this.language, { values: { minLength: this.validation.minLength, maxLength: this.validation.maxLength } });
|
|
39122
39454
|
}
|
|
39123
39455
|
if (this.inputReference.validity.valueMissing) {
|
|
39124
|
-
return translate$
|
|
39456
|
+
return translate$3('requiredError', this.language);
|
|
39125
39457
|
}
|
|
39126
39458
|
}
|
|
39127
39459
|
renderTooltip() {
|
|
@@ -39136,7 +39468,7 @@ const TelInput = class {
|
|
|
39136
39468
|
invalidClass = this.isValid == true || this.isValid == undefined ? '' : 'text__input--invalid';
|
|
39137
39469
|
}
|
|
39138
39470
|
return h$2("div", { key: '5febd36c339710683111039d477196daac87853c', class: `tel__wrapper ${this.autofilled ? 'tel__wrapper--autofilled' : ''} ${this.name}__input`, ref: el => this.stylingContainer = el }, h$2("div", { key: 'fb779beee03992b23478ffcaac85095420048ceb', class: 'tel__wrapper--flex-label' }, h$2("label", { key: '5b69271c1c8bf403a003d765adb40a553e09466e', class: `tel__label ${this.validation.mandatory ? 'tel__label--required' : ''}`, htmlFor: `${this.name}__input` }, this.displayName), h$2("div", { key: '040c487308231459fc92eba2e643a80639df09d6', class: 'tel__wrapper--relative' }, this.tooltip &&
|
|
39139
|
-
h$2("img", { key: '91efd4656c718c75e5047413daf10c22c37e8f93', class: 'tel__tooltip-icon', src: tooltipIconSvg, alt: "", ref: (el) => this.tooltipIconReference = el, onClick: () => this.showTooltip = !this.showTooltip }), this.renderTooltip())), h$2("div", { key: '6215f80b6bccb3dfb03dbbc485c850725633627c', class: `tel__wrapper--flex ${invalidClass}` }, h$2("vaadin-combo-box", { key: '3b7b1ef3415619c51d74f5fc7c5e034acb8f037f', class: 'tel__prefix', items: this.phoneCodesOptions, value: this.prefixValue, readOnly: this.autofilled, onChange: (e) => this.handlePrefixInput(e) }), h$2("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 })), h$2("small", { key: 'd4c88d386c3342c789527d925e9cd061494b785c', class: 'tel__error-message' }, this.errorMessage));
|
|
39471
|
+
h$2("img", { key: '91efd4656c718c75e5047413daf10c22c37e8f93', class: 'tel__tooltip-icon', src: tooltipIconSvg$1, alt: "", ref: (el) => this.tooltipIconReference = el, onClick: () => this.showTooltip = !this.showTooltip }), this.renderTooltip())), h$2("div", { key: '6215f80b6bccb3dfb03dbbc485c850725633627c', class: `tel__wrapper--flex ${invalidClass}` }, h$2("vaadin-combo-box", { key: '3b7b1ef3415619c51d74f5fc7c5e034acb8f037f', class: 'tel__prefix', items: this.phoneCodesOptions, value: this.prefixValue, readOnly: this.autofilled, onChange: (e) => this.handlePrefixInput(e) }), h$2("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 })), h$2("small", { key: 'd4c88d386c3342c789527d925e9cd061494b785c', class: 'tel__error-message' }, this.errorMessage));
|
|
39140
39472
|
}
|
|
39141
39473
|
static get watchers() { return {
|
|
39142
39474
|
"isValid": ["validityChanged"],
|
|
@@ -39279,18 +39611,18 @@ const TextInput = class {
|
|
|
39279
39611
|
if (this.inputReference.validity.patternMismatch) {
|
|
39280
39612
|
const errorCode = (_a = this.validation.custom.find(customValidation => customValidation.rule === 'regex')) === null || _a === void 0 ? void 0 : _a.errorKey;
|
|
39281
39613
|
const errorMessage = (_b = this.validation.custom.find(customValidation => customValidation.rule === 'regex')) === null || _b === void 0 ? void 0 : _b.errorMessage;
|
|
39282
|
-
return translate$
|
|
39614
|
+
return translate$3(`${errorCode}`, this.language) ? translate$3(`${errorCode}`, this.language) : errorMessage;
|
|
39283
39615
|
}
|
|
39284
39616
|
if (this.inputReference.validity.tooShort || this.inputReference.validity.tooLong) {
|
|
39285
|
-
return translate$
|
|
39617
|
+
return translate$3('lengthError', this.language, { values: { minLength: this.validation.minLength, maxLength: this.validation.maxLength } });
|
|
39286
39618
|
}
|
|
39287
39619
|
if (this.inputReference.validity.valueMissing) {
|
|
39288
|
-
return translate$
|
|
39620
|
+
return translate$3('requiredError', this.language);
|
|
39289
39621
|
}
|
|
39290
39622
|
if (this.isDuplicateInput && this.duplicateInputValue !== this.value) {
|
|
39291
39623
|
const errorCode = (_c = this.validation.custom.find(customRule => customRule.rule === 'duplicate-input')) === null || _c === void 0 ? void 0 : _c.errorKey;
|
|
39292
39624
|
const errorMessage = (_d = this.validation.custom.find(customRule => customRule.rule === 'duplicate-input')) === null || _d === void 0 ? void 0 : _d.errorMessage;
|
|
39293
|
-
return translate$
|
|
39625
|
+
return translate$3(`${errorCode}`, this.language) ? translate$3(`${errorCode}`, this.language) : errorMessage;
|
|
39294
39626
|
}
|
|
39295
39627
|
}
|
|
39296
39628
|
renderTooltip() {
|
|
@@ -39305,7 +39637,7 @@ const TextInput = class {
|
|
|
39305
39637
|
invalidClass = this.isValid == true || this.isValid == undefined ? '' : 'text__input--invalid';
|
|
39306
39638
|
}
|
|
39307
39639
|
return h$2("div", { key: 'bfb803110a70b89dd484e993c204b572f0115a17', class: `text__wrapper ${this.name}__input ${this.autofilled ? 'text__wrapper--autofilled' : ''}`, ref: el => this.stylingContainer = el }, h$2("div", { key: '6e9f8f5aada98821d5dc78ccb8b1431ba23b81ab', class: 'text__wrapper--flex' }, h$2("label", { key: '05cf07855121a79641475a5b020774cf8120d1ed', class: `text__label ${this.validation.mandatory ? 'text__label--required' : ''}`, htmlFor: `${this.name}__input` }, this.displayName), h$2("div", { key: 'f8c48a999f6827a61ec392ce99858c19559c77d2', class: 'text__wrapper--relative' }, this.tooltip &&
|
|
39308
|
-
h$2("img", { key: 'e866f1df104ce57c29164e73b4ad4d017c7201cd', class: 'text__tooltip-icon', src: tooltipIconSvg, alt: "", ref: (el) => this.tooltipIconReference = el, onClick: () => this.showTooltip = !this.showTooltip }), this.renderTooltip())), h$2("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 }), h$2("small", { key: '5c8df34dd47959eb1668cdf389524d145c69fa84', class: 'text__error-message' }, this.errorMessage));
|
|
39640
|
+
h$2("img", { key: 'e866f1df104ce57c29164e73b4ad4d017c7201cd', class: 'text__tooltip-icon', src: tooltipIconSvg$1, alt: "", ref: (el) => this.tooltipIconReference = el, onClick: () => this.showTooltip = !this.showTooltip }), this.renderTooltip())), h$2("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 }), h$2("small", { key: '5c8df34dd47959eb1668cdf389524d145c69fa84', class: 'text__error-message' }, this.errorMessage));
|
|
39309
39641
|
}
|
|
39310
39642
|
static get watchers() { return {
|
|
39311
39643
|
"isValid": ["validityChanged"],
|
|
@@ -39376,7 +39708,7 @@ const ToggleCheckboxInput = class {
|
|
|
39376
39708
|
}
|
|
39377
39709
|
setErrorMessage() {
|
|
39378
39710
|
if (this.checkboxReference.validity.valueMissing) {
|
|
39379
|
-
return translate$
|
|
39711
|
+
return translate$3('requiredError', this.language);
|
|
39380
39712
|
}
|
|
39381
39713
|
}
|
|
39382
39714
|
renderLabel() {
|
|
@@ -39390,11 +39722,11 @@ const ToggleCheckboxInput = class {
|
|
|
39390
39722
|
}
|
|
39391
39723
|
render() {
|
|
39392
39724
|
return h$2("div", { key: '8c8e9bb2ae7feadf3a5fc38b9913e38d7ccb9aed', class: `togglecheckbox__wrapper ${this.name}__input`, ref: el => this.stylingContainer = el }, h$2("div", { key: '18e2ec43ff98738323ddab1e134d6d215978e1c7', class: 'togglecheckbox__wrapper--flex' }, h$2("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()), h$2("small", { key: 'efd70a691559cfa98e93561dd945a0fe92909718', class: 'togglecheckbox__error-message' }, this.errorMessage), h$2("div", { key: 'e56a8fafa17da25d01f894fe6e6c143c318d2aab', class: 'togglecheckbox__wrapper--relative' }, this.tooltip &&
|
|
39393
|
-
h$2("img", { key: '8b59366827b8f4f8ca5581203a2dca44ae8132d5', class: 'togglecheckbox__tooltip-icon', src: tooltipIconSvg, alt: "", ref: (el) => this.tooltipIconReference = el, onClick: () => this.showTooltip = !this.showTooltip }), this.renderTooltip()), h$2("div", { key: '475e27345b51396c36e78b5a1e06edd980bc3ae1', class: `togglecheckbox__fields-wrapper ${this.showFields ? '' : 'hidden'}` }, this.options.map(subfield => {
|
|
39725
|
+
h$2("img", { key: '8b59366827b8f4f8ca5581203a2dca44ae8132d5', class: 'togglecheckbox__tooltip-icon', src: tooltipIconSvg$1, alt: "", ref: (el) => this.tooltipIconReference = el, onClick: () => this.showTooltip = !this.showTooltip }), this.renderTooltip()), h$2("div", { key: '475e27345b51396c36e78b5a1e06edd980bc3ae1', class: `togglecheckbox__fields-wrapper ${this.showFields ? '' : 'hidden'}` }, this.options.map(subfield => {
|
|
39394
39726
|
return h$2("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 });
|
|
39395
39727
|
})));
|
|
39396
39728
|
}
|
|
39397
39729
|
};
|
|
39398
39730
|
ToggleCheckboxInput.style = ToggleCheckboxInputStyle0;
|
|
39399
39731
|
|
|
39400
|
-
export { CheckboxGroupInput as checkbox_group_input, CheckboxInput as checkbox_input, DateInput as date_input, EmailInput as email_input, GeneralInput as general_input, GeneralRegistration as general_registration, NumberInput as number_input, PasswordInput as password_input, RadioInput as radio_input, SelectInput as select_input, TelInput as tel_input, TextInput as text_input, ToggleCheckboxInput as toggle_checkbox_input };
|
|
39732
|
+
export { CheckboxGroupInput as checkbox_group_input, CheckboxInput as checkbox_input, DateInput as date_input, EmailInput as email_input, GeneralConsents as general_consents, GeneralInput as general_input, GeneralRegistration as general_registration, NumberInput as number_input, PasswordInput as password_input, RadioInput as radio_input, SelectInput as select_input, TelInput as tel_input, TextInput as text_input, ToggleCheckboxInput as toggle_checkbox_input };
|