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,179 @@
|
|
|
1
|
+
import { defineComponent as H, inject as J, watch as Q, computed as x, onMounted as W, onBeforeUnmount as X, openBlock as s, createElementBlock as d, Fragment as S, normalizeClass as r, unref as e, createVNode as Y, withCtx as y, createBlock as f, resolveDynamicComponent as N, createCommentVNode as C, createElementVNode as u, renderSlot as V, toDisplayString as v, renderList as Z, mergeProps as I, createTextVNode as O } from "vue";
|
|
2
|
+
import { EVENT_CODE as T } from "../../constants/aria.js";
|
|
3
|
+
import { omit as _ } from "lodash-unified";
|
|
4
|
+
import { EpButton as D } from "../button/index.js";
|
|
5
|
+
import { ElIcon as ee } from "../icon/index.js";
|
|
6
|
+
import "@vue/shared";
|
|
7
|
+
import "@vueuse/core";
|
|
8
|
+
import { getEventCode as te } from "../../utils/dom/event.js";
|
|
9
|
+
import { CloseComponents as oe } from "../../utils/vue/icon.js";
|
|
10
|
+
import { useLocale as ne } from "../../hooks/use-locale/index.js";
|
|
11
|
+
import "../../hooks/use-size/index.js";
|
|
12
|
+
import "@popperjs/core";
|
|
13
|
+
import "../../hooks/use-z-index/index.js";
|
|
14
|
+
import "../../hooks/use-delayed-toggle/index.js";
|
|
15
|
+
import "../../hooks/use-aria/index.js";
|
|
16
|
+
import "../../hooks/use-model-toggle/index.js";
|
|
17
|
+
import "../../hooks/use-empty-values/index.js";
|
|
18
|
+
import { tourStepEmits as re } from "./step.js";
|
|
19
|
+
import { tourKey as le } from "../tour/helper.js";
|
|
20
|
+
import { TOUR_STEP_NAME as se } from "../tour/constants.js";
|
|
21
|
+
const ie = ["aria-label"], Ne = /* @__PURE__ */ H({
|
|
22
|
+
name: se,
|
|
23
|
+
__name: "EpTourStep",
|
|
24
|
+
props: {
|
|
25
|
+
target: {},
|
|
26
|
+
title: {},
|
|
27
|
+
description: {},
|
|
28
|
+
showClose: { type: Boolean, default: void 0 },
|
|
29
|
+
closeIcon: {},
|
|
30
|
+
showArrow: { type: Boolean, default: void 0 },
|
|
31
|
+
placement: { default: "bottom" },
|
|
32
|
+
mask: { type: [Boolean, Object], default: void 0 },
|
|
33
|
+
contentStyle: {},
|
|
34
|
+
prevButtonProps: {},
|
|
35
|
+
nextButtonProps: {},
|
|
36
|
+
scrollIntoViewOptions: { type: Boolean, default: void 0 },
|
|
37
|
+
type: {}
|
|
38
|
+
},
|
|
39
|
+
emits: re,
|
|
40
|
+
setup(i, { emit: F }) {
|
|
41
|
+
const a = i, L = F, { Close: z } = oe, { t: p } = ne(), {
|
|
42
|
+
currentStep: M,
|
|
43
|
+
current: n,
|
|
44
|
+
total: m,
|
|
45
|
+
showClose: h,
|
|
46
|
+
closeIcon: j,
|
|
47
|
+
mergedType: k,
|
|
48
|
+
ns: o,
|
|
49
|
+
slots: B,
|
|
50
|
+
updateModelValue: A,
|
|
51
|
+
onClose: K,
|
|
52
|
+
onFinish: U
|
|
53
|
+
} = J(le);
|
|
54
|
+
Q(
|
|
55
|
+
a,
|
|
56
|
+
(t) => {
|
|
57
|
+
M.value = t;
|
|
58
|
+
},
|
|
59
|
+
{
|
|
60
|
+
immediate: !0
|
|
61
|
+
}
|
|
62
|
+
);
|
|
63
|
+
const $ = x(() => a.showClose ?? h.value), R = x(
|
|
64
|
+
() => a.closeIcon ?? j.value ?? z
|
|
65
|
+
), w = (t) => {
|
|
66
|
+
if (t)
|
|
67
|
+
return _(t, ["children", "onClick"]);
|
|
68
|
+
}, E = () => {
|
|
69
|
+
var t, c;
|
|
70
|
+
n.value -= 1, (t = a.prevButtonProps) != null && t.onClick && ((c = a.prevButtonProps) == null || c.onClick());
|
|
71
|
+
}, b = () => {
|
|
72
|
+
var t;
|
|
73
|
+
n.value >= m.value - 1 ? q() : n.value += 1, (t = a.nextButtonProps) != null && t.onClick && a.nextButtonProps.onClick();
|
|
74
|
+
}, q = () => {
|
|
75
|
+
P(), U();
|
|
76
|
+
}, P = () => {
|
|
77
|
+
A(!1), K(), L("close");
|
|
78
|
+
}, g = (t) => {
|
|
79
|
+
const c = t.target;
|
|
80
|
+
if (c != null && c.isContentEditable) return;
|
|
81
|
+
switch (te(t)) {
|
|
82
|
+
case T.left:
|
|
83
|
+
t.preventDefault(), n.value > 0 && E();
|
|
84
|
+
break;
|
|
85
|
+
case T.right:
|
|
86
|
+
t.preventDefault(), b();
|
|
87
|
+
break;
|
|
88
|
+
}
|
|
89
|
+
};
|
|
90
|
+
return W(() => {
|
|
91
|
+
window.addEventListener("keydown", g);
|
|
92
|
+
}), X(() => {
|
|
93
|
+
window.removeEventListener("keydown", g);
|
|
94
|
+
}), (t, c) => (s(), d(S, null, [
|
|
95
|
+
$.value ? (s(), d("button", {
|
|
96
|
+
key: 0,
|
|
97
|
+
"aria-label": e(p)("el.tour.close"),
|
|
98
|
+
class: r(e(o).e("closebtn")),
|
|
99
|
+
type: "button",
|
|
100
|
+
onClick: P
|
|
101
|
+
}, [
|
|
102
|
+
Y(e(ee), {
|
|
103
|
+
class: r(e(o).e("close"))
|
|
104
|
+
}, {
|
|
105
|
+
default: y(() => [
|
|
106
|
+
(s(), f(N(R.value)))
|
|
107
|
+
]),
|
|
108
|
+
_: 1
|
|
109
|
+
}, 8, ["class"])
|
|
110
|
+
], 10, ie)) : C("", !0),
|
|
111
|
+
u("header", {
|
|
112
|
+
class: r([e(o).e("header"), { "show-close": e(h) }])
|
|
113
|
+
}, [
|
|
114
|
+
V(t.$slots, "header", {}, () => [
|
|
115
|
+
u("span", {
|
|
116
|
+
role: "heading",
|
|
117
|
+
class: r(e(o).e("title"))
|
|
118
|
+
}, v(i.title), 3)
|
|
119
|
+
])
|
|
120
|
+
], 2),
|
|
121
|
+
u("div", {
|
|
122
|
+
class: r(e(o).e("body"))
|
|
123
|
+
}, [
|
|
124
|
+
V(t.$slots, "default", {}, () => [
|
|
125
|
+
u("span", null, v(i.description), 1)
|
|
126
|
+
])
|
|
127
|
+
], 2),
|
|
128
|
+
u("footer", {
|
|
129
|
+
class: r(e(o).e("footer"))
|
|
130
|
+
}, [
|
|
131
|
+
u("div", {
|
|
132
|
+
class: r(e(o).b("indicators"))
|
|
133
|
+
}, [
|
|
134
|
+
e(B).indicators ? (s(), f(N(e(B).indicators), {
|
|
135
|
+
key: 0,
|
|
136
|
+
current: e(n),
|
|
137
|
+
total: e(m)
|
|
138
|
+
}, null, 8, ["current", "total"])) : (s(!0), d(S, { key: 1 }, Z(e(m), (l, G) => (s(), d("span", {
|
|
139
|
+
key: l,
|
|
140
|
+
class: r([e(o).b("indicator"), e(o).is("active", G === e(n))])
|
|
141
|
+
}, null, 2))), 128))
|
|
142
|
+
], 2),
|
|
143
|
+
u("div", {
|
|
144
|
+
class: r(e(o).b("buttons"))
|
|
145
|
+
}, [
|
|
146
|
+
e(n) > 0 ? (s(), f(e(D), I({
|
|
147
|
+
key: 0,
|
|
148
|
+
size: "small",
|
|
149
|
+
type: e(k)
|
|
150
|
+
}, w(i.prevButtonProps), { onClick: E }), {
|
|
151
|
+
default: y(() => {
|
|
152
|
+
var l;
|
|
153
|
+
return [
|
|
154
|
+
O(v(((l = i.prevButtonProps) == null ? void 0 : l.children) ?? e(p)("el.tour.previous")), 1)
|
|
155
|
+
];
|
|
156
|
+
}),
|
|
157
|
+
_: 1
|
|
158
|
+
}, 16, ["type"])) : C("", !0),
|
|
159
|
+
e(n) <= e(m) - 1 ? (s(), f(e(D), I({
|
|
160
|
+
key: 1,
|
|
161
|
+
size: "small",
|
|
162
|
+
type: e(k) === "primary" ? "default" : "primary"
|
|
163
|
+
}, w(i.nextButtonProps), { onClick: b }), {
|
|
164
|
+
default: y(() => {
|
|
165
|
+
var l;
|
|
166
|
+
return [
|
|
167
|
+
O(v(((l = i.nextButtonProps) == null ? void 0 : l.children) ?? (e(n) === e(m) - 1 ? e(p)("el.tour.finish") : e(p)("el.tour.next"))), 1)
|
|
168
|
+
];
|
|
169
|
+
}),
|
|
170
|
+
_: 1
|
|
171
|
+
}, 16, ["type"])) : C("", !0)
|
|
172
|
+
], 2)
|
|
173
|
+
], 2)
|
|
174
|
+
], 64));
|
|
175
|
+
}
|
|
176
|
+
});
|
|
177
|
+
export {
|
|
178
|
+
Ne as default
|
|
179
|
+
};
|
|
@@ -1,4 +1,15 @@
|
|
|
1
1
|
import type { Plugin } from 'vue';
|
|
2
|
-
import
|
|
3
|
-
|
|
2
|
+
import _EpTourStep from './EpTourStep.vue';
|
|
3
|
+
/**
|
|
4
|
+
* tour-step 自持 barrel(vendor-batch-3 产出)。
|
|
5
|
+
*
|
|
6
|
+
* 子项组件名取 `tour/constants.ts` 的 `TOUR_STEP_NAME`(值为 `'EpTourStep'`),
|
|
7
|
+
* 父组件 `steps.ts` 按同一常量过滤步骤 vnode。两侧不各自维护字面量,故改名
|
|
8
|
+
* 不会让识别再次失效。
|
|
9
|
+
*
|
|
10
|
+
* 不导出 `ElTourStep` 别名。
|
|
11
|
+
*/
|
|
12
|
+
export declare const EpTourStep: typeof _EpTourStep & Plugin;
|
|
4
13
|
export default EpTourStep;
|
|
14
|
+
export { tourStepEmits, tourStepProps } from './step';
|
|
15
|
+
export type { TourStepEmits, TourStepProps, TourStepPropsPublic, } from './step';
|
|
@@ -1,6 +1,12 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import
|
|
3
|
-
|
|
1
|
+
import { withInstall as t } from "../../utils/with-install.js";
|
|
2
|
+
import o from "./EpTourStep.vue.js";
|
|
3
|
+
import { tourStepEmits as i, tourStepProps as f } from "./step.js";
|
|
4
|
+
const e = t(
|
|
5
|
+
o,
|
|
6
|
+
"ep-tour-step"
|
|
7
|
+
);
|
|
4
8
|
export {
|
|
5
|
-
|
|
9
|
+
e as EpTourStep,
|
|
10
|
+
i as tourStepEmits,
|
|
11
|
+
f as tourStepProps
|
|
6
12
|
};
|
|
@@ -0,0 +1,120 @@
|
|
|
1
|
+
import type { CSSProperties, ExtractPublicPropTypes } from 'vue';
|
|
2
|
+
import type { IconPropType } from '@element-plus/utils';
|
|
3
|
+
import type { TourBtnProps, TourMask } from '../tour/types';
|
|
4
|
+
import type { TourContentProps } from '../tour/content';
|
|
5
|
+
export interface TourStepProps {
|
|
6
|
+
/**
|
|
7
|
+
* @description get the element the guide card points to. empty makes it show in center of screen
|
|
8
|
+
*/
|
|
9
|
+
target?: string | HTMLElement | (() => HTMLElement | null) | null;
|
|
10
|
+
/**
|
|
11
|
+
* @description the title of the tour content
|
|
12
|
+
*/
|
|
13
|
+
title?: string;
|
|
14
|
+
/**
|
|
15
|
+
* @description description
|
|
16
|
+
*/
|
|
17
|
+
description?: string;
|
|
18
|
+
/**
|
|
19
|
+
* @description whether to show a close button
|
|
20
|
+
*/
|
|
21
|
+
showClose?: boolean;
|
|
22
|
+
/**
|
|
23
|
+
* @description custom close icon, default is Close
|
|
24
|
+
*/
|
|
25
|
+
closeIcon?: IconPropType;
|
|
26
|
+
/**
|
|
27
|
+
* @description whether to show the arrow
|
|
28
|
+
*/
|
|
29
|
+
showArrow?: boolean;
|
|
30
|
+
/**
|
|
31
|
+
* @description position of the guide card relative to the target element
|
|
32
|
+
*/
|
|
33
|
+
placement?: TourContentProps['placement'];
|
|
34
|
+
/**
|
|
35
|
+
* @description whether to enable masking, change mask style and fill color by pass custom props
|
|
36
|
+
*/
|
|
37
|
+
mask?: TourMask;
|
|
38
|
+
/**
|
|
39
|
+
* @description custom style for content
|
|
40
|
+
*/
|
|
41
|
+
contentStyle?: CSSProperties;
|
|
42
|
+
/**
|
|
43
|
+
* @description properties of the previous button
|
|
44
|
+
*/
|
|
45
|
+
prevButtonProps?: TourBtnProps;
|
|
46
|
+
/**
|
|
47
|
+
* @description properties of the Next button
|
|
48
|
+
*/
|
|
49
|
+
nextButtonProps?: TourBtnProps;
|
|
50
|
+
/**
|
|
51
|
+
* @description support pass custom scrollIntoView options
|
|
52
|
+
*/
|
|
53
|
+
scrollIntoViewOptions?: boolean | ScrollIntoViewOptions;
|
|
54
|
+
/**
|
|
55
|
+
* @description type, affects the background color and text color
|
|
56
|
+
*/
|
|
57
|
+
type?: 'default' | 'primary';
|
|
58
|
+
}
|
|
59
|
+
/**
|
|
60
|
+
* @deprecated Removed after 3.0.0, Use `TourStepProps` instead.
|
|
61
|
+
*/
|
|
62
|
+
export declare const tourStepProps: {
|
|
63
|
+
target: {
|
|
64
|
+
readonly type: import("vue").PropType<import("@element-plus/utils").EpPropMergeType<(new (...args: any[]) => string | HTMLElement | (() => HTMLElement | null)) | (() => string | HTMLElement | (() => HTMLElement | null) | null) | (((new (...args: any[]) => string | HTMLElement | (() => HTMLElement | null)) | (() => string | HTMLElement | (() => HTMLElement | null) | null)) | null)[], unknown, unknown>>;
|
|
65
|
+
readonly required: false;
|
|
66
|
+
readonly validator: ((val: unknown) => boolean) | undefined;
|
|
67
|
+
__epPropKey: true;
|
|
68
|
+
};
|
|
69
|
+
title: StringConstructor;
|
|
70
|
+
description: StringConstructor;
|
|
71
|
+
showClose: import("@element-plus/utils").EpPropFinalized<BooleanConstructor, unknown, unknown, undefined, boolean>;
|
|
72
|
+
closeIcon: {
|
|
73
|
+
readonly type: import("vue").PropType<import("@element-plus/utils").EpPropMergeType<(new (...args: any[]) => (string | import("vue").Component) & {}) | (() => string | import("vue").Component) | (((new (...args: any[]) => (string | import("vue").Component) & {}) | (() => string | import("vue").Component)) | null)[], unknown, unknown>>;
|
|
74
|
+
readonly required: false;
|
|
75
|
+
readonly validator: ((val: unknown) => boolean) | undefined;
|
|
76
|
+
__epPropKey: true;
|
|
77
|
+
};
|
|
78
|
+
showArrow: import("@element-plus/utils").EpPropFinalized<BooleanConstructor, unknown, unknown, undefined, boolean>;
|
|
79
|
+
placement: import("@element-plus/utils").EpPropFinalized<(new (...args: any[]) => "left" | "right" | "bottom" | "top" | "top-start" | "top-end" | "bottom-start" | "bottom-end" | "right-start" | "right-end" | "left-start" | "left-end") | (() => import("@floating-ui/dom").Placement) | (((new (...args: any[]) => "left" | "right" | "bottom" | "top" | "top-start" | "top-end" | "bottom-start" | "bottom-end" | "right-start" | "right-end" | "left-start" | "left-end") | (() => import("@floating-ui/dom").Placement)) | null)[], "left" | "right" | "bottom" | "top" | "top-start" | "top-end" | "bottom-start" | "bottom-end" | "right-start" | "right-end" | "left-start" | "left-end", unknown, string, boolean>;
|
|
80
|
+
mask: import("@element-plus/utils").EpPropFinalized<(new (...args: any[]) => boolean | {
|
|
81
|
+
style?: CSSProperties;
|
|
82
|
+
color?: string;
|
|
83
|
+
}) | (() => TourMask) | (((new (...args: any[]) => boolean | {
|
|
84
|
+
style?: CSSProperties;
|
|
85
|
+
color?: string;
|
|
86
|
+
}) | (() => TourMask)) | null)[], unknown, unknown, undefined, boolean>;
|
|
87
|
+
contentStyle: {
|
|
88
|
+
readonly type: import("vue").PropType<CSSProperties>;
|
|
89
|
+
readonly required: false;
|
|
90
|
+
readonly validator: ((val: unknown) => boolean) | undefined;
|
|
91
|
+
__epPropKey: true;
|
|
92
|
+
};
|
|
93
|
+
prevButtonProps: {
|
|
94
|
+
readonly type: import("vue").PropType<TourBtnProps>;
|
|
95
|
+
readonly required: false;
|
|
96
|
+
readonly validator: ((val: unknown) => boolean) | undefined;
|
|
97
|
+
__epPropKey: true;
|
|
98
|
+
};
|
|
99
|
+
nextButtonProps: {
|
|
100
|
+
readonly type: import("vue").PropType<TourBtnProps>;
|
|
101
|
+
readonly required: false;
|
|
102
|
+
readonly validator: ((val: unknown) => boolean) | undefined;
|
|
103
|
+
__epPropKey: true;
|
|
104
|
+
};
|
|
105
|
+
scrollIntoViewOptions: import("@element-plus/utils").EpPropFinalized<(new (...args: any[]) => boolean | ScrollIntoViewOptions) | (() => boolean | ScrollIntoViewOptions) | (((new (...args: any[]) => boolean | ScrollIntoViewOptions) | (() => boolean | ScrollIntoViewOptions)) | null)[], unknown, unknown, undefined, boolean>;
|
|
106
|
+
type: {
|
|
107
|
+
readonly type: import("vue").PropType<import("@element-plus/utils").EpPropMergeType<(new (...args: any[]) => "default" | "primary") | (() => "default" | "primary") | (((new (...args: any[]) => "default" | "primary") | (() => "default" | "primary")) | null)[], unknown, unknown>>;
|
|
108
|
+
readonly required: false;
|
|
109
|
+
readonly validator: ((val: unknown) => boolean) | undefined;
|
|
110
|
+
__epPropKey: true;
|
|
111
|
+
};
|
|
112
|
+
};
|
|
113
|
+
/**
|
|
114
|
+
* @deprecated Removed after 3.0.0, Use `TourStepProps` instead.
|
|
115
|
+
*/
|
|
116
|
+
export type TourStepPropsPublic = ExtractPublicPropTypes<typeof tourStepProps>;
|
|
117
|
+
export declare const tourStepEmits: {
|
|
118
|
+
close: () => boolean;
|
|
119
|
+
};
|
|
120
|
+
export type TourStepEmits = typeof tourStepEmits;
|
|
@@ -0,0 +1,91 @@
|
|
|
1
|
+
import "@vue/shared";
|
|
2
|
+
import "lodash-unified";
|
|
3
|
+
import "@vueuse/core";
|
|
4
|
+
import { iconPropType as o } from "../../utils/vue/icon.js";
|
|
5
|
+
import "vue";
|
|
6
|
+
import { buildProps as e, definePropType as t } from "../../utils/vue/props/runtime.js";
|
|
7
|
+
import { tourContentProps as p } from "../tour/content.js";
|
|
8
|
+
const y = e({
|
|
9
|
+
/**
|
|
10
|
+
* @description get the element the guide card points to. empty makes it show in center of screen
|
|
11
|
+
*/
|
|
12
|
+
target: {
|
|
13
|
+
type: t([String, Object, Function])
|
|
14
|
+
},
|
|
15
|
+
/**
|
|
16
|
+
* @description the title of the tour content
|
|
17
|
+
*/
|
|
18
|
+
title: String,
|
|
19
|
+
/**
|
|
20
|
+
* @description description
|
|
21
|
+
*/
|
|
22
|
+
description: String,
|
|
23
|
+
/**
|
|
24
|
+
* @description whether to show a close button
|
|
25
|
+
*/
|
|
26
|
+
showClose: {
|
|
27
|
+
type: Boolean,
|
|
28
|
+
default: void 0
|
|
29
|
+
},
|
|
30
|
+
/**
|
|
31
|
+
* @description custom close icon, default is Close
|
|
32
|
+
*/
|
|
33
|
+
closeIcon: {
|
|
34
|
+
type: o
|
|
35
|
+
},
|
|
36
|
+
/**
|
|
37
|
+
* @description whether to show the arrow
|
|
38
|
+
*/
|
|
39
|
+
showArrow: {
|
|
40
|
+
type: Boolean,
|
|
41
|
+
default: void 0
|
|
42
|
+
},
|
|
43
|
+
/**
|
|
44
|
+
* @description position of the guide card relative to the target element
|
|
45
|
+
*/
|
|
46
|
+
placement: p.placement,
|
|
47
|
+
/**
|
|
48
|
+
* @description whether to enable masking, change mask style and fill color by pass custom props
|
|
49
|
+
*/
|
|
50
|
+
mask: {
|
|
51
|
+
type: t([Boolean, Object]),
|
|
52
|
+
default: void 0
|
|
53
|
+
},
|
|
54
|
+
/**
|
|
55
|
+
* @description custom style for content
|
|
56
|
+
*/
|
|
57
|
+
contentStyle: {
|
|
58
|
+
type: t([Object])
|
|
59
|
+
},
|
|
60
|
+
/**
|
|
61
|
+
* @description properties of the previous button
|
|
62
|
+
*/
|
|
63
|
+
prevButtonProps: {
|
|
64
|
+
type: t(Object)
|
|
65
|
+
},
|
|
66
|
+
/**
|
|
67
|
+
* @description properties of the Next button
|
|
68
|
+
*/
|
|
69
|
+
nextButtonProps: {
|
|
70
|
+
type: t(Object)
|
|
71
|
+
},
|
|
72
|
+
/**
|
|
73
|
+
* @description support pass custom scrollIntoView options
|
|
74
|
+
*/
|
|
75
|
+
scrollIntoViewOptions: {
|
|
76
|
+
type: t([Boolean, Object]),
|
|
77
|
+
default: void 0
|
|
78
|
+
},
|
|
79
|
+
/**
|
|
80
|
+
* @description type, affects the background color and text color
|
|
81
|
+
*/
|
|
82
|
+
type: {
|
|
83
|
+
type: t(String)
|
|
84
|
+
}
|
|
85
|
+
}), a = {
|
|
86
|
+
close: () => !0
|
|
87
|
+
};
|
|
88
|
+
export {
|
|
89
|
+
a as tourStepEmits,
|
|
90
|
+
y as tourStepProps
|
|
91
|
+
};
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import type { VNode } from 'vue';
|
|
2
|
+
import type { TransferDataItem, TransferDirection, TransferProps } from './transfer';
|
|
3
|
+
import type { TransferPanelInstance } from './transfer-panel';
|
|
4
|
+
declare const _default: <T extends TransferDataItem = TransferDataItem>(__VLS_props: NonNullable<Awaited<typeof __VLS_setup>>["props"], __VLS_ctx?: __VLS_PrettifyLocal<Pick<NonNullable<Awaited<typeof __VLS_setup>>, "attrs" | "emit" | "slots">>, __VLS_expose?: NonNullable<Awaited<typeof __VLS_setup>>["expose"], __VLS_setup?: Promise<{
|
|
5
|
+
props: __VLS_PrettifyLocal<Pick<Partial<{}> & Omit<{
|
|
6
|
+
readonly "onUpdate:modelValue"?: ((value: import("./transfer").TransferKey[]) => any) | undefined;
|
|
7
|
+
readonly onChange?: ((value: import("./transfer").TransferKey[], direction: TransferDirection, movedKeys: import("./transfer").TransferKey[]) => any) | undefined;
|
|
8
|
+
readonly "onLeft-check-change"?: ((value: import("./transfer").TransferKey[], movedKeys?: import("./transfer").TransferKey[] | undefined) => any) | undefined;
|
|
9
|
+
readonly "onRight-check-change"?: ((value: import("./transfer").TransferKey[], movedKeys?: import("./transfer").TransferKey[] | undefined) => any) | undefined;
|
|
10
|
+
} & import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, never>, "onChange" | "onUpdate:modelValue" | "onLeft-check-change" | "onRight-check-change"> & TransferProps<T> & Partial<{}>> & import("vue").PublicProps;
|
|
11
|
+
expose(exposed: import("vue").ShallowUnwrapRef<{
|
|
12
|
+
/** @description clear the filter keyword of a certain panel */
|
|
13
|
+
clearQuery: (which: TransferDirection) => void;
|
|
14
|
+
/** @description left panel ref */
|
|
15
|
+
leftPanel: import("vue").Ref<TransferPanelInstance | undefined, TransferPanelInstance | undefined>;
|
|
16
|
+
/** @description right panel ref */
|
|
17
|
+
rightPanel: import("vue").Ref<TransferPanelInstance | undefined, TransferPanelInstance | undefined>;
|
|
18
|
+
}>): void;
|
|
19
|
+
attrs: any;
|
|
20
|
+
slots: {
|
|
21
|
+
default?: (props: {
|
|
22
|
+
option: T;
|
|
23
|
+
}) => VNode[];
|
|
24
|
+
'left-empty'?: () => VNode[];
|
|
25
|
+
'left-footer'?: () => VNode[];
|
|
26
|
+
'right-empty'?: () => VNode[];
|
|
27
|
+
'right-footer'?: () => VNode[];
|
|
28
|
+
};
|
|
29
|
+
emit: ((event: "update:modelValue", value: import("./transfer").TransferKey[]) => void) & ((event: "change", value: import("./transfer").TransferKey[], direction: TransferDirection, movedKeys: import("./transfer").TransferKey[]) => void) & ((event: "left-check-change", value: import("./transfer").TransferKey[], movedKeys?: import("./transfer").TransferKey[] | undefined) => void) & ((event: "right-check-change", value: import("./transfer").TransferKey[], movedKeys?: import("./transfer").TransferKey[] | undefined) => void);
|
|
30
|
+
}>) => import("vue").VNode & {
|
|
31
|
+
__ctx?: Awaited<typeof __VLS_setup>;
|
|
32
|
+
};
|
|
33
|
+
export default _default;
|
|
34
|
+
type __VLS_PrettifyLocal<T> = {
|
|
35
|
+
[K in keyof T]: T[K];
|
|
36
|
+
} & {};
|
|
@@ -0,0 +1,195 @@
|
|
|
1
|
+
import { defineComponent as J, useSlots as K, reactive as W, ref as E, computed as s, watch as X, h as x, Comment as Y, openBlock as C, createElementBlock as b, normalizeClass as f, unref as e, createVNode as r, withCtx as o, renderSlot as c, createElementVNode as Z, toDisplayString as z, createCommentVNode as D } from "vue";
|
|
2
|
+
import { isEmpty as w, isUndefined as B } from "../../utils/types.js";
|
|
3
|
+
import "lodash-unified";
|
|
4
|
+
import "@vueuse/core";
|
|
5
|
+
import { NOOP as I } from "@vue/shared";
|
|
6
|
+
import { ArrowLeft as _, ArrowRight as ee } from "@element-plus/icons-vue";
|
|
7
|
+
import { useNamespace as te } from "../../hooks/use-namespace/index.js";
|
|
8
|
+
import { useLocale as le } from "../../hooks/use-locale/index.js";
|
|
9
|
+
import "../../hooks/use-size/index.js";
|
|
10
|
+
import "@popperjs/core";
|
|
11
|
+
import "../../hooks/use-z-index/index.js";
|
|
12
|
+
import "../../hooks/use-delayed-toggle/index.js";
|
|
13
|
+
import "../../hooks/use-aria/index.js";
|
|
14
|
+
import "../../hooks/use-model-toggle/index.js";
|
|
15
|
+
import "../../hooks/use-empty-values/index.js";
|
|
16
|
+
import { EpButton as N } from "../button/index.js";
|
|
17
|
+
import { ElIcon as V } from "../icon/index.js";
|
|
18
|
+
import "../form/index.js";
|
|
19
|
+
import { transferEmits as ae } from "./transfer.js";
|
|
20
|
+
import "./transfer-panel.js";
|
|
21
|
+
import { usePropsAlias as re } from "./composables/use-props-alias.js";
|
|
22
|
+
import { useCheckedChange as oe } from "./composables/use-checked-change.js";
|
|
23
|
+
import { useComputedData as ie } from "./composables/use-computed-data.js";
|
|
24
|
+
import { useMove as ne } from "./composables/use-move.js";
|
|
25
|
+
import $ from "./EpTransferPanel.vue.js";
|
|
26
|
+
import { useFormItem as se } from "../form/src/hooks/use-form-item.js";
|
|
27
|
+
const de = { key: 0 }, fe = { key: 0 }, Oe = /* @__PURE__ */ J({
|
|
28
|
+
name: "EpTransfer",
|
|
29
|
+
__name: "EpTransfer",
|
|
30
|
+
props: {
|
|
31
|
+
data: { default: () => [] },
|
|
32
|
+
titles: { default: () => [] },
|
|
33
|
+
buttonTexts: { default: () => [] },
|
|
34
|
+
filterPlaceholder: {},
|
|
35
|
+
filterMethod: {},
|
|
36
|
+
leftDefaultChecked: { default: () => [] },
|
|
37
|
+
rightDefaultChecked: { default: () => [] },
|
|
38
|
+
renderContent: {},
|
|
39
|
+
modelValue: { default: () => [] },
|
|
40
|
+
format: { default: () => ({}) },
|
|
41
|
+
filterable: { type: Boolean },
|
|
42
|
+
props: { default: () => ({
|
|
43
|
+
label: "label",
|
|
44
|
+
key: "key",
|
|
45
|
+
disabled: "disabled"
|
|
46
|
+
}) },
|
|
47
|
+
targetOrder: { default: "original" },
|
|
48
|
+
validateEvent: { type: Boolean, default: !0 },
|
|
49
|
+
virtualScroll: { type: Boolean, default: !1 },
|
|
50
|
+
itemSize: { default: 30 }
|
|
51
|
+
},
|
|
52
|
+
emits: ae,
|
|
53
|
+
setup(t, { expose: A, emit: M }) {
|
|
54
|
+
const a = t, v = M, u = K(), { t: m } = le(), i = te("transfer"), { formItem: n } = se(), d = W({
|
|
55
|
+
leftChecked: [],
|
|
56
|
+
rightChecked: []
|
|
57
|
+
}), g = re(a), { sourceData: L, targetData: O } = ie(a), { onSourceCheckedChange: R, onTargetCheckedChange: q } = oe(
|
|
58
|
+
d,
|
|
59
|
+
v
|
|
60
|
+
), { addToLeft: F, addToRight: Q } = ne(a, d, v), h = E(), p = E(), U = (l) => {
|
|
61
|
+
switch (l) {
|
|
62
|
+
case "left":
|
|
63
|
+
h.value.query = "";
|
|
64
|
+
break;
|
|
65
|
+
case "right":
|
|
66
|
+
p.value.query = "";
|
|
67
|
+
break;
|
|
68
|
+
}
|
|
69
|
+
}, y = s(() => a.buttonTexts.length === 2), j = s(
|
|
70
|
+
() => a.titles[0] || m("el.transfer.titles.0")
|
|
71
|
+
), G = s(
|
|
72
|
+
() => a.titles[1] || m("el.transfer.titles.1")
|
|
73
|
+
), T = s(
|
|
74
|
+
() => a.filterPlaceholder || m("el.transfer.filterPlaceholder")
|
|
75
|
+
);
|
|
76
|
+
X(
|
|
77
|
+
() => a.modelValue,
|
|
78
|
+
() => {
|
|
79
|
+
var l;
|
|
80
|
+
a.validateEvent && ((l = n == null ? void 0 : n.validate) == null || l.call(n, "change").catch(I));
|
|
81
|
+
}
|
|
82
|
+
);
|
|
83
|
+
const P = s(() => (l) => {
|
|
84
|
+
var S;
|
|
85
|
+
if (a.renderContent) return a.renderContent(x, l);
|
|
86
|
+
const k = (((S = u.default) == null ? void 0 : S.call(u, { option: l })) || []).filter(
|
|
87
|
+
(H) => H.type !== Y
|
|
88
|
+
);
|
|
89
|
+
return k.length ? k : x(
|
|
90
|
+
"span",
|
|
91
|
+
l[g.value.label] || l[g.value.key]
|
|
92
|
+
);
|
|
93
|
+
});
|
|
94
|
+
return A({
|
|
95
|
+
/** @description clear the filter keyword of a certain panel */
|
|
96
|
+
clearQuery: U,
|
|
97
|
+
/** @description left panel ref */
|
|
98
|
+
leftPanel: h,
|
|
99
|
+
/** @description right panel ref */
|
|
100
|
+
rightPanel: p
|
|
101
|
+
}), (l, k) => (C(), b("div", {
|
|
102
|
+
class: f(e(i).b())
|
|
103
|
+
}, [
|
|
104
|
+
r($, {
|
|
105
|
+
ref_key: "leftPanel",
|
|
106
|
+
ref: h,
|
|
107
|
+
data: e(L),
|
|
108
|
+
"option-render": P.value,
|
|
109
|
+
placeholder: T.value,
|
|
110
|
+
title: j.value,
|
|
111
|
+
filterable: t.filterable,
|
|
112
|
+
format: t.format,
|
|
113
|
+
"filter-method": t.filterMethod,
|
|
114
|
+
"default-checked": t.leftDefaultChecked,
|
|
115
|
+
props: a.props,
|
|
116
|
+
"virtual-scroll": t.virtualScroll,
|
|
117
|
+
"item-size": t.itemSize,
|
|
118
|
+
onCheckedChange: e(R)
|
|
119
|
+
}, {
|
|
120
|
+
empty: o(() => [
|
|
121
|
+
c(l.$slots, "left-empty")
|
|
122
|
+
]),
|
|
123
|
+
default: o(() => [
|
|
124
|
+
c(l.$slots, "left-footer")
|
|
125
|
+
]),
|
|
126
|
+
_: 3
|
|
127
|
+
}, 8, ["data", "option-render", "placeholder", "title", "filterable", "format", "filter-method", "default-checked", "props", "virtual-scroll", "item-size", "onCheckedChange"]),
|
|
128
|
+
Z("div", {
|
|
129
|
+
class: f(e(i).e("buttons"))
|
|
130
|
+
}, [
|
|
131
|
+
r(e(N), {
|
|
132
|
+
type: "primary",
|
|
133
|
+
class: f([e(i).e("button"), e(i).is("with-texts", y.value)]),
|
|
134
|
+
disabled: e(w)(d.rightChecked),
|
|
135
|
+
onClick: e(F)
|
|
136
|
+
}, {
|
|
137
|
+
default: o(() => [
|
|
138
|
+
r(e(V), null, {
|
|
139
|
+
default: o(() => [
|
|
140
|
+
r(e(_))
|
|
141
|
+
]),
|
|
142
|
+
_: 1
|
|
143
|
+
}),
|
|
144
|
+
e(B)(t.buttonTexts[0]) ? D("", !0) : (C(), b("span", de, z(t.buttonTexts[0]), 1))
|
|
145
|
+
]),
|
|
146
|
+
_: 1
|
|
147
|
+
}, 8, ["class", "disabled", "onClick"]),
|
|
148
|
+
r(e(N), {
|
|
149
|
+
type: "primary",
|
|
150
|
+
class: f([e(i).e("button"), e(i).is("with-texts", y.value)]),
|
|
151
|
+
disabled: e(w)(d.leftChecked),
|
|
152
|
+
onClick: e(Q)
|
|
153
|
+
}, {
|
|
154
|
+
default: o(() => [
|
|
155
|
+
e(B)(t.buttonTexts[1]) ? D("", !0) : (C(), b("span", fe, z(t.buttonTexts[1]), 1)),
|
|
156
|
+
r(e(V), null, {
|
|
157
|
+
default: o(() => [
|
|
158
|
+
r(e(ee))
|
|
159
|
+
]),
|
|
160
|
+
_: 1
|
|
161
|
+
})
|
|
162
|
+
]),
|
|
163
|
+
_: 1
|
|
164
|
+
}, 8, ["class", "disabled", "onClick"])
|
|
165
|
+
], 2),
|
|
166
|
+
r($, {
|
|
167
|
+
ref_key: "rightPanel",
|
|
168
|
+
ref: p,
|
|
169
|
+
data: e(O),
|
|
170
|
+
"option-render": P.value,
|
|
171
|
+
placeholder: T.value,
|
|
172
|
+
filterable: t.filterable,
|
|
173
|
+
format: t.format,
|
|
174
|
+
"filter-method": t.filterMethod,
|
|
175
|
+
title: G.value,
|
|
176
|
+
"default-checked": t.rightDefaultChecked,
|
|
177
|
+
props: a.props,
|
|
178
|
+
"virtual-scroll": t.virtualScroll,
|
|
179
|
+
"item-size": t.itemSize,
|
|
180
|
+
onCheckedChange: e(q)
|
|
181
|
+
}, {
|
|
182
|
+
empty: o(() => [
|
|
183
|
+
c(l.$slots, "right-empty")
|
|
184
|
+
]),
|
|
185
|
+
default: o(() => [
|
|
186
|
+
c(l.$slots, "right-footer")
|
|
187
|
+
]),
|
|
188
|
+
_: 3
|
|
189
|
+
}, 8, ["data", "option-render", "placeholder", "filterable", "format", "filter-method", "title", "default-checked", "props", "virtual-scroll", "item-size", "onCheckedChange"])
|
|
190
|
+
], 2));
|
|
191
|
+
}
|
|
192
|
+
});
|
|
193
|
+
export {
|
|
194
|
+
Oe as default
|
|
195
|
+
};
|