@everymatrix/general-registration 1.10.21 → 1.10.22

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.
@@ -15,5 +15,5 @@ const patchBrowser = () => {
15
15
  };
16
16
 
17
17
  patchBrowser().then(options => {
18
- return index.bootstrapLazy([["checkbox-group-input_12.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"],"errorMessage":[32],"isFormValid":[32],"isLoading":[32],"registrationStep":[32],"forms":[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,"checkbox-group-input",{"name":[513],"displayName":[513,"display-name"],"defaultValue":[513,"default-value"],"autofilled":[516],"tooltip":[513],"options":[520],"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_12.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]},[[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,"checkbox-group-input",{"name":[513],"displayName":[513,"display-name"],"defaultValue":[513,"default-value"],"autofilled":[516],"tooltip":[513],"options":[520],"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);
19
19
  });
@@ -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_12.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"],"errorMessage":[32],"isFormValid":[32],"isLoading":[32],"registrationStep":[32],"forms":[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,"checkbox-group-input",{"name":[513],"displayName":[513,"display-name"],"defaultValue":[513,"default-value"],"autofilled":[516],"tooltip":[513],"options":[520],"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_12.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]},[[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,"checkbox-group-input",{"name":[513],"displayName":[513,"display-name"],"defaultValue":[513,"default-value"],"autofilled":[516],"tooltip":[513],"options":[520],"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
18
  });
19
19
  };
20
20
 
@@ -24,9 +24,9 @@ export class GeneralRegistration {
24
24
  this.listOfInputValues = [];
25
25
  this.listOfInputValidity = [];
26
26
  this.listOfActions = [];
27
- this.listOfSteps = [];
28
27
  this.listOfInputs = [];
29
28
  this.emitValue = false;
29
+ this.backButtonPressed = false;
30
30
  this.registrationStepsState = {
31
31
  regId: null
32
32
  };
@@ -53,7 +53,9 @@ export class GeneralRegistration {
53
53
  }
54
54
  setFormValidity() {
55
55
  this.errorMessage = '';
56
- this.isFormValid = !this.getInvalidStatus(this.listOfInputValidity);
56
+ if (this.listOfInputValidity) {
57
+ this.isFormValid = !this.getInvalidStatus(this.listOfInputValidity);
58
+ }
57
59
  }
58
60
  checkInputsValidityHandler(event) {
59
61
  // Set isValid state of the input in the list.
@@ -118,7 +120,6 @@ export class GeneralRegistration {
118
120
  }
119
121
  backHandler(e) {
120
122
  e.preventDefault();
121
- this.isLastStep = false;
122
123
  this.registrationStep = this.stepChange('decrement');
123
124
  this.stepsStateMachine({ event: 'get', type: 'inputs' });
124
125
  this.stepsStateMachine({ event: 'get', type: 'values' });
@@ -342,11 +343,14 @@ export class GeneralRegistration {
342
343
  });
343
344
  // Set the list of actions
344
345
  this.listOfActions = config.content.actions.map(action => action);
345
- this.isLastStep = this.listOfActions.some(action => action == '/register');
346
346
  this.registrationID = config.content.registrationID;
347
347
  this.registrationStep = config.content.step;
348
- this.listOfSteps.push(this.registrationStep);
349
- this.forms.push({ [this.registrationStep]: this.listOfInputs });
348
+ if (this.listOfActions.some(action => action == '/register')) {
349
+ this.lastStep = this.registrationStep;
350
+ }
351
+ ;
352
+ // this.forms.push({ [this.registrationStep] : this.listOfInputs});
353
+ this.forms = [...this.forms, { [this.registrationStep]: this.listOfInputs }];
350
354
  // Add the step to the registrationStepsData
351
355
  this.registrationStepsState.regId = this.registrationID;
352
356
  if (!this.registrationStepsState[this.registrationStep]) {
@@ -384,13 +388,15 @@ export class GeneralRegistration {
384
388
  }
385
389
  renderForm() {
386
390
  return this.forms.map((form, index) => {
387
- return h("form", { action: '.', id: `RegistrationForm${this.registrationStep}`, class: `registration__form ${this.registrationStep !== `Step${index + 1}` ? 'hidden' : ''}`, ref: el => this.form = el }, form[this.registrationStep] && form[this.registrationStep].map(input => h("general-input", { type: input.inputType, name: input.name, displayName: input.displayName, validation: input.validate, action: input.action || null, options: input.data ? input.inputType.toLowerCase() == 'checkboxgroup' ? input.data.subFields : input.data.values : [], defaultValue: input.defaultValue, autofilled: input.autofill, emitValue: this.emitValue, language: this.language, isDuplicateInput: input.isDuplicateInput, "client-styling": this.clientStyling, tooltip: input.tooltip, placeholder: input.placeholder == null ? '' : input.placeholder, dateFormat: this.dateFormat })));
391
+ return h("form", { action: '.', id: `RegistrationForm${this.registrationStep}`, class: `registration__form ${this.registrationStep !== `Step${index + 1}` ? 'hidden' : ''}`, ref: el => this.form = el },
392
+ form[this.registrationStep] && form[this.registrationStep].map(input => h("general-input", { type: input.inputType, name: input.name, displayName: input.displayName, validation: input.validate, action: input.action || null, options: input.data ? input.inputType.toLowerCase() == 'checkboxgroup' ? input.data.subFields : input.data.values : [], defaultValue: input.defaultValue, autofilled: input.autofill, emitValue: this.emitValue, language: this.language, isDuplicateInput: input.isDuplicateInput, "client-styling": this.clientStyling, tooltip: input.tooltip, placeholder: input.placeholder == null ? '' : input.placeholder, dateFormat: this.dateFormat })),
393
+ this.buttonInsideForm && this.renderButtons());
388
394
  });
389
395
  }
390
396
  ;
391
397
  renderButtons() {
392
398
  return (h("div", { class: 'registration__buttons-wrapper' },
393
- 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.isLastStep ? translate('doneButton', this.language) : translate('nextButton', this.language)),
399
+ 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)),
394
400
  h("button", { class: `registration__button registration__button--back ${this.registrationStep == 'Step1' ? 'registration__button--first-step' : ''}`, onClick: (e) => this.backHandler(e) }, translate('backButton', this.language))));
395
401
  }
396
402
  render() {
@@ -400,7 +406,7 @@ export class GeneralRegistration {
400
406
  return (h("div", { class: `registration registration__${this.registrationStep}`, ref: el => this.stylingContainer = el },
401
407
  this.renderForm(),
402
408
  h("p", { class: 'registration__error-message' }, this.errorMessage),
403
- this.renderButtons()));
409
+ !this.buttonInsideForm && this.renderButtons()));
404
410
  }
