@grapadigital/shared-app-modules 0.0.88 → 0.0.90

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.
@@ -0,0 +1,85 @@
1
+ import { B as a, C as c, a as i } from "./values.constant.DO4JqXro.js";
2
+ import "./timeline.DfIC0519.js";
3
+ import "./_influencer-select-input.component.CM5Sso6X.js";
4
+ import "react/jsx-runtime";
5
+ import "react";
6
+ import "date-fns";
7
+ function n(r) {
8
+ return !isNaN(Number(r));
9
+ }
10
+ function d(r) {
11
+ return typeof r != "string" || !r ? !1 : r in i;
12
+ }
13
+ function g(r) {
14
+ return typeof r != "string" || !r ? !1 : r in c;
15
+ }
16
+ function $(r) {
17
+ return typeof r != "string" || !r ? !1 : r in a;
18
+ }
19
+ function V(r) {
20
+ const t = r.replace(/[^0-9]/g, "");
21
+ return Number(t) / 100;
22
+ }
23
+ function N(r) {
24
+ return r.toLocaleString("pt-BR", {
25
+ style: "currency",
26
+ currency: "BRL"
27
+ });
28
+ }
29
+ const y = (r) => {
30
+ const t = n(r) ? r : Number(r);
31
+ return `${parseInt(String(t * 100))}%`;
32
+ }, D = (r) => {
33
+ const t = +String(r).replace("%", "");
34
+ if (!n(t)) return !1;
35
+ const e = t / 100;
36
+ return +String(e).split(".")[0] >= 1 ? 1 : e;
37
+ };
38
+ function S(r) {
39
+ return r.replace(/\D/g, "").replace(/^(\d{3})(\d{3})(\d{3})(\d{2})$/, "$1.$2.$3-$4");
40
+ }
41
+ function C(r) {
42
+ return r.replace(/\D/g, "").replace(/^(\d{2})(\d{3})(\d{3})(\d{1})$/, "$1.$2.$3-$4");
43
+ }
44
+ function b(r) {
45
+ return r.replace(/\D/g, "").replace(
46
+ /^(\d{2})(\d{3})(\d{3})(\d{4})(\d{2})$/,
47
+ "$1.$2.$3/$4-$5"
48
+ );
49
+ }
50
+ function F(r) {
51
+ return r.replace(/\D/g, "").replace(/^(\d{5})(\d{3})$/, "$1-$2");
52
+ }
53
+ function P(r) {
54
+ return r.replace(/\D/g, "");
55
+ }
56
+ const k = (r) => new Intl.NumberFormat("pt-BR", {
57
+ style: "decimal",
58
+ notation: "compact",
59
+ compactDisplay: "short",
60
+ minimumFractionDigits: 0,
61
+ maximumFractionDigits: 3
62
+ }).format(r), B = (r) => new Intl.NumberFormat("pt-BR", {
63
+ style: "percent",
64
+ notation: "compact",
65
+ compactDisplay: "short",
66
+ minimumFractionDigits: 0,
67
+ maximumFractionDigits: 2
68
+ }).format(r);
69
+ export {
70
+ B as a,
71
+ N as b,
72
+ y as c,
73
+ S as d,
74
+ C as e,
75
+ k as f,
76
+ F as g,
77
+ D as h,
78
+ $ as i,
79
+ g as j,
80
+ n as k,
81
+ d as l,
82
+ b as m,
83
+ V as p,
84
+ P as u
85
+ };
@@ -0,0 +1,25 @@
1
+ const t = {
2
+ instagram: "Instagram",
3
+ tiktok: "TikTok",
4
+ youtube: "YouTube",
5
+ linkedin: "LinkedIn",
6
+ pinterest: "Pinterest"
7
+ }, a = {
8
+ agency: "Agência",
9
+ brand: "Marca"
10
+ }, i = {
11
+ enterprise: "Empresa",
12
+ artistic: "Artística"
13
+ }, e = {
14
+ instagram: "bg-gradient-to-br from-[#f09433] via-[#e6683c] via-[#dc2743] via-[#cc2366] to-[#bc1888]",
15
+ tiktok: "bg-black",
16
+ youtube: "bg-[#ff0033]",
17
+ linkedin: "bg-[#0a66c2]",
18
+ pinterest: "bg-[#e60023]"
19
+ };
20
+ export {
21
+ i as B,
22
+ a as C,
23
+ e as S,
24
+ t as a
25
+ };
@@ -0,0 +1,145 @@
1
+ import { jsxs as r, jsx as n } from "react/jsx-runtime";
2
+ function a({
3
+ size: t = 24,
4
+ color: o = "currentColor",
5
+ ...e
6
+ }) {
7
+ return /* @__PURE__ */ r(
8
+ "svg",
9
+ {
10
+ xmlns: "http://www.w3.org/2000/svg",
11
+ width: t,
12
+ height: t,
13
+ viewBox: "0 0 24 24",
14
+ fill: "none",
15
+ stroke: o,
16
+ strokeWidth: "2",
17
+ strokeLinecap: "round",
18
+ strokeLinejoin: "round",
19
+ className: "lucide lucide-instagram-icon lucide-instagram",
20
+ ...e,
21
+ children: [
22
+ /* @__PURE__ */ n("rect", { width: "20", height: "20", x: "2", y: "2", rx: "5", ry: "5" }),
23
+ /* @__PURE__ */ n("path", { d: "M16 11.37A4 4 0 1 1 12.63 8 4 4 0 0 1 16 11.37z" }),
24
+ /* @__PURE__ */ n("line", { x1: "17.5", x2: "17.51", y1: "6.5", y2: "6.5" })
25
+ ]
26
+ }
27
+ );
28
+ }
29
+ function s({
30
+ size: t = 24,
31
+ color: o = "currentColor",
32
+ ...e
33
+ }) {
34
+ return /* @__PURE__ */ r(
35
+ "svg",
36
+ {
37
+ xmlns: "http://www.w3.org/2000/svg",
38
+ width: t,
39
+ height: t,
40
+ viewBox: "0 0 24 24",
41
+ fill: "none",
42
+ stroke: o,
43
+ strokeWidth: "2",
44
+ strokeLinecap: "round",
45
+ strokeLinejoin: "round",
46
+ className: "icon icon-tabler icons-tabler-outline icon-tabler-brand-linkedin",
47
+ ...e,
48
+ children: [
49
+ /* @__PURE__ */ n("path", { stroke: "none", d: "M0 0h24v24H0z", fill: "none" }),
50
+ /* @__PURE__ */ n("path", { d: "M8 11v5" }),
51
+ /* @__PURE__ */ n("path", { d: "M8 8v.01" }),
52
+ /* @__PURE__ */ n("path", { d: "M12 16v-5" }),
53
+ /* @__PURE__ */ n("path", { d: "M16 16v-3a2 2 0 1 0 -4 0" }),
54
+ /* @__PURE__ */ n("path", { d: "M3 7a4 4 0 0 1 4 -4h10a4 4 0 0 1 4 4v10a4 4 0 0 1 -4 4h-10a4 4 0 0 1 -4 -4l0 -10" })
55
+ ]
56
+ }
57
+ );
58
+ }
59
+ function l({
60
+ size: t = 24,
61
+ color: o = "currentColor",
62
+ ...e
63
+ }) {
64
+ return /* @__PURE__ */ r(
65
+ "svg",
66
+ {
67
+ xmlns: "http://www.w3.org/2000/svg",
68
+ width: t,
69
+ height: t,
70
+ viewBox: "0 0 24 24",
71
+ fill: "none",
72
+ stroke: o,
73
+ strokeWidth: "2",
74
+ strokeLinecap: "round",
75
+ strokeLinejoin: "round",
76
+ className: "icon icon-tabler icons-tabler-outline icon-tabler-brand-pinterest",
77
+ ...e,
78
+ children: [
79
+ /* @__PURE__ */ n("path", { stroke: "none", d: "M0 0h24v24H0z", fill: "none" }),
80
+ /* @__PURE__ */ n("path", { d: "M8 20l4 -9" }),
81
+ /* @__PURE__ */ n("path", { d: "M10.7 14c.437 1.263 1.43 2 2.55 2c2.071 0 3.75 -1.554 3.75 -4a5 5 0 1 0 -9.7 1.7" }),
82
+ /* @__PURE__ */ n("path", { d: "M3 12a9 9 0 1 0 18 0a9 9 0 1 0 -18 0" })
83
+ ]
84
+ }
85
+ );
86
+ }
87
+ function h({
88
+ size: t = 24,
89
+ color: o = "transparent",
90
+ ...e
91
+ }) {
92
+ return /* @__PURE__ */ r(
93
+ "svg",
94
+ {
95
+ xmlns: "http://www.w3.org/2000/svg",
96
+ width: t,
97
+ height: t,
98
+ viewBox: "0 0 24 24",
99
+ fill: o,
100
+ stroke: "currentColor",
101
+ strokeWidth: "2",
102
+ strokeLinecap: "round",
103
+ strokeLinejoin: "round",
104
+ className: "icon icon-tabler icons-tabler-outline icon-tabler-brand-tiktok",
105
+ ...e,
106
+ children: [
107
+ /* @__PURE__ */ n("path", { stroke: "none", d: "M0 0h24v24H0z", fill: "none" }),
108
+ /* @__PURE__ */ n("path", { d: "M21 7.917v4.034a9.948 9.948 0 0 1 -5 -1.951v4.5a6.5 6.5 0 1 1 -8 -6.326v4.326a2.5 2.5 0 1 0 4 2v-11.5h4.083a6.005 6.005 0 0 0 4.917 4.917" })
109
+ ]
110
+ }
111
+ );
112
+ }
113
+ function c({
114
+ size: t = 24,
115
+ color: o = "currentColor",
116
+ ...e
117
+ }) {
118
+ return /* @__PURE__ */ r(
119
+ "svg",
120
+ {
121
+ xmlns: "http://www.w3.org/2000/svg",
122
+ width: t,
123
+ height: t,
124
+ viewBox: "0 0 24 24",
125
+ fill: "none",
126
+ stroke: o,
127
+ strokeWidth: "2",
128
+ strokeLinecap: "round",
129
+ strokeLinejoin: "round",
130
+ className: "lucide lucide-youtube-icon lucide-youtube",
131
+ ...e,
132
+ children: [
133
+ /* @__PURE__ */ n("path", { d: "M2.5 17a24.12 24.12 0 0 1 0-10 2 2 0 0 1 1.4-1.4 49.56 49.56 0 0 1 16.2 0A2 2 0 0 1 21.5 7a24.12 24.12 0 0 1 0 10 2 2 0 0 1-1.4 1.4 49.55 49.55 0 0 1-16.2 0A2 2 0 0 1 2.5 17" }),
134
+ /* @__PURE__ */ n("path", { d: "m10 15 5-3-5-3z" })
135
+ ]
136
+ }
137
+ );
138
+ }
139
+ export {
140
+ a as I,
141
+ s as L,
142
+ l as P,
143
+ h as T,
144
+ c as Y
145
+ };
@@ -1,20 +1,21 @@
1
1
  import { a as g, c as s, B as M, H as p, b as u, d as y } from "./chuncks/timeline.DfIC0519.js";
