@element-plus/nightly 0.0.20250630 → 0.0.20250701
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 +152 -118
- package/dist/index.full.min.js +16 -16
- package/dist/index.full.min.js.map +1 -1
- package/dist/index.full.min.mjs +16 -16
- package/dist/index.full.min.mjs.map +1 -1
- package/dist/index.full.mjs +152 -118
- 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/components/alert/src/alert.d.ts +1 -1
- package/es/components/alert/src/alert.vue.d.ts +3 -3
- package/es/components/badge/src/badge.d.ts +1 -1
- package/es/components/badge/src/badge.vue.d.ts +3 -3
- package/es/components/button/index.mjs +2 -2
- package/es/components/button/src/button-group.d.ts +1 -1
- package/es/components/button/src/button-group.mjs +1 -1
- package/es/components/button/src/button-group.vue.d.ts +3 -3
- package/es/components/button/src/button.d.ts +1 -1
- package/es/components/button/src/button.mjs +62 -87
- package/es/components/button/src/button.mjs.map +1 -1
- package/es/components/button/src/button.vue.d.ts +3 -3
- package/es/components/button/src/button2.mjs +87 -62
- package/es/components/button/src/button2.mjs.map +1 -1
- package/es/components/calendar/src/calendar2.mjs +1 -1
- package/es/components/calendar/src/date-table.mjs +89 -31
- package/es/components/calendar/src/date-table.mjs.map +1 -1
- package/es/components/calendar/src/date-table2.mjs +31 -89
- package/es/components/calendar/src/date-table2.mjs.map +1 -1
- package/es/components/calendar/src/use-date-table.mjs +1 -1
- package/es/components/cascader/src/cascader.d.ts +1 -1
- package/es/components/cascader/src/cascader.vue.d.ts +3 -3
- package/es/components/check-tag/src/check-tag.d.ts +1 -1
- package/es/components/check-tag/src/check-tag.vue.d.ts +3 -3
- package/es/components/collapse/index.mjs +2 -2
- package/es/components/collapse/src/collapse.mjs +28 -23
- package/es/components/collapse/src/collapse.mjs.map +1 -1
- package/es/components/collapse/src/collapse2.mjs +23 -28
- package/es/components/collapse/src/collapse2.mjs.map +1 -1
- package/es/components/color-picker/src/color-picker2.mjs +1 -3
- package/es/components/color-picker/src/color-picker2.mjs.map +1 -1
- package/es/components/descriptions/src/description-item.d.ts +1 -1
- package/es/components/dialog/src/dialog.mjs +1 -1
- package/es/components/drawer/index.mjs +2 -2
- package/es/components/drawer/src/drawer.mjs +178 -26
- package/es/components/drawer/src/drawer.mjs.map +1 -1
- package/es/components/drawer/src/drawer2.mjs +26 -178
- package/es/components/drawer/src/drawer2.mjs.map +1 -1
- package/es/components/dropdown/src/dropdown-item-impl.mjs +1 -1
- package/es/components/dropdown/src/dropdown-menu.mjs +1 -1
- package/es/components/dropdown/src/dropdown.d.ts +1 -1
- package/es/components/dropdown/src/dropdown.mjs +1 -1
- package/es/components/dropdown/src/dropdown.vue.d.ts +3 -3
- package/es/components/dropdown/src/dropdown2.mjs +1 -1
- package/es/components/empty/index.mjs +2 -2
- package/es/components/empty/src/empty.mjs +52 -11
- package/es/components/empty/src/empty.mjs.map +1 -1
- package/es/components/empty/src/empty2.mjs +11 -52
- package/es/components/empty/src/empty2.mjs.map +1 -1
- package/es/components/form/src/form-item.d.ts +1 -1
- package/es/components/form/src/form-item.vue.d.ts +3 -3
- package/es/components/form/src/form.vue.d.ts +1 -1
- package/es/components/index.mjs +17 -17
- package/es/components/input/index.mjs +2 -2
- package/es/components/input/src/input.mjs +106 -437
- package/es/components/input/src/input.mjs.map +1 -1
- package/es/components/input/src/input2.mjs +435 -106
- package/es/components/input/src/input2.mjs.map +1 -1
- package/es/components/input-number/index.mjs +2 -2
- package/es/components/input-number/src/input-number.mjs +65 -348
- package/es/components/input-number/src/input-number.mjs.map +1 -1
- package/es/components/input-number/src/input-number2.mjs +348 -65
- package/es/components/input-number/src/input-number2.mjs.map +1 -1
- package/es/components/input-tag/index.mjs +2 -2
- package/es/components/input-tag/src/composables/use-input-tag.mjs +1 -3
- package/es/components/input-tag/src/composables/use-input-tag.mjs.map +1 -1
- package/es/components/input-tag/src/input-tag.d.ts +1 -1
- package/es/components/input-tag/src/input-tag.mjs +73 -215
- package/es/components/input-tag/src/input-tag.mjs.map +1 -1
- package/es/components/input-tag/src/input-tag.vue.d.ts +4 -4
- package/es/components/input-tag/src/input-tag2.mjs +215 -73
- package/es/components/input-tag/src/input-tag2.mjs.map +1 -1
- package/es/components/link/src/link.d.ts +1 -1
- package/es/components/link/src/link.vue.d.ts +3 -3
- package/es/components/loading/src/directive.mjs +23 -16
- package/es/components/loading/src/directive.mjs.map +1 -1
- package/es/components/mention/index.mjs +2 -2
- package/es/components/mention/src/mention.mjs +65 -287
- package/es/components/mention/src/mention.mjs.map +1 -1
- package/es/components/mention/src/mention2.mjs +285 -65
- package/es/components/mention/src/mention2.mjs.map +1 -1
- package/es/components/message/src/message.d.ts +1 -1
- package/es/components/message/src/message.vue.d.ts +3 -3
- package/es/components/message-box/src/index.vue.d.ts +1 -1
- package/es/components/notification/src/notification.d.ts +1 -1
- package/es/components/notification/src/notification.vue.d.ts +3 -3
- package/es/components/page-header/index.mjs +2 -2
- package/es/components/page-header/src/page-header.mjs +16 -97
- package/es/components/page-header/src/page-header.mjs.map +1 -1
- package/es/components/page-header/src/page-header2.mjs +97 -16
- package/es/components/page-header/src/page-header2.mjs.map +1 -1
- package/es/components/popconfirm/src/popconfirm.d.ts +2 -2
- package/es/components/popconfirm/src/popconfirm.mjs +1 -1
- package/es/components/popconfirm/src/popconfirm.vue.d.ts +6 -6
- package/es/components/popover/src/popover.vue.d.ts +1 -1
- package/es/components/popper/index.mjs +2 -2
- package/es/components/popper/src/popper.mjs +32 -22
- package/es/components/popper/src/popper.mjs.map +1 -1
- package/es/components/popper/src/popper2.mjs +22 -32
- package/es/components/popper/src/popper2.mjs.map +1 -1
- package/es/components/radio/index.mjs +2 -2
- package/es/components/radio/src/radio-button.mjs +1 -1
- package/es/components/radio/src/radio-group.mjs +1 -1
- package/es/components/radio/src/radio.mjs +74 -32
- package/es/components/radio/src/radio.mjs.map +1 -1
- package/es/components/radio/src/radio2.mjs +32 -74
- package/es/components/radio/src/radio2.mjs.map +1 -1
- package/es/components/rate/index.mjs +2 -2
- package/es/components/rate/src/rate.mjs +258 -83
- package/es/components/rate/src/rate.mjs.map +1 -1
- package/es/components/rate/src/rate2.mjs +83 -258
- package/es/components/rate/src/rate2.mjs.map +1 -1
- package/es/components/result/index.mjs +2 -2
- package/es/components/result/src/result.d.ts +1 -1
- package/es/components/result/src/result.mjs +62 -30
- package/es/components/result/src/result.mjs.map +1 -1
- package/es/components/result/src/result.vue.d.ts +3 -3
- package/es/components/result/src/result2.mjs +30 -62
- package/es/components/result/src/result2.mjs.map +1 -1
- package/es/components/roving-focus-group/index.mjs +3 -3
- package/es/components/roving-focus-group/src/roving-focus-group-impl.mjs +1 -1
- package/es/components/roving-focus-group/src/roving-focus-group.mjs +27 -27
- package/es/components/roving-focus-group/src/roving-focus-group.mjs.map +1 -1
- package/es/components/roving-focus-group/src/roving-focus-group2.mjs +27 -27
- package/es/components/roving-focus-group/src/roving-focus-group2.mjs.map +1 -1
- package/es/components/roving-focus-group/src/roving-focus-item.mjs +1 -1
- package/es/components/select/src/select.d.ts +1 -1
- package/es/components/select/src/select.vue.d.ts +5 -5
- package/es/components/select/src/useSelect.d.ts +2 -2
- package/es/components/select/src/useSelect.mjs +11 -13
- package/es/components/select/src/useSelect.mjs.map +1 -1
- package/es/components/select-v2/src/defaults.d.ts +1 -1
- package/es/components/select-v2/src/select.vue.d.ts +5 -5
- package/es/components/select-v2/src/useSelect.d.ts +2 -2
- package/es/components/select-v2/src/useSelect.mjs +2 -4
- package/es/components/select-v2/src/useSelect.mjs.map +1 -1
- package/es/components/skeleton/index.mjs +4 -4
- package/es/components/skeleton/src/skeleton-item.mjs +22 -17
- package/es/components/skeleton/src/skeleton-item.mjs.map +1 -1
- package/es/components/skeleton/src/skeleton-item2.mjs +17 -22
- package/es/components/skeleton/src/skeleton-item2.mjs.map +1 -1
- package/es/components/skeleton/src/skeleton.mjs +48 -21
- package/es/components/skeleton/src/skeleton.mjs.map +1 -1
- package/es/components/skeleton/src/skeleton2.mjs +21 -48
- package/es/components/skeleton/src/skeleton2.mjs.map +1 -1
- package/es/components/slider/src/button.mjs +91 -19
- package/es/components/slider/src/button.mjs.map +1 -1
- package/es/components/slider/src/button2.mjs +19 -91
- package/es/components/slider/src/button2.mjs.map +1 -1
- package/es/components/slider/src/slider2.mjs +1 -1
- package/es/components/splitter/index.mjs +2 -2
- package/es/components/splitter/src/split-panel.mjs +19 -150
- package/es/components/splitter/src/split-panel.mjs.map +1 -1
- package/es/components/splitter/src/split-panel2.mjs +150 -19
- package/es/components/splitter/src/split-panel2.mjs.map +1 -1
- package/es/components/switch/index.mjs +2 -2
- package/es/components/switch/src/switch.mjs +72 -228
- package/es/components/switch/src/switch.mjs.map +1 -1
- package/es/components/switch/src/switch2.mjs +228 -72
- package/es/components/switch/src/switch2.mjs.map +1 -1
- package/es/components/table/src/config.d.ts +12 -11
- package/es/components/table/src/config.mjs +12 -4
- package/es/components/table/src/config.mjs.map +1 -1
- package/es/components/table/src/filter-panel.mjs +15 -9
- package/es/components/table/src/filter-panel.mjs.map +1 -1
- package/es/components/table/src/filter-panel.vue.d.ts +11 -7
- package/es/components/table/src/h-helper.d.ts +8 -1
- package/es/components/table/src/h-helper.mjs.map +1 -1
- package/es/components/table/src/layout-observer.d.ts +2 -2
- package/es/components/table/src/layout-observer.mjs.map +1 -1
- package/es/components/table/src/store/current.d.ts +4 -3
- package/es/components/table/src/store/current.mjs +4 -3
- package/es/components/table/src/store/current.mjs.map +1 -1
- package/es/components/table/src/store/helper.d.ts +24 -24
- package/es/components/table/src/store/helper.mjs +8 -8
- package/es/components/table/src/store/helper.mjs.map +1 -1
- package/es/components/table/src/store/index.d.ts +44 -44
- package/es/components/table/src/store/watcher.d.ts +2 -2
- package/es/components/table/src/table/utils-helper.d.ts +3 -2
- package/es/components/table/src/table/utils-helper.mjs.map +1 -1
- package/es/components/table/src/table-body/defaults.d.ts +6 -6
- package/es/components/table/src/table-body/defaults.mjs.map +1 -1
- package/es/components/table/src/table-body/index.d.ts +12 -12
- package/es/components/table/src/table-header/index.d.ts +1 -1
- package/es/components/table/src/table-header/index.mjs.map +1 -1
- package/es/components/table/src/table.vue.d.ts +16 -16
- package/es/components/tabs/src/constants.d.ts +4 -2
- package/es/components/tabs/src/constants.mjs.map +1 -1
- package/es/components/tabs/src/tab-bar.d.ts +22 -4
- package/es/components/tabs/src/tab-bar.mjs +4 -0
- package/es/components/tabs/src/tab-bar.mjs.map +1 -1
- package/es/components/tabs/src/tab-bar.vue.d.ts +48 -9
- package/es/components/tabs/src/tab-bar2.mjs +8 -16
- package/es/components/tabs/src/tab-bar2.mjs.map +1 -1
- package/es/components/tabs/src/tab-nav.d.ts +33 -18
- package/es/components/tabs/src/tab-nav.mjs +16 -3
- package/es/components/tabs/src/tab-nav.mjs.map +1 -1
- package/es/components/tabs/src/tab-pane2.mjs +9 -1
- package/es/components/tabs/src/tab-pane2.mjs.map +1 -1
- package/es/components/tabs/src/tabs.d.ts +3 -3
- package/es/components/tabs/src/tabs.mjs +6 -2
- package/es/components/tabs/src/tabs.mjs.map +1 -1
- package/es/components/tag/src/tag.d.ts +1 -1
- package/es/components/tag/src/tag.vue.d.ts +3 -3
- package/es/components/teleport/index.mjs +2 -2
- package/es/components/teleport/src/teleport.mjs +8 -18
- package/es/components/teleport/src/teleport.mjs.map +1 -1
- package/es/components/teleport/src/teleport2.mjs +18 -8
- package/es/components/teleport/src/teleport2.mjs.map +1 -1
- package/es/components/text/src/text.d.ts +1 -1
- package/es/components/text/src/text.vue.d.ts +3 -3
- package/es/components/time-picker/src/common/picker-range-trigger.mjs +5 -2
- package/es/components/time-picker/src/common/picker-range-trigger.mjs.map +1 -1
- package/es/components/time-picker/src/common/picker.mjs +5 -4
- package/es/components/time-picker/src/common/picker.mjs.map +1 -1
- package/es/components/timeline/src/timeline-item.d.ts +1 -1
- package/es/components/timeline/src/timeline-item.vue.d.ts +3 -3
- package/es/components/tooltip/src/content.mjs +1 -1
- package/es/components/tooltip/src/tooltip.mjs +1 -1
- package/es/components/tooltip/src/tooltip.vue.d.ts +1 -1
- package/es/components/tour/src/tour.mjs +1 -1
- package/es/hooks/use-focus-controller/index.d.ts +3 -1
- package/es/hooks/use-focus-controller/index.mjs +6 -7
- package/es/hooks/use-focus-controller/index.mjs.map +1 -1
- package/es/index.d.ts +234 -159
- package/es/index.mjs +17 -17
- package/es/version.d.ts +1 -1
- package/es/version.mjs +1 -1
- package/es/version.mjs.map +1 -1
- package/lib/components/alert/src/alert.d.ts +1 -1
- package/lib/components/alert/src/alert.vue.d.ts +3 -3
- package/lib/components/badge/src/badge.d.ts +1 -1
- package/lib/components/badge/src/badge.vue.d.ts +3 -3
- package/lib/components/button/index.js +2 -2
- package/lib/components/button/src/button-group.d.ts +1 -1
- package/lib/components/button/src/button-group.js +1 -1
- package/lib/components/button/src/button-group.vue.d.ts +3 -3
- package/lib/components/button/src/button.d.ts +1 -1
- package/lib/components/button/src/button.js +65 -87
- package/lib/components/button/src/button.js.map +1 -1
- package/lib/components/button/src/button.vue.d.ts +3 -3
- package/lib/components/button/src/button2.js +87 -65
- package/lib/components/button/src/button2.js.map +1 -1
- package/lib/components/calendar/src/calendar2.js +1 -1
- package/lib/components/calendar/src/date-table.js +89 -35
- package/lib/components/calendar/src/date-table.js.map +1 -1
- package/lib/components/calendar/src/date-table2.js +35 -89
- package/lib/components/calendar/src/date-table2.js.map +1 -1
- package/lib/components/calendar/src/use-date-table.js +1 -1
- package/lib/components/cascader/src/cascader.d.ts +1 -1
- package/lib/components/cascader/src/cascader.vue.d.ts +3 -3
- package/lib/components/check-tag/src/check-tag.d.ts +1 -1
- package/lib/components/check-tag/src/check-tag.vue.d.ts +3 -3
- package/lib/components/collapse/index.js +2 -2
- package/lib/components/collapse/src/collapse.js +28 -25
- package/lib/components/collapse/src/collapse.js.map +1 -1
- package/lib/components/collapse/src/collapse2.js +25 -28
- package/lib/components/collapse/src/collapse2.js.map +1 -1
- package/lib/components/color-picker/src/color-picker2.js +1 -3
- package/lib/components/color-picker/src/color-picker2.js.map +1 -1
- package/lib/components/descriptions/src/description-item.d.ts +1 -1
- package/lib/components/dialog/src/dialog.js +1 -1
- package/lib/components/drawer/index.js +2 -2
- package/lib/components/drawer/src/drawer.js +178 -27
- package/lib/components/drawer/src/drawer.js.map +1 -1
- package/lib/components/drawer/src/drawer2.js +27 -178
- package/lib/components/drawer/src/drawer2.js.map +1 -1
- package/lib/components/dropdown/src/dropdown-item-impl.js +1 -1
- package/lib/components/dropdown/src/dropdown-menu.js +1 -1
- package/lib/components/dropdown/src/dropdown.d.ts +1 -1
- package/lib/components/dropdown/src/dropdown.js +1 -1
- package/lib/components/dropdown/src/dropdown.vue.d.ts +3 -3
- package/lib/components/dropdown/src/dropdown2.js +1 -1
- package/lib/components/empty/index.js +2 -2
- package/lib/components/empty/src/empty.js +52 -11
- package/lib/components/empty/src/empty.js.map +1 -1
- package/lib/components/empty/src/empty2.js +11 -52
- package/lib/components/empty/src/empty2.js.map +1 -1
- package/lib/components/form/src/form-item.d.ts +1 -1
- package/lib/components/form/src/form-item.vue.d.ts +3 -3
- package/lib/components/form/src/form.vue.d.ts +1 -1
- package/lib/components/index.js +17 -17
- package/lib/components/input/index.js +2 -2
- package/lib/components/input/src/input.js +104 -434
- package/lib/components/input/src/input.js.map +1 -1
- package/lib/components/input/src/input2.js +432 -104
- package/lib/components/input/src/input2.js.map +1 -1
- package/lib/components/input-number/index.js +2 -2
- package/lib/components/input-number/src/input-number.js +64 -346
- package/lib/components/input-number/src/input-number.js.map +1 -1
- package/lib/components/input-number/src/input-number2.js +346 -64
- package/lib/components/input-number/src/input-number2.js.map +1 -1
- package/lib/components/input-tag/index.js +2 -2
- package/lib/components/input-tag/src/composables/use-input-tag.js +1 -3
- package/lib/components/input-tag/src/composables/use-input-tag.js.map +1 -1
- package/lib/components/input-tag/src/input-tag.d.ts +1 -1
- package/lib/components/input-tag/src/input-tag.js +73 -214
- package/lib/components/input-tag/src/input-tag.js.map +1 -1
- package/lib/components/input-tag/src/input-tag.vue.d.ts +4 -4
- package/lib/components/input-tag/src/input-tag2.js +214 -73
- package/lib/components/input-tag/src/input-tag2.js.map +1 -1
- package/lib/components/link/src/link.d.ts +1 -1
- package/lib/components/link/src/link.vue.d.ts +3 -3
- package/lib/components/loading/src/directive.js +22 -15
- package/lib/components/loading/src/directive.js.map +1 -1
- package/lib/components/mention/index.js +2 -2
- package/lib/components/mention/src/mention.js +64 -285
- package/lib/components/mention/src/mention.js.map +1 -1
- package/lib/components/mention/src/mention2.js +283 -64
- package/lib/components/mention/src/mention2.js.map +1 -1
- package/lib/components/message/src/message.d.ts +1 -1
- package/lib/components/message/src/message.vue.d.ts +3 -3
- package/lib/components/message-box/src/index.vue.d.ts +1 -1
- package/lib/components/notification/src/notification.d.ts +1 -1
- package/lib/components/notification/src/notification.vue.d.ts +3 -3
- package/lib/components/page-header/index.js +2 -2
- package/lib/components/page-header/src/page-header.js +17 -97
- package/lib/components/page-header/src/page-header.js.map +1 -1
- package/lib/components/page-header/src/page-header2.js +97 -17
- package/lib/components/page-header/src/page-header2.js.map +1 -1
- package/lib/components/popconfirm/src/popconfirm.d.ts +2 -2
- package/lib/components/popconfirm/src/popconfirm.js +1 -1
- package/lib/components/popconfirm/src/popconfirm.vue.d.ts +6 -6
- package/lib/components/popover/src/popover.vue.d.ts +1 -1
- package/lib/components/popper/index.js +2 -2
- package/lib/components/popper/src/popper.js +32 -25
- package/lib/components/popper/src/popper.js.map +1 -1
- package/lib/components/popper/src/popper2.js +25 -32
- package/lib/components/popper/src/popper2.js.map +1 -1
- package/lib/components/radio/index.js +2 -2
- package/lib/components/radio/src/radio-button.js +1 -1
- package/lib/components/radio/src/radio-group.js +1 -1
- package/lib/components/radio/src/radio.js +73 -33
- package/lib/components/radio/src/radio.js.map +1 -1
- package/lib/components/radio/src/radio2.js +33 -73
- package/lib/components/radio/src/radio2.js.map +1 -1
- package/lib/components/rate/index.js +2 -2
- package/lib/components/rate/src/rate.js +257 -83
- package/lib/components/rate/src/rate.js.map +1 -1
- package/lib/components/rate/src/rate2.js +83 -257
- package/lib/components/rate/src/rate2.js.map +1 -1
- package/lib/components/result/index.js +2 -2
- package/lib/components/result/src/result.d.ts +1 -1
- package/lib/components/result/src/result.js +62 -32
- package/lib/components/result/src/result.js.map +1 -1
- package/lib/components/result/src/result.vue.d.ts +3 -3
- package/lib/components/result/src/result2.js +32 -62
- package/lib/components/result/src/result2.js.map +1 -1
- package/lib/components/roving-focus-group/index.js +2 -2
- package/lib/components/roving-focus-group/src/roving-focus-group-impl.js +1 -1
- package/lib/components/roving-focus-group/src/roving-focus-group.js +27 -31
- package/lib/components/roving-focus-group/src/roving-focus-group.js.map +1 -1
- package/lib/components/roving-focus-group/src/roving-focus-group2.js +31 -27
- package/lib/components/roving-focus-group/src/roving-focus-group2.js.map +1 -1
- package/lib/components/roving-focus-group/src/roving-focus-item.js +1 -1
- package/lib/components/select/src/select.d.ts +1 -1
- package/lib/components/select/src/select.vue.d.ts +5 -5
- package/lib/components/select/src/useSelect.d.ts +2 -2
- package/lib/components/select/src/useSelect.js +15 -17
- package/lib/components/select/src/useSelect.js.map +1 -1
- package/lib/components/select-v2/src/defaults.d.ts +1 -1
- package/lib/components/select-v2/src/select.vue.d.ts +5 -5
- package/lib/components/select-v2/src/useSelect.d.ts +2 -2
- package/lib/components/select-v2/src/useSelect.js +2 -4
- package/lib/components/select-v2/src/useSelect.js.map +1 -1
- package/lib/components/skeleton/index.js +4 -4
- package/lib/components/skeleton/src/skeleton-item.js +22 -17
- package/lib/components/skeleton/src/skeleton-item.js.map +1 -1
- package/lib/components/skeleton/src/skeleton-item2.js +17 -22
- package/lib/components/skeleton/src/skeleton-item2.js.map +1 -1
- package/lib/components/skeleton/src/skeleton.js +48 -21
- package/lib/components/skeleton/src/skeleton.js.map +1 -1
- package/lib/components/skeleton/src/skeleton2.js +21 -48
- package/lib/components/skeleton/src/skeleton2.js.map +1 -1
- package/lib/components/slider/src/button.js +91 -20
- package/lib/components/slider/src/button.js.map +1 -1
- package/lib/components/slider/src/button2.js +20 -91
- package/lib/components/slider/src/button2.js.map +1 -1
- package/lib/components/slider/src/slider2.js +1 -1
- package/lib/components/splitter/index.js +2 -2
- package/lib/components/splitter/src/split-panel.js +19 -150
- package/lib/components/splitter/src/split-panel.js.map +1 -1
- package/lib/components/splitter/src/split-panel2.js +150 -19
- package/lib/components/splitter/src/split-panel2.js.map +1 -1
- package/lib/components/switch/index.js +2 -2
- package/lib/components/switch/src/switch.js +72 -227
- package/lib/components/switch/src/switch.js.map +1 -1
- package/lib/components/switch/src/switch2.js +227 -72
- package/lib/components/switch/src/switch2.js.map +1 -1
- package/lib/components/table/src/config.d.ts +12 -11
- package/lib/components/table/src/config.js +12 -4
- package/lib/components/table/src/config.js.map +1 -1
- package/lib/components/table/src/filter-panel.js +15 -9
- package/lib/components/table/src/filter-panel.js.map +1 -1
- package/lib/components/table/src/filter-panel.vue.d.ts +11 -7
- package/lib/components/table/src/h-helper.d.ts +8 -1
- package/lib/components/table/src/h-helper.js.map +1 -1
- package/lib/components/table/src/layout-observer.d.ts +2 -2
- package/lib/components/table/src/layout-observer.js.map +1 -1
- package/lib/components/table/src/store/current.d.ts +4 -3
- package/lib/components/table/src/store/current.js +4 -3
- package/lib/components/table/src/store/current.js.map +1 -1
- package/lib/components/table/src/store/helper.d.ts +24 -24
- package/lib/components/table/src/store/helper.js +8 -8
- package/lib/components/table/src/store/helper.js.map +1 -1
- package/lib/components/table/src/store/index.d.ts +44 -44
- package/lib/components/table/src/store/watcher.d.ts +2 -2
- package/lib/components/table/src/table/utils-helper.d.ts +3 -2
- package/lib/components/table/src/table/utils-helper.js.map +1 -1
- package/lib/components/table/src/table-body/defaults.d.ts +6 -6
- package/lib/components/table/src/table-body/defaults.js.map +1 -1
- package/lib/components/table/src/table-body/index.d.ts +12 -12
- package/lib/components/table/src/table-header/index.d.ts +1 -1
- package/lib/components/table/src/table-header/index.js.map +1 -1
- package/lib/components/table/src/table.vue.d.ts +16 -16
- package/lib/components/tabs/src/constants.d.ts +4 -2
- package/lib/components/tabs/src/constants.js.map +1 -1
- package/lib/components/tabs/src/tab-bar.d.ts +22 -4
- package/lib/components/tabs/src/tab-bar.js +4 -0
- package/lib/components/tabs/src/tab-bar.js.map +1 -1
- package/lib/components/tabs/src/tab-bar.vue.d.ts +48 -9
- package/lib/components/tabs/src/tab-bar2.js +7 -15
- package/lib/components/tabs/src/tab-bar2.js.map +1 -1
- package/lib/components/tabs/src/tab-nav.d.ts +33 -18
- package/lib/components/tabs/src/tab-nav.js +16 -3
- package/lib/components/tabs/src/tab-nav.js.map +1 -1
- package/lib/components/tabs/src/tab-pane2.js +9 -1
- package/lib/components/tabs/src/tab-pane2.js.map +1 -1
- package/lib/components/tabs/src/tabs.d.ts +3 -3
- package/lib/components/tabs/src/tabs.js +6 -2
- package/lib/components/tabs/src/tabs.js.map +1 -1
- package/lib/components/tag/src/tag.d.ts +1 -1
- package/lib/components/tag/src/tag.vue.d.ts +3 -3
- package/lib/components/teleport/index.js +2 -2
- package/lib/components/teleport/src/teleport.js +8 -18
- package/lib/components/teleport/src/teleport.js.map +1 -1
- package/lib/components/teleport/src/teleport2.js +18 -8
- package/lib/components/teleport/src/teleport2.js.map +1 -1
- package/lib/components/text/src/text.d.ts +1 -1
- package/lib/components/text/src/text.vue.d.ts +3 -3
- package/lib/components/time-picker/src/common/picker-range-trigger.js +4 -1
- package/lib/components/time-picker/src/common/picker-range-trigger.js.map +1 -1
- package/lib/components/time-picker/src/common/picker.js +5 -4
- package/lib/components/time-picker/src/common/picker.js.map +1 -1
- package/lib/components/timeline/src/timeline-item.d.ts +1 -1
- package/lib/components/timeline/src/timeline-item.vue.d.ts +3 -3
- package/lib/components/tooltip/src/content.js +1 -1
- package/lib/components/tooltip/src/tooltip.js +1 -1
- package/lib/components/tooltip/src/tooltip.vue.d.ts +1 -1
- package/lib/components/tour/src/tour.js +1 -1
- package/lib/hooks/use-focus-controller/index.d.ts +3 -1
- package/lib/hooks/use-focus-controller/index.js +5 -6
- package/lib/hooks/use-focus-controller/index.js.map +1 -1
- package/lib/index.d.ts +234 -159
- package/lib/index.js +17 -17
- package/lib/version.d.ts +1 -1
- package/lib/version.js +1 -1
- package/lib/version.js.map +1 -1
- package/package.json +2 -2
- package/web-types.json +1 -1
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"filter-panel.js","sources":["../../../../../../packages/components/table/src/filter-panel.vue"],"sourcesContent":["<template>\n <el-tooltip\n ref=\"tooltip\"\n :visible=\"tooltipVisible\"\n :offset=\"0\"\n :placement=\"placement\"\n :show-arrow=\"false\"\n :stop-popper-mouse-event=\"false\"\n teleported\n effect=\"light\"\n pure\n :popper-class=\"filterClassName\"\n persistent\n :append-to=\"appendTo\"\n >\n <template #content>\n <div v-if=\"multiple\">\n <div :class=\"ns.e('content')\">\n <el-scrollbar :wrap-class=\"ns.e('wrap')\">\n <el-checkbox-group\n v-model=\"filteredValue\"\n :class=\"ns.e('checkbox-group')\"\n >\n <el-checkbox\n v-for=\"filter in filters\"\n :key=\"filter.value\"\n :value=\"filter.value\"\n >\n {{ filter.text }}\n </el-checkbox>\n </el-checkbox-group>\n </el-scrollbar>\n </div>\n <div :class=\"ns.e('bottom')\">\n <button\n :class=\"{ [ns.is('disabled')]: filteredValue.length === 0 }\"\n :disabled=\"filteredValue.length === 0\"\n type=\"button\"\n @click=\"handleConfirm\"\n >\n {{ t('el.table.confirmFilter') }}\n </button>\n <button type=\"button\" @click=\"handleReset\">\n {{ t('el.table.resetFilter') }}\n </button>\n </div>\n </div>\n <ul v-else :class=\"ns.e('list')\">\n <li\n :class=\"[\n ns.e('list-item'),\n {\n [ns.is('active')]: isPropAbsent(filterValue),\n },\n ]\"\n @click=\"handleSelect(null)\"\n >\n {{ t('el.table.clearFilter') }}\n </li>\n <li\n v-for=\"filter in filters\"\n :key=\"filter.value\"\n :class=\"[ns.e('list-item'), ns.is('active', isActive(filter))]\"\n :label=\"filter.value\"\n @click=\"handleSelect(filter.value)\"\n >\n {{ filter.text }}\n </li>\n </ul>\n </template>\n <template #default>\n <span\n v-click-outside:[popperPaneRef]=\"hideFilterPanel\"\n :class=\"[\n `${ns.namespace.value}-table__column-filter-trigger`,\n `${ns.namespace.value}-none-outline`,\n ]\"\n @click=\"showFilterPanel\"\n >\n <el-icon>\n <slot name=\"filter-icon\">\n <arrow-up v-if=\"column.filterOpened\" />\n <arrow-down v-else />\n </slot>\n </el-icon>\n </span>\n </template>\n </el-tooltip>\n</template>\n\n<script lang=\"ts\">\n// @ts-nocheck\nimport { computed, defineComponent, getCurrentInstance, ref, watch } from 'vue'\nimport ElCheckbox from '@element-plus/components/checkbox'\nimport { ElIcon } from '@element-plus/components/icon'\nimport { ArrowDown, ArrowUp } from '@element-plus/icons-vue'\nimport { ClickOutside } from '@element-plus/directives'\nimport { useLocale, useNamespace } from '@element-plus/hooks'\nimport ElTooltip, {\n useTooltipContentProps,\n} from '@element-plus/components/tooltip'\nimport ElScrollbar from '@element-plus/components/scrollbar'\nimport { isPropAbsent } from '@element-plus/utils'\n\nimport type { TooltipInstance } from '@element-plus/components/tooltip'\nimport type { Placement } from '@element-plus/components/popper'\nimport type { PropType, WritableComputedRef } from 'vue'\nimport type { TableColumnCtx } from './table-column/defaults'\nimport type { TableHeader } from './table-header'\nimport type { Store } from './store'\n\nconst { CheckboxGroup: ElCheckboxGroup } = ElCheckbox\n\nexport default defineComponent({\n name: 'ElTableFilterPanel',\n components: {\n ElCheckbox,\n ElCheckboxGroup,\n ElScrollbar,\n ElTooltip,\n ElIcon,\n ArrowDown,\n ArrowUp,\n },\n directives: { ClickOutside },\n props: {\n placement: {\n type: String as PropType<Placement>,\n default: 'bottom-start',\n },\n store: {\n type: Object as PropType<Store<unknown>>,\n },\n column: {\n type: Object as PropType<TableColumnCtx<unknown>>,\n },\n upDataColumn: {\n type: Function,\n },\n appendTo: useTooltipContentProps.appendTo,\n },\n setup(props) {\n const instance = getCurrentInstance()\n const { t } = useLocale()\n const ns = useNamespace('table-filter')\n const parent = instance?.parent as TableHeader\n if (!parent.filterPanels.value[props.column.id]) {\n parent.filterPanels.value[props.column.id] = instance\n }\n const tooltipVisible = ref(false)\n const tooltip = ref<TooltipInstance | null>(null)\n const filters = computed(() => {\n return props.column && props.column.filters\n })\n const filterClassName = computed(() => {\n if (props.column.filterClassName) {\n return `${ns.b()} ${props.column.filterClassName}`\n }\n return ns.b()\n })\n const filterValue = computed({\n get: () => (props.column?.filteredValue || [])[0],\n set: (value: string) => {\n if (filteredValue.value) {\n if (!isPropAbsent(value)) {\n filteredValue.value.splice(0, 1, value)\n } else {\n filteredValue.value.splice(0, 1)\n }\n }\n },\n })\n const filteredValue: WritableComputedRef<unknown[]> = computed({\n get() {\n if (props.column) {\n return props.column.filteredValue || []\n }\n return []\n },\n set(value: unknown[]) {\n if (props.column) {\n props.upDataColumn('filteredValue', value)\n }\n },\n })\n const multiple = computed(() => {\n if (props.column) {\n return props.column.filterMultiple\n }\n return true\n })\n const isActive = (filter) => {\n return filter.value === filterValue.value\n }\n const hidden = () => {\n tooltipVisible.value = false\n }\n const showFilterPanel = (e: MouseEvent) => {\n e.stopPropagation()\n tooltipVisible.value = !tooltipVisible.value\n }\n const hideFilterPanel = () => {\n tooltipVisible.value = false\n }\n const handleConfirm = () => {\n confirmFilter(filteredValue.value)\n hidden()\n }\n const handleReset = () => {\n filteredValue.value = []\n confirmFilter(filteredValue.value)\n hidden()\n }\n const handleSelect = (_filterValue?: string) => {\n filterValue.value = _filterValue\n if (!isPropAbsent(_filterValue)) {\n confirmFilter(filteredValue.value)\n } else {\n confirmFilter([])\n }\n hidden()\n }\n const confirmFilter = (filteredValue: unknown[]) => {\n props.store.commit('filterChange', {\n column: props.column,\n values: filteredValue,\n })\n props.store.updateAllSelected()\n }\n watch(\n tooltipVisible,\n (value) => {\n if (props.column) {\n props.upDataColumn('filterOpened', value)\n }\n },\n {\n immediate: true,\n }\n )\n\n const popperPaneRef = computed(() => {\n return tooltip.value?.popperRef?.contentRef\n })\n\n return {\n tooltipVisible,\n multiple,\n filterClassName,\n filteredValue,\n filterValue,\n filters,\n handleConfirm,\n handleReset,\n handleSelect,\n isPropAbsent,\n isActive,\n t,\n ns,\n showFilterPanel,\n hideFilterPanel,\n popperPaneRef,\n tooltip,\n }\n },\n})\n</script>\n"],"names":["ElCheckbox","defineComponent","ElScrollbar","ElTooltip","ElIcon","ArrowDown","ArrowUp","ClickOutside","useTooltipContentProps","getCurrentInstance","useLocale","useNamespace","ref","computed","isPropAbsent","filteredValue","watch","_createBlock","_withCtx","_createElementBlock","_createElementVNode","_normalizeClass","_createVNode","_openBlock","_Fragment","_renderList","_createTextVNode","_toDisplayString","_renderSlot"],"mappings":";;;;;;;;;;;;;;;;;AA+GA,MAAM,EAAE,aAAe,EAAA,eAAA,EAAoB,GAAAA,gBAAA,CAAA;AAE3C,MAAK,YAAaC,mBAAa,CAAA;AAAA,EAC7B,IAAM,EAAA,oBAAA;AAAA,EACN,UAAY,EAAA;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AAA,EAAAN,eAAA,CAAA,mBAAA,EAAA,EAAA,GAAA,EAAA,CAAA,EAAA,CAAA,KAAAM,aAAA,EAAA,EAAAN,eAAA,CAAA,qBAAA,EAAA,EAAA,GAAA,EAAA,CAAA,EAAA,CAAA,CAAA;AAAA,aAAA,CAAA;;AAAsF,UAAA,CAAA,EAAA,CAAA;;AAM/G,OAAA,EAAA,EAAA,EAAA,CAAA;AAAmB,QAAA,CAAA,wBAEhB,EAAA,IAAA,CAAA,eAAA,EAAA,IAAA,CAAA,aAAA,CAAA;AAAA,OAEN,CAAA;AAAA,KAQK,CAAA;AAAA,IAAA,CAAA,EAAA,CAAA;AAAA,GAPc,EAAA,CAAA,EAAA,CAAA,SAAA,EAAA,WAAA,EAAA,cAAJ,EAAA,WAAA,CAAA,CAAA,CAAA;;AACA,kBACZ,iDAAW,CAAA,qBAAgB,EAAG,WAAa,CAAA,EAAA,CAAA,QAAA,EAAA,kBAAe,CAAA,CAAA,CAAA;;;;"}
|
1
|
+
{"version":3,"file":"filter-panel.js","sources":["../../../../../../packages/components/table/src/filter-panel.vue"],"sourcesContent":["<template>\n <el-tooltip\n ref=\"tooltip\"\n :visible=\"tooltipVisible\"\n :offset=\"0\"\n :placement=\"placement\"\n :show-arrow=\"false\"\n :stop-popper-mouse-event=\"false\"\n teleported\n effect=\"light\"\n pure\n :popper-class=\"filterClassName\"\n persistent\n :append-to=\"appendTo\"\n >\n <template #content>\n <div v-if=\"multiple\">\n <div :class=\"ns.e('content')\">\n <el-scrollbar :wrap-class=\"ns.e('wrap')\">\n <el-checkbox-group\n v-model=\"filteredValue\"\n :class=\"ns.e('checkbox-group')\"\n >\n <el-checkbox\n v-for=\"filter in filters\"\n :key=\"filter.value\"\n :value=\"filter.value\"\n >\n {{ filter.text }}\n </el-checkbox>\n </el-checkbox-group>\n </el-scrollbar>\n </div>\n <div :class=\"ns.e('bottom')\">\n <button\n :class=\"{ [ns.is('disabled')]: filteredValue.length === 0 }\"\n :disabled=\"filteredValue.length === 0\"\n type=\"button\"\n @click=\"handleConfirm\"\n >\n {{ t('el.table.confirmFilter') }}\n </button>\n <button type=\"button\" @click=\"handleReset\">\n {{ t('el.table.resetFilter') }}\n </button>\n </div>\n </div>\n <ul v-else :class=\"ns.e('list')\">\n <li\n :class=\"[\n ns.e('list-item'),\n {\n [ns.is('active')]: isPropAbsent(filterValue),\n },\n ]\"\n @click=\"handleSelect(null)\"\n >\n {{ t('el.table.clearFilter') }}\n </li>\n <li\n v-for=\"filter in filters\"\n :key=\"filter.value\"\n :class=\"[ns.e('list-item'), ns.is('active', isActive(filter))]\"\n :label=\"filter.value\"\n @click=\"handleSelect(filter.value)\"\n >\n {{ filter.text }}\n </li>\n </ul>\n </template>\n <template #default>\n <span\n v-click-outside:[popperPaneRef]=\"hideFilterPanel\"\n :class=\"[\n `${ns.namespace.value}-table__column-filter-trigger`,\n `${ns.namespace.value}-none-outline`,\n ]\"\n @click=\"showFilterPanel\"\n >\n <el-icon>\n <slot name=\"filter-icon\">\n <arrow-up v-if=\"column?.filterOpened\" />\n <arrow-down v-else />\n </slot>\n </el-icon>\n </span>\n </template>\n </el-tooltip>\n</template>\n\n<script lang=\"ts\">\nimport { computed, defineComponent, getCurrentInstance, ref, watch } from 'vue'\nimport ElCheckbox from '@element-plus/components/checkbox'\nimport { ElIcon } from '@element-plus/components/icon'\nimport { ArrowDown, ArrowUp } from '@element-plus/icons-vue'\nimport { ClickOutside } from '@element-plus/directives'\nimport { useLocale, useNamespace } from '@element-plus/hooks'\nimport ElTooltip, {\n useTooltipContentProps,\n} from '@element-plus/components/tooltip'\nimport ElScrollbar from '@element-plus/components/scrollbar'\nimport { isPropAbsent } from '@element-plus/utils'\n\nimport type { DefaultRow } from './table/defaults'\nimport type { TooltipInstance } from '@element-plus/components/tooltip'\nimport type { Placement } from '@element-plus/components/popper'\nimport type { PropType, WritableComputedRef } from 'vue'\nimport type { TableColumnCtx } from './table-column/defaults'\nimport type { TableHeader } from './table-header'\nimport type { Store } from './store'\n\nconst { CheckboxGroup: ElCheckboxGroup } = ElCheckbox\n\nexport default defineComponent({\n name: 'ElTableFilterPanel',\n components: {\n ElCheckbox,\n ElCheckboxGroup,\n ElScrollbar,\n ElTooltip,\n ElIcon,\n ArrowDown,\n ArrowUp,\n },\n directives: { ClickOutside },\n props: {\n placement: {\n type: String as PropType<Placement>,\n default: 'bottom-start',\n },\n store: {\n type: Object as PropType<Store<DefaultRow>>,\n },\n column: {\n type: Object as PropType<TableColumnCtx<DefaultRow>>,\n },\n upDataColumn: {\n type: Function,\n },\n appendTo: useTooltipContentProps.appendTo,\n },\n setup(props) {\n const instance = getCurrentInstance()\n const { t } = useLocale()\n const ns = useNamespace('table-filter')\n const parent = instance?.parent as TableHeader\n if (props.column && !parent.filterPanels.value[props.column.id]) {\n parent.filterPanels.value[props.column.id] = instance\n }\n const tooltipVisible = ref(false)\n const tooltip = ref<TooltipInstance | null>(null)\n const filters = computed(() => {\n return props.column && props.column.filters\n })\n const filterClassName = computed(() => {\n if (props.column && props.column.filterClassName) {\n return `${ns.b()} ${props.column.filterClassName}`\n }\n return ns.b()\n })\n const filterValue = computed({\n get: () => (props.column?.filteredValue || [])[0],\n set: (value?: string | null) => {\n if (filteredValue.value) {\n if (!isPropAbsent(value)) {\n filteredValue.value.splice(0, 1, value)\n } else {\n filteredValue.value.splice(0, 1)\n }\n }\n },\n })\n const filteredValue: WritableComputedRef<string[]> = computed({\n get() {\n if (props.column) {\n return props.column.filteredValue || []\n }\n return []\n },\n set(value: string[]) {\n if (props.column) {\n props.upDataColumn?.('filteredValue', value)\n }\n },\n })\n const multiple = computed(() => {\n if (props.column) {\n return props.column.filterMultiple\n }\n return true\n })\n const isActive = (filter: { value: string; text: string }) => {\n return filter.value === filterValue.value\n }\n const hidden = () => {\n tooltipVisible.value = false\n }\n const showFilterPanel = (e: MouseEvent) => {\n e.stopPropagation()\n tooltipVisible.value = !tooltipVisible.value\n }\n const hideFilterPanel = () => {\n tooltipVisible.value = false\n }\n const handleConfirm = () => {\n confirmFilter(filteredValue.value)\n hidden()\n }\n const handleReset = () => {\n filteredValue.value = []\n confirmFilter(filteredValue.value)\n hidden()\n }\n const handleSelect = (_filterValue?: string | null) => {\n filterValue.value = _filterValue!\n if (!isPropAbsent(_filterValue)) {\n confirmFilter(filteredValue.value)\n } else {\n confirmFilter([])\n }\n hidden()\n }\n const confirmFilter = (filteredValue: unknown[]) => {\n props.store?.commit('filterChange', {\n column: props.column,\n values: filteredValue,\n })\n props.store?.updateAllSelected()\n }\n watch(\n tooltipVisible,\n (value) => {\n if (props.column) {\n props.upDataColumn?.('filterOpened', value)\n }\n },\n {\n immediate: true,\n }\n )\n\n const popperPaneRef = computed(() => {\n return tooltip.value?.popperRef?.contentRef\n })\n\n return {\n tooltipVisible,\n multiple,\n filterClassName,\n filteredValue,\n filterValue,\n filters,\n handleConfirm,\n handleReset,\n handleSelect,\n isPropAbsent,\n isActive,\n t,\n ns,\n showFilterPanel,\n hideFilterPanel,\n popperPaneRef,\n tooltip,\n }\n },\n})\n</script>\n"],"names":["ElCheckbox","defineComponent","ElScrollbar","ElTooltip","ElIcon","ArrowDown","ArrowUp","ClickOutside","useTooltipContentProps","getCurrentInstance","useLocale","useNamespace","ref","computed","isPropAbsent","watch","_resolveComponent","_resolveDirective","_openBlock","_createBlock","_withCtx","_createElementBlock","_createElementVNode","_normalizeClass","_createVNode","_Fragment","_renderList","_createTextVNode","_toDisplayString","_withDirectives"],"mappings":";;;;;;;;;;;;;;;;;AA+GA,MAAM,EAAE,aAAe,EAAA,eAAA,EAAoB,GAAAA,gBAAA,CAAA;AAE3C,MAAK,YAAaC,mBAAa,CAAA;AAAA,EAC7B,IAAM,EAAA,oBAAA;AAAA,EACN,UAAY,EAAA;AAAA,gBACVD,gBAAA;AAAA,IACA,eAAA;AAAA,iBACAE,mBAAA;AAAA,eACAC,iBAAA;AAAA,YACAC,cAAA;AAAA,eACAC,kBAAA;AAAA,aACAC,gBAAA;AAAA,GACF;AAAA,EAC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AAA,EAAAE,kBAAA,CAAA;UArBO,CAAK,EAAA,IAAA,CAAA,EAAA,CAAA,SAAA,CAAA,mCAAM,CAAA;AAAA,UAAA,CAAA,EAAA,IAAA,CAAA,EAAA,CAAA,SAAA,CAAA,KAAA,CAAA,aAAA,CAAA;;eAWhB,EAAA,IAAA,CAAA,eAAA;AAAA,OAAA,EAAA;AATG,QAAAC,kCAAoB,EAAA,IAAA,EAAA;AAAA,UAAA,OAAA,EAAAJ,WAAA,CAAA,MAAA;0BAA+C,CAAA,IAAE,CAAa,MAAA,EAAA,aAAA,EAAA,EAAA,EAAA,MAAwB;AAAA,cAAA,IAAA,EAAA,CAAA;;AAM/G,gBAAA,CAAA,CAAA,EAAA,cAAmB,KAAA,IAAA,GAAA,KAAA,CAAA,GAAA,EAAA,CAAA,YAAA,KAAAF,aAAA,EAAA,EAAAC,eAAA,CAAA,mBAAA,EAAA,EAAA,GAAA,EAAA,CAAA,EAAA,CAAA,KAAAD,aAAA,EAAA,EAAAC,eAAA,CAAA,qBAAA,EAAA,EAAA,GAAA,EAAA,CAAA,EAAA,CAAA,CAAA;AAAA,eAAA,CAAA;AAEhB,aAEN,CAAA;AAAA,WAQK,CAAA;AAAA,UAAA,CAAA,EAAA,CAAA;AAAA,SAPc,CAAA;;AAOd,QAAA,CAAA,wBANU,EAAA,IAAA,CAAA,eAAA,EAAA,IAAA,CAAA,aAAA,CAAA;AAAA,OACZ,CAAA;AAA0D,KAAA,CAAA;AAC5C,IAAA,CAAA,EAAA,CAAA;AACkB,GAAA,EAAA,CAAA,EAAA,CAAA,SAAA,EAAA,WAAA,EAAA,cAEnB,EAAA,WAAA,CAAA,CAAA,CAAA;AAAA,CAAA;;;;;"}
|
@@ -1,3 +1,4 @@
|
|
1
|
+
import type { DefaultRow } from './table/defaults';
|
1
2
|
import type { TooltipInstance } from '@element-plus/nightly/es/components/tooltip';
|
2
3
|
import type { Placement } from '@element-plus/nightly/es/components/popper';
|
3
4
|
import type { PropType, WritableComputedRef } from 'vue';
|
@@ -9,10 +10,10 @@ declare const _default: import("vue").DefineComponent<{
|
|
9
10
|
default: string;
|
10
11
|
};
|
11
12
|
store: {
|
12
|
-
type: PropType<Store<
|
13
|
+
type: PropType<Store<DefaultRow>>;
|
13
14
|
};
|
14
15
|
column: {
|
15
|
-
type: PropType<TableColumnCtx<
|
16
|
+
type: PropType<TableColumnCtx<DefaultRow>>;
|
16
17
|
};
|
17
18
|
upDataColumn: {
|
18
19
|
type: FunctionConstructor;
|
@@ -27,14 +28,17 @@ declare const _default: import("vue").DefineComponent<{
|
|
27
28
|
tooltipVisible: import("vue").Ref<boolean>;
|
28
29
|
multiple: import("vue").ComputedRef<boolean>;
|
29
30
|
filterClassName: import("vue").ComputedRef<string>;
|
30
|
-
filteredValue: WritableComputedRef<
|
31
|
+
filteredValue: WritableComputedRef<string[]>;
|
31
32
|
filterValue: WritableComputedRef<string>;
|
32
33
|
filters: import("vue").ComputedRef<import("./table-column/defaults").Filters | undefined>;
|
33
34
|
handleConfirm: () => void;
|
34
35
|
handleReset: () => void;
|
35
|
-
handleSelect: (_filterValue?: string) => void;
|
36
|
+
handleSelect: (_filterValue?: string | null) => void;
|
36
37
|
isPropAbsent: (prop: unknown) => prop is null | undefined;
|
37
|
-
isActive: (filter:
|
38
|
+
isActive: (filter: {
|
39
|
+
value: string;
|
40
|
+
text: string;
|
41
|
+
}) => boolean;
|
38
42
|
t: import("@element-plus/nightly/es/hooks").Translator;
|
39
43
|
ns: {
|
40
44
|
namespace: import("vue").ComputedRef<string>;
|
@@ -64,10 +68,10 @@ declare const _default: import("vue").DefineComponent<{
|
|
64
68
|
default: string;
|
65
69
|
};
|
66
70
|
store: {
|
67
|
-
type: PropType<Store<
|
71
|
+
type: PropType<Store<DefaultRow>>;
|
68
72
|
};
|
69
73
|
column: {
|
70
|
-
type: PropType<TableColumnCtx<
|
74
|
+
type: PropType<TableColumnCtx<DefaultRow>>;
|
71
75
|
};
|
72
76
|
upDataColumn: {
|
73
77
|
type: FunctionConstructor;
|
@@ -1,6 +1,13 @@
|
|
1
|
-
|
1
|
+
import type { TableColumnCtx } from './table-column/defaults';
|
2
|
+
import type { DefaultRow } from './table/defaults';
|
3
|
+
type Props = {
|
4
|
+
tableLayout: 'fixed' | 'auto';
|
5
|
+
columns?: TableColumnCtx<DefaultRow>[];
|
6
|
+
};
|
7
|
+
export declare function hColgroup(props: Props): import("vue").VNode<import("vue").RendererNode, import("vue").RendererElement, {
|
2
8
|
[key: string]: any;
|
3
9
|
}>;
|
4
10
|
export declare namespace hColgroup {
|
5
11
|
var props: string[];
|
6
12
|
}
|
13
|
+
export {};
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"h-helper.js","sources":["../../../../../../packages/components/table/src/h-helper.ts"],"sourcesContent":["
|
1
|
+
{"version":3,"file":"h-helper.js","sources":["../../../../../../packages/components/table/src/h-helper.ts"],"sourcesContent":["import { h } from 'vue'\nimport { isUndefined } from '@element-plus/utils'\n\nimport type { TableColumnCtx } from './table-column/defaults'\nimport type { DefaultRow } from './table/defaults'\n\ntype Props = {\n tableLayout: 'fixed' | 'auto'\n columns?: TableColumnCtx<DefaultRow>[]\n}\n\nexport function hColgroup(props: Props) {\n const isAuto = props.tableLayout === 'auto'\n let columns = props.columns || []\n if (isAuto) {\n if (columns.every(({ width }) => isUndefined(width))) {\n columns = []\n }\n }\n const getPropsData = (column: TableColumnCtx<DefaultRow>) => {\n const propsData = {\n key: `${props.tableLayout}_${column.id}`,\n style: {},\n name: undefined as string | undefined,\n }\n if (isAuto) {\n propsData.style = {\n width: `${column.width}px`,\n }\n } else {\n propsData.name = column.id\n }\n return propsData\n }\n\n return h(\n 'colgroup',\n {},\n columns.map((column) => h('col', getPropsData(column)))\n )\n}\n\nhColgroup.props = ['columns', 'tableLayout']\n"],"names":["isUndefined","h"],"mappings":";;;;;;;AAEO,SAAS,SAAS,CAAC,KAAK,EAAE;AACjC,EAAE,MAAM,MAAM,GAAG,KAAK,CAAC,WAAW,KAAK,MAAM,CAAC;AAC9C,EAAE,IAAI,OAAO,GAAG,KAAK,CAAC,OAAO,IAAI,EAAE,CAAC;AACpC,EAAE,IAAI,MAAM,EAAE;AACd,IAAI,IAAI,OAAO,CAAC,KAAK,CAAC,CAAC,EAAE,KAAK,EAAE,KAAKA,iBAAW,CAAC,KAAK,CAAC,CAAC,EAAE;AAC1D,MAAM,OAAO,GAAG,EAAE,CAAC;AACnB,KAAK;AACL,GAAG;AACH,EAAE,MAAM,YAAY,GAAG,CAAC,MAAM,KAAK;AACnC,IAAI,MAAM,SAAS,GAAG;AACtB,MAAM,GAAG,EAAE,CAAC,EAAE,KAAK,CAAC,WAAW,CAAC,CAAC,EAAE,MAAM,CAAC,EAAE,CAAC,CAAC;AAC9C,MAAM,KAAK,EAAE,EAAE;AACf,MAAM,IAAI,EAAE,KAAK,CAAC;AAClB,KAAK,CAAC;AACN,IAAI,IAAI,MAAM,EAAE;AAChB,MAAM,SAAS,CAAC,KAAK,GAAG;AACxB,QAAQ,KAAK,EAAE,CAAC,EAAE,MAAM,CAAC,KAAK,CAAC,EAAE,CAAC;AAClC,OAAO,CAAC;AACR,KAAK,MAAM;AACX,MAAM,SAAS,CAAC,IAAI,GAAG,MAAM,CAAC,EAAE,CAAC;AACjC,KAAK;AACL,IAAI,OAAO,SAAS,CAAC;AACrB,GAAG,CAAC;AACJ,EAAE,OAAOC,KAAC,CAAC,UAAU,EAAE,EAAE,EAAE,OAAO,CAAC,GAAG,CAAC,CAAC,MAAM,KAAKA,KAAC,CAAC,KAAK,EAAE,YAAY,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,CAAC;AACpF,CAAC;AACD,SAAS,CAAC,KAAK,GAAG,CAAC,SAAS,EAAE,aAAa,CAAC;;;;"}
|
@@ -1,6 +1,6 @@
|
|
1
1
|
import type TableLayout from './table-layout';
|
2
|
-
import type { Table } from './table/defaults';
|
3
|
-
declare function useLayoutObserver<T>(root: Table<T>): {
|
2
|
+
import type { DefaultRow, Table } from './table/defaults';
|
3
|
+
declare function useLayoutObserver<T extends DefaultRow>(root: Table<T>): {
|
4
4
|
tableLayout: TableLayout<T>;
|
5
5
|
onColumnsChange: (layout: TableLayout<T>) => void;
|
6
6
|
onScrollableChange: (layout: TableLayout<T>) => void;
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"layout-observer.js","sources":["../../../../../../packages/components/table/src/layout-observer.ts"],"sourcesContent":["
|
1
|
+
{"version":3,"file":"layout-observer.js","sources":["../../../../../../packages/components/table/src/layout-observer.ts"],"sourcesContent":["import {\n computed,\n getCurrentInstance,\n onBeforeMount,\n onMounted,\n onUnmounted,\n onUpdated,\n} from 'vue'\n\nimport type { TableHeader } from './table-header'\nimport type TableLayout from './table-layout'\nimport type { DefaultRow, Table, TableColumnCtx } from './table/defaults'\n\nfunction useLayoutObserver<T extends DefaultRow>(root: Table<T>) {\n const instance = getCurrentInstance() as TableHeader\n onBeforeMount(() => {\n tableLayout.value.addObserver(instance)\n })\n onMounted(() => {\n onColumnsChange(tableLayout.value)\n onScrollableChange(tableLayout.value)\n })\n onUpdated(() => {\n onColumnsChange(tableLayout.value)\n onScrollableChange(tableLayout.value)\n })\n onUnmounted(() => {\n tableLayout.value.removeObserver(instance)\n })\n const tableLayout = computed(() => {\n const layout = root.layout as TableLayout<T>\n if (!layout) {\n throw new Error('Can not find table layout.')\n }\n return layout\n })\n const onColumnsChange = (layout: TableLayout<T>) => {\n const cols = root.vnode.el?.querySelectorAll('colgroup > col') || []\n if (!cols.length) return\n const flattenColumns = layout.getFlattenColumns()\n const columnsMap: Record<string, TableColumnCtx<T>> = {}\n flattenColumns.forEach((column) => {\n columnsMap[column.id] = column\n })\n for (let i = 0, j = cols.length; i < j; i++) {\n const col = cols[i]\n const name = col.getAttribute('name')\n const column = columnsMap[name]\n if (column) {\n col.setAttribute('width', column.realWidth || column.width)\n }\n }\n }\n\n const onScrollableChange = (layout: TableLayout<T>) => {\n const cols =\n root.vnode.el?.querySelectorAll('colgroup > col[name=gutter]') || []\n for (let i = 0, j = cols.length; i < j; i++) {\n const col = cols[i]\n col.setAttribute('width', layout.scrollY.value ? layout.gutterWidth : '0')\n }\n const ths = root.vnode.el?.querySelectorAll('th.gutter') || []\n for (let i = 0, j = ths.length; i < j; i++) {\n const th = ths[i]\n th.style.width = layout.scrollY.value ? `${layout.gutterWidth}px` : '0'\n th.style.display = layout.scrollY.value ? '' : 'none'\n }\n }\n\n return {\n tableLayout: tableLayout.value,\n onColumnsChange,\n onScrollableChange,\n }\n}\n\nexport default useLayoutObserver\n"],"names":["getCurrentInstance","onBeforeMount","onMounted","onUpdated","onUnmounted","computed"],"mappings":";;;;;;AAQA,SAAS,iBAAiB,CAAC,IAAI,EAAE;AACjC,EAAE,MAAM,QAAQ,GAAGA,sBAAkB,EAAE,CAAC;AACxC,EAAEC,iBAAa,CAAC,MAAM;AACtB,IAAI,WAAW,CAAC,KAAK,CAAC,WAAW,CAAC,QAAQ,CAAC,CAAC;AAC5C,GAAG,CAAC,CAAC;AACL,EAAEC,aAAS,CAAC,MAAM;AAClB,IAAI,eAAe,CAAC,WAAW,CAAC,KAAK,CAAC,CAAC;AACvC,IAAI,kBAAkB,CAAC,WAAW,CAAC,KAAK,CAAC,CAAC;AAC1C,GAAG,CAAC,CAAC;AACL,EAAEC,aAAS,CAAC,MAAM;AAClB,IAAI,eAAe,CAAC,WAAW,CAAC,KAAK,CAAC,CAAC;AACvC,IAAI,kBAAkB,CAAC,WAAW,CAAC,KAAK,CAAC,CAAC;AAC1C,GAAG,CAAC,CAAC;AACL,EAAEC,eAAW,CAAC,MAAM;AACpB,IAAI,WAAW,CAAC,KAAK,CAAC,cAAc,CAAC,QAAQ,CAAC,CAAC;AAC/C,GAAG,CAAC,CAAC;AACL,EAAE,MAAM,WAAW,GAAGC,YAAQ,CAAC,MAAM;AACrC,IAAI,MAAM,MAAM,GAAG,IAAI,CAAC,MAAM,CAAC;AAC/B,IAAI,IAAI,CAAC,MAAM,EAAE;AACjB,MAAM,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AAC,KAAK;AAClC,IAAI,eAAe;AACnB,IAAI,kBAAkB;AACtB,GAAG,CAAC;AACJ;;;;"}
|
@@ -1,14 +1,15 @@
|
|
1
1
|
import type { Ref } from 'vue';
|
2
|
+
import type { DefaultRow } from '../table/defaults';
|
2
3
|
import type { WatcherPropsData } from '.';
|
3
|
-
declare function useCurrent<T>(watcherData: WatcherPropsData<T>): {
|
4
|
+
declare function useCurrent<T extends DefaultRow>(watcherData: WatcherPropsData<T>): {
|
4
5
|
setCurrentRowKey: (key: string) => void;
|
5
6
|
restoreCurrentRowKey: () => void;
|
6
7
|
setCurrentRowByKey: (key: string) => void;
|
7
8
|
updateCurrentRow: (_currentRow: T) => void;
|
8
9
|
updateCurrentRowData: () => void;
|
9
10
|
states: {
|
10
|
-
_currentRowKey: Ref<string>;
|
11
|
-
currentRow: Ref<T>;
|
11
|
+
_currentRowKey: Ref<string | null>;
|
12
|
+
currentRow: Ref<T | null>;
|
12
13
|
};
|
13
14
|
};
|
14
15
|
export default useCurrent;
|
@@ -19,12 +19,13 @@ function useCurrent(watcherData) {
|
|
19
19
|
_currentRowKey.value = null;
|
20
20
|
};
|
21
21
|
const setCurrentRowByKey = (key) => {
|
22
|
+
var _a;
|
22
23
|
const { data, rowKey } = watcherData;
|
23
24
|
let _currentRow = null;
|
24
25
|
if (rowKey.value) {
|
25
|
-
_currentRow = (vue.unref(data) || []).find((item) => util.getRowIdentity(item, rowKey.value) === key);
|
26
|
+
_currentRow = (_a = (vue.unref(data) || []).find((item) => util.getRowIdentity(item, rowKey.value) === key)) != null ? _a : null;
|
26
27
|
}
|
27
|
-
currentRow.value = _currentRow;
|
28
|
+
currentRow.value = _currentRow != null ? _currentRow : null;
|
28
29
|
instance.emit("current-change", currentRow.value, null);
|
29
30
|
};
|
30
31
|
const updateCurrentRow = (_currentRow) => {
|
@@ -43,7 +44,7 @@ function useCurrent(watcherData) {
|
|
43
44
|
const rowKey = watcherData.rowKey.value;
|
44
45
|
const data = watcherData.data.value || [];
|
45
46
|
const oldCurrentRow = currentRow.value;
|
46
|
-
if (!data.includes(oldCurrentRow)
|
47
|
+
if (oldCurrentRow && !data.includes(oldCurrentRow)) {
|
47
48
|
if (rowKey) {
|
48
49
|
const currentRowKey = util.getRowIdentity(oldCurrentRow, rowKey);
|
49
50
|
setCurrentRowByKey(currentRowKey);
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"current.js","sources":["../../../../../../../packages/components/table/src/store/current.ts"],"sourcesContent":["
|
1
|
+
{"version":3,"file":"current.js","sources":["../../../../../../../packages/components/table/src/store/current.ts"],"sourcesContent":["import { getCurrentInstance, ref, unref } from 'vue'\nimport { isNull } from 'lodash-unified'\nimport { getRowIdentity } from '../util'\n\nimport type { Ref } from 'vue'\nimport type { DefaultRow, Table } from '../table/defaults'\nimport type { WatcherPropsData } from '.'\n\nfunction useCurrent<T extends DefaultRow>(watcherData: WatcherPropsData<T>) {\n const instance = getCurrentInstance() as Table<T>\n const _currentRowKey: Ref<string | null> = ref(null)\n const currentRow: Ref<T | null> = ref(null)\n\n const setCurrentRowKey = (key: string) => {\n instance.store.assertRowKey()\n _currentRowKey.value = key\n setCurrentRowByKey(key)\n }\n\n const restoreCurrentRowKey = () => {\n _currentRowKey.value = null\n }\n\n const setCurrentRowByKey = (key: string) => {\n const { data, rowKey } = watcherData\n let _currentRow: T | null = null\n if (rowKey.value) {\n _currentRow =\n (unref(data) || []).find(\n (item) => getRowIdentity(item, rowKey.value) === key\n ) ?? null\n }\n currentRow.value = _currentRow ?? null\n instance.emit('current-change', currentRow.value, null)\n }\n\n const updateCurrentRow = (_currentRow: T) => {\n const oldCurrentRow = currentRow.value\n if (_currentRow && _currentRow !== oldCurrentRow) {\n currentRow.value = _currentRow\n instance.emit('current-change', currentRow.value, oldCurrentRow)\n return\n }\n if (!_currentRow && oldCurrentRow) {\n currentRow.value = null\n instance.emit('current-change', null, oldCurrentRow)\n }\n }\n\n const updateCurrentRowData = () => {\n const rowKey = watcherData.rowKey.value\n // data 为 null 时,解构时的默认值会被忽略\n const data = watcherData.data.value || []\n const oldCurrentRow = currentRow.value\n // 当 currentRow 不在 data 中时尝试更新数据\n if (oldCurrentRow && !data.includes(oldCurrentRow)) {\n if (rowKey) {\n const currentRowKey = getRowIdentity(oldCurrentRow, rowKey)\n setCurrentRowByKey(currentRowKey)\n } else {\n currentRow.value = null\n }\n if (isNull(currentRow.value)) {\n instance.emit('current-change', null, oldCurrentRow)\n }\n } else if (_currentRowKey.value) {\n // 把初始时下设置的 rowKey 转化成 rowData\n setCurrentRowByKey(_currentRowKey.value)\n restoreCurrentRowKey()\n }\n }\n\n return {\n setCurrentRowKey,\n restoreCurrentRowKey,\n setCurrentRowByKey,\n updateCurrentRow,\n updateCurrentRowData,\n states: {\n _currentRowKey,\n currentRow,\n },\n }\n}\n\nexport default useCurrent\n"],"names":["getCurrentInstance","ref","unref","getRowIdentity","isNull"],"mappings":";;;;;;;;AAGA,SAAS,UAAU,CAAC,WAAW,EAAE;AACjC,EAAE,MAAM,QAAQ,GAAGA,sBAAkB,EAAE,CAAC;AACxC,EAAE,MAAM,cAAc,GAAGC,OAAG,CAAC,IAAI,CAAC,CAAC;AACnC,EAAE,MAAM,UAAU,GAAGA,OAAG,CAAC,IAAI,CAAC,CAAC;AAC/B,EAAE,MAAM,gBAAgB,GAAG,CAAC,GAAG,KAAK;AACpC,IAAI,QAAQ,CAAC,KAAK,CAAC,YAAY,EAAE,CAAC;AAClC,IAAI,cAAc,CAAC,KAAK,GAAG,GAAG,CAAC;AAC/B,IAAI,kBAAkB,CAAC,GAAG,CAAC,CAAC;AAC5B,GAAG,CAAC;AACJ,EAAE,MAAM,oBAAoB,GAAG,MAAM;AACrC,IAAI,cAAc,CAAC,KAAK,GAAG,IAAI,CAAC;AAChC,GAAG,CAAC;AACJ,EAAE,MAAM,kBAAkB,GAAG,CAAC,GAAG,KAAK;AACtC,IAAI,IAAI,EAAE,CAAC;AACX,IAAI,MAAM,EAAE,IAAI,EAAE,MA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AW,CAAC,IAAI,CAAC,KAAK,IAAI,EAAE,CAAC;AAC9C,IAAI,MAAM,aAAa,GAAG,UAAU,CAAC,KAAK,CAAC;AAC3C,IAAI,IAAI,aAAa,IAAI,CAAC,IAAI,CAAC,QAAQ,CAAC,aAAa,CAAC,EAAE;AACxD,MAAM,IAAI,MAAM,EAAE;AAClB,QAAQ,MAAM,aAAa,GAAGA,mBAAc,CAAC,aAAa,EAAE,MAAM,CAAC,CAAC;AACpE,QAAQ,kBAAkB,CAAC,aAAa,CAAC,CAAC;AAC1C,OAAO,MAAM;AACb,QAAQ,UAAU,CAAC,KAAK,GAAG,IAAI,CAAC;AAChC,OAAO;AACP,MAAM,IAAIC,oBAAM,CAAC,UAAU,CAAC,KAAK,CAAC,EAAE;AACpC,QAAQ,QAAQ,CAAC,IAAI,CAAC,gBAAgB,EAAE,IAAI,EAAE,aAAa,CAAC,CAAC;AAC7D,OAAO;AACP,KAAK,MAAM,IAAI,cAAc,CAAC,KAAK,EAAE;AACrC,MAAM,kBAAkB,CAAC,cAAc,CAAC,KAAK,CAAC,CAAC;AAC/C,MAAM,oBAAoB,EAAE,CAAC;AAC7B,KAAK;AACL,GAAG,CAAC;AACJ,EAAE,OAAO;AACT,IAAI,gBAAgB;AACpB,IAAI,oBAAoB;AACxB,IAAI,kBAAkB;AACtB,IAAI,gBAAgB;AACpB,IAAI,oBAAoB;AACxB,IAAI,MAAM,EAAE;AACZ,MAAM,cAAc;AACpB,MAAM,UAAU;AAChB,KAAK;AACL,GAAG,CAAC;AACJ;;;;"}
|
@@ -1,9 +1,9 @@
|
|
1
|
-
import type { Table, TableProps } from '../table/defaults';
|
2
|
-
export declare function createStore<T>(table: Table<T>, props: TableProps<T>): {
|
1
|
+
import type { DefaultRow, Table, TableProps } from '../table/defaults';
|
2
|
+
export declare function createStore<T extends DefaultRow>(table: Table<T>, props: TableProps<T>): {
|
3
3
|
mutations: {
|
4
4
|
setData(states: {
|
5
|
-
_currentRowKey: import("vue").Ref<string>;
|
6
|
-
currentRow: import("vue").Ref<T>;
|
5
|
+
_currentRowKey: import("vue").Ref<string | null>;
|
6
|
+
currentRow: import("vue").Ref<T | null>;
|
7
7
|
expandRowKeys: import("vue").Ref<(string | number)[]>;
|
8
8
|
treeData: import("vue").Ref<Record<string, import("./tree").TreeData>>;
|
9
9
|
indent: import("vue").Ref<number>;
|
@@ -44,8 +44,8 @@ export declare function createStore<T>(table: Table<T>, props: TableProps<T>): {
|
|
44
44
|
hoverRow: import("vue").Ref<T | null>;
|
45
45
|
}, data: T[]): void;
|
46
46
|
insertColumn(states: {
|
47
|
-
_currentRowKey: import("vue").Ref<string>;
|
48
|
-
currentRow: import("vue").Ref<T>;
|
47
|
+
_currentRowKey: import("vue").Ref<string | null>;
|
48
|
+
currentRow: import("vue").Ref<T | null>;
|
49
49
|
expandRowKeys: import("vue").Ref<(string | number)[]>;
|
50
50
|
treeData: import("vue").Ref<Record<string, import("./tree").TreeData>>;
|
51
51
|
indent: import("vue").Ref<number>;
|
@@ -86,8 +86,8 @@ export declare function createStore<T>(table: Table<T>, props: TableProps<T>): {
|
|
86
86
|
hoverRow: import("vue").Ref<T | null>;
|
87
87
|
}, column: import("../table-column/defaults").TableColumnCtx<T>, parent: import("../table-column/defaults").TableColumnCtx<T>, updateColumnOrder: () => void): void;
|
88
88
|
updateColumnOrder(states: {
|
89
|
-
_currentRowKey: import("vue").Ref<string>;
|
90
|
-
currentRow: import("vue").Ref<T>;
|
89
|
+
_currentRowKey: import("vue").Ref<string | null>;
|
90
|
+
currentRow: import("vue").Ref<T | null>;
|
91
91
|
expandRowKeys: import("vue").Ref<(string | number)[]>;
|
92
92
|
treeData: import("vue").Ref<Record<string, import("./tree").TreeData>>;
|
93
93
|
indent: import("vue").Ref<number>;
|
@@ -128,8 +128,8 @@ export declare function createStore<T>(table: Table<T>, props: TableProps<T>): {
|
|
128
128
|
hoverRow: import("vue").Ref<T | null>;
|
129
129
|
}, column: import("../table-column/defaults").TableColumnCtx<T>): void;
|
130
130
|
removeColumn(states: {
|
131
|
-
_currentRowKey: import("vue").Ref<string>;
|
132
|
-
currentRow: import("vue").Ref<T>;
|
131
|
+
_currentRowKey: import("vue").Ref<string | null>;
|
132
|
+
currentRow: import("vue").Ref<T | null>;
|
133
133
|
expandRowKeys: import("vue").Ref<(string | number)[]>;
|
134
134
|
treeData: import("vue").Ref<Record<string, import("./tree").TreeData>>;
|
135
135
|
indent: import("vue").Ref<number>;
|
@@ -170,8 +170,8 @@ export declare function createStore<T>(table: Table<T>, props: TableProps<T>): {
|
|
170
170
|
hoverRow: import("vue").Ref<T | null>;
|
171
171
|
}, column: import("../table-column/defaults").TableColumnCtx<T>, parent: import("../table-column/defaults").TableColumnCtx<T>, updateColumnOrder: () => void): void;
|
172
172
|
sort(states: {
|
173
|
-
_currentRowKey: import("vue").Ref<string>;
|
174
|
-
currentRow: import("vue").Ref<T>;
|
173
|
+
_currentRowKey: import("vue").Ref<string | null>;
|
174
|
+
currentRow: import("vue").Ref<T | null>;
|
175
175
|
expandRowKeys: import("vue").Ref<(string | number)[]>;
|
176
176
|
treeData: import("vue").Ref<Record<string, import("./tree").TreeData>>;
|
177
177
|
indent: import("vue").Ref<number>;
|
@@ -212,8 +212,8 @@ export declare function createStore<T>(table: Table<T>, props: TableProps<T>): {
|
|
212
212
|
hoverRow: import("vue").Ref<T | null>;
|
213
213
|
}, options: import("../table/defaults").Sort): void;
|
214
214
|
changeSortCondition(states: {
|
215
|
-
_currentRowKey: import("vue").Ref<string>;
|
216
|
-
currentRow: import("vue").Ref<T>;
|
215
|
+
_currentRowKey: import("vue").Ref<string | null>;
|
216
|
+
currentRow: import("vue").Ref<T | null>;
|
217
217
|
expandRowKeys: import("vue").Ref<(string | number)[]>;
|
218
218
|
treeData: import("vue").Ref<Record<string, import("./tree").TreeData>>;
|
219
219
|
indent: import("vue").Ref<number>;
|
@@ -254,8 +254,8 @@ export declare function createStore<T>(table: Table<T>, props: TableProps<T>): {
|
|
254
254
|
hoverRow: import("vue").Ref<T | null>;
|
255
255
|
}, options: import("../table/defaults").Sort): void;
|
256
256
|
filterChange(_states: {
|
257
|
-
_currentRowKey: import("vue").Ref<string>;
|
258
|
-
currentRow: import("vue").Ref<T>;
|
257
|
+
_currentRowKey: import("vue").Ref<string | null>;
|
258
|
+
currentRow: import("vue").Ref<T | null>;
|
259
259
|
expandRowKeys: import("vue").Ref<(string | number)[]>;
|
260
260
|
treeData: import("vue").Ref<Record<string, import("./tree").TreeData>>;
|
261
261
|
indent: import("vue").Ref<number>;
|
@@ -297,8 +297,8 @@ export declare function createStore<T>(table: Table<T>, props: TableProps<T>): {
|
|
297
297
|
}, options: import("../table/defaults").Filter<T>): void;
|
298
298
|
toggleAllSelection(): void;
|
299
299
|
rowSelectedChanged(_states: {
|
300
|
-
_currentRowKey: import("vue").Ref<string>;
|
301
|
-
currentRow: import("vue").Ref<T>;
|
300
|
+
_currentRowKey: import("vue").Ref<string | null>;
|
301
|
+
currentRow: import("vue").Ref<T | null>;
|
302
302
|
expandRowKeys: import("vue").Ref<(string | number)[]>;
|
303
303
|
treeData: import("vue").Ref<Record<string, import("./tree").TreeData>>;
|
304
304
|
indent: import("vue").Ref<number>;
|
@@ -339,8 +339,8 @@ export declare function createStore<T>(table: Table<T>, props: TableProps<T>): {
|
|
339
339
|
hoverRow: import("vue").Ref<T | null>;
|
340
340
|
}, row: T): void;
|
341
341
|
setHoverRow(states: {
|
342
|
-
_currentRowKey: import("vue").Ref<string>;
|
343
|
-
currentRow: import("vue").Ref<T>;
|
342
|
+
_currentRowKey: import("vue").Ref<string | null>;
|
343
|
+
currentRow: import("vue").Ref<T | null>;
|
344
344
|
expandRowKeys: import("vue").Ref<(string | number)[]>;
|
345
345
|
treeData: import("vue").Ref<Record<string, import("./tree").TreeData>>;
|
346
346
|
indent: import("vue").Ref<number>;
|
@@ -381,8 +381,8 @@ export declare function createStore<T>(table: Table<T>, props: TableProps<T>): {
|
|
381
381
|
hoverRow: import("vue").Ref<T | null>;
|
382
382
|
}, row: T): void;
|
383
383
|
setCurrentRow(_states: {
|
384
|
-
_currentRowKey: import("vue").Ref<string>;
|
385
|
-
currentRow: import("vue").Ref<T>;
|
384
|
+
_currentRowKey: import("vue").Ref<string | null>;
|
385
|
+
currentRow: import("vue").Ref<T | null>;
|
386
386
|
expandRowKeys: import("vue").Ref<(string | number)[]>;
|
387
387
|
treeData: import("vue").Ref<Record<string, import("./tree").TreeData>>;
|
388
388
|
indent: import("vue").Ref<number>;
|
@@ -457,8 +457,8 @@ export declare function createStore<T>(table: Table<T>, props: TableProps<T>): {
|
|
457
457
|
updateTreeData: (ifChangeExpandRowKeys?: boolean, ifExpandAll?: boolean) => void;
|
458
458
|
updateKeyChildren: (key: string, data: T[]) => void;
|
459
459
|
states: {
|
460
|
-
_currentRowKey: import("vue").Ref<string>;
|
461
|
-
currentRow: import("vue").Ref<T>;
|
460
|
+
_currentRowKey: import("vue").Ref<string | null>;
|
461
|
+
currentRow: import("vue").Ref<T | null>;
|
462
462
|
expandRowKeys: import("vue").Ref<(string | number)[]>;
|
463
463
|
treeData: import("vue").Ref<Record<string, import("./tree").TreeData>>;
|
464
464
|
indent: import("vue").Ref<number>;
|
@@ -49,22 +49,22 @@ function proxyTableProps(store, props) {
|
|
49
49
|
function handleValue(value, propsKey, store) {
|
50
50
|
let newVal = value;
|
51
51
|
let storeKey = InitialStateMap[propsKey];
|
52
|
-
if (shared.isObject(
|
52
|
+
if (shared.isObject(storeKey)) {
|
53
|
+
newVal = newVal || storeKey.default;
|
53
54
|
storeKey = storeKey.key;
|
54
|
-
newVal = newVal || InitialStateMap[propsKey].default;
|
55
55
|
}
|
56
56
|
store.states[storeKey].value = newVal;
|
57
57
|
}
|
58
|
-
function getArrKeysValue(props,
|
59
|
-
if (
|
60
|
-
const keyList =
|
58
|
+
function getArrKeysValue(props, key) {
|
59
|
+
if (key.includes(".")) {
|
60
|
+
const keyList = key.split(".");
|
61
61
|
let value = props;
|
62
|
-
keyList.forEach((
|
63
|
-
value = value[
|
62
|
+
keyList.forEach((k) => {
|
63
|
+
value = value[k];
|
64
64
|
});
|
65
65
|
return value;
|
66
66
|
} else {
|
67
|
-
return props[
|
67
|
+
return props[key];
|
68
68
|
}
|
69
69
|
}
|
70
70
|
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"helper.js","sources":["../../../../../../../packages/components/table/src/store/helper.ts"],"sourcesContent":["
|
1
|
+
{"version":3,"file":"helper.js","sources":["../../../../../../../packages/components/table/src/store/helper.ts"],"sourcesContent":["import { watch } from 'vue'\nimport { debounce } from 'lodash-unified'\nimport { isObject } from '@element-plus/utils'\nimport useStore from '.'\n\nimport type { Store } from '.'\nimport type { DefaultRow, Table, TableProps } from '../table/defaults'\n\nconst InitialStateMap = {\n rowKey: 'rowKey',\n defaultExpandAll: 'defaultExpandAll',\n selectOnIndeterminate: 'selectOnIndeterminate',\n indent: 'indent',\n lazy: 'lazy',\n data: 'data',\n ['treeProps.hasChildren']: {\n key: 'lazyColumnIdentifier',\n default: 'hasChildren',\n },\n ['treeProps.children']: {\n key: 'childrenColumnName',\n default: 'children',\n },\n ['treeProps.checkStrictly']: {\n key: 'checkStrictly',\n default: false,\n },\n}\n\nexport function createStore<T extends DefaultRow>(\n table: Table<T>,\n props: TableProps<T>\n) {\n if (!table) {\n throw new Error('Table is required.')\n }\n\n const store = useStore<T>()\n // fix https://github.com/ElemeFE/element/issues/14075\n // related pr https://github.com/ElemeFE/element/pull/14146\n store.toggleAllSelection = debounce(store._toggleAllSelection, 10)\n Object.keys(InitialStateMap).forEach((key) => {\n handleValue(getArrKeysValue(props, key), key, store)\n })\n proxyTableProps(store, props)\n return store\n}\n\nfunction proxyTableProps<T extends DefaultRow>(\n store: Store<T>,\n props: TableProps<T>\n) {\n Object.keys(InitialStateMap).forEach((key) => {\n watch(\n () => getArrKeysValue(props, key),\n (value) => {\n handleValue(value, key, store)\n }\n )\n })\n}\n\nfunction handleValue<T extends DefaultRow>(\n value: string | boolean | Record<string, any>,\n propsKey: string,\n store: Store<T>\n) {\n let newVal = value\n let storeKey = InitialStateMap[propsKey as keyof typeof InitialStateMap]\n if (isObject(storeKey)) {\n newVal = newVal || storeKey.default\n storeKey = storeKey.key\n }\n ;((store.states as any)[storeKey] as any).value = newVal\n}\n\nfunction getArrKeysValue<T extends DefaultRow>(\n props: TableProps<T>,\n key: string\n) {\n if ((key as keyof typeof props).includes('.')) {\n const keyList = (key as keyof typeof props).split('.')\n let value: string | Record<string, any> = props\n keyList.forEach((k) => {\n value = (value as Record<string, any>)[k]\n })\n return value\n } else {\n return (props as any)[key] as boolean | string\n }\n}\n"],"names":["useStore","debounce","watch","isObject"],"mappings":";;;;;;;;;AAIA,MAAM,eAAe,GAAG;AACxB,EAAE,MAAM,EAAE,QAAQ;AAClB,EAAE,gBAAgB,EAAE,kBAAkB;AACtC,EAAE,qBAAqB,EAAE,uBAAuB;AAChD,EAAE,MAAM,EAAE,QAAQ;AAClB,EAAE,IAAI,EAAE,MAAM;AACd,EAAE,IAAI,EAAE,MAAM;AACd,EAAE,CAAC,uBAAuB,GAAG;AAC7B,IAAI,GAAG,EAAE,sBAAsB;AAC/B,IAAI,OAAO,EAAE,aAAa;AAC1B,GAAG;AACH,EAAE,CAAC,oBAAoB,GAAG;AAC1B,IAAI,GAAG,EAAE,oBAAoB;AAC7B,IAAI,OAAO,EAAE,UAAU;AACvB,GAAG;AACH,EAAE,CAAC,yBAAyB,GAAG;AAC/B,IAAI,GAAG,EAAE,eAAe;AACxB,IAAI,OAAO,EAAE,KAAK;AAClB,GAAG;AACH,CAAC,CAAC;AACK,SAAS,WAAW,CAAC,KAAK,EAAE,KAAK,EAAE;AAC1C,EAAE,IAAI,CAAC,KAAK,EAAE;AACd,IAAI,MAAM,IAAI,KAAK,CAAC,oBAAoB,CAAC,CAAC;AAC1C,GAAG;AACH,EAAE,MAAM,KAAK,GAAGA,gBAAQ,EAAE,CAAC;AAC3B,EAAE,KAAK,CAAC,kBAAkB,GAAGC,sBAAQ,C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