@grapadigital/shared-app-modules 0.0.98 → 0.0.99

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,4 +1,4 @@
1
- import { b as n } from "./profile-select-input.component.CsAq2YTg.js";
1
+ import { b as n } from "./profile-select-input.component.CfF-1Oue.js";
2
2
  function m(e) {
3
3
  const r = e.replace(/[^0-9]/g, "");
4
4
  return Number(r) / 100;
@@ -72,8 +72,8 @@ function gA() {
72
72
  Object.defineProperty(A, "__esModule", {
73
73
  value: !0
74
74
  });
75
- function e(r, u) {
76
- for (var d in u) Object.defineProperty(r, d, {
75
+ function e(t, u) {
76
+ for (var d in u) Object.defineProperty(t, d, {
77
77
  enumerable: !0,
78
78
  get: u[d]
79
79
  });
@@ -87,41 +87,41 @@ function gA() {
87
87
  }
88
88
  });
89
89
  const a = /* @__PURE__ */ f(/* @__PURE__ */ mA());
90
- function f(r) {
91
- return r && r.__esModule ? r : {
92
- default: r
90
+ function f(t) {
91
+ return t && t.__esModule ? t : {
92
+ default: t
93
93
  };
94
94
  }
95
95
  let p = /* @__PURE__ */ new Set();
96
- function i(r, u, d) {
97
- typeof process < "u" && process.env.JEST_WORKER_ID || d && p.has(d) || (d && p.add(d), console.warn(""), u.forEach((t) => console.warn(r, "-", t)));
96
+ function i(t, u, d) {
97
+ typeof process < "u" && process.env.JEST_WORKER_ID || d && p.has(d) || (d && p.add(d), console.warn(""), u.forEach((r) => console.warn(t, "-", r)));
98
98
  }
99
- function h(r) {
100
- return a.default.dim(r);
99
+ function h(t) {
100
+ return a.default.dim(t);
101
101
  }
102
102
  const w = {
103
- info(r, u) {
104
- i(a.default.bold(a.default.cyan("info")), ...Array.isArray(r) ? [
105
- r
103
+ info(t, u) {
104
+ i(a.default.bold(a.default.cyan("info")), ...Array.isArray(t) ? [
105
+ t
106
106
  ] : [
107
107
  u,
108
- r
108
+ t
109
109
  ]);
110
110
  },
111
- warn(r, u) {
112
- i(a.default.bold(a.default.yellow("warn")), ...Array.isArray(r) ? [
113
- r
111
+ warn(t, u) {
112
+ i(a.default.bold(a.default.yellow("warn")), ...Array.isArray(t) ? [
113
+ t
114
114
  ] : [
115
115
  u,
116
- r
116
+ t
117
117
  ]);
118
118
  },
119
- risk(r, u) {
120
- i(a.default.bold(a.default.magenta("risk")), ...Array.isArray(r) ? [
121
- r
119
+ risk(t, u) {
120
+ i(a.default.bold(a.default.magenta("risk")), ...Array.isArray(t) ? [
121
+ t
122
122
  ] : [
123
123
  u,
124
- r
124
+ t
125
125
  ]);
126
126
  }
127
127
  };
@@ -496,8 +496,8 @@ const wA = "data:image/jpeg;base64,/9j/4AAQSkZJRgABAQEBLAEsAAD/4QCNRXhpZgAASUkqA
496
496
  {
497
497
  ref: p,
498
498
  src: e ?? A ?? w,
499
- onError: (r) => {
500
- r.currentTarget.src = A ?? w;
499
+ onError: (t) => {
500
+ t.currentTarget.src = A ?? w;
501
501
  },
502
502
  onLoad: () => h(!0),
503
503
  className: R(
@@ -540,7 +540,7 @@ function CA({ filter: A, queryKey: e }) {
540
540
  }
541
541
  const PA = I(
542
542
  ({ queryKey: A, value: e, defaultValue: a, onValueChange: f, id: p, disabled: i, ...h }, w) => {
543
- const r = a ? { title: String(a) } : void 0, [u, d] = B(!1), [t, b] = B(r), [C, P] = B(""), E = j(C, 200), o = CA({
543
+ const t = a ? { title: String(a) } : void 0, [u, d] = B(!1), [r, b] = B(t), [C, P] = B(""), E = j(C, 200), o = CA({
544
544
  filter: {
545
545
  page: 1,
546
546
  limit: 5,
@@ -549,11 +549,11 @@ const PA = I(
549
549
  queryKey: A
550
550
  }), g = o.data?.data;
551
551
  T(() => {
552
- !e && t && (b(void 0), P(""));
553
- }, [t, e]);
554
- const N = (c) => {
555
- const s = g?.find((y) => y._id === c);
556
- d(!1), s && (b(s), f(s));
552
+ !e && r && (b(void 0), P(""));
553
+ }, [r, e]);
554
+ const D = (s) => {
555
+ const c = g?.find((y) => y._id === s);
556
+ d(!1), c && (b(c), f(c));
557
557
  };
558
558
  return /* @__PURE__ */ l(Q, { open: u, onOpenChange: d, children: [
559
559
  /* @__PURE__ */ n(G, { asChild: !0, children: /* @__PURE__ */ l(
@@ -566,7 +566,7 @@ const PA = I(
566
566
  className: "w-full justify-between",
567
567
  disabled: i,
568
568
  children: [
569
- t?.title ? t?.title : "Selecionar",
569
+ r?.title ? r?.title : "Selecionar",
570
570
  /* @__PURE__ */ n(z, { className: "opacity-50" })
571
571
  ]
572
572
  }
@@ -578,7 +578,7 @@ const PA = I(
578
578
  ...h,
579
579
  disabled: i,
580
580
  value: C,
581
- onValueChange: (c) => P(c),
581
+ onValueChange: (s) => P(s),
582
582
  placeholder: "Busque uma Ação...",
583
583
  className: "h-9",
584
584
  ref: w
@@ -592,29 +592,29 @@ const PA = I(
592
592
  /* @__PURE__ */ n(O, { className: "size-4 animate-spin" }),
593
593
  "Buscando..."
594
594
  ] }),
595
- /* @__PURE__ */ n(L, { children: g?.map((c) => /* @__PURE__ */ l(
595
+ /* @__PURE__ */ n(L, { children: g?.map((s) => /* @__PURE__ */ l(
596
596
  J,
597
597
  {
598
- value: c._id,
599
- onSelect: (s) => {
600
- N(
601
- s === t?._id ? "" : s
598
+ value: s._id,
599
+ onSelect: (c) => {
600
+ D(
601
+ c === r?._id ? "" : c
602
602
  ), d(!1);
603
603
  },
604
604
  children: [
605
- c.title,
605
+ s.title,
606
606
  /* @__PURE__ */ n(
607
607
  Y,
608
608
  {
609
609
  className: R(
610
610
  "ml-auto",
611
- t?._id === c._id ? "opacity-100" : "opacity-0"
611
+ r?._id === s._id ? "opacity-100" : "opacity-0"
612
612
  )
613
613
  }
614
614
  )
615
615
  ]
616
616
  },
617
- c._id
617
+ s._id
618
618
  )) })
619
619
  ] })
620
620
  ] }) })
@@ -639,7 +639,7 @@ function RA({ filter: A, queryKey: e }) {
639
639
  }
640
640
  const IA = I(
641
641
  ({ queryKey: A, value: e, defaultValue: a, onValueChange: f, id: p, disabled: i, ...h }, w) => {
642
- const r = a ? { name: String(a) } : void 0, [u, d] = B(!1), [t, b] = B(r), [C, P] = B(""), E = j(C, 200), o = RA({
642
+ const t = a ? { name: String(a) } : void 0, [u, d] = B(!1), [r, b] = B(t), [C, P] = B(""), E = j(C, 200), o = RA({
643
643
  filter: {
644
644
  page: 1,
645
645
  limit: 5,
@@ -648,11 +648,11 @@ const IA = I(
648
648
  queryKey: A
649
649
  }), g = o.data?.data;
650
650
  T(() => {
651
- !e && t && (b(void 0), P(""));
652
- }, [t, e]);
653
- const N = (c) => {
654
- const s = g?.find((y) => y._id === c);
655
- d(!1), s && (b(s), f(s));
651
+ !e && r && (b(void 0), P(""));
652
+ }, [r, e]);
653
+ const D = (s) => {
654
+ const c = g?.find((y) => y._id === s);
655
+ d(!1), c && (b(c), f(c));
656
656
  };
657
657
  return /* @__PURE__ */ l(Q, { open: u, onOpenChange: d, children: [
658
658
  /* @__PURE__ */ n(G, { asChild: !0, children: /* @__PURE__ */ l(
@@ -665,7 +665,7 @@ const IA = I(
665
665
  className: "w-full justify-between",
666
666
  disabled: i,
667
667
  children: [
668
- t?.name ? t?.name : "Selecionar",
668
+ r?.name ? r?.name : "Selecionar",
669
669
  /* @__PURE__ */ n(z, { className: "opacity-50" })
670
670
  ]
671
671
  }
@@ -677,7 +677,7 @@ const IA = I(
677
677
  ...h,
678
678
  disabled: i,
679
679
  value: C,
680
- onValueChange: (c) => P(c),
680
+ onValueChange: (s) => P(s),
681
681
  placeholder: "Busque um cliente...",
682
682
  className: "h-9",
683
683
  ref: w
@@ -691,29 +691,29 @@ const IA = I(
691
691
  /* @__PURE__ */ n(O, { className: "size-4 animate-spin" }),
692
692
  "Buscando..."
693
693
  ] }),
694
- /* @__PURE__ */ n(L, { children: g?.map((c) => /* @__PURE__ */ l(
694
+ /* @__PURE__ */ n(L, { children: g?.map((s) => /* @__PURE__ */ l(
695
695
  J,
696
696
  {
697
- value: c._id,
698
- onSelect: (s) => {
699
- N(
700
- s === t?._id ? "" : s
697
+ value: s._id,
698
+ onSelect: (c) => {
699
+ D(
700
+ c === r?._id ? "" : c
701
701
  ), d(!1);
702
702
  },
703
703
  children: [
704
- c.name,
704
+ s.name,
705
705
  /* @__PURE__ */ n(
706
706
  Y,
707
707
  {
708
708
  className: R(
709
709
  "ml-auto",
710
- t?._id === c._id ? "opacity-100" : "opacity-0"
710
+ r?._id === s._id ? "opacity-100" : "opacity-0"
711
711
  )
712
712
  }
713
713
  )
714
714
  ]
715
715
  },
716
- c._id
716
+ s._id
717
717
  )) })
718
718
  ] })
719
719
  ] }) })
@@ -727,7 +727,7 @@ const EA = async ({
727
727
  }) => (await k(e).get("/influencers", {
728
728
  params: A
729
729
  })).data;
730
- function NA({
730
+ function DA({
731
731
  filter: A,
732
732
  queryKey: e
733
733
  }) {
@@ -741,9 +741,9 @@ function NA({
741
741
  enabled: !!(A.name && A.name.length > 3)
742
742
  });
743
743
  }
744
- const DA = I(
744
+ const NA = I(
745
745
  ({ queryKey: A, value: e, defaultValue: a, onValueChange: f, id: p, disabled: i, ...h }, w) => {
746
- const r = a ? { name: String(a) } : void 0, [u, d] = B(!1), [t, b] = B(r), [C, P] = B(""), E = j(C, 200), o = NA({
746
+ const t = a ? { name: String(a) } : void 0, [u, d] = B(!1), [r, b] = B(t), [C, P] = B(""), E = j(C, 200), o = DA({
747
747
  filter: {
748
748
  page: 1,
749
749
  limit: 10,
@@ -752,11 +752,11 @@ const DA = I(
752
752
  queryKey: A
753
753
  }), g = o.data?.data;
754
754
  T(() => {
755
- !e && t && (b(void 0), P(""));
756
- }, [t, e]);
757
- const N = (c) => {
758
- const s = g?.find((y) => y._id === c);
759
- d(!1), s && (b(s), f(s));
755
+ !e && r && (b(void 0), P(""));
756
+ }, [r, e]);
757
+ const D = (s) => {
758
+ const c = g?.find((y) => y._id === s);
759
+ d(!1), c && (b(c), f(c));
760
760
  };
761
761
  return /* @__PURE__ */ l(Q, { open: u, onOpenChange: d, children: [
762
762
  /* @__PURE__ */ n(G, { asChild: !0, children: /* @__PURE__ */ l(
@@ -769,7 +769,7 @@ const DA = I(
769
769
  className: "w-full justify-between",
770
770
  disabled: i,
771
771
  children: [
772
- t?.name ? t?.name : "Selecionar",
772
+ r?.name ? r?.name : "Selecionar",
773
773
  /* @__PURE__ */ n(z, { className: "opacity-50" })
774
774
  ]
775
775
  }
@@ -781,7 +781,7 @@ const DA = I(
781
781
  ...h,
782
782
  disabled: i,
783
783
  value: C,
784
- onValueChange: (c) => P(c),
784
+ onValueChange: (s) => P(s),
785
785
  placeholder: "Busque um influenciador...",
786
786
  className: "h-9",
787
787
  ref: w
@@ -795,36 +795,36 @@ const DA = I(
795
795
  /* @__PURE__ */ n(O, { className: "size-4 animate-spin" }),
796
796
  "Buscando..."
797
797
  ] }),
798
- /* @__PURE__ */ n(L, { children: g?.map((c) => /* @__PURE__ */ l(
798
+ /* @__PURE__ */ n(L, { children: g?.map((s) => /* @__PURE__ */ l(
799
799
  J,
800
800
  {
801
- value: c._id,
802
- onSelect: (s) => {
803
- N(
804
- s === t?._id ? "" : s
801
+ value: s._id,
802
+ onSelect: (c) => {
803
+ D(
804
+ c === r?._id ? "" : c
805
805
  ), d(!1);
806
806
  },
807
807
  children: [
808
- c.name,
808
+ s.name,
809
809
  /* @__PURE__ */ n(
810
810
  Y,
811
811
  {
812
812
  className: R(
813
813
  "ml-auto",
814
- t?._id === c._id ? "opacity-100" : "opacity-0"
814
+ r?._id === s._id ? "opacity-100" : "opacity-0"
815
815
  )
816
816
  }
817
817
  )
818
818
  ]
819
819
  },
820
- c._id
820
+ s._id
821
821
  )) })
822
822
  ] })
823
823
  ] }) })
824
824
  ] });
825
825
  }
826
826
  );
827
- DA.displayName = "InfluencerSelectInput";
827
+ NA.displayName = "InfluencerSelectInput";
828
828
  const W = {
829
829
  instagram: "Instagram",
830
830
  tiktok: "TikTok",
@@ -874,7 +874,7 @@ function zA(A) {
874
874
  }
875
875
  const vA = I(
876
876
  ({ queryKey: A, value: e, defaultValue: a, onValueChange: f, id: p, disabled: i, ...h }, w) => {
877
- const r = a ? { username: String(a) } : void 0, [u, d] = B(!1), [t, b] = B(r), [C, P] = B(""), E = j(C, 200), o = qA({
877
+ const t = a ? { username: String(a) } : void 0, [u, d] = B(!1), [r, b] = B(t), [C, P] = B(""), E = j(C, 200), o = qA({
878
878
  filter: {
879
879
  searchTerm: E,
880
880
  fromRecruitment: !1
@@ -882,14 +882,14 @@ const vA = I(
882
882
  queryKey: A
883
883
  }), g = o.data;
884
884
  T(() => {
885
- !e && t && (b(void 0), P(""));
886
- }, [t, e]);
887
- const N = (s) => {
888
- const y = g?.find((D) => D._id === s);
885
+ !e && r && (b(void 0), P(""));
886
+ }, [r, e]);
887
+ const D = (c) => {
888
+ const y = g?.find((N) => N._id === c);
889
889
  d(!1), y && (b(y), f(y));
890
- }, c = eA(
891
- t?.socialnetwork
892
- ) ? W[t.socialnetwork] : "Não encontrado";
890
+ }, s = eA(
891
+ r?.socialnetwork
892
+ ) ? W[r.socialnetwork] : "";
893
893
  return /* @__PURE__ */ l(Q, { open: u, onOpenChange: d, children: [
894
894
  /* @__PURE__ */ n(G, { asChild: !0, children: /* @__PURE__ */ l(
895
895
  q,
@@ -904,7 +904,7 @@ const vA = I(
904
904
  ),
905
905
  disabled: i,
906
906
  children: [
907
- t?.username ? `${c && `[${c}]`} ${t.username}` : "Selecionar",
907
+ r?.username ? `${s && `[${s}]`} ${r.username}` : "Selecionar",
908
908
  /* @__PURE__ */ n(z, { className: "opacity-50" })
909
909
  ]
910
910
  }
@@ -916,7 +916,7 @@ const vA = I(
916
916
  ...h,
917
917
  disabled: i,
918
918
  value: C,
919
- onValueChange: (s) => P(s),
919
+ onValueChange: (c) => P(c),
920
920
  placeholder: "Busque um cliente...",
921
921
  className: "h-9",
922
922
  ref: w
@@ -930,34 +930,34 @@ const vA = I(
930
930
  /* @__PURE__ */ n(O, { className: "size-4 animate-spin" }),
931
931
  "Buscando..."
932
932
  ] }),
933
- /* @__PURE__ */ n(L, { children: g?.map((s) => {
934
- const y = eA(t?.socialnetwork) ? W[t.socialnetwork] : "Não encontrado";
933
+ /* @__PURE__ */ n(L, { children: g?.map((c) => {
934
+ const y = eA(c?.socialnetwork) ? W[c.socialnetwork] : "Não encontrado";
935
935
  return /* @__PURE__ */ l(
936
936
  J,
937
937
  {
938
- value: s._id,
939
- onSelect: (D) => {
940
- N(
941
- D === t?._id ? "" : D
938
+ value: c._id,
939
+ onSelect: (N) => {
940
+ D(
941
+ N === r?._id ? "" : N
942
942
  ), d(!1);
943
943
  },
944
944
  children: [
945
945
  "[",
946
946
  y,
947
947
  "] ",
948
- s.username,
948
+ c.username,
949
949
  /* @__PURE__ */ n(
950
950
  Y,
951
951
  {
952
952
  className: R(
953
953
  "ml-auto",
954
- t?._id === s._id ? "opacity-100" : "opacity-0"
954
+ r?._id === c._id ? "opacity-100" : "opacity-0"
955
955
  )
956
956
  }
957
957
  )
958
958
  ]
959
959
  },
960
- s._id
960
+ c._id
961
961
  );
962
962
  }) })
963
963
  ] })
@@ -984,6 +984,6 @@ export {
984
984
  zA as i,
985
985
  PA as j,
986
986
  IA as k,
987
- DA as l,
987
+ NA as l,
988
988
  vA as m
989
989
  };
@@ -1,6 +1,6 @@
1
1
  import { a as g, c as s, B as M, H as u, b as y, d as w } from "./chuncks/scroll-area.CEAE-ZuD.js";
2
- import { L as H } from "./chuncks/profile-select-input.component.CsAq2YTg.js";
3
- import { j as le, k as se, I as ne, l as oe, P as de, e as ce, f as ge, g as xe, h as be, m as me } from "./chuncks/profile-select-input.component.CsAq2YTg.js";
2
+ import { L as H } from "./chuncks/profile-select-input.component.CfF-1Oue.js";
3
+ import { j as le, k as se, I as ne, l as oe, P as de, e as ce, f as ge, g as xe, h as be, m as me } from "./chuncks/profile-select-input.component.CfF-1Oue.js";
4
4
  import { jsx as e, jsxs as o, Fragment as L } from "react/jsx-runtime";
5
5
  import "react";
6
6
  import { C as k, a as N } from "./chuncks/card.Cpx5Pxqx.js";
package/dist/constants.js CHANGED
@@ -1,4 +1,4 @@
1
- import { B as p, C as L, S as N, d } from "./chuncks/profile-select-input.component.CsAq2YTg.js";
1
+ import { B as p, C as L, S as N, d } from "./chuncks/profile-select-input.component.CfF-1Oue.js";
2
2
  import "./chuncks/scroll-area.CEAE-ZuD.js";
3
3
  import "react/jsx-runtime";
4
4
  import "react";
package/dist/events.js CHANGED
@@ -1,4 +1,4 @@
1
- import { h as o } from "./chuncks/format.util._bJLlJpl.js";
1
+ import { h as o } from "./chuncks/format.util.ChC2hnJR.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/utils.js CHANGED
@@ -1,5 +1,5 @@
1
- import { f as e, a as r, b as m, c as t, m as o, d as c, e as i, g as n, p, h as C, u as f } from "./chuncks/format.util._bJLlJpl.js";
2
- import { i as k, a as P, b, c as N } from "./chuncks/profile-select-input.component.CsAq2YTg.js";
1
+ import { f as e, a as r, b as m, c as t, m as o, d as c, e as i, g as n, p, h as C, u as f } from "./chuncks/format.util.ChC2hnJR.js";
2
+ import { i as k, a as P, b, c as N } from "./chuncks/profile-select-input.component.CfF-1Oue.js";
3
3
  export {
4
4
  e as formatCompactNumber,
5
5
  r as formatCompactPercent,
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.98",
4
+ "version": "0.0.99",
5
5
  "files": [
6
6
  "dist"
7
7
  ],