@servicetitan/anvil2 3.0.7 → 3.0.8
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 +22 -0
- package/dist/{AiMark-BXL0sWIV.js → AiMark-CS6MvraM.js} +5 -4
- package/dist/{AiMark-BXL0sWIV.js.map → AiMark-CS6MvraM.js.map} +1 -1
- package/dist/AiMark.js +1 -1
- package/dist/{Alert-BNH0UD2s.js → Alert-CNDLoh6b.js} +2 -2
- package/dist/{Alert-BNH0UD2s.js.map → Alert-CNDLoh6b.js.map} +1 -1
- package/dist/Alert.js +1 -1
- package/dist/{AnvilProvider-J9DjoJiB.js → AnvilProvider-BFK29dL5.js} +3 -2
- package/dist/{AnvilProvider-J9DjoJiB.js.map → AnvilProvider-BFK29dL5.js.map} +1 -1
- package/dist/AnvilProvider.js +1 -1
- package/dist/{Avatar-FDHyqiCy.js → Avatar-Bl-Dxbhf.js} +7 -2
- package/dist/Avatar-Bl-Dxbhf.js.map +1 -0
- package/dist/{Avatar-B_cRQqKR.js → Avatar-CdAIJ5VK.js} +2 -2
- package/dist/{Avatar-B_cRQqKR.js.map → Avatar-CdAIJ5VK.js.map} +1 -1
- package/dist/Avatar.js +2 -2
- package/dist/{Breadcrumbs-Bzxbdu-S.js → Breadcrumbs--Xt6l_2L.js} +2 -2
- package/dist/{Breadcrumbs-Bzxbdu-S.js.map → Breadcrumbs--Xt6l_2L.js.map} +1 -1
- package/dist/Breadcrumbs.js +1 -1
- package/dist/{Calendar-DS5eWpGF.js → Calendar-5mAxtdNh.js} +2 -2
- package/dist/{Calendar-DS5eWpGF.js.map → Calendar-5mAxtdNh.js.map} +1 -1
- package/dist/{Calendar-BYNFAWpZ.js → Calendar-rITorBvD.js} +5 -3
- package/dist/{Calendar-BYNFAWpZ.js.map → Calendar-rITorBvD.js.map} +1 -1
- package/dist/Calendar.js +2 -2
- package/dist/{Checkbox-BeIzx_ZX.js → Checkbox-BYWhkYoK.js} +2 -2
- package/dist/{Checkbox-BeIzx_ZX.js.map → Checkbox-BYWhkYoK.js.map} +1 -1
- package/dist/{Checkbox-BB3BDJsK.js → Checkbox-DTzoDcJl.js} +3 -3
- package/dist/{Checkbox-BB3BDJsK.js.map → Checkbox-DTzoDcJl.js.map} +1 -1
- package/dist/Checkbox.js +1 -1
- package/dist/{Chip-D2k5X_wX.js → Chip-CyMNyEPR.js} +3 -3
- package/dist/{Chip-D2k5X_wX.js.map → Chip-CyMNyEPR.js.map} +1 -1
- package/dist/Chip.js +1 -1
- package/dist/Combobox.js +1 -1
- package/dist/{DataTable-E8z0H8c7.js → DataTable-Dwhwvm6R.js} +70 -70
- package/dist/DataTable-Dwhwvm6R.js.map +1 -0
- package/dist/{DateFieldRange-BN_uIvHI.js → DateFieldRange-BUug1tUy.js} +4 -4
- package/dist/{DateFieldRange-BN_uIvHI.js.map → DateFieldRange-BUug1tUy.js.map} +1 -1
- package/dist/DateFieldRange.js +1 -1
- package/dist/{DateFieldSingle-h3YkdwPo.js → DateFieldSingle-DR7faQGD.js} +4 -4
- package/dist/{DateFieldSingle-h3YkdwPo.js.map → DateFieldSingle-DR7faQGD.js.map} +1 -1
- package/dist/DateFieldSingle.js +1 -1
- package/dist/{DateFieldYearless-m_Hl2gMY.js → DateFieldYearless-7MFcR7L6.js} +4 -4
- package/dist/{DateFieldYearless-m_Hl2gMY.js.map → DateFieldYearless-7MFcR7L6.js.map} +1 -1
- package/dist/DateFieldYearless.js +1 -1
- package/dist/{DateFieldYearlessRange-DNqSTBDr.js → DateFieldYearlessRange-DGtdyISH.js} +3 -3
- package/dist/{DateFieldYearlessRange-DNqSTBDr.js.map → DateFieldYearlessRange-DGtdyISH.js.map} +1 -1
- package/dist/DateFieldYearlessRange.js +1 -1
- package/dist/{DaysOfTheWeek-D58z_eF3.js → DaysOfTheWeek-C7oN9nIe.js} +3 -3
- package/dist/{DaysOfTheWeek-D58z_eF3.js.map → DaysOfTheWeek-C7oN9nIe.js.map} +1 -1
- package/dist/DaysOfTheWeek.js +1 -1
- package/dist/{Dialog-CvYSMvfD.js → Dialog-dE9c90iR.js} +3 -3
- package/dist/{Dialog-CvYSMvfD.js.map → Dialog-dE9c90iR.js.map} +1 -1
- package/dist/Dialog.js +1 -1
- package/dist/{Drawer-s2y0xcgV.js → Drawer-Dk0MsaOU.js} +3 -3
- package/dist/{Drawer-s2y0xcgV.js.map → Drawer-Dk0MsaOU.js.map} +1 -1
- package/dist/Drawer.js +1 -1
- package/dist/DrillDown.js +1 -1
- package/dist/{EditCard-B25pj0Jx.js → EditCard-DV2N7zWr.js} +2 -2
- package/dist/{EditCard-B25pj0Jx.js.map → EditCard-DV2N7zWr.js.map} +1 -1
- package/dist/EditCard.js +1 -1
- package/dist/{FieldLabel-D1qPAGtB.js → FieldLabel-VVn8GR64.js} +3 -3
- package/dist/{FieldLabel-D1qPAGtB.js.map → FieldLabel-VVn8GR64.js.map} +1 -1
- package/dist/FieldLabel.js +1 -1
- package/dist/{FilterBar-B4ZAs73g.js → FilterBar-CXGsoWw5.js} +6 -5
- package/dist/{FilterBar-B4ZAs73g.js.map → FilterBar-CXGsoWw5.js.map} +1 -1
- package/dist/FilterBar.js +1 -1
- package/dist/{InputMask-BDl09V4u.js → InputMask-VBHWGZGN.js} +3 -3
- package/dist/{InputMask-BDl09V4u.js.map → InputMask-VBHWGZGN.js.map} +1 -1
- package/dist/InputMask.js +1 -1
- package/dist/{ListView-DO5psxd4.js → ListView-BUrfz75g.js} +2 -2
- package/dist/{ListView-DO5psxd4.js.map → ListView-BUrfz75g.js.map} +1 -1
- package/dist/ListView.js +1 -1
- package/dist/{Listbox-CvQHBFWb.js → Listbox-CRY-0BkS.js} +2 -2
- package/dist/{Listbox-CvQHBFWb.js.map → Listbox-CRY-0BkS.js.map} +1 -1
- package/dist/Listbox.js +1 -1
- package/dist/{Menu-W0c-xKdX.js → Menu-DNJ0YqjA.js} +11 -7
- package/dist/Menu-DNJ0YqjA.js.map +1 -0
- package/dist/Menu.js +1 -1
- package/dist/MenuFooter-CrsZdXvN.js +115 -0
- package/dist/MenuFooter-CrsZdXvN.js.map +1 -0
- package/dist/MultiSelectField.js +1 -1
- package/dist/{MultiSelectFieldSync-CXX2F0ru.js → MultiSelectFieldSync-CIuy3aRD.js} +8 -53
- package/dist/MultiSelectFieldSync-CIuy3aRD.js.map +1 -0
- package/dist/MultiSelectMenu.js +1 -1
- package/dist/{MultiSelectMenuSync-EKtvlL62.js → MultiSelectMenuSync-Drz8SEk9.js} +9 -76
- package/dist/MultiSelectMenuSync-Drz8SEk9.js.map +1 -0
- package/dist/{NumberField-BymFZhIJ.js → NumberField-bgYX7JGs.js} +3 -3
- package/dist/{NumberField-BymFZhIJ.js.map → NumberField-bgYX7JGs.js.map} +1 -1
- package/dist/NumberField.js +1 -1
- package/dist/{Page-C2_Hm27h.js → Page-BSHydn4p.js} +9 -9
- package/dist/{Page-C2_Hm27h.js.map → Page-BSHydn4p.js.map} +1 -1
- package/dist/Page.js +1 -1
- package/dist/{Pagination-Bmd4JORe.js → Pagination-CAeyJ7Pl.js} +192 -26
- package/dist/Pagination-CAeyJ7Pl.js.map +1 -0
- package/dist/Pagination.css +4 -2
- package/dist/Pagination.js +1 -1
- package/dist/{Popover-8mTJoMy7.js → Popover-Cq5tirFz.js} +11 -5
- package/dist/Popover-Cq5tirFz.js.map +1 -0
- package/dist/Popover.js +1 -1
- package/dist/{ProgressBar-C1CkQHV5.js → ProgressBar-ByR50ln7.js} +2 -2
- package/dist/{ProgressBar-C1CkQHV5.js.map → ProgressBar-ByR50ln7.js.map} +1 -1
- package/dist/ProgressBar.js +1 -1
- package/dist/{Radio-BcHMk8dD.js → Radio-CPuctRpl.js} +2 -2
- package/dist/{Radio-BcHMk8dD.js.map → Radio-CPuctRpl.js.map} +1 -1
- package/dist/{Radio-D5WyQN2i.js → Radio-WlsZFRzX.js} +3 -3
- package/dist/{Radio-D5WyQN2i.js.map → Radio-WlsZFRzX.js.map} +1 -1
- package/dist/Radio.js +1 -1
- package/dist/{RichTextEditor-DstVbYch.js → RichTextEditor-CoPXdaWI.js} +78 -42
- package/dist/RichTextEditor-CoPXdaWI.js.map +1 -0
- package/dist/RichTextEditor.js +1 -1
- package/dist/{SavedFiltersButton-2qba2Cgu.js → SavedFiltersButton-DzJijqHz.js} +11 -10
- package/dist/SavedFiltersButton-DzJijqHz.js.map +1 -0
- package/dist/SavedFiltersButton.js +1 -1
- package/dist/{SelectCard-BN-LI14f.js → SelectCard-DLWLHi_i.js} +3 -3
- package/dist/{SelectCard-BN-LI14f.js.map → SelectCard-DLWLHi_i.js.map} +1 -1
- package/dist/SelectCard.js +1 -1
- package/dist/SelectField.js +1 -1
- package/dist/{SelectFieldLabel-UbQT7fDD.js → SelectFieldLabel-vemffdmu.js} +2 -2
- package/dist/{SelectFieldLabel-UbQT7fDD.js.map → SelectFieldLabel-vemffdmu.js.map} +1 -1
- package/dist/{SelectFieldSync-DykGkR_w.js → SelectFieldSync-DlGiJ-Iy.js} +5 -4
- package/dist/{SelectFieldSync-DykGkR_w.js.map → SelectFieldSync-DlGiJ-Iy.js.map} +1 -1
- package/dist/SelectMenu.js +1 -1
- package/dist/{SelectMenuSync-DTQ8Ofoz.js → SelectMenuSync-CAweNjRL.js} +6 -4
- package/dist/{SelectMenuSync-DTQ8Ofoz.js.map → SelectMenuSync-CAweNjRL.js.map} +1 -1
- package/dist/{SelectOptions-DVSOJwRy.js → SelectOptions-BGCap9fZ.js} +2 -2
- package/dist/{SelectOptions-DVSOJwRy.js.map → SelectOptions-BGCap9fZ.js.map} +1 -1
- package/dist/{SelectTrigger-CHk0KO-P.js → SelectTrigger-BbneVXMz.js} +3 -3
- package/dist/{SelectTrigger-CHk0KO-P.js.map → SelectTrigger-BbneVXMz.js.map} +1 -1
- package/dist/SelectTrigger.js +1 -1
- package/dist/{SelectTriggerBase-B2S5SOZr.js → SelectTriggerBase-BjIOERXr.js} +3 -3
- package/dist/{SelectTriggerBase-B2S5SOZr.js.map → SelectTriggerBase-BjIOERXr.js.map} +1 -1
- package/dist/{Switch-onmiKoRd.js → Switch-B6bKmpwN.js} +3 -3
- package/dist/{Switch-onmiKoRd.js.map → Switch-B6bKmpwN.js.map} +1 -1
- package/dist/Switch.js +1 -1
- package/dist/Table.js +1 -1
- package/dist/{Text-BTzgTpqu.js → Text-w2gWn4K6.js} +2 -2
- package/dist/{Text-BTzgTpqu.js.map → Text-w2gWn4K6.js.map} +1 -1
- package/dist/Text.js +1 -1
- package/dist/{TextField-WTYZJlX3.js → TextField-BQsCh5Nb.js} +2 -2
- package/dist/{TextField-WTYZJlX3.js.map → TextField-BQsCh5Nb.js.map} +1 -1
- package/dist/{TextField-rVfctM1E.js → TextField-DJ3gEIP6.js} +3 -3
- package/dist/{TextField-rVfctM1E.js.map → TextField-DJ3gEIP6.js.map} +1 -1
- package/dist/TextField.js +1 -1
- package/dist/{Textarea-PXjppEQ6.js → Textarea-BK4Vf84K.js} +3 -3
- package/dist/{Textarea-PXjppEQ6.js.map → Textarea-BK4Vf84K.js.map} +1 -1
- package/dist/Textarea.js +1 -1
- package/dist/{ThemeProvider-D4KdGCaP.js → ThemeProvider-BC6wbuLU.js} +4 -9
- package/dist/{ThemeProvider-D4KdGCaP.js.map → ThemeProvider-BC6wbuLU.js.map} +1 -1
- package/dist/ThemeProvider.js +1 -1
- package/dist/ThemeProvider.module-D9pNGYjP.js +8 -0
- package/dist/ThemeProvider.module-D9pNGYjP.js.map +1 -0
- package/dist/{TimeField-BJPXIv6W.js → TimeField-B4IW2B_o.js} +4 -4
- package/dist/{TimeField-BJPXIv6W.js.map → TimeField-B4IW2B_o.js.map} +1 -1
- package/dist/TimeField.js +1 -1
- package/dist/Toast.js +2 -2
- package/dist/{Toaster-CoChsMD0.js → Toaster-BGY2IzF5.js} +53 -48
- package/dist/Toaster-BGY2IzF5.js.map +1 -0
- package/dist/{Toaster-DXLc86VD.js → Toaster-DTF9qnTy.js} +2 -2
- package/dist/{Toaster-DXLc86VD.js.map → Toaster-DTF9qnTy.js.map} +1 -1
- package/dist/{Toolbar-Bt3kShho.js → Toolbar-DObrJ_S5.js} +5 -4
- package/dist/{Toolbar-Bt3kShho.js.map → Toolbar-DObrJ_S5.js.map} +1 -1
- package/dist/{Toolbar-DaUKbbsL.js → Toolbar-DRJGKk8D.js} +6 -5
- package/dist/{Toolbar-DaUKbbsL.js.map → Toolbar-DRJGKk8D.js.map} +1 -1
- package/dist/Toolbar.js +2 -2
- package/dist/{ToolbarButtonToggle-BPu81Wuv.js → ToolbarButtonToggle-BCKgA8FE.js} +2 -2
- package/dist/{ToolbarButtonToggle-BPu81Wuv.js.map → ToolbarButtonToggle-BCKgA8FE.js.map} +1 -1
- package/dist/{Tooltip-yr1D06BE.js → Tooltip-DqS6xDUf.js} +27 -25
- package/dist/Tooltip-DqS6xDUf.js.map +1 -0
- package/dist/Tooltip.js +1 -1
- package/dist/TreeSelectField.d.ts +1 -0
- package/dist/TreeSelectField.js +2 -0
- package/dist/TreeSelectField.js.map +1 -0
- package/dist/TreeSelectFieldSync-Do5ffU0b.js +609 -0
- package/dist/TreeSelectFieldSync-Do5ffU0b.js.map +1 -0
- package/dist/TreeSelectFieldSync.css +173 -0
- package/dist/TreeSelectMenu.d.ts +1 -0
- package/dist/TreeSelectMenu.js +2 -0
- package/dist/TreeSelectMenu.js.map +1 -0
- package/dist/TreeSelectMenuSync-s05Ly6lj.js +413 -0
- package/dist/TreeSelectMenuSync-s05Ly6lj.js.map +1 -0
- package/dist/{YearlessDateInputWithPicker-BIcVgz-J.js → YearlessDateInputWithPicker-BHfFjCqE.js} +2 -2
- package/dist/{YearlessDateInputWithPicker-BIcVgz-J.js.map → YearlessDateInputWithPicker-BHfFjCqE.js.map} +1 -1
- package/dist/beta.js +15 -13
- package/dist/beta.js.map +1 -1
- package/dist/confirmationTypes-CG7xl50f.js +75 -0
- package/dist/confirmationTypes-CG7xl50f.js.map +1 -0
- package/dist/{filter-state-Bx3aYS1r.js → filter-state-DyMDjdRS.js} +322 -82
- package/dist/filter-state-DyMDjdRS.js.map +1 -0
- package/dist/{floating-ui.react-dom-CHrYz13o.js → floating-ui.react-dom-BIKT960u.js} +2 -2
- package/dist/{floating-ui.react-dom-CHrYz13o.js.map → floating-ui.react-dom-BIKT960u.js.map} +1 -1
- package/dist/{index-DVYRUKtW.js → index-fSKD4ey4.js} +79 -109
- package/dist/{index-DVYRUKtW.js.map → index-fSKD4ey4.js.map} +1 -1
- package/dist/index.js +42 -42
- package/dist/keyboard_arrow_left-CiE1n99w.js +6 -0
- package/dist/keyboard_arrow_left-CiE1n99w.js.map +1 -0
- package/dist/keyboard_arrow_right-DMloHg_F.js +6 -0
- package/dist/keyboard_arrow_right-DMloHg_F.js.map +1 -0
- package/dist/portalScopeClassNames-jlZkdug_.js +7 -0
- package/dist/portalScopeClassNames-jlZkdug_.js.map +1 -0
- package/dist/src/beta/components/FilterBar/FilterTextInput.d.ts +29 -0
- package/dist/src/beta/components/FilterBar/index.d.ts +1 -1
- package/dist/src/beta/components/FilterBar/internal/adapters/asyncTree.d.ts +6 -0
- package/dist/src/beta/components/FilterBar/internal/adapters/textInput.d.ts +3 -0
- package/dist/src/beta/components/FilterBar/internal/adapters/tree.d.ts +6 -0
- package/dist/src/beta/components/FilterBar/internal/adapters/types.d.ts +4 -1
- package/dist/src/beta/components/FilterBar/internal/types.d.ts +69 -12
- package/dist/src/beta/components/FilterBar/internal/utils/test.d.ts +4 -1
- package/dist/src/beta/components/Table/DataTable/DataTable.d.ts +4 -6
- package/dist/src/beta/components/Table/DataTable/internal/DataTableBodyRow.d.ts +6 -1
- package/dist/src/beta/components/Table/DataTable/internal/context/focus/DTFocusContext.d.ts +1 -11
- package/dist/src/beta/components/Table/DataTable/internal/context/focus/useDTFocusDispatchContext.d.ts +0 -2
- package/dist/src/beta/components/Table/DataTable/internal/useColumnOrder.d.ts +1 -0
- package/dist/src/beta/components/TreeSelectField/TreeSelectField.d.ts +68 -0
- package/dist/src/beta/components/TreeSelectField/TreeSelectFieldSync.d.ts +64 -0
- package/dist/src/beta/components/TreeSelectField/index.d.ts +3 -0
- package/dist/src/beta/components/TreeSelectField/internal/TreeContent.d.ts +31 -0
- package/dist/src/beta/components/TreeSelectField/internal/TreePanel.d.ts +56 -0
- package/dist/src/beta/components/TreeSelectField/internal/TreeRow.d.ts +56 -0
- package/dist/src/beta/components/TreeSelectField/internal/TreeSelectFieldInput.d.ts +82 -0
- package/dist/src/beta/components/TreeSelectField/internal/VirtualizedTreePanel.d.ts +57 -0
- package/dist/src/beta/components/TreeSelectField/internal/treeSync.d.ts +33 -0
- package/dist/src/beta/components/TreeSelectField/internal/treeUtils.d.ts +25 -0
- package/dist/src/beta/components/TreeSelectField/internal/types.d.ts +12 -0
- package/dist/src/beta/components/TreeSelectField/internal/useTree.d.ts +99 -0
- package/dist/src/beta/components/TreeSelectField/internal/useTreeCascade.d.ts +93 -0
- package/dist/src/beta/components/TreeSelectField/internal/useTreeKeyboard.d.ts +42 -0
- package/dist/src/beta/components/TreeSelectField/internal/useTreeLazyCascade.d.ts +56 -0
- package/dist/src/beta/components/TreeSelectField/internal/useTreeLoader.d.ts +58 -0
- package/dist/src/beta/components/TreeSelectField/stories/TreeSelectField.stories.data.d.ts +21 -0
- package/dist/src/beta/components/TreeSelectField/types.d.ts +124 -0
- package/dist/src/beta/components/TreeSelectMenu/TreeSelectMenu.d.ts +29 -0
- package/dist/src/beta/components/TreeSelectMenu/TreeSelectMenuSync.d.ts +65 -0
- package/dist/src/beta/components/TreeSelectMenu/index.d.ts +4 -0
- package/dist/src/beta/components/TreeSelectMenu/types.d.ts +103 -0
- package/dist/src/beta/components/index.d.ts +2 -0
- package/dist/src/components/Pagination/internal/Pagination.d.ts +1 -0
- package/dist/src/components/Pagination/internal/PaginationOverflowMenu.d.ts +12 -1
- package/dist/src/internal/functions/portalScopeClassNames.d.ts +14 -0
- package/dist/src/internal/utils/arrayIdsEqual.d.ts +10 -0
- package/dist/src/internal/utils/index.d.ts +1 -0
- package/dist/{stripInlineMarkdown-C5DNxxwf.js → stripInlineMarkdown-C0bVmYgG.js} +2 -2
- package/dist/{stripInlineMarkdown-C5DNxxwf.js.map → stripInlineMarkdown-C0bVmYgG.js.map} +1 -1
- package/dist/{syncFilterUtils-BEKek64h.js → syncFilterUtils-DZqeVWTS.js} +34 -409
- package/dist/syncFilterUtils-DZqeVWTS.js.map +1 -0
- package/dist/syncFilterUtils.css +0 -180
- package/dist/treeSync-Cz3H08cr.js +1453 -0
- package/dist/treeSync-Cz3H08cr.js.map +1 -0
- package/dist/treeSync.css +40 -0
- package/dist/useAdaptiveView-CeYKH0Me.js +386 -0
- package/dist/useAdaptiveView-CeYKH0Me.js.map +1 -0
- package/dist/useAdaptiveView.css +181 -0
- package/dist/useChipLayout-BWZfKDgd.js +51 -0
- package/dist/useChipLayout-BWZfKDgd.js.map +1 -0
- package/dist/{useDrilldown-KZ9rRsXQ.js → useDrilldown-BJ2dHHKV.js} +2 -2
- package/dist/{useDrilldown-KZ9rRsXQ.js.map → useDrilldown-BJ2dHHKV.js.map} +1 -1
- package/dist/{useInfiniteCombobox-CknXmqlQ.js → useInfiniteCombobox-C6TDFfds.js} +23 -23
- package/dist/useInfiniteCombobox-C6TDFfds.js.map +1 -0
- package/dist/{useMenuInteraction-CpAOHSJu.js → useMenuInteraction-NEJXUD4I.js} +2 -114
- package/dist/useMenuInteraction-NEJXUD4I.js.map +1 -0
- package/dist/{useToggleSelection-B-Z80gy2.js → useToggleSelection-Bn7h-gGD.js} +2 -2
- package/dist/{useToggleSelection-B-Z80gy2.js.map → useToggleSelection-Bn7h-gGD.js.map} +1 -1
- package/package.json +5 -7
- package/dist/Avatar-FDHyqiCy.js.map +0 -1
- package/dist/DataTable-E8z0H8c7.js.map +0 -1
- package/dist/Menu-W0c-xKdX.js.map +0 -1
- package/dist/MultiSelectFieldSync-CXX2F0ru.js.map +0 -1
- package/dist/MultiSelectMenuSync-EKtvlL62.js.map +0 -1
- package/dist/Pagination-Bmd4JORe.js.map +0 -1
- package/dist/Popover-8mTJoMy7.js.map +0 -1
- package/dist/RichTextEditor-DstVbYch.js.map +0 -1
- package/dist/SavedFiltersButton-2qba2Cgu.js.map +0 -1
- package/dist/Toaster-CoChsMD0.js.map +0 -1
- package/dist/Tooltip-yr1D06BE.js.map +0 -1
- package/dist/filter-state-Bx3aYS1r.js.map +0 -1
- package/dist/keyboard_arrow_right-DZWNVytH.js +0 -8
- package/dist/keyboard_arrow_right-DZWNVytH.js.map +0 -1
- package/dist/syncFilterUtils-BEKek64h.js.map +0 -1
- package/dist/useInfiniteCombobox-CknXmqlQ.js.map +0 -1
- package/dist/useMenuInteraction-CpAOHSJu.js.map +0 -1
- /package/dist/{useMenuInteraction.css → MenuFooter.css} +0 -0
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
import { TreeSelectFieldNode } from '../types';
|
|
2
|
+
/**
|
|
3
|
+
* Options for the useTreeLoader hook.
|
|
4
|
+
* @property loadOptions - Async function to load tree nodes. Called with searchValue and optional parentNode.
|
|
5
|
+
* @property cache - Cache configuration. Enabled by default with maxSize of 15.
|
|
6
|
+
* @property initialLoad - Controls when the initial load occurs. "auto" and "immediate" load on mount, "open" loads on first onOpen() call.
|
|
7
|
+
* @property debounceMs - Debounce delay in milliseconds for search calls. Defaults to 200.
|
|
8
|
+
*/
|
|
9
|
+
export type UseTreeLoaderOptions = {
|
|
10
|
+
loadOptions: (searchValue: string, parentNode?: TreeSelectFieldNode) => TreeSelectFieldNode[] | Promise<TreeSelectFieldNode[]>;
|
|
11
|
+
cache?: {
|
|
12
|
+
enabled?: boolean;
|
|
13
|
+
maxSize?: number;
|
|
14
|
+
};
|
|
15
|
+
initialLoad?: "auto" | "immediate" | "open";
|
|
16
|
+
debounceMs?: number;
|
|
17
|
+
};
|
|
18
|
+
/**
|
|
19
|
+
* Return value from the useTreeLoader hook.
|
|
20
|
+
* @property nodes - The currently loaded tree nodes.
|
|
21
|
+
* @property ancestry - Durable childId → parentId map accumulated from lazy
|
|
22
|
+
* children loads; survives tree resets so off-screen selections can be
|
|
23
|
+
* attributed to their ancestors.
|
|
24
|
+
* @property isLoading - Whether a root/search load is in progress.
|
|
25
|
+
* @property isLoadingChildren - Set of node IDs whose children are currently loading.
|
|
26
|
+
* @property loadChildren - Loads children for the given branch node (lazy expansion).
|
|
27
|
+
* @property search - Triggers a search load with the given search value (debounced).
|
|
28
|
+
* @property clearCache - Clears both the search and children caches.
|
|
29
|
+
* @property invalidate - Clears both caches and triggers a fresh load.
|
|
30
|
+
* @property onOpen - Triggers the initial load when initialLoad="open". No-op otherwise or after first open.
|
|
31
|
+
*/
|
|
32
|
+
export type UseTreeLoaderReturn = {
|
|
33
|
+
nodes: TreeSelectFieldNode[];
|
|
34
|
+
ancestry: Map<string | number, string | number>;
|
|
35
|
+
isLoading: boolean;
|
|
36
|
+
isLoadingChildren: Set<string | number>;
|
|
37
|
+
loadChildren: (parentNode: TreeSelectFieldNode) => Promise<TreeSelectFieldNode[]>;
|
|
38
|
+
search: (searchValue: string) => void;
|
|
39
|
+
clearCache: () => void;
|
|
40
|
+
invalidate: () => void;
|
|
41
|
+
onOpen: () => void;
|
|
42
|
+
};
|
|
43
|
+
/**
|
|
44
|
+
* Hook that manages async loading and caching for tree data.
|
|
45
|
+
*
|
|
46
|
+
* Features:
|
|
47
|
+
* - Handles root/search loading and lazy branch expansion via a single loadOptions callback
|
|
48
|
+
* - Two separate LRU caches: one for search results, one for lazy-loaded children
|
|
49
|
+
* - Configurable cache size and opt-out support
|
|
50
|
+
* - Debounced search to reduce unnecessary loadOptions calls
|
|
51
|
+
* - initialLoad modes: "immediate"/"auto" load on mount, "open" defers until onOpen() is called
|
|
52
|
+
* - Children are merged into the node tree after loading, updating children: null to the loaded array
|
|
53
|
+
* - invalidate() clears caches and triggers a fresh load of the current view
|
|
54
|
+
*
|
|
55
|
+
* @param options - Configuration options for the tree loader.
|
|
56
|
+
* @returns Current nodes, loading states, and loader control functions.
|
|
57
|
+
*/
|
|
58
|
+
export declare function useTreeLoader(options: UseTreeLoaderOptions): UseTreeLoaderReturn;
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { TreeSelectFieldNode } from '../types';
|
|
2
|
+
/**
|
|
3
|
+
* Realistic multi-level org chart for stories and tests.
|
|
4
|
+
* 4 levels deep: Company divisions > Departments > Teams > Individuals
|
|
5
|
+
*/
|
|
6
|
+
export declare const orgChart: TreeSelectFieldNode[];
|
|
7
|
+
/**
|
|
8
|
+
* Async version: root nodes with children: null (lazy-loaded).
|
|
9
|
+
*/
|
|
10
|
+
export declare const asyncOrgChartRoots: TreeSelectFieldNode[];
|
|
11
|
+
/**
|
|
12
|
+
* Simulates an async loadOptions for stories.
|
|
13
|
+
* Supports search filtering on roots and lazy child loading.
|
|
14
|
+
*/
|
|
15
|
+
export declare function simulatedLoadOptions(searchValue: string, parentNode?: TreeSelectFieldNode): Promise<TreeSelectFieldNode[]>;
|
|
16
|
+
/**
|
|
17
|
+
* Simulates multi-level lazy loading. Each expansion returns immediate
|
|
18
|
+
* children with branches having children: null (requiring another load).
|
|
19
|
+
* Every level shows a spinner while loading.
|
|
20
|
+
*/
|
|
21
|
+
export declare function multiLevelLoadOptions(searchValue: string, parentNode?: TreeSelectFieldNode): Promise<TreeSelectFieldNode[]>;
|
|
@@ -0,0 +1,124 @@
|
|
|
1
|
+
import { CSSProperties, ReactElement, ReactNode } from 'react';
|
|
2
|
+
import { AiMarkWithTooltipOrPopoverProps, LayoutUtilProps, Size } from '../../../types';
|
|
3
|
+
import { OptionContent } from '../../../internal/types/optionContent';
|
|
4
|
+
/**
|
|
5
|
+
* Rich content configuration for a TreeSelectField option row.
|
|
6
|
+
* Controls the avatar, icon, description, and chip display within an option.
|
|
7
|
+
*/
|
|
8
|
+
export type TreeSelectFieldOptionContent = OptionContent;
|
|
9
|
+
/**
|
|
10
|
+
* A node in the tree structure.
|
|
11
|
+
* @property id - Unique identifier for the node.
|
|
12
|
+
* @property label - Display text for the node.
|
|
13
|
+
* @property searchText - Additional text to match during search, beyond label.
|
|
14
|
+
* @property disabled - Whether the node is disabled for selection.
|
|
15
|
+
* @property extra - Pass-through data for consumer convenience.
|
|
16
|
+
* @property children - Child nodes. undefined=leaf, []=empty branch, [...]=branch, null=unloaded (lazy).
|
|
17
|
+
* @property childCount - Server-provided count, optionally displayed on branch nodes.
|
|
18
|
+
* @property path - Optional ancestor ids, root→parent. Selection-ancestry
|
|
19
|
+
* metadata, primarily meaningful on value objects: when a selected node lives
|
|
20
|
+
* under branches that aren't currently loaded, `path` lets the field show the
|
|
21
|
+
* correct ancestor check states without a parent-of lookup. The field emits
|
|
22
|
+
* it on selections whose ancestry it knows, and reads it from incoming value
|
|
23
|
+
* so a persisted-then-restored selection resolves exactly. Not a structural
|
|
24
|
+
* tree attribute — omit it on `loadOptions` results.
|
|
25
|
+
*/
|
|
26
|
+
export type TreeSelectFieldNode = {
|
|
27
|
+
id: string | number;
|
|
28
|
+
label: string;
|
|
29
|
+
searchText?: string;
|
|
30
|
+
disabled?: boolean;
|
|
31
|
+
extra?: Record<string, unknown>;
|
|
32
|
+
content?: TreeSelectFieldOptionContent;
|
|
33
|
+
children?: TreeSelectFieldNode[] | null;
|
|
34
|
+
childCount?: number;
|
|
35
|
+
path?: (string | number)[];
|
|
36
|
+
};
|
|
37
|
+
/**
|
|
38
|
+
* The value shape stored in the value array. Intentionally slim — just enough to render chips and identify the node.
|
|
39
|
+
* @property id - The node's unique identifier.
|
|
40
|
+
* @property label - The node's display text.
|
|
41
|
+
* @property extra - Pass-through data from the node.
|
|
42
|
+
* @property path - Optional ancestor ids, root→parent. See {@link TreeSelectFieldNode.path}.
|
|
43
|
+
*/
|
|
44
|
+
export type TreeSelectFieldValue = Pick<TreeSelectFieldNode, "id" | "label" | "extra" | "path">;
|
|
45
|
+
/**
|
|
46
|
+
* Controls which nodes are selectable and how the value array is shaped.
|
|
47
|
+
* - "ALL" — any node selectable, all checked nodes in value
|
|
48
|
+
* - "BRANCH_PRIORITY" — any node selectable, branches replace leaves when fully checked
|
|
49
|
+
* - "BRANCH_ONLY" — only branches selectable, leaves visible but inert
|
|
50
|
+
* - "LEAF_PRIORITY" — only leaves selectable (branches expand), leaves + childless branches in value
|
|
51
|
+
* - "LEAF_ONLY" — only leaves selectable (branches expand), strictly leaves in value
|
|
52
|
+
*/
|
|
53
|
+
export type TreeSelectFieldValueConsistsOf = "ALL" | "BRANCH_PRIORITY" | "BRANCH_ONLY" | "LEAF_PRIORITY" | "LEAF_ONLY";
|
|
54
|
+
/**
|
|
55
|
+
* Imperative handle for the TreeSelectField component.
|
|
56
|
+
* @property clearCache - Clears the options cache.
|
|
57
|
+
* @property invalidate - Clears the cache and triggers a fresh options load.
|
|
58
|
+
* @property expandAll - Expands all tree nodes.
|
|
59
|
+
* @property collapseAll - Collapses all tree nodes.
|
|
60
|
+
*/
|
|
61
|
+
export type TreeSelectFieldHandle = {
|
|
62
|
+
clearCache: () => void;
|
|
63
|
+
invalidate: () => void;
|
|
64
|
+
expandAll: () => void;
|
|
65
|
+
collapseAll: () => void;
|
|
66
|
+
};
|
|
67
|
+
/**
|
|
68
|
+
* Props for the TreeSelectField component.
|
|
69
|
+
* @property label - Required label for accessibility.
|
|
70
|
+
* @property value - Controlled value array. Always an array, even in single-select mode.
|
|
71
|
+
* @property onSelectedOptionsChange - Callback when selection changes.
|
|
72
|
+
* @property loadOptions - Async function to load tree nodes. Called with parentNode for lazy branch loading.
|
|
73
|
+
* @property selectionMode - "single": one node at a time. "independent": no cascade. "linked" (default): parent-child cascade.
|
|
74
|
+
* @property valueConsistsOf - Controls which nodes are selectable and how the value is shaped.
|
|
75
|
+
* @property defaultExpandLevel - Initial expand depth. 0=collapsed, Infinity=all.
|
|
76
|
+
* @extends LayoutUtilProps
|
|
77
|
+
*/
|
|
78
|
+
export type TreeSelectFieldProps = {
|
|
79
|
+
id?: string;
|
|
80
|
+
label: string;
|
|
81
|
+
labelNode?: ReactNode;
|
|
82
|
+
hideLabel?: boolean;
|
|
83
|
+
placeholder?: string;
|
|
84
|
+
size?: Extract<Size, "small" | "medium" | "large">;
|
|
85
|
+
displayMenuAs?: "auto" | "popover" | "dialog";
|
|
86
|
+
error?: boolean | string | string[] | ReactElement;
|
|
87
|
+
hint?: ReactElement | string;
|
|
88
|
+
/** Additional information to display in a tooltip next to the label. */
|
|
89
|
+
moreInfo?: ReactNode;
|
|
90
|
+
/**
|
|
91
|
+
* AI mark configuration to display next to the label.
|
|
92
|
+
* Can be a boolean to show a simple AI mark, or an object with tooltip/popover configuration.
|
|
93
|
+
*/
|
|
94
|
+
labelAiMark?: AiMarkWithTooltipOrPopoverProps["aiMark"];
|
|
95
|
+
description?: ReactElement | string;
|
|
96
|
+
warning?: string | string[];
|
|
97
|
+
required?: boolean;
|
|
98
|
+
disabled?: boolean;
|
|
99
|
+
readOnly?: boolean;
|
|
100
|
+
prefix?: string | ReactElement;
|
|
101
|
+
suffix?: string | ReactElement;
|
|
102
|
+
className?: string;
|
|
103
|
+
style?: CSSProperties;
|
|
104
|
+
disableSearch?: boolean;
|
|
105
|
+
debounceMs?: number;
|
|
106
|
+
searchValue?: string;
|
|
107
|
+
onSearchChange?: (v: string) => void;
|
|
108
|
+
singleRow?: boolean;
|
|
109
|
+
maxChips?: number;
|
|
110
|
+
virtualize?: boolean;
|
|
111
|
+
value: TreeSelectFieldValue[];
|
|
112
|
+
onSelectedOptionsChange: (nodes: TreeSelectFieldValue[]) => void;
|
|
113
|
+
selectionMode?: "single" | "independent" | "linked";
|
|
114
|
+
valueConsistsOf?: TreeSelectFieldValueConsistsOf;
|
|
115
|
+
defaultExpandLevel?: number;
|
|
116
|
+
expandedIds?: Set<string | number>;
|
|
117
|
+
onExpandedIdsChange?: (ids: Set<string | number>) => void;
|
|
118
|
+
loadOptions: (searchValue: string, parentNode?: TreeSelectFieldNode) => TreeSelectFieldNode[] | Promise<TreeSelectFieldNode[]>;
|
|
119
|
+
cache?: {
|
|
120
|
+
enabled?: boolean;
|
|
121
|
+
maxSize?: number;
|
|
122
|
+
};
|
|
123
|
+
initialLoad?: "auto" | "immediate" | "open";
|
|
124
|
+
} & LayoutUtilProps;
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import { TreeSelectMenuProps } from './types';
|
|
2
|
+
/**
|
|
3
|
+
* TreeSelectMenu component for selecting tree nodes from a dropdown triggered by any element.
|
|
4
|
+
*
|
|
5
|
+
* Features:
|
|
6
|
+
* - Attaches to any trigger element via a render prop
|
|
7
|
+
* - Async tree data loading via loadOptions callback with optional LRU caching
|
|
8
|
+
* - Single-select and multi-select modes with linked/independent cascade
|
|
9
|
+
* - Cascading parent/child selection in linked mode
|
|
10
|
+
* - Search filtering across visible nodes
|
|
11
|
+
* - Lazy branch expansion with on-demand children loading
|
|
12
|
+
* - Virtualized rendering for large trees via the virtualize prop
|
|
13
|
+
* - Full keyboard navigation (ArrowDown/Up, ArrowRight/Left, Enter, Home/End, Escape)
|
|
14
|
+
* - Supports both popover and dialog display modes
|
|
15
|
+
* - Adaptive display based on device (mobile uses dialog)
|
|
16
|
+
* - Configurable popover width
|
|
17
|
+
* - Imperative handle for clearCache, invalidate, expandAll, collapseAll
|
|
18
|
+
* - Full accessibility support with ARIA tree attributes
|
|
19
|
+
*
|
|
20
|
+
* @example
|
|
21
|
+
* <TreeSelectMenu
|
|
22
|
+
* trigger={(props) => <Button {...props}>Select Categories</Button>}
|
|
23
|
+
* label="Categories"
|
|
24
|
+
* value={selected}
|
|
25
|
+
* onSelectedOptionsChange={setSelected}
|
|
26
|
+
* loadOptions={async (search) => fetchCategories(search)}
|
|
27
|
+
* />
|
|
28
|
+
*/
|
|
29
|
+
export declare const TreeSelectMenu: import('react').ForwardRefExoticComponent<TreeSelectMenuProps & import('react').RefAttributes<import('..').TreeSelectFieldHandle>>;
|
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
import { MatchSorterOptions } from 'match-sorter';
|
|
2
|
+
import { TreeSelectMenuNode, TreeSelectMenuProps } from './types';
|
|
3
|
+
import { TreeSyncFilterFn } from '../TreeSelectField/internal/treeSync';
|
|
4
|
+
export type { TreeSyncFilterFn };
|
|
5
|
+
/**
|
|
6
|
+
* Props for the TreeSelectMenuSync component.
|
|
7
|
+
* @property options - The static tree options to display.
|
|
8
|
+
* @property filter - Custom filter function or MatchSorterOptions to control how nodes are filtered during search.
|
|
9
|
+
* By default, filters by label and searchText using match-sorter, preserving parent nodes of any match.
|
|
10
|
+
* @extends TreeSelectMenuProps
|
|
11
|
+
*/
|
|
12
|
+
export type TreeSelectMenuSyncProps = Omit<TreeSelectMenuProps, "loadOptions" | "debounceMs" | "cache" | "initialLoad"> & {
|
|
13
|
+
/**
|
|
14
|
+
* The static tree options to display in the menu.
|
|
15
|
+
*/
|
|
16
|
+
options: TreeSelectMenuNode[];
|
|
17
|
+
/**
|
|
18
|
+
* Controls how options are filtered when the user types a search value.
|
|
19
|
+
* Can be a function that returns nodes in the desired display order,
|
|
20
|
+
* or a MatchSorterOptions object to customize the default match-sorter behavior.
|
|
21
|
+
*
|
|
22
|
+
* By default, nodes are filtered by `label` and `searchText` using match-sorter,
|
|
23
|
+
* and parents of matching nodes are preserved in the tree structure.
|
|
24
|
+
*
|
|
25
|
+
* @example
|
|
26
|
+
* <TreeSelectMenuSync
|
|
27
|
+
* options={options}
|
|
28
|
+
* filter={(nodes, searchValue) => {
|
|
29
|
+
* return nodes.filter((node) =>
|
|
30
|
+
* node.label.toLowerCase().includes(searchValue.toLowerCase())
|
|
31
|
+
* );
|
|
32
|
+
* }}
|
|
33
|
+
* />
|
|
34
|
+
*
|
|
35
|
+
* @example
|
|
36
|
+
* <TreeSelectMenuSync
|
|
37
|
+
* options={options}
|
|
38
|
+
* filter={{ keys: ["label"] }}
|
|
39
|
+
* />
|
|
40
|
+
*/
|
|
41
|
+
filter?: TreeSyncFilterFn | MatchSorterOptions<TreeSelectMenuNode>;
|
|
42
|
+
};
|
|
43
|
+
/**
|
|
44
|
+
* TreeSelectMenuSync is a simplified wrapper around TreeSelectMenu for static (non-async) tree data.
|
|
45
|
+
*
|
|
46
|
+
* Features:
|
|
47
|
+
* - Accepts static `options` instead of `loadOptions`.
|
|
48
|
+
* - Performs client-side filtering with tree-structure awareness (parents of matches are preserved).
|
|
49
|
+
* - Accepts a custom filter function or MatchSorterOptions to customize filtering behavior.
|
|
50
|
+
* - Invalidates the menu when the options reference changes.
|
|
51
|
+
* - Supports all other props of TreeSelectMenu.
|
|
52
|
+
*
|
|
53
|
+
* @example
|
|
54
|
+
* <TreeSelectMenuSync
|
|
55
|
+
* trigger={(props) => <Button {...props}>Select location</Button>}
|
|
56
|
+
* label="Select location"
|
|
57
|
+
* options={locationTree}
|
|
58
|
+
* value={selected}
|
|
59
|
+
* onSelectedOptionsChange={setSelected}
|
|
60
|
+
* />
|
|
61
|
+
*/
|
|
62
|
+
export declare const TreeSelectMenuSync: {
|
|
63
|
+
(props: TreeSelectMenuSyncProps): import("react/jsx-runtime").JSX.Element;
|
|
64
|
+
displayName: string;
|
|
65
|
+
};
|
|
@@ -0,0 +1,103 @@
|
|
|
1
|
+
import { KeyboardEvent, ReactElement, RefObject } from 'react';
|
|
2
|
+
import { ConfirmationProp } from '../../../internal/types/confirmationTypes';
|
|
3
|
+
import { TreeSelectFieldNode as TreeSelectMenuNode, TreeSelectFieldValue as TreeSelectMenuValue, TreeSelectFieldValueConsistsOf as TreeSelectMenuValueConsistsOf, TreeSelectFieldHandle, TreeSelectFieldOptionContent as TreeSelectMenuOptionContent } from '../TreeSelectField/types';
|
|
4
|
+
/**
|
|
5
|
+
* Configures a "Clear" button in the menu footer. Presence of this prop
|
|
6
|
+
* enables the button; omit to suppress.
|
|
7
|
+
*
|
|
8
|
+
* - `onClick` — called when the user clicks Clear.
|
|
9
|
+
* - `label` — button label (default "Clear").
|
|
10
|
+
* - `disabled` — whether the button is inert. Filter adapters typically tie
|
|
11
|
+
* this to `!isActive(filter)` so the button is dim when nothing is selected.
|
|
12
|
+
*/
|
|
13
|
+
export type TreeSelectMenuClearConfig = {
|
|
14
|
+
onClick: () => void;
|
|
15
|
+
label?: string;
|
|
16
|
+
disabled?: boolean;
|
|
17
|
+
};
|
|
18
|
+
export type { TreeSelectMenuNode, TreeSelectMenuValue, TreeSelectMenuValueConsistsOf, TreeSelectMenuOptionContent, };
|
|
19
|
+
/**
|
|
20
|
+
* Imperative handle for the TreeSelectMenu component.
|
|
21
|
+
* @property clearCache - Clears the options cache.
|
|
22
|
+
* @property invalidate - Clears the cache and triggers a fresh options load.
|
|
23
|
+
* @property expandAll - Expands all tree nodes.
|
|
24
|
+
* @property collapseAll - Collapses all tree nodes.
|
|
25
|
+
*/
|
|
26
|
+
export type TreeSelectMenuHandle = TreeSelectFieldHandle;
|
|
27
|
+
/**
|
|
28
|
+
* Props provided to the trigger render function.
|
|
29
|
+
* @property ref - Ref to attach to the trigger element for positioning and focus restoration
|
|
30
|
+
* @property onClick - Click handler to toggle the menu
|
|
31
|
+
* @property onKeyDown - Key handler for keyboard navigation
|
|
32
|
+
* @property aria-haspopup - ARIA attribute indicating the trigger opens a tree
|
|
33
|
+
* @property aria-controls - ARIA attribute linking to the tree element
|
|
34
|
+
* @property aria-expanded - ARIA attribute indicating whether the menu is open
|
|
35
|
+
* @property data-state - Data attribute indicating the open/close state
|
|
36
|
+
*/
|
|
37
|
+
export type TreeSelectMenuTriggerProps = {
|
|
38
|
+
ref: RefObject<HTMLButtonElement>;
|
|
39
|
+
onClick: () => void;
|
|
40
|
+
onKeyDown: (e: KeyboardEvent<HTMLButtonElement>) => void;
|
|
41
|
+
"aria-haspopup": "tree";
|
|
42
|
+
"aria-controls": string;
|
|
43
|
+
"aria-expanded": boolean;
|
|
44
|
+
"data-state": "open" | "close";
|
|
45
|
+
};
|
|
46
|
+
/**
|
|
47
|
+
* Props for the TreeSelectMenu component.
|
|
48
|
+
* @property id - Optional id for the menu; an internal id is generated when omitted.
|
|
49
|
+
* @property trigger - Render function that receives trigger props and returns the element that opens the menu.
|
|
50
|
+
* @property onMenuKeyDown - Called for key events on the open menu, after internal navigation handling.
|
|
51
|
+
* @property onImplicitClose - Called when the menu closes implicitly (outside click, blur, Escape).
|
|
52
|
+
* @property onExplicitClose - Called when the menu closes from an explicit selection or trigger toggle.
|
|
53
|
+
* @property label - Accessible label for the menu. Used by screen readers but not rendered visually.
|
|
54
|
+
* @property searchPlaceholder - Placeholder text for the search input inside the menu.
|
|
55
|
+
* @property displayMenuAs - "auto" (default): popover on desktop, dialog on mobile; or force "popover"/"dialog".
|
|
56
|
+
* @property virtualize - When true, renders the tree with windowed virtualization for large datasets.
|
|
57
|
+
* @property disableSearch - Hides the search input and disables search filtering.
|
|
58
|
+
* @property popoverWidth - Width of the popover. Accepts a CSS width value or "reference" to match trigger width.
|
|
59
|
+
* @property debounceMs - Milliseconds to debounce search input before calling loadOptions. Defaults to 200.
|
|
60
|
+
* @property onSearchChange - Called when the search value changes. Pair with controlled search wiring.
|
|
61
|
+
* @property value - Controlled value array. Always an array, even in single-select mode.
|
|
62
|
+
* @property onSelectedOptionsChange - Callback when selection changes.
|
|
63
|
+
* @property selectionMode - "single": one node at a time. "independent": no cascade. "linked" (default): parent-child cascade.
|
|
64
|
+
* @property valueConsistsOf - Controls which nodes are selectable and how the value is shaped.
|
|
65
|
+
* @property defaultExpandLevel - Initial expand depth. 0=collapsed, Infinity=all.
|
|
66
|
+
* @property expandedIds - Controlled set of expanded branch node ids. Pair with onExpandedIdsChange.
|
|
67
|
+
* @property onExpandedIdsChange - Called when the expanded set changes (controlled expansion).
|
|
68
|
+
* @property loadOptions - Async function to load tree nodes. Called with parentNode for lazy branch loading.
|
|
69
|
+
* @property cache - LRU cache configuration for loadOptions results ({ enabled, maxSize }).
|
|
70
|
+
* @property initialLoad - When loadOptions first runs: "immediate" on mount, "open" when the menu opens, or "auto".
|
|
71
|
+
* @property confirmation - When set, selections are buffered as a draft inside the open menu and only commit on Apply; dismissing the menu discards the draft. Pass `true` for default Apply/Cancel labels, or an object to customize.
|
|
72
|
+
* @property clear - Configures a "Clear" button in the menu footer. Omit to suppress.
|
|
73
|
+
*/
|
|
74
|
+
export type TreeSelectMenuProps = {
|
|
75
|
+
id?: string;
|
|
76
|
+
trigger: (props: TreeSelectMenuTriggerProps) => ReactElement;
|
|
77
|
+
onMenuKeyDown?: (e: KeyboardEvent) => void;
|
|
78
|
+
onImplicitClose?: () => void;
|
|
79
|
+
onExplicitClose?: () => void;
|
|
80
|
+
label: string;
|
|
81
|
+
searchPlaceholder?: string;
|
|
82
|
+
displayMenuAs?: "auto" | "popover" | "dialog";
|
|
83
|
+
virtualize?: boolean;
|
|
84
|
+
disableSearch?: boolean;
|
|
85
|
+
popoverWidth?: "reference" | number | string;
|
|
86
|
+
debounceMs?: number;
|
|
87
|
+
onSearchChange?: (v: string) => void;
|
|
88
|
+
value: TreeSelectMenuValue[];
|
|
89
|
+
onSelectedOptionsChange: (nodes: TreeSelectMenuValue[]) => void;
|
|
90
|
+
selectionMode?: "single" | "independent" | "linked";
|
|
91
|
+
valueConsistsOf?: TreeSelectMenuValueConsistsOf;
|
|
92
|
+
defaultExpandLevel?: number;
|
|
93
|
+
expandedIds?: Set<string | number>;
|
|
94
|
+
onExpandedIdsChange?: (ids: Set<string | number>) => void;
|
|
95
|
+
loadOptions: (searchValue: string, parentNode?: TreeSelectMenuNode) => TreeSelectMenuNode[] | Promise<TreeSelectMenuNode[]>;
|
|
96
|
+
cache?: {
|
|
97
|
+
enabled?: boolean;
|
|
98
|
+
maxSize?: number;
|
|
99
|
+
};
|
|
100
|
+
initialLoad?: "auto" | "immediate" | "open";
|
|
101
|
+
confirmation?: ConfirmationProp;
|
|
102
|
+
clear?: TreeSelectMenuClearConfig;
|
|
103
|
+
};
|
|
@@ -44,6 +44,7 @@ export declare const Pagination: import('react').ForwardRefExoticComponent<Omit<
|
|
|
44
44
|
startPage: number;
|
|
45
45
|
endPage: number;
|
|
46
46
|
length: number;
|
|
47
|
+
currentPage: number;
|
|
47
48
|
onItemClick: (page: number) => void;
|
|
48
49
|
} & import('react').RefAttributes<HTMLLIElement>>;
|
|
49
50
|
ItemsPerPageMenu: import('react').ForwardRefExoticComponent<import('./PaginationItemsPerPageMenu').PaginationItemsPerPageMenuProps & import('react').RefAttributes<HTMLDivElement>>;
|
|
@@ -16,6 +16,10 @@ export type PaginationOverflowMenuProps = ComponentPropsWithoutRef<"li"> & {
|
|
|
16
16
|
* The number of pages in the overflow range.
|
|
17
17
|
*/
|
|
18
18
|
length: number;
|
|
19
|
+
/**
|
|
20
|
+
* The current active page in the parent pagination.
|
|
21
|
+
*/
|
|
22
|
+
currentPage: number;
|
|
19
23
|
/**
|
|
20
24
|
* Callback function called when a page in the overflow menu is selected.
|
|
21
25
|
* @param page The selected page number
|
|
@@ -27,7 +31,9 @@ export type PaginationOverflowMenuProps = ComponentPropsWithoutRef<"li"> & {
|
|
|
27
31
|
*
|
|
28
32
|
* Features:
|
|
29
33
|
* - Displays ellipsis menu for large page ranges
|
|
30
|
-
* -
|
|
34
|
+
* - Renders the page items as a virtualized window — only the slice visible
|
|
35
|
+
* in the scroller is in the DOM at any time, keeping pagination cheap
|
|
36
|
+
* even when the overflow spans tens of thousands of pages
|
|
31
37
|
* - Integrates with pagination navigation system
|
|
32
38
|
* - Fully accessible with proper ARIA labels
|
|
33
39
|
* - Consistent styling with design system
|
|
@@ -37,6 +43,7 @@ export type PaginationOverflowMenuProps = ComponentPropsWithoutRef<"li"> & {
|
|
|
37
43
|
* startPage={4}
|
|
38
44
|
* endPage={8}
|
|
39
45
|
* length={5}
|
|
46
|
+
* currentPage={4}
|
|
40
47
|
* onItemClick={(page) => console.log('Page selected:', page)}
|
|
41
48
|
* />
|
|
42
49
|
*/
|
|
@@ -53,6 +60,10 @@ export declare const PaginationOverflowMenu: import('react').ForwardRefExoticCom
|
|
|
53
60
|
* The number of pages in the overflow range.
|
|
54
61
|
*/
|
|
55
62
|
length: number;
|
|
63
|
+
/**
|
|
64
|
+
* The current active page in the parent pagination.
|
|
65
|
+
*/
|
|
66
|
+
currentPage: number;
|
|
56
67
|
/**
|
|
57
68
|
* Callback function called when a page in the overflow menu is selected.
|
|
58
69
|
* @param page The selected page number
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Class names that re-establish the Anvil2 styling scope on a container.
|
|
3
|
+
*
|
|
4
|
+
* Native `popover` / top-layer elements (toasts, popovers, tooltips, surfaces)
|
|
5
|
+
* are promoted to the top layer and live high in the DOM, escaping any ancestor
|
|
6
|
+
* `AnvilProvider`'s `.anvil2` scope. Without the scope, descendants resolve none
|
|
7
|
+
* of the `--a2-*` design tokens (defined on `.anvil2.theme-core`) and miss the
|
|
8
|
+
* scoped component rules, so they render unstyled.
|
|
9
|
+
*
|
|
10
|
+
* Spread/append these class names onto such containers so they self-scope and
|
|
11
|
+
* render correctly in any host context (including outside an `AnvilProvider`,
|
|
12
|
+
* e.g. when an Anvil2 component is used from a legacy host).
|
|
13
|
+
*/
|
|
14
|
+
export declare const portalScopeClassNames: string;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Shallow set-equality of two value arrays by `id`, order-independent.
|
|
3
|
+
*
|
|
4
|
+
* Used as the `isEqual` comparator for `useConfirmationDraft` so that a draft
|
|
5
|
+
* is considered unchanged when it holds the same set of selected items as the
|
|
6
|
+
* committed value, regardless of order.
|
|
7
|
+
*/
|
|
8
|
+
export declare function arrayIdsEqual<T extends {
|
|
9
|
+
id: string | number;
|
|
10
|
+
}>(a: T[], b: T[]): boolean;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { I as INLINE_MARKDOWN_REGEX } from './FieldLabel-
|
|
1
|
+
import { I as INLINE_MARKDOWN_REGEX } from './FieldLabel-VVn8GR64.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-C0bVmYgG.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"stripInlineMarkdown-
|
|
1
|
+
{"version":3,"file":"stripInlineMarkdown-C0bVmYgG.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;;;;"}
|