@juv/codego-react-ui 3.0.5 → 3.0.7
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.cjs +92 -78
- package/dist/index.d.cts +3 -3
- package/dist/index.d.ts +3 -3
- package/dist/index.global.js +92 -78
- package/dist/index.js +92 -78
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -5358,45 +5358,52 @@ function DataGrid({
|
|
|
5358
5358
|
onPageChange: setPage
|
|
5359
5359
|
}
|
|
5360
5360
|
),
|
|
5361
|
-
serverPagination &&
|
|
5362
|
-
|
|
5363
|
-
|
|
5364
|
-
|
|
5365
|
-
|
|
5366
|
-
|
|
5367
|
-
|
|
5368
|
-
|
|
5369
|
-
|
|
5370
|
-
|
|
5371
|
-
|
|
5372
|
-
|
|
5373
|
-
|
|
5374
|
-
|
|
5375
|
-
|
|
5376
|
-
|
|
5377
|
-
|
|
5378
|
-
|
|
5379
|
-
|
|
5380
|
-
|
|
5381
|
-
|
|
5382
|
-
|
|
5383
|
-
|
|
5384
|
-
|
|
5385
|
-
|
|
5386
|
-
|
|
5387
|
-
|
|
5388
|
-
|
|
5389
|
-
|
|
5390
|
-
|
|
5391
|
-
|
|
5392
|
-
|
|
5393
|
-
|
|
5394
|
-
|
|
5395
|
-
|
|
5396
|
-
|
|
5397
|
-
|
|
5398
|
-
|
|
5399
|
-
|
|
5361
|
+
serverPagination && (() => {
|
|
5362
|
+
const { pagination, currentPage: cp, goToPage } = serverPagination;
|
|
5363
|
+
const totalServerPages = Math.ceil(pagination.total / pagination.per_page);
|
|
5364
|
+
const pageLinks = Array.from({ length: totalServerPages }, (_, i) => i + 1);
|
|
5365
|
+
return /* @__PURE__ */ (0, import_jsx_runtime28.jsxs)("div", { className: "flex items-center justify-between gap-2 flex-wrap", children: [
|
|
5366
|
+
/* @__PURE__ */ (0, import_jsx_runtime28.jsxs)("span", { className: "text-xs text-muted-foreground", children: [
|
|
5367
|
+
pagination.total,
|
|
5368
|
+
" total rows \xB7 page ",
|
|
5369
|
+
cp,
|
|
5370
|
+
" of ",
|
|
5371
|
+
totalServerPages
|
|
5372
|
+
] }),
|
|
5373
|
+
/* @__PURE__ */ (0, import_jsx_runtime28.jsxs)("div", { className: "flex items-center gap-1", children: [
|
|
5374
|
+
/* @__PURE__ */ (0, import_jsx_runtime28.jsx)(
|
|
5375
|
+
"button",
|
|
5376
|
+
{
|
|
5377
|
+
onClick: () => goToPage(cp - 1),
|
|
5378
|
+
disabled: !pagination.prev_page_url,
|
|
5379
|
+
className: "flex h-8 w-8 items-center justify-center rounded-lg border border-border text-muted-foreground transition-colors hover:bg-muted hover:text-foreground disabled:opacity-40 disabled:pointer-events-none",
|
|
5380
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(import_lucide_react15.ChevronLeft, { className: "h-4 w-4" })
|
|
5381
|
+
}
|
|
5382
|
+
),
|
|
5383
|
+
pageLinks.map((p) => /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(
|
|
5384
|
+
"button",
|
|
5385
|
+
{
|
|
5386
|
+
onClick: () => goToPage(p),
|
|
5387
|
+
className: cn(
|
|
5388
|
+
"flex h-8 w-8 items-center justify-center rounded-lg border text-xs font-medium transition-colors",
|
|
5389
|
+
p === cp ? "border-primary bg-primary text-primary-foreground shadow-sm" : "border-border text-muted-foreground hover:bg-muted hover:text-foreground"
|
|
5390
|
+
),
|
|
5391
|
+
children: p
|
|
5392
|
+
},
|
|
5393
|
+
p
|
|
5394
|
+
)),
|
|
5395
|
+
/* @__PURE__ */ (0, import_jsx_runtime28.jsx)(
|
|
5396
|
+
"button",
|
|
5397
|
+
{
|
|
5398
|
+
onClick: () => goToPage(cp + 1),
|
|
5399
|
+
disabled: !pagination.next_page_url,
|
|
5400
|
+
className: "flex h-8 w-8 items-center justify-center rounded-lg border border-border text-muted-foreground transition-colors hover:bg-muted hover:text-foreground disabled:opacity-40 disabled:pointer-events-none",
|
|
5401
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(import_lucide_react15.ChevronRight, { className: "h-4 w-4" })
|
|
5402
|
+
}
|
|
5403
|
+
)
|
|
5404
|
+
] })
|
|
5405
|
+
] });
|
|
5406
|
+
})(),
|
|
5400
5407
|
defaultActions && viewItem && /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(DGViewModal, { item: viewItem, fields: viewFields, onClose: () => setViewItem(null) }),
|
|
5401
5408
|
defaultActions && editItem && /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(
|
|
5402
5409
|
DGEditModal,
|
|
@@ -10145,45 +10152,52 @@ function Table({
|
|
|
10145
10152
|
)
|
|
10146
10153
|
] })
|
|
10147
10154
|
] }),
|
|
10148
|
-
serverPagination &&
|
|
10149
|
-
|
|
10150
|
-
|
|
10151
|
-
|
|
10152
|
-
|
|
10153
|
-
|
|
10154
|
-
|
|
10155
|
-
|
|
10156
|
-
|
|
10157
|
-
|
|
10158
|
-
|
|
10159
|
-
|
|
10160
|
-
|
|
10161
|
-
|
|
10162
|
-
|
|
10163
|
-
|
|
10164
|
-
|
|
10165
|
-
|
|
10166
|
-
|
|
10167
|
-
|
|
10168
|
-
|
|
10169
|
-
|
|
10170
|
-
|
|
10171
|
-
|
|
10172
|
-
|
|
10173
|
-
|
|
10174
|
-
|
|
10175
|
-
|
|
10176
|
-
|
|
10177
|
-
|
|
10178
|
-
|
|
10179
|
-
|
|
10180
|
-
|
|
10181
|
-
|
|
10182
|
-
|
|
10183
|
-
|
|
10184
|
-
|
|
10185
|
-
|
|
10186
|
-
|
|
10155
|
+
serverPagination && (() => {
|
|
10156
|
+
const { pagination: pagination2, currentPage: cp, goToPage } = serverPagination;
|
|
10157
|
+
const totalServerPages = Math.ceil(pagination2.total / pagination2.per_page);
|
|
10158
|
+
const pageLinks = Array.from({ length: totalServerPages }, (_, i) => i + 1);
|
|
10159
|
+
return /* @__PURE__ */ (0, import_jsx_runtime55.jsxs)("div", { className: "flex items-center justify-between gap-2 flex-wrap", children: [
|
|
10160
|
+
/* @__PURE__ */ (0, import_jsx_runtime55.jsxs)("span", { className: "text-xs text-muted-foreground", children: [
|
|
10161
|
+
pagination2.total,
|
|
10162
|
+
" total rows \xB7 page ",
|
|
10163
|
+
cp,
|
|
10164
|
+
" of ",
|
|
10165
|
+
totalServerPages
|
|
10166
|
+
] }),
|
|
10167
|
+
/* @__PURE__ */ (0, import_jsx_runtime55.jsxs)("div", { className: "flex items-center gap-1", children: [
|
|
10168
|
+
/* @__PURE__ */ (0, import_jsx_runtime55.jsx)(
|
|
10169
|
+
"button",
|
|
10170
|
+
{
|
|
10171
|
+
onClick: () => goToPage(cp - 1),
|
|
10172
|
+
disabled: !pagination2.prev_page_url,
|
|
10173
|
+
className: "flex h-8 w-8 items-center justify-center rounded-lg border border-border text-muted-foreground transition-colors hover:bg-muted hover:text-foreground disabled:opacity-40 disabled:pointer-events-none",
|
|
10174
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime55.jsx)(import_lucide_react28.ChevronLeft, { className: "h-4 w-4" })
|
|
10175
|
+
}
|
|
10176
|
+
),
|
|
10177
|
+
pageLinks.map((p) => /* @__PURE__ */ (0, import_jsx_runtime55.jsx)(
|
|
10178
|
+
"button",
|
|
10179
|
+
{
|
|
10180
|
+
onClick: () => goToPage(p),
|
|
10181
|
+
className: cn(
|
|
10182
|
+
"flex h-8 w-8 items-center justify-center rounded-lg border text-xs font-medium transition-colors",
|
|
10183
|
+
p === cp ? "border-primary bg-primary text-primary-foreground shadow-sm" : "border-border text-muted-foreground hover:bg-muted hover:text-foreground"
|
|
10184
|
+
),
|
|
10185
|
+
children: p
|
|
10186
|
+
},
|
|
10187
|
+
p
|
|
10188
|
+
)),
|
|
10189
|
+
/* @__PURE__ */ (0, import_jsx_runtime55.jsx)(
|
|
10190
|
+
"button",
|
|
10191
|
+
{
|
|
10192
|
+
onClick: () => goToPage(cp + 1),
|
|
10193
|
+
disabled: !pagination2.next_page_url,
|
|
10194
|
+
className: "flex h-8 w-8 items-center justify-center rounded-lg border border-border text-muted-foreground transition-colors hover:bg-muted hover:text-foreground disabled:opacity-40 disabled:pointer-events-none",
|
|
10195
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime55.jsx)(import_lucide_react28.ChevronRight, { className: "h-4 w-4" })
|
|
10196
|
+
}
|
|
10197
|
+
)
|
|
10198
|
+
] })
|
|
10199
|
+
] });
|
|
10200
|
+
})()
|
|
10187
10201
|
] }),
|
|
10188
10202
|
defaultActions && viewItem && /* @__PURE__ */ (0, import_jsx_runtime55.jsx)(
|
|
10189
10203
|
ViewModal,
|
package/dist/index.d.cts
CHANGED
|
@@ -449,7 +449,7 @@ interface TableProps<T> {
|
|
|
449
449
|
/** When provided, appends an Actions column with View / Edit / Delete buttons */
|
|
450
450
|
defaultActions?: DefaultActionsConfig<T>;
|
|
451
451
|
/** Pass the serverPagination object from useServerTable to enable server-side pagination */
|
|
452
|
-
serverPagination?: ServerPaginationProp;
|
|
452
|
+
serverPagination?: ServerPaginationProp | null;
|
|
453
453
|
className?: string;
|
|
454
454
|
}
|
|
455
455
|
declare function Table<T extends Record<string, any>>({ data, columns, searchable, searchPlaceholder, pagination, itemsPerPage, selectable, onBulkDelete, idKey, defaultActions, serverPagination, className, }: TableProps<T>): react_jsx_runtime.JSX.Element;
|
|
@@ -468,7 +468,7 @@ interface UseServerDataGridReturn<T> {
|
|
|
468
468
|
columns: DataGridColumn<T>[];
|
|
469
469
|
currentPage: number;
|
|
470
470
|
pagination: ServerPagination | null;
|
|
471
|
-
serverPagination: ServerDataGridProp | null;
|
|
471
|
+
serverPagination: ServerDataGridProp | null | undefined;
|
|
472
472
|
loading: boolean;
|
|
473
473
|
error: string | null;
|
|
474
474
|
goToPage: (page: number) => void;
|
|
@@ -502,7 +502,7 @@ interface DataGridProps<T> {
|
|
|
502
502
|
/** Appends View / Edit / Delete action buttons per row */
|
|
503
503
|
defaultActions?: DefaultActionsConfig<T>;
|
|
504
504
|
/** Pass the serverPagination object from useServerDataGrid to enable server-driven pagination */
|
|
505
|
-
serverPagination?: ServerDataGridProp;
|
|
505
|
+
serverPagination?: ServerDataGridProp | null;
|
|
506
506
|
}
|
|
507
507
|
declare function DataGrid<T extends Record<string, unknown>>({ columns, data, rowKey, selectable, selected: controlledSelected, onSelectChange, pageSize, showPagination, showColumnToggle, loading, emptyMessage, className, onRowClick, defaultActions, serverPagination, }: DataGridProps<T>): react_jsx_runtime.JSX.Element;
|
|
508
508
|
|
package/dist/index.d.ts
CHANGED
|
@@ -449,7 +449,7 @@ interface TableProps<T> {
|
|
|
449
449
|
/** When provided, appends an Actions column with View / Edit / Delete buttons */
|
|
450
450
|
defaultActions?: DefaultActionsConfig<T>;
|
|
451
451
|
/** Pass the serverPagination object from useServerTable to enable server-side pagination */
|
|
452
|
-
serverPagination?: ServerPaginationProp;
|
|
452
|
+
serverPagination?: ServerPaginationProp | null;
|
|
453
453
|
className?: string;
|
|
454
454
|
}
|
|
455
455
|
declare function Table<T extends Record<string, any>>({ data, columns, searchable, searchPlaceholder, pagination, itemsPerPage, selectable, onBulkDelete, idKey, defaultActions, serverPagination, className, }: TableProps<T>): react_jsx_runtime.JSX.Element;
|
|
@@ -468,7 +468,7 @@ interface UseServerDataGridReturn<T> {
|
|
|
468
468
|
columns: DataGridColumn<T>[];
|
|
469
469
|
currentPage: number;
|
|
470
470
|
pagination: ServerPagination | null;
|
|
471
|
-
serverPagination: ServerDataGridProp | null;
|
|
471
|
+
serverPagination: ServerDataGridProp | null | undefined;
|
|
472
472
|
loading: boolean;
|
|
473
473
|
error: string | null;
|
|
474
474
|
goToPage: (page: number) => void;
|
|
@@ -502,7 +502,7 @@ interface DataGridProps<T> {
|
|
|
502
502
|
/** Appends View / Edit / Delete action buttons per row */
|
|
503
503
|
defaultActions?: DefaultActionsConfig<T>;
|
|
504
504
|
/** Pass the serverPagination object from useServerDataGrid to enable server-driven pagination */
|
|
505
|
-
serverPagination?: ServerDataGridProp;
|
|
505
|
+
serverPagination?: ServerDataGridProp | null;
|
|
506
506
|
}
|
|
507
507
|
declare function DataGrid<T extends Record<string, unknown>>({ columns, data, rowKey, selectable, selected: controlledSelected, onSelectChange, pageSize, showPagination, showColumnToggle, loading, emptyMessage, className, onRowClick, defaultActions, serverPagination, }: DataGridProps<T>): react_jsx_runtime.JSX.Element;
|
|
508
508
|
|
package/dist/index.global.js
CHANGED
|
@@ -61933,45 +61933,52 @@ ${n2.shaderPreludeCode.vertexSource}`, define: n2.shaderDefine }, defaultProject
|
|
|
61933
61933
|
onPageChange: setPage
|
|
61934
61934
|
}
|
|
61935
61935
|
),
|
|
61936
|
-
serverPagination &&
|
|
61937
|
-
|
|
61938
|
-
|
|
61939
|
-
|
|
61940
|
-
|
|
61941
|
-
|
|
61942
|
-
|
|
61943
|
-
|
|
61944
|
-
|
|
61945
|
-
|
|
61946
|
-
|
|
61947
|
-
|
|
61948
|
-
|
|
61949
|
-
|
|
61950
|
-
|
|
61951
|
-
|
|
61952
|
-
|
|
61953
|
-
|
|
61954
|
-
|
|
61955
|
-
|
|
61956
|
-
|
|
61957
|
-
|
|
61958
|
-
|
|
61959
|
-
|
|
61960
|
-
|
|
61961
|
-
|
|
61962
|
-
|
|
61963
|
-
|
|
61964
|
-
|
|
61965
|
-
|
|
61966
|
-
|
|
61967
|
-
|
|
61968
|
-
|
|
61969
|
-
|
|
61970
|
-
|
|
61971
|
-
|
|
61972
|
-
|
|
61973
|
-
|
|
61974
|
-
|
|
61936
|
+
serverPagination && (() => {
|
|
61937
|
+
const { pagination, currentPage: cp, goToPage } = serverPagination;
|
|
61938
|
+
const totalServerPages = Math.ceil(pagination.total / pagination.per_page);
|
|
61939
|
+
const pageLinks = Array.from({ length: totalServerPages }, (_, i) => i + 1);
|
|
61940
|
+
return /* @__PURE__ */ (0, import_jsx_runtime28.jsxs)("div", { className: "flex items-center justify-between gap-2 flex-wrap", children: [
|
|
61941
|
+
/* @__PURE__ */ (0, import_jsx_runtime28.jsxs)("span", { className: "text-xs text-muted-foreground", children: [
|
|
61942
|
+
pagination.total,
|
|
61943
|
+
" total rows \xB7 page ",
|
|
61944
|
+
cp,
|
|
61945
|
+
" of ",
|
|
61946
|
+
totalServerPages
|
|
61947
|
+
] }),
|
|
61948
|
+
/* @__PURE__ */ (0, import_jsx_runtime28.jsxs)("div", { className: "flex items-center gap-1", children: [
|
|
61949
|
+
/* @__PURE__ */ (0, import_jsx_runtime28.jsx)(
|
|
61950
|
+
"button",
|
|
61951
|
+
{
|
|
61952
|
+
onClick: () => goToPage(cp - 1),
|
|
61953
|
+
disabled: !pagination.prev_page_url,
|
|
61954
|
+
className: "flex h-8 w-8 items-center justify-center rounded-lg border border-border text-muted-foreground transition-colors hover:bg-muted hover:text-foreground disabled:opacity-40 disabled:pointer-events-none",
|
|
61955
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(ChevronLeft, { className: "h-4 w-4" })
|
|
61956
|
+
}
|
|
61957
|
+
),
|
|
61958
|
+
pageLinks.map((p) => /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(
|
|
61959
|
+
"button",
|
|
61960
|
+
{
|
|
61961
|
+
onClick: () => goToPage(p),
|
|
61962
|
+
className: cn(
|
|
61963
|
+
"flex h-8 w-8 items-center justify-center rounded-lg border text-xs font-medium transition-colors",
|
|
61964
|
+
p === cp ? "border-primary bg-primary text-primary-foreground shadow-sm" : "border-border text-muted-foreground hover:bg-muted hover:text-foreground"
|
|
61965
|
+
),
|
|
61966
|
+
children: p
|
|
61967
|
+
},
|
|
61968
|
+
p
|
|
61969
|
+
)),
|
|
61970
|
+
/* @__PURE__ */ (0, import_jsx_runtime28.jsx)(
|
|
61971
|
+
"button",
|
|
61972
|
+
{
|
|
61973
|
+
onClick: () => goToPage(cp + 1),
|
|
61974
|
+
disabled: !pagination.next_page_url,
|
|
61975
|
+
className: "flex h-8 w-8 items-center justify-center rounded-lg border border-border text-muted-foreground transition-colors hover:bg-muted hover:text-foreground disabled:opacity-40 disabled:pointer-events-none",
|
|
61976
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(ChevronRight, { className: "h-4 w-4" })
|
|
61977
|
+
}
|
|
61978
|
+
)
|
|
61979
|
+
] })
|
|
61980
|
+
] });
|
|
61981
|
+
})(),
|
|
61975
61982
|
defaultActions && viewItem && /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(DGViewModal, { item: viewItem, fields: viewFields, onClose: () => setViewItem(null) }),
|
|
61976
61983
|
defaultActions && editItem && /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(
|
|
61977
61984
|
DGEditModal,
|
|
@@ -67131,45 +67138,52 @@ ${n2.shaderPreludeCode.vertexSource}`, define: n2.shaderDefine }, defaultProject
|
|
|
67131
67138
|
)
|
|
67132
67139
|
] })
|
|
67133
67140
|
] }),
|
|
67134
|
-
serverPagination &&
|
|
67135
|
-
|
|
67136
|
-
|
|
67137
|
-
|
|
67138
|
-
|
|
67139
|
-
|
|
67140
|
-
|
|
67141
|
-
|
|
67142
|
-
|
|
67143
|
-
|
|
67144
|
-
|
|
67145
|
-
|
|
67146
|
-
|
|
67147
|
-
|
|
67148
|
-
|
|
67149
|
-
|
|
67150
|
-
|
|
67151
|
-
|
|
67152
|
-
|
|
67153
|
-
|
|
67154
|
-
|
|
67155
|
-
|
|
67156
|
-
|
|
67157
|
-
|
|
67158
|
-
|
|
67159
|
-
|
|
67160
|
-
|
|
67161
|
-
|
|
67162
|
-
|
|
67163
|
-
|
|
67164
|
-
|
|
67165
|
-
|
|
67166
|
-
|
|
67167
|
-
|
|
67168
|
-
|
|
67169
|
-
|
|
67170
|
-
|
|
67171
|
-
|
|
67172
|
-
|
|
67141
|
+
serverPagination && (() => {
|
|
67142
|
+
const { pagination: pagination2, currentPage: cp, goToPage } = serverPagination;
|
|
67143
|
+
const totalServerPages = Math.ceil(pagination2.total / pagination2.per_page);
|
|
67144
|
+
const pageLinks = Array.from({ length: totalServerPages }, (_, i) => i + 1);
|
|
67145
|
+
return /* @__PURE__ */ (0, import_jsx_runtime55.jsxs)("div", { className: "flex items-center justify-between gap-2 flex-wrap", children: [
|
|
67146
|
+
/* @__PURE__ */ (0, import_jsx_runtime55.jsxs)("span", { className: "text-xs text-muted-foreground", children: [
|
|
67147
|
+
pagination2.total,
|
|
67148
|
+
" total rows \xB7 page ",
|
|
67149
|
+
cp,
|
|
67150
|
+
" of ",
|
|
67151
|
+
totalServerPages
|
|
67152
|
+
] }),
|
|
67153
|
+
/* @__PURE__ */ (0, import_jsx_runtime55.jsxs)("div", { className: "flex items-center gap-1", children: [
|
|
67154
|
+
/* @__PURE__ */ (0, import_jsx_runtime55.jsx)(
|
|
67155
|
+
"button",
|
|
67156
|
+
{
|
|
67157
|
+
onClick: () => goToPage(cp - 1),
|
|
67158
|
+
disabled: !pagination2.prev_page_url,
|
|
67159
|
+
className: "flex h-8 w-8 items-center justify-center rounded-lg border border-border text-muted-foreground transition-colors hover:bg-muted hover:text-foreground disabled:opacity-40 disabled:pointer-events-none",
|
|
67160
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime55.jsx)(ChevronLeft, { className: "h-4 w-4" })
|
|
67161
|
+
}
|
|
67162
|
+
),
|
|
67163
|
+
pageLinks.map((p) => /* @__PURE__ */ (0, import_jsx_runtime55.jsx)(
|
|
67164
|
+
"button",
|
|
67165
|
+
{
|
|
67166
|
+
onClick: () => goToPage(p),
|
|
67167
|
+
className: cn(
|
|
67168
|
+
"flex h-8 w-8 items-center justify-center rounded-lg border text-xs font-medium transition-colors",
|
|
67169
|
+
p === cp ? "border-primary bg-primary text-primary-foreground shadow-sm" : "border-border text-muted-foreground hover:bg-muted hover:text-foreground"
|
|
67170
|
+
),
|
|
67171
|
+
children: p
|
|
67172
|
+
},
|
|
67173
|
+
p
|
|
67174
|
+
)),
|
|
67175
|
+
/* @__PURE__ */ (0, import_jsx_runtime55.jsx)(
|
|
67176
|
+
"button",
|
|
67177
|
+
{
|
|
67178
|
+
onClick: () => goToPage(cp + 1),
|
|
67179
|
+
disabled: !pagination2.next_page_url,
|
|
67180
|
+
className: "flex h-8 w-8 items-center justify-center rounded-lg border border-border text-muted-foreground transition-colors hover:bg-muted hover:text-foreground disabled:opacity-40 disabled:pointer-events-none",
|
|
67181
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime55.jsx)(ChevronRight, { className: "h-4 w-4" })
|
|
67182
|
+
}
|
|
67183
|
+
)
|
|
67184
|
+
] })
|
|
67185
|
+
] });
|
|
67186
|
+
})()
|
|
67173
67187
|
] }),
|
|
67174
67188
|
defaultActions && viewItem && /* @__PURE__ */ (0, import_jsx_runtime55.jsx)(
|
|
67175
67189
|
ViewModal,
|
package/dist/index.js
CHANGED
|
@@ -5244,45 +5244,52 @@ function DataGrid({
|
|
|
5244
5244
|
onPageChange: setPage
|
|
5245
5245
|
}
|
|
5246
5246
|
),
|
|
5247
|
-
serverPagination &&
|
|
5248
|
-
|
|
5249
|
-
|
|
5250
|
-
|
|
5251
|
-
|
|
5252
|
-
|
|
5253
|
-
|
|
5254
|
-
|
|
5255
|
-
|
|
5256
|
-
|
|
5257
|
-
|
|
5258
|
-
|
|
5259
|
-
|
|
5260
|
-
|
|
5261
|
-
|
|
5262
|
-
|
|
5263
|
-
|
|
5264
|
-
|
|
5265
|
-
|
|
5266
|
-
|
|
5267
|
-
|
|
5268
|
-
|
|
5269
|
-
|
|
5270
|
-
|
|
5271
|
-
|
|
5272
|
-
|
|
5273
|
-
|
|
5274
|
-
|
|
5275
|
-
|
|
5276
|
-
|
|
5277
|
-
|
|
5278
|
-
|
|
5279
|
-
|
|
5280
|
-
|
|
5281
|
-
|
|
5282
|
-
|
|
5283
|
-
|
|
5284
|
-
|
|
5285
|
-
|
|
5247
|
+
serverPagination && (() => {
|
|
5248
|
+
const { pagination, currentPage: cp, goToPage } = serverPagination;
|
|
5249
|
+
const totalServerPages = Math.ceil(pagination.total / pagination.per_page);
|
|
5250
|
+
const pageLinks = Array.from({ length: totalServerPages }, (_, i) => i + 1);
|
|
5251
|
+
return /* @__PURE__ */ jsxs27("div", { className: "flex items-center justify-between gap-2 flex-wrap", children: [
|
|
5252
|
+
/* @__PURE__ */ jsxs27("span", { className: "text-xs text-muted-foreground", children: [
|
|
5253
|
+
pagination.total,
|
|
5254
|
+
" total rows \xB7 page ",
|
|
5255
|
+
cp,
|
|
5256
|
+
" of ",
|
|
5257
|
+
totalServerPages
|
|
5258
|
+
] }),
|
|
5259
|
+
/* @__PURE__ */ jsxs27("div", { className: "flex items-center gap-1", children: [
|
|
5260
|
+
/* @__PURE__ */ jsx28(
|
|
5261
|
+
"button",
|
|
5262
|
+
{
|
|
5263
|
+
onClick: () => goToPage(cp - 1),
|
|
5264
|
+
disabled: !pagination.prev_page_url,
|
|
5265
|
+
className: "flex h-8 w-8 items-center justify-center rounded-lg border border-border text-muted-foreground transition-colors hover:bg-muted hover:text-foreground disabled:opacity-40 disabled:pointer-events-none",
|
|
5266
|
+
children: /* @__PURE__ */ jsx28(ChevronLeft5, { className: "h-4 w-4" })
|
|
5267
|
+
}
|
|
5268
|
+
),
|
|
5269
|
+
pageLinks.map((p) => /* @__PURE__ */ jsx28(
|
|
5270
|
+
"button",
|
|
5271
|
+
{
|
|
5272
|
+
onClick: () => goToPage(p),
|
|
5273
|
+
className: cn(
|
|
5274
|
+
"flex h-8 w-8 items-center justify-center rounded-lg border text-xs font-medium transition-colors",
|
|
5275
|
+
p === cp ? "border-primary bg-primary text-primary-foreground shadow-sm" : "border-border text-muted-foreground hover:bg-muted hover:text-foreground"
|
|
5276
|
+
),
|
|
5277
|
+
children: p
|
|
5278
|
+
},
|
|
5279
|
+
p
|
|
5280
|
+
)),
|
|
5281
|
+
/* @__PURE__ */ jsx28(
|
|
5282
|
+
"button",
|
|
5283
|
+
{
|
|
5284
|
+
onClick: () => goToPage(cp + 1),
|
|
5285
|
+
disabled: !pagination.next_page_url,
|
|
5286
|
+
className: "flex h-8 w-8 items-center justify-center rounded-lg border border-border text-muted-foreground transition-colors hover:bg-muted hover:text-foreground disabled:opacity-40 disabled:pointer-events-none",
|
|
5287
|
+
children: /* @__PURE__ */ jsx28(ChevronRight7, { className: "h-4 w-4" })
|
|
5288
|
+
}
|
|
5289
|
+
)
|
|
5290
|
+
] })
|
|
5291
|
+
] });
|
|
5292
|
+
})(),
|
|
5286
5293
|
defaultActions && viewItem && /* @__PURE__ */ jsx28(DGViewModal, { item: viewItem, fields: viewFields, onClose: () => setViewItem(null) }),
|
|
5287
5294
|
defaultActions && editItem && /* @__PURE__ */ jsx28(
|
|
5288
5295
|
DGEditModal,
|
|
@@ -10031,45 +10038,52 @@ function Table({
|
|
|
10031
10038
|
)
|
|
10032
10039
|
] })
|
|
10033
10040
|
] }),
|
|
10034
|
-
serverPagination &&
|
|
10035
|
-
|
|
10036
|
-
|
|
10037
|
-
|
|
10038
|
-
|
|
10039
|
-
|
|
10040
|
-
|
|
10041
|
-
|
|
10042
|
-
|
|
10043
|
-
|
|
10044
|
-
|
|
10045
|
-
|
|
10046
|
-
|
|
10047
|
-
|
|
10048
|
-
|
|
10049
|
-
|
|
10050
|
-
|
|
10051
|
-
|
|
10052
|
-
|
|
10053
|
-
|
|
10054
|
-
|
|
10055
|
-
|
|
10056
|
-
|
|
10057
|
-
|
|
10058
|
-
|
|
10059
|
-
|
|
10060
|
-
|
|
10061
|
-
|
|
10062
|
-
|
|
10063
|
-
|
|
10064
|
-
|
|
10065
|
-
|
|
10066
|
-
|
|
10067
|
-
|
|
10068
|
-
|
|
10069
|
-
|
|
10070
|
-
|
|
10071
|
-
|
|
10072
|
-
|
|
10041
|
+
serverPagination && (() => {
|
|
10042
|
+
const { pagination: pagination2, currentPage: cp, goToPage } = serverPagination;
|
|
10043
|
+
const totalServerPages = Math.ceil(pagination2.total / pagination2.per_page);
|
|
10044
|
+
const pageLinks = Array.from({ length: totalServerPages }, (_, i) => i + 1);
|
|
10045
|
+
return /* @__PURE__ */ jsxs48("div", { className: "flex items-center justify-between gap-2 flex-wrap", children: [
|
|
10046
|
+
/* @__PURE__ */ jsxs48("span", { className: "text-xs text-muted-foreground", children: [
|
|
10047
|
+
pagination2.total,
|
|
10048
|
+
" total rows \xB7 page ",
|
|
10049
|
+
cp,
|
|
10050
|
+
" of ",
|
|
10051
|
+
totalServerPages
|
|
10052
|
+
] }),
|
|
10053
|
+
/* @__PURE__ */ jsxs48("div", { className: "flex items-center gap-1", children: [
|
|
10054
|
+
/* @__PURE__ */ jsx55(
|
|
10055
|
+
"button",
|
|
10056
|
+
{
|
|
10057
|
+
onClick: () => goToPage(cp - 1),
|
|
10058
|
+
disabled: !pagination2.prev_page_url,
|
|
10059
|
+
className: "flex h-8 w-8 items-center justify-center rounded-lg border border-border text-muted-foreground transition-colors hover:bg-muted hover:text-foreground disabled:opacity-40 disabled:pointer-events-none",
|
|
10060
|
+
children: /* @__PURE__ */ jsx55(ChevronLeft6, { className: "h-4 w-4" })
|
|
10061
|
+
}
|
|
10062
|
+
),
|
|
10063
|
+
pageLinks.map((p) => /* @__PURE__ */ jsx55(
|
|
10064
|
+
"button",
|
|
10065
|
+
{
|
|
10066
|
+
onClick: () => goToPage(p),
|
|
10067
|
+
className: cn(
|
|
10068
|
+
"flex h-8 w-8 items-center justify-center rounded-lg border text-xs font-medium transition-colors",
|
|
10069
|
+
p === cp ? "border-primary bg-primary text-primary-foreground shadow-sm" : "border-border text-muted-foreground hover:bg-muted hover:text-foreground"
|
|
10070
|
+
),
|
|
10071
|
+
children: p
|
|
10072
|
+
},
|
|
10073
|
+
p
|
|
10074
|
+
)),
|
|
10075
|
+
/* @__PURE__ */ jsx55(
|
|
10076
|
+
"button",
|
|
10077
|
+
{
|
|
10078
|
+
onClick: () => goToPage(cp + 1),
|
|
10079
|
+
disabled: !pagination2.next_page_url,
|
|
10080
|
+
className: "flex h-8 w-8 items-center justify-center rounded-lg border border-border text-muted-foreground transition-colors hover:bg-muted hover:text-foreground disabled:opacity-40 disabled:pointer-events-none",
|
|
10081
|
+
children: /* @__PURE__ */ jsx55(ChevronRight9, { className: "h-4 w-4" })
|
|
10082
|
+
}
|
|
10083
|
+
)
|
|
10084
|
+
] })
|
|
10085
|
+
] });
|
|
10086
|
+
})()
|
|
10073
10087
|
] }),
|
|
10074
10088
|
defaultActions && viewItem && /* @__PURE__ */ jsx55(
|
|
10075
10089
|
ViewModal,
|