@dmsi/wedgekit-react 0.0.415 → 0.0.418
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-CANJ2YPW.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-ESCNCQGI.js +9 -0
- package/dist/chunk-IFHMGICR.js +66 -0
- package/dist/{chunk-ZHZIIVJN.js → chunk-IMOIZFJZ.js} +5 -5
- package/dist/chunk-KBJZUVLM.js +65 -0
- package/dist/{chunk-AA6GE3TH.js → chunk-LUPHOXAQ.js} +1 -1
- package/dist/{chunk-44TDIHUP.js → chunk-P3MIP2FD.js} +1 -1
- package/dist/{chunk-7ULLUUVJ.js → chunk-PQWWVBSR.js} +1 -1
- package/dist/{chunk-ERW5DEIO.js → chunk-RQLWSLVE.js} +1 -1
- package/dist/{chunk-BK7SPR6Y.js → chunk-TQIKP534.js} +4 -4
- 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 +231 -53
- package/dist/components/CalendarRange.css +169 -65
- package/dist/components/CalendarRange.js +24 -16
- 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 +189 -11
- package/dist/components/DataGrid/ColumnSelectorHeaderCell/ColumnSelectorMenuOption.css +169 -65
- package/dist/components/DataGrid/ColumnSelectorHeaderCell/ColumnSelectorMenuOption.js +24 -16
- package/dist/components/DataGrid/ColumnSelectorHeaderCell/index.cjs +198 -20
- package/dist/components/DataGrid/ColumnSelectorHeaderCell/index.css +169 -65
- package/dist/components/DataGrid/ColumnSelectorHeaderCell/index.js +24 -16
- package/dist/components/DataGrid/PinnedColumns.cjs +214 -36
- package/dist/components/DataGrid/PinnedColumns.css +169 -65
- package/dist/components/DataGrid/PinnedColumns.js +24 -16
- package/dist/components/DataGrid/TableBody/LoadingCell.cjs +190 -12
- package/dist/components/DataGrid/TableBody/LoadingCell.css +169 -65
- package/dist/components/DataGrid/TableBody/LoadingCell.js +24 -16
- package/dist/components/DataGrid/TableBody/TableBodyRow.cjs +196 -18
- package/dist/components/DataGrid/TableBody/TableBodyRow.css +169 -65
- package/dist/components/DataGrid/TableBody/TableBodyRow.js +24 -16
- package/dist/components/DataGrid/TableBody/index.cjs +211 -33
- package/dist/components/DataGrid/TableBody/index.css +169 -65
- package/dist/components/DataGrid/TableBody/index.js +24 -16
- package/dist/components/DataGrid/index.cjs +300 -122
- package/dist/components/DataGrid/index.css +169 -65
- package/dist/components/DataGrid/index.js +24 -16
- package/dist/components/DataGrid/utils.cjs +190 -12
- package/dist/components/DataGrid/utils.css +169 -65
- package/dist/components/DataGrid/utils.js +24 -16
- package/dist/components/DateInput.cjs +250 -72
- package/dist/components/DateInput.css +169 -65
- package/dist/components/DateInput.js +24 -16
- package/dist/components/DateRangeInput.cjs +250 -72
- package/dist/components/DateRangeInput.css +169 -65
- package/dist/components/DateRangeInput.js +24 -16
- 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 +197 -19
- package/dist/components/MobileDataGrid/ColumnSelector/index.css +169 -65
- package/dist/components/MobileDataGrid/ColumnSelector/index.js +24 -16
- package/dist/components/MobileDataGrid/MobileDataGridCard/index.cjs +36 -0
- package/dist/components/MobileDataGrid/MobileDataGridCard/index.js +2 -2
- package/dist/components/MobileDataGrid/MobileDataGridHeader.cjs +241 -27
- package/dist/components/MobileDataGrid/MobileDataGridHeader.css +169 -65
- package/dist/components/MobileDataGrid/MobileDataGridHeader.js +24 -16
- 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 +743 -529
- package/dist/components/MobileDataGrid/index.css +169 -65
- package/dist/components/MobileDataGrid/index.js +24 -16
- 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 +4 -4
- 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 +36 -0
- package/dist/components/SimpleTable.js +2 -2
- package/dist/components/SkeletonParagraph.js +3 -6
- 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 +694 -131
- package/dist/components/index.css +169 -65
- package/dist/components/index.js +37 -17
- package/dist/index.css +169 -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/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,17 +4395,17 @@ 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
|
|
|
@@ -4414,25 +4413,204 @@ var import_jsx_runtime48 = require("react/jsx-runtime");
|
|
|
4414
4413
|
var import_clsx33 = __toESM(require("clsx"), 1);
|
|
4415
4414
|
var import_jsx_runtime49 = require("react/jsx-runtime");
|
|
4416
4415
|
|
|
4417
|
-
// src/components/
|
|
4416
|
+
// src/components/PDFViewer/index.tsx
|
|
4417
|
+
var import_react31 = require("react");
|
|
4418
|
+
|
|
4419
|
+
// src/components/PDFViewer/PDFElement.tsx
|
|
4420
|
+
var import_react_pdf2 = require("@mikecousins/react-pdf");
|
|
4421
|
+
var import_react30 = require("react");
|
|
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
|
|
4418
4429
|
var import_clsx34 = __toESM(require("clsx"), 1);
|
|
4419
|
-
var
|
|
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/SkeletonParagraph.tsx
|
|
4593
|
+
var import_jsx_runtime57 = require("react/jsx-runtime");
|
|
4594
|
+
|
|
4595
|
+
// src/components/DataGrid/PinnedColumns.tsx
|
|
4596
|
+
var import_clsx37 = __toESM(require("clsx"), 1);
|
|
4597
|
+
var import_react36 = __toESM(require("react"), 1);
|
|
4420
4598
|
|
|
4421
4599
|
// src/components/DataGrid/ColumnSelectorHeaderCell/index.tsx
|
|
4422
|
-
var
|
|
4600
|
+
var import_react35 = require("react");
|
|
4423
4601
|
|
|
4424
4602
|
// src/components/DataGrid/ColumnSelectorHeaderCell/ColumnSelectorMenuOption.tsx
|
|
4425
|
-
var
|
|
4426
|
-
var
|
|
4603
|
+
var import_react34 = require("react");
|
|
4604
|
+
var import_jsx_runtime58 = require("react/jsx-runtime");
|
|
4427
4605
|
function ColumnSelectorMenuOption({
|
|
4428
4606
|
id,
|
|
4429
4607
|
testid,
|
|
4430
4608
|
column,
|
|
4431
4609
|
toggleColumnVisibility
|
|
4432
4610
|
}) {
|
|
4433
|
-
const [isVisible, setIsVisible] = (0,
|
|
4611
|
+
const [isVisible, setIsVisible] = (0, import_react34.useState)(column.getIsVisible());
|
|
4434
4612
|
const label = typeof column.columnDef.header === "string" ? column.columnDef.header : null;
|
|
4435
|
-
return /* @__PURE__ */ (0,
|
|
4613
|
+
return /* @__PURE__ */ (0, import_jsx_runtime58.jsx)(MenuOption, { id, testid, defaultChecked: isVisible, children: /* @__PURE__ */ (0, import_jsx_runtime58.jsx)(
|
|
4436
4614
|
Checkbox,
|
|
4437
4615
|
{
|
|
4438
4616
|
id: id ? `${id}-checkbox` : void 0,
|
|
@@ -4448,7 +4626,7 @@ function ColumnSelectorMenuOption({
|
|
|
4448
4626
|
}
|
|
4449
4627
|
|
|
4450
4628
|
// src/components/DataGrid/ColumnSelectorHeaderCell/index.tsx
|
|
4451
|
-
var
|
|
4629
|
+
var import_jsx_runtime59 = require("react/jsx-runtime");
|
|
4452
4630
|
function ColumnSelectorHeaderCell({
|
|
4453
4631
|
id,
|
|
4454
4632
|
testid,
|
|
@@ -4456,9 +4634,9 @@ function ColumnSelectorHeaderCell({
|
|
|
4456
4634
|
toggleColumnVisibility,
|
|
4457
4635
|
resetColumnVisibility
|
|
4458
4636
|
}) {
|
|
4459
|
-
const ref = (0,
|
|
4460
|
-
const [show, setShow] = (0,
|
|
4461
|
-
return /* @__PURE__ */ (0,
|
|
4637
|
+
const ref = (0, import_react35.useRef)(null);
|
|
4638
|
+
const [show, setShow] = (0, import_react35.useState)(false);
|
|
4639
|
+
return /* @__PURE__ */ (0, import_jsx_runtime59.jsxs)(
|
|
4462
4640
|
DataGridCell,
|
|
4463
4641
|
{
|
|
4464
4642
|
id,
|
|
@@ -4468,7 +4646,7 @@ function ColumnSelectorHeaderCell({
|
|
|
4468
4646
|
color: "text-secondary-normal",
|
|
4469
4647
|
ref,
|
|
4470
4648
|
children: [
|
|
4471
|
-
/* @__PURE__ */ (0,
|
|
4649
|
+
/* @__PURE__ */ (0, import_jsx_runtime59.jsx)(
|
|
4472
4650
|
Button,
|
|
4473
4651
|
{
|
|
4474
4652
|
id: id ? `${id}-button` : void 0,
|
|
@@ -4476,10 +4654,10 @@ function ColumnSelectorHeaderCell({
|
|
|
4476
4654
|
onClick: () => setShow((prev) => !prev),
|
|
4477
4655
|
variant: "navigation",
|
|
4478
4656
|
iconOnly: true,
|
|
4479
|
-
leftIcon: /* @__PURE__ */ (0,
|
|
4657
|
+
leftIcon: /* @__PURE__ */ (0, import_jsx_runtime59.jsx)(Icon, { name: "tune" })
|
|
4480
4658
|
}
|
|
4481
4659
|
),
|
|
4482
|
-
/* @__PURE__ */ (0,
|
|
4660
|
+
/* @__PURE__ */ (0, import_jsx_runtime59.jsxs)(
|
|
4483
4661
|
Menu,
|
|
4484
4662
|
{
|
|
4485
4663
|
id: id ? `${id}-menu` : void 0,
|
|
@@ -4490,7 +4668,7 @@ function ColumnSelectorHeaderCell({
|
|
|
4490
4668
|
setShow,
|
|
4491
4669
|
calculateMinMaxHeight: true,
|
|
4492
4670
|
children: [
|
|
4493
|
-
/* @__PURE__ */ (0,
|
|
4671
|
+
/* @__PURE__ */ (0, import_jsx_runtime59.jsx)(
|
|
4494
4672
|
Button,
|
|
4495
4673
|
{
|
|
4496
4674
|
id: id ? `${id}-reset-button` : void 0,
|
|
@@ -4506,7 +4684,7 @@ function ColumnSelectorHeaderCell({
|
|
|
4506
4684
|
table.getAllColumns().filter((x) => {
|
|
4507
4685
|
var _a;
|
|
4508
4686
|
return (_a = x.columnDef.meta) == null ? void 0 : _a.inVisibilityMenu;
|
|
4509
|
-
}).map((column) => /* @__PURE__ */ (0,
|
|
4687
|
+
}).map((column) => /* @__PURE__ */ (0, import_jsx_runtime59.jsx)(
|
|
4510
4688
|
ColumnSelectorMenuOption,
|
|
4511
4689
|
{
|
|
4512
4690
|
id: id ? `${id}-option-${column.id}` : void 0,
|
|
@@ -4525,7 +4703,7 @@ function ColumnSelectorHeaderCell({
|
|
|
4525
4703
|
}
|
|
4526
4704
|
|
|
4527
4705
|
// src/components/DataGrid/PinnedColumns.tsx
|
|
4528
|
-
var
|
|
4706
|
+
var import_jsx_runtime60 = require("react/jsx-runtime");
|
|
4529
4707
|
function PinnedColumns(_a) {
|
|
4530
4708
|
var _b = _a, {
|
|
4531
4709
|
id,
|
|
@@ -4557,17 +4735,17 @@ function PinnedColumns(_a) {
|
|
|
4557
4735
|
const pinnedTestId = testid ? `${pinDirection}-pinned-${testid}` : void 0;
|
|
4558
4736
|
const hasAnyHeaders = ((_a2 = headerGroups[0]) == null ? void 0 : _a2.headers.length) > 0;
|
|
4559
4737
|
if (!hasAnyHeaders && !enableColumnSelector) return;
|
|
4560
|
-
return /* @__PURE__ */ (0,
|
|
4738
|
+
return /* @__PURE__ */ (0, import_jsx_runtime60.jsxs)(
|
|
4561
4739
|
"table",
|
|
4562
4740
|
{
|
|
4563
|
-
className: (0,
|
|
4741
|
+
className: (0, import_clsx37.default)(
|
|
4564
4742
|
"flex flex-col min-h-min sticky z-20",
|
|
4565
4743
|
pinDirection === "left" ? "left-0" : "right-0"
|
|
4566
4744
|
),
|
|
4567
4745
|
"data-testid": pinnedTestId,
|
|
4568
4746
|
children: [
|
|
4569
|
-
/* @__PURE__ */ (0,
|
|
4570
|
-
return /* @__PURE__ */ (0,
|
|
4747
|
+
/* @__PURE__ */ (0, import_jsx_runtime60.jsx)("thead", { className: "sticky top-0 z-20 grid", children: headerGroups.map((headerGroup) => {
|
|
4748
|
+
return /* @__PURE__ */ (0, import_jsx_runtime60.jsxs)(
|
|
4571
4749
|
"tr",
|
|
4572
4750
|
{
|
|
4573
4751
|
"data-testid": pinnedTestId ? `${pinnedTestId}-header-row-${headerGroup.id}` : void 0,
|
|
@@ -4580,7 +4758,7 @@ function PinnedColumns(_a) {
|
|
|
4580
4758
|
}
|
|
4581
4759
|
if (typeof header.column.columnDef.header === "string") {
|
|
4582
4760
|
const customHeaderWidth = (_a3 = header.column.columnDef.meta) == null ? void 0 : _a3.headerWidth;
|
|
4583
|
-
return /* @__PURE__ */ (0,
|
|
4761
|
+
return /* @__PURE__ */ (0, import_jsx_runtime60.jsxs)(
|
|
4584
4762
|
DataCellHeader,
|
|
4585
4763
|
{
|
|
4586
4764
|
locked: true,
|
|
@@ -4588,16 +4766,16 @@ function PinnedColumns(_a) {
|
|
|
4588
4766
|
header,
|
|
4589
4767
|
center: centerHeader,
|
|
4590
4768
|
width: customHeaderWidth,
|
|
4591
|
-
className: (0,
|
|
4769
|
+
className: (0, import_clsx37.default)(
|
|
4592
4770
|
header.column.getCanSort() ? "cursor-pointer" : "cursor-grab",
|
|
4593
4771
|
"group"
|
|
4594
4772
|
),
|
|
4595
4773
|
children: [
|
|
4596
|
-
/* @__PURE__ */ (0,
|
|
4774
|
+
/* @__PURE__ */ (0, import_jsx_runtime60.jsx)(Subheader, { tall: true, children: header.column.columnDef.header }),
|
|
4597
4775
|
getSortIcon(header.column.getIsSorted()),
|
|
4598
4776
|
!header.column.getIsSorted() && header.column.getCanSort() && getSortIcon(header.column.getNextSortingOrder(), true),
|
|
4599
|
-
header.column.getSortIndex() !== -1 && table.getState().sorting.length > 1 && /* @__PURE__ */ (0,
|
|
4600
|
-
!((_b2 = header.column.columnDef.meta) == null ? void 0 : _b2.locked) && /* @__PURE__ */ (0,
|
|
4777
|
+
header.column.getSortIndex() !== -1 && table.getState().sorting.length > 1 && /* @__PURE__ */ (0, import_jsx_runtime60.jsx)(Subheader, { tall: true, children: header.column.getSortIndex() + 1 }),
|
|
4778
|
+
!((_b2 = header.column.columnDef.meta) == null ? void 0 : _b2.locked) && /* @__PURE__ */ (0, import_jsx_runtime60.jsx)(
|
|
4601
4779
|
"div",
|
|
4602
4780
|
{
|
|
4603
4781
|
onDoubleClick: (e) => {
|
|
@@ -4620,7 +4798,7 @@ function PinnedColumns(_a) {
|
|
|
4620
4798
|
header.id
|
|
4621
4799
|
);
|
|
4622
4800
|
}
|
|
4623
|
-
return /* @__PURE__ */ (0,
|
|
4801
|
+
return /* @__PURE__ */ (0, import_jsx_runtime60.jsx)(import_react36.default.Fragment, { children: ((_c = header.column.columnDef.meta) == null ? void 0 : _c.checkbox) ? /* @__PURE__ */ (0, import_jsx_runtime60.jsx)(DataGridCell, { type: "header", component: "checkbox", locked: true, children: /* @__PURE__ */ (0, import_jsx_runtime60.jsx)(
|
|
4624
4802
|
Checkbox,
|
|
4625
4803
|
{
|
|
4626
4804
|
checked: allSelectedAcrossPages,
|
|
@@ -4632,7 +4810,7 @@ function PinnedColumns(_a) {
|
|
|
4632
4810
|
header.getContext()
|
|
4633
4811
|
) }, header.id);
|
|
4634
4812
|
}),
|
|
4635
|
-
enableColumnSelector && /* @__PURE__ */ (0,
|
|
4813
|
+
enableColumnSelector && /* @__PURE__ */ (0, import_jsx_runtime60.jsx)(
|
|
4636
4814
|
ColumnSelectorHeaderCell,
|
|
4637
4815
|
{
|
|
4638
4816
|
id: id ? `${id}-column-selector` : void 0,
|
|
@@ -4649,7 +4827,7 @@ function PinnedColumns(_a) {
|
|
|
4649
4827
|
headerGroup.id
|
|
4650
4828
|
);
|
|
4651
4829
|
}) }),
|
|
4652
|
-
/* @__PURE__ */ (0,
|
|
4830
|
+
/* @__PURE__ */ (0, import_jsx_runtime60.jsx)(
|
|
4653
4831
|
TableBody,
|
|
4654
4832
|
__spreadProps(__spreadValues({
|
|
4655
4833
|
testid: pinnedTestId
|