@grapadigital/shared-app-modules 0.0.162 → 0.0.164
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/chuncks/{format.util.U2ON0RUZ.js → format.util.DmewuK-i.js} +1 -1
- package/dist/chuncks/{youtube-icon.component.B1lyKtkT.js → youtube-icon.component.DScbZg9o.js} +392 -363
- package/dist/components.js +17 -17
- package/dist/constants.d.ts +26 -0
- package/dist/constants.js +11 -9
- package/dist/events.js +1 -1
- package/dist/utils.d.ts +21 -1
- package/dist/utils.js +16 -15
- package/package.json +1 -1
package/dist/components.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { a as b, V as N, c, $ as v, B as S, aI as C, aJ as I, aK as z, ac as
|
|
2
|
-
import {
|
|
1
|
+
import { a as b, V as N, c, $ as v, B as S, aI as C, aJ as I, aK as z, ac as H, ad as T, ah as y, ag as _, ae as j, ai as A } from "./chuncks/switch.BuckOH_X.js";
|
|
2
|
+
import { n as ge, o as xe, s as be, D as me, t as he, u as fe, F as ue, v as pe, w as ye, x as we, y as ke, z as Ne, m as ve, p as Ce, E as Ie, L as ze, g as Fe, h as Me, j as Se, k as He, l as Te, G as _e, q as je, r as Ae, H as Le, X as Pe, Y as $e } from "./chuncks/youtube-icon.component.DScbZg9o.js";
|
|
3
3
|
import { jsx as e, jsxs as o, Fragment as L } from "react/jsx-runtime";
|
|
4
4
|
import "react";
|
|
5
5
|
import { parseISO as w, differenceInCalendarDays as P, format as $ } from "date-fns";
|
|
@@ -25,14 +25,14 @@ const V = [
|
|
|
25
25
|
["path", { d: "M10 9H8", key: "b1mrlr" }],
|
|
26
26
|
["path", { d: "M16 13H8", key: "t4e002" }],
|
|
27
27
|
["path", { d: "M16 17H8", key: "z1uh3a" }]
|
|
28
|
-
],
|
|
29
|
-
const
|
|
28
|
+
], E = b("file-text", V);
|
|
29
|
+
const X = [
|
|
30
30
|
["path", { d: "M3 12a9 9 0 0 1 9-9 9.75 9.75 0 0 1 6.74 2.74L21 8", key: "v9h5vc" }],
|
|
31
31
|
["path", { d: "M21 3v5h-5", key: "1q7to0" }],
|
|
32
32
|
["path", { d: "M21 12a9 9 0 0 1-9 9 9.75 9.75 0 0 1-6.74-2.74L3 16", key: "3uifl3" }],
|
|
33
33
|
["path", { d: "M8 16H3v5", key: "1cv678" }]
|
|
34
|
-
],
|
|
35
|
-
const
|
|
34
|
+
], Y = b("refresh-cw", X);
|
|
35
|
+
const G = [
|
|
36
36
|
[
|
|
37
37
|
"path",
|
|
38
38
|
{
|
|
@@ -42,9 +42,9 @@ const J = [
|
|
|
42
42
|
],
|
|
43
43
|
["path", { d: "M12 9v4", key: "juzpu7" }],
|
|
44
44
|
["path", { d: "M12 17h.01", key: "p32p05" }]
|
|
45
|
-
],
|
|
45
|
+
], J = b("triangle-alert", G);
|
|
46
46
|
function te({
|
|
47
|
-
icon: a =
|
|
47
|
+
icon: a = J,
|
|
48
48
|
title: t,
|
|
49
49
|
description: l,
|
|
50
50
|
onRetry: n,
|
|
@@ -57,7 +57,7 @@ function te({
|
|
|
57
57
|
/* @__PURE__ */ e("h3", { className: "text-foreground mb-2 text-lg font-semibold", children: t }),
|
|
58
58
|
/* @__PURE__ */ e("p", { className: "text-muted-foreground max-w-md text-sm leading-relaxed", children: l }),
|
|
59
59
|
n && /* @__PURE__ */ o(S, { onClick: n, variant: "outline", className: "mt-6", children: [
|
|
60
|
-
/* @__PURE__ */ e(
|
|
60
|
+
/* @__PURE__ */ e(Y, {}),
|
|
61
61
|
"Tentar novamente"
|
|
62
62
|
] }),
|
|
63
63
|
i && /* @__PURE__ */ e("div", { className: "bg-destructive/5 border-destructive/20 mt-6 rounded-lg border border-dashed px-4 py-2", children: /* @__PURE__ */ e("p", { className: "text-muted-foreground text-xs", children: i }) })
|
|
@@ -79,7 +79,7 @@ function ae({
|
|
|
79
79
|
/* @__PURE__ */ e(z, { align: t, className: n, children: a })
|
|
80
80
|
] }) });
|
|
81
81
|
}
|
|
82
|
-
const
|
|
82
|
+
const K = {
|
|
83
83
|
red: { bg: "bg-red-50", text: "text-red-600" },
|
|
84
84
|
orange: { bg: "bg-orange-50", text: "text-orange-600" },
|
|
85
85
|
amber: { bg: "bg-amber-50", text: "text-amber-600" },
|
|
@@ -102,7 +102,7 @@ const O = {
|
|
|
102
102
|
zinc: { bg: "bg-zinc-200", text: "text-zinc-800" },
|
|
103
103
|
neutral: { bg: "bg-neutral-200", text: "text-neutral-800" },
|
|
104
104
|
stone: { bg: "bg-stone-200", text: "text-stone-800" }
|
|
105
|
-
},
|
|
105
|
+
}, O = {
|
|
106
106
|
red: { bg: "bg-red-500", text: "text-white" },
|
|
107
107
|
orange: { bg: "bg-orange-500", text: "text-white" },
|
|
108
108
|
amber: { bg: "bg-amber-500", text: "text-white" },
|
|
@@ -140,7 +140,7 @@ function re({
|
|
|
140
140
|
icon: n,
|
|
141
141
|
filled: i
|
|
142
142
|
}) {
|
|
143
|
-
const r = i ?
|
|
143
|
+
const r = i ? O[t] : K[t], s = a ? k[a] : k.md;
|
|
144
144
|
return /* @__PURE__ */ e("div", { className: c("w-fit p-2 rounded-lg", r?.bg, l), children: /* @__PURE__ */ e(n, { className: c(s, r?.text) }) });
|
|
145
145
|
}
|
|
146
146
|
function le({ className: a, ...t }) {
|
|
@@ -210,7 +210,7 @@ function ne({
|
|
|
210
210
|
] }) });
|
|
211
211
|
}
|
|
212
212
|
function ie({
|
|
213
|
-
icon: a =
|
|
213
|
+
icon: a = E,
|
|
214
214
|
title: t,
|
|
215
215
|
description: l,
|
|
216
216
|
tip: n,
|
|
@@ -236,8 +236,8 @@ function se({
|
|
|
236
236
|
hasActions: l = !1,
|
|
237
237
|
actionsCount: n = 1
|
|
238
238
|
}) {
|
|
239
|
-
return /* @__PURE__ */ o(
|
|
240
|
-
/* @__PURE__ */ e(
|
|
239
|
+
return /* @__PURE__ */ o(H, { children: [
|
|
240
|
+
/* @__PURE__ */ e(T, { children: /* @__PURE__ */ e(y, { children: Array.from({ length: a }).map((i, r) => {
|
|
241
241
|
const s = l && r === a - 1;
|
|
242
242
|
return /* @__PURE__ */ e(
|
|
243
243
|
_,
|
|
@@ -308,8 +308,8 @@ export {
|
|
|
308
308
|
Fe as PageHeader,
|
|
309
309
|
Me as PageHeaderActions,
|
|
310
310
|
Se as PageHeaderContent,
|
|
311
|
-
|
|
312
|
-
|
|
311
|
+
He as PageHeaderDescription,
|
|
312
|
+
Te as PageHeaderTitle,
|
|
313
313
|
_e as PinterestIcon,
|
|
314
314
|
je as ProfileSelectInput,
|
|
315
315
|
Ae as SaleSelectInput,
|
package/dist/constants.d.ts
CHANGED
|
@@ -43,6 +43,23 @@ export declare const NO_DATA_TO_UPDATE = "N\u00E3o h\u00E1 dados para atualizar.
|
|
|
43
43
|
*/
|
|
44
44
|
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.";
|
|
45
45
|
|
|
46
|
+
export declare const PAYMENT_TYPE_VALUES: {
|
|
47
|
+
readonly influencer: "Veículação de Influenciador";
|
|
48
|
+
readonly advisor: "Pagamento de Assessor";
|
|
49
|
+
readonly supplier: "Pagamento de Fornecedor";
|
|
50
|
+
readonly employee_refund: "Reembolso de Colaborador";
|
|
51
|
+
readonly influencer_refund: "Reembolso de Influenciador";
|
|
52
|
+
readonly influencer_extra: "Extra de Influenciador";
|
|
53
|
+
readonly partlog: "Kit pela Partlog";
|
|
54
|
+
readonly airplane_ticket: "Passagem Aérea para Influenciador";
|
|
55
|
+
readonly hotel_ticket: "Hospedagem para Influenciador";
|
|
56
|
+
readonly rumo_certo: "Rumo Certo";
|
|
57
|
+
readonly correios: "Correios";
|
|
58
|
+
readonly conta_simples: "Conta Simples";
|
|
59
|
+
readonly motoboy_bruno: "Motoboy Bruno";
|
|
60
|
+
readonly motoboy_others: "Motoboy Outros";
|
|
61
|
+
};
|
|
62
|
+
|
|
46
63
|
declare function PinterestIcon({ size, color, ...props }: LucideProps): JSX.Element;
|
|
47
64
|
|
|
48
65
|
/**
|
|
@@ -80,6 +97,15 @@ export declare const SOCIAL_NETWORK_VALUES: {
|
|
|
80
97
|
|
|
81
98
|
declare function TikTokIcon({ size, color, ...props }: LucideProps): JSX.Element;
|
|
82
99
|
|
|
100
|
+
export declare const TYPE_SALE_VALUES: {
|
|
101
|
+
readonly new: "Aquisição";
|
|
102
|
+
readonly organic_expansion: "Expansão Orgânica de Base";
|
|
103
|
+
readonly strategic_expansion: "Expansão Estratégica de Base";
|
|
104
|
+
readonly renewal: "Renovação";
|
|
105
|
+
readonly comercial_winback: "Reativação Comercial";
|
|
106
|
+
readonly organic_winback: "Reativação Orgânica";
|
|
107
|
+
};
|
|
108
|
+
|
|
83
109
|
/**
|
|
84
110
|
* Mensagem para quando ocorrer um erro na validação dos dados enviados ao servidor.
|
|
85
111
|
* @returns {string} A mensagem.
|
package/dist/constants.js
CHANGED
|
@@ -1,16 +1,18 @@
|
|
|
1
|
-
import { A as s, B as
|
|
2
|
-
const o = "Não há dados para atualizar.", a = "O filtro selecionado já está ativo. Por favor, escolha outro filtro antes de tentar novamente.",
|
|
1
|
+
import { A as s, B as n, C as S, P as T, a as O, b as L, S as N, T as c } from "./chuncks/youtube-icon.component.DScbZg9o.js";
|
|
2
|
+
const o = "Não há dados para atualizar.", a = "O filtro selecionado já está ativo. Por favor, escolha outro filtro antes de tentar novamente.", E = "Nenhum dado novo foi informado para realizar a operação. Por favor, atualize os campos antes de tentar novamente.", e = "Não foi possível concluir a operação. Tente novamente mais tarde ou entre em contato com o suporte.", t = "Há um erro na validação dos campos. Por favor, entre em contato com o suporte.", _ = "Campo obrigatório.";
|
|
3
3
|
export {
|
|
4
4
|
s as ACTION_TYPE_VALUES,
|
|
5
|
-
|
|
5
|
+
n as BUSINESS_UNIT_VALUES,
|
|
6
6
|
S as CLIENT_TYPE_VALUES,
|
|
7
|
-
|
|
7
|
+
e as ERROR_MESSAGE,
|
|
8
8
|
a as FILTER_ALREADY_APPLIED_MESSAGE,
|
|
9
9
|
o as NO_DATA_TO_UPDATE,
|
|
10
|
-
|
|
11
|
-
|
|
10
|
+
E as NO_DATA_TO_UPDATE_MESSAGE,
|
|
11
|
+
T as PAYMENT_TYPE_VALUES,
|
|
12
|
+
_ as REQUIRED_FIELD_MESSAGE,
|
|
12
13
|
O as SOCIAL_NETWORK_COLOR_VALUES,
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
14
|
+
L as SOCIAL_NETWORK_ICON_COMPONENTS,
|
|
15
|
+
N as SOCIAL_NETWORK_VALUES,
|
|
16
|
+
c as TYPE_SALE_VALUES,
|
|
17
|
+
t as VALIDATION_ERROR_MESSAGE
|
|
16
18
|
};
|
package/dist/events.js
CHANGED
package/dist/utils.d.ts
CHANGED
|
@@ -87,7 +87,8 @@ declare namespace IS_MODULES {
|
|
|
87
87
|
isNumber,
|
|
88
88
|
isSocialNetwork,
|
|
89
89
|
isClientType,
|
|
90
|
-
isBusinessUnit
|
|
90
|
+
isBusinessUnit,
|
|
91
|
+
isPaymentType
|
|
91
92
|
}
|
|
92
93
|
}
|
|
93
94
|
|
|
@@ -111,6 +112,8 @@ export declare function isClientType(value?: string): value is keyof typeof CLIE
|
|
|
111
112
|
*/
|
|
112
113
|
export declare function isNumber(value: string | number): value is number;
|
|
113
114
|
|
|
115
|
+
export declare function isPaymentType(value?: string): value is keyof typeof PAYMENT_TYPE_VALUES;
|
|
116
|
+
|
|
114
117
|
export declare function isSocialNetwork(value?: string): value is keyof typeof SOCIAL_NETWORK_VALUES;
|
|
115
118
|
|
|
116
119
|
/**
|
|
@@ -209,6 +212,23 @@ export declare const minLengthMessage: (min: number, field?: string) => string;
|
|
|
209
212
|
*/
|
|
210
213
|
export declare const minValueMessage: (min: number, field?: string) => string;
|
|
211
214
|
|
|
215
|
+
declare const PAYMENT_TYPE_VALUES: {
|
|
216
|
+
readonly influencer: "Veículação de Influenciador";
|
|
217
|
+
readonly advisor: "Pagamento de Assessor";
|
|
218
|
+
readonly supplier: "Pagamento de Fornecedor";
|
|
219
|
+
readonly employee_refund: "Reembolso de Colaborador";
|
|
220
|
+
readonly influencer_refund: "Reembolso de Influenciador";
|
|
221
|
+
readonly influencer_extra: "Extra de Influenciador";
|
|
222
|
+
readonly partlog: "Kit pela Partlog";
|
|
223
|
+
readonly airplane_ticket: "Passagem Aérea para Influenciador";
|
|
224
|
+
readonly hotel_ticket: "Hospedagem para Influenciador";
|
|
225
|
+
readonly rumo_certo: "Rumo Certo";
|
|
226
|
+
readonly correios: "Correios";
|
|
227
|
+
readonly conta_simples: "Conta Simples";
|
|
228
|
+
readonly motoboy_bruno: "Motoboy Bruno";
|
|
229
|
+
readonly motoboy_others: "Motoboy Outros";
|
|
230
|
+
};
|
|
231
|
+
|
|
212
232
|
export declare function preFormatCurrency(value: string): number;
|
|
213
233
|
|
|
214
234
|
/**
|
package/dist/utils.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { U as o } from "./chuncks/format.util.
|
|
2
|
-
import { g as C, h as E, f as L, a as _, d as b, m as v, c as l, e as
|
|
3
|
-
import { I as a } from "./chuncks/youtube-icon.component.
|
|
4
|
-
import { e as
|
|
1
|
+
import { U as o } from "./chuncks/format.util.DmewuK-i.js";
|
|
2
|
+
import { g as C, h as E, f as L, a as _, d as b, m as v, c as l, e as y, p as D, b as I, u as P } from "./chuncks/format.util.DmewuK-i.js";
|
|
3
|
+
import { I as a } from "./chuncks/youtube-icon.component.DScbZg9o.js";
|
|
4
|
+
import { e as k, d as N, i as q, f as x, c as F } from "./chuncks/youtube-icon.component.DScbZg9o.js";
|
|
5
5
|
const s = (e) => e ? `${e} é obrigatório.` : "Campo obrigatório.", t = (e, r) => r ? `${r} deve ter no mínimo ${e} caracteres.` : `Deve ter no mínimo ${e} caracteres.`, n = (e, r) => r ? `${r} deve ter no máximo ${e} caracteres.` : `Deve ter no máximo ${e} caracteres.`, m = (e, r) => r ? `${r} não pode ser menor que ${e}.` : `Não pode ser menor que ${e}.`, i = (e, r) => r ? `${r} não pode ser maior que ${e}.` : `Não pode ser maior que ${e}.`, c = (e) => e ? `${e} inválido.` : "Valor inválido.", u = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
6
6
|
__proto__: null,
|
|
7
7
|
invalidMessage: c,
|
|
@@ -10,30 +10,31 @@ const s = (e) => e ? `${e} é obrigatório.` : "Campo obrigatório.", t = (e, r)
|
|
|
10
10
|
minLengthMessage: t,
|
|
11
11
|
minValueMessage: m,
|
|
12
12
|
requiredMessage: s
|
|
13
|
-
}, Symbol.toStringTag, { value: "Module" })), $ = o,
|
|
13
|
+
}, Symbol.toStringTag, { value: "Module" })), $ = o, f = a, M = u;
|
|
14
14
|
export {
|
|
15
|
-
|
|
16
|
-
|
|
15
|
+
M as FIELD_MESSAGE,
|
|
16
|
+
f as IS,
|
|
17
17
|
$ as UTIL,
|
|
18
18
|
C as formatCompactNumber,
|
|
19
19
|
E as formatCompactPercent,
|
|
20
20
|
L as formatCurrency,
|
|
21
21
|
_ as formatPercentage,
|
|
22
22
|
c as invalidMessage,
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
23
|
+
k as isBusinessUnit,
|
|
24
|
+
N as isClientType,
|
|
25
|
+
q as isNumber,
|
|
26
|
+
x as isPaymentType,
|
|
27
|
+
F as isSocialNetwork,
|
|
27
28
|
b as maskCNPJ,
|
|
28
29
|
v as maskCPF,
|
|
29
30
|
l as maskRG,
|
|
30
|
-
|
|
31
|
+
y as maskZipCode,
|
|
31
32
|
n as maxLengthMessage,
|
|
32
33
|
i as maxValueMessage,
|
|
33
34
|
t as minLengthMessage,
|
|
34
35
|
m as minValueMessage,
|
|
35
|
-
|
|
36
|
-
|
|
36
|
+
D as preFormatCurrency,
|
|
37
|
+
I as preFormatPercentage,
|
|
37
38
|
s as requiredMessage,
|
|
38
|
-
|
|
39
|
+
P as unmask
|
|
39
40
|
};
|