@grapadigital/shared-app-modules 0.0.85 → 0.0.87
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/dist/action.d.ts +2 -1
- package/dist/chuncks/youtube-icon.component.BRqHa946.js +980 -0
- package/dist/components.d.ts +16 -2
- package/dist/components.js +132 -946
- package/dist/constants.d.ts +39 -0
- package/dist/constants.js +32 -5
- package/dist/content.d.ts +2 -1
- package/dist/invoice.d.ts +2 -1
- package/dist/payment.d.ts +2 -1
- package/dist/recruitment.d.ts +2 -1
- package/dist/sale.d.ts +2 -1
- package/dist/utils.d.ts +36 -0
- package/dist/utils.js +35 -20
- package/package.json +9 -9
package/dist/constants.d.ts
CHANGED
|
@@ -1,3 +1,16 @@
|
|
|
1
|
+
import { JSX } from 'react/jsx-runtime';
|
|
2
|
+
import { LucideProps } from 'lucide-react';
|
|
3
|
+
|
|
4
|
+
export declare const BUSINESS_UNIT_VALUES: {
|
|
5
|
+
readonly enterprise: "Empresa";
|
|
6
|
+
readonly artistic: "Artística";
|
|
7
|
+
};
|
|
8
|
+
|
|
9
|
+
export declare const CLIENT_TYPE_VALUES: {
|
|
10
|
+
readonly agency: "Agência";
|
|
11
|
+
readonly brand: "Marca";
|
|
12
|
+
};
|
|
13
|
+
|
|
1
14
|
/**
|
|
2
15
|
* Mensagem de erro genérico.
|
|
3
16
|
* @returns {string} A mensagem.
|
|
@@ -10,6 +23,10 @@ export declare const ERROR_MESSAGE = "N\u00E3o foi poss\u00EDvel concluir a oper
|
|
|
10
23
|
*/
|
|
11
24
|
export declare const FILTER_ALREADY_APPLIED_MESSAGE = "O filtro selecionado j\u00E1 est\u00E1 ativo. Por favor, escolha outro filtro antes de tentar novamente.";
|
|
12
25
|
|
|
26
|
+
declare function InstagramIcon({ size, color, ...props }: LucideProps): JSX.Element;
|
|
27
|
+
|
|
28
|
+
declare function LinkedInIcon({ size, color, ...props }: LucideProps): JSX.Element;
|
|
29
|
+
|
|
13
30
|
/**
|
|
14
31
|
* @deprecated Utilizar `NO_DATA_TO_UPDATE_MESSAGE` no lugar.
|
|
15
32
|
*/
|
|
@@ -21,4 +38,26 @@ export declare const NO_DATA_TO_UPDATE = "N\u00E3o h\u00E1 dados para atualizar.
|
|
|
21
38
|
*/
|
|
22
39
|
export declare const NO_DATA_TO_UPDATE_MESSAGE = "Nenhum dado novo foi informado para realizar a opera\u00E7\u00E3o. Por favor, atualize os campos antes de tentar novamente.";
|
|
23
40
|
|
|
41
|
+
declare function PinterestIcon({ size, color, ...props }: LucideProps): JSX.Element;
|
|
42
|
+
|
|
43
|
+
export declare const SOCIAL_NETWORK_ICON_COMPONENTS: {
|
|
44
|
+
readonly instagram: typeof InstagramIcon;
|
|
45
|
+
readonly tiktok: typeof TikTokIcon;
|
|
46
|
+
readonly youtube: typeof YoutubeIcon;
|
|
47
|
+
readonly linkedin: typeof LinkedInIcon;
|
|
48
|
+
readonly pinterest: typeof PinterestIcon;
|
|
49
|
+
};
|
|
50
|
+
|
|
51
|
+
export declare const SOCIAL_NETWORK_VALUES: {
|
|
52
|
+
readonly instagram: "Instagram";
|
|
53
|
+
readonly tiktok: "TikTok";
|
|
54
|
+
readonly youtube: "YouTube";
|
|
55
|
+
readonly linkedin: "LinkedIn";
|
|
56
|
+
readonly pinterest: "Pinterest";
|
|
57
|
+
};
|
|
58
|
+
|
|
59
|
+
declare function TikTokIcon({ size, color, ...props }: LucideProps): JSX.Element;
|
|
60
|
+
|
|
61
|
+
declare function YoutubeIcon({ size, color, ...props }: LucideProps): JSX.Element;
|
|
62
|
+
|
|
24
63
|
export { }
|
package/dist/constants.js
CHANGED
|
@@ -1,7 +1,34 @@
|
|
|
1
|
-
|
|
1
|
+
import "./chuncks/timeline.DfIC0519.js";
|
|
2
|
+
import { P as o, L as t, Y as a, T as e, I as n } from "./chuncks/youtube-icon.component.BRqHa946.js";
|
|
3
|
+
import "react/jsx-runtime";
|
|
4
|
+
import "react";
|
|
5
|
+
import "date-fns";
|
|
6
|
+
const m = "Não há dados para atualizar.", T = "O filtro selecionado já está ativo. Por favor, escolha outro filtro antes de tentar novamente.", _ = "Nenhum dado novo foi informado para realizar a operação. Por favor, atualize os campos antes de tentar novamente.", A = "Não foi possível concluir a operação. Tente novamente mais tarde ou entre em contato com o suporte.", I = {
|
|
7
|
+
instagram: "Instagram",
|
|
8
|
+
tiktok: "TikTok",
|
|
9
|
+
youtube: "YouTube",
|
|
10
|
+
linkedin: "LinkedIn",
|
|
11
|
+
pinterest: "Pinterest"
|
|
12
|
+
}, p = {
|
|
13
|
+
agency: "Agência",
|
|
14
|
+
brand: "Marca"
|
|
15
|
+
}, u = {
|
|
16
|
+
enterprise: "Empresa",
|
|
17
|
+
artistic: "Artística"
|
|
18
|
+
}, S = {
|
|
19
|
+
instagram: n,
|
|
20
|
+
tiktok: e,
|
|
21
|
+
youtube: a,
|
|
22
|
+
linkedin: t,
|
|
23
|
+
pinterest: o
|
|
24
|
+
};
|
|
2
25
|
export {
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
26
|
+
u as BUSINESS_UNIT_VALUES,
|
|
27
|
+
p as CLIENT_TYPE_VALUES,
|
|
28
|
+
A as ERROR_MESSAGE,
|
|
29
|
+
T as FILTER_ALREADY_APPLIED_MESSAGE,
|
|
30
|
+
m as NO_DATA_TO_UPDATE,
|
|
31
|
+
_ as NO_DATA_TO_UPDATE_MESSAGE,
|
|
32
|
+
S as SOCIAL_NETWORK_ICON_COMPONENTS,
|
|
33
|
+
I as SOCIAL_NETWORK_VALUES
|
|
7
34
|
};
|
package/dist/content.d.ts
CHANGED
|
@@ -372,7 +372,7 @@ declare interface ProfileMetric {
|
|
|
372
372
|
|
|
373
373
|
declare interface ProposalInterface {
|
|
374
374
|
businessUnit: "enterprise" | "artistic";
|
|
375
|
-
|
|
375
|
+
origin: "inbound" | "outbound";
|
|
376
376
|
contact: string;
|
|
377
377
|
initialScope: string;
|
|
378
378
|
profile: ProfileInterface;
|
|
@@ -473,6 +473,7 @@ declare interface SaleInterface {
|
|
|
473
473
|
};
|
|
474
474
|
closedAt?: string;
|
|
475
475
|
isDollarNegotiation: boolean;
|
|
476
|
+
type: "new" | "renewal" | "upsell";
|
|
476
477
|
}
|
|
477
478
|
|
|
478
479
|
declare type SalePaymentMethod = "transfer" | "direct" | "debit_note" | "client";
|
package/dist/invoice.d.ts
CHANGED
|
@@ -372,7 +372,7 @@ declare interface ProfileMetric {
|
|
|
372
372
|
|
|
373
373
|
declare interface ProposalInterface {
|
|
374
374
|
businessUnit: "enterprise" | "artistic";
|
|
375
|
-
|
|
375
|
+
origin: "inbound" | "outbound";
|
|
376
376
|
contact: string;
|
|
377
377
|
initialScope: string;
|
|
378
378
|
profile: ProfileInterface;
|
|
@@ -473,6 +473,7 @@ declare interface SaleInterface {
|
|
|
473
473
|
};
|
|
474
474
|
closedAt?: string;
|
|
475
475
|
isDollarNegotiation: boolean;
|
|
476
|
+
type: "new" | "renewal" | "upsell";
|
|
476
477
|
}
|
|
477
478
|
|
|
478
479
|
declare type SalePaymentMethod = "transfer" | "direct" | "debit_note" | "client";
|
package/dist/payment.d.ts
CHANGED
|
@@ -372,7 +372,7 @@ declare interface ProfileMetric {
|
|
|
372
372
|
|
|
373
373
|
declare interface ProposalInterface {
|
|
374
374
|
businessUnit: "enterprise" | "artistic";
|
|
375
|
-
|
|
375
|
+
origin: "inbound" | "outbound";
|
|
376
376
|
contact: string;
|
|
377
377
|
initialScope: string;
|
|
378
378
|
profile: ProfileInterface;
|
|
@@ -473,6 +473,7 @@ declare interface SaleInterface {
|
|
|
473
473
|
};
|
|
474
474
|
closedAt?: string;
|
|
475
475
|
isDollarNegotiation: boolean;
|
|
476
|
+
type: "new" | "renewal" | "upsell";
|
|
476
477
|
}
|
|
477
478
|
|
|
478
479
|
declare type SalePaymentMethod = "transfer" | "direct" | "debit_note" | "client";
|
package/dist/recruitment.d.ts
CHANGED
|
@@ -372,7 +372,7 @@ declare interface ProfileMetric {
|
|
|
372
372
|
|
|
373
373
|
declare interface ProposalInterface {
|
|
374
374
|
businessUnit: "enterprise" | "artistic";
|
|
375
|
-
|
|
375
|
+
origin: "inbound" | "outbound";
|
|
376
376
|
contact: string;
|
|
377
377
|
initialScope: string;
|
|
378
378
|
profile: ProfileInterface;
|
|
@@ -473,6 +473,7 @@ declare interface SaleInterface {
|
|
|
473
473
|
};
|
|
474
474
|
closedAt?: string;
|
|
475
475
|
isDollarNegotiation: boolean;
|
|
476
|
+
type: "new" | "renewal" | "upsell";
|
|
476
477
|
}
|
|
477
478
|
|
|
478
479
|
declare type SalePaymentMethod = "transfer" | "direct" | "debit_note" | "client";
|
package/dist/sale.d.ts
CHANGED
|
@@ -372,7 +372,7 @@ declare interface ProfileMetric {
|
|
|
372
372
|
|
|
373
373
|
export declare interface ProposalInterface {
|
|
374
374
|
businessUnit: "enterprise" | "artistic";
|
|
375
|
-
|
|
375
|
+
origin: "inbound" | "outbound";
|
|
376
376
|
contact: string;
|
|
377
377
|
initialScope: string;
|
|
378
378
|
profile: ProfileInterface;
|
|
@@ -473,6 +473,7 @@ export declare interface SaleInterface {
|
|
|
473
473
|
};
|
|
474
474
|
closedAt?: string;
|
|
475
475
|
isDollarNegotiation: boolean;
|
|
476
|
+
type: "new" | "renewal" | "upsell";
|
|
476
477
|
}
|
|
477
478
|
|
|
478
479
|
export declare type SalePaymentMethod = "transfer" | "direct" | "debit_note" | "client";
|
package/dist/utils.d.ts
CHANGED
|
@@ -1,3 +1,39 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Formata um número em notação compacta usando o locale pt-BR.
|
|
3
|
+
*
|
|
4
|
+
* Converte números grandes para formas abreviadas, como "mil", "mi" e "bi",
|
|
5
|
+
* seguindo o padrão brasileiro de formatação.
|
|
6
|
+
*
|
|
7
|
+
* @param {number} value - O número a ser formatado.
|
|
8
|
+
* @returns {string} O número formatado em notação compacta.
|
|
9
|
+
*
|
|
10
|
+
* @example
|
|
11
|
+
* formatCompactNumber(950); // "950"
|
|
12
|
+
* formatCompactNumber(1200); // "1,2 mil"
|
|
13
|
+
* formatCompactNumber(1500000); // "1,5 mi"
|
|
14
|
+
* formatCompactNumber(2300000000); // "2,3 bi"
|
|
15
|
+
* formatCompactNumber(1234.5678); // "1,235 mil"
|
|
16
|
+
*/
|
|
17
|
+
export declare const formatCompactNumber: (value: number) => string;
|
|
18
|
+
|
|
19
|
+
/**
|
|
20
|
+
* Formata um número como porcentagem em notação compacta usando o locale pt-BR.
|
|
21
|
+
*
|
|
22
|
+
* O valor deve ser informado em formato decimal, onde 1 = 100%.
|
|
23
|
+
* A API automaticamente multiplica por 100 ao usar `style: "percent"`.
|
|
24
|
+
*
|
|
25
|
+
* @param {number} value - O valor decimal a ser formatado como porcentagem.
|
|
26
|
+
* @returns {string} A porcentagem formatada em notação compacta.
|
|
27
|
+
*
|
|
28
|
+
* @example
|
|
29
|
+
* formatCompactPercent(0.25); // "25%"
|
|
30
|
+
* formatCompactPercent(0.1234); // "12,34%"
|
|
31
|
+
* formatCompactPercent(1); // "100%"
|
|
32
|
+
* formatCompactPercent(12); // "1,2 mil%"
|
|
33
|
+
* formatCompactPercent(0.0005); // "0,05%"
|
|
34
|
+
*/
|
|
35
|
+
export declare const formatCompactPercent: (value: number) => string;
|
|
36
|
+
|
|
1
37
|
export declare function formatCurrency(value: number): string;
|
|
2
38
|
|
|
3
39
|
/**
|
package/dist/utils.js
CHANGED
|
@@ -1,29 +1,29 @@
|
|
|
1
|
-
function
|
|
1
|
+
function n(e) {
|
|
2
2
|
return !isNaN(Number(e));
|
|
3
3
|
}
|
|
4
|
-
function
|
|
4
|
+
function a(e) {
|
|
5
5
|
const r = e.replace(/[^0-9]/g, "");
|
|
6
6
|
return Number(r) / 100;
|
|
7
7
|
}
|
|
8
|
-
function
|
|
8
|
+
function u(e) {
|
|
9
9
|
return e.toLocaleString("pt-BR", {
|
|
10
10
|
style: "currency",
|
|
11
11
|
currency: "BRL"
|
|
12
12
|
});
|
|
13
13
|
}
|
|
14
|
-
const
|
|
15
|
-
const r =
|
|
14
|
+
const m = (e) => {
|
|
15
|
+
const r = n(e) ? e : Number(e);
|
|
16
16
|
return `${parseInt(String(r * 100))}%`;
|
|
17
|
-
},
|
|
17
|
+
}, i = (e) => {
|
|
18
18
|
const r = +String(e).replace("%", "");
|
|
19
|
-
if (!
|
|
20
|
-
const
|
|
21
|
-
return +String(
|
|
19
|
+
if (!n(r)) return !1;
|
|
20
|
+
const t = r / 100;
|
|
21
|
+
return +String(t).split(".")[0] >= 1 ? 1 : t;
|
|
22
22
|
};
|
|
23
23
|
function o(e) {
|
|
24
24
|
return e.replace(/\D/g, "").replace(/^(\d{3})(\d{3})(\d{3})(\d{2})$/, "$1.$2.$3-$4");
|
|
25
25
|
}
|
|
26
|
-
function
|
|
26
|
+
function l(e) {
|
|
27
27
|
return e.replace(/\D/g, "").replace(/^(\d{2})(\d{3})(\d{3})(\d{1})$/, "$1.$2.$3-$4");
|
|
28
28
|
}
|
|
29
29
|
function s(e) {
|
|
@@ -32,21 +32,36 @@ function s(e) {
|
|
|
32
32
|
"$1.$2.$3/$4-$5"
|
|
33
33
|
);
|
|
34
34
|
}
|
|
35
|
-
function
|
|
35
|
+
function p(e) {
|
|
36
36
|
return e.replace(/\D/g, "").replace(/^(\d{5})(\d{3})$/, "$1-$2");
|
|
37
37
|
}
|
|
38
|
-
function
|
|
38
|
+
function d(e) {
|
|
39
39
|
return e.replace(/\D/g, "");
|
|
40
40
|
}
|
|
41
|
+
const $ = (e) => new Intl.NumberFormat("pt-BR", {
|
|
42
|
+
style: "decimal",
|
|
43
|
+
notation: "compact",
|
|
44
|
+
compactDisplay: "short",
|
|
45
|
+
minimumFractionDigits: 0,
|
|
46
|
+
maximumFractionDigits: 3
|
|
47
|
+
}).format(e), f = (e) => new Intl.NumberFormat("pt-BR", {
|
|
48
|
+
style: "percent",
|
|
49
|
+
notation: "compact",
|
|
50
|
+
compactDisplay: "short",
|
|
51
|
+
minimumFractionDigits: 0,
|
|
52
|
+
maximumFractionDigits: 2
|
|
53
|
+
}).format(e);
|
|
41
54
|
export {
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
55
|
+
$ as formatCompactNumber,
|
|
56
|
+
f as formatCompactPercent,
|
|
57
|
+
u as formatCurrency,
|
|
58
|
+
m as formatPercentage,
|
|
59
|
+
n as isNumber,
|
|
45
60
|
s as maskCNPJ,
|
|
46
61
|
o as maskCPF,
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
62
|
+
l as maskRG,
|
|
63
|
+
p as maskZipCode,
|
|
64
|
+
a as preFormatCurrency,
|
|
65
|
+
i as preFormatPercentage,
|
|
66
|
+
d as unmask
|
|
52
67
|
};
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@grapadigital/shared-app-modules",
|
|
3
3
|
"private": false,
|
|
4
|
-
"version": "0.0.
|
|
4
|
+
"version": "0.0.87",
|
|
5
5
|
"files": [
|
|
6
6
|
"dist"
|
|
7
7
|
],
|
|
@@ -116,13 +116,6 @@
|
|
|
116
116
|
}
|
|
117
117
|
},
|
|
118
118
|
"type": "module",
|
|
119
|
-
"scripts": {
|
|
120
|
-
"dev": "vite",
|
|
121
|
-
"build": "rm -rf dist && tsc -b && vite build",
|
|
122
|
-
"lint": "eslint .",
|
|
123
|
-
"preview": "vite preview",
|
|
124
|
-
"lib:publish": "pnpm build && pnpm publish --no-git-checks"
|
|
125
|
-
},
|
|
126
119
|
"dependencies": {
|
|
127
120
|
"@radix-ui/react-accordion": "^1.2.12",
|
|
128
121
|
"@radix-ui/react-checkbox": "^1.3.3",
|
|
@@ -172,5 +165,12 @@
|
|
|
172
165
|
"vite": "^7.2.4",
|
|
173
166
|
"vite-plugin-dts": "^4.5.4",
|
|
174
167
|
"vite-plugin-lib-inject-css": "^2.2.2"
|
|
168
|
+
},
|
|
169
|
+
"scripts": {
|
|
170
|
+
"dev": "vite",
|
|
171
|
+
"build": "rm -rf dist && tsc -b && vite build",
|
|
172
|
+
"lint": "eslint .",
|
|
173
|
+
"preview": "vite preview",
|
|
174
|
+
"lib:publish": "pnpm build && pnpm publish --no-git-checks"
|
|
175
175
|
}
|
|
176
|
-
}
|
|
176
|
+
}
|