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