@cgi-learning-hub/ui 1.5.0 → 1.5.1-dev.1744639457
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/dist/Alert-5zQ9TB22.cjs +1 -0
- package/dist/{Alert-D7eKsj1P.js → Alert-CDbAJ9jP.js} +27 -28
- package/dist/Autocomplete-2DWwLqO5.cjs +6 -0
- package/dist/{Autocomplete-Cfz4sLy8.js → Autocomplete-DO8kdiDn.js} +704 -665
- package/dist/Backdrop-Be5Hv5U8.cjs +1 -0
- package/dist/{Backdrop-COiz4sPF.js → Backdrop-CRrNkGxU.js} +18 -18
- package/dist/{Box-C-j-U8SH.js → Box-2IEW8Uij.js} +12 -12
- package/dist/Box-Bl24J58B.cjs +1 -0
- package/dist/Button-CZTPCtLu.cjs +1 -0
- package/dist/{Button-CQQdMCSm.js → Button-DYWfAsGe.js} +114 -148
- package/dist/{ButtonBase-CZFKUUHD.js → ButtonBase-BZXGvriS.js} +24 -24
- package/dist/{ButtonBase-NqQjeQ4X.cjs → ButtonBase-DDgwUJIY.cjs} +1 -1
- package/dist/CardContent-CCMZ6TlJ.cjs +1 -0
- package/dist/{CardContent-sX9Bw4Ke.js → CardContent-oRdx06Ln.js} +5 -5
- package/dist/{Checkbox-1Zr36vDa.js → Checkbox-DMnS1qrF.js} +95 -68
- package/dist/Checkbox-Dsa-pj_7.cjs +1 -0
- package/dist/Chip-BJSNxQBQ.cjs +1 -0
- package/dist/{Chip-BsErraqe.js → Chip-CacnC2L1.js} +53 -54
- package/dist/CircularProgress-XGMwsxSL.cjs +28 -0
- package/dist/{CircularProgress-BBHGA0JX.js → CircularProgress-_VZwmayK.js} +28 -29
- package/dist/{Close-r-ZUhk0-.js → Close-CSvE0tu1.js} +1 -1
- package/dist/{Close-ZXg7X3Tz.cjs → Close-Czm0dlR9.cjs} +1 -1
- package/dist/{CloseRounded-CWmxueMc.cjs → CloseRounded-BkPBIz0q.cjs} +1 -1
- package/dist/{CloseRounded-B-eaQsyM.js → CloseRounded-CEX-NsA7.js} +1 -1
- package/dist/CustomTreeItem-CI47uzgL.cjs +3 -0
- package/dist/{CustomTreeItem-BpAK85gf.js → CustomTreeItem-DTV3xokL.js} +287 -289
- package/dist/{DatePicker-CWMXTgRG.js → DatePicker-C-toYUpc.js} +995 -1002
- package/dist/DatePicker-DbH5IN_w.cjs +13 -0
- package/dist/{DefaultPropsProvider-CXfMJdg8.js → DefaultPropsProvider-Bg-6nX-u.js} +53 -53
- package/dist/DefaultPropsProvider-DLSItMqn.cjs +1 -0
- package/dist/{Delete-CpTtpM4U.cjs → Delete-C0hR-twe.cjs} +1 -1
- package/dist/{Delete-DKn2lIDB.js → Delete-Pl5O0eBK.js} +1 -1
- package/dist/{Dialog-pU1ZAttp.js → Dialog-BGrQDZXr.js} +162 -169
- package/dist/Dialog-D1VJ5jXx.cjs +1 -0
- package/dist/DialogContent-DqdeAbSs.cjs +1 -0
- package/dist/{DialogContent-BEgapieO.js → DialogContent-ZiO3fkfO.js} +3 -3
- package/dist/DialogTitle-B3MlGamo.cjs +1 -0
- package/dist/{DialogTitle-Dcls3mcZ.js → DialogTitle-BiZ7zHp-.js} +7 -7
- package/dist/{Divider-CT4XaEn6.js → Divider-BDN4OyrO.js} +8 -8
- package/dist/Divider-I7KOokm8.cjs +1 -0
- package/dist/{Folder-DoEl37QZ.js → Folder-CF7SX2AD.js} +1 -1
- package/dist/{Folder-DWD_1Fux.cjs → Folder-ExV_xCn6.cjs} +1 -1
- package/dist/{FormLabel-BF6m-_uI.js → FormLabel-DNsUciXe.js} +24 -25
- package/dist/FormLabel-xZr5oZgx.cjs +2 -0
- package/dist/{Grow-Bk7XkPFP.js → Grow-CLBgYoz_.js} +5 -5
- package/dist/Grow-DrEdqZgX.cjs +1 -0
- package/dist/IconButton-C1I_233O.cjs +2 -0
- package/dist/{IconButton-BQW0xjdH.js → IconButton-CT0Plyy5.js} +26 -27
- package/dist/{InputAdornment-C6UfLaud.js → InputAdornment-Ci0BnJ_e.js} +10 -11
- package/dist/InputAdornment-_UPzajRP.cjs +1 -0
- package/dist/InputBase-C-ES3FPH.cjs +3 -0
- package/dist/{InputBase-YOnatBxw.js → InputBase-CJvM-WXJ.js} +261 -256
- package/dist/{Link-C3rf4gqc.js → Link-B6LNMjac.js} +15 -16
- package/dist/Link-BQrFDQ-K.cjs +1 -0
- package/dist/{List-CFInjv2S.js → List-22h7byk_.js} +2 -2
- package/dist/List-Bii833np.cjs +1 -0
- package/dist/{ListItem-BAAZxsu5.js → ListItem-B0syBgS7.js} +17 -17
- package/dist/ListItem-BtjE87R1.cjs +1 -0
- package/dist/ListItemText-Dov-H_Ii.cjs +2 -0
- package/dist/ListItemText-zFoA_mgx.js +845 -0
- package/dist/Menu-4e60iiMU.cjs +7 -0
- package/dist/{Menu-BgO92SV3.js → Menu-B6t_52q7.js} +405 -335
- package/dist/MenuItem-De2MJkYT.cjs +1 -0
- package/dist/{MenuItem-B8eWAj8E.js → MenuItem-KNXRjnwO.js} +14 -14
- package/dist/{Modal-CFv4UMTP.js → Modal-BpJ9BCOo.js} +239 -245
- package/dist/Modal-JAWJUstF.cjs +2 -0
- package/dist/{MoreVert-Dq8BqKg4.js → MoreVert-BtC5XWOR.js} +1 -1
- package/dist/{MoreVert-B_Gz5Gfx.cjs → MoreVert-MSZXYrMO.cjs} +1 -1
- package/dist/{Paper-DeL_n4k9.js → Paper-BTFv1nzl.js} +9 -9
- package/dist/Paper-CKG165jt.cjs +2 -0
- package/dist/Popper-CyH7Z-lN.cjs +4 -0
- package/dist/{Popper-BKxRTMsO.js → Popper-YJsxmJsm.js} +10 -10
- package/dist/Portal-CtsVKOQ9.js +85 -0
- package/dist/Portal-LP7SUKpU.cjs +1 -0
- package/dist/Radio-BEfQuau1.cjs +1 -0
- package/dist/{Radio-BVfoGshx.js → Radio-Dg73Pnqf.js} +226 -183
- package/dist/RadioGroup-CqCh25ZS.cjs +1 -0
- package/dist/{RadioGroup-DcqRUtV8.js → RadioGroup-jev5E2xJ.js} +20 -20
- package/dist/{Select-Vnsr3NSv.js → Select-21Pm-BzJ.js} +164 -165
- package/dist/Select-CxofSqZJ.cjs +3 -0
- package/dist/{Stack-PQFKjbdN.js → Stack-D2Plrf1_.js} +60 -104
- package/dist/Stack-DpH56CPw.cjs +1 -0
- package/dist/Switch-BIGFww3p.cjs +1 -0
- package/dist/{Switch-Bn8zlIOf.js → Switch-CNfK1N1c.js} +167 -108
- package/dist/SwitchBase-BHC3uchj.js +314 -0
- package/dist/SwitchBase-DA079uiU.cjs +1 -0
- package/dist/{Tab-A0R3g6rB.js → Tab-BbWlzMyp.js} +597 -537
- package/dist/Tab-BsIC620i.cjs +4 -0
- package/dist/{TextField-Di6Nfe3O.js → TextField-BjzDdsW_.js} +133 -124
- package/dist/TextField-DFr8lsXU.cjs +1 -0
- package/dist/ToggleButtonGroup-BEvrUL8a.cjs +138 -0
- package/dist/{ToggleButtonGroup-B-zfmsAO.js → ToggleButtonGroup-C_O-zqof.js} +1995 -1818
- package/dist/{Tooltip-KTkLBRQj.js → Tooltip-Bf5VDDeG.js} +34 -35
- package/dist/Tooltip-DJC7nrsk.cjs +4 -0
- package/dist/{Typography-DZ11k9cZ.js → Typography-BNt9mZKm.js} +13 -14
- package/dist/Typography-DOpE-TJz.cjs +1 -0
- package/dist/components/Alert/Alert.cjs.js +1 -1
- package/dist/components/Alert/Alert.es.js +3 -3
- package/dist/components/Alert/index.cjs.js +1 -1
- package/dist/components/Alert/index.es.js +1 -1
- package/dist/components/Button/Button.cjs.js +1 -1
- package/dist/components/Button/Button.es.js +2 -2
- package/dist/components/DatePicker/DatePicker.cjs.js +1 -1
- package/dist/components/DatePicker/DatePicker.es.js +1 -1
- package/dist/components/DatePicker/index.cjs.js +1 -1
- package/dist/components/DatePicker/index.es.js +1 -1
- package/dist/components/Dialog/Dialog.cjs.js +1 -1
- package/dist/components/Dialog/Dialog.es.js +15 -15
- package/dist/components/Dropzone/Dropzone.cjs.js +1 -1
- package/dist/components/Dropzone/Dropzone.es.js +4 -4
- package/dist/components/EmptyState/EmptyState.cjs.js +1 -1
- package/dist/components/EmptyState/EmptyState.es.js +3 -3
- package/dist/components/FileList/FileIcon.cjs.js +1 -1
- package/dist/components/FileList/FileIcon.es.js +1 -1
- package/dist/components/FileList/FileListItem.cjs.js +1 -1
- package/dist/components/FileList/FileListItem.es.js +4 -4
- package/dist/components/FolderCard/FolderCard.cjs.js +1 -1
- package/dist/components/FolderCard/FolderCard.d.ts +1 -0
- package/dist/components/FolderCard/FolderCard.es.js +26 -17
- package/dist/components/FolderCard/styles.cjs.js +1 -1
- package/dist/components/FolderCard/styles.d.ts +4 -0
- package/dist/components/FolderCard/styles.es.js +9 -5
- package/dist/components/Heading/Heading.cjs.js +1 -1
- package/dist/components/Heading/Heading.es.js +2 -2
- package/dist/components/ImagePicker/ImagePicker.cjs.js +1 -1
- package/dist/components/ImagePicker/ImagePicker.es.js +5 -5
- package/dist/components/Loader/Loader.cjs.js +1 -1
- package/dist/components/Loader/Loader.es.js +1 -1
- package/dist/components/LoaderBackdrop/LoaderBackdrop.cjs.js +1 -1
- package/dist/components/LoaderBackdrop/LoaderBackdrop.es.js +2 -2
- package/dist/components/PasswordInput/PasswordInput.cjs.js +1 -1
- package/dist/components/PasswordInput/PasswordInput.es.js +4 -4
- package/dist/components/ResourceCard/ResourceCard.cjs.js +1 -1
- package/dist/components/ResourceCard/ResourceCard.d.ts +1 -0
- package/dist/components/ResourceCard/ResourceCard.es.js +21 -19
- package/dist/components/ResourceCard/style.cjs.js +1 -1
- package/dist/components/ResourceCard/style.es.js +49 -44
- package/dist/components/SearchInput/SearchInput.cjs.js +1 -1
- package/dist/components/SearchInput/SearchInput.es.js +4 -4
- package/dist/components/TreeView/TreeView.cjs.js +7 -7
- package/dist/components/TreeView/TreeView.es.js +323 -319
- package/dist/components/TreeView/components/CustomTreeItem.cjs.js +1 -1
- package/dist/components/TreeView/components/CustomTreeItem.es.js +2 -2
- package/dist/components/TreeView/style.cjs.js +1 -1
- package/dist/components/TreeView/style.es.js +24 -18
- package/dist/components/TreeView/types.d.ts +5 -2
- package/dist/components/TreeView/utils.cjs.js +1 -1
- package/dist/components/TreeView/utils.es.js +3 -3
- package/dist/components/index.cjs.js +1 -1
- package/dist/components/index.es.js +264 -266
- package/dist/components/stories/Alert.stories.cjs.js +1 -1
- package/dist/components/stories/Alert.stories.es.js +1 -1
- package/dist/components/stories/Autocomplete.stories.cjs.js +1 -1
- package/dist/components/stories/Autocomplete.stories.es.js +2 -2
- package/dist/components/stories/Button.stories.cjs.js +1 -1
- package/dist/components/stories/Button.stories.es.js +1 -1
- package/dist/components/stories/Card.stories.cjs.js +1 -1
- package/dist/components/stories/Card.stories.es.js +2 -2
- package/dist/components/stories/Checkbox.stories.cjs.js +1 -1
- package/dist/components/stories/Checkbox.stories.es.js +1 -1
- package/dist/components/stories/Chip.stories.cjs.js +1 -1
- package/dist/components/stories/Chip.stories.es.js +1 -1
- package/dist/components/stories/DatePicker.stories.cjs.js +1 -1
- package/dist/components/stories/DatePicker.stories.es.js +1 -1
- package/dist/components/stories/Dialog.stories.cjs.js +1 -1
- package/dist/components/stories/Dialog.stories.es.js +2 -2
- package/dist/components/stories/Divider.stories.cjs.js +1 -1
- package/dist/components/stories/Divider.stories.es.js +1 -1
- package/dist/components/stories/FormControlLabel.stories.cjs.js +1 -1
- package/dist/components/stories/FormControlLabel.stories.es.js +3 -3
- package/dist/components/stories/Heading.stories.cjs.js +1 -1
- package/dist/components/stories/Heading.stories.es.js +2 -2
- package/dist/components/stories/IconButton.stories.cjs.js +1 -1
- package/dist/components/stories/IconButton.stories.es.js +2 -2
- package/dist/components/stories/Link.stories.cjs.js +1 -1
- package/dist/components/stories/Link.stories.es.js +1 -1
- package/dist/components/stories/Menu.stories.cjs.js +1 -1
- package/dist/components/stories/Menu.stories.es.js +2 -2
- package/dist/components/stories/Paper.stories.cjs.js +1 -1
- package/dist/components/stories/Paper.stories.es.js +1 -1
- package/dist/components/stories/RadioGroup.stories.cjs.js +1 -1
- package/dist/components/stories/RadioGroup.stories.es.js +3 -3
- package/dist/components/stories/ResourceCard.stories.cjs.js +1 -1
- package/dist/components/stories/ResourceCard.stories.es.js +1 -1
- package/dist/components/stories/Select.stories.cjs.js +1 -1
- package/dist/components/stories/Select.stories.es.js +3 -3
- package/dist/components/stories/TabList.stories.cjs.js +1 -1
- package/dist/components/stories/TabList.stories.es.js +1 -1
- package/dist/components/stories/TextField.stories.cjs.js +1 -1
- package/dist/components/stories/TextField.stories.es.js +1 -1
- package/dist/components/stories/Tooltip.stories.cjs.js +1 -1
- package/dist/components/stories/Tooltip.stories.es.js +2 -2
- package/dist/components/stories/TreeView.stories.cjs.js +3 -3
- package/dist/components/stories/TreeView.stories.d.ts +2 -0
- package/dist/components/stories/TreeView.stories.es.js +517 -268
- package/dist/components/stories/Typography.stories.cjs.js +1 -1
- package/dist/components/stories/Typography.stories.es.js +1 -1
- package/dist/{createSvgIcon-BFqOnlgU.js → createSvgIcon-CCutbgLb.js} +54 -55
- package/dist/createSvgIcon-DPiiTkVU.cjs +1 -0
- package/dist/dividerClasses-B_bu1fey.cjs +1 -0
- package/dist/{dividerClasses-BYkvalOn.js → dividerClasses-hlXEfEZK.js} +1 -1
- package/dist/{elementTypeAcceptingRef-1usJq_B8.js → elementTypeAcceptingRef-COpcDx5q.js} +1 -1
- package/dist/elementTypeAcceptingRef-DRPcjZd5.cjs +1 -0
- package/dist/{extendSxProp-D_IkoDXB.js → extendSxProp-0G38SSpC.js} +1 -1
- package/dist/extendSxProp-BZI5kY-d.cjs +1 -0
- package/dist/{getReactElementRef-DtLerx40.js → getReactElementRef-C6oFed6n.js} +1 -1
- package/dist/getReactElementRef-EDbO4rJt.cjs +1 -0
- package/dist/{generateUtilityClasses-CqzQXpT_.js → identifier-BJqC6EXa.js} +833 -865
- package/dist/identifier-gJdGmHeC.cjs +74 -0
- package/dist/{index-CFIk4hVM.js → index-BOAF-ZZq.js} +4 -4
- package/dist/index-Cfd-LNZn.cjs +1 -0
- package/dist/index-D14TzUgK.cjs +1 -0
- package/dist/{index-sDFEVHTg.js → index-DP697UN9.js} +1 -1
- package/dist/index-Dmu1HrwE.cjs +5 -0
- package/dist/{index-C7WfZsMe.js → index-gxOBDuBW.js} +2 -2
- package/dist/index.cjs.js +1 -1
- package/dist/index.es.js +264 -266
- package/dist/{listItemTextClasses-C0D3xQur.js → listItemTextClasses-DBxyCmso.js} +1 -1
- package/dist/listItemTextClasses-gsrBifRw.cjs +1 -0
- package/dist/{memoTheme-B0xVysYu.js → memoTheme-D_Qap2ZW.js} +1 -1
- package/dist/{memoTheme-WwIyYqBX.cjs → memoTheme-GOMOSdXJ.cjs} +1 -1
- package/dist/mergeSlotProps-BCz8yLkw.cjs +1 -0
- package/dist/mergeSlotProps-BSFlgsYC.js +62 -0
- package/dist/refType-53jD7LEO.cjs +1 -0
- package/dist/{refType-BvSJNaoq.js → refType-DRBJ18fO.js} +1 -1
- package/dist/styled-C7OKoThH.cjs +1 -0
- package/dist/styled-DpPa0vDp.js +5 -0
- package/dist/useEventCallback-BxpcFap0.cjs +1 -0
- package/dist/useEventCallback-Yoj9nCug.js +15 -0
- package/dist/useForkRef-CFhhTu-Q.cjs +1 -0
- package/dist/useForkRef-u29GSuCu.js +27 -0
- package/dist/useSlot-DhC6EPU2.js +125 -0
- package/dist/useSlot-zJFQDOgm.cjs +1 -0
- package/dist/{useSlotProps-Ceyorp-u.js → useSlotProps-Bos9nSja.js} +2 -2
- package/dist/useSlotProps-CuEZ7HQe.cjs +1 -0
- package/dist/{useTheme-2JCMQS-E.js → useTheme-B1xvds8x.js} +1 -1
- package/dist/useTheme-BJZcQSBU.cjs +1 -0
- package/dist/useTheme-Dt-VOIyT.js +11 -0
- package/dist/useTheme-NQRIebh0.cjs +1 -0
- package/dist/useThemeProps-CxMYNgfp.js +17 -0
- package/dist/{useThemeProps-Cuazh32X.js → useThemeProps-DSVFwH3A.js} +4 -4
- package/dist/useThemeProps-DnpiVoRo.cjs +1 -0
- package/dist/{useThemeProps-RdxbcMsR.cjs → useThemeProps-jU-2XOjK.cjs} +1 -1
- package/dist/utils-B2EQZFZP.cjs +1 -0
- package/dist/{utils-BVg32WSe.js → utils-qwVZGgXz.js} +1 -1
- package/dist/warning-C8W811fV.js +11 -0
- package/dist/warning-DMUNDgRg.cjs +2 -0
- package/package.json +10 -10
- package/dist/Alert-CvizDCvx.cjs +0 -1
- package/dist/Autocomplete-DjU6i3zL.cjs +0 -6
- package/dist/Backdrop-BM-OE2Q_.cjs +0 -1
- package/dist/Box-BmfpLwYG.cjs +0 -1
- package/dist/Button-BGWvL_UD.cjs +0 -1
- package/dist/CardContent-GHLuvxgm.cjs +0 -1
- package/dist/Checkbox-BZYoJieY.cjs +0 -1
- package/dist/Chip-Cu_SZxrx.cjs +0 -1
- package/dist/CircularProgress-CdS7-HOv.cjs +0 -28
- package/dist/CustomTreeItem-BIl2yiro.cjs +0 -4
- package/dist/DatePicker-tyDzcyzu.cjs +0 -14
- package/dist/DefaultPropsProvider-BTnRBr0O.cjs +0 -1
- package/dist/Dialog-DIHzs0ro.cjs +0 -1
- package/dist/DialogContent-B-9ga3Wv.cjs +0 -1
- package/dist/DialogTitle-B_UN_oL2.cjs +0 -1
- package/dist/Divider-iYLSpFUc.cjs +0 -1
- package/dist/FormLabel-Cp2OFw8d.cjs +0 -2
- package/dist/Grow-DXY5DOqR.cjs +0 -1
- package/dist/IconButton-BLZJne06.cjs +0 -2
- package/dist/InputAdornment-C0WI_oQg.cjs +0 -1
- package/dist/InputBase-B3KOyouT.cjs +0 -3
- package/dist/Link-lvpmE2yz.cjs +0 -1
- package/dist/List-PQXGlDbt.cjs +0 -1
- package/dist/ListItem-CWEvdMjN.cjs +0 -1
- package/dist/ListItemText-BhxrnTkb.cjs +0 -1
- package/dist/ListItemText-CADHegDF.js +0 -928
- package/dist/Menu-DBacrp-P.cjs +0 -7
- package/dist/MenuItem-DkcVAo3U.cjs +0 -1
- package/dist/Modal-kUvS-N46.cjs +0 -2
- package/dist/Paper-ByOgFIEE.cjs +0 -2
- package/dist/Popper-CsQqc5DE.cjs +0 -4
- package/dist/Portal-7MKUQzjh.js +0 -81
- package/dist/Portal-DhGy1jKe.cjs +0 -1
- package/dist/Radio-DG-k6cXx.cjs +0 -1
- package/dist/RadioGroup-Dd0mX-H2.cjs +0 -1
- package/dist/Select-b6liJFDI.cjs +0 -3
- package/dist/Stack-gtxG2YLo.cjs +0 -1
- package/dist/Switch-BlwDxL6O.cjs +0 -1
- package/dist/SwitchBase-DtKlxrES.cjs +0 -1
- package/dist/SwitchBase-QwOXoy8f.js +0 -262
- package/dist/Tab-Dx7V4E6B.cjs +0 -4
- package/dist/TextField-CB2n4aV8.cjs +0 -1
- package/dist/ToggleButtonGroup-D3bdznCl.cjs +0 -137
- package/dist/Tooltip-D0jvnXYu.cjs +0 -4
- package/dist/Typography-3CpuuLtj.cjs +0 -1
- package/dist/capitalize-B3tmp8MO.cjs +0 -1
- package/dist/capitalize-Bs7Xs33U.js +0 -9
- package/dist/createSvgIcon-2wwaxLPT.cjs +0 -1
- package/dist/dividerClasses-izm7KFVg.cjs +0 -1
- package/dist/elementTypeAcceptingRef-GoqLuvj1.cjs +0 -1
- package/dist/extendSxProp-Bv3E507G.cjs +0 -1
- package/dist/generateUtilityClasses-KugHyZhN.cjs +0 -75
- package/dist/getReactElementRef-D7IvykPI.cjs +0 -1
- package/dist/index-9hEUqvaJ.cjs +0 -1
- package/dist/index-BomeQRLD.cjs +0 -5
- package/dist/index-DS8G_wjP.cjs +0 -1
- package/dist/listItemTextClasses-CQXcckDA.cjs +0 -1
- package/dist/refType-D-n-tVSl.cjs +0 -1
- package/dist/resolveComponentProps-Byi_59AN.cjs +0 -1
- package/dist/resolveComponentProps-Ctw0-dUN.js +0 -80
- package/dist/useEnhancedEffect-BQZ6dtCo.cjs +0 -1
- package/dist/useEnhancedEffect-CJGo-L3B.js +0 -5
- package/dist/useEventCallback-BAQJJ3ye.js +0 -14
- package/dist/useEventCallback-C0-Qw3Sm.cjs +0 -1
- package/dist/useForkRef-CTI33h-3.cjs +0 -1
- package/dist/useForkRef-C_4o__cU.js +0 -15
- package/dist/useSlot-CGbU9jGm.cjs +0 -1
- package/dist/useSlot-CqjfyGd9.js +0 -48
- package/dist/useSlotProps-DfO7r_4Y.cjs +0 -1
- package/dist/useTheme-B6wow4M9.cjs +0 -1
- package/dist/useTheme-DepbBZga.js +0 -11
- package/dist/useTheme-MahNaB8C.cjs +0 -1
- package/dist/useThemeProps-BqypsO1h.cjs +0 -1
- package/dist/useThemeProps-Drd5oJEF.js +0 -17
- package/dist/utils-CUU5fjzL.cjs +0 -1
|
@@ -1,61 +1,62 @@
|
|
|
1
1
|
import { jsx as S, jsxs as je } from "react/jsx-runtime";
|
|
2
2
|
import * as E from "react";
|
|
3
3
|
import { useState as yt, useMemo as Ct, useEffect as wt } from "react";
|
|
4
|
-
import { a as Rt, T as St, b as _e, d as $e, e as Ne, f as se, h as Pt, i as vt, j as kt, k as he, l as ge, m as Mt, n as oe, u as H, o as Ke, p as Dt, q as Ot, r as Ue,
|
|
4
|
+
import { a as Rt, T as St, b as _e, d as $e, e as Ne, f as se, h as Pt, i as vt, j as kt, k as he, l as ge, m as Mt, n as oe, u as H, o as Ke, p as Dt, q as Ot, r as Ue, s as Vt, t as At, v as Ft, w as Lt, x as O, C as jt, y as _t } from "../../CustomTreeItem-DTV3xokL.js";
|
|
5
5
|
import { TreeContainer as $t, DEFAULT_CHILDREN_INDENT as Nt } from "./style.es.js";
|
|
6
6
|
import { buildItemDataMap as Kt, findItemPath as Ut, getItemId as Bt } from "./utils.es.js";
|
|
7
|
-
import { _ as C } from "../../ButtonBase-
|
|
8
|
-
import {
|
|
7
|
+
import { _ as C } from "../../ButtonBase-BZXGvriS.js";
|
|
8
|
+
import { G as zt, F as qt, H as Be, P as a, n as ne } from "../../identifier-BJqC6EXa.js";
|
|
9
9
|
import { a as A } from "../../TransitionGroupContext-DbLioz_6.js";
|
|
10
|
-
import { u as U } from "../../useEventCallback-
|
|
10
|
+
import { u as U } from "../../useEventCallback-Yoj9nCug.js";
|
|
11
11
|
import { o as Ht } from "../../ownerDocument-CUrv0DIK.js";
|
|
12
|
-
import { u as Xt } from "../../index-
|
|
13
|
-
import { C as Wt } from "../../Checkbox-
|
|
14
|
-
import {
|
|
15
|
-
import { u as
|
|
16
|
-
import {
|
|
17
|
-
import {
|
|
12
|
+
import { u as Xt } from "../../index-DP697UN9.js";
|
|
13
|
+
import { C as Wt } from "../../Checkbox-DMnS1qrF.js";
|
|
14
|
+
import { w as xe } from "../../warning-C8W811fV.js";
|
|
15
|
+
import { u as Ee } from "../../useForkRef-u29GSuCu.js";
|
|
16
|
+
import { u as N } from "../../useSlotProps-Bos9nSja.js";
|
|
17
|
+
import { r as $, e as Fe } from "../../useSlot-DhC6EPU2.js";
|
|
18
|
+
import { s as ie, c as ze, f as qe } from "../../DefaultPropsProvider-Bg-6nX-u.js";
|
|
18
19
|
import { u as Gt } from "../../unsupportedProp-BuVD30Gh.js";
|
|
19
|
-
import { e as Jt } from "../../elementTypeAcceptingRef-
|
|
20
|
+
import { e as Jt } from "../../elementTypeAcceptingRef-COpcDx5q.js";
|
|
20
21
|
function Yt(e) {
|
|
21
22
|
return zt("MuiRichTreeView", e);
|
|
22
23
|
}
|
|
23
24
|
qt("MuiRichTreeView", ["root"]);
|
|
24
25
|
const Qt = (e, t) => {
|
|
25
26
|
const n = E.useRef({}), [r, l] = E.useState(() => {
|
|
26
|
-
const
|
|
27
|
-
return e.forEach((
|
|
28
|
-
|
|
27
|
+
const I = {};
|
|
28
|
+
return e.forEach((f) => {
|
|
29
|
+
f.models && Object.entries(f.models).forEach(([g, p]) => {
|
|
29
30
|
n.current[g] = {
|
|
30
31
|
isControlled: t[g] !== void 0,
|
|
31
|
-
getDefaultValue:
|
|
32
|
-
},
|
|
32
|
+
getDefaultValue: p.getDefaultValue
|
|
33
|
+
}, I[g] = p.getDefaultValue(t);
|
|
33
34
|
});
|
|
34
|
-
}),
|
|
35
|
-
}), x = Object.fromEntries(Object.entries(n.current).map(([
|
|
36
|
-
const g = t[
|
|
37
|
-
return [
|
|
35
|
+
}), I;
|
|
36
|
+
}), x = Object.fromEntries(Object.entries(n.current).map(([I, f]) => {
|
|
37
|
+
const g = t[I] ?? r[I];
|
|
38
|
+
return [I, {
|
|
38
39
|
value: g,
|
|
39
|
-
setControlledValue: (
|
|
40
|
-
|
|
41
|
-
[
|
|
40
|
+
setControlledValue: (p) => {
|
|
41
|
+
f.isControlled || l((o) => C({}, o, {
|
|
42
|
+
[I]: p
|
|
42
43
|
}));
|
|
43
44
|
}
|
|
44
45
|
}];
|
|
45
46
|
}));
|
|
46
|
-
return process.env.NODE_ENV !== "production" && Object.entries(n.current).forEach(([
|
|
47
|
-
const g = t[
|
|
47
|
+
return process.env.NODE_ENV !== "production" && Object.entries(n.current).forEach(([I, f]) => {
|
|
48
|
+
const g = t[I], p = f.getDefaultValue(t);
|
|
48
49
|
E.useEffect(() => {
|
|
49
|
-
|
|
50
|
+
f.isControlled !== (g !== void 0) && console.error([`MUI X: A component is changing the ${f.isControlled ? "" : "un"}controlled ${I} state of TreeView to be ${f.isControlled ? "un" : ""}controlled.`, "Elements should not switch from uncontrolled to controlled (or vice versa).", `Decide between using a controlled or uncontrolled ${I} element for the lifetime of the component.`, "The nature of the state is determined during the first render. It's considered controlled if the value is not `undefined`.", "More info: https://fb.me/react-controlled-components"].join(`
|
|
50
51
|
`));
|
|
51
52
|
}, [g]);
|
|
52
53
|
const {
|
|
53
54
|
current: o
|
|
54
|
-
} = E.useRef(
|
|
55
|
+
} = E.useRef(p);
|
|
55
56
|
E.useEffect(() => {
|
|
56
|
-
!
|
|
57
|
+
!f.isControlled && o !== p && console.error([`MUI X: A component is changing the default ${I} state of an uncontrolled TreeView after being initialized. To suppress this warning opt to use a controlled TreeView.`].join(`
|
|
57
58
|
`));
|
|
58
|
-
}, [JSON.stringify(
|
|
59
|
+
}, [JSON.stringify(p)]);
|
|
59
60
|
}), x;
|
|
60
61
|
};
|
|
61
62
|
class Zt {
|
|
@@ -84,13 +85,13 @@ class Zt {
|
|
|
84
85
|
if (!r)
|
|
85
86
|
return;
|
|
86
87
|
const l = Array.from(r.highPriority.keys()), x = Array.from(r.regular.keys());
|
|
87
|
-
for (let
|
|
88
|
-
const
|
|
89
|
-
r.highPriority.has(
|
|
88
|
+
for (let I = l.length - 1; I >= 0; I -= 1) {
|
|
89
|
+
const f = l[I];
|
|
90
|
+
r.highPriority.has(f) && f.apply(this, n);
|
|
90
91
|
}
|
|
91
|
-
for (let
|
|
92
|
-
const
|
|
93
|
-
r.regular.has(
|
|
92
|
+
for (let I = 0; I < x.length; I += 1) {
|
|
93
|
+
const f = x[I];
|
|
94
|
+
r.regular.has(f) && f.apply(this, n);
|
|
94
95
|
}
|
|
95
96
|
}
|
|
96
97
|
once(t, n) {
|
|
@@ -102,8 +103,8 @@ class Zt {
|
|
|
102
103
|
}
|
|
103
104
|
const en = (e) => e.isPropagationStopped !== void 0, He = () => {
|
|
104
105
|
const [e] = E.useState(() => new Zt()), t = E.useCallback((...r) => {
|
|
105
|
-
const [l, x,
|
|
106
|
-
|
|
106
|
+
const [l, x, I = {}] = r;
|
|
107
|
+
I.defaultMuiPrevented = !1, !(en(I) && I.isPropagationStopped()) && e.emit(l, x, I);
|
|
107
108
|
}, [e]), n = E.useCallback((r, l) => (e.on(r, l), () => {
|
|
108
109
|
e.removeListener(r, l);
|
|
109
110
|
}), [e]);
|
|
@@ -167,23 +168,23 @@ const tn = [He, Xe, Te], nn = ["slots", "slotProps", "apiRef", "experimentalFeat
|
|
|
167
168
|
experimentalFeatures: l
|
|
168
169
|
},
|
|
169
170
|
plugins: x
|
|
170
|
-
} = e,
|
|
171
|
-
const
|
|
172
|
-
x.forEach((
|
|
173
|
-
Object.assign(
|
|
171
|
+
} = e, I = A(e.props, nn);
|
|
172
|
+
const f = {};
|
|
173
|
+
x.forEach((u) => {
|
|
174
|
+
Object.assign(f, u.params);
|
|
174
175
|
});
|
|
175
|
-
const g = {},
|
|
176
|
-
Object.keys(
|
|
177
|
-
const b =
|
|
178
|
-
|
|
176
|
+
const g = {}, p = {};
|
|
177
|
+
Object.keys(I).forEach((u) => {
|
|
178
|
+
const b = I[u];
|
|
179
|
+
f[u] ? g[u] = b : p[u] = b;
|
|
179
180
|
});
|
|
180
|
-
const o = l ?? {}, s = x.reduce((
|
|
181
|
-
params:
|
|
181
|
+
const o = l ?? {}, s = x.reduce((u, b) => b.getDefaultizedParams ? b.getDefaultizedParams({
|
|
182
|
+
params: u,
|
|
182
183
|
experimentalFeatures: o
|
|
183
|
-
}) :
|
|
184
|
+
}) : u, g);
|
|
184
185
|
return {
|
|
185
186
|
apiRef: r,
|
|
186
|
-
forwardedProps:
|
|
187
|
+
forwardedProps: p,
|
|
187
188
|
pluginParams: s,
|
|
188
189
|
slots: t ?? {},
|
|
189
190
|
slotProps: n ?? {},
|
|
@@ -195,55 +196,55 @@ const tn = [He, Xe, Te], nn = ["slots", "slotProps", "apiRef", "experimentalFeat
|
|
|
195
196
|
publicAPI: n,
|
|
196
197
|
rootRef: r
|
|
197
198
|
}) => ({
|
|
198
|
-
runItemPlugins: (
|
|
199
|
-
let g = null,
|
|
199
|
+
runItemPlugins: (f) => {
|
|
200
|
+
let g = null, p = null;
|
|
200
201
|
const o = [], s = {};
|
|
201
202
|
e.forEach((h) => {
|
|
202
203
|
if (!h.itemPlugin)
|
|
203
204
|
return;
|
|
204
205
|
const c = h.itemPlugin({
|
|
205
|
-
props:
|
|
206
|
+
props: f,
|
|
206
207
|
rootRef: g,
|
|
207
|
-
contentRef:
|
|
208
|
+
contentRef: p
|
|
208
209
|
});
|
|
209
|
-
c != null && c.rootRef && (g = c.rootRef), c != null && c.contentRef && (
|
|
210
|
+
c != null && c.rootRef && (g = c.rootRef), c != null && c.contentRef && (p = c.contentRef), c != null && c.propsEnhancers && (o.push(c.propsEnhancers), Object.keys(c.propsEnhancers).forEach((i) => {
|
|
210
211
|
s[i] = !0;
|
|
211
212
|
}));
|
|
212
213
|
});
|
|
213
|
-
const
|
|
214
|
+
const u = (h) => (c) => {
|
|
214
215
|
const i = {};
|
|
215
|
-
return o.forEach((
|
|
216
|
-
const
|
|
217
|
-
|
|
216
|
+
return o.forEach((d) => {
|
|
217
|
+
const m = d[h];
|
|
218
|
+
m != null && Object.assign(i, m(c));
|
|
218
219
|
}), i;
|
|
219
|
-
}, b = Object.fromEntries(Object.keys(s).map((h) => [h,
|
|
220
|
+
}, b = Object.fromEntries(Object.keys(s).map((h) => [h, u(h)]));
|
|
220
221
|
return {
|
|
221
|
-
contentRef:
|
|
222
|
+
contentRef: p,
|
|
222
223
|
rootRef: g,
|
|
223
224
|
propsEnhancers: b
|
|
224
225
|
};
|
|
225
226
|
},
|
|
226
227
|
wrapItem: ({
|
|
227
|
-
itemId:
|
|
228
|
+
itemId: f,
|
|
228
229
|
children: g
|
|
229
230
|
}) => {
|
|
230
|
-
let
|
|
231
|
+
let p = g;
|
|
231
232
|
for (let o = e.length - 1; o >= 0; o -= 1) {
|
|
232
233
|
const s = e[o];
|
|
233
|
-
s.wrapItem && (
|
|
234
|
-
itemId:
|
|
235
|
-
children:
|
|
234
|
+
s.wrapItem && (p = s.wrapItem({
|
|
235
|
+
itemId: f,
|
|
236
|
+
children: p,
|
|
236
237
|
instance: t
|
|
237
238
|
}));
|
|
238
239
|
}
|
|
239
|
-
return
|
|
240
|
+
return p;
|
|
240
241
|
},
|
|
241
242
|
wrapRoot: ({
|
|
242
|
-
children:
|
|
243
|
+
children: f
|
|
243
244
|
}) => {
|
|
244
|
-
let g =
|
|
245
|
-
for (let
|
|
246
|
-
const o = e[
|
|
245
|
+
let g = f;
|
|
246
|
+
for (let p = e.length - 1; p >= 0; p -= 1) {
|
|
247
|
+
const o = e[p];
|
|
247
248
|
o.wrapRoot && (g = o.wrapRoot({
|
|
248
249
|
children: g,
|
|
249
250
|
instance: t
|
|
@@ -267,37 +268,37 @@ const ln = ({
|
|
|
267
268
|
const r = [...tn, ...e], {
|
|
268
269
|
pluginParams: l,
|
|
269
270
|
forwardedProps: x,
|
|
270
|
-
apiRef:
|
|
271
|
-
experimentalFeatures:
|
|
271
|
+
apiRef: I,
|
|
272
|
+
experimentalFeatures: f,
|
|
272
273
|
slots: g,
|
|
273
|
-
slotProps:
|
|
274
|
+
slotProps: p
|
|
274
275
|
} = on({
|
|
275
276
|
plugins: r,
|
|
276
277
|
props: n
|
|
277
|
-
}), o = Qt(r, l),
|
|
278
|
+
}), o = Qt(r, l), u = E.useRef({}).current, b = sn(I), h = E.useRef(null), c = Ee(h, t), i = rn({
|
|
278
279
|
plugins: r,
|
|
279
|
-
instance:
|
|
280
|
+
instance: u,
|
|
280
281
|
publicAPI: b,
|
|
281
282
|
rootRef: h
|
|
282
|
-
}), [
|
|
283
|
+
}), [d, m] = E.useState(() => {
|
|
283
284
|
const R = {};
|
|
284
285
|
return r.forEach((v) => {
|
|
285
286
|
v.getInitialState && Object.assign(R, v.getInitialState(l));
|
|
286
287
|
}), R;
|
|
287
288
|
}), T = [], P = (R) => {
|
|
288
289
|
const v = R({
|
|
289
|
-
instance:
|
|
290
|
+
instance: u,
|
|
290
291
|
params: l,
|
|
291
292
|
slots: g,
|
|
292
|
-
slotProps:
|
|
293
|
-
experimentalFeatures:
|
|
294
|
-
state:
|
|
295
|
-
setState:
|
|
293
|
+
slotProps: p,
|
|
294
|
+
experimentalFeatures: f,
|
|
295
|
+
state: d,
|
|
296
|
+
setState: m,
|
|
296
297
|
rootRef: h,
|
|
297
298
|
models: o,
|
|
298
299
|
plugins: r
|
|
299
300
|
});
|
|
300
|
-
v.getRootProps && T.push(v.getRootProps), v.publicAPI && Object.assign(b, v.publicAPI), v.instance && Object.assign(
|
|
301
|
+
v.getRootProps && T.push(v.getRootProps), v.publicAPI && Object.assign(b, v.publicAPI), v.instance && Object.assign(u, v.instance), v.contextValue && Object.assign(i, v.contextValue);
|
|
301
302
|
};
|
|
302
303
|
return r.forEach(P), {
|
|
303
304
|
getRootProps: (R = {}) => {
|
|
@@ -312,7 +313,7 @@ const ln = ({
|
|
|
312
313
|
},
|
|
313
314
|
rootRef: c,
|
|
314
315
|
contextValue: i,
|
|
315
|
-
instance:
|
|
316
|
+
instance: u
|
|
316
317
|
};
|
|
317
318
|
};
|
|
318
319
|
function an(e) {
|
|
@@ -341,41 +342,41 @@ const cn = (e, t, n) => {
|
|
|
341
342
|
getItemLabel: n,
|
|
342
343
|
getItemId: r
|
|
343
344
|
}) => {
|
|
344
|
-
const l = {}, x = {},
|
|
345
|
+
const l = {}, x = {}, I = {
|
|
345
346
|
[K]: []
|
|
346
|
-
},
|
|
347
|
+
}, f = (p, o, s) => {
|
|
347
348
|
var c, i;
|
|
348
|
-
const
|
|
349
|
-
if (
|
|
350
|
-
throw new Error(["MUI X: The Tree View component requires all items to have a unique `id` property.", "Alternatively, you can use the `getItemId` prop to specify a custom id for each item.", "An item was provided without id in the `items` prop:", JSON.stringify(
|
|
349
|
+
const u = r ? r(p) : p.id;
|
|
350
|
+
if (u == null)
|
|
351
|
+
throw new Error(["MUI X: The Tree View component requires all items to have a unique `id` property.", "Alternatively, you can use the `getItemId` prop to specify a custom id for each item.", "An item was provided without id in the `items` prop:", JSON.stringify(p)].join(`
|
|
351
352
|
`));
|
|
352
|
-
if (l[
|
|
353
|
-
throw new Error(["MUI X: The Tree View component requires all items to have a unique `id` property.", "Alternatively, you can use the `getItemId` prop to specify a custom id for each item.", `Two items were provided with the same id in the \`items\` prop: "${
|
|
353
|
+
if (l[u] != null)
|
|
354
|
+
throw new Error(["MUI X: The Tree View component requires all items to have a unique `id` property.", "Alternatively, you can use the `getItemId` prop to specify a custom id for each item.", `Two items were provided with the same id in the \`items\` prop: "${u}"`].join(`
|
|
354
355
|
`));
|
|
355
|
-
const b = n ? n(
|
|
356
|
+
const b = n ? n(p) : p.label;
|
|
356
357
|
if (b == null)
|
|
357
|
-
throw new Error(["MUI X: The Tree View component requires all items to have a `label` property.", "Alternatively, you can use the `getItemLabel` prop to specify a custom label for each item.", "An item was provided without label in the `items` prop:", JSON.stringify(
|
|
358
|
+
throw new Error(["MUI X: The Tree View component requires all items to have a `label` property.", "Alternatively, you can use the `getItemLabel` prop to specify a custom label for each item.", "An item was provided without label in the `items` prop:", JSON.stringify(p)].join(`
|
|
358
359
|
`));
|
|
359
|
-
l[
|
|
360
|
-
id:
|
|
360
|
+
l[u] = {
|
|
361
|
+
id: u,
|
|
361
362
|
label: b,
|
|
362
363
|
parentId: s,
|
|
363
364
|
idAttribute: void 0,
|
|
364
|
-
expandable: !!((c =
|
|
365
|
-
disabled: t ? t(
|
|
365
|
+
expandable: !!((c = p.children) != null && c.length),
|
|
366
|
+
disabled: t ? t(p) : !1,
|
|
366
367
|
depth: o
|
|
367
|
-
}, x[
|
|
368
|
+
}, x[u] = p;
|
|
368
369
|
const h = s ?? K;
|
|
369
|
-
|
|
370
|
+
I[h] || (I[h] = []), I[h].push(u), (i = p.children) == null || i.forEach((d) => f(d, o + 1, u));
|
|
370
371
|
};
|
|
371
|
-
e.forEach((
|
|
372
|
+
e.forEach((p) => f(p, 0, null));
|
|
372
373
|
const g = {};
|
|
373
|
-
return Object.keys(
|
|
374
|
-
g[
|
|
374
|
+
return Object.keys(I).forEach((p) => {
|
|
375
|
+
g[p] = un(I[p]);
|
|
375
376
|
}), {
|
|
376
377
|
itemMetaMap: l,
|
|
377
378
|
itemMap: x,
|
|
378
|
-
itemOrderedChildrenIds:
|
|
379
|
+
itemOrderedChildrenIds: I,
|
|
379
380
|
itemChildrenIndexes: g
|
|
380
381
|
};
|
|
381
382
|
}, X = ({
|
|
@@ -385,51 +386,51 @@ const cn = (e, t, n) => {
|
|
|
385
386
|
setState: r,
|
|
386
387
|
experimentalFeatures: l
|
|
387
388
|
}) => {
|
|
388
|
-
const x = E.useCallback((
|
|
389
|
-
const
|
|
390
|
-
const T = n.items.itemMap[
|
|
391
|
-
return y && (P.children = y.map(
|
|
389
|
+
const x = E.useCallback((d) => n.items.itemMetaMap[d], [n.items.itemMetaMap]), I = E.useCallback((d) => n.items.itemMap[d], [n.items.itemMap]), f = E.useCallback(() => {
|
|
390
|
+
const d = (m) => {
|
|
391
|
+
const T = n.items.itemMap[m], P = A(T, dn), y = n.items.itemOrderedChildrenIds[m];
|
|
392
|
+
return y && (P.children = y.map(d)), P;
|
|
392
393
|
};
|
|
393
|
-
return n.items.itemOrderedChildrenIds[K].map(
|
|
394
|
-
}, [n.items.itemMap, n.items.itemOrderedChildrenIds]), g = E.useCallback((
|
|
395
|
-
if (
|
|
394
|
+
return n.items.itemOrderedChildrenIds[K].map(d);
|
|
395
|
+
}, [n.items.itemMap, n.items.itemOrderedChildrenIds]), g = E.useCallback((d) => {
|
|
396
|
+
if (d == null)
|
|
396
397
|
return !1;
|
|
397
|
-
let
|
|
398
|
-
if (!
|
|
398
|
+
let m = e.getItemMeta(d);
|
|
399
|
+
if (!m)
|
|
399
400
|
return !1;
|
|
400
|
-
if (
|
|
401
|
+
if (m.disabled)
|
|
401
402
|
return !0;
|
|
402
|
-
for (;
|
|
403
|
-
if (
|
|
403
|
+
for (; m.parentId != null; )
|
|
404
|
+
if (m = e.getItemMeta(m.parentId), m.disabled)
|
|
404
405
|
return !0;
|
|
405
406
|
return !1;
|
|
406
|
-
}, [e]),
|
|
407
|
-
const
|
|
408
|
-
return n.items.itemChildrenIndexes[
|
|
409
|
-
}, [e, n.items.itemChildrenIndexes]), o = E.useCallback((
|
|
410
|
-
const
|
|
411
|
-
return
|
|
407
|
+
}, [e]), p = E.useCallback((d) => {
|
|
408
|
+
const m = e.getItemMeta(d).parentId ?? K;
|
|
409
|
+
return n.items.itemChildrenIndexes[m][d];
|
|
410
|
+
}, [e, n.items.itemChildrenIndexes]), o = E.useCallback((d) => n.items.itemOrderedChildrenIds[d ?? K] ?? [], [n.items.itemOrderedChildrenIds]), s = (d) => {
|
|
411
|
+
const m = e.getItemMeta(d);
|
|
412
|
+
return m == null ? null : document.getElementById(_e({
|
|
412
413
|
treeId: n.id.treeId,
|
|
413
|
-
itemId:
|
|
414
|
-
id:
|
|
414
|
+
itemId: d,
|
|
415
|
+
id: m.idAttribute
|
|
415
416
|
}));
|
|
416
|
-
},
|
|
417
|
+
}, u = (d) => t.disabledItemsFocusable ? !0 : !e.isItemDisabled(d), b = E.useRef(!1), h = E.useCallback(() => {
|
|
417
418
|
b.current = !0;
|
|
418
419
|
}, []), c = E.useCallback(() => b.current, []);
|
|
419
420
|
return E.useEffect(() => {
|
|
420
|
-
e.areItemUpdatesPrevented() || r((
|
|
421
|
-
const
|
|
421
|
+
e.areItemUpdatesPrevented() || r((d) => {
|
|
422
|
+
const m = We({
|
|
422
423
|
items: t.items,
|
|
423
424
|
isItemDisabled: t.isItemDisabled,
|
|
424
425
|
getItemId: t.getItemId,
|
|
425
426
|
getItemLabel: t.getItemLabel
|
|
426
427
|
});
|
|
427
|
-
return Object.values(
|
|
428
|
-
|
|
428
|
+
return Object.values(d.items.itemMetaMap).forEach((T) => {
|
|
429
|
+
m.itemMetaMap[T.id] || cn(e, "removeItem", {
|
|
429
430
|
id: T.id
|
|
430
431
|
});
|
|
431
|
-
}), C({},
|
|
432
|
-
items:
|
|
432
|
+
}), C({}, d, {
|
|
433
|
+
items: m
|
|
433
434
|
});
|
|
434
435
|
});
|
|
435
436
|
}, [e, r, t.items, t.isItemDisabled, t.getItemId, t.getItemLabel]), {
|
|
@@ -439,33 +440,33 @@ const cn = (e, t, n) => {
|
|
|
439
440
|
}
|
|
440
441
|
}),
|
|
441
442
|
publicAPI: {
|
|
442
|
-
getItem:
|
|
443
|
+
getItem: I,
|
|
443
444
|
getItemDOMElement: s,
|
|
444
|
-
getItemTree:
|
|
445
|
+
getItemTree: f,
|
|
445
446
|
getItemOrderedChildrenIds: o
|
|
446
447
|
},
|
|
447
448
|
instance: {
|
|
448
449
|
getItemMeta: x,
|
|
449
|
-
getItem:
|
|
450
|
-
getItemTree:
|
|
450
|
+
getItem: I,
|
|
451
|
+
getItemTree: f,
|
|
451
452
|
getItemsToRender: () => {
|
|
452
|
-
const
|
|
453
|
+
const d = (m) => {
|
|
453
454
|
var P;
|
|
454
|
-
const T = n.items.itemMetaMap[
|
|
455
|
+
const T = n.items.itemMetaMap[m];
|
|
455
456
|
return {
|
|
456
457
|
label: T.label,
|
|
457
458
|
itemId: T.id,
|
|
458
459
|
id: T.idAttribute,
|
|
459
|
-
children: (P = n.items.itemOrderedChildrenIds[
|
|
460
|
+
children: (P = n.items.itemOrderedChildrenIds[m]) == null ? void 0 : P.map(d)
|
|
460
461
|
};
|
|
461
462
|
};
|
|
462
|
-
return n.items.itemOrderedChildrenIds[K].map(
|
|
463
|
+
return n.items.itemOrderedChildrenIds[K].map(d);
|
|
463
464
|
},
|
|
464
|
-
getItemIndex:
|
|
465
|
+
getItemIndex: p,
|
|
465
466
|
getItemDOMElement: s,
|
|
466
467
|
getItemOrderedChildrenIds: o,
|
|
467
468
|
isItemDisabled: g,
|
|
468
|
-
isItemNavigable:
|
|
469
|
+
isItemNavigable: u,
|
|
469
470
|
preventItemUpdates: h,
|
|
470
471
|
areItemUpdatesPrevented: c
|
|
471
472
|
},
|
|
@@ -518,27 +519,27 @@ const le = ({
|
|
|
518
519
|
}) => {
|
|
519
520
|
const r = E.useMemo(() => {
|
|
520
521
|
const s = /* @__PURE__ */ new Map();
|
|
521
|
-
return n.expandedItems.value.forEach((
|
|
522
|
-
s.set(
|
|
522
|
+
return n.expandedItems.value.forEach((u) => {
|
|
523
|
+
s.set(u, !0);
|
|
523
524
|
}), s;
|
|
524
|
-
}, [n.expandedItems.value]), l = (s,
|
|
525
|
+
}, [n.expandedItems.value]), l = (s, u) => {
|
|
525
526
|
var b;
|
|
526
|
-
(b = t.onExpandedItemsChange) == null || b.call(t, s,
|
|
527
|
-
}, x = E.useCallback((s) => r.has(s), [r]),
|
|
528
|
-
var
|
|
529
|
-
return !!((
|
|
530
|
-
}, [e]),
|
|
531
|
-
const b = e.isItemExpanded(
|
|
532
|
-
e.setItemExpansion(s,
|
|
533
|
-
}), g = U((s,
|
|
534
|
-
if (e.isItemExpanded(
|
|
527
|
+
(b = t.onExpandedItemsChange) == null || b.call(t, s, u), n.expandedItems.setControlledValue(u);
|
|
528
|
+
}, x = E.useCallback((s) => r.has(s), [r]), I = E.useCallback((s) => {
|
|
529
|
+
var u;
|
|
530
|
+
return !!((u = e.getItemMeta(s)) != null && u.expandable);
|
|
531
|
+
}, [e]), f = U((s, u) => {
|
|
532
|
+
const b = e.isItemExpanded(u);
|
|
533
|
+
e.setItemExpansion(s, u, !b);
|
|
534
|
+
}), g = U((s, u, b) => {
|
|
535
|
+
if (e.isItemExpanded(u) === b)
|
|
535
536
|
return;
|
|
536
537
|
let c;
|
|
537
|
-
b ? c = [
|
|
538
|
-
}),
|
|
539
|
-
const b = e.getItemMeta(
|
|
540
|
-
c.length > 0 && (t.onItemExpansionToggle && c.forEach((
|
|
541
|
-
t.onItemExpansionToggle(s,
|
|
538
|
+
b ? c = [u].concat(n.expandedItems.value) : c = n.expandedItems.value.filter((i) => i !== u), t.onItemExpansionToggle && t.onItemExpansionToggle(s, u, b), l(s, c);
|
|
539
|
+
}), p = (s, u) => {
|
|
540
|
+
const b = e.getItemMeta(u), c = e.getItemOrderedChildrenIds(b.parentId).filter((d) => e.isItemExpandable(d) && !e.isItemExpanded(d)), i = n.expandedItems.value.concat(c);
|
|
541
|
+
c.length > 0 && (t.onItemExpansionToggle && c.forEach((d) => {
|
|
542
|
+
t.onItemExpansionToggle(s, d, !0);
|
|
542
543
|
}), l(s, i));
|
|
543
544
|
}, o = E.useMemo(() => t.expansionTrigger ? t.expansionTrigger : e.isTreeViewEditable ? "iconContainer" : "content", [t.expansionTrigger, e.isTreeViewEditable]);
|
|
544
545
|
return {
|
|
@@ -547,10 +548,10 @@ const le = ({
|
|
|
547
548
|
},
|
|
548
549
|
instance: {
|
|
549
550
|
isItemExpanded: x,
|
|
550
|
-
isItemExpandable:
|
|
551
|
+
isItemExpandable: I,
|
|
551
552
|
setItemExpansion: g,
|
|
552
|
-
toggleItemExpansion:
|
|
553
|
-
expandAllSiblings:
|
|
553
|
+
toggleItemExpansion: f,
|
|
554
|
+
expandAllSiblings: p
|
|
554
555
|
},
|
|
555
556
|
contextValue: {
|
|
556
557
|
expansion: {
|
|
@@ -592,39 +593,39 @@ const re = (e) => Array.isArray(e) ? e : e != null ? [e] : [], be = (e) => {
|
|
|
592
593
|
return Array.isArray(n.selectedItems.value) ? n.selectedItems.value.forEach((i) => {
|
|
593
594
|
c.set(i, !0);
|
|
594
595
|
}) : n.selectedItems.value != null && c.set(n.selectedItems.value, !0), c;
|
|
595
|
-
}, [n.selectedItems.value]),
|
|
596
|
+
}, [n.selectedItems.value]), I = (c, i) => {
|
|
596
597
|
if (t.onItemSelectionToggle)
|
|
597
598
|
if (t.multiSelect) {
|
|
598
|
-
const
|
|
599
|
-
|
|
599
|
+
const d = i.filter((T) => !e.isItemSelected(T)), m = n.selectedItems.value.filter((T) => !i.includes(T));
|
|
600
|
+
d.forEach((T) => {
|
|
600
601
|
t.onItemSelectionToggle(c, T, !0);
|
|
601
|
-
}),
|
|
602
|
+
}), m.forEach((T) => {
|
|
602
603
|
t.onItemSelectionToggle(c, T, !1);
|
|
603
604
|
});
|
|
604
605
|
} else i !== n.selectedItems.value && (n.selectedItems.value != null && t.onItemSelectionToggle(c, n.selectedItems.value, !1), i != null && t.onItemSelectionToggle(c, i, !0));
|
|
605
606
|
t.onSelectedItemsChange && t.onSelectedItemsChange(c, i), n.selectedItems.setControlledValue(i);
|
|
606
|
-
},
|
|
607
|
+
}, f = (c) => x.has(c), g = ({
|
|
607
608
|
event: c,
|
|
608
609
|
itemId: i,
|
|
609
|
-
keepExistingSelection:
|
|
610
|
-
shouldBeSelected:
|
|
610
|
+
keepExistingSelection: d = !1,
|
|
611
|
+
shouldBeSelected: m
|
|
611
612
|
}) => {
|
|
612
613
|
if (t.disableSelection)
|
|
613
614
|
return;
|
|
614
615
|
let T;
|
|
615
|
-
if (
|
|
616
|
+
if (d) {
|
|
616
617
|
const P = re(n.selectedItems.value), y = e.isItemSelected(i);
|
|
617
|
-
y && (
|
|
618
|
+
y && (m === !1 || m == null) ? T = P.filter((R) => R !== i) : !y && (m === !0 || m == null) ? T = [i].concat(P) : T = P;
|
|
618
619
|
} else
|
|
619
|
-
|
|
620
|
-
|
|
621
|
-
},
|
|
620
|
+
m === !1 || m == null && e.isItemSelected(i) ? T = t.multiSelect ? [] : null : T = t.multiSelect ? [i] : i;
|
|
621
|
+
I(c, T), r.current = i, l.current = {};
|
|
622
|
+
}, p = (c, [i, d]) => {
|
|
622
623
|
if (t.disableSelection || !t.multiSelect)
|
|
623
624
|
return;
|
|
624
|
-
let
|
|
625
|
-
Object.keys(l.current).length > 0 && (
|
|
626
|
-
const T = be(
|
|
627
|
-
|
|
625
|
+
let m = re(n.selectedItems.value).slice();
|
|
626
|
+
Object.keys(l.current).length > 0 && (m = m.filter((R) => !l.current[R]));
|
|
627
|
+
const T = be(m), P = kt(e, i, d), y = P.filter((R) => !T[R]);
|
|
628
|
+
m = m.concat(y), I(c, m), l.current = be(P);
|
|
628
629
|
};
|
|
629
630
|
return {
|
|
630
631
|
getRootProps: () => ({
|
|
@@ -634,34 +635,34 @@ const re = (e) => Array.isArray(e) ? e : e != null ? [e] : [], be = (e) => {
|
|
|
634
635
|
selectItem: g
|
|
635
636
|
},
|
|
636
637
|
instance: {
|
|
637
|
-
isItemSelected:
|
|
638
|
+
isItemSelected: f,
|
|
638
639
|
selectItem: g,
|
|
639
640
|
selectAllNavigableItems: (c) => {
|
|
640
641
|
if (t.disableSelection || !t.multiSelect)
|
|
641
642
|
return;
|
|
642
643
|
const i = vt(e);
|
|
643
|
-
|
|
644
|
+
I(c, i), l.current = be(i);
|
|
644
645
|
},
|
|
645
646
|
expandSelectionRange: (c, i) => {
|
|
646
647
|
if (r.current != null) {
|
|
647
|
-
const [
|
|
648
|
-
|
|
648
|
+
const [d, m] = Pt(e, i, r.current);
|
|
649
|
+
p(c, [d, m]);
|
|
649
650
|
}
|
|
650
651
|
},
|
|
651
652
|
selectRangeFromStartToItem: (c, i) => {
|
|
652
|
-
|
|
653
|
+
p(c, [se(e), i]);
|
|
653
654
|
},
|
|
654
655
|
selectRangeFromItemToEnd: (c, i) => {
|
|
655
|
-
|
|
656
|
+
p(c, [i, Ne(e)]);
|
|
656
657
|
},
|
|
657
|
-
selectItemFromArrowNavigation: (c, i,
|
|
658
|
+
selectItemFromArrowNavigation: (c, i, d) => {
|
|
658
659
|
if (t.disableSelection || !t.multiSelect)
|
|
659
660
|
return;
|
|
660
|
-
let
|
|
661
|
-
Object.keys(l.current).length === 0 ? (
|
|
661
|
+
let m = re(n.selectedItems.value).slice();
|
|
662
|
+
Object.keys(l.current).length === 0 ? (m.push(d), l.current = {
|
|
662
663
|
[i]: !0,
|
|
663
|
-
[
|
|
664
|
-
}) : (l.current[i] || (l.current = {}), l.current[
|
|
664
|
+
[d]: !0
|
|
665
|
+
}) : (l.current[i] || (l.current = {}), l.current[d] ? (m = m.filter((T) => T !== i), delete l.current[i]) : (m.push(d), l.current[d] = !0)), I(c, m);
|
|
665
666
|
}
|
|
666
667
|
},
|
|
667
668
|
contextValue: {
|
|
@@ -742,37 +743,37 @@ function bn(e) {
|
|
|
742
743
|
let t = 0;
|
|
743
744
|
return function(r, l, x) {
|
|
744
745
|
e.registry === null && (e.registry = typeof FinalizationRegistry < "u" ? new In() : new mn());
|
|
745
|
-
const [
|
|
746
|
+
const [I] = E.useState(new gn()), f = E.useRef(null), g = E.useRef(void 0);
|
|
746
747
|
g.current = x;
|
|
747
|
-
const
|
|
748
|
-
if (!
|
|
749
|
-
const o = (s,
|
|
748
|
+
const p = E.useRef(null);
|
|
749
|
+
if (!f.current && g.current) {
|
|
750
|
+
const o = (s, u) => {
|
|
750
751
|
var b;
|
|
751
|
-
|
|
752
|
+
u.defaultMuiPrevented || (b = g.current) == null || b.call(g, s, u);
|
|
752
753
|
};
|
|
753
|
-
|
|
754
|
+
f.current = r.$$subscribeEvent(l, o), t += 1, p.current = {
|
|
754
755
|
cleanupToken: t
|
|
755
756
|
}, e.registry.register(
|
|
756
|
-
|
|
757
|
+
I,
|
|
757
758
|
// The callback below will be called once this reference stops being retained
|
|
758
759
|
() => {
|
|
759
760
|
var s;
|
|
760
|
-
(s =
|
|
761
|
+
(s = f.current) == null || s.call(f), f.current = null, p.current = null;
|
|
761
762
|
},
|
|
762
|
-
|
|
763
|
+
p.current
|
|
763
764
|
);
|
|
764
|
-
} else !g.current &&
|
|
765
|
+
} else !g.current && f.current && (f.current(), f.current = null, p.current && (e.registry.unregister(p.current), p.current = null));
|
|
765
766
|
E.useEffect(() => {
|
|
766
|
-
if (!
|
|
767
|
-
const o = (s,
|
|
767
|
+
if (!f.current && g.current) {
|
|
768
|
+
const o = (s, u) => {
|
|
768
769
|
var b;
|
|
769
|
-
|
|
770
|
+
u.defaultMuiPrevented || (b = g.current) == null || b.call(g, s, u);
|
|
770
771
|
};
|
|
771
|
-
|
|
772
|
+
f.current = r.$$subscribeEvent(l, o);
|
|
772
773
|
}
|
|
773
|
-
return
|
|
774
|
+
return p.current && e.registry && (e.registry.unregister(p.current), p.current = null), () => {
|
|
774
775
|
var o;
|
|
775
|
-
(o =
|
|
776
|
+
(o = f.current) == null || o.call(f), f.current = null;
|
|
776
777
|
};
|
|
777
778
|
}, [r, l]);
|
|
778
779
|
};
|
|
@@ -798,48 +799,48 @@ const hn = {
|
|
|
798
799
|
models: l,
|
|
799
800
|
rootRef: x
|
|
800
801
|
}) => {
|
|
801
|
-
const
|
|
802
|
-
const
|
|
803
|
-
n.focusedItemId !==
|
|
804
|
-
focusedItemId:
|
|
802
|
+
const I = En(e, l.selectedItems.value), f = U((i) => {
|
|
803
|
+
const d = typeof i == "function" ? i(n.focusedItemId) : i;
|
|
804
|
+
n.focusedItemId !== d && r((m) => C({}, m, {
|
|
805
|
+
focusedItemId: d
|
|
805
806
|
}));
|
|
806
|
-
}), g = E.useCallback(() => !!x.current && x.current.contains(Ge(Ht(x.current))), [x]),
|
|
807
|
-
const
|
|
808
|
-
return
|
|
809
|
-
}, s = (i,
|
|
810
|
-
const
|
|
811
|
-
|
|
812
|
-
},
|
|
813
|
-
o(
|
|
807
|
+
}), g = E.useCallback(() => !!x.current && x.current.contains(Ge(Ht(x.current))), [x]), p = E.useCallback((i) => n.focusedItemId === i && g(), [n.focusedItemId, g]), o = (i) => {
|
|
808
|
+
const d = e.getItemMeta(i);
|
|
809
|
+
return d && (d.parentId == null || e.isItemExpanded(d.parentId));
|
|
810
|
+
}, s = (i, d) => {
|
|
811
|
+
const m = e.getItemDOMElement(d);
|
|
812
|
+
m && m.focus(), f(d), t.onItemFocus && t.onItemFocus(i, d);
|
|
813
|
+
}, u = U((i, d) => {
|
|
814
|
+
o(d) && s(i, d);
|
|
814
815
|
}), b = U(() => {
|
|
815
816
|
if (n.focusedItemId == null)
|
|
816
817
|
return;
|
|
817
818
|
if (e.getItemMeta(n.focusedItemId)) {
|
|
818
|
-
const
|
|
819
|
-
|
|
819
|
+
const d = e.getItemDOMElement(n.focusedItemId);
|
|
820
|
+
d && d.blur();
|
|
820
821
|
}
|
|
821
|
-
|
|
822
|
-
}), h = (i) => i ===
|
|
822
|
+
f(null);
|
|
823
|
+
}), h = (i) => i === I;
|
|
823
824
|
xn(e, "removeItem", ({
|
|
824
825
|
id: i
|
|
825
826
|
}) => {
|
|
826
|
-
n.focusedItemId === i && s(null,
|
|
827
|
+
n.focusedItemId === i && s(null, I);
|
|
827
828
|
});
|
|
828
|
-
const c = (i) => (
|
|
829
|
-
var
|
|
830
|
-
(
|
|
829
|
+
const c = (i) => (d) => {
|
|
830
|
+
var m;
|
|
831
|
+
(m = i.onFocus) == null || m.call(i, d), !d.defaultMuiPrevented && d.target === d.currentTarget && s(d, I);
|
|
831
832
|
};
|
|
832
833
|
return {
|
|
833
834
|
getRootProps: (i) => ({
|
|
834
835
|
onFocus: c(i)
|
|
835
836
|
}),
|
|
836
837
|
publicAPI: {
|
|
837
|
-
focusItem:
|
|
838
|
+
focusItem: u
|
|
838
839
|
},
|
|
839
840
|
instance: {
|
|
840
|
-
isItemFocused:
|
|
841
|
+
isItemFocused: p,
|
|
841
842
|
canItemBeTabbed: h,
|
|
842
|
-
focusItem:
|
|
843
|
+
focusItem: u,
|
|
843
844
|
removeFocusedItem: b
|
|
844
845
|
}
|
|
845
846
|
};
|
|
@@ -864,32 +865,32 @@ const Je = ({
|
|
|
864
865
|
E.useEffect(() => {
|
|
865
866
|
if (e.areItemUpdatesPrevented())
|
|
866
867
|
return;
|
|
867
|
-
const o = {}, s = (
|
|
868
|
-
o[
|
|
868
|
+
const o = {}, s = (u) => {
|
|
869
|
+
o[u.id] = u.label.substring(0, 1).toLowerCase();
|
|
869
870
|
};
|
|
870
871
|
Object.values(n.items.itemMetaMap).forEach(s), l.current = o;
|
|
871
872
|
}, [n.items.itemMetaMap, t.getItemId, e]);
|
|
872
|
-
const
|
|
873
|
-
const
|
|
874
|
-
const
|
|
875
|
-
return
|
|
873
|
+
const I = (o, s) => {
|
|
874
|
+
const u = s.toLowerCase(), b = (d) => {
|
|
875
|
+
const m = ge(e, d);
|
|
876
|
+
return m === null ? se(e) : m;
|
|
876
877
|
};
|
|
877
878
|
let h = null, c = b(o);
|
|
878
879
|
const i = {};
|
|
879
880
|
for (; h == null && !i[c]; )
|
|
880
|
-
l.current[c] ===
|
|
881
|
+
l.current[c] === u ? h = c : (i[c] = !0, c = b(c));
|
|
881
882
|
return h;
|
|
882
|
-
},
|
|
883
|
+
}, f = (o) => !t.disableSelection && !e.isItemDisabled(o), g = (o) => !e.isItemDisabled(o) && e.isItemExpandable(o);
|
|
883
884
|
return {
|
|
884
885
|
instance: {
|
|
885
886
|
updateFirstCharMap: x,
|
|
886
887
|
handleItemKeyDown: (o, s) => {
|
|
887
888
|
if (o.defaultMuiPrevented || o.altKey || he(o.target, o.currentTarget))
|
|
888
889
|
return;
|
|
889
|
-
const
|
|
890
|
+
const u = o.ctrlKey || o.metaKey, b = o.key;
|
|
890
891
|
switch (!0) {
|
|
891
892
|
// Select the item when pressing "Space"
|
|
892
|
-
case (b === " " &&
|
|
893
|
+
case (b === " " && f(s)): {
|
|
893
894
|
o.preventDefault(), t.multiSelect && o.shiftKey ? e.expandSelectionRange(o, s) : e.selectItem({
|
|
894
895
|
event: o,
|
|
895
896
|
itemId: s,
|
|
@@ -901,7 +902,7 @@ const Je = ({
|
|
|
901
902
|
// If the focused item has children, we expand it.
|
|
902
903
|
// If the focused item has no children, we select it.
|
|
903
904
|
case b === "Enter": {
|
|
904
|
-
oe(e, H) && e.isItemEditable(s) && !e.isItemBeingEdited(s) ? e.setEditedItemId(s) : g(s) ? (e.toggleItemExpansion(o, s), o.preventDefault()) :
|
|
905
|
+
oe(e, H) && e.isItemEditable(s) && !e.isItemBeingEdited(s) ? e.setEditedItemId(s) : g(s) ? (e.toggleItemExpansion(o, s), o.preventDefault()) : f(s) && (t.multiSelect ? (o.preventDefault(), e.selectItem({
|
|
905
906
|
event: o,
|
|
906
907
|
itemId: s,
|
|
907
908
|
keepExistingSelection: !0
|
|
@@ -914,19 +915,19 @@ const Je = ({
|
|
|
914
915
|
// Focus the next focusable item
|
|
915
916
|
case b === "ArrowDown": {
|
|
916
917
|
const h = ge(e, s);
|
|
917
|
-
h && (o.preventDefault(), e.focusItem(o, h), t.multiSelect && o.shiftKey &&
|
|
918
|
+
h && (o.preventDefault(), e.focusItem(o, h), t.multiSelect && o.shiftKey && f(h) && e.selectItemFromArrowNavigation(o, s, h));
|
|
918
919
|
break;
|
|
919
920
|
}
|
|
920
921
|
// Focuses the previous focusable item
|
|
921
922
|
case b === "ArrowUp": {
|
|
922
923
|
const h = Mt(e, s);
|
|
923
|
-
h && (o.preventDefault(), e.focusItem(o, h), t.multiSelect && o.shiftKey &&
|
|
924
|
+
h && (o.preventDefault(), e.focusItem(o, h), t.multiSelect && o.shiftKey && f(h) && e.selectItemFromArrowNavigation(o, s, h));
|
|
924
925
|
break;
|
|
925
926
|
}
|
|
926
927
|
// If the focused item is expanded, we move the focus to its first child
|
|
927
928
|
// If the focused item is collapsed and has children, we expand it
|
|
928
929
|
case (b === "ArrowRight" && !r || b === "ArrowLeft" && r): {
|
|
929
|
-
if (
|
|
930
|
+
if (u)
|
|
930
931
|
return;
|
|
931
932
|
if (e.isItemExpanded(s)) {
|
|
932
933
|
const h = ge(e, s);
|
|
@@ -937,7 +938,7 @@ const Je = ({
|
|
|
937
938
|
// If the focused item is expanded, we collapse it
|
|
938
939
|
// If the focused item is collapsed and has a parent, we move the focus to this parent
|
|
939
940
|
case (b === "ArrowLeft" && !r || b === "ArrowRight" && r): {
|
|
940
|
-
if (
|
|
941
|
+
if (u)
|
|
941
942
|
return;
|
|
942
943
|
if (g(s) && e.isItemExpanded(s))
|
|
943
944
|
e.toggleItemExpansion(o, s), o.preventDefault();
|
|
@@ -949,12 +950,12 @@ const Je = ({
|
|
|
949
950
|
}
|
|
950
951
|
// Focuses the first item in the tree
|
|
951
952
|
case b === "Home": {
|
|
952
|
-
|
|
953
|
+
f(s) && t.multiSelect && u && o.shiftKey ? e.selectRangeFromStartToItem(o, s) : e.focusItem(o, se(e)), o.preventDefault();
|
|
953
954
|
break;
|
|
954
955
|
}
|
|
955
956
|
// Focuses the last item in the tree
|
|
956
957
|
case b === "End": {
|
|
957
|
-
|
|
958
|
+
f(s) && t.multiSelect && u && o.shiftKey ? e.selectRangeFromItemToEnd(o, s) : e.focusItem(o, Ne(e)), o.preventDefault();
|
|
958
959
|
break;
|
|
959
960
|
}
|
|
960
961
|
// Expand all siblings that are at the same level as the focused item
|
|
@@ -964,14 +965,14 @@ const Je = ({
|
|
|
964
965
|
}
|
|
965
966
|
// Multi select behavior when pressing Ctrl + a
|
|
966
967
|
// Selects all the items
|
|
967
|
-
case (String.fromCharCode(o.keyCode) === "A" &&
|
|
968
|
+
case (String.fromCharCode(o.keyCode) === "A" && u && t.multiSelect && !t.disableSelection): {
|
|
968
969
|
e.selectAllNavigableItems(o), o.preventDefault();
|
|
969
970
|
break;
|
|
970
971
|
}
|
|
971
972
|
// Type-ahead
|
|
972
973
|
// TODO: Support typing multiple characters
|
|
973
|
-
case (!
|
|
974
|
-
const h =
|
|
974
|
+
case (!u && !o.shiftKey && Tn(b)): {
|
|
975
|
+
const h = I(s, b);
|
|
975
976
|
h != null && (e.focusItem(o, h), o.preventDefault());
|
|
976
977
|
break;
|
|
977
978
|
}
|
|
@@ -1014,16 +1015,16 @@ function Qe(e) {
|
|
|
1014
1015
|
disableSelection: x
|
|
1015
1016
|
},
|
|
1016
1017
|
expansion: {
|
|
1017
|
-
expansionTrigger:
|
|
1018
|
+
expansionTrigger: I
|
|
1018
1019
|
}
|
|
1019
|
-
} = Ke(),
|
|
1020
|
+
} = Ke(), f = t.isItemExpandable(e), g = t.isItemExpanded(e), p = t.isItemFocused(e), o = t.isItemSelected(e), s = t.isItemDisabled(e), u = t != null && t.isItemBeingEdited ? t == null ? void 0 : t.isItemBeingEdited(e) : !1, b = t.isItemEditable ? t.isItemEditable(e) : !1, h = (y) => {
|
|
1020
1021
|
if (!s) {
|
|
1021
|
-
|
|
1022
|
+
p || t.focusItem(y, e);
|
|
1022
1023
|
const R = r && (y.shiftKey || y.ctrlKey || y.metaKey);
|
|
1023
|
-
|
|
1024
|
+
f && !(R && t.isItemExpanded(e)) && t.toggleItemExpansion(y, e);
|
|
1024
1025
|
}
|
|
1025
1026
|
}, c = (y) => {
|
|
1026
|
-
s || (
|
|
1027
|
+
s || (p || t.focusItem(y, e), r && (y.shiftKey || y.ctrlKey || y.metaKey) ? y.shiftKey ? t.expandSelectionRange(y, e) : t.selectItem({
|
|
1027
1028
|
event: y,
|
|
1028
1029
|
itemId: e,
|
|
1029
1030
|
keepExistingSelection: !0
|
|
@@ -1042,32 +1043,32 @@ function Qe(e) {
|
|
|
1042
1043
|
keepExistingSelection: r,
|
|
1043
1044
|
shouldBeSelected: y.target.checked
|
|
1044
1045
|
});
|
|
1045
|
-
},
|
|
1046
|
+
}, d = (y) => {
|
|
1046
1047
|
(y.shiftKey || y.ctrlKey || y.metaKey || s) && y.preventDefault();
|
|
1047
|
-
},
|
|
1048
|
+
}, m = () => {
|
|
1048
1049
|
oe(t, H) && t.isItemEditable(e) && (t.isItemBeingEdited(e) ? t.setEditedItemId(null) : t.setEditedItemId(e));
|
|
1049
1050
|
};
|
|
1050
1051
|
return {
|
|
1051
1052
|
disabled: s,
|
|
1052
1053
|
expanded: g,
|
|
1053
1054
|
selected: o,
|
|
1054
|
-
focused:
|
|
1055
|
+
focused: p,
|
|
1055
1056
|
editable: b,
|
|
1056
|
-
editing:
|
|
1057
|
+
editing: u,
|
|
1057
1058
|
disableSelection: x,
|
|
1058
1059
|
checkboxSelection: l,
|
|
1059
1060
|
handleExpansion: h,
|
|
1060
1061
|
handleSelection: c,
|
|
1061
1062
|
handleCheckboxSelection: i,
|
|
1062
1063
|
handleContentClick: n,
|
|
1063
|
-
preventSelection:
|
|
1064
|
-
expansionTrigger:
|
|
1065
|
-
toggleItemEditing:
|
|
1064
|
+
preventSelection: d,
|
|
1065
|
+
expansionTrigger: I,
|
|
1066
|
+
toggleItemEditing: m,
|
|
1066
1067
|
handleSaveItemLabel: (y, R) => {
|
|
1067
|
-
oe(t, H) && t.isItemBeingEditedRef(e) && (t.updateItemLabel(e, R),
|
|
1068
|
+
oe(t, H) && t.isItemBeingEditedRef(e) && (t.updateItemLabel(e, R), m(), t.focusItem(y, e));
|
|
1068
1069
|
},
|
|
1069
1070
|
handleCancelItemLabelEditing: (y) => {
|
|
1070
|
-
oe(t, H) && t.isItemBeingEditedRef(e) && (
|
|
1071
|
+
oe(t, H) && t.isItemBeingEditedRef(e) && (m(), t.focusItem(y, e));
|
|
1071
1072
|
}
|
|
1072
1073
|
};
|
|
1073
1074
|
}
|
|
@@ -1076,19 +1077,19 @@ const Cn = ["classes", "className", "displayIcon", "expansionIcon", "icon", "lab
|
|
|
1076
1077
|
classes: r,
|
|
1077
1078
|
className: l,
|
|
1078
1079
|
displayIcon: x,
|
|
1079
|
-
expansionIcon:
|
|
1080
|
-
icon:
|
|
1080
|
+
expansionIcon: I,
|
|
1081
|
+
icon: f,
|
|
1081
1082
|
label: g,
|
|
1082
|
-
itemId:
|
|
1083
|
+
itemId: p,
|
|
1083
1084
|
onClick: o,
|
|
1084
1085
|
onMouseDown: s,
|
|
1085
|
-
dragAndDropOverlayProps:
|
|
1086
|
+
dragAndDropOverlayProps: u,
|
|
1086
1087
|
labelInputProps: b
|
|
1087
1088
|
} = t, h = A(t, Cn), {
|
|
1088
1089
|
disabled: c,
|
|
1089
1090
|
expanded: i,
|
|
1090
|
-
selected:
|
|
1091
|
-
focused:
|
|
1091
|
+
selected: d,
|
|
1092
|
+
focused: m,
|
|
1092
1093
|
editing: T,
|
|
1093
1094
|
editable: P,
|
|
1094
1095
|
disableSelection: y,
|
|
@@ -1100,18 +1101,18 @@ const Cn = ["classes", "className", "displayIcon", "expansionIcon", "icon", "lab
|
|
|
1100
1101
|
preventSelection: L,
|
|
1101
1102
|
expansionTrigger: W,
|
|
1102
1103
|
toggleItemEditing: G
|
|
1103
|
-
} = Qe(
|
|
1104
|
+
} = Qe(p), j = f || I || x, J = E.useRef(null), ce = (M) => {
|
|
1104
1105
|
L(M), s && s(M);
|
|
1105
1106
|
}, ue = (M) => {
|
|
1106
1107
|
var Y;
|
|
1107
|
-
V == null || V(M,
|
|
1108
|
+
V == null || V(M, p), !((Y = J.current) != null && Y.contains(M.target)) && (W === "content" && v(M), R || F(M), o && o(M));
|
|
1108
1109
|
}, de = (M) => {
|
|
1109
1110
|
M.defaultMuiPrevented || G();
|
|
1110
1111
|
};
|
|
1111
1112
|
return (
|
|
1112
1113
|
/* eslint-disable-next-line jsx-a11y/click-events-have-key-events,jsx-a11y/no-static-element-interactions -- Key event is handled by the TreeView */
|
|
1113
1114
|
/* @__PURE__ */ je("div", C({}, h, {
|
|
1114
|
-
className: Be(r.root, l, i && r.expanded,
|
|
1115
|
+
className: Be(r.root, l, i && r.expanded, d && r.selected, m && r.focused, c && r.disabled, T && r.editing, P && r.editable),
|
|
1115
1116
|
onClick: ue,
|
|
1116
1117
|
onMouseDown: ce,
|
|
1117
1118
|
ref: n,
|
|
@@ -1120,7 +1121,7 @@ const Cn = ["classes", "className", "displayIcon", "expansionIcon", "icon", "lab
|
|
|
1120
1121
|
children: j
|
|
1121
1122
|
}), R && /* @__PURE__ */ S(Wt, {
|
|
1122
1123
|
className: r.checkbox,
|
|
1123
|
-
checked:
|
|
1124
|
+
checked: d,
|
|
1124
1125
|
onChange: B,
|
|
1125
1126
|
disabled: c || y,
|
|
1126
1127
|
ref: J,
|
|
@@ -1133,7 +1134,7 @@ const Cn = ["classes", "className", "displayIcon", "expansionIcon", "icon", "lab
|
|
|
1133
1134
|
onDoubleClick: de
|
|
1134
1135
|
}, {
|
|
1135
1136
|
children: g
|
|
1136
|
-
})),
|
|
1137
|
+
})), u && /* @__PURE__ */ S(Ot, C({}, u))]
|
|
1137
1138
|
}))
|
|
1138
1139
|
);
|
|
1139
1140
|
});
|
|
@@ -1311,17 +1312,17 @@ const wn = ["children", "className", "slots", "slotProps", "ContentComponent", "
|
|
|
1311
1312
|
runItemPlugins: l,
|
|
1312
1313
|
items: {
|
|
1313
1314
|
disabledItemsFocusable: x,
|
|
1314
|
-
indentationAtItemLevel:
|
|
1315
|
+
indentationAtItemLevel: I
|
|
1315
1316
|
},
|
|
1316
1317
|
selection: {
|
|
1317
|
-
disableSelection:
|
|
1318
|
+
disableSelection: f
|
|
1318
1319
|
},
|
|
1319
1320
|
expansion: {
|
|
1320
1321
|
expansionTrigger: g
|
|
1321
1322
|
},
|
|
1322
|
-
treeId:
|
|
1323
|
+
treeId: p,
|
|
1323
1324
|
instance: o
|
|
1324
|
-
} = Ke(), s = E.useContext($e),
|
|
1325
|
+
} = Ke(), s = E.useContext($e), u = vn({
|
|
1325
1326
|
props: t,
|
|
1326
1327
|
name: "MuiTreeItem"
|
|
1327
1328
|
}), {
|
|
@@ -1329,8 +1330,8 @@ const wn = ["children", "className", "slots", "slotProps", "ContentComponent", "
|
|
|
1329
1330
|
className: h,
|
|
1330
1331
|
slots: c,
|
|
1331
1332
|
slotProps: i,
|
|
1332
|
-
ContentComponent:
|
|
1333
|
-
ContentProps:
|
|
1333
|
+
ContentComponent: d = Ce,
|
|
1334
|
+
ContentProps: m,
|
|
1334
1335
|
itemId: T,
|
|
1335
1336
|
id: P,
|
|
1336
1337
|
label: y,
|
|
@@ -1338,7 +1339,7 @@ const wn = ["children", "className", "slots", "slotProps", "ContentComponent", "
|
|
|
1338
1339
|
onMouseDown: v,
|
|
1339
1340
|
onBlur: F,
|
|
1340
1341
|
onKeyDown: B
|
|
1341
|
-
} =
|
|
1342
|
+
} = u, V = A(u, wn), {
|
|
1342
1343
|
expanded: L,
|
|
1343
1344
|
focused: W,
|
|
1344
1345
|
selected: G,
|
|
@@ -1348,23 +1349,23 @@ const wn = ["children", "className", "slots", "slotProps", "ContentComponent", "
|
|
|
1348
1349
|
handleCancelItemLabelEditing: ue,
|
|
1349
1350
|
handleSaveItemLabel: de
|
|
1350
1351
|
} = Qe(T);
|
|
1351
|
-
process.env.NODE_ENV !== "production" && (
|
|
1352
|
+
process.env.NODE_ENV !== "production" && (u.ContentComponent && xe(["MUI X: The ContentComponent prop of the TreeItem component is deprecated and will be removed in the next major release.", "You can use the new TreeItem2 component or the new useTreeItem2 hook to customize the rendering of the content.", "For more detail, see https://mui.com/x/react-tree-view/tree-item-customization/."]), u.ContentProps && xe(["MUI X: The ContentProps prop of the TreeItem component is deprecated and will be removed in the next major release.", "You can use the new TreeItem2 component or the new useTreeItem2 hook to customize the rendering of the content.", "For more detail, see https://mui.com/x/react-tree-view/tree-item-customization/."]));
|
|
1352
1353
|
const {
|
|
1353
1354
|
contentRef: M,
|
|
1354
1355
|
rootRef: Y,
|
|
1355
1356
|
propsEnhancers: D
|
|
1356
|
-
} = l(
|
|
1357
|
+
} = l(u), Q = E.useRef(null), we = E.useRef(null), nt = Ee(n, Y, Q), ot = Ee(m == null ? void 0 : m.ref, M, we), z = {
|
|
1357
1358
|
expandIcon: (c == null ? void 0 : c.expandIcon) ?? r.slots.expandIcon ?? At,
|
|
1358
1359
|
collapseIcon: (c == null ? void 0 : c.collapseIcon) ?? r.slots.collapseIcon ?? Vt,
|
|
1359
1360
|
endIcon: (c == null ? void 0 : c.endIcon) ?? r.slots.endIcon,
|
|
1360
1361
|
icon: c == null ? void 0 : c.icon,
|
|
1361
1362
|
groupTransition: c == null ? void 0 : c.groupTransition
|
|
1362
|
-
}, Re = (w) => Array.isArray(w) ? w.length > 0 && w.some(Re) : !!w, Z = Re(b), fe = C({},
|
|
1363
|
+
}, Re = (w) => Array.isArray(w) ? w.length > 0 && w.some(Re) : !!w, Z = Re(b), fe = C({}, u, {
|
|
1363
1364
|
expanded: L,
|
|
1364
1365
|
focused: W,
|
|
1365
1366
|
selected: G,
|
|
1366
1367
|
disabled: j,
|
|
1367
|
-
indentationAtItemLevel:
|
|
1368
|
+
indentationAtItemLevel: I
|
|
1368
1369
|
}), k = kn(fe), Se = z.groupTransition ?? void 0, rt = N({
|
|
1369
1370
|
elementType: Se,
|
|
1370
1371
|
ownerState: {},
|
|
@@ -1374,7 +1375,7 @@ const wn = ["children", "className", "slots", "slotProps", "ContentComponent", "
|
|
|
1374
1375
|
in: L,
|
|
1375
1376
|
component: "ul",
|
|
1376
1377
|
role: "group"
|
|
1377
|
-
},
|
|
1378
|
+
}, I ? {
|
|
1378
1379
|
indentationAtItemLevel: !0
|
|
1379
1380
|
} : {}),
|
|
1380
1381
|
className: k.groupTransition
|
|
@@ -1397,7 +1398,7 @@ const wn = ["children", "className", "slots", "slotProps", "ContentComponent", "
|
|
|
1397
1398
|
externalSlotProps: i == null ? void 0 : i.icon
|
|
1398
1399
|
}), pt = A(ft, Pn), mt = Ie ? /* @__PURE__ */ S(Ie, C({}, pt)) : null;
|
|
1399
1400
|
let ee;
|
|
1400
|
-
G ? ee = !0 :
|
|
1401
|
+
G ? ee = !0 : f || j ? ee = void 0 : ee = !1;
|
|
1401
1402
|
function It(w) {
|
|
1402
1403
|
!W && (!j || x) && w.currentTarget === w.target && o.focusItem(w, T);
|
|
1403
1404
|
}
|
|
@@ -1412,7 +1413,7 @@ const wn = ["children", "className", "slots", "slotProps", "ContentComponent", "
|
|
|
1412
1413
|
B == null || B(w), ((q = (_ = w.target) == null ? void 0 : _.dataset) == null ? void 0 : q.element) !== "labelInput" && o.handleItemKeyDown(w, T);
|
|
1413
1414
|
}, ht = _e({
|
|
1414
1415
|
itemId: T,
|
|
1415
|
-
treeId:
|
|
1416
|
+
treeId: p,
|
|
1416
1417
|
id: P
|
|
1417
1418
|
}), xt = o.canItemBeTabbed(T) ? 0 : -1, te = {
|
|
1418
1419
|
rootRefObject: Q,
|
|
@@ -1424,7 +1425,7 @@ const wn = ["children", "className", "slots", "slotProps", "ContentComponent", "
|
|
|
1424
1425
|
}, Et = ((ke = D.root) == null ? void 0 : ke.call(D, C({}, te, {
|
|
1425
1426
|
externalEventHandlers: Fe(V)
|
|
1426
1427
|
}))) ?? {}, Tt = ((Me = D.content) == null ? void 0 : Me.call(D, C({}, te, {
|
|
1427
|
-
externalEventHandlers: Fe(
|
|
1428
|
+
externalEventHandlers: Fe(m)
|
|
1428
1429
|
}))) ?? {}, Pe = ((De = D.dragAndDropOverlay) == null ? void 0 : De.call(D, C({}, te, {
|
|
1429
1430
|
externalEventHandlers: {}
|
|
1430
1431
|
}))) ?? {}, ve = ((Oe = D.labelInput) == null ? void 0 : Oe.call(D, C({}, te, {
|
|
@@ -1446,12 +1447,12 @@ const wn = ["children", "className", "slots", "slotProps", "ContentComponent", "
|
|
|
1446
1447
|
onBlur: gt,
|
|
1447
1448
|
onKeyDown: bt,
|
|
1448
1449
|
ref: nt,
|
|
1449
|
-
style:
|
|
1450
|
+
style: I ? C({}, V.style, {
|
|
1450
1451
|
"--TreeView-itemDepth": typeof s == "function" ? s(T) : s
|
|
1451
1452
|
}) : V.style
|
|
1452
1453
|
}, Et, {
|
|
1453
1454
|
children: [/* @__PURE__ */ S(Dn, C({
|
|
1454
|
-
as:
|
|
1455
|
+
as: d,
|
|
1455
1456
|
classes: {
|
|
1456
1457
|
root: k.content,
|
|
1457
1458
|
expanded: k.expanded,
|
|
@@ -1473,7 +1474,7 @@ const wn = ["children", "className", "slots", "slotProps", "ContentComponent", "
|
|
|
1473
1474
|
expansionIcon: at,
|
|
1474
1475
|
displayIcon: dt,
|
|
1475
1476
|
ownerState: fe
|
|
1476
|
-
},
|
|
1477
|
+
}, m, Tt, Pe.action == null ? {} : {
|
|
1477
1478
|
dragAndDropOverlayProps: Pe
|
|
1478
1479
|
}, ve.value == null ? {} : {
|
|
1479
1480
|
labelInputProps: ve
|
|
@@ -1558,8 +1559,8 @@ function An({
|
|
|
1558
1559
|
itemId: l,
|
|
1559
1560
|
itemsToRender: x
|
|
1560
1561
|
}) {
|
|
1561
|
-
const
|
|
1562
|
-
elementType:
|
|
1562
|
+
const I = (e == null ? void 0 : e.item) ?? Ze, f = N({
|
|
1563
|
+
elementType: I,
|
|
1563
1564
|
externalSlotProps: t == null ? void 0 : t.item,
|
|
1564
1565
|
additionalProps: {
|
|
1565
1566
|
itemId: l,
|
|
@@ -1570,13 +1571,13 @@ function An({
|
|
|
1570
1571
|
itemId: l,
|
|
1571
1572
|
label: n
|
|
1572
1573
|
}
|
|
1573
|
-
}), g = A(
|
|
1574
|
+
}), g = A(f, Vn), p = E.useMemo(() => x ? /* @__PURE__ */ S(et, {
|
|
1574
1575
|
itemsToRender: x,
|
|
1575
1576
|
slots: e,
|
|
1576
1577
|
slotProps: t
|
|
1577
1578
|
}) : null, [x, e, t]);
|
|
1578
|
-
return /* @__PURE__ */ S(
|
|
1579
|
-
children:
|
|
1579
|
+
return /* @__PURE__ */ S(I, C({}, g, {
|
|
1580
|
+
children: p
|
|
1580
1581
|
}));
|
|
1581
1582
|
}
|
|
1582
1583
|
function et(e) {
|
|
@@ -1622,18 +1623,18 @@ const Fn = Ue(), Ln = (e) => {
|
|
|
1622
1623
|
const {
|
|
1623
1624
|
getRootProps: l,
|
|
1624
1625
|
contextValue: x,
|
|
1625
|
-
instance:
|
|
1626
|
+
instance: I
|
|
1626
1627
|
} = ln({
|
|
1627
1628
|
plugins: yn,
|
|
1628
1629
|
rootRef: n,
|
|
1629
1630
|
props: r
|
|
1630
1631
|
}), {
|
|
1631
|
-
slots:
|
|
1632
|
+
slots: f,
|
|
1632
1633
|
slotProps: g
|
|
1633
|
-
} = r,
|
|
1634
|
+
} = r, p = Ln(r), o = (f == null ? void 0 : f.root) ?? jn, s = N({
|
|
1634
1635
|
elementType: o,
|
|
1635
1636
|
externalSlotProps: g == null ? void 0 : g.root,
|
|
1636
|
-
className:
|
|
1637
|
+
className: p.root,
|
|
1637
1638
|
getSlotProps: l,
|
|
1638
1639
|
ownerState: r
|
|
1639
1640
|
});
|
|
@@ -1641,9 +1642,9 @@ const Fn = Ue(), Ln = (e) => {
|
|
|
1641
1642
|
value: x,
|
|
1642
1643
|
children: /* @__PURE__ */ S(o, C({}, s, {
|
|
1643
1644
|
children: /* @__PURE__ */ S(et, {
|
|
1644
|
-
slots:
|
|
1645
|
+
slots: f,
|
|
1645
1646
|
slotProps: g,
|
|
1646
|
-
itemsToRender:
|
|
1647
|
+
itemsToRender: I.getItemsToRender()
|
|
1647
1648
|
})
|
|
1648
1649
|
}))
|
|
1649
1650
|
});
|
|
@@ -1836,48 +1837,51 @@ process.env.NODE_ENV !== "production" && (tt.propTypes = {
|
|
|
1836
1837
|
*/
|
|
1837
1838
|
sx: a.oneOfType([a.arrayOf(a.oneOfType([a.func, a.object, a.bool])), a.func, a.object])
|
|
1838
1839
|
});
|
|
1839
|
-
const
|
|
1840
|
+
const oo = ({
|
|
1840
1841
|
items: e,
|
|
1841
1842
|
selectedItemId: t,
|
|
1842
1843
|
handleSelectedItemChange: n,
|
|
1843
1844
|
iconColor: r = "primary",
|
|
1844
|
-
|
|
1845
|
+
hasNoIcons: l = !1,
|
|
1846
|
+
maxHeight: x = 300,
|
|
1847
|
+
defaultExpandedItems: I = []
|
|
1845
1848
|
}) => {
|
|
1846
|
-
const [
|
|
1849
|
+
const [f, g] = yt(I), p = Ct(() => Kt(e), [e]);
|
|
1847
1850
|
return wt(() => {
|
|
1848
1851
|
if (t) {
|
|
1849
|
-
const
|
|
1850
|
-
if (
|
|
1851
|
-
const
|
|
1852
|
-
|
|
1853
|
-
const
|
|
1854
|
-
(
|
|
1852
|
+
const s = Ut(e, t);
|
|
1853
|
+
if (s) {
|
|
1854
|
+
const u = s.slice(0, -1);
|
|
1855
|
+
g((b) => {
|
|
1856
|
+
const h = u.filter(
|
|
1857
|
+
(c) => !b.includes(c)
|
|
1855
1858
|
);
|
|
1856
|
-
return
|
|
1859
|
+
return h.length > 0 ? [...b, ...h] : b;
|
|
1857
1860
|
});
|
|
1858
1861
|
}
|
|
1859
1862
|
}
|
|
1860
|
-
}, [t, e]), /* @__PURE__ */ S($t, {
|
|
1863
|
+
}, [t, e]), /* @__PURE__ */ S($t, { maxHeight: x, "data-treeview-root": "true", children: /* @__PURE__ */ S(
|
|
1861
1864
|
tt,
|
|
1862
1865
|
{
|
|
1863
1866
|
items: e,
|
|
1864
1867
|
selectedItems: t,
|
|
1865
|
-
expandedItems:
|
|
1866
|
-
onExpandedItemsChange: (
|
|
1867
|
-
|
|
1868
|
+
expandedItems: f,
|
|
1869
|
+
onExpandedItemsChange: (s, u) => {
|
|
1870
|
+
g(u);
|
|
1868
1871
|
},
|
|
1869
1872
|
itemChildrenIndentation: Nt,
|
|
1870
1873
|
onSelectedItemsChange: n,
|
|
1871
1874
|
getItemId: Bt,
|
|
1872
1875
|
slots: {
|
|
1873
|
-
item: (
|
|
1874
|
-
const
|
|
1876
|
+
item: (s) => {
|
|
1877
|
+
const u = s.itemId ? p[s.itemId] : void 0;
|
|
1875
1878
|
return /* @__PURE__ */ S(
|
|
1876
1879
|
_t,
|
|
1877
1880
|
{
|
|
1878
|
-
...
|
|
1879
|
-
itemData:
|
|
1880
|
-
iconColor: r
|
|
1881
|
+
...s,
|
|
1882
|
+
itemData: u,
|
|
1883
|
+
iconColor: r,
|
|
1884
|
+
hasNoIcons: l
|
|
1881
1885
|
}
|
|
1882
1886
|
);
|
|
1883
1887
|
}
|
|
@@ -1886,5 +1890,5 @@ const no = ({
|
|
|
1886
1890
|
) });
|
|
1887
1891
|
};
|
|
1888
1892
|
export {
|
|
1889
|
-
|
|
1893
|
+
oo as default
|
|
1890
1894
|
};
|