@grapadigital/shared-app-modules 0.0.182 → 0.0.183
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/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 +27 -0
- package/dist/components.js +335 -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 p, 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 N, _ 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 K } from "react";
|
|
5
|
+
import { n as U, o as X, M as Q, p as V } from "./chuncks/youtube-icon.component.Dasmq5T5.js";
|
|
6
|
+
import { w as Ve, x as Ge, E as We, Q as Ye, G as Ze, H as Je, F as et, J as tt, K as nt, L as at, N as rt, O as st, v as it, y as lt, R as ot, U as dt, q as ct, r as gt, s as ut, t as xt, u as mt, V as bt, z as ht, D as pt, W as ft, X as yt, Y as wt } from "./chuncks/youtube-icon.component.Dasmq5T5.js";
|
|
7
|
+
import { S as w, c as G, T as W, a as Y, b as Z, B as J } from "./chuncks/badge.Cur4Mrd7.js";
|
|
8
|
+
import { parseISO as v, 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 = p("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
|
+
], le = p("circle-question-mark", ie);
|
|
21
|
+
const oe = [
|
|
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 = p("copy", oe);
|
|
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 = p("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 = p("refresh-cw", ue);
|
|
44
|
+
const me = [
|
|
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
|
+
], be = p("triangle-alert", me);
|
|
55
|
+
function he({
|
|
56
|
+
icon: a = be,
|
|
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: n,
|
|
62
|
+
...l
|
|
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(n), ...l, 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(a, { "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 Ee({
|
|
76
|
+
suspenseFallback: a = pe,
|
|
77
|
+
errorFallback: t = he,
|
|
78
|
+
children: r
|
|
77
79
|
}) {
|
|
78
|
-
return /* @__PURE__ */ e(
|
|
79
|
-
|
|
80
|
+
return /* @__PURE__ */ e(q, { fallback: /* @__PURE__ */ e(a, {}), children: /* @__PURE__ */ e(O, { children: ({ reset: s }) => /* @__PURE__ */ e(
|
|
81
|
+
U,
|
|
80
82
|
{
|
|
81
|
-
onReset:
|
|
82
|
-
fallbackRender: ({ resetErrorBoundary:
|
|
83
|
-
children:
|
|
83
|
+
onReset: s,
|
|
84
|
+
fallbackRender: ({ resetErrorBoundary: i, error: n }) => /* @__PURE__ */ e(t, { error: n, onRetry: i }),
|
|
85
|
+
children: r
|
|
84
86
|
}
|
|
85
87
|
) }) });
|
|
86
88
|
}
|
|
87
|
-
function
|
|
88
|
-
return /* @__PURE__ */ e(
|
|
89
|
+
function pe() {
|
|
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 He({
|
|
93
|
+
content: a,
|
|
94
|
+
align: t,
|
|
95
|
+
asChild: r,
|
|
96
|
+
className: s,
|
|
97
|
+
openDelay: i = 0,
|
|
98
|
+
closeDelay: n = 0,
|
|
99
|
+
children: l,
|
|
100
|
+
disabled: o = !1,
|
|
101
|
+
...x
|
|
100
102
|
}) {
|
|
101
|
-
return /* @__PURE__ */ e(
|
|
102
|
-
/* @__PURE__ */ e(
|
|
103
|
-
/* @__PURE__ */ e(
|
|
103
|
+
return /* @__PURE__ */ e(T, { children: o === !0 ? l : /* @__PURE__ */ d(_, { openDelay: i, closeDelay: n, ...x, children: [
|
|
104
|
+
/* @__PURE__ */ e(M, { asChild: r, children: l }),
|
|
105
|
+
/* @__PURE__ */ e(I, { align: t, className: s, children: a })
|
|
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,387 @@ 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 Le({
|
|
163
|
+
size: a,
|
|
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 n = i ? ye[t] : fe[t], l = a ? C[a] : C.md;
|
|
170
|
+
return /* @__PURE__ */ e("div", { className: c("w-fit p-2 rounded-lg", n?.bg, r), children: /* @__PURE__ */ e(s, { className: c(l, n?.text) }) });
|
|
169
171
|
}
|
|
170
|
-
function
|
|
171
|
-
return /* @__PURE__ */ e("div", { className: c("divide-y",
|
|
172
|
+
function De({ className: a, ...t }) {
|
|
173
|
+
return /* @__PURE__ */ e("div", { className: c("divide-y", a), ...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 $e({
|
|
176
|
+
label: a,
|
|
177
|
+
value: t,
|
|
178
|
+
tooltip: r,
|
|
179
|
+
highlight: s = !1,
|
|
180
|
+
negative: i = !1,
|
|
181
|
+
positive: n = !1,
|
|
182
|
+
isPercentage: l = !1,
|
|
183
|
+
isDate: o = !1,
|
|
184
|
+
isText: x = !1,
|
|
185
|
+
isInvoiced: f = !1,
|
|
186
|
+
hasCopyButton: b = !1,
|
|
187
|
+
enableHoverableContent: y = !1,
|
|
188
|
+
handleCopy: h
|
|
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 m = "";
|
|
191
|
+
if (o && typeof t == "string" && !f && s) {
|
|
192
|
+
const u = v(t), g = ee(u, /* @__PURE__ */ new Date());
|
|
193
|
+
g > 15 ? m = "bg-yellow-100 font-bold" : g > 7 ? m = "bg-yellow-300 font-bold" : g >= 0 ? m = "bg-red-300 font-bold" : m = "bg-red-500 text-white font-bold";
|
|
194
|
+
} else s && (m = "bg-[#ffe0b2] font-bold");
|
|
195
|
+
return /* @__PURE__ */ e("div", { className: c("px-2 py-1 text-sm", m), 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" : n ? "text-green-600" : ""
|
|
201
203
|
),
|
|
202
204
|
children: [
|
|
203
|
-
|
|
205
|
+
a,
|
|
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" : n ? "text-green-600" : ""
|
|
215
217
|
),
|
|
216
218
|
children: [
|
|
217
|
-
|
|
218
|
-
|
|
219
|
+
l && typeof t == "number" ? `${t.toFixed(2)}%` : o && typeof t == "string" ? te(v(t), "dd/MM/yyyy") : x && typeof t == "string" ? t : `R$ ${t.toLocaleString("pt-BR", { minimumFractionDigits: 2, maximumFractionDigits: 2 })}`,
|
|
220
|
+
b && h && /* @__PURE__ */ e(de, { size: 15, onClick: () => h(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: a }),
|
|
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 je({
|
|
239
|
+
icon: a = ge,
|
|
240
|
+
title: t,
|
|
241
|
+
description: r,
|
|
242
|
+
tip: s,
|
|
243
|
+
className: i,
|
|
244
|
+
...n
|
|
243
245
|
}) {
|
|
244
|
-
return /* @__PURE__ */ e(
|
|
246
|
+
return /* @__PURE__ */ e(S, { className: c(i), ...n, 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
|
+
a,
|
|
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 Be({
|
|
260
|
+
actions: a,
|
|
261
|
+
icon: t = le
|
|
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 n = (o) => {
|
|
267
|
+
i.current?.contains(o.target) || s(!1);
|
|
268
|
+
}, l = (o) => {
|
|
269
|
+
o.key === "Escape" && s(!1);
|
|
268
270
|
};
|
|
269
|
-
return document.addEventListener("mousedown",
|
|
270
|
-
document.removeEventListener("mousedown",
|
|
271
|
+
return document.addEventListener("mousedown", n), document.addEventListener("keydown", l), () => {
|
|
272
|
+
document.removeEventListener("mousedown", n), document.removeEventListener("keydown", l);
|
|
271
273
|
};
|
|
272
|
-
}, [
|
|
274
|
+
}, [r]), /* @__PURE__ */ e(G, { 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: a.map((n, l) => /* @__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 ? `${l * 30}ms` : "0ms" },
|
|
288
|
+
children: /* @__PURE__ */ d(W, { 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: n.disabled,
|
|
295
|
+
"aria-disabled": n.disabled,
|
|
294
296
|
className: c(
|
|
295
297
|
"size-11 rounded-full shadow-md",
|
|
296
|
-
|
|
298
|
+
n.disabled && "opacity-50"
|
|
297
299
|
),
|
|
298
300
|
onClick: () => {
|
|
299
|
-
|
|
301
|
+
n.disabled || (n.onClick(), s(!1));
|
|
300
302
|
},
|
|
301
|
-
children: /* @__PURE__ */ e(
|
|
303
|
+
children: /* @__PURE__ */ e(n.icon, { className: "size-5" })
|
|
302
304
|
}
|
|
303
305
|
) }),
|
|
304
|
-
/* @__PURE__ */ e(
|
|
306
|
+
/* @__PURE__ */ e(Z, { side: "left", children: n.label })
|
|
305
307
|
] })
|
|
306
308
|
},
|
|
307
|
-
|
|
309
|
+
n.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((n) => !n),
|
|
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 Oe({
|
|
328
|
+
columns: a = 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(N, { children: Array.from({ length: a }).map((i, n) => {
|
|
335
|
+
const l = r && n === a - 1;
|
|
334
336
|
return /* @__PURE__ */ e(
|
|
335
|
-
|
|
337
|
+
$,
|
|
336
338
|
{
|
|
337
|
-
className:
|
|
339
|
+
className: l ? "w-0 text-right" : "",
|
|
338
340
|
children: /* @__PURE__ */ e(
|
|
339
|
-
|
|
341
|
+
w,
|
|
340
342
|
{
|
|
341
|
-
className:
|
|
343
|
+
className: l ? "ml-auto h-4 w-8" : "h-4 w-[60%]"
|
|
342
344
|
}
|
|
343
345
|
)
|
|
344
346
|
},
|
|
345
|
-
|
|
347
|
+
n
|
|
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, n) => /* @__PURE__ */ e(N, { className: "h-[3.05rem]", children: Array.from({ length: a }).map((l, o) => {
|
|
351
|
+
const x = r && o === a - 1;
|
|
352
|
+
return /* @__PURE__ */ e(B, { children: x ? /* @__PURE__ */ e("div", { className: "flex gap-2", children: Array.from({ length: s }).map((f, b) => /* @__PURE__ */ e(w, { className: "ml-auto size-8" }, b)) }) : /* @__PURE__ */ e(w, { className: "h-4 w-full" }) }, o);
|
|
353
|
+
}) }, n)) })
|
|
352
354
|
] });
|
|
353
355
|
}
|
|
354
|
-
|
|
355
|
-
|
|
356
|
-
|
|
357
|
-
|
|
356
|
+
const we = "@[__display__](__id__)", E = /@\[([^\]]+)\]\(([^)]+)\)/g;
|
|
357
|
+
function Pe(a) {
|
|
358
|
+
const t = [], r = new RegExp(E);
|
|
359
|
+
let s;
|
|
360
|
+
for (; (s = r.exec(a)) !== null; )
|
|
361
|
+
t.push({ display: s[1], id: s[2] });
|
|
362
|
+
return t;
|
|
363
|
+
}
|
|
364
|
+
const ke = async ({
|
|
365
|
+
organizationId: a,
|
|
366
|
+
search: t,
|
|
367
|
+
environment: r
|
|
368
|
+
}) => (await X(r).get(`/organizations/${a}/users`, {
|
|
369
|
+
params: { q: t }
|
|
370
|
+
})).data;
|
|
371
|
+
function Ne(a, t) {
|
|
372
|
+
const { environments: r } = ne();
|
|
373
|
+
return P({
|
|
374
|
+
queryKey: ["organization-users", a, t],
|
|
375
|
+
queryFn: () => ke({
|
|
376
|
+
organizationId: a,
|
|
377
|
+
search: t,
|
|
378
|
+
environment: r.VITE_BACKEND_API_ORGANIZATION_URL ?? ""
|
|
379
|
+
}),
|
|
380
|
+
enabled: a.length > 0 && t.length > 0
|
|
381
|
+
});
|
|
382
|
+
}
|
|
383
|
+
const ve = {
|
|
384
|
+
control: {
|
|
385
|
+
fontSize: 14,
|
|
386
|
+
minHeight: 36
|
|
387
|
+
},
|
|
388
|
+
input: {
|
|
389
|
+
padding: "8px 12px",
|
|
390
|
+
border: "1px solid var(--border, #d4d4d8)",
|
|
391
|
+
borderRadius: 6,
|
|
392
|
+
outline: "none"
|
|
393
|
+
},
|
|
394
|
+
highlighter: {
|
|
395
|
+
padding: "8px 12px",
|
|
396
|
+
border: "1px solid transparent"
|
|
397
|
+
},
|
|
398
|
+
suggestions: {
|
|
399
|
+
list: {
|
|
400
|
+
backgroundColor: "var(--popover, #fff)",
|
|
401
|
+
border: "1px solid var(--border, #d4d4d8)",
|
|
402
|
+
borderRadius: 6,
|
|
403
|
+
fontSize: 14,
|
|
404
|
+
boxShadow: "0 4px 12px rgba(0, 0, 0, 0.12)",
|
|
405
|
+
overflow: "hidden"
|
|
406
|
+
},
|
|
407
|
+
item: {
|
|
408
|
+
padding: "6px 12px",
|
|
409
|
+
"&focused": {
|
|
410
|
+
backgroundColor: "var(--accent, #f4f4f5)"
|
|
411
|
+
}
|
|
412
|
+
}
|
|
413
|
+
}
|
|
414
|
+
}, Ce = {
|
|
415
|
+
backgroundColor: "var(--accent, #e4e4e7)",
|
|
416
|
+
borderRadius: 4
|
|
417
|
+
};
|
|
418
|
+
function qe({
|
|
419
|
+
value: a,
|
|
420
|
+
onChange: t,
|
|
421
|
+
onBlur: r,
|
|
422
|
+
organizationId: s,
|
|
423
|
+
placeholder: i,
|
|
424
|
+
disabled: n,
|
|
425
|
+
singleLine: l = !0
|
|
426
|
+
}) {
|
|
427
|
+
const [o, x] = F(""), f = ae(o, 200), { data: b } = Ne(s, f), y = A(void 0), h = K(
|
|
428
|
+
() => b?.map((u) => ({ id: u._id, display: u.username })) ?? [],
|
|
429
|
+
[b]
|
|
430
|
+
);
|
|
431
|
+
return R(() => {
|
|
432
|
+
y.current?.(h);
|
|
433
|
+
}, [h]), /* @__PURE__ */ e(
|
|
434
|
+
Q,
|
|
435
|
+
{
|
|
436
|
+
value: a,
|
|
437
|
+
onChange: (u, g) => t(g),
|
|
438
|
+
onBlur: r,
|
|
439
|
+
placeholder: i,
|
|
440
|
+
disabled: n,
|
|
441
|
+
singleLine: l,
|
|
442
|
+
allowSuggestionsAboveCursor: !0,
|
|
443
|
+
style: ve,
|
|
444
|
+
children: /* @__PURE__ */ e(
|
|
445
|
+
V,
|
|
446
|
+
{
|
|
447
|
+
trigger: "@",
|
|
448
|
+
markup: we,
|
|
449
|
+
data: (u, g) => {
|
|
450
|
+
y.current = g, x(u), g(h);
|
|
451
|
+
},
|
|
452
|
+
displayTransform: (u, g) => `@${g}`,
|
|
453
|
+
appendSpaceOnAdd: !0,
|
|
454
|
+
style: Ce
|
|
455
|
+
}
|
|
456
|
+
)
|
|
457
|
+
}
|
|
458
|
+
);
|
|
459
|
+
}
|
|
460
|
+
function Ke({ text: a, className: t }) {
|
|
461
|
+
const r = new RegExp(E), s = [];
|
|
462
|
+
let i = 0, n, l = 0;
|
|
463
|
+
for (; (n = r.exec(a)) !== null; )
|
|
464
|
+
n.index > i && s.push(
|
|
465
|
+
/* @__PURE__ */ e("span", { children: a.slice(i, n.index) }, l++)
|
|
466
|
+
), s.push(
|
|
467
|
+
/* @__PURE__ */ d(J, { variant: "secondary", className: t, children: [
|
|
468
|
+
"@",
|
|
469
|
+
n[1]
|
|
470
|
+
] }, l++)
|
|
471
|
+
), i = n.index + n[0].length;
|
|
472
|
+
return i < a.length && s.push(/* @__PURE__ */ e("span", { children: a.slice(i) }, l++)), /* @__PURE__ */ e(T, { children: s });
|
|
473
|
+
}
|
|
474
|
+
function Ue({
|
|
475
|
+
size: a = 24,
|
|
476
|
+
color: t = "currentColor",
|
|
477
|
+
...r
|
|
358
478
|
}) {
|
|
359
479
|
return /* @__PURE__ */ e(
|
|
360
480
|
"svg",
|
|
361
481
|
{
|
|
362
482
|
xmlns: "http://www.w3.org/2000/svg",
|
|
363
|
-
width:
|
|
364
|
-
height:
|
|
483
|
+
width: a,
|
|
484
|
+
height: a,
|
|
365
485
|
viewBox: "0 0 24 24",
|
|
366
486
|
fill: "none",
|
|
367
|
-
stroke:
|
|
487
|
+
stroke: t,
|
|
368
488
|
"stroke-width": "2",
|
|
369
489
|
"stroke-linecap": "round",
|
|
370
490
|
"stroke-linejoin": "round",
|
|
371
491
|
className: "lucide lucide-twitter-icon lucide-twitter",
|
|
372
|
-
...
|
|
492
|
+
...r,
|
|
373
493
|
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
494
|
}
|
|
375
495
|
);
|
|
376
496
|
}
|
|
377
497
|
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
|
-
|
|
498
|
+
Ee as AsyncBoundary,
|
|
499
|
+
Ve as CampaignsSelectInput,
|
|
500
|
+
Ge as ClientSelectInput,
|
|
501
|
+
he as ErrorCard,
|
|
502
|
+
We as FieldCalendar,
|
|
503
|
+
Ye as FieldCheckbox,
|
|
504
|
+
Ze as FieldClientSelectInput,
|
|
505
|
+
Je as FieldInput,
|
|
506
|
+
et as FieldLabelWithAsterisk,
|
|
507
|
+
tt as FieldProfileSelectInput,
|
|
508
|
+
nt as FieldSaleSelectInput,
|
|
509
|
+
at as FieldSelect,
|
|
510
|
+
rt as FieldSwitch,
|
|
511
|
+
st as FieldTextarea,
|
|
512
|
+
He as HoverContent,
|
|
513
|
+
Le as IconBadge,
|
|
514
|
+
it as Image,
|
|
515
|
+
lt as InfluencerSelectInput,
|
|
516
|
+
ot as InstagramIcon,
|
|
517
|
+
dt as LinkedInIcon,
|
|
518
|
+
De as List,
|
|
519
|
+
$e as ListRow,
|
|
520
|
+
qe as MentionInput,
|
|
521
|
+
Ke as MentionText,
|
|
522
|
+
je as NotFoundCard,
|
|
523
|
+
ct as PageHeader,
|
|
524
|
+
gt as PageHeaderActions,
|
|
525
|
+
ut as PageHeaderContent,
|
|
526
|
+
xt as PageHeaderDescription,
|
|
527
|
+
mt as PageHeaderTitle,
|
|
528
|
+
bt as PinterestIcon,
|
|
529
|
+
ht as ProfileSelectInput,
|
|
530
|
+
pt as SaleSelectInput,
|
|
531
|
+
Be as SpeedDialButton,
|
|
532
|
+
Oe as TableSkeleton,
|
|
533
|
+
ft as TikTokIcon,
|
|
534
|
+
Ue as TwitterIcon,
|
|
535
|
+
yt as XIcon,
|
|
536
|
+
wt as YoutubeIcon,
|
|
537
|
+
Pe as parseMentions
|
|
415
538
|
};
|