@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
|
@@ -1,69 +1,33 @@
|
|
|
1
1
|
import { Filter, FilterValue } from '../types';
|
|
2
|
+
export { hasChangedFilter } from './value-compare';
|
|
2
3
|
/**
|
|
3
4
|
* Returns an array of filters that are currently active (i.e., have a value set).
|
|
4
|
-
*
|
|
5
|
-
* @param {Filter[]} filters - Array of filter objects to check
|
|
6
|
-
* @returns {Filter[]} Array of active filters
|
|
7
5
|
*/
|
|
8
6
|
export declare const getActiveFilters: (filters: Filter[]) => Filter[];
|
|
9
7
|
/**
|
|
10
8
|
* Checks if any filters in the array have active values
|
|
11
|
-
*
|
|
12
|
-
* @param {Filter[]} filters - Array of filter objects to check
|
|
13
|
-
* @returns {boolean} True if any filter has an active value
|
|
14
9
|
*/
|
|
15
10
|
export declare const checkActiveFilters: (filters: Filter[]) => boolean;
|
|
16
11
|
/**
|
|
17
12
|
* Resets all filters to their default state
|
|
18
|
-
*
|
|
19
|
-
* @param {Filter[]} filters - Array of filter objects to reset
|
|
20
|
-
* @returns {Filter[]} New array with reset filters
|
|
21
13
|
*/
|
|
22
14
|
export declare const resetFilters: (filters: Filter[]) => Filter[];
|
|
23
15
|
/**
|
|
24
16
|
* Updates a single filter in an array of filters
|
|
25
|
-
*
|
|
26
|
-
* @param {Filter[]} filters - Array of filter objects
|
|
27
|
-
* @param {string} filterId - ID of the filter to update
|
|
28
|
-
* @param {FilterValue} value - New value for the filter
|
|
29
|
-
* @returns {Filter[]} New array with updated filter
|
|
30
17
|
*/
|
|
31
18
|
export declare const updateSingleFilter: (filters: Filter[], filterId: string, value: FilterValue) => Filter[];
|
|
32
|
-
/**
|
|
33
|
-
* Determines if two filter values are different.
|
|
34
|
-
* For arrays (multiSelect), compares by id set (order-insensitive, avoids JSON serialization).
|
|
35
|
-
* For singleSelect, compares by id if both are objects with id.
|
|
36
|
-
*
|
|
37
|
-
* @param {T} a - First value to compare
|
|
38
|
-
* @param {T} b - Second value to compare
|
|
39
|
-
* @returns {boolean} True if the values are different
|
|
40
|
-
*/
|
|
41
|
-
export declare const hasChangedFilter: <T>(a: T, b: T) => boolean;
|
|
42
19
|
/**
|
|
43
20
|
* Checks if the selection value of a filter has changed by comparing references.
|
|
44
21
|
* Uses reference equality (===) to detect if the parent has provided a new value.
|
|
45
|
-
*
|
|
46
|
-
* @param {Filter} existingFilter - The current filter state
|
|
47
|
-
* @param {Filter} newFilter - The incoming filter from props
|
|
48
|
-
* @returns {boolean} True if the selection value reference has changed
|
|
49
22
|
*/
|
|
50
23
|
export declare const hasFilterSelectionChanged: (existingFilter: Filter, newFilter: Filter) => boolean;
|
|
51
24
|
/**
|
|
52
25
|
* Preserves the selection state from an existing filter into a new filter.
|
|
53
|
-
* Used when filter configuration updates but the selection value reference hasn't changed
|
|
54
|
-
* allowing us to maintain user selections through configuration updates.
|
|
55
|
-
*
|
|
56
|
-
* @param {Filter} newFilter - The new filter configuration from props
|
|
57
|
-
* @param {Filter} existingFilter - The existing filter with user's selections
|
|
58
|
-
* @returns {Filter} New filter with configuration from newFilter and selection from existingFilter
|
|
26
|
+
* Used when filter configuration updates but the selection value reference hasn't changed.
|
|
59
27
|
*/
|
|
60
28
|
export declare const preserveFilterState: (newFilter: Filter, existingFilter: Filter) => Filter;
|
|
61
29
|
/**
|
|
62
30
|
* Creates a deep clone of filters with updated item references.
|
|
63
31
|
* Ensures that selected items reference the current items array for proper equality checks.
|
|
64
|
-
* Used when initializing draft state to ensure selections use current item references.
|
|
65
|
-
*
|
|
66
|
-
* @param {Filter[]} filters - Array of filter objects to clone
|
|
67
|
-
* @returns {Filter[]} New array with cloned filters and updated item references
|
|
68
32
|
*/
|
|
69
33
|
export declare const cloneFiltersWithItemRefs: (filters: Filter[]) => Filter[];
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Filter, BooleanFilter, CustomFilter, SingleSelectFilter, MultiSelectFilter, DateFilter, DateRangeFilter } from '../types';
|
|
1
|
+
import { AsyncMultiSelectFilter, AsyncSelectFilter, Filter, BooleanFilter, CustomFilter, SingleSelectFilter, MultiSelectFilter, DateFilter, DateListFilter, DateRangeFilter, NumericRangeFilter } from '../types';
|
|
2
2
|
export type TestValue = {
|
|
3
3
|
id: number;
|
|
4
4
|
label: string;
|
|
@@ -11,24 +11,12 @@ export declare const mockFilterOptions: {
|
|
|
11
11
|
}[];
|
|
12
12
|
export declare const defaultMockBooleanFilter: BooleanFilter;
|
|
13
13
|
export declare const defaultMockCustomFilter: CustomFilter<TestValue>;
|
|
14
|
-
export declare const defaultMockSingleSelectFilter: SingleSelectFilter
|
|
15
|
-
|
|
16
|
-
label: string;
|
|
17
|
-
}>;
|
|
18
|
-
export declare const defaultMockMultiSelectFilter: MultiSelectFilter<{
|
|
19
|
-
id: string;
|
|
20
|
-
label: string;
|
|
21
|
-
}>;
|
|
14
|
+
export declare const defaultMockSingleSelectFilter: SingleSelectFilter;
|
|
15
|
+
export declare const defaultMockMultiSelectFilter: MultiSelectFilter;
|
|
22
16
|
export declare const defaultMockDateFilter: DateFilter;
|
|
23
17
|
export declare const defaultMockDateRangeFilter: DateRangeFilter;
|
|
24
|
-
export declare const defaultMockFilters: (BooleanFilter | DateFilter | DateRangeFilter | CustomFilter<TestValue>
|
|
25
|
-
|
|
26
|
-
label: string;
|
|
27
|
-
}> | MultiSelectFilter<{
|
|
28
|
-
id: string;
|
|
29
|
-
label: string;
|
|
30
|
-
}>)[];
|
|
31
|
-
export declare function createMockFilter<T = unknown>(overrides?: Partial<Filter | CustomFilter<T> | SingleSelectFilter<T>>): Filter | CustomFilter<T> | SingleSelectFilter<T>;
|
|
18
|
+
export declare const defaultMockFilters: (BooleanFilter | SingleSelectFilter | MultiSelectFilter | DateFilter | DateRangeFilter | CustomFilter<TestValue>)[];
|
|
19
|
+
export declare function createMockFilter<T = unknown>(overrides?: Partial<Filter | CustomFilter<T> | SingleSelectFilter>): Filter | CustomFilter<T> | SingleSelectFilter;
|
|
32
20
|
export declare function createMockFilterContext(filters?: Filter[], contextOverrides?: {}): {
|
|
33
21
|
filterGroupRef: {
|
|
34
22
|
current: HTMLDivElement;
|
|
@@ -36,23 +24,21 @@ export declare function createMockFilterContext(filters?: Filter[], contextOverr
|
|
|
36
24
|
filters: Filter[];
|
|
37
25
|
updateFilter: import('vitest').Mock<(...args: any[]) => any>;
|
|
38
26
|
onFilterChange: import('vitest').Mock<(...args: any[]) => any>;
|
|
39
|
-
|
|
40
|
-
addHiddenFilter: import('vitest').Mock<(...args: any[]) => any>;
|
|
41
|
-
removeHiddenFilter: import('vitest').Mock<(...args: any[]) => any>;
|
|
27
|
+
drawerOnlyFilters: never[];
|
|
42
28
|
controlledFiltering: boolean;
|
|
43
29
|
associatedContent: string;
|
|
30
|
+
showInlineFilters: boolean;
|
|
44
31
|
};
|
|
45
32
|
export declare function createMockBooleanFilter(overrides?: Partial<BooleanFilter>): BooleanFilter;
|
|
46
33
|
export declare function createMockCustomFilter<T = unknown>(overrides?: Partial<CustomFilter<T>>): CustomFilter<T>;
|
|
47
|
-
export declare function createMockSingleSelectFilter<
|
|
48
|
-
|
|
49
|
-
label: string;
|
|
50
|
-
}>(overrides?: Partial<SingleSelectFilter<T>>): SingleSelectFilter<T>;
|
|
51
|
-
export declare function createMockMultiSelectFilter<T = {
|
|
52
|
-
id: string;
|
|
53
|
-
label: string;
|
|
54
|
-
}>(overrides?: Partial<MultiSelectFilter<T>>): MultiSelectFilter<T>;
|
|
34
|
+
export declare function createMockSingleSelectFilter(overrides?: Partial<SingleSelectFilter>): SingleSelectFilter;
|
|
35
|
+
export declare function createMockMultiSelectFilter(overrides?: Partial<MultiSelectFilter>): MultiSelectFilter;
|
|
55
36
|
export declare function createMockDateFilter(overrides?: Partial<DateFilter>): DateFilter;
|
|
56
37
|
export declare function createMockDateRangeFilter(overrides?: Partial<DateRangeFilter>): DateRangeFilter;
|
|
38
|
+
export declare function createMockDateListFilter(overrides?: Partial<DateListFilter>): DateListFilter;
|
|
39
|
+
export declare function createMockAsyncSelectFilter(overrides?: Partial<AsyncSelectFilter>): AsyncSelectFilter;
|
|
40
|
+
export declare function createMockAsyncMultiSelectFilter(overrides?: Partial<AsyncMultiSelectFilter>): AsyncMultiSelectFilter;
|
|
41
|
+
export declare function createMockNumericRangeFilter(overrides?: Partial<NumericRangeFilter>): NumericRangeFilter;
|
|
57
42
|
export declare const setupDesktopContainer: () => void;
|
|
58
43
|
export declare const setupMobileContainer: () => void;
|
|
44
|
+
export declare const setupSmContainer: () => void;
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Determines if two filter values are different.
|
|
3
|
+
* For arrays (multiSelect), compares by id set (order-insensitive, avoids JSON serialization).
|
|
4
|
+
* For singleSelect, compares by id if both are objects with id.
|
|
5
|
+
* For dateList selections (objects with both id and value), compares id AND value
|
|
6
|
+
* so re-picking the same library option with a different date still counts as a change.
|
|
7
|
+
*
|
|
8
|
+
* Intentionally adapter-free — kept here (rather than in filter-state.ts) so that
|
|
9
|
+
* FilterPopoverButton can import it without pulling the adapter registry into
|
|
10
|
+
* the import graph. filter-state.ts depends on the adapter registry; the registry
|
|
11
|
+
* depends on FilterPopoverButton; FilterPopoverButton would otherwise depend on
|
|
12
|
+
* filter-state — closing a runtime-evaluated cycle.
|
|
13
|
+
*/
|
|
14
|
+
export declare const hasChangedFilter: <T>(a: T, b: T) => boolean;
|
package/dist/src/beta/components/MultiSelectField/internal/MultiSelectFieldComboboxMode.d.ts
CHANGED
|
@@ -2,4 +2,4 @@ import { MultiSelectFieldComboboxInternalProps } from './types';
|
|
|
2
2
|
/**
|
|
3
3
|
* Combobox mode: searchable multi-select using useCombobox.
|
|
4
4
|
*/
|
|
5
|
-
export declare const MultiSelectFieldComboboxMode: ({ labelAiMark, id, helperUid, selectedOptions, onSelectedOptionsChange, displayAs, isDisabledOrReadOnly, disabled, readOnly, required, placeholder, size, error, hasHelperText, disableClearButton, prefix, suffix, label, hideLabel, hint, moreInfo, moreInfoId, errorMessages, warning, description, className, style, layoutStyles, pinned, groupToString, groupSorter, virtualize, options, loading, loadingMore, hasMore, loadOptions, loadMore, initialLoad, initialLoadPerformed, setInitialLoadPerformed, inputWrapperRef, debounceMs, selectAll, selectFiltered, singleRow, maxChips, getChipProps, onSearchChange, addItemLabel, onAddNewItem, handleRemoveOption, handleClear, }: MultiSelectFieldComboboxInternalProps) => import("react/jsx-runtime").JSX.Element;
|
|
5
|
+
export declare const MultiSelectFieldComboboxMode: ({ labelAiMark, id, helperUid, selectedOptions, onSelectedOptionsChange, displayAs, isDisabledOrReadOnly, disabled, readOnly, required, placeholder, size, error, hasHelperText, disableClearButton, prefix, suffix, label, hideLabel, hint, moreInfo, moreInfoId, errorMessages, warning, description, className, style, layoutStyles, pinned, groupToString, groupSorter, virtualize, options, loading, loadingMore, hasMore, loadOptions, loadMore, initialLoad, initialLoadPerformed, setInitialLoadPerformed, inputWrapperRef, debounceMs, selectAll, selectFiltered, bulkPending, onBulkActivate, singleRow, maxChips, getChipProps, onSearchChange, addItemLabel, onAddNewItem, handleRemoveOption, handleClear, }: MultiSelectFieldComboboxInternalProps) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -3,4 +3,4 @@ import { MultiSelectFieldBaseInternalProps } from './types';
|
|
|
3
3
|
* Select mode: non-searchable multi-select using useSelect.
|
|
4
4
|
* Active when disableSearch is true.
|
|
5
5
|
*/
|
|
6
|
-
export declare const MultiSelectFieldSelectMode: ({ labelAiMark, id, helperUid, selectedOptions, onSelectedOptionsChange, displayAs, isDisabledOrReadOnly, disabled, readOnly, required, placeholder, size, error, hasHelperText, disableClearButton, prefix, suffix, label, hideLabel, hint, moreInfo, moreInfoId, errorMessages, warning, description, className, style, layoutStyles, pinned, groupToString, groupSorter, virtualize, options, loading, loadingMore, hasMore, loadOptions, loadMore, initialLoad, initialLoadPerformed, setInitialLoadPerformed, inputWrapperRef, selectAll, singleRow, maxChips, getChipProps, addItemLabel, onAddNewItem, handleRemoveOption, handleClear, }: MultiSelectFieldBaseInternalProps) => import("react/jsx-runtime").JSX.Element;
|
|
6
|
+
export declare const MultiSelectFieldSelectMode: ({ labelAiMark, id, helperUid, selectedOptions, onSelectedOptionsChange, displayAs, isDisabledOrReadOnly, disabled, readOnly, required, placeholder, size, error, hasHelperText, disableClearButton, prefix, suffix, label, hideLabel, hint, moreInfo, moreInfoId, errorMessages, warning, description, className, style, layoutStyles, pinned, groupToString, groupSorter, virtualize, options, loading, loadingMore, hasMore, loadOptions, loadMore, initialLoad, initialLoadPerformed, setInitialLoadPerformed, inputWrapperRef, selectAll, bulkPending, onBulkActivate, singleRow, maxChips, getChipProps, addItemLabel, onAddNewItem, handleRemoveOption, handleClear, }: MultiSelectFieldBaseInternalProps) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -49,9 +49,12 @@ export type MultiSelectFieldBaseInternalProps = {
|
|
|
49
49
|
inputWrapperRef: RefObject<HTMLDivElement>;
|
|
50
50
|
selectAll?: {
|
|
51
51
|
label: string;
|
|
52
|
-
onClick: () => void;
|
|
53
52
|
checkState: CheckState;
|
|
54
53
|
};
|
|
54
|
+
/** True while a `compute`-driven bulk action's promise is in flight. */
|
|
55
|
+
bulkPending: boolean;
|
|
56
|
+
/** Called when the user activates the select-all or select-filtered row. */
|
|
57
|
+
onBulkActivate: (kind: "selectAll" | "selectFiltered", searchValue: string) => void;
|
|
55
58
|
singleRow?: boolean;
|
|
56
59
|
maxChips?: number;
|
|
57
60
|
getChipProps?: (option: MultiSelectFieldOption) => MultiSelectFieldChipProps;
|
|
@@ -64,7 +67,6 @@ export type MultiSelectFieldComboboxInternalProps = MultiSelectFieldBaseInternal
|
|
|
64
67
|
debounceMs: number;
|
|
65
68
|
selectFiltered?: (searchValue: string) => {
|
|
66
69
|
label?: string;
|
|
67
|
-
onClick: () => void;
|
|
68
70
|
checkState: CheckState;
|
|
69
71
|
};
|
|
70
72
|
onSearchChange?: (searchValue: string) => void;
|
|
@@ -11,18 +11,20 @@ export type UseComboMultipleOptions = {
|
|
|
11
11
|
groupToString?: (groupValue: MultiSelectFieldGroupByValue) => string;
|
|
12
12
|
/** Function to sort group sections */
|
|
13
13
|
groupSorter?: (a: MultiSelectFieldGroupByValue, b: MultiSelectFieldGroupByValue) => number;
|
|
14
|
-
/** Configuration for the "Select All" option (shown when search is empty) */
|
|
14
|
+
/** Configuration for the "Select All" option (shown when search is empty). */
|
|
15
15
|
selectAll?: {
|
|
16
16
|
label: string;
|
|
17
|
-
onClick: () => void;
|
|
18
17
|
checkState: CheckState;
|
|
19
18
|
};
|
|
20
|
-
/** Function that receives the search value and returns config for "Select Filtered" */
|
|
19
|
+
/** Function that receives the search value and returns config for "Select Filtered". */
|
|
21
20
|
selectFiltered?: (searchValue: string) => {
|
|
22
21
|
label?: string;
|
|
23
|
-
onClick: () => void;
|
|
24
22
|
checkState: CheckState;
|
|
25
23
|
};
|
|
24
|
+
/** True while a `compute`-driven bulk action is in flight. Disables option rows. */
|
|
25
|
+
bulkPending: boolean;
|
|
26
|
+
/** Called when the user activates the select-all or select-filtered row. */
|
|
27
|
+
onBulkActivate: (kind: "selectAll" | "selectFiltered", searchValue: string) => void;
|
|
26
28
|
/** The currently selected options (controlled from outside) */
|
|
27
29
|
selectedOptions: MultiSelectFieldOption[];
|
|
28
30
|
onSelectedOptionsChange: (options: MultiSelectFieldOption[]) => void;
|
|
@@ -43,7 +45,7 @@ export type UseComboMultipleOptions = {
|
|
|
43
45
|
* @param options - Configuration options for the hook
|
|
44
46
|
* @returns Downshift combobox props and state
|
|
45
47
|
*/
|
|
46
|
-
export declare const useComboMultiple: ({ options, pinned, groupToString, groupSorter, selectAll, selectFiltered, selectedOptions, onSelectedOptionsChange, onInputValueChange, onIsOpenChange, displayAs, disabled, loading, virtualize, onScrollToHighlight, }: UseComboMultipleOptions) => {
|
|
48
|
+
export declare const useComboMultiple: ({ options, pinned, groupToString, groupSorter, selectAll, selectFiltered, bulkPending, onBulkActivate, selectedOptions, onSelectedOptionsChange, onInputValueChange, onIsOpenChange, displayAs, disabled, loading, virtualize, onScrollToHighlight, }: UseComboMultipleOptions) => {
|
|
47
49
|
inputValue: string;
|
|
48
50
|
wrapperDivRef: import('react').RefObject<HTMLDivElement>;
|
|
49
51
|
getToggleButtonProps: <Options>(options?: import('downshift').UseComboboxGetToggleButtonPropsOptions & Options) => import('downshift').Overwrite<import('downshift').UseComboboxGetToggleButtonPropsReturnValue, Options>;
|
|
@@ -8,9 +8,12 @@ export type UseSelectModeMultipleOptions = {
|
|
|
8
8
|
groupSorter?: (a: MultiSelectFieldGroupByValue, b: MultiSelectFieldGroupByValue) => number;
|
|
9
9
|
selectAll?: {
|
|
10
10
|
label: string;
|
|
11
|
-
onClick: () => void;
|
|
12
11
|
checkState: CheckState;
|
|
13
12
|
};
|
|
13
|
+
/** True while a `compute`-driven bulk action is in flight. Disables option rows. */
|
|
14
|
+
bulkPending: boolean;
|
|
15
|
+
/** Called when the user activates the select-all row. */
|
|
16
|
+
onBulkActivate: (kind: "selectAll" | "selectFiltered", searchValue: string) => void;
|
|
14
17
|
selectedOptions: MultiSelectFieldOption[];
|
|
15
18
|
onSelectedOptionsChange: (options: MultiSelectFieldOption[]) => void;
|
|
16
19
|
onIsOpenChange?: (changes: {
|
|
@@ -25,7 +28,7 @@ export type UseSelectModeMultipleOptions = {
|
|
|
25
28
|
* Wraps downshift's useSelect for non-searchable multi-select fields.
|
|
26
29
|
* Keeps menu open after selection and handles bulk actions.
|
|
27
30
|
*/
|
|
28
|
-
export declare const useSelectModeMultiple: ({ options, pinned, groupToString, groupSorter, selectAll, selectedOptions, onSelectedOptionsChange, onIsOpenChange, displayAs, disabled, virtualize, onScrollToHighlight, }: UseSelectModeMultipleOptions) => {
|
|
31
|
+
export declare const useSelectModeMultiple: ({ options, pinned, groupToString, groupSorter, selectAll, bulkPending, onBulkActivate, selectedOptions, onSelectedOptionsChange, onIsOpenChange, displayAs, disabled, virtualize, onScrollToHighlight, }: UseSelectModeMultipleOptions) => {
|
|
29
32
|
wrapperDivRef: import('react').RefObject<HTMLDivElement>;
|
|
30
33
|
getToggleButtonProps: <Options>(options?: import('downshift').UseSelectGetToggleButtonPropsOptions & Options, otherOptions?: import('downshift').GetPropsCommonOptions) => import('downshift').Overwrite<import('downshift').UseSelectGetToggleButtonReturnValue, Options>;
|
|
31
34
|
getLabelProps: <Options>(options?: import('downshift').UseSelectGetLabelPropsOptions & Options) => import('downshift').Overwrite<import('downshift').UseSelectGetLabelPropsReturnValue, Options>;
|
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
import { AriaAttributes, CSSProperties, ReactElement, ReactNode } from 'react';
|
|
2
|
-
import { AiMarkWithTooltipOrPopoverProps,
|
|
3
|
-
import { SelectFieldGroupByValue, SelectFieldOption } from '../SelectField/types';
|
|
2
|
+
import { AiMarkWithTooltipOrPopoverProps, LayoutUtilProps, Size } from '../../../types';
|
|
3
|
+
import { SelectFieldGroupByValue, SelectFieldOption, SelectFieldOptionContent } from '../SelectField/types';
|
|
4
4
|
import { ChipProps } from '../../../components/Chip';
|
|
5
5
|
import { AddNewItemProps } from '../../../internal/types/addNewItemTypes';
|
|
6
|
+
import { BulkActionConfig } from '../../../internal/types/bulkActionTypes';
|
|
6
7
|
/**
|
|
7
8
|
* Partial chip props that can be returned from the `getChipProps` callback.
|
|
8
9
|
* Supports `icon` or `avatar` (mutually exclusive) and all other chip props as optional overrides.
|
|
@@ -34,6 +35,11 @@ export type MultiSelectFieldHandle = {
|
|
|
34
35
|
invalidate: () => void;
|
|
35
36
|
};
|
|
36
37
|
export type MultiSelectFieldGroupByValue = SelectFieldGroupByValue;
|
|
38
|
+
/**
|
|
39
|
+
* Rich content configuration for a MultiSelectField option row.
|
|
40
|
+
* Controls the avatar, icon, description, and chip display within an option.
|
|
41
|
+
*/
|
|
42
|
+
export type MultiSelectFieldOptionContent = SelectFieldOptionContent;
|
|
37
43
|
export type MultiSelectFieldOption = SelectFieldOption;
|
|
38
44
|
export type MultiSelectFieldGroupedOption = MultiSelectFieldOption & {
|
|
39
45
|
group: MultiSelectFieldGroupByValue;
|
|
@@ -210,27 +216,18 @@ type MultiSelectFieldCommonProps = {
|
|
|
210
216
|
* Configuration for the "Select All" option at the top of the list.
|
|
211
217
|
* When provided, a "Select All" option will be shown while the search input is empty.
|
|
212
218
|
*
|
|
219
|
+
* Pass exactly one of `onClick` (fire-and-forget; the consumer commits via
|
|
220
|
+
* `onSelectedOptionsChange`) or `compute` (returns the next selection; the
|
|
221
|
+
* field commits the result for you, with sync or async support).
|
|
222
|
+
*
|
|
223
|
+
* While a `compute` promise is pending, the bulk row shows a loading state,
|
|
224
|
+
* all option rows are disabled, and stale resolutions are silently discarded.
|
|
225
|
+
*
|
|
213
226
|
* Select All and Select Filtered are mutually exclusive:
|
|
214
227
|
* - Select All is shown when the search input is empty.
|
|
215
228
|
* - Select Filtered (if provided) is shown when a search term is active.
|
|
216
229
|
*/
|
|
217
|
-
selectAll?:
|
|
218
|
-
/**
|
|
219
|
-
* The label to display for the "Select All" option.
|
|
220
|
-
* @default "Select All"
|
|
221
|
-
*/
|
|
222
|
-
label?: string;
|
|
223
|
-
/**
|
|
224
|
-
* Callback when the "Select All" option is clicked.
|
|
225
|
-
* The parent component is responsible for handling the select/deselect all logic.
|
|
226
|
-
*/
|
|
227
|
-
onClick: () => void;
|
|
228
|
-
/**
|
|
229
|
-
* Check state for the "Select All" option.
|
|
230
|
-
* @default false
|
|
231
|
-
*/
|
|
232
|
-
checkState: boolean | CheckState;
|
|
233
|
-
};
|
|
230
|
+
selectAll?: BulkActionConfig;
|
|
234
231
|
/**
|
|
235
232
|
* Function that receives the current search value and returns configuration for
|
|
236
233
|
* the "Select Filtered" option at the top of the list.
|
|
@@ -238,28 +235,16 @@ type MultiSelectFieldCommonProps = {
|
|
|
238
235
|
* When provided and a search term is active, a "Select Filtered" option will be shown
|
|
239
236
|
* instead of "Select All". This allows selecting all options matching the current filter.
|
|
240
237
|
*
|
|
238
|
+
* See `selectAll` for the `onClick` / `compute` choice.
|
|
239
|
+
*
|
|
241
240
|
* Select All and Select Filtered are mutually exclusive:
|
|
242
241
|
* - Select All (if provided) is shown when the search input is empty.
|
|
243
242
|
* - Select Filtered is shown when a search term is active.
|
|
244
243
|
*
|
|
245
244
|
* @param searchValue - The current search input value
|
|
246
|
-
* @returns
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
* selectFiltered={(searchValue) => ({
|
|
250
|
-
* label: `Select items matching "${searchValue}"`,
|
|
251
|
-
* onClick: () => handleSelectFiltered(searchValue),
|
|
252
|
-
* checkState: allFilteredSelected ? "checked" : "unchecked",
|
|
253
|
-
* })}
|
|
254
|
-
*/
|
|
255
|
-
selectFiltered?: (searchValue: string) => {
|
|
256
|
-
/** The label to display. @default `Select items matching "${searchValue}"` */
|
|
257
|
-
label?: string;
|
|
258
|
-
/** Callback when clicked. */
|
|
259
|
-
onClick: () => void;
|
|
260
|
-
/** Check state for the option. */
|
|
261
|
-
checkState: boolean | CheckState;
|
|
262
|
-
};
|
|
245
|
+
* @returns BulkActionConfig describing the row
|
|
246
|
+
*/
|
|
247
|
+
selectFiltered?: (searchValue: string) => BulkActionConfig;
|
|
263
248
|
/**
|
|
264
249
|
* When true, restricts the field to a single row height.
|
|
265
250
|
* Overflow chips will be collapsed into a "+N" indicator.
|
|
@@ -18,6 +18,7 @@ import { MultiSelectMenuHandle, MultiSelectMenuProps } from './types';
|
|
|
18
18
|
* - Controlled selection state
|
|
19
19
|
* - Configurable popover width
|
|
20
20
|
* - Optional "Add new item" affordance below the option list with consumer-owned dialog
|
|
21
|
+
* - Optional confirmation mode that buffers selection until Apply is clicked
|
|
21
22
|
*
|
|
22
23
|
* @example
|
|
23
24
|
* <MultiSelectMenu
|
|
@@ -1,8 +1,18 @@
|
|
|
1
1
|
import { KeyboardEvent, ReactElement, RefObject } from 'react';
|
|
2
|
-
import {
|
|
3
|
-
import { SelectFieldGroupByValue, SelectFieldOption } from '../SelectField/types';
|
|
2
|
+
import { SelectFieldGroupByValue, SelectFieldOption, SelectFieldOptionContent } from '../SelectField/types';
|
|
4
3
|
import { MultiSelectFieldCacheOptions, MultiSelectFieldEagerLoader, MultiSelectFieldGroupLazyLoader, MultiSelectFieldOffsetLazyLoader, MultiSelectFieldPageLazyLoader, MultiSelectFieldPinnedOptions, MultiSelectFieldSearchProps } from '../MultiSelectField/types';
|
|
5
4
|
import { AddNewItemProps } from '../../../internal/types/addNewItemTypes';
|
|
5
|
+
import { ConfirmationProp } from '../../../internal/types/confirmationTypes';
|
|
6
|
+
import { BulkActionConfig } from '../../../internal/types/bulkActionTypes';
|
|
7
|
+
/**
|
|
8
|
+
* Configuration for the "Select All" / "Select Filtered" rows.
|
|
9
|
+
*/
|
|
10
|
+
export type MultiSelectMenuBulkActionConfig = BulkActionConfig;
|
|
11
|
+
/**
|
|
12
|
+
* Rich content configuration for a MultiSelectMenu option row.
|
|
13
|
+
* Controls the avatar, icon, description, and chip display within an option.
|
|
14
|
+
*/
|
|
15
|
+
export type MultiSelectMenuOptionContent = SelectFieldOptionContent;
|
|
6
16
|
export type MultiSelectMenuOption = SelectFieldOption;
|
|
7
17
|
export type MultiSelectMenuGroupByValue = SelectFieldGroupByValue;
|
|
8
18
|
/**
|
|
@@ -121,28 +131,58 @@ type MultiSelectMenuCommonProps = {
|
|
|
121
131
|
/**
|
|
122
132
|
* Configuration for the "Select All" option at the top of the list.
|
|
123
133
|
* Shown when the search input is empty.
|
|
134
|
+
*
|
|
135
|
+
* Pass exactly one of `onClick` (fire-and-forget; the consumer commits via
|
|
136
|
+
* `onSelectedOptionsChange`) or `compute` (returns the next selection;
|
|
137
|
+
* integrates with confirmation drafts and supports async resolution).
|
|
138
|
+
*
|
|
139
|
+
* `compute` is required when you want the action to participate in the
|
|
140
|
+
* confirmation draft. While a `compute` promise is pending, the menu shows
|
|
141
|
+
* a loading state, disables all options, and disables Apply.
|
|
124
142
|
*/
|
|
125
|
-
selectAll?:
|
|
126
|
-
label?: string;
|
|
127
|
-
onClick: () => void;
|
|
128
|
-
checkState: boolean | CheckState;
|
|
129
|
-
};
|
|
143
|
+
selectAll?: MultiSelectMenuBulkActionConfig;
|
|
130
144
|
/**
|
|
131
145
|
* Function that receives the current search value and returns configuration for
|
|
132
146
|
* the "Select Filtered" option at the top of the list.
|
|
133
147
|
* Shown when a search term is active (instead of Select All).
|
|
148
|
+
*
|
|
149
|
+
* See `selectAll` for the `onClick` / `compute` choice.
|
|
134
150
|
*/
|
|
135
|
-
selectFiltered?: (searchValue: string) =>
|
|
136
|
-
label?: string;
|
|
137
|
-
onClick: () => void;
|
|
138
|
-
checkState: boolean | CheckState;
|
|
139
|
-
};
|
|
151
|
+
selectFiltered?: (searchValue: string) => MultiSelectMenuBulkActionConfig;
|
|
140
152
|
/**
|
|
141
153
|
* Width of the popover. Only applies when `displayMenuAs="popover"` (or when the adaptive mode resolves to popover). Has no effect in dialog mode.
|
|
142
154
|
* Accepts a CSS width value or "reference" to match the trigger element's width.
|
|
143
155
|
* @default 320
|
|
144
156
|
*/
|
|
145
157
|
popoverWidth?: "reference" | number | string;
|
|
158
|
+
/**
|
|
159
|
+
* When set, the menu becomes a buffered selection: clicks update a draft
|
|
160
|
+
* value inside the open menu, and `onSelectedOptionsChange` only fires when
|
|
161
|
+
* the user clicks Apply. Dismissing the menu (Escape, click outside,
|
|
162
|
+
* toggling the trigger) discards the draft. Pass `true` for the default
|
|
163
|
+
* "Apply" / "Cancel" labels, or an object to customize.
|
|
164
|
+
*
|
|
165
|
+
* Note: a `selectAll` / `selectFiltered` row configured with `onClick`
|
|
166
|
+
* bypasses the draft and applies immediately. Use the `compute` variant
|
|
167
|
+
* to integrate the bulk action with the draft.
|
|
168
|
+
* @default undefined (off — selections apply immediately)
|
|
169
|
+
*/
|
|
170
|
+
confirmation?: ConfirmationProp;
|
|
171
|
+
/**
|
|
172
|
+
* Configures a "Clear" button in the menu footer. Presence of this prop
|
|
173
|
+
* enables the button; omit to suppress.
|
|
174
|
+
*
|
|
175
|
+
* - `onClick` — called when the user clicks Clear.
|
|
176
|
+
* - `label` — button label (default "Clear").
|
|
177
|
+
* - `disabled` — whether the button is inert. Filter adapters typically
|
|
178
|
+
* tie this to `!isActive(filter)` so the button is dim when nothing is
|
|
179
|
+
* selected.
|
|
180
|
+
*/
|
|
181
|
+
clear?: {
|
|
182
|
+
onClick: () => void;
|
|
183
|
+
label?: string;
|
|
184
|
+
disabled?: boolean;
|
|
185
|
+
};
|
|
146
186
|
} & MultiSelectMenuSearchProps & AddNewItemProps;
|
|
147
187
|
type MultiSelectMenuGroupingProps = {
|
|
148
188
|
/**
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
import { SavedFiltersButtonProps } from './types';
|
|
2
|
+
/**
|
|
3
|
+
* `SavedFiltersButton` is an opt-in companion to FilterBar that lets users
|
|
4
|
+
* apply, save, edit, and delete preset filter selections. It is fully
|
|
5
|
+
* stateless: the consumer owns the `savedFilters` array and writes its own
|
|
6
|
+
* persistence (server, localStorage, etc.) by reacting to the callbacks the
|
|
7
|
+
* component fires.
|
|
8
|
+
*
|
|
9
|
+
* Visually it's a single Button trigger that opens a popover listing the
|
|
10
|
+
* presets, with two footer actions:
|
|
11
|
+
*
|
|
12
|
+
* - **Save Current Filter** opens a drawer that snapshots `currentFilters`
|
|
13
|
+
* into a new preset.
|
|
14
|
+
* - **Edit Saved Filters** opens a drawer listing every preset with edit
|
|
15
|
+
* affordances; clicking edit on a row drills into a per-preset form
|
|
16
|
+
* reusing the FilterBar adapter `renderDrawer` machinery.
|
|
17
|
+
*
|
|
18
|
+
* Apply, save, update, and delete are all delivered as consumer callbacks
|
|
19
|
+
* (`onApplySavedFilter`, `onSaveCurrentFilter`, `onUpdateSavedFilter`,
|
|
20
|
+
* `onDeleteSavedFilter`). Promise-returning callbacks are supported with
|
|
21
|
+
* loading state on the relevant submit button and success/error alerts on
|
|
22
|
+
* the parent drawer.
|
|
23
|
+
*
|
|
24
|
+
* @example
|
|
25
|
+
* <SavedFiltersButton
|
|
26
|
+
* savedFilters={presets}
|
|
27
|
+
* currentFilters={filters}
|
|
28
|
+
* onApplySavedFilter={(preset) => setFilters(preset.filters)}
|
|
29
|
+
* onSaveCurrentFilter={async ({ name, filters }) => {
|
|
30
|
+
* await api.savePreset({ name, filters });
|
|
31
|
+
* refetchPresets();
|
|
32
|
+
* }}
|
|
33
|
+
* onUpdateSavedFilter={async (id, update) => api.updatePreset(id, update)}
|
|
34
|
+
* onDeleteSavedFilter={async (id) => api.deletePreset(id)}
|
|
35
|
+
* />
|
|
36
|
+
*/
|
|
37
|
+
export declare const SavedFiltersButton: {
|
|
38
|
+
(props: SavedFiltersButtonProps): import("react/jsx-runtime").JSX.Element;
|
|
39
|
+
displayName: string;
|
|
40
|
+
};
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import { Filter } from '../../FilterBar/internal/types';
|
|
2
|
+
type AddSavedFilterDrawerProps = {
|
|
3
|
+
open: boolean;
|
|
4
|
+
onClose: () => void;
|
|
5
|
+
/** Snapshot of filters captured when the drawer opened. */
|
|
6
|
+
filtersSnapshot: Filter[];
|
|
7
|
+
onSave: (payload: {
|
|
8
|
+
name: string;
|
|
9
|
+
filters: Filter[];
|
|
10
|
+
}) => void | Promise<void>;
|
|
11
|
+
/**
|
|
12
|
+
* Consumer-supplied name validator. Returning a string blocks Add and is
|
|
13
|
+
* surfaced as the field's error message; `undefined` allows submit.
|
|
14
|
+
*/
|
|
15
|
+
validateName?: (name: string) => string | undefined;
|
|
16
|
+
};
|
|
17
|
+
/**
|
|
18
|
+
* Drawer rendered when the user clicks "Save Current Filter" in the
|
|
19
|
+
* SavedFiltersButton popover. Captures a name and emits `onSave` with the
|
|
20
|
+
* filters snapshot. Supports async `onSave`; while pending the Add button
|
|
21
|
+
* shows a loading spinner and the form is disabled.
|
|
22
|
+
*
|
|
23
|
+
* If `onSave` rejects, the drawer stays open with the current input so the
|
|
24
|
+
* user can retry or cancel. On success the drawer closes.
|
|
25
|
+
*/
|
|
26
|
+
export declare const AddSavedFilterDrawer: ({ open, onClose, filtersSnapshot, onSave, validateName, }: AddSavedFilterDrawerProps) => import("react/jsx-runtime").JSX.Element;
|
|
27
|
+
export {};
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
import { SavedFilter, SavedFiltersAlertText } from '../types';
|
|
2
|
+
type EditSavedFiltersDrawerProps = {
|
|
3
|
+
open: boolean;
|
|
4
|
+
onClose: () => void;
|
|
5
|
+
savedFilters: SavedFilter[];
|
|
6
|
+
/** Drilldown's "Update Filter" action. May return a promise. */
|
|
7
|
+
onUpdate?: (id: string, update: {
|
|
8
|
+
name: string;
|
|
9
|
+
filters: SavedFilter["filters"];
|
|
10
|
+
}) => void | Promise<void>;
|
|
11
|
+
/** Drilldown's "Delete Filter" action. May return a promise. */
|
|
12
|
+
onDelete?: (id: string) => void | Promise<void>;
|
|
13
|
+
/**
|
|
14
|
+
* Optional drag-to-reorder callback. When provided, the list view renders
|
|
15
|
+
* each row as a `DndSort.Card` with a drag handle and emits the new
|
|
16
|
+
* `orderedIds` after a drop. When omitted, the list renders as a static
|
|
17
|
+
* stack with no handles.
|
|
18
|
+
*/
|
|
19
|
+
onReorder?: (orderedIds: string[]) => void | Promise<void>;
|
|
20
|
+
/**
|
|
21
|
+
* Optional validator for the name field in the drilldown. The `currentId`
|
|
22
|
+
* is set to the preset being edited so the consumer can permit the row's
|
|
23
|
+
* own name in uniqueness checks.
|
|
24
|
+
*/
|
|
25
|
+
validateName?: (name: string, currentId?: string) => string | undefined;
|
|
26
|
+
/** Optional override for the auto-managed alert text. */
|
|
27
|
+
alertText?: SavedFiltersAlertText;
|
|
28
|
+
};
|
|
29
|
+
/**
|
|
30
|
+
* Drawer that lets the user manage existing saved filters. Composed of two
|
|
31
|
+
* views — a list of presets (the Drawer host) and a per-preset edit screen
|
|
32
|
+
* (a `DrillDown` child) that reuses the FilterBar adapter `renderDrawer`
|
|
33
|
+
* machinery to render edit fields. Navigation between the two is driven by
|
|
34
|
+
* `useDrillDown`, which also wires the back-button affordance built into
|
|
35
|
+
* `DrillDown.Header`.
|
|
36
|
+
*/
|
|
37
|
+
export declare const EditSavedFiltersDrawer: ({ open, onClose, savedFilters, onUpdate, onDelete, onReorder, validateName, alertText, }: EditSavedFiltersDrawerProps) => import("react/jsx-runtime").JSX.Element;
|
|
38
|
+
export {};
|