@gustavo-valsechi/client 1.4.157 → 1.4.159

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.
@@ -104,7 +104,7 @@ function Table(props) {
104
104
  className: `table-button ${import_lodash.default.includes(action.icon, "trash") ? "negative" : ""}`,
105
105
  onClick: () => action.function ? action.function(data) : null,
106
106
  disabled: action.disabled,
107
- "data-tooltip": action.tooltip,
107
+ "data-tooltip": action.label,
108
108
  children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)("i", { "aria-hidden": true, className: action.icon || "fa-solid fa-eye" })
109
109
  },
110
110
  index
@@ -70,7 +70,7 @@ function Table(props) {
70
70
  className: `table-button ${_.includes(action.icon, "trash") ? "negative" : ""}`,
71
71
  onClick: () => action.function ? action.function(data) : null,
72
72
  disabled: action.disabled,
73
- "data-tooltip": action.tooltip,
73
+ "data-tooltip": action.label,
74
74
  children: /* @__PURE__ */ jsx("i", { "aria-hidden": true, className: action.icon || "fa-solid fa-eye" })
75
75
  },
76
76
  index
@@ -35,17 +35,12 @@ __export(modal_exports, {
35
35
  module.exports = __toCommonJS(modal_exports);
36
36
  var import_jsx_runtime = require("react/jsx-runtime");
37
37
  var import_react = require("react");
38
- var import_navigation = require("next/navigation");
39
38
  var import_styles = require("./styles");
40
39
  var import_lodash = __toESM(require("lodash"));
41
40
  const ModalContext = (0, import_react.createContext)({});
42
41
  const memory = [];
43
42
  const ModalProviderContainer = ({ children }) => {
44
- const pathname = (0, import_navigation.usePathname)();
45
43
  const [modals, setModals] = (0, import_react.useState)([]);
46
- (0, import_react.useEffect)(() => {
47
- setModals(import_lodash.default.filter(memory, (modal) => modal.type === "fixed"));
48
- }, [pathname]);
49
44
  const add = (modal) => {
50
45
  if (import_lodash.default.some(memory, (data) => data.name === modal.name)) return;
51
46
  memory.push(modal);
@@ -1,17 +1,12 @@
1
1
  "use client";
2
2
  import { jsx, jsxs } from "react/jsx-runtime";
3
- import { createContext, useContext, useEffect, useState } from "react";
4
- import { usePathname } from "next/navigation";
3
+ import { createContext, useContext, useState } from "react";
5
4
  import { Container } from "./styles";
6
5
  import _ from "lodash";
7
6
  const ModalContext = createContext({});
8
7
  const memory = [];
9
8
  const ModalProviderContainer = ({ children }) => {
10
- const pathname = usePathname();
11
9
  const [modals, setModals] = useState([]);
12
- useEffect(() => {
13
- setModals(_.filter(memory, (modal) => modal.type === "fixed"));
14
- }, [pathname]);
15
10
  const add = (modal) => {
16
11
  if (_.some(memory, (data) => data.name === modal.name)) return;
17
12
  memory.push(modal);
@@ -6,7 +6,6 @@ export interface ITableAction {
6
6
  function: (data?: any) => any;
7
7
  icon?: string;
8
8
  label?: string;
9
- tooltip?: string;
10
9
  }
11
10
  export interface ITableColumn {
12
11
  name?: string;
@@ -6,7 +6,6 @@ export interface IModalConfig {
6
6
  component: typeof Modal;
7
7
  name: string;
8
8
  props?: IModal;
9
- type?: "fixed" | "dinamic";
10
9
  }
11
10
  export interface IModalContext {
12
11
  add: (config: IModalConfig) => void;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@gustavo-valsechi/client",
3
- "version": "1.4.157",
3
+ "version": "1.4.159",
4
4
  "main": "dist/index.js",
5
5
  "module": "dist/index.js",
6
6
  "types": "dist/index.d.ts",