@aplus-frontend/ui 7.17.0 → 7.17.1-beta.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.
|
@@ -1,20 +1,20 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import { Select as
|
|
3
|
-
import { debounce as
|
|
1
|
+
import { defineComponent as de, useSlots as pe, ref as _, shallowRef as fe, computed as s, onMounted as me, watch as he, unref as n, createVNode as f, createElementBlock as M, createBlock as C, openBlock as m, toDisplayString as k, mergeProps as ve, h as ye, createSlots as ge, withCtx as h, createElementVNode as B, normalizeClass as v, createCommentVNode as P, resolveDynamicComponent as D, withModifiers as Ce, renderList as be, renderSlot as Se, normalizeProps as we, guardReactiveProps as Fe } from "vue";
|
|
2
|
+
import { Select as Oe, Flex as T, Checkbox as q, Spin as ke } from "@aplus-frontend/antdv";
|
|
3
|
+
import { debounce as Be, isFunction as L, isArray as Ne, isNil as xe, omit as R, isNumber as Ae } from "lodash-unified";
|
|
4
4
|
import "../../config-provider/index.mjs";
|
|
5
5
|
import "../../utils/index.mjs";
|
|
6
|
-
import { useDevWarning as
|
|
6
|
+
import { useDevWarning as Ve } from "../../utils/warning.mjs";
|
|
7
7
|
import "../../hooks/index.mjs";
|
|
8
|
-
import { useDefaultPlaceholder as
|
|
9
|
-
import
|
|
8
|
+
import { useDefaultPlaceholder as Ie } from "../hooks/use-default-placeholder.mjs";
|
|
9
|
+
import _e from "../style/index.mjs";
|
|
10
10
|
import { useSelectOptions as Me } from "./use-select-options.mjs";
|
|
11
|
-
import { isDef as
|
|
12
|
-
import { useNamespace as
|
|
11
|
+
import { isDef as N } from "../../utils/is.mjs";
|
|
12
|
+
import { useNamespace as z } from "../../config-provider/hooks/use-namespace.mjs";
|
|
13
13
|
import { useLocale as Pe } from "../../config-provider/hooks/use-locale.mjs";
|
|
14
|
-
import { useControllableValue as
|
|
15
|
-
const
|
|
14
|
+
import { useControllableValue as De } from "../../hooks/useControllableValue.mjs";
|
|
15
|
+
const Te = {
|
|
16
16
|
key: 0
|
|
17
|
-
},
|
|
17
|
+
}, qe = ["onClick"], Ye = /* @__PURE__ */ de({
|
|
18
18
|
name: "ApFieldSelect",
|
|
19
19
|
__name: "index",
|
|
20
20
|
props: {
|
|
@@ -177,41 +177,41 @@ const qe = {
|
|
|
177
177
|
}
|
|
178
178
|
},
|
|
179
179
|
emits: ["update:value"],
|
|
180
|
-
setup(
|
|
181
|
-
expose:
|
|
182
|
-
emit:
|
|
180
|
+
setup(E, {
|
|
181
|
+
expose: U,
|
|
182
|
+
emit: $
|
|
183
183
|
}) {
|
|
184
184
|
let r = 0;
|
|
185
|
-
const
|
|
186
|
-
deprecated:
|
|
187
|
-
} =
|
|
188
|
-
|
|
185
|
+
const x = pe(), e = E, {
|
|
186
|
+
deprecated: K
|
|
187
|
+
} = Ve("ApFieldSelect");
|
|
188
|
+
K(!N(e.refetchOnFocus), "refetchOnFocus", "fetchOnFocus");
|
|
189
189
|
const {
|
|
190
190
|
b
|
|
191
|
-
} =
|
|
191
|
+
} = z("field-select"), {
|
|
192
192
|
b: c
|
|
193
|
-
} =
|
|
194
|
-
t:
|
|
195
|
-
} = Pe(),
|
|
196
|
-
if (!
|
|
193
|
+
} = z("field-select-popup-option"), j = _e("field"), A = _(!1), {
|
|
194
|
+
t: V
|
|
195
|
+
} = Pe(), H = Be((t) => {
|
|
196
|
+
if (!L(e.request))
|
|
197
197
|
return;
|
|
198
198
|
r += 1;
|
|
199
199
|
const o = r;
|
|
200
200
|
g([]), u.value = !0, e.request(t).then((l) => {
|
|
201
201
|
r === o && (g(l), u.value = !1);
|
|
202
202
|
});
|
|
203
|
-
}, e.searchDelay),
|
|
203
|
+
}, e.searchDelay), W = (t, o) => {
|
|
204
204
|
const l = e.fieldNames?.label || "label";
|
|
205
205
|
return typeof o?.[l] == "string" && o[l].toLowerCase().indexOf(t.toLowerCase()) > -1;
|
|
206
206
|
}, {
|
|
207
207
|
options: d,
|
|
208
208
|
updateOptions: g
|
|
209
|
-
} = Me(e),
|
|
209
|
+
} = Me(e), S = fe(), u = _(e?.loading || !1), G = $, J = s(() => e.fetchOnFocus ?? e.refetchOnFocus), Q = s(() => {
|
|
210
210
|
if (e.multiple)
|
|
211
211
|
return e.tokenSeparators ? "tags" : "multiple";
|
|
212
212
|
});
|
|
213
213
|
async function y(t = !0) {
|
|
214
|
-
if (!
|
|
214
|
+
if (!L(e.request))
|
|
215
215
|
return;
|
|
216
216
|
u.value = !0, r += 1;
|
|
217
217
|
const o = r;
|
|
@@ -225,153 +225,151 @@ const qe = {
|
|
|
225
225
|
u.value = !1;
|
|
226
226
|
}
|
|
227
227
|
}
|
|
228
|
-
function
|
|
229
|
-
!
|
|
228
|
+
function X(t) {
|
|
229
|
+
!A.value && r === 0 && e.lazy === "first-focus" ? y() : J.value && !u.value && y(!0), e.onFocus?.(t), A.value = !0;
|
|
230
230
|
}
|
|
231
|
-
|
|
231
|
+
me(() => {
|
|
232
232
|
if (!e.lazy) {
|
|
233
233
|
y();
|
|
234
234
|
return;
|
|
235
235
|
}
|
|
236
|
-
}),
|
|
236
|
+
}), he(() => e.params, () => {
|
|
237
237
|
y();
|
|
238
238
|
}, {
|
|
239
239
|
deep: !0
|
|
240
240
|
});
|
|
241
241
|
const {
|
|
242
242
|
value: p,
|
|
243
|
-
updateValue:
|
|
244
|
-
} =
|
|
243
|
+
updateValue: w
|
|
244
|
+
} = De(e, G), Y = Ie("Select", e), Z = s(() => {
|
|
245
245
|
const t = n(p);
|
|
246
246
|
if (!t)
|
|
247
247
|
return e.emptyText;
|
|
248
248
|
const o = e.fieldNames?.label || "label", l = e.fieldNames?.value || "value";
|
|
249
|
-
return
|
|
250
|
-
}),
|
|
249
|
+
return Ne(t) ? t.map((a) => n(d).find((ce) => ce[l] === a)?.[o]).filter(Boolean).join("、") || e.emptyText : n(d).find((a) => a[l] === t)?.[o] || e.emptyText;
|
|
250
|
+
}), ee = s(() => {
|
|
251
251
|
const t = !!e?.showSearch, o = e.searchMode;
|
|
252
252
|
let l = {};
|
|
253
253
|
return t && (l = o === "request" ? {
|
|
254
254
|
defaultActiveFirstOption: !1,
|
|
255
|
-
onSearch:
|
|
255
|
+
onSearch: H,
|
|
256
256
|
notFoundContent: u.value ? void 0 : null,
|
|
257
257
|
filterOption: !1,
|
|
258
258
|
suffixIcon: null
|
|
259
259
|
} : {
|
|
260
|
-
filterOption:
|
|
260
|
+
filterOption: xe(e?.filterOption) ? W : e?.filterOption
|
|
261
261
|
}), {
|
|
262
|
-
...
|
|
263
|
-
placeholder: n(
|
|
262
|
+
...R(e, ["mode", "value", "onUpdate:value", "onSearch", "request", "searchMode", "onFocus", "onBeforeSelect"]),
|
|
263
|
+
placeholder: n(Y),
|
|
264
264
|
...l
|
|
265
265
|
};
|
|
266
|
-
}),
|
|
267
|
-
function
|
|
268
|
-
|
|
266
|
+
}), te = s(() => d.value.map((t) => t[e.fieldNames?.value || "value"])), F = s(() => d.value.filter((t) => !t.disabled).map((t) => t[e.fieldNames?.value || "value"])), I = s(() => !e.multiple || N(e.maxCount) ? !1 : Ae(e.addAll) ? te.value.length >= e.addAll : !!e.addAll), oe = s(() => e.multiple && e.allowOnlySelect && (!N(e.maxCount) || e.maxCount >= 1));
|
|
267
|
+
function le() {
|
|
268
|
+
S.value?.focus();
|
|
269
269
|
}
|
|
270
|
-
function
|
|
271
|
-
|
|
270
|
+
function ne() {
|
|
271
|
+
S.value?.blur();
|
|
272
272
|
}
|
|
273
273
|
function O(t, o) {
|
|
274
274
|
const l = e.fieldNames?.[o] ?? o;
|
|
275
275
|
return t[l];
|
|
276
276
|
}
|
|
277
|
-
function
|
|
277
|
+
function ae(t) {
|
|
278
278
|
const o = O(t, "value");
|
|
279
|
-
|
|
279
|
+
w(e.multiple ? [o] : o), e.onChange?.([o], [t]);
|
|
280
280
|
}
|
|
281
|
-
function
|
|
282
|
-
return
|
|
281
|
+
function se(t) {
|
|
282
|
+
return x.option ? f("div", {
|
|
283
283
|
class: c("custom")
|
|
284
|
-
}, [
|
|
284
|
+
}, [x.option(t)]) : f("span", {
|
|
285
285
|
class: c("label")
|
|
286
286
|
}, [O(t, "label")]);
|
|
287
287
|
}
|
|
288
|
-
const
|
|
288
|
+
const ue = s(() => {
|
|
289
289
|
const t = n(p) || [], o = F.value;
|
|
290
290
|
return o.length > 0 && o.every((l) => t.includes(l));
|
|
291
|
-
}),
|
|
291
|
+
}), re = s(() => {
|
|
292
292
|
const t = n(p) || [], o = F.value, l = o.filter((i) => t.includes(i)).length;
|
|
293
293
|
return l > 0 && l < o.length;
|
|
294
294
|
});
|
|
295
|
-
function
|
|
295
|
+
function ie() {
|
|
296
296
|
const t = new Set(n(p) || []), o = F.value;
|
|
297
297
|
o.length > 0 && o.every((a) => t.has(a)) ? o.forEach((a) => t.delete(a)) : o.forEach((a) => t.add(a));
|
|
298
298
|
const i = d.value.filter((a) => t.has(a[e.fieldNames?.value || "value"]));
|
|
299
|
-
|
|
299
|
+
w([...t]), e.onChange?.([...t], i);
|
|
300
300
|
}
|
|
301
|
-
return
|
|
302
|
-
focus:
|
|
303
|
-
blur:
|
|
301
|
+
return U({
|
|
302
|
+
focus: le,
|
|
303
|
+
blur: ne,
|
|
304
304
|
request: y
|
|
305
|
-
}), (t, o) => t.mode === "read" ? (m(), M("span",
|
|
305
|
+
}), (t, o) => t.mode === "read" ? (m(), M("span", Te, k(Z.value), 1)) : (m(), C(n(Oe), ve({
|
|
306
306
|
key: 1,
|
|
307
307
|
ref_key: "selectRef",
|
|
308
|
-
ref:
|
|
308
|
+
ref: S,
|
|
309
309
|
"allow-clear": ""
|
|
310
|
-
},
|
|
311
|
-
mode:
|
|
310
|
+
}, ee.value, {
|
|
311
|
+
mode: Q.value,
|
|
312
312
|
value: n(p),
|
|
313
313
|
options: n(d),
|
|
314
314
|
loading: u.value,
|
|
315
|
-
"menu-item-selected-icon":
|
|
316
|
-
"popup-class-name": `${n(b)("popup")} ${n(
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
}), Ce({
|
|
322
|
-
option: h((l) => [N("div", {
|
|
315
|
+
"menu-item-selected-icon": ye("span"),
|
|
316
|
+
"popup-class-name": `${n(b)("popup")} ${n(j)}`,
|
|
317
|
+
"onUpdate:value": n(w),
|
|
318
|
+
onFocus: X
|
|
319
|
+
}), ge({
|
|
320
|
+
option: h((l) => [B("div", {
|
|
323
321
|
class: v(n(c)("outter"))
|
|
324
|
-
}, [f(n(
|
|
322
|
+
}, [f(n(T), {
|
|
325
323
|
justify: "space-between",
|
|
326
324
|
align: "center",
|
|
327
325
|
class: v(n(c)("wrapper")),
|
|
328
326
|
gap: 8
|
|
329
327
|
}, {
|
|
330
|
-
default: h(() => [f(n(
|
|
328
|
+
default: h(() => [f(n(T), {
|
|
331
329
|
gap: 8,
|
|
332
330
|
align: "center",
|
|
333
331
|
class: v(n(c)("content-wrapper"))
|
|
334
332
|
}, {
|
|
335
|
-
default: h(() => [
|
|
333
|
+
default: h(() => [I.value ? (m(), C(n(q), {
|
|
336
334
|
key: 0,
|
|
337
335
|
checked: n(p)?.includes(O(l, "value"))
|
|
338
|
-
}, null, 8, ["checked"])) : P("", !0), (m(), C(
|
|
336
|
+
}, null, 8, ["checked"])) : P("", !0), (m(), C(D(se(l))))]),
|
|
339
337
|
_: 2
|
|
340
|
-
}, 1032, ["class"]),
|
|
338
|
+
}, 1032, ["class"]), oe.value && !l?.disabled ? (m(), M("span", {
|
|
341
339
|
key: 0,
|
|
342
340
|
class: v(n(c)("action")),
|
|
343
|
-
onClick:
|
|
344
|
-
},
|
|
341
|
+
onClick: Ce(() => ae(l), ["stop"])
|
|
342
|
+
}, k(n(V)("ap.field.chooseOnly")), 11, qe)) : P("", !0)]),
|
|
345
343
|
_: 2
|
|
346
344
|
}, 1032, ["class"])], 2)]),
|
|
347
345
|
_: 2
|
|
348
|
-
}, [
|
|
346
|
+
}, [be(n(R)(t.$slots, ["option"]), (l, i) => ({
|
|
349
347
|
name: i,
|
|
350
|
-
fn: h((a) => [Se(t.$slots, i, Fe(
|
|
348
|
+
fn: h((a) => [Se(t.$slots, i, we(Fe(a || {})))])
|
|
351
349
|
})), u.value ? {
|
|
352
350
|
name: "notFoundContent",
|
|
353
|
-
fn: h(() => [f(n(
|
|
351
|
+
fn: h(() => [f(n(ke), {
|
|
354
352
|
size: "small"
|
|
355
353
|
})]),
|
|
356
354
|
key: "0"
|
|
357
|
-
} : void 0,
|
|
355
|
+
} : void 0, I.value ? {
|
|
358
356
|
name: "dropdownRender",
|
|
359
357
|
fn: h(({
|
|
360
358
|
menuNode: l
|
|
361
|
-
}) => [
|
|
359
|
+
}) => [B("div", {
|
|
362
360
|
tabindex: -1,
|
|
363
361
|
class: v(n(b)("popup-all-option")),
|
|
364
|
-
onClick:
|
|
365
|
-
}, [f(n(
|
|
366
|
-
checked:
|
|
367
|
-
indeterminate:
|
|
368
|
-
}, null, 8, ["checked", "indeterminate"]),
|
|
362
|
+
onClick: ie
|
|
363
|
+
}, [f(n(q), {
|
|
364
|
+
checked: ue.value,
|
|
365
|
+
indeterminate: re.value
|
|
366
|
+
}, null, 8, ["checked", "indeterminate"]), B("span", {
|
|
369
367
|
class: v(n(b)("popup-all-option-label"))
|
|
370
|
-
},
|
|
368
|
+
}, k(n(V)("ap.field.selectAll")), 3)], 2), (m(), C(D(l)))]),
|
|
371
369
|
key: "1"
|
|
372
|
-
} : void 0]), 1040, ["mode", "value", "options", "loading", "menu-item-selected-icon", "popup-class-name", "
|
|
370
|
+
} : void 0]), 1040, ["mode", "value", "options", "loading", "menu-item-selected-icon", "popup-class-name", "onUpdate:value"]));
|
|
373
371
|
}
|
|
374
372
|
});
|
|
375
373
|
export {
|
|
376
|
-
|
|
374
|
+
Ye as default
|
|
377
375
|
};
|
package/es/src/version.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
declare const _default: "7.17.0";
|
|
1
|
+
declare const _default: "7.17.1-beta.0";
|
|
2
2
|
export default _default;
|
package/es/src/version.mjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),p=require("@aplus-frontend/antdv"),s=require("lodash-unified");require("../../config-provider/index.js");require("../../utils/index.js");const
|
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),p=require("@aplus-frontend/antdv"),s=require("lodash-unified");require("../../config-provider/index.js");require("../../utils/index.js");const X=require("../../utils/warning.js");require("../../hooks/index.js");const Y=require("../hooks/use-default-placeholder.js"),Z=require("../style/index.js"),ee=require("./use-select-options.js"),w=require("../../utils/is.js"),F=require("../../config-provider/hooks/use-namespace.js"),te=require("../../config-provider/hooks/use-locale.js"),ne=require("../../hooks/useControllableValue.js"),oe={key:0},le=["onClick"],ae=e.defineComponent({name:"ApFieldSelect",__name:"index",props:{mode:{default:"edit"},class:{},style:{},defaultValue:{},notFoundContent:{},suffixIcon:{},itemIcon:{},size:{},bordered:{type:Boolean,default:void 0},showArrow:{type:Boolean,default:void 0},variant:{},maxCount:{},transitionName:{},choiceTransitionName:{},popupClassName:{},dropdownClassName:{},placement:{},status:{},children:{},listHeight:{},onMouseenter:{},onMouseleave:{},tabindex:{},onClick:{},onFocus:{},onBlur:{},onChange:{},onKeydown:{},onKeyup:{},onMousedown:{},onSelect:{},open:{type:Boolean,default:void 0},animation:{},direction:{},disabled:{type:Boolean,default:void 0},prefixCls:{},id:{},autofocus:{type:Boolean,default:void 0},getPopupContainer:{},virtual:{type:Boolean,default:void 0},dropdownMatchSelectWidth:{},placeholder:{},loading:{type:Boolean,default:void 0},prefix:{},clearIcon:{},allowClear:{type:Boolean,default:!0},fieldNames:{},inputValue:{},searchValue:{},autoClearSearchValue:{type:Boolean,default:void 0},onDeselect:{},onActive:{},filterOption:{},filterSort:{},optionFilterProp:{},optionLabelProp:{},options:{},defaultActiveFirstOption:{type:Boolean,default:void 0},listItemHeight:{},onClickOption:{},menuItemSelectedIcon:{},labelInValue:{type:Boolean,default:void 0},showSearch:{type:Boolean,default:void 0},tagRender:{},optionLabelRender:{},onClear:{},defaultOpen:{type:Boolean,default:void 0},onDropdownVisibleChange:{},maxTagTextLength:{},maxTagCount:{},maxTagPlaceholder:{},tokenSeparators:{},removeIcon:{},dropdownStyle:{},dropdownRender:{},dropdownAlign:{},showAction:{},onPopupScroll:{},onInputKeyDown:{},emptyText:{default:"--"},request:{},multiple:{type:Boolean,default:void 0},value:{},"onUpdate:value":{},searchMode:{default:"filter"},refetchOnFocus:{type:Boolean,default:!1},fetchOnFocus:{type:Boolean,default:void 0},lazy:{type:[Boolean,String],default:!1},addAll:{type:[Boolean,Number],default:5},params:{},searchDelay:{default:300},allowOnlySelect:{type:Boolean,default:!0}},emits:["update:value"],setup(x,{expose:O,emit:V}){let r=0;const S=e.useSlots(),t=x,{deprecated:q}=X.useDevWarning("ApFieldSelect");q(!w.isDef(t.refetchOnFocus),"refetchOnFocus","fetchOnFocus");const{b:v}=F.useNamespace("field-select"),{b:i}=F.useNamespace("field-select-popup-option"),A=Z.default("field"),k=e.ref(!1),{t:B}=te.useLocale(),_=s.debounce(n=>{if(!s.isFunction(t.request))return;r+=1;const o=r;h([]),u.value=!0,t.request(n).then(l=>{r===o&&(h(l),u.value=!1)})},t.searchDelay),D=(n,o)=>{const l=t.fieldNames?.label||"label";return typeof o?.[l]=="string"&&o[l].toLowerCase().indexOf(n.toLowerCase())>-1},{options:d,updateOptions:h}=ee.useSelectOptions(t),y=e.shallowRef(),u=e.ref(t?.loading||!1),I=V,M=e.computed(()=>t.fetchOnFocus??t.refetchOnFocus),P=e.computed(()=>{if(t.multiple)return t.tokenSeparators?"tags":"multiple"});async function m(n=!0){if(!s.isFunction(t.request))return;u.value=!0,r+=1;const o=r;try{n&&h([]);const l=await t.request(void 0,t.params);if(o!==r)return;h(l)}finally{u.value=!1}}function z(n){!k.value&&r===0&&t.lazy==="first-focus"?m():M.value&&!u.value&&m(!0),t.onFocus?.(n),k.value=!0}e.onMounted(()=>{if(!t.lazy){m();return}}),e.watch(()=>t.params,()=>{m()},{deep:!0});const{value:f,updateValue:C}=ne.useControllableValue(t,I),T=Y.useDefaultPlaceholder("Select",t),L=e.computed(()=>{const n=e.unref(f);if(!n)return t.emptyText;const o=t.fieldNames?.label||"label",l=t.fieldNames?.value||"value";return s.isArray(n)?n.map(a=>e.unref(d).find(Q=>Q[l]===a)?.[o]).filter(Boolean).join("、")||t.emptyText:e.unref(d).find(a=>a[l]===n)?.[o]||t.emptyText}),R=e.computed(()=>{const n=!!t?.showSearch,o=t.searchMode;let l={};return n&&(l=o==="request"?{defaultActiveFirstOption:!1,onSearch:_,notFoundContent:u.value?void 0:null,filterOption:!1,suffixIcon:null}:{filterOption:s.isNil(t?.filterOption)?D:t?.filterOption}),{...s.omit(t,["mode","value","onUpdate:value","onSearch","request","searchMode","onFocus","onBeforeSelect"]),placeholder:e.unref(T),...l}}),E=e.computed(()=>d.value.map(n=>n[t.fieldNames?.value||"value"])),g=e.computed(()=>d.value.filter(n=>!n.disabled).map(n=>n[t.fieldNames?.value||"value"])),N=e.computed(()=>!t.multiple||w.isDef(t.maxCount)?!1:s.isNumber(t.addAll)?E.value.length>=t.addAll:!!t.addAll),U=e.computed(()=>t.multiple&&t.allowOnlySelect&&(!w.isDef(t.maxCount)||t.maxCount>=1));function $(){y.value?.focus()}function j(){y.value?.blur()}function b(n,o){const l=t.fieldNames?.[o]??o;return n[l]}function K(n){const o=b(n,"value");C(t.multiple?[o]:o),t.onChange?.([o],[n])}function H(n){return S.option?e.createVNode("div",{class:i("custom")},[S.option(n)]):e.createVNode("span",{class:i("label")},[b(n,"label")])}const W=e.computed(()=>{const n=e.unref(f)||[],o=g.value;return o.length>0&&o.every(l=>n.includes(l))}),G=e.computed(()=>{const n=e.unref(f)||[],o=g.value,l=o.filter(c=>n.includes(c)).length;return l>0&&l<o.length});function J(){const n=new Set(e.unref(f)||[]),o=g.value;o.length>0&&o.every(a=>n.has(a))?o.forEach(a=>n.delete(a)):o.forEach(a=>n.add(a));const c=d.value.filter(a=>n.has(a[t.fieldNames?.value||"value"]));C([...n]),t.onChange?.([...n],c)}return O({focus:$,blur:j,request:m}),(n,o)=>n.mode==="read"?(e.openBlock(),e.createElementBlock("span",oe,e.toDisplayString(L.value),1)):(e.openBlock(),e.createBlock(e.unref(p.Select),e.mergeProps({key:1,ref_key:"selectRef",ref:y,"allow-clear":""},R.value,{mode:P.value,value:e.unref(f),options:e.unref(d),loading:u.value,"menu-item-selected-icon":e.h("span"),"popup-class-name":`${e.unref(v)("popup")} ${e.unref(A)}`,"onUpdate:value":e.unref(C),onFocus:z}),e.createSlots({option:e.withCtx(l=>[e.createElementVNode("div",{class:e.normalizeClass(e.unref(i)("outter"))},[e.createVNode(e.unref(p.Flex),{justify:"space-between",align:"center",class:e.normalizeClass(e.unref(i)("wrapper")),gap:8},{default:e.withCtx(()=>[e.createVNode(e.unref(p.Flex),{gap:8,align:"center",class:e.normalizeClass(e.unref(i)("content-wrapper"))},{default:e.withCtx(()=>[N.value?(e.openBlock(),e.createBlock(e.unref(p.Checkbox),{key:0,checked:e.unref(f)?.includes(b(l,"value"))},null,8,["checked"])):e.createCommentVNode("",!0),(e.openBlock(),e.createBlock(e.resolveDynamicComponent(H(l))))]),_:2},1032,["class"]),U.value&&!l?.disabled?(e.openBlock(),e.createElementBlock("span",{key:0,class:e.normalizeClass(e.unref(i)("action")),onClick:e.withModifiers(()=>K(l),["stop"])},e.toDisplayString(e.unref(B)("ap.field.chooseOnly")),11,le)):e.createCommentVNode("",!0)]),_:2},1032,["class"])],2)]),_:2},[e.renderList(e.unref(s.omit)(n.$slots,["option"]),(l,c)=>({name:c,fn:e.withCtx(a=>[e.renderSlot(n.$slots,c,e.normalizeProps(e.guardReactiveProps(a||{})))])})),u.value?{name:"notFoundContent",fn:e.withCtx(()=>[e.createVNode(e.unref(p.Spin),{size:"small"})]),key:"0"}:void 0,N.value?{name:"dropdownRender",fn:e.withCtx(({menuNode:l})=>[e.createElementVNode("div",{tabindex:-1,class:e.normalizeClass(e.unref(v)("popup-all-option")),onClick:J},[e.createVNode(e.unref(p.Checkbox),{checked:W.value,indeterminate:G.value},null,8,["checked","indeterminate"]),e.createElementVNode("span",{class:e.normalizeClass(e.unref(v)("popup-all-option-label"))},e.toDisplayString(e.unref(B)("ap.field.selectAll")),3)],2),(e.openBlock(),e.createBlock(e.resolveDynamicComponent(l)))]),key:"1"}:void 0]),1040,["mode","value","options","loading","menu-item-selected-icon","popup-class-name","onUpdate:value"]))}});exports.default=ae;
|
package/lib/src/version.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
declare const _default: "7.17.0";
|
|
1
|
+
declare const _default: "7.17.1-beta.0";
|
|
2
2
|
export default _default;
|
package/lib/src/version.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e="7.17.0";exports.default=e;
|
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e="7.17.1-beta.0";exports.default=e;
|