@servicetitan/anvil2 1.48.0 → 1.48.1
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/CHANGELOG.md +14 -0
- package/dist/{Calendar-Bv7N3SoB.js → Calendar-8bP4LsQV.js} +2 -2
- package/dist/{Calendar-Bv7N3SoB.js.map → Calendar-8bP4LsQV.js.map} +1 -1
- package/dist/{Calendar-BWETPlKE.js → Calendar-NDOcurOz.js} +2 -2
- package/dist/{Calendar-BWETPlKE.js.map → Calendar-NDOcurOz.js.map} +1 -1
- package/dist/Calendar.js +2 -2
- package/dist/{DataTable-BHI2ONJ-.js → DataTable-xUON92DR.js} +293 -123
- package/dist/DataTable-xUON92DR.js.map +1 -0
- package/dist/DataTable.css +86 -83
- package/dist/{DateField-HeK2wOzu.js → DateField-Cm0FIG3Y.js} +4 -4
- package/dist/{DateField-HeK2wOzu.js.map → DateField-Cm0FIG3Y.js.map} +1 -1
- package/dist/DateField.js +1 -1
- package/dist/{DateFieldRange-GNPGcfcD.js → DateFieldRange-CGGqW_cg.js} +4 -4
- package/dist/{DateFieldRange-GNPGcfcD.js.map → DateFieldRange-CGGqW_cg.js.map} +1 -1
- package/dist/DateFieldRange.js +1 -1
- package/dist/{DateFieldSingle-CvKdVIqR.js → DateFieldSingle-BYWuJ3IL.js} +4 -4
- package/dist/{DateFieldSingle-CvKdVIqR.js.map → DateFieldSingle-BYWuJ3IL.js.map} +1 -1
- package/dist/DateFieldSingle.js +1 -1
- package/dist/{DateFieldYearless-B801SnxH.js → DateFieldYearless-BXRgNWzy.js} +2 -2
- package/dist/{DateFieldYearless-B801SnxH.js.map → DateFieldYearless-BXRgNWzy.js.map} +1 -1
- package/dist/DateFieldYearless.js +1 -1
- package/dist/{DaysOfTheWeek-BJErLzD2.js → DaysOfTheWeek-BIi9dyJP.js} +4 -3
- package/dist/DaysOfTheWeek-BIi9dyJP.js.map +1 -0
- package/dist/DaysOfTheWeek.js +1 -1
- package/dist/{InputMask-BOkWmhsv.js → InputMask-B6oJlChY.js} +2 -2
- package/dist/{InputMask-BOkWmhsv.js.map → InputMask-B6oJlChY.js.map} +1 -1
- package/dist/InputMask.js +1 -1
- package/dist/{ListView-kfwvU4Z-.js → ListView-fBFSagWO.js} +4 -2
- package/dist/ListView-fBFSagWO.js.map +1 -0
- package/dist/ListView.js +1 -1
- package/dist/{NumberField-CjvsSokL.js → NumberField-CNskrtsN.js} +4 -3
- package/dist/{NumberField-CjvsSokL.js.map → NumberField-CNskrtsN.js.map} +1 -1
- package/dist/NumberField.js +1 -1
- package/dist/{Pagination-p734If5z.js → Pagination-CQjNN1yN.js} +3 -2
- package/dist/{Pagination-p734If5z.js.map → Pagination-CQjNN1yN.js.map} +1 -1
- package/dist/Pagination.js +1 -1
- package/dist/{Radio-CLaDEpuU.js → Radio-CTYs8JpI.js} +2 -2
- package/dist/{Radio-CLaDEpuU.js.map → Radio-CTYs8JpI.js.map} +1 -1
- package/dist/Radio.js +2 -2
- package/dist/{RadioGroup-DMJqrF4q.js → RadioGroup-BVGnsTuG.js} +2 -2
- package/dist/RadioGroup-BVGnsTuG.js.map +1 -0
- package/dist/{SelectCard-BORQF-zC.js → SelectCard-Dw7zW0UN.js} +2 -2
- package/dist/{SelectCard-BORQF-zC.js.map → SelectCard-Dw7zW0UN.js.map} +1 -1
- package/dist/SelectCard.js +1 -1
- package/dist/Table.js +1 -1
- package/dist/{TextField-3szrbqNi.js → TextField-CUrYEZR4.js} +2 -2
- package/dist/{TextField-3szrbqNi.js.map → TextField-CUrYEZR4.js.map} +1 -1
- package/dist/{TextField-DmddoTnj.js → TextField-DPTJjF8V.js} +4 -3
- package/dist/TextField-DPTJjF8V.js.map +1 -0
- package/dist/TextField.js +1 -1
- package/dist/{Textarea-CJG9i528.js → Textarea-f0jAKcvn.js} +4 -3
- package/dist/{Textarea-CJG9i528.js.map → Textarea-f0jAKcvn.js.map} +1 -1
- package/dist/Textarea.js +1 -1
- package/dist/{TimeField-BfxAImzQ.js → TimeField-CGSwrpl0.js} +2 -2
- package/dist/{TimeField-BfxAImzQ.js.map → TimeField-CGSwrpl0.js.map} +1 -1
- package/dist/TimeField.js +1 -1
- package/dist/{Toolbar-hhk9ZQ9l.js → Toolbar-CcJa_YpH.js} +6 -6
- package/dist/{Toolbar-hhk9ZQ9l.js.map → Toolbar-CcJa_YpH.js.map} +1 -1
- package/dist/Toolbar.js +1 -1
- package/dist/anvil-fonts.css +30 -0
- package/dist/beta/components/Table/DataTable/DataTable.d.ts +22 -1
- package/dist/beta/components/Table/DataTable/DataTable.test-data.d.ts +1 -0
- package/dist/beta/components/Table/DataTable/internal/DataTableContext.d.ts +1 -2
- package/dist/beta/components/Table/DataTable/internal/DataTablePagination.d.ts +3 -0
- package/dist/beta/components/Table/DataTable/internal/useDataTableContext.d.ts +4 -0
- package/dist/beta/components/Table/DataTable/stories/DataTable.story-data.d.ts +1 -0
- package/dist/beta/components/Table/DataTable/types.d.ts +43 -0
- package/dist/beta/components/Table/createColumnHelper.d.ts +1 -2
- package/dist/beta/components/Table/index.d.ts +1 -0
- package/dist/beta.js +4 -4
- package/dist/index.js +18 -17
- package/dist/index.js.map +1 -1
- package/dist/index2.css +0 -30
- package/dist/{utils-ComsNTho.js → utils-CyPyKUVh.js} +2 -2
- package/dist/{utils-ComsNTho.js.map → utils-CyPyKUVh.js.map} +1 -1
- package/package.json +3 -3
- package/dist/DataTable-BHI2ONJ-.js.map +0 -1
- package/dist/DaysOfTheWeek-BJErLzD2.js.map +0 -1
- package/dist/ListView-kfwvU4Z-.js.map +0 -1
- package/dist/RadioGroup-DMJqrF4q.js.map +0 -1
- package/dist/TextField-DmddoTnj.js.map +0 -1
|
@@ -12,27 +12,39 @@ import { S as SrOnly } from './SrOnly-CTsYSuby.js';
|
|
|
12
12
|
import { M as Menu } from './Menu-CBbUK_sX.js';
|
|
13
13
|
import { P as Popover } from './Popover--c9PXAVi.js';
|
|
14
14
|
import { S as SearchField } from './SearchField-DLqva3o3.js';
|
|
15
|
-
import { L as ListView } from './ListView-
|
|
15
|
+
import { L as ListView } from './ListView-fBFSagWO.js';
|
|
16
16
|
import { u as useLayoutPropsUtil } from './useLayoutPropsUtil-C7FVYB8F.js';
|
|
17
|
+
import './anvil-fonts.css';import './DataTable.css';/* empty css */
|
|
18
|
+
import { P as Pagination } from './Pagination-CQjNN1yN.js';
|
|
19
|
+
import { S as Spinner } from './Spinner-xEFwsq8_.js';
|
|
17
20
|
import { u as useOptionallyControlledState } from './useOptionallyControlledState-DbDuos5L.js';
|
|
18
21
|
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
"table-header-cell
|
|
22
|
+
function createColumnHelper$1() {
|
|
23
|
+
return function createColumn(id, column) {
|
|
24
|
+
if (typeof id === "object" && "group" in id) {
|
|
25
|
+
return { id: id.group, ...column };
|
|
26
|
+
}
|
|
27
|
+
return { id, ...column };
|
|
28
|
+
};
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
const styles$e = {
|
|
32
|
+
"table-header-cell": "_table-header-cell_1ffr7_2",
|
|
33
|
+
"table-body-cell": "_table-body-cell_1ffr7_3",
|
|
34
|
+
"table-footer-cell": "_table-footer-cell_1ffr7_4",
|
|
35
|
+
"last-pinned-left-column": "_last-pinned-left-column_1ffr7_33",
|
|
36
|
+
"first-pinned-right-column": "_first-pinned-right-column_1ffr7_33",
|
|
37
|
+
"empty-cell": "_empty-cell_1ffr7_54",
|
|
38
|
+
"table-cell-internal-select": "_table-cell-internal-select_1ffr7_71",
|
|
39
|
+
"table-cell-internal-expand": "_table-cell-internal-expand_1ffr7_72",
|
|
40
|
+
"table-header-cell-group": "_table-header-cell-group_1ffr7_91",
|
|
41
|
+
"table-header-cell-sortable": "_table-header-cell-sortable_1ffr7_100"};
|
|
30
42
|
|
|
31
43
|
const TableEmptyCellContent = () => {
|
|
32
|
-
return /* @__PURE__ */ jsx("span", { "aria-label": "empty table cell", className: styles$
|
|
44
|
+
return /* @__PURE__ */ jsx("span", { "aria-label": "empty table cell", className: styles$e["empty-cell"], children: "—" });
|
|
33
45
|
};
|
|
34
46
|
|
|
35
|
-
const styles$
|
|
47
|
+
const styles$d = {
|
|
36
48
|
"truncate-chips": "_truncate-chips_1lgyk_2"
|
|
37
49
|
};
|
|
38
50
|
|
|
@@ -118,7 +130,7 @@ const TruncateChips = ({
|
|
|
118
130
|
"div",
|
|
119
131
|
{
|
|
120
132
|
ref: containerRef,
|
|
121
|
-
className: cx(styles$
|
|
133
|
+
className: cx(styles$d["truncate-chips"], className),
|
|
122
134
|
style: {
|
|
123
135
|
marginInlineEnd: plusChipWidth
|
|
124
136
|
},
|
|
@@ -3472,7 +3484,7 @@ function useReactTable(options) {
|
|
|
3472
3484
|
return tableRef.current;
|
|
3473
3485
|
}
|
|
3474
3486
|
|
|
3475
|
-
const styles$
|
|
3487
|
+
const styles$c = {
|
|
3476
3488
|
"table-base": "_table-base_wtnhx_2"
|
|
3477
3489
|
};
|
|
3478
3490
|
|
|
@@ -3481,7 +3493,7 @@ const SimpleTableBase = ({
|
|
|
3481
3493
|
className,
|
|
3482
3494
|
...rest
|
|
3483
3495
|
}) => {
|
|
3484
|
-
const tableBaseClassNames = cx(className, styles$
|
|
3496
|
+
const tableBaseClassNames = cx(className, styles$c["table-base"]);
|
|
3485
3497
|
return /* @__PURE__ */ jsx(
|
|
3486
3498
|
"table",
|
|
3487
3499
|
{
|
|
@@ -3500,7 +3512,7 @@ const DataTableBase = ({
|
|
|
3500
3512
|
hasSubRows,
|
|
3501
3513
|
...rest
|
|
3502
3514
|
}) => {
|
|
3503
|
-
const tableBaseClassNames = cx(className, styles$
|
|
3515
|
+
const tableBaseClassNames = cx(className, styles$c["table-base"]);
|
|
3504
3516
|
return /* @__PURE__ */ jsx(
|
|
3505
3517
|
"div",
|
|
3506
3518
|
{
|
|
@@ -3546,19 +3558,19 @@ const getCommonPinningClasses = (column) => {
|
|
|
3546
3558
|
const isLastLeftPinnedColumn = isPinned === "left" && column.getIsLastColumn("left");
|
|
3547
3559
|
const isFirstRightPinnedColumn = isPinned === "right" && column.getIsFirstColumn("right");
|
|
3548
3560
|
if (isLastLeftPinnedColumn) {
|
|
3549
|
-
return styles$
|
|
3561
|
+
return styles$e["last-pinned-left-column"];
|
|
3550
3562
|
}
|
|
3551
3563
|
if (isFirstRightPinnedColumn) {
|
|
3552
|
-
return styles$
|
|
3564
|
+
return styles$e["first-pinned-right-column"];
|
|
3553
3565
|
}
|
|
3554
3566
|
};
|
|
3555
3567
|
|
|
3556
|
-
const styles$
|
|
3557
|
-
"table-body": "_table-
|
|
3568
|
+
const styles$b = {
|
|
3569
|
+
"table-body": "_table-body_zs2gj_2"
|
|
3558
3570
|
};
|
|
3559
3571
|
|
|
3560
3572
|
function TableBody({ type, children, ...rest }) {
|
|
3561
|
-
const classes = cx(styles$
|
|
3573
|
+
const classes = cx(styles$b["table-body"], rest.className);
|
|
3562
3574
|
const Element = type === "simple" ? "tbody" : "div";
|
|
3563
3575
|
return /* @__PURE__ */ jsx(
|
|
3564
3576
|
Element,
|
|
@@ -3586,9 +3598,9 @@ function useDataTableContext() {
|
|
|
3586
3598
|
}
|
|
3587
3599
|
|
|
3588
3600
|
const TableBodyCell = forwardRef(({ type, children, className, isExpandCell, isSelectCell, ...rest }, ref) => {
|
|
3589
|
-
const classes = cx(styles$
|
|
3590
|
-
[styles$
|
|
3591
|
-
[styles$
|
|
3601
|
+
const classes = cx(styles$e["table-body-cell"], className, {
|
|
3602
|
+
[styles$e["table-cell-internal-expand"]]: isExpandCell,
|
|
3603
|
+
[styles$e["table-cell-internal-select"]]: isSelectCell
|
|
3592
3604
|
});
|
|
3593
3605
|
const CellElement = type === "simple" ? "td" : "div";
|
|
3594
3606
|
return /* @__PURE__ */ jsx(
|
|
@@ -3607,12 +3619,12 @@ TableBodyCell.displayName = "TableBodyCell";
|
|
|
3607
3619
|
|
|
3608
3620
|
const SvgEdit = (props) => /* @__PURE__ */ React.createElement("svg", { xmlns: "http://www.w3.org/2000/svg", width: "1em", height: "1em", viewBox: "0 0 24 24", ...props }, /* @__PURE__ */ React.createElement("path", { d: "M3 17.46v3.04c0 .28.22.5.5.5h3.04c.13 0 .26-.05.35-.15L17.81 9.94l-3.75-3.75L3.15 17.1c-.1.1-.15.22-.15.36zM20.71 7.04a.996.996 0 0 0 0-1.41l-2.34-2.34a.996.996 0 0 0-1.41 0l-1.83 1.83 3.75 3.75 1.83-1.83z" }));
|
|
3609
3621
|
|
|
3610
|
-
const styles$
|
|
3611
|
-
"data-table-body-cell-input": "_data-table-body-cell-
|
|
3612
|
-
"data-table-body-cell-select-trigger": "_data-table-body-cell-select-
|
|
3613
|
-
"data-table-body-select-cell": "_data-table-body-select-
|
|
3614
|
-
"data-table-body-cell-editable": "_data-table-body-cell-
|
|
3615
|
-
"data-table-body-cell-edit-icon": "_data-table-body-cell-edit-
|
|
3622
|
+
const styles$a = {
|
|
3623
|
+
"data-table-body-cell-input": "_data-table-body-cell-input_b0det_2",
|
|
3624
|
+
"data-table-body-cell-select-trigger": "_data-table-body-cell-select-trigger_b0det_3",
|
|
3625
|
+
"data-table-body-select-cell": "_data-table-body-select-cell_b0det_34",
|
|
3626
|
+
"data-table-body-cell-editable": "_data-table-body-cell-editable_b0det_52",
|
|
3627
|
+
"data-table-body-cell-edit-icon": "_data-table-body-cell-edit-icon_b0det_52"
|
|
3616
3628
|
};
|
|
3617
3629
|
|
|
3618
3630
|
const DataTableEditableCellEditIcon = () => {
|
|
@@ -3622,7 +3634,7 @@ const DataTableEditableCellEditIcon = () => {
|
|
|
3622
3634
|
svg: SvgEdit,
|
|
3623
3635
|
size: "small",
|
|
3624
3636
|
color: "subtle",
|
|
3625
|
-
className: styles$
|
|
3637
|
+
className: styles$a["data-table-body-cell-edit-icon"],
|
|
3626
3638
|
"aria-label": "Edit cell value"
|
|
3627
3639
|
}
|
|
3628
3640
|
);
|
|
@@ -3729,7 +3741,7 @@ const useEditCell = ({
|
|
|
3729
3741
|
return returnValue;
|
|
3730
3742
|
};
|
|
3731
3743
|
|
|
3732
|
-
const styles$
|
|
3744
|
+
const styles$9 = {
|
|
3733
3745
|
"data-table-body-cell": "_data-table-body-cell_1ub1i_2",
|
|
3734
3746
|
"data-table-body-cell-editing": "_data-table-body-cell-editing_1ub1i_32",
|
|
3735
3747
|
"data-table-header-cell": "_data-table-header-cell_1ub1i_33",
|
|
@@ -3764,8 +3776,8 @@ const DataTableEditableTextCell = ({
|
|
|
3764
3776
|
inputRef.current?.focus();
|
|
3765
3777
|
}
|
|
3766
3778
|
}, [isEditing]);
|
|
3767
|
-
const classes = cx(className, styles$
|
|
3768
|
-
[styles$
|
|
3779
|
+
const classes = cx(className, styles$a["data-table-body-cell-editable"], {
|
|
3780
|
+
[styles$9["data-table-body-cell-editing"]]: isEditing
|
|
3769
3781
|
});
|
|
3770
3782
|
return /* @__PURE__ */ jsxs(
|
|
3771
3783
|
TableBodyCell,
|
|
@@ -3779,7 +3791,7 @@ const DataTableEditableTextCell = ({
|
|
|
3779
3791
|
"input",
|
|
3780
3792
|
{
|
|
3781
3793
|
type: "text",
|
|
3782
|
-
className: styles$
|
|
3794
|
+
className: styles$a["data-table-body-cell-input"],
|
|
3783
3795
|
ref: inputRef,
|
|
3784
3796
|
value: editValue,
|
|
3785
3797
|
onChange: handleChange,
|
|
@@ -3819,10 +3831,10 @@ const DataTableEditableSelectCell = ({
|
|
|
3819
3831
|
});
|
|
3820
3832
|
const { className, ...restCellProps } = cellProps;
|
|
3821
3833
|
const cellClasses = cx(
|
|
3822
|
-
styles$
|
|
3823
|
-
styles$
|
|
3834
|
+
styles$a["data-table-body-cell-editable"],
|
|
3835
|
+
styles$a["data-table-body-select-cell"],
|
|
3824
3836
|
className,
|
|
3825
|
-
{ [styles$
|
|
3837
|
+
{ [styles$9["data-table-body-cell-editing"]]: isEditing }
|
|
3826
3838
|
);
|
|
3827
3839
|
const handleKeyDown = (e, triggerFn) => {
|
|
3828
3840
|
if (e.key === "ArrowDown" && !isEditing) {
|
|
@@ -3855,7 +3867,7 @@ const DataTableEditableSelectCell = ({
|
|
|
3855
3867
|
{
|
|
3856
3868
|
...rest,
|
|
3857
3869
|
ref: triggerRef,
|
|
3858
|
-
className: styles$
|
|
3870
|
+
className: styles$a["data-table-body-cell-select-trigger"],
|
|
3859
3871
|
onKeyDown: (e) => handleKeyDown(e, () => triggerOnKeyDown?.(e)),
|
|
3860
3872
|
children
|
|
3861
3873
|
}
|
|
@@ -3916,8 +3928,8 @@ const DataTableEditableMultiselectCell = ({
|
|
|
3916
3928
|
const [searchValue, setSearchValue] = useState("");
|
|
3917
3929
|
const listViewRef = useRef(null);
|
|
3918
3930
|
const { className, ...restCellProps } = cellProps;
|
|
3919
|
-
const cellClasses = cx(styles$
|
|
3920
|
-
[styles$
|
|
3931
|
+
const cellClasses = cx(styles$a["data-table-body-select-cell"], className, {
|
|
3932
|
+
[styles$9["data-table-body-cell-editing"]]: isEditing
|
|
3921
3933
|
});
|
|
3922
3934
|
const selectedValues = options.filter(
|
|
3923
3935
|
(item) => editValue.includes(item.value)
|
|
@@ -4016,7 +4028,7 @@ const DataTableEditableMultiselectCell = ({
|
|
|
4016
4028
|
{
|
|
4017
4029
|
...rest,
|
|
4018
4030
|
ref: popoverRef,
|
|
4019
|
-
className: styles$
|
|
4031
|
+
className: styles$a["data-table-body-cell-select-trigger"],
|
|
4020
4032
|
onKeyDown: (e) => handleTriggerKeyDown(e, () => triggerOnKeyDown?.(e)),
|
|
4021
4033
|
children
|
|
4022
4034
|
}
|
|
@@ -4088,8 +4100,8 @@ function DataTableBodyCellElement(props) {
|
|
|
4088
4100
|
}
|
|
4089
4101
|
}, [tableContext, cellPosition, isEditable]);
|
|
4090
4102
|
const tabIndex = tableContext.getCellTabIndex(cellPosition);
|
|
4091
|
-
const classes = cx(styles$
|
|
4092
|
-
[styles$
|
|
4103
|
+
const classes = cx(styles$9["data-table-body-cell"], rest.className, {
|
|
4104
|
+
[styles$9["data-table-body-cell-hovered"]]: tableContext?.hoveredColumnId === columnId
|
|
4093
4105
|
});
|
|
4094
4106
|
const commonCellProps = {
|
|
4095
4107
|
type: "data-table",
|
|
@@ -4144,7 +4156,7 @@ function DataTableBodyCellElement(props) {
|
|
|
4144
4156
|
}
|
|
4145
4157
|
const DataTableBodyCell = memo$1(DataTableBodyCellElement);
|
|
4146
4158
|
|
|
4147
|
-
const styles$
|
|
4159
|
+
const styles$8 = {
|
|
4148
4160
|
"data-table-body-row": "_data-table-body-row_1vs3r_2",
|
|
4149
4161
|
"data-table-body-sub-component-container": "_data-table-body-sub-component-container_1vs3r_20",
|
|
4150
4162
|
"data-table-body-sub-component-content": "_data-table-body-sub-component-content_1vs3r_25",
|
|
@@ -4163,11 +4175,11 @@ const DataTableBodyContent = ({
|
|
|
4163
4175
|
"aria-rowindex": sortedIndex + table.getHeaderGroups().length + 1,
|
|
4164
4176
|
"aria-expanded": hasSubRows && row.getCanExpand() ? row.getIsExpanded() : void 0,
|
|
4165
4177
|
"aria-level": hasSubRows && (row.getCanExpand() || row.getParentRow()?.getCanExpand()) ? row.depth + 1 : void 0,
|
|
4166
|
-
className: styles$
|
|
4178
|
+
className: styles$8["data-table-body-row"],
|
|
4167
4179
|
children: row.getVisibleCells().map((cell) => {
|
|
4168
4180
|
const isLastInParentGroup = cell.column.parent ? cell.column.parent.getLeafColumns().slice(-1)[0] === cell.column : false;
|
|
4169
4181
|
const cellClasses = cx(getCommonPinningClasses(cell.column), {
|
|
4170
|
-
[styles$
|
|
4182
|
+
[styles$8["data-table-body-cell-group"]]: "columns" in cell.column.columnDef || cell.column.parent && isLastInParentGroup
|
|
4171
4183
|
});
|
|
4172
4184
|
return /* @__PURE__ */ jsx(
|
|
4173
4185
|
DataTableBodyCell,
|
|
@@ -4202,8 +4214,8 @@ const DataTableBodyContent = ({
|
|
|
4202
4214
|
{
|
|
4203
4215
|
id: `${row.id}-sub-component`,
|
|
4204
4216
|
"aria-hidden": !row.getIsExpanded(),
|
|
4205
|
-
className: styles$
|
|
4206
|
-
children: /* @__PURE__ */ jsx("div", { className: styles$
|
|
4217
|
+
className: styles$8["data-table-body-row"],
|
|
4218
|
+
children: /* @__PURE__ */ jsx("div", { className: styles$8["data-table-body-sub-component-container"], children: /* @__PURE__ */ jsx(Flex, { className: styles$8["data-table-body-sub-component-content"], children: row.original.subComponent }) })
|
|
4207
4219
|
}
|
|
4208
4220
|
)
|
|
4209
4221
|
] }, row.id));
|
|
@@ -4225,11 +4237,11 @@ const getColSpanWidth = (colSpan, cellIndex) => {
|
|
|
4225
4237
|
return minWidth;
|
|
4226
4238
|
};
|
|
4227
4239
|
|
|
4228
|
-
const styles$
|
|
4229
|
-
"table-footer": "_table-
|
|
4240
|
+
const styles$7 = {
|
|
4241
|
+
"table-footer": "_table-footer_hq77m_2"};
|
|
4230
4242
|
|
|
4231
4243
|
function TableFooter({ type, children, ...rest }) {
|
|
4232
|
-
const classes = cx(styles$
|
|
4244
|
+
const classes = cx(styles$7["table-footer"], rest.className);
|
|
4233
4245
|
const Element = type === "simple" ? "tfoot" : "div";
|
|
4234
4246
|
return /* @__PURE__ */ jsx(
|
|
4235
4247
|
Element,
|
|
@@ -4244,7 +4256,7 @@ function TableFooter({ type, children, ...rest }) {
|
|
|
4244
4256
|
|
|
4245
4257
|
const TableFooterCell = forwardRef((props, ref) => {
|
|
4246
4258
|
const { type, children, className, ...rest } = props;
|
|
4247
|
-
const classes = cx(styles$
|
|
4259
|
+
const classes = cx(styles$e["table-footer-cell"], className);
|
|
4248
4260
|
const CellElement = type === "simple" ? "td" : "div";
|
|
4249
4261
|
return /* @__PURE__ */ jsx(
|
|
4250
4262
|
CellElement,
|
|
@@ -4291,13 +4303,13 @@ function DataTableFooterCell(props) {
|
|
|
4291
4303
|
ref: footerCellRef,
|
|
4292
4304
|
tabIndex,
|
|
4293
4305
|
onFocus: handleFocus,
|
|
4294
|
-
className: cx(styles$
|
|
4306
|
+
className: cx(styles$9["data-table-footer-cell"], className),
|
|
4295
4307
|
children
|
|
4296
4308
|
}
|
|
4297
4309
|
);
|
|
4298
4310
|
}
|
|
4299
4311
|
|
|
4300
|
-
const styles$
|
|
4312
|
+
const styles$6 = {
|
|
4301
4313
|
"data-table-footer-row": "_data-table-footer-row_1nmuq_2",
|
|
4302
4314
|
"data-table-footer": "_data-table-footer_1nmuq_2"
|
|
4303
4315
|
};
|
|
@@ -4345,7 +4357,7 @@ function DefaultTableFooterRows({
|
|
|
4345
4357
|
{
|
|
4346
4358
|
role: "row",
|
|
4347
4359
|
"data-anv": "table-footer-row",
|
|
4348
|
-
className: styles$
|
|
4360
|
+
className: styles$6["data-table-footer-row"],
|
|
4349
4361
|
"aria-rowindex": rowIndex + table.getHeaderGroups().length + table.getRowModel().rows.length + 1,
|
|
4350
4362
|
children: table.getFlatHeaders().filter((header) => {
|
|
4351
4363
|
const column = findColumnById(columns, header.column.id);
|
|
@@ -4390,7 +4402,7 @@ function CustomTableFooterRows({
|
|
|
4390
4402
|
{
|
|
4391
4403
|
role: "row",
|
|
4392
4404
|
"data-anv": "table-footer-row",
|
|
4393
|
-
className: styles$
|
|
4405
|
+
className: styles$6["data-table-footer-row"],
|
|
4394
4406
|
"aria-rowindex": rowIndex + table.getHeaderGroups().length + table.getRowModel().rows.length + 1,
|
|
4395
4407
|
children: (() => {
|
|
4396
4408
|
let currentColumnIndex = 0;
|
|
@@ -4438,7 +4450,7 @@ function DataTableFooter({
|
|
|
4438
4450
|
...rest
|
|
4439
4451
|
}) {
|
|
4440
4452
|
const columnCount = table.getFlatHeaders().length;
|
|
4441
|
-
const classes = cx(styles$
|
|
4453
|
+
const classes = cx(styles$6["data-table-footer"], rest.className);
|
|
4442
4454
|
return /* @__PURE__ */ jsx(TableFooter, { type: "data-table", ...rest, className: classes, children: customFooter ? /* @__PURE__ */ jsx(
|
|
4443
4455
|
CustomTableFooterRows,
|
|
4444
4456
|
{
|
|
@@ -5070,12 +5082,12 @@ const SvgArrowUpward = (props) => /* @__PURE__ */ React.createElement("svg", { x
|
|
|
5070
5082
|
|
|
5071
5083
|
const SvgArrowDownward = (props) => /* @__PURE__ */ React.createElement("svg", { xmlns: "http://www.w3.org/2000/svg", width: "1em", height: "1em", viewBox: "0 0 24 24", ...props }, /* @__PURE__ */ React.createElement("path", { d: "M11 5v11.17l-4.88-4.88c-.39-.39-1.03-.39-1.42 0a.996.996 0 0 0 0 1.41l6.59 6.59c.39.39 1.02.39 1.41 0l6.59-6.59a.996.996 0 1 0-1.41-1.41L13 16.17V5c0-.55-.45-1-1-1s-1 .45-1 1z" }));
|
|
5072
5084
|
|
|
5073
|
-
const styles$
|
|
5085
|
+
const styles$5 = {
|
|
5074
5086
|
"table-header": "_table-header_1pe38_2"
|
|
5075
5087
|
};
|
|
5076
5088
|
|
|
5077
5089
|
function TableHeader({ type, children, ...rest }) {
|
|
5078
|
-
const classes = cx(styles$
|
|
5090
|
+
const classes = cx(styles$5["table-header"], rest.className);
|
|
5079
5091
|
const Element = type === "simple" ? "thead" : "div";
|
|
5080
5092
|
return /* @__PURE__ */ jsx(
|
|
5081
5093
|
Element,
|
|
@@ -5099,11 +5111,11 @@ const TableHeaderCell = forwardRef(
|
|
|
5099
5111
|
isExpandCell,
|
|
5100
5112
|
...rest
|
|
5101
5113
|
}, ref) => {
|
|
5102
|
-
const classes = cx(styles$
|
|
5103
|
-
[styles$
|
|
5104
|
-
[styles$
|
|
5105
|
-
[styles$
|
|
5106
|
-
[styles$
|
|
5114
|
+
const classes = cx(styles$e["table-header-cell"], className, {
|
|
5115
|
+
[styles$e["table-header-cell-group"]]: isGroup,
|
|
5116
|
+
[styles$e["table-header-cell-sortable"]]: isSortable,
|
|
5117
|
+
[styles$e["table-cell-internal-expand"]]: isExpandCell,
|
|
5118
|
+
[styles$e["table-cell-internal-select"]]: isSelectCell
|
|
5107
5119
|
});
|
|
5108
5120
|
const CellElement = type === "simple" ? "th" : "div";
|
|
5109
5121
|
return /* @__PURE__ */ jsx(
|
|
@@ -5170,7 +5182,7 @@ function DataTableHeaderCell(props) {
|
|
|
5170
5182
|
tabIndex,
|
|
5171
5183
|
onFocus: handleFocus,
|
|
5172
5184
|
onClick: handleClick,
|
|
5173
|
-
className: cx(styles$
|
|
5185
|
+
className: cx(styles$9["data-table-header-cell"], className),
|
|
5174
5186
|
"aria-sort": header.column.getIsSorted() === "asc" ? "ascending" : header.column.getIsSorted() === "desc" ? "descending" : void 0,
|
|
5175
5187
|
children: [
|
|
5176
5188
|
children,
|
|
@@ -5185,14 +5197,14 @@ function DataTableHeaderCell(props) {
|
|
|
5185
5197
|
}
|
|
5186
5198
|
|
|
5187
5199
|
const resizing = "_resizing_spw3o_35";
|
|
5188
|
-
const styles$
|
|
5200
|
+
const styles$4 = {
|
|
5189
5201
|
"resize-handle": "_resize-handle_spw3o_2",
|
|
5190
5202
|
resizing: resizing
|
|
5191
5203
|
};
|
|
5192
5204
|
|
|
5193
5205
|
function ResizeHandle({ header }) {
|
|
5194
|
-
const classes = cx(styles$
|
|
5195
|
-
[styles$
|
|
5206
|
+
const classes = cx(styles$4["resize-handle"], {
|
|
5207
|
+
[styles$4["resizing"]]: header.column.getIsResizing()
|
|
5196
5208
|
});
|
|
5197
5209
|
return /* @__PURE__ */ jsx(
|
|
5198
5210
|
"div",
|
|
@@ -5210,7 +5222,7 @@ function ResizeHandle({ header }) {
|
|
|
5210
5222
|
);
|
|
5211
5223
|
}
|
|
5212
5224
|
|
|
5213
|
-
const styles$
|
|
5225
|
+
const styles$3 = {
|
|
5214
5226
|
"data-table-header-row": "_data-table-header-row_blxpc_17"
|
|
5215
5227
|
};
|
|
5216
5228
|
|
|
@@ -5219,7 +5231,7 @@ function DataTableHeader({ table }) {
|
|
|
5219
5231
|
return /* @__PURE__ */ jsx(TableHeader, { type: "data-table", children: table.getHeaderGroups().map((headerGroup, index) => /* @__PURE__ */ jsx(
|
|
5220
5232
|
"div",
|
|
5221
5233
|
{
|
|
5222
|
-
className: styles$
|
|
5234
|
+
className: styles$3["data-table-header-row"],
|
|
5223
5235
|
role: "row",
|
|
5224
5236
|
"aria-rowindex": index + 1,
|
|
5225
5237
|
children: headerGroup.headers.map((header) => {
|
|
@@ -5283,10 +5295,10 @@ function DataTableHeader({ table }) {
|
|
|
5283
5295
|
)) });
|
|
5284
5296
|
}
|
|
5285
5297
|
|
|
5286
|
-
const styles$
|
|
5287
|
-
"table-container": "_table-
|
|
5288
|
-
"bg-strong": "_bg-
|
|
5289
|
-
"table-scroll-container": "_table-scroll-
|
|
5298
|
+
const styles$2 = {
|
|
5299
|
+
"table-container": "_table-container_14h5l_2",
|
|
5300
|
+
"bg-strong": "_bg-strong_14h5l_53",
|
|
5301
|
+
"table-scroll-container": "_table-scroll-container_14h5l_57"
|
|
5290
5302
|
};
|
|
5291
5303
|
|
|
5292
5304
|
const TableContainer = forwardRef(
|
|
@@ -5299,8 +5311,8 @@ const TableContainer = forwardRef(
|
|
|
5299
5311
|
background = "default",
|
|
5300
5312
|
...rest
|
|
5301
5313
|
} = componentProps;
|
|
5302
|
-
const tableContainerClassNames = cx(className, styles$
|
|
5303
|
-
[styles$
|
|
5314
|
+
const tableContainerClassNames = cx(className, styles$2["table-container"], {
|
|
5315
|
+
[styles$2[`bg-${background}`]]: !!background
|
|
5304
5316
|
});
|
|
5305
5317
|
const styleCombined = {
|
|
5306
5318
|
...style,
|
|
@@ -5317,7 +5329,7 @@ const TableContainer = forwardRef(
|
|
|
5317
5329
|
children: /* @__PURE__ */ jsx(
|
|
5318
5330
|
"div",
|
|
5319
5331
|
{
|
|
5320
|
-
className: styles$
|
|
5332
|
+
className: styles$2["table-scroll-container"],
|
|
5321
5333
|
"data-anv": "table-scroll-container",
|
|
5322
5334
|
children
|
|
5323
5335
|
}
|
|
@@ -5361,16 +5373,46 @@ const DataTableContainer = forwardRef(({ children, onFocus, onBlur, onKeyDown, t
|
|
|
5361
5373
|
});
|
|
5362
5374
|
DataTableContainer.displayName = "DataTableContainer";
|
|
5363
5375
|
|
|
5364
|
-
const
|
|
5376
|
+
const pagination = "_pagination_d700v_2";
|
|
5377
|
+
const styles$1 = {
|
|
5378
|
+
pagination: pagination
|
|
5379
|
+
};
|
|
5380
|
+
|
|
5381
|
+
const DataTablePagination = ({
|
|
5382
|
+
showCount = true,
|
|
5383
|
+
...props
|
|
5384
|
+
}) => {
|
|
5385
|
+
const { setIsOffGridInteractionOccurring } = useDataTableContext();
|
|
5386
|
+
const handleFocus = useCallback(() => {
|
|
5387
|
+
setIsOffGridInteractionOccurring(true);
|
|
5388
|
+
}, [setIsOffGridInteractionOccurring]);
|
|
5389
|
+
const handleBlur = useCallback(() => {
|
|
5390
|
+
setIsOffGridInteractionOccurring(false);
|
|
5391
|
+
}, [setIsOffGridInteractionOccurring]);
|
|
5392
|
+
return /* @__PURE__ */ jsx(
|
|
5393
|
+
Pagination,
|
|
5394
|
+
{
|
|
5395
|
+
className: styles$1["pagination"],
|
|
5396
|
+
...props,
|
|
5397
|
+
showCount,
|
|
5398
|
+
onFocus: handleFocus,
|
|
5399
|
+
onBlur: handleBlur
|
|
5400
|
+
}
|
|
5401
|
+
);
|
|
5402
|
+
};
|
|
5403
|
+
|
|
5404
|
+
const expanded = "_expanded_1r902_17";
|
|
5365
5405
|
const styles = {
|
|
5366
|
-
"
|
|
5406
|
+
"container-with-pagination": "_container-with-pagination_1r902_2",
|
|
5407
|
+
"footer-with-pagination": "_footer-with-pagination_1r902_5",
|
|
5408
|
+
"expand-button": "_expand-button_1r902_8",
|
|
5367
5409
|
expanded: expanded
|
|
5368
5410
|
};
|
|
5369
5411
|
|
|
5370
5412
|
function DataTable(props) {
|
|
5371
5413
|
const { layoutStyles, componentProps } = useLayoutPropsUtil(props);
|
|
5372
5414
|
const {
|
|
5373
|
-
data,
|
|
5415
|
+
data: dataProp,
|
|
5374
5416
|
columns: columnsProp,
|
|
5375
5417
|
background = "default",
|
|
5376
5418
|
customFooter,
|
|
@@ -5382,6 +5424,7 @@ function DataTable(props) {
|
|
|
5382
5424
|
onSelectRow,
|
|
5383
5425
|
onSort,
|
|
5384
5426
|
onExpandRow,
|
|
5427
|
+
pagination,
|
|
5385
5428
|
selectedRowIds,
|
|
5386
5429
|
sortedColumn,
|
|
5387
5430
|
style,
|
|
@@ -5391,20 +5434,6 @@ function DataTable(props) {
|
|
|
5391
5434
|
...style,
|
|
5392
5435
|
...layoutStyles
|
|
5393
5436
|
};
|
|
5394
|
-
const hasSubRows = data.some((row) => row.subRows?.length ?? 0 > 0);
|
|
5395
|
-
const hasSubComponent = data.some((row) => row.subComponent != null);
|
|
5396
|
-
const isExpandable = hasSubRows || hasSubComponent;
|
|
5397
|
-
const [expanded, setExpanded] = useOptionallyControlledState({
|
|
5398
|
-
controlledValue: isExpandable && expandedRowIds ? expandedRowIds === "all" ? true : Object.fromEntries(expandedRowIds.map((id) => [id, true])) : void 0,
|
|
5399
|
-
defaultValue: isExpandable ? defaultExpandedRowIds ? defaultExpandedRowIds === "all" ? true : Object.fromEntries(defaultExpandedRowIds.map((id) => [id, true])) : {} : void 0,
|
|
5400
|
-
onChange: (newExpanded) => {
|
|
5401
|
-
if (newExpanded === true) {
|
|
5402
|
-
onExpandRow?.("all");
|
|
5403
|
-
} else {
|
|
5404
|
-
onExpandRow?.(Object.keys(newExpanded));
|
|
5405
|
-
}
|
|
5406
|
-
}
|
|
5407
|
-
});
|
|
5408
5437
|
const [rowSelection, setRowSelection] = useOptionallyControlledState({
|
|
5409
5438
|
controlledValue: isSelectable && selectedRowIds ? Object.fromEntries(selectedRowIds.map((id) => [id, true])) : void 0,
|
|
5410
5439
|
defaultValue: isSelectable ? defaultSelectedRowIds ? Object.fromEntries(defaultSelectedRowIds.map((id) => [id, true])) : {} : void 0,
|
|
@@ -5419,6 +5448,100 @@ function DataTable(props) {
|
|
|
5419
5448
|
onSort?.(newSorting[0]);
|
|
5420
5449
|
}
|
|
5421
5450
|
});
|
|
5451
|
+
const [currentPageIndex, setCurrentPageIndex] = useOptionallyControlledState({
|
|
5452
|
+
controlledValue: typeof pagination === "object" ? pagination.currentPageIndex : void 0,
|
|
5453
|
+
defaultValue: typeof pagination === "object" ? pagination.defaultPageIndex ?? 0 : 0,
|
|
5454
|
+
onChange: (newPageIndex) => {
|
|
5455
|
+
if (typeof pagination === "object") {
|
|
5456
|
+
pagination.onPageChange?.(newPageIndex);
|
|
5457
|
+
}
|
|
5458
|
+
}
|
|
5459
|
+
});
|
|
5460
|
+
const [isLoading, setIsLoading] = useState(false);
|
|
5461
|
+
const [resolvedData, setResolvedData] = useState(null);
|
|
5462
|
+
const resolveData = useCallback(
|
|
5463
|
+
(data2) => {
|
|
5464
|
+
if (data2 instanceof Promise) {
|
|
5465
|
+
setIsLoading(true);
|
|
5466
|
+
setResolvedData(null);
|
|
5467
|
+
let isCancelled = false;
|
|
5468
|
+
data2.then((d) => {
|
|
5469
|
+
if (!isCancelled) {
|
|
5470
|
+
setResolvedData(d);
|
|
5471
|
+
setIsLoading(false);
|
|
5472
|
+
}
|
|
5473
|
+
}).catch((error) => {
|
|
5474
|
+
if (!isCancelled) {
|
|
5475
|
+
setIsLoading(false);
|
|
5476
|
+
setResolvedData([]);
|
|
5477
|
+
console.error("DataTable: Failed to load data", error);
|
|
5478
|
+
}
|
|
5479
|
+
});
|
|
5480
|
+
return () => {
|
|
5481
|
+
isCancelled = true;
|
|
5482
|
+
};
|
|
5483
|
+
} else {
|
|
5484
|
+
setResolvedData(null);
|
|
5485
|
+
setIsLoading(false);
|
|
5486
|
+
}
|
|
5487
|
+
},
|
|
5488
|
+
[]
|
|
5489
|
+
);
|
|
5490
|
+
useEffect(() => {
|
|
5491
|
+
resolveData(dataProp);
|
|
5492
|
+
}, [dataProp, resolveData]);
|
|
5493
|
+
useEffect(() => {
|
|
5494
|
+
if (typeof pagination === "object" && pagination.loadPageData) {
|
|
5495
|
+
resolveData(
|
|
5496
|
+
pagination.loadPageData({
|
|
5497
|
+
pageIndex: currentPageIndex ?? 0,
|
|
5498
|
+
pageSize: pagination.rowsPerPage ?? 25
|
|
5499
|
+
})
|
|
5500
|
+
);
|
|
5501
|
+
}
|
|
5502
|
+
}, [pagination, currentPageIndex, resolveData]);
|
|
5503
|
+
const data = useMemo(() => {
|
|
5504
|
+
if (dataProp instanceof Promise || typeof pagination === "object" && pagination.loadPageData) {
|
|
5505
|
+
return resolvedData ?? [];
|
|
5506
|
+
}
|
|
5507
|
+
return dataProp;
|
|
5508
|
+
}, [dataProp, resolvedData, pagination]);
|
|
5509
|
+
const hasSubRows = data.some((row) => row?.subRows?.length ?? 0 > 0);
|
|
5510
|
+
const hasSubComponent = data.some((row) => row?.subComponent != null);
|
|
5511
|
+
const isExpandable = hasSubRows || hasSubComponent;
|
|
5512
|
+
const [expanded, setExpanded] = useOptionallyControlledState({
|
|
5513
|
+
controlledValue: isExpandable && expandedRowIds ? expandedRowIds === "all" ? true : Object.fromEntries(expandedRowIds.map((id) => [id, true])) : void 0,
|
|
5514
|
+
defaultValue: isExpandable ? defaultExpandedRowIds ? defaultExpandedRowIds === "all" ? true : Object.fromEntries(defaultExpandedRowIds.map((id) => [id, true])) : {} : void 0,
|
|
5515
|
+
onChange: (newExpanded) => {
|
|
5516
|
+
if (newExpanded === true) {
|
|
5517
|
+
onExpandRow?.("all");
|
|
5518
|
+
} else {
|
|
5519
|
+
onExpandRow?.(Object.keys(newExpanded));
|
|
5520
|
+
}
|
|
5521
|
+
}
|
|
5522
|
+
});
|
|
5523
|
+
const itemsPerPage = useMemo(() => {
|
|
5524
|
+
return typeof pagination === "object" ? pagination.rowsPerPage ?? 25 : 25;
|
|
5525
|
+
}, [pagination]);
|
|
5526
|
+
const paginatedData = useMemo(() => {
|
|
5527
|
+
if (!pagination) return data;
|
|
5528
|
+
if (typeof pagination === "object" && pagination.loadPageData) {
|
|
5529
|
+
return resolvedData ?? [];
|
|
5530
|
+
}
|
|
5531
|
+
const totalItemCount2 = typeof pagination === "object" ? pagination.totalRowCount ?? data.length : data.length;
|
|
5532
|
+
const maxPageIndex = Math.max(
|
|
5533
|
+
0,
|
|
5534
|
+
Math.ceil(totalItemCount2 / itemsPerPage) - 1
|
|
5535
|
+
);
|
|
5536
|
+
const clampedPageIndex = Math.max(
|
|
5537
|
+
0,
|
|
5538
|
+
Math.min(currentPageIndex ?? 0, maxPageIndex)
|
|
5539
|
+
);
|
|
5540
|
+
const startIndex = clampedPageIndex * itemsPerPage;
|
|
5541
|
+
const endIndex = startIndex + itemsPerPage;
|
|
5542
|
+
return data.slice(startIndex, endIndex);
|
|
5543
|
+
}, [data, currentPageIndex, itemsPerPage, pagination, resolvedData]);
|
|
5544
|
+
const tableData = pagination ? paginatedData : data;
|
|
5422
5545
|
const columnPinning = useMemo(() => {
|
|
5423
5546
|
const { left, right } = {
|
|
5424
5547
|
left: columnsProp.filter((column) => column.pinned === "left").map((c) => String(c.id)),
|
|
@@ -5527,7 +5650,7 @@ function DataTable(props) {
|
|
|
5527
5650
|
return tableColumns;
|
|
5528
5651
|
}, [columnsProp, hasSubComponent, isExpandable, isSelectable]);
|
|
5529
5652
|
const table = useReactTable({
|
|
5530
|
-
data,
|
|
5653
|
+
data: tableData,
|
|
5531
5654
|
columns,
|
|
5532
5655
|
getCoreRowModel: getCoreRowModel(),
|
|
5533
5656
|
getSortedRowModel: getSortedRowModel(),
|
|
@@ -5604,37 +5727,84 @@ function DataTable(props) {
|
|
|
5604
5727
|
const columnCount = useMemo(() => {
|
|
5605
5728
|
return headers.filter((header) => header.subHeaders?.length === 0).length;
|
|
5606
5729
|
}, [headers]);
|
|
5607
|
-
|
|
5730
|
+
const totalItemCount = typeof pagination === "object" ? pagination.totalRowCount ?? data.length : data.length;
|
|
5731
|
+
return /* @__PURE__ */ jsx(DataTableContextProvider, { table, hasSubRows, children: /* @__PURE__ */ jsxs(
|
|
5608
5732
|
DataTableContainer,
|
|
5609
5733
|
{
|
|
5610
5734
|
...rest,
|
|
5611
5735
|
style: styleCombined,
|
|
5612
5736
|
background,
|
|
5613
|
-
|
|
5614
|
-
|
|
5615
|
-
|
|
5616
|
-
|
|
5617
|
-
|
|
5618
|
-
|
|
5619
|
-
|
|
5620
|
-
|
|
5621
|
-
|
|
5622
|
-
|
|
5623
|
-
|
|
5624
|
-
|
|
5625
|
-
|
|
5626
|
-
{
|
|
5627
|
-
|
|
5628
|
-
|
|
5629
|
-
|
|
5630
|
-
|
|
5631
|
-
|
|
5632
|
-
|
|
5633
|
-
|
|
5634
|
-
|
|
5737
|
+
className: pagination ? styles["container-with-pagination"] : void 0,
|
|
5738
|
+
children: [
|
|
5739
|
+
/* @__PURE__ */ jsxs(
|
|
5740
|
+
TableBase,
|
|
5741
|
+
{
|
|
5742
|
+
type: "data-table",
|
|
5743
|
+
style: cssVars,
|
|
5744
|
+
rowCount,
|
|
5745
|
+
colCount: columnCount,
|
|
5746
|
+
hasSubRows,
|
|
5747
|
+
children: [
|
|
5748
|
+
/* @__PURE__ */ jsx(DataTableHeader, { table }),
|
|
5749
|
+
/* @__PURE__ */ jsx(DataTableBody, { table }),
|
|
5750
|
+
isLoading && /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
5751
|
+
/* @__PURE__ */ jsx(SrOnly, { children: "Loading data. Please wait." }),
|
|
5752
|
+
/* @__PURE__ */ jsx(
|
|
5753
|
+
"div",
|
|
5754
|
+
{
|
|
5755
|
+
style: {
|
|
5756
|
+
height: itemsPerPage ? `${itemsPerPage * 35}px` : "200px"
|
|
5757
|
+
},
|
|
5758
|
+
role: "presentation",
|
|
5759
|
+
"aria-hidden": "true",
|
|
5760
|
+
children: /* @__PURE__ */ jsx(
|
|
5761
|
+
Flex,
|
|
5762
|
+
{
|
|
5763
|
+
justifyContent: "center",
|
|
5764
|
+
alignItems: "center",
|
|
5765
|
+
style: {
|
|
5766
|
+
position: "absolute",
|
|
5767
|
+
top: 0,
|
|
5768
|
+
bottom: 0,
|
|
5769
|
+
left: 0,
|
|
5770
|
+
right: 0,
|
|
5771
|
+
margin: "auto",
|
|
5772
|
+
zIndex: 3
|
|
5773
|
+
},
|
|
5774
|
+
children: /* @__PURE__ */ jsx(Spinner, {})
|
|
5775
|
+
}
|
|
5776
|
+
)
|
|
5777
|
+
}
|
|
5778
|
+
)
|
|
5779
|
+
] }),
|
|
5780
|
+
hasFooters && /* @__PURE__ */ jsx(
|
|
5781
|
+
DataTableFooter,
|
|
5782
|
+
{
|
|
5783
|
+
className: pagination ? styles["footer-with-pagination"] : void 0,
|
|
5784
|
+
table,
|
|
5785
|
+
columns: columnsProp,
|
|
5786
|
+
customFooter
|
|
5787
|
+
}
|
|
5788
|
+
)
|
|
5789
|
+
]
|
|
5790
|
+
}
|
|
5791
|
+
),
|
|
5792
|
+
pagination && /* @__PURE__ */ jsx(
|
|
5793
|
+
DataTablePagination,
|
|
5794
|
+
{
|
|
5795
|
+
itemsPerPage: typeof pagination === "object" ? pagination.rowsPerPage ?? 25 : 25,
|
|
5796
|
+
showCount: typeof pagination === "object" ? pagination.showCount : true,
|
|
5797
|
+
page: (currentPageIndex ?? 0) + 1,
|
|
5798
|
+
totalItemCount,
|
|
5799
|
+
onPageChange: (page) => {
|
|
5800
|
+
setCurrentPageIndex(page - 1);
|
|
5801
|
+
}
|
|
5802
|
+
}
|
|
5803
|
+
)
|
|
5804
|
+
]
|
|
5635
5805
|
}
|
|
5636
5806
|
) });
|
|
5637
5807
|
}
|
|
5638
5808
|
|
|
5639
|
-
export { DataTable as D,
|
|
5640
|
-
//# sourceMappingURL=DataTable-
|
|
5809
|
+
export { DataTable as D, chipsFormatter as a, currencyFormatter as b, createColumnHelper$1 as c, percentFormatter as p };
|
|
5810
|
+
//# sourceMappingURL=DataTable-xUON92DR.js.map
|