st-comp 0.0.279 → 0.0.280
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/es/ChartLayout.cjs +1 -1
- package/es/ChartLayout.js +13 -14
- package/es/CustomFunction.cjs +2 -2
- package/es/CustomFunction.js +342 -547
- package/es/FactorWarning.cjs +1 -1
- package/es/FactorWarning.js +294 -294
- package/es/Kline.cjs +1 -1
- package/es/Kline.js +19 -19
- package/es/KlineBasic.cjs +1 -1
- package/es/KlineBasic.js +253 -253
- package/es/KlineConfig.cjs +1 -1
- package/es/KlineConfig.js +579 -553
- package/es/KlineNew.cjs +1 -1
- package/es/KlineNew.js +17 -17
- package/es/KlinePlus.cjs +2 -2
- package/es/KlinePlus.js +23 -24
- package/es/MonacoEditor.cjs +1 -1
- package/es/MonacoEditor.js +30 -29
- package/es/Pagination.cjs +1 -1
- package/es/Pagination.js +517 -425
- package/es/PasswordPrompt.cjs +1 -1
- package/es/PasswordPrompt.js +3 -3
- package/es/Table.cjs +1 -1
- package/es/Table.js +46 -46
- package/es/User.cjs +1 -1
- package/es/User.js +898 -866
- package/es/VarSelectDialog.cjs +3 -3
- package/es/VarSelectDialog.js +110 -109
- package/es/VarietyAiHelper.cjs +7 -7
- package/es/VarietyAiHelper.js +605 -443
- package/es/VarietyAutoComplete.cjs +1 -1
- package/es/VarietyAutoComplete.js +11 -11
- package/es/VarietySearch.cjs +18 -18
- package/es/VarietySearch.js +3079 -2913
- package/es/{VarietySelect-d58eee29.cjs → VarietySelect-aa082a9c.cjs} +1 -1
- package/es/{VarietySelect-41daac7b.js → VarietySelect-c402bade.js} +5 -5
- package/es/VarietyTextCopy.cjs +3 -3
- package/es/VarietyTextCopy.js +51 -51
- package/es/VirtualTable.cjs +13 -1
- package/es/VirtualTable.js +1929 -2261
- package/es/_baseClone-10bdb989.cjs +1 -0
- package/es/_baseClone-98af8b33.js +210 -0
- package/es/base-d987e5c9.cjs +5 -0
- package/es/base-dd156b8e.js +790 -0
- package/es/{castArray-7741a212.js → castArray-18eb6a41.js} +1 -1
- package/es/{castArray-35947698.cjs → castArray-d9ffe84a.cjs} +1 -1
- package/es/clamp-17c4d8aa.cjs +1 -0
- package/es/clamp-c7512966.js +10 -0
- package/es/config-provider-33a127c4.cjs +1 -0
- package/es/config-provider-563023c9.js +86 -0
- package/es/debounce-0a98a9c6.js +57 -0
- package/es/debounce-37b17615.cjs +1 -0
- package/es/dropdown-ce7496c7.cjs +1 -0
- package/es/dropdown-feea8702.js +178 -0
- package/es/el-autocomplete-d9253bba.cjs +1 -0
- package/es/el-autocomplete-eac54f9f.js +434 -0
- package/es/el-button-8259594b.cjs +1 -0
- package/es/el-button-8a9721f8.js +343 -0
- package/es/el-checkbox-6303fc92.cjs +1 -0
- package/es/el-checkbox-c328b097.js +566 -0
- package/es/el-dialog-67536fac.js +252 -0
- package/es/el-dialog-8788bcc1.cjs +1 -0
- package/es/el-divider-3f0320be.cjs +1 -0
- package/es/el-divider-c5d72961.js +51 -0
- package/es/el-empty-552baf04.js +159 -0
- package/es/el-empty-58bc2a10.cjs +1 -0
- package/es/el-form-item-8efcf2c3.js +1265 -0
- package/es/el-form-item-95e68669.cjs +12 -0
- package/es/el-input-c8a9bb71.cjs +1 -0
- package/es/el-input-e66500b7.js +761 -0
- package/es/el-input-number-68ee0d65.js +390 -0
- package/es/el-input-number-d7a81922.cjs +1 -0
- package/es/el-loading-62132db2.cjs +1 -0
- package/es/el-loading-db4c6d13.js +190 -0
- package/es/el-menu-item-4b8e7794.cjs +1 -0
- package/es/el-menu-item-c2523d82.js +824 -0
- package/es/el-message-box-7c13546c.js +481 -0
- package/es/el-message-box-fed174f0.cjs +1 -0
- package/es/el-overlay-17299785.cjs +1 -0
- package/es/el-overlay-36f223e9.js +444 -0
- package/es/el-popconfirm-520b2928.cjs +1 -0
- package/es/el-popconfirm-a857c54a.js +190 -0
- package/es/el-popper-852446fd.js +2235 -0
- package/es/el-popper-f824c63b.cjs +1 -0
- package/es/{el-scrollbar-323542e7.js → el-scrollbar-0a42c1d0.js} +4 -9
- package/es/{el-scrollbar-bc3f790d.cjs → el-scrollbar-225c6c9e.cjs} +1 -1
- package/es/el-segmented-45dcc036.cjs +1 -0
- package/es/el-segmented-bf08279f.js +168 -0
- package/es/el-select-a34348e1.js +1535 -0
- package/es/el-select-d2958ae8.cjs +1 -0
- package/es/el-table-column-ad70ee0e.cjs +14 -0
- package/es/el-table-column-e2be313e.js +3651 -0
- package/es/el-tag-527f06f0.cjs +1 -0
- package/es/el-tag-9bcfae32.js +77 -0
- package/es/el-text-f9379288.js +84 -0
- package/es/el-text-fc345ffd.cjs +1 -0
- package/es/index-2419d69a.js +468 -0
- package/es/index-3806160e.js +710 -0
- package/es/index-3a0a7c36.cjs +1 -0
- package/es/index-3e7d5ffb.cjs +1 -0
- package/es/index-3ed0c678.cjs +1 -0
- package/es/index-47d30a52.js +372 -0
- package/es/index-5dec535a.cjs +1 -0
- package/es/index-5e76a22d.cjs +1 -0
- package/es/{index-eb96e074.js → index-60900c6c.js} +223 -254
- package/es/{index-a33b2fb8.js → index-69d2353a.js} +5090 -5090
- package/es/index-71ba4c28.cjs +1 -0
- package/es/index-7711aa69.cjs +1 -0
- package/es/index-7c4d8f5d.js +47 -0
- package/es/index-86678b72.js +131 -0
- package/es/index-99bb359f.cjs +1 -0
- package/es/index-99d4335d.cjs +1 -0
- package/es/index-a0522466.js +413 -0
- package/es/index-a181f161.js +429 -0
- package/es/index-b9a26e7f.js +141 -0
- package/es/{index-a9246d17.cjs → index-bb0bc131.cjs} +109 -109
- package/es/index-d372e68f.cjs +5 -0
- package/es/index-de9ad85c.js +12 -0
- package/es/{index-44a382a5.js → index-dfb34e00.js} +12 -12
- package/es/index-f5474dcc.cjs +3 -0
- package/es/{python-8a1664e6.js → python-6eafa04b.js} +32 -31
- package/es/{python-a3db9620.cjs → python-922eca89.cjs} +1 -1
- package/es/{raf-8249652f.cjs → raf-735cc598.cjs} +1 -1
- package/es/{raf-80ef0c0a.js → raf-b4fd1e12.js} +1 -1
- package/es/scroll-07bade1e.cjs +1 -0
- package/es/scroll-70271cb1.js +35 -0
- package/es/style.css +1 -1
- package/es/toNumber-b47ceb68.cjs +1 -0
- package/es/toNumber-f077c66a.js +31 -0
- package/es/use-form-item-0a831287.cjs +2 -0
- package/es/use-form-item-187cd7db.js +422 -0
- package/es/use-global-config-17dafd40.js +71 -0
- package/es/use-global-config-c90c91f7.cjs +1 -0
- package/es/{validator-c60a8956.js → validator-800ed2ba.js} +1 -1
- package/es/validator-ee5bc3eb.cjs +1 -0
- package/es/vnode-6f7b84f0.cjs +1 -0
- package/es/vnode-8ee9bf4e.js +12 -0
- package/es/{zh-cn-b59a0910.js → zh-cn-26cc7233.js} +36 -33
- package/es/zh-cn-a22a6792.cjs +1 -0
- package/lib/bundle.js +1 -1
- package/lib/bundle.umd.cjs +271 -252
- package/lib/{index-62fa175a.js → index-74ed48c6.js} +54107 -52151
- package/lib/{python-4a48fa39.js → python-7aaa84e4.js} +1 -1
- package/lib/style.css +1 -1
- package/package.json +1 -1
- package/es/_initCloneObject-5e73c9c8.js +0 -81
- package/es/_initCloneObject-a5832933.cjs +0 -1
- package/es/base-a5af3db3.js +0 -288
- package/es/base-ef747d02.cjs +0 -5
- package/es/config-provider-06ea6b42.cjs +0 -1
- package/es/config-provider-88b637a8.js +0 -59
- package/es/dayjs.min-2c20abe6.cjs +0 -1
- package/es/dayjs.min-8313b006.js +0 -299
- package/es/debounce-62f5b6e8.cjs +0 -1
- package/es/debounce-8d53f4dd.js +0 -83
- package/es/dropdown-4ce4c3e2.cjs +0 -1
- package/es/dropdown-72fbc15d.js +0 -178
- package/es/el-autocomplete-6cafcdf1.js +0 -329
- package/es/el-autocomplete-e0857c5b.cjs +0 -1
- package/es/el-button-613e0bb2.cjs +0 -1
- package/es/el-button-94d3de38.js +0 -272
- package/es/el-checkbox-6d4cb393.js +0 -459
- package/es/el-checkbox-e90762df.cjs +0 -1
- package/es/el-dialog-02942e22.cjs +0 -1
- package/es/el-dialog-5e30161f.js +0 -276
- package/es/el-divider-4713d74c.cjs +0 -1
- package/es/el-divider-4e059794.js +0 -45
- package/es/el-empty-1697ded8.cjs +0 -1
- package/es/el-empty-33cb66f1.js +0 -183
- package/es/el-form-item-44f060d8.cjs +0 -12
- package/es/el-form-item-9e8969ea.js +0 -1269
- package/es/el-input-342b2def.js +0 -531
- package/es/el-input-9a9a7f7f.cjs +0 -1
- package/es/el-input-number-65c847d6.cjs +0 -1
- package/es/el-input-number-c22b803a.js +0 -311
- package/es/el-loading-8179b497.cjs +0 -1
- package/es/el-loading-bcc51e3d.js +0 -203
- package/es/el-menu-item-339baf6d.js +0 -768
- package/es/el-menu-item-83186444.cjs +0 -1
- package/es/el-message-box-035b699c.js +0 -489
- package/es/el-message-box-c62d3217.cjs +0 -1
- package/es/el-overlay-3e17604b.js +0 -324
- package/es/el-overlay-8f1da9e8.cjs +0 -1
- package/es/el-popconfirm-4e32ec1b.cjs +0 -1
- package/es/el-popconfirm-f8a86e2c.js +0 -162
- package/es/el-popper-a4f3ae4d.cjs +0 -1
- package/es/el-popper-fbd0dcea.js +0 -2094
- package/es/el-segmented-56bd58a8.js +0 -142
- package/es/el-segmented-833ac177.cjs +0 -1
- package/es/el-select-44fa547d.js +0 -1256
- package/es/el-select-70806166.cjs +0 -1
- package/es/el-table-column-3e2cdfca.cjs +0 -14
- package/es/el-table-column-b74a857d.js +0 -3432
- package/es/el-tag-66c83156.js +0 -117
- package/es/el-tag-9c2f329f.cjs +0 -1
- package/es/el-text-034bd3f4.js +0 -67
- package/es/el-text-6b2374bb.cjs +0 -1
- package/es/index-00f6ca75.cjs +0 -1
- package/es/index-185792a7.cjs +0 -1
- package/es/index-1e2a38ab.js +0 -113
- package/es/index-2e331d74.js +0 -10
- package/es/index-3153c1db.cjs +0 -1
- package/es/index-5216d5f5.js +0 -406
- package/es/index-5c0dd943.cjs +0 -1
- package/es/index-657047bb.js +0 -513
- package/es/index-870b6c9d.cjs +0 -1
- package/es/index-8c2d7e05.js +0 -368
- package/es/index-960806da.js +0 -314
- package/es/index-9780a537.cjs +0 -1
- package/es/index-9d16cea8.cjs +0 -1
- package/es/index-ac8dc53d.cjs +0 -1
- package/es/index-bb833443.cjs +0 -1
- package/es/index-c5f2d372.js +0 -326
- package/es/index-c6584658.js +0 -163
- package/es/index-d77a7336.js +0 -204
- package/es/index-eea0bcb3.cjs +0 -1
- package/es/index-f034b910.js +0 -60
- package/es/index-f1c702f6.cjs +0 -1
- package/es/index-f58b2920.cjs +0 -1
- package/es/scroll-679bd6bf.js +0 -35
- package/es/scroll-b108dabd.cjs +0 -1
- package/es/use-form-common-props-ac666630.cjs +0 -1
- package/es/use-form-common-props-ed72e914.js +0 -364
- package/es/use-global-config-23472471.cjs +0 -1
- package/es/use-global-config-ee406d58.js +0 -72
- package/es/validator-366dbf39.cjs +0 -1
- package/es/vnode-5ddb7ed1.js +0 -14
- package/es/vnode-b906ae6d.cjs +0 -1
- package/es/zh-cn-c21d12d8.cjs +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";const t=require("./index-
|
|
1
|
+
"use strict";const t=require("./index-d372e68f.cjs");function e(){if(!arguments.length)return[];var r=arguments[0];return t.isArray(r)?r:[r]}exports.castArray=e;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";const n=require("./toNumber-b47ceb68.cjs");function t(d,i,f){return d===d&&(f!==void 0&&(d=d<=f?d:f),i!==void 0&&(d=d>=i?d:i)),d}function c(d,i,f){return f===void 0&&(f=i,i=void 0),f!==void 0&&(f=n.toNumber(f),f=f===f?f:0),i!==void 0&&(i=n.toNumber(i),i=i===i?i:0),t(n.toNumber(d),i,f)}exports.clamp=c;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { t as n } from "./toNumber-f077c66a.js";
|
|
2
|
+
function t(d, f, i) {
|
|
3
|
+
return d === d && (i !== void 0 && (d = d <= i ? d : i), f !== void 0 && (d = d >= f ? d : f)), d;
|
|
4
|
+
}
|
|
5
|
+
function c(d, f, i) {
|
|
6
|
+
return i === void 0 && (i = f, f = void 0), i !== void 0 && (i = n(i), i = i === i ? i : 0), f !== void 0 && (f = n(f), f = f === f ? f : 0), t(n(d), f, i);
|
|
7
|
+
}
|
|
8
|
+
export {
|
|
9
|
+
c
|
|
10
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";const a=require("./use-global-config-c90c91f7.cjs"),e=require("./base-d987e5c9.cjs"),u=require("./use-form-item-0a831287.cjs"),d=require("./index-3ed0c678.cjs"),o=require("vue"),l=e.buildProps({a11y:{type:Boolean,default:!0},locale:{type:e.definePropType(Object)},size:u.useSizeProp,button:{type:e.definePropType(Object)},card:{type:e.definePropType(Object)},dialog:{type:e.definePropType(Object)},link:{type:e.definePropType(Object)},experimentalFeatures:{type:e.definePropType(Object)},keyboardNavigation:{type:Boolean,default:!0},message:{type:e.definePropType(Object)},zIndex:Number,namespace:{type:String,default:"el"},table:{type:e.definePropType(Object)},...d.useEmptyValuesProps}),p={placement:"top"},c=o.defineComponent({name:"ElConfigProvider",props:l,setup(r,{slots:i}){const t=a.provideGlobalConfig(r);return o.watch(()=>r.message,s=>{var n;Object.assign(p,((n=t==null?void 0:t.value)==null?void 0:n.message)??{},s??{})},{immediate:!0,deep:!0}),()=>o.renderSlot(i,"default",{config:t==null?void 0:t.value})}});exports.ConfigProvider=c;exports.messageConfig=p;
|
|
@@ -0,0 +1,86 @@
|
|
|
1
|
+
import { p as s } from "./use-global-config-17dafd40.js";
|
|
2
|
+
import { b as i, c as e } from "./base-dd156b8e.js";
|
|
3
|
+
import { h as n } from "./use-form-item-187cd7db.js";
|
|
4
|
+
import { u as m } from "./index-47d30a52.js";
|
|
5
|
+
import { defineComponent as l, watch as u, renderSlot as c } from "vue";
|
|
6
|
+
const d = i({
|
|
7
|
+
/**
|
|
8
|
+
* @description Controlling if the users want a11y features
|
|
9
|
+
*/
|
|
10
|
+
a11y: {
|
|
11
|
+
type: Boolean,
|
|
12
|
+
default: !0
|
|
13
|
+
},
|
|
14
|
+
/**
|
|
15
|
+
* @description Locale Object
|
|
16
|
+
*/
|
|
17
|
+
locale: { type: e(Object) },
|
|
18
|
+
/**
|
|
19
|
+
* @description global component size
|
|
20
|
+
*/
|
|
21
|
+
size: n,
|
|
22
|
+
/**
|
|
23
|
+
* @description button related configuration, [see the following table](https://element-plus.org/en-US/component/config-provider.html#button-attribute)
|
|
24
|
+
*/
|
|
25
|
+
button: { type: e(Object) },
|
|
26
|
+
/**
|
|
27
|
+
* @description card related configuration, [see the following table](https://element-plus.org/en-US/component/config-provider.html#card-attribute)
|
|
28
|
+
*/
|
|
29
|
+
card: { type: e(Object) },
|
|
30
|
+
/**
|
|
31
|
+
* @description dialog related configuration, [see the following table](https://element-plus.org/en-US/component/config-provider.html#dialog-attribute)
|
|
32
|
+
*/
|
|
33
|
+
dialog: { type: e(Object) },
|
|
34
|
+
/**
|
|
35
|
+
* @description link related configuration, [see the following table](https://element-plus.org/en-US/component/config-provider.html#link-attribute)
|
|
36
|
+
*/
|
|
37
|
+
link: { type: e(Object) },
|
|
38
|
+
/**
|
|
39
|
+
* @description features at experimental stage to be added, all features are default to be set to false, [see the following table](https://element-plus.org/en-US/component/config-provider.html#experimental-features) | ^[object]
|
|
40
|
+
*/
|
|
41
|
+
experimentalFeatures: { type: e(Object) },
|
|
42
|
+
/**
|
|
43
|
+
* @description Controls if we should handle keyboard navigation
|
|
44
|
+
*/
|
|
45
|
+
keyboardNavigation: {
|
|
46
|
+
type: Boolean,
|
|
47
|
+
default: !0
|
|
48
|
+
},
|
|
49
|
+
/**
|
|
50
|
+
* @description message related configuration, [see the following table](https://element-plus.org/en-US/component/config-provider.html#message-attribute)
|
|
51
|
+
*/
|
|
52
|
+
message: { type: e(Object) },
|
|
53
|
+
/**
|
|
54
|
+
* @description global Initial zIndex
|
|
55
|
+
*/
|
|
56
|
+
zIndex: Number,
|
|
57
|
+
/**
|
|
58
|
+
* @description global component className prefix (cooperated with [$namespace](https://github.com/element-plus/element-plus/blob/dev/packages/theme-chalk/src/mixins/config.scss#L1)) | ^[string]
|
|
59
|
+
*/
|
|
60
|
+
namespace: {
|
|
61
|
+
type: String,
|
|
62
|
+
default: "el"
|
|
63
|
+
},
|
|
64
|
+
/**
|
|
65
|
+
* @description table related configuration, [see the following table](https://element-plus.org/en-US/component/config-provider.html#table-attribute)
|
|
66
|
+
*/
|
|
67
|
+
table: { type: e(Object) },
|
|
68
|
+
...m
|
|
69
|
+
}), b = { placement: "top" }, P = l({
|
|
70
|
+
name: "ElConfigProvider",
|
|
71
|
+
props: d,
|
|
72
|
+
setup(o, { slots: r }) {
|
|
73
|
+
const t = s(o);
|
|
74
|
+
return u(() => o.message, (p) => {
|
|
75
|
+
var a;
|
|
76
|
+
Object.assign(b, ((a = t == null ? void 0 : t.value) == null ? void 0 : a.message) ?? {}, p ?? {});
|
|
77
|
+
}, {
|
|
78
|
+
immediate: !0,
|
|
79
|
+
deep: !0
|
|
80
|
+
}), () => c(r, "default", { config: t == null ? void 0 : t.value });
|
|
81
|
+
}
|
|
82
|
+
});
|
|
83
|
+
export {
|
|
84
|
+
P as C,
|
|
85
|
+
b as m
|
|
86
|
+
};
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
import { O as S, H as y } from "./base-dd156b8e.js";
|
|
2
|
+
import { t as b } from "./toNumber-f077c66a.js";
|
|
3
|
+
var O = function() {
|
|
4
|
+
return S.Date.now();
|
|
5
|
+
};
|
|
6
|
+
const h = O;
|
|
7
|
+
var R = "Expected a function", A = Math.max, F = Math.min;
|
|
8
|
+
function j(x, i, a) {
|
|
9
|
+
var u, o, m, f, e, r, d = 0, E = !1, c = !1, g = !0;
|
|
10
|
+
if (typeof x != "function")
|
|
11
|
+
throw new TypeError(R);
|
|
12
|
+
i = b(i) || 0, y(a) && (E = !!a.leading, c = "maxWait" in a, m = c ? A(b(a.maxWait) || 0, i) : m, g = "trailing" in a ? !!a.trailing : g);
|
|
13
|
+
function v(n) {
|
|
14
|
+
var t = u, l = o;
|
|
15
|
+
return u = o = void 0, d = n, f = x.apply(l, t), f;
|
|
16
|
+
}
|
|
17
|
+
function p(n) {
|
|
18
|
+
return d = n, e = setTimeout(s, i), E ? v(n) : f;
|
|
19
|
+
}
|
|
20
|
+
function C(n) {
|
|
21
|
+
var t = n - r, l = n - d, W = i - t;
|
|
22
|
+
return c ? F(W, m - l) : W;
|
|
23
|
+
}
|
|
24
|
+
function k(n) {
|
|
25
|
+
var t = n - r, l = n - d;
|
|
26
|
+
return r === void 0 || t >= i || t < 0 || c && l >= m;
|
|
27
|
+
}
|
|
28
|
+
function s() {
|
|
29
|
+
var n = h();
|
|
30
|
+
if (k(n))
|
|
31
|
+
return I(n);
|
|
32
|
+
e = setTimeout(s, C(n));
|
|
33
|
+
}
|
|
34
|
+
function I(n) {
|
|
35
|
+
return e = void 0, g && u ? v(n) : (u = o = void 0, f);
|
|
36
|
+
}
|
|
37
|
+
function L() {
|
|
38
|
+
e !== void 0 && clearTimeout(e), d = 0, u = r = o = e = void 0;
|
|
39
|
+
}
|
|
40
|
+
function M() {
|
|
41
|
+
return e === void 0 ? f : I(h());
|
|
42
|
+
}
|
|
43
|
+
function T() {
|
|
44
|
+
var n = h(), t = k(n);
|
|
45
|
+
if (u = arguments, o = this, r = n, t) {
|
|
46
|
+
if (e === void 0)
|
|
47
|
+
return p(r);
|
|
48
|
+
if (c)
|
|
49
|
+
return clearTimeout(e), e = setTimeout(s, i), v(r);
|
|
50
|
+
}
|
|
51
|
+
return e === void 0 && (e = setTimeout(s, i)), f;
|
|
52
|
+
}
|
|
53
|
+
return T.cancel = L, T.flush = M, T;
|
|
54
|
+
}
|
|
55
|
+
export {
|
|
56
|
+
j as d
|
|
57
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";const C=require("./base-d987e5c9.cjs"),W=require("./toNumber-b47ceb68.cjs");var y=function(){return C.root.Date.now()};const h=y;var R="Expected a function",q=Math.max,A=Math.min;function F(b,i,u){var a,o,s,f,n,r,c=0,x=!1,d=!1,g=!0;if(typeof b!="function")throw new TypeError(R);i=W.toNumber(i)||0,C.isObject$1(u)&&(x=!!u.leading,d="maxWait"in u,s=d?q(W.toNumber(u.maxWait)||0,i):s,g="trailing"in u?!!u.trailing:g);function v(e){var t=a,l=o;return a=o=void 0,c=e,f=b.apply(l,t),f}function L(e){return c=e,n=setTimeout(m,i),x?v(e):f}function M(e){var t=e-r,l=e-c,I=i-t;return d?A(I,s-l):I}function E(e){var t=e-r,l=e-c;return r===void 0||t>=i||t<0||d&&l>=s}function m(){var e=h();if(E(e))return k(e);n=setTimeout(m,M(e))}function k(e){return n=void 0,g&&a?v(e):(a=o=void 0,f)}function N(){n!==void 0&&clearTimeout(n),c=0,a=r=o=n=void 0}function S(){return n===void 0?f:k(h())}function T(){var e=h(),t=E(e);if(a=arguments,o=this,r=e,t){if(n===void 0)return L(r);if(d)return clearTimeout(n),n=setTimeout(m,i),v(r)}return n===void 0&&(n=setTimeout(m,i)),f}return T.cancel=N,T.flush=S,T}exports.debounce=F;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";const e=require("./el-popper-f824c63b.cjs"),t=require("./base-d987e5c9.cjs"),o=require("./use-form-item-0a831287.cjs"),p=t.buildProps({trigger:{...e.useTooltipTriggerProps.trigger,type:t.definePropType([String,Array])},triggerKeys:{type:t.definePropType(Array),default:()=>[e.EVENT_CODE.enter,e.EVENT_CODE.numpadEnter,e.EVENT_CODE.space,e.EVENT_CODE.down]},virtualTriggering:e.useTooltipTriggerProps.virtualTriggering,virtualRef:e.useTooltipTriggerProps.virtualRef,effect:{...e.useTooltipContentProps.effect,default:"light"},type:{type:t.definePropType(String)},placement:{type:t.definePropType(String),default:"bottom"},popperOptions:{type:t.definePropType(Object),default:()=>({})},id:String,size:{type:String,default:""},splitButton:Boolean,hideOnClick:{type:Boolean,default:!0},loop:{type:Boolean,default:!0},showArrow:{type:Boolean,default:!0},showTimeout:{type:Number,default:150},hideTimeout:{type:Number,default:150},tabindex:{type:t.definePropType([Number,String]),default:0},maxHeight:{type:t.definePropType([Number,String]),default:""},popperClass:e.useTooltipContentProps.popperClass,popperStyle:e.useTooltipContentProps.popperStyle,disabled:Boolean,role:{type:String,values:e.roleTypes,default:"menu"},buttonProps:{type:t.definePropType(Object)},teleported:e.useTooltipContentProps.teleported,appendTo:e.useTooltipContentProps.appendTo,persistent:{type:Boolean,default:!0}}),r=t.buildProps({command:{type:[Object,String,Number],default:()=>({})},disabled:Boolean,divided:Boolean,textValue:String,icon:{type:o.iconPropType}}),n=t.buildProps({onKeydown:{type:t.definePropType(Function)}});exports.dropdownItemProps=r;exports.dropdownMenuProps=n;exports.dropdownProps=p;
|
|
@@ -0,0 +1,178 @@
|
|
|
1
|
+
import { c as r, a as o, b as t, r as a } from "./el-popper-852446fd.js";
|
|
2
|
+
import { b as p, c as e } from "./base-dd156b8e.js";
|
|
3
|
+
import { i as n } from "./use-form-item-187cd7db.js";
|
|
4
|
+
const u = p({
|
|
5
|
+
/**
|
|
6
|
+
* @description how to trigger
|
|
7
|
+
*/
|
|
8
|
+
trigger: {
|
|
9
|
+
...r.trigger,
|
|
10
|
+
type: e([String, Array])
|
|
11
|
+
},
|
|
12
|
+
triggerKeys: {
|
|
13
|
+
type: e(Array),
|
|
14
|
+
default: () => [
|
|
15
|
+
o.enter,
|
|
16
|
+
o.numpadEnter,
|
|
17
|
+
o.space,
|
|
18
|
+
o.down
|
|
19
|
+
]
|
|
20
|
+
},
|
|
21
|
+
/**
|
|
22
|
+
* @description Indicates whether virtual triggering is enabled
|
|
23
|
+
*/
|
|
24
|
+
virtualTriggering: r.virtualTriggering,
|
|
25
|
+
/**
|
|
26
|
+
* @description Indicates the reference element to which the dropdown is attached
|
|
27
|
+
*/
|
|
28
|
+
virtualRef: r.virtualRef,
|
|
29
|
+
/**
|
|
30
|
+
* @description Tooltip theme, built-in theme: `dark` / `light`
|
|
31
|
+
*/
|
|
32
|
+
effect: {
|
|
33
|
+
...t.effect,
|
|
34
|
+
default: "light"
|
|
35
|
+
},
|
|
36
|
+
/**
|
|
37
|
+
* @description menu button type, refer to `Button` Component, only works when `split-button` is true
|
|
38
|
+
*/
|
|
39
|
+
type: { type: e(String) },
|
|
40
|
+
/**
|
|
41
|
+
* @description placement of pop menu
|
|
42
|
+
*/
|
|
43
|
+
placement: {
|
|
44
|
+
type: e(String),
|
|
45
|
+
default: "bottom"
|
|
46
|
+
},
|
|
47
|
+
/**
|
|
48
|
+
* @description [popper.js](https://popper.js.org/docs/v2/) parameters
|
|
49
|
+
*/
|
|
50
|
+
popperOptions: {
|
|
51
|
+
type: e(Object),
|
|
52
|
+
default: () => ({})
|
|
53
|
+
},
|
|
54
|
+
id: String,
|
|
55
|
+
/**
|
|
56
|
+
* @description menu size, also works on the split button
|
|
57
|
+
*/
|
|
58
|
+
size: {
|
|
59
|
+
type: String,
|
|
60
|
+
default: ""
|
|
61
|
+
},
|
|
62
|
+
/**
|
|
63
|
+
* @description whether a button group is displayed
|
|
64
|
+
*/
|
|
65
|
+
splitButton: Boolean,
|
|
66
|
+
/**
|
|
67
|
+
* @description whether to hide menu after clicking menu-item
|
|
68
|
+
*/
|
|
69
|
+
hideOnClick: {
|
|
70
|
+
type: Boolean,
|
|
71
|
+
default: !0
|
|
72
|
+
},
|
|
73
|
+
loop: {
|
|
74
|
+
type: Boolean,
|
|
75
|
+
default: !0
|
|
76
|
+
},
|
|
77
|
+
/**
|
|
78
|
+
* @description whether the tooltip content has an arrow
|
|
79
|
+
*/
|
|
80
|
+
showArrow: {
|
|
81
|
+
type: Boolean,
|
|
82
|
+
default: !0
|
|
83
|
+
},
|
|
84
|
+
/**
|
|
85
|
+
* @description delay time before show a dropdown (only works when trigger is `hover`)
|
|
86
|
+
*/
|
|
87
|
+
showTimeout: {
|
|
88
|
+
type: Number,
|
|
89
|
+
default: 150
|
|
90
|
+
},
|
|
91
|
+
/**
|
|
92
|
+
* @description delay time before hide a dropdown (only works when trigger is `hover`)
|
|
93
|
+
*/
|
|
94
|
+
hideTimeout: {
|
|
95
|
+
type: Number,
|
|
96
|
+
default: 150
|
|
97
|
+
},
|
|
98
|
+
/**
|
|
99
|
+
* @description [tabindex](https://developer.mozilla.org/en-US/docs/Web/HTML/Global_attributes/tabindex) of Dropdown
|
|
100
|
+
*/
|
|
101
|
+
tabindex: {
|
|
102
|
+
type: e([Number, String]),
|
|
103
|
+
default: 0
|
|
104
|
+
},
|
|
105
|
+
/**
|
|
106
|
+
* @description the max height of menu
|
|
107
|
+
*/
|
|
108
|
+
maxHeight: {
|
|
109
|
+
type: e([Number, String]),
|
|
110
|
+
default: ""
|
|
111
|
+
},
|
|
112
|
+
/**
|
|
113
|
+
* @description custom class name for Dropdown's dropdown
|
|
114
|
+
*/
|
|
115
|
+
popperClass: t.popperClass,
|
|
116
|
+
/**
|
|
117
|
+
* @description custom style for Dropdown's dropdown
|
|
118
|
+
*/
|
|
119
|
+
popperStyle: t.popperStyle,
|
|
120
|
+
/**
|
|
121
|
+
* @description whether to disable
|
|
122
|
+
*/
|
|
123
|
+
disabled: Boolean,
|
|
124
|
+
/**
|
|
125
|
+
* @description the ARIA role attribute for the dropdown menu. Depending on the use case, you may want to change this to 'navigation'
|
|
126
|
+
*/
|
|
127
|
+
role: {
|
|
128
|
+
type: String,
|
|
129
|
+
values: a,
|
|
130
|
+
default: "menu"
|
|
131
|
+
},
|
|
132
|
+
buttonProps: { type: e(Object) },
|
|
133
|
+
/**
|
|
134
|
+
* @description whether the dropdown popup is teleported to the body
|
|
135
|
+
*/
|
|
136
|
+
teleported: t.teleported,
|
|
137
|
+
/**
|
|
138
|
+
* @description which element the dropdown CONTENT appends to
|
|
139
|
+
*/
|
|
140
|
+
appendTo: t.appendTo,
|
|
141
|
+
/**
|
|
142
|
+
* @description when dropdown inactive and `persistent` is `false` , dropdown menu will be destroyed
|
|
143
|
+
*/
|
|
144
|
+
persistent: {
|
|
145
|
+
type: Boolean,
|
|
146
|
+
default: !0
|
|
147
|
+
}
|
|
148
|
+
}), s = p({
|
|
149
|
+
/**
|
|
150
|
+
* @description a command to be dispatched to Dropdown's `command` callback
|
|
151
|
+
*/
|
|
152
|
+
command: {
|
|
153
|
+
type: [
|
|
154
|
+
Object,
|
|
155
|
+
String,
|
|
156
|
+
Number
|
|
157
|
+
],
|
|
158
|
+
default: () => ({})
|
|
159
|
+
},
|
|
160
|
+
/**
|
|
161
|
+
* @description whether the item is disabled
|
|
162
|
+
*/
|
|
163
|
+
disabled: Boolean,
|
|
164
|
+
/**
|
|
165
|
+
* @description whether a divider is displayed
|
|
166
|
+
*/
|
|
167
|
+
divided: Boolean,
|
|
168
|
+
textValue: String,
|
|
169
|
+
/**
|
|
170
|
+
* @description custom icon
|
|
171
|
+
*/
|
|
172
|
+
icon: { type: n }
|
|
173
|
+
}), y = p({ onKeydown: { type: e(Function) } });
|
|
174
|
+
export {
|
|
175
|
+
s as a,
|
|
176
|
+
y as b,
|
|
177
|
+
u as d
|
|
178
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";const a=require("./base-d987e5c9.cjs"),l=require("./el-popper-f824c63b.cjs"),ue=require("./index-d372e68f.cjs"),z=require("./index-3e7d5ffb.cjs"),K=require("./use-form-item-0a831287.cjs"),V=require("./el-input-c8a9bb71.cjs"),ie=require("./index-3a0a7c36.cjs"),e=require("vue"),ce=a.buildProps({...V.inputProps,valueKey:{type:String,default:"value"},modelValue:{type:[String,Number],default:""},debounce:{type:Number,default:300},placement:{type:a.definePropType(String),values:["top","top-start","top-end","bottom","bottom-start","bottom-end"],default:"bottom-start"},fetchSuggestions:{type:a.definePropType([Function,Array]),default:a.NOOP},popperClass:l.useTooltipContentProps.popperClass,popperStyle:l.useTooltipContentProps.popperStyle,popperOptions:l.useTooltipContentProps.popperOptions,showArrow:{type:Boolean,default:!0},triggerOnFocus:{type:Boolean,default:!0},selectWhenUnmatched:Boolean,hideLoading:Boolean,teleported:l.useTooltipContentProps.teleported,appendTo:l.useTooltipContentProps.appendTo,highlightFirstItem:Boolean,fitInputWidth:Boolean,loopNavigation:{type:Boolean,default:!0}}),pe={[l.UPDATE_MODEL_EVENT]:n=>a.isString(n)||a.isNumber(n),[l.INPUT_EVENT]:n=>a.isString(n)||a.isNumber(n),[l.CHANGE_EVENT]:n=>a.isString(n)||a.isNumber(n),focus:n=>n instanceof FocusEvent,blur:n=>n instanceof FocusEvent,clear:()=>!0,select:n=>a.isObject(n)},de=["aria-expanded","aria-owns"],fe={key:0},ve=["id","aria-selected","onClick"],L="ElAutocomplete";var ge=e.defineComponent({name:L,inheritAttrs:!1,__name:"autocomplete",props:ce,emits:pe,setup(n,{expose:R,emit:W}){const r=n,p=W,H=e.computed(()=>{const t=V.ElInput.props??[];return l.pick(r,a.isArray(t)?t:Object.keys(t))}),G=e.useAttrs(),$=K.useFormDisabled(),c=a.useNamespace("autocomplete"),f=e.ref(),A=e.ref(),C=e.ref(),O=e.ref();let P=!1,b=!1;const i=e.ref([]),s=e.ref(-1),I=e.ref(""),d=e.ref(!1),N=e.ref(!1),E=e.ref(!1),h=ue.useId(),j=e.computed(()=>G.style),g=e.computed(()=>(i.value.length>0||E.value)&&d.value),B=e.computed(()=>!r.hideLoading&&E.value),J=e.computed(()=>f.value?Array.from(f.value.$el.querySelectorAll("input")):[]),Q=()=>{g.value&&(I.value=`${f.value.$el.offsetWidth}px`)},X=()=>{s.value=-1},F=async t=>{if(N.value)return;const o=u=>{E.value=!1,!N.value&&(a.isArray(u)?(i.value=u,s.value=r.highlightFirstItem?0:-1):a.throwError(L,"autocomplete suggestions must be an array"))};if(E.value=!0,a.isArray(r.fetchSuggestions))o(r.fetchSuggestions);else{const u=await r.fetchSuggestions(t,o);a.isArray(u)&&o(u)}},T=a.useDebounceFn(F,e.computed(()=>r.debounce)),Y=t=>{const o=!!t;if(p(l.INPUT_EVENT,t),p(l.UPDATE_MODEL_EVENT,t),N.value=!1,d.value||(d.value=o),!r.triggerOnFocus&&!t){N.value=!0,i.value=[];return}T(t)},Z=t=>{var o;$.value||(((o=t.target)==null?void 0:o.tagName)!=="INPUT"||J.value.includes(document.activeElement))&&(d.value=!0)},ee=t=>{p(l.CHANGE_EVENT,t)},te=t=>{if(b)b=!1;else{d.value=!0,p("focus",t);const o=r.modelValue??"";r.triggerOnFocus&&!P&&(i.value=[],s.value=-1,T(String(o)))}},M=t=>{setTimeout(()=>{var o;if((o=C.value)!=null&&o.isFocusInsideContent()){b=!0;return}d.value&&y(),p("blur",t)})},oe=()=>{d.value=!1,p(l.UPDATE_MODEL_EVENT,""),p("clear")},q=async()=>{var t;(t=f.value)!=null&&t.isComposing||(g.value&&s.value>=0&&s.value<i.value.length?w(i.value[s.value]):(r.selectWhenUnmatched&&(p("select",{value:r.modelValue}),i.value=[],s.value=-1),d.value=!0,T(String(r.modelValue))))},le=t=>{g.value&&(t.preventDefault(),t.stopPropagation(),y())},y=()=>{d.value=!1},ne=()=>{var t;(t=f.value)==null||t.focus()},se=()=>{var t;(t=f.value)==null||t.blur()},w=async t=>{p(l.INPUT_EVENT,t[r.valueKey]),p(l.UPDATE_MODEL_EVENT,t[r.valueKey]),p("select",t),i.value=[],s.value=-1},m=t=>{var _,x;if(!g.value||E.value)return;if(t<0){if(!r.loopNavigation){s.value=-1;return}t=i.value.length-1}t>=i.value.length&&(t=r.loopNavigation?0:i.value.length-1);const[o,u]=ae(),v=u[t],D=o.scrollTop,{offsetTop:k,scrollHeight:U}=v;k+U>D+o.clientHeight&&(o.scrollTop=k+U-o.clientHeight),k<D&&(o.scrollTop=k),s.value=t,(x=(_=f.value)==null?void 0:_.ref)==null||x.setAttribute("aria-activedescendant",`${h.value}-item-${s.value}`)},ae=()=>{const t=A.value.querySelector(`.${c.be("suggestion","wrap")}`);return[t,t.querySelectorAll(`.${c.be("suggestion","list")} li`)]},S=K.onClickOutside(O,t=>{var u;if((u=C.value)!=null&&u.isFocusInsideContent())return;const o=b;b=!1,g.value&&(o?M(new FocusEvent("blur",t)):y())}),re=t=>{switch(l.getEventCode(t)){case l.EVENT_CODE.up:t.preventDefault(),m(s.value-1);break;case l.EVENT_CODE.down:t.preventDefault(),m(s.value+1);break;case l.EVENT_CODE.enter:case l.EVENT_CODE.numpadEnter:t.preventDefault(),q();break;case l.EVENT_CODE.tab:y();break;case l.EVENT_CODE.esc:le(t);break;case l.EVENT_CODE.home:t.preventDefault(),m(0);break;case l.EVENT_CODE.end:t.preventDefault(),m(i.value.length-1);break;case l.EVENT_CODE.pageUp:t.preventDefault(),m(Math.max(0,s.value-10));break;case l.EVENT_CODE.pageDown:t.preventDefault(),m(Math.min(i.value.length-1,s.value+10));break}};return e.onBeforeUnmount(()=>{S==null||S()}),e.onMounted(()=>{var o;const t=(o=f.value)==null?void 0:o.ref;t&&([{key:"role",value:"textbox"},{key:"aria-autocomplete",value:"list"},{key:"aria-controls",value:h.value},{key:"aria-activedescendant",value:`${h.value}-item-${s.value}`}].forEach(({key:u,value:v})=>t.setAttribute(u,v)),P=t.hasAttribute("readonly"))}),R({highlightedIndex:s,activated:d,loading:E,inputRef:f,popperRef:C,suggestions:i,handleSelect:w,handleKeyEnter:q,focus:ne,blur:se,close:y,highlight:m,getData:F}),(t,o)=>(e.openBlock(),e.createBlock(e.unref(l.ElTooltip),{ref_key:"popperRef",ref:C,visible:g.value,placement:n.placement,"fallback-placements":["bottom-start","top-start"],"popper-class":[e.unref(c).e("popper"),n.popperClass],"popper-style":n.popperStyle,"popper-options":n.popperOptions,"show-arrow":n.showArrow,teleported:n.teleported,"append-to":n.appendTo,"gpu-acceleration":!1,pure:"","manual-mode":"",effect:"light",trigger:"click",transition:`${e.unref(c).namespace.value}-zoom-in-top`,persistent:"",role:"listbox",onBeforeShow:Q,onHide:X},{content:e.withCtx(()=>[e.createElementVNode("div",{ref_key:"regionRef",ref:A,class:e.normalizeClass([e.unref(c).b("suggestion"),e.unref(c).is("loading",B.value)]),style:e.normalizeStyle({[n.fitInputWidth?"width":"minWidth"]:I.value,outline:"none"}),role:"region"},[t.$slots.header?(e.openBlock(),e.createElementBlock("div",{key:0,class:e.normalizeClass(e.unref(c).be("suggestion","header")),onClick:o[0]||(o[0]=e.withModifiers(()=>{},["stop"]))},[e.renderSlot(t.$slots,"header")],2)):e.createCommentVNode("v-if",!0),e.createVNode(e.unref(ie.ElScrollbar),{id:e.unref(h),tag:"ul","wrap-class":e.unref(c).be("suggestion","wrap"),"view-class":e.unref(c).be("suggestion","list"),role:"listbox"},{default:e.withCtx(()=>[B.value?(e.openBlock(),e.createElementBlock("li",fe,[e.renderSlot(t.$slots,"loading",{},()=>[e.createVNode(e.unref(z.ElIcon),{class:e.normalizeClass(e.unref(c).is("loading"))},{default:e.withCtx(()=>[e.createVNode(e.unref(z.loading_default))]),_:1},8,["class"])])])):(e.openBlock(!0),e.createElementBlock(e.Fragment,{key:1},e.renderList(i.value,(u,v)=>(e.openBlock(),e.createElementBlock("li",{id:`${e.unref(h)}-item-${v}`,key:v,class:e.normalizeClass({highlighted:s.value===v}),role:"option","aria-selected":s.value===v,onClick:D=>w(u)},[e.renderSlot(t.$slots,"default",{item:u},()=>[e.createTextVNode(e.toDisplayString(u[n.valueKey]),1)])],10,ve))),128))]),_:3},8,["id","wrap-class","view-class"]),t.$slots.footer?(e.openBlock(),e.createElementBlock("div",{key:1,class:e.normalizeClass(e.unref(c).be("suggestion","footer")),onClick:o[1]||(o[1]=e.withModifiers(()=>{},["stop"]))},[e.renderSlot(t.$slots,"footer")],2)):e.createCommentVNode("v-if",!0)],6)]),default:e.withCtx(()=>[e.createElementVNode("div",{ref_key:"listboxRef",ref:O,class:e.normalizeClass([e.unref(c).b(),t.$attrs.class]),style:e.normalizeStyle(j.value),role:"combobox","aria-haspopup":"listbox","aria-expanded":g.value,"aria-owns":e.unref(h)},[e.createVNode(e.unref(V.ElInput),e.mergeProps({ref_key:"inputRef",ref:f},e.mergeProps(H.value,t.$attrs),{"model-value":n.modelValue,disabled:e.unref($),onInput:Y,onChange:ee,onFocus:te,onBlur:M,onClear:oe,onKeydown:re,onMousedown:Z}),e.createSlots({_:2},[t.$slots.prepend?{name:"prepend",fn:e.withCtx(()=>[e.renderSlot(t.$slots,"prepend")]),key:"0"}:void 0,t.$slots.append?{name:"append",fn:e.withCtx(()=>[e.renderSlot(t.$slots,"append")]),key:"1"}:void 0,t.$slots.prefix?{name:"prefix",fn:e.withCtx(()=>[e.renderSlot(t.$slots,"prefix")]),key:"2"}:void 0,t.$slots.suffix?{name:"suffix",fn:e.withCtx(()=>[e.renderSlot(t.$slots,"suffix")]),key:"3"}:void 0]),1040,["model-value","disabled"])],14,de)]),_:3},8,["visible","placement","popper-class","popper-style","popper-options","show-arrow","teleported","append-to","transition"]))}}),me=ge;const Ee=a.withInstall(me);exports.ElAutocomplete=Ee;
|