@win2win/shared 1.0.113 → 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.
package/README.md ADDED
@@ -0,0 +1,11 @@
1
+ # README #
2
+ version 1.0.1
3
+
4
+ ### Como hacer deploy del repo
5
+
6
+ * Correr el comando
7
+ `npm run deploy`
8
+
9
+ * [Enlace al repo](https://www.npmjs.com/package/@win2win/shared)
10
+
11
+
@@ -12,7 +12,8 @@ export declare enum PropValidatorKeys {
12
12
  EMAIL = "email",
13
13
  URL = "url",
14
14
  DNI = "dni",
15
- IBAN = "iban"
15
+ IBAN = "iban",
16
+ INE = "ine"
16
17
  }
17
18
  export declare const VALIDATORS: {
18
19
  fn: (val: number) => (control: GamaPropModel) => boolean;
@@ -79,6 +79,15 @@ exports.GamaPropValidatorsMap = {
79
79
  message: "La URL no es válida",
80
80
  label: "URL",
81
81
  },
82
+ iban: {
83
+ fn: () => (control) => {
84
+ if (!control.value)
85
+ return true;
86
+ return iban.isValid(String(control.value) || "");
87
+ },
88
+ message: "El IBAN no es válido",
89
+ label: "Cuenta Bancaria (IBAN)",
90
+ },
82
91
  dni: {
83
92
  fn: () => (control) => {
84
93
  if (!control.value)
@@ -86,17 +95,22 @@ exports.GamaPropValidatorsMap = {
86
95
  return (0, better_dni_1.isValid)(String(control.value) || "");
87
96
  },
88
97
  message: "El dni no es válido",
89
- label: "Identificación (DNI, NIF, NIE)",
98
+ label: "Identificación España (DNI, NIF, NIE)",
90
99
  },
91
- iban: {
100
+ ine: {
92
101
  fn: () => (control) => {
93
- if (!control.value)
94
- return true;
95
- return iban.isValid(String(control.value) || "");
102
+ return true;
96
103
  },
97
- message: "El IBAN no es válido",
98
- label: "Cuenta Bancaria (IBAN)",
104
+ message: "El INE no es válido",
105
+ label: "Identificación México (INE, RFC)",
99
106
  },
107
+ // rfc: {
108
+ // fn: () => (control: GamaPropModel) => {
109
+ // return true
110
+ // },
111
+ // message: "El RFC no es válido",
112
+ // label: "Identificador (RFC)",
113
+ // },
100
114
  };
101
115
  var PropValidatorKeys;
102
116
  (function (PropValidatorKeys) {
@@ -106,7 +120,11 @@ var PropValidatorKeys;
106
120
  PropValidatorKeys["SOLO_NUMEROS"] = "onlyNumbers";
107
121
  PropValidatorKeys["EMAIL"] = "email";
108
122
  PropValidatorKeys["URL"] = "url";
123
+ // ID España
109
124
  PropValidatorKeys["DNI"] = "dni";
110
125
  PropValidatorKeys["IBAN"] = "iban";
126
+ // ID México
127
+ PropValidatorKeys["INE"] = "ine";
128
+ // RFC = "rfc",
111
129
  })(PropValidatorKeys || (exports.PropValidatorKeys = PropValidatorKeys = {}));
112
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.113",
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",