@servicetitan/anvil2 3.0.5 → 3.0.7
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 +48 -0
- package/dist/{AiMark-DjOf60tj.js → AiMark-BXL0sWIV.js} +2 -2
- package/dist/{AiMark-DjOf60tj.js.map → AiMark-BXL0sWIV.js.map} +1 -1
- package/dist/AiMark.js +1 -1
- package/dist/{Alert-BTesdKK7.js → Alert-BNH0UD2s.js} +2 -2
- package/dist/{Alert-BTesdKK7.js.map → Alert-BNH0UD2s.js.map} +1 -1
- package/dist/Alert.js +1 -1
- package/dist/{Breadcrumbs-DTi5RqT-.js → Breadcrumbs-Bzxbdu-S.js} +2 -2
- package/dist/{Breadcrumbs-DTi5RqT-.js.map → Breadcrumbs-Bzxbdu-S.js.map} +1 -1
- package/dist/Breadcrumbs.js +1 -1
- package/dist/{Calendar-ddGQKSGU.js → Calendar-BYNFAWpZ.js} +2 -2
- package/dist/{Calendar-ddGQKSGU.js.map → Calendar-BYNFAWpZ.js.map} +1 -1
- package/dist/{Calendar-CpCRxcue.js → Calendar-DS5eWpGF.js} +2 -2
- package/dist/{Calendar-CpCRxcue.js.map → Calendar-DS5eWpGF.js.map} +1 -1
- package/dist/Calendar.js +2 -2
- package/dist/{Checkbox-CJ8eYejR.js → Checkbox-BB3BDJsK.js} +4 -4
- package/dist/{Checkbox-CJ8eYejR.js.map → Checkbox-BB3BDJsK.js.map} +1 -1
- package/dist/{Checkbox-CVidv1sO.js → Checkbox-BeIzx_ZX.js} +2 -2
- package/dist/{Checkbox-CVidv1sO.js.map → Checkbox-BeIzx_ZX.js.map} +1 -1
- package/dist/Checkbox.css +40 -37
- package/dist/Checkbox.js +1 -1
- package/dist/Checkbox.module-CURNX27M.js +28 -0
- package/dist/Checkbox.module-CURNX27M.js.map +1 -0
- package/dist/{Chip-0-Yx9SGX.js → Chip-D2k5X_wX.js} +2 -2
- package/dist/{Chip-0-Yx9SGX.js.map → Chip-D2k5X_wX.js.map} +1 -1
- package/dist/Chip.js +1 -1
- package/dist/Combobox.js +1 -2
- package/dist/Combobox.js.map +1 -1
- package/dist/{DataTable-BFzj8cZG.js → DataTable-E8z0H8c7.js} +144 -17
- package/dist/{DataTable-BFzj8cZG.js.map → DataTable-E8z0H8c7.js.map} +1 -1
- package/dist/DataTable.css +47 -5
- package/dist/{DateFieldRange-CO2C776E.js → DateFieldRange-BN_uIvHI.js} +27 -15
- package/dist/DateFieldRange-BN_uIvHI.js.map +1 -0
- package/dist/DateFieldRange.js +1 -1
- package/dist/{DateFieldSingle-DjmHpn1y.js → DateFieldSingle-h3YkdwPo.js} +5 -5
- package/dist/{DateFieldSingle-DjmHpn1y.js.map → DateFieldSingle-h3YkdwPo.js.map} +1 -1
- package/dist/DateFieldSingle.js +1 -1
- package/dist/{DateFieldYearless-CCJAopYd.js → DateFieldYearless-m_Hl2gMY.js} +5 -5
- package/dist/{DateFieldYearless-CCJAopYd.js.map → DateFieldYearless-m_Hl2gMY.js.map} +1 -1
- package/dist/DateFieldYearless.js +1 -1
- package/dist/{DateFieldYearlessRange-BUv1mGJg.js → DateFieldYearlessRange-DNqSTBDr.js} +4 -4
- package/dist/{DateFieldYearlessRange-BUv1mGJg.js.map → DateFieldYearlessRange-DNqSTBDr.js.map} +1 -1
- package/dist/DateFieldYearlessRange.js +1 -1
- package/dist/{DaysOfTheWeek-BihTU2No.js → DaysOfTheWeek-D58z_eF3.js} +10 -9
- package/dist/{DaysOfTheWeek-BihTU2No.js.map → DaysOfTheWeek-D58z_eF3.js.map} +1 -1
- package/dist/DaysOfTheWeek.css +10 -6
- package/dist/DaysOfTheWeek.js +1 -1
- package/dist/{Dialog-BZTo4hbX.js → Dialog-CvYSMvfD.js} +23 -21
- package/dist/{Dialog-BZTo4hbX.js.map → Dialog-CvYSMvfD.js.map} +1 -1
- package/dist/Dialog.css +43 -29
- package/dist/Dialog.js +1 -1
- package/dist/{Drawer-Dg35inxH.js → Drawer-s2y0xcgV.js} +3 -3
- package/dist/{Drawer-Dg35inxH.js.map → Drawer-s2y0xcgV.js.map} +1 -1
- package/dist/Drawer.js +1 -1
- package/dist/DrillDown.js +1 -1
- package/dist/{EditCard-BfNq-T8n.js → EditCard-B25pj0Jx.js} +2 -2
- package/dist/{EditCard-BfNq-T8n.js.map → EditCard-B25pj0Jx.js.map} +1 -1
- package/dist/EditCard.js +1 -1
- package/dist/{FieldLabel-xV6EdVwo.js → FieldLabel-D1qPAGtB.js} +3 -3
- package/dist/{FieldLabel-xV6EdVwo.js.map → FieldLabel-D1qPAGtB.js.map} +1 -1
- package/dist/FieldLabel.js +1 -1
- package/dist/FilterBar-B4ZAs73g.js +412 -0
- package/dist/FilterBar-B4ZAs73g.js.map +1 -0
- package/dist/FilterBar.js +1 -1
- package/dist/{InputMask-8rI6UIb8.js → InputMask-BDl09V4u.js} +3 -3
- package/dist/{InputMask-8rI6UIb8.js.map → InputMask-BDl09V4u.js.map} +1 -1
- package/dist/InputMask.js +1 -1
- package/dist/{ListView-CIa981KJ.js → ListView-DO5psxd4.js} +6 -6
- package/dist/{ListView-CIa981KJ.js.map → ListView-DO5psxd4.js.map} +1 -1
- package/dist/ListView.js +1 -1
- package/dist/{ListView.module-CKUQP3kf.js → ListView.module-DfqtCL3Q.js} +3 -3
- package/dist/ListView.module-DfqtCL3Q.js.map +1 -0
- package/dist/{Listbox-DRznPBCr.js → Listbox-CvQHBFWb.js} +2 -2
- package/dist/{Listbox-DRznPBCr.js.map → Listbox-CvQHBFWb.js.map} +1 -1
- package/dist/Listbox.js +1 -1
- package/dist/MultiSelectField.js +1 -1
- package/dist/{MultiSelectFieldSync-BxyQiVPQ.js → MultiSelectFieldSync-CXX2F0ru.js} +62 -32
- package/dist/MultiSelectFieldSync-CXX2F0ru.js.map +1 -0
- package/dist/MultiSelectFieldSync.css +72 -65
- package/dist/MultiSelectMenu.js +1 -1
- package/dist/{MultiSelectMenuSync-BJfvZGf3.js → MultiSelectMenuSync-EKtvlL62.js} +218 -47
- package/dist/MultiSelectMenuSync-EKtvlL62.js.map +1 -0
- package/dist/{NumberField-D7YYo4Rl.js → NumberField-BymFZhIJ.js} +4 -4
- package/dist/{NumberField-D7YYo4Rl.js.map → NumberField-BymFZhIJ.js.map} +1 -1
- package/dist/NumberField.js +1 -1
- package/dist/{Page-cELP59Hm.js → Page-C2_Hm27h.js} +8 -8
- package/dist/{Page-cELP59Hm.js.map → Page-C2_Hm27h.js.map} +1 -1
- package/dist/Page.js +1 -1
- package/dist/{Pagination-DTN4FovY.js → Pagination-Bmd4JORe.js} +3 -3
- package/dist/{Pagination-DTN4FovY.js.map → Pagination-Bmd4JORe.js.map} +1 -1
- package/dist/Pagination.js +1 -1
- package/dist/{Popover-B3Vw4lDW.js → Popover-8mTJoMy7.js} +2 -2
- package/dist/{Popover-B3Vw4lDW.js.map → Popover-8mTJoMy7.js.map} +1 -1
- package/dist/Popover.js +1 -1
- package/dist/{ProgressBar-kzCNhaCO.js → ProgressBar-C1CkQHV5.js} +2 -2
- package/dist/{ProgressBar-kzCNhaCO.js.map → ProgressBar-C1CkQHV5.js.map} +1 -1
- package/dist/ProgressBar.js +1 -1
- package/dist/{Radio-CSBetBV6.js → Radio-BcHMk8dD.js} +2 -2
- package/dist/{Radio-CSBetBV6.js.map → Radio-BcHMk8dD.js.map} +1 -1
- package/dist/{Radio-BDE1xGel.js → Radio-D5WyQN2i.js} +16 -16
- package/dist/{Radio-BDE1xGel.js.map → Radio-D5WyQN2i.js.map} +1 -1
- package/dist/Radio.css +40 -37
- package/dist/Radio.js +1 -1
- package/dist/{RichTextEditor-BFFXj0zS.js → RichTextEditor-DstVbYch.js} +8 -8
- package/dist/{RichTextEditor-BFFXj0zS.js.map → RichTextEditor-DstVbYch.js.map} +1 -1
- package/dist/RichTextEditor.js +1 -1
- package/dist/SavedFiltersButton-2qba2Cgu.js +650 -0
- package/dist/SavedFiltersButton-2qba2Cgu.js.map +1 -0
- package/dist/SavedFiltersButton.css +8 -0
- package/dist/SavedFiltersButton.d.ts +1 -0
- package/dist/SavedFiltersButton.js +2 -0
- package/dist/SavedFiltersButton.js.map +1 -0
- package/dist/{SearchField-Dl7sh_M4.js → SearchField-BMHJCVFu.js} +2 -2
- package/dist/{SearchField-Dl7sh_M4.js.map → SearchField-BMHJCVFu.js.map} +1 -1
- package/dist/{SearchField-CO9BHCYB.js → SearchField-fXc_vWEr.js} +3 -3
- package/dist/{SearchField-CO9BHCYB.js.map → SearchField-fXc_vWEr.js.map} +1 -1
- package/dist/SearchField.js +1 -1
- package/dist/{SelectCard-CLCLIBoq.js → SelectCard-BN-LI14f.js} +3 -3
- package/dist/{SelectCard-CLCLIBoq.js.map → SelectCard-BN-LI14f.js.map} +1 -1
- package/dist/SelectCard.js +1 -1
- package/dist/SelectField.js +1 -1
- package/dist/{SelectFieldLabel-Db9w6O6r.js → SelectFieldLabel-UbQT7fDD.js} +2 -2
- package/dist/{SelectFieldLabel-Db9w6O6r.js.map → SelectFieldLabel-UbQT7fDD.js.map} +1 -1
- package/dist/{SelectFieldSync-z8b41JZz.js → SelectFieldSync-DykGkR_w.js} +6 -6
- package/dist/SelectFieldSync-DykGkR_w.js.map +1 -0
- package/dist/SelectMenu.js +1 -1
- package/dist/{SelectMenuSync-Cf1Zradm.js → SelectMenuSync-DTQ8Ofoz.js} +21 -9
- package/dist/SelectMenuSync-DTQ8Ofoz.js.map +1 -0
- package/dist/{SelectOptions-BgT1V6qp.js → SelectOptions-DVSOJwRy.js} +2 -2
- package/dist/{SelectOptions-BgT1V6qp.js.map → SelectOptions-DVSOJwRy.js.map} +1 -1
- package/dist/{SelectTrigger-37HzF-VI.js → SelectTrigger-CHk0KO-P.js} +2 -2
- package/dist/{SelectTrigger-37HzF-VI.js.map → SelectTrigger-CHk0KO-P.js.map} +1 -1
- package/dist/SelectTrigger.js +1 -1
- package/dist/{SelectTriggerBase-4o1cqEbR.js → SelectTriggerBase-B2S5SOZr.js} +137 -41
- package/dist/SelectTriggerBase-B2S5SOZr.js.map +1 -0
- package/dist/SelectTriggerBase.css +46 -42
- package/dist/SelectTriggerBase.module-DsPvTQE7.js +37 -0
- package/dist/SelectTriggerBase.module-DsPvTQE7.js.map +1 -0
- package/dist/{Switch-p4yVJTNy.js → Switch-onmiKoRd.js} +2 -2
- package/dist/{Switch-p4yVJTNy.js.map → Switch-onmiKoRd.js.map} +1 -1
- package/dist/Switch.js +1 -1
- package/dist/Table.js +1 -1
- package/dist/{Text-BgPuOXJM.js → Text-BTzgTpqu.js} +2 -2
- package/dist/{Text-BgPuOXJM.js.map → Text-BTzgTpqu.js.map} +1 -1
- package/dist/Text.js +1 -1
- package/dist/{TextField-DzuM8vvd.js → TextField-WTYZJlX3.js} +2 -2
- package/dist/{TextField-DzuM8vvd.js.map → TextField-WTYZJlX3.js.map} +1 -1
- package/dist/{TextField-D7NyaKId.js → TextField-rVfctM1E.js} +4 -4
- package/dist/{TextField-D7NyaKId.js.map → TextField-rVfctM1E.js.map} +1 -1
- package/dist/TextField.css +22 -58
- package/dist/TextField.js +1 -1
- package/dist/TextField.module-C8FsjTpx.js +23 -0
- package/dist/TextField.module-C8FsjTpx.js.map +1 -0
- package/dist/{Textarea-Dks15Zt3.js → Textarea-PXjppEQ6.js} +3 -3
- package/dist/{Textarea-Dks15Zt3.js.map → Textarea-PXjppEQ6.js.map} +1 -1
- package/dist/Textarea.js +1 -1
- package/dist/{TimeField-lN_5V6-X.js → TimeField-BJPXIv6W.js} +4 -4
- package/dist/{TimeField-lN_5V6-X.js.map → TimeField-BJPXIv6W.js.map} +1 -1
- package/dist/TimeField.js +1 -1
- package/dist/Toast.js +2 -2
- package/dist/{Toaster-3GI_qJxj.js → Toaster-CoChsMD0.js} +3 -3
- package/dist/{Toaster-3GI_qJxj.js.map → Toaster-CoChsMD0.js.map} +1 -1
- package/dist/{Toaster-2pAMQXRk.js → Toaster-DXLc86VD.js} +2 -2
- package/dist/{Toaster-2pAMQXRk.js.map → Toaster-DXLc86VD.js.map} +1 -1
- package/dist/{Toolbar-BRQpvj9U.js → Toolbar-Bt3kShho.js} +4 -4
- package/dist/{Toolbar-BRQpvj9U.js.map → Toolbar-Bt3kShho.js.map} +1 -1
- package/dist/{Toolbar-B0WHsX9W.js → Toolbar-DaUKbbsL.js} +6 -6
- package/dist/{Toolbar-B0WHsX9W.js.map → Toolbar-DaUKbbsL.js.map} +1 -1
- package/dist/Toolbar.js +2 -2
- package/dist/{ToolbarButtonToggle-xvMWRxzC.js → ToolbarButtonToggle-BPu81Wuv.js} +5 -4
- package/dist/ToolbarButtonToggle-BPu81Wuv.js.map +1 -0
- package/dist/{Tooltip-DGo3OWqL.js → Tooltip-yr1D06BE.js} +5 -5
- package/dist/{Tooltip-DGo3OWqL.js.map → Tooltip-yr1D06BE.js.map} +1 -1
- package/dist/Tooltip.css +6 -7
- package/dist/Tooltip.js +1 -1
- package/dist/{YearlessDateInputWithPicker-BhbR5F22.js → YearlessDateInputWithPicker-BIcVgz-J.js} +3 -3
- package/dist/{YearlessDateInputWithPicker-BhbR5F22.js.map → YearlessDateInputWithPicker-BIcVgz-J.js.map} +1 -1
- package/dist/assets/icons/st/batch.svg +1 -1
- package/dist/assets/icons/st/call.svg +1 -1
- package/dist/assets/icons/st/customer.svg +1 -1
- package/dist/assets/icons/st/enterprise_hub.svg +1 -1
- package/dist/assets/icons/st/equipment.svg +1 -1
- package/dist/assets/icons/st/estimate.svg +1 -1
- package/dist/assets/icons/st/full_fluid.svg +1 -1
- package/dist/assets/icons/st/gnav_titan_advisor_active.svg +1 -1
- package/dist/assets/icons/st/gnav_titan_advisor_inactive.svg +1 -1
- package/dist/assets/icons/st/job.svg +1 -1
- package/dist/assets/icons/st/leads.svg +1 -1
- package/dist/assets/icons/st/proposal.svg +1 -1
- package/dist/assets/icons/st/roofing.svg +1 -1
- package/dist/beta.js +13 -12
- package/dist/beta.js.map +1 -1
- package/dist/filter-state-Bx3aYS1r.js +1627 -0
- package/dist/filter-state-Bx3aYS1r.js.map +1 -0
- package/dist/{FilterBar.css → filter-state.css} +19 -33
- package/dist/{index-B6Demgr-.js → index-DVYRUKtW.js} +2 -2
- package/dist/{index-B6Demgr-.js.map → index-DVYRUKtW.js.map} +1 -1
- package/dist/index.js +38 -39
- package/dist/index.js.map +1 -1
- package/dist/src/beta/components/FilterBar/FilterBar.d.ts +12 -10
- package/dist/src/beta/components/FilterBar/FilterDateList.d.ts +47 -0
- package/dist/src/beta/components/FilterBar/FilterDateRange.d.ts +34 -29
- package/dist/src/beta/components/FilterBar/FilterDateSingle.d.ts +31 -22
- package/dist/src/beta/components/FilterBar/FilterDrawer.d.ts +1 -1
- package/dist/src/beta/components/FilterBar/FilterItemWrapper.d.ts +4 -12
- package/dist/src/beta/components/FilterBar/FilterNumericRange.d.ts +29 -0
- package/dist/src/beta/components/FilterBar/FilterPopoverButton.d.ts +86 -0
- package/dist/src/beta/components/FilterBar/FilterToggleButton.d.ts +2 -2
- package/dist/src/beta/components/FilterBar/FilterTriggerButton.d.ts +50 -0
- package/dist/src/beta/components/FilterBar/index.d.ts +1 -1
- package/dist/src/beta/components/FilterBar/internal/FilterGroupContext.d.ts +5 -9
- package/dist/src/beta/components/FilterBar/internal/adapters/asyncMultiSelect.d.ts +6 -0
- package/dist/src/beta/components/FilterBar/internal/adapters/asyncSelect.d.ts +6 -0
- package/dist/src/beta/components/FilterBar/internal/adapters/boolean.d.ts +3 -0
- package/dist/src/beta/components/FilterBar/internal/adapters/custom.d.ts +3 -0
- package/dist/src/beta/components/FilterBar/internal/adapters/date.d.ts +5 -0
- package/dist/src/beta/components/FilterBar/internal/adapters/dateList.d.ts +5 -0
- package/dist/src/beta/components/FilterBar/internal/adapters/dateRange.d.ts +8 -0
- package/dist/src/beta/components/FilterBar/internal/adapters/index.d.ts +15 -0
- package/dist/src/beta/components/FilterBar/internal/adapters/multiSelect.d.ts +6 -0
- package/dist/src/beta/components/FilterBar/internal/adapters/numericRange.d.ts +3 -0
- package/dist/src/beta/components/FilterBar/internal/adapters/singleSelect.d.ts +6 -0
- package/dist/src/beta/components/FilterBar/internal/adapters/types.d.ts +78 -0
- package/dist/src/beta/components/FilterBar/internal/types.d.ts +204 -61
- package/dist/src/beta/components/FilterBar/internal/utils/dateListLibraryOptions.d.ts +29 -0
- package/dist/src/beta/components/FilterBar/internal/utils/filter-state.d.ts +2 -38
- package/dist/src/beta/components/FilterBar/internal/utils/test.d.ts +14 -28
- package/dist/src/beta/components/FilterBar/internal/utils/value-compare.d.ts +14 -0
- package/dist/src/beta/components/MultiSelectField/internal/MultiSelectFieldComboboxMode.d.ts +1 -1
- package/dist/src/beta/components/MultiSelectField/internal/MultiSelectFieldSelectMode.d.ts +1 -1
- package/dist/src/beta/components/MultiSelectField/internal/types.d.ts +4 -2
- package/dist/src/beta/components/MultiSelectField/internal/useComboMultiple.d.ts +7 -5
- package/dist/src/beta/components/MultiSelectField/internal/useSelectModeMultiple.d.ts +5 -2
- package/dist/src/beta/components/MultiSelectField/types.d.ts +21 -36
- package/dist/src/beta/components/MultiSelectMenu/MultiSelectMenu.d.ts +1 -0
- package/dist/src/beta/components/MultiSelectMenu/types.d.ts +52 -12
- package/dist/src/beta/components/SavedFiltersButton/SavedFiltersButton.d.ts +40 -0
- package/dist/src/beta/components/SavedFiltersButton/index.d.ts +2 -0
- package/dist/src/beta/components/SavedFiltersButton/internal/AddSavedFilterDrawer.d.ts +27 -0
- package/dist/src/beta/components/SavedFiltersButton/internal/EditSavedFiltersDrawer.d.ts +38 -0
- package/dist/src/beta/components/SavedFiltersButton/types.d.ts +147 -0
- package/dist/src/beta/components/SelectField/types.d.ts +7 -11
- package/dist/src/beta/components/SelectMenu/internal/useMenuInteraction.d.ts +8 -1
- package/dist/src/beta/components/SelectMenu/types.d.ts +21 -1
- package/dist/src/beta/components/Table/DataTable/internal/DataTablePagination.d.ts +6 -0
- package/dist/src/beta/components/Table/DataTable/types.d.ts +43 -10
- package/dist/src/beta/components/Toolbar/internal/ToolbarContext.d.ts +3 -2
- package/dist/src/beta/components/index.d.ts +1 -0
- package/dist/src/internal/components/MenuFooter/MenuFooter.d.ts +43 -0
- package/dist/src/internal/components/OptionCheckbox.d.ts +6 -0
- package/dist/src/internal/components/OptionContentArea.d.ts +8 -0
- package/dist/src/internal/components/OptionRow.d.ts +10 -0
- package/dist/src/internal/components/OptionsPopover/OptionsPopover.d.ts +4 -4
- package/dist/src/internal/hooks/index.d.ts +2 -0
- package/dist/src/internal/hooks/useBulkActionRunner.d.ts +41 -0
- package/dist/src/internal/hooks/useConfirmationDraft.d.ts +21 -0
- package/dist/src/internal/types/bulkActionTypes.d.ts +39 -0
- package/dist/src/internal/types/confirmationTypes.d.ts +19 -0
- package/dist/src/internal/types/optionContent.d.ts +19 -0
- package/dist/src/internal/types/selectFieldInternalTypes.d.ts +2 -0
- package/dist/{stripInlineMarkdown-D_eHogvh.js → stripInlineMarkdown-C5DNxxwf.js} +2 -2
- package/dist/{stripInlineMarkdown-D_eHogvh.js.map → stripInlineMarkdown-C5DNxxwf.js.map} +1 -1
- package/dist/{syncFilterUtils-Dpp7gt05.js → syncFilterUtils-BEKek64h.js} +497 -458
- package/dist/syncFilterUtils-BEKek64h.js.map +1 -0
- package/dist/syncFilterUtils.css +96 -59
- package/dist/{useDrilldown-bIRsbg1m.js → useDrilldown-KZ9rRsXQ.js} +2 -2
- package/dist/{useDrilldown-bIRsbg1m.js.map → useDrilldown-KZ9rRsXQ.js.map} +1 -1
- package/dist/{Combobox-BXQFOwX4.js → useInfiniteCombobox-CknXmqlQ.js} +188 -13
- package/dist/useInfiniteCombobox-CknXmqlQ.js.map +1 -0
- package/dist/{useMenuInteraction-C4RU5Fdq.js → useMenuInteraction-CpAOHSJu.js} +118 -5
- package/dist/useMenuInteraction-CpAOHSJu.js.map +1 -0
- package/dist/useMenuInteraction.css +28 -0
- package/dist/{useToggleSelection-DBqr4HwT.js → useToggleSelection-B-Z80gy2.js} +53 -4
- package/dist/useToggleSelection-B-Z80gy2.js.map +1 -0
- package/package.json +1 -1
- package/dist/Checkbox.module-DVbXNsaN.js +0 -28
- package/dist/Checkbox.module-DVbXNsaN.js.map +0 -1
- package/dist/Combobox-BXQFOwX4.js.map +0 -1
- package/dist/DateFieldRange-CO2C776E.js.map +0 -1
- package/dist/FilterBar-GjMlLOME.js +0 -1442
- package/dist/FilterBar-GjMlLOME.js.map +0 -1
- package/dist/ListView.module-CKUQP3kf.js.map +0 -1
- package/dist/MultiSelectFieldSync-BxyQiVPQ.js.map +0 -1
- package/dist/MultiSelectMenuSync-BJfvZGf3.js.map +0 -1
- package/dist/SelectFieldSync-z8b41JZz.js.map +0 -1
- package/dist/SelectMenuSync-Cf1Zradm.js.map +0 -1
- package/dist/SelectTriggerBase-4o1cqEbR.js.map +0 -1
- package/dist/SelectTriggerBase.module-BgZSNZfE.js +0 -37
- package/dist/SelectTriggerBase.module-BgZSNZfE.js.map +0 -1
- package/dist/TextField.module-DkZwywjf.js +0 -23
- package/dist/TextField.module-DkZwywjf.js.map +0 -1
- package/dist/ToolbarButtonToggle-xvMWRxzC.js.map +0 -1
- package/dist/src/beta/components/FilterBar/FilterButton.d.ts +0 -30
- package/dist/src/beta/components/FilterBar/FilterSelect.d.ts +0 -29
- package/dist/syncFilterUtils-Dpp7gt05.js.map +0 -1
- package/dist/useInfiniteCombobox-WcRgC9p6.js +0 -179
- package/dist/useInfiniteCombobox-WcRgC9p6.js.map +0 -1
- package/dist/useMenuInteraction-C4RU5Fdq.js.map +0 -1
- package/dist/useToggleSelection-DBqr4HwT.js.map +0 -1
- /package/dist/{Combobox.css → useInfiniteCombobox.css} +0 -0
|
@@ -0,0 +1,147 @@
|
|
|
1
|
+
import { ReactNode } from 'react';
|
|
2
|
+
import { Filter } from '../FilterBar/internal/types';
|
|
3
|
+
/**
|
|
4
|
+
* A consumer-owned preset of filter values. The component never mutates these
|
|
5
|
+
* — it only emits callbacks describing the user's intent (apply, save, update,
|
|
6
|
+
* delete). The consumer holds the source-of-truth list and re-renders
|
|
7
|
+
* `SavedFiltersButton` with the updated array.
|
|
8
|
+
*
|
|
9
|
+
* `filters` is a snapshot of the bar's full filter schema with the preset's
|
|
10
|
+
* values baked in, in the same shape as `FilterBar`'s `filters` prop. That
|
|
11
|
+
* uniformity lets the edit drilldown reuse the FilterBar adapter
|
|
12
|
+
* `renderDrawer` machinery without bespoke per-filter-type rendering.
|
|
13
|
+
*/
|
|
14
|
+
export type SavedFilter = {
|
|
15
|
+
id: string;
|
|
16
|
+
name: string;
|
|
17
|
+
filters: Filter[];
|
|
18
|
+
/**
|
|
19
|
+
* When true, this preset cannot be edited from the Edit drawer — its row
|
|
20
|
+
* renders without an Edit affordance and the drilldown is unreachable.
|
|
21
|
+
* Useful for marking system / seeded presets as immutable while still
|
|
22
|
+
* letting users edit their own.
|
|
23
|
+
*/
|
|
24
|
+
disableEdit?: boolean;
|
|
25
|
+
/**
|
|
26
|
+
* When true, the "Delete Filter" button is omitted from the drilldown
|
|
27
|
+
* footer for this preset. Independent of `disableEdit` — a preset can be
|
|
28
|
+
* editable but not deletable, or vice versa.
|
|
29
|
+
*/
|
|
30
|
+
disableDelete?: boolean;
|
|
31
|
+
};
|
|
32
|
+
/**
|
|
33
|
+
* Text overrides for the auto-managed success / error Alerts that appear on
|
|
34
|
+
* the "Edit Saved Filters" drawer after a save, update, delete, or reorder
|
|
35
|
+
* settles.
|
|
36
|
+
*
|
|
37
|
+
* All entries are optional; unset values fall back to generic defaults.
|
|
38
|
+
*/
|
|
39
|
+
export type SavedFiltersAlertText = {
|
|
40
|
+
saveSuccess?: string;
|
|
41
|
+
saveError?: string;
|
|
42
|
+
updateSuccess?: string;
|
|
43
|
+
updateError?: string;
|
|
44
|
+
deleteSuccess?: string;
|
|
45
|
+
deleteError?: string;
|
|
46
|
+
/**
|
|
47
|
+
* Surfaced on the list view when `onReorderSavedFilters` rejects. No
|
|
48
|
+
* matching `reorderSuccess` — successful reorders don't show an alert,
|
|
49
|
+
* because the new order is its own visible confirmation.
|
|
50
|
+
*/
|
|
51
|
+
reorderError?: string;
|
|
52
|
+
};
|
|
53
|
+
export type SavedFiltersButtonProps = {
|
|
54
|
+
/** The presets to list. Consumer owns the storage. */
|
|
55
|
+
savedFilters: SavedFilter[];
|
|
56
|
+
/**
|
|
57
|
+
* The filters currently committed in the FilterBar (or any analogous
|
|
58
|
+
* filter source). Used as the snapshot payload when the user clicks
|
|
59
|
+
* "Save Current Filter."
|
|
60
|
+
*/
|
|
61
|
+
currentFilters: Filter[];
|
|
62
|
+
/**
|
|
63
|
+
* Called when the user picks a preset from the list. The consumer is
|
|
64
|
+
* responsible for pushing `saved.filters` into their FilterBar (or
|
|
65
|
+
* equivalent) state. The popover closes immediately after click.
|
|
66
|
+
*/
|
|
67
|
+
onApplySavedFilter: (saved: SavedFilter) => void;
|
|
68
|
+
/**
|
|
69
|
+
* Called when the user submits the "Save Current Filter" drawer. The
|
|
70
|
+
* payload `filters` is the snapshot of `currentFilters` at the moment the
|
|
71
|
+
* drawer opened. May return a promise; while pending, the Add button
|
|
72
|
+
* shows a loading state. Rejecting surfaces an error alert; resolving
|
|
73
|
+
* surfaces a success alert and closes the drawer.
|
|
74
|
+
*/
|
|
75
|
+
onSaveCurrentFilter: (payload: {
|
|
76
|
+
name: string;
|
|
77
|
+
filters: Filter[];
|
|
78
|
+
}) => void | Promise<void>;
|
|
79
|
+
/**
|
|
80
|
+
* Called when the user submits the drilldown's "Update Filter" action.
|
|
81
|
+
* Same async / alert semantics as `onSaveCurrentFilter`.
|
|
82
|
+
*/
|
|
83
|
+
onUpdateSavedFilter: (id: string, update: {
|
|
84
|
+
name: string;
|
|
85
|
+
filters: Filter[];
|
|
86
|
+
}) => void | Promise<void>;
|
|
87
|
+
/**
|
|
88
|
+
* Called when the user clicks "Delete Filter" in the drilldown. Same
|
|
89
|
+
* async / alert semantics as `onSaveCurrentFilter`.
|
|
90
|
+
*/
|
|
91
|
+
onDeleteSavedFilter: (id: string) => void | Promise<void>;
|
|
92
|
+
/**
|
|
93
|
+
* Optional validation for the name field in the save / edit flows. Return
|
|
94
|
+
* an error string to block submit (Add / Update is disabled); return
|
|
95
|
+
* `undefined` when valid. The optional `currentId` is set during an edit
|
|
96
|
+
* flow so the consumer can permit the row's own name in uniqueness
|
|
97
|
+
* checks.
|
|
98
|
+
*/
|
|
99
|
+
validateName?: (name: string, currentId?: string) => string | undefined;
|
|
100
|
+
/** Optional override for the auto-managed alert text. */
|
|
101
|
+
alertText?: SavedFiltersAlertText;
|
|
102
|
+
/**
|
|
103
|
+
* Optional id of the preset that is currently applied. When set, the
|
|
104
|
+
* matching row in the popover renders with a check affordance. The
|
|
105
|
+
* component does no comparison itself — the consumer is responsible for
|
|
106
|
+
* tracking which preset (if any) reflects the current filter state, and
|
|
107
|
+
* for clearing the id when the filters drift (e.g. the user edited a
|
|
108
|
+
* filter directly).
|
|
109
|
+
*
|
|
110
|
+
* Defaults to `undefined`, in which case no row is marked active.
|
|
111
|
+
*/
|
|
112
|
+
activeSavedFilterId?: string;
|
|
113
|
+
/**
|
|
114
|
+
* Optional trigger label override.
|
|
115
|
+
* @default "Saved Filters"
|
|
116
|
+
*/
|
|
117
|
+
label?: string;
|
|
118
|
+
/**
|
|
119
|
+
* Optional override for the popover's empty-state content, shown when
|
|
120
|
+
* `savedFilters` is empty. Defaults to "No saved filters yet."
|
|
121
|
+
*
|
|
122
|
+
* - Pass a `string` to keep the default subdued/small `Text` styling — only
|
|
123
|
+
* the wording changes.
|
|
124
|
+
* - Pass any other `ReactNode` (a CTA, an illustration, a styled block) to
|
|
125
|
+
* take full control of the empty-state content.
|
|
126
|
+
*
|
|
127
|
+
* Separately, when `savedFilters` is empty the "Edit Saved Filters" footer
|
|
128
|
+
* button is disabled, so this empty-state is the only thing the user sees
|
|
129
|
+
* in the popover.
|
|
130
|
+
*/
|
|
131
|
+
emptyState?: ReactNode;
|
|
132
|
+
/**
|
|
133
|
+
* Called when the user drags a preset to a new position in the "Edit Saved
|
|
134
|
+
* Filters" drawer. The payload is the full list of preset ids in their new
|
|
135
|
+
* order; the consumer is responsible for re-sorting their `savedFilters`
|
|
136
|
+
* array to match.
|
|
137
|
+
*
|
|
138
|
+
* Providing this callback opts the Edit drawer into drag-to-reorder UI —
|
|
139
|
+
* each row picks up a drag handle and keyboard-accessible drop affordance.
|
|
140
|
+
* Omitting it renders the list as a static stack with no handles.
|
|
141
|
+
*
|
|
142
|
+
* May return a promise. A rejection surfaces as a danger alert on the
|
|
143
|
+
* list view using `alertText.reorderError` (or the thrown Error's message
|
|
144
|
+
* when present).
|
|
145
|
+
*/
|
|
146
|
+
onReorderSavedFilters?: (orderedIds: string[]) => void | Promise<void>;
|
|
147
|
+
};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { AriaAttributes, CSSProperties, ReactElement, ReactNode } from 'react';
|
|
2
2
|
import { AiMarkWithTooltipOrPopoverProps, LayoutUtilProps, Size } from '../../../types';
|
|
3
|
-
import {
|
|
3
|
+
import { OptionContent } from '../../../internal/types/optionContent';
|
|
4
4
|
import { AddNewItemProps } from '../../../internal/types/addNewItemTypes';
|
|
5
5
|
/**
|
|
6
6
|
* Configuration options for the SelectField cache.
|
|
@@ -21,6 +21,11 @@ export type SelectFieldHandle = {
|
|
|
21
21
|
invalidate: () => void;
|
|
22
22
|
};
|
|
23
23
|
export type SelectFieldGroupByValue = string | number;
|
|
24
|
+
/**
|
|
25
|
+
* Rich content configuration for a SelectField option row.
|
|
26
|
+
* Controls the avatar, icon, description, and chip display within an option.
|
|
27
|
+
*/
|
|
28
|
+
export type SelectFieldOptionContent = OptionContent;
|
|
24
29
|
export type SelectFieldOption = {
|
|
25
30
|
id: string | number;
|
|
26
31
|
label: string;
|
|
@@ -28,16 +33,7 @@ export type SelectFieldOption = {
|
|
|
28
33
|
group?: SelectFieldGroupByValue;
|
|
29
34
|
disabled?: boolean;
|
|
30
35
|
extra?: Record<string, unknown>;
|
|
31
|
-
content?:
|
|
32
|
-
title?: string;
|
|
33
|
-
description?: string;
|
|
34
|
-
chips?: Pick<ChipProps, "label" | "color" | "textWrap">[];
|
|
35
|
-
avatar?: Pick<AvatarProps, "name" | "status" | "color" | "image">;
|
|
36
|
-
icon?: Pick<IconProps, "svg" | "color"> & {
|
|
37
|
-
/** Accessible label for the icon. When omitted, the icon is treated as decorative. */
|
|
38
|
-
label?: string;
|
|
39
|
-
};
|
|
40
|
-
};
|
|
36
|
+
content?: SelectFieldOptionContent;
|
|
41
37
|
};
|
|
42
38
|
export type SelectFieldGroupedOption = SelectFieldOption & {
|
|
43
39
|
group: SelectFieldGroupByValue;
|
|
@@ -12,6 +12,13 @@ export type UseMenuInteractionConfig = {
|
|
|
12
12
|
id: string;
|
|
13
13
|
triggerRef: RefObject<HTMLButtonElement>;
|
|
14
14
|
label: string;
|
|
15
|
+
/**
|
|
16
|
+
* Controlled open state. The consumer owns `[isOpen, setIsOpen]` so other
|
|
17
|
+
* hooks in the same render (e.g. `useConfirmationDraft`) can read the same
|
|
18
|
+
* value without a one-render lag.
|
|
19
|
+
*/
|
|
20
|
+
isOpen: boolean;
|
|
21
|
+
setIsOpen: (open: boolean) => void;
|
|
15
22
|
onImplicitClose?: () => void;
|
|
16
23
|
onExplicitClose?: () => void;
|
|
17
24
|
};
|
|
@@ -56,7 +63,7 @@ type ItemReturnProps = {
|
|
|
56
63
|
};
|
|
57
64
|
export type GetMenuPropsFn = (opts?: MenuPropsArg) => MenuReturnProps;
|
|
58
65
|
export type GetItemPropsFn = (opts: ItemPropsArg) => ItemReturnProps;
|
|
59
|
-
export declare const useMenuInteraction: ({ items, sectionsMeta: _sectionsMeta, onItemActivate, selectedItemIds, displayAs: _displayAs, closeOnActivate, disabled, id, triggerRef, label, onImplicitClose, onExplicitClose, }: UseMenuInteractionConfig) => {
|
|
66
|
+
export declare const useMenuInteraction: ({ items, sectionsMeta: _sectionsMeta, onItemActivate, selectedItemIds, displayAs: _displayAs, closeOnActivate, disabled, id, triggerRef, label, isOpen, setIsOpen, onImplicitClose, onExplicitClose, }: UseMenuInteractionConfig) => {
|
|
60
67
|
isOpen: boolean;
|
|
61
68
|
openMenu: () => void;
|
|
62
69
|
closeMenu: (options?: {
|
|
@@ -1,6 +1,11 @@
|
|
|
1
1
|
import { KeyboardEvent, ReactElement, RefObject } from 'react';
|
|
2
|
-
import { SelectFieldCacheOptions, SelectFieldEagerLoader, SelectFieldGroupByValue, SelectFieldGroupLazyLoader, SelectFieldGroupedOption, SelectFieldOffsetLazyLoader, SelectFieldOption, SelectFieldPageLazyLoader, SelectFieldPinnedOptions, SelectFieldSearchProps } from '../SelectField/types';
|
|
2
|
+
import { SelectFieldCacheOptions, SelectFieldEagerLoader, SelectFieldGroupByValue, SelectFieldGroupLazyLoader, SelectFieldGroupedOption, SelectFieldOffsetLazyLoader, SelectFieldOption, SelectFieldOptionContent, SelectFieldPageLazyLoader, SelectFieldPinnedOptions, SelectFieldSearchProps } from '../SelectField/types';
|
|
3
3
|
import { AddNewItemProps } from '../../../internal/types/addNewItemTypes';
|
|
4
|
+
/**
|
|
5
|
+
* Rich content configuration for a SelectMenu option row.
|
|
6
|
+
* Controls the avatar, icon, description, and chip display within an option.
|
|
7
|
+
*/
|
|
8
|
+
export type SelectMenuOptionContent = SelectFieldOptionContent;
|
|
4
9
|
export type SelectMenuOption = SelectFieldOption;
|
|
5
10
|
export type SelectMenuGroupByValue = SelectFieldGroupByValue;
|
|
6
11
|
export type SelectMenuGroupedOption = SelectFieldGroupedOption;
|
|
@@ -125,6 +130,21 @@ type SelectMenuCommonProps = {
|
|
|
125
130
|
* @default 320
|
|
126
131
|
*/
|
|
127
132
|
popoverWidth?: "reference" | number | string;
|
|
133
|
+
/**
|
|
134
|
+
* Configures a "Clear" button in the menu footer. Presence of this prop
|
|
135
|
+
* enables the button; omit to suppress.
|
|
136
|
+
*
|
|
137
|
+
* - `onClick` — called when the user clicks Clear.
|
|
138
|
+
* - `label` — button label (default "Clear").
|
|
139
|
+
* - `disabled` — whether the button is inert. Filter adapters typically
|
|
140
|
+
* tie this to `!isActive(filter)` so the button is dim when nothing is
|
|
141
|
+
* selected.
|
|
142
|
+
*/
|
|
143
|
+
clear?: {
|
|
144
|
+
onClick: () => void;
|
|
145
|
+
label?: string;
|
|
146
|
+
disabled?: boolean;
|
|
147
|
+
};
|
|
128
148
|
} & SelectMenuSearchProps & AddNewItemProps;
|
|
129
149
|
type SelectMenuGroupingProps = {
|
|
130
150
|
/**
|
|
@@ -1,3 +1,9 @@
|
|
|
1
1
|
import { PaginationProps } from '../../../../..';
|
|
2
|
+
type DataTableCursorPaginationProps = Pick<PaginationProps, "page" | "itemsPerPage" | "onPageChange" | "onItemsPerPageChange" | "itemsPerPageOptions"> & {
|
|
3
|
+
hasNextPage?: boolean;
|
|
4
|
+
hasPrevPage?: boolean;
|
|
5
|
+
};
|
|
2
6
|
export type DataTablePaginationProps = Pick<PaginationProps, "page" | "itemsPerPage" | "totalItemCount" | "showCount" | "onPageChange" | "onItemsPerPageChange" | "itemsPerPageOptions">;
|
|
3
7
|
export declare const DataTablePagination: ({ showCount, ...props }: DataTablePaginationProps) => import("react/jsx-runtime").JSX.Element;
|
|
8
|
+
export declare const DataTableCursorPagination: ({ page, itemsPerPage, itemsPerPageOptions, hasNextPage, hasPrevPage, onPageChange, onItemsPerPageChange, }: DataTableCursorPaginationProps) => import("react/jsx-runtime").JSX.Element;
|
|
9
|
+
export {};
|
|
@@ -53,9 +53,12 @@ export type DataTableCacheOptions = {
|
|
|
53
53
|
maxSize?: number;
|
|
54
54
|
};
|
|
55
55
|
/**
|
|
56
|
-
*
|
|
56
|
+
* Pagination behavior for DataTable.
|
|
57
|
+
* "offset" uses numbered pages with a known total row count.
|
|
58
|
+
* "cursor" uses previous/next availability for unknown-total pagination.
|
|
57
59
|
*/
|
|
58
|
-
export type
|
|
60
|
+
export type DataTablePaginationMode = "offset" | "cursor";
|
|
61
|
+
type DataTablePaginationBaseConfig<T> = {
|
|
59
62
|
/**
|
|
60
63
|
* Number of rows displayed per page
|
|
61
64
|
* @default 25
|
|
@@ -96,28 +99,57 @@ export type DataTablePaginationConfig<T> = {
|
|
|
96
99
|
* Callback when page changes. Receives the new page index (0-based)
|
|
97
100
|
*/
|
|
98
101
|
onPageChange?: (pageIndex: number) => void;
|
|
102
|
+
/**
|
|
103
|
+
* Key that triggers data refetch when changed.
|
|
104
|
+
* Useful for forcing refetch when external filters change.
|
|
105
|
+
* When changed, the page index automatically resets to 0.
|
|
106
|
+
*/
|
|
107
|
+
refreshKey?: string | number;
|
|
108
|
+
/**
|
|
109
|
+
* Configuration for caching loadPageData results.
|
|
110
|
+
* Caching is enabled by default. Set `{ enabled: false }` to disable.
|
|
111
|
+
*/
|
|
112
|
+
cache?: DataTableCacheOptions;
|
|
113
|
+
};
|
|
114
|
+
export type DataTableOffsetPaginationConfig<T> = DataTablePaginationBaseConfig<T> & {
|
|
115
|
+
/**
|
|
116
|
+
* Offset pagination mode.
|
|
117
|
+
* @default "offset"
|
|
118
|
+
*/
|
|
119
|
+
mode?: "offset";
|
|
99
120
|
/**
|
|
100
121
|
* Whether to display the item count information in pagination
|
|
101
122
|
* @default true
|
|
102
123
|
*/
|
|
103
124
|
showCount?: boolean;
|
|
104
125
|
/**
|
|
105
|
-
* Total number of rows across all pages. Falls back to data.length if not provided.
|
|
126
|
+
* Total number of rows across all pages in offset mode. Falls back to data.length if not provided.
|
|
106
127
|
* Useful for server-side pagination scenarios where totalRowCount may differ from data array length.
|
|
107
128
|
*/
|
|
108
129
|
totalRowCount?: number;
|
|
130
|
+
hasNextPage?: never;
|
|
131
|
+
hasPrevPage?: never;
|
|
132
|
+
};
|
|
133
|
+
export type DataTableCursorPaginationConfig<T> = DataTablePaginationBaseConfig<T> & {
|
|
109
134
|
/**
|
|
110
|
-
*
|
|
111
|
-
* Useful for forcing refetch when external filters change.
|
|
112
|
-
* When changed, the page index automatically resets to 0.
|
|
135
|
+
* Cursor pagination mode for datasets where the total row count is unknown.
|
|
113
136
|
*/
|
|
114
|
-
|
|
137
|
+
mode: "cursor";
|
|
115
138
|
/**
|
|
116
|
-
*
|
|
117
|
-
* Caching is enabled by default. Set `{ enabled: false }` to disable.
|
|
139
|
+
* Whether another page is available.
|
|
118
140
|
*/
|
|
119
|
-
|
|
141
|
+
hasNextPage: boolean;
|
|
142
|
+
/**
|
|
143
|
+
* Whether a previous page is available.
|
|
144
|
+
*/
|
|
145
|
+
hasPrevPage: boolean;
|
|
146
|
+
showCount?: never;
|
|
147
|
+
totalRowCount?: never;
|
|
120
148
|
};
|
|
149
|
+
/**
|
|
150
|
+
* Configuration for pagination in DataTable
|
|
151
|
+
*/
|
|
152
|
+
export type DataTablePaginationConfig<T> = DataTableOffsetPaginationConfig<T> | DataTableCursorPaginationConfig<T>;
|
|
121
153
|
/**
|
|
122
154
|
* Ref handle for DataTable component
|
|
123
155
|
* @property {function} refresh - Triggers a data refetch and resets the page index to 0. Useful for manually refreshing data after external changes (e.g., after a mutation).
|
|
@@ -135,3 +167,4 @@ export type DataTableRef = {
|
|
|
135
167
|
*/
|
|
136
168
|
clearCache: () => void;
|
|
137
169
|
};
|
|
170
|
+
export {};
|
|
@@ -25,9 +25,10 @@ export type ToolbarContextProps = {
|
|
|
25
25
|
*/
|
|
26
26
|
orderedIds?: string[];
|
|
27
27
|
/**
|
|
28
|
-
* Overflow behavior type
|
|
28
|
+
* Overflow behavior type. Defaults to wrap behavior when omitted.
|
|
29
|
+
* @default "wrap"
|
|
29
30
|
*/
|
|
30
|
-
overflow
|
|
31
|
+
overflow?: ToolbarOverflowTypes;
|
|
31
32
|
/**
|
|
32
33
|
* Size of toolbar child components
|
|
33
34
|
*/
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
import { ReactNode } from 'react';
|
|
2
|
+
export type MenuFooterClearConfig = {
|
|
3
|
+
onClick: () => void;
|
|
4
|
+
label?: string;
|
|
5
|
+
disabled?: boolean;
|
|
6
|
+
};
|
|
7
|
+
export type MenuFooterConfirmationConfig = {
|
|
8
|
+
onApply: () => void;
|
|
9
|
+
onCancel: () => void;
|
|
10
|
+
applyLabel?: string;
|
|
11
|
+
cancelLabel?: string;
|
|
12
|
+
applyDisabled?: boolean;
|
|
13
|
+
};
|
|
14
|
+
export type MenuFooterProps = {
|
|
15
|
+
/** Clear-selection button config. Omit to suppress. */
|
|
16
|
+
clear?: MenuFooterClearConfig;
|
|
17
|
+
/** Apply/Cancel pair config. Omit when not in confirmation mode. */
|
|
18
|
+
confirmation?: MenuFooterConfirmationConfig;
|
|
19
|
+
/**
|
|
20
|
+
* Pre-rendered add-new affordance (AddNewItemButton or similar). Layout owns
|
|
21
|
+
* its row vs. inline placement; the caller just provides the node.
|
|
22
|
+
*/
|
|
23
|
+
addNew?: ReactNode;
|
|
24
|
+
};
|
|
25
|
+
/**
|
|
26
|
+
* MenuFooter composes the footer of a menu popover/dialog from up to three
|
|
27
|
+
* optional pieces: a clear-selection button, an Apply/Cancel pair, and an
|
|
28
|
+
* add-new affordance.
|
|
29
|
+
*
|
|
30
|
+
* Layout rules:
|
|
31
|
+
* - clear + confirmation + addNew → [addNew full-width row] / [clear | apply cancel]
|
|
32
|
+
* - clear + confirmation → [clear | apply cancel]
|
|
33
|
+
* - clear + addNew → [addNew] / [clear] (stacked, both full-width)
|
|
34
|
+
* - clear → [clear] (full-width)
|
|
35
|
+
* - confirmation + addNew → [addNew | apply cancel] (addNew on the leading side)
|
|
36
|
+
* - confirmation → [apply | cancel]
|
|
37
|
+
* - addNew → [addNew]
|
|
38
|
+
* - (none) → null
|
|
39
|
+
*/
|
|
40
|
+
export declare const MenuFooter: {
|
|
41
|
+
({ clear, confirmation, addNew, }: MenuFooterProps): import("react/jsx-runtime").JSX.Element | null;
|
|
42
|
+
displayName: string;
|
|
43
|
+
};
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { ReactNode } from 'react';
|
|
2
|
+
import { OptionContent } from '../types/optionContent';
|
|
3
|
+
export type OptionContentAreaProps = {
|
|
4
|
+
label: string;
|
|
5
|
+
content?: OptionContent;
|
|
6
|
+
children?: ReactNode;
|
|
7
|
+
};
|
|
8
|
+
export declare function OptionContentArea({ label, content, children, }: OptionContentAreaProps): import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { ComponentPropsWithoutRef, ReactNode } from 'react';
|
|
2
|
+
export type OptionRowProps = ComponentPropsWithoutRef<"div"> & {
|
|
3
|
+
disabled?: boolean;
|
|
4
|
+
};
|
|
5
|
+
export declare const OptionRow: import('react').ForwardRefExoticComponent<Omit<import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & {
|
|
6
|
+
disabled?: boolean;
|
|
7
|
+
} & import('react').RefAttributes<HTMLDivElement>>;
|
|
8
|
+
export declare const OptionRowSideContent: import('react').ForwardRefExoticComponent<Omit<import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & {
|
|
9
|
+
children: ReactNode;
|
|
10
|
+
} & import('react').RefAttributes<HTMLDivElement>>;
|
|
@@ -5,10 +5,10 @@ export type OptionsPopoverProps = {
|
|
|
5
5
|
referenceElement: RefObject<HTMLElement>;
|
|
6
6
|
open: boolean;
|
|
7
7
|
/**
|
|
8
|
-
* Fired when the popover should close
|
|
9
|
-
*
|
|
10
|
-
*
|
|
11
|
-
*
|
|
8
|
+
* Fired when the popover should close (click-outside, focus-out, or
|
|
9
|
+
* Escape). On Escape, the popover restores focus to `referenceElement`
|
|
10
|
+
* before invoking this callback; for other paths focus has already moved
|
|
11
|
+
* elsewhere intentionally.
|
|
12
12
|
*/
|
|
13
13
|
onClose: () => void;
|
|
14
14
|
/** Controls the popover width strategy.
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
type BulkComputeResult<T> = T[] | Promise<T[]>;
|
|
2
|
+
export type UseBulkActionRunnerOptions<T> = {
|
|
3
|
+
/** Sets the draft (or commits when confirmation is off). */
|
|
4
|
+
setDraft: (next: T[]) => void;
|
|
5
|
+
};
|
|
6
|
+
export type UseBulkActionRunnerResult<T> = {
|
|
7
|
+
/**
|
|
8
|
+
* True while a bulk-action promise is in flight. While true, callers should
|
|
9
|
+
* disable option rows, override the bulk row's checkState to "loading", and
|
|
10
|
+
* disable Apply.
|
|
11
|
+
*/
|
|
12
|
+
pending: boolean;
|
|
13
|
+
/**
|
|
14
|
+
* Run a bulk action. If `compute` returns an array synchronously, the draft
|
|
15
|
+
* is updated immediately. If it returns a promise, the runner enters the
|
|
16
|
+
* pending state until resolve/reject. Stale resolutions (those that finish
|
|
17
|
+
* after another draft mutation or another bulk run, or after `reset()`) are
|
|
18
|
+
* silently discarded.
|
|
19
|
+
*/
|
|
20
|
+
runBulk: (compute: (current: T[]) => BulkComputeResult<T>, current: T[]) => void;
|
|
21
|
+
/**
|
|
22
|
+
* Wrap an external draft mutation so that any in-flight bulk promise's
|
|
23
|
+
* eventual resolution is discarded. Use this in place of the raw setDraft
|
|
24
|
+
* whenever the user mutates the draft outside of a bulk action (option
|
|
25
|
+
* click, etc.) so that a slow Select-All-fetching promise can't clobber a
|
|
26
|
+
* subsequent click.
|
|
27
|
+
*/
|
|
28
|
+
setDraftAndBump: (next: T[]) => void;
|
|
29
|
+
/**
|
|
30
|
+
* Discard any in-flight bulk resolution. Call when the menu closes so that
|
|
31
|
+
* a promise resolving after close can't apply to the next menu instance.
|
|
32
|
+
*/
|
|
33
|
+
reset: () => void;
|
|
34
|
+
};
|
|
35
|
+
/**
|
|
36
|
+
* Runs Select-All / Select-Filtered-style "bulk action" computations against
|
|
37
|
+
* the controlled or draft selection, with support for both synchronous and
|
|
38
|
+
* asynchronous results, and stale-result discard via a monotonic generation.
|
|
39
|
+
*/
|
|
40
|
+
export declare function useBulkActionRunner<T>({ setDraft, }: UseBulkActionRunnerOptions<T>): UseBulkActionRunnerResult<T>;
|
|
41
|
+
export {};
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
export type UseConfirmationDraftOptions<T> = {
|
|
2
|
+
value: T;
|
|
3
|
+
onCommit: (value: T) => void;
|
|
4
|
+
isOpen: boolean;
|
|
5
|
+
enabled: boolean;
|
|
6
|
+
isEqual?: (a: T, b: T) => boolean;
|
|
7
|
+
};
|
|
8
|
+
export type UseConfirmationDraftResult<T> = {
|
|
9
|
+
displayValue: T;
|
|
10
|
+
setDraft: (next: T) => void;
|
|
11
|
+
apply: () => void;
|
|
12
|
+
cancel: () => void;
|
|
13
|
+
isDirty: boolean;
|
|
14
|
+
};
|
|
15
|
+
/**
|
|
16
|
+
* Holds a draft copy of a controlled value while a menu is open, so that
|
|
17
|
+
* selections can be confirmed (`apply`) or discarded (`cancel`). When
|
|
18
|
+
* `enabled` is false, `setDraft` passes through directly to `onCommit` and
|
|
19
|
+
* `displayValue` always reflects the controlled `value`.
|
|
20
|
+
*/
|
|
21
|
+
export declare function useConfirmationDraft<T>({ value, onCommit, isOpen, enabled, isEqual, }: UseConfirmationDraftOptions<T>): UseConfirmationDraftResult<T>;
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
import { CheckState } from '../../types';
|
|
2
|
+
import { SelectFieldOption } from '../../beta/components/SelectField/types';
|
|
3
|
+
/**
|
|
4
|
+
* Configuration for the "Select All" / "Select Filtered" rows in a
|
|
5
|
+
* MultiSelectMenu or MultiSelectField.
|
|
6
|
+
*
|
|
7
|
+
* Choose exactly one of `onClick` or `compute`:
|
|
8
|
+
*
|
|
9
|
+
* - **`onClick`** — the row fires the callback; the consumer commits the next
|
|
10
|
+
* selection themselves via `onSelectedOptionsChange`. Simple and familiar.
|
|
11
|
+
* When `confirmation` is enabled, `onClick` bypasses the menu's draft layer
|
|
12
|
+
* (the menu warns once in development).
|
|
13
|
+
* - **`compute`** — the menu invokes `compute(currentDraft)` and writes the
|
|
14
|
+
* result into the draft (or commits it, when confirmation is off). `compute`
|
|
15
|
+
* may return a `Promise<SelectFieldOption[]>`; while the promise is pending
|
|
16
|
+
* the menu shows a loading state, disables all option rows, and disables
|
|
17
|
+
* Apply.
|
|
18
|
+
*/
|
|
19
|
+
export type BulkActionConfig = {
|
|
20
|
+
label?: string;
|
|
21
|
+
checkState: boolean | CheckState;
|
|
22
|
+
onClick: () => void;
|
|
23
|
+
compute?: never;
|
|
24
|
+
} | {
|
|
25
|
+
label?: string;
|
|
26
|
+
checkState: boolean | CheckState;
|
|
27
|
+
compute: (current: SelectFieldOption[]) => SelectFieldOption[] | Promise<SelectFieldOption[]>;
|
|
28
|
+
onClick?: never;
|
|
29
|
+
};
|
|
30
|
+
/**
|
|
31
|
+
* Normalized form used internally after `checkState`'s `boolean` shorthand has
|
|
32
|
+
* been resolved to a `CheckState`.
|
|
33
|
+
*/
|
|
34
|
+
export type ResolvedBulkAction = {
|
|
35
|
+
label?: string;
|
|
36
|
+
checkState: CheckState;
|
|
37
|
+
onClick?: () => void;
|
|
38
|
+
compute?: (current: SelectFieldOption[]) => SelectFieldOption[] | Promise<SelectFieldOption[]>;
|
|
39
|
+
};
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Opt-in confirmation mode for Select* and MultiSelect* components.
|
|
3
|
+
*
|
|
4
|
+
* When set, selection changes are held as a draft inside the open menu and
|
|
5
|
+
* only commit to the controlled `value` when the user clicks Apply. Dismissing
|
|
6
|
+
* the menu (Escape, click outside, toggling the trigger) discards the draft.
|
|
7
|
+
*
|
|
8
|
+
* `true` enables the default Apply/Cancel labels. Pass an object to customize.
|
|
9
|
+
*/
|
|
10
|
+
export type ConfirmationProp = boolean | {
|
|
11
|
+
applyLabel?: string;
|
|
12
|
+
cancelLabel?: string;
|
|
13
|
+
};
|
|
14
|
+
export type ResolvedConfirmation = {
|
|
15
|
+
enabled: boolean;
|
|
16
|
+
applyLabel: string;
|
|
17
|
+
cancelLabel: string;
|
|
18
|
+
};
|
|
19
|
+
export declare const resolveConfirmation: (prop: ConfirmationProp | undefined) => ResolvedConfirmation;
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { AvatarProps, ChipProps, IconProps } from '../../components';
|
|
2
|
+
/**
|
|
3
|
+
* Shared content shape for option rows in SelectField, MultiSelectField, and TreeSelectField.
|
|
4
|
+
* @property title - Overrides the option label text when provided.
|
|
5
|
+
* @property description - Secondary text displayed below the title in a subdued color.
|
|
6
|
+
* @property chips - Tags displayed below the description.
|
|
7
|
+
* @property avatar - Avatar displayed to the left of the text content.
|
|
8
|
+
* @property icon - Icon displayed to the right of the text content.
|
|
9
|
+
*/
|
|
10
|
+
export type OptionContent = {
|
|
11
|
+
title?: string;
|
|
12
|
+
description?: string;
|
|
13
|
+
chips?: Pick<ChipProps, "label" | "color" | "textWrap">[];
|
|
14
|
+
avatar?: Pick<AvatarProps, "name" | "status" | "color" | "image">;
|
|
15
|
+
icon?: Pick<IconProps, "svg" | "color"> & {
|
|
16
|
+
/** Accessible label for the icon. When omitted, the icon is treated as decorative. */
|
|
17
|
+
label?: string;
|
|
18
|
+
};
|
|
19
|
+
};
|
|
@@ -2,6 +2,7 @@ import { ReactElement, ReactNode, RefObject } from 'react';
|
|
|
2
2
|
import { AiMarkWithTooltipOrPopoverProps, CheckState } from '../../types';
|
|
3
3
|
import { SelectFieldOption, SelectFieldProps } from '../../beta/components/SelectField/types';
|
|
4
4
|
import { AddNewItemProps } from './addNewItemTypes';
|
|
5
|
+
import { ResolvedConfirmation } from './confirmationTypes';
|
|
5
6
|
/**
|
|
6
7
|
* Metadata about list sections for rendering purposes.
|
|
7
8
|
* Used by SelectOptions, MultiSelectOptions, and their Menu counterparts to render section headers and dividers.
|
|
@@ -63,6 +64,7 @@ export type SelectFieldBaseInternalProps = {
|
|
|
63
64
|
initialLoadPerformed: boolean;
|
|
64
65
|
setInitialLoadPerformed: (val: boolean) => void;
|
|
65
66
|
inputWrapperRef: RefObject<HTMLDivElement>;
|
|
67
|
+
confirmation?: ResolvedConfirmation;
|
|
66
68
|
} & AddNewItemProps;
|
|
67
69
|
export type SelectFieldComboboxInternalProps = SelectFieldBaseInternalProps & {
|
|
68
70
|
debounceMs: number;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { I as INLINE_MARKDOWN_REGEX } from './FieldLabel-
|
|
1
|
+
import { I as INLINE_MARKDOWN_REGEX } from './FieldLabel-D1qPAGtB.js';
|
|
2
2
|
|
|
3
3
|
const stripInlineMarkdown = (str) => {
|
|
4
4
|
const parts = [];
|
|
@@ -22,4 +22,4 @@ const stripInlineMarkdown = (str) => {
|
|
|
22
22
|
};
|
|
23
23
|
|
|
24
24
|
export { stripInlineMarkdown as s };
|
|
25
|
-
//# sourceMappingURL=stripInlineMarkdown-
|
|
25
|
+
//# sourceMappingURL=stripInlineMarkdown-C5DNxxwf.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"stripInlineMarkdown-
|
|
1
|
+
{"version":3,"file":"stripInlineMarkdown-C5DNxxwf.js","sources":["../src/internal/functions/stripInlineMarkdown.ts"],"sourcesContent":["import { INLINE_MARKDOWN_REGEX } from \"../utils/inlineMarkdownRegex\";\n\n/**\n * Strips inline markdown syntax from a string, returning plain text.\n * Intended for accessibility contexts (e.g. `aria-label`) where only plain text is appropriate.\n *\n * @param str - The string to strip\n * @returns The string with all inline markdown syntax removed\n */\nexport const stripInlineMarkdown = (str: string): string => {\n const parts: string[] = [];\n let lastIndex = 0;\n\n INLINE_MARKDOWN_REGEX.lastIndex = 0;\n let match: RegExpExecArray | null;\n\n while ((match = INLINE_MARKDOWN_REGEX.exec(str)) !== null) {\n if (match.index > lastIndex) {\n parts.push(str.substring(lastIndex, match.index));\n }\n\n const savedIndex = INLINE_MARKDOWN_REGEX.lastIndex;\n const inner =\n match[1] ?? match[2] ?? match[3] ?? match[4] ?? match[5] ?? \"\";\n\n // code spans don't support nested markdown, matching parseInlineMarkdown behavior\n parts.push(match[5] ? inner : stripInlineMarkdown(inner));\n\n INLINE_MARKDOWN_REGEX.lastIndex = savedIndex;\n lastIndex = savedIndex;\n }\n\n if (lastIndex < str.length) {\n parts.push(str.substring(lastIndex));\n }\n\n return parts.join(\"\");\n};\n"],"names":[],"mappings":";;AASO,MAAM,mBAAA,GAAsB,CAAC,GAAA,KAAwB;AAC1D,EAAA,MAAM,QAAkB,EAAC;AACzB,EAAA,IAAI,SAAA,GAAY,CAAA;AAEhB,EAAA,qBAAA,CAAsB,SAAA,GAAY,CAAA;AAClC,EAAA,IAAI,KAAA;AAEJ,EAAA,OAAA,CAAQ,KAAA,GAAQ,qBAAA,CAAsB,IAAA,CAAK,GAAG,OAAO,IAAA,EAAM;AACzD,IAAA,IAAI,KAAA,CAAM,QAAQ,SAAA,EAAW;AAC3B,MAAA,KAAA,CAAM,KAAK,GAAA,CAAI,SAAA,CAAU,SAAA,EAAW,KAAA,CAAM,KAAK,CAAC,CAAA;AAAA,IAClD;AAEA,IAAA,MAAM,aAAa,qBAAA,CAAsB,SAAA;AACzC,IAAA,MAAM,KAAA,GACJ,KAAA,CAAM,CAAC,CAAA,IAAK,MAAM,CAAC,CAAA,IAAK,KAAA,CAAM,CAAC,KAAK,KAAA,CAAM,CAAC,CAAA,IAAK,KAAA,CAAM,CAAC,CAAA,IAAK,EAAA;AAG9D,IAAA,KAAA,CAAM,KAAK,KAAA,CAAM,CAAC,IAAI,KAAA,GAAQ,mBAAA,CAAoB,KAAK,CAAC,CAAA;AAExD,IAAA,qBAAA,CAAsB,SAAA,GAAY,UAAA;AAClC,IAAA,SAAA,GAAY,UAAA;AAAA,EACd;AAEA,EAAA,IAAI,SAAA,GAAY,IAAI,MAAA,EAAQ;AAC1B,IAAA,KAAA,CAAM,IAAA,CAAK,GAAA,CAAI,SAAA,CAAU,SAAS,CAAC,CAAA;AAAA,EACrC;AAEA,EAAA,OAAO,KAAA,CAAM,KAAK,EAAE,CAAA;AACtB;;;;"}
|