@dmsi/wedgekit-react 0.0.414 → 0.0.417
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/chunk-3HBYDOYE.js +114 -0
- package/dist/{chunk-JIMJIJOF.js → chunk-5TGP5EFM.js} +2 -2
- package/dist/{chunk-2HMCS25C.js → chunk-6LHBY2IH.js} +1 -1
- package/dist/{chunk-6I5LZ2ZC.js → chunk-7AXHAWJX.js} +3 -3
- package/dist/{chunk-MQX7GFLX.js → chunk-CAQWLY5V.js} +24 -6
- package/dist/{chunk-QQ5G773N.js → chunk-DCLNAUC4.js} +1 -1
- package/dist/{chunk-GB4ZTUQV.js → chunk-DTW7JCBR.js} +36 -0
- package/dist/{chunk-OBY5EH47.js → chunk-HYJIDHAK.js} +6 -6
- package/dist/{chunk-LZGYABCX.js → chunk-IMOIZFJZ.js} +8 -8
- package/dist/chunk-KBJZUVLM.js +65 -0
- package/dist/{chunk-AA6GE3TH.js → chunk-LUPHOXAQ.js} +1 -1
- package/dist/chunk-NRNWEQD7.js +66 -0
- package/dist/{chunk-44TDIHUP.js → chunk-P3MIP2FD.js} +1 -1
- package/dist/chunk-PQWWVBSR.js +61 -0
- package/dist/{chunk-ERW5DEIO.js → chunk-RQLWSLVE.js} +1 -1
- package/dist/chunk-TYAQWVIM.js +159 -0
- package/dist/{chunk-KZZKQLKF.js → chunk-W55J2KJZ.js} +1 -1
- package/dist/chunk-Y2GK27RX.js +79 -0
- package/dist/components/Accordion.cjs +74 -2
- package/dist/components/Accordion.js +3 -3
- package/dist/components/CalendarRange.cjs +232 -53
- package/dist/components/CalendarRange.css +178 -65
- package/dist/components/CalendarRange.js +25 -17
- package/dist/components/Card.cjs +38 -2
- package/dist/components/Card.js +1 -1
- package/dist/components/CompactImagesPreview.cjs +59 -5
- package/dist/components/CompactImagesPreview.js +2 -2
- package/dist/components/DataGrid/ColumnSelectorHeaderCell/ColumnSelectorMenuOption.cjs +190 -11
- package/dist/components/DataGrid/ColumnSelectorHeaderCell/ColumnSelectorMenuOption.css +178 -65
- package/dist/components/DataGrid/ColumnSelectorHeaderCell/ColumnSelectorMenuOption.js +25 -17
- package/dist/components/DataGrid/ColumnSelectorHeaderCell/index.cjs +200 -21
- package/dist/components/DataGrid/ColumnSelectorHeaderCell/index.css +178 -65
- package/dist/components/DataGrid/ColumnSelectorHeaderCell/index.js +25 -17
- package/dist/components/DataGrid/PinnedColumns.cjs +215 -36
- package/dist/components/DataGrid/PinnedColumns.css +178 -65
- package/dist/components/DataGrid/PinnedColumns.js +25 -17
- package/dist/components/DataGrid/TableBody/LoadingCell.cjs +191 -12
- package/dist/components/DataGrid/TableBody/LoadingCell.css +178 -65
- package/dist/components/DataGrid/TableBody/LoadingCell.js +25 -17
- package/dist/components/DataGrid/TableBody/TableBodyRow.cjs +197 -18
- package/dist/components/DataGrid/TableBody/TableBodyRow.css +178 -65
- package/dist/components/DataGrid/TableBody/TableBodyRow.js +25 -17
- package/dist/components/DataGrid/TableBody/index.cjs +212 -33
- package/dist/components/DataGrid/TableBody/index.css +178 -65
- package/dist/components/DataGrid/TableBody/index.js +25 -17
- package/dist/components/DataGrid/index.cjs +301 -122
- package/dist/components/DataGrid/index.css +178 -65
- package/dist/components/DataGrid/index.js +25 -17
- package/dist/components/DataGrid/utils.cjs +191 -12
- package/dist/components/DataGrid/utils.css +178 -65
- package/dist/components/DataGrid/utils.js +25 -17
- package/dist/components/DateInput.cjs +251 -72
- package/dist/components/DateInput.css +178 -65
- package/dist/components/DateInput.js +25 -17
- package/dist/components/DateRangeInput.cjs +251 -72
- package/dist/components/DateRangeInput.css +178 -65
- package/dist/components/DateRangeInput.js +25 -17
- package/dist/components/Grid.cjs +81 -76
- package/dist/components/Grid.js +1 -1
- package/dist/components/ListGroup.cjs +553 -0
- package/dist/components/ListGroup.js +11 -0
- package/dist/components/MobileDataGrid/ColumnList.cjs +36 -0
- package/dist/components/MobileDataGrid/ColumnList.js +3 -3
- package/dist/components/MobileDataGrid/ColumnSelector/index.cjs +198 -19
- package/dist/components/MobileDataGrid/ColumnSelector/index.css +178 -65
- package/dist/components/MobileDataGrid/ColumnSelector/index.js +25 -17
- package/dist/components/MobileDataGrid/MobileDataGridCard/index.cjs +36 -0
- package/dist/components/MobileDataGrid/MobileDataGridCard/index.js +2 -2
- package/dist/components/MobileDataGrid/MobileDataGridHeader.cjs +242 -27
- package/dist/components/MobileDataGrid/MobileDataGridHeader.css +178 -65
- package/dist/components/MobileDataGrid/MobileDataGridHeader.js +25 -17
- package/dist/components/MobileDataGrid/RowDetailModalProvider/ModalContent.cjs +36 -0
- package/dist/components/MobileDataGrid/RowDetailModalProvider/ModalContent.js +2 -2
- package/dist/components/MobileDataGrid/RowDetailModalProvider/index.cjs +36 -0
- package/dist/components/MobileDataGrid/RowDetailModalProvider/index.js +5 -5
- package/dist/components/MobileDataGrid/index.cjs +742 -527
- package/dist/components/MobileDataGrid/index.css +178 -65
- package/dist/components/MobileDataGrid/index.js +25 -17
- package/dist/components/Modal.js +2 -2
- package/dist/components/Notification.cjs +36 -0
- package/dist/components/Notification.js +1 -1
- package/dist/components/PDFViewer/PDFElement.cjs +36 -0
- package/dist/components/PDFViewer/PDFElement.js +2 -2
- package/dist/components/PDFViewer/PDFNavigation.cjs +36 -0
- package/dist/components/PDFViewer/PDFNavigation.js +2 -2
- package/dist/components/PDFViewer/index.cjs +36 -0
- package/dist/components/PDFViewer/index.js +8 -111
- package/dist/components/Pagination.cjs +427 -0
- package/dist/components/Pagination.js +10 -0
- package/dist/components/ProductImagePreview/index.cjs +139 -127
- package/dist/components/ProductImagePreview/index.js +5 -5
- package/dist/components/SideMenuGroup.cjs +36 -0
- package/dist/components/SideMenuGroup.js +1 -1
- package/dist/components/SideMenuItem.cjs +36 -0
- package/dist/components/SideMenuItem.js +1 -1
- package/dist/components/SimpleTable.cjs +521 -0
- package/dist/components/SimpleTable.js +10 -0
- package/dist/components/Stack.cjs +36 -0
- package/dist/components/Stack.js +1 -1
- package/dist/components/Swatch.cjs +36 -0
- package/dist/components/Swatch.js +1 -1
- package/dist/components/Time.cjs +36 -0
- package/dist/components/Time.js +1 -1
- package/dist/components/Tooltip.cjs +1 -1
- package/dist/components/Tooltip.js +1 -1
- package/dist/components/Upload.cjs +36 -0
- package/dist/components/Upload.js +1 -1
- package/dist/components/index.cjs +739 -131
- package/dist/components/index.css +178 -65
- package/dist/components/index.js +37 -17
- package/dist/index.css +178 -65
- package/package.json +1 -1
- package/src/components/Card.tsx +60 -2
- package/src/components/CompactImagesPreview.tsx +54 -30
- package/src/components/Grid.tsx +59 -91
- package/src/components/ListGroup.tsx +82 -0
- package/src/components/Pagination.tsx +182 -0
- package/src/components/SimpleTable.tsx +77 -0
- package/src/components/Stack.tsx +76 -0
- package/src/components/Tooltip.tsx +4 -3
- package/src/components/index.ts +4 -0
- package/dist/chunk-ER6RCOH3.js +0 -97
- package/dist/chunk-EZCH4PQS.js +0 -29
- package/dist/{chunk-D6YCMQPO.js → chunk-SBCFBHNG.js} +3 -3
|
@@ -3689,7 +3689,7 @@ var Tooltip = ({
|
|
|
3689
3689
|
id,
|
|
3690
3690
|
"data-testid": testid,
|
|
3691
3691
|
ref,
|
|
3692
|
-
className: "relative inline-grid grid-cols-[auto_1fr] items-center",
|
|
3692
|
+
className: "relative inline-grid grid-cols-[auto_1fr] items-center cursor-pointer",
|
|
3693
3693
|
onMouseEnter: handleMouseEnter,
|
|
3694
3694
|
onMouseLeave: handleMouseLeave,
|
|
3695
3695
|
children: [
|
|
@@ -4280,12 +4280,11 @@ var import_jsx_runtime38 = require("react/jsx-runtime");
|
|
|
4280
4280
|
var import_jsx_runtime39 = require("react/jsx-runtime");
|
|
4281
4281
|
|
|
4282
4282
|
// src/components/Grid.tsx
|
|
4283
|
-
var import_react26 = require("react");
|
|
4284
4283
|
var import_clsx28 = __toESM(require("clsx"), 1);
|
|
4285
4284
|
var import_jsx_runtime40 = require("react/jsx-runtime");
|
|
4286
4285
|
|
|
4287
4286
|
// src/components/ProductImagePreview/ProductPrimaryImage.tsx
|
|
4288
|
-
var
|
|
4287
|
+
var import_react26 = require("react");
|
|
4289
4288
|
|
|
4290
4289
|
// src/components/Spinner.tsx
|
|
4291
4290
|
var import_jsx_runtime41 = require("react/jsx-runtime");
|
|
@@ -4321,7 +4320,7 @@ Spinner.displayName = "Spinner";
|
|
|
4321
4320
|
var import_jsx_runtime42 = require("react/jsx-runtime");
|
|
4322
4321
|
|
|
4323
4322
|
// src/components/ProductImagePreview/ZoomWindow.tsx
|
|
4324
|
-
var
|
|
4323
|
+
var import_react27 = require("react");
|
|
4325
4324
|
|
|
4326
4325
|
// src/components/Surface.tsx
|
|
4327
4326
|
var import_clsx29 = __toESM(require("clsx"), 1);
|
|
@@ -4366,28 +4365,208 @@ var import_clsx30 = require("clsx");
|
|
|
4366
4365
|
var import_jsx_runtime45 = require("react/jsx-runtime");
|
|
4367
4366
|
|
|
4368
4367
|
// src/components/ProductImagePreview/MobileImageCarousel.tsx
|
|
4369
|
-
var
|
|
4368
|
+
var import_react28 = require("react");
|
|
4370
4369
|
var import_jsx_runtime46 = require("react/jsx-runtime");
|
|
4371
4370
|
|
|
4372
4371
|
// src/components/ProductImagePreview/useProductImagePreview.ts
|
|
4373
|
-
var
|
|
4372
|
+
var import_react29 = require("react");
|
|
4374
4373
|
|
|
4375
4374
|
// src/components/ProductImagePreview/index.tsx
|
|
4376
4375
|
var import_jsx_runtime47 = require("react/jsx-runtime");
|
|
4377
4376
|
|
|
4378
4377
|
// src/components/CompactImagesPreview.tsx
|
|
4379
|
-
var
|
|
4378
|
+
var import_react30 = require("react");
|
|
4380
4379
|
var import_clsx31 = __toESM(require("clsx"), 1);
|
|
4381
4380
|
var import_jsx_runtime48 = require("react/jsx-runtime");
|
|
4382
4381
|
|
|
4383
|
-
// src/components/
|
|
4382
|
+
// src/components/SimpleTable.tsx
|
|
4383
|
+
var import_clsx32 = __toESM(require("clsx"), 1);
|
|
4384
|
+
var import_jsx_runtime49 = require("react/jsx-runtime");
|
|
4385
|
+
|
|
4386
|
+
// src/components/PDFViewer/index.tsx
|
|
4387
|
+
var import_react33 = require("react");
|
|
4388
|
+
|
|
4389
|
+
// src/components/PDFViewer/PDFElement.tsx
|
|
4390
|
+
var import_react_pdf2 = require("@mikecousins/react-pdf");
|
|
4391
|
+
var import_react32 = require("react");
|
|
4392
|
+
|
|
4393
|
+
// src/components/PDFViewer/PDFPage.tsx
|
|
4394
|
+
var import_react_pdf = require("@mikecousins/react-pdf");
|
|
4395
|
+
var import_react31 = require("react");
|
|
4396
|
+
var import_jsx_runtime50 = require("react/jsx-runtime");
|
|
4397
|
+
|
|
4398
|
+
// src/components/PDFViewer/PDFElement.tsx
|
|
4384
4399
|
var import_clsx33 = __toESM(require("clsx"), 1);
|
|
4400
|
+
var import_jsx_runtime51 = require("react/jsx-runtime");
|
|
4401
|
+
|
|
4402
|
+
// src/components/PDFViewer/DownloadIcon.tsx
|
|
4403
|
+
var import_jsx_runtime52 = require("react/jsx-runtime");
|
|
4404
|
+
|
|
4405
|
+
// src/components/PDFViewer/PDFNavigation.tsx
|
|
4406
|
+
var import_jsx_runtime53 = require("react/jsx-runtime");
|
|
4407
|
+
|
|
4408
|
+
// src/components/PDFViewer/index.tsx
|
|
4409
|
+
var import_jsx_runtime54 = require("react/jsx-runtime");
|
|
4410
|
+
|
|
4411
|
+
// src/components/ListGroup.tsx
|
|
4412
|
+
var import_react34 = require("react");
|
|
4413
|
+
var import_clsx34 = __toESM(require("clsx"), 1);
|
|
4414
|
+
var import_jsx_runtime55 = require("react/jsx-runtime");
|
|
4415
|
+
|
|
4416
|
+
// src/components/Pagination.tsx
|
|
4417
|
+
var import_react35 = require("react");
|
|
4418
|
+
var import_clsx35 = __toESM(require("clsx"), 1);
|
|
4419
|
+
var import_jsx_runtime56 = require("react/jsx-runtime");
|
|
4420
|
+
var Pagination = ({
|
|
4421
|
+
totalPages,
|
|
4422
|
+
currentPage,
|
|
4423
|
+
onPageChange,
|
|
4424
|
+
id,
|
|
4425
|
+
testid,
|
|
4426
|
+
className,
|
|
4427
|
+
disabled
|
|
4428
|
+
}) => {
|
|
4429
|
+
const goTo = (0, import_react35.useCallback)(
|
|
4430
|
+
(page) => {
|
|
4431
|
+
if (disabled) return;
|
|
4432
|
+
onPageChange(page);
|
|
4433
|
+
},
|
|
4434
|
+
[onPageChange, disabled]
|
|
4435
|
+
);
|
|
4436
|
+
const handleKey = (e) => {
|
|
4437
|
+
if (disabled) return;
|
|
4438
|
+
if (e.key === "ArrowLeft") {
|
|
4439
|
+
e.preventDefault();
|
|
4440
|
+
goTo(currentPage - 1);
|
|
4441
|
+
} else if (e.key === "ArrowRight") {
|
|
4442
|
+
e.preventDefault();
|
|
4443
|
+
goTo(currentPage + 1);
|
|
4444
|
+
}
|
|
4445
|
+
};
|
|
4446
|
+
const pageTokens = (0, import_react35.useMemo)(() => {
|
|
4447
|
+
if (totalPages <= 5) {
|
|
4448
|
+
return Array.from({ length: totalPages }, (_, i) => i + 1);
|
|
4449
|
+
}
|
|
4450
|
+
const pages = /* @__PURE__ */ new Set();
|
|
4451
|
+
pages.add(1);
|
|
4452
|
+
pages.add(totalPages);
|
|
4453
|
+
if (currentPage <= 3) {
|
|
4454
|
+
pages.add(2);
|
|
4455
|
+
pages.add(3);
|
|
4456
|
+
pages.add(4);
|
|
4457
|
+
} else if (currentPage >= totalPages - 2) {
|
|
4458
|
+
pages.add(totalPages - 1);
|
|
4459
|
+
pages.add(totalPages - 2);
|
|
4460
|
+
pages.add(totalPages - 3);
|
|
4461
|
+
} else {
|
|
4462
|
+
pages.add(currentPage - 1);
|
|
4463
|
+
pages.add(currentPage);
|
|
4464
|
+
pages.add(currentPage + 1);
|
|
4465
|
+
}
|
|
4466
|
+
const sorted = Array.from(pages).sort((a, b) => a - b);
|
|
4467
|
+
const tokens = [];
|
|
4468
|
+
for (let i = 0; i < sorted.length; i++) {
|
|
4469
|
+
const value = sorted[i];
|
|
4470
|
+
const prev = sorted[i - 1];
|
|
4471
|
+
if (i > 0) {
|
|
4472
|
+
if (value - prev === 2) {
|
|
4473
|
+
tokens.push(prev + 1);
|
|
4474
|
+
} else if (value - prev > 2) {
|
|
4475
|
+
tokens.push("ellipsis");
|
|
4476
|
+
}
|
|
4477
|
+
}
|
|
4478
|
+
tokens.push(value);
|
|
4479
|
+
}
|
|
4480
|
+
return tokens;
|
|
4481
|
+
}, [totalPages, currentPage]);
|
|
4482
|
+
if (totalPages <= 1) return null;
|
|
4483
|
+
const buttonClass = (0, import_clsx35.default)(
|
|
4484
|
+
"cursor-pointer disabled:cursor-default",
|
|
4485
|
+
paddingUsingComponentGap,
|
|
4486
|
+
"w-8 h-8",
|
|
4487
|
+
"flex items-center justify-center",
|
|
4488
|
+
"bg-transparent",
|
|
4489
|
+
"box-content",
|
|
4490
|
+
"hover:bg-background-grouped-secondary-normal",
|
|
4491
|
+
"focus:bg-background-grouped-secondary-normal focus:outline-0",
|
|
4492
|
+
"disabled:bg-transparent disabled:text-text-action-primary-disabled"
|
|
4493
|
+
);
|
|
4494
|
+
return /* @__PURE__ */ (0, import_jsx_runtime56.jsxs)(
|
|
4495
|
+
"nav",
|
|
4496
|
+
{
|
|
4497
|
+
id,
|
|
4498
|
+
"data-testid": testid,
|
|
4499
|
+
"aria-label": "Pagination",
|
|
4500
|
+
onKeyDown: handleKey,
|
|
4501
|
+
className: (0, import_clsx35.default)(
|
|
4502
|
+
"flex items-center",
|
|
4503
|
+
"border border-border-primary-normal",
|
|
4504
|
+
"bg-background-grouped-primary-normal",
|
|
4505
|
+
"rounded-sm",
|
|
4506
|
+
className
|
|
4507
|
+
),
|
|
4508
|
+
children: [
|
|
4509
|
+
/* @__PURE__ */ (0, import_jsx_runtime56.jsx)(
|
|
4510
|
+
"button",
|
|
4511
|
+
{
|
|
4512
|
+
disabled: disabled || currentPage <= 1,
|
|
4513
|
+
"aria-label": "Previous page",
|
|
4514
|
+
onClick: () => goTo(currentPage - 1),
|
|
4515
|
+
className: (0, import_clsx35.default)(buttonClass, "border-r-1 border-border-primary-normal"),
|
|
4516
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime56.jsx)(Icon, { name: "keyboard_arrow_left" })
|
|
4517
|
+
}
|
|
4518
|
+
),
|
|
4519
|
+
/* @__PURE__ */ (0, import_jsx_runtime56.jsx)("ul", { className: (0, import_clsx35.default)("flex items-center"), children: pageTokens.map((token, index) => {
|
|
4520
|
+
if (token === "ellipsis") {
|
|
4521
|
+
return /* @__PURE__ */ (0, import_jsx_runtime56.jsx)(
|
|
4522
|
+
"li",
|
|
4523
|
+
{
|
|
4524
|
+
className: "w-8 h-8 select-none text-text-action-primary-disabled",
|
|
4525
|
+
children: "\u2026"
|
|
4526
|
+
},
|
|
4527
|
+
`ellipsis-${index}`
|
|
4528
|
+
);
|
|
4529
|
+
}
|
|
4530
|
+
const selected = token === currentPage;
|
|
4531
|
+
return /* @__PURE__ */ (0, import_jsx_runtime56.jsx)("li", { children: /* @__PURE__ */ (0, import_jsx_runtime56.jsx)(
|
|
4532
|
+
"button",
|
|
4533
|
+
{
|
|
4534
|
+
"aria-label": `Page ${token}`,
|
|
4535
|
+
"aria-current": selected ? "page" : void 0,
|
|
4536
|
+
disabled,
|
|
4537
|
+
onClick: () => goTo(token),
|
|
4538
|
+
className: (0, import_clsx35.default)(
|
|
4539
|
+
buttonClass,
|
|
4540
|
+
selected && "border-x-1 bg-background-grouped-secondary-normal border-border-primary-normal"
|
|
4541
|
+
),
|
|
4542
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime56.jsx)(Subheader, { align: "center", weight: "bold", children: token })
|
|
4543
|
+
}
|
|
4544
|
+
) }, token);
|
|
4545
|
+
}) }),
|
|
4546
|
+
/* @__PURE__ */ (0, import_jsx_runtime56.jsx)(
|
|
4547
|
+
"button",
|
|
4548
|
+
{
|
|
4549
|
+
disabled: disabled || currentPage >= totalPages,
|
|
4550
|
+
"aria-label": "Next page",
|
|
4551
|
+
onClick: () => goTo(currentPage + 1),
|
|
4552
|
+
className: (0, import_clsx35.default)(buttonClass, "border-l-1 border-border-primary-normal"),
|
|
4553
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime56.jsx)(Icon, { name: "keyboard_arrow_right" })
|
|
4554
|
+
}
|
|
4555
|
+
)
|
|
4556
|
+
]
|
|
4557
|
+
}
|
|
4558
|
+
);
|
|
4559
|
+
};
|
|
4560
|
+
Pagination.displayName = "Pagination";
|
|
4561
|
+
|
|
4562
|
+
// src/components/DataGrid/TableBody/index.tsx
|
|
4563
|
+
var import_clsx37 = __toESM(require("clsx"), 1);
|
|
4385
4564
|
|
|
4386
4565
|
// src/components/DataGrid/TableBody/TableBodyRow.tsx
|
|
4387
|
-
var
|
|
4566
|
+
var import_clsx36 = __toESM(require("clsx"), 1);
|
|
4388
4567
|
var import_react_table3 = require("@tanstack/react-table");
|
|
4389
|
-
var
|
|
4390
|
-
var
|
|
4568
|
+
var import_react36 = __toESM(require("react"), 1);
|
|
4569
|
+
var import_jsx_runtime57 = require("react/jsx-runtime");
|
|
4391
4570
|
var valueFormatters = {
|
|
4392
4571
|
date: (value) => typeof value === "string" ? formatDate(value) : "",
|
|
4393
4572
|
currency: (value) => formatCurrencyDisplay(value)
|
|
@@ -4420,10 +4599,10 @@ function TableBodyRow({
|
|
|
4420
4599
|
const columns = locked ? visibleCells : virtualColumns;
|
|
4421
4600
|
const isError = typeof row.original === "object" && row.original !== null && "rowState" in row.original && row.original.rowState === "error";
|
|
4422
4601
|
const CellElement = locked ? DataGridCell : DragAlongCell;
|
|
4423
|
-
return /* @__PURE__ */ (0,
|
|
4602
|
+
return /* @__PURE__ */ (0, import_jsx_runtime57.jsxs)(
|
|
4424
4603
|
"tr",
|
|
4425
4604
|
{
|
|
4426
|
-
className: (0,
|
|
4605
|
+
className: (0, import_clsx36.default)(
|
|
4427
4606
|
"min-h-10",
|
|
4428
4607
|
"transition-colors hover:bg-background-action-secondary-hover",
|
|
4429
4608
|
row.getIsSelected() && "!bg-background-action-secondary-hover",
|
|
@@ -4441,7 +4620,7 @@ function TableBodyRow({
|
|
|
4441
4620
|
children: [
|
|
4442
4621
|
!locked && virtualPaddingLeft ? (
|
|
4443
4622
|
// fake empty column to the left for virtualization scroll padding
|
|
4444
|
-
/* @__PURE__ */ (0,
|
|
4623
|
+
/* @__PURE__ */ (0, import_jsx_runtime57.jsx)("td", { style: { display: "flex", width: virtualPaddingLeft } })
|
|
4445
4624
|
) : null,
|
|
4446
4625
|
columns.map((column) => {
|
|
4447
4626
|
var _a2, _b, _c, _d;
|
|
@@ -4452,17 +4631,17 @@ function TableBodyRow({
|
|
|
4452
4631
|
const cellFormat = (_a2 = cell.column.columnDef.meta) == null ? void 0 : _a2.format;
|
|
4453
4632
|
const cellValue = cellFormat && isValueFormatterKey(cellFormat) ? valueFormatters[cellFormat](cell.getValue()) : cell.getValue();
|
|
4454
4633
|
const cellAlignment = (_c = (_b = cell.column.columnDef.meta) == null ? void 0 : _b.align) != null ? _c : typeof cellValue === "number" ? "right" : "left";
|
|
4455
|
-
return ((_d = cell.column.columnDef.meta) == null ? void 0 : _d.useCustomRenderer) ? /* @__PURE__ */ (0,
|
|
4634
|
+
return ((_d = cell.column.columnDef.meta) == null ? void 0 : _d.useCustomRenderer) ? /* @__PURE__ */ (0, import_jsx_runtime57.jsx)(import_react36.default.Fragment, { children: (0, import_react_table3.flexRender)(cell.column.columnDef.cell, cell.getContext()) }, cell.id) : /* @__PURE__ */ (0, import_jsx_runtime57.jsx)(
|
|
4456
4635
|
CellElement,
|
|
4457
4636
|
{
|
|
4458
4637
|
id: id ? `${id}-row-${row.id}-cell-${cell.id}` : void 0,
|
|
4459
4638
|
testid: testid ? `${testid}-row-${row.id}-cell-${cell.id}` : void 0,
|
|
4460
4639
|
cell,
|
|
4461
|
-
className: (0,
|
|
4640
|
+
className: (0, import_clsx36.default)({
|
|
4462
4641
|
"justify-start": cellAlignment === "left",
|
|
4463
4642
|
"justify-end": cellAlignment === "right"
|
|
4464
4643
|
}),
|
|
4465
|
-
children: /* @__PURE__ */ (0,
|
|
4644
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime57.jsx)(
|
|
4466
4645
|
Tooltip,
|
|
4467
4646
|
{
|
|
4468
4647
|
id: id ? `${id}-tooltip-${cell.id}` : void 0,
|
|
@@ -4470,7 +4649,7 @@ function TableBodyRow({
|
|
|
4470
4649
|
showOnTruncation: true,
|
|
4471
4650
|
message: cellValue,
|
|
4472
4651
|
position: "bottom",
|
|
4473
|
-
children: /* @__PURE__ */ (0,
|
|
4652
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime57.jsx)(Paragraph, { addOverflow: true, tall: true, children: cellValue })
|
|
4474
4653
|
}
|
|
4475
4654
|
)
|
|
4476
4655
|
},
|
|
@@ -4479,7 +4658,7 @@ function TableBodyRow({
|
|
|
4479
4658
|
}),
|
|
4480
4659
|
!locked && virtualPaddingRight ? (
|
|
4481
4660
|
// fake empty column to the right for virtualization scroll padding
|
|
4482
|
-
/* @__PURE__ */ (0,
|
|
4661
|
+
/* @__PURE__ */ (0, import_jsx_runtime57.jsx)("td", { style: { display: "flex", width: virtualPaddingRight } })
|
|
4483
4662
|
) : null
|
|
4484
4663
|
]
|
|
4485
4664
|
},
|
|
@@ -4488,7 +4667,7 @@ function TableBodyRow({
|
|
|
4488
4667
|
}
|
|
4489
4668
|
|
|
4490
4669
|
// src/components/DataGrid/TableBody/LoadingCell.tsx
|
|
4491
|
-
var
|
|
4670
|
+
var import_jsx_runtime58 = require("react/jsx-runtime");
|
|
4492
4671
|
function LoadingCell({
|
|
4493
4672
|
id,
|
|
4494
4673
|
testid,
|
|
@@ -4496,16 +4675,16 @@ function LoadingCell({
|
|
|
4496
4675
|
}) {
|
|
4497
4676
|
const key = `loading-${column.id}`;
|
|
4498
4677
|
if (column.cell === "checkbox") {
|
|
4499
|
-
return /* @__PURE__ */ (0,
|
|
4678
|
+
return /* @__PURE__ */ (0, import_jsx_runtime58.jsx)(DataGridCell, { id: id ? `${id}-${key}` : void 0, testid: testid ? `${testid}-${key}` : void 0, children: /* @__PURE__ */ (0, import_jsx_runtime58.jsx)(Checkbox, { id: id ? `${id}-${key}-checkbox` : void 0, testid: testid ? `${testid}-${key}-checkbox` : void 0, disabled: true }) }, key);
|
|
4500
4679
|
}
|
|
4501
4680
|
if (column.cell === "input") {
|
|
4502
|
-
return /* @__PURE__ */ (0,
|
|
4681
|
+
return /* @__PURE__ */ (0, import_jsx_runtime58.jsx)(
|
|
4503
4682
|
DataGridCell,
|
|
4504
4683
|
{
|
|
4505
4684
|
id: id ? `${id}-${key}` : void 0,
|
|
4506
4685
|
testid: testid ? `${testid}-${key}` : void 0,
|
|
4507
4686
|
component: "input",
|
|
4508
|
-
children: /* @__PURE__ */ (0,
|
|
4687
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime58.jsx)(
|
|
4509
4688
|
Input,
|
|
4510
4689
|
{
|
|
4511
4690
|
id: id ? `${id}-${key}-input` : void 0,
|
|
@@ -4519,11 +4698,11 @@ function LoadingCell({
|
|
|
4519
4698
|
key
|
|
4520
4699
|
);
|
|
4521
4700
|
}
|
|
4522
|
-
return /* @__PURE__ */ (0,
|
|
4701
|
+
return /* @__PURE__ */ (0, import_jsx_runtime58.jsx)(DataGridCell, { id: id ? `${id}-${key}` : void 0, testid: testid ? `${testid}-${key}` : void 0, children: /* @__PURE__ */ (0, import_jsx_runtime58.jsx)("div", { className: "bg-linear-270 to-neutral-300/[24%] from-neutral-300/[12%] rounded-xs w-full max-w-25 h-6" }) }, key);
|
|
4523
4702
|
}
|
|
4524
4703
|
|
|
4525
4704
|
// src/components/DataGrid/TableBody/index.tsx
|
|
4526
|
-
var
|
|
4705
|
+
var import_jsx_runtime59 = require("react/jsx-runtime");
|
|
4527
4706
|
function TableBody({
|
|
4528
4707
|
id,
|
|
4529
4708
|
testid,
|
|
@@ -4557,10 +4736,10 @@ function TableBody({
|
|
|
4557
4736
|
} else {
|
|
4558
4737
|
headerGroups = table.getCenterHeaderGroups();
|
|
4559
4738
|
}
|
|
4560
|
-
return /* @__PURE__ */ (0,
|
|
4739
|
+
return /* @__PURE__ */ (0, import_jsx_runtime59.jsxs)(
|
|
4561
4740
|
"tbody",
|
|
4562
4741
|
{
|
|
4563
|
-
className: (0,
|
|
4742
|
+
className: (0, import_clsx37.default)(locked ? "shadow-16" : ""),
|
|
4564
4743
|
style: {
|
|
4565
4744
|
display: "grid",
|
|
4566
4745
|
height: `${showFilterRow ? rowVirtualizer.getTotalSize() + 40 : rowVirtualizer.getTotalSize()}px`,
|
|
@@ -4569,7 +4748,7 @@ function TableBody({
|
|
|
4569
4748
|
// needed for absolute positioning of rows
|
|
4570
4749
|
},
|
|
4571
4750
|
children: [
|
|
4572
|
-
showFilterRow && /* @__PURE__ */ (0,
|
|
4751
|
+
showFilterRow && /* @__PURE__ */ (0, import_jsx_runtime59.jsx)(
|
|
4573
4752
|
"tr",
|
|
4574
4753
|
{
|
|
4575
4754
|
style: {
|
|
@@ -4585,7 +4764,7 @@ function TableBody({
|
|
|
4585
4764
|
children: headerGroups.flatMap(
|
|
4586
4765
|
(x) => x.headers.map((header) => {
|
|
4587
4766
|
var _a, _b, _c, _d, _e;
|
|
4588
|
-
return /* @__PURE__ */ (0,
|
|
4767
|
+
return /* @__PURE__ */ (0, import_jsx_runtime59.jsx)(
|
|
4589
4768
|
CellElement,
|
|
4590
4769
|
{
|
|
4591
4770
|
id: id ? `${id}-filter-cell-${header.id}` : void 0,
|
|
@@ -4596,7 +4775,7 @@ function TableBody({
|
|
|
4596
4775
|
children: header.column.getCanFilter() && ((_e = (_c = (_b = header.column.columnDef.meta) == null ? void 0 : _b.filterRowCell) == null ? void 0 : _c.call(_b, {
|
|
4597
4776
|
header,
|
|
4598
4777
|
table
|
|
4599
|
-
})) != null ? _e : /* @__PURE__ */ (0,
|
|
4778
|
+
})) != null ? _e : /* @__PURE__ */ (0, import_jsx_runtime59.jsx)(
|
|
4600
4779
|
Search,
|
|
4601
4780
|
{
|
|
4602
4781
|
id: id ? `${id}-filter-search-${header.id}` : void 0,
|
|
@@ -4617,7 +4796,7 @@ function TableBody({
|
|
|
4617
4796
|
),
|
|
4618
4797
|
virtualRows.map((virtualRow) => {
|
|
4619
4798
|
const row = rows[virtualRow.index];
|
|
4620
|
-
return /* @__PURE__ */ (0,
|
|
4799
|
+
return /* @__PURE__ */ (0, import_jsx_runtime59.jsx)(
|
|
4621
4800
|
TableBodyRow,
|
|
4622
4801
|
{
|
|
4623
4802
|
id,
|
|
@@ -4636,7 +4815,7 @@ function TableBody({
|
|
|
4636
4815
|
row.id
|
|
4637
4816
|
);
|
|
4638
4817
|
}),
|
|
4639
|
-
!pagination && isLoadingMore && hasMore && /* @__PURE__ */ (0,
|
|
4818
|
+
!pagination && isLoadingMore && hasMore && /* @__PURE__ */ (0, import_jsx_runtime59.jsx)(
|
|
4640
4819
|
"tr",
|
|
4641
4820
|
{
|
|
4642
4821
|
style: {
|
|
@@ -4646,7 +4825,7 @@ function TableBody({
|
|
|
4646
4825
|
transform: `translateY(${virtualRows[virtualRows.length - 1].start + 40}px)`
|
|
4647
4826
|
},
|
|
4648
4827
|
className: "odd:bg-background-grouped-primary-normal even:bg-background-grouped-secondary-normal",
|
|
4649
|
-
children: table.getAllLeafColumns().map((column) => /* @__PURE__ */ (0,
|
|
4828
|
+
children: table.getAllLeafColumns().map((column) => /* @__PURE__ */ (0, import_jsx_runtime59.jsx)(
|
|
4650
4829
|
LoadingCell,
|
|
4651
4830
|
{
|
|
4652
4831
|
id,
|