x-next 1.16.1 → 1.18.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/AI_USAGE/catalog.md +3 -2
- package/AI_USAGE/components/alert-api.md +1 -1
- package/AI_USAGE/components/alert.md +33 -1
- package/AI_USAGE/components/bar-chart-api.md +1 -1
- package/AI_USAGE/components/bar-chart.md +1 -1
- package/AI_USAGE/components/boxicons.md +1 -1
- package/AI_USAGE/components/button-api.md +13 -16
- package/AI_USAGE/components/button.md +242 -31
- package/AI_USAGE/components/charts.md +1 -1
- package/AI_USAGE/components/checkbox-api.md +1 -1
- package/AI_USAGE/components/checkbox.md +1 -1
- package/AI_USAGE/components/color-picker-api.md +1 -1
- package/AI_USAGE/components/color-picker.md +1 -1
- package/AI_USAGE/components/config-provider-api.md +1 -1
- package/AI_USAGE/components/config-provider.md +1 -1
- package/AI_USAGE/components/date-picker-api.md +1 -1
- package/AI_USAGE/components/date-picker.md +1 -1
- package/AI_USAGE/components/dialog-api.md +1 -1
- package/AI_USAGE/components/dialog.md +1 -1
- package/AI_USAGE/components/draggable-api.md +1 -1
- package/AI_USAGE/components/draggable.md +1 -1
- package/AI_USAGE/components/drawer-api.md +3 -3
- package/AI_USAGE/components/drawer.md +1 -1
- package/AI_USAGE/components/dropdown-api.md +3 -3
- package/AI_USAGE/components/dropdown.md +1 -1
- package/AI_USAGE/components/empty-api.md +1 -1
- package/AI_USAGE/components/empty.md +1 -1
- package/AI_USAGE/components/finicon.md +1 -1
- package/AI_USAGE/components/form-api.md +1 -1
- package/AI_USAGE/components/form.md +1 -1
- package/AI_USAGE/components/grid-api.md +1 -1
- package/AI_USAGE/components/grid.md +1 -1
- package/AI_USAGE/components/heatmap-api.md +1 -1
- package/AI_USAGE/components/heatmap.md +1 -1
- package/AI_USAGE/components/icon-api.md +1 -1
- package/AI_USAGE/components/icon.md +1 -1
- package/AI_USAGE/components/image-api.md +1 -1
- package/AI_USAGE/components/image.md +1 -1
- package/AI_USAGE/components/input-api.md +2 -2
- package/AI_USAGE/components/input-number-api.md +1 -1
- package/AI_USAGE/components/input-number.md +1 -1
- package/AI_USAGE/components/input-tag-api.md +1 -1
- package/AI_USAGE/components/input-tag.md +1 -1
- package/AI_USAGE/components/input.md +1 -1
- package/AI_USAGE/components/layout-api.md +1 -1
- package/AI_USAGE/components/layout.md +1 -1
- package/AI_USAGE/components/line-chart-api.md +1 -1
- package/AI_USAGE/components/line-chart.md +1 -1
- package/AI_USAGE/components/link-api.md +1 -1
- package/AI_USAGE/components/link.md +1 -1
- package/AI_USAGE/components/menu-api.md +1 -1
- package/AI_USAGE/components/menu.md +1 -1
- package/AI_USAGE/components/message-api.md +1 -1
- package/AI_USAGE/components/message-box-api.md +1 -1
- package/AI_USAGE/components/message-box.md +1 -1
- package/AI_USAGE/components/message.md +1 -1
- package/AI_USAGE/components/network-api.md +1 -1
- package/AI_USAGE/components/network.md +1 -1
- package/AI_USAGE/components/notification-api.md +1 -1
- package/AI_USAGE/components/notification.md +1 -1
- package/AI_USAGE/components/pagination-api.md +1 -1
- package/AI_USAGE/components/pagination.md +1 -1
- package/AI_USAGE/components/pie-chart-api.md +1 -1
- package/AI_USAGE/components/pie-chart.md +1 -1
- package/AI_USAGE/components/popconfirm-api.md +3 -3
- package/AI_USAGE/components/popconfirm.md +1 -1
- package/AI_USAGE/components/popover-api.md +1 -1
- package/AI_USAGE/components/popover.md +1 -1
- package/AI_USAGE/components/popup-api.md +1 -1
- package/AI_USAGE/components/popup.md +1 -1
- package/AI_USAGE/components/progress-api.md +1 -1
- package/AI_USAGE/components/progress.md +1 -1
- package/AI_USAGE/components/radio-api.md +1 -1
- package/AI_USAGE/components/radio.md +1 -1
- package/AI_USAGE/components/rate-api.md +1 -1
- package/AI_USAGE/components/rate.md +1 -1
- package/AI_USAGE/components/resize-box-api.md +1 -1
- package/AI_USAGE/components/resize-box.md +1 -1
- package/AI_USAGE/components/scrollbar-api.md +1 -1
- package/AI_USAGE/components/scrollbar.md +1 -1
- package/AI_USAGE/components/select-api.md +1 -1
- package/AI_USAGE/components/select.md +1 -1
- package/AI_USAGE/components/skeleton-api.md +1 -1
- package/AI_USAGE/components/skeleton.md +1 -1
- package/AI_USAGE/components/slider-api.md +1 -1
- package/AI_USAGE/components/slider.md +1 -1
- package/AI_USAGE/components/space-api.md +1 -1
- package/AI_USAGE/components/space.md +1 -1
- package/AI_USAGE/components/spin-api.md +1 -1
- package/AI_USAGE/components/spin.md +1 -1
- package/AI_USAGE/components/steps-api.md +1 -1
- package/AI_USAGE/components/steps.md +1 -1
- package/AI_USAGE/components/switch-api.md +1 -1
- package/AI_USAGE/components/switch.md +1 -1
- package/AI_USAGE/components/table-api.md +1 -1
- package/AI_USAGE/components/table.md +1 -1
- package/AI_USAGE/components/tabs-api.md +1 -1
- package/AI_USAGE/components/tabs.md +1 -1
- package/AI_USAGE/components/tag-api.md +1 -1
- package/AI_USAGE/components/tag.md +1 -1
- package/AI_USAGE/components/textarea-api.md +1 -1
- package/AI_USAGE/components/textarea.md +1 -1
- package/AI_USAGE/components/time-picker-api.md +1 -1
- package/AI_USAGE/components/time-picker.md +1 -1
- package/AI_USAGE/components/time-range-selector-api.md +1 -1
- package/AI_USAGE/components/time-range-selector.md +1 -1
- package/AI_USAGE/components/timeline-api.md +3 -3
- package/AI_USAGE/components/timeline.md +1 -1
- package/AI_USAGE/components/tooltip-api.md +1 -1
- package/AI_USAGE/components/tooltip.md +1 -1
- package/AI_USAGE/components/transfer-api.md +165 -0
- package/AI_USAGE/components/transfer.md +515 -0
- package/AI_USAGE/components/tree-select-api.md +1 -1
- package/AI_USAGE/components/tree-select.md +1 -1
- package/AI_USAGE/components/trend-chart-api.md +1 -1
- package/AI_USAGE/components/trend-chart.md +1 -1
- package/AI_USAGE/components/trigger-api.md +1 -1
- package/AI_USAGE/components/trigger.md +1 -1
- package/AI_USAGE/components/upload-api.md +1 -1
- package/AI_USAGE/components/upload.md +1 -1
- package/AI_USAGE/components/watermark-api.md +1 -1
- package/AI_USAGE/components/watermark.md +1 -1
- package/AI_USAGE/core.md +1 -1
- package/AI_USAGE/index.md +3 -2
- package/AI_USAGE/recipes/form-on-demand.md +1 -1
- package/AI_USAGE.md +957 -57
- package/CHANGELOG.md +40 -0
- package/dist/_styles/palette-aliases.d.ts +1 -0
- package/dist/components/button/Button.d.ts +0 -9
- package/dist/components/button/appearance.d.ts +7 -0
- package/dist/components/button/index.d.ts +0 -16
- package/dist/components/button/props.d.ts +2 -6
- package/dist/components/color-picker/panel.d.ts +0 -9
- package/dist/components/date-picker/DatePicker.vue.d.ts +0 -15
- package/dist/components/date-picker/index.d.ts +0 -30
- package/dist/components/drawer/index.d.ts +0 -30
- package/dist/components/drawer/src/Drawer.vue.d.ts +0 -15
- package/dist/components/dropdown/DropdownButton.vue.d.ts +0 -15
- package/dist/components/dropdown/index.d.ts +0 -30
- package/dist/components/index.d.ts +1 -0
- package/dist/components/popconfirm/src/popup.vue.d.ts +0 -15
- package/dist/components/time-picker/TimePanel.vue.d.ts +0 -15
- package/dist/components/time-picker/TimePicker.vue.d.ts +0 -15
- package/dist/components/time-picker/index.d.ts +0 -30
- package/dist/components/transfer/Transfer.d.ts +211 -0
- package/dist/components/transfer/index.d.ts +299 -0
- package/dist/components/transfer/interface.d.ts +80 -0
- package/dist/components/transfer/transfer-panel.d.ts +82 -0
- package/dist/components/transfer/utils.d.ts +5 -0
- package/dist/es/_styles/palette-aliases.js +102 -17
- package/dist/es/_utils/palette.js +54 -54
- package/dist/es/components/button/Button.js +77 -49
- package/dist/es/components/button/appearance.js +7 -0
- package/dist/es/components/button/props.js +0 -4
- package/dist/es/components/index.js +47 -45
- package/dist/es/components/transfer/Transfer.js +267 -0
- package/dist/es/components/transfer/index.js +7 -0
- package/dist/es/components/transfer/transfer-panel.js +251 -0
- package/dist/es/components/transfer/utils.js +9 -0
- package/dist/es/directives/wave.js +14 -8
- package/dist/es/index.js +46 -44
- package/dist/es/locale/en-US.js +16 -0
- package/dist/es/locale/zh-CN.js +16 -0
- package/dist/es/style.css +1 -1
- package/dist/index.cjs +3 -3
- package/dist/index.umd.js +3 -3
- package/dist/locale/interface.d.ts +16 -0
- package/dist/style/alert.css +1 -1
- package/dist/style/base.css +1 -1
- package/dist/style/button.css +1 -1
- package/dist/style/color-picker.css +1 -1
- package/dist/style/dependencies.json +14 -0
- package/dist/style/link.css +1 -1
- package/dist/style/transfer.css +1 -0
- package/dist/style/transfer.js +12 -0
- package/dist/style.css +1 -1
- package/dist/types.d.ts +1 -0
- package/package.json +3 -1
- package/volar.d.ts +1 -0
|
@@ -0,0 +1,251 @@
|
|
|
1
|
+
import { defineComponent as Y, useId as Z, ref as A, computed as r, watch as j, createVNode as t, createTextVNode as ee, mergeProps as ae, Fragment as te, nextTick as le, isVNode as ne } from "vue";
|
|
2
|
+
import { Button as W } from "../button/index.js";
|
|
3
|
+
import { Checkbox as $ } from "../form-checkbox/index.js";
|
|
4
|
+
import { Input as re } from "../form-input/index.js";
|
|
5
|
+
import { Empty as ue } from "../empty/index.js";
|
|
6
|
+
import { Spin as ie } from "../spin/index.js";
|
|
7
|
+
import { Pagination as oe } from "../pagination/index.js";
|
|
8
|
+
import ce from "../virtual-list-v2/virtual-list.vue.js";
|
|
9
|
+
import { useLocale as se } from "../../locale/index.js";
|
|
10
|
+
import { transferKey as S } from "./utils.js";
|
|
11
|
+
function J(a) {
|
|
12
|
+
return typeof a == "function" || Object.prototype.toString.call(a) === "[object Object]" && !ne(a);
|
|
13
|
+
}
|
|
14
|
+
const ke = /* @__PURE__ */ Y({
|
|
15
|
+
name: "TransferPanel",
|
|
16
|
+
props: {
|
|
17
|
+
type: {
|
|
18
|
+
type: String,
|
|
19
|
+
required: !0
|
|
20
|
+
},
|
|
21
|
+
data: {
|
|
22
|
+
type: Array,
|
|
23
|
+
required: !0
|
|
24
|
+
},
|
|
25
|
+
selectedKeys: {
|
|
26
|
+
type: Array,
|
|
27
|
+
required: !0
|
|
28
|
+
},
|
|
29
|
+
title: {
|
|
30
|
+
type: String,
|
|
31
|
+
required: !0
|
|
32
|
+
},
|
|
33
|
+
disabled: Boolean,
|
|
34
|
+
loading: Boolean,
|
|
35
|
+
simple: Boolean,
|
|
36
|
+
oneWay: Boolean,
|
|
37
|
+
showSearch: Boolean,
|
|
38
|
+
showSelectAll: Boolean,
|
|
39
|
+
searchPlaceholder: String,
|
|
40
|
+
filterOption: Function,
|
|
41
|
+
pagination: [Boolean, Object],
|
|
42
|
+
virtualListProps: Object
|
|
43
|
+
},
|
|
44
|
+
emits: {
|
|
45
|
+
select: (a, c) => !0,
|
|
46
|
+
move: (a) => !0,
|
|
47
|
+
search: (a) => !0,
|
|
48
|
+
scroll: (a) => !0
|
|
49
|
+
},
|
|
50
|
+
slots: Object,
|
|
51
|
+
setup(a, {
|
|
52
|
+
emit: c,
|
|
53
|
+
slots: u
|
|
54
|
+
}) {
|
|
55
|
+
const {
|
|
56
|
+
t: s
|
|
57
|
+
} = se(), p = `x-transfer-title-${Z()}`, I = A(), K = A(), o = A(""), g = A(1), d = r(() => a.disabled || a.loading), k = r(() => new Set(a.selectedKeys)), h = r(() => a.data.filter((e) => !o.value || (a.filterOption ? a.filterOption(o.value, e, a.type) : String(e.label).toLocaleLowerCase().includes(o.value.toLocaleLowerCase())))), m = r(() => {
|
|
58
|
+
const e = typeof a.pagination == "object" ? a.pagination.pageSize : 10;
|
|
59
|
+
return e && Number.isFinite(e) && e > 0 ? Math.max(1, Math.floor(e)) : 10;
|
|
60
|
+
}), C = r(() => Math.min(g.value, Math.max(1, Math.ceil(h.value.length / m.value)))), w = r(() => a.pagination ? h.value.slice((C.value - 1) * m.value, C.value * m.value) : h.value), b = r(() => w.value.filter((e) => !e.disabled)), M = r(() => b.value.filter((e) => k.value.has(e.value)).length), P = r(() => b.value.length > 0 && M.value === b.value.length), O = r(() => M.value > 0 && !P.value), q = r(() => a.data.filter((e) => !e.disabled && k.value.has(e.value)).length), V = r(() => a.oneWay && a.type === "target"), D = r(() => !a.pagination && !!a.virtualListProps);
|
|
61
|
+
j([o, m, () => a.pagination], () => {
|
|
62
|
+
g.value = 1;
|
|
63
|
+
}), j(C, (e) => {
|
|
64
|
+
g.value = e;
|
|
65
|
+
}), j(() => a.showSearch, (e) => {
|
|
66
|
+
!e && o.value && (o.value = "", c("search", ""));
|
|
67
|
+
});
|
|
68
|
+
const z = (e, n) => c("select", [e], n), N = (e, n) => c("select", e, n), L = (e) => c("move", e), E = r(() => ({
|
|
69
|
+
type: a.type,
|
|
70
|
+
data: h.value,
|
|
71
|
+
pageData: w.value,
|
|
72
|
+
selectedKeys: a.data.filter((e) => !e.disabled && k.value.has(e.value)).map((e) => e.value),
|
|
73
|
+
disabled: d.value,
|
|
74
|
+
onSelect: z,
|
|
75
|
+
onSelectAll: N,
|
|
76
|
+
onMove: L
|
|
77
|
+
})), T = r(() => ({
|
|
78
|
+
type: a.type,
|
|
79
|
+
title: a.title,
|
|
80
|
+
countTotal: a.data.length,
|
|
81
|
+
countSelected: q.value,
|
|
82
|
+
searchValue: o.value,
|
|
83
|
+
checked: P.value,
|
|
84
|
+
indeterminate: O.value,
|
|
85
|
+
disabled: d.value || b.value.length === 0,
|
|
86
|
+
onSelectAllChange: (e) => N(b.value.map((n) => n.value), e)
|
|
87
|
+
})), F = (e) => {
|
|
88
|
+
let n, i;
|
|
89
|
+
const l = d.value || !!e.disabled, y = k.value.has(e.value), x = () => {
|
|
90
|
+
var f;
|
|
91
|
+
return ((f = u.item) == null ? void 0 : f.call(u, {
|
|
92
|
+
item: e,
|
|
93
|
+
type: a.type,
|
|
94
|
+
selected: y,
|
|
95
|
+
disabled: l
|
|
96
|
+
})) ?? e.label;
|
|
97
|
+
};
|
|
98
|
+
return t("div", {
|
|
99
|
+
key: S(e.value),
|
|
100
|
+
"data-transfer-key": S(e.value),
|
|
101
|
+
class: ["x-transfer--item", {
|
|
102
|
+
"x-transfer--item-selected": y,
|
|
103
|
+
"x-transfer--item-disabled": l
|
|
104
|
+
}]
|
|
105
|
+
}, [a.simple || V.value ? t("div", {
|
|
106
|
+
class: "x-transfer--item-content"
|
|
107
|
+
}, [V.value ? t(te, null, [t("span", {
|
|
108
|
+
class: "x-transfer--item-label",
|
|
109
|
+
title: e.label
|
|
110
|
+
}, [x()]), t(W, {
|
|
111
|
+
size: "mini",
|
|
112
|
+
type: "text",
|
|
113
|
+
disabled: l,
|
|
114
|
+
"aria-label": s("transfer.remove", {
|
|
115
|
+
label: e.label
|
|
116
|
+
}),
|
|
117
|
+
onClick: () => L([e.value])
|
|
118
|
+
}, J(n = s("transfer.removeText")) ? n : {
|
|
119
|
+
default: () => [n]
|
|
120
|
+
})]) : t(W, {
|
|
121
|
+
type: "text",
|
|
122
|
+
block: !0,
|
|
123
|
+
disabled: l,
|
|
124
|
+
"aria-label": s(a.type === "source" ? "transfer.moveToTargetItem" : "transfer.moveToSourceItem", {
|
|
125
|
+
label: e.label
|
|
126
|
+
}),
|
|
127
|
+
onClick: () => L([e.value])
|
|
128
|
+
}, J(i = x()) ? i : {
|
|
129
|
+
default: () => [i]
|
|
130
|
+
})]) : t($, {
|
|
131
|
+
class: "x-transfer--item-checkbox",
|
|
132
|
+
modelValue: y,
|
|
133
|
+
disabled: l,
|
|
134
|
+
uninjectGroupContext: !0,
|
|
135
|
+
onChange: (f) => z(e.value, f === !0)
|
|
136
|
+
}, {
|
|
137
|
+
default: () => [t("span", {
|
|
138
|
+
class: "x-transfer--item-label",
|
|
139
|
+
title: e.label
|
|
140
|
+
}, [x()])]
|
|
141
|
+
})]);
|
|
142
|
+
}, Q = async (e) => {
|
|
143
|
+
var G, H, R, U;
|
|
144
|
+
if (d.value || u.default || !["ArrowDown", "ArrowUp", "Home", "End"].includes(e.key)) return;
|
|
145
|
+
const n = e.target;
|
|
146
|
+
if (!n.closest(".x-transfer--list")) return;
|
|
147
|
+
const i = b.value;
|
|
148
|
+
if (!i.length) return;
|
|
149
|
+
const l = (G = n.closest("[data-transfer-key]")) == null ? void 0 : G.dataset.transferKey, y = i.findIndex((_) => S(_.value) === l), x = e.key === "Home" ? 0 : e.key === "End" ? i.length - 1 : e.key === "ArrowDown" ? Math.min(y + 1, i.length - 1) : Math.max(y - 1, 0), f = S(i[x].value);
|
|
150
|
+
e.preventDefault(), (H = K.value) == null || H.scrollTo({
|
|
151
|
+
key: f,
|
|
152
|
+
align: "auto"
|
|
153
|
+
}), await le();
|
|
154
|
+
const v = Array.from(((R = I.value) == null ? void 0 : R.querySelectorAll("[data-transfer-key]")) ?? []).find((_) => _.dataset.transferKey === f), B = v == null ? void 0 : v.querySelector("input:not(:disabled),button:not(:disabled)");
|
|
155
|
+
B == null || B.focus(), D.value || (U = v == null ? void 0 : v.scrollIntoView) == null || U.call(v, {
|
|
156
|
+
block: "nearest"
|
|
157
|
+
});
|
|
158
|
+
}, X = (e) => {
|
|
159
|
+
var n;
|
|
160
|
+
o.value = e, g.value = 1, c("search", e), (n = K.value) == null || n.scrollTo(0);
|
|
161
|
+
};
|
|
162
|
+
return () => {
|
|
163
|
+
var e, n, i;
|
|
164
|
+
return t("section", {
|
|
165
|
+
ref: I,
|
|
166
|
+
class: ["x-transfer--panel", `x-transfer--panel-${a.type}`],
|
|
167
|
+
role: "group",
|
|
168
|
+
"aria-labelledby": p,
|
|
169
|
+
"aria-busy": a.loading,
|
|
170
|
+
onKeydown: Q
|
|
171
|
+
}, [t("header", {
|
|
172
|
+
class: "x-transfer--header"
|
|
173
|
+
}, [t("div", {
|
|
174
|
+
id: p,
|
|
175
|
+
class: "x-transfer--title"
|
|
176
|
+
}, [((e = u.title) == null ? void 0 : e.call(u, T.value)) ?? (a.showSelectAll && !a.simple && !V.value ? t($, {
|
|
177
|
+
modelValue: P.value,
|
|
178
|
+
indeterminate: O.value,
|
|
179
|
+
disabled: T.value.disabled,
|
|
180
|
+
uninjectGroupContext: !0,
|
|
181
|
+
onChange: (l) => T.value.onSelectAllChange(l === !0)
|
|
182
|
+
}, {
|
|
183
|
+
default: () => [a.title]
|
|
184
|
+
}) : t("span", null, [a.title]))]), t("span", {
|
|
185
|
+
class: "x-transfer--count"
|
|
186
|
+
}, [q.value, ee(" / "), a.data.length])]), a.showSearch && t("div", {
|
|
187
|
+
class: "x-transfer--search"
|
|
188
|
+
}, [t(re, {
|
|
189
|
+
modelValue: o.value,
|
|
190
|
+
disabled: d.value,
|
|
191
|
+
allowClear: !0,
|
|
192
|
+
"aria-label": s("transfer.searchLabel", {
|
|
193
|
+
title: a.title
|
|
194
|
+
}),
|
|
195
|
+
placeholder: a.searchPlaceholder ?? s("transfer.searchPlaceholder"),
|
|
196
|
+
"onUpdate:modelValue": X
|
|
197
|
+
}, null)]), t("div", {
|
|
198
|
+
class: "x-transfer--body",
|
|
199
|
+
onScroll: (l) => c("scroll", l)
|
|
200
|
+
}, [a.loading ? t("div", {
|
|
201
|
+
class: "x-transfer--state"
|
|
202
|
+
}, [t(ie, {
|
|
203
|
+
tip: s("transfer.loading")
|
|
204
|
+
}, null)]) : u.default ? u.default(E.value) : h.value.length ? D.value ? t("div", {
|
|
205
|
+
class: "x-transfer--list",
|
|
206
|
+
tabindex: d.value ? -1 : 0,
|
|
207
|
+
"aria-label": a.title
|
|
208
|
+
}, [t(ce, ae(a.virtualListProps, {
|
|
209
|
+
ref: K,
|
|
210
|
+
height: ((i = a.virtualListProps) == null ? void 0 : i.height) ?? 240,
|
|
211
|
+
data: w.value.map((l) => ({
|
|
212
|
+
...l,
|
|
213
|
+
_transferKey: S(l.value)
|
|
214
|
+
})),
|
|
215
|
+
itemKey: "_transferKey",
|
|
216
|
+
onScroll: (l) => c("scroll", l)
|
|
217
|
+
}), {
|
|
218
|
+
item: ({
|
|
219
|
+
item: l
|
|
220
|
+
}) => F(l)
|
|
221
|
+
})]) : t("div", {
|
|
222
|
+
class: "x-transfer--list",
|
|
223
|
+
tabindex: d.value ? -1 : 0,
|
|
224
|
+
"aria-label": a.title
|
|
225
|
+
}, [w.value.map(F)]) : t("div", {
|
|
226
|
+
class: "x-transfer--state"
|
|
227
|
+
}, [((n = u.empty) == null ? void 0 : n.call(u, {
|
|
228
|
+
type: a.type,
|
|
229
|
+
searchValue: o.value
|
|
230
|
+
})) ?? t(ue, {
|
|
231
|
+
description: o.value ? s("transfer.noMatch") : s("transfer.empty")
|
|
232
|
+
}, null)])]), a.pagination && t("div", {
|
|
233
|
+
class: "x-transfer--pagination"
|
|
234
|
+
}, [t(oe, {
|
|
235
|
+
current: C.value,
|
|
236
|
+
pageSize: m.value,
|
|
237
|
+
total: h.value.length,
|
|
238
|
+
simple: !0,
|
|
239
|
+
disabled: d.value,
|
|
240
|
+
onChange: (l) => {
|
|
241
|
+
g.value = l;
|
|
242
|
+
}
|
|
243
|
+
}, null)]), u.footer && t("footer", {
|
|
244
|
+
class: "x-transfer--footer"
|
|
245
|
+
}, [u.footer(E.value)])]);
|
|
246
|
+
};
|
|
247
|
+
}
|
|
248
|
+
});
|
|
249
|
+
export {
|
|
250
|
+
ke as default
|
|
251
|
+
};
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
const r = (n) => `${typeof n}:${n}`, t = (n) => [...new Set(n)], s = (n) => {
|
|
2
|
+
const u = /* @__PURE__ */ new Set();
|
|
3
|
+
return n.filter((e) => !e || typeof e.value != "string" && typeof e.value != "number" || typeof e.value == "number" && !Number.isFinite(e.value) || u.has(e.value) ? !1 : (u.add(e.value), !0));
|
|
4
|
+
};
|
|
5
|
+
export {
|
|
6
|
+
r as transferKey,
|
|
7
|
+
s as uniqueItems,
|
|
8
|
+
t as uniqueValues
|
|
9
|
+
};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
const
|
|
1
|
+
const i = "x-wave";
|
|
2
2
|
const n = (e, t) => {
|
|
3
3
|
const _ = t.value;
|
|
4
4
|
if (_ === !1 || _ && typeof _ == "object" && _.disabled) return !0;
|
|
@@ -10,8 +10,14 @@ const n = (e, t) => {
|
|
|
10
10
|
return t !== "transparent" && t !== "rgba(0, 0, 0, 0)" && t !== "rgba(255, 255, 255, 0)" && t !== "rgb(255, 255, 255)" && t !== "#fff" && t !== "#ffffff";
|
|
11
11
|
}, v = (e) => {
|
|
12
12
|
const t = getComputedStyle(e);
|
|
13
|
-
return [
|
|
14
|
-
|
|
13
|
+
return [
|
|
14
|
+
t.getPropertyValue("--x-button-wave-color").trim(),
|
|
15
|
+
t.borderTopColor,
|
|
16
|
+
t.borderColor,
|
|
17
|
+
t.backgroundColor,
|
|
18
|
+
t.color
|
|
19
|
+
].find(d) ?? "currentColor";
|
|
20
|
+
}, a = (e) => {
|
|
15
21
|
e.__wave_timer__ && (clearTimeout(e.__wave_timer__), delete e.__wave_timer__), e.__wave_element__ && (e.__wave_element__.remove(), delete e.__wave_element__);
|
|
16
22
|
}, s = (e, t) => {
|
|
17
23
|
e.__wave_disabled__ = n(e, t);
|
|
@@ -21,12 +27,12 @@ const n = (e, t) => {
|
|
|
21
27
|
const _ = (r) => {
|
|
22
28
|
if (e.__wave_disabled__)
|
|
23
29
|
return;
|
|
24
|
-
|
|
30
|
+
a(e);
|
|
25
31
|
const o = document.createElement("div");
|
|
26
|
-
o.className =
|
|
27
|
-
o.classList.add(`${
|
|
32
|
+
o.className = i, o.style.setProperty("--x-wave-color", v(e)), e.__wave_element__ = o, e.appendChild(o), requestAnimationFrame(() => {
|
|
33
|
+
o.classList.add(`${i}-active`);
|
|
28
34
|
}), e.__wave_timer__ = window.setTimeout(() => {
|
|
29
|
-
|
|
35
|
+
a(e);
|
|
30
36
|
}, 400);
|
|
31
37
|
};
|
|
32
38
|
e.__wave_handler__ = _, e.addEventListener("click", _);
|
|
@@ -35,7 +41,7 @@ const n = (e, t) => {
|
|
|
35
41
|
s(e, t), getComputedStyle(e).position === "static" && (e.__wave_restore_position__ = e.style.position, e.style.position = "relative");
|
|
36
42
|
},
|
|
37
43
|
unmounted(e) {
|
|
38
|
-
e.__wave_handler__ && (e.removeEventListener("click", e.__wave_handler__), delete e.__wave_handler__),
|
|
44
|
+
e.__wave_handler__ && (e.removeEventListener("click", e.__wave_handler__), delete e.__wave_handler__), a(e), e.__wave_restore_position__ !== void 0 && (e.style.position = e.__wave_restore_position__, delete e.__wave_restore_position__), delete e.__wave_disabled__;
|
|
39
45
|
}
|
|
40
46
|
};
|
|
41
47
|
export {
|
package/dist/es/index.js
CHANGED
|
@@ -5,7 +5,7 @@ import { setupDirectives as m } from "./directives/index.js";
|
|
|
5
5
|
import { default as s } from "./components/dialog/use.js";
|
|
6
6
|
import { default as u } from "./components/message/warp.js";
|
|
7
7
|
import { default as g } from "./components/message-box/MessageBox.js";
|
|
8
|
-
import { default as
|
|
8
|
+
import { default as T } from "./components/notification/warp.js";
|
|
9
9
|
import { Dialog as P } from "./components/dialog/index.js";
|
|
10
10
|
import { Message as C } from "./components/message/index.js";
|
|
11
11
|
import { Notification as k } from "./components/notification/index.js";
|
|
@@ -25,7 +25,7 @@ import { Checkbox as ro, CheckboxGroup as to } from "./components/form-checkbox/
|
|
|
25
25
|
import { Col as mo, Grid as ao, GridItem as fo, Row as no } from "./components/grid/index.js";
|
|
26
26
|
import { ColorPicker as io } from "./components/color-picker/index.js";
|
|
27
27
|
import { ConfigProvider as so } from "./components/config-provider/index.js";
|
|
28
|
-
import { DatePicker as uo, MonthPicker as go, QuarterPicker as Io, RangePicker as
|
|
28
|
+
import { DatePicker as uo, MonthPicker as go, QuarterPicker as Io, RangePicker as To, WeekPicker as So, YearPicker as Po } from "./components/date-picker/index.js";
|
|
29
29
|
import { Draggable as Co } from "./components/draggable/index.js";
|
|
30
30
|
import { Drawer as ko } from "./components/drawer/index.js";
|
|
31
31
|
import { Dropdown as Do, DropdownButton as wo, DropdownGroup as yo, DropdownOption as Go, DropdownSubmenu as Mo } from "./components/dropdown/index.js";
|
|
@@ -42,7 +42,7 @@ import { Link as fe } from "./components/link/index.js";
|
|
|
42
42
|
import { Menu as xe, MenuItem as ie, MenuItemGroup as ce, MenuSubMenu as se } from "./components/menu/index.js";
|
|
43
43
|
import { Network as ue } from "./components/network/index.js";
|
|
44
44
|
import { Pagination as ge } from "./components/pagination/index.js";
|
|
45
|
-
import { PieChart as
|
|
45
|
+
import { PieChart as Te } from "./components/pie-chart/index.js";
|
|
46
46
|
import { Popconfirm as Pe } from "./components/popconfirm/index.js";
|
|
47
47
|
import { Popover as Ce } from "./components/popover/index.js";
|
|
48
48
|
import { Popup as ke } from "./components/popup/index.js";
|
|
@@ -64,7 +64,7 @@ import { Table as ir, TableColumn as cr } from "./components/table/index.js";
|
|
|
64
64
|
import { Tag as lr } from "./components/tag/index.js";
|
|
65
65
|
import { default as dr } from "./components/table/table-tbody.js";
|
|
66
66
|
import { default as Ir } from "./components/table/table-td.js";
|
|
67
|
-
import { Textarea as
|
|
67
|
+
import { Textarea as Sr } from "./components/form-textarea/index.js";
|
|
68
68
|
import { default as br } from "./components/table/table-th.js";
|
|
69
69
|
import { default as Lr } from "./components/table/table-thead.js";
|
|
70
70
|
import { TimePicker as hr } from "./components/time-picker/index.js";
|
|
@@ -73,18 +73,19 @@ import { Timeline as Gr } from "./components/timeline/index.js";
|
|
|
73
73
|
import { TimelineItem as Nr } from "./components/timeline-item/index.js";
|
|
74
74
|
import { Tooltip as Ar } from "./components/tooltip/index.js";
|
|
75
75
|
import { default as Er } from "./components/table/table-tr.js";
|
|
76
|
-
import {
|
|
77
|
-
import {
|
|
78
|
-
import {
|
|
79
|
-
import {
|
|
80
|
-
import {
|
|
81
|
-
import {
|
|
82
|
-
import {
|
|
83
|
-
import {
|
|
84
|
-
import {
|
|
85
|
-
import {
|
|
86
|
-
import {
|
|
87
|
-
import {
|
|
76
|
+
import { Transfer as Rr } from "./components/transfer/index.js";
|
|
77
|
+
import { TreeSelect as Fr, TreeSelectDropdown as jr } from "./components/tree-select/index.js";
|
|
78
|
+
import { TrendChart as Hr } from "./components/trend-chart/index.js";
|
|
79
|
+
import { Trigger as Ur } from "./components/trigger/index.js";
|
|
80
|
+
import { Upload as Qr } from "./components/upload/index.js";
|
|
81
|
+
import { addIcon as Yr, hasIcon as Zr, registerIcons as qr, removeIcon as Jr } from "./icons/registry.js";
|
|
82
|
+
import { canonicalIconNames as $r, publicIconAliases as ot, publicIconNames as et, searchPublicIcons as rt } from "./icons/public/lucide-names.js";
|
|
83
|
+
import { configProviderInjectionKey as pt } from "./components/config-provider/context.js";
|
|
84
|
+
import { finiconCategories as at, finiconIconsMeta as ft } from "./icons/public/finicon-meta.js";
|
|
85
|
+
import { finiconIconNames as xt, finiconIcons as it, registerFiniconIcons as ct } from "./icons/public/finicon.js";
|
|
86
|
+
import { formInjectionKey as lt, formItemInjectionKey as ut } from "./components/form/context.js";
|
|
87
|
+
import { registerPublicIcons as gt } from "./icons/public/lucide.js";
|
|
88
|
+
import { vWatermark as Tt } from "./components/watermark/directive.js";
|
|
88
89
|
const x = {
|
|
89
90
|
install: function(o) {
|
|
90
91
|
m(o), o.use(p), Object.keys(r).forEach((t) => {
|
|
@@ -147,10 +148,10 @@ export {
|
|
|
147
148
|
C as MessageComponent,
|
|
148
149
|
go as MonthPicker,
|
|
149
150
|
ue as Network,
|
|
150
|
-
|
|
151
|
+
T as Notification,
|
|
151
152
|
k as NotificationComponent,
|
|
152
153
|
ge as Pagination,
|
|
153
|
-
|
|
154
|
+
Te as PieChart,
|
|
154
155
|
Pe as Popconfirm,
|
|
155
156
|
Ce as Popover,
|
|
156
157
|
ke as Popup,
|
|
@@ -158,7 +159,7 @@ export {
|
|
|
158
159
|
Io as QuarterPicker,
|
|
159
160
|
ye as Radio,
|
|
160
161
|
Ge as RadioGroup,
|
|
161
|
-
|
|
162
|
+
To as RangePicker,
|
|
162
163
|
Ne as Rate,
|
|
163
164
|
Ae as ResizeBox,
|
|
164
165
|
no as Row,
|
|
@@ -185,7 +186,7 @@ export {
|
|
|
185
186
|
lr as Tag,
|
|
186
187
|
dr as Tbody,
|
|
187
188
|
Ir as Td,
|
|
188
|
-
|
|
189
|
+
Sr as Textarea,
|
|
189
190
|
br as Th,
|
|
190
191
|
Lr as Thead,
|
|
191
192
|
hr as TimePicker,
|
|
@@ -194,44 +195,45 @@ export {
|
|
|
194
195
|
Nr as TimelineItem,
|
|
195
196
|
Ar as Tooltip,
|
|
196
197
|
Er as Tr,
|
|
197
|
-
Rr as
|
|
198
|
-
|
|
199
|
-
jr as
|
|
200
|
-
Hr as
|
|
201
|
-
Ur as
|
|
198
|
+
Rr as Transfer,
|
|
199
|
+
Fr as TreeSelect,
|
|
200
|
+
jr as TreeSelectDropdown,
|
|
201
|
+
Hr as TrendChart,
|
|
202
|
+
Ur as Trigger,
|
|
203
|
+
Qr as Upload,
|
|
202
204
|
K as Watermark,
|
|
203
|
-
|
|
205
|
+
So as WeekPicker,
|
|
204
206
|
Po as YearPicker,
|
|
205
|
-
|
|
207
|
+
Yr as addIcon,
|
|
206
208
|
M as applyThemeColor,
|
|
207
|
-
|
|
208
|
-
|
|
209
|
+
$r as canonicalIconNames,
|
|
210
|
+
pt as configProviderInjectionKey,
|
|
209
211
|
x as default,
|
|
210
212
|
W as enUS,
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
213
|
+
at as finiconCategories,
|
|
214
|
+
xt as finiconIconNames,
|
|
215
|
+
it as finiconIcons,
|
|
216
|
+
ft as finiconIconsMeta,
|
|
217
|
+
lt as formInjectionKey,
|
|
218
|
+
ut as formItemInjectionKey,
|
|
217
219
|
mr as formatLocaleText,
|
|
218
220
|
B as formatMessage,
|
|
219
221
|
N as generatePalette,
|
|
220
222
|
E as getGlobalLocale,
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
223
|
+
Zr as hasIcon,
|
|
224
|
+
ot as publicIconAliases,
|
|
225
|
+
et as publicIconNames,
|
|
226
|
+
ct as registerFiniconIcons,
|
|
227
|
+
qr as registerIcons,
|
|
228
|
+
gt as registerPublicIcons,
|
|
229
|
+
Jr as removeIcon,
|
|
230
|
+
rt as searchPublicIcons,
|
|
229
231
|
O as setGlobalLocale,
|
|
230
232
|
F as useDraggable,
|
|
231
233
|
y as useFormItem,
|
|
232
234
|
R as useLocale,
|
|
233
235
|
D as useResizeObserver,
|
|
234
236
|
z as vDraggable,
|
|
235
|
-
|
|
237
|
+
Tt as vWatermark,
|
|
236
238
|
X as zhCN
|
|
237
239
|
};
|
package/dist/es/locale/en-US.js
CHANGED
|
@@ -1,5 +1,21 @@
|
|
|
1
1
|
const e = {
|
|
2
2
|
code: "en-US",
|
|
3
|
+
transfer: {
|
|
4
|
+
label: "Data transfer",
|
|
5
|
+
sourceTitle: "Available",
|
|
6
|
+
targetTitle: "Selected",
|
|
7
|
+
searchLabel: "Search {title}",
|
|
8
|
+
searchPlaceholder: "Search items",
|
|
9
|
+
moveToTarget: "Move to selected",
|
|
10
|
+
moveToSource: "Move to available",
|
|
11
|
+
moveToTargetItem: "Move {label} to selected",
|
|
12
|
+
moveToSourceItem: "Move {label} to available",
|
|
13
|
+
remove: "Remove {label}",
|
|
14
|
+
removeText: "Remove",
|
|
15
|
+
loading: "Loading",
|
|
16
|
+
empty: "No data",
|
|
17
|
+
noMatch: "No matching items"
|
|
18
|
+
},
|
|
3
19
|
timeRangeSelector: {
|
|
4
20
|
label: "Daily time ranges",
|
|
5
21
|
position: "Create from {start} to {end}; selected ranges: {ranges}",
|
package/dist/es/locale/zh-CN.js
CHANGED
|
@@ -1,5 +1,21 @@
|
|
|
1
1
|
const e = {
|
|
2
2
|
code: "zh-CN",
|
|
3
|
+
transfer: {
|
|
4
|
+
label: "数据穿梭框",
|
|
5
|
+
sourceTitle: "可选项",
|
|
6
|
+
targetTitle: "已选项",
|
|
7
|
+
searchLabel: "搜索{title}",
|
|
8
|
+
searchPlaceholder: "请输入搜索内容",
|
|
9
|
+
moveToTarget: "移入已选项",
|
|
10
|
+
moveToSource: "移回可选项",
|
|
11
|
+
moveToTargetItem: "移入「{label}」",
|
|
12
|
+
moveToSourceItem: "移回「{label}」",
|
|
13
|
+
remove: "移除「{label}」",
|
|
14
|
+
removeText: "移除",
|
|
15
|
+
loading: "加载中",
|
|
16
|
+
empty: "暂无数据",
|
|
17
|
+
noMatch: "没有匹配结果"
|
|
18
|
+
},
|
|
3
19
|
timeRangeSelector: {
|
|
4
20
|
label: "一天内的时间区间",
|
|
5
21
|
position: "新建位置 {start} 至 {end};已选区间:{ranges}",
|