@everymatrix/general-registration 1.10.26 → 1.11.1

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.
Files changed (28) hide show
  1. package/dist/cjs/checkbox-group-input_13.cjs.entry.js +132 -17
  2. package/dist/cjs/general-registration.cjs.js +2 -2
  3. package/dist/cjs/{index-c322b593.js → index-0b9241d1.js} +35 -2
  4. package/dist/cjs/loader.cjs.js +2 -2
  5. package/dist/collection/components/general-registration/general-registration.css +36 -0
  6. package/dist/collection/components/general-registration/general-registration.js +26 -4
  7. package/dist/components/date-input2.js +67 -3
  8. package/dist/components/email-input2.js +1 -1
  9. package/dist/components/general-registration.js +25 -5
  10. package/dist/components/number-input2.js +1 -1
  11. package/dist/components/password-input2.js +32 -4
  12. package/dist/components/select-input2.js +1 -1
  13. package/dist/components/tel-input2.js +1 -1
  14. package/dist/components/text-input2.js +1 -1
  15. package/dist/components/tooltipIcon.js +6 -1
  16. package/dist/esm/checkbox-group-input_13.entry.js +132 -17
  17. package/dist/esm/general-registration.js +2 -2
  18. package/dist/esm/{index-e6868e88.js → index-a42c182c.js} +35 -2
  19. package/dist/esm/loader.js +2 -2
  20. package/dist/general-registration/general-registration.esm.js +1 -1
  21. package/dist/general-registration/{p-f82ab839.entry.js → p-0a855900.entry.js} +91 -91
  22. package/dist/general-registration/p-4ff02444.js +1 -0
  23. package/dist/types/Users/user/workspace/everymatrix/widgets-stencil/packages/general-registration/.stencil/packages/general-registration/stencil.config.d.ts +2 -0
  24. package/dist/types/components/general-registration/general-registration.d.ts +1 -0
  25. package/package.json +2 -2
  26. package/dist/general-registration/p-d7d35144.js +0 -1
  27. package/dist/types/Users/adrian.pripon/Documents/Work/stencil/widgets-stencil/packages/general-registration/.stencil/packages/general-registration/stencil.config.d.ts +0 -2
  28. /package/dist/types/Users/{adrian.pripon/Documents/Work/stencil → user/workspace/everymatrix}/widgets-stencil/packages/general-registration/.stencil/packages/general-input/src/utils/types.d.ts +0 -0
@@ -2,15 +2,17 @@
2
2
 
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
- const index = require('./index-c322b593.js');
5
+ const index = require('./index-0b9241d1.js');
6
6
 
7
7
  const DEFAULT_LANGUAGE$1 = 'en';
