next-recomponents 2.0.25 → 2.0.27
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/index.d.mts +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.js +5 -6
- package/dist/index.mjs +5 -6
- package/package.json +1 -1
- package/src/container/index.tsx +3 -11
- package/src/table/index.tsx +5 -3
package/dist/index.d.mts
CHANGED
|
@@ -72,7 +72,7 @@ interface TableProps {
|
|
|
72
72
|
editableFields?: string[];
|
|
73
73
|
onSelect?: (data: GridValidRowModel[]) => void;
|
|
74
74
|
onSave?: (data: GridValidRowModel[]) => void;
|
|
75
|
-
onCloseModal?: (data: GridValidRowModel | undefined) => boolean
|
|
75
|
+
onCloseModal?: (data: GridValidRowModel | undefined) => boolean | Promise<boolean>;
|
|
76
76
|
buttons?: Record<string, any>;
|
|
77
77
|
exportName?: string;
|
|
78
78
|
modal?: React$1.ReactNode;
|
package/dist/index.d.ts
CHANGED
|
@@ -72,7 +72,7 @@ interface TableProps {
|
|
|
72
72
|
editableFields?: string[];
|
|
73
73
|
onSelect?: (data: GridValidRowModel[]) => void;
|
|
74
74
|
onSave?: (data: GridValidRowModel[]) => void;
|
|
75
|
-
onCloseModal?: (data: GridValidRowModel | undefined) => boolean
|
|
75
|
+
onCloseModal?: (data: GridValidRowModel | undefined) => boolean | Promise<boolean>;
|
|
76
76
|
buttons?: Record<string, any>;
|
|
77
77
|
exportName?: string;
|
|
78
78
|
modal?: React$1.ReactNode;
|
package/dist/index.js
CHANGED
|
@@ -3725,10 +3725,9 @@ function Container({
|
|
|
3725
3725
|
/* @__PURE__ */ (0, import_jsx_runtime4.jsx)(
|
|
3726
3726
|
"div",
|
|
3727
3727
|
{
|
|
3728
|
-
|
|
3729
|
-
|
|
3730
|
-
|
|
3731
|
-
className: "bg-blue-500 text-white overflow-y-auto fixed md:static top-0 left-0 h-full z-50 md:z-auto transition-all duration-300 ease-in-out",
|
|
3728
|
+
className: `bg-blue-500 text-white overflow-y-auto fixed md:static top-0 left-0 h-full z-50 md:z-auto transition-all duration-300 ease-in-out
|
|
3729
|
+
${isSidebarOpen ? "w-full md:w-[250px]" : "w-0 md:w-[60px]"}
|
|
3730
|
+
`,
|
|
3732
3731
|
children: /* @__PURE__ */ (0, import_jsx_runtime4.jsx)("div", { className: "p-4 ", children: /* @__PURE__ */ (0, import_jsx_runtime4.jsxs)("ul", { className: "space-y-3", children: [
|
|
3733
3732
|
/* @__PURE__ */ (0, import_jsx_runtime4.jsxs)(
|
|
3734
3733
|
"li",
|
|
@@ -35949,8 +35948,8 @@ function IHTable({
|
|
|
35949
35948
|
setModalRow(row);
|
|
35950
35949
|
setOpen(true);
|
|
35951
35950
|
};
|
|
35952
|
-
const handleClose = () => {
|
|
35953
|
-
const pass = onCloseModal ? onCloseModal == null ? void 0 : onCloseModal(modalRow) : true;
|
|
35951
|
+
const handleClose = async () => {
|
|
35952
|
+
const pass = onCloseModal ? await (onCloseModal == null ? void 0 : onCloseModal(modalRow)) : true;
|
|
35954
35953
|
if (!pass) return;
|
|
35955
35954
|
setOpen(false);
|
|
35956
35955
|
setModalRow(void 0);
|
package/dist/index.mjs
CHANGED
|
@@ -3700,10 +3700,9 @@ function Container({
|
|
|
3700
3700
|
/* @__PURE__ */ jsx3(
|
|
3701
3701
|
"div",
|
|
3702
3702
|
{
|
|
3703
|
-
|
|
3704
|
-
|
|
3705
|
-
|
|
3706
|
-
className: "bg-blue-500 text-white overflow-y-auto fixed md:static top-0 left-0 h-full z-50 md:z-auto transition-all duration-300 ease-in-out",
|
|
3703
|
+
className: `bg-blue-500 text-white overflow-y-auto fixed md:static top-0 left-0 h-full z-50 md:z-auto transition-all duration-300 ease-in-out
|
|
3704
|
+
${isSidebarOpen ? "w-full md:w-[250px]" : "w-0 md:w-[60px]"}
|
|
3705
|
+
`,
|
|
3707
3706
|
children: /* @__PURE__ */ jsx3("div", { className: "p-4 ", children: /* @__PURE__ */ jsxs2("ul", { className: "space-y-3", children: [
|
|
3708
3707
|
/* @__PURE__ */ jsxs2(
|
|
3709
3708
|
"li",
|
|
@@ -35929,8 +35928,8 @@ function IHTable({
|
|
|
35929
35928
|
setModalRow(row);
|
|
35930
35929
|
setOpen(true);
|
|
35931
35930
|
};
|
|
35932
|
-
const handleClose = () => {
|
|
35933
|
-
const pass = onCloseModal ? onCloseModal == null ? void 0 : onCloseModal(modalRow) : true;
|
|
35931
|
+
const handleClose = async () => {
|
|
35932
|
+
const pass = onCloseModal ? await (onCloseModal == null ? void 0 : onCloseModal(modalRow)) : true;
|
|
35934
35933
|
if (!pass) return;
|
|
35935
35934
|
setOpen(false);
|
|
35936
35935
|
setModalRow(void 0);
|
package/package.json
CHANGED
package/src/container/index.tsx
CHANGED
|
@@ -87,17 +87,9 @@ export default function Container({
|
|
|
87
87
|
<div className="flex flex-1 overflow-hidden relative">
|
|
88
88
|
{/* Sidebar como drawer en mobile */}
|
|
89
89
|
<div
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
? isSidebarOpen
|
|
94
|
-
? "100%"
|
|
95
|
-
: 0
|
|
96
|
-
: isSidebarOpen
|
|
97
|
-
? 250
|
|
98
|
-
: 60,
|
|
99
|
-
}}
|
|
100
|
-
className="bg-blue-500 text-white overflow-y-auto fixed md:static top-0 left-0 h-full z-50 md:z-auto transition-all duration-300 ease-in-out"
|
|
90
|
+
className={`bg-blue-500 text-white overflow-y-auto fixed md:static top-0 left-0 h-full z-50 md:z-auto transition-all duration-300 ease-in-out
|
|
91
|
+
${isSidebarOpen ? "w-full md:w-[250px]" : "w-0 md:w-[60px]"}
|
|
92
|
+
`}
|
|
101
93
|
>
|
|
102
94
|
<div className="p-4 ">
|
|
103
95
|
{
|
package/src/table/index.tsx
CHANGED
|
@@ -28,7 +28,9 @@ interface TableProps {
|
|
|
28
28
|
editableFields?: string[];
|
|
29
29
|
onSelect?: (data: GridValidRowModel[]) => void;
|
|
30
30
|
onSave?: (data: GridValidRowModel[]) => void;
|
|
31
|
-
onCloseModal?: (
|
|
31
|
+
onCloseModal?: (
|
|
32
|
+
data: GridValidRowModel | undefined,
|
|
33
|
+
) => boolean | Promise<boolean>;
|
|
32
34
|
buttons?: Record<string, any>;
|
|
33
35
|
exportName?: string;
|
|
34
36
|
modal?: React.ReactNode;
|
|
@@ -408,8 +410,8 @@ function IHTable({
|
|
|
408
410
|
setModalRow(row);
|
|
409
411
|
setOpen(true);
|
|
410
412
|
};
|
|
411
|
-
const handleClose = () => {
|
|
412
|
-
const pass = onCloseModal ? onCloseModal?.(modalRow) : true;
|
|
413
|
+
const handleClose = async () => {
|
|
414
|
+
const pass = onCloseModal ? await onCloseModal?.(modalRow) : true;
|
|
413
415
|
|
|
414
416
|
if (!pass) return;
|
|
415
417
|
setOpen(false);
|