@cgi-learning-hub/ui 1.9.0 → 1.10.0
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/index.cjs.js +63417 -1
- package/dist/index.d.ts +773 -1
- package/dist/index.es.js +63394 -417
- package/dist/ui.css +151 -0
- package/package.json +26 -24
- package/dist/Alert-BH_3hKCB.cjs +0 -1
- package/dist/Alert-BeVYzSS-.js +0 -94
- package/dist/Alert-BoYBWOXe.cjs +0 -1
- package/dist/Alert-CEu3llDi.js +0 -369
- package/dist/Autocomplete-BKpavKFW.cjs +0 -6
- package/dist/Autocomplete-DBZYn4YL.js +0 -1881
- package/dist/Backdrop-BvL371G3.js +0 -360
- package/dist/Backdrop-qOBrabpf.cjs +0 -1
- package/dist/Badge-2Kgbx-Cs.js +0 -466
- package/dist/Badge-DXl0Da36.cjs +0 -1
- package/dist/Box-BaZ7KlAc.js +0 -59
- package/dist/Box-CYQlQqRB.cjs +0 -1
- package/dist/Button-BP-QmmUu.cjs +0 -1
- package/dist/Button-C1mKNW-c.js +0 -698
- package/dist/ButtonBase-C2jRC_V7.js +0 -883
- package/dist/ButtonBase-DSJojbNE.cjs +0 -74
- package/dist/CardContent-DVcUynuH.cjs +0 -1
- package/dist/CardContent-kIapWv4T.js +0 -225
- package/dist/Checkbox-DhhuvKO5.cjs +0 -1
- package/dist/Checkbox-RxHWtafR.js +0 -271
- package/dist/Chip-DgGmi9yn.js +0 -574
- package/dist/Chip-n1kY-Dsh.cjs +0 -1
- package/dist/CircularProgress-BOm4zz7e.cjs +0 -28
- package/dist/CircularProgress-CLq0Rl-1.js +0 -253
- package/dist/Close-DR9m6hv3.cjs +0 -1
- package/dist/Close-vu-MZYNA.js +0 -9
- package/dist/CloseRounded-Cpp6nWQi.cjs +0 -1
- package/dist/CloseRounded-DF05lCUu.js +0 -8
- package/dist/CustomTreeItem-AecanDDg.js +0 -2046
- package/dist/CustomTreeItem-BBMp0k4i.cjs +0 -41
- package/dist/DatePicker-Cd-Aj-F8.js +0 -10758
- package/dist/DatePicker-Dj7U52Mk.cjs +0 -16
- package/dist/DefaultPropsProvider-BrmlvPWg.js +0 -312
- package/dist/DefaultPropsProvider-C1g4BXET.cjs +0 -1
- package/dist/Delete-C36W48MB.cjs +0 -1
- package/dist/Delete-DXUljXzP.js +0 -8
- package/dist/Dialog-C2HYr67H.cjs +0 -1
- package/dist/Dialog-D__8rwpw.js +0 -469
- package/dist/DialogContent-MPwmUJQp.js +0 -195
- package/dist/DialogContent-lup2v_ab.cjs +0 -1
- package/dist/DialogTitle-B8jOk7ZE.cjs +0 -1
- package/dist/DialogTitle-Dly5D3Ud.js +0 -134
- package/dist/Divider-BN12gMv9.js +0 -297
- package/dist/Divider-wisA5Qp_.cjs +0 -1
- package/dist/Folder-BSZMyA2L.js +0 -8
- package/dist/Folder-aAI_w_uF.cjs +0 -1
- package/dist/FormLabel-ByYWZh7M.cjs +0 -2
- package/dist/FormLabel-DtxJI2CU.js +0 -408
- package/dist/Grid-C0LY-MbT.js +0 -419
- package/dist/Grid-CPXE25PR.cjs +0 -2
- package/dist/Grow-6zwoqUfO.cjs +0 -1
- package/dist/Grow-CeGwnQpw.js +0 -197
- package/dist/IconButton-BTN16gZi.cjs +0 -2
- package/dist/IconButton-DBjiNqOa.js +0 -299
- package/dist/InputAdornment-C1r1YutO.cjs +0 -1
- package/dist/InputAdornment-DuR35FtU.js +0 -173
- package/dist/InputBase-CxknnWV4.cjs +0 -4
- package/dist/InputBase-D5UJOJBu.js +0 -797
- package/dist/Link-T11NCxGd.cjs +0 -1
- package/dist/Link-hWCqsQiI.js +0 -281
- package/dist/List-CmJ1jCss.js +0 -131
- package/dist/List-eQ4D0MvJ.cjs +0 -1
- package/dist/ListItem-CgWgbZ_g.cjs +0 -1
- package/dist/ListItem-onoPfwb4.js +0 -423
- package/dist/ListItemText-B-dySXgz.cjs +0 -1
- package/dist/ListItemText-BjhXxIIV.js +0 -441
- package/dist/Menu-D7B383z4.cjs +0 -7
- package/dist/Menu-DGvAkF5F.js +0 -911
- package/dist/MenuItem-Cusmy5t2.js +0 -268
- package/dist/MenuItem-D-4xzo-S.cjs +0 -1
- package/dist/Modal-DB9K8sJI.cjs +0 -2
- package/dist/Modal-DtjScKxh.js +0 -744
- package/dist/MoreVert-BwfUF9pO.cjs +0 -1
- package/dist/MoreVert-woCQ0dNf.js +0 -8
- package/dist/Paper-CZXfHfN_.js +0 -158
- package/dist/Paper-DcVuAxq3.cjs +0 -2
- package/dist/Popper-BwuGO_Si.js +0 -1407
- package/dist/Popper-D5Cs38W_.cjs +0 -4
- package/dist/Portal-Cmv45gpL.cjs +0 -1
- package/dist/Portal-PkRJuFYN.js +0 -85
- package/dist/Radio-DiyDpiVL.js +0 -617
- package/dist/Radio-DzKwkI68.cjs +0 -1
- package/dist/RadioGroup-BlkHQVRF.cjs +0 -1
- package/dist/RadioGroup-CjUaFqjJ.js +0 -191
- package/dist/Select-BxH16ruJ.js +0 -2648
- package/dist/Select-CSQfbogA.cjs +0 -3
- package/dist/Stack-ChvZzNqc.cjs +0 -1
- package/dist/Stack-pMJEpL7k.js +0 -173
- package/dist/Stepper-BsfN7O-W.cjs +0 -1
- package/dist/Stepper-DyH4sgY5.js +0 -966
- package/dist/Switch-BgZUmsKc.js +0 -392
- package/dist/Switch-Dr2jgPGV.cjs +0 -1
- package/dist/SwitchBase-BP_I-APE.cjs +0 -1
- package/dist/SwitchBase-BWz31Ed6.js +0 -319
- package/dist/Tab-Bksf_S4K.js +0 -1454
- package/dist/Tab-D2mI5G0L.cjs +0 -4
- package/dist/TextField-C9AnzUpZ.cjs +0 -1
- package/dist/TextField-Ctx4aW6-.js +0 -560
- package/dist/ToggleButtonGroup-CBw2I124.cjs +0 -138
- package/dist/ToggleButtonGroup-DtjRqNbI.js +0 -9091
- package/dist/Tooltip-C5AffX17.js +0 -722
- package/dist/Tooltip-CUm8vKGq.cjs +0 -4
- package/dist/TransitionGroupContext-DbLioz_6.js +0 -24
- package/dist/TransitionGroupContext-Zt4NoR0u.cjs +0 -1
- package/dist/Typography-Cr-aIusw.js +0 -261
- package/dist/Typography-DHjq4GzQ.cjs +0 -1
- package/dist/assets/Loader.css +0 -1
- package/dist/assets/LoaderBackdrop.css +0 -1
- package/dist/capitalize-3OjkeP9i.cjs +0 -1
- package/dist/capitalize-BHEX83JQ.js +0 -9
- package/dist/chainPropTypes-CEUi6Jb4.cjs +0 -1
- package/dist/chainPropTypes-D9lkm76m.js +0 -8
- package/dist/client-error-CHkavqXs.cjs +0 -1
- package/dist/client-error-D0Ng5oOn.js +0 -393
- package/dist/components/ActionBar/ActionBar.cjs.js +0 -1
- package/dist/components/ActionBar/ActionBar.d.ts +0 -3
- package/dist/components/ActionBar/ActionBar.es.js +0 -63
- package/dist/components/ActionBar/index.cjs.js +0 -1
- package/dist/components/ActionBar/index.d.ts +0 -2
- package/dist/components/ActionBar/index.es.js +0 -4
- package/dist/components/ActionBar/style.cjs.js +0 -1
- package/dist/components/ActionBar/style.es.js +0 -61
- package/dist/components/ActionBar/types.cjs.js +0 -1
- package/dist/components/ActionBar/types.d.ts +0 -17
- package/dist/components/ActionBar/types.es.js +0 -1
- package/dist/components/Alert/Alert.cjs.js +0 -1
- package/dist/components/Alert/Alert.d.ts +0 -6
- package/dist/components/Alert/Alert.es.js +0 -8
- package/dist/components/Alert/index.cjs.js +0 -1
- package/dist/components/Alert/index.d.ts +0 -2
- package/dist/components/Alert/index.es.js +0 -4
- package/dist/components/Button/Button.cjs.js +0 -1
- package/dist/components/Button/Button.d.ts +0 -3
- package/dist/components/Button/Button.es.js +0 -44
- package/dist/components/Button/index.cjs.js +0 -1
- package/dist/components/Button/index.d.ts +0 -2
- package/dist/components/Button/index.es.js +0 -4
- package/dist/components/ButtonGroup/ButtonGroup.cjs.js +0 -1
- package/dist/components/ButtonGroup/ButtonGroup.d.ts +0 -3
- package/dist/components/ButtonGroup/ButtonGroup.es.js +0 -38
- package/dist/components/ButtonGroup/index.cjs.js +0 -1
- package/dist/components/ButtonGroup/index.d.ts +0 -2
- package/dist/components/ButtonGroup/index.es.js +0 -4
- package/dist/components/ButtonGroup/style.cjs.js +0 -1
- package/dist/components/ButtonGroup/style.es.js +0 -29
- package/dist/components/ButtonGroup/types.cjs.js +0 -1
- package/dist/components/ButtonGroup/types.d.ts +0 -22
- package/dist/components/ButtonGroup/types.es.js +0 -1
- package/dist/components/ColorPicker/ColorPicker.cjs.js +0 -27
- package/dist/components/ColorPicker/ColorPicker.d.ts +0 -4
- package/dist/components/ColorPicker/ColorPicker.es.js +0 -7960
- package/dist/components/ColorPicker/ColorPickerIcon.cjs.js +0 -1
- package/dist/components/ColorPicker/ColorPickerIcon.d.ts +0 -5
- package/dist/components/ColorPicker/ColorPickerIcon.es.js +0 -58
- package/dist/components/ColorPicker/index.cjs.js +0 -1
- package/dist/components/ColorPicker/index.d.ts +0 -3
- package/dist/components/ColorPicker/index.es.js +0 -4
- package/dist/components/ColorPicker/styles.cjs.js +0 -1
- package/dist/components/ColorPicker/styles.es.js +0 -28
- package/dist/components/ColorPicker/types.cjs.js +0 -1
- package/dist/components/ColorPicker/types.d.ts +0 -19
- package/dist/components/ColorPicker/types.es.js +0 -1
- package/dist/components/DatePicker/DatePicker.cjs.js +0 -1
- package/dist/components/DatePicker/DatePicker.d.ts +0 -6
- package/dist/components/DatePicker/DatePicker.es.js +0 -5
- package/dist/components/DatePicker/index.cjs.js +0 -1
- package/dist/components/DatePicker/index.d.ts +0 -2
- package/dist/components/DatePicker/index.es.js +0 -4
- package/dist/components/Dialog/Dialog.cjs.js +0 -1
- package/dist/components/Dialog/Dialog.d.ts +0 -6
- package/dist/components/Dialog/Dialog.es.js +0 -31
- package/dist/components/Dialog/index.cjs.js +0 -1
- package/dist/components/Dialog/index.d.ts +0 -2
- package/dist/components/Dialog/index.es.js +0 -4
- package/dist/components/Dropzone/Dropzone.cjs.js +0 -1
- package/dist/components/Dropzone/Dropzone.d.ts +0 -12
- package/dist/components/Dropzone/Dropzone.es.js +0 -55
- package/dist/components/Dropzone/index.cjs.js +0 -1
- package/dist/components/Dropzone/index.d.ts +0 -2
- package/dist/components/Dropzone/index.es.js +0 -4
- package/dist/components/Dropzone/types.cjs.js +0 -1
- package/dist/components/Dropzone/types.d.ts +0 -8
- package/dist/components/Dropzone/types.es.js +0 -1
- package/dist/components/EllipsisWithTooltip/EllipsisWithTooltip.cjs.js +0 -1
- package/dist/components/EllipsisWithTooltip/EllipsisWithTooltip.d.ts +0 -9
- package/dist/components/EllipsisWithTooltip/EllipsisWithTooltip.es.js +0 -45
- package/dist/components/EllipsisWithTooltip/index.cjs.js +0 -1
- package/dist/components/EllipsisWithTooltip/index.d.ts +0 -2
- package/dist/components/EllipsisWithTooltip/index.es.js +0 -4
- package/dist/components/EmptyState/EmptyState.cjs.js +0 -1
- package/dist/components/EmptyState/EmptyState.d.ts +0 -22
- package/dist/components/EmptyState/EmptyState.es.js +0 -34
- package/dist/components/EmptyState/index.cjs.js +0 -1
- package/dist/components/EmptyState/index.d.ts +0 -2
- package/dist/components/EmptyState/index.es.js +0 -4
- package/dist/components/FileList/FileIcon.cjs.js +0 -1
- package/dist/components/FileList/FileIcon.d.ts +0 -3
- package/dist/components/FileList/FileIcon.es.js +0 -56
- package/dist/components/FileList/FileInfosSeparator.cjs.js +0 -1
- package/dist/components/FileList/FileInfosSeparator.d.ts +0 -1
- package/dist/components/FileList/FileInfosSeparator.es.js +0 -14
- package/dist/components/FileList/FileList.cjs.js +0 -1
- package/dist/components/FileList/FileList.d.ts +0 -9
- package/dist/components/FileList/FileList.es.js +0 -24
- package/dist/components/FileList/FileListItem.cjs.js +0 -1
- package/dist/components/FileList/FileListItem.d.ts +0 -16
- package/dist/components/FileList/FileListItem.es.js +0 -122
- package/dist/components/FileList/index.cjs.js +0 -1
- package/dist/components/FileList/index.d.ts +0 -4
- package/dist/components/FileList/index.es.js +0 -6
- package/dist/components/FileList/utils.cjs.js +0 -1
- package/dist/components/FileList/utils.d.ts +0 -2
- package/dist/components/FileList/utils.es.js +0 -13
- package/dist/components/FolderCard/FolderCard.cjs.js +0 -1
- package/dist/components/FolderCard/FolderCard.d.ts +0 -12
- package/dist/components/FolderCard/FolderCard.es.js +0 -88
- package/dist/components/FolderCard/index.cjs.js +0 -1
- package/dist/components/FolderCard/index.d.ts +0 -2
- package/dist/components/FolderCard/index.es.js +0 -4
- package/dist/components/FolderCard/styles.cjs.js +0 -1
- package/dist/components/FolderCard/styles.d.ts +0 -24
- package/dist/components/FolderCard/styles.es.js +0 -27
- package/dist/components/FolderCard/types.cjs.js +0 -1
- package/dist/components/FolderCard/types.d.ts +0 -3
- package/dist/components/FolderCard/types.es.js +0 -14
- package/dist/components/Heading/Heading.cjs.js +0 -1
- package/dist/components/Heading/Heading.d.ts +0 -14
- package/dist/components/Heading/Heading.es.js +0 -39
- package/dist/components/Heading/index.cjs.js +0 -1
- package/dist/components/Heading/index.d.ts +0 -2
- package/dist/components/Heading/index.es.js +0 -4
- package/dist/components/ImagePicker/ImagePicker.cjs.js +0 -1
- package/dist/components/ImagePicker/ImagePicker.d.ts +0 -13
- package/dist/components/ImagePicker/ImagePicker.es.js +0 -203
- package/dist/components/ImagePicker/index.cjs.js +0 -1
- package/dist/components/ImagePicker/index.d.ts +0 -2
- package/dist/components/ImagePicker/index.es.js +0 -4
- package/dist/components/Loader/Loader.cjs.js +0 -1
- package/dist/components/Loader/Loader.d.ts +0 -3
- package/dist/components/Loader/Loader.es.js +0 -11
- package/dist/components/Loader/index.cjs.js +0 -1
- package/dist/components/Loader/index.d.ts +0 -2
- package/dist/components/Loader/index.es.js +0 -4
- package/dist/components/LoaderBackdrop/LoaderBackdrop.cjs.js +0 -1
- package/dist/components/LoaderBackdrop/LoaderBackdrop.d.ts +0 -3
- package/dist/components/LoaderBackdrop/LoaderBackdrop.es.js +0 -12
- package/dist/components/LoaderBackdrop/index.cjs.js +0 -1
- package/dist/components/LoaderBackdrop/index.d.ts +0 -2
- package/dist/components/LoaderBackdrop/index.es.js +0 -4
- package/dist/components/PasswordInput/PasswordInput.cjs.js +0 -1
- package/dist/components/PasswordInput/PasswordInput.d.ts +0 -5
- package/dist/components/PasswordInput/PasswordInput.es.js +0 -39
- package/dist/components/PasswordInput/index.cjs.js +0 -1
- package/dist/components/PasswordInput/index.d.ts +0 -2
- package/dist/components/PasswordInput/index.es.js +0 -4
- package/dist/components/QueryError/QueryError.cjs.js +0 -1
- package/dist/components/QueryError/QueryError.d.ts +0 -8
- package/dist/components/QueryError/QueryError.es.js +0 -46
- package/dist/components/QueryError/helpers.cjs.js +0 -1
- package/dist/components/QueryError/helpers.d.ts +0 -11
- package/dist/components/QueryError/helpers.es.js +0 -10
- package/dist/components/QueryError/index.cjs.js +0 -1
- package/dist/components/QueryError/index.d.ts +0 -2
- package/dist/components/QueryError/index.es.js +0 -4
- package/dist/components/ResourceCard/ResourceCard.cjs.js +0 -1
- package/dist/components/ResourceCard/ResourceCard.d.ts +0 -25
- package/dist/components/ResourceCard/ResourceCard.es.js +0 -128
- package/dist/components/ResourceCard/index.cjs.js +0 -1
- package/dist/components/ResourceCard/index.d.ts +0 -2
- package/dist/components/ResourceCard/index.es.js +0 -4
- package/dist/components/ResourceCard/style.cjs.js +0 -1
- package/dist/components/ResourceCard/style.es.js +0 -130
- package/dist/components/SearchInput/SearchInput.cjs.js +0 -1
- package/dist/components/SearchInput/SearchInput.d.ts +0 -4
- package/dist/components/SearchInput/SearchInput.es.js +0 -38
- package/dist/components/SearchInput/index.cjs.js +0 -1
- package/dist/components/SearchInput/index.d.ts +0 -2
- package/dist/components/SearchInput/index.es.js +0 -4
- package/dist/components/TreeView/TreeView.cjs.js +0 -5
- package/dist/components/TreeView/TreeView.d.ts +0 -4
- package/dist/components/TreeView/TreeView.es.js +0 -1663
- package/dist/components/TreeView/components/CustomTreeItem.cjs.js +0 -1
- package/dist/components/TreeView/components/CustomTreeItem.d.ts +0 -6
- package/dist/components/TreeView/components/CustomTreeItem.es.js +0 -9
- package/dist/components/TreeView/index.cjs.js +0 -1
- package/dist/components/TreeView/index.d.ts +0 -2
- package/dist/components/TreeView/index.es.js +0 -6
- package/dist/components/TreeView/style.cjs.js +0 -1
- package/dist/components/TreeView/style.es.js +0 -35
- package/dist/components/TreeView/types.cjs.js +0 -1
- package/dist/components/TreeView/types.d.ts +0 -45
- package/dist/components/TreeView/types.es.js +0 -4
- package/dist/components/TreeView/utils.cjs.js +0 -1
- package/dist/components/TreeView/utils.d.ts +0 -6
- package/dist/components/TreeView/utils.es.js +0 -50
- package/dist/components/index.cjs.js +0 -1
- package/dist/components/index.d.ts +0 -197
- package/dist/components/index.es.js +0 -419
- package/dist/components/stories/ActionBar.stories.cjs.js +0 -1
- package/dist/components/stories/ActionBar.stories.d.ts +0 -11
- package/dist/components/stories/ActionBar.stories.es.js +0 -206
- package/dist/components/stories/Alert.stories.cjs.js +0 -1
- package/dist/components/stories/Alert.stories.d.ts +0 -9
- package/dist/components/stories/Alert.stories.es.js +0 -32
- package/dist/components/stories/Autocomplete.stories.cjs.js +0 -3
- package/dist/components/stories/Autocomplete.stories.d.ts +0 -6
- package/dist/components/stories/Autocomplete.stories.es.js +0 -62
- package/dist/components/stories/Badge.stories.cjs.js +0 -1
- package/dist/components/stories/Badge.stories.d.ts +0 -17
- package/dist/components/stories/Badge.stories.es.js +0 -188
- package/dist/components/stories/Button.stories.cjs.js +0 -1
- package/dist/components/stories/Button.stories.d.ts +0 -8
- package/dist/components/stories/Button.stories.es.js +0 -61
- package/dist/components/stories/ButtonGroup.stories.cjs.js +0 -153
- package/dist/components/stories/ButtonGroup.stories.d.ts +0 -17
- package/dist/components/stories/ButtonGroup.stories.es.js +0 -1296
- package/dist/components/stories/Card.stories.cjs.js +0 -1
- package/dist/components/stories/Card.stories.d.ts +0 -7
- package/dist/components/stories/Card.stories.es.js +0 -42
- package/dist/components/stories/Checkbox.stories.cjs.js +0 -1
- package/dist/components/stories/Checkbox.stories.d.ts +0 -10
- package/dist/components/stories/Checkbox.stories.es.js +0 -57
- package/dist/components/stories/Chip.stories.cjs.js +0 -1
- package/dist/components/stories/Chip.stories.d.ts +0 -10
- package/dist/components/stories/Chip.stories.es.js +0 -77
- package/dist/components/stories/ColoPicker.stories.cjs.js +0 -1
- package/dist/components/stories/ColoPicker.stories.d.ts +0 -6
- package/dist/components/stories/ColoPicker.stories.es.js +0 -23
- package/dist/components/stories/DatePicker.stories.cjs.js +0 -1
- package/dist/components/stories/DatePicker.stories.d.ts +0 -6
- package/dist/components/stories/DatePicker.stories.es.js +0 -13
- package/dist/components/stories/Dialog.stories.cjs.js +0 -1
- package/dist/components/stories/Dialog.stories.d.ts +0 -7
- package/dist/components/stories/Dialog.stories.es.js +0 -65
- package/dist/components/stories/Divider.stories.cjs.js +0 -1
- package/dist/components/stories/Divider.stories.d.ts +0 -6
- package/dist/components/stories/Divider.stories.es.js +0 -41
- package/dist/components/stories/Dropzone.stories.cjs.js +0 -1
- package/dist/components/stories/Dropzone.stories.d.ts +0 -6
- package/dist/components/stories/Dropzone.stories.es.js +0 -14
- package/dist/components/stories/EllipsisWithTooltip.stories.cjs.js +0 -1
- package/dist/components/stories/EllipsisWithTooltip.stories.d.ts +0 -6
- package/dist/components/stories/EllipsisWithTooltip.stories.es.js +0 -36
- package/dist/components/stories/EmptyState.stories.cjs.js +0 -1
- package/dist/components/stories/EmptyState.stories.d.ts +0 -6
- package/dist/components/stories/EmptyState.stories.es.js +0 -30
- package/dist/components/stories/FileList.stories.cjs.js +0 -8
- package/dist/components/stories/FileList.stories.d.ts +0 -6
- package/dist/components/stories/FileList.stories.es.js +0 -150
- package/dist/components/stories/FolderCard.stories.cjs.js +0 -1
- package/dist/components/stories/FolderCard.stories.d.ts +0 -7
- package/dist/components/stories/FolderCard.stories.es.js +0 -71
- package/dist/components/stories/FormControlLabel.stories.cjs.js +0 -1
- package/dist/components/stories/FormControlLabel.stories.d.ts +0 -9
- package/dist/components/stories/FormControlLabel.stories.es.js +0 -55
- package/dist/components/stories/Heading.stories.cjs.js +0 -1
- package/dist/components/stories/Heading.stories.d.ts +0 -6
- package/dist/components/stories/Heading.stories.es.js +0 -20
- package/dist/components/stories/IconButton.stories.cjs.js +0 -1
- package/dist/components/stories/IconButton.stories.d.ts +0 -6
- package/dist/components/stories/IconButton.stories.es.js +0 -55
- package/dist/components/stories/ImagePicker.stories.cjs.js +0 -1
- package/dist/components/stories/ImagePicker.stories.d.ts +0 -6
- package/dist/components/stories/ImagePicker.stories.es.js +0 -57
- package/dist/components/stories/Link.stories.cjs.js +0 -1
- package/dist/components/stories/Link.stories.d.ts +0 -7
- package/dist/components/stories/Link.stories.es.js +0 -43
- package/dist/components/stories/Loader.stories.cjs.js +0 -1
- package/dist/components/stories/Loader.stories.d.ts +0 -6
- package/dist/components/stories/Loader.stories.es.js +0 -11
- package/dist/components/stories/LoaderBackdrop.stories.cjs.js +0 -1
- package/dist/components/stories/LoaderBackdrop.stories.d.ts +0 -6
- package/dist/components/stories/LoaderBackdrop.stories.es.js +0 -11
- package/dist/components/stories/Menu.stories.cjs.js +0 -1
- package/dist/components/stories/Menu.stories.d.ts +0 -7
- package/dist/components/stories/Menu.stories.es.js +0 -51
- package/dist/components/stories/Paper.stories.cjs.js +0 -1
- package/dist/components/stories/Paper.stories.d.ts +0 -7
- package/dist/components/stories/Paper.stories.es.js +0 -28
- package/dist/components/stories/PasswordInput.stories.cjs.js +0 -1
- package/dist/components/stories/PasswordInput.stories.d.ts +0 -6
- package/dist/components/stories/PasswordInput.stories.es.js +0 -13
- package/dist/components/stories/RadioGroup.stories.cjs.js +0 -1
- package/dist/components/stories/RadioGroup.stories.d.ts +0 -8
- package/dist/components/stories/RadioGroup.stories.es.js +0 -37
- package/dist/components/stories/ResourceCard.stories.cjs.js +0 -1
- package/dist/components/stories/ResourceCard.stories.d.ts +0 -9
- package/dist/components/stories/ResourceCard.stories.es.js +0 -141
- package/dist/components/stories/SearchInput.stories.cjs.js +0 -1
- package/dist/components/stories/SearchInput.stories.d.ts +0 -6
- package/dist/components/stories/SearchInput.stories.es.js +0 -13
- package/dist/components/stories/Select.stories.cjs.js +0 -1
- package/dist/components/stories/Select.stories.d.ts +0 -10
- package/dist/components/stories/Select.stories.es.js +0 -52
- package/dist/components/stories/Stepper.stories.cjs.js +0 -1
- package/dist/components/stories/Stepper.stories.d.ts +0 -7
- package/dist/components/stories/Stepper.stories.es.js +0 -161
- package/dist/components/stories/TabList.stories.cjs.js +0 -1
- package/dist/components/stories/TabList.stories.d.ts +0 -7
- package/dist/components/stories/TabList.stories.es.js +0 -73
- package/dist/components/stories/TextField.stories.cjs.js +0 -1
- package/dist/components/stories/TextField.stories.d.ts +0 -10
- package/dist/components/stories/TextField.stories.es.js +0 -69
- package/dist/components/stories/Tooltip.stories.cjs.js +0 -1
- package/dist/components/stories/Tooltip.stories.d.ts +0 -7
- package/dist/components/stories/Tooltip.stories.es.js +0 -46
- package/dist/components/stories/TreeView.stories.cjs.js +0 -69
- package/dist/components/stories/TreeView.stories.d.ts +0 -15
- package/dist/components/stories/TreeView.stories.es.js +0 -1036
- package/dist/components/stories/Typography.stories.cjs.js +0 -1
- package/dist/components/stories/Typography.stories.d.ts +0 -6
- package/dist/components/stories/Typography.stories.es.js +0 -65
- package/dist/composeClasses-BskurlZX.js +0 -51
- package/dist/composeClasses-vN5Almps.cjs +0 -1
- package/dist/createChainedFunction-C0nujS3O.js +0 -9
- package/dist/createChainedFunction-CJmlQuW8.cjs +0 -1
- package/dist/createSimplePaletteValueFilter-B7--0ryQ.js +0 -17
- package/dist/createSimplePaletteValueFilter-PTK3TAhW.cjs +0 -1
- package/dist/createSvgIcon-CcWpa9Le.cjs +0 -1
- package/dist/createSvgIcon-DFIM5PqN.js +0 -254
- package/dist/debounce-46wSf_lW.js +0 -15
- package/dist/debounce-DpCj7ugL.cjs +0 -1
- package/dist/dividerClasses-BEzQ_reA.js +0 -9
- package/dist/dividerClasses-BpVbhp8e.cjs +0 -1
- package/dist/elementAcceptingRef-CZLfau9O.js +0 -31
- package/dist/elementAcceptingRef-CuMilXz3.cjs +0 -1
- package/dist/elementTypeAcceptingRef-vRb2iI4O.js +0 -23
- package/dist/elementTypeAcceptingRef-vjR5jGLx.cjs +0 -1
- package/dist/error-CRNeivL7.js +0 -5
- package/dist/error-Dk3o6ber.cjs +0 -1
- package/dist/extendSxProp-DGsHTtAe.js +0 -37
- package/dist/extendSxProp-Dwd9vpYv.cjs +0 -1
- package/dist/formControlState-CuX6WjAX.cjs +0 -1
- package/dist/formControlState-vgaj2ksH.js +0 -10
- package/dist/generateUtilityClasses-B_xKAflz.js +0 -2703
- package/dist/generateUtilityClasses-CENS22bI.cjs +0 -55
- package/dist/hooks/lazySvgImport.cjs.js +0 -1
- package/dist/hooks/lazySvgImport.d.ts +0 -6
- package/dist/hooks/lazySvgImport.es.js +0 -34
- package/dist/index-B9vkf41S.js +0 -672
- package/dist/index-BPpGXp0s.cjs +0 -1
- package/dist/index-BS46Ff4t.cjs +0 -5
- package/dist/index-Ba4TEBpP.js +0 -22
- package/dist/index-CJMnfcQs.js +0 -2152
- package/dist/index-CwHv-blH.js +0 -97
- package/dist/index-D_kvDIOz.cjs +0 -1
- package/dist/index-kjfz41UI.cjs +0 -20
- package/dist/integerPropType-BihGt2aU.js +0 -31
- package/dist/integerPropType-CR7ytEJG.cjs +0 -1
- package/dist/isFocusVisible-CPZqtjv2.js +0 -12
- package/dist/isFocusVisible-DlSijby6.cjs +0 -2
- package/dist/isHostComponent-PydJW4A4.cjs +0 -1
- package/dist/isHostComponent-kiaBvYVo.js +0 -6
- package/dist/isMuiElement-BzDAj3yJ.cjs +0 -1
- package/dist/isMuiElement-DnSE4qG4.js +0 -13
- package/dist/listItemTextClasses-CEbo8A-K.js +0 -9
- package/dist/listItemTextClasses-wcJANWC3.cjs +0 -1
- package/dist/memoTheme-Bi1UNdyO.cjs +0 -1
- package/dist/memoTheme-C-PaH-Cy.js +0 -15
- package/dist/mergeSlotProps-CL6s5QgQ.cjs +0 -1
- package/dist/mergeSlotProps-DVtjofCS.js +0 -62
- package/dist/ownerDocument-4MViGo3k.cjs +0 -1
- package/dist/ownerDocument-CUrv0DIK.js +0 -6
- package/dist/ownerWindow-DDHucZi0.cjs +0 -1
- package/dist/ownerWindow-niciwP7I.js +0 -7
- package/dist/refType-8hihVLUh.js +0 -5
- package/dist/refType-DJyA--UV.cjs +0 -1
- package/dist/server-error-CqyYyPLN.cjs +0 -1
- package/dist/server-error-CvgIy7ap.js +0 -398
- package/dist/unsupportedProp-Bn6XWqwH.cjs +0 -1
- package/dist/unsupportedProp-BuVD30Gh.js +0 -9
- package/dist/useControlled-QrrYcKxm.cjs +0 -3
- package/dist/useControlled-nm4pBabJ.js +0 -31
- package/dist/useEventCallback-BxpcFap0.cjs +0 -1
- package/dist/useEventCallback-Y2KwRxBw.js +0 -15
- package/dist/useForkRef-CFhhTu-Q.cjs +0 -1
- package/dist/useForkRef-u29GSuCu.js +0 -27
- package/dist/useFormControl-CatNKXAi.js +0 -10
- package/dist/useFormControl-haP0iPhl.cjs +0 -1
- package/dist/useId-CK6Kn3Tn.js +0 -21
- package/dist/useId-DNXtOFeX.cjs +0 -1
- package/dist/usePreviousProps-ByGlbpJ6.js +0 -10
- package/dist/usePreviousProps-jC3PWcIp.cjs +0 -1
- package/dist/useSlot-BSkdRaZr.js +0 -125
- package/dist/useSlot-C-aMxEm0.cjs +0 -1
- package/dist/useSlotProps-BVVfeURp.cjs +0 -1
- package/dist/useSlotProps-CWTjRiRv.js +0 -25
- package/dist/useTheme-0AkY41zn.js +0 -11
- package/dist/useTheme-BT6SDKkk.cjs +0 -1
- package/dist/useTheme-BrGF2Vm0.cjs +0 -1
- package/dist/useTheme-DSA6Ir8k.js +0 -18
- package/dist/useThemeProps-BWsN0TEk.cjs +0 -1
- package/dist/useThemeProps-CAonvyKa.js +0 -27
- package/dist/useThemeProps-JozrkyA_.cjs +0 -1
- package/dist/useThemeProps-hSh1qhnc.js +0 -17
- package/dist/useTimeout-COCrDKz-.cjs +0 -1
- package/dist/useTimeout-CrCYVizI.js +0 -42
- package/dist/utils-BWx1W_q1.cjs +0 -1
- package/dist/utils-B_pVp6UZ.js +0 -363
- package/dist/utils-DWqc1kRF.js +0 -13
- package/dist/utils-XujN9ndp.cjs +0 -1
- package/dist/warning-C8W811fV.js +0 -11
- package/dist/warning-DMUNDgRg.cjs +0 -2
|
@@ -1,1663 +0,0 @@
|
|
|
1
|
-
var Pe = Object.defineProperty;
|
|
2
|
-
var ye = (t, e, o) => e in t ? Pe(t, e, { enumerable: !0, configurable: !0, writable: !0, value: o }) : t[e] = o;
|
|
3
|
-
var L = (t, e, o) => ye(t, typeof e != "symbol" ? e + "" : e, o);
|
|
4
|
-
import { jsx as P } from "react/jsx-runtime";
|
|
5
|
-
import * as x from "react";
|
|
6
|
-
import { useState as Re, useMemo as Se, useEffect as Le } from "react";
|
|
7
|
-
import { a as Me, u as M, s as de, T as ve, b as De, d as se, e as V, f as R, h as Oe, i as Ve, j as ie, k as Ae, l as Fe, m as le, n as N, o as fe, p as _, q as A, r as Z, t as Ne, v as me, w as je, x as O, y as K, z as pe, A as W, B as _e, D as $e, E as X, F as Ue, G as qe, H as B, I as re, J as Ke, K as Be, L as z, M as ze, N as Ge, O as We, P as Xe, Q as ce, R as Ie, S as Je, U as Qe, V as Ye, W as Ze, X as He } from "../../CustomTreeItem-AecanDDg.js";
|
|
8
|
-
import { TreeContainer as et, DEFAULT_CHILDREN_INDENT as tt } from "./style.es.js";
|
|
9
|
-
import { buildItemDataMap as nt, findItemPath as ot, getItemId as st } from "./utils.es.js";
|
|
10
|
-
import { _ as T } from "../../ButtonBase-C2jRC_V7.js";
|
|
11
|
-
import { a as H } from "../../TransitionGroupContext-DbLioz_6.js";
|
|
12
|
-
import { P as g } from "../../index-B9vkf41S.js";
|
|
13
|
-
import { G as it, F as lt } from "../../generateUtilityClasses-B_xKAflz.js";
|
|
14
|
-
import { a as S, u as J } from "../../useEventCallback-Y2KwRxBw.js";
|
|
15
|
-
import { w as Q } from "../../warning-C8W811fV.js";
|
|
16
|
-
import { u as rt } from "../../index-Ba4TEBpP.js";
|
|
17
|
-
import { u as he } from "../../useSlotProps-CWTjRiRv.js";
|
|
18
|
-
import { u as ct } from "../../useForkRef-u29GSuCu.js";
|
|
19
|
-
import { s as ut, c as at } from "../../DefaultPropsProvider-BrmlvPWg.js";
|
|
20
|
-
import { T as dt } from "../../Typography-Cr-aIusw.js";
|
|
21
|
-
import { A as ft } from "../../Alert-CEu3llDi.js";
|
|
22
|
-
function mt(t) {
|
|
23
|
-
return it("MuiRichTreeView", t);
|
|
24
|
-
}
|
|
25
|
-
lt("MuiRichTreeView", ["root", "item", "itemContent", "itemGroupTransition", "itemIconContainer", "itemLabel", "itemCheckbox", "itemLabelInput"]);
|
|
26
|
-
class pt {
|
|
27
|
-
constructor() {
|
|
28
|
-
L(this, "maxListeners", 20);
|
|
29
|
-
L(this, "warnOnce", !1);
|
|
30
|
-
L(this, "events", {});
|
|
31
|
-
}
|
|
32
|
-
on(e, o, i = {}) {
|
|
33
|
-
let l = this.events[e];
|
|
34
|
-
if (l || (l = {
|
|
35
|
-
highPriority: /* @__PURE__ */ new Map(),
|
|
36
|
-
regular: /* @__PURE__ */ new Map()
|
|
37
|
-
}, this.events[e] = l), i.isFirst ? l.highPriority.set(o, !0) : l.regular.set(o, !0), process.env.NODE_ENV !== "production") {
|
|
38
|
-
const h = l.highPriority.size + l.regular.size;
|
|
39
|
-
h > this.maxListeners && !this.warnOnce && (this.warnOnce = !0, console.warn([`Possible EventEmitter memory leak detected. ${h} ${e} listeners added.`].join(`
|
|
40
|
-
`)));
|
|
41
|
-
}
|
|
42
|
-
}
|
|
43
|
-
removeListener(e, o) {
|
|
44
|
-
this.events[e] && (this.events[e].regular.delete(o), this.events[e].highPriority.delete(o));
|
|
45
|
-
}
|
|
46
|
-
removeAllListeners() {
|
|
47
|
-
this.events = {};
|
|
48
|
-
}
|
|
49
|
-
emit(e, ...o) {
|
|
50
|
-
const i = this.events[e];
|
|
51
|
-
if (!i)
|
|
52
|
-
return;
|
|
53
|
-
const l = Array.from(i.highPriority.keys()), h = Array.from(i.regular.keys());
|
|
54
|
-
for (let a = l.length - 1; a >= 0; a -= 1) {
|
|
55
|
-
const d = l[a];
|
|
56
|
-
i.highPriority.has(d) && d.apply(this, o);
|
|
57
|
-
}
|
|
58
|
-
for (let a = 0; a < h.length; a += 1) {
|
|
59
|
-
const d = h[a];
|
|
60
|
-
i.regular.has(d) && d.apply(this, o);
|
|
61
|
-
}
|
|
62
|
-
}
|
|
63
|
-
once(e, o) {
|
|
64
|
-
const i = this;
|
|
65
|
-
this.on(e, function l(...h) {
|
|
66
|
-
i.removeListener(e, l), o.apply(i, h);
|
|
67
|
-
});
|
|
68
|
-
}
|
|
69
|
-
}
|
|
70
|
-
const It = (t) => t.isPropagationStopped !== void 0, ge = () => {
|
|
71
|
-
const [t] = x.useState(() => new pt()), e = x.useCallback((...i) => {
|
|
72
|
-
const [l, h, a = {}] = i;
|
|
73
|
-
a.defaultMuiPrevented = !1, !(It(a) && a.isPropagationStopped()) && t.emit(l, h, a);
|
|
74
|
-
}, [t]), o = x.useCallback((i, l) => (t.on(i, l), () => {
|
|
75
|
-
t.removeListener(i, l);
|
|
76
|
-
}), [t]);
|
|
77
|
-
return {
|
|
78
|
-
instance: {
|
|
79
|
-
$$publishEvent: e,
|
|
80
|
-
$$subscribeEvent: o
|
|
81
|
-
}
|
|
82
|
-
};
|
|
83
|
-
};
|
|
84
|
-
ge.params = {};
|
|
85
|
-
const be = ({
|
|
86
|
-
plugins: t
|
|
87
|
-
}) => {
|
|
88
|
-
const e = new Set(t);
|
|
89
|
-
return {
|
|
90
|
-
instance: {
|
|
91
|
-
getAvailablePlugins: () => e
|
|
92
|
-
}
|
|
93
|
-
};
|
|
94
|
-
};
|
|
95
|
-
be.params = {};
|
|
96
|
-
const ee = ({
|
|
97
|
-
params: t,
|
|
98
|
-
store: e
|
|
99
|
-
}) => {
|
|
100
|
-
x.useEffect(() => {
|
|
101
|
-
e.update((i) => t.id === i.id.providedTreeId && i.id.treeId !== void 0 ? i : T({}, i, {
|
|
102
|
-
id: T({}, i.id, {
|
|
103
|
-
treeId: t.id ?? Me()
|
|
104
|
-
})
|
|
105
|
-
}));
|
|
106
|
-
}, [e, t.id]);
|
|
107
|
-
const o = M(e, de);
|
|
108
|
-
return {
|
|
109
|
-
getRootProps: () => ({
|
|
110
|
-
id: o
|
|
111
|
-
})
|
|
112
|
-
};
|
|
113
|
-
};
|
|
114
|
-
ee.params = {
|
|
115
|
-
id: !0
|
|
116
|
-
};
|
|
117
|
-
ee.getInitialState = ({
|
|
118
|
-
id: t
|
|
119
|
-
}) => ({
|
|
120
|
-
id: {
|
|
121
|
-
treeId: void 0,
|
|
122
|
-
providedTreeId: t
|
|
123
|
-
}
|
|
124
|
-
});
|
|
125
|
-
const ht = [ge, be, ee], gt = ["apiRef"], bt = (t) => {
|
|
126
|
-
let {
|
|
127
|
-
props: {
|
|
128
|
-
apiRef: e
|
|
129
|
-
},
|
|
130
|
-
plugins: o
|
|
131
|
-
} = t, i = H(t.props, gt);
|
|
132
|
-
const l = x.useMemo(() => {
|
|
133
|
-
const d = {};
|
|
134
|
-
return o.forEach((r) => {
|
|
135
|
-
Object.assign(d, r.params);
|
|
136
|
-
}), d;
|
|
137
|
-
}, [o]), {
|
|
138
|
-
forwardedProps: h,
|
|
139
|
-
pluginParams: a
|
|
140
|
-
} = x.useMemo(() => {
|
|
141
|
-
const d = {}, r = {};
|
|
142
|
-
Object.keys(i).forEach((c) => {
|
|
143
|
-
const n = i[c];
|
|
144
|
-
l[c] ? d[c] = n : r[c] = n;
|
|
145
|
-
});
|
|
146
|
-
const m = o.reduce((c, n) => n.applyDefaultValuesToParams ? n.applyDefaultValuesToParams({
|
|
147
|
-
params: c
|
|
148
|
-
}) : c, d);
|
|
149
|
-
return {
|
|
150
|
-
forwardedProps: r,
|
|
151
|
-
pluginParams: m
|
|
152
|
-
};
|
|
153
|
-
}, [o, i, l]);
|
|
154
|
-
return {
|
|
155
|
-
forwardedProps: h,
|
|
156
|
-
pluginParams: a,
|
|
157
|
-
apiRef: e
|
|
158
|
-
};
|
|
159
|
-
}, Et = (t) => {
|
|
160
|
-
const {
|
|
161
|
-
plugins: e,
|
|
162
|
-
instance: o,
|
|
163
|
-
publicAPI: i,
|
|
164
|
-
store: l,
|
|
165
|
-
rootRef: h
|
|
166
|
-
} = t, a = x.useCallback((m) => {
|
|
167
|
-
let c = null, n = null;
|
|
168
|
-
const s = [], I = {};
|
|
169
|
-
e.forEach((p) => {
|
|
170
|
-
if (!p.itemPlugin)
|
|
171
|
-
return;
|
|
172
|
-
const u = p.itemPlugin({
|
|
173
|
-
props: m,
|
|
174
|
-
rootRef: c,
|
|
175
|
-
contentRef: n
|
|
176
|
-
});
|
|
177
|
-
u != null && u.rootRef && (c = u.rootRef), u != null && u.contentRef && (n = u.contentRef), u != null && u.propsEnhancers && (s.push(u.propsEnhancers), Object.keys(u.propsEnhancers).forEach((f) => {
|
|
178
|
-
I[f] = !0;
|
|
179
|
-
}));
|
|
180
|
-
});
|
|
181
|
-
const b = (p) => (u) => {
|
|
182
|
-
const f = {};
|
|
183
|
-
return s.forEach((w) => {
|
|
184
|
-
const k = w[p];
|
|
185
|
-
k != null && Object.assign(f, k(u));
|
|
186
|
-
}), f;
|
|
187
|
-
}, E = Object.fromEntries(Object.keys(I).map((p) => [p, b(p)]));
|
|
188
|
-
return {
|
|
189
|
-
contentRef: n,
|
|
190
|
-
rootRef: c,
|
|
191
|
-
propsEnhancers: E
|
|
192
|
-
};
|
|
193
|
-
}, [e]), d = x.useCallback(({
|
|
194
|
-
itemId: m,
|
|
195
|
-
children: c,
|
|
196
|
-
idAttribute: n
|
|
197
|
-
}) => {
|
|
198
|
-
let s = c;
|
|
199
|
-
for (let I = e.length - 1; I >= 0; I -= 1) {
|
|
200
|
-
const b = e[I];
|
|
201
|
-
b.wrapItem && (s = b.wrapItem({
|
|
202
|
-
instance: o,
|
|
203
|
-
itemId: m,
|
|
204
|
-
children: s,
|
|
205
|
-
idAttribute: n
|
|
206
|
-
}));
|
|
207
|
-
}
|
|
208
|
-
return s;
|
|
209
|
-
}, [e, o]), r = x.useCallback(({
|
|
210
|
-
children: m
|
|
211
|
-
}) => {
|
|
212
|
-
let c = m;
|
|
213
|
-
for (let n = e.length - 1; n >= 0; n -= 1) {
|
|
214
|
-
const s = e[n];
|
|
215
|
-
s.wrapRoot && (c = s.wrapRoot({
|
|
216
|
-
children: c
|
|
217
|
-
}));
|
|
218
|
-
}
|
|
219
|
-
return c;
|
|
220
|
-
}, [e]);
|
|
221
|
-
return x.useMemo(() => ({
|
|
222
|
-
runItemPlugins: a,
|
|
223
|
-
wrapItem: d,
|
|
224
|
-
wrapRoot: r,
|
|
225
|
-
instance: o,
|
|
226
|
-
publicAPI: i,
|
|
227
|
-
store: l,
|
|
228
|
-
rootRef: h
|
|
229
|
-
}), [a, d, r, o, i, l, h]);
|
|
230
|
-
};
|
|
231
|
-
class Tt {
|
|
232
|
-
constructor(e) {
|
|
233
|
-
L(this, "subscribe", (e) => (this.listeners.add(e), () => {
|
|
234
|
-
this.listeners.delete(e);
|
|
235
|
-
}));
|
|
236
|
-
L(this, "getSnapshot", () => this.value);
|
|
237
|
-
L(this, "update", (e) => {
|
|
238
|
-
const o = e(this.value);
|
|
239
|
-
o !== this.value && (this.value = o, this.listeners.forEach((i) => i(o)));
|
|
240
|
-
});
|
|
241
|
-
this.value = e, this.listeners = /* @__PURE__ */ new Set();
|
|
242
|
-
}
|
|
243
|
-
}
|
|
244
|
-
function xt(t) {
|
|
245
|
-
return t.current == null && (t.current = {}), t;
|
|
246
|
-
}
|
|
247
|
-
function wt(t) {
|
|
248
|
-
const e = x.useRef({});
|
|
249
|
-
return t ? xt(t) : e;
|
|
250
|
-
}
|
|
251
|
-
let ue = 0;
|
|
252
|
-
const kt = ({
|
|
253
|
-
plugins: t,
|
|
254
|
-
rootRef: e,
|
|
255
|
-
props: o
|
|
256
|
-
}) => {
|
|
257
|
-
const i = x.useMemo(() => [...ht, ...t], [t]), {
|
|
258
|
-
pluginParams: l,
|
|
259
|
-
forwardedProps: h,
|
|
260
|
-
apiRef: a
|
|
261
|
-
} = bt({
|
|
262
|
-
plugins: i,
|
|
263
|
-
props: o
|
|
264
|
-
}), r = x.useRef({}).current, m = wt(a), c = x.useRef(null), n = ct(c, e), s = x.useRef(null);
|
|
265
|
-
if (s.current == null) {
|
|
266
|
-
ue += 1;
|
|
267
|
-
const u = {
|
|
268
|
-
cacheKey: {
|
|
269
|
-
id: ue
|
|
270
|
-
}
|
|
271
|
-
};
|
|
272
|
-
i.forEach((f) => {
|
|
273
|
-
f.getInitialState && Object.assign(u, f.getInitialState(l));
|
|
274
|
-
}), s.current = new Tt(u);
|
|
275
|
-
}
|
|
276
|
-
const I = Et({
|
|
277
|
-
plugins: i,
|
|
278
|
-
instance: r,
|
|
279
|
-
publicAPI: m.current,
|
|
280
|
-
store: s.current,
|
|
281
|
-
rootRef: c
|
|
282
|
-
}), b = [], E = (u) => {
|
|
283
|
-
const f = u({
|
|
284
|
-
instance: r,
|
|
285
|
-
params: l,
|
|
286
|
-
rootRef: c,
|
|
287
|
-
plugins: i,
|
|
288
|
-
store: s.current
|
|
289
|
-
});
|
|
290
|
-
f.getRootProps && b.push(f.getRootProps), f.publicAPI && Object.assign(m.current, f.publicAPI), f.instance && Object.assign(r, f.instance);
|
|
291
|
-
};
|
|
292
|
-
return i.forEach(E), {
|
|
293
|
-
getRootProps: (u = {}) => {
|
|
294
|
-
const f = T({
|
|
295
|
-
role: "tree"
|
|
296
|
-
}, h, u, {
|
|
297
|
-
ref: n
|
|
298
|
-
});
|
|
299
|
-
return b.forEach((w) => {
|
|
300
|
-
Object.assign(f, w(u));
|
|
301
|
-
}), f;
|
|
302
|
-
},
|
|
303
|
-
rootRef: n,
|
|
304
|
-
contextValue: I
|
|
305
|
-
};
|
|
306
|
-
}, G = {};
|
|
307
|
-
function Ct(t) {
|
|
308
|
-
const {
|
|
309
|
-
contextValue: e,
|
|
310
|
-
classes: o = G,
|
|
311
|
-
slots: i = G,
|
|
312
|
-
slotProps: l = G,
|
|
313
|
-
children: h
|
|
314
|
-
} = t, a = x.useMemo(() => ({
|
|
315
|
-
classes: o,
|
|
316
|
-
slots: {
|
|
317
|
-
collapseIcon: i.collapseIcon,
|
|
318
|
-
expandIcon: i.expandIcon,
|
|
319
|
-
endIcon: i.endIcon
|
|
320
|
-
},
|
|
321
|
-
slotProps: {
|
|
322
|
-
collapseIcon: l.collapseIcon,
|
|
323
|
-
expandIcon: l.expandIcon,
|
|
324
|
-
endIcon: l.endIcon
|
|
325
|
-
}
|
|
326
|
-
}), [o, i.collapseIcon, i.expandIcon, i.endIcon, l.collapseIcon, l.expandIcon, l.endIcon]);
|
|
327
|
-
return /* @__PURE__ */ P(ve.Provider, {
|
|
328
|
-
value: e,
|
|
329
|
-
children: /* @__PURE__ */ P(De.Provider, {
|
|
330
|
-
value: a,
|
|
331
|
-
children: e.wrapRoot({
|
|
332
|
-
children: h
|
|
333
|
-
})
|
|
334
|
-
})
|
|
335
|
-
});
|
|
336
|
-
}
|
|
337
|
-
const $ = (t, e, o) => {
|
|
338
|
-
t.$$publishEvent(e, o);
|
|
339
|
-
}, Pt = (t, e, o) => {
|
|
340
|
-
if (t == null)
|
|
341
|
-
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(e)].join(`
|
|
342
|
-
`));
|
|
343
|
-
if (o[t] != null)
|
|
344
|
-
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: "${t}"`].join(`
|
|
345
|
-
`));
|
|
346
|
-
}, Y = ({
|
|
347
|
-
disabledItemsFocusable: t,
|
|
348
|
-
items: e,
|
|
349
|
-
isItemDisabled: o,
|
|
350
|
-
getItemLabel: i,
|
|
351
|
-
getItemChildren: l,
|
|
352
|
-
getItemId: h,
|
|
353
|
-
initialDepth: a = 0,
|
|
354
|
-
initialParentId: d = null,
|
|
355
|
-
getChildrenCount: r,
|
|
356
|
-
ignoreChildren: m = !1
|
|
357
|
-
}) => {
|
|
358
|
-
const c = {}, n = {}, s = {
|
|
359
|
-
[ie]: []
|
|
360
|
-
}, I = (E, p, u) => {
|
|
361
|
-
const f = h ? h(E) : E.id;
|
|
362
|
-
Pt(f, E, c);
|
|
363
|
-
const w = i ? i(E) : E.label;
|
|
364
|
-
if (w == null)
|
|
365
|
-
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(E)].join(`
|
|
366
|
-
`));
|
|
367
|
-
const k = l ? l(E) : E.children;
|
|
368
|
-
c[f] = {
|
|
369
|
-
id: f,
|
|
370
|
-
label: w,
|
|
371
|
-
parentId: u,
|
|
372
|
-
idAttribute: void 0,
|
|
373
|
-
expandable: r ? r(E) > 0 : !!(k != null && k.length),
|
|
374
|
-
disabled: o ? o(E) : !1,
|
|
375
|
-
depth: p
|
|
376
|
-
}, n[f] = E;
|
|
377
|
-
const C = u ?? ie;
|
|
378
|
-
s[C] || (s[C] = []), s[C].push(f), m || k == null || k.forEach((y) => I(y, p + 1, f));
|
|
379
|
-
};
|
|
380
|
-
e == null || e.forEach((E) => I(E, a, d));
|
|
381
|
-
const b = {};
|
|
382
|
-
return Object.keys(s).forEach((E) => {
|
|
383
|
-
b[E] = Oe(s[E]);
|
|
384
|
-
}), {
|
|
385
|
-
disabledItemsFocusable: t,
|
|
386
|
-
itemMetaLookup: c,
|
|
387
|
-
itemModelLookup: n,
|
|
388
|
-
itemOrderedChildrenIdsLookup: s,
|
|
389
|
-
itemChildrenIndexesLookup: b
|
|
390
|
-
};
|
|
391
|
-
}, F = ({
|
|
392
|
-
instance: t,
|
|
393
|
-
params: e,
|
|
394
|
-
store: o
|
|
395
|
-
}) => {
|
|
396
|
-
const i = x.useCallback((u) => se(o.value, u), [o]), l = x.useCallback((u) => {
|
|
397
|
-
const f = V(o.value, u);
|
|
398
|
-
return (f == null ? void 0 : f.parentId) || null;
|
|
399
|
-
}, [o]), h = S((u) => {
|
|
400
|
-
o.update((f) => T({}, f, {
|
|
401
|
-
items: T({}, f.items, {
|
|
402
|
-
loading: u
|
|
403
|
-
})
|
|
404
|
-
}));
|
|
405
|
-
}), a = S((u) => {
|
|
406
|
-
o.update((f) => T({}, f, {
|
|
407
|
-
items: T({}, f.items, {
|
|
408
|
-
error: u
|
|
409
|
-
})
|
|
410
|
-
}));
|
|
411
|
-
}), d = S(({
|
|
412
|
-
itemId: u,
|
|
413
|
-
shouldBeDisabled: f
|
|
414
|
-
}) => {
|
|
415
|
-
o.update((w) => {
|
|
416
|
-
if (!w.items.itemMetaLookup[u])
|
|
417
|
-
return w;
|
|
418
|
-
const k = T({}, w.items.itemMetaLookup);
|
|
419
|
-
return k[u] = T({}, k[u], {
|
|
420
|
-
disabled: f ?? !k[u].disabled
|
|
421
|
-
}), T({}, w, {
|
|
422
|
-
items: T({}, w.items, {
|
|
423
|
-
itemMetaLookup: k
|
|
424
|
-
})
|
|
425
|
-
});
|
|
426
|
-
});
|
|
427
|
-
}), r = x.useCallback(() => {
|
|
428
|
-
const u = (f) => {
|
|
429
|
-
const w = se(o.value, f), k = R(o.value, f);
|
|
430
|
-
return k.length > 0 ? w.children = k.map(u) : delete w.children, w;
|
|
431
|
-
};
|
|
432
|
-
return R(o.value, null).map(u);
|
|
433
|
-
}, [o]), m = x.useCallback((u) => R(o.value, u), [o]), c = (u) => {
|
|
434
|
-
const f = V(o.value, u);
|
|
435
|
-
if (f == null)
|
|
436
|
-
return null;
|
|
437
|
-
const w = Ve({
|
|
438
|
-
treeId: de(o.value),
|
|
439
|
-
itemId: u,
|
|
440
|
-
id: f.idAttribute
|
|
441
|
-
});
|
|
442
|
-
return document.getElementById(w);
|
|
443
|
-
}, n = x.useRef(!1), s = x.useCallback(() => {
|
|
444
|
-
n.current = !0;
|
|
445
|
-
}, []), I = x.useCallback(() => n.current, []), b = ({
|
|
446
|
-
items: u,
|
|
447
|
-
parentId: f,
|
|
448
|
-
depth: w,
|
|
449
|
-
getChildrenCount: k
|
|
450
|
-
}) => {
|
|
451
|
-
if (u) {
|
|
452
|
-
const C = Y({
|
|
453
|
-
disabledItemsFocusable: e.disabledItemsFocusable,
|
|
454
|
-
items: u,
|
|
455
|
-
isItemDisabled: e.isItemDisabled,
|
|
456
|
-
getItemId: e.getItemId,
|
|
457
|
-
getItemLabel: e.getItemLabel,
|
|
458
|
-
getItemChildren: e.getItemChildren,
|
|
459
|
-
getChildrenCount: k,
|
|
460
|
-
initialDepth: w,
|
|
461
|
-
initialParentId: f,
|
|
462
|
-
ignoreChildren: !0
|
|
463
|
-
});
|
|
464
|
-
o.update((y) => {
|
|
465
|
-
let D;
|
|
466
|
-
return f ? D = {
|
|
467
|
-
itemModelLookup: T({}, y.items.itemModelLookup, C.itemModelLookup),
|
|
468
|
-
itemMetaLookup: T({}, y.items.itemMetaLookup, C.itemMetaLookup),
|
|
469
|
-
itemOrderedChildrenIdsLookup: T({}, C.itemOrderedChildrenIdsLookup, y.items.itemOrderedChildrenIdsLookup),
|
|
470
|
-
itemChildrenIndexesLookup: T({}, C.itemChildrenIndexesLookup, y.items.itemChildrenIndexesLookup)
|
|
471
|
-
} : D = {
|
|
472
|
-
itemModelLookup: C.itemModelLookup,
|
|
473
|
-
itemMetaLookup: C.itemMetaLookup,
|
|
474
|
-
itemOrderedChildrenIdsLookup: C.itemOrderedChildrenIdsLookup,
|
|
475
|
-
itemChildrenIndexesLookup: C.itemChildrenIndexesLookup
|
|
476
|
-
}, Object.values(y.items.itemMetaLookup).forEach((v) => {
|
|
477
|
-
D.itemMetaLookup[v.id] || $(t, "removeItem", {
|
|
478
|
-
id: v.id
|
|
479
|
-
});
|
|
480
|
-
}), T({}, y, {
|
|
481
|
-
items: T({}, y.items, D)
|
|
482
|
-
});
|
|
483
|
-
});
|
|
484
|
-
}
|
|
485
|
-
}, E = (u) => {
|
|
486
|
-
o.update((f) => {
|
|
487
|
-
if (!u)
|
|
488
|
-
return T({}, f, {
|
|
489
|
-
items: T({}, f.items, {
|
|
490
|
-
itemMetaLookup: {},
|
|
491
|
-
itemOrderedChildrenIdsLookup: {},
|
|
492
|
-
itemChildrenIndexesLookup: {}
|
|
493
|
-
})
|
|
494
|
-
});
|
|
495
|
-
const w = Object.keys(f.items.itemMetaLookup).reduce((y, D) => {
|
|
496
|
-
const v = f.items.itemMetaLookup[D];
|
|
497
|
-
return v.parentId === u ? ($(t, "removeItem", {
|
|
498
|
-
id: v.id
|
|
499
|
-
}), y) : T({}, y, {
|
|
500
|
-
[v.id]: v
|
|
501
|
-
});
|
|
502
|
-
}, {}), k = f.items.itemOrderedChildrenIdsLookup, C = f.items.itemChildrenIndexesLookup;
|
|
503
|
-
return delete C[u], delete k[u], T({}, f, {
|
|
504
|
-
items: T({}, f.items, {
|
|
505
|
-
itemMetaLookup: w,
|
|
506
|
-
itemOrderedChildrenIdsLookup: k,
|
|
507
|
-
itemChildrenIndexesLookup: C
|
|
508
|
-
})
|
|
509
|
-
});
|
|
510
|
-
});
|
|
511
|
-
};
|
|
512
|
-
x.useEffect(() => {
|
|
513
|
-
t.areItemUpdatesPrevented() || o.update((u) => {
|
|
514
|
-
const f = Y({
|
|
515
|
-
disabledItemsFocusable: e.disabledItemsFocusable,
|
|
516
|
-
items: e.items,
|
|
517
|
-
isItemDisabled: e.isItemDisabled,
|
|
518
|
-
getItemId: e.getItemId,
|
|
519
|
-
getItemLabel: e.getItemLabel,
|
|
520
|
-
getItemChildren: e.getItemChildren
|
|
521
|
-
});
|
|
522
|
-
return Object.values(u.items.itemMetaLookup).forEach((w) => {
|
|
523
|
-
f.itemMetaLookup[w.id] || $(t, "removeItem", {
|
|
524
|
-
id: w.id
|
|
525
|
-
});
|
|
526
|
-
}), T({}, u, {
|
|
527
|
-
items: T({}, u.items, f)
|
|
528
|
-
});
|
|
529
|
-
});
|
|
530
|
-
}, [t, o, e.items, e.disabledItemsFocusable, e.isItemDisabled, e.getItemId, e.getItemLabel, e.getItemChildren]);
|
|
531
|
-
const p = S((u, f) => {
|
|
532
|
-
e.onItemClick && e.onItemClick(u, f);
|
|
533
|
-
});
|
|
534
|
-
return {
|
|
535
|
-
getRootProps: () => ({
|
|
536
|
-
style: {
|
|
537
|
-
"--TreeView-itemChildrenIndentation": typeof e.itemChildrenIndentation == "number" ? `${e.itemChildrenIndentation}px` : e.itemChildrenIndentation
|
|
538
|
-
}
|
|
539
|
-
}),
|
|
540
|
-
publicAPI: {
|
|
541
|
-
getItem: i,
|
|
542
|
-
getItemDOMElement: c,
|
|
543
|
-
getItemTree: r,
|
|
544
|
-
getItemOrderedChildrenIds: m,
|
|
545
|
-
setIsItemDisabled: d,
|
|
546
|
-
getParentId: l
|
|
547
|
-
},
|
|
548
|
-
instance: {
|
|
549
|
-
getItemDOMElement: c,
|
|
550
|
-
preventItemUpdates: s,
|
|
551
|
-
areItemUpdatesPrevented: I,
|
|
552
|
-
addItems: b,
|
|
553
|
-
setTreeViewLoading: h,
|
|
554
|
-
setTreeViewError: a,
|
|
555
|
-
removeChildren: E,
|
|
556
|
-
handleItemClick: p
|
|
557
|
-
}
|
|
558
|
-
};
|
|
559
|
-
};
|
|
560
|
-
F.getInitialState = (t) => ({
|
|
561
|
-
items: T({}, Y({
|
|
562
|
-
disabledItemsFocusable: t.disabledItemsFocusable,
|
|
563
|
-
items: t.items,
|
|
564
|
-
isItemDisabled: t.isItemDisabled,
|
|
565
|
-
getItemId: t.getItemId,
|
|
566
|
-
getItemLabel: t.getItemLabel,
|
|
567
|
-
getItemChildren: t.getItemChildren
|
|
568
|
-
}), {
|
|
569
|
-
loading: !1,
|
|
570
|
-
error: null
|
|
571
|
-
})
|
|
572
|
-
});
|
|
573
|
-
F.applyDefaultValuesToParams = ({
|
|
574
|
-
params: t
|
|
575
|
-
}) => T({}, t, {
|
|
576
|
-
disabledItemsFocusable: t.disabledItemsFocusable ?? !1,
|
|
577
|
-
itemChildrenIndentation: t.itemChildrenIndentation ?? "12px"
|
|
578
|
-
});
|
|
579
|
-
F.wrapRoot = ({
|
|
580
|
-
children: t
|
|
581
|
-
}) => /* @__PURE__ */ P(Ae.Provider, {
|
|
582
|
-
value: Fe,
|
|
583
|
-
children: t
|
|
584
|
-
});
|
|
585
|
-
process.env.NODE_ENV !== "production" && (F.wrapRoot.displayName = "useTreeViewItems.wrapRoot");
|
|
586
|
-
F.params = {
|
|
587
|
-
disabledItemsFocusable: !0,
|
|
588
|
-
items: !0,
|
|
589
|
-
isItemDisabled: !0,
|
|
590
|
-
getItemLabel: !0,
|
|
591
|
-
getItemChildren: !0,
|
|
592
|
-
getItemId: !0,
|
|
593
|
-
onItemClick: !0,
|
|
594
|
-
itemChildrenIndentation: !0
|
|
595
|
-
};
|
|
596
|
-
function yt(t) {
|
|
597
|
-
const {
|
|
598
|
-
componentName: e,
|
|
599
|
-
propName: o,
|
|
600
|
-
controlled: i,
|
|
601
|
-
defaultValue: l,
|
|
602
|
-
warningPrefix: h = "MUI X"
|
|
603
|
-
} = t, [{
|
|
604
|
-
initialDefaultValue: a,
|
|
605
|
-
isControlled: d
|
|
606
|
-
}] = x.useState({
|
|
607
|
-
initialDefaultValue: l,
|
|
608
|
-
isControlled: i !== void 0
|
|
609
|
-
});
|
|
610
|
-
d !== (i !== void 0) && Q([`${h}: A component is changing the ${d ? "" : "un"}controlled ${o} state of ${e} to be ${d ? "un" : ""}controlled.`, "Elements should not switch from uncontrolled to controlled (or vice versa).", `Decide between using a controlled or uncontrolled ${o} 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"], "error"), JSON.stringify(a) !== JSON.stringify(l) && Q([`${h}: A component is changing the default ${o} state of an uncontrolled ${e} after being initialized. To suppress this warning opt to use a controlled ${e}.`], "error");
|
|
611
|
-
}
|
|
612
|
-
const Ee = process.env.NODE_ENV === "production" ? () => {
|
|
613
|
-
} : yt, Te = ({
|
|
614
|
-
isItemEditable: t,
|
|
615
|
-
expansionTrigger: e
|
|
616
|
-
}) => e || (t ? "iconContainer" : "content"), q = ({
|
|
617
|
-
instance: t,
|
|
618
|
-
store: e,
|
|
619
|
-
params: o
|
|
620
|
-
}) => {
|
|
621
|
-
Ee({
|
|
622
|
-
componentName: "Tree View",
|
|
623
|
-
propName: "expandedItems",
|
|
624
|
-
controlled: o.expandedItems,
|
|
625
|
-
defaultValue: o.defaultExpandedItems
|
|
626
|
-
}), J(() => {
|
|
627
|
-
e.update((r) => {
|
|
628
|
-
const m = Te({
|
|
629
|
-
isItemEditable: o.isItemEditable,
|
|
630
|
-
expansionTrigger: o.expansionTrigger
|
|
631
|
-
});
|
|
632
|
-
return r.expansion.expansionTrigger === m ? r : T({}, r, {
|
|
633
|
-
expansion: T({}, r.expansion, {
|
|
634
|
-
expansionTrigger: m
|
|
635
|
-
})
|
|
636
|
-
});
|
|
637
|
-
});
|
|
638
|
-
}, [e, o.isItemEditable, o.expansionTrigger]);
|
|
639
|
-
const i = (r, m) => {
|
|
640
|
-
var c;
|
|
641
|
-
o.expandedItems === void 0 && e.update((n) => T({}, n, {
|
|
642
|
-
expansion: T({}, n.expansion, {
|
|
643
|
-
expandedItems: m
|
|
644
|
-
})
|
|
645
|
-
})), (c = o.onExpandedItemsChange) == null || c.call(o, r, m);
|
|
646
|
-
}, l = S(() => {
|
|
647
|
-
i(null, []);
|
|
648
|
-
}), h = S(({
|
|
649
|
-
itemId: r,
|
|
650
|
-
event: m,
|
|
651
|
-
shouldBeExpanded: c
|
|
652
|
-
}) => {
|
|
653
|
-
const n = le(e.value);
|
|
654
|
-
let s;
|
|
655
|
-
c ? s = [r].concat(n) : s = n.filter((I) => I !== r), o.onItemExpansionToggle && o.onItemExpansionToggle(m, r, c), i(m, s);
|
|
656
|
-
}), a = S(({
|
|
657
|
-
itemId: r,
|
|
658
|
-
event: m = null,
|
|
659
|
-
shouldBeExpanded: c
|
|
660
|
-
}) => {
|
|
661
|
-
const n = N(e.value, r), s = c ?? !n;
|
|
662
|
-
if (n === s)
|
|
663
|
-
return;
|
|
664
|
-
const I = {
|
|
665
|
-
isExpansionPrevented: !1,
|
|
666
|
-
shouldBeExpanded: s,
|
|
667
|
-
event: m,
|
|
668
|
-
itemId: r
|
|
669
|
-
};
|
|
670
|
-
$(t, "beforeItemToggleExpansion", I), !I.isExpansionPrevented && t.applyItemExpansion({
|
|
671
|
-
itemId: r,
|
|
672
|
-
event: m,
|
|
673
|
-
shouldBeExpanded: s
|
|
674
|
-
});
|
|
675
|
-
}), d = (r, m) => {
|
|
676
|
-
const c = V(e.value, m);
|
|
677
|
-
if (c == null)
|
|
678
|
-
return;
|
|
679
|
-
const s = R(e.value, c.parentId).filter((b) => fe(e.value, b) && !N(e.value, b)), I = le(e.value).concat(s);
|
|
680
|
-
s.length > 0 && (o.onItemExpansionToggle && s.forEach((b) => {
|
|
681
|
-
o.onItemExpansionToggle(r, b, !0);
|
|
682
|
-
}), i(r, I));
|
|
683
|
-
};
|
|
684
|
-
return J(() => {
|
|
685
|
-
const r = o.expandedItems;
|
|
686
|
-
r !== void 0 && e.update((m) => T({}, m, {
|
|
687
|
-
expansion: T({}, m.expansion, {
|
|
688
|
-
expandedItems: r
|
|
689
|
-
})
|
|
690
|
-
}));
|
|
691
|
-
}, [e, o.expandedItems]), {
|
|
692
|
-
publicAPI: {
|
|
693
|
-
setItemExpansion: a
|
|
694
|
-
},
|
|
695
|
-
instance: {
|
|
696
|
-
setItemExpansion: a,
|
|
697
|
-
applyItemExpansion: h,
|
|
698
|
-
expandAllSiblings: d,
|
|
699
|
-
resetItemExpansion: l
|
|
700
|
-
}
|
|
701
|
-
};
|
|
702
|
-
}, Rt = [];
|
|
703
|
-
q.applyDefaultValuesToParams = ({
|
|
704
|
-
params: t
|
|
705
|
-
}) => T({}, t, {
|
|
706
|
-
defaultExpandedItems: t.defaultExpandedItems ?? Rt
|
|
707
|
-
});
|
|
708
|
-
q.getInitialState = (t) => ({
|
|
709
|
-
expansion: {
|
|
710
|
-
expandedItems: t.expandedItems === void 0 ? t.defaultExpandedItems : t.expandedItems,
|
|
711
|
-
expansionTrigger: Te(t)
|
|
712
|
-
}
|
|
713
|
-
});
|
|
714
|
-
q.params = {
|
|
715
|
-
expandedItems: !0,
|
|
716
|
-
defaultExpandedItems: !0,
|
|
717
|
-
onExpandedItemsChange: !0,
|
|
718
|
-
onItemExpansionToggle: !0,
|
|
719
|
-
expansionTrigger: !0
|
|
720
|
-
};
|
|
721
|
-
const U = (t) => {
|
|
722
|
-
const e = {};
|
|
723
|
-
return t.forEach((o) => {
|
|
724
|
-
e[o] = !0;
|
|
725
|
-
}), e;
|
|
726
|
-
}, xe = ({
|
|
727
|
-
store: t,
|
|
728
|
-
oldModel: e,
|
|
729
|
-
newModel: o
|
|
730
|
-
}) => {
|
|
731
|
-
const i = /* @__PURE__ */ new Map();
|
|
732
|
-
return o.forEach((l) => {
|
|
733
|
-
i.set(l, !0);
|
|
734
|
-
}), {
|
|
735
|
-
added: o.filter((l) => !A(t.value, l)),
|
|
736
|
-
removed: e.filter((l) => !i.has(l))
|
|
737
|
-
};
|
|
738
|
-
}, St = ({
|
|
739
|
-
store: t,
|
|
740
|
-
selectionPropagation: e,
|
|
741
|
-
newModel: o,
|
|
742
|
-
oldModel: i,
|
|
743
|
-
additionalItemsToPropagate: l
|
|
744
|
-
}) => {
|
|
745
|
-
if (!e.descendants && !e.parents)
|
|
746
|
-
return o;
|
|
747
|
-
let h = !1;
|
|
748
|
-
const a = U(o), d = xe({
|
|
749
|
-
store: t,
|
|
750
|
-
newModel: o,
|
|
751
|
-
oldModel: i
|
|
752
|
-
});
|
|
753
|
-
return l == null || l.forEach((r) => {
|
|
754
|
-
a[r] ? d.added.includes(r) || d.added.push(r) : d.removed.includes(r) || d.removed.push(r);
|
|
755
|
-
}), d.added.forEach((r) => {
|
|
756
|
-
if (e.descendants) {
|
|
757
|
-
const m = (c) => {
|
|
758
|
-
c !== r && (h = !0, a[c] = !0), R(t.value, c).forEach(m);
|
|
759
|
-
};
|
|
760
|
-
m(r);
|
|
761
|
-
}
|
|
762
|
-
if (e.parents) {
|
|
763
|
-
const m = (n) => a[n] ? R(t.value, n).every(m) : !1, c = (n) => {
|
|
764
|
-
const s = _(t.value, n);
|
|
765
|
-
if (s == null)
|
|
766
|
-
return;
|
|
767
|
-
R(t.value, s).every(m) && (h = !0, a[s] = !0, c(s));
|
|
768
|
-
};
|
|
769
|
-
c(r);
|
|
770
|
-
}
|
|
771
|
-
}), d.removed.forEach((r) => {
|
|
772
|
-
if (e.parents) {
|
|
773
|
-
let m = _(t.value, r);
|
|
774
|
-
for (; m != null; )
|
|
775
|
-
a[m] && (h = !0, delete a[m]), m = _(t.value, m);
|
|
776
|
-
}
|
|
777
|
-
if (e.descendants) {
|
|
778
|
-
const m = (c) => {
|
|
779
|
-
c !== r && (h = !0, delete a[c]), R(t.value, c).forEach(m);
|
|
780
|
-
};
|
|
781
|
-
m(r);
|
|
782
|
-
}
|
|
783
|
-
}), h ? Object.keys(a) : o;
|
|
784
|
-
}, Lt = Object.is;
|
|
785
|
-
function we(t, e) {
|
|
786
|
-
if (t === e)
|
|
787
|
-
return !0;
|
|
788
|
-
if (!(t instanceof Object) || !(e instanceof Object))
|
|
789
|
-
return !1;
|
|
790
|
-
let o = 0, i = 0;
|
|
791
|
-
for (const l in t)
|
|
792
|
-
if (o += 1, !Lt(t[l], e[l]) || !(l in e))
|
|
793
|
-
return !1;
|
|
794
|
-
for (const l in e)
|
|
795
|
-
i += 1;
|
|
796
|
-
return o === i;
|
|
797
|
-
}
|
|
798
|
-
function Mt(t, e) {
|
|
799
|
-
const o = Ne(t), i = me(t, e);
|
|
800
|
-
if (A(t, e))
|
|
801
|
-
return {
|
|
802
|
-
disabled: !i,
|
|
803
|
-
visible: o,
|
|
804
|
-
indeterminate: !1,
|
|
805
|
-
checked: !0
|
|
806
|
-
};
|
|
807
|
-
if (R(t, e).length === 0)
|
|
808
|
-
return {
|
|
809
|
-
disabled: !i,
|
|
810
|
-
visible: o,
|
|
811
|
-
indeterminate: !1,
|
|
812
|
-
checked: !1
|
|
813
|
-
};
|
|
814
|
-
let h = !1, a = !1;
|
|
815
|
-
const d = (r) => {
|
|
816
|
-
r !== e && (A(t, r) ? h = !0 : a = !0), R(t, r).forEach(d);
|
|
817
|
-
};
|
|
818
|
-
return d(e), {
|
|
819
|
-
disabled: !i,
|
|
820
|
-
visible: o,
|
|
821
|
-
indeterminate: h && a,
|
|
822
|
-
checked: je(t).parents ? h && !a : !1
|
|
823
|
-
};
|
|
824
|
-
}
|
|
825
|
-
const vt = ({
|
|
826
|
-
props: t
|
|
827
|
-
}) => {
|
|
828
|
-
const {
|
|
829
|
-
itemId: e
|
|
830
|
-
} = t, {
|
|
831
|
-
store: o
|
|
832
|
-
} = Z(), i = M(o, Mt, e, we);
|
|
833
|
-
return {
|
|
834
|
-
propsEnhancers: {
|
|
835
|
-
checkbox: ({
|
|
836
|
-
externalEventHandlers: l,
|
|
837
|
-
interactions: h
|
|
838
|
-
}) => T({
|
|
839
|
-
tabIndex: -1,
|
|
840
|
-
onChange: (d) => {
|
|
841
|
-
var r;
|
|
842
|
-
(r = l.onChange) == null || r.call(l, d), !d.defaultMuiPrevented && me(o.value, e) && h.handleCheckboxSelection(d);
|
|
843
|
-
}
|
|
844
|
-
}, i)
|
|
845
|
-
}
|
|
846
|
-
};
|
|
847
|
-
}, j = ({
|
|
848
|
-
store: t,
|
|
849
|
-
params: e
|
|
850
|
-
}) => {
|
|
851
|
-
Ee({
|
|
852
|
-
componentName: "Tree View",
|
|
853
|
-
propName: "selectedItems",
|
|
854
|
-
controlled: e.selectedItems,
|
|
855
|
-
defaultValue: e.defaultSelectedItems
|
|
856
|
-
});
|
|
857
|
-
const o = x.useRef(null), i = x.useRef({}), l = (s, I, b) => {
|
|
858
|
-
var f;
|
|
859
|
-
const E = Ue(t.value);
|
|
860
|
-
let p;
|
|
861
|
-
const u = O(t.value);
|
|
862
|
-
if (u && (e.selectionPropagation.descendants || e.selectionPropagation.parents) ? p = St({
|
|
863
|
-
store: t,
|
|
864
|
-
selectionPropagation: e.selectionPropagation,
|
|
865
|
-
newModel: I,
|
|
866
|
-
oldModel: E,
|
|
867
|
-
additionalItemsToPropagate: b
|
|
868
|
-
}) : p = I, e.onItemSelectionToggle)
|
|
869
|
-
if (u) {
|
|
870
|
-
const w = xe({
|
|
871
|
-
store: t,
|
|
872
|
-
newModel: p,
|
|
873
|
-
oldModel: E
|
|
874
|
-
});
|
|
875
|
-
e.onItemSelectionToggle && (w.added.forEach((k) => {
|
|
876
|
-
e.onItemSelectionToggle(s, k, !0);
|
|
877
|
-
}), w.removed.forEach((k) => {
|
|
878
|
-
e.onItemSelectionToggle(s, k, !1);
|
|
879
|
-
}));
|
|
880
|
-
} else e.onItemSelectionToggle && p !== E && (E != null && e.onItemSelectionToggle(s, E, !1), p != null && e.onItemSelectionToggle(s, p, !0));
|
|
881
|
-
e.selectedItems === void 0 && t.update((w) => T({}, w, {
|
|
882
|
-
selection: T({}, w.selection, {
|
|
883
|
-
selectedItems: p
|
|
884
|
-
})
|
|
885
|
-
})), (f = e.onSelectedItemsChange) == null || f.call(e, s, p);
|
|
886
|
-
}, h = ({
|
|
887
|
-
itemId: s,
|
|
888
|
-
event: I = null,
|
|
889
|
-
keepExistingSelection: b = !1,
|
|
890
|
-
shouldBeSelected: E
|
|
891
|
-
}) => {
|
|
892
|
-
if (!X(t.value))
|
|
893
|
-
return;
|
|
894
|
-
let p;
|
|
895
|
-
const u = O(t.value);
|
|
896
|
-
if (b) {
|
|
897
|
-
const f = K(t.value), w = A(t.value, s);
|
|
898
|
-
w && (E === !1 || E == null) ? p = f.filter((k) => k !== s) : !w && (E === !0 || E == null) ? p = [s].concat(f) : p = f;
|
|
899
|
-
} else
|
|
900
|
-
E === !1 || E == null && A(t.value, s) ? p = u ? [] : null : p = u ? [s] : s;
|
|
901
|
-
l(
|
|
902
|
-
I,
|
|
903
|
-
p,
|
|
904
|
-
// If shouldBeSelected === selectorIsItemSelected(store, itemId), we still want to propagate the select.
|
|
905
|
-
// This is useful when the element is in an indeterminate state.
|
|
906
|
-
[s]
|
|
907
|
-
), o.current = s, i.current = {};
|
|
908
|
-
}, a = (s, [I, b]) => {
|
|
909
|
-
if (!O(t.value))
|
|
910
|
-
return;
|
|
911
|
-
let p = K(t.value).slice();
|
|
912
|
-
Object.keys(i.current).length > 0 && (p = p.filter((k) => !i.current[k]));
|
|
913
|
-
const u = U(p), f = qe(t.value, I, b), w = f.filter((k) => !u[k]);
|
|
914
|
-
p = p.concat(w), l(s, p), i.current = U(f);
|
|
915
|
-
}, d = (s, I) => {
|
|
916
|
-
if (o.current != null) {
|
|
917
|
-
const [b, E] = _e(t.value, I, o.current);
|
|
918
|
-
a(s, [b, E]);
|
|
919
|
-
}
|
|
920
|
-
}, r = (s, I) => {
|
|
921
|
-
a(s, [W(t.value), I]);
|
|
922
|
-
}, m = (s, I) => {
|
|
923
|
-
a(s, [I, pe(t.value)]);
|
|
924
|
-
}, c = (s) => {
|
|
925
|
-
if (!O(t.value))
|
|
926
|
-
return;
|
|
927
|
-
const b = $e(t.value);
|
|
928
|
-
l(s, b), i.current = U(b);
|
|
929
|
-
}, n = (s, I, b) => {
|
|
930
|
-
if (!O(t.value))
|
|
931
|
-
return;
|
|
932
|
-
let p = K(t.value).slice();
|
|
933
|
-
Object.keys(i.current).length === 0 ? (p.push(b), i.current = {
|
|
934
|
-
[I]: !0,
|
|
935
|
-
[b]: !0
|
|
936
|
-
}) : (i.current[I] || (i.current = {}), i.current[b] ? (p = p.filter((u) => u !== I), delete i.current[I]) : (p.push(b), i.current[b] = !0)), l(s, p);
|
|
937
|
-
};
|
|
938
|
-
return J(() => {
|
|
939
|
-
t.update((s) => T({}, s, {
|
|
940
|
-
selection: {
|
|
941
|
-
selectedItems: e.selectedItems === void 0 ? s.selection.selectedItems : e.selectedItems,
|
|
942
|
-
isEnabled: !e.disableSelection,
|
|
943
|
-
isMultiSelectEnabled: e.multiSelect,
|
|
944
|
-
isCheckboxSelectionEnabled: e.checkboxSelection,
|
|
945
|
-
selectionPropagation: {
|
|
946
|
-
descendants: e.selectionPropagation.descendants,
|
|
947
|
-
parents: e.selectionPropagation.parents
|
|
948
|
-
}
|
|
949
|
-
}
|
|
950
|
-
}));
|
|
951
|
-
}, [t, e.selectedItems, e.multiSelect, e.checkboxSelection, e.disableSelection, e.selectionPropagation.descendants, e.selectionPropagation.parents]), {
|
|
952
|
-
getRootProps: () => ({
|
|
953
|
-
"aria-multiselectable": e.multiSelect
|
|
954
|
-
}),
|
|
955
|
-
publicAPI: {
|
|
956
|
-
setItemSelection: h
|
|
957
|
-
},
|
|
958
|
-
instance: {
|
|
959
|
-
setItemSelection: h,
|
|
960
|
-
selectAllNavigableItems: c,
|
|
961
|
-
expandSelectionRange: d,
|
|
962
|
-
selectRangeFromStartToItem: r,
|
|
963
|
-
selectRangeFromItemToEnd: m,
|
|
964
|
-
selectItemFromArrowNavigation: n
|
|
965
|
-
}
|
|
966
|
-
};
|
|
967
|
-
};
|
|
968
|
-
j.itemPlugin = vt;
|
|
969
|
-
const Dt = [], Ot = {};
|
|
970
|
-
j.applyDefaultValuesToParams = ({
|
|
971
|
-
params: t
|
|
972
|
-
}) => T({}, t, {
|
|
973
|
-
disableSelection: t.disableSelection ?? !1,
|
|
974
|
-
multiSelect: t.multiSelect ?? !1,
|
|
975
|
-
checkboxSelection: t.checkboxSelection ?? !1,
|
|
976
|
-
defaultSelectedItems: t.defaultSelectedItems ?? (t.multiSelect ? Dt : null),
|
|
977
|
-
selectionPropagation: t.selectionPropagation ?? Ot
|
|
978
|
-
});
|
|
979
|
-
j.getInitialState = (t) => ({
|
|
980
|
-
selection: {
|
|
981
|
-
selectedItems: t.selectedItems === void 0 ? t.defaultSelectedItems : t.selectedItems,
|
|
982
|
-
isEnabled: !t.disableSelection,
|
|
983
|
-
isMultiSelectEnabled: t.multiSelect,
|
|
984
|
-
isCheckboxSelectionEnabled: t.checkboxSelection,
|
|
985
|
-
selectionPropagation: t.selectionPropagation
|
|
986
|
-
}
|
|
987
|
-
});
|
|
988
|
-
j.params = {
|
|
989
|
-
disableSelection: !0,
|
|
990
|
-
multiSelect: !0,
|
|
991
|
-
checkboxSelection: !0,
|
|
992
|
-
defaultSelectedItems: !0,
|
|
993
|
-
selectedItems: !0,
|
|
994
|
-
onSelectedItemsChange: !0,
|
|
995
|
-
onItemSelectionToggle: !0,
|
|
996
|
-
selectionPropagation: !0
|
|
997
|
-
};
|
|
998
|
-
const ae = 1e3;
|
|
999
|
-
class Vt {
|
|
1000
|
-
constructor(e = ae) {
|
|
1001
|
-
L(this, "timeouts", /* @__PURE__ */ new Map());
|
|
1002
|
-
L(this, "cleanupTimeout", ae);
|
|
1003
|
-
this.cleanupTimeout = e;
|
|
1004
|
-
}
|
|
1005
|
-
register(e, o, i) {
|
|
1006
|
-
this.timeouts || (this.timeouts = /* @__PURE__ */ new Map());
|
|
1007
|
-
const l = setTimeout(() => {
|
|
1008
|
-
typeof o == "function" && o(), this.timeouts.delete(i.cleanupToken);
|
|
1009
|
-
}, this.cleanupTimeout);
|
|
1010
|
-
this.timeouts.set(i.cleanupToken, l);
|
|
1011
|
-
}
|
|
1012
|
-
unregister(e) {
|
|
1013
|
-
const o = this.timeouts.get(e.cleanupToken);
|
|
1014
|
-
o && (this.timeouts.delete(e.cleanupToken), clearTimeout(o));
|
|
1015
|
-
}
|
|
1016
|
-
reset() {
|
|
1017
|
-
this.timeouts && (this.timeouts.forEach((e, o) => {
|
|
1018
|
-
this.unregister({
|
|
1019
|
-
cleanupToken: o
|
|
1020
|
-
});
|
|
1021
|
-
}), this.timeouts = void 0);
|
|
1022
|
-
}
|
|
1023
|
-
}
|
|
1024
|
-
class At {
|
|
1025
|
-
constructor() {
|
|
1026
|
-
L(this, "registry", new FinalizationRegistry((e) => {
|
|
1027
|
-
typeof e == "function" && e();
|
|
1028
|
-
}));
|
|
1029
|
-
}
|
|
1030
|
-
register(e, o, i) {
|
|
1031
|
-
this.registry.register(e, o, i);
|
|
1032
|
-
}
|
|
1033
|
-
unregister(e) {
|
|
1034
|
-
this.registry.unregister(e);
|
|
1035
|
-
}
|
|
1036
|
-
// eslint-disable-next-line class-methods-use-this
|
|
1037
|
-
reset() {
|
|
1038
|
-
}
|
|
1039
|
-
}
|
|
1040
|
-
class Ft {
|
|
1041
|
-
}
|
|
1042
|
-
function Nt(t) {
|
|
1043
|
-
let e = 0;
|
|
1044
|
-
return function(i, l, h) {
|
|
1045
|
-
t.registry === null && (t.registry = typeof FinalizationRegistry < "u" ? new At() : new Vt());
|
|
1046
|
-
const [a] = x.useState(new Ft()), d = x.useRef(null), r = x.useRef(void 0);
|
|
1047
|
-
r.current = h;
|
|
1048
|
-
const m = x.useRef(null);
|
|
1049
|
-
if (!d.current && r.current) {
|
|
1050
|
-
const c = (n, s) => {
|
|
1051
|
-
var I;
|
|
1052
|
-
s.defaultMuiPrevented || (I = r.current) == null || I.call(r, n, s);
|
|
1053
|
-
};
|
|
1054
|
-
d.current = i.$$subscribeEvent(l, c), e += 1, m.current = {
|
|
1055
|
-
cleanupToken: e
|
|
1056
|
-
}, t.registry.register(
|
|
1057
|
-
a,
|
|
1058
|
-
// The callback below will be called once this reference stops being retained
|
|
1059
|
-
() => {
|
|
1060
|
-
var n;
|
|
1061
|
-
(n = d.current) == null || n.call(d), d.current = null, m.current = null;
|
|
1062
|
-
},
|
|
1063
|
-
m.current
|
|
1064
|
-
);
|
|
1065
|
-
} else !r.current && d.current && (d.current(), d.current = null, m.current && (t.registry.unregister(m.current), m.current = null));
|
|
1066
|
-
x.useEffect(() => {
|
|
1067
|
-
if (!d.current && r.current) {
|
|
1068
|
-
const c = (n, s) => {
|
|
1069
|
-
var I;
|
|
1070
|
-
s.defaultMuiPrevented || (I = r.current) == null || I.call(r, n, s);
|
|
1071
|
-
};
|
|
1072
|
-
d.current = i.$$subscribeEvent(l, c);
|
|
1073
|
-
}
|
|
1074
|
-
return m.current && t.registry && (t.registry.unregister(m.current), m.current = null), () => {
|
|
1075
|
-
var c;
|
|
1076
|
-
(c = d.current) == null || c.call(d), d.current = null;
|
|
1077
|
-
};
|
|
1078
|
-
}, [i, l]);
|
|
1079
|
-
};
|
|
1080
|
-
}
|
|
1081
|
-
const jt = {
|
|
1082
|
-
registry: null
|
|
1083
|
-
}, _t = Nt(jt), te = ({
|
|
1084
|
-
instance: t,
|
|
1085
|
-
params: e,
|
|
1086
|
-
store: o
|
|
1087
|
-
}) => {
|
|
1088
|
-
const i = S((c) => {
|
|
1089
|
-
o.update((n) => B(n) === c ? n : T({}, n, {
|
|
1090
|
-
focus: T({}, n.focus, {
|
|
1091
|
-
focusedItemId: c
|
|
1092
|
-
})
|
|
1093
|
-
}));
|
|
1094
|
-
}), l = (c) => {
|
|
1095
|
-
const n = V(o.value, c);
|
|
1096
|
-
return n && (n.parentId == null || N(o.value, n.parentId));
|
|
1097
|
-
}, h = (c, n) => {
|
|
1098
|
-
const s = t.getItemDOMElement(n);
|
|
1099
|
-
s && s.focus(), i(n), e.onItemFocus && e.onItemFocus(c, n);
|
|
1100
|
-
}, a = S((c, n) => {
|
|
1101
|
-
l(n) && h(c, n);
|
|
1102
|
-
}), d = S(() => {
|
|
1103
|
-
const c = B(o.value);
|
|
1104
|
-
if (c == null)
|
|
1105
|
-
return;
|
|
1106
|
-
if (V(o.value, c)) {
|
|
1107
|
-
const s = t.getItemDOMElement(c);
|
|
1108
|
-
s && s.blur();
|
|
1109
|
-
}
|
|
1110
|
-
i(null);
|
|
1111
|
-
});
|
|
1112
|
-
_t(t, "removeItem", ({
|
|
1113
|
-
id: c
|
|
1114
|
-
}) => {
|
|
1115
|
-
const n = B(o.value), s = re(o.value);
|
|
1116
|
-
n === c && s != null && h(null, s);
|
|
1117
|
-
});
|
|
1118
|
-
const r = (c) => (n) => {
|
|
1119
|
-
var I;
|
|
1120
|
-
if ((I = c.onFocus) == null || I.call(c, n), n.defaultMuiPrevented)
|
|
1121
|
-
return;
|
|
1122
|
-
const s = re(o.value);
|
|
1123
|
-
n.target === n.currentTarget && s != null && h(n, s);
|
|
1124
|
-
}, m = (c) => (n) => {
|
|
1125
|
-
var s;
|
|
1126
|
-
(s = c.onBlur) == null || s.call(c, n), !n.defaultMuiPrevented && i(null);
|
|
1127
|
-
};
|
|
1128
|
-
return {
|
|
1129
|
-
getRootProps: (c) => ({
|
|
1130
|
-
onFocus: r(c),
|
|
1131
|
-
onBlur: m(c)
|
|
1132
|
-
}),
|
|
1133
|
-
publicAPI: {
|
|
1134
|
-
focusItem: a
|
|
1135
|
-
},
|
|
1136
|
-
instance: {
|
|
1137
|
-
focusItem: a,
|
|
1138
|
-
removeFocusedItem: d
|
|
1139
|
-
}
|
|
1140
|
-
};
|
|
1141
|
-
};
|
|
1142
|
-
te.getInitialState = () => ({
|
|
1143
|
-
focus: {
|
|
1144
|
-
focusedItemId: null
|
|
1145
|
-
}
|
|
1146
|
-
});
|
|
1147
|
-
te.params = {
|
|
1148
|
-
onItemFocus: !0
|
|
1149
|
-
};
|
|
1150
|
-
function $t(t) {
|
|
1151
|
-
return !!t && t.length === 1 && !!t.match(/\S/);
|
|
1152
|
-
}
|
|
1153
|
-
const ke = ({
|
|
1154
|
-
instance: t,
|
|
1155
|
-
store: e,
|
|
1156
|
-
params: o
|
|
1157
|
-
}) => {
|
|
1158
|
-
const i = rt(), l = x.useRef({}), h = S((n) => {
|
|
1159
|
-
l.current = n(l.current);
|
|
1160
|
-
}), a = M(e, Ke);
|
|
1161
|
-
x.useEffect(() => {
|
|
1162
|
-
if (t.areItemUpdatesPrevented())
|
|
1163
|
-
return;
|
|
1164
|
-
const n = {}, s = (I) => {
|
|
1165
|
-
n[I.id] = I.label.substring(0, 1).toLowerCase();
|
|
1166
|
-
};
|
|
1167
|
-
Object.values(a).forEach(s), l.current = n;
|
|
1168
|
-
}, [a, o.getItemId, t]);
|
|
1169
|
-
const d = (n, s) => {
|
|
1170
|
-
const I = s.toLowerCase(), b = (f) => {
|
|
1171
|
-
const w = z(e.value, f);
|
|
1172
|
-
return w === null ? W(e.value) : w;
|
|
1173
|
-
};
|
|
1174
|
-
let E = null, p = b(n);
|
|
1175
|
-
const u = {};
|
|
1176
|
-
for (; E == null && !u[p]; )
|
|
1177
|
-
l.current[p] === I ? E = p : (u[p] = !0, p = b(p));
|
|
1178
|
-
return E;
|
|
1179
|
-
}, r = (n) => X(e.value) && !ce(e.value, n), m = (n) => !ce(e.value, n) && fe(e.value, n);
|
|
1180
|
-
return {
|
|
1181
|
-
instance: {
|
|
1182
|
-
updateFirstCharMap: h,
|
|
1183
|
-
handleItemKeyDown: async (n, s) => {
|
|
1184
|
-
if (n.defaultMuiPrevented || n.altKey || Be(n.target, n.currentTarget))
|
|
1185
|
-
return;
|
|
1186
|
-
const I = n.ctrlKey || n.metaKey, b = n.key, E = O(e.value);
|
|
1187
|
-
switch (!0) {
|
|
1188
|
-
// Select the item when pressing "Space"
|
|
1189
|
-
case (b === " " && r(s)): {
|
|
1190
|
-
n.preventDefault(), E && n.shiftKey ? t.expandSelectionRange(n, s) : t.setItemSelection({
|
|
1191
|
-
event: n,
|
|
1192
|
-
itemId: s,
|
|
1193
|
-
keepExistingSelection: E,
|
|
1194
|
-
shouldBeSelected: void 0
|
|
1195
|
-
});
|
|
1196
|
-
break;
|
|
1197
|
-
}
|
|
1198
|
-
// If the focused item has children, we expand it.
|
|
1199
|
-
// If the focused item has no children, we select it.
|
|
1200
|
-
case b === "Enter": {
|
|
1201
|
-
Ge(t, Ie) && We(e.value, s) && !Xe(e.value, s) ? t.setEditedItem(s) : m(s) ? (t.setItemExpansion({
|
|
1202
|
-
event: n,
|
|
1203
|
-
itemId: s
|
|
1204
|
-
}), n.preventDefault()) : r(s) && (E ? (n.preventDefault(), t.setItemSelection({
|
|
1205
|
-
event: n,
|
|
1206
|
-
itemId: s,
|
|
1207
|
-
keepExistingSelection: !0
|
|
1208
|
-
})) : A(e.value, s) || (t.setItemSelection({
|
|
1209
|
-
event: n,
|
|
1210
|
-
itemId: s
|
|
1211
|
-
}), n.preventDefault()));
|
|
1212
|
-
break;
|
|
1213
|
-
}
|
|
1214
|
-
// Focus the next focusable item
|
|
1215
|
-
case b === "ArrowDown": {
|
|
1216
|
-
const p = z(e.value, s);
|
|
1217
|
-
p && (n.preventDefault(), t.focusItem(n, p), E && n.shiftKey && r(p) && t.selectItemFromArrowNavigation(n, s, p));
|
|
1218
|
-
break;
|
|
1219
|
-
}
|
|
1220
|
-
// Focuses the previous focusable item
|
|
1221
|
-
case b === "ArrowUp": {
|
|
1222
|
-
const p = ze(e.value, s);
|
|
1223
|
-
p && (n.preventDefault(), t.focusItem(n, p), E && n.shiftKey && r(p) && t.selectItemFromArrowNavigation(n, s, p));
|
|
1224
|
-
break;
|
|
1225
|
-
}
|
|
1226
|
-
// If the focused item is expanded, we move the focus to its first child
|
|
1227
|
-
// If the focused item is collapsed and has children, we expand it
|
|
1228
|
-
case (b === "ArrowRight" && !i || b === "ArrowLeft" && i): {
|
|
1229
|
-
if (I)
|
|
1230
|
-
return;
|
|
1231
|
-
if (N(e.value, s)) {
|
|
1232
|
-
const p = z(e.value, s);
|
|
1233
|
-
p && (t.focusItem(n, p), n.preventDefault());
|
|
1234
|
-
} else m(s) && (t.setItemExpansion({
|
|
1235
|
-
event: n,
|
|
1236
|
-
itemId: s
|
|
1237
|
-
}), n.preventDefault());
|
|
1238
|
-
break;
|
|
1239
|
-
}
|
|
1240
|
-
// If the focused item is expanded, we collapse it
|
|
1241
|
-
// If the focused item is collapsed and has a parent, we move the focus to this parent
|
|
1242
|
-
case (b === "ArrowLeft" && !i || b === "ArrowRight" && i): {
|
|
1243
|
-
if (I)
|
|
1244
|
-
return;
|
|
1245
|
-
if (m(s) && N(e.value, s))
|
|
1246
|
-
t.setItemExpansion({
|
|
1247
|
-
event: n,
|
|
1248
|
-
itemId: s
|
|
1249
|
-
}), n.preventDefault();
|
|
1250
|
-
else {
|
|
1251
|
-
const p = _(e.value, s);
|
|
1252
|
-
p && (t.focusItem(n, p), n.preventDefault());
|
|
1253
|
-
}
|
|
1254
|
-
break;
|
|
1255
|
-
}
|
|
1256
|
-
// Focuses the first item in the tree
|
|
1257
|
-
case b === "Home": {
|
|
1258
|
-
r(s) && E && I && n.shiftKey ? t.selectRangeFromStartToItem(n, s) : t.focusItem(n, W(e.value)), n.preventDefault();
|
|
1259
|
-
break;
|
|
1260
|
-
}
|
|
1261
|
-
// Focuses the last item in the tree
|
|
1262
|
-
case b === "End": {
|
|
1263
|
-
r(s) && E && I && n.shiftKey ? t.selectRangeFromItemToEnd(n, s) : t.focusItem(n, pe(e.value)), n.preventDefault();
|
|
1264
|
-
break;
|
|
1265
|
-
}
|
|
1266
|
-
// Expand all siblings that are at the same level as the focused item
|
|
1267
|
-
case b === "*": {
|
|
1268
|
-
t.expandAllSiblings(n, s), n.preventDefault();
|
|
1269
|
-
break;
|
|
1270
|
-
}
|
|
1271
|
-
// Multi select behavior when pressing Ctrl + a
|
|
1272
|
-
// Selects all the items
|
|
1273
|
-
case (String.fromCharCode(n.keyCode) === "A" && I && E && X(e.value)): {
|
|
1274
|
-
t.selectAllNavigableItems(n), n.preventDefault();
|
|
1275
|
-
break;
|
|
1276
|
-
}
|
|
1277
|
-
// Type-ahead
|
|
1278
|
-
// TODO: Support typing multiple characters
|
|
1279
|
-
case (!I && !n.shiftKey && $t(b)): {
|
|
1280
|
-
const p = d(s, b);
|
|
1281
|
-
p != null && (t.focusItem(n, p), n.preventDefault());
|
|
1282
|
-
break;
|
|
1283
|
-
}
|
|
1284
|
-
}
|
|
1285
|
-
}
|
|
1286
|
-
}
|
|
1287
|
-
};
|
|
1288
|
-
};
|
|
1289
|
-
ke.params = {};
|
|
1290
|
-
const Ut = [F, q, j, te, ke, Ie], qt = ["ownerState"], ne = /* @__PURE__ */ x.createContext(null);
|
|
1291
|
-
process.env.NODE_ENV !== "production" && (ne.displayName = "RichTreeViewItemsContext");
|
|
1292
|
-
const Ce = /* @__PURE__ */ x.memo(function({
|
|
1293
|
-
itemSlot: e,
|
|
1294
|
-
itemSlotProps: o,
|
|
1295
|
-
itemId: i
|
|
1296
|
-
}) {
|
|
1297
|
-
const l = x.useContext(ne), {
|
|
1298
|
-
store: h
|
|
1299
|
-
} = Z(), a = M(h, V, i), d = M(h, R, i), r = e ?? Je, m = he({
|
|
1300
|
-
elementType: r,
|
|
1301
|
-
externalSlotProps: o,
|
|
1302
|
-
additionalProps: {
|
|
1303
|
-
label: a == null ? void 0 : a.label,
|
|
1304
|
-
id: a == null ? void 0 : a.idAttribute,
|
|
1305
|
-
itemId: i
|
|
1306
|
-
},
|
|
1307
|
-
ownerState: {
|
|
1308
|
-
itemId: i,
|
|
1309
|
-
label: a == null ? void 0 : a.label
|
|
1310
|
-
}
|
|
1311
|
-
}), c = H(m, qt);
|
|
1312
|
-
return /* @__PURE__ */ P(r, T({}, c, {
|
|
1313
|
-
children: d == null ? void 0 : d.map(l)
|
|
1314
|
-
}));
|
|
1315
|
-
}, we);
|
|
1316
|
-
process.env.NODE_ENV !== "production" && (Ce.displayName = "WrappedTreeItem");
|
|
1317
|
-
function Kt(t) {
|
|
1318
|
-
const {
|
|
1319
|
-
slots: e,
|
|
1320
|
-
slotProps: o
|
|
1321
|
-
} = t, {
|
|
1322
|
-
store: i
|
|
1323
|
-
} = Z(), l = e == null ? void 0 : e.item, h = o == null ? void 0 : o.item, a = M(i, R, null), d = x.useCallback((r) => /* @__PURE__ */ P(Ce, {
|
|
1324
|
-
itemSlot: l,
|
|
1325
|
-
itemSlotProps: h,
|
|
1326
|
-
itemId: r
|
|
1327
|
-
}, r), [l, h]);
|
|
1328
|
-
return /* @__PURE__ */ P(ne.Provider, {
|
|
1329
|
-
value: d,
|
|
1330
|
-
children: a.map(d)
|
|
1331
|
-
});
|
|
1332
|
-
}
|
|
1333
|
-
const Bt = ["slots", "slotProps"], zt = Qe(), Gt = (t) => {
|
|
1334
|
-
const {
|
|
1335
|
-
classes: e
|
|
1336
|
-
} = t;
|
|
1337
|
-
return x.useMemo(() => at({
|
|
1338
|
-
root: ["root"],
|
|
1339
|
-
item: ["item"],
|
|
1340
|
-
itemContent: ["itemContent"],
|
|
1341
|
-
itemGroupTransition: ["itemGroupTransition"],
|
|
1342
|
-
itemIconContainer: ["itemIconContainer"],
|
|
1343
|
-
itemLabel: ["itemLabel"],
|
|
1344
|
-
itemLabelInput: ["itemLabelInput"],
|
|
1345
|
-
itemCheckbox: ["itemCheckbox"]
|
|
1346
|
-
// itemDragAndDropOverlay: ['itemDragAndDropOverlay'], => feature not available on this component
|
|
1347
|
-
// itemErrorIcon: ['itemErrorIcon'], => feature not available on this component
|
|
1348
|
-
}, mt, e), [e]);
|
|
1349
|
-
}, Wt = ut("ul", {
|
|
1350
|
-
name: "MuiRichTreeView",
|
|
1351
|
-
slot: "Root"
|
|
1352
|
-
})({
|
|
1353
|
-
padding: 0,
|
|
1354
|
-
margin: 0,
|
|
1355
|
-
listStyle: "none",
|
|
1356
|
-
outline: 0,
|
|
1357
|
-
position: "relative"
|
|
1358
|
-
}), oe = /* @__PURE__ */ x.forwardRef(function(e, o) {
|
|
1359
|
-
const i = zt({
|
|
1360
|
-
props: e,
|
|
1361
|
-
name: "MuiRichTreeView"
|
|
1362
|
-
}), {
|
|
1363
|
-
slots: l,
|
|
1364
|
-
slotProps: h
|
|
1365
|
-
} = i, a = H(i, Bt);
|
|
1366
|
-
process.env.NODE_ENV !== "production" && i.children != null && Q(["MUI X: The Rich Tree View component does not support JSX children.", "If you want to add items, you need to use the `items` prop.", "Check the documentation for more details: https://mui.com/x/react-tree-view/rich-tree-view/items/."]);
|
|
1367
|
-
const {
|
|
1368
|
-
getRootProps: d,
|
|
1369
|
-
contextValue: r
|
|
1370
|
-
} = kt({
|
|
1371
|
-
plugins: Ut,
|
|
1372
|
-
rootRef: o,
|
|
1373
|
-
props: a
|
|
1374
|
-
}), m = M(r.store, Ye), c = M(r.store, Ze), n = Gt(i), s = (l == null ? void 0 : l.root) ?? Wt, I = he({
|
|
1375
|
-
elementType: s,
|
|
1376
|
-
externalSlotProps: h == null ? void 0 : h.root,
|
|
1377
|
-
className: n.root,
|
|
1378
|
-
getSlotProps: d,
|
|
1379
|
-
ownerState: i
|
|
1380
|
-
});
|
|
1381
|
-
return m ? /* @__PURE__ */ P(dt, {
|
|
1382
|
-
children: "Loading..."
|
|
1383
|
-
}) : c ? /* @__PURE__ */ P(ft, {
|
|
1384
|
-
severity: "error",
|
|
1385
|
-
children: c.message
|
|
1386
|
-
}) : /* @__PURE__ */ P(Ct, {
|
|
1387
|
-
contextValue: r,
|
|
1388
|
-
classes: n,
|
|
1389
|
-
slots: l,
|
|
1390
|
-
slotProps: h,
|
|
1391
|
-
children: /* @__PURE__ */ P(s, T({}, I, {
|
|
1392
|
-
children: /* @__PURE__ */ P(Kt, {
|
|
1393
|
-
slots: l,
|
|
1394
|
-
slotProps: h
|
|
1395
|
-
})
|
|
1396
|
-
}))
|
|
1397
|
-
});
|
|
1398
|
-
});
|
|
1399
|
-
process.env.NODE_ENV !== "production" && (oe.displayName = "RichTreeView");
|
|
1400
|
-
process.env.NODE_ENV !== "production" && (oe.propTypes = {
|
|
1401
|
-
// ----------------------------- Warning --------------------------------
|
|
1402
|
-
// | These PropTypes are generated from the TypeScript type definitions |
|
|
1403
|
-
// | To update them edit the TypeScript types and run "pnpm proptypes" |
|
|
1404
|
-
// ----------------------------------------------------------------------
|
|
1405
|
-
/**
|
|
1406
|
-
* The ref object that allows Tree View manipulation. Can be instantiated with `useTreeViewApiRef()`.
|
|
1407
|
-
*/
|
|
1408
|
-
apiRef: g.shape({
|
|
1409
|
-
current: g.shape({
|
|
1410
|
-
focusItem: g.func.isRequired,
|
|
1411
|
-
getItem: g.func.isRequired,
|
|
1412
|
-
getItemDOMElement: g.func.isRequired,
|
|
1413
|
-
getItemOrderedChildrenIds: g.func.isRequired,
|
|
1414
|
-
getItemTree: g.func.isRequired,
|
|
1415
|
-
getParentId: g.func.isRequired,
|
|
1416
|
-
setEditedItem: g.func.isRequired,
|
|
1417
|
-
setIsItemDisabled: g.func.isRequired,
|
|
1418
|
-
setItemExpansion: g.func.isRequired,
|
|
1419
|
-
setItemSelection: g.func.isRequired,
|
|
1420
|
-
updateItemLabel: g.func.isRequired
|
|
1421
|
-
})
|
|
1422
|
-
}),
|
|
1423
|
-
/**
|
|
1424
|
-
* If `true`, the Tree View renders a checkbox at the left of its label that allows selecting it.
|
|
1425
|
-
* @default false
|
|
1426
|
-
*/
|
|
1427
|
-
checkboxSelection: g.bool,
|
|
1428
|
-
/**
|
|
1429
|
-
* Override or extend the styles applied to the component.
|
|
1430
|
-
*/
|
|
1431
|
-
classes: g.object,
|
|
1432
|
-
className: g.string,
|
|
1433
|
-
/**
|
|
1434
|
-
* Expanded item ids.
|
|
1435
|
-
* Used when the item's expansion is not controlled.
|
|
1436
|
-
* @default []
|
|
1437
|
-
*/
|
|
1438
|
-
defaultExpandedItems: g.arrayOf(g.string),
|
|
1439
|
-
/**
|
|
1440
|
-
* Selected item ids. (Uncontrolled)
|
|
1441
|
-
* When `multiSelect` is true this takes an array of strings; when false (default) a string.
|
|
1442
|
-
* @default []
|
|
1443
|
-
*/
|
|
1444
|
-
defaultSelectedItems: g.any,
|
|
1445
|
-
/**
|
|
1446
|
-
* If `true`, will allow focus on disabled items.
|
|
1447
|
-
* @default false
|
|
1448
|
-
*/
|
|
1449
|
-
disabledItemsFocusable: g.bool,
|
|
1450
|
-
/**
|
|
1451
|
-
* If `true` selection is disabled.
|
|
1452
|
-
* @default false
|
|
1453
|
-
*/
|
|
1454
|
-
disableSelection: g.bool,
|
|
1455
|
-
/**
|
|
1456
|
-
* Expanded item ids.
|
|
1457
|
-
* Used when the item's expansion is controlled.
|
|
1458
|
-
*/
|
|
1459
|
-
expandedItems: g.arrayOf(g.string),
|
|
1460
|
-
/**
|
|
1461
|
-
* The slot that triggers the item's expansion when clicked.
|
|
1462
|
-
* @default 'content'
|
|
1463
|
-
*/
|
|
1464
|
-
expansionTrigger: g.oneOf(["content", "iconContainer"]),
|
|
1465
|
-
/**
|
|
1466
|
-
* Used to determine the children of a given item.
|
|
1467
|
-
*
|
|
1468
|
-
* @template R
|
|
1469
|
-
* @param {R} item The item to check.
|
|
1470
|
-
* @returns {R[]} The children of the item.
|
|
1471
|
-
* @default (item) => item.children
|
|
1472
|
-
*/
|
|
1473
|
-
getItemChildren: g.func,
|
|
1474
|
-
/**
|
|
1475
|
-
* Used to determine the id of a given item.
|
|
1476
|
-
*
|
|
1477
|
-
* @template R
|
|
1478
|
-
* @param {R} item The item to check.
|
|
1479
|
-
* @returns {string} The id of the item.
|
|
1480
|
-
* @default (item) => item.id
|
|
1481
|
-
*/
|
|
1482
|
-
getItemId: g.func,
|
|
1483
|
-
/**
|
|
1484
|
-
* Used to determine the string label for a given item.
|
|
1485
|
-
*
|
|
1486
|
-
* @template R
|
|
1487
|
-
* @param {R} item The item to check.
|
|
1488
|
-
* @returns {string} The label of the item.
|
|
1489
|
-
* @default (item) => item.label
|
|
1490
|
-
*/
|
|
1491
|
-
getItemLabel: g.func,
|
|
1492
|
-
/**
|
|
1493
|
-
* This prop is used to help implement the accessibility logic.
|
|
1494
|
-
* If you don't provide this prop. It falls back to a randomly generated id.
|
|
1495
|
-
*/
|
|
1496
|
-
id: g.string,
|
|
1497
|
-
/**
|
|
1498
|
-
* Used to determine if a given item should be disabled.
|
|
1499
|
-
* @template R
|
|
1500
|
-
* @param {R} item The item to check.
|
|
1501
|
-
* @returns {boolean} `true` if the item should be disabled.
|
|
1502
|
-
*/
|
|
1503
|
-
isItemDisabled: g.func,
|
|
1504
|
-
/**
|
|
1505
|
-
* Determine if a given item can be edited.
|
|
1506
|
-
* @template R
|
|
1507
|
-
* @param {R} item The item to check.
|
|
1508
|
-
* @returns {boolean} `true` if the item can be edited.
|
|
1509
|
-
* @default () => false
|
|
1510
|
-
*/
|
|
1511
|
-
isItemEditable: g.oneOfType([g.func, g.bool]),
|
|
1512
|
-
/**
|
|
1513
|
-
* Horizontal indentation between an item and its children.
|
|
1514
|
-
* Examples: 24, "24px", "2rem", "2em".
|
|
1515
|
-
* @default 12px
|
|
1516
|
-
*/
|
|
1517
|
-
itemChildrenIndentation: g.oneOfType([g.number, g.string]),
|
|
1518
|
-
items: g.array.isRequired,
|
|
1519
|
-
/**
|
|
1520
|
-
* If `true`, `ctrl` and `shift` will trigger multiselect.
|
|
1521
|
-
* @default false
|
|
1522
|
-
*/
|
|
1523
|
-
multiSelect: g.bool,
|
|
1524
|
-
/**
|
|
1525
|
-
* Callback fired when Tree Items are expanded/collapsed.
|
|
1526
|
-
* @param {React.SyntheticEvent} event The DOM event that triggered the change. Can be null when the change is caused by the `publicAPI.setItemExpansion()` method.
|
|
1527
|
-
* @param {array} itemIds The ids of the expanded items.
|
|
1528
|
-
*/
|
|
1529
|
-
onExpandedItemsChange: g.func,
|
|
1530
|
-
/**
|
|
1531
|
-
* Callback fired when the `content` slot of a given Tree Item is clicked.
|
|
1532
|
-
* @param {React.MouseEvent} event The DOM event that triggered the change.
|
|
1533
|
-
* @param {string} itemId The id of the focused item.
|
|
1534
|
-
*/
|
|
1535
|
-
onItemClick: g.func,
|
|
1536
|
-
/**
|
|
1537
|
-
* Callback fired when a Tree Item is expanded or collapsed.
|
|
1538
|
-
* @param {React.SyntheticEvent | null} event The DOM event that triggered the change. Can be null when the change is caused by the `publicAPI.setItemExpansion()` method.
|
|
1539
|
-
* @param {array} itemId The itemId of the modified item.
|
|
1540
|
-
* @param {array} isExpanded `true` if the item has just been expanded, `false` if it has just been collapsed.
|
|
1541
|
-
*/
|
|
1542
|
-
onItemExpansionToggle: g.func,
|
|
1543
|
-
/**
|
|
1544
|
-
* Callback fired when a given Tree Item is focused.
|
|
1545
|
-
* @param {React.SyntheticEvent | null} event The DOM event that triggered the change. **Warning**: This is a generic event not a focus event.
|
|
1546
|
-
* @param {string} itemId The id of the focused item.
|
|
1547
|
-
*/
|
|
1548
|
-
onItemFocus: g.func,
|
|
1549
|
-
/**
|
|
1550
|
-
* Callback fired when the label of an item changes.
|
|
1551
|
-
* @param {TreeViewItemId} itemId The id of the item that was edited.
|
|
1552
|
-
* @param {string} newLabel The new label of the items.
|
|
1553
|
-
*/
|
|
1554
|
-
onItemLabelChange: g.func,
|
|
1555
|
-
/**
|
|
1556
|
-
* Callback fired when a Tree Item is selected or deselected.
|
|
1557
|
-
* @param {React.SyntheticEvent} event The DOM event that triggered the change. Can be null when the change is caused by the `publicAPI.setItemSelection()` method.
|
|
1558
|
-
* @param {array} itemId The itemId of the modified item.
|
|
1559
|
-
* @param {array} isSelected `true` if the item has just been selected, `false` if it has just been deselected.
|
|
1560
|
-
*/
|
|
1561
|
-
onItemSelectionToggle: g.func,
|
|
1562
|
-
/**
|
|
1563
|
-
* Callback fired when Tree Items are selected/deselected.
|
|
1564
|
-
* @param {React.SyntheticEvent} event The DOM event that triggered the change. Can be null when the change is caused by the `publicAPI.setItemSelection()` method.
|
|
1565
|
-
* @param {string[] | string} itemIds The ids of the selected items.
|
|
1566
|
-
* When `multiSelect` is `true`, this is an array of strings; when false (default) a string.
|
|
1567
|
-
*/
|
|
1568
|
-
onSelectedItemsChange: g.func,
|
|
1569
|
-
/**
|
|
1570
|
-
* Selected item ids. (Controlled)
|
|
1571
|
-
* When `multiSelect` is true this takes an array of strings; when false (default) a string.
|
|
1572
|
-
*/
|
|
1573
|
-
selectedItems: g.any,
|
|
1574
|
-
/**
|
|
1575
|
-
* When `selectionPropagation.descendants` is set to `true`.
|
|
1576
|
-
*
|
|
1577
|
-
* - Selecting a parent selects all its descendants automatically.
|
|
1578
|
-
* - Deselecting a parent deselects all its descendants automatically.
|
|
1579
|
-
*
|
|
1580
|
-
* When `selectionPropagation.parents` is set to `true`.
|
|
1581
|
-
*
|
|
1582
|
-
* - Selecting all the descendants of a parent selects the parent automatically.
|
|
1583
|
-
* - Deselecting a descendant of a selected parent deselects the parent automatically.
|
|
1584
|
-
*
|
|
1585
|
-
* Only works when `multiSelect` is `true`.
|
|
1586
|
-
* On the <SimpleTreeView />, only the expanded items are considered (since the collapsed item are not passed to the Tree View component at all)
|
|
1587
|
-
*
|
|
1588
|
-
* @default { parents: false, descendants: false }
|
|
1589
|
-
*/
|
|
1590
|
-
selectionPropagation: g.shape({
|
|
1591
|
-
descendants: g.bool,
|
|
1592
|
-
parents: g.bool
|
|
1593
|
-
}),
|
|
1594
|
-
/**
|
|
1595
|
-
* The props used for each component slot.
|
|
1596
|
-
* @default {}
|
|
1597
|
-
*/
|
|
1598
|
-
slotProps: g.object,
|
|
1599
|
-
/**
|
|
1600
|
-
* Overridable component slots.
|
|
1601
|
-
* @default {}
|
|
1602
|
-
*/
|
|
1603
|
-
slots: g.object,
|
|
1604
|
-
/**
|
|
1605
|
-
* The system prop that allows defining system overrides as well as additional CSS styles.
|
|
1606
|
-
*/
|
|
1607
|
-
sx: g.oneOfType([g.arrayOf(g.oneOfType([g.func, g.object, g.bool])), g.func, g.object])
|
|
1608
|
-
});
|
|
1609
|
-
const mn = ({
|
|
1610
|
-
items: t,
|
|
1611
|
-
selectedItemId: e,
|
|
1612
|
-
handleSelectedItemChange: o,
|
|
1613
|
-
iconColor: i = "primary",
|
|
1614
|
-
hasNoIcons: l = !1,
|
|
1615
|
-
maxHeight: h = 300,
|
|
1616
|
-
defaultExpandedItems: a = []
|
|
1617
|
-
}) => {
|
|
1618
|
-
const [d, r] = Re(a), m = Se(() => nt(t), [t]);
|
|
1619
|
-
return Le(() => {
|
|
1620
|
-
if (e) {
|
|
1621
|
-
const n = ot(t, e);
|
|
1622
|
-
if (n) {
|
|
1623
|
-
const s = n.slice(0, -1);
|
|
1624
|
-
r((I) => {
|
|
1625
|
-
const b = s.filter(
|
|
1626
|
-
(E) => !I.includes(E)
|
|
1627
|
-
);
|
|
1628
|
-
return b.length > 0 ? [...I, ...b] : I;
|
|
1629
|
-
});
|
|
1630
|
-
}
|
|
1631
|
-
}
|
|
1632
|
-
}, [e, t]), /* @__PURE__ */ P(et, { maxHeight: h, "data-treeview-root": "true", children: /* @__PURE__ */ P(
|
|
1633
|
-
oe,
|
|
1634
|
-
{
|
|
1635
|
-
items: t,
|
|
1636
|
-
selectedItems: e,
|
|
1637
|
-
expandedItems: d,
|
|
1638
|
-
onExpandedItemsChange: (n, s) => {
|
|
1639
|
-
r(s);
|
|
1640
|
-
},
|
|
1641
|
-
itemChildrenIndentation: tt,
|
|
1642
|
-
onSelectedItemsChange: o,
|
|
1643
|
-
getItemId: st,
|
|
1644
|
-
slots: {
|
|
1645
|
-
item: (n) => {
|
|
1646
|
-
const s = n.itemId ? m[n.itemId] : void 0;
|
|
1647
|
-
return /* @__PURE__ */ P(
|
|
1648
|
-
He,
|
|
1649
|
-
{
|
|
1650
|
-
...n,
|
|
1651
|
-
itemData: s,
|
|
1652
|
-
iconColor: i,
|
|
1653
|
-
hasNoIcons: l
|
|
1654
|
-
}
|
|
1655
|
-
);
|
|
1656
|
-
}
|
|
1657
|
-
}
|
|
1658
|
-
}
|
|
1659
|
-
) });
|
|
1660
|
-
};
|
|
1661
|
-
export {
|
|
1662
|
-
mn as default
|
|
1663
|
-
};
|