@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
|
@@ -3719,7 +3719,7 @@ var Tooltip = ({
|
|
|
3719
3719
|
id,
|
|
3720
3720
|
"data-testid": testid,
|
|
3721
3721
|
ref,
|
|
3722
|
-
className: "relative inline-grid grid-cols-[auto_1fr] items-center",
|
|
3722
|
+
className: "relative inline-grid grid-cols-[auto_1fr] items-center cursor-pointer",
|
|
3723
3723
|
onMouseEnter: handleMouseEnter,
|
|
3724
3724
|
onMouseLeave: handleMouseLeave,
|
|
3725
3725
|
children: [
|
|
@@ -4310,12 +4310,11 @@ var import_jsx_runtime38 = require("react/jsx-runtime");
|
|
|
4310
4310
|
var import_jsx_runtime39 = require("react/jsx-runtime");
|
|
4311
4311
|
|
|
4312
4312
|
// src/components/Grid.tsx
|
|
4313
|
-
var import_react24 = require("react");
|
|
4314
4313
|
var import_clsx29 = __toESM(require("clsx"), 1);
|
|
4315
4314
|
var import_jsx_runtime40 = require("react/jsx-runtime");
|
|
4316
4315
|
|
|
4317
4316
|
// src/components/ProductImagePreview/ProductPrimaryImage.tsx
|
|
4318
|
-
var
|
|
4317
|
+
var import_react24 = require("react");
|
|
4319
4318
|
|
|
4320
4319
|
// src/components/Spinner.tsx
|
|
4321
4320
|
var import_jsx_runtime41 = require("react/jsx-runtime");
|
|
@@ -4351,7 +4350,7 @@ Spinner.displayName = "Spinner";
|
|
|
4351
4350
|
var import_jsx_runtime42 = require("react/jsx-runtime");
|
|
4352
4351
|
|
|
4353
4352
|
// src/components/ProductImagePreview/ZoomWindow.tsx
|
|
4354
|
-
var
|
|
4353
|
+
var import_react25 = require("react");
|
|
4355
4354
|
|
|
4356
4355
|
// src/components/Surface.tsx
|
|
4357
4356
|
var import_clsx30 = __toESM(require("clsx"), 1);
|
|
@@ -4396,39 +4395,219 @@ var import_clsx31 = require("clsx");
|
|
|
4396
4395
|
var import_jsx_runtime45 = require("react/jsx-runtime");
|
|
4397
4396
|
|
|
4398
4397
|
// src/components/ProductImagePreview/MobileImageCarousel.tsx
|
|
4399
|
-
var
|
|
4398
|
+
var import_react26 = require("react");
|
|
4400
4399
|
var import_jsx_runtime46 = require("react/jsx-runtime");
|
|
4401
4400
|
|
|
4402
4401
|
// src/components/ProductImagePreview/useProductImagePreview.ts
|
|
4403
|
-
var
|
|
4402
|
+
var import_react27 = require("react");
|
|
4404
4403
|
|
|
4405
4404
|
// src/components/ProductImagePreview/index.tsx
|
|
4406
4405
|
var import_jsx_runtime47 = require("react/jsx-runtime");
|
|
4407
4406
|
|
|
4408
4407
|
// src/components/CompactImagesPreview.tsx
|
|
4409
|
-
var
|
|
4408
|
+
var import_react28 = require("react");
|
|
4410
4409
|
var import_clsx32 = __toESM(require("clsx"), 1);
|
|
4411
4410
|
var import_jsx_runtime48 = require("react/jsx-runtime");
|
|
4412
4411
|
|
|
4413
|
-
// src/components/
|
|
4412
|
+
// src/components/SimpleTable.tsx
|
|
4414
4413
|
var import_clsx33 = __toESM(require("clsx"), 1);
|
|
4415
|
-
var
|
|
4414
|
+
var import_jsx_runtime49 = require("react/jsx-runtime");
|
|
4416
4415
|
|
|
4417
|
-
// src/components/
|
|
4416
|
+
// src/components/PDFViewer/index.tsx
|
|
4418
4417
|
var import_react31 = require("react");
|
|
4419
4418
|
|
|
4420
|
-
// src/components/
|
|
4419
|
+
// src/components/PDFViewer/PDFElement.tsx
|
|
4420
|
+
var import_react_pdf2 = require("@mikecousins/react-pdf");
|
|
4421
4421
|
var import_react30 = require("react");
|
|
4422
|
-
|
|
4422
|
+
|
|
4423
|
+
// src/components/PDFViewer/PDFPage.tsx
|
|
4424
|
+
var import_react_pdf = require("@mikecousins/react-pdf");
|
|
4425
|
+
var import_react29 = require("react");
|
|
4426
|
+
var import_jsx_runtime50 = require("react/jsx-runtime");
|
|
4427
|
+
|
|
4428
|
+
// src/components/PDFViewer/PDFElement.tsx
|
|
4429
|
+
var import_clsx34 = __toESM(require("clsx"), 1);
|
|
4430
|
+
var import_jsx_runtime51 = require("react/jsx-runtime");
|
|
4431
|
+
|
|
4432
|
+
// src/components/PDFViewer/DownloadIcon.tsx
|
|
4433
|
+
var import_jsx_runtime52 = require("react/jsx-runtime");
|
|
4434
|
+
|
|
4435
|
+
// src/components/PDFViewer/PDFNavigation.tsx
|
|
4436
|
+
var import_jsx_runtime53 = require("react/jsx-runtime");
|
|
4437
|
+
|
|
4438
|
+
// src/components/PDFViewer/index.tsx
|
|
4439
|
+
var import_jsx_runtime54 = require("react/jsx-runtime");
|
|
4440
|
+
|
|
4441
|
+
// src/components/ListGroup.tsx
|
|
4442
|
+
var import_react32 = require("react");
|
|
4443
|
+
var import_clsx35 = __toESM(require("clsx"), 1);
|
|
4444
|
+
var import_jsx_runtime55 = require("react/jsx-runtime");
|
|
4445
|
+
|
|
4446
|
+
// src/components/Pagination.tsx
|
|
4447
|
+
var import_react33 = require("react");
|
|
4448
|
+
var import_clsx36 = __toESM(require("clsx"), 1);
|
|
4449
|
+
var import_jsx_runtime56 = require("react/jsx-runtime");
|
|
4450
|
+
var Pagination = ({
|
|
4451
|
+
totalPages,
|
|
4452
|
+
currentPage,
|
|
4453
|
+
onPageChange,
|
|
4454
|
+
id,
|
|
4455
|
+
testid,
|
|
4456
|
+
className,
|
|
4457
|
+
disabled
|
|
4458
|
+
}) => {
|
|
4459
|
+
const goTo = (0, import_react33.useCallback)(
|
|
4460
|
+
(page) => {
|
|
4461
|
+
if (disabled) return;
|
|
4462
|
+
onPageChange(page);
|
|
4463
|
+
},
|
|
4464
|
+
[onPageChange, disabled]
|
|
4465
|
+
);
|
|
4466
|
+
const handleKey = (e) => {
|
|
4467
|
+
if (disabled) return;
|
|
4468
|
+
if (e.key === "ArrowLeft") {
|
|
4469
|
+
e.preventDefault();
|
|
4470
|
+
goTo(currentPage - 1);
|
|
4471
|
+
} else if (e.key === "ArrowRight") {
|
|
4472
|
+
e.preventDefault();
|
|
4473
|
+
goTo(currentPage + 1);
|
|
4474
|
+
}
|
|
4475
|
+
};
|
|
4476
|
+
const pageTokens = (0, import_react33.useMemo)(() => {
|
|
4477
|
+
if (totalPages <= 5) {
|
|
4478
|
+
return Array.from({ length: totalPages }, (_, i) => i + 1);
|
|
4479
|
+
}
|
|
4480
|
+
const pages = /* @__PURE__ */ new Set();
|
|
4481
|
+
pages.add(1);
|
|
4482
|
+
pages.add(totalPages);
|
|
4483
|
+
if (currentPage <= 3) {
|
|
4484
|
+
pages.add(2);
|
|
4485
|
+
pages.add(3);
|
|
4486
|
+
pages.add(4);
|
|
4487
|
+
} else if (currentPage >= totalPages - 2) {
|
|
4488
|
+
pages.add(totalPages - 1);
|
|
4489
|
+
pages.add(totalPages - 2);
|
|
4490
|
+
pages.add(totalPages - 3);
|
|
4491
|
+
} else {
|
|
4492
|
+
pages.add(currentPage - 1);
|
|
4493
|
+
pages.add(currentPage);
|
|
4494
|
+
pages.add(currentPage + 1);
|
|
4495
|
+
}
|
|
4496
|
+
const sorted = Array.from(pages).sort((a, b) => a - b);
|
|
4497
|
+
const tokens = [];
|
|
4498
|
+
for (let i = 0; i < sorted.length; i++) {
|
|
4499
|
+
const value = sorted[i];
|
|
4500
|
+
const prev = sorted[i - 1];
|
|
4501
|
+
if (i > 0) {
|
|
4502
|
+
if (value - prev === 2) {
|
|
4503
|
+
tokens.push(prev + 1);
|
|
4504
|
+
} else if (value - prev > 2) {
|
|
4505
|
+
tokens.push("ellipsis");
|
|
4506
|
+
}
|
|
4507
|
+
}
|
|
4508
|
+
tokens.push(value);
|
|
4509
|
+
}
|
|
4510
|
+
return tokens;
|
|
4511
|
+
}, [totalPages, currentPage]);
|
|
4512
|
+
if (totalPages <= 1) return null;
|
|
4513
|
+
const buttonClass = (0, import_clsx36.default)(
|
|
4514
|
+
"cursor-pointer disabled:cursor-default",
|
|
4515
|
+
paddingUsingComponentGap,
|
|
4516
|
+
"w-8 h-8",
|
|
4517
|
+
"flex items-center justify-center",
|
|
4518
|
+
"bg-transparent",
|
|
4519
|
+
"box-content",
|
|
4520
|
+
"hover:bg-background-grouped-secondary-normal",
|
|
4521
|
+
"focus:bg-background-grouped-secondary-normal focus:outline-0",
|
|
4522
|
+
"disabled:bg-transparent disabled:text-text-action-primary-disabled"
|
|
4523
|
+
);
|
|
4524
|
+
return /* @__PURE__ */ (0, import_jsx_runtime56.jsxs)(
|
|
4525
|
+
"nav",
|
|
4526
|
+
{
|
|
4527
|
+
id,
|
|
4528
|
+
"data-testid": testid,
|
|
4529
|
+
"aria-label": "Pagination",
|
|
4530
|
+
onKeyDown: handleKey,
|
|
4531
|
+
className: (0, import_clsx36.default)(
|
|
4532
|
+
"flex items-center",
|
|
4533
|
+
"border border-border-primary-normal",
|
|
4534
|
+
"bg-background-grouped-primary-normal",
|
|
4535
|
+
"rounded-sm",
|
|
4536
|
+
className
|
|
4537
|
+
),
|
|
4538
|
+
children: [
|
|
4539
|
+
/* @__PURE__ */ (0, import_jsx_runtime56.jsx)(
|
|
4540
|
+
"button",
|
|
4541
|
+
{
|
|
4542
|
+
disabled: disabled || currentPage <= 1,
|
|
4543
|
+
"aria-label": "Previous page",
|
|
4544
|
+
onClick: () => goTo(currentPage - 1),
|
|
4545
|
+
className: (0, import_clsx36.default)(buttonClass, "border-r-1 border-border-primary-normal"),
|
|
4546
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime56.jsx)(Icon, { name: "keyboard_arrow_left" })
|
|
4547
|
+
}
|
|
4548
|
+
),
|
|
4549
|
+
/* @__PURE__ */ (0, import_jsx_runtime56.jsx)("ul", { className: (0, import_clsx36.default)("flex items-center"), children: pageTokens.map((token, index) => {
|
|
4550
|
+
if (token === "ellipsis") {
|
|
4551
|
+
return /* @__PURE__ */ (0, import_jsx_runtime56.jsx)(
|
|
4552
|
+
"li",
|
|
4553
|
+
{
|
|
4554
|
+
className: "w-8 h-8 select-none text-text-action-primary-disabled",
|
|
4555
|
+
children: "\u2026"
|
|
4556
|
+
},
|
|
4557
|
+
`ellipsis-${index}`
|
|
4558
|
+
);
|
|
4559
|
+
}
|
|
4560
|
+
const selected = token === currentPage;
|
|
4561
|
+
return /* @__PURE__ */ (0, import_jsx_runtime56.jsx)("li", { children: /* @__PURE__ */ (0, import_jsx_runtime56.jsx)(
|
|
4562
|
+
"button",
|
|
4563
|
+
{
|
|
4564
|
+
"aria-label": `Page ${token}`,
|
|
4565
|
+
"aria-current": selected ? "page" : void 0,
|
|
4566
|
+
disabled,
|
|
4567
|
+
onClick: () => goTo(token),
|
|
4568
|
+
className: (0, import_clsx36.default)(
|
|
4569
|
+
buttonClass,
|
|
4570
|
+
selected && "border-x-1 bg-background-grouped-secondary-normal border-border-primary-normal"
|
|
4571
|
+
),
|
|
4572
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime56.jsx)(Subheader, { align: "center", weight: "bold", children: token })
|
|
4573
|
+
}
|
|
4574
|
+
) }, token);
|
|
4575
|
+
}) }),
|
|
4576
|
+
/* @__PURE__ */ (0, import_jsx_runtime56.jsx)(
|
|
4577
|
+
"button",
|
|
4578
|
+
{
|
|
4579
|
+
disabled: disabled || currentPage >= totalPages,
|
|
4580
|
+
"aria-label": "Next page",
|
|
4581
|
+
onClick: () => goTo(currentPage + 1),
|
|
4582
|
+
className: (0, import_clsx36.default)(buttonClass, "border-l-1 border-border-primary-normal"),
|
|
4583
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime56.jsx)(Icon, { name: "keyboard_arrow_right" })
|
|
4584
|
+
}
|
|
4585
|
+
)
|
|
4586
|
+
]
|
|
4587
|
+
}
|
|
4588
|
+
);
|
|
4589
|
+
};
|
|
4590
|
+
Pagination.displayName = "Pagination";
|
|
4591
|
+
|
|
4592
|
+
// src/components/DataGrid/PinnedColumns.tsx
|
|
4593
|
+
var import_clsx37 = __toESM(require("clsx"), 1);
|
|
4594
|
+
var import_react36 = __toESM(require("react"), 1);
|
|
4595
|
+
|
|
4596
|
+
// src/components/DataGrid/ColumnSelectorHeaderCell/index.tsx
|
|
4597
|
+
var import_react35 = require("react");
|
|
4598
|
+
|
|
4599
|
+
// src/components/DataGrid/ColumnSelectorHeaderCell/ColumnSelectorMenuOption.tsx
|
|
4600
|
+
var import_react34 = require("react");
|
|
4601
|
+
var import_jsx_runtime57 = require("react/jsx-runtime");
|
|
4423
4602
|
function ColumnSelectorMenuOption({
|
|
4424
4603
|
id,
|
|
4425
4604
|
testid,
|
|
4426
4605
|
column,
|
|
4427
4606
|
toggleColumnVisibility
|
|
4428
4607
|
}) {
|
|
4429
|
-
const [isVisible, setIsVisible] = (0,
|
|
4608
|
+
const [isVisible, setIsVisible] = (0, import_react34.useState)(column.getIsVisible());
|
|
4430
4609
|
const label = typeof column.columnDef.header === "string" ? column.columnDef.header : null;
|
|
4431
|
-
return /* @__PURE__ */ (0,
|
|
4610
|
+
return /* @__PURE__ */ (0, import_jsx_runtime57.jsx)(MenuOption, { id, testid, defaultChecked: isVisible, children: /* @__PURE__ */ (0, import_jsx_runtime57.jsx)(
|
|
4432
4611
|
Checkbox,
|
|
4433
4612
|
{
|
|
4434
4613
|
id: id ? `${id}-checkbox` : void 0,
|
|
@@ -4444,7 +4623,7 @@ function ColumnSelectorMenuOption({
|
|
|
4444
4623
|
}
|
|
4445
4624
|
|
|
4446
4625
|
// src/components/DataGrid/ColumnSelectorHeaderCell/index.tsx
|
|
4447
|
-
var
|
|
4626
|
+
var import_jsx_runtime58 = require("react/jsx-runtime");
|
|
4448
4627
|
function ColumnSelectorHeaderCell({
|
|
4449
4628
|
id,
|
|
4450
4629
|
testid,
|
|
@@ -4452,9 +4631,9 @@ function ColumnSelectorHeaderCell({
|
|
|
4452
4631
|
toggleColumnVisibility,
|
|
4453
4632
|
resetColumnVisibility
|
|
4454
4633
|
}) {
|
|
4455
|
-
const ref = (0,
|
|
4456
|
-
const [show, setShow] = (0,
|
|
4457
|
-
return /* @__PURE__ */ (0,
|
|
4634
|
+
const ref = (0, import_react35.useRef)(null);
|
|
4635
|
+
const [show, setShow] = (0, import_react35.useState)(false);
|
|
4636
|
+
return /* @__PURE__ */ (0, import_jsx_runtime58.jsxs)(
|
|
4458
4637
|
DataGridCell,
|
|
4459
4638
|
{
|
|
4460
4639
|
id,
|
|
@@ -4464,7 +4643,7 @@ function ColumnSelectorHeaderCell({
|
|
|
4464
4643
|
color: "text-secondary-normal",
|
|
4465
4644
|
ref,
|
|
4466
4645
|
children: [
|
|
4467
|
-
/* @__PURE__ */ (0,
|
|
4646
|
+
/* @__PURE__ */ (0, import_jsx_runtime58.jsx)(
|
|
4468
4647
|
Button,
|
|
4469
4648
|
{
|
|
4470
4649
|
id: id ? `${id}-button` : void 0,
|
|
@@ -4472,10 +4651,10 @@ function ColumnSelectorHeaderCell({
|
|
|
4472
4651
|
onClick: () => setShow((prev) => !prev),
|
|
4473
4652
|
variant: "navigation",
|
|
4474
4653
|
iconOnly: true,
|
|
4475
|
-
leftIcon: /* @__PURE__ */ (0,
|
|
4654
|
+
leftIcon: /* @__PURE__ */ (0, import_jsx_runtime58.jsx)(Icon, { name: "tune" })
|
|
4476
4655
|
}
|
|
4477
4656
|
),
|
|
4478
|
-
/* @__PURE__ */ (0,
|
|
4657
|
+
/* @__PURE__ */ (0, import_jsx_runtime58.jsxs)(
|
|
4479
4658
|
Menu,
|
|
4480
4659
|
{
|
|
4481
4660
|
id: id ? `${id}-menu` : void 0,
|
|
@@ -4486,7 +4665,7 @@ function ColumnSelectorHeaderCell({
|
|
|
4486
4665
|
setShow,
|
|
4487
4666
|
calculateMinMaxHeight: true,
|
|
4488
4667
|
children: [
|
|
4489
|
-
/* @__PURE__ */ (0,
|
|
4668
|
+
/* @__PURE__ */ (0, import_jsx_runtime58.jsx)(
|
|
4490
4669
|
Button,
|
|
4491
4670
|
{
|
|
4492
4671
|
id: id ? `${id}-reset-button` : void 0,
|
|
@@ -4502,7 +4681,7 @@ function ColumnSelectorHeaderCell({
|
|
|
4502
4681
|
table.getAllColumns().filter((x) => {
|
|
4503
4682
|
var _a;
|
|
4504
4683
|
return (_a = x.columnDef.meta) == null ? void 0 : _a.inVisibilityMenu;
|
|
4505
|
-
}).map((column) => /* @__PURE__ */ (0,
|
|
4684
|
+
}).map((column) => /* @__PURE__ */ (0, import_jsx_runtime58.jsx)(
|
|
4506
4685
|
ColumnSelectorMenuOption,
|
|
4507
4686
|
{
|
|
4508
4687
|
id: id ? `${id}-option-${column.id}` : void 0,
|
|
@@ -4521,7 +4700,7 @@ function ColumnSelectorHeaderCell({
|
|
|
4521
4700
|
}
|
|
4522
4701
|
|
|
4523
4702
|
// src/components/DataGrid/PinnedColumns.tsx
|
|
4524
|
-
var
|
|
4703
|
+
var import_jsx_runtime59 = require("react/jsx-runtime");
|
|
4525
4704
|
function PinnedColumns(_a) {
|
|
4526
4705
|
var _b = _a, {
|
|
4527
4706
|
id,
|
|
@@ -4553,17 +4732,17 @@ function PinnedColumns(_a) {
|
|
|
4553
4732
|
const pinnedTestId = testid ? `${pinDirection}-pinned-${testid}` : void 0;
|
|
4554
4733
|
const hasAnyHeaders = ((_a2 = headerGroups[0]) == null ? void 0 : _a2.headers.length) > 0;
|
|
4555
4734
|
if (!hasAnyHeaders && !enableColumnSelector) return;
|
|
4556
|
-
return /* @__PURE__ */ (0,
|
|
4735
|
+
return /* @__PURE__ */ (0, import_jsx_runtime59.jsxs)(
|
|
4557
4736
|
"table",
|
|
4558
4737
|
{
|
|
4559
|
-
className: (0,
|
|
4738
|
+
className: (0, import_clsx37.default)(
|
|
4560
4739
|
"flex flex-col min-h-min sticky z-20",
|
|
4561
4740
|
pinDirection === "left" ? "left-0" : "right-0"
|
|
4562
4741
|
),
|
|
4563
4742
|
"data-testid": pinnedTestId,
|
|
4564
4743
|
children: [
|
|
4565
|
-
/* @__PURE__ */ (0,
|
|
4566
|
-
return /* @__PURE__ */ (0,
|
|
4744
|
+
/* @__PURE__ */ (0, import_jsx_runtime59.jsx)("thead", { className: "sticky top-0 z-20 grid", children: headerGroups.map((headerGroup) => {
|
|
4745
|
+
return /* @__PURE__ */ (0, import_jsx_runtime59.jsxs)(
|
|
4567
4746
|
"tr",
|
|
4568
4747
|
{
|
|
4569
4748
|
"data-testid": pinnedTestId ? `${pinnedTestId}-header-row-${headerGroup.id}` : void 0,
|
|
@@ -4576,7 +4755,7 @@ function PinnedColumns(_a) {
|
|
|
4576
4755
|
}
|
|
4577
4756
|
if (typeof header.column.columnDef.header === "string") {
|
|
4578
4757
|
const customHeaderWidth = (_a3 = header.column.columnDef.meta) == null ? void 0 : _a3.headerWidth;
|
|
4579
|
-
return /* @__PURE__ */ (0,
|
|
4758
|
+
return /* @__PURE__ */ (0, import_jsx_runtime59.jsxs)(
|
|
4580
4759
|
DataCellHeader,
|
|
4581
4760
|
{
|
|
4582
4761
|
locked: true,
|
|
@@ -4584,16 +4763,16 @@ function PinnedColumns(_a) {
|
|
|
4584
4763
|
header,
|
|
4585
4764
|
center: centerHeader,
|
|
4586
4765
|
width: customHeaderWidth,
|
|
4587
|
-
className: (0,
|
|
4766
|
+
className: (0, import_clsx37.default)(
|
|
4588
4767
|
header.column.getCanSort() ? "cursor-pointer" : "cursor-grab",
|
|
4589
4768
|
"group"
|
|
4590
4769
|
),
|
|
4591
4770
|
children: [
|
|
4592
|
-
/* @__PURE__ */ (0,
|
|
4771
|
+
/* @__PURE__ */ (0, import_jsx_runtime59.jsx)(Subheader, { tall: true, children: header.column.columnDef.header }),
|
|
4593
4772
|
getSortIcon(header.column.getIsSorted()),
|
|
4594
4773
|
!header.column.getIsSorted() && header.column.getCanSort() && getSortIcon(header.column.getNextSortingOrder(), true),
|
|
4595
|
-
header.column.getSortIndex() !== -1 && table.getState().sorting.length > 1 && /* @__PURE__ */ (0,
|
|
4596
|
-
!((_b2 = header.column.columnDef.meta) == null ? void 0 : _b2.locked) && /* @__PURE__ */ (0,
|
|
4774
|
+
header.column.getSortIndex() !== -1 && table.getState().sorting.length > 1 && /* @__PURE__ */ (0, import_jsx_runtime59.jsx)(Subheader, { tall: true, children: header.column.getSortIndex() + 1 }),
|
|
4775
|
+
!((_b2 = header.column.columnDef.meta) == null ? void 0 : _b2.locked) && /* @__PURE__ */ (0, import_jsx_runtime59.jsx)(
|
|
4597
4776
|
"div",
|
|
4598
4777
|
{
|
|
4599
4778
|
onDoubleClick: (e) => {
|
|
@@ -4616,7 +4795,7 @@ function PinnedColumns(_a) {
|
|
|
4616
4795
|
header.id
|
|
4617
4796
|
);
|
|
4618
4797
|
}
|
|
4619
|
-
return /* @__PURE__ */ (0,
|
|
4798
|
+
return /* @__PURE__ */ (0, import_jsx_runtime59.jsx)(import_react36.default.Fragment, { children: ((_c = header.column.columnDef.meta) == null ? void 0 : _c.checkbox) ? /* @__PURE__ */ (0, import_jsx_runtime59.jsx)(DataGridCell, { type: "header", component: "checkbox", locked: true, children: /* @__PURE__ */ (0, import_jsx_runtime59.jsx)(
|
|
4620
4799
|
Checkbox,
|
|
4621
4800
|
{
|
|
4622
4801
|
checked: allSelectedAcrossPages,
|
|
@@ -4628,7 +4807,7 @@ function PinnedColumns(_a) {
|
|
|
4628
4807
|
header.getContext()
|
|
4629
4808
|
) }, header.id);
|
|
4630
4809
|
}),
|
|
4631
|
-
enableColumnSelector && /* @__PURE__ */ (0,
|
|
4810
|
+
enableColumnSelector && /* @__PURE__ */ (0, import_jsx_runtime59.jsx)(
|
|
4632
4811
|
ColumnSelectorHeaderCell,
|
|
4633
4812
|
{
|
|
4634
4813
|
id: id ? `${id}-column-selector` : void 0,
|
|
@@ -4645,7 +4824,7 @@ function PinnedColumns(_a) {
|
|
|
4645
4824
|
headerGroup.id
|
|
4646
4825
|
);
|
|
4647
4826
|
}) }),
|
|
4648
|
-
/* @__PURE__ */ (0,
|
|
4827
|
+
/* @__PURE__ */ (0, import_jsx_runtime59.jsx)(
|
|
4649
4828
|
TableBody,
|
|
4650
4829
|
__spreadProps(__spreadValues({
|
|
4651
4830
|
testid: pinnedTestId
|