@grapadigital/shared-app-modules 0.0.184 → 0.0.185
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/axios.lib.DebbmKD8.js +38 -0
- package/dist/chuncks/{format.util.B1F-QlvS.js → format.util.B4_t_P84.js} +1 -1
- package/dist/chuncks/organization-users.service.I1WrInGh.js +15 -0
- package/dist/chuncks/{youtube-icon.component.Dasmq5T5.js → youtube-icon.component.BwBMzo2U.js} +329 -340
- package/dist/components.js +140 -145
- package/dist/constants.js +1 -1
- package/dist/events.js +1 -1
- package/dist/hooks.d.ts +17 -0
- package/dist/hooks.js +19 -3
- package/dist/utils.js +4 -4
- package/package.json +1 -1
- package/dist/chuncks/use-shared-app-modules.hook.jCQwZaT8.js +0 -25
package/dist/components.js
CHANGED
|
@@ -1,13 +1,15 @@
|
|
|
1
|
-
import { aZ as h, w as S, c, F as
|
|
1
|
+
import { aZ as h, w as S, c, F as _, B as k, aq as z, ar as M, as as I, bf as H, W as L, X as D, $ as v, _ as j, Y as B, a0 as $ } from "./chuncks/switch.D4GUsewk.js";
|
|
2
2
|
import { jsx as e, jsxs as d, Fragment as T } from "react/jsx-runtime";
|
|
3
3
|
import { QueryErrorResetBoundary as O, useQuery as P } from "@tanstack/react-query";
|
|
4
4
|
import { Suspense as q, useState as F, useRef as A, useEffect as R, useMemo as U } from "react";
|
|
5
|
-
import { n as K,
|
|
6
|
-
import {
|
|
7
|
-
import { S as w, c as V, T as
|
|
8
|
-
import { parseISO as N, differenceInCalendarDays as
|
|
9
|
-
import {
|
|
5
|
+
import { n as K, M as X, o as Q } from "./chuncks/youtube-icon.component.BwBMzo2U.js";
|
|
6
|
+
import { v as Ge, w as Ye, D as Ze, O as Je, E as et, G as tt, F as nt, H as at, J as rt, K as st, L as it, N as ot, u as lt, x as dt, Q as ct, R as gt, p as ut, q as xt, r as bt, s as mt, t as pt, U as ht, y as ft, z as yt, V as wt, X as kt, Y as vt } from "./chuncks/youtube-icon.component.BwBMzo2U.js";
|
|
7
|
+
import { S as w, c as V, T as W, a as G, b as Y, B as Z } from "./chuncks/badge.Cur4Mrd7.js";
|
|
8
|
+
import { parseISO as N, differenceInCalendarDays as J, format as ee } from "date-fns";
|
|
9
|
+
import { u as te, a as ne } from "./chuncks/axios.lib.DebbmKD8.js";
|
|
10
10
|
import "./chuncks/shared-app-modules.provider.DRJ7n4Cj.js";
|
|
11
|
+
import "axios";
|
|
12
|
+
import { l as ae } from "./chuncks/organization-users.service.I1WrInGh.js";
|
|
11
13
|
const re = [
|
|
12
14
|
["circle", { cx: "12", cy: "12", r: "10", key: "1mglay" }],
|
|
13
15
|
["line", { x1: "12", x2: "12", y1: "8", y2: "12", key: "1pkeuh" }],
|
|
@@ -53,16 +55,16 @@ const be = [
|
|
|
53
55
|
["path", { d: "M12 17h.01", key: "p32p05" }]
|
|
54
56
|
], me = h("triangle-alert", be);
|
|
55
57
|
function pe({
|
|
56
|
-
icon:
|
|
58
|
+
icon: a = me,
|
|
57
59
|
title: t = "Algo deu errado",
|
|
58
60
|
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
61
|
onRetry: s,
|
|
60
62
|
tip: i,
|
|
61
|
-
className:
|
|
63
|
+
className: n,
|
|
62
64
|
...o
|
|
63
65
|
}) {
|
|
64
|
-
return /* @__PURE__ */ e(S, { className: c(
|
|
65
|
-
/* @__PURE__ */ e("div", { className: "relative mb-4", children: /* @__PURE__ */ e(
|
|
66
|
+
return /* @__PURE__ */ e(S, { className: c(n), ...o, children: /* @__PURE__ */ d(_, { className: "flex flex-col items-center justify-center px-6 py-12 text-center", children: [
|
|
67
|
+
/* @__PURE__ */ e("div", { className: "relative mb-4", children: /* @__PURE__ */ e(a, { "aria-hidden": "true", className: "text-destructive/60 size-16" }) }),
|
|
66
68
|
/* @__PURE__ */ e("h3", { className: "text-foreground mb-2 text-lg font-semibold", children: t }),
|
|
67
69
|
/* @__PURE__ */ e("p", { className: "text-muted-foreground max-w-md text-sm leading-relaxed", children: r }),
|
|
68
70
|
s && /* @__PURE__ */ d(k, { onClick: s, variant: "outline", className: "mt-6", children: [
|
|
@@ -72,16 +74,16 @@ function pe({
|
|
|
72
74
|
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 }) })
|
|
73
75
|
] }) });
|
|
74
76
|
}
|
|
75
|
-
function
|
|
76
|
-
suspenseFallback:
|
|
77
|
+
function Le({
|
|
78
|
+
suspenseFallback: a = he,
|
|
77
79
|
errorFallback: t = pe,
|
|
78
80
|
children: r
|
|
79
81
|
}) {
|
|
80
|
-
return /* @__PURE__ */ e(q, { fallback: /* @__PURE__ */ e(
|
|
82
|
+
return /* @__PURE__ */ e(q, { fallback: /* @__PURE__ */ e(a, {}), children: /* @__PURE__ */ e(O, { children: ({ reset: s }) => /* @__PURE__ */ e(
|
|
81
83
|
K,
|
|
82
84
|
{
|
|
83
85
|
onReset: s,
|
|
84
|
-
fallbackRender: ({ resetErrorBoundary: i, error:
|
|
86
|
+
fallbackRender: ({ resetErrorBoundary: i, error: n }) => /* @__PURE__ */ e(t, { error: n, onRetry: i }),
|
|
85
87
|
children: r
|
|
86
88
|
}
|
|
87
89
|
) }) });
|
|
@@ -89,20 +91,20 @@ function He({
|
|
|
89
91
|
function he() {
|
|
90
92
|
return /* @__PURE__ */ e(w, { className: "h-[13.75625rem]" });
|
|
91
93
|
}
|
|
92
|
-
function
|
|
93
|
-
content:
|
|
94
|
+
function De({
|
|
95
|
+
content: a,
|
|
94
96
|
align: t,
|
|
95
97
|
asChild: r,
|
|
96
98
|
className: s,
|
|
97
99
|
openDelay: i = 0,
|
|
98
|
-
closeDelay:
|
|
100
|
+
closeDelay: n = 0,
|
|
99
101
|
children: o,
|
|
100
102
|
disabled: l = !1,
|
|
101
103
|
...x
|
|
102
104
|
}) {
|
|
103
|
-
return /* @__PURE__ */ e(T, { children: l === !0 ? o : /* @__PURE__ */ d(
|
|
105
|
+
return /* @__PURE__ */ e(T, { children: l === !0 ? o : /* @__PURE__ */ d(z, { openDelay: i, closeDelay: n, ...x, children: [
|
|
104
106
|
/* @__PURE__ */ e(M, { asChild: r, children: o }),
|
|
105
|
-
/* @__PURE__ */ e(I, { align: t, className: s, children:
|
|
107
|
+
/* @__PURE__ */ e(I, { align: t, className: s, children: a })
|
|
106
108
|
] }) });
|
|
107
109
|
}
|
|
108
110
|
const fe = {
|
|
@@ -159,26 +161,26 @@ const fe = {
|
|
|
159
161
|
lg: "size-6",
|
|
160
162
|
xl: "size-7"
|
|
161
163
|
};
|
|
162
|
-
function
|
|
163
|
-
size:
|
|
164
|
+
function je({
|
|
165
|
+
size: a,
|
|
164
166
|
color: t,
|
|
165
167
|
className: r,
|
|
166
168
|
icon: s,
|
|
167
169
|
filled: i
|
|
168
170
|
}) {
|
|
169
|
-
const
|
|
170
|
-
return /* @__PURE__ */ e("div", { className: c("w-fit p-2 rounded-lg",
|
|
171
|
+
const n = i ? ye[t] : fe[t], o = a ? C[a] : C.md;
|
|
172
|
+
return /* @__PURE__ */ e("div", { className: c("w-fit p-2 rounded-lg", n?.bg, r), children: /* @__PURE__ */ e(s, { className: c(o, n?.text) }) });
|
|
171
173
|
}
|
|
172
|
-
function
|
|
173
|
-
return /* @__PURE__ */ e("div", { className: c("divide-y",
|
|
174
|
+
function Be({ className: a, ...t }) {
|
|
175
|
+
return /* @__PURE__ */ e("div", { className: c("divide-y", a), ...t });
|
|
174
176
|
}
|
|
175
|
-
function
|
|
176
|
-
label:
|
|
177
|
+
function $e({
|
|
178
|
+
label: a,
|
|
177
179
|
value: t,
|
|
178
180
|
tooltip: r,
|
|
179
181
|
highlight: s = !1,
|
|
180
182
|
negative: i = !1,
|
|
181
|
-
positive:
|
|
183
|
+
positive: n = !1,
|
|
182
184
|
isPercentage: o = !1,
|
|
183
185
|
isDate: l = !1,
|
|
184
186
|
isText: x = !1,
|
|
@@ -189,20 +191,20 @@ function je({
|
|
|
189
191
|
}) {
|
|
190
192
|
let b = "";
|
|
191
193
|
if (l && typeof t == "string" && !f && s) {
|
|
192
|
-
const u = N(t), g =
|
|
194
|
+
const u = N(t), g = J(u, /* @__PURE__ */ new Date());
|
|
193
195
|
g > 15 ? b = "bg-yellow-100 font-bold" : g > 7 ? b = "bg-yellow-300 font-bold" : g >= 0 ? b = "bg-red-300 font-bold" : b = "bg-red-500 text-white font-bold";
|
|
194
196
|
} else s && (b = "bg-[#ffe0b2] font-bold");
|
|
195
|
-
return /* @__PURE__ */ e("div", { className: c("px-2 py-1 text-sm", b), children: /* @__PURE__ */ d(
|
|
197
|
+
return /* @__PURE__ */ e("div", { className: c("px-2 py-1 text-sm", b), children: /* @__PURE__ */ d(z, { openDelay: 0, closeDelay: 0, children: [
|
|
196
198
|
/* @__PURE__ */ e(M, { children: /* @__PURE__ */ d("div", { className: "flex justify-between", children: [
|
|
197
199
|
/* @__PURE__ */ d(
|
|
198
200
|
"span",
|
|
199
201
|
{
|
|
200
202
|
className: c(
|
|
201
203
|
"flex flex-row gap-1",
|
|
202
|
-
i ? "text-red-600" :
|
|
204
|
+
i ? "text-red-600" : n ? "text-green-600" : ""
|
|
203
205
|
),
|
|
204
206
|
children: [
|
|
205
|
-
|
|
207
|
+
a,
|
|
206
208
|
" ",
|
|
207
209
|
/* @__PURE__ */ e(se, { className: "size-3.5" })
|
|
208
210
|
]
|
|
@@ -213,10 +215,10 @@ function je({
|
|
|
213
215
|
{
|
|
214
216
|
className: c(
|
|
215
217
|
"flex flex-row justify-end gap-2 text-right",
|
|
216
|
-
i ? "text-red-600" :
|
|
218
|
+
i ? "text-red-600" : n ? "text-green-600" : ""
|
|
217
219
|
),
|
|
218
220
|
children: [
|
|
219
|
-
o && typeof t == "number" ? `${t.toFixed(2)}%` : l && typeof t == "string" ?
|
|
221
|
+
o && typeof t == "number" ? `${t.toFixed(2)}%` : l && typeof t == "string" ? ee(N(t), "dd/MM/yyyy") : x && typeof t == "string" ? t : `R$ ${t.toLocaleString("pt-BR", { minimumFractionDigits: 2, maximumFractionDigits: 2 })}`,
|
|
220
222
|
m && p && /* @__PURE__ */ e(de, { size: 15, onClick: () => p(t) })
|
|
221
223
|
]
|
|
222
224
|
}
|
|
@@ -228,24 +230,24 @@ function je({
|
|
|
228
230
|
align: "start",
|
|
229
231
|
className: c(!y && "pointer-events-none"),
|
|
230
232
|
children: /* @__PURE__ */ d("div", { className: "space-y-0.5", children: [
|
|
231
|
-
/* @__PURE__ */ e("div", { className: "font-medium", children:
|
|
233
|
+
/* @__PURE__ */ e("div", { className: "font-medium", children: a }),
|
|
232
234
|
/* @__PURE__ */ e("div", { className: "font-normal opacity-80", children: r })
|
|
233
235
|
] })
|
|
234
236
|
}
|
|
235
237
|
)
|
|
236
238
|
] }) });
|
|
237
239
|
}
|
|
238
|
-
function
|
|
239
|
-
icon:
|
|
240
|
+
function Oe({
|
|
241
|
+
icon: a = ge,
|
|
240
242
|
title: t,
|
|
241
243
|
description: r,
|
|
242
244
|
tip: s,
|
|
243
245
|
className: i,
|
|
244
|
-
...
|
|
246
|
+
...n
|
|
245
247
|
}) {
|
|
246
|
-
return /* @__PURE__ */ e(S, { className: c(i), ...
|
|
248
|
+
return /* @__PURE__ */ e(S, { className: c(i), ...n, children: /* @__PURE__ */ d(_, { className: "flex flex-col items-center justify-center px-6 py-12 text-center", children: [
|
|
247
249
|
/* @__PURE__ */ e("div", { className: "relative mb-4", children: /* @__PURE__ */ e(
|
|
248
|
-
|
|
250
|
+
a,
|
|
249
251
|
{
|
|
250
252
|
"aria-hidden": "true",
|
|
251
253
|
className: "size-16 text-muted-foreground/40"
|
|
@@ -256,20 +258,20 @@ function Be({
|
|
|
256
258
|
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 }) })
|
|
257
259
|
] }) });
|
|
258
260
|
}
|
|
259
|
-
function
|
|
260
|
-
actions:
|
|
261
|
+
function Pe({
|
|
262
|
+
actions: a,
|
|
261
263
|
icon: t = oe
|
|
262
264
|
}) {
|
|
263
265
|
const [r, s] = F(!1), i = A(null);
|
|
264
266
|
return R(() => {
|
|
265
267
|
if (!r) return;
|
|
266
|
-
const
|
|
268
|
+
const n = (l) => {
|
|
267
269
|
i.current?.contains(l.target) || s(!1);
|
|
268
270
|
}, o = (l) => {
|
|
269
271
|
l.key === "Escape" && s(!1);
|
|
270
272
|
};
|
|
271
|
-
return document.addEventListener("mousedown",
|
|
272
|
-
document.removeEventListener("mousedown",
|
|
273
|
+
return document.addEventListener("mousedown", n), document.addEventListener("keydown", o), () => {
|
|
274
|
+
document.removeEventListener("mousedown", n), document.removeEventListener("keydown", o);
|
|
273
275
|
};
|
|
274
276
|
}, [r]), /* @__PURE__ */ e(V, { children: /* @__PURE__ */ d(
|
|
275
277
|
"div",
|
|
@@ -277,7 +279,7 @@ function Oe({
|
|
|
277
279
|
ref: i,
|
|
278
280
|
className: "fixed bottom-6 right-6 z-50 flex flex-col items-end gap-3",
|
|
279
281
|
children: [
|
|
280
|
-
/* @__PURE__ */ e("div", { className: "flex flex-col items-end gap-3", children:
|
|
282
|
+
/* @__PURE__ */ e("div", { className: "flex flex-col items-end gap-3", children: a.map((n, o) => /* @__PURE__ */ e(
|
|
281
283
|
"div",
|
|
282
284
|
{
|
|
283
285
|
className: c(
|
|
@@ -285,28 +287,28 @@ function Oe({
|
|
|
285
287
|
r ? "translate-y-0 opacity-100" : "pointer-events-none translate-y-2 opacity-0"
|
|
286
288
|
),
|
|
287
289
|
style: { transitionDelay: r ? `${o * 30}ms` : "0ms" },
|
|
288
|
-
children: /* @__PURE__ */ d(
|
|
289
|
-
/* @__PURE__ */ e(
|
|
290
|
+
children: /* @__PURE__ */ d(W, { children: [
|
|
291
|
+
/* @__PURE__ */ e(G, { asChild: !0, children: /* @__PURE__ */ e(
|
|
290
292
|
k,
|
|
291
293
|
{
|
|
292
294
|
size: "icon",
|
|
293
295
|
variant: "outline",
|
|
294
|
-
disabled:
|
|
295
|
-
"aria-disabled":
|
|
296
|
+
disabled: n.disabled,
|
|
297
|
+
"aria-disabled": n.disabled,
|
|
296
298
|
className: c(
|
|
297
299
|
"size-11 rounded-full shadow-md",
|
|
298
|
-
|
|
300
|
+
n.disabled && "opacity-50"
|
|
299
301
|
),
|
|
300
302
|
onClick: () => {
|
|
301
|
-
|
|
303
|
+
n.disabled || (n.onClick(), s(!1));
|
|
302
304
|
},
|
|
303
|
-
children: /* @__PURE__ */ e(
|
|
305
|
+
children: /* @__PURE__ */ e(n.icon, { className: "size-5" })
|
|
304
306
|
}
|
|
305
307
|
) }),
|
|
306
|
-
/* @__PURE__ */ e(
|
|
308
|
+
/* @__PURE__ */ e(Y, { side: "left", children: n.label })
|
|
307
309
|
] })
|
|
308
310
|
},
|
|
309
|
-
|
|
311
|
+
n.label
|
|
310
312
|
)) }),
|
|
311
313
|
/* @__PURE__ */ e(
|
|
312
314
|
k,
|
|
@@ -316,7 +318,7 @@ function Oe({
|
|
|
316
318
|
className: "size-11 rounded-full shadow-md",
|
|
317
319
|
"aria-label": r ? "Fechar menu de ajuda" : "Abrir menu de ajuda",
|
|
318
320
|
"aria-expanded": r,
|
|
319
|
-
onClick: () => s((
|
|
321
|
+
onClick: () => s((n) => !n),
|
|
320
322
|
children: r ? /* @__PURE__ */ e(H, { className: "size-5" }) : /* @__PURE__ */ e(t, { className: "size-5" })
|
|
321
323
|
}
|
|
322
324
|
)
|
|
@@ -324,17 +326,17 @@ function Oe({
|
|
|
324
326
|
}
|
|
325
327
|
) });
|
|
326
328
|
}
|
|
327
|
-
function
|
|
328
|
-
columns:
|
|
329
|
+
function qe({
|
|
330
|
+
columns: a = 9,
|
|
329
331
|
rows: t = 20,
|
|
330
332
|
hasActions: r = !1,
|
|
331
333
|
actionsCount: s = 1
|
|
332
334
|
}) {
|
|
333
335
|
return /* @__PURE__ */ d(L, { children: [
|
|
334
|
-
/* @__PURE__ */ e(D, { children: /* @__PURE__ */ e(v, { children: Array.from({ length:
|
|
335
|
-
const o = r &&
|
|
336
|
+
/* @__PURE__ */ e(D, { children: /* @__PURE__ */ e(v, { children: Array.from({ length: a }).map((i, n) => {
|
|
337
|
+
const o = r && n === a - 1;
|
|
336
338
|
return /* @__PURE__ */ e(
|
|
337
|
-
|
|
339
|
+
j,
|
|
338
340
|
{
|
|
339
341
|
className: o ? "w-0 text-right" : "",
|
|
340
342
|
children: /* @__PURE__ */ e(
|
|
@@ -344,49 +346,42 @@ function Pe({
|
|
|
344
346
|
}
|
|
345
347
|
)
|
|
346
348
|
},
|
|
347
|
-
|
|
349
|
+
n
|
|
348
350
|
);
|
|
349
351
|
}) }) }),
|
|
350
|
-
/* @__PURE__ */ e(
|
|
351
|
-
const x = r && l ===
|
|
352
|
-
return /* @__PURE__ */ e(
|
|
353
|
-
}) },
|
|
352
|
+
/* @__PURE__ */ e(B, { children: Array.from({ length: t }).map((i, n) => /* @__PURE__ */ e(v, { className: "h-[3.05rem]", children: Array.from({ length: a }).map((o, l) => {
|
|
353
|
+
const x = r && l === a - 1;
|
|
354
|
+
return /* @__PURE__ */ e($, { children: x ? /* @__PURE__ */ e("div", { className: "flex gap-2", children: Array.from({ length: s }).map((f, m) => /* @__PURE__ */ e(w, { className: "ml-auto size-8" }, m)) }) : /* @__PURE__ */ e(w, { className: "h-4 w-full" }) }, l);
|
|
355
|
+
}) }, n)) })
|
|
354
356
|
] });
|
|
355
357
|
}
|
|
356
358
|
const we = "@[__display__](__id__)", E = /@\[([^\]]+)\]\(([^)]+)\)/g;
|
|
357
|
-
function ke(
|
|
359
|
+
function ke(a) {
|
|
358
360
|
const t = [], r = new RegExp(E);
|
|
359
361
|
let s;
|
|
360
|
-
for (; (s = r.exec(
|
|
362
|
+
for (; (s = r.exec(a)) !== null; )
|
|
361
363
|
t.push({ display: s[1], id: s[2] });
|
|
362
364
|
return t;
|
|
363
365
|
}
|
|
364
|
-
function
|
|
365
|
-
return ke(
|
|
366
|
+
function Ue(a) {
|
|
367
|
+
return ke(a).map((t) => ({
|
|
366
368
|
userId: t.id,
|
|
367
369
|
username: t.display
|
|
368
370
|
}));
|
|
369
371
|
}
|
|
370
|
-
|
|
371
|
-
|
|
372
|
-
search: t,
|
|
373
|
-
environment: r
|
|
374
|
-
}) => (await W(r).get(`/organizations/${n}/users`, {
|
|
375
|
-
params: { q: t }
|
|
376
|
-
})).data;
|
|
377
|
-
function Ne(n, t) {
|
|
378
|
-
const { environments: r } = ne();
|
|
372
|
+
function ve(a, t) {
|
|
373
|
+
const { environments: r } = te();
|
|
379
374
|
return P({
|
|
380
|
-
queryKey: ["organization-users",
|
|
381
|
-
queryFn: () =>
|
|
382
|
-
organizationId:
|
|
375
|
+
queryKey: ["organization-users", a, t],
|
|
376
|
+
queryFn: () => ae({
|
|
377
|
+
organizationId: a,
|
|
383
378
|
search: t,
|
|
384
379
|
environment: r.VITE_BACKEND_API_ORGANIZATION_URL ?? ""
|
|
385
380
|
}),
|
|
386
|
-
enabled:
|
|
381
|
+
enabled: a.length > 0 && t.length > 0
|
|
387
382
|
});
|
|
388
383
|
}
|
|
389
|
-
const
|
|
384
|
+
const Ne = {
|
|
390
385
|
control: {
|
|
391
386
|
fontSize: 14,
|
|
392
387
|
fontWeight: "normal"
|
|
@@ -438,23 +433,23 @@ const Ce = {
|
|
|
438
433
|
}
|
|
439
434
|
}
|
|
440
435
|
}
|
|
441
|
-
},
|
|
436
|
+
}, Ce = {
|
|
442
437
|
backgroundColor: "var(--accent, #dbeafe)",
|
|
443
438
|
color: "var(--accent-foreground, #1d4ed8)",
|
|
444
439
|
fontWeight: 600,
|
|
445
440
|
borderRadius: 4,
|
|
446
441
|
padding: "1px 2px"
|
|
447
442
|
};
|
|
448
|
-
function
|
|
449
|
-
value:
|
|
443
|
+
function Ke({
|
|
444
|
+
value: a,
|
|
450
445
|
onChange: t,
|
|
451
446
|
onBlur: r,
|
|
452
447
|
organizationId: s,
|
|
453
448
|
placeholder: i,
|
|
454
|
-
disabled:
|
|
449
|
+
disabled: n,
|
|
455
450
|
singleLine: o = !1
|
|
456
451
|
}) {
|
|
457
|
-
const [l, x] = F(""), f =
|
|
452
|
+
const [l, x] = F(""), f = ne(l, 200), { data: m } = ve(s, f), y = A(void 0), p = U(
|
|
458
453
|
() => m?.map((u) => ({ id: u._id, display: u.username })) ?? [],
|
|
459
454
|
[m]
|
|
460
455
|
);
|
|
@@ -463,14 +458,14 @@ function Ue({
|
|
|
463
458
|
}, [p]), /* @__PURE__ */ e(
|
|
464
459
|
X,
|
|
465
460
|
{
|
|
466
|
-
value:
|
|
461
|
+
value: a,
|
|
467
462
|
onChange: (u, g) => t(g),
|
|
468
463
|
onBlur: r,
|
|
469
464
|
placeholder: i,
|
|
470
|
-
disabled:
|
|
465
|
+
disabled: n,
|
|
471
466
|
singleLine: o,
|
|
472
467
|
allowSuggestionsAboveCursor: !0,
|
|
473
|
-
style:
|
|
468
|
+
style: Ne,
|
|
474
469
|
children: /* @__PURE__ */ e(
|
|
475
470
|
Q,
|
|
476
471
|
{
|
|
@@ -481,28 +476,28 @@ function Ue({
|
|
|
481
476
|
},
|
|
482
477
|
displayTransform: (u, g) => `@${g}`,
|
|
483
478
|
appendSpaceOnAdd: !0,
|
|
484
|
-
style:
|
|
479
|
+
style: Ce
|
|
485
480
|
}
|
|
486
481
|
)
|
|
487
482
|
}
|
|
488
483
|
);
|
|
489
484
|
}
|
|
490
|
-
function
|
|
485
|
+
function Xe({ text: a, className: t }) {
|
|
491
486
|
const r = new RegExp(E), s = [];
|
|
492
|
-
let i = 0,
|
|
493
|
-
for (; (
|
|
494
|
-
|
|
495
|
-
/* @__PURE__ */ e("span", { children:
|
|
487
|
+
let i = 0, n, o = 0;
|
|
488
|
+
for (; (n = r.exec(a)) !== null; )
|
|
489
|
+
n.index > i && s.push(
|
|
490
|
+
/* @__PURE__ */ e("span", { children: a.slice(i, n.index) }, o++)
|
|
496
491
|
), s.push(
|
|
497
|
-
/* @__PURE__ */ d(
|
|
492
|
+
/* @__PURE__ */ d(Z, { variant: "secondary", className: t, children: [
|
|
498
493
|
"@",
|
|
499
|
-
|
|
494
|
+
n[1]
|
|
500
495
|
] }, o++)
|
|
501
|
-
), i =
|
|
502
|
-
return i <
|
|
496
|
+
), i = n.index + n[0].length;
|
|
497
|
+
return i < a.length && s.push(/* @__PURE__ */ e("span", { children: a.slice(i) }, o++)), /* @__PURE__ */ e(T, { children: s });
|
|
503
498
|
}
|
|
504
|
-
function
|
|
505
|
-
size:
|
|
499
|
+
function Qe({
|
|
500
|
+
size: a = 24,
|
|
506
501
|
color: t = "currentColor",
|
|
507
502
|
...r
|
|
508
503
|
}) {
|
|
@@ -510,8 +505,8 @@ function We({
|
|
|
510
505
|
"svg",
|
|
511
506
|
{
|
|
512
507
|
xmlns: "http://www.w3.org/2000/svg",
|
|
513
|
-
width:
|
|
514
|
-
height:
|
|
508
|
+
width: a,
|
|
509
|
+
height: a,
|
|
515
510
|
viewBox: "0 0 24 24",
|
|
516
511
|
fill: "none",
|
|
517
512
|
stroke: t,
|
|
@@ -525,45 +520,45 @@ function We({
|
|
|
525
520
|
);
|
|
526
521
|
}
|
|
527
522
|
export {
|
|
528
|
-
|
|
529
|
-
|
|
530
|
-
|
|
523
|
+
Le as AsyncBoundary,
|
|
524
|
+
Ge as CampaignsSelectInput,
|
|
525
|
+
Ye as ClientSelectInput,
|
|
531
526
|
pe as ErrorCard,
|
|
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
|
-
|
|
566
|
-
|
|
567
|
-
|
|
527
|
+
Ze as FieldCalendar,
|
|
528
|
+
Je as FieldCheckbox,
|
|
529
|
+
et as FieldClientSelectInput,
|
|
530
|
+
tt as FieldInput,
|
|
531
|
+
nt as FieldLabelWithAsterisk,
|
|
532
|
+
at as FieldProfileSelectInput,
|
|
533
|
+
rt as FieldSaleSelectInput,
|
|
534
|
+
st as FieldSelect,
|
|
535
|
+
it as FieldSwitch,
|
|
536
|
+
ot as FieldTextarea,
|
|
537
|
+
De as HoverContent,
|
|
538
|
+
je as IconBadge,
|
|
539
|
+
lt as Image,
|
|
540
|
+
dt as InfluencerSelectInput,
|
|
541
|
+
ct as InstagramIcon,
|
|
542
|
+
gt as LinkedInIcon,
|
|
543
|
+
Be as List,
|
|
544
|
+
$e as ListRow,
|
|
545
|
+
Ke as MentionInput,
|
|
546
|
+
Xe as MentionText,
|
|
547
|
+
Oe as NotFoundCard,
|
|
548
|
+
ut as PageHeader,
|
|
549
|
+
xt as PageHeaderActions,
|
|
550
|
+
bt as PageHeaderContent,
|
|
551
|
+
mt as PageHeaderDescription,
|
|
552
|
+
pt as PageHeaderTitle,
|
|
553
|
+
ht as PinterestIcon,
|
|
554
|
+
ft as ProfileSelectInput,
|
|
555
|
+
yt as SaleSelectInput,
|
|
556
|
+
Pe as SpeedDialButton,
|
|
557
|
+
qe as TableSkeleton,
|
|
558
|
+
wt as TikTokIcon,
|
|
559
|
+
Qe as TwitterIcon,
|
|
560
|
+
kt as XIcon,
|
|
561
|
+
vt as YoutubeIcon,
|
|
562
|
+
Ue as getMentionedUsers,
|
|
568
563
|
ke as parseMentions
|
|
569
564
|
};
|
package/dist/constants.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { a as r, A as s, B as T, C as n, I as O, c as L, P as N, b as c, d as I, S as U, T as P } from "./chuncks/youtube-icon.component.
|
|
1
|
+
import { a as r, A as s, B as T, C as n, I as O, c as L, P as N, b as c, d as I, S as U, T as P } from "./chuncks/youtube-icon.component.BwBMzo2U.js";
|
|
2
2
|
const o = "Não há dados para atualizar.", a = "O filtro selecionado já está ativo. Por favor, escolha outro filtro antes de tentar novamente.", E = "Nenhum dado novo foi informado para realizar a operação. Por favor, atualize os campos antes de tentar novamente.", _ = "Não foi possível concluir a operação. Tente novamente mais tarde ou entre em contato com o suporte.", A = "Há um erro na validação dos campos. Por favor, entre em contato com o suporte.", e = "Campo obrigatório.";
|
|
3
3
|
export {
|
|
4
4
|
r as ACTION_STATUS_VALUES,
|
package/dist/events.js
CHANGED
package/dist/hooks.d.ts
CHANGED
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
import { UseQueryResult } from '@tanstack/react-query';
|
|
2
|
+
|
|
1
3
|
declare interface Environments {
|
|
2
4
|
readonly VITE_BACKEND_API_CAMPAIGNS_URL?: string;
|
|
3
5
|
readonly VITE_BACKEND_API_INFLUENCERS_URL?: string;
|
|
@@ -7,6 +9,19 @@ declare interface Environments {
|
|
|
7
9
|
readonly VITE_BACKEND_API_ORGANIZATION_URL?: string;
|
|
8
10
|
}
|
|
9
11
|
|
|
12
|
+
export declare interface OrganizationUserResult {
|
|
13
|
+
_id: string;
|
|
14
|
+
organization: string;
|
|
15
|
+
name: string;
|
|
16
|
+
email: string;
|
|
17
|
+
username: string;
|
|
18
|
+
team: string;
|
|
19
|
+
role: string;
|
|
20
|
+
disabled: boolean;
|
|
21
|
+
createdAt: string;
|
|
22
|
+
updatedAt: string;
|
|
23
|
+
}
|
|
24
|
+
|
|
10
25
|
declare interface SharedAppModulesContextData {
|
|
11
26
|
environments: Environments;
|
|
12
27
|
}
|
|
@@ -23,6 +38,8 @@ declare interface SharedAppModulesContextData {
|
|
|
23
38
|
*/
|
|
24
39
|
export declare function useDebounce<T>(value: T, delay?: number): T;
|
|
25
40
|
|
|
41
|
+
export declare function useOrganizationResponsibleUsers(organizationId?: string): UseQueryResult<OrganizationUserResult[], Error>;
|
|
42
|
+
|
|
26
43
|
export declare function useSharedAppModules(): SharedAppModulesContextData;
|
|
27
44
|
|
|
28
45
|
export { }
|
package/dist/hooks.js
CHANGED
|
@@ -1,5 +1,21 @@
|
|
|
1
|
-
import { u
|
|
1
|
+
import { u as s } from "./chuncks/axios.lib.DebbmKD8.js";
|
|
2
|
+
import { a as l } from "./chuncks/axios.lib.DebbmKD8.js";
|
|
3
|
+
import { useQuery as o } from "@tanstack/react-query";
|
|
4
|
+
import { l as n } from "./chuncks/organization-users.service.I1WrInGh.js";
|
|
5
|
+
function a(e) {
|
|
6
|
+
const { environments: r } = s();
|
|
7
|
+
return o({
|
|
8
|
+
queryKey: ["organization-users", e, "responsible"],
|
|
9
|
+
queryFn: () => n({
|
|
10
|
+
organizationId: e,
|
|
11
|
+
active: !0,
|
|
12
|
+
environment: r.VITE_BACKEND_API_ORGANIZATION_URL ?? ""
|
|
13
|
+
}),
|
|
14
|
+
enabled: !!e
|
|
15
|
+
});
|
|
16
|
+
}
|
|
2
17
|
export {
|
|
3
|
-
|
|
4
|
-
a as
|
|
18
|
+
l as useDebounce,
|
|
19
|
+
a as useOrganizationResponsibleUsers,
|
|
20
|
+
s as useSharedAppModules
|
|
5
21
|
};
|
package/dist/utils.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { U as t } from "./chuncks/format.util.
|
|
2
|
-
import { g as y, h as k, f as C, b as E, d as L, m as P, c as _, e as O, a as D, p as I, u as U } from "./chuncks/format.util.
|
|
3
|
-
import { e as s } from "./chuncks/youtube-icon.component.
|
|
4
|
-
import { m as j, h as N, g as q, k as x, i as F, l as T, j as A, f as G } from "./chuncks/youtube-icon.component.
|
|
1
|
+
import { U as t } from "./chuncks/format.util.B4_t_P84.js";
|
|
2
|
+
import { g as y, h as k, f as C, b as E, d as L, m as P, c as _, e as O, a as D, p as I, u as U } from "./chuncks/format.util.B4_t_P84.js";
|
|
3
|
+
import { e as s } from "./chuncks/youtube-icon.component.BwBMzo2U.js";
|
|
4
|
+
import { m as j, h as N, g as q, k as x, i as F, l as T, j as A, f as G } from "./chuncks/youtube-icon.component.BwBMzo2U.js";
|
|
5
5
|
const a = (e) => e ? `${e} é obrigatório.` : "Campo obrigatório.", o = (e, r) => r ? `${r} deve ter no mínimo ${e} caracteres.` : `Deve ter no mínimo ${e} caracteres.`, n = (e, r) => r ? `${r} deve ter no máximo ${e} caracteres.` : `Deve ter no máximo ${e} caracteres.`, i = (e, r) => r ? `${r} não pode ser menor que ${e}.` : `Não pode ser menor que ${e}.`, m = (e, r) => r ? `${r} não pode ser maior que ${e}.` : `Não pode ser maior que ${e}.`, u = (e) => e ? `${e} inválido.` : "Valor inválido.", c = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
6
6
|
__proto__: null,
|
|
7
7
|
invalidMessage: u,
|