@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.
@@ -1,13 +1,15 @@
1
- import { aZ as h, w as S, c, F as z, B as k, aq as _, ar as M, as as I, bf as H, W as L, X as D, $ as v, _ as $, Y as j, a0 as B } from "./chuncks/switch.D4GUsewk.js";
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, o as W, M as X, p as Q } from "./chuncks/youtube-icon.component.Dasmq5T5.js";
6
- import { w as Ve, x as Ge, E as Ye, Q as Ze, G as Je, H as et, F as tt, J as nt, K as at, L as rt, N as st, O as it, v as ot, y as lt, R as dt, U as ct, q as gt, r as ut, s as xt, t as bt, u as mt, V as pt, z as ht, D as ft, W as yt, X as wt, Y as kt } from "./chuncks/youtube-icon.component.Dasmq5T5.js";
7
- import { S as w, c as V, T as G, a as Y, b as Z, B as J } from "./chuncks/badge.Cur4Mrd7.js";
8
- import { parseISO as N, differenceInCalendarDays as ee, format as te } from "date-fns";
9
- import { a as ne, u as ae } from "./chuncks/use-shared-app-modules.hook.jCQwZaT8.js";
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: n = me,
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: a,
63
+ className: n,
62
64
  ...o
63
65
  }) {
64
- return /* @__PURE__ */ e(S, { className: c(a), ...o, children: /* @__PURE__ */ d(z, { className: "flex flex-col items-center justify-center px-6 py-12 text-center", children: [
65
- /* @__PURE__ */ e("div", { className: "relative mb-4", children: /* @__PURE__ */ e(n, { "aria-hidden": "true", className: "text-destructive/60 size-16" }) }),
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 He({
76
- suspenseFallback: n = he,
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(n, {}), children: /* @__PURE__ */ e(O, { children: ({ reset: s }) => /* @__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: a }) => /* @__PURE__ */ e(t, { error: a, onRetry: i }),
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 Le({
93
- content: n,
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: a = 0,
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(_, { openDelay: i, closeDelay: a, ...x, children: [
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: n })
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 De({
163
- size: n,
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 a = i ? ye[t] : fe[t], o = n ? C[n] : C.md;
170
- return /* @__PURE__ */ e("div", { className: c("w-fit p-2 rounded-lg", a?.bg, r), children: /* @__PURE__ */ e(s, { className: c(o, a?.text) }) });
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 $e({ className: n, ...t }) {
173
- return /* @__PURE__ */ e("div", { className: c("divide-y", n), ...t });
174
+ function Be({ className: a, ...t }) {
175
+ return /* @__PURE__ */ e("div", { className: c("divide-y", a), ...t });
174
176
  }
175
- function je({
176
- label: n,
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: a = !1,
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 = ee(u, /* @__PURE__ */ new Date());
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(_, { openDelay: 0, closeDelay: 0, children: [
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" : a ? "text-green-600" : ""
204
+ i ? "text-red-600" : n ? "text-green-600" : ""
203
205
  ),
204
206
  children: [
205
- n,
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" : a ? "text-green-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" ? te(N(t), "dd/MM/yyyy") : x && typeof t == "string" ? t : `R$ ${t.toLocaleString("pt-BR", { minimumFractionDigits: 2, maximumFractionDigits: 2 })}`,
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: n }),
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 Be({
239
- icon: n = ge,
240
+ function Oe({
241
+ icon: a = ge,
240
242
  title: t,
241
243
  description: r,
242
244
  tip: s,
243
245
  className: i,
244
- ...a
246
+ ...n
245
247
  }) {
246
- return /* @__PURE__ */ e(S, { className: c(i), ...a, children: /* @__PURE__ */ d(z, { className: "flex flex-col items-center justify-center px-6 py-12 text-center", children: [
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
- n,
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 Oe({
260
- actions: n,
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 a = (l) => {
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", a), document.addEventListener("keydown", o), () => {
272
- document.removeEventListener("mousedown", a), document.removeEventListener("keydown", o);
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: n.map((a, o) => /* @__PURE__ */ e(
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(G, { children: [
289
- /* @__PURE__ */ e(Y, { asChild: !0, children: /* @__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: a.disabled,
295
- "aria-disabled": a.disabled,
296
+ disabled: n.disabled,
297
+ "aria-disabled": n.disabled,
296
298
  className: c(
297
299
  "size-11 rounded-full shadow-md",
298
- a.disabled && "opacity-50"
300
+ n.disabled && "opacity-50"
299
301
  ),
300
302
  onClick: () => {
301
- a.disabled || (a.onClick(), s(!1));
303
+ n.disabled || (n.onClick(), s(!1));
302
304
  },
303
- children: /* @__PURE__ */ e(a.icon, { className: "size-5" })
305
+ children: /* @__PURE__ */ e(n.icon, { className: "size-5" })
304
306
  }
305
307
  ) }),
306
- /* @__PURE__ */ e(Z, { side: "left", children: a.label })
308
+ /* @__PURE__ */ e(Y, { side: "left", children: n.label })
307
309
  ] })
308
310
  },
309
- a.label
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((a) => !a),
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 Pe({
328
- columns: n = 9,
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: n }).map((i, a) => {
335
- const o = r && a === n - 1;
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
- a
349
+ n
348
350
  );
349
351
  }) }) }),
350
- /* @__PURE__ */ e(j, { children: Array.from({ length: t }).map((i, a) => /* @__PURE__ */ e(v, { className: "h-[3.05rem]", children: Array.from({ length: n }).map((o, l) => {
351
- const x = r && l === n - 1;
352
- return /* @__PURE__ */ e(B, { 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
- }) }, a)) })
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(n) {
359
+ function ke(a) {
358
360
  const t = [], r = new RegExp(E);
359
361
  let s;
360
- for (; (s = r.exec(n)) !== null; )
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 qe(n) {
365
- return ke(n).map((t) => ({
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
- const ve = async ({
371
- organizationId: n,
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", n, t],
381
- queryFn: () => ve({
382
- organizationId: n,
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: n.length > 0 && t.length > 0
381
+ enabled: a.length > 0 && t.length > 0
387
382
  });
388
383
  }
389
- const Ce = {
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
- }, Se = {
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 Ue({
449
- value: n,
443
+ function Ke({
444
+ value: a,
450
445
  onChange: t,
451
446
  onBlur: r,
452
447
  organizationId: s,
453
448
  placeholder: i,
454
- disabled: a,
449
+ disabled: n,
455
450
  singleLine: o = !1
456
451
  }) {
457
- const [l, x] = F(""), f = ae(l, 200), { data: m } = Ne(s, f), y = A(void 0), p = U(
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: n,
461
+ value: a,
467
462
  onChange: (u, g) => t(g),
468
463
  onBlur: r,
469
464
  placeholder: i,
470
- disabled: a,
465
+ disabled: n,
471
466
  singleLine: o,
472
467
  allowSuggestionsAboveCursor: !0,
473
- style: Ce,
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: Se
479
+ style: Ce
485
480
  }
486
481
  )
487
482
  }
488
483
  );
489
484
  }
490
- function Ke({ text: n, className: t }) {
485
+ function Xe({ text: a, className: t }) {
491
486
  const r = new RegExp(E), s = [];
492
- let i = 0, a, o = 0;
493
- for (; (a = r.exec(n)) !== null; )
494
- a.index > i && s.push(
495
- /* @__PURE__ */ e("span", { children: n.slice(i, a.index) }, o++)
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(J, { variant: "secondary", className: t, children: [
492
+ /* @__PURE__ */ d(Z, { variant: "secondary", className: t, children: [
498
493
  "@",
499
- a[1]
494
+ n[1]
500
495
  ] }, o++)
501
- ), i = a.index + a[0].length;
502
- return i < n.length && s.push(/* @__PURE__ */ e("span", { children: n.slice(i) }, o++)), /* @__PURE__ */ e(T, { children: s });
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 We({
505
- size: n = 24,
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: n,
514
- height: n,
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
- He as AsyncBoundary,
529
- Ve as CampaignsSelectInput,
530
- Ge as ClientSelectInput,
523
+ Le as AsyncBoundary,
524
+ Ge as CampaignsSelectInput,
525
+ Ye as ClientSelectInput,
531
526
  pe as ErrorCard,
532
- Ye as FieldCalendar,
533
- Ze as FieldCheckbox,
534
- Je as FieldClientSelectInput,
535
- et as FieldInput,
536
- tt as FieldLabelWithAsterisk,
537
- nt as FieldProfileSelectInput,
538
- at as FieldSaleSelectInput,
539
- rt as FieldSelect,
540
- st as FieldSwitch,
541
- it as FieldTextarea,
542
- Le as HoverContent,
543
- De as IconBadge,
544
- ot as Image,
545
- lt as InfluencerSelectInput,
546
- dt as InstagramIcon,
547
- ct as LinkedInIcon,
548
- $e as List,
549
- je as ListRow,
550
- Ue as MentionInput,
551
- Ke as MentionText,
552
- Be as NotFoundCard,
553
- gt as PageHeader,
554
- ut as PageHeaderActions,
555
- xt as PageHeaderContent,
556
- bt as PageHeaderDescription,
557
- mt as PageHeaderTitle,
558
- pt as PinterestIcon,
559
- ht as ProfileSelectInput,
560
- ft as SaleSelectInput,
561
- Oe as SpeedDialButton,
562
- Pe as TableSkeleton,
563
- yt as TikTokIcon,
564
- We as TwitterIcon,
565
- wt as XIcon,
566
- kt as YoutubeIcon,
567
- qe as getMentionedUsers,
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.Dasmq5T5.js";
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
@@ -1,4 +1,4 @@
1
- import { p as o } from "./chuncks/format.util.B1F-QlvS.js";
1
+ import { p as o } from "./chuncks/format.util.B4_t_P84.js";
2
2
  const i = (t, a) => {
3
3
  const e = t.target.value, n = o(e);
4
4
  n !== !1 && a(n);
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, a } from "./chuncks/use-shared-app-modules.hook.jCQwZaT8.js";
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
- u as useDebounce,
4
- a as useSharedAppModules
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.B1F-QlvS.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.B1F-QlvS.js";
3
- import { e as s } from "./chuncks/youtube-icon.component.Dasmq5T5.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.Dasmq5T5.js";
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,
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@grapadigital/shared-app-modules",
3
3
  "private": false,
4
- "version": "0.0.184",
4
+ "version": "0.0.185",
5
5
  "files": [
6
6
  "dist"
7
7
  ],