@pantograph/vue 0.32.6 → 0.32.8
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/ColorPicker/index.js +2 -2
- package/dist/ColorPicker/index.umd.cjs +1 -1
- package/dist/{ColorPicker.vue_vue_type_style_index_0_lang-ngeRTae-.js → ColorPicker.vue_vue_type_style_index_0_lang-DvAxADqR.js} +1 -1
- package/dist/{ColorPicker.vue_vue_type_style_index_0_lang-BrT753B_.js → ColorPicker.vue_vue_type_style_index_0_lang-gWF4xfyP.js} +1 -1
- package/dist/ColorSwatchGroup/index.js +1 -1
- package/dist/ColorSwatchGroup/index.umd.cjs +1 -1
- package/dist/{ColorSwatchGroup.vue_vue_type_style_index_0_lang-_pCAmZ53.js → ColorSwatchGroup.vue_vue_type_style_index_0_lang-CnQvvL-b.js} +1 -1
- package/dist/{ColorSwatchGroup.vue_vue_type_style_index_0_lang-B4PdDPjL.js → ColorSwatchGroup.vue_vue_type_style_index_0_lang-D8rV769l.js} +1 -1
- package/dist/Combobox/Combobox.d.ts +3 -0
- package/dist/Combobox/context.d.ts +1 -0
- package/dist/Combobox/index.js +555 -542
- package/dist/Combobox/index.umd.cjs +1 -1
- package/dist/Comment/CommentMention.d.ts +8 -2
- package/dist/Comment/index.js +1 -0
- package/dist/Comment/index.umd.cjs +1 -1
- package/dist/Dialog/index.js +1 -1
- package/dist/Dialog/index.umd.cjs +1 -1
- package/dist/Drawer/index.js +9 -9
- package/dist/Drawer/index.umd.cjs +1 -1
- package/dist/GOPicker/index.js +1 -1
- package/dist/GOPicker/index.umd.cjs +1 -1
- package/dist/HoverCard/index.js +3 -2
- package/dist/HoverCard/index.umd.cjs +1 -1
- package/dist/Modal/index.js +10 -10
- package/dist/Modal/index.umd.cjs +1 -1
- package/dist/Popover/index.js +3 -2
- package/dist/Popover/index.umd.cjs +1 -1
- package/dist/Popover/type.d.ts +5 -0
- package/dist/Select/index.js +2 -2
- package/dist/Select/index.umd.cjs +1 -1
- package/dist/{Select.vue_vue_type_style_index_0_lang-BmCg9S_L.js → Select.vue_vue_type_style_index_0_lang-BDpLxikv.js} +1 -1
- package/dist/{Select.vue_vue_type_style_index_0_lang-BLHjk2Iy.js → Select.vue_vue_type_style_index_0_lang-Cdkv9Op4.js} +1 -1
- package/dist/Tree/Tree.model.d.ts +6 -0
- package/dist/Tree/index.js +1 -1
- package/dist/Tree/index.umd.cjs +1 -1
- package/dist/{index-BuEiTBIH.js → index-BxsIulsm.js} +73 -68
- package/dist/index-DUdWKbz1.js +1 -0
- package/dist/index.js +5 -5
- package/dist/index.umd.cjs +1 -1
- package/dist/style/index.css +1 -1
- package/dist/use/index.js +6 -6
- package/dist/use/index.umd.cjs +1 -1
- package/dist/utils-gUPbDQWf.js +1 -0
- package/dist/{utils-ktMrldiH.js → utils-mW_Rw1i9.js} +16 -15
- package/package.json +1 -1
- package/dist/index-B2rTP8gs.js +0 -1
- package/dist/utils-CCymYPFY.js +0 -1
package/dist/Combobox/index.js
CHANGED
|
@@ -1,39 +1,39 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import { createContext as
|
|
3
|
-
import { omit as
|
|
4
|
-
import { isEmptyElement as
|
|
5
|
-
import { getBemBlock as
|
|
6
|
-
import { Popover as
|
|
7
|
-
import { cva as
|
|
1
|
+
import { defineComponent as _e, useSlots as mt, onBeforeUnmount as Wt, computed as C, createBlock as $, openBlock as w, unref as s, mergeProps as ce, withModifiers as Ut, createSlots as Gt, renderList as Ue, withCtx as K, renderSlot as Me, normalizeProps as Re, guardReactiveProps as Ne, createVNode as ee, h, useAttrs as Ht, createElementBlock as he, normalizeClass as ze, toDisplayString as qt, ref as ue, watch as Jt, isRef as rt, createCommentVNode as $e, createElementVNode as st, normalizeStyle as Qt, Fragment as je } from "vue";
|
|
2
|
+
import { createContext as Xt, Slot as Yt, useEmitAsProps as Zt } from "reka-ui";
|
|
3
|
+
import { omit as be, isString as it, cloneDeep as re, isFunction as eo, debounce as ut, pick as to, last as ct } from "es-toolkit";
|
|
4
|
+
import { isEmptyElement as N, useVModel as we, useLazyLoading as oo, useFormInput as lo, useVirtualScroll as no, useInputDataStates as ao, useCollection as ro, useDisableBodyPointerEvents as so, installComponent as ft } from "@pantograph/utils-vue";
|
|
5
|
+
import { getBemBlock as io, getBemModifier as uo, getBemElement as S, getComponentOptions as Ce, normCls as U, isEmptyLikeLodash as j, generateVariantClassList as Q, createOptionGetterFunc as J, usePCId as Fe, getPxSize as Ke, getComponentName as vt } from "@pantograph/utils";
|
|
6
|
+
import { Popover as co } from "../Popover/index.js";
|
|
7
|
+
import { cva as yt } from "class-variance-authority";
|
|
8
8
|
import "../Icon/index.js";
|
|
9
9
|
import "../Avatar/index.js";
|
|
10
10
|
import "../GraphicalObject/index.js";
|
|
11
|
-
import { a as
|
|
12
|
-
import { GraphicalObjectGroup as
|
|
13
|
-
import { _ as
|
|
14
|
-
import { _ as
|
|
11
|
+
import { a as po, _ as ht } from "../Avatar.vue_vue_type_style_index_0_lang-BBeWgKUx.js";
|
|
12
|
+
import { GraphicalObjectGroup as go } from "../GraphicalObjectGroup/index.js";
|
|
13
|
+
import { _ as mo } from "../index-BhaFiUPP.js";
|
|
14
|
+
import { _ as fo } from "../Chip.vue_vue_type_style_index_0_lang-fj2q-7So.js";
|
|
15
15
|
import "../Input/index.js";
|
|
16
|
-
import {
|
|
17
|
-
import { _ as
|
|
18
|
-
import {
|
|
19
|
-
import { g as go, a as mo } from "../Menu.vue_vue_type_style_index_0_lang-bwzZdsoD.js";
|
|
16
|
+
import { _ as vo } from "../Input.vue_vue_type_script_setup_true_lang-Ga_3LDxv.js";
|
|
17
|
+
import { _ as Ge } from "../Icon.vue_vue_type_style_index_0_lang-D3lvOgux.js";
|
|
18
|
+
import { g as yo, a as ho } from "../Menu.vue_vue_type_style_index_0_lang-bwzZdsoD.js";
|
|
20
19
|
import { i as X } from "../isArray-QlWcxgml.js";
|
|
21
|
-
import { _ as
|
|
20
|
+
import { _ as bt } from "../GraphicalObject.vue_vue_type_script_setup_true_lang-BC9GfN2v.js";
|
|
22
21
|
import "../ScrollContainer/index.js";
|
|
23
22
|
import "../Empty/index.js";
|
|
24
|
-
import { f as
|
|
23
|
+
import { f as bo, _ as _o, a as Co } from "../index-BxsIulsm.js";
|
|
25
24
|
import "../MenuItem/index.js";
|
|
26
25
|
import "../Checkbox/index.js";
|
|
27
|
-
import { _ as
|
|
28
|
-
import { _ as
|
|
29
|
-
import { _ as
|
|
30
|
-
import { a as
|
|
31
|
-
import {
|
|
32
|
-
import {
|
|
33
|
-
import {
|
|
34
|
-
import { _ as
|
|
35
|
-
|
|
36
|
-
|
|
26
|
+
import { _ as So } from "../Checkbox.vue_vue_type_style_index_0_lang-B1Y8EoU2.js";
|
|
27
|
+
import { _ as ko } from "../Skeleton.vue_vue_type_style_index_0_lang-aI8FTL_w.js";
|
|
28
|
+
import { _ as xo } from "../Divider.vue_vue_type_style_index_0_lang-eXMD78c3.js";
|
|
29
|
+
import { a as pt } from "../index-D2tZoezA.js";
|
|
30
|
+
import { refDebounced as Oo } from "@vueuse/core";
|
|
31
|
+
import { useConfig as Bo } from "../ConfigProvider/index.js";
|
|
32
|
+
import { h as dt } from "../head-E4xQy0iK.js";
|
|
33
|
+
import { _ as Po } from "../ScrollContainer.vue_vue_type_style_index_0_lang-DGrpXPJ1.js";
|
|
34
|
+
import { _ as Io } from "../Empty.vue_vue_type_style_index_0_lang-yTn4EQKn.js";
|
|
35
|
+
const [He, To] = Xt("Combobox"), P = io("combobox"), _t = uo(P, "value-placeholder"), We = S(P, "option"), Ct = ["sm", "md", "lg"], wo = ["error", "warning", "success"], qe = /* @__PURE__ */ _e({
|
|
36
|
+
...Ce("ComboboxInput"),
|
|
37
37
|
__name: "ComboboxInput",
|
|
38
38
|
props: {
|
|
39
39
|
id: {},
|
|
@@ -62,39 +62,42 @@ const [Fe, xo] = Gt("Combobox"), P = oo("combobox"), ft = lo(P, "value-placehold
|
|
|
62
62
|
status: {},
|
|
63
63
|
steps: { type: Boolean }
|
|
64
64
|
},
|
|
65
|
-
setup(
|
|
66
|
-
const t =
|
|
67
|
-
|
|
65
|
+
setup(O) {
|
|
66
|
+
const t = O, c = mt(), o = He();
|
|
67
|
+
Wt(() => {
|
|
68
68
|
o.comboboxInputFocused.value = !1;
|
|
69
69
|
});
|
|
70
|
-
const
|
|
71
|
-
const
|
|
72
|
-
return (o.props.headerSearch ?
|
|
73
|
-
}),
|
|
74
|
-
|
|
75
|
-
|
|
70
|
+
const b = C(() => {
|
|
71
|
+
const p = t.placeholder ?? o.props.placeholder ?? "";
|
|
72
|
+
return (o.props.headerSearch ? p : o.placeholder.value) ?? p;
|
|
73
|
+
}), G = (p) => {
|
|
74
|
+
o.props.headerSearch && (p.stopPropagation(), p.preventDefault());
|
|
75
|
+
}, H = S(P, "input");
|
|
76
|
+
return (p, x) => (w(), $(s(vo), ce({
|
|
77
|
+
...s(o).comboboxInputBinding.value,
|
|
76
78
|
...t,
|
|
77
|
-
disabled:
|
|
79
|
+
disabled: s(o).getDisabled.value || t.disabled
|
|
78
80
|
}, {
|
|
79
|
-
placeholder:
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
81
|
+
placeholder: b.value,
|
|
82
|
+
onClick: G,
|
|
83
|
+
onKeydown: Ut(s(o).onKeyDown, ["stop"]),
|
|
84
|
+
ref: s(o).inputRef,
|
|
85
|
+
class: s(U)(s(H), { [s(_t)]: s(o).valuePlaceholder.value }, t.class),
|
|
86
|
+
contentFit: !s(o).props.headerSearch && s(o).props.contentFit,
|
|
87
|
+
modelValue: s(o).searchModel.value,
|
|
88
|
+
"onUpdate:modelValue": x[0] || (x[0] = (d) => s(o).searchModel.value = d)
|
|
89
|
+
}), Gt({ _: 2 }, [
|
|
90
|
+
Ue(Object.keys(s(be)(c, ["leading"])), (d) => ({
|
|
88
91
|
name: d,
|
|
89
|
-
fn:
|
|
90
|
-
|
|
92
|
+
fn: K((a) => [
|
|
93
|
+
Me(p.$slots, d, Re(Ne(a)))
|
|
91
94
|
])
|
|
92
95
|
})),
|
|
93
|
-
|
|
96
|
+
s(o).props.headerSearch ? {
|
|
94
97
|
name: "leading",
|
|
95
|
-
fn:
|
|
96
|
-
|
|
97
|
-
ee(
|
|
98
|
+
fn: K((d) => [
|
|
99
|
+
Me(p.$slots, "leading", Re(Ne(d)), () => [
|
|
100
|
+
ee(s(Ge), {
|
|
98
101
|
size: d.iconSize,
|
|
99
102
|
icon: "tabler:search",
|
|
100
103
|
flipOnDir: "rtl"
|
|
@@ -104,19 +107,19 @@ const [Fe, xo] = Gt("Combobox"), P = oo("combobox"), ft = lo(P, "value-placehold
|
|
|
104
107
|
key: "0"
|
|
105
108
|
} : {
|
|
106
109
|
name: "leading",
|
|
107
|
-
fn:
|
|
108
|
-
|
|
110
|
+
fn: K((d) => [
|
|
111
|
+
Me(p.$slots, "leading", Re(Ne(d)))
|
|
109
112
|
]),
|
|
110
113
|
key: "1"
|
|
111
114
|
}
|
|
112
115
|
]), 1040, ["placeholder", "onKeydown", "class", "contentFit", "modelValue"]));
|
|
113
116
|
}
|
|
114
|
-
}),
|
|
115
|
-
...
|
|
117
|
+
}), zo = /* @__PURE__ */ _e({
|
|
118
|
+
...Ce("ComboboxTrigger"),
|
|
116
119
|
__name: "ComboboxTrigger",
|
|
117
|
-
setup(
|
|
118
|
-
const t =
|
|
119
|
-
|
|
120
|
+
setup(O) {
|
|
121
|
+
const t = He(), c = ({ value: u }) => {
|
|
122
|
+
u && X(t.model.value) && !t.getDisabled.value && (t.model.value = t.model.value.filter((_) => _ !== u));
|
|
120
123
|
}, o = C(() => {
|
|
121
124
|
switch (t.getSize.value) {
|
|
122
125
|
case "sm":
|
|
@@ -125,37 +128,37 @@ const [Fe, xo] = Gt("Combobox"), P = oo("combobox"), ft = lo(P, "value-placehold
|
|
|
125
128
|
default:
|
|
126
129
|
return "xsm";
|
|
127
130
|
}
|
|
128
|
-
}),
|
|
129
|
-
if (!t.props.multiple &&
|
|
131
|
+
}), b = C(() => {
|
|
132
|
+
if (!t.props.multiple && it(t.model.value) && !j(t.model.value))
|
|
130
133
|
return t.getOptionByValue(t.model.value);
|
|
131
|
-
}),
|
|
132
|
-
if (t.props.selectedItemIconAsTrailingIcon && (
|
|
133
|
-
return
|
|
134
|
-
},
|
|
134
|
+
}), G = (u = b.value) => {
|
|
135
|
+
if (t.props.selectedItemIconAsTrailingIcon && (u != null && u._icon))
|
|
136
|
+
return u._icon;
|
|
137
|
+
}, H = C(() => G()), p = C(() => {
|
|
135
138
|
if (!t.props.noTrailing)
|
|
136
139
|
return t.props.trailingIcon ?? "tabler:chevron-down";
|
|
137
|
-
}),
|
|
138
|
-
var
|
|
139
|
-
const
|
|
140
|
+
}), x = C(() => {
|
|
141
|
+
var y, f;
|
|
142
|
+
const u = re(t.model.value), _ = X(t.model.value);
|
|
140
143
|
return {
|
|
141
|
-
modelValue:
|
|
144
|
+
modelValue: u,
|
|
142
145
|
open: re(t.openModel.value),
|
|
143
146
|
option: _ ? void 0 : t.getOptionByValue(t.model.value),
|
|
144
|
-
options: _ ? (f = (
|
|
147
|
+
options: _ ? (f = (y = t.model.value).map) == null ? void 0 : f.call(y, t.getOptionByValue).filter(Boolean) : void 0
|
|
145
148
|
};
|
|
146
|
-
}),
|
|
147
|
-
...
|
|
148
|
-
option: t.getOptionByValue(
|
|
149
|
-
}),
|
|
149
|
+
}), d = (u) => ({
|
|
150
|
+
...x.value,
|
|
151
|
+
option: t.getOptionByValue(u)
|
|
152
|
+
}), a = S(P, "trigger"), F = yt(a, {
|
|
150
153
|
variants: {
|
|
151
|
-
size: Q(
|
|
152
|
-
headerSearch: Q("header-search",
|
|
153
|
-
status: Q(
|
|
154
|
-
bordered: Q("bordered",
|
|
155
|
-
multiple: Q("multiple",
|
|
156
|
-
contentFit: Q("content-fit",
|
|
157
|
-
wrapped: Q("wrapped",
|
|
158
|
-
filled: Q("filled",
|
|
154
|
+
size: Q(Ct, a),
|
|
155
|
+
headerSearch: Q("header-search", a),
|
|
156
|
+
status: Q(wo, a),
|
|
157
|
+
bordered: Q("bordered", a),
|
|
158
|
+
multiple: Q("multiple", a),
|
|
159
|
+
contentFit: Q("content-fit", a),
|
|
160
|
+
wrapped: Q("wrapped", a),
|
|
161
|
+
filled: Q("filled", a)
|
|
159
162
|
}
|
|
160
163
|
}), Y = C(() => ({
|
|
161
164
|
type: "button",
|
|
@@ -167,96 +170,97 @@ const [Fe, xo] = Gt("Combobox"), P = oo("combobox"), ft = lo(P, "value-placehold
|
|
|
167
170
|
"aria-haspopup": "listbox",
|
|
168
171
|
"aria-expanded": t.openModel.value,
|
|
169
172
|
"data-state": t.openModel.value ? "open" : "closed",
|
|
170
|
-
|
|
173
|
+
ref: t.triggerRef,
|
|
174
|
+
class: U(
|
|
171
175
|
F({
|
|
172
176
|
size: t.getSize.value,
|
|
173
|
-
status: t.getStatus.value === "success" &&
|
|
177
|
+
status: t.getStatus.value === "success" && j(t.model.value) ? void 0 : t.getStatus.value,
|
|
174
178
|
bordered: t.props.bordered,
|
|
175
179
|
multiple: t.props.multiple,
|
|
176
180
|
contentFit: t.props.contentFit,
|
|
177
181
|
wrapped: t.props.wrapped,
|
|
178
|
-
filled: !
|
|
182
|
+
filled: !j(t.model.value),
|
|
179
183
|
headerSearch: t.props.headerSearch
|
|
180
184
|
}),
|
|
181
185
|
t.props.triggerCls
|
|
182
186
|
),
|
|
183
187
|
...t.comboboxTriggerBinding.value
|
|
184
|
-
})), m = (
|
|
185
|
-
var
|
|
186
|
-
let
|
|
187
|
-
const _ = (f = (
|
|
188
|
-
|
|
189
|
-
|
|
188
|
+
})), m = (u, _ = o.value) => h(Ge, { icon: u, size: _ }), se = () => {
|
|
189
|
+
var y, f;
|
|
190
|
+
let u;
|
|
191
|
+
const _ = (f = (y = t.slots).triggerTrailing) == null ? void 0 : f.call(
|
|
192
|
+
y,
|
|
193
|
+
x.value
|
|
190
194
|
);
|
|
191
|
-
if (
|
|
192
|
-
else if (
|
|
193
|
-
const
|
|
194
|
-
|
|
195
|
+
if (!N(_)) u = _;
|
|
196
|
+
else if (p.value && p.value) {
|
|
197
|
+
const V = p.value === !0 ? "tabler:chevron-down" : p.value;
|
|
198
|
+
u = m(V);
|
|
195
199
|
}
|
|
196
|
-
if (
|
|
197
|
-
return
|
|
200
|
+
if (u)
|
|
201
|
+
return h(
|
|
198
202
|
"div",
|
|
199
|
-
{ class:
|
|
200
|
-
|
|
203
|
+
{ class: U(S(a, "trailing"), t.props.triggerTrailingCls) },
|
|
204
|
+
u
|
|
201
205
|
);
|
|
202
|
-
}, te = (
|
|
203
|
-
var
|
|
204
|
-
const _ = t.getOptionByValue(
|
|
205
|
-
return
|
|
206
|
+
}, te = (u) => {
|
|
207
|
+
var y, f;
|
|
208
|
+
const _ = t.getOptionByValue(u) ?? { _key: u };
|
|
209
|
+
return h(ht, {
|
|
206
210
|
size: t.getTagSize.value,
|
|
207
|
-
..._ ? ((f = (
|
|
211
|
+
..._ ? ((f = (y = t.props).getTagProps) == null ? void 0 : f.call(y, _)) ?? {} : {}
|
|
208
212
|
});
|
|
209
|
-
}, pe = (
|
|
210
|
-
var
|
|
211
|
-
const _ = t.getOptionByValue(
|
|
212
|
-
return
|
|
213
|
-
..._ ? ((f = (
|
|
213
|
+
}, pe = (u) => {
|
|
214
|
+
var y, f;
|
|
215
|
+
const _ = t.getOptionByValue(u) ?? { _key: u };
|
|
216
|
+
return h(bt, {
|
|
217
|
+
..._ ? ((f = (y = t.props).getTagProps) == null ? void 0 : f.call(y, _)) ?? {} : {},
|
|
214
218
|
size: t.getTagSize.value
|
|
215
219
|
});
|
|
216
|
-
},
|
|
220
|
+
}, Se = () => {
|
|
217
221
|
const _ = (() => {
|
|
218
|
-
var
|
|
222
|
+
var y, f;
|
|
219
223
|
if (!t.props.multiple && !X(t.model.value) && t.model.value) {
|
|
220
|
-
let
|
|
221
|
-
|
|
222
|
-
const q =
|
|
223
|
-
|
|
224
|
-
|
|
224
|
+
let V;
|
|
225
|
+
it(t.model.value) && !j(t.model.value) && (V = t.model.value);
|
|
226
|
+
const q = V ? (f = (y = t.slots).optionLeading) == null ? void 0 : f.call(
|
|
227
|
+
y,
|
|
228
|
+
yo(
|
|
225
229
|
t.props.size,
|
|
226
|
-
|
|
230
|
+
d(V)
|
|
227
231
|
)
|
|
228
|
-
) : null, Z =
|
|
229
|
-
if (Z || t.props.tagRenderMode && ["avatar", "go"].includes(t.props.tagRenderMode) ||
|
|
230
|
-
let
|
|
231
|
-
if (Z ?
|
|
232
|
-
return
|
|
232
|
+
) : null, Z = !N(q);
|
|
233
|
+
if (Z || t.props.tagRenderMode && ["avatar", "go"].includes(t.props.tagRenderMode) || H.value || t.props.leadingIcon) {
|
|
234
|
+
let L;
|
|
235
|
+
if (Z ? L = q : t.props.tagRenderMode === "avatar" ? L = te(t.model.value) : t.props.tagRenderMode === "go" ? L = pe(t.model.value) : H.value ? L = m(H.value) : t.props.leadingIcon && (L = m(t.props.leadingIcon)), !N(L))
|
|
236
|
+
return L;
|
|
233
237
|
}
|
|
234
238
|
}
|
|
235
239
|
return null;
|
|
236
240
|
})();
|
|
237
|
-
return
|
|
241
|
+
return h(
|
|
238
242
|
"div",
|
|
239
243
|
{
|
|
240
|
-
class:
|
|
241
|
-
style:
|
|
244
|
+
class: U(S(a, "leading"), t.props.triggerLeadingCls),
|
|
245
|
+
style: N(_) ? { display: "none" } : void 0
|
|
242
246
|
},
|
|
243
247
|
_
|
|
244
248
|
);
|
|
245
249
|
}, de = () => {
|
|
246
|
-
var Z,
|
|
247
|
-
const
|
|
248
|
-
if (
|
|
249
|
-
return
|
|
250
|
-
const
|
|
250
|
+
var Z, L;
|
|
251
|
+
const u = (L = (Z = t.slots).trigger) == null ? void 0 : L.call(Z, x.value);
|
|
252
|
+
if (!N(u))
|
|
253
|
+
return h(Yt, be(Y.value, ["class"]), () => u);
|
|
254
|
+
const y = () => {
|
|
251
255
|
const z = [], oe = [
|
|
252
|
-
S(
|
|
256
|
+
S(a, "tags"),
|
|
253
257
|
t.props.triggerContentCls,
|
|
254
258
|
t.props.triggerContentValueCls
|
|
255
|
-
],
|
|
259
|
+
], E = (() => {
|
|
256
260
|
if (t.props.multiple && X(t.model.value)) {
|
|
257
261
|
if (t.props.tagRenderMode === "avatar")
|
|
258
|
-
return
|
|
259
|
-
|
|
262
|
+
return h(
|
|
263
|
+
po,
|
|
260
264
|
{
|
|
261
265
|
maxCount: t.props.maxCount,
|
|
262
266
|
size: t.getTagSize.value,
|
|
@@ -268,8 +272,8 @@ const [Fe, xo] = Gt("Combobox"), P = oo("combobox"), ft = lo(P, "value-placehold
|
|
|
268
272
|
() => t.model.value.map(te)
|
|
269
273
|
);
|
|
270
274
|
if (t.props.tagRenderMode === "go")
|
|
271
|
-
return
|
|
272
|
-
|
|
275
|
+
return h(
|
|
276
|
+
go,
|
|
273
277
|
{
|
|
274
278
|
maxCount: t.props.maxCount,
|
|
275
279
|
size: t.getTagSize.value,
|
|
@@ -281,8 +285,8 @@ const [Fe, xo] = Gt("Combobox"), P = oo("combobox"), ft = lo(P, "value-placehold
|
|
|
281
285
|
() => t.model.value.map(pe)
|
|
282
286
|
);
|
|
283
287
|
if (t.props.tagRenderMode === "chip")
|
|
284
|
-
return
|
|
285
|
-
|
|
288
|
+
return h(
|
|
289
|
+
mo,
|
|
286
290
|
{
|
|
287
291
|
maxCount: t.props.maxCount,
|
|
288
292
|
size: t.getTagSize.value,
|
|
@@ -295,127 +299,127 @@ const [Fe, xo] = Gt("Combobox"), P = oo("combobox"), ft = lo(P, "value-placehold
|
|
|
295
299
|
},
|
|
296
300
|
() => t.model.value.map((ie) => {
|
|
297
301
|
var ge, me;
|
|
298
|
-
const
|
|
299
|
-
const
|
|
300
|
-
return
|
|
301
|
-
},
|
|
302
|
-
return
|
|
303
|
-
|
|
302
|
+
const Ae = () => t.getLabelByValue(ie), ke = ({ size: Ve }) => {
|
|
303
|
+
const M = G(t.getOptionByValue(ie)) ?? t.props.leadingIcon;
|
|
304
|
+
return M ? m(M, Ve) : null;
|
|
305
|
+
}, xe = t.getOptionByValue(ie);
|
|
306
|
+
return h(
|
|
307
|
+
fo,
|
|
304
308
|
{
|
|
305
|
-
...
|
|
309
|
+
...xe ? ((me = (ge = t.props).getTagProps) == null ? void 0 : me.call(ge, xe)) ?? {} : {},
|
|
306
310
|
value: ie,
|
|
307
|
-
class:
|
|
308
|
-
closeIconCls: S(
|
|
311
|
+
class: U(S(a, "tag"), t.props.tagCls),
|
|
312
|
+
closeIconCls: S(a, "tag__close")
|
|
309
313
|
},
|
|
310
314
|
{
|
|
311
|
-
text:
|
|
312
|
-
leading:
|
|
315
|
+
text: Ae,
|
|
316
|
+
leading: ke
|
|
313
317
|
}
|
|
314
318
|
);
|
|
315
319
|
})
|
|
316
320
|
);
|
|
317
321
|
}
|
|
318
322
|
})();
|
|
319
|
-
if (
|
|
320
|
-
|
|
323
|
+
if (E && z.push(E), t.props.headerSearch ? (!t.props.noValueOnPlaceholder || t.props.placeholder) && z.push(
|
|
324
|
+
h(
|
|
321
325
|
"div",
|
|
322
326
|
{
|
|
323
|
-
class:
|
|
324
|
-
[
|
|
327
|
+
class: U(S(a, "content__value"), {
|
|
328
|
+
[_t]: t.valuePlaceholder.value
|
|
325
329
|
})
|
|
326
330
|
},
|
|
327
331
|
t.placeholder.value ?? t.props.placeholder
|
|
328
332
|
)
|
|
329
333
|
) : z.push(
|
|
330
|
-
|
|
334
|
+
h(qe, {
|
|
331
335
|
noValueOnPlaceholder: t.props.noValueOnPlaceholder,
|
|
332
336
|
searchIcon: !1,
|
|
333
337
|
bordered: !1,
|
|
334
338
|
simple: !0
|
|
335
339
|
})
|
|
336
|
-
),
|
|
337
|
-
return
|
|
338
|
-
}, f = [],
|
|
339
|
-
f.push(
|
|
340
|
+
), !N(z) || !t.props.contentFit || t.props.trailingIcon)
|
|
341
|
+
return h("div", { class: S(a, "content") }, z);
|
|
342
|
+
}, f = [], V = Se();
|
|
343
|
+
f.push(V), f.push(y());
|
|
340
344
|
const q = se();
|
|
341
|
-
return
|
|
345
|
+
return N(q) || f.push(q), h("div", Y.value, f);
|
|
342
346
|
};
|
|
343
|
-
return (
|
|
347
|
+
return (u, _) => (w(), $(de));
|
|
344
348
|
}
|
|
345
|
-
}),
|
|
346
|
-
...
|
|
349
|
+
}), gt = /* @__PURE__ */ _e({
|
|
350
|
+
...Ce("ComboboxOption"),
|
|
347
351
|
__name: "ComboboxOption",
|
|
348
352
|
props: {
|
|
349
353
|
option: {}
|
|
350
354
|
},
|
|
351
|
-
setup(
|
|
352
|
-
const t =
|
|
353
|
-
var
|
|
354
|
-
const
|
|
355
|
-
!c.props.tree && c.props.multiple && c.props.checkbox && !t.option._noCheckbox &&
|
|
356
|
-
|
|
355
|
+
setup(O) {
|
|
356
|
+
const t = O, c = He(), o = C(() => c.isOptionSelected(t.option._key)), b = (p) => {
|
|
357
|
+
var a, F, Y, m, se, te;
|
|
358
|
+
const x = [];
|
|
359
|
+
!c.props.tree && c.props.multiple && c.props.checkbox && !t.option._noCheckbox && x.push(
|
|
360
|
+
h(So, {
|
|
357
361
|
unExtendParent: !0,
|
|
358
362
|
modelValue: o.value,
|
|
359
|
-
size:
|
|
363
|
+
size: p.checkboxSize,
|
|
360
364
|
disabled: t.option._disabled || c.getDisabled.value
|
|
361
365
|
})
|
|
362
366
|
);
|
|
363
|
-
const
|
|
364
|
-
return
|
|
365
|
-
|
|
366
|
-
size:
|
|
367
|
+
const d = (F = (a = c.slots).optionLeading) == null ? void 0 : F.call(a, { ...p, option: t.option });
|
|
368
|
+
return N(d) ? c.props.tagRenderMode === "avatar" && c.props.showTriggerTagOnOption ? x.push(
|
|
369
|
+
h(ht, {
|
|
370
|
+
size: p.avatarSize,
|
|
367
371
|
...((m = (Y = c.props).getTagProps) == null ? void 0 : m.call(Y, t.option)) ?? {}
|
|
368
372
|
})
|
|
369
|
-
) : c.props.tagRenderMode === "go" && c.props.showTriggerTagOnOption ?
|
|
370
|
-
|
|
371
|
-
size:
|
|
373
|
+
) : c.props.tagRenderMode === "go" && c.props.showTriggerTagOnOption ? x.push(
|
|
374
|
+
h(bt, {
|
|
375
|
+
size: p.iconSize,
|
|
372
376
|
...((te = (se = c.props).getTagProps) == null ? void 0 : te.call(se, t.option)) ?? {}
|
|
373
377
|
})
|
|
374
|
-
) : t.option._icon &&
|
|
375
|
-
},
|
|
376
|
-
const
|
|
377
|
-
return
|
|
378
|
-
|
|
378
|
+
) : t.option._icon && x.push(h(Ge, { icon: t.option._icon, size: c.getIconSize.value })) : x.push(d), N(x) ? null : x;
|
|
379
|
+
}, G = Ht(), H = () => {
|
|
380
|
+
const p = c.props.tree ? void 0 : t.option._description, x = (eo(c.props.getMenuItemProps) ? c.props.getMenuItemProps(t.option) : c.props.getMenuItemProps) ?? {};
|
|
381
|
+
return h(
|
|
382
|
+
ho,
|
|
379
383
|
{
|
|
380
384
|
unExtendParent: !0,
|
|
381
385
|
class: S(P, "option"),
|
|
382
386
|
unFocusable: !0,
|
|
383
387
|
staticStyle: c.props.tree,
|
|
384
|
-
description:
|
|
388
|
+
description: p,
|
|
385
389
|
title: t.option._label,
|
|
386
390
|
key: t.option._key,
|
|
387
391
|
selected: o.value,
|
|
388
|
-
leadingCenter: !!
|
|
392
|
+
leadingCenter: !!p,
|
|
389
393
|
size: c.getSize.value,
|
|
390
394
|
disabled: c.props.tree ? !1 : t.option._disabled || c.getDisabled.value,
|
|
391
395
|
onClick: () => c.selectOption(t.option),
|
|
392
396
|
slotProps: t,
|
|
393
|
-
...
|
|
394
|
-
...
|
|
397
|
+
...x,
|
|
398
|
+
...G
|
|
395
399
|
},
|
|
396
400
|
{
|
|
397
|
-
leading:
|
|
401
|
+
leading: b,
|
|
398
402
|
trailing: c.slots.optionTrailing,
|
|
399
403
|
title: c.slots.optionTitle,
|
|
400
404
|
description: c.slots.optionDescription
|
|
401
405
|
}
|
|
402
406
|
);
|
|
403
407
|
};
|
|
404
|
-
return (
|
|
408
|
+
return (p, x) => (w(), $(H));
|
|
405
409
|
}
|
|
406
|
-
}),
|
|
407
|
-
...
|
|
410
|
+
}), Ao = /* @__PURE__ */ _e({
|
|
411
|
+
...Ce("ComboboxLabel"),
|
|
408
412
|
__name: "ComboboxLabel",
|
|
409
413
|
props: {
|
|
410
414
|
label: {}
|
|
411
415
|
},
|
|
412
|
-
setup(
|
|
413
|
-
return (t, c) => (w(),
|
|
414
|
-
class:
|
|
415
|
-
},
|
|
416
|
+
setup(O) {
|
|
417
|
+
return (t, c) => (w(), he("div", {
|
|
418
|
+
class: ze(s(S)(s(P), "label"))
|
|
419
|
+
}, qt(O.label), 3));
|
|
416
420
|
}
|
|
417
|
-
}),
|
|
418
|
-
...
|
|
421
|
+
}), Vo = /* @__PURE__ */ _e({
|
|
422
|
+
...Ce("Combobox"),
|
|
419
423
|
__name: "Combobox",
|
|
420
424
|
props: {
|
|
421
425
|
modelValue: {},
|
|
@@ -507,50 +511,50 @@ const [Fe, xo] = Gt("Combobox"), P = oo("combobox"), ft = lo(P, "value-placehold
|
|
|
507
511
|
ignoreParentTo: { type: Boolean }
|
|
508
512
|
},
|
|
509
513
|
emits: ["update:modelValue", "update:expandedKeys", "keydownEnter", "keydownEscape", "update:search", "fetch", "search", "select", "update:open", "escapeKeyDown", "pointerDownOutside", "focusOutside", "interactOutside", "openAutoFocus", "closeAutoFocus", "openChange"],
|
|
510
|
-
setup(
|
|
511
|
-
const o =
|
|
514
|
+
setup(O, { expose: t, emit: c }) {
|
|
515
|
+
const o = O, b = c, G = () => {
|
|
512
516
|
var e, l;
|
|
513
517
|
o.tree && (((e = o.filterOptions) == null ? void 0 : e.expandParent) === "collapse" ? Y([]) : ((l = o.filterOptions) == null ? void 0 : l.expandParent) === "expand" && Y(
|
|
514
|
-
z.value.filter((
|
|
518
|
+
z.value.filter((n) => n._hasChildren).map((n) => n._key)
|
|
515
519
|
));
|
|
516
|
-
},
|
|
517
|
-
|
|
518
|
-
}, 500),
|
|
520
|
+
}, H = ut((e) => {
|
|
521
|
+
b("search", e), G();
|
|
522
|
+
}, 500), p = we(o, "search", b, {
|
|
519
523
|
passive: o.search === void 0,
|
|
520
|
-
onChange:
|
|
521
|
-
}),
|
|
524
|
+
onChange: H
|
|
525
|
+
}), x = Oo(p, 500), d = we(o, "open", b, {
|
|
522
526
|
defaultValue: o.defaultOpen,
|
|
523
527
|
passive: o.open === void 0,
|
|
524
528
|
onChange(e) {
|
|
525
|
-
!e && o.resetSearchTermOnBlur && (
|
|
529
|
+
!e && o.resetSearchTermOnBlur && (p.value = void 0);
|
|
526
530
|
}
|
|
527
|
-
}),
|
|
531
|
+
}), a = we(
|
|
528
532
|
o,
|
|
529
533
|
"modelValue",
|
|
530
|
-
|
|
534
|
+
b,
|
|
531
535
|
{
|
|
532
536
|
passive: o.modelValue === void 0,
|
|
533
537
|
onChange: () => {
|
|
534
538
|
var e, l;
|
|
535
|
-
|
|
539
|
+
d.value && !o.multiple && (d.value = !1, ve()), M != null && M.value && o.sortSelectedItems && ((l = (e = M == null ? void 0 : M.value) == null ? void 0 : e.measure) == null || l.call(e)), o.resetSearchTermOnSelect && (p.value = void 0);
|
|
536
540
|
}
|
|
537
541
|
}
|
|
538
|
-
), F =
|
|
542
|
+
), F = we(
|
|
539
543
|
o,
|
|
540
544
|
"expandedKeys",
|
|
541
|
-
|
|
545
|
+
b,
|
|
542
546
|
{
|
|
543
547
|
passive: o.expandedKeys === void 0
|
|
544
548
|
}
|
|
545
|
-
), Y =
|
|
549
|
+
), Y = ut(
|
|
546
550
|
(e) => {
|
|
547
551
|
F.value = e;
|
|
548
552
|
},
|
|
549
553
|
500,
|
|
550
554
|
{ edges: ["leading"] }
|
|
551
|
-
), m =
|
|
552
|
-
...
|
|
553
|
-
...
|
|
555
|
+
), m = mt(), se = Zt(b), te = C(() => ({
|
|
556
|
+
...be(se, ["onUpdate:modelValue", "onUpdate:search", "onSelect", "onOpenAutoFocus"]),
|
|
557
|
+
...to(o, [
|
|
554
558
|
"placement",
|
|
555
559
|
"reversePlacementOnDir",
|
|
556
560
|
"zIndex",
|
|
@@ -565,9 +569,9 @@ const [Fe, xo] = Gt("Combobox"), P = oo("combobox"), ft = lo(P, "value-placehold
|
|
|
565
569
|
"noTrigger"
|
|
566
570
|
])
|
|
567
571
|
// modal: true,
|
|
568
|
-
})), pe =
|
|
569
|
-
|
|
570
|
-
const
|
|
572
|
+
})), pe = ue();
|
|
573
|
+
oo({ target: pe });
|
|
574
|
+
const Se = J({
|
|
571
575
|
key: "value",
|
|
572
576
|
getter: o.getValue
|
|
573
577
|
}), de = {
|
|
@@ -582,12 +586,12 @@ const [Fe, xo] = Gt("Combobox"), P = oo("combobox"), ft = lo(P, "value-placehold
|
|
|
582
586
|
getter: o.getDescription,
|
|
583
587
|
noReturnOption: !0
|
|
584
588
|
}),
|
|
585
|
-
getValue:
|
|
589
|
+
getValue: Se,
|
|
586
590
|
getLabel: J({
|
|
587
591
|
key: "label",
|
|
588
592
|
getter: o.getLabel,
|
|
589
593
|
noReturnOption: !0,
|
|
590
|
-
defaultValue:
|
|
594
|
+
defaultValue: Se
|
|
591
595
|
}),
|
|
592
596
|
getNoCheckbox: J({
|
|
593
597
|
key: "noCheckbox",
|
|
@@ -617,153 +621,153 @@ const [Fe, xo] = Gt("Combobox"), P = oo("combobox"), ft = lo(P, "value-placehold
|
|
|
617
621
|
getter: o.getIcon,
|
|
618
622
|
noReturnOption: !0
|
|
619
623
|
})
|
|
620
|
-
},
|
|
621
|
-
var
|
|
622
|
-
const
|
|
623
|
-
return (
|
|
624
|
-
}, _ = (e, l,
|
|
625
|
-
() =>
|
|
626
|
-
getValue: (e, l,
|
|
627
|
-
const
|
|
628
|
-
return
|
|
624
|
+
}, u = (e, l) => {
|
|
625
|
+
var r;
|
|
626
|
+
const n = `get${l[0].toUpperCase() + l.slice(1)}`;
|
|
627
|
+
return (r = de[n]) == null ? void 0 : r.call(de, e);
|
|
628
|
+
}, _ = (e, l, n) => !!(!o.tree && !(l != null && l.length) && (n != null && n.length)), y = C(
|
|
629
|
+
() => bo({
|
|
630
|
+
getValue: (e, l, n) => {
|
|
631
|
+
const r = u(e, "value");
|
|
632
|
+
return j(r) && _(e, l, n) ? Fe(We) : r;
|
|
629
633
|
},
|
|
630
|
-
getDisabled: (e) =>
|
|
634
|
+
getDisabled: (e) => u(e, "disabled"),
|
|
631
635
|
arr: o.options ?? [],
|
|
632
636
|
getChildren: (e, l) => {
|
|
633
637
|
if (!(l != null && l.length && !o.tree))
|
|
634
|
-
return
|
|
638
|
+
return u(e, "options");
|
|
635
639
|
},
|
|
636
640
|
getExtra: (e, l) => {
|
|
637
641
|
if (l) {
|
|
638
|
-
let
|
|
639
|
-
return
|
|
640
|
-
_description:
|
|
641
|
-
_label:
|
|
642
|
-
_title: o.tree ?
|
|
643
|
-
_noCheckbox:
|
|
644
|
-
_single:
|
|
645
|
-
_clear:
|
|
646
|
-
_icon:
|
|
642
|
+
let n = u(l, "label");
|
|
643
|
+
return j(n) || (n = String(n)), {
|
|
644
|
+
_description: u(l, "description"),
|
|
645
|
+
_label: n,
|
|
646
|
+
_title: o.tree ? n : void 0,
|
|
647
|
+
_noCheckbox: u(l, "noCheckbox"),
|
|
648
|
+
_single: u(l, "single"),
|
|
649
|
+
_clear: u(l, "clear"),
|
|
650
|
+
_icon: u(l, "icon"),
|
|
647
651
|
_id: S(P, e)
|
|
648
652
|
};
|
|
649
653
|
}
|
|
650
654
|
},
|
|
651
655
|
allowNoValidKey: _
|
|
652
656
|
})
|
|
653
|
-
), f = (e, l = !1) => e ?
|
|
654
|
-
var
|
|
657
|
+
), f = (e, l = !1) => e ? y.value.filter((n) => {
|
|
658
|
+
var r;
|
|
655
659
|
if (l) {
|
|
656
|
-
const
|
|
657
|
-
return
|
|
660
|
+
const k = ct(n._parentKeys ?? []);
|
|
661
|
+
return k && k === e;
|
|
658
662
|
}
|
|
659
|
-
return (
|
|
660
|
-
}) : [],
|
|
663
|
+
return (r = n._parentKeys) == null ? void 0 : r.includes(e);
|
|
664
|
+
}) : [], V = (e) => {
|
|
661
665
|
var l;
|
|
662
|
-
if ((l =
|
|
663
|
-
return
|
|
666
|
+
if ((l = y.value) != null && l.length && !j(e))
|
|
667
|
+
return y.value.find((n) => n._key === e);
|
|
664
668
|
}, q = (e) => {
|
|
665
|
-
const l =
|
|
669
|
+
const l = V(e);
|
|
666
670
|
return l && (l._label || l._key) || e;
|
|
667
671
|
}, Z = (e) => {
|
|
668
|
-
const l =
|
|
672
|
+
const l = V(e);
|
|
669
673
|
return l ? l._single ?? !1 : !1;
|
|
670
|
-
},
|
|
671
|
-
var
|
|
674
|
+
}, L = (e) => e === void 0 ? !1 : Array.isArray(a.value) ? !!(e && a.value.includes(e)) : a.value === e, z = C(() => {
|
|
675
|
+
var r, k;
|
|
672
676
|
let e = [];
|
|
673
|
-
const l = /* @__PURE__ */ new Set(),
|
|
674
|
-
|
|
677
|
+
const l = /* @__PURE__ */ new Set(), n = (i) => {
|
|
678
|
+
i != null && i._key && !l.has(i._key) && (e.push(re(i)), l.add(i._key));
|
|
675
679
|
};
|
|
676
|
-
if (
|
|
677
|
-
var v,
|
|
678
|
-
if (
|
|
679
|
-
if (
|
|
680
|
-
|
|
681
|
-
if (!l.has(
|
|
682
|
-
const
|
|
683
|
-
|
|
680
|
+
if (x.value ? (y.value.forEach((i) => {
|
|
681
|
+
var v, D;
|
|
682
|
+
if (i._label && i._label.toLowerCase().includes(x.value.toLowerCase()) && !l.has(i._key)) {
|
|
683
|
+
if (n(i), i._hasChildren && f(i._key).forEach(n), (v = o.filterOptions) != null && v.strictNode)
|
|
684
|
+
i._parentKeys && i._parentKeys.forEach((g) => {
|
|
685
|
+
if (!l.has(g)) {
|
|
686
|
+
const ne = V(g);
|
|
687
|
+
n(ne);
|
|
684
688
|
}
|
|
685
689
|
});
|
|
686
|
-
else if ((
|
|
687
|
-
const
|
|
688
|
-
if (!
|
|
689
|
-
if (!l.has(
|
|
690
|
-
const
|
|
691
|
-
|
|
690
|
+
else if ((D = i._parentKeys) != null && D.length) {
|
|
691
|
+
const g = dt(i._parentKeys);
|
|
692
|
+
if (!j(g)) {
|
|
693
|
+
if (!l.has(g)) {
|
|
694
|
+
const ae = V(g);
|
|
695
|
+
n(ae);
|
|
692
696
|
}
|
|
693
|
-
f(
|
|
697
|
+
f(g).forEach(n);
|
|
694
698
|
}
|
|
695
699
|
}
|
|
696
700
|
}
|
|
697
701
|
}), e = e.sort(
|
|
698
|
-
(
|
|
699
|
-
)) : e = re(
|
|
700
|
-
let
|
|
701
|
-
const
|
|
702
|
-
const
|
|
703
|
-
|
|
704
|
-
},
|
|
705
|
-
const
|
|
706
|
-
return
|
|
702
|
+
(i, A) => y.value.findIndex((v) => v._key === i._key) - y.value.findIndex((v) => v._key === A._key)
|
|
703
|
+
)) : e = re(y.value), o.sortSelectedItems && !o.tree && !j(a.value)) {
|
|
704
|
+
let i = re(e);
|
|
705
|
+
const A = i.filter((I) => L(I._key)), v = Symbol("root"), D = Symbol("rootGroup"), g = {}, ne = (I, R, T = 1) => {
|
|
706
|
+
const W = i.splice(I, T);
|
|
707
|
+
i.splice(R, 0, ...W);
|
|
708
|
+
}, ae = (I) => I ? i.findIndex((R) => R._key === I) : -1, Ie = (I) => {
|
|
709
|
+
const R = g[I], T = ae(R == null ? void 0 : R.key);
|
|
710
|
+
return R != null && R.length ? T + R.length + 1 : T + 1;
|
|
707
711
|
};
|
|
708
|
-
|
|
709
|
-
var
|
|
710
|
-
if ((
|
|
711
|
-
const T =
|
|
712
|
-
let
|
|
713
|
-
const
|
|
714
|
-
|
|
715
|
-
|
|
712
|
+
A.forEach((I) => {
|
|
713
|
+
var R;
|
|
714
|
+
if ((R = I._parentKeys) != null && R.length) {
|
|
715
|
+
const T = dt(I._parentKeys);
|
|
716
|
+
let W = ae(T);
|
|
717
|
+
const at = Math.max(
|
|
718
|
+
Ie(v),
|
|
719
|
+
Ie(D)
|
|
716
720
|
);
|
|
717
|
-
if (
|
|
718
|
-
const
|
|
719
|
-
|
|
721
|
+
if (W > at) {
|
|
722
|
+
const Te = f(T).length;
|
|
723
|
+
ne(W, at, Te + 1);
|
|
720
724
|
}
|
|
721
|
-
if (
|
|
725
|
+
if (g[D] = {
|
|
722
726
|
key: T,
|
|
723
727
|
length: f(T).length
|
|
724
|
-
},
|
|
725
|
-
const
|
|
726
|
-
if (
|
|
727
|
-
|
|
728
|
+
}, W = ae(T), T && W > -1) {
|
|
729
|
+
const Te = ae(I._key);
|
|
730
|
+
if (g[T] === void 0)
|
|
731
|
+
ne(Te, W + 1);
|
|
728
732
|
else {
|
|
729
|
-
const
|
|
730
|
-
|
|
733
|
+
const Kt = Ie(T);
|
|
734
|
+
ne(Te, Kt);
|
|
731
735
|
}
|
|
732
|
-
|
|
736
|
+
g[T] = {
|
|
733
737
|
length: void 0,
|
|
734
738
|
key: I._key
|
|
735
739
|
};
|
|
736
740
|
}
|
|
737
741
|
} else {
|
|
738
|
-
const T =
|
|
739
|
-
T >
|
|
742
|
+
const T = ae(I._key), W = Ie(v);
|
|
743
|
+
T > W && ne(T, W), g[v] = {
|
|
740
744
|
key: I._key,
|
|
741
745
|
length: I._hasChildren ? f(I._key).length : void 0
|
|
742
746
|
};
|
|
743
747
|
}
|
|
744
|
-
|
|
745
|
-
}), e =
|
|
748
|
+
i = re(i);
|
|
749
|
+
}), e = i;
|
|
746
750
|
}
|
|
747
751
|
if (!o.tree) {
|
|
748
|
-
const
|
|
749
|
-
for (let
|
|
750
|
-
const v =
|
|
751
|
-
!
|
|
752
|
-
_key:
|
|
752
|
+
const i = re(e);
|
|
753
|
+
for (let A = 0; A < i.length - 1; A++) {
|
|
754
|
+
const v = i[A], D = i[A + 1];
|
|
755
|
+
!D._divider && (D._hasChildren || (r = v._parentKeys) != null && r.length && !((k = D._parentKeys) != null && k.length)) && (i.splice(A + 1, 0, {
|
|
756
|
+
_key: Fe(We),
|
|
753
757
|
_divider: !0,
|
|
754
|
-
_id:
|
|
755
|
-
}),
|
|
758
|
+
_id: Fe(We)
|
|
759
|
+
}), A++);
|
|
756
760
|
}
|
|
757
|
-
e =
|
|
761
|
+
e = i;
|
|
758
762
|
}
|
|
759
763
|
return e;
|
|
760
764
|
});
|
|
761
|
-
|
|
762
|
-
const { getDisabled: oe, getStatus:
|
|
765
|
+
G();
|
|
766
|
+
const { getDisabled: oe, getStatus: Je, getSize: E } = lo({
|
|
763
767
|
defaults: { size: "md" },
|
|
764
768
|
exports: ["getDisabled", "getSize", "getStatus"]
|
|
765
769
|
}), ie = C(() => {
|
|
766
|
-
switch (
|
|
770
|
+
switch (E.value) {
|
|
767
771
|
case "sm":
|
|
768
772
|
return "xsm";
|
|
769
773
|
case "lg":
|
|
@@ -772,8 +776,8 @@ const [Fe, xo] = Gt("Combobox"), P = oo("combobox"), ft = lo(P, "value-placehold
|
|
|
772
776
|
default:
|
|
773
777
|
return "sm";
|
|
774
778
|
}
|
|
775
|
-
}),
|
|
776
|
-
switch (
|
|
779
|
+
}), Ae = C(() => {
|
|
780
|
+
switch (E.value) {
|
|
777
781
|
case "sm":
|
|
778
782
|
return "2xsm";
|
|
779
783
|
case "lg":
|
|
@@ -782,7 +786,7 @@ const [Fe, xo] = Gt("Combobox"), P = oo("combobox"), ft = lo(P, "value-placehold
|
|
|
782
786
|
default:
|
|
783
787
|
return "xsm";
|
|
784
788
|
}
|
|
785
|
-
}),
|
|
789
|
+
}), ke = ue(), xe = {
|
|
786
790
|
sm: 4,
|
|
787
791
|
md: 6,
|
|
788
792
|
lg: 8
|
|
@@ -793,13 +797,13 @@ const [Fe, xo] = Gt("Combobox"), P = oo("combobox"), ft = lo(P, "value-placehold
|
|
|
793
797
|
sm: 32,
|
|
794
798
|
md: 50,
|
|
795
799
|
lg: 54
|
|
796
|
-
},
|
|
800
|
+
}, Ve = C(() => ({
|
|
797
801
|
get count() {
|
|
798
802
|
return z.value.length;
|
|
799
803
|
},
|
|
800
804
|
getScrollElement: () => {
|
|
801
805
|
var e;
|
|
802
|
-
return (e =
|
|
806
|
+
return (e = ke.value) == null ? void 0 : e.container.viewportElement;
|
|
803
807
|
},
|
|
804
808
|
estimateSize: (e) => {
|
|
805
809
|
const l = z.value[e];
|
|
@@ -807,164 +811,174 @@ const [Fe, xo] = Gt("Combobox"), P = oo("combobox"), ft = lo(P, "value-placehold
|
|
|
807
811
|
if (l._divider)
|
|
808
812
|
return 1;
|
|
809
813
|
if (l._label && l._hasChildren)
|
|
810
|
-
return 8 + (ge[
|
|
814
|
+
return 8 + (ge[E.value] ?? ge.md);
|
|
811
815
|
if (l._description)
|
|
812
|
-
return me[
|
|
816
|
+
return me[E.value] ?? me.md;
|
|
813
817
|
}
|
|
814
|
-
return
|
|
818
|
+
return pt[E.value] ?? pt.md;
|
|
815
819
|
},
|
|
816
820
|
overscan: 5,
|
|
817
821
|
get gap() {
|
|
818
|
-
return
|
|
822
|
+
return xe[E.value] ?? 0;
|
|
819
823
|
}
|
|
820
824
|
}));
|
|
821
|
-
let
|
|
825
|
+
let M, le;
|
|
822
826
|
if (o.virtual) {
|
|
823
|
-
const { virtualizer: e, ...l } =
|
|
824
|
-
|
|
827
|
+
const { virtualizer: e, ...l } = no(
|
|
828
|
+
Ve
|
|
825
829
|
);
|
|
826
|
-
|
|
830
|
+
M = e, le = l;
|
|
827
831
|
}
|
|
828
|
-
const
|
|
832
|
+
const St = C(
|
|
829
833
|
() => {
|
|
830
834
|
var e;
|
|
831
|
-
return o.virtual ? (((e =
|
|
835
|
+
return o.virtual ? (((e = M == null ? void 0 : M.value) == null ? void 0 : e.getVirtualItems()) ?? []).map((l) => z.value[l.index]) : z.value;
|
|
832
836
|
}
|
|
833
|
-
),
|
|
834
|
-
inputBindings:
|
|
835
|
-
rootBindings:
|
|
836
|
-
focused:
|
|
837
|
-
} =
|
|
837
|
+
), kt = C(() => (le == null ? void 0 : le.containerStyles.value) ?? {}), {
|
|
838
|
+
inputBindings: xt,
|
|
839
|
+
rootBindings: Ot,
|
|
840
|
+
focused: Bt
|
|
841
|
+
} = ao({
|
|
838
842
|
getDisabled: () => oe.value
|
|
839
|
-
}),
|
|
840
|
-
|
|
841
|
-
|
|
842
|
-
|
|
843
|
-
|
|
844
|
-
|
|
845
|
-
|
|
846
|
-
|
|
847
|
-
|
|
843
|
+
}), Ee = ue(), De = ue();
|
|
844
|
+
let Oe = !1, fe;
|
|
845
|
+
const ve = () => {
|
|
846
|
+
var n;
|
|
847
|
+
const e = ((n = s(De)) == null ? void 0 : n.$el) ?? s(De), l = s(Ee);
|
|
848
|
+
!Oe && (l || e) && (Oe = !0, clearTimeout(fe), l ? (l.input.style.pointerEvents = "auto", fe = setTimeout(() => {
|
|
849
|
+
var r;
|
|
850
|
+
(r = l == null ? void 0 : l.focus) == null || r.call(l), Oe = !1, clearTimeout(fe);
|
|
851
|
+
}, 150), l.input.style.pointerEvents = "") : (e.style.pointerEvents = "auto", fe = setTimeout(() => {
|
|
852
|
+
var r;
|
|
853
|
+
(r = e.focus) == null || r.call(e), Oe = !1, clearTimeout(fe);
|
|
854
|
+
}, 150), e.style.pointerEvents = ""));
|
|
855
|
+
}, Pt = (e) => {
|
|
856
|
+
if (!o.headerSearch || !s(Ee)) {
|
|
857
|
+
e.preventDefault(), ve();
|
|
858
|
+
return;
|
|
848
859
|
}
|
|
849
|
-
|
|
850
|
-
|
|
851
|
-
|
|
852
|
-
|
|
853
|
-
|
|
854
|
-
|
|
855
|
-
|
|
856
|
-
|
|
860
|
+
b("openAutoFocus", e);
|
|
861
|
+
}, Qe = C(
|
|
862
|
+
() => !o.noValueOnPlaceholder && (X(a.value) ? a.value.length === 1 && !j(a.value[0]) : !j(a.value))
|
|
863
|
+
), It = C(() => {
|
|
864
|
+
if (Qe.value) {
|
|
865
|
+
if (o.multiple && X(a.value))
|
|
866
|
+
return q(ct(a.value));
|
|
867
|
+
if (!o.multiple && !X(a.value))
|
|
868
|
+
return q(a.value);
|
|
857
869
|
}
|
|
858
|
-
}), { CollectionSlot:
|
|
870
|
+
}), { CollectionSlot: Tt, CollectionItem: Xe, itemMap: wt, getItems: Ye } = ro({
|
|
859
871
|
isProvider: !0,
|
|
860
872
|
key: P
|
|
861
|
-
}),
|
|
862
|
-
|
|
863
|
-
},
|
|
873
|
+
}), Ze = () => a.value ? Array.isArray(a.value) ? a.value : [a.value] : [], B = ue(), Le = (e) => {
|
|
874
|
+
B.value = e;
|
|
875
|
+
}, et = (e) => ({
|
|
864
876
|
"data-disabled": e._disabled ? "" : void 0,
|
|
865
|
-
"data-highlighted":
|
|
866
|
-
}),
|
|
867
|
-
|
|
868
|
-
|
|
877
|
+
"data-highlighted": B.value === e._key ? "" : void 0
|
|
878
|
+
}), ye = ue(), Be = (e) => {
|
|
879
|
+
s(a) === e && d.value && (d.value = !1);
|
|
880
|
+
}, tt = (e, l) => {
|
|
881
|
+
var n, r;
|
|
882
|
+
if (l && ((n = ye.value) != null && n.onSelect) && o.tree && ((r = ye.value) == null || r.onSelect(e, !L(e == null ? void 0 : e._key))), !(o.tree || !e || !e._key || e._disabled))
|
|
869
883
|
if (o.multiple)
|
|
870
884
|
if (e._clear)
|
|
871
|
-
|
|
885
|
+
a.value = [], b("select", void 0, !1);
|
|
872
886
|
else if (e._single)
|
|
873
|
-
|
|
887
|
+
a.value = [e._key], b("select", e._key, !0, e);
|
|
874
888
|
else {
|
|
875
|
-
let
|
|
876
|
-
const
|
|
877
|
-
|
|
889
|
+
let k = X(a.value) ? a.value : [];
|
|
890
|
+
const i = k.includes(e._key);
|
|
891
|
+
k.length === 1 && Z(k[0]) && e._key !== k[0] && (k = []), i ? (a.value = k.filter((A) => A !== e._key), b("select", e._key, !0, e)) : (a.value = [...k, e._key], b("select", e._key, !1, e));
|
|
878
892
|
}
|
|
879
|
-
else e._clear ? (
|
|
880
|
-
}, { getDir:
|
|
881
|
-
|
|
882
|
-
|
|
883
|
-
|
|
884
|
-
|
|
885
|
-
|
|
886
|
-
|
|
887
|
-
|
|
888
|
-
|
|
889
|
-
|
|
890
|
-
|
|
891
|
-
if (
|
|
892
|
-
|
|
893
|
-
|
|
894
|
-
|
|
895
|
-
if (
|
|
896
|
-
const
|
|
897
|
-
|
|
898
|
-
|
|
899
|
-
|
|
900
|
-
|
|
901
|
-
O.value = (p == null ? void 0 : p.value) ?? O.value ?? v[0].value;
|
|
902
|
-
} else if (e.key === "ArrowUp") {
|
|
903
|
-
const p = v[E - 1];
|
|
904
|
-
O.value = (p == null ? void 0 : p.value) ?? v[0].value;
|
|
905
|
-
}
|
|
906
|
-
(a = (l = v.find(
|
|
907
|
-
(p) => O.value && p.value && p.value === O.value
|
|
908
|
-
)) == null ? void 0 : l.ref) == null || a.scrollIntoView();
|
|
893
|
+
else e._clear ? (Be(void 0), a.value = void 0, b("select", void 0, !1)) : (Be(e._key), a.value = e._key, b("select", e._key, !0, e));
|
|
894
|
+
}, { getDir: zt } = Bo(), Pe = zt(), ot = (e) => {
|
|
895
|
+
var l, n, r, k, i, A;
|
|
896
|
+
if (["Tab", "Escape"].includes(e.key))
|
|
897
|
+
d.value = !1, e.key === "Escape" && b("keydownEscape", e);
|
|
898
|
+
else if (e.key === "Backspace" && o.multiple && X(a.value) && j(p.value))
|
|
899
|
+
a.value = a.value.slice(0, -1);
|
|
900
|
+
else if (!d.value && (e.key.length === 1 && e.key !== " " || ["Enter", "ArrowDown", "ArrowUp"].includes(e.key)))
|
|
901
|
+
d.value = !0;
|
|
902
|
+
else {
|
|
903
|
+
const v = Ye(o.tree);
|
|
904
|
+
if (["ArrowDown", "ArrowUp"].includes(e.key)) {
|
|
905
|
+
if (v.length) {
|
|
906
|
+
const D = v.findIndex(
|
|
907
|
+
(g) => B.value && g.value && g.value === B.value
|
|
908
|
+
);
|
|
909
|
+
if (e.key === "ArrowDown") {
|
|
910
|
+
const g = v[D + 1];
|
|
911
|
+
B.value = (g == null ? void 0 : g.value) ?? B.value ?? v[0].value;
|
|
912
|
+
} else if (e.key === "ArrowUp") {
|
|
913
|
+
const g = v[D - 1];
|
|
914
|
+
B.value = (g == null ? void 0 : g.value) ?? v[0].value;
|
|
909
915
|
}
|
|
910
|
-
|
|
911
|
-
|
|
912
|
-
|
|
913
|
-
}
|
|
914
|
-
|
|
915
|
-
|
|
916
|
-
|
|
917
|
-
|
|
918
|
-
|
|
919
|
-
|
|
916
|
+
(n = (l = v.find(
|
|
917
|
+
(g) => B.value && g.value && g.value === B.value
|
|
918
|
+
)) == null ? void 0 : l.ref) == null || n.scrollIntoView();
|
|
919
|
+
}
|
|
920
|
+
} else if (["ArrowLeft", "ArrowRight"].includes(e.key)) {
|
|
921
|
+
const D = V(B.value);
|
|
922
|
+
v.length && ye.value && o.tree && B.value && D && ((r = F.value) != null && r.includes(B.value) && (Pe.value === "ltr" && e.key === "ArrowLeft" || Pe.value === "rtl" && e.key === "ArrowRight") || !((k = F.value) != null && k.includes(B.value)) && (Pe.value === "ltr" && e.key === "ArrowRight" || Pe.value === "rtl" && e.key === "ArrowLeft")) && ((A = (i = ye.value).onExpandKey) == null || A.call(i, D));
|
|
923
|
+
} else e.key === "Enter" && (v.length === 1 && v[0].value && B.value !== v[0].value && (B.value = v[0].value), B.value && tt(V(B.value), !0), b("keydownEnter", e, p.value));
|
|
924
|
+
}
|
|
925
|
+
}, lt = {
|
|
926
|
+
props: o,
|
|
927
|
+
emit: b,
|
|
928
|
+
onKeyDown: ot,
|
|
929
|
+
searchModel: p,
|
|
930
|
+
openModel: d,
|
|
931
|
+
model: a,
|
|
920
932
|
slots: m,
|
|
921
|
-
valuePlaceholder:
|
|
922
|
-
placeholder:
|
|
923
|
-
getOptionByValue:
|
|
924
|
-
isOptionSelected:
|
|
933
|
+
valuePlaceholder: Qe,
|
|
934
|
+
placeholder: It,
|
|
935
|
+
getOptionByValue: V,
|
|
936
|
+
isOptionSelected: L,
|
|
925
937
|
getLabelByValue: q,
|
|
926
938
|
getSingleByValue: Z,
|
|
927
|
-
inputRef:
|
|
928
|
-
|
|
939
|
+
inputRef: Ee,
|
|
940
|
+
triggerRef: De,
|
|
941
|
+
focusOnInput: ve,
|
|
929
942
|
getDisabled: oe,
|
|
930
|
-
getStatus:
|
|
931
|
-
getSize:
|
|
943
|
+
getStatus: Je,
|
|
944
|
+
getSize: E,
|
|
932
945
|
getTagSize: ie,
|
|
933
|
-
getIconSize:
|
|
934
|
-
comboboxInputBinding:
|
|
935
|
-
comboboxTriggerBinding:
|
|
936
|
-
comboboxInputFocused:
|
|
937
|
-
selectOption:
|
|
938
|
-
itemMap:
|
|
939
|
-
getItems:
|
|
940
|
-
highlightedOptionKey:
|
|
946
|
+
getIconSize: Ae,
|
|
947
|
+
comboboxInputBinding: xt,
|
|
948
|
+
comboboxTriggerBinding: Ot,
|
|
949
|
+
comboboxInputFocused: Bt,
|
|
950
|
+
selectOption: tt,
|
|
951
|
+
itemMap: wt,
|
|
952
|
+
getItems: Ye,
|
|
953
|
+
highlightedOptionKey: B
|
|
941
954
|
};
|
|
942
|
-
|
|
955
|
+
To(lt), Jt(
|
|
943
956
|
() => [o.clearOnChangeMultiple, o.multiple],
|
|
944
957
|
() => {
|
|
945
|
-
o.clearOnChangeMultiple && (
|
|
958
|
+
o.clearOnChangeMultiple && (a.value = void 0, d.value = !1);
|
|
946
959
|
}
|
|
947
960
|
);
|
|
948
|
-
const
|
|
961
|
+
const At = C(() => ({
|
|
949
962
|
defaultExpandAll: !0,
|
|
950
963
|
showLine: !0,
|
|
951
964
|
disabled: oe.value,
|
|
952
965
|
selectionBehavior: "replace",
|
|
953
966
|
...o.treeProps ?? {},
|
|
954
|
-
|
|
967
|
+
emitReSelect: !0,
|
|
968
|
+
size: E.value,
|
|
955
969
|
flattenData: !0,
|
|
956
970
|
outerVirtualScroll: !0,
|
|
957
971
|
selectable: !0,
|
|
958
972
|
focusable: !1,
|
|
959
973
|
multiple: o.multiple,
|
|
960
974
|
checkable: o.multiple && o.checkbox,
|
|
961
|
-
virtual:
|
|
975
|
+
virtual: M,
|
|
962
976
|
syncCheckboxAndSelect: o.multiple,
|
|
963
977
|
data: z.value,
|
|
964
|
-
modelValue:
|
|
965
|
-
checkedKeys:
|
|
978
|
+
modelValue: Ze(),
|
|
979
|
+
checkedKeys: Ze(),
|
|
966
980
|
class: S(P, "tree")
|
|
967
|
-
})),
|
|
981
|
+
})), Vt = C(() => {
|
|
968
982
|
const e = o.scrollContainerProps ?? {};
|
|
969
983
|
return {
|
|
970
984
|
...e,
|
|
@@ -978,130 +992,129 @@ const [Fe, xo] = Gt("Combobox"), P = oo("combobox"), ft = lo(P, "value-placehold
|
|
|
978
992
|
style: (le == null ? void 0 : le.scrollWrapperStyles.value) ?? {}
|
|
979
993
|
}
|
|
980
994
|
};
|
|
981
|
-
}),
|
|
995
|
+
}), nt = S(P, "popup"), Et = yt(nt, {
|
|
982
996
|
variants: {
|
|
983
|
-
size: Q(
|
|
997
|
+
size: Q(Ct, nt)
|
|
984
998
|
}
|
|
985
|
-
}),
|
|
986
|
-
var
|
|
987
|
-
const e = (
|
|
988
|
-
isEmpty: !((
|
|
989
|
-
search:
|
|
990
|
-
}), l =
|
|
999
|
+
}), Dt = C(() => Ke(o.popupWidth, !0)), Lt = C(() => Ke(o.popupHeight, !0)), Mt = C(() => Ke(o.minWidth, !0)), Rt = () => {
|
|
1000
|
+
var n, r;
|
|
1001
|
+
const e = (r = m.header) == null ? void 0 : r.call(m, {
|
|
1002
|
+
isEmpty: !((n = z.value) != null && n.length),
|
|
1003
|
+
search: p.value
|
|
1004
|
+
}), l = !N(e);
|
|
991
1005
|
if (l || o.headerSearch)
|
|
992
|
-
return
|
|
1006
|
+
return h(
|
|
993
1007
|
"div",
|
|
994
1008
|
{ class: S(P, "header") },
|
|
995
|
-
l ? e :
|
|
1009
|
+
l ? e : h(qe, o.headerSearchInputProps || {})
|
|
996
1010
|
);
|
|
997
|
-
},
|
|
998
|
-
var
|
|
999
|
-
const e = (
|
|
1000
|
-
isEmpty: !((
|
|
1001
|
-
search:
|
|
1011
|
+
}, Nt = () => {
|
|
1012
|
+
var n, r;
|
|
1013
|
+
const e = (r = m.footer) == null ? void 0 : r.call(m, {
|
|
1014
|
+
isEmpty: !((n = z.value) != null && n.length),
|
|
1015
|
+
search: p.value
|
|
1002
1016
|
});
|
|
1003
|
-
if (
|
|
1004
|
-
return
|
|
1005
|
-
},
|
|
1006
|
-
var
|
|
1017
|
+
if (!N(e))
|
|
1018
|
+
return h("div", { class: S(P, "footer") }, e);
|
|
1019
|
+
}, $t = () => {
|
|
1020
|
+
var n;
|
|
1007
1021
|
const e = {
|
|
1008
|
-
type:
|
|
1009
|
-
...
|
|
1010
|
-
class:
|
|
1011
|
-
}, l = (
|
|
1012
|
-
return
|
|
1022
|
+
type: E.value === "sm" ? "simple" : "advance",
|
|
1023
|
+
...be(o.emptyProps ?? {}, ["class"]),
|
|
1024
|
+
class: U(S(P, "empty"), o.emptyCls)
|
|
1025
|
+
}, l = (n = m.empty) == null ? void 0 : n.call(m, e);
|
|
1026
|
+
return N(l) ? h(Io, e, {
|
|
1013
1027
|
title: m.emptyTitle,
|
|
1014
1028
|
description: m.emptyDescription,
|
|
1015
1029
|
actions: m.emptyActions,
|
|
1016
1030
|
image: m.emptyImage
|
|
1017
1031
|
}) : l;
|
|
1018
|
-
},
|
|
1019
|
-
var
|
|
1020
|
-
const e = (
|
|
1021
|
-
return
|
|
1022
|
-
() =>
|
|
1023
|
-
size:
|
|
1024
|
-
class:
|
|
1025
|
-
...
|
|
1032
|
+
}, jt = () => {
|
|
1033
|
+
var n;
|
|
1034
|
+
const e = (n = m.loading) == null ? void 0 : n.call(m, {});
|
|
1035
|
+
return N(e) ? new Array(z.value.length ? 2 : o.loadingRowCount).fill(1).map(
|
|
1036
|
+
() => h(ko, {
|
|
1037
|
+
size: E.value,
|
|
1038
|
+
class: U(S(P, "skeleton"), o.skeletonCls),
|
|
1039
|
+
...be(o.skeletonProps ?? {}, ["class"])
|
|
1026
1040
|
})
|
|
1027
1041
|
) : e;
|
|
1028
|
-
},
|
|
1029
|
-
const
|
|
1042
|
+
}, Ft = (e, l, n) => {
|
|
1043
|
+
const r = e._clear, k = e._key;
|
|
1030
1044
|
if (o.multiple) {
|
|
1031
|
-
const
|
|
1032
|
-
|
|
1033
|
-
} else
|
|
1034
|
-
|
|
1045
|
+
const i = e._single;
|
|
1046
|
+
r ? a.value = [] : i ? a.value = [k] : a.value = n;
|
|
1047
|
+
} else r || !l ? (Be(void 0), a.value = void 0) : (Be(k), a.value = k);
|
|
1048
|
+
b(
|
|
1035
1049
|
"select",
|
|
1036
|
-
|
|
1037
|
-
l,
|
|
1050
|
+
r ? void 0 : k,
|
|
1051
|
+
r ? !1 : l,
|
|
1038
1052
|
e
|
|
1039
1053
|
);
|
|
1040
|
-
}, Mt = (e) => {
|
|
1041
|
-
e.key === "ArrowDown" && !y.value ? y.value = !0 : e.key === "Tab" && y.value && (y.value = !1);
|
|
1042
1054
|
};
|
|
1043
|
-
return o.disableOutsidePointerEvents &&
|
|
1044
|
-
open:
|
|
1045
|
-
"onUpdate:open": l[2] || (l[2] = (
|
|
1055
|
+
return o.disableOutsidePointerEvents && so(d), t(lt), (e, l) => (w(), $(s(co), ce({
|
|
1056
|
+
open: s(d),
|
|
1057
|
+
"onUpdate:open": l[2] || (l[2] = (n) => rt(d) ? d.value = n : null)
|
|
1046
1058
|
}, te.value, {
|
|
1047
1059
|
containerProps: {
|
|
1048
|
-
...
|
|
1049
|
-
onClick:
|
|
1060
|
+
...O.containerProps ?? {},
|
|
1061
|
+
onClick: ve
|
|
1050
1062
|
},
|
|
1051
1063
|
noPadding: !0,
|
|
1052
|
-
size:
|
|
1064
|
+
size: s(E),
|
|
1053
1065
|
containerStyle: {
|
|
1054
1066
|
pointerEvents: "auto",
|
|
1055
|
-
display:
|
|
1056
|
-
zIndex:
|
|
1057
|
-
"--ptc-combobox-popup-width":
|
|
1058
|
-
"--ptc-combobox-popup-height":
|
|
1059
|
-
"--ptc-combobox-trigger-min-w":
|
|
1067
|
+
display: s(d) ? void 0 : "none",
|
|
1068
|
+
zIndex: O.zIndex,
|
|
1069
|
+
"--ptc-combobox-popup-width": O.samePopupWidth ? void 0 : Dt.value,
|
|
1070
|
+
"--ptc-combobox-popup-height": Lt.value,
|
|
1071
|
+
"--ptc-combobox-trigger-min-w": Mt.value
|
|
1060
1072
|
},
|
|
1061
|
-
containerCls:
|
|
1062
|
-
|
|
1073
|
+
containerCls: s(U)(s(Et)({ size: s(E) }), O.popupCls),
|
|
1074
|
+
onOpenAutoFocus: Pt,
|
|
1075
|
+
noControl: ""
|
|
1063
1076
|
}), {
|
|
1064
|
-
default:
|
|
1065
|
-
ee(
|
|
1077
|
+
default: K(() => [
|
|
1078
|
+
ee(zo, { onKeydown: ot })
|
|
1066
1079
|
]),
|
|
1067
|
-
content:
|
|
1068
|
-
ee(
|
|
1069
|
-
ee(
|
|
1080
|
+
content: K(() => [
|
|
1081
|
+
ee(Rt),
|
|
1082
|
+
ee(s(Po), ce({
|
|
1070
1083
|
ref_key: "scrollContainerRef",
|
|
1071
|
-
ref:
|
|
1072
|
-
},
|
|
1073
|
-
default:
|
|
1074
|
-
z.value.length ||
|
|
1075
|
-
default:
|
|
1076
|
-
|
|
1077
|
-
class:
|
|
1078
|
-
style:
|
|
1079
|
-
onPointerleave: l[1] || (l[1] = (
|
|
1084
|
+
ref: ke
|
|
1085
|
+
}, Vt.value), {
|
|
1086
|
+
default: K(() => [
|
|
1087
|
+
z.value.length || O.loading ? (w(), $(s(Tt), { key: 0 }, {
|
|
1088
|
+
default: K(() => [
|
|
1089
|
+
st("div", {
|
|
1090
|
+
class: ze(s(U)(s(S)(s(P), "options"), O.optionsCls)),
|
|
1091
|
+
style: Qt(O.virtual ? kt.value : {}),
|
|
1092
|
+
onPointerleave: l[1] || (l[1] = (n) => Le(void 0))
|
|
1080
1093
|
}, [
|
|
1081
|
-
|
|
1094
|
+
O.tree ? (w(), $(s(_o), ce({
|
|
1082
1095
|
key: 0,
|
|
1083
1096
|
ref_key: "treeRef",
|
|
1084
|
-
ref:
|
|
1085
|
-
},
|
|
1086
|
-
expandedKeys:
|
|
1087
|
-
"onUpdate:expandedKeys": l[0] || (l[0] = (
|
|
1088
|
-
onExpand:
|
|
1089
|
-
onSelect:
|
|
1097
|
+
ref: ye
|
|
1098
|
+
}, At.value, {
|
|
1099
|
+
expandedKeys: s(F),
|
|
1100
|
+
"onUpdate:expandedKeys": l[0] || (l[0] = (n) => rt(F) ? F.value = n : null),
|
|
1101
|
+
onExpand: ve,
|
|
1102
|
+
onSelect: Ft
|
|
1090
1103
|
}), {
|
|
1091
|
-
default:
|
|
1092
|
-
(w(!0),
|
|
1093
|
-
key:
|
|
1094
|
-
value:
|
|
1095
|
-
id:
|
|
1104
|
+
default: K(({ items: n }) => [
|
|
1105
|
+
(w(!0), he(je, null, Ue(n, (r) => (w(), $(s(Xe), {
|
|
1106
|
+
key: r._key,
|
|
1107
|
+
value: r._key,
|
|
1108
|
+
id: r._id
|
|
1096
1109
|
}, {
|
|
1097
|
-
default:
|
|
1098
|
-
ee(
|
|
1099
|
-
onPointermove: (
|
|
1100
|
-
id:
|
|
1110
|
+
default: K(() => [
|
|
1111
|
+
ee(s(Co), ce({ node: r }, { ref_for: !0 }, et(r), {
|
|
1112
|
+
onPointermove: (k) => Le(r._key),
|
|
1113
|
+
id: r._id
|
|
1101
1114
|
}), {
|
|
1102
|
-
default:
|
|
1103
|
-
ee(
|
|
1104
|
-
option:
|
|
1115
|
+
default: K(() => [
|
|
1116
|
+
ee(gt, {
|
|
1117
|
+
option: r
|
|
1105
1118
|
}, null, 8, ["option"])
|
|
1106
1119
|
]),
|
|
1107
1120
|
_: 2
|
|
@@ -1111,60 +1124,60 @@ const [Fe, xo] = Gt("Combobox"), P = oo("combobox"), ft = lo(P, "value-placehold
|
|
|
1111
1124
|
}, 1032, ["value", "id"]))), 128))
|
|
1112
1125
|
]),
|
|
1113
1126
|
_: 1
|
|
1114
|
-
}, 16, ["expandedKeys"])) : (w(!0),
|
|
1115
|
-
key:
|
|
1127
|
+
}, 16, ["expandedKeys"])) : (w(!0), he(je, { key: 1 }, Ue(St.value, (n) => (w(), he(je, {
|
|
1128
|
+
key: n._key
|
|
1116
1129
|
}, [
|
|
1117
|
-
|
|
1130
|
+
n._divider ? (w(), $(xo, { key: 0 })) : n._label && n._hasChildren ? (w(), $(Ao, {
|
|
1118
1131
|
key: 1,
|
|
1119
|
-
label:
|
|
1120
|
-
}, null, 8, ["label"])) :
|
|
1132
|
+
label: n._label
|
|
1133
|
+
}, null, 8, ["label"])) : n._hasChildren ? $e("", !0) : (w(), $(s(Xe), {
|
|
1121
1134
|
key: 2,
|
|
1122
|
-
value:
|
|
1123
|
-
id:
|
|
1135
|
+
value: n._key,
|
|
1136
|
+
id: n._id
|
|
1124
1137
|
}, {
|
|
1125
|
-
default:
|
|
1126
|
-
ee(
|
|
1127
|
-
onPointermove: (
|
|
1128
|
-
id:
|
|
1138
|
+
default: K(() => [
|
|
1139
|
+
ee(gt, ce({ option: n }, { ref_for: !0 }, et(n), {
|
|
1140
|
+
onPointermove: (r) => Le(n._key),
|
|
1141
|
+
id: n._id
|
|
1129
1142
|
}), null, 16, ["option", "onPointermove", "id"])
|
|
1130
1143
|
]),
|
|
1131
1144
|
_: 2
|
|
1132
1145
|
}, 1032, ["value", "id"]))
|
|
1133
1146
|
], 64))), 128)),
|
|
1134
|
-
|
|
1147
|
+
O.loading ? (w(), $(jt, { key: 2 })) : $e("", !0)
|
|
1135
1148
|
], 38)
|
|
1136
1149
|
]),
|
|
1137
1150
|
_: 1
|
|
1138
|
-
})) : (w(),
|
|
1139
|
-
|
|
1151
|
+
})) : (w(), $($t, { key: 1 })),
|
|
1152
|
+
O.lazyLoading ? (w(), he("div", {
|
|
1140
1153
|
key: 2,
|
|
1141
|
-
class:
|
|
1154
|
+
class: ze(s(S)(s(P), "lazy_loading"))
|
|
1142
1155
|
}, [
|
|
1143
|
-
|
|
1144
|
-
class:
|
|
1156
|
+
st("div", {
|
|
1157
|
+
class: ze(s(S)(s(P), "lazy_loading_trigger")),
|
|
1145
1158
|
ref_key: "target",
|
|
1146
1159
|
ref: pe
|
|
1147
1160
|
}, null, 2)
|
|
1148
|
-
], 2)) :
|
|
1161
|
+
], 2)) : $e("", !0)
|
|
1149
1162
|
]),
|
|
1150
1163
|
_: 1
|
|
1151
1164
|
}, 16),
|
|
1152
|
-
ee(
|
|
1165
|
+
ee(Nt)
|
|
1153
1166
|
]),
|
|
1154
1167
|
_: 1
|
|
1155
1168
|
}, 16, ["open", "containerProps", "size", "containerStyle", "containerCls"]));
|
|
1156
1169
|
}
|
|
1157
|
-
}),
|
|
1158
|
-
|
|
1159
|
-
|
|
1170
|
+
}), ml = ft(Vo, vt("Combobox")), fl = ft(
|
|
1171
|
+
qe,
|
|
1172
|
+
vt("ComboboxInput")
|
|
1160
1173
|
);
|
|
1161
1174
|
export {
|
|
1162
|
-
|
|
1163
|
-
|
|
1164
|
-
|
|
1165
|
-
|
|
1166
|
-
|
|
1167
|
-
|
|
1168
|
-
|
|
1169
|
-
|
|
1175
|
+
Vo as Combobox,
|
|
1176
|
+
qe as ComboboxInput,
|
|
1177
|
+
fl as ComboboxInputPlugin,
|
|
1178
|
+
ml as ComboboxPlugin,
|
|
1179
|
+
Ct as ComboboxSizes,
|
|
1180
|
+
wo as ComboboxStatuses,
|
|
1181
|
+
He as injectComboboxContext,
|
|
1182
|
+
To as provideComboboxContext
|
|
1170
1183
|
};
|