8
8
  const TRANSLATIONS$1 = {
9
9
  "en": {
10
10
  "dateError": 'The selected date should be between {min} and {max}',
11
+ "dateError2": 'The selected date is not within the accepted range',
11
12
  "numberLengthError": 'The number should be between {min} and {max}',
12
13
  "lengthError": `The length should be between {minLength} and {maxLength}`,
13
14
  "requiredError": 'This input is required.',
15
+ "invalidOriginalPasswordError": "Initial password field does not validate all criteria.",
14
16
  "passwordStrength": "Password strength",
15
17
  "passwordStrengthWeak": "is not adequate",
16
18
  "passwordStrengthStrong": "is adequate",
@@ -21,12 +23,14 @@ const TRANSLATIONS$1 = {
21
23
  "MustIncludeNumber": "include a number",
22
24
  "MustContainCapital": "contain capital letters",
23
25
  "MustIncludePunctation": "punctuation",
26
+ "OnlyNumbers": "Should contains only numbers."
24
27
  },
25
28
  "hu": {
26
29
  "dateError": 'A választott dátumnak {min} és {max} között kell lennie',
27
30
  "numberLengthError": 'A számnak {min} és {max} között kell lennie',
28
31
  "lengthError": `A hossznak {minLength} és {maxLength} között kell lennie`,
29
32
  "requiredError": 'Ez a beviteli mező kötelező.',
33
+ "invalidOriginalPasswordError": "Initial password field does not validate all criteria.",
30
34
  "passwordStrength": "Jelszó erőssége",
31
35
  "passwordStrengthWeak": "nem megfelelő",
32
36
  "passwordStrengthStrong": "megfelelő",
@@ -36,7 +40,8 @@ const TRANSLATIONS$1 = {
36
40
  "PasswordNotMatching": "A jelszavak nem egyeznek",
37
41
  "MustIncludeNumber": "tartalmaznia kell egy számot",
38
42
  "MustContainCapital": "nagybetűket kell tartalmaznia",
39
- "MustIncludePunctation": "írásjelet"
43
+ "MustIncludePunctation": "írásjelet",
44
+ "OnlyNumbers": "Csak számokat kell tartalmaznia."
40
45
  }
41
46
  };
42
47
  const translate$2 = (key, customLang, values) => {
@@ -29231,6 +29236,56 @@ function cleanEscapedString(input) {
29231
29236
  return input.match(escapedStringRegExp)[1].replace(doubleQuoteRegExp, "'");
29232
29237
  }
29233
29238
 
29239
+ /**
29240
+ * @name isAfter
29241
+ * @category Common Helpers
29242
+ * @summary Is the first date after the second one?
29243
+ *
29244
+ * @description
29245
+ * Is the first date after the second one?
29246
+ *
29247
+ * @param {Date|Number} date - the date that should be after the other one to return true
29248
+ * @param {Date|Number} dateToCompare - the date to compare with
29249
+ * @returns {Boolean} the first date is after the second date
29250
+ * @throws {TypeError} 2 arguments required
29251
+ *
29252
+ * @example
29253
+ * // Is 10 July 1989 after 11 February 1987?
29254
+ * const result = isAfter(new Date(1989, 6, 10), new Date(1987, 1, 11))
29255
+ * //=> true
29256
+ */
29257
+ function isAfter(dirtyDate, dirtyDateToCompare) {
29258
+ requiredArgs(2, arguments);
29259
+ var date = toDate(dirtyDate);
29260
+ var dateToCompare = toDate(dirtyDateToCompare);
29261
+ return date.getTime() > dateToCompare.getTime();
29262
+ }
29263
+
29264
+ /**
29265
+ * @name isBefore
29266
+ * @category Common Helpers
29267
+ * @summary Is the first date before the second one?
29268
+ *
29269
+ * @description
29270
+ * Is the first date before the second one?
29271
+ *
29272
+ * @param {Date|Number} date - the date that should be before the other one to return true
29273
+ * @param {Date|Number} dateToCompare - the date to compare with
29274
+ * @returns {Boolean} the first date is before the second date
29275
+ * @throws {TypeError} 2 arguments required
29276
+ *
29277
+ * @example
29278
+ * // Is 10 July 1989 before 11 February 1987?
29279
+ * const result = isBefore(new Date(1989, 6, 10), new Date(1987, 1, 11))
29280
+ * //=> false
29281
+ */
29282
+ function isBefore(dirtyDate, dirtyDateToCompare) {
29283
+ requiredArgs(2, arguments);
29284
+ var date = toDate(dirtyDate);
29285
+ var dateToCompare = toDate(dirtyDateToCompare);
29286
+ return date.getTime() < dateToCompare.getTime();
29287
+ }
29288
+
29234
29289
  const dateInputCss = "*,*::before,*::after{padding:0;margin:0;box-sizing:border-box}.date{font-family:\"Roboto\";font-style:normal}.date__wrapper{position:relative;width:100%;padding-top:26px}.date__label{font-family:inherit;font-style:normal;font-weight:500;font-size:16px;line-height:20px;color:#2A3841;position:absolute;top:0;left:0}.date__label--required::after{content:\"*\";font-family:inherit;color:#2A3841;margin-left:2px}.date__input{border:none;width:inherit;position:relative}.date__input[focused]::part(input-field){border-color:#3E3E3E}.date__input[invalid]::part(input-field){border-color:#cc0000b3}.date__input::part(input-field){border-radius:4px;background-color:#FFFFFF;border:2px solid #DEE1EE;color:#2A2E3F;border-radius:4px;background-color:transparent;font-family:inherit;font-style:normal;font-weight:300;font-size:16px;line-height:19px}.date__error-message{position:absolute;top:calc(100% + 5px);left:0;color:#cc0000b3}.date__tooltip-icon{position:absolute;right:0;bottom:10px}.date__tooltip{position:absolute;bottom:35px;right:10px;background-color:#FFFFFF;border:1px solid #B0B0B0;color:#2B2D3F;padding:10px;border-radius:5px;opacity:0;transition:opacity 0.3s ease-in-out;z-index:10}.date__tooltip.visible{opacity:1}";
29235
29290
 
29236
29291
  const DateInput = class {
@@ -29288,6 +29343,11 @@ const DateInput = class {
29288
29343
  if (event.composedPath()[0] !== this.tooltipReference)
29289
29344
  this.showTooltip = false;
29290
29345
  }
29346
+ connectedCallback() {
29347
+ var _a, _b;
29348
+ this.minDate = parse(((_a = this.validation.min) === null || _a === void 0 ? void 0 : _a.toString()) || '', 'yyyy-MM-dd', new Date());
29349
+ this.maxDate = parse(((_b = this.validation.max) === null || _b === void 0 ? void 0 : _b.toString()) || '', 'yyyy-MM-dd', new Date());
29350
+ }
29291
29351
  componentDidRender() {
29292
29352
  // start custom styling area
29293
29353
  if (!this.limitStylingAppends && this.stylingContainer) {
@@ -29310,14 +29370,23 @@ const DateInput = class {
29310
29370
  handleInput(event) {
29311
29371
  this.value = event.target.value;
29312
29372
  this.touched = true;
29313
- this.errorMessage = this.setErrorMessage();
29373
+ this.valueAsDate = parse(this.value || '', 'yyyy-MM-dd', new Date());
29314
29374
  this.isValid = this.setValidity();
29375
+ this.errorMessage = this.setErrorMessage();
29315
29376
  this.emitValueHandler(true);
29316
29377
  }
29317
29378
  setValidity() {
29318
- return this.inputReference.validity.valid;
29379
+ if (isBefore(this.valueAsDate, this.minDate) || isAfter(this.valueAsDate, this.maxDate)) {
29380
+ return false;
29381
+ }
29382
+ else {
29383
+ return this.inputReference.validity.valid;
29384
+ }
29319
29385
  }
29320
29386
  setErrorMessage() {
29387
+ if (isBefore(this.valueAsDate, this.minDate) || isAfter(this.valueAsDate, this.maxDate)) {
29388
+ return translate$2('dateError2', this.language);
29389
+ }
29321
29390
  if (this.inputReference.validity.rangeUnderflow || this.inputReference.validity.rangeOverflow) {
29322
29391
  return translate$2('dateError', this.language, { values: { min: this.validation.min, max: this.validation.max } });
29323
29392
  }
@@ -29336,7 +29405,7 @@ const DateInput = class {
29336
29405
  if (this.touched) {
29337
29406
  invalidClass = this.isValid == true || this.isValid == undefined ? '' : 'text__input--invalid';
29338
29407
  }
29339
- return index.h("div", { class: `date__wrapper ${this.name}__input`, ref: el => this.stylingContainer = el }, index.h("label", { class: `date__label ${this.validation.mandatory ? 'date__label--required' : ''}}`, htmlFor: `${this.name}__input` }, this.displayName, " ", this.validation.mandatory ? '*' : ''), index.h("vaadin-date-picker", { id: `${this.name}__input`, type: 'date', class: `date__input ${invalidClass}`, value: this.defaultValue, readOnly: this.autofilled, placeholder: `${this.placeholder} ${this.placeholder && this.validation.mandatory ? '*' : ''}`, required: this.validation.mandatory, max: this.validation.max, min: this.validation.min, onChange: (e) => this.handleInput(e), onBlur: this.handleBlur }), index.h("small", { class: 'date__error-message' }, this.errorMessage), this.tooltip &&
29408
+ return index.h("div", { class: `date__wrapper ${this.name}__input`, ref: el => this.stylingContainer = el }, index.h("label", { class: `date__label ${this.validation.mandatory ? 'date__label--required' : ''}}`, htmlFor: `${this.name}__input` }, this.displayName, " ", this.validation.mandatory ? '*' : ''), index.h("vaadin-date-picker", { 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", { class: 'date__error-message' }, this.errorMessage), this.tooltip &&
29340
29409
  index.h("img", { class: 'date__tooltip-icon', src: tooltipIconSvg, alt: "", ref: (el) => this.tooltipIconReference = el, onClick: () => this.showTooltip = !this.showTooltip }), this.renderTooltip());
29341
29410
  }
29342
29411
  get element() { return index.getElement(this); }
@@ -29474,7 +29543,7 @@ const EmailInput = class {
29474
29543
  invalidClass = this.isValid == true || this.isValid == undefined ? '' : 'text__input--invalid';
29475
29544
  }
29476
29545
  return index.h("div", { class: `email__wrapper ${this.name}__input`, ref: el => this.stylingContainer = el }, index.h("div", { class: 'email__wrapper--flex' }, index.h("label", { class: `email__label ${this.validation.mandatory ? 'email__label--required' : ''}`, htmlFor: `${this.name}__input` }, this.displayName), index.h("div", { class: 'email__wrapper--relative' }, this.tooltip &&
29477
- index.h("img", { class: 'email__tooltip-icon', src: tooltipIconSvg, alt: "", ref: (el) => this.tooltipIconReference = el, onClick: () => this.showTooltip = !this.showTooltip }), this.renderTooltip())), index.h("input", { id: `${this.name}__input`, type: 'email', class: `email__input ${invalidClass}`, value: this.defaultValue, readOnly: this.autofilled, placeholder: `${this.placeholder} ${this.placeholder && this.validation.mandatory ? '*' : ''}`, 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", { class: 'email__error-message' }, this.errorMessage));
29546
+ index.h("img", { class: 'email__tooltip-icon', src: tooltipIconSvg, alt: "", ref: (el) => this.tooltipIconReference = el, onClick: () => this.showTooltip = !this.showTooltip }), this.renderTooltip())), index.h("input", { 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", { class: 'email__error-message' }, this.errorMessage));
29478
29547
  }
29479
29548
  static get watchers() { return {
29480
29549
  "isValid": ["validityChanged"],
@@ -29584,7 +29653,7 @@ const translate = (key, customLang, values) => {
29584
29653
  return translation;
29585
29654
  };
29586
29655
 
29587
- const generalRegistrationCss = "*,\n*::before,\n*::after {\n padding: 0;\n margin: 0;\n box-sizing: border-box;\n}\n\n.registration__form.hidden {\n display: none;\n}\n\n.registration {\n font-family: \"Roboto\";\n font-style: normal;\n font-family: sans-serif;\n display: flex;\n flex-direction: column;\n gap: 24px;\n width: 100%;\n height: 100%;\n container-type: inline-size;\n}\n.registration__error-message {\n color: #cc0000b3;\n}\n.registration__form {\n display: grid;\n grid-template-columns: repeat(1, 1fr);\n gap: 40px;\n justify-items: stretch;\n align-content: flex-start;\n overflow: auto;\n width: 100%;\n height: 100%;\n}\n.registration__buttons-wrapper {\n display: flex;\n flex-direction: column;\n justify-content: space-around;\n align-items: center;\n}\n.registration__button {\n border: none;\n border-radius: 20px;\n box-shadow: 0px 2px 1px rgba(11, 16, 19, 0.6);\n color: #0B1013;\n font-size: 18px;\n font-weight: bold;\n text-transform: uppercase;\n width: 150px;\n height: 45px;\n}\n.registration__button--disabled {\n color: #647480;\n background-color: #CFCFCF;\n box-shadow: none;\n}\n.registration__button--first-step {\n display: none;\n}\n\n@container (min-width: 450px) {\n .registration__form {\n grid-template-columns: repeat(2, 1fr);\n }\n\n .registration__buttons-wrapper {\n flex-direction: row-reverse;\n gap: 15px;\n }\n}";
29656
+ const generalRegistrationCss = "*,\n*::before,\n*::after {\n padding: 0;\n margin: 0;\n box-sizing: border-box;\n}\n\n.registration__form.hidden {\n display: none;\n}\n\n.registration {\n font-family: \"Roboto\";\n font-style: normal;\n font-family: sans-serif;\n display: flex;\n flex-direction: column;\n gap: 24px;\n width: 100%;\n height: 100%;\n container-type: inline-size;\n}\n.registration__error-message {\n color: #cc0000b3;\n}\n.registration__form {\n display: grid;\n grid-template-columns: repeat(1, 1fr);\n gap: 40px;\n justify-items: stretch;\n align-content: flex-start;\n overflow: auto;\n width: 100%;\n height: 100%;\n}\n.registration__buttons-wrapper {\n display: flex;\n flex-direction: column;\n justify-content: space-around;\n align-items: center;\n position: relative;\n}\n.registration__button {\n border: none;\n border-radius: 20px;\n box-shadow: 0px 2px 1px rgba(11, 16, 19, 0.6);\n color: #0B1013;\n font-size: 18px;\n font-weight: bold;\n text-transform: uppercase;\n width: 150px;\n height: 45px;\n}\n.registration__button--disabled {\n color: #647480;\n background-color: #CFCFCF;\n box-shadow: none;\n}\n.registration__button--first-step {\n display: none;\n}\n\n@container (min-width: 450px) {\n .registration__form {\n grid-template-columns: repeat(2, 1fr);\n }\n\n .registration__buttons-wrapper {\n flex-direction: row-reverse;\n gap: 15px;\n }\n}\n.spinner {\n animation: rotate 2s linear infinite;\n z-index: 2;\n position: absolute;\n top: 50%;\n left: 50%;\n margin: -25px 0 0 -25px;\n width: 50px;\n height: 50px;\n}\n.spinner .path {\n stroke: #E37912;\n stroke-linecap: round;\n animation: dash 1.5s ease-in-out infinite;\n}\n\n@keyframes rotate {\n 100% {\n transform: rotate(360deg);\n }\n}\n@keyframes dash {\n 0% {\n stroke-dasharray: 1, 150;\n stroke-dashoffset: 0;\n }\n 50% {\n stroke-dasharray: 90, 150;\n stroke-dashoffset: -35;\n }\n 100% {\n stroke-dasharray: 90, 150;\n stroke-dashoffset: -124;\n }\n}";
29588
29657
 
29589
29658
  const GeneralRegistration = class {
29590
29659
  constructor(hostRef) {
@@ -29763,6 +29832,7 @@ const GeneralRegistration = class {
29763
29832
  });
29764
29833
  }
29765
29834
  setRegisterStep() {
29835
+ this.isLoadingPOST = true;
29766
29836
  const url = new URL(`${this.endpoint}/v1/player/legislation/registration/step`);
29767
29837
  const registerStep = {
29768
29838
  registrationId: this.registrationID,
@@ -29819,6 +29889,7 @@ const GeneralRegistration = class {
29819
29889
  return res.json();
29820
29890
  })
29821
29891
  .then((data) => {
29892
+ this.isLoadingPOST = false;
29822
29893
  this.registrationID = data.registrationId;
29823
29894
  if (this.listOfActions.some(action => action == '/register')) {
29824
29895
  this.setRegister();
@@ -29843,7 +29914,10 @@ const GeneralRegistration = class {
29843
29914
  }
29844
29915
  })
29845
29916
  .catch((err) => {
29917
+ this.isLoadingPOST = false;
29846
29918
  console.error(err);
29919
+ }).finally(() => {
29920
+ this.isLoadingPOST = false;
29847
29921
  });
29848
29922
  }
29849
29923
  setRegister() {
@@ -29859,8 +29933,20 @@ const GeneralRegistration = class {
29859
29933
  };
29860
29934
  fetch(url.href, options)
29861
29935
  .then((res) => {
29862
- if (res.status >= 300) {
29863
- throw new Error('err');
29936
+ if (!res.ok) {
29937
+ return res.json().then(error => {
29938
+ this.errorCode = error.thirdPartyResponse.errorCode;
29939
+ // Show the idomsoft error if it is the case
29940
+ if (this.errorCode == 'GmErr_BadRequest_IdomsoftVerification_ShouldRetry') {
29941
+ this.errorMessage = error.thirdPartyResponse.message;
29942
+ }
29943
+ else if (this.errorCode == 'GmErr_BadRequest') {
29944
+ this.errorMessage = error.thirdPartyResponse.message;
29945
+ }
29946
+ else {
29947
+ this.errorMessage = translate(`${this.errorCode}`, this.language) || this.errorCode;
29948
+ }
29949
+ });
29864
29950
  }
29865
29951
  return res.json();
29866
29952
  })
@@ -29948,7 +30034,7 @@ const GeneralRegistration = class {
29948
30034
  this.listOfInputs.forEach(field => {
29949
30035
  var _a, _b;
29950
30036
  this.addTranslation(field);
29951
- // Logic for fields types that have subfields
30037
+ // Logic for field types that have subfields
29952
30038
  if (((_a = field.inputType) === null || _a === void 0 ? void 0 : _a.toLowerCase()) === 'togglecheckbox') {
29953
30039
  field.data.subFields.forEach(subField => this.addTranslation(subField));
29954
30040
  }
@@ -30021,7 +30107,9 @@ const GeneralRegistration = class {
30021
30107
  }
30022
30108
  ;
30023
30109
  renderButtons() {
30024
- return (index.h("div", { class: 'registration__buttons-wrapper' }, index.h("button", { class: `registration__button registration__button--next ${this.isFormValid ? '' : 'registration__button--disabled'}`, type: 'submit', form: `RegistrationForm${this.registrationStep}`, onClick: (e) => this.nextHandler(e), disabled: !this.isFormValid }, this.lastStep === this.registrationStep ? translate('doneButton', this.language) : translate('nextButton', this.language)), index.h("button", { class: `registration__button registration__button--back ${this.registrationStep == 'Step1' ? 'registration__button--first-step' : ''}`, onClick: (e) => this.backHandler(e) }, translate('backButton', this.language))));
30110
+ return (index.h("div", { class: 'registration__buttons-wrapper' }, this.isLoadingPOST
30111
+ && index.h("slot", { name: 'spinner' })
30112
+ && index.h("svg", { class: "spinner", viewBox: "0 0 50 50" }, index.h("circle", { class: "path", cx: "25", cy: "25", r: "20", fill: "none", "stroke-width": "5" })), !this.isLoadingPOST && index.h("button", { class: `registration__button registration__button--next ${this.isFormValid ? '' : 'registration__button--disabled'}`, type: 'submit', form: `RegistrationForm${this.registrationStep}`, onClick: (e) => this.nextHandler(e), disabled: !this.isFormValid }, this.lastStep === this.registrationStep ? translate('doneButton', this.language) : translate('nextButton', this.language)), index.h("button", { class: `registration__button registration__button--back ${this.registrationStep == 'Step1' ? 'registration__button--first-step' : ''}`, onClick: (e) => this.backHandler(e) }, translate('backButton', this.language))));
30025
30113
  }
30026
30114
  render() {
30027
30115
  if (this.isLoading) {
@@ -30152,7 +30240,7 @@ const NumberInput = class {
30152
30240
  invalidClass = this.isValid == true || this.isValid == undefined ? '' : 'text__input--invalid';
30153
30241
  }
30154
30242
  return index.h("div", { class: `number__wrapper ${this.name}__input`, ref: el => this.stylingContainer = el }, index.h("div", { class: 'number__wrapper--flex' }, index.h("label", { class: `number__label ${this.validation.mandatory ? 'number__label--required' : ''}`, htmlFor: `${this.name}__input` }, this.displayName), index.h("div", { class: 'number__wrapper--relative' }, this.tooltip &&
30155
- index.h("img", { class: 'number__tooltip-icon', src: tooltipIconSvg, alt: "", ref: (el) => this.tooltipIconReference = el, onClick: () => this.showTooltip = !this.showTooltip }), this.renderTooltip())), index.h("input", { 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} ${this.placeholder && this.validation.mandatory ? '*' : ''}`, required: this.validation.mandatory, max: this.validation.max, min: this.validation.min, onInput: this.handleInput, onBlur: this.handleBlur }), index.h("small", { class: 'number__error-message' }, this.errorMessage));
30243
+ index.h("img", { class: 'number__tooltip-icon', src: tooltipIconSvg, alt: "", ref: (el) => this.tooltipIconReference = el, onClick: () => this.showTooltip = !this.showTooltip }), this.renderTooltip())), index.h("input", { 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", { class: 'number__error-message' }, this.errorMessage));
30156
30244
  }
30157
30245
  static get watchers() { return {
30158
30246
  "isValid": ["validityChanged"],
@@ -30981,6 +31069,7 @@ const passwordInputCss = "*,*::before,*::after{padding:0;margin:0;box-sizing:bor
30981
31069
  const PasswordInput = class {
30982
31070
  constructor(hostRef) {
30983
31071
  index.registerInstance(this, hostRef);
31072
+ this.sendOriginalValidityState = index.createEvent(this, "sendOriginalValidityState", 7);
30984
31073
  this.sendValidityState = index.createEvent(this, "sendValidityState", 7);
30985
31074
  this.sendInputValue = index.createEvent(this, "sendInputValue", 7);
30986
31075
  /**
@@ -30994,8 +31083,9 @@ const PasswordInput = class {
30994
31083
  this.limitStylingAppends = false;
30995
31084
  this.showTooltip = false;
30996
31085
  this.showPopup = true;
30997
- this.touched = false;
30998
31086
  this.value = '';
31087
+ this.touched = false;
31088
+ this.originalValid = false;
30999
31089
  this.validationPattern = '';
31000
31090
  this.duplicateInputValue = null;
31001
31091
  this.handleInput = (event) => {
@@ -31031,6 +31121,13 @@ const PasswordInput = class {
31031
31121
  this.valueHandler({ name: this.name, value: this.value });
31032
31122
  }
31033
31123
  }
31124
+ valueChanged() {
31125
+ if (!this.isDuplicateInput) {
31126
+ // recalculate complexity immediately in order to send the correct validity to the duplicate
31127
+ this.calculateComplexity(this.value);
31128
+ this.sendOriginalValidityState.emit({ name: this.name, valid: this.setValidity() });
31129
+ }
31130
+ }
31034
31131
  emitValueHandler(newValue) {
31035
31132
  if (newValue == true && this.isValid) {
31036
31133
  this.valueHandler({ name: this.name, value: this.value, type: 'duplicate' });
@@ -31042,6 +31139,20 @@ const PasswordInput = class {
31042
31139
  valueHandler(inputValueEvent) {
31043
31140
  this.sendInputValue.emit(inputValueEvent);
31044
31141
  }
31142
+ originalValidityChangedHandler(event) {
31143
+ if (this.isDuplicateInput) {
31144
+ if (event.detail.valid) {
31145
+ this.originalValid = true;
31146
+ this.isValid = this.setValidity();
31147
+ }
31148
+ else {
31149
+ this.originalValid = false;
31150
+ this.isValid = false;
31151
+ // only show error if the user has touched the input, in order to not show errors on empty inputs
31152
+ this.value !== '' && (this.errorMessage = this.setErrorMessage());
31153
+ }
31154
+ }
31155
+ }
31045
31156
  valueChangedHandler(event) {
31046
31157
  if (this.isDuplicateInput && this.name === event.detail.name + 'Duplicate') {
31047
31158
  this.duplicateInputValue = event.detail.value;
@@ -31116,6 +31227,9 @@ const PasswordInput = class {
31116
31227
  }
31117
31228
  setErrorMessage() {
31118
31229
  var _a, _b, _c, _d;
31230
+ if (this.isDuplicateInput && !this.originalValid) {
31231
+ return translate$2('invalidOriginalPasswordError', this.language);
31232
+ }
31119
31233
  if (this.inputReference.validity.patternMismatch) {
31120
31234
  const errorCode = (_a = this.validation.custom.find(customValidation => customValidation.rule === 'regex')) === null || _a === void 0 ? void 0 : _a.errorKey;
31121
31235
  const errorMessage = (_b = this.validation.custom.find(customValidation => customValidation.rule === 'regex')) === null || _b === void 0 ? void 0 : _b.errorMessage;
@@ -31154,11 +31268,12 @@ const PasswordInput = class {
31154
31268
  invalidClass = this.isValid == true || this.isValid == undefined ? '' : 'text__input--invalid';
31155
31269
  }
31156
31270
  return index.h("div", { class: `password__wrapper ${this.name}__input`, ref: el => this.stylingContainer = el }, index.h("div", { class: 'password__wrapper--flex' }, index.h("label", { class: `password__label ${this.validation.mandatory ? 'password__label--required' : ''}`, htmlFor: `${this.name}__input` }, this.displayName), index.h("div", { class: 'password__wrapper--relative' }, this.tooltip &&
31157
- index.h("img", { class: 'password__tooltip-icon', src: tooltipIconSvg, alt: "", ref: (el) => this.tooltipIconReference = el, onClick: () => this.showTooltip = !this.showTooltip }), this.renderTooltip())), index.h("vaadin-password-field", { 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} ${this.placeholder && this.validation.mandatory ? '*' : ''}`, onInput: this.handleInput, onBlur: this.handleBlur, onFocus: () => this.showPopup = true }), index.h("small", { class: 'password__error-message' }, this.errorMessage), this.passwordComplexity && !this.isDuplicateInput && this.renderComplexityPopup());
31271
+ index.h("img", { class: 'password__tooltip-icon', src: tooltipIconSvg, alt: "", ref: (el) => this.tooltipIconReference = el, onClick: () => this.showTooltip = !this.showTooltip }), this.renderTooltip())), index.h("vaadin-password-field", { 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.showPopup = true }), index.h("small", { class: 'password__error-message' }, this.errorMessage), this.passwordComplexity && !this.isDuplicateInput && this.renderComplexityPopup());
31158
31272
  }
31159
31273
  get element() { return index.getElement(this); }
31160
31274
  static get watchers() { return {
31161
31275
  "isValid": ["validityChanged"],
31276
+ "value": ["valueChanged"],
31162
31277
  "emitValue": ["emitValueHandler"]
31163
31278
  }; }
31164
31279
  };
@@ -35695,7 +35810,7 @@ const SelectInput = class {
35695
35810
  invalidClass = this.isValid == true || this.isValid == undefined ? '' : 'text__input--invalid';
35696
35811
  }
35697
35812
  return index.h("div", { class: `select__wrapper ${this.name}__input`, ref: el => this.stylingContainer = el }, index.h("div", { class: 'select__wrapper--flex' }, index.h("label", { class: 'select__label', htmlFor: `${this.name}__input` }, `${this.displayName} ${this.validation.mandatory ? '*' : ''}`), index.h("div", { class: 'select__wrapper--relative' }, this.tooltip &&
35698
- index.h("img", { class: 'select__tooltip-icon', src: tooltipIconSvg, alt: "", ref: (el) => this.tooltipIconReference = el, onClick: () => this.showTooltip = !this.showTooltip }), this.renderTooltip())), index.h("vaadin-combo-box", { name: this.name, id: `${this.name}__input`, class: `select__input ${invalidClass}`, "item-label-path": "label", "item-value-path": "value", readOnly: this.autofilled, required: this.validation.mandatory, value: this.defaultValue, placeholder: `${this.placeholder} ${this.placeholder && this.validation.mandatory ? '*' : ''}`, items: this.displayedOptions, onChange: this.handleChange }), index.h("small", { class: 'select__error-message' }, this.errorMessage));
35813
+ index.h("img", { class: 'select__tooltip-icon', src: tooltipIconSvg, alt: "", ref: (el) => this.tooltipIconReference = el, onClick: () => this.showTooltip = !this.showTooltip }), this.renderTooltip())), index.h("vaadin-combo-box", { name: this.name, id: `${this.name}__input`, class: `select__input ${invalidClass}`, "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", { class: 'select__error-message' }, this.errorMessage));
35699
35814
  }
35700
35815
  get element() { return index.getElement(this); }
35701
35816
  static get watchers() { return {
@@ -35855,7 +35970,7 @@ const TelInput = class {
35855
35970
  invalidClass = this.isValid == true || this.isValid == undefined ? '' : 'text__input--invalid';
35856
35971
  }
35857
35972
  return index.h("div", { class: `tel__wrapper ${this.name}__input`, ref: el => this.stylingContainer = el }, index.h("div", { class: 'tel__wrapper--flex-label' }, index.h("label", { class: `tel__label ${this.validation.mandatory ? 'tel__label--required' : ''}`, htmlFor: `${this.name}__input` }, this.displayName), index.h("div", { class: 'tel__wrapper--relative' }, this.tooltip &&
35858
- index.h("img", { class: 'tel__tooltip-icon', src: tooltipIconSvg, alt: "", ref: (el) => this.tooltipIconReference = el, onClick: () => this.showTooltip = !this.showTooltip }), this.renderTooltip())), index.h("div", { class: `tel__wrapper--flex ${invalidClass}` }, index.h("vaadin-combo-box", { class: 'tel__prefix', items: this.phoneCodesOptions, value: this.prefixValue, readOnly: this.autofilled, onChange: (e) => this.handlePrefixInput(e) }), index.h("input", { type: "tel", ref: (el) => this.inputReference = el, id: `${this.name}__input`, readOnly: this.autofilled, class: `tel__input`, value: this.phoneValue, placeholder: `${this.placeholder} ${this.placeholder && this.validation.mandatory ? '*' : ''}`, required: this.validation.mandatory, minlength: this.validation.minLength, maxlength: this.validation.maxLength, pattern: this.validationPattern, onInput: this.handleInput, onBlur: this.handleBlur })), index.h("small", { class: 'tel__error-message' }, this.errorMessage));
35973
+ index.h("img", { class: 'tel__tooltip-icon', src: tooltipIconSvg, alt: "", ref: (el) => this.tooltipIconReference = el, onClick: () => this.showTooltip = !this.showTooltip }), this.renderTooltip())), index.h("div", { class: `tel__wrapper--flex ${invalidClass}` }, index.h("vaadin-combo-box", { class: 'tel__prefix', items: this.phoneCodesOptions, value: this.prefixValue, readOnly: this.autofilled, onChange: (e) => this.handlePrefixInput(e) }), index.h("input", { 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", { class: 'tel__error-message' }, this.errorMessage));
35859
35974
  }
35860
35975
  static get watchers() { return {
35861
35976
  "isValid": ["validityChanged"],
@@ -36018,7 +36133,7 @@ const TextInput = class {
36018
36133
  invalidClass = this.isValid == true || this.isValid == undefined ? '' : 'text__input--invalid';
36019
36134
  }
36020
36135
  return index.h("div", { class: `text__wrapper ${this.name}__input`, ref: el => this.stylingContainer = el }, index.h("div", { class: 'text__wrapper--flex' }, index.h("label", { class: `text__label ${this.validation.mandatory ? 'text__label--required' : ''}`, htmlFor: `${this.name}__input` }, this.displayName), index.h("div", { class: 'text__wrapper--relative' }, this.tooltip &&
36021
- index.h("img", { class: 'text__tooltip-icon', src: tooltipIconSvg, alt: "", ref: (el) => this.tooltipIconReference = el, onClick: () => this.showTooltip = !this.showTooltip }), this.renderTooltip())), index.h("input", { name: this.name, id: `${this.name}__input`, value: this.defaultValue, type: 'text', class: `text__input ${invalidClass}`, placeholder: `${this.placeholder} ${this.placeholder && this.validation.mandatory ? '*' : ''}`, 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", { class: 'text__error-message' }, this.errorMessage));
36136
+ index.h("img", { class: 'text__tooltip-icon', src: tooltipIconSvg, alt: "", ref: (el) => this.tooltipIconReference = el, onClick: () => this.showTooltip = !this.showTooltip }), this.renderTooltip())), index.h("input", { 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", { class: 'text__error-message' }, this.errorMessage));
36022
36137
  }
36023
36138
  static get watchers() { return {
36024
36139
  "isValid": ["validityChanged"],
@@ -1,6 +1,6 @@
1
1
  'use strict';
2
2
 
3
- const index = require('./index-c322b593.js');
3
+ const index = require('./index-0b9241d1.js');
4
4
 
5
5
  /*
6
6
  Stencil Client Patch Browser v2.15.2 | MIT Licensed | https://stenciljs.com
@@ -15,5 +15,5 @@ const patchBrowser = () => {
15
15
  };
16
16
 
17
17
  patchBrowser().then(options => {
18
- return index.bootstrapLazy([["checkbox-group-input_13.cjs",[[1,"general-registration",{"endpoint":[513],"language":[513],"clientStyling":[1537,"client-styling"],"clientStylingUrl":[513,"client-styling-url"],"translationUrl":[513,"translation-url"],"dateFormat":[513,"date-format"],"buttonInsideForm":[516,"button-inside-form"],"errorMessage":[32],"isFormValid":[32],"isLoading":[32],"registrationStep":[32],"forms":[32],"limitStylingAppends":[32]},[[0,"sendValidityState","checkInputsValidityHandler"],[0,"sendInputValue","getInputsValueHandler"]]],[1,"general-input",{"type":[513],"name":[513],"displayName":[513,"display-name"],"placeholder":[513],"action":[513],"validation":[16],"options":[520],"language":[513],"autofilled":[516],"tooltip":[513],"defaultValue":[520,"default-value"],"emitValue":[516,"emit-value"],"isDuplicateInput":[516,"is-duplicate-input"],"clientStyling":[520,"client-styling"],"dateFormat":[513,"date-format"]}],[1,"toggle-checkbox-input",{"name":[513],"displayName":[513,"display-name"],"defaultValue":[513,"default-value"],"options":[16],"autofilled":[516],"tooltip":[513],"validation":[16],"language":[513],"emitValue":[516,"emit-value"],"clientStyling":[513,"client-styling"],"errorMessage":[32],"isValid":[32],"limitStylingAppends":[32],"showTooltip":[32],"showFields":[32]},[[4,"click","handleClickOutside"]]],[1,"checkbox-group-input",{"name":[513],"displayName":[513,"display-name"],"defaultValue":[513,"default-value"],"autofilled":[516],"tooltip":[513],"options":[16],"validation":[16],"language":[513],"emitValue":[516,"emit-value"],"clientStyling":[513,"client-styling"],"errorMessage":[32],"isValid":[32],"limitStylingAppends":[32],"showTooltip":[32],"selectedValues":[32]},[[4,"click","handleClickOutside"]]],[1,"checkbox-input",{"name":[513],"displayName":[513,"display-name"],"defaultValue":[513,"default-value"],"autofilled":[516],"tooltip":[513],"validation":[16],"language":[513],"emitValue":[516,"emit-value"],"clientStyling":[513,"client-styling"],"errorMessage":[32],"isValid":[32],"limitStylingAppends":[32],"showTooltip":[32]},[[4,"click","handleClickOutside"]]],[1,"date-input",{"name":[513],"displayName":[513,"display-name"],"placeholder":[513],"validation":[16],"defaultValue":[513,"default-value"],"autofilled":[516],"tooltip":[513],"language":[513],"emitValue":[516,"emit-value"],"clientStyling":[513,"client-styling"],"dateFormat":[513,"date-format"],"errorMessage":[32],"isValid":[32],"limitStylingAppends":[32],"showTooltip":[32]},[[4,"click","handleClickOutside"]]],[1,"email-input",{"name":[513],"displayName":[513,"display-name"],"placeholder":[513],"validation":[16],"defaultValue":[513,"default-value"],"autofilled":[516],"tooltip":[513],"language":[513],"emitValue":[516,"emit-value"],"isDuplicateInput":[516,"is-duplicate-input"],"clientStyling":[513,"client-styling"],"errorMessage":[32],"isValid":[32],"limitStylingAppends":[32],"showTooltip":[32]},[[4,"click","handleClickOutside"],[16,"sendInputValue","valueChangedHandler"]]],[1,"number-input",{"name":[513],"displayName":[513,"display-name"],"placeholder":[513],"validation":[16],"defaultValue":[513,"default-value"],"autofilled":[516],"tooltip":[513],"language":[513],"emitValue":[516,"emit-value"],"clientStyling":[513,"client-styling"],"errorMessage":[32],"isValid":[32],"limitStylingAppends":[32],"showTooltip":[32]},[[4,"click","handleClickOutside"]]],[1,"password-input",{"name":[513],"displayName":[513,"display-name"],"placeholder":[513],"defaultValue":[513,"default-value"],"autofilled":[516],"tooltip":[513],"validation":[16],"language":[513],"emitValue":[516,"emit-value"],"isDuplicateInput":[516,"is-duplicate-input"],"clientStyling":[513,"client-styling"],"isValid":[32],"errorMessage":[32],"limitStylingAppends":[32],"showTooltip":[32],"passwordComplexity":[32],"showPopup":[32]},[[16,"sendInputValue","valueChangedHandler"],[4,"click","handleClickOutside"]]],[1,"radio-input",{"name":[513],"displayName":[513,"display-name"],"optionsGroup":[16],"validation":[16],"tooltip":[513],"language":[513],"emitValue":[516,"emit-value"],"clientStyling":[513,"client-styling"],"errorMessage":[32],"isValid":[32],"limitStylingAppends":[32],"showTooltip":[32]},[[4,"click","handleClickOutside"]]],[1,"select-input",{"name":[513],"displayName":[513,"display-name"],"placeholder":[513],"action":[513],"defaultValue":[513,"default-value"],"autofilled":[516],"tooltip":[513],"options":[16],"validation":[16],"language":[513],"emitValue":[516,"emit-value"],"clientStyling":[513,"client-styling"],"errorMessage":[32],"isValid":[32],"limitStylingAppends":[32],"showTooltip":[32]},[[4,"click","handleClickOutside"]]],[1,"tel-input",{"name":[513],"displayName":[513,"display-name"],"placeholder":[513],"showLabels":[516,"show-labels"],"action":[513],"validation":[16],"defaultValue":[520,"default-value"],"autofilled":[516],"tooltip":[513],"language":[513],"emitValue":[516,"emit-value"],"clientStyling":[513,"client-styling"],"isValid":[32],"errorMessage":[32],"limitStylingAppends":[32],"showTooltip":[32]},[[4,"click","handleClickOutside"]]],[1,"text-input",{"name":[513],"displayName":[513,"display-name"],"placeholder":[513],"validation":[16],"defaultValue":[513,"default-value"],"autofilled":[516],"tooltip":[513],"language":[513],"checkValidity":[516,"check-validity"],"emitValue":[516,"emit-value"],"isDuplicateInput":[516,"is-duplicate-input"],"clientStyling":[513,"client-styling"],"isValid":[32],"errorMessage":[32],"limitStylingAppends":[32],"showTooltip":[32]},[[4,"click","handleClickOutside"],[16,"sendInputValue","valueChangedHandler"]]]]]], options);
18
+ return index.bootstrapLazy([["checkbox-group-input_13.cjs",[[1,"general-registration",{"endpoint":[513],"language":[513],"clientStyling":[1537,"client-styling"],"clientStylingUrl":[513,"client-styling-url"],"translationUrl":[513,"translation-url"],"dateFormat":[513,"date-format"],"buttonInsideForm":[516,"button-inside-form"],"errorMessage":[32],"isFormValid":[32],"isLoading":[32],"isLoadingPOST":[32],"registrationStep":[32],"forms":[32],"limitStylingAppends":[32]},[[0,"sendValidityState","checkInputsValidityHandler"],[0,"sendInputValue","getInputsValueHandler"]]],[1,"general-input",{"type":[513],"name":[513],"displayName":[513,"display-name"],"placeholder":[513],"action":[513],"validation":[16],"options":[520],"language":[513],"autofilled":[516],"tooltip":[513],"defaultValue":[520,"default-value"],"emitValue":[516,"emit-value"],"isDuplicateInput":[516,"is-duplicate-input"],"clientStyling":[520,"client-styling"],"dateFormat":[513,"date-format"]}],[1,"toggle-checkbox-input",{"name":[513],"displayName":[513,"display-name"],"defaultValue":[513,"default-value"],"options":[16],"autofilled":[516],"tooltip":[513],"validation":[16],"language":[513],"emitValue":[516,"emit-value"],"clientStyling":[513,"client-styling"],"errorMessage":[32],"isValid":[32],"limitStylingAppends":[32],"showTooltip":[32],"showFields":[32]},[[4,"click","handleClickOutside"]]],[1,"checkbox-group-input",{"name":[513],"displayName":[513,"display-name"],"defaultValue":[513,"default-value"],"autofilled":[516],"tooltip":[513],"options":[16],"validation":[16],"language":[513],"emitValue":[516,"emit-value"],"clientStyling":[513,"client-styling"],"errorMessage":[32],"isValid":[32],"limitStylingAppends":[32],"showTooltip":[32],"selectedValues":[32]},[[4,"click","handleClickOutside"]]],[1,"checkbox-input",{"name":[513],"displayName":[513,"display-name"],"defaultValue":[513,"default-value"],"autofilled":[516],"tooltip":[513],"validation":[16],"language":[513],"emitValue":[516,"emit-value"],"clientStyling":[513,"client-styling"],"errorMessage":[32],"isValid":[32],"limitStylingAppends":[32],"showTooltip":[32]},[[4,"click","handleClickOutside"]]],[1,"date-input",{"name":[513],"displayName":[513,"display-name"],"placeholder":[513],"validation":[16],"defaultValue":[513,"default-value"],"autofilled":[516],"tooltip":[513],"language":[513],"emitValue":[516,"emit-value"],"clientStyling":[513,"client-styling"],"dateFormat":[513,"date-format"],"errorMessage":[32],"isValid":[32],"limitStylingAppends":[32],"showTooltip":[32]},[[4,"click","handleClickOutside"]]],[1,"email-input",{"name":[513],"displayName":[513,"display-name"],"placeholder":[513],"validation":[16],"defaultValue":[513,"default-value"],"autofilled":[516],"tooltip":[513],"language":[513],"emitValue":[516,"emit-value"],"isDuplicateInput":[516,"is-duplicate-input"],"clientStyling":[513,"client-styling"],"errorMessage":[32],"isValid":[32],"limitStylingAppends":[32],"showTooltip":[32]},[[4,"click","handleClickOutside"],[16,"sendInputValue","valueChangedHandler"]]],[1,"number-input",{"name":[513],"displayName":[513,"display-name"],"placeholder":[513],"validation":[16],"defaultValue":[513,"default-value"],"autofilled":[516],"tooltip":[513],"language":[513],"emitValue":[516,"emit-value"],"clientStyling":[513,"client-styling"],"errorMessage":[32],"isValid":[32],"limitStylingAppends":[32],"showTooltip":[32]},[[4,"click","handleClickOutside"]]],[1,"password-input",{"name":[513],"displayName":[513,"display-name"],"placeholder":[513],"defaultValue":[513,"default-value"],"autofilled":[516],"tooltip":[513],"validation":[16],"language":[513],"emitValue":[516,"emit-value"],"isDuplicateInput":[516,"is-duplicate-input"],"clientStyling":[513,"client-styling"],"isValid":[32],"errorMessage":[32],"limitStylingAppends":[32],"showTooltip":[32],"passwordComplexity":[32],"showPopup":[32],"value":[32]},[[16,"sendOriginalValidityState","originalValidityChangedHandler"],[16,"sendInputValue","valueChangedHandler"],[4,"click","handleClickOutside"]]],[1,"radio-input",{"name":[513],"displayName":[513,"display-name"],"optionsGroup":[16],"validation":[16],"tooltip":[513],"language":[513],"emitValue":[516,"emit-value"],"clientStyling":[513,"client-styling"],"errorMessage":[32],"isValid":[32],"limitStylingAppends":[32],"showTooltip":[32]},[[4,"click","handleClickOutside"]]],[1,"select-input",{"name":[513],"displayName":[513,"display-name"],"placeholder":[513],"action":[513],"defaultValue":[513,"default-value"],"autofilled":[516],"tooltip":[513],"options":[16],"validation":[16],"language":[513],"emitValue":[516,"emit-value"],"clientStyling":[513,"client-styling"],"errorMessage":[32],"isValid":[32],"limitStylingAppends":[32],"showTooltip":[32]},[[4,"click","handleClickOutside"]]],[1,"tel-input",{"name":[513],"displayName":[513,"display-name"],"placeholder":[513],"showLabels":[516,"show-labels"],"action":[513],"validation":[16],"defaultValue":[520,"default-value"],"autofilled":[516],"tooltip":[513],"language":[513],"emitValue":[516,"emit-value"],"clientStyling":[513,"client-styling"],"isValid":[32],"errorMessage":[32],"limitStylingAppends":[32],"showTooltip":[32]},[[4,"click","handleClickOutside"]]],[1,"text-input",{"name":[513],"displayName":[513,"display-name"],"placeholder":[513],"validation":[16],"defaultValue":[513,"default-value"],"autofilled":[516],"tooltip":[513],"language":[513],"checkValidity":[516,"check-validity"],"emitValue":[516,"emit-value"],"isDuplicateInput":[516,"is-duplicate-input"],"clientStyling":[513,"client-styling"],"isValid":[32],"errorMessage":[32],"limitStylingAppends":[32],"showTooltip":[32]},[[4,"click","handleClickOutside"],[16,"sendInputValue","valueChangedHandler"]]]]]], options);
19
19
  });
@@ -171,6 +171,11 @@ const getScopeId = (cmp, mode) => 'sc-' + (cmp.$tagName$);
171
171
  * Don't add values to these!!
172
172
  */
173
173
  const EMPTY_OBJ = {};
174
+ /**
175
+ * Namespaces
176
+ */
177
+ const SVG_NS = 'http://www.w3.org/2000/svg';
178
+ const HTML_NS = 'http://www.w3.org/1999/xhtml';
174
179
  const isDef = (v) => v != null;
175
180
  const isComplexType = (o) => {
176
181
  // https://jsperf.com/typeof-fn-object/5
@@ -400,8 +405,15 @@ const createElm = (oldParentVNode, newParentVNode, childIndex, parentElm) => {
400
405
  elm = newVNode.$elm$ = doc.createTextNode(newVNode.$text$);
401
406
  }
402
407
  else {
408
+ if (!isSvgMode) {
409
+ isSvgMode = newVNode.$tag$ === 'svg';
410
+ }
403
411
  // create element
404
- elm = newVNode.$elm$ = (doc.createElement(newVNode.$tag$));
412
+ elm = newVNode.$elm$ = (doc.createElementNS(isSvgMode ? SVG_NS : HTML_NS, newVNode.$tag$)
413
+ );
414
+ if (isSvgMode && newVNode.$tag$ === 'foreignObject') {
415
+ isSvgMode = false;
416
+ }
405
417
  // add css classes, attrs, props, listeners, etc.
406
418
  {
407
419
  updateElement(null, newVNode, isSvgMode);
@@ -422,6 +434,16 @@ const createElm = (oldParentVNode, newParentVNode, childIndex, parentElm) => {
422
434
  }
423
435
  }
424
436
  }
437
+ {
438
+ if (newVNode.$tag$ === 'svg') {
439
+ // Only reset the SVG context when we're exiting <svg> element
440
+ isSvgMode = false;
441
+ }
442
+ else if (elm.tagName === 'foreignObject') {
443
+ // Reenter SVG context when we're exiting <foreignObject> element
444
+ isSvgMode = true;
445
+ }
446
+ }
425
447
  }
426
448
  return elm;
427
449
  };
@@ -556,11 +578,19 @@ const patch = (oldVNode, newVNode) => {
556
578
  const elm = (newVNode.$elm$ = oldVNode.$elm$);
557
579
  const oldChildren = oldVNode.$children$;
558
580
  const newChildren = newVNode.$children$;
581
+ const tag = newVNode.$tag$;
559
582
  const text = newVNode.$text$;
560
583
  if (text === null) {
584
+ {
585
+ // test if we're rendering an svg element, or still rendering nodes inside of one
586
+ // only add this to the when the compiler sees we're using an svg somewhere
587
+ isSvgMode = tag === 'svg' ? true : tag === 'foreignObject' ? false : isSvgMode;
588
+ }
561
589
  // element node
562
590
  {
563
- {
591
+ if (tag === 'slot')
592
+ ;
593
+ else {
564
594
  // either this is the first render of an element OR it's an update
565
595
  // AND we already know it's possible it could have changed
566
596
  // this updates the element's css classes, attrs, props, listeners, etc.
@@ -584,6 +614,9 @@ const patch = (oldVNode, newVNode) => {
584
614
  // no new child vnodes, but there are old child vnodes to remove
585
615
  removeVnodes(oldChildren, 0, oldChildren.length - 1);
586
616
  }
617
+ if (isSvgMode && tag === 'svg') {
618
+ isSvgMode = false;
619
+ }
587
620
  }
588
621
  else if (oldVNode.$text$ !== text) {
589
622
  // update the text content for the text only vnode
@@ -2,7 +2,7 @@
2
2
 
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
- const index = require('./index-c322b593.js');
5
+ const index = require('./index-0b9241d1.js');
6
6
 
7
7
  /*
8
8
  Stencil Client Patch Esm v2.15.2 | MIT Licensed | https://stenciljs.com
@@ -14,7 +14,7 @@ const patchEsm = () => {
14
14
  const defineCustomElements = (win, options) => {
15
15
  if (typeof window === 'undefined') return Promise.resolve();
16
16
  return patchEsm().then(() => {
17
- return index.bootstrapLazy([["checkbox-group-input_13.cjs",[[1,"general-registration",{"endpoint":[513],"language":[513],"clientStyling":[1537,"client-styling"],"clientStylingUrl":[513,"client-styling-url"],"translationUrl":[513,"translation-url"],"dateFormat":[513,"date-format"],"buttonInsideForm":[516,"button-inside-form"],"errorMessage":[32],"isFormValid":[32],"isLoading":[32],"registrationStep":[32],"forms":[32],"limitStylingAppends":[32]},[[0,"sendValidityState","checkInputsValidityHandler"],[0,"sendInputValue","getInputsValueHandler"]]],[1,"general-input",{"type":[513],"name":[513],"displayName":[513,"display-name"],"placeholder":[513],"action":[513],"validation":[16],"options":[520],"language":[513],"autofilled":[516],"tooltip":[513],"defaultValue":[520,"default-value"],"emitValue":[516,"emit-value"],"isDuplicateInput":[516,"is-duplicate-input"],"clientStyling":[520,"client-styling"],"dateFormat":[513,"date-format"]}],[1,"toggle-checkbox-input",{"name":[513],"displayName":[513,"display-name"],"defaultValue":[513,"default-value"],"options":[16],"autofilled":[516],"tooltip":[513],"validation":[16],"language":[513],"emitValue":[516,"emit-value"],"clientStyling":[513,"client-styling"],"errorMessage":[32],"isValid":[32],"limitStylingAppends":[32],"showTooltip":[32],"showFields":[32]},[[4,"click","handleClickOutside"]]],[1,"checkbox-group-input",{"name":[513],"displayName":[513,"display-name"],"defaultValue":[513,"default-value"],"autofilled":[516],"tooltip":[513],"options":[16],"validation":[16],"language":[513],"emitValue":[516,"emit-value"],"clientStyling":[513,"client-styling"],"errorMessage":[32],"isValid":[32],"limitStylingAppends":[32],"showTooltip":[32],"selectedValues":[32]},[[4,"click","handleClickOutside"]]],[1,"checkbox-input",{"name":[513],"displayName":[513,"display-name"],"defaultValue":[513,"default-value"],"autofilled":[516],"tooltip":[513],"validation":[16],"language":[513],"emitValue":[516,"emit-value"],"clientStyling":[513,"client-styling"],"errorMessage":[32],"isValid":[32],"limitStylingAppends":[32],"showTooltip":[32]},[[4,"click","handleClickOutside"]]],[1,"date-input",{"name":[513],"displayName":[513,"display-name"],"placeholder":[513],"validation":[16],"defaultValue":[513,"default-value"],"autofilled":[516],"tooltip":[513],"language":[513],"emitValue":[516,"emit-value"],"clientStyling":[513,"client-styling"],"dateFormat":[513,"date-format"],"errorMessage":[32],"isValid":[32],"limitStylingAppends":[32],"showTooltip":[32]},[[4,"click","handleClickOutside"]]],[1,"email-input",{"name":[513],"displayName":[513,"display-name"],"placeholder":[513],"validation":[16],"defaultValue":[513,"default-value"],"autofilled":[516],"tooltip":[513],"language":[513],"emitValue":[516,"emit-value"],"isDuplicateInput":[516,"is-duplicate-input"],"clientStyling":[513,"client-styling"],"errorMessage":[32],"isValid":[32],"limitStylingAppends":[32],"showTooltip":[32]},[[4,"click","handleClickOutside"],[16,"sendInputValue","valueChangedHandler"]]],[1,"number-input",{"name":[513],"displayName":[513,"display-name"],"placeholder":[513],"validation":[16],"defaultValue":[513,"default-value"],"autofilled":[516],"tooltip":[513],"language":[513],"emitValue":[516,"emit-value"],"clientStyling":[513,"client-styling"],"errorMessage":[32],"isValid":[32],"limitStylingAppends":[32],"showTooltip":[32]},[[4,"click","handleClickOutside"]]],[1,"password-input",{"name":[513],"displayName":[513,"display-name"],"placeholder":[513],"defaultValue":[513,"default-value"],"autofilled":[516],"tooltip":[513],"validation":[16],"language":[513],"emitValue":[516,"emit-value"],"isDuplicateInput":[516,"is-duplicate-input"],"clientStyling":[513,"client-styling"],"isValid":[32],"errorMessage":[32],"limitStylingAppends":[32],"showTooltip":[32],"passwordComplexity":[32],"showPopup":[32]},[[16,"sendInputValue","valueChangedHandler"],[4,"click","handleClickOutside"]]],[1,"radio-input",{"name":[513],"displayName":[513,"display-name"],"optionsGroup":[16],"validation":[16],"tooltip":[513],"language":[513],"emitValue":[516,"emit-value"],"clientStyling":[513,"client-styling"],"errorMessage":[32],"isValid":[32],"limitStylingAppends":[32],"showTooltip":[32]},[[4,"click","handleClickOutside"]]],[1,"select-input",{"name":[513],"displayName":[513,"display-name"],"placeholder":[513],"action":[513],"defaultValue":[513,"default-value"],"autofilled":[516],"tooltip":[513],"options":[16],"validation":[16],"language":[513],"emitValue":[516,"emit-value"],"clientStyling":[513,"client-styling"],"errorMessage":[32],"isValid":[32],"limitStylingAppends":[32],"showTooltip":[32]},[[4,"click","handleClickOutside"]]],[1,"tel-input",{"name":[513],"displayName":[513,"display-name"],"placeholder":[513],"showLabels":[516,"show-labels"],"action":[513],"validation":[16],"defaultValue":[520,"default-value"],"autofilled":[516],"tooltip":[513],"language":[513],"emitValue":[516,"emit-value"],"clientStyling":[513,"client-styling"],"isValid":[32],"errorMessage":[32],"limitStylingAppends":[32],"showTooltip":[32]},[[4,"click","handleClickOutside"]]],[1,"text-input",{"name":[513],"displayName":[513,"display-name"],"placeholder":[513],"validation":[16],"defaultValue":[513,"default-value"],"autofilled":[516],"tooltip":[513],"language":[513],"checkValidity":[516,"check-validity"],"emitValue":[516,"emit-value"],"isDuplicateInput":[516,"is-duplicate-input"],"clientStyling":[513,"client-styling"],"isValid":[32],"errorMessage":[32],"limitStylingAppends":[32],"showTooltip":[32]},[[4,"click","handleClickOutside"],[16,"sendInputValue","valueChangedHandler"]]]]]], options);
17
+ return index.bootstrapLazy([["checkbox-group-input_13.cjs",[[1,"general-registration",{"endpoint":[513],"language":[513],"clientStyling":[1537,"client-styling"],"clientStylingUrl":[513,"client-styling-url"],"translationUrl":[513,"translation-url"],"dateFormat":[513,"date-format"],"buttonInsideForm":[516,"button-inside-form"],"errorMessage":[32],"isFormValid":[32],"isLoading":[32],"isLoadingPOST":[32],"registrationStep":[32],"forms":[32],"limitStylingAppends":[32]},[[0,"sendValidityState","checkInputsValidityHandler"],[0,"sendInputValue","getInputsValueHandler"]]],[1,"general-input",{"type":[513],"name":[513],"displayName":[513,"display-name"],"placeholder":[513],"action":[513],"validation":[16],"options":[520],"language":[513],"autofilled":[516],"tooltip":[513],"defaultValue":[520,"default-value"],"emitValue":[516,"emit-value"],"isDuplicateInput":[516,"is-duplicate-input"],"clientStyling":[520,"client-styling"],"dateFormat":[513,"date-format"]}],[1,"toggle-checkbox-input",{"name":[513],"displayName":[513,"display-name"],"defaultValue":[513,"default-value"],"options":[16],"autofilled":[516],"tooltip":[513],"validation":[16],"language":[513],"emitValue":[516,"emit-value"],"clientStyling":[513,"client-styling"],"errorMessage":[32],"isValid":[32],"limitStylingAppends":[32],"showTooltip":[32],"showFields":[32]},[[4,"click","handleClickOutside"]]],[1,"checkbox-group-input",{"name":[513],"displayName":[513,"display-name"],"defaultValue":[513,"default-value"],"autofilled":[516],"tooltip":[513],"options":[16],"validation":[16],"language":[513],"emitValue":[516,"emit-value"],"clientStyling":[513,"client-styling"],"errorMessage":[32],"isValid":[32],"limitStylingAppends":[32],"showTooltip":[32],"selectedValues":[32]},[[4,"click","handleClickOutside"]]],[1,"checkbox-input",{"name":[513],"displayName":[513,"display-name"],"defaultValue":[513,"default-value"],"autofilled":[516],"tooltip":[513],"validation":[16],"language":[513],"emitValue":[516,"emit-value"],"clientStyling":[513,"client-styling"],"errorMessage":[32],"isValid":[32],"limitStylingAppends":[32],"showTooltip":[32]},[[4,"click","handleClickOutside"]]],[1,"date-input",{"name":[513],"displayName":[513,"display-name"],"placeholder":[513],"validation":[16],"defaultValue":[513,"default-value"],"autofilled":[516],"tooltip":[513],"language":[513],"emitValue":[516,"emit-value"],"clientStyling":[513,"client-styling"],"dateFormat":[513,"date-format"],"errorMessage":[32],"isValid":[32],"limitStylingAppends":[32],"showTooltip":[32]},[[4,"click","handleClickOutside"]]],[1,"email-input",{"name":[513],"displayName":[513,"display-name"],"placeholder":[513],"validation":[16],"defaultValue":[513,"default-value"],"autofilled":[516],"tooltip":[513],"language":[513],"emitValue":[516,"emit-value"],"isDuplicateInput":[516,"is-duplicate-input"],"clientStyling":[513,"client-styling"],"errorMessage":[32],"isValid":[32],"limitStylingAppends":[32],"showTooltip":[32]},[[4,"click","handleClickOutside"],[16,"sendInputValue","valueChangedHandler"]]],[1,"number-input",{"name":[513],"displayName":[513,"display-name"],"placeholder":[513],"validation":[16],"defaultValue":[513,"default-value"],"autofilled":[516],"tooltip":[513],"language":[513],"emitValue":[516,"emit-value"],"clientStyling":[513,"client-styling"],"errorMessage":[32],"isValid":[32],"limitStylingAppends":[32],"showTooltip":[32]},[[4,"click","handleClickOutside"]]],[1,"password-input",{"name":[513],"displayName":[513,"display-name"],"placeholder":[513],"defaultValue":[513,"default-value"],"autofilled":[516],"tooltip":[513],"validation":[16],"language":[513],"emitValue":[516,"emit-value"],"isDuplicateInput":[516,"is-duplicate-input"],"clientStyling":[513,"client-styling"],"isValid":[32],"errorMessage":[32],"limitStylingAppends":[32],"showTooltip":[32],"passwordComplexity":[32],"showPopup":[32],"value":[32]},[[16,"sendOriginalValidityState","originalValidityChangedHandler"],[16,"sendInputValue","valueChangedHandler"],[4,"click","handleClickOutside"]]],[1,"radio-input",{"name":[513],"displayName":[513,"display-name"],"optionsGroup":[16],"validation":[16],"tooltip":[513],"language":[513],"emitValue":[516,"emit-value"],"clientStyling":[513,"client-styling"],"errorMessage":[32],"isValid":[32],"limitStylingAppends":[32],"showTooltip":[32]},[[4,"click","handleClickOutside"]]],[1,"select-input",{"name":[513],"displayName":[513,"display-name"],"placeholder":[513],"action":[513],"defaultValue":[513,"default-value"],"autofilled":[516],"tooltip":[513],"options":[16],"validation":[16],"language":[513],"emitValue":[516,"emit-value"],"clientStyling":[513,"client-styling"],"errorMessage":[32],"isValid":[32],"limitStylingAppends":[32],"showTooltip":[32]},[[4,"click","handleClickOutside"]]],[1,"tel-input",{"name":[513],"displayName":[513,"display-name"],"placeholder":[513],"showLabels":[516,"show-labels"],"action":[513],"validation":[16],"defaultValue":[520,"default-value"],"autofilled":[516],"tooltip":[513],"language":[513],"emitValue":[516,"emit-value"],"clientStyling":[513,"client-styling"],"isValid":[32],"errorMessage":[32],"limitStylingAppends":[32],"showTooltip":[32]},[[4,"click","handleClickOutside"]]],[1,"text-input",{"name":[513],"displayName":[513,"display-name"],"placeholder":[513],"validation":[16],"defaultValue":[513,"default-value"],"autofilled":[516],"tooltip":[513],"language":[513],"checkValidity":[516,"check-validity"],"emitValue":[516,"emit-value"],"isDuplicateInput":[516,"is-duplicate-input"],"clientStyling":[513,"client-styling"],"isValid":[32],"errorMessage":[32],"limitStylingAppends":[32],"showTooltip":[32]},[[4,"click","handleClickOutside"],[16,"sendInputValue","valueChangedHandler"]]]]]], options);
18
18
  });
19
19
  };
20
20
 
@@ -39,6 +39,7 @@
39
39
  flex-direction: column;
40
40
  justify-content: space-around;
41
41
  align-items: center;
42
+ position: relative;
42
43
  }
43
44
  .registration__button {
44
45
  border: none;
@@ -69,4 +70,39 @@
69
70
  flex-direction: row-reverse;
70
71
  gap: 15px;
71
72
  }
73
+ }
74
+ .spinner {
75
+ animation: rotate 2s linear infinite;
76
+ z-index: 2;
77
+ position: absolute;
78
+ top: 50%;
79
+ left: 50%;
80
+ margin: -25px 0 0 -25px;
81
+ width: 50px;
82
+ height: 50px;
83
+ }
84
+ .spinner .path {
85
+ stroke: #E37912;
86
+ stroke-linecap: round;
87
+ animation: dash 1.5s ease-in-out infinite;
88
+ }
89
+
90
+ @keyframes rotate {
91
+ 100% {
92
+ transform: rotate(360deg);
93
+ }
94
+ }
95
+ @keyframes dash {
96
+ 0% {
97
+ stroke-dasharray: 1, 150;
98
+ stroke-dashoffset: 0;
99
+ }
100
+ 50% {
101
+ stroke-dasharray: 90, 150;
102
+ stroke-dashoffset: -35;
103
+ }
104
+ 100% {
105
+ stroke-dasharray: 90, 150;
106
+ stroke-dashoffset: -124;
107
+ }
72
108
  }