@dmsi/wedgekit-react 0.0.415 → 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-BK7SPR6Y.js → chunk-HYJIDHAK.js} +6 -6
- 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-NRNWEQD7.js +66 -0
- 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-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 +228 -53
- package/dist/components/CalendarRange.css +169 -65
- package/dist/components/CalendarRange.js +23 -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 +186 -11
- package/dist/components/DataGrid/ColumnSelectorHeaderCell/ColumnSelectorMenuOption.css +169 -65
- package/dist/components/DataGrid/ColumnSelectorHeaderCell/ColumnSelectorMenuOption.js +23 -16
- package/dist/components/DataGrid/ColumnSelectorHeaderCell/index.cjs +195 -20
- package/dist/components/DataGrid/ColumnSelectorHeaderCell/index.css +169 -65
- package/dist/components/DataGrid/ColumnSelectorHeaderCell/index.js +23 -16
- package/dist/components/DataGrid/PinnedColumns.cjs +211 -36
- package/dist/components/DataGrid/PinnedColumns.css +169 -65
- package/dist/components/DataGrid/PinnedColumns.js +23 -16
- package/dist/components/DataGrid/TableBody/LoadingCell.cjs +187 -12
- package/dist/components/DataGrid/TableBody/LoadingCell.css +169 -65
- package/dist/components/DataGrid/TableBody/LoadingCell.js +23 -16
- package/dist/components/DataGrid/TableBody/TableBodyRow.cjs +193 -18
- package/dist/components/DataGrid/TableBody/TableBodyRow.css +169 -65
- package/dist/components/DataGrid/TableBody/TableBodyRow.js +23 -16
- package/dist/components/DataGrid/TableBody/index.cjs +208 -33
- package/dist/components/DataGrid/TableBody/index.css +169 -65
- package/dist/components/DataGrid/TableBody/index.js +23 -16
- package/dist/components/DataGrid/index.cjs +297 -122
- package/dist/components/DataGrid/index.css +169 -65
- package/dist/components/DataGrid/index.js +23 -16
- package/dist/components/DataGrid/utils.cjs +187 -12
- package/dist/components/DataGrid/utils.css +169 -65
- package/dist/components/DataGrid/utils.js +23 -16
- package/dist/components/DateInput.cjs +247 -72
- package/dist/components/DateInput.css +169 -65
- package/dist/components/DateInput.js +23 -16
- package/dist/components/DateRangeInput.cjs +247 -72
- package/dist/components/DateRangeInput.css +169 -65
- package/dist/components/DateRangeInput.js +23 -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 +194 -19
- package/dist/components/MobileDataGrid/ColumnSelector/index.css +169 -65
- package/dist/components/MobileDataGrid/ColumnSelector/index.js +23 -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 +238 -27
- package/dist/components/MobileDataGrid/MobileDataGridHeader.css +169 -65
- package/dist/components/MobileDataGrid/MobileDataGridHeader.js +23 -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 +740 -529
- package/dist/components/MobileDataGrid/index.css +169 -65
- package/dist/components/MobileDataGrid/index.js +23 -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/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 +686 -131
- package/dist/components/index.css +169 -65
- package/dist/components/index.js +33 -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 +3 -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,201 @@ 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/DataGrid/PinnedColumns.tsx
|
|
4593
|
+
var import_clsx37 = __toESM(require("clsx"), 1);
|
|
4594
|
+
var import_react36 = __toESM(require("react"), 1);
|
|
4420
4595
|
|
|
4421
4596
|
// src/components/DataGrid/ColumnSelectorHeaderCell/index.tsx
|
|
4422
|
-
var
|
|
4597
|
+
var import_react35 = require("react");
|
|
4423
4598
|
|
|
4424
4599
|
// src/components/DataGrid/ColumnSelectorHeaderCell/ColumnSelectorMenuOption.tsx
|
|
4425
|
-
var
|
|
4426
|
-
var
|
|
4600
|
+
var import_react34 = require("react");
|
|
4601
|
+
var import_jsx_runtime57 = require("react/jsx-runtime");
|
|
4427
4602
|
function ColumnSelectorMenuOption({
|
|
4428
4603
|
id,
|
|
4429
4604
|
testid,
|
|
4430
4605
|
column,
|
|
4431
4606
|
toggleColumnVisibility
|
|
4432
4607
|
}) {
|
|
4433
|
-
const [isVisible, setIsVisible] = (0,
|
|
4608
|
+
const [isVisible, setIsVisible] = (0, import_react34.useState)(column.getIsVisible());
|
|
4434
4609
|
const label = typeof column.columnDef.header === "string" ? column.columnDef.header : null;
|
|
4435
|
-
return /* @__PURE__ */ (0,
|
|
4610
|
+
return /* @__PURE__ */ (0, import_jsx_runtime57.jsx)(MenuOption, { id, testid, defaultChecked: isVisible, children: /* @__PURE__ */ (0, import_jsx_runtime57.jsx)(
|
|
4436
4611
|
Checkbox,
|
|
4437
4612
|
{
|
|
4438
4613
|
id: id ? `${id}-checkbox` : void 0,
|
|
@@ -4448,7 +4623,7 @@ function ColumnSelectorMenuOption({
|
|
|
4448
4623
|
}
|
|
4449
4624
|
|
|
4450
4625
|
// src/components/DataGrid/ColumnSelectorHeaderCell/index.tsx
|
|
4451
|
-
var
|
|
4626
|
+
var import_jsx_runtime58 = require("react/jsx-runtime");
|
|
4452
4627
|
function ColumnSelectorHeaderCell({
|
|
4453
4628
|
id,
|
|
4454
4629
|
testid,
|
|
@@ -4456,9 +4631,9 @@ function ColumnSelectorHeaderCell({
|
|
|
4456
4631
|
toggleColumnVisibility,
|
|
4457
4632
|
resetColumnVisibility
|
|
4458
4633
|
}) {
|
|
4459
|
-
const ref = (0,
|
|
4460
|
-
const [show, setShow] = (0,
|
|
4461
|
-
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)(
|
|
4462
4637
|
DataGridCell,
|
|
4463
4638
|
{
|
|
4464
4639
|
id,
|
|
@@ -4468,7 +4643,7 @@ function ColumnSelectorHeaderCell({
|
|
|
4468
4643
|
color: "text-secondary-normal",
|
|
4469
4644
|
ref,
|
|
4470
4645
|
children: [
|
|
4471
|
-
/* @__PURE__ */ (0,
|
|
4646
|
+
/* @__PURE__ */ (0, import_jsx_runtime58.jsx)(
|
|
4472
4647
|
Button,
|
|
4473
4648
|
{
|
|
4474
4649
|
id: id ? `${id}-button` : void 0,
|
|
@@ -4476,10 +4651,10 @@ function ColumnSelectorHeaderCell({
|
|
|
4476
4651
|
onClick: () => setShow((prev) => !prev),
|
|
4477
4652
|
variant: "navigation",
|
|
4478
4653
|
iconOnly: true,
|
|
4479
|
-
leftIcon: /* @__PURE__ */ (0,
|
|
4654
|
+
leftIcon: /* @__PURE__ */ (0, import_jsx_runtime58.jsx)(Icon, { name: "tune" })
|
|
4480
4655
|
}
|
|
4481
4656
|
),
|
|
4482
|
-
/* @__PURE__ */ (0,
|
|
4657
|
+
/* @__PURE__ */ (0, import_jsx_runtime58.jsxs)(
|
|
4483
4658
|
Menu,
|
|
4484
4659
|
{
|
|
4485
4660
|
id: id ? `${id}-menu` : void 0,
|
|
@@ -4490,7 +4665,7 @@ function ColumnSelectorHeaderCell({
|
|
|
4490
4665
|
setShow,
|
|
4491
4666
|
calculateMinMaxHeight: true,
|
|
4492
4667
|
children: [
|
|
4493
|
-
/* @__PURE__ */ (0,
|
|
4668
|
+
/* @__PURE__ */ (0, import_jsx_runtime58.jsx)(
|
|
4494
4669
|
Button,
|
|
4495
4670
|
{
|
|
4496
4671
|
id: id ? `${id}-reset-button` : void 0,
|
|
@@ -4506,7 +4681,7 @@ function ColumnSelectorHeaderCell({
|
|
|
4506
4681
|
table.getAllColumns().filter((x) => {
|
|
4507
4682
|
var _a;
|
|
4508
4683
|
return (_a = x.columnDef.meta) == null ? void 0 : _a.inVisibilityMenu;
|
|
4509
|
-
}).map((column) => /* @__PURE__ */ (0,
|
|
4684
|
+
}).map((column) => /* @__PURE__ */ (0, import_jsx_runtime58.jsx)(
|
|
4510
4685
|
ColumnSelectorMenuOption,
|
|
4511
4686
|
{
|
|
4512
4687
|
id: id ? `${id}-option-${column.id}` : void 0,
|
|
@@ -4525,7 +4700,7 @@ function ColumnSelectorHeaderCell({
|
|
|
4525
4700
|
}
|
|
4526
4701
|
|
|
4527
4702
|
// src/components/DataGrid/PinnedColumns.tsx
|
|
4528
|
-
var
|
|
4703
|
+
var import_jsx_runtime59 = require("react/jsx-runtime");
|
|
4529
4704
|
function PinnedColumns(_a) {
|
|
4530
4705
|
var _b = _a, {
|
|
4531
4706
|
id,
|
|
@@ -4557,17 +4732,17 @@ function PinnedColumns(_a) {
|
|
|
4557
4732
|
const pinnedTestId = testid ? `${pinDirection}-pinned-${testid}` : void 0;
|
|
4558
4733
|
const hasAnyHeaders = ((_a2 = headerGroups[0]) == null ? void 0 : _a2.headers.length) > 0;
|
|
4559
4734
|
if (!hasAnyHeaders && !enableColumnSelector) return;
|
|
4560
|
-
return /* @__PURE__ */ (0,
|
|
4735
|
+
return /* @__PURE__ */ (0, import_jsx_runtime59.jsxs)(
|
|
4561
4736
|
"table",
|
|
4562
4737
|
{
|
|
4563
|
-
className: (0,
|
|
4738
|
+
className: (0, import_clsx37.default)(
|
|
4564
4739
|
"flex flex-col min-h-min sticky z-20",
|
|
4565
4740
|
pinDirection === "left" ? "left-0" : "right-0"
|
|
4566
4741
|
),
|
|
4567
4742
|
"data-testid": pinnedTestId,
|
|
4568
4743
|
children: [
|
|
4569
|
-
/* @__PURE__ */ (0,
|
|
4570
|
-
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)(
|
|
4571
4746
|
"tr",
|
|
4572
4747
|
{
|
|
4573
4748
|
"data-testid": pinnedTestId ? `${pinnedTestId}-header-row-${headerGroup.id}` : void 0,
|
|
@@ -4580,7 +4755,7 @@ function PinnedColumns(_a) {
|
|
|
4580
4755
|
}
|
|
4581
4756
|
if (typeof header.column.columnDef.header === "string") {
|
|
4582
4757
|
const customHeaderWidth = (_a3 = header.column.columnDef.meta) == null ? void 0 : _a3.headerWidth;
|
|
4583
|
-
return /* @__PURE__ */ (0,
|
|
4758
|
+
return /* @__PURE__ */ (0, import_jsx_runtime59.jsxs)(
|
|
4584
4759
|
DataCellHeader,
|
|
4585
4760
|
{
|
|
4586
4761
|
locked: true,
|
|
@@ -4588,16 +4763,16 @@ function PinnedColumns(_a) {
|
|
|
4588
4763
|
header,
|
|
4589
4764
|
center: centerHeader,
|
|
4590
4765
|
width: customHeaderWidth,
|
|
4591
|
-
className: (0,
|
|
4766
|
+
className: (0, import_clsx37.default)(
|
|
4592
4767
|
header.column.getCanSort() ? "cursor-pointer" : "cursor-grab",
|
|
4593
4768
|
"group"
|
|
4594
4769
|
),
|
|
4595
4770
|
children: [
|
|
4596
|
-
/* @__PURE__ */ (0,
|
|
4771
|
+
/* @__PURE__ */ (0, import_jsx_runtime59.jsx)(Subheader, { tall: true, children: header.column.columnDef.header }),
|
|
4597
4772
|
getSortIcon(header.column.getIsSorted()),
|
|
4598
4773
|
!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,
|
|
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)(
|
|
4601
4776
|
"div",
|
|
4602
4777
|
{
|
|
4603
4778
|
onDoubleClick: (e) => {
|
|
@@ -4620,7 +4795,7 @@ function PinnedColumns(_a) {
|
|
|
4620
4795
|
header.id
|
|
4621
4796
|
);
|
|
4622
4797
|
}
|
|
4623
|
-
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)(
|
|
4624
4799
|
Checkbox,
|
|
4625
4800
|
{
|
|
4626
4801
|
checked: allSelectedAcrossPages,
|
|
@@ -4632,7 +4807,7 @@ function PinnedColumns(_a) {
|
|
|
4632
4807
|
header.getContext()
|
|
4633
4808
|
) }, header.id);
|
|
4634
4809
|
}),
|
|
4635
|
-
enableColumnSelector && /* @__PURE__ */ (0,
|
|
4810
|
+
enableColumnSelector && /* @__PURE__ */ (0, import_jsx_runtime59.jsx)(
|
|
4636
4811
|
ColumnSelectorHeaderCell,
|
|
4637
4812
|
{
|
|
4638
4813
|
id: id ? `${id}-column-selector` : void 0,
|
|
@@ -4649,7 +4824,7 @@ function PinnedColumns(_a) {
|
|
|
4649
4824
|
headerGroup.id
|
|
4650
4825
|
);
|
|
4651
4826
|
}) }),
|
|
4652
|
-
/* @__PURE__ */ (0,
|
|
4827
|
+
/* @__PURE__ */ (0, import_jsx_runtime59.jsx)(
|
|
4653
4828
|
TableBody,
|
|
4654
4829
|
__spreadProps(__spreadValues({
|
|
4655
4830
|
testid: pinnedTestId
|