@everymatrix/general-registration 1.87.21 → 1.87.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.
@@ -13062,11 +13062,16 @@ const GeneralInput = class {
13062
13062
  case 'twofa':
13063
13063
  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
13064
  default:
13065
- return index.h("p", null, "The ", this.type, " input type is not valid");
13065
+ if (this.displayName && this.displayName.trim() !== '') {
13066
+ return index.h("div", { class: "general-non-input", innerHTML: this.displayName });
13067
+ }
13068
+ else {
13069
+ return null;
13070
+ }
13066
13071
  }
13067
13072
  }
13068
13073
  render() {
13069
- return (index.h(index.Host, { key: '7d036183d9376203451d9805e76b608cfa63570b', class: `general-input--${this.name}`, onClick: this.handleClick }, this.renderInput()));
13074
+ return (index.h(index.Host, { key: '0474aad44033fe0c48473af7938e9ddb77b684e8', class: `general-input--${this.name}`, onClick: this.handleClick }, this.renderInput()));
13070
13075
  }
13071
13076
  get host() { return index.getElement(this); }
13072
13077
  static get watchers() { return {
@@ -14917,7 +14922,8 @@ const GeneralRegistration = class {
14917
14922
  }
14918
14923
  formatConfig(config) {
14919
14924
  this.listOfInputs = config.content.fields.flatMap((field) => {
14920
- 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');
14921
14927
  const inputElement = Object.assign({}, field);
14922
14928
  if (duplicateInputRule) {
14923
14929
  const duplicateInput = Object.assign(Object.assign({}, field), { name: `${field.name}Duplicate`, displayName: duplicateInputRule.displayName, isDuplicateInput: true });
@@ -15075,10 +15081,10 @@ const GeneralRegistration = class {
15075
15081
  }
15076
15082
  getInvalidStatus(listOfInputs) {
15077
15083
  const invalidInputs = listOfInputs.filter(input => {
15078
- var _a;
15084
+ var _a, _b;
15079
15085
  const inputConfig = this.listOfInputs.find(i => i.name === input.name);
15080
15086
  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) {
15087
+ if (inputConfig && !((_b = inputConfig.validate) === null || _b === void 0 ? void 0 : _b.mandatory)) {
15082
15088
  // Use the helper function to check if value is empty
15083
15089
  if (checkEmptyValue(inputValue)) {
15084
15090
  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;
@@ -13058,11 +13058,16 @@ const GeneralInput = class {
13058
13058
  case 'twofa':
13059
13059
  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
13060
  default:
13061
- return h$1("p", null, "The ", this.type, " input type is not valid");
13061
+ if (this.displayName && this.displayName.trim() !== '') {
13062
+ return h$1("div", { class: "general-non-input", innerHTML: this.displayName });
13063
+ }
13064
+ else {
13065
+ return null;
13066
+ }
13062
13067
  }
13063
13068
  }
13064
13069
  render() {
13065
- return (h$1(Host, { key: '7d036183d9376203451d9805e76b608cfa63570b', class: `general-input--${this.name}`, onClick: this.handleClick }, this.renderInput()));
13070
+ return (h$1(Host, { key: '0474aad44033fe0c48473af7938e9ddb77b684e8', class: `general-input--${this.name}`, onClick: this.handleClick }, this.renderInput()));
13066
13071
  }
13067
13072
  get host() { return getElement(this); }
13068
13073
  static get watchers() { return {
@@ -14913,7 +14918,8 @@ const GeneralRegistration = class {
14913
14918
  }
14914
14919
  formatConfig(config) {
14915
14920
  this.listOfInputs = config.content.fields.flatMap((field) => {
14916
- const duplicateInputRule = field.validate.custom.find(customRule => customRule.rule === 'duplicate-input');
14921
+ var _a, _b;
14922
+ 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
14923
  const inputElement = Object.assign({}, field);
14918
14924
  if (duplicateInputRule) {
14919
14925
  const duplicateInput = Object.assign(Object.assign({}, field), { name: `${field.name}Duplicate`, displayName: duplicateInputRule.displayName, isDuplicateInput: true });
@@ -15071,10 +15077,10 @@ const GeneralRegistration = class {
15071
15077
  }
15072
15078
  getInvalidStatus(listOfInputs) {
15073
15079
  const invalidInputs = listOfInputs.filter(input => {
15074
- var _a;
15080
+ var _a, _b;
15075
15081
  const inputConfig = this.listOfInputs.find(i => i.name === input.name);
15076
15082
  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) {
15083
+ if (inputConfig && !((_b = inputConfig.validate) === null || _b === void 0 ? void 0 : _b.mandatory)) {
15078
15084
  // Use the helper function to check if value is empty
15079
15085
  if (checkEmptyValue(inputValue)) {
15080
15086
  return false;