@deepnoid/ui 0.1.138 → 0.1.140
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/.turbo/turbo-build.log +158 -158
- package/dist/{chunk-VRSRT4DM.mjs → chunk-QMQL3Z6Z.mjs} +53 -45
- package/dist/components/table/index.js +53 -45
- package/dist/components/table/index.mjs +3 -3
- package/dist/components/table/table-body.js +53 -45
- package/dist/components/table/table-body.mjs +1 -1
- package/dist/components/table/table-head.js +53 -45
- package/dist/components/table/table-head.mjs +1 -1
- package/dist/components/table/table.d.mts +3 -0
- package/dist/components/table/table.d.ts +3 -0
- package/dist/components/table/table.js +53 -45
- package/dist/components/table/table.mjs +1 -1
- package/dist/index.js +53 -45
- package/dist/index.mjs +22 -22
- package/package.json +1 -1
|
@@ -112,7 +112,10 @@ var Table = forwardRef((originalProps, ref) => {
|
|
|
112
112
|
size,
|
|
113
113
|
checkedRows,
|
|
114
114
|
onCheckedRowsChange,
|
|
115
|
-
onRowClick
|
|
115
|
+
onRowClick,
|
|
116
|
+
showFirstLastButtons,
|
|
117
|
+
showPageNumber,
|
|
118
|
+
showPageLabel
|
|
116
119
|
} = { ...props, ...variantProps };
|
|
117
120
|
const { page = 1, perPage = 15 } = pagination || {};
|
|
118
121
|
const showPagination = pagination && totalData > 0;
|
|
@@ -169,50 +172,52 @@ var Table = forwardRef((originalProps, ref) => {
|
|
|
169
172
|
[variantProps, onRowClick]
|
|
170
173
|
);
|
|
171
174
|
return /* @__PURE__ */ jsxs2("div", { "data-table": "base", className: slots.base({ class: classNames == null ? void 0 : classNames.base }), children: [
|
|
172
|
-
/* @__PURE__ */
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
175
|
+
/* @__PURE__ */ jsxs2(scrollArea_default, { direction: "x", size: size === "xl" ? "lg" : size, children: [
|
|
176
|
+
/* @__PURE__ */ jsxs2(
|
|
177
|
+
"table",
|
|
178
|
+
{
|
|
179
|
+
className: slots.table({ class: classNames == null ? void 0 : classNames.table }),
|
|
180
|
+
style: {
|
|
181
|
+
tableLayout: "fixed",
|
|
182
|
+
width: "100%",
|
|
183
|
+
minWidth: `${tableMinWidth}px`
|
|
184
|
+
},
|
|
185
|
+
children: [
|
|
186
|
+
/* @__PURE__ */ jsx2(
|
|
187
|
+
table_head_default,
|
|
188
|
+
{
|
|
189
|
+
columns,
|
|
190
|
+
size,
|
|
191
|
+
color,
|
|
192
|
+
rowCheckbox,
|
|
193
|
+
hasCheckedRows: rows.length > 0 && rows.every((row) => checkedRowIds.has(row.id)),
|
|
194
|
+
onCheckAll: handleAllRowCheck,
|
|
195
|
+
classNames,
|
|
196
|
+
slots
|
|
197
|
+
}
|
|
198
|
+
),
|
|
199
|
+
/* @__PURE__ */ jsx2(
|
|
200
|
+
table_body_default,
|
|
201
|
+
{
|
|
202
|
+
slots,
|
|
203
|
+
rows,
|
|
204
|
+
columns,
|
|
205
|
+
size,
|
|
206
|
+
color,
|
|
207
|
+
rowCheckbox,
|
|
208
|
+
checkedRows: checkedRowIds,
|
|
209
|
+
onCheckRow: handleRowCheck,
|
|
210
|
+
onRowClick: handleRowClick,
|
|
211
|
+
isLoading,
|
|
212
|
+
emptyContent,
|
|
213
|
+
classNames
|
|
214
|
+
}
|
|
215
|
+
)
|
|
216
|
+
]
|
|
217
|
+
}
|
|
218
|
+
),
|
|
219
|
+
isLoading && /* @__PURE__ */ jsx2("div", { className: slots.overlay({ class: classNames == null ? void 0 : classNames.overlay }) })
|
|
220
|
+
] }),
|
|
216
221
|
showPagination && /* @__PURE__ */ jsx2("div", { className: "flex justify-center", children: /* @__PURE__ */ jsx2(
|
|
217
222
|
pagination_default,
|
|
218
223
|
{
|
|
@@ -222,6 +227,9 @@ var Table = forwardRef((originalProps, ref) => {
|
|
|
222
227
|
currentPage: page,
|
|
223
228
|
totalPage: Math.ceil(totalData / perPage),
|
|
224
229
|
groupSize: 10,
|
|
230
|
+
showFirstLastButtons,
|
|
231
|
+
showPageLabel,
|
|
232
|
+
showPageNumber,
|
|
225
233
|
handleChangePage: (newPage) => onPageChange == null ? void 0 : onPageChange({ page: newPage, perPage })
|
|
226
234
|
}
|
|
227
235
|
) })
|
|
@@ -6248,7 +6248,10 @@ var Table = (0, import_react5.forwardRef)((originalProps, ref) => {
|
|
|
6248
6248
|
size,
|
|
6249
6249
|
checkedRows,
|
|
6250
6250
|
onCheckedRowsChange,
|
|
6251
|
-
onRowClick
|
|
6251
|
+
onRowClick,
|
|
6252
|
+
showFirstLastButtons,
|
|
6253
|
+
showPageNumber,
|
|
6254
|
+
showPageLabel
|
|
6252
6255
|
} = { ...props, ...variantProps };
|
|
6253
6256
|
const { page = 1, perPage = 15 } = pagination || {};
|
|
6254
6257
|
const showPagination = pagination && totalData > 0;
|
|
@@ -6305,50 +6308,52 @@ var Table = (0, import_react5.forwardRef)((originalProps, ref) => {
|
|
|
6305
6308
|
[variantProps, onRowClick]
|
|
6306
6309
|
);
|
|
6307
6310
|
return /* @__PURE__ */ (0, import_jsx_runtime9.jsxs)("div", { "data-table": "base", className: slots.base({ class: classNames == null ? void 0 : classNames.base }), children: [
|
|
6308
|
-
/* @__PURE__ */ (0, import_jsx_runtime9.
|
|
6309
|
-
|
|
6310
|
-
|
|
6311
|
-
|
|
6312
|
-
|
|
6313
|
-
|
|
6314
|
-
|
|
6315
|
-
|
|
6316
|
-
|
|
6317
|
-
|
|
6318
|
-
|
|
6319
|
-
|
|
6320
|
-
|
|
6321
|
-
|
|
6322
|
-
|
|
6323
|
-
|
|
6324
|
-
|
|
6325
|
-
|
|
6326
|
-
|
|
6327
|
-
|
|
6328
|
-
|
|
6329
|
-
|
|
6330
|
-
|
|
6331
|
-
|
|
6332
|
-
|
|
6333
|
-
|
|
6334
|
-
|
|
6335
|
-
|
|
6336
|
-
|
|
6337
|
-
|
|
6338
|
-
|
|
6339
|
-
|
|
6340
|
-
|
|
6341
|
-
|
|
6342
|
-
|
|
6343
|
-
|
|
6344
|
-
|
|
6345
|
-
|
|
6346
|
-
|
|
6347
|
-
|
|
6348
|
-
|
|
6349
|
-
|
|
6350
|
-
|
|
6351
|
-
|
|
6311
|
+
/* @__PURE__ */ (0, import_jsx_runtime9.jsxs)(scrollArea_default, { direction: "x", size: size === "xl" ? "lg" : size, children: [
|
|
6312
|
+
/* @__PURE__ */ (0, import_jsx_runtime9.jsxs)(
|
|
6313
|
+
"table",
|
|
6314
|
+
{
|
|
6315
|
+
className: slots.table({ class: classNames == null ? void 0 : classNames.table }),
|
|
6316
|
+
style: {
|
|
6317
|
+
tableLayout: "fixed",
|
|
6318
|
+
width: "100%",
|
|
6319
|
+
minWidth: `${tableMinWidth}px`
|
|
6320
|
+
},
|
|
6321
|
+
children: [
|
|
6322
|
+
/* @__PURE__ */ (0, import_jsx_runtime9.jsx)(
|
|
6323
|
+
table_head_default,
|
|
6324
|
+
{
|
|
6325
|
+
columns,
|
|
6326
|
+
size,
|
|
6327
|
+
color,
|
|
6328
|
+
rowCheckbox,
|
|
6329
|
+
hasCheckedRows: rows.length > 0 && rows.every((row) => checkedRowIds.has(row.id)),
|
|
6330
|
+
onCheckAll: handleAllRowCheck,
|
|
6331
|
+
classNames,
|
|
6332
|
+
slots
|
|
6333
|
+
}
|
|
6334
|
+
),
|
|
6335
|
+
/* @__PURE__ */ (0, import_jsx_runtime9.jsx)(
|
|
6336
|
+
table_body_default,
|
|
6337
|
+
{
|
|
6338
|
+
slots,
|
|
6339
|
+
rows,
|
|
6340
|
+
columns,
|
|
6341
|
+
size,
|
|
6342
|
+
color,
|
|
6343
|
+
rowCheckbox,
|
|
6344
|
+
checkedRows: checkedRowIds,
|
|
6345
|
+
onCheckRow: handleRowCheck,
|
|
6346
|
+
onRowClick: handleRowClick,
|
|
6347
|
+
isLoading,
|
|
6348
|
+
emptyContent,
|
|
6349
|
+
classNames
|
|
6350
|
+
}
|
|
6351
|
+
)
|
|
6352
|
+
]
|
|
6353
|
+
}
|
|
6354
|
+
),
|
|
6355
|
+
isLoading && /* @__PURE__ */ (0, import_jsx_runtime9.jsx)("div", { className: slots.overlay({ class: classNames == null ? void 0 : classNames.overlay }) })
|
|
6356
|
+
] }),
|
|
6352
6357
|
showPagination && /* @__PURE__ */ (0, import_jsx_runtime9.jsx)("div", { className: "flex justify-center", children: /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(
|
|
6353
6358
|
pagination_default,
|
|
6354
6359
|
{
|
|
@@ -6358,6 +6363,9 @@ var Table = (0, import_react5.forwardRef)((originalProps, ref) => {
|
|
|
6358
6363
|
currentPage: page,
|
|
6359
6364
|
totalPage: Math.ceil(totalData / perPage),
|
|
6360
6365
|
groupSize: 10,
|
|
6366
|
+
showFirstLastButtons,
|
|
6367
|
+
showPageLabel,
|
|
6368
|
+
showPageNumber,
|
|
6361
6369
|
handleChangePage: (newPage) => onPageChange == null ? void 0 : onPageChange({ page: newPage, perPage })
|
|
6362
6370
|
}
|
|
6363
6371
|
) })
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import "../../chunk-DX3KXNP6.mjs";
|
|
3
|
-
import {
|
|
4
|
-
table_default
|
|
5
|
-
} from "../../chunk-VRSRT4DM.mjs";
|
|
6
3
|
import {
|
|
7
4
|
definition_table_default
|
|
8
5
|
} from "../../chunk-T3BUL253.mjs";
|
|
6
|
+
import {
|
|
7
|
+
table_default
|
|
8
|
+
} from "../../chunk-QMQL3Z6Z.mjs";
|
|
9
9
|
import "../../chunk-7B7LRG5J.mjs";
|
|
10
10
|
import "../../chunk-4JOD47VZ.mjs";
|
|
11
11
|
import "../../chunk-F3HENRVM.mjs";
|
|
@@ -6179,7 +6179,10 @@ var Table = (0, import_react5.forwardRef)((originalProps, ref) => {
|
|
|
6179
6179
|
size,
|
|
6180
6180
|
checkedRows,
|
|
6181
6181
|
onCheckedRowsChange,
|
|
6182
|
-
onRowClick
|
|
6182
|
+
onRowClick,
|
|
6183
|
+
showFirstLastButtons,
|
|
6184
|
+
showPageNumber,
|
|
6185
|
+
showPageLabel
|
|
6183
6186
|
} = { ...props, ...variantProps };
|
|
6184
6187
|
const { page = 1, perPage = 15 } = pagination || {};
|
|
6185
6188
|
const showPagination = pagination && totalData > 0;
|
|
@@ -6236,50 +6239,52 @@ var Table = (0, import_react5.forwardRef)((originalProps, ref) => {
|
|
|
6236
6239
|
[variantProps, onRowClick]
|
|
6237
6240
|
);
|
|
6238
6241
|
return /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)("div", { "data-table": "base", className: slots.base({ class: classNames == null ? void 0 : classNames.base }), children: [
|
|
6239
|
-
/* @__PURE__ */ (0, import_jsx_runtime8.
|
|
6240
|
-
|
|
6241
|
-
|
|
6242
|
-
|
|
6243
|
-
|
|
6244
|
-
|
|
6245
|
-
|
|
6246
|
-
|
|
6247
|
-
|
|
6248
|
-
|
|
6249
|
-
|
|
6250
|
-
|
|
6251
|
-
|
|
6252
|
-
|
|
6253
|
-
|
|
6254
|
-
|
|
6255
|
-
|
|
6256
|
-
|
|
6257
|
-
|
|
6258
|
-
|
|
6259
|
-
|
|
6260
|
-
|
|
6261
|
-
|
|
6262
|
-
|
|
6263
|
-
|
|
6264
|
-
|
|
6265
|
-
|
|
6266
|
-
|
|
6267
|
-
|
|
6268
|
-
|
|
6269
|
-
|
|
6270
|
-
|
|
6271
|
-
|
|
6272
|
-
|
|
6273
|
-
|
|
6274
|
-
|
|
6275
|
-
|
|
6276
|
-
|
|
6277
|
-
|
|
6278
|
-
|
|
6279
|
-
|
|
6280
|
-
|
|
6281
|
-
|
|
6282
|
-
|
|
6242
|
+
/* @__PURE__ */ (0, import_jsx_runtime8.jsxs)(scrollArea_default, { direction: "x", size: size === "xl" ? "lg" : size, children: [
|
|
6243
|
+
/* @__PURE__ */ (0, import_jsx_runtime8.jsxs)(
|
|
6244
|
+
"table",
|
|
6245
|
+
{
|
|
6246
|
+
className: slots.table({ class: classNames == null ? void 0 : classNames.table }),
|
|
6247
|
+
style: {
|
|
6248
|
+
tableLayout: "fixed",
|
|
6249
|
+
width: "100%",
|
|
6250
|
+
minWidth: `${tableMinWidth}px`
|
|
6251
|
+
},
|
|
6252
|
+
children: [
|
|
6253
|
+
/* @__PURE__ */ (0, import_jsx_runtime8.jsx)(
|
|
6254
|
+
table_head_default,
|
|
6255
|
+
{
|
|
6256
|
+
columns,
|
|
6257
|
+
size,
|
|
6258
|
+
color,
|
|
6259
|
+
rowCheckbox,
|
|
6260
|
+
hasCheckedRows: rows.length > 0 && rows.every((row) => checkedRowIds.has(row.id)),
|
|
6261
|
+
onCheckAll: handleAllRowCheck,
|
|
6262
|
+
classNames,
|
|
6263
|
+
slots
|
|
6264
|
+
}
|
|
6265
|
+
),
|
|
6266
|
+
/* @__PURE__ */ (0, import_jsx_runtime8.jsx)(
|
|
6267
|
+
table_body_default,
|
|
6268
|
+
{
|
|
6269
|
+
slots,
|
|
6270
|
+
rows,
|
|
6271
|
+
columns,
|
|
6272
|
+
size,
|
|
6273
|
+
color,
|
|
6274
|
+
rowCheckbox,
|
|
6275
|
+
checkedRows: checkedRowIds,
|
|
6276
|
+
onCheckRow: handleRowCheck,
|
|
6277
|
+
onRowClick: handleRowClick,
|
|
6278
|
+
isLoading,
|
|
6279
|
+
emptyContent,
|
|
6280
|
+
classNames
|
|
6281
|
+
}
|
|
6282
|
+
)
|
|
6283
|
+
]
|
|
6284
|
+
}
|
|
6285
|
+
),
|
|
6286
|
+
isLoading && /* @__PURE__ */ (0, import_jsx_runtime8.jsx)("div", { className: slots.overlay({ class: classNames == null ? void 0 : classNames.overlay }) })
|
|
6287
|
+
] }),
|
|
6283
6288
|
showPagination && /* @__PURE__ */ (0, import_jsx_runtime8.jsx)("div", { className: "flex justify-center", children: /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(
|
|
6284
6289
|
pagination_default,
|
|
6285
6290
|
{
|
|
@@ -6289,6 +6294,9 @@ var Table = (0, import_react5.forwardRef)((originalProps, ref) => {
|
|
|
6289
6294
|
currentPage: page,
|
|
6290
6295
|
totalPage: Math.ceil(totalData / perPage),
|
|
6291
6296
|
groupSize: 10,
|
|
6297
|
+
showFirstLastButtons,
|
|
6298
|
+
showPageLabel,
|
|
6299
|
+
showPageNumber,
|
|
6292
6300
|
handleChangePage: (newPage) => onPageChange == null ? void 0 : onPageChange({ page: newPage, perPage })
|
|
6293
6301
|
}
|
|
6294
6302
|
) })
|
|
@@ -6200,7 +6200,10 @@ var Table = (0, import_react5.forwardRef)((originalProps, ref) => {
|
|
|
6200
6200
|
size,
|
|
6201
6201
|
checkedRows,
|
|
6202
6202
|
onCheckedRowsChange,
|
|
6203
|
-
onRowClick
|
|
6203
|
+
onRowClick,
|
|
6204
|
+
showFirstLastButtons,
|
|
6205
|
+
showPageNumber,
|
|
6206
|
+
showPageLabel
|
|
6204
6207
|
} = { ...props, ...variantProps };
|
|
6205
6208
|
const { page = 1, perPage = 15 } = pagination || {};
|
|
6206
6209
|
const showPagination = pagination && totalData > 0;
|
|
@@ -6257,50 +6260,52 @@ var Table = (0, import_react5.forwardRef)((originalProps, ref) => {
|
|
|
6257
6260
|
[variantProps, onRowClick]
|
|
6258
6261
|
);
|
|
6259
6262
|
return /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)("div", { "data-table": "base", className: slots.base({ class: classNames == null ? void 0 : classNames.base }), children: [
|
|
6260
|
-
/* @__PURE__ */ (0, import_jsx_runtime8.
|
|
6261
|
-
|
|
6262
|
-
|
|
6263
|
-
|
|
6264
|
-
|
|
6265
|
-
|
|
6266
|
-
|
|
6267
|
-
|
|
6268
|
-
|
|
6269
|
-
|
|
6270
|
-
|
|
6271
|
-
|
|
6272
|
-
|
|
6273
|
-
|
|
6274
|
-
|
|
6275
|
-
|
|
6276
|
-
|
|
6277
|
-
|
|
6278
|
-
|
|
6279
|
-
|
|
6280
|
-
|
|
6281
|
-
|
|
6282
|
-
|
|
6283
|
-
|
|
6284
|
-
|
|
6285
|
-
|
|
6286
|
-
|
|
6287
|
-
|
|
6288
|
-
|
|
6289
|
-
|
|
6290
|
-
|
|
6291
|
-
|
|
6292
|
-
|
|
6293
|
-
|
|
6294
|
-
|
|
6295
|
-
|
|
6296
|
-
|
|
6297
|
-
|
|
6298
|
-
|
|
6299
|
-
|
|
6300
|
-
|
|
6301
|
-
|
|
6302
|
-
|
|
6303
|
-
|
|
6263
|
+
/* @__PURE__ */ (0, import_jsx_runtime8.jsxs)(scrollArea_default, { direction: "x", size: size === "xl" ? "lg" : size, children: [
|
|
6264
|
+
/* @__PURE__ */ (0, import_jsx_runtime8.jsxs)(
|
|
6265
|
+
"table",
|
|
6266
|
+
{
|
|
6267
|
+
className: slots.table({ class: classNames == null ? void 0 : classNames.table }),
|
|
6268
|
+
style: {
|
|
6269
|
+
tableLayout: "fixed",
|
|
6270
|
+
width: "100%",
|
|
6271
|
+
minWidth: `${tableMinWidth}px`
|
|
6272
|
+
},
|
|
6273
|
+
children: [
|
|
6274
|
+
/* @__PURE__ */ (0, import_jsx_runtime8.jsx)(
|
|
6275
|
+
table_head_default,
|
|
6276
|
+
{
|
|
6277
|
+
columns,
|
|
6278
|
+
size,
|
|
6279
|
+
color,
|
|
6280
|
+
rowCheckbox,
|
|
6281
|
+
hasCheckedRows: rows.length > 0 && rows.every((row) => checkedRowIds.has(row.id)),
|
|
6282
|
+
onCheckAll: handleAllRowCheck,
|
|
6283
|
+
classNames,
|
|
6284
|
+
slots
|
|
6285
|
+
}
|
|
6286
|
+
),
|
|
6287
|
+
/* @__PURE__ */ (0, import_jsx_runtime8.jsx)(
|
|
6288
|
+
table_body_default,
|
|
6289
|
+
{
|
|
6290
|
+
slots,
|
|
6291
|
+
rows,
|
|
6292
|
+
columns,
|
|
6293
|
+
size,
|
|
6294
|
+
color,
|
|
6295
|
+
rowCheckbox,
|
|
6296
|
+
checkedRows: checkedRowIds,
|
|
6297
|
+
onCheckRow: handleRowCheck,
|
|
6298
|
+
onRowClick: handleRowClick,
|
|
6299
|
+
isLoading,
|
|
6300
|
+
emptyContent,
|
|
6301
|
+
classNames
|
|
6302
|
+
}
|
|
6303
|
+
)
|
|
6304
|
+
]
|
|
6305
|
+
}
|
|
6306
|
+
),
|
|
6307
|
+
isLoading && /* @__PURE__ */ (0, import_jsx_runtime8.jsx)("div", { className: slots.overlay({ class: classNames == null ? void 0 : classNames.overlay }) })
|
|
6308
|
+
] }),
|
|
6304
6309
|
showPagination && /* @__PURE__ */ (0, import_jsx_runtime8.jsx)("div", { className: "flex justify-center", children: /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(
|
|
6305
6310
|
pagination_default,
|
|
6306
6311
|
{
|
|
@@ -6310,6 +6315,9 @@ var Table = (0, import_react5.forwardRef)((originalProps, ref) => {
|
|
|
6310
6315
|
currentPage: page,
|
|
6311
6316
|
totalPage: Math.ceil(totalData / perPage),
|
|
6312
6317
|
groupSize: 10,
|
|
6318
|
+
showFirstLastButtons,
|
|
6319
|
+
showPageLabel,
|
|
6320
|
+
showPageNumber,
|
|
6313
6321
|
handleChangePage: (newPage) => onPageChange == null ? void 0 : onPageChange({ page: newPage, perPage })
|
|
6314
6322
|
}
|
|
6315
6323
|
) })
|
|
@@ -17,6 +17,9 @@ interface TableBaseProps extends Omit<ComponentPropsWithRef<"table">, "ref" | "c
|
|
|
17
17
|
page: number;
|
|
18
18
|
perPage: number;
|
|
19
19
|
}) => void;
|
|
20
|
+
showPageNumber?: boolean;
|
|
21
|
+
showFirstLastButtons?: boolean;
|
|
22
|
+
showPageLabel?: boolean;
|
|
20
23
|
emptyContent?: ReactNode;
|
|
21
24
|
isLoading?: boolean;
|
|
22
25
|
checkedRows?: TableRow[];
|
|
@@ -17,6 +17,9 @@ interface TableBaseProps extends Omit<ComponentPropsWithRef<"table">, "ref" | "c
|
|
|
17
17
|
page: number;
|
|
18
18
|
perPage: number;
|
|
19
19
|
}) => void;
|
|
20
|
+
showPageNumber?: boolean;
|
|
21
|
+
showFirstLastButtons?: boolean;
|
|
22
|
+
showPageLabel?: boolean;
|
|
20
23
|
emptyContent?: ReactNode;
|
|
21
24
|
isLoading?: boolean;
|
|
22
25
|
checkedRows?: TableRow[];
|
|
@@ -6246,7 +6246,10 @@ var Table = (0, import_react5.forwardRef)((originalProps, ref) => {
|
|
|
6246
6246
|
size,
|
|
6247
6247
|
checkedRows,
|
|
6248
6248
|
onCheckedRowsChange,
|
|
6249
|
-
onRowClick
|
|
6249
|
+
onRowClick,
|
|
6250
|
+
showFirstLastButtons,
|
|
6251
|
+
showPageNumber,
|
|
6252
|
+
showPageLabel
|
|
6250
6253
|
} = { ...props, ...variantProps };
|
|
6251
6254
|
const { page = 1, perPage = 15 } = pagination || {};
|
|
6252
6255
|
const showPagination = pagination && totalData > 0;
|
|
@@ -6303,50 +6306,52 @@ var Table = (0, import_react5.forwardRef)((originalProps, ref) => {
|
|
|
6303
6306
|
[variantProps, onRowClick]
|
|
6304
6307
|
);
|
|
6305
6308
|
return /* @__PURE__ */ (0, import_jsx_runtime9.jsxs)("div", { "data-table": "base", className: slots.base({ class: classNames == null ? void 0 : classNames.base }), children: [
|
|
6306
|
-
/* @__PURE__ */ (0, import_jsx_runtime9.
|
|
6307
|
-
|
|
6308
|
-
|
|
6309
|
-
|
|
6310
|
-
|
|
6311
|
-
|
|
6312
|
-
|
|
6313
|
-
|
|
6314
|
-
|
|
6315
|
-
|
|
6316
|
-
|
|
6317
|
-
|
|
6318
|
-
|
|
6319
|
-
|
|
6320
|
-
|
|
6321
|
-
|
|
6322
|
-
|
|
6323
|
-
|
|
6324
|
-
|
|
6325
|
-
|
|
6326
|
-
|
|
6327
|
-
|
|
6328
|
-
|
|
6329
|
-
|
|
6330
|
-
|
|
6331
|
-
|
|
6332
|
-
|
|
6333
|
-
|
|
6334
|
-
|
|
6335
|
-
|
|
6336
|
-
|
|
6337
|
-
|
|
6338
|
-
|
|
6339
|
-
|
|
6340
|
-
|
|
6341
|
-
|
|
6342
|
-
|
|
6343
|
-
|
|
6344
|
-
|
|
6345
|
-
|
|
6346
|
-
|
|
6347
|
-
|
|
6348
|
-
|
|
6349
|
-
|
|
6309
|
+
/* @__PURE__ */ (0, import_jsx_runtime9.jsxs)(scrollArea_default, { direction: "x", size: size === "xl" ? "lg" : size, children: [
|
|
6310
|
+
/* @__PURE__ */ (0, import_jsx_runtime9.jsxs)(
|
|
6311
|
+
"table",
|
|
6312
|
+
{
|
|
6313
|
+
className: slots.table({ class: classNames == null ? void 0 : classNames.table }),
|
|
6314
|
+
style: {
|
|
6315
|
+
tableLayout: "fixed",
|
|
6316
|
+
width: "100%",
|
|
6317
|
+
minWidth: `${tableMinWidth}px`
|
|
6318
|
+
},
|
|
6319
|
+
children: [
|
|
6320
|
+
/* @__PURE__ */ (0, import_jsx_runtime9.jsx)(
|
|
6321
|
+
table_head_default,
|
|
6322
|
+
{
|
|
6323
|
+
columns,
|
|
6324
|
+
size,
|
|
6325
|
+
color,
|
|
6326
|
+
rowCheckbox,
|
|
6327
|
+
hasCheckedRows: rows.length > 0 && rows.every((row) => checkedRowIds.has(row.id)),
|
|
6328
|
+
onCheckAll: handleAllRowCheck,
|
|
6329
|
+
classNames,
|
|
6330
|
+
slots
|
|
6331
|
+
}
|
|
6332
|
+
),
|
|
6333
|
+
/* @__PURE__ */ (0, import_jsx_runtime9.jsx)(
|
|
6334
|
+
table_body_default,
|
|
6335
|
+
{
|
|
6336
|
+
slots,
|
|
6337
|
+
rows,
|
|
6338
|
+
columns,
|
|
6339
|
+
size,
|
|
6340
|
+
color,
|
|
6341
|
+
rowCheckbox,
|
|
6342
|
+
checkedRows: checkedRowIds,
|
|
6343
|
+
onCheckRow: handleRowCheck,
|
|
6344
|
+
onRowClick: handleRowClick,
|
|
6345
|
+
isLoading,
|
|
6346
|
+
emptyContent,
|
|
6347
|
+
classNames
|
|
6348
|
+
}
|
|
6349
|
+
)
|
|
6350
|
+
]
|
|
6351
|
+
}
|
|
6352
|
+
),
|
|
6353
|
+
isLoading && /* @__PURE__ */ (0, import_jsx_runtime9.jsx)("div", { className: slots.overlay({ class: classNames == null ? void 0 : classNames.overlay }) })
|
|
6354
|
+
] }),
|
|
6350
6355
|
showPagination && /* @__PURE__ */ (0, import_jsx_runtime9.jsx)("div", { className: "flex justify-center", children: /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(
|
|
6351
6356
|
pagination_default,
|
|
6352
6357
|
{
|
|
@@ -6356,6 +6361,9 @@ var Table = (0, import_react5.forwardRef)((originalProps, ref) => {
|
|
|
6356
6361
|
currentPage: page,
|
|
6357
6362
|
totalPage: Math.ceil(totalData / perPage),
|
|
6358
6363
|
groupSize: 10,
|
|
6364
|
+
showFirstLastButtons,
|
|
6365
|
+
showPageLabel,
|
|
6366
|
+
showPageNumber,
|
|
6359
6367
|
handleChangePage: (newPage) => onPageChange == null ? void 0 : onPageChange({ page: newPage, perPage })
|
|
6360
6368
|
}
|
|
6361
6369
|
) })
|