ep-craft 0.1.34 → 0.1.35
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/components/carousel/EpCarousel.vue.d.ts +39 -0
- package/dist/components/carousel/EpCarousel.vue.js +227 -0
- package/dist/components/carousel/EpCarousel2.vue.js +4 -0
- package/dist/components/carousel/carousel.d.ts +86 -0
- package/dist/components/carousel/carousel.js +113 -0
- package/dist/components/carousel/constants.d.ts +32 -0
- package/dist/components/carousel/constants.js +5 -0
- package/dist/components/carousel/index.d.ts +28 -2
- package/dist/components/carousel/index.js +11 -4
- package/dist/components/carousel/instance.d.ts +8 -0
- package/dist/components/carousel/use-carousel.d.ts +41 -0
- package/dist/components/carousel/use-carousel.js +200 -0
- package/dist/components/carousel-item/EpCarouselItem.vue.d.ts +16 -0
- package/dist/components/carousel-item/EpCarouselItem.vue.js +74 -0
- package/dist/components/carousel-item/EpCarouselItem2.vue.js +4 -0
- package/dist/components/carousel-item/carousel-item.d.ts +22 -0
- package/dist/components/carousel-item/carousel-item.js +22 -0
- package/dist/components/carousel-item/index.d.ts +14 -2
- package/dist/components/carousel-item/index.js +9 -4
- package/dist/components/carousel-item/use-carousel-item.d.ts +14 -0
- package/dist/components/carousel-item/use-carousel-item.js +79 -0
- package/dist/components/cascader/EpCascader.vue.d.ts +232 -0
- package/dist/components/cascader/EpCascader.vue.js +757 -0
- package/dist/components/cascader/EpCascader2.vue.js +4 -0
- package/dist/components/cascader/cascader.d.ts +313 -0
- package/dist/components/cascader/cascader.js +210 -0
- package/dist/components/cascader/index.d.ts +17 -2
- package/dist/components/cascader/index.js +9 -3
- package/dist/components/cascader/instances.d.ts +2 -0
- package/dist/components/cascader-panel/EpCascaderMenu.vue.d.ts +32 -0
- package/dist/components/cascader-panel/EpCascaderMenu.vue.js +204 -0
- package/dist/components/cascader-panel/EpCascaderMenu2.vue.js +4 -0
- package/dist/components/cascader-panel/EpCascaderNode.vue.d.ts +11 -0
- package/dist/components/cascader-panel/EpCascaderNode.vue.js +134 -0
- package/dist/components/cascader-panel/EpCascaderNode2.vue.js +4 -0
- package/dist/components/cascader-panel/EpCascaderPanel.vue.d.ts +290 -0
- package/dist/components/cascader-panel/EpCascaderPanel.vue.js +266 -0
- package/dist/components/cascader-panel/EpCascaderPanel2.vue.js +4 -0
- package/dist/components/cascader-panel/config.d.ts +102 -0
- package/dist/components/cascader-panel/config.js +136 -0
- package/dist/components/cascader-panel/index.d.ts +17 -2
- package/dist/components/cascader-panel/index.js +21 -4
- package/dist/components/cascader-panel/instance.d.ts +4 -0
- package/dist/components/cascader-panel/node-content.d.ts +14 -0
- package/dist/components/cascader-panel/node-content.js +50 -0
- package/dist/components/cascader-panel/node.d.ts +50 -0
- package/dist/components/cascader-panel/node.js +75 -0
- package/dist/components/cascader-panel/store.d.ts +17 -0
- package/dist/components/cascader-panel/store.js +49 -0
- package/dist/components/cascader-panel/types.d.ts +64 -0
- package/dist/components/cascader-panel/types.js +4 -0
- package/dist/components/cascader-panel/utils.d.ts +4 -0
- package/dist/components/cascader-panel/utils.js +26 -0
- package/dist/components/checkbox/EpCheckbox.vue.d.ts +1 -1
- package/dist/components/checkbox-button/EpCheckboxButton.vue.d.ts +1 -1
- package/dist/components/checkbox-group/index.js +4 -3
- package/dist/components/collapse-transition/index.js +4 -3
- package/dist/components/color-picker/EpColorPicker.vue.d.ts +53 -0
- package/dist/components/color-picker/EpColorPicker.vue.js +318 -0
- package/dist/components/color-picker/EpColorPicker2.vue.js +4 -0
- package/dist/components/color-picker/color-picker.d.ts +240 -0
- package/dist/components/color-picker/color-picker.js +124 -0
- package/dist/components/color-picker/index.d.ts +16 -2
- package/dist/components/color-picker/index.js +11 -4
- package/dist/components/color-picker-panel/EpColorPickerPanel.vue.d.ts +413 -0
- package/dist/components/color-picker-panel/EpColorPickerPanel.vue.js +142 -0
- package/dist/components/color-picker-panel/EpColorPickerPanel2.vue.js +4 -0
- package/dist/components/color-picker-panel/color-picker-panel.d.ts +91 -0
- package/dist/components/color-picker-panel/color-picker-panel.js +71 -0
- package/dist/components/color-picker-panel/components/EpAlphaSlider.vue.d.ts +19 -0
- package/dist/components/color-picker-panel/components/EpAlphaSlider.vue.js +92 -0
- package/dist/components/color-picker-panel/components/EpAlphaSlider2.vue.js +4 -0
- package/dist/components/color-picker-panel/components/EpHueSlider.vue.d.ts +20 -0
- package/dist/components/color-picker-panel/components/EpHueSlider.vue.js +84 -0
- package/dist/components/color-picker-panel/components/EpHueSlider2.vue.js +4 -0
- package/dist/components/color-picker-panel/components/EpPredefine.vue.d.ts +3 -0
- package/dist/components/color-picker-panel/components/EpPredefine.vue.js +39 -0
- package/dist/components/color-picker-panel/components/EpPredefine2.vue.js +4 -0
- package/dist/components/color-picker-panel/components/EpSvPanel.vue.d.ts +8 -0
- package/dist/components/color-picker-panel/components/EpSvPanel.vue.js +67 -0
- package/dist/components/color-picker-panel/components/EpSvPanel2.vue.js +4 -0
- package/dist/components/color-picker-panel/composables/use-common-color.d.ts +11 -0
- package/dist/components/color-picker-panel/composables/use-common-color.js +23 -0
- package/dist/components/color-picker-panel/composables/use-predefine.d.ts +14 -0
- package/dist/components/color-picker-panel/composables/use-predefine.js +66 -0
- package/dist/components/color-picker-panel/composables/use-slider.d.ts +35 -0
- package/dist/components/color-picker-panel/composables/use-slider.js +152 -0
- package/dist/components/color-picker-panel/composables/use-sv-panel.d.ts +25 -0
- package/dist/components/color-picker-panel/composables/use-sv-panel.js +123 -0
- package/dist/components/color-picker-panel/index.d.ts +4 -0
- package/dist/components/color-picker-panel/props/predefine.d.ts +36 -0
- package/dist/components/color-picker-panel/props/slider.d.ts +39 -0
- package/dist/components/color-picker-panel/props/sv-panel.d.ts +22 -0
- package/dist/components/color-picker-panel/utils/color.d.ts +28 -0
- package/dist/components/color-picker-panel/utils/color.js +62 -0
- package/dist/components/color-picker-panel/utils/draggable.d.ts +6 -0
- package/dist/components/color-picker-panel/utils/draggable.js +23 -0
- package/dist/components/descriptions/EpDescriptions.vue.d.ts +20 -0
- package/dist/components/descriptions/EpDescriptions.vue.js +100 -0
- package/dist/components/descriptions/EpDescriptions2.vue.js +4 -0
- package/dist/components/descriptions/EpDescriptionsRow.vue.d.ts +5 -0
- package/dist/components/descriptions/EpDescriptionsRow.vue.js +56 -0
- package/dist/components/descriptions/EpDescriptionsRow2.vue.js +4 -0
- package/dist/components/descriptions/constants.d.ts +1 -0
- package/dist/components/descriptions/constants.js +4 -0
- package/dist/components/descriptions/description.d.ts +66 -0
- package/dist/components/descriptions/description.js +61 -0
- package/dist/components/descriptions/descriptions-cell.d.ts +31 -0
- package/dist/components/descriptions/descriptions-cell.js +133 -0
- package/dist/components/descriptions/descriptions-row.d.ts +10 -0
- package/dist/components/descriptions/descriptions.type.d.ts +29 -0
- package/dist/components/descriptions/index.d.ts +22 -2
- package/dist/components/descriptions/index.js +9 -3
- package/dist/components/descriptions/token.d.ts +3 -0
- package/dist/components/descriptions/token.js +4 -0
- package/dist/components/descriptions-item/description-item.d.ts +84 -0
- package/dist/components/descriptions-item/description-item.js +87 -0
- package/dist/components/descriptions-item/index.d.ts +14 -2
- package/dist/components/descriptions-item/index.js +6 -4
- package/dist/components/dropdown/src/dropdown-item-impl2.vue.js +1 -1
- package/dist/components/dropdown/src/dropdown-item2.vue.js +1 -1
- package/dist/components/dropdown/src/dropdown-menu2.vue.js +1 -1
- package/dist/components/dropdown/src/dropdown2.vue.js +1 -1
- package/dist/components/input-number/index.js +3 -2
- package/dist/components/mention/EpMention.vue.d.ts +430 -0
- package/dist/components/mention/EpMention.vue.js +303 -0
- package/dist/components/mention/EpMention2.vue.js +4 -0
- package/dist/components/mention/EpMentionDropdown.vue.d.ts +34 -0
- package/dist/components/mention/EpMentionDropdown.vue.js +140 -0
- package/dist/components/mention/EpMentionDropdown2.vue.js +4 -0
- package/dist/components/mention/helper.d.ts +32 -0
- package/dist/components/mention/helper.js +112 -0
- package/dist/components/mention/index.d.ts +13 -2
- package/dist/components/mention/index.js +11 -4
- package/dist/components/mention/mention-dropdown.d.ts +21 -0
- package/dist/components/mention/mention-dropdown.js +22 -0
- package/dist/components/mention/mention.d.ts +313 -0
- package/dist/components/mention/mention.js +123 -0
- package/dist/components/mention/types.d.ts +19 -0
- package/dist/components/radio/index.js +4 -3
- package/dist/components/rate/EpRate.vue.d.ts +32 -0
- package/dist/components/rate/EpRate.vue.js +229 -0
- package/dist/components/rate/EpRate2.vue.js +4 -0
- package/dist/components/rate/index.d.ts +15 -2
- package/dist/components/rate/index.js +7 -4
- package/dist/components/rate/rate.d.ts +131 -0
- package/dist/components/rate/rate.js +158 -0
- package/dist/components/roving-focus-group/index.js +1 -1
- package/dist/components/roving-focus-group/src/roving-focus-item.vue.js +76 -18
- package/dist/components/roving-focus-group/src/roving-focus-item2.vue.js +18 -76
- package/dist/components/segmented/EpSegmented.vue.d.ts +22 -0
- package/dist/components/segmented/EpSegmented.vue.js +136 -0
- package/dist/components/segmented/EpSegmented2.vue.js +4 -0
- package/dist/components/segmented/index.d.ts +14 -2
- package/dist/components/segmented/index.js +11 -4
- package/dist/components/segmented/segmented.d.ts +85 -0
- package/dist/components/segmented/segmented.js +85 -0
- package/dist/components/segmented/types.d.ts +1 -0
- package/dist/components/select/index.d.ts +4 -2
- package/dist/components/select/index.js +3 -2
- package/dist/components/select/select2.vue.js +60 -61
- package/dist/components/select-v2/src/select.vue.d.ts +1 -1
- package/dist/components/slider/EpSlider.vue.d.ts +175 -0
- package/dist/components/slider/EpSlider.vue.js +211 -0
- package/dist/components/slider/EpSlider2.vue.js +4 -0
- package/dist/components/slider/EpSliderButton.vue.d.ts +26 -0
- package/dist/components/slider/EpSliderButton.vue.js +103 -0
- package/dist/components/slider/EpSliderButton2.vue.js +4 -0
- package/dist/components/slider/button.d.ts +28 -0
- package/dist/components/slider/button.js +28 -0
- package/dist/components/slider/composables/index.d.ts +7 -0
- package/dist/components/slider/composables/use-lifecycle.d.ts +4 -0
- package/dist/components/slider/composables/use-lifecycle.js +20 -0
- package/dist/components/slider/composables/use-marks.d.ts +7 -0
- package/dist/components/slider/composables/use-marks.js +30 -0
- package/dist/components/slider/composables/use-slide.d.ts +23 -0
- package/dist/components/slider/composables/use-slide.js +92 -0
- package/dist/components/slider/composables/use-slider-button.d.ts +18 -0
- package/dist/components/slider/composables/use-slider-button.js +179 -0
- package/dist/components/slider/composables/use-stops.d.ts +8 -0
- package/dist/components/slider/composables/use-stops.js +23 -0
- package/dist/components/slider/composables/use-watch.d.ts +4 -0
- package/dist/components/slider/composables/use-watch.js +42 -0
- package/dist/components/slider/constants.d.ts +17 -0
- package/dist/components/slider/constants.js +4 -0
- package/dist/components/slider/index.d.ts +18 -2
- package/dist/components/slider/index.js +10 -4
- package/dist/components/slider/marker.d.ts +64 -0
- package/dist/components/slider/marker.js +40 -0
- package/dist/components/slider/slider.d.ts +80 -0
- package/dist/components/slider/slider.js +170 -0
- package/dist/components/step/EpStep.vue.d.ts +38 -0
- package/dist/components/step/EpStep.vue.js +157 -0
- package/dist/components/step/EpStep2.vue.js +4 -0
- package/dist/components/step/index.d.ts +12 -2
- package/dist/components/step/index.js +8 -3
- package/dist/components/step/step.d.ts +42 -0
- package/dist/components/step/step.js +39 -0
- package/dist/components/steps/EpSteps.vue.d.ts +23 -0
- package/dist/components/steps/EpSteps.vue.js +57 -0
- package/dist/components/steps/EpSteps2.vue.js +4 -0
- package/dist/components/steps/index.d.ts +20 -2
- package/dist/components/steps/index.js +8 -4
- package/dist/components/steps/steps.d.ts +69 -0
- package/dist/components/steps/steps.js +66 -0
- package/dist/components/steps/tokens.d.ts +1 -0
- package/dist/components/steps/tokens.js +4 -0
- package/dist/components/switch/EpSwitch.vue.d.ts +50 -0
- package/dist/components/switch/EpSwitch.vue.js +251 -0
- package/dist/components/switch/EpSwitch2.vue.js +4 -0
- package/dist/components/switch/index.d.ts +15 -2
- package/dist/components/switch/index.js +10 -4
- package/dist/components/switch/switch.d.ts +157 -0
- package/dist/components/switch/switch.js +145 -0
- package/dist/components/table/src/filter-panel.vue.d.ts +3 -3
- package/dist/components/table/src/table-header/index.d.ts +3 -3
- package/dist/components/text/index.d.ts +4 -2
- package/dist/components/text/index.js +7 -4
- package/dist/components/text/src/text.d.ts +43 -0
- package/dist/components/text/src/text.js +45 -0
- package/dist/components/text/src/text.vue.d.ts +17 -0
- package/dist/components/text/src/text.vue.js +63 -0
- package/dist/components/text/src/text2.vue.js +4 -0
- package/dist/components/time-select/EpTimeSelect.vue.d.ts +38 -0
- package/dist/components/time-select/EpTimeSelect.vue.js +154 -0
- package/dist/components/time-select/EpTimeSelect2.vue.js +4 -0
- package/dist/components/time-select/index.d.ts +17 -2
- package/dist/components/time-select/index.js +12 -4
- package/dist/components/time-select/time-select.d.ts +143 -0
- package/dist/components/time-select/time-select.js +139 -0
- package/dist/components/time-select/utils.d.ts +11 -0
- package/dist/components/time-select/utils.js +39 -0
- package/dist/components/tour/EpTour.vue.d.ts +40 -0
- package/dist/components/tour/EpTour.vue.js +174 -0
- package/dist/components/tour/EpTour2.vue.js +4 -0
- package/dist/components/tour/EpTourContent.vue.d.ts +23 -0
- package/dist/components/tour/EpTourContent.vue.js +72 -0
- package/dist/components/tour/EpTourContent2.vue.js +4 -0
- package/dist/components/tour/EpTourMask.vue.d.ts +7 -0
- package/dist/components/tour/EpTourMask.vue.js +76 -0
- package/dist/components/tour/EpTourMask2.vue.js +4 -0
- package/dist/components/tour/constants.d.ts +10 -0
- package/dist/components/tour/constants.js +4 -0
- package/dist/components/tour/content.d.ts +49 -0
- package/dist/components/tour/content.js +70 -0
- package/dist/components/tour/helper.d.ts +36 -0
- package/dist/components/tour/helper.js +161 -0
- package/dist/components/tour/index.d.ts +28 -2
- package/dist/components/tour/index.js +19 -4
- package/dist/components/tour/mask.d.ts +43 -0
- package/dist/components/tour/steps.d.ts +19 -0
- package/dist/components/tour/steps.js +35 -0
- package/dist/components/tour/tour.d.ts +136 -0
- package/dist/components/tour/tour.js +120 -0
- package/dist/components/tour/types.d.ts +21 -0
- package/dist/components/tour-step/EpTourStep.vue.d.ts +25 -0
- package/dist/components/tour-step/EpTourStep.vue.js +179 -0
- package/dist/components/tour-step/EpTourStep2.vue.js +4 -0
- package/dist/components/tour-step/index.d.ts +13 -2
- package/dist/components/tour-step/index.js +10 -4
- package/dist/components/tour-step/step.d.ts +120 -0
- package/dist/components/tour-step/step.js +91 -0
- package/dist/components/transfer/EpTransfer.vue.d.ts +36 -0
- package/dist/components/transfer/EpTransfer.vue.js +195 -0
- package/dist/components/transfer/EpTransfer2.vue.js +4 -0
- package/dist/components/transfer/EpTransferPanel.vue.d.ts +24 -0
- package/dist/components/transfer/EpTransferPanel.vue.js +191 -0
- package/dist/components/transfer/EpTransferPanel2.vue.js +4 -0
- package/dist/components/transfer/composables/index.d.ts +5 -0
- package/dist/components/transfer/composables/use-check.d.ts +286 -0
- package/dist/components/transfer/composables/use-check.js +89 -0
- package/dist/components/transfer/composables/use-checked-change.d.ts +6 -0
- package/dist/components/transfer/composables/use-checked-change.js +12 -0
- package/dist/components/transfer/composables/use-computed-data.d.ts +5 -0
- package/dist/components/transfer/composables/use-computed-data.js +26 -0
- package/dist/components/transfer/composables/use-move.d.ts +6 -0
- package/dist/components/transfer/composables/use-move.js +27 -0
- package/dist/components/transfer/composables/use-props-alias.d.ts +8 -0
- package/dist/components/transfer/composables/use-props-alias.js +15 -0
- package/dist/components/transfer/index.d.ts +19 -2
- package/dist/components/transfer/index.js +13 -4
- package/dist/components/transfer/transfer-panel.d.ts +63 -0
- package/dist/components/transfer/transfer-panel.js +32 -0
- package/dist/components/transfer/transfer.d.ts +136 -0
- package/dist/components/transfer/transfer.js +130 -0
- package/dist/components/tree/index.d.ts +7 -2
- package/dist/components/tree/index.js +8 -4
- package/dist/components/tree/src/instance.d.ts +2 -0
- package/dist/components/tree/src/model/node.d.ts +63 -0
- package/dist/components/tree/src/model/node.js +263 -0
- package/dist/components/tree/src/model/tree-store.d.ts +51 -0
- package/dist/components/tree/src/model/tree-store.js +223 -0
- package/dist/components/tree/src/model/useDragNode.d.ts +459 -0
- package/dist/components/tree/src/model/useDragNode.js +98 -0
- package/dist/components/tree/src/model/useKeydown.d.ts +7 -0
- package/dist/components/tree/src/model/useKeydown.js +93 -0
- package/dist/components/tree/src/model/useNodeExpandEventBroadcast.d.ts +9 -0
- package/dist/components/tree/src/model/useNodeExpandEventBroadcast.js +27 -0
- package/dist/components/tree/src/model/util.d.ts +7 -0
- package/dist/components/tree/src/model/util.js +19 -0
- package/dist/components/tree/src/tokens.d.ts +3 -0
- package/dist/components/tree/src/tokens.js +6 -0
- package/dist/components/tree/src/tree-node-content.vue.d.ts +14 -0
- package/dist/components/tree/src/tree-node-content.vue.js +43 -0
- package/dist/components/tree/src/tree-node-content2.vue.js +4 -0
- package/dist/components/tree/src/tree-node.vue.d.ts +377 -0
- package/dist/components/tree/src/tree-node.vue.js +108 -0
- package/dist/components/tree/src/tree-node2.vue.js +166 -0
- package/dist/components/tree/src/tree.d.ts +103 -0
- package/dist/components/tree/src/tree.js +99 -0
- package/dist/components/tree/src/tree.type.d.ts +112 -0
- package/dist/components/tree/src/tree.vue.d.ts +1745 -0
- package/dist/components/tree/src/tree.vue.js +48 -0
- package/dist/components/tree/src/tree2.vue.js +192 -0
- package/dist/components/tree-select/index.d.ts +3 -2
- package/dist/components/tree-select/index.js +7 -4
- package/dist/components/tree-select/src/cache-options.d.ts +20 -0
- package/dist/components/tree-select/src/cache-options.js +36 -0
- package/dist/components/tree-select/src/instance.d.ts +6 -0
- package/dist/components/tree-select/src/select.d.ts +11 -0
- package/dist/components/tree-select/src/select.js +92 -0
- package/dist/components/tree-select/src/tree-select-option.d.ts +364 -0
- package/dist/components/tree-select/src/tree-select-option.js +32 -0
- package/dist/components/tree-select/src/tree-select.vue.d.ts +412 -0
- package/dist/components/tree-select/src/tree-select.vue.js +96 -0
- package/dist/components/tree-select/src/tree-select2.vue.js +4 -0
- package/dist/components/tree-select/src/tree.d.ts +12 -0
- package/dist/components/tree-select/src/tree.js +179 -0
- package/dist/components/tree-select/src/utils.d.ts +10 -0
- package/dist/components/tree-select/src/utils.js +49 -0
- package/dist/components/upload/src/upload-content.vue.d.ts +2 -2
- package/dist/components/upload/src/upload.vue.d.ts +2 -2
- package/dist/constants/column-alignment.js +4 -0
- package/dist/ep-craft.js +367 -279
- package/dist/hooks/index.d.ts +1 -0
- package/dist/hooks/use-lockscreen/index.d.ts +11 -0
- package/dist/hooks/use-lockscreen/index.js +34 -0
- package/dist/index.d.ts +98 -0
- package/dist/utils/arrays.js +4 -3
- package/dist/utils/dom/aria.js +23 -13
- package/dist/utils/dom/scroll.js +61 -46
- package/dist/utils/vue/icon.js +17 -14
- package/dist/utils/vue/validator.js +5 -0
- package/dist/utils/vue/vnode.js +24 -12
- package/dist/vendored-components.d.ts +1 -1
- package/dist/vendored-components.js +69 -5
- package/package.json +3 -2
|
@@ -0,0 +1,757 @@
|
|
|
1
|
+
import { defineComponent as xt, useAttrs as Tt, useSlots as wt, ref as g, computed as u, watch as A, nextTick as D, onMounted as Et, openBlock as r, createBlock as T, unref as a, withCtx as d, createElementBlock as k, withModifiers as G, normalizeClass as c, renderSlot as I, createCommentVNode as z, withDirectives as W, createVNode as B, vShow as te, Fragment as le, renderList as fe, createElementVNode as V, toDisplayString as R, normalizeStyle as Pe, createSlots as $t, resolveDynamicComponent as Nt, withKeys as It, vModelText as zt, markRaw as Vt } from "vue";
|
|
2
|
+
import { clamp as Pt, cloneDeep as Bt } from "lodash-unified";
|
|
3
|
+
import { useDebounceFn as Ft, useResizeObserver as Dt, isClient as Be, useCssVar as Rt } from "@vueuse/core";
|
|
4
|
+
import { isNumber as Lt } from "../../utils/types.js";
|
|
5
|
+
import { NOOP as Fe, isPromise as De } from "@vue/shared";
|
|
6
|
+
import { focusNode as Re, getSibling as At } from "../../utils/dom/aria.js";
|
|
7
|
+
import { getEventCode as Le } from "../../utils/dom/event.js";
|
|
8
|
+
import { Check as Ae, ArrowDown as Wt, CircleClose as Mt } from "@element-plus/icons-vue";
|
|
9
|
+
import { EVENT_CODE as w } from "../../constants/aria.js";
|
|
10
|
+
import { UPDATE_MODEL_EVENT as Ht, CHANGE_EVENT as Ot } from "../../constants/event.js";
|
|
11
|
+
import { EpCascaderPanel as Kt } from "../cascader-panel/index.js";
|
|
12
|
+
import { EpInput as Ut } from "../input/index.js";
|
|
13
|
+
import { EpTooltip as We } from "../tooltip/index.js";
|
|
14
|
+
import { EpScrollbar as Me } from "../scrollbar/index.js";
|
|
15
|
+
import qt from "../virtual-list/src/components/fixed-size-list.js";
|
|
16
|
+
import "../virtual-list/src/components/dynamic-size-list.js";
|
|
17
|
+
import "../virtual-list/src/props.js";
|
|
18
|
+
import { EpTag as ve } from "../tag/index.js";
|
|
19
|
+
import { EpIcon as ae } from "../icon/index.js";
|
|
20
|
+
import "../form/index.js";
|
|
21
|
+
import Gt from "../../directives/click-outside/index.js";
|
|
22
|
+
import "normalize-wheel-es";
|
|
23
|
+
import { useNamespace as He } from "../../hooks/use-namespace/index.js";
|
|
24
|
+
import { useLocale as jt } from "../../hooks/use-locale/index.js";
|
|
25
|
+
import "../../hooks/use-size/index.js";
|
|
26
|
+
import "@popperjs/core";
|
|
27
|
+
import "../../hooks/use-z-index/index.js";
|
|
28
|
+
import "../../hooks/use-delayed-toggle/index.js";
|
|
29
|
+
import "../../hooks/use-aria/index.js";
|
|
30
|
+
import "../../hooks/use-model-toggle/index.js";
|
|
31
|
+
import { useEmptyValues as Xt } from "../../hooks/use-empty-values/index.js";
|
|
32
|
+
import { useFocusController as Zt } from "../../hooks/use-focus-controller/index.js";
|
|
33
|
+
import { useComposition as Jt } from "../../hooks/use-composition/index.js";
|
|
34
|
+
import { cascaderEmits as Qt } from "./cascader.js";
|
|
35
|
+
import { CASCADER_PANEL_HEIGHT as Yt, CASCADER_PANEL_ITEM_SIZE as _t } from "../cascader-panel/config.js";
|
|
36
|
+
import { useFormItem as el } from "../form/src/hooks/use-form-item.js";
|
|
37
|
+
import { useFormDisabled as tl, useFormSize as ll } from "../form/src/hooks/use-form-common-props.js";
|
|
38
|
+
const al = ["placeholder"], sl = ["onClick"], ol = ["id", "data-suggestion-index", "onClick"], nl = 34, Ul = /* @__PURE__ */ xt({
|
|
39
|
+
name: "EpCascader",
|
|
40
|
+
__name: "EpCascader",
|
|
41
|
+
props: {
|
|
42
|
+
size: {},
|
|
43
|
+
placeholder: {},
|
|
44
|
+
disabled: { type: Boolean, default: void 0 },
|
|
45
|
+
clearable: { type: Boolean },
|
|
46
|
+
clearIcon: { default: Vt(Mt) },
|
|
47
|
+
filterable: { type: Boolean },
|
|
48
|
+
filterMethod: { type: Function, default: (n, se) => n.text.includes(se) },
|
|
49
|
+
separator: { default: " / " },
|
|
50
|
+
showAllLevels: { type: Boolean, default: !0 },
|
|
51
|
+
collapseTags: { type: Boolean },
|
|
52
|
+
maxCollapseTags: { default: 1 },
|
|
53
|
+
collapseTagsTooltip: { type: Boolean },
|
|
54
|
+
maxCollapseTagsTooltipHeight: {},
|
|
55
|
+
debounce: { default: 300 },
|
|
56
|
+
beforeFilter: { type: Function, default: () => !0 },
|
|
57
|
+
placement: { default: "bottom-start" },
|
|
58
|
+
fallbackPlacements: { default: () => [
|
|
59
|
+
"bottom-start",
|
|
60
|
+
"bottom",
|
|
61
|
+
"top-start",
|
|
62
|
+
"top",
|
|
63
|
+
"right",
|
|
64
|
+
"left"
|
|
65
|
+
] },
|
|
66
|
+
popperClass: {},
|
|
67
|
+
popperStyle: { type: [Boolean, null, String, Object, Array], default: void 0 },
|
|
68
|
+
teleported: { type: Boolean, default: !0 },
|
|
69
|
+
effect: { default: "light" },
|
|
70
|
+
tagType: { default: "info" },
|
|
71
|
+
tagEffect: { default: "light" },
|
|
72
|
+
validateEvent: { type: Boolean, default: !0 },
|
|
73
|
+
persistent: { type: Boolean, default: !0 },
|
|
74
|
+
showCheckedStrategy: { default: "child" },
|
|
75
|
+
checkOnClickNode: { type: Boolean },
|
|
76
|
+
showPrefix: { type: Boolean, default: !0 },
|
|
77
|
+
fitInputWidth: { type: [Boolean, Number] },
|
|
78
|
+
modelValue: {},
|
|
79
|
+
options: { default: () => [] },
|
|
80
|
+
props: { default: () => ({}) },
|
|
81
|
+
virtualScroll: { type: Boolean },
|
|
82
|
+
itemSize: { default: _t },
|
|
83
|
+
height: { default: Yt },
|
|
84
|
+
emptyValues: {},
|
|
85
|
+
valueOnClear: { type: [String, Number, Boolean, Function, null], default: void 0 }
|
|
86
|
+
},
|
|
87
|
+
emits: Qt,
|
|
88
|
+
setup(n, { expose: se, emit: Oe }) {
|
|
89
|
+
const Ke = {
|
|
90
|
+
modifiers: [
|
|
91
|
+
{
|
|
92
|
+
name: "arrowPosition",
|
|
93
|
+
enabled: !0,
|
|
94
|
+
phase: "main",
|
|
95
|
+
fn: ({ state: e }) => {
|
|
96
|
+
const { modifiersData: t, placement: l } = e;
|
|
97
|
+
["right", "left", "bottom", "top"].includes(l) || t.arrow && (t.arrow.x = 35);
|
|
98
|
+
},
|
|
99
|
+
requires: ["arrow"]
|
|
100
|
+
}
|
|
101
|
+
]
|
|
102
|
+
}, o = n, L = Oe, ge = Tt(), me = wt();
|
|
103
|
+
let M = 0, oe = 0;
|
|
104
|
+
const i = He("cascader"), j = He("input"), Ue = {
|
|
105
|
+
small: 7,
|
|
106
|
+
default: 11,
|
|
107
|
+
large: 15
|
|
108
|
+
}, { t: ne } = jt(), { formItem: b } = el(), E = tl(), { valueOnClear: qe } = Xt(o), { isComposing: he, handleComposition: $ } = Jt({
|
|
109
|
+
afterComposition(e) {
|
|
110
|
+
var l;
|
|
111
|
+
const t = (l = e.target) == null ? void 0 : l.value;
|
|
112
|
+
de(t);
|
|
113
|
+
}
|
|
114
|
+
}), X = g(), ye = g(), S = g(), Ce = g(), y = g(), H = g(), Z = g(), x = g(!1), ie = g(!1), N = g(!1), J = g(""), F = g(""), m = g([]), h = g([]), ke = g("100%"), be = u(() => !!me["suggestion-item"]), Ge = u(
|
|
115
|
+
() => Pt(h.value.length * o.itemSize, o.itemSize, o.height)
|
|
116
|
+
), je = u(() => o.props.multiple ? o.collapseTags ? m.value.slice(0, o.maxCollapseTags) : m.value : []), Xe = u(() => o.props.multiple ? o.collapseTags ? m.value.slice(o.maxCollapseTags) : [] : []), Ze = u(() => ge.style), Se = u(
|
|
117
|
+
() => o.placeholder ?? ne("el.cascader.placeholder")
|
|
118
|
+
), Je = u(
|
|
119
|
+
() => F.value || m.value.length > 0 || he.value ? "" : Se.value
|
|
120
|
+
), O = ll(), re = u(
|
|
121
|
+
() => O.value === "small" ? "small" : "default"
|
|
122
|
+
), P = u(() => !!o.props.multiple), xe = u(() => !o.filterable || P.value), Te = u(
|
|
123
|
+
() => P.value ? F.value : J.value
|
|
124
|
+
), Q = u(
|
|
125
|
+
() => {
|
|
126
|
+
var e;
|
|
127
|
+
return ((e = y.value) == null ? void 0 : e.checkedNodes) || [];
|
|
128
|
+
}
|
|
129
|
+
), { wrapperRef: Qe, isFocused: ue, handleBlur: Ye } = Zt(S, {
|
|
130
|
+
disabled: E,
|
|
131
|
+
beforeBlur(e) {
|
|
132
|
+
var t, l;
|
|
133
|
+
return ((t = X.value) == null ? void 0 : t.isFocusInsideContent(e)) || ((l = ye.value) == null ? void 0 : l.isFocusInsideContent(e));
|
|
134
|
+
},
|
|
135
|
+
afterBlur() {
|
|
136
|
+
var e;
|
|
137
|
+
o.validateEvent && ((e = b == null ? void 0 : b.validate) == null || e.call(b, "blur").catch(Fe));
|
|
138
|
+
}
|
|
139
|
+
}), _e = u(() => !o.clearable || E.value || N.value || !ie.value && !ue.value ? !1 : !!Q.value.length), Y = u(() => {
|
|
140
|
+
const { showAllLevels: e, separator: t } = o, l = Q.value;
|
|
141
|
+
return l.length ? P.value ? "" : l[0].calcText(e, t) : "";
|
|
142
|
+
}), et = u(() => (b == null ? void 0 : b.validateState) || ""), we = u({
|
|
143
|
+
get() {
|
|
144
|
+
return Bt(o.modelValue);
|
|
145
|
+
},
|
|
146
|
+
set(e) {
|
|
147
|
+
const t = e ?? qe.value;
|
|
148
|
+
L(Ht, t), L(Ot, t), o.validateEvent && (b == null || b.validate("change").catch(Fe));
|
|
149
|
+
}
|
|
150
|
+
}), tt = u(() => [
|
|
151
|
+
i.b(),
|
|
152
|
+
i.m(O.value),
|
|
153
|
+
i.is("disabled", E.value),
|
|
154
|
+
ge.class
|
|
155
|
+
]), lt = u(() => [
|
|
156
|
+
j.e("icon"),
|
|
157
|
+
"icon-arrow-down",
|
|
158
|
+
i.is("reverse", x.value)
|
|
159
|
+
]), at = u(() => i.is("focus", ue.value)), Ee = u(() => {
|
|
160
|
+
var e, t;
|
|
161
|
+
return (t = (e = X.value) == null ? void 0 : e.popperRef) == null ? void 0 : t.contentRef;
|
|
162
|
+
}), st = (e) => {
|
|
163
|
+
if (ue.value) {
|
|
164
|
+
const t = new FocusEvent("blur", e);
|
|
165
|
+
Ye(t);
|
|
166
|
+
}
|
|
167
|
+
C(!1);
|
|
168
|
+
}, C = (e) => {
|
|
169
|
+
var t, l;
|
|
170
|
+
E.value || (e = e ?? !x.value, e !== x.value && (x.value = e, (l = (t = S.value) == null ? void 0 : t.input) == null || l.setAttribute("aria-expanded", `${e}`), e ? (K(), y.value && D(y.value.scrollToExpandingNode)) : o.filterable && pe(), L("visibleChange", e)));
|
|
171
|
+
}, K = () => {
|
|
172
|
+
D(() => {
|
|
173
|
+
var e;
|
|
174
|
+
(e = X.value) == null || e.updatePopper();
|
|
175
|
+
});
|
|
176
|
+
}, ce = () => {
|
|
177
|
+
N.value = !1;
|
|
178
|
+
}, ot = (e) => {
|
|
179
|
+
const { showAllLevels: t, separator: l } = o;
|
|
180
|
+
return {
|
|
181
|
+
node: e,
|
|
182
|
+
key: e.uid,
|
|
183
|
+
text: e.calcText(t, l),
|
|
184
|
+
hitState: !1,
|
|
185
|
+
closable: !E.value && !e.isDisabled
|
|
186
|
+
};
|
|
187
|
+
}, _ = (e) => {
|
|
188
|
+
var l;
|
|
189
|
+
const t = e.node;
|
|
190
|
+
t.doCheck(!1), (l = y.value) == null || l.calculateCheckedValue(), L("removeTag", t.valueByOption);
|
|
191
|
+
}, nt = () => {
|
|
192
|
+
switch (o.showCheckedStrategy) {
|
|
193
|
+
case "child":
|
|
194
|
+
return Q.value;
|
|
195
|
+
case "parent": {
|
|
196
|
+
const e = Ne(!1), t = e.map((s) => s.value);
|
|
197
|
+
return e.filter(
|
|
198
|
+
(s) => !s.parent || !t.includes(s.parent.value)
|
|
199
|
+
);
|
|
200
|
+
}
|
|
201
|
+
default:
|
|
202
|
+
return [];
|
|
203
|
+
}
|
|
204
|
+
}, it = () => {
|
|
205
|
+
if (!P.value) return;
|
|
206
|
+
const e = nt(), t = [];
|
|
207
|
+
e.forEach((l) => t.push(ot(l))), m.value = t;
|
|
208
|
+
}, $e = () => {
|
|
209
|
+
var f, p;
|
|
210
|
+
const { filterMethod: e, showAllLevels: t, separator: l } = o, s = (p = (f = y.value) == null ? void 0 : f.getFlattedNodes(!o.props.checkStrictly)) == null ? void 0 : p.filter((v) => v.isDisabled ? !1 : (v.calcText(t, l), e(v, Te.value)));
|
|
211
|
+
P.value && m.value.forEach((v) => {
|
|
212
|
+
v.hitState = !1;
|
|
213
|
+
}), N.value = !0, h.value = s, D(() => {
|
|
214
|
+
var v;
|
|
215
|
+
o.virtualScroll && h.value.length > 0 && ((v = Z.value) == null || v.scrollToItem(0)), ee();
|
|
216
|
+
}), K();
|
|
217
|
+
}, U = (e) => {
|
|
218
|
+
const t = H.value;
|
|
219
|
+
return e ? (t == null ? void 0 : t.querySelector(e)) ?? void 0 : t;
|
|
220
|
+
}, rt = () => {
|
|
221
|
+
var t;
|
|
222
|
+
let e;
|
|
223
|
+
N.value && H.value ? e = U(`.${i.e("suggestion-item")}`) : e = (t = y.value) == null ? void 0 : t.$el.querySelector(
|
|
224
|
+
`.${i.b("node")}[tabindex="-1"]`
|
|
225
|
+
), e && (e.focus(), !N.value && e.getAttribute("aria-haspopup") === "true" && e.click());
|
|
226
|
+
}, ut = (e) => {
|
|
227
|
+
const t = U();
|
|
228
|
+
if (!t) return;
|
|
229
|
+
const l = Lt(o.fitInputWidth) ? `${o.fitInputWidth}px` : `${e}px`, s = (p) => {
|
|
230
|
+
o.fitInputWidth !== !1 ? (p.style.width = l, p.style.minWidth = "") : (p.style.width = "", p.style.minWidth = l);
|
|
231
|
+
};
|
|
232
|
+
if (s(t), o.virtualScroll) {
|
|
233
|
+
ke.value = o.fitInputWidth !== !1 ? l : be.value ? `${e}px` : `${Math.max(e, pt())}px`;
|
|
234
|
+
return;
|
|
235
|
+
}
|
|
236
|
+
const f = U(
|
|
237
|
+
`.${i.e("suggestion-list")}`
|
|
238
|
+
);
|
|
239
|
+
f && s(f);
|
|
240
|
+
}, ct = () => {
|
|
241
|
+
var l;
|
|
242
|
+
if (!me.prefix) return 0;
|
|
243
|
+
const e = (l = S.value) == null ? void 0 : l.$el.querySelector(
|
|
244
|
+
`.${j.e("prefix")}`
|
|
245
|
+
);
|
|
246
|
+
if (!e) return 0;
|
|
247
|
+
const t = e.getBoundingClientRect().width;
|
|
248
|
+
return t <= 0 ? 0 : t + Ue[O.value || "default"];
|
|
249
|
+
}, ee = () => {
|
|
250
|
+
var s, f;
|
|
251
|
+
const e = (s = S.value) == null ? void 0 : s.input, t = (f = S.value) == null ? void 0 : f.$el;
|
|
252
|
+
if (!Be || !e || !t) return;
|
|
253
|
+
H.value && ut(t.getBoundingClientRect().width);
|
|
254
|
+
const l = Ce.value;
|
|
255
|
+
if (l) {
|
|
256
|
+
const p = m.value.length > 0 ? `${Math.max(l.offsetHeight, M) - 2}px` : `${M}px`;
|
|
257
|
+
e.style.height = p, l.style.left = `${ct()}px`, K();
|
|
258
|
+
}
|
|
259
|
+
}, pt = () => {
|
|
260
|
+
if (be.value || !h.value.length) return 0;
|
|
261
|
+
const t = document.createElement("canvas").getContext("2d");
|
|
262
|
+
if (!t) return 0;
|
|
263
|
+
const l = U(
|
|
264
|
+
`.${i.e("suggestion-item")}`
|
|
265
|
+
);
|
|
266
|
+
if (!l || !Be) return 0;
|
|
267
|
+
const s = getComputedStyle(l), f = Number.parseFloat(s.paddingLeft) + Number.parseFloat(s.paddingRight);
|
|
268
|
+
t.font = `bold ${s.fontSize} ${s.fontFamily}`;
|
|
269
|
+
let p = 0, v = !1;
|
|
270
|
+
for (const q of h.value) {
|
|
271
|
+
const bt = q.text || "", St = t.measureText(bt);
|
|
272
|
+
p = Math.max(p, St.width), q.checked && !v && (v = !0);
|
|
273
|
+
}
|
|
274
|
+
return p + f + (v ? nl : 0);
|
|
275
|
+
}, Ne = (e) => {
|
|
276
|
+
var t;
|
|
277
|
+
return (t = y.value) == null ? void 0 : t.getCheckedNodes(e);
|
|
278
|
+
}, dt = (e) => {
|
|
279
|
+
K(), L("expandChange", e);
|
|
280
|
+
}, ft = (e) => {
|
|
281
|
+
if (he.value) return;
|
|
282
|
+
switch (Le(e)) {
|
|
283
|
+
case w.enter:
|
|
284
|
+
case w.numpadEnter:
|
|
285
|
+
C();
|
|
286
|
+
break;
|
|
287
|
+
case w.down:
|
|
288
|
+
C(!0), D(rt), e.preventDefault();
|
|
289
|
+
break;
|
|
290
|
+
case w.esc:
|
|
291
|
+
x.value === !0 && (e.preventDefault(), e.stopPropagation(), C(!1));
|
|
292
|
+
break;
|
|
293
|
+
case w.tab:
|
|
294
|
+
C(!1);
|
|
295
|
+
break;
|
|
296
|
+
}
|
|
297
|
+
}, vt = () => {
|
|
298
|
+
var e;
|
|
299
|
+
(e = y.value) == null || e.clearCheckedNodes(), !x.value && o.filterable && pe(), C(!1), L("clear");
|
|
300
|
+
}, pe = () => {
|
|
301
|
+
const { value: e } = Y;
|
|
302
|
+
J.value = e, F.value = e;
|
|
303
|
+
}, Ie = (e) => {
|
|
304
|
+
var l, s;
|
|
305
|
+
const { checked: t } = e;
|
|
306
|
+
P.value ? (l = y.value) == null || l.handleCheckChange(e, !t, !1) : (!t && ((s = y.value) == null || s.handleCheckChange(e, !0, !1)), C(!1));
|
|
307
|
+
}, gt = (e) => {
|
|
308
|
+
const t = e.closest("[data-suggestion-index]"), l = t == null ? void 0 : t.dataset.suggestionIndex;
|
|
309
|
+
if (!l) return -1;
|
|
310
|
+
const s = Number.parseInt(l, 10);
|
|
311
|
+
return Number.isNaN(s) || s < 0 || s >= h.value.length ? -1 : s;
|
|
312
|
+
}, ze = (e) => {
|
|
313
|
+
const t = e.target, l = Le(e);
|
|
314
|
+
switch (l) {
|
|
315
|
+
case w.up:
|
|
316
|
+
case w.down: {
|
|
317
|
+
e.preventDefault();
|
|
318
|
+
const s = l === w.up ? -1 : 1;
|
|
319
|
+
if (o.virtualScroll && Z.value) {
|
|
320
|
+
const f = gt(t);
|
|
321
|
+
if (f >= 0) {
|
|
322
|
+
const p = h.value.length, v = (f + s + p) % p;
|
|
323
|
+
Z.value.scrollToItem(v), D(() => {
|
|
324
|
+
const q = U(
|
|
325
|
+
`#suggestion-${h.value[v].uid}`
|
|
326
|
+
);
|
|
327
|
+
q && Re(q);
|
|
328
|
+
});
|
|
329
|
+
return;
|
|
330
|
+
}
|
|
331
|
+
}
|
|
332
|
+
Re(
|
|
333
|
+
At(
|
|
334
|
+
t,
|
|
335
|
+
s,
|
|
336
|
+
`.${i.e("suggestion-item")}[tabindex="-1"]`
|
|
337
|
+
)
|
|
338
|
+
);
|
|
339
|
+
break;
|
|
340
|
+
}
|
|
341
|
+
case w.enter:
|
|
342
|
+
case w.numpadEnter:
|
|
343
|
+
t.click();
|
|
344
|
+
break;
|
|
345
|
+
}
|
|
346
|
+
}, mt = () => {
|
|
347
|
+
const e = m.value[m.value.length - 1];
|
|
348
|
+
oe = F.value ? 0 : oe + 1, !(!e || !oe || o.collapseTags && m.value.length > 1) && (e.hitState ? _(e) : e.hitState = !0);
|
|
349
|
+
}, ht = u(() => o.debounce), yt = Ft(() => {
|
|
350
|
+
const { value: e } = Te;
|
|
351
|
+
if (!e) return;
|
|
352
|
+
const t = o.beforeFilter(e);
|
|
353
|
+
De(t) ? t.then($e).catch(() => {
|
|
354
|
+
}) : t !== !1 ? $e() : ce();
|
|
355
|
+
}, ht), de = (e, t) => {
|
|
356
|
+
if (!x.value && C(!0), !(t != null && t.isComposing))
|
|
357
|
+
if (e)
|
|
358
|
+
yt();
|
|
359
|
+
else {
|
|
360
|
+
const l = o.beforeFilter("");
|
|
361
|
+
De(l) && l.catch(() => {
|
|
362
|
+
}), ce();
|
|
363
|
+
}
|
|
364
|
+
}, Ve = (e) => Number.parseFloat(
|
|
365
|
+
Rt(j.cssVarName("input-height"), e).value
|
|
366
|
+
) - 2, Ct = () => {
|
|
367
|
+
var e;
|
|
368
|
+
(e = S.value) == null || e.focus();
|
|
369
|
+
}, kt = () => {
|
|
370
|
+
var e;
|
|
371
|
+
(e = S.value) == null || e.blur();
|
|
372
|
+
};
|
|
373
|
+
return A(N, K), A(
|
|
374
|
+
[
|
|
375
|
+
Q,
|
|
376
|
+
E,
|
|
377
|
+
() => o.collapseTags,
|
|
378
|
+
() => o.maxCollapseTags
|
|
379
|
+
],
|
|
380
|
+
it
|
|
381
|
+
), A(m, () => {
|
|
382
|
+
D(() => ee());
|
|
383
|
+
}), A(O, async () => {
|
|
384
|
+
await D();
|
|
385
|
+
const e = S.value.input;
|
|
386
|
+
M = Ve(e) || M, ee();
|
|
387
|
+
}), A(Y, pe, { immediate: !0 }), A(
|
|
388
|
+
() => x.value,
|
|
389
|
+
(e) => {
|
|
390
|
+
var t;
|
|
391
|
+
e && o.props.lazy && o.props.lazyLoad && ((t = y.value) == null || t.loadLazyRootNodes());
|
|
392
|
+
}
|
|
393
|
+
), Et(() => {
|
|
394
|
+
const e = S.value.input, t = S.value.$el, l = Ve(e);
|
|
395
|
+
M = e.offsetHeight || l, Dt(t, ee);
|
|
396
|
+
}), se({
|
|
397
|
+
/**
|
|
398
|
+
* @description get an array of currently selected node,(leafOnly) whether only return the leaf checked nodes, default is `false`
|
|
399
|
+
*/
|
|
400
|
+
getCheckedNodes: Ne,
|
|
401
|
+
/**
|
|
402
|
+
* @description cascader panel ref
|
|
403
|
+
*/
|
|
404
|
+
cascaderPanelRef: y,
|
|
405
|
+
/**
|
|
406
|
+
* @description toggle the visible of popper
|
|
407
|
+
*/
|
|
408
|
+
togglePopperVisible: C,
|
|
409
|
+
/**
|
|
410
|
+
* @description cascader content ref
|
|
411
|
+
*/
|
|
412
|
+
contentRef: Ee,
|
|
413
|
+
/**
|
|
414
|
+
* @description selected content text
|
|
415
|
+
*/
|
|
416
|
+
presentText: Y,
|
|
417
|
+
/** @description focus the input element */
|
|
418
|
+
focus: Ct,
|
|
419
|
+
/** @description blur the input element */
|
|
420
|
+
blur: kt
|
|
421
|
+
}), (e, t) => (r(), T(a(We), {
|
|
422
|
+
ref_key: "tooltipRef",
|
|
423
|
+
ref: X,
|
|
424
|
+
visible: x.value,
|
|
425
|
+
teleported: n.teleported,
|
|
426
|
+
"popper-class": [a(i).e("dropdown"), n.popperClass],
|
|
427
|
+
"popper-style": n.popperStyle,
|
|
428
|
+
"popper-options": Ke,
|
|
429
|
+
"fallback-placements": n.fallbackPlacements,
|
|
430
|
+
"stop-popper-mouse-event": !1,
|
|
431
|
+
"gpu-acceleration": !1,
|
|
432
|
+
placement: n.placement,
|
|
433
|
+
transition: `${a(i).namespace.value}-zoom-in-top`,
|
|
434
|
+
effect: n.effect,
|
|
435
|
+
pure: "",
|
|
436
|
+
persistent: n.persistent,
|
|
437
|
+
onHide: ce
|
|
438
|
+
}, {
|
|
439
|
+
default: d(() => [
|
|
440
|
+
W((r(), k("div", {
|
|
441
|
+
ref_key: "wrapperRef",
|
|
442
|
+
ref: Qe,
|
|
443
|
+
class: c(tt.value),
|
|
444
|
+
style: Pe(Ze.value),
|
|
445
|
+
onClick: t[8] || (t[8] = () => C(xe.value ? void 0 : !0)),
|
|
446
|
+
onKeydown: ft,
|
|
447
|
+
onMouseenter: t[9] || (t[9] = (l) => ie.value = !0),
|
|
448
|
+
onMouseleave: t[10] || (t[10] = (l) => ie.value = !1)
|
|
449
|
+
}, [
|
|
450
|
+
B(a(Ut), {
|
|
451
|
+
ref_key: "inputRef",
|
|
452
|
+
ref: S,
|
|
453
|
+
modelValue: J.value,
|
|
454
|
+
"onUpdate:modelValue": t[1] || (t[1] = (l) => J.value = l),
|
|
455
|
+
placeholder: Je.value,
|
|
456
|
+
readonly: xe.value,
|
|
457
|
+
disabled: a(E),
|
|
458
|
+
"validate-event": !1,
|
|
459
|
+
size: a(O),
|
|
460
|
+
class: c(at.value),
|
|
461
|
+
tabindex: P.value && n.filterable && !a(E) ? -1 : void 0,
|
|
462
|
+
onCompositionstart: a($),
|
|
463
|
+
onCompositionupdate: a($),
|
|
464
|
+
onCompositionend: a($),
|
|
465
|
+
onInput: de
|
|
466
|
+
}, $t({
|
|
467
|
+
suffix: d(() => [
|
|
468
|
+
_e.value ? (r(), T(a(ae), {
|
|
469
|
+
key: "clear",
|
|
470
|
+
class: c([a(j).e("icon"), "icon-circle-close"]),
|
|
471
|
+
onClick: G(vt, ["stop"])
|
|
472
|
+
}, {
|
|
473
|
+
default: d(() => [
|
|
474
|
+
(r(), T(Nt(n.clearIcon)))
|
|
475
|
+
]),
|
|
476
|
+
_: 1
|
|
477
|
+
}, 8, ["class"])) : (r(), T(a(ae), {
|
|
478
|
+
key: "arrow-down",
|
|
479
|
+
class: c(lt.value),
|
|
480
|
+
onClick: t[0] || (t[0] = G((l) => C(), ["stop"]))
|
|
481
|
+
}, {
|
|
482
|
+
default: d(() => [
|
|
483
|
+
B(a(Wt))
|
|
484
|
+
]),
|
|
485
|
+
_: 1
|
|
486
|
+
}, 8, ["class"]))
|
|
487
|
+
]),
|
|
488
|
+
_: 2
|
|
489
|
+
}, [
|
|
490
|
+
e.$slots.prefix ? {
|
|
491
|
+
name: "prefix",
|
|
492
|
+
fn: d(() => [
|
|
493
|
+
I(e.$slots, "prefix")
|
|
494
|
+
]),
|
|
495
|
+
key: "0"
|
|
496
|
+
} : void 0
|
|
497
|
+
]), 1032, ["modelValue", "placeholder", "readonly", "disabled", "size", "class", "tabindex", "onCompositionstart", "onCompositionupdate", "onCompositionend"]),
|
|
498
|
+
P.value ? (r(), k("div", {
|
|
499
|
+
key: 0,
|
|
500
|
+
ref_key: "tagWrapper",
|
|
501
|
+
ref: Ce,
|
|
502
|
+
class: c([
|
|
503
|
+
a(i).e("tags"),
|
|
504
|
+
a(i).is("validate", !!et.value)
|
|
505
|
+
])
|
|
506
|
+
}, [
|
|
507
|
+
I(e.$slots, "tag", {
|
|
508
|
+
data: m.value,
|
|
509
|
+
deleteTag: _
|
|
510
|
+
}, () => [
|
|
511
|
+
(r(!0), k(le, null, fe(je.value, (l) => (r(), T(a(ve), {
|
|
512
|
+
key: l.key,
|
|
513
|
+
type: n.tagType,
|
|
514
|
+
size: re.value,
|
|
515
|
+
effect: n.tagEffect,
|
|
516
|
+
hit: l.hitState,
|
|
517
|
+
closable: l.closable,
|
|
518
|
+
"disable-transitions": "",
|
|
519
|
+
onClose: (s) => _(l)
|
|
520
|
+
}, {
|
|
521
|
+
default: d(() => [
|
|
522
|
+
V("span", null, R(l.text), 1)
|
|
523
|
+
]),
|
|
524
|
+
_: 2
|
|
525
|
+
}, 1032, ["type", "size", "effect", "hit", "closable", "onClose"]))), 128))
|
|
526
|
+
]),
|
|
527
|
+
n.collapseTags && m.value.length > n.maxCollapseTags ? (r(), T(a(We), {
|
|
528
|
+
key: 0,
|
|
529
|
+
ref_key: "tagTooltipRef",
|
|
530
|
+
ref: ye,
|
|
531
|
+
disabled: x.value || !n.collapseTagsTooltip,
|
|
532
|
+
"fallback-placements": ["bottom", "top", "right", "left"],
|
|
533
|
+
placement: "bottom",
|
|
534
|
+
"popper-class": n.popperClass,
|
|
535
|
+
"popper-style": n.popperStyle,
|
|
536
|
+
effect: n.effect,
|
|
537
|
+
persistent: n.persistent
|
|
538
|
+
}, {
|
|
539
|
+
default: d(() => [
|
|
540
|
+
B(a(ve), {
|
|
541
|
+
closable: !1,
|
|
542
|
+
size: re.value,
|
|
543
|
+
type: n.tagType,
|
|
544
|
+
effect: n.tagEffect,
|
|
545
|
+
"disable-transitions": ""
|
|
546
|
+
}, {
|
|
547
|
+
default: d(() => [
|
|
548
|
+
V("span", {
|
|
549
|
+
class: c(a(i).e("tags-text"))
|
|
550
|
+
}, " + " + R(m.value.length - n.maxCollapseTags), 3)
|
|
551
|
+
]),
|
|
552
|
+
_: 1
|
|
553
|
+
}, 8, ["size", "type", "effect"])
|
|
554
|
+
]),
|
|
555
|
+
content: d(() => [
|
|
556
|
+
B(a(Me), { "max-height": n.maxCollapseTagsTooltipHeight }, {
|
|
557
|
+
default: d(() => [
|
|
558
|
+
V("div", {
|
|
559
|
+
class: c(a(i).e("collapse-tags"))
|
|
560
|
+
}, [
|
|
561
|
+
(r(!0), k(le, null, fe(Xe.value, (l, s) => (r(), k("div", {
|
|
562
|
+
key: s,
|
|
563
|
+
class: c(a(i).e("collapse-tag"))
|
|
564
|
+
}, [
|
|
565
|
+
(r(), T(a(ve), {
|
|
566
|
+
key: l.key,
|
|
567
|
+
class: "in-tooltip",
|
|
568
|
+
type: n.tagType,
|
|
569
|
+
size: re.value,
|
|
570
|
+
effect: n.tagEffect,
|
|
571
|
+
hit: l.hitState,
|
|
572
|
+
closable: l.closable,
|
|
573
|
+
"disable-transitions": "",
|
|
574
|
+
onClose: (f) => _(l)
|
|
575
|
+
}, {
|
|
576
|
+
default: d(() => [
|
|
577
|
+
V("span", null, R(l.text), 1)
|
|
578
|
+
]),
|
|
579
|
+
_: 2
|
|
580
|
+
}, 1032, ["type", "size", "effect", "hit", "closable", "onClose"]))
|
|
581
|
+
], 2))), 128))
|
|
582
|
+
], 2)
|
|
583
|
+
]),
|
|
584
|
+
_: 1
|
|
585
|
+
}, 8, ["max-height"])
|
|
586
|
+
]),
|
|
587
|
+
_: 1
|
|
588
|
+
}, 8, ["disabled", "popper-class", "popper-style", "effect", "persistent"])) : z("", !0),
|
|
589
|
+
n.filterable && !a(E) ? W((r(), k("input", {
|
|
590
|
+
key: 1,
|
|
591
|
+
"onUpdate:modelValue": t[2] || (t[2] = (l) => F.value = l),
|
|
592
|
+
type: "text",
|
|
593
|
+
class: c(a(i).e("search-input")),
|
|
594
|
+
placeholder: Y.value ? "" : Se.value,
|
|
595
|
+
onInput: t[3] || (t[3] = (l) => de(F.value, l)),
|
|
596
|
+
onClick: t[4] || (t[4] = G((l) => C(!0), ["stop"])),
|
|
597
|
+
onKeydown: It(mt, ["delete"]),
|
|
598
|
+
onCompositionstart: t[5] || (t[5] = //@ts-ignore
|
|
599
|
+
(...l) => a($) && a($)(...l)),
|
|
600
|
+
onCompositionupdate: t[6] || (t[6] = //@ts-ignore
|
|
601
|
+
(...l) => a($) && a($)(...l)),
|
|
602
|
+
onCompositionend: t[7] || (t[7] = //@ts-ignore
|
|
603
|
+
(...l) => a($) && a($)(...l))
|
|
604
|
+
}, null, 42, al)), [
|
|
605
|
+
[zt, F.value]
|
|
606
|
+
]) : z("", !0)
|
|
607
|
+
], 2)) : z("", !0)
|
|
608
|
+
], 38)), [
|
|
609
|
+
[a(Gt), st, Ee.value]
|
|
610
|
+
])
|
|
611
|
+
]),
|
|
612
|
+
content: d(() => [
|
|
613
|
+
e.$slots.header ? (r(), k("div", {
|
|
614
|
+
key: 0,
|
|
615
|
+
class: c(a(i).e("header")),
|
|
616
|
+
onClick: t[11] || (t[11] = G(() => {
|
|
617
|
+
}, ["stop"]))
|
|
618
|
+
}, [
|
|
619
|
+
I(e.$slots, "header")
|
|
620
|
+
], 2)) : z("", !0),
|
|
621
|
+
W(B(a(Kt), {
|
|
622
|
+
ref_key: "cascaderPanelRef",
|
|
623
|
+
ref: y,
|
|
624
|
+
modelValue: we.value,
|
|
625
|
+
"onUpdate:modelValue": t[12] || (t[12] = (l) => we.value = l),
|
|
626
|
+
options: n.options,
|
|
627
|
+
props: o.props,
|
|
628
|
+
border: !1,
|
|
629
|
+
"render-label": e.$slots.default,
|
|
630
|
+
"virtual-scroll": n.virtualScroll,
|
|
631
|
+
"item-size": n.itemSize,
|
|
632
|
+
height: n.height,
|
|
633
|
+
onExpandChange: dt,
|
|
634
|
+
onClose: t[13] || (t[13] = (l) => e.$nextTick(() => C(!1)))
|
|
635
|
+
}, {
|
|
636
|
+
empty: d(() => [
|
|
637
|
+
I(e.$slots, "empty")
|
|
638
|
+
]),
|
|
639
|
+
_: 3
|
|
640
|
+
}, 8, ["modelValue", "options", "props", "render-label", "virtual-scroll", "item-size", "height"]), [
|
|
641
|
+
[te, !N.value]
|
|
642
|
+
]),
|
|
643
|
+
n.filterable ? (r(), k(le, { key: 1 }, [
|
|
644
|
+
n.virtualScroll ? W((r(), k("div", {
|
|
645
|
+
key: 1,
|
|
646
|
+
ref_key: "suggestionPanel",
|
|
647
|
+
ref: H,
|
|
648
|
+
class: c(a(i).e("suggestion-panel")),
|
|
649
|
+
onKeydown: ze
|
|
650
|
+
}, [
|
|
651
|
+
W(B(a(qt), {
|
|
652
|
+
ref_key: "suggestionVirtualListRef",
|
|
653
|
+
ref: Z,
|
|
654
|
+
height: Ge.value,
|
|
655
|
+
"item-size": n.itemSize,
|
|
656
|
+
data: h.value,
|
|
657
|
+
total: h.value.length,
|
|
658
|
+
"class-name": a(i).e("suggestion-list"),
|
|
659
|
+
"inner-element": "ul",
|
|
660
|
+
"inner-width": ke.value
|
|
661
|
+
}, {
|
|
662
|
+
default: d(({ data: l, index: s, style: f }) => [
|
|
663
|
+
(r(), k("li", {
|
|
664
|
+
id: `suggestion-${l[s].uid}`,
|
|
665
|
+
key: l[s].uid,
|
|
666
|
+
"data-suggestion-index": s,
|
|
667
|
+
class: c([
|
|
668
|
+
a(i).e("suggestion-item"),
|
|
669
|
+
a(i).is("checked", l[s].checked)
|
|
670
|
+
]),
|
|
671
|
+
tabindex: -1,
|
|
672
|
+
style: Pe(f),
|
|
673
|
+
onClick: (p) => Ie(l[s])
|
|
674
|
+
}, [
|
|
675
|
+
I(e.$slots, "suggestion-item", {
|
|
676
|
+
item: l[s]
|
|
677
|
+
}, () => [
|
|
678
|
+
V("span", null, R(l[s].text), 1),
|
|
679
|
+
l[s].checked ? (r(), T(a(ae), { key: 0 }, {
|
|
680
|
+
default: d(() => [
|
|
681
|
+
B(a(Ae))
|
|
682
|
+
]),
|
|
683
|
+
_: 1
|
|
684
|
+
})) : z("", !0)
|
|
685
|
+
])
|
|
686
|
+
], 14, ol))
|
|
687
|
+
]),
|
|
688
|
+
_: 3
|
|
689
|
+
}, 8, ["height", "item-size", "data", "total", "class-name", "inner-width"]), [
|
|
690
|
+
[te, h.value.length]
|
|
691
|
+
]),
|
|
692
|
+
h.value.length ? z("", !0) : I(e.$slots, "empty", {}, () => [
|
|
693
|
+
V("ul", {
|
|
694
|
+
class: c(a(i).e("suggestion-list"))
|
|
695
|
+
}, [
|
|
696
|
+
V("li", {
|
|
697
|
+
class: c(a(i).e("empty-text"))
|
|
698
|
+
}, R(a(ne)("el.cascader.noMatch")), 3)
|
|
699
|
+
], 2)
|
|
700
|
+
], void 0, 0)
|
|
701
|
+
], 34)), [
|
|
702
|
+
[te, N.value]
|
|
703
|
+
]) : W((r(), T(a(Me), {
|
|
704
|
+
key: 0,
|
|
705
|
+
ref: (l) => H.value = l == null ? void 0 : l.$el,
|
|
706
|
+
tag: "ul",
|
|
707
|
+
class: c(a(i).e("suggestion-panel")),
|
|
708
|
+
"wrap-class": a(i).e("suggestion-wrap"),
|
|
709
|
+
"view-class": a(i).e("suggestion-list"),
|
|
710
|
+
onKeydown: ze
|
|
711
|
+
}, {
|
|
712
|
+
default: d(() => [
|
|
713
|
+
h.value.length ? (r(!0), k(le, { key: 0 }, fe(h.value, (l) => (r(), k("li", {
|
|
714
|
+
key: l.uid,
|
|
715
|
+
class: c([
|
|
716
|
+
a(i).e("suggestion-item"),
|
|
717
|
+
a(i).is("checked", l.checked)
|
|
718
|
+
]),
|
|
719
|
+
tabindex: -1,
|
|
720
|
+
onClick: (s) => Ie(l)
|
|
721
|
+
}, [
|
|
722
|
+
I(e.$slots, "suggestion-item", { item: l }, () => [
|
|
723
|
+
V("span", null, R(l.text), 1),
|
|
724
|
+
l.checked ? (r(), T(a(ae), { key: 0 }, {
|
|
725
|
+
default: d(() => [
|
|
726
|
+
B(a(Ae))
|
|
727
|
+
]),
|
|
728
|
+
_: 1
|
|
729
|
+
})) : z("", !0)
|
|
730
|
+
])
|
|
731
|
+
], 10, sl))), 128)) : I(e.$slots, "empty", {}, () => [
|
|
732
|
+
V("li", {
|
|
733
|
+
class: c(a(i).e("empty-text"))
|
|
734
|
+
}, R(a(ne)("el.cascader.noMatch")), 3)
|
|
735
|
+
], void 0, 1)
|
|
736
|
+
]),
|
|
737
|
+
_: 3
|
|
738
|
+
}, 8, ["class", "wrap-class", "view-class"])), [
|
|
739
|
+
[te, N.value]
|
|
740
|
+
])
|
|
741
|
+
], 64)) : z("", !0),
|
|
742
|
+
e.$slots.footer ? (r(), k("div", {
|
|
743
|
+
key: 2,
|
|
744
|
+
class: c(a(i).e("footer")),
|
|
745
|
+
onClick: t[14] || (t[14] = G(() => {
|
|
746
|
+
}, ["stop"]))
|
|
747
|
+
}, [
|
|
748
|
+
I(e.$slots, "footer")
|
|
749
|
+
], 2)) : z("", !0)
|
|
750
|
+
]),
|
|
751
|
+
_: 3
|
|
752
|
+
}, 8, ["visible", "teleported", "popper-class", "popper-style", "fallback-placements", "placement", "transition", "effect", "persistent"]));
|
|
753
|
+
}
|
|
754
|
+
});
|
|
755
|
+
export {
|
|
756
|
+
Ul as default
|
|
757
|
+
};
|