next-recomponents 1.6.86 → 1.6.88

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 CHANGED
@@ -164,11 +164,4 @@ declare function useExcel(): {
164
164
  export: (data: any[][], fileName?: string) => void;
165
165
  };
166
166
 
167
- declare function MyCalendar({ enabledDates, onChange, defaultValue, className, }: {
168
- enabledDates: Date[];
169
- onChange: (e: any) => void;
170
- defaultValue?: string;
171
- className?: string;
172
- }): react_jsx_runtime.JSX.Element;
173
-
174
- export { Alert, Button, Container, Form, Input, Modal, MyCalendar, Pre, Select, Table, TextArea, regularExpresions, useDates, useExcel, useResources };
167
+ export { Alert, Button, Container, Form, Input, Modal, Pre, Select, Table, TextArea, regularExpresions, useDates, useExcel, useResources };
package/dist/index.d.ts CHANGED
@@ -164,11 +164,4 @@ declare function useExcel(): {
164
164
  export: (data: any[][], fileName?: string) => void;
165
165
  };
166
166
 
167
- declare function MyCalendar({ enabledDates, onChange, defaultValue, className, }: {
168
- enabledDates: Date[];
169
- onChange: (e: any) => void;
170
- defaultValue?: string;
171
- className?: string;
172
- }): react_jsx_runtime.JSX.Element;
173
-
174
- export { Alert, Button, Container, Form, Input, Modal, MyCalendar, Pre, Select, Table, TextArea, regularExpresions, useDates, useExcel, useResources };
167
+ export { Alert, Button, Container, Form, Input, Modal, Pre, Select, Table, TextArea, regularExpresions, useDates, useExcel, useResources };
package/dist/index.js CHANGED
@@ -2974,7 +2974,6 @@ __export(index_exports, {
2974
2974
  Form: () => Form,
2975
2975
  Input: () => Input,
2976
2976
  Modal: () => Modal,
2977
- MyCalendar: () => MyCalendar,
2978
2977
  Pre: () => pre_default,
2979
2978
  Select: () => Select,
2980
2979
  Table: () => Table,
@@ -11382,7 +11381,7 @@ function FilterMenu({
11382
11381
  "div",
11383
11382
  {
11384
11383
  className: "absolute bg-white border rounded min-w-[200px] ",
11385
- style: { zIndex: 9999999 },
11384
+ style: { zIndex: 99999999999 },
11386
11385
  children: /* @__PURE__ */ (0, import_jsx_runtime11.jsxs)("div", { className: "flex flex-col items-start text-black", children: [
11387
11386
  /* @__PURE__ */ (0, import_jsx_runtime11.jsxs)(
11388
11387
  "div",
@@ -11425,7 +11424,6 @@ function FilterMenu({
11425
11424
  md[h].exclude = true;
11426
11425
  }
11427
11426
  }
11428
- console.log(hasText, md);
11429
11427
  return md;
11430
11428
  });
11431
11429
  setMapedData(changed);
@@ -43335,7 +43333,7 @@ function HTable(_a) {
43335
43333
  totals,
43336
43334
  exportName,
43337
43335
  onSave,
43338
- maxItems = 0,
43336
+ maxItems = Infinity,
43339
43337
  loader = "Loading..."
43340
43338
  } = _b, props = __objRest(_b, [
43341
43339
  "data",
@@ -43413,7 +43411,7 @@ function HTable(_a) {
43413
43411
  })).map((d) => Object.assign({}, ...d)) : {};
43414
43412
  }, [mapedData]);
43415
43413
  return /* @__PURE__ */ (0, import_jsx_runtime13.jsxs)(import_jsx_runtime13.Fragment, { children: [
43416
- maxItems && /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(
43414
+ maxItems !== Infinity && /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(
43417
43415
  Pagination,
43418
43416
  {
43419
43417
  totalPages,
@@ -43566,12 +43564,6 @@ function Table(_a) {
43566
43564
  "div",
43567
43565
  {
43568
43566
  className: "bg-gray-200 border rounded shadow p-1",
43569
- style: {
43570
- minHeight: "500px",
43571
- overflowY: "auto",
43572
- contentVisibility: "auto",
43573
- containIntrinsicSize: "500px"
43574
- },
43575
43567
  children: Array.isArray(props.data) ? /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(HTable, __spreadValues({}, props)) : /* @__PURE__ */ (0, import_jsx_runtime14.jsx)("div", { className: " p-5 border rounded shadow bg-yellw-500", children: "No es un array" })
43576
43568
  }
43577
43569
  );
@@ -44389,114 +44381,6 @@ function useExcel() {
44389
44381
  }
44390
44382
  return { import: importFile, export: exportFile };
44391
44383
  }
44392
-
44393
- // src/calendar/index.tsx
44394
- var import_react31 = require("react");
44395
- var import_react_calendar = __toESM(require("react-calendar"));
44396
-
44397
- // src/calendar/calendar.icon.tsx
44398
- var import_jsx_runtime22 = require("react/jsx-runtime");
44399
- function CalendarIcon() {
44400
- return /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(
44401
- "svg",
44402
- {
44403
- stroke: "currentColor",
44404
- fill: "currentColor",
44405
- strokeWidth: "0",
44406
- viewBox: "0 0 448 512",
44407
- height: "20px",
44408
- width: "20px",
44409
- xmlns: "http://www.w3.org/2000/svg",
44410
- children: /* @__PURE__ */ (0, import_jsx_runtime22.jsx)("path", { d: "M12 192h424c6.6 0 12 5.4 12 12v260c0 26.5-21.5 48-48 48H48c-26.5 0-48-21.5-48-48V204c0-6.6 5.4-12 12-12zm436-44v-36c0-26.5-21.5-48-48-48h-48V12c0-6.6-5.4-12-12-12h-40c-6.6 0-12 5.4-12 12v52H160V12c0-6.6-5.4-12-12-12h-40c-6.6 0-12 5.4-12 12v52H48C21.5 64 0 85.5 0 112v36c0 6.6 5.4 12 12 12h424c6.6 0 12-5.4 12-12z" })
44411
- }
44412
- );
44413
- }
44414
-
44415
- // src/calendar/index.tsx
44416
- var import_jsx_runtime23 = require("react/jsx-runtime");
44417
- function MyCalendar({
44418
- enabledDates,
44419
- onChange,
44420
- defaultValue = "",
44421
- className = ""
44422
- }) {
44423
- const modalRef = (0, import_react31.useRef)(null);
44424
- const [date, setDate] = (0, import_react31.useState)(defaultValue);
44425
- const [selectedDate, setSelectedDate] = (0, import_react31.useState)(/* @__PURE__ */ new Date());
44426
- const [visible, setVisible] = (0, import_react31.useState)(false);
44427
- const isDateDisabled = ({ date: date2, view }) => {
44428
- if (view === "month") {
44429
- return !enabledDates.some(
44430
- (enabledDate) => date2.getFullYear() === enabledDate.getFullYear() && date2.getMonth() === enabledDate.getMonth() && date2.getDate() === enabledDate.getDate()
44431
- );
44432
- }
44433
- return false;
44434
- };
44435
- function handleChange(e) {
44436
- var _a, _b;
44437
- setSelectedDate(e);
44438
- const date2 = new Date(e);
44439
- const formattedDate = date2.toISOString().split("T")[0];
44440
- setDate(formattedDate);
44441
- onChange(e);
44442
- (_b = (_a = modalRef == null ? void 0 : modalRef.current) == null ? void 0 : _a.close) == null ? void 0 : _b.call(_a);
44443
- }
44444
- (0, import_react31.useEffect)(() => {
44445
- setVisible(typeof window != "undefined");
44446
- }, [typeof window]);
44447
- return /* @__PURE__ */ (0, import_jsx_runtime23.jsxs)("div", { className: "relative", children: [
44448
- /* @__PURE__ */ (0, import_jsx_runtime23.jsxs)(
44449
- "div",
44450
- {
44451
- onClick: (e) => {
44452
- var _a, _b;
44453
- return (_b = (_a = modalRef == null ? void 0 : modalRef.current) == null ? void 0 : _a.showModal) == null ? void 0 : _b.call(_a);
44454
- },
44455
- className: "cursor-pointer flex items-center justify-center",
44456
- children: [
44457
- /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(
44458
- "input",
44459
- {
44460
- className: [
44461
- "p-2 w-full rounded border shadow cursor-pointer",
44462
- className
44463
- ].join(" "),
44464
- value: date,
44465
- onChange: (e) => {
44466
- },
44467
- readOnly: true
44468
- }
44469
- ),
44470
- /* @__PURE__ */ (0, import_jsx_runtime23.jsx)("div", { className: "absolute", style: { right: "10px" }, children: /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(CalendarIcon, {}) })
44471
- ]
44472
- }
44473
- ),
44474
- visible && /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(
44475
- "dialog",
44476
- {
44477
- ref: modalRef,
44478
- onClick: (e) => {
44479
- var _a;
44480
- const element = e.target;
44481
- if ((element == null ? void 0 : element.id) == "my-calendar-modal-item") {
44482
- (_a = modalRef.current) == null ? void 0 : _a.close();
44483
- }
44484
- },
44485
- id: "my-calendar-modal-item",
44486
- children: /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(
44487
- import_react_calendar.default,
44488
- {
44489
- onChange: (e) => {
44490
- handleChange(e);
44491
- },
44492
- value: selectedDate,
44493
- tileDisabled: isDateDisabled
44494
- }
44495
- )
44496
- }
44497
- )
44498
- ] });
44499
- }
44500
44384
  // Annotate the CommonJS export names for ESM import in node:
44501
44385
  0 && (module.exports = {
44502
44386
  Alert,
@@ -44505,7 +44389,6 @@ function MyCalendar({
44505
44389
  Form,
44506
44390
  Input,
44507
44391
  Modal,
44508
- MyCalendar,
44509
44392
  Pre,
44510
44393
  Select,
44511
44394
  Table,
package/dist/index.mjs CHANGED
@@ -11366,7 +11366,7 @@ function FilterMenu({
11366
11366
  "div",
11367
11367
  {
11368
11368
  className: "absolute bg-white border rounded min-w-[200px] ",
11369
- style: { zIndex: 9999999 },
11369
+ style: { zIndex: 99999999999 },
11370
11370
  children: /* @__PURE__ */ jsxs8("div", { className: "flex flex-col items-start text-black", children: [
11371
11371
  /* @__PURE__ */ jsxs8(
11372
11372
  "div",
@@ -11409,7 +11409,6 @@ function FilterMenu({
11409
11409
  md[h].exclude = true;
11410
11410
  }
11411
11411
  }
11412
- console.log(hasText, md);
11413
11412
  return md;
11414
11413
  });
11415
11414
  setMapedData(changed);
@@ -43319,7 +43318,7 @@ function HTable(_a) {
43319
43318
  totals,
43320
43319
  exportName,
43321
43320
  onSave,
43322
- maxItems = 0,
43321
+ maxItems = Infinity,
43323
43322
  loader = "Loading..."
43324
43323
  } = _b, props = __objRest(_b, [
43325
43324
  "data",
@@ -43397,7 +43396,7 @@ function HTable(_a) {
43397
43396
  })).map((d) => Object.assign({}, ...d)) : {};
43398
43397
  }, [mapedData]);
43399
43398
  return /* @__PURE__ */ jsxs10(Fragment5, { children: [
43400
- maxItems && /* @__PURE__ */ jsx12(
43399
+ maxItems !== Infinity && /* @__PURE__ */ jsx12(
43401
43400
  Pagination,
43402
43401
  {
43403
43402
  totalPages,
@@ -43550,12 +43549,6 @@ function Table(_a) {
43550
43549
  "div",
43551
43550
  {
43552
43551
  className: "bg-gray-200 border rounded shadow p-1",
43553
- style: {
43554
- minHeight: "500px",
43555
- overflowY: "auto",
43556
- contentVisibility: "auto",
43557
- containIntrinsicSize: "500px"
43558
- },
43559
43552
  children: Array.isArray(props.data) ? /* @__PURE__ */ jsx13(HTable, __spreadValues({}, props)) : /* @__PURE__ */ jsx13("div", { className: " p-5 border rounded shadow bg-yellw-500", children: "No es un array" })
43560
43553
  }
43561
43554
  );
@@ -44379,114 +44372,6 @@ function useExcel() {
44379
44372
  }
44380
44373
  return { import: importFile, export: exportFile };
44381
44374
  }
44382
-
44383
- // src/calendar/index.tsx
44384
- import { useEffect as useEffect9, useRef as useRef7, useState as useState10 } from "react";
44385
- import Calendar from "react-calendar";
44386
-
44387
- // src/calendar/calendar.icon.tsx
44388
- import { jsx as jsx21 } from "react/jsx-runtime";
44389
- function CalendarIcon() {
44390
- return /* @__PURE__ */ jsx21(
44391
- "svg",
44392
- {
44393
- stroke: "currentColor",
44394
- fill: "currentColor",
44395
- strokeWidth: "0",
44396
- viewBox: "0 0 448 512",
44397
- height: "20px",
44398
- width: "20px",
44399
- xmlns: "http://www.w3.org/2000/svg",
44400
- children: /* @__PURE__ */ jsx21("path", { d: "M12 192h424c6.6 0 12 5.4 12 12v260c0 26.5-21.5 48-48 48H48c-26.5 0-48-21.5-48-48V204c0-6.6 5.4-12 12-12zm436-44v-36c0-26.5-21.5-48-48-48h-48V12c0-6.6-5.4-12-12-12h-40c-6.6 0-12 5.4-12 12v52H160V12c0-6.6-5.4-12-12-12h-40c-6.6 0-12 5.4-12 12v52H48C21.5 64 0 85.5 0 112v36c0 6.6 5.4 12 12 12h424c6.6 0 12-5.4 12-12z" })
44401
- }
44402
- );
44403
- }
44404
-
44405
- // src/calendar/index.tsx
44406
- import { jsx as jsx22, jsxs as jsxs14 } from "react/jsx-runtime";
44407
- function MyCalendar({
44408
- enabledDates,
44409
- onChange,
44410
- defaultValue = "",
44411
- className = ""
44412
- }) {
44413
- const modalRef = useRef7(null);
44414
- const [date, setDate] = useState10(defaultValue);
44415
- const [selectedDate, setSelectedDate] = useState10(/* @__PURE__ */ new Date());
44416
- const [visible, setVisible] = useState10(false);
44417
- const isDateDisabled = ({ date: date2, view }) => {
44418
- if (view === "month") {
44419
- return !enabledDates.some(
44420
- (enabledDate) => date2.getFullYear() === enabledDate.getFullYear() && date2.getMonth() === enabledDate.getMonth() && date2.getDate() === enabledDate.getDate()
44421
- );
44422
- }
44423
- return false;
44424
- };
44425
- function handleChange(e) {
44426
- var _a, _b;
44427
- setSelectedDate(e);
44428
- const date2 = new Date(e);
44429
- const formattedDate = date2.toISOString().split("T")[0];
44430
- setDate(formattedDate);
44431
- onChange(e);
44432
- (_b = (_a = modalRef == null ? void 0 : modalRef.current) == null ? void 0 : _a.close) == null ? void 0 : _b.call(_a);
44433
- }
44434
- useEffect9(() => {
44435
- setVisible(typeof window != "undefined");
44436
- }, [typeof window]);
44437
- return /* @__PURE__ */ jsxs14("div", { className: "relative", children: [
44438
- /* @__PURE__ */ jsxs14(
44439
- "div",
44440
- {
44441
- onClick: (e) => {
44442
- var _a, _b;
44443
- return (_b = (_a = modalRef == null ? void 0 : modalRef.current) == null ? void 0 : _a.showModal) == null ? void 0 : _b.call(_a);
44444
- },
44445
- className: "cursor-pointer flex items-center justify-center",
44446
- children: [
44447
- /* @__PURE__ */ jsx22(
44448
- "input",
44449
- {
44450
- className: [
44451
- "p-2 w-full rounded border shadow cursor-pointer",
44452
- className
44453
- ].join(" "),
44454
- value: date,
44455
- onChange: (e) => {
44456
- },
44457
- readOnly: true
44458
- }
44459
- ),
44460
- /* @__PURE__ */ jsx22("div", { className: "absolute", style: { right: "10px" }, children: /* @__PURE__ */ jsx22(CalendarIcon, {}) })
44461
- ]
44462
- }
44463
- ),
44464
- visible && /* @__PURE__ */ jsx22(
44465
- "dialog",
44466
- {
44467
- ref: modalRef,
44468
- onClick: (e) => {
44469
- var _a;
44470
- const element = e.target;
44471
- if ((element == null ? void 0 : element.id) == "my-calendar-modal-item") {
44472
- (_a = modalRef.current) == null ? void 0 : _a.close();
44473
- }
44474
- },
44475
- id: "my-calendar-modal-item",
44476
- children: /* @__PURE__ */ jsx22(
44477
- Calendar,
44478
- {
44479
- onChange: (e) => {
44480
- handleChange(e);
44481
- },
44482
- value: selectedDate,
44483
- tileDisabled: isDateDisabled
44484
- }
44485
- )
44486
- }
44487
- )
44488
- ] });
44489
- }
44490
44375
  export {
44491
44376
  Alert,
44492
44377
  Button,
@@ -44494,7 +44379,6 @@ export {
44494
44379
  Form,
44495
44380
  Input,
44496
44381
  Modal,
44497
- MyCalendar,
44498
44382
  pre_default as Pre,
44499
44383
  Select,
44500
44384
  Table,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "next-recomponents",
3
- "version": "1.6.86",
3
+ "version": "1.6.88",
4
4
  "description": "",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",
package/src/index.tsx CHANGED
@@ -12,4 +12,4 @@ export { default as Modal } from "./modal";
12
12
  export { default as Pre } from "./pre";
13
13
  export { default as useDates } from "./use-dates";
14
14
  export { default as useExcel } from "./use-excel";
15
- export { default as MyCalendar } from "./calendar";
15
+ // export { default as MyCalendar } from "./calendar";
@@ -33,7 +33,7 @@ export default function FilterMenu({
33
33
  <>
34
34
  <div
35
35
  className="absolute bg-white border rounded min-w-[200px] "
36
- style={{ zIndex: 9999999 }}
36
+ style={{ zIndex: 99999999999 }}
37
37
  >
38
38
  <div className="flex flex-col items-start text-black">
39
39
  <div
@@ -75,7 +75,7 @@ export default function FilterMenu({
75
75
  md[h].exclude = true;
76
76
  }
77
77
  }
78
- console.log(hasText, md);
78
+
79
79
  return md;
80
80
  });
81
81
  setMapedData(changed);
package/src/table/h.tsx CHANGED
@@ -1,15 +1,7 @@
1
1
  import React, { useEffect, useMemo, useRef, useState } from "react";
2
2
  import { TableProps } from ".";
3
3
  import TD from "./td";
4
- import {
5
- ExcelIcon,
6
- FilterOffIcon,
7
- SaveIcon,
8
- MdFirstPage,
9
- MdLastPage,
10
- MdNavigateBefore,
11
- MdNavigateNext,
12
- } from "./filters";
4
+ import { ExcelIcon, FilterOffIcon, SaveIcon } from "./filters";
13
5
  import FilterMenu from "./filter.menu";
14
6
  import useExportdata from "./export";
15
7
  import Pagination from "./pagination";
@@ -20,7 +12,7 @@ export default function HTable({
20
12
  totals,
21
13
  exportName,
22
14
  onSave,
23
- maxItems = 0,
15
+ maxItems = Infinity,
24
16
  loader = "Loading...",
25
17
  ...props
26
18
  }: TableProps) {
@@ -109,7 +101,7 @@ export default function HTable({
109
101
 
110
102
  return (
111
103
  <>
112
- {maxItems && (
104
+ {maxItems !== Infinity && (
113
105
  <Pagination
114
106
  totalPages={totalPages}
115
107
  page={page}
@@ -23,12 +23,11 @@ export default function Table({ ...props }: TableProps) {
23
23
  return (
24
24
  <div
25
25
  className="bg-gray-200 border rounded shadow p-1"
26
- style={{
27
- minHeight: "500px",
28
- overflowY: "auto",
29
- contentVisibility: "auto",
30
- containIntrinsicSize: "500px",
31
- }}
26
+ // style={{
27
+ // overflowY: "auto",
28
+ // contentVisibility: "auto",
29
+ // containIntrinsicSize: "500px",
30
+ // }}
32
31
  >
33
32
  {Array.isArray(props.data) ? (
34
33
  <HTable {...props} />