@everymatrix/general-registration 1.87.21 → 1.87.23

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.
@@ -435,7 +435,7 @@ const CheckboxGroupInput = class {
435
435
  };
436
436
  CheckboxGroupInput.style = CheckboxGroupInputStyle0;
437
437
 
438
- const checkboxInputCss = "*,*::before,*::after{padding:0;margin:0;box-sizing:border-box}.checkbox{font-family:\"Roboto\";font-style:normal;font-size:15px}.checkbox__wrapper{display:flex;gap:10px;position:relative;align-items:baseline}.checkbox__wrapper--relative{position:relative}.checkbox__input[indeterminate]::part(checkbox)::after,.checkbox__input[indeterminate]::part(checkbox),.checkbox__input[checked]::part(checkbox){background-color:var(--emw--login-color-primary, var(--emw--color-primary, #22B04E))}.checkbox__label{font-style:inherit;font-family:inherit;font-weight:400;font-size:16px;color:var(--emw--registration-typography, var(--emw--color-black, #000000));line-height:1.5;padding:0px;vertical-align:baseline}.checkbox__label a{color:var(--emw--login-color-primary, var(--emw--color-primary, #22B04E))}.checkbox__error-message{position:absolute;top:calc(100% + 5px);left:0;color:var(--emw--color-error, var(--emw--color-red, #ed0909))}.checkbox__tooltip-icon{width:16px;height:auto}.checkbox__tooltip{position:absolute;top:0;right:20px;background-color:var(--emw--color-white, #FFFFFF);border:1px solid var(--emw--color-gray-100, #E6E6E6);color:var(--emw--registration-typography, var(--emw--color-black, #000000));padding:10px;border-radius:5px;opacity:0;transition:opacity 0.3s ease-in-out;z-index:10}.checkbox__tooltip.visible{opacity:1}.checkbox__input::part(checkbox){background-color:var(--emw--color-white, #FFFFFF);transform:scale(0.8, 0.8);border-radius:var(--emw--border-radius-small, 2px);box-shadow:0 0px 0px 2px var(--emw--color-gray, #7a7a7a)}.checkbox__input::part(required-indicator)::after{content:\"*\"}.checkbox__input[indeterminate]::part(checkbox),.checkbox__input[checked]::part(checkbox){background-color:var(--emw--login-color-primary, var(--emw--color-primary, #22B04E));box-shadow:none}";
438
+ const checkboxInputCss = "*,*::before,*::after{padding:0;margin:0;box-sizing:border-box}.checkbox{font-family:\"Roboto\";font-style:normal;font-size:15px}.checkbox__wrapper{display:flex;gap:10px;position:relative;align-items:baseline}.checkbox__wrapper--relative{position:relative}.checkbox__input[indeterminate]::part(checkbox)::after,.checkbox__input[indeterminate]::part(checkbox),.checkbox__input[checked]::part(checkbox){background-color:var(--emw--login-color-primary, var(--emw--color-primary, #22B04E))}.checkbox__label{font-style:inherit;font-family:inherit;font-weight:400;font-size:16px;color:var(--emw--registration-typography, var(--emw--color-black, #000000));line-height:1.5;padding:0px;vertical-align:baseline}.checkbox__label a{color:var(--emw--login-color-primary, var(--emw--color-primary, #22B04E))}.checkbox__error-message{position:absolute;top:calc(100% + 5px);left:0;color:var(--emw--color-error, var(--emw--color-red, #ed0909))}.checkbox__tooltip-icon{width:16px;height:auto}.checkbox__tooltip{position:absolute;top:0;right:20px;background-color:var(--emw--color-white, #FFFFFF);border:1px solid var(--emw--color-gray-100, #E6E6E6);color:var(--emw--registration-typography, var(--emw--color-black, #000000));padding:10px;border-radius:5px;opacity:0;transition:opacity 0.3s ease-in-out;z-index:10}.checkbox__tooltip.visible{opacity:1}.checkbox__input::part(checkbox){background-color:var(--emw--color-white, #FFFFFF);transform:scale(0.8, 0.8);border-radius:var(--emw--border-radius-small, 2px);box-shadow:0 0px 0px 2px var(--emw--color-gray, #7a7a7a)}.checkbox__input::part(required-indicator)::after{display:none}.checkbox__input[indeterminate]::part(checkbox),.checkbox__input[checked]::part(checkbox){background-color:var(--emw--login-color-primary, var(--emw--color-primary, #22B04E));box-shadow:none}.checkbox__label-text.mandatory::after{content:\"*\";font-family:inherit;color:var(--emw--login-color-primary, var(--emw--color-primary, #22B04E));margin-left:2px}";
439
439
  const CheckboxInputStyle0 = checkboxInputCss;
