@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.
- package/dist/components/types/table/index.js +1 -1
- package/dist/components/types/table/index.mjs +1 -1
- package/dist/contexts/modal/index.js +0 -5
- package/dist/contexts/modal/index.mjs +1 -6
- package/dist/interfaces/components/table/index.d.ts +0 -1
- package/dist/interfaces/contexts/modal/index.d.ts +0 -1
- package/package.json +1 -1
|
@@ -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.
|
|
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.
|
|
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,
|
|
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);
|