@win2win/shared 1.0.114 → 1.0.115

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.
@@ -13,8 +13,7 @@ export declare enum PropValidatorKeys {
13
13
  URL = "url",
14
14
  DNI = "dni",
15
15
  IBAN = "iban",
16
- INE = "ine",
17
- RFC = "rfc"
16
+ INE = "ine"
18
17
  }
19
18
  export declare const VALIDATORS: {
20
19
  fn: (val: number) => (control: GamaPropModel) => boolean;
@@ -79,15 +79,6 @@ exports.GamaPropValidatorsMap = {
79
79
  message: "La URL no es válida",
80
80
  label: "URL",
81
81
  },
82
- dni: {
83
- fn: () => (control) => {
84
- if (!control.value)
85
- return true;
86
- return (0, better_dni_1.isValid)(String(control.value) || "");
87
- },
88
- message: "El dni no es válido",
89
- label: "Identificación (DNI, NIF, NIE)",
90
- },
91
82
  iban: {
92
83
  fn: () => (control) => {
93
84
  if (!control.value)
@@ -97,20 +88,29 @@ exports.GamaPropValidatorsMap = {
97
88
  message: "El IBAN no es válido",
98
89
  label: "Cuenta Bancaria (IBAN)",
99
90
  },
100
- ine: {
91
+ dni: {
101
92
  fn: () => (control) => {
102
- return true;
93
+ if (!control.value)
94
+ return true;
95
+ return (0, better_dni_1.isValid)(String(control.value) || "");
103
96
  },
104
- message: "El INE no es válido",
105
- label: "Identificador (INE)",
97
+ message: "El dni no es válido",
98
+ label: "Identificación España (DNI, NIF, NIE)",
106
99
  },
107
- rfc: {
100
+ ine: {
108
101
  fn: () => (control) => {
109
102
  return true;
110
103
  },
111
- message: "El RFC no es válido",
112
- label: "Identificador (RFC)",
104
+ message: "El INE no es válido",
105
+ label: "Identificación México (INE, RFC)",
113
106
  },
107
+ // rfc: {
108
+ // fn: () => (control: GamaPropModel) => {
109
+ // return true
110
+ // },
111
+ // message: "El RFC no es válido",
112
+ // label: "Identificador (RFC)",
113
+ // },
114
114
  };
115
115
  var PropValidatorKeys;
116
116
  (function (PropValidatorKeys) {
@@ -125,6 +125,6 @@ var PropValidatorKeys;
125
125
  PropValidatorKeys["IBAN"] = "iban";
126
126
  // ID México
127
127
  PropValidatorKeys["INE"] = "ine";
128
- PropValidatorKeys["RFC"] = "rfc";
128
+ // RFC = "rfc",
129
129
  })(PropValidatorKeys || (exports.PropValidatorKeys = PropValidatorKeys = {}));
130
130
  exports.VALIDATORS = Object.entries(exports.GamaPropValidatorsMap).map(([key, value]) => ({ value: key, ...value }));
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@win2win/shared",
3
- "version": "1.0.114",
3
+ "version": "1.0.115",
4
4
  "description": "Tipos, interfaces, funciones, constantes, clases y enums compartidos por todos los proyectos de Win2Win",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",