405
411
  static get is() { return "general-registration"; }
406
412
  static get encapsulation() { return "shadow"; }
@@ -516,6 +522,23 @@ export class GeneralRegistration {
516
522
  },
517
523
  "attribute": "date-format",
518
524
  "reflect": true
525
+ },
526
+ "buttonInsideForm": {
527
+ "type": "boolean",
528
+ "mutable": false,
529
+ "complexType": {
530
+ "original": "boolean",
531
+ "resolved": "boolean",
532
+ "references": {}
533
+ },
534
+ "required": true,
535
+ "optional": false,
536
+ "docs": {
537
+ "tags": [],
538
+ "text": "Boolean that decides the position of the button. e.g. button inside -- true / outside -- false the form."
539
+ },
540
+ "attribute": "button-inside-form",
541
+ "reflect": true
519
542
  }
520
543
  }; }
521
544
  static get states() { return {
@@ -1009,6 +1009,7 @@ const CheckboxGroupInput = /*@__PURE__*/ proxyCustomElement(class extends HTMLEl
1009
1009
  };
1010
1010
  }
1011
1011
  validityChanged() {
1012
+ this.validityStateHandler({ valid: this.isValid, name: this.name });
1012
1013
  if (this.emitValue == true) {
1013
1014
  this.valueHandler({ name: this.name, value: this.value, type: 'checkboxgroup' });
1014
1015
  }
@@ -1051,9 +1052,10 @@ const CheckboxGroupInput = /*@__PURE__*/ proxyCustomElement(class extends HTMLEl
1051
1052
  // For now this input has no validation. Send isValid as true immediately.
1052
1053
  //@TODO: add validation logic to it, if business reason arises.
1053
1054
  this.isValid = this.setValidity();
1054
- this.validityStateHandler({ valid: this.isValid, name: this.name });
1055
1055
  if (this.defaultValue) {
1056
1056
  this.selectedValues = this.options.map((checkbox) => checkbox.name);
1057
+ this.value = this.defaultValue;
1058
+ this.valueHandler({ name: this.name, value: this.value });
1057
1059
  }
1058
1060
  }
1059
1061
  setValidity() {
@@ -1077,7 +1079,7 @@ const CheckboxGroupInput = /*@__PURE__*/ proxyCustomElement(class extends HTMLEl
1077
1079
  : [];
1078
1080
  }
1079
1081
  render() {
1080
- return h("div", { class: 'checkboxgroup__wrapper', ref: el => this.stylingContainer = el }, h("div", { class: 'checkboxgroup__wrapper--flex' }, h("vaadin-checkbox", { label: `${this.displayName} ${this.validation.mandatory ? '*' : ''}`, 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.tooltip &&
1082
+ return h("div", { class: `checkboxgroup__wrapper ${this.name}__input`, ref: el => this.stylingContainer = el }, h("div", { class: 'checkboxgroup__wrapper--flex' }, h("vaadin-checkbox", { label: `${this.displayName} ${this.validation.mandatory ? '*' : ''}`, 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.tooltip &&
1081
1083
  h("img", { class: 'checkboxgroup__tooltip-icon', src: tooltipIconSvg, alt: "", ref: (el) => this.tooltipIconReference = el, onClick: () => this.showTooltip = !this.showTooltip }), this.renderTooltip()), h("small", { class: 'checkboxgroup__error-message' }, this.errorMessage), h("vaadin-checkbox-group", { theme: "vertical", value: this.selectedValues, "on-value-changed": (event) => {
1082
1084
  this.selectedValues = event.detail.value;
1083
1085
  } }, this.options.map((checkbox) => h("vaadin-checkbox", { name: checkbox.name, value: checkbox.name, label: checkbox.displayName }))));
@@ -28,6 +28,7 @@ const CheckboxInput = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement
28
28
  };
29
29
  }
30
30
  validityChanged() {
31
+ this.validityStateHandler({ valid: this.isValid, name: this.name });
31
32
  if (this.emitValue == true) {
32
33
  this.valueHandler({ name: this.name, value: this.value });
33
34
  }
@@ -57,6 +58,8 @@ const CheckboxInput = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement
57
58
  this.limitStylingAppends = true;
58
59
  }
59
60
  // end custom styling area
61
+ }
62
+ componentDidLoad() {
60
63
  if (this.defaultValue) {
61
64
  this.value = this.defaultValue;
62
65
  this.valueHandler({ name: this.name, value: this.value });
@@ -66,7 +69,6 @@ const CheckboxInput = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement
66
69
  this.value = this.inputReference.checked.toString();
67
70
  this.errorMessage = this.setErrorMessage();
68
71
  this.isValid = this.setValidity();
69
- this.validityStateHandler({ valid: this.isValid, name: this.name });
70
72
  this.emitValueHandler(true);
71
73
  }
72
74
  setValidity() {
@@ -87,7 +89,7 @@ const CheckboxInput = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement
87
89
  return null;
88
90
  }
89
91
  render() {
90
- return h("div", { class: 'checkbox__wrapper', ref: el => this.stylingContainer = el }, h("input", { type: "checkbox", id: `${this.name}__input`, ref: (el) => this.inputReference = el, name: this.name, checked: this.defaultValue === "true", readOnly: this.autofilled, required: this.validation.mandatory, value: this.value, onClick: () => this.handleClick() }), this.renderLabel(), h("small", { class: 'checkbox__error-message' }, this.errorMessage), h("div", { class: 'checkbox__wrapper--relative' }, this.tooltip &&
92
+ return h("div", { class: `checkbox__wrapper ${this.name}__input`, ref: el => this.stylingContainer = el }, h("input", { type: "checkbox", id: `${this.name}__input`, ref: (el) => this.inputReference = el, name: this.name, checked: this.defaultValue === "true", readOnly: this.autofilled, required: this.validation.mandatory, value: this.value, onClick: () => this.handleClick() }), this.renderLabel(), h("small", { class: 'checkbox__error-message' }, this.errorMessage), h("div", { class: 'checkbox__wrapper--relative' }, this.tooltip &&
91
93
  h("img", { class: 'checkbox__tooltip-icon', src: tooltipIconSvg, alt: "", ref: (el) => this.tooltipIconReference = el, onClick: () => this.showTooltip = !this.showTooltip }), this.renderTooltip()));
92
94
  }
93
95
  static get watchers() { return {
@@ -10114,6 +10114,7 @@ const DateInput = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement {
10114
10114
  this.clientStyling = '';
10115
10115
  this.limitStylingAppends = false;
10116
10116
  this.showTooltip = false;
10117
+ this.touched = false;
10117
10118
  this.formatDate = (dateParts) => {
10118
10119
  const { year, month, day } = dateParts;
10119
10120
  const date = new Date(year, month, day);
@@ -10123,6 +10124,11 @@ const DateInput = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement {
10123
10124
  const date = parse(inputValue, this.dateFormat || 'yyyy-MM-dd', new Date());
10124
10125
  return { year: date.getFullYear(), month: date.getMonth(), day: date.getDate() };
10125
10126
  };
10127
+ this.handleBlur = () => {
10128
+ this.isValid = this.setValidity();
10129
+ this.errorMessage = this.setErrorMessage();
10130
+ this.touched = true;
10131
+ };
10126
10132
  this.setClientStyling = () => {
10127
10133
  let sheet = document.createElement('style');
10128
10134
  sheet.innerHTML = this.clientStyling;
@@ -10160,21 +10166,22 @@ const DateInput = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement {
10160
10166
  this.limitStylingAppends = true;
10161
10167
  }
10162
10168
  // end custom styling area
10163
- if (this.defaultValue) {
10164
- this.value = this.defaultValue;
10165
- this.valueHandler({ name: this.name, value: this.value });
10166
- }
10167
10169
  }
10168
10170
  componentDidLoad() {
10169
10171
  this.datePicker = this.element.shadowRoot.querySelector('vaadin-date-picker');
10170
10172
  this.inputReference = this.element.shadowRoot.querySelector('input');
10171
10173
  this.datePicker.i18n = Object.assign(Object.assign({}, this.datePicker.i18n), { formatDate: this.formatDate, parseDate: this.parseDate });
10174
+ this.isValid = this.setValidity();
10175
+ if (this.defaultValue) {
10176
+ this.value = this.defaultValue;
10177
+ this.valueHandler({ name: this.name, value: this.value });
10178
+ }
10172
10179
  }
10173
10180
  handleInput(event) {
10174
10181
  this.value = event.target.value;
10182
+ this.touched = true;
10175
10183
  this.errorMessage = this.setErrorMessage();
10176
10184
  this.isValid = this.setValidity();
10177
- this.validityStateHandler({ valid: this.isValid, name: this.name });
10178
10185
  this.emitValueHandler(true);
10179
10186
  }
10180
10187
  setValidity() {
@@ -10195,8 +10202,11 @@ const DateInput = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement {
10195
10202
  return null;
10196
10203
  }
10197
10204
  render() {
10198
- const invalidClass = this.isValid == true || this.isValid == undefined ? '' : 'date__input--invalid';
10199
- return h("div", { class: 'date__wrapper', ref: el => this.stylingContainer = el }, h("label", { class: `date__label ${this.validation.mandatory ? 'date__label--required' : ''}}`, htmlFor: `${this.name}__input` }, this.displayName, " ", this.validation.mandatory ? '*' : ''), 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) }), h("small", { class: 'date__error-message' }, this.errorMessage), this.tooltip &&
10205
+ let invalidClass;
10206
+ if (this.touched) {
10207
+ invalidClass = this.isValid == true || this.isValid == undefined ? '' : 'text__input--invalid';
10208
+ }
10209
+ return h("div", { class: `date__wrapper ${this.name}__input`, ref: el => this.stylingContainer = el }, h("label", { class: `date__label ${this.validation.mandatory ? 'date__label--required' : ''}}`, htmlFor: `${this.name}__input` }, this.displayName, " ", this.validation.mandatory ? '*' : ''), 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 }), h("small", { class: 'date__error-message' }, this.errorMessage), this.tooltip &&
10200
10210
  h("img", { class: 'date__tooltip-icon', src: tooltipIconSvg, alt: "", ref: (el) => this.tooltipIconReference = el, onClick: () => this.showTooltip = !this.showTooltip }), this.renderTooltip());
10201
10211
  }
10202
10212
  get element() { return this; }
@@ -17,6 +17,24 @@ const EmailInput = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement {
17
17
  this.limitStylingAppends = false;
18
18
  this.showTooltip = false;
19
19
  this.validationPattern = '';
20
+ this.touched = false;
21
+ this.handleInput = (event) => {
22
+ this.value = event.target.value;
23
+ this.touched = true;
24
+ if (this.debounceTime) {
25
+ clearTimeout(this.debounceTime);
26
+ }
27
+ this.debounceTime = setTimeout(() => {
28
+ this.isValid = this.setValidity();
29
+ this.errorMessage = this.setErrorMessage();
30
+ this.emitValueHandler(true);
31
+ }, 500);
32
+ };
33
+ this.handleBlur = () => {
34
+ this.isValid = this.setValidity();
35
+ this.errorMessage = this.setErrorMessage();
36
+ this.touched = true;
37
+ };
20
38
  this.setClientStyling = () => {
21
39
  let sheet = document.createElement('style');
22
40
  sheet.innerHTML = this.clientStyling;
@@ -64,18 +82,14 @@ const EmailInput = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement {
64
82
  this.limitStylingAppends = true;
65
83
  }
66
84
  // end custom styling area
85
+ }
86
+ componentDidLoad() {
87
+ this.isValid = this.setValidity();
67
88
  if (this.defaultValue) {
68
89
  this.value = this.defaultValue;
69
90
  this.valueHandler({ name: this.name, value: this.value });
70
91
  }
71
92
  }
72
- handleInput(event) {
73
- this.value = event.target.value;
74
- this.errorMessage = this.setErrorMessage();
75
- this.isValid = this.setValidity();
76
- this.validityStateHandler({ valid: this.isValid, name: this.name });
77
- this.emitValueHandler(true);
78
- }
79
93
  setValidity() {
80
94
  return this.inputReference.validity.valid;
81
95
  }
@@ -107,9 +121,12 @@ const EmailInput = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement {
107
121
  return null;
108
122
  }
109
123
  render() {
110
- const invalidClass = this.isValid == true || this.isValid == undefined ? '' : 'email__input--invalid';
111
- return h("div", { class: 'email__wrapper', ref: el => this.stylingContainer = el }, h("div", { class: 'email__wrapper--flex' }, h("label", { class: `email__label ${this.validation.mandatory ? 'email__label--required' : ''}`, htmlFor: `${this.name}__input` }, this.displayName), h("div", { class: 'email__wrapper--relative' }, this.tooltip &&
112
- h("img", { class: 'email__tooltip-icon', src: tooltipIconSvg, alt: "", ref: (el) => this.tooltipIconReference = el, onClick: () => this.showTooltip = !this.showTooltip }), this.renderTooltip())), 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, onBlur: (e) => this.handleInput(e) }), h("small", { class: 'email__error-message' }, this.errorMessage));
124
+ let invalidClass;
125
+ if (this.touched) {
126
+ invalidClass = this.isValid == true || this.isValid == undefined ? '' : 'text__input--invalid';
127
+ }
128
+ return h("div", { class: `email__wrapper ${this.name}__input`, ref: el => this.stylingContainer = el }, h("div", { class: 'email__wrapper--flex' }, h("label", { class: `email__label ${this.validation.mandatory ? 'email__label--required' : ''}`, htmlFor: `${this.name}__input` }, this.displayName), h("div", { class: 'email__wrapper--relative' }, this.tooltip &&
129
+ h("img", { class: 'email__tooltip-icon', src: tooltipIconSvg, alt: "", ref: (el) => this.tooltipIconReference = el, onClick: () => this.showTooltip = !this.showTooltip }), this.renderTooltip())), 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 }), h("small", { class: 'email__error-message' }, this.errorMessage));
113
130
  }
114
131
  static get watchers() { return {
115
132
  "isValid": ["validityChanged"],
@@ -93,9 +93,9 @@ const GeneralRegistration$1 = /*@__PURE__*/ proxyCustomElement(class extends HTM
93
93
  this.listOfInputValues = [];
94
94
  this.listOfInputValidity = [];
95
95
  this.listOfActions = [];
96
- this.listOfSteps = [];
97
96
  this.listOfInputs = [];
98
97
  this.emitValue = false;
98
+ this.backButtonPressed = false;
99
99
  this.registrationStepsState = {
100
100
  regId: null
101
101
  };
@@ -122,7 +122,9 @@ const GeneralRegistration$1 = /*@__PURE__*/ proxyCustomElement(class extends HTM
122
122
  }
123
123
  setFormValidity() {
124
124
  this.errorMessage = '';
125
- this.isFormValid = !this.getInvalidStatus(this.listOfInputValidity);
125
+ if (this.listOfInputValidity) {
126
+ this.isFormValid = !this.getInvalidStatus(this.listOfInputValidity);
127
+ }
126
128
  }
127
129
  checkInputsValidityHandler(event) {
128
130
  // Set isValid state of the input in the list.
@@ -187,7 +189,6 @@ const GeneralRegistration$1 = /*@__PURE__*/ proxyCustomElement(class extends HTM
187
189
  }
188
190
  backHandler(e) {
189
191
  e.preventDefault();
190
- this.isLastStep = false;
191
192
  this.registrationStep = this.stepChange('decrement');
192
193
  this.stepsStateMachine({ event: 'get', type: 'inputs' });
193
194
  this.stepsStateMachine({ event: 'get', type: 'values' });
@@ -411,11 +412,13 @@ const GeneralRegistration$1 = /*@__PURE__*/ proxyCustomElement(class extends HTM
411
412
  });
412
413
  // Set the list of actions
413
414
  this.listOfActions = config.content.actions.map(action => action);
414
- this.isLastStep = this.listOfActions.some(action => action == '/register');
415
415
  this.registrationID = config.content.registrationID;
416
416
  this.registrationStep = config.content.step;
417
- this.listOfSteps.push(this.registrationStep);
418
- this.forms.push({ [this.registrationStep]: this.listOfInputs });
417
+ if (this.listOfActions.some(action => action == '/register')) {
418
+ this.lastStep = this.registrationStep;
419
+ }
420
+ // this.forms.push({ [this.registrationStep] : this.listOfInputs});
421
+ this.forms = [...this.forms, { [this.registrationStep]: this.listOfInputs }];
419
422
  // Add the step to the registrationStepsData
420
423
  this.registrationStepsState.regId = this.registrationID;
421
424
  if (!this.registrationStepsState[this.registrationStep]) {
@@ -453,18 +456,18 @@ const GeneralRegistration$1 = /*@__PURE__*/ proxyCustomElement(class extends HTM
453
456
  }
454
457
  renderForm() {
455
458
  return this.forms.map((form, index) => {
456
- return h("form", { action: '.', id: `RegistrationForm${this.registrationStep}`, class: `registration__form ${this.registrationStep !== `Step${index + 1}` ? 'hidden' : ''}`, ref: el => this.form = el }, form[this.registrationStep] && form[this.registrationStep].map(input => h("general-input", { type: input.inputType, name: input.name, displayName: input.displayName, validation: input.validate, action: input.action || null, options: input.data ? input.inputType.toLowerCase() == 'checkboxgroup' ? input.data.subFields : input.data.values : [], defaultValue: input.defaultValue, autofilled: input.autofill, emitValue: this.emitValue, language: this.language, isDuplicateInput: input.isDuplicateInput, "client-styling": this.clientStyling, tooltip: input.tooltip, placeholder: input.placeholder == null ? '' : input.placeholder, dateFormat: this.dateFormat })));
459
+ return h("form", { action: '.', id: `RegistrationForm${this.registrationStep}`, class: `registration__form ${this.registrationStep !== `Step${index + 1}` ? 'hidden' : ''}`, ref: el => this.form = el }, form[this.registrationStep] && form[this.registrationStep].map(input => h("general-input", { type: input.inputType, name: input.name, displayName: input.displayName, validation: input.validate, action: input.action || null, options: input.data ? input.inputType.toLowerCase() == 'checkboxgroup' ? input.data.subFields : input.data.values : [], defaultValue: input.defaultValue, autofilled: input.autofill, emitValue: this.emitValue, language: this.language, isDuplicateInput: input.isDuplicateInput, "client-styling": this.clientStyling, tooltip: input.tooltip, placeholder: input.placeholder == null ? '' : input.placeholder, dateFormat: this.dateFormat })), this.buttonInsideForm && this.renderButtons());
457
460
  });
458
461
  }
459
462
  ;
460
463
  renderButtons() {
461
- return (h("div", { class: 'registration__buttons-wrapper' }, 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.isLastStep ? translate('doneButton', this.language) : translate('nextButton', this.language)), h("button", { class: `registration__button registration__button--back ${this.registrationStep == 'Step1' ? 'registration__button--first-step' : ''}`, onClick: (e) => this.backHandler(e) }, translate('backButton', this.language))));
464
+ return (h("div", { class: 'registration__buttons-wrapper' }, 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)), h("button", { class: `registration__button registration__button--back ${this.registrationStep == 'Step1' ? 'registration__button--first-step' : ''}`, onClick: (e) => this.backHandler(e) }, translate('backButton', this.language))));
462
465
  }
463
466
  render() {
464
467
  if (this.isLoading) {
465
468
  return h("p", null, "Please wait, loading ...");
466
469
  }
467
- return (h("div", { class: `registration registration__${this.registrationStep}`, ref: el => this.stylingContainer = el }, this.renderForm(), h("p", { class: 'registration__error-message' }, this.errorMessage), this.renderButtons()));
470
+ return (h("div", { class: `registration registration__${this.registrationStep}`, ref: el => this.stylingContainer = el }, this.renderForm(), h("p", { class: 'registration__error-message' }, this.errorMessage), !this.buttonInsideForm && this.renderButtons()));
468
471
  }
469
472
  static get watchers() { return {
470
473
  "registrationStep": ["sendStep"],
@@ -478,6 +481,7 @@ const GeneralRegistration$1 = /*@__PURE__*/ proxyCustomElement(class extends HTM
478
481
  "clientStylingUrl": [513, "client-styling-url"],
479
482
  "translationUrl": [513, "translation-url"],
480
483
  "dateFormat": [513, "date-format"],
484
+ "buttonInsideForm": [516, "button-inside-form"],
481
485
  "errorMessage": [32],
482
486
  "isFormValid": [32],
483
487
  "isLoading": [32],
@@ -17,6 +17,24 @@ const NumberInput = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement {
17
17
  this.limitStylingAppends = false;
18
18
  this.showTooltip = false;
19
19
  this.validationPattern = '';
20
+ this.touched = false;
21
+ this.handleInput = (event) => {
22
+ this.value = event.target.value;
23
+ this.touched = true;
24
+ if (this.debounceTime) {
25
+ clearTimeout(this.debounceTime);
26
+ }
27
+ this.debounceTime = setTimeout(() => {
28
+ this.isValid = this.setValidity();
29
+ this.errorMessage = this.setErrorMessage();
30
+ this.emitValueHandler(true);
31
+ }, 500);
32
+ };
33
+ this.handleBlur = () => {
34
+ this.isValid = this.setValidity();
35
+ this.errorMessage = this.setErrorMessage();
36
+ this.touched = true;
37
+ };
20
38
  this.setClientStyling = () => {
21
39
  let sheet = document.createElement('style');
22
40
  sheet.innerHTML = this.clientStyling;
@@ -57,18 +75,14 @@ const NumberInput = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement {
57
75
  this.limitStylingAppends = true;
58
76
  }
59
77
  // end custom styling area
78
+ }
79
+ componentDidLoad() {
80
+ this.isValid = this.setValidity();
60
81
  if (this.defaultValue) {
61
82
  this.value = this.defaultValue;
62
83
  this.valueHandler({ name: this.name, value: this.value });
63
84
  }
64
85
  }
65
- handleInput(event) {
66
- this.value = event.target.value;
67
- this.errorMessage = this.setErrorMessage();
68
- this.isValid = this.setValidity();
69
- this.validityStateHandler({ valid: this.isValid, name: this.name });
70
- this.emitValueHandler(true);
71
- }
72
86
  setValidity() {
73
87
  return this.inputReference.validity.valid;
74
88
  }
@@ -97,9 +111,12 @@ const NumberInput = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement {
97
111
  return null;
98
112
  }
99
113
  render() {
100
- const invalidClass = this.isValid == true || this.isValid == undefined ? '' : 'number__input--invalid';
101
- return h("div", { class: 'number__wrapper', ref: el => this.stylingContainer = el }, h("div", { class: 'number__wrapper--flex' }, h("label", { class: `number__label ${this.validation.mandatory ? 'number__label--required' : ''}`, htmlFor: `${this.name}__input` }, this.displayName), h("div", { class: 'number__wrapper--relative' }, this.tooltip &&
102
- h("img", { class: 'number__tooltip-icon', src: tooltipIconSvg, alt: "", ref: (el) => this.tooltipIconReference = el, onClick: () => this.showTooltip = !this.showTooltip }), this.renderTooltip())), 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, onBlur: (e) => this.handleInput(e) }), h("small", { class: 'number__error-message' }, this.errorMessage));
114
+ let invalidClass;
115
+ if (this.touched) {
116
+ invalidClass = this.isValid == true || this.isValid == undefined ? '' : 'text__input--invalid';
117
+ }
118
+ return h("div", { class: `number__wrapper ${this.name}__input`, ref: el => this.stylingContainer = el }, h("div", { class: 'number__wrapper--flex' }, h("label", { class: `number__label ${this.validation.mandatory ? 'number__label--required' : ''}`, htmlFor: `${this.name}__input` }, this.displayName), h("div", { class: 'number__wrapper--relative' }, this.tooltip &&
119
+ h("img", { class: 'number__tooltip-icon', src: tooltipIconSvg, alt: "", ref: (el) => this.tooltipIconReference = el, onClick: () => this.showTooltip = !this.showTooltip }), this.renderTooltip())), 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 }), h("small", { class: 'number__error-message' }, this.errorMessage));
103
120
  }
104
121
  static get watchers() { return {
105
122
  "isValid": ["validityChanged"],