@grapadigital/shared-app-modules 0.0.182 → 0.0.184
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/badge.Cur4Mrd7.js +416 -0
- package/dist/chuncks/{format.util.vV9o9P7h.js → format.util.B1F-QlvS.js} +1 -1
- package/dist/chuncks/{popover.4p4HlZwe.js → popover.C3VFqVxV.js} +1 -1
- package/dist/chuncks/{switch.BF6I8Lqo.js → switch.D4GUsewk.js} +127 -127
- package/dist/chuncks/youtube-icon.component.Dasmq5T5.js +4435 -0
- package/dist/components.d.ts +38 -0
- package/dist/components.js +366 -212
- package/dist/constants.js +1 -1
- package/dist/events.js +1 -1
- package/dist/hooks.d.ts +1 -0
- package/dist/pages.js +1 -1
- package/dist/providers.d.ts +1 -0
- package/dist/shadcn.js +151 -187
- package/dist/utils.js +4 -4
- package/package.json +11 -9
- package/dist/chuncks/tooltip.BR6kaw4f.js +0 -378
- package/dist/chuncks/youtube-icon.component.CaEGEuTv.js +0 -2091
package/dist/components.js
CHANGED
|
@@ -1,26 +1,28 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { jsx as e, jsxs as
|
|
3
|
-
import { QueryErrorResetBoundary as
|
|
4
|
-
import { Suspense as
|
|
5
|
-
import { n as
|
|
6
|
-
import {
|
|
7
|
-
import { S as
|
|
8
|
-
import { parseISO as
|
|
9
|
-
|
|
1
|
+
import { aZ as h, w as S, c, F as z, B as k, aq as _, ar as M, as as I, bf as H, W as L, X as D, $ as v, _ as $, Y as j, a0 as B } from "./chuncks/switch.D4GUsewk.js";
|
|
2
|
+
import { jsx as e, jsxs as d, Fragment as T } from "react/jsx-runtime";
|
|
3
|
+
import { QueryErrorResetBoundary as O, useQuery as P } from "@tanstack/react-query";
|
|
4
|
+
import { Suspense as q, useState as F, useRef as A, useEffect as R, useMemo as U } from "react";
|
|
5
|
+
import { n as K, o as W, M as X, p as Q } from "./chuncks/youtube-icon.component.Dasmq5T5.js";
|
|
6
|
+
import { w as Ve, x as Ge, E as Ye, Q as Ze, G as Je, H as et, F as tt, J as nt, K as at, L as rt, N as st, O as it, v as ot, y as lt, R as dt, U as ct, q as gt, r as ut, s as xt, t as bt, u as mt, V as pt, z as ht, D as ft, W as yt, X as wt, Y as kt } from "./chuncks/youtube-icon.component.Dasmq5T5.js";
|
|
7
|
+
import { S as w, c as V, T as G, a as Y, b as Z, B as J } from "./chuncks/badge.Cur4Mrd7.js";
|
|
8
|
+
import { parseISO as N, differenceInCalendarDays as ee, format as te } from "date-fns";
|
|
9
|
+
import { a as ne, u as ae } from "./chuncks/use-shared-app-modules.hook.jCQwZaT8.js";
|
|
10
|
+
import "./chuncks/shared-app-modules.provider.DRJ7n4Cj.js";
|
|
11
|
+
const re = [
|
|
10
12
|
["circle", { cx: "12", cy: "12", r: "10", key: "1mglay" }],
|
|
11
13
|
["line", { x1: "12", x2: "12", y1: "8", y2: "12", key: "1pkeuh" }],
|
|
12
14
|
["line", { x1: "12", x2: "12.01", y1: "16", y2: "16", key: "4dfq90" }]
|
|
13
|
-
],
|
|
14
|
-
const
|
|
15
|
+
], se = h("circle-alert", re);
|
|
16
|
+
const ie = [
|
|
15
17
|
["circle", { cx: "12", cy: "12", r: "10", key: "1mglay" }],
|
|
16
18
|
["path", { d: "M9.09 9a3 3 0 0 1 5.83 1c0 2-3 3-3 3", key: "1u773s" }],
|
|
17
19
|
["path", { d: "M12 17h.01", key: "p32p05" }]
|
|
18
|
-
],
|
|
19
|
-
const
|
|
20
|
+
], oe = h("circle-question-mark", ie);
|
|
21
|
+
const le = [
|
|
20
22
|
["rect", { width: "14", height: "14", x: "8", y: "8", rx: "2", ry: "2", key: "17jyea" }],
|
|
21
23
|
["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" }]
|
|
22
|
-
],
|
|
23
|
-
const
|
|
24
|
+
], de = h("copy", le);
|
|
25
|
+
const ce = [
|
|
24
26
|
[
|
|
25
27
|
"path",
|
|
26
28
|
{
|
|
@@ -32,14 +34,14 @@ const te = [
|
|
|
32
34
|
["path", { d: "M10 9H8", key: "b1mrlr" }],
|
|
33
35
|
["path", { d: "M16 13H8", key: "t4e002" }],
|
|
34
36
|
["path", { d: "M16 17H8", key: "z1uh3a" }]
|
|
35
|
-
],
|
|
36
|
-
const
|
|
37
|
+
], ge = h("file-text", ce);
|
|
38
|
+
const ue = [
|
|
37
39
|
["path", { d: "M3 12a9 9 0 0 1 9-9 9.75 9.75 0 0 1 6.74 2.74L21 8", key: "v9h5vc" }],
|
|
38
40
|
["path", { d: "M21 3v5h-5", key: "1q7to0" }],
|
|
39
41
|
["path", { d: "M21 12a9 9 0 0 1-9 9 9.75 9.75 0 0 1-6.74-2.74L3 16", key: "3uifl3" }],
|
|
40
42
|
["path", { d: "M8 16H3v5", key: "1cv678" }]
|
|
41
|
-
],
|
|
42
|
-
const
|
|
43
|
+
], xe = h("refresh-cw", ue);
|
|
44
|
+
const be = [
|
|
43
45
|
[
|
|
44
46
|
"path",
|
|
45
47
|
{
|
|
@@ -49,61 +51,61 @@ const le = [
|
|
|
49
51
|
],
|
|
50
52
|
["path", { d: "M12 9v4", key: "juzpu7" }],
|
|
51
53
|
["path", { d: "M12 17h.01", key: "p32p05" }]
|
|
52
|
-
],
|
|
53
|
-
function
|
|
54
|
-
icon:
|
|
55
|
-
title:
|
|
56
|
-
description:
|
|
57
|
-
onRetry:
|
|
58
|
-
tip:
|
|
59
|
-
className:
|
|
60
|
-
...
|
|
54
|
+
], me = h("triangle-alert", be);
|
|
55
|
+
function pe({
|
|
56
|
+
icon: n = me,
|
|
57
|
+
title: t = "Algo deu errado",
|
|
58
|
+
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.",
|
|
59
|
+
onRetry: s,
|
|
60
|
+
tip: i,
|
|
61
|
+
className: a,
|
|
62
|
+
...o
|
|
61
63
|
}) {
|
|
62
|
-
return /* @__PURE__ */ e(
|
|
63
|
-
/* @__PURE__ */ e("div", { className: "relative mb-4", children: /* @__PURE__ */ e(
|
|
64
|
-
/* @__PURE__ */ e("h3", { className: "text-foreground mb-2 text-lg font-semibold", children:
|
|
65
|
-
/* @__PURE__ */ e("p", { className: "text-muted-foreground max-w-md text-sm leading-relaxed", children:
|
|
66
|
-
|
|
67
|
-
/* @__PURE__ */ e(
|
|
64
|
+
return /* @__PURE__ */ e(S, { className: c(a), ...o, children: /* @__PURE__ */ d(z, { className: "flex flex-col items-center justify-center px-6 py-12 text-center", children: [
|
|
65
|
+
/* @__PURE__ */ e("div", { className: "relative mb-4", children: /* @__PURE__ */ e(n, { "aria-hidden": "true", className: "text-destructive/60 size-16" }) }),
|
|
66
|
+
/* @__PURE__ */ e("h3", { className: "text-foreground mb-2 text-lg font-semibold", children: t }),
|
|
67
|
+
/* @__PURE__ */ e("p", { className: "text-muted-foreground max-w-md text-sm leading-relaxed", children: r }),
|
|
68
|
+
s && /* @__PURE__ */ d(k, { onClick: s, variant: "outline", className: "mt-6", children: [
|
|
69
|
+
/* @__PURE__ */ e(xe, {}),
|
|
68
70
|
"Tentar novamente"
|
|
69
71
|
] }),
|
|
70
|
-
|
|
72
|
+
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 }) })
|
|
71
73
|
] }) });
|
|
72
74
|
}
|
|
73
|
-
function
|
|
74
|
-
suspenseFallback:
|
|
75
|
-
errorFallback:
|
|
76
|
-
children:
|
|
75
|
+
function He({
|
|
76
|
+
suspenseFallback: n = he,
|
|
77
|
+
errorFallback: t = pe,
|
|
78
|
+
children: r
|
|
77
79
|
}) {
|
|
78
|
-
return /* @__PURE__ */ e(
|
|
79
|
-
|
|
80
|
+
return /* @__PURE__ */ e(q, { fallback: /* @__PURE__ */ e(n, {}), children: /* @__PURE__ */ e(O, { children: ({ reset: s }) => /* @__PURE__ */ e(
|
|
81
|
+
K,
|
|
80
82
|
{
|
|
81
|
-
onReset:
|
|
82
|
-
fallbackRender: ({ resetErrorBoundary:
|
|
83
|
-
children:
|
|
83
|
+
onReset: s,
|
|
84
|
+
fallbackRender: ({ resetErrorBoundary: i, error: a }) => /* @__PURE__ */ e(t, { error: a, onRetry: i }),
|
|
85
|
+
children: r
|
|
84
86
|
}
|
|
85
87
|
) }) });
|
|
86
88
|
}
|
|
87
|
-
function
|
|
88
|
-
return /* @__PURE__ */ e(
|
|
89
|
+
function he() {
|
|
90
|
+
return /* @__PURE__ */ e(w, { className: "h-[13.75625rem]" });
|
|
89
91
|
}
|
|
90
|
-
function
|
|
91
|
-
content:
|
|
92
|
-
align:
|
|
93
|
-
asChild:
|
|
94
|
-
className:
|
|
95
|
-
openDelay:
|
|
96
|
-
closeDelay:
|
|
97
|
-
children:
|
|
98
|
-
disabled:
|
|
99
|
-
...
|
|
92
|
+
function Le({
|
|
93
|
+
content: n,
|
|
94
|
+
align: t,
|
|
95
|
+
asChild: r,
|
|
96
|
+
className: s,
|
|
97
|
+
openDelay: i = 0,
|
|
98
|
+
closeDelay: a = 0,
|
|
99
|
+
children: o,
|
|
100
|
+
disabled: l = !1,
|
|
101
|
+
...x
|
|
100
102
|
}) {
|
|
101
|
-
return /* @__PURE__ */ e(
|
|
102
|
-
/* @__PURE__ */ e(
|
|
103
|
-
/* @__PURE__ */ e(
|
|
103
|
+
return /* @__PURE__ */ e(T, { children: l === !0 ? o : /* @__PURE__ */ d(_, { openDelay: i, closeDelay: a, ...x, children: [
|
|
104
|
+
/* @__PURE__ */ e(M, { asChild: r, children: o }),
|
|
105
|
+
/* @__PURE__ */ e(I, { align: t, className: s, children: n })
|
|
104
106
|
] }) });
|
|
105
107
|
}
|
|
106
|
-
const
|
|
108
|
+
const fe = {
|
|
107
109
|
red: { bg: "bg-red-50", text: "text-red-600" },
|
|
108
110
|
orange: { bg: "bg-orange-50", text: "text-orange-600" },
|
|
109
111
|
amber: { bg: "bg-amber-50", text: "text-amber-600" },
|
|
@@ -126,7 +128,7 @@ const de = {
|
|
|
126
128
|
zinc: { bg: "bg-zinc-200", text: "text-zinc-800" },
|
|
127
129
|
neutral: { bg: "bg-neutral-200", text: "text-neutral-800" },
|
|
128
130
|
stone: { bg: "bg-stone-200", text: "text-stone-800" }
|
|
129
|
-
},
|
|
131
|
+
}, ye = {
|
|
130
132
|
red: { bg: "bg-red-500", text: "text-white" },
|
|
131
133
|
orange: { bg: "bg-orange-500", text: "text-white" },
|
|
132
134
|
amber: { bg: "bg-amber-500", text: "text-white" },
|
|
@@ -150,266 +152,418 @@ const de = {
|
|
|
150
152
|
neutral: { bg: "bg-neutral-500", text: "text-white" },
|
|
151
153
|
stone: { bg: "bg-stone-500", text: "text-white" },
|
|
152
154
|
black: { bg: "bg-black", text: "text-white" }
|
|
153
|
-
},
|
|
155
|
+
}, C = {
|
|
154
156
|
xs: "size-3",
|
|
155
157
|
sm: "size-4",
|
|
156
158
|
md: "size-5",
|
|
157
159
|
lg: "size-6",
|
|
158
160
|
xl: "size-7"
|
|
159
161
|
};
|
|
160
|
-
function
|
|
161
|
-
size:
|
|
162
|
-
color:
|
|
163
|
-
className:
|
|
164
|
-
icon:
|
|
165
|
-
filled:
|
|
162
|
+
function De({
|
|
163
|
+
size: n,
|
|
164
|
+
color: t,
|
|
165
|
+
className: r,
|
|
166
|
+
icon: s,
|
|
167
|
+
filled: i
|
|
166
168
|
}) {
|
|
167
|
-
const
|
|
168
|
-
return /* @__PURE__ */ e("div", { className: c("w-fit p-2 rounded-lg",
|
|
169
|
+
const a = i ? ye[t] : fe[t], o = n ? C[n] : C.md;
|
|
170
|
+
return /* @__PURE__ */ e("div", { className: c("w-fit p-2 rounded-lg", a?.bg, r), children: /* @__PURE__ */ e(s, { className: c(o, a?.text) }) });
|
|
169
171
|
}
|
|
170
|
-
function
|
|
171
|
-
return /* @__PURE__ */ e("div", { className: c("divide-y",
|
|
172
|
+
function $e({ className: n, ...t }) {
|
|
173
|
+
return /* @__PURE__ */ e("div", { className: c("divide-y", n), ...t });
|
|
172
174
|
}
|
|
173
|
-
function
|
|
174
|
-
label:
|
|
175
|
-
value:
|
|
176
|
-
tooltip:
|
|
177
|
-
highlight:
|
|
178
|
-
negative:
|
|
179
|
-
positive:
|
|
180
|
-
isPercentage:
|
|
181
|
-
isDate:
|
|
182
|
-
isText:
|
|
183
|
-
isInvoiced:
|
|
184
|
-
hasCopyButton:
|
|
185
|
-
enableHoverableContent:
|
|
186
|
-
handleCopy:
|
|
175
|
+
function je({
|
|
176
|
+
label: n,
|
|
177
|
+
value: t,
|
|
178
|
+
tooltip: r,
|
|
179
|
+
highlight: s = !1,
|
|
180
|
+
negative: i = !1,
|
|
181
|
+
positive: a = !1,
|
|
182
|
+
isPercentage: o = !1,
|
|
183
|
+
isDate: l = !1,
|
|
184
|
+
isText: x = !1,
|
|
185
|
+
isInvoiced: f = !1,
|
|
186
|
+
hasCopyButton: m = !1,
|
|
187
|
+
enableHoverableContent: y = !1,
|
|
188
|
+
handleCopy: p
|
|
187
189
|
}) {
|
|
188
|
-
let
|
|
189
|
-
if (
|
|
190
|
-
const
|
|
191
|
-
|
|
192
|
-
} else
|
|
193
|
-
return /* @__PURE__ */ e("div", { className: c("px-2 py-1 text-sm",
|
|
194
|
-
/* @__PURE__ */ e(
|
|
195
|
-
/* @__PURE__ */
|
|
190
|
+
let b = "";
|
|
191
|
+
if (l && typeof t == "string" && !f && s) {
|
|
192
|
+
const u = N(t), g = ee(u, /* @__PURE__ */ new Date());
|
|
193
|
+
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";
|
|
194
|
+
} else s && (b = "bg-[#ffe0b2] font-bold");
|
|
195
|
+
return /* @__PURE__ */ e("div", { className: c("px-2 py-1 text-sm", b), children: /* @__PURE__ */ d(_, { openDelay: 0, closeDelay: 0, children: [
|
|
196
|
+
/* @__PURE__ */ e(M, { children: /* @__PURE__ */ d("div", { className: "flex justify-between", children: [
|
|
197
|
+
/* @__PURE__ */ d(
|
|
196
198
|
"span",
|
|
197
199
|
{
|
|
198
200
|
className: c(
|
|
199
201
|
"flex flex-row gap-1",
|
|
200
|
-
|
|
202
|
+
i ? "text-red-600" : a ? "text-green-600" : ""
|
|
201
203
|
),
|
|
202
204
|
children: [
|
|
203
|
-
|
|
205
|
+
n,
|
|
204
206
|
" ",
|
|
205
|
-
/* @__PURE__ */ e(
|
|
207
|
+
/* @__PURE__ */ e(se, { className: "size-3.5" })
|
|
206
208
|
]
|
|
207
209
|
}
|
|
208
210
|
),
|
|
209
|
-
/* @__PURE__ */
|
|
211
|
+
/* @__PURE__ */ d(
|
|
210
212
|
"span",
|
|
211
213
|
{
|
|
212
214
|
className: c(
|
|
213
215
|
"flex flex-row justify-end gap-2 text-right",
|
|
214
|
-
|
|
216
|
+
i ? "text-red-600" : a ? "text-green-600" : ""
|
|
215
217
|
),
|
|
216
218
|
children: [
|
|
217
|
-
|
|
218
|
-
|
|
219
|
+
o && typeof t == "number" ? `${t.toFixed(2)}%` : l && typeof t == "string" ? te(N(t), "dd/MM/yyyy") : x && typeof t == "string" ? t : `R$ ${t.toLocaleString("pt-BR", { minimumFractionDigits: 2, maximumFractionDigits: 2 })}`,
|
|
220
|
+
m && p && /* @__PURE__ */ e(de, { size: 15, onClick: () => p(t) })
|
|
219
221
|
]
|
|
220
222
|
}
|
|
221
223
|
)
|
|
222
224
|
] }) }),
|
|
223
225
|
/* @__PURE__ */ e(
|
|
224
|
-
|
|
226
|
+
I,
|
|
225
227
|
{
|
|
226
228
|
align: "start",
|
|
227
|
-
className: c(!
|
|
228
|
-
children: /* @__PURE__ */
|
|
229
|
-
/* @__PURE__ */ e("div", { className: "font-medium", children:
|
|
230
|
-
/* @__PURE__ */ e("div", { className: "font-normal opacity-80", children:
|
|
229
|
+
className: c(!y && "pointer-events-none"),
|
|
230
|
+
children: /* @__PURE__ */ d("div", { className: "space-y-0.5", children: [
|
|
231
|
+
/* @__PURE__ */ e("div", { className: "font-medium", children: n }),
|
|
232
|
+
/* @__PURE__ */ e("div", { className: "font-normal opacity-80", children: r })
|
|
231
233
|
] })
|
|
232
234
|
}
|
|
233
235
|
)
|
|
234
236
|
] }) });
|
|
235
237
|
}
|
|
236
|
-
function
|
|
237
|
-
icon:
|
|
238
|
-
title:
|
|
239
|
-
description:
|
|
240
|
-
tip:
|
|
241
|
-
className:
|
|
242
|
-
...
|
|
238
|
+
function Be({
|
|
239
|
+
icon: n = ge,
|
|
240
|
+
title: t,
|
|
241
|
+
description: r,
|
|
242
|
+
tip: s,
|
|
243
|
+
className: i,
|
|
244
|
+
...a
|
|
243
245
|
}) {
|
|
244
|
-
return /* @__PURE__ */ e(
|
|
246
|
+
return /* @__PURE__ */ e(S, { className: c(i), ...a, children: /* @__PURE__ */ d(z, { className: "flex flex-col items-center justify-center px-6 py-12 text-center", children: [
|
|
245
247
|
/* @__PURE__ */ e("div", { className: "relative mb-4", children: /* @__PURE__ */ e(
|
|
246
|
-
|
|
248
|
+
n,
|
|
247
249
|
{
|
|
248
250
|
"aria-hidden": "true",
|
|
249
251
|
className: "size-16 text-muted-foreground/40"
|
|
250
252
|
}
|
|
251
253
|
) }),
|
|
252
|
-
/* @__PURE__ */ e("h3", { className: "mb-2 text-lg font-semibold text-foreground", children:
|
|
253
|
-
/* @__PURE__ */ e("p", { className: "max-w-md text-sm leading-relaxed text-muted-foreground", children:
|
|
254
|
-
|
|
254
|
+
/* @__PURE__ */ e("h3", { className: "mb-2 text-lg font-semibold text-foreground", children: t }),
|
|
255
|
+
/* @__PURE__ */ e("p", { className: "max-w-md text-sm leading-relaxed text-muted-foreground", children: r }),
|
|
256
|
+
s && /* @__PURE__ */ e("div", { className: "mt-6 rounded-lg border border-dashed border-muted-foreground/20 bg-muted/50 px-4 py-2", children: /* @__PURE__ */ e("p", { className: "text-xs text-muted-foreground", children: s }) })
|
|
255
257
|
] }) });
|
|
256
258
|
}
|
|
257
|
-
function
|
|
258
|
-
actions:
|
|
259
|
-
icon:
|
|
259
|
+
function Oe({
|
|
260
|
+
actions: n,
|
|
261
|
+
icon: t = oe
|
|
260
262
|
}) {
|
|
261
|
-
const [
|
|
262
|
-
return
|
|
263
|
-
if (!
|
|
264
|
-
const
|
|
265
|
-
|
|
266
|
-
},
|
|
267
|
-
|
|
263
|
+
const [r, s] = F(!1), i = A(null);
|
|
264
|
+
return R(() => {
|
|
265
|
+
if (!r) return;
|
|
266
|
+
const a = (l) => {
|
|
267
|
+
i.current?.contains(l.target) || s(!1);
|
|
268
|
+
}, o = (l) => {
|
|
269
|
+
l.key === "Escape" && s(!1);
|
|
268
270
|
};
|
|
269
|
-
return document.addEventListener("mousedown",
|
|
270
|
-
document.removeEventListener("mousedown",
|
|
271
|
+
return document.addEventListener("mousedown", a), document.addEventListener("keydown", o), () => {
|
|
272
|
+
document.removeEventListener("mousedown", a), document.removeEventListener("keydown", o);
|
|
271
273
|
};
|
|
272
|
-
}, [
|
|
274
|
+
}, [r]), /* @__PURE__ */ e(V, { children: /* @__PURE__ */ d(
|
|
273
275
|
"div",
|
|
274
276
|
{
|
|
275
|
-
ref:
|
|
277
|
+
ref: i,
|
|
276
278
|
className: "fixed bottom-6 right-6 z-50 flex flex-col items-end gap-3",
|
|
277
279
|
children: [
|
|
278
|
-
/* @__PURE__ */ e("div", { className: "flex flex-col items-end gap-3", children:
|
|
280
|
+
/* @__PURE__ */ e("div", { className: "flex flex-col items-end gap-3", children: n.map((a, o) => /* @__PURE__ */ e(
|
|
279
281
|
"div",
|
|
280
282
|
{
|
|
281
283
|
className: c(
|
|
282
284
|
"transition-all duration-200 ease-out",
|
|
283
|
-
|
|
285
|
+
r ? "translate-y-0 opacity-100" : "pointer-events-none translate-y-2 opacity-0"
|
|
284
286
|
),
|
|
285
|
-
style: { transitionDelay:
|
|
286
|
-
children: /* @__PURE__ */
|
|
287
|
-
/* @__PURE__ */ e(
|
|
288
|
-
|
|
287
|
+
style: { transitionDelay: r ? `${o * 30}ms` : "0ms" },
|
|
288
|
+
children: /* @__PURE__ */ d(G, { children: [
|
|
289
|
+
/* @__PURE__ */ e(Y, { asChild: !0, children: /* @__PURE__ */ e(
|
|
290
|
+
k,
|
|
289
291
|
{
|
|
290
292
|
size: "icon",
|
|
291
293
|
variant: "outline",
|
|
292
|
-
disabled:
|
|
293
|
-
"aria-disabled":
|
|
294
|
+
disabled: a.disabled,
|
|
295
|
+
"aria-disabled": a.disabled,
|
|
294
296
|
className: c(
|
|
295
297
|
"size-11 rounded-full shadow-md",
|
|
296
|
-
|
|
298
|
+
a.disabled && "opacity-50"
|
|
297
299
|
),
|
|
298
300
|
onClick: () => {
|
|
299
|
-
|
|
301
|
+
a.disabled || (a.onClick(), s(!1));
|
|
300
302
|
},
|
|
301
|
-
children: /* @__PURE__ */ e(
|
|
303
|
+
children: /* @__PURE__ */ e(a.icon, { className: "size-5" })
|
|
302
304
|
}
|
|
303
305
|
) }),
|
|
304
|
-
/* @__PURE__ */ e(
|
|
306
|
+
/* @__PURE__ */ e(Z, { side: "left", children: a.label })
|
|
305
307
|
] })
|
|
306
308
|
},
|
|
307
|
-
|
|
309
|
+
a.label
|
|
308
310
|
)) }),
|
|
309
311
|
/* @__PURE__ */ e(
|
|
310
|
-
|
|
312
|
+
k,
|
|
311
313
|
{
|
|
312
314
|
size: "icon",
|
|
313
315
|
variant: "outline",
|
|
314
316
|
className: "size-11 rounded-full shadow-md",
|
|
315
|
-
"aria-label":
|
|
316
|
-
"aria-expanded":
|
|
317
|
-
onClick: () =>
|
|
318
|
-
children:
|
|
317
|
+
"aria-label": r ? "Fechar menu de ajuda" : "Abrir menu de ajuda",
|
|
318
|
+
"aria-expanded": r,
|
|
319
|
+
onClick: () => s((a) => !a),
|
|
320
|
+
children: r ? /* @__PURE__ */ e(H, { className: "size-5" }) : /* @__PURE__ */ e(t, { className: "size-5" })
|
|
319
321
|
}
|
|
320
322
|
)
|
|
321
323
|
]
|
|
322
324
|
}
|
|
323
325
|
) });
|
|
324
326
|
}
|
|
325
|
-
function
|
|
326
|
-
columns:
|
|
327
|
-
rows:
|
|
328
|
-
hasActions:
|
|
329
|
-
actionsCount:
|
|
327
|
+
function Pe({
|
|
328
|
+
columns: n = 9,
|
|
329
|
+
rows: t = 20,
|
|
330
|
+
hasActions: r = !1,
|
|
331
|
+
actionsCount: s = 1
|
|
330
332
|
}) {
|
|
331
|
-
return /* @__PURE__ */
|
|
332
|
-
/* @__PURE__ */ e(
|
|
333
|
-
const
|
|
333
|
+
return /* @__PURE__ */ d(L, { children: [
|
|
334
|
+
/* @__PURE__ */ e(D, { children: /* @__PURE__ */ e(v, { children: Array.from({ length: n }).map((i, a) => {
|
|
335
|
+
const o = r && a === n - 1;
|
|
334
336
|
return /* @__PURE__ */ e(
|
|
335
|
-
|
|
337
|
+
$,
|
|
336
338
|
{
|
|
337
|
-
className:
|
|
339
|
+
className: o ? "w-0 text-right" : "",
|
|
338
340
|
children: /* @__PURE__ */ e(
|
|
339
|
-
|
|
341
|
+
w,
|
|
340
342
|
{
|
|
341
|
-
className:
|
|
343
|
+
className: o ? "ml-auto h-4 w-8" : "h-4 w-[60%]"
|
|
342
344
|
}
|
|
343
345
|
)
|
|
344
346
|
},
|
|
345
|
-
|
|
347
|
+
a
|
|
346
348
|
);
|
|
347
349
|
}) }) }),
|
|
348
|
-
/* @__PURE__ */ e(
|
|
349
|
-
const
|
|
350
|
-
return /* @__PURE__ */ e(
|
|
351
|
-
}) },
|
|
350
|
+
/* @__PURE__ */ e(j, { children: Array.from({ length: t }).map((i, a) => /* @__PURE__ */ e(v, { className: "h-[3.05rem]", children: Array.from({ length: n }).map((o, l) => {
|
|
351
|
+
const x = r && l === n - 1;
|
|
352
|
+
return /* @__PURE__ */ e(B, { children: x ? /* @__PURE__ */ e("div", { className: "flex gap-2", children: Array.from({ length: s }).map((f, m) => /* @__PURE__ */ e(w, { className: "ml-auto size-8" }, m)) }) : /* @__PURE__ */ e(w, { className: "h-4 w-full" }) }, l);
|
|
353
|
+
}) }, a)) })
|
|
352
354
|
] });
|
|
353
355
|
}
|
|
354
|
-
|
|
355
|
-
|
|
356
|
-
|
|
357
|
-
|
|
356
|
+
const we = "@[__display__](__id__)", E = /@\[([^\]]+)\]\(([^)]+)\)/g;
|
|
357
|
+
function ke(n) {
|
|
358
|
+
const t = [], r = new RegExp(E);
|
|
359
|
+
let s;
|
|
360
|
+
for (; (s = r.exec(n)) !== null; )
|
|
361
|
+
t.push({ display: s[1], id: s[2] });
|
|
362
|
+
return t;
|
|
363
|
+
}
|
|
364
|
+
function qe(n) {
|
|
365
|
+
return ke(n).map((t) => ({
|
|
366
|
+
userId: t.id,
|
|
367
|
+
username: t.display
|
|
368
|
+
}));
|
|
369
|
+
}
|
|
370
|
+
const ve = async ({
|
|
371
|
+
organizationId: n,
|
|
372
|
+
search: t,
|
|
373
|
+
environment: r
|
|
374
|
+
}) => (await W(r).get(`/organizations/${n}/users`, {
|
|
375
|
+
params: { q: t }
|
|
376
|
+
})).data;
|
|
377
|
+
function Ne(n, t) {
|
|
378
|
+
const { environments: r } = ne();
|
|
379
|
+
return P({
|
|
380
|
+
queryKey: ["organization-users", n, t],
|
|
381
|
+
queryFn: () => ve({
|
|
382
|
+
organizationId: n,
|
|
383
|
+
search: t,
|
|
384
|
+
environment: r.VITE_BACKEND_API_ORGANIZATION_URL ?? ""
|
|
385
|
+
}),
|
|
386
|
+
enabled: n.length > 0 && t.length > 0
|
|
387
|
+
});
|
|
388
|
+
}
|
|
389
|
+
const Ce = {
|
|
390
|
+
control: {
|
|
391
|
+
fontSize: 14,
|
|
392
|
+
fontWeight: "normal"
|
|
393
|
+
},
|
|
394
|
+
"&multiLine": {
|
|
395
|
+
control: {
|
|
396
|
+
minHeight: 88
|
|
397
|
+
},
|
|
398
|
+
highlighter: {
|
|
399
|
+
padding: "8px 12px",
|
|
400
|
+
border: "1px solid transparent"
|
|
401
|
+
},
|
|
402
|
+
input: {
|
|
403
|
+
padding: "8px 12px",
|
|
404
|
+
border: "1px solid var(--border, #d4d4d8)",
|
|
405
|
+
borderRadius: 6,
|
|
406
|
+
outline: "none",
|
|
407
|
+
backgroundColor: "transparent"
|
|
408
|
+
}
|
|
409
|
+
},
|
|
410
|
+
"&singleLine": {
|
|
411
|
+
display: "inline-block",
|
|
412
|
+
width: "100%",
|
|
413
|
+
highlighter: {
|
|
414
|
+
padding: "8px 12px",
|
|
415
|
+
border: "1px solid transparent"
|
|
416
|
+
},
|
|
417
|
+
input: {
|
|
418
|
+
padding: "8px 12px",
|
|
419
|
+
border: "1px solid var(--border, #d4d4d8)",
|
|
420
|
+
borderRadius: 6,
|
|
421
|
+
outline: "none",
|
|
422
|
+
backgroundColor: "transparent"
|
|
423
|
+
}
|
|
424
|
+
},
|
|
425
|
+
suggestions: {
|
|
426
|
+
list: {
|
|
427
|
+
backgroundColor: "var(--popover, #fff)",
|
|
428
|
+
border: "1px solid var(--border, #d4d4d8)",
|
|
429
|
+
borderRadius: 6,
|
|
430
|
+
fontSize: 14,
|
|
431
|
+
boxShadow: "0 4px 12px rgba(0, 0, 0, 0.12)",
|
|
432
|
+
overflow: "hidden"
|
|
433
|
+
},
|
|
434
|
+
item: {
|
|
435
|
+
padding: "6px 12px",
|
|
436
|
+
"&focused": {
|
|
437
|
+
backgroundColor: "var(--accent, #f4f4f5)"
|
|
438
|
+
}
|
|
439
|
+
}
|
|
440
|
+
}
|
|
441
|
+
}, Se = {
|
|
442
|
+
backgroundColor: "var(--accent, #dbeafe)",
|
|
443
|
+
color: "var(--accent-foreground, #1d4ed8)",
|
|
444
|
+
fontWeight: 600,
|
|
445
|
+
borderRadius: 4,
|
|
446
|
+
padding: "1px 2px"
|
|
447
|
+
};
|
|
448
|
+
function Ue({
|
|
449
|
+
value: n,
|
|
450
|
+
onChange: t,
|
|
451
|
+
onBlur: r,
|
|
452
|
+
organizationId: s,
|
|
453
|
+
placeholder: i,
|
|
454
|
+
disabled: a,
|
|
455
|
+
singleLine: o = !1
|
|
456
|
+
}) {
|
|
457
|
+
const [l, x] = F(""), f = ae(l, 200), { data: m } = Ne(s, f), y = A(void 0), p = U(
|
|
458
|
+
() => m?.map((u) => ({ id: u._id, display: u.username })) ?? [],
|
|
459
|
+
[m]
|
|
460
|
+
);
|
|
461
|
+
return R(() => {
|
|
462
|
+
y.current?.(p);
|
|
463
|
+
}, [p]), /* @__PURE__ */ e(
|
|
464
|
+
X,
|
|
465
|
+
{
|
|
466
|
+
value: n,
|
|
467
|
+
onChange: (u, g) => t(g),
|
|
468
|
+
onBlur: r,
|
|
469
|
+
placeholder: i,
|
|
470
|
+
disabled: a,
|
|
471
|
+
singleLine: o,
|
|
472
|
+
allowSuggestionsAboveCursor: !0,
|
|
473
|
+
style: Ce,
|
|
474
|
+
children: /* @__PURE__ */ e(
|
|
475
|
+
Q,
|
|
476
|
+
{
|
|
477
|
+
trigger: "@",
|
|
478
|
+
markup: we,
|
|
479
|
+
data: (u, g) => {
|
|
480
|
+
y.current = g, x(u), g(p);
|
|
481
|
+
},
|
|
482
|
+
displayTransform: (u, g) => `@${g}`,
|
|
483
|
+
appendSpaceOnAdd: !0,
|
|
484
|
+
style: Se
|
|
485
|
+
}
|
|
486
|
+
)
|
|
487
|
+
}
|
|
488
|
+
);
|
|
489
|
+
}
|
|
490
|
+
function Ke({ text: n, className: t }) {
|
|
491
|
+
const r = new RegExp(E), s = [];
|
|
492
|
+
let i = 0, a, o = 0;
|
|
493
|
+
for (; (a = r.exec(n)) !== null; )
|
|
494
|
+
a.index > i && s.push(
|
|
495
|
+
/* @__PURE__ */ e("span", { children: n.slice(i, a.index) }, o++)
|
|
496
|
+
), s.push(
|
|
497
|
+
/* @__PURE__ */ d(J, { variant: "secondary", className: t, children: [
|
|
498
|
+
"@",
|
|
499
|
+
a[1]
|
|
500
|
+
] }, o++)
|
|
501
|
+
), i = a.index + a[0].length;
|
|
502
|
+
return i < n.length && s.push(/* @__PURE__ */ e("span", { children: n.slice(i) }, o++)), /* @__PURE__ */ e(T, { children: s });
|
|
503
|
+
}
|
|
504
|
+
function We({
|
|
505
|
+
size: n = 24,
|
|
506
|
+
color: t = "currentColor",
|
|
507
|
+
...r
|
|
358
508
|
}) {
|
|
359
509
|
return /* @__PURE__ */ e(
|
|
360
510
|
"svg",
|
|
361
511
|
{
|
|
362
512
|
xmlns: "http://www.w3.org/2000/svg",
|
|
363
|
-
width:
|
|
364
|
-
height:
|
|
513
|
+
width: n,
|
|
514
|
+
height: n,
|
|
365
515
|
viewBox: "0 0 24 24",
|
|
366
516
|
fill: "none",
|
|
367
|
-
stroke:
|
|
517
|
+
stroke: t,
|
|
368
518
|
"stroke-width": "2",
|
|
369
519
|
"stroke-linecap": "round",
|
|
370
520
|
"stroke-linejoin": "round",
|
|
371
521
|
className: "lucide lucide-twitter-icon lucide-twitter",
|
|
372
|
-
...
|
|
522
|
+
...r,
|
|
373
523
|
children: /* @__PURE__ */ e("path", { d: "M22 4s-.7 2.1-2 3.4c1.6 10-9.4 17.3-18 11.6 2.2.1 4.4-.6 6-2C3 15.5.5 9.6 3 5c2.2 2.6 5.6 4.1 9 4-.9-4.2 4-6.6 7-3.8 1.1 0 3-1.2 3-1.2z" })
|
|
374
524
|
}
|
|
375
525
|
);
|
|
376
526
|
}
|
|
377
527
|
export {
|
|
378
|
-
|
|
379
|
-
|
|
380
|
-
|
|
381
|
-
|
|
382
|
-
|
|
383
|
-
|
|
384
|
-
|
|
385
|
-
|
|
386
|
-
|
|
387
|
-
|
|
388
|
-
|
|
389
|
-
|
|
390
|
-
|
|
391
|
-
|
|
392
|
-
|
|
393
|
-
|
|
394
|
-
|
|
395
|
-
|
|
396
|
-
|
|
397
|
-
|
|
398
|
-
|
|
399
|
-
|
|
400
|
-
|
|
401
|
-
|
|
402
|
-
|
|
403
|
-
|
|
404
|
-
|
|
405
|
-
|
|
406
|
-
|
|
407
|
-
|
|
408
|
-
|
|
409
|
-
|
|
410
|
-
|
|
411
|
-
|
|
412
|
-
|
|
413
|
-
|
|
414
|
-
|
|
528
|
+
He as AsyncBoundary,
|
|
529
|
+
Ve as CampaignsSelectInput,
|
|
530
|
+
Ge as ClientSelectInput,
|
|
531
|
+
pe as ErrorCard,
|
|
532
|
+
Ye as FieldCalendar,
|
|
533
|
+
Ze as FieldCheckbox,
|
|
534
|
+
Je as FieldClientSelectInput,
|
|
535
|
+
et as FieldInput,
|
|
536
|
+
tt as FieldLabelWithAsterisk,
|
|
537
|
+
nt as FieldProfileSelectInput,
|
|
538
|
+
at as FieldSaleSelectInput,
|
|
539
|
+
rt as FieldSelect,
|
|
540
|
+
st as FieldSwitch,
|
|
541
|
+
it as FieldTextarea,
|
|
542
|
+
Le as HoverContent,
|
|
543
|
+
De as IconBadge,
|
|
544
|
+
ot as Image,
|
|
545
|
+
lt as InfluencerSelectInput,
|
|
546
|
+
dt as InstagramIcon,
|
|
547
|
+
ct as LinkedInIcon,
|
|
548
|
+
$e as List,
|
|
549
|
+
je as ListRow,
|
|
550
|
+
Ue as MentionInput,
|
|
551
|
+
Ke as MentionText,
|
|
552
|
+
Be as NotFoundCard,
|
|
553
|
+
gt as PageHeader,
|
|
554
|
+
ut as PageHeaderActions,
|
|
555
|
+
xt as PageHeaderContent,
|
|
556
|
+
bt as PageHeaderDescription,
|
|
557
|
+
mt as PageHeaderTitle,
|
|
558
|
+
pt as PinterestIcon,
|
|
559
|
+
ht as ProfileSelectInput,
|
|
560
|
+
ft as SaleSelectInput,
|
|
561
|
+
Oe as SpeedDialButton,
|
|
562
|
+
Pe as TableSkeleton,
|
|
563
|
+
yt as TikTokIcon,
|
|
564
|
+
We as TwitterIcon,
|
|
565
|
+
wt as XIcon,
|
|
566
|
+
kt as YoutubeIcon,
|
|
567
|
+
qe as getMentionedUsers,
|
|
568
|
+
ke as parseMentions
|
|
415
569
|
};
|