next-recomponents 2.0.72 → 2.0.76

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 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 max-h-100 overflow-y-auto",
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)(
@@ -39479,7 +39480,7 @@ function HTable({
39479
39480
  context.data.map((d) => {
39480
39481
  const obj = {};
39481
39482
  for (let key in d) {
39482
- if (!key.startsWith("_")) {
39483
+ if (!key.startsWith("_") && !context.hideColumns.includes(key)) {
39483
39484
  obj[key] = d[key];
39484
39485
  }
39485
39486
  }
@@ -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 < searchedData.length - 1 ? "bg-white " : "bg-gray-100"),
39848
+ className: "p-2 border shadow rounded " + (currentIndex < slicedData.length - 1 ? "bg-white " : "bg-gray-100"),
39844
39849
  onClick: (e) => {
39845
- currentIndex < searchedData.length - 1 && setCurrentIndex(currentIndex + 1);
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: searchedData[currentIndex],
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 max-h-100 overflow-y-auto",
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(
@@ -39474,7 +39475,7 @@ function HTable({
39474
39475
  context.data.map((d) => {
39475
39476
  const obj = {};
39476
39477
  for (let key in d) {
39477
- if (!key.startsWith("_")) {
39478
+ if (!key.startsWith("_") && !context.hideColumns.includes(key)) {
39478
39479
  obj[key] = d[key];
39479
39480
  }
39480
39481
  }
@@ -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 < searchedData.length - 1 ? "bg-white " : "bg-gray-100"),
39843
+ className: "p-2 border shadow rounded " + (currentIndex < slicedData.length - 1 ? "bg-white " : "bg-gray-100"),
39839
39844
  onClick: (e) => {
39840
- currentIndex < searchedData.length - 1 && setCurrentIndex(currentIndex + 1);
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: searchedData[currentIndex],
39852
+ row: slicedData[currentIndex],
39848
39853
  hide
39849
39854
  })
39850
39855
  ] });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "next-recomponents",
3
- "version": "2.0.72",
3
+ "version": "2.0.76",
4
4
  "description": "description nueva",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",
@@ -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 max-h-100 overflow-y-auto"
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">
@@ -173,7 +173,10 @@ export default function HTable({
173
173
  const obj: any = {};
174
174
 
175
175
  for (let key in d) {
176
- if (!key.startsWith("_")) {
176
+ if (
177
+ !key.startsWith("_") &&
178
+ !context.hideColumns.includes(key)
179
+ ) {
177
180
  obj[key] = d[key];
178
181
  }
179
182
  }
@@ -331,6 +334,7 @@ export default function HTable({
331
334
  <button
332
335
  className="border shadow rounded bg-blue-500 text-white p-2 "
333
336
  onClick={(e) => {
337
+ console.log(pagination.pagina);
334
338
  setCurrentIndex(rowIndex);
335
339
  modalRef.current?.click();
336
340
  }}
@@ -594,6 +598,7 @@ export default function HTable({
594
598
  currentIndex={currentIndex}
595
599
  setCurrentIndex={setCurrentIndex}
596
600
  searchedData={searchedData}
601
+ pagination={pagination}
597
602
  />
598
603
  </Modal>
599
604
  )}
@@ -615,13 +620,16 @@ function ModalContent({
615
620
  searchedData,
616
621
  context,
617
622
  hide,
623
+ pagination,
618
624
  }: {
619
625
  hide?: () => void;
620
626
  currentIndex: number;
621
627
  setCurrentIndex: Dispatch<number>;
622
628
  searchedData: any;
623
629
  context: any;
630
+ pagination: any;
624
631
  }) {
632
+ const slicedData = searchedData.slice(pagination.inicio - 1, pagination.fin);
625
633
  return (
626
634
  <div className="relative">
627
635
  <div className="fixed top-0 left-0 p-10 ">
@@ -639,12 +647,10 @@ function ModalContent({
639
647
  <button
640
648
  className={
641
649
  "p-2 border shadow rounded " +
642
- (currentIndex < searchedData.length - 1
643
- ? "bg-white "
644
- : "bg-gray-100")
650
+ (currentIndex < slicedData.length - 1 ? "bg-white " : "bg-gray-100")
645
651
  }
646
652
  onClick={(e) => {
647
- currentIndex < searchedData.length - 1 &&
653
+ currentIndex < slicedData.length - 1 &&
648
654
  setCurrentIndex(currentIndex + 1);
649
655
  }}
650
656
  >
@@ -652,7 +658,7 @@ function ModalContent({
652
658
  </button>
653
659
  </div>
654
660
  {React.cloneElement(context.modal, {
655
- row: searchedData[currentIndex],
661
+ row: slicedData[currentIndex],
656
662
  hide,
657
663
  })}
658
664
  </div>