element-pe 2.14.2-2 → 2.14.2-4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.full.js +35 -111
- package/dist/index.full.min.js +8 -8
- package/dist/index.full.min.js.map +1 -1
- package/dist/index.full.min.mjs +4 -4
- package/dist/index.full.min.mjs.map +1 -1
- package/dist/index.full.mjs +35 -111
- package/dist/locale/af.js +1 -1
- package/dist/locale/af.min.js +1 -1
- package/dist/locale/af.min.mjs +1 -1
- package/dist/locale/af.mjs +1 -1
- package/dist/locale/ar-eg.js +1 -1
- package/dist/locale/ar-eg.min.js +1 -1
- package/dist/locale/ar-eg.min.mjs +1 -1
- package/dist/locale/ar-eg.mjs +1 -1
- package/dist/locale/ar.js +1 -1
- package/dist/locale/ar.min.js +1 -1
- package/dist/locale/ar.min.mjs +1 -1
- package/dist/locale/ar.mjs +1 -1
- package/dist/locale/az.js +1 -1
- package/dist/locale/az.min.js +1 -1
- package/dist/locale/az.min.mjs +1 -1
- package/dist/locale/az.mjs +1 -1
- package/dist/locale/bg.js +1 -1
- package/dist/locale/bg.min.js +1 -1
- package/dist/locale/bg.min.mjs +1 -1
- package/dist/locale/bg.mjs +1 -1
- package/dist/locale/bn.js +1 -1
- package/dist/locale/bn.min.js +1 -1
- package/dist/locale/bn.min.mjs +1 -1
- package/dist/locale/bn.mjs +1 -1
- package/dist/locale/ca.js +1 -1
- package/dist/locale/ca.min.js +1 -1
- package/dist/locale/ca.min.mjs +1 -1
- package/dist/locale/ca.mjs +1 -1
- package/dist/locale/ckb.js +1 -1
- package/dist/locale/ckb.min.js +1 -1
- package/dist/locale/ckb.min.mjs +1 -1
- package/dist/locale/ckb.mjs +1 -1
- package/dist/locale/cs.js +1 -1
- package/dist/locale/cs.min.js +1 -1
- package/dist/locale/cs.min.mjs +1 -1
- package/dist/locale/cs.mjs +1 -1
- package/dist/locale/da.js +1 -1
- package/dist/locale/da.min.js +1 -1
- package/dist/locale/da.min.mjs +1 -1
- package/dist/locale/da.mjs +1 -1
- package/dist/locale/de.js +1 -1
- package/dist/locale/de.min.js +1 -1
- package/dist/locale/de.min.mjs +1 -1
- package/dist/locale/de.mjs +1 -1
- package/dist/locale/el.js +1 -1
- package/dist/locale/el.min.js +1 -1
- package/dist/locale/el.min.mjs +1 -1
- package/dist/locale/el.mjs +1 -1
- package/dist/locale/en.js +1 -1
- package/dist/locale/en.min.js +1 -1
- package/dist/locale/en.min.mjs +1 -1
- package/dist/locale/en.mjs +1 -1
- package/dist/locale/eo.js +1 -1
- package/dist/locale/eo.min.js +1 -1
- package/dist/locale/eo.min.mjs +1 -1
- package/dist/locale/eo.mjs +1 -1
- package/dist/locale/es.js +1 -1
- package/dist/locale/es.min.js +1 -1
- package/dist/locale/es.min.mjs +1 -1
- package/dist/locale/es.mjs +1 -1
- package/dist/locale/et.js +1 -1
- package/dist/locale/et.min.js +1 -1
- package/dist/locale/et.min.mjs +1 -1
- package/dist/locale/et.mjs +1 -1
- package/dist/locale/eu.js +1 -1
- package/dist/locale/eu.min.js +1 -1
- package/dist/locale/eu.min.mjs +1 -1
- package/dist/locale/eu.mjs +1 -1
- package/dist/locale/fa.js +1 -1
- package/dist/locale/fa.min.js +1 -1
- package/dist/locale/fa.min.mjs +1 -1
- package/dist/locale/fa.mjs +1 -1
- package/dist/locale/fi.js +1 -1
- package/dist/locale/fi.min.js +1 -1
- package/dist/locale/fi.min.mjs +1 -1
- package/dist/locale/fi.mjs +1 -1
- package/dist/locale/fr.js +1 -1
- package/dist/locale/fr.min.js +1 -1
- package/dist/locale/fr.min.mjs +1 -1
- package/dist/locale/fr.mjs +1 -1
- package/dist/locale/he.js +1 -1
- package/dist/locale/he.min.js +1 -1
- package/dist/locale/he.min.mjs +1 -1
- package/dist/locale/he.mjs +1 -1
- package/dist/locale/hi.js +1 -1
- package/dist/locale/hi.min.js +1 -1
- package/dist/locale/hi.min.mjs +1 -1
- package/dist/locale/hi.mjs +1 -1
- package/dist/locale/hr.js +1 -1
- package/dist/locale/hr.min.js +1 -1
- package/dist/locale/hr.min.mjs +1 -1
- package/dist/locale/hr.mjs +1 -1
- package/dist/locale/hu.js +1 -1
- package/dist/locale/hu.min.js +1 -1
- package/dist/locale/hu.min.mjs +1 -1
- package/dist/locale/hu.mjs +1 -1
- package/dist/locale/hy-am.js +1 -1
- package/dist/locale/hy-am.min.js +1 -1
- package/dist/locale/hy-am.min.mjs +1 -1
- package/dist/locale/hy-am.mjs +1 -1
- package/dist/locale/id.js +1 -1
- package/dist/locale/id.min.js +1 -1
- package/dist/locale/id.min.mjs +1 -1
- package/dist/locale/id.mjs +1 -1
- package/dist/locale/it.js +1 -1
- package/dist/locale/it.min.js +1 -1
- package/dist/locale/it.min.mjs +1 -1
- package/dist/locale/it.mjs +1 -1
- package/dist/locale/ja.js +1 -1
- package/dist/locale/ja.min.js +1 -1
- package/dist/locale/ja.min.mjs +1 -1
- package/dist/locale/ja.mjs +1 -1
- package/dist/locale/kk.js +1 -1
- package/dist/locale/kk.min.js +1 -1
- package/dist/locale/kk.min.mjs +1 -1
- package/dist/locale/kk.mjs +1 -1
- package/dist/locale/km.js +1 -1
- package/dist/locale/km.min.js +1 -1
- package/dist/locale/km.min.mjs +1 -1
- package/dist/locale/km.mjs +1 -1
- package/dist/locale/ko.js +1 -1
- package/dist/locale/ko.min.js +1 -1
- package/dist/locale/ko.min.mjs +1 -1
- package/dist/locale/ko.mjs +1 -1
- package/dist/locale/ku.js +1 -1
- package/dist/locale/ku.min.js +1 -1
- package/dist/locale/ku.min.mjs +1 -1
- package/dist/locale/ku.mjs +1 -1
- package/dist/locale/ky.js +1 -1
- package/dist/locale/ky.min.js +1 -1
- package/dist/locale/ky.min.mjs +1 -1
- package/dist/locale/ky.mjs +1 -1
- package/dist/locale/lo.js +1 -1
- package/dist/locale/lo.min.js +1 -1
- package/dist/locale/lo.min.mjs +1 -1
- package/dist/locale/lo.mjs +1 -1
- package/dist/locale/lt.js +1 -1
- package/dist/locale/lt.min.js +1 -1
- package/dist/locale/lt.min.mjs +1 -1
- package/dist/locale/lt.mjs +1 -1
- package/dist/locale/lv.js +1 -1
- package/dist/locale/lv.min.js +1 -1
- package/dist/locale/lv.min.mjs +1 -1
- package/dist/locale/lv.mjs +1 -1
- package/dist/locale/mg.js +1 -1
- package/dist/locale/mg.min.js +1 -1
- package/dist/locale/mg.min.mjs +1 -1
- package/dist/locale/mg.mjs +1 -1
- package/dist/locale/mn.js +1 -1
- package/dist/locale/mn.min.js +1 -1
- package/dist/locale/mn.min.mjs +1 -1
- package/dist/locale/mn.mjs +1 -1
- package/dist/locale/ms.js +1 -1
- package/dist/locale/ms.min.js +1 -1
- package/dist/locale/ms.min.mjs +1 -1
- package/dist/locale/ms.mjs +1 -1
- package/dist/locale/my.js +1 -1
- package/dist/locale/my.min.js +1 -1
- package/dist/locale/my.min.mjs +1 -1
- package/dist/locale/my.mjs +1 -1
- package/dist/locale/nb-no.js +1 -1
- package/dist/locale/nb-no.min.js +1 -1
- package/dist/locale/nb-no.min.mjs +1 -1
- package/dist/locale/nb-no.mjs +1 -1
- package/dist/locale/nl.js +1 -1
- package/dist/locale/nl.min.js +1 -1
- package/dist/locale/nl.min.mjs +1 -1
- package/dist/locale/nl.mjs +1 -1
- package/dist/locale/no.js +1 -1
- package/dist/locale/no.min.js +1 -1
- package/dist/locale/no.min.mjs +1 -1
- package/dist/locale/no.mjs +1 -1
- package/dist/locale/pa.js +1 -1
- package/dist/locale/pa.min.js +1 -1
- package/dist/locale/pa.min.mjs +1 -1
- package/dist/locale/pa.mjs +1 -1
- package/dist/locale/pl.js +1 -1
- package/dist/locale/pl.min.js +1 -1
- package/dist/locale/pl.min.mjs +1 -1
- package/dist/locale/pl.mjs +1 -1
- package/dist/locale/pt-br.js +1 -1
- package/dist/locale/pt-br.min.js +1 -1
- package/dist/locale/pt-br.min.mjs +1 -1
- package/dist/locale/pt-br.mjs +1 -1
- package/dist/locale/pt.js +1 -1
- package/dist/locale/pt.min.js +1 -1
- package/dist/locale/pt.min.mjs +1 -1
- package/dist/locale/pt.mjs +1 -1
- package/dist/locale/ro.js +1 -1
- package/dist/locale/ro.min.js +1 -1
- package/dist/locale/ro.min.mjs +1 -1
- package/dist/locale/ro.mjs +1 -1
- package/dist/locale/ru.js +1 -1
- package/dist/locale/ru.min.js +1 -1
- package/dist/locale/ru.min.mjs +1 -1
- package/dist/locale/ru.mjs +1 -1
- package/dist/locale/sk.js +1 -1
- package/dist/locale/sk.min.js +1 -1
- package/dist/locale/sk.min.mjs +1 -1
- package/dist/locale/sk.mjs +1 -1
- package/dist/locale/sl.js +1 -1
- package/dist/locale/sl.min.js +1 -1
- package/dist/locale/sl.min.mjs +1 -1
- package/dist/locale/sl.mjs +1 -1
- package/dist/locale/sr.js +1 -1
- package/dist/locale/sr.min.js +1 -1
- package/dist/locale/sr.min.mjs +1 -1
- package/dist/locale/sr.mjs +1 -1
- package/dist/locale/sv.js +1 -1
- package/dist/locale/sv.min.js +1 -1
- package/dist/locale/sv.min.mjs +1 -1
- package/dist/locale/sv.mjs +1 -1
- package/dist/locale/sw.js +1 -1
- package/dist/locale/sw.min.js +1 -1
- package/dist/locale/sw.min.mjs +1 -1
- package/dist/locale/sw.mjs +1 -1
- package/dist/locale/ta.js +1 -1
- package/dist/locale/ta.min.js +1 -1
- package/dist/locale/ta.min.mjs +1 -1
- package/dist/locale/ta.mjs +1 -1
- package/dist/locale/te.js +1 -1
- package/dist/locale/te.min.js +1 -1
- package/dist/locale/te.min.mjs +1 -1
- package/dist/locale/te.mjs +1 -1
- package/dist/locale/th.js +1 -1
- package/dist/locale/th.min.js +1 -1
- package/dist/locale/th.min.mjs +1 -1
- package/dist/locale/th.mjs +1 -1
- package/dist/locale/tk.js +1 -1
- package/dist/locale/tk.min.js +1 -1
- package/dist/locale/tk.min.mjs +1 -1
- package/dist/locale/tk.mjs +1 -1
- package/dist/locale/tr.js +1 -1
- package/dist/locale/tr.min.js +1 -1
- package/dist/locale/tr.min.mjs +1 -1
- package/dist/locale/tr.mjs +1 -1
- package/dist/locale/ug-cn.js +1 -1
- package/dist/locale/ug-cn.min.js +1 -1
- package/dist/locale/ug-cn.min.mjs +1 -1
- package/dist/locale/ug-cn.mjs +1 -1
- package/dist/locale/uk.js +1 -1
- package/dist/locale/uk.min.js +1 -1
- package/dist/locale/uk.min.mjs +1 -1
- package/dist/locale/uk.mjs +1 -1
- package/dist/locale/uz-uz.js +1 -1
- package/dist/locale/uz-uz.min.js +1 -1
- package/dist/locale/uz-uz.min.mjs +1 -1
- package/dist/locale/uz-uz.mjs +1 -1
- package/dist/locale/vi.js +1 -1
- package/dist/locale/vi.min.js +1 -1
- package/dist/locale/vi.min.mjs +1 -1
- package/dist/locale/vi.mjs +1 -1
- package/dist/locale/zh-cn.js +1 -1
- package/dist/locale/zh-cn.min.js +1 -1
- package/dist/locale/zh-cn.min.mjs +1 -1
- package/dist/locale/zh-cn.mjs +1 -1
- package/dist/locale/zh-hk.js +1 -1
- package/dist/locale/zh-hk.min.js +1 -1
- package/dist/locale/zh-hk.min.mjs +1 -1
- package/dist/locale/zh-hk.mjs +1 -1
- package/dist/locale/zh-mo.js +1 -1
- package/dist/locale/zh-mo.min.js +1 -1
- package/dist/locale/zh-mo.min.mjs +1 -1
- package/dist/locale/zh-mo.mjs +1 -1
- package/dist/locale/zh-tw.js +1 -1
- package/dist/locale/zh-tw.min.js +1 -1
- package/dist/locale/zh-tw.min.mjs +1 -1
- package/dist/locale/zh-tw.mjs +1 -1
- package/es/component.mjs +4 -4
- package/es/components/affix/src/affix.d.ts +1 -1
- package/es/components/affix/src/affix.vue.d.ts +3 -3
- package/es/components/alert/src/alert.d.ts +1 -1
- package/es/components/alert/src/alert.vue.d.ts +2 -2
- package/es/components/anchor/src/anchor.d.ts +1 -1
- package/es/components/anchor/src/anchor.vue.d.ts +2 -2
- package/es/components/autocomplete/src/autocomplete.d.ts +4 -4
- package/es/components/autocomplete/src/autocomplete.vue.d.ts +3 -3
- package/es/components/avatar/src/avatar-group.d.ts +1 -1
- package/es/components/avatar/src/avatar.d.ts +1 -1
- package/es/components/backtop/src/backtop.vue.d.ts +1 -1
- package/es/components/badge/src/badge.vue.d.ts +1 -1
- package/es/components/button/src/button-group.d.ts +1 -1
- package/es/components/button/src/button-group.vue.d.ts +1 -1
- package/es/components/button/src/button.d.ts +1 -1
- package/es/components/button/src/button.vue.d.ts +3 -3
- package/es/components/button/src/use-button.d.ts +1 -1
- package/es/components/calendar/src/calendar.d.ts +1 -1
- package/es/components/carousel/src/carousel.vue.d.ts +3 -3
- package/es/components/cascader/src/cascader.d.ts +3 -3
- package/es/components/cascader/src/cascader.vue.d.ts +14 -14
- package/es/components/cascader/src/cascader.vue_vue_type_script_setup_true_lang.mjs +2 -2
- package/es/components/cascader-panel/src/index.vue_vue_type_script_setup_true_lang.mjs +1 -1
- package/es/components/checkbox/src/checkbox-button.vue.d.ts +3 -3
- package/es/components/checkbox/src/checkbox-group.vue.d.ts +2 -2
- package/es/components/checkbox/src/checkbox.d.ts +8 -8
- package/es/components/checkbox/src/checkbox.vue.d.ts +3 -3
- package/es/components/col/src/col.vue.d.ts +1 -1
- package/es/components/collapse/src/collapse.d.ts +1 -1
- package/es/components/color-picker/src/color-picker.vue.d.ts +9 -9
- package/es/components/color-picker/src/color-picker.vue_vue_type_script_setup_true_lang.mjs +1 -1
- package/es/components/color-picker-panel/src/color-picker-panel.vue.d.ts +1 -1
- package/es/components/config-provider/src/config-provider.d.ts +2 -2
- package/es/components/countdown/src/countdown.vue_vue_type_script_setup_true_lang.mjs +1 -1
- package/es/components/date-picker/src/date-picker.d.ts +13 -13
- package/es/components/date-picker/src/props.d.ts +1 -1
- package/es/components/date-picker-panel/src/composables/use-basic-date-table.d.ts +1 -1
- package/es/components/date-picker-panel/src/date-picker-com/panel-date-pick.vue.d.ts +1 -1
- package/es/components/date-picker-panel/src/date-picker-com/panel-date-pick.vue_vue_type_script_setup_true_lang.mjs +1 -1
- package/es/components/date-picker-panel/src/date-picker-com/panel-date-range.vue_vue_type_script_setup_true_lang.mjs +1 -1
- package/es/components/date-picker-panel/src/date-picker-panel.d.ts +2 -2
- package/es/components/date-picker-panel/src/panel-utils.d.ts +3 -3
- package/es/components/descriptions/src/description-item.d.ts +19 -19
- package/es/components/descriptions/src/description.vue.d.ts +1 -1
- package/es/components/dialog/src/dialog-content.vue.d.ts +1 -1
- package/es/components/dialog/src/dialog.vue.d.ts +4 -4
- package/es/components/divider/src/divider.d.ts +1 -1
- package/es/components/divider/src/divider.vue.d.ts +1 -1
- package/es/components/drawer/src/drawer.vue.d.ts +6 -6
- package/es/components/dropdown/src/dropdown-menu.vue.d.ts +1 -1
- package/es/components/dropdown/src/dropdown.d.ts +3 -3
- package/es/components/dropdown/src/dropdown.vue.d.ts +63 -63
- package/es/components/form/src/form-item.d.ts +1 -1
- package/es/components/form/src/form.d.ts +2 -2
- package/es/components/image/src/image.vue.d.ts +4 -4
- package/es/components/image-viewer/src/image-viewer.vue.d.ts +4 -4
- package/es/components/index.mjs +10 -10
- package/es/components/input/src/input.d.ts +3 -3
- package/es/components/input/src/input.vue.d.ts +7 -7
- package/es/components/input-number/src/input-number.d.ts +3 -3
- package/es/components/input-number/src/input-number.vue.d.ts +7 -7
- package/es/components/input-number/src/input-number.vue_vue_type_script_setup_true_lang.mjs +1 -1
- package/es/components/input-otp/src/input-otp.vue.d.ts +1 -1
- package/es/components/input-tag/src/input-tag.d.ts +2 -2
- package/es/components/input-tag/src/input-tag.vue.d.ts +11 -11
- package/es/components/link/src/link.d.ts +1 -1
- package/es/components/link/src/link.vue.d.ts +2 -2
- package/es/components/mention/src/mention.d.ts +4 -4
- package/es/components/mention/src/mention.vue.d.ts +3 -3
- package/es/components/menu/src/menu.d.ts +3 -3
- package/es/components/menu/src/menu.mjs +1 -1
- package/es/components/menu/src/sub-menu.d.ts +1 -1
- package/es/components/menu/src/utils/menu-item.mjs +1 -1
- package/es/components/menu/src/utils/submenu.mjs +1 -1
- package/es/components/message/src/instance.d.ts +1 -1
- package/es/components/message/src/message.d.ts +1 -1
- package/es/components/message/src/message.vue.d.ts +6 -6
- package/es/components/message-box/src/index.vue.d.ts +33 -33
- package/es/components/message-box/src/index.vue_vue_type_script_lang.mjs +1 -1
- package/es/components/notification/src/notification.d.ts +1 -1
- package/es/components/notification/src/notification.vue.d.ts +5 -5
- package/es/components/page-header/src/page-header.vue.d.ts +1 -1
- package/es/components/pagination/src/components/sizes.vue.d.ts +1 -1
- package/es/components/pagination/src/pagination.d.ts +3 -3
- package/es/components/popconfirm/src/popconfirm.d.ts +2 -2
- package/es/components/popconfirm/src/popconfirm.vue.d.ts +2 -2
- package/es/components/popover/src/popover.d.ts +1 -1
- package/es/components/popover/src/popover.vue.d.ts +8 -8
- package/es/components/popper/src/composables/use-content.d.ts +3 -3
- package/es/components/popper/src/content.vue.d.ts +5 -5
- package/es/components/popper/src/popper.d.ts +2 -2
- package/es/components/progress/src/progress.vue.d.ts +3 -3
- package/es/components/radio/src/radio-button.d.ts +3 -3
- package/es/components/radio/src/radio-button.vue.d.ts +1 -1
- package/es/components/radio/src/radio-group.vue.d.ts +4 -4
- package/es/components/radio/src/radio.d.ts +6 -6
- package/es/components/radio/src/radio.vue.d.ts +1 -1
- package/es/components/rate/src/rate.vue.d.ts +2 -2
- package/es/components/resizable-columns/index.d.ts +2 -2
- package/es/components/resizable-columns/src/resizable-column.vue.d.ts +1 -1
- package/es/components/result/src/result.vue.d.ts +1 -1
- package/es/components/row/src/row.d.ts +2 -2
- package/es/components/row/src/row.vue.d.ts +1 -1
- package/es/components/scrollbar/src/scrollbar.vue.d.ts +2 -2
- package/es/components/segmented/index.d.ts +1 -1
- package/es/components/segmented/src/segmented.d.ts +1 -1
- package/es/components/select/src/option.d.ts +2 -2
- package/es/components/select/src/option.vue.d.ts +5 -5
- package/es/components/select/src/select.d.ts +4 -4
- package/es/components/select/src/select.vue.d.ts +71 -71
- package/es/components/select/src/select.vue_vue_type_script_lang.mjs +1 -1
- package/es/components/select/src/useOption.d.ts +2 -2
- package/es/components/select/src/useSelect.d.ts +3 -3
- package/es/components/select-v2/src/defaults.d.ts +2 -2
- package/es/components/select-v2/src/select.vue.d.ts +54 -54
- package/es/components/select-v2/src/select.vue_vue_type_script_lang.mjs +1 -1
- package/es/components/slider/src/button.vue.d.ts +1 -1
- package/es/components/slider/src/slider.vue.d.ts +5 -5
- package/es/components/space/src/space.d.ts +3 -3
- package/es/components/splitter/src/split-bar.vue.d.ts +1 -1
- package/es/components/statistic/src/statistic.vue.d.ts +2 -2
- package/es/components/steps/src/item.vue.d.ts +1 -1
- package/es/components/steps/src/steps.vue.d.ts +1 -1
- package/es/components/switch/src/switch.vue.d.ts +2 -2
- package/es/components/table/src/filter-panel.vue.d.ts +49 -49
- package/es/components/table/src/store/helper.d.ts +0 -12
- package/es/components/table/src/store/index.d.ts +0 -24
- package/es/components/table/src/store/watcher.d.ts +0 -2
- package/es/components/table/src/store/watcher.mjs +0 -64
- package/es/components/table/src/store/watcher.mjs.map +1 -1
- package/es/components/table/src/table/defaults.d.ts +5 -5
- package/es/components/table/src/table/style-helper.d.ts +1 -1
- package/es/components/table/src/table/style-helper.mjs +0 -4
- package/es/components/table/src/table/style-helper.mjs.map +1 -1
- package/es/components/table/src/table-body/defaults.d.ts +1 -2
- package/es/components/table/src/table-body/defaults.mjs +1 -2
- package/es/components/table/src/table-body/defaults.mjs.map +1 -1
- package/es/components/table/src/table-body/index.mjs +1 -1
- package/es/components/table/src/table-body/render-helper.mjs +2 -11
- package/es/components/table/src/table-body/render-helper.mjs.map +1 -1
- package/es/components/table/src/table-body/styles-helper.mjs.map +1 -1
- package/es/components/table/src/table-column/defaults.d.ts +2 -2
- package/es/components/table/src/table-footer/index.d.ts +1 -1
- package/es/components/table/src/table-header/index.d.ts +10 -10
- package/es/components/table/src/table-header/index.mjs +1 -1
- package/es/components/table/src/table-header/index.mjs.map +1 -1
- package/es/components/table/src/table.mjs.map +1 -1
- package/es/components/table/src/table.vue.d.ts +4 -17
- package/es/components/table/src/table.vue_vue_type_script_setup_true_lang.mjs +5 -7
- package/es/components/table/src/table.vue_vue_type_script_setup_true_lang.mjs.map +1 -1
- package/es/components/tabs/src/tab-pane.vue.d.ts +1 -1
- package/es/components/tabs/src/tabs.d.ts +5 -5
- package/es/components/tag/src/tag.d.ts +1 -1
- package/es/components/time-picker/src/common/picker.vue.d.ts +15 -15
- package/es/components/time-picker/src/common/props.d.ts +1 -1
- package/es/components/time-picker/src/time-picker-com/basic-time-spinner.vue_vue_type_script_setup_true_lang.mjs +1 -1
- package/es/components/time-picker/src/time-picker.d.ts +13 -13
- package/es/components/time-select/src/time-select.vue.d.ts +7 -7
- package/es/components/timeline/src/timeline-item.d.ts +1 -1
- package/es/components/timeline/src/timeline-item.vue.d.ts +1 -1
- package/es/components/tooltip/src/content.vue.d.ts +4 -4
- package/es/components/tooltip/src/tooltip.d.ts +1 -1
- package/es/components/tooltip/src/tooltip.vue.d.ts +10 -10
- package/es/components/tour/src/content.d.ts +1 -1
- package/es/components/tour/src/content.vue.d.ts +1 -1
- package/es/components/tour/src/mask.vue.d.ts +1 -1
- package/es/components/tour/src/step.d.ts +1 -1
- package/es/components/tour/src/step.vue.d.ts +1 -1
- package/es/components/tour/src/tour.d.ts +1 -1
- package/es/components/tour/src/tour.vue.d.ts +4 -4
- package/es/components/tree/src/tree-node.vue.d.ts +9 -9
- package/es/components/tree/src/tree.d.ts +12 -0
- package/es/components/tree/src/tree.mjs +3 -1
- package/es/components/tree/src/tree.mjs.map +1 -1
- package/es/components/tree/src/tree.vue.d.ts +36 -12
- package/es/components/tree-select/src/tree-select-option.d.ts +5 -5
- package/es/components/tree-select/src/tree-select.vue.d.ts +54 -30
- package/es/components/tree-v2/src/composables/useTree.d.ts +6 -6
- package/es/components/upload/src/upload-content.vue.d.ts +1 -1
- package/es/components/upload/src/upload.vue.d.ts +1 -1
- package/es/components/virtual-list/src/builders/build-list.d.ts +3 -3
- package/es/components/virtual-list/src/components/dynamic-size-list.d.ts +3 -3
- package/es/components/virtual-list/src/components/fixed-size-list.d.ts +3 -3
- package/es/constants/index.mjs +2 -2
- package/es/directives/trap-focus/index.mjs +1 -1
- package/es/hooks/use-floating/index.d.ts +8 -8
- package/es/hooks/use-popper/index.d.ts +3 -3
- package/es/index.mjs +17 -17
- package/es/plugin.mjs +1 -1
- package/es/utils/vue/size.d.ts +1 -1
- package/es/version.d.ts +1 -1
- package/es/version.mjs +1 -1
- package/es/version.mjs.map +1 -1
- package/lib/component.js +111 -111
- package/lib/components/affix/src/affix.d.ts +1 -1
- package/lib/components/affix/src/affix.vue.d.ts +3 -3
- package/lib/components/alert/src/alert.d.ts +1 -1
- package/lib/components/alert/src/alert.vue.d.ts +2 -2
- package/lib/components/anchor/src/anchor.d.ts +1 -1
- package/lib/components/anchor/src/anchor.vue.d.ts +2 -2
- package/lib/components/autocomplete/src/autocomplete.d.ts +4 -4
- package/lib/components/autocomplete/src/autocomplete.vue.d.ts +3 -3
- package/lib/components/avatar/src/avatar-group.d.ts +1 -1
- package/lib/components/avatar/src/avatar.d.ts +1 -1
- package/lib/components/backtop/src/backtop.vue.d.ts +1 -1
- package/lib/components/badge/src/badge.vue.d.ts +1 -1
- package/lib/components/button/src/button-group.d.ts +1 -1
- package/lib/components/button/src/button-group.vue.d.ts +1 -1
- package/lib/components/button/src/button.d.ts +1 -1
- package/lib/components/button/src/button.vue.d.ts +3 -3
- package/lib/components/button/src/use-button.d.ts +1 -1
- package/lib/components/calendar/src/calendar.d.ts +1 -1
- package/lib/components/carousel/src/carousel.vue.d.ts +3 -3
- package/lib/components/cascader/src/cascader.d.ts +3 -3
- package/lib/components/cascader/src/cascader.vue.d.ts +14 -14
- package/lib/components/cascader/src/cascader.vue_vue_type_script_setup_true_lang.js +40 -40
- package/lib/components/cascader/src/cascader.vue_vue_type_script_setup_true_lang.js.map +1 -1
- package/lib/components/cascader-panel/src/index.vue_vue_type_script_setup_true_lang.js +12 -12
- package/lib/components/cascader-panel/src/index.vue_vue_type_script_setup_true_lang.js.map +1 -1
- package/lib/components/checkbox/src/checkbox-button.vue.d.ts +3 -3
- package/lib/components/checkbox/src/checkbox-group.vue.d.ts +2 -2
- package/lib/components/checkbox/src/checkbox.d.ts +8 -8
- package/lib/components/checkbox/src/checkbox.vue.d.ts +3 -3
- package/lib/components/col/src/col.vue.d.ts +1 -1
- package/lib/components/collapse/src/collapse.d.ts +1 -1
- package/lib/components/color-picker/src/color-picker.vue.d.ts +9 -9
- package/lib/components/color-picker/src/color-picker.vue_vue_type_script_setup_true_lang.js +18 -18
- package/lib/components/color-picker/src/color-picker.vue_vue_type_script_setup_true_lang.js.map +1 -1
- package/lib/components/color-picker-panel/src/color-picker-panel.vue.d.ts +1 -1
- package/lib/components/config-provider/src/config-provider.d.ts +2 -2
- package/lib/components/countdown/src/countdown.vue_vue_type_script_setup_true_lang.js +1 -1
- package/lib/components/date-picker/src/date-picker.d.ts +13 -13
- package/lib/components/date-picker/src/props.d.ts +1 -1
- package/lib/components/date-picker-panel/src/composables/use-basic-date-table.d.ts +1 -1
- package/lib/components/date-picker-panel/src/date-picker-com/panel-date-pick.vue.d.ts +1 -1
- package/lib/components/date-picker-panel/src/date-picker-com/panel-date-pick.vue_vue_type_script_setup_true_lang.js +18 -18
- package/lib/components/date-picker-panel/src/date-picker-com/panel-date-pick.vue_vue_type_script_setup_true_lang.js.map +1 -1
- package/lib/components/date-picker-panel/src/date-picker-com/panel-date-range.vue_vue_type_script_setup_true_lang.js +23 -23
- package/lib/components/date-picker-panel/src/date-picker-com/panel-date-range.vue_vue_type_script_setup_true_lang.js.map +1 -1
- package/lib/components/date-picker-panel/src/date-picker-panel.d.ts +2 -2
- package/lib/components/date-picker-panel/src/panel-utils.d.ts +3 -3
- package/lib/components/descriptions/src/description-item.d.ts +19 -19
- package/lib/components/descriptions/src/description.vue.d.ts +1 -1
- package/lib/components/dialog/src/dialog-content.vue.d.ts +1 -1
- package/lib/components/dialog/src/dialog.vue.d.ts +4 -4
- package/lib/components/divider/src/divider.d.ts +1 -1
- package/lib/components/divider/src/divider.vue.d.ts +1 -1
- package/lib/components/drawer/src/drawer.vue.d.ts +6 -6
- package/lib/components/dropdown/src/dropdown-menu.vue.d.ts +1 -1
- package/lib/components/dropdown/src/dropdown.d.ts +3 -3
- package/lib/components/dropdown/src/dropdown.vue.d.ts +63 -63
- package/lib/components/form/src/form-item.d.ts +1 -1
- package/lib/components/form/src/form.d.ts +2 -2
- package/lib/components/image/src/image.vue.d.ts +4 -4
- package/lib/components/image-viewer/src/image-viewer.vue.d.ts +4 -4
- package/lib/components/index.js +134 -134
- package/lib/components/input/src/input.d.ts +3 -3
- package/lib/components/input/src/input.vue.d.ts +7 -7
- package/lib/components/input-number/src/input-number.d.ts +3 -3
- package/lib/components/input-number/src/input-number.vue.d.ts +7 -7
- package/lib/components/input-number/src/input-number.vue_vue_type_script_setup_true_lang.js +12 -12
- package/lib/components/input-number/src/input-number.vue_vue_type_script_setup_true_lang.js.map +1 -1
- package/lib/components/input-otp/src/input-otp.vue.d.ts +1 -1
- package/lib/components/input-tag/src/input-tag.d.ts +2 -2
- package/lib/components/input-tag/src/input-tag.vue.d.ts +11 -11
- package/lib/components/link/src/link.d.ts +1 -1
- package/lib/components/link/src/link.vue.d.ts +2 -2
- package/lib/components/mention/src/mention.d.ts +4 -4
- package/lib/components/mention/src/mention.vue.d.ts +3 -3
- package/lib/components/menu/src/menu.d.ts +3 -3
- package/lib/components/menu/src/menu.js +7 -7
- package/lib/components/menu/src/menu.js.map +1 -1
- package/lib/components/menu/src/sub-menu.d.ts +1 -1
- package/lib/components/menu/src/utils/menu-item.js +11 -11
- package/lib/components/menu/src/utils/menu-item.js.map +1 -1
- package/lib/components/menu/src/utils/submenu.js +9 -9
- package/lib/components/menu/src/utils/submenu.js.map +1 -1
- package/lib/components/message/src/instance.d.ts +1 -1
- package/lib/components/message/src/message.d.ts +1 -1
- package/lib/components/message/src/message.vue.d.ts +6 -6
- package/lib/components/message-box/src/index.vue.d.ts +33 -33
- package/lib/components/message-box/src/index.vue_vue_type_script_lang.js +19 -19
- package/lib/components/message-box/src/index.vue_vue_type_script_lang.js.map +1 -1
- package/lib/components/notification/src/notification.d.ts +1 -1
- package/lib/components/notification/src/notification.vue.d.ts +5 -5
- package/lib/components/page-header/src/page-header.vue.d.ts +1 -1
- package/lib/components/pagination/src/components/sizes.vue.d.ts +1 -1
- package/lib/components/pagination/src/pagination.d.ts +3 -3
- package/lib/components/popconfirm/src/popconfirm.d.ts +2 -2
- package/lib/components/popconfirm/src/popconfirm.vue.d.ts +2 -2
- package/lib/components/popover/src/popover.d.ts +1 -1
- package/lib/components/popover/src/popover.vue.d.ts +8 -8
- package/lib/components/popper/src/composables/use-content.d.ts +3 -3
- package/lib/components/popper/src/content.vue.d.ts +5 -5
- package/lib/components/popper/src/popper.d.ts +2 -2
- package/lib/components/progress/src/progress.vue.d.ts +3 -3
- package/lib/components/radio/src/radio-button.d.ts +3 -3
- package/lib/components/radio/src/radio-button.vue.d.ts +1 -1
- package/lib/components/radio/src/radio-group.vue.d.ts +4 -4
- package/lib/components/radio/src/radio.d.ts +6 -6
- package/lib/components/radio/src/radio.vue.d.ts +1 -1
- package/lib/components/rate/src/rate.vue.d.ts +2 -2
- package/lib/components/resizable-columns/index.d.ts +2 -2
- package/lib/components/resizable-columns/src/resizable-column.vue.d.ts +1 -1
- package/lib/components/result/src/result.vue.d.ts +1 -1
- package/lib/components/row/src/row.d.ts +2 -2
- package/lib/components/row/src/row.vue.d.ts +1 -1
- package/lib/components/scrollbar/src/scrollbar.vue.d.ts +2 -2
- package/lib/components/segmented/index.d.ts +1 -1
- package/lib/components/segmented/src/segmented.d.ts +1 -1
- package/lib/components/select/src/option.d.ts +2 -2
- package/lib/components/select/src/option.vue.d.ts +5 -5
- package/lib/components/select/src/select.d.ts +4 -4
- package/lib/components/select/src/select.vue.d.ts +71 -71
- package/lib/components/select/src/select.vue_vue_type_script_lang.js +10 -10
- package/lib/components/select/src/select.vue_vue_type_script_lang.js.map +1 -1
- package/lib/components/select/src/useOption.d.ts +2 -2
- package/lib/components/select/src/useSelect.d.ts +3 -3
- package/lib/components/select-v2/src/defaults.d.ts +2 -2
- package/lib/components/select-v2/src/select.vue.d.ts +54 -54
- package/lib/components/select-v2/src/select.vue_vue_type_script_lang.js +10 -10
- package/lib/components/select-v2/src/select.vue_vue_type_script_lang.js.map +1 -1
- package/lib/components/slider/src/button.vue.d.ts +1 -1
- package/lib/components/slider/src/slider.vue.d.ts +5 -5
- package/lib/components/space/src/space.d.ts +3 -3
- package/lib/components/splitter/src/split-bar.vue.d.ts +1 -1
- package/lib/components/statistic/src/statistic.vue.d.ts +2 -2
- package/lib/components/steps/src/item.vue.d.ts +1 -1
- package/lib/components/steps/src/steps.vue.d.ts +1 -1
- package/lib/components/switch/src/switch.vue.d.ts +2 -2
- package/lib/components/table/src/filter-panel.vue.d.ts +49 -49
- package/lib/components/table/src/store/helper.d.ts +0 -12
- package/lib/components/table/src/store/index.d.ts +0 -24
- package/lib/components/table/src/store/watcher.d.ts +0 -2
- package/lib/components/table/src/store/watcher.js +0 -64
- package/lib/components/table/src/store/watcher.js.map +1 -1
- package/lib/components/table/src/table/defaults.d.ts +5 -5
- package/lib/components/table/src/table/style-helper.d.ts +1 -1
- package/lib/components/table/src/table/style-helper.js +0 -4
- package/lib/components/table/src/table/style-helper.js.map +1 -1
- package/lib/components/table/src/table-body/defaults.d.ts +1 -2
- package/lib/components/table/src/table-body/defaults.js +0 -2
- package/lib/components/table/src/table-body/defaults.js.map +1 -1
- package/lib/components/table/src/table-body/index.js +1 -1
- package/lib/components/table/src/table-body/render-helper.js +2 -11
- package/lib/components/table/src/table-body/render-helper.js.map +1 -1
- package/lib/components/table/src/table-body/styles-helper.js.map +1 -1
- package/lib/components/table/src/table-column/defaults.d.ts +2 -2
- package/lib/components/table/src/table-footer/index.d.ts +1 -1
- package/lib/components/table/src/table-header/index.d.ts +10 -10
- package/lib/components/table/src/table-header/index.js +1 -1
- package/lib/components/table/src/table-header/index.js.map +1 -1
- package/lib/components/table/src/table.js.map +1 -1
- package/lib/components/table/src/table.vue.d.ts +4 -17
- package/lib/components/table/src/table.vue_vue_type_script_setup_true_lang.js +13 -15
- package/lib/components/table/src/table.vue_vue_type_script_setup_true_lang.js.map +1 -1
- package/lib/components/tabs/src/tab-pane.vue.d.ts +1 -1
- package/lib/components/tabs/src/tabs.d.ts +5 -5
- package/lib/components/tag/src/tag.d.ts +1 -1
- package/lib/components/time-picker/src/common/picker.vue.d.ts +15 -15
- package/lib/components/time-picker/src/common/props.d.ts +1 -1
- package/lib/components/time-picker/src/time-picker-com/basic-time-spinner.vue_vue_type_script_setup_true_lang.js +10 -10
- package/lib/components/time-picker/src/time-picker-com/basic-time-spinner.vue_vue_type_script_setup_true_lang.js.map +1 -1
- package/lib/components/time-picker/src/time-picker.d.ts +13 -13
- package/lib/components/time-select/src/time-select.vue.d.ts +7 -7
- package/lib/components/timeline/src/timeline-item.d.ts +1 -1
- package/lib/components/timeline/src/timeline-item.vue.d.ts +1 -1
- package/lib/components/tooltip/src/content.vue.d.ts +4 -4
- package/lib/components/tooltip/src/tooltip.d.ts +1 -1
- package/lib/components/tooltip/src/tooltip.vue.d.ts +10 -10
- package/lib/components/tour/src/content.d.ts +1 -1
- package/lib/components/tour/src/content.vue.d.ts +1 -1
- package/lib/components/tour/src/mask.vue.d.ts +1 -1
- package/lib/components/tour/src/step.d.ts +1 -1
- package/lib/components/tour/src/step.vue.d.ts +1 -1
- package/lib/components/tour/src/tour.d.ts +1 -1
- package/lib/components/tour/src/tour.vue.d.ts +4 -4
- package/lib/components/tree/src/tree-node.vue.d.ts +9 -9
- package/lib/components/tree/src/tree.d.ts +12 -0
- package/lib/components/tree/src/tree.js +3 -1
- package/lib/components/tree/src/tree.js.map +1 -1
- package/lib/components/tree/src/tree.vue.d.ts +36 -12
- package/lib/components/tree-select/src/tree-select-option.d.ts +5 -5
- package/lib/components/tree-select/src/tree-select.vue.d.ts +54 -30
- package/lib/components/tree-v2/src/composables/useTree.d.ts +6 -6
- package/lib/components/upload/src/upload-content.vue.d.ts +1 -1
- package/lib/components/upload/src/upload.vue.d.ts +1 -1
- package/lib/components/virtual-list/src/builders/build-list.d.ts +3 -3
- package/lib/components/virtual-list/src/components/dynamic-size-list.d.ts +3 -3
- package/lib/components/virtual-list/src/components/fixed-size-list.d.ts +3 -3
- package/lib/constants/index.js +2 -2
- package/lib/directives/trap-focus/index.js +5 -5
- package/lib/directives/trap-focus/index.js.map +1 -1
- package/lib/hooks/use-floating/index.d.ts +8 -8
- package/lib/hooks/use-popper/index.d.ts +3 -3
- package/lib/index.js +278 -278
- package/lib/plugin.js +12 -12
- package/lib/plugin.js.map +1 -1
- package/lib/utils/vue/size.d.ts +1 -1
- package/lib/version.d.ts +1 -1
- package/lib/version.js +1 -1
- package/lib/version.js.map +1 -1
- package/package.json +1 -1
- package/web-types.json +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.vue_vue_type_script_setup_true_lang.js","names":[],"sources":["../../../../../../packages/components/cascader-panel/src/index.vue"],"sourcesContent":["<template>\n <div\n :class=\"[ns.b('panel'), ns.is('bordered', border)]\"\n @keydown=\"handleKeyDown\"\n >\n <el-cascader-menu\n v-for=\"(menu, index) in menus\"\n :key=\"index\"\n :ref=\"(item) => (menuList[index] = item as CascaderMenuInstance)\"\n :index=\"index\"\n :nodes=\"[...menu]\"\n :virtual-scroll=\"virtualScroll\"\n :item-size=\"itemSize\"\n :height=\"height\"\n >\n <template #empty>\n <slot name=\"empty\" />\n </template>\n </el-cascader-menu>\n </div>\n</template>\n\n<script lang=\"ts\" setup>\nimport {\n computed,\n nextTick,\n onBeforeUpdate,\n onMounted,\n provide,\n reactive,\n ref,\n useSlots,\n} from 'vue'\nimport { watch } from '../../config-provider'\nimport { cloneDeep, flattenDeep, isEqual } from 'lodash-unified'\nimport {\n castArray,\n focusNode,\n getEventCode,\n getSibling,\n isClient,\n isEmpty,\n scrollIntoView,\n unique,\n} from '@element-plus/utils'\nimport {\n CHANGE_EVENT,\n EVENT_CODE,\n UPDATE_MODEL_EVENT,\n} from '@element-plus/constants'\nimport { useNamespace } from '@element-plus/hooks'\nimport ElCascaderMenu from './menu.vue'\nimport Store from './store'\nimport Node from './node'\nimport {\n CASCADER_PANEL_HEIGHT,\n CASCADER_PANEL_ITEM_SIZE,\n cascaderPanelEmits,\n useCascaderConfig,\n} from './config'\nimport { checkNode, getMenuIndex, sortByOriginalOrder } from './utils'\nimport { CASCADER_PANEL_INJECTION_KEY } from './types'\n\nimport type {\n CascaderNode,\n CascaderNodeValue,\n CascaderOption,\n CascaderValue,\n ElCascaderPanelContext,\n} from './types'\nimport type { CascaderMenuInstance } from './instance'\nimport type { CascaderPanelProps } from './config'\n\ndefineOptions({\n name: 'ElCascaderPanel',\n})\n\nconst props = withDefaults(defineProps<CascaderPanelProps>(), {\n options: () => [],\n props: () => ({}),\n border: true,\n itemSize: CASCADER_PANEL_ITEM_SIZE,\n height: CASCADER_PANEL_HEIGHT,\n})\nconst emit = defineEmits(cascaderPanelEmits)\n\n// for interrupt sync check status in lazy mode\nlet manualChecked = false\n\nconst ns = useNamespace('cascader')\nconst config = useCascaderConfig(props)\nconst slots = useSlots()\n\nlet store: Store\nconst initialLoaded = ref(true)\nconst initialLoadedOnce = ref(false)\nconst menuList = ref<CascaderMenuInstance[]>([])\nconst checkedValue = ref<CascaderValue>()\nconst menus = ref<CascaderNode[][]>([])\nconst expandingNode = ref<CascaderNode>()\nconst checkedNodes = ref<CascaderNode[]>([])\n\nconst isHoverMenu = computed(() => config.value.expandTrigger === 'hover')\nconst renderLabelFn = computed(() => props.renderLabel || slots.default)\nconst virtualScroll = computed(() => props.virtualScroll)\nconst itemSize = computed(() => props.itemSize)\nconst height = computed(() => props.height)\n\nconst initStore = () => {\n const { options } = props\n const cfg = config.value\n\n manualChecked = false\n store = new Store(options, cfg)\n menus.value = [store.getNodes()]\n\n if (cfg.lazy && isEmpty(props.options)) {\n initialLoaded.value = false\n lazyLoad(undefined, (list) => {\n if (list) {\n store = new Store(list, cfg)\n menus.value = [store.getNodes()]\n }\n initialLoaded.value = true\n syncCheckedValue(false, true)\n })\n } else {\n syncCheckedValue(false, true)\n }\n}\n\nconst lazyLoad: ElCascaderPanelContext['lazyLoad'] = (node, cb) => {\n const cfg = config.value\n node! = node || new Node({}, cfg, undefined, true)\n node.loading = true\n\n const resolve = (dataList?: CascaderOption[]) => {\n const _node = node as Node\n const parent = _node.root ? null : _node\n _node.loading = false\n _node.loaded = true\n _node.childrenData = _node.childrenData || []\n dataList && store?.appendNodes(dataList, parent as Node)\n dataList && cb?.(dataList)\n if (node.level === 0) {\n initialLoadedOnce.value = true\n }\n }\n\n const reject = () => {\n node!.loading = false\n node!.loaded = false\n if (node!.level === 0) {\n initialLoaded.value = true\n }\n }\n\n cfg.lazyLoad(node, resolve, reject)\n}\n\nconst expandNode: ElCascaderPanelContext['expandNode'] = (node, silent) => {\n const { level } = node\n const newMenus = menus.value.slice(0, level)\n let newExpandingNode: CascaderNode\n\n if (node.isLeaf) {\n newExpandingNode = node.pathNodes[level - 2]\n } else {\n newExpandingNode = node\n newMenus.push(node.children)\n }\n\n if (expandingNode.value?.uid !== newExpandingNode?.uid) {\n expandingNode.value = node\n menus.value = newMenus\n !silent && emit('expand-change', node?.pathValues || [])\n }\n}\n\nconst handleCheckChange: ElCascaderPanelContext['handleCheckChange'] = (\n node,\n checked,\n emitClose = true\n) => {\n const { checkStrictly, multiple } = config.value\n const oldNode = checkedNodes.value[0]\n manualChecked = true\n\n !multiple && oldNode?.doCheck(false)\n node.doCheck(checked)\n calculateCheckedValue()\n emitClose && !multiple && !checkStrictly && emit('close')\n !emitClose && !multiple && expandParentNode(node)\n}\n\nconst expandParentNode = (node: Node | undefined) => {\n if (!node) return\n node = node.parent\n expandParentNode(node)\n node && expandNode(node)\n}\n\nconst getFlattedNodes = (leafOnly: boolean) => store?.getFlattedNodes(leafOnly)\n\nconst getCheckedNodes = (leafOnly: boolean) => {\n return getFlattedNodes(leafOnly)?.filter(({ checked }) => checked !== false)\n}\n\nconst clearCheckedNodes = () => {\n checkedNodes.value.forEach((node) => node.doCheck(false))\n calculateCheckedValue()\n menus.value = menus.value.slice(0, 1)\n expandingNode.value = undefined\n emit('expand-change', [])\n}\n\nconst calculateCheckedValue = () => {\n const { checkStrictly, multiple } = config.value\n const oldNodes = checkedNodes.value\n const newNodes = getCheckedNodes(!checkStrictly)!\n // ensure the original order\n const nodes = sortByOriginalOrder(oldNodes, newNodes)\n const values = nodes.map((node) => node.valueByOption)\n checkedNodes.value = nodes\n checkedValue.value = multiple ? values : (values[0] ?? null)\n}\n\nconst syncCheckedValue = (loaded = false, forced = false) => {\n const { modelValue } = props\n const { lazy, multiple, checkStrictly } = config.value\n const leafOnly = !checkStrictly\n\n if (\n !initialLoaded.value ||\n manualChecked ||\n (!forced && isEqual(modelValue, checkedValue.value))\n )\n return\n\n if (lazy && !loaded) {\n const values: CascaderNodeValue[] = unique(\n flattenDeep(castArray(modelValue as CascaderNodeValue[]))\n )\n const nodes = values\n .map((val) => store?.getNodeByValue(val))\n .filter((node) => !!node && !node.loaded && !node.loading) as Node[]\n\n if (nodes.length) {\n nodes.forEach((node) => {\n lazyLoad(node, () => syncCheckedValue(false, forced))\n })\n } else {\n syncCheckedValue(true, forced)\n }\n } else {\n const values = multiple ? castArray(modelValue) : [modelValue]\n const nodes = unique(\n values.map((val) =>\n store?.getNodeByValue(val as CascaderNodeValue, leafOnly)\n )\n ) as Node[]\n syncMenuState(nodes, forced)\n checkedValue.value = cloneDeep(modelValue ?? undefined)\n }\n}\n\nconst syncMenuState = (\n newCheckedNodes: CascaderNode[],\n reserveExpandingState = true\n) => {\n const { checkStrictly } = config.value\n const oldNodes = checkedNodes.value\n const newNodes = newCheckedNodes.filter(\n (node) => !!node && (checkStrictly || node.isLeaf)\n )\n const oldExpandingNode = store?.getSameNode(expandingNode.value!)\n const newExpandingNode =\n (reserveExpandingState && oldExpandingNode) || newNodes[0]\n\n if (newExpandingNode) {\n newExpandingNode.pathNodes.forEach((node) => expandNode(node, true))\n } else {\n expandingNode.value = undefined\n }\n\n oldNodes.forEach((node) => node.doCheck(false))\n reactive(newNodes).forEach((node) => node.doCheck(true))\n checkedNodes.value = newNodes\n nextTick(scrollToExpandingNode)\n}\n\nconst scrollToExpandingNode = () => {\n if (!isClient) return\n\n menuList.value.forEach((menu) => {\n const menuElement = menu?.$el\n if (menuElement) {\n // virtual scroll mode, use scrollToItem method\n if (virtualScroll.value) {\n const activeIndex = menu?.getActiveNodeIndex?.()\n if (activeIndex !== undefined && activeIndex >= 0) {\n menu?.scrollToItem?.(activeIndex)\n }\n } else {\n // logic for non-virtual scroll mode\n const container = menuElement.querySelector(\n `.${ns.namespace.value}-scrollbar__wrap`\n )\n let activeNode = menuElement.querySelector(\n `.${ns.b('node')}.in-active-path`\n )\n if (!activeNode) {\n const activeElements = menuElement.querySelectorAll(\n `.${ns.b('node')}.${ns.is('active')}`\n )\n activeNode = activeElements[activeElements.length - 1]\n }\n scrollIntoView(container, activeNode)\n }\n }\n })\n}\n\nconst handleKeyDown = (e: KeyboardEvent) => {\n const target = e.target as HTMLElement\n const code = getEventCode(e)\n\n switch (code) {\n case EVENT_CODE.up:\n case EVENT_CODE.down: {\n e.preventDefault()\n const distance = code === EVENT_CODE.up ? -1 : 1\n\n if (virtualScroll.value) {\n const menuIndex = getMenuIndex(target)\n const menu = menuList.value[menuIndex]\n if (menu) {\n // For virtual scroll, calculate the target index and use focusNodeAt\n const currentIndex = menu.getNodeIndexById(target.id)\n if (currentIndex >= 0) {\n const nodesInMenu = menus.value[menuIndex] ?? []\n const nodesCount = nodesInMenu.length\n // Find the next non-disabled node\n let targetIndex = currentIndex + distance\n while (targetIndex >= 0 && targetIndex < nodesCount) {\n if (!nodesInMenu[targetIndex].isDisabled) {\n menu.focusNodeAt(targetIndex)\n return\n }\n targetIndex += distance\n }\n }\n }\n }\n\n focusNode(\n getSibling(\n target,\n distance,\n `.${ns.b('node')}[tabindex=\"-1\"]`\n ) as HTMLElement\n )\n break\n }\n case EVENT_CODE.left: {\n e.preventDefault()\n const preMenu = menuList.value[getMenuIndex(target) - 1]\n const expandedNode = preMenu?.$el.querySelector(\n `.${ns.b('node')}[aria-expanded=\"true\"]`\n )\n focusNode(expandedNode)\n break\n }\n case EVENT_CODE.right: {\n e.preventDefault()\n const nextMenu = menuList.value[getMenuIndex(target) + 1]\n const firstNode = nextMenu?.$el.querySelector(\n `.${ns.b('node')}[tabindex=\"-1\"]`\n )\n focusNode(firstNode)\n break\n }\n case EVENT_CODE.enter:\n case EVENT_CODE.numpadEnter:\n checkNode(target)\n break\n }\n}\n\nprovide(\n CASCADER_PANEL_INJECTION_KEY,\n reactive({\n config,\n expandingNode,\n checkedNodes,\n isHoverMenu,\n initialLoaded,\n renderLabelFn,\n virtualScroll,\n itemSize,\n height,\n lazyLoad,\n expandNode,\n handleCheckChange,\n })\n)\n\nwatch(\n config,\n (newVal, oldVal) => {\n if (isEqual(newVal, oldVal)) return\n initStore()\n },\n {\n immediate: true,\n }\n)\n\nwatch(() => props.options, initStore, {\n deep: true,\n})\n\nwatch(\n () => props.modelValue,\n () => {\n manualChecked = false\n syncCheckedValue()\n },\n {\n deep: true,\n }\n)\n\nwatch(\n () => checkedValue.value,\n (val) => {\n if (!isEqual(val, props.modelValue)) {\n emit(UPDATE_MODEL_EVENT, val)\n emit(CHANGE_EVENT, val)\n }\n }\n)\n\nconst loadLazyRootNodes = () => {\n if (initialLoadedOnce.value || !initialLoaded.value) return\n initStore()\n}\n\nonBeforeUpdate(() => (menuList.value = []))\n\nonMounted(() => !isEmpty(props.modelValue) && syncCheckedValue())\n\ndefineExpose({\n menuList,\n menus,\n checkedNodes,\n handleKeyDown,\n handleCheckChange,\n getFlattedNodes,\n /**\n * @description get an array of currently selected node,(leafOnly) whether only return the leaf checked nodes, default is `false`\n */\n getCheckedNodes,\n /**\n * @description clear checked nodes\n */\n clearCheckedNodes,\n calculateCheckedValue,\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E;EAE1C,CAAA,GAAA,IAAA,UAAA,OAAgB,CAAC,cAAA,QAAQ,MAAM,UAAU,KAAK,iBAAiB,CAAC;EAEhE,SAAa;GACX;GACA;GACA;GACA;GACA;GACA;;;;GAIA;;;;GAIA;GACA;GACA;GACA;EACF,CAAC;;4DAncO,OAAA;IAjBH,QAAA,GAAA,IAAA,eAAA,CAAK,EAAA,GAAA,IAAA,MAAA,CAAG,EAAA,CAAE,CAAC,EAAC,OAAA,IAAA,GAAA,IAAA,MAAA,CAAW,EAAA,CAAE,CAAC,GAAE,YAAa,QAAA,MAAM,CAAA,CAAA;IAC/C,WAAS;8DAeS,IAAA,UAAA,OAAA,GAAA,IAAA,WAAA,CAZO,MAAA,QAAhB,MAAM,UAAK;sDAYF,aAAA,SAAA;KAXhB,KAAK;;KACL,MAAM,SAAU,SAAA,MAAS,SAAS;KAC3B;KACP,OAAK,CAAA,GAAM,IAAI;KACf,kBAAgB,cAAA;KAChB,aAAW,SAAA;KACX,QAAQ,OAAA;;KAEE,QAAA,GAAA,IAAA,QAAA,OACY,EAAA,GAAA,IAAA,WAAA,CAAA,KAAA,QAAA,OAAA,CAAA,CAAA"}
|
|
1
|
+
{"version":3,"file":"index.vue_vue_type_script_setup_true_lang.js","names":[],"sources":["../../../../../../packages/components/cascader-panel/src/index.vue"],"sourcesContent":["<template>\n <div\n :class=\"[ns.b('panel'), ns.is('bordered', border)]\"\n @keydown=\"handleKeyDown\"\n >\n <el-cascader-menu\n v-for=\"(menu, index) in menus\"\n :key=\"index\"\n :ref=\"(item) => (menuList[index] = item as CascaderMenuInstance)\"\n :index=\"index\"\n :nodes=\"[...menu]\"\n :virtual-scroll=\"virtualScroll\"\n :item-size=\"itemSize\"\n :height=\"height\"\n >\n <template #empty>\n <slot name=\"empty\" />\n </template>\n </el-cascader-menu>\n </div>\n</template>\n\n<script lang=\"ts\" setup>\nimport {\n computed,\n nextTick,\n onBeforeUpdate,\n onMounted,\n provide,\n reactive,\n ref,\n useSlots,\n} from 'vue'\nimport { watch } from '../../config-provider'\nimport { cloneDeep, flattenDeep, isEqual } from 'lodash-unified'\nimport {\n castArray,\n focusNode,\n getEventCode,\n getSibling,\n isClient,\n isEmpty,\n scrollIntoView,\n unique,\n} from '@element-plus/utils'\nimport {\n CHANGE_EVENT,\n EVENT_CODE,\n UPDATE_MODEL_EVENT,\n} from '@element-plus/constants'\nimport { useNamespace } from '@element-plus/hooks'\nimport ElCascaderMenu from './menu.vue'\nimport Store from './store'\nimport Node from './node'\nimport {\n CASCADER_PANEL_HEIGHT,\n CASCADER_PANEL_ITEM_SIZE,\n cascaderPanelEmits,\n useCascaderConfig,\n} from './config'\nimport { checkNode, getMenuIndex, sortByOriginalOrder } from './utils'\nimport { CASCADER_PANEL_INJECTION_KEY } from './types'\n\nimport type {\n CascaderNode,\n CascaderNodeValue,\n CascaderOption,\n CascaderValue,\n ElCascaderPanelContext,\n} from './types'\nimport type { CascaderMenuInstance } from './instance'\nimport type { CascaderPanelProps } from './config'\n\ndefineOptions({\n name: 'ElCascaderPanel',\n})\n\nconst props = withDefaults(defineProps<CascaderPanelProps>(), {\n options: () => [],\n props: () => ({}),\n border: true,\n itemSize: CASCADER_PANEL_ITEM_SIZE,\n height: CASCADER_PANEL_HEIGHT,\n})\nconst emit = defineEmits(cascaderPanelEmits)\n\n// for interrupt sync check status in lazy mode\nlet manualChecked = false\n\nconst ns = useNamespace('cascader')\nconst config = useCascaderConfig(props)\nconst slots = useSlots()\n\nlet store: Store\nconst initialLoaded = ref(true)\nconst initialLoadedOnce = ref(false)\nconst menuList = ref<CascaderMenuInstance[]>([])\nconst checkedValue = ref<CascaderValue>()\nconst menus = ref<CascaderNode[][]>([])\nconst expandingNode = ref<CascaderNode>()\nconst checkedNodes = ref<CascaderNode[]>([])\n\nconst isHoverMenu = computed(() => config.value.expandTrigger === 'hover')\nconst renderLabelFn = computed(() => props.renderLabel || slots.default)\nconst virtualScroll = computed(() => props.virtualScroll)\nconst itemSize = computed(() => props.itemSize)\nconst height = computed(() => props.height)\n\nconst initStore = () => {\n const { options } = props\n const cfg = config.value\n\n manualChecked = false\n store = new Store(options, cfg)\n menus.value = [store.getNodes()]\n\n if (cfg.lazy && isEmpty(props.options)) {\n initialLoaded.value = false\n lazyLoad(undefined, (list) => {\n if (list) {\n store = new Store(list, cfg)\n menus.value = [store.getNodes()]\n }\n initialLoaded.value = true\n syncCheckedValue(false, true)\n })\n } else {\n syncCheckedValue(false, true)\n }\n}\n\nconst lazyLoad: ElCascaderPanelContext['lazyLoad'] = (node, cb) => {\n const cfg = config.value\n node! = node || new Node({}, cfg, undefined, true)\n node.loading = true\n\n const resolve = (dataList?: CascaderOption[]) => {\n const _node = node as Node\n const parent = _node.root ? null : _node\n _node.loading = false\n _node.loaded = true\n _node.childrenData = _node.childrenData || []\n dataList && store?.appendNodes(dataList, parent as Node)\n dataList && cb?.(dataList)\n if (node.level === 0) {\n initialLoadedOnce.value = true\n }\n }\n\n const reject = () => {\n node!.loading = false\n node!.loaded = false\n if (node!.level === 0) {\n initialLoaded.value = true\n }\n }\n\n cfg.lazyLoad(node, resolve, reject)\n}\n\nconst expandNode: ElCascaderPanelContext['expandNode'] = (node, silent) => {\n const { level } = node\n const newMenus = menus.value.slice(0, level)\n let newExpandingNode: CascaderNode\n\n if (node.isLeaf) {\n newExpandingNode = node.pathNodes[level - 2]\n } else {\n newExpandingNode = node\n newMenus.push(node.children)\n }\n\n if (expandingNode.value?.uid !== newExpandingNode?.uid) {\n expandingNode.value = node\n menus.value = newMenus\n !silent && emit('expand-change', node?.pathValues || [])\n }\n}\n\nconst handleCheckChange: ElCascaderPanelContext['handleCheckChange'] = (\n node,\n checked,\n emitClose = true\n) => {\n const { checkStrictly, multiple } = config.value\n const oldNode = checkedNodes.value[0]\n manualChecked = true\n\n !multiple && oldNode?.doCheck(false)\n node.doCheck(checked)\n calculateCheckedValue()\n emitClose && !multiple && !checkStrictly && emit('close')\n !emitClose && !multiple && expandParentNode(node)\n}\n\nconst expandParentNode = (node: Node | undefined) => {\n if (!node) return\n node = node.parent\n expandParentNode(node)\n node && expandNode(node)\n}\n\nconst getFlattedNodes = (leafOnly: boolean) => store?.getFlattedNodes(leafOnly)\n\nconst getCheckedNodes = (leafOnly: boolean) => {\n return getFlattedNodes(leafOnly)?.filter(({ checked }) => checked !== false)\n}\n\nconst clearCheckedNodes = () => {\n checkedNodes.value.forEach((node) => node.doCheck(false))\n calculateCheckedValue()\n menus.value = menus.value.slice(0, 1)\n expandingNode.value = undefined\n emit('expand-change', [])\n}\n\nconst calculateCheckedValue = () => {\n const { checkStrictly, multiple } = config.value\n const oldNodes = checkedNodes.value\n const newNodes = getCheckedNodes(!checkStrictly)!\n // ensure the original order\n const nodes = sortByOriginalOrder(oldNodes, newNodes)\n const values = nodes.map((node) => node.valueByOption)\n checkedNodes.value = nodes\n checkedValue.value = multiple ? values : (values[0] ?? null)\n}\n\nconst syncCheckedValue = (loaded = false, forced = false) => {\n const { modelValue } = props\n const { lazy, multiple, checkStrictly } = config.value\n const leafOnly = !checkStrictly\n\n if (\n !initialLoaded.value ||\n manualChecked ||\n (!forced && isEqual(modelValue, checkedValue.value))\n )\n return\n\n if (lazy && !loaded) {\n const values: CascaderNodeValue[] = unique(\n flattenDeep(castArray(modelValue as CascaderNodeValue[]))\n )\n const nodes = values\n .map((val) => store?.getNodeByValue(val))\n .filter((node) => !!node && !node.loaded && !node.loading) as Node[]\n\n if (nodes.length) {\n nodes.forEach((node) => {\n lazyLoad(node, () => syncCheckedValue(false, forced))\n })\n } else {\n syncCheckedValue(true, forced)\n }\n } else {\n const values = multiple ? castArray(modelValue) : [modelValue]\n const nodes = unique(\n values.map((val) =>\n store?.getNodeByValue(val as CascaderNodeValue, leafOnly)\n )\n ) as Node[]\n syncMenuState(nodes, forced)\n checkedValue.value = cloneDeep(modelValue ?? undefined)\n }\n}\n\nconst syncMenuState = (\n newCheckedNodes: CascaderNode[],\n reserveExpandingState = true\n) => {\n const { checkStrictly } = config.value\n const oldNodes = checkedNodes.value\n const newNodes = newCheckedNodes.filter(\n (node) => !!node && (checkStrictly || node.isLeaf)\n )\n const oldExpandingNode = store?.getSameNode(expandingNode.value!)\n const newExpandingNode =\n (reserveExpandingState && oldExpandingNode) || newNodes[0]\n\n if (newExpandingNode) {\n newExpandingNode.pathNodes.forEach((node) => expandNode(node, true))\n } else {\n expandingNode.value = undefined\n }\n\n oldNodes.forEach((node) => node.doCheck(false))\n reactive(newNodes).forEach((node) => node.doCheck(true))\n checkedNodes.value = newNodes\n nextTick(scrollToExpandingNode)\n}\n\nconst scrollToExpandingNode = () => {\n if (!isClient) return\n\n menuList.value.forEach((menu) => {\n const menuElement = menu?.$el\n if (menuElement) {\n // virtual scroll mode, use scrollToItem method\n if (virtualScroll.value) {\n const activeIndex = menu?.getActiveNodeIndex?.()\n if (activeIndex !== undefined && activeIndex >= 0) {\n menu?.scrollToItem?.(activeIndex)\n }\n } else {\n // logic for non-virtual scroll mode\n const container = menuElement.querySelector(\n `.${ns.namespace.value}-scrollbar__wrap`\n )\n let activeNode = menuElement.querySelector(\n `.${ns.b('node')}.in-active-path`\n )\n if (!activeNode) {\n const activeElements = menuElement.querySelectorAll(\n `.${ns.b('node')}.${ns.is('active')}`\n )\n activeNode = activeElements[activeElements.length - 1]\n }\n scrollIntoView(container, activeNode)\n }\n }\n })\n}\n\nconst handleKeyDown = (e: KeyboardEvent) => {\n const target = e.target as HTMLElement\n const code = getEventCode(e)\n\n switch (code) {\n case EVENT_CODE.up:\n case EVENT_CODE.down: {\n e.preventDefault()\n const distance = code === EVENT_CODE.up ? -1 : 1\n\n if (virtualScroll.value) {\n const menuIndex = getMenuIndex(target)\n const menu = menuList.value[menuIndex]\n if (menu) {\n // For virtual scroll, calculate the target index and use focusNodeAt\n const currentIndex = menu.getNodeIndexById(target.id)\n if (currentIndex >= 0) {\n const nodesInMenu = menus.value[menuIndex] ?? []\n const nodesCount = nodesInMenu.length\n // Find the next non-disabled node\n let targetIndex = currentIndex + distance\n while (targetIndex >= 0 && targetIndex < nodesCount) {\n if (!nodesInMenu[targetIndex].isDisabled) {\n menu.focusNodeAt(targetIndex)\n return\n }\n targetIndex += distance\n }\n }\n }\n }\n\n focusNode(\n getSibling(\n target,\n distance,\n `.${ns.b('node')}[tabindex=\"-1\"]`\n ) as HTMLElement\n )\n break\n }\n case EVENT_CODE.left: {\n e.preventDefault()\n const preMenu = menuList.value[getMenuIndex(target) - 1]\n const expandedNode = preMenu?.$el.querySelector(\n `.${ns.b('node')}[aria-expanded=\"true\"]`\n )\n focusNode(expandedNode)\n break\n }\n case EVENT_CODE.right: {\n e.preventDefault()\n const nextMenu = menuList.value[getMenuIndex(target) + 1]\n const firstNode = nextMenu?.$el.querySelector(\n `.${ns.b('node')}[tabindex=\"-1\"]`\n )\n focusNode(firstNode)\n break\n }\n case EVENT_CODE.enter:\n case EVENT_CODE.numpadEnter:\n checkNode(target)\n break\n }\n}\n\nprovide(\n CASCADER_PANEL_INJECTION_KEY,\n reactive({\n config,\n expandingNode,\n checkedNodes,\n isHoverMenu,\n initialLoaded,\n renderLabelFn,\n virtualScroll,\n itemSize,\n height,\n lazyLoad,\n expandNode,\n handleCheckChange,\n })\n)\n\nwatch(\n config,\n (newVal, oldVal) => {\n if (isEqual(newVal, oldVal)) return\n initStore()\n },\n {\n immediate: true,\n }\n)\n\nwatch(() => props.options, initStore, {\n deep: true,\n})\n\nwatch(\n () => props.modelValue,\n () => {\n manualChecked = false\n syncCheckedValue()\n },\n {\n deep: true,\n }\n)\n\nwatch(\n () => checkedValue.value,\n (val) => {\n if (!isEqual(val, props.modelValue)) {\n emit(UPDATE_MODEL_EVENT, val)\n emit(CHANGE_EVENT, val)\n }\n }\n)\n\nconst loadLazyRootNodes = () => {\n if (initialLoadedOnce.value || !initialLoaded.value) return\n initStore()\n}\n\nonBeforeUpdate(() => (menuList.value = []))\n\nonMounted(() => !isEmpty(props.modelValue) && syncCheckedValue())\n\ndefineExpose({\n menuList,\n menus,\n checkedNodes,\n handleKeyDown,\n handleCheckChange,\n getFlattedNodes,\n /**\n * @description get an array of currently selected node,(leafOnly) whether only return the leaf checked nodes, default is `false`\n */\n getCheckedNodes,\n /**\n * @description clear checked nodes\n */\n clearCheckedNodes,\n calculateCheckedValue,\n scrollToExpandingNode,\n loadLazyRootNodes,\n})\n</script>\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;EA6EA,MAAM,QAAQ;EAOd,MAAM,OAAO;EAGb,IAAI,gBAAgB;EAEpB,MAAM,KAAK,cAAA,aAAa,UAAU;EAClC,MAAM,SAAS,eAAA,kBAAkB,KAAK;EACtC,MAAM,SAAA,GAAA,IAAA,SAAA,CAAiB;EAEvB,IAAI;EACJ,MAAM,iBAAA,GAAA,IAAA,IAAA,CAAoB,IAAI;EAC9B,MAAM,qBAAA,GAAA,IAAA,IAAA,CAAwB,KAAK;EACnC,MAAM,YAAA,GAAA,IAAA,IAAA,CAAuC,CAAC,CAAC;EAC/C,MAAM,gBAAA,GAAA,IAAA,IAAA,CAAkC;EACxC,MAAM,SAAA,GAAA,IAAA,IAAA,CAA8B,CAAC,CAAC;EACtC,MAAM,iBAAA,GAAA,IAAA,IAAA,CAAkC;EACxC,MAAM,gBAAA,GAAA,IAAA,IAAA,CAAmC,CAAC,CAAC;EAE3C,MAAM,eAAA,GAAA,IAAA,SAAA,OAA6B,OAAO,MAAM,kBAAkB,OAAO;EACzE,MAAM,iBAAA,GAAA,IAAA,SAAA,OAA+B,MAAM,eAAe,MAAM,OAAO;EACvE,MAAM,iBAAA,GAAA,IAAA,SAAA,OAA+B,MAAM,aAAa;EACxD,MAAM,YAAA,GAAA,IAAA,SAAA,OAA0B,MAAM,QAAQ;EAC9C,MAAM,UAAA,GAAA,IAAA,SAAA,OAAwB,MAAM,MAAM;EAE1C,MAAM,kBAAkB;GACtB,MAAM,EAAE,YAAY;GACpB,MAAM,MAAM,OAAO;GAEnB,gBAAgB;GAChB,QAAQ,IAAI,cAAA,QAAM,SAAS,GAAG;GAC9B,MAA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F,CACF;EAEA,MAAM,0BAA0B;GAC9B,IAAI,kBAAkB,SAAS,CAAC,cAAc,OAAO;GACrD,UAAU;EACZ;EAEA,CAAA,GAAA,IAAA,eAAA,OAAsB,SAAS,QAAQ,CAAC,CAAE;EAE1C,CAAA,GAAA,IAAA,UAAA,OAAgB,CAAC,cAAA,QAAQ,MAAM,UAAU,KAAK,iBAAiB,CAAC;EAEhE,SAAa;GACX;GACA;GACA;GACA;GACA;GACA;;;;GAIA;;;;GAIA;GACA;GACA;GACA;EACF,CAAC;;4DAncO,OAAA;IAjBH,QAAA,GAAA,IAAA,eAAA,CAAK,EAAA,GAAA,IAAA,MAAA,CAAG,EAAA,CAAE,CAAC,EAAC,OAAA,IAAA,GAAA,IAAA,MAAA,CAAW,EAAA,CAAE,CAAC,GAAE,YAAa,QAAA,MAAM,CAAA,CAAA;IAC/C,WAAS;8DAeS,IAAA,UAAA,OAAA,GAAA,IAAA,WAAA,CAZO,MAAA,QAAhB,MAAM,UAAK;sDAYF,aAAA,SAAA;KAXhB,KAAK;;KACL,MAAM,SAAU,SAAA,MAAS,SAAS;KAC3B;KACP,OAAK,CAAA,GAAM,IAAI;KACf,kBAAgB,cAAA;KAChB,aAAW,SAAA;KACX,QAAQ,OAAA;;KAEE,QAAA,GAAA,IAAA,QAAA,OACY,EAAA,GAAA,IAAA,WAAA,CAAA,KAAA,QAAA,OAAA,CAAA,CAAA"}
|
|
@@ -11,11 +11,11 @@ declare const __VLS_base: import("vue").DefineComponent<CheckboxProps, {}, {}, {
|
|
|
11
11
|
"onUpdate:modelValue"?: ((val: CheckboxValueType) => any) | undefined;
|
|
12
12
|
onChange?: ((val: CheckboxValueType) => any) | undefined;
|
|
13
13
|
}>, {
|
|
14
|
-
id: string;
|
|
15
|
-
disabled: boolean;
|
|
16
14
|
modelValue: number | string | boolean;
|
|
17
|
-
validateEvent: boolean;
|
|
18
15
|
name: string;
|
|
16
|
+
disabled: boolean;
|
|
17
|
+
id: string;
|
|
18
|
+
validateEvent: boolean;
|
|
19
19
|
value: string | boolean | number | object;
|
|
20
20
|
label: string | boolean | number | object;
|
|
21
21
|
trueValue: string | number;
|
|
@@ -18,10 +18,10 @@ declare const __VLS_base: import("vue").DefineComponent<CheckboxGroupProps, {},
|
|
|
18
18
|
disabled?: string;
|
|
19
19
|
};
|
|
20
20
|
type: "checkbox" | "button";
|
|
21
|
-
disabled: boolean;
|
|
22
21
|
modelValue: CheckboxGroupValueType;
|
|
23
|
-
|
|
22
|
+
disabled: boolean;
|
|
24
23
|
tag: string;
|
|
24
|
+
validateEvent: boolean;
|
|
25
25
|
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
26
26
|
declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
|
|
27
27
|
declare const _default: typeof __VLS_export;
|
|
@@ -84,21 +84,21 @@ declare const checkboxProps: {
|
|
|
84
84
|
* @description binding value
|
|
85
85
|
*/
|
|
86
86
|
modelValue: {
|
|
87
|
-
type: (BooleanConstructor |
|
|
87
|
+
type: (BooleanConstructor | StringConstructor | NumberConstructor)[];
|
|
88
88
|
default: undefined;
|
|
89
89
|
};
|
|
90
90
|
/**
|
|
91
91
|
* @description label of the Checkbox when used inside a `checkbox-group`
|
|
92
92
|
*/
|
|
93
93
|
label: {
|
|
94
|
-
type: (BooleanConstructor | ObjectConstructor |
|
|
94
|
+
type: (BooleanConstructor | ObjectConstructor | StringConstructor | NumberConstructor)[];
|
|
95
95
|
default: undefined;
|
|
96
96
|
};
|
|
97
97
|
/**
|
|
98
98
|
* @description value of the Checkbox when used inside a `checkbox-group`
|
|
99
99
|
*/
|
|
100
100
|
value: {
|
|
101
|
-
type: (BooleanConstructor | ObjectConstructor |
|
|
101
|
+
type: (BooleanConstructor | ObjectConstructor | StringConstructor | NumberConstructor)[];
|
|
102
102
|
default: undefined;
|
|
103
103
|
};
|
|
104
104
|
/**
|
|
@@ -134,14 +134,14 @@ declare const checkboxProps: {
|
|
|
134
134
|
* @description value of the Checkbox if it's checked
|
|
135
135
|
*/
|
|
136
136
|
trueValue: {
|
|
137
|
-
type: (
|
|
137
|
+
type: (StringConstructor | NumberConstructor)[];
|
|
138
138
|
default: undefined;
|
|
139
139
|
};
|
|
140
140
|
/**
|
|
141
141
|
* @description value of the Checkbox if it's not checked
|
|
142
142
|
*/
|
|
143
143
|
falseValue: {
|
|
144
|
-
type: (
|
|
144
|
+
type: (StringConstructor | NumberConstructor)[];
|
|
145
145
|
default: undefined;
|
|
146
146
|
};
|
|
147
147
|
/**
|
|
@@ -149,7 +149,7 @@ declare const checkboxProps: {
|
|
|
149
149
|
* @description value of the Checkbox if it's checked
|
|
150
150
|
*/
|
|
151
151
|
trueLabel: {
|
|
152
|
-
type: (
|
|
152
|
+
type: (StringConstructor | NumberConstructor)[];
|
|
153
153
|
default: undefined;
|
|
154
154
|
};
|
|
155
155
|
/**
|
|
@@ -157,7 +157,7 @@ declare const checkboxProps: {
|
|
|
157
157
|
* @description value of the Checkbox if it's not checked
|
|
158
158
|
*/
|
|
159
159
|
falseLabel: {
|
|
160
|
-
type: (
|
|
160
|
+
type: (StringConstructor | NumberConstructor)[];
|
|
161
161
|
default: undefined;
|
|
162
162
|
};
|
|
163
163
|
/**
|
|
@@ -183,7 +183,7 @@ declare const checkboxProps: {
|
|
|
183
183
|
/**
|
|
184
184
|
* @description input tabindex
|
|
185
185
|
*/
|
|
186
|
-
tabindex: (
|
|
186
|
+
tabindex: (StringConstructor | NumberConstructor)[];
|
|
187
187
|
/**
|
|
188
188
|
* @description whether to trigger form validation
|
|
189
189
|
*/
|
|
@@ -11,11 +11,11 @@ declare const __VLS_base: import("vue").DefineComponent<CheckboxProps, {}, {}, {
|
|
|
11
11
|
"onUpdate:modelValue"?: ((val: CheckboxValueType) => any) | undefined;
|
|
12
12
|
onChange?: ((val: CheckboxValueType) => any) | undefined;
|
|
13
13
|
}>, {
|
|
14
|
-
id: string;
|
|
15
|
-
disabled: boolean;
|
|
16
14
|
modelValue: number | string | boolean;
|
|
17
|
-
validateEvent: boolean;
|
|
18
15
|
name: string;
|
|
16
|
+
disabled: boolean;
|
|
17
|
+
id: string;
|
|
18
|
+
validateEvent: boolean;
|
|
19
19
|
value: string | boolean | number | object;
|
|
20
20
|
label: string | boolean | number | object;
|
|
21
21
|
trueValue: string | number;
|
|
@@ -5,10 +5,10 @@ type __VLS_Slots = {} & {
|
|
|
5
5
|
default?: (props: typeof __VLS_8) => any;
|
|
6
6
|
};
|
|
7
7
|
declare const __VLS_base: import("vue").DefineComponent<ColProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<ColProps> & Readonly<{}>, {
|
|
8
|
-
offset: number;
|
|
9
8
|
push: number;
|
|
10
9
|
tag: string;
|
|
11
10
|
span: number;
|
|
11
|
+
offset: number;
|
|
12
12
|
pull: number;
|
|
13
13
|
xs: ColSize;
|
|
14
14
|
sm: ColSize;
|
|
@@ -31,7 +31,7 @@ interface CollapseProps {
|
|
|
31
31
|
declare const collapseProps: {
|
|
32
32
|
readonly accordion: BooleanConstructor;
|
|
33
33
|
readonly modelValue: EpPropFinalized<(new (...args: any[]) => string | number | CollapseActiveName[]) | (() => CollapseModelValue) | (((new (...args: any[]) => string | number | CollapseActiveName[]) | (() => CollapseModelValue)) | null)[], unknown, unknown, () => [], boolean>;
|
|
34
|
-
readonly expandIconPosition: EpPropFinalized<(new (...args: any[]) => "
|
|
34
|
+
readonly expandIconPosition: EpPropFinalized<(new (...args: any[]) => "right" | "left") | (() => CollapseIconPositionType) | (((new (...args: any[]) => "right" | "left") | (() => CollapseIconPositionType)) | null)[], unknown, unknown, "right", boolean>;
|
|
35
35
|
readonly beforeCollapse: {
|
|
36
36
|
readonly type: import("vue").PropType<(name: CollapseActiveName) => Awaitable<boolean>>;
|
|
37
37
|
readonly required: false;
|
|
@@ -32,30 +32,30 @@ declare const __VLS_base: import("vue").DefineComponent<ColorPickerProps, {
|
|
|
32
32
|
*/
|
|
33
33
|
blur: typeof blur;
|
|
34
34
|
}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
35
|
+
clear: () => void;
|
|
35
36
|
"update:modelValue": (val: string | null) => void;
|
|
36
37
|
change: (val: string | null) => void;
|
|
37
|
-
|
|
38
|
+
activeChange: (val: string | null) => void;
|
|
38
39
|
focus: (evt: FocusEvent) => void;
|
|
39
40
|
blur: (evt: FocusEvent) => void;
|
|
40
|
-
activeChange: (val: string | null) => void;
|
|
41
41
|
}, string, import("vue").PublicProps, Readonly<ColorPickerProps> & Readonly<{
|
|
42
|
+
onClear?: (() => any) | undefined;
|
|
42
43
|
"onUpdate:modelValue"?: ((val: string | null) => any) | undefined;
|
|
43
44
|
onChange?: ((val: string | null) => any) | undefined;
|
|
44
|
-
|
|
45
|
+
onActiveChange?: ((val: string | null) => any) | undefined;
|
|
45
46
|
onFocus?: ((evt: FocusEvent) => any) | undefined;
|
|
46
47
|
onBlur?: ((evt: FocusEvent) => any) | undefined;
|
|
47
|
-
onActiveChange?: ((val: string | null) => any) | undefined;
|
|
48
48
|
}>, {
|
|
49
|
-
offset: number;
|
|
50
|
-
teleported: boolean;
|
|
51
|
-
disabled: boolean;
|
|
52
49
|
modelValue: string | null;
|
|
50
|
+
disabled: boolean;
|
|
51
|
+
offset: number;
|
|
52
|
+
persistent: boolean;
|
|
53
53
|
clearable: boolean;
|
|
54
|
+
popperStyle: string | false | import("vue").CSSProperties | import("vue").StyleValue[] | null;
|
|
54
55
|
tabindex: string | number;
|
|
56
|
+
teleported: boolean;
|
|
55
57
|
validateEvent: boolean;
|
|
56
|
-
popperStyle: string | false | import("vue").CSSProperties | import("vue").StyleValue[] | null;
|
|
57
58
|
placement: Placement;
|
|
58
|
-
persistent: boolean;
|
|
59
59
|
valueOnClear: string | number | boolean | Function | null;
|
|
60
60
|
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
61
61
|
declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
|
|
@@ -1,17 +1,17 @@
|
|
|
1
1
|
const require_aria = require("../../../constants/aria.js");
|
|
2
2
|
const require_event = require("../../../constants/event.js");
|
|
3
3
|
const require_event$1 = require("../../../utils/dom/event.js");
|
|
4
|
-
const require_index = require("../../../
|
|
5
|
-
const require_index$1 = require("../../../hooks/use-
|
|
6
|
-
const require_index$2 = require("../../../hooks/use-
|
|
7
|
-
const require_index$3 = require("../../../hooks/use-
|
|
8
|
-
const require_index$4 = require("../../../hooks/use-empty-values/index.js");
|
|
4
|
+
const require_index = require("../../../hooks/use-locale/index.js");
|
|
5
|
+
const require_index$1 = require("../../../hooks/use-namespace/index.js");
|
|
6
|
+
const require_index$2 = require("../../../hooks/use-focus-controller/index.js");
|
|
7
|
+
const require_index$3 = require("../../../hooks/use-empty-values/index.js");
|
|
9
8
|
const require_for_editor = require("../../config-provider/src/for-editor.js");
|
|
10
|
-
const require_index$
|
|
9
|
+
const require_index$4 = require("../../icon/index.js");
|
|
11
10
|
const require_use_form_common_props = require("../../form/src/hooks/use-form-common-props.js");
|
|
12
11
|
const require_use_form_item = require("../../form/src/hooks/use-form-item.js");
|
|
13
|
-
const require_index$
|
|
14
|
-
const require_index$
|
|
12
|
+
const require_index$5 = require("../../tooltip/index.js");
|
|
13
|
+
const require_index$6 = require("../../button/index.js");
|
|
14
|
+
const require_index$7 = require("../../../directives/click-outside/index.js");
|
|
15
15
|
const require_color_picker_panel = require("../../color-picker-panel/src/color-picker-panel.js");
|
|
16
16
|
const require_color = require("../../color-picker-panel/src/utils/color.js");
|
|
17
17
|
const require_use_common_color = require("../../color-picker-panel/src/composables/use-common-color.js");
|
|
@@ -40,13 +40,13 @@ var color_picker_vue_vue_type_script_setup_true_lang_default = /*@__PURE__*/ (0,
|
|
|
40
40
|
setup(__props, { expose: __expose, emit: __emit }) {
|
|
41
41
|
const props = __props;
|
|
42
42
|
const emit = __emit;
|
|
43
|
-
const { t } = require_index
|
|
44
|
-
const ns = require_index$
|
|
43
|
+
const { t } = require_index.useLocale();
|
|
44
|
+
const ns = require_index$1.useNamespace("color");
|
|
45
45
|
const { formItem } = require_use_form_item.useFormItem();
|
|
46
46
|
const colorSize = require_use_form_common_props.useFormSize();
|
|
47
47
|
const colorDisabled = require_use_form_common_props.useFormDisabled();
|
|
48
48
|
const colorViewMode = require_use_form_common_props.useFormViewMode();
|
|
49
|
-
const { valueOnClear, isEmptyValue } = require_index$
|
|
49
|
+
const { valueOnClear, isEmptyValue } = require_index$3.useEmptyValues(props, null);
|
|
50
50
|
const commonColor = require_use_common_color.useCommonColor(props, emit);
|
|
51
51
|
const { inputId: buttonId, isLabeledByFormItem } = require_use_form_item.useFormItemInputId(props, { formItemContext: formItem });
|
|
52
52
|
const popper = (0, vue.ref)();
|
|
@@ -55,7 +55,7 @@ var color_picker_vue_vue_type_script_setup_true_lang_default = /*@__PURE__*/ (0,
|
|
|
55
55
|
const showPicker = (0, vue.ref)(false);
|
|
56
56
|
const showPanelColor = (0, vue.ref)(false);
|
|
57
57
|
let shouldActiveChange = true;
|
|
58
|
-
const { isFocused, handleFocus, handleBlur } = require_index$
|
|
58
|
+
const { isFocused, handleFocus, handleBlur } = require_index$2.useFocusController(triggerRef, {
|
|
59
59
|
disabled: colorDisabled,
|
|
60
60
|
beforeBlur(event) {
|
|
61
61
|
return popper.value?.isFocusInsideContent(event);
|
|
@@ -220,7 +220,7 @@ var color_picker_vue_vue_type_script_setup_true_lang_default = /*@__PURE__*/ (0,
|
|
|
220
220
|
blur
|
|
221
221
|
});
|
|
222
222
|
return (_ctx, _cache) => {
|
|
223
|
-
return (0, vue.openBlock)(), (0, vue.createBlock)((0, vue.unref)(require_index$
|
|
223
|
+
return (0, vue.openBlock)(), (0, vue.createBlock)((0, vue.unref)(require_index$5.ElTooltip), {
|
|
224
224
|
ref_key: "popper",
|
|
225
225
|
ref: popper,
|
|
226
226
|
visible: showPicker.value,
|
|
@@ -257,7 +257,7 @@ var color_picker_vue_vue_type_script_setup_true_lang_default = /*@__PURE__*/ (0,
|
|
|
257
257
|
"validate-event": false,
|
|
258
258
|
onKeydown: (0, vue.withKeys)(handleEsc, ["esc"])
|
|
259
259
|
}), {
|
|
260
|
-
footer: (0, vue.withCtx)(() => [(0, vue.createElementVNode)("div", null, [__props.clearable ? ((0, vue.openBlock)(), (0, vue.createBlock)((0, vue.unref)(require_index$
|
|
260
|
+
footer: (0, vue.withCtx)(() => [(0, vue.createElementVNode)("div", null, [__props.clearable ? ((0, vue.openBlock)(), (0, vue.createBlock)((0, vue.unref)(require_index$6.ElButton), {
|
|
261
261
|
key: 0,
|
|
262
262
|
class: (0, vue.normalizeClass)((0, vue.unref)(ns).be("footer", "link-btn")),
|
|
263
263
|
text: "",
|
|
@@ -266,7 +266,7 @@ var color_picker_vue_vue_type_script_setup_true_lang_default = /*@__PURE__*/ (0,
|
|
|
266
266
|
}, {
|
|
267
267
|
default: (0, vue.withCtx)(() => [(0, vue.createTextVNode)((0, vue.toDisplayString)((0, vue.unref)(t)("el.colorpicker.clear")), 1)]),
|
|
268
268
|
_: 1
|
|
269
|
-
}, 8, ["class"])) : (0, vue.createCommentVNode)("v-if", true), (0, vue.createVNode)((0, vue.unref)(require_index$
|
|
269
|
+
}, 8, ["class"])) : (0, vue.createCommentVNode)("v-if", true), (0, vue.createVNode)((0, vue.unref)(require_index$6.ElButton), {
|
|
270
270
|
plain: "",
|
|
271
271
|
size: "small",
|
|
272
272
|
class: (0, vue.normalizeClass)((0, vue.unref)(ns).be("footer", "btn")),
|
|
@@ -277,7 +277,7 @@ var color_picker_vue_vue_type_script_setup_true_lang_default = /*@__PURE__*/ (0,
|
|
|
277
277
|
}, 8, ["class"])])]),
|
|
278
278
|
_: 1
|
|
279
279
|
}, 16)), [[
|
|
280
|
-
(0, vue.unref)(require_index.default),
|
|
280
|
+
(0, vue.unref)(require_index$7.default),
|
|
281
281
|
handleClickOutside,
|
|
282
282
|
triggerRef.value
|
|
283
283
|
]])]),
|
|
@@ -304,10 +304,10 @@ var color_picker_vue_vue_type_script_setup_true_lang_default = /*@__PURE__*/ (0,
|
|
|
304
304
|
}, [(0, vue.createElementVNode)("span", { class: (0, vue.normalizeClass)([(0, vue.unref)(ns).be("picker", "color"), (0, vue.unref)(ns).is("alpha", __props.showAlpha)]) }, [(0, vue.createElementVNode)("span", {
|
|
305
305
|
class: (0, vue.normalizeClass)((0, vue.unref)(ns).be("picker", "color-inner")),
|
|
306
306
|
style: (0, vue.normalizeStyle)({ backgroundColor: displayedColor.value })
|
|
307
|
-
}, [(0, vue.withDirectives)((0, vue.createVNode)((0, vue.unref)(require_index$
|
|
307
|
+
}, [(0, vue.withDirectives)((0, vue.createVNode)((0, vue.unref)(require_index$4.ElIcon), { class: (0, vue.normalizeClass)([(0, vue.unref)(ns).be("picker", "icon"), (0, vue.unref)(ns).is("icon-arrow-down")]) }, {
|
|
308
308
|
default: (0, vue.withCtx)(() => [(0, vue.createVNode)((0, vue.unref)(_element_plus_icons_vue.ArrowDown))]),
|
|
309
309
|
_: 1
|
|
310
|
-
}, 8, ["class"]), [[vue.vShow, (__props.modelValue || showPanelColor.value) && !(0, vue.unref)(colorViewMode)]]), (0, vue.withDirectives)((0, vue.createVNode)((0, vue.unref)(require_index$
|
|
310
|
+
}, 8, ["class"]), [[vue.vShow, (__props.modelValue || showPanelColor.value) && !(0, vue.unref)(colorViewMode)]]), (0, vue.withDirectives)((0, vue.createVNode)((0, vue.unref)(require_index$4.ElIcon), { class: (0, vue.normalizeClass)([(0, vue.unref)(ns).be("picker", "empty"), (0, vue.unref)(ns).is("icon-close")]) }, {
|
|
311
311
|
default: (0, vue.withCtx)(() => [(0, vue.createVNode)((0, vue.unref)(_element_plus_icons_vue.Close))]),
|
|
312
312
|
_: 1
|
|
313
313
|
}, 8, ["class"]), [[vue.vShow, !__props.modelValue && !showPanelColor.value]])], 6)], 2)], 2))], 16, _hoisted_1)]),
|
package/lib/components/color-picker/src/color-picker.vue_vue_type_script_setup_true_lang.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"color-picker.vue_vue_type_script_setup_true_lang.js","names":["$attrs","$slots"],"sources":["../../../../../../packages/components/color-picker/src/color-picker.vue"],"sourcesContent":["<template>\n <el-tooltip\n ref=\"popper\"\n :visible=\"showPicker\"\n :show-arrow=\"false\"\n :fallback-placements=\"['bottom', 'top', 'right', 'left']\"\n :placement=\"placement\"\n :offset=\"offset\"\n :gpu-acceleration=\"false\"\n :popper-class=\"[ns.be('picker', 'panel'), popperClass!]\"\n :popper-style=\"popperStyle\"\n :stop-popper-mouse-event=\"false\"\n pure\n loop\n role=\"dialog\"\n effect=\"light\"\n trigger=\"click\"\n :teleported=\"teleported\"\n :transition=\"`${ns.namespace.value}-zoom-in-top`\"\n :persistent=\"persistent\"\n :append-to=\"appendTo\"\n @show=\"handleShowTooltip\"\n @hide=\"setShowPicker(false)\"\n >\n <template #content>\n <el-color-picker-panel\n ref=\"pickerPanelRef\"\n v-bind=\"panelProps\"\n v-click-outside:[triggerRef]=\"handleClickOutside\"\n :border=\"false\"\n :validate-event=\"false\"\n @keydown.esc=\"handleEsc\"\n >\n <template #footer>\n <div>\n <el-button\n v-if=\"clearable\"\n :class=\"ns.be('footer', 'link-btn')\"\n text\n size=\"small\"\n @click=\"clear\"\n >\n {{ t('el.colorpicker.clear') }}\n </el-button>\n <el-button\n plain\n size=\"small\"\n :class=\"ns.be('footer', 'btn')\"\n @click=\"confirmValue\"\n >\n {{ t('el.colorpicker.confirm') }}\n </el-button>\n </div>\n </template>\n </el-color-picker-panel>\n </template>\n <template #default>\n <div\n :id=\"buttonId\"\n ref=\"triggerRef\"\n v-bind=\"$attrs\"\n :class=\"btnKls\"\n role=\"button\"\n :aria-label=\"buttonAriaLabel\"\n :aria-labelledby=\"buttonAriaLabelledby\"\n :aria-description=\"\n t('el.colorpicker.description', { color: modelValue || '' })\n \"\n :aria-disabled=\"colorDisabled\"\n :tabindex=\"colorDisabled ? undefined : tabindex\"\n @keydown=\"handleKeyDown\"\n @focus=\"handleFocus\"\n @blur=\"handleBlur\"\n :widget=\"widget\"\n >\n <slot v-if=\"$slots.default\" name=\"default\" />\n <div v-else :class=\"ns.be('picker', 'trigger')\" @click=\"handleTrigger\">\n <span :class=\"[ns.be('picker', 'color'), ns.is('alpha', showAlpha)]\">\n <span\n :class=\"ns.be('picker', 'color-inner')\"\n :style=\"{\n backgroundColor: displayedColor,\n }\"\n >\n <el-icon\n v-show=\"(modelValue || showPanelColor) && !colorViewMode\"\n :class=\"[ns.be('picker', 'icon'), ns.is('icon-arrow-down')]\"\n >\n <arrow-down />\n </el-icon>\n <el-icon\n v-show=\"!modelValue && !showPanelColor\"\n :class=\"[ns.be('picker', 'empty'), ns.is('icon-close')]\"\n >\n <close />\n </el-icon>\n </span>\n </span>\n </div>\n </div>\n </template>\n </el-tooltip>\n</template>\n\n<script lang=\"ts\" setup>\nimport { computed, nextTick, provide, ref } from 'vue'\nimport { watch } from '../../config-provider'\nimport { debounce, pick } from 'lodash-unified'\nimport { ElIcon } from '@element-plus/components/icon'\nimport { reactiveComputed } from '@vueuse/core'\nimport { ClickOutside as vClickOutside } from '@element-plus/directives'\nimport { ElTooltip } from '@element-plus/components/tooltip'\nimport { ElButton } from '@element-plus/components/button'\nimport {\n useFormDisabled,\n useFormItem,\n useFormItemInputId,\n useFormSize,\n useFormViewMode,\n} from '@element-plus/components/form'\nimport {\n useEmptyValues,\n useFocusController,\n useLocale,\n useNamespace,\n} from '@element-plus/hooks'\nimport {\n CHANGE_EVENT,\n EVENT_CODE,\n UPDATE_MODEL_EVENT,\n} from '@element-plus/constants'\nimport { NOOP, getEventCode } from '@element-plus/utils'\nimport { ArrowDown, Close } from '@element-plus/icons-vue'\nimport { colorPickerEmits, colorPickerPropsDefaults } from './color-picker'\nimport {\n ElColorPickerPanel,\n ROOT_COMMON_COLOR_INJECTION_KEY,\n colorPickerPanelProps,\n} from '@element-plus/components/color-picker-panel'\nimport Color from '@element-plus/components/color-picker-panel/src/utils/color'\nimport { useCommonColor } from '@element-plus/components/color-picker-panel/src/composables/use-common-color'\n\nimport type { ColorPickerPanelInstance } from '@element-plus/components/color-picker-panel'\nimport type { TooltipInstance } from '@element-plus/components/tooltip'\nimport type { ColorPickerProps } from './color-picker'\n\ndefineOptions({\n name: 'ElColorPicker',\n})\nconst props = withDefaults(\n defineProps<ColorPickerProps>(),\n colorPickerPropsDefaults\n)\n\nconst emit = defineEmits(colorPickerEmits)\n\nconst { t } = useLocale()\nconst ns = useNamespace('color')\nconst { formItem } = useFormItem()\nconst colorSize = useFormSize()\nconst colorDisabled = useFormDisabled()\nconst colorViewMode = useFormViewMode()\n\nconst { valueOnClear, isEmptyValue } = useEmptyValues(props, null)\nconst commonColor = useCommonColor(props, emit)\nconst { inputId: buttonId, isLabeledByFormItem } = useFormItemInputId(props, {\n formItemContext: formItem,\n})\n\nconst popper = ref<TooltipInstance>()\nconst triggerRef = ref()\nconst pickerPanelRef = ref<ColorPickerPanelInstance>()\nconst showPicker = ref(false)\nconst showPanelColor = ref(false)\n\n// active-change is used to prevent modelValue changes from triggering.\nlet shouldActiveChange = true\n\nconst { isFocused, handleFocus, handleBlur } = useFocusController(triggerRef, {\n disabled: colorDisabled,\n beforeBlur(event) {\n return popper.value?.isFocusInsideContent(event)\n },\n afterBlur() {\n setShowPicker(false)\n resetColor()\n if (props.validateEvent) {\n formItem?.validate?.('blur').catch(NOOP)\n }\n },\n})\n\nconst color = reactiveComputed(\n () => pickerPanelRef.value?.color ?? commonColor.color\n) as Color\n\nconst panelProps = computed(() =>\n pick(props, Object.keys(colorPickerPanelProps))\n)\n\nconst displayedColor = computed(() => {\n if (!props.modelValue && !showPanelColor.value) {\n return 'transparent'\n }\n return displayedRgb(color, props.showAlpha)\n})\n\nconst currentColor = computed(() => {\n return !props.modelValue && !showPanelColor.value ? '' : color.value\n})\n\nconst buttonAriaLabel = computed<string | undefined>(() => {\n return !isLabeledByFormItem.value\n ? props.ariaLabel || t('el.colorpicker.defaultLabel')\n : undefined\n})\n\nconst buttonAriaLabelledby = computed<string | undefined>(() => {\n return isLabeledByFormItem.value ? formItem?.labelId : undefined\n})\n\nconst btnKls = computed(() => {\n return [\n ns.b('picker'),\n ns.is('disabled', colorDisabled.value),\n ns.is('view-mode', !!colorViewMode.value),\n ns.bm('picker', colorSize.value),\n ns.is('focused', isFocused.value),\n ]\n})\n\nfunction displayedRgb(color: Color, showAlpha: boolean) {\n const { r, g, b, a } = color.toRgb()\n return showAlpha ? `rgba(${r}, ${g}, ${b}, ${a})` : `rgb(${r}, ${g}, ${b})`\n}\n\nfunction setShowPicker(value: boolean) {\n showPicker.value = value\n}\n\nconst debounceSetShowPicker = debounce(setShowPicker, 100, { leading: true })\nfunction show() {\n if (colorDisabled.value || colorViewMode.value) return\n setShowPicker(true)\n}\n\nfunction hide() {\n debounceSetShowPicker(false)\n resetColor()\n}\n\nfunction resetColor() {\n nextTick(() => {\n if (props.modelValue) {\n color.fromString(props.modelValue)\n } else {\n color.value = ''\n nextTick(() => {\n showPanelColor.value = false\n })\n }\n })\n}\n\nfunction handleTrigger() {\n if (colorDisabled.value || colorViewMode.value) return\n if (showPicker.value) {\n resetColor()\n }\n debounceSetShowPicker(!showPicker.value)\n}\n\nfunction confirmValue() {\n const value = isEmptyValue(color.value) ? valueOnClear.value : color.value\n emit(UPDATE_MODEL_EVENT, value)\n emit(CHANGE_EVENT, value)\n if (props.validateEvent) {\n formItem?.validate('change').catch(NOOP)\n }\n debounceSetShowPicker(false)\n // check if modelValue change, if not change, then reset color.\n nextTick(() => {\n const newColor = new Color({\n enableAlpha: props.showAlpha,\n format: props.colorFormat || '',\n value: props.modelValue,\n })\n if (!color.compare(newColor)) {\n resetColor()\n }\n })\n}\n\nfunction clear() {\n debounceSetShowPicker(false)\n emit(UPDATE_MODEL_EVENT, valueOnClear.value)\n emit(CHANGE_EVENT, valueOnClear.value)\n if (props.modelValue !== valueOnClear.value && props.validateEvent) {\n formItem?.validate('change').catch(NOOP)\n }\n resetColor()\n emit('clear')\n}\n\nfunction handleShowTooltip() {\n pickerPanelRef?.value?.inputRef?.focus()\n}\n\nfunction handleClickOutside() {\n if (!showPicker.value) return\n hide()\n isFocused.value && focus()\n}\n\nfunction handleEsc(event: KeyboardEvent) {\n event.preventDefault()\n event.stopPropagation()\n setShowPicker(false)\n resetColor()\n}\n\nfunction handleKeyDown(event: KeyboardEvent) {\n const code = getEventCode(event)\n\n switch (code) {\n case EVENT_CODE.enter:\n case EVENT_CODE.numpadEnter:\n case EVENT_CODE.space:\n event.preventDefault()\n event.stopPropagation()\n show()\n break\n case EVENT_CODE.esc:\n handleEsc(event)\n break\n }\n}\n\nfunction focus() {\n triggerRef.value.focus()\n}\n\nfunction blur() {\n triggerRef.value.blur()\n}\n\nwatch(\n () => currentColor.value,\n (val) => {\n shouldActiveChange && emit('activeChange', val)\n shouldActiveChange = true\n }\n)\n\nwatch(\n () => color.value,\n () => {\n if (!props.modelValue && !showPanelColor.value) {\n showPanelColor.value = true\n }\n }\n)\n\nwatch(\n () => props.modelValue,\n (newVal) => {\n if (!newVal) {\n showPanelColor.value = false\n } else if (newVal && newVal !== color.value) {\n shouldActiveChange = false\n color.fromString(newVal)\n }\n }\n)\n\nwatch(\n () => showPicker.value,\n () => {\n pickerPanelRef.value && nextTick(pickerPanelRef.value.update)\n }\n)\n\nprovide(ROOT_COMMON_COLOR_INJECTION_KEY, commonColor)\n\ndefineExpose({\n /**\n * @description current color object\n */\n color,\n /**\n * @description manually show ColorPicker\n */\n show,\n /**\n * @description manually hide ColorPicker\n */\n hide,\n /**\n * @description focus the input element\n */\n focus,\n /**\n * @description blur the input element\n */\n blur,\n})\n</script>\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAqJA,MAAM,QAAQ;EAKd,MAAM,OAAO;EAEb,MAAM,EAAE,MAAM,gBAAA,UAAU;EACxB,MAAM,KAAK,gBAAA,aAAa,OAAO;EAC/B,M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s","$slots"],"sources":["../../../../../../packages/components/color-picker/src/color-picker.vue"],"sourcesContent":["<template>\n <el-tooltip\n ref=\"popper\"\n :visible=\"showPicker\"\n :show-arrow=\"false\"\n :fallback-placements=\"['bottom', 'top', 'right', 'left']\"\n :placement=\"placement\"\n :offset=\"offset\"\n :gpu-acceleration=\"false\"\n :popper-class=\"[ns.be('picker', 'panel'), popperClass!]\"\n :popper-style=\"popperStyle\"\n :stop-popper-mouse-event=\"false\"\n pure\n loop\n role=\"dialog\"\n effect=\"light\"\n trigger=\"click\"\n :teleported=\"teleported\"\n :transition=\"`${ns.namespace.value}-zoom-in-top`\"\n :persistent=\"persistent\"\n :append-to=\"appendTo\"\n @show=\"handleShowTooltip\"\n @hide=\"setShowPicker(false)\"\n >\n <template #content>\n <el-color-picker-panel\n ref=\"pickerPanelRef\"\n v-bind=\"panelProps\"\n v-click-outside:[triggerRef]=\"handleClickOutside\"\n :border=\"false\"\n :validate-event=\"false\"\n @keydown.esc=\"handleEsc\"\n >\n <template #footer>\n <div>\n <el-button\n v-if=\"clearable\"\n :class=\"ns.be('footer', 'link-btn')\"\n text\n size=\"small\"\n @click=\"clear\"\n >\n {{ t('el.colorpicker.clear') }}\n </el-button>\n <el-button\n plain\n size=\"small\"\n :class=\"ns.be('footer', 'btn')\"\n @click=\"confirmValue\"\n >\n {{ t('el.colorpicker.confirm') }}\n </el-button>\n </div>\n </template>\n </el-color-picker-panel>\n </template>\n <template #default>\n <div\n :id=\"buttonId\"\n ref=\"triggerRef\"\n v-bind=\"$attrs\"\n :class=\"btnKls\"\n role=\"button\"\n :aria-label=\"buttonAriaLabel\"\n :aria-labelledby=\"buttonAriaLabelledby\"\n :aria-description=\"\n t('el.colorpicker.description', { color: modelValue || '' })\n \"\n :aria-disabled=\"colorDisabled\"\n :tabindex=\"colorDisabled ? undefined : tabindex\"\n @keydown=\"handleKeyDown\"\n @focus=\"handleFocus\"\n @blur=\"handleBlur\"\n :widget=\"widget\"\n >\n <slot v-if=\"$slots.default\" name=\"default\" />\n <div v-else :class=\"ns.be('picker', 'trigger')\" @click=\"handleTrigger\">\n <span :class=\"[ns.be('picker', 'color'), ns.is('alpha', showAlpha)]\">\n <span\n :class=\"ns.be('picker', 'color-inner')\"\n :style=\"{\n backgroundColor: displayedColor,\n }\"\n >\n <el-icon\n v-show=\"(modelValue || showPanelColor) && !colorViewMode\"\n :class=\"[ns.be('picker', 'icon'), ns.is('icon-arrow-down')]\"\n >\n <arrow-down />\n </el-icon>\n <el-icon\n v-show=\"!modelValue && !showPanelColor\"\n :class=\"[ns.be('picker', 'empty'), ns.is('icon-close')]\"\n >\n <close />\n </el-icon>\n </span>\n </span>\n </div>\n </div>\n </template>\n </el-tooltip>\n</template>\n\n<script lang=\"ts\" setup>\nimport { computed, nextTick, provide, ref } from 'vue'\nimport { watch } from '../../config-provider'\nimport { debounce, pick } from 'lodash-unified'\nimport { ElIcon } from '@element-plus/components/icon'\nimport { reactiveComputed } from '@vueuse/core'\nimport { ClickOutside as vClickOutside } from '@element-plus/directives'\nimport { ElTooltip } from '@element-plus/components/tooltip'\nimport { ElButton } from '@element-plus/components/button'\nimport {\n useFormDisabled,\n useFormItem,\n useFormItemInputId,\n useFormSize,\n useFormViewMode,\n} from '@element-plus/components/form'\nimport {\n useEmptyValues,\n useFocusController,\n useLocale,\n useNamespace,\n} from '@element-plus/hooks'\nimport {\n CHANGE_EVENT,\n EVENT_CODE,\n UPDATE_MODEL_EVENT,\n} from '@element-plus/constants'\nimport { NOOP, getEventCode } from '@element-plus/utils'\nimport { ArrowDown, Close } from '@element-plus/icons-vue'\nimport { colorPickerEmits, colorPickerPropsDefaults } from './color-picker'\nimport {\n ElColorPickerPanel,\n ROOT_COMMON_COLOR_INJECTION_KEY,\n colorPickerPanelProps,\n} from '@element-plus/components/color-picker-panel'\nimport Color from '@element-plus/components/color-picker-panel/src/utils/color'\nimport { useCommonColor } from '@element-plus/components/color-picker-panel/src/composables/use-common-color'\n\nimport type { ColorPickerPanelInstance } from '@element-plus/components/color-picker-panel'\nimport type { TooltipInstance } from '@element-plus/components/tooltip'\nimport type { ColorPickerProps } from './color-picker'\n\ndefineOptions({\n name: 'ElColorPicker',\n})\nconst props = withDefaults(\n defineProps<ColorPickerProps>(),\n colorPickerPropsDefaults\n)\n\nconst emit = defineEmits(colorPickerEmits)\n\nconst { t } = useLocale()\nconst ns = useNamespace('color')\nconst { formItem } = useFormItem()\nconst colorSize = useFormSize()\nconst colorDisabled = useFormDisabled()\nconst colorViewMode = useFormViewMode()\n\nconst { valueOnClear, isEmptyValue } = useEmptyValues(props, null)\nconst commonColor = useCommonColor(props, emit)\nconst { inputId: buttonId, isLabeledByFormItem } = useFormItemInputId(props, {\n formItemContext: formItem,\n})\n\nconst popper = ref<TooltipInstance>()\nconst triggerRef = ref()\nconst pickerPanelRef = ref<ColorPickerPanelInstance>()\nconst showPicker = ref(false)\nconst showPanelColor = ref(false)\n\n// active-change is used to prevent modelValue changes from triggering.\nlet shouldActiveChange = true\n\nconst { isFocused, handleFocus, handleBlur } = useFocusController(triggerRef, {\n disabled: colorDisabled,\n beforeBlur(event) {\n return popper.value?.isFocusInsideContent(event)\n },\n afterBlur() {\n setShowPicker(false)\n resetColor()\n if (props.validateEvent) {\n formItem?.validate?.('blur').catch(NOOP)\n }\n },\n})\n\nconst color = reactiveComputed(\n () => pickerPanelRef.value?.color ?? commonColor.color\n) as Color\n\nconst panelProps = computed(() =>\n pick(props, Object.keys(colorPickerPanelProps))\n)\n\nconst displayedColor = computed(() => {\n if (!props.modelValue && !showPanelColor.value) {\n return 'transparent'\n }\n return displayedRgb(color, props.showAlpha)\n})\n\nconst currentColor = computed(() => {\n return !props.modelValue && !showPanelColor.value ? '' : color.value\n})\n\nconst buttonAriaLabel = computed<string | undefined>(() => {\n return !isLabeledByFormItem.value\n ? props.ariaLabel || t('el.colorpicker.defaultLabel')\n : undefined\n})\n\nconst buttonAriaLabelledby = computed<string | undefined>(() => {\n return isLabeledByFormItem.value ? formItem?.labelId : undefined\n})\n\nconst btnKls = computed(() => {\n return [\n ns.b('picker'),\n ns.is('disabled', colorDisabled.value),\n ns.is('view-mode', !!colorViewMode.value),\n ns.bm('picker', colorSize.value),\n ns.is('focused', isFocused.value),\n ]\n})\n\nfunction displayedRgb(color: Color, showAlpha: boolean) {\n const { r, g, b, a } = color.toRgb()\n return showAlpha ? `rgba(${r}, ${g}, ${b}, ${a})` : `rgb(${r}, ${g}, ${b})`\n}\n\nfunction setShowPicker(value: boolean) {\n showPicker.value = value\n}\n\nconst debounceSetShowPicker = debounce(setShowPicker, 100, { leading: true })\nfunction show() {\n if (colorDisabled.value || colorViewMode.value) return\n setShowPicker(true)\n}\n\nfunction hide() {\n debounceSetShowPicker(false)\n resetColor()\n}\n\nfunction resetColor() {\n nextTick(() => {\n if (props.modelValue) {\n color.fromString(props.modelValue)\n } else {\n color.value = ''\n nextTick(() => {\n showPanelColor.value = false\n })\n }\n })\n}\n\nfunction handleTrigger() {\n if (colorDisabled.value || colorViewMode.value) return\n if (showPicker.value) {\n resetColor()\n }\n debounceSetShowPicker(!showPicker.value)\n}\n\nfunction confirmValue() {\n const value = isEmptyValue(color.value) ? valueOnClear.value : color.value\n emit(UPDATE_MODEL_EVENT, value)\n emit(CHANGE_EVENT, value)\n if (props.validateEvent) {\n formItem?.validate('change').catch(NOOP)\n }\n debounceSetShowPicker(false)\n // check if modelValue change, if not change, then reset color.\n nextTick(() => {\n const newColor = new Color({\n enableAlpha: props.showAlpha,\n format: props.colorFormat || '',\n value: props.modelValue,\n })\n if (!color.compare(newColor)) {\n resetColor()\n }\n })\n}\n\nfunction clear() {\n debounceSetShowPicker(false)\n emit(UPDATE_MODEL_EVENT, valueOnClear.value)\n emit(CHANGE_EVENT, valueOnClear.value)\n if (props.modelValue !== valueOnClear.value && props.validateEvent) {\n formItem?.validate('change').catch(NOOP)\n }\n resetColor()\n emit('clear')\n}\n\nfunction handleShowTooltip() {\n pickerPanelRef?.value?.inputRef?.focus()\n}\n\nfunction handleClickOutside() {\n if (!showPicker.value) return\n hide()\n isFocused.value && focus()\n}\n\nfunction handleEsc(event: KeyboardEvent) {\n event.preventDefault()\n event.stopPropagation()\n setShowPicker(false)\n resetColor()\n}\n\nfunction handleKeyDown(event: KeyboardEvent) {\n const code = getEventCode(event)\n\n switch (code) {\n case EVENT_CODE.enter:\n case EVENT_CODE.numpadEnter:\n case EVENT_CODE.space:\n event.preventDefault()\n event.stopPropagation()\n show()\n break\n case EVENT_CODE.esc:\n handleEsc(event)\n break\n }\n}\n\nfunction focus() {\n triggerRef.value.focus()\n}\n\nfunction blur() {\n triggerRef.value.blur()\n}\n\nwatch(\n () => currentColor.value,\n (val) => {\n shouldActiveChange && emit('activeChange', val)\n shouldActiveChange = true\n }\n)\n\nwatch(\n () => color.value,\n () => {\n if (!props.modelValue && !showPanelColor.value) {\n showPanelColor.value = true\n }\n }\n)\n\nwatch(\n () => props.modelValue,\n (newVal) => {\n if (!newVal) {\n showPanelColor.value = false\n } else if (newVal && newVal !== color.value) {\n shouldActiveChange = false\n color.fromString(newVal)\n }\n }\n)\n\nwatch(\n () => showPicker.value,\n () => {\n pickerPanelRef.value && nextTick(pickerPanelRef.value.update)\n }\n)\n\nprovide(ROOT_COMMON_COLOR_INJECTION_KEY, commonColor)\n\ndefineExpose({\n /**\n * @description current color object\n */\n color,\n /**\n * @description manually show ColorPicker\n */\n show,\n /**\n * @description manually hide ColorPicker\n */\n hide,\n /**\n * @description focus the input element\n */\n focus,\n /**\n * @description blur the input element\n */\n blur,\n})\n</script>\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAqJA,MAAM,QAAQ;EAKd,MAAM,OAAO;EAEb,MAAM,EAAE,MAAM,cAAA,UAAU;EACxB,MAAM,KAAK,gBAAA,aAAa,OAAO;EAC/B,MAAM,EAAE,aAAa,sBAAA,YAAY;EACjC,MAAM,YAAY,8BAAA,YAAY;EAC9B,MAAM,gBAAgB,8BAAA,gBAAgB;EACtC,M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AAA,EAAA,GAAA,IAAA,MAAA,CAAO,EAAA,CAAE,CAAC,GAAE,UAAA,aAAA,CAAA;KACZ,QAAA,GAAA,IAAA,eAAA,CAAK,EAAA,iBAAqC,eAAA,MAAA,CAAA;oEASjC,gBAAA,MAAA,GAAA,EAHP,QAAA,GAAA,IAAA,eAAA,CAAK,EAAA,GAAA,IAAA,MAAA,CAAG,EAAA,CAAE,CAAC,GAAE,UAAA,MAAA,IAAA,GAAA,IAAA,MAAA,CAAoB,EAAA,CAAE,CAAC,GAAE,iBAAA,CAAA,CAAA,EAAA,GAAA;qCAEzB,EAAA,GAAA,IAAA,YAAA,EAAA,GAAA,IAAA,MAAA,CAAA,wBAAA,SAAA,CAAA,CAAA,CAAA;;oCAHL,QAAA,cAAc,eAAA,UAAc,EAAA,GAAA,IAAA,MAAA,CAAM,aAAA,CAAa,CAAA,CAAA,IAAA,GAAA,IAAA,eAAA,EAAA,GAAA,IAAA,YAAA,EAAA,GAAA,IAAA,MAAA,CAUhD,gBAAA,MAAA,GAAA,EAHP,QAAA,GAAA,IAAA,eAAA,CAAK,EAAA,GAAA,IAAA,MAAA,CAAG,EAAA,CAAE,CAAC,GAAE,UAAA,OAAA,IAAA,GAAA,IAAA,MAAA,CAAqB,EAAA,CAAE,CAAC,GAAE,YAAA,CAAA,CAAA,EAAA,GAAA;qCAE/B,EAAA,GAAA,IAAA,YAAA,EAAA,GAAA,IAAA,MAAA,CAAA,wBAAA,KAAA,CAAA,CAAA,CAAA;;oCAHA,QAAA,cAAU,CAAK,eAAA,KAAc,CAAA,CAAA,CAAA,GAAA,CAAA,CAAA,GAAA,CAAA,CAAA,GAAA,CAAA,EAAA,GAAA,IAAA,UAAA,CAAA,CAAA"}
|
|
@@ -27,9 +27,9 @@ declare const __VLS_base: import("vue").DefineComponent<ColorPickerPanelProps, {
|
|
|
27
27
|
"onUpdate:modelValue"?: ((val: string | null) => any) | undefined;
|
|
28
28
|
}>, {
|
|
29
29
|
modelValue: string | null;
|
|
30
|
+
showAlpha: boolean;
|
|
30
31
|
validateEvent: boolean;
|
|
31
32
|
border: boolean;
|
|
32
|
-
showAlpha: boolean;
|
|
33
33
|
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
34
34
|
declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
|
|
35
35
|
declare const _default: typeof __VLS_export;
|
|
@@ -136,11 +136,11 @@ declare const ConfigProvider: import("vue").DefineComponent<import("vue").Extrac
|
|
|
136
136
|
};
|
|
137
137
|
readonly forEditor: EpPropFinalized<BooleanConstructor, unknown, unknown, false, boolean>;
|
|
138
138
|
}>> & Readonly<{}>, {
|
|
139
|
+
readonly namespace: string;
|
|
140
|
+
readonly valueOnClear: EpPropMergeType<(new (...args: any[]) => string | number | boolean | Function) | (() => string | number | boolean | Function | null) | (((new (...args: any[]) => string | number | boolean | Function) | (() => string | number | boolean | Function | null)) | null)[], unknown, unknown>;
|
|
139
141
|
readonly a11y: EpPropMergeType<BooleanConstructor, unknown, unknown>;
|
|
140
142
|
readonly keyboardNavigation: EpPropMergeType<BooleanConstructor, unknown, unknown>;
|
|
141
|
-
readonly namespace: string;
|
|
142
143
|
readonly forEditor: EpPropMergeType<BooleanConstructor, unknown, unknown>;
|
|
143
|
-
readonly valueOnClear: EpPropMergeType<(new (...args: any[]) => string | number | boolean | Function) | (() => string | number | boolean | Function | null) | (((new (...args: any[]) => string | number | boolean | Function) | (() => string | number | boolean | Function | null)) | null)[], unknown, unknown>;
|
|
144
144
|
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
145
145
|
type ConfigProviderInstance = InstanceType<typeof ConfigProvider> & unknown;
|
|
146
146
|
//#endregion
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
const require_event = require("../../../constants/event.js");
|
|
2
2
|
const require_raf = require("../../../utils/raf.js");
|
|
3
3
|
const require_for_editor = require("../../config-provider/src/for-editor.js");
|
|
4
|
-
const require_countdown = require("./countdown.js");
|
|
5
4
|
const require_index = require("../../statistic/index.js");
|
|
5
|
+
const require_countdown = require("./countdown.js");
|
|
6
6
|
const require_utils = require("./utils.js");
|
|
7
7
|
let vue = require("vue");
|
|
8
8
|
//#region ../../packages/components/countdown/src/countdown.vue?vue&type=script&setup=true&lang.ts
|
|
@@ -30,7 +30,7 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
|
|
|
30
30
|
readonly validateEvent: EpPropFinalized<BooleanConstructor, unknown, unknown, true, boolean>;
|
|
31
31
|
readonly unlinkPanels: BooleanConstructor;
|
|
32
32
|
readonly singlePanel: BooleanConstructor;
|
|
33
|
-
readonly placement: EpPropFinalized<(new (...args: any[]) => "
|
|
33
|
+
readonly placement: EpPropFinalized<(new (...args: any[]) => "right" | "left" | "bottom" | "auto" | "auto-start" | "auto-end" | "top" | "top-start" | "top-end" | "bottom-start" | "bottom-end" | "right-start" | "right-end" | "left-start" | "left-end") | (() => Placement) | (((new (...args: any[]) => "right" | "left" | "bottom" | "auto" | "auto-start" | "auto-end" | "top" | "top-start" | "top-end" | "bottom-start" | "bottom-end" | "right-start" | "right-end" | "left-start" | "left-end") | (() => Placement)) | null)[], Placement, unknown, "bottom", boolean>;
|
|
34
34
|
readonly fallbackPlacements: EpPropFinalized<(new (...args: any[]) => Placement[]) | (() => Placement[]) | (((new (...args: any[]) => Placement[]) | (() => Placement[])) | null)[], unknown, unknown, readonly ["bottom", "top", "right", "left"], boolean>;
|
|
35
35
|
readonly widget: StringConstructor;
|
|
36
36
|
readonly offset: EpPropFinalized<NumberConstructor, unknown, unknown, 12, boolean>;
|
|
@@ -239,7 +239,7 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
|
|
|
239
239
|
readonly validateEvent: EpPropFinalized<BooleanConstructor, unknown, unknown, true, boolean>;
|
|
240
240
|
readonly unlinkPanels: BooleanConstructor;
|
|
241
241
|
readonly singlePanel: BooleanConstructor;
|
|
242
|
-
readonly placement: EpPropFinalized<(new (...args: any[]) => "
|
|
242
|
+
readonly placement: EpPropFinalized<(new (...args: any[]) => "right" | "left" | "bottom" | "auto" | "auto-start" | "auto-end" | "top" | "top-start" | "top-end" | "bottom-start" | "bottom-end" | "right-start" | "right-end" | "left-start" | "left-end") | (() => Placement) | (((new (...args: any[]) => "right" | "left" | "bottom" | "auto" | "auto-start" | "auto-end" | "top" | "top-start" | "top-end" | "bottom-start" | "bottom-end" | "right-start" | "right-end" | "left-start" | "left-end") | (() => Placement)) | null)[], Placement, unknown, "bottom", boolean>;
|
|
243
243
|
readonly fallbackPlacements: EpPropFinalized<(new (...args: any[]) => Placement[]) | (() => Placement[]) | (((new (...args: any[]) => Placement[]) | (() => Placement[])) | null)[], unknown, unknown, readonly ["bottom", "top", "right", "left"], boolean>;
|
|
244
244
|
readonly widget: StringConstructor;
|
|
245
245
|
readonly offset: EpPropFinalized<NumberConstructor, unknown, unknown, 12, boolean>;
|
|
@@ -424,29 +424,29 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
|
|
|
424
424
|
}>> & Readonly<{
|
|
425
425
|
"onUpdate:modelValue"?: ((...args: any[]) => any) | undefined;
|
|
426
426
|
}>, {
|
|
427
|
-
readonly offset: number;
|
|
428
427
|
readonly type: EpPropMergeType<(new (...args: any[]) => "year" | "years" | "month" | "months" | "date" | "dates" | "week" | "datetime" | "datetimerange" | "daterange" | "monthrange" | "yearrange") | (() => DatePickerType) | (((new (...args: any[]) => "year" | "years" | "month" | "months" | "date" | "dates" | "week" | "datetime" | "datetimerange" | "daterange" | "monthrange" | "yearrange") | (() => DatePickerType)) | null)[], unknown, unknown>;
|
|
429
|
-
readonly disabled: EpPropMergeType<BooleanConstructor, unknown, unknown>;
|
|
430
|
-
readonly tableInput: boolean;
|
|
431
428
|
readonly modelValue: EpPropMergeType<(new (...args: any[]) => string | number | string[] | Date | number[] | Date[]) | (() => ModelValueType | null) | (((new (...args: any[]) => string | number | string[] | Date | number[] | Date[]) | (() => ModelValueType | null)) | null)[], unknown, unknown>;
|
|
432
|
-
readonly
|
|
433
|
-
readonly
|
|
429
|
+
readonly disabled: EpPropMergeType<BooleanConstructor, unknown, unknown>;
|
|
430
|
+
readonly offset: number;
|
|
434
431
|
readonly clearable: EpPropMergeType<BooleanConstructor, unknown, unknown>;
|
|
435
|
-
readonly
|
|
436
|
-
readonly prefixIcon: 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>;
|
|
432
|
+
readonly popperStyle: import("vue").StyleValue;
|
|
437
433
|
readonly tabindex: EpPropMergeType<(new (...args: any[]) => string | number) | (() => string | number) | (((new (...args: any[]) => string | number) | (() => string | number)) | null)[], unknown, unknown>;
|
|
438
434
|
readonly validateEvent: EpPropMergeType<BooleanConstructor, unknown, unknown>;
|
|
439
|
-
readonly
|
|
435
|
+
readonly placement: EpPropMergeType<(new (...args: any[]) => "right" | "left" | "bottom" | "auto" | "auto-start" | "auto-end" | "top" | "top-start" | "top-end" | "bottom-start" | "bottom-end" | "right-start" | "right-end" | "left-start" | "left-end") | (() => Placement) | (((new (...args: any[]) => "right" | "left" | "bottom" | "auto" | "auto-start" | "auto-end" | "top" | "top-start" | "top-end" | "bottom-start" | "bottom-end" | "right-start" | "right-end" | "left-start" | "left-end") | (() => Placement)) | null)[], Placement, unknown>;
|
|
436
|
+
readonly valueOnClear: EpPropMergeType<(new (...args: any[]) => string | number | boolean | Function) | (() => string | number | boolean | Function | null) | (((new (...args: any[]) => string | number | boolean | Function) | (() => string | number | boolean | Function | null)) | null)[], unknown, unknown>;
|
|
440
437
|
readonly fallbackPlacements: Placement[];
|
|
441
|
-
readonly placement: EpPropMergeType<(new (...args: any[]) => "left" | "right" | "top" | "auto" | "bottom" | "auto-start" | "auto-end" | "top-start" | "top-end" | "bottom-start" | "bottom-end" | "right-start" | "right-end" | "left-start" | "left-end") | (() => Placement) | (((new (...args: any[]) => "left" | "right" | "top" | "auto" | "bottom" | "auto-start" | "auto-end" | "top-start" | "top-end" | "bottom-start" | "bottom-end" | "right-start" | "right-end" | "left-start" | "left-end") | (() => Placement)) | null)[], Placement, unknown>;
|
|
442
438
|
readonly popperOptions: Partial<Options>;
|
|
443
|
-
readonly
|
|
444
|
-
readonly
|
|
439
|
+
readonly tableInput: boolean;
|
|
440
|
+
readonly placeholder: string;
|
|
441
|
+
readonly readonly: boolean;
|
|
442
|
+
readonly clearIcon: 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>;
|
|
443
|
+
readonly prefixIcon: 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>;
|
|
445
444
|
readonly automaticDropdown: EpPropMergeType<BooleanConstructor, unknown, unknown>;
|
|
446
445
|
readonly editable: EpPropMergeType<BooleanConstructor, unknown, unknown>;
|
|
447
446
|
readonly saveOnBlur: EpPropMergeType<BooleanConstructor, unknown, unknown>;
|
|
448
447
|
readonly rangeSeparator: string;
|
|
449
448
|
readonly shortcuts: unknown[];
|
|
449
|
+
readonly showArrow: EpPropMergeType<BooleanConstructor, unknown, unknown>;
|
|
450
450
|
readonly showNow: EpPropMergeType<BooleanConstructor, unknown, unknown>;
|
|
451
451
|
readonly showConfirm: EpPropMergeType<BooleanConstructor, unknown, unknown>;
|
|
452
452
|
readonly showFooter: EpPropMergeType<BooleanConstructor, unknown, unknown>;
|
|
@@ -32,7 +32,7 @@ declare const datePickerProps: {
|
|
|
32
32
|
readonly validateEvent: EpPropFinalized<BooleanConstructor, unknown, unknown, true, boolean>;
|
|
33
33
|
readonly unlinkPanels: BooleanConstructor;
|
|
34
34
|
readonly singlePanel: BooleanConstructor;
|
|
35
|
-
readonly placement: EpPropFinalized<(new (...args: any[]) => "
|
|
35
|
+
readonly placement: EpPropFinalized<(new (...args: any[]) => "right" | "left" | "bottom" | "auto" | "auto-start" | "auto-end" | "top" | "top-start" | "top-end" | "bottom-start" | "bottom-end" | "right-start" | "right-end" | "left-start" | "left-end") | (() => Placement) | (((new (...args: any[]) => "right" | "left" | "bottom" | "auto" | "auto-start" | "auto-end" | "top" | "top-start" | "top-end" | "bottom-start" | "bottom-end" | "right-start" | "right-end" | "left-start" | "left-end") | (() => Placement)) | null)[], Placement, unknown, "bottom", boolean>;
|
|
36
36
|
readonly fallbackPlacements: EpPropFinalized<(new (...args: any[]) => Placement[]) | (() => Placement[]) | (((new (...args: any[]) => Placement[]) | (() => Placement[])) | null)[], unknown, unknown, readonly ["bottom", "top", "right", "left"], boolean>;
|
|
37
37
|
readonly widget: StringConstructor;
|
|
38
38
|
readonly offset: EpPropFinalized<NumberConstructor, unknown, unknown, 12, boolean>;
|