@grapadigital/shared-app-modules 0.0.216 → 0.0.218

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/configs.d.ts CHANGED
@@ -18,6 +18,8 @@ declare interface Environments {
18
18
  readonly VITE_BACKEND_API_SALES_URL?: string;
19
19
  readonly VITE_BACKEND_API_CLIENTS_URL?: string;
20
20
  readonly VITE_BACKEND_API_ORGANIZATION_URL?: string;
21
+ readonly VITE_BACKEND_API_ENTITIES_URL?: string;
22
+ readonly VITE_BACKEND_API_FINANCIAL_URL?: string;
21
23
  }
22
24
 
23
25
  export { }
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.CU9RpVNh.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.BSdD-jlw.js";
2
2
  const o = [
3
3
  {
4
4
  compe: "001",
package/dist/content.d.ts CHANGED
@@ -104,6 +104,7 @@ declare interface ClientInterface extends UserInterface {
104
104
  hasAgencyCommission?: boolean;
105
105
  type?: "agency" | "brand";
106
106
  niches?: Niche[];
107
+ requiredTeams?: string[];
107
108
  }
108
109
 
109
110
  declare interface ClusterInterface {
@@ -16,6 +16,7 @@ declare interface ClientInterface extends UserInterface {
16
16
  hasAgencyCommission?: boolean;
17
17
  type?: "agency" | "brand";
18
18
  niches?: Niche[];
19
+ requiredTeams?: string[];
19
20
  }
20
21
 
21
22
  declare interface ClusterInterface {
@@ -1,5 +1,5 @@
1
1
  import "./chuncks/switch.D_38xWg-.js";
2
- import { ai as D, ah as m, af as n, aj as l, ao as y, al as h, ak as k, an as P, aq as T, ap as f, ag as g, am as u } from "./chuncks/youtube-icon.component.CU9RpVNh.js";
2
+ import { aj as D, ai as m, ag as n, ak as l, ap as y, am as h, al as k, ao as P, ar as T, aq as g, ah as u, an as w } from "./chuncks/youtube-icon.component.BSdD-jlw.js";
3
3
  import "react/jsx-runtime";
4
4
  import "react";
5
5
  import "@tanstack/react-query";
@@ -16,7 +16,7 @@ export {
16
16
  k as paymentTypeDict,
17
17
  P as salePhaseDict,
18
18
  T as socialNetworkColorDict,
19
- f as socialNetworkDict,
20
- g as tagColorDict,
21
- u as typeSaleDict
19
+ g as socialNetworkDict,
20
+ u as tagColorDict,
21
+ w as typeSaleDict
22
22
  };
package/dist/events.js CHANGED
@@ -1,4 +1,4 @@
1
- import { p as o } from "./chuncks/format.util.BUmWGiJF.js";
1
+ import { p as o } from "./chuncks/format.util.CesJhvUo.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
@@ -7,6 +7,8 @@ declare interface Environments {
7
7
  readonly VITE_BACKEND_API_SALES_URL?: string;
8
8
  readonly VITE_BACKEND_API_CLIENTS_URL?: string;
9
9
  readonly VITE_BACKEND_API_ORGANIZATION_URL?: string;
10
+ readonly VITE_BACKEND_API_ENTITIES_URL?: string;
11
+ readonly VITE_BACKEND_API_FINANCIAL_URL?: string;
10
12
  }
11
13
 
12
14
  export declare interface OrganizationUserResult {
package/dist/hooks.js CHANGED
@@ -1,21 +1,30 @@
1
- import { u as s } from "./chuncks/use-shared-app-modules.hook.uZhjsTQ0.js";
2
- import { a as l } from "./chuncks/use-shared-app-modules.hook.uZhjsTQ0.js";
3
- import { useQuery as o } from "@tanstack/react-query";
4
- import { l as n } from "./chuncks/organization-users.service.CUZsF7go.js";
5
- function a(e) {
6
- const { environments: r } = s();
7
- return o({
1
+ import { u as b } from "./chuncks/use-debounce.hook.TyZMbuZv.js";
2
+ import { useContext as r } from "react";
3
+ import { a as n } from "./chuncks/shared-app-modules.provider.DRJ7n4Cj.js";
4
+ import { useQuery as s } from "@tanstack/react-query";
5
+ import { l as t } from "./chuncks/organization-users.service.B9edFs4F.js";
6
+ import { g as i } from "./chuncks/index.GkteP4bn.js";
7
+ function l() {
8
+ const e = r(n);
9
+ if (!e)
10
+ throw new Error(
11
+ "useSharedAppModules deve ser usando detro de um componente SharedAppModulesProvider"
12
+ );
13
+ return e;
14
+ }
15
+ function f(e) {
16
+ const o = e ?? i.organizationId ?? "";
17
+ return s({
8
18
  queryKey: ["organization-users", e, "responsible"],
9
- queryFn: () => n({
10
- organizationId: e,
11
- active: !0,
12
- environment: r.VITE_BACKEND_API_ORGANIZATION_URL ?? ""
19
+ queryFn: () => t({
20
+ organizationId: o,
21
+ active: !0
13
22
  }),
14
- enabled: !!e
23
+ enabled: !!o
15
24
  });
16
25
  }
17
26
  export {
18
- l as useDebounce,
19
- a as useOrganizationResponsibleUsers,
20
- s as useSharedAppModules
27
+ b as useDebounce,
28
+ f as useOrganizationResponsibleUsers,
29
+ l as useSharedAppModules
21
30
  };
package/dist/invoice.d.ts CHANGED
@@ -104,6 +104,7 @@ declare interface ClientInterface extends UserInterface {
104
104
  hasAgencyCommission?: boolean;
105
105
  type?: "agency" | "brand";
106
106
  niches?: Niche[];
107
+ requiredTeams?: string[];
107
108
  }
108
109
 
109
110
  declare interface ClusterInterface {
package/dist/payment.d.ts CHANGED
@@ -104,6 +104,7 @@ declare interface ClientInterface extends UserInterface {
104
104
  hasAgencyCommission?: boolean;
105
105
  type?: "agency" | "brand";
106
106
  niches?: Niche[];
107
+ requiredTeams?: string[];
107
108
  }
108
109
 
109
110
  declare interface ClusterInterface {
@@ -7,6 +7,8 @@ declare interface Environments {
7
7
  readonly VITE_BACKEND_API_SALES_URL?: string;
8
8
  readonly VITE_BACKEND_API_CLIENTS_URL?: string;
9
9
  readonly VITE_BACKEND_API_ORGANIZATION_URL?: string;
10
+ readonly VITE_BACKEND_API_ENTITIES_URL?: string;
11
+ readonly VITE_BACKEND_API_FINANCIAL_URL?: string;
10
12
  }
11
13
 
12
14
  declare interface SharedAppModulesContextProps {
@@ -104,6 +104,7 @@ declare interface ClientInterface extends UserInterface {
104
104
  hasAgencyCommission?: boolean;
105
105
  type?: "agency" | "brand";
106
106
  niches?: Niche[];
107
+ requiredTeams?: string[];
107
108
  }
108
109
 
109
110
  declare interface ClusterInterface {
package/dist/sale.d.ts CHANGED
@@ -104,6 +104,7 @@ declare interface ClientInterface extends UserInterface {
104
104
  hasAgencyCommission?: boolean;
105
105
  type?: "agency" | "brand";
106
106
  niches?: Niche[];
107
+ requiredTeams?: string[];
107
108
  }
108
109
 
109
110
  declare interface ClusterInterface {
package/dist/utils.js CHANGED
@@ -1,7 +1,7 @@
1
- import { U as o } from "./chuncks/format.util.BUmWGiJF.js";
2
- import { g as D, h as E, f as L, b, d as h, m as k, c as C, e as _, a as I, p as U, u as O } from "./chuncks/format.util.BUmWGiJF.js";
3
- import { f as n } from "./chuncks/youtube-icon.component.CU9RpVNh.js";
4
- import { r as N, p as x, n as A, j as F, h as T, l as j, i as w, m as G, k as V, g as z, o as B, q as R, v as J } from "./chuncks/youtube-icon.component.CU9RpVNh.js";
1
+ import { U as o } from "./chuncks/format.util.CesJhvUo.js";
2
+ import { g as D, h as E, f as L, b, d as h, m as k, c as C, e as _, a as I, p as U, u as O } from "./chuncks/format.util.CesJhvUo.js";
3
+ import { f as n } from "./chuncks/youtube-icon.component.BSdD-jlw.js";
4
+ import { r as N, p as x, n as A, j as F, h as T, l as j, i as w, m as G, k as V, g as z, o as B, q as R, v as J } from "./chuncks/youtube-icon.component.BSdD-jlw.js";
5
5
  const i = (e) => e ? `${e} é obrigatório.` : "Campo obrigatório.", c = (e, r) => r ? `${r} deve ter no mínimo ${e} caracteres.` : `Deve ter no mínimo ${e} caracteres.`, m = (e, r) => r ? `${r} deve ter no máximo ${e} caracteres.` : `Deve ter no máximo ${e} caracteres.`, u = (e, r) => r ? `${r} não pode ser menor que ${e}.` : `Não pode ser menor que ${e}.`, p = (e, r) => r ? `${r} não pode ser maior que ${e}.` : `Não pode ser maior que ${e}.`, f = (e) => e ? `${e} inválido.` : "Valor inválido.", g = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
6
6
  __proto__: null,
7
7
  invalidMessage: f,
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.216",
4
+ "version": "0.0.218",
5
5
  "files": [
6
6
  "dist"
7
7
  ],
@@ -128,6 +128,13 @@
128
128
  }
129
129
  },
130
130
  "type": "module",
131
+ "scripts": {
132
+ "dev": "vite",
133
+ "build": "rm -rf dist && tsc -b && vite build",
134
+ "lint": "eslint .",
135
+ "preview": "vite preview",
136
+ "lib:publish": "pnpm build && pnpm publish --no-git-checks"
137
+ },
131
138
  "peerDependencies": {
132
139
  "react": "^18.3.1",
133
140
  "react-dom": "^18.3.1"
@@ -190,12 +197,5 @@
190
197
  "vite": "^7.2.4",
191
198
  "vite-plugin-dts": "^4.5.4",
192
199
  "vite-plugin-lib-inject-css": "^2.2.2"
193
- },
194
- "scripts": {
195
- "dev": "vite",
196
- "build": "rm -rf dist && tsc -b && vite build",
197
- "lint": "eslint .",
198
- "preview": "vite preview",
199
- "lib:publish": "pnpm build && pnpm publish --no-git-checks"
200
200
  }
201
- }
201
+ }
@@ -1,15 +0,0 @@
1
- import { c as e } from "./use-shared-app-modules.hook.uZhjsTQ0.js";
2
- const o = async ({
3
- organizationId: a,
4
- environment: i,
5
- search: r,
6
- active: t
7
- }) => (await e(i).get(`/organizations/${a}/users`, {
8
- params: {
9
- q: r,
10
- active: t === void 0 ? void 0 : String(t)
11
- }
12
- })).data;
13
- export {
14
- o as l
15
- };
@@ -1,53 +0,0 @@
1
- import s from "axios";
2
- import { g as r } from "./index.GkteP4bn.js";
3
- import { useState as i, useEffect as u, useContext as c } from "react";
4
- import { a as p } from "./shared-app-modules.provider.DRJ7n4Cj.js";
5
- const A = (e) => {
6
- const t = s.create({
7
- baseURL: e,
8
- headers: { "Content-Type": "application/json" }
9
- });
10
- return t.interceptors.request.use((o) => {
11
- const n = localStorage.getItem("token");
12
- return n && (o.headers.Authorization = `Bearer ${n}`), o;
13
- }), t;
14
- }, m = (e) => () => {
15
- const t = s.create({
16
- headers: { "Content-Type": "application/json" },
17
- ...e()
18
- });
19
- return t.interceptors.request.use((o) => {
20
- const n = localStorage.getItem("token");
21
- return n && (o.headers.Authorization = `Bearer ${n}`), o;
22
- }), t;
23
- }, d = (e) => {
24
- const o = r.environments ?? {}, n = r.axios?.timeout ?? 5e3;
25
- return { baseURL: o[e], timeout: n };
26
- }, C = m(
27
- () => d("VITE_BACKEND_API_ORGANIZATION_URL")
28
- );
29
- function S(e, t = 500) {
30
- const [o, n] = i(e);
31
- return u(() => {
32
- const a = setTimeout(() => {
33
- n(e);
34
- }, t);
35
- return () => {
36
- clearTimeout(a);
37
- };
38
- }, [e, t]), o;
39
- }
40
- function v() {
41
- const e = c(p);
42
- if (!e)
43
- throw new Error(
44
- "useSharedAppModules deve ser usando detro de um componente SharedAppModulesProvider"
45
- );
46
- return e;
47
- }
48
- export {
49
- S as a,
50
- C as b,
51
- A as c,
52
- v as u
53
- };