440
440
 
441
441
  const CheckboxInput = class {
@@ -521,7 +521,11 @@ const CheckboxInput = class {
521
521
  }
522
522
  }
523
523
  renderLabel() {
524
- return (index.h("label", { class: "checkbox__label", htmlFor: `${this.name}__input`, slot: "label" }, index.h("div", { class: "checkbox__label-text", innerHTML: `${this.displayName} ${this.validation.mandatory ? '*' : ''}` })));
524
+ var _a;
525
+ return (index.h("label", { class: "checkbox__label", htmlFor: `${this.name}__input`, slot: "label" }, index.h("div", { class: {
526
+ 'checkbox__label-text': true,
527
+ 'mandatory': (_a = this.validation) === null || _a === void 0 ? void 0 : _a.mandatory,
528
+ }, innerHTML: this.displayName })));
525
529
  }
526
530
  renderTooltip() {
527
531
  if (this.showTooltip) {
@@ -530,7 +534,7 @@ const CheckboxInput = class {
530
534
  return null;
531
535
  }
532
536
  render() {
533
- return (index.h("div", { key: '6d4c24ff269eb9378cdbb8fbeae034018d86b42e', class: `checkbox__wrapper ${this.name}__input`, ref: (el) => (this.stylingContainer = el) }, index.h("vaadin-checkbox", { key: '9ac77865bf2de32e4d880cd2707976acb8d820dd', class: "checkbox__input", required: this.validation.mandatory, checked: this.defaultValue === 'true', onChange: (e) => this.handleCheckbox(e), "error-message": !this.isValid && this.errorMessage, ref: (el) => (this.vaadinCheckbox = el) }, this.renderLabel()), this.tooltip && (index.h("img", { key: '86e2ed5404864abb1704e8748bed15ea7071797a', class: "checkboxgroup__tooltip-icon", src: tooltipIconSvg, alt: "", ref: (el) => (this.tooltipIconReference = el), onClick: () => (this.showTooltip = !this.showTooltip) })), this.renderTooltip()));
537
+ return (index.h("div", { key: '80ed581cec5bb009ea5ea009f11c6453fe24ef7b', class: `checkbox__wrapper ${this.name}__input`, ref: (el) => (this.stylingContainer = el) }, index.h("vaadin-checkbox", { key: '42d793f607af77435f629218f9bdac7736522bc3', class: "checkbox__input", required: this.validation.mandatory, checked: this.defaultValue === 'true', onChange: (e) => this.handleCheckbox(e), "error-message": !this.isValid && this.errorMessage, ref: (el) => (this.vaadinCheckbox = el) }, this.renderLabel()), this.tooltip && (index.h("img", { key: 'ce3870810ede8f3905fd8c07c0892ab0d909bab5', class: "checkboxgroup__tooltip-icon", src: tooltipIconSvg, alt: "", ref: (el) => (this.tooltipIconReference = el), onClick: () => (this.showTooltip = !this.showTooltip) })), this.renderTooltip()));
534
538
  }
535
539
  static get watchers() { return {
536
540
  "clientStyling": ["handleStylingChange"],
@@ -13062,11 +13066,16 @@ const GeneralInput = class {
13062
13066
  case 'twofa':
13063
13067
  return index.h("twofa-input", { name: this.name, displayName: this.displayName, validation: this.validation, emitValue: this.emitValue, language: this.language, "client-styling": this.clientStyling, tooltip: this.tooltip, destination: this.twofaDestination, "resend-interval-seconds": this.twofaResendIntervalSeconds, "enable-south-african-mode": this.enableSouthAfricanMode, "pin-attempts-exceeded": this.pinAttemptsExceeded, "mb-source": this.mbSource });
13064
13068
  default:
13065
- return index.h("p", null, "The ", this.type, " input type is not valid");
13069
+ if (this.displayName && this.displayName.trim() !== '') {
13070
+ return index.h("div", { class: "general-non-input", innerHTML: this.displayName });
13071
+ }
13072
+ else {
13073
+ return null;
13074
+ }
13066
13075
  }
13067
13076
  }
13068
13077
  render() {
13069
- return (index.h(index.Host, { key: '7d036183d9376203451d9805e76b608cfa63570b', class: `general-input--${this.name}`, onClick: this.handleClick }, this.renderInput()));
13078
+ return (index.h(index.Host, { key: '0474aad44033fe0c48473af7938e9ddb77b684e8', class: `general-input--${this.name}`, onClick: this.handleClick }, this.renderInput()));
13070
13079
  }
13071
13080
  get host() { return index.getElement(this); }
13072
13081
  static get watchers() { return {
@@ -14917,7 +14926,8 @@ const GeneralRegistration = class {
14917
14926
  }
14918
14927
  formatConfig(config) {
14919
14928
  this.listOfInputs = config.content.fields.flatMap((field) => {
14920
- const duplicateInputRule = field.validate.custom.find(customRule => customRule.rule === 'duplicate-input');
14929
+ var _a, _b;
14930
+ const duplicateInputRule = (_b = (_a = field.validate) === null || _a === void 0 ? void 0 : _a.custom) === null || _b === void 0 ? void 0 : _b.find(customRule => customRule.rule === 'duplicate-input');
14921
14931
  const inputElement = Object.assign({}, field);
14922
14932
  if (duplicateInputRule) {
14923
14933
  const duplicateInput = Object.assign(Object.assign({}, field), { name: `${field.name}Duplicate`, displayName: duplicateInputRule.displayName, isDuplicateInput: true });
@@ -15075,10 +15085,10 @@ const GeneralRegistration = class {
15075
15085
  }
15076
15086
  getInvalidStatus(listOfInputs) {
15077
15087
  const invalidInputs = listOfInputs.filter(input => {
15078
- var _a;
15088
+ var _a, _b;
15079
15089
  const inputConfig = this.listOfInputs.find(i => i.name === input.name);
15080
15090
  const inputValue = (_a = this.listOfInputValues.find(v => v.name === input.name)) === null || _a === void 0 ? void 0 : _a.value;
15081
- if (inputConfig && !inputConfig.validate.mandatory) {
15091
+ if (inputConfig && !((_b = inputConfig.validate) === null || _b === void 0 ? void 0 : _b.mandatory)) {
15082
15092
  // Use the helper function to check if value is empty
15083
15093
  if (checkEmptyValue(inputValue)) {
15084
15094
  return false;
@@ -722,7 +722,8 @@ export class GeneralRegistration {
722
722
  }
723
723
  formatConfig(config) {
724
724
  this.listOfInputs = config.content.fields.flatMap((field) => {
725
- const duplicateInputRule = field.validate.custom.find(customRule => customRule.rule === 'duplicate-input');
725
+ var _a, _b;
726
+ const duplicateInputRule = (_b = (_a = field.validate) === null || _a === void 0 ? void 0 : _a.custom) === null || _b === void 0 ? void 0 : _b.find(customRule => customRule.rule === 'duplicate-input');
726
727
  const inputElement = Object.assign({}, field);
727
728
  if (duplicateInputRule) {
728
729
  const duplicateInput = Object.assign(Object.assign({}, field), { name: `${field.name}Duplicate`, displayName: duplicateInputRule.displayName, isDuplicateInput: true });
@@ -881,10 +882,10 @@ export class GeneralRegistration {
881
882
  }
882
883
  getInvalidStatus(listOfInputs) {
883
884
  const invalidInputs = listOfInputs.filter(input => {
884
- var _a;
885
+ var _a, _b;
885
886
  const inputConfig = this.listOfInputs.find(i => i.name === input.name);
886
887
  const inputValue = (_a = this.listOfInputValues.find(v => v.name === input.name)) === null || _a === void 0 ? void 0 : _a.value;
887
- if (inputConfig && !inputConfig.validate.mandatory) {
888
+ if (inputConfig && !((_b = inputConfig.validate) === null || _b === void 0 ? void 0 : _b.mandatory)) {
888
889
  // Use the helper function to check if value is empty
889
890
  if (checkEmptyValue(inputValue)) {
890
891
  return false;
@@ -431,7 +431,7 @@ const CheckboxGroupInput = class {
431
431
  };
432
432
  CheckboxGroupInput.style = CheckboxGroupInputStyle0;
433
433
 
434
- const checkboxInputCss = "*,*::before,*::after{padding:0;margin:0;box-sizing:border-box}.checkbox{font-family:\"Roboto\";font-style:normal;font-size:15px}.checkbox__wrapper{display:flex;gap:10px;position:relative;align-items:baseline}.checkbox__wrapper--relative{position:relative}.checkbox__input[indeterminate]::part(checkbox)::after,.checkbox__input[indeterminate]::part(checkbox),.checkbox__input[checked]::part(checkbox){background-color:var(--emw--login-color-primary, var(--emw--color-primary, #22B04E))}.checkbox__label{font-style:inherit;font-family:inherit;font-weight:400;font-size:16px;color:var(--emw--registration-typography, var(--emw--color-black, #000000));line-height:1.5;padding:0px;vertical-align:baseline}.checkbox__label a{color:var(--emw--login-color-primary, var(--emw--color-primary, #22B04E))}.checkbox__error-message{position:absolute;top:calc(100% + 5px);left:0;color:var(--emw--color-error, var(--emw--color-red, #ed0909))}.checkbox__tooltip-icon{width:16px;height:auto}.checkbox__tooltip{position:absolute;top:0;right:20px;background-color:var(--emw--color-white, #FFFFFF);border:1px solid var(--emw--color-gray-100, #E6E6E6);color:var(--emw--registration-typography, var(--emw--color-black, #000000));padding:10px;border-radius:5px;opacity:0;transition:opacity 0.3s ease-in-out;z-index:10}.checkbox__tooltip.visible{opacity:1}.checkbox__input::part(checkbox){background-color:var(--emw--color-white, #FFFFFF);transform:scale(0.8, 0.8);border-radius:var(--emw--border-radius-small, 2px);box-shadow:0 0px 0px 2px var(--emw--color-gray, #7a7a7a)}.checkbox__input::part(required-indicator)::after{content:\"*\"}.checkbox__input[indeterminate]::part(checkbox),.checkbox__input[checked]::part(checkbox){background-color:var(--emw--login-color-primary, var(--emw--color-primary, #22B04E));box-shadow:none}";
434
+ const checkboxInputCss = "*,*::before,*::after{padding:0;margin:0;box-sizing:border-box}.checkbox{font-family:\"Roboto\";font-style:normal;font-size:15px}.checkbox__wrapper{display:flex;gap:10px;position:relative;align-items:baseline}.checkbox__wrapper--relative{position:relative}.checkbox__input[indeterminate]::part(checkbox)::after,.checkbox__input[indeterminate]::part(checkbox),.checkbox__input[checked]::part(checkbox){background-color:var(--emw--login-color-primary, var(--emw--color-primary, #22B04E))}.checkbox__label{font-style:inherit;font-family:inherit;font-weight:400;font-size:16px;color:var(--emw--registration-typography, var(--emw--color-black, #000000));line-height:1.5;padding:0px;vertical-align:baseline}.checkbox__label a{color:var(--emw--login-color-primary, var(--emw--color-primary, #22B04E))}.checkbox__error-message{position:absolute;top:calc(100% + 5px);left:0;color:var(--emw--color-error, var(--emw--color-red, #ed0909))}.checkbox__tooltip-icon{width:16px;height:auto}.checkbox__tooltip{position:absolute;top:0;right:20px;background-color:var(--emw--color-white, #FFFFFF);border:1px solid var(--emw--color-gray-100, #E6E6E6);color:var(--emw--registration-typography, var(--emw--color-black, #000000));padding:10px;border-radius:5px;opacity:0;transition:opacity 0.3s ease-in-out;z-index:10}.checkbox__tooltip.visible{opacity:1}.checkbox__input::part(checkbox){background-color:var(--emw--color-white, #FFFFFF);transform:scale(0.8, 0.8);border-radius:var(--emw--border-radius-small, 2px);box-shadow:0 0px 0px 2px var(--emw--color-gray, #7a7a7a)}.checkbox__input::part(required-indicator)::after{display:none}.checkbox__input[indeterminate]::part(checkbox),.checkbox__input[checked]::part(checkbox){background-color:var(--emw--login-color-primary, var(--emw--color-primary, #22B04E));box-shadow:none}.checkbox__label-text.mandatory::after{content:\"*\";font-family:inherit;color:var(--emw--login-color-primary, var(--emw--color-primary, #22B04E));margin-left:2px}";
435
435
  const CheckboxInputStyle0 = checkboxInputCss;
436
436
 
437
437
  const CheckboxInput = class {
@@ -517,7 +517,11 @@ const CheckboxInput = class {
517
517
  }
518
518
  }
519
519
  renderLabel() {
520
- return (h$1("label", { class: "checkbox__label", htmlFor: `${this.name}__input`, slot: "label" }, h$1("div", { class: "checkbox__label-text", innerHTML: `${this.displayName} ${this.validation.mandatory ? '*' : ''}` })));
520
+ var _a;
521
+ return (h$1("label", { class: "checkbox__label", htmlFor: `${this.name}__input`, slot: "label" }, h$1("div", { class: {
522
+ 'checkbox__label-text': true,
523
+ 'mandatory': (_a = this.validation) === null || _a === void 0 ? void 0 : _a.mandatory,
524
+ }, innerHTML: this.displayName })));
521
525
  }
522
526
  renderTooltip() {
523
527
  if (this.showTooltip) {
@@ -526,7 +530,7 @@ const CheckboxInput = class {
526
530
  return null;
527
531
  }
528
532
  render() {
529
- return (h$1("div", { key: '6d4c24ff269eb9378cdbb8fbeae034018d86b42e', class: `checkbox__wrapper ${this.name}__input`, ref: (el) => (this.stylingContainer = el) }, h$1("vaadin-checkbox", { key: '9ac77865bf2de32e4d880cd2707976acb8d820dd', class: "checkbox__input", required: this.validation.mandatory, checked: this.defaultValue === 'true', onChange: (e) => this.handleCheckbox(e), "error-message": !this.isValid && this.errorMessage, ref: (el) => (this.vaadinCheckbox = el) }, this.renderLabel()), this.tooltip && (h$1("img", { key: '86e2ed5404864abb1704e8748bed15ea7071797a', class: "checkboxgroup__tooltip-icon", src: tooltipIconSvg, alt: "", ref: (el) => (this.tooltipIconReference = el), onClick: () => (this.showTooltip = !this.showTooltip) })), this.renderTooltip()));
533
+ return (h$1("div", { key: '80ed581cec5bb009ea5ea009f11c6453fe24ef7b', class: `checkbox__wrapper ${this.name}__input`, ref: (el) => (this.stylingContainer = el) }, h$1("vaadin-checkbox", { key: '42d793f607af77435f629218f9bdac7736522bc3', class: "checkbox__input", required: this.validation.mandatory, checked: this.defaultValue === 'true', onChange: (e) => this.handleCheckbox(e), "error-message": !this.isValid && this.errorMessage, ref: (el) => (this.vaadinCheckbox = el) }, this.renderLabel()), this.tooltip && (h$1("img", { key: 'ce3870810ede8f3905fd8c07c0892ab0d909bab5', class: "checkboxgroup__tooltip-icon", src: tooltipIconSvg, alt: "", ref: (el) => (this.tooltipIconReference = el), onClick: () => (this.showTooltip = !this.showTooltip) })), this.renderTooltip()));
530
534
  }
531
535
  static get watchers() { return {
532
536
  "clientStyling": ["handleStylingChange"],
@@ -13058,11 +13062,16 @@ const GeneralInput = class {
13058
13062
  case 'twofa':
13059
13063
  return h$1("twofa-input", { name: this.name, displayName: this.displayName, validation: this.validation, emitValue: this.emitValue, language: this.language, "client-styling": this.clientStyling, tooltip: this.tooltip, destination: this.twofaDestination, "resend-interval-seconds": this.twofaResendIntervalSeconds, "enable-south-african-mode": this.enableSouthAfricanMode, "pin-attempts-exceeded": this.pinAttemptsExceeded, "mb-source": this.mbSource });
13060
13064
  default:
13061
- return h$1("p", null, "The ", this.type, " input type is not valid");
13065
+ if (this.displayName && this.displayName.trim() !== '') {
13066
+ return h$1("div", { class: "general-non-input", innerHTML: this.displayName });
13067
+ }
13068
+ else {
13069
+ return null;
13070
+ }
13062
13071
  }
13063
13072
  }
13064
13073
  render() {
13065
- return (h$1(Host, { key: '7d036183d9376203451d9805e76b608cfa63570b', class: `general-input--${this.name}`, onClick: this.handleClick }, this.renderInput()));
13074
+ return (h$1(Host, { key: '0474aad44033fe0c48473af7938e9ddb77b684e8', class: `general-input--${this.name}`, onClick: this.handleClick }, this.renderInput()));
13066
13075
  }
13067
13076
  get host() { return getElement(this); }
13068
13077
  static get watchers() { return {
@@ -14913,7 +14922,8 @@ const GeneralRegistration = class {
14913
14922
  }
14914
14923
  formatConfig(config) {
14915
14924
  this.listOfInputs = config.content.fields.flatMap((field) => {
14916
- const duplicateInputRule = field.validate.custom.find(customRule => customRule.rule === 'duplicate-input');
14925
+ var _a, _b;
14926
+ const duplicateInputRule = (_b = (_a = field.validate) === null || _a === void 0 ? void 0 : _a.custom) === null || _b === void 0 ? void 0 : _b.find(customRule => customRule.rule === 'duplicate-input');
14917
14927
  const inputElement = Object.assign({}, field);
14918
14928
  if (duplicateInputRule) {
14919
14929
  const duplicateInput = Object.assign(Object.assign({}, field), { name: `${field.name}Duplicate`, displayName: duplicateInputRule.displayName, isDuplicateInput: true });
@@ -15071,10 +15081,10 @@ const GeneralRegistration = class {
15071
15081
  }
15072
15082
  getInvalidStatus(listOfInputs) {
15073
15083
  const invalidInputs = listOfInputs.filter(input => {
15074
- var _a;
15084
+ var _a, _b;
15075
15085
  const inputConfig = this.listOfInputs.find(i => i.name === input.name);
15076
15086
  const inputValue = (_a = this.listOfInputValues.find(v => v.name === input.name)) === null || _a === void 0 ? void 0 : _a.value;
15077
- if (inputConfig && !inputConfig.validate.mandatory) {
15087
+ if (inputConfig && !((_b = inputConfig.validate) === null || _b === void 0 ? void 0 : _b.mandatory)) {
15078
15088
  // Use the helper function to check if value is empty
15079
15089
  if (checkEmptyValue(inputValue)) {
15080
15090
  return false;