@grapadigital/shared-app-modules 0.0.185 → 0.0.187
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/assets/switch.css +1 -1
- package/dist/chuncks/{format.util.B4_t_P84.js → format.util.BTMXECYG.js} +1 -1
- package/dist/chuncks/{youtube-icon.component.BwBMzo2U.js → youtube-icon.component.CRGHhhcx.js} +919 -853
- package/dist/components.d.ts +31 -0
- package/dist/components.js +59 -57
- package/dist/constants.js +1 -1
- package/dist/events.js +1 -1
- package/dist/utils.js +4 -4
- package/package.json +1 -1
package/dist/components.d.ts
CHANGED
|
@@ -333,6 +333,19 @@ declare type FieldProfileSelectInputProps = React.ComponentProps<typeof ProfileS
|
|
|
333
333
|
ref?: React.Ref<HTMLInputElement> | undefined;
|
|
334
334
|
};
|
|
335
335
|
|
|
336
|
+
export declare const FieldResponsibleSelectInput: ForwardRefExoticComponent<ControllerFieldState & {
|
|
337
|
+
label?: string;
|
|
338
|
+
name?: string;
|
|
339
|
+
description?: string;
|
|
340
|
+
asterisk?: boolean;
|
|
341
|
+
users: ResponsibleUser[];
|
|
342
|
+
value?: string;
|
|
343
|
+
onValueChange: (email: string) => void;
|
|
344
|
+
isLoading?: boolean;
|
|
345
|
+
disabled?: boolean;
|
|
346
|
+
placeholder?: string;
|
|
347
|
+
} & RefAttributes<HTMLButtonElement>>;
|
|
348
|
+
|
|
336
349
|
export declare const FieldSaleSelectInput: ForwardRefExoticComponent<Omit<FieldSaleSelectInputProps, "ref"> & RefAttributes<HTMLInputElement>>;
|
|
337
350
|
|
|
338
351
|
declare type FieldSaleSelectInputProps = React.ComponentProps<"input"> & ControllerFieldState & {
|
|
@@ -803,6 +816,24 @@ declare interface Requester {
|
|
|
803
816
|
team: string;
|
|
804
817
|
}
|
|
805
818
|
|
|
819
|
+
export declare const ResponsibleSelectInput: ForwardRefExoticComponent<ResponsibleSelectInputProps & RefAttributes<HTMLButtonElement>>;
|
|
820
|
+
|
|
821
|
+
declare interface ResponsibleSelectInputProps {
|
|
822
|
+
users: ResponsibleUser[];
|
|
823
|
+
value?: string;
|
|
824
|
+
onValueChange: (email: string) => void;
|
|
825
|
+
isLoading?: boolean;
|
|
826
|
+
disabled?: boolean;
|
|
827
|
+
placeholder?: string;
|
|
828
|
+
id?: string;
|
|
829
|
+
}
|
|
830
|
+
|
|
831
|
+
export declare interface ResponsibleUser {
|
|
832
|
+
email: string;
|
|
833
|
+
name: string;
|
|
834
|
+
team?: string;
|
|
835
|
+
}
|
|
836
|
+
|
|
806
837
|
declare interface Review {
|
|
807
838
|
revisedIssueDate: string;
|
|
808
839
|
revisedDueDate: string;
|
package/dist/components.js
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import { aZ as h, w as S, c, F as
|
|
1
|
+
import { aZ as h, w as S, c, F as I, B as k, aq as _, ar as z, as as M, bf as H, W as L, X as D, $ as v, _ as j, Y as B, a0 as $ } from "./chuncks/switch.D4GUsewk.js";
|
|
2
2
|
import { jsx as e, jsxs as d, Fragment as T } from "react/jsx-runtime";
|
|
3
3
|
import { QueryErrorResetBoundary as O, useQuery as P } from "@tanstack/react-query";
|
|
4
|
-
import { Suspense as q, useState as F, useRef as
|
|
5
|
-
import { n as K, M as
|
|
6
|
-
import { v as Ge, w as Ye, D as Ze, O as Je, E as et, G as tt, F as nt, H as at,
|
|
7
|
-
import { S as w, c as
|
|
4
|
+
import { Suspense as q, useState as F, useRef as R, useEffect as A, useMemo as U } from "react";
|
|
5
|
+
import { n as K, M as W, o as X } from "./chuncks/youtube-icon.component.CRGHhhcx.js";
|
|
6
|
+
import { v as Ge, w as Ye, D as Ze, O as Je, E as et, G as tt, F as nt, H as at, Q as rt, J as st, K as it, L as ot, N as lt, u as dt, x as ct, U as gt, V as ut, p as xt, q as bt, r as pt, s as mt, t as ht, W as ft, y as yt, R as wt, z as kt, X as vt, Y as Nt, Z as Ct } from "./chuncks/youtube-icon.component.CRGHhhcx.js";
|
|
7
|
+
import { S as w, c as Q, T as V, a as G, b as Y, B as Z } from "./chuncks/badge.Cur4Mrd7.js";
|
|
8
8
|
import { parseISO as N, differenceInCalendarDays as J, format as ee } from "date-fns";
|
|
9
9
|
import { u as te, a as ne } from "./chuncks/axios.lib.DebbmKD8.js";
|
|
10
10
|
import "./chuncks/shared-app-modules.provider.DRJ7n4Cj.js";
|
|
@@ -53,9 +53,9 @@ const be = [
|
|
|
53
53
|
],
|
|
54
54
|
["path", { d: "M12 9v4", key: "juzpu7" }],
|
|
55
55
|
["path", { d: "M12 17h.01", key: "p32p05" }]
|
|
56
|
-
],
|
|
57
|
-
function
|
|
58
|
-
icon: a =
|
|
56
|
+
], pe = h("triangle-alert", be);
|
|
57
|
+
function me({
|
|
58
|
+
icon: a = pe,
|
|
59
59
|
title: t = "Algo deu errado",
|
|
60
60
|
description: r = "Não foi possível concluir esta operação no momento. Tente novamente em alguns instantes. Se o problema persistir, entre em contato com o suporte.",
|
|
61
61
|
onRetry: s,
|
|
@@ -63,7 +63,7 @@ function pe({
|
|
|
63
63
|
className: n,
|
|
64
64
|
...o
|
|
65
65
|
}) {
|
|
66
|
-
return /* @__PURE__ */ e(S, { className: c(n), ...o, children: /* @__PURE__ */ d(
|
|
66
|
+
return /* @__PURE__ */ e(S, { className: c(n), ...o, children: /* @__PURE__ */ d(I, { className: "flex flex-col items-center justify-center px-6 py-12 text-center", children: [
|
|
67
67
|
/* @__PURE__ */ e("div", { className: "relative mb-4", children: /* @__PURE__ */ e(a, { "aria-hidden": "true", className: "text-destructive/60 size-16" }) }),
|
|
68
68
|
/* @__PURE__ */ e("h3", { className: "text-foreground mb-2 text-lg font-semibold", children: t }),
|
|
69
69
|
/* @__PURE__ */ e("p", { className: "text-muted-foreground max-w-md text-sm leading-relaxed", children: r }),
|
|
@@ -76,7 +76,7 @@ function pe({
|
|
|
76
76
|
}
|
|
77
77
|
function Le({
|
|
78
78
|
suspenseFallback: a = he,
|
|
79
|
-
errorFallback: t =
|
|
79
|
+
errorFallback: t = me,
|
|
80
80
|
children: r
|
|
81
81
|
}) {
|
|
82
82
|
return /* @__PURE__ */ e(q, { fallback: /* @__PURE__ */ e(a, {}), children: /* @__PURE__ */ e(O, { children: ({ reset: s }) => /* @__PURE__ */ e(
|
|
@@ -102,9 +102,9 @@ function De({
|
|
|
102
102
|
disabled: l = !1,
|
|
103
103
|
...x
|
|
104
104
|
}) {
|
|
105
|
-
return /* @__PURE__ */ e(T, { children: l === !0 ? o : /* @__PURE__ */ d(
|
|
106
|
-
/* @__PURE__ */ e(
|
|
107
|
-
/* @__PURE__ */ e(
|
|
105
|
+
return /* @__PURE__ */ e(T, { children: l === !0 ? o : /* @__PURE__ */ d(_, { openDelay: i, closeDelay: n, ...x, children: [
|
|
106
|
+
/* @__PURE__ */ e(z, { asChild: r, children: o }),
|
|
107
|
+
/* @__PURE__ */ e(M, { align: t, className: s, children: a })
|
|
108
108
|
] }) });
|
|
109
109
|
}
|
|
110
110
|
const fe = {
|
|
@@ -185,17 +185,17 @@ function $e({
|
|
|
185
185
|
isDate: l = !1,
|
|
186
186
|
isText: x = !1,
|
|
187
187
|
isInvoiced: f = !1,
|
|
188
|
-
hasCopyButton:
|
|
188
|
+
hasCopyButton: p = !1,
|
|
189
189
|
enableHoverableContent: y = !1,
|
|
190
|
-
handleCopy:
|
|
190
|
+
handleCopy: m
|
|
191
191
|
}) {
|
|
192
192
|
let b = "";
|
|
193
193
|
if (l && typeof t == "string" && !f && s) {
|
|
194
194
|
const u = N(t), g = J(u, /* @__PURE__ */ new Date());
|
|
195
195
|
g > 15 ? b = "bg-yellow-100 font-bold" : g > 7 ? b = "bg-yellow-300 font-bold" : g >= 0 ? b = "bg-red-300 font-bold" : b = "bg-red-500 text-white font-bold";
|
|
196
196
|
} else s && (b = "bg-[#ffe0b2] font-bold");
|
|
197
|
-
return /* @__PURE__ */ e("div", { className: c("px-2 py-1 text-sm", b), children: /* @__PURE__ */ d(
|
|
198
|
-
/* @__PURE__ */ e(
|
|
197
|
+
return /* @__PURE__ */ e("div", { className: c("px-2 py-1 text-sm", b), children: /* @__PURE__ */ d(_, { openDelay: 0, closeDelay: 0, children: [
|
|
198
|
+
/* @__PURE__ */ e(z, { children: /* @__PURE__ */ d("div", { className: "flex justify-between", children: [
|
|
199
199
|
/* @__PURE__ */ d(
|
|
200
200
|
"span",
|
|
201
201
|
{
|
|
@@ -219,13 +219,13 @@ function $e({
|
|
|
219
219
|
),
|
|
220
220
|
children: [
|
|
221
221
|
o && typeof t == "number" ? `${t.toFixed(2)}%` : l && typeof t == "string" ? ee(N(t), "dd/MM/yyyy") : x && typeof t == "string" ? t : `R$ ${t.toLocaleString("pt-BR", { minimumFractionDigits: 2, maximumFractionDigits: 2 })}`,
|
|
222
|
-
|
|
222
|
+
p && m && /* @__PURE__ */ e(de, { size: 15, onClick: () => m(t) })
|
|
223
223
|
]
|
|
224
224
|
}
|
|
225
225
|
)
|
|
226
226
|
] }) }),
|
|
227
227
|
/* @__PURE__ */ e(
|
|
228
|
-
|
|
228
|
+
M,
|
|
229
229
|
{
|
|
230
230
|
align: "start",
|
|
231
231
|
className: c(!y && "pointer-events-none"),
|
|
@@ -245,7 +245,7 @@ function Oe({
|
|
|
245
245
|
className: i,
|
|
246
246
|
...n
|
|
247
247
|
}) {
|
|
248
|
-
return /* @__PURE__ */ e(S, { className: c(i), ...n, children: /* @__PURE__ */ d(
|
|
248
|
+
return /* @__PURE__ */ e(S, { className: c(i), ...n, children: /* @__PURE__ */ d(I, { className: "flex flex-col items-center justify-center px-6 py-12 text-center", children: [
|
|
249
249
|
/* @__PURE__ */ e("div", { className: "relative mb-4", children: /* @__PURE__ */ e(
|
|
250
250
|
a,
|
|
251
251
|
{
|
|
@@ -262,8 +262,8 @@ function Pe({
|
|
|
262
262
|
actions: a,
|
|
263
263
|
icon: t = oe
|
|
264
264
|
}) {
|
|
265
|
-
const [r, s] = F(!1), i =
|
|
266
|
-
return
|
|
265
|
+
const [r, s] = F(!1), i = R(null);
|
|
266
|
+
return A(() => {
|
|
267
267
|
if (!r) return;
|
|
268
268
|
const n = (l) => {
|
|
269
269
|
i.current?.contains(l.target) || s(!1);
|
|
@@ -273,7 +273,7 @@ function Pe({
|
|
|
273
273
|
return document.addEventListener("mousedown", n), document.addEventListener("keydown", o), () => {
|
|
274
274
|
document.removeEventListener("mousedown", n), document.removeEventListener("keydown", o);
|
|
275
275
|
};
|
|
276
|
-
}, [r]), /* @__PURE__ */ e(
|
|
276
|
+
}, [r]), /* @__PURE__ */ e(Q, { children: /* @__PURE__ */ d(
|
|
277
277
|
"div",
|
|
278
278
|
{
|
|
279
279
|
ref: i,
|
|
@@ -287,7 +287,7 @@ function Pe({
|
|
|
287
287
|
r ? "translate-y-0 opacity-100" : "pointer-events-none translate-y-2 opacity-0"
|
|
288
288
|
),
|
|
289
289
|
style: { transitionDelay: r ? `${o * 30}ms` : "0ms" },
|
|
290
|
-
children: /* @__PURE__ */ d(
|
|
290
|
+
children: /* @__PURE__ */ d(V, { children: [
|
|
291
291
|
/* @__PURE__ */ e(G, { asChild: !0, children: /* @__PURE__ */ e(
|
|
292
292
|
k,
|
|
293
293
|
{
|
|
@@ -351,7 +351,7 @@ function qe({
|
|
|
351
351
|
}) }) }),
|
|
352
352
|
/* @__PURE__ */ e(B, { children: Array.from({ length: t }).map((i, n) => /* @__PURE__ */ e(v, { className: "h-[3.05rem]", children: Array.from({ length: a }).map((o, l) => {
|
|
353
353
|
const x = r && l === a - 1;
|
|
354
|
-
return /* @__PURE__ */ e($, { children: x ? /* @__PURE__ */ e("div", { className: "flex gap-2", children: Array.from({ length: s }).map((f,
|
|
354
|
+
return /* @__PURE__ */ e($, { children: x ? /* @__PURE__ */ e("div", { className: "flex gap-2", children: Array.from({ length: s }).map((f, p) => /* @__PURE__ */ e(w, { className: "ml-auto size-8" }, p)) }) : /* @__PURE__ */ e(w, { className: "h-4 w-full" }) }, l);
|
|
355
355
|
}) }, n)) })
|
|
356
356
|
] });
|
|
357
357
|
}
|
|
@@ -449,14 +449,14 @@ function Ke({
|
|
|
449
449
|
disabled: n,
|
|
450
450
|
singleLine: o = !1
|
|
451
451
|
}) {
|
|
452
|
-
const [l, x] = F(""), f = ne(l, 200), { data:
|
|
453
|
-
() =>
|
|
454
|
-
[
|
|
452
|
+
const [l, x] = F(""), f = ne(l, 200), { data: p } = ve(s, f), y = R(void 0), m = U(
|
|
453
|
+
() => p?.map((u) => ({ id: u._id, display: u.username })) ?? [],
|
|
454
|
+
[p]
|
|
455
455
|
);
|
|
456
|
-
return
|
|
457
|
-
y.current?.(
|
|
458
|
-
}, [
|
|
459
|
-
|
|
456
|
+
return A(() => {
|
|
457
|
+
y.current?.(m);
|
|
458
|
+
}, [m]), /* @__PURE__ */ e(
|
|
459
|
+
W,
|
|
460
460
|
{
|
|
461
461
|
value: a,
|
|
462
462
|
onChange: (u, g) => t(g),
|
|
@@ -467,12 +467,12 @@ function Ke({
|
|
|
467
467
|
allowSuggestionsAboveCursor: !0,
|
|
468
468
|
style: Ne,
|
|
469
469
|
children: /* @__PURE__ */ e(
|
|
470
|
-
|
|
470
|
+
X,
|
|
471
471
|
{
|
|
472
472
|
trigger: "@",
|
|
473
473
|
markup: we,
|
|
474
474
|
data: (u, g) => {
|
|
475
|
-
y.current = g, x(u), g(
|
|
475
|
+
y.current = g, x(u), g(m);
|
|
476
476
|
},
|
|
477
477
|
displayTransform: (u, g) => `@${g}`,
|
|
478
478
|
appendSpaceOnAdd: !0,
|
|
@@ -482,7 +482,7 @@ function Ke({
|
|
|
482
482
|
}
|
|
483
483
|
);
|
|
484
484
|
}
|
|
485
|
-
function
|
|
485
|
+
function We({ text: a, className: t }) {
|
|
486
486
|
const r = new RegExp(E), s = [];
|
|
487
487
|
let i = 0, n, o = 0;
|
|
488
488
|
for (; (n = r.exec(a)) !== null; )
|
|
@@ -496,7 +496,7 @@ function Xe({ text: a, className: t }) {
|
|
|
496
496
|
), i = n.index + n[0].length;
|
|
497
497
|
return i < a.length && s.push(/* @__PURE__ */ e("span", { children: a.slice(i) }, o++)), /* @__PURE__ */ e(T, { children: s });
|
|
498
498
|
}
|
|
499
|
-
function
|
|
499
|
+
function Xe({
|
|
500
500
|
size: a = 24,
|
|
501
501
|
color: t = "currentColor",
|
|
502
502
|
...r
|
|
@@ -523,42 +523,44 @@ export {
|
|
|
523
523
|
Le as AsyncBoundary,
|
|
524
524
|
Ge as CampaignsSelectInput,
|
|
525
525
|
Ye as ClientSelectInput,
|
|
526
|
-
|
|
526
|
+
me as ErrorCard,
|
|
527
527
|
Ze as FieldCalendar,
|
|
528
528
|
Je as FieldCheckbox,
|
|
529
529
|
et as FieldClientSelectInput,
|
|
530
530
|
tt as FieldInput,
|
|
531
531
|
nt as FieldLabelWithAsterisk,
|
|
532
532
|
at as FieldProfileSelectInput,
|
|
533
|
-
rt as
|
|
534
|
-
st as
|
|
535
|
-
it as
|
|
536
|
-
ot as
|
|
533
|
+
rt as FieldResponsibleSelectInput,
|
|
534
|
+
st as FieldSaleSelectInput,
|
|
535
|
+
it as FieldSelect,
|
|
536
|
+
ot as FieldSwitch,
|
|
537
|
+
lt as FieldTextarea,
|
|
537
538
|
De as HoverContent,
|
|
538
539
|
je as IconBadge,
|
|
539
|
-
|
|
540
|
-
|
|
541
|
-
|
|
542
|
-
|
|
540
|
+
dt as Image,
|
|
541
|
+
ct as InfluencerSelectInput,
|
|
542
|
+
gt as InstagramIcon,
|
|
543
|
+
ut as LinkedInIcon,
|
|
543
544
|
Be as List,
|
|
544
545
|
$e as ListRow,
|
|
545
546
|
Ke as MentionInput,
|
|
546
|
-
|
|
547
|
+
We as MentionText,
|
|
547
548
|
Oe as NotFoundCard,
|
|
548
|
-
|
|
549
|
-
|
|
550
|
-
|
|
549
|
+
xt as PageHeader,
|
|
550
|
+
bt as PageHeaderActions,
|
|
551
|
+
pt as PageHeaderContent,
|
|
551
552
|
mt as PageHeaderDescription,
|
|
552
|
-
|
|
553
|
-
|
|
554
|
-
|
|
555
|
-
|
|
553
|
+
ht as PageHeaderTitle,
|
|
554
|
+
ft as PinterestIcon,
|
|
555
|
+
yt as ProfileSelectInput,
|
|
556
|
+
wt as ResponsibleSelectInput,
|
|
557
|
+
kt as SaleSelectInput,
|
|
556
558
|
Pe as SpeedDialButton,
|
|
557
559
|
qe as TableSkeleton,
|
|
558
|
-
|
|
559
|
-
|
|
560
|
-
|
|
561
|
-
|
|
560
|
+
vt as TikTokIcon,
|
|
561
|
+
Xe as TwitterIcon,
|
|
562
|
+
Nt as XIcon,
|
|
563
|
+
Ct as YoutubeIcon,
|
|
562
564
|
Ue as getMentionedUsers,
|
|
563
565
|
ke as parseMentions
|
|
564
566
|
};
|
package/dist/constants.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { a as r, A as s, B as T, C as n, I as O, c as L, P as N, b as c, d as I, S as U, T as P } from "./chuncks/youtube-icon.component.
|
|
1
|
+
import { a as r, A as s, B as T, C as n, I as O, c as L, P as N, b as c, d as I, S as U, T as P } from "./chuncks/youtube-icon.component.CRGHhhcx.js";
|
|
2
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.", _ = "Não foi possível concluir a operação. Tente novamente mais tarde ou entre em contato com o suporte.", A = "Há um erro na validação dos campos. Por favor, entre em contato com o suporte.", e = "Campo obrigatório.";
|
|
3
3
|
export {
|
|
4
4
|
r as ACTION_STATUS_VALUES,
|
package/dist/events.js
CHANGED
package/dist/utils.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { U as t } from "./chuncks/format.util.
|
|
2
|
-
import { g as y, h as k, f as C, b as E, d as L, m as P, c as _, e as O, a as D, p as I, u as U } from "./chuncks/format.util.
|
|
3
|
-
import { e as s } from "./chuncks/youtube-icon.component.
|
|
4
|
-
import { m as j, h as N, g as q, k as x, i as F, l as T, j as A, f as G } from "./chuncks/youtube-icon.component.
|
|
1
|
+
import { U as t } from "./chuncks/format.util.BTMXECYG.js";
|
|
2
|
+
import { g as y, h as k, f as C, b as E, d as L, m as P, c as _, e as O, a as D, p as I, u as U } from "./chuncks/format.util.BTMXECYG.js";
|
|
3
|
+
import { e as s } from "./chuncks/youtube-icon.component.CRGHhhcx.js";
|
|
4
|
+
import { m as j, h as N, g as q, k as x, i as F, l as T, j as A, f as G } from "./chuncks/youtube-icon.component.CRGHhhcx.js";
|
|
5
5
|
const a = (e) => e ? `${e} é obrigatório.` : "Campo obrigatório.", o = (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.`, i = (e, r) => r ? `${r} não pode ser menor que ${e}.` : `Não pode ser menor que ${e}.`, m = (e, r) => r ? `${r} não pode ser maior que ${e}.` : `Não pode ser maior que ${e}.`, u = (e) => e ? `${e} inválido.` : "Valor inválido.", c = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
6
6
|
__proto__: null,
|
|
7
7
|
invalidMessage: u,
|