@dmsi/wedgekit-react 0.0.139 → 0.0.141
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-4OS6APPF.js → chunk-4LXG6QNT.js} +2 -1
- package/dist/{chunk-KS4RDR6P.js → chunk-4NCDT5ZY.js} +21 -8
- package/dist/{chunk-R5TLUWDD.js → chunk-4T3DRGLF.js} +32 -30
- package/dist/{chunk-QZGUMB7T.js → chunk-4VTOTNKJ.js} +3 -0
- package/dist/{chunk-Y4HUYAI5.js → chunk-56Y5DDG3.js} +5 -2
- package/dist/{chunk-D2YP2BTN.js → chunk-5GOJRLQO.js} +10 -4
- package/dist/{chunk-J6LETUNM.js → chunk-AZ7LVLOK.js} +5 -2
- package/dist/{chunk-TTO4PL7Y.js → chunk-BATIOCXB.js} +7 -4
- package/dist/{chunk-CG2NIXZE.js → chunk-C4JGTH6G.js} +7 -3
- package/dist/{chunk-O4M2GISS.js → chunk-CYZL57LH.js} +5 -2
- package/dist/{chunk-6HIALT5L.js → chunk-E7D24OHM.js} +14 -5
- package/dist/{chunk-3ZUSYRI7.js → chunk-EPQLWHCL.js} +2 -2
- package/dist/{chunk-AY7ELVQY.js → chunk-EUXB3XKL.js} +5 -2
- package/dist/{chunk-6DONKNDT.js → chunk-EWGHVZL5.js} +2 -0
- package/dist/{chunk-VH3EJNVE.js → chunk-FFU6FB3K.js} +6 -3
- package/dist/{chunk-H6LXXGX6.js → chunk-FKMKHLQH.js} +6 -3
- package/dist/{chunk-4F6VQXKY.js → chunk-GG5JOFS6.js} +2 -1
- package/dist/{chunk-XCIBYDVK.js → chunk-GXSXCEAA.js} +25 -14
- package/dist/{chunk-VG4EPHJA.js → chunk-HVI3CL7Y.js} +6 -3
- package/dist/{chunk-AOELEEUS.js → chunk-I6GEUF6Y.js} +6 -3
- package/dist/{chunk-Z36QJ7ZF.js → chunk-J4E6Q5TM.js} +12 -9
- package/dist/{chunk-S5K22XTH.js → chunk-JWCT72WR.js} +5 -2
- package/dist/{chunk-QNQ5K7NW.js → chunk-LM5MKBPM.js} +8 -3
- package/dist/{chunk-EO3JJWFW.js → chunk-N6JVLYEE.js} +6 -3
- package/dist/{chunk-IGQVA7SC.js → chunk-NKUETCDA.js} +5 -2
- package/dist/{chunk-PCCJ7L3N.js → chunk-NMVSRA5Y.js} +12 -4
- package/dist/{chunk-X62XGQY7.js → chunk-NW2C4DL4.js} +18 -15
- package/dist/{chunk-OB3URVCR.js → chunk-PMBEIP24.js} +5 -1
- package/dist/{chunk-6UI5GABI.js → chunk-R7ELP5C5.js} +8 -5
- package/dist/{chunk-FWPJ73IK.js → chunk-SYEJVSE4.js} +3 -1
- package/dist/{chunk-WT5XXW6G.js → chunk-WFQEE2OO.js} +9 -4
- package/dist/{chunk-QTD7K43M.js → chunk-WSS2DFTP.js} +8 -6
- package/dist/{chunk-37TJJQL3.js → chunk-YR7JUKYO.js} +3 -0
- package/dist/{chunk-4JLU7TAC.js → chunk-ZFOANBWG.js} +3 -1
- package/dist/{chunk-P242H6OU.js → chunk-ZGFQN47L.js} +5 -2
- package/dist/components/AccessChangerTabItem.cjs +10 -4
- package/dist/components/AccessChangerTabItem.js +2 -2
- package/dist/components/Accordion.cjs +23 -11
- package/dist/components/Accordion.js +5 -5
- package/dist/components/Breadcrumbs.cjs +19 -8
- package/dist/components/Breadcrumbs.js +10 -5
- package/dist/components/Button.cjs +6 -3
- package/dist/components/Button.js +1 -1
- package/dist/components/CalendarRange.cjs +16 -5
- package/dist/components/CalendarRange.js +2 -2
- package/dist/components/Caption.cjs +18 -6
- package/dist/components/Caption.js +2 -2
- package/dist/components/Card.cjs +2 -1
- package/dist/components/Card.js +1 -1
- package/dist/components/Checkbox.cjs +18 -7
- package/dist/components/Checkbox.js +3 -3
- package/dist/components/ContentTab.cjs +22 -16
- package/dist/components/ContentTab.js +2 -2
- package/dist/components/ContentTabs.cjs +27 -18
- package/dist/components/ContentTabs.js +7 -4
- package/dist/components/DataGridCell.cjs +73 -39
- package/dist/components/DataGridCell.js +8 -8
- package/dist/components/DateInput.cjs +55 -35
- package/dist/components/DateInput.js +8 -4
- package/dist/components/DateRangeInput.cjs +55 -35
- package/dist/components/DateRangeInput.js +8 -4
- package/dist/components/Display.cjs +5 -2
- package/dist/components/Display.js +1 -1
- package/dist/components/FilterGroup.cjs +85 -44
- package/dist/components/FilterGroup.js +20 -10
- package/dist/components/FullViewportBox.cjs +3 -1
- package/dist/components/FullViewportBox.js +3 -1
- package/dist/components/Grid.cjs +3 -1
- package/dist/components/Grid.js +3 -1
- package/dist/components/Heading.cjs +5 -2
- package/dist/components/Heading.js +1 -1
- package/dist/components/HorizontalDivider.cjs +2 -2
- package/dist/components/HorizontalDivider.js +1 -1
- package/dist/components/Icon.cjs +5 -2
- package/dist/components/Icon.js +1 -1
- package/dist/components/Input.cjs +40 -32
- package/dist/components/Input.js +3 -3
- package/dist/components/InputGroup.cjs +11 -4
- package/dist/components/InputGroup.js +7 -3
- package/dist/components/Label.cjs +5 -2
- package/dist/components/Label.js +1 -1
- package/dist/components/Link.cjs +6 -3
- package/dist/components/Link.js +1 -1
- package/dist/components/List.cjs +3 -2
- package/dist/components/List.js +3 -2
- package/dist/components/LoadingScrim.cjs +4 -2
- package/dist/components/LoadingScrim.js +3 -2
- package/dist/components/MainBar.cjs +2 -0
- package/dist/components/MainBar.js +2 -0
- package/dist/components/Menu.cjs +3 -0
- package/dist/components/Menu.js +1 -1
- package/dist/components/MenuOption.cjs +19 -7
- package/dist/components/MenuOption.js +4 -4
- package/dist/components/MobileDataGrid.cjs +42 -18
- package/dist/components/MobileDataGrid.js +18 -11
- package/dist/components/Modal.cjs +38 -12
- package/dist/components/Modal.js +8 -8
- package/dist/components/ModalButtons.cjs +16 -6
- package/dist/components/ModalButtons.js +3 -3
- package/dist/components/ModalContent.cjs +3 -1
- package/dist/components/ModalContent.js +1 -1
- package/dist/components/ModalHeader.cjs +21 -9
- package/dist/components/ModalHeader.js +4 -4
- package/dist/components/ModalScrim.cjs +3 -1
- package/dist/components/ModalScrim.js +1 -1
- package/dist/components/NavigationTab.cjs +14 -5
- package/dist/components/NavigationTab.js +3 -3
- package/dist/components/NavigationTabs.cjs +17 -6
- package/dist/components/NavigationTabs.js +6 -4
- package/dist/components/NestedMenu.cjs +23 -9
- package/dist/components/NestedMenu.js +8 -6
- package/dist/components/Notification.cjs +32 -13
- package/dist/components/Notification.js +9 -5
- package/dist/components/OptionPill.cjs +21 -7
- package/dist/components/OptionPill.js +4 -4
- package/dist/components/PDFViewer.cjs +73 -29
- package/dist/components/PDFViewer.js +26 -20
- package/dist/components/Paragraph.cjs +6 -3
- package/dist/components/Paragraph.js +1 -1
- package/dist/components/Password.cjs +50 -37
- package/dist/components/Password.js +13 -8
- package/dist/components/PaymentOnAccountModal.cjs +135 -69
- package/dist/components/PaymentOnAccountModal.js +21 -21
- package/dist/components/ProjectBar.cjs +3 -1
- package/dist/components/ProjectBar.js +3 -1
- package/dist/components/Radio.cjs +12 -6
- package/dist/components/Radio.js +2 -2
- package/dist/components/Search.cjs +44 -32
- package/dist/components/Search.js +4 -4
- package/dist/components/Select.cjs +43 -32
- package/dist/components/Select.js +4 -4
- package/dist/components/SelectPaymentMethod.cjs +67 -29
- package/dist/components/SelectPaymentMethod.js +12 -12
- package/dist/components/SideMenu.cjs +3 -1
- package/dist/components/SideMenu.js +3 -1
- package/dist/components/SideMenuGroup.cjs +19 -8
- package/dist/components/SideMenuGroup.js +6 -4
- package/dist/components/SideMenuItem.cjs +15 -6
- package/dist/components/SideMenuItem.js +5 -2
- package/dist/components/Spinner.cjs +2 -1
- package/dist/components/Spinner.js +1 -1
- package/dist/components/Stack.cjs +6 -3
- package/dist/components/Stack.js +1 -1
- package/dist/components/StatusPill.cjs +12 -6
- package/dist/components/StatusPill.js +8 -5
- package/dist/components/Stepper.cjs +54 -38
- package/dist/components/Stepper.js +12 -7
- package/dist/components/Subheader.cjs +5 -2
- package/dist/components/Subheader.js +1 -1
- package/dist/components/Swatch.cjs +22 -10
- package/dist/components/Swatch.js +4 -4
- package/dist/components/Textarea.cjs +4 -1
- package/dist/components/Textarea.js +4 -1
- package/dist/components/Theme.cjs +2 -0
- package/dist/components/Theme.js +1 -1
- package/dist/components/Time.cjs +52 -36
- package/dist/components/Time.js +10 -5
- package/dist/components/Toast.cjs +29 -12
- package/dist/components/Toast.js +11 -6
- package/dist/components/Tooltip.cjs +3 -0
- package/dist/components/Tooltip.js +1 -1
- package/dist/components/TopBar.cjs +11 -4
- package/dist/components/TopBar.js +11 -4
- package/dist/components/Upload.cjs +30 -15
- package/dist/components/Upload.js +16 -10
- package/dist/components/index.cjs +221 -84
- package/dist/components/index.js +80 -38
- package/dist/index.css +24 -4
- package/package.json +1 -1
- package/src/components/Accordion.tsx +5 -2
- package/src/components/Breadcrumbs.tsx +9 -2
- package/src/components/Button.tsx +4 -1
- package/src/components/CalendarRange.tsx +9 -0
- package/src/components/Caption.tsx +11 -1
- package/src/components/Card.tsx +3 -2
- package/src/components/Checkbox.tsx +5 -0
- package/src/components/ContentTab.tsx +14 -12
- package/src/components/ContentTabs.tsx +6 -2
- package/src/components/DataGrid/ColumnSelectorHeaderCell/ColumnSelectorMenuOption.tsx +4 -1
- package/src/components/DataGrid/ColumnSelectorHeaderCell/index.tsx +7 -0
- package/src/components/DataGrid/PinnedColumns.tsx +8 -1
- package/src/components/DataGrid/TableBody/LoadingCell.tsx +7 -3
- package/src/components/DataGrid/TableBody/TableBodyRow.tsx +7 -1
- package/src/components/DataGrid/TableBody/index.tsx +7 -1
- package/src/components/DataGrid/index.tsx +18 -2
- package/src/components/DataGrid/types.ts +1 -0
- package/src/components/DataGridCell.tsx +12 -0
- package/src/components/DateInput.tsx +4 -0
- package/src/components/DateRangeInput.tsx +4 -0
- package/src/components/Display.tsx +3 -0
- package/src/components/FilterGroup.tsx +10 -0
- package/src/components/FullViewportBox.tsx +3 -0
- package/src/components/Grid.tsx +3 -0
- package/src/components/Heading.tsx +3 -0
- package/src/components/HorizontalDivider.tsx +2 -2
- package/src/components/Icon.tsx +3 -0
- package/src/components/Input.tsx +32 -36
- package/src/components/InputGroup.tsx +6 -2
- package/src/components/Label.tsx +3 -0
- package/src/components/Link.tsx +3 -0
- package/src/components/List.tsx +3 -1
- package/src/components/LoadingScrim.tsx +2 -1
- package/src/components/MainBar.tsx +3 -0
- package/src/components/Menu.tsx +3 -0
- package/src/components/MenuOption.tsx +4 -0
- package/src/components/MobileDataGrid.tsx +12 -3
- package/src/components/Modal.tsx +7 -0
- package/src/components/ModalButtons.tsx +5 -0
- package/src/components/ModalContent.tsx +3 -0
- package/src/components/ModalHeader.tsx +5 -1
- package/src/components/ModalScrim.tsx +3 -0
- package/src/components/NavigationTab.tsx +3 -0
- package/src/components/NavigationTabs.tsx +7 -3
- package/src/components/NestedMenu.tsx +5 -2
- package/src/components/Notification.tsx +4 -0
- package/src/components/OptionPill.tsx +5 -0
- package/src/components/PDFViewer.tsx +16 -8
- package/src/components/Paragraph.tsx +3 -0
- package/src/components/Password.tsx +7 -2
- package/src/components/PaymentOnAccountModal.tsx +6 -2
- package/src/components/ProjectBar.tsx +3 -0
- package/src/components/Radio.tsx +4 -1
- package/src/components/Search.tsx +5 -0
- package/src/components/Select.tsx +4 -0
- package/src/components/SelectPaymentMethod.tsx +17 -3
- package/src/components/SideMenu.tsx +3 -0
- package/src/components/SideMenuGroup.tsx +4 -1
- package/src/components/SideMenuItem.tsx +4 -0
- package/src/components/Spinner.tsx +3 -1
- package/src/components/Stack.tsx +3 -0
- package/src/components/StatusPill.tsx +4 -1
- package/src/components/Stepper.tsx +6 -1
- package/src/components/Subheader.tsx +3 -0
- package/src/components/Textarea.tsx +4 -1
- package/src/components/Theme.tsx +3 -0
- package/src/components/Time.tsx +7 -1
- package/src/components/Toast.tsx +8 -3
- package/src/components/Tooltip.tsx +4 -0
- package/src/components/TopBar.tsx +7 -2
- package/src/components/Upload.tsx +10 -4
|
@@ -270,17 +270,20 @@ function Icon(_a) {
|
|
|
270
270
|
var _b = _a, {
|
|
271
271
|
name,
|
|
272
272
|
size = 24,
|
|
273
|
-
variant = "outline"
|
|
273
|
+
variant = "outline",
|
|
274
|
+
testid
|
|
274
275
|
} = _b, props = __objRest(_b, [
|
|
275
276
|
"name",
|
|
276
277
|
"size",
|
|
277
|
-
"variant"
|
|
278
|
+
"variant",
|
|
279
|
+
"testid"
|
|
278
280
|
]);
|
|
279
281
|
const variantStyle = variant === "filled" ? '"FILL" 1' : '"FILL" 0';
|
|
280
282
|
const weightStyle = size === 16 ? '"wght" 400' : '"wght" 300';
|
|
281
283
|
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
282
284
|
"span",
|
|
283
285
|
__spreadProps(__spreadValues({}, props), {
|
|
286
|
+
"data-testid": testid,
|
|
284
287
|
className: (0, import_clsx2.default)(
|
|
285
288
|
"icon",
|
|
286
289
|
`icon-${size}`,
|
|
@@ -312,20 +315,23 @@ var Label = (_a) => {
|
|
|
312
315
|
className,
|
|
313
316
|
color,
|
|
314
317
|
align,
|
|
315
|
-
id
|
|
318
|
+
id,
|
|
319
|
+
testid
|
|
316
320
|
} = _b, props = __objRest(_b, [
|
|
317
321
|
"as",
|
|
318
322
|
"padded",
|
|
319
323
|
"className",
|
|
320
324
|
"color",
|
|
321
325
|
"align",
|
|
322
|
-
"id"
|
|
326
|
+
"id",
|
|
327
|
+
"testid"
|
|
323
328
|
]);
|
|
324
329
|
const Element = as;
|
|
325
330
|
return /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(
|
|
326
331
|
Element,
|
|
327
332
|
__spreadProps(__spreadValues({
|
|
328
333
|
id,
|
|
334
|
+
"data-testid": testid,
|
|
329
335
|
className: (0, import_clsx3.default)(
|
|
330
336
|
typography.label,
|
|
331
337
|
align === "left" && "text-left",
|
|
@@ -381,6 +387,7 @@ var import_jsx_runtime3 = require("react/jsx-runtime");
|
|
|
381
387
|
var InputBase = (_a) => {
|
|
382
388
|
var _b = _a, {
|
|
383
389
|
id,
|
|
390
|
+
testid,
|
|
384
391
|
before,
|
|
385
392
|
after,
|
|
386
393
|
type,
|
|
@@ -399,6 +406,7 @@ var InputBase = (_a) => {
|
|
|
399
406
|
fullWidth = true
|
|
400
407
|
} = _b, props = __objRest(_b, [
|
|
401
408
|
"id",
|
|
409
|
+
"testid",
|
|
402
410
|
"before",
|
|
403
411
|
"after",
|
|
404
412
|
"type",
|
|
@@ -463,6 +471,7 @@ var InputBase = (_a) => {
|
|
|
463
471
|
"label",
|
|
464
472
|
{
|
|
465
473
|
id,
|
|
474
|
+
"data-testid": testid,
|
|
466
475
|
htmlFor: inputId,
|
|
467
476
|
ref: inputContainerRef,
|
|
468
477
|
className: (0, import_clsx4.default)(
|
|
@@ -515,6 +524,7 @@ var InputBase = (_a) => {
|
|
|
515
524
|
required
|
|
516
525
|
}, props), attributes), {
|
|
517
526
|
id: inputId,
|
|
527
|
+
"data-testid": testid ? `${testid}-input` : void 0,
|
|
518
528
|
className: (0, import_clsx4.default)(
|
|
519
529
|
"flex-1 outline-none w-full max-w-full min-h-6 min-w-0",
|
|
520
530
|
"[appearance:textfield] [&::-webkit-outer-spin-button]:appearance-none [&::-webkit-inner-spin-button]:appearance-none",
|
|
@@ -532,7 +542,7 @@ var InputBase = (_a) => {
|
|
|
532
542
|
]
|
|
533
543
|
}
|
|
534
544
|
),
|
|
535
|
-
caption && /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("div", { id: id ? `${id}-caption` : void 0, children: caption })
|
|
545
|
+
caption && /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("div", { id: id ? `${id}-caption` : void 0, "data-testid": testid ? `${testid}-caption` : void 0, children: caption })
|
|
536
546
|
]
|
|
537
547
|
}
|
|
538
548
|
);
|
|
@@ -547,7 +557,8 @@ var Input = (_a) => {
|
|
|
547
557
|
onChange,
|
|
548
558
|
onBlur,
|
|
549
559
|
onClear,
|
|
550
|
-
id
|
|
560
|
+
id,
|
|
561
|
+
testid
|
|
551
562
|
} = _b, props = __objRest(_b, [
|
|
552
563
|
"variant",
|
|
553
564
|
"decimals",
|
|
@@ -557,30 +568,30 @@ var Input = (_a) => {
|
|
|
557
568
|
"onChange",
|
|
558
569
|
"onBlur",
|
|
559
570
|
"onClear",
|
|
560
|
-
"id"
|
|
571
|
+
"id",
|
|
572
|
+
"testid"
|
|
561
573
|
]);
|
|
562
574
|
const [internalValue, setInternalValue] = (0, import_react2.useState)("");
|
|
563
575
|
const [displayValue, setDisplayValue] = (0, import_react2.useState)("");
|
|
564
576
|
(0, import_react2.useEffect)(() => {
|
|
565
577
|
var _a2;
|
|
566
578
|
const stringValue = (_a2 = propValue == null ? void 0 : propValue.toString()) != null ? _a2 : "";
|
|
567
|
-
|
|
568
|
-
|
|
569
|
-
|
|
570
|
-
|
|
571
|
-
|
|
572
|
-
|
|
573
|
-
|
|
574
|
-
|
|
575
|
-
|
|
576
|
-
|
|
577
|
-
|
|
578
|
-
}
|
|
579
|
-
} else {
|
|
580
|
-
setInternalValue(stringValue);
|
|
581
|
-
setDisplayValue(stringValue);
|
|
579
|
+
setInternalValue(stringValue);
|
|
580
|
+
setDisplayValue(stringValue);
|
|
581
|
+
}, [propValue]);
|
|
582
|
+
(0, import_react2.useEffect)(() => {
|
|
583
|
+
var _a2;
|
|
584
|
+
if (variant !== "currency") {
|
|
585
|
+
return;
|
|
586
|
+
}
|
|
587
|
+
const stringValue = (_a2 = propValue == null ? void 0 : propValue.toString()) != null ? _a2 : "";
|
|
588
|
+
if (!stringValue) {
|
|
589
|
+
return;
|
|
582
590
|
}
|
|
583
|
-
|
|
591
|
+
const formatted = formatDecimalValue(stringValue, decimals != null ? decimals : 2);
|
|
592
|
+
setInternalValue(formatted);
|
|
593
|
+
setDisplayValue(formatCurrencyDisplay(formatted));
|
|
594
|
+
}, []);
|
|
584
595
|
const getInputProps = () => {
|
|
585
596
|
var _a2;
|
|
586
597
|
const baseProps = __spreadProps(__spreadValues(__spreadProps(__spreadValues({}, props), {
|
|
@@ -633,6 +644,7 @@ var Input = (_a) => {
|
|
|
633
644
|
Icon,
|
|
634
645
|
{
|
|
635
646
|
id: id ? `${id}-clear-button` : void 0,
|
|
647
|
+
testid: testid ? `${testid}-clear-button` : void 0,
|
|
636
648
|
name: "close",
|
|
637
649
|
onClick: handleSearchReset,
|
|
638
650
|
className: "cursor-pointer absolute right-2 bottom-2/4 translate-y-2/4"
|
|
@@ -664,14 +676,6 @@ var Input = (_a) => {
|
|
|
664
676
|
};
|
|
665
677
|
const handleChange = (e) => {
|
|
666
678
|
const rawValue = e.target.value;
|
|
667
|
-
if (variant === "search") {
|
|
668
|
-
setInternalValue(rawValue);
|
|
669
|
-
setDisplayValue(rawValue);
|
|
670
|
-
if (typeof onChange === "function") {
|
|
671
|
-
onChange(e);
|
|
672
|
-
}
|
|
673
|
-
return;
|
|
674
|
-
}
|
|
675
679
|
if (variant === "currency") {
|
|
676
680
|
const raw = rawValue.replace(/,/g, "");
|
|
677
681
|
if (raw === "") {
|
|
@@ -708,6 +712,9 @@ var Input = (_a) => {
|
|
|
708
712
|
}
|
|
709
713
|
};
|
|
710
714
|
const handleBlur = (e) => {
|
|
715
|
+
if (!internalValue) {
|
|
716
|
+
return;
|
|
717
|
+
}
|
|
711
718
|
if (variant === "currency") {
|
|
712
719
|
const formatted = formatDecimalValue(internalValue, decimals != null ? decimals : 2);
|
|
713
720
|
setInternalValue(formatted);
|
|
@@ -732,7 +739,8 @@ var Input = (_a) => {
|
|
|
732
739
|
before: getBeforeElement(),
|
|
733
740
|
after: getAfterElement(),
|
|
734
741
|
onChange: handleChange,
|
|
735
|
-
onBlur: handleBlur
|
|
742
|
+
onBlur: handleBlur,
|
|
743
|
+
testid
|
|
736
744
|
})
|
|
737
745
|
);
|
|
738
746
|
};
|
|
@@ -765,6 +773,7 @@ var import_jsx_runtime4 = require("react/jsx-runtime");
|
|
|
765
773
|
var Search = (_a) => {
|
|
766
774
|
var _b = _a, {
|
|
767
775
|
id,
|
|
776
|
+
testid,
|
|
768
777
|
label,
|
|
769
778
|
error,
|
|
770
779
|
children,
|
|
@@ -775,6 +784,7 @@ var Search = (_a) => {
|
|
|
775
784
|
removeRoundness
|
|
776
785
|
} = _b, props = __objRest(_b, [
|
|
777
786
|
"id",
|
|
787
|
+
"testid",
|
|
778
788
|
"label",
|
|
779
789
|
"error",
|
|
780
790
|
"children",
|
|
@@ -804,6 +814,7 @@ var Search = (_a) => {
|
|
|
804
814
|
Input,
|
|
805
815
|
__spreadValues({
|
|
806
816
|
id,
|
|
817
|
+
testid,
|
|
807
818
|
variant: "search",
|
|
808
819
|
inputContainerRef,
|
|
809
820
|
ref: inputRef,
|
|
@@ -859,6 +870,7 @@ var Search = (_a) => {
|
|
|
859
870
|
),
|
|
860
871
|
renderMenu ? renderMenu({
|
|
861
872
|
id: id ? `${id}-menu` : void 0,
|
|
873
|
+
testid: testid ? `${testid}-menu` : void 0,
|
|
862
874
|
positionTo: inputContainerRef,
|
|
863
875
|
show,
|
|
864
876
|
setShow,
|
|
@@ -1244,6 +1256,7 @@ var import_jsx_runtime5 = require("react/jsx-runtime");
|
|
|
1244
1256
|
var Menu = (_a) => {
|
|
1245
1257
|
var _b = _a, {
|
|
1246
1258
|
id,
|
|
1259
|
+
testid,
|
|
1247
1260
|
children,
|
|
1248
1261
|
className,
|
|
1249
1262
|
ref,
|
|
@@ -1261,6 +1274,7 @@ var Menu = (_a) => {
|
|
|
1261
1274
|
menuName
|
|
1262
1275
|
} = _b, props = __objRest(_b, [
|
|
1263
1276
|
"id",
|
|
1277
|
+
"testid",
|
|
1264
1278
|
"children",
|
|
1265
1279
|
"className",
|
|
1266
1280
|
"ref",
|
|
@@ -1341,6 +1355,7 @@ var Menu = (_a) => {
|
|
|
1341
1355
|
"div",
|
|
1342
1356
|
__spreadProps(__spreadValues({
|
|
1343
1357
|
id,
|
|
1358
|
+
"data-testid": testid,
|
|
1344
1359
|
ref: setRefs,
|
|
1345
1360
|
className: (0, import_clsx5.default)(
|
|
1346
1361
|
"shadow-4 rounded-base bg-background-grouped-primary-normal overflow-x-hidden overflow-y-auto flex flex-col outline-0",
|
|
@@ -1487,7 +1502,8 @@ var Paragraph = (_a) => {
|
|
|
1487
1502
|
addOverflow,
|
|
1488
1503
|
children,
|
|
1489
1504
|
as = "p",
|
|
1490
|
-
id
|
|
1505
|
+
id,
|
|
1506
|
+
testid
|
|
1491
1507
|
} = _b, props = __objRest(_b, [
|
|
1492
1508
|
"className",
|
|
1493
1509
|
"color",
|
|
@@ -1497,13 +1513,15 @@ var Paragraph = (_a) => {
|
|
|
1497
1513
|
"addOverflow",
|
|
1498
1514
|
"children",
|
|
1499
1515
|
"as",
|
|
1500
|
-
"id"
|
|
1516
|
+
"id",
|
|
1517
|
+
"testid"
|
|
1501
1518
|
]);
|
|
1502
1519
|
const Element = as;
|
|
1503
1520
|
return /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(
|
|
1504
1521
|
Element,
|
|
1505
1522
|
__spreadProps(__spreadValues({
|
|
1506
|
-
id
|
|
1523
|
+
id,
|
|
1524
|
+
"data-testid": testid
|
|
1507
1525
|
}, props), {
|
|
1508
1526
|
className: (0, import_clsx6.default)(
|
|
1509
1527
|
typography.paragraph,
|
|
@@ -1528,6 +1546,7 @@ Paragraph.displayName = "Paragraph";
|
|
|
1528
1546
|
var import_jsx_runtime7 = require("react/jsx-runtime");
|
|
1529
1547
|
var MenuOption = ({
|
|
1530
1548
|
id,
|
|
1549
|
+
testid,
|
|
1531
1550
|
children,
|
|
1532
1551
|
disabled = false,
|
|
1533
1552
|
variant = "normal",
|
|
@@ -1601,6 +1620,7 @@ var MenuOption = ({
|
|
|
1601
1620
|
"div",
|
|
1602
1621
|
__spreadProps(__spreadValues({
|
|
1603
1622
|
id,
|
|
1623
|
+
"data-testid": testid,
|
|
1604
1624
|
ref: actualRef,
|
|
1605
1625
|
className: (0, import_clsx7.default)(
|
|
1606
1626
|
"flex items-center cursor-pointer w-full text-left relative outline-none",
|
|
@@ -1669,6 +1689,7 @@ var MenuOption = ({
|
|
|
1669
1689
|
MenuOption,
|
|
1670
1690
|
{
|
|
1671
1691
|
id: id ? `${id}-back` : void 0,
|
|
1692
|
+
testid: testid ? `${testid}-back` : void 0,
|
|
1672
1693
|
onClick: () => {
|
|
1673
1694
|
closeSubMenuLevel == null ? void 0 : closeSubMenuLevel(currentSubMenuLevel != null ? currentSubMenuLevel : 0);
|
|
1674
1695
|
},
|
|
@@ -1713,7 +1734,8 @@ var DataGridCell = (0, import_react10.memo)(
|
|
|
1713
1734
|
error,
|
|
1714
1735
|
warning,
|
|
1715
1736
|
center,
|
|
1716
|
-
width
|
|
1737
|
+
width,
|
|
1738
|
+
testid
|
|
1717
1739
|
} = _b, props = __objRest(_b, [
|
|
1718
1740
|
"id",
|
|
1719
1741
|
"type",
|
|
@@ -1729,7 +1751,8 @@ var DataGridCell = (0, import_react10.memo)(
|
|
|
1729
1751
|
"error",
|
|
1730
1752
|
"warning",
|
|
1731
1753
|
"center",
|
|
1732
|
-
"width"
|
|
1754
|
+
"width",
|
|
1755
|
+
"testid"
|
|
1733
1756
|
]);
|
|
1734
1757
|
const Element = type === "header" ? "th" : "td";
|
|
1735
1758
|
const timerRef = (0, import_react10.useRef)(null);
|
|
@@ -1800,6 +1823,7 @@ var DataGridCell = (0, import_react10.memo)(
|
|
|
1800
1823
|
Element,
|
|
1801
1824
|
__spreadProps(__spreadValues({
|
|
1802
1825
|
id,
|
|
1826
|
+
"data-testid": testid,
|
|
1803
1827
|
className: (0, import_clsx8.default)("flex h-10", !width && "flex-1"),
|
|
1804
1828
|
style: { width }
|
|
1805
1829
|
}, props), {
|
|
@@ -1831,6 +1855,7 @@ function DataCellHeader(_a) {
|
|
|
1831
1855
|
setNodeRef,
|
|
1832
1856
|
node,
|
|
1833
1857
|
id,
|
|
1858
|
+
testid,
|
|
1834
1859
|
useMenuDefaultMinWidth
|
|
1835
1860
|
} = _b, props = __objRest(_b, [
|
|
1836
1861
|
"header",
|
|
@@ -1838,6 +1863,7 @@ function DataCellHeader(_a) {
|
|
|
1838
1863
|
"setNodeRef",
|
|
1839
1864
|
"node",
|
|
1840
1865
|
"id",
|
|
1866
|
+
"testid",
|
|
1841
1867
|
"useMenuDefaultMinWidth"
|
|
1842
1868
|
]);
|
|
1843
1869
|
var _a2;
|
|
@@ -1883,6 +1909,7 @@ function DataCellHeader(_a) {
|
|
|
1883
1909
|
DataGridCell,
|
|
1884
1910
|
__spreadProps(__spreadValues({
|
|
1885
1911
|
id,
|
|
1912
|
+
testid,
|
|
1886
1913
|
ref: setNodeRef ? setNodeRef : ref,
|
|
1887
1914
|
type: "header",
|
|
1888
1915
|
component: "header",
|
|
@@ -1896,6 +1923,7 @@ function DataCellHeader(_a) {
|
|
|
1896
1923
|
Menu,
|
|
1897
1924
|
{
|
|
1898
1925
|
id: id ? `${id}-menu` : void 0,
|
|
1926
|
+
testid: testid ? `${testid}-menu` : void 0,
|
|
1899
1927
|
ref: menuRootRef,
|
|
1900
1928
|
positionTo: node ? node : ref,
|
|
1901
1929
|
show: showMenu,
|
|
@@ -1906,14 +1934,16 @@ function DataCellHeader(_a) {
|
|
|
1906
1934
|
/* @__PURE__ */ (0, import_jsx_runtime8.jsx)(
|
|
1907
1935
|
MenuOption,
|
|
1908
1936
|
__spreadProps(__spreadValues({
|
|
1909
|
-
id: id ? `${id}-filter-option` : void 0
|
|
1937
|
+
id: id ? `${id}-filter-option` : void 0,
|
|
1938
|
+
testid: testid ? `${testid}-filter-option` : void 0
|
|
1910
1939
|
}, subMenuListeners), {
|
|
1911
1940
|
subMenu: (_b2) => {
|
|
1912
1941
|
var _c = _b2, { menuId, subMenuLevel } = _c, props2 = __objRest(_c, ["menuId", "subMenuLevel"]);
|
|
1913
1942
|
return /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)(
|
|
1914
1943
|
Menu,
|
|
1915
1944
|
__spreadProps(__spreadValues({
|
|
1916
|
-
id: id ? `${id}-filter-submenu` : void 0
|
|
1945
|
+
id: id ? `${id}-filter-submenu` : void 0,
|
|
1946
|
+
testid: testid ? `${testid}-filter-submenu` : void 0
|
|
1917
1947
|
}, props2), {
|
|
1918
1948
|
show: isMenuActive(menuId, subMenuLevel),
|
|
1919
1949
|
ref: (el) => {
|
|
@@ -1925,6 +1955,7 @@ function DataCellHeader(_a) {
|
|
|
1925
1955
|
Search,
|
|
1926
1956
|
{
|
|
1927
1957
|
id: id ? `${id}-filter-search` : void 0,
|
|
1958
|
+
testid: testid ? `${testid}-filter-search` : void 0,
|
|
1928
1959
|
onChange: (event) => {
|
|
1929
1960
|
setFilter(event.target.value);
|
|
1930
1961
|
},
|
|
@@ -1940,6 +1971,7 @@ function DataCellHeader(_a) {
|
|
|
1940
1971
|
MenuOption,
|
|
1941
1972
|
{
|
|
1942
1973
|
id: id ? `${id}-filter-contains` : void 0,
|
|
1974
|
+
testid: testid ? `${testid}-filter-contains` : void 0,
|
|
1943
1975
|
onClick: handleFilterFnChange,
|
|
1944
1976
|
before: menuOptionIcon("includesString"),
|
|
1945
1977
|
children: "Contains"
|
|
@@ -1949,6 +1981,7 @@ function DataCellHeader(_a) {
|
|
|
1949
1981
|
MenuOption,
|
|
1950
1982
|
{
|
|
1951
1983
|
id: id ? `${id}-filter-startswith` : void 0,
|
|
1984
|
+
testid: testid ? `${testid}-filter-startswith` : void 0,
|
|
1952
1985
|
onClick: handleFilterFnChange,
|
|
1953
1986
|
before: menuOptionIcon("startsWith"),
|
|
1954
1987
|
children: "Starts with"
|
|
@@ -1958,6 +1991,7 @@ function DataCellHeader(_a) {
|
|
|
1958
1991
|
MenuOption,
|
|
1959
1992
|
{
|
|
1960
1993
|
id: id ? `${id}-filter-endswith` : void 0,
|
|
1994
|
+
testid: testid ? `${testid}-filter-endswith` : void 0,
|
|
1961
1995
|
onClick: handleFilterFnChange,
|
|
1962
1996
|
before: menuOptionIcon("endsWith"),
|
|
1963
1997
|
children: "Ends with"
|
|
@@ -2163,6 +2197,7 @@ var import_react11 = __toESM(require("react"), 1);
|
|
|
2163
2197
|
var import_jsx_runtime10 = require("react/jsx-runtime");
|
|
2164
2198
|
function TableBodyRow({
|
|
2165
2199
|
id,
|
|
2200
|
+
testid,
|
|
2166
2201
|
columnVirtualizer,
|
|
2167
2202
|
row,
|
|
2168
2203
|
// rowVirtualizer,
|
|
@@ -2194,6 +2229,8 @@ function TableBodyRow({
|
|
|
2194
2229
|
isError && "!bg-background-action-critical-secondary-hover",
|
|
2195
2230
|
showFilterRow ? "even:bg-background-grouped-primary-normal odd:bg-background-grouped-secondary-normal" : "odd:bg-background-grouped-primary-normal even:bg-background-grouped-secondary-normal"
|
|
2196
2231
|
),
|
|
2232
|
+
id: id ? `${id}-row-${row.id}` : void 0,
|
|
2233
|
+
"data-testid": testid ? `${testid}-row-${row.id}` : void 0,
|
|
2197
2234
|
style: {
|
|
2198
2235
|
display: "flex",
|
|
2199
2236
|
position: "absolute",
|
|
@@ -2215,7 +2252,8 @@ function TableBodyRow({
|
|
|
2215
2252
|
return ((_a2 = cell.column.columnDef.meta) == null ? void 0 : _a2.useCustomRenderer) ? /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(import_react11.default.Fragment, { children: (0, import_react_table.flexRender)(cell.column.columnDef.cell, cell.getContext()) }, cell.id) : /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(
|
|
2216
2253
|
CellElement,
|
|
2217
2254
|
{
|
|
2218
|
-
id: id ? `${id}-cell-${cell.id}` : void 0,
|
|
2255
|
+
id: id ? `${id}-row-${row.id}-cell-${cell.id}` : void 0,
|
|
2256
|
+
testid: testid ? `${testid}-row-${row.id}-cell-${cell.id}` : void 0,
|
|
2219
2257
|
cell,
|
|
2220
2258
|
className: (0, import_clsx10.default)({
|
|
2221
2259
|
"justify-end": typeof cellValue === "number"
|
|
@@ -2225,6 +2263,7 @@ function TableBodyRow({
|
|
|
2225
2263
|
Tooltip,
|
|
2226
2264
|
{
|
|
2227
2265
|
id: id ? `${id}-tooltip-${cell.id}` : void 0,
|
|
2266
|
+
testid: testid ? `${testid}-tooltip-${cell.id}` : void 0,
|
|
2228
2267
|
showOnTruncation: true,
|
|
2229
2268
|
message: cellValue,
|
|
2230
2269
|
position: "bottom",
|
|
@@ -2250,22 +2289,25 @@ function TableBodyRow({
|
|
|
2250
2289
|
var import_jsx_runtime11 = require("react/jsx-runtime");
|
|
2251
2290
|
function LoadingCell({
|
|
2252
2291
|
id,
|
|
2292
|
+
testid,
|
|
2253
2293
|
column
|
|
2254
2294
|
}) {
|
|
2255
2295
|
const key = `loading-${column.id}`;
|
|
2256
2296
|
if (column.cell === "checkbox") {
|
|
2257
|
-
return /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(DataGridCell, { id: id ? `${id}-${key}` : void 0, children: /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(Checkbox, { id: id ? `${id}-${key}-checkbox` : void 0, disabled: true }) }, key);
|
|
2297
|
+
return /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(DataGridCell, { id: id ? `${id}-${key}` : void 0, testid: testid ? `${testid}-${key}` : void 0, children: /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(Checkbox, { id: id ? `${id}-${key}-checkbox` : void 0, testid: testid ? `${testid}-${key}-checkbox` : void 0, disabled: true }) }, key);
|
|
2258
2298
|
}
|
|
2259
2299
|
if (column.cell === "input") {
|
|
2260
2300
|
return /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(
|
|
2261
2301
|
DataGridCell,
|
|
2262
2302
|
{
|
|
2263
2303
|
id: id ? `${id}-${key}` : void 0,
|
|
2304
|
+
testid: testid ? `${testid}-${key}` : void 0,
|
|
2264
2305
|
component: "input",
|
|
2265
2306
|
children: /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(
|
|
2266
2307
|
Input,
|
|
2267
2308
|
{
|
|
2268
2309
|
id: id ? `${id}-${key}-input` : void 0,
|
|
2310
|
+
testid: testid ? `${testid}-${key}-input` : void 0,
|
|
2269
2311
|
align: "left",
|
|
2270
2312
|
disabled: true,
|
|
2271
2313
|
wrapperClassName: "!rounded-none !border-0"
|
|
@@ -2275,13 +2317,14 @@ function LoadingCell({
|
|
|
2275
2317
|
key
|
|
2276
2318
|
);
|
|
2277
2319
|
}
|
|
2278
|
-
return /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(DataGridCell, { id: id ? `${id}-${key}` : void 0, children: /* @__PURE__ */ (0, import_jsx_runtime11.jsx)("div", { className: "bg-linear-270 to-neutral-300/[24%] from-neutral-300/[12%] rounded-xs w-full max-w-25 h-6" }) }, key);
|
|
2320
|
+
return /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(DataGridCell, { id: id ? `${id}-${key}` : void 0, testid: testid ? `${testid}-${key}` : void 0, children: /* @__PURE__ */ (0, import_jsx_runtime11.jsx)("div", { className: "bg-linear-270 to-neutral-300/[24%] from-neutral-300/[12%] rounded-xs w-full max-w-25 h-6" }) }, key);
|
|
2279
2321
|
}
|
|
2280
2322
|
|
|
2281
2323
|
// src/components/DataGrid/TableBody/index.tsx
|
|
2282
2324
|
var import_jsx_runtime12 = require("react/jsx-runtime");
|
|
2283
2325
|
function TableBody({
|
|
2284
2326
|
id,
|
|
2327
|
+
testid,
|
|
2285
2328
|
columnVirtualizer,
|
|
2286
2329
|
table,
|
|
2287
2330
|
tableContainerRef,
|
|
@@ -2336,6 +2379,7 @@ function TableBody({
|
|
|
2336
2379
|
zIndex: 10
|
|
2337
2380
|
},
|
|
2338
2381
|
className: "even:bg-background-grouped-primary-normal odd:bg-background-grouped-secondary-normal",
|
|
2382
|
+
"data-testid": testid ? `${testid}-filter-row` : void 0,
|
|
2339
2383
|
children: headerGroups.flatMap(
|
|
2340
2384
|
(x) => x.headers.map((header) => {
|
|
2341
2385
|
var _a, _b, _c, _d, _e;
|
|
@@ -2343,6 +2387,7 @@ function TableBody({
|
|
|
2343
2387
|
CellElement,
|
|
2344
2388
|
{
|
|
2345
2389
|
id: id ? `${id}-filter-cell-${header.id}` : void 0,
|
|
2390
|
+
testid: testid ? `${testid}-filter-cell-${header.id}` : void 0,
|
|
2346
2391
|
noPadding: true,
|
|
2347
2392
|
cell: header,
|
|
2348
2393
|
width: ((_a = header.column.columnDef.meta) == null ? void 0 : _a.headerWidth) || (locked ? `${header.column.getSize()}px` : ""),
|
|
@@ -2353,6 +2398,7 @@ function TableBody({
|
|
|
2353
2398
|
Search,
|
|
2354
2399
|
{
|
|
2355
2400
|
id: id ? `${id}-filter-search-${header.id}` : void 0,
|
|
2401
|
+
testid: testid ? `${testid}-filter-search-${header.id}` : void 0,
|
|
2356
2402
|
removeRoundness: true,
|
|
2357
2403
|
onChange: (e) => header.column.setFilterValue(e.target.value),
|
|
2358
2404
|
value: (_d = header.column.getFilterValue()) != null ? _d : "",
|
|
@@ -2373,6 +2419,7 @@ function TableBody({
|
|
|
2373
2419
|
TableBodyRow,
|
|
2374
2420
|
{
|
|
2375
2421
|
id,
|
|
2422
|
+
testid,
|
|
2376
2423
|
columnVirtualizer,
|
|
2377
2424
|
row,
|
|
2378
2425
|
rowVirtualizer,
|
|
@@ -2397,7 +2444,7 @@ function TableBody({
|
|
|
2397
2444
|
transform: `translateY(${virtualRows[virtualRows.length - 1].start + 40}px)`
|
|
2398
2445
|
},
|
|
2399
2446
|
className: "odd:bg-background-grouped-primary-normal even:bg-background-grouped-secondary-normal",
|
|
2400
|
-
children: table.getAllLeafColumns().map((column) => /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(LoadingCell, { id, column: column.columnDef }, column.id))
|
|
2447
|
+
children: table.getAllLeafColumns().map((column) => /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(LoadingCell, { id, testid, column: column.columnDef }, column.id))
|
|
2401
2448
|
}
|
|
2402
2449
|
)
|
|
2403
2450
|
]
|
|
@@ -2414,17 +2461,20 @@ function PinnedColumns(_a) {
|
|
|
2414
2461
|
centerHeader,
|
|
2415
2462
|
allSelectedAcrossPages,
|
|
2416
2463
|
someSelectedAcrossPages,
|
|
2417
|
-
toggleSelectAllAcrossPages
|
|
2464
|
+
toggleSelectAllAcrossPages,
|
|
2465
|
+
testid
|
|
2418
2466
|
} = _b, props = __objRest(_b, [
|
|
2419
2467
|
"pinDirection",
|
|
2420
2468
|
"table",
|
|
2421
2469
|
"centerHeader",
|
|
2422
2470
|
"allSelectedAcrossPages",
|
|
2423
2471
|
"someSelectedAcrossPages",
|
|
2424
|
-
"toggleSelectAllAcrossPages"
|
|
2472
|
+
"toggleSelectAllAcrossPages",
|
|
2473
|
+
"testid"
|
|
2425
2474
|
]);
|
|
2426
2475
|
var _a2;
|
|
2427
2476
|
const headerGroups = pinDirection === "left" ? table.getLeftHeaderGroups() : table.getRightHeaderGroups();
|
|
2477
|
+
const pinnedTestId = testid ? `${pinDirection}-pinned-${testid}` : void 0;
|
|
2428
2478
|
return ((_a2 = headerGroups[0]) == null ? void 0 : _a2.headers.length) > 0 && /* @__PURE__ */ (0, import_jsx_runtime13.jsxs)(
|
|
2429
2479
|
"table",
|
|
2430
2480
|
{
|
|
@@ -2432,9 +2482,10 @@ function PinnedColumns(_a) {
|
|
|
2432
2482
|
"flex flex-col min-h-min sticky z-20",
|
|
2433
2483
|
pinDirection === "left" ? "left-0" : "right-0"
|
|
2434
2484
|
),
|
|
2485
|
+
"data-testid": pinnedTestId,
|
|
2435
2486
|
children: [
|
|
2436
2487
|
/* @__PURE__ */ (0, import_jsx_runtime13.jsx)("thead", { className: "sticky top-0 z-20 grid", children: headerGroups.map((headerGroup) => {
|
|
2437
|
-
return /* @__PURE__ */ (0, import_jsx_runtime13.jsx)("tr", { className: "flex w-full", children: headerGroup.headers.map((header) => {
|
|
2488
|
+
return /* @__PURE__ */ (0, import_jsx_runtime13.jsx)("tr", { "data-testid": pinnedTestId ? `${pinnedTestId}-header-row-${headerGroup.id}` : void 0, className: "flex w-full", children: headerGroup.headers.map((header) => {
|
|
2438
2489
|
var _a3, _b2, _c;
|
|
2439
2490
|
if (!header) {
|
|
2440
2491
|
return;
|
|
@@ -2445,6 +2496,7 @@ function PinnedColumns(_a) {
|
|
|
2445
2496
|
DataCellHeader,
|
|
2446
2497
|
{
|
|
2447
2498
|
locked: true,
|
|
2499
|
+
testid: pinnedTestId ? `${pinnedTestId}-header-${header.id}` : void 0,
|
|
2448
2500
|
header,
|
|
2449
2501
|
center: centerHeader,
|
|
2450
2502
|
width: customHeaderWidth,
|
|
@@ -2498,7 +2550,9 @@ function PinnedColumns(_a) {
|
|
|
2498
2550
|
}) }),
|
|
2499
2551
|
/* @__PURE__ */ (0, import_jsx_runtime13.jsx)(
|
|
2500
2552
|
TableBody,
|
|
2501
|
-
__spreadProps(__spreadValues({
|
|
2553
|
+
__spreadProps(__spreadValues({
|
|
2554
|
+
testid: pinnedTestId
|
|
2555
|
+
}, props), {
|
|
2502
2556
|
table,
|
|
2503
2557
|
locked: true,
|
|
2504
2558
|
pinDirection
|
|
@@ -2517,15 +2571,17 @@ var import_react13 = require("react");
|
|
|
2517
2571
|
var import_jsx_runtime14 = require("react/jsx-runtime");
|
|
2518
2572
|
function ColumnSelectorMenuOption({
|
|
2519
2573
|
id,
|
|
2574
|
+
testid,
|
|
2520
2575
|
column,
|
|
2521
2576
|
toggleColumnVisibility
|
|
2522
2577
|
}) {
|
|
2523
2578
|
const [isVisible, setIsVisible] = (0, import_react13.useState)(column.getIsVisible());
|
|
2524
2579
|
const label = typeof column.columnDef.header === "string" ? column.columnDef.header : null;
|
|
2525
|
-
return /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(MenuOption, { id, selected: isVisible, defaultChecked: isVisible, children: /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(
|
|
2580
|
+
return /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(MenuOption, { id, testid, selected: isVisible, defaultChecked: isVisible, children: /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(
|
|
2526
2581
|
Checkbox,
|
|
2527
2582
|
{
|
|
2528
2583
|
id: id ? `${id}-checkbox` : void 0,
|
|
2584
|
+
testid: testid ? `${testid}-checkbox` : void 0,
|
|
2529
2585
|
label: label != null ? label : "Unknown",
|
|
2530
2586
|
checked: isVisible,
|
|
2531
2587
|
onChange: (e) => {
|
|
@@ -2540,6 +2596,7 @@ function ColumnSelectorMenuOption({
|
|
|
2540
2596
|
var import_jsx_runtime15 = require("react/jsx-runtime");
|
|
2541
2597
|
function ColumnSelectorHeaderCell({
|
|
2542
2598
|
id,
|
|
2599
|
+
testid,
|
|
2543
2600
|
table,
|
|
2544
2601
|
toggleColumnVisibility,
|
|
2545
2602
|
resetColumnVisibility
|
|
@@ -2550,6 +2607,7 @@ function ColumnSelectorHeaderCell({
|
|
|
2550
2607
|
DataGridCell,
|
|
2551
2608
|
{
|
|
2552
2609
|
id,
|
|
2610
|
+
testid,
|
|
2553
2611
|
width: "48",
|
|
2554
2612
|
type: "header",
|
|
2555
2613
|
color: "text-secondary-normal",
|
|
@@ -2559,6 +2617,7 @@ function ColumnSelectorHeaderCell({
|
|
|
2559
2617
|
Button,
|
|
2560
2618
|
{
|
|
2561
2619
|
id: id ? `${id}-button` : void 0,
|
|
2620
|
+
testid: testid ? `${testid}-button` : void 0,
|
|
2562
2621
|
onClick: () => setShow((prev) => !prev),
|
|
2563
2622
|
variant: "navigation",
|
|
2564
2623
|
iconOnly: true,
|
|
@@ -2569,6 +2628,7 @@ function ColumnSelectorHeaderCell({
|
|
|
2569
2628
|
Menu,
|
|
2570
2629
|
{
|
|
2571
2630
|
id: id ? `${id}-menu` : void 0,
|
|
2631
|
+
testid: testid ? `${testid}-menu` : void 0,
|
|
2572
2632
|
positionTo: ref,
|
|
2573
2633
|
position: "bottom-right",
|
|
2574
2634
|
show,
|
|
@@ -2578,6 +2638,7 @@ function ColumnSelectorHeaderCell({
|
|
|
2578
2638
|
Button,
|
|
2579
2639
|
{
|
|
2580
2640
|
id: id ? `${id}-reset-button` : void 0,
|
|
2641
|
+
testid: testid ? `${testid}-reset-button` : void 0,
|
|
2581
2642
|
variant: "tertiary",
|
|
2582
2643
|
onClick: () => {
|
|
2583
2644
|
resetColumnVisibility();
|
|
@@ -2593,6 +2654,7 @@ function ColumnSelectorHeaderCell({
|
|
|
2593
2654
|
ColumnSelectorMenuOption,
|
|
2594
2655
|
{
|
|
2595
2656
|
id: id ? `${id}-option-${column.id}` : void 0,
|
|
2657
|
+
testid: testid ? `${testid}-option-${column.id}` : void 0,
|
|
2596
2658
|
column,
|
|
2597
2659
|
toggleColumnVisibility
|
|
2598
2660
|
},
|
|
@@ -2612,6 +2674,7 @@ var PAGE_SIZE_OPTIONS = [5, 10, 15, 20, 25, 30, 35];
|
|
|
2612
2674
|
var NO_RESULTS_HEIGHT = "h-[120px]";
|
|
2613
2675
|
function DataGrid({
|
|
2614
2676
|
id,
|
|
2677
|
+
testid,
|
|
2615
2678
|
data,
|
|
2616
2679
|
columns,
|
|
2617
2680
|
status,
|
|
@@ -2818,6 +2881,7 @@ function DataGrid({
|
|
|
2818
2881
|
"div",
|
|
2819
2882
|
{
|
|
2820
2883
|
id,
|
|
2884
|
+
"data-testid": testid,
|
|
2821
2885
|
className: "flex flex-col flex-1 h-full w-full rounded border border-border-primary-normal overflow-hidden text-text-primary-normal",
|
|
2822
2886
|
children: [
|
|
2823
2887
|
/* @__PURE__ */ (0, import_jsx_runtime16.jsxs)(
|
|
@@ -2832,6 +2896,7 @@ function DataGrid({
|
|
|
2832
2896
|
/* @__PURE__ */ (0, import_jsx_runtime16.jsx)(
|
|
2833
2897
|
PinnedColumns,
|
|
2834
2898
|
{
|
|
2899
|
+
testid,
|
|
2835
2900
|
pinDirection: "left",
|
|
2836
2901
|
table,
|
|
2837
2902
|
tableContainerRef: containerRef,
|
|
@@ -2843,7 +2908,7 @@ function DataGrid({
|
|
|
2843
2908
|
}
|
|
2844
2909
|
),
|
|
2845
2910
|
/* @__PURE__ */ (0, import_jsx_runtime16.jsxs)("table", { className: "flex-1 flex flex-col min-h-min", children: [
|
|
2846
|
-
/* @__PURE__ */ (0, import_jsx_runtime16.jsx)("thead", { className: "sticky top-0 z-10 grid", children: table.getCenterHeaderGroups().map((headerGroup) => /* @__PURE__ */ (0, import_jsx_runtime16.jsxs)("tr", { className: "flex w-full", children: [
|
|
2911
|
+
/* @__PURE__ */ (0, import_jsx_runtime16.jsx)("thead", { className: "sticky top-0 z-10 grid", children: table.getCenterHeaderGroups().map((headerGroup) => /* @__PURE__ */ (0, import_jsx_runtime16.jsxs)("tr", { "data-testid": testid ? `${testid}-header-row-${headerGroup.id}` : void 0, className: "flex w-full", children: [
|
|
2847
2912
|
virtualPaddingLeft ? (
|
|
2848
2913
|
// fake empty column to the left for virtualization scroll padding
|
|
2849
2914
|
/* @__PURE__ */ (0, import_jsx_runtime16.jsx)(
|
|
@@ -2866,6 +2931,7 @@ function DataGrid({
|
|
|
2866
2931
|
DraggableCellHeader,
|
|
2867
2932
|
{
|
|
2868
2933
|
id: id ? `${id}-header-${header.id}` : void 0,
|
|
2934
|
+
testid: testid ? `${testid}-header-${header.id}` : void 0,
|
|
2869
2935
|
header,
|
|
2870
2936
|
locked: (_c2 = header.column.columnDef.meta) == null ? void 0 : _c2.locked,
|
|
2871
2937
|
center: centerHeader,
|
|
@@ -2914,6 +2980,7 @@ function DataGrid({
|
|
|
2914
2980
|
DataGridCell,
|
|
2915
2981
|
{
|
|
2916
2982
|
id: id ? `${id}-header-${header.id}` : void 0,
|
|
2983
|
+
testid: testid ? `${testid}-header-${header.id}` : void 0,
|
|
2917
2984
|
type: "header",
|
|
2918
2985
|
component: "checkbox",
|
|
2919
2986
|
locked: true,
|
|
@@ -2921,6 +2988,7 @@ function DataGrid({
|
|
|
2921
2988
|
Checkbox,
|
|
2922
2989
|
{
|
|
2923
2990
|
id: id ? `${id}-select-all-checkbox` : void 0,
|
|
2991
|
+
testid: testid ? `${testid}-select-all-checkbox` : void 0,
|
|
2924
2992
|
checked: allSelectedAcrossPages,
|
|
2925
2993
|
indeterminate: someSelectedAcrossPages,
|
|
2926
2994
|
onChange: toggleSelectAllAcrossPages
|
|
@@ -2945,6 +3013,7 @@ function DataGrid({
|
|
|
2945
3013
|
ColumnSelectorHeaderCell,
|
|
2946
3014
|
{
|
|
2947
3015
|
id: id ? `${id}-column-selector` : void 0,
|
|
3016
|
+
testid: testid ? `${testid}-column-selector` : void 0,
|
|
2948
3017
|
table,
|
|
2949
3018
|
toggleColumnVisibility,
|
|
2950
3019
|
resetColumnVisibility
|
|
@@ -2955,6 +3024,7 @@ function DataGrid({
|
|
|
2955
3024
|
TableBody,
|
|
2956
3025
|
{
|
|
2957
3026
|
id,
|
|
3027
|
+
testid,
|
|
2958
3028
|
columnVirtualizer,
|
|
2959
3029
|
table,
|
|
2960
3030
|
tableContainerRef: containerRef,
|
|
@@ -2971,6 +3041,7 @@ function DataGrid({
|
|
|
2971
3041
|
/* @__PURE__ */ (0, import_jsx_runtime16.jsx)(
|
|
2972
3042
|
PinnedColumns,
|
|
2973
3043
|
{
|
|
3044
|
+
testid,
|
|
2974
3045
|
pinDirection: "right",
|
|
2975
3046
|
table,
|
|
2976
3047
|
tableContainerRef: containerRef,
|
|
@@ -2993,6 +3064,7 @@ function DataGrid({
|
|
|
2993
3064
|
componentGap,
|
|
2994
3065
|
componentPadding
|
|
2995
3066
|
),
|
|
3067
|
+
"data-testid": testid ? `${testid}-no-results` : void 0,
|
|
2996
3068
|
children: [
|
|
2997
3069
|
/* @__PURE__ */ (0, import_jsx_runtime16.jsx)(Subheader, { color: "text-secondary-normal", children: "No Results" }),
|
|
2998
3070
|
/* @__PURE__ */ (0, import_jsx_runtime16.jsx)(Paragraph, { color: "text-secondary-normal", children: "To view results, enter or update your search criteria." })
|
|
@@ -3006,6 +3078,7 @@ function DataGrid({
|
|
|
3006
3078
|
Select,
|
|
3007
3079
|
{
|
|
3008
3080
|
id: id ? `${id}-pagesize-select` : void 0,
|
|
3081
|
+
testid: testid ? `${testid}-pagesize-select` : void 0,
|
|
3009
3082
|
wrapperClassName: "!w-20",
|
|
3010
3083
|
value: pagination.pageSize.toString(),
|
|
3011
3084
|
onChange: (e) => {
|
|
@@ -3016,6 +3089,7 @@ function DataGrid({
|
|
|
3016
3089
|
Menu,
|
|
3017
3090
|
__spreadProps(__spreadValues({}, props), {
|
|
3018
3091
|
id: id ? `${id}-pagesize-menu` : void 0,
|
|
3092
|
+
testid: testid ? `${testid}-pagesize-menu` : void 0,
|
|
3019
3093
|
children: PAGE_SIZE_OPTIONS.map((option) => /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(
|
|
3020
3094
|
MenuOption,
|
|
3021
3095
|
{
|
|
@@ -3040,6 +3114,7 @@ function DataGrid({
|
|
|
3040
3114
|
Button,
|
|
3041
3115
|
{
|
|
3042
3116
|
id: id ? `${id}-prev-page-button` : void 0,
|
|
3117
|
+
testid: testid ? `${testid}-prev-page-button` : void 0,
|
|
3043
3118
|
iconOnly: true,
|
|
3044
3119
|
leftIcon: /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(Icon, { name: "chevron_left" }),
|
|
3045
3120
|
onClick: () => pagination.onPageChange(pagination.pageIndex - 1),
|
|
@@ -3063,6 +3138,7 @@ function DataGrid({
|
|
|
3063
3138
|
Button,
|
|
3064
3139
|
{
|
|
3065
3140
|
id: id ? `${id}-next-page-button` : void 0,
|
|
3141
|
+
testid: testid ? `${testid}-next-page-button` : void 0,
|
|
3066
3142
|
iconOnly: true,
|
|
3067
3143
|
leftIcon: /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(Icon, { name: "chevron_right" }),
|
|
3068
3144
|
onClick: () => pagination.onPageChange(pagination.pageIndex + 1),
|
|
@@ -3072,7 +3148,7 @@ function DataGrid({
|
|
|
3072
3148
|
)
|
|
3073
3149
|
] })
|
|
3074
3150
|
] }),
|
|
3075
|
-
status && /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(Paragraph, { children: status })
|
|
3151
|
+
status && /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(Paragraph, { testid: testid ? `${testid}-status-text` : void 0, children: status })
|
|
3076
3152
|
] })
|
|
3077
3153
|
]
|
|
3078
3154
|
}
|
|
@@ -3098,6 +3174,7 @@ var import_jsx_runtime17 = require("react/jsx-runtime");
|
|
|
3098
3174
|
var Select = (_a) => {
|
|
3099
3175
|
var _b = _a, {
|
|
3100
3176
|
id,
|
|
3177
|
+
testid,
|
|
3101
3178
|
label,
|
|
3102
3179
|
error,
|
|
3103
3180
|
children,
|
|
@@ -3111,6 +3188,7 @@ var Select = (_a) => {
|
|
|
3111
3188
|
value
|
|
3112
3189
|
} = _b, props = __objRest(_b, [
|
|
3113
3190
|
"id",
|
|
3191
|
+
"testid",
|
|
3114
3192
|
"label",
|
|
3115
3193
|
"error",
|
|
3116
3194
|
"children",
|
|
@@ -3140,6 +3218,7 @@ var Select = (_a) => {
|
|
|
3140
3218
|
InputBase,
|
|
3141
3219
|
__spreadProps(__spreadValues({
|
|
3142
3220
|
id,
|
|
3221
|
+
testid,
|
|
3143
3222
|
inputContainerRef,
|
|
3144
3223
|
ref: inputRef,
|
|
3145
3224
|
label,
|
|
@@ -3200,7 +3279,8 @@ var Subheader = (_a) => {
|
|
|
3200
3279
|
align,
|
|
3201
3280
|
color,
|
|
3202
3281
|
tall,
|
|
3203
|
-
id
|
|
3282
|
+
id,
|
|
3283
|
+
testid
|
|
3204
3284
|
} = _b, props = __objRest(_b, [
|
|
3205
3285
|
"className",
|
|
3206
3286
|
"children",
|
|
@@ -3208,13 +3288,15 @@ var Subheader = (_a) => {
|
|
|
3208
3288
|
"align",
|
|
3209
3289
|
"color",
|
|
3210
3290
|
"tall",
|
|
3211
|
-
"id"
|
|
3291
|
+
"id",
|
|
3292
|
+
"testid"
|
|
3212
3293
|
]);
|
|
3213
3294
|
const Element = as;
|
|
3214
3295
|
return /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(
|
|
3215
3296
|
Element,
|
|
3216
3297
|
__spreadProps(__spreadValues({
|
|
3217
3298
|
id,
|
|
3299
|
+
"data-testid": testid,
|
|
3218
3300
|
className: (0, import_clsx15.default)(
|
|
3219
3301
|
typography.subheader,
|
|
3220
3302
|
className,
|
|
@@ -3246,7 +3328,8 @@ var Checkbox = (_a) => {
|
|
|
3246
3328
|
onChange,
|
|
3247
3329
|
indeterminate,
|
|
3248
3330
|
paragraphClassName,
|
|
3249
|
-
id
|
|
3331
|
+
id,
|
|
3332
|
+
testid
|
|
3250
3333
|
} = _b, props = __objRest(_b, [
|
|
3251
3334
|
"label",
|
|
3252
3335
|
"error",
|
|
@@ -3256,7 +3339,8 @@ var Checkbox = (_a) => {
|
|
|
3256
3339
|
"onChange",
|
|
3257
3340
|
"indeterminate",
|
|
3258
3341
|
"paragraphClassName",
|
|
3259
|
-
"id"
|
|
3342
|
+
"id",
|
|
3343
|
+
"testid"
|
|
3260
3344
|
]);
|
|
3261
3345
|
const selected = indeterminate || checked;
|
|
3262
3346
|
const normalClassName = (0, import_clsx16.default)(
|
|
@@ -3285,6 +3369,7 @@ var Checkbox = (_a) => {
|
|
|
3285
3369
|
"label",
|
|
3286
3370
|
{
|
|
3287
3371
|
id,
|
|
3372
|
+
"data-testid": testid,
|
|
3288
3373
|
htmlFor: id ? `${id}-input` : void 0,
|
|
3289
3374
|
className: (0, import_clsx16.default)(
|
|
3290
3375
|
"flex items-center",
|
|
@@ -3298,6 +3383,7 @@ var Checkbox = (_a) => {
|
|
|
3298
3383
|
"input",
|
|
3299
3384
|
__spreadValues({
|
|
3300
3385
|
id: id ? `${id}-input` : void 0,
|
|
3386
|
+
"data-testid": testid ? `${testid}-input` : void 0,
|
|
3301
3387
|
type: "checkbox",
|
|
3302
3388
|
className: "sr-only peer",
|
|
3303
3389
|
disabled,
|
|
@@ -3329,6 +3415,7 @@ var Checkbox = (_a) => {
|
|
|
3329
3415
|
Paragraph,
|
|
3330
3416
|
{
|
|
3331
3417
|
id: id ? `${id}-label` : void 0,
|
|
3418
|
+
testid: testid ? `${testid}-label` : void 0,
|
|
3332
3419
|
as: "span",
|
|
3333
3420
|
padded: true,
|
|
3334
3421
|
className: (0, import_clsx16.default)(
|
|
@@ -3369,7 +3456,8 @@ var Button = (_a) => {
|
|
|
3369
3456
|
iconOnly = false,
|
|
3370
3457
|
colorClassName,
|
|
3371
3458
|
href,
|
|
3372
|
-
id
|
|
3459
|
+
id,
|
|
3460
|
+
testid
|
|
3373
3461
|
} = _b, props = __objRest(_b, [
|
|
3374
3462
|
"variant",
|
|
3375
3463
|
"as",
|
|
@@ -3383,7 +3471,8 @@ var Button = (_a) => {
|
|
|
3383
3471
|
"iconOnly",
|
|
3384
3472
|
"colorClassName",
|
|
3385
3473
|
"href",
|
|
3386
|
-
"id"
|
|
3474
|
+
"id",
|
|
3475
|
+
"testid"
|
|
3387
3476
|
]);
|
|
3388
3477
|
const primaryVariantStyles = variant === "primary" && (0, import_clsx17.default)(
|
|
3389
3478
|
(colorClassName == null ? void 0 : colorClassName.trim()) ? colorClassName : "text-text-on-action-primary-normal",
|
|
@@ -3471,6 +3560,7 @@ var Button = (_a) => {
|
|
|
3471
3560
|
Element,
|
|
3472
3561
|
__spreadProps(__spreadValues({
|
|
3473
3562
|
id,
|
|
3563
|
+
"data-testid": testid,
|
|
3474
3564
|
type: Element === "button" ? "button" : void 0,
|
|
3475
3565
|
className: buttonClasses
|
|
3476
3566
|
}, props), {
|
|
@@ -3480,7 +3570,7 @@ var Button = (_a) => {
|
|
|
3480
3570
|
"data-theme": variant === "navigation" ? "brand" : void 0,
|
|
3481
3571
|
children: [
|
|
3482
3572
|
leftIcon && leftIcon,
|
|
3483
|
-
!iconOnly && children && /* @__PURE__ */ (0, import_jsx_runtime20.jsx)("span", { id: id ? `${id}-label` : void 0, className: labelClasses, children }),
|
|
3573
|
+
!iconOnly && children && /* @__PURE__ */ (0, import_jsx_runtime20.jsx)("span", { id: id ? `${id}-label` : void 0, "data-testid": testid ? `${testid}-label` : void 0, className: labelClasses, children }),
|
|
3484
3574
|
rightIcon && rightIcon
|
|
3485
3575
|
]
|
|
3486
3576
|
})
|
|
@@ -3495,6 +3585,7 @@ var import_react_dom2 = require("react-dom");
|
|
|
3495
3585
|
var import_jsx_runtime21 = require("react/jsx-runtime");
|
|
3496
3586
|
var Tooltip = ({
|
|
3497
3587
|
id,
|
|
3588
|
+
testid,
|
|
3498
3589
|
message,
|
|
3499
3590
|
position = "top",
|
|
3500
3591
|
children,
|
|
@@ -3561,6 +3652,7 @@ var Tooltip = ({
|
|
|
3561
3652
|
"div",
|
|
3562
3653
|
{
|
|
3563
3654
|
id,
|
|
3655
|
+
"data-testid": testid,
|
|
3564
3656
|
ref,
|
|
3565
3657
|
className: "relative inline-grid grid-cols-[auto_1fr] items-center",
|
|
3566
3658
|
onMouseEnter: handleMouseEnter,
|
|
@@ -3572,6 +3664,7 @@ var Tooltip = ({
|
|
|
3572
3664
|
"div",
|
|
3573
3665
|
{
|
|
3574
3666
|
id: id ? `${id}-message` : void 0,
|
|
3667
|
+
"data-testid": testid ? `${testid}-message` : void 0,
|
|
3575
3668
|
ref: tooltipRef,
|
|
3576
3669
|
style: {
|
|
3577
3670
|
position: "fixed",
|
|
@@ -3621,7 +3714,8 @@ var Heading = (_a) => {
|
|
|
3621
3714
|
color,
|
|
3622
3715
|
align,
|
|
3623
3716
|
variant = "heading1",
|
|
3624
|
-
id
|
|
3717
|
+
id,
|
|
3718
|
+
testid
|
|
3625
3719
|
} = _b, props = __objRest(_b, [
|
|
3626
3720
|
"className",
|
|
3627
3721
|
"children",
|
|
@@ -3629,7 +3723,8 @@ var Heading = (_a) => {
|
|
|
3629
3723
|
"color",
|
|
3630
3724
|
"align",
|
|
3631
3725
|
"variant",
|
|
3632
|
-
"id"
|
|
3726
|
+
"id",
|
|
3727
|
+
"testid"
|
|
3633
3728
|
]);
|
|
3634
3729
|
const defaultElement = variant === "heading1" ? "h1" : variant === "heading2" ? "h2" : "h3";
|
|
3635
3730
|
const Element = as != null ? as : defaultElement;
|
|
@@ -3637,6 +3732,7 @@ var Heading = (_a) => {
|
|
|
3637
3732
|
Element,
|
|
3638
3733
|
__spreadProps(__spreadValues({
|
|
3639
3734
|
id,
|
|
3735
|
+
"data-testid": testid,
|
|
3640
3736
|
className: (0, import_clsx19.default)(
|
|
3641
3737
|
typography[variant],
|
|
3642
3738
|
className,
|
|
@@ -3668,12 +3764,14 @@ var ModalHeader = ({
|
|
|
3668
3764
|
hideCloseIcon,
|
|
3669
3765
|
headerIcon,
|
|
3670
3766
|
onClose,
|
|
3671
|
-
id
|
|
3767
|
+
id,
|
|
3768
|
+
testid
|
|
3672
3769
|
}) => {
|
|
3673
3770
|
return /* @__PURE__ */ (0, import_jsx_runtime23.jsxs)(
|
|
3674
3771
|
"div",
|
|
3675
3772
|
{
|
|
3676
3773
|
id,
|
|
3774
|
+
"data-testid": testid,
|
|
3677
3775
|
className: (0, import_clsx20.default)(
|
|
3678
3776
|
"flex justify-between items-center",
|
|
3679
3777
|
layoutPaddding,
|
|
@@ -3682,12 +3780,13 @@ var ModalHeader = ({
|
|
|
3682
3780
|
children: [
|
|
3683
3781
|
/* @__PURE__ */ (0, import_jsx_runtime23.jsxs)("div", { className: (0, import_clsx20.default)("flex items-center", layoutGroupGap), children: [
|
|
3684
3782
|
headerIcon,
|
|
3685
|
-
title && /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(Heading2, { id: id ? `${id}-title` : void 0, as: "p", children: title })
|
|
3783
|
+
title && /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(Heading2, { id: id ? `${id}-title` : void 0, testid: testid ? `${testid}-title` : void 0, as: "p", children: title })
|
|
3686
3784
|
] }),
|
|
3687
3785
|
!hideCloseIcon && /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(
|
|
3688
3786
|
Button,
|
|
3689
3787
|
{
|
|
3690
3788
|
id: id ? `${id}-close-button` : void 0,
|
|
3789
|
+
testid: testid ? `${testid}-close-button` : void 0,
|
|
3691
3790
|
iconOnly: true,
|
|
3692
3791
|
variant: "tertiary",
|
|
3693
3792
|
onClick: onClose,
|
|
@@ -3706,12 +3805,14 @@ var import_jsx_runtime24 = require("react/jsx-runtime");
|
|
|
3706
3805
|
function ModalContent({
|
|
3707
3806
|
fixedHeightScrolling,
|
|
3708
3807
|
children,
|
|
3709
|
-
id
|
|
3808
|
+
id,
|
|
3809
|
+
testid
|
|
3710
3810
|
}) {
|
|
3711
3811
|
return /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(
|
|
3712
3812
|
"div",
|
|
3713
3813
|
{
|
|
3714
3814
|
id,
|
|
3815
|
+
"data-testid": testid,
|
|
3715
3816
|
className: (0, import_clsx21.default)(
|
|
3716
3817
|
"flex-grow desktop:flex-grow-0",
|
|
3717
3818
|
layoutPaddding,
|
|
@@ -3730,12 +3831,14 @@ var ModalButtons = ({
|
|
|
3730
3831
|
onClose,
|
|
3731
3832
|
onContinue,
|
|
3732
3833
|
customActions,
|
|
3733
|
-
id
|
|
3834
|
+
id,
|
|
3835
|
+
testid
|
|
3734
3836
|
}) => {
|
|
3735
3837
|
return /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(
|
|
3736
3838
|
"div",
|
|
3737
3839
|
{
|
|
3738
3840
|
id,
|
|
3841
|
+
"data-testid": testid,
|
|
3739
3842
|
className: (0, import_clsx22.default)(
|
|
3740
3843
|
"border-t border-neutral-300 flex justify-end",
|
|
3741
3844
|
layoutPaddding,
|
|
@@ -3746,6 +3849,7 @@ var ModalButtons = ({
|
|
|
3746
3849
|
Button,
|
|
3747
3850
|
{
|
|
3748
3851
|
id: id ? `${id}-close-button` : void 0,
|
|
3852
|
+
testid: testid ? `${testid}-close-button` : void 0,
|
|
3749
3853
|
variant: "secondary",
|
|
3750
3854
|
leftIcon: /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(Icon, { name: "close", size: 24 }),
|
|
3751
3855
|
onClick: onClose,
|
|
@@ -3757,6 +3861,7 @@ var ModalButtons = ({
|
|
|
3757
3861
|
Button,
|
|
3758
3862
|
{
|
|
3759
3863
|
id: id ? `${id}-continue-button` : void 0,
|
|
3864
|
+
testid: testid ? `${testid}-continue-button` : void 0,
|
|
3760
3865
|
variant: "primary",
|
|
3761
3866
|
leftIcon: /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(Icon, { name: "check", size: 24 }),
|
|
3762
3867
|
className: "max-sm:w-full",
|
|
@@ -3779,12 +3884,14 @@ var ModalScrim = ({
|
|
|
3779
3884
|
children,
|
|
3780
3885
|
onClick,
|
|
3781
3886
|
ref,
|
|
3782
|
-
id
|
|
3887
|
+
id,
|
|
3888
|
+
testid
|
|
3783
3889
|
}) => {
|
|
3784
3890
|
return /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(
|
|
3785
3891
|
"div",
|
|
3786
3892
|
{
|
|
3787
3893
|
id,
|
|
3894
|
+
"data-testid": testid,
|
|
3788
3895
|
className: (0, import_clsx23.default)(
|
|
3789
3896
|
"overflow-y-auto h-screen transition-[visibility,opacity,background] ease-in-out duration-100 grid place-content-center desktop:p-4 group bg-neutral-600/50 fixed opacity-0",
|
|
3790
3897
|
!show && " pointer-events-none",
|
|
@@ -3875,6 +3982,7 @@ var sizes = {
|
|
|
3875
3982
|
};
|
|
3876
3983
|
var Modal = ({
|
|
3877
3984
|
id,
|
|
3985
|
+
testid,
|
|
3878
3986
|
title,
|
|
3879
3987
|
open = false,
|
|
3880
3988
|
size = "small",
|
|
@@ -3983,6 +4091,7 @@ var Modal = ({
|
|
|
3983
4091
|
ModalScrim,
|
|
3984
4092
|
{
|
|
3985
4093
|
id: id ? `${id}-scrim` : void 0,
|
|
4094
|
+
testid: testid ? `${testid}-scrim` : void 0,
|
|
3986
4095
|
size,
|
|
3987
4096
|
ref: bgRef,
|
|
3988
4097
|
show: open,
|
|
@@ -3991,6 +4100,7 @@ var Modal = ({
|
|
|
3991
4100
|
"div",
|
|
3992
4101
|
{
|
|
3993
4102
|
id,
|
|
4103
|
+
"data-testid": testid,
|
|
3994
4104
|
ref: modalRef,
|
|
3995
4105
|
className: (0, import_clsx24.default)(
|
|
3996
4106
|
"bg-white shadow-md rounded-sm flex flex-col overflow-hidden w-full opacity-0 h-fit",
|
|
@@ -4004,6 +4114,7 @@ var Modal = ({
|
|
|
4004
4114
|
ModalHeader,
|
|
4005
4115
|
{
|
|
4006
4116
|
id: id ? `${id}-header` : void 0,
|
|
4117
|
+
testid: testid ? `${testid}-header` : void 0,
|
|
4007
4118
|
title,
|
|
4008
4119
|
onClose: handleClose,
|
|
4009
4120
|
hideCloseIcon,
|
|
@@ -4014,6 +4125,7 @@ var Modal = ({
|
|
|
4014
4125
|
ModalContent,
|
|
4015
4126
|
{
|
|
4016
4127
|
id: id ? `${id}-content` : void 0,
|
|
4128
|
+
testid: testid ? `${testid}-content` : void 0,
|
|
4017
4129
|
fixedHeightScrolling: computedFixedHeightScrolling,
|
|
4018
4130
|
children
|
|
4019
4131
|
}
|
|
@@ -4022,6 +4134,7 @@ var Modal = ({
|
|
|
4022
4134
|
ModalButtons,
|
|
4023
4135
|
{
|
|
4024
4136
|
id: id ? `${id}-buttons` : void 0,
|
|
4137
|
+
testid: testid ? `${testid}-buttons` : void 0,
|
|
4025
4138
|
onClose: handleClose,
|
|
4026
4139
|
onContinue,
|
|
4027
4140
|
customActions
|
|
@@ -4099,7 +4212,8 @@ var Stack = (_a) => {
|
|
|
4099
4212
|
id,
|
|
4100
4213
|
noGap,
|
|
4101
4214
|
marginTop,
|
|
4102
|
-
marginBottom
|
|
4215
|
+
marginBottom,
|
|
4216
|
+
testid
|
|
4103
4217
|
} = _b, props = __objRest(_b, [
|
|
4104
4218
|
"children",
|
|
4105
4219
|
"items",
|
|
@@ -4135,14 +4249,16 @@ var Stack = (_a) => {
|
|
|
4135
4249
|
"id",
|
|
4136
4250
|
"noGap",
|
|
4137
4251
|
"marginTop",
|
|
4138
|
-
"marginBottom"
|
|
4252
|
+
"marginBottom",
|
|
4253
|
+
"testid"
|
|
4139
4254
|
]);
|
|
4140
4255
|
const flexClassNames = getFlexClassNames({ items, justify, grow });
|
|
4141
4256
|
const gapClassNames = useGapClassNames(sizing);
|
|
4142
4257
|
return /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(
|
|
4143
4258
|
"div",
|
|
4144
4259
|
__spreadProps(__spreadValues({
|
|
4145
|
-
id
|
|
4260
|
+
id,
|
|
4261
|
+
"data-testid": testid
|
|
4146
4262
|
}, props), {
|
|
4147
4263
|
style: {
|
|
4148
4264
|
height: height === "full" ? "100%" : height !== void 0 ? `${height}px` : void 0,
|
|
@@ -4208,10 +4324,11 @@ var Stack = (_a) => {
|
|
|
4208
4324
|
var import_clsx26 = __toESM(require("clsx"), 1);
|
|
4209
4325
|
var import_jsx_runtime29 = require("react/jsx-runtime");
|
|
4210
4326
|
function Card(props) {
|
|
4211
|
-
const _a = props, { children, selected } = _a, rest = __objRest(_a, ["children", "selected"]);
|
|
4327
|
+
const _a = props, { children, selected, testid } = _a, rest = __objRest(_a, ["children", "selected", "testid"]);
|
|
4212
4328
|
return /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(
|
|
4213
4329
|
"div",
|
|
4214
4330
|
__spreadProps(__spreadValues({}, rest), {
|
|
4331
|
+
"data-testid": testid,
|
|
4215
4332
|
className: (0, import_clsx26.default)(
|
|
4216
4333
|
"rounded-sm p-desktop-layout-padding",
|
|
4217
4334
|
selected ? "border-2 border-border-primary-focus" : "border border-border-primary-normal",
|
|
@@ -4232,7 +4349,7 @@ var import_react20 = require("react");
|
|
|
4232
4349
|
var import_clsx27 = __toESM(require("clsx"), 1);
|
|
4233
4350
|
var import_jsx_runtime30 = require("react/jsx-runtime");
|
|
4234
4351
|
function Accordion(props) {
|
|
4235
|
-
const { isOpen, onClick, className, disabled } = props;
|
|
4352
|
+
const { isOpen, onClick, className, disabled, testid } = props;
|
|
4236
4353
|
const {
|
|
4237
4354
|
title,
|
|
4238
4355
|
before,
|
|
@@ -4263,11 +4380,12 @@ function Accordion(props) {
|
|
|
4263
4380
|
),
|
|
4264
4381
|
selected: isOpen,
|
|
4265
4382
|
onClick: handleClick,
|
|
4383
|
+
testid,
|
|
4266
4384
|
children: [
|
|
4267
4385
|
/* @__PURE__ */ (0, import_jsx_runtime30.jsxs)(Stack, { sizing: "component", horizontal: true, justify: "between", items: "center", children: [
|
|
4268
4386
|
/* @__PURE__ */ (0, import_jsx_runtime30.jsxs)(Stack, { sizing: "layout-group", horizontal: true, items: "center", children: [
|
|
4269
4387
|
before,
|
|
4270
|
-
typeof title === "string" ? /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(Paragraph, { className: "text-text-primary-normal", children: title }) : title
|
|
4388
|
+
typeof title === "string" ? /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(Paragraph, { testid: testid ? `${testid}-title` : void 0, className: "text-text-primary-normal", children: title }) : title
|
|
4271
4389
|
] }),
|
|
4272
4390
|
after
|
|
4273
4391
|
] }),
|
|
@@ -4278,6 +4396,7 @@ function Accordion(props) {
|
|
|
4278
4396
|
style: {
|
|
4279
4397
|
gridTemplateRows: isOpen ? "1fr" : "0fr"
|
|
4280
4398
|
},
|
|
4399
|
+
"data-testid": testid ? `${testid}-content-container` : void 0,
|
|
4281
4400
|
children: /* @__PURE__ */ (0, import_jsx_runtime30.jsx)("div", { className: "overflow-hidden", children: /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(
|
|
4282
4401
|
"div",
|
|
4283
4402
|
{
|
|
@@ -4308,7 +4427,8 @@ var Radio = (_a) => {
|
|
|
4308
4427
|
disabled,
|
|
4309
4428
|
checked,
|
|
4310
4429
|
readOnly,
|
|
4311
|
-
id
|
|
4430
|
+
id,
|
|
4431
|
+
testid
|
|
4312
4432
|
} = _b, props = __objRest(_b, [
|
|
4313
4433
|
"className",
|
|
4314
4434
|
"label",
|
|
@@ -4316,7 +4436,8 @@ var Radio = (_a) => {
|
|
|
4316
4436
|
"disabled",
|
|
4317
4437
|
"checked",
|
|
4318
4438
|
"readOnly",
|
|
4319
|
-
"id"
|
|
4439
|
+
"id",
|
|
4440
|
+
"testid"
|
|
4320
4441
|
]);
|
|
4321
4442
|
const radioId = id;
|
|
4322
4443
|
const paragraphColor = disabled ? "text-primary-disabled" : error ? "text-primary-error" : "text-primary-normal";
|
|
@@ -4348,6 +4469,7 @@ var Radio = (_a) => {
|
|
|
4348
4469
|
"input",
|
|
4349
4470
|
__spreadValues({
|
|
4350
4471
|
id: radioId,
|
|
4472
|
+
"data-testid": testid,
|
|
4351
4473
|
type: "radio",
|
|
4352
4474
|
className: "sr-only peer",
|
|
4353
4475
|
disabled,
|
|
@@ -4381,7 +4503,7 @@ var Radio = (_a) => {
|
|
|
4381
4503
|
}
|
|
4382
4504
|
)
|
|
4383
4505
|
] }),
|
|
4384
|
-
label && /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(Paragraph, { id: `${radioId}-label
|
|
4506
|
+
label && /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(Paragraph, { id: radioId ? `${radioId}-label` : void 0, testid: testid ? `${testid}-label` : void 0, padded: true, color: paragraphColor, children: label })
|
|
4385
4507
|
]
|
|
4386
4508
|
}
|
|
4387
4509
|
);
|
|
@@ -4420,18 +4542,19 @@ RadioIcon.displayName = "RadioIcon";
|
|
|
4420
4542
|
// src/components/HorizontalDivider.tsx
|
|
4421
4543
|
var import_clsx29 = __toESM(require("clsx"), 1);
|
|
4422
4544
|
var import_jsx_runtime32 = require("react/jsx-runtime");
|
|
4423
|
-
function HorizontalDivider({ id, hideOnMobile }) {
|
|
4545
|
+
function HorizontalDivider({ id, testid, hideOnMobile }) {
|
|
4424
4546
|
const hideOnMobileStyle = (0, import_clsx29.default)(hideOnMobile && "hidden desktop:block");
|
|
4425
|
-
return /* @__PURE__ */ (0, import_jsx_runtime32.jsx)("hr", { id, className: (0, import_clsx29.default)("w-full border-t border-border-primary-normal", hideOnMobileStyle) });
|
|
4547
|
+
return /* @__PURE__ */ (0, import_jsx_runtime32.jsx)("hr", { id, "data-testid": testid, className: (0, import_clsx29.default)("w-full border-t border-border-primary-normal", hideOnMobileStyle) });
|
|
4426
4548
|
}
|
|
4427
4549
|
|
|
4428
4550
|
// src/components/Spinner.tsx
|
|
4429
4551
|
var import_jsx_runtime33 = require("react/jsx-runtime");
|
|
4430
|
-
var Spinner = ({ size = "small" }) => {
|
|
4552
|
+
var Spinner = ({ size = "small", testid }) => {
|
|
4431
4553
|
const dimension = size === "large" ? 48 : 24;
|
|
4432
4554
|
return /* @__PURE__ */ (0, import_jsx_runtime33.jsxs)(
|
|
4433
4555
|
"svg",
|
|
4434
4556
|
{
|
|
4557
|
+
"data-testid": testid,
|
|
4435
4558
|
width: dimension,
|
|
4436
4559
|
height: dimension,
|
|
4437
4560
|
viewBox: "0 0 24 24",
|
|
@@ -4551,7 +4674,8 @@ function SelectPaymentMethod(props) {
|
|
|
4551
4674
|
isPayLoading,
|
|
4552
4675
|
withCredits = false,
|
|
4553
4676
|
isLoadingCCiframe,
|
|
4554
|
-
cardPaymentUrl
|
|
4677
|
+
cardPaymentUrl,
|
|
4678
|
+
testid
|
|
4555
4679
|
} = props;
|
|
4556
4680
|
const payAllWithCredits = withCredits && amountToPay <= 0;
|
|
4557
4681
|
(0, import_react20.useEffect)(() => {
|
|
@@ -4568,6 +4692,7 @@ function SelectPaymentMethod(props) {
|
|
|
4568
4692
|
!!(allCredits == null ? void 0 : allCredits.length) && withCredits && /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(
|
|
4569
4693
|
CreditsSelector,
|
|
4570
4694
|
{
|
|
4695
|
+
testid: testid ? `${testid}-credit-selector` : void 0,
|
|
4571
4696
|
selectedCredits: selectedCredits || [],
|
|
4572
4697
|
allCredits: allCredits || [],
|
|
4573
4698
|
setSelectedCredits: props.setSelectedCredits || (() => {
|
|
@@ -4577,6 +4702,7 @@ function SelectPaymentMethod(props) {
|
|
|
4577
4702
|
(allowedMethods == null ? void 0 : allowedMethods.includes("ACHPayment")) && !!(customerBanks == null ? void 0 : customerBanks.length) && /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(
|
|
4578
4703
|
ACHSelector,
|
|
4579
4704
|
{
|
|
4705
|
+
testid: testid ? `${testid}-ach-selector` : void 0,
|
|
4580
4706
|
selectedMethod,
|
|
4581
4707
|
handleToggle,
|
|
4582
4708
|
selectedBankGuid: selectedACHBankGuid || null,
|
|
@@ -4591,10 +4717,12 @@ function SelectPaymentMethod(props) {
|
|
|
4591
4717
|
(allowedMethods == null ? void 0 : allowedMethods.includes("CCPayment")) && /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(
|
|
4592
4718
|
Accordion,
|
|
4593
4719
|
{
|
|
4720
|
+
testid: testid ? `${testid}-cc-payment` : void 0,
|
|
4594
4721
|
isOpen: !payAllWithCredits && selectedMethod === "CCPayment",
|
|
4595
4722
|
title: /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(
|
|
4596
4723
|
Radio,
|
|
4597
4724
|
{
|
|
4725
|
+
testid: testid ? `${testid}-cc-payment-radio` : void 0,
|
|
4598
4726
|
label: "Pay by Credit/Debit Card",
|
|
4599
4727
|
checked: !payAllWithCredits && selectedMethod === "CCPayment",
|
|
4600
4728
|
onChange: (e) => e.stopPropagation(),
|
|
@@ -4634,10 +4762,11 @@ function SelectPaymentMethod(props) {
|
|
|
4634
4762
|
block: true,
|
|
4635
4763
|
onClick: onPay,
|
|
4636
4764
|
disabled: isPayLoading || amountToPay <= 0,
|
|
4765
|
+
testid: testid ? `${testid}-submit-payment-button` : void 0,
|
|
4637
4766
|
children: isPayLoading ? "Processing..." : "Submit Payment"
|
|
4638
4767
|
}
|
|
4639
4768
|
),
|
|
4640
|
-
payAllWithCredits && /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(Button, { block: true, onClick: onPay, disabled: isPayLoading, children: isPayLoading ? "Processing..." : "Submit Payment" })
|
|
4769
|
+
payAllWithCredits && /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(Button, { testid: testid ? `${testid}-submit-payment-button` : void 0, block: true, onClick: onPay, disabled: isPayLoading, children: isPayLoading ? "Processing..." : "Submit Payment" })
|
|
4641
4770
|
] });
|
|
4642
4771
|
}
|
|
4643
4772
|
function ACHSelector(props) {
|
|
@@ -4647,7 +4776,8 @@ function ACHSelector(props) {
|
|
|
4647
4776
|
selectedBankGuid,
|
|
4648
4777
|
setSelectedBankGuid,
|
|
4649
4778
|
customerBanks,
|
|
4650
|
-
disabled
|
|
4779
|
+
disabled,
|
|
4780
|
+
testid
|
|
4651
4781
|
} = props;
|
|
4652
4782
|
function handleBankSelect(e, bankGuid) {
|
|
4653
4783
|
if (disabled) return;
|
|
@@ -4658,6 +4788,7 @@ function ACHSelector(props) {
|
|
|
4658
4788
|
return /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(import_jsx_runtime34.Fragment, { children: customerBanks.map((bank) => /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(
|
|
4659
4789
|
Card,
|
|
4660
4790
|
{
|
|
4791
|
+
testid: testid ? `${testid}-bank-${bank.CustBankGUID}` : void 0,
|
|
4661
4792
|
onClick: (e) => handleBankSelect(e, bank.CustBankGUID),
|
|
4662
4793
|
selected: !disabled && selectedMethod === "ACHPayment" && selectedBankGuid === bank.CustBankGUID,
|
|
4663
4794
|
children: /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(
|
|
@@ -4674,7 +4805,7 @@ function ACHSelector(props) {
|
|
|
4674
4805
|
)) });
|
|
4675
4806
|
}
|
|
4676
4807
|
function CreditsSelector(props) {
|
|
4677
|
-
const { selectedCredits, allCredits, setSelectedCredits } = props;
|
|
4808
|
+
const { selectedCredits, allCredits, setSelectedCredits, testid } = props;
|
|
4678
4809
|
const [isOpen, setIsOpen] = (0, import_react20.useState)(true);
|
|
4679
4810
|
const handleCreditSelect = (credit) => {
|
|
4680
4811
|
if (setSelectedCredits) {
|
|
@@ -4689,6 +4820,7 @@ function CreditsSelector(props) {
|
|
|
4689
4820
|
isOpen,
|
|
4690
4821
|
title: "Available Credits",
|
|
4691
4822
|
onClick: () => setIsOpen((prev) => !prev),
|
|
4823
|
+
testid,
|
|
4692
4824
|
children: [
|
|
4693
4825
|
/* @__PURE__ */ (0, import_jsx_runtime34.jsx)(HorizontalDivider, {}),
|
|
4694
4826
|
/* @__PURE__ */ (0, import_jsx_runtime34.jsx)(Stack, { sizing: "layout-group", width: "full", children: /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(
|
|
@@ -4713,9 +4845,11 @@ function CreditsSelector(props) {
|
|
|
4713
4845
|
onClick: () => handleCreditSelect(credits),
|
|
4714
4846
|
paddingY: true,
|
|
4715
4847
|
flexGrow: 1,
|
|
4848
|
+
testid: testid ? `${testid}-credit-${credits.InvoiceNumber}` : void 0,
|
|
4716
4849
|
children: /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(
|
|
4717
4850
|
Checkbox,
|
|
4718
4851
|
{
|
|
4852
|
+
testid: testid ? `${testid}-credit-${credits.InvoiceNumber}-checkbox` : void 0,
|
|
4719
4853
|
label: credits.InvoiceNumber,
|
|
4720
4854
|
checked: selectedCredits == null ? void 0 : selectedCredits.includes(credits),
|
|
4721
4855
|
onChange: () => handleCreditSelect(credits)
|
|
@@ -4723,7 +4857,7 @@ function CreditsSelector(props) {
|
|
|
4723
4857
|
)
|
|
4724
4858
|
}
|
|
4725
4859
|
),
|
|
4726
|
-
/* @__PURE__ */ (0, import_jsx_runtime34.jsxs)(Subheader, { className: " pr-desktop-component-padding", children: [
|
|
4860
|
+
/* @__PURE__ */ (0, import_jsx_runtime34.jsxs)(Subheader, { testid: testid ? `${testid}-credit-${credits.InvoiceNumber}-InvoiceBalanceDue` : void 0, className: " pr-desktop-component-padding", children: [
|
|
4727
4861
|
"$",
|
|
4728
4862
|
formatCurrencyDisplay(
|
|
4729
4863
|
`${Math.abs(credits.InvoiceBalanceDue)}`
|
|
@@ -4750,7 +4884,8 @@ function PaymentOnAccountModal(props) {
|
|
|
4750
4884
|
onAmountChange,
|
|
4751
4885
|
cardPaymentUrl,
|
|
4752
4886
|
setCardPaymentUrl,
|
|
4753
|
-
isLoadingCCiframe
|
|
4887
|
+
isLoadingCCiframe,
|
|
4888
|
+
testid
|
|
4754
4889
|
} = props;
|
|
4755
4890
|
const [amount, setAmount] = (0, import_react21.useState)(paymentProps.amountToPay);
|
|
4756
4891
|
const { creditCardSettings, selectedMethod } = paymentProps;
|
|
@@ -4778,10 +4913,10 @@ function PaymentOnAccountModal(props) {
|
|
|
4778
4913
|
}
|
|
4779
4914
|
return 0;
|
|
4780
4915
|
}, [creditCardSettings, amount, selectedMethod]);
|
|
4781
|
-
return /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(Modal, { open: isOpen, onClose, title: "Payment on Account", children: /* @__PURE__ */ (0, import_jsx_runtime35.jsxs)(Stack, { sizing: "layout-group", width: "full", children: [
|
|
4916
|
+
return /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(Modal, { testid, open: isOpen, onClose, title: "Payment on Account", children: /* @__PURE__ */ (0, import_jsx_runtime35.jsxs)(Stack, { sizing: "layout-group", width: "full", children: [
|
|
4782
4917
|
selectedMethod === "CCPayment" && /* @__PURE__ */ (0, import_jsx_runtime35.jsxs)(Stack, { horizontal: true, justify: "between", items: "center", children: [
|
|
4783
4918
|
/* @__PURE__ */ (0, import_jsx_runtime35.jsx)(Paragraph, { children: "Surcharge" }),
|
|
4784
|
-
/* @__PURE__ */ (0, import_jsx_runtime35.jsxs)(Paragraph, { children: [
|
|
4919
|
+
/* @__PURE__ */ (0, import_jsx_runtime35.jsxs)(Paragraph, { testid: testid ? `${testid}-surcharge` : void 0, children: [
|
|
4785
4920
|
"$",
|
|
4786
4921
|
formatCurrencyDisplay(creditCardSurcharge.toFixed(2))
|
|
4787
4922
|
] })
|
|
@@ -4791,6 +4926,7 @@ function PaymentOnAccountModal(props) {
|
|
|
4791
4926
|
/* @__PURE__ */ (0, import_jsx_runtime35.jsx)("div", { children: /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(
|
|
4792
4927
|
Input,
|
|
4793
4928
|
{
|
|
4929
|
+
testid: testid ? `${testid}-amount-to-pay` : void 0,
|
|
4794
4930
|
type: "number",
|
|
4795
4931
|
placeholder: "$0.00",
|
|
4796
4932
|
align: "right",
|
|
@@ -4803,6 +4939,7 @@ function PaymentOnAccountModal(props) {
|
|
|
4803
4939
|
/* @__PURE__ */ (0, import_jsx_runtime35.jsx)(
|
|
4804
4940
|
SelectPaymentMethod,
|
|
4805
4941
|
__spreadProps(__spreadValues({}, paymentProps), {
|
|
4942
|
+
testid: testid ? `${testid}-select-payment-method` : void 0,
|
|
4806
4943
|
amountToPay: amount + creditCardSurcharge,
|
|
4807
4944
|
cardPaymentUrl,
|
|
4808
4945
|
setCardPaymentUrl,
|