@element-plus/nightly 0.0.20240812 → 0.0.20240813
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/attributes.json +1 -1
- package/dist/index.css +1 -1
- package/dist/index.full.js +44 -10
- package/dist/index.full.min.js +12 -12
- package/dist/index.full.min.js.map +1 -1
- package/dist/index.full.min.mjs +11 -11
- package/dist/index.full.min.mjs.map +1 -1
- package/dist/index.full.mjs +44 -10
- 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/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/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/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/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/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-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/descriptions/src/description-item.d.ts +1 -1
- package/es/components/descriptions/src/description-item.mjs.map +1 -1
- package/es/components/descriptions/src/description.d.ts +2 -0
- package/es/components/descriptions/src/description.mjs.map +1 -1
- package/es/components/dialog/src/dialog2.mjs +2 -1
- package/es/components/dialog/src/dialog2.mjs.map +1 -1
- package/es/components/mention/src/mention-dropdown.d.ts +2 -0
- package/es/components/mention/src/mention-dropdown.mjs +3 -1
- package/es/components/mention/src/mention-dropdown.mjs.map +1 -1
- package/es/components/mention/src/mention-dropdown.vue.d.ts +5 -0
- package/es/components/mention/src/mention-dropdown2.mjs +12 -3
- package/es/components/mention/src/mention-dropdown2.mjs.map +1 -1
- package/es/components/mention/src/mention2.mjs +26 -3
- package/es/components/mention/src/mention2.mjs.map +1 -1
- package/es/components/tree/index.d.ts +1 -0
- package/es/components/tree/index.mjs.map +1 -1
- package/es/version.d.ts +1 -1
- package/es/version.mjs +1 -1
- package/es/version.mjs.map +1 -1
- package/lib/components/descriptions/src/description-item.d.ts +1 -1
- package/lib/components/descriptions/src/description-item.js.map +1 -1
- package/lib/components/descriptions/src/description.d.ts +2 -0
- package/lib/components/descriptions/src/description.js.map +1 -1
- package/lib/components/dialog/src/dialog2.js +2 -1
- package/lib/components/dialog/src/dialog2.js.map +1 -1
- package/lib/components/mention/src/mention-dropdown.d.ts +2 -0
- package/lib/components/mention/src/mention-dropdown.js +3 -1
- package/lib/components/mention/src/mention-dropdown.js.map +1 -1
- package/lib/components/mention/src/mention-dropdown.vue.d.ts +5 -0
- package/lib/components/mention/src/mention-dropdown2.js +12 -3
- package/lib/components/mention/src/mention-dropdown2.js.map +1 -1
- package/lib/components/mention/src/mention2.js +32 -9
- package/lib/components/mention/src/mention2.js.map +1 -1
- package/lib/components/tree/index.d.ts +1 -0
- package/lib/components/tree/index.js.map +1 -1
- package/lib/version.d.ts +1 -1
- package/lib/version.js +1 -1
- package/lib/version.js.map +1 -1
- package/package.json +2 -2
- package/tags.json +1 -1
- package/theme-chalk/el-date-picker.css +1 -1
- package/theme-chalk/el-input-number.css +1 -1
- package/theme-chalk/el-popper.css +1 -1
- package/theme-chalk/el-time-picker.css +1 -1
- package/theme-chalk/el-time-select.css +1 -1
- package/theme-chalk/index.css +1 -1
- package/theme-chalk/src/date-picker/picker.scss +1 -0
- package/theme-chalk/src/input-number.scss +1 -0
- package/theme-chalk/src/popper.scss +2 -2
- package/web-types.json +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"description-item.js","sources":["../../../../../../packages/components/descriptions/src/description-item.ts"],"sourcesContent":["import { defineComponent } from 'vue'\nimport { buildProps } from '@element-plus/utils'\n\nimport type { ExtractPropTypes, Slot, VNode } from 'vue'\n\nexport const descriptionItemProps = buildProps({\n /**\n * @description label text\n */\n label: {\n type: String,\n default: '',\n },\n /**\n * @description colspan of column\n */\n span: {\n type: Number,\n default: 1,\n },\n /**\n * @description column width, the width of the same column in different rows is set by the max value (If no `border`, width contains label and content)\n */\n width: {\n type: [String, Number],\n default: '',\n },\n /**\n * @description column minimum width, columns with `width` has a fixed width, while columns with `min-width` has a width that is distributed in proportion (If no`border`, width contains label and content)\n */\n minWidth: {\n type: [String, Number],\n default: '',\n },\n /**\n * @description column content alignment (If no `border`, effective for both label and content)\n */\n align: {\n type: String,\n default: 'left',\n },\n /**\n * @description column label alignment, if omitted, the value of the above `align` attribute will be applied (If no `border`, please use `align` attribute)\n */\n labelAlign: {\n type: String,\n default: '',\n },\n /**\n * @description column content custom class name\n */\n className: {\n type: String,\n default: '',\n },\n /**\n * @description column label custom class name\n */\n labelClassName: {\n type: String,\n default: '',\n },\n})\nconst DescriptionItem = defineComponent({\n name: 'ElDescriptionsItem',\n props: descriptionItemProps,\n})\n\nexport default DescriptionItem\n\
|
|
1
|
+
{"version":3,"file":"description-item.js","sources":["../../../../../../packages/components/descriptions/src/description-item.ts"],"sourcesContent":["import { defineComponent } from 'vue'\nimport { buildProps } from '@element-plus/utils'\n\nimport type { ExtractPropTypes, Slot, VNode } from 'vue'\n\nexport const descriptionItemProps = buildProps({\n /**\n * @description label text\n */\n label: {\n type: String,\n default: '',\n },\n /**\n * @description colspan of column\n */\n span: {\n type: Number,\n default: 1,\n },\n /**\n * @description column width, the width of the same column in different rows is set by the max value (If no `border`, width contains label and content)\n */\n width: {\n type: [String, Number],\n default: '',\n },\n /**\n * @description column minimum width, columns with `width` has a fixed width, while columns with `min-width` has a width that is distributed in proportion (If no`border`, width contains label and content)\n */\n minWidth: {\n type: [String, Number],\n default: '',\n },\n /**\n * @description column content alignment (If no `border`, effective for both label and content)\n */\n align: {\n type: String,\n default: 'left',\n },\n /**\n * @description column label alignment, if omitted, the value of the above `align` attribute will be applied (If no `border`, please use `align` attribute)\n */\n labelAlign: {\n type: String,\n default: '',\n },\n /**\n * @description column content custom class name\n */\n className: {\n type: String,\n default: '',\n },\n /**\n * @description column label custom class name\n */\n labelClassName: {\n type: String,\n default: '',\n },\n})\nconst DescriptionItem = defineComponent({\n name: 'ElDescriptionsItem',\n props: descriptionItemProps,\n})\n\nexport default DescriptionItem\n\nexport type DescriptionItemProps = ExtractPropTypes<typeof descriptionItemProps>\nexport type DescriptionItemVNode = VNode & {\n children: { [name: string]: Slot } | null\n props: Partial<DescriptionItemProps> | null\n}\n"],"names":["buildProps","defineComponent"],"mappings":";;;;;;;;AAEY,MAAC,oBAAoB,GAAGA,kBAAU,CAAC;AAC/C,EAAE,KAAK,EAAE;AACT,IAAI,IAAI,EAAE,MAAM;AAChB,IAAI,OAAO,EAAE,EAAE;AACf,GAAG;AACH,EAAE,IAAI,EAAE;AACR,IAAI,IAAI,EAAE,MAAM;AAChB,IAAI,OAAO,EAAE,CAAC;AACd,GAAG;AACH,EAAE,KAAK,EAAE;AACT,IAAI,IAAI,EAAE,CAAC,MAAM,EAAE,MAAM,CAAC;AAC1B,IAAI,OAAO,EAAE,EAAE;AACf,GAAG;AACH,EAAE,QAAQ,EAAE;AACZ,IAAI,IAAI,EAAE,CAAC,MAAM,EAAE,MAAM,CAAC;AAC1B,IAAI,OAAO,EAAE,EAAE;AACf,GAAG;AACH,EAAE,KAAK,EAAE;AACT,IAAI,IAAI,EAAE,MAAM;AAChB,IAAI,OAAO,EAAE,MAAM;AACnB,GAAG;AACH,EAAE,UAAU,EAAE;AACd,IAAI,IAAI,EAAE,MAAM;AAChB,IAAI,OAAO,EAAE,EAAE;AACf,GAAG;AACH,EAAE,SAAS,EAAE;AACb,IAAI,IAAI,EAAE,MAAM;AAChB,IAAI,OAAO,EAAE,EAAE;AACf,GAAG;AACH,EAAE,cAAc,EAAE;AAClB,IAAI,IAAI,EAAE,MAAM;AAChB,IAAI,OAAO,EAAE,EAAE;AACf,GAAG;AACH,CAAC,EAAE;AACE,MAAC,eAAe,GAAGC,mBAAe,CAAC;AACxC,EAAE,IAAI,EAAE,oBAAoB;AAC5B,EAAE,KAAK,EAAE,oBAAoB;AAC7B,CAAC;;;;;"}
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import type { ExtractPropTypes } from 'vue';
|
|
1
2
|
import type Description from './description.vue';
|
|
2
3
|
export declare const descriptionProps: {
|
|
3
4
|
readonly border: BooleanConstructor;
|
|
@@ -12,4 +13,5 @@ export declare const descriptionProps: {
|
|
|
12
13
|
readonly title: import("@element-plus/nightly/es/utils").EpPropFinalized<StringConstructor, unknown, unknown, "", boolean>;
|
|
13
14
|
readonly extra: import("@element-plus/nightly/es/utils").EpPropFinalized<StringConstructor, unknown, unknown, "", boolean>;
|
|
14
15
|
};
|
|
16
|
+
export declare type DescriptionProps = ExtractPropTypes<typeof descriptionProps>;
|
|
15
17
|
export declare type DescriptionInstance = InstanceType<typeof Description>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"description.js","sources":["../../../../../../packages/components/descriptions/src/description.ts"],"sourcesContent":["import { buildProps } from '@element-plus/utils'\nimport { useSizeProp } from '@element-plus/hooks'\n\nimport type Description from './description.vue'\n\nexport const descriptionProps = buildProps({\n /**\n * @description with or without border\n */\n border: Boolean,\n /**\n * @description numbers of `Descriptions Item` in one line\n */\n column: {\n type: Number,\n default: 3,\n },\n /**\n * @description direction of list\n */\n direction: {\n type: String,\n values: ['horizontal', 'vertical'],\n default: 'horizontal',\n },\n /**\n * @description size of list\n */\n size: useSizeProp,\n /**\n * @description title text, display on the top left\n */\n title: {\n type: String,\n default: '',\n },\n /**\n * @description extra text, display on the top right\n */\n extra: {\n type: String,\n default: '',\n },\n} as const)\n\nexport type DescriptionInstance = InstanceType<typeof Description>\n"],"names":["buildProps","useSizeProp"],"mappings":";;;;;;;;;AAEY,MAAC,gBAAgB,GAAGA,kBAAU,CAAC;AAC3C,EAAE,MAAM,EAAE,OAAO;AACjB,EAAE,MAAM,EAAE;AACV,IAAI,IAAI,EAAE,MAAM;AAChB,IAAI,OAAO,EAAE,CAAC;AACd,GAAG;AACH,EAAE,SAAS,EAAE;AACb,IAAI,IAAI,EAAE,MAAM;AAChB,IAAI,MAAM,EAAE,CAAC,YAAY,EAAE,UAAU,CAAC;AACtC,IAAI,OAAO,EAAE,YAAY;AACzB,GAAG;AACH,EAAE,IAAI,EAAEC,iBAAW;AACnB,EAAE,KAAK,EAAE;AACT,IAAI,IAAI,EAAE,MAAM;AAChB,IAAI,OAAO,EAAE,EAAE;AACf,GAAG;AACH,EAAE,KAAK,EAAE;AACT,IAAI,IAAI,EAAE,MAAM;AAChB,IAAI,OAAO,EAAE,EAAE;AACf,GAAG;AACH,CAAC;;;;"}
|
|
1
|
+
{"version":3,"file":"description.js","sources":["../../../../../../packages/components/descriptions/src/description.ts"],"sourcesContent":["import { buildProps } from '@element-plus/utils'\nimport { useSizeProp } from '@element-plus/hooks'\n\nimport type { ExtractPropTypes } from 'vue'\nimport type Description from './description.vue'\n\nexport const descriptionProps = buildProps({\n /**\n * @description with or without border\n */\n border: Boolean,\n /**\n * @description numbers of `Descriptions Item` in one line\n */\n column: {\n type: Number,\n default: 3,\n },\n /**\n * @description direction of list\n */\n direction: {\n type: String,\n values: ['horizontal', 'vertical'],\n default: 'horizontal',\n },\n /**\n * @description size of list\n */\n size: useSizeProp,\n /**\n * @description title text, display on the top left\n */\n title: {\n type: String,\n default: '',\n },\n /**\n * @description extra text, display on the top right\n */\n extra: {\n type: String,\n default: '',\n },\n} as const)\n\nexport type DescriptionProps = ExtractPropTypes<typeof descriptionProps>\nexport type DescriptionInstance = InstanceType<typeof Description>\n"],"names":["buildProps","useSizeProp"],"mappings":";;;;;;;;;AAEY,MAAC,gBAAgB,GAAGA,kBAAU,CAAC;AAC3C,EAAE,MAAM,EAAE,OAAO;AACjB,EAAE,MAAM,EAAE;AACV,IAAI,IAAI,EAAE,MAAM;AAChB,IAAI,OAAO,EAAE,CAAC;AACd,GAAG;AACH,EAAE,SAAS,EAAE;AACb,IAAI,IAAI,EAAE,MAAM;AAChB,IAAI,MAAM,EAAE,CAAC,YAAY,EAAE,UAAU,CAAC;AACtC,IAAI,OAAO,EAAE,YAAY;AACzB,GAAG;AACH,EAAE,IAAI,EAAEC,iBAAW;AACnB,EAAE,KAAK,EAAE;AACT,IAAI,IAAI,EAAE,MAAM;AAChB,IAAI,OAAO,EAAE,EAAE;AACf,GAAG;AACH,EAAE,KAAK,EAAE;AACT,IAAI,IAAI,EAAE,MAAM;AAChB,IAAI,OAAO,EAAE,EAAE;AACf,GAAG;AACH,CAAC;;;;"}
|
|
@@ -68,7 +68,8 @@ const _sfc_main = /* @__PURE__ */ vue.defineComponent({
|
|
|
68
68
|
const overlayEvent = index$2.useSameTarget(onModalClick);
|
|
69
69
|
const draggable = vue.computed(() => props.draggable && !props.fullscreen);
|
|
70
70
|
const resetPostion = () => {
|
|
71
|
-
|
|
71
|
+
var _a;
|
|
72
|
+
(_a = dialogContentRef.value) == null ? void 0 : _a.resetPostion();
|
|
72
73
|
};
|
|
73
74
|
expose({
|
|
74
75
|
visible,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"dialog2.js","sources":["../../../../../../packages/components/dialog/src/dialog.vue"],"sourcesContent":["<template>\n <el-teleport\n :to=\"appendTo\"\n :disabled=\"appendTo !== 'body' ? false : !appendToBody\"\n >\n <transition\n name=\"dialog-fade\"\n @after-enter=\"afterEnter\"\n @after-leave=\"afterLeave\"\n @before-leave=\"beforeLeave\"\n >\n <el-overlay\n v-show=\"visible\"\n custom-mask-event\n :mask=\"modal\"\n :overlay-class=\"modalClass\"\n :z-index=\"zIndex\"\n >\n <div\n role=\"dialog\"\n aria-modal=\"true\"\n :aria-label=\"title || undefined\"\n :aria-labelledby=\"!title ? titleId : undefined\"\n :aria-describedby=\"bodyId\"\n :class=\"`${ns.namespace.value}-overlay-dialog`\"\n :style=\"overlayDialogStyle\"\n @click=\"overlayEvent.onClick\"\n @mousedown=\"overlayEvent.onMousedown\"\n @mouseup=\"overlayEvent.onMouseup\"\n >\n <el-focus-trap\n loop\n :trapped=\"visible\"\n focus-start-el=\"container\"\n @focus-after-trapped=\"onOpenAutoFocus\"\n @focus-after-released=\"onCloseAutoFocus\"\n @focusout-prevented=\"onFocusoutPrevented\"\n @release-requested=\"onCloseRequested\"\n >\n <el-dialog-content\n v-if=\"rendered\"\n ref=\"dialogContentRef\"\n v-bind=\"$attrs\"\n :center=\"center\"\n :align-center=\"alignCenter\"\n :close-icon=\"closeIcon\"\n :draggable=\"draggable\"\n :overflow=\"overflow\"\n :fullscreen=\"fullscreen\"\n :show-close=\"showClose\"\n :title=\"title\"\n :aria-level=\"headerAriaLevel\"\n @close=\"handleClose\"\n >\n <template #header>\n <slot\n v-if=\"!$slots.title\"\n name=\"header\"\n :close=\"handleClose\"\n :title-id=\"titleId\"\n :title-class=\"ns.e('title')\"\n />\n <slot v-else name=\"title\" />\n </template>\n <slot />\n <template v-if=\"$slots.footer\" #footer>\n <slot name=\"footer\" />\n </template>\n </el-dialog-content>\n </el-focus-trap>\n </div>\n </el-overlay>\n </transition>\n </el-teleport>\n</template>\n\n<script lang=\"ts\" setup>\nimport { computed, provide, ref, useSlots } from 'vue'\nimport { ElOverlay } from '@element-plus/components/overlay'\nimport { useDeprecated, useNamespace, useSameTarget } from '@element-plus/hooks'\nimport ElFocusTrap from '@element-plus/components/focus-trap'\nimport ElTeleport from '@element-plus/components/teleport'\nimport ElDialogContent from './dialog-content.vue'\nimport { dialogInjectionKey } from './constants'\nimport { dialogEmits, dialogProps } from './dialog'\nimport { useDialog } from './use-dialog'\n\ndefineOptions({\n name: 'ElDialog',\n inheritAttrs: false,\n})\n\nconst props = defineProps(dialogProps)\ndefineEmits(dialogEmits)\nconst slots = useSlots()\n\nuseDeprecated(\n {\n scope: 'el-dialog',\n from: 'the title slot',\n replacement: 'the header slot',\n version: '3.0.0',\n ref: 'https://element-plus.org/en-US/component/dialog.html#slots',\n },\n computed(() => !!slots.title)\n)\n\nconst ns = useNamespace('dialog')\nconst dialogRef = ref<HTMLElement>()\nconst headerRef = ref<HTMLElement>()\nconst dialogContentRef = ref()\n\nconst {\n visible,\n titleId,\n bodyId,\n style,\n overlayDialogStyle,\n rendered,\n zIndex,\n afterEnter,\n afterLeave,\n beforeLeave,\n handleClose,\n onModalClick,\n onOpenAutoFocus,\n onCloseAutoFocus,\n onCloseRequested,\n onFocusoutPrevented,\n} = useDialog(props, dialogRef)\n\nprovide(dialogInjectionKey, {\n dialogRef,\n headerRef,\n bodyId,\n ns,\n rendered,\n style,\n})\n\nconst overlayEvent = useSameTarget(onModalClick)\n\nconst draggable = computed(() => props.draggable && !props.fullscreen)\n\nconst resetPostion = () => {\n dialogContentRef.value
|
|
1
|
+
{"version":3,"file":"dialog2.js","sources":["../../../../../../packages/components/dialog/src/dialog.vue"],"sourcesContent":["<template>\n <el-teleport\n :to=\"appendTo\"\n :disabled=\"appendTo !== 'body' ? false : !appendToBody\"\n >\n <transition\n name=\"dialog-fade\"\n @after-enter=\"afterEnter\"\n @after-leave=\"afterLeave\"\n @before-leave=\"beforeLeave\"\n >\n <el-overlay\n v-show=\"visible\"\n custom-mask-event\n :mask=\"modal\"\n :overlay-class=\"modalClass\"\n :z-index=\"zIndex\"\n >\n <div\n role=\"dialog\"\n aria-modal=\"true\"\n :aria-label=\"title || undefined\"\n :aria-labelledby=\"!title ? titleId : undefined\"\n :aria-describedby=\"bodyId\"\n :class=\"`${ns.namespace.value}-overlay-dialog`\"\n :style=\"overlayDialogStyle\"\n @click=\"overlayEvent.onClick\"\n @mousedown=\"overlayEvent.onMousedown\"\n @mouseup=\"overlayEvent.onMouseup\"\n >\n <el-focus-trap\n loop\n :trapped=\"visible\"\n focus-start-el=\"container\"\n @focus-after-trapped=\"onOpenAutoFocus\"\n @focus-after-released=\"onCloseAutoFocus\"\n @focusout-prevented=\"onFocusoutPrevented\"\n @release-requested=\"onCloseRequested\"\n >\n <el-dialog-content\n v-if=\"rendered\"\n ref=\"dialogContentRef\"\n v-bind=\"$attrs\"\n :center=\"center\"\n :align-center=\"alignCenter\"\n :close-icon=\"closeIcon\"\n :draggable=\"draggable\"\n :overflow=\"overflow\"\n :fullscreen=\"fullscreen\"\n :show-close=\"showClose\"\n :title=\"title\"\n :aria-level=\"headerAriaLevel\"\n @close=\"handleClose\"\n >\n <template #header>\n <slot\n v-if=\"!$slots.title\"\n name=\"header\"\n :close=\"handleClose\"\n :title-id=\"titleId\"\n :title-class=\"ns.e('title')\"\n />\n <slot v-else name=\"title\" />\n </template>\n <slot />\n <template v-if=\"$slots.footer\" #footer>\n <slot name=\"footer\" />\n </template>\n </el-dialog-content>\n </el-focus-trap>\n </div>\n </el-overlay>\n </transition>\n </el-teleport>\n</template>\n\n<script lang=\"ts\" setup>\nimport { computed, provide, ref, useSlots } from 'vue'\nimport { ElOverlay } from '@element-plus/components/overlay'\nimport { useDeprecated, useNamespace, useSameTarget } from '@element-plus/hooks'\nimport ElFocusTrap from '@element-plus/components/focus-trap'\nimport ElTeleport from '@element-plus/components/teleport'\nimport ElDialogContent from './dialog-content.vue'\nimport { dialogInjectionKey } from './constants'\nimport { dialogEmits, dialogProps } from './dialog'\nimport { useDialog } from './use-dialog'\n\ndefineOptions({\n name: 'ElDialog',\n inheritAttrs: false,\n})\n\nconst props = defineProps(dialogProps)\ndefineEmits(dialogEmits)\nconst slots = useSlots()\n\nuseDeprecated(\n {\n scope: 'el-dialog',\n from: 'the title slot',\n replacement: 'the header slot',\n version: '3.0.0',\n ref: 'https://element-plus.org/en-US/component/dialog.html#slots',\n },\n computed(() => !!slots.title)\n)\n\nconst ns = useNamespace('dialog')\nconst dialogRef = ref<HTMLElement>()\nconst headerRef = ref<HTMLElement>()\nconst dialogContentRef = ref()\n\nconst {\n visible,\n titleId,\n bodyId,\n style,\n overlayDialogStyle,\n rendered,\n zIndex,\n afterEnter,\n afterLeave,\n beforeLeave,\n handleClose,\n onModalClick,\n onOpenAutoFocus,\n onCloseAutoFocus,\n onCloseRequested,\n onFocusoutPrevented,\n} = useDialog(props, dialogRef)\n\nprovide(dialogInjectionKey, {\n dialogRef,\n headerRef,\n bodyId,\n ns,\n rendered,\n style,\n})\n\nconst overlayEvent = useSameTarget(onModalClick)\n\nconst draggable = computed(() => props.draggable && !props.fullscreen)\n\nconst resetPostion = () => {\n dialogContentRef.value?.resetPostion()\n}\n\ndefineExpose({\n /** @description whether the dialog is visible */\n visible,\n dialogContentRef,\n resetPostion,\n})\n</script>\n"],"names":["useSlots","useDeprecated","computed","useNamespace","ref","useDialog","provide","dialogInjectionKey","useSameTarget"],"mappings":";;;;;;;;;;;;;;;;;;;uCAuFc,CAAA;AAAA,EACZ,IAAM,EAAA,UAAA;AAAA,EACN,YAAc,EAAA,KAAA;AAChB,CAAA,CAAA,CAAA;;;;;;;AAIA,IAAA,MAAM,QAAQA,YAAS,EAAA,CAAA;AAEvB,IACEC,mBAAA,CAAA;AAAA,MACE,KAAO,EAAA,WAAA;AAAA,MACP,IAAM,EAAA,gBAAA;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EX,MAAA,CAAA;AAAA,MACA,OAAA;AAAA,MACA,gBAAA;AAAA,MACD,YAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
|
@@ -3,6 +3,8 @@ export declare const mentionDropdownProps: {
|
|
|
3
3
|
options: import("@element-plus/nightly/es/utils").EpPropFinalized<(new (...args: any[]) => MentionOption[]) | (() => MentionOption[]) | ((new (...args: any[]) => MentionOption[]) | (() => MentionOption[]))[], unknown, unknown, () => never[], boolean>;
|
|
4
4
|
loading: BooleanConstructor;
|
|
5
5
|
disabled: BooleanConstructor;
|
|
6
|
+
contentId: StringConstructor;
|
|
7
|
+
ariaLabel: StringConstructor;
|
|
6
8
|
};
|
|
7
9
|
export declare const mentionDropdownEmits: {
|
|
8
10
|
select: (option: MentionOption) => boolean;
|
|
@@ -12,7 +12,9 @@ const mentionDropdownProps = runtime.buildProps({
|
|
|
12
12
|
default: () => []
|
|
13
13
|
},
|
|
14
14
|
loading: Boolean,
|
|
15
|
-
disabled: Boolean
|
|
15
|
+
disabled: Boolean,
|
|
16
|
+
contentId: String,
|
|
17
|
+
ariaLabel: String
|
|
16
18
|
});
|
|
17
19
|
const mentionDropdownEmits = {
|
|
18
20
|
select: (option) => shared.isString(option.value)
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"mention-dropdown.js","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})\n\nexport const mentionDropdownEmits = {\n select: (option: MentionOption) => isString(option.value),\n}\n"],"names":["buildProps","definePropType","isString"],"mappings":";;;;;;;;AACY,MAAC,oBAAoB,GAAGA,kBAAU,CAAC;AAC/C,EAAE,OAAO,EAAE;AACX,IAAI,IAAI,EAAEC,sBAAc,CAAC,KAAK,CAAC;AAC/B,IAAI,OAAO,EAAE,MAAM,EAAE;AACrB,GAAG;AACH,EAAE,OAAO,EAAE,OAAO;AAClB,EAAE,QAAQ,EAAE,OAAO;AACnB,CAAC,EAAE;AACS,MAAC,oBAAoB,GAAG;AACpC,EAAE,MAAM,EAAE,CAAC,MAAM,KAAKC,eAAQ,CAAC,MAAM,CAAC,KAAK,CAAC;AAC5C;;;;;"}
|
|
1
|
+
{"version":3,"file":"mention-dropdown.js","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":["buildProps","definePropType","isString"],"mappings":";;;;;;;;AACY,MAAC,oBAAoB,GAAGA,kBAAU,CAAC;AAC/C,EAAE,OAAO,EAAE;AACX,IAAI,IAAI,EAAEC,sBAAc,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,KAAKC,eAAQ,CAAC,MAAM,CAAC,KAAK,CAAC;AAC5C;;;;;"}
|
|
@@ -3,7 +3,10 @@ declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<{
|
|
|
3
3
|
options: import("@element-plus/nightly/es/utils").EpPropFinalized<(new (...args: any[]) => MentionOption[]) | (() => MentionOption[]) | ((new (...args: any[]) => MentionOption[]) | (() => MentionOption[]))[], unknown, unknown, () => never[], boolean>;
|
|
4
4
|
loading: BooleanConstructor;
|
|
5
5
|
disabled: BooleanConstructor;
|
|
6
|
+
contentId: StringConstructor;
|
|
7
|
+
ariaLabel: StringConstructor;
|
|
6
8
|
}, {
|
|
9
|
+
hoveringIndex: import("vue").Ref<number>;
|
|
7
10
|
navigateOptions: (direction: "prev" | "next") => void;
|
|
8
11
|
selectHoverOption: () => void;
|
|
9
12
|
hoverOption: import("vue").ComputedRef<MentionOption>;
|
|
@@ -13,6 +16,8 @@ declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<{
|
|
|
13
16
|
options: import("@element-plus/nightly/es/utils").EpPropFinalized<(new (...args: any[]) => MentionOption[]) | (() => MentionOption[]) | ((new (...args: any[]) => MentionOption[]) | (() => MentionOption[]))[], unknown, unknown, () => never[], boolean>;
|
|
14
17
|
loading: BooleanConstructor;
|
|
15
18
|
disabled: BooleanConstructor;
|
|
19
|
+
contentId: StringConstructor;
|
|
20
|
+
ariaLabel: StringConstructor;
|
|
16
21
|
}>> & {
|
|
17
22
|
onSelect?: ((option: MentionOption) => any) | undefined;
|
|
18
23
|
}, {
|
|
@@ -93,6 +93,7 @@ const _sfc_main = /* @__PURE__ */ vue.defineComponent({
|
|
|
93
93
|
immediate: true
|
|
94
94
|
});
|
|
95
95
|
expose({
|
|
96
|
+
hoveringIndex,
|
|
96
97
|
navigateOptions,
|
|
97
98
|
selectHoverOption,
|
|
98
99
|
hoverOption
|
|
@@ -110,20 +111,28 @@ const _sfc_main = /* @__PURE__ */ vue.defineComponent({
|
|
|
110
111
|
vue.renderSlot(_ctx.$slots, "header")
|
|
111
112
|
], 2)) : vue.createCommentVNode("v-if", true),
|
|
112
113
|
vue.withDirectives(vue.createVNode(vue.unref(index$2.ElScrollbar), {
|
|
114
|
+
id: _ctx.contentId,
|
|
113
115
|
ref_key: "scrollbarRef",
|
|
114
116
|
ref: scrollbarRef,
|
|
115
117
|
tag: "ul",
|
|
116
118
|
"wrap-class": vue.unref(ns).be("dropdown", "wrap"),
|
|
117
|
-
"view-class": vue.unref(ns).be("dropdown", "list")
|
|
119
|
+
"view-class": vue.unref(ns).be("dropdown", "list"),
|
|
120
|
+
role: "listbox",
|
|
121
|
+
"aria-label": _ctx.ariaLabel,
|
|
122
|
+
"aria-orientation": "vertical"
|
|
118
123
|
}, {
|
|
119
124
|
default: vue.withCtx(() => [
|
|
120
125
|
(vue.openBlock(true), vue.createElementBlock(vue.Fragment, null, vue.renderList(_ctx.options, (item, index) => {
|
|
121
126
|
return vue.openBlock(), vue.createElementBlock("li", {
|
|
127
|
+
id: `${_ctx.contentId}-${index}`,
|
|
122
128
|
ref_for: true,
|
|
123
129
|
ref_key: "optionRefs",
|
|
124
130
|
ref: optionRefs,
|
|
125
131
|
key: item.value,
|
|
126
132
|
class: vue.normalizeClass(optionkls(item, index)),
|
|
133
|
+
role: "option",
|
|
134
|
+
"aria-disabled": item.disabled || _ctx.disabled || void 0,
|
|
135
|
+
"aria-selected": hoveringIndex.value === index,
|
|
127
136
|
onMouseenter: ($event) => handleMouseEnter(index),
|
|
128
137
|
onClick: vue.withModifiers(($event) => handleSelect(item), ["stop"])
|
|
129
138
|
}, [
|
|
@@ -136,11 +145,11 @@ const _sfc_main = /* @__PURE__ */ vue.defineComponent({
|
|
|
136
145
|
vue.createElementVNode("span", null, vue.toDisplayString((_a = item.label) != null ? _a : item.value), 1)
|
|
137
146
|
];
|
|
138
147
|
})
|
|
139
|
-
], 42, ["onMouseenter", "onClick"]);
|
|
148
|
+
], 42, ["id", "aria-disabled", "aria-selected", "onMouseenter", "onClick"]);
|
|
140
149
|
}), 128))
|
|
141
150
|
]),
|
|
142
151
|
_: 3
|
|
143
|
-
}, 8, ["wrap-class", "view-class"]), [
|
|
152
|
+
}, 8, ["id", "wrap-class", "view-class", "aria-label"]), [
|
|
144
153
|
[vue.vShow, _ctx.options.length > 0 && !_ctx.loading]
|
|
145
154
|
]),
|
|
146
155
|
_ctx.loading ? (vue.openBlock(), vue.createElementBlock("div", {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"mention-dropdown2.js","sources":["../../../../../../packages/components/mention/src/mention-dropdown.vue"],"sourcesContent":["<template>\n <div ref=\"dropdownRef\" :class=\"ns.b('dropdown')\">\n <div v-if=\"$slots.header\" :class=\"ns.be('dropdown', 'header')\">\n <slot name=\"header\" />\n </div>\n <el-scrollbar\n v-show=\"options.length > 0 && !loading\"\n ref=\"scrollbarRef\"\n tag=\"ul\"\n :wrap-class=\"ns.be('dropdown', 'wrap')\"\n :view-class=\"ns.be('dropdown', 'list')\"\n >\n <li\n v-for=\"(item, index) in options\"\n ref=\"optionRefs\"\n :key=\"item.value\"\n :class=\"optionkls(item, index)\"\n @mouseenter=\"handleMouseEnter(index)\"\n @click.stop=\"handleSelect(item)\"\n >\n <slot name=\"label\" :item=\"item\" :index=\"index\">\n <span>{{ item.label ?? item.value }}</span>\n </slot>\n </li>\n </el-scrollbar>\n <div v-if=\"loading\" :class=\"ns.be('dropdown', 'loading')\">\n <slot name=\"loading\"> {{ t('el.mention.loading') }} </slot>\n </div>\n <div v-if=\"$slots.footer\" :class=\"ns.be('dropdown', 'footer')\">\n <slot name=\"footer\" />\n </div>\n </div>\n</template>\n<script setup lang=\"ts\">\nimport { computed, nextTick, ref, watch } from 'vue'\nimport { useLocale, useNamespace } from '@element-plus/hooks'\nimport { scrollIntoView } from '@element-plus/utils'\nimport ElScrollbar from '@element-plus/components/scrollbar'\nimport { mentionDropdownEmits, mentionDropdownProps } from './mention-dropdown'\n\nimport type { MentionOption } from './types'\n\ndefineOptions({\n name: 'ElMentionDropdown',\n})\n\nconst props = defineProps(mentionDropdownProps)\nconst emit = defineEmits(mentionDropdownEmits)\n\nconst ns = useNamespace('mention')\nconst { t } = useLocale()\nconst hoveringIndex = ref(-1)\n\nconst scrollbarRef = ref<InstanceType<typeof ElScrollbar>>()\nconst optionRefs = ref<HTMLElement[]>()\nconst dropdownRef = ref<HTMLElement>()\n\nconst optionkls = (item: MentionOption, index: number) => [\n ns.be('dropdown', 'item'),\n ns.is('hovering', hoveringIndex.value === index),\n ns.is('disabled', item.disabled || props.disabled),\n]\n\nconst handleSelect = (item: MentionOption) => {\n if (item.disabled || props.disabled) return\n emit('select', item)\n}\n\nconst handleMouseEnter = (index: number) => {\n hoveringIndex.value = index\n}\n\nconst filteredAllDisabled = computed(\n () => props.disabled || props.options.every((item) => item.disabled)\n)\n\nconst hoverOption = computed(() => props.options[hoveringIndex.value])\n\nconst selectHoverOption = () => {\n if (!hoverOption.value) return\n emit('select', hoverOption.value)\n}\n\nconst navigateOptions = (direction: 'next' | 'prev') => {\n const { options } = props\n if (options.length === 0 || filteredAllDisabled.value) return\n\n if (direction === 'next') {\n hoveringIndex.value++\n if (hoveringIndex.value === options.length) {\n hoveringIndex.value = 0\n }\n } else if (direction === 'prev') {\n hoveringIndex.value--\n if (hoveringIndex.value < 0) {\n hoveringIndex.value = options.length - 1\n }\n }\n const option = options[hoveringIndex.value]\n if (option.disabled) {\n navigateOptions(direction)\n return\n }\n nextTick(() => scrollToOption(option))\n}\n\nconst scrollToOption = (option: MentionOption) => {\n const { options } = props\n\n const index = options.findIndex((item) => item.value === option.value)\n const target = optionRefs.value?.[index]\n\n if (target) {\n const menu = dropdownRef.value?.querySelector?.(\n `.${ns.be('dropdown', 'wrap')}`\n )\n if (menu) {\n scrollIntoView(menu as HTMLElement, target)\n }\n }\n scrollbarRef.value?.handleScroll()\n}\n\nconst resetHoveringIndex = () => {\n if (filteredAllDisabled.value || props.options.length === 0) {\n hoveringIndex.value = -1\n } else {\n hoveringIndex.value = 0\n }\n}\n\nwatch(() => props.options, resetHoveringIndex, {\n immediate: true,\n})\n\ndefineExpose({\n navigateOptions,\n selectHoverOption,\n hoverOption,\n})\n</script>\n"],"names":["useNamespace","useLocale","ref","computed","nextTick","scrollIntoView","watch"],"mappings":";;;;;;;;;;;;;;
|
|
1
|
+
{"version":3,"file":"mention-dropdown2.js","sources":["../../../../../../packages/components/mention/src/mention-dropdown.vue"],"sourcesContent":["<template>\n <div ref=\"dropdownRef\" :class=\"ns.b('dropdown')\">\n <div v-if=\"$slots.header\" :class=\"ns.be('dropdown', 'header')\">\n <slot name=\"header\" />\n </div>\n <el-scrollbar\n v-show=\"options.length > 0 && !loading\"\n :id=\"contentId\"\n ref=\"scrollbarRef\"\n tag=\"ul\"\n :wrap-class=\"ns.be('dropdown', 'wrap')\"\n :view-class=\"ns.be('dropdown', 'list')\"\n role=\"listbox\"\n :aria-label=\"ariaLabel\"\n aria-orientation=\"vertical\"\n >\n <li\n v-for=\"(item, index) in options\"\n :id=\"`${contentId}-${index}`\"\n ref=\"optionRefs\"\n :key=\"item.value\"\n :class=\"optionkls(item, index)\"\n role=\"option\"\n :aria-disabled=\"item.disabled || disabled || undefined\"\n :aria-selected=\"hoveringIndex === index\"\n @mouseenter=\"handleMouseEnter(index)\"\n @click.stop=\"handleSelect(item)\"\n >\n <slot name=\"label\" :item=\"item\" :index=\"index\">\n <span>{{ item.label ?? item.value }}</span>\n </slot>\n </li>\n </el-scrollbar>\n <div v-if=\"loading\" :class=\"ns.be('dropdown', 'loading')\">\n <slot name=\"loading\"> {{ t('el.mention.loading') }} </slot>\n </div>\n <div v-if=\"$slots.footer\" :class=\"ns.be('dropdown', 'footer')\">\n <slot name=\"footer\" />\n </div>\n </div>\n</template>\n<script setup lang=\"ts\">\nimport { computed, nextTick, ref, watch } from 'vue'\nimport { useLocale, useNamespace } from '@element-plus/hooks'\nimport { scrollIntoView } from '@element-plus/utils'\nimport ElScrollbar from '@element-plus/components/scrollbar'\nimport { mentionDropdownEmits, mentionDropdownProps } from './mention-dropdown'\n\nimport type { MentionOption } from './types'\n\ndefineOptions({\n name: 'ElMentionDropdown',\n})\n\nconst props = defineProps(mentionDropdownProps)\nconst emit = defineEmits(mentionDropdownEmits)\n\nconst ns = useNamespace('mention')\nconst { t } = useLocale()\nconst hoveringIndex = ref(-1)\n\nconst scrollbarRef = ref<InstanceType<typeof ElScrollbar>>()\nconst optionRefs = ref<HTMLElement[]>()\nconst dropdownRef = ref<HTMLElement>()\n\nconst optionkls = (item: MentionOption, index: number) => [\n ns.be('dropdown', 'item'),\n ns.is('hovering', hoveringIndex.value === index),\n ns.is('disabled', item.disabled || props.disabled),\n]\n\nconst handleSelect = (item: MentionOption) => {\n if (item.disabled || props.disabled) return\n emit('select', item)\n}\n\nconst handleMouseEnter = (index: number) => {\n hoveringIndex.value = index\n}\n\nconst filteredAllDisabled = computed(\n () => props.disabled || props.options.every((item) => item.disabled)\n)\n\nconst hoverOption = computed(() => props.options[hoveringIndex.value])\n\nconst selectHoverOption = () => {\n if (!hoverOption.value) return\n emit('select', hoverOption.value)\n}\n\nconst navigateOptions = (direction: 'next' | 'prev') => {\n const { options } = props\n if (options.length === 0 || filteredAllDisabled.value) return\n\n if (direction === 'next') {\n hoveringIndex.value++\n if (hoveringIndex.value === options.length) {\n hoveringIndex.value = 0\n }\n } else if (direction === 'prev') {\n hoveringIndex.value--\n if (hoveringIndex.value < 0) {\n hoveringIndex.value = options.length - 1\n }\n }\n const option = options[hoveringIndex.value]\n if (option.disabled) {\n navigateOptions(direction)\n return\n }\n nextTick(() => scrollToOption(option))\n}\n\nconst scrollToOption = (option: MentionOption) => {\n const { options } = props\n\n const index = options.findIndex((item) => item.value === option.value)\n const target = optionRefs.value?.[index]\n\n if (target) {\n const menu = dropdownRef.value?.querySelector?.(\n `.${ns.be('dropdown', 'wrap')}`\n )\n if (menu) {\n scrollIntoView(menu as HTMLElement, target)\n }\n }\n scrollbarRef.value?.handleScroll()\n}\n\nconst resetHoveringIndex = () => {\n if (filteredAllDisabled.value || props.options.length === 0) {\n hoveringIndex.value = -1\n } else {\n hoveringIndex.value = 0\n }\n}\n\nwatch(() => props.options, resetHoveringIndex, {\n immediate: true,\n})\n\ndefineExpose({\n hoveringIndex,\n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AA;AAAyC,IAAAC,SAClC,CAAA,MAAA,KAAA,CAAA,OAAA,EAAA,kBAAA,EAAA;AAAA,MACZ,SAAA,EAAA,IAAA;AAED,KAAa,CAAA,CAAA;AAAA,IACX,MAAA,CAAA;AAAA,MACA,aAAA;AAAA,MACA,eAAA;AAAA,MACA,iBAAA;AAAA,MACD,WAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
|
@@ -5,8 +5,8 @@ Object.defineProperty(exports, '__esModule', { value: true });
|
|
|
5
5
|
var vue = require('vue');
|
|
6
6
|
var lodashUnified = require('lodash-unified');
|
|
7
7
|
require('../../../hooks/index.js');
|
|
8
|
-
var index$
|
|
9
|
-
var index$
|
|
8
|
+
var index$3 = require('../../input/index.js');
|
|
9
|
+
var index$4 = require('../../tooltip/index.js');
|
|
10
10
|
require('../../../constants/index.js');
|
|
11
11
|
require('../../../utils/index.js');
|
|
12
12
|
var mention = require('./mention.js');
|
|
@@ -15,9 +15,10 @@ var mentionDropdown = require('./mention-dropdown2.js');
|
|
|
15
15
|
var pluginVue_exportHelper = require('../../../_virtual/plugin-vue_export-helper.js');
|
|
16
16
|
var input = require('../../input/src/input.js');
|
|
17
17
|
var index = require('../../../hooks/use-namespace/index.js');
|
|
18
|
+
var index$1 = require('../../../hooks/use-id/index.js');
|
|
18
19
|
var shared = require('@vue/shared');
|
|
19
20
|
var event = require('../../../constants/event.js');
|
|
20
|
-
var index$
|
|
21
|
+
var index$2 = require('../../../hooks/use-focus-controller/index.js');
|
|
21
22
|
|
|
22
23
|
const __default__ = vue.defineComponent({
|
|
23
24
|
name: "ElMention"
|
|
@@ -30,6 +31,7 @@ const _sfc_main = /* @__PURE__ */ vue.defineComponent({
|
|
|
30
31
|
const props = __props;
|
|
31
32
|
const passInputProps = vue.computed(() => lodashUnified.pick(props, Object.keys(input.inputProps)));
|
|
32
33
|
const ns = index.useNamespace("mention");
|
|
34
|
+
const contentId = index$1.useId();
|
|
33
35
|
const elInputRef = vue.ref();
|
|
34
36
|
const tooltipRef = vue.ref();
|
|
35
37
|
const dropdownRef = vue.ref();
|
|
@@ -44,6 +46,13 @@ const _sfc_main = /* @__PURE__ */ vue.defineComponent({
|
|
|
44
46
|
return options;
|
|
45
47
|
return options.filter((option) => filterOption(mentionCtx.value.pattern, option));
|
|
46
48
|
});
|
|
49
|
+
const dropdownVisible = vue.computed(() => {
|
|
50
|
+
return visible.value && (!!filteredOptions.value.length || props.loading);
|
|
51
|
+
});
|
|
52
|
+
const hoveringId = vue.computed(() => {
|
|
53
|
+
var _a;
|
|
54
|
+
return `${contentId.value}-${(_a = dropdownRef.value) == null ? void 0 : _a.hoveringIndex}`;
|
|
55
|
+
});
|
|
47
56
|
const handleInputChange = (value) => {
|
|
48
57
|
emit("update:modelValue", value);
|
|
49
58
|
syncAfterCursorMove();
|
|
@@ -71,6 +80,11 @@ const _sfc_main = /* @__PURE__ */ vue.defineComponent({
|
|
|
71
80
|
} else {
|
|
72
81
|
visible.value = false;
|
|
73
82
|
}
|
|
83
|
+
} else if (["Escape"].includes(e.key)) {
|
|
84
|
+
if (!visible.value)
|
|
85
|
+
return;
|
|
86
|
+
e.preventDefault();
|
|
87
|
+
visible.value = false;
|
|
74
88
|
} else if (["Backspace"].includes(e.key)) {
|
|
75
89
|
if (props.whole && mentionCtx.value) {
|
|
76
90
|
const { splitIndex, selectionEnd, pattern, prefixIndex, prefix } = mentionCtx.value;
|
|
@@ -94,7 +108,7 @@ const _sfc_main = /* @__PURE__ */ vue.defineComponent({
|
|
|
94
108
|
}
|
|
95
109
|
}
|
|
96
110
|
};
|
|
97
|
-
const { wrapperRef } = index$
|
|
111
|
+
const { wrapperRef } = index$2.useFocusController(elInputRef, {
|
|
98
112
|
afterFocus() {
|
|
99
113
|
syncAfterCursorMove();
|
|
100
114
|
},
|
|
@@ -185,10 +199,17 @@ const _sfc_main = /* @__PURE__ */ vue.defineComponent({
|
|
|
185
199
|
ref: wrapperRef,
|
|
186
200
|
class: vue.normalizeClass(vue.unref(ns).b())
|
|
187
201
|
}, [
|
|
188
|
-
vue.createVNode(vue.unref(index$
|
|
202
|
+
vue.createVNode(vue.unref(index$3.ElInput), vue.mergeProps(vue.mergeProps(vue.unref(passInputProps), _ctx.$attrs), {
|
|
189
203
|
ref_key: "elInputRef",
|
|
190
204
|
ref: elInputRef,
|
|
191
205
|
"model-value": _ctx.modelValue,
|
|
206
|
+
role: vue.unref(dropdownVisible) ? "combobox" : void 0,
|
|
207
|
+
"aria-activedescendant": vue.unref(dropdownVisible) ? vue.unref(hoveringId) || "" : void 0,
|
|
208
|
+
"aria-controls": vue.unref(dropdownVisible) ? vue.unref(contentId) : void 0,
|
|
209
|
+
"aria-expanded": vue.unref(dropdownVisible) || void 0,
|
|
210
|
+
"aria-label": _ctx.ariaLabel,
|
|
211
|
+
"aria-autocomplete": vue.unref(dropdownVisible) ? "none" : void 0,
|
|
212
|
+
"aria-haspopup": vue.unref(dropdownVisible) ? "listbox" : void 0,
|
|
192
213
|
onInput: handleInputChange,
|
|
193
214
|
onKeydown: handleInputKeyDown,
|
|
194
215
|
onMousedown: handleInputMouseDown
|
|
@@ -201,11 +222,11 @@ const _sfc_main = /* @__PURE__ */ vue.defineComponent({
|
|
|
201
222
|
])
|
|
202
223
|
};
|
|
203
224
|
})
|
|
204
|
-
]), 1040, ["model-value"]),
|
|
205
|
-
vue.createVNode(vue.unref(index$
|
|
225
|
+
]), 1040, ["model-value", "role", "aria-activedescendant", "aria-controls", "aria-expanded", "aria-label", "aria-autocomplete", "aria-haspopup"]),
|
|
226
|
+
vue.createVNode(vue.unref(index$4.ElTooltip), {
|
|
206
227
|
ref_key: "tooltipRef",
|
|
207
228
|
ref: tooltipRef,
|
|
208
|
-
visible:
|
|
229
|
+
visible: vue.unref(dropdownVisible),
|
|
209
230
|
"popper-class": [vue.unref(ns).e("popper"), _ctx.popperClass],
|
|
210
231
|
"popper-options": _ctx.popperOptions,
|
|
211
232
|
placement: vue.unref(computedPlacement),
|
|
@@ -229,6 +250,8 @@ const _sfc_main = /* @__PURE__ */ vue.defineComponent({
|
|
|
229
250
|
options: vue.unref(filteredOptions),
|
|
230
251
|
disabled: _ctx.disabled,
|
|
231
252
|
loading: _ctx.loading,
|
|
253
|
+
"content-id": vue.unref(contentId),
|
|
254
|
+
"aria-label": _ctx.ariaLabel,
|
|
232
255
|
onSelect: handleSelect,
|
|
233
256
|
onClick: vue.withModifiers((_a = elInputRef.value) == null ? void 0 : _a.focus, ["stop"])
|
|
234
257
|
}, vue.createSlots({ _: 2 }, [
|
|
@@ -240,7 +263,7 @@ const _sfc_main = /* @__PURE__ */ vue.defineComponent({
|
|
|
240
263
|
])
|
|
241
264
|
};
|
|
242
265
|
})
|
|
243
|
-
]), 1032, ["options", "disabled", "loading", "onClick"])
|
|
266
|
+
]), 1032, ["options", "disabled", "loading", "content-id", "aria-label", "onClick"])
|
|
244
267
|
];
|
|
245
268
|
}),
|
|
246
269
|
_: 3
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"mention2.js","sources":["../../../../../../packages/components/mention/src/mention.vue"],"sourcesContent":["<template>\n <div ref=\"wrapperRef\" :class=\"ns.b()\">\n <el-input\n v-bind=\"mergeProps(passInputProps, $attrs)\"\n ref=\"elInputRef\"\n :model-value=\"modelValue\"\n @input=\"handleInputChange\"\n @keydown=\"handleInputKeyDown\"\n @mousedown=\"handleInputMouseDown\"\n >\n <template v-for=\"(_, name) in $slots\" #[name]=\"slotProps\">\n <slot :name=\"name\" v-bind=\"slotProps\" />\n </template>\n </el-input>\n <el-tooltip\n ref=\"tooltipRef\"\n :visible=\"visible && (!!filteredOptions.length || loading)\"\n :popper-class=\"[ns.e('popper'), popperClass]\"\n :popper-options=\"popperOptions\"\n :placement=\"computedPlacement\"\n :fallback-placements=\"computedFallbackPlacements\"\n effect=\"light\"\n pure\n :offset=\"offset\"\n :show-arrow=\"showArrow\"\n >\n <template #default>\n <div :style=\"cursorStyle\" />\n </template>\n <template #content>\n <el-mention-dropdown\n ref=\"dropdownRef\"\n :options=\"filteredOptions\"\n :disabled=\"disabled\"\n :loading=\"loading\"\n @select=\"handleSelect\"\n @click.stop=\"elInputRef?.focus\"\n >\n <template v-for=\"(_, name) in $slots\" #[name]=\"slotProps\">\n <slot :name=\"name\" v-bind=\"slotProps\" />\n </template>\n </el-mention-dropdown>\n </template>\n </el-tooltip>\n </div>\n</template>\n\n<script lang=\"ts\" setup>\nimport { computed, mergeProps, nextTick, ref } from 'vue'\nimport { pick } from 'lodash-unified'\nimport { useFocusController, useNamespace } from '@element-plus/hooks'\nimport ElInput, { inputProps } from '@element-plus/components/input'\nimport ElTooltip from '@element-plus/components/tooltip'\nimport { UPDATE_MODEL_EVENT } from '@element-plus/constants'\nimport { isFunction } from '@element-plus/utils'\nimport { mentionEmits, mentionProps } from './mention'\nimport { getCursorPosition, getMentionCtx } from './helper'\nimport ElMentionDropdown from './mention-dropdown.vue'\n\nimport type { Placement } from '@popperjs/core'\nimport type { CSSProperties } from 'vue'\nimport type { InputInstance } from '@element-plus/components/input'\nimport type { TooltipInstance } from '@element-plus/components/tooltip'\nimport type { MentionCtx, MentionOption } from './types'\n\ndefineOptions({\n name: 'ElMention',\n})\n\nconst props = defineProps(mentionProps)\nconst emit = defineEmits(mentionEmits)\n\nconst passInputProps = computed(() => pick(props, Object.keys(inputProps)))\n\nconst ns = useNamespace('mention')\n\nconst elInputRef = ref<InputInstance>()\nconst tooltipRef = ref<TooltipInstance>()\nconst dropdownRef = ref<InstanceType<typeof ElMentionDropdown>>()\n\nconst visible = ref(false)\nconst cursorStyle = ref<CSSProperties>()\nconst mentionCtx = ref<MentionCtx>()\n\nconst computedPlacement = computed<Placement>(() =>\n props.showArrow ? props.placement : `${props.placement}-start`\n)\n\nconst computedFallbackPlacements = computed<Placement[]>(() =>\n props.showArrow ? ['bottom', 'top'] : ['bottom-start', 'top-start']\n)\n\nconst filteredOptions = computed(() => {\n const { filterOption, options } = props\n if (!mentionCtx.value || !filterOption) return options\n return options.filter((option) =>\n filterOption(mentionCtx.value!.pattern, option)\n )\n})\n\nconst handleInputChange = (value: string) => {\n emit('update:modelValue', value)\n syncAfterCursorMove()\n}\n\nconst handleInputKeyDown = (e: KeyboardEvent | Event) => {\n if (!('key' in e)) return\n if (elInputRef.value?.isComposing) return\n if (['ArrowLeft', 'ArrowRight'].includes(e.key)) {\n syncAfterCursorMove()\n } else if (['ArrowUp', 'ArrowDown'].includes(e.key)) {\n if (!visible.value) return\n e.preventDefault()\n const direction = e.key === 'ArrowUp' ? 'prev' : 'next'\n dropdownRef.value?.navigateOptions(direction)\n } else if (['Enter'].includes(e.key)) {\n if (!visible.value) return\n e.preventDefault()\n if (dropdownRef.value?.hoverOption) {\n dropdownRef.value?.selectHoverOption()\n } else {\n visible.value = false\n }\n } else if (['Backspace'].includes(e.key)) {\n if (props.whole && mentionCtx.value) {\n const { splitIndex, selectionEnd, pattern, prefixIndex, prefix } =\n mentionCtx.value\n const inputEl = getInputEl()\n if (!inputEl) return\n const inputValue = inputEl.value\n const matchOption = props.options.find((item) => item.value === pattern)\n const isWhole = isFunction(props.checkIsWhole)\n ? props.checkIsWhole(pattern, prefix)\n : matchOption\n if (isWhole && splitIndex !== -1 && splitIndex + 1 === selectionEnd) {\n e.preventDefault()\n const newValue =\n inputValue.slice(0, prefixIndex) + inputValue.slice(splitIndex + 1)\n emit(UPDATE_MODEL_EVENT, newValue)\n\n const newSelectionEnd = prefixIndex\n nextTick(() => {\n // input value is updated\n inputEl.selectionStart = newSelectionEnd\n inputEl.selectionEnd = newSelectionEnd\n syncDropdownVisible()\n })\n }\n }\n }\n}\n\nconst { wrapperRef } = useFocusController(elInputRef, {\n afterFocus() {\n syncAfterCursorMove()\n },\n beforeBlur(event) {\n return tooltipRef.value?.isFocusInsideContent(event)\n },\n afterBlur() {\n visible.value = false\n },\n})\n\nconst handleInputMouseDown = () => {\n syncAfterCursorMove()\n}\n\nconst handleSelect = (item: MentionOption) => {\n if (!mentionCtx.value) return\n const inputEl = getInputEl()\n if (!inputEl) return\n const inputValue = inputEl.value\n const { split } = props\n\n const newEndPart = inputValue.slice(mentionCtx.value.end)\n const alreadySeparated = newEndPart.startsWith(split)\n const newMiddlePart = `${item.value}${alreadySeparated ? '' : split}`\n\n const newValue =\n inputValue.slice(0, mentionCtx.value.start) + newMiddlePart + newEndPart\n\n emit(UPDATE_MODEL_EVENT, newValue)\n emit('select', item, mentionCtx.value.prefix)\n\n const newSelectionEnd =\n mentionCtx.value.start + newMiddlePart.length + (alreadySeparated ? 1 : 0)\n\n nextTick(() => {\n // input value is updated\n inputEl.selectionStart = newSelectionEnd\n inputEl.selectionEnd = newSelectionEnd\n inputEl.focus()\n syncDropdownVisible()\n })\n}\n\nconst getInputEl = () =>\n props.type === 'textarea'\n ? elInputRef.value?.textarea\n : elInputRef.value?.input\n\nconst syncAfterCursorMove = () => {\n // can't use nextTick(), get cursor position will be wrong\n setTimeout(() => {\n syncCursor()\n syncDropdownVisible()\n nextTick(() => tooltipRef.value?.updatePopper())\n }, 0)\n}\n\nconst syncCursor = () => {\n const inputEl = getInputEl()\n if (!inputEl) return\n\n const caretPosition = getCursorPosition(inputEl)\n const inputRect = inputEl.getBoundingClientRect()\n const elInputRect = elInputRef.value!.$el.getBoundingClientRect()\n\n cursorStyle.value = {\n position: 'absolute',\n width: 0,\n height: `${caretPosition.height}px`,\n left: `${caretPosition.left + inputRect.left - elInputRect.left}px`,\n top: `${caretPosition.top + inputRect.top - elInputRect.top}px`,\n }\n}\n\nconst syncDropdownVisible = () => {\n const inputEl = getInputEl()\n if (document.activeElement !== inputEl) {\n visible.value = false\n return\n }\n const { prefix, split } = props\n mentionCtx.value = getMentionCtx(inputEl, prefix, split)\n if (mentionCtx.value && mentionCtx.value.splitIndex === -1) {\n visible.value = true\n emit('search', mentionCtx.value.pattern, mentionCtx.value.prefix)\n return\n }\n visible.value = false\n}\n\ndefineExpose({\n input: elInputRef,\n tooltip: tooltipRef,\n})\n</script>\n"],"names":["computed","pick","inputProps","useNamespace","ref","isFunction","UPDATE_MODEL_EVENT","nextTick","useFocusController","getCursorPosition","getMentionCtx"],"mappings":";;;;;;;;;;;;;;;;;;;;;uCAiEc,CAAA;AAAA,EACZ,IAAM,EAAA,WAAA;AACR,CAAA,CAAA,CAAA;;;;;;;AAKA,IAAM,MAAA,cAAA,GAAiBA,aAAS,MAAMC,kBAAA,CAAK,OAAO,MAAO,CAAA,IAAA,CAAKC,gBAAU,CAAC,CAAC,CAAA,CAAA;AAE1E,IAAM,MAAA,EAAA,GAAKC,mBAAa,SAAS,CAAA,CAAA;AAEjC,IAAA,MAAM,aAAaC,OAAmB,EAAA,CAAA;AACtC,IAAA,MAAM,aAAaA,OAAqB,EAAA,CAAA;AACxC,IAAA,MAAM,cAAcA,OAA4C,EAAA,CAAA;AAEhE,IAAM,MAAA,OAAA,GAAUA,QAAI,KAAK,CAAA,CAAA;AACzB,IAAA,MAAM,cAAcA,OAAmB,EAAA,CAAA;AACvC,IAAA,MAAM,aAAaA,OAAgB,EAAA,CAAA;AAEnC,IAAM,MAAA,iBAAA,GAAoBJ,aAAoB,MAC5C,KAAA,CAAM,YAAY,KAAM,CAAA,SAAA,GAAY,CAAG,EAAA,KAAA,CAAM,SAC/C,CAAA,MAAA,CAAA,CAAA,CAAA;AAEA,IAAA,MAAM,0BAA6B,GAAAA,YAAA,CAAsB,MACvD,KAAA,CAAM,SAAY,GAAA,CAAC,QAAU,EAAA,KAAK,CAAI,GAAA,CAAC,cAAgB,EAAA,WAAW,CACpE,CAAA,CAAA;AAEA,IAAM,MAAA,eAAA,GAAkBA,aAAS,MAAM;AACrC,MAAM,MAAA,EAAE,cAAc,OAAY,EAAA,GAAA,KAAA,CAAA;AAClC,MAAI,IAAA,CAAC,UAAW,CAAA,KAAA,IAAS,CAAC,YAAA;AAAc,QAAO,OAAA,OAAA,CAAA;AAC/C,MAAO,OAAA,OAAA,CAAQ,OAAO,C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AAAgB,MAClB,MAAA,EAAA,MAAA,EAAA,KAAA,EAAA,GAAA,KAAA,CAAA;AAEA,MAAa,UAAA,CAAA,KAAA,GAAAC,oBAAA,CAAA,OAAA,EAAA,MAAA,EAAA,KAAA,CAAA,CAAA;AAAA,MACX,IAAO,UAAA,CAAA,KAAA,IAAA,UAAA,CAAA,KAAA,CAAA,UAAA,KAAA,CAAA,CAAA,EAAA;AAAA,QACE,OAAA,CAAA,KAAA,GAAA,IAAA,CAAA;AAAA,QACV,IAAA,CAAA,QAAA,EAAA,UAAA,CAAA,KAAA,CAAA,OAAA,EAAA,UAAA,CAAA,KAAA,CAAA,MAAA,CAAA,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
|
1
|
+
{"version":3,"file":"mention2.js","sources":["../../../../../../packages/components/mention/src/mention.vue"],"sourcesContent":["<template>\n <div ref=\"wrapperRef\" :class=\"ns.b()\">\n <el-input\n v-bind=\"mergeProps(passInputProps, $attrs)\"\n ref=\"elInputRef\"\n :model-value=\"modelValue\"\n :role=\"dropdownVisible ? 'combobox' : undefined\"\n :aria-activedescendant=\"dropdownVisible ? hoveringId || '' : undefined\"\n :aria-controls=\"dropdownVisible ? contentId : undefined\"\n :aria-expanded=\"dropdownVisible || undefined\"\n :aria-label=\"ariaLabel\"\n :aria-autocomplete=\"dropdownVisible ? 'none' : undefined\"\n :aria-haspopup=\"dropdownVisible ? 'listbox' : undefined\"\n @input=\"handleInputChange\"\n @keydown=\"handleInputKeyDown\"\n @mousedown=\"handleInputMouseDown\"\n >\n <template v-for=\"(_, name) in $slots\" #[name]=\"slotProps\">\n <slot :name=\"name\" v-bind=\"slotProps\" />\n </template>\n </el-input>\n <el-tooltip\n ref=\"tooltipRef\"\n :visible=\"dropdownVisible\"\n :popper-class=\"[ns.e('popper'), popperClass]\"\n :popper-options=\"popperOptions\"\n :placement=\"computedPlacement\"\n :fallback-placements=\"computedFallbackPlacements\"\n effect=\"light\"\n pure\n :offset=\"offset\"\n :show-arrow=\"showArrow\"\n >\n <template #default>\n <div :style=\"cursorStyle\" />\n </template>\n <template #content>\n <el-mention-dropdown\n ref=\"dropdownRef\"\n :options=\"filteredOptions\"\n :disabled=\"disabled\"\n :loading=\"loading\"\n :content-id=\"contentId\"\n :aria-label=\"ariaLabel\"\n @select=\"handleSelect\"\n @click.stop=\"elInputRef?.focus\"\n >\n <template v-for=\"(_, name) in $slots\" #[name]=\"slotProps\">\n <slot :name=\"name\" v-bind=\"slotProps\" />\n </template>\n </el-mention-dropdown>\n </template>\n </el-tooltip>\n </div>\n</template>\n\n<script lang=\"ts\" setup>\nimport { computed, mergeProps, nextTick, ref } from 'vue'\nimport { pick } from 'lodash-unified'\nimport { useFocusController, useId, useNamespace } from '@element-plus/hooks'\nimport ElInput, { inputProps } from '@element-plus/components/input'\nimport ElTooltip from '@element-plus/components/tooltip'\nimport { UPDATE_MODEL_EVENT } from '@element-plus/constants'\nimport { isFunction } from '@element-plus/utils'\nimport { mentionEmits, mentionProps } from './mention'\nimport { getCursorPosition, getMentionCtx } from './helper'\nimport ElMentionDropdown from './mention-dropdown.vue'\n\nimport type { Placement } from '@popperjs/core'\nimport type { CSSProperties } from 'vue'\nimport type { InputInstance } from '@element-plus/components/input'\nimport type { TooltipInstance } from '@element-plus/components/tooltip'\nimport type { MentionCtx, MentionOption } from './types'\n\ndefineOptions({\n name: 'ElMention',\n})\n\nconst props = defineProps(mentionProps)\nconst emit = defineEmits(mentionEmits)\n\nconst passInputProps = computed(() => pick(props, Object.keys(inputProps)))\n\nconst ns = useNamespace('mention')\nconst contentId = useId()\n\nconst elInputRef = ref<InputInstance>()\nconst tooltipRef = ref<TooltipInstance>()\nconst dropdownRef = ref<InstanceType<typeof ElMentionDropdown>>()\n\nconst visible = ref(false)\nconst cursorStyle = ref<CSSProperties>()\nconst mentionCtx = ref<MentionCtx>()\n\nconst computedPlacement = computed<Placement>(() =>\n props.showArrow ? props.placement : `${props.placement}-start`\n)\n\nconst computedFallbackPlacements = computed<Placement[]>(() =>\n props.showArrow ? ['bottom', 'top'] : ['bottom-start', 'top-start']\n)\n\nconst filteredOptions = computed(() => {\n const { filterOption, options } = props\n if (!mentionCtx.value || !filterOption) return options\n return options.filter((option) =>\n filterOption(mentionCtx.value!.pattern, option)\n )\n})\n\nconst dropdownVisible = computed(() => {\n return visible.value && (!!filteredOptions.value.length || props.loading)\n})\n\nconst hoveringId = computed(() => {\n return `${contentId.value}-${dropdownRef.value?.hoveringIndex}`\n})\n\nconst handleInputChange = (value: string) => {\n emit('update:modelValue', value)\n syncAfterCursorMove()\n}\n\nconst handleInputKeyDown = (e: KeyboardEvent | Event) => {\n if (!('key' in e)) return\n if (elInputRef.value?.isComposing) return\n if (['ArrowLeft', 'ArrowRight'].includes(e.key)) {\n syncAfterCursorMove()\n } else if (['ArrowUp', 'ArrowDown'].includes(e.key)) {\n if (!visible.value) return\n e.preventDefault()\n const direction = e.key === 'ArrowUp' ? 'prev' : 'next'\n dropdownRef.value?.navigateOptions(direction)\n } else if (['Enter'].includes(e.key)) {\n if (!visible.value) return\n e.preventDefault()\n if (dropdownRef.value?.hoverOption) {\n dropdownRef.value?.selectHoverOption()\n } else {\n visible.value = false\n }\n } else if (['Escape'].includes(e.key)) {\n if (!visible.value) return\n e.preventDefault()\n visible.value = false\n } else if (['Backspace'].includes(e.key)) {\n if (props.whole && mentionCtx.value) {\n const { splitIndex, selectionEnd, pattern, prefixIndex, prefix } =\n mentionCtx.value\n const inputEl = getInputEl()\n if (!inputEl) return\n const inputValue = inputEl.value\n const matchOption = props.options.find((item) => item.value === pattern)\n const isWhole = isFunction(props.checkIsWhole)\n ? props.checkIsWhole(pattern, prefix)\n : matchOption\n if (isWhole && splitIndex !== -1 && splitIndex + 1 === selectionEnd) {\n e.preventDefault()\n const newValue =\n inputValue.slice(0, prefixIndex) + inputValue.slice(splitIndex + 1)\n emit(UPDATE_MODEL_EVENT, newValue)\n\n const newSelectionEnd = prefixIndex\n nextTick(() => {\n // input value is updated\n inputEl.selectionStart = newSelectionEnd\n inputEl.selectionEnd = newSelectionEnd\n syncDropdownVisible()\n })\n }\n }\n }\n}\n\nconst { wrapperRef } = useFocusController(elInputRef, {\n afterFocus() {\n syncAfterCursorMove()\n },\n beforeBlur(event) {\n return tooltipRef.value?.isFocusInsideContent(event)\n },\n afterBlur() {\n visible.value = false\n },\n})\n\nconst handleInputMouseDown = () => {\n syncAfterCursorMove()\n}\n\nconst handleSelect = (item: MentionOption) => {\n if (!mentionCtx.value) return\n const inputEl = getInputEl()\n if (!inputEl) return\n const inputValue = inputEl.value\n const { split } = props\n\n const newEndPart = inputValue.slice(mentionCtx.value.end)\n const alreadySeparated = newEndPart.startsWith(split)\n const newMiddlePart = `${item.value}${alreadySeparated ? '' : split}`\n\n const newValue =\n inputValue.slice(0, mentionCtx.value.start) + newMiddlePart + newEndPart\n\n emit(UPDATE_MODEL_EVENT, newValue)\n emit('select', item, mentionCtx.value.prefix)\n\n const newSelectionEnd =\n mentionCtx.value.start + newMiddlePart.length + (alreadySeparated ? 1 : 0)\n\n nextTick(() => {\n // input value is updated\n inputEl.selectionStart = newSelectionEnd\n inputEl.selectionEnd = newSelectionEnd\n inputEl.focus()\n syncDropdownVisible()\n })\n}\n\nconst getInputEl = () =>\n props.type === 'textarea'\n ? elInputRef.value?.textarea\n : elInputRef.value?.input\n\nconst syncAfterCursorMove = () => {\n // can't use nextTick(), get cursor position will be wrong\n setTimeout(() => {\n syncCursor()\n syncDropdownVisible()\n nextTick(() => tooltipRef.value?.updatePopper())\n }, 0)\n}\n\nconst syncCursor = () => {\n const inputEl = getInputEl()\n if (!inputEl) return\n\n const caretPosition = getCursorPosition(inputEl)\n const inputRect = inputEl.getBoundingClientRect()\n const elInputRect = elInputRef.value!.$el.getBoundingClientRect()\n\n cursorStyle.value = {\n position: 'absolute',\n width: 0,\n height: `${caretPosition.height}px`,\n left: `${caretPosition.left + inputRect.left - elInputRect.left}px`,\n top: `${caretPosition.top + inputRect.top - elInputRect.top}px`,\n }\n}\n\nconst syncDropdownVisible = () => {\n const inputEl = getInputEl()\n if (document.activeElement !== inputEl) {\n visible.value = false\n return\n }\n const { prefix, split } = props\n mentionCtx.value = getMentionCtx(inputEl, prefix, split)\n if (mentionCtx.value && mentionCtx.value.splitIndex === -1) {\n visible.value = true\n emit('search', mentionCtx.value.pattern, mentionCtx.value.prefix)\n return\n }\n visible.value = false\n}\n\ndefineExpose({\n input: elInputRef,\n tooltip: tooltipRef,\n})\n</script>\n"],"names":["computed","pick","inputProps","useNamespace","useId","ref","isFunction","UPDATE_MODEL_EVENT","nextTick","useFocusController","getCursorPosition","getMentionCtx"],"mappings":";;;;;;;;;;;;;;;;;;;;;;uCA0Ec,CAAA;AAAA,EACZ,IAAM,EAAA,WAAA;AACR,CAAA,CAAA,CAAA;;;;;;;AAKA,IAAM,MAAA,cAAA,GAAiBA,aAAS,MAAMC,kBAAA,CAAK,OAAO,MAAO,CAAA,IAAA,CAAKC,gBAAU,CAAC,CAAC,CAAA,CAAA;AAE1E,IAAM,MAAA,EAAA,GAAKC,mBAAa,SAAS,CAAA,CAAA;AACjC,IAAA,MAAM,YAAYC,aAAM,EAAA,CAAA;AAExB,IAAA,MAAM,aAAaC,OAAmB,EAAA,CAAA;AACtC,IAAA,MAAM,aAAaA,OAAqB,EAAA,CAAA;AACxC,IAAA,MAAM,cAAcA,OAA4C,EAAA,CAAA;AAEhE,IAAM,MAAA,OAAA,GAAUA,QAAI,KAAK,CAAA,CAAA;AACzB,IAAA,MAAM,cAAcA,OAAmB,EAAA,CAAA;AACvC,IAAA,MAAM,aAAaA,OAAgB,EAAA,CAAA;AAEnC,IAAM,MAAA,iBAAA,GAAoBL,aAAoB,MAC5C,KAAA,CAAM,YAAY,KAAM,CAAA,SAAA,GAAY,CAAG,EAAA,KAAA,CAAM,SAC/C,CAAA,MAAA,CAAA,CAAA,CAAA;AAEA,IAAA,MA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A,CAAA,EAAA;AAAA,QACV,OAAA,CAAA,KAAA,GAAA,IAAA,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sources":["../../../../../packages/components/tree/index.ts"],"sourcesContent":["import { withInstall } from '@element-plus/utils'\nimport Tree from './src/tree.vue'\n\nimport type { SFCWithInstall } from '@element-plus/utils'\n\nexport const ElTree: SFCWithInstall<typeof Tree> = withInstall(Tree)\n\nexport default ElTree\n"],"names":["withInstall","Tree"],"mappings":";;;;;;;;AAEY,MAAC,MAAM,GAAGA,mBAAW,CAACC,eAAI;;;;;"}
|
|
1
|
+
{"version":3,"file":"index.js","sources":["../../../../../packages/components/tree/index.ts"],"sourcesContent":["import { withInstall } from '@element-plus/utils'\nimport Tree from './src/tree.vue'\n\nimport type { SFCWithInstall } from '@element-plus/utils'\n\nexport const ElTree: SFCWithInstall<typeof Tree> = withInstall(Tree)\n\nexport default ElTree\n\nexport type { TreeInstance } from './src/instance'\n"],"names":["withInstall","Tree"],"mappings":";;;;;;;;AAEY,MAAC,MAAM,GAAGA,mBAAW,CAACC,eAAI;;;;;"}
|
package/lib/version.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare const version = "0.0.
|
|
1
|
+
export declare const version = "0.0.20240813";
|
package/lib/version.js
CHANGED
package/lib/version.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"version.js","sources":["../../../packages/element-plus/version.ts"],"sourcesContent":["export const version = '0.0.
|
|
1
|
+
{"version":3,"file":"version.js","sources":["../../../packages/element-plus/version.ts"],"sourcesContent":["export const version = '0.0.20240813'\n"],"names":[],"mappings":";;;;AAAY,MAAC,OAAO,GAAG;;;;"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@element-plus/nightly",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.20240813",
|
|
4
4
|
"description": "A Component Library for Vue 3",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"element-plus",
|
|
@@ -112,5 +112,5 @@
|
|
|
112
112
|
"not ie 11",
|
|
113
113
|
"not op_mini all"
|
|
114
114
|
],
|
|
115
|
-
"gitHead": "
|
|
115
|
+
"gitHead": "8c9165a93a65184259c18bbae12fb6c9ad5e5ec4"
|
|
116
116
|
}
|