@grapadigital/shared-app-modules 0.0.163 → 0.0.165

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,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 T, ad as H, ah as y, ag as _, ae as j, ai as A } from "./chuncks/switch.BuckOH_X.js";
2
- import { l as ge, m as xe, q as be, y as me, r as he, s as fe, F as ue, t as pe, u as ye, v as we, w as ke, x as Ne, k as ve, n as Ce, z as Ie, L as ze, P as Fe, f as Me, g as Se, h as Te, j as He, D as _e, o as je, p as Ae, E as Le, X as Pe, Y as $e } from "./chuncks/youtube-icon.component.CcHIZWSJ.js";
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 { p as ge, q as xe, u as be, G as me, v as he, w as fe, F as ue, x as pe, y as ye, z as we, D as ke, E as Ne, o as ve, r as Ce, H as Ie, L as ze, j as Fe, k as Me, l as Se, m as He, n as Te, J as _e, s as je, t as Ae, K as Le, X as Pe, Y as $e } from "./chuncks/youtube-icon.component.CHZjR-2u.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";
@@ -26,13 +26,13 @@ const V = [
26
26
  ["path", { d: "M16 13H8", key: "t4e002" }],
27
27
  ["path", { d: "M16 17H8", key: "z1uh3a" }]
28
28
  ], E = b("file-text", V);
