@grapadigital/shared-app-modules 0.0.181 → 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/assets/switch.css +1 -1
- package/dist/chuncks/badge.Cur4Mrd7.js +416 -0
- package/dist/chuncks/{format.util.DDDOd55d.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 +40 -2
- package/dist/components.js +341 -198
- 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.d.ts +16 -1
- package/dist/utils.js +11 -10
- package/package.json +12 -9
- package/dist/chuncks/tooltip.BR6kaw4f.js +0 -378
- package/dist/chuncks/youtube-icon.component.DBqPyuqe.js +0 -2023
package/dist/components.js
CHANGED
|
@@ -1,24 +1,28 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import { useState as
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
|
|
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 = [
|
|
8
12
|
["circle", { cx: "12", cy: "12", r: "10", key: "1mglay" }],
|
|
9
13
|
["line", { x1: "12", x2: "12", y1: "8", y2: "12", key: "1pkeuh" }],
|
|
10
14
|
["line", { x1: "12", x2: "12.01", y1: "16", y2: "16", key: "4dfq90" }]
|
|
11
|
-
],
|
|
12
|
-
const
|
|
15
|
+
], se = p("circle-alert", re);
|
|
16
|
+
const ie = [
|
|
13
17
|
["circle", { cx: "12", cy: "12", r: "10", key: "1mglay" }],
|
|
14
18
|
["path", { d: "M9.09 9a3 3 0 0 1 5.83 1c0 2-3 3-3 3", key: "1u773s" }],
|
|
15
19
|
["path", { d: "M12 17h.01", key: "p32p05" }]
|
|
16
|
-
],
|
|
17
|
-
const
|
|
20
|
+
], le = p("circle-question-mark", ie);
|
|
21
|
+
const oe = [
|
|
18
22
|
["rect", { width: "14", height: "14", x: "8", y: "8", rx: "2", ry: "2", key: "17jyea" }],
|
|
19
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" }]
|
|
20
|
-
],
|
|
21
|
-
const
|
|
24
|
+
], de = p("copy", oe);
|
|
25
|
+
const ce = [
|
|
22
26
|
[
|
|
23
27
|
"path",
|
|
24
28
|
{
|
|
@@ -30,14 +34,14 @@ const U = [
|
|
|
30
34
|
["path", { d: "M10 9H8", key: "b1mrlr" }],
|
|
31
35
|
["path", { d: "M16 13H8", key: "t4e002" }],
|
|
32
36
|
["path", { d: "M16 17H8", key: "z1uh3a" }]
|
|
33
|
-
],
|
|
34
|
-
const
|
|
37
|
+
], ge = p("file-text", ce);
|
|
38
|
+
const ue = [
|
|
35
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" }],
|
|
36
40
|
["path", { d: "M21 3v5h-5", key: "1q7to0" }],
|
|
37
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" }],
|
|
38
42
|
["path", { d: "M8 16H3v5", key: "1cv678" }]
|
|
39
|
-
],
|
|
40
|
-
const
|
|
43
|
+
], xe = p("refresh-cw", ue);
|
|
44
|
+
const me = [
|
|
41
45
|
[
|
|
42
46
|
"path",
|
|
43
47
|
{
|
|
@@ -47,44 +51,61 @@ const ae = [
|
|
|
47
51
|
],
|
|
48
52
|
["path", { d: "M12 9v4", key: "juzpu7" }],
|
|
49
53
|
["path", { d: "M12 17h.01", key: "p32p05" }]
|
|
50
|
-
],
|
|
51
|
-
function
|
|
52
|
-
icon:
|
|
53
|
-
title:
|
|
54
|
-
description:
|
|
55
|
-
onRetry:
|
|
56
|
-
tip:
|
|
57
|
-
className:
|
|
58
|
-
...
|
|
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
|
|
59
63
|
}) {
|
|
60
|
-
return /* @__PURE__ */ e(
|
|
61
|
-
/* @__PURE__ */ e("div", { className: "relative mb-4", children: /* @__PURE__ */ e(
|
|
62
|
-
/* @__PURE__ */ e("h3", { className: "text-foreground mb-2 text-lg font-semibold", children:
|
|
63
|
-
/* @__PURE__ */ e("p", { className: "text-muted-foreground max-w-md text-sm leading-relaxed", children:
|
|
64
|
-
|
|
65
|
-
/* @__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, {}),
|
|
66
70
|
"Tentar novamente"
|
|
67
71
|
] }),
|
|
68
|
-
|
|
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 }) })
|
|
69
73
|
] }) });
|
|
70
74
|
}
|
|
71
|
-
function
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
75
|
+
function Ee({
|
|
76
|
+
suspenseFallback: a = pe,
|
|
77
|
+
errorFallback: t = he,
|
|
78
|
+
children: r
|
|
79
|
+
}) {
|
|
80
|
+
return /* @__PURE__ */ e(q, { fallback: /* @__PURE__ */ e(a, {}), children: /* @__PURE__ */ e(O, { children: ({ reset: s }) => /* @__PURE__ */ e(
|
|
81
|
+
U,
|
|
82
|
+
{
|
|
83
|
+
onReset: s,
|
|
84
|
+
fallbackRender: ({ resetErrorBoundary: i, error: n }) => /* @__PURE__ */ e(t, { error: n, onRetry: i }),
|
|
85
|
+
children: r
|
|
86
|
+
}
|
|
87
|
+
) }) });
|
|
88
|
+
}
|
|
89
|
+
function pe() {
|
|
90
|
+
return /* @__PURE__ */ e(w, { className: "h-[13.75625rem]" });
|
|
91
|
+
}
|
|
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
|
|
81
102
|
}) {
|
|
82
|
-
return /* @__PURE__ */ e(
|
|
83
|
-
/* @__PURE__ */ e(
|
|
84
|
-
/* @__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 })
|
|
85
106
|
] }) });
|
|
86
107
|
}
|
|
87
|
-
const
|
|
108
|
+
const fe = {
|
|
88
109
|
red: { bg: "bg-red-50", text: "text-red-600" },
|
|
89
110
|
orange: { bg: "bg-orange-50", text: "text-orange-600" },
|
|
90
111
|
amber: { bg: "bg-amber-50", text: "text-amber-600" },
|
|
@@ -107,7 +128,7 @@ const ne = {
|
|
|
107
128
|
zinc: { bg: "bg-zinc-200", text: "text-zinc-800" },
|
|
108
129
|
neutral: { bg: "bg-neutral-200", text: "text-neutral-800" },
|
|
109
130
|
stone: { bg: "bg-stone-200", text: "text-stone-800" }
|
|
110
|
-
},
|
|
131
|
+
}, ye = {
|
|
111
132
|
red: { bg: "bg-red-500", text: "text-white" },
|
|
112
133
|
orange: { bg: "bg-orange-500", text: "text-white" },
|
|
113
134
|
amber: { bg: "bg-amber-500", text: "text-white" },
|
|
@@ -131,265 +152,387 @@ const ne = {
|
|
|
131
152
|
neutral: { bg: "bg-neutral-500", text: "text-white" },
|
|
132
153
|
stone: { bg: "bg-stone-500", text: "text-white" },
|
|
133
154
|
black: { bg: "bg-black", text: "text-white" }
|
|
134
|
-
},
|
|
155
|
+
}, C = {
|
|
135
156
|
xs: "size-3",
|
|
136
157
|
sm: "size-4",
|
|
137
158
|
md: "size-5",
|
|
138
159
|
lg: "size-6",
|
|
139
160
|
xl: "size-7"
|
|
140
161
|
};
|
|
141
|
-
function
|
|
142
|
-
size:
|
|
143
|
-
color:
|
|
144
|
-
className:
|
|
145
|
-
icon:
|
|
146
|
-
filled:
|
|
162
|
+
function Le({
|
|
163
|
+
size: a,
|
|
164
|
+
color: t,
|
|
165
|
+
className: r,
|
|
166
|
+
icon: s,
|
|
167
|
+
filled: i
|
|
147
168
|
}) {
|
|
148
|
-
const
|
|
149
|
-
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) }) });
|
|
150
171
|
}
|
|
151
|
-
function
|
|
152
|
-
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 });
|
|
153
174
|
}
|
|
154
|
-
function
|
|
155
|
-
label:
|
|
156
|
-
value:
|
|
157
|
-
tooltip:
|
|
158
|
-
highlight:
|
|
159
|
-
negative:
|
|
160
|
-
positive:
|
|
161
|
-
isPercentage:
|
|
162
|
-
isDate:
|
|
163
|
-
isText:
|
|
164
|
-
isInvoiced:
|
|
165
|
-
hasCopyButton:
|
|
166
|
-
enableHoverableContent:
|
|
167
|
-
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
|
|
168
189
|
}) {
|
|
169
|
-
let
|
|
170
|
-
if (
|
|
171
|
-
const
|
|
172
|
-
|
|
173
|
-
} else
|
|
174
|
-
return /* @__PURE__ */ e("div", { className: c("px-2 py-1 text-sm",
|
|
175
|
-
/* @__PURE__ */ e(
|
|
176
|
-
/* @__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(
|
|
177
198
|
"span",
|
|
178
199
|
{
|
|
179
200
|
className: c(
|
|
180
201
|
"flex flex-row gap-1",
|
|
181
|
-
|
|
202
|
+
i ? "text-red-600" : n ? "text-green-600" : ""
|
|
182
203
|
),
|
|
183
204
|
children: [
|
|
184
|
-
|
|
205
|
+
a,
|
|
185
206
|
" ",
|
|
186
|
-
/* @__PURE__ */ e(
|
|
207
|
+
/* @__PURE__ */ e(se, { className: "size-3.5" })
|
|
187
208
|
]
|
|
188
209
|
}
|
|
189
210
|
),
|
|
190
|
-
/* @__PURE__ */
|
|
211
|
+
/* @__PURE__ */ d(
|
|
191
212
|
"span",
|
|
192
213
|
{
|
|
193
214
|
className: c(
|
|
194
215
|
"flex flex-row justify-end gap-2 text-right",
|
|
195
|
-
|
|
216
|
+
i ? "text-red-600" : n ? "text-green-600" : ""
|
|
196
217
|
),
|
|
197
218
|
children: [
|
|
198
|
-
|
|
199
|
-
|
|
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) })
|
|
200
221
|
]
|
|
201
222
|
}
|
|
202
223
|
)
|
|
203
224
|
] }) }),
|
|
204
225
|
/* @__PURE__ */ e(
|
|
205
|
-
|
|
226
|
+
I,
|
|
206
227
|
{
|
|
207
228
|
align: "start",
|
|
208
|
-
className: c(!
|
|
209
|
-
children: /* @__PURE__ */
|
|
210
|
-
/* @__PURE__ */ e("div", { className: "font-medium", children:
|
|
211
|
-
/* @__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 })
|
|
212
233
|
] })
|
|
213
234
|
}
|
|
214
235
|
)
|
|
215
236
|
] }) });
|
|
216
237
|
}
|
|
217
|
-
function
|
|
218
|
-
icon:
|
|
219
|
-
title:
|
|
220
|
-
description:
|
|
221
|
-
tip:
|
|
222
|
-
className:
|
|
223
|
-
...
|
|
238
|
+
function je({
|
|
239
|
+
icon: a = ge,
|
|
240
|
+
title: t,
|
|
241
|
+
description: r,
|
|
242
|
+
tip: s,
|
|
243
|
+
className: i,
|
|
244
|
+
...n
|
|
224
245
|
}) {
|
|
225
|
-
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: [
|
|
226
247
|
/* @__PURE__ */ e("div", { className: "relative mb-4", children: /* @__PURE__ */ e(
|
|
227
|
-
|
|
248
|
+
a,
|
|
228
249
|
{
|
|
229
250
|
"aria-hidden": "true",
|
|
230
251
|
className: "size-16 text-muted-foreground/40"
|
|
231
252
|
}
|
|
232
253
|
) }),
|
|
233
|
-
/* @__PURE__ */ e("h3", { className: "mb-2 text-lg font-semibold text-foreground", children:
|
|
234
|
-
/* @__PURE__ */ e("p", { className: "max-w-md text-sm leading-relaxed text-muted-foreground", children:
|
|
235
|
-
|
|
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 }) })
|
|
236
257
|
] }) });
|
|
237
258
|
}
|
|
238
|
-
function
|
|
239
|
-
actions:
|
|
240
|
-
icon:
|
|
259
|
+
function Be({
|
|
260
|
+
actions: a,
|
|
261
|
+
icon: t = le
|
|
241
262
|
}) {
|
|
242
|
-
const [
|
|
243
|
-
return
|
|
244
|
-
if (!
|
|
245
|
-
const
|
|
246
|
-
|
|
247
|
-
},
|
|
248
|
-
|
|
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);
|
|
249
270
|
};
|
|
250
|
-
return document.addEventListener("mousedown",
|
|
251
|
-
document.removeEventListener("mousedown",
|
|
271
|
+
return document.addEventListener("mousedown", n), document.addEventListener("keydown", l), () => {
|
|
272
|
+
document.removeEventListener("mousedown", n), document.removeEventListener("keydown", l);
|
|
252
273
|
};
|
|
253
|
-
}, [
|
|
274
|
+
}, [r]), /* @__PURE__ */ e(G, { children: /* @__PURE__ */ d(
|
|
254
275
|
"div",
|
|
255
276
|
{
|
|
256
|
-
ref:
|
|
277
|
+
ref: i,
|
|
257
278
|
className: "fixed bottom-6 right-6 z-50 flex flex-col items-end gap-3",
|
|
258
279
|
children: [
|
|
259
|
-
/* @__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(
|
|
260
281
|
"div",
|
|
261
282
|
{
|
|
262
283
|
className: c(
|
|
263
284
|
"transition-all duration-200 ease-out",
|
|
264
|
-
|
|
285
|
+
r ? "translate-y-0 opacity-100" : "pointer-events-none translate-y-2 opacity-0"
|
|
265
286
|
),
|
|
266
|
-
style: { transitionDelay:
|
|
267
|
-
children: /* @__PURE__ */
|
|
268
|
-
/* @__PURE__ */ e(
|
|
269
|
-
|
|
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,
|
|
270
291
|
{
|
|
271
292
|
size: "icon",
|
|
272
293
|
variant: "outline",
|
|
273
|
-
disabled:
|
|
274
|
-
"aria-disabled":
|
|
294
|
+
disabled: n.disabled,
|
|
295
|
+
"aria-disabled": n.disabled,
|
|
275
296
|
className: c(
|
|
276
297
|
"size-11 rounded-full shadow-md",
|
|
277
|
-
|
|
298
|
+
n.disabled && "opacity-50"
|
|
278
299
|
),
|
|
279
300
|
onClick: () => {
|
|
280
|
-
|
|
301
|
+
n.disabled || (n.onClick(), s(!1));
|
|
281
302
|
},
|
|
282
|
-
children: /* @__PURE__ */ e(
|
|
303
|
+
children: /* @__PURE__ */ e(n.icon, { className: "size-5" })
|
|
283
304
|
}
|
|
284
305
|
) }),
|
|
285
|
-
/* @__PURE__ */ e(
|
|
306
|
+
/* @__PURE__ */ e(Z, { side: "left", children: n.label })
|
|
286
307
|
] })
|
|
287
308
|
},
|
|
288
|
-
|
|
309
|
+
n.label
|
|
289
310
|
)) }),
|
|
290
311
|
/* @__PURE__ */ e(
|
|
291
|
-
|
|
312
|
+
k,
|
|
292
313
|
{
|
|
293
314
|
size: "icon",
|
|
294
315
|
variant: "outline",
|
|
295
316
|
className: "size-11 rounded-full shadow-md",
|
|
296
|
-
"aria-label":
|
|
297
|
-
"aria-expanded":
|
|
298
|
-
onClick: () =>
|
|
299
|
-
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" })
|
|
300
321
|
}
|
|
301
322
|
)
|
|
302
323
|
]
|
|
303
324
|
}
|
|
304
325
|
) });
|
|
305
326
|
}
|
|
306
|
-
function
|
|
307
|
-
columns:
|
|
308
|
-
rows:
|
|
309
|
-
hasActions:
|
|
310
|
-
actionsCount:
|
|
327
|
+
function Oe({
|
|
328
|
+
columns: a = 9,
|
|
329
|
+
rows: t = 20,
|
|
330
|
+
hasActions: r = !1,
|
|
331
|
+
actionsCount: s = 1
|
|
311
332
|
}) {
|
|
312
|
-
return /* @__PURE__ */
|
|
313
|
-
/* @__PURE__ */ e(
|
|
314
|
-
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;
|
|
315
336
|
return /* @__PURE__ */ e(
|
|
316
|
-
|
|
337
|
+
$,
|
|
317
338
|
{
|
|
318
|
-
className:
|
|
339
|
+
className: l ? "w-0 text-right" : "",
|
|
319
340
|
children: /* @__PURE__ */ e(
|
|
320
|
-
|
|
341
|
+
w,
|
|
321
342
|
{
|
|
322
|
-
className:
|
|
343
|
+
className: l ? "ml-auto h-4 w-8" : "h-4 w-[60%]"
|
|
323
344
|
}
|
|
324
345
|
)
|
|
325
346
|
},
|
|
326
|
-
|
|
347
|
+
n
|
|
327
348
|
);
|
|
328
349
|
}) }) }),
|
|
329
|
-
/* @__PURE__ */ e(j, { children: Array.from({ length:
|
|
330
|
-
const
|
|
331
|
-
return /* @__PURE__ */ e(
|
|
332
|
-
}) },
|
|
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)) })
|
|
333
354
|
] });
|
|
334
355
|
}
|
|
335
|
-
|
|
336
|
-
|
|
337
|
-
|
|
338
|
-
|
|
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
|
|
339
478
|
}) {
|
|
340
479
|
return /* @__PURE__ */ e(
|
|
341
480
|
"svg",
|
|
342
481
|
{
|
|
343
482
|
xmlns: "http://www.w3.org/2000/svg",
|
|
344
|
-
width:
|
|
345
|
-
height:
|
|
483
|
+
width: a,
|
|
484
|
+
height: a,
|
|
346
485
|
viewBox: "0 0 24 24",
|
|
347
486
|
fill: "none",
|
|
348
|
-
stroke:
|
|
487
|
+
stroke: t,
|
|
349
488
|
"stroke-width": "2",
|
|
350
489
|
"stroke-linecap": "round",
|
|
351
490
|
"stroke-linejoin": "round",
|
|
352
491
|
className: "lucide lucide-twitter-icon lucide-twitter",
|
|
353
|
-
...
|
|
492
|
+
...r,
|
|
354
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" })
|
|
355
494
|
}
|
|
356
495
|
);
|
|
357
496
|
}
|
|
358
497
|
export {
|
|
359
|
-
|
|
360
|
-
|
|
361
|
-
|
|
362
|
-
|
|
363
|
-
|
|
364
|
-
|
|
365
|
-
|
|
366
|
-
|
|
367
|
-
|
|
368
|
-
|
|
369
|
-
|
|
370
|
-
|
|
371
|
-
|
|
372
|
-
|
|
373
|
-
|
|
374
|
-
|
|
375
|
-
|
|
376
|
-
|
|
377
|
-
|
|
378
|
-
|
|
379
|
-
|
|
380
|
-
|
|
381
|
-
|
|
382
|
-
|
|
383
|
-
|
|
384
|
-
|
|
385
|
-
|
|
386
|
-
|
|
387
|
-
|
|
388
|
-
|
|
389
|
-
|
|
390
|
-
|
|
391
|
-
|
|
392
|
-
|
|
393
|
-
|
|
394
|
-
|
|
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
|
|
395
538
|
};
|