@sysvale/citizen-components 1.4.0 → 1.5.0

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.
@@ -1 +1 @@
1
- "use strict";const n=require("vee-validate"),t=require("@sysvale/foundry");n.defineRule("required",e=>e?!0:"Esse campo é obrigatório");n.defineRule("minLength",(e,[r])=>!e||!e.length?!0:e.length<r?`O campo deve ter no mínimo ${r} caracteres`:!0);n.defineRule("cpf",e=>t.cpfValidator(e)?!0:"O CPF é inválido");n.defineRule("cns",e=>{const r=e.replace(/[^\d]/g,"");return!r||!r.length?!0:r.length<15?"O CNS é inválido":!0});
1
+ "use strict";const n=require("vee-validate"),t=require("@sysvale/foundry");n.defineRule("required",e=>e?!0:"Esse campo é obrigatório");n.defineRule("minLength",(e,[r])=>!e||!e.length?!0:e.length<r?`O campo deve ter no mínimo ${r} caracteres`:!0);n.defineRule("cpf",e=>t.cpfValidator(e)?!0:"O CPF é inválido");n.defineRule("cns",e=>t.cnsValidator(e)?!0:"O CNS é inválido");
@@ -1,9 +1,6 @@
1
1
  import { defineRule as t } from "vee-validate";
2
- import { cpfValidator as n } from "@sysvale/foundry";
2
+ import { cpfValidator as n, cnsValidator as i } from "@sysvale/foundry";
3
3
  t("required", (r) => r ? !0 : "Esse campo é obrigatório");
4
4
  t("minLength", (r, [e]) => !r || !r.length ? !0 : r.length < e ? `O campo deve ter no mínimo ${e} caracteres` : !0);
5
5
  t("cpf", (r) => n(r) ? !0 : "O CPF é inválido");
6
- t("cns", (r) => {
7
- const e = r.replace(/[^\d]/g, "");
8
- return !e || !e.length ? !0 : e.length < 15 ? "O CNS é inválido" : !0;
9
- });
6
+ t("cns", (r) => i(r) ? !0 : "O CNS é inválido");
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@sysvale/citizen-components",
3
- "version": "1.4.0",
3
+ "version": "1.5.0",
4
4
  "type": "module",
5
5
  "publishConfig": {
6
6
  "access": "public"
@@ -44,8 +44,8 @@
44
44
  "peerDependencies": {
45
45
  "@sysvale/cuida": "^3.148.0",
46
46
  "@sysvale/foundry": "^1.6.0",
47
- "vue": "^3.5.13",
48
- "vee-validate": "^4.15.1"
47
+ "vee-validate": "^4.15.1",
48
+ "vue": "^3.5.13"
49
49
  },
50
50
  "devDependencies": {
51
51
  "@faker-js/faker": "^10.0.0",
@@ -55,6 +55,7 @@
55
55
  "@semantic-release/npm": "^13.1.1",
56
56
  "@semantic-release/release-notes-generator": "^14.1.0",
57
57
  "@sysvale/cuida": "^3.148.0",
58
+ "@sysvale/foundry": "^1.7.0",
58
59
  "@tsconfig/node22": "^22.0.1",
59
60
  "@types/jsdom": "^21.1.7",
60
61
  "@types/lodash": "^4.17.13",
@@ -78,7 +79,6 @@
78
79
  "semantic-release": "^25.0.1",
79
80
  "typescript": "~5.8.0",
80
81
  "vee-validate": "^4.15.1",
81
- "@sysvale/foundry": "^1.6.0",
82
82
  "vite": "^6.2.4",
83
83
  "vite-plugin-dts": "^4.5.4",
84
84
  "vite-plugin-vue-devtools": "^7.7.2",