@grapadigital/shared-app-modules 0.0.183 → 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/assets/switch.css +1 -1
- 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.d.ts +12 -1
- package/dist/components.js +176 -150
- 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.d.ts
CHANGED
|
@@ -399,6 +399,12 @@ declare interface FormalizationInterface {
|
|
|
399
399
|
totalInstallments: number;
|
|
400
400
|
}
|
|
401
401
|
|
|
402
|
+
/**
|
|
403
|
+
* Extrai as menções no formato { userId, username } esperado pelo campo
|
|
404
|
+
* `mentioneds` das APIs (api-sales, api-campaigns, api-invoices, api-payments).
|
|
405
|
+
*/
|
|
406
|
+
export declare function getMentionedUsers(text: string): MentionedUser[];
|
|
407
|
+
|
|
402
408
|
export declare function HoverContent({ content, align, asChild, className, openDelay, closeDelay, children, disabled, ...props }: HoverContentProps): JSX.Element;
|
|
403
409
|
|
|
404
410
|
declare interface HoverContentProps extends HoverCardProps {
|
|
@@ -542,6 +548,11 @@ declare interface LostInterface {
|
|
|
542
548
|
details?: string;
|
|
543
549
|
}
|
|
544
550
|
|
|
551
|
+
export declare interface MentionedUser {
|
|
552
|
+
userId: string;
|
|
553
|
+
username: string;
|
|
554
|
+
}
|
|
555
|
+
|
|
545
556
|
export declare function MentionInput({ value, onChange, onBlur, organizationId, placeholder, disabled, singleLine, }: MentionInputProps): JSX.Element;
|
|
546
557
|
|
|
547
558
|
declare interface MentionInputProps {
|
|
@@ -551,7 +562,7 @@ declare interface MentionInputProps {
|
|
|
551
562
|
organizationId: string;
|
|
552
563
|
placeholder?: string;
|
|
553
564
|
disabled?: boolean;
|
|
554
|
-
/** @default
|
|
565
|
+
/** @default false — renderiza como textarea multi-linha */
|
|
555
566
|
singleLine?: boolean;
|
|
556
567
|
}
|
|
557
568
|
|
package/dist/components.js
CHANGED
|
@@ -1,27 +1,29 @@
|
|
|
1
|
-
import { aZ 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
|
-
import { Suspense as q, useState as F, useRef as A, useEffect as R, useMemo as
|
|
5
|
-
import { n as
|
|
6
|
-
import {
|
|
7
|
-
import { S as w, c as
|
|
8
|
-
import { parseISO as
|
|
9
|
-
import {
|
|
4
|
+
import { Suspense as q, useState as F, useRef as A, useEffect as R, useMemo as U } from "react";
|
|
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" }],
|
|
14
16
|
["line", { x1: "12", x2: "12.01", y1: "16", y2: "16", key: "4dfq90" }]
|
|
15
|
-
], se =
|
|
17
|
+
], se = h("circle-alert", re);
|
|
16
18
|
const ie = [
|
|
17
19
|
["circle", { cx: "12", cy: "12", r: "10", key: "1mglay" }],
|
|
18
20
|
["path", { d: "M9.09 9a3 3 0 0 1 5.83 1c0 2-3 3-3 3", key: "1u773s" }],
|
|
19
21
|
["path", { d: "M12 17h.01", key: "p32p05" }]
|
|
20
|
-
],
|
|
21
|
-
const
|
|
22
|
+
], oe = h("circle-question-mark", ie);
|
|
23
|
+
const le = [
|
|
22
24
|
["rect", { width: "14", height: "14", x: "8", y: "8", rx: "2", ry: "2", key: "17jyea" }],
|
|
23
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" }]
|
|
24
|
-
], de =
|
|
26
|
+
], de = h("copy", le);
|
|
25
27
|
const ce = [
|
|
26
28
|
[
|
|
27
29
|
"path",
|
|
@@ -34,14 +36,14 @@ const ce = [
|
|
|
34
36
|
["path", { d: "M10 9H8", key: "b1mrlr" }],
|
|
35
37
|
["path", { d: "M16 13H8", key: "t4e002" }],
|
|
36
38
|
["path", { d: "M16 17H8", key: "z1uh3a" }]
|
|
37
|
-
], ge =
|
|
39
|
+
], ge = h("file-text", ce);
|
|
38
40
|
const ue = [
|
|
39
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" }],
|
|
40
42
|
["path", { d: "M21 3v5h-5", key: "1q7to0" }],
|
|
41
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" }],
|
|
42
44
|
["path", { d: "M8 16H3v5", key: "1cv678" }]
|
|
43
|
-
], xe =
|
|
44
|
-
const
|
|
45
|
+
], xe = h("refresh-cw", ue);
|
|
46
|
+
const be = [
|
|
45
47
|
[
|
|
46
48
|
"path",
|
|
47
49
|
{
|
|
@@ -51,17 +53,17 @@ const me = [
|
|
|
51
53
|
],
|
|
52
54
|
["path", { d: "M12 9v4", key: "juzpu7" }],
|
|
53
55
|
["path", { d: "M12 17h.01", key: "p32p05" }]
|
|
54
|
-
],
|
|
55
|
-
function
|
|
56
|
-
icon: a =
|
|
56
|
+
], me = h("triangle-alert", be);
|
|
57
|
+
function pe({
|
|
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
63
|
className: n,
|
|
62
|
-
...
|
|
64
|
+
...o
|
|
63
65
|
}) {
|
|
64
|
-
return /* @__PURE__ */ e(S, { className: c(n), ...
|
|
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: [
|
|
65
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 }),
|
|
@@ -72,13 +74,13 @@ function he({
|
|
|
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: a =
|
|
77
|
-
errorFallback: t =
|
|
77
|
+
function Le({
|
|
78
|
+
suspenseFallback: a = he,
|
|
79
|
+
errorFallback: t = pe,
|
|
78
80
|
children: r
|
|
79
81
|
}) {
|
|
80
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
86
|
fallbackRender: ({ resetErrorBoundary: i, error: n }) => /* @__PURE__ */ e(t, { error: n, onRetry: i }),
|
|
@@ -86,22 +88,22 @@ function Ee({
|
|
|
86
88
|
}
|
|
87
89
|
) }) });
|
|
88
90
|
}
|
|
89
|
-
function
|
|
91
|
+
function he() {
|
|
90
92
|
return /* @__PURE__ */ e(w, { className: "h-[13.75625rem]" });
|
|
91
93
|
}
|
|
92
|
-
function
|
|
94
|
+
function De({
|
|
93
95
|
content: a,
|
|
94
96
|
align: t,
|
|
95
97
|
asChild: r,
|
|
96
98
|
className: s,
|
|
97
99
|
openDelay: i = 0,
|
|
98
100
|
closeDelay: n = 0,
|
|
99
|
-
children:
|
|
100
|
-
disabled:
|
|
101
|
+
children: o,
|
|
102
|
+
disabled: l = !1,
|
|
101
103
|
...x
|
|
102
104
|
}) {
|
|
103
|
-
return /* @__PURE__ */ e(T, { children:
|
|
104
|
-
/* @__PURE__ */ e(M, { asChild: r, children:
|
|
105
|
+
return /* @__PURE__ */ e(T, { children: l === !0 ? o : /* @__PURE__ */ d(z, { openDelay: i, closeDelay: n, ...x, children: [
|
|
106
|
+
/* @__PURE__ */ e(M, { asChild: r, children: o }),
|
|
105
107
|
/* @__PURE__ */ e(I, { align: t, className: s, children: a })
|
|
106
108
|
] }) });
|
|
107
109
|
}
|
|
@@ -159,17 +161,17 @@ const fe = {
|
|
|
159
161
|
lg: "size-6",
|
|
160
162
|
xl: "size-7"
|
|
161
163
|
};
|
|
162
|
-
function
|
|
164
|
+
function je({
|
|
163
165
|
size: a,
|
|
164
166
|
color: t,
|
|
165
167
|
className: r,
|
|
166
168
|
icon: s,
|
|
167
169
|
filled: i
|
|
168
170
|
}) {
|
|
169
|
-
const n = i ? ye[t] : fe[t],
|
|
170
|
-
return /* @__PURE__ */ e("div", { className: c("w-fit p-2 rounded-lg", n?.bg, r), children: /* @__PURE__ */ e(s, { className: c(
|
|
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
|
|
174
|
+
function Be({ className: a, ...t }) {
|
|
173
175
|
return /* @__PURE__ */ e("div", { className: c("divide-y", a), ...t });
|
|
174
176
|
}
|
|
175
177
|
function $e({
|
|
@@ -179,20 +181,20 @@ function $e({
|
|
|
179
181
|
highlight: s = !1,
|
|
180
182
|
negative: i = !1,
|
|
181
183
|
positive: n = !1,
|
|
182
|
-
isPercentage:
|
|
183
|
-
isDate:
|
|
184
|
+
isPercentage: o = !1,
|
|
185
|
+
isDate: l = !1,
|
|
184
186
|
isText: x = !1,
|
|
185
187
|
isInvoiced: f = !1,
|
|
186
|
-
hasCopyButton:
|
|
188
|
+
hasCopyButton: m = !1,
|
|
187
189
|
enableHoverableContent: y = !1,
|
|
188
|
-
handleCopy:
|
|
190
|
+
handleCopy: p
|
|
189
191
|
}) {
|
|
190
|
-
let
|
|
191
|
-
if (
|
|
192
|
-
const u =
|
|
193
|
-
g > 15 ?
|
|
194
|
-
} else s && (
|
|
195
|
-
return /* @__PURE__ */ e("div", { className: c("px-2 py-1 text-sm",
|
|
192
|
+
let b = "";
|
|
193
|
+
if (l && typeof t == "string" && !f && s) {
|
|
194
|
+
const u = N(t), g = J(u, /* @__PURE__ */ new Date());
|
|
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";
|
|
196
|
+
} else s && (b = "bg-[#ffe0b2] font-bold");
|
|
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",
|
|
@@ -216,8 +218,8 @@ function $e({
|
|
|
216
218
|
i ? "text-red-600" : n ? "text-green-600" : ""
|
|
217
219
|
),
|
|
218
220
|
children: [
|
|
219
|
-
|
|
220
|
-
|
|
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 })}`,
|
|
222
|
+
m && p && /* @__PURE__ */ e(de, { size: 15, onClick: () => p(t) })
|
|
221
223
|
]
|
|
222
224
|
}
|
|
223
225
|
)
|
|
@@ -235,7 +237,7 @@ function $e({
|
|
|
235
237
|
)
|
|
236
238
|
] }) });
|
|
237
239
|
}
|
|
238
|
-
function
|
|
240
|
+
function Oe({
|
|
239
241
|
icon: a = ge,
|
|
240
242
|
title: t,
|
|
241
243
|
description: r,
|
|
@@ -243,7 +245,7 @@ function je({
|
|
|
243
245
|
className: i,
|
|
244
246
|
...n
|
|
245
247
|
}) {
|
|
246
|
-
return /* @__PURE__ */ e(S, { className: c(i), ...n, children: /* @__PURE__ */ d(
|
|
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
|
{
|
|
@@ -256,37 +258,37 @@ function je({
|
|
|
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
|
|
261
|
+
function Pe({
|
|
260
262
|
actions: a,
|
|
261
|
-
icon: t =
|
|
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 n = (
|
|
267
|
-
i.current?.contains(
|
|
268
|
-
},
|
|
269
|
-
|
|
268
|
+
const n = (l) => {
|
|
269
|
+
i.current?.contains(l.target) || s(!1);
|
|
270
|
+
}, o = (l) => {
|
|
271
|
+
l.key === "Escape" && s(!1);
|
|
270
272
|
};
|
|
271
|
-
return document.addEventListener("mousedown", n), document.addEventListener("keydown",
|
|
272
|
-
document.removeEventListener("mousedown", n), document.removeEventListener("keydown",
|
|
273
|
+
return document.addEventListener("mousedown", n), document.addEventListener("keydown", o), () => {
|
|
274
|
+
document.removeEventListener("mousedown", n), document.removeEventListener("keydown", o);
|
|
273
275
|
};
|
|
274
|
-
}, [r]), /* @__PURE__ */ e(
|
|
276
|
+
}, [r]), /* @__PURE__ */ e(V, { children: /* @__PURE__ */ d(
|
|
275
277
|
"div",
|
|
276
278
|
{
|
|
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: a.map((n,
|
|
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(
|
|
284
286
|
"transition-all duration-200 ease-out",
|
|
285
287
|
r ? "translate-y-0 opacity-100" : "pointer-events-none translate-y-2 opacity-0"
|
|
286
288
|
),
|
|
287
|
-
style: { transitionDelay: r ? `${
|
|
289
|
+
style: { transitionDelay: r ? `${o * 30}ms` : "0ms" },
|
|
288
290
|
children: /* @__PURE__ */ d(W, { children: [
|
|
289
|
-
/* @__PURE__ */ e(
|
|
291
|
+
/* @__PURE__ */ e(G, { asChild: !0, children: /* @__PURE__ */ e(
|
|
290
292
|
k,
|
|
291
293
|
{
|
|
292
294
|
size: "icon",
|
|
@@ -303,7 +305,7 @@ function Be({
|
|
|
303
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
|
|
@@ -324,55 +326,54 @@ function Be({
|
|
|
324
326
|
}
|
|
325
327
|
) });
|
|
326
328
|
}
|
|
327
|
-
function
|
|
329
|
+
function qe({
|
|
328
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(
|
|
335
|
-
const
|
|
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
|
-
className:
|
|
341
|
+
className: o ? "w-0 text-right" : "",
|
|
340
342
|
children: /* @__PURE__ */ e(
|
|
341
343
|
w,
|
|
342
344
|
{
|
|
343
|
-
className:
|
|
345
|
+
className: o ? "ml-auto h-4 w-8" : "h-4 w-[60%]"
|
|
344
346
|
}
|
|
345
347
|
)
|
|
346
348
|
},
|
|
347
349
|
n
|
|
348
350
|
);
|
|
349
351
|
}) }) }),
|
|
350
|
-
/* @__PURE__ */ e(
|
|
351
|
-
const x = r &&
|
|
352
|
-
return /* @__PURE__ */ e(
|
|
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);
|
|
353
355
|
}) }, n)) })
|
|
354
356
|
] });
|
|
355
357
|
}
|
|
356
358
|
const we = "@[__display__](__id__)", E = /@\[([^\]]+)\]\(([^)]+)\)/g;
|
|
357
|
-
function
|
|
359
|
+
function ke(a) {
|
|
358
360
|
const t = [], r = new RegExp(E);
|
|
359
361
|
let s;
|
|
360
362
|
for (; (s = r.exec(a)) !== null; )
|
|
361
363
|
t.push({ display: s[1], id: s[2] });
|
|
362
364
|
return t;
|
|
363
365
|
}
|
|
364
|
-
|
|
365
|
-
|
|
366
|
-
|
|
367
|
-
|
|
368
|
-
})
|
|
369
|
-
|
|
370
|
-
|
|
371
|
-
|
|
372
|
-
const { environments: r } = ne();
|
|
366
|
+
function Ue(a) {
|
|
367
|
+
return ke(a).map((t) => ({
|
|
368
|
+
userId: t.id,
|
|
369
|
+
username: t.display
|
|
370
|
+
}));
|
|
371
|
+
}
|
|
372
|
+
function ve(a, t) {
|
|
373
|
+
const { environments: r } = te();
|
|
373
374
|
return P({
|
|
374
375
|
queryKey: ["organization-users", a, t],
|
|
375
|
-
queryFn: () =>
|
|
376
|
+
queryFn: () => ae({
|
|
376
377
|
organizationId: a,
|
|
377
378
|
search: t,
|
|
378
379
|
environment: r.VITE_BACKEND_API_ORGANIZATION_URL ?? ""
|
|
@@ -380,20 +381,41 @@ function Ne(a, t) {
|
|
|
380
381
|
enabled: a.length > 0 && t.length > 0
|
|
381
382
|
});
|
|
382
383
|
}
|
|
383
|
-
const
|
|
384
|
+
const Ne = {
|
|
384
385
|
control: {
|
|
385
386
|
fontSize: 14,
|
|
386
|
-
|
|
387
|
+
fontWeight: "normal"
|
|
387
388
|
},
|
|
388
|
-
|
|
389
|
-
|
|
390
|
-
|
|
391
|
-
|
|
392
|
-
|
|
389
|
+
"&multiLine": {
|
|
390
|
+
control: {
|
|
391
|
+
minHeight: 88
|
|
392
|
+
},
|
|
393
|
+
highlighter: {
|
|
394
|
+
padding: "8px 12px",
|
|
395
|
+
border: "1px solid transparent"
|
|
396
|
+
},
|
|
397
|
+
input: {
|
|
398
|
+
padding: "8px 12px",
|
|
399
|
+
border: "1px solid var(--border, #d4d4d8)",
|
|
400
|
+
borderRadius: 6,
|
|
401
|
+
outline: "none",
|
|
402
|
+
backgroundColor: "transparent"
|
|
403
|
+
}
|
|
393
404
|
},
|
|
394
|
-
|
|
395
|
-
|
|
396
|
-
|
|
405
|
+
"&singleLine": {
|
|
406
|
+
display: "inline-block",
|
|
407
|
+
width: "100%",
|
|
408
|
+
highlighter: {
|
|
409
|
+
padding: "8px 12px",
|
|
410
|
+
border: "1px solid transparent"
|
|
411
|
+
},
|
|
412
|
+
input: {
|
|
413
|
+
padding: "8px 12px",
|
|
414
|
+
border: "1px solid var(--border, #d4d4d8)",
|
|
415
|
+
borderRadius: 6,
|
|
416
|
+
outline: "none",
|
|
417
|
+
backgroundColor: "transparent"
|
|
418
|
+
}
|
|
397
419
|
},
|
|
398
420
|
suggestions: {
|
|
399
421
|
list: {
|
|
@@ -412,42 +434,45 @@ const ve = {
|
|
|
412
434
|
}
|
|
413
435
|
}
|
|
414
436
|
}, Ce = {
|
|
415
|
-
backgroundColor: "var(--accent, #
|
|
416
|
-
|
|
437
|
+
backgroundColor: "var(--accent, #dbeafe)",
|
|
438
|
+
color: "var(--accent-foreground, #1d4ed8)",
|
|
439
|
+
fontWeight: 600,
|
|
440
|
+
borderRadius: 4,
|
|
441
|
+
padding: "1px 2px"
|
|
417
442
|
};
|
|
418
|
-
function
|
|
443
|
+
function Ke({
|
|
419
444
|
value: a,
|
|
420
445
|
onChange: t,
|
|
421
446
|
onBlur: r,
|
|
422
447
|
organizationId: s,
|
|
423
448
|
placeholder: i,
|
|
424
449
|
disabled: n,
|
|
425
|
-
singleLine:
|
|
450
|
+
singleLine: o = !1
|
|
426
451
|
}) {
|
|
427
|
-
const [
|
|
428
|
-
() =>
|
|
429
|
-
[
|
|
452
|
+
const [l, x] = F(""), f = ne(l, 200), { data: m } = ve(s, f), y = A(void 0), p = U(
|
|
453
|
+
() => m?.map((u) => ({ id: u._id, display: u.username })) ?? [],
|
|
454
|
+
[m]
|
|
430
455
|
);
|
|
431
456
|
return R(() => {
|
|
432
|
-
y.current?.(
|
|
433
|
-
}, [
|
|
434
|
-
|
|
457
|
+
y.current?.(p);
|
|
458
|
+
}, [p]), /* @__PURE__ */ e(
|
|
459
|
+
X,
|
|
435
460
|
{
|
|
436
461
|
value: a,
|
|
437
462
|
onChange: (u, g) => t(g),
|
|
438
463
|
onBlur: r,
|
|
439
464
|
placeholder: i,
|
|
440
465
|
disabled: n,
|
|
441
|
-
singleLine:
|
|
466
|
+
singleLine: o,
|
|
442
467
|
allowSuggestionsAboveCursor: !0,
|
|
443
|
-
style:
|
|
468
|
+
style: Ne,
|
|
444
469
|
children: /* @__PURE__ */ e(
|
|
445
|
-
|
|
470
|
+
Q,
|
|
446
471
|
{
|
|
447
472
|
trigger: "@",
|
|
448
473
|
markup: we,
|
|
449
474
|
data: (u, g) => {
|
|
450
|
-
y.current = g, x(u), g(
|
|
475
|
+
y.current = g, x(u), g(p);
|
|
451
476
|
},
|
|
452
477
|
displayTransform: (u, g) => `@${g}`,
|
|
453
478
|
appendSpaceOnAdd: !0,
|
|
@@ -457,21 +482,21 @@ function qe({
|
|
|
457
482
|
}
|
|
458
483
|
);
|
|
459
484
|
}
|
|
460
|
-
function
|
|
485
|
+
function Xe({ text: a, className: t }) {
|
|
461
486
|
const r = new RegExp(E), s = [];
|
|
462
|
-
let i = 0, n,
|
|
487
|
+
let i = 0, n, o = 0;
|
|
463
488
|
for (; (n = r.exec(a)) !== null; )
|
|
464
489
|
n.index > i && s.push(
|
|
465
|
-
/* @__PURE__ */ e("span", { children: a.slice(i, n.index) },
|
|
490
|
+
/* @__PURE__ */ e("span", { children: a.slice(i, n.index) }, o++)
|
|
466
491
|
), s.push(
|
|
467
|
-
/* @__PURE__ */ d(
|
|
492
|
+
/* @__PURE__ */ d(Z, { variant: "secondary", className: t, children: [
|
|
468
493
|
"@",
|
|
469
494
|
n[1]
|
|
470
|
-
] },
|
|
495
|
+
] }, o++)
|
|
471
496
|
), i = n.index + n[0].length;
|
|
472
|
-
return i < a.length && s.push(/* @__PURE__ */ e("span", { children: a.slice(i) },
|
|
497
|
+
return i < a.length && s.push(/* @__PURE__ */ e("span", { children: a.slice(i) }, o++)), /* @__PURE__ */ e(T, { children: s });
|
|
473
498
|
}
|
|
474
|
-
function
|
|
499
|
+
function Qe({
|
|
475
500
|
size: a = 24,
|
|
476
501
|
color: t = "currentColor",
|
|
477
502
|
...r
|
|
@@ -495,44 +520,45 @@ function Ue({
|
|
|
495
520
|
);
|
|
496
521
|
}
|
|
497
522
|
export {
|
|
498
|
-
|
|
499
|
-
|
|
500
|
-
|
|
501
|
-
|
|
502
|
-
|
|
503
|
-
|
|
504
|
-
|
|
505
|
-
|
|
506
|
-
|
|
507
|
-
|
|
508
|
-
|
|
509
|
-
|
|
510
|
-
|
|
511
|
-
|
|
512
|
-
|
|
513
|
-
|
|
514
|
-
|
|
515
|
-
|
|
516
|
-
|
|
517
|
-
|
|
518
|
-
|
|
523
|
+
Le as AsyncBoundary,
|
|
524
|
+
Ge as CampaignsSelectInput,
|
|
525
|
+
Ye as ClientSelectInput,
|
|
526
|
+
pe as ErrorCard,
|
|
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,
|
|
519
544
|
$e as ListRow,
|
|
520
|
-
|
|
521
|
-
|
|
522
|
-
|
|
523
|
-
|
|
524
|
-
|
|
525
|
-
|
|
526
|
-
|
|
527
|
-
|
|
528
|
-
|
|
529
|
-
|
|
530
|
-
|
|
531
|
-
|
|
532
|
-
|
|
533
|
-
|
|
534
|
-
|
|
535
|
-
|
|
536
|
-
|
|
537
|
-
|
|
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,
|
|
563
|
+
ke as parseMentions
|
|
538
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 { }
|