@grapadigital/shared-app-modules 0.0.199 → 0.0.201

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.
@@ -551,6 +551,8 @@ export declare function LinkedInIcon({ size, color, ...props }: LucideProps): JS
551
551
 
552
552
  export declare function List({ className, ...props }: React.ComponentProps<"div">): JSX.Element;
553
553
 
554
+ declare type ListCustomTagsServiceOutput = TagInterface[];
555
+
554
556
  export declare function ListRow({ label, value, tooltip, highlight, negative, positive, isPercentage, isDate, isText, isInvoiced, hasCopyButton, enableHoverableContent, handleCopy }: ListRowProps): JSX.Element;
555
557
 
556
558
  declare interface ListRowProps {
@@ -601,7 +603,7 @@ declare interface MentionTextProps {
601
603
 
602
604
  declare type Module = "sales" | "invoices" | "payments" | "actions";
603
605
 
604
- export declare function ModuleTags({ module, organizationId, currentTags, useUpdateModuleTags, }: TagsProps): JSX.Element;
606
+ export declare function ModuleTags({ module, moduleId, organizationId, currentTags, useUpdateModuleTags, }: TagsProps): JSX.Element;
605
607
 
606
608
  declare interface NegotiationInterface {
607
609
  calculatorType: CalculatorType;
@@ -987,16 +989,28 @@ declare interface TableSkeletonProps {
987
989
 
988
990
  declare interface TagConfig {
989
991
  module: Module;
992
+ moduleId: string;
990
993
  organizationId: string;
991
994
  currentTags?: string[];
992
995
  useUpdateModuleTags: () => any;
993
996
  }
994
997
 
995
- declare interface TagsProps extends TagConfig {
998
+ declare interface TagInterface {
999
+ _id: string;
1000
+ organization: string;
1001
+ module: Module;
1002
+ name: string;
1003
+ color?: string;
1004
+ createdAt: string;
1005
+ updatedAt: string;
1006
+ }
1007
+
1008
+ declare interface TagsProps extends Omit<TagConfig, "organizationId"> {
996
1009
  /**
997
1010
  * Tags associadas ao módulo, definidas no card e retornadas pela API.
998
1011
  */
999
1012
  currentTags?: string[];
1013
+ organizationId?: string;
1000
1014
  /**
1001
1015
  * Hook responsável por atualizar as tags de um módulo.
1002
1016
  *
@@ -1007,7 +1021,7 @@ declare interface TagsProps extends TagConfig {
1007
1021
  * interface Input {
1008
1022
  * id: string;
1009
1023
  * payload: {
1010
- * tags: string[];
1024
+ * tags: string[]; // IDs das tags a serem atualizadas
1011
1025
  * };
1012
1026
  * }
1013
1027
  * ```
@@ -1019,6 +1033,43 @@ export declare function TikTokIcon({ size, color, ...props }: LucideProps): JSX.
1019
1033
 
1020
1034
  export declare function TwitterIcon({ size, color, ...props }: LucideProps): JSX.Element;
1021
1035
 
1036
+ /**
1037
+ * Busca as tags customizadas correspondentes aos IDs informados.
1038
+ *
1039
+ * @param module - Módulo ao qual as tags pertencem.
1040
+ * @param tags - IDs das tags que devem ser buscadas.
1041
+ * @param organizationId - ID opcional da organização.
1042
+ *
1043
+ * @returns As tags encontradas, incluindo a classe CSS correspondente à sua cor.
1044
+ */
1045
+ export declare function useGetTags({ module, tags, organizationId, }: {
1046
+ module: Module;
1047
+ tags?: string[];
1048
+ organizationId?: string;
1049
+ }): {
1050
+ className: string | undefined;
1051
+ _id: string;
1052
+ organization: string;
1053
+ module: Module;
1054
+ name: string;
1055
+ color?: string;
1056
+ createdAt: string;
1057
+ updatedAt: string;
1058
+ }[];
1059
+
1060
+ /**
1061
+ * Busca as tags customizadas de um módulo.
1062
+ *
1063
+ * @param module - Módulo para o qual as tags serão buscadas.
1064
+ * @param organizationId - ID opcional da organização.
1065
+ *
1066
+ * @returns As tags customizadas associadas ao módulo.
1067
+ */
1068
+ export declare function useModuleTags({ module, organizationId, }: {
1069
+ module: Module;
1070
+ organizationId?: string;
1071
+ }): ListCustomTagsServiceOutput;
1072
+
1022
1073
  declare interface UserInterface {
1023
1074
  _id?: string;
1024
1075
  name?: string;
@@ -1,15 +1,15 @@
1
1
  import { aZ as v, c as u, B as N, a_ as z, aq as M, ar as T, as as R, w as O, F as $, W as j, X as q, $ as C, _ as B, Y as P, a0 as U } from "./chuncks/switch.D_38xWg-.js";
2
- import { M as K, r as W } from "./chuncks/youtube-icon.component.CYI8uem4.js";
3
- import { t as We, K as Xe, L as Ge, G as Qe, X as Ve, a3 as Ye, Y as Ze, Z as Je, H as et, _ as tt, a4 as nt, $ as at, a0 as rt, a1 as st, a2 as it, J as ot, O as lt, a5 as dt, a6 as ct, s as gt, u as ut, w as pt, x as xt, y as mt, z as bt, a7 as ht, Q as ft, W as yt, U as wt, a8 as vt, a9 as kt, aa as Nt } from "./chuncks/youtube-icon.component.CYI8uem4.js";
2
+ import { M as K, r as W } from "./chuncks/youtube-icon.component.D8isKAX6.js";
3
+ import { s as We, J as Xe, K as Ge, z as Qe, W as Ve, a2 as Ye, X as Ze, Y as Je, G as et, Z as tt, a3 as nt, _ as at, $ as rt, a0 as st, a1 as it, H as ot, L as lt, a4 as dt, a5 as ct, aa as gt, t as ut, u as pt, w as xt, x as mt, y as bt, a6 as ht, O as ft, U as yt, Q as wt, a7 as vt, a8 as kt, a9 as Nt, ac as Ct, ab as St } from "./chuncks/youtube-icon.component.D8isKAX6.js";
4
4
  import { jsxs as d, jsx as e, Fragment as A } from "react/jsx-runtime";
5
5
  import S, { useState as F, useRef as D, useEffect as H, useMemo as X } from "react";
6
6
  import { B as L, m as G, T as Q, k as V, l as Y, S as k } from "./chuncks/badge.tZcF7uIJ.js";
7
7
  import { parseISO as I, differenceInCalendarDays as Z, format as J } from "date-fns";
8
- import { u as ee, a as te } from "./chuncks/use-shared-app-modules.hook.DKoXZuvy.js";
8
+ import { u as ee, a as te } from "./chuncks/use-shared-app-modules.hook.B3x4jLx3.js";
9
9
  import "./chuncks/shared-app-modules.provider.DRJ7n4Cj.js";
10
10
  import { useQuery as ne } from "@tanstack/react-query";
11
11
  import "axios";
12
- import { l as ae } from "./chuncks/organization-users.service.B8hU1HtK.js";
12
+ import { l as ae } from "./chuncks/organization-users.service.BCM_WcCz.js";
13
13
  const re = [
14
14
  ["circle", { cx: "12", cy: "12", r: "10", key: "1mglay" }],
15
15
  ["line", { x1: "12", x2: "12", y1: "8", y2: "12", key: "1pkeuh" }],
@@ -611,5 +611,7 @@ export {
611
611
  kt as XIcon,
612
612
  Nt as YoutubeIcon,
613
613
  je as getMentionedUsers,
614
- he as parseMentions
614
+ he as parseMentions,
615
+ Ct as useGetTags,
616
+ St as useModuleTags
615
617
  };
package/dist/configs.d.ts CHANGED
@@ -3,6 +3,7 @@ import { FirebaseAuth } from '@firebase/auth-types';
3
3
  declare interface Bootstrap {
4
4
  auth?: FirebaseAuth;
5
5
  environments?: Environments;
6
+ organizationId?: string;
6
7
  axios?: {
7
8
  timeout?: number;
8
9
  };
package/dist/configs.js CHANGED
@@ -1,4 +1,4 @@
1
- import { b as t } from "./chuncks/index.CQj95ye6.js";
1
+ import { b as t } from "./chuncks/index.GkteP4bn.js";
2
2
  export {
3
3
  t as bootstrap
4
4
  };
package/dist/constants.js CHANGED
@@ -1,4 +1,4 @@
1
- import { b as n, A as m, B as S, C as A, D as c, E as N, F as E, I as g, N as l, a as _, d as p, P as B, R as r, c as s, e as i, S as t, T, V as I } from "./chuncks/youtube-icon.component.CYI8uem4.js";
1
+ import { b as n, A as m, B as S, C as A, D as c, E as N, F as E, I as g, N as l, a as _, d as p, P as B, R as r, c as s, e as i, S as t, T, V as I } from "./chuncks/youtube-icon.component.D8isKAX6.js";
2
2
  const o = [
3
3
  {
4
4
  compe: "001",
@@ -1,5 +1,5 @@
1
1
  import "./chuncks/switch.D_38xWg-.js";
2
- import { ae as m, ad as D, ab as n, af as l, ah as y, ag as k, ak as T, aj as b, ac as f, ai as g } from "./chuncks/youtube-icon.component.CYI8uem4.js";
2
+ import { ag as m, af as D, ad as l, ah as n, aj as y, ai as k, am as T, al as f, ae as g, ak as h } from "./chuncks/youtube-icon.component.D8isKAX6.js";
3
3
  import "react/jsx-runtime";
4
4
  import "react";
5
5
  import "@tanstack/react-query";
@@ -9,12 +9,12 @@ import "axios";
9
9
  export {
10
10
  m as actionStatusDict,
11
11
  D as actionTypeDict,
12
- n as businessUnitDict,
13
- l as clientTypeDict,
12
+ l as businessUnitDict,
13
+ n as clientTypeDict,
14
14
  y as paymentPhaseDict,
15
15
  k as paymentTypeDict,
16
16
  T as socialNetworkColorDict,
17
- b as socialNetworkDict,
18
- f as tagColorDict,
19
- g as typeSaleDict
17
+ f as socialNetworkDict,
18
+ g as tagColorDict,
19
+ h as typeSaleDict
20
20
  };
package/dist/events.js CHANGED
@@ -1,4 +1,4 @@
1
- import { b as o } from "./chuncks/format.util.CHqqItQu.js";
1
+ import { b as o } from "./chuncks/format.util.ovfydp3w.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.js CHANGED
@@ -1,7 +1,7 @@
1
- import { u as s } from "./chuncks/use-shared-app-modules.hook.DKoXZuvy.js";
2
- import { a as l } from "./chuncks/use-shared-app-modules.hook.DKoXZuvy.js";
1
+ import { u as s } from "./chuncks/use-shared-app-modules.hook.B3x4jLx3.js";
2
+ import { a as l } from "./chuncks/use-shared-app-modules.hook.B3x4jLx3.js";
3
3
  import { useQuery as o } from "@tanstack/react-query";
4
- import { l as n } from "./chuncks/organization-users.service.B8hU1HtK.js";
4
+ import { l as n } from "./chuncks/organization-users.service.BCM_WcCz.js";
5
5
  function a(e) {
6
6
  const { environments: r } = s();
7
7
  return o({
package/dist/utils.js CHANGED
@@ -1,7 +1,7 @@
1
- import { U as s } from "./chuncks/format.util.CHqqItQu.js";
2
- import { g as l, h as v, f as y, a as C, d as E, m as L, c as P, e as _, p as b, b as k, u as D } from "./chuncks/format.util.CHqqItQu.js";
3
- import { f as a } from "./chuncks/youtube-icon.component.CYI8uem4.js";
4
- import { q as U, p as h, n as q, j as N, h as x, l as F, i as O, m as T, k as j, g as A, o as G, v as V } from "./chuncks/youtube-icon.component.CYI8uem4.js";
1
+ import { U as s } from "./chuncks/format.util.ovfydp3w.js";
2
+ import { g as l, h as v, f as y, a as C, d as E, m as L, c as P, e as _, p as b, b as k, u as D } from "./chuncks/format.util.ovfydp3w.js";
3
+ import { f as a } from "./chuncks/youtube-icon.component.D8isKAX6.js";
4
+ import { q as U, p as h, n as q, j as N, h as x, l as F, i as O, m as T, k as j, g as A, o as G, v as V } from "./chuncks/youtube-icon.component.D8isKAX6.js";
5
5
  const o = (e) => e ? `${e} é obrigatório.` : "Campo obrigatório.", t = (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}.`, c = (e) => e ? `${e} inválido.` : "Valor inválido.", u = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
6
6
  __proto__: null,
7
7
  invalidMessage: c,
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.199",
4
+ "version": "0.0.201",
5
5
  "files": [
6
6
  "dist"
7
7
  ],
@@ -1,7 +0,0 @@
1
- const o = {}, t = (s) => {
2
- Object.assign(o, s);
3
- };
4
- export {
5
- t as b,
6
- o as c
7
- };