ep-craft 0.1.41 → 0.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/components/input-number/EpInputNumber.vue.js +62 -63
- package/dist/components/input-number/input-number.d.ts +5 -0
- package/dist/components/input-number/input-number.js +6 -6
- package/dist/components/select/index.d.ts +6 -3
- package/dist/components/select/select.d.ts +1 -0
- package/dist/components/select/select.js +3 -3
- package/dist/components/select/select.vue.d.ts +3 -1
- package/dist/components/select/select.vue.js +9 -9
- package/dist/components/select/select2.vue.js +73 -75
- package/dist/components/select-v2/src/defaults.d.ts +1 -0
- package/dist/components/select-v2/src/defaults.js +1 -1
- package/dist/components/select-v2/src/select.vue.d.ts +3 -1
- package/dist/components/select-v2/src/select.vue.js +21 -21
- package/dist/components/select-v2/src/select2.vue.js +27 -29
- package/dist/components/tree-select/src/tree-select.vue.d.ts +2 -0
- package/dist-ai/components/affix.json +152 -0
- package/dist-ai/components/affix.md +73 -0
- package/dist-ai/components/alert.json +186 -0
- package/dist-ai/components/alert.md +89 -0
- package/dist-ai/components/anchor-link.json +102 -0
- package/dist-ai/components/anchor-link.md +67 -0
- package/dist-ai/components/anchor.json +179 -0
- package/dist-ai/components/anchor.md +87 -0
- package/dist-ai/components/aside.json +87 -0
- package/dist-ai/components/aside.md +63 -0
- package/dist-ai/components/autocomplete.json +613 -0
- package/dist-ai/components/autocomplete.md +140 -0
- package/dist-ai/components/avatar.json +163 -0
- package/dist-ai/components/avatar.md +83 -0
- package/dist-ai/components/backtop.json +118 -0
- package/dist-ai/components/backtop.md +66 -0
- package/dist-ai/components/badge.json +186 -0
- package/dist-ai/components/badge.md +85 -0
- package/dist-ai/components/breadcrumb-item.json +97 -0
- package/dist-ai/components/breadcrumb-item.md +65 -0
- package/dist-ai/components/breadcrumb.json +100 -0
- package/dist-ai/components/breadcrumb.md +68 -0
- package/dist-ai/components/button-group.json +123 -0
- package/dist-ai/components/button-group.md +65 -0
- package/dist-ai/components/button.json +349 -0
- package/dist-ai/components/button.md +124 -0
- package/dist-ai/components/calendar.json +148 -0
- package/dist-ai/components/calendar.md +74 -0
- package/dist-ai/components/card.json +168 -0
- package/dist-ai/components/card.md +87 -0
- package/dist-ai/components/carousel-item.json +99 -0
- package/dist-ai/components/carousel-item.md +68 -0
- package/dist-ai/components/carousel.json +245 -0
- package/dist-ai/components/carousel.md +97 -0
- package/dist-ai/components/cascader-panel.json +242 -0
- package/dist-ai/components/cascader-panel.md +108 -0
- package/dist-ai/components/cascader.json +531 -0
- package/dist-ai/components/cascader.md +146 -0
- package/dist-ai/components/check-tag.json +133 -0
- package/dist-ai/components/check-tag.md +72 -0
- package/dist-ai/components/checkbox-button.json +279 -0
- package/dist-ai/components/checkbox-button.md +94 -0
- package/dist-ai/components/checkbox-group.json +236 -0
- package/dist-ai/components/checkbox-group.md +90 -0
- package/dist-ai/components/checkbox.json +278 -0
- package/dist-ai/components/checkbox.md +91 -0
- package/dist-ai/components/col.json +168 -0
- package/dist-ai/components/col.md +72 -0
- package/dist-ai/components/collapse-item.json +133 -0
- package/dist-ai/components/collapse-item.md +75 -0
- package/dist-ai/components/collapse-transition.json +75 -0
- package/dist-ai/components/collapse-transition.md +59 -0
- package/dist-ai/components/collapse.json +129 -0
- package/dist-ai/components/collapse.md +76 -0
- package/dist-ai/components/color-picker.json +280 -0
- package/dist-ai/components/color-picker.md +85 -0
- package/dist-ai/components/config-provider.json +222 -0
- package/dist-ai/components/config-provider.md +76 -0
- package/dist-ai/components/container.json +95 -0
- package/dist-ai/components/container.md +70 -0
- package/dist-ai/components/countdown.json +155 -0
- package/dist-ai/components/countdown.md +73 -0
- package/dist-ai/components/date-picker-panel.json +346 -0
- package/dist-ai/components/date-picker-panel.md +91 -0
- package/dist-ai/components/date-picker.json +574 -0
- package/dist-ai/components/date-picker.md +153 -0
- package/dist-ai/components/descriptions-item.json +175 -0
- package/dist-ai/components/descriptions-item.md +73 -0
- package/dist-ai/components/descriptions.json +171 -0
- package/dist-ai/components/descriptions.md +78 -0
- package/dist-ai/components/dialog.json +403 -0
- package/dist-ai/components/dialog.md +108 -0
- package/dist-ai/components/divider.json +102 -0
- package/dist-ai/components/divider.md +59 -0
- package/dist-ai/components/drawer.json +468 -0
- package/dist-ai/components/drawer.md +115 -0
- package/dist-ai/components/dropdown-item.json +156 -0
- package/dist-ai/components/dropdown-item.md +84 -0
- package/dist-ai/components/dropdown-menu.json +92 -0
- package/dist-ai/components/dropdown-menu.md +70 -0
- package/dist-ai/components/dropdown.json +374 -0
- package/dist-ai/components/dropdown.md +108 -0
- package/dist-ai/components/empty.json +116 -0
- package/dist-ai/components/empty.md +62 -0
- package/dist-ai/components/footer.json +86 -0
- package/dist-ai/components/footer.md +63 -0
- package/dist-ai/components/form-item.json +242 -0
- package/dist-ai/components/form-item.md +93 -0
- package/dist-ai/components/form.json +277 -0
- package/dist-ai/components/form.md +117 -0
- package/dist-ai/components/header.json +86 -0
- package/dist-ai/components/header.md +63 -0
- package/dist-ai/components/icon.json +95 -0
- package/dist-ai/components/icon.md +61 -0
- package/dist-ai/components/image-viewer.json +235 -0
- package/dist-ai/components/image-viewer.md +88 -0
- package/dist-ai/components/image.json +299 -0
- package/dist-ai/components/image.md +96 -0
- package/dist-ai/components/input-number.json +370 -0
- package/dist-ai/components/input-number.md +127 -0
- package/dist-ai/components/input.json +545 -0
- package/dist-ai/components/input.md +166 -0
- package/dist-ai/components/link.json +162 -0
- package/dist-ai/components/link.md +72 -0
- package/dist-ai/components/main.json +77 -0
- package/dist-ai/components/main.md +58 -0
- package/dist-ai/components/mention.json +598 -0
- package/dist-ai/components/mention.md +136 -0
- package/dist-ai/components/menu-item-group.json +101 -0
- package/dist-ai/components/menu-item-group.md +69 -0
- package/dist-ai/components/menu-item.json +131 -0
- package/dist-ai/components/menu-item.md +76 -0
- package/dist-ai/components/menu.json +314 -0
- package/dist-ai/components/menu.md +104 -0
- package/dist-ai/components/option-group.json +113 -0
- package/dist-ai/components/option-group.md +79 -0
- package/dist-ai/components/option.json +122 -0
- package/dist-ai/components/option.md +70 -0
- package/dist-ai/components/page-header.json +131 -0
- package/dist-ai/components/page-header.md +70 -0
- package/dist-ai/components/pagination.json +325 -0
- package/dist-ai/components/pagination.md +115 -0
- package/dist-ai/components/popconfirm.json +240 -0
- package/dist-ai/components/popconfirm.md +89 -0
- package/dist-ai/components/popover.json +351 -0
- package/dist-ai/components/popover.md +99 -0
- package/dist-ai/components/popper.json +93 -0
- package/dist-ai/components/popper.md +66 -0
- package/dist-ai/components/progress.json +219 -0
- package/dist-ai/components/progress.md +74 -0
- package/dist-ai/components/radio-button.json +142 -0
- package/dist-ai/components/radio-button.md +76 -0
- package/dist-ai/components/radio-group.json +219 -0
- package/dist-ai/components/radio-group.md +88 -0
- package/dist-ai/components/radio.json +177 -0
- package/dist-ai/components/radio.md +83 -0
- package/dist-ai/components/rate.json +286 -0
- package/dist-ai/components/rate.md +83 -0
- package/dist-ai/components/result.json +118 -0
- package/dist-ai/components/result.md +66 -0
- package/dist-ai/components/row.json +115 -0
- package/dist-ai/components/row.md +68 -0
- package/dist-ai/components/scrollbar.json +280 -0
- package/dist-ai/components/scrollbar.md +89 -0
- package/dist-ai/components/segmented.json +204 -0
- package/dist-ai/components/segmented.md +81 -0
- package/dist-ai/components/select-v2.json +729 -0
- package/dist-ai/components/select-v2.md +193 -0
- package/dist-ai/components/select.json +697 -0
- package/dist-ai/components/select.md +188 -0
- package/dist-ai/components/skeleton-item.json +80 -0
- package/dist-ai/components/skeleton-item.md +57 -0
- package/dist-ai/components/skeleton.json +134 -0
- package/dist-ai/components/skeleton.md +65 -0
- package/dist-ai/components/slider.json +326 -0
- package/dist-ai/components/slider.md +88 -0
- package/dist-ai/components/space.json +178 -0
- package/dist-ai/components/space.md +73 -0
- package/dist-ai/components/statistic.json +167 -0
- package/dist-ai/components/statistic.md +66 -0
- package/dist-ai/components/step.json +124 -0
- package/dist-ai/components/step.md +69 -0
- package/dist-ai/components/steps.json +157 -0
- package/dist-ai/components/steps.md +79 -0
- package/dist-ai/components/sub-menu.json +211 -0
- package/dist-ai/components/sub-menu.md +88 -0
- package/dist-ai/components/switch.json +292 -0
- package/dist-ai/components/switch.md +88 -0
- package/dist-ai/components/tab-pane.json +137 -0
- package/dist-ai/components/tab-pane.md +72 -0
- package/dist-ai/components/table-column.json +368 -0
- package/dist-ai/components/table-column.md +103 -0
- package/dist-ai/components/table-v2.json +486 -0
- package/dist-ai/components/table-v2.md +123 -0
- package/dist-ai/components/table.json +734 -0
- package/dist-ai/components/table.md +205 -0
- package/dist-ai/components/tabs.json +231 -0
- package/dist-ai/components/tabs.md +127 -0
- package/dist-ai/components/tag.json +205 -0
- package/dist-ai/components/tag.md +105 -0
- package/dist-ai/components/text.json +143 -0
- package/dist-ai/components/text.md +66 -0
- package/dist-ai/components/time-picker.json +555 -0
- package/dist-ai/components/time-picker.md +123 -0
- package/dist-ai/components/time-select.json +321 -0
- package/dist-ai/components/time-select.md +93 -0
- package/dist-ai/components/timeline-item.json +186 -0
- package/dist-ai/components/timeline-item.md +78 -0
- package/dist-ai/components/timeline.json +99 -0
- package/dist-ai/components/timeline.md +65 -0
- package/dist-ai/components/tooltip.json +599 -0
- package/dist-ai/components/tooltip.md +137 -0
- package/dist-ai/components/tour-step.json +219 -0
- package/dist-ai/components/tour-step.md +88 -0
- package/dist-ai/components/tour.json +258 -0
- package/dist-ai/components/tour.md +96 -0
- package/dist-ai/components/transfer.json +275 -0
- package/dist-ai/components/transfer.md +95 -0
- package/dist-ai/components/tree-select.json +945 -0
- package/dist-ai/components/tree-select.md +181 -0
- package/dist-ai/components/tree-v2.json +395 -0
- package/dist-ai/components/tree-v2.md +113 -0
- package/dist-ai/components/tree.json +485 -0
- package/dist-ai/components/tree.md +131 -0
- package/dist-ai/components/upload.json +382 -0
- package/dist-ai/components/upload.md +130 -0
- package/dist-ai/components/watermark.json +157 -0
- package/dist-ai/components/watermark.md +66 -0
- package/dist-ai/directives/click-outside.json +61 -0
- package/dist-ai/directives/click-outside.md +50 -0
- package/dist-ai/directives/infinite-scroll.json +83 -0
- package/dist-ai/directives/infinite-scroll.md +62 -0
- package/dist-ai/directives/loading.json +89 -0
- package/dist-ai/directives/loading.md +69 -0
- package/dist-ai/directives/mousewheel.json +54 -0
- package/dist-ai/directives/mousewheel.md +48 -0
- package/dist-ai/directives/repeat-click.json +68 -0
- package/dist-ai/directives/repeat-click.md +49 -0
- package/dist-ai/directives/trap-focus.json +46 -0
- package/dist-ai/directives/trap-focus.md +46 -0
- package/dist-ai/icons.json +1 -0
- package/dist-ai/index.json +1 -0
- package/dist-ai/llms.txt +170 -0
- package/dist-ai/manifest.json +26590 -0
- package/dist-ai/schema/manifest.schema.json +793 -0
- package/dist-ai/services/infinite-scroll.json +80 -0
- package/dist-ai/services/infinite-scroll.md +71 -0
- package/dist-ai/services/loading.json +108 -0
- package/dist-ai/services/loading.md +58 -0
- package/dist-ai/services/message-box.json +159 -0
- package/dist-ai/services/message-box.md +78 -0
- package/dist-ai/services/message.json +137 -0
- package/dist-ai/services/message.md +72 -0
- package/dist-ai/services/notification.json +136 -0
- package/dist-ai/services/notification.md +73 -0
- package/package.json +12 -2
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { defineComponent as
|
|
1
|
+
import { defineComponent as A, getCurrentInstance as P, computed as b, reactive as T, toRefs as k, toRef as N, watch as F, provide as I, onBeforeUnmount as j } from "vue";
|
|
2
2
|
import G from "../../directives/click-outside/index.js";
|
|
3
3
|
import { EpTooltip as B } from "../tooltip/index.js";
|
|
4
4
|
import { EpScrollbar as K } from "../scrollbar/index.js";
|
|
@@ -15,82 +15,80 @@ import { useProps as Z } from "../select-v2/src/useProps.js";
|
|
|
15
15
|
import $ from "./src/option.vue.js";
|
|
16
16
|
import ee from "./src/select-dropdown.vue.js";
|
|
17
17
|
import { useSelect as te } from "./src/useSelect.js";
|
|
18
|
-
import { selectKey as
|
|
19
|
-
import
|
|
20
|
-
import { selectEmits as
|
|
21
|
-
import
|
|
18
|
+
import { selectKey as re } from "./src/token.js";
|
|
19
|
+
import oe from "./src/options.js";
|
|
20
|
+
import { selectEmits as ne, selectProps as ae } from "./select.js";
|
|
21
|
+
import le from "./src/option-group.vue.js";
|
|
22
22
|
import { isArray as ie, isObject as E } from "@vue/shared";
|
|
23
|
-
const y = "EpSelect", m = /* @__PURE__ */ new WeakMap(), ce = (
|
|
24
|
-
var
|
|
25
|
-
const
|
|
26
|
-
if (!
|
|
23
|
+
const y = "EpSelect", m = /* @__PURE__ */ new WeakMap(), ce = (t) => (...o) => {
|
|
24
|
+
var u, s, p;
|
|
25
|
+
const a = o[0];
|
|
26
|
+
if (!a || a.includes(
|
|
27
27
|
'Slot "default" invoked outside of the render function'
|
|
28
|
-
) && ((
|
|
28
|
+
) && ((u = o[2]) != null && u.includes("ElTreeSelect") || (s = o[2]) != null && s.includes("EpTreeSelect")))
|
|
29
29
|
return;
|
|
30
|
-
const
|
|
31
|
-
if (
|
|
32
|
-
|
|
30
|
+
const l = (p = m.get(t)) == null ? void 0 : p.originalWarnHandler;
|
|
31
|
+
if (l) {
|
|
32
|
+
l(...o);
|
|
33
33
|
return;
|
|
34
34
|
}
|
|
35
|
-
console.warn(...
|
|
36
|
-
}, se = (
|
|
37
|
-
let
|
|
38
|
-
return
|
|
39
|
-
originalWarnHandler:
|
|
40
|
-
handler: ce(
|
|
35
|
+
console.warn(...o);
|
|
36
|
+
}, se = (t) => {
|
|
37
|
+
let o = m.get(t);
|
|
38
|
+
return o || (o = {
|
|
39
|
+
originalWarnHandler: t.config.warnHandler,
|
|
40
|
+
handler: ce(t),
|
|
41
41
|
count: 0
|
|
42
|
-
}, m.set(
|
|
43
|
-
},
|
|
42
|
+
}, m.set(t, o)), o;
|
|
43
|
+
}, xe = A({
|
|
44
44
|
name: y,
|
|
45
45
|
componentName: y,
|
|
46
46
|
components: {
|
|
47
47
|
ElSelectMenu: ee,
|
|
48
48
|
ElOption: $,
|
|
49
|
-
ElOptions:
|
|
50
|
-
ElOptionGroup:
|
|
49
|
+
ElOptions: oe,
|
|
50
|
+
ElOptionGroup: le,
|
|
51
51
|
ElTag: U,
|
|
52
52
|
ElScrollbar: K,
|
|
53
53
|
ElTooltip: B,
|
|
54
54
|
ElIcon: q
|
|
55
55
|
},
|
|
56
56
|
directives: { ClickOutside: G },
|
|
57
|
-
props:
|
|
58
|
-
emits:
|
|
59
|
-
setup(
|
|
60
|
-
const
|
|
61
|
-
|
|
57
|
+
props: ae,
|
|
58
|
+
emits: ne,
|
|
59
|
+
setup(t, { emit: o, slots: a }) {
|
|
60
|
+
const l = P(), u = se(l.appContext);
|
|
61
|
+
u.count += 1, l.appContext.config.warnHandler = u.handler;
|
|
62
62
|
const s = b(() => {
|
|
63
|
-
const { modelValue: e, multiple: i } =
|
|
64
|
-
return ie(e) ? i ? e :
|
|
65
|
-
}),
|
|
66
|
-
...k(
|
|
63
|
+
const { modelValue: e, multiple: i } = t, n = i ? [] : void 0;
|
|
64
|
+
return ie(e) ? i ? e : n : i ? n : e;
|
|
65
|
+
}), p = T({
|
|
66
|
+
...k(t),
|
|
67
67
|
modelValue: s
|
|
68
|
-
}),
|
|
69
|
-
floatLabel: N(
|
|
70
|
-
isFocused:
|
|
71
|
-
hasValue:
|
|
72
|
-
isDisabled:
|
|
68
|
+
}), r = te(p, o), { floatLabelClass: w } = Y({
|
|
69
|
+
floatLabel: N(t, "floatLabel"),
|
|
70
|
+
isFocused: r.isFocused,
|
|
71
|
+
hasValue: r.hasModelValue,
|
|
72
|
+
isDisabled: r.selectDisabled
|
|
73
73
|
}), { t: D } = J(), h = b(
|
|
74
|
-
() =>
|
|
75
|
-
), O = Q(), H = b(
|
|
76
|
-
()
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
}), S = (e) => e.reduce((i, r) => (i.push(r), r.children && r.children.length > 0 && i.push(...S(r.children)), i), []), A = (e) => {
|
|
82
|
-
z(e || []).forEach((r) => {
|
|
74
|
+
() => t.placeholder ?? D("el.select.placeholder")
|
|
75
|
+
), O = Q(), H = b(() => t.ariaLabelledby ? t.ariaLabelledby : t.floatLabel && h.value && !t.ariaLabel ? O.value : void 0), { calculatorRef: R, inputStyle: M } = X(), { getLabel: L, getValue: g, getOptions: V, getDisabled: v } = Z(t), W = (e) => ({
|
|
76
|
+
label: L(e),
|
|
77
|
+
value: g(e),
|
|
78
|
+
disabled: v(e)
|
|
79
|
+
}), S = (e) => e.reduce((i, n) => (i.push(n), n.children && n.children.length > 0 && i.push(...S(n.children)), i), []), x = (e) => {
|
|
80
|
+
z(e || []).forEach((n) => {
|
|
83
81
|
var C;
|
|
84
|
-
const d =
|
|
85
|
-
if (E(
|
|
82
|
+
const d = n.type.name;
|
|
83
|
+
if (E(n) && (d === "ElOption" || d === "ElTree" || d === "EpTree")) {
|
|
86
84
|
if (d === "ElTree" || d === "EpTree") {
|
|
87
|
-
const c = ((C =
|
|
85
|
+
const c = ((C = n.props) == null ? void 0 : C.data) || [];
|
|
88
86
|
S(c).forEach((f) => {
|
|
89
|
-
f.currentLabel = f.label ?? (E(f.value) ? "" : f.value),
|
|
87
|
+
f.currentLabel = f.label ?? (E(f.value) ? "" : f.value), r.onOptionCreate(f);
|
|
90
88
|
});
|
|
91
89
|
} else if (d === "ElOption") {
|
|
92
|
-
const c = { ...
|
|
93
|
-
c.currentLabel = c.label ?? (E(c.value) ? "" : c.value),
|
|
90
|
+
const c = { ...n.props };
|
|
91
|
+
c.currentLabel = c.label ?? (E(c.value) ? "" : c.value), r.onOptionCreate(c);
|
|
94
92
|
}
|
|
95
93
|
}
|
|
96
94
|
});
|
|
@@ -99,52 +97,52 @@ const y = "EpSelect", m = /* @__PURE__ */ new WeakMap(), ce = (o) => (...n) => {
|
|
|
99
97
|
() => {
|
|
100
98
|
var e;
|
|
101
99
|
return [
|
|
102
|
-
|
|
100
|
+
t.persistent || r.expanded.value || !a.default || (e = a.default) == null ? void 0 : e.call(a),
|
|
103
101
|
s.value
|
|
104
102
|
];
|
|
105
103
|
},
|
|
106
104
|
() => {
|
|
107
105
|
var e;
|
|
108
|
-
|
|
106
|
+
t.persistent || r.expanded.value || a.default && (r.states.options.clear(), x((e = a.default) == null ? void 0 : e.call(a)));
|
|
109
107
|
},
|
|
110
108
|
{
|
|
111
109
|
immediate: !0
|
|
112
110
|
}
|
|
113
111
|
), I(
|
|
114
|
-
|
|
112
|
+
re,
|
|
115
113
|
T({
|
|
116
|
-
props:
|
|
117
|
-
states:
|
|
118
|
-
selectRef:
|
|
119
|
-
optionsArray:
|
|
120
|
-
setSelected:
|
|
121
|
-
handleOptionSelect:
|
|
122
|
-
onOptionCreate:
|
|
123
|
-
onOptionDestroy:
|
|
114
|
+
props: p,
|
|
115
|
+
states: r.states,
|
|
116
|
+
selectRef: r.selectRef,
|
|
117
|
+
optionsArray: r.optionsArray,
|
|
118
|
+
setSelected: r.setSelected,
|
|
119
|
+
handleOptionSelect: r.handleOptionSelect,
|
|
120
|
+
onOptionCreate: r.onOptionCreate,
|
|
121
|
+
onOptionDestroy: r.onOptionDestroy
|
|
124
122
|
})
|
|
125
123
|
);
|
|
126
|
-
const
|
|
124
|
+
const _ = b(() => t.multiple ? r.states.selected.map((e) => e.currentLabel) : r.states.selectedLabel);
|
|
127
125
|
return j(() => {
|
|
128
|
-
const e = m.get(
|
|
129
|
-
e && (e.count -= 1, e.count <= 0 && (
|
|
126
|
+
const e = m.get(l.appContext);
|
|
127
|
+
e && (e.count -= 1, e.count <= 0 && (l.appContext.config.warnHandler = e.originalWarnHandler, m.delete(l.appContext)));
|
|
130
128
|
}), {
|
|
131
|
-
...
|
|
129
|
+
...r,
|
|
132
130
|
modelValue: s,
|
|
133
|
-
selectedLabel:
|
|
131
|
+
selectedLabel: _,
|
|
134
132
|
floatLabelClass: w,
|
|
135
133
|
floatLabelText: h,
|
|
136
134
|
floatLabelId: O,
|
|
137
|
-
|
|
135
|
+
ariaLabelledbyValue: H,
|
|
138
136
|
calculatorRef: R,
|
|
139
137
|
inputStyle: M,
|
|
140
|
-
getLabel:
|
|
141
|
-
getValue:
|
|
142
|
-
getOptions:
|
|
143
|
-
getDisabled:
|
|
144
|
-
getOptionProps:
|
|
138
|
+
getLabel: L,
|
|
139
|
+
getValue: g,
|
|
140
|
+
getOptions: V,
|
|
141
|
+
getDisabled: v,
|
|
142
|
+
getOptionProps: W
|
|
145
143
|
};
|
|
146
144
|
}
|
|
147
145
|
});
|
|
148
146
|
export {
|
|
149
|
-
|
|
147
|
+
xe as default
|
|
150
148
|
};
|
|
@@ -24,6 +24,7 @@ export interface TagTooltipProps {
|
|
|
24
24
|
}
|
|
25
25
|
export declare const selectV2Props: {
|
|
26
26
|
readonly ariaLabel: StringConstructor;
|
|
27
|
+
readonly ariaLabelledby: StringConstructor;
|
|
27
28
|
readonly emptyValues: ArrayConstructor;
|
|
28
29
|
readonly valueOnClear: import("../../../utils/index.js").EpPropFinalized<(new (...args: any[]) => string | number | boolean | Function) | (() => string | number | boolean | Function | null) | (((new (...args: any[]) => string | number | boolean | Function) | (() => string | number | boolean | Function | null)) | null)[], unknown, unknown, undefined, boolean>;
|
|
29
30
|
readonly floatLabel: import("../../../utils/index.js").EpPropFinalized<BooleanConstructor, unknown, unknown, false, boolean>;
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
declare const _default: import("vue").DefineComponent<import("vue").ExtractPropTypes<{
|
|
2
2
|
readonly ariaLabel: StringConstructor;
|
|
3
|
+
readonly ariaLabelledby: StringConstructor;
|
|
3
4
|
readonly emptyValues: ArrayConstructor;
|
|
4
5
|
readonly valueOnClear: import("../../../utils/index.js").EpPropFinalized<(new (...args: any[]) => string | number | boolean | Function) | (() => string | number | boolean | Function | null) | (((new (...args: any[]) => string | number | boolean | Function) | (() => string | number | boolean | Function | null)) | null)[], unknown, unknown, undefined, boolean>;
|
|
5
6
|
readonly floatLabel: import("../../../utils/index.js").EpPropFinalized<BooleanConstructor, unknown, unknown, false, boolean>;
|
|
@@ -201,7 +202,7 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
|
|
|
201
202
|
floatLabelClass: import("vue").ComputedRef<import("../../../hooks/index.js").FloatLabelClass>;
|
|
202
203
|
floatLabelText: import("vue").ComputedRef<string>;
|
|
203
204
|
floatLabelId: import("vue").Ref<string, string>;
|
|
204
|
-
|
|
205
|
+
ariaLabelledbyValue: import("vue").ComputedRef<string | undefined>;
|
|
205
206
|
calculatorRef: import("vue").ShallowRef<HTMLElement | undefined, HTMLElement | undefined>;
|
|
206
207
|
inputStyle: import("vue").ComputedRef<{
|
|
207
208
|
minWidth: string;
|
|
@@ -339,6 +340,7 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
|
|
|
339
340
|
clear: () => boolean;
|
|
340
341
|
}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
|
|
341
342
|
readonly ariaLabel: StringConstructor;
|
|
343
|
+
readonly ariaLabelledby: StringConstructor;
|
|
342
344
|
readonly emptyValues: ArrayConstructor;
|
|
343
345
|
readonly valueOnClear: import("../../../utils/index.js").EpPropFinalized<(new (...args: any[]) => string | number | boolean | Function) | (() => string | number | boolean | Function | null) | (((new (...args: any[]) => string | number | boolean | Function) | (() => string | number | boolean | Function | null)) | null)[], unknown, unknown, undefined, boolean>;
|
|
344
346
|
readonly floatLabel: import("../../../utils/index.js").EpPropFinalized<BooleanConstructor, unknown, unknown, false, boolean>;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import W from "./select2.vue.js";
|
|
2
|
-
import { resolveComponent as y, resolveDirective as Z, withDirectives as P, openBlock as s, createElementBlock as r, normalizeClass as o, createVNode as m, withCtx as i, createSlots as j, renderSlot as d, normalizeProps as q, guardReactiveProps as G, createElementVNode as n, withModifiers as p, toDisplayString as u, createCommentVNode as f, Fragment as
|
|
2
|
+
import { resolveComponent as y, resolveDirective as Z, withDirectives as P, openBlock as s, createElementBlock as r, normalizeClass as o, createVNode as m, withCtx as i, createSlots as j, renderSlot as d, normalizeProps as q, guardReactiveProps as G, createElementVNode as n, withModifiers as p, toDisplayString as u, createCommentVNode as f, Fragment as H, renderList as N, normalizeStyle as T, createTextVNode as A, createBlock as b, withKeys as v, resolveDynamicComponent as w, vShow as J } from "vue";
|
|
3
3
|
import Q from "../../../_virtual/_plugin-vue_export-helper.js";
|
|
4
4
|
const X = ["id"], Y = ["id", "value", "autocomplete", "tabindex", "aria-expanded", "aria-label", "aria-labelledby", "disabled", "aria-controls", "aria-activedescendant", "readonly", "name"], c = ["textContent"], x = { key: 1 };
|
|
5
5
|
function _(e, l, ee, le, oe, ae) {
|
|
@@ -7,8 +7,8 @@ function _(e, l, ee, le, oe, ae) {
|
|
|
7
7
|
return P((s(), r("div", {
|
|
8
8
|
ref: "selectRef",
|
|
9
9
|
class: o([e.nsSelect.b(), e.nsSelect.m(e.selectSize)]),
|
|
10
|
-
onMouseenter: l[15] || (l[15] = (
|
|
11
|
-
onMouseleave: l[16] || (l[16] = (
|
|
10
|
+
onMouseenter: l[15] || (l[15] = (g) => e.states.inputHovering = !0),
|
|
11
|
+
onMouseleave: l[16] || (l[16] = (g) => e.states.inputHovering = !1)
|
|
12
12
|
}, [
|
|
13
13
|
m(k, {
|
|
14
14
|
ref: "tooltipRef",
|
|
@@ -30,10 +30,10 @@ function _(e, l, ee, le, oe, ae) {
|
|
|
30
30
|
"show-arrow": e.showArrow,
|
|
31
31
|
offset: e.offset,
|
|
32
32
|
onBeforeShow: e.handleMenuEnter,
|
|
33
|
-
onHide: l[14] || (l[14] = (
|
|
33
|
+
onHide: l[14] || (l[14] = (g) => e.states.isBeforeHide = !1)
|
|
34
34
|
}, {
|
|
35
35
|
default: i(() => {
|
|
36
|
-
var
|
|
36
|
+
var g;
|
|
37
37
|
return [
|
|
38
38
|
n("div", {
|
|
39
39
|
ref: "wrapperRef",
|
|
@@ -76,7 +76,7 @@ function _(e, l, ee, le, oe, ae) {
|
|
|
76
76
|
}, () => {
|
|
77
77
|
var a, I, $, V, R, L, z, D, E, M, O, B, K;
|
|
78
78
|
return [
|
|
79
|
-
(s(!0), r(
|
|
79
|
+
(s(!0), r(H, null, N(e.showTagList, (t) => (s(), r("div", {
|
|
80
80
|
key: e.getValueKey(e.getValue(t)),
|
|
81
81
|
class: o(e.nsSelect.e("selected-item"))
|
|
82
82
|
}, [
|
|
@@ -98,14 +98,14 @@ function _(e, l, ee, le, oe, ae) {
|
|
|
98
98
|
label: e.getLabel(t),
|
|
99
99
|
value: e.getValue(t)
|
|
100
100
|
}, () => [
|
|
101
|
-
|
|
101
|
+
A(u(e.getLabel(t)), 1)
|
|
102
102
|
])
|
|
103
103
|
], 2)
|
|
104
104
|
]),
|
|
105
105
|
_: 2
|
|
106
106
|
}, 1032, ["closable", "size", "type", "effect", "style", "onClose"])
|
|
107
107
|
], 2))), 128)),
|
|
108
|
-
e.collapseTags && e.states.cachedOptions.length > e.maxCollapseTags ? (s(),
|
|
108
|
+
e.collapseTags && e.states.cachedOptions.length > e.maxCollapseTags ? (s(), b(k, {
|
|
109
109
|
key: 0,
|
|
110
110
|
ref: "tagTooltipRef",
|
|
111
111
|
disabled: e.dropdownMenuVisible || !e.collapseTagsTooltip,
|
|
@@ -155,7 +155,7 @@ function _(e, l, ee, le, oe, ae) {
|
|
|
155
155
|
ref: "tagMenuRef",
|
|
156
156
|
class: o(e.nsSelect.e("selection"))
|
|
157
157
|
}, [
|
|
158
|
-
(s(!0), r(
|
|
158
|
+
(s(!0), r(H, null, N(e.collapseTagList, (t) => (s(), r("div", {
|
|
159
159
|
key: e.getValueKey(e.getValue(t)),
|
|
160
160
|
class: o(e.nsSelect.e("selected-item"))
|
|
161
161
|
}, [
|
|
@@ -177,7 +177,7 @@ function _(e, l, ee, le, oe, ae) {
|
|
|
177
177
|
label: e.getLabel(t),
|
|
178
178
|
value: e.getValue(t)
|
|
179
179
|
}, () => [
|
|
180
|
-
|
|
180
|
+
A(u(e.getLabel(t)), 1)
|
|
181
181
|
])
|
|
182
182
|
], 2)
|
|
183
183
|
]),
|
|
@@ -212,7 +212,7 @@ function _(e, l, ee, le, oe, ae) {
|
|
|
212
212
|
autocapitalize: "off",
|
|
213
213
|
"aria-expanded": e.expanded,
|
|
214
214
|
"aria-label": e.ariaLabel,
|
|
215
|
-
"aria-labelledby": e.
|
|
215
|
+
"aria-labelledby": e.ariaLabelledbyValue,
|
|
216
216
|
class: o([e.nsSelect.e("input"), e.nsSelect.is(e.selectSize)]),
|
|
217
217
|
disabled: e.selectDisabled,
|
|
218
218
|
role: "combobox",
|
|
@@ -257,7 +257,7 @@ function _(e, l, ee, le, oe, ae) {
|
|
|
257
257
|
])
|
|
258
258
|
}, [
|
|
259
259
|
e.hasModelValue ? d(e.$slots, "label", {
|
|
260
|
-
index: ((
|
|
260
|
+
index: ((g = e.allOptionsValueMap.get(e.modelValue)) == null ? void 0 : g.index) ?? -1,
|
|
261
261
|
label: e.currentPlaceholder,
|
|
262
262
|
value: e.modelValue
|
|
263
263
|
}, () => [
|
|
@@ -269,18 +269,18 @@ function _(e, l, ee, le, oe, ae) {
|
|
|
269
269
|
ref: "suffixRef",
|
|
270
270
|
class: o(e.nsSelect.e("suffix"))
|
|
271
271
|
}, [
|
|
272
|
-
e.iconComponent ? P((s(),
|
|
272
|
+
e.iconComponent ? P((s(), b(h, {
|
|
273
273
|
key: 0,
|
|
274
274
|
class: o([e.nsSelect.e("caret"), e.nsInput.e("icon"), e.iconReverse])
|
|
275
275
|
}, {
|
|
276
276
|
default: i(() => [
|
|
277
|
-
(s(),
|
|
277
|
+
(s(), b(w(e.iconComponent)))
|
|
278
278
|
]),
|
|
279
279
|
_: 1
|
|
280
280
|
}, 8, ["class"])), [
|
|
281
281
|
[J, !e.showClearBtn]
|
|
282
282
|
]) : f("", !0),
|
|
283
|
-
e.showClearBtn && e.clearIcon ? (s(),
|
|
283
|
+
e.showClearBtn && e.clearIcon ? (s(), b(h, {
|
|
284
284
|
key: 1,
|
|
285
285
|
class: o([
|
|
286
286
|
e.nsSelect.e("caret"),
|
|
@@ -290,11 +290,11 @@ function _(e, l, ee, le, oe, ae) {
|
|
|
290
290
|
onClick: p(e.handleClear, ["prevent", "stop"])
|
|
291
291
|
}, {
|
|
292
292
|
default: i(() => [
|
|
293
|
-
(s(),
|
|
293
|
+
(s(), b(w(e.clearIcon)))
|
|
294
294
|
]),
|
|
295
295
|
_: 1
|
|
296
296
|
}, 8, ["class", "onClick"])) : f("", !0),
|
|
297
|
-
e.validateState && e.validateIcon && e.needStatusIcon ? (s(),
|
|
297
|
+
e.validateState && e.validateIcon && e.needStatusIcon ? (s(), b(h, {
|
|
298
298
|
key: 2,
|
|
299
299
|
class: o([
|
|
300
300
|
e.nsInput.e("icon"),
|
|
@@ -303,7 +303,7 @@ function _(e, l, ee, le, oe, ae) {
|
|
|
303
303
|
])
|
|
304
304
|
}, {
|
|
305
305
|
default: i(() => [
|
|
306
|
-
(s(),
|
|
306
|
+
(s(), b(w(e.validateIcon)))
|
|
307
307
|
]),
|
|
308
308
|
_: 1
|
|
309
309
|
}, 8, ["class"])) : f("", !0)
|
|
@@ -320,11 +320,11 @@ function _(e, l, ee, le, oe, ae) {
|
|
|
320
320
|
"hovering-index": e.states.hoveringIndex,
|
|
321
321
|
"scrollbar-always-on": e.scrollbarAlwaysOn,
|
|
322
322
|
"aria-label": e.ariaLabel,
|
|
323
|
-
"aria-labelledby": e.
|
|
323
|
+
"aria-labelledby": e.ariaLabelledbyValue,
|
|
324
324
|
onEndReached: e.onEndReached
|
|
325
325
|
}, j({
|
|
326
|
-
default: i((
|
|
327
|
-
d(e.$slots, "default", q(G(
|
|
326
|
+
default: i((g) => [
|
|
327
|
+
d(e.$slots, "default", q(G(g)))
|
|
328
328
|
]),
|
|
329
329
|
_: 2
|
|
330
330
|
}, [
|
|
@@ -1,21 +1,21 @@
|
|
|
1
|
-
import { defineComponent as
|
|
1
|
+
import { defineComponent as I, computed as l, reactive as m, toRefs as d, toRef as V, provide as h } from "vue";
|
|
2
2
|
import R from "../../../directives/click-outside/index.js";
|
|
3
3
|
import { EpTooltip as S } from "../../tooltip/index.js";
|
|
4
4
|
import { EpTag as g } from "../../tag/index.js";
|
|
5
5
|
import { EpIcon as T } from "../../icon/index.js";
|
|
6
6
|
import { useLocale as H } from "../../../hooks/use-locale/index.js";
|
|
7
|
-
import { useId as
|
|
7
|
+
import { useId as f } from "../../../hooks/use-id/index.js";
|
|
8
8
|
import "../../../hooks/use-size/index.js";
|
|
9
9
|
import "../../../hooks/use-aria/index.js";
|
|
10
10
|
import { useCalcInputWidth as K } from "../../../hooks/use-calc-input-width/index.js";
|
|
11
11
|
import { useFloatLabel as O } from "../../../hooks/use-float-label/index.js";
|
|
12
12
|
import x from "./select-dropdown.js";
|
|
13
|
-
import
|
|
14
|
-
import { selectV2Emits as
|
|
15
|
-
import { selectV2InjectionKey as
|
|
13
|
+
import C from "./useSelect.js";
|
|
14
|
+
import { selectV2Emits as D, selectV2Props as _ } from "./defaults.js";
|
|
15
|
+
import { selectV2InjectionKey as A } from "./token.js";
|
|
16
16
|
import { BORDER_HORIZONTAL_WIDTH as F } from "../../../constants/form.js";
|
|
17
17
|
import { isArray as M } from "@vue/shared";
|
|
18
|
-
const ee =
|
|
18
|
+
const ee = I({
|
|
19
19
|
name: "EpSelectV2",
|
|
20
20
|
components: {
|
|
21
21
|
ElSelectMenu: x,
|
|
@@ -24,54 +24,52 @@ const ee = h({
|
|
|
24
24
|
ElIcon: T
|
|
25
25
|
},
|
|
26
26
|
directives: { ClickOutside: R },
|
|
27
|
-
props:
|
|
28
|
-
emits:
|
|
29
|
-
setup(
|
|
27
|
+
props: _,
|
|
28
|
+
emits: D,
|
|
29
|
+
setup(t, { emit: u }) {
|
|
30
30
|
const a = l(() => {
|
|
31
|
-
const { modelValue:
|
|
32
|
-
return M(
|
|
33
|
-
}), e =
|
|
31
|
+
const { modelValue: o, multiple: r } = t, s = r ? [] : void 0;
|
|
32
|
+
return M(o) ? r ? o : s : r ? s : o;
|
|
33
|
+
}), e = C(
|
|
34
34
|
m({
|
|
35
|
-
...
|
|
35
|
+
...d(t),
|
|
36
36
|
modelValue: a
|
|
37
37
|
}),
|
|
38
|
-
|
|
39
|
-
), { floatLabelClass:
|
|
40
|
-
floatLabel: V(
|
|
38
|
+
u
|
|
39
|
+
), { floatLabelClass: p } = O({
|
|
40
|
+
floatLabel: V(t, "floatLabel"),
|
|
41
41
|
isFocused: e.isFocused,
|
|
42
42
|
hasValue: e.hasModelValue,
|
|
43
43
|
isDisabled: e.selectDisabled
|
|
44
44
|
}), { t: b } = H(), i = l(
|
|
45
|
-
() =>
|
|
46
|
-
), c =
|
|
47
|
-
|
|
48
|
-
), { calculatorRef: v, inputStyle: E } = K(), s = d();
|
|
49
|
-
y(_, {
|
|
45
|
+
() => t.placeholder ?? b("el.select.placeholder")
|
|
46
|
+
), c = f(), L = l(() => t.ariaLabelledby ? t.ariaLabelledby : t.floatLabel && i.value && !t.ariaLabel ? c.value : void 0), { calculatorRef: v, inputStyle: y } = K(), n = f();
|
|
47
|
+
h(A, {
|
|
50
48
|
props: m({
|
|
51
|
-
...
|
|
49
|
+
...d(t),
|
|
52
50
|
height: e.popupHeight,
|
|
53
51
|
modelValue: a
|
|
54
52
|
}),
|
|
55
53
|
expanded: e.expanded,
|
|
56
54
|
tooltipRef: e.tooltipRef,
|
|
57
|
-
contentId:
|
|
55
|
+
contentId: n,
|
|
58
56
|
onSelect: e.onSelect,
|
|
59
57
|
onHover: e.onHover,
|
|
60
58
|
onKeyboardNavigate: e.onKeyboardNavigate,
|
|
61
59
|
onKeyboardSelect: e.onKeyboardSelect
|
|
62
60
|
});
|
|
63
|
-
const
|
|
61
|
+
const E = l(() => t.multiple ? e.states.cachedOptions.map((o) => e.getLabel(o)) : e.states.selectedLabel);
|
|
64
62
|
return {
|
|
65
63
|
...e,
|
|
66
64
|
modelValue: a,
|
|
67
|
-
selectedLabel:
|
|
68
|
-
floatLabelClass:
|
|
65
|
+
selectedLabel: E,
|
|
66
|
+
floatLabelClass: p,
|
|
69
67
|
floatLabelText: i,
|
|
70
68
|
floatLabelId: c,
|
|
71
|
-
|
|
69
|
+
ariaLabelledbyValue: L,
|
|
72
70
|
calculatorRef: v,
|
|
73
|
-
inputStyle:
|
|
74
|
-
contentId:
|
|
71
|
+
inputStyle: y,
|
|
72
|
+
contentId: n,
|
|
75
73
|
BORDER_HORIZONTAL_WIDTH: F
|
|
76
74
|
};
|
|
77
75
|
}
|
|
@@ -88,6 +88,7 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
|
|
|
88
88
|
__epPropKey: true;
|
|
89
89
|
};
|
|
90
90
|
ariaLabel: StringConstructor;
|
|
91
|
+
ariaLabelledby: StringConstructor;
|
|
91
92
|
emptyValues: ArrayConstructor;
|
|
92
93
|
valueOnClear: import("../../../utils/index.js").EpPropFinalized<(new (...args: any[]) => string | number | boolean | Function) | (() => string | number | boolean | Function | null) | (((new (...args: any[]) => string | number | boolean | Function) | (() => string | number | boolean | Function | null)) | null)[], unknown, unknown, undefined, boolean>;
|
|
93
94
|
floatLabel: import("../../../utils/index.js").EpPropFinalized<BooleanConstructor, unknown, unknown, false, boolean>;
|
|
@@ -266,6 +267,7 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
|
|
|
266
267
|
__epPropKey: true;
|
|
267
268
|
};
|
|
268
269
|
ariaLabel: StringConstructor;
|
|
270
|
+
ariaLabelledby: StringConstructor;
|
|
269
271
|
emptyValues: ArrayConstructor;
|
|
270
272
|
valueOnClear: import("../../../utils/index.js").EpPropFinalized<(new (...args: any[]) => string | number | boolean | Function) | (() => string | number | boolean | Function | null) | (((new (...args: any[]) => string | number | boolean | Function) | (() => string | number | boolean | Function | null)) | null)[], unknown, unknown, undefined, boolean>;
|
|
271
273
|
floatLabel: import("../../../utils/index.js").EpPropFinalized<BooleanConstructor, unknown, unknown, false, boolean>;
|