2
- import { a as H } from "./chuncks/youtube-icon.component.BRqHa946.js";
3
- import { C as ie, h as le, g as se, i as ne, I as de, L as oe, b as ce, c as ge, d as xe, e as be, f as me, P as he, T as fe, Y as pe } from "./chuncks/youtube-icon.component.BRqHa946.js";
4
- import { jsx as e, jsxs as d } from "react/jsx-runtime";
2
+ import { L as H } from "./chuncks/_influencer-select-input.component.CM5Sso6X.js";
3
+ import { C as ie, e as le, I as se, f as ne, P as oe, a as de, b as ce, c as ge, d as xe } from "./chuncks/_influencer-select-input.component.CM5Sso6X.js";
4
+ import { jsx as e, jsxs as o } from "react/jsx-runtime";
5
5
  import "react";
6
6
  import { C as w, a as k } from "./chuncks/card.Bockr0Tv.js";
7
7
  import { parseISO as h, differenceInCalendarDays as L, format as _ } from "date-fns";
8
+ import { I as me, L as he, P as fe, T as pe, Y as ue } from "./chuncks/youtube-icon.component.R7s6jY4w.js";
8
9
  const j = [
9
10
  ["circle", { cx: "12", cy: "12", r: "10", key: "1mglay" }],
10
11
  ["line", { x1: "12", x2: "12", y1: "8", y2: "12", key: "1pkeuh" }],
11
12
  ["line", { x1: "12", x2: "12.01", y1: "16", y2: "16", key: "4dfq90" }]
12
- ], T = g("circle-alert", j);
13
- const A = [
13
+ ], P = g("circle-alert", j);
14
+ const T = [
14
15
  ["rect", { width: "14", height: "14", x: "8", y: "8", rx: "2", ry: "2", key: "17jyea" }],
15
16
  ["path", { d: "M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2", key: "zix9uf" }]
16
- ], F = g("copy", A);
17
- const P = [
17
+ ], A = g("copy", T);
18
+ const F = [
18
19
  [
19
20
  "path",
20
21
  {
@@ -26,7 +27,7 @@ const P = [
26
27
  ["path", { d: "M10 9H8", key: "b1mrlr" }],
27
28
  ["path", { d: "M16 13H8", key: "t4e002" }],
28
29
  ["path", { d: "M16 17H8", key: "z1uh3a" }]
29
- ], $ = g("file-text", P);
30
+ ], $ = g("file-text", F);
30
31
  const D = [
31
32
  ["path", { d: "M3 12a9 9 0 0 1 9-9 9.75 9.75 0 0 1 6.74 2.74L21 8", key: "v9h5vc" }],
32
33
  ["path", { d: "M21 3v5h-5", key: "1q7to0" }],
@@ -51,13 +52,13 @@ function K({
51
52
  onRetry: r,
52
53
  tip: i,
53
54
  className: l,
54
- ...o
55
+ ...d
55
56
  }) {
56
- return /* @__PURE__ */ e(w, { className: s(l), ...o, children: /* @__PURE__ */ d(k, { className: "flex flex-col items-center justify-center px-6 py-12 text-center", children: [
57
+ return /* @__PURE__ */ e(w, { className: s(l), ...d, children: /* @__PURE__ */ o(k, { className: "flex flex-col items-center justify-center px-6 py-12 text-center", children: [
57
58
  /* @__PURE__ */ e("div", { className: "relative mb-4", children: /* @__PURE__ */ e(a, { "aria-hidden": "true", className: "text-destructive/60 size-16" }) }),
58
59
  /* @__PURE__ */ e("h3", { className: "text-foreground mb-2 text-lg font-semibold", children: t }),
59
60
  /* @__PURE__ */ e("p", { className: "text-muted-foreground max-w-md text-sm leading-relaxed", children: n }),
60
- r && /* @__PURE__ */ d(M, { onClick: r, variant: "outline", className: "mt-6", children: [
61
+ r && /* @__PURE__ */ o(M, { onClick: r, variant: "outline", className: "mt-6", children: [
61
62
  /* @__PURE__ */ e(S, {}),
62
63
  "Tentar novamente"
63
64
  ] }),
@@ -89,11 +90,11 @@ function U({
89
90
  className: r,
90
91
  openDelay: i = 0,
91
92
  closeDelay: l = 0,
92
- children: o,
93
+ children: d,
93
94
  ...x
94
95
  }) {
95
- return /* @__PURE__ */ d(p, { openDelay: i, closeDelay: l, ...x, children: [
96
- /* @__PURE__ */ e(u, { asChild: n, children: o }),
96
+ return /* @__PURE__ */ o(p, { openDelay: i, closeDelay: l, ...x, children: [
97
+ /* @__PURE__ */ e(u, { asChild: n, children: d }),
97
98
  /* @__PURE__ */ e(y, { align: t, className: r, children: a })
98
99
  ] });
99
100
  }
@@ -158,8 +159,8 @@ function X({
158
159
  icon: r,
159
160
  filled: i
160
161
  }) {
161
- const l = i ? V[t] : R[t], o = a ? f[a] : f.md;
162
- return /* @__PURE__ */ e("div", { className: s("w-fit p-2 rounded-lg", l?.bg, n), children: /* @__PURE__ */ e(r, { className: s(o, l?.text) }) });
162
+ const l = i ? V[t] : R[t], d = a ? f[a] : f.md;
163
+ return /* @__PURE__ */ e("div", { className: s("w-fit p-2 rounded-lg", l?.bg, n), children: /* @__PURE__ */ e(r, { className: s(d, l?.text) }) });
163
164
  }
164
165
  function Z({ className: a, ...t }) {
165
166
  return /* @__PURE__ */ e("div", { className: s("divide-y", a), ...t });
@@ -171,7 +172,7 @@ function ee({
171
172
  highlight: r = !1,
172
173
  negative: i = !1,
173
174
  positive: l = !1,
174
- isPercentage: o = !1,
175
+ isPercentage: d = !1,
175
176
  isDate: x = !1,
176
177
  isText: N = !1,
177
178
  isInvoiced: v = !1,
@@ -184,9 +185,9 @@ function ee({
184
185
  const I = h(t), b = L(I, /* @__PURE__ */ new Date());
185
186
  b > 15 ? c = "bg-yellow-100 font-bold" : b > 7 ? c = "bg-yellow-300 font-bold" : b >= 0 ? c = "bg-red-300 font-bold" : c = "bg-red-500 text-white font-bold";
186
187
  } else r && (c = "bg-[#ffe0b2] font-bold");
187
- return /* @__PURE__ */ e("div", { className: s("px-2 py-1 text-sm", c), children: /* @__PURE__ */ d(p, { openDelay: 0, closeDelay: 0, children: [
188
- /* @__PURE__ */ e(u, { children: /* @__PURE__ */ d("div", { className: "flex justify-between", children: [
189
- /* @__PURE__ */ d(
188
+ return /* @__PURE__ */ e("div", { className: s("px-2 py-1 text-sm", c), children: /* @__PURE__ */ o(p, { openDelay: 0, closeDelay: 0, children: [
189
+ /* @__PURE__ */ e(u, { children: /* @__PURE__ */ o("div", { className: "flex justify-between", children: [
190
+ /* @__PURE__ */ o(
190
191
  "span",
191
192
  {
192
193
  className: s(
@@ -196,11 +197,11 @@ function ee({
196
197
  children: [
197
198
  a,
198
199
  " ",
199
- /* @__PURE__ */ e(T, { className: "size-3.5" })
200
+ /* @__PURE__ */ e(P, { className: "size-3.5" })
200
201
  ]
201
202
  }
202
203
  ),
203
- /* @__PURE__ */ d(
204
+ /* @__PURE__ */ o(
204
205
  "span",
205
206
  {
206
207
  className: s(
@@ -208,8 +209,8 @@ function ee({
208
209
  i ? "text-red-600" : l ? "text-green-600" : ""
209
210
  ),
210
211
  children: [
211
- o && typeof t == "number" ? `${t.toFixed(2)}%` : x && typeof t == "string" ? _(h(t), "dd/MM/yyyy") : N && typeof t == "string" ? t : `R$ ${t.toLocaleString("pt-BR", { minimumFractionDigits: 2, maximumFractionDigits: 2 })}`,
212
- C && m && /* @__PURE__ */ e(F, { size: 15, onClick: () => m(t) })
212
+ d && typeof t == "number" ? `${t.toFixed(2)}%` : x && typeof t == "string" ? _(h(t), "dd/MM/yyyy") : N && typeof t == "string" ? t : `R$ ${t.toLocaleString("pt-BR", { minimumFractionDigits: 2, maximumFractionDigits: 2 })}`,
213
+ C && m && /* @__PURE__ */ e(A, { size: 15, onClick: () => m(t) })
213
214
  ]
214
215
  }
215
216
  )
@@ -219,7 +220,7 @@ function ee({
219
220
  {
220
221
  align: "start",
221
222
  className: s(!z && "pointer-events-none"),
222
- children: /* @__PURE__ */ d("div", { className: "space-y-0.5", children: [
223
+ children: /* @__PURE__ */ o("div", { className: "space-y-0.5", children: [
223
224
  /* @__PURE__ */ e("div", { className: "font-medium", children: a }),
224
225
  /* @__PURE__ */ e("div", { className: "font-normal opacity-80", children: n })
225
226
  ] })
@@ -235,7 +236,7 @@ function te({
235
236
  className: i,
236
237
  ...l
237
238
  }) {
238
- return /* @__PURE__ */ e(w, { className: s(i), ...l, children: /* @__PURE__ */ d(k, { className: "flex flex-col items-center justify-center px-6 py-12 text-center", children: [
239
+ return /* @__PURE__ */ e(w, { className: s(i), ...l, children: /* @__PURE__ */ o(k, { className: "flex flex-col items-center justify-center px-6 py-12 text-center", children: [
239
240
  /* @__PURE__ */ e("div", { className: "relative mb-4", children: /* @__PURE__ */ e(
240
241
  a,
241
242
  {
@@ -257,17 +258,17 @@ export {
257
258
  X as IconBadge,
258
259
  se as Image,
259
260
  ne as InfluencerSelectInput,
260
- de as InstagramIcon,
261
- oe as LinkedInIcon,
261
+ me as InstagramIcon,
262
+ he as LinkedInIcon,
262
263
  Z as List,
263
264
  ee as ListRow,
264
265
  te as NotFoundCard,
265
- ce as PageHeader,
266
- ge as PageHeaderActions,
267
- xe as PageHeaderContent,
268
- be as PageHeaderDescription,
269
- me as PageHeaderTitle,
270
- he as PinterestIcon,
271
- fe as TikTokIcon,
272
- pe as YoutubeIcon
266
+ oe as PageHeader,
267
+ de as PageHeaderActions,
268
+ ce as PageHeaderContent,
269
+ ge as PageHeaderDescription,
270
+ xe as PageHeaderTitle,
271
+ fe as PinterestIcon,
272
+ pe as TikTokIcon,
273
+ ue as YoutubeIcon
273
274
  };
@@ -40,6 +40,14 @@ export declare const NO_DATA_TO_UPDATE_MESSAGE = "Nenhum dado novo foi informado
40
40
 
41
41
  declare function PinterestIcon({ size, color, ...props }: LucideProps): JSX.Element;
42
42
 
43
+ export declare const SOCIAL_NETWORK_COLOR_VALUES: {
44
+ instagram: string;
45
+ tiktok: string;
46
+ youtube: string;
47
+ linkedin: string;
48
+ pinterest: string;
49
+ };
50
+
43
51
  export declare const SOCIAL_NETWORK_ICON_COMPONENTS: {
44
52
  readonly instagram: typeof InstagramIcon;
45
53
  readonly tiktok: typeof TikTokIcon;
package/dist/constants.js CHANGED
@@ -1,34 +1,25 @@
1
+ import { B as L, C as N, S as d, a as u } from "./chuncks/values.constant.DO4JqXro.js";
1
2
  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 "./chuncks/_influencer-select-input.component.CM5Sso6X.js";
3
4
  import "react/jsx-runtime";
4
5
  import "react";
5
6
  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 = {
7
+ import { P as o, L as a, Y as t, T as e, I as n } from "./chuncks/youtube-icon.component.R7s6jY4w.js";
8
+ const A = "Não há dados para atualizar.", S = "O filtro selecionado já está ativo. Por favor, escolha outro filtro antes de tentar novamente.", T = "Nenhum dado novo foi informado para realizar a operação. Por favor, atualize os campos antes de tentar novamente.", c = "Não foi possível concluir a operação. Tente novamente mais tarde ou entre em contato com o suporte.", I = {
19
9
  instagram: n,
20
10
  tiktok: e,
21
- youtube: a,
22
- linkedin: t,
11
+ youtube: t,
12
+ linkedin: a,
23
13
  pinterest: o
24
14
  };
25
15
  export {
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
16
+ L as BUSINESS_UNIT_VALUES,
17
+ N as CLIENT_TYPE_VALUES,
18
+ c as ERROR_MESSAGE,
19
+ S as FILTER_ALREADY_APPLIED_MESSAGE,
20
+ A as NO_DATA_TO_UPDATE,
21
+ T as NO_DATA_TO_UPDATE_MESSAGE,
22
+ d as SOCIAL_NETWORK_COLOR_VALUES,
23
+ I as SOCIAL_NETWORK_ICON_COMPONENTS,
24
+ u as SOCIAL_NETWORK_VALUES
34
25
  };
package/dist/events.js CHANGED
@@ -1,13 +1,13 @@
1
- import { preFormatPercentage as s } from "./utils.js";
1
+ import { h as o } from "./chuncks/format.util.nTDnyjyW.js";
2
2
  const i = (t, a) => {
3
- const e = t.target.value, n = s(e);
3
+ const e = t.target.value, n = o(e);
4
4
  n !== !1 && a(n);
5
5
  }, f = (t, a) => {
6
6
  const e = t.target, n = e.value, c = e.selectionStart, r = e.selectionEnd;
7
7
  if (c === r && t.key === "Backspace") {
8
- const u = n.slice(0, -2), o = s(u);
9
- if (o === !1) return;
10
- a(o);
8
+ const u = n.slice(0, -2), s = o(u);
9
+ if (s === !1) return;
10
+ a(s);
11
11
  }
12
12
  };
13
13
  export {
package/dist/utils.d.ts CHANGED
@@ -1,3 +1,13 @@
1
+ declare const BUSINESS_UNIT_VALUES: {
2
+ readonly enterprise: "Empresa";
3
+ readonly artistic: "Artística";
4
+ };
5
+
6
+ declare const CLIENT_TYPE_VALUES: {
7
+ readonly agency: "Agência";
8
+ readonly brand: "Marca";
9
+ };
10
+
1
11
  /**
2
12
  * Formata um número em notação compacta usando o locale pt-BR.
3
13
  *
@@ -45,6 +55,10 @@ export declare function formatCurrency(value: number): string;
45
55
  */
46
56
  export declare const formatPercentage: (value: string | number) => string;
47
57
 
58
+ export declare function isBusinessUnit(value?: string): value is keyof typeof BUSINESS_UNIT_VALUES;
59
+
60
+ export declare function isClientType(value?: string): value is keyof typeof CLIENT_TYPE_VALUES;
61
+
48
62
  /**
49
63
  * Verifica se o valor fornecido é um número ou uma string que pode ser convertida para número.
50
64
  *
@@ -61,6 +75,8 @@ export declare const formatPercentage: (value: string | number) => string;
61
75
  */
62
76
  export declare function isNumber(value: string | number): value is number;
63
77
 
78
+ export declare function isSocialNetwork(value?: string): value is keyof typeof SOCIAL_NETWORK_VALUES;
79
+
64
80
  /**
65
81
  * Aplica a máscara de CNPJ a uma string numérica.
66
82
  *
@@ -117,6 +133,14 @@ export declare function preFormatCurrency(value: string): number;
117
133
  */
118
134
  export declare const preFormatPercentage: (value: string | number) => number | false;
119
135
 
136
+ declare const SOCIAL_NETWORK_VALUES: {
137
+ readonly instagram: "Instagram";
138
+ readonly tiktok: "TikTok";
139
+ readonly youtube: "YouTube";
140
+ readonly linkedin: "LinkedIn";
141
+ readonly pinterest: "Pinterest";
142
+ };
143
+
120
144
  /**
121
145
  * Remove qualquer formatação de uma string, deixando apenas os números.
122
146
  *
package/dist/utils.js CHANGED
@@ -1,67 +1,18 @@
1
- function n(e) {
2
- return !isNaN(Number(e));
3
- }
4
- function a(e) {
5
- const r = e.replace(/[^0-9]/g, "");
6
- return Number(r) / 100;
7
- }
8
- function u(e) {
9
- return e.toLocaleString("pt-BR", {
10
- style: "currency",
11
- currency: "BRL"
12
- });
13
- }
14
- const m = (e) => {
15
- const r = n(e) ? e : Number(e);
16
- return `${parseInt(String(r * 100))}%`;
17
- }, i = (e) => {
18
- const r = +String(e).replace("%", "");
19
- if (!n(r)) return !1;
20
- const t = r / 100;
21
- return +String(t).split(".")[0] >= 1 ? 1 : t;
22
- };
23
- function o(e) {
24
- return e.replace(/\D/g, "").replace(/^(\d{3})(\d{3})(\d{3})(\d{2})$/, "$1.$2.$3-$4");
25
- }
26
- function l(e) {
27
- return e.replace(/\D/g, "").replace(/^(\d{2})(\d{3})(\d{3})(\d{1})$/, "$1.$2.$3-$4");
28
- }
29
- function s(e) {
30
- return e.replace(/\D/g, "").replace(
31
- /^(\d{2})(\d{3})(\d{3})(\d{4})(\d{2})$/,
32
- "$1.$2.$3/$4-$5"
33
- );
34
- }
35
- function p(e) {
36
- return e.replace(/\D/g, "").replace(/^(\d{5})(\d{3})$/, "$1-$2");
37
- }
38
- function d(e) {
39
- return e.replace(/\D/g, "");
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);
1
+ import { f as e, a as r, b as m, c as t, i as o, j as i, k as c, l as n, m as p, d as C, e as k, g as u, p as f, h as P, u as N } from "./chuncks/format.util.nTDnyjyW.js";
54
2
  export {
55
- $ as formatCompactNumber,
56
- f as formatCompactPercent,
57
- u as formatCurrency,
58
- m as formatPercentage,
59
- n as isNumber,
60
- s as maskCNPJ,
61
- o as maskCPF,
62
- l as maskRG,
63
- p as maskZipCode,
64
- a as preFormatCurrency,
65
- i as preFormatPercentage,
66
- d as unmask
3
+ e as formatCompactNumber,
4
+ r as formatCompactPercent,
5
+ m as formatCurrency,
6
+ t as formatPercentage,
7
+ o as isBusinessUnit,
8
+ i as isClientType,
9
+ c as isNumber,
10
+ n as isSocialNetwork,
11
+ p as maskCNPJ,
12
+ C as maskCPF,
13
+ k as maskRG,
14
+ u as maskZipCode,
15
+ f as preFormatCurrency,
16
+ P as preFormatPercentage,
17
+ N as unmask
67
18
  };
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.88",
4
+ "version": "0.0.90",
5
5
  "files": [
6
6
  "dist"
7
7
  ],