@vlrc-fe/components 1.0.0
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/README.md +193 -0
- package/dist/index.cjs +1 -0
- package/dist/index.js +42 -0
- package/dist/index10.cjs +1 -0
- package/dist/index10.js +85 -0
- package/dist/index100.cjs +1 -0
- package/dist/index100.js +65 -0
- package/dist/index101.cjs +1 -0
- package/dist/index101.js +48 -0
- package/dist/index102.cjs +1 -0
- package/dist/index102.js +67 -0
- package/dist/index103.cjs +1 -0
- package/dist/index103.js +151 -0
- package/dist/index104.cjs +1 -0
- package/dist/index104.js +23 -0
- package/dist/index105.cjs +1 -0
- package/dist/index105.js +27 -0
- package/dist/index106.cjs +1 -0
- package/dist/index106.js +53 -0
- package/dist/index107.cjs +1 -0
- package/dist/index107.js +161 -0
- package/dist/index108.cjs +1 -0
- package/dist/index108.js +16 -0
- package/dist/index109.cjs +1 -0
- package/dist/index11.cjs +1 -0
- package/dist/index11.js +86 -0
- package/dist/index12.cjs +1 -0
- package/dist/index12.js +122 -0
- package/dist/index13.cjs +1 -0
- package/dist/index13.js +14 -0
- package/dist/index14.cjs +1 -0
- package/dist/index14.js +16 -0
- package/dist/index15.cjs +1 -0
- package/dist/index15.js +115 -0
- package/dist/index16.cjs +1 -0
- package/dist/index16.js +727 -0
- package/dist/index17.cjs +1 -0
- package/dist/index17.js +348 -0
- package/dist/index18.cjs +1 -0
- package/dist/index18.js +76 -0
- package/dist/index19.cjs +1 -0
- package/dist/index19.js +14 -0
- package/dist/index2.cjs +1 -0
- package/dist/index2.js +122 -0
- package/dist/index20.cjs +1 -0
- package/dist/index20.js +116 -0
- package/dist/index21.cjs +1 -0
- package/dist/index21.js +35 -0
- package/dist/index22.cjs +1 -0
- package/dist/index22.js +18 -0
- package/dist/index23.cjs +1 -0
- package/dist/index23.js +27 -0
- package/dist/index24.cjs +1 -0
- package/dist/index24.js +35 -0
- package/dist/index25.cjs +1 -0
- package/dist/index25.js +97 -0
- package/dist/index26.cjs +1 -0
- package/dist/index26.js +28 -0
- package/dist/index27.cjs +1 -0
- package/dist/index27.js +14 -0
- package/dist/index28.cjs +1 -0
- package/dist/index28.js +67 -0
- package/dist/index29.cjs +1 -0
- package/dist/index29.js +13 -0
- package/dist/index3.cjs +1 -0
- package/dist/index3.js +8 -0
- package/dist/index30.cjs +1 -0
- package/dist/index30.js +35 -0
- package/dist/index31.cjs +1 -0
- package/dist/index31.js +43 -0
- package/dist/index32.cjs +1 -0
- package/dist/index32.js +14 -0
- package/dist/index33.cjs +1 -0
- package/dist/index33.js +64 -0
- package/dist/index34.cjs +1 -0
- package/dist/index34.js +23 -0
- package/dist/index35.cjs +1 -0
- package/dist/index35.js +34 -0
- package/dist/index36.cjs +1 -0
- package/dist/index36.js +27 -0
- package/dist/index37.cjs +1 -0
- package/dist/index37.js +26 -0
- package/dist/index38.cjs +1 -0
- package/dist/index38.js +157 -0
- package/dist/index39.cjs +1 -0
- package/dist/index39.js +34 -0
- package/dist/index4.cjs +1 -0
- package/dist/index4.js +43 -0
- package/dist/index40.cjs +1 -0
- package/dist/index40.js +46 -0
- package/dist/index41.cjs +1 -0
- package/dist/index41.js +118 -0
- package/dist/index42.cjs +1 -0
- package/dist/index42.js +125 -0
- package/dist/index43.cjs +1 -0
- package/dist/index43.js +26 -0
- package/dist/index44.cjs +1 -0
- package/dist/index44.js +88 -0
- package/dist/index45.cjs +1 -0
- package/dist/index45.js +221 -0
- package/dist/index46.cjs +1 -0
- package/dist/index46.js +166 -0
- package/dist/index47.cjs +1 -0
- package/dist/index47.js +126 -0
- package/dist/index48.cjs +1 -0
- package/dist/index48.js +15 -0
- package/dist/index49.cjs +1 -0
- package/dist/index49.js +9 -0
- package/dist/index5.cjs +1 -0
- package/dist/index5.js +24 -0
- package/dist/index50.cjs +1 -0
- package/dist/index50.js +17 -0
- package/dist/index51.cjs +1 -0
- package/dist/index51.js +22 -0
- package/dist/index52.cjs +1 -0
- package/dist/index52.js +18 -0
- package/dist/index53.cjs +1 -0
- package/dist/index53.js +6 -0
- package/dist/index54.cjs +1 -0
- package/dist/index54.js +7 -0
- package/dist/index55.cjs +1 -0
- package/dist/index55.js +8 -0
- package/dist/index56.cjs +1 -0
- package/dist/index56.js +7 -0
- package/dist/index57.cjs +1 -0
- package/dist/index57.js +7 -0
- package/dist/index58.cjs +1 -0
- package/dist/index58.js +9 -0
- package/dist/index59.cjs +1 -0
- package/dist/index59.js +69 -0
- package/dist/index6.cjs +1 -0
- package/dist/index6.js +51 -0
- package/dist/index60.cjs +1 -0
- package/dist/index60.js +11 -0
- package/dist/index61.cjs +1 -0
- package/dist/index61.js +202 -0
- package/dist/index62.cjs +1 -0
- package/dist/index62.js +124 -0
- package/dist/index63.cjs +1 -0
- package/dist/index63.js +32 -0
- package/dist/index64.cjs +1 -0
- package/dist/index64.js +20 -0
- package/dist/index65.cjs +1 -0
- package/dist/index65.js +69 -0
- package/dist/index66.cjs +1 -0
- package/dist/index66.js +32 -0
- package/dist/index67.cjs +1 -0
- package/dist/index67.js +11 -0
- package/dist/index68.cjs +1 -0
- package/dist/index68.js +280 -0
- package/dist/index69.cjs +1 -0
- package/dist/index69.js +157 -0
- package/dist/index7.cjs +1 -0
- package/dist/index7.js +88 -0
- package/dist/index70.cjs +1 -0
- package/dist/index70.js +20 -0
- package/dist/index71.cjs +1 -0
- package/dist/index71.js +10 -0
- package/dist/index72.cjs +1 -0
- package/dist/index72.js +14 -0
- package/dist/index73.cjs +1 -0
- package/dist/index73.js +8 -0
- package/dist/index74.cjs +1 -0
- package/dist/index74.js +8 -0
- package/dist/index75.cjs +1 -0
- package/dist/index75.js +11 -0
- package/dist/index76.cjs +1 -0
- package/dist/index76.js +10 -0
- package/dist/index77.cjs +1 -0
- package/dist/index77.js +6 -0
- package/dist/index78.cjs +1 -0
- package/dist/index78.js +8 -0
- package/dist/index79.cjs +1 -0
- package/dist/index79.js +8 -0
- package/dist/index8.cjs +1 -0
- package/dist/index8.js +68 -0
- package/dist/index80.cjs +1 -0
- package/dist/index80.js +10 -0
- package/dist/index81.cjs +1 -0
- package/dist/index81.js +11 -0
- package/dist/index82.cjs +1 -0
- package/dist/index82.js +15 -0
- package/dist/index83.cjs +1 -0
- package/dist/index83.js +11 -0
- package/dist/index84.cjs +1 -0
- package/dist/index84.js +11 -0
- package/dist/index85.cjs +1 -0
- package/dist/index85.js +6 -0
- package/dist/index86.cjs +1 -0
- package/dist/index86.js +43 -0
- package/dist/index87.cjs +1 -0
- package/dist/index87.js +382 -0
- package/dist/index88.cjs +1 -0
- package/dist/index88.js +40 -0
- package/dist/index89.cjs +1 -0
- package/dist/index89.js +23 -0
- package/dist/index9.cjs +1 -0
- package/dist/index9.js +20 -0
- package/dist/index90.cjs +1 -0
- package/dist/index90.js +59 -0
- package/dist/index91.cjs +1 -0
- package/dist/index91.js +55 -0
- package/dist/index92.cjs +1 -0
- package/dist/index92.js +54 -0
- package/dist/index93.cjs +1 -0
- package/dist/index93.js +57 -0
- package/dist/index94.cjs +1 -0
- package/dist/index94.js +57 -0
- package/dist/index95.cjs +1 -0
- package/dist/index95.js +88 -0
- package/dist/index96.cjs +1 -0
- package/dist/index96.js +66 -0
- package/dist/index97.cjs +1 -0
- package/dist/index97.js +594 -0
- package/dist/index98.cjs +9 -0
- package/dist/index98.js +30 -0
- package/dist/index99.cjs +1 -0
- package/dist/index99.js +50 -0
- package/package.json +82 -0
package/dist/index32.js
ADDED
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { Suspense as e, lazy as t } from "react";
|
|
2
|
+
import { jsx as n } from "react/jsx-runtime";
|
|
3
|
+
//#region src/lazyLoad.tsx
|
|
4
|
+
function r(r, i = /* @__PURE__ */ n("div", { children: "Loading..." })) {
|
|
5
|
+
let a = t(r);
|
|
6
|
+
return function(t) {
|
|
7
|
+
return /* @__PURE__ */ n(e, {
|
|
8
|
+
fallback: i,
|
|
9
|
+
children: /* @__PURE__ */ n(a, { ...t })
|
|
10
|
+
});
|
|
11
|
+
};
|
|
12
|
+
}
|
|
13
|
+
//#endregion
|
|
14
|
+
export { r as lazyLoad };
|
package/dist/index33.cjs
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
let e=require("react"),t=require("react/jsx-runtime");function n(n,r=(0,t.jsx)(`div`,{children:`Loading...`})){let i=(0,e.lazy)(n);return function(n){return(0,t.jsx)(e.Suspense,{fallback:r,children:(0,t.jsx)(i,{...n})})}}exports.lazyLoad=n;
|
package/dist/index33.js
ADDED
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
import { Button as e } from "./index6.js";
|
|
2
|
+
import { DropdownMenu as t, DropdownMenuContent as n, DropdownMenuItem as r, DropdownMenuTrigger as i } from "./index12.js";
|
|
3
|
+
import { jsx as a, jsxs as o } from "react/jsx-runtime";
|
|
4
|
+
import { map as s } from "lodash-es";
|
|
5
|
+
//#region src/DataTable/components/DataTablePagination.tsx
|
|
6
|
+
var c = ({ table: c, tableState: l, pageSizeOptions: u, apiConfig: d }) => {
|
|
7
|
+
let f = l.pagination.pageIndex, p = l.pagination.pageSize, m = d.mode === "server" ? d.totalRows : c.getFilteredRowModel().rows.length, h = p > 0 ? Math.ceil(m / p) : 0;
|
|
8
|
+
return /* @__PURE__ */ o("div", {
|
|
9
|
+
className: "flex items-center justify-between gap-4 py-4",
|
|
10
|
+
children: [/* @__PURE__ */ o("div", {
|
|
11
|
+
className: "text-muted-foreground flex-1 text-sm",
|
|
12
|
+
children: [
|
|
13
|
+
c.getFilteredSelectedRowModel().rows.length,
|
|
14
|
+
" of ",
|
|
15
|
+
m,
|
|
16
|
+
" row(s) selected."
|
|
17
|
+
]
|
|
18
|
+
}), /* @__PURE__ */ o("div", {
|
|
19
|
+
className: "flex items-center gap-2",
|
|
20
|
+
children: [
|
|
21
|
+
/* @__PURE__ */ o(t, { children: [/* @__PURE__ */ a(i, {
|
|
22
|
+
asChild: !0,
|
|
23
|
+
children: /* @__PURE__ */ o(e, {
|
|
24
|
+
variant: "outline",
|
|
25
|
+
size: "sm",
|
|
26
|
+
children: ["Rows: ", p]
|
|
27
|
+
})
|
|
28
|
+
}), /* @__PURE__ */ a(n, {
|
|
29
|
+
align: "end",
|
|
30
|
+
children: s(u, (e) => /* @__PURE__ */ a(r, {
|
|
31
|
+
onClick: () => c.setPageSize(e),
|
|
32
|
+
disabled: e === p,
|
|
33
|
+
children: e
|
|
34
|
+
}, String(e)))
|
|
35
|
+
})] }),
|
|
36
|
+
/* @__PURE__ */ a(e, {
|
|
37
|
+
variant: "outline",
|
|
38
|
+
size: "sm",
|
|
39
|
+
onClick: () => c.previousPage(),
|
|
40
|
+
disabled: !c.getCanPreviousPage(),
|
|
41
|
+
children: "Previous"
|
|
42
|
+
}),
|
|
43
|
+
/* @__PURE__ */ a(e, {
|
|
44
|
+
variant: "outline",
|
|
45
|
+
size: "sm",
|
|
46
|
+
onClick: () => c.nextPage(),
|
|
47
|
+
disabled: !c.getCanNextPage(),
|
|
48
|
+
children: "Next"
|
|
49
|
+
}),
|
|
50
|
+
/* @__PURE__ */ o("div", {
|
|
51
|
+
className: "text-muted-foreground px-2 text-sm",
|
|
52
|
+
children: [
|
|
53
|
+
"Page ",
|
|
54
|
+
f + 1,
|
|
55
|
+
" / ",
|
|
56
|
+
h === 0 ? 1 : h
|
|
57
|
+
]
|
|
58
|
+
})
|
|
59
|
+
]
|
|
60
|
+
})]
|
|
61
|
+
});
|
|
62
|
+
};
|
|
63
|
+
//#endregion
|
|
64
|
+
export { c as DataTablePagination };
|
package/dist/index34.cjs
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
const e=require("./index7.cjs"),t=require("./index13.cjs");let n=require("react/jsx-runtime"),r=require("lodash-es");var i=({table:i,tableState:a,pageSizeOptions:o,apiConfig:s})=>{let c=a.pagination.pageIndex,l=a.pagination.pageSize,u=s.mode===`server`?s.totalRows:i.getFilteredRowModel().rows.length,d=l>0?Math.ceil(u/l):0;return(0,n.jsxs)(`div`,{className:`flex items-center justify-between gap-4 py-4`,children:[(0,n.jsxs)(`div`,{className:`text-muted-foreground flex-1 text-sm`,children:[i.getFilteredSelectedRowModel().rows.length,` of `,u,` row(s) selected.`]}),(0,n.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,n.jsxs)(t.DropdownMenu,{children:[(0,n.jsx)(t.DropdownMenuTrigger,{asChild:!0,children:(0,n.jsxs)(e.Button,{variant:`outline`,size:`sm`,children:[`Rows: `,l]})}),(0,n.jsx)(t.DropdownMenuContent,{align:`end`,children:(0,r.map)(o,e=>(0,n.jsx)(t.DropdownMenuItem,{onClick:()=>i.setPageSize(e),disabled:e===l,children:e},String(e)))})]}),(0,n.jsx)(e.Button,{variant:`outline`,size:`sm`,onClick:()=>i.previousPage(),disabled:!i.getCanPreviousPage(),children:`Previous`}),(0,n.jsx)(e.Button,{variant:`outline`,size:`sm`,onClick:()=>i.nextPage(),disabled:!i.getCanNextPage(),children:`Next`}),(0,n.jsxs)(`div`,{className:`text-muted-foreground px-2 text-sm`,children:[`Page `,c+1,` / `,d===0?1:d]})]})]})};exports.DataTablePagination=i;
|
package/dist/index34.js
ADDED
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { Table as e, TableBody as t, TableCell as n, TableHead as r, TableHeader as i, TableRow as a } from "./index28.js";
|
|
2
|
+
import { Fragment as o } from "react";
|
|
3
|
+
import { jsx as s, jsxs as c } from "react/jsx-runtime";
|
|
4
|
+
import { isEmpty as l, map as u } from "lodash-es";
|
|
5
|
+
import { flexRender as d } from "@tanstack/react-table";
|
|
6
|
+
//#region src/DataTable/components/DataTableTable.tsx
|
|
7
|
+
var f = ({ table: f, columnVisibility: p, expandedState: m, expandConfig: h, empty: g, columnsCount: _ }) => {
|
|
8
|
+
let v = f.getRowModel().rows;
|
|
9
|
+
return /* @__PURE__ */ c(e, { children: [/* @__PURE__ */ s(i, { children: u(f.getHeaderGroups(), (e) => /* @__PURE__ */ s(a, { children: u(e.headers, (e) => e.isPlaceholder || p[e.column.id] === !1 || e.column.columnDef.header === void 0 ? null : /* @__PURE__ */ s(r, { children: d(e.column.columnDef.header, e.getContext()) }, e.id)) }, e.id)) }), /* @__PURE__ */ s(t, { children: l(v) ? /* @__PURE__ */ s(a, { children: /* @__PURE__ */ s(n, {
|
|
10
|
+
colSpan: _,
|
|
11
|
+
className: "h-24 text-center",
|
|
12
|
+
children: g.render()
|
|
13
|
+
}) }) : u(v, (e) => /* @__PURE__ */ c(o, { children: [/* @__PURE__ */ s(a, {
|
|
14
|
+
"data-state": e.getIsSelected() ? "selected" : void 0,
|
|
15
|
+
children: u(e.getVisibleCells(), (e) => /* @__PURE__ */ s(n, { children: d(e.column.columnDef.cell, e.getContext()) }, e.id))
|
|
16
|
+
}), h.enabled && e.getIsExpanded() ? /* @__PURE__ */ s(a, { children: /* @__PURE__ */ s(n, {
|
|
17
|
+
colSpan: _,
|
|
18
|
+
className: "p-0",
|
|
19
|
+
children: h.renderSubComponent(e)
|
|
20
|
+
}) }) : null] }, e.id)) })] });
|
|
21
|
+
};
|
|
22
|
+
//#endregion
|
|
23
|
+
export { f as DataTableTable };
|
package/dist/index35.cjs
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
const e=require("./index29.cjs");let t=require("react"),n=require("react/jsx-runtime"),r=require("lodash-es"),i=require("@tanstack/react-table");var a=({table:a,columnVisibility:o,expandedState:s,expandConfig:c,empty:l,columnsCount:u})=>{let d=a.getRowModel().rows;return(0,n.jsxs)(e.Table,{children:[(0,n.jsx)(e.TableHeader,{children:(0,r.map)(a.getHeaderGroups(),t=>(0,n.jsx)(e.TableRow,{children:(0,r.map)(t.headers,t=>t.isPlaceholder||o[t.column.id]===!1||t.column.columnDef.header===void 0?null:(0,n.jsx)(e.TableHead,{children:(0,i.flexRender)(t.column.columnDef.header,t.getContext())},t.id))},t.id))}),(0,n.jsx)(e.TableBody,{children:(0,r.isEmpty)(d)?(0,n.jsx)(e.TableRow,{children:(0,n.jsx)(e.TableCell,{colSpan:u,className:`h-24 text-center`,children:l.render()})}):(0,r.map)(d,a=>(0,n.jsxs)(t.Fragment,{children:[(0,n.jsx)(e.TableRow,{"data-state":a.getIsSelected()?`selected`:void 0,children:(0,r.map)(a.getVisibleCells(),t=>(0,n.jsx)(e.TableCell,{children:(0,i.flexRender)(t.column.columnDef.cell,t.getContext())},t.id))}),c.enabled&&a.getIsExpanded()?(0,n.jsx)(e.TableRow,{children:(0,n.jsx)(e.TableCell,{colSpan:u,className:`p-0`,children:c.renderSubComponent(a)})}):null]},a.id))})]})};exports.DataTableTable=a;
|
package/dist/index35.js
ADDED
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import { Input as e } from "./index19.js";
|
|
2
|
+
import { useEffect as t, useRef as n } from "react";
|
|
3
|
+
import { jsx as r, jsxs as i } from "react/jsx-runtime";
|
|
4
|
+
import { debounce as a, isEmpty as o } from "lodash-es";
|
|
5
|
+
//#region src/DataTable/components/DataTableToolbar.tsx
|
|
6
|
+
var s = ({ table: s, placeholder: c, debounceMs: l, right: u }) => {
|
|
7
|
+
let d = s.getState().globalFilter, f = typeof d == "string" ? d : "", p = n(a((e) => {
|
|
8
|
+
s.setGlobalFilter(e);
|
|
9
|
+
}, l));
|
|
10
|
+
return t(() => (p.current = a((e) => {
|
|
11
|
+
s.setGlobalFilter(e);
|
|
12
|
+
}, l), () => {
|
|
13
|
+
p.current.cancel();
|
|
14
|
+
}), [s, l]), t(() => () => {
|
|
15
|
+
p.current.cancel();
|
|
16
|
+
}, []), /* @__PURE__ */ i("div", {
|
|
17
|
+
className: "flex items-center gap-2 py-4",
|
|
18
|
+
children: [/* @__PURE__ */ r(e, {
|
|
19
|
+
placeholder: c,
|
|
20
|
+
defaultValue: f,
|
|
21
|
+
onChange: (e) => {
|
|
22
|
+
let t = e.target.value;
|
|
23
|
+
if (o(t)) {
|
|
24
|
+
p.current("");
|
|
25
|
+
return;
|
|
26
|
+
}
|
|
27
|
+
p.current(t);
|
|
28
|
+
},
|
|
29
|
+
className: "max-w-sm"
|
|
30
|
+
}), u]
|
|
31
|
+
});
|
|
32
|
+
};
|
|
33
|
+
//#endregion
|
|
34
|
+
export { s as DataTableToolbar };
|
package/dist/index36.cjs
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
const e=require("./index20.cjs");let t=require("react"),n=require("react/jsx-runtime"),r=require("lodash-es");var i=({table:i,placeholder:a,debounceMs:o,right:s})=>{let c=i.getState().globalFilter,l=typeof c==`string`?c:``,u=(0,t.useRef)((0,r.debounce)(e=>{i.setGlobalFilter(e)},o));return(0,t.useEffect)(()=>(u.current=(0,r.debounce)(e=>{i.setGlobalFilter(e)},o),()=>{u.current.cancel()}),[i,o]),(0,t.useEffect)(()=>()=>{u.current.cancel()},[]),(0,n.jsxs)(`div`,{className:`flex items-center gap-2 py-4`,children:[(0,n.jsx)(e.Input,{placeholder:a,defaultValue:l,onChange:e=>{let t=e.target.value;if((0,r.isEmpty)(t)){u.current(``);return}u.current(t)},className:`max-w-sm`}),s]})};exports.DataTableToolbar=i;
|
package/dist/index36.js
ADDED
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import { Button as e } from "./index6.js";
|
|
2
|
+
import { DropdownMenu as t, DropdownMenuCheckboxItem as n, DropdownMenuContent as r, DropdownMenuTrigger as i } from "./index12.js";
|
|
3
|
+
import { ChevronDown as a } from "lucide-react";
|
|
4
|
+
import { jsx as o, jsxs as s } from "react/jsx-runtime";
|
|
5
|
+
import { map as c } from "lodash-es";
|
|
6
|
+
//#region src/DataTable/components/DataTableViewOptions.tsx
|
|
7
|
+
var l = ({ table: l, columnVisibility: u }) => {
|
|
8
|
+
let d = l.getAllColumns().filter((e) => e.getCanHide());
|
|
9
|
+
return /* @__PURE__ */ s(t, { children: [/* @__PURE__ */ o(i, {
|
|
10
|
+
asChild: !0,
|
|
11
|
+
children: /* @__PURE__ */ s(e, {
|
|
12
|
+
variant: "outline",
|
|
13
|
+
className: "ml-auto",
|
|
14
|
+
children: ["Columns ", /* @__PURE__ */ o(a, {})]
|
|
15
|
+
})
|
|
16
|
+
}), /* @__PURE__ */ o(r, {
|
|
17
|
+
align: "end",
|
|
18
|
+
children: c(d, (e) => /* @__PURE__ */ o(n, {
|
|
19
|
+
className: "capitalize",
|
|
20
|
+
checked: u[e.id] !== !1,
|
|
21
|
+
onCheckedChange: () => e.toggleVisibility(u[e.id] === !1),
|
|
22
|
+
children: e.id
|
|
23
|
+
}, e.id))
|
|
24
|
+
})] });
|
|
25
|
+
};
|
|
26
|
+
//#endregion
|
|
27
|
+
export { l as DataTableViewOptions };
|
package/dist/index37.cjs
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
const e=require("./index7.cjs"),t=require("./index13.cjs");let n=require("lucide-react"),r=require("react/jsx-runtime"),i=require("lodash-es");var a=({table:a,columnVisibility:o})=>{let s=a.getAllColumns().filter(e=>e.getCanHide());return(0,r.jsxs)(t.DropdownMenu,{children:[(0,r.jsx)(t.DropdownMenuTrigger,{asChild:!0,children:(0,r.jsxs)(e.Button,{variant:`outline`,className:`ml-auto`,children:[`Columns `,(0,r.jsx)(n.ChevronDown,{})]})}),(0,r.jsx)(t.DropdownMenuContent,{align:`end`,children:(0,i.map)(s,e=>(0,r.jsx)(t.DropdownMenuCheckboxItem,{className:`capitalize`,checked:o[e.id]!==!1,onCheckedChange:()=>e.toggleVisibility(o[e.id]===!1),children:e.id},e.id))})]})};exports.DataTableViewOptions=a;
|
package/dist/index37.js
ADDED
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import { jsx as e } from "react/jsx-runtime";
|
|
2
|
+
import { noop as t } from "lodash-es";
|
|
3
|
+
//#region src/DataTable/render/defaults.tsx
|
|
4
|
+
var n = {
|
|
5
|
+
placeholder: "Search...",
|
|
6
|
+
debounceMs: 300
|
|
7
|
+
}, r = { pageSizeOptions: [
|
|
8
|
+
10,
|
|
9
|
+
20,
|
|
10
|
+
50,
|
|
11
|
+
100
|
|
12
|
+
] }, i = { render: () => /* @__PURE__ */ e("div", {
|
|
13
|
+
className: "text-muted-foreground py-8 text-center text-sm",
|
|
14
|
+
children: "No results."
|
|
15
|
+
}) }, a = {
|
|
16
|
+
mode: "client",
|
|
17
|
+
isFetching: !1,
|
|
18
|
+
totalRows: 0,
|
|
19
|
+
onQueryChange: t
|
|
20
|
+
}, o = {
|
|
21
|
+
enabled: !1,
|
|
22
|
+
thresholdPx: 200,
|
|
23
|
+
onEndReached: t
|
|
24
|
+
}, s = () => ({ getRowActions: () => [] });
|
|
25
|
+
//#endregion
|
|
26
|
+
export { a as DEFAULT_API, i as DEFAULT_EMPTY, o as DEFAULT_INFINITE_SCROLL, r as DEFAULT_PAGINATION, n as DEFAULT_SEARCH, s as createDefaultActions };
|
package/dist/index38.cjs
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
let e=require("react/jsx-runtime"),t=require("lodash-es");var n={placeholder:`Search...`,debounceMs:300},r={pageSizeOptions:[10,20,50,100]},i={render:()=>(0,e.jsx)(`div`,{className:`text-muted-foreground py-8 text-center text-sm`,children:`No results.`})},a={mode:`client`,isFetching:!1,totalRows:0,onQueryChange:t.noop},o={enabled:!1,thresholdPx:200,onEndReached:t.noop},s=()=>({getRowActions:()=>[]});exports.DEFAULT_API=a,exports.DEFAULT_EMPTY=i,exports.DEFAULT_INFINITE_SCROLL=o,exports.DEFAULT_PAGINATION=r,exports.DEFAULT_SEARCH=n,exports.createDefaultActions=s;
|
package/dist/index38.js
ADDED
|
@@ -0,0 +1,157 @@
|
|
|
1
|
+
import { cn as e } from "./index3.js";
|
|
2
|
+
import { DataTablePagination as t } from "./index33.js";
|
|
3
|
+
import { DataTableTable as n } from "./index34.js";
|
|
4
|
+
import { DataTableToolbar as r } from "./index35.js";
|
|
5
|
+
import { DataTableViewOptions as ee } from "./index36.js";
|
|
6
|
+
import { DEFAULT_API as te, DEFAULT_EMPTY as ne, DEFAULT_INFINITE_SCROLL as re, DEFAULT_PAGINATION as ie, DEFAULT_SEARCH as ae, createDefaultActions as oe } from "./index37.js";
|
|
7
|
+
import { useEffect as i, useRef as se, useState as a } from "react";
|
|
8
|
+
import { jsx as o, jsxs as s } from "react/jsx-runtime";
|
|
9
|
+
import { clamp as ce, debounce as c } from "lodash-es";
|
|
10
|
+
import { useUpdateEffect as l } from "ahooks";
|
|
11
|
+
import { functionalUpdate as u, getCoreRowModel as le, getExpandedRowModel as ue, getFilteredRowModel as de, getPaginationRowModel as d, getSortedRowModel as f, useReactTable as p } from "@tanstack/react-table";
|
|
12
|
+
//#region src/DataTable/DataTable.tsx
|
|
13
|
+
var m = {
|
|
14
|
+
sorting: [],
|
|
15
|
+
columnFilters: [],
|
|
16
|
+
globalFilter: "",
|
|
17
|
+
columnVisibility: {},
|
|
18
|
+
rowSelection: {},
|
|
19
|
+
pagination: {
|
|
20
|
+
pageIndex: 0,
|
|
21
|
+
pageSize: 10
|
|
22
|
+
},
|
|
23
|
+
expanded: {}
|
|
24
|
+
}, h = () => ({
|
|
25
|
+
enabled: !1,
|
|
26
|
+
renderSubComponent: () => null,
|
|
27
|
+
getSubRows: () => []
|
|
28
|
+
}), g = () => null, _ = (e, t) => String(t), v = ({ data: v, columns: fe, initialState: y, empty: b, search: x, pagination: S, actions: C, api: w, infiniteScroll: T, expand: E, className: D, containerClassName: O, getRowId: k, renderToolbarRight: A }) => {
|
|
29
|
+
let j = y === void 0 ? m : y, M = b === void 0 ? ne : b, N = x === void 0 ? ae : x, P = S === void 0 ? ie : S, F = C === void 0 ? oe() : C, I = w === void 0 ? te : w, L = T === void 0 ? re : T, R = E === void 0 ? h() : E, z = k === void 0 ? _ : k, B = A === void 0 ? g : A, [V, pe] = a(j.sorting), [H, me] = a(j.columnFilters), [U, he] = a(j.globalFilter), [W, ge] = a(j.columnVisibility), [_e, ve] = a(j.rowSelection), [G, K] = a(j.pagination), [q, J] = a(j.expanded), Y = I.mode === "server", ye = Y && G.pageSize > 0 ? Math.ceil(I.totalRows / G.pageSize) : void 0, X = p({
|
|
30
|
+
data: v,
|
|
31
|
+
columns: fe,
|
|
32
|
+
state: {
|
|
33
|
+
sorting: V,
|
|
34
|
+
columnFilters: H,
|
|
35
|
+
globalFilter: U,
|
|
36
|
+
columnVisibility: W,
|
|
37
|
+
rowSelection: _e,
|
|
38
|
+
pagination: G,
|
|
39
|
+
expanded: q
|
|
40
|
+
},
|
|
41
|
+
manualSorting: Y,
|
|
42
|
+
manualFiltering: Y,
|
|
43
|
+
manualPagination: Y,
|
|
44
|
+
pageCount: ye,
|
|
45
|
+
meta: { getRowActions: F.getRowActions },
|
|
46
|
+
enableRowSelection: !0,
|
|
47
|
+
getRowId: (e, t, n) => z(e, t, n === void 0 ? null : n),
|
|
48
|
+
onSortingChange: (e) => pe((t) => u(e, t)),
|
|
49
|
+
onColumnFiltersChange: (e) => me((t) => u(e, t)),
|
|
50
|
+
onGlobalFilterChange: (e) => he((t) => u(e, t)),
|
|
51
|
+
onColumnVisibilityChange: (e) => ge((t) => u(e, t)),
|
|
52
|
+
onRowSelectionChange: (e) => ve((t) => u(e, t)),
|
|
53
|
+
onPaginationChange: (e) => K((t) => u(e, t)),
|
|
54
|
+
onExpandedChange: (e) => J((t) => u(e, t)),
|
|
55
|
+
getCoreRowModel: le(),
|
|
56
|
+
getSortedRowModel: Y ? void 0 : f(),
|
|
57
|
+
getFilteredRowModel: Y ? void 0 : de(),
|
|
58
|
+
getPaginationRowModel: Y ? void 0 : d(),
|
|
59
|
+
getExpandedRowModel: ue(),
|
|
60
|
+
getSubRows: R.enabled ? R.getSubRows : void 0,
|
|
61
|
+
getRowCanExpand: () => R.enabled
|
|
62
|
+
}), Z = {
|
|
63
|
+
sorting: V,
|
|
64
|
+
columnFilters: H,
|
|
65
|
+
globalFilter: U,
|
|
66
|
+
pagination: G
|
|
67
|
+
};
|
|
68
|
+
l(() => {
|
|
69
|
+
Y || K((e) => ({
|
|
70
|
+
...e,
|
|
71
|
+
pageIndex: 0
|
|
72
|
+
}));
|
|
73
|
+
}, [
|
|
74
|
+
Y,
|
|
75
|
+
U,
|
|
76
|
+
H,
|
|
77
|
+
V
|
|
78
|
+
]), i(() => {
|
|
79
|
+
if (Y) return;
|
|
80
|
+
let e = X.getFilteredRowModel().rows.length, t = G.pageSize, n = t > 0 ? Math.ceil(e / t) : 0, r = n === 0 ? 0 : n - 1;
|
|
81
|
+
K((e) => ({
|
|
82
|
+
...e,
|
|
83
|
+
pageIndex: ce(e.pageIndex, 0, r)
|
|
84
|
+
}));
|
|
85
|
+
}, [
|
|
86
|
+
Y,
|
|
87
|
+
G.pageSize,
|
|
88
|
+
X
|
|
89
|
+
]);
|
|
90
|
+
let Q = se(c((e) => {
|
|
91
|
+
I.onQueryChange(e);
|
|
92
|
+
}, N.debounceMs));
|
|
93
|
+
i(() => (Q.current = c((e) => {
|
|
94
|
+
I.onQueryChange(e);
|
|
95
|
+
}, N.debounceMs), () => {
|
|
96
|
+
Q.current.cancel();
|
|
97
|
+
}), [I, N.debounceMs]), l(() => {
|
|
98
|
+
if (I.mode === "server") return Q.current(Z), () => {
|
|
99
|
+
Q.current.cancel();
|
|
100
|
+
};
|
|
101
|
+
}, [Z, I]);
|
|
102
|
+
let [$, be] = a(null);
|
|
103
|
+
i(() => {
|
|
104
|
+
if (L.enabled === !1 || $ === null) return;
|
|
105
|
+
let e = () => {
|
|
106
|
+
if (I.isFetching) return;
|
|
107
|
+
let e = $.scrollTop;
|
|
108
|
+
$.scrollHeight - (e + $.clientHeight) <= L.thresholdPx && L.onEndReached(Z);
|
|
109
|
+
};
|
|
110
|
+
return $.addEventListener("scroll", e, { passive: !0 }), () => {
|
|
111
|
+
$.removeEventListener("scroll", e);
|
|
112
|
+
};
|
|
113
|
+
}, [
|
|
114
|
+
I.isFetching,
|
|
115
|
+
L,
|
|
116
|
+
Z,
|
|
117
|
+
$
|
|
118
|
+
]);
|
|
119
|
+
let xe = X.getVisibleLeafColumns().length;
|
|
120
|
+
return /* @__PURE__ */ s("div", {
|
|
121
|
+
className: e("w-full", D === void 0 ? "" : D),
|
|
122
|
+
children: [
|
|
123
|
+
/* @__PURE__ */ o(r, {
|
|
124
|
+
table: X,
|
|
125
|
+
placeholder: N.placeholder,
|
|
126
|
+
debounceMs: N.debounceMs,
|
|
127
|
+
right: /* @__PURE__ */ s("div", {
|
|
128
|
+
className: "ml-auto flex items-center gap-2",
|
|
129
|
+
children: [B(X), /* @__PURE__ */ o(ee, {
|
|
130
|
+
table: X,
|
|
131
|
+
columnVisibility: W
|
|
132
|
+
})]
|
|
133
|
+
})
|
|
134
|
+
}),
|
|
135
|
+
/* @__PURE__ */ o("div", {
|
|
136
|
+
ref: (e) => be(e),
|
|
137
|
+
className: e(O === void 0 ? "overflow-auto" : O),
|
|
138
|
+
children: /* @__PURE__ */ o(n, {
|
|
139
|
+
table: X,
|
|
140
|
+
columnVisibility: W,
|
|
141
|
+
expandedState: q,
|
|
142
|
+
expandConfig: R,
|
|
143
|
+
empty: M,
|
|
144
|
+
columnsCount: xe
|
|
145
|
+
})
|
|
146
|
+
}),
|
|
147
|
+
/* @__PURE__ */ o(t, {
|
|
148
|
+
table: X,
|
|
149
|
+
tableState: X.getState(),
|
|
150
|
+
pageSizeOptions: P.pageSizeOptions,
|
|
151
|
+
apiConfig: I
|
|
152
|
+
})
|
|
153
|
+
]
|
|
154
|
+
});
|
|
155
|
+
};
|
|
156
|
+
//#endregion
|
|
157
|
+
export { v as default };
|
package/dist/index39.cjs
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
const e=require("./index4.cjs"),t=require("./index34.cjs"),n=require("./index35.cjs"),r=require("./index36.cjs"),ee=require("./index37.cjs"),i=require("./index38.cjs");let a=require("react"),o=require("react/jsx-runtime"),s=require("lodash-es"),c=require("ahooks"),l=require("@tanstack/react-table");var u={sorting:[],columnFilters:[],globalFilter:``,columnVisibility:{},rowSelection:{},pagination:{pageIndex:0,pageSize:10},expanded:{}},te=()=>({enabled:!1,renderSubComponent:()=>null,getSubRows:()=>[]}),d=()=>null,ne=(e,t)=>String(t),f=({data:f,columns:p,initialState:m,empty:h,search:g,pagination:_,actions:v,api:y,infiniteScroll:b,expand:x,className:S,containerClassName:C,getRowId:w,renderToolbarRight:T})=>{let E=m===void 0?u:m,D=h===void 0?i.DEFAULT_EMPTY:h,O=g===void 0?i.DEFAULT_SEARCH:g,k=_===void 0?i.DEFAULT_PAGINATION:_,A=v===void 0?i.createDefaultActions():v,j=y===void 0?i.DEFAULT_API:y,M=b===void 0?i.DEFAULT_INFINITE_SCROLL:b,N=x===void 0?te():x,P=w===void 0?ne:w,re=T===void 0?d:T,[F,ie]=(0,a.useState)(E.sorting),[I,L]=(0,a.useState)(E.columnFilters),[R,z]=(0,a.useState)(E.globalFilter),[B,V]=(0,a.useState)(E.columnVisibility),[H,U]=(0,a.useState)(E.rowSelection),[W,G]=(0,a.useState)(E.pagination),[K,q]=(0,a.useState)(E.expanded),J=j.mode===`server`,Y=J&&W.pageSize>0?Math.ceil(j.totalRows/W.pageSize):void 0,X=(0,l.useReactTable)({data:f,columns:p,state:{sorting:F,columnFilters:I,globalFilter:R,columnVisibility:B,rowSelection:H,pagination:W,expanded:K},manualSorting:J,manualFiltering:J,manualPagination:J,pageCount:Y,meta:{getRowActions:A.getRowActions},enableRowSelection:!0,getRowId:(e,t,n)=>P(e,t,n===void 0?null:n),onSortingChange:e=>ie(t=>(0,l.functionalUpdate)(e,t)),onColumnFiltersChange:e=>L(t=>(0,l.functionalUpdate)(e,t)),onGlobalFilterChange:e=>z(t=>(0,l.functionalUpdate)(e,t)),onColumnVisibilityChange:e=>V(t=>(0,l.functionalUpdate)(e,t)),onRowSelectionChange:e=>U(t=>(0,l.functionalUpdate)(e,t)),onPaginationChange:e=>G(t=>(0,l.functionalUpdate)(e,t)),onExpandedChange:e=>q(t=>(0,l.functionalUpdate)(e,t)),getCoreRowModel:(0,l.getCoreRowModel)(),getSortedRowModel:J?void 0:(0,l.getSortedRowModel)(),getFilteredRowModel:J?void 0:(0,l.getFilteredRowModel)(),getPaginationRowModel:J?void 0:(0,l.getPaginationRowModel)(),getExpandedRowModel:(0,l.getExpandedRowModel)(),getSubRows:N.enabled?N.getSubRows:void 0,getRowCanExpand:()=>N.enabled}),Z={sorting:F,columnFilters:I,globalFilter:R,pagination:W};(0,c.useUpdateEffect)(()=>{J||G(e=>({...e,pageIndex:0}))},[J,R,I,F]),(0,a.useEffect)(()=>{if(J)return;let e=X.getFilteredRowModel().rows.length,t=W.pageSize,n=t>0?Math.ceil(e/t):0,r=n===0?0:n-1;G(e=>({...e,pageIndex:(0,s.clamp)(e.pageIndex,0,r)}))},[J,W.pageSize,X]);let Q=(0,a.useRef)((0,s.debounce)(e=>{j.onQueryChange(e)},O.debounceMs));(0,a.useEffect)(()=>(Q.current=(0,s.debounce)(e=>{j.onQueryChange(e)},O.debounceMs),()=>{Q.current.cancel()}),[j,O.debounceMs]),(0,c.useUpdateEffect)(()=>{if(j.mode===`server`)return Q.current(Z),()=>{Q.current.cancel()}},[Z,j]);let[$,ae]=(0,a.useState)(null);(0,a.useEffect)(()=>{if(M.enabled===!1||$===null)return;let e=()=>{if(j.isFetching)return;let e=$.scrollTop;$.scrollHeight-(e+$.clientHeight)<=M.thresholdPx&&M.onEndReached(Z)};return $.addEventListener(`scroll`,e,{passive:!0}),()=>{$.removeEventListener(`scroll`,e)}},[j.isFetching,M,Z,$]);let oe=X.getVisibleLeafColumns().length;return(0,o.jsxs)(`div`,{className:e.cn(`w-full`,S===void 0?``:S),children:[(0,o.jsx)(r.DataTableToolbar,{table:X,placeholder:O.placeholder,debounceMs:O.debounceMs,right:(0,o.jsxs)(`div`,{className:`ml-auto flex items-center gap-2`,children:[re(X),(0,o.jsx)(ee.DataTableViewOptions,{table:X,columnVisibility:B})]})}),(0,o.jsx)(`div`,{ref:e=>ae(e),className:e.cn(C===void 0?`overflow-auto`:C),children:(0,o.jsx)(n.DataTableTable,{table:X,columnVisibility:B,expandedState:K,expandConfig:N,empty:D,columnsCount:oe})}),(0,o.jsx)(t.DataTablePagination,{table:X,tableState:X.getState(),pageSizeOptions:k.pageSizeOptions,apiConfig:j})]})};exports.default=f;
|
package/dist/index39.js
ADDED
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import { Button as e } from "./index6.js";
|
|
2
|
+
import { DropdownMenu as t, DropdownMenuContent as n, DropdownMenuItem as r, DropdownMenuLabel as i, DropdownMenuSeparator as a, DropdownMenuTrigger as o } from "./index12.js";
|
|
3
|
+
import { MoreHorizontal as s } from "lucide-react";
|
|
4
|
+
import { jsx as c, jsxs as l } from "react/jsx-runtime";
|
|
5
|
+
import { get as u, isEmpty as d, map as f } from "lodash-es";
|
|
6
|
+
import { useTranslation as p } from "react-i18next";
|
|
7
|
+
//#region src/DataTable/components/DataTableRowActions.tsx
|
|
8
|
+
var m = ({ row: m, table: h }) => {
|
|
9
|
+
let { t: g } = p(), _ = h.options.meta, v = u(_, "getRowActions"), y = v === void 0 ? [] : v(m);
|
|
10
|
+
return d(y) ? null : /* @__PURE__ */ l(t, { children: [/* @__PURE__ */ c(o, {
|
|
11
|
+
asChild: !0,
|
|
12
|
+
children: /* @__PURE__ */ l(e, {
|
|
13
|
+
variant: "ghost",
|
|
14
|
+
className: "h-8 w-8 p-0",
|
|
15
|
+
children: [/* @__PURE__ */ c("span", {
|
|
16
|
+
className: "sr-only",
|
|
17
|
+
children: g("datatable_open_menu")
|
|
18
|
+
}), /* @__PURE__ */ c(s, {})]
|
|
19
|
+
})
|
|
20
|
+
}), /* @__PURE__ */ l(n, {
|
|
21
|
+
align: "end",
|
|
22
|
+
children: [
|
|
23
|
+
/* @__PURE__ */ c(i, { children: g("datatable_actions") }),
|
|
24
|
+
/* @__PURE__ */ c(a, {}),
|
|
25
|
+
f(y, (e) => /* @__PURE__ */ c(r, {
|
|
26
|
+
disabled: e.disabled,
|
|
27
|
+
onClick: () => e.onSelect(m),
|
|
28
|
+
children: e.label
|
|
29
|
+
}, e.id))
|
|
30
|
+
]
|
|
31
|
+
})] });
|
|
32
|
+
};
|
|
33
|
+
//#endregion
|
|
34
|
+
export { m as DataTableRowActions };
|
package/dist/index4.cjs
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
let e=require("clsx"),t=require("tailwind-merge");function n(...n){return(0,t.twMerge)((0,e.clsx)(n))}exports.cn=n;
|
package/dist/index4.js
ADDED
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
import { cn as e } from "./index3.js";
|
|
2
|
+
import { ChevronDownIcon as t } from "lucide-react";
|
|
3
|
+
import "react";
|
|
4
|
+
import { jsx as n, jsxs as r } from "react/jsx-runtime";
|
|
5
|
+
import * as i from "@radix-ui/react-accordion";
|
|
6
|
+
//#region src/ui/accordion.tsx
|
|
7
|
+
function a({ ...e }) {
|
|
8
|
+
return /* @__PURE__ */ n(i.Root, {
|
|
9
|
+
"data-slot": "accordion",
|
|
10
|
+
...e
|
|
11
|
+
});
|
|
12
|
+
}
|
|
13
|
+
function o({ className: t, ...r }) {
|
|
14
|
+
return /* @__PURE__ */ n(i.Item, {
|
|
15
|
+
"data-slot": "accordion-item",
|
|
16
|
+
className: e("border-b last:border-b-0", t),
|
|
17
|
+
...r
|
|
18
|
+
});
|
|
19
|
+
}
|
|
20
|
+
function s({ className: a, children: o, ...s }) {
|
|
21
|
+
return /* @__PURE__ */ n(i.Header, {
|
|
22
|
+
className: "flex",
|
|
23
|
+
children: /* @__PURE__ */ r(i.Trigger, {
|
|
24
|
+
"data-slot": "accordion-trigger",
|
|
25
|
+
className: e("focus-visible:border-ring focus-visible:ring-ring/50 flex flex-1 items-start justify-between gap-4 rounded-md py-4 text-left text-sm font-medium transition-all outline-none hover:underline focus-visible:ring-[3px] disabled:pointer-events-none disabled:opacity-50 [&[data-state=open]>svg]:rotate-180", a),
|
|
26
|
+
...s,
|
|
27
|
+
children: [o, /* @__PURE__ */ n(t, { className: "text-muted-foreground pointer-events-none size-4 shrink-0 translate-y-0.5 transition-transform duration-200" })]
|
|
28
|
+
})
|
|
29
|
+
});
|
|
30
|
+
}
|
|
31
|
+
function c({ className: t, children: r, ...a }) {
|
|
32
|
+
return /* @__PURE__ */ n(i.Content, {
|
|
33
|
+
"data-slot": "accordion-content",
|
|
34
|
+
className: "data-[state=closed]:animate-accordion-up data-[state=open]:animate-accordion-down overflow-hidden text-sm",
|
|
35
|
+
...a,
|
|
36
|
+
children: /* @__PURE__ */ n("div", {
|
|
37
|
+
className: e("pt-0 pb-4", t),
|
|
38
|
+
children: r
|
|
39
|
+
})
|
|
40
|
+
});
|
|
41
|
+
}
|
|
42
|
+
//#endregion
|
|
43
|
+
export { a as Accordion, c as AccordionContent, o as AccordionItem, s as AccordionTrigger };
|
package/dist/index40.cjs
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
const e=require("./index7.cjs"),t=require("./index13.cjs");let n=require("lucide-react"),r=require("react/jsx-runtime"),i=require("lodash-es"),a=require("react-i18next");var o=({row:o,table:s})=>{let{t:c}=(0,a.useTranslation)(),l=s.options.meta,u=(0,i.get)(l,`getRowActions`),d=u===void 0?[]:u(o);return(0,i.isEmpty)(d)?null:(0,r.jsxs)(t.DropdownMenu,{children:[(0,r.jsx)(t.DropdownMenuTrigger,{asChild:!0,children:(0,r.jsxs)(e.Button,{variant:`ghost`,className:`h-8 w-8 p-0`,children:[(0,r.jsx)(`span`,{className:`sr-only`,children:c(`datatable_open_menu`)}),(0,r.jsx)(n.MoreHorizontal,{})]})}),(0,r.jsxs)(t.DropdownMenuContent,{align:`end`,children:[(0,r.jsx)(t.DropdownMenuLabel,{children:c(`datatable_actions`)}),(0,r.jsx)(t.DropdownMenuSeparator,{}),(0,i.map)(d,e=>(0,r.jsx)(t.DropdownMenuItem,{disabled:e.disabled,onClick:()=>e.onSelect(o),children:e.label},e.id))]})]})};exports.DataTableRowActions=o;
|
package/dist/index40.js
ADDED
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
import { Button as e } from "./index6.js";
|
|
2
|
+
import { Checkbox as t } from "./index9.js";
|
|
3
|
+
import { DataTableRowActions as n } from "./index39.js";
|
|
4
|
+
import { ChevronDown as r, ChevronRight as i } from "lucide-react";
|
|
5
|
+
import { jsx as a, jsxs as o } from "react/jsx-runtime";
|
|
6
|
+
//#region src/DataTable/render/createColumns.tsx
|
|
7
|
+
var s = () => ({
|
|
8
|
+
id: "select",
|
|
9
|
+
header: ({ table: e }) => /* @__PURE__ */ a(t, {
|
|
10
|
+
checked: e.getIsAllPageRowsSelected() || (e.getIsSomePageRowsSelected() ? "indeterminate" : !1),
|
|
11
|
+
onCheckedChange: (t) => e.toggleAllPageRowsSelected(!!t),
|
|
12
|
+
"aria-label": "Select all"
|
|
13
|
+
}),
|
|
14
|
+
cell: ({ row: e }) => /* @__PURE__ */ a(t, {
|
|
15
|
+
checked: e.getIsSelected(),
|
|
16
|
+
onCheckedChange: (t) => e.toggleSelected(!!t),
|
|
17
|
+
"aria-label": "Select row"
|
|
18
|
+
}),
|
|
19
|
+
enableSorting: !1,
|
|
20
|
+
enableHiding: !1
|
|
21
|
+
}), c = () => ({
|
|
22
|
+
id: "expand",
|
|
23
|
+
enableSorting: !1,
|
|
24
|
+
enableHiding: !1,
|
|
25
|
+
header: () => null,
|
|
26
|
+
cell: ({ row: e }) => /* @__PURE__ */ a(l, { row: e })
|
|
27
|
+
}), l = ({ row: t }) => t.getCanExpand() ? /* @__PURE__ */ o(e, {
|
|
28
|
+
variant: "ghost",
|
|
29
|
+
size: "sm",
|
|
30
|
+
className: "h-8 w-8 p-0",
|
|
31
|
+
onClick: () => t.toggleExpanded(),
|
|
32
|
+
children: [/* @__PURE__ */ a("span", {
|
|
33
|
+
className: "sr-only",
|
|
34
|
+
children: "Toggle"
|
|
35
|
+
}), t.getIsExpanded() ? /* @__PURE__ */ a(r, {}) : /* @__PURE__ */ a(i, {})]
|
|
36
|
+
}) : null, u = () => ({
|
|
37
|
+
id: "actions",
|
|
38
|
+
enableHiding: !1,
|
|
39
|
+
header: () => null,
|
|
40
|
+
cell: ({ row: e, table: t }) => /* @__PURE__ */ a(n, {
|
|
41
|
+
row: e,
|
|
42
|
+
table: t
|
|
43
|
+
})
|
|
44
|
+
});
|
|
45
|
+
//#endregion
|
|
46
|
+
export { c as createExpanderColumn, u as createRowActionsColumn, s as createSelectionColumn };
|
package/dist/index41.cjs
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
const e=require("./index7.cjs"),t=require("./index10.cjs"),n=require("./index40.cjs");let r=require("lucide-react"),i=require("react/jsx-runtime");var a=()=>({id:`select`,header:({table:e})=>(0,i.jsx)(t.Checkbox,{checked:e.getIsAllPageRowsSelected()||(e.getIsSomePageRowsSelected()?`indeterminate`:!1),onCheckedChange:t=>e.toggleAllPageRowsSelected(!!t),"aria-label":`Select all`}),cell:({row:e})=>(0,i.jsx)(t.Checkbox,{checked:e.getIsSelected(),onCheckedChange:t=>e.toggleSelected(!!t),"aria-label":`Select row`}),enableSorting:!1,enableHiding:!1}),o=()=>({id:`expand`,enableSorting:!1,enableHiding:!1,header:()=>null,cell:({row:e})=>(0,i.jsx)(s,{row:e})}),s=({row:t})=>t.getCanExpand()?(0,i.jsxs)(e.Button,{variant:`ghost`,size:`sm`,className:`h-8 w-8 p-0`,onClick:()=>t.toggleExpanded(),children:[(0,i.jsx)(`span`,{className:`sr-only`,children:`Toggle`}),t.getIsExpanded()?(0,i.jsx)(r.ChevronDown,{}):(0,i.jsx)(r.ChevronRight,{})]}):null,c=()=>({id:`actions`,enableHiding:!1,header:()=>null,cell:({row:e,table:t})=>(0,i.jsx)(n.DataTableRowActions,{row:e,table:t})});exports.createExpanderColumn=o,exports.createRowActionsColumn=c,exports.createSelectionColumn=a;
|
package/dist/index41.js
ADDED
|
@@ -0,0 +1,118 @@
|
|
|
1
|
+
import { Activity as e, AlertCircle as t, ArrowLeft as ee, ArrowRight as te, Award as ne, BarChart3 as n, BookOpen as r, Bot as i, Brain as a, Calendar as o, CalendarIcon as s, Cat as c, Check as l, CheckCircle2 as u, CheckIcon as d, ChevronDown as f, ChevronDownIcon as p, ChevronLeft as m, ChevronRight as h, ChevronUp as g, Circle as _, Clock as v, CloudUpload as y, Code as b, Copy as x, Cpu as S, Database as C, Dog as w, DollarSign as T, Eye as E, EyeOff as D, FileArchiveIcon as O, FileAudioIcon as k, FileCodeIcon as A, FileCogIcon as j, FileIcon as M, FileQuestion as N, FileTextIcon as P, FileVideoIcon as F, Fish as I, Flame as L, Globe as R, HardDrive as z, Headphones as B, Heart as V, History as H, Home as U, Info as W, Languages as G, Lightbulb as K, Loader2 as q, LoaderCircleIcon as J, LoaderIcon as Y, LoaderPinwheelIcon as X, Mail as Z, Maximize as re, MessageCircle as ie, MessageSquare as ae, Mic as oe, Minimize as se, Monitor as ce, Moon as le, MoonIcon as ue, MoreHorizontal as de, PenTool as fe, Phone as pe, PhoneOff as me, PieChart as he, Play as ge, Plus as _e, PlusCircle as ve, Rabbit as ye, RefreshCcw as be, Search as xe, SearchIcon as Se, Send as Ce, Shield as we, Smartphone as Te, Sparkles as Ee, Square as De, Star as Oe, Sun as ke, SunMedium as Ae, Target as je, TrendingUp as Me, Trophy as Ne, Turtle as Pe, Undo2 as Fe, Users as Ie, Volume2 as Le, Wand2 as Re, WandSparkles as Q, X as ze, XCircle as Be, XIcon as Ve, Zap as He } from "lucide-react";
|
|
2
|
+
import { jsx as $ } from "react/jsx-runtime";
|
|
3
|
+
//#region src/Icons/Icons.tsx
|
|
4
|
+
var Ue = {
|
|
5
|
+
MoonIcon: ue,
|
|
6
|
+
SunIcon: Ae,
|
|
7
|
+
Award: ne,
|
|
8
|
+
Cat: c,
|
|
9
|
+
Dog: w,
|
|
10
|
+
Fish: I,
|
|
11
|
+
Rabbit: ye,
|
|
12
|
+
Turtle: Pe,
|
|
13
|
+
Code: b,
|
|
14
|
+
Globe: R,
|
|
15
|
+
Users: Ie,
|
|
16
|
+
Star: Oe,
|
|
17
|
+
Heart: V,
|
|
18
|
+
Zap: He,
|
|
19
|
+
Cpu: S,
|
|
20
|
+
Database: C,
|
|
21
|
+
Monitor: ce,
|
|
22
|
+
Smartphone: Te,
|
|
23
|
+
Wand: Re,
|
|
24
|
+
WandSparkles: Q,
|
|
25
|
+
Calendar: o,
|
|
26
|
+
CalendarIcon: s,
|
|
27
|
+
HardDrive: z,
|
|
28
|
+
TrendingUp: Me,
|
|
29
|
+
DollarSign: T,
|
|
30
|
+
Target: je,
|
|
31
|
+
Shield: we,
|
|
32
|
+
Mail: Z,
|
|
33
|
+
PieChart: he,
|
|
34
|
+
Activity: e,
|
|
35
|
+
Search: xe,
|
|
36
|
+
SearchIcon: Se,
|
|
37
|
+
MessageCircle: ie,
|
|
38
|
+
Bot: i,
|
|
39
|
+
MoreHorizontal: de,
|
|
40
|
+
Maximize: re,
|
|
41
|
+
Minimize: se,
|
|
42
|
+
X: ze,
|
|
43
|
+
XIcon: Ve,
|
|
44
|
+
XCircle: Be,
|
|
45
|
+
EyeOff: D,
|
|
46
|
+
Eye: E,
|
|
47
|
+
Copy: x,
|
|
48
|
+
Check: l,
|
|
49
|
+
CheckIcon: d,
|
|
50
|
+
Clock: v,
|
|
51
|
+
ChevronUp: g,
|
|
52
|
+
ChevronDown: f,
|
|
53
|
+
ChevronDownIcon: p,
|
|
54
|
+
ChevronRight: h,
|
|
55
|
+
ChevronLeft: m,
|
|
56
|
+
Sparkles: Ee,
|
|
57
|
+
WandSparklesIcon: Q,
|
|
58
|
+
Play: ge,
|
|
59
|
+
Headphones: B,
|
|
60
|
+
Brain: a,
|
|
61
|
+
PenTool: fe,
|
|
62
|
+
BookOpen: r,
|
|
63
|
+
BarChart3: n,
|
|
64
|
+
CheckCircle2: u,
|
|
65
|
+
Moon: le,
|
|
66
|
+
Sun: ke,
|
|
67
|
+
CloudUpload: y,
|
|
68
|
+
LoaderCircleIcon: J,
|
|
69
|
+
LoaderIcon: Y,
|
|
70
|
+
LoaderPinwheelIcon: X,
|
|
71
|
+
FileArchiveIcon: O,
|
|
72
|
+
FileAudioIcon: k,
|
|
73
|
+
FileCodeIcon: A,
|
|
74
|
+
FileCogIcon: j,
|
|
75
|
+
FileIcon: M,
|
|
76
|
+
FileTextIcon: P,
|
|
77
|
+
FileVideoIcon: F,
|
|
78
|
+
Trophy: Ne,
|
|
79
|
+
Flame: L,
|
|
80
|
+
Undo2: Fe,
|
|
81
|
+
Volume2: Le,
|
|
82
|
+
ArrowRight: te,
|
|
83
|
+
ArrowLeft: ee,
|
|
84
|
+
Plus: _e,
|
|
85
|
+
PlusCircle: ve,
|
|
86
|
+
Info: W,
|
|
87
|
+
Square: De,
|
|
88
|
+
Mic: oe,
|
|
89
|
+
MessageSquare: ae,
|
|
90
|
+
Phone: pe,
|
|
91
|
+
PhoneOff: me,
|
|
92
|
+
Circle: _,
|
|
93
|
+
Send: Ce,
|
|
94
|
+
Loader2: q,
|
|
95
|
+
History: H,
|
|
96
|
+
Languages: G,
|
|
97
|
+
Lightbulb: K,
|
|
98
|
+
FileQuestion: N,
|
|
99
|
+
Home: U,
|
|
100
|
+
AlertCircle: t,
|
|
101
|
+
RefreshCcw: be,
|
|
102
|
+
GitHub: ({ ...e }) => /* @__PURE__ */ $("svg", {
|
|
103
|
+
"aria-hidden": "true",
|
|
104
|
+
focusable: "false",
|
|
105
|
+
"data-prefix": "fab",
|
|
106
|
+
"data-icon": "github",
|
|
107
|
+
role: "img",
|
|
108
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
109
|
+
viewBox: "0 0 496 512",
|
|
110
|
+
...e,
|
|
111
|
+
children: /* @__PURE__ */ $("path", {
|
|
112
|
+
fill: "currentColor",
|
|
113
|
+
d: "M165.9 397.4c0 2-2.3 3.6-5.2 3.6-3.3 .3-5.6-1.3-5.6-3.6 0-2 2.3-3.6 5.2-3.6 3-.3 5.6 1.3 5.6 3.6zm-31.1-4.5c-.7 2 1.3 4.3 4.3 4.9 2.6 1 5.6 0 6.2-2s-1.3-4.3-4.3-5.2c-2.6-.7-5.5 .3-6.2 2.3zm44.2-1.7c-2.9 .7-4.9 2.6-4.6 4.9 .3 2 2.9 3.3 5.9 2.6 2.9-.7 4.9-2.6 4.6-4.6-.3-1.9-3-3.2-5.9-2.9zM244.8 8C106.1 8 0 113.3 0 252c0 110.9 69.8 205.8 169.5 239.2 12.8 2.3 17.3-5.6 17.3-12.1 0-6.2-.3-40.4-.3-61.4 0 0-70 15-84.7-29.8 0 0-11.4-29.1-27.8-36.6 0 0-22.9-15.7 1.6-15.4 0 0 24.9 2 38.6 25.8 21.9 38.6 58.6 27.5 72.9 20.9 2.3-16 8.8-27.1 16-33.7-55.9-6.2-112.3-14.3-112.3-110.5 0-27.5 7.6-41.3 23.6-58.9-2.6-6.5-11.1-33.3 2.6-67.9 20.9-6.5 69 27 69 27 20-5.6 41.5-8.5 62.8-8.5s42.8 2.9 62.8 8.5c0 0 48.1-33.6 69-27 13.7 34.7 5.2 61.4 2.6 67.9 16 17.7 25.8 31.5 25.8 58.9 0 96.5-58.9 104.2-114.8 110.5 9.2 7.9 17 22.9 17 46.4 0 33.7-.3 75.4-.3 83.6 0 6.5 4.6 14.4 17.3 12.1C428.2 457.8 496 362.9 496 252 496 113.3 383.5 8 244.8 8zM97.2 352.9c-1.3 1-1 3.3 .7 5.2 1.6 1.6 3.9 2.3 5.2 1 1.3-1 1-3.3-.7-5.2-1.6-1.6-3.9-2.3-5.2-1zm-10.8-8.1c-.7 1.3 .3 2.9 2.3 3.9 1.6 1 3.6 .7 4.3-.7 .7-1.3-.3-2.9-2.3-3.9-2-.6-3.6-.3-4.3 .7zm32.4 35.6c-1.6 1.3-1 4.3 1.3 6.2 2.3 2.3 5.2 2.6 6.5 1 1.3-1.3 .7-4.3-1.3-6.2-2.2-2.3-5.2-2.6-6.5-1zm-11.4-14.7c-1.6 1-1.6 3.6 0 5.9 1.6 2.3 4.3 3.3 5.6 2.3 1.6-1.3 1.6-3.9 0-6.2-1.4-2.3-4-3.3-5.6-2z"
|
|
114
|
+
})
|
|
115
|
+
})
|
|
116
|
+
};
|
|
117
|
+
//#endregion
|
|
118
|
+
export { Ue as Icons };
|
package/dist/index42.cjs
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
let e=require("lucide-react"),t=require("react/jsx-runtime");var n={MoonIcon:e.MoonIcon,SunIcon:e.SunMedium,Award:e.Award,Cat:e.Cat,Dog:e.Dog,Fish:e.Fish,Rabbit:e.Rabbit,Turtle:e.Turtle,Code:e.Code,Globe:e.Globe,Users:e.Users,Star:e.Star,Heart:e.Heart,Zap:e.Zap,Cpu:e.Cpu,Database:e.Database,Monitor:e.Monitor,Smartphone:e.Smartphone,Wand:e.Wand2,WandSparkles:e.WandSparkles,Calendar:e.Calendar,CalendarIcon:e.CalendarIcon,HardDrive:e.HardDrive,TrendingUp:e.TrendingUp,DollarSign:e.DollarSign,Target:e.Target,Shield:e.Shield,Mail:e.Mail,PieChart:e.PieChart,Activity:e.Activity,Search:e.Search,SearchIcon:e.SearchIcon,MessageCircle:e.MessageCircle,Bot:e.Bot,MoreHorizontal:e.MoreHorizontal,Maximize:e.Maximize,Minimize:e.Minimize,X:e.X,XIcon:e.XIcon,XCircle:e.XCircle,EyeOff:e.EyeOff,Eye:e.Eye,Copy:e.Copy,Check:e.Check,CheckIcon:e.CheckIcon,Clock:e.Clock,ChevronUp:e.ChevronUp,ChevronDown:e.ChevronDown,ChevronDownIcon:e.ChevronDownIcon,ChevronRight:e.ChevronRight,ChevronLeft:e.ChevronLeft,Sparkles:e.Sparkles,WandSparklesIcon:e.WandSparkles,Play:e.Play,Headphones:e.Headphones,Brain:e.Brain,PenTool:e.PenTool,BookOpen:e.BookOpen,BarChart3:e.BarChart3,CheckCircle2:e.CheckCircle2,Moon:e.Moon,Sun:e.Sun,CloudUpload:e.CloudUpload,LoaderCircleIcon:e.LoaderCircleIcon,LoaderIcon:e.LoaderIcon,LoaderPinwheelIcon:e.LoaderPinwheelIcon,FileArchiveIcon:e.FileArchiveIcon,FileAudioIcon:e.FileAudioIcon,FileCodeIcon:e.FileCodeIcon,FileCogIcon:e.FileCogIcon,FileIcon:e.FileIcon,FileTextIcon:e.FileTextIcon,FileVideoIcon:e.FileVideoIcon,Trophy:e.Trophy,Flame:e.Flame,Undo2:e.Undo2,Volume2:e.Volume2,ArrowRight:e.ArrowRight,ArrowLeft:e.ArrowLeft,Plus:e.Plus,PlusCircle:e.PlusCircle,Info:e.Info,Square:e.Square,Mic:e.Mic,MessageSquare:e.MessageSquare,Phone:e.Phone,PhoneOff:e.PhoneOff,Circle:e.Circle,Send:e.Send,Loader2:e.Loader2,History:e.History,Languages:e.Languages,Lightbulb:e.Lightbulb,FileQuestion:e.FileQuestion,Home:e.Home,AlertCircle:e.AlertCircle,RefreshCcw:e.RefreshCcw,GitHub:({...e})=>(0,t.jsx)(`svg`,{"aria-hidden":`true`,focusable:`false`,"data-prefix":`fab`,"data-icon":`github`,role:`img`,xmlns:`http://www.w3.org/2000/svg`,viewBox:`0 0 496 512`,...e,children:(0,t.jsx)(`path`,{fill:`currentColor`,d:`M165.9 397.4c0 2-2.3 3.6-5.2 3.6-3.3 .3-5.6-1.3-5.6-3.6 0-2 2.3-3.6 5.2-3.6 3-.3 5.6 1.3 5.6 3.6zm-31.1-4.5c-.7 2 1.3 4.3 4.3 4.9 2.6 1 5.6 0 6.2-2s-1.3-4.3-4.3-5.2c-2.6-.7-5.5 .3-6.2 2.3zm44.2-1.7c-2.9 .7-4.9 2.6-4.6 4.9 .3 2 2.9 3.3 5.9 2.6 2.9-.7 4.9-2.6 4.6-4.6-.3-1.9-3-3.2-5.9-2.9zM244.8 8C106.1 8 0 113.3 0 252c0 110.9 69.8 205.8 169.5 239.2 12.8 2.3 17.3-5.6 17.3-12.1 0-6.2-.3-40.4-.3-61.4 0 0-70 15-84.7-29.8 0 0-11.4-29.1-27.8-36.6 0 0-22.9-15.7 1.6-15.4 0 0 24.9 2 38.6 25.8 21.9 38.6 58.6 27.5 72.9 20.9 2.3-16 8.8-27.1 16-33.7-55.9-6.2-112.3-14.3-112.3-110.5 0-27.5 7.6-41.3 23.6-58.9-2.6-6.5-11.1-33.3 2.6-67.9 20.9-6.5 69 27 69 27 20-5.6 41.5-8.5 62.8-8.5s42.8 2.9 62.8 8.5c0 0 48.1-33.6 69-27 13.7 34.7 5.2 61.4 2.6 67.9 16 17.7 25.8 31.5 25.8 58.9 0 96.5-58.9 104.2-114.8 110.5 9.2 7.9 17 22.9 17 46.4 0 33.7-.3 75.4-.3 83.6 0 6.5 4.6 14.4 17.3 12.1C428.2 457.8 496 362.9 496 252 496 113.3 383.5 8 244.8 8zM97.2 352.9c-1.3 1-1 3.3 .7 5.2 1.6 1.6 3.9 2.3 5.2 1 1.3-1 1-3.3-.7-5.2-1.6-1.6-3.9-2.3-5.2-1zm-10.8-8.1c-.7 1.3 .3 2.9 2.3 3.9 1.6 1 3.6 .7 4.3-.7 .7-1.3-.3-2.9-2.3-3.9-2-.6-3.6-.3-4.3 .7zm32.4 35.6c-1.6 1.3-1 4.3 1.3 6.2 2.3 2.3 5.2 2.6 6.5 1 1.3-1.3 .7-4.3-1.3-6.2-2.2-2.3-5.2-2.6-6.5-1zm-11.4-14.7c-1.6 1-1.6 3.6 0 5.9 1.6 2.3 4.3 3.3 5.6 2.3 1.6-1.3 1.6-3.9 0-6.2-1.4-2.3-4-3.3-5.6-2z`})})};exports.Icons=n;
|