@grapadigital/shared-app-modules 0.0.189 → 0.0.192
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.BTMXECYG.js → format.util.hT2Ajyma.js} +1 -1
- package/dist/chuncks/{youtube-icon.component.CRGHhhcx.js → youtube-icon.component.DTkVj8Ri.js} +225 -201
- package/dist/components.d.ts +11 -0
- package/dist/components.js +322 -220
- package/dist/constants.d.ts +26 -0
- package/dist/constants.js +11 -9
- package/dist/events.js +1 -1
- package/dist/utils.js +4 -4
- package/package.json +1 -1
package/dist/components.js
CHANGED
|
@@ -1,30 +1,30 @@
|
|
|
1
|
-
import { aZ as
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
import { parseISO as
|
|
9
|
-
import { u as
|
|
1
|
+
import { aZ as v, c as g, B as N, bf as I, w as M, F as R, aq as T, ar as F, as as A, W as j, X as O, $ as C, _ as B, Y as P, a0 as U } from "./chuncks/switch.D4GUsewk.js";
|
|
2
|
+
import { jsxs as l, jsx as e, Fragment as D } from "react/jsx-runtime";
|
|
3
|
+
import S, { Suspense as K, useState as L, useRef as E, useEffect as H, useMemo as W } from "react";
|
|
4
|
+
import { B as q, S as k, c as X, T as Q, a as V, b as G } from "./chuncks/badge.Cur4Mrd7.js";
|
|
5
|
+
import { QueryErrorResetBoundary as Y, useQuery as Z } from "@tanstack/react-query";
|
|
6
|
+
import { o as J, M as ee, p as te } from "./chuncks/youtube-icon.component.DTkVj8Ri.js";
|
|
7
|
+
import { w as nt, x as at, G as rt, U as st, H as it, J as ot, F as lt, K as dt, V as ct, L as gt, N as ut, O as mt, Q as pt, v as xt, y as ht, W as bt, X as ft, q as yt, r as vt, s as wt, t as kt, u as Nt, Y as Ct, z as St, R as _t, E as zt, Z as It, _ as Mt, $ as Rt } from "./chuncks/youtube-icon.component.DTkVj8Ri.js";
|
|
8
|
+
import { parseISO as _, differenceInCalendarDays as ne, format as ae } from "date-fns";
|
|
9
|
+
import { u as re, a as se } from "./chuncks/axios.lib.DebbmKD8.js";
|
|
10
10
|
import "./chuncks/shared-app-modules.provider.DRJ7n4Cj.js";
|
|
11
11
|
import "axios";
|
|
12
|
-
import { l as
|
|
13
|
-
const
|
|
12
|
+
import { l as ie } from "./chuncks/organization-users.service.I1WrInGh.js";
|
|
13
|
+
const oe = [
|
|
14
14
|
["circle", { cx: "12", cy: "12", r: "10", key: "1mglay" }],
|
|
15
15
|
["line", { x1: "12", x2: "12", y1: "8", y2: "12", key: "1pkeuh" }],
|
|
16
16
|
["line", { x1: "12", x2: "12.01", y1: "16", y2: "16", key: "4dfq90" }]
|
|
17
|
-
],
|
|
18
|
-
const
|
|
17
|
+
], le = v("circle-alert", oe);
|
|
18
|
+
const de = [
|
|
19
19
|
["circle", { cx: "12", cy: "12", r: "10", key: "1mglay" }],
|
|
20
20
|
["path", { d: "M9.09 9a3 3 0 0 1 5.83 1c0 2-3 3-3 3", key: "1u773s" }],
|
|
21
21
|
["path", { d: "M12 17h.01", key: "p32p05" }]
|
|
22
|
-
],
|
|
23
|
-
const
|
|
22
|
+
], ce = v("circle-question-mark", de);
|
|
23
|
+
const ge = [
|
|
24
24
|
["rect", { width: "14", height: "14", x: "8", y: "8", rx: "2", ry: "2", key: "17jyea" }],
|
|
25
25
|
["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" }]
|
|
26
|
-
],
|
|
27
|
-
const
|
|
26
|
+
], ue = v("copy", ge);
|
|
27
|
+
const me = [
|
|
28
28
|
[
|
|
29
29
|
"path",
|
|
30
30
|
{
|
|
@@ -36,13 +36,13 @@ const ce = [
|
|
|
36
36
|
["path", { d: "M10 9H8", key: "b1mrlr" }],
|
|
37
37
|
["path", { d: "M16 13H8", key: "t4e002" }],
|
|
38
38
|
["path", { d: "M16 17H8", key: "z1uh3a" }]
|
|
39
|
-
],
|
|
40
|
-
const
|
|
39
|
+
], pe = v("file-text", me);
|
|
40
|
+
const xe = [
|
|
41
41
|
["path", { d: "M3 12a9 9 0 0 1 9-9 9.75 9.75 0 0 1 6.74 2.74L21 8", key: "v9h5vc" }],
|
|
42
42
|
["path", { d: "M21 3v5h-5", key: "1q7to0" }],
|
|
43
43
|
["path", { d: "M21 12a9 9 0 0 1-9 9 9.75 9.75 0 0 1-6.74-2.74L3 16", key: "3uifl3" }],
|
|
44
44
|
["path", { d: "M8 16H3v5", key: "1cv678" }]
|
|
45
|
-
],
|
|
45
|
+
], he = v("refresh-cw", xe);
|
|
46
46
|
const be = [
|
|
47
47
|
[
|
|
48
48
|
"path",
|
|
@@ -53,61 +53,162 @@ const be = [
|
|
|
53
53
|
],
|
|
54
54
|
["path", { d: "M12 9v4", key: "juzpu7" }],
|
|
55
55
|
["path", { d: "M12 17h.01", key: "p32p05" }]
|
|
56
|
-
],
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
56
|
+
], fe = v("triangle-alert", be);
|
|
57
|
+
const ye = [
|
|
58
|
+
["path", { d: "M12 3v12", key: "1x0j5s" }],
|
|
59
|
+
["path", { d: "m17 8-5-5-5 5", key: "7q97r8" }],
|
|
60
|
+
["path", { d: "M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4", key: "ih7n3h" }]
|
|
61
|
+
], ve = v("upload", ye);
|
|
62
|
+
function Oe({
|
|
63
|
+
icon: a = ve,
|
|
64
|
+
title: n = "Enviar arquivos",
|
|
65
|
+
description: r = "Arraste e solte os arquivos aqui ou clique para selecionar.",
|
|
66
|
+
buttonText: s = "Selecionar novos arquivos",
|
|
67
|
+
files: i,
|
|
68
|
+
disabled: t,
|
|
69
|
+
onFilesChange: o,
|
|
70
|
+
...d
|
|
71
|
+
}) {
|
|
72
|
+
const [p, b] = S.useState(!1), x = S.useRef(null), w = (c) => {
|
|
73
|
+
const y = Array.from(c.target.files ?? []);
|
|
74
|
+
o([...i, ...y]);
|
|
75
|
+
}, f = (c) => {
|
|
76
|
+
const y = [...i];
|
|
77
|
+
y.splice(c, 1), o(y);
|
|
78
|
+
};
|
|
79
|
+
function h(c) {
|
|
80
|
+
c.preventDefault(), b(!0);
|
|
81
|
+
}
|
|
82
|
+
function m(c) {
|
|
83
|
+
c.preventDefault(), b(!1);
|
|
84
|
+
}
|
|
85
|
+
function u(c) {
|
|
86
|
+
c.preventDefault(), b(!1);
|
|
87
|
+
const y = Array.from(c.dataTransfer.files);
|
|
88
|
+
o([...i, ...y]);
|
|
89
|
+
}
|
|
90
|
+
return /* @__PURE__ */ l(
|
|
91
|
+
"div",
|
|
92
|
+
{
|
|
93
|
+
onDragOver: h,
|
|
94
|
+
onDragLeave: m,
|
|
95
|
+
onDrop: u,
|
|
96
|
+
className: g(
|
|
97
|
+
"w-full space-y-3",
|
|
98
|
+
t && "pointer-events-none opacity-60 select-none"
|
|
99
|
+
),
|
|
100
|
+
children: [
|
|
101
|
+
/* @__PURE__ */ l(
|
|
102
|
+
"div",
|
|
103
|
+
{
|
|
104
|
+
className: g(
|
|
105
|
+
"border border-dashed rounded-md p-6 text-center grid gap-6 duration-200",
|
|
106
|
+
p && "bg-zinc-100"
|
|
107
|
+
),
|
|
108
|
+
children: [
|
|
109
|
+
/* @__PURE__ */ e(
|
|
110
|
+
"input",
|
|
111
|
+
{
|
|
112
|
+
multiple: !0,
|
|
113
|
+
...d,
|
|
114
|
+
ref: x,
|
|
115
|
+
type: "file",
|
|
116
|
+
className: "hidden",
|
|
117
|
+
onChange: w,
|
|
118
|
+
disabled: t
|
|
119
|
+
}
|
|
120
|
+
),
|
|
121
|
+
/* @__PURE__ */ e("div", { className: "w-fit mx-auto", children: /* @__PURE__ */ e(a, { className: "text-muted-foreground size-8" }) }),
|
|
122
|
+
/* @__PURE__ */ l("div", { children: [
|
|
123
|
+
/* @__PURE__ */ e("h3", { className: "font-semibold", children: n }),
|
|
124
|
+
/* @__PURE__ */ e("p", { className: "text-muted-foreground text-sm", children: r })
|
|
125
|
+
] }),
|
|
126
|
+
/* @__PURE__ */ e(
|
|
127
|
+
N,
|
|
128
|
+
{
|
|
129
|
+
type: "button",
|
|
130
|
+
disabled: t,
|
|
131
|
+
size: "sm",
|
|
132
|
+
onClick: () => x.current?.click(),
|
|
133
|
+
className: "w-fit mx-auto",
|
|
134
|
+
children: s
|
|
135
|
+
}
|
|
136
|
+
)
|
|
137
|
+
]
|
|
138
|
+
}
|
|
139
|
+
),
|
|
140
|
+
i.length > 0 && /* @__PURE__ */ e("div", { className: "flex flex-wrap gap-2", children: i.map((c, y) => /* @__PURE__ */ l(q, { children: [
|
|
141
|
+
/* @__PURE__ */ e(
|
|
142
|
+
"button",
|
|
143
|
+
{
|
|
144
|
+
onClick: () => f(y),
|
|
145
|
+
className: "hover:text-red-500",
|
|
146
|
+
"aria-label": "Remover anexo",
|
|
147
|
+
title: "Remover anexo",
|
|
148
|
+
disabled: t,
|
|
149
|
+
children: /* @__PURE__ */ e(I, { className: "size-3" })
|
|
150
|
+
}
|
|
151
|
+
),
|
|
152
|
+
c.name
|
|
153
|
+
] }, c.name)) })
|
|
154
|
+
]
|
|
155
|
+
}
|
|
156
|
+
);
|
|
157
|
+
}
|
|
158
|
+
function we({
|
|
159
|
+
icon: a = fe,
|
|
160
|
+
title: n = "Algo deu errado",
|
|
60
161
|
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
162
|
onRetry: s,
|
|
62
163
|
tip: i,
|
|
63
|
-
className:
|
|
164
|
+
className: t,
|
|
64
165
|
...o
|
|
65
166
|
}) {
|
|
66
|
-
return /* @__PURE__ */ e(
|
|
167
|
+
return /* @__PURE__ */ e(M, { className: g(t), ...o, children: /* @__PURE__ */ l(R, { className: "flex flex-col items-center justify-center px-6 py-12 text-center", children: [
|
|
67
168
|
/* @__PURE__ */ e("div", { className: "relative mb-4", children: /* @__PURE__ */ e(a, { "aria-hidden": "true", className: "text-destructive/60 size-16" }) }),
|
|
68
|
-
/* @__PURE__ */ e("h3", { className: "text-foreground mb-2 text-lg font-semibold", children:
|
|
169
|
+
/* @__PURE__ */ e("h3", { className: "text-foreground mb-2 text-lg font-semibold", children: n }),
|
|
69
170
|
/* @__PURE__ */ e("p", { className: "text-muted-foreground max-w-md text-sm leading-relaxed", children: r }),
|
|
70
|
-
s && /* @__PURE__ */
|
|
71
|
-
/* @__PURE__ */ e(
|
|
171
|
+
s && /* @__PURE__ */ l(N, { onClick: s, variant: "outline", className: "mt-6", children: [
|
|
172
|
+
/* @__PURE__ */ e(he, {}),
|
|
72
173
|
"Tentar novamente"
|
|
73
174
|
] }),
|
|
74
175
|
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 }) })
|
|
75
176
|
] }) });
|
|
76
177
|
}
|
|
77
|
-
function
|
|
78
|
-
suspenseFallback: a =
|
|
79
|
-
errorFallback:
|
|
178
|
+
function Be({
|
|
179
|
+
suspenseFallback: a = ke,
|
|
180
|
+
errorFallback: n = we,
|
|
80
181
|
children: r
|
|
81
182
|
}) {
|
|
82
|
-
return /* @__PURE__ */ e(
|
|
83
|
-
|
|
183
|
+
return /* @__PURE__ */ e(K, { fallback: /* @__PURE__ */ e(a, {}), children: /* @__PURE__ */ e(Y, { children: ({ reset: s }) => /* @__PURE__ */ e(
|
|
184
|
+
J,
|
|
84
185
|
{
|
|
85
186
|
onReset: s,
|
|
86
|
-
fallbackRender: ({ resetErrorBoundary: i, error:
|
|
187
|
+
fallbackRender: ({ resetErrorBoundary: i, error: t }) => /* @__PURE__ */ e(n, { error: t, onRetry: i }),
|
|
87
188
|
children: r
|
|
88
189
|
}
|
|
89
190
|
) }) });
|
|
90
191
|
}
|
|
91
|
-
function
|
|
92
|
-
return /* @__PURE__ */ e(
|
|
192
|
+
function ke() {
|
|
193
|
+
return /* @__PURE__ */ e(k, { className: "h-[13.75625rem]" });
|
|
93
194
|
}
|
|
94
|
-
function
|
|
195
|
+
function Pe({
|
|
95
196
|
content: a,
|
|
96
|
-
align:
|
|
197
|
+
align: n,
|
|
97
198
|
asChild: r,
|
|
98
199
|
className: s,
|
|
99
200
|
openDelay: i = 0,
|
|
100
|
-
closeDelay:
|
|
201
|
+
closeDelay: t = 0,
|
|
101
202
|
children: o,
|
|
102
|
-
disabled:
|
|
103
|
-
...
|
|
203
|
+
disabled: d = !1,
|
|
204
|
+
...p
|
|
104
205
|
}) {
|
|
105
|
-
return /* @__PURE__ */ e(
|
|
106
|
-
/* @__PURE__ */ e(
|
|
107
|
-
/* @__PURE__ */ e(
|
|
206
|
+
return /* @__PURE__ */ e(D, { children: d === !0 ? o : /* @__PURE__ */ l(T, { openDelay: i, closeDelay: t, ...p, children: [
|
|
207
|
+
/* @__PURE__ */ e(F, { asChild: r, children: o }),
|
|
208
|
+
/* @__PURE__ */ e(A, { align: n, className: s, children: a })
|
|
108
209
|
] }) });
|
|
109
210
|
}
|
|
110
|
-
const
|
|
211
|
+
const Ne = {
|
|
111
212
|
red: { bg: "bg-red-50", text: "text-red-600" },
|
|
112
213
|
orange: { bg: "bg-orange-50", text: "text-orange-600" },
|
|
113
214
|
amber: { bg: "bg-amber-50", text: "text-amber-600" },
|
|
@@ -130,7 +231,7 @@ const fe = {
|
|
|
130
231
|
zinc: { bg: "bg-zinc-200", text: "text-zinc-800" },
|
|
131
232
|
neutral: { bg: "bg-neutral-200", text: "text-neutral-800" },
|
|
132
233
|
stone: { bg: "bg-stone-200", text: "text-stone-800" }
|
|
133
|
-
},
|
|
234
|
+
}, Ce = {
|
|
134
235
|
red: { bg: "bg-red-500", text: "text-white" },
|
|
135
236
|
orange: { bg: "bg-orange-500", text: "text-white" },
|
|
136
237
|
amber: { bg: "bg-amber-500", text: "text-white" },
|
|
@@ -154,82 +255,82 @@ const fe = {
|
|
|
154
255
|
neutral: { bg: "bg-neutral-500", text: "text-white" },
|
|
155
256
|
stone: { bg: "bg-stone-500", text: "text-white" },
|
|
156
257
|
black: { bg: "bg-black", text: "text-white" }
|
|
157
|
-
},
|
|
258
|
+
}, z = {
|
|
158
259
|
xs: "size-3",
|
|
159
260
|
sm: "size-4",
|
|
160
261
|
md: "size-5",
|
|
161
262
|
lg: "size-6",
|
|
162
263
|
xl: "size-7"
|
|
163
264
|
};
|
|
164
|
-
function
|
|
265
|
+
function Ue({
|
|
165
266
|
size: a,
|
|
166
|
-
color:
|
|
267
|
+
color: n,
|
|
167
268
|
className: r,
|
|
168
269
|
icon: s,
|
|
169
270
|
filled: i
|
|
170
271
|
}) {
|
|
171
|
-
const
|
|
172
|
-
return /* @__PURE__ */ e("div", { className:
|
|
272
|
+
const t = i ? Ce[n] : Ne[n], o = a ? z[a] : z.md;
|
|
273
|
+
return /* @__PURE__ */ e("div", { className: g("w-fit p-2 rounded-lg", t?.bg, r), children: /* @__PURE__ */ e(s, { className: g(o, t?.text) }) });
|
|
173
274
|
}
|
|
174
|
-
function
|
|
175
|
-
return /* @__PURE__ */ e("div", { className:
|
|
275
|
+
function Ke({ className: a, ...n }) {
|
|
276
|
+
return /* @__PURE__ */ e("div", { className: g("divide-y", a), ...n });
|
|
176
277
|
}
|
|
177
|
-
function
|
|
278
|
+
function We({
|
|
178
279
|
label: a,
|
|
179
|
-
value:
|
|
280
|
+
value: n,
|
|
180
281
|
tooltip: r,
|
|
181
282
|
highlight: s = !1,
|
|
182
283
|
negative: i = !1,
|
|
183
|
-
positive:
|
|
284
|
+
positive: t = !1,
|
|
184
285
|
isPercentage: o = !1,
|
|
185
|
-
isDate:
|
|
186
|
-
isText:
|
|
187
|
-
isInvoiced:
|
|
188
|
-
hasCopyButton:
|
|
189
|
-
enableHoverableContent:
|
|
190
|
-
handleCopy:
|
|
286
|
+
isDate: d = !1,
|
|
287
|
+
isText: p = !1,
|
|
288
|
+
isInvoiced: b = !1,
|
|
289
|
+
hasCopyButton: x = !1,
|
|
290
|
+
enableHoverableContent: w = !1,
|
|
291
|
+
handleCopy: f
|
|
191
292
|
}) {
|
|
192
|
-
let
|
|
193
|
-
if (
|
|
194
|
-
const
|
|
195
|
-
|
|
196
|
-
} else s && (
|
|
197
|
-
return /* @__PURE__ */ e("div", { className:
|
|
198
|
-
/* @__PURE__ */ e(
|
|
199
|
-
/* @__PURE__ */
|
|
293
|
+
let h = "";
|
|
294
|
+
if (d && typeof n == "string" && !b && s) {
|
|
295
|
+
const m = _(n), u = ne(m, /* @__PURE__ */ new Date());
|
|
296
|
+
u > 15 ? h = "bg-yellow-100 font-bold" : u > 7 ? h = "bg-yellow-300 font-bold" : u >= 0 ? h = "bg-red-300 font-bold" : h = "bg-red-500 text-white font-bold";
|
|
297
|
+
} else s && (h = "bg-[#ffe0b2] font-bold");
|
|
298
|
+
return /* @__PURE__ */ e("div", { className: g("px-2 py-1 text-sm", h), children: /* @__PURE__ */ l(T, { openDelay: 0, closeDelay: 0, children: [
|
|
299
|
+
/* @__PURE__ */ e(F, { children: /* @__PURE__ */ l("div", { className: "flex justify-between", children: [
|
|
300
|
+
/* @__PURE__ */ l(
|
|
200
301
|
"span",
|
|
201
302
|
{
|
|
202
|
-
className:
|
|
303
|
+
className: g(
|
|
203
304
|
"flex flex-row gap-1",
|
|
204
|
-
i ? "text-red-600" :
|
|
305
|
+
i ? "text-red-600" : t ? "text-green-600" : ""
|
|
205
306
|
),
|
|
206
307
|
children: [
|
|
207
308
|
a,
|
|
208
309
|
" ",
|
|
209
|
-
/* @__PURE__ */ e(
|
|
310
|
+
/* @__PURE__ */ e(le, { className: "size-3.5" })
|
|
210
311
|
]
|
|
211
312
|
}
|
|
212
313
|
),
|
|
213
|
-
/* @__PURE__ */
|
|
314
|
+
/* @__PURE__ */ l(
|
|
214
315
|
"span",
|
|
215
316
|
{
|
|
216
|
-
className:
|
|
317
|
+
className: g(
|
|
217
318
|
"flex flex-row justify-end gap-2 text-right",
|
|
218
|
-
i ? "text-red-600" :
|
|
319
|
+
i ? "text-red-600" : t ? "text-green-600" : ""
|
|
219
320
|
),
|
|
220
321
|
children: [
|
|
221
|
-
o && typeof
|
|
222
|
-
|
|
322
|
+
o && typeof n == "number" ? `${n.toFixed(2)}%` : d && typeof n == "string" ? ae(_(n), "dd/MM/yyyy") : p && typeof n == "string" ? n : `R$ ${n.toLocaleString("pt-BR", { minimumFractionDigits: 2, maximumFractionDigits: 2 })}`,
|
|
323
|
+
x && f && /* @__PURE__ */ e(ue, { size: 15, onClick: () => f(n) })
|
|
223
324
|
]
|
|
224
325
|
}
|
|
225
326
|
)
|
|
226
327
|
] }) }),
|
|
227
328
|
/* @__PURE__ */ e(
|
|
228
|
-
|
|
329
|
+
A,
|
|
229
330
|
{
|
|
230
331
|
align: "start",
|
|
231
|
-
className:
|
|
232
|
-
children: /* @__PURE__ */
|
|
332
|
+
className: g(!w && "pointer-events-none"),
|
|
333
|
+
children: /* @__PURE__ */ l("div", { className: "space-y-0.5", children: [
|
|
233
334
|
/* @__PURE__ */ e("div", { className: "font-medium", children: a }),
|
|
234
335
|
/* @__PURE__ */ e("div", { className: "font-normal opacity-80", children: r })
|
|
235
336
|
] })
|
|
@@ -237,15 +338,15 @@ function $e({
|
|
|
237
338
|
)
|
|
238
339
|
] }) });
|
|
239
340
|
}
|
|
240
|
-
function
|
|
241
|
-
icon: a =
|
|
242
|
-
title:
|
|
341
|
+
function Xe({
|
|
342
|
+
icon: a = pe,
|
|
343
|
+
title: n,
|
|
243
344
|
description: r,
|
|
244
345
|
tip: s,
|
|
245
346
|
className: i,
|
|
246
|
-
...
|
|
347
|
+
...t
|
|
247
348
|
}) {
|
|
248
|
-
return /* @__PURE__ */ e(
|
|
349
|
+
return /* @__PURE__ */ e(M, { className: g(i), ...t, children: /* @__PURE__ */ l(R, { className: "flex flex-col items-center justify-center px-6 py-12 text-center", children: [
|
|
249
350
|
/* @__PURE__ */ e("div", { className: "relative mb-4", children: /* @__PURE__ */ e(
|
|
250
351
|
a,
|
|
251
352
|
{
|
|
@@ -253,135 +354,135 @@ function Oe({
|
|
|
253
354
|
className: "size-16 text-muted-foreground/40"
|
|
254
355
|
}
|
|
255
356
|
) }),
|
|
256
|
-
/* @__PURE__ */ e("h3", { className: "mb-2 text-lg font-semibold text-foreground", children:
|
|
357
|
+
/* @__PURE__ */ e("h3", { className: "mb-2 text-lg font-semibold text-foreground", children: n }),
|
|
257
358
|
/* @__PURE__ */ e("p", { className: "max-w-md text-sm leading-relaxed text-muted-foreground", children: r }),
|
|
258
359
|
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 }) })
|
|
259
360
|
] }) });
|
|
260
361
|
}
|
|
261
|
-
function
|
|
362
|
+
function Qe({
|
|
262
363
|
actions: a,
|
|
263
|
-
icon:
|
|
364
|
+
icon: n = ce
|
|
264
365
|
}) {
|
|
265
|
-
const [r, s] =
|
|
266
|
-
return
|
|
366
|
+
const [r, s] = L(!1), i = E(null);
|
|
367
|
+
return H(() => {
|
|
267
368
|
if (!r) return;
|
|
268
|
-
const
|
|
269
|
-
i.current?.contains(
|
|
270
|
-
}, o = (
|
|
271
|
-
|
|
369
|
+
const t = (d) => {
|
|
370
|
+
i.current?.contains(d.target) || s(!1);
|
|
371
|
+
}, o = (d) => {
|
|
372
|
+
d.key === "Escape" && s(!1);
|
|
272
373
|
};
|
|
273
|
-
return document.addEventListener("mousedown",
|
|
274
|
-
document.removeEventListener("mousedown",
|
|
374
|
+
return document.addEventListener("mousedown", t), document.addEventListener("keydown", o), () => {
|
|
375
|
+
document.removeEventListener("mousedown", t), document.removeEventListener("keydown", o);
|
|
275
376
|
};
|
|
276
|
-
}, [r]), /* @__PURE__ */ e(
|
|
377
|
+
}, [r]), /* @__PURE__ */ e(X, { children: /* @__PURE__ */ l(
|
|
277
378
|
"div",
|
|
278
379
|
{
|
|
279
380
|
ref: i,
|
|
280
381
|
className: "fixed bottom-6 right-6 z-50 flex flex-col items-end gap-3",
|
|
281
382
|
children: [
|
|
282
|
-
/* @__PURE__ */ e("div", { className: "flex flex-col items-end gap-3", children: a.map((
|
|
383
|
+
/* @__PURE__ */ e("div", { className: "flex flex-col items-end gap-3", children: a.map((t, o) => /* @__PURE__ */ e(
|
|
283
384
|
"div",
|
|
284
385
|
{
|
|
285
|
-
className:
|
|
386
|
+
className: g(
|
|
286
387
|
"transition-all duration-200 ease-out",
|
|
287
388
|
r ? "translate-y-0 opacity-100" : "pointer-events-none translate-y-2 opacity-0"
|
|
288
389
|
),
|
|
289
390
|
style: { transitionDelay: r ? `${o * 30}ms` : "0ms" },
|
|
290
|
-
children: /* @__PURE__ */
|
|
291
|
-
/* @__PURE__ */ e(
|
|
292
|
-
|
|
391
|
+
children: /* @__PURE__ */ l(Q, { children: [
|
|
392
|
+
/* @__PURE__ */ e(V, { asChild: !0, children: /* @__PURE__ */ e(
|
|
393
|
+
N,
|
|
293
394
|
{
|
|
294
395
|
size: "icon",
|
|
295
396
|
variant: "outline",
|
|
296
|
-
disabled:
|
|
297
|
-
"aria-disabled":
|
|
298
|
-
className:
|
|
397
|
+
disabled: t.disabled,
|
|
398
|
+
"aria-disabled": t.disabled,
|
|
399
|
+
className: g(
|
|
299
400
|
"size-11 rounded-full shadow-md",
|
|
300
|
-
|
|
401
|
+
t.disabled && "opacity-50"
|
|
301
402
|
),
|
|
302
403
|
onClick: () => {
|
|
303
|
-
|
|
404
|
+
t.disabled || (t.onClick(), s(!1));
|
|
304
405
|
},
|
|
305
|
-
children: /* @__PURE__ */ e(
|
|
406
|
+
children: /* @__PURE__ */ e(t.icon, { className: "size-5" })
|
|
306
407
|
}
|
|
307
408
|
) }),
|
|
308
|
-
/* @__PURE__ */ e(
|
|
409
|
+
/* @__PURE__ */ e(G, { side: "left", children: t.label })
|
|
309
410
|
] })
|
|
310
411
|
},
|
|
311
|
-
|
|
412
|
+
t.label
|
|
312
413
|
)) }),
|
|
313
414
|
/* @__PURE__ */ e(
|
|
314
|
-
|
|
415
|
+
N,
|
|
315
416
|
{
|
|
316
417
|
size: "icon",
|
|
317
418
|
variant: "outline",
|
|
318
419
|
className: "size-11 rounded-full shadow-md",
|
|
319
420
|
"aria-label": r ? "Fechar menu de ajuda" : "Abrir menu de ajuda",
|
|
320
421
|
"aria-expanded": r,
|
|
321
|
-
onClick: () => s((
|
|
322
|
-
children: r ? /* @__PURE__ */ e(
|
|
422
|
+
onClick: () => s((t) => !t),
|
|
423
|
+
children: r ? /* @__PURE__ */ e(I, { className: "size-5" }) : /* @__PURE__ */ e(n, { className: "size-5" })
|
|
323
424
|
}
|
|
324
425
|
)
|
|
325
426
|
]
|
|
326
427
|
}
|
|
327
428
|
) });
|
|
328
429
|
}
|
|
329
|
-
function
|
|
430
|
+
function Ve({
|
|
330
431
|
columns: a = 9,
|
|
331
|
-
rows:
|
|
432
|
+
rows: n = 20,
|
|
332
433
|
hasActions: r = !1,
|
|
333
434
|
actionsCount: s = 1
|
|
334
435
|
}) {
|
|
335
|
-
return /* @__PURE__ */
|
|
336
|
-
/* @__PURE__ */ e(
|
|
337
|
-
const o = r &&
|
|
436
|
+
return /* @__PURE__ */ l(j, { children: [
|
|
437
|
+
/* @__PURE__ */ e(O, { children: /* @__PURE__ */ e(C, { children: Array.from({ length: a }).map((i, t) => {
|
|
438
|
+
const o = r && t === a - 1;
|
|
338
439
|
return /* @__PURE__ */ e(
|
|
339
|
-
|
|
440
|
+
B,
|
|
340
441
|
{
|
|
341
442
|
className: o ? "w-0 text-right" : "",
|
|
342
443
|
children: /* @__PURE__ */ e(
|
|
343
|
-
|
|
444
|
+
k,
|
|
344
445
|
{
|
|
345
446
|
className: o ? "ml-auto h-4 w-8" : "h-4 w-[60%]"
|
|
346
447
|
}
|
|
347
448
|
)
|
|
348
449
|
},
|
|
349
|
-
|
|
450
|
+
t
|
|
350
451
|
);
|
|
351
452
|
}) }) }),
|
|
352
|
-
/* @__PURE__ */ e(
|
|
353
|
-
const
|
|
354
|
-
return /* @__PURE__ */ e(
|
|
355
|
-
}) },
|
|
453
|
+
/* @__PURE__ */ e(P, { children: Array.from({ length: n }).map((i, t) => /* @__PURE__ */ e(C, { className: "h-[3.05rem]", children: Array.from({ length: a }).map((o, d) => {
|
|
454
|
+
const p = r && d === a - 1;
|
|
455
|
+
return /* @__PURE__ */ e(U, { children: p ? /* @__PURE__ */ e("div", { className: "flex gap-2", children: Array.from({ length: s }).map((b, x) => /* @__PURE__ */ e(k, { className: "ml-auto size-8" }, x)) }) : /* @__PURE__ */ e(k, { className: "h-4 w-full" }) }, d);
|
|
456
|
+
}) }, t)) })
|
|
356
457
|
] });
|
|
357
458
|
}
|
|
358
|
-
const
|
|
359
|
-
function
|
|
360
|
-
const
|
|
459
|
+
const Se = "@[__display__](__id__)", $ = /@\[([^\]]+)\]\(([^)]+)\)/g;
|
|
460
|
+
function _e(a) {
|
|
461
|
+
const n = [], r = new RegExp($);
|
|
361
462
|
let s;
|
|
362
463
|
for (; (s = r.exec(a)) !== null; )
|
|
363
|
-
|
|
364
|
-
return
|
|
464
|
+
n.push({ display: s[1], id: s[2] });
|
|
465
|
+
return n;
|
|
365
466
|
}
|
|
366
|
-
function
|
|
367
|
-
return
|
|
368
|
-
userId:
|
|
369
|
-
username:
|
|
467
|
+
function Ge(a) {
|
|
468
|
+
return _e(a).map((n) => ({
|
|
469
|
+
userId: n.id,
|
|
470
|
+
username: n.display
|
|
370
471
|
}));
|
|
371
472
|
}
|
|
372
|
-
function
|
|
373
|
-
const { environments: r } =
|
|
374
|
-
return
|
|
375
|
-
queryKey: ["organization-users", a,
|
|
376
|
-
queryFn: () =>
|
|
473
|
+
function ze(a, n) {
|
|
474
|
+
const { environments: r } = re();
|
|
475
|
+
return Z({
|
|
476
|
+
queryKey: ["organization-users", a, n],
|
|
477
|
+
queryFn: () => ie({
|
|
377
478
|
organizationId: a,
|
|
378
|
-
search:
|
|
479
|
+
search: n,
|
|
379
480
|
environment: r.VITE_BACKEND_API_ORGANIZATION_URL ?? ""
|
|
380
481
|
}),
|
|
381
|
-
enabled: a.length > 0 &&
|
|
482
|
+
enabled: a.length > 0 && n.length > 0
|
|
382
483
|
});
|
|
383
484
|
}
|
|
384
|
-
const
|
|
485
|
+
const Ie = {
|
|
385
486
|
control: {
|
|
386
487
|
fontSize: 14,
|
|
387
488
|
fontWeight: "normal"
|
|
@@ -433,72 +534,72 @@ const Ne = {
|
|
|
433
534
|
}
|
|
434
535
|
}
|
|
435
536
|
}
|
|
436
|
-
},
|
|
537
|
+
}, Me = {
|
|
437
538
|
backgroundColor: "var(--accent, #dbeafe)",
|
|
438
539
|
color: "var(--accent-foreground, #1d4ed8)",
|
|
439
540
|
fontWeight: 600,
|
|
440
541
|
borderRadius: 4,
|
|
441
542
|
padding: "1px 2px"
|
|
442
543
|
};
|
|
443
|
-
function
|
|
544
|
+
function Ye({
|
|
444
545
|
value: a,
|
|
445
|
-
onChange:
|
|
546
|
+
onChange: n,
|
|
446
547
|
onBlur: r,
|
|
447
548
|
organizationId: s,
|
|
448
549
|
placeholder: i,
|
|
449
|
-
disabled:
|
|
550
|
+
disabled: t,
|
|
450
551
|
singleLine: o = !1
|
|
451
552
|
}) {
|
|
452
|
-
const [
|
|
453
|
-
() =>
|
|
454
|
-
[
|
|
553
|
+
const [d, p] = L(""), b = se(d, 200), { data: x } = ze(s, b), w = E(void 0), f = W(
|
|
554
|
+
() => x?.map((m) => ({ id: m._id, display: m.username })) ?? [],
|
|
555
|
+
[x]
|
|
455
556
|
);
|
|
456
|
-
return
|
|
457
|
-
|
|
458
|
-
}, [
|
|
459
|
-
|
|
557
|
+
return H(() => {
|
|
558
|
+
w.current?.(f);
|
|
559
|
+
}, [f]), /* @__PURE__ */ e(
|
|
560
|
+
ee,
|
|
460
561
|
{
|
|
461
562
|
value: a,
|
|
462
|
-
onChange: (
|
|
563
|
+
onChange: (m, u) => n(u),
|
|
463
564
|
onBlur: r,
|
|
464
565
|
placeholder: i,
|
|
465
|
-
disabled:
|
|
566
|
+
disabled: t,
|
|
466
567
|
singleLine: o,
|
|
467
568
|
allowSuggestionsAboveCursor: !0,
|
|
468
|
-
style:
|
|
569
|
+
style: Ie,
|
|
469
570
|
children: /* @__PURE__ */ e(
|
|
470
|
-
|
|
571
|
+
te,
|
|
471
572
|
{
|
|
472
573
|
trigger: "@",
|
|
473
|
-
markup:
|
|
474
|
-
data: (
|
|
475
|
-
|
|
574
|
+
markup: Se,
|
|
575
|
+
data: (m, u) => {
|
|
576
|
+
w.current = u, p(m), u(f);
|
|
476
577
|
},
|
|
477
|
-
displayTransform: (
|
|
578
|
+
displayTransform: (m, u) => `@${u}`,
|
|
478
579
|
appendSpaceOnAdd: !0,
|
|
479
|
-
style:
|
|
580
|
+
style: Me
|
|
480
581
|
}
|
|
481
582
|
)
|
|
482
583
|
}
|
|
483
584
|
);
|
|
484
585
|
}
|
|
485
|
-
function
|
|
486
|
-
const r = new RegExp(
|
|
487
|
-
let i = 0,
|
|
488
|
-
for (; (
|
|
489
|
-
|
|
490
|
-
/* @__PURE__ */ e("span", { children: a.slice(i,
|
|
586
|
+
function Ze({ text: a, className: n }) {
|
|
587
|
+
const r = new RegExp($), s = [];
|
|
588
|
+
let i = 0, t, o = 0;
|
|
589
|
+
for (; (t = r.exec(a)) !== null; )
|
|
590
|
+
t.index > i && s.push(
|
|
591
|
+
/* @__PURE__ */ e("span", { children: a.slice(i, t.index) }, o++)
|
|
491
592
|
), s.push(
|
|
492
|
-
/* @__PURE__ */
|
|
593
|
+
/* @__PURE__ */ l(q, { variant: "secondary", className: n, children: [
|
|
493
594
|
"@",
|
|
494
|
-
|
|
595
|
+
t[1]
|
|
495
596
|
] }, o++)
|
|
496
|
-
), i =
|
|
497
|
-
return i < a.length && s.push(/* @__PURE__ */ e("span", { children: a.slice(i) }, o++)), /* @__PURE__ */ e(
|
|
597
|
+
), i = t.index + t[0].length;
|
|
598
|
+
return i < a.length && s.push(/* @__PURE__ */ e("span", { children: a.slice(i) }, o++)), /* @__PURE__ */ e(D, { children: s });
|
|
498
599
|
}
|
|
499
|
-
function
|
|
600
|
+
function Je({
|
|
500
601
|
size: a = 24,
|
|
501
|
-
color:
|
|
602
|
+
color: n = "currentColor",
|
|
502
603
|
...r
|
|
503
604
|
}) {
|
|
504
605
|
return /* @__PURE__ */ e(
|
|
@@ -509,7 +610,7 @@ function Xe({
|
|
|
509
610
|
height: a,
|
|
510
611
|
viewBox: "0 0 24 24",
|
|
511
612
|
fill: "none",
|
|
512
|
-
stroke:
|
|
613
|
+
stroke: n,
|
|
513
614
|
"stroke-width": "2",
|
|
514
615
|
"stroke-linecap": "round",
|
|
515
616
|
"stroke-linejoin": "round",
|
|
@@ -520,47 +621,48 @@ function Xe({
|
|
|
520
621
|
);
|
|
521
622
|
}
|
|
522
623
|
export {
|
|
523
|
-
|
|
524
|
-
|
|
525
|
-
|
|
526
|
-
|
|
527
|
-
|
|
528
|
-
|
|
529
|
-
|
|
530
|
-
|
|
531
|
-
|
|
532
|
-
|
|
533
|
-
|
|
534
|
-
|
|
535
|
-
|
|
536
|
-
|
|
537
|
-
|
|
538
|
-
|
|
539
|
-
|
|
540
|
-
|
|
541
|
-
|
|
542
|
-
|
|
543
|
-
|
|
544
|
-
|
|
545
|
-
|
|
546
|
-
|
|
547
|
-
|
|
548
|
-
|
|
549
|
-
|
|
550
|
-
|
|
551
|
-
|
|
552
|
-
|
|
553
|
-
|
|
554
|
-
|
|
555
|
-
|
|
556
|
-
|
|
557
|
-
|
|
558
|
-
|
|
559
|
-
|
|
560
|
-
|
|
561
|
-
|
|
562
|
-
|
|
563
|
-
|
|
564
|
-
|
|
565
|
-
|
|
624
|
+
Be as AsyncBoundary,
|
|
625
|
+
Oe as AttachmentInput,
|
|
626
|
+
nt as CampaignsSelectInput,
|
|
627
|
+
at as ClientSelectInput,
|
|
628
|
+
we as ErrorCard,
|
|
629
|
+
rt as FieldCalendar,
|
|
630
|
+
st as FieldCheckbox,
|
|
631
|
+
it as FieldClientSelectInput,
|
|
632
|
+
ot as FieldInput,
|
|
633
|
+
lt as FieldLabelWithAsterisk,
|
|
634
|
+
dt as FieldProfileSelectInput,
|
|
635
|
+
ct as FieldResponsibleSelectInput,
|
|
636
|
+
gt as FieldSaleSelectInput,
|
|
637
|
+
ut as FieldSelect,
|
|
638
|
+
mt as FieldSwitch,
|
|
639
|
+
pt as FieldTextarea,
|
|
640
|
+
Pe as HoverContent,
|
|
641
|
+
Ue as IconBadge,
|
|
642
|
+
xt as Image,
|
|
643
|
+
ht as InfluencerSelectInput,
|
|
644
|
+
bt as InstagramIcon,
|
|
645
|
+
ft as LinkedInIcon,
|
|
646
|
+
Ke as List,
|
|
647
|
+
We as ListRow,
|
|
648
|
+
Ye as MentionInput,
|
|
649
|
+
Ze as MentionText,
|
|
650
|
+
Xe as NotFoundCard,
|
|
651
|
+
yt as PageHeader,
|
|
652
|
+
vt as PageHeaderActions,
|
|
653
|
+
wt as PageHeaderContent,
|
|
654
|
+
kt as PageHeaderDescription,
|
|
655
|
+
Nt as PageHeaderTitle,
|
|
656
|
+
Ct as PinterestIcon,
|
|
657
|
+
St as ProfileSelectInput,
|
|
658
|
+
_t as ResponsibleSelectInput,
|
|
659
|
+
zt as SaleSelectInput,
|
|
660
|
+
Qe as SpeedDialButton,
|
|
661
|
+
Ve as TableSkeleton,
|
|
662
|
+
It as TikTokIcon,
|
|
663
|
+
Je as TwitterIcon,
|
|
664
|
+
Mt as XIcon,
|
|
665
|
+
Rt as YoutubeIcon,
|
|
666
|
+
Ge as getMentionedUsers,
|
|
667
|
+
_e as parseMentions
|
|
566
668
|
};
|