@servicetitan/anvil2 2.9.2 → 2.9.4
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 +26 -0
- package/dist/{AiMark-DhgDh95y.js → AiMark-DINVII8-.js} +3 -3
- package/dist/{AiMark-DhgDh95y.js.map → AiMark-DINVII8-.js.map} +1 -1
- package/dist/AiMark.js +1 -1
- package/dist/{Alert-DffLPz0l.js → Alert-Bcjw74vx.js} +2 -2
- package/dist/{Alert-DffLPz0l.js.map → Alert-Bcjw74vx.js.map} +1 -1
- package/dist/Alert.js +1 -1
- package/dist/{Breadcrumbs-CkPZHJGM.js → Breadcrumbs-CoOuSd2L.js} +2 -2
- package/dist/{Breadcrumbs-CkPZHJGM.js.map → Breadcrumbs-CoOuSd2L.js.map} +1 -1
- package/dist/Breadcrumbs.js +1 -1
- package/dist/{Calendar-0DG2so95.js → Calendar-C7QP11uk.js} +2 -2
- package/dist/{Calendar-0DG2so95.js.map → Calendar-C7QP11uk.js.map} +1 -1
- package/dist/{Calendar-CaWPwtb3.js → Calendar-rjAph002.js} +2 -2
- package/dist/{Calendar-CaWPwtb3.js.map → Calendar-rjAph002.js.map} +1 -1
- package/dist/Calendar.js +2 -2
- package/dist/{Checkbox-B1I1OfZU.js → Checkbox-BZ8k0uZb.js} +3 -3
- package/dist/{Checkbox-B1I1OfZU.js.map → Checkbox-BZ8k0uZb.js.map} +1 -1
- package/dist/{Checkbox-CTR7JfWk.js → Checkbox-CsNIatRo.js} +2 -2
- package/dist/{Checkbox-CTR7JfWk.js.map → Checkbox-CsNIatRo.js.map} +1 -1
- package/dist/Checkbox.js +1 -1
- package/dist/{Chip-lIWu8uXb.js → Chip-PvXSFpKl.js} +2 -2
- package/dist/{Chip-lIWu8uXb.js.map → Chip-PvXSFpKl.js.map} +1 -1
- package/dist/Chip.js +1 -1
- package/dist/{Combobox-Dt3AnO9Z.js → Combobox-BgFH9P75.js} +4 -4
- package/dist/{Combobox-Dt3AnO9Z.js.map → Combobox-BgFH9P75.js.map} +1 -1
- package/dist/Combobox.js +1 -1
- package/dist/{DataTable-bMoIuYBK.js → DataTable-BPonNWnU.js} +327 -117
- package/dist/DataTable-BPonNWnU.js.map +1 -0
- package/dist/DataTable.css +200 -121
- package/dist/{DateFieldRange-B_D6v-F7.js → DateFieldRange-DQ1cmyb5.js} +4 -4
- package/dist/{DateFieldRange-B_D6v-F7.js.map → DateFieldRange-DQ1cmyb5.js.map} +1 -1
- package/dist/DateFieldRange.js +1 -1
- package/dist/{DateFieldSingle-D_Ve0E6q.js → DateFieldSingle-BpTphoeG.js} +4 -4
- package/dist/{DateFieldSingle-D_Ve0E6q.js.map → DateFieldSingle-BpTphoeG.js.map} +1 -1
- package/dist/DateFieldSingle.js +1 -1
- package/dist/{DateFieldYearless-Bg7OLIsT.js → DateFieldYearless-Ph5nlpyY.js} +4 -4
- package/dist/{DateFieldYearless-Bg7OLIsT.js.map → DateFieldYearless-Ph5nlpyY.js.map} +1 -1
- package/dist/DateFieldYearless.js +1 -1
- package/dist/{DateFieldYearlessRange-C40uUmLK.js → DateFieldYearlessRange-iEOUw3Du.js} +3 -3
- package/dist/{DateFieldYearlessRange-C40uUmLK.js.map → DateFieldYearlessRange-iEOUw3Du.js.map} +1 -1
- package/dist/DateFieldYearlessRange.js +1 -1
- package/dist/{DaysOfTheWeek-2a8Ukq59.js → DaysOfTheWeek-CBsjDoih.js} +3 -3
- package/dist/{DaysOfTheWeek-2a8Ukq59.js.map → DaysOfTheWeek-CBsjDoih.js.map} +1 -1
- package/dist/DaysOfTheWeek.js +1 -1
- package/dist/{Dialog-zxpNOCDS.js → Dialog-n5kt_Ow5.js} +4 -4
- package/dist/{Dialog-zxpNOCDS.js.map → Dialog-n5kt_Ow5.js.map} +1 -1
- package/dist/Dialog.js +1 -1
- package/dist/{Drawer-DkCcE434.js → Drawer-AV26Rn1L.js} +4 -4
- package/dist/{Drawer-DkCcE434.js.map → Drawer-AV26Rn1L.js.map} +1 -1
- package/dist/Drawer.js +1 -1
- package/dist/DrillDown.js +1 -1
- package/dist/{EditCard-BKHmnbKP.js → EditCard-03B0-jHq.js} +2 -2
- package/dist/{EditCard-BKHmnbKP.js.map → EditCard-03B0-jHq.js.map} +1 -1
- package/dist/EditCard.js +1 -1
- package/dist/{FieldLabel-M5v4-PAV.js → FieldLabel-1g9Y_K44.js} +3 -3
- package/dist/{FieldLabel-M5v4-PAV.js.map → FieldLabel-1g9Y_K44.js.map} +1 -1
- package/dist/FieldLabel.js +1 -1
- package/dist/{InputMask-PVCfJodz.js → InputMask-Bd4tw5-x.js} +3 -3
- package/dist/{InputMask-PVCfJodz.js.map → InputMask-Bd4tw5-x.js.map} +1 -1
- package/dist/InputMask.js +1 -1
- package/dist/InteractiveCard-DqxbIX4f.js +102 -0
- package/dist/InteractiveCard-DqxbIX4f.js.map +1 -0
- package/dist/InteractiveCard.css +13 -21
- package/dist/InteractiveCard.js +1 -1
- package/dist/{ListView-DT32FdKH.js → ListView-_ynU8UuV.js} +2 -2
- package/dist/{ListView-DT32FdKH.js.map → ListView-_ynU8UuV.js.map} +1 -1
- package/dist/ListView.js +1 -1
- package/dist/{Listbox-BR0HTJaM.js → Listbox-DuYnCSLM.js} +2 -2
- package/dist/{Listbox-BR0HTJaM.js.map → Listbox-DuYnCSLM.js.map} +1 -1
- package/dist/Listbox.js +1 -1
- package/dist/MultiSelectField.js +1 -1
- package/dist/{MultiSelectFieldSync-fV2O5J0N.js → MultiSelectFieldSync-CA_OHWZ5.js} +5 -5
- package/dist/{MultiSelectFieldSync-fV2O5J0N.js.map → MultiSelectFieldSync-CA_OHWZ5.js.map} +1 -1
- package/dist/MultiSelectMenu.js +1 -1
- package/dist/{MultiSelectMenuSync-BViWKlX1.js → MultiSelectMenuSync-BSz5_4Wu.js} +3 -3
- package/dist/{MultiSelectMenuSync-BViWKlX1.js.map → MultiSelectMenuSync-BSz5_4Wu.js.map} +1 -1
- package/dist/{NumberField-BxWTjbmF.js → NumberField-CE_6UnsG.js} +3 -3
- package/dist/{NumberField-BxWTjbmF.js.map → NumberField-CE_6UnsG.js.map} +1 -1
- package/dist/NumberField.js +1 -1
- package/dist/Overflow.js +1 -1
- package/dist/{Page-DFjOwTzH.js → Page-D6iAbBGj.js} +9 -9
- package/dist/{Page-DFjOwTzH.js.map → Page-D6iAbBGj.js.map} +1 -1
- package/dist/Page.js +1 -1
- package/dist/{Pagination-B9pdkp_V.js → Pagination-5YcocErj.js} +2 -2
- package/dist/{Pagination-B9pdkp_V.js.map → Pagination-5YcocErj.js.map} +1 -1
- package/dist/Pagination.js +1 -1
- package/dist/{Popover-CfG1IJP6.js → Popover-BbqTZw-1.js} +2 -2
- package/dist/{Popover-CfG1IJP6.js.map → Popover-BbqTZw-1.js.map} +1 -1
- package/dist/Popover.js +1 -1
- package/dist/{ProgressBar-CFKKuXeN.js → ProgressBar-Cygv2ii1.js} +2 -2
- package/dist/{ProgressBar-CFKKuXeN.js.map → ProgressBar-Cygv2ii1.js.map} +1 -1
- package/dist/ProgressBar.js +1 -1
- package/dist/{Radio-Dda5sh2r.js → Radio-BftTzQIc.js} +3 -3
- package/dist/{Radio-Dda5sh2r.js.map → Radio-BftTzQIc.js.map} +1 -1
- package/dist/{Radio-CeVjHOXe.js → Radio-CGFmTxJ1.js} +2 -2
- package/dist/{Radio-CeVjHOXe.js.map → Radio-CGFmTxJ1.js.map} +1 -1
- package/dist/Radio.js +1 -1
- package/dist/{SelectCard-COJn0wT6.js → SelectCard-CjDxc2q7.js} +3 -3
- package/dist/{SelectCard-COJn0wT6.js.map → SelectCard-CjDxc2q7.js.map} +1 -1
- package/dist/SelectCard.js +1 -1
- package/dist/SelectField.js +1 -1
- package/dist/{SelectFieldLabel-ChEvk0uS.js → SelectFieldLabel-DXgUk8cU.js} +2 -2
- package/dist/{SelectFieldLabel-ChEvk0uS.js.map → SelectFieldLabel-DXgUk8cU.js.map} +1 -1
- package/dist/{SelectFieldSync-CDIRIYv2.js → SelectFieldSync-D0aeALNV.js} +4 -4
- package/dist/{SelectFieldSync-CDIRIYv2.js.map → SelectFieldSync-D0aeALNV.js.map} +1 -1
- package/dist/SelectMenu.js +1 -1
- package/dist/{SelectMenuSync-DkQrikHz.js → SelectMenuSync-Cf_yCjTR.js} +3 -3
- package/dist/{SelectMenuSync-DkQrikHz.js.map → SelectMenuSync-Cf_yCjTR.js.map} +1 -1
- package/dist/{SelectOptions-BN1tCi7P.js → SelectOptions-DWBJXyzG.js} +2 -2
- package/dist/{SelectOptions-BN1tCi7P.js.map → SelectOptions-DWBJXyzG.js.map} +1 -1
- package/dist/{SelectTrigger-LZUtpAFW.js → SelectTrigger-BERAM4ZL.js} +2 -2
- package/dist/{SelectTrigger-LZUtpAFW.js.map → SelectTrigger-BERAM4ZL.js.map} +1 -1
- package/dist/SelectTrigger.js +1 -1
- package/dist/{SelectTriggerBase-qeFownmF.js → SelectTriggerBase-B0hyyOl4.js} +3 -3
- package/dist/{SelectTriggerBase-qeFownmF.js.map → SelectTriggerBase-B0hyyOl4.js.map} +1 -1
- package/dist/{Switch-3u7oAQQV.js → Switch-BVVW9wp0.js} +2 -2
- package/dist/{Switch-3u7oAQQV.js.map → Switch-BVVW9wp0.js.map} +1 -1
- package/dist/Switch.js +1 -1
- package/dist/Table.js +1 -1
- package/dist/{Text-DQ78JchQ.js → Text-3Tbp9SGi.js} +2 -2
- package/dist/{Text-DQ78JchQ.js.map → Text-3Tbp9SGi.js.map} +1 -1
- package/dist/Text.js +1 -1
- package/dist/{TextField-DHk1k3cf.js → TextField-PMLHWUlx.js} +3 -3
- package/dist/{TextField-DHk1k3cf.js.map → TextField-PMLHWUlx.js.map} +1 -1
- package/dist/{TextField-Bu5kAe9_.js → TextField-vDEUHRSI.js} +2 -2
- package/dist/{TextField-Bu5kAe9_.js.map → TextField-vDEUHRSI.js.map} +1 -1
- package/dist/TextField.js +1 -1
- package/dist/{Textarea-CYv02rxW.js → Textarea-CoHBVOM-.js} +3 -3
- package/dist/{Textarea-CYv02rxW.js.map → Textarea-CoHBVOM-.js.map} +1 -1
- package/dist/Textarea.js +1 -1
- package/dist/{TimeField-BYtP64Qx.js → TimeField-_ojaBuXD.js} +4 -4
- package/dist/{TimeField-BYtP64Qx.js.map → TimeField-_ojaBuXD.js.map} +1 -1
- package/dist/TimeField.js +1 -1
- package/dist/Toast.js +2 -2
- package/dist/{Toaster-BRjGoIQu.js → Toaster-DRM8VdJw.js} +3 -3
- package/dist/{Toaster-BRjGoIQu.js.map → Toaster-DRM8VdJw.js.map} +1 -1
- package/dist/{Toaster-DO83u5o3.js → Toaster-DeA4M9hh.js} +2 -2
- package/dist/{Toaster-DO83u5o3.js.map → Toaster-DeA4M9hh.js.map} +1 -1
- package/dist/{Toolbar-Dsaufi65.js → Toolbar-V14Z3yMP.js} +14 -14
- package/dist/{Toolbar-Dsaufi65.js.map → Toolbar-V14Z3yMP.js.map} +1 -1
- package/dist/Toolbar.js +1 -1
- package/dist/{Tooltip-C1PBRnJv.js → Tooltip-BboNo2-B.js} +6 -6
- package/dist/{Tooltip-C1PBRnJv.js.map → Tooltip-BboNo2-B.js.map} +1 -1
- package/dist/Tooltip.css +9 -8
- package/dist/Tooltip.js +1 -1
- package/dist/{YearlessDateInputWithPicker-CChqr1gR.js → YearlessDateInputWithPicker-BGPlWZVx.js} +2 -2
- package/dist/{YearlessDateInputWithPicker-CChqr1gR.js.map → YearlessDateInputWithPicker-BGPlWZVx.js.map} +1 -1
- package/dist/beta/components/InteractiveCard/InteractiveCard.d.ts +3 -1
- package/dist/beta/components/Table/DataTable/DataTable.d.ts +40 -1
- package/dist/beta/components/Table/DataTable/internal/DataTableBody.d.ts +22 -0
- package/dist/beta/components/Table/DataTable/internal/DataTableBodyRow.d.ts +18 -1
- package/dist/beta/components/Table/DataTable/internal/useDataTableVirtualizer.d.ts +9 -5
- package/dist/beta/components/Table/internal/getCommonPinningClasses.d.ts +1 -1
- package/dist/beta.js +10 -10
- package/dist/getKeyboardFocusableElements-CPUr9cdf.js +11 -0
- package/dist/getKeyboardFocusableElements-CPUr9cdf.js.map +1 -0
- package/dist/index.js +38 -38
- package/dist/internal/functions/getKeyboardFocusableElements.d.ts +9 -0
- package/dist/{stripInlineMarkdown-V3M_UxQ8.js → stripInlineMarkdown-Dleqe05B.js} +2 -2
- package/dist/{stripInlineMarkdown-V3M_UxQ8.js.map → stripInlineMarkdown-Dleqe05B.js.map} +1 -1
- package/dist/{syncFilterUtils-DtOBvzdr.js → syncFilterUtils-CSfEaBwR.js} +4 -4
- package/dist/{syncFilterUtils-DtOBvzdr.js.map → syncFilterUtils-CSfEaBwR.js.map} +1 -1
- package/dist/{useDrilldown-CK9KzXvI.js → useDrilldown-DdTNc90h.js} +3 -3
- package/dist/{useDrilldown-CK9KzXvI.js.map → useDrilldown-DdTNc90h.js.map} +1 -1
- package/dist/{useInitialFocus-BIvXK1Rp.js → useInitialFocus-BUxEDMEG.js} +2 -2
- package/dist/{useInitialFocus-BIvXK1Rp.js.map → useInitialFocus-BUxEDMEG.js.map} +1 -1
- package/dist/{usePopoverTransitionStates-B1opfxxn.js → usePopoverTransitionStates-CDXCdyKa.js} +2 -1
- package/dist/{usePopoverTransitionStates-B1opfxxn.js.map → usePopoverTransitionStates-CDXCdyKa.js.map} +1 -1
- package/dist/{useToggleSelection-BMXohj4f.js → useToggleSelection-OIOX5MHV.js} +2 -2
- package/dist/{useToggleSelection-BMXohj4f.js.map → useToggleSelection-OIOX5MHV.js.map} +1 -1
- package/package.json +1 -1
- package/dist/DataTable-bMoIuYBK.js.map +0 -1
- package/dist/InteractiveCard-GTYbR6Xy.js +0 -87
- package/dist/InteractiveCard-GTYbR6Xy.js.map +0 -1
- package/dist/getKeyboardFocusableElements-QqcABz0D.js +0 -12
- package/dist/getKeyboardFocusableElements-QqcABz0D.js.map +0 -1
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import { jsx, jsxs, Fragment } from 'react/jsx-runtime';
|
|
2
|
-
import { C as Chip } from './Chip-
|
|
2
|
+
import { C as Chip } from './Chip-PvXSFpKl.js';
|
|
3
3
|
import { F as Flex } from './Flex-WyyZm1bf.js';
|
|
4
4
|
import * as React from 'react';
|
|
5
5
|
import { useRef, useState, useLayoutEffect, createContext, useContext, useCallback, forwardRef, useMemo, useImperativeHandle, useEffect, useId, memo as memo$1, Fragment as Fragment$1, isValidElement } from 'react';
|
|
6
6
|
import { c as cx } from './index-De1g9FRV.js';
|
|
7
7
|
import { D as DateTime } from './luxon-wpz4A-OQ.js';
|
|
8
|
-
import { C as Checkbox } from './Checkbox-
|
|
8
|
+
import { C as Checkbox } from './Checkbox-CsNIatRo.js';
|
|
9
9
|
import { B as Button } from './Button-BdrrhBTI.js';
|
|
10
10
|
import { S as SvgChevronRight } from './chevron_right-BdpsxX7x.js';
|
|
11
11
|
import { S as SvgEdit } from './edit-DQOiktcu.js';
|
|
@@ -13,15 +13,15 @@ import { I as Icon } from './Icon-DuIlne4x.js';
|
|
|
13
13
|
import { S as SrOnly } from './SrOnly-eUpYGpAT.js';
|
|
14
14
|
import { u as useNumberField } from './useNumberField-eMyk7MB8.js';
|
|
15
15
|
import { u as useMergeRefs, m as mergeRefs } from './useMergeRefs-Dfmtq9cI.js';
|
|
16
|
-
import { a as SelectMenuSync, S as SelectMenu } from './SelectMenuSync-
|
|
17
|
-
import { a as MultiSelectMenuSync, M as MultiSelectMenu } from './MultiSelectMenuSync-
|
|
18
|
-
import { F as FieldLabel } from './FieldLabel-
|
|
16
|
+
import { a as SelectMenuSync, S as SelectMenu } from './SelectMenuSync-Cf_yCjTR.js';
|
|
17
|
+
import { a as MultiSelectMenuSync, M as MultiSelectMenu } from './MultiSelectMenuSync-BSz5_4Wu.js';
|
|
18
|
+
import { F as FieldLabel } from './FieldLabel-1g9Y_K44.js';
|
|
19
19
|
import { S as SvgError } from './error-DR_wWdYY.js';
|
|
20
20
|
import { S as SvgWarning } from './warning-c4Wj1rI4.js';
|
|
21
|
-
import { T as Tooltip } from './Tooltip-
|
|
21
|
+
import { T as Tooltip } from './Tooltip-BboNo2-B.js';
|
|
22
22
|
import { flushSync } from 'react-dom';
|
|
23
23
|
import { u as useLayoutPropsUtil } from './useLayoutPropsUtil-DMDdfIah.js';
|
|
24
|
-
import { P as Pagination } from './Pagination-
|
|
24
|
+
import { P as Pagination } from './Pagination-5YcocErj.js';
|
|
25
25
|
import { T as ThemeProviderContext } from './ThemeProviderContext-l52GohYT.js';
|
|
26
26
|
import { u as useVirtualizer } from './index-DXeGMe23.js';
|
|
27
27
|
import { S as Spinner } from './Spinner-BqmcE2pb.js';
|
|
@@ -36,17 +36,19 @@ import './DataTable.css';const booleanFormatter = (value, { trueLabel = "True",
|
|
|
36
36
|
};
|
|
37
37
|
|
|
38
38
|
const styles$f = {
|
|
39
|
-
"table-header-cell": "_table-header-
|
|
40
|
-
"table-body-cell": "_table-body-
|
|
41
|
-
"table-footer-cell": "_table-footer-
|
|
42
|
-
"last-pinned-left-column": "_last-pinned-left-
|
|
43
|
-
"first-pinned-right-column": "_first-pinned-right-
|
|
44
|
-
"
|
|
45
|
-
"
|
|
46
|
-
"
|
|
47
|
-
"table-
|
|
48
|
-
"table-
|
|
49
|
-
"table-header-cell-
|
|
39
|
+
"table-header-cell": "_table-header-cell_1dk64_2",
|
|
40
|
+
"table-body-cell": "_table-body-cell_1dk64_3",
|
|
41
|
+
"table-footer-cell": "_table-footer-cell_1dk64_4",
|
|
42
|
+
"last-pinned-left-column": "_last-pinned-left-column_1dk64_33",
|
|
43
|
+
"first-pinned-right-column": "_first-pinned-right-column_1dk64_33",
|
|
44
|
+
"first-pinned-left-column": "_first-pinned-left-column_1dk64_54",
|
|
45
|
+
"last-pinned-right-column": "_last-pinned-right-column_1dk64_59",
|
|
46
|
+
"empty-cell": "_empty-cell_1dk64_64",
|
|
47
|
+
"table-cell-internal-select": "_table-cell-internal-select_1dk64_81",
|
|
48
|
+
"table-cell-internal-expand": "_table-cell-internal-expand_1dk64_82",
|
|
49
|
+
"table-header-cell-group": "_table-header-cell-group_1dk64_101",
|
|
50
|
+
"table-header-cell-sortable": "_table-header-cell-sortable_1dk64_110",
|
|
51
|
+
"table-header-cell-interactive": "_table-header-cell-interactive_1dk64_111"};
|
|
50
52
|
|
|
51
53
|
const TableEmptyCellContent = () => {
|
|
52
54
|
return /* @__PURE__ */ jsx("span", { "aria-label": "empty table cell", className: styles$f["empty-cell"], children: "—" });
|
|
@@ -4013,6 +4015,7 @@ function TableBody({ type, children, ...rest }) {
|
|
|
4013
4015
|
Element,
|
|
4014
4016
|
{
|
|
4015
4017
|
...rest,
|
|
4018
|
+
"data-anv": "table-body",
|
|
4016
4019
|
className: classes,
|
|
4017
4020
|
role: type === "simple" ? void 0 : "rowgroup",
|
|
4018
4021
|
children
|
|
@@ -4022,20 +4025,19 @@ function TableBody({ type, children, ...rest }) {
|
|
|
4022
4025
|
|
|
4023
4026
|
const getCommonPinningClasses = (column) => {
|
|
4024
4027
|
const isPinned = column.getIsPinned();
|
|
4025
|
-
|
|
4026
|
-
|
|
4027
|
-
|
|
4028
|
-
|
|
4029
|
-
|
|
4030
|
-
|
|
4031
|
-
|
|
4032
|
-
}
|
|
4028
|
+
if (!isPinned) return void 0;
|
|
4029
|
+
return cx({
|
|
4030
|
+
[styles$f["first-pinned-left-column"]]: isPinned === "left" && column.getIsFirstColumn("left"),
|
|
4031
|
+
[styles$f["last-pinned-left-column"]]: isPinned === "left" && column.getIsLastColumn("left"),
|
|
4032
|
+
[styles$f["first-pinned-right-column"]]: isPinned === "right" && column.getIsFirstColumn("right"),
|
|
4033
|
+
[styles$f["last-pinned-right-column"]]: isPinned === "right" && column.getIsLastColumn("right")
|
|
4034
|
+
});
|
|
4033
4035
|
};
|
|
4034
4036
|
|
|
4035
4037
|
const styles$a = {
|
|
4036
|
-
"data-table-body-cell-input": "_data-table-body-cell-
|
|
4037
|
-
"data-table-body-cell-editable": "_data-table-body-cell-
|
|
4038
|
-
"data-table-body-cell-edit-icon-container": "_data-table-body-cell-edit-icon-
|
|
4038
|
+
"data-table-body-cell-input": "_data-table-body-cell-input_16wma_2",
|
|
4039
|
+
"data-table-body-cell-editable": "_data-table-body-cell-editable_16wma_36",
|
|
4040
|
+
"data-table-body-cell-edit-icon-container": "_data-table-body-cell-edit-icon-container_16wma_36"
|
|
4039
4041
|
};
|
|
4040
4042
|
|
|
4041
4043
|
const DataTableEditableCellEditIcon = () => {
|
|
@@ -4071,19 +4073,19 @@ const TableBodyCell = forwardRef(({ type, children, className, isExpandCell, isS
|
|
|
4071
4073
|
TableBodyCell.displayName = "TableBodyCell";
|
|
4072
4074
|
|
|
4073
4075
|
const styles$9 = {
|
|
4074
|
-
"data-table-body-cell": "_data-table-body-
|
|
4075
|
-
"data-table-body-cell-input": "_data-table-body-cell-
|
|
4076
|
-
"table-body-cell": "_table-body-
|
|
4077
|
-
"table-header-cell": "_table-header-
|
|
4078
|
-
"table-footer-cell": "_table-footer-
|
|
4079
|
-
"data-table-cell-content": "_data-table-cell-
|
|
4080
|
-
"data-table-body-cell-editing": "_data-table-body-cell-
|
|
4081
|
-
"data-table-header-cell": "_data-table-header-
|
|
4082
|
-
"data-table-footer-cell": "_data-table-footer-
|
|
4083
|
-
"data-table-body-cell-error": "_data-table-body-cell-
|
|
4084
|
-
"data-table-body-cell-warning": "_data-table-body-cell-
|
|
4085
|
-
"cell-error-icon": "_cell-error-
|
|
4086
|
-
"cell-warning-icon": "_cell-warning-
|
|
4076
|
+
"data-table-body-cell": "_data-table-body-cell_n8pkj_2",
|
|
4077
|
+
"data-table-body-cell-input": "_data-table-body-cell-input_n8pkj_3",
|
|
4078
|
+
"table-body-cell": "_table-body-cell_n8pkj_18",
|
|
4079
|
+
"table-header-cell": "_table-header-cell_n8pkj_19",
|
|
4080
|
+
"table-footer-cell": "_table-footer-cell_n8pkj_20",
|
|
4081
|
+
"data-table-cell-content": "_data-table-cell-content_n8pkj_30",
|
|
4082
|
+
"data-table-body-cell-editing": "_data-table-body-cell-editing_n8pkj_53",
|
|
4083
|
+
"data-table-header-cell": "_data-table-header-cell_n8pkj_54",
|
|
4084
|
+
"data-table-footer-cell": "_data-table-footer-cell_n8pkj_57",
|
|
4085
|
+
"data-table-body-cell-error": "_data-table-body-cell-error_n8pkj_106",
|
|
4086
|
+
"data-table-body-cell-warning": "_data-table-body-cell-warning_n8pkj_123",
|
|
4087
|
+
"cell-error-icon": "_cell-error-icon_n8pkj_132",
|
|
4088
|
+
"cell-warning-icon": "_cell-warning-icon_n8pkj_133"
|
|
4087
4089
|
};
|
|
4088
4090
|
|
|
4089
4091
|
function formatCellPositionString(cellPosition) {
|
|
@@ -5477,15 +5479,36 @@ function DataTableBodyCell(props) {
|
|
|
5477
5479
|
}
|
|
5478
5480
|
|
|
5479
5481
|
const styles$8 = {
|
|
5480
|
-
"data-table-body-row": "_data-table-body-
|
|
5481
|
-
"data-table-body-sub-component-row": "_data-table-body-sub-component-
|
|
5482
|
-
"data-table-body-sub-component-container": "_data-table-body-sub-component-
|
|
5483
|
-
"data-table-body-sub-component-content": "_data-table-body-sub-component-
|
|
5484
|
-
"data-table-body-virtualized": "_data-table-body-
|
|
5485
|
-
"data-table-body-row-virtualized": "_data-table-body-row-
|
|
5486
|
-
"data-table-body-cell-group": "_data-table-body-cell-
|
|
5482
|
+
"data-table-body-row": "_data-table-body-row_wgr33_2",
|
|
5483
|
+
"data-table-body-sub-component-row": "_data-table-body-sub-component-row_wgr33_22",
|
|
5484
|
+
"data-table-body-sub-component-container": "_data-table-body-sub-component-container_wgr33_26",
|
|
5485
|
+
"data-table-body-sub-component-content": "_data-table-body-sub-component-content_wgr33_31",
|
|
5486
|
+
"data-table-body-virtualized": "_data-table-body-virtualized_wgr33_35",
|
|
5487
|
+
"data-table-body-row-virtualized": "_data-table-body-row-virtualized_wgr33_40",
|
|
5488
|
+
"data-table-body-cell-group": "_data-table-body-cell-group_wgr33_50",
|
|
5489
|
+
"data-table-body-cell-depth-indent": "_data-table-body-cell-depth-indent_wgr33_59",
|
|
5490
|
+
"data-table-body-row-activatable": "_data-table-body-row-activatable_wgr33_68",
|
|
5491
|
+
"data-table-body-row-active": "_data-table-body-row-active_wgr33_73",
|
|
5492
|
+
"data-table-body-row-ancestor-hovered": "_data-table-body-row-ancestor-hovered_wgr33_83",
|
|
5493
|
+
"data-table-body-sub-component-row-active": "_data-table-body-sub-component-row-active_wgr33_86",
|
|
5494
|
+
"data-table-body-row-read-only": "_data-table-body-row-read-only_wgr33_89",
|
|
5495
|
+
"data-table-body-row-top-active": "_data-table-body-row-top-active_wgr33_104"
|
|
5487
5496
|
};
|
|
5488
5497
|
|
|
5498
|
+
const ACTIVATE_IGNORE_SELECTOR = 'button, a, input, select, textarea, label, [role="button"], [role="checkbox"], [role="menuitem"], [data-anv="checkbox"], [class*="data-table-body-cell-editable"]';
|
|
5499
|
+
function collectDescendantIds(row) {
|
|
5500
|
+
const out = [];
|
|
5501
|
+
const stack = [...row.subRows ?? []];
|
|
5502
|
+
while (stack.length) {
|
|
5503
|
+
const current = stack.pop();
|
|
5504
|
+
if (!current) continue;
|
|
5505
|
+
out.push(current.id);
|
|
5506
|
+
if (current.subRows?.length) {
|
|
5507
|
+
stack.push(...current.subRows);
|
|
5508
|
+
}
|
|
5509
|
+
}
|
|
5510
|
+
return out;
|
|
5511
|
+
}
|
|
5489
5512
|
function DataTableBodyRowInner({
|
|
5490
5513
|
columnOrder,
|
|
5491
5514
|
row,
|
|
@@ -5494,40 +5517,125 @@ function DataTableBodyRowInner({
|
|
|
5494
5517
|
isExpanded,
|
|
5495
5518
|
canExpand,
|
|
5496
5519
|
depth,
|
|
5497
|
-
parentRowCanExpand
|
|
5520
|
+
parentRowCanExpand,
|
|
5521
|
+
isActivatable,
|
|
5522
|
+
isActive,
|
|
5523
|
+
isTopMostActive,
|
|
5524
|
+
isReadOnly,
|
|
5525
|
+
onToggleActive
|
|
5498
5526
|
}) {
|
|
5499
5527
|
const visibleCells = row.getVisibleCells();
|
|
5500
5528
|
const id = row.id;
|
|
5501
5529
|
const original = row.original;
|
|
5502
5530
|
const { focusSubComponent, blurSubComponent } = useDTFocusDispatchContext();
|
|
5531
|
+
const handleRowClick = useCallback(
|
|
5532
|
+
(event) => {
|
|
5533
|
+
if (!isActivatable) return;
|
|
5534
|
+
if (isReadOnly) return;
|
|
5535
|
+
const target = event.target;
|
|
5536
|
+
if (target?.closest(ACTIVATE_IGNORE_SELECTOR)) return;
|
|
5537
|
+
onToggleActive(
|
|
5538
|
+
row.id,
|
|
5539
|
+
collectDescendantIds(row)
|
|
5540
|
+
);
|
|
5541
|
+
},
|
|
5542
|
+
[isActivatable, isReadOnly, onToggleActive, row]
|
|
5543
|
+
);
|
|
5544
|
+
const shouldCascadeHover = isActivatable && canExpand;
|
|
5545
|
+
const handleMouseEnter = useCallback(
|
|
5546
|
+
(event) => {
|
|
5547
|
+
if (!shouldCascadeHover) return;
|
|
5548
|
+
const doc = event.currentTarget.ownerDocument ?? document;
|
|
5549
|
+
const className = styles$8["data-table-body-row-ancestor-hovered"];
|
|
5550
|
+
for (const descendantId of collectDescendantIds(row)) {
|
|
5551
|
+
const el = doc.querySelector(
|
|
5552
|
+
`[data-row-id="${CSS.escape(String(descendantId))}"]`
|
|
5553
|
+
);
|
|
5554
|
+
el?.classList.add(className);
|
|
5555
|
+
}
|
|
5556
|
+
},
|
|
5557
|
+
[shouldCascadeHover, row]
|
|
5558
|
+
);
|
|
5559
|
+
const handleMouseLeave = useCallback(
|
|
5560
|
+
(event) => {
|
|
5561
|
+
if (!shouldCascadeHover) return;
|
|
5562
|
+
const doc = event.currentTarget.ownerDocument ?? document;
|
|
5563
|
+
const className = styles$8["data-table-body-row-ancestor-hovered"];
|
|
5564
|
+
for (const descendantId of collectDescendantIds(row)) {
|
|
5565
|
+
const el = doc.querySelector(
|
|
5566
|
+
`[data-row-id="${CSS.escape(String(descendantId))}"]`
|
|
5567
|
+
);
|
|
5568
|
+
el?.classList.remove(className);
|
|
5569
|
+
}
|
|
5570
|
+
},
|
|
5571
|
+
[shouldCascadeHover, row]
|
|
5572
|
+
);
|
|
5573
|
+
const rowRef = useRef(null);
|
|
5574
|
+
useLayoutEffect(() => {
|
|
5575
|
+
const el = rowRef.current;
|
|
5576
|
+
if (!el) return;
|
|
5577
|
+
const ownerDoc = el.ownerDocument ?? document;
|
|
5578
|
+
const className = styles$8["data-table-body-row-ancestor-hovered"];
|
|
5579
|
+
let ancestor = row.getParentRow();
|
|
5580
|
+
while (ancestor) {
|
|
5581
|
+
const ancestorEl = ownerDoc.querySelector(
|
|
5582
|
+
`[data-row-id="${CSS.escape(String(ancestor.id))}"]`
|
|
5583
|
+
);
|
|
5584
|
+
if (ancestorEl?.matches(":hover")) {
|
|
5585
|
+
el.classList.add(className);
|
|
5586
|
+
return;
|
|
5587
|
+
}
|
|
5588
|
+
ancestor = ancestor.getParentRow();
|
|
5589
|
+
}
|
|
5590
|
+
}, [row]);
|
|
5503
5591
|
return /* @__PURE__ */ jsxs(Fragment$1, { children: [
|
|
5504
5592
|
/* @__PURE__ */ jsx(
|
|
5505
5593
|
"div",
|
|
5506
5594
|
{
|
|
5595
|
+
ref: rowRef,
|
|
5507
5596
|
role: "row",
|
|
5508
5597
|
"aria-rowindex": rowIndex + 1,
|
|
5509
5598
|
"aria-expanded": tableHasSubRows && canExpand ? isExpanded : void 0,
|
|
5510
5599
|
"aria-level": tableHasSubRows && (canExpand || parentRowCanExpand) ? depth + 1 : void 0,
|
|
5511
|
-
|
|
5512
|
-
|
|
5513
|
-
|
|
5514
|
-
|
|
5515
|
-
|
|
5600
|
+
"data-row-id": row.id,
|
|
5601
|
+
className: cx(styles$8["data-table-body-row"], {
|
|
5602
|
+
[styles$8["data-table-body-row-activatable"]]: isActivatable,
|
|
5603
|
+
[styles$8["data-table-body-row-active"]]: isActive,
|
|
5604
|
+
[styles$8["data-table-body-row-top-active"]]: isTopMostActive,
|
|
5605
|
+
[styles$8["data-table-body-row-read-only"]]: isReadOnly
|
|
5606
|
+
}),
|
|
5607
|
+
style: depth > 0 ? { "--a2-row-depth": depth } : void 0,
|
|
5608
|
+
onClick: isActivatable ? handleRowClick : void 0,
|
|
5609
|
+
onMouseEnter: shouldCascadeHover ? handleMouseEnter : void 0,
|
|
5610
|
+
onMouseLeave: shouldCascadeHover ? handleMouseLeave : void 0,
|
|
5611
|
+
children: (() => {
|
|
5612
|
+
let firstDataCellClaimed = false;
|
|
5613
|
+
return visibleCells.map((cell) => {
|
|
5614
|
+
const isLastInParentGroup = cell.column.parent ? cell.column.parent.getLeafColumns().slice(-1)[0] === cell.column : false;
|
|
5615
|
+
const isInternalActionColumn = cell.column.id === INTERNAL_ROW_ACTION_PRIMARY_COLUMN_ID || cell.column.id === INTERNAL_ROW_ACTION_SECONDARY_COLUMN_ID;
|
|
5616
|
+
const isFirstDataCell = !isInternalActionColumn && !firstDataCellClaimed;
|
|
5617
|
+
if (!isInternalActionColumn) {
|
|
5618
|
+
firstDataCellClaimed = true;
|
|
5619
|
+
}
|
|
5620
|
+
const cellClasses = cx(getCommonPinningClasses(cell.column), {
|
|
5621
|
+
[styles$8["data-table-body-cell-group"]]: "columns" in cell.column.columnDef || cell.column.parent && isLastInParentGroup,
|
|
5622
|
+
[styles$8["data-table-body-cell-depth-indent"]]: isFirstDataCell
|
|
5623
|
+
});
|
|
5624
|
+
const columnIndex = columnOrder.indexOf(cell.column.getIndex());
|
|
5625
|
+
return /* @__PURE__ */ jsx(
|
|
5626
|
+
DataTableBodyCell,
|
|
5627
|
+
{
|
|
5628
|
+
cell,
|
|
5629
|
+
cellPosition: { rowIndex, columnIndex },
|
|
5630
|
+
"aria-colindex": columnIndex + 1,
|
|
5631
|
+
className: cellClasses,
|
|
5632
|
+
"data-anv-column-id": cell.column.id,
|
|
5633
|
+
children: flexRender(cell.column.columnDef.cell, cell.getContext())
|
|
5634
|
+
},
|
|
5635
|
+
cell.id
|
|
5636
|
+
);
|
|
5516
5637
|
});
|
|
5517
|
-
|
|
5518
|
-
return /* @__PURE__ */ jsx(
|
|
5519
|
-
DataTableBodyCell,
|
|
5520
|
-
{
|
|
5521
|
-
cell,
|
|
5522
|
-
cellPosition: { rowIndex, columnIndex },
|
|
5523
|
-
"aria-colindex": columnIndex + 1,
|
|
5524
|
-
className: cellClasses,
|
|
5525
|
-
"data-anv-column-id": cell.column.id,
|
|
5526
|
-
children: flexRender(cell.column.columnDef.cell, cell.getContext())
|
|
5527
|
-
},
|
|
5528
|
-
cell.id
|
|
5529
|
-
);
|
|
5530
|
-
})
|
|
5638
|
+
})()
|
|
5531
5639
|
}
|
|
5532
5640
|
),
|
|
5533
5641
|
isExpanded && "subComponent" in original && /* @__PURE__ */ jsx(
|
|
@@ -5535,7 +5643,9 @@ function DataTableBodyRowInner({
|
|
|
5535
5643
|
{
|
|
5536
5644
|
id: `${id}-sub-component`,
|
|
5537
5645
|
"aria-hidden": !isExpanded,
|
|
5538
|
-
className: styles$8["data-table-body-sub-component-row"],
|
|
5646
|
+
className: cx(styles$8["data-table-body-sub-component-row"], {
|
|
5647
|
+
[styles$8["data-table-body-sub-component-row-active"]]: isActive
|
|
5648
|
+
}),
|
|
5539
5649
|
onFocus: () => {
|
|
5540
5650
|
focusSubComponent();
|
|
5541
5651
|
},
|
|
@@ -5552,7 +5662,7 @@ function areRowPropsEqual(prev, next) {
|
|
|
5552
5662
|
if (!getRowVersion) {
|
|
5553
5663
|
return false;
|
|
5554
5664
|
}
|
|
5555
|
-
return prev.row.id === next.row.id && getRowVersion(prev.row.original) === getRowVersion(next.row.original) && prev.rowIndex === next.rowIndex && prev.isExpanded === next.isExpanded && prev.canExpand === next.canExpand && prev.depth === next.depth && prev.parentRowCanExpand === next.parentRowCanExpand && prev.tableHasSubRows === next.tableHasSubRows && prev.columnOrder === next.columnOrder && prev.isSelected === next.isSelected && prev.isSomeSelected === next.isSomeSelected;
|
|
5665
|
+
return prev.row.id === next.row.id && getRowVersion(prev.row.original) === getRowVersion(next.row.original) && prev.rowIndex === next.rowIndex && prev.isExpanded === next.isExpanded && prev.canExpand === next.canExpand && prev.depth === next.depth && prev.parentRowCanExpand === next.parentRowCanExpand && prev.tableHasSubRows === next.tableHasSubRows && prev.columnOrder === next.columnOrder && prev.isSelected === next.isSelected && prev.isSomeSelected === next.isSomeSelected && prev.isActivatable === next.isActivatable && prev.isActive === next.isActive && prev.isTopMostActive === next.isTopMostActive && prev.isReadOnly === next.isReadOnly && prev.onToggleActive === next.onToggleActive;
|
|
5556
5666
|
}
|
|
5557
5667
|
const DataTableBodyRow = memo$1(
|
|
5558
5668
|
DataTableBodyRowInner,
|
|
@@ -5586,10 +5696,31 @@ const useColumnOrder = ({ table }) => {
|
|
|
5586
5696
|
};
|
|
5587
5697
|
};
|
|
5588
5698
|
|
|
5699
|
+
function getIsRowActivatable(row, isActivatable) {
|
|
5700
|
+
if (!isActivatable) return false;
|
|
5701
|
+
if (typeof isActivatable === "function") {
|
|
5702
|
+
return isActivatable(row.original);
|
|
5703
|
+
}
|
|
5704
|
+
return true;
|
|
5705
|
+
}
|
|
5706
|
+
function getIsRowTopMostActive(row, activeRowMap) {
|
|
5707
|
+
if (!activeRowMap[row.id]) return false;
|
|
5708
|
+
if (!row.getCanExpand()) return false;
|
|
5709
|
+
let ancestor = row.getParentRow();
|
|
5710
|
+
while (ancestor) {
|
|
5711
|
+
if (activeRowMap[ancestor.id]) return false;
|
|
5712
|
+
ancestor = ancestor.getParentRow();
|
|
5713
|
+
}
|
|
5714
|
+
return true;
|
|
5715
|
+
}
|
|
5589
5716
|
function NonVirtualizedContent({
|
|
5590
5717
|
table,
|
|
5591
5718
|
hasSubRows,
|
|
5592
|
-
getRowVersion
|
|
5719
|
+
getRowVersion,
|
|
5720
|
+
isActivatable,
|
|
5721
|
+
activeRowMap,
|
|
5722
|
+
readOnlyRowMap,
|
|
5723
|
+
onToggleActive
|
|
5593
5724
|
}) {
|
|
5594
5725
|
const { columnOrder } = useColumnOrder({ table });
|
|
5595
5726
|
const headerCount = table.getHeaderGroups().length;
|
|
@@ -5606,6 +5737,11 @@ function NonVirtualizedContent({
|
|
|
5606
5737
|
parentRowCanExpand: row.getParentRow()?.getCanExpand() ?? false,
|
|
5607
5738
|
isSelected: row.getIsSelected(),
|
|
5608
5739
|
isSomeSelected: row.getIsSomeSelected(),
|
|
5740
|
+
isActivatable: getIsRowActivatable(row, isActivatable),
|
|
5741
|
+
isActive: !!activeRowMap[row.id],
|
|
5742
|
+
isTopMostActive: getIsRowTopMostActive(row, activeRowMap),
|
|
5743
|
+
isReadOnly: !!readOnlyRowMap[row.id],
|
|
5744
|
+
onToggleActive,
|
|
5609
5745
|
getRowVersion
|
|
5610
5746
|
},
|
|
5611
5747
|
row.id
|
|
@@ -5615,7 +5751,11 @@ function VirtualizedContent({
|
|
|
5615
5751
|
table,
|
|
5616
5752
|
hasSubRows,
|
|
5617
5753
|
virtualizer,
|
|
5618
|
-
getRowVersion
|
|
5754
|
+
getRowVersion,
|
|
5755
|
+
isActivatable,
|
|
5756
|
+
activeRowMap,
|
|
5757
|
+
readOnlyRowMap,
|
|
5758
|
+
onToggleActive
|
|
5619
5759
|
}) {
|
|
5620
5760
|
const { columnOrder } = useColumnOrder({ table });
|
|
5621
5761
|
const headerCount = table.getHeaderGroups().length;
|
|
@@ -5656,6 +5796,11 @@ function VirtualizedContent({
|
|
|
5656
5796
|
parentRowCanExpand: row.getParentRow()?.getCanExpand() ?? false,
|
|
5657
5797
|
isSelected: row.getIsSelected(),
|
|
5658
5798
|
isSomeSelected: row.getIsSomeSelected(),
|
|
5799
|
+
isActivatable: getIsRowActivatable(row, isActivatable),
|
|
5800
|
+
isActive: !!activeRowMap[row.id],
|
|
5801
|
+
isTopMostActive: getIsRowTopMostActive(row, activeRowMap),
|
|
5802
|
+
isReadOnly: !!readOnlyRowMap[row.id],
|
|
5803
|
+
onToggleActive,
|
|
5659
5804
|
getRowVersion
|
|
5660
5805
|
}
|
|
5661
5806
|
)
|
|
@@ -5667,27 +5812,45 @@ function VirtualizedContent({
|
|
|
5667
5812
|
);
|
|
5668
5813
|
}
|
|
5669
5814
|
function DataTableBody(props) {
|
|
5670
|
-
const {
|
|
5815
|
+
const {
|
|
5816
|
+
table,
|
|
5817
|
+
hasSubRows,
|
|
5818
|
+
virtualizer,
|
|
5819
|
+
getRowVersion,
|
|
5820
|
+
isActivatable,
|
|
5821
|
+
activeRowMap,
|
|
5822
|
+
readOnlyRowMap,
|
|
5823
|
+
onToggleActive,
|
|
5824
|
+
...rest
|
|
5825
|
+
} = props;
|
|
5671
5826
|
return /* @__PURE__ */ jsx(TableBody, { type: "data-table", ...rest, children: virtualizer ? /* @__PURE__ */ jsx(
|
|
5672
5827
|
VirtualizedContent,
|
|
5673
5828
|
{
|
|
5674
5829
|
table,
|
|
5675
5830
|
hasSubRows,
|
|
5676
5831
|
virtualizer,
|
|
5677
|
-
getRowVersion
|
|
5832
|
+
getRowVersion,
|
|
5833
|
+
isActivatable,
|
|
5834
|
+
activeRowMap,
|
|
5835
|
+
readOnlyRowMap,
|
|
5836
|
+
onToggleActive
|
|
5678
5837
|
}
|
|
5679
5838
|
) : /* @__PURE__ */ jsx(
|
|
5680
5839
|
NonVirtualizedContent,
|
|
5681
5840
|
{
|
|
5682
5841
|
table,
|
|
5683
5842
|
hasSubRows,
|
|
5684
|
-
getRowVersion
|
|
5843
|
+
getRowVersion,
|
|
5844
|
+
isActivatable,
|
|
5845
|
+
activeRowMap,
|
|
5846
|
+
readOnlyRowMap,
|
|
5847
|
+
onToggleActive
|
|
5685
5848
|
}
|
|
5686
5849
|
) });
|
|
5687
5850
|
}
|
|
5688
5851
|
|
|
5689
5852
|
const styles$7 = {
|
|
5690
|
-
"table-footer": "_table-
|
|
5853
|
+
"table-footer": "_table-footer_k57n3_2"};
|
|
5691
5854
|
|
|
5692
5855
|
function TableFooter({ type, children, ...rest }) {
|
|
5693
5856
|
const classes = cx(styles$7["table-footer"], rest.className);
|
|
@@ -6602,8 +6765,8 @@ function DataTableHeader({
|
|
|
6602
6765
|
}
|
|
6603
6766
|
|
|
6604
6767
|
const styles$2 = {
|
|
6605
|
-
"table-container": "_table-
|
|
6606
|
-
"table-scroll-container": "_table-scroll-
|
|
6768
|
+
"table-container": "_table-container_idn5c_2",
|
|
6769
|
+
"table-scroll-container": "_table-scroll-container_idn5c_57"
|
|
6607
6770
|
};
|
|
6608
6771
|
|
|
6609
6772
|
const TableContainer = forwardRef(
|
|
@@ -6637,7 +6800,7 @@ const TableContainer = forwardRef(
|
|
|
6637
6800
|
);
|
|
6638
6801
|
TableContainer.displayName = "TableContainer";
|
|
6639
6802
|
|
|
6640
|
-
const pagination = "
|
|
6803
|
+
const pagination = "_pagination_p29ed_2";
|
|
6641
6804
|
const styles$1 = {
|
|
6642
6805
|
pagination: pagination
|
|
6643
6806
|
};
|
|
@@ -6770,6 +6933,8 @@ function scrollCellIntoView(element, stickyDimensions) {
|
|
|
6770
6933
|
leftWidth: stickyDimensions.leftWidth,
|
|
6771
6934
|
rightWidth: stickyDimensions.rightWidth
|
|
6772
6935
|
};
|
|
6936
|
+
const cellStyle = window.getComputedStyle(element);
|
|
6937
|
+
const isHorizontallySticky = cellStyle.position === "sticky" && (cellStyle.left !== "auto" || cellStyle.right !== "auto");
|
|
6773
6938
|
const elementRect = element.getBoundingClientRect();
|
|
6774
6939
|
const scrollContainerRect = scrollContainer.getBoundingClientRect();
|
|
6775
6940
|
const contentWidth = scrollContainer.clientWidth;
|
|
@@ -6781,6 +6946,7 @@ function scrollCellIntoView(element, stickyDimensions) {
|
|
|
6781
6946
|
const isFullyVisible = elementRect.x >= visibleLeft && elementRect.x + elementRect.width <= visibleRight && (isBodyCell ? elementRect.y >= visibleTop && elementRect.y + elementRect.height <= visibleBottom : true);
|
|
6782
6947
|
if (isFullyVisible) return;
|
|
6783
6948
|
const getScrollByLeft = () => {
|
|
6949
|
+
if (isHorizontallySticky) return 0;
|
|
6784
6950
|
if (elementRect.x < visibleLeft) {
|
|
6785
6951
|
return elementRect.x - visibleLeft;
|
|
6786
6952
|
}
|
|
@@ -7038,14 +7204,15 @@ function DTFocusProvider({
|
|
|
7038
7204
|
return /* @__PURE__ */ jsx(DTFocusStateContext.Provider, { value: state, children: /* @__PURE__ */ jsx(DTFocusDispatchContext.Provider, { value: dispatch, children }) });
|
|
7039
7205
|
}
|
|
7040
7206
|
|
|
7041
|
-
const VIRTUALIZATION_THRESHOLD =
|
|
7207
|
+
const VIRTUALIZATION_THRESHOLD = 50;
|
|
7042
7208
|
const DEFAULT_ESTIMATED_ROW_HEIGHT = 35;
|
|
7043
7209
|
function useDataTableVirtualizer({
|
|
7044
7210
|
rowCount,
|
|
7045
7211
|
scrollRef,
|
|
7046
|
-
disabled
|
|
7212
|
+
disabled,
|
|
7213
|
+
forced
|
|
7047
7214
|
}) {
|
|
7048
|
-
const shouldVirtualize = !disabled && rowCount >= VIRTUALIZATION_THRESHOLD;
|
|
7215
|
+
const shouldVirtualize = !disabled && (forced || rowCount >= VIRTUALIZATION_THRESHOLD);
|
|
7049
7216
|
const virtualizer = useVirtualizer({
|
|
7050
7217
|
count: shouldVirtualize ? rowCount : 0,
|
|
7051
7218
|
// `scrollRef` points at the outer TableContainer div, which does not
|
|
@@ -7077,14 +7244,19 @@ function DataTableInner(props, ref) {
|
|
|
7077
7244
|
data: dataProp,
|
|
7078
7245
|
columns: columnsProp,
|
|
7079
7246
|
customFooter,
|
|
7247
|
+
defaultActiveRowIds,
|
|
7080
7248
|
defaultExpandedRowIds,
|
|
7081
7249
|
defaultSelectedRowIds,
|
|
7082
7250
|
defaultSortedColumn,
|
|
7083
7251
|
disableExpandAll,
|
|
7084
7252
|
disableSelectAll,
|
|
7085
7253
|
expandedRowIds,
|
|
7254
|
+
activeRowIds,
|
|
7255
|
+
isActivatable,
|
|
7086
7256
|
isSelectable,
|
|
7257
|
+
onActivateRow,
|
|
7087
7258
|
onSelectRow,
|
|
7259
|
+
readOnlyRowIds,
|
|
7088
7260
|
onSort,
|
|
7089
7261
|
onExpandRow,
|
|
7090
7262
|
pagination,
|
|
@@ -7093,6 +7265,7 @@ function DataTableInner(props, ref) {
|
|
|
7093
7265
|
emptyState,
|
|
7094
7266
|
emptyCellContent,
|
|
7095
7267
|
disableVirtualization,
|
|
7268
|
+
forceVirtualization,
|
|
7096
7269
|
getRowVersion,
|
|
7097
7270
|
className,
|
|
7098
7271
|
style,
|
|
@@ -7103,6 +7276,7 @@ function DataTableInner(props, ref) {
|
|
|
7103
7276
|
...layoutStyles
|
|
7104
7277
|
};
|
|
7105
7278
|
const tableRef = useRef(null);
|
|
7279
|
+
const lastBodyHeightRef = useRef(null);
|
|
7106
7280
|
const [rowSelection, setRowSelection] = useOptionallyControlledState({
|
|
7107
7281
|
controlledValue: isSelectable && selectedRowIds ? Object.fromEntries(selectedRowIds.map((id) => [id, true])) : void 0,
|
|
7108
7282
|
defaultValue: isSelectable ? defaultSelectedRowIds ? Object.fromEntries(defaultSelectedRowIds.map((id) => [id, true])) : {} : {},
|
|
@@ -7110,6 +7284,41 @@ function DataTableInner(props, ref) {
|
|
|
7110
7284
|
onSelectRow?.(Object.keys(newRowSelection));
|
|
7111
7285
|
}
|
|
7112
7286
|
});
|
|
7287
|
+
const [rowActivation, setRowActivation] = useOptionallyControlledState({
|
|
7288
|
+
controlledValue: isActivatable && activeRowIds ? Object.fromEntries(activeRowIds.map((id) => [id, true])) : void 0,
|
|
7289
|
+
defaultValue: isActivatable ? defaultActiveRowIds ? Object.fromEntries(defaultActiveRowIds.map((id) => [id, true])) : {} : {},
|
|
7290
|
+
onChange: (newRowActivation) => {
|
|
7291
|
+
onActivateRow?.(Object.keys(newRowActivation));
|
|
7292
|
+
}
|
|
7293
|
+
});
|
|
7294
|
+
const activeRowMap = rowActivation ?? {};
|
|
7295
|
+
const readOnlyRowMap = useMemo(
|
|
7296
|
+
() => readOnlyRowIds ? Object.fromEntries(readOnlyRowIds.map((id) => [String(id), true])) : {},
|
|
7297
|
+
[readOnlyRowIds]
|
|
7298
|
+
);
|
|
7299
|
+
const setRowActivationRef = useRef(setRowActivation);
|
|
7300
|
+
setRowActivationRef.current = setRowActivation;
|
|
7301
|
+
const toggleRowActivation = useCallback(
|
|
7302
|
+
(rowId, descendantIds = []) => {
|
|
7303
|
+
setRowActivationRef.current((prev) => {
|
|
7304
|
+
const prevMap = prev ?? {};
|
|
7305
|
+
const rowKey = String(rowId);
|
|
7306
|
+
const descendantKeys = descendantIds.map(String);
|
|
7307
|
+
const next = { ...prevMap };
|
|
7308
|
+
if (prevMap[rowKey]) {
|
|
7309
|
+
delete next[rowKey];
|
|
7310
|
+
descendantKeys.forEach((key) => delete next[key]);
|
|
7311
|
+
} else {
|
|
7312
|
+
next[rowKey] = true;
|
|
7313
|
+
descendantKeys.forEach((key) => {
|
|
7314
|
+
next[key] = true;
|
|
7315
|
+
});
|
|
7316
|
+
}
|
|
7317
|
+
return next;
|
|
7318
|
+
});
|
|
7319
|
+
},
|
|
7320
|
+
[]
|
|
7321
|
+
);
|
|
7113
7322
|
const [sorting, setSorting] = useOptionallyControlledState({
|
|
7114
7323
|
controlledValue: sortedColumn ? [sortedColumn] : void 0,
|
|
7115
7324
|
defaultValue: defaultSortedColumn ? [defaultSortedColumn] : void 0,
|
|
@@ -7203,6 +7412,15 @@ function DataTableInner(props, ref) {
|
|
|
7203
7412
|
}
|
|
7204
7413
|
});
|
|
7205
7414
|
const tableData = isLoading ? EMPTY_DATA : resolvedData;
|
|
7415
|
+
useLayoutEffect(() => {
|
|
7416
|
+
if (isLoading) return;
|
|
7417
|
+
const body = tableRef.current?.querySelector(
|
|
7418
|
+
'[data-anv="table-body"]'
|
|
7419
|
+
);
|
|
7420
|
+
if (body && body.offsetHeight > 0) {
|
|
7421
|
+
lastBodyHeightRef.current = body.offsetHeight;
|
|
7422
|
+
}
|
|
7423
|
+
}, [isLoading]);
|
|
7206
7424
|
const hasRowStatus = useMemo(() => {
|
|
7207
7425
|
return tableData?.some((row) => {
|
|
7208
7426
|
const meta = row.meta;
|
|
@@ -7299,20 +7517,8 @@ function DataTableInner(props, ref) {
|
|
|
7299
7517
|
"data-cell-action": "expand"
|
|
7300
7518
|
}
|
|
7301
7519
|
);
|
|
7302
|
-
} else if (row.getParentRow()?.getCanExpand() && isSelectable) {
|
|
7303
|
-
return /* @__PURE__ */ jsx(
|
|
7304
|
-
Checkbox,
|
|
7305
|
-
{
|
|
7306
|
-
tabIndex: -1,
|
|
7307
|
-
"aria-label": row.getIsSelected() ? "Deselect row" : "Select row",
|
|
7308
|
-
checked: row.getIsSelected(),
|
|
7309
|
-
disabled: !row.getCanSelect(),
|
|
7310
|
-
indeterminate: row.getIsSomeSelected(),
|
|
7311
|
-
onChange: row.getToggleSelectedHandler(),
|
|
7312
|
-
"data-cell-action": "select"
|
|
7313
|
-
}
|
|
7314
|
-
);
|
|
7315
7520
|
}
|
|
7521
|
+
return null;
|
|
7316
7522
|
}
|
|
7317
7523
|
});
|
|
7318
7524
|
}
|
|
@@ -7337,23 +7543,18 @@ function DataTableInner(props, ref) {
|
|
|
7337
7543
|
}
|
|
7338
7544
|
) });
|
|
7339
7545
|
},
|
|
7340
|
-
cell: ({ row }) =>
|
|
7341
|
-
|
|
7342
|
-
|
|
7546
|
+
cell: ({ row }) => /* @__PURE__ */ jsx(
|
|
7547
|
+
Checkbox,
|
|
7548
|
+
{
|
|
7549
|
+
tabIndex: -1,
|
|
7550
|
+
"aria-label": row.getIsSelected() ? "Deselect row" : "Select row",
|
|
7551
|
+
checked: row.getIsSelected(),
|
|
7552
|
+
disabled: !row.getCanSelect(),
|
|
7553
|
+
indeterminate: row.getIsSomeSelected(),
|
|
7554
|
+
onChange: row.getToggleSelectedHandler(),
|
|
7555
|
+
"data-cell-action": "select"
|
|
7343
7556
|
}
|
|
7344
|
-
|
|
7345
|
-
Checkbox,
|
|
7346
|
-
{
|
|
7347
|
-
tabIndex: -1,
|
|
7348
|
-
"aria-label": row.getIsSelected() ? "Deselect row" : "Select row",
|
|
7349
|
-
checked: row.getIsSelected(),
|
|
7350
|
-
disabled: !row.getCanSelect(),
|
|
7351
|
-
indeterminate: row.getIsSomeSelected(),
|
|
7352
|
-
onChange: row.getToggleSelectedHandler(),
|
|
7353
|
-
"data-cell-action": "select"
|
|
7354
|
-
}
|
|
7355
|
-
);
|
|
7356
|
-
}
|
|
7557
|
+
)
|
|
7357
7558
|
});
|
|
7358
7559
|
}
|
|
7359
7560
|
return tableColumns;
|
|
@@ -7398,7 +7599,11 @@ function DataTableInner(props, ref) {
|
|
|
7398
7599
|
manualSorting: isAsyncPaginated,
|
|
7399
7600
|
autoResetPageIndex: false,
|
|
7400
7601
|
columnResizeMode: "onChange",
|
|
7401
|
-
enableRowSelection:
|
|
7602
|
+
enableRowSelection: !isSelectable ? false : (row) => {
|
|
7603
|
+
const original = row.original;
|
|
7604
|
+
if (readOnlyRowMap[String(original.id)]) return false;
|
|
7605
|
+
return typeof isSelectable === "function" ? isSelectable(original) : true;
|
|
7606
|
+
},
|
|
7402
7607
|
onRowSelectionChange: (newRowSelection) => {
|
|
7403
7608
|
setRowSelection(newRowSelection);
|
|
7404
7609
|
},
|
|
@@ -7419,7 +7624,8 @@ function DataTableInner(props, ref) {
|
|
|
7419
7624
|
const rowVirtualizer = useDataTableVirtualizer({
|
|
7420
7625
|
rowCount: table.getRowModel().rows.length,
|
|
7421
7626
|
scrollRef: tableRef,
|
|
7422
|
-
disabled: disableVirtualization
|
|
7627
|
+
disabled: disableVirtualization,
|
|
7628
|
+
forced: forceVirtualization
|
|
7423
7629
|
});
|
|
7424
7630
|
const headers = table.getFlatHeaders();
|
|
7425
7631
|
const headerRowCount = table.getHeaderGroups().length;
|
|
@@ -7529,7 +7735,11 @@ function DataTableInner(props, ref) {
|
|
|
7529
7735
|
table,
|
|
7530
7736
|
hasSubRows,
|
|
7531
7737
|
virtualizer: rowVirtualizer,
|
|
7532
|
-
getRowVersion
|
|
7738
|
+
getRowVersion,
|
|
7739
|
+
isActivatable,
|
|
7740
|
+
activeRowMap,
|
|
7741
|
+
readOnlyRowMap,
|
|
7742
|
+
onToggleActive: toggleRowActivation
|
|
7533
7743
|
}
|
|
7534
7744
|
),
|
|
7535
7745
|
isEmpty && emptyState && /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
@@ -7554,7 +7764,7 @@ function DataTableInner(props, ref) {
|
|
|
7554
7764
|
"div",
|
|
7555
7765
|
{
|
|
7556
7766
|
style: {
|
|
7557
|
-
height: rowsPerPage ?
|
|
7767
|
+
height: `${lastBodyHeightRef.current ?? (rowsPerPage ? rowsPerPage * 35 : 200)}px`
|
|
7558
7768
|
},
|
|
7559
7769
|
role: "presentation",
|
|
7560
7770
|
"aria-hidden": "true",
|
|
@@ -7615,4 +7825,4 @@ function DataTableInner(props, ref) {
|
|
|
7615
7825
|
const DataTable = forwardRef(DataTableInner);
|
|
7616
7826
|
|
|
7617
7827
|
export { COLUMN_TYPE_DEFAULTS as C, DataTable as D, chipsFormatter as a, booleanFormatter as b, createColumnHelper$1 as c, currencyFormatter as d, dateFormatter as e, dateTimeFormatter as f, getColumnTypeDefaults as g, htmlFormatter as h, dateFormatPresets as i, timeFormatter as j, markdownFormatter as m, numberFormatter as n, percentFormatter as p, resolveColumnTypeConfig as r, timeFormatPresets as t, yearlessDateFormatter as y };
|
|
7618
|
-
//# sourceMappingURL=DataTable-
|
|
7828
|
+
//# sourceMappingURL=DataTable-BPonNWnU.js.map
|