29
- const X = [
29
+ const J = [
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
- ], Y = b("refresh-cw", X);
35
- const J = [
34
+ ], K = b("refresh-cw", J);
35
+ const X = [
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
- ], K = b("triangle-alert", J);
45
+ ], Y = b("triangle-alert", X);
46
46
  function te({
47
- icon: a = K,
47
+ icon: a = Y,
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(Y, {}),
60
+ /* @__PURE__ */ e(K, {}),
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 O = {
82
+ const G = {
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
- }, W = {
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 ? W[t] : O[t], s = a ? k[a] : k.md;
143
+ const r = i ? O[t] : G[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 }) {
@@ -236,8 +236,8 @@ function se({
236
236
  hasActions: l = !1,
237
237
  actionsCount: n = 1
238
238
  }) {
239
- return /* @__PURE__ */ o(T, { children: [
240
- /* @__PURE__ */ e(H, { children: /* @__PURE__ */ e(y, { children: Array.from({ length: a }).map((i, r) => {
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
- Te as PageHeaderDescription,
312
- He as PageHeaderTitle,
311
+ He as PageHeaderDescription,
312
+ Te as PageHeaderTitle,
313
313
  _e as PinterestIcon,
314
314
  je as ProfileSelectInput,
315
315
  Ae as SaleSelectInput,
@@ -28,6 +28,14 @@ export declare const ERROR_MESSAGE = "N\u00E3o foi poss\u00EDvel concluir a oper
28
28
  */
29
29
  export declare const FILTER_ALREADY_APPLIED_MESSAGE = "O filtro selecionado j\u00E1 est\u00E1 ativo. Por favor, escolha outro filtro antes de tentar novamente.";
30
30
 
31
+ export declare const INFLUENCER_BROADCAST_METHOD_VALUES: {
32
+ transfer: string;
33
+ client: string;
34
+ direct: string;
35
+ debit_note: string;
36
+ undefined: string;
37
+ };
38
+
31
39
  declare function InstagramIcon({ size, color, ...props }: LucideProps): JSX.Element;
32
40
 
33
41
  declare function LinkedInIcon({ size, color, ...props }: LucideProps): JSX.Element;
@@ -43,6 +51,23 @@ export declare const NO_DATA_TO_UPDATE = "N\u00E3o h\u00E1 dados para atualizar.
43
51
  */
44
52
  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
53
 
54
+ export declare const PAYMENT_TYPE_VALUES: {
55
+ readonly influencer: "Veículação de Influenciador";
56
+ readonly advisor: "Pagamento de Assessor";
57
+ readonly supplier: "Pagamento de Fornecedor";
58
+ readonly employee_refund: "Reembolso de Colaborador";
59
+ readonly influencer_refund: "Reembolso de Influenciador";
60
+ readonly influencer_extra: "Extra de Influenciador";
61
+ readonly partlog: "Kit pela Partlog";
62
+ readonly airplane_ticket: "Passagem Aérea para Influenciador";
63
+ readonly hotel_ticket: "Hospedagem para Influenciador";
64
+ readonly rumo_certo: "Rumo Certo";
65
+ readonly correios: "Correios";
66
+ readonly conta_simples: "Conta Simples";
67
+ readonly motoboy_bruno: "Motoboy Bruno";
68
+ readonly motoboy_others: "Motoboy Outros";
69
+ };
70
+
46
71
  declare function PinterestIcon({ size, color, ...props }: LucideProps): JSX.Element;
47
72
 
48
73
  /**
package/dist/constants.js CHANGED
@@ -1,17 +1,19 @@
1
- import { A, B as n, C as S, a as O, b as T, S as L, T as c } from "./chuncks/youtube-icon.component.CcHIZWSJ.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.", r = "Campo obrigatório.";
1
+ import { A as s, B as S, C as n, I as T, P as O, a as L, b as N, S as c, T as I } from "./chuncks/youtube-icon.component.CHZjR-2u.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.", _ = "Há um erro na validação dos campos. Por favor, entre em contato com o suporte.", t = "Campo obrigatório.";
3
3
  export {
4
- A as ACTION_TYPE_VALUES,
5
- n as BUSINESS_UNIT_VALUES,
6
- S as CLIENT_TYPE_VALUES,
7
- E as ERROR_MESSAGE,
4
+ s as ACTION_TYPE_VALUES,
5
+ S as BUSINESS_UNIT_VALUES,
6
+ n as CLIENT_TYPE_VALUES,
7
+ e as ERROR_MESSAGE,
8
8
  a as FILTER_ALREADY_APPLIED_MESSAGE,
9
+ T as INFLUENCER_BROADCAST_METHOD_VALUES,
9
10
  o as NO_DATA_TO_UPDATE,
10
- e as NO_DATA_TO_UPDATE_MESSAGE,
11
- r as REQUIRED_FIELD_MESSAGE,
12
- O as SOCIAL_NETWORK_COLOR_VALUES,
13
- T as SOCIAL_NETWORK_ICON_COMPONENTS,
14
- L as SOCIAL_NETWORK_VALUES,
15
- c as TYPE_SALE_VALUES,
16
- t as VALIDATION_ERROR_MESSAGE
11
+ E as NO_DATA_TO_UPDATE_MESSAGE,
12
+ O as PAYMENT_TYPE_VALUES,
13
+ t as REQUIRED_FIELD_MESSAGE,
14
+ L as SOCIAL_NETWORK_COLOR_VALUES,
15
+ N as SOCIAL_NETWORK_ICON_COMPONENTS,
16
+ c as SOCIAL_NETWORK_VALUES,
17
+ I as TYPE_SALE_VALUES,
18
+ _ as VALIDATION_ERROR_MESSAGE
17
19
  };
package/dist/events.js CHANGED
@@ -1,4 +1,4 @@
1
- import { b as o } from "./chuncks/format.util.Dq6q7JWv.js";
1
+ import { b as o } from "./chuncks/format.util.Bgy0yStH.js";
2
2
  const i = (t, a) => {
3
3
  const e = t.target.value, n = o(e);
4
4
  n !== !1 && a(n);
package/dist/utils.d.ts CHANGED
@@ -68,6 +68,14 @@ export declare function formatCurrency(value: number): string;
68
68
  */
69
69
  export declare const formatPercentage: (value: string | number) => string;
70
70
 
71
+ declare const INFLUENCER_BROADCAST_METHOD_VALUES: {
72
+ transfer: string;
73
+ client: string;
74
+ direct: string;
75
+ debit_note: string;
76
+ undefined: string;
77
+ };
78
+
71
79
  /**
72
80
  * Gera uma mensagem de erro genérica para campos inválidos.
73
81
  *
@@ -87,7 +95,9 @@ declare namespace IS_MODULES {
87
95
  isNumber,
88
96
  isSocialNetwork,
89
97
  isClientType,
90
- isBusinessUnit
98
+ isBusinessUnit,
99
+ isPaymentType,
100
+ isInfluencerBroadcastMethod
91
101
  }
92
102
  }
93
103
 
@@ -95,6 +105,8 @@ export declare function isBusinessUnit(value?: string): value is keyof typeof BU
95
105
 
96
106
  export declare function isClientType(value?: string): value is keyof typeof CLIENT_TYPE_VALUES;
97
107
 
108
+ export declare function isInfluencerBroadcastMethod(value?: string): value is keyof typeof INFLUENCER_BROADCAST_METHOD_VALUES;
109
+
98
110
  /**
99
111
  * Verifica se o valor fornecido é um número ou uma string que pode ser convertida para número.
100
112
  *
@@ -111,6 +123,8 @@ export declare function isClientType(value?: string): value is keyof typeof CLIE
111
123
  */
112
124
  export declare function isNumber(value: string | number): value is number;
113
125
 
126
+ export declare function isPaymentType(value?: string): value is keyof typeof PAYMENT_TYPE_VALUES;
127
+
114
128
  export declare function isSocialNetwork(value?: string): value is keyof typeof SOCIAL_NETWORK_VALUES;
115
129
 
116
130
  /**
@@ -209,6 +223,23 @@ export declare const minLengthMessage: (min: number, field?: string) => string;
209
223
  */
210
224
  export declare const minValueMessage: (min: number, field?: string) => string;
211
225
 
226
+ declare const PAYMENT_TYPE_VALUES: {
227
+ readonly influencer: "Veículação de Influenciador";
228
+ readonly advisor: "Pagamento de Assessor";
229
+ readonly supplier: "Pagamento de Fornecedor";
230
+ readonly employee_refund: "Reembolso de Colaborador";
231
+ readonly influencer_refund: "Reembolso de Influenciador";
232
+ readonly influencer_extra: "Extra de Influenciador";
233
+ readonly partlog: "Kit pela Partlog";
234
+ readonly airplane_ticket: "Passagem Aérea para Influenciador";
235
+ readonly hotel_ticket: "Hospedagem para Influenciador";
236
+ readonly rumo_certo: "Rumo Certo";
237
+ readonly correios: "Correios";
238
+ readonly conta_simples: "Conta Simples";
239
+ readonly motoboy_bruno: "Motoboy Bruno";
240
+ readonly motoboy_others: "Motoboy Outros";
241
+ };
242
+
212
243
  export declare function preFormatCurrency(value: string): number;
213
244
 
214
245
  /**
package/dist/utils.js CHANGED
@@ -1,7 +1,7 @@
1
- import { U as o } from "./chuncks/format.util.Dq6q7JWv.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 D, p as I, b as U, u as k } from "./chuncks/format.util.Dq6q7JWv.js";
3
- import { I as a } from "./chuncks/youtube-icon.component.CcHIZWSJ.js";
4
- import { e as P, d as q, i as x, c as y } from "./chuncks/youtube-icon.component.CcHIZWSJ.js";
1
+ import { U as o } from "./chuncks/format.util.Bgy0yStH.js";
2
+ import { g as C, h as E, f as L, a as _, d as b, m as l, c as v, e as y, p as D, b as I, u as P } from "./chuncks/format.util.Bgy0yStH.js";
3
+ import { c as a } from "./chuncks/youtube-icon.component.CHZjR-2u.js";
4
+ import { f as k, e as N, h, i as q, g as x, d as F } from "./chuncks/youtube-icon.component.CHZjR-2u.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,32 @@ 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, M = a, S = u;
13
+ }, Symbol.toStringTag, { value: "Module" })), $ = o, f = a, M = u;
14
14
  export {
15
- S as FIELD_MESSAGE,
16
- M as IS,
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
- P as isBusinessUnit,
24
- q as isClientType,
25
- x as isNumber,
26
- y as isSocialNetwork,
23
+ k as isBusinessUnit,
24
+ N as isClientType,
25
+ h as isInfluencerBroadcastMethod,
26
+ q as isNumber,
27
+ x as isPaymentType,
28
+ F as isSocialNetwork,
27
29
  b as maskCNPJ,
28
- v as maskCPF,
29
- l as maskRG,
30
- D as maskZipCode,
30
+ l as maskCPF,
31
+ v as maskRG,
32
+ y as maskZipCode,
31
33
  n as maxLengthMessage,
32
34
  i as maxValueMessage,
33
35
  t as minLengthMessage,
34
36
  m as minValueMessage,
35
- I as preFormatCurrency,
36
- U as preFormatPercentage,
37
+ D as preFormatCurrency,
38
+ I as preFormatPercentage,
37
39
  s as requiredMessage,
38
- k as unmask
40
+ P as unmask
39
41
  };
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.163",
4
+ "version": "0.0.165",
5
5
  "files": [
6
6
  "dist"
7
7
  ],