@servicetitan/anvil2 3.15.0 → 3.15.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 +12 -0
- package/dist/{AiMark-D57s1e0T.js → AiMark-BfmK30vL.js} +3 -3
- package/dist/{AiMark-D57s1e0T.js.map → AiMark-BfmK30vL.js.map} +1 -1
- package/dist/AiMark.js +1 -1
- package/dist/{Alert-DExHiAbM.js → Alert-lLo1N7Tj.js} +3 -3
- package/dist/{Alert-DExHiAbM.js.map → Alert-lLo1N7Tj.js.map} +1 -1
- package/dist/Alert.js +1 -1
- package/dist/{Announcement-CGTv6M31.js → Announcement-Cnz80WGx.js} +2 -2
- package/dist/{Announcement-CGTv6M31.js.map → Announcement-Cnz80WGx.js.map} +1 -1
- package/dist/Announcement.js +1 -1
- package/dist/{Breadcrumbs-DtLSS0PJ.js → Breadcrumbs-RdL4Fvmu.js} +2 -2
- package/dist/{Breadcrumbs-DtLSS0PJ.js.map → Breadcrumbs-RdL4Fvmu.js.map} +1 -1
- package/dist/Breadcrumbs.js +1 -1
- package/dist/{Button-Dwh_Nd4l.js → Button-Dn6-01xl.js} +230 -67
- package/dist/Button-Dn6-01xl.js.map +1 -0
- package/dist/Button.js +1 -1
- package/dist/{ButtonToggle-DKDBD1g3.js → ButtonToggle-BSU8GBxr.js} +2 -2
- package/dist/{ButtonToggle-DKDBD1g3.js.map → ButtonToggle-BSU8GBxr.js.map} +1 -1
- package/dist/ButtonToggle.js +1 -1
- package/dist/{Calendar-BUFPc5UN.js → Calendar-DoLRAWLp.js} +2 -2
- package/dist/Calendar-DoLRAWLp.js.map +1 -0
- package/dist/{Calendar-CEf7ke8X.js → Calendar-IzXG1aJw.js} +3 -3
- package/dist/Calendar-IzXG1aJw.js.map +1 -0
- package/dist/Calendar.js +2 -2
- package/dist/{Checkbox-DVy-QESI.js → Checkbox-CVxbe-iN.js} +3 -3
- package/dist/{Checkbox-DVy-QESI.js.map → Checkbox-CVxbe-iN.js.map} +1 -1
- package/dist/{Checkbox-DBE35nMv.js → Checkbox-U-kuWhgc.js} +2 -2
- package/dist/{Checkbox-DBE35nMv.js.map → Checkbox-U-kuWhgc.js.map} +1 -1
- package/dist/Checkbox.js +1 -1
- package/dist/{Chip-B4G4zaP-.js → Chip-2OydLs66.js} +2 -2
- package/dist/{Chip-B4G4zaP-.js.map → Chip-2OydLs66.js.map} +1 -1
- package/dist/Chip.js +1 -1
- package/dist/Combobox.js +1 -1
- package/dist/{DataTable-DbuXfDNJ.js → DataTable-DkEpJ_Op.js} +16 -41
- package/dist/DataTable-DkEpJ_Op.js.map +1 -0
- package/dist/{DateFieldRange-nyj8mtUP.js → DateFieldRange-X2jdOTYY.js} +4 -4
- package/dist/{DateFieldRange-nyj8mtUP.js.map → DateFieldRange-X2jdOTYY.js.map} +1 -1
- package/dist/DateFieldRange.js +1 -1
- package/dist/{DateFieldSingle-BmCghXba.js → DateFieldSingle-BJ16tpOz.js} +4 -4
- package/dist/{DateFieldSingle-BmCghXba.js.map → DateFieldSingle-BJ16tpOz.js.map} +1 -1
- package/dist/DateFieldSingle.js +1 -1
- package/dist/{DateFieldYearless-Df7fA85i.js → DateFieldYearless-CMm8vtz_.js} +4 -4
- package/dist/{DateFieldYearless-Df7fA85i.js.map → DateFieldYearless-CMm8vtz_.js.map} +1 -1
- package/dist/DateFieldYearless.js +1 -1
- package/dist/{DateFieldYearlessRange-DYpY4K1c.js → DateFieldYearlessRange-BHHs-Z1Q.js} +3 -3
- package/dist/{DateFieldYearlessRange-DYpY4K1c.js.map → DateFieldYearlessRange-BHHs-Z1Q.js.map} +1 -1
- package/dist/DateFieldYearlessRange.js +1 -1
- package/dist/{DaysOfTheWeek-CyWGRqFG.js → DaysOfTheWeek-BHXxs0Bo.js} +3 -3
- package/dist/{DaysOfTheWeek-CyWGRqFG.js.map → DaysOfTheWeek-BHXxs0Bo.js.map} +1 -1
- package/dist/DaysOfTheWeek.js +1 -1
- package/dist/{Details-oM-nR4ju.js → Details-BxqP-5vp.js} +11 -9
- package/dist/Details-BxqP-5vp.js.map +1 -0
- package/dist/Details.css +18 -14
- package/dist/Details.js +1 -1
- package/dist/{Dialog-vSiZAR1y.js → Dialog-B9llUKJz.js} +5 -5
- package/dist/{Dialog-vSiZAR1y.js.map → Dialog-B9llUKJz.js.map} +1 -1
- package/dist/Dialog.js +1 -1
- package/dist/{DialogCancelButton-DBL0aKTK.js → DialogCancelButton-C0r8hJ8Z.js} +2 -2
- package/dist/{DialogCancelButton-DBL0aKTK.js.map → DialogCancelButton-C0r8hJ8Z.js.map} +1 -1
- package/dist/{Drawer-B4pxj_2P.js → Drawer-Bjd2XLUX.js} +6 -6
- package/dist/{Drawer-B4pxj_2P.js.map → Drawer-Bjd2XLUX.js.map} +1 -1
- package/dist/Drawer.js +1 -1
- package/dist/DrillDown.js +1 -1
- package/dist/{EditCard-CX1G7G2Q.js → EditCard-B6l2vhBS.js} +3 -3
- package/dist/{EditCard-CX1G7G2Q.js.map → EditCard-B6l2vhBS.js.map} +1 -1
- package/dist/EditCard.js +1 -1
- package/dist/{FieldLabel-CAusaqUY.js → FieldLabel-ThEmUiAq.js} +2 -2
- package/dist/{FieldLabel-CAusaqUY.js.map → FieldLabel-ThEmUiAq.js.map} +1 -1
- package/dist/FieldLabel.js +1 -1
- package/dist/{FilterBar-CKYf-1oU.js → FilterBar-ecqJDraA.js} +7 -7
- package/dist/FilterBar-ecqJDraA.js.map +1 -0
- package/dist/FilterBar.js +1 -1
- package/dist/{InputMask-xMpquXPU.js → InputMask-BQigi5oW.js} +3 -3
- package/dist/{InputMask-xMpquXPU.js.map → InputMask-BQigi5oW.js.map} +1 -1
- package/dist/InputMask.js +1 -1
- package/dist/{InteractiveCard-C0g5PxB6.js → InteractiveCard-C2CYRtgQ.js} +3 -3
- package/dist/InteractiveCard-C2CYRtgQ.js.map +1 -0
- package/dist/InteractiveCard.js +1 -1
- package/dist/{ListView-D6l1KY92.js → ListView-YJscfG4x.js} +2 -2
- package/dist/{ListView-D6l1KY92.js.map → ListView-YJscfG4x.js.map} +1 -1
- package/dist/ListView.js +1 -1
- package/dist/{Listbox-Dep1eJ3u.js → Listbox-CD9ZptSZ.js} +2 -2
- package/dist/{Listbox-Dep1eJ3u.js.map → Listbox-CD9ZptSZ.js.map} +1 -1
- package/dist/Listbox.js +1 -1
- package/dist/{Menu-eLxQwmZk.js → Menu-Da2OEN0o.js} +2 -2
- package/dist/{Menu-eLxQwmZk.js.map → Menu-Da2OEN0o.js.map} +1 -1
- package/dist/Menu.js +1 -1
- package/dist/{MenuFooter-fGSZYh8e.js → MenuFooter-D__gg92C.js} +2 -2
- package/dist/{MenuFooter-fGSZYh8e.js.map → MenuFooter-D__gg92C.js.map} +1 -1
- package/dist/MultiSelectField.js +1 -1
- package/dist/{MultiSelectFieldSync-ZNoNOm6d.js → MultiSelectFieldSync-DpPO0cya.js} +7 -7
- package/dist/{MultiSelectFieldSync-ZNoNOm6d.js.map → MultiSelectFieldSync-DpPO0cya.js.map} +1 -1
- package/dist/MultiSelectMenu.js +1 -1
- package/dist/{MultiSelectMenuSync-DrgqaUJj.js → MultiSelectMenuSync-BN_3moW_.js} +5 -5
- package/dist/{MultiSelectMenuSync-DrgqaUJj.js.map → MultiSelectMenuSync-BN_3moW_.js.map} +1 -1
- package/dist/{NumberField-D5ZzEHg1.js → NumberField-CxmJx4gs.js} +4 -4
- package/dist/{NumberField-D5ZzEHg1.js.map → NumberField-CxmJx4gs.js.map} +1 -1
- package/dist/NumberField.js +1 -1
- package/dist/{Page-B2HZzNGP.js → Page-IZ4p51iJ.js} +19 -188
- package/dist/Page-IZ4p51iJ.js.map +1 -0
- package/dist/Page.js +1 -1
- package/dist/{Pagination-CAgXtt9t.js → Pagination-Su4VBAhT.js} +5 -5
- package/dist/{Pagination-CAgXtt9t.js.map → Pagination-Su4VBAhT.js.map} +1 -1
- package/dist/Pagination.js +1 -1
- package/dist/{Popover-CjL2ixjB.js → Popover-CIh1CsoJ.js} +3 -3
- package/dist/{Popover-CjL2ixjB.js.map → Popover-CIh1CsoJ.js.map} +1 -1
- package/dist/Popover.js +1 -1
- package/dist/{ProgressBar-ClKcOcXq.js → ProgressBar-TQ0fPmn9.js} +2 -2
- package/dist/{ProgressBar-ClKcOcXq.js.map → ProgressBar-TQ0fPmn9.js.map} +1 -1
- package/dist/ProgressBar.js +1 -1
- package/dist/{Radio-_ftIQSru.js → Radio-BYowelK2.js} +3 -3
- package/dist/{Radio-_ftIQSru.js.map → Radio-BYowelK2.js.map} +1 -1
- package/dist/{Radio-C2BJqWlV.js → Radio-C1VnatcL.js} +2 -2
- package/dist/{Radio-C2BJqWlV.js.map → Radio-C1VnatcL.js.map} +1 -1
- package/dist/Radio.js +1 -1
- package/dist/{RichTextEditor-TcZUnqcp.js → RichTextEditor-BpzUo8dB.js} +12 -17
- package/dist/RichTextEditor-BpzUo8dB.js.map +1 -0
- package/dist/RichTextEditor.js +1 -1
- package/dist/{SavedFiltersButton-B8lf3L2T.js → SavedFiltersButton-D9GJbJQu.js} +10 -24
- package/dist/SavedFiltersButton-D9GJbJQu.js.map +1 -0
- package/dist/SavedFiltersButton.js +1 -1
- package/dist/{SegmentedControl-CtKoYHoO.js → SegmentedControl-BHVJmmTH.js} +3 -3
- package/dist/{SegmentedControl-CtKoYHoO.js.map → SegmentedControl-BHVJmmTH.js.map} +1 -1
- package/dist/SegmentedControl.js +1 -1
- package/dist/{SelectCard-BwIbfore.js → SelectCard-DrmMU_GD.js} +3 -3
- package/dist/{SelectCard-BwIbfore.js.map → SelectCard-DrmMU_GD.js.map} +1 -1
- package/dist/SelectCard.js +1 -1
- package/dist/SelectField.js +1 -1
- package/dist/{SelectFieldLabel-7VTZ83QJ.js → SelectFieldLabel-BxsKvfqo.js} +2 -2
- package/dist/{SelectFieldLabel-7VTZ83QJ.js.map → SelectFieldLabel-BxsKvfqo.js.map} +1 -1
- package/dist/{SelectFieldSync-CB75kkka.js → SelectFieldSync-BN2ebLWT.js} +6 -6
- package/dist/{SelectFieldSync-CB75kkka.js.map → SelectFieldSync-BN2ebLWT.js.map} +1 -1
- package/dist/SelectMenu.js +1 -1
- package/dist/{SelectMenuSync-DIMfovCI.js → SelectMenuSync-DuPf8KCc.js} +5 -5
- package/dist/{SelectMenuSync-DIMfovCI.js.map → SelectMenuSync-DuPf8KCc.js.map} +1 -1
- package/dist/{SelectOptions-si_rVLEZ.js → SelectOptions-BK7kNjYM.js} +2 -2
- package/dist/{SelectOptions-si_rVLEZ.js.map → SelectOptions-BK7kNjYM.js.map} +1 -1
- package/dist/{SelectTrigger-C3-Cne3D.js → SelectTrigger-B5h-aqhl.js} +2 -2
- package/dist/{SelectTrigger-C3-Cne3D.js.map → SelectTrigger-B5h-aqhl.js.map} +1 -1
- package/dist/SelectTrigger.js +1 -1
- package/dist/{SelectTriggerBase-BnsTYWVb.js → SelectTriggerBase-SML2Mlt-.js} +4 -4
- package/dist/{SelectTriggerBase-BnsTYWVb.js.map → SelectTriggerBase-SML2Mlt-.js.map} +1 -1
- package/dist/{Stepper-C-QC9QHx.js → Stepper-l_P6VPOv.js} +3 -3
- package/dist/{Stepper-C-QC9QHx.js.map → Stepper-l_P6VPOv.js.map} +1 -1
- package/dist/Stepper.js +1 -1
- package/dist/{Switch-DWq4QI8M.js → Switch-1iNdXTik.js} +2 -2
- package/dist/{Switch-DWq4QI8M.js.map → Switch-1iNdXTik.js.map} +1 -1
- package/dist/Switch.js +1 -1
- package/dist/{Tab-mXEQ0ifM.js → Tab-DR5YYXkq.js} +124 -19
- package/dist/Tab-DR5YYXkq.js.map +1 -0
- package/dist/Tab.js +1 -1
- package/dist/Table.js +1 -1
- package/dist/{Text-dONmlARH.js → Text-rihxXHSe.js} +2 -2
- package/dist/{Text-dONmlARH.js.map → Text-rihxXHSe.js.map} +1 -1
- package/dist/Text.js +1 -1
- package/dist/{TextField-CtXjbtqa.js → TextField-Bxd-Qzoi.js} +2 -2
- package/dist/{TextField-CtXjbtqa.js.map → TextField-Bxd-Qzoi.js.map} +1 -1
- package/dist/{TextField-CQ7e3mC4.js → TextField-vuS7xeo-.js} +3 -3
- package/dist/{TextField-CQ7e3mC4.js.map → TextField-vuS7xeo-.js.map} +1 -1
- package/dist/TextField.js +1 -1
- package/dist/{Textarea-DGVHQktZ.js → Textarea-ppapJUwh.js} +3 -3
- package/dist/{Textarea-DGVHQktZ.js.map → Textarea-ppapJUwh.js.map} +1 -1
- package/dist/Textarea.js +1 -1
- package/dist/{TimeField-AttXPsQw.js → TimeField-Hwt_oRbg.js} +4 -4
- package/dist/{TimeField-AttXPsQw.js.map → TimeField-Hwt_oRbg.js.map} +1 -1
- package/dist/TimeField.js +1 -1
- package/dist/Toast.js +2 -2
- package/dist/{Toaster-CNtAl-tF.js → Toaster-BryQmKe1.js} +4 -4
- package/dist/{Toaster-CNtAl-tF.js.map → Toaster-BryQmKe1.js.map} +1 -1
- package/dist/{Toaster-DYO8NLTo.js → Toaster-BtP_HezK.js} +2 -2
- package/dist/{Toaster-DYO8NLTo.js.map → Toaster-BtP_HezK.js.map} +1 -1
- package/dist/{Toolbar-BIbbaCxh.js → Toolbar-CMulzswf.js} +5 -5
- package/dist/{Toolbar-BIbbaCxh.js.map → Toolbar-CMulzswf.js.map} +1 -1
- package/dist/{Toolbar-B_lHD0c2.js → Toolbar-DGHZpFi9.js} +11 -105
- package/dist/Toolbar-DGHZpFi9.js.map +1 -0
- package/dist/Toolbar.js +2 -2
- package/dist/{ToolbarButtonToggle-BMBmBdw1.js → ToolbarButtonToggle-T8YnSJ5x.js} +2 -3
- package/dist/ToolbarButtonToggle-T8YnSJ5x.js.map +1 -0
- package/dist/TreeSelectField.js +1 -1
- package/dist/{TreeSelectFieldSync-CKnFwROC.js → TreeSelectFieldSync-C0mXwYZL.js} +7 -7
- package/dist/TreeSelectFieldSync-C0mXwYZL.js.map +1 -0
- package/dist/TreeSelectMenu.js +1 -1
- package/dist/{TreeSelectMenuSync-CK-x2_ne.js → TreeSelectMenuSync-D2TvKxP-.js} +4 -4
- package/dist/TreeSelectMenuSync-D2TvKxP-.js.map +1 -0
- package/dist/{TypeaheadTextField-DqnUGXj0.js → TypeaheadTextField-DgazozK7.js} +10 -19
- package/dist/TypeaheadTextField-DgazozK7.js.map +1 -0
- package/dist/TypeaheadTextField.js +1 -1
- package/dist/{YearlessDateInputWithPicker-aI4UIyMD.js → YearlessDateInputWithPicker-Bc8a33D5.js} +2 -2
- package/dist/{YearlessDateInputWithPicker-aI4UIyMD.js.map → YearlessDateInputWithPicker-Bc8a33D5.js.map} +1 -1
- package/dist/beta.js +18 -18
- package/dist/{bulkActionTypes-sbwWLsDi.js → bulkActionTypes-D5y3Acn1.js} +2 -2
- package/dist/{bulkActionTypes-sbwWLsDi.js.map → bulkActionTypes-D5y3Acn1.js.map} +1 -1
- package/dist/{filter-state-DW8YmRHb.js → filter-state-Do862BNr.js} +55 -37
- package/dist/filter-state-Do862BNr.js.map +1 -0
- package/dist/{index-Cw2HFh0a.js → index-Dt0zG4YB.js} +2 -2
- package/dist/{index-Cw2HFh0a.js.map → index-Dt0zG4YB.js.map} +1 -1
- package/dist/index.js +49 -49
- package/dist/{proxy-DEehATlA.js → react-ORV84FjM.js} +6862 -5814
- package/dist/react-ORV84FjM.js.map +1 -0
- package/dist/src/beta/components/Calendar/Calendar.d.ts +8 -17
- package/dist/src/beta/components/Calendar/CalendarBetaPropsContext.d.ts +1 -0
- package/dist/src/beta/components/Calendar/useCalendarBetaProps.d.ts +1 -0
- package/dist/src/beta/components/FilterBar/FilterBar.d.ts +12 -53
- package/dist/src/beta/components/FilterBar/FilterDateList.d.ts +8 -0
- package/dist/src/beta/components/FilterBar/FilterDateRange.d.ts +15 -9
- package/dist/src/beta/components/FilterBar/FilterDateSingle.d.ts +15 -9
- package/dist/src/beta/components/FilterBar/FilterDrawer.d.ts +1 -14
- package/dist/src/beta/components/FilterBar/FilterItemWrapper.d.ts +0 -7
- package/dist/src/beta/components/FilterBar/FilterNumericRange.d.ts +4 -13
- package/dist/src/beta/components/FilterBar/FilterPopoverButton.d.ts +6 -8
- package/dist/src/beta/components/FilterBar/FilterSearchField.d.ts +3 -6
- package/dist/src/beta/components/FilterBar/FilterTextInput.d.ts +4 -13
- package/dist/src/beta/components/FilterBar/FilterToggleButton.d.ts +3 -14
- package/dist/src/beta/components/FilterBar/FilterTriggerButton.d.ts +3 -3
- package/dist/src/beta/components/FilterBar/internal/FilterGroupContext.d.ts +6 -20
- package/dist/src/beta/components/FilterBar/internal/adapters/index.d.ts +3 -8
- package/dist/src/beta/components/FilterBar/internal/adapters/types.d.ts +7 -19
- package/dist/src/beta/components/FilterBar/internal/types.d.ts +48 -57
- package/dist/src/beta/components/FilterBar/internal/utils/dateConstraints.d.ts +3 -3
- package/dist/src/beta/components/FilterBar/internal/utils/dateListLibraryOptions.d.ts +4 -7
- package/dist/src/beta/components/FilterBar/internal/utils/filter-state.d.ts +3 -24
- package/dist/src/beta/components/InteractiveCard/InteractiveCard.d.ts +2 -47
- package/dist/src/beta/components/InteractiveCard/types.d.ts +13 -71
- package/dist/src/beta/components/Page/Page.d.ts +8 -166
- package/dist/src/beta/components/Page/PageContent.d.ts +3 -17
- package/dist/src/beta/components/Page/PageContext.d.ts +9 -0
- package/dist/src/beta/components/Page/PageFooter.d.ts +2 -15
- package/dist/src/beta/components/Page/PageHeader.d.ts +38 -91
- package/dist/src/beta/components/Page/PagePanel.d.ts +17 -115
- package/dist/src/beta/components/Page/PagePanelContent.d.ts +5 -37
- package/dist/src/beta/components/Page/PagePanelFooter.d.ts +4 -27
- package/dist/src/beta/components/Page/PagePanelHeader.d.ts +3 -16
- package/dist/src/beta/components/Page/PageSidebar.d.ts +8 -41
- package/dist/src/beta/components/Page/PageSidebarHeader.d.ts +2 -20
- package/dist/src/beta/components/Page/internal/PagePanelContext.d.ts +1 -6
- package/dist/src/beta/components/Page/pageBreakpoint.d.ts +5 -18
- package/dist/src/beta/components/RichTextEditor/RichTextEditor.d.ts +2 -25
- package/dist/src/beta/components/RichTextEditor/internal/LinkPopover.d.ts +1 -0
- package/dist/src/beta/components/RichTextEditor/internal/MentionList.d.ts +1 -0
- package/dist/src/beta/components/RichTextEditor/internal/MentionPopover.d.ts +1 -0
- package/dist/src/beta/components/RichTextEditor/internal/RichTextEditorToolbar.d.ts +1 -0
- package/dist/src/beta/components/RichTextEditor/internal/YouTubeEmbedPrompt.d.ts +1 -0
- package/dist/src/beta/components/RichTextEditor/internal/YouTubePopover.d.ts +1 -0
- package/dist/src/beta/components/RichTextEditor/internal/extensions/ImageUploadExtension.d.ts +1 -0
- package/dist/src/beta/components/RichTextEditor/internal/extensions/LinkKeyboardShortcutExtension.d.ts +1 -0
- package/dist/src/beta/components/RichTextEditor/internal/extensions/MentionExtension.d.ts +5 -0
- package/dist/src/beta/components/RichTextEditor/internal/extensions/SafeImageExtension.d.ts +3 -10
- package/dist/src/beta/components/RichTextEditor/internal/extensions/YoutubeExtension.d.ts +4 -0
- package/dist/src/beta/components/RichTextEditor/internal/useRichTextEditor.d.ts +3 -17
- package/dist/src/beta/components/RichTextEditor/types.d.ts +46 -71
- package/dist/src/beta/components/SavedFiltersButton/SavedFiltersButton.d.ts +2 -33
- package/dist/src/beta/components/SavedFiltersButton/internal/AddSavedFilterDrawer.d.ts +2 -12
- package/dist/src/beta/components/SavedFiltersButton/internal/EditSavedFiltersDrawer.d.ts +2 -20
- package/dist/src/beta/components/SavedFiltersButton/parts.d.ts +0 -23
- package/dist/src/beta/components/SavedFiltersButton/types.d.ts +36 -85
- package/dist/src/beta/components/Table/DataTable/DataTable.d.ts +34 -84
- package/dist/src/beta/components/Table/DataTable/internal/DataTableBody.d.ts +15 -22
- package/dist/src/beta/components/Table/DataTable/internal/DataTableBodyRow.d.ts +47 -18
- package/dist/src/beta/components/Table/DataTable/internal/DataTableCellAffordance.d.ts +8 -0
- package/dist/src/beta/components/Table/DataTable/internal/DataTableFooter.d.ts +17 -23
- package/dist/src/beta/components/Table/DataTable/internal/DataTableHeader.d.ts +6 -9
- package/dist/src/beta/components/Table/DataTable/internal/DataTablePagination.d.ts +16 -0
- package/dist/src/beta/components/Table/DataTable/internal/cells/CellFocusContext.d.ts +2 -11
- package/dist/src/beta/components/Table/DataTable/internal/cells/CellStatus.d.ts +7 -5
- package/dist/src/beta/components/Table/DataTable/internal/cells/DataTableBodyCell.d.ts +4 -8
- package/dist/src/beta/components/Table/DataTable/internal/cells/DataTableBodyImmutableCell.d.ts +4 -17
- package/dist/src/beta/components/Table/DataTable/internal/cells/DataTableBodyMutableCell.d.ts +4 -18
- package/dist/src/beta/components/Table/DataTable/internal/cells/DataTableFooterCell.d.ts +3 -10
- package/dist/src/beta/components/Table/DataTable/internal/cells/DataTableHeaderCell.d.ts +3 -15
- package/dist/src/beta/components/Table/DataTable/internal/cells/DataTableOverflowCell.d.ts +4 -0
- package/dist/src/beta/components/Table/DataTable/internal/cells/useCellFocusListener.d.ts +2 -6
- package/dist/src/beta/components/Table/DataTable/internal/constants.d.ts +13 -30
- package/dist/src/beta/components/Table/DataTable/internal/context/focus/DTFocusContext.d.ts +1 -6
- package/dist/src/beta/components/Table/DataTable/internal/context/focus/DTFocusProvider.d.ts +3 -0
- package/dist/src/beta/components/Table/DataTable/internal/context/focus/useDTFocusDispatchContext.d.ts +1 -0
- package/dist/src/beta/components/Table/DataTable/internal/context/focus/useDTFocusStateContext.d.ts +1 -0
- package/dist/src/beta/components/Table/DataTable/internal/context/rowClick/DataTableRowClickContext.d.ts +2 -5
- package/dist/src/beta/components/Table/DataTable/internal/context/rowClick/DataTableRowClickProvider.d.ts +2 -5
- package/dist/src/beta/components/Table/DataTable/internal/context/rowClick/useDataTableRowClick.d.ts +1 -0
- package/dist/src/beta/components/Table/DataTable/internal/context/surface/DataTableSurfaceCoordinatorContext.d.ts +4 -0
- package/dist/src/beta/components/Table/DataTable/internal/context/surface/DataTableSurfaceCoordinatorProvider.d.ts +1 -0
- package/dist/src/beta/components/Table/DataTable/internal/context/surface/useDataTableSurfaceCoordinator.d.ts +1 -0
- package/dist/src/beta/components/Table/DataTable/internal/dataTableCellAffordanceHostClassName.d.ts +1 -0
- package/dist/src/beta/components/Table/DataTable/internal/editable-cells/DataTableEditableBooleanCell.d.ts +6 -0
- package/dist/src/beta/components/Table/DataTable/internal/editable-cells/DataTableEditableCellEditIcon.d.ts +1 -4
- package/dist/src/beta/components/Table/DataTable/internal/editable-cells/DataTableEditableCustomCell.d.ts +4 -0
- package/dist/src/beta/components/Table/DataTable/internal/editable-cells/DataTableEditableMultiselectAsyncCell.d.ts +5 -25
- package/dist/src/beta/components/Table/DataTable/internal/editable-cells/DataTableEditableMultiselectCell.d.ts +3 -13
- package/dist/src/beta/components/Table/DataTable/internal/editable-cells/DataTableEditableNumberCell.d.ts +4 -0
- package/dist/src/beta/components/Table/DataTable/internal/editable-cells/DataTableEditableSelectAsyncCell.d.ts +5 -0
- package/dist/src/beta/components/Table/DataTable/internal/editable-cells/DataTableEditableSelectCell.d.ts +4 -0
- package/dist/src/beta/components/Table/DataTable/internal/editable-cells/DataTableEditableTextCell.d.ts +4 -0
- package/dist/src/beta/components/Table/DataTable/internal/editable-cells/types.d.ts +7 -20
- package/dist/src/beta/components/Table/DataTable/internal/editable-cells/useCustomEditHelpers.d.ts +13 -26
- package/dist/src/beta/components/Table/DataTable/internal/editable-cells/useEditableMenuCell.d.ts +2 -10
- package/dist/src/beta/components/Table/DataTable/internal/useAsyncData.d.ts +8 -0
- package/dist/src/beta/components/Table/DataTable/internal/useColumnOrder.d.ts +2 -2
- package/dist/src/beta/components/Table/DataTable/internal/useDataTableVirtualizer.d.ts +7 -18
- package/dist/src/beta/components/Table/DataTable/internal/usePageDataCache.d.ts +6 -10
- package/dist/src/beta/components/Table/DataTable/internal/util/cellPositionHelpers.d.ts +0 -3
- package/dist/src/beta/components/Table/DataTable/internal/util/cellTypeHelpers.d.ts +7 -24
- package/dist/src/beta/components/Table/DataTable/internal/util/getCellInteractives.d.ts +4 -17
- package/dist/src/beta/components/Table/DataTable/internal/util/getTanStackColumnDef.d.ts +5 -29
- package/dist/src/beta/components/Table/DataTable/internal/util/shallowSortingEqual.d.ts +1 -0
- package/dist/src/beta/components/Table/DataTable/parts.d.ts +3 -17
- package/dist/src/beta/components/Table/DataTable/types.d.ts +41 -64
- package/dist/src/beta/components/Table/base/TableBase.d.ts +8 -26
- package/dist/src/beta/components/Table/base/TableBody.d.ts +5 -14
- package/dist/src/beta/components/Table/base/TableContainer.d.ts +1 -11
- package/dist/src/beta/components/Table/base/TableFooter.d.ts +5 -14
- package/dist/src/beta/components/Table/base/TableHeader.d.ts +5 -14
- package/dist/src/beta/components/Table/base/cells/TableBodyCell.d.ts +4 -13
- package/dist/src/beta/components/Table/base/cells/TableEmptyCellContent.d.ts +1 -1
- package/dist/src/beta/components/Table/base/cells/TableFooterCell.d.ts +5 -13
- package/dist/src/beta/components/Table/base/cells/TableHeaderCell.d.ts +8 -25
- package/dist/src/beta/components/Table/base/cells/types.d.ts +2 -6
- package/dist/src/beta/components/Table/columnTypeDefaults.d.ts +7 -36
- package/dist/src/beta/components/Table/createColumnHelper.d.ts +38 -153
- package/dist/src/beta/components/Table/formatters/booleanFormatter.d.ts +4 -15
- package/dist/src/beta/components/Table/formatters/chipsFormatter.d.ts +7 -9
- package/dist/src/beta/components/Table/formatters/currencyFormatter.d.ts +3 -15
- package/dist/src/beta/components/Table/formatters/dateFormatter.d.ts +10 -23
- package/dist/src/beta/components/Table/formatters/dateTimeFormatter.d.ts +23 -46
- package/dist/src/beta/components/Table/formatters/htmlFormatter.d.ts +2 -11
- package/dist/src/beta/components/Table/formatters/htmlToMarkdown.d.ts +5 -10
- package/dist/src/beta/components/Table/formatters/markdownFormatter.d.ts +3 -8
- package/dist/src/beta/components/Table/formatters/numberFormatter.d.ts +8 -27
- package/dist/src/beta/components/Table/formatters/percentFormatter.d.ts +4 -15
- package/dist/src/beta/components/Table/formatters/presets.d.ts +4 -12
- package/dist/src/beta/components/Table/formatters/timeFormatter.d.ts +7 -17
- package/dist/src/beta/components/Table/formatters/yearlessDateFormatter.d.ts +9 -21
- package/dist/src/beta/components/Table/internal/ResizeHandle.d.ts +5 -9
- package/dist/src/beta/components/Table/internal/TruncateChips.d.ts +2 -11
- package/dist/src/beta/components/Table/internal/getCommonPinningClasses.d.ts +2 -1
- package/dist/src/beta/components/Table/internal/getCommonPinningStyles.d.ts +6 -2
- package/dist/src/beta/components/Table/internal/scrollCellIntoView.d.ts +3 -7
- package/dist/src/beta/components/Table/internal/types.d.ts +2 -7
- package/dist/src/beta/components/Table/types.d.ts +183 -462
- package/dist/src/beta/components/Toolbar/Toolbar.d.ts +35 -267
- package/dist/src/beta/components/Toolbar/ToolbarButton.d.ts +5 -26
- package/dist/src/beta/components/Toolbar/ToolbarButtonLink.d.ts +5 -28
- package/dist/src/beta/components/Toolbar/ToolbarButtonToggle.d.ts +5 -27
- package/dist/src/beta/components/Toolbar/ToolbarControlGroup.d.ts +6 -8
- package/dist/src/beta/components/Toolbar/ToolbarSearchField.d.ts +3 -14
- package/dist/src/beta/components/Toolbar/ToolbarSelect.d.ts +13 -65
- package/dist/src/beta/components/Toolbar/internal/ToolbarContext.d.ts +0 -32
- package/dist/src/beta/components/Toolbar/internal/ToolbarItemOverflowContext.d.ts +0 -13
- package/dist/src/beta/components/Toolbar/internal/ToolbarItemWrapper.d.ts +2 -28
- package/dist/src/beta/components/Toolbar/internal/ToolbarOverflowMenu.d.ts +4 -21
- package/dist/src/beta/components/Toolbar/internal/utils/accessibility.d.ts +7 -15
- package/dist/src/beta/components/Toolbar/types.d.ts +7 -26
- package/dist/src/beta/components/TreeSelectField/TreeSelectField.d.ts +2 -23
- package/dist/src/beta/components/TreeSelectField/TreeSelectFieldSync.d.ts +10 -46
- package/dist/src/beta/components/TreeSelectField/internal/TreeContent.d.ts +5 -21
- package/dist/src/beta/components/TreeSelectField/internal/TreePanel.d.ts +1 -38
- package/dist/src/beta/components/TreeSelectField/internal/TreeRow.d.ts +6 -38
- package/dist/src/beta/components/TreeSelectField/internal/TreeSelectFieldInput.d.ts +2 -50
- package/dist/src/beta/components/TreeSelectField/internal/VirtualizedTreePanel.d.ts +2 -39
- package/dist/src/beta/components/TreeSelectField/internal/treeSync.d.ts +6 -21
- package/dist/src/beta/components/TreeSelectField/internal/treeUtils.d.ts +3 -19
- package/dist/src/beta/components/TreeSelectField/internal/useTree.d.ts +9 -50
- package/dist/src/beta/components/TreeSelectField/internal/useTreeCascade.d.ts +8 -79
- package/dist/src/beta/components/TreeSelectField/internal/useTreeKeyboard.d.ts +3 -29
- package/dist/src/beta/components/TreeSelectField/internal/useTreeLazyCascade.d.ts +8 -36
- package/dist/src/beta/components/TreeSelectField/internal/useTreeLoader.d.ts +10 -34
- package/dist/src/beta/components/TreeSelectField/parts.d.ts +3 -9
- package/dist/src/beta/components/TreeSelectField/types.d.ts +82 -68
- package/dist/src/beta/components/TreeSelectMenu/TreeSelectMenu.d.ts +4 -18
- package/dist/src/beta/components/TreeSelectMenu/TreeSelectMenuSync.d.ts +9 -47
- package/dist/src/beta/components/TreeSelectMenu/parts.d.ts +4 -4
- package/dist/src/beta/components/TreeSelectMenu/types.d.ts +44 -54
- package/dist/src/beta/components/TypeaheadTextField/TypeaheadTextField.d.ts +15 -43
- package/dist/src/beta/components/TypeaheadTextField/internal/SuggestionItem.d.ts +1 -18
- package/dist/src/beta/hooks/useAdaptiveView/useAdaptiveView.d.ts +6 -41
- package/dist/src/integration-testing/stepper-panel-flicker.spec.d.ts +1 -0
- package/dist/{stripInlineMarkdown-DmU2adBb.js → stripInlineMarkdown-BhYLEiXu.js} +2 -2
- package/dist/{stripInlineMarkdown-DmU2adBb.js.map → stripInlineMarkdown-BhYLEiXu.js.map} +1 -1
- package/dist/{syncFilterUtils-CP4dhWVs.js → syncFilterUtils-ClEj4Oeg.js} +4 -4
- package/dist/{syncFilterUtils-CP4dhWVs.js.map → syncFilterUtils-ClEj4Oeg.js.map} +1 -1
- package/dist/{treeSync-CDrgjuw8.js → treeSync-B38r1dRQ.js} +5 -11
- package/dist/treeSync-B38r1dRQ.js.map +1 -0
- package/dist/{use-reduced-motion-CqjZZ5QB.js → use-reduced-motion-yYB9Tb0D.js} +2 -2
- package/dist/use-reduced-motion-yYB9Tb0D.js.map +1 -0
- package/dist/{useDrilldown-DV4qyVOI.js → useDrilldown-BOeeNUsy.js} +4 -4
- package/dist/{useDrilldown-DV4qyVOI.js.map → useDrilldown-BOeeNUsy.js.map} +1 -1
- package/dist/{useInfiniteCombobox-DvyQpdwv.js → useInfiniteCombobox-7oIT2Mzn.js} +4 -4
- package/dist/{useInfiniteCombobox-DvyQpdwv.js.map → useInfiniteCombobox-7oIT2Mzn.js.map} +1 -1
- package/dist/{useInitialFocus-0TZ78bPz.js → useInitialFocus-CGybEc6x.js} +2 -2
- package/dist/{useInitialFocus-0TZ78bPz.js.map → useInitialFocus-CGybEc6x.js.map} +1 -1
- package/dist/{useInvalidateOnOptionsChange-D3KWg4qK.js → useInvalidateOnOptionsChange-BD2VBpbK.js} +5 -5
- package/dist/useInvalidateOnOptionsChange-BD2VBpbK.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/package.json +6 -4
- package/dist/Button-Dwh_Nd4l.js.map +0 -1
- package/dist/Calendar-BUFPc5UN.js.map +0 -1
- package/dist/Calendar-CEf7ke8X.js.map +0 -1
- package/dist/DataTable-DbuXfDNJ.js.map +0 -1
- package/dist/Details-oM-nR4ju.js.map +0 -1
- package/dist/FilterBar-CKYf-1oU.js.map +0 -1
- package/dist/InteractiveCard-C0g5PxB6.js.map +0 -1
- package/dist/Page-B2HZzNGP.js.map +0 -1
- package/dist/RichTextEditor-TcZUnqcp.js.map +0 -1
- package/dist/SavedFiltersButton-B8lf3L2T.js.map +0 -1
- package/dist/Tab-mXEQ0ifM.js.map +0 -1
- package/dist/Toolbar-B_lHD0c2.js.map +0 -1
- package/dist/ToolbarButtonToggle-BMBmBdw1.js.map +0 -1
- package/dist/TreeSelectFieldSync-CKnFwROC.js.map +0 -1
- package/dist/TreeSelectMenuSync-CK-x2_ne.js.map +0 -1
- package/dist/TypeaheadTextField-DqnUGXj0.js.map +0 -1
- package/dist/filter-state-DW8YmRHb.js.map +0 -1
- package/dist/proxy-DEehATlA.js.map +0 -1
- package/dist/treeSync-CDrgjuw8.js.map +0 -1
- package/dist/use-reduced-motion-CqjZZ5QB.js.map +0 -1
- package/dist/useInvalidateOnOptionsChange-D3KWg4qK.js.map +0 -1
|
@@ -1,101 +1,59 @@
|
|
|
1
1
|
import { ReactNode } from 'react';
|
|
2
2
|
import { ColumnDef, ColumnOverflowConfig, ColumnTypeConfig, TextEditConfig, NumberEditConfig, SelectEditConfig, SelectAsyncEditConfig, MultiselectEditConfig, MultiselectAsyncEditConfig, BooleanEditConfig, CustomEditConfig, TableRow, ColumnHeaderConfig, ColumnReadRenderContext, ColumnReadRenderResult } from './types';
|
|
3
3
|
import { MultiSelectMenuOption } from '../../../components/MultiSelectMenu';
|
|
4
|
-
/**
|
|
5
|
-
* Base column configuration shared by all column types
|
|
6
|
-
*/
|
|
7
4
|
type BaseColumnConfig<T> = ColumnHeaderConfig & {
|
|
8
|
-
/**
|
|
9
|
-
* The cleaned-up header configuration.
|
|
10
|
-
*/
|
|
11
5
|
header?: ColumnDef<T>["header"];
|
|
12
6
|
/**
|
|
13
|
-
*
|
|
7
|
+
* Deprecated string label used when `header` is omitted.
|
|
14
8
|
* @deprecated Use `header.label` instead.
|
|
15
9
|
*/
|
|
16
10
|
headerLabel?: string;
|
|
17
11
|
/**
|
|
18
|
-
*
|
|
19
|
-
*
|
|
12
|
+
* On leaf columns, overrides the alignment inferred from `type`. Group
|
|
13
|
+
* headers stay start-aligned.
|
|
20
14
|
*/
|
|
21
15
|
align?: "start" | "center" | "end";
|
|
22
16
|
/**
|
|
23
|
-
*
|
|
24
|
-
*
|
|
25
|
-
* the column-level value takes precedence.
|
|
17
|
+
* Replaces the table's empty-cell content for this column. Applies to `null`,
|
|
18
|
+
* `undefined`, and empty strings.
|
|
26
19
|
*/
|
|
27
20
|
emptyCellContent?: ReactNode;
|
|
28
|
-
/**
|
|
29
|
-
* The content of the footer cell. An array will display multiple footer rows
|
|
30
|
-
*/
|
|
21
|
+
/** One footer value, or one value per footer row. */
|
|
31
22
|
footerContent?: ReactNode | ReactNode[];
|
|
32
|
-
/**
|
|
33
|
-
* The maximum width of the column, in pixels. Caps automatic growth when
|
|
34
|
-
* the table has extra horizontal space available.
|
|
35
|
-
*/
|
|
23
|
+
/** Same sizing contract as {@link ColumnBaseDef} `maxWidth`. */
|
|
36
24
|
maxWidth?: number;
|
|
37
|
-
/**
|
|
38
|
-
* The minimum width of the column, in pixels. Used as the floor for manual
|
|
39
|
-
* resize — users can drag a column down to but not below this value. Also
|
|
40
|
-
* serves as the fallback auto-sizing floor when `defaultWidth` is not set.
|
|
41
|
-
*/
|
|
25
|
+
/** Same sizing contract as {@link ColumnBaseDef} `minWidth`. */
|
|
42
26
|
minWidth?: number;
|
|
43
|
-
/**
|
|
44
|
-
* The preferred starting width of the column, in pixels. Used as the basis
|
|
45
|
-
* for automatic growing/shrinking: the column renders at this width by
|
|
46
|
-
* default, grows toward `maxWidth` when the table has spare horizontal
|
|
47
|
-
* space, and never auto-shrinks below it — the table scrolls horizontally
|
|
48
|
-
* instead.
|
|
49
|
-
*
|
|
50
|
-
* Manual resize via the column's resize handle is still bounded by
|
|
51
|
-
* `minWidth`/`maxWidth`, so users can drag a column below `defaultWidth`
|
|
52
|
-
* down to `minWidth`.
|
|
53
|
-
*
|
|
54
|
-
* Falls back to `minWidth` when not specified.
|
|
55
|
-
*/
|
|
27
|
+
/** Same sizing contract as {@link ColumnBaseDef} `defaultWidth`. */
|
|
56
28
|
defaultWidth?: number;
|
|
57
|
-
/**
|
|
58
|
-
* The pinning location of the column
|
|
59
|
-
*/
|
|
29
|
+
/** Keeps the column against the chosen edge while horizontally scrolling. */
|
|
60
30
|
pinned?: "left" | "right";
|
|
61
|
-
/**
|
|
62
|
-
* Whether the column is resizable
|
|
63
|
-
*/
|
|
31
|
+
/** Shows a pointer-driven resize handle. */
|
|
64
32
|
resizable?: boolean;
|
|
65
33
|
};
|
|
66
34
|
type BaseDataColumnConfig<T, K extends keyof T> = BaseColumnConfig<T> & {
|
|
67
35
|
/**
|
|
68
|
-
*
|
|
69
|
-
* When using `type`, a default renderer is provided but can be overridden.
|
|
36
|
+
* Overrides the renderer inferred from `type`.
|
|
70
37
|
*/
|
|
71
38
|
renderCell?: (value: T[K], context: ColumnReadRenderContext<TableRow<T>>) => ReactNode;
|
|
72
|
-
/**
|
|
73
|
-
* Optional plain-text extractor for the read path.
|
|
74
|
-
* Useful when `renderCell` returns JSX or multiline content but default sorting
|
|
75
|
-
* should still use a simple string.
|
|
76
|
-
*/
|
|
39
|
+
/** Supplies sortable text when `renderCell` returns rich content. */
|
|
77
40
|
getCellText?: (value: T[K], context: ColumnReadRenderContext<TableRow<T>>) => string;
|
|
78
41
|
/**
|
|
79
|
-
*
|
|
80
|
-
*
|
|
81
|
-
*
|
|
82
|
-
* hook to return both rendered read content and the sortable raw string.
|
|
42
|
+
* Supplies rendered content and sortable text together. When set, it wins
|
|
43
|
+
* over `renderCell` and `getCellText`. Prefer `getCellText` when only
|
|
44
|
+
* sorting needs an alternate representation.
|
|
83
45
|
*/
|
|
84
46
|
getReadRenderResult?: (value: T[K], context: ColumnReadRenderContext<TableRow<T>>) => ColumnReadRenderResult;
|
|
85
|
-
/**
|
|
86
|
-
* Whether the column is sortable, or a function to customize the sorting logic
|
|
87
|
-
*/
|
|
47
|
+
/** Enables default sorting, or supplies a value comparator. */
|
|
88
48
|
sortable?: boolean | ((valueA: T[K], valueB: T[K]) => number);
|
|
89
49
|
/**
|
|
90
|
-
*
|
|
91
|
-
*
|
|
50
|
+
* Supplies default formatting and alignment; explicit column options override
|
|
51
|
+
* those defaults.
|
|
92
52
|
*/
|
|
93
53
|
type?: ColumnTypeConfig;
|
|
94
54
|
};
|
|
95
55
|
type GroupColumnConfig<T> = BaseColumnConfig<T> & {
|
|
96
|
-
/**
|
|
97
|
-
* Columns of a group column (for grouped columns)
|
|
98
|
-
*/
|
|
56
|
+
/** Leaf or nested columns displayed beneath this group header. */
|
|
99
57
|
columns: ColumnDef<T>[];
|
|
100
58
|
editConfig?: never;
|
|
101
59
|
overflow?: never;
|
|
@@ -103,139 +61,66 @@ type GroupColumnConfig<T> = BaseColumnConfig<T> & {
|
|
|
103
61
|
sortable?: never;
|
|
104
62
|
type?: never;
|
|
105
63
|
};
|
|
106
|
-
/**
|
|
107
|
-
* Configuration for read-only columns (no editing)
|
|
108
|
-
*/
|
|
109
64
|
type ReadOnlyColumnConfig<T, K extends keyof T> = BaseDataColumnConfig<T, K> & {
|
|
110
65
|
editConfig?: undefined;
|
|
66
|
+
/** Shows clipped read-only content in a disclosure Surface. */
|
|
111
67
|
overflow?: ColumnOverflowConfig;
|
|
112
68
|
};
|
|
113
69
|
type EditableColumnConfig<T, K extends keyof T> = BaseDataColumnConfig<T, K> & {
|
|
114
70
|
overflow?: never;
|
|
115
71
|
};
|
|
116
|
-
/**
|
|
117
|
-
* Configuration for text editable columns using editConfig.
|
|
118
|
-
* Valid when T[K] is a string.
|
|
119
|
-
*/
|
|
72
|
+
/** Allows text editing only when the column value is string-compatible. */
|
|
120
73
|
type TextEditConfigColumnConfig<T, K extends keyof T> = NonNullable<T[K]> extends string ? EditableColumnConfig<T, K> & {
|
|
121
74
|
editConfig: TextEditConfig<T, K>;
|
|
122
75
|
} : never;
|
|
123
|
-
/**
|
|
124
|
-
* Configuration for number editable columns using editConfig.
|
|
125
|
-
* Valid when T[K] is a number type.
|
|
126
|
-
*/
|
|
76
|
+
/** Allows number editing only when the column value is number-compatible. */
|
|
127
77
|
type NumberEditConfigColumnConfig<T, K extends keyof T> = NonNullable<T[K]> extends number ? EditableColumnConfig<T, K> & {
|
|
128
78
|
editConfig: NumberEditConfig<T, K>;
|
|
129
79
|
} : never;
|
|
130
|
-
/**
|
|
131
|
-
* Configuration for select editable columns using editConfig
|
|
132
|
-
*/
|
|
133
80
|
type SelectEditConfigColumnConfig<T, K extends keyof T> = EditableColumnConfig<T, K> & {
|
|
134
81
|
editConfig: SelectEditConfig<T, K>;
|
|
135
82
|
};
|
|
136
|
-
/**
|
|
137
|
-
* Configuration for async select editable columns using editConfig
|
|
138
|
-
*/
|
|
139
83
|
type SelectAsyncEditConfigColumnConfig<T, K extends keyof T> = EditableColumnConfig<T, K> & {
|
|
140
84
|
editConfig: SelectAsyncEditConfig<T>;
|
|
141
85
|
};
|
|
142
86
|
type CellArrayItem = object | string | number | boolean | bigint | symbol | null | undefined;
|
|
143
87
|
type CellArrayValue = readonly CellArrayItem[];
|
|
144
|
-
/**
|
|
145
|
-
* Configuration for multiselect editable columns using editConfig
|
|
146
|
-
* Only valid when T[K] is an array type
|
|
147
|
-
*/
|
|
88
|
+
/** Allows multiselect editing only when the column value is an array. */
|
|
148
89
|
type MultiselectEditConfigColumnConfig<T, K extends keyof T> = NonNullable<T[K]> extends CellArrayValue ? EditableColumnConfig<T, K> & {
|
|
149
90
|
editConfig: MultiselectEditConfig<T, K>;
|
|
150
91
|
} : never;
|
|
151
92
|
/**
|
|
152
|
-
*
|
|
153
|
-
*
|
|
154
|
-
* not a plain primitive array like string[].
|
|
93
|
+
* Allows async multiselect editing only for full option-object arrays, not
|
|
94
|
+
* primitive arrays.
|
|
155
95
|
*/
|
|
156
96
|
type MultiselectAsyncEditConfigColumnConfig<T, K extends keyof T> = NonNullable<T[K]> extends MultiSelectMenuOption[] ? EditableColumnConfig<T, K> & {
|
|
157
97
|
editConfig: MultiselectAsyncEditConfig<T>;
|
|
158
98
|
} : never;
|
|
159
|
-
/**
|
|
160
|
-
* Configuration for boolean editable columns using editConfig.
|
|
161
|
-
* Valid when T[K] is a boolean type.
|
|
162
|
-
*/
|
|
99
|
+
/** Allows boolean editing only when the column value is boolean-compatible. */
|
|
163
100
|
type BooleanEditConfigColumnConfig<T, K extends keyof T> = NonNullable<T[K]> extends boolean ? EditableColumnConfig<T, K> & {
|
|
164
101
|
editConfig: BooleanEditConfig<T, K>;
|
|
165
102
|
} : never;
|
|
166
103
|
type CustomEditConfigColumnConfig<T, K extends keyof T> = EditableColumnConfig<T, K> & {
|
|
167
104
|
editConfig: CustomEditConfig<T, K>;
|
|
168
105
|
};
|
|
169
|
-
/**
|
|
170
|
-
* Full column configuration type - union of all possible configurations.
|
|
171
|
-
* TypeScript will enforce that the editConfig matches the value type constraints.
|
|
172
|
-
*/
|
|
106
|
+
/** Couples each edit mode to the column value types it supports. */
|
|
173
107
|
type ColumnConfig<T, K extends keyof T> = ReadOnlyColumnConfig<T, K> | TextEditConfigColumnConfig<T, K> | NumberEditConfigColumnConfig<T, K> | SelectEditConfigColumnConfig<T, K> | SelectAsyncEditConfigColumnConfig<T, K> | MultiselectEditConfigColumnConfig<T, K> | MultiselectAsyncEditConfigColumnConfig<T, K> | BooleanEditConfigColumnConfig<T, K> | CustomEditConfigColumnConfig<T, K>;
|
|
174
108
|
/**
|
|
175
|
-
*
|
|
176
|
-
*
|
|
177
|
-
*
|
|
178
|
-
* - `type` sets display defaults (formatter and alignment) for the column
|
|
179
|
-
* - `editConfig` enables cell editing with proper type constraints
|
|
180
|
-
* - `editConfig.mode: "text"` can only be used with string columns
|
|
181
|
-
* - `editConfig.mode: "boolean"` can only be used with boolean columns
|
|
182
|
-
* - `editConfig.mode: "number"` can only be used with number columns
|
|
183
|
-
* - `editConfig.mode: "multiselect"` can only be used with array columns
|
|
184
|
-
* - `editConfig.mode: "select"` options values must match the column's value type
|
|
185
|
-
* - `editConfig.mode: "custom"` can only be used with structured object columns;
|
|
186
|
-
* drafts may be partial objects, plus null/undefined when declared by the row type
|
|
187
|
-
* - non-custom `editConfig.onChange` callbacks receive the correct value type;
|
|
188
|
-
* custom mode uses `onCommit` and `onDraftUpdate`
|
|
189
|
-
* - `getCellText` provides a simple sortable read string when `renderCell` returns rich content
|
|
190
|
-
*
|
|
191
|
-
* @template T - The type of the row data
|
|
192
|
-
* @returns A function that creates type-safe column definitions
|
|
109
|
+
* Creates column definitions keyed to row type `T`. The returned overloads
|
|
110
|
+
* constrain edit modes by value type and accept `{ group: string }` for grouped
|
|
111
|
+
* columns.
|
|
193
112
|
*
|
|
194
113
|
* @example
|
|
195
114
|
* ```ts
|
|
196
|
-
*
|
|
197
|
-
*
|
|
198
|
-
*
|
|
199
|
-
* // Display-only column with type defaults
|
|
200
|
-
* createColumn("amount", { header: { label: "Amount" }, type: "currency" });
|
|
201
|
-
*
|
|
202
|
-
* // Editable column with editConfig
|
|
203
|
-
* createColumn("name", {
|
|
204
|
-
* header: { label: "Name" },
|
|
205
|
-
* type: "text",
|
|
206
|
-
* editConfig: { mode: "text", onChange: (value, rowId) => save(value, rowId) }
|
|
207
|
-
* });
|
|
208
|
-
*
|
|
209
|
-
* // Number editing
|
|
210
|
-
* createColumn("amount", {
|
|
115
|
+
* const column = createColumnHelper<{ name: string; amount: number }>();
|
|
116
|
+
* column("amount", {
|
|
211
117
|
* header: { label: "Amount" },
|
|
212
|
-
*
|
|
213
|
-
*
|
|
214
|
-
* minValue: 0,
|
|
215
|
-
* maxValue: 10000,
|
|
216
|
-
* step: 0.01,
|
|
217
|
-
* onChange: (value, rowId) => save(value, rowId)
|
|
218
|
-
* }
|
|
118
|
+
* type: "currency",
|
|
119
|
+
* editConfig: { mode: "number", onChange: saveAmount },
|
|
219
120
|
* });
|
|
220
|
-
*
|
|
221
|
-
*
|
|
222
|
-
*
|
|
223
|
-
* header: { label: "Status" },
|
|
224
|
-
* editConfig: {
|
|
225
|
-
* mode: "select",
|
|
226
|
-
* options: [{ id: "active", label: "Active" }],
|
|
227
|
-
* onChange: (option, rowId) => save(option?.id, rowId)
|
|
228
|
-
* }
|
|
229
|
-
* });
|
|
230
|
-
*
|
|
231
|
-
* // Multiselect editing with array column
|
|
232
|
-
* createColumn("tags", {
|
|
233
|
-
* header: { label: "Tags" },
|
|
234
|
-
* editConfig: {
|
|
235
|
-
* mode: "multiselect",
|
|
236
|
-
* options: [{ id: "urgent", label: "Urgent" }],
|
|
237
|
-
* onChange: (options, rowId) => save(options.map(o => o.id), rowId)
|
|
238
|
-
* }
|
|
121
|
+
* column({ group: "customer" }, {
|
|
122
|
+
* header: { label: "Customer" },
|
|
123
|
+
* columns: [column("name", { header: { label: "Name" } })],
|
|
239
124
|
* });
|
|
240
125
|
* ```
|
|
241
126
|
*/
|
|
@@ -1,22 +1,11 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Options type for the boolean formatter function
|
|
3
|
-
*/
|
|
4
1
|
export type BooleanFormatterOptions = {
|
|
5
|
-
/**
|
|
6
|
-
* The text to display for true values
|
|
7
|
-
* @default "True"
|
|
8
|
-
*/
|
|
2
|
+
/** Label when `value` is `true`. Defaults to `"True"`. */
|
|
9
3
|
trueLabel?: string;
|
|
10
|
-
/**
|
|
11
|
-
* The text to display for false values
|
|
12
|
-
* @default "False"
|
|
13
|
-
*/
|
|
4
|
+
/** Label when `value` is `false`. Defaults to `"False"`. */
|
|
14
5
|
falseLabel?: string;
|
|
15
6
|
};
|
|
16
7
|
/**
|
|
17
|
-
*
|
|
18
|
-
*
|
|
19
|
-
* @param options - The options for the boolean formatter
|
|
20
|
-
* @returns The formatted boolean label or null for undefined/null values
|
|
8
|
+
* Formats a boolean for a table cell. `null` and `undefined` return `null`
|
|
9
|
+
* (empty cell); they do not use either label.
|
|
21
10
|
*/
|
|
22
11
|
export declare const booleanFormatter: (value?: boolean | null, { trueLabel, falseLabel }?: BooleanFormatterOptions) => string | null;
|
|
@@ -1,21 +1,19 @@
|
|
|
1
1
|
import { ChipProps } from '../../../../components/Chip';
|
|
2
2
|
/**
|
|
3
|
-
*
|
|
3
|
+
* One chip or many. Arrays must be all strings or all {@link ChipProps} — mixed
|
|
4
|
+
* arrays are treated as `ChipProps[]`.
|
|
4
5
|
*/
|
|
5
6
|
export type ChipsValueType = string | string[] | ChipProps | ChipProps[];
|
|
6
|
-
/**
|
|
7
|
-
* Props for the chips formatter function
|
|
8
|
-
*/
|
|
9
7
|
export type ChipsFormatterOptions = {
|
|
10
8
|
/**
|
|
11
|
-
*
|
|
9
|
+
* When `true`, array values overflow into a +N disclosure instead of wrapping.
|
|
10
|
+
* Ignored for a single chip. Defaults to wrapping.
|
|
12
11
|
*/
|
|
13
12
|
truncateChips?: boolean;
|
|
14
13
|
};
|
|
15
14
|
/**
|
|
16
|
-
*
|
|
17
|
-
* @
|
|
18
|
-
*
|
|
19
|
-
* @returns The formatted chips
|
|
15
|
+
* Renders chips for a table cell. Falsy values and empty arrays become
|
|
16
|
+
* {@link TableEmptyCellContent} (`—`). Unspecified `size` is `"small"`, or
|
|
17
|
+
* `"medium"` when both `onClick` and `onClose` are set.
|
|
20
18
|
*/
|
|
21
19
|
export declare const chipsFormatter: (value?: ChipsValueType, { truncateChips }?: ChipsFormatterOptions) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -1,22 +1,10 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Props for the currency formatter function
|
|
3
|
-
*/
|
|
4
1
|
export type CurrencyFormatterOptions = {
|
|
5
|
-
/**
|
|
6
|
-
* The locale to use for the currency formatter
|
|
7
|
-
* @default "en-US"
|
|
8
|
-
*/
|
|
2
|
+
/** `Intl` locale. Defaults to `"en-US"`. */
|
|
9
3
|
locale?: Intl.LocalesArgument;
|
|
10
|
-
/**
|
|
11
|
-
* The currency to use for the currency formatter
|
|
12
|
-
* @default "USD"
|
|
13
|
-
*/
|
|
4
|
+
/** ISO 4217 currency code. Defaults to `"USD"`. */
|
|
14
5
|
currency?: Intl.NumberFormatOptions["currency"];
|
|
15
6
|
};
|
|
16
7
|
/**
|
|
17
|
-
*
|
|
18
|
-
* @param value - The value to format
|
|
19
|
-
* @param options - The options for the currency formatter
|
|
20
|
-
* @returns The formatted currency
|
|
8
|
+
* Formats a number as currency via `Intl`. Nullish values return `null`.
|
|
21
9
|
*/
|
|
22
10
|
export declare const currencyFormatter: (value?: number, options?: CurrencyFormatterOptions) => string | null;
|
|
@@ -1,34 +1,21 @@
|
|
|
1
1
|
import { DateFormatPreset } from './presets';
|
|
2
2
|
export type { DateFormatPreset };
|
|
3
|
-
/**
|
|
4
|
-
* Options type for the date formatter function
|
|
5
|
-
*/
|
|
6
3
|
export type DateFormatterOptions = {
|
|
7
|
-
/**
|
|
8
|
-
* The locale to use for the date formatter
|
|
9
|
-
* @default "en-US"
|
|
10
|
-
*/
|
|
4
|
+
/** `Intl` locale. Defaults to `"en-US"`. */
|
|
11
5
|
locale?: Intl.LocalesArgument;
|
|
12
6
|
/**
|
|
13
|
-
*
|
|
14
|
-
* - "short"
|
|
15
|
-
* - "
|
|
16
|
-
* - "
|
|
17
|
-
* - "
|
|
18
|
-
* -
|
|
19
|
-
* @default "short"
|
|
7
|
+
* Preset name or a custom `Intl.DateTimeFormatOptions` bag. Preset samples
|
|
8
|
+
* below are `en-US`; other locales differ. Defaults to `"short"`.
|
|
9
|
+
* - `"short"`: 01/15/2024
|
|
10
|
+
* - `"medium"`: Jan 15, 2024
|
|
11
|
+
* - `"long"`: January 15, 2024
|
|
12
|
+
* - `"full"`: Monday, January 15, 2024
|
|
20
13
|
*/
|
|
21
14
|
format?: DateFormatPreset | Intl.DateTimeFormatOptions;
|
|
22
15
|
};
|
|
23
16
|
/**
|
|
24
|
-
*
|
|
25
|
-
*
|
|
26
|
-
*
|
|
27
|
-
* For JavaScript Date objects or date-times with timezone information,
|
|
28
|
-
* use `dateTimeFormatter` instead.
|
|
29
|
-
*
|
|
30
|
-
* @param value - The plain date string to format (ISO format "YYYY-MM-DD")
|
|
31
|
-
* @param options - The options for the date formatter
|
|
32
|
-
* @returns The formatted date string or null for undefined/null values
|
|
17
|
+
* Formats a calendar date (`YYYY-MM-DD`) without applying a timezone offset.
|
|
18
|
+
* For `Date` objects or ISO strings with time/zone, use {@link dateTimeFormatter}.
|
|
19
|
+
* Invalid or missing values return `null`.
|
|
33
20
|
*/
|
|
34
21
|
export declare const dateFormatter: (value?: string | null, { locale, format }?: DateFormatterOptions) => string | null;
|
|
@@ -1,66 +1,43 @@
|
|
|
1
1
|
import { IanaZone } from '../../../../types';
|
|
2
2
|
import { DateFormatPreset, TimeFormatPreset } from './presets';
|
|
3
|
-
/**
|
|
4
|
-
* Date format preset options for dateTimeFormatter
|
|
5
|
-
*/
|
|
3
|
+
/** Alias of {@link DateFormatPreset} for the date portion. */
|
|
6
4
|
export type DateTimeFormatDatePreset = DateFormatPreset;
|
|
7
|
-
/**
|
|
8
|
-
* Time format preset options for dateTimeFormatter
|
|
9
|
-
*/
|
|
5
|
+
/** {@link TimeFormatPreset} plus `"none"` to omit the time. */
|
|
10
6
|
export type DateTimeFormatTimePreset = TimeFormatPreset | "none";
|
|
11
|
-
/**
|
|
12
|
-
* Options type for the date-time formatter function
|
|
13
|
-
*/
|
|
14
7
|
export type DateTimeFormatterOptions = {
|
|
15
|
-
/**
|
|
16
|
-
* The locale to use for the date-time formatter
|
|
17
|
-
* @default "en-US"
|
|
18
|
-
*/
|
|
8
|
+
/** `Intl` locale. Defaults to `"en-US"`. */
|
|
19
9
|
locale?: Intl.LocalesArgument;
|
|
20
10
|
/**
|
|
21
|
-
*
|
|
22
|
-
*
|
|
23
|
-
*
|
|
24
|
-
* - "
|
|
25
|
-
* - "
|
|
26
|
-
* -
|
|
27
|
-
*
|
|
11
|
+
* Date portion: a {@link DateTimeFormatDatePreset} or a custom
|
|
12
|
+
* `Intl.DateTimeFormatOptions` bag. Preset samples below are `en-US`.
|
|
13
|
+
* Defaults to `"short"`.
|
|
14
|
+
* - `"short"`: 01/15/2024
|
|
15
|
+
* - `"medium"`: Jan 15, 2024
|
|
16
|
+
* - `"long"`: January 15, 2024
|
|
17
|
+
* - `"full"`: Monday, January 15, 2024
|
|
28
18
|
*/
|
|
29
19
|
dateFormat?: DateTimeFormatDatePreset | Intl.DateTimeFormatOptions;
|
|
30
20
|
/**
|
|
31
|
-
*
|
|
32
|
-
*
|
|
33
|
-
*
|
|
34
|
-
* - "
|
|
35
|
-
* -
|
|
36
|
-
* @default "short"
|
|
21
|
+
* Time portion: a {@link DateTimeFormatTimePreset}, `"none"` (date only), or
|
|
22
|
+
* a custom `Intl.DateTimeFormatOptions` bag. Preset samples below are `en-US`.
|
|
23
|
+
* Defaults to `"short"`.
|
|
24
|
+
* - `"short"`: 08:30 AM
|
|
25
|
+
* - `"medium"`: 08:30:00 AM
|
|
37
26
|
*/
|
|
38
27
|
timeFormat?: DateTimeFormatTimePreset | Intl.DateTimeFormatOptions;
|
|
39
28
|
/**
|
|
40
|
-
*
|
|
41
|
-
*
|
|
42
|
-
*
|
|
43
|
-
* **Note:** This option only applies to `Date` objects. For string inputs, timezone handling is automatic:
|
|
44
|
-
* - Strings without timezone info (e.g., "2024-01-15T09:30:00") are treated as plain date-times with no conversion
|
|
45
|
-
* - Strings with timezone info (e.g., "2024-01-15T09:30:00Z" or "2024-01-15T09:30:00-05:00") use their embedded timezone
|
|
46
|
-
*
|
|
47
|
-
* @default undefined (local timezone)
|
|
29
|
+
* IANA zone applied to `Date` values; omitted uses the local zone. ISO strings
|
|
30
|
+
* ignore this: zoneless strings remain wall times, while strings with `Z` or
|
|
31
|
+
* an offset are converted to the local zone.
|
|
48
32
|
*/
|
|
49
33
|
timeZone?: IanaZone;
|
|
50
34
|
};
|
|
51
35
|
/**
|
|
52
|
-
*
|
|
53
|
-
*
|
|
54
|
-
* For string inputs:
|
|
55
|
-
* - Strings without timezone info are treated as "plain date-times" (no timezone conversion, no timezone displayed)
|
|
56
|
-
* - Strings with timezone info (Z or offset) honor the provided timezone and display it (e.g., "PST", "UTC")
|
|
57
|
-
*
|
|
58
|
-
* For Date objects:
|
|
59
|
-
* - Uses local timezone by default and displays the timezone
|
|
60
|
-
* - Use the `timeZone` option to specify a different timezone (e.g., "America/New_York", "UTC")
|
|
36
|
+
* Formats a date-time for a table cell. Invalid or missing values return `null`.
|
|
61
37
|
*
|
|
62
|
-
*
|
|
63
|
-
*
|
|
64
|
-
*
|
|
38
|
+
* `Date` values use the local zone (or {@link DateTimeFormatterOptions.timeZone}).
|
|
39
|
+
* Zoneless ISO strings are wall times with no zone label; strings with `Z` or an
|
|
40
|
+
* offset are instants converted to the local zone. Zoned values default to a
|
|
41
|
+
* short zone name, which custom format options can override.
|
|
65
42
|
*/
|
|
66
43
|
export declare const dateTimeFormatter: (value?: string | Date | null, { locale, dateFormat, timeFormat, timeZone, }?: DateTimeFormatterOptions) => string | null;
|
|
@@ -1,15 +1,6 @@
|
|
|
1
1
|
import { ReactNode } from 'react';
|
|
2
2
|
/**
|
|
3
|
-
*
|
|
4
|
-
*
|
|
5
|
-
*
|
|
6
|
-
* Supported HTML: strong, b, em, i, code, mark, s, strike, del, h1, h2, h3,
|
|
7
|
-
* ul, ol, li, br, p. The u and span tags, along with text-align styling on
|
|
8
|
-
* p/h1-h3, are rendered as plain text (styling ignored, content preserved).
|
|
9
|
-
* Other unsupported tags and their content are dropped entirely.
|
|
10
|
-
* HTML entities are decoded to plain text.
|
|
11
|
-
*
|
|
12
|
-
* @param value - The HTML string to format
|
|
13
|
-
* @returns Formatted React nodes, or null for empty/null/undefined values
|
|
3
|
+
* DataTable cell HTML via {@link htmlToMarkdown} then {@link markdownFormatter}.
|
|
4
|
+
* Empty or nullish HTML becomes `null`.
|
|
14
5
|
*/
|
|
15
6
|
export declare const htmlFormatter: (value?: string | null) => ReactNode;
|
|
@@ -1,14 +1,9 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* Converts
|
|
2
|
+
* Converts HTML to the subset {@link markdownFormatter} understands.
|
|
3
3
|
*
|
|
4
|
-
*
|
|
5
|
-
*
|
|
6
|
-
*
|
|
7
|
-
*
|
|
8
|
-
* Other unsupported tags and their content are dropped entirely.
|
|
9
|
-
* HTML entities are decoded to plain text.
|
|
10
|
-
*
|
|
11
|
-
* @param value - The HTML string to convert
|
|
12
|
-
* @returns The equivalent markdown string, or empty string for null/undefined/empty input
|
|
4
|
+
* Kept tags: strong, b, em, i, code, mark, s, strike, del, h1–h3, ul, ol, li,
|
|
5
|
+
* br, p. `u` and `span` unwrap to plain text (alignment on p/h1–h3 is ignored).
|
|
6
|
+
* Other tags and their content are dropped. Entities decode to plain text.
|
|
7
|
+
* Nullish or empty input returns `""`.
|
|
13
8
|
*/
|
|
14
9
|
export declare function htmlToMarkdown(value?: string | null): string;
|
|
@@ -1,12 +1,7 @@
|
|
|
1
1
|
import { ReactNode } from 'react';
|
|
2
2
|
/**
|
|
3
|
-
*
|
|
4
|
-
*
|
|
5
|
-
*
|
|
6
|
-
* code, highlight) and block-level constructs: headings (`# ` through `### `)
|
|
7
|
-
* and flat lists (unordered with `- `, ordered with `N. `).
|
|
8
|
-
*
|
|
9
|
-
* @param value - The markdown string to format
|
|
10
|
-
* @returns Formatted React nodes, or null for empty/null/undefined values
|
|
3
|
+
* Renders a markdown subset in a DataTable cell: bold, italic, bold+italic,
|
|
4
|
+
* strikethrough, inline code, `==highlight==`, `#`–`###` headings, and flat
|
|
5
|
+
* `- ` / `N. ` lists. Empty or nullish values return `null`.
|
|
11
6
|
*/
|
|
12
7
|
export declare const markdownFormatter: (value?: string | null) => ReactNode;
|
|
@@ -1,42 +1,23 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Options type for the number formatter function
|
|
3
|
-
*/
|
|
4
1
|
export type NumberFormatterOptions = {
|
|
5
|
-
/**
|
|
6
|
-
* The locale to use for the number formatter
|
|
7
|
-
* @default "en-US"
|
|
8
|
-
*/
|
|
2
|
+
/** `Intl` locale. Defaults to `"en-US"`. */
|
|
9
3
|
locale?: Intl.LocalesArgument;
|
|
10
|
-
/**
|
|
11
|
-
* The minimum number of fraction digits to display
|
|
12
|
-
* @default 0
|
|
13
|
-
*/
|
|
4
|
+
/** Floor on displayed fraction digits. Defaults to `0`. */
|
|
14
5
|
minimumFractionDigits?: number;
|
|
15
|
-
/**
|
|
16
|
-
* The maximum number of fraction digits to display
|
|
17
|
-
* @default 2
|
|
18
|
-
*/
|
|
6
|
+
/** Cap on displayed fraction digits. Defaults to `2`. */
|
|
19
7
|
maximumFractionDigits?: number;
|
|
20
|
-
/**
|
|
21
|
-
* Whether to use grouping separators (e.g., thousands separator)
|
|
22
|
-
* @default true
|
|
23
|
-
*/
|
|
8
|
+
/** Grouping separators (thousands, etc.). Defaults to `true`. */
|
|
24
9
|
useGrouping?: boolean;
|
|
25
10
|
/**
|
|
26
|
-
*
|
|
27
|
-
* @default "standard"
|
|
11
|
+
* `Intl.NumberFormat` notation. Defaults to `"standard"`.
|
|
28
12
|
*/
|
|
29
13
|
notation?: "standard" | "scientific" | "engineering" | "compact";
|
|
30
14
|
/**
|
|
31
|
-
*
|
|
32
|
-
* @default "auto"
|
|
15
|
+
* `Intl.NumberFormat` sign display. Defaults to `"auto"`.
|
|
33
16
|
*/
|
|
34
17
|
signDisplay?: "auto" | "never" | "always" | "exceptZero";
|
|
35
18
|
};
|
|
36
19
|
/**
|
|
37
|
-
*
|
|
38
|
-
*
|
|
39
|
-
* @param options - The options for the number formatter
|
|
40
|
-
* @returns The formatted number
|
|
20
|
+
* Formats a number with `Intl` decimal style. `null` and `undefined` return
|
|
21
|
+
* `null`.
|
|
41
22
|
*/
|
|
42
23
|
export declare const numberFormatter: (value?: number | null, options?: NumberFormatterOptions) => string | null;
|
|
@@ -1,22 +1,11 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Options type for the percent formatter function
|
|
3
|
-
*/
|
|
4
1
|
export type PercentFormatterOptions = {
|
|
5
|
-
/**
|
|
6
|
-
* The number of decimals to display
|
|
7
|
-
* @default 2
|
|
8
|
-
*/
|
|
2
|
+
/** Fraction digits for both min and max. Defaults to `2`. */
|
|
9
3
|
decimals?: number;
|
|
10
|
-
/**
|
|
11
|
-
* The locale to use for the percent formatter
|
|
12
|
-
* @default "en-US"
|
|
13
|
-
*/
|
|
4
|
+
/** `Intl` locale. Defaults to `"en-US"`. */
|
|
14
5
|
locale?: Intl.LocalesArgument;
|
|
15
6
|
};
|
|
16
7
|
/**
|
|
17
|
-
*
|
|
18
|
-
*
|
|
19
|
-
* @param options - The options for the percent formatter
|
|
20
|
-
* @returns The formatted percentage
|
|
8
|
+
* Formats a ratio as a percentage (`0.5` → `50%`) via `Intl` percent style.
|
|
9
|
+
* Nullish values return `null`.
|
|
21
10
|
*/
|
|
22
11
|
export declare const percentFormatter: (value?: number, options?: PercentFormatterOptions) => string | null;
|