next-recomponents 2.0.60 → 2.0.62
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 +3 -3
- package/dist/index.d.ts +3 -3
- package/dist/index.js +46 -10
- package/dist/index.mjs +118 -82
- package/package.json +1 -1
- package/src/doc-viewer/icon.tsx +17 -0
- package/src/doc-viewer/index.tsx +28 -12
- package/src/table-advanced/h.table.tsx +1 -1
package/dist/index.d.mts
CHANGED
|
@@ -205,13 +205,13 @@ type Item = {
|
|
|
205
205
|
url: string;
|
|
206
206
|
name: string;
|
|
207
207
|
contentType: string;
|
|
208
|
-
width?: string;
|
|
209
|
-
height?: string;
|
|
210
208
|
};
|
|
211
209
|
type Props = {
|
|
212
210
|
item: Item;
|
|
211
|
+
width?: string;
|
|
212
|
+
height?: string;
|
|
213
213
|
};
|
|
214
|
-
declare function DocumentViewer({ item }: Props): react_jsx_runtime.JSX.Element;
|
|
214
|
+
declare function DocumentViewer({ item, width, height, }: Props): react_jsx_runtime.JSX.Element;
|
|
215
215
|
|
|
216
216
|
interface Table3Props<T extends Record<string, any>> extends DetailedHTMLProps<TableHTMLAttributes<HTMLTableElement>, HTMLTableElement> {
|
|
217
217
|
data: T[];
|
package/dist/index.d.ts
CHANGED
|
@@ -205,13 +205,13 @@ type Item = {
|
|
|
205
205
|
url: string;
|
|
206
206
|
name: string;
|
|
207
207
|
contentType: string;
|
|
208
|
-
width?: string;
|
|
209
|
-
height?: string;
|
|
210
208
|
};
|
|
211
209
|
type Props = {
|
|
212
210
|
item: Item;
|
|
211
|
+
width?: string;
|
|
212
|
+
height?: string;
|
|
213
213
|
};
|
|
214
|
-
declare function DocumentViewer({ item }: Props): react_jsx_runtime.JSX.Element;
|
|
214
|
+
declare function DocumentViewer({ item, width, height, }: Props): react_jsx_runtime.JSX.Element;
|
|
215
215
|
|
|
216
216
|
interface Table3Props<T extends Record<string, any>> extends DetailedHTMLProps<TableHTMLAttributes<HTMLTableElement>, HTMLTableElement> {
|
|
217
217
|
data: T[];
|
package/dist/index.js
CHANGED
|
@@ -37526,20 +37526,49 @@ function Icon() {
|
|
|
37526
37526
|
}
|
|
37527
37527
|
);
|
|
37528
37528
|
}
|
|
37529
|
+
function DownloadIcon() {
|
|
37530
|
+
return /* @__PURE__ */ (0, import_jsx_runtime21.jsxs)(
|
|
37531
|
+
"svg",
|
|
37532
|
+
{
|
|
37533
|
+
stroke: "currentColor",
|
|
37534
|
+
fill: "currentColor",
|
|
37535
|
+
strokeWidth: "0",
|
|
37536
|
+
viewBox: "0 0 24 24",
|
|
37537
|
+
height: "1em",
|
|
37538
|
+
width: "1em",
|
|
37539
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
37540
|
+
children: [
|
|
37541
|
+
/* @__PURE__ */ (0, import_jsx_runtime21.jsx)("path", { fill: "none", d: "M0 0h24v24H0z" }),
|
|
37542
|
+
/* @__PURE__ */ (0, import_jsx_runtime21.jsx)("path", { d: "M18 15v3H6v-3H4v3c0 1.1.9 2 2 2h12c1.1 0 2-.9 2-2v-3zm-1-4-1.41-1.41L13 12.17V4h-2v8.17L8.41 9.59 7 11l5 5z" })
|
|
37543
|
+
]
|
|
37544
|
+
}
|
|
37545
|
+
);
|
|
37546
|
+
}
|
|
37529
37547
|
|
|
37530
37548
|
// src/doc-viewer/index.tsx
|
|
37531
37549
|
var import_jsx_runtime22 = require("react/jsx-runtime");
|
|
37532
|
-
function DocumentViewer({
|
|
37533
|
-
|
|
37550
|
+
function DocumentViewer({
|
|
37551
|
+
item,
|
|
37552
|
+
width = "100%",
|
|
37553
|
+
height = "100%"
|
|
37554
|
+
}) {
|
|
37555
|
+
const { url, name, contentType } = item;
|
|
37534
37556
|
const isImage = contentType.startsWith("image/");
|
|
37535
37557
|
const isPdf = contentType === "application/pdf";
|
|
37536
37558
|
const isGoogleDocCompatible = isPdf || contentType.includes("msword") || contentType.includes("officedocument") || contentType.includes("presentation");
|
|
37537
37559
|
const viewerUrl = isGoogleDocCompatible ? `https://docs.google.com/gview?url=${encodeURIComponent(
|
|
37538
37560
|
url
|
|
37539
37561
|
)}&embedded=true` : url;
|
|
37540
|
-
return /* @__PURE__ */ (0, import_jsx_runtime22.jsxs)("div", { className: "border shadow rounded
|
|
37541
|
-
/* @__PURE__ */ (0, import_jsx_runtime22.jsxs)("div", { className: "
|
|
37542
|
-
/* @__PURE__ */ (0, import_jsx_runtime22.jsx)(
|
|
37562
|
+
return /* @__PURE__ */ (0, import_jsx_runtime22.jsxs)("div", { className: "border shadow rounded relative pt-6 pb-1 px-1", children: [
|
|
37563
|
+
/* @__PURE__ */ (0, import_jsx_runtime22.jsxs)("div", { className: "grid grid-cols-[3fr_1fr] left-0 rounded-t shadow top-0 absolute p-1 bg-blue-500 px-1 text-white w-full ", children: [
|
|
37564
|
+
/* @__PURE__ */ (0, import_jsx_runtime22.jsx)(
|
|
37565
|
+
"h3",
|
|
37566
|
+
{
|
|
37567
|
+
className: "font-bold truncate text-xs px-1 cursor-pointer max-w-[90%] ",
|
|
37568
|
+
title: name,
|
|
37569
|
+
children: name
|
|
37570
|
+
}
|
|
37571
|
+
),
|
|
37543
37572
|
/* @__PURE__ */ (0, import_jsx_runtime22.jsx)(
|
|
37544
37573
|
"a",
|
|
37545
37574
|
{
|
|
@@ -37547,8 +37576,8 @@ function DocumentViewer({ item }) {
|
|
|
37547
37576
|
download: name,
|
|
37548
37577
|
target: "_blank",
|
|
37549
37578
|
rel: "noopener noreferrer",
|
|
37550
|
-
className: "border shadow rounded bg-blue-
|
|
37551
|
-
children:
|
|
37579
|
+
className: "border shadow hover:bg-blue-100 hover:text-black rounded bg-blue-900 text-white text-xs items-center truncate px-1 flex gap-1 justify-center",
|
|
37580
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(DownloadIcon, {})
|
|
37552
37581
|
}
|
|
37553
37582
|
)
|
|
37554
37583
|
] }),
|
|
@@ -37557,6 +37586,7 @@ function DocumentViewer({ item }) {
|
|
|
37557
37586
|
{
|
|
37558
37587
|
src: url,
|
|
37559
37588
|
alt: name,
|
|
37589
|
+
className: "rounded",
|
|
37560
37590
|
style: {
|
|
37561
37591
|
width,
|
|
37562
37592
|
height,
|
|
@@ -37568,14 +37598,20 @@ function DocumentViewer({ item }) {
|
|
|
37568
37598
|
) : isGoogleDocCompatible ? /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(
|
|
37569
37599
|
"iframe",
|
|
37570
37600
|
{
|
|
37601
|
+
className: "rounded",
|
|
37602
|
+
style: {
|
|
37603
|
+
width,
|
|
37604
|
+
height,
|
|
37605
|
+
maxWidth: "100%"
|
|
37606
|
+
},
|
|
37571
37607
|
title: name,
|
|
37572
37608
|
src: viewerUrl,
|
|
37573
|
-
style: { width, height, border: "none" },
|
|
37574
37609
|
allowFullScreen: true
|
|
37575
37610
|
}
|
|
37576
37611
|
) : /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(
|
|
37577
37612
|
"div",
|
|
37578
37613
|
{
|
|
37614
|
+
className: "rounded",
|
|
37579
37615
|
style: {
|
|
37580
37616
|
width,
|
|
37581
37617
|
height,
|
|
@@ -39263,10 +39299,10 @@ function HTable({
|
|
|
39263
39299
|
setWidths(
|
|
39264
39300
|
Object.fromEntries(
|
|
39265
39301
|
headers.map((h) => {
|
|
39266
|
-
var _a, _b;
|
|
39302
|
+
var _a, _b, _c, _d;
|
|
39267
39303
|
return [
|
|
39268
39304
|
h,
|
|
39269
|
-
((_a = context == null ? void 0 : context.colSize) == null ? void 0 : _a[h]) ? (_b = context == null ? void 0 : context.colSize) == null ? void 0 : _b[h] : ["__select__", "__modal__"].includes(h) ? 60 : h.startsWith("_") ? 0 : w
|
|
39305
|
+
((_a = context == null ? void 0 : context.colSize) == null ? void 0 : _a[h]) ? (_b = context == null ? void 0 : context.colSize) == null ? void 0 : _b[h] : ["__select__", "__modal__"].includes(h) ? 60 : h.startsWith("_") || ((_d = (_c = context == null ? void 0 : context.hideColumns) == null ? void 0 : _c.includes) == null ? void 0 : _d.call(_c, h)) ? 0 : w
|
|
39270
39306
|
];
|
|
39271
39307
|
})
|
|
39272
39308
|
)
|
package/dist/index.mjs
CHANGED
|
@@ -37495,7 +37495,7 @@ function MyCalendar({
|
|
|
37495
37495
|
}
|
|
37496
37496
|
|
|
37497
37497
|
// src/doc-viewer/icon.tsx
|
|
37498
|
-
import { jsx as jsx19 } from "react/jsx-runtime";
|
|
37498
|
+
import { jsx as jsx19, jsxs as jsxs12 } from "react/jsx-runtime";
|
|
37499
37499
|
function Icon() {
|
|
37500
37500
|
return /* @__PURE__ */ jsx19(
|
|
37501
37501
|
"svg",
|
|
@@ -37511,20 +37511,49 @@ function Icon() {
|
|
|
37511
37511
|
}
|
|
37512
37512
|
);
|
|
37513
37513
|
}
|
|
37514
|
+
function DownloadIcon() {
|
|
37515
|
+
return /* @__PURE__ */ jsxs12(
|
|
37516
|
+
"svg",
|
|
37517
|
+
{
|
|
37518
|
+
stroke: "currentColor",
|
|
37519
|
+
fill: "currentColor",
|
|
37520
|
+
strokeWidth: "0",
|
|
37521
|
+
viewBox: "0 0 24 24",
|
|
37522
|
+
height: "1em",
|
|
37523
|
+
width: "1em",
|
|
37524
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
37525
|
+
children: [
|
|
37526
|
+
/* @__PURE__ */ jsx19("path", { fill: "none", d: "M0 0h24v24H0z" }),
|
|
37527
|
+
/* @__PURE__ */ jsx19("path", { d: "M18 15v3H6v-3H4v3c0 1.1.9 2 2 2h12c1.1 0 2-.9 2-2v-3zm-1-4-1.41-1.41L13 12.17V4h-2v8.17L8.41 9.59 7 11l5 5z" })
|
|
37528
|
+
]
|
|
37529
|
+
}
|
|
37530
|
+
);
|
|
37531
|
+
}
|
|
37514
37532
|
|
|
37515
37533
|
// src/doc-viewer/index.tsx
|
|
37516
|
-
import { jsx as jsx20, jsxs as
|
|
37517
|
-
function DocumentViewer({
|
|
37518
|
-
|
|
37534
|
+
import { jsx as jsx20, jsxs as jsxs13 } from "react/jsx-runtime";
|
|
37535
|
+
function DocumentViewer({
|
|
37536
|
+
item,
|
|
37537
|
+
width = "100%",
|
|
37538
|
+
height = "100%"
|
|
37539
|
+
}) {
|
|
37540
|
+
const { url, name, contentType } = item;
|
|
37519
37541
|
const isImage = contentType.startsWith("image/");
|
|
37520
37542
|
const isPdf = contentType === "application/pdf";
|
|
37521
37543
|
const isGoogleDocCompatible = isPdf || contentType.includes("msword") || contentType.includes("officedocument") || contentType.includes("presentation");
|
|
37522
37544
|
const viewerUrl = isGoogleDocCompatible ? `https://docs.google.com/gview?url=${encodeURIComponent(
|
|
37523
37545
|
url
|
|
37524
37546
|
)}&embedded=true` : url;
|
|
37525
|
-
return /* @__PURE__ */
|
|
37526
|
-
/* @__PURE__ */
|
|
37527
|
-
/* @__PURE__ */ jsx20(
|
|
37547
|
+
return /* @__PURE__ */ jsxs13("div", { className: "border shadow rounded relative pt-6 pb-1 px-1", children: [
|
|
37548
|
+
/* @__PURE__ */ jsxs13("div", { className: "grid grid-cols-[3fr_1fr] left-0 rounded-t shadow top-0 absolute p-1 bg-blue-500 px-1 text-white w-full ", children: [
|
|
37549
|
+
/* @__PURE__ */ jsx20(
|
|
37550
|
+
"h3",
|
|
37551
|
+
{
|
|
37552
|
+
className: "font-bold truncate text-xs px-1 cursor-pointer max-w-[90%] ",
|
|
37553
|
+
title: name,
|
|
37554
|
+
children: name
|
|
37555
|
+
}
|
|
37556
|
+
),
|
|
37528
37557
|
/* @__PURE__ */ jsx20(
|
|
37529
37558
|
"a",
|
|
37530
37559
|
{
|
|
@@ -37532,8 +37561,8 @@ function DocumentViewer({ item }) {
|
|
|
37532
37561
|
download: name,
|
|
37533
37562
|
target: "_blank",
|
|
37534
37563
|
rel: "noopener noreferrer",
|
|
37535
|
-
className: "border shadow rounded bg-blue-
|
|
37536
|
-
children:
|
|
37564
|
+
className: "border shadow hover:bg-blue-100 hover:text-black rounded bg-blue-900 text-white text-xs items-center truncate px-1 flex gap-1 justify-center",
|
|
37565
|
+
children: /* @__PURE__ */ jsx20(DownloadIcon, {})
|
|
37537
37566
|
}
|
|
37538
37567
|
)
|
|
37539
37568
|
] }),
|
|
@@ -37542,6 +37571,7 @@ function DocumentViewer({ item }) {
|
|
|
37542
37571
|
{
|
|
37543
37572
|
src: url,
|
|
37544
37573
|
alt: name,
|
|
37574
|
+
className: "rounded",
|
|
37545
37575
|
style: {
|
|
37546
37576
|
width,
|
|
37547
37577
|
height,
|
|
@@ -37553,14 +37583,20 @@ function DocumentViewer({ item }) {
|
|
|
37553
37583
|
) : isGoogleDocCompatible ? /* @__PURE__ */ jsx20(
|
|
37554
37584
|
"iframe",
|
|
37555
37585
|
{
|
|
37586
|
+
className: "rounded",
|
|
37587
|
+
style: {
|
|
37588
|
+
width,
|
|
37589
|
+
height,
|
|
37590
|
+
maxWidth: "100%"
|
|
37591
|
+
},
|
|
37556
37592
|
title: name,
|
|
37557
37593
|
src: viewerUrl,
|
|
37558
|
-
style: { width, height, border: "none" },
|
|
37559
37594
|
allowFullScreen: true
|
|
37560
37595
|
}
|
|
37561
37596
|
) : /* @__PURE__ */ jsx20(
|
|
37562
37597
|
"div",
|
|
37563
37598
|
{
|
|
37599
|
+
className: "rounded",
|
|
37564
37600
|
style: {
|
|
37565
37601
|
width,
|
|
37566
37602
|
height,
|
|
@@ -37587,7 +37623,7 @@ import React9, {
|
|
|
37587
37623
|
import { useEffect as useEffect8, useMemo as useMemo5, useState as useState11 } from "react";
|
|
37588
37624
|
|
|
37589
37625
|
// src/table3/filters.tsx
|
|
37590
|
-
import { jsx as jsx21, jsxs as
|
|
37626
|
+
import { jsx as jsx21, jsxs as jsxs14 } from "react/jsx-runtime";
|
|
37591
37627
|
function FilterOffIcon() {
|
|
37592
37628
|
return /* @__PURE__ */ jsx21(
|
|
37593
37629
|
"svg",
|
|
@@ -37649,7 +37685,7 @@ function EditIcon2() {
|
|
|
37649
37685
|
);
|
|
37650
37686
|
}
|
|
37651
37687
|
function SaveIcon() {
|
|
37652
|
-
return /* @__PURE__ */
|
|
37688
|
+
return /* @__PURE__ */ jsxs14(
|
|
37653
37689
|
"svg",
|
|
37654
37690
|
{
|
|
37655
37691
|
stroke: "currentColor",
|
|
@@ -37683,7 +37719,7 @@ function ExcelIcon() {
|
|
|
37683
37719
|
}
|
|
37684
37720
|
|
|
37685
37721
|
// src/table3/filter.tsx
|
|
37686
|
-
import { jsx as jsx22, jsxs as
|
|
37722
|
+
import { jsx as jsx22, jsxs as jsxs15 } from "react/jsx-runtime";
|
|
37687
37723
|
function Filter({
|
|
37688
37724
|
h,
|
|
37689
37725
|
objectData,
|
|
@@ -37744,7 +37780,7 @@ function Filter({
|
|
|
37744
37780
|
setSelected(news);
|
|
37745
37781
|
}
|
|
37746
37782
|
}, [data]);
|
|
37747
|
-
return /* @__PURE__ */
|
|
37783
|
+
return /* @__PURE__ */ jsxs15("th", { className: "cursor-pointer", children: [
|
|
37748
37784
|
/* @__PURE__ */ jsx22("div", { className: "relative", children: visible && /* @__PURE__ */ jsx22(
|
|
37749
37785
|
"div",
|
|
37750
37786
|
{
|
|
@@ -37753,8 +37789,8 @@ function Filter({
|
|
|
37753
37789
|
onClick: (e) => setVisible(!visible)
|
|
37754
37790
|
}
|
|
37755
37791
|
) }),
|
|
37756
|
-
/* @__PURE__ */
|
|
37757
|
-
/* @__PURE__ */
|
|
37792
|
+
/* @__PURE__ */ jsxs15("div", { className: "relative w-full justify-center flex", children: [
|
|
37793
|
+
/* @__PURE__ */ jsxs15(
|
|
37758
37794
|
"div",
|
|
37759
37795
|
{
|
|
37760
37796
|
style: (colSizes == null ? void 0 : colSizes[h]) ? {
|
|
@@ -37777,8 +37813,8 @@ function Filter({
|
|
|
37777
37813
|
{
|
|
37778
37814
|
className: "border shadow rounded bg-white p-1 absolute left-0 text-black",
|
|
37779
37815
|
style: { zIndex: 9999 },
|
|
37780
|
-
children: /* @__PURE__ */
|
|
37781
|
-
/* @__PURE__ */
|
|
37816
|
+
children: /* @__PURE__ */ jsxs15("div", { className: "flex flex-col gap-1 w-[300px] min-w-[300px] resize-x overflow-auto", children: [
|
|
37817
|
+
/* @__PURE__ */ jsxs15(
|
|
37782
37818
|
"div",
|
|
37783
37819
|
{
|
|
37784
37820
|
onClick: (e) => {
|
|
@@ -37800,7 +37836,7 @@ function Filter({
|
|
|
37800
37836
|
]
|
|
37801
37837
|
}
|
|
37802
37838
|
),
|
|
37803
|
-
/* @__PURE__ */
|
|
37839
|
+
/* @__PURE__ */ jsxs15(
|
|
37804
37840
|
"div",
|
|
37805
37841
|
{
|
|
37806
37842
|
onClick: (e) => {
|
|
@@ -37822,7 +37858,7 @@ function Filter({
|
|
|
37822
37858
|
]
|
|
37823
37859
|
}
|
|
37824
37860
|
),
|
|
37825
|
-
selected.length < items.length && /* @__PURE__ */
|
|
37861
|
+
selected.length < items.length && /* @__PURE__ */ jsxs15(
|
|
37826
37862
|
"div",
|
|
37827
37863
|
{
|
|
37828
37864
|
className: "p-1 flex items-center justify-between px-2 bg-red-200 border shadow rounded",
|
|
@@ -37854,7 +37890,7 @@ function Filter({
|
|
|
37854
37890
|
}
|
|
37855
37891
|
}
|
|
37856
37892
|
) }),
|
|
37857
|
-
/* @__PURE__ */ jsx22("div", { children: /* @__PURE__ */
|
|
37893
|
+
/* @__PURE__ */ jsx22("div", { children: /* @__PURE__ */ jsxs15("label", { className: "flex gap-1 cursor-pointer px-1", children: [
|
|
37858
37894
|
/* @__PURE__ */ jsx22(
|
|
37859
37895
|
"input",
|
|
37860
37896
|
{
|
|
@@ -37872,7 +37908,7 @@ function Filter({
|
|
|
37872
37908
|
"(Seleccionar Todo)"
|
|
37873
37909
|
] }) }),
|
|
37874
37910
|
/* @__PURE__ */ jsx22("div", { className: "overflow-auto flex gap-1 flex-col p-1 border shadow rounded h-[300px]", children: itemsFiltered.map((item) => {
|
|
37875
|
-
return /* @__PURE__ */ jsx22("div", { className: "hover:bg-gray-100 ", children: /* @__PURE__ */
|
|
37911
|
+
return /* @__PURE__ */ jsx22("div", { className: "hover:bg-gray-100 ", children: /* @__PURE__ */ jsxs15("label", { className: "flex gap-1 cursor-pointer truncate", children: [
|
|
37876
37912
|
/* @__PURE__ */ jsx22(
|
|
37877
37913
|
"input",
|
|
37878
37914
|
{
|
|
@@ -37894,7 +37930,7 @@ function Filter({
|
|
|
37894
37930
|
item || "(Vacias)"
|
|
37895
37931
|
] }) }, item);
|
|
37896
37932
|
}) }),
|
|
37897
|
-
/* @__PURE__ */
|
|
37933
|
+
/* @__PURE__ */ jsxs15("div", { className: "flex justify-between px-1", children: [
|
|
37898
37934
|
/* @__PURE__ */ jsx22(
|
|
37899
37935
|
"button",
|
|
37900
37936
|
{
|
|
@@ -37925,7 +37961,7 @@ function Filter({
|
|
|
37925
37961
|
}
|
|
37926
37962
|
|
|
37927
37963
|
// src/table3/head.tsx
|
|
37928
|
-
import { jsx as jsx23, jsxs as
|
|
37964
|
+
import { jsx as jsx23, jsxs as jsxs16 } from "react/jsx-runtime";
|
|
37929
37965
|
function TableHead({
|
|
37930
37966
|
headers,
|
|
37931
37967
|
selectItems,
|
|
@@ -37940,7 +37976,7 @@ function TableHead({
|
|
|
37940
37976
|
sort,
|
|
37941
37977
|
setSort
|
|
37942
37978
|
}) {
|
|
37943
|
-
return /* @__PURE__ */ jsx23("thead", { children: /* @__PURE__ */
|
|
37979
|
+
return /* @__PURE__ */ jsx23("thead", { children: /* @__PURE__ */ jsxs16("tr", { className: "bg-blue-500 text-white font-bold", children: [
|
|
37944
37980
|
modal && /* @__PURE__ */ jsx23("th", { children: "-" }),
|
|
37945
37981
|
selectItems && /* @__PURE__ */ jsx23("th", { children: /* @__PURE__ */ jsx23(
|
|
37946
37982
|
"input",
|
|
@@ -37993,7 +38029,7 @@ import { useState as useState12 } from "react";
|
|
|
37993
38029
|
|
|
37994
38030
|
// src/table3/tr.tsx
|
|
37995
38031
|
import React7 from "react";
|
|
37996
|
-
import { jsx as jsx24, jsxs as
|
|
38032
|
+
import { jsx as jsx24, jsxs as jsxs17 } from "react/jsx-runtime";
|
|
37997
38033
|
function TR({
|
|
37998
38034
|
handlers,
|
|
37999
38035
|
setObjectData,
|
|
@@ -38013,7 +38049,7 @@ function TR({
|
|
|
38013
38049
|
symbols
|
|
38014
38050
|
}) {
|
|
38015
38051
|
const color = selected == index ? "bg-blue-600 text-white hover:bg-blue-800" : index % 2 == 0 ? "bg-white" : "bg-blue-50";
|
|
38016
|
-
return /* @__PURE__ */
|
|
38052
|
+
return /* @__PURE__ */ jsxs17(
|
|
38017
38053
|
"tr",
|
|
38018
38054
|
{
|
|
38019
38055
|
className: ` hover:bg-blue-100 ${color} cursor-pointer`,
|
|
@@ -38103,7 +38139,7 @@ function TR({
|
|
|
38103
38139
|
});
|
|
38104
38140
|
return /* @__PURE__ */ jsx24("td", { className: `text-black `, children: cloned }, h);
|
|
38105
38141
|
}
|
|
38106
|
-
return symbols && (symbols == null ? void 0 : symbols[h]) ? /* @__PURE__ */ jsx24("td", { className: `text-center border max-w-[${colSize}px] `, children: /* @__PURE__ */
|
|
38142
|
+
return symbols && (symbols == null ? void 0 : symbols[h]) ? /* @__PURE__ */ jsx24("td", { className: `text-center border max-w-[${colSize}px] `, children: /* @__PURE__ */ jsxs17("div", { className: "flex items-center gap-1 w-full", children: [
|
|
38107
38143
|
symbols[h],
|
|
38108
38144
|
" ",
|
|
38109
38145
|
row[h]
|
|
@@ -38189,7 +38225,7 @@ function TableBody({
|
|
|
38189
38225
|
}
|
|
38190
38226
|
|
|
38191
38227
|
// src/table3/panel.tsx
|
|
38192
|
-
import { jsx as jsx26, jsxs as
|
|
38228
|
+
import { jsx as jsx26, jsxs as jsxs18 } from "react/jsx-runtime";
|
|
38193
38229
|
function Panel({
|
|
38194
38230
|
page,
|
|
38195
38231
|
setPage,
|
|
@@ -38200,9 +38236,9 @@ function Panel({
|
|
|
38200
38236
|
maxItems
|
|
38201
38237
|
}) {
|
|
38202
38238
|
const excel = useExcel();
|
|
38203
|
-
return /* @__PURE__ */
|
|
38204
|
-
/* @__PURE__ */
|
|
38205
|
-
onSave && /* @__PURE__ */
|
|
38239
|
+
return /* @__PURE__ */ jsxs18("div", { className: "flex gap-2 bg-gray-100 items-center", children: [
|
|
38240
|
+
/* @__PURE__ */ jsxs18("div", { className: "flex gap-1 ", children: [
|
|
38241
|
+
onSave && /* @__PURE__ */ jsxs18(
|
|
38206
38242
|
"button",
|
|
38207
38243
|
{
|
|
38208
38244
|
className: "p-2 border shadow rounded bg-blue-500 text-white flex items-center gap-1 text-md",
|
|
@@ -38216,7 +38252,7 @@ function Panel({
|
|
|
38216
38252
|
]
|
|
38217
38253
|
}
|
|
38218
38254
|
),
|
|
38219
|
-
exportName && /* @__PURE__ */
|
|
38255
|
+
exportName && /* @__PURE__ */ jsxs18(
|
|
38220
38256
|
"button",
|
|
38221
38257
|
{
|
|
38222
38258
|
className: "p-2 border shadow rounded bg-green-800 text-white flex items-center gap-1 text-md",
|
|
@@ -38236,10 +38272,10 @@ function Panel({
|
|
|
38236
38272
|
}
|
|
38237
38273
|
)
|
|
38238
38274
|
] }),
|
|
38239
|
-
maxItems !== Infinity && /* @__PURE__ */
|
|
38275
|
+
maxItems !== Infinity && /* @__PURE__ */ jsxs18("div", { className: "flex gap-2 items-center text-2xl", children: [
|
|
38240
38276
|
/* @__PURE__ */ jsx26("button", { onClick: () => setPage(1), disabled: page === 1, children: "\u23EE" }),
|
|
38241
38277
|
/* @__PURE__ */ jsx26("button", { onClick: () => setPage(page - 1), disabled: page === 1, children: "\u25C0" }),
|
|
38242
|
-
/* @__PURE__ */
|
|
38278
|
+
/* @__PURE__ */ jsxs18("span", { className: "text-sm", children: [
|
|
38243
38279
|
"P\xE1gina ",
|
|
38244
38280
|
page,
|
|
38245
38281
|
" / ",
|
|
@@ -38266,7 +38302,7 @@ function Panel({
|
|
|
38266
38302
|
}
|
|
38267
38303
|
|
|
38268
38304
|
// src/table3/footer.tsx
|
|
38269
|
-
import { jsx as jsx27, jsxs as
|
|
38305
|
+
import { jsx as jsx27, jsxs as jsxs19 } from "react/jsx-runtime";
|
|
38270
38306
|
function TableFooter({
|
|
38271
38307
|
objectData,
|
|
38272
38308
|
headers,
|
|
@@ -38291,14 +38327,14 @@ function TableFooter({
|
|
|
38291
38327
|
return null;
|
|
38292
38328
|
}
|
|
38293
38329
|
}
|
|
38294
|
-
return footer && /* @__PURE__ */ jsx27("tfoot", { children: /* @__PURE__ */
|
|
38330
|
+
return footer && /* @__PURE__ */ jsx27("tfoot", { children: /* @__PURE__ */ jsxs19("tr", { className: "bg-blue-500 text-white", children: [
|
|
38295
38331
|
selectItems && /* @__PURE__ */ jsx27("th", {}),
|
|
38296
38332
|
modal && /* @__PURE__ */ jsx27("th", {}),
|
|
38297
38333
|
headers.map((header) => {
|
|
38298
38334
|
if (header.startsWith("_")) {
|
|
38299
38335
|
return null;
|
|
38300
38336
|
} else if (footer == null ? void 0 : footer[header]) {
|
|
38301
|
-
return symbols && (symbols == null ? void 0 : symbols[header]) ? /* @__PURE__ */
|
|
38337
|
+
return symbols && (symbols == null ? void 0 : symbols[header]) ? /* @__PURE__ */ jsxs19("th", { className: "flex items-center gap-1", children: [
|
|
38302
38338
|
symbols[header],
|
|
38303
38339
|
" ",
|
|
38304
38340
|
operacion(footer[header], header)
|
|
@@ -38311,7 +38347,7 @@ function TableFooter({
|
|
|
38311
38347
|
|
|
38312
38348
|
// src/table3/dialog.tsx
|
|
38313
38349
|
import React8, { useMemo as useMemo6 } from "react";
|
|
38314
|
-
import { jsx as jsx28, jsxs as
|
|
38350
|
+
import { jsx as jsx28, jsxs as jsxs20 } from "react/jsx-runtime";
|
|
38315
38351
|
function Dialog3({
|
|
38316
38352
|
modalRef,
|
|
38317
38353
|
children,
|
|
@@ -38339,13 +38375,13 @@ function Dialog3({
|
|
|
38339
38375
|
}
|
|
38340
38376
|
return null;
|
|
38341
38377
|
}, [dialogRow, children]);
|
|
38342
|
-
return /* @__PURE__ */
|
|
38378
|
+
return /* @__PURE__ */ jsxs20(
|
|
38343
38379
|
"dialog",
|
|
38344
38380
|
{
|
|
38345
38381
|
ref: modalRef,
|
|
38346
38382
|
className: "p-6 rounded-xl shadow-2xl backdrop:bg-black/50 w-[100%] h-screen",
|
|
38347
38383
|
children: [
|
|
38348
|
-
/* @__PURE__ */
|
|
38384
|
+
/* @__PURE__ */ jsxs20("div", { className: "flex justify-between items-center mb-4", children: [
|
|
38349
38385
|
/* @__PURE__ */ jsx28("div", {}),
|
|
38350
38386
|
/* @__PURE__ */ jsx28(
|
|
38351
38387
|
"button",
|
|
@@ -38367,7 +38403,7 @@ function Dialog3({
|
|
|
38367
38403
|
var dialog_default = Dialog3;
|
|
38368
38404
|
|
|
38369
38405
|
// src/table3/index.tsx
|
|
38370
|
-
import { jsx as jsx29, jsxs as
|
|
38406
|
+
import { jsx as jsx29, jsxs as jsxs21 } from "react/jsx-runtime";
|
|
38371
38407
|
function Table3({
|
|
38372
38408
|
data,
|
|
38373
38409
|
selectItems,
|
|
@@ -38479,7 +38515,7 @@ function Table3({
|
|
|
38479
38515
|
}, [objectData]);
|
|
38480
38516
|
const style = (props == null ? void 0 : props.style) ? { ...props.style, tableLayout: "fixed" } : { tableLayout: "fixed" };
|
|
38481
38517
|
if (!objectData) return null;
|
|
38482
|
-
return /* @__PURE__ */
|
|
38518
|
+
return /* @__PURE__ */ jsxs21("div", { className: "border shadow rounded m-1 p-1 bg-white", children: [
|
|
38483
38519
|
modal && /* @__PURE__ */ jsx29(
|
|
38484
38520
|
dialog_default,
|
|
38485
38521
|
{
|
|
@@ -38492,7 +38528,7 @@ function Table3({
|
|
|
38492
38528
|
),
|
|
38493
38529
|
header && /* @__PURE__ */ jsx29("div", { className: "font-bold text-2xl py-5 px-2 bg-blue-50", children: header }),
|
|
38494
38530
|
/* @__PURE__ */ jsx29(Panel, { ...context }),
|
|
38495
|
-
/* @__PURE__ */
|
|
38531
|
+
/* @__PURE__ */ jsxs21("table", { ...props, style, children: [
|
|
38496
38532
|
/* @__PURE__ */ jsx29(TableHead, { ...context }),
|
|
38497
38533
|
/* @__PURE__ */ jsx29(TableBody, { ...context }),
|
|
38498
38534
|
/* @__PURE__ */ jsx29(TableFooter, { ...context })
|
|
@@ -38517,9 +38553,9 @@ import { useEffect as useEffect10, useMemo as useMemo8, useRef as useRef6, useSt
|
|
|
38517
38553
|
import { createPortal } from "react-dom";
|
|
38518
38554
|
|
|
38519
38555
|
// src/table-advanced/icons.tsx
|
|
38520
|
-
import { jsx as jsx30, jsxs as
|
|
38556
|
+
import { jsx as jsx30, jsxs as jsxs22 } from "react/jsx-runtime";
|
|
38521
38557
|
function DropIcon() {
|
|
38522
|
-
return /* @__PURE__ */
|
|
38558
|
+
return /* @__PURE__ */ jsxs22(
|
|
38523
38559
|
"svg",
|
|
38524
38560
|
{
|
|
38525
38561
|
stroke: "currentColor",
|
|
@@ -38608,7 +38644,7 @@ function ExcelIcon2() {
|
|
|
38608
38644
|
);
|
|
38609
38645
|
}
|
|
38610
38646
|
function OrderAscIcon() {
|
|
38611
|
-
return /* @__PURE__ */
|
|
38647
|
+
return /* @__PURE__ */ jsxs22(
|
|
38612
38648
|
"svg",
|
|
38613
38649
|
{
|
|
38614
38650
|
stroke: "currentColor",
|
|
@@ -38628,7 +38664,7 @@ function OrderAscIcon() {
|
|
|
38628
38664
|
points: "38,33 38,5 34,5 34,33 28,33 36,43 44,33"
|
|
38629
38665
|
}
|
|
38630
38666
|
),
|
|
38631
|
-
/* @__PURE__ */
|
|
38667
|
+
/* @__PURE__ */ jsxs22("g", { fill: "#2196F3", children: [
|
|
38632
38668
|
/* @__PURE__ */ jsx30("path", { d: "M16.8,17.2h-5.3l-1.1,3H6.9L12.6,5h2.9l5.7,15.2h-3.2L16.8,17.2z M12.2,14.5H16l-1.9-5.7L12.2,14.5z" }),
|
|
38633
38669
|
/* @__PURE__ */ jsx30("path", { d: "M12.4,40.5H20V43H8.4v-1.9L16,30.3H8.4v-2.5h11.4v1.7L12.4,40.5z" })
|
|
38634
38670
|
] })
|
|
@@ -38637,7 +38673,7 @@ function OrderAscIcon() {
|
|
|
38637
38673
|
);
|
|
38638
38674
|
}
|
|
38639
38675
|
function OrderDesIcon() {
|
|
38640
|
-
return /* @__PURE__ */
|
|
38676
|
+
return /* @__PURE__ */ jsxs22(
|
|
38641
38677
|
"svg",
|
|
38642
38678
|
{
|
|
38643
38679
|
stroke: "currentColor",
|
|
@@ -38651,7 +38687,7 @@ function OrderDesIcon() {
|
|
|
38651
38687
|
className: "text-blue-500",
|
|
38652
38688
|
xmlns: "http://www.w3.org/2000/svg",
|
|
38653
38689
|
children: [
|
|
38654
|
-
/* @__PURE__ */
|
|
38690
|
+
/* @__PURE__ */ jsxs22("g", { fill: "#2196F3", children: [
|
|
38655
38691
|
/* @__PURE__ */ jsx30("path", { d: "M16.8,40h-5.3l-1.1,3H6.9l5.7-15.2h2.9L21.1,43h-3.2L16.8,40z M12.2,37.3H16l-1.9-5.7L12.2,37.3z" }),
|
|
38656
38692
|
/* @__PURE__ */ jsx30("path", { d: "M12.4,17.7H20v2.5H8.4v-1.9L16,7.5H8.4V5h11.4v1.7L12.4,17.7z" })
|
|
38657
38693
|
] }),
|
|
@@ -38699,7 +38735,7 @@ function ArrowUPIcon() {
|
|
|
38699
38735
|
);
|
|
38700
38736
|
}
|
|
38701
38737
|
function SearchIcon() {
|
|
38702
|
-
return /* @__PURE__ */
|
|
38738
|
+
return /* @__PURE__ */ jsxs22(
|
|
38703
38739
|
"svg",
|
|
38704
38740
|
{
|
|
38705
38741
|
stroke: "currentColor",
|
|
@@ -38718,7 +38754,7 @@ function SearchIcon() {
|
|
|
38718
38754
|
);
|
|
38719
38755
|
}
|
|
38720
38756
|
function FilterIcon() {
|
|
38721
|
-
return /* @__PURE__ */
|
|
38757
|
+
return /* @__PURE__ */ jsxs22(
|
|
38722
38758
|
"svg",
|
|
38723
38759
|
{
|
|
38724
38760
|
className: "text-red-300",
|
|
@@ -38738,13 +38774,13 @@ function FilterIcon() {
|
|
|
38738
38774
|
}
|
|
38739
38775
|
|
|
38740
38776
|
// src/table-advanced/menu.item.tsx
|
|
38741
|
-
import { jsxs as
|
|
38777
|
+
import { jsxs as jsxs23 } from "react/jsx-runtime";
|
|
38742
38778
|
function MenuItem({
|
|
38743
38779
|
label,
|
|
38744
38780
|
icon,
|
|
38745
38781
|
onClick
|
|
38746
38782
|
}) {
|
|
38747
|
-
return /* @__PURE__ */
|
|
38783
|
+
return /* @__PURE__ */ jsxs23(
|
|
38748
38784
|
"div",
|
|
38749
38785
|
{
|
|
38750
38786
|
className: "cursor-pointer border p-2 hover:bg-gray-100 flex items-center bg-white gap-2",
|
|
@@ -38758,7 +38794,7 @@ function MenuItem({
|
|
|
38758
38794
|
}
|
|
38759
38795
|
|
|
38760
38796
|
// src/table-advanced/header.tsx
|
|
38761
|
-
import { Fragment as Fragment2, jsx as jsx31, jsxs as
|
|
38797
|
+
import { Fragment as Fragment2, jsx as jsx31, jsxs as jsxs24 } from "react/jsx-runtime";
|
|
38762
38798
|
function Header({
|
|
38763
38799
|
header,
|
|
38764
38800
|
context,
|
|
@@ -38848,7 +38884,7 @@ function Header({
|
|
|
38848
38884
|
}
|
|
38849
38885
|
) });
|
|
38850
38886
|
} else
|
|
38851
|
-
return /* @__PURE__ */ jsx31("div", { className: " ", children: /* @__PURE__ */
|
|
38887
|
+
return /* @__PURE__ */ jsx31("div", { className: " ", children: /* @__PURE__ */ jsxs24(
|
|
38852
38888
|
"div",
|
|
38853
38889
|
{
|
|
38854
38890
|
ref: cellRef,
|
|
@@ -38857,8 +38893,8 @@ function Header({
|
|
|
38857
38893
|
onMouseLeave: (e) => setHovered(false),
|
|
38858
38894
|
style: { zIndex: 10, height: `${padding}px`, maxHeight: "100px" },
|
|
38859
38895
|
children: [
|
|
38860
|
-
/* @__PURE__ */
|
|
38861
|
-
!context.disabled ? /* @__PURE__ */
|
|
38896
|
+
/* @__PURE__ */ jsxs24("div", { className: "flex justify-between items-center ", children: [
|
|
38897
|
+
!context.disabled ? /* @__PURE__ */ jsxs24("div", { className: "flex gap-2", children: [
|
|
38862
38898
|
hasFilter ? /* @__PURE__ */ jsx31(
|
|
38863
38899
|
"div",
|
|
38864
38900
|
{
|
|
@@ -38914,7 +38950,7 @@ function Header({
|
|
|
38914
38950
|
}
|
|
38915
38951
|
),
|
|
38916
38952
|
visible && context.currentHeader == header && createPortal(
|
|
38917
|
-
/* @__PURE__ */
|
|
38953
|
+
/* @__PURE__ */ jsxs24(Fragment2, { children: [
|
|
38918
38954
|
/* @__PURE__ */ jsx31(
|
|
38919
38955
|
"div",
|
|
38920
38956
|
{
|
|
@@ -38930,7 +38966,7 @@ function Header({
|
|
|
38930
38966
|
{
|
|
38931
38967
|
className: "fixed",
|
|
38932
38968
|
style: { top: coords.top, left: coords.left, zIndex: 9999 },
|
|
38933
|
-
children: /* @__PURE__ */
|
|
38969
|
+
children: /* @__PURE__ */ jsxs24("div", { className: "bg-gray-100 w-[300px] flex flex-col border shadow rounded ", children: [
|
|
38934
38970
|
hasFilter && /* @__PURE__ */ jsx31(
|
|
38935
38971
|
MenuItem,
|
|
38936
38972
|
{
|
|
@@ -38967,7 +39003,7 @@ function Header({
|
|
|
38967
39003
|
}
|
|
38968
39004
|
}
|
|
38969
39005
|
),
|
|
38970
|
-
/* @__PURE__ */
|
|
39006
|
+
/* @__PURE__ */ jsxs24(
|
|
38971
39007
|
Form,
|
|
38972
39008
|
{
|
|
38973
39009
|
onSubmit: (e) => {
|
|
@@ -38982,7 +39018,7 @@ function Header({
|
|
|
38982
39018
|
context.setCurrentHeader(null);
|
|
38983
39019
|
},
|
|
38984
39020
|
children: [
|
|
38985
|
-
/* @__PURE__ */
|
|
39021
|
+
/* @__PURE__ */ jsxs24("div", { className: "m-2 bg-white gap-2 flex flex-col", children: [
|
|
38986
39022
|
/* @__PURE__ */ jsx31(
|
|
38987
39023
|
"input",
|
|
38988
39024
|
{
|
|
@@ -38992,13 +39028,13 @@ function Header({
|
|
|
38992
39028
|
onChange: (e) => setText(e.target.value)
|
|
38993
39029
|
}
|
|
38994
39030
|
),
|
|
38995
|
-
/* @__PURE__ */
|
|
39031
|
+
/* @__PURE__ */ jsxs24(
|
|
38996
39032
|
"div",
|
|
38997
39033
|
{
|
|
38998
39034
|
className: "flex items-start flex-col p-2 border shadow rounded max-w-[600px] h-[300px] bg-white ",
|
|
38999
39035
|
style: { overflow: "auto" },
|
|
39000
39036
|
children: [
|
|
39001
|
-
/* @__PURE__ */
|
|
39037
|
+
/* @__PURE__ */ jsxs24(
|
|
39002
39038
|
"div",
|
|
39003
39039
|
{
|
|
39004
39040
|
className: "flex gap-2 " + (text != "" ? "text-gray-400" : ""),
|
|
@@ -39023,7 +39059,7 @@ function Header({
|
|
|
39023
39059
|
}
|
|
39024
39060
|
),
|
|
39025
39061
|
filteredValues.map((d) => {
|
|
39026
|
-
return /* @__PURE__ */
|
|
39062
|
+
return /* @__PURE__ */ jsxs24("div", { className: "flex gap-2 ", children: [
|
|
39027
39063
|
/* @__PURE__ */ jsx31(
|
|
39028
39064
|
"input",
|
|
39029
39065
|
{
|
|
@@ -39049,7 +39085,7 @@ function Header({
|
|
|
39049
39085
|
}
|
|
39050
39086
|
)
|
|
39051
39087
|
] }),
|
|
39052
|
-
/* @__PURE__ */
|
|
39088
|
+
/* @__PURE__ */ jsxs24("div", { className: "flex justify-between p-2", children: [
|
|
39053
39089
|
/* @__PURE__ */ jsx31(
|
|
39054
39090
|
"button",
|
|
39055
39091
|
{
|
|
@@ -39079,11 +39115,11 @@ function Header({
|
|
|
39079
39115
|
}
|
|
39080
39116
|
|
|
39081
39117
|
// src/table-advanced/searchable.tsx
|
|
39082
|
-
import { jsx as jsx32, jsxs as
|
|
39118
|
+
import { jsx as jsx32, jsxs as jsxs25 } from "react/jsx-runtime";
|
|
39083
39119
|
function Searchable({
|
|
39084
39120
|
context
|
|
39085
39121
|
}) {
|
|
39086
|
-
return /* @__PURE__ */
|
|
39122
|
+
return /* @__PURE__ */ jsxs25("div", { className: "flex justify-start p-2 relative w-96 text-xs", children: [
|
|
39087
39123
|
/* @__PURE__ */ jsx32(
|
|
39088
39124
|
"input",
|
|
39089
39125
|
{
|
|
@@ -39184,7 +39220,7 @@ function usePaginacion({
|
|
|
39184
39220
|
var use_pagination_default = usePaginacion;
|
|
39185
39221
|
|
|
39186
39222
|
// src/table-advanced/h.table.tsx
|
|
39187
|
-
import { jsx as jsx33, jsxs as
|
|
39223
|
+
import { jsx as jsx33, jsxs as jsxs26 } from "react/jsx-runtime";
|
|
39188
39224
|
function HTable({
|
|
39189
39225
|
context
|
|
39190
39226
|
}) {
|
|
@@ -39260,10 +39296,10 @@ function HTable({
|
|
|
39260
39296
|
setWidths(
|
|
39261
39297
|
Object.fromEntries(
|
|
39262
39298
|
headers.map((h) => {
|
|
39263
|
-
var _a, _b;
|
|
39299
|
+
var _a, _b, _c, _d;
|
|
39264
39300
|
return [
|
|
39265
39301
|
h,
|
|
39266
|
-
((_a = context == null ? void 0 : context.colSize) == null ? void 0 : _a[h]) ? (_b = context == null ? void 0 : context.colSize) == null ? void 0 : _b[h] : ["__select__", "__modal__"].includes(h) ? 60 : h.startsWith("_") ? 0 : w
|
|
39302
|
+
((_a = context == null ? void 0 : context.colSize) == null ? void 0 : _a[h]) ? (_b = context == null ? void 0 : context.colSize) == null ? void 0 : _b[h] : ["__select__", "__modal__"].includes(h) ? 60 : h.startsWith("_") || ((_d = (_c = context == null ? void 0 : context.hideColumns) == null ? void 0 : _c.includes) == null ? void 0 : _d.call(_c, h)) ? 0 : w
|
|
39267
39303
|
];
|
|
39268
39304
|
})
|
|
39269
39305
|
)
|
|
@@ -39281,7 +39317,7 @@ function HTable({
|
|
|
39281
39317
|
});
|
|
39282
39318
|
}, [context.filteredData]);
|
|
39283
39319
|
const pagination = use_pagination_default({ total: searchedData.length });
|
|
39284
|
-
return /* @__PURE__ */
|
|
39320
|
+
return /* @__PURE__ */ jsxs26(
|
|
39285
39321
|
"div",
|
|
39286
39322
|
{
|
|
39287
39323
|
className: [
|
|
@@ -39292,9 +39328,9 @@ function HTable({
|
|
|
39292
39328
|
ref: tableRef,
|
|
39293
39329
|
children: [
|
|
39294
39330
|
/* @__PURE__ */ jsx33("div", { className: "bg-white px-1 font-bold rounded-full", children: context.header }),
|
|
39295
|
-
/* @__PURE__ */
|
|
39331
|
+
/* @__PURE__ */ jsxs26("div", { className: "bg-white flex gap-2 items-center", children: [
|
|
39296
39332
|
context.searchable && /* @__PURE__ */ jsx33(Searchable, { context }),
|
|
39297
|
-
context.exportName && /* @__PURE__ */
|
|
39333
|
+
context.exportName && /* @__PURE__ */ jsxs26(
|
|
39298
39334
|
"button",
|
|
39299
39335
|
{
|
|
39300
39336
|
onClick: (e) => {
|
|
@@ -39352,7 +39388,7 @@ function HTable({
|
|
|
39352
39388
|
}
|
|
39353
39389
|
)
|
|
39354
39390
|
] }),
|
|
39355
|
-
/* @__PURE__ */
|
|
39391
|
+
/* @__PURE__ */ jsxs26(
|
|
39356
39392
|
"div",
|
|
39357
39393
|
{
|
|
39358
39394
|
children: [
|
|
@@ -39576,11 +39612,11 @@ function HTable({
|
|
|
39576
39612
|
})
|
|
39577
39613
|
}
|
|
39578
39614
|
),
|
|
39579
|
-
searchedData.length > 100 && /* @__PURE__ */
|
|
39615
|
+
searchedData.length > 100 && /* @__PURE__ */ jsxs26("div", { className: "flex justify-end p-2", children: [
|
|
39580
39616
|
pagination.rango,
|
|
39581
39617
|
" de ",
|
|
39582
39618
|
pagination.total,
|
|
39583
|
-
/* @__PURE__ */
|
|
39619
|
+
/* @__PURE__ */ jsxs26("div", { className: "flex items-center gap-5 mx-5", children: [
|
|
39584
39620
|
/* @__PURE__ */ jsx33(
|
|
39585
39621
|
"button",
|
|
39586
39622
|
{
|
|
@@ -39648,8 +39684,8 @@ function ModalContent({
|
|
|
39648
39684
|
context,
|
|
39649
39685
|
hide
|
|
39650
39686
|
}) {
|
|
39651
|
-
return /* @__PURE__ */
|
|
39652
|
-
/* @__PURE__ */
|
|
39687
|
+
return /* @__PURE__ */ jsxs26("div", { className: "relative", children: [
|
|
39688
|
+
/* @__PURE__ */ jsxs26("div", { className: "fixed top-0 left-0 p-10 ", children: [
|
|
39653
39689
|
/* @__PURE__ */ jsx33(
|
|
39654
39690
|
"button",
|
|
39655
39691
|
{
|
|
@@ -39813,7 +39849,7 @@ function TableAdvanced(tableProps) {
|
|
|
39813
39849
|
|
|
39814
39850
|
// src/tabs/index.tsx
|
|
39815
39851
|
import React11, { useEffect as useEffect15, useState as useState19 } from "react";
|
|
39816
|
-
import { Fragment as Fragment3, jsx as jsx35, jsxs as
|
|
39852
|
+
import { Fragment as Fragment3, jsx as jsx35, jsxs as jsxs27 } from "react/jsx-runtime";
|
|
39817
39853
|
function TabContainer({
|
|
39818
39854
|
children,
|
|
39819
39855
|
labelMaxWidth = 100,
|
|
@@ -39832,12 +39868,12 @@ function TabContainer({
|
|
|
39832
39868
|
useEffect15(() => {
|
|
39833
39869
|
setIndex(currentIndex);
|
|
39834
39870
|
}, [currentIndex]);
|
|
39835
|
-
return /* @__PURE__ */
|
|
39871
|
+
return /* @__PURE__ */ jsxs27("div", { className: "w-full bg-white", children: [
|
|
39836
39872
|
/* @__PURE__ */ jsx35("div", { role: "tablist", className: "flex gap-1 border-b border-slate-200", children: labels.map((label, k) => {
|
|
39837
39873
|
var _a, _b;
|
|
39838
39874
|
const active = k === index;
|
|
39839
39875
|
const isDisabled = (_b = (_a = items.find((i) => i.props.label == label)) == null ? void 0 : _a.props) == null ? void 0 : _b.disabled;
|
|
39840
|
-
return /* @__PURE__ */
|
|
39876
|
+
return /* @__PURE__ */ jsxs27(
|
|
39841
39877
|
"button",
|
|
39842
39878
|
{
|
|
39843
39879
|
style: { maxWidth: labelMaxWidth },
|
package/package.json
CHANGED
package/src/doc-viewer/icon.tsx
CHANGED
|
@@ -13,3 +13,20 @@ export default function Icon() {
|
|
|
13
13
|
</svg>
|
|
14
14
|
);
|
|
15
15
|
}
|
|
16
|
+
|
|
17
|
+
export function DownloadIcon() {
|
|
18
|
+
return (
|
|
19
|
+
<svg
|
|
20
|
+
stroke="currentColor"
|
|
21
|
+
fill="currentColor"
|
|
22
|
+
strokeWidth="0"
|
|
23
|
+
viewBox="0 0 24 24"
|
|
24
|
+
height="1em"
|
|
25
|
+
width="1em"
|
|
26
|
+
xmlns="http://www.w3.org/2000/svg"
|
|
27
|
+
>
|
|
28
|
+
<path fill="none" d="M0 0h24v24H0z"></path>
|
|
29
|
+
<path d="M18 15v3H6v-3H4v3c0 1.1.9 2 2 2h12c1.1 0 2-.9 2-2v-3zm-1-4-1.41-1.41L13 12.17V4h-2v8.17L8.41 9.59 7 11l5 5z"></path>
|
|
30
|
+
</svg>
|
|
31
|
+
);
|
|
32
|
+
}
|
package/src/doc-viewer/index.tsx
CHANGED
|
@@ -1,20 +1,24 @@
|
|
|
1
1
|
import React from "react";
|
|
2
|
-
import Icon from "./icon";
|
|
2
|
+
import Icon, { DownloadIcon } from "./icon";
|
|
3
3
|
|
|
4
4
|
type Item = {
|
|
5
5
|
url: string;
|
|
6
6
|
name: string;
|
|
7
7
|
contentType: string;
|
|
8
|
-
width?: string;
|
|
9
|
-
height?: string;
|
|
10
8
|
};
|
|
11
9
|
|
|
12
10
|
type Props = {
|
|
13
11
|
item: Item;
|
|
12
|
+
width?: string;
|
|
13
|
+
height?: string;
|
|
14
14
|
};
|
|
15
15
|
|
|
16
|
-
export default function DocumentViewer({
|
|
17
|
-
|
|
16
|
+
export default function DocumentViewer({
|
|
17
|
+
item,
|
|
18
|
+
width = "100%",
|
|
19
|
+
height = "100%",
|
|
20
|
+
}: Props) {
|
|
21
|
+
const { url, name, contentType } = item;
|
|
18
22
|
|
|
19
23
|
const isImage = contentType.startsWith("image/");
|
|
20
24
|
const isPdf = contentType === "application/pdf";
|
|
@@ -26,22 +30,27 @@ export default function DocumentViewer({ item }: Props) {
|
|
|
26
30
|
|
|
27
31
|
const viewerUrl = isGoogleDocCompatible
|
|
28
32
|
? `https://docs.google.com/gview?url=${encodeURIComponent(
|
|
29
|
-
url
|
|
33
|
+
url,
|
|
30
34
|
)}&embedded=true`
|
|
31
35
|
: url;
|
|
32
36
|
|
|
33
37
|
return (
|
|
34
|
-
<div className="border shadow rounded
|
|
35
|
-
<div className="
|
|
36
|
-
<h3
|
|
38
|
+
<div className="border shadow rounded relative pt-6 pb-1 px-1">
|
|
39
|
+
<div className="grid grid-cols-[3fr_1fr] left-0 rounded-t shadow top-0 absolute p-1 bg-blue-500 px-1 text-white w-full ">
|
|
40
|
+
<h3
|
|
41
|
+
className="font-bold truncate text-xs px-1 cursor-pointer max-w-[90%] "
|
|
42
|
+
title={name}
|
|
43
|
+
>
|
|
44
|
+
{name}
|
|
45
|
+
</h3>
|
|
37
46
|
<a
|
|
38
47
|
href={url}
|
|
39
48
|
download={name}
|
|
40
49
|
target="_blank"
|
|
41
50
|
rel="noopener noreferrer"
|
|
42
|
-
className="border shadow rounded bg-blue-
|
|
51
|
+
className="border shadow hover:bg-blue-100 hover:text-black rounded bg-blue-900 text-white text-xs items-center truncate px-1 flex gap-1 justify-center"
|
|
43
52
|
>
|
|
44
|
-
|
|
53
|
+
<DownloadIcon />
|
|
45
54
|
</a>
|
|
46
55
|
</div>
|
|
47
56
|
|
|
@@ -49,6 +58,7 @@ export default function DocumentViewer({ item }: Props) {
|
|
|
49
58
|
<img
|
|
50
59
|
src={url}
|
|
51
60
|
alt={name}
|
|
61
|
+
className="rounded"
|
|
52
62
|
style={{
|
|
53
63
|
width: width,
|
|
54
64
|
height: height,
|
|
@@ -59,13 +69,19 @@ export default function DocumentViewer({ item }: Props) {
|
|
|
59
69
|
/>
|
|
60
70
|
) : isGoogleDocCompatible ? (
|
|
61
71
|
<iframe
|
|
72
|
+
className="rounded"
|
|
73
|
+
style={{
|
|
74
|
+
width: width,
|
|
75
|
+
height: height,
|
|
76
|
+
maxWidth: "100%",
|
|
77
|
+
}}
|
|
62
78
|
title={name}
|
|
63
79
|
src={viewerUrl}
|
|
64
|
-
style={{ width, height, border: "none" }}
|
|
65
80
|
allowFullScreen
|
|
66
81
|
/>
|
|
67
82
|
) : (
|
|
68
83
|
<div
|
|
84
|
+
className="rounded"
|
|
69
85
|
style={{
|
|
70
86
|
width: width,
|
|
71
87
|
height: height,
|