naive-ui 2.18.1 → 2.19.2
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/es/_internal/clear/src/Clear.d.ts +1 -4
- package/es/_internal/clear/src/Clear.js +1 -4
- package/es/_internal/icons/Checkmark.js +3 -2
- package/es/_internal/select-menu/src/SelectMenu.d.ts +173 -0
- package/es/_internal/select-menu/src/SelectMenu.js +9 -6
- package/es/_internal/select-menu/src/SelectOption.js +2 -1
- package/es/_internal/select-menu/src/styles/index.cssr.js +32 -28
- package/es/_internal/select-menu/styles/light.d.ts +2 -0
- package/es/_internal/select-menu/styles/light.js +1 -1
- package/es/_internal/selection/src/Selection.d.ts +64 -56
- package/es/_internal/selection/src/Selection.js +34 -14
- package/es/_internal/selection/src/styles/index.cssr.js +16 -14
- package/es/_internal/selection/styles/_common.d.ts +1 -8
- package/es/_internal/selection/styles/_common.js +2 -9
- package/es/_internal/selection/styles/dark.js +10 -2
- package/es/_internal/selection/styles/light.d.ts +18 -16
- package/es/_internal/selection/styles/light.js +10 -2
- package/es/_mixins/use-rtl.js +1 -1
- package/es/_styles/common/light.js +1 -1
- package/es/_utils/naive/mutable.d.ts +2 -2
- package/es/alert/src/Alert.js +15 -16
- package/es/anchor/src/AnchorAdapter.d.ts +13 -8
- package/es/anchor/src/AnchorAdapter.js +3 -5
- package/es/anchor/src/BaseAnchor.d.ts +14 -1
- package/es/anchor/src/BaseAnchor.js +20 -7
- package/es/anchor/src/Link.js +5 -5
- package/es/anchor/src/styles/index.cssr.js +25 -16
- package/es/auto-complete/index.d.ts +1 -0
- package/es/auto-complete/src/AutoComplete.d.ts +10 -0
- package/es/auto-complete/src/interface.d.ts +1 -1
- package/es/auto-complete/styles/light.d.ts +1 -0
- package/es/badge/src/styles/index.cssr.js +1 -0
- package/es/card/src/Card.d.ts +17 -1
- package/es/card/src/Card.js +3 -2
- package/es/card/styles/dark.js +6 -1
- package/es/card/styles/light.d.ts +1 -0
- package/es/card/styles/light.js +2 -2
- package/es/cascader/src/Cascader.d.ts +100 -80
- package/es/cascader/src/Cascader.js +28 -19
- package/es/cascader/src/CascaderMenu.js +17 -15
- package/es/cascader/src/CascaderOption.d.ts +10 -8
- package/es/cascader/src/CascaderSelectMenu.d.ts +10 -8
- package/es/cascader/src/CascaderSubmenu.d.ts +10 -8
- package/es/cascader/src/interface.d.ts +2 -2
- package/es/cascader/src/styles/index.cssr.js +6 -1
- package/es/cascader/styles/light.d.ts +10 -8
- package/es/checkbox/src/Checkbox.d.ts +1 -0
- package/es/checkbox/src/Checkbox.js +5 -3
- package/es/checkbox/src/CheckboxGroup.js +1 -1
- package/es/composables/use-theme-vars.js +5 -5
- package/es/config-provider/src/internal-interface.d.ts +2 -0
- package/es/data-table/src/DataTable.d.ts +110 -88
- package/es/data-table/src/HeaderButton/FilterButton.d.ts +20 -16
- package/es/data-table/src/HeaderButton/FilterMenu.d.ts +20 -16
- package/es/data-table/src/TableParts/Body.d.ts +20 -16
- package/es/data-table/src/TableParts/Cell.d.ts +40 -32
- package/es/data-table/src/TableParts/Header.d.ts +20 -16
- package/es/data-table/styles/light.d.ts +10 -8
- package/es/date-picker/src/DatePicker.d.ts +8 -3
- package/es/date-picker/src/DatePicker.js +2 -2
- package/es/date-picker/src/panel/date.d.ts +3 -3
- package/es/date-picker/src/panel/date.js +10 -1
- package/es/date-picker/src/panel/daterange.js +10 -1
- package/es/date-picker/src/panel/datetimerange.js +10 -1
- package/es/descriptions/src/Descriptions.d.ts +4 -17
- package/es/descriptions/src/Descriptions.js +2 -8
- package/es/dialog/src/DialogProvider.d.ts +20 -20
- package/es/drawer/src/styles/index.cssr.js +2 -0
- package/es/dropdown/src/Dropdown.d.ts +9 -23
- package/es/dynamic-tags/src/DynamicTags.js +2 -1
- package/es/empty/src/Empty.d.ts +6 -1
- package/es/empty/src/Empty.js +16 -4
- package/es/form/src/FormItemGridItem.d.ts +1 -1
- package/es/form/src/FormItemGridItem.js +2 -2
- package/es/global-style/src/GlobalStyle.js +13 -3
- package/es/grid/src/GridItem.d.ts +2 -2
- package/es/grid/src/GridItem.js +1 -1
- package/es/input-number/src/InputNumber.d.ts +8 -3
- package/es/input-number/src/InputNumber.js +4 -4
- package/es/jest-setup.js +3 -1
- package/es/layout/src/Layout.d.ts +18 -4
- package/es/layout/src/LayoutContent.d.ts +9 -2
- package/es/layout/src/LayoutFooter.d.ts +9 -0
- package/es/layout/src/LayoutHeader.d.ts +6 -0
- package/es/layout/src/LayoutSider.d.ts +11 -0
- package/es/layout/src/LayoutSider.js +4 -2
- package/es/layout/src/ToggleButton.js +7 -3
- package/es/layout/src/styles/layout-sider.cssr.js +31 -15
- package/es/layout/styles/dark.js +3 -2
- package/es/layout/styles/light.d.ts +2 -0
- package/es/layout/styles/light.js +3 -2
- package/es/locales/common/enUS.js +1 -1
- package/es/locales/common/ruRU.js +1 -1
- package/es/locales/common/ukUA.d.ts +3 -0
- package/es/locales/common/ukUA.js +92 -0
- package/es/locales/common/zhCN.js +1 -1
- package/es/locales/date/ukUA.d.ts +3 -0
- package/es/locales/date/ukUA.js +6 -0
- package/es/locales/index.d.ts +2 -0
- package/es/locales/index.js +2 -0
- package/es/mention/src/Mention.d.ts +10 -0
- package/es/mention/styles/light.d.ts +1 -0
- package/es/menu/src/Menu.d.ts +6 -1
- package/es/menu/src/Menu.js +10 -1
- package/es/menu/src/MenuOption.d.ts +3 -1
- package/es/menu/src/MenuOptionContent.d.ts +3 -1
- package/es/menu/src/Submenu.d.ts +3 -1
- package/es/modal/src/BodyWrapper.d.ts +5 -0
- package/es/modal/src/Modal.d.ts +36 -55
- package/es/modal/src/Modal.js +18 -39
- package/es/modal/src/presetProps.d.ts +2 -1
- package/es/modal/styles/light.d.ts +1 -0
- package/es/notification/src/Notification.d.ts +1 -1
- package/es/notification/src/NotificationEnvironment.d.ts +1 -1
- package/es/notification/src/NotificationProvider.d.ts +16 -16
- package/es/page-header/src/PageHeader.d.ts +1 -0
- package/es/page-header/src/PageHeader.js +8 -2
- package/es/page-header/src/styles/rtl.cssr.d.ts +2 -0
- package/es/page-header/src/styles/rtl.cssr.js +19 -0
- package/es/page-header/styles/index.d.ts +1 -0
- package/es/page-header/styles/index.js +1 -0
- package/es/page-header/styles/rtl.d.ts +5 -0
- package/es/page-header/styles/rtl.js +5 -0
- package/es/pagination/src/Pagination.d.ts +111 -100
- package/es/pagination/styles/light.d.ts +10 -8
- package/es/popconfirm/src/Popconfirm.d.ts +8 -22
- package/es/popover/src/Popover.d.ts +12 -32
- package/es/popover/src/Popover.js +25 -18
- package/es/popover/src/PopoverBody.d.ts +2 -2
- package/es/popover/src/PopoverBody.js +4 -2
- package/es/popselect/src/Popselect.d.ts +18 -22
- package/es/popselect/src/PopselectPanel.d.ts +1 -0
- package/es/popselect/src/PopselectPanel.js +38 -19
- package/es/popselect/styles/light.d.ts +1 -0
- package/es/select/src/Select.d.ts +111 -83
- package/es/select/src/Select.js +55 -56
- package/es/select/src/interface.d.ts +2 -2
- package/es/select/styles/light.d.ts +10 -8
- package/es/spin/src/Spin.d.ts +34 -25
- package/es/spin/src/Spin.js +27 -20
- package/es/spin/src/styles/index.cssr.js +23 -9
- package/es/spin/styles/light.d.ts +2 -0
- package/es/spin/styles/light.js +3 -1
- package/es/styles.d.ts +1 -0
- package/es/styles.js +1 -0
- package/es/tabs/src/Tab.d.ts +1 -1
- package/es/tabs/src/Tab.js +4 -6
- package/es/tabs/src/Tabs.d.ts +133 -42
- package/es/tabs/src/Tabs.js +37 -38
- package/es/tabs/src/interface.d.ts +2 -1
- package/es/tabs/src/styles/index.cssr.js +34 -10
- package/es/tabs/styles/_common.d.ts +6 -0
- package/es/tabs/styles/_common.js +6 -0
- package/es/tabs/styles/dark.js +7 -1
- package/es/tabs/styles/light.d.ts +13 -0
- package/es/tabs/styles/light.js +3 -3
- package/es/tag/src/styles/index.cssr.js +1 -1
- package/es/time/src/Time.d.ts +14 -22
- package/es/time/src/Time.js +32 -18
- package/es/time-picker/src/TimePicker.d.ts +5 -0
- package/es/time-picker/src/TimePicker.js +2 -2
- package/es/tooltip/src/Tooltip.d.ts +8 -22
- package/es/transfer/src/TransferList.d.ts +1 -1
- package/es/tree/src/Tree.d.ts +25 -10
- package/es/tree/src/Tree.js +34 -11
- package/es/tree/src/TreeNode.js +5 -2
- package/es/tree/src/interface.d.ts +2 -2
- package/es/tree-select/src/TreeSelect.d.ts +103 -81
- package/es/tree-select/src/TreeSelect.js +36 -40
- package/es/tree-select/src/interface.d.ts +2 -2
- package/es/tree-select/styles/light.d.ts +9 -8
- package/es/typography/src/blockquote.d.ts +2 -8
- package/es/typography/src/blockquote.js +1 -4
- package/es/typography/src/ol.d.ts +2 -8
- package/es/typography/src/ol.js +1 -4
- package/es/typography/src/p.d.ts +2 -2
- package/es/typography/src/p.js +1 -1
- package/es/typography/src/text.d.ts +14 -58
- package/es/typography/src/text.js +2 -23
- package/es/typography/src/ul.d.ts +2 -8
- package/es/typography/src/ul.js +1 -4
- package/es/upload/index.d.ts +2 -0
- package/es/upload/index.js +2 -0
- package/es/upload/src/Upload.d.ts +16 -68
- package/es/upload/src/Upload.js +71 -98
- package/es/upload/src/UploadDragger.js +7 -1
- package/es/upload/src/UploadFileList.d.ts +2 -0
- package/es/upload/src/UploadFileList.js +34 -0
- package/es/upload/src/UploadProgress.d.ts +0 -7
- package/es/upload/src/UploadProgress.js +1 -5
- package/es/upload/src/UploadTrigger.d.ts +12 -0
- package/es/upload/src/UploadTrigger.js +63 -0
- package/es/upload/src/interface.d.ts +13 -2
- package/es/upload/src/styles/index.cssr.js +40 -32
- package/es/version.d.ts +1 -1
- package/es/version.js +1 -1
- package/lib/_internal/clear/src/Clear.d.ts +1 -4
- package/lib/_internal/clear/src/Clear.js +1 -4
- package/lib/_internal/icons/Checkmark.js +3 -2
- package/lib/_internal/select-menu/src/SelectMenu.d.ts +173 -0
- package/lib/_internal/select-menu/src/SelectMenu.js +9 -6
- package/lib/_internal/select-menu/src/SelectOption.js +2 -1
- package/lib/_internal/select-menu/src/styles/index.cssr.js +32 -28
- package/lib/_internal/select-menu/styles/light.d.ts +2 -0
- package/lib/_internal/select-menu/styles/light.js +1 -1
- package/lib/_internal/selection/src/Selection.d.ts +64 -56
- package/lib/_internal/selection/src/Selection.js +34 -14
- package/lib/_internal/selection/src/styles/index.cssr.js +16 -14
- package/lib/_internal/selection/styles/_common.d.ts +1 -8
- package/lib/_internal/selection/styles/_common.js +2 -9
- package/lib/_internal/selection/styles/dark.js +10 -2
- package/lib/_internal/selection/styles/light.d.ts +18 -16
- package/lib/_internal/selection/styles/light.js +10 -2
- package/lib/_mixins/use-rtl.js +1 -1
- package/lib/_styles/common/light.js +1 -1
- package/lib/_utils/naive/mutable.d.ts +2 -2
- package/lib/alert/src/Alert.js +15 -16
- package/lib/anchor/src/AnchorAdapter.d.ts +13 -8
- package/lib/anchor/src/AnchorAdapter.js +3 -5
- package/lib/anchor/src/BaseAnchor.d.ts +14 -1
- package/lib/anchor/src/BaseAnchor.js +19 -6
- package/lib/anchor/src/Link.js +5 -5
- package/lib/anchor/src/styles/index.cssr.js +25 -16
- package/lib/auto-complete/index.d.ts +1 -0
- package/lib/auto-complete/src/AutoComplete.d.ts +10 -0
- package/lib/auto-complete/src/interface.d.ts +1 -1
- package/lib/auto-complete/styles/light.d.ts +1 -0
- package/lib/badge/src/styles/index.cssr.js +1 -0
- package/lib/card/src/Card.d.ts +17 -1
- package/lib/card/src/Card.js +3 -2
- package/lib/card/styles/dark.js +6 -1
- package/lib/card/styles/light.d.ts +1 -0
- package/lib/card/styles/light.js +2 -2
- package/lib/cascader/src/Cascader.d.ts +100 -80
- package/lib/cascader/src/Cascader.js +28 -19
- package/lib/cascader/src/CascaderMenu.js +16 -14
- package/lib/cascader/src/CascaderOption.d.ts +10 -8
- package/lib/cascader/src/CascaderSelectMenu.d.ts +10 -8
- package/lib/cascader/src/CascaderSubmenu.d.ts +10 -8
- package/lib/cascader/src/interface.d.ts +2 -2
- package/lib/cascader/src/styles/index.cssr.js +6 -1
- package/lib/cascader/styles/light.d.ts +10 -8
- package/lib/checkbox/src/Checkbox.d.ts +1 -0
- package/lib/checkbox/src/Checkbox.js +5 -3
- package/lib/checkbox/src/CheckboxGroup.js +1 -1
- package/lib/composables/use-theme-vars.js +5 -5
- package/lib/config-provider/src/internal-interface.d.ts +2 -0
- package/lib/data-table/src/DataTable.d.ts +110 -88
- package/lib/data-table/src/HeaderButton/FilterButton.d.ts +20 -16
- package/lib/data-table/src/HeaderButton/FilterMenu.d.ts +20 -16
- package/lib/data-table/src/TableParts/Body.d.ts +20 -16
- package/lib/data-table/src/TableParts/Cell.d.ts +40 -32
- package/lib/data-table/src/TableParts/Header.d.ts +20 -16
- package/lib/data-table/styles/light.d.ts +10 -8
- package/lib/date-picker/src/DatePicker.d.ts +8 -3
- package/lib/date-picker/src/DatePicker.js +2 -2
- package/lib/date-picker/src/panel/date.d.ts +3 -3
- package/lib/date-picker/src/panel/date.js +9 -0
- package/lib/date-picker/src/panel/daterange.js +9 -0
- package/lib/date-picker/src/panel/datetimerange.js +9 -0
- package/lib/descriptions/src/Descriptions.d.ts +4 -17
- package/lib/descriptions/src/Descriptions.js +2 -8
- package/lib/dialog/src/DialogProvider.d.ts +20 -20
- package/lib/drawer/src/styles/index.cssr.js +2 -0
- package/lib/dropdown/src/Dropdown.d.ts +9 -23
- package/lib/dynamic-tags/src/DynamicTags.js +2 -1
- package/lib/empty/src/Empty.d.ts +6 -1
- package/lib/empty/src/Empty.js +15 -3
- package/lib/form/src/FormItemGridItem.d.ts +1 -1
- package/lib/form/src/FormItemGridItem.js +2 -2
- package/lib/global-style/src/GlobalStyle.js +13 -3
- package/lib/grid/src/GridItem.d.ts +2 -2
- package/lib/grid/src/GridItem.js +1 -1
- package/lib/input-number/src/InputNumber.d.ts +8 -3
- package/lib/input-number/src/InputNumber.js +4 -4
- package/lib/jest-setup.js +3 -1
- package/lib/layout/src/Layout.d.ts +18 -4
- package/lib/layout/src/LayoutContent.d.ts +9 -2
- package/lib/layout/src/LayoutFooter.d.ts +9 -0
- package/lib/layout/src/LayoutHeader.d.ts +6 -0
- package/lib/layout/src/LayoutSider.d.ts +11 -0
- package/lib/layout/src/LayoutSider.js +4 -2
- package/lib/layout/src/ToggleButton.js +7 -3
- package/lib/layout/src/styles/layout-sider.cssr.js +31 -15
- package/lib/layout/styles/dark.js +3 -2
- package/lib/layout/styles/light.d.ts +2 -0
- package/lib/layout/styles/light.js +3 -2
- package/lib/locales/common/enUS.js +1 -1
- package/lib/locales/common/ruRU.js +1 -1
- package/lib/locales/common/ukUA.d.ts +3 -0
- package/lib/locales/common/ukUA.js +94 -0
- package/lib/locales/common/zhCN.js +1 -1
- package/lib/locales/date/ukUA.d.ts +3 -0
- package/lib/locales/date/ukUA.js +8 -0
- package/lib/locales/index.d.ts +2 -0
- package/lib/locales/index.js +5 -1
- package/lib/mention/src/Mention.d.ts +10 -0
- package/lib/mention/styles/light.d.ts +1 -0
- package/lib/menu/src/Menu.d.ts +6 -1
- package/lib/menu/src/Menu.js +10 -1
- package/lib/menu/src/MenuOption.d.ts +3 -1
- package/lib/menu/src/MenuOptionContent.d.ts +3 -1
- package/lib/menu/src/Submenu.d.ts +3 -1
- package/lib/modal/src/BodyWrapper.d.ts +5 -0
- package/lib/modal/src/Modal.d.ts +36 -55
- package/lib/modal/src/Modal.js +17 -38
- package/lib/modal/src/presetProps.d.ts +2 -1
- package/lib/modal/styles/light.d.ts +1 -0
- package/lib/notification/src/Notification.d.ts +1 -1
- package/lib/notification/src/NotificationEnvironment.d.ts +1 -1
- package/lib/notification/src/NotificationProvider.d.ts +16 -16
- package/lib/page-header/src/PageHeader.d.ts +1 -0
- package/lib/page-header/src/PageHeader.js +8 -2
- package/lib/page-header/src/styles/rtl.cssr.d.ts +2 -0
- package/lib/page-header/src/styles/rtl.cssr.js +26 -0
- package/lib/page-header/styles/index.d.ts +1 -0
- package/lib/page-header/styles/index.js +3 -1
- package/lib/page-header/styles/rtl.d.ts +5 -0
- package/lib/page-header/styles/rtl.js +7 -0
- package/lib/pagination/src/Pagination.d.ts +111 -100
- package/lib/pagination/styles/light.d.ts +10 -8
- package/lib/popconfirm/src/Popconfirm.d.ts +8 -22
- package/lib/popover/src/Popover.d.ts +12 -32
- package/lib/popover/src/Popover.js +23 -16
- package/lib/popover/src/PopoverBody.d.ts +2 -2
- package/lib/popover/src/PopoverBody.js +4 -2
- package/lib/popselect/src/Popselect.d.ts +18 -22
- package/lib/popselect/src/PopselectPanel.d.ts +1 -0
- package/lib/popselect/src/PopselectPanel.js +38 -19
- package/lib/popselect/styles/light.d.ts +1 -0
- package/lib/select/src/Select.d.ts +111 -83
- package/lib/select/src/Select.js +55 -56
- package/lib/select/src/interface.d.ts +2 -2
- package/lib/select/styles/light.d.ts +10 -8
- package/lib/spin/src/Spin.d.ts +34 -25
- package/lib/spin/src/Spin.js +25 -18
- package/lib/spin/src/styles/index.cssr.js +23 -9
- package/lib/spin/styles/light.d.ts +2 -0
- package/lib/spin/styles/light.js +3 -1
- package/lib/styles.d.ts +1 -0
- package/lib/styles.js +63 -61
- package/lib/tabs/src/Tab.d.ts +1 -1
- package/lib/tabs/src/Tab.js +4 -6
- package/lib/tabs/src/Tabs.d.ts +133 -42
- package/lib/tabs/src/Tabs.js +36 -37
- package/lib/tabs/src/interface.d.ts +2 -1
- package/lib/tabs/src/styles/index.cssr.js +34 -10
- package/lib/tabs/styles/_common.d.ts +6 -0
- package/lib/tabs/styles/_common.js +6 -0
- package/lib/tabs/styles/dark.js +7 -1
- package/lib/tabs/styles/light.d.ts +13 -0
- package/lib/tabs/styles/light.js +3 -3
- package/lib/tag/src/styles/index.cssr.js +1 -1
- package/lib/time/src/Time.d.ts +14 -22
- package/lib/time/src/Time.js +31 -17
- package/lib/time-picker/src/TimePicker.d.ts +5 -0
- package/lib/time-picker/src/TimePicker.js +2 -2
- package/lib/tooltip/src/Tooltip.d.ts +8 -22
- package/lib/transfer/src/TransferList.d.ts +1 -1
- package/lib/tree/src/Tree.d.ts +25 -10
- package/lib/tree/src/Tree.js +34 -11
- package/lib/tree/src/TreeNode.js +5 -2
- package/lib/tree/src/interface.d.ts +2 -2
- package/lib/tree-select/src/TreeSelect.d.ts +103 -81
- package/lib/tree-select/src/TreeSelect.js +36 -40
- package/lib/tree-select/src/interface.d.ts +2 -2
- package/lib/tree-select/styles/light.d.ts +9 -8
- package/lib/typography/src/blockquote.d.ts +2 -8
- package/lib/typography/src/blockquote.js +1 -4
- package/lib/typography/src/ol.d.ts +2 -8
- package/lib/typography/src/ol.js +1 -4
- package/lib/typography/src/p.d.ts +2 -2
- package/lib/typography/src/p.js +1 -1
- package/lib/typography/src/text.d.ts +14 -58
- package/lib/typography/src/text.js +2 -23
- package/lib/typography/src/ul.d.ts +2 -8
- package/lib/typography/src/ul.js +1 -4
- package/lib/upload/index.d.ts +2 -0
- package/lib/upload/index.js +5 -1
- package/lib/upload/src/Upload.d.ts +16 -68
- package/lib/upload/src/Upload.js +68 -95
- package/lib/upload/src/UploadDragger.js +7 -1
- package/lib/upload/src/UploadFileList.d.ts +2 -0
- package/lib/upload/src/UploadFileList.js +36 -0
- package/lib/upload/src/UploadProgress.d.ts +0 -7
- package/lib/upload/src/UploadProgress.js +1 -5
- package/lib/upload/src/UploadTrigger.d.ts +12 -0
- package/lib/upload/src/UploadTrigger.js +65 -0
- package/lib/upload/src/interface.d.ts +13 -2
- package/lib/upload/src/styles/index.cssr.js +40 -32
- package/lib/version.d.ts +1 -1
- package/lib/version.js +1 -1
- package/package.json +9 -7
- package/web-types.json +239 -13
package/lib/tree/src/Tree.js
CHANGED
|
@@ -56,6 +56,9 @@ exports.treeSharedProps = {
|
|
|
56
56
|
type: Array,
|
|
57
57
|
default: () => []
|
|
58
58
|
},
|
|
59
|
+
indeterminateKeys: Array,
|
|
60
|
+
onUpdateIndeterminateKeys: [Function, Array],
|
|
61
|
+
'onUpdate:indeterminateKeys': [Function, Array],
|
|
59
62
|
onUpdateExpandedKeys: [Function, Array],
|
|
60
63
|
'onUpdate:expandedKeys': [Function, Array]
|
|
61
64
|
};
|
|
@@ -95,14 +98,14 @@ const treeProps = Object.assign(Object.assign(Object.assign(Object.assign({}, _m
|
|
|
95
98
|
// use it to do check
|
|
96
99
|
internalDataTreeMate: Object,
|
|
97
100
|
// use it to display
|
|
98
|
-
internalDisplayTreeMate: Object, internalHighlightKeySet: Object,
|
|
101
|
+
internalDisplayTreeMate: Object, internalHighlightKeySet: Object, internalUnifySelectCheck: Boolean, internalHideFilteredNode: Boolean, internalCheckboxFocusable: {
|
|
99
102
|
type: Boolean,
|
|
100
103
|
default: true
|
|
101
104
|
}, internalFocusable: {
|
|
102
105
|
// Make tree-select take over keyboard operations
|
|
103
106
|
type: Boolean,
|
|
104
107
|
default: true
|
|
105
|
-
},
|
|
108
|
+
}, checkStrategy: {
|
|
106
109
|
type: String,
|
|
107
110
|
default: 'all'
|
|
108
111
|
} });
|
|
@@ -134,15 +137,19 @@ exports.default = (0, vue_1.defineComponent)({
|
|
|
134
137
|
const controlledCheckedKeysRef = (0, vue_1.toRef)(props, 'checkedKeys');
|
|
135
138
|
const mergedCheckedKeysRef = (0, vooks_1.useMergedState)(controlledCheckedKeysRef, uncontrolledCheckedKeysRef);
|
|
136
139
|
const checkedStatusRef = (0, vue_1.computed)(() => {
|
|
137
|
-
|
|
140
|
+
const value = dataTreeMateRef.value.getCheckedKeys(mergedCheckedKeysRef.value, {
|
|
138
141
|
cascade: props.cascade
|
|
139
142
|
});
|
|
143
|
+
return value;
|
|
140
144
|
});
|
|
141
|
-
const mergedCheckStrategyRef = (0, vue_1.computed)(() => props.leafOnly ? 'child' : props.
|
|
145
|
+
const mergedCheckStrategyRef = (0, vue_1.computed)(() => props.leafOnly ? 'child' : props.checkStrategy);
|
|
142
146
|
const displayedCheckedKeysRef = (0, vue_1.computed)(() => {
|
|
143
147
|
return checkedStatusRef.value.checkedKeys;
|
|
144
148
|
});
|
|
145
149
|
const displayedIndeterminateKeysRef = (0, vue_1.computed)(() => {
|
|
150
|
+
const { indeterminateKeys } = props;
|
|
151
|
+
if (indeterminateKeys !== undefined)
|
|
152
|
+
return indeterminateKeys;
|
|
146
153
|
return checkedStatusRef.value.indeterminateKeys;
|
|
147
154
|
});
|
|
148
155
|
const uncontrolledSelectedKeysRef = (0, vue_1.ref)(props.defaultSelectedKeys || props.selectedKeys);
|
|
@@ -337,6 +344,13 @@ exports.default = (0, vue_1.defineComponent)({
|
|
|
337
344
|
if (_onUpdateCheckedKeys)
|
|
338
345
|
(0, _utils_1.call)(_onUpdateCheckedKeys, value);
|
|
339
346
|
}
|
|
347
|
+
function doUpdateIndeterminateKeys(value) {
|
|
348
|
+
const { 'onUpdate:indeterminateKeys': _onUpdateIndeterminateKeys, onUpdateIndeterminateKeys } = props;
|
|
349
|
+
if (_onUpdateIndeterminateKeys)
|
|
350
|
+
(0, _utils_1.call)(_onUpdateIndeterminateKeys, value);
|
|
351
|
+
if (onUpdateIndeterminateKeys)
|
|
352
|
+
(0, _utils_1.call)(onUpdateIndeterminateKeys, value);
|
|
353
|
+
}
|
|
340
354
|
function doUpdateSelectedKeys(value) {
|
|
341
355
|
const { 'onUpdate:selectedKeys': _onUpdateSelectedKeys, onUpdateSelectedKeys } = props;
|
|
342
356
|
uncontrolledSelectedKeysRef.value = value;
|
|
@@ -402,12 +416,16 @@ exports.default = (0, vue_1.defineComponent)({
|
|
|
402
416
|
if (props.disabled || node.disabled) {
|
|
403
417
|
return;
|
|
404
418
|
}
|
|
405
|
-
|
|
419
|
+
if (props.internalUnifySelectCheck && !props.multiple) {
|
|
420
|
+
handleSelect(node);
|
|
421
|
+
return;
|
|
422
|
+
}
|
|
423
|
+
const { checkedKeys, indeterminateKeys } = dataTreeMateRef.value[checked ? 'check' : 'uncheck'](node.key, displayedCheckedKeysRef.value, {
|
|
406
424
|
cascade: props.cascade,
|
|
407
|
-
leafOnly: props.leafOnly,
|
|
408
425
|
checkStrategy: mergedCheckStrategyRef.value
|
|
409
426
|
});
|
|
410
427
|
doUpdateCheckedKeys(checkedKeys);
|
|
428
|
+
doUpdateIndeterminateKeys(indeterminateKeys);
|
|
411
429
|
}
|
|
412
430
|
function toggleExpand(key) {
|
|
413
431
|
if (props.disabled)
|
|
@@ -436,14 +454,19 @@ exports.default = (0, vue_1.defineComponent)({
|
|
|
436
454
|
if (props.disabled ||
|
|
437
455
|
node.disabled ||
|
|
438
456
|
!props.selectable ||
|
|
439
|
-
(
|
|
457
|
+
(mergedCheckStrategyRef.value === 'child' && !node.isLeaf)) {
|
|
440
458
|
return;
|
|
441
459
|
}
|
|
442
460
|
pendingNodeKeyRef.value = node.key;
|
|
443
|
-
if (props.
|
|
461
|
+
if (props.internalUnifySelectCheck) {
|
|
444
462
|
const { value: { checkedKeys, indeterminateKeys } } = checkedStatusRef;
|
|
445
|
-
|
|
446
|
-
|
|
463
|
+
if (props.multiple) {
|
|
464
|
+
handleCheck(node, !(checkedKeys.includes(node.key) ||
|
|
465
|
+
indeterminateKeys.includes(node.key)));
|
|
466
|
+
}
|
|
467
|
+
else {
|
|
468
|
+
doUpdateCheckedKeys([node.key]);
|
|
469
|
+
}
|
|
447
470
|
}
|
|
448
471
|
if (props.multiple) {
|
|
449
472
|
const selectedKeys = Array.from(mergedSelectedKeysRef.value);
|
|
@@ -843,9 +866,9 @@ exports.default = (0, vue_1.defineComponent)({
|
|
|
843
866
|
mergedSelectedKeysRef,
|
|
844
867
|
mergedExpandedKeysRef,
|
|
845
868
|
mergedThemeRef: themeRef,
|
|
869
|
+
mergedCheckStrategyRef,
|
|
846
870
|
disabledRef: (0, vue_1.toRef)(props, 'disabled'),
|
|
847
871
|
checkableRef: (0, vue_1.toRef)(props, 'checkable'),
|
|
848
|
-
leafOnlyRef: (0, vue_1.toRef)(props, 'leafOnly'),
|
|
849
872
|
selectableRef: (0, vue_1.toRef)(props, 'selectable'),
|
|
850
873
|
remoteRef: (0, vue_1.toRef)(props, 'remote'),
|
|
851
874
|
onLoadRef: (0, vue_1.toRef)(props, 'onLoad'),
|
package/lib/tree/src/TreeNode.js
CHANGED
|
@@ -148,10 +148,13 @@ const TreeNode = (0, vue_1.defineComponent)({
|
|
|
148
148
|
disabled: (0, vue_1.computed)(() => NTree.disabledRef.value || props.tmNode.disabled),
|
|
149
149
|
checkable: (0, vue_1.computed)(() => NTree.checkableRef.value &&
|
|
150
150
|
(NTree.cascadeRef.value ||
|
|
151
|
-
|
|
151
|
+
NTree.mergedCheckStrategyRef.value !== 'child' ||
|
|
152
|
+
props.tmNode.isLeaf)),
|
|
152
153
|
checkboxDisabled: (0, vue_1.computed)(() => !!props.tmNode.rawNode.checkboxDisabled),
|
|
153
154
|
selectable: (0, vue_1.computed)(() => NTree.selectableRef.value &&
|
|
154
|
-
(NTree.
|
|
155
|
+
(NTree.mergedCheckStrategyRef.value === 'child'
|
|
156
|
+
? props.tmNode.isLeaf
|
|
157
|
+
: true)),
|
|
155
158
|
internalScrollable: NTree.internalScrollableRef,
|
|
156
159
|
draggable: NTree.draggableRef,
|
|
157
160
|
blockLine: NTree.blockLineRef,
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { TreeNode } from 'treemate';
|
|
1
|
+
import { CheckStrategy, TreeNode } from 'treemate';
|
|
2
2
|
import { InjectionKey, Ref, VNodeChild } from 'vue';
|
|
3
3
|
import type { MergedTheme } from '../../_mixins';
|
|
4
4
|
import type { TreeTheme } from '../styles';
|
|
@@ -73,7 +73,7 @@ export interface TreeInjection {
|
|
|
73
73
|
disabledRef: Ref<boolean>;
|
|
74
74
|
checkableRef: Ref<boolean>;
|
|
75
75
|
cascadeRef: Ref<boolean>;
|
|
76
|
-
|
|
76
|
+
mergedCheckStrategyRef: Ref<CheckStrategy>;
|
|
77
77
|
selectableRef: Ref<boolean>;
|
|
78
78
|
pendingNodeKeyRef: Ref<null | Key>;
|
|
79
79
|
internalScrollableRef: Ref<boolean>;
|
|
@@ -38,6 +38,9 @@ declare const props: {
|
|
|
38
38
|
readonly type: PropType<Key[]>;
|
|
39
39
|
readonly default: () => never[];
|
|
40
40
|
};
|
|
41
|
+
readonly indeterminateKeys: PropType<Key[]>;
|
|
42
|
+
readonly onUpdateIndeterminateKeys: PropType<MaybeArray<(value: Key[]) => void>>;
|
|
43
|
+
readonly 'onUpdate:indeterminateKeys': PropType<MaybeArray<(value: Key[]) => void>>;
|
|
41
44
|
readonly onUpdateExpandedKeys: PropType<MaybeArray<(value: Key[]) => void>>;
|
|
42
45
|
readonly 'onUpdate:expandedKeys': PropType<MaybeArray<(value: Key[]) => void>>;
|
|
43
46
|
readonly bordered: {
|
|
@@ -161,6 +164,14 @@ declare const props: {
|
|
|
161
164
|
iconSizeHuge: string;
|
|
162
165
|
}, any>;
|
|
163
166
|
InternalSelection: import("../../_mixins").Theme<"InternalSelection", {
|
|
167
|
+
fontSizeTiny: string;
|
|
168
|
+
fontSizeSmall: string;
|
|
169
|
+
fontSizeMedium: string;
|
|
170
|
+
fontSizeLarge: string;
|
|
171
|
+
heightTiny: string;
|
|
172
|
+
heightSmall: string;
|
|
173
|
+
heightMedium: string;
|
|
174
|
+
heightLarge: string;
|
|
164
175
|
borderRadius: string;
|
|
165
176
|
textColor: string;
|
|
166
177
|
textColorDisabled: string;
|
|
@@ -201,16 +212,9 @@ declare const props: {
|
|
|
201
212
|
clearColor: string;
|
|
202
213
|
clearColorHover: string;
|
|
203
214
|
clearColorPressed: string;
|
|
204
|
-
heightTiny: string;
|
|
205
|
-
heightSmall: string;
|
|
206
|
-
heightMedium: string;
|
|
207
|
-
heightLarge: string;
|
|
208
|
-
fontSizeTiny: string;
|
|
209
|
-
fontSizeSmall: string;
|
|
210
|
-
fontSizeMedium: string;
|
|
211
|
-
fontSizeLarge: string;
|
|
212
215
|
paddingSingle: string;
|
|
213
216
|
clearSize: string;
|
|
217
|
+
arrowSize: string;
|
|
214
218
|
}, {
|
|
215
219
|
Popover: import("../../_mixins").Theme<"Popover", {
|
|
216
220
|
fontSize: string;
|
|
@@ -294,6 +298,14 @@ declare const props: {
|
|
|
294
298
|
iconSizeHuge: string;
|
|
295
299
|
}, any>;
|
|
296
300
|
InternalSelection: import("../../_mixins").Theme<"InternalSelection", {
|
|
301
|
+
fontSizeTiny: string;
|
|
302
|
+
fontSizeSmall: string;
|
|
303
|
+
fontSizeMedium: string;
|
|
304
|
+
fontSizeLarge: string;
|
|
305
|
+
heightTiny: string;
|
|
306
|
+
heightSmall: string;
|
|
307
|
+
heightMedium: string;
|
|
308
|
+
heightLarge: string;
|
|
297
309
|
borderRadius: string;
|
|
298
310
|
textColor: string;
|
|
299
311
|
textColorDisabled: string;
|
|
@@ -334,16 +346,9 @@ declare const props: {
|
|
|
334
346
|
clearColor: string;
|
|
335
347
|
clearColorHover: string;
|
|
336
348
|
clearColorPressed: string;
|
|
337
|
-
heightTiny: string;
|
|
338
|
-
heightSmall: string;
|
|
339
|
-
heightMedium: string;
|
|
340
|
-
heightLarge: string;
|
|
341
|
-
fontSizeTiny: string;
|
|
342
|
-
fontSizeSmall: string;
|
|
343
|
-
fontSizeMedium: string;
|
|
344
|
-
fontSizeLarge: string;
|
|
345
349
|
paddingSingle: string;
|
|
346
350
|
clearSize: string;
|
|
351
|
+
arrowSize: string;
|
|
347
352
|
}, {
|
|
348
353
|
Popover: import("../../_mixins").Theme<"Popover", {
|
|
349
354
|
fontSize: string;
|
|
@@ -427,6 +432,14 @@ declare const props: {
|
|
|
427
432
|
iconSizeHuge: string;
|
|
428
433
|
}, any>;
|
|
429
434
|
InternalSelection: import("../../_mixins").Theme<"InternalSelection", {
|
|
435
|
+
fontSizeTiny: string;
|
|
436
|
+
fontSizeSmall: string;
|
|
437
|
+
fontSizeMedium: string;
|
|
438
|
+
fontSizeLarge: string;
|
|
439
|
+
heightTiny: string;
|
|
440
|
+
heightSmall: string;
|
|
441
|
+
heightMedium: string;
|
|
442
|
+
heightLarge: string;
|
|
430
443
|
borderRadius: string;
|
|
431
444
|
textColor: string;
|
|
432
445
|
textColorDisabled: string;
|
|
@@ -467,16 +480,9 @@ declare const props: {
|
|
|
467
480
|
clearColor: string;
|
|
468
481
|
clearColorHover: string;
|
|
469
482
|
clearColorPressed: string;
|
|
470
|
-
heightTiny: string;
|
|
471
|
-
heightSmall: string;
|
|
472
|
-
heightMedium: string;
|
|
473
|
-
heightLarge: string;
|
|
474
|
-
fontSizeTiny: string;
|
|
475
|
-
fontSizeSmall: string;
|
|
476
|
-
fontSizeMedium: string;
|
|
477
|
-
fontSizeLarge: string;
|
|
478
483
|
paddingSingle: string;
|
|
479
484
|
clearSize: string;
|
|
485
|
+
arrowSize: string;
|
|
480
486
|
}, {
|
|
481
487
|
Popover: import("../../_mixins").Theme<"Popover", {
|
|
482
488
|
fontSize: string;
|
|
@@ -529,6 +535,9 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
529
535
|
readonly type: PropType<Key[]>;
|
|
530
536
|
readonly default: () => never[];
|
|
531
537
|
};
|
|
538
|
+
readonly indeterminateKeys: PropType<Key[]>;
|
|
539
|
+
readonly onUpdateIndeterminateKeys: PropType<MaybeArray<(value: Key[]) => void>>;
|
|
540
|
+
readonly 'onUpdate:indeterminateKeys': PropType<MaybeArray<(value: Key[]) => void>>;
|
|
532
541
|
readonly onUpdateExpandedKeys: PropType<MaybeArray<(value: Key[]) => void>>;
|
|
533
542
|
readonly 'onUpdate:expandedKeys': PropType<MaybeArray<(value: Key[]) => void>>;
|
|
534
543
|
readonly bordered: {
|
|
@@ -652,6 +661,14 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
652
661
|
iconSizeHuge: string;
|
|
653
662
|
}, any>;
|
|
654
663
|
InternalSelection: import("../../_mixins").Theme<"InternalSelection", {
|
|
664
|
+
fontSizeTiny: string;
|
|
665
|
+
fontSizeSmall: string;
|
|
666
|
+
fontSizeMedium: string;
|
|
667
|
+
fontSizeLarge: string;
|
|
668
|
+
heightTiny: string;
|
|
669
|
+
heightSmall: string;
|
|
670
|
+
heightMedium: string;
|
|
671
|
+
heightLarge: string;
|
|
655
672
|
borderRadius: string;
|
|
656
673
|
textColor: string;
|
|
657
674
|
textColorDisabled: string;
|
|
@@ -692,16 +709,9 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
692
709
|
clearColor: string;
|
|
693
710
|
clearColorHover: string;
|
|
694
711
|
clearColorPressed: string;
|
|
695
|
-
heightTiny: string;
|
|
696
|
-
heightSmall: string;
|
|
697
|
-
heightMedium: string;
|
|
698
|
-
heightLarge: string;
|
|
699
|
-
fontSizeTiny: string;
|
|
700
|
-
fontSizeSmall: string;
|
|
701
|
-
fontSizeMedium: string;
|
|
702
|
-
fontSizeLarge: string;
|
|
703
712
|
paddingSingle: string;
|
|
704
713
|
clearSize: string;
|
|
714
|
+
arrowSize: string;
|
|
705
715
|
}, {
|
|
706
716
|
Popover: import("../../_mixins").Theme<"Popover", {
|
|
707
717
|
fontSize: string;
|
|
@@ -785,6 +795,14 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
785
795
|
iconSizeHuge: string;
|
|
786
796
|
}, any>;
|
|
787
797
|
InternalSelection: import("../../_mixins").Theme<"InternalSelection", {
|
|
798
|
+
fontSizeTiny: string;
|
|
799
|
+
fontSizeSmall: string;
|
|
800
|
+
fontSizeMedium: string;
|
|
801
|
+
fontSizeLarge: string;
|
|
802
|
+
heightTiny: string;
|
|
803
|
+
heightSmall: string;
|
|
804
|
+
heightMedium: string;
|
|
805
|
+
heightLarge: string;
|
|
788
806
|
borderRadius: string;
|
|
789
807
|
textColor: string;
|
|
790
808
|
textColorDisabled: string;
|
|
@@ -825,16 +843,9 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
825
843
|
clearColor: string;
|
|
826
844
|
clearColorHover: string;
|
|
827
845
|
clearColorPressed: string;
|
|
828
|
-
heightTiny: string;
|
|
829
|
-
heightSmall: string;
|
|
830
|
-
heightMedium: string;
|
|
831
|
-
heightLarge: string;
|
|
832
|
-
fontSizeTiny: string;
|
|
833
|
-
fontSizeSmall: string;
|
|
834
|
-
fontSizeMedium: string;
|
|
835
|
-
fontSizeLarge: string;
|
|
836
846
|
paddingSingle: string;
|
|
837
847
|
clearSize: string;
|
|
848
|
+
arrowSize: string;
|
|
838
849
|
}, {
|
|
839
850
|
Popover: import("../../_mixins").Theme<"Popover", {
|
|
840
851
|
fontSize: string;
|
|
@@ -918,6 +929,14 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
918
929
|
iconSizeHuge: string;
|
|
919
930
|
}, any>;
|
|
920
931
|
InternalSelection: import("../../_mixins").Theme<"InternalSelection", {
|
|
932
|
+
fontSizeTiny: string;
|
|
933
|
+
fontSizeSmall: string;
|
|
934
|
+
fontSizeMedium: string;
|
|
935
|
+
fontSizeLarge: string;
|
|
936
|
+
heightTiny: string;
|
|
937
|
+
heightSmall: string;
|
|
938
|
+
heightMedium: string;
|
|
939
|
+
heightLarge: string;
|
|
921
940
|
borderRadius: string;
|
|
922
941
|
textColor: string;
|
|
923
942
|
textColorDisabled: string;
|
|
@@ -958,16 +977,9 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
958
977
|
clearColor: string;
|
|
959
978
|
clearColorHover: string;
|
|
960
979
|
clearColorPressed: string;
|
|
961
|
-
heightTiny: string;
|
|
962
|
-
heightSmall: string;
|
|
963
|
-
heightMedium: string;
|
|
964
|
-
heightLarge: string;
|
|
965
|
-
fontSizeTiny: string;
|
|
966
|
-
fontSizeSmall: string;
|
|
967
|
-
fontSizeMedium: string;
|
|
968
|
-
fontSizeLarge: string;
|
|
969
980
|
paddingSingle: string;
|
|
970
981
|
clearSize: string;
|
|
982
|
+
arrowSize: string;
|
|
971
983
|
}, {
|
|
972
984
|
Popover: import("../../_mixins").Theme<"Popover", {
|
|
973
985
|
fontSize: string;
|
|
@@ -1029,8 +1041,8 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
1029
1041
|
handleMenuLeave: () => void;
|
|
1030
1042
|
handleTriggerClick: () => void;
|
|
1031
1043
|
handleMenuClickoutside: (e: MouseEvent) => void;
|
|
1032
|
-
handleUpdateSelectedKeys: (keys: Key[]) => void;
|
|
1033
1044
|
handleUpdateCheckedKeys: (keys: Key[]) => void;
|
|
1045
|
+
handleUpdateIndeterminateKeys: (keys: Key[]) => void;
|
|
1034
1046
|
handleTriggerFocus: (e: FocusEvent) => void;
|
|
1035
1047
|
handleTriggerBlur: (e: FocusEvent) => void;
|
|
1036
1048
|
handleMenuFocusin: (e: FocusEvent) => void;
|
|
@@ -1216,6 +1228,14 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
1216
1228
|
iconSizeHuge: string;
|
|
1217
1229
|
}, any>;
|
|
1218
1230
|
InternalSelection: import("../../_mixins").Theme<"InternalSelection", {
|
|
1231
|
+
fontSizeTiny: string;
|
|
1232
|
+
fontSizeSmall: string;
|
|
1233
|
+
fontSizeMedium: string;
|
|
1234
|
+
fontSizeLarge: string;
|
|
1235
|
+
heightTiny: string;
|
|
1236
|
+
heightSmall: string;
|
|
1237
|
+
heightMedium: string;
|
|
1238
|
+
heightLarge: string;
|
|
1219
1239
|
borderRadius: string;
|
|
1220
1240
|
textColor: string;
|
|
1221
1241
|
textColorDisabled: string;
|
|
@@ -1256,16 +1276,9 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
1256
1276
|
clearColor: string;
|
|
1257
1277
|
clearColorHover: string;
|
|
1258
1278
|
clearColorPressed: string;
|
|
1259
|
-
heightTiny: string;
|
|
1260
|
-
heightSmall: string;
|
|
1261
|
-
heightMedium: string;
|
|
1262
|
-
heightLarge: string;
|
|
1263
|
-
fontSizeTiny: string;
|
|
1264
|
-
fontSizeSmall: string;
|
|
1265
|
-
fontSizeMedium: string;
|
|
1266
|
-
fontSizeLarge: string;
|
|
1267
1279
|
paddingSingle: string;
|
|
1268
1280
|
clearSize: string;
|
|
1281
|
+
arrowSize: string;
|
|
1269
1282
|
}, {
|
|
1270
1283
|
Popover: import("../../_mixins").Theme<"Popover", {
|
|
1271
1284
|
fontSize: string;
|
|
@@ -1360,6 +1373,9 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
1360
1373
|
readonly labelField?: unknown;
|
|
1361
1374
|
readonly childrenField?: unknown;
|
|
1362
1375
|
readonly defaultExpandedKeys?: unknown;
|
|
1376
|
+
readonly indeterminateKeys?: unknown;
|
|
1377
|
+
readonly onUpdateIndeterminateKeys?: unknown;
|
|
1378
|
+
readonly 'onUpdate:indeterminateKeys'?: unknown;
|
|
1363
1379
|
readonly onUpdateExpandedKeys?: unknown;
|
|
1364
1380
|
readonly 'onUpdate:expandedKeys'?: unknown;
|
|
1365
1381
|
readonly bordered?: unknown;
|
|
@@ -1484,6 +1500,14 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
1484
1500
|
iconSizeHuge: string;
|
|
1485
1501
|
}, any>;
|
|
1486
1502
|
InternalSelection: import("../../_mixins").Theme<"InternalSelection", {
|
|
1503
|
+
fontSizeTiny: string;
|
|
1504
|
+
fontSizeSmall: string;
|
|
1505
|
+
fontSizeMedium: string;
|
|
1506
|
+
fontSizeLarge: string;
|
|
1507
|
+
heightTiny: string;
|
|
1508
|
+
heightSmall: string;
|
|
1509
|
+
heightMedium: string;
|
|
1510
|
+
heightLarge: string;
|
|
1487
1511
|
borderRadius: string;
|
|
1488
1512
|
textColor: string;
|
|
1489
1513
|
textColorDisabled: string;
|
|
@@ -1524,16 +1548,9 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
1524
1548
|
clearColor: string;
|
|
1525
1549
|
clearColorHover: string;
|
|
1526
1550
|
clearColorPressed: string;
|
|
1527
|
-
heightTiny: string;
|
|
1528
|
-
heightSmall: string;
|
|
1529
|
-
heightMedium: string;
|
|
1530
|
-
heightLarge: string;
|
|
1531
|
-
fontSizeTiny: string;
|
|
1532
|
-
fontSizeSmall: string;
|
|
1533
|
-
fontSizeMedium: string;
|
|
1534
|
-
fontSizeLarge: string;
|
|
1535
1551
|
paddingSingle: string;
|
|
1536
1552
|
clearSize: string;
|
|
1553
|
+
arrowSize: string;
|
|
1537
1554
|
}, {
|
|
1538
1555
|
Popover: import("../../_mixins").Theme<"Popover", {
|
|
1539
1556
|
fontSize: string;
|
|
@@ -1617,6 +1634,14 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
1617
1634
|
iconSizeHuge: string;
|
|
1618
1635
|
}, any>;
|
|
1619
1636
|
InternalSelection: import("../../_mixins").Theme<"InternalSelection", {
|
|
1637
|
+
fontSizeTiny: string;
|
|
1638
|
+
fontSizeSmall: string;
|
|
1639
|
+
fontSizeMedium: string;
|
|
1640
|
+
fontSizeLarge: string;
|
|
1641
|
+
heightTiny: string;
|
|
1642
|
+
heightSmall: string;
|
|
1643
|
+
heightMedium: string;
|
|
1644
|
+
heightLarge: string;
|
|
1620
1645
|
borderRadius: string;
|
|
1621
1646
|
textColor: string;
|
|
1622
1647
|
textColorDisabled: string;
|
|
@@ -1657,16 +1682,9 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
1657
1682
|
clearColor: string;
|
|
1658
1683
|
clearColorHover: string;
|
|
1659
1684
|
clearColorPressed: string;
|
|
1660
|
-
heightTiny: string;
|
|
1661
|
-
heightSmall: string;
|
|
1662
|
-
heightMedium: string;
|
|
1663
|
-
heightLarge: string;
|
|
1664
|
-
fontSizeTiny: string;
|
|
1665
|
-
fontSizeSmall: string;
|
|
1666
|
-
fontSizeMedium: string;
|
|
1667
|
-
fontSizeLarge: string;
|
|
1668
1685
|
paddingSingle: string;
|
|
1669
1686
|
clearSize: string;
|
|
1687
|
+
arrowSize: string;
|
|
1670
1688
|
}, {
|
|
1671
1689
|
Popover: import("../../_mixins").Theme<"Popover", {
|
|
1672
1690
|
fontSize: string;
|
|
@@ -1750,6 +1768,14 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
1750
1768
|
iconSizeHuge: string;
|
|
1751
1769
|
}, any>;
|
|
1752
1770
|
InternalSelection: import("../../_mixins").Theme<"InternalSelection", {
|
|
1771
|
+
fontSizeTiny: string;
|
|
1772
|
+
fontSizeSmall: string;
|
|
1773
|
+
fontSizeMedium: string;
|
|
1774
|
+
fontSizeLarge: string;
|
|
1775
|
+
heightTiny: string;
|
|
1776
|
+
heightSmall: string;
|
|
1777
|
+
heightMedium: string;
|
|
1778
|
+
heightLarge: string;
|
|
1753
1779
|
borderRadius: string;
|
|
1754
1780
|
textColor: string;
|
|
1755
1781
|
textColorDisabled: string;
|
|
@@ -1790,16 +1816,9 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
1790
1816
|
clearColor: string;
|
|
1791
1817
|
clearColorHover: string;
|
|
1792
1818
|
clearColorPressed: string;
|
|
1793
|
-
heightTiny: string;
|
|
1794
|
-
heightSmall: string;
|
|
1795
|
-
heightMedium: string;
|
|
1796
|
-
heightLarge: string;
|
|
1797
|
-
fontSizeTiny: string;
|
|
1798
|
-
fontSizeSmall: string;
|
|
1799
|
-
fontSizeMedium: string;
|
|
1800
|
-
fontSizeLarge: string;
|
|
1801
1819
|
paddingSingle: string;
|
|
1802
1820
|
clearSize: string;
|
|
1821
|
+
arrowSize: string;
|
|
1803
1822
|
}, {
|
|
1804
1823
|
Popover: import("../../_mixins").Theme<"Popover", {
|
|
1805
1824
|
fontSize: string;
|
|
@@ -1826,6 +1845,9 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
1826
1845
|
expandedKeys?: Key[] | undefined;
|
|
1827
1846
|
"onUpdate:expandedKeys"?: MaybeArray<(value: Key[]) => void> | undefined;
|
|
1828
1847
|
onUpdateExpandedKeys?: MaybeArray<(value: Key[]) => void> | undefined;
|
|
1848
|
+
indeterminateKeys?: Key[] | undefined;
|
|
1849
|
+
onUpdateIndeterminateKeys?: MaybeArray<(value: Key[]) => void> | undefined;
|
|
1850
|
+
"onUpdate:indeterminateKeys"?: MaybeArray<(value: Key[]) => void> | undefined;
|
|
1829
1851
|
}>, {
|
|
1830
1852
|
show: boolean | undefined;
|
|
1831
1853
|
separator: string;
|
|
@@ -119,7 +119,7 @@ exports.default = (0, vue_1.defineComponent)({
|
|
|
119
119
|
? initMergedValue[initMergedValue.length - 1]
|
|
120
120
|
: null);
|
|
121
121
|
const mergedCascadeRef = (0, vue_1.computed)(() => {
|
|
122
|
-
return props.multiple && props.cascade;
|
|
122
|
+
return props.multiple && props.cascade && props.checkable;
|
|
123
123
|
});
|
|
124
124
|
// The same logic as tree, now it's not that complex so I don't extract a
|
|
125
125
|
// function to reuse it.
|
|
@@ -138,21 +138,9 @@ exports.default = (0, vue_1.defineComponent)({
|
|
|
138
138
|
const treeSelectedKeysRef = (0, vue_1.computed)(() => {
|
|
139
139
|
if (props.checkable)
|
|
140
140
|
return [];
|
|
141
|
-
|
|
142
|
-
const { multiple } = props;
|
|
143
|
-
return Array.isArray(mergedValue)
|
|
144
|
-
? multiple
|
|
145
|
-
? mergedValue
|
|
146
|
-
: []
|
|
147
|
-
: multiple
|
|
148
|
-
? []
|
|
149
|
-
: mergedValue === null
|
|
150
|
-
? []
|
|
151
|
-
: [mergedValue];
|
|
141
|
+
return treeCheckedKeysRef.value;
|
|
152
142
|
});
|
|
153
143
|
const treeCheckedKeysRef = (0, vue_1.computed)(() => {
|
|
154
|
-
if (!props.checkable)
|
|
155
|
-
return [];
|
|
156
144
|
const { value: mergedValue } = mergedValueRef;
|
|
157
145
|
if (props.multiple) {
|
|
158
146
|
if (Array.isArray(mergedValue))
|
|
@@ -228,16 +216,26 @@ exports.default = (0, vue_1.defineComponent)({
|
|
|
228
216
|
(0, _utils_1.call)(_onUpdateShow, value);
|
|
229
217
|
uncontrolledShowRef.value = value;
|
|
230
218
|
}
|
|
231
|
-
function doUpdateValue(value) {
|
|
219
|
+
function doUpdateValue(value, option) {
|
|
232
220
|
const { onUpdateValue, 'onUpdate:value': _onUpdateValue } = props;
|
|
233
221
|
if (onUpdateValue)
|
|
234
|
-
(0, _utils_1.call)(onUpdateValue, value);
|
|
235
|
-
if (_onUpdateValue)
|
|
236
|
-
(0, _utils_1.call)(_onUpdateValue, value);
|
|
222
|
+
(0, _utils_1.call)(onUpdateValue, value, option);
|
|
223
|
+
if (_onUpdateValue) {
|
|
224
|
+
(0, _utils_1.call)(_onUpdateValue, value, option);
|
|
225
|
+
}
|
|
237
226
|
uncontrolledValueRef.value = value;
|
|
238
227
|
nTriggerFormInput();
|
|
239
228
|
nTriggerFormChange();
|
|
240
229
|
}
|
|
230
|
+
function doUpdateIndeterminateKeys(value, option) {
|
|
231
|
+
const { onUpdateIndeterminateKeys, 'onUpdate:indeterminateKeys': _onUpdateIndeterminateKeys } = props;
|
|
232
|
+
if (onUpdateIndeterminateKeys) {
|
|
233
|
+
(0, _utils_1.call)(onUpdateIndeterminateKeys, value, option);
|
|
234
|
+
}
|
|
235
|
+
if (_onUpdateIndeterminateKeys) {
|
|
236
|
+
(0, _utils_1.call)(_onUpdateIndeterminateKeys, value, option);
|
|
237
|
+
}
|
|
238
|
+
}
|
|
241
239
|
function doUpdateExpandedKeys(keys) {
|
|
242
240
|
const { onUpdateExpandedKeys, 'onUpdate:expandedKeys': _onUpdateExpandedKeys } = props;
|
|
243
241
|
if (onUpdateExpandedKeys)
|
|
@@ -296,16 +294,19 @@ exports.default = (0, vue_1.defineComponent)({
|
|
|
296
294
|
}
|
|
297
295
|
}
|
|
298
296
|
}
|
|
299
|
-
function
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
297
|
+
function getOptionsByKeys(keys) {
|
|
298
|
+
const { value: { getNode } } = dataTreeMateRef;
|
|
299
|
+
return keys.map((key) => { var _a; return ((_a = getNode(key)) === null || _a === void 0 ? void 0 : _a.rawNode) || null; });
|
|
300
|
+
}
|
|
301
|
+
function handleUpdateCheckedKeys(keys) {
|
|
302
|
+
const options = getOptionsByKeys(keys);
|
|
304
303
|
if (props.multiple) {
|
|
305
|
-
doUpdateValue(keys);
|
|
304
|
+
doUpdateValue(keys, options);
|
|
306
305
|
}
|
|
307
306
|
else {
|
|
308
|
-
|
|
307
|
+
keys.length
|
|
308
|
+
? doUpdateValue(keys[0], options[0] || null)
|
|
309
|
+
: doUpdateValue(null, null);
|
|
309
310
|
closeMenu();
|
|
310
311
|
if (!props.filterable) {
|
|
311
312
|
// Currently it is not necessary. However if there is an action slot,
|
|
@@ -318,14 +319,9 @@ exports.default = (0, vue_1.defineComponent)({
|
|
|
318
319
|
patternRef.value = '';
|
|
319
320
|
}
|
|
320
321
|
}
|
|
321
|
-
function
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
doUpdateValue(keys);
|
|
325
|
-
if (props.filterable) {
|
|
326
|
-
focusSelectionInput();
|
|
327
|
-
patternRef.value = '';
|
|
328
|
-
}
|
|
322
|
+
function handleUpdateIndeterminateKeys(keys) {
|
|
323
|
+
if (props.checkable) {
|
|
324
|
+
doUpdateIndeterminateKeys(keys, getOptionsByKeys(keys));
|
|
329
325
|
}
|
|
330
326
|
}
|
|
331
327
|
function handleTriggerFocus(e) {
|
|
@@ -367,10 +363,10 @@ exports.default = (0, vue_1.defineComponent)({
|
|
|
367
363
|
closeMenu();
|
|
368
364
|
}
|
|
369
365
|
if (multiple) {
|
|
370
|
-
doUpdateValue([]);
|
|
366
|
+
doUpdateValue([], []);
|
|
371
367
|
}
|
|
372
368
|
else {
|
|
373
|
-
doUpdateValue(null);
|
|
369
|
+
doUpdateValue(null, null);
|
|
374
370
|
}
|
|
375
371
|
}
|
|
376
372
|
function handleDeleteOption(option) {
|
|
@@ -383,12 +379,12 @@ exports.default = (0, vue_1.defineComponent)({
|
|
|
383
379
|
const { checkedKeys } = dataTreeMateRef.value.uncheck(option.value, mergedValue, {
|
|
384
380
|
cascade: mergedCascadeRef.value
|
|
385
381
|
});
|
|
386
|
-
doUpdateValue(checkedKeys);
|
|
382
|
+
doUpdateValue(checkedKeys, getOptionsByKeys(checkedKeys));
|
|
387
383
|
}
|
|
388
384
|
else {
|
|
389
385
|
const nextValue = Array.from(mergedValue);
|
|
390
386
|
nextValue.splice(index, 1);
|
|
391
|
-
doUpdateValue(nextValue);
|
|
387
|
+
doUpdateValue(nextValue, getOptionsByKeys(nextValue));
|
|
392
388
|
}
|
|
393
389
|
}
|
|
394
390
|
}
|
|
@@ -506,8 +502,8 @@ exports.default = (0, vue_1.defineComponent)({
|
|
|
506
502
|
handleMenuLeave,
|
|
507
503
|
handleTriggerClick,
|
|
508
504
|
handleMenuClickoutside,
|
|
509
|
-
handleUpdateSelectedKeys,
|
|
510
505
|
handleUpdateCheckedKeys,
|
|
506
|
+
handleUpdateIndeterminateKeys,
|
|
511
507
|
handleTriggerFocus,
|
|
512
508
|
handleTriggerBlur,
|
|
513
509
|
handleMenuFocusin,
|
|
@@ -547,8 +543,8 @@ exports.default = (0, vue_1.defineComponent)({
|
|
|
547
543
|
return null;
|
|
548
544
|
const { mergedClsPrefix, filteredTreeInfo, checkable, multiple } = this;
|
|
549
545
|
return (0, vue_1.withDirectives)((0, vue_1.h)("div", { class: `${mergedClsPrefix}-tree-select-menu`, ref: "menuElRef", style: this.cssVars, tabindex: 0, onMousedown: this.handleMenuMousedown, onKeyup: this.handleKeyup, onKeydown: this.handleKeydown, onFocusin: this.handleMenuFocusin, onFocusout: this.handleMenuFocusout },
|
|
550
|
-
filteredTreeInfo.filteredTree.length ? ((0, vue_1.h)(tree_1.NTree, { ref: "treeInstRef", blockLine: true, animated: false, data: filteredTreeInfo.filteredTree, cancelable: multiple, labelField: this.labelField, theme: mergedTheme.peers.Tree, themeOverrides: mergedTheme.peerOverrides.Tree, defaultExpandAll: this.defaultExpandAll, defaultExpandedKeys: this.defaultExpandedKeys, expandedKeys: this.mergedExpandedKeys, checkedKeys: this.treeCheckedKeys, selectedKeys: this.treeSelectedKeys, checkable: checkable,
|
|
551
|
-
this.virtualScroll, internalDataTreeMate: this.dataTreeMate, internalDisplayTreeMate: this.displayTreeMate, internalHighlightKeySet: filteredTreeInfo.highlightKeySet,
|
|
546
|
+
filteredTreeInfo.filteredTree.length ? ((0, vue_1.h)(tree_1.NTree, { ref: "treeInstRef", blockLine: true, animated: false, data: filteredTreeInfo.filteredTree, cancelable: multiple, labelField: this.labelField, theme: mergedTheme.peers.Tree, themeOverrides: mergedTheme.peerOverrides.Tree, defaultExpandAll: this.defaultExpandAll, defaultExpandedKeys: this.defaultExpandedKeys, expandedKeys: this.mergedExpandedKeys, checkedKeys: this.treeCheckedKeys, selectedKeys: this.treeSelectedKeys, checkable: checkable, checkStrategy: this.checkStrategy, cascade: this.mergedCascade, leafOnly: this.leafOnly, multiple: this.multiple, virtualScroll: this.consistentMenuWidth &&
|
|
547
|
+
this.virtualScroll, internalDataTreeMate: this.dataTreeMate, internalDisplayTreeMate: this.displayTreeMate, internalHighlightKeySet: filteredTreeInfo.highlightKeySet, internalUnifySelectCheck: true, internalScrollable: true, internalScrollablePadding: this.menuPadding, internalFocusable: false, internalCheckboxFocusable: false, onUpdateCheckedKeys: this.handleUpdateCheckedKeys, onUpdateIndeterminateKeys: this.handleUpdateIndeterminateKeys, onUpdateExpandedKeys: this.doUpdateExpandedKeys })) : ((0, vue_1.h)("div", { class: `${mergedClsPrefix}-tree-select-menu__empty` },
|
|
552
548
|
(0, vue_1.h)(empty_1.NEmpty, { theme: mergedTheme.peers.Empty, themeOverrides: mergedTheme.peerOverrides.Empty }))),
|
|
553
549
|
(0, vue_1.h)(_internal_1.NBaseFocusDetector, { onFocus: this.handleTabOut })), [[vdirs_1.clickoutside, this.handleMenuClickoutside]]);
|
|
554
550
|
}
|