@grapadigital/shared-app-modules 0.0.43
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 +29 -0
- package/dist/action.d.ts +516 -0
- package/dist/action.js +1 -0
- package/dist/assets/accordion.css +1 -0
- package/dist/chuncks/accordion.C3syX7hT.js +10898 -0
- package/dist/chuncks/card.BZIarLnp.js +90 -0
- package/dist/client.d.ts +66 -0
- package/dist/client.js +1 -0
- package/dist/components.d.ts +83 -0
- package/dist/components.js +700 -0
- package/dist/constants.d.ts +5 -0
- package/dist/constants.js +5 -0
- package/dist/content.d.ts +516 -0
- package/dist/content.js +1 -0
- package/dist/contract.d.ts +19 -0
- package/dist/contract.js +1 -0
- package/dist/curation.d.ts +110 -0
- package/dist/curation.js +1 -0
- package/dist/dataservices.d.ts +5 -0
- package/dist/dataservices.js +1 -0
- package/dist/hooks.d.ts +3 -0
- package/dist/hooks.js +15 -0
- package/dist/influencer.d.ts +69 -0
- package/dist/influencer.js +1 -0
- package/dist/invoice.d.ts +516 -0
- package/dist/invoice.js +1 -0
- package/dist/libs.d.ts +1 -0
- package/dist/libs.js +1 -0
- package/dist/log.d.ts +20 -0
- package/dist/log.js +1 -0
- package/dist/pages.d.ts +14 -0
- package/dist/pages.js +52 -0
- package/dist/payment.d.ts +516 -0
- package/dist/payment.js +1 -0
- package/dist/profile.d.ts +69 -0
- package/dist/profile.js +1 -0
- package/dist/project.d.ts +42 -0
- package/dist/project.js +1 -0
- package/dist/recruitment.d.ts +516 -0
- package/dist/recruitment.js +1 -0
- package/dist/sale.d.ts +516 -0
- package/dist/sale.js +1 -0
- package/dist/shadcn.d.ts +370 -0
- package/dist/shadcn.js +3447 -0
- package/dist/supplier.d.ts +38 -0
- package/dist/supplier.js +1 -0
- package/dist/user.d.ts +35 -0
- package/dist/user.js +1 -0
- package/dist/utils.d.ts +76 -0
- package/dist/utils.js +41 -0
- package/package.json +156 -0
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
export declare interface SupplierInterface extends UserInterface {
|
|
2
|
+
}
|
|
3
|
+
|
|
4
|
+
declare interface UserInterface {
|
|
5
|
+
_id?: string;
|
|
6
|
+
name?: string;
|
|
7
|
+
document?: string;
|
|
8
|
+
email?: string;
|
|
9
|
+
phone?: string;
|
|
10
|
+
picture?: string;
|
|
11
|
+
address?: {
|
|
12
|
+
zipcode?: string;
|
|
13
|
+
city?: string;
|
|
14
|
+
state?: string;
|
|
15
|
+
street?: string;
|
|
16
|
+
number?: string;
|
|
17
|
+
complement?: string;
|
|
18
|
+
};
|
|
19
|
+
company?: {
|
|
20
|
+
legalName?: string;
|
|
21
|
+
document?: string;
|
|
22
|
+
bank?: string;
|
|
23
|
+
agency?: string;
|
|
24
|
+
account?: string;
|
|
25
|
+
digit?: string;
|
|
26
|
+
pix?: string;
|
|
27
|
+
};
|
|
28
|
+
individual?: {
|
|
29
|
+
rg?: string;
|
|
30
|
+
cpf?: string;
|
|
31
|
+
birthday?: string;
|
|
32
|
+
maritalStatus?: string;
|
|
33
|
+
nationality?: string;
|
|
34
|
+
profession?: string;
|
|
35
|
+
};
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
export { }
|
package/dist/supplier.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
|
package/dist/user.d.ts
ADDED
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
export declare interface UserInterface {
|
|
2
|
+
_id?: string;
|
|
3
|
+
name?: string;
|
|
4
|
+
document?: string;
|
|
5
|
+
email?: string;
|
|
6
|
+
phone?: string;
|
|
7
|
+
picture?: string;
|
|
8
|
+
address?: {
|
|
9
|
+
zipcode?: string;
|
|
10
|
+
city?: string;
|
|
11
|
+
state?: string;
|
|
12
|
+
street?: string;
|
|
13
|
+
number?: string;
|
|
14
|
+
complement?: string;
|
|
15
|
+
};
|
|
16
|
+
company?: {
|
|
17
|
+
legalName?: string;
|
|
18
|
+
document?: string;
|
|
19
|
+
bank?: string;
|
|
20
|
+
agency?: string;
|
|
21
|
+
account?: string;
|
|
22
|
+
digit?: string;
|
|
23
|
+
pix?: string;
|
|
24
|
+
};
|
|
25
|
+
individual?: {
|
|
26
|
+
rg?: string;
|
|
27
|
+
cpf?: string;
|
|
28
|
+
birthday?: string;
|
|
29
|
+
maritalStatus?: string;
|
|
30
|
+
nationality?: string;
|
|
31
|
+
profession?: string;
|
|
32
|
+
};
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
export { }
|
package/dist/user.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
|
package/dist/utils.d.ts
ADDED
|
@@ -0,0 +1,76 @@
|
|
|
1
|
+
export declare function formatCurrency(value: number): string;
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* Verifica se o valor fornecido é um número ou uma string que pode ser convertida para número.
|
|
5
|
+
*
|
|
6
|
+
* @param {string | number} value - O valor que será testado.
|
|
7
|
+
* @returns {boolean} Retorna `true` se o valor for um número ou uma string numérica válida, caso contrário `false`.
|
|
8
|
+
*
|
|
9
|
+
* @example
|
|
10
|
+
* isNumber(42); // true
|
|
11
|
+
* isNumber(Infinity); // true
|
|
12
|
+
* isNumber('42'); // true
|
|
13
|
+
* isNumber(NaN); // false
|
|
14
|
+
* isNumber('42a'); // false
|
|
15
|
+
* isNumber('abc'); // false
|
|
16
|
+
*/
|
|
17
|
+
export declare function isNumber(value: string | number): value is number;
|
|
18
|
+
|
|
19
|
+
/**
|
|
20
|
+
* Aplica a máscara de CNPJ a uma string numérica.
|
|
21
|
+
*
|
|
22
|
+
* @param {string} value - O valor numérico ou parcialmente formatado do CNPJ.
|
|
23
|
+
* @returns {string} O CNPJ formatado no padrão XX.XXX.XXX/XXXX-XX.
|
|
24
|
+
*
|
|
25
|
+
* @example
|
|
26
|
+
* maskCNPJ("12345678000195"); // retorna "12.345.678/0001-95"
|
|
27
|
+
*/
|
|
28
|
+
export declare function maskCNPJ(value: string): string;
|
|
29
|
+
|
|
30
|
+
/**
|
|
31
|
+
* Aplica a máscara de CPF a uma string numérica.
|
|
32
|
+
*
|
|
33
|
+
* @param {string} value - O valor numérico ou parcialmente formatado do CPF.
|
|
34
|
+
* @returns {string} O CPF formatado no padrão XXX.XXX.XXX-XX.
|
|
35
|
+
*
|
|
36
|
+
* @example
|
|
37
|
+
* maskCPF("12345678909"); // retorna "123.456.789-09"
|
|
38
|
+
*/
|
|
39
|
+
export declare function maskCPF(value: string): string;
|
|
40
|
+
|
|
41
|
+
/**
|
|
42
|
+
* Aplica a máscara de RG a uma string numérica.
|
|
43
|
+
*
|
|
44
|
+
* @param {string} value - O valor numérico ou parcialmente formatado do RG.
|
|
45
|
+
* @returns {string} O RG formatado no padrão XX.XXX.XXX-X.
|
|
46
|
+
*
|
|
47
|
+
* @example
|
|
48
|
+
* maskRG("123456789"); // retorna "12.345.678-9"
|
|
49
|
+
*/
|
|
50
|
+
export declare function maskRG(value: string): string;
|
|
51
|
+
|
|
52
|
+
/**
|
|
53
|
+
* Aplica a máscara de CEP (Código de Endereçamento Postal) a uma string numérica.
|
|
54
|
+
*
|
|
55
|
+
* @param {string} value - O valor numérico ou parcialmente formatado do CEP.
|
|
56
|
+
* @returns {string} O CEP formatado no padrão XXXXX-XXX.
|
|
57
|
+
*
|
|
58
|
+
* @example
|
|
59
|
+
* maskZipcode("12345678"); // retorna "12345-678"
|
|
60
|
+
*/
|
|
61
|
+
export declare function maskZipCode(value: string): string;
|
|
62
|
+
|
|
63
|
+
export declare function preFormatCurrency(value: string): number;
|
|
64
|
+
|
|
65
|
+
/**
|
|
66
|
+
* Remove qualquer formatação de uma string, deixando apenas os números.
|
|
67
|
+
*
|
|
68
|
+
* @param {string} maskedValue - Valor possivelmente formatado.
|
|
69
|
+
* @returns {string} Valor numérico sem máscara.
|
|
70
|
+
*
|
|
71
|
+
* @example
|
|
72
|
+
* unmask("123.456.789-09"); // retorna "12345678909"
|
|
73
|
+
*/
|
|
74
|
+
export declare function unmask(maskedValue: string): string;
|
|
75
|
+
|
|
76
|
+
export { }
|
package/dist/utils.js
ADDED
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
function u(e) {
|
|
2
|
+
const r = e.replace(/[^0-9]/g, "");
|
|
3
|
+
return Number(r) / 100;
|
|
4
|
+
}
|
|
5
|
+
function c(e) {
|
|
6
|
+
return e.toLocaleString("pt-BR", {
|
|
7
|
+
style: "currency",
|
|
8
|
+
currency: "BRL"
|
|
9
|
+
});
|
|
10
|
+
}
|
|
11
|
+
function a(e) {
|
|
12
|
+
return e.replace(/\D/g, "").replace(/^(\d{3})(\d{3})(\d{3})(\d{2})$/, "$1.$2.$3-$4");
|
|
13
|
+
}
|
|
14
|
+
function t(e) {
|
|
15
|
+
return e.replace(/\D/g, "").replace(/^(\d{2})(\d{3})(\d{3})(\d{1})$/, "$1.$2.$3-$4");
|
|
16
|
+
}
|
|
17
|
+
function l(e) {
|
|
18
|
+
return e.replace(/\D/g, "").replace(
|
|
19
|
+
/^(\d{2})(\d{3})(\d{3})(\d{4})(\d{2})$/,
|
|
20
|
+
"$1.$2.$3/$4-$5"
|
|
21
|
+
);
|
|
22
|
+
}
|
|
23
|
+
function o(e) {
|
|
24
|
+
return e.replace(/\D/g, "").replace(/^(\d{5})(\d{3})$/, "$1-$2");
|
|
25
|
+
}
|
|
26
|
+
function i(e) {
|
|
27
|
+
return e.replace(/\D/g, "");
|
|
28
|
+
}
|
|
29
|
+
function m(e) {
|
|
30
|
+
return !isNaN(Number(e));
|
|
31
|
+
}
|
|
32
|
+
export {
|
|
33
|
+
c as formatCurrency,
|
|
34
|
+
m as isNumber,
|
|
35
|
+
l as maskCNPJ,
|
|
36
|
+
a as maskCPF,
|
|
37
|
+
t as maskRG,
|
|
38
|
+
o as maskZipCode,
|
|
39
|
+
u as preFormatCurrency,
|
|
40
|
+
i as unmask
|
|
41
|
+
};
|
package/package.json
ADDED
|
@@ -0,0 +1,156 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@grapadigital/shared-app-modules",
|
|
3
|
+
"private": false,
|
|
4
|
+
"version": "0.0.43",
|
|
5
|
+
"files": [
|
|
6
|
+
"dist"
|
|
7
|
+
],
|
|
8
|
+
"exports": {
|
|
9
|
+
"./shadcn": {
|
|
10
|
+
"import": "./dist/shadcn.js",
|
|
11
|
+
"types": "./dist/shadcn.d.ts"
|
|
12
|
+
},
|
|
13
|
+
"./components": {
|
|
14
|
+
"import": "./dist/components.js",
|
|
15
|
+
"types": "./dist/components.d.ts"
|
|
16
|
+
},
|
|
17
|
+
"./pages": {
|
|
18
|
+
"import": "./dist/pages.js",
|
|
19
|
+
"types": "./dist/pages.d.ts"
|
|
20
|
+
},
|
|
21
|
+
"./libs": {
|
|
22
|
+
"import": "./dist/libs.js",
|
|
23
|
+
"types": "./dist/libs.d.ts"
|
|
24
|
+
},
|
|
25
|
+
"./utils": {
|
|
26
|
+
"import": "./dist/utils.js",
|
|
27
|
+
"types": "./dist/utils.d.ts"
|
|
28
|
+
},
|
|
29
|
+
"./constants": {
|
|
30
|
+
"import": "./dist/constants.js",
|
|
31
|
+
"types": "./dist/constants.d.ts"
|
|
32
|
+
},
|
|
33
|
+
"./hooks": {
|
|
34
|
+
"import": "./dist/hooks.js",
|
|
35
|
+
"types": "./dist/hooks.d.ts"
|
|
36
|
+
},
|
|
37
|
+
"./interfaces/*": {
|
|
38
|
+
"types": "./dist/*.d.ts",
|
|
39
|
+
"import": "./dist/*.d.ts"
|
|
40
|
+
},
|
|
41
|
+
"./interfaces/action": {
|
|
42
|
+
"import": "./dist/action.d.ts",
|
|
43
|
+
"types": "./dist/action.d.ts"
|
|
44
|
+
},
|
|
45
|
+
"./interfaces/client": {
|
|
46
|
+
"import": "./dist/client.d.ts",
|
|
47
|
+
"types": "./dist/client.d.ts"
|
|
48
|
+
},
|
|
49
|
+
"./interfaces/content": {
|
|
50
|
+
"import": "./dist/content.d.ts",
|
|
51
|
+
"types": "./dist/content.d.ts"
|
|
52
|
+
},
|
|
53
|
+
"./interfaces/contract": {
|
|
54
|
+
"import": "./dist/contract.d.ts",
|
|
55
|
+
"types": "./dist/contract.d.ts"
|
|
56
|
+
},
|
|
57
|
+
"./interfaces/curation": {
|
|
58
|
+
"import": "./dist/curation.d.ts",
|
|
59
|
+
"types": "./dist/curation.d.ts"
|
|
60
|
+
},
|
|
61
|
+
"./interfaces/dataservices": {
|
|
62
|
+
"import": "./dist/dataservices.d.ts",
|
|
63
|
+
"types": "./dist/dataservices.d.ts"
|
|
64
|
+
},
|
|
65
|
+
"./interfaces/influencer": {
|
|
66
|
+
"import": "./dist/influencer.d.ts",
|
|
67
|
+
"types": "./dist/influencer.d.ts"
|
|
68
|
+
},
|
|
69
|
+
"./interfaces/invoice": {
|
|
70
|
+
"import": "./dist/invoice.d.ts",
|
|
71
|
+
"types": "./dist/invoice.d.ts"
|
|
72
|
+
},
|
|
73
|
+
"./interfaces/log": {
|
|
74
|
+
"import": "./dist/log.d.ts",
|
|
75
|
+
"types": "./dist/log.d.ts"
|
|
76
|
+
},
|
|
77
|
+
"./interfaces/payment": {
|
|
78
|
+
"import": "./dist/payment.d.ts",
|
|
79
|
+
"types": "./dist/payment.d.ts"
|
|
80
|
+
},
|
|
81
|
+
"./interfaces/profile": {
|
|
82
|
+
"import": "./dist/profile.d.ts",
|
|
83
|
+
"types": "./dist/profile.d.ts"
|
|
84
|
+
},
|
|
85
|
+
"./interfaces/project": {
|
|
86
|
+
"import": "./dist/project.d.ts",
|
|
87
|
+
"types": "./dist/project.d.ts"
|
|
88
|
+
},
|
|
89
|
+
"./interfaces/recruitment": {
|
|
90
|
+
"import": "./dist/recruitment.d.ts",
|
|
91
|
+
"types": "./dist/recruitment.d.ts"
|
|
92
|
+
},
|
|
93
|
+
"./interfaces/sale": {
|
|
94
|
+
"import": "./dist/sale.d.ts",
|
|
95
|
+
"types": "./dist/sale.d.ts"
|
|
96
|
+
},
|
|
97
|
+
"./interfaces/supplier": {
|
|
98
|
+
"import": "./dist/supplier.d.ts",
|
|
99
|
+
"types": "./dist/supplier.d.ts"
|
|
100
|
+
},
|
|
101
|
+
"./interfaces/user": {
|
|
102
|
+
"import": "./dist/user.d.ts",
|
|
103
|
+
"types": "./dist/user.d.ts"
|
|
104
|
+
}
|
|
105
|
+
},
|
|
106
|
+
"type": "module",
|
|
107
|
+
"dependencies": {
|
|
108
|
+
"@radix-ui/react-accordion": "^1.2.12",
|
|
109
|
+
"@radix-ui/react-checkbox": "^1.3.3",
|
|
110
|
+
"@radix-ui/react-dialog": "^1.1.15",
|
|
111
|
+
"@radix-ui/react-label": "^2.1.8",
|
|
112
|
+
"@radix-ui/react-popover": "^1.1.15",
|
|
113
|
+
"@radix-ui/react-select": "^2.2.6",
|
|
114
|
+
"@radix-ui/react-separator": "^1.1.8",
|
|
115
|
+
"@radix-ui/react-slot": "^1.2.4",
|
|
116
|
+
"@radix-ui/react-tabs": "^1.1.13",
|
|
117
|
+
"@radix-ui/react-tooltip": "^1.2.8",
|
|
118
|
+
"class-variance-authority": "^0.7.1",
|
|
119
|
+
"clsx": "^2.1.1",
|
|
120
|
+
"cmdk": "^1.1.1",
|
|
121
|
+
"lucide-react": "^0.555.0",
|
|
122
|
+
"react": "^18.3.1",
|
|
123
|
+
"react-day-picker": "^9.11.3",
|
|
124
|
+
"react-dom": "^18.3.1",
|
|
125
|
+
"react-router-dom": "^7.10.1",
|
|
126
|
+
"tailwind-merge": "^3.4.0",
|
|
127
|
+
"tailwindcss-animate": "^1.0.7",
|
|
128
|
+
"vaul": "^1.1.2"
|
|
129
|
+
},
|
|
130
|
+
"devDependencies": {
|
|
131
|
+
"@eslint/js": "latest",
|
|
132
|
+
"@types/node": "^24.10.1",
|
|
133
|
+
"@types/react": "^19.2.5",
|
|
134
|
+
"@types/react-dom": "^19.2.3",
|
|
135
|
+
"@vitejs/plugin-react-swc": "^4.2.2",
|
|
136
|
+
"autoprefixer": "^10.4.22",
|
|
137
|
+
"eslint": "^9.39.1",
|
|
138
|
+
"eslint-plugin-react-hooks": "^7.0.1",
|
|
139
|
+
"eslint-plugin-react-refresh": "^0.4.24",
|
|
140
|
+
"globals": "^16.5.0",
|
|
141
|
+
"postcss": "^8.5.6",
|
|
142
|
+
"tailwindcss": "^3.4.18",
|
|
143
|
+
"tw-animate-css": "^1.4.0",
|
|
144
|
+
"typescript": "~5.9.3",
|
|
145
|
+
"typescript-eslint": "^8.46.4",
|
|
146
|
+
"vite": "^7.2.4",
|
|
147
|
+
"vite-plugin-dts": "^4.5.4",
|
|
148
|
+
"vite-plugin-lib-inject-css": "^2.2.2"
|
|
149
|
+
},
|
|
150
|
+
"scripts": {
|
|
151
|
+
"dev": "vite",
|
|
152
|
+
"build": "rm -rf dist && tsc -b && vite build",
|
|
153
|
+
"lint": "eslint .",
|
|
154
|
+
"preview": "vite preview"
|
|
155
|
+
}
|
|
156
|
+
}
|