@servicetitan/anvil2 2.8.0 → 2.9.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 +42 -0
- package/dist/{AiMark-Cwc9KoyE.js → AiMark-DR-w6Nbm.js} +4 -4
- package/dist/{AiMark-Cwc9KoyE.js.map → AiMark-DR-w6Nbm.js.map} +1 -1
- package/dist/AiMark.js +1 -1
- package/dist/{Alert-5qhkSUN3.js → Alert-Dj61Bq8h.js} +3 -3
- package/dist/{Alert-5qhkSUN3.js.map → Alert-Dj61Bq8h.js.map} +1 -1
- package/dist/Alert.js +1 -1
- package/dist/{Announcement-fQmFNysn.js → Announcement-B9zm-_1S.js} +2 -2
- package/dist/{Announcement-fQmFNysn.js.map → Announcement-B9zm-_1S.js.map} +1 -1
- package/dist/Announcement.js +1 -1
- package/dist/{AnvilProvider-ClfmLl_6.js → AnvilProvider-DUPYyMc7.js} +2 -2
- package/dist/{AnvilProvider-ClfmLl_6.js.map → AnvilProvider-DUPYyMc7.js.map} +1 -1
- package/dist/AnvilProvider.js +1 -1
- package/dist/{Breadcrumbs-BXo2FO2n.js → Breadcrumbs-ojgYVZwe.js} +2 -2
- package/dist/{Breadcrumbs-BXo2FO2n.js.map → Breadcrumbs-ojgYVZwe.js.map} +1 -1
- package/dist/Breadcrumbs.js +1 -1
- package/dist/Button-BdrrhBTI.js +2185 -0
- package/dist/Button-BdrrhBTI.js.map +1 -0
- package/dist/Button.js +1 -1
- package/dist/{ButtonToggle-CmY77gUp.js → ButtonToggle-DaFQ3DBG.js} +2 -2
- package/dist/{ButtonToggle-CmY77gUp.js.map → ButtonToggle-DaFQ3DBG.js.map} +1 -1
- package/dist/ButtonToggle.js +1 -1
- package/dist/{Calendar-d2owsYe9.js → Calendar-Cka4unyi.js} +2 -2
- package/dist/{Calendar-d2owsYe9.js.map → Calendar-Cka4unyi.js.map} +1 -1
- package/dist/{Calendar-Bd_WELZC.js → Calendar-Dxl9QnfP.js} +3 -3
- package/dist/{Calendar-Bd_WELZC.js.map → Calendar-Dxl9QnfP.js.map} +1 -1
- package/dist/Calendar.js +2 -2
- package/dist/{Checkbox-BlFc6ZWy.js → Checkbox-B-XTVPbX.js} +3 -3
- package/dist/{Checkbox-BlFc6ZWy.js.map → Checkbox-B-XTVPbX.js.map} +1 -1
- package/dist/{Checkbox-DbaZrUE2.js → Checkbox-Cw1-KFvq.js} +2 -2
- package/dist/{Checkbox-DbaZrUE2.js.map → Checkbox-Cw1-KFvq.js.map} +1 -1
- package/dist/Checkbox.js +1 -1
- package/dist/{Chip-BnofwIUN.js → Chip-Ce0WGKAc.js} +2 -2
- package/dist/{Chip-BnofwIUN.js.map → Chip-Ce0WGKAc.js.map} +1 -1
- package/dist/Chip.js +1 -1
- package/dist/{Combobox-BOxAzG9v.js → Combobox-CNQUROyr.js} +4 -4
- package/dist/{Combobox-BOxAzG9v.js.map → Combobox-CNQUROyr.js.map} +1 -1
- package/dist/Combobox.js +1 -1
- package/dist/{DataTable-DK9xRjnq.js → DataTable-JRxu2yTP.js} +862 -497
- package/dist/DataTable-JRxu2yTP.js.map +1 -0
- package/dist/DataTable.css +185 -109
- package/dist/{DateFieldRange-5Jrz6dLl.js → DateFieldRange-D2hnF50O.js} +4 -4
- package/dist/{DateFieldRange-5Jrz6dLl.js.map → DateFieldRange-D2hnF50O.js.map} +1 -1
- package/dist/DateFieldRange.js +1 -1
- package/dist/{DateFieldSingle-DWFr6Ew4.js → DateFieldSingle-BuaB7RDr.js} +4 -4
- package/dist/{DateFieldSingle-DWFr6Ew4.js.map → DateFieldSingle-BuaB7RDr.js.map} +1 -1
- package/dist/DateFieldSingle.js +1 -1
- package/dist/{DateFieldYearless-UU22A5-E.js → DateFieldYearless-DLeMEutt.js} +4 -4
- package/dist/{DateFieldYearless-UU22A5-E.js.map → DateFieldYearless-DLeMEutt.js.map} +1 -1
- package/dist/DateFieldYearless.js +1 -1
- package/dist/{DateFieldYearlessRange-BoPLxm6t.js → DateFieldYearlessRange-BfPuYKKC.js} +3 -3
- package/dist/{DateFieldYearlessRange-BoPLxm6t.js.map → DateFieldYearlessRange-BfPuYKKC.js.map} +1 -1
- package/dist/DateFieldYearlessRange.js +1 -1
- package/dist/{DaysOfTheWeek-4cfTmjzm.js → DaysOfTheWeek-BW1T8sTU.js} +3 -3
- package/dist/{DaysOfTheWeek-4cfTmjzm.js.map → DaysOfTheWeek-BW1T8sTU.js.map} +1 -1
- package/dist/DaysOfTheWeek.js +1 -1
- package/dist/{Dialog-Dn836WQM.js → Dialog-Cewu2pd_.js} +38 -10
- package/dist/Dialog-Cewu2pd_.js.map +1 -0
- package/dist/Dialog.js +1 -1
- package/dist/{DialogCancelButton-B-jfihJr.js → DialogCancelButton-Czz4Wpse.js} +2 -2
- package/dist/{DialogCancelButton-B-jfihJr.js.map → DialogCancelButton-Czz4Wpse.js.map} +1 -1
- package/dist/{Drawer-CdDWt_Ba.js → Drawer-Cb5asXWf.js} +38 -10
- package/dist/Drawer-Cb5asXWf.js.map +1 -0
- package/dist/Drawer.js +1 -1
- package/dist/DrillDown.js +1 -1
- package/dist/DrillDown.module-C8VOhzaF.js.map +1 -1
- package/dist/{EditCard-CZibhEfS.js → EditCard-DlJE3LXN.js} +3 -3
- package/dist/{EditCard-CZibhEfS.js.map → EditCard-DlJE3LXN.js.map} +1 -1
- package/dist/EditCard.js +1 -1
- package/dist/{FieldLabel-Dr41PRxH.js → FieldLabel-HO2VP-4B.js} +2 -2
- package/dist/{FieldLabel-Dr41PRxH.js.map → FieldLabel-HO2VP-4B.js.map} +1 -1
- package/dist/FieldLabel.js +1 -1
- package/dist/{InputMask-CcXqzqdx.js → InputMask-CLLTehFI.js} +3 -3
- package/dist/{InputMask-CcXqzqdx.js.map → InputMask-CLLTehFI.js.map} +1 -1
- package/dist/InputMask.js +1 -1
- package/dist/{ListView-D9cZUVer.js → ListView-CPi-qG2w.js} +2 -2
- package/dist/{ListView-D9cZUVer.js.map → ListView-CPi-qG2w.js.map} +1 -1
- package/dist/ListView.js +1 -1
- package/dist/{Listbox-CgDwzRfz.js → Listbox-Bp4hqIpH.js} +2 -2
- package/dist/{Listbox-CgDwzRfz.js.map → Listbox-Bp4hqIpH.js.map} +1 -1
- package/dist/Listbox.js +1 -1
- package/dist/{Menu-CPbuIsqC.js → Menu-CCavGohP.js} +91 -93
- package/dist/Menu-CCavGohP.js.map +1 -0
- package/dist/Menu.js +1 -1
- package/dist/MultiSelectField.js +1 -1
- package/dist/{MultiSelectFieldSync-Ei7DXzvs.js → MultiSelectFieldSync-ChZCW4M9.js} +7 -7
- package/dist/{MultiSelectFieldSync-Ei7DXzvs.js.map → MultiSelectFieldSync-ChZCW4M9.js.map} +1 -1
- package/dist/MultiSelectMenu.js +1 -1
- package/dist/{MultiSelectMenuSync-B_mXpTEe.js → MultiSelectMenuSync-7C1wW4oO.js} +3 -3
- package/dist/{MultiSelectMenuSync-B_mXpTEe.js.map → MultiSelectMenuSync-7C1wW4oO.js.map} +1 -1
- package/dist/{NumberField-C5t47Obp.js → NumberField-CZSTHBeO.js} +4 -4
- package/dist/{NumberField-C5t47Obp.js.map → NumberField-CZSTHBeO.js.map} +1 -1
- package/dist/NumberField.js +1 -1
- package/dist/{Page-2hbQxUj6.js → Page-BHdvTlfE.js} +111 -62
- package/dist/Page-BHdvTlfE.js.map +1 -0
- package/dist/Page.css +76 -76
- package/dist/Page.js +1 -1
- package/dist/{Pagination-CjGmJ_rU.js → Pagination-B5jqHYG3.js} +7 -7
- package/dist/{Pagination-CjGmJ_rU.js.map → Pagination-B5jqHYG3.js.map} +1 -1
- package/dist/Pagination.css +7 -6
- package/dist/Pagination.js +1 -1
- package/dist/{Popover-CpU9VAcb.js → Popover-BbqTZw-1.js} +3 -3
- package/dist/{Popover-CpU9VAcb.js.map → Popover-BbqTZw-1.js.map} +1 -1
- package/dist/Popover.js +1 -1
- package/dist/{ProgressBar-FMuK8viJ.js → ProgressBar-CZcxkdX6.js} +2 -2
- package/dist/{ProgressBar-FMuK8viJ.js.map → ProgressBar-CZcxkdX6.js.map} +1 -1
- package/dist/ProgressBar.js +1 -1
- package/dist/{Radio-DmtVWAmN.js → Radio-BFr8AdHc.js} +2 -2
- package/dist/{Radio-DmtVWAmN.js.map → Radio-BFr8AdHc.js.map} +1 -1
- package/dist/{Radio-CZZd8phn.js → Radio-DJZVMCv0.js} +3 -3
- package/dist/{Radio-CZZd8phn.js.map → Radio-DJZVMCv0.js.map} +1 -1
- package/dist/Radio.js +1 -1
- package/dist/{SelectCard-8OmIDl1m.js → SelectCard-DVcWJRbX.js} +3 -3
- package/dist/{SelectCard-8OmIDl1m.js.map → SelectCard-DVcWJRbX.js.map} +1 -1
- package/dist/SelectCard.js +1 -1
- package/dist/SelectField.js +1 -1
- package/dist/{SelectFieldLabel-C8PrXxDU.js → SelectFieldLabel-kEBS8L4l.js} +2 -2
- package/dist/{SelectFieldLabel-C8PrXxDU.js.map → SelectFieldLabel-kEBS8L4l.js.map} +1 -1
- package/dist/{SelectFieldSync-DGK8F2G9.js → SelectFieldSync-o1Cp9UYC.js} +6 -6
- package/dist/{SelectFieldSync-DGK8F2G9.js.map → SelectFieldSync-o1Cp9UYC.js.map} +1 -1
- package/dist/SelectMenu.js +1 -1
- package/dist/{SelectMenuSync-CuZp9mnt.js → SelectMenuSync-DXrwecFt.js} +3 -3
- package/dist/{SelectMenuSync-CuZp9mnt.js.map → SelectMenuSync-DXrwecFt.js.map} +1 -1
- package/dist/{SelectOptions-CmElsiTd.js → SelectOptions-Dy2OWqxn.js} +2 -2
- package/dist/{SelectOptions-CmElsiTd.js.map → SelectOptions-Dy2OWqxn.js.map} +1 -1
- package/dist/{SelectTrigger-KF8w6Ynk.js → SelectTrigger-DhKYzEAr.js} +2 -2
- package/dist/{SelectTrigger-KF8w6Ynk.js.map → SelectTrigger-DhKYzEAr.js.map} +1 -1
- package/dist/SelectTrigger.js +1 -1
- package/dist/{SelectTriggerBase-Bxmv6oXk.js → SelectTriggerBase-Ni8WqeUx.js} +76 -63
- package/dist/SelectTriggerBase-Ni8WqeUx.js.map +1 -0
- package/dist/SelectTriggerBase.css +83 -66
- package/dist/SelectTriggerBase.module-CKoq6qzX.js +38 -0
- package/dist/SelectTriggerBase.module-CKoq6qzX.js.map +1 -0
- package/dist/{Stepper-_27Lmm2K.js → Stepper-Dt2xAXth.js} +2 -2
- package/dist/{Stepper-_27Lmm2K.js.map → Stepper-Dt2xAXth.js.map} +1 -1
- package/dist/Stepper.js +1 -1
- package/dist/{Switch-DPGz7wC_.js → Switch-C84MBChG.js} +2 -2
- package/dist/{Switch-DPGz7wC_.js.map → Switch-C84MBChG.js.map} +1 -1
- package/dist/Switch.js +1 -1
- package/dist/Table.js +1 -1
- package/dist/{Text-MVxRo6yx.js → Text-WiS8UZkY.js} +2 -2
- package/dist/{Text-MVxRo6yx.js.map → Text-WiS8UZkY.js.map} +1 -1
- package/dist/Text.js +1 -1
- package/dist/{TextField-BpSxZa0z.js → TextField-Bul_uln5.js} +3 -3
- package/dist/{TextField-BpSxZa0z.js.map → TextField-Bul_uln5.js.map} +1 -1
- package/dist/{TextField-D93iv_pk.js → TextField-OznkTx4e.js} +2 -2
- package/dist/{TextField-D93iv_pk.js.map → TextField-OznkTx4e.js.map} +1 -1
- package/dist/TextField.js +1 -1
- package/dist/{Textarea-1u2fSMTh.js → Textarea-CCYLsJ1x.js} +3 -3
- package/dist/{Textarea-1u2fSMTh.js.map → Textarea-CCYLsJ1x.js.map} +1 -1
- package/dist/Textarea.js +1 -1
- package/dist/{TimeField-B4gLlBQJ.js → TimeField-BPvPbD8H.js} +4 -4
- package/dist/{TimeField-B4gLlBQJ.js.map → TimeField-BPvPbD8H.js.map} +1 -1
- package/dist/TimeField.js +1 -1
- package/dist/Toast.js +2 -2
- package/dist/{Toaster-DbWYnF_t.js → Toaster-CIaIvwH6.js} +2 -2
- package/dist/{Toaster-DbWYnF_t.js.map → Toaster-CIaIvwH6.js.map} +1 -1
- package/dist/{Toaster-CSJfSOHx.js → Toaster-DYJm06Vb.js} +4 -4
- package/dist/{Toaster-CSJfSOHx.js.map → Toaster-DYJm06Vb.js.map} +1 -1
- package/dist/{Toolbar-CWRk523l.js → Toolbar-ByyI7SqG.js} +14 -14
- package/dist/{Toolbar-CWRk523l.js.map → Toolbar-ByyI7SqG.js.map} +1 -1
- package/dist/Toolbar.js +1 -1
- package/dist/{YearlessDateInputWithPicker-BSl5z2zo.js → YearlessDateInputWithPicker-C_twiQW5.js} +2 -2
- package/dist/{YearlessDateInputWithPicker-BSl5z2zo.js.map → YearlessDateInputWithPicker-C_twiQW5.js.map} +1 -1
- package/dist/assets/icons/st/unsorted.svg +1 -0
- package/dist/assets/icons/st.ts +1 -0
- package/dist/beta/components/Table/DataTable/DataTable.d.ts +28 -3
- package/dist/beta/components/Table/DataTable/internal/DataTableBody.d.ts +19 -4
- package/dist/beta/components/Table/DataTable/internal/DataTableBodyRow.d.ts +18 -1
- package/dist/beta/components/Table/DataTable/internal/DataTableFooter.d.ts +5 -5
- package/dist/beta/components/Table/DataTable/internal/DataTableHeader.d.ts +4 -2
- package/dist/beta/components/Table/DataTable/internal/cells/DataTableBodyCell.d.ts +0 -2
- package/dist/beta/components/Table/DataTable/internal/cells/DataTableBodyImmutableCell.d.ts +0 -5
- package/dist/beta/components/Table/DataTable/internal/cells/DataTableBodyMutableCell.d.ts +0 -5
- package/dist/beta/components/Table/DataTable/internal/cells/DataTableHeaderCell.d.ts +4 -4
- package/dist/beta/components/Table/DataTable/internal/cells/useCellFocusListener.d.ts +10 -0
- package/dist/beta/components/Table/DataTable/internal/context/focus/DTFocusProvider.d.ts +4 -1
- package/dist/beta/components/Table/DataTable/internal/editable-cells/DataTableEditableMultiselectAsyncCell.d.ts +0 -1
- package/dist/beta/components/Table/DataTable/internal/editable-cells/DataTableEditableMultiselectCell.d.ts +0 -1
- package/dist/beta/components/Table/DataTable/internal/editable-cells/types.d.ts +0 -4
- package/dist/beta/components/Table/DataTable/internal/editable-cells/useEditableMenuCell.d.ts +3 -6
- package/dist/beta/components/Table/DataTable/internal/useDataTableVirtualizer.d.ts +29 -0
- package/dist/beta/components/Table/DataTable/internal/util/getTanStackColumnDef.d.ts +13 -2
- package/dist/beta/components/Table/DataTable/internal/util/shallowSortingEqual.d.ts +2 -0
- package/dist/beta/components/Table/DataTable/stories/DataTable.story-data.d.ts +1 -0
- package/dist/beta/components/Table/base/cells/TableHeaderCell.d.ts +4 -0
- package/dist/beta/components/Table/createColumnHelper.d.ts +36 -12
- package/dist/beta/components/Table/formatters/htmlFormatter.d.ts +13 -0
- package/dist/beta/components/Table/formatters/htmlToMarkdown.d.ts +11 -0
- package/dist/beta/components/Table/formatters/index.d.ts +2 -0
- package/dist/beta/components/Table/formatters/markdownFormatter.d.ts +11 -0
- package/dist/beta/components/Table/types.d.ts +64 -10
- package/dist/beta.js +9 -9
- package/dist/components/DrillDown/internal/DrillDownContext.d.ts +4 -0
- package/dist/components/DrillDown/internal/useDrillDownContextState.d.ts +4 -0
- package/dist/index.js +43 -44
- package/dist/index.js.map +1 -1
- package/dist/internal/flubber/a2c.d.ts +16 -0
- package/dist/internal/flubber/add.d.ts +3 -0
- package/dist/internal/flubber/arc.d.ts +26 -0
- package/dist/internal/flubber/bezier.d.ts +32 -0
- package/dist/internal/flubber/errors.d.ts +5 -0
- package/dist/internal/flubber/index.d.ts +6 -0
- package/dist/internal/flubber/interpolate.d.ts +7 -0
- package/dist/internal/flubber/linear.d.ts +27 -0
- package/dist/internal/flubber/math.d.ts +10 -0
- package/dist/internal/flubber/normalize.d.ts +4 -0
- package/dist/internal/flubber/parse.d.ts +7 -0
- package/dist/internal/flubber/path-properties.d.ts +23 -0
- package/dist/internal/flubber/rotate.d.ts +2 -0
- package/dist/internal/flubber/svg.d.ts +9 -0
- package/dist/internal/index.d.ts +1 -0
- package/dist/{stripInlineMarkdown-DyqLAQnf.js → stripInlineMarkdown-Cg1qlNwL.js} +2 -2
- package/dist/{stripInlineMarkdown-DyqLAQnf.js.map → stripInlineMarkdown-Cg1qlNwL.js.map} +1 -1
- package/dist/{syncFilterUtils-CsbCnI1-.js → syncFilterUtils-UR5Vgqkh.js} +7 -8
- package/dist/{syncFilterUtils-CsbCnI1-.js.map → syncFilterUtils-UR5Vgqkh.js.map} +1 -1
- package/dist/{useDrilldown-C7eMBl68.js → useDrilldown-D6VZNSCX.js} +46 -20
- package/dist/{useDrilldown-C7eMBl68.js.map → useDrilldown-D6VZNSCX.js.map} +1 -1
- package/dist/{useInitialFocus-DbaB-x5T.js → useInitialFocus-BUxEDMEG.js} +65 -23
- package/dist/useInitialFocus-BUxEDMEG.js.map +1 -0
- 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-BM8asdFj.js → useToggleSelection-BBdrIVWs.js} +2 -2
- package/dist/{useToggleSelection-BM8asdFj.js.map → useToggleSelection-BBdrIVWs.js.map} +1 -1
- package/package.json +1 -3
- package/dist/Button-a_D7tUgM.js +0 -4517
- package/dist/Button-a_D7tUgM.js.map +0 -1
- package/dist/DataTable-DK9xRjnq.js.map +0 -1
- package/dist/Dialog-Dn836WQM.js.map +0 -1
- package/dist/Drawer-CdDWt_Ba.js.map +0 -1
- package/dist/Menu-CPbuIsqC.js.map +0 -1
- package/dist/Page-2hbQxUj6.js.map +0 -1
- package/dist/SelectTriggerBase-Bxmv6oXk.js.map +0 -1
- package/dist/SelectTriggerBase.module-B0NFRlQP.js +0 -36
- package/dist/SelectTriggerBase.module-B0NFRlQP.js.map +0 -1
- package/dist/beta/components/Table/DataTable/internal/cells/CellFocusContext.d.ts +0 -16
- package/dist/beta/components/Table/DataTable/internal/context/hover/DTHoverContext.d.ts +0 -31
- package/dist/beta/components/Table/DataTable/internal/context/hover/DTHoverProvider.d.ts +0 -3
- package/dist/beta/components/Table/DataTable/internal/context/hover/useDTHoverDispatchContext.d.ts +0 -1
- package/dist/beta/components/Table/DataTable/internal/context/hover/useDTHoverStateContext.d.ts +0 -4
- package/dist/beta/components/Table/internal/getColSpanWidth.d.ts +0 -7
- package/dist/useInitialFocus-DbaB-x5T.js.map +0 -1
- /package/dist/{anvil-fonts.css → AnvilProvider.css} +0 -0
|
@@ -13,10 +13,6 @@ export type DataTableBodyMutableCellProps<T> = Omit<BaseDataTableBodyCellProps,
|
|
|
13
13
|
* The TanStack table cell instance
|
|
14
14
|
*/
|
|
15
15
|
cell: Cell<T, unknown>;
|
|
16
|
-
/**
|
|
17
|
-
* Whether the cell is currently hovered
|
|
18
|
-
*/
|
|
19
|
-
isHovered: boolean;
|
|
20
16
|
};
|
|
21
17
|
/**
|
|
22
18
|
* Renders a mutable (editable) body cell in a DataTable. This component handles keyboard navigation
|
|
@@ -27,7 +23,6 @@ export type DataTableBodyMutableCellProps<T> = Omit<BaseDataTableBodyCellProps,
|
|
|
27
23
|
* @param props.cell - The TanStack table cell instance
|
|
28
24
|
* @param props.cellPosition - The position of the cell in the table
|
|
29
25
|
* @param props.children - The content to render in the cell
|
|
30
|
-
* @param props.isHovered - Whether the cell is currently hovered
|
|
31
26
|
* @returns The rendered editable cell component or null if no editMode is configured
|
|
32
27
|
*/
|
|
33
28
|
export declare function DataTableBodyMutableCell<T>(props: DataTableBodyMutableCellProps<T>): import("react/jsx-runtime").JSX.Element | null;
|
|
@@ -5,12 +5,12 @@ import { DataTableHeaderCellProps as BaseDataTableHeaderCellProps } from '../../
|
|
|
5
5
|
* Props for the DataTableHeaderCell component
|
|
6
6
|
* @extends BaseDataTableHeaderCellProps
|
|
7
7
|
*/
|
|
8
|
-
export type DataTableHeaderCellProps<T> = BaseDataTableHeaderCellProps & {
|
|
8
|
+
export type DataTableHeaderCellProps<T, TValue> = BaseDataTableHeaderCellProps & {
|
|
9
9
|
cellPosition: {
|
|
10
10
|
rowIndex: number;
|
|
11
11
|
columnIndex: number;
|
|
12
12
|
};
|
|
13
|
-
header: HeaderContext<T,
|
|
13
|
+
header: HeaderContext<T, TValue>;
|
|
14
14
|
};
|
|
15
15
|
/**
|
|
16
16
|
* Data table header cell with focus management
|
|
@@ -20,11 +20,11 @@ export type DataTableHeaderCellProps<T> = BaseDataTableHeaderCellProps & {
|
|
|
20
20
|
* @param props.header - The header of the DataTableHeaderCell component
|
|
21
21
|
* @param props.isFocused - Whether the cell is focused
|
|
22
22
|
*/
|
|
23
|
-
declare function DataTableHeaderCellInner<T>(props: DataTableHeaderCellProps<T>, forwardedRef: Ref<HTMLDivElement>): import("react/jsx-runtime").JSX.Element;
|
|
23
|
+
declare function DataTableHeaderCellInner<T, TValue>(props: DataTableHeaderCellProps<T, TValue>, forwardedRef: Ref<HTMLDivElement>): import("react/jsx-runtime").JSX.Element;
|
|
24
24
|
/**
|
|
25
25
|
* Data table header cell with focus management and ref forwarding
|
|
26
26
|
*/
|
|
27
|
-
export declare const DataTableHeaderCell: <T>(props: DataTableHeaderCellProps<T> & {
|
|
27
|
+
export declare const DataTableHeaderCell: <T, TValue>(props: DataTableHeaderCellProps<T, TValue> & {
|
|
28
28
|
ref?: Ref<HTMLDivElement>;
|
|
29
29
|
}) => ReturnType<typeof DataTableHeaderCellInner>;
|
|
30
30
|
export {};
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { RefObject } from 'react';
|
|
2
|
+
/**
|
|
3
|
+
* Tracks whether the nearest DataTable cell ancestor of `elementRef` is focused.
|
|
4
|
+
* Replaces CellFocusContext for status cells — avoids a React context for the
|
|
5
|
+
* common case while keeping reactive state where needed (tooltip visibility).
|
|
6
|
+
*
|
|
7
|
+
* @param elementRef Ref to the element whose cell-focus state we want to track.
|
|
8
|
+
* @returns True when the cell ancestor currently contains document.activeElement.
|
|
9
|
+
*/
|
|
10
|
+
export declare function useCellFocusListener(elementRef: RefObject<HTMLElement>): boolean;
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { DataTableVirtualizer } from '../../useDataTableVirtualizer';
|
|
1
2
|
export interface DTFocusProviderProps {
|
|
2
3
|
children: React.ReactNode;
|
|
3
4
|
rowCount: number;
|
|
@@ -5,5 +6,7 @@ export interface DTFocusProviderProps {
|
|
|
5
6
|
tableRef: React.RefObject<HTMLDivElement>;
|
|
6
7
|
leftPinnedWidth: number;
|
|
7
8
|
rightPinnedWidth: number;
|
|
9
|
+
virtualizer?: DataTableVirtualizer;
|
|
10
|
+
headerRowCount: number;
|
|
8
11
|
}
|
|
9
|
-
export declare function DTFocusProvider({ children, rowCount, columnCount, tableRef, leftPinnedWidth, rightPinnedWidth, }: DTFocusProviderProps): import("react/jsx-runtime").JSX.Element;
|
|
12
|
+
export declare function DTFocusProvider({ children, rowCount, columnCount, tableRef, leftPinnedWidth, rightPinnedWidth, virtualizer, headerRowCount, }: DTFocusProviderProps): import("react/jsx-runtime").JSX.Element;
|
|
@@ -23,7 +23,6 @@ export type DataTableEditableMultiselectAsyncCellProps<T> = BaseEditableCellProp
|
|
|
23
23
|
* @param props.cellProps - Props for styling and event handling of the cell container
|
|
24
24
|
* @param props.cellPosition - The position of the cell in the table
|
|
25
25
|
* @param props.children - The content to display when not editing
|
|
26
|
-
* @param props.isHovered - Whether the cell is currently hovered
|
|
27
26
|
* @param ref - Ref to the imperative handle for programmatic control
|
|
28
27
|
* @returns The rendered async editable multiselect cell component
|
|
29
28
|
*/
|
|
@@ -11,7 +11,6 @@ export type DataTableEditableMultiselectCellProps<T> = BaseEditableCellProps<T>;
|
|
|
11
11
|
* @param props.cellProps - Props for styling and event handling of the cell container
|
|
12
12
|
* @param props.cellPosition - The position of the cell in the table
|
|
13
13
|
* @param props.children - The content to display when not editing
|
|
14
|
-
* @param props.isHovered - Whether the cell is currently hovered
|
|
15
14
|
* @param ref - Ref to the imperative handle for programmatic control
|
|
16
15
|
* @returns The rendered editable multiselect cell component
|
|
17
16
|
*/
|
package/dist/beta/components/Table/DataTable/internal/editable-cells/useEditableMenuCell.d.ts
CHANGED
|
@@ -9,13 +9,13 @@ type UseEditableMenuCellOptions = {
|
|
|
9
9
|
* Shared hook for select/multiselect editable DataTable cells that use a menu-based
|
|
10
10
|
* editing UX (SelectMenu, MultiSelectMenu, and their async variants).
|
|
11
11
|
*
|
|
12
|
-
* Encapsulates the common state, refs, imperative handle, keyboard/focus/mouse handlers
|
|
13
|
-
*
|
|
12
|
+
* Encapsulates the common state, refs, imperative handle, and keyboard/focus/mouse handlers
|
|
13
|
+
* that are identical across all four menu-based cell components.
|
|
14
14
|
*
|
|
15
15
|
* @param options.cellPosition - The position of the cell in the table grid
|
|
16
16
|
* @param options.onCellKeyDown - The cell's keyDown handler from cellProps, forwarded when the menu is closed
|
|
17
17
|
* @param options.ref - Ref for the imperative handle (invoke/focus)
|
|
18
|
-
* @returns Shared state, refs, event handlers
|
|
18
|
+
* @returns Shared state, refs, and event handlers
|
|
19
19
|
*/
|
|
20
20
|
export declare function useEditableMenuCell({ cellPosition, onCellKeyDown, ref, }: UseEditableMenuCellOptions): {
|
|
21
21
|
tabIndex: number;
|
|
@@ -27,8 +27,5 @@ export declare function useEditableMenuCell({ cellPosition, onCellKeyDown, ref,
|
|
|
27
27
|
handleCellMouseDown: (triggerOnClick: () => void) => () => void;
|
|
28
28
|
handleCellBlur: (e: React.FocusEvent<HTMLElement>) => void;
|
|
29
29
|
handleCellFocus: (event: React.FocusEvent<HTMLTableCellElement>) => void;
|
|
30
|
-
cellFocusContextValue: {
|
|
31
|
-
isCellFocused: boolean;
|
|
32
|
-
};
|
|
33
30
|
};
|
|
34
31
|
export {};
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import { RefObject } from 'react';
|
|
2
|
+
import { Virtualizer } from '@tanstack/react-virtual';
|
|
3
|
+
/**
|
|
4
|
+
* Row count threshold at which row virtualization activates. Tables with fewer
|
|
5
|
+
* than this many rows render all rows in the DOM (the pre-virtualization
|
|
6
|
+
* behavior); tables with this many or more are virtualized.
|
|
7
|
+
*
|
|
8
|
+
* Set to 101 so tables with exactly 100 rows remain non-virtualized (and
|
|
9
|
+
* therefore keep every row — including any editable cells — fully mounted).
|
|
10
|
+
*/
|
|
11
|
+
export declare const VIRTUALIZATION_THRESHOLD = 101;
|
|
12
|
+
export type DataTableVirtualizer = Virtualizer<HTMLDivElement, HTMLDivElement>;
|
|
13
|
+
/**
|
|
14
|
+
* Create a TanStack virtualizer for DataTable body rows.
|
|
15
|
+
*
|
|
16
|
+
* Returns `undefined` when virtualization is disabled or when `rowCount` is
|
|
17
|
+
* below `VIRTUALIZATION_THRESHOLD`, signaling to the body that rows should
|
|
18
|
+
* render via the non-virtualized flat flow.
|
|
19
|
+
*
|
|
20
|
+
* @param rowCount Total number of body rows that would render if not virtualized.
|
|
21
|
+
* @param scrollRef Ref to the scrollable container whose scroll position the virtualizer tracks.
|
|
22
|
+
* @param disabled When `true`, virtualization is skipped regardless of row count.
|
|
23
|
+
* @returns A `Virtualizer` instance when virtualization should run; `undefined` when the body should flat-render.
|
|
24
|
+
*/
|
|
25
|
+
export declare function useDataTableVirtualizer({ rowCount, scrollRef, disabled, }: {
|
|
26
|
+
rowCount: number;
|
|
27
|
+
scrollRef: RefObject<HTMLDivElement>;
|
|
28
|
+
disabled?: boolean;
|
|
29
|
+
}): DataTableVirtualizer | undefined;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { ColumnHelper } from '@tanstack/react-table';
|
|
2
2
|
import { ReactNode } from 'react';
|
|
3
3
|
import { ColumnDef, EditMode } from '../../../types';
|
|
4
4
|
declare module "@tanstack/react-table" {
|
|
@@ -13,6 +13,14 @@ declare module "@tanstack/react-table" {
|
|
|
13
13
|
* Whether the header action (expand all / select all) is disabled for this column
|
|
14
14
|
*/
|
|
15
15
|
disableHeaderAction?: boolean;
|
|
16
|
+
/**
|
|
17
|
+
* Resolved header alignment for DataTable-owned header layout.
|
|
18
|
+
*/
|
|
19
|
+
headerAlign?: HeaderAlign;
|
|
20
|
+
/**
|
|
21
|
+
* Whether this column renders a grouped header.
|
|
22
|
+
*/
|
|
23
|
+
isGroupHeader?: boolean;
|
|
16
24
|
}
|
|
17
25
|
}
|
|
18
26
|
/**
|
|
@@ -29,6 +37,8 @@ export type TanStackColumnDefProps<T> = {
|
|
|
29
37
|
*/
|
|
30
38
|
emptyCellContent?: ReactNode;
|
|
31
39
|
};
|
|
40
|
+
type TanStackColumnDef<T extends object> = ReturnType<ColumnHelper<T>["group"]> | ReturnType<ColumnHelper<T>["accessor"]>;
|
|
41
|
+
type HeaderAlign = "start" | "center" | "end";
|
|
32
42
|
/**
|
|
33
43
|
* Build the column definition for TanStack useReactTable.
|
|
34
44
|
* This converts our ColumnDef<T> to TanStack's column definition format,
|
|
@@ -38,4 +48,5 @@ export type TanStackColumnDefProps<T> = {
|
|
|
38
48
|
* @param props.columnDef - The column definition to convert
|
|
39
49
|
* @returns The column definition for TanStack useReactTable
|
|
40
50
|
*/
|
|
41
|
-
export declare function getTanStackColumnDef<T>({ columnDef, emptyCellContent, }: TanStackColumnDefProps<T>):
|
|
51
|
+
export declare function getTanStackColumnDef<T extends object>({ columnDef, emptyCellContent, }: TanStackColumnDefProps<T>): TanStackColumnDef<T>;
|
|
52
|
+
export {};
|
|
@@ -17,6 +17,7 @@ export declare const subComponentsData: TableRow<TableStoryData>[];
|
|
|
17
17
|
export declare const primaryColumns: import('../..').ColumnDef<TableStoryData>[];
|
|
18
18
|
export declare const groupedColumns: import('../..').ColumnDef<TableStoryData>[];
|
|
19
19
|
export declare const columnsWithMaxWidth: import('../..').ColumnDef<TableStoryData>[];
|
|
20
|
+
export declare const columnsWithDefaultWidth: import('../..').ColumnDef<TableStoryData>[];
|
|
20
21
|
export declare const columnsWithoutFooter: import('../..').ColumnDef<TableStoryData>[];
|
|
21
22
|
export type Category = "electronics" | "clothing" | "home" | "garden" | "other";
|
|
22
23
|
export type EditableTableStoryData = {
|
|
@@ -12,6 +12,10 @@ export type CommonTableHeaderCellProps = CommonTableCellProps & {
|
|
|
12
12
|
* Whether the header cell can be used to activate column sorting
|
|
13
13
|
*/
|
|
14
14
|
isSortable?: boolean;
|
|
15
|
+
/**
|
|
16
|
+
* Whether the header cell should show whole-cell interactive affordances
|
|
17
|
+
*/
|
|
18
|
+
isInteractiveHeaderCell?: boolean;
|
|
15
19
|
};
|
|
16
20
|
export type SimpleTableHeaderCellProps = CommonTableHeaderCellProps & ComponentPropsWithoutRef<"th">;
|
|
17
21
|
export type DataTableHeaderCellProps = CommonTableHeaderCellProps & ComponentPropsWithoutRef<"div">;
|
|
@@ -1,14 +1,19 @@
|
|
|
1
1
|
import { ReactNode } from 'react';
|
|
2
|
-
import { ColumnDef, ColumnTypeConfig, TextEditConfig, NumberEditConfig, SelectEditConfig, SelectAsyncEditConfig, MultiselectEditConfig, MultiselectAsyncEditConfig, BooleanEditConfig, TableRow } from './types';
|
|
2
|
+
import { ColumnDef, ColumnTypeConfig, TextEditConfig, NumberEditConfig, SelectEditConfig, SelectAsyncEditConfig, MultiselectEditConfig, MultiselectAsyncEditConfig, BooleanEditConfig, TableRow, ColumnHeaderConfig } from './types';
|
|
3
3
|
import { MultiSelectMenuOption } from '../MultiSelectMenu';
|
|
4
4
|
/**
|
|
5
5
|
* Base column configuration shared by all column types
|
|
6
6
|
*/
|
|
7
|
-
type BaseColumnConfig<T, K extends keyof T> = {
|
|
7
|
+
type BaseColumnConfig<T, K extends keyof T> = ColumnHeaderConfig & {
|
|
8
8
|
/**
|
|
9
|
-
* The
|
|
9
|
+
* The cleaned-up header configuration.
|
|
10
10
|
*/
|
|
11
|
-
|
|
11
|
+
header?: ColumnDef<T>["header"];
|
|
12
|
+
/**
|
|
13
|
+
* The label of the header.
|
|
14
|
+
* @deprecated Use `header.label` instead.
|
|
15
|
+
*/
|
|
16
|
+
headerLabel?: string;
|
|
12
17
|
/**
|
|
13
18
|
* The alignment of the header.
|
|
14
19
|
* When using `type`, this is set automatically but can be overridden.
|
|
@@ -29,13 +34,30 @@ type BaseColumnConfig<T, K extends keyof T> = {
|
|
|
29
34
|
*/
|
|
30
35
|
footerContent?: ReactNode | ReactNode[];
|
|
31
36
|
/**
|
|
32
|
-
* The maximum width of the column, in pixels
|
|
37
|
+
* The maximum width of the column, in pixels. Caps automatic growth when
|
|
38
|
+
* the table has extra horizontal space available.
|
|
33
39
|
*/
|
|
34
40
|
maxWidth?: number;
|
|
35
41
|
/**
|
|
36
|
-
* The minimum width of the column, in pixels
|
|
42
|
+
* The minimum width of the column, in pixels. Used as the floor for manual
|
|
43
|
+
* resize — users can drag a column down to but not below this value. Also
|
|
44
|
+
* serves as the fallback auto-sizing floor when `defaultWidth` is not set.
|
|
37
45
|
*/
|
|
38
46
|
minWidth?: number;
|
|
47
|
+
/**
|
|
48
|
+
* The preferred starting width of the column, in pixels. Used as the basis
|
|
49
|
+
* for automatic growing/shrinking: the column renders at this width by
|
|
50
|
+
* default, grows toward `maxWidth` when the table has spare horizontal
|
|
51
|
+
* space, and never auto-shrinks below it — the table scrolls horizontally
|
|
52
|
+
* instead.
|
|
53
|
+
*
|
|
54
|
+
* Manual resize via the column's resize handle is still bounded by
|
|
55
|
+
* `minWidth`/`maxWidth`, so users can drag a column below `defaultWidth`
|
|
56
|
+
* down to `minWidth`.
|
|
57
|
+
*
|
|
58
|
+
* Falls back to `minWidth` when not specified.
|
|
59
|
+
*/
|
|
60
|
+
defaultWidth?: number;
|
|
39
61
|
/**
|
|
40
62
|
* The pinning location of the column
|
|
41
63
|
*/
|
|
@@ -94,11 +116,13 @@ type SelectEditConfigColumnConfig<T, K extends keyof T> = BaseColumnConfig<T, K>
|
|
|
94
116
|
type SelectAsyncEditConfigColumnConfig<T, K extends keyof T> = BaseColumnConfig<T, K> & {
|
|
95
117
|
editConfig: SelectAsyncEditConfig<T>;
|
|
96
118
|
};
|
|
119
|
+
type CellArrayItem = object | string | number | boolean | bigint | symbol | null | undefined;
|
|
120
|
+
type CellArrayValue = readonly CellArrayItem[];
|
|
97
121
|
/**
|
|
98
122
|
* Configuration for multiselect editable columns using editConfig
|
|
99
123
|
* Only valid when T[K] is an array type
|
|
100
124
|
*/
|
|
101
|
-
type MultiselectEditConfigColumnConfig<T, K extends keyof T> = NonNullable<T[K]> extends
|
|
125
|
+
type MultiselectEditConfigColumnConfig<T, K extends keyof T> = NonNullable<T[K]> extends CellArrayValue ? BaseColumnConfig<T, K> & {
|
|
102
126
|
editConfig: MultiselectEditConfig<T, K>;
|
|
103
127
|
} : never;
|
|
104
128
|
/**
|
|
@@ -143,18 +167,18 @@ type ColumnConfig<T, K extends keyof T> = ReadOnlyColumnConfig<T, K> | TextEditC
|
|
|
143
167
|
* const createColumn = createColumnHelper<Data>();
|
|
144
168
|
*
|
|
145
169
|
* // Display-only column with type defaults
|
|
146
|
-
* createColumn("amount", {
|
|
170
|
+
* createColumn("amount", { header: { label: "Amount" }, type: "currency" });
|
|
147
171
|
*
|
|
148
172
|
* // Editable column with editConfig
|
|
149
173
|
* createColumn("name", {
|
|
150
|
-
*
|
|
174
|
+
* header: { label: "Name" },
|
|
151
175
|
* type: "text",
|
|
152
176
|
* editConfig: { mode: "text", onChange: (value, rowId) => save(value, rowId) }
|
|
153
177
|
* });
|
|
154
178
|
*
|
|
155
179
|
* // Number editing
|
|
156
180
|
* createColumn("amount", {
|
|
157
|
-
*
|
|
181
|
+
* header: { label: "Amount" },
|
|
158
182
|
* editConfig: {
|
|
159
183
|
* mode: "number",
|
|
160
184
|
* minValue: 0,
|
|
@@ -166,7 +190,7 @@ type ColumnConfig<T, K extends keyof T> = ReadOnlyColumnConfig<T, K> | TextEditC
|
|
|
166
190
|
*
|
|
167
191
|
* // Select editing
|
|
168
192
|
* createColumn("status", {
|
|
169
|
-
*
|
|
193
|
+
* header: { label: "Status" },
|
|
170
194
|
* editConfig: {
|
|
171
195
|
* mode: "select",
|
|
172
196
|
* options: [{ id: "active", label: "Active" }],
|
|
@@ -176,7 +200,7 @@ type ColumnConfig<T, K extends keyof T> = ReadOnlyColumnConfig<T, K> | TextEditC
|
|
|
176
200
|
*
|
|
177
201
|
* // Multiselect editing with array column
|
|
178
202
|
* createColumn("tags", {
|
|
179
|
-
*
|
|
203
|
+
* header: { label: "Tags" },
|
|
180
204
|
* editConfig: {
|
|
181
205
|
* mode: "multiselect",
|
|
182
206
|
* options: [{ id: "urgent", label: "Urgent" }],
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { ReactNode } from 'react';
|
|
2
|
+
/**
|
|
3
|
+
* Formats an HTML string value for DataTable cells by converting to markdown
|
|
4
|
+
* and rendering through the markdown formatter.
|
|
5
|
+
*
|
|
6
|
+
* Supported HTML: strong, b, em, i, code, mark, ul, ol, li, br, p.
|
|
7
|
+
* Unsupported tags and their content are dropped entirely.
|
|
8
|
+
* HTML entities are decoded to plain text.
|
|
9
|
+
*
|
|
10
|
+
* @param value - The HTML string to format
|
|
11
|
+
* @returns Formatted React nodes, or null for empty/null/undefined values
|
|
12
|
+
*/
|
|
13
|
+
export declare const htmlFormatter: (value?: string | null) => ReactNode;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Converts an HTML string to the markdown subset supported by markdownFormatter.
|
|
3
|
+
*
|
|
4
|
+
* Supported tags: strong, b, em, i, code, mark, ul, ol, li, br, p.
|
|
5
|
+
* Unsupported tags and their content are dropped entirely.
|
|
6
|
+
* HTML entities are decoded to plain text.
|
|
7
|
+
*
|
|
8
|
+
* @param value - The HTML string to convert
|
|
9
|
+
* @returns The equivalent markdown string, or empty string for null/undefined/empty input
|
|
10
|
+
*/
|
|
11
|
+
export declare function htmlToMarkdown(value?: string | null): string;
|
|
@@ -3,6 +3,8 @@ export * from './chipsFormatter';
|
|
|
3
3
|
export * from './currencyFormatter';
|
|
4
4
|
export * from './dateFormatter';
|
|
5
5
|
export * from './dateTimeFormatter';
|
|
6
|
+
export * from './htmlFormatter';
|
|
7
|
+
export * from './markdownFormatter';
|
|
6
8
|
export * from './numberFormatter';
|
|
7
9
|
export * from './percentFormatter';
|
|
8
10
|
export * from './presets';
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { ReactNode } from 'react';
|
|
2
|
+
/**
|
|
3
|
+
* Formats a string value as markdown content for DataTable cells.
|
|
4
|
+
*
|
|
5
|
+
* Supports inline constructs (bold, italic, bold+italic, inline code, highlight)
|
|
6
|
+
* and block-level flat lists (unordered with `- `, ordered with `N. `).
|
|
7
|
+
*
|
|
8
|
+
* @param value - The markdown string to format
|
|
9
|
+
* @returns Formatted React nodes, or null for empty/null/undefined values
|
|
10
|
+
*/
|
|
11
|
+
export declare const markdownFormatter: (value?: string | null) => ReactNode;
|
|
@@ -10,7 +10,7 @@ import { MultiSelectMenuProps } from '../MultiSelectMenu/types';
|
|
|
10
10
|
* Column type literals for display configuration.
|
|
11
11
|
* Each type maps to a default formatter and alignment.
|
|
12
12
|
*/
|
|
13
|
-
export type ColumnType = "text" | "number" | "currency" | "percent" | "date" | "dateTime" | "time" | "boolean";
|
|
13
|
+
export type ColumnType = "text" | "number" | "currency" | "percent" | "date" | "dateTime" | "time" | "boolean" | "markdown" | "html";
|
|
14
14
|
/**
|
|
15
15
|
* Maps column types to their formatter options.
|
|
16
16
|
* Used for type-safe formatter configuration.
|
|
@@ -24,6 +24,8 @@ export type ColumnTypeOptionsMap = {
|
|
|
24
24
|
dateTime: DateTimeFormatterOptions;
|
|
25
25
|
time: TimeFormatterOptions;
|
|
26
26
|
boolean: BooleanFormatterOptions;
|
|
27
|
+
markdown: undefined;
|
|
28
|
+
html: undefined;
|
|
27
29
|
};
|
|
28
30
|
/**
|
|
29
31
|
* Column type configuration.
|
|
@@ -470,18 +472,18 @@ export type TableRow<T> = T & {
|
|
|
470
472
|
*
|
|
471
473
|
* const columns = [
|
|
472
474
|
* // Display-only column with type defaults
|
|
473
|
-
* createColumn("amount", {
|
|
475
|
+
* createColumn("amount", { header: { label: "Amount" }, type: "currency" }),
|
|
474
476
|
*
|
|
475
477
|
* // Editable column with editConfig
|
|
476
478
|
* createColumn("name", {
|
|
477
|
-
*
|
|
479
|
+
* header: { label: "Name" },
|
|
478
480
|
* type: "text",
|
|
479
481
|
* editConfig: { mode: "text", onChange: (value, rowId) => save(value, rowId) }
|
|
480
482
|
* }),
|
|
481
483
|
*
|
|
482
484
|
* // Multiselect editing
|
|
483
485
|
* createColumn("tags", {
|
|
484
|
-
*
|
|
486
|
+
* header: { label: "Tags" },
|
|
485
487
|
* editConfig: {
|
|
486
488
|
* mode: "multiselect",
|
|
487
489
|
* options: [{ value: "urgent", label: "Urgent" }],
|
|
@@ -491,15 +493,46 @@ export type TableRow<T> = T & {
|
|
|
491
493
|
* ];
|
|
492
494
|
* ```
|
|
493
495
|
*/
|
|
494
|
-
export type
|
|
496
|
+
export type ColumnHeader = {
|
|
495
497
|
/**
|
|
496
|
-
* The
|
|
498
|
+
* The visible header label text.
|
|
497
499
|
*/
|
|
498
|
-
|
|
500
|
+
label: string;
|
|
501
|
+
/**
|
|
502
|
+
* Whether the header should show a required indicator.
|
|
503
|
+
*/
|
|
504
|
+
required?: boolean;
|
|
505
|
+
/**
|
|
506
|
+
* Additional contextual content rendered from a keyboard-accessible more-info trigger.
|
|
507
|
+
*/
|
|
508
|
+
moreInfo?: ReactNode;
|
|
509
|
+
};
|
|
510
|
+
export type ColumnHeaderConfig = {
|
|
511
|
+
/**
|
|
512
|
+
* The forward-looking header configuration.
|
|
513
|
+
*/
|
|
514
|
+
header: ColumnHeader;
|
|
499
515
|
/**
|
|
500
|
-
*
|
|
516
|
+
* Legacy header label support during the transition to `header`.
|
|
517
|
+
* @deprecated Use `header.label` instead.
|
|
518
|
+
*/
|
|
519
|
+
headerLabel?: string;
|
|
520
|
+
} | {
|
|
521
|
+
/**
|
|
522
|
+
* The forward-looking header configuration.
|
|
523
|
+
*/
|
|
524
|
+
header?: ColumnHeader;
|
|
525
|
+
/**
|
|
526
|
+
* Legacy header label support during the transition to `header`.
|
|
527
|
+
* @deprecated Use `header.label` instead.
|
|
501
528
|
*/
|
|
502
529
|
headerLabel: string;
|
|
530
|
+
};
|
|
531
|
+
export type ColumnDef<T> = ColumnHeaderConfig & {
|
|
532
|
+
/**
|
|
533
|
+
* The id of the column - must be a key of T
|
|
534
|
+
*/
|
|
535
|
+
id: keyof T;
|
|
503
536
|
/**
|
|
504
537
|
* The alignment of the header and cell content.
|
|
505
538
|
* When using `type`, this is set automatically but can be overridden.
|
|
@@ -538,13 +571,34 @@ export type ColumnDef<T> = {
|
|
|
538
571
|
*/
|
|
539
572
|
footerContent?: ReactNode | ReactNode[];
|
|
540
573
|
/**
|
|
541
|
-
* The maximum width of the column, in pixels
|
|
574
|
+
* The maximum width of the column, in pixels. Caps automatic growth when
|
|
575
|
+
* the table has extra horizontal space available.
|
|
542
576
|
*/
|
|
543
577
|
maxWidth?: number;
|
|
544
578
|
/**
|
|
545
|
-
* The minimum width of the column, in pixels
|
|
579
|
+
* The minimum width of the column, in pixels. Used as the floor for manual
|
|
580
|
+
* resize — users can drag a column down to but not below this value. Also
|
|
581
|
+
* serves as the fallback auto-sizing floor when `defaultWidth` is not set.
|
|
546
582
|
*/
|
|
547
583
|
minWidth?: number;
|
|
584
|
+
/**
|
|
585
|
+
* The preferred starting width of the column, in pixels. Used as the basis
|
|
586
|
+
* for automatic growing/shrinking: the column renders at this width by
|
|
587
|
+
* default, grows toward `maxWidth` when the table has spare horizontal
|
|
588
|
+
* space, and never auto-shrinks below it — the table scrolls horizontally
|
|
589
|
+
* instead.
|
|
590
|
+
*
|
|
591
|
+
* Manual resize via the column's resize handle is still bounded by
|
|
592
|
+
* `minWidth`/`maxWidth`, so users can drag a column below `defaultWidth`
|
|
593
|
+
* down to `minWidth`.
|
|
594
|
+
*
|
|
595
|
+
* Falls back to `minWidth` when not specified.
|
|
596
|
+
*
|
|
597
|
+
* @remarks Provide a value between `minWidth` and `maxWidth` (inclusive).
|
|
598
|
+
* Values outside that envelope are not validated; CSS grid will clamp at
|
|
599
|
+
* render time.
|
|
600
|
+
*/
|
|
601
|
+
defaultWidth?: number;
|
|
548
602
|
/**
|
|
549
603
|
* The pinning location of the column
|
|
550
604
|
*/
|
package/dist/beta.js
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
export { C as COLUMN_TYPE_DEFAULTS, D as DataTable, b as booleanFormatter, a as chipsFormatter, c as createColumnHelper, d as currencyFormatter,
|
|
2
|
-
export { T as Toolbar, a as ToolbarButton, c as ToolbarButtonLink, b as ToolbarButtonToggle, e as ToolbarControlGroup, g as ToolbarElement, f as ToolbarSearchField, d as ToolbarSelect } from './Toolbar-
|
|
3
|
-
export { u as useCalendarBetaProps } from './Calendar-
|
|
4
|
-
export { C as Calendar } from './Calendar-
|
|
5
|
-
export { S as SelectField, a as SelectFieldSync } from './SelectFieldSync-
|
|
6
|
-
export { M as MultiSelectField, a as MultiSelectFieldSync } from './MultiSelectFieldSync-
|
|
7
|
-
export { S as SelectMenu, a as SelectMenuSync } from './SelectMenuSync-
|
|
8
|
-
export { M as MultiSelectMenu, a as MultiSelectMenuSync } from './MultiSelectMenuSync-
|
|
1
|
+
export { C as COLUMN_TYPE_DEFAULTS, D as DataTable, b as booleanFormatter, a as chipsFormatter, c as createColumnHelper, d as currencyFormatter, i as dateFormatPresets, e as dateFormatter, f as dateTimeFormatter, g as getColumnTypeDefaults, h as htmlFormatter, m as markdownFormatter, n as numberFormatter, p as percentFormatter, r as resolveColumnTypeConfig, t as timeFormatPresets, j as timeFormatter, y as yearlessDateFormatter } from './DataTable-JRxu2yTP.js';
|
|
2
|
+
export { T as Toolbar, a as ToolbarButton, c as ToolbarButtonLink, b as ToolbarButtonToggle, e as ToolbarControlGroup, g as ToolbarElement, f as ToolbarSearchField, d as ToolbarSelect } from './Toolbar-ByyI7SqG.js';
|
|
3
|
+
export { u as useCalendarBetaProps } from './Calendar-Dxl9QnfP.js';
|
|
4
|
+
export { C as Calendar } from './Calendar-Cka4unyi.js';
|
|
5
|
+
export { S as SelectField, a as SelectFieldSync } from './SelectFieldSync-o1Cp9UYC.js';
|
|
6
|
+
export { M as MultiSelectField, a as MultiSelectFieldSync } from './MultiSelectFieldSync-ChZCW4M9.js';
|
|
7
|
+
export { S as SelectMenu, a as SelectMenuSync } from './SelectMenuSync-DXrwecFt.js';
|
|
8
|
+
export { M as MultiSelectMenu, a as MultiSelectMenuSync } from './MultiSelectMenuSync-7C1wW4oO.js';
|
|
9
9
|
export { I as InteractiveCard } from './InteractiveCard-GTYbR6Xy.js';
|
|
10
|
-
export { u as useAdaptiveView } from './syncFilterUtils-
|
|
10
|
+
export { u as useAdaptiveView } from './syncFilterUtils-UR5Vgqkh.js';
|
|
11
11
|
//# sourceMappingURL=beta.js.map
|
|
@@ -8,5 +8,9 @@ export type DrillDownContextProps = {
|
|
|
8
8
|
setRegisteredIndices?: Dispatch<SetStateAction<number[] | undefined>>;
|
|
9
9
|
onClose?: (() => void)[];
|
|
10
10
|
setOnClose?: (fn: () => void, index: number) => void;
|
|
11
|
+
hostIsInteractive?: boolean;
|
|
12
|
+
setHostTrigger?: (element: HTMLElement | null) => void;
|
|
13
|
+
onHostClose?: () => void;
|
|
14
|
+
onHostClosed?: () => void;
|
|
11
15
|
};
|
|
12
16
|
export declare const DrillDownContext: import('react').Context<DrillDownContextProps | null>;
|
|
@@ -10,5 +10,9 @@ export declare function useDrillDownContextState({ defaultDrillDownIndex, }: use
|
|
|
10
10
|
setRegisteredIndices: import('react').Dispatch<import('react').SetStateAction<number[] | undefined>>;
|
|
11
11
|
onClose: (() => void)[];
|
|
12
12
|
setOnClose: (fn: () => void, index: number) => void;
|
|
13
|
+
hostIsInteractive: boolean;
|
|
14
|
+
setHostTrigger: (element: HTMLElement | null) => void;
|
|
15
|
+
onHostClose: () => void;
|
|
16
|
+
onHostClosed: () => void;
|
|
13
17
|
};
|
|
14
18
|
export {};
|