@everymatrix/general-registration 1.47.2 → 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.
@@ -3,10 +3,9 @@
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
5
  const index = require('./index-0186f043.js');
6
- require('@everymatrix/general-consents');
7
6
 
8
- const DEFAULT_LANGUAGE$1 = 'en';
9
- const TRANSLATIONS$1 = {
7
+ const DEFAULT_LANGUAGE$2 = 'en';
8
+ const TRANSLATIONS$2 = {
10
9
  "en": {
11
10
  "dateError": "The selected date should be between {min} and {max}",
12
11
  "dateError2": "The selected date is not within the accepted range",
@@ -121,9 +120,9 @@ const TRANSLATIONS$1 = {
121
120
  "OnlyNumbers": "Solo debe contener números"
122
121
  }
123
122
  };
124
- const translate$2 = (key, customLang, values) => {
123
+ const translate$3 = (key, customLang, values) => {
125
124
  const lang = customLang;
126
- let translation = TRANSLATIONS$1[lang !== undefined ? lang : DEFAULT_LANGUAGE$1][key];
125
+ let translation = TRANSLATIONS$2[lang !== undefined ? lang : DEFAULT_LANGUAGE$2][key];
127
126
  if (values !== undefined) {
128
127
  for (const [key, value] of Object.entries(values.values)) {
129
128
  const regex = new RegExp(`{${key}}`, 'g');
@@ -132,7 +131,7 @@ const translate$2 = (key, customLang, values) => {
132
131
  }
133
132
  return translation;
134
133
  };
135
- const getTranslations$1 = (url) => {
134
+ const getTranslations$2 = (url) => {
136
135
  // fetch url, get the data, replace the TRANSLATIONS content
137
136
  return new Promise((resolve) => {
138
137
  fetch(url)
@@ -140,7 +139,7 @@ const getTranslations$1 = (url) => {
140
139
  .then((data) => {
141
140
  Object.keys(data).forEach((item) => {
142
141
  for (let key in data[item]) {
143
- TRANSLATIONS$1[item][key] = data[item][key];
142
+ TRANSLATIONS$2[item][key] = data[item][key];
144
143
  }
145
144
  });
146
145
  resolve(true);
@@ -148,7 +147,7 @@ const getTranslations$1 = (url) => {
148
147
  });
149
148
  };
150
149
 
151
- const tooltipIconSvg = 'data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTIiIGhlaWdodD0iMTIiIHZpZXdCb3g9IjAgMCAxMiAxMiIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KPGNpcmNsZSBjeD0iNiIgY3k9IjYiIHI9IjUuNSIgc3Ryb2tlPSIjOTc5Nzk3Ii8+CjxyZWN0IHg9IjUiIHk9IjUiIHdpZHRoPSIyIiBoZWlnaHQ9IjUiIGZpbGw9IiM5Nzk3OTciLz4KPGNpcmNsZSBjeD0iNiIgY3k9IjMiIHI9IjEiIGZpbGw9IiM5Nzk3OTciLz4KPC9zdmc+Cg==';
150
+ const tooltipIconSvg$1 = 'data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTIiIGhlaWdodD0iMTIiIHZpZXdCb3g9IjAgMCAxMiAxMiIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KPGNpcmNsZSBjeD0iNiIgY3k9IjYiIHI9IjUuNSIgc3Ryb2tlPSIjOTc5Nzk3Ii8+CjxyZWN0IHg9IjUiIHk9IjUiIHdpZHRoPSIyIiBoZWlnaHQ9IjUiIGZpbGw9IiM5Nzk3OTciLz4KPGNpcmNsZSBjeD0iNiIgY3k9IjMiIHI9IjEiIGZpbGw9IiM5Nzk3OTciLz4KPC9zdmc+Cg==';
152
151
 
153
152
  /**
154
153
  * @license
@@ -1973,7 +1972,7 @@ function isDescendant(base, path) {
1973
1972
  * @param {string} path Path to translate
1974
1973
  * @return {string} Translated string
1975
1974
  */
1976
- function translate$1(base, newBase, path) {
1975
+ function translate$2(base, newBase, path) {
1977
1976
  return newBase + path.slice(base.length);
1978
1977
  }
1979
1978
 
@@ -4174,7 +4173,7 @@ function handleNotification(event, inst, fromProp, toPath, negate) {
4174
4173
  let detail = /** @type {Object} */(event.detail);
4175
4174
  let fromPath = detail && detail.path;
4176
4175
  if (fromPath) {
4177
- toPath = translate$1(fromProp, toPath, fromPath);
4176
+ toPath = translate$2(fromProp, toPath, fromPath);
4178
4177
  value = detail && detail.value;
4179
4178
  } else {
4180
4179
  value = event.currentTarget[fromProp];
@@ -4460,10 +4459,10 @@ function computeLinkedPaths(inst, path, value) {
4460
4459
  for (let a in links) {
4461
4460
  let b = links[a];
4462
4461
  if (isDescendant(a, path)) {
4463
- link = translate$1(a, b, path);
4462
+ link = translate$2(a, b, path);
4464
4463
  inst._setPendingPropertyOrPath(link, value, true, true);
4465
4464
  } else if (isDescendant(b, path)) {
4466
- link = translate$1(b, a, path);
4465
+ link = translate$2(b, a, path);
4467
4466
  inst._setPendingPropertyOrPath(link, value, true, true);
4468
4467
  }
4469
4468
  }
@@ -4575,7 +4574,7 @@ function runBindingEffect(inst, path, props, oldProps, info, hasPaths, nodeList)
4575
4574
  node.__isPropertyEffectsClient &&
4576
4575
  node.__dataHasAccessor && node.__dataHasAccessor[binding.target]) {
4577
4576
  let value = props[path];
4578
- path = translate$1(part.source, binding.target, path);
4577
+ path = translate$2(part.source, binding.target, path);
4579
4578
  if (node._setPendingPropertyOrPath(path, value, false, true)) {
4580
4579
  inst._enqueueClient(node);
4581
4580
  }
@@ -14562,7 +14561,7 @@ const CheckboxGroupInput = class {
14562
14561
  }
14563
14562
  setErrorMessage() {
14564
14563
  if (this.inputReference.validity.valueMissing) {
14565
- return translate$2('requiredError', this.language);
14564
+ return translate$3('requiredError', this.language);
14566
14565
  }
14567
14566
  }
14568
14567
  renderTooltip() {
@@ -14582,7 +14581,7 @@ const CheckboxGroupInput = class {
14582
14581
  }
14583
14582
  render() {
14584
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 &&
14585
- 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) => {
14586
14585
  this.selectedValues = event.detail.value;
14587
14586
  } }, this.options.map((checkbox) => index.h("vaadin-checkbox", { class: 'checkbox__input', name: checkbox.name, value: checkbox.name, label: checkbox.displayName }))));
14588
14587
  }
@@ -14672,7 +14671,7 @@ const CheckboxInput = class {
14672
14671
  }
14673
14672
  setErrorMessage() {
14674
14673
  if (this.inputReference.validity.valueMissing) {
14675
- return translate$2('requiredError', this.language);
14674
+ return translate$3('requiredError', this.language);
14676
14675
  }
14677
14676
  }
14678
14677
  renderLabel() {
@@ -14686,7 +14685,7 @@ const CheckboxInput = class {
14686
14685
  }
14687
14686
  render() {
14688
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 &&
14689
- 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()));
14690
14689
  }
14691
14690
  static get watchers() { return {
14692
14691
  "isValid": ["validityChanged"],
@@ -21243,7 +21242,7 @@ class DomRepeat extends domRepeatBase {
21243
21242
  if (prop == this.as) {
21244
21243
  this.items[idx] = value;
21245
21244
  }
21246
- let path = translate$1(this.as, `${JSCompiler_renameProperty('items', this)}.${idx}`, prop);
21245
+ let path = translate$2(this.as, `${JSCompiler_renameProperty('items', this)}.${idx}`, prop);
21247
21246
  this.notifyPath(path, value);
21248
21247
  }
21249
21248
  }
@@ -30768,13 +30767,13 @@ const DateInput = class {
30768
30767
  }
30769
30768
  setErrorMessage() {
30770
30769
  if (isBefore(this.valueAsDate, this.minDate) || isAfter(this.valueAsDate, this.maxDate)) {
30771
- return translate$2('dateError2', this.language);
30770
+ return translate$3('dateError2', this.language);
30772
30771
  }
30773
30772
  if (this.inputReference.validity.rangeUnderflow || this.inputReference.validity.rangeOverflow) {
30774
- return translate$2('dateError', this.language, { values: { min: this.validation.min, max: this.validation.max } });
30773
+ return translate$3('dateError', this.language, { values: { min: this.validation.min, max: this.validation.max } });
30775
30774
  }
30776
30775
  if (this.inputReference.validity.valueMissing) {
30777
- return translate$2('requiredError', this.language);
30776
+ return translate$3('requiredError', this.language);
30778
30777
  }
30779
30778
  }
30780
30779
  renderTooltip() {
@@ -30789,7 +30788,7 @@ const DateInput = class {
30789
30788
  invalidClass = this.isValid == true || this.isValid == undefined ? '' : 'text__input--invalid';
30790
30789
  }
30791
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 &&
30792
- 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());
30793
30792
  }
30794
30793
  get element() { return index.getElement(this); }
30795
30794
  static get watchers() { return {
@@ -30910,18 +30909,18 @@ const EmailInput = class {
30910
30909
  if (this.inputReference.validity.patternMismatch) {
30911
30910
  const errorCode = (_a = this.validation.custom.find(customValidation => customValidation.rule === 'regex')) === null || _a === void 0 ? void 0 : _a.errorKey;
30912
30911
  const errorMessage = (_b = this.validation.custom.find(customValidation => customValidation.rule === 'regex')) === null || _b === void 0 ? void 0 : _b.errorMessage;
30913
- return translate$2(`${errorCode}`, this.language) ? translate$2(`${errorCode}`, this.language) : errorMessage;
30912
+ return translate$3(`${errorCode}`, this.language) ? translate$3(`${errorCode}`, this.language) : errorMessage;
30914
30913
  }
30915
30914
  if (this.inputReference.validity.tooShort || this.inputReference.validity.tooLong) {
30916
- return translate$2('lengthError', this.language, { values: { minLength: this.validation.minLength, maxLength: this.validation.maxLength } });
30915
+ return translate$3('lengthError', this.language, { values: { minLength: this.validation.minLength, maxLength: this.validation.maxLength } });
30917
30916
  }
30918
30917
  if (this.inputReference.validity.valueMissing) {
30919
- return translate$2('requiredError', this.language);
30918
+ return translate$3('requiredError', this.language);
30920
30919
  }
30921
30920
  if (this.isDuplicateInput && this.duplicateInputValue !== this.value) {
30922
30921
  const errorCode = (_c = this.validation.custom.find(customRule => customRule.rule === 'duplicate-input')) === null || _c === void 0 ? void 0 : _c.errorKey;
30923
30922
  const errorMessage = (_d = this.validation.custom.find(customRule => customRule.rule === 'duplicate-input')) === null || _d === void 0 ? void 0 : _d.errorMessage;
30924
- return translate$2(`${errorCode}`, this.language) ? translate$2(`${errorCode}`, this.language) : errorMessage;
30923
+ return translate$3(`${errorCode}`, this.language) ? translate$3(`${errorCode}`, this.language) : errorMessage;
30925
30924
  }
30926
30925
  }
30927
30926
  renderTooltip() {
@@ -30936,7 +30935,7 @@ const EmailInput = class {
30936
30935
  invalidClass = this.isValid == true || this.isValid == undefined ? '' : 'text__input--invalid';
30937
30936
  }
30938
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 &&
30939
- 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));
30940
30939
  }
30941
30940
  static get watchers() { return {
30942
30941
  "isValid": ["validityChanged"],
@@ -30945,6 +30944,306 @@ const EmailInput = class {
30945
30944
  };
30946
30945
  EmailInput.style = EmailInputStyle0;
30947
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
+
30948
31247
  const generalInputCss = ":host{display:block;height:100%}";
30949
31248
  const GeneralInputStyle0 = generalInputCss;
30950
31249
 
@@ -30977,7 +31276,7 @@ const GeneralInput = class {
30977
31276
  }
30978
31277
  connectedCallback() {
30979
31278
  if (this.translationUrl) {
30980
- getTranslations$1(this.translationUrl);
31279
+ getTranslations$2(this.translationUrl);
30981
31280
  }
30982
31281
  }
30983
31282
  renderInput() {
@@ -32041,13 +32340,13 @@ const NumberInput = class {
32041
32340
  if (this.inputReference.validity.patternMismatch) {
32042
32341
  const errorCode = (_a = this.validation.custom.find(customValidation => customValidation.rule === 'regex')) === null || _a === void 0 ? void 0 : _a.errorKey;
32043
32342
  const errorMessage = (_b = this.validation.custom.find(customValidation => customValidation.rule === 'regex')) === null || _b === void 0 ? void 0 : _b.errorMessage;
32044
- return translate$2(`${errorCode}`, this.language) ? translate$2(`${errorCode}`, this.language) : errorMessage;
32343
+ return translate$3(`${errorCode}`, this.language) ? translate$3(`${errorCode}`, this.language) : errorMessage;
32045
32344
  }
32046
32345
  if (this.inputReference.validity.rangeUnderflow || this.inputReference.validity.rangeOverflow) {
32047
- return translate$2('numberLengthError', this.language, { values: { min: this.validation.min, max: this.validation.max } });
32346
+ return translate$3('numberLengthError', this.language, { values: { min: this.validation.min, max: this.validation.max } });
32048
32347
  }
32049
32348
  if (this.inputReference.validity.valueMissing) {
32050
- return translate$2('requiredError', this.language);
32349
+ return translate$3('requiredError', this.language);
32051
32350
  }
32052
32351
  }
32053
32352
  renderTooltip() {
@@ -32062,7 +32361,7 @@ const NumberInput = class {
32062
32361
  invalidClass = this.isValid == true || this.isValid == undefined ? '' : 'text__input--invalid';
32063
32362
  }
32064
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 &&
32065
- 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));
32066
32365
  }
32067
32366
  static get watchers() { return {
32068
32367
  "isValid": ["validityChanged"],
@@ -33903,23 +34202,23 @@ const PasswordInput = class {
33903
34202
  setErrorMessage() {
33904
34203
  var _a, _b, _c, _d;
33905
34204
  if (this.isDuplicateInput && !this.originalValid) {
33906
- return translate$2('invalidOriginalPasswordError', this.language);
34205
+ return translate$3('invalidOriginalPasswordError', this.language);
33907
34206
  }
33908
34207
  if (this.inputReference.validity.patternMismatch) {
33909
34208
  const errorCode = (_a = this.validation.custom.find(customValidation => customValidation.rule === 'regex')) === null || _a === void 0 ? void 0 : _a.errorKey;
33910
34209
  const errorMessage = (_b = this.validation.custom.find(customValidation => customValidation.rule === 'regex')) === null || _b === void 0 ? void 0 : _b.errorMessage;
33911
- return translate$2(`${errorCode}`, this.language) ? translate$2(`${errorCode}`, this.language) : errorMessage;
34210
+ return translate$3(`${errorCode}`, this.language) ? translate$3(`${errorCode}`, this.language) : errorMessage;
33912
34211
  }
33913
34212
  if (this.inputReference.validity.tooShort || this.inputReference.validity.tooLong) {
33914
- return translate$2('lengthError', this.language, { values: { minLength: this.validation.minLength, maxLength: this.validation.maxLength } });
34213
+ return translate$3('lengthError', this.language, { values: { minLength: this.validation.minLength, maxLength: this.validation.maxLength } });
33915
34214
  }
33916
34215
  if (this.inputReference.validity.valueMissing) {
33917
- return translate$2('requiredError', this.language);
34216
+ return translate$3('requiredError', this.language);
33918
34217
  }
33919
34218
  if (this.isDuplicateInput && this.duplicateInputValue !== this.value) {
33920
34219
  const errorCode = (_c = this.validation.custom.find(customRule => customRule.rule === 'duplicate-input')) === null || _c === void 0 ? void 0 : _c.errorKey;
33921
34220
  const errorMessage = (_d = this.validation.custom.find(customRule => customRule.rule === 'duplicate-input')) === null || _d === void 0 ? void 0 : _d.errorMessage;
33922
- return translate$2(`${errorCode}`, this.language) ? translate$2(`${errorCode}`, this.language) : errorMessage;
34221
+ return translate$3(`${errorCode}`, this.language) ? translate$3(`${errorCode}`, this.language) : errorMessage;
33923
34222
  }
33924
34223
  }
33925
34224
  renderTooltip() {
@@ -33933,8 +34232,8 @@ const PasswordInput = class {
33933
34232
  const passedRules = this.passwordComplexity.filter(complexity => complexity.passed).length;
33934
34233
  const meterValue = passedRules / totalRules;
33935
34234
  const allRulesPassed = this.passwordComplexity.every(complexity => complexity.passed);
33936
- 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$2('passwordStrength', this.language), "\u00A0", index.h("span", { class: 'password__complexity--text-bold' }, translate$2(`${allRulesPassed ? 'passwordStrengthStrong' : 'passwordStrengthWeak'}`, this.language))), index.h("meter", { value: meterValue, min: "0", max: "1" })), index.h("div", null, this.passwordComplexity.map((complexity, index$1) => {
33937
- 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$2(`${complexity.ruleKey}`, this.language) ? translate$2(`${complexity.ruleKey}`, this.language) : complexity.rule)));
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)));
33938
34237
  }))));
33939
34238
  }
33940
34239
  render() {
@@ -33943,7 +34242,7 @@ const PasswordInput = class {
33943
34242
  invalidClass = this.isValid == true || this.isValid == undefined ? '' : 'text__input--invalid';
33944
34243
  }
33945
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 &&
33946
- 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());
33947
34246
  }
33948
34247
  get element() { return index.getElement(this); }
33949
34248
  static get watchers() { return {
@@ -34023,7 +34322,7 @@ const RadioInput = class {
34023
34322
  }
34024
34323
  setErrorMessage() {
34025
34324
  if (this.inputReference.validity.valueMissing) {
34026
- return translate$2('requiredError', this.language);
34325
+ return translate$3('requiredError', this.language);
34027
34326
  }
34028
34327
  }
34029
34328
  renderTooltip() {
@@ -34034,7 +34333,7 @@ const RadioInput = class {
34034
34333
  }
34035
34334
  render() {
34036
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 &&
34037
- 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());
34038
34337
  }
34039
34338
  static get watchers() { return {
34040
34339
  "isValid": ["validityChanged"],
@@ -38987,7 +39286,7 @@ const SelectInput = class {
38987
39286
  }
38988
39287
  setErrorMessage() {
38989
39288
  if (this.inputReference.validity.valueMissing) {
38990
- return translate$2('requiredError', this.language);
39289
+ return translate$3('requiredError', this.language);
38991
39290
  }
38992
39291
  }
38993
39292
  renderTooltip() {
@@ -39002,7 +39301,7 @@ const SelectInput = class {
39002
39301
  invalidClass = this.isValid == true || this.isValid == undefined ? '' : 'text__input--invalid';
39003
39302
  }
39004
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 &&
39005
- 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));
39006
39305
  }
39007
39306
  get element() { return index.getElement(this); }
39008
39307
  static get watchers() { return {
@@ -39152,13 +39451,13 @@ const TelInput = class {
39152
39451
  if (this.inputReference.validity.patternMismatch) {
39153
39452
  const errorCode = (_a = this.validation.custom.find(customValidation => customValidation.rule === 'regex')) === null || _a === void 0 ? void 0 : _a.errorKey;
39154
39453
  const errorMessage = (_b = this.validation.custom.find(customValidation => customValidation.rule === 'regex')) === null || _b === void 0 ? void 0 : _b.errorMessage;
39155
- return translate$2(`${errorCode}`, this.language) ? translate$2(`${errorCode}`, this.language) : errorMessage;
39454
+ return translate$3(`${errorCode}`, this.language) ? translate$3(`${errorCode}`, this.language) : errorMessage;
39156
39455
  }
39157
39456
  if (this.inputReference.validity.tooShort || this.inputReference.validity.tooLong) {
39158
- return translate$2('lengthError', this.language, { values: { minLength: this.validation.minLength, maxLength: this.validation.maxLength } });
39457
+ return translate$3('lengthError', this.language, { values: { minLength: this.validation.minLength, maxLength: this.validation.maxLength } });
39159
39458
  }
39160
39459
  if (this.inputReference.validity.valueMissing) {
39161
- return translate$2('requiredError', this.language);
39460
+ return translate$3('requiredError', this.language);
39162
39461
  }
39163
39462
  }
39164
39463
  renderTooltip() {
@@ -39173,7 +39472,7 @@ const TelInput = class {
39173
39472
  invalidClass = this.isValid == true || this.isValid == undefined ? '' : 'text__input--invalid';
39174
39473
  }
39175
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 &&
39176
- 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));
39177
39476
  }
39178
39477
  static get watchers() { return {
39179
39478
  "isValid": ["validityChanged"],
@@ -39316,18 +39615,18 @@ const TextInput = class {
39316
39615
  if (this.inputReference.validity.patternMismatch) {
39317
39616
  const errorCode = (_a = this.validation.custom.find(customValidation => customValidation.rule === 'regex')) === null || _a === void 0 ? void 0 : _a.errorKey;
39318
39617
  const errorMessage = (_b = this.validation.custom.find(customValidation => customValidation.rule === 'regex')) === null || _b === void 0 ? void 0 : _b.errorMessage;
39319
- return translate$2(`${errorCode}`, this.language) ? translate$2(`${errorCode}`, this.language) : errorMessage;
39618
+ return translate$3(`${errorCode}`, this.language) ? translate$3(`${errorCode}`, this.language) : errorMessage;
39320
39619
  }
39321
39620
  if (this.inputReference.validity.tooShort || this.inputReference.validity.tooLong) {
39322
- return translate$2('lengthError', this.language, { values: { minLength: this.validation.minLength, maxLength: this.validation.maxLength } });
39621
+ return translate$3('lengthError', this.language, { values: { minLength: this.validation.minLength, maxLength: this.validation.maxLength } });
39323
39622
  }
39324
39623
  if (this.inputReference.validity.valueMissing) {
39325
- return translate$2('requiredError', this.language);
39624
+ return translate$3('requiredError', this.language);
39326
39625
  }
39327
39626
  if (this.isDuplicateInput && this.duplicateInputValue !== this.value) {
39328
39627
  const errorCode = (_c = this.validation.custom.find(customRule => customRule.rule === 'duplicate-input')) === null || _c === void 0 ? void 0 : _c.errorKey;
39329
39628
  const errorMessage = (_d = this.validation.custom.find(customRule => customRule.rule === 'duplicate-input')) === null || _d === void 0 ? void 0 : _d.errorMessage;
39330
- return translate$2(`${errorCode}`, this.language) ? translate$2(`${errorCode}`, this.language) : errorMessage;
39629
+ return translate$3(`${errorCode}`, this.language) ? translate$3(`${errorCode}`, this.language) : errorMessage;
39331
39630
  }
39332
39631
  }
39333
39632
  renderTooltip() {
@@ -39342,7 +39641,7 @@ const TextInput = class {
39342
39641
  invalidClass = this.isValid == true || this.isValid == undefined ? '' : 'text__input--invalid';
39343
39642
  }
39344
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 &&
39345
- 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));
39346
39645
  }
39347
39646
  static get watchers() { return {
39348
39647
  "isValid": ["validityChanged"],
@@ -39413,7 +39712,7 @@ const ToggleCheckboxInput = class {
39413
39712
  }
39414
39713
  setErrorMessage() {
39415
39714
  if (this.checkboxReference.validity.valueMissing) {
39416
- return translate$2('requiredError', this.language);
39715
+ return translate$3('requiredError', this.language);
39417
39716
  }
39418
39717
  }
39419
39718
  renderLabel() {
@@ -39427,7 +39726,7 @@ const ToggleCheckboxInput = class {
39427
39726
  }
39428
39727
  render() {
39429
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 &&
39430
- 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 => {
39431
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 });
39432
39731
  })));
39433
39732
  }
@@ -39438,6 +39737,7 @@ exports.checkbox_group_input = CheckboxGroupInput;
39438
39737
  exports.checkbox_input = CheckboxInput;
39439
39738
  exports.date_input = DateInput;
39440
39739
  exports.email_input = EmailInput;
39740
+ exports.general_consents = GeneralConsents;
39441
39741
  exports.general_input = GeneralInput;
39442
39742
  exports.general_registration = GeneralRegistration;
39443
39743
  exports.number_input = NumberInput;