next-recomponents 2.0.71 → 2.0.73
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.js +12 -7
- package/dist/index.mjs +12 -7
- package/package.json +3 -2
- package/src/select/index.tsx +2 -1
- package/src/table-advanced/h.table.tsx +8 -5
package/dist/index.js
CHANGED
|
@@ -36917,9 +36917,10 @@ function Select({
|
|
|
36917
36917
|
top: dropdownPos.top,
|
|
36918
36918
|
bottom: dropdownPos.bottom,
|
|
36919
36919
|
left: dropdownPos.left,
|
|
36920
|
-
width: dropdownPos.width
|
|
36920
|
+
width: dropdownPos.width,
|
|
36921
|
+
maxHeight: "300px"
|
|
36921
36922
|
},
|
|
36922
|
-
className: "border rounded shadow bg-white
|
|
36923
|
+
className: "border rounded shadow bg-white overflow-y-auto",
|
|
36923
36924
|
children: [
|
|
36924
36925
|
filtered.length == 0 && /* @__PURE__ */ (0, import_jsx_runtime11.jsx)("div", { className: "font-normal p-2 text-gray-400", children: "Loading options..." }),
|
|
36925
36926
|
filtered.map((opt, index) => /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(
|
|
@@ -39598,6 +39599,7 @@ function HTable({
|
|
|
39598
39599
|
className: "border shadow rounded bg-blue-500 text-white p-2 ",
|
|
39599
39600
|
onClick: (e) => {
|
|
39600
39601
|
var _a2;
|
|
39602
|
+
console.log(pagination.pagina);
|
|
39601
39603
|
setCurrentIndex(rowIndex);
|
|
39602
39604
|
(_a2 = modalRef.current) == null ? void 0 : _a2.click();
|
|
39603
39605
|
},
|
|
@@ -39801,7 +39803,8 @@ function HTable({
|
|
|
39801
39803
|
context,
|
|
39802
39804
|
currentIndex,
|
|
39803
39805
|
setCurrentIndex,
|
|
39804
|
-
searchedData
|
|
39806
|
+
searchedData,
|
|
39807
|
+
pagination
|
|
39805
39808
|
}
|
|
39806
39809
|
)
|
|
39807
39810
|
}
|
|
@@ -39823,8 +39826,10 @@ function ModalContent({
|
|
|
39823
39826
|
setCurrentIndex,
|
|
39824
39827
|
searchedData,
|
|
39825
39828
|
context,
|
|
39826
|
-
hide
|
|
39829
|
+
hide,
|
|
39830
|
+
pagination
|
|
39827
39831
|
}) {
|
|
39832
|
+
const slicedData = searchedData.slice(pagination.inicio - 1, pagination.fin);
|
|
39828
39833
|
return /* @__PURE__ */ (0, import_jsx_runtime36.jsxs)("div", { className: "relative", children: [
|
|
39829
39834
|
/* @__PURE__ */ (0, import_jsx_runtime36.jsxs)("div", { className: "fixed top-0 left-0 p-10 ", children: [
|
|
39830
39835
|
/* @__PURE__ */ (0, import_jsx_runtime36.jsx)(
|
|
@@ -39840,16 +39845,16 @@ function ModalContent({
|
|
|
39840
39845
|
/* @__PURE__ */ (0, import_jsx_runtime36.jsx)(
|
|
39841
39846
|
"button",
|
|
39842
39847
|
{
|
|
39843
|
-
className: "p-2 border shadow rounded " + (currentIndex <
|
|
39848
|
+
className: "p-2 border shadow rounded " + (currentIndex < slicedData.length - 1 ? "bg-white " : "bg-gray-100"),
|
|
39844
39849
|
onClick: (e) => {
|
|
39845
|
-
currentIndex <
|
|
39850
|
+
currentIndex < slicedData.length - 1 && setCurrentIndex(currentIndex + 1);
|
|
39846
39851
|
},
|
|
39847
39852
|
children: "Siguiente"
|
|
39848
39853
|
}
|
|
39849
39854
|
)
|
|
39850
39855
|
] }),
|
|
39851
39856
|
import_react20.default.cloneElement(context.modal, {
|
|
39852
|
-
row:
|
|
39857
|
+
row: slicedData[currentIndex],
|
|
39853
39858
|
hide
|
|
39854
39859
|
})
|
|
39855
39860
|
] });
|
package/dist/index.mjs
CHANGED
|
@@ -36898,9 +36898,10 @@ function Select({
|
|
|
36898
36898
|
top: dropdownPos.top,
|
|
36899
36899
|
bottom: dropdownPos.bottom,
|
|
36900
36900
|
left: dropdownPos.left,
|
|
36901
|
-
width: dropdownPos.width
|
|
36901
|
+
width: dropdownPos.width,
|
|
36902
|
+
maxHeight: "300px"
|
|
36902
36903
|
},
|
|
36903
|
-
className: "border rounded shadow bg-white
|
|
36904
|
+
className: "border rounded shadow bg-white overflow-y-auto",
|
|
36904
36905
|
children: [
|
|
36905
36906
|
filtered.length == 0 && /* @__PURE__ */ jsx10("div", { className: "font-normal p-2 text-gray-400", children: "Loading options..." }),
|
|
36906
36907
|
filtered.map((opt, index) => /* @__PURE__ */ jsx10(
|
|
@@ -39593,6 +39594,7 @@ function HTable({
|
|
|
39593
39594
|
className: "border shadow rounded bg-blue-500 text-white p-2 ",
|
|
39594
39595
|
onClick: (e) => {
|
|
39595
39596
|
var _a2;
|
|
39597
|
+
console.log(pagination.pagina);
|
|
39596
39598
|
setCurrentIndex(rowIndex);
|
|
39597
39599
|
(_a2 = modalRef.current) == null ? void 0 : _a2.click();
|
|
39598
39600
|
},
|
|
@@ -39796,7 +39798,8 @@ function HTable({
|
|
|
39796
39798
|
context,
|
|
39797
39799
|
currentIndex,
|
|
39798
39800
|
setCurrentIndex,
|
|
39799
|
-
searchedData
|
|
39801
|
+
searchedData,
|
|
39802
|
+
pagination
|
|
39800
39803
|
}
|
|
39801
39804
|
)
|
|
39802
39805
|
}
|
|
@@ -39818,8 +39821,10 @@ function ModalContent({
|
|
|
39818
39821
|
setCurrentIndex,
|
|
39819
39822
|
searchedData,
|
|
39820
39823
|
context,
|
|
39821
|
-
hide
|
|
39824
|
+
hide,
|
|
39825
|
+
pagination
|
|
39822
39826
|
}) {
|
|
39827
|
+
const slicedData = searchedData.slice(pagination.inicio - 1, pagination.fin);
|
|
39823
39828
|
return /* @__PURE__ */ jsxs26("div", { className: "relative", children: [
|
|
39824
39829
|
/* @__PURE__ */ jsxs26("div", { className: "fixed top-0 left-0 p-10 ", children: [
|
|
39825
39830
|
/* @__PURE__ */ jsx33(
|
|
@@ -39835,16 +39840,16 @@ function ModalContent({
|
|
|
39835
39840
|
/* @__PURE__ */ jsx33(
|
|
39836
39841
|
"button",
|
|
39837
39842
|
{
|
|
39838
|
-
className: "p-2 border shadow rounded " + (currentIndex <
|
|
39843
|
+
className: "p-2 border shadow rounded " + (currentIndex < slicedData.length - 1 ? "bg-white " : "bg-gray-100"),
|
|
39839
39844
|
onClick: (e) => {
|
|
39840
|
-
currentIndex <
|
|
39845
|
+
currentIndex < slicedData.length - 1 && setCurrentIndex(currentIndex + 1);
|
|
39841
39846
|
},
|
|
39842
39847
|
children: "Siguiente"
|
|
39843
39848
|
}
|
|
39844
39849
|
)
|
|
39845
39850
|
] }),
|
|
39846
39851
|
React10.cloneElement(context.modal, {
|
|
39847
|
-
row:
|
|
39852
|
+
row: slicedData[currentIndex],
|
|
39848
39853
|
hide
|
|
39849
39854
|
})
|
|
39850
39855
|
] });
|
package/package.json
CHANGED
|
@@ -1,12 +1,13 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "next-recomponents",
|
|
3
|
-
"version": "2.0.
|
|
3
|
+
"version": "2.0.73",
|
|
4
4
|
"description": "description nueva",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"types": "dist/index.d.ts",
|
|
7
7
|
"scripts": {
|
|
8
8
|
"build": "tsup src/index.tsx --dts --format esm,cjs --out-dir dist",
|
|
9
|
-
"
|
|
9
|
+
"version:patch": "npm version patch",
|
|
10
|
+
"prepublishOnly": "npm version patch && npm run build",
|
|
10
11
|
"publish:public": "npm publish --access public"
|
|
11
12
|
},
|
|
12
13
|
"keywords": [],
|
package/src/select/index.tsx
CHANGED
|
@@ -236,8 +236,9 @@ export default function Select({
|
|
|
236
236
|
bottom: dropdownPos.bottom,
|
|
237
237
|
left: dropdownPos.left,
|
|
238
238
|
width: dropdownPos.width,
|
|
239
|
+
maxHeight: "300px",
|
|
239
240
|
}}
|
|
240
|
-
className="border rounded shadow bg-white
|
|
241
|
+
className="border rounded shadow bg-white overflow-y-auto"
|
|
241
242
|
>
|
|
242
243
|
{filtered.length == 0 && (
|
|
243
244
|
<div className="font-normal p-2 text-gray-400">
|
|
@@ -331,6 +331,7 @@ export default function HTable({
|
|
|
331
331
|
<button
|
|
332
332
|
className="border shadow rounded bg-blue-500 text-white p-2 "
|
|
333
333
|
onClick={(e) => {
|
|
334
|
+
console.log(pagination.pagina);
|
|
334
335
|
setCurrentIndex(rowIndex);
|
|
335
336
|
modalRef.current?.click();
|
|
336
337
|
}}
|
|
@@ -594,6 +595,7 @@ export default function HTable({
|
|
|
594
595
|
currentIndex={currentIndex}
|
|
595
596
|
setCurrentIndex={setCurrentIndex}
|
|
596
597
|
searchedData={searchedData}
|
|
598
|
+
pagination={pagination}
|
|
597
599
|
/>
|
|
598
600
|
</Modal>
|
|
599
601
|
)}
|
|
@@ -615,13 +617,16 @@ function ModalContent({
|
|
|
615
617
|
searchedData,
|
|
616
618
|
context,
|
|
617
619
|
hide,
|
|
620
|
+
pagination,
|
|
618
621
|
}: {
|
|
619
622
|
hide?: () => void;
|
|
620
623
|
currentIndex: number;
|
|
621
624
|
setCurrentIndex: Dispatch<number>;
|
|
622
625
|
searchedData: any;
|
|
623
626
|
context: any;
|
|
627
|
+
pagination: any;
|
|
624
628
|
}) {
|
|
629
|
+
const slicedData = searchedData.slice(pagination.inicio - 1, pagination.fin);
|
|
625
630
|
return (
|
|
626
631
|
<div className="relative">
|
|
627
632
|
<div className="fixed top-0 left-0 p-10 ">
|
|
@@ -639,12 +644,10 @@ function ModalContent({
|
|
|
639
644
|
<button
|
|
640
645
|
className={
|
|
641
646
|
"p-2 border shadow rounded " +
|
|
642
|
-
(currentIndex <
|
|
643
|
-
? "bg-white "
|
|
644
|
-
: "bg-gray-100")
|
|
647
|
+
(currentIndex < slicedData.length - 1 ? "bg-white " : "bg-gray-100")
|
|
645
648
|
}
|
|
646
649
|
onClick={(e) => {
|
|
647
|
-
currentIndex <
|
|
650
|
+
currentIndex < slicedData.length - 1 &&
|
|
648
651
|
setCurrentIndex(currentIndex + 1);
|
|
649
652
|
}}
|
|
650
653
|
>
|
|
@@ -652,7 +655,7 @@ function ModalContent({
|
|
|
652
655
|
</button>
|
|
653
656
|
</div>
|
|
654
657
|
{React.cloneElement(context.modal, {
|
|
655
|
-
row:
|
|
658
|
+
row: slicedData[currentIndex],
|
|
656
659
|
hide,
|
|
657
660
|
})}
|
|
658
661
|
</div>
|