@element-plus/nightly 0.0.20251101 → 0.0.20251102
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 +6 -5
- package/dist/index.full.min.js +15 -15
- package/dist/index.full.min.js.map +1 -1
- package/dist/index.full.min.mjs +15 -15
- package/dist/index.full.min.mjs.map +1 -1
- package/dist/index.full.mjs +6 -5
- 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/cascader/index.mjs +2 -2
- package/es/components/cascader/src/cascader.mjs +707 -99
- package/es/components/cascader/src/cascader.mjs.map +1 -1
- package/es/components/cascader/src/cascader2.mjs +99 -707
- package/es/components/cascader/src/cascader2.mjs.map +1 -1
- package/es/components/check-tag/index.mjs +2 -2
- package/es/components/check-tag/src/check-tag.mjs +37 -14
- package/es/components/check-tag/src/check-tag.mjs.map +1 -1
- package/es/components/check-tag/src/check-tag2.mjs +14 -37
- package/es/components/check-tag/src/check-tag2.mjs.map +1 -1
- package/es/components/col/index.mjs +2 -2
- package/es/components/col/src/col.mjs +64 -43
- package/es/components/col/src/col.mjs.map +1 -1
- package/es/components/col/src/col2.mjs +43 -64
- package/es/components/col/src/col2.mjs.map +1 -1
- package/es/components/collapse/index.mjs +2 -2
- package/es/components/collapse/src/collapse-item.mjs +96 -18
- package/es/components/collapse/src/collapse-item.mjs.map +1 -1
- package/es/components/collapse/src/collapse-item2.mjs +18 -96
- package/es/components/collapse/src/collapse-item2.mjs.map +1 -1
- package/es/components/countdown/index.mjs +2 -2
- package/es/components/countdown/src/countdown.mjs +79 -21
- package/es/components/countdown/src/countdown.mjs.map +1 -1
- package/es/components/countdown/src/countdown2.mjs +21 -79
- package/es/components/countdown/src/countdown2.mjs.map +1 -1
- package/es/components/date-picker-panel/src/composables/use-basic-date-table.mjs +1 -1
- package/es/components/date-picker-panel/src/composables/use-basic-date-table.mjs.map +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/index.mjs +11 -11
- package/es/components/mention/src/mention-dropdown.mjs +15 -166
- package/es/components/mention/src/mention-dropdown.mjs.map +1 -1
- package/es/components/mention/src/mention-dropdown2.mjs +166 -15
- package/es/components/mention/src/mention-dropdown2.mjs.map +1 -1
- package/es/components/mention/src/mention2.mjs +1 -1
- package/es/components/menu/src/menu.mjs +3 -2
- package/es/components/menu/src/menu.mjs.map +1 -1
- package/es/components/page-header/index.mjs +2 -2
- package/es/components/page-header/src/page-header.mjs +97 -16
- package/es/components/page-header/src/page-header.mjs.map +1 -1
- package/es/components/page-header/src/page-header2.mjs +16 -97
- package/es/components/page-header/src/page-header2.mjs.map +1 -1
- package/es/components/pagination/src/components/jumper.mjs +7 -58
- package/es/components/pagination/src/components/jumper.mjs.map +1 -1
- package/es/components/pagination/src/components/jumper2.mjs +58 -7
- package/es/components/pagination/src/components/jumper2.mjs.map +1 -1
- package/es/components/pagination/src/pagination.mjs +1 -1
- package/es/components/tabs/index.mjs +1 -1
- package/es/components/tabs/src/tab-bar.mjs +11 -87
- package/es/components/tabs/src/tab-bar.mjs.map +1 -1
- package/es/components/tabs/src/tab-bar2.mjs +87 -11
- package/es/components/tabs/src/tab-bar2.mjs.map +1 -1
- package/es/components/tabs/src/tab-nav.mjs +1 -1
- package/es/components/time-select/index.mjs +2 -2
- package/es/components/time-select/src/time-select.mjs +64 -134
- package/es/components/time-select/src/time-select.mjs.map +1 -1
- package/es/components/time-select/src/time-select2.mjs +134 -64
- package/es/components/time-select/src/time-select2.mjs.map +1 -1
- package/es/components/tooltip/index.mjs +2 -2
- package/es/components/tooltip/src/tooltip.mjs +30 -167
- package/es/components/tooltip/src/tooltip.mjs.map +1 -1
- package/es/components/tooltip/src/tooltip2.mjs +167 -30
- package/es/components/tooltip/src/tooltip2.mjs.map +1 -1
- package/es/components/transfer/src/composables/use-check.mjs +1 -1
- package/es/components/transfer/src/transfer-panel.mjs +19 -130
- package/es/components/transfer/src/transfer-panel.mjs.map +1 -1
- package/es/components/transfer/src/transfer-panel2.mjs +130 -19
- package/es/components/transfer/src/transfer-panel2.mjs.map +1 -1
- package/es/components/transfer/src/transfer2.mjs +1 -1
- package/es/components/watermark/index.mjs +2 -2
- package/es/components/watermark/src/watermark.mjs +27 -226
- package/es/components/watermark/src/watermark.mjs.map +1 -1
- package/es/components/watermark/src/watermark2.mjs +226 -27
- package/es/components/watermark/src/watermark2.mjs.map +1 -1
- package/es/index.mjs +11 -11
- package/es/version.d.ts +1 -1
- package/es/version.mjs +1 -1
- package/es/version.mjs.map +1 -1
- package/lib/components/cascader/index.js +2 -2
- package/lib/components/cascader/src/cascader.js +706 -99
- package/lib/components/cascader/src/cascader.js.map +1 -1
- package/lib/components/cascader/src/cascader2.js +99 -706
- package/lib/components/cascader/src/cascader2.js.map +1 -1
- package/lib/components/check-tag/index.js +2 -2
- package/lib/components/check-tag/src/check-tag.js +37 -15
- package/lib/components/check-tag/src/check-tag.js.map +1 -1
- package/lib/components/check-tag/src/check-tag2.js +15 -37
- package/lib/components/check-tag/src/check-tag2.js.map +1 -1
- package/lib/components/col/index.js +2 -2
- package/lib/components/col/src/col.js +64 -43
- package/lib/components/col/src/col.js.map +1 -1
- package/lib/components/col/src/col2.js +43 -64
- package/lib/components/col/src/col2.js.map +1 -1
- package/lib/components/collapse/index.js +2 -2
- package/lib/components/collapse/src/collapse-item.js +96 -18
- package/lib/components/collapse/src/collapse-item.js.map +1 -1
- package/lib/components/collapse/src/collapse-item2.js +18 -96
- package/lib/components/collapse/src/collapse-item2.js.map +1 -1
- package/lib/components/countdown/index.js +2 -2
- package/lib/components/countdown/src/countdown.js +79 -22
- package/lib/components/countdown/src/countdown.js.map +1 -1
- package/lib/components/countdown/src/countdown2.js +22 -79
- package/lib/components/countdown/src/countdown2.js.map +1 -1
- package/lib/components/date-picker-panel/src/composables/use-basic-date-table.js +1 -1
- package/lib/components/date-picker-panel/src/composables/use-basic-date-table.js.map +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/index.js +11 -11
- package/lib/components/mention/src/mention-dropdown.js +16 -166
- package/lib/components/mention/src/mention-dropdown.js.map +1 -1
- package/lib/components/mention/src/mention-dropdown2.js +166 -16
- package/lib/components/mention/src/mention-dropdown2.js.map +1 -1
- package/lib/components/mention/src/mention2.js +1 -1
- package/lib/components/menu/src/menu.js +3 -2
- package/lib/components/menu/src/menu.js.map +1 -1
- package/lib/components/page-header/index.js +2 -2
- package/lib/components/page-header/src/page-header.js +97 -17
- package/lib/components/page-header/src/page-header.js.map +1 -1
- package/lib/components/page-header/src/page-header2.js +17 -97
- package/lib/components/page-header/src/page-header2.js.map +1 -1
- package/lib/components/pagination/src/components/jumper.js +7 -58
- package/lib/components/pagination/src/components/jumper.js.map +1 -1
- package/lib/components/pagination/src/components/jumper2.js +58 -7
- package/lib/components/pagination/src/components/jumper2.js.map +1 -1
- package/lib/components/pagination/src/pagination.js +1 -1
- package/lib/components/tabs/index.js +1 -1
- package/lib/components/tabs/src/tab-bar.js +11 -87
- package/lib/components/tabs/src/tab-bar.js.map +1 -1
- package/lib/components/tabs/src/tab-bar2.js +87 -11
- package/lib/components/tabs/src/tab-bar2.js.map +1 -1
- package/lib/components/tabs/src/tab-nav.js +1 -1
- package/lib/components/time-select/index.js +2 -2
- package/lib/components/time-select/src/time-select.js +64 -139
- package/lib/components/time-select/src/time-select.js.map +1 -1
- package/lib/components/time-select/src/time-select2.js +139 -64
- package/lib/components/time-select/src/time-select2.js.map +1 -1
- package/lib/components/tooltip/index.js +2 -2
- package/lib/components/tooltip/src/tooltip.js +34 -167
- package/lib/components/tooltip/src/tooltip.js.map +1 -1
- package/lib/components/tooltip/src/tooltip2.js +167 -34
- package/lib/components/tooltip/src/tooltip2.js.map +1 -1
- package/lib/components/transfer/src/composables/use-check.js +1 -1
- package/lib/components/transfer/src/transfer-panel.js +21 -130
- package/lib/components/transfer/src/transfer-panel.js.map +1 -1
- package/lib/components/transfer/src/transfer-panel2.js +130 -21
- package/lib/components/transfer/src/transfer-panel2.js.map +1 -1
- package/lib/components/transfer/src/transfer2.js +1 -1
- package/lib/components/watermark/index.js +2 -2
- package/lib/components/watermark/src/watermark.js +27 -226
- package/lib/components/watermark/src/watermark.js.map +1 -1
- package/lib/components/watermark/src/watermark2.js +226 -27
- package/lib/components/watermark/src/watermark2.js.map +1 -1
- package/lib/index.js +11 -11
- 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":"use-basic-date-table.mjs","sources":["../../../../../../../packages/components/date-picker-panel/src/composables/use-basic-date-table.ts"],"sourcesContent":["import { computed, nextTick, ref, unref, watch } from 'vue'\nimport dayjs from 'dayjs'\nimport { flatten } from 'lodash-unified'\nimport { useLocale, useNamespace } from '@element-plus/hooks'\nimport { castArray, isArray } from '@element-plus/utils'\nimport { buildPickerTable } from '../utils'\n\nimport type { SetupContext } from 'vue'\nimport type { Dayjs } from 'dayjs'\nimport type { DateCell } from '../types'\nimport type {\n BasicDateTableEmits,\n BasicDateTableProps,\n} from '../props/basic-date-table'\n\nconst isNormalDay = (type = '') => {\n return ['normal', 'today'].includes(type)\n}\n\nexport const useBasicDateTable = (\n props: BasicDateTableProps,\n emit: SetupContext<BasicDateTableEmits>['emit']\n) => {\n const { lang } = useLocale()\n const tbodyRef = ref<HTMLElement>()\n const currentCellRef = ref<HTMLElement>()\n // data\n const lastRow = ref<number>()\n const lastColumn = ref<number>()\n const tableRows = ref<DateCell[][]>([[], [], [], [], [], []])\n\n let focusWithClick = false\n\n // todo better way to get Day.js locale object\n const firstDayOfWeek = (props.date as any).$locale().weekStart || 7\n const WEEKS_CONSTANT = props.date\n .locale('en')\n .localeData()\n .weekdaysShort()\n .map((_) => _.toLowerCase())\n\n const offsetDay = computed(() => {\n // Sunday 7(0), cal the left and right offset days, 3217654, such as Monday is -1, the is to adjust the position of the first two rows of dates\n return firstDayOfWeek > 3 ? 7 - firstDayOfWeek : -firstDayOfWeek\n })\n\n const startDate = computed(() => {\n const startDayOfMonth = props.date.startOf('month')\n return startDayOfMonth.subtract(startDayOfMonth.day() || 7, 'day')\n })\n\n const WEEKS = computed(() => {\n return WEEKS_CONSTANT.concat(WEEKS_CONSTANT).slice(\n firstDayOfWeek,\n firstDayOfWeek + 7\n )\n })\n\n const hasCurrent = computed<boolean>(() => {\n return flatten(unref(rows)).some((row) => {\n return row.isCurrent\n })\n })\n\n const days = computed(() => {\n const startOfMonth = props.date.startOf('month')\n const startOfMonthDay = startOfMonth.day() || 7 // day of first day\n const dateCountOfMonth = startOfMonth.daysInMonth()\n\n const dateCountOfLastMonth = startOfMonth.subtract(1, 'month').daysInMonth()\n\n return {\n startOfMonthDay,\n dateCountOfMonth,\n dateCountOfLastMonth,\n }\n })\n\n const selectedDate = computed<Dayjs[]>(() => {\n return props.selectionMode === 'dates' ? castArray(props.parsedValue!) : []\n })\n\n // Return value indicates should the counter be incremented\n type CellCoordinate = { columnIndex: number; rowIndex: number }\n type CellMeta = CellCoordinate & {\n count: number\n }\n const setDateText = (\n cell: DateCell,\n { count, rowIndex, columnIndex }: CellMeta\n ): boolean => {\n const { startOfMonthDay, dateCountOfMonth, dateCountOfLastMonth } =\n unref(days)\n const offset = unref(offsetDay)\n if (rowIndex >= 0 && rowIndex <= 1) {\n const numberOfDaysFromPreviousMonth =\n startOfMonthDay + offset < 0\n ? 7 + startOfMonthDay + offset\n : startOfMonthDay + offset\n\n if (columnIndex + rowIndex * 7 >= numberOfDaysFromPreviousMonth) {\n cell.text = count\n return true\n } else {\n cell.text =\n dateCountOfLastMonth -\n (numberOfDaysFromPreviousMonth - (columnIndex % 7)) +\n 1 +\n rowIndex * 7\n cell.type = 'prev-month'\n }\n } else {\n if (count <= dateCountOfMonth) {\n cell.text = count\n } else {\n cell.text = count - dateCountOfMonth\n cell.type = 'next-month'\n }\n return true\n }\n return false\n }\n\n const setCellMetadata = (\n cell: DateCell,\n { columnIndex, rowIndex }: CellCoordinate,\n count: number\n ) => {\n const { disabledDate, cellClassName } = props\n const _selectedDate = unref(selectedDate)\n const shouldIncrement = setDateText(cell, { count, rowIndex, columnIndex })\n\n const cellDate = cell.dayjs!.toDate()\n cell.selected = _selectedDate.find((d) => d.isSame(cell.dayjs, 'day'))\n cell.isSelected = !!cell.selected\n cell.isCurrent = isCurrent(cell)\n cell.disabled = disabledDate?.(cellDate)\n cell.customClass = cellClassName?.(cellDate)\n return shouldIncrement\n }\n\n const setRowMetadata = (row: DateCell[]) => {\n if (props.selectionMode === 'week') {\n const [start, end] = props.showWeekNumber ? [1, 7] : [0, 6]\n const isActive = isWeekActive(row[start + 1])\n row[start].inRange = isActive\n row[start].start = isActive\n row[end].inRange = isActive\n row[end].end = isActive\n }\n }\n\n const rows = computed(() => {\n const { minDate, maxDate, rangeState, showWeekNumber } = props\n\n const offset = unref(offsetDay)\n const rows_ = unref(tableRows)\n const dateUnit = 'day'\n let count = 1\n\n buildPickerTable({ row: 6, column: 7 }, rows_, {\n startDate: minDate,\n columnIndexOffset: showWeekNumber ? 1 : 0,\n nextEndDate:\n rangeState.endDate ||\n maxDate ||\n (rangeState.selecting && minDate) ||\n null,\n now: dayjs().locale(unref(lang)).startOf(dateUnit),\n unit: dateUnit,\n relativeDateGetter: (idx: number) =>\n unref(startDate).add(idx - offset, dateUnit),\n setCellMetadata: (...args) => {\n if (setCellMetadata(...args, count)) {\n count += 1\n }\n },\n\n setRowMetadata,\n })\n\n if (showWeekNumber) {\n for (let rowIndex = 0; rowIndex < 6; rowIndex++) {\n if (rows_[rowIndex][1].dayjs) {\n rows_[rowIndex][0] = {\n type: 'week',\n text: rows_[rowIndex][1].dayjs!.week(),\n }\n }\n }\n }\n\n return rows_\n })\n\n watch(\n () => props.date,\n async () => {\n if (unref(tbodyRef)?.contains(document.activeElement)) {\n await nextTick()\n await focus()\n // currentCellRef.value?.focus()\n }\n }\n )\n\n const focus = async () => unref(currentCellRef)?.focus()\n\n const isCurrent = (cell: DateCell): boolean => {\n return (\n props.selectionMode === 'date' &&\n isNormalDay(cell.type) &&\n cellMatchesDate(cell, props.parsedValue as Dayjs)\n )\n }\n\n const cellMatchesDate = (cell: DateCell, date: Dayjs) => {\n if (!date) return false\n return dayjs(date)\n .locale(unref(lang))\n .isSame(props.date.date(Number(cell.text)), 'day')\n }\n\n const getDateOfCell = (row: number, column: number) => {\n const offsetFromStart =\n row * 7 + (column - (props.showWeekNumber ? 1 : 0)) - unref(offsetDay)\n return unref(startDate).add(offsetFromStart, 'day')\n }\n\n const handleMouseMove = (event: MouseEvent) => {\n if (!props.rangeState.selecting) return\n\n let target = event.target as HTMLElement\n if (target.tagName === 'SPAN') {\n target = target.parentNode?.parentNode as HTMLElement\n }\n if (target.tagName === 'DIV') {\n target = target.parentNode as HTMLElement\n }\n if (target.tagName !== 'TD') return\n\n const row = (target.parentNode as HTMLTableRowElement).rowIndex - 1\n const column = (target as HTMLTableCellElement).cellIndex\n\n // can not select disabled date\n if (unref(rows)[row][column].disabled) return\n\n // only update rangeState when mouse moves to a new cell\n // this avoids frequent Date object creation and improves performance\n if (row !== unref(lastRow) || column !== unref(lastColumn)) {\n lastRow.value = row\n lastColumn.value = column\n emit('changerange', {\n selecting: true,\n endDate: getDateOfCell(row, column),\n })\n }\n }\n\n const isSelectedCell = (cell: DateCell) => {\n return (\n (!unref(hasCurrent) && cell?.text === 1 && cell.type === 'normal') ||\n cell.isCurrent\n )\n }\n\n const handleFocus = (event: FocusEvent) => {\n if (focusWithClick || unref(hasCurrent) || props.selectionMode !== 'date')\n return\n handlePickDate(event, true)\n }\n\n const handleMouseDown = (event: MouseEvent) => {\n const target = (event.target as HTMLElement).closest('td')\n if (!target) return\n focusWithClick = true\n }\n\n const handleMouseUp = (event: MouseEvent) => {\n const target = (event.target as HTMLElement).closest('td')\n if (!target) return\n focusWithClick = false\n }\n\n const handleRangePick = (newDate: Dayjs) => {\n if (!props.rangeState.selecting || !props.minDate) {\n emit('pick', { minDate: newDate, maxDate: null })\n emit('select', true)\n } else {\n if (newDate >= props.minDate) {\n emit('pick', { minDate: props.minDate, maxDate: newDate })\n } else {\n emit('pick', { minDate: newDate, maxDate: props.minDate })\n }\n emit('select', false)\n }\n }\n\n const handleWeekPick = (newDate: Dayjs) => {\n const weekNumber = newDate.week()\n const value = `${newDate.year()}w${weekNumber}`\n emit('pick', {\n year: newDate.year(),\n week: weekNumber,\n value,\n date: newDate.startOf('week'),\n })\n }\n\n const handleDatesPick = (newDate: Dayjs, selected: boolean) => {\n const newValue = selected\n ? castArray(props.parsedValue).filter(\n (d) => d?.valueOf() !== newDate.valueOf()\n )\n : castArray(props.parsedValue).concat([newDate])\n emit('pick', newValue)\n }\n\n const handlePickDate = (\n event: FocusEvent | MouseEvent,\n isKeyboardMovement = false\n ) => {\n if (props.disabled) return\n const target = (event.target as HTMLElement).closest('td')\n\n if (!target) return\n\n const row = (target.parentNode as HTMLTableRowElement).rowIndex - 1\n const column = (target as HTMLTableCellElement).cellIndex\n const cell = unref(rows)[row][column]\n\n if (cell.disabled || cell.type === 'week') return\n\n const newDate = getDateOfCell(row, column)\n\n switch (props.selectionMode) {\n case 'range': {\n handleRangePick(newDate)\n break\n }\n case 'date': {\n emit('pick', newDate, isKeyboardMovement)\n break\n }\n case 'week': {\n handleWeekPick(newDate)\n break\n }\n case 'dates': {\n handleDatesPick(newDate, !!cell.selected)\n break\n }\n default: {\n break\n }\n }\n }\n\n const isWeekActive = (cell: DateCell) => {\n if (props.selectionMode !== 'week') return false\n let newDate = props.date.startOf('day')\n\n if (cell.type === 'prev-month') {\n newDate = newDate.subtract(1, 'month')\n }\n\n if (cell.type === 'next-month') {\n newDate = newDate.add(1, 'month')\n }\n\n newDate = newDate.date(Number.parseInt(cell.text as any, 10))\n\n if (props.parsedValue && !isArray(props.parsedValue)) {\n const dayOffset = ((props.parsedValue.day() - firstDayOfWeek + 7) % 7) - 1\n const weekDate = props.parsedValue.subtract(dayOffset, 'day')\n return weekDate.isSame(newDate, 'day')\n }\n return false\n }\n\n return {\n WEEKS,\n rows,\n tbodyRef,\n currentCellRef,\n\n // cellMatchesDate,\n // getDateOfCell,\n focus,\n isCurrent,\n isWeekActive,\n isSelectedCell,\n\n handlePickDate,\n handleMouseUp,\n handleMouseDown,\n handleMouseMove,\n handleFocus,\n }\n}\n\nexport const useBasicDateTableDOM = (\n props: BasicDateTableProps,\n {\n isCurrent,\n isWeekActive,\n }: Pick<ReturnType<typeof useBasicDateTable>, 'isCurrent' | 'isWeekActive'>\n) => {\n const ns = useNamespace('date-table')\n const { t } = useLocale()\n\n const tableKls = computed(() => [\n ns.b(),\n ns.is('week-mode', props.selectionMode === 'week' && !props.disabled),\n ])\n\n const tableLabel = computed(() => t('el.datepicker.dateTablePrompt'))\n\n const getCellClasses = (cell: DateCell) => {\n const classes: string[] = []\n if (isNormalDay(cell.type) && !cell.disabled) {\n classes.push('available')\n if (cell.type === 'today') {\n classes.push('today')\n }\n } else {\n classes.push(cell.type!)\n }\n\n if (isCurrent(cell)) {\n classes.push('current')\n }\n\n if (\n cell.inRange &&\n (isNormalDay(cell.type) || props.selectionMode === 'week')\n ) {\n classes.push('in-range')\n\n if (cell.start) {\n classes.push('start-date')\n }\n\n if (cell.end) {\n classes.push('end-date')\n }\n }\n\n if (cell.disabled || props.disabled) {\n classes.push('disabled')\n }\n\n if (cell.selected) {\n classes.push('selected')\n }\n\n if (cell.customClass) {\n classes.push(cell.customClass)\n }\n\n return classes.join(' ')\n }\n\n const getRowKls = (cell: DateCell) => [\n ns.e('row'),\n { current: isWeekActive(cell) },\n ]\n\n return {\n tableKls,\n tableLabel,\n weekHeaderClass: ns.e('week-header'),\n\n getCellClasses,\n getRowKls,\n t,\n }\n}\n"],"names":[],"mappings":";;;;;;;;;AAMA,MAAM,WAAW,GAAG,CAAC,IAAI,GAAG,EAAE,KAAK;AACnC,EAAE,OAAO,CAAC,QAAQ,EAAE,OAAO,CAAC,CAAC,QAAQ,CAAC,IAAI,CAAC,CAAC;AAC5C,CAAC,CAAC;AACU,MAAC,iBAAiB,GAAG,CAAC,KAAK,EAAE,IAAI,KAAK;AAClD,EAAE,MAAM,EAAE,IAAI,EAAE,GAAG,SAAS,EAAE,CAAC;AAC/B,EAAE,MAAM,QAAQ,GAAG,GAAG,EAAE,CAAC;AACzB,EAAE,MAAM,cAAc,GAAG,GAAG,EAAE,CAAC;AAC/B,EAAE,MAAM,OAAO,GAAG,GAAG,EAAE,CAAC;AACxB,EAAE,MAAM,UAAU,GAAG,GAAG,EAAE,CAAC;AAC3B,EAAE,MAAM,SAAS,GAAG,GAAG,CAAC,CAAC,EAA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C,CAAC;AAC7B,GAAG,CAAC;AACJ,EAAE,MAAM,SAAS,GAAG,CAAC,IAAI,KAAK;AAC9B,IAAI,EAAE,CAAC,CAAC,CAAC,KAAK,CAAC;AACf,IAAI,EAAE,OAAO,EAAE,YAAY,CAAC,IAAI,CAAC,EAAE;AACnC,GAAG,CAAC;AACJ,EAAE,OAAO;AACT,IAAI,QAAQ;AACZ,IAAI,UAAU;AACd,IAAI,eAAe,EAAE,EAAE,CAAC,CAAC,CAAC,aAAa,CAAC;AACxC,IAAI,cAAc;AAClB,IAAI,SAAS;AACb,IAAI,CAAC;AACL,GAAG,CAAC;AACJ;;;;"}
|
|
1
|
+
{"version":3,"file":"use-basic-date-table.mjs","sources":["../../../../../../../packages/components/date-picker-panel/src/composables/use-basic-date-table.ts"],"sourcesContent":["import { computed, nextTick, ref, unref, watch } from 'vue'\nimport dayjs from 'dayjs'\nimport { flatten } from 'lodash-unified'\nimport { useLocale, useNamespace } from '@element-plus/hooks'\nimport { castArray, isArray } from '@element-plus/utils'\nimport { buildPickerTable } from '../utils'\n\nimport type { SetupContext } from 'vue'\nimport type { Dayjs } from 'dayjs'\nimport type { DateCell } from '../types'\nimport type {\n BasicDateTableEmits,\n BasicDateTableProps,\n} from '../props/basic-date-table'\n\nconst isNormalDay = (type = '') => {\n return ['normal', 'today'].includes(type)\n}\n\nexport const useBasicDateTable = (\n props: BasicDateTableProps,\n emit: SetupContext<BasicDateTableEmits>['emit']\n) => {\n const { lang } = useLocale()\n const tbodyRef = ref<HTMLElement>()\n const currentCellRef = ref<HTMLElement>()\n // data\n const lastRow = ref<number>()\n const lastColumn = ref<number>()\n const tableRows = ref<DateCell[][]>([[], [], [], [], [], []])\n\n let focusWithClick = false\n\n // todo better way to get Day.js locale object\n const firstDayOfWeek = (props.date as any).$locale().weekStart || 7\n const WEEKS_CONSTANT = props.date\n .locale('en')\n .localeData()\n .weekdaysShort()\n .map((_) => _.toLowerCase())\n\n const offsetDay = computed(() => {\n // Sunday 7(0), cal the left and right offset days, 3217654, such as Monday is -1, the is to adjust the position of the first two rows of dates\n return firstDayOfWeek > 3 ? 7 - firstDayOfWeek : -firstDayOfWeek\n })\n\n const startDate = computed(() => {\n const startDayOfMonth = props.date.startOf('month')\n return startDayOfMonth.subtract(startDayOfMonth.day() || 7, 'day')\n })\n\n const WEEKS = computed(() => {\n return WEEKS_CONSTANT.concat(WEEKS_CONSTANT).slice(\n firstDayOfWeek,\n firstDayOfWeek + 7\n )\n })\n\n const hasCurrent = computed<boolean>(() => {\n return flatten(unref(rows)).some((row) => {\n return row.isCurrent\n })\n })\n\n const days = computed(() => {\n const startOfMonth = props.date.startOf('month')\n const startOfMonthDay = startOfMonth.day() || 7 // day of first day\n const dateCountOfMonth = startOfMonth.daysInMonth()\n\n const dateCountOfLastMonth = startOfMonth.subtract(1, 'month').daysInMonth()\n\n return {\n startOfMonthDay,\n dateCountOfMonth,\n dateCountOfLastMonth,\n }\n })\n\n const selectedDate = computed<Dayjs[]>(() => {\n return props.selectionMode === 'dates' ? castArray(props.parsedValue!) : []\n })\n\n // Return value indicates should the counter be incremented\n type CellCoordinate = { columnIndex: number; rowIndex: number }\n type CellMeta = CellCoordinate & {\n count: number\n }\n const setDateText = (\n cell: DateCell,\n { count, rowIndex, columnIndex }: CellMeta\n ): boolean => {\n const { startOfMonthDay, dateCountOfMonth, dateCountOfLastMonth } =\n unref(days)\n const offset = unref(offsetDay)\n if (rowIndex >= 0 && rowIndex <= 1) {\n const numberOfDaysFromPreviousMonth =\n startOfMonthDay + offset < 0\n ? 7 + startOfMonthDay + offset\n : startOfMonthDay + offset\n\n if (columnIndex + rowIndex * 7 >= numberOfDaysFromPreviousMonth) {\n cell.text = count\n return true\n } else {\n cell.text =\n dateCountOfLastMonth -\n (numberOfDaysFromPreviousMonth - (columnIndex % 7)) +\n 1 +\n rowIndex * 7\n cell.type = 'prev-month'\n }\n } else {\n if (count <= dateCountOfMonth) {\n cell.text = count\n } else {\n cell.text = count - dateCountOfMonth\n cell.type = 'next-month'\n }\n return true\n }\n return false\n }\n\n const setCellMetadata = (\n cell: DateCell,\n { columnIndex, rowIndex }: CellCoordinate,\n count: number\n ) => {\n const { disabledDate, cellClassName } = props\n const _selectedDate = unref(selectedDate)\n const shouldIncrement = setDateText(cell, { count, rowIndex, columnIndex })\n\n const cellDate = cell.dayjs!.toDate()\n cell.selected = _selectedDate.find((d) => d.isSame(cell.dayjs, 'day'))\n cell.isSelected = !!cell.selected\n cell.isCurrent = isCurrent(cell)\n cell.disabled = disabledDate?.(cellDate)\n cell.customClass = cellClassName?.(cellDate)\n return shouldIncrement\n }\n\n const setRowMetadata = (row: DateCell[]) => {\n if (props.selectionMode === 'week') {\n const [start, end] = props.showWeekNumber ? [1, 7] : [0, 6]\n const isActive = isWeekActive(row[start + 1])\n row[start].inRange = isActive\n row[start].start = isActive\n row[end].inRange = isActive\n row[end].end = isActive\n }\n }\n\n const rows = computed(() => {\n const { minDate, maxDate, rangeState, showWeekNumber } = props\n\n const offset = unref(offsetDay)\n const rows_ = unref(tableRows)\n const dateUnit = 'day'\n let count = 1\n\n buildPickerTable({ row: 6, column: 7 }, rows_, {\n startDate: minDate,\n columnIndexOffset: showWeekNumber ? 1 : 0,\n nextEndDate:\n rangeState.endDate ||\n maxDate ||\n (rangeState.selecting && minDate) ||\n null,\n now: dayjs().locale(unref(lang)).startOf(dateUnit),\n unit: dateUnit,\n relativeDateGetter: (idx: number) =>\n unref(startDate).add(idx - offset, dateUnit),\n setCellMetadata: (...args) => {\n if (setCellMetadata(...args, count)) {\n count += 1\n }\n },\n\n setRowMetadata,\n })\n\n if (showWeekNumber) {\n for (let rowIndex = 0; rowIndex < 6; rowIndex++) {\n if (rows_[rowIndex][1].dayjs) {\n rows_[rowIndex][0] = {\n type: 'week',\n text: rows_[rowIndex][1].dayjs!.week(),\n }\n }\n }\n }\n\n return rows_\n })\n\n watch(\n () => props.date,\n async () => {\n if (unref(tbodyRef)?.contains(document.activeElement)) {\n await nextTick()\n await focus()\n // currentCellRef.value?.focus()\n }\n }\n )\n\n const focus = async () => unref(currentCellRef)?.focus()\n\n const isCurrent = (cell: DateCell): boolean => {\n return (\n props.selectionMode === 'date' &&\n isNormalDay(cell.type) &&\n cellMatchesDate(cell, props.parsedValue as Dayjs)\n )\n }\n\n const cellMatchesDate = (cell: DateCell, date: Dayjs) => {\n if (!date) return false\n return dayjs(date)\n .locale(unref(lang))\n .isSame(props.date.date(Number(cell.text)), 'day')\n }\n\n const getDateOfCell = (row: number, column: number) => {\n const offsetFromStart =\n row * 7 + (column - (props.showWeekNumber ? 1 : 0)) - unref(offsetDay)\n return unref(startDate).add(offsetFromStart, 'day')\n }\n\n const handleMouseMove = (event: MouseEvent) => {\n if (!props.rangeState.selecting) return\n\n let target = event.target as HTMLElement\n if (target.tagName === 'SPAN') {\n target = target.parentNode?.parentNode as HTMLElement\n }\n if (target.tagName === 'DIV') {\n target = target.parentNode as HTMLElement\n }\n if (target.tagName !== 'TD') return\n\n const row = (target.parentNode as HTMLTableRowElement).rowIndex - 1\n const column = (target as HTMLTableCellElement).cellIndex\n\n // can not select disabled date\n if (unref(rows)[row][column].disabled) return\n\n // only update rangeState when mouse moves to a new cell\n // this avoids frequent Date object creation and improves performance\n if (row !== unref(lastRow) || column !== unref(lastColumn)) {\n lastRow.value = row\n lastColumn.value = column\n emit('changerange', {\n selecting: true,\n endDate: getDateOfCell(row, column),\n })\n }\n }\n\n const isSelectedCell = (cell: DateCell) => {\n return (\n (!unref(hasCurrent) && cell?.text === 1 && isNormalDay(cell.type)) ||\n cell.isCurrent\n )\n }\n\n const handleFocus = (event: FocusEvent) => {\n if (focusWithClick || unref(hasCurrent) || props.selectionMode !== 'date')\n return\n handlePickDate(event, true)\n }\n\n const handleMouseDown = (event: MouseEvent) => {\n const target = (event.target as HTMLElement).closest('td')\n if (!target) return\n focusWithClick = true\n }\n\n const handleMouseUp = (event: MouseEvent) => {\n const target = (event.target as HTMLElement).closest('td')\n if (!target) return\n focusWithClick = false\n }\n\n const handleRangePick = (newDate: Dayjs) => {\n if (!props.rangeState.selecting || !props.minDate) {\n emit('pick', { minDate: newDate, maxDate: null })\n emit('select', true)\n } else {\n if (newDate >= props.minDate) {\n emit('pick', { minDate: props.minDate, maxDate: newDate })\n } else {\n emit('pick', { minDate: newDate, maxDate: props.minDate })\n }\n emit('select', false)\n }\n }\n\n const handleWeekPick = (newDate: Dayjs) => {\n const weekNumber = newDate.week()\n const value = `${newDate.year()}w${weekNumber}`\n emit('pick', {\n year: newDate.year(),\n week: weekNumber,\n value,\n date: newDate.startOf('week'),\n })\n }\n\n const handleDatesPick = (newDate: Dayjs, selected: boolean) => {\n const newValue = selected\n ? castArray(props.parsedValue).filter(\n (d) => d?.valueOf() !== newDate.valueOf()\n )\n : castArray(props.parsedValue).concat([newDate])\n emit('pick', newValue)\n }\n\n const handlePickDate = (\n event: FocusEvent | MouseEvent,\n isKeyboardMovement = false\n ) => {\n if (props.disabled) return\n const target = (event.target as HTMLElement).closest('td')\n\n if (!target) return\n\n const row = (target.parentNode as HTMLTableRowElement).rowIndex - 1\n const column = (target as HTMLTableCellElement).cellIndex\n const cell = unref(rows)[row][column]\n\n if (cell.disabled || cell.type === 'week') return\n\n const newDate = getDateOfCell(row, column)\n\n switch (props.selectionMode) {\n case 'range': {\n handleRangePick(newDate)\n break\n }\n case 'date': {\n emit('pick', newDate, isKeyboardMovement)\n break\n }\n case 'week': {\n handleWeekPick(newDate)\n break\n }\n case 'dates': {\n handleDatesPick(newDate, !!cell.selected)\n break\n }\n default: {\n break\n }\n }\n }\n\n const isWeekActive = (cell: DateCell) => {\n if (props.selectionMode !== 'week') return false\n let newDate = props.date.startOf('day')\n\n if (cell.type === 'prev-month') {\n newDate = newDate.subtract(1, 'month')\n }\n\n if (cell.type === 'next-month') {\n newDate = newDate.add(1, 'month')\n }\n\n newDate = newDate.date(Number.parseInt(cell.text as any, 10))\n\n if (props.parsedValue && !isArray(props.parsedValue)) {\n const dayOffset = ((props.parsedValue.day() - firstDayOfWeek + 7) % 7) - 1\n const weekDate = props.parsedValue.subtract(dayOffset, 'day')\n return weekDate.isSame(newDate, 'day')\n }\n return false\n }\n\n return {\n WEEKS,\n rows,\n tbodyRef,\n currentCellRef,\n\n // cellMatchesDate,\n // getDateOfCell,\n focus,\n isCurrent,\n isWeekActive,\n isSelectedCell,\n\n handlePickDate,\n handleMouseUp,\n handleMouseDown,\n handleMouseMove,\n handleFocus,\n }\n}\n\nexport const useBasicDateTableDOM = (\n props: BasicDateTableProps,\n {\n isCurrent,\n isWeekActive,\n }: Pick<ReturnType<typeof useBasicDateTable>, 'isCurrent' | 'isWeekActive'>\n) => {\n const ns = useNamespace('date-table')\n const { t } = useLocale()\n\n const tableKls = computed(() => [\n ns.b(),\n ns.is('week-mode', props.selectionMode === 'week' && !props.disabled),\n ])\n\n const tableLabel = computed(() => t('el.datepicker.dateTablePrompt'))\n\n const getCellClasses = (cell: DateCell) => {\n const classes: string[] = []\n if (isNormalDay(cell.type) && !cell.disabled) {\n classes.push('available')\n if (cell.type === 'today') {\n classes.push('today')\n }\n } else {\n classes.push(cell.type!)\n }\n\n if (isCurrent(cell)) {\n classes.push('current')\n }\n\n if (\n cell.inRange &&\n (isNormalDay(cell.type) || props.selectionMode === 'week')\n ) {\n classes.push('in-range')\n\n if (cell.start) {\n classes.push('start-date')\n }\n\n if (cell.end) {\n classes.push('end-date')\n }\n }\n\n if (cell.disabled || props.disabled) {\n classes.push('disabled')\n }\n\n if (cell.selected) {\n classes.push('selected')\n }\n\n if (cell.customClass) {\n classes.push(cell.customClass)\n }\n\n return classes.join(' ')\n }\n\n const getRowKls = (cell: DateCell) => [\n ns.e('row'),\n { current: isWeekActive(cell) },\n ]\n\n return {\n tableKls,\n tableLabel,\n weekHeaderClass: ns.e('week-header'),\n\n getCellClasses,\n getRowKls,\n t,\n }\n}\n"],"names":[],"mappings":";;;;;;;;;AAMA,MAAM,WAAW,GAAG,CAAC,IAAI,GAAG,EAAE,KAAK;AACnC,EAAE,O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CAAC,UAAU,CAAC,CAAC;AACjC,OAAO;AACP,KAAK;AACL,IAAI,IAAI,IAAI,CAAC,QAAQ,IAAI,KAAK,CAAC,QAAQ,EAAE;AACzC,MAAM,OAAO,CAAC,IAAI,CAAC,UAAU,CAAC,CAAC;AAC/B,KAAK;AACL,IAAI,IAAI,IAAI,CAAC,QAAQ,EAAE;AACvB,MAAM,OAAO,CAAC,IAAI,CAAC,UAAU,CAAC,CAAC;AAC/B,KAAK;AACL,IAAI,IAAI,IAAI,CAAC,WAAW,EAAE;AAC1B,MAAM,OAAO,CAAC,IAAI,CAAC,IAAI,CAAC,WAAW,CAAC,CAAC;AACrC,KAAK;AACL,IAAI,OAAO,OAAO,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;AAC7B,GAAG,CAAC;AACJ,EAAE,MAAM,SAAS,GAAG,CAAC,IAAI,KAAK;AAC9B,IAAI,EAAE,CAAC,CAAC,CAAC,KAAK,CAAC;AACf,IAAI,EAAE,OAAO,EAAE,YAAY,CAAC,IAAI,CAAC,EAAE;AACnC,GAAG,CAAC;AACJ,EAAE,OAAO;AACT,IAAI,QAAQ;AACZ,IAAI,UAAU;AACd,IAAI,eAAe,EAAE,EAAE,CAAC,CAAC,CAAC,aAAa,CAAC;AACxC,IAAI,cAAc;AAClB,IAAI,SAAS;AACb,IAAI,CAAC;AACL,GAAG,CAAC;AACJ;;;;"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import Empty from './src/
|
|
2
|
-
export { emptyProps } from './src/
|
|
1
|
+
import Empty from './src/empty.mjs';
|
|
2
|
+
export { emptyProps } from './src/empty2.mjs';
|
|
3
3
|
import { withInstall } from '../../utils/vue/install.mjs';
|
|
4
4
|
|
|
5
5
|
const ElEmpty = withInstall(Empty);
|
|
@@ -1,16 +1,57 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { defineComponent, computed, openBlock, createElementBlock, normalizeClass, unref, createElementVNode, normalizeStyle, renderSlot, createVNode, toDisplayString, createCommentVNode } from 'vue';
|
|
2
|
+
import ImgEmpty from './img-empty.mjs';
|
|
3
|
+
import { emptyProps } from './empty2.mjs';
|
|
4
|
+
import _export_sfc from '../../../_virtual/plugin-vue_export-helper.mjs';
|
|
5
|
+
import { useLocale } from '../../../hooks/use-locale/index.mjs';
|
|
6
|
+
import { useNamespace } from '../../../hooks/use-namespace/index.mjs';
|
|
7
|
+
import { addUnit } from '../../../utils/dom/style.mjs';
|
|
2
8
|
|
|
3
|
-
const
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
9
|
+
const __default__ = defineComponent({
|
|
10
|
+
name: "ElEmpty"
|
|
11
|
+
});
|
|
12
|
+
const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
13
|
+
...__default__,
|
|
14
|
+
props: emptyProps,
|
|
15
|
+
setup(__props) {
|
|
16
|
+
const props = __props;
|
|
17
|
+
const { t } = useLocale();
|
|
18
|
+
const ns = useNamespace("empty");
|
|
19
|
+
const emptyDescription = computed(() => props.description || t("el.table.emptyText"));
|
|
20
|
+
const imageStyle = computed(() => ({
|
|
21
|
+
width: addUnit(props.imageSize)
|
|
22
|
+
}));
|
|
23
|
+
return (_ctx, _cache) => {
|
|
24
|
+
return openBlock(), createElementBlock("div", {
|
|
25
|
+
class: normalizeClass(unref(ns).b())
|
|
26
|
+
}, [
|
|
27
|
+
createElementVNode("div", {
|
|
28
|
+
class: normalizeClass(unref(ns).e("image")),
|
|
29
|
+
style: normalizeStyle(unref(imageStyle))
|
|
30
|
+
}, [
|
|
31
|
+
_ctx.image ? (openBlock(), createElementBlock("img", {
|
|
32
|
+
key: 0,
|
|
33
|
+
src: _ctx.image,
|
|
34
|
+
ondragstart: "return false"
|
|
35
|
+
}, null, 8, ["src"])) : renderSlot(_ctx.$slots, "image", { key: 1 }, () => [
|
|
36
|
+
createVNode(ImgEmpty)
|
|
37
|
+
])
|
|
38
|
+
], 6),
|
|
39
|
+
createElementVNode("div", {
|
|
40
|
+
class: normalizeClass(unref(ns).e("description"))
|
|
41
|
+
}, [
|
|
42
|
+
_ctx.$slots.description ? renderSlot(_ctx.$slots, "description", { key: 0 }) : (openBlock(), createElementBlock("p", { key: 1 }, toDisplayString(unref(emptyDescription)), 1))
|
|
43
|
+
], 2),
|
|
44
|
+
_ctx.$slots.default ? (openBlock(), createElementBlock("div", {
|
|
45
|
+
key: 0,
|
|
46
|
+
class: normalizeClass(unref(ns).e("bottom"))
|
|
47
|
+
}, [
|
|
48
|
+
renderSlot(_ctx.$slots, "default")
|
|
49
|
+
], 2)) : createCommentVNode("v-if", true)
|
|
50
|
+
], 2);
|
|
51
|
+
};
|
|
12
52
|
}
|
|
13
53
|
});
|
|
54
|
+
var Empty = /* @__PURE__ */ _export_sfc(_sfc_main, [["__file", "empty.vue"]]);
|
|
14
55
|
|
|
15
|
-
export {
|
|
56
|
+
export { Empty as default };
|
|
16
57
|
//# sourceMappingURL=empty.mjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"empty.mjs","sources":["../../../../../../packages/components/empty/src/empty.
|
|
1
|
+
{"version":3,"file":"empty.mjs","sources":["../../../../../../packages/components/empty/src/empty.vue"],"sourcesContent":["<template>\n <div :class=\"ns.b()\">\n <div :class=\"ns.e('image')\" :style=\"imageStyle\">\n <img v-if=\"image\" :src=\"image\" ondragstart=\"return false\" />\n <slot v-else name=\"image\">\n <img-empty />\n </slot>\n </div>\n <div :class=\"ns.e('description')\">\n <slot v-if=\"$slots.description\" name=\"description\" />\n <p v-else>{{ emptyDescription }}</p>\n </div>\n <div v-if=\"$slots.default\" :class=\"ns.e('bottom')\">\n <slot />\n </div>\n </div>\n</template>\n\n<script lang=\"ts\" setup>\nimport { computed } from 'vue'\nimport { useLocale, useNamespace } from '@element-plus/hooks'\nimport { addUnit } from '@element-plus/utils'\nimport ImgEmpty from './img-empty.vue'\nimport { emptyProps } from './empty'\n\nimport type { CSSProperties } from 'vue'\n\ndefineOptions({\n name: 'ElEmpty',\n})\n\nconst props = defineProps(emptyProps)\n\nconst { t } = useLocale()\nconst ns = useNamespace('empty')\nconst emptyDescription = computed(\n () => props.description || t('el.table.emptyText')\n)\nconst imageStyle = computed<CSSProperties>(() => ({\n width: addUnit(props.imageSize),\n}))\n</script>\n"],"names":["_openBlock","_createElementBlock"],"mappings":";;;;;;;;mCA2Bc,CAAA;AAAA,EACZ,IAAM,EAAA,SAAA;AACR,CAAA,CAAA,CAAA;;;;;;AAIA,IAAM,MAAA,EAAE,CAAE,EAAA,GAAI,SAAU,EAAA,CAAA;AACxB,IAAM,MAAA,EAAA,GAAK,aAAa,OAAO,CAAA,CAAA;AAC/B,IAAA,MAAM,gBAAmB,GAAA,QAAA,CAAA,MAAA,KAAA,CAAA,WAAA,IAAA,CAAA,CAAA,oBAAA,CAAA,CAAA,CAAA;AAAA,IAAA,MACjB,UAAqB,GAAA,QAAA,CAAA,OAAsB;AAAA,MACnD,KAAA,EAAA,OAAA,CAAA,KAAA,CAAA,SAAA,CAAA;AACA,KAAM,CAAA,CAAA,CAAA;AAA4C,IAChD,OAAA,CAAA,IAAe,EAAA,MAAA,KAAe;AAAA,MAC9B,OAAAA,SAAA,EAAA,EAAAC,kBAAA,CAAA,KAAA,EAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
|
@@ -1,57 +1,16 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import ImgEmpty from './img-empty.mjs';
|
|
3
|
-
import { emptyProps } from './empty.mjs';
|
|
4
|
-
import _export_sfc from '../../../_virtual/plugin-vue_export-helper.mjs';
|
|
5
|
-
import { useLocale } from '../../../hooks/use-locale/index.mjs';
|
|
6
|
-
import { useNamespace } from '../../../hooks/use-namespace/index.mjs';
|
|
7
|
-
import { addUnit } from '../../../utils/dom/style.mjs';
|
|
1
|
+
import { buildProps } from '../../../utils/vue/props/runtime.mjs';
|
|
8
2
|
|
|
9
|
-
const
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
const ns = useNamespace("empty");
|
|
19
|
-
const emptyDescription = computed(() => props.description || t("el.table.emptyText"));
|
|
20
|
-
const imageStyle = computed(() => ({
|
|
21
|
-
width: addUnit(props.imageSize)
|
|
22
|
-
}));
|
|
23
|
-
return (_ctx, _cache) => {
|
|
24
|
-
return openBlock(), createElementBlock("div", {
|
|
25
|
-
class: normalizeClass(unref(ns).b())
|
|
26
|
-
}, [
|
|
27
|
-
createElementVNode("div", {
|
|
28
|
-
class: normalizeClass(unref(ns).e("image")),
|
|
29
|
-
style: normalizeStyle(unref(imageStyle))
|
|
30
|
-
}, [
|
|
31
|
-
_ctx.image ? (openBlock(), createElementBlock("img", {
|
|
32
|
-
key: 0,
|
|
33
|
-
src: _ctx.image,
|
|
34
|
-
ondragstart: "return false"
|
|
35
|
-
}, null, 8, ["src"])) : renderSlot(_ctx.$slots, "image", { key: 1 }, () => [
|
|
36
|
-
createVNode(ImgEmpty)
|
|
37
|
-
])
|
|
38
|
-
], 6),
|
|
39
|
-
createElementVNode("div", {
|
|
40
|
-
class: normalizeClass(unref(ns).e("description"))
|
|
41
|
-
}, [
|
|
42
|
-
_ctx.$slots.description ? renderSlot(_ctx.$slots, "description", { key: 0 }) : (openBlock(), createElementBlock("p", { key: 1 }, toDisplayString(unref(emptyDescription)), 1))
|
|
43
|
-
], 2),
|
|
44
|
-
_ctx.$slots.default ? (openBlock(), createElementBlock("div", {
|
|
45
|
-
key: 0,
|
|
46
|
-
class: normalizeClass(unref(ns).e("bottom"))
|
|
47
|
-
}, [
|
|
48
|
-
renderSlot(_ctx.$slots, "default")
|
|
49
|
-
], 2)) : createCommentVNode("v-if", true)
|
|
50
|
-
], 2);
|
|
51
|
-
};
|
|
3
|
+
const emptyProps = buildProps({
|
|
4
|
+
image: {
|
|
5
|
+
type: String,
|
|
6
|
+
default: ""
|
|
7
|
+
},
|
|
8
|
+
imageSize: Number,
|
|
9
|
+
description: {
|
|
10
|
+
type: String,
|
|
11
|
+
default: ""
|
|
52
12
|
}
|
|
53
13
|
});
|
|
54
|
-
var Empty = /* @__PURE__ */ _export_sfc(_sfc_main, [["__file", "empty.vue"]]);
|
|
55
14
|
|
|
56
|
-
export {
|
|
15
|
+
export { emptyProps };
|
|
57
16
|
//# sourceMappingURL=empty2.mjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"empty2.mjs","sources":["../../../../../../packages/components/empty/src/empty.
|
|
1
|
+
{"version":3,"file":"empty2.mjs","sources":["../../../../../../packages/components/empty/src/empty.ts"],"sourcesContent":["import { buildProps } from '@element-plus/utils'\n\nimport type { ExtractPropTypes, __ExtractPublicPropTypes } from 'vue'\n\nexport const emptyProps = buildProps({\n /**\n * @description image URL of empty\n */\n image: {\n type: String,\n default: '',\n },\n /**\n * @description image size (width) of empty\n */\n imageSize: Number,\n /**\n * @description description of empty\n */\n description: {\n type: String,\n default: '',\n },\n} as const)\n\nexport type EmptyProps = ExtractPropTypes<typeof emptyProps>\nexport type EmptyPropsPublic = __ExtractPublicPropTypes<typeof emptyProps>\n"],"names":[],"mappings":";;AACY,MAAC,UAAU,GAAG,UAAU,CAAC;AACrC,EAAE,KAAK,EAAE;AACT,IAAI,IAAI,EAAE,MAAM;AAChB,IAAI,OAAO,EAAE,EAAE;AACf,GAAG;AACH,EAAE,SAAS,EAAE,MAAM;AACnB,EAAE,WAAW,EAAE;AACf,IAAI,IAAI,EAAE,MAAM;AAChB,IAAI,OAAO,EAAE,EAAE;AACf,GAAG;AACH,CAAC;;;;"}
|
package/es/components/index.mjs
CHANGED
|
@@ -103,16 +103,16 @@ export { cardContextKey, cardProps } from './card/src/card.mjs';
|
|
|
103
103
|
export { carouselEmits, carouselProps } from './carousel/src/carousel.mjs';
|
|
104
104
|
export { carouselItemProps } from './carousel/src/carousel-item.mjs';
|
|
105
105
|
export { CAROUSEL_ITEM_NAME, carouselContextKey } from './carousel/src/constants.mjs';
|
|
106
|
-
export { cascaderEmits, cascaderProps } from './cascader/src/
|
|
106
|
+
export { cascaderEmits, cascaderProps } from './cascader/src/cascader2.mjs';
|
|
107
107
|
export { CASCADER_PANEL_INJECTION_KEY } from './cascader-panel/src/types.mjs';
|
|
108
108
|
export { CommonProps, DefaultProps, cascaderPanelEmits, cascaderPanelProps, useCascaderConfig } from './cascader-panel/src/config.mjs';
|
|
109
|
-
export { checkTagEmits, checkTagProps } from './check-tag/src/check-
|
|
109
|
+
export { checkTagEmits, checkTagProps } from './check-tag/src/check-tag2.mjs';
|
|
110
110
|
export { checkboxDefaultProps, checkboxGroupEmits, checkboxGroupProps } from './checkbox/src/checkbox-group.mjs';
|
|
111
111
|
export { checkboxEmits, checkboxProps } from './checkbox/src/checkbox.mjs';
|
|
112
112
|
export { checkboxGroupContextKey } from './checkbox/src/constants.mjs';
|
|
113
|
-
export { colProps } from './col/src/
|
|
113
|
+
export { colProps } from './col/src/col2.mjs';
|
|
114
114
|
export { collapseEmits, collapseProps, emitChangeFn } from './collapse/src/collapse.mjs';
|
|
115
|
-
export { collapseItemProps } from './collapse/src/collapse-
|
|
115
|
+
export { collapseItemProps } from './collapse/src/collapse-item2.mjs';
|
|
116
116
|
export { collapseContextKey } from './collapse/src/constants.mjs';
|
|
117
117
|
export { ROOT_COMMON_COLOR_INJECTION_KEY, colorPickerPanelContextKey, colorPickerPanelEmits, colorPickerPanelProps } from './color-picker-panel/src/color-picker-panel.mjs';
|
|
118
118
|
export { colorPickerEmits, colorPickerProps } from './color-picker/src/color-picker.mjs';
|
|
@@ -120,7 +120,7 @@ export { messageConfig } from './config-provider/src/config-provider.mjs';
|
|
|
120
120
|
export { configProviderProps } from './config-provider/src/config-provider-props.mjs';
|
|
121
121
|
export { configProviderContextKey } from './config-provider/src/constants.mjs';
|
|
122
122
|
export { provideGlobalConfig, useGlobalComponentSettings, useGlobalConfig } from './config-provider/src/hooks/use-global-config.mjs';
|
|
123
|
-
export { countdownEmits, countdownProps } from './countdown/src/
|
|
123
|
+
export { countdownEmits, countdownProps } from './countdown/src/countdown2.mjs';
|
|
124
124
|
export { datePickerProps } from './date-picker/src/props.mjs';
|
|
125
125
|
export { ROOT_PICKER_INJECTION_KEY, ROOT_PICKER_IS_DEFAULT_FORMAT_INJECTION_KEY } from './date-picker-panel/src/constants.mjs';
|
|
126
126
|
export { datePickerPanelProps } from './date-picker-panel/src/props/date-picker-panel.mjs';
|
|
@@ -133,7 +133,7 @@ export { dividerProps } from './divider/src/divider.mjs';
|
|
|
133
133
|
export { drawerEmits, drawerProps } from './drawer/src/drawer.mjs';
|
|
134
134
|
export { FIRST_KEYS, FIRST_LAST_KEYS, LAST_KEYS, dropdownItemProps, dropdownMenuProps, dropdownProps } from './dropdown/src/dropdown.mjs';
|
|
135
135
|
export { DROPDOWN_INJECTION_KEY, DROPDOWN_INSTANCE_INJECTION_KEY } from './dropdown/src/tokens.mjs';
|
|
136
|
-
export { emptyProps } from './empty/src/
|
|
136
|
+
export { emptyProps } from './empty/src/empty2.mjs';
|
|
137
137
|
export { formEmits, formMetaProps, formProps } from './form/src/form.mjs';
|
|
138
138
|
export { formItemProps, formItemValidateStates } from './form/src/form-item2.mjs';
|
|
139
139
|
export { formContextKey, formItemContextKey } from './form/src/constants.mjs';
|
|
@@ -152,7 +152,7 @@ export { menuItemGroupProps } from './menu/src/menu-item-group.mjs';
|
|
|
152
152
|
export { subMenuProps } from './menu/src/sub-menu.mjs';
|
|
153
153
|
export { MENU_INJECTION_KEY, SUB_MENU_INJECTION_KEY } from './menu/src/tokens.mjs';
|
|
154
154
|
export { overlayEmits, overlayProps } from './overlay/src/overlay.mjs';
|
|
155
|
-
export { pageHeaderEmits, pageHeaderProps } from './page-header/src/page-
|
|
155
|
+
export { pageHeaderEmits, pageHeaderProps } from './page-header/src/page-header2.mjs';
|
|
156
156
|
export { paginationEmits, paginationProps } from './pagination/src/pagination.mjs';
|
|
157
157
|
export { elPaginationKey } from './pagination/src/constants.mjs';
|
|
158
158
|
export { popconfirmEmits, popconfirmProps } from './popconfirm/src/popconfirm.mjs';
|
|
@@ -199,7 +199,7 @@ export { autoResizerProps } from './table-v2/src/auto-resizer.mjs';
|
|
|
199
199
|
export { tableV2Props } from './table-v2/src/table.mjs';
|
|
200
200
|
export { tableV2RowProps } from './table-v2/src/row.mjs';
|
|
201
201
|
export { tabsEmits, tabsProps } from './tabs/src/tabs.mjs';
|
|
202
|
-
export { tabBarProps } from './tabs/src/tab-
|
|
202
|
+
export { tabBarProps } from './tabs/src/tab-bar.mjs';
|
|
203
203
|
export { tabNavEmits, tabNavProps } from './tabs/src/tab-nav.mjs';
|
|
204
204
|
export { tabPaneProps } from './tabs/src/tab-pane.mjs';
|
|
205
205
|
export { tabsRootContextKey } from './tabs/src/constants.mjs';
|
|
@@ -210,10 +210,10 @@ export { DEFAULT_FORMATS_DATE, DEFAULT_FORMATS_DATEPICKER, DEFAULT_FORMATS_TIME,
|
|
|
210
210
|
export { timePickerDefaultProps, timePickerRangeTriggerProps, timePickerRngeTriggerProps } from './time-picker/src/common/props.mjs';
|
|
211
211
|
export { default as CommonPicker } from './time-picker/src/common/picker.mjs';
|
|
212
212
|
export { default as TimePickPanel } from './time-picker/src/time-picker-com/panel-time-pick.mjs';
|
|
213
|
-
export { timeSelectProps } from './time-select/src/time-
|
|
213
|
+
export { timeSelectProps } from './time-select/src/time-select.mjs';
|
|
214
214
|
export { timelineItemProps } from './timeline/src/timeline-item.mjs';
|
|
215
215
|
export { TIMELINE_INJECTION_KEY } from './timeline/src/tokens.mjs';
|
|
216
|
-
export { tooltipEmits, useTooltipModelToggle, useTooltipModelToggleEmits, useTooltipModelToggleProps, useTooltipProps } from './tooltip/src/
|
|
216
|
+
export { tooltipEmits, useTooltipModelToggle, useTooltipModelToggleEmits, useTooltipModelToggleProps, useTooltipProps } from './tooltip/src/tooltip.mjs';
|
|
217
217
|
export { useTooltipTriggerProps } from './tooltip/src/trigger.mjs';
|
|
218
218
|
export { useTooltipContentProps } from './tooltip/src/content.mjs';
|
|
219
219
|
export { TOOLTIP_INJECTION_KEY } from './tooltip/src/constants.mjs';
|
|
@@ -228,7 +228,7 @@ export { uploadContextKey } from './upload/src/constants.mjs';
|
|
|
228
228
|
export { default as FixedSizeList } from './virtual-list/src/components/fixed-size-list.mjs';
|
|
229
229
|
export { default as DynamicSizeList } from './virtual-list/src/components/dynamic-size-list.mjs';
|
|
230
230
|
export { virtualizedGridProps, virtualizedListProps, virtualizedProps, virtualizedScrollbarProps } from './virtual-list/src/props.mjs';
|
|
231
|
-
export { watermarkProps } from './watermark/src/
|
|
231
|
+
export { watermarkProps } from './watermark/src/watermark.mjs';
|
|
232
232
|
export { tourEmits, tourProps } from './tour/src/tour.mjs';
|
|
233
233
|
export { tourStepEmits, tourStepProps } from './tour/src/step.mjs';
|
|
234
234
|
export { tourContentEmits, tourContentProps, tourPlacements, tourStrategies } from './tour/src/content.mjs';
|
|
@@ -1,170 +1,19 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import { mentionDropdownProps, mentionDropdownEmits } from './mention-dropdown2.mjs';
|
|
4
|
-
import _export_sfc from '../../../_virtual/plugin-vue_export-helper.mjs';
|
|
5
|
-
import { useNamespace } from '../../../hooks/use-namespace/index.mjs';
|
|
6
|
-
import { useLocale } from '../../../hooks/use-locale/index.mjs';
|
|
7
|
-
import { scrollIntoView } from '../../../utils/dom/scroll.mjs';
|
|
1
|
+
import { buildProps, definePropType } from '../../../utils/vue/props/runtime.mjs';
|
|
2
|
+
import { isString } from '@vue/shared';
|
|
8
3
|
|
|
9
|
-
const
|
|
10
|
-
|
|
4
|
+
const mentionDropdownProps = buildProps({
|
|
5
|
+
options: {
|
|
6
|
+
type: definePropType(Array),
|
|
7
|
+
default: () => []
|
|
8
|
+
},
|
|
9
|
+
loading: Boolean,
|
|
10
|
+
disabled: Boolean,
|
|
11
|
+
contentId: String,
|
|
12
|
+
ariaLabel: String
|
|
11
13
|
});
|
|
12
|
-
const
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
emits: mentionDropdownEmits,
|
|
16
|
-
setup(__props, { expose, emit }) {
|
|
17
|
-
const props = __props;
|
|
18
|
-
const ns = useNamespace("mention");
|
|
19
|
-
const { t } = useLocale();
|
|
20
|
-
const hoveringIndex = ref(-1);
|
|
21
|
-
const scrollbarRef = ref();
|
|
22
|
-
const optionRefs = ref();
|
|
23
|
-
const dropdownRef = ref();
|
|
24
|
-
const optionkls = (item, index) => [
|
|
25
|
-
ns.be("dropdown", "item"),
|
|
26
|
-
ns.is("hovering", hoveringIndex.value === index),
|
|
27
|
-
ns.is("disabled", item.disabled || props.disabled)
|
|
28
|
-
];
|
|
29
|
-
const handleSelect = (item) => {
|
|
30
|
-
if (item.disabled || props.disabled)
|
|
31
|
-
return;
|
|
32
|
-
emit("select", item);
|
|
33
|
-
};
|
|
34
|
-
const handleMouseEnter = (index) => {
|
|
35
|
-
hoveringIndex.value = index;
|
|
36
|
-
};
|
|
37
|
-
const filteredAllDisabled = computed(() => props.disabled || props.options.every((item) => item.disabled));
|
|
38
|
-
const hoverOption = computed(() => props.options[hoveringIndex.value]);
|
|
39
|
-
const selectHoverOption = () => {
|
|
40
|
-
if (!hoverOption.value)
|
|
41
|
-
return;
|
|
42
|
-
emit("select", hoverOption.value);
|
|
43
|
-
};
|
|
44
|
-
const navigateOptions = (direction) => {
|
|
45
|
-
const { options } = props;
|
|
46
|
-
if (options.length === 0 || filteredAllDisabled.value)
|
|
47
|
-
return;
|
|
48
|
-
if (direction === "next") {
|
|
49
|
-
hoveringIndex.value++;
|
|
50
|
-
if (hoveringIndex.value === options.length) {
|
|
51
|
-
hoveringIndex.value = 0;
|
|
52
|
-
}
|
|
53
|
-
} else if (direction === "prev") {
|
|
54
|
-
hoveringIndex.value--;
|
|
55
|
-
if (hoveringIndex.value < 0) {
|
|
56
|
-
hoveringIndex.value = options.length - 1;
|
|
57
|
-
}
|
|
58
|
-
}
|
|
59
|
-
const option = options[hoveringIndex.value];
|
|
60
|
-
if (option.disabled) {
|
|
61
|
-
navigateOptions(direction);
|
|
62
|
-
return;
|
|
63
|
-
}
|
|
64
|
-
nextTick(() => scrollToOption(option));
|
|
65
|
-
};
|
|
66
|
-
const scrollToOption = (option) => {
|
|
67
|
-
var _a, _b, _c, _d;
|
|
68
|
-
const { options } = props;
|
|
69
|
-
const index = options.findIndex((item) => item.value === option.value);
|
|
70
|
-
const target = (_a = optionRefs.value) == null ? void 0 : _a[index];
|
|
71
|
-
if (target) {
|
|
72
|
-
const menu = (_c = (_b = dropdownRef.value) == null ? void 0 : _b.querySelector) == null ? void 0 : _c.call(_b, `.${ns.be("dropdown", "wrap")}`);
|
|
73
|
-
if (menu) {
|
|
74
|
-
scrollIntoView(menu, target);
|
|
75
|
-
}
|
|
76
|
-
}
|
|
77
|
-
(_d = scrollbarRef.value) == null ? void 0 : _d.handleScroll();
|
|
78
|
-
};
|
|
79
|
-
const resetHoveringIndex = () => {
|
|
80
|
-
if (filteredAllDisabled.value || props.options.length === 0) {
|
|
81
|
-
hoveringIndex.value = -1;
|
|
82
|
-
} else {
|
|
83
|
-
hoveringIndex.value = 0;
|
|
84
|
-
}
|
|
85
|
-
};
|
|
86
|
-
watch(() => props.options, resetHoveringIndex, {
|
|
87
|
-
immediate: true
|
|
88
|
-
});
|
|
89
|
-
expose({
|
|
90
|
-
hoveringIndex,
|
|
91
|
-
navigateOptions,
|
|
92
|
-
selectHoverOption,
|
|
93
|
-
hoverOption
|
|
94
|
-
});
|
|
95
|
-
return (_ctx, _cache) => {
|
|
96
|
-
return openBlock(), createElementBlock("div", {
|
|
97
|
-
ref_key: "dropdownRef",
|
|
98
|
-
ref: dropdownRef,
|
|
99
|
-
class: normalizeClass(unref(ns).b("dropdown"))
|
|
100
|
-
}, [
|
|
101
|
-
_ctx.$slots.header ? (openBlock(), createElementBlock("div", {
|
|
102
|
-
key: 0,
|
|
103
|
-
class: normalizeClass(unref(ns).be("dropdown", "header"))
|
|
104
|
-
}, [
|
|
105
|
-
renderSlot(_ctx.$slots, "header")
|
|
106
|
-
], 2)) : createCommentVNode("v-if", true),
|
|
107
|
-
withDirectives(createVNode(unref(ElScrollbar), {
|
|
108
|
-
id: _ctx.contentId,
|
|
109
|
-
ref_key: "scrollbarRef",
|
|
110
|
-
ref: scrollbarRef,
|
|
111
|
-
tag: "ul",
|
|
112
|
-
"wrap-class": unref(ns).be("dropdown", "wrap"),
|
|
113
|
-
"view-class": unref(ns).be("dropdown", "list"),
|
|
114
|
-
role: "listbox",
|
|
115
|
-
"aria-label": _ctx.ariaLabel,
|
|
116
|
-
"aria-orientation": "vertical"
|
|
117
|
-
}, {
|
|
118
|
-
default: withCtx(() => [
|
|
119
|
-
(openBlock(true), createElementBlock(Fragment, null, renderList(_ctx.options, (item, index) => {
|
|
120
|
-
return openBlock(), createElementBlock("li", {
|
|
121
|
-
id: `${_ctx.contentId}-${index}`,
|
|
122
|
-
ref_for: true,
|
|
123
|
-
ref_key: "optionRefs",
|
|
124
|
-
ref: optionRefs,
|
|
125
|
-
key: index,
|
|
126
|
-
class: normalizeClass(optionkls(item, index)),
|
|
127
|
-
role: "option",
|
|
128
|
-
"aria-disabled": item.disabled || _ctx.disabled || void 0,
|
|
129
|
-
"aria-selected": hoveringIndex.value === index,
|
|
130
|
-
onMousemove: ($event) => handleMouseEnter(index),
|
|
131
|
-
onClick: withModifiers(($event) => handleSelect(item), ["stop"])
|
|
132
|
-
}, [
|
|
133
|
-
renderSlot(_ctx.$slots, "label", {
|
|
134
|
-
item,
|
|
135
|
-
index
|
|
136
|
-
}, () => {
|
|
137
|
-
var _a;
|
|
138
|
-
return [
|
|
139
|
-
createElementVNode("span", null, toDisplayString((_a = item.label) != null ? _a : item.value), 1)
|
|
140
|
-
];
|
|
141
|
-
})
|
|
142
|
-
], 42, ["id", "aria-disabled", "aria-selected", "onMousemove", "onClick"]);
|
|
143
|
-
}), 128))
|
|
144
|
-
]),
|
|
145
|
-
_: 3
|
|
146
|
-
}, 8, ["id", "wrap-class", "view-class", "aria-label"]), [
|
|
147
|
-
[vShow, _ctx.options.length > 0 && !_ctx.loading]
|
|
148
|
-
]),
|
|
149
|
-
_ctx.loading ? (openBlock(), createElementBlock("div", {
|
|
150
|
-
key: 1,
|
|
151
|
-
class: normalizeClass(unref(ns).be("dropdown", "loading"))
|
|
152
|
-
}, [
|
|
153
|
-
renderSlot(_ctx.$slots, "loading", {}, () => [
|
|
154
|
-
createTextVNode(toDisplayString(unref(t)("el.mention.loading")), 1)
|
|
155
|
-
])
|
|
156
|
-
], 2)) : createCommentVNode("v-if", true),
|
|
157
|
-
_ctx.$slots.footer ? (openBlock(), createElementBlock("div", {
|
|
158
|
-
key: 2,
|
|
159
|
-
class: normalizeClass(unref(ns).be("dropdown", "footer"))
|
|
160
|
-
}, [
|
|
161
|
-
renderSlot(_ctx.$slots, "footer")
|
|
162
|
-
], 2)) : createCommentVNode("v-if", true)
|
|
163
|
-
], 2);
|
|
164
|
-
};
|
|
165
|
-
}
|
|
166
|
-
});
|
|
167
|
-
var ElMentionDropdown = /* @__PURE__ */ _export_sfc(_sfc_main, [["__file", "mention-dropdown.vue"]]);
|
|
14
|
+
const mentionDropdownEmits = {
|
|
15
|
+
select: (option) => isString(option.value)
|
|
16
|
+
};
|
|
168
17
|
|
|
169
|
-
export {
|
|
18
|
+
export { mentionDropdownEmits, mentionDropdownProps };
|
|
170
19
|
//# sourceMappingURL=mention-dropdown.mjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"mention-dropdown.mjs","sources":["../../../../../../packages/components/mention/src/mention-dropdown.
|
|
1
|
+
{"version":3,"file":"mention-dropdown.mjs","sources":["../../../../../../packages/components/mention/src/mention-dropdown.ts"],"sourcesContent":["import { buildProps, definePropType, isString } from '@element-plus/utils'\n\nimport type { MentionOption } from './types'\n\nexport const mentionDropdownProps = buildProps({\n options: {\n type: definePropType<MentionOption[]>(Array),\n default: () => [],\n },\n loading: Boolean,\n disabled: Boolean,\n contentId: String,\n ariaLabel: String,\n})\n\nexport const mentionDropdownEmits = {\n select: (option: MentionOption) => isString(option.value),\n}\n"],"names":[],"mappings":";;;AACY,MAAC,oBAAoB,GAAG,UAAU,CAAC;AAC/C,EAAE,OAAO,EAAE;AACX,IAAI,IAAI,EAAE,cAAc,CAAC,KAAK,CAAC;AAC/B,IAAI,OAAO,EAAE,MAAM,EAAE;AACrB,GAAG;AACH,EAAE,OAAO,EAAE,OAAO;AAClB,EAAE,QAAQ,EAAE,OAAO;AACnB,EAAE,SAAS,EAAE,MAAM;AACnB,EAAE,SAAS,EAAE,MAAM;AACnB,CAAC,EAAE;AACS,MAAC,oBAAoB,GAAG;AACpC,EAAE,MAAM,EAAE,CAAC,MAAM,KAAK,QAAQ,CAAC,MAAM,CAAC,KAAK,CAAC;AAC5C;;;;"}
|