@pungfe/element 0.0.1-alpha.9 → 0.1.1
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/LICENSE +21 -21
- package/README.md +151 -1
- package/dist/advance-C3UkhTla.js +1894 -0
- package/dist/advance-DIZmFb3t.cjs +1 -0
- package/dist/advance.cjs +1 -0
- package/dist/advance.d.ts +23 -0
- package/dist/advance.js +2 -0
- package/dist/basic-BfqwJFE_.cjs +1 -0
- package/dist/basic-CZ74BN1R.js +1006 -0
- package/dist/basic.cjs +1 -0
- package/dist/basic.d.ts +33 -0
- package/dist/basic.js +2 -0
- package/dist/components/advance/XButtonAsync.vue.d.ts +21 -0
- package/dist/{basic/XReconfirm.vue.d.ts → components/advance/XButtonConfirm.vue.d.ts} +6 -5
- package/dist/components/advance/XCascaderRequest.vue.d.ts +55 -0
- package/dist/components/advance/XFormFlex.vue.d.ts +19 -0
- package/dist/components/advance/XFormRequestNext.vue.d.ts +53 -0
- package/dist/components/advance/XRequest.vue.d.ts +74 -0
- package/dist/components/advance/XSelectRequest.vue.d.ts +53 -0
- package/dist/components/advance/XTableFlex.vue.d.ts +53 -0
- package/dist/components/advance/XTableRequestConfigNext.vue.d.ts +68 -0
- package/dist/components/advance/XTableRequestNext.vue.d.ts +89 -0
- package/dist/components/advance/XUploadOssNext.vue.d.ts +29 -0
- package/dist/{basic/XButton.vue.d.ts → components/basic/Button.vue.d.ts} +15 -4
- package/dist/{basic/XSelect.vue.d.ts → components/basic/Cascader.vue.d.ts} +16 -12
- package/dist/components/basic/Checkbox.vue.d.ts +22 -0
- package/dist/components/basic/ConfigProvider.vue.d.ts +21 -0
- package/dist/components/basic/DatePicker.vue.d.ts +34 -0
- package/dist/{basic/XDialog.vue.d.ts → components/basic/Dialog.vue.d.ts} +17 -9
- package/dist/{basic/XForm.vue.d.ts → components/basic/Form.vue.d.ts} +3 -27
- package/dist/components/basic/FormItem.vue.d.ts +34 -0
- package/dist/components/basic/Input.vue.d.ts +44 -0
- package/dist/components/basic/InputNumber.vue.d.ts +48 -0
- package/dist/components/basic/Pagination.vue.d.ts +41 -0
- package/dist/components/basic/Select.vue.d.ts +51 -0
- package/dist/components/basic/TabPane.vue.d.ts +32 -0
- package/dist/components/basic/Table.vue.d.ts +105 -0
- package/dist/{basic/XTabs.vue.d.ts → components/basic/Tabs.vue.d.ts} +9 -11
- package/dist/components/basic/Upload.vue.d.ts +47 -0
- package/dist/constants/index.d.ts +15 -9
- package/dist/index.cjs +1 -0
- package/dist/index.d.ts +4 -42
- package/dist/index.js +25 -1192
- package/dist/install.d.ts +12 -0
- package/dist/locales/en.d.ts +2 -0
- package/dist/locales/zh-cn.d.ts +2 -0
- package/dist/locales-CPrLlnob.js +389 -0
- package/dist/locales-fS7f5AIx.cjs +1 -0
- package/dist/locales.cjs +1 -0
- package/dist/locales.d.ts +2 -0
- package/dist/locales.js +2 -0
- package/dist/resolver.cjs +1 -0
- package/dist/resolver.d.ts +3 -1
- package/dist/resolver.js +56 -34
- package/dist/style.css +3 -0
- package/dist/types.d.ts +30 -0
- package/package.json +119 -80
- package/dist/basic/XCascader.vue.d.ts +0 -26
- package/dist/basic/XCheckbox.vue.d.ts +0 -28
- package/dist/basic/XColorPicker.vue.d.ts +0 -21
- package/dist/basic/XDivider.vue.d.ts +0 -20
- package/dist/basic/XImage.vue.d.ts +0 -5
- package/dist/basic/XInput.vue.d.ts +0 -29
- package/dist/basic/XInputNumber.vue.d.ts +0 -31
- package/dist/basic/XPagination.vue.d.ts +0 -21
- package/dist/basic/XRate.vue.d.ts +0 -20
- package/dist/basic/XScrollbar.vue.d.ts +0 -415
- package/dist/basic/XSpace.vue.d.ts +0 -20
- package/dist/basic/XTable.vue.d.ts +0 -55
- package/dist/basic/XTag.vue.d.ts +0 -28
- package/dist/basic/XText.vue.d.ts +0 -23
- package/dist/basic/XUpload.vue.d.ts +0 -41
|
@@ -0,0 +1,1894 @@
|
|
|
1
|
+
import { C as e, D as t, E as n, O as r, S as i, T as a, _ as o, a as s, b as c, d as l, g as u, k as d, l as f, n as p, o as m, s as h, u as g, w as _, x as v, y } from "./basic-CZ74BN1R.js";
|
|
2
|
+
import { ElMessage as b, ElPopconfirm as x, ElPopover as ee, ElScrollbar as te, ElSpace as ne, ElSwitch as S, ElText as re, genFileId as C } from "element-plus";
|
|
3
|
+
import { Fragment as ie, computed as w, createBlock as T, createCommentVNode as ae, createElementBlock as E, createElementVNode as oe, createSlots as se, createTextVNode as ce, createVNode as D, defineComponent as O, guardReactiveProps as le, inject as ue, isRef as de, mergeModels as fe, mergeProps as pe, nextTick as me, normalizeProps as he, openBlock as k, ref as ge, renderList as _e, renderSlot as ve, resolveComponent as ye, resolveDirective as be, toDisplayString as xe, toValue as Se, unref as A, useModel as Ce, useTemplateRef as we, watch as Te, withCtx as j, withDirectives as Ee } from "vue";
|
|
4
|
+
//#endregion
|
|
5
|
+
//#region src/components/advance/XButtonAsync.vue
|
|
6
|
+
var De = /* @__PURE__ */ O({
|
|
7
|
+
__name: "XButtonAsync",
|
|
8
|
+
props: {
|
|
9
|
+
action: { type: Function },
|
|
10
|
+
disabled: { type: Boolean },
|
|
11
|
+
link: {
|
|
12
|
+
type: Boolean,
|
|
13
|
+
default: () => void 0
|
|
14
|
+
},
|
|
15
|
+
size: {},
|
|
16
|
+
text: { type: Boolean },
|
|
17
|
+
type: { default: "primary" },
|
|
18
|
+
icon: {}
|
|
19
|
+
},
|
|
20
|
+
setup(e) {
|
|
21
|
+
let t = r(async () => {
|
|
22
|
+
try {
|
|
23
|
+
await e.action?.();
|
|
24
|
+
} catch (e) {
|
|
25
|
+
console.log(e);
|
|
26
|
+
}
|
|
27
|
+
}), n = ue(y, void 0), i = w(() => e.link ?? n);
|
|
28
|
+
return (n, r) => (k(), T(A(c), pe({
|
|
29
|
+
disabled: e.disabled,
|
|
30
|
+
icon: e.icon,
|
|
31
|
+
type: e.type,
|
|
32
|
+
link: i.value,
|
|
33
|
+
size: e.size,
|
|
34
|
+
text: e.text
|
|
35
|
+
}, { onClick: A(t) }), {
|
|
36
|
+
default: j(() => [ve(n.$slots, "default")]),
|
|
37
|
+
_: 3
|
|
38
|
+
}, 16, ["onClick"]));
|
|
39
|
+
}
|
|
40
|
+
}), Oe = /* @__PURE__ */ O({
|
|
41
|
+
__name: "XButtonConfirm",
|
|
42
|
+
props: {
|
|
43
|
+
title: { default: "是否执行?" },
|
|
44
|
+
disabled: { type: Boolean },
|
|
45
|
+
link: {
|
|
46
|
+
type: Boolean,
|
|
47
|
+
default: () => void 0
|
|
48
|
+
},
|
|
49
|
+
size: {},
|
|
50
|
+
text: { type: Boolean },
|
|
51
|
+
type: {},
|
|
52
|
+
icon: {}
|
|
53
|
+
},
|
|
54
|
+
emits: ["cancel", "confirm"],
|
|
55
|
+
setup(e, { emit: t }) {
|
|
56
|
+
let n = t, r = ue(y, void 0), i = w(() => e.link ?? r);
|
|
57
|
+
return (t, r) => (k(), T(A(x), {
|
|
58
|
+
title: e.title,
|
|
59
|
+
onCancel: r[0] ||= () => n("cancel"),
|
|
60
|
+
onConfirm: r[1] ||= () => n("confirm")
|
|
61
|
+
}, {
|
|
62
|
+
reference: j(() => [D(A(c), he(le({
|
|
63
|
+
disabled: e.disabled,
|
|
64
|
+
icon: e.icon,
|
|
65
|
+
type: e.type,
|
|
66
|
+
link: i.value,
|
|
67
|
+
size: e.size,
|
|
68
|
+
text: e.text
|
|
69
|
+
})), {
|
|
70
|
+
default: j(() => [ve(t.$slots, "default")]),
|
|
71
|
+
_: 3
|
|
72
|
+
}, 16)]),
|
|
73
|
+
actions: j(({ confirm: e, cancel: t }) => [D(A(c), {
|
|
74
|
+
size: "small",
|
|
75
|
+
disabled: !1,
|
|
76
|
+
onClick: t
|
|
77
|
+
}, {
|
|
78
|
+
default: j(() => [...r[2] ||= [ce(" 取消 ", -1)]]),
|
|
79
|
+
_: 1
|
|
80
|
+
}, 8, ["onClick"]), D(A(c), {
|
|
81
|
+
type: "danger",
|
|
82
|
+
disabled: !1,
|
|
83
|
+
size: "small",
|
|
84
|
+
onClick: e
|
|
85
|
+
}, {
|
|
86
|
+
default: j(() => [...r[3] ||= [ce(" 确定 ", -1)]]),
|
|
87
|
+
_: 1
|
|
88
|
+
}, 8, ["onClick"])]),
|
|
89
|
+
_: 3
|
|
90
|
+
}, 8, ["title"]));
|
|
91
|
+
}
|
|
92
|
+
}), ke = /* @__PURE__ */ O({
|
|
93
|
+
__name: "XCascaderRequest",
|
|
94
|
+
props: /* @__PURE__ */ fe({
|
|
95
|
+
request: { type: Function },
|
|
96
|
+
clearable: { type: Boolean },
|
|
97
|
+
disabled: {
|
|
98
|
+
type: Boolean,
|
|
99
|
+
default: () => void 0
|
|
100
|
+
},
|
|
101
|
+
filterable: { type: Boolean },
|
|
102
|
+
size: {},
|
|
103
|
+
placeholder: {},
|
|
104
|
+
props: {}
|
|
105
|
+
}, {
|
|
106
|
+
modelValue: {},
|
|
107
|
+
modelModifiers: {}
|
|
108
|
+
}),
|
|
109
|
+
emits: /* @__PURE__ */ fe(["prepare", "change"], ["update:modelValue"]),
|
|
110
|
+
setup(e, { expose: t, emit: n }) {
|
|
111
|
+
let i = n, a = Ce(e, "modelValue"), { data: o, path: s, url: c, execute: l, query: d } = e.request();
|
|
112
|
+
return t({
|
|
113
|
+
search: r(async () => {
|
|
114
|
+
i("prepare", {
|
|
115
|
+
path: s.value,
|
|
116
|
+
query: d.value
|
|
117
|
+
}), l();
|
|
118
|
+
}),
|
|
119
|
+
data: o,
|
|
120
|
+
path: s,
|
|
121
|
+
url: c,
|
|
122
|
+
execute: l,
|
|
123
|
+
query: d
|
|
124
|
+
}), (t, n) => (k(), T(A(u), pe({
|
|
125
|
+
modelValue: a.value,
|
|
126
|
+
"onUpdate:modelValue": n[0] ||= (e) => a.value = e
|
|
127
|
+
}, {
|
|
128
|
+
clearable: e.clearable,
|
|
129
|
+
disabled: e.disabled,
|
|
130
|
+
filterable: e.filterable,
|
|
131
|
+
data: A(o),
|
|
132
|
+
props: e.props
|
|
133
|
+
}), null, 16, ["modelValue"]));
|
|
134
|
+
}
|
|
135
|
+
}), Ae = { class: "flex-1 overflow-hidden" }, je = /* @__PURE__ */ O({
|
|
136
|
+
__name: "XFormFlex",
|
|
137
|
+
props: {
|
|
138
|
+
content: { type: Function },
|
|
139
|
+
data: {},
|
|
140
|
+
disabled: { type: Boolean },
|
|
141
|
+
inline: { type: Boolean },
|
|
142
|
+
labelPosition: {},
|
|
143
|
+
labelSuffix: {},
|
|
144
|
+
labelWidth: {}
|
|
145
|
+
},
|
|
146
|
+
setup(e, { expose: t }) {
|
|
147
|
+
let n = we("form");
|
|
148
|
+
t({
|
|
149
|
+
validate: () => n.value?.validate(),
|
|
150
|
+
clearValidate: () => n.value?.clearValidate()
|
|
151
|
+
});
|
|
152
|
+
let r = () => e.content?.({ data: e.data ?? {} });
|
|
153
|
+
return (e, t) => (k(), E("div", Ae, [D(A(te), null, {
|
|
154
|
+
default: j(() => [D(A(l), pe({
|
|
155
|
+
ref_key: "form",
|
|
156
|
+
ref: n
|
|
157
|
+
}, e.$props, { content: r }), null, 16)]),
|
|
158
|
+
_: 1
|
|
159
|
+
})]));
|
|
160
|
+
}
|
|
161
|
+
}), Me = /* @__PURE__ */ O({
|
|
162
|
+
__name: "XFormRequestNext",
|
|
163
|
+
props: {
|
|
164
|
+
request: { type: Function },
|
|
165
|
+
content: { type: Function },
|
|
166
|
+
disabled: {
|
|
167
|
+
type: [Function, Boolean],
|
|
168
|
+
default: void 0
|
|
169
|
+
},
|
|
170
|
+
inline: { type: Boolean },
|
|
171
|
+
labelPosition: {},
|
|
172
|
+
labelSuffix: {},
|
|
173
|
+
labelWidth: { default: "auto" }
|
|
174
|
+
},
|
|
175
|
+
emits: ["prepare"],
|
|
176
|
+
setup(e, { expose: t, emit: n }) {
|
|
177
|
+
let i = n, { data: a, isFetching: o, execute: s, path: c, url: u, query: d } = e.request(), f = JSON.stringify(a.value), p = w(() => o.value || (typeof e.disabled == "function" ? e.disabled({ data: a.value }) : e.disabled)), m = we("form"), h = () => a.value = JSON.parse(f), g = () => m.value?.validate(), _ = () => m.value?.clearValidate(), v = () => {
|
|
178
|
+
h(), m.value?.resetFields();
|
|
179
|
+
}, y = r(async () => {
|
|
180
|
+
i("prepare", {
|
|
181
|
+
path: c.value,
|
|
182
|
+
query: d.value
|
|
183
|
+
}), s();
|
|
184
|
+
}), b = () => e.content?.({ data: a.value });
|
|
185
|
+
return t({
|
|
186
|
+
data: a,
|
|
187
|
+
url: u,
|
|
188
|
+
search: y,
|
|
189
|
+
validate: g,
|
|
190
|
+
clearValidate: _,
|
|
191
|
+
reset: h,
|
|
192
|
+
resetFields: v
|
|
193
|
+
}), (t, n) => {
|
|
194
|
+
let r = be("loading");
|
|
195
|
+
return Ee((k(), T(A(l), pe({
|
|
196
|
+
ref_key: "form",
|
|
197
|
+
ref: m,
|
|
198
|
+
class: "flex flex-1 flex-col gap-2 overflow-hidden"
|
|
199
|
+
}, {
|
|
200
|
+
data: A(a),
|
|
201
|
+
disabled: p.value,
|
|
202
|
+
inline: e.inline,
|
|
203
|
+
labelPosition: e.labelPosition,
|
|
204
|
+
labelSuffix: e.labelSuffix,
|
|
205
|
+
labelWidth: e.labelWidth,
|
|
206
|
+
content: b
|
|
207
|
+
}), null, 16)), [[r, A(o)]]);
|
|
208
|
+
};
|
|
209
|
+
}
|
|
210
|
+
}), Ne = /* @__PURE__ */ O({
|
|
211
|
+
__name: "XRequest",
|
|
212
|
+
props: {
|
|
213
|
+
request: { type: Function },
|
|
214
|
+
content: { type: Function }
|
|
215
|
+
},
|
|
216
|
+
emits: ["prepare"],
|
|
217
|
+
setup(e, { expose: t, emit: n }) {
|
|
218
|
+
let i = n, { data: a, paging: o, path: s, query: c, isFetching: l, url: u, execute: d } = e.request(), f = r(async () => {
|
|
219
|
+
i("prepare", {
|
|
220
|
+
path: s.value,
|
|
221
|
+
query: c.value
|
|
222
|
+
}), d();
|
|
223
|
+
}), p = () => e.content?.({
|
|
224
|
+
data: a.value,
|
|
225
|
+
path: s.value,
|
|
226
|
+
isFetching: l.value,
|
|
227
|
+
query: c.value,
|
|
228
|
+
paging: o.value
|
|
229
|
+
});
|
|
230
|
+
return t({
|
|
231
|
+
data: a,
|
|
232
|
+
paging: o,
|
|
233
|
+
path: s,
|
|
234
|
+
query: c,
|
|
235
|
+
isFetching: l,
|
|
236
|
+
url: u,
|
|
237
|
+
execute: d,
|
|
238
|
+
search: f
|
|
239
|
+
}), (e, t) => ve(e.$slots, "default", {
|
|
240
|
+
data: A(a),
|
|
241
|
+
paging: A(o),
|
|
242
|
+
path: A(s),
|
|
243
|
+
query: A(c),
|
|
244
|
+
isFetching: A(l),
|
|
245
|
+
execute: A(d)
|
|
246
|
+
}, () => [D(p)]);
|
|
247
|
+
}
|
|
248
|
+
}), Pe = /* @__PURE__ */ O({
|
|
249
|
+
__name: "XSelectRequest",
|
|
250
|
+
props: /* @__PURE__ */ fe({
|
|
251
|
+
request: { type: Function },
|
|
252
|
+
supplement: { type: Function },
|
|
253
|
+
collapseTagsTooltip: { type: Boolean },
|
|
254
|
+
defaultFirstOption: { type: Boolean },
|
|
255
|
+
clearable: { type: Boolean },
|
|
256
|
+
allowCreate: { type: Boolean },
|
|
257
|
+
collapseTags: { type: Boolean },
|
|
258
|
+
data: {},
|
|
259
|
+
disabled: {
|
|
260
|
+
type: Boolean,
|
|
261
|
+
default: () => void 0
|
|
262
|
+
},
|
|
263
|
+
factory: { type: Function },
|
|
264
|
+
filterable: { type: Boolean },
|
|
265
|
+
identify: { type: Function },
|
|
266
|
+
loading: { type: Boolean },
|
|
267
|
+
multiple: {
|
|
268
|
+
type: Boolean,
|
|
269
|
+
default: () => void 0
|
|
270
|
+
},
|
|
271
|
+
remote: { type: Boolean },
|
|
272
|
+
remoteMethod: { type: Function },
|
|
273
|
+
size: {},
|
|
274
|
+
placeholder: {},
|
|
275
|
+
noDataText: {}
|
|
276
|
+
}, {
|
|
277
|
+
modelValue: {},
|
|
278
|
+
modelModifiers: {}
|
|
279
|
+
}),
|
|
280
|
+
emits: /* @__PURE__ */ fe([
|
|
281
|
+
"prepare",
|
|
282
|
+
"blur",
|
|
283
|
+
"change",
|
|
284
|
+
"focus"
|
|
285
|
+
], ["update:modelValue"]),
|
|
286
|
+
setup(e, { expose: t, emit: n }) {
|
|
287
|
+
let i = n, a = Ce(e, "modelValue"), { data: o, isFetching: s, path: c, url: l, execute: u, query: d } = e.request(), f = r(async (e) => {
|
|
288
|
+
i("prepare", {
|
|
289
|
+
path: c.value,
|
|
290
|
+
query: d.value
|
|
291
|
+
}, e), u();
|
|
292
|
+
}), p = e.supplement && ((t) => e.supplement(t, l));
|
|
293
|
+
return t({
|
|
294
|
+
search: f,
|
|
295
|
+
data: o,
|
|
296
|
+
path: c,
|
|
297
|
+
url: l,
|
|
298
|
+
execute: u,
|
|
299
|
+
query: d
|
|
300
|
+
}), (t, n) => (k(), T(A(m), pe({
|
|
301
|
+
data: A(o),
|
|
302
|
+
supplement: A(p),
|
|
303
|
+
remoteMethod: A(f),
|
|
304
|
+
factory: e.factory,
|
|
305
|
+
allowCreate: e.allowCreate,
|
|
306
|
+
clearable: e.clearable,
|
|
307
|
+
collapseTags: e.collapseTags,
|
|
308
|
+
identify: e.identify,
|
|
309
|
+
remote: e.remote,
|
|
310
|
+
filterable: e.remote || e.filterable,
|
|
311
|
+
disabled: A(s) || e.disabled,
|
|
312
|
+
loading: A(s) || e.loading,
|
|
313
|
+
multiple: e.multiple,
|
|
314
|
+
size: e.size
|
|
315
|
+
}, {
|
|
316
|
+
modelValue: a.value,
|
|
317
|
+
"onUpdate:modelValue": n[0] ||= (e) => a.value = e,
|
|
318
|
+
onBlur: n[1] ||= (e) => t.$emit("blur", e),
|
|
319
|
+
onFocus: n[2] ||= (e) => t.$emit("focus", e),
|
|
320
|
+
onChange: n[3] ||= (e) => t.$emit("change", e)
|
|
321
|
+
}), null, 16, ["modelValue"]));
|
|
322
|
+
}
|
|
323
|
+
}), Fe = /* @__PURE__ */ O({
|
|
324
|
+
__name: "XTableFlex",
|
|
325
|
+
props: {
|
|
326
|
+
cellClassName: { type: [Function, String] },
|
|
327
|
+
cellStyle: { type: [Function, Object] },
|
|
328
|
+
rowClassName: { type: [Function, String] },
|
|
329
|
+
rowStyle: { type: [Function, Object] },
|
|
330
|
+
border: { type: Boolean },
|
|
331
|
+
columns: {},
|
|
332
|
+
data: {},
|
|
333
|
+
height: {},
|
|
334
|
+
emptyText: {},
|
|
335
|
+
rowKey: { type: Function },
|
|
336
|
+
showOverflowTooltip: {
|
|
337
|
+
type: [Boolean, Object],
|
|
338
|
+
default: () => void 0
|
|
339
|
+
},
|
|
340
|
+
showSummary: { type: Boolean },
|
|
341
|
+
size: {},
|
|
342
|
+
fit: {
|
|
343
|
+
type: Boolean,
|
|
344
|
+
default: !0
|
|
345
|
+
},
|
|
346
|
+
spanMethod: { type: Function },
|
|
347
|
+
summaryMethod: { type: Function }
|
|
348
|
+
},
|
|
349
|
+
emits: [
|
|
350
|
+
"headerDragend",
|
|
351
|
+
"rowClick",
|
|
352
|
+
"rowDblclick",
|
|
353
|
+
"selectionChange"
|
|
354
|
+
],
|
|
355
|
+
setup(t, { expose: n }) {
|
|
356
|
+
let r = we("container"), i = e(r), a = we("table");
|
|
357
|
+
return n({
|
|
358
|
+
clearSelection: () => a.value?.clearSelection(),
|
|
359
|
+
getSelectionRows: () => a.value?.getSelectionRows(),
|
|
360
|
+
scrollTo: (e, t) => a.value?.scrollTo(e, t),
|
|
361
|
+
setCurrentRow: (e) => a.value?.setCurrentRow(e),
|
|
362
|
+
setScrollLeft: (e) => a.value?.scrollTo(e),
|
|
363
|
+
setScrollTop: (e) => a.value?.scrollTo(e),
|
|
364
|
+
toggleRowSelection: (e, t, n) => a.value?.toggleRowSelection(e, t, n)
|
|
365
|
+
}), (e, n) => (k(), E("div", {
|
|
366
|
+
ref_key: "container",
|
|
367
|
+
ref: r,
|
|
368
|
+
class: "flex-1 overflow-hidden"
|
|
369
|
+
}, [D(A(s), pe({
|
|
370
|
+
ref_key: "table",
|
|
371
|
+
ref: a
|
|
372
|
+
}, {
|
|
373
|
+
...e.$props,
|
|
374
|
+
cellClassName: t.cellClassName,
|
|
375
|
+
cellStyle: t.cellStyle,
|
|
376
|
+
rowClassName: t.rowClassName,
|
|
377
|
+
rowStyle: t.rowStyle,
|
|
378
|
+
showOverflowTooltip: t.showOverflowTooltip,
|
|
379
|
+
fit: t.fit
|
|
380
|
+
}, {
|
|
381
|
+
height: A(i).height.value,
|
|
382
|
+
onRowClick: n[0] ||= (t) => e.$emit("rowClick", t),
|
|
383
|
+
onRowDblclick: n[1] ||= (t) => e.$emit("rowDblclick", t),
|
|
384
|
+
onSelectionChange: n[2] ||= (t) => e.$emit("selectionChange", t),
|
|
385
|
+
onHeaderDragend: n[3] ||= (t, n, r) => e.$emit("headerDragend", t, n, r)
|
|
386
|
+
}), null, 16, ["height"])], 512));
|
|
387
|
+
}
|
|
388
|
+
}), Ie = /* @__PURE__ */ O({
|
|
389
|
+
name: "Rank",
|
|
390
|
+
__name: "rank",
|
|
391
|
+
setup(e) {
|
|
392
|
+
return (e, t) => (k(), E("svg", {
|
|
393
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
394
|
+
viewBox: "0 0 1024 1024"
|
|
395
|
+
}, [oe("path", {
|
|
396
|
+
fill: "currentColor",
|
|
397
|
+
d: "m186.496 544 41.408 41.344a32 32 0 1 1-45.248 45.312l-96-96a32 32 0 0 1 0-45.312l96-96a32 32 0 1 1 45.248 45.312L186.496 480h290.816V186.432l-41.472 41.472a32 32 0 1 1-45.248-45.184l96-96.128a32 32 0 0 1 45.312 0l96 96.064a32 32 0 0 1-45.248 45.184l-41.344-41.28V480H832l-41.344-41.344a32 32 0 0 1 45.248-45.312l96 96a32 32 0 0 1 0 45.312l-96 96a32 32 0 0 1-45.248-45.312L832 544H541.312v293.44l41.344-41.28a32 32 0 1 1 45.248 45.248l-96 96a32 32 0 0 1-45.312 0l-96-96a32 32 0 1 1 45.312-45.248l41.408 41.408V544z"
|
|
398
|
+
})]));
|
|
399
|
+
}
|
|
400
|
+
}), Le = /* @__PURE__ */ O({
|
|
401
|
+
name: "Setting",
|
|
402
|
+
__name: "setting",
|
|
403
|
+
setup(e) {
|
|
404
|
+
return (e, t) => (k(), E("svg", {
|
|
405
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
406
|
+
viewBox: "0 0 1024 1024"
|
|
407
|
+
}, [oe("path", {
|
|
408
|
+
fill: "currentColor",
|
|
409
|
+
d: "M600.704 64a32 32 0 0 1 30.464 22.208l35.2 109.376c14.784 7.232 28.928 15.36 42.432 24.512l112.384-24.192a32 32 0 0 1 34.432 15.36L944.32 364.8a32 32 0 0 1-4.032 37.504l-77.12 85.12a357 357 0 0 1 0 49.024l77.12 85.248a32 32 0 0 1 4.032 37.504l-88.704 153.6a32 32 0 0 1-34.432 15.296L708.8 803.904c-13.44 9.088-27.648 17.28-42.368 24.512l-35.264 109.376A32 32 0 0 1 600.704 960H423.296a32 32 0 0 1-30.464-22.208L357.696 828.48a352 352 0 0 1-42.56-24.64l-112.32 24.256a32 32 0 0 1-34.432-15.36L79.68 659.2a32 32 0 0 1 4.032-37.504l77.12-85.248a357 357 0 0 1 0-48.896l-77.12-85.248A32 32 0 0 1 79.68 364.8l88.704-153.6a32 32 0 0 1 34.432-15.296l112.32 24.256c13.568-9.152 27.776-17.408 42.56-24.64l35.2-109.312A32 32 0 0 1 423.232 64H600.64zm-23.424 64H446.72l-36.352 113.088-24.512 11.968a294 294 0 0 0-34.816 20.096l-22.656 15.36-116.224-25.088-65.28 113.152 79.68 88.192-1.92 27.136a293 293 0 0 0 0 40.192l1.92 27.136-79.808 88.192 65.344 113.152 116.224-25.024 22.656 15.296a294 294 0 0 0 34.816 20.096l24.512 11.968L446.72 896h130.688l36.48-113.152 24.448-11.904a288 288 0 0 0 34.752-20.096l22.592-15.296 116.288 25.024 65.28-113.152-79.744-88.192 1.92-27.136a293 293 0 0 0 0-40.256l-1.92-27.136 79.808-88.128-65.344-113.152-116.288 24.96-22.592-15.232a288 288 0 0 0-34.752-20.096l-24.448-11.904L577.344 128zM512 320a192 192 0 1 1 0 384 192 192 0 0 1 0-384m0 64a128 128 0 1 0 0 256 128 128 0 0 0 0-256"
|
|
410
|
+
})]));
|
|
411
|
+
}
|
|
412
|
+
});
|
|
413
|
+
//#endregion
|
|
414
|
+
//#region node_modules/sortablejs/modular/sortable.esm.js
|
|
415
|
+
function Re(e, t, n) {
|
|
416
|
+
return (t = We(t)) in e ? Object.defineProperty(e, t, {
|
|
417
|
+
value: n,
|
|
418
|
+
enumerable: !0,
|
|
419
|
+
configurable: !0,
|
|
420
|
+
writable: !0
|
|
421
|
+
}) : e[t] = n, e;
|
|
422
|
+
}
|
|
423
|
+
function ze() {
|
|
424
|
+
return ze = Object.assign ? Object.assign.bind() : function(e) {
|
|
425
|
+
for (var t = 1; t < arguments.length; t++) {
|
|
426
|
+
var n = arguments[t];
|
|
427
|
+
for (var r in n) ({}).hasOwnProperty.call(n, r) && (e[r] = n[r]);
|
|
428
|
+
}
|
|
429
|
+
return e;
|
|
430
|
+
}, ze.apply(null, arguments);
|
|
431
|
+
}
|
|
432
|
+
function Be(e, t) {
|
|
433
|
+
var n = Object.keys(e);
|
|
434
|
+
if (Object.getOwnPropertySymbols) {
|
|
435
|
+
var r = Object.getOwnPropertySymbols(e);
|
|
436
|
+
t && (r = r.filter(function(t) {
|
|
437
|
+
return Object.getOwnPropertyDescriptor(e, t).enumerable;
|
|
438
|
+
})), n.push.apply(n, r);
|
|
439
|
+
}
|
|
440
|
+
return n;
|
|
441
|
+
}
|
|
442
|
+
function M(e) {
|
|
443
|
+
for (var t = 1; t < arguments.length; t++) {
|
|
444
|
+
var n = arguments[t] == null ? {} : arguments[t];
|
|
445
|
+
t % 2 ? Be(Object(n), !0).forEach(function(t) {
|
|
446
|
+
Re(e, t, n[t]);
|
|
447
|
+
}) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(n)) : Be(Object(n)).forEach(function(t) {
|
|
448
|
+
Object.defineProperty(e, t, Object.getOwnPropertyDescriptor(n, t));
|
|
449
|
+
});
|
|
450
|
+
}
|
|
451
|
+
return e;
|
|
452
|
+
}
|
|
453
|
+
function Ve(e, t) {
|
|
454
|
+
if (e == null) return {};
|
|
455
|
+
var n, r, i = He(e, t);
|
|
456
|
+
if (Object.getOwnPropertySymbols) {
|
|
457
|
+
var a = Object.getOwnPropertySymbols(e);
|
|
458
|
+
for (r = 0; r < a.length; r++) n = a[r], t.indexOf(n) === -1 && {}.propertyIsEnumerable.call(e, n) && (i[n] = e[n]);
|
|
459
|
+
}
|
|
460
|
+
return i;
|
|
461
|
+
}
|
|
462
|
+
function He(e, t) {
|
|
463
|
+
if (e == null) return {};
|
|
464
|
+
var n = {};
|
|
465
|
+
for (var r in e) if ({}.hasOwnProperty.call(e, r)) {
|
|
466
|
+
if (t.indexOf(r) !== -1) continue;
|
|
467
|
+
n[r] = e[r];
|
|
468
|
+
}
|
|
469
|
+
return n;
|
|
470
|
+
}
|
|
471
|
+
function Ue(e, t) {
|
|
472
|
+
if (typeof e != "object" || !e) return e;
|
|
473
|
+
var n = e[Symbol.toPrimitive];
|
|
474
|
+
if (n !== void 0) {
|
|
475
|
+
var r = n.call(e, t || "default");
|
|
476
|
+
if (typeof r != "object") return r;
|
|
477
|
+
throw TypeError("@@toPrimitive must return a primitive value.");
|
|
478
|
+
}
|
|
479
|
+
return (t === "string" ? String : Number)(e);
|
|
480
|
+
}
|
|
481
|
+
function We(e) {
|
|
482
|
+
var t = Ue(e, "string");
|
|
483
|
+
return typeof t == "symbol" ? t : t + "";
|
|
484
|
+
}
|
|
485
|
+
function Ge(e) {
|
|
486
|
+
"@babel/helpers - typeof";
|
|
487
|
+
return Ge = typeof Symbol == "function" && typeof Symbol.iterator == "symbol" ? function(e) {
|
|
488
|
+
return typeof e;
|
|
489
|
+
} : function(e) {
|
|
490
|
+
return e && typeof Symbol == "function" && e.constructor === Symbol && e !== Symbol.prototype ? "symbol" : typeof e;
|
|
491
|
+
}, Ge(e);
|
|
492
|
+
}
|
|
493
|
+
var Ke = "1.15.7";
|
|
494
|
+
function qe(e) {
|
|
495
|
+
if (typeof window < "u" && window.navigator) return !!/* @__PURE__ */ navigator.userAgent.match(e);
|
|
496
|
+
}
|
|
497
|
+
var Je = qe(/(?:Trident.*rv[ :]?11\.|msie|iemobile|Windows Phone)/i), Ye = qe(/Edge/i), Xe = qe(/firefox/i), Ze = qe(/safari/i) && !qe(/chrome/i) && !qe(/android/i), Qe = qe(/iP(ad|od|hone)/i), $e = qe(/chrome/i) && qe(/android/i), et = {
|
|
498
|
+
capture: !1,
|
|
499
|
+
passive: !1
|
|
500
|
+
};
|
|
501
|
+
function N(e, t, n) {
|
|
502
|
+
e.addEventListener(t, n, !Je && et);
|
|
503
|
+
}
|
|
504
|
+
function P(e, t, n) {
|
|
505
|
+
e.removeEventListener(t, n, !Je && et);
|
|
506
|
+
}
|
|
507
|
+
function tt(e, t) {
|
|
508
|
+
if (t) {
|
|
509
|
+
if (t[0] === ">" && (t = t.substring(1)), e) try {
|
|
510
|
+
if (e.matches) return e.matches(t);
|
|
511
|
+
if (e.msMatchesSelector) return e.msMatchesSelector(t);
|
|
512
|
+
if (e.webkitMatchesSelector) return e.webkitMatchesSelector(t);
|
|
513
|
+
} catch {
|
|
514
|
+
return !1;
|
|
515
|
+
}
|
|
516
|
+
return !1;
|
|
517
|
+
}
|
|
518
|
+
}
|
|
519
|
+
function nt(e) {
|
|
520
|
+
return e.host && e !== document && e.host.nodeType && e.host !== e ? e.host : e.parentNode;
|
|
521
|
+
}
|
|
522
|
+
function F(e, t, n, r) {
|
|
523
|
+
if (e) {
|
|
524
|
+
n ||= document;
|
|
525
|
+
do {
|
|
526
|
+
if (t != null && (t[0] === ">" ? e.parentNode === n && tt(e, t) : tt(e, t)) || r && e === n) return e;
|
|
527
|
+
if (e === n) break;
|
|
528
|
+
} while (e = nt(e));
|
|
529
|
+
}
|
|
530
|
+
return null;
|
|
531
|
+
}
|
|
532
|
+
var rt = /\s+/g;
|
|
533
|
+
function I(e, t, n) {
|
|
534
|
+
e && t && (e.classList ? e.classList[n ? "add" : "remove"](t) : e.className = ((" " + e.className + " ").replace(rt, " ").replace(" " + t + " ", " ") + (n ? " " + t : "")).replace(rt, " "));
|
|
535
|
+
}
|
|
536
|
+
function L(e, t, n) {
|
|
537
|
+
var r = e && e.style;
|
|
538
|
+
if (r) {
|
|
539
|
+
if (n === void 0) return document.defaultView && document.defaultView.getComputedStyle ? n = document.defaultView.getComputedStyle(e, "") : e.currentStyle && (n = e.currentStyle), t === void 0 ? n : n[t];
|
|
540
|
+
!(t in r) && t.indexOf("webkit") === -1 && (t = "-webkit-" + t), r[t] = n + (typeof n == "string" ? "" : "px");
|
|
541
|
+
}
|
|
542
|
+
}
|
|
543
|
+
function it(e, t) {
|
|
544
|
+
var n = "";
|
|
545
|
+
if (typeof e == "string") n = e;
|
|
546
|
+
else do {
|
|
547
|
+
var r = L(e, "transform");
|
|
548
|
+
r && r !== "none" && (n = r + " " + n);
|
|
549
|
+
} while (!t && (e = e.parentNode));
|
|
550
|
+
var i = window.DOMMatrix || window.WebKitCSSMatrix || window.CSSMatrix || window.MSCSSMatrix;
|
|
551
|
+
return i && new i(n);
|
|
552
|
+
}
|
|
553
|
+
function at(e, t, n) {
|
|
554
|
+
if (e) {
|
|
555
|
+
var r = e.getElementsByTagName(t), i = 0, a = r.length;
|
|
556
|
+
if (n) for (; i < a; i++) n(r[i], i);
|
|
557
|
+
return r;
|
|
558
|
+
}
|
|
559
|
+
return [];
|
|
560
|
+
}
|
|
561
|
+
function ot() {
|
|
562
|
+
return document.scrollingElement || document.documentElement;
|
|
563
|
+
}
|
|
564
|
+
function R(e, t, n, r, i) {
|
|
565
|
+
if (!(!e.getBoundingClientRect && e !== window)) {
|
|
566
|
+
var a, o, s, c, l, u, d;
|
|
567
|
+
if (e !== window && e.parentNode && e !== ot() ? (a = e.getBoundingClientRect(), o = a.top, s = a.left, c = a.bottom, l = a.right, u = a.height, d = a.width) : (o = 0, s = 0, c = window.innerHeight, l = window.innerWidth, u = window.innerHeight, d = window.innerWidth), (t || n) && e !== window && (i ||= e.parentNode, !Je)) do
|
|
568
|
+
if (i && i.getBoundingClientRect && (L(i, "transform") !== "none" || n && L(i, "position") !== "static")) {
|
|
569
|
+
var f = i.getBoundingClientRect();
|
|
570
|
+
o -= f.top + parseInt(L(i, "border-top-width")), s -= f.left + parseInt(L(i, "border-left-width")), c = o + a.height, l = s + a.width;
|
|
571
|
+
break;
|
|
572
|
+
}
|
|
573
|
+
while (i = i.parentNode);
|
|
574
|
+
if (r && e !== window) {
|
|
575
|
+
var p = it(i || e), m = p && p.a, h = p && p.d;
|
|
576
|
+
p && (o /= h, s /= m, d /= m, u /= h, c = o + u, l = s + d);
|
|
577
|
+
}
|
|
578
|
+
return {
|
|
579
|
+
top: o,
|
|
580
|
+
left: s,
|
|
581
|
+
bottom: c,
|
|
582
|
+
right: l,
|
|
583
|
+
width: d,
|
|
584
|
+
height: u
|
|
585
|
+
};
|
|
586
|
+
}
|
|
587
|
+
}
|
|
588
|
+
function st(e, t, n) {
|
|
589
|
+
for (var r = ft(e, !0), i = R(e)[t]; r;) {
|
|
590
|
+
var a = R(r)[n], o = void 0;
|
|
591
|
+
if (o = n === "top" || n === "left" ? i >= a : i <= a, !o) return r;
|
|
592
|
+
if (r === ot()) break;
|
|
593
|
+
r = ft(r, !1);
|
|
594
|
+
}
|
|
595
|
+
return !1;
|
|
596
|
+
}
|
|
597
|
+
function ct(e, t, n, r) {
|
|
598
|
+
for (var i = 0, a = 0, o = e.children; a < o.length;) {
|
|
599
|
+
if (o[a].style.display !== "none" && o[a] !== Q.ghost && (r || o[a] !== Q.dragged) && F(o[a], n.draggable, e, !1)) {
|
|
600
|
+
if (i === t) return o[a];
|
|
601
|
+
i++;
|
|
602
|
+
}
|
|
603
|
+
a++;
|
|
604
|
+
}
|
|
605
|
+
return null;
|
|
606
|
+
}
|
|
607
|
+
function lt(e, t) {
|
|
608
|
+
for (var n = e.lastElementChild; n && (n === Q.ghost || L(n, "display") === "none" || t && !tt(n, t));) n = n.previousElementSibling;
|
|
609
|
+
return n || null;
|
|
610
|
+
}
|
|
611
|
+
function z(e, t) {
|
|
612
|
+
var n = 0;
|
|
613
|
+
if (!e || !e.parentNode) return -1;
|
|
614
|
+
for (; e = e.previousElementSibling;) e.nodeName.toUpperCase() !== "TEMPLATE" && e !== Q.clone && (!t || tt(e, t)) && n++;
|
|
615
|
+
return n;
|
|
616
|
+
}
|
|
617
|
+
function ut(e) {
|
|
618
|
+
var t = 0, n = 0, r = ot();
|
|
619
|
+
if (e) do {
|
|
620
|
+
var i = it(e), a = i.a, o = i.d;
|
|
621
|
+
t += e.scrollLeft * a, n += e.scrollTop * o;
|
|
622
|
+
} while (e !== r && (e = e.parentNode));
|
|
623
|
+
return [t, n];
|
|
624
|
+
}
|
|
625
|
+
function dt(e, t) {
|
|
626
|
+
for (var n in e) if (e.hasOwnProperty(n)) {
|
|
627
|
+
for (var r in t) if (t.hasOwnProperty(r) && t[r] === e[n][r]) return Number(n);
|
|
628
|
+
}
|
|
629
|
+
return -1;
|
|
630
|
+
}
|
|
631
|
+
function ft(e, t) {
|
|
632
|
+
if (!e || !e.getBoundingClientRect) return ot();
|
|
633
|
+
var n = e, r = !1;
|
|
634
|
+
do
|
|
635
|
+
if (n.clientWidth < n.scrollWidth || n.clientHeight < n.scrollHeight) {
|
|
636
|
+
var i = L(n);
|
|
637
|
+
if (n.clientWidth < n.scrollWidth && (i.overflowX == "auto" || i.overflowX == "scroll") || n.clientHeight < n.scrollHeight && (i.overflowY == "auto" || i.overflowY == "scroll")) {
|
|
638
|
+
if (!n.getBoundingClientRect || n === document.body) return ot();
|
|
639
|
+
if (r || t) return n;
|
|
640
|
+
r = !0;
|
|
641
|
+
}
|
|
642
|
+
}
|
|
643
|
+
while (n = n.parentNode);
|
|
644
|
+
return ot();
|
|
645
|
+
}
|
|
646
|
+
function pt(e, t) {
|
|
647
|
+
if (e && t) for (var n in t) t.hasOwnProperty(n) && (e[n] = t[n]);
|
|
648
|
+
return e;
|
|
649
|
+
}
|
|
650
|
+
function mt(e, t) {
|
|
651
|
+
return Math.round(e.top) === Math.round(t.top) && Math.round(e.left) === Math.round(t.left) && Math.round(e.height) === Math.round(t.height) && Math.round(e.width) === Math.round(t.width);
|
|
652
|
+
}
|
|
653
|
+
var ht;
|
|
654
|
+
function gt(e, t) {
|
|
655
|
+
return function() {
|
|
656
|
+
if (!ht) {
|
|
657
|
+
var n = arguments, r = this;
|
|
658
|
+
n.length === 1 ? e.call(r, n[0]) : e.apply(r, n), ht = setTimeout(function() {
|
|
659
|
+
ht = void 0;
|
|
660
|
+
}, t);
|
|
661
|
+
}
|
|
662
|
+
};
|
|
663
|
+
}
|
|
664
|
+
function _t() {
|
|
665
|
+
clearTimeout(ht), ht = void 0;
|
|
666
|
+
}
|
|
667
|
+
function vt(e, t, n) {
|
|
668
|
+
e.scrollLeft += t, e.scrollTop += n;
|
|
669
|
+
}
|
|
670
|
+
function yt(e) {
|
|
671
|
+
var t = window.Polymer, n = window.jQuery || window.Zepto;
|
|
672
|
+
return t && t.dom ? t.dom(e).cloneNode(!0) : n ? n(e).clone(!0)[0] : e.cloneNode(!0);
|
|
673
|
+
}
|
|
674
|
+
function bt(e, t, n) {
|
|
675
|
+
var r = {};
|
|
676
|
+
return Array.from(e.children).forEach(function(i) {
|
|
677
|
+
if (!(!F(i, t.draggable, e, !1) || i.animated || i === n)) {
|
|
678
|
+
var a = R(i);
|
|
679
|
+
r.left = Math.min(r.left ?? Infinity, a.left), r.top = Math.min(r.top ?? Infinity, a.top), r.right = Math.max(r.right ?? -Infinity, a.right), r.bottom = Math.max(r.bottom ?? -Infinity, a.bottom);
|
|
680
|
+
}
|
|
681
|
+
}), r.width = r.right - r.left, r.height = r.bottom - r.top, r.x = r.left, r.y = r.top, r;
|
|
682
|
+
}
|
|
683
|
+
var B = "Sortable" + (/* @__PURE__ */ new Date()).getTime();
|
|
684
|
+
function xt() {
|
|
685
|
+
var e = [], t;
|
|
686
|
+
return {
|
|
687
|
+
captureAnimationState: function() {
|
|
688
|
+
e = [], this.options.animation && [].slice.call(this.el.children).forEach(function(t) {
|
|
689
|
+
if (!(L(t, "display") === "none" || t === Q.ghost)) {
|
|
690
|
+
e.push({
|
|
691
|
+
target: t,
|
|
692
|
+
rect: R(t)
|
|
693
|
+
});
|
|
694
|
+
var n = M({}, e[e.length - 1].rect);
|
|
695
|
+
if (t.thisAnimationDuration) {
|
|
696
|
+
var r = it(t, !0);
|
|
697
|
+
r && (n.top -= r.f, n.left -= r.e);
|
|
698
|
+
}
|
|
699
|
+
t.fromRect = n;
|
|
700
|
+
}
|
|
701
|
+
});
|
|
702
|
+
},
|
|
703
|
+
addAnimationState: function(t) {
|
|
704
|
+
e.push(t);
|
|
705
|
+
},
|
|
706
|
+
removeAnimationState: function(t) {
|
|
707
|
+
e.splice(dt(e, { target: t }), 1);
|
|
708
|
+
},
|
|
709
|
+
animateAll: function(n) {
|
|
710
|
+
var r = this;
|
|
711
|
+
if (!this.options.animation) {
|
|
712
|
+
clearTimeout(t), typeof n == "function" && n();
|
|
713
|
+
return;
|
|
714
|
+
}
|
|
715
|
+
var i = !1, a = 0;
|
|
716
|
+
e.forEach(function(e) {
|
|
717
|
+
var t = 0, n = e.target, o = n.fromRect, s = R(n), c = n.prevFromRect, l = n.prevToRect, u = e.rect, d = it(n, !0);
|
|
718
|
+
d && (s.top -= d.f, s.left -= d.e), n.toRect = s, n.thisAnimationDuration && mt(c, s) && !mt(o, s) && (u.top - s.top) / (u.left - s.left) === (o.top - s.top) / (o.left - s.left) && (t = Ct(u, c, l, r.options)), mt(s, o) || (n.prevFromRect = o, n.prevToRect = s, t ||= r.options.animation, r.animate(n, u, s, t)), t && (i = !0, a = Math.max(a, t), clearTimeout(n.animationResetTimer), n.animationResetTimer = setTimeout(function() {
|
|
719
|
+
n.animationTime = 0, n.prevFromRect = null, n.fromRect = null, n.prevToRect = null, n.thisAnimationDuration = null;
|
|
720
|
+
}, t), n.thisAnimationDuration = t);
|
|
721
|
+
}), clearTimeout(t), i ? t = setTimeout(function() {
|
|
722
|
+
typeof n == "function" && n();
|
|
723
|
+
}, a) : typeof n == "function" && n(), e = [];
|
|
724
|
+
},
|
|
725
|
+
animate: function(e, t, n, r) {
|
|
726
|
+
if (r) {
|
|
727
|
+
L(e, "transition", ""), L(e, "transform", "");
|
|
728
|
+
var i = it(this.el), a = i && i.a, o = i && i.d, s = (t.left - n.left) / (a || 1), c = (t.top - n.top) / (o || 1);
|
|
729
|
+
e.animatingX = !!s, e.animatingY = !!c, L(e, "transform", "translate3d(" + s + "px," + c + "px,0)"), this.forRepaintDummy = St(e), L(e, "transition", "transform " + r + "ms" + (this.options.easing ? " " + this.options.easing : "")), L(e, "transform", "translate3d(0,0,0)"), typeof e.animated == "number" && clearTimeout(e.animated), e.animated = setTimeout(function() {
|
|
730
|
+
L(e, "transition", ""), L(e, "transform", ""), e.animated = !1, e.animatingX = !1, e.animatingY = !1;
|
|
731
|
+
}, r);
|
|
732
|
+
}
|
|
733
|
+
}
|
|
734
|
+
};
|
|
735
|
+
}
|
|
736
|
+
function St(e) {
|
|
737
|
+
return e.offsetWidth;
|
|
738
|
+
}
|
|
739
|
+
function Ct(e, t, n, r) {
|
|
740
|
+
return Math.sqrt((t.top - e.top) ** 2 + (t.left - e.left) ** 2) / Math.sqrt((t.top - n.top) ** 2 + (t.left - n.left) ** 2) * r.animation;
|
|
741
|
+
}
|
|
742
|
+
var wt = [], Tt = { initializeByDefault: !0 }, Et = {
|
|
743
|
+
mount: function(e) {
|
|
744
|
+
for (var t in Tt) Tt.hasOwnProperty(t) && !(t in e) && (e[t] = Tt[t]);
|
|
745
|
+
wt.forEach(function(t) {
|
|
746
|
+
if (t.pluginName === e.pluginName) throw `Sortable: Cannot mount plugin ${e.pluginName} more than once`;
|
|
747
|
+
}), wt.push(e);
|
|
748
|
+
},
|
|
749
|
+
pluginEvent: function(e, t, n) {
|
|
750
|
+
var r = this;
|
|
751
|
+
this.eventCanceled = !1, n.cancel = function() {
|
|
752
|
+
r.eventCanceled = !0;
|
|
753
|
+
};
|
|
754
|
+
var i = e + "Global";
|
|
755
|
+
wt.forEach(function(r) {
|
|
756
|
+
t[r.pluginName] && (t[r.pluginName][i] && t[r.pluginName][i](M({ sortable: t }, n)), t.options[r.pluginName] && t[r.pluginName][e] && t[r.pluginName][e](M({ sortable: t }, n)));
|
|
757
|
+
});
|
|
758
|
+
},
|
|
759
|
+
initializePlugins: function(e, t, n, r) {
|
|
760
|
+
for (var i in wt.forEach(function(r) {
|
|
761
|
+
var i = r.pluginName;
|
|
762
|
+
if (!(!e.options[i] && !r.initializeByDefault)) {
|
|
763
|
+
var a = new r(e, t, e.options);
|
|
764
|
+
a.sortable = e, a.options = e.options, e[i] = a, ze(n, a.defaults);
|
|
765
|
+
}
|
|
766
|
+
}), e.options) if (e.options.hasOwnProperty(i)) {
|
|
767
|
+
var a = this.modifyOption(e, i, e.options[i]);
|
|
768
|
+
a !== void 0 && (e.options[i] = a);
|
|
769
|
+
}
|
|
770
|
+
},
|
|
771
|
+
getEventProperties: function(e, t) {
|
|
772
|
+
var n = {};
|
|
773
|
+
return wt.forEach(function(r) {
|
|
774
|
+
typeof r.eventProperties == "function" && ze(n, r.eventProperties.call(t[r.pluginName], e));
|
|
775
|
+
}), n;
|
|
776
|
+
},
|
|
777
|
+
modifyOption: function(e, t, n) {
|
|
778
|
+
var r;
|
|
779
|
+
return wt.forEach(function(i) {
|
|
780
|
+
e[i.pluginName] && i.optionListeners && typeof i.optionListeners[t] == "function" && (r = i.optionListeners[t].call(e[i.pluginName], n));
|
|
781
|
+
}), r;
|
|
782
|
+
}
|
|
783
|
+
};
|
|
784
|
+
function Dt(e) {
|
|
785
|
+
var t = e.sortable, n = e.rootEl, r = e.name, i = e.targetEl, a = e.cloneEl, o = e.toEl, s = e.fromEl, c = e.oldIndex, l = e.newIndex, u = e.oldDraggableIndex, d = e.newDraggableIndex, f = e.originalEvent, p = e.putSortable, m = e.extraEventProperties;
|
|
786
|
+
if (t ||= n && n[B], t) {
|
|
787
|
+
var h, g = t.options, _ = "on" + r.charAt(0).toUpperCase() + r.substr(1);
|
|
788
|
+
window.CustomEvent && !Je && !Ye ? h = new CustomEvent(r, {
|
|
789
|
+
bubbles: !0,
|
|
790
|
+
cancelable: !0
|
|
791
|
+
}) : (h = document.createEvent("Event"), h.initEvent(r, !0, !0)), h.to = o || n, h.from = s || n, h.item = i || n, h.clone = a, h.oldIndex = c, h.newIndex = l, h.oldDraggableIndex = u, h.newDraggableIndex = d, h.originalEvent = f, h.pullMode = p ? p.lastPutMode : void 0;
|
|
792
|
+
var v = M(M({}, m), Et.getEventProperties(r, t));
|
|
793
|
+
for (var y in v) h[y] = v[y];
|
|
794
|
+
n && n.dispatchEvent(h), g[_] && g[_].call(t, h);
|
|
795
|
+
}
|
|
796
|
+
}
|
|
797
|
+
var Ot = ["evt"], V = function(e, t) {
|
|
798
|
+
var n = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : {}, r = n.evt, i = Ve(n, Ot);
|
|
799
|
+
Et.pluginEvent.bind(Q)(e, t, M({
|
|
800
|
+
dragEl: U,
|
|
801
|
+
parentEl: W,
|
|
802
|
+
ghostEl: G,
|
|
803
|
+
rootEl: K,
|
|
804
|
+
nextEl: kt,
|
|
805
|
+
lastDownEl: At,
|
|
806
|
+
cloneEl: q,
|
|
807
|
+
cloneHidden: jt,
|
|
808
|
+
dragStarted: Wt,
|
|
809
|
+
putSortable: Y,
|
|
810
|
+
activeSortable: Q.active,
|
|
811
|
+
originalEvent: r,
|
|
812
|
+
oldIndex: Mt,
|
|
813
|
+
oldDraggableIndex: Nt,
|
|
814
|
+
newIndex: J,
|
|
815
|
+
newDraggableIndex: Pt,
|
|
816
|
+
hideGhostForTarget: ln,
|
|
817
|
+
unhideGhostForTarget: un,
|
|
818
|
+
cloneNowHidden: function() {
|
|
819
|
+
jt = !0;
|
|
820
|
+
},
|
|
821
|
+
cloneNowShown: function() {
|
|
822
|
+
jt = !1;
|
|
823
|
+
},
|
|
824
|
+
dispatchSortableEvent: function(e) {
|
|
825
|
+
H({
|
|
826
|
+
sortable: t,
|
|
827
|
+
name: e,
|
|
828
|
+
originalEvent: r
|
|
829
|
+
});
|
|
830
|
+
}
|
|
831
|
+
}, i));
|
|
832
|
+
};
|
|
833
|
+
function H(e) {
|
|
834
|
+
Dt(M({
|
|
835
|
+
putSortable: Y,
|
|
836
|
+
cloneEl: q,
|
|
837
|
+
targetEl: U,
|
|
838
|
+
rootEl: K,
|
|
839
|
+
oldIndex: Mt,
|
|
840
|
+
oldDraggableIndex: Nt,
|
|
841
|
+
newIndex: J,
|
|
842
|
+
newDraggableIndex: Pt
|
|
843
|
+
}, e));
|
|
844
|
+
}
|
|
845
|
+
var U, W, G, K, kt, At, q, jt, Mt, J, Nt, Pt, Ft, Y, It = !1, Lt = !1, Rt = [], zt, X, Bt, Vt, Ht, Ut, Wt, Gt, Kt, qt = !1, Jt = !1, Yt, Z, Xt = [], Zt = !1, Qt = [], $t = typeof document < "u", en = Qe, tn = Ye || Je ? "cssFloat" : "float", nn = $t && !$e && !Qe && "draggable" in document.createElement("div"), rn = function() {
|
|
846
|
+
if ($t) {
|
|
847
|
+
if (Je) return !1;
|
|
848
|
+
var e = document.createElement("x");
|
|
849
|
+
return e.style.cssText = "pointer-events:auto", e.style.pointerEvents === "auto";
|
|
850
|
+
}
|
|
851
|
+
}(), an = function(e, t) {
|
|
852
|
+
var n = L(e), r = parseInt(n.width) - parseInt(n.paddingLeft) - parseInt(n.paddingRight) - parseInt(n.borderLeftWidth) - parseInt(n.borderRightWidth), i = ct(e, 0, t), a = ct(e, 1, t), o = i && L(i), s = a && L(a), c = o && parseInt(o.marginLeft) + parseInt(o.marginRight) + R(i).width, l = s && parseInt(s.marginLeft) + parseInt(s.marginRight) + R(a).width;
|
|
853
|
+
if (n.display === "flex") return n.flexDirection === "column" || n.flexDirection === "column-reverse" ? "vertical" : "horizontal";
|
|
854
|
+
if (n.display === "grid") return n.gridTemplateColumns.split(" ").length <= 1 ? "vertical" : "horizontal";
|
|
855
|
+
if (i && o.float && o.float !== "none") {
|
|
856
|
+
var u = o.float === "left" ? "left" : "right";
|
|
857
|
+
return a && (s.clear === "both" || s.clear === u) ? "vertical" : "horizontal";
|
|
858
|
+
}
|
|
859
|
+
return i && (o.display === "block" || o.display === "flex" || o.display === "table" || o.display === "grid" || c >= r && n[tn] === "none" || a && n[tn] === "none" && c + l > r) ? "vertical" : "horizontal";
|
|
860
|
+
}, on = function(e, t, n) {
|
|
861
|
+
var r = n ? e.left : e.top, i = n ? e.right : e.bottom, a = n ? e.width : e.height, o = n ? t.left : t.top, s = n ? t.right : t.bottom, c = n ? t.width : t.height;
|
|
862
|
+
return r === o || i === s || r + a / 2 === o + c / 2;
|
|
863
|
+
}, sn = function(e, t) {
|
|
864
|
+
var n;
|
|
865
|
+
return Rt.some(function(r) {
|
|
866
|
+
var i = r[B].options.emptyInsertThreshold;
|
|
867
|
+
if (!(!i || lt(r))) {
|
|
868
|
+
var a = R(r), o = e >= a.left - i && e <= a.right + i, s = t >= a.top - i && t <= a.bottom + i;
|
|
869
|
+
if (o && s) return n = r;
|
|
870
|
+
}
|
|
871
|
+
}), n;
|
|
872
|
+
}, cn = function(e) {
|
|
873
|
+
function t(e, n) {
|
|
874
|
+
return function(r, i, a, o) {
|
|
875
|
+
var s = r.options.group.name && i.options.group.name && r.options.group.name === i.options.group.name;
|
|
876
|
+
if (e == null && (n || s)) return !0;
|
|
877
|
+
if (e == null || e === !1) return !1;
|
|
878
|
+
if (n && e === "clone") return e;
|
|
879
|
+
if (typeof e == "function") return t(e(r, i, a, o), n)(r, i, a, o);
|
|
880
|
+
var c = (n ? r : i).options.group.name;
|
|
881
|
+
return e === !0 || typeof e == "string" && e === c || e.join && e.indexOf(c) > -1;
|
|
882
|
+
};
|
|
883
|
+
}
|
|
884
|
+
var n = {}, r = e.group;
|
|
885
|
+
(!r || Ge(r) != "object") && (r = { name: r }), n.name = r.name, n.checkPull = t(r.pull, !0), n.checkPut = t(r.put), n.revertClone = r.revertClone, e.group = n;
|
|
886
|
+
}, ln = function() {
|
|
887
|
+
!rn && G && L(G, "display", "none");
|
|
888
|
+
}, un = function() {
|
|
889
|
+
!rn && G && L(G, "display", "");
|
|
890
|
+
};
|
|
891
|
+
$t && !$e && document.addEventListener("click", function(e) {
|
|
892
|
+
if (Lt) return e.preventDefault(), e.stopPropagation && e.stopPropagation(), e.stopImmediatePropagation && e.stopImmediatePropagation(), Lt = !1, !1;
|
|
893
|
+
}, !0);
|
|
894
|
+
var dn = function(e) {
|
|
895
|
+
if (U) {
|
|
896
|
+
e = e.touches ? e.touches[0] : e;
|
|
897
|
+
var t = sn(e.clientX, e.clientY);
|
|
898
|
+
if (t) {
|
|
899
|
+
var n = {};
|
|
900
|
+
for (var r in e) e.hasOwnProperty(r) && (n[r] = e[r]);
|
|
901
|
+
n.target = n.rootEl = t, n.preventDefault = void 0, n.stopPropagation = void 0, t[B]._onDragOver(n);
|
|
902
|
+
}
|
|
903
|
+
}
|
|
904
|
+
}, fn = function(e) {
|
|
905
|
+
U && U.parentNode[B]._isOutsideThisEl(e.target);
|
|
906
|
+
};
|
|
907
|
+
function Q(e, t) {
|
|
908
|
+
if (!(e && e.nodeType && e.nodeType === 1)) throw `Sortable: \`el\` must be an HTMLElement, not ${{}.toString.call(e)}`;
|
|
909
|
+
this.el = e, this.options = t = ze({}, t), e[B] = this;
|
|
910
|
+
var n = {
|
|
911
|
+
group: null,
|
|
912
|
+
sort: !0,
|
|
913
|
+
disabled: !1,
|
|
914
|
+
store: null,
|
|
915
|
+
handle: null,
|
|
916
|
+
draggable: /^[uo]l$/i.test(e.nodeName) ? ">li" : ">*",
|
|
917
|
+
swapThreshold: 1,
|
|
918
|
+
invertSwap: !1,
|
|
919
|
+
invertedSwapThreshold: null,
|
|
920
|
+
removeCloneOnHide: !0,
|
|
921
|
+
direction: function() {
|
|
922
|
+
return an(e, this.options);
|
|
923
|
+
},
|
|
924
|
+
ghostClass: "sortable-ghost",
|
|
925
|
+
chosenClass: "sortable-chosen",
|
|
926
|
+
dragClass: "sortable-drag",
|
|
927
|
+
ignore: "a, img",
|
|
928
|
+
filter: null,
|
|
929
|
+
preventOnFilter: !0,
|
|
930
|
+
animation: 0,
|
|
931
|
+
easing: null,
|
|
932
|
+
setData: function(e, t) {
|
|
933
|
+
e.setData("Text", t.textContent);
|
|
934
|
+
},
|
|
935
|
+
dropBubble: !1,
|
|
936
|
+
dragoverBubble: !1,
|
|
937
|
+
dataIdAttr: "data-id",
|
|
938
|
+
delay: 0,
|
|
939
|
+
delayOnTouchOnly: !1,
|
|
940
|
+
touchStartThreshold: (Number.parseInt ? Number : window).parseInt(window.devicePixelRatio, 10) || 1,
|
|
941
|
+
forceFallback: !1,
|
|
942
|
+
fallbackClass: "sortable-fallback",
|
|
943
|
+
fallbackOnBody: !1,
|
|
944
|
+
fallbackTolerance: 0,
|
|
945
|
+
fallbackOffset: {
|
|
946
|
+
x: 0,
|
|
947
|
+
y: 0
|
|
948
|
+
},
|
|
949
|
+
supportPointer: Q.supportPointer !== !1 && "PointerEvent" in window && (!Ze || Qe),
|
|
950
|
+
emptyInsertThreshold: 5
|
|
951
|
+
};
|
|
952
|
+
for (var r in Et.initializePlugins(this, e, n), n) !(r in t) && (t[r] = n[r]);
|
|
953
|
+
for (var i in cn(t), this) i.charAt(0) === "_" && typeof this[i] == "function" && (this[i] = this[i].bind(this));
|
|
954
|
+
this.nativeDraggable = t.forceFallback ? !1 : nn, this.nativeDraggable && (this.options.touchStartThreshold = 1), t.supportPointer ? N(e, "pointerdown", this._onTapStart) : (N(e, "mousedown", this._onTapStart), N(e, "touchstart", this._onTapStart)), this.nativeDraggable && (N(e, "dragover", this), N(e, "dragenter", this)), Rt.push(this.el), t.store && t.store.get && this.sort(t.store.get(this) || []), ze(this, xt());
|
|
955
|
+
}
|
|
956
|
+
Q.prototype = {
|
|
957
|
+
constructor: Q,
|
|
958
|
+
_isOutsideThisEl: function(e) {
|
|
959
|
+
!this.el.contains(e) && e !== this.el && (Gt = null);
|
|
960
|
+
},
|
|
961
|
+
_getDirection: function(e, t) {
|
|
962
|
+
return typeof this.options.direction == "function" ? this.options.direction.call(this, e, t, U) : this.options.direction;
|
|
963
|
+
},
|
|
964
|
+
_onTapStart: function(e) {
|
|
965
|
+
if (e.cancelable) {
|
|
966
|
+
var t = this, n = this.el, r = this.options, i = r.preventOnFilter, a = e.type, o = e.touches && e.touches[0] || e.pointerType && e.pointerType === "touch" && e, s = (o || e).target, c = e.target.shadowRoot && (e.path && e.path[0] || e.composedPath && e.composedPath()[0]) || s, l = r.filter;
|
|
967
|
+
if (Sn(n), !U && !(/mousedown|pointerdown/.test(a) && e.button !== 0 || r.disabled) && !c.isContentEditable && !(!this.nativeDraggable && Ze && s && s.tagName.toUpperCase() === "SELECT") && (s = F(s, r.draggable, n, !1), !(s && s.animated) && At !== s)) {
|
|
968
|
+
if (Mt = z(s), Nt = z(s, r.draggable), typeof l == "function") {
|
|
969
|
+
if (l.call(this, e, s, this)) {
|
|
970
|
+
H({
|
|
971
|
+
sortable: t,
|
|
972
|
+
rootEl: c,
|
|
973
|
+
name: "filter",
|
|
974
|
+
targetEl: s,
|
|
975
|
+
toEl: n,
|
|
976
|
+
fromEl: n
|
|
977
|
+
}), V("filter", t, { evt: e }), i && e.preventDefault();
|
|
978
|
+
return;
|
|
979
|
+
}
|
|
980
|
+
} else if (l && (l = l.split(",").some(function(r) {
|
|
981
|
+
if (r = F(c, r.trim(), n, !1), r) return H({
|
|
982
|
+
sortable: t,
|
|
983
|
+
rootEl: r,
|
|
984
|
+
name: "filter",
|
|
985
|
+
targetEl: s,
|
|
986
|
+
fromEl: n,
|
|
987
|
+
toEl: n
|
|
988
|
+
}), V("filter", t, { evt: e }), !0;
|
|
989
|
+
}), l)) {
|
|
990
|
+
i && e.preventDefault();
|
|
991
|
+
return;
|
|
992
|
+
}
|
|
993
|
+
r.handle && !F(c, r.handle, n, !1) || this._prepareDragStart(e, o, s);
|
|
994
|
+
}
|
|
995
|
+
}
|
|
996
|
+
},
|
|
997
|
+
_prepareDragStart: function(e, t, n) {
|
|
998
|
+
var r = this, i = r.el, a = r.options, o = i.ownerDocument, s;
|
|
999
|
+
if (n && !U && n.parentNode === i) {
|
|
1000
|
+
var c = R(n);
|
|
1001
|
+
if (K = i, U = n, W = U.parentNode, kt = U.nextSibling, At = n, Ft = a.group, Q.dragged = U, zt = {
|
|
1002
|
+
target: U,
|
|
1003
|
+
clientX: (t || e).clientX,
|
|
1004
|
+
clientY: (t || e).clientY
|
|
1005
|
+
}, Ht = zt.clientX - c.left, Ut = zt.clientY - c.top, this._lastX = (t || e).clientX, this._lastY = (t || e).clientY, U.style["will-change"] = "all", s = function() {
|
|
1006
|
+
if (V("delayEnded", r, { evt: e }), Q.eventCanceled) {
|
|
1007
|
+
r._onDrop();
|
|
1008
|
+
return;
|
|
1009
|
+
}
|
|
1010
|
+
r._disableDelayedDragEvents(), !Xe && r.nativeDraggable && (U.draggable = !0), r._triggerDragStart(e, t), H({
|
|
1011
|
+
sortable: r,
|
|
1012
|
+
name: "choose",
|
|
1013
|
+
originalEvent: e
|
|
1014
|
+
}), I(U, a.chosenClass, !0);
|
|
1015
|
+
}, a.ignore.split(",").forEach(function(e) {
|
|
1016
|
+
at(U, e.trim(), hn);
|
|
1017
|
+
}), N(o, "dragover", dn), N(o, "mousemove", dn), N(o, "touchmove", dn), a.supportPointer ? (N(o, "pointerup", r._onDrop), !this.nativeDraggable && N(o, "pointercancel", r._onDrop)) : (N(o, "mouseup", r._onDrop), N(o, "touchend", r._onDrop), N(o, "touchcancel", r._onDrop)), Xe && this.nativeDraggable && (this.options.touchStartThreshold = 4, U.draggable = !0), V("delayStart", this, { evt: e }), a.delay && (!a.delayOnTouchOnly || t) && (!this.nativeDraggable || !(Ye || Je))) {
|
|
1018
|
+
if (Q.eventCanceled) {
|
|
1019
|
+
this._onDrop();
|
|
1020
|
+
return;
|
|
1021
|
+
}
|
|
1022
|
+
a.supportPointer ? (N(o, "pointerup", r._disableDelayedDrag), N(o, "pointercancel", r._disableDelayedDrag)) : (N(o, "mouseup", r._disableDelayedDrag), N(o, "touchend", r._disableDelayedDrag), N(o, "touchcancel", r._disableDelayedDrag)), N(o, "mousemove", r._delayedDragTouchMoveHandler), N(o, "touchmove", r._delayedDragTouchMoveHandler), a.supportPointer && N(o, "pointermove", r._delayedDragTouchMoveHandler), r._dragStartTimer = setTimeout(s, a.delay);
|
|
1023
|
+
} else s();
|
|
1024
|
+
}
|
|
1025
|
+
},
|
|
1026
|
+
_delayedDragTouchMoveHandler: function(e) {
|
|
1027
|
+
var t = e.touches ? e.touches[0] : e;
|
|
1028
|
+
Math.max(Math.abs(t.clientX - this._lastX), Math.abs(t.clientY - this._lastY)) >= Math.floor(this.options.touchStartThreshold / (this.nativeDraggable && window.devicePixelRatio || 1)) && this._disableDelayedDrag();
|
|
1029
|
+
},
|
|
1030
|
+
_disableDelayedDrag: function() {
|
|
1031
|
+
U && hn(U), clearTimeout(this._dragStartTimer), this._disableDelayedDragEvents();
|
|
1032
|
+
},
|
|
1033
|
+
_disableDelayedDragEvents: function() {
|
|
1034
|
+
var e = this.el.ownerDocument;
|
|
1035
|
+
P(e, "mouseup", this._disableDelayedDrag), P(e, "touchend", this._disableDelayedDrag), P(e, "touchcancel", this._disableDelayedDrag), P(e, "pointerup", this._disableDelayedDrag), P(e, "pointercancel", this._disableDelayedDrag), P(e, "mousemove", this._delayedDragTouchMoveHandler), P(e, "touchmove", this._delayedDragTouchMoveHandler), P(e, "pointermove", this._delayedDragTouchMoveHandler);
|
|
1036
|
+
},
|
|
1037
|
+
_triggerDragStart: function(e, t) {
|
|
1038
|
+
t ||= e.pointerType == "touch" && e, !this.nativeDraggable || t ? this.options.supportPointer ? N(document, "pointermove", this._onTouchMove) : t ? N(document, "touchmove", this._onTouchMove) : N(document, "mousemove", this._onTouchMove) : (N(U, "dragend", this), N(K, "dragstart", this._onDragStart));
|
|
1039
|
+
try {
|
|
1040
|
+
document.selection ? Cn(function() {
|
|
1041
|
+
document.selection.empty();
|
|
1042
|
+
}) : window.getSelection().removeAllRanges();
|
|
1043
|
+
} catch {}
|
|
1044
|
+
},
|
|
1045
|
+
_dragStarted: function(e, t) {
|
|
1046
|
+
if (It = !1, K && U) {
|
|
1047
|
+
V("dragStarted", this, { evt: t }), this.nativeDraggable && N(document, "dragover", fn);
|
|
1048
|
+
var n = this.options;
|
|
1049
|
+
!e && I(U, n.dragClass, !1), I(U, n.ghostClass, !0), Q.active = this, e && this._appendGhost(), H({
|
|
1050
|
+
sortable: this,
|
|
1051
|
+
name: "start",
|
|
1052
|
+
originalEvent: t
|
|
1053
|
+
});
|
|
1054
|
+
} else this._nulling();
|
|
1055
|
+
},
|
|
1056
|
+
_emulateDragOver: function() {
|
|
1057
|
+
if (X) {
|
|
1058
|
+
this._lastX = X.clientX, this._lastY = X.clientY, ln();
|
|
1059
|
+
for (var e = document.elementFromPoint(X.clientX, X.clientY), t = e; e && e.shadowRoot && (e = e.shadowRoot.elementFromPoint(X.clientX, X.clientY), e !== t);) t = e;
|
|
1060
|
+
if (U.parentNode[B]._isOutsideThisEl(e), t) do {
|
|
1061
|
+
if (t[B]) {
|
|
1062
|
+
var n = void 0;
|
|
1063
|
+
if (n = t[B]._onDragOver({
|
|
1064
|
+
clientX: X.clientX,
|
|
1065
|
+
clientY: X.clientY,
|
|
1066
|
+
target: e,
|
|
1067
|
+
rootEl: t
|
|
1068
|
+
}), n && !this.options.dragoverBubble) break;
|
|
1069
|
+
}
|
|
1070
|
+
e = t;
|
|
1071
|
+
} while (t = nt(t));
|
|
1072
|
+
un();
|
|
1073
|
+
}
|
|
1074
|
+
},
|
|
1075
|
+
_onTouchMove: function(e) {
|
|
1076
|
+
if (zt) {
|
|
1077
|
+
var t = this.options, n = t.fallbackTolerance, r = t.fallbackOffset, i = e.touches ? e.touches[0] : e, a = G && it(G, !0), o = G && a && a.a, s = G && a && a.d, c = en && Z && ut(Z), l = (i.clientX - zt.clientX + r.x) / (o || 1) + (c ? c[0] - Xt[0] : 0) / (o || 1), u = (i.clientY - zt.clientY + r.y) / (s || 1) + (c ? c[1] - Xt[1] : 0) / (s || 1);
|
|
1078
|
+
if (!Q.active && !It) {
|
|
1079
|
+
if (n && Math.max(Math.abs(i.clientX - this._lastX), Math.abs(i.clientY - this._lastY)) < n) return;
|
|
1080
|
+
this._onDragStart(e, !0);
|
|
1081
|
+
}
|
|
1082
|
+
if (G) {
|
|
1083
|
+
a ? (a.e += l - (Bt || 0), a.f += u - (Vt || 0)) : a = {
|
|
1084
|
+
a: 1,
|
|
1085
|
+
b: 0,
|
|
1086
|
+
c: 0,
|
|
1087
|
+
d: 1,
|
|
1088
|
+
e: l,
|
|
1089
|
+
f: u
|
|
1090
|
+
};
|
|
1091
|
+
var d = `matrix(${a.a},${a.b},${a.c},${a.d},${a.e},${a.f})`;
|
|
1092
|
+
L(G, "webkitTransform", d), L(G, "mozTransform", d), L(G, "msTransform", d), L(G, "transform", d), Bt = l, Vt = u, X = i;
|
|
1093
|
+
}
|
|
1094
|
+
e.cancelable && e.preventDefault();
|
|
1095
|
+
}
|
|
1096
|
+
},
|
|
1097
|
+
_appendGhost: function() {
|
|
1098
|
+
if (!G) {
|
|
1099
|
+
var e = this.options.fallbackOnBody ? document.body : K, t = R(U, !0, en, !0, e), n = this.options;
|
|
1100
|
+
if (en) {
|
|
1101
|
+
for (Z = e; L(Z, "position") === "static" && L(Z, "transform") === "none" && Z !== document;) Z = Z.parentNode;
|
|
1102
|
+
Z !== document.body && Z !== document.documentElement ? (Z === document && (Z = ot()), t.top += Z.scrollTop, t.left += Z.scrollLeft) : Z = ot(), Xt = ut(Z);
|
|
1103
|
+
}
|
|
1104
|
+
G = U.cloneNode(!0), I(G, n.ghostClass, !1), I(G, n.fallbackClass, !0), I(G, n.dragClass, !0), L(G, "transition", ""), L(G, "transform", ""), L(G, "box-sizing", "border-box"), L(G, "margin", 0), L(G, "top", t.top), L(G, "left", t.left), L(G, "width", t.width), L(G, "height", t.height), L(G, "opacity", "0.8"), L(G, "position", en ? "absolute" : "fixed"), L(G, "zIndex", "100000"), L(G, "pointerEvents", "none"), Q.ghost = G, e.appendChild(G), L(G, "transform-origin", Ht / parseInt(G.style.width) * 100 + "% " + Ut / parseInt(G.style.height) * 100 + "%");
|
|
1105
|
+
}
|
|
1106
|
+
},
|
|
1107
|
+
_onDragStart: function(e, t) {
|
|
1108
|
+
var n = this, r = e.dataTransfer, i = n.options;
|
|
1109
|
+
if (V("dragStart", this, { evt: e }), Q.eventCanceled) {
|
|
1110
|
+
this._onDrop();
|
|
1111
|
+
return;
|
|
1112
|
+
}
|
|
1113
|
+
V("setupClone", this), Q.eventCanceled || (q = yt(U), q.removeAttribute("id"), q.draggable = !1, q.style["will-change"] = "", this._hideClone(), I(q, this.options.chosenClass, !1), Q.clone = q), n.cloneId = Cn(function() {
|
|
1114
|
+
V("clone", n), !Q.eventCanceled && (n.options.removeCloneOnHide || K.insertBefore(q, U), n._hideClone(), H({
|
|
1115
|
+
sortable: n,
|
|
1116
|
+
name: "clone"
|
|
1117
|
+
}));
|
|
1118
|
+
}), !t && I(U, i.dragClass, !0), t ? (Lt = !0, n._loopId = setInterval(n._emulateDragOver, 50)) : (P(document, "mouseup", n._onDrop), P(document, "touchend", n._onDrop), P(document, "touchcancel", n._onDrop), r && (r.effectAllowed = "move", i.setData && i.setData.call(n, r, U)), N(document, "drop", n), L(U, "transform", "translateZ(0)")), It = !0, n._dragStartId = Cn(n._dragStarted.bind(n, t, e)), N(document, "selectstart", n), Wt = !0, window.getSelection().removeAllRanges(), Ze && L(document.body, "user-select", "none");
|
|
1119
|
+
},
|
|
1120
|
+
_onDragOver: function(e) {
|
|
1121
|
+
var t = this.el, n = e.target, r, i, a, o = this.options, s = o.group, c = Q.active, l = Ft === s, u = o.sort, d = Y || c, f, p = this, m = !1;
|
|
1122
|
+
if (Zt) return;
|
|
1123
|
+
function h(o, s) {
|
|
1124
|
+
V(o, p, M({
|
|
1125
|
+
evt: e,
|
|
1126
|
+
isOwner: l,
|
|
1127
|
+
axis: f ? "vertical" : "horizontal",
|
|
1128
|
+
revert: a,
|
|
1129
|
+
dragRect: r,
|
|
1130
|
+
targetRect: i,
|
|
1131
|
+
canSort: u,
|
|
1132
|
+
fromSortable: d,
|
|
1133
|
+
target: n,
|
|
1134
|
+
completed: _,
|
|
1135
|
+
onMove: function(n, i) {
|
|
1136
|
+
return mn(K, t, U, r, n, R(n), e, i);
|
|
1137
|
+
},
|
|
1138
|
+
changed: v
|
|
1139
|
+
}, s));
|
|
1140
|
+
}
|
|
1141
|
+
function g() {
|
|
1142
|
+
h("dragOverAnimationCapture"), p.captureAnimationState(), p !== d && d.captureAnimationState();
|
|
1143
|
+
}
|
|
1144
|
+
function _(r) {
|
|
1145
|
+
return h("dragOverCompleted", { insertion: r }), r && (l ? c._hideClone() : c._showClone(p), p !== d && (I(U, Y ? Y.options.ghostClass : c.options.ghostClass, !1), I(U, o.ghostClass, !0)), Y !== p && p !== Q.active ? Y = p : p === Q.active && Y && (Y = null), d === p && (p._ignoreWhileAnimating = n), p.animateAll(function() {
|
|
1146
|
+
h("dragOverAnimationComplete"), p._ignoreWhileAnimating = null;
|
|
1147
|
+
}), p !== d && (d.animateAll(), d._ignoreWhileAnimating = null)), (n === U && !U.animated || n === t && !n.animated) && (Gt = null), !o.dragoverBubble && !e.rootEl && n !== document && (U.parentNode[B]._isOutsideThisEl(e.target), !r && dn(e)), !o.dragoverBubble && e.stopPropagation && e.stopPropagation(), m = !0;
|
|
1148
|
+
}
|
|
1149
|
+
function v() {
|
|
1150
|
+
J = z(U), Pt = z(U, o.draggable), H({
|
|
1151
|
+
sortable: p,
|
|
1152
|
+
name: "change",
|
|
1153
|
+
toEl: t,
|
|
1154
|
+
newIndex: J,
|
|
1155
|
+
newDraggableIndex: Pt,
|
|
1156
|
+
originalEvent: e
|
|
1157
|
+
});
|
|
1158
|
+
}
|
|
1159
|
+
if (e.preventDefault !== void 0 && e.cancelable && e.preventDefault(), n = F(n, o.draggable, t, !0), h("dragOver"), Q.eventCanceled) return m;
|
|
1160
|
+
if (U.contains(e.target) || n.animated && n.animatingX && n.animatingY || p._ignoreWhileAnimating === n) return _(!1);
|
|
1161
|
+
if (Lt = !1, c && !o.disabled && (l ? u || (a = W !== K) : Y === this || (this.lastPutMode = Ft.checkPull(this, c, U, e)) && s.checkPut(this, c, U, e))) {
|
|
1162
|
+
if (f = this._getDirection(e, n) === "vertical", r = R(U), h("dragOverValid"), Q.eventCanceled) return m;
|
|
1163
|
+
if (a) return W = K, g(), this._hideClone(), h("revert"), Q.eventCanceled || (kt ? K.insertBefore(U, kt) : K.appendChild(U)), _(!0);
|
|
1164
|
+
var y = lt(t, o.draggable);
|
|
1165
|
+
if (!y || vn(e, f, this) && !y.animated) {
|
|
1166
|
+
if (y === U) return _(!1);
|
|
1167
|
+
if (y && t === e.target && (n = y), n && (i = R(n)), mn(K, t, U, r, n, i, e, !!n) !== !1) return g(), y && y.nextSibling ? t.insertBefore(U, y.nextSibling) : t.appendChild(U), W = t, v(), _(!0);
|
|
1168
|
+
} else if (y && _n(e, f, this)) {
|
|
1169
|
+
var b = ct(t, 0, o, !0);
|
|
1170
|
+
if (b === U) return _(!1);
|
|
1171
|
+
if (n = b, i = R(n), mn(K, t, U, r, n, i, e, !1) !== !1) return g(), t.insertBefore(U, b), W = t, v(), _(!0);
|
|
1172
|
+
} else if (n.parentNode === t) {
|
|
1173
|
+
i = R(n);
|
|
1174
|
+
var x = 0, ee, te = U.parentNode !== t, ne = !on(U.animated && U.toRect || r, n.animated && n.toRect || i, f), S = f ? "top" : "left", re = st(n, "top", "top") || st(U, "top", "top"), C = re ? re.scrollTop : void 0;
|
|
1175
|
+
Gt !== n && (ee = i[S], qt = !1, Jt = !ne && o.invertSwap || te), x = yn(e, n, i, f, ne ? 1 : o.swapThreshold, o.invertedSwapThreshold == null ? o.swapThreshold : o.invertedSwapThreshold, Jt, Gt === n);
|
|
1176
|
+
var ie;
|
|
1177
|
+
if (x !== 0) {
|
|
1178
|
+
var w = z(U);
|
|
1179
|
+
do
|
|
1180
|
+
w -= x, ie = W.children[w];
|
|
1181
|
+
while (ie && (L(ie, "display") === "none" || ie === G));
|
|
1182
|
+
}
|
|
1183
|
+
if (x === 0 || ie === n) return _(!1);
|
|
1184
|
+
Gt = n, Kt = x;
|
|
1185
|
+
var T = n.nextElementSibling, ae = !1;
|
|
1186
|
+
ae = x === 1;
|
|
1187
|
+
var E = mn(K, t, U, r, n, i, e, ae);
|
|
1188
|
+
if (E !== !1) return (E === 1 || E === -1) && (ae = E === 1), Zt = !0, setTimeout(gn, 30), g(), ae && !T ? t.appendChild(U) : n.parentNode.insertBefore(U, ae ? T : n), re && vt(re, 0, C - re.scrollTop), W = U.parentNode, ee !== void 0 && !Jt && (Yt = Math.abs(ee - R(n)[S])), v(), _(!0);
|
|
1189
|
+
}
|
|
1190
|
+
if (t.contains(U)) return _(!1);
|
|
1191
|
+
}
|
|
1192
|
+
return !1;
|
|
1193
|
+
},
|
|
1194
|
+
_ignoreWhileAnimating: null,
|
|
1195
|
+
_offMoveEvents: function() {
|
|
1196
|
+
P(document, "mousemove", this._onTouchMove), P(document, "touchmove", this._onTouchMove), P(document, "pointermove", this._onTouchMove), P(document, "dragover", dn), P(document, "mousemove", dn), P(document, "touchmove", dn);
|
|
1197
|
+
},
|
|
1198
|
+
_offUpEvents: function() {
|
|
1199
|
+
var e = this.el.ownerDocument;
|
|
1200
|
+
P(e, "mouseup", this._onDrop), P(e, "touchend", this._onDrop), P(e, "pointerup", this._onDrop), P(e, "pointercancel", this._onDrop), P(e, "touchcancel", this._onDrop), P(document, "selectstart", this);
|
|
1201
|
+
},
|
|
1202
|
+
_onDrop: function(e) {
|
|
1203
|
+
var t = this.el, n = this.options;
|
|
1204
|
+
if (J = z(U), Pt = z(U, n.draggable), V("drop", this, { evt: e }), W = U && U.parentNode, J = z(U), Pt = z(U, n.draggable), Q.eventCanceled) {
|
|
1205
|
+
this._nulling();
|
|
1206
|
+
return;
|
|
1207
|
+
}
|
|
1208
|
+
It = !1, Jt = !1, qt = !1, clearInterval(this._loopId), clearTimeout(this._dragStartTimer), wn(this.cloneId), wn(this._dragStartId), this.nativeDraggable && (P(document, "drop", this), P(t, "dragstart", this._onDragStart)), this._offMoveEvents(), this._offUpEvents(), Ze && L(document.body, "user-select", ""), L(U, "transform", ""), e && (Wt && (e.cancelable && e.preventDefault(), !n.dropBubble && e.stopPropagation()), G && G.parentNode && G.parentNode.removeChild(G), (K === W || Y && Y.lastPutMode !== "clone") && q && q.parentNode && q.parentNode.removeChild(q), U && (this.nativeDraggable && P(U, "dragend", this), hn(U), U.style["will-change"] = "", Wt && !It && I(U, Y ? Y.options.ghostClass : this.options.ghostClass, !1), I(U, this.options.chosenClass, !1), H({
|
|
1209
|
+
sortable: this,
|
|
1210
|
+
name: "unchoose",
|
|
1211
|
+
toEl: W,
|
|
1212
|
+
newIndex: null,
|
|
1213
|
+
newDraggableIndex: null,
|
|
1214
|
+
originalEvent: e
|
|
1215
|
+
}), K === W ? J !== Mt && J >= 0 && (H({
|
|
1216
|
+
sortable: this,
|
|
1217
|
+
name: "update",
|
|
1218
|
+
toEl: W,
|
|
1219
|
+
originalEvent: e
|
|
1220
|
+
}), H({
|
|
1221
|
+
sortable: this,
|
|
1222
|
+
name: "sort",
|
|
1223
|
+
toEl: W,
|
|
1224
|
+
originalEvent: e
|
|
1225
|
+
})) : (J >= 0 && (H({
|
|
1226
|
+
rootEl: W,
|
|
1227
|
+
name: "add",
|
|
1228
|
+
toEl: W,
|
|
1229
|
+
fromEl: K,
|
|
1230
|
+
originalEvent: e
|
|
1231
|
+
}), H({
|
|
1232
|
+
sortable: this,
|
|
1233
|
+
name: "remove",
|
|
1234
|
+
toEl: W,
|
|
1235
|
+
originalEvent: e
|
|
1236
|
+
}), H({
|
|
1237
|
+
rootEl: W,
|
|
1238
|
+
name: "sort",
|
|
1239
|
+
toEl: W,
|
|
1240
|
+
fromEl: K,
|
|
1241
|
+
originalEvent: e
|
|
1242
|
+
}), H({
|
|
1243
|
+
sortable: this,
|
|
1244
|
+
name: "sort",
|
|
1245
|
+
toEl: W,
|
|
1246
|
+
originalEvent: e
|
|
1247
|
+
})), Y && Y.save()), Q.active && ((J == null || J === -1) && (J = Mt, Pt = Nt), H({
|
|
1248
|
+
sortable: this,
|
|
1249
|
+
name: "end",
|
|
1250
|
+
toEl: W,
|
|
1251
|
+
originalEvent: e
|
|
1252
|
+
}), this.save()))), this._nulling();
|
|
1253
|
+
},
|
|
1254
|
+
_nulling: function() {
|
|
1255
|
+
V("nulling", this), K = U = W = G = kt = q = At = jt = zt = X = Wt = J = Pt = Mt = Nt = Gt = Kt = Y = Ft = Q.dragged = Q.ghost = Q.clone = Q.active = null;
|
|
1256
|
+
var e = this.el;
|
|
1257
|
+
Qt.forEach(function(t) {
|
|
1258
|
+
e.contains(t) && (t.checked = !0);
|
|
1259
|
+
}), Qt.length = Bt = Vt = 0;
|
|
1260
|
+
},
|
|
1261
|
+
handleEvent: function(e) {
|
|
1262
|
+
switch (e.type) {
|
|
1263
|
+
case "drop":
|
|
1264
|
+
case "dragend":
|
|
1265
|
+
this._onDrop(e);
|
|
1266
|
+
break;
|
|
1267
|
+
case "dragenter":
|
|
1268
|
+
case "dragover":
|
|
1269
|
+
U && (this._onDragOver(e), pn(e));
|
|
1270
|
+
break;
|
|
1271
|
+
case "selectstart":
|
|
1272
|
+
e.preventDefault();
|
|
1273
|
+
break;
|
|
1274
|
+
}
|
|
1275
|
+
},
|
|
1276
|
+
toArray: function() {
|
|
1277
|
+
for (var e = [], t, n = this.el.children, r = 0, i = n.length, a = this.options; r < i; r++) t = n[r], F(t, a.draggable, this.el, !1) && e.push(t.getAttribute(a.dataIdAttr) || xn(t));
|
|
1278
|
+
return e;
|
|
1279
|
+
},
|
|
1280
|
+
sort: function(e, t) {
|
|
1281
|
+
var n = {}, r = this.el;
|
|
1282
|
+
this.toArray().forEach(function(e, t) {
|
|
1283
|
+
var i = r.children[t];
|
|
1284
|
+
F(i, this.options.draggable, r, !1) && (n[e] = i);
|
|
1285
|
+
}, this), t && this.captureAnimationState(), e.forEach(function(e) {
|
|
1286
|
+
n[e] && (r.removeChild(n[e]), r.appendChild(n[e]));
|
|
1287
|
+
}), t && this.animateAll();
|
|
1288
|
+
},
|
|
1289
|
+
save: function() {
|
|
1290
|
+
var e = this.options.store;
|
|
1291
|
+
e && e.set && e.set(this);
|
|
1292
|
+
},
|
|
1293
|
+
closest: function(e, t) {
|
|
1294
|
+
return F(e, t || this.options.draggable, this.el, !1);
|
|
1295
|
+
},
|
|
1296
|
+
option: function(e, t) {
|
|
1297
|
+
var n = this.options;
|
|
1298
|
+
if (t === void 0) return n[e];
|
|
1299
|
+
var r = Et.modifyOption(this, e, t);
|
|
1300
|
+
r === void 0 ? n[e] = t : n[e] = r, e === "group" && cn(n);
|
|
1301
|
+
},
|
|
1302
|
+
destroy: function() {
|
|
1303
|
+
V("destroy", this);
|
|
1304
|
+
var e = this.el;
|
|
1305
|
+
e[B] = null, P(e, "mousedown", this._onTapStart), P(e, "touchstart", this._onTapStart), P(e, "pointerdown", this._onTapStart), this.nativeDraggable && (P(e, "dragover", this), P(e, "dragenter", this)), Array.prototype.forEach.call(e.querySelectorAll("[draggable]"), function(e) {
|
|
1306
|
+
e.removeAttribute("draggable");
|
|
1307
|
+
}), this._onDrop(), this._disableDelayedDragEvents(), Rt.splice(Rt.indexOf(this.el), 1), this.el = e = null;
|
|
1308
|
+
},
|
|
1309
|
+
_hideClone: function() {
|
|
1310
|
+
if (!jt) {
|
|
1311
|
+
if (V("hideClone", this), Q.eventCanceled) return;
|
|
1312
|
+
L(q, "display", "none"), this.options.removeCloneOnHide && q.parentNode && q.parentNode.removeChild(q), jt = !0;
|
|
1313
|
+
}
|
|
1314
|
+
},
|
|
1315
|
+
_showClone: function(e) {
|
|
1316
|
+
if (e.lastPutMode !== "clone") {
|
|
1317
|
+
this._hideClone();
|
|
1318
|
+
return;
|
|
1319
|
+
}
|
|
1320
|
+
if (jt) {
|
|
1321
|
+
if (V("showClone", this), Q.eventCanceled) return;
|
|
1322
|
+
U.parentNode == K && !this.options.group.revertClone ? K.insertBefore(q, U) : kt ? K.insertBefore(q, kt) : K.appendChild(q), this.options.group.revertClone && this.animate(U, q), L(q, "display", ""), jt = !1;
|
|
1323
|
+
}
|
|
1324
|
+
}
|
|
1325
|
+
};
|
|
1326
|
+
function pn(e) {
|
|
1327
|
+
e.dataTransfer && (e.dataTransfer.dropEffect = "move"), e.cancelable && e.preventDefault();
|
|
1328
|
+
}
|
|
1329
|
+
function mn(e, t, n, r, i, a, o, s) {
|
|
1330
|
+
var c, l = e[B], u = l.options.onMove, d;
|
|
1331
|
+
return window.CustomEvent && !Je && !Ye ? c = new CustomEvent("move", {
|
|
1332
|
+
bubbles: !0,
|
|
1333
|
+
cancelable: !0
|
|
1334
|
+
}) : (c = document.createEvent("Event"), c.initEvent("move", !0, !0)), c.to = t, c.from = e, c.dragged = n, c.draggedRect = r, c.related = i || t, c.relatedRect = a || R(t), c.willInsertAfter = s, c.originalEvent = o, e.dispatchEvent(c), u && (d = u.call(l, c, o)), d;
|
|
1335
|
+
}
|
|
1336
|
+
function hn(e) {
|
|
1337
|
+
e.draggable = !1;
|
|
1338
|
+
}
|
|
1339
|
+
function gn() {
|
|
1340
|
+
Zt = !1;
|
|
1341
|
+
}
|
|
1342
|
+
function _n(e, t, n) {
|
|
1343
|
+
var r = R(ct(n.el, 0, n.options, !0)), i = bt(n.el, n.options, G), a = 10;
|
|
1344
|
+
return t ? e.clientX < i.left - a || e.clientY < r.top && e.clientX < r.right : e.clientY < i.top - a || e.clientY < r.bottom && e.clientX < r.left;
|
|
1345
|
+
}
|
|
1346
|
+
function vn(e, t, n) {
|
|
1347
|
+
var r = R(lt(n.el, n.options.draggable)), i = bt(n.el, n.options, G), a = 10;
|
|
1348
|
+
return t ? e.clientX > i.right + a || e.clientY > r.bottom && e.clientX > r.left : e.clientY > i.bottom + a || e.clientX > r.right && e.clientY > r.top;
|
|
1349
|
+
}
|
|
1350
|
+
function yn(e, t, n, r, i, a, o, s) {
|
|
1351
|
+
var c = r ? e.clientY : e.clientX, l = r ? n.height : n.width, u = r ? n.top : n.left, d = r ? n.bottom : n.right, f = !1;
|
|
1352
|
+
if (!o) {
|
|
1353
|
+
if (s && Yt < l * i) {
|
|
1354
|
+
if (!qt && (Kt === 1 ? c > u + l * a / 2 : c < d - l * a / 2) && (qt = !0), qt) f = !0;
|
|
1355
|
+
else if (Kt === 1 ? c < u + Yt : c > d - Yt) return -Kt;
|
|
1356
|
+
} else if (c > u + l * (1 - i) / 2 && c < d - l * (1 - i) / 2) return bn(t);
|
|
1357
|
+
}
|
|
1358
|
+
return f ||= o, f && (c < u + l * a / 2 || c > d - l * a / 2) ? c > u + l / 2 ? 1 : -1 : 0;
|
|
1359
|
+
}
|
|
1360
|
+
function bn(e) {
|
|
1361
|
+
return z(U) < z(e) ? 1 : -1;
|
|
1362
|
+
}
|
|
1363
|
+
function xn(e) {
|
|
1364
|
+
for (var t = e.tagName + e.className + e.src + e.href + e.textContent, n = t.length, r = 0; n--;) r += t.charCodeAt(n);
|
|
1365
|
+
return r.toString(36);
|
|
1366
|
+
}
|
|
1367
|
+
function Sn(e) {
|
|
1368
|
+
Qt.length = 0;
|
|
1369
|
+
for (var t = e.getElementsByTagName("input"), n = t.length; n--;) {
|
|
1370
|
+
var r = t[n];
|
|
1371
|
+
r.checked && Qt.push(r);
|
|
1372
|
+
}
|
|
1373
|
+
}
|
|
1374
|
+
function Cn(e) {
|
|
1375
|
+
return setTimeout(e, 0);
|
|
1376
|
+
}
|
|
1377
|
+
function wn(e) {
|
|
1378
|
+
return clearTimeout(e);
|
|
1379
|
+
}
|
|
1380
|
+
$t && N(document, "touchmove", function(e) {
|
|
1381
|
+
(Q.active || It) && e.cancelable && e.preventDefault();
|
|
1382
|
+
}), Q.utils = {
|
|
1383
|
+
on: N,
|
|
1384
|
+
off: P,
|
|
1385
|
+
css: L,
|
|
1386
|
+
find: at,
|
|
1387
|
+
is: function(e, t) {
|
|
1388
|
+
return !!F(e, t, e, !1);
|
|
1389
|
+
},
|
|
1390
|
+
extend: pt,
|
|
1391
|
+
throttle: gt,
|
|
1392
|
+
closest: F,
|
|
1393
|
+
toggleClass: I,
|
|
1394
|
+
clone: yt,
|
|
1395
|
+
index: z,
|
|
1396
|
+
nextTick: Cn,
|
|
1397
|
+
cancelNextTick: wn,
|
|
1398
|
+
detectDirection: an,
|
|
1399
|
+
getChild: ct,
|
|
1400
|
+
expando: B
|
|
1401
|
+
}, Q.get = function(e) {
|
|
1402
|
+
return e[B];
|
|
1403
|
+
}, Q.mount = function() {
|
|
1404
|
+
var e = [...arguments];
|
|
1405
|
+
e[0].constructor === Array && (e = e[0]), e.forEach(function(e) {
|
|
1406
|
+
if (!e.prototype || !e.prototype.constructor) throw `Sortable: Mounted plugin must be a constructor function, not ${{}.toString.call(e)}`;
|
|
1407
|
+
e.utils && (Q.utils = M(M({}, Q.utils), e.utils)), Et.mount(e);
|
|
1408
|
+
});
|
|
1409
|
+
}, Q.create = function(e, t) {
|
|
1410
|
+
return new Q(e, t);
|
|
1411
|
+
}, Q.version = Ke;
|
|
1412
|
+
var $ = [], Tn, En, Dn = !1, On, kn, An, jn;
|
|
1413
|
+
function Mn() {
|
|
1414
|
+
function e() {
|
|
1415
|
+
for (var e in this.defaults = {
|
|
1416
|
+
scroll: !0,
|
|
1417
|
+
forceAutoScrollFallback: !1,
|
|
1418
|
+
scrollSensitivity: 30,
|
|
1419
|
+
scrollSpeed: 10,
|
|
1420
|
+
bubbleScroll: !0
|
|
1421
|
+
}, this) e.charAt(0) === "_" && typeof this[e] == "function" && (this[e] = this[e].bind(this));
|
|
1422
|
+
}
|
|
1423
|
+
return e.prototype = {
|
|
1424
|
+
dragStarted: function(e) {
|
|
1425
|
+
var t = e.originalEvent;
|
|
1426
|
+
this.sortable.nativeDraggable ? N(document, "dragover", this._handleAutoScroll) : this.options.supportPointer ? N(document, "pointermove", this._handleFallbackAutoScroll) : t.touches ? N(document, "touchmove", this._handleFallbackAutoScroll) : N(document, "mousemove", this._handleFallbackAutoScroll);
|
|
1427
|
+
},
|
|
1428
|
+
dragOverCompleted: function(e) {
|
|
1429
|
+
var t = e.originalEvent;
|
|
1430
|
+
!this.options.dragOverBubble && !t.rootEl && this._handleAutoScroll(t);
|
|
1431
|
+
},
|
|
1432
|
+
drop: function() {
|
|
1433
|
+
this.sortable.nativeDraggable ? P(document, "dragover", this._handleAutoScroll) : (P(document, "pointermove", this._handleFallbackAutoScroll), P(document, "touchmove", this._handleFallbackAutoScroll), P(document, "mousemove", this._handleFallbackAutoScroll)), Pn(), Nn(), _t();
|
|
1434
|
+
},
|
|
1435
|
+
nulling: function() {
|
|
1436
|
+
An = En = Tn = Dn = jn = On = kn = null, $.length = 0;
|
|
1437
|
+
},
|
|
1438
|
+
_handleFallbackAutoScroll: function(e) {
|
|
1439
|
+
this._handleAutoScroll(e, !0);
|
|
1440
|
+
},
|
|
1441
|
+
_handleAutoScroll: function(e, t) {
|
|
1442
|
+
var n = this, r = (e.touches ? e.touches[0] : e).clientX, i = (e.touches ? e.touches[0] : e).clientY, a = document.elementFromPoint(r, i);
|
|
1443
|
+
if (An = e, t || this.options.forceAutoScrollFallback || Ye || Je || Ze) {
|
|
1444
|
+
Fn(e, this.options, a, t);
|
|
1445
|
+
var o = ft(a, !0);
|
|
1446
|
+
Dn && (!jn || r !== On || i !== kn) && (jn && Pn(), jn = setInterval(function() {
|
|
1447
|
+
var a = ft(document.elementFromPoint(r, i), !0);
|
|
1448
|
+
a !== o && (o = a, Nn()), Fn(e, n.options, a, t);
|
|
1449
|
+
}, 10), On = r, kn = i);
|
|
1450
|
+
} else {
|
|
1451
|
+
if (!this.options.bubbleScroll || ft(a, !0) === ot()) {
|
|
1452
|
+
Nn();
|
|
1453
|
+
return;
|
|
1454
|
+
}
|
|
1455
|
+
Fn(e, this.options, ft(a, !1), !1);
|
|
1456
|
+
}
|
|
1457
|
+
}
|
|
1458
|
+
}, ze(e, {
|
|
1459
|
+
pluginName: "scroll",
|
|
1460
|
+
initializeByDefault: !0
|
|
1461
|
+
});
|
|
1462
|
+
}
|
|
1463
|
+
function Nn() {
|
|
1464
|
+
$.forEach(function(e) {
|
|
1465
|
+
clearInterval(e.pid);
|
|
1466
|
+
}), $ = [];
|
|
1467
|
+
}
|
|
1468
|
+
function Pn() {
|
|
1469
|
+
clearInterval(jn);
|
|
1470
|
+
}
|
|
1471
|
+
var Fn = gt(function(e, t, n, r) {
|
|
1472
|
+
if (t.scroll) {
|
|
1473
|
+
var i = (e.touches ? e.touches[0] : e).clientX, a = (e.touches ? e.touches[0] : e).clientY, o = t.scrollSensitivity, s = t.scrollSpeed, c = ot(), l = !1, u;
|
|
1474
|
+
En !== n && (En = n, Nn(), Tn = t.scroll, u = t.scrollFn, Tn === !0 && (Tn = ft(n, !0)));
|
|
1475
|
+
var d = 0, f = Tn;
|
|
1476
|
+
do {
|
|
1477
|
+
var p = f, m = R(p), h = m.top, g = m.bottom, _ = m.left, v = m.right, y = m.width, b = m.height, x = void 0, ee = void 0, te = p.scrollWidth, ne = p.scrollHeight, S = L(p), re = p.scrollLeft, C = p.scrollTop;
|
|
1478
|
+
p === c ? (x = y < te && (S.overflowX === "auto" || S.overflowX === "scroll" || S.overflowX === "visible"), ee = b < ne && (S.overflowY === "auto" || S.overflowY === "scroll" || S.overflowY === "visible")) : (x = y < te && (S.overflowX === "auto" || S.overflowX === "scroll"), ee = b < ne && (S.overflowY === "auto" || S.overflowY === "scroll"));
|
|
1479
|
+
var ie = x && (Math.abs(v - i) <= o && re + y < te) - (Math.abs(_ - i) <= o && !!re), w = ee && (Math.abs(g - a) <= o && C + b < ne) - (Math.abs(h - a) <= o && !!C);
|
|
1480
|
+
if (!$[d]) for (var T = 0; T <= d; T++) $[T] || ($[T] = {});
|
|
1481
|
+
($[d].vx != ie || $[d].vy != w || $[d].el !== p) && ($[d].el = p, $[d].vx = ie, $[d].vy = w, clearInterval($[d].pid), (ie != 0 || w != 0) && (l = !0, $[d].pid = setInterval(function() {
|
|
1482
|
+
r && this.layer === 0 && Q.active._onTouchMove(An);
|
|
1483
|
+
var t = $[this.layer].vy ? $[this.layer].vy * s : 0, n = $[this.layer].vx ? $[this.layer].vx * s : 0;
|
|
1484
|
+
typeof u == "function" && u.call(Q.dragged.parentNode[B], n, t, e, An, $[this.layer].el) !== "continue" || vt($[this.layer].el, n, t);
|
|
1485
|
+
}.bind({ layer: d }), 24))), d++;
|
|
1486
|
+
} while (t.bubbleScroll && f !== c && (f = ft(f, !1)));
|
|
1487
|
+
Dn = l;
|
|
1488
|
+
}
|
|
1489
|
+
}, 30), In = function(e) {
|
|
1490
|
+
var t = e.originalEvent, n = e.putSortable, r = e.dragEl, i = e.activeSortable, a = e.dispatchSortableEvent, o = e.hideGhostForTarget, s = e.unhideGhostForTarget;
|
|
1491
|
+
if (t) {
|
|
1492
|
+
var c = n || i;
|
|
1493
|
+
o();
|
|
1494
|
+
var l = t.changedTouches && t.changedTouches.length ? t.changedTouches[0] : t, u = document.elementFromPoint(l.clientX, l.clientY);
|
|
1495
|
+
s(), c && !c.el.contains(u) && (a("spill"), this.onSpill({
|
|
1496
|
+
dragEl: r,
|
|
1497
|
+
putSortable: n
|
|
1498
|
+
}));
|
|
1499
|
+
}
|
|
1500
|
+
};
|
|
1501
|
+
function Ln() {}
|
|
1502
|
+
Ln.prototype = {
|
|
1503
|
+
startIndex: null,
|
|
1504
|
+
dragStart: function(e) {
|
|
1505
|
+
this.startIndex = e.oldDraggableIndex;
|
|
1506
|
+
},
|
|
1507
|
+
onSpill: function(e) {
|
|
1508
|
+
var t = e.dragEl, n = e.putSortable;
|
|
1509
|
+
this.sortable.captureAnimationState(), n && n.captureAnimationState();
|
|
1510
|
+
var r = ct(this.sortable.el, this.startIndex, this.options);
|
|
1511
|
+
r ? this.sortable.el.insertBefore(t, r) : this.sortable.el.appendChild(t), this.sortable.animateAll(), n && n.animateAll();
|
|
1512
|
+
},
|
|
1513
|
+
drop: In
|
|
1514
|
+
}, ze(Ln, { pluginName: "revertOnSpill" });
|
|
1515
|
+
function Rn() {}
|
|
1516
|
+
Rn.prototype = {
|
|
1517
|
+
onSpill: function(e) {
|
|
1518
|
+
var t = e.dragEl, n = e.putSortable || this.sortable;
|
|
1519
|
+
n.captureAnimationState(), t.parentNode && t.parentNode.removeChild(t), n.animateAll();
|
|
1520
|
+
},
|
|
1521
|
+
drop: In
|
|
1522
|
+
}, ze(Rn, { pluginName: "removeOnSpill" }), Q.mount(new Mn()), Q.mount(Rn, Ln);
|
|
1523
|
+
//#endregion
|
|
1524
|
+
//#region node_modules/@vueuse/integrations/dist/useSortable-Cc5LKbDD.js
|
|
1525
|
+
function zn(e, t, n = {}) {
|
|
1526
|
+
let r, { document: o = v, watchElement: s = !1, ...c } = n, l = { onUpdate: (e) => {
|
|
1527
|
+
Hn(t, e.oldIndex, e.newIndex, e);
|
|
1528
|
+
} }, u = w(() => typeof e == "string" ? o?.querySelector(e) : i(e)), d = () => {
|
|
1529
|
+
r?.destroy(), r = void 0;
|
|
1530
|
+
}, f = (e) => {
|
|
1531
|
+
!e || r !== void 0 || (r = new Q(e, {
|
|
1532
|
+
...l,
|
|
1533
|
+
...c
|
|
1534
|
+
}));
|
|
1535
|
+
}, p = () => {
|
|
1536
|
+
let e = u.value;
|
|
1537
|
+
e && f(e);
|
|
1538
|
+
}, m = (e, t) => {
|
|
1539
|
+
if (t !== void 0) r?.option(e, t);
|
|
1540
|
+
else return r?.option(e);
|
|
1541
|
+
}, h;
|
|
1542
|
+
return s && typeof e != "string" ? h = Te(u, (e) => {
|
|
1543
|
+
d(), e && f(e);
|
|
1544
|
+
}, {
|
|
1545
|
+
immediate: !0,
|
|
1546
|
+
flush: "post"
|
|
1547
|
+
}) : _(p), a(() => {
|
|
1548
|
+
h?.(), d();
|
|
1549
|
+
}), {
|
|
1550
|
+
stop: () => {
|
|
1551
|
+
d();
|
|
1552
|
+
},
|
|
1553
|
+
start: p,
|
|
1554
|
+
option: m
|
|
1555
|
+
};
|
|
1556
|
+
}
|
|
1557
|
+
function Bn(e, t, n) {
|
|
1558
|
+
let r = e.children[n];
|
|
1559
|
+
e.insertBefore(t, r);
|
|
1560
|
+
}
|
|
1561
|
+
function Vn(e) {
|
|
1562
|
+
e.parentNode && e.parentNode.removeChild(e);
|
|
1563
|
+
}
|
|
1564
|
+
function Hn(e, t, n, r = null) {
|
|
1565
|
+
r != null && (Vn(r.item), Bn(r.from, r.item, t));
|
|
1566
|
+
let i = de(e), a = i ? [...Se(e)] : Se(e);
|
|
1567
|
+
if (n >= 0 && n < a.length) {
|
|
1568
|
+
let r = a.splice(t, 1)[0];
|
|
1569
|
+
me(() => {
|
|
1570
|
+
a.splice(n, 0, r), i && (e.value = a);
|
|
1571
|
+
});
|
|
1572
|
+
}
|
|
1573
|
+
}
|
|
1574
|
+
//#endregion
|
|
1575
|
+
//#region src/components/advance/XTableRequestConfigNext.vue?vue&type=script&setup=true&lang.tsx
|
|
1576
|
+
var Un = { class: "relative flex flex-1 flex-col gap-2 overflow-hidden" }, Wn = { class: "flex flex-col gap-2" }, Gn = {
|
|
1577
|
+
key: 0,
|
|
1578
|
+
class: "flex justify-end"
|
|
1579
|
+
}, Kn = /* @__PURE__ */ O({
|
|
1580
|
+
__name: "XTableRequestConfigNext",
|
|
1581
|
+
props: {
|
|
1582
|
+
request: { type: Function },
|
|
1583
|
+
fields: { type: Function },
|
|
1584
|
+
config: {},
|
|
1585
|
+
pagination: {
|
|
1586
|
+
type: Boolean,
|
|
1587
|
+
default: !0
|
|
1588
|
+
},
|
|
1589
|
+
cellClassName: { type: [Function, String] },
|
|
1590
|
+
cellStyle: { type: [Function, Object] },
|
|
1591
|
+
rowClassName: { type: [Function, String] },
|
|
1592
|
+
rowStyle: { type: [Function, Object] },
|
|
1593
|
+
border: { type: Boolean },
|
|
1594
|
+
data: {},
|
|
1595
|
+
height: {},
|
|
1596
|
+
emptyText: {},
|
|
1597
|
+
rowKey: { type: Function },
|
|
1598
|
+
showSummary: { type: Boolean },
|
|
1599
|
+
size: {},
|
|
1600
|
+
fit: { type: Boolean },
|
|
1601
|
+
spanMethod: { type: Function },
|
|
1602
|
+
summaryMethod: { type: Function }
|
|
1603
|
+
},
|
|
1604
|
+
emits: [
|
|
1605
|
+
"prepare",
|
|
1606
|
+
"headerDragend",
|
|
1607
|
+
"rowClick",
|
|
1608
|
+
"rowDblclick",
|
|
1609
|
+
"selectionChange"
|
|
1610
|
+
],
|
|
1611
|
+
setup(e, { expose: i, emit: a }) {
|
|
1612
|
+
let o = a, { data: s, execute: u, path: d, query: p, isFetching: m, url: _, paging: v } = e.request(), y = JSON.stringify(p.value), b = r(async () => {
|
|
1613
|
+
o("prepare", {
|
|
1614
|
+
path: d.value,
|
|
1615
|
+
query: p.value
|
|
1616
|
+
}), u();
|
|
1617
|
+
}), x = r(async () => {
|
|
1618
|
+
p.value = JSON.parse(y), b();
|
|
1619
|
+
}), { data: C, update: w } = e.fields(), T = n(C, (e) => e.visible), se = t(T, (t) => {
|
|
1620
|
+
let n = e.config[t.code];
|
|
1621
|
+
return {
|
|
1622
|
+
columnKey: t.code,
|
|
1623
|
+
label: n?.label ?? t.label,
|
|
1624
|
+
prop: n?.prop ?? t.prop,
|
|
1625
|
+
width: t.width,
|
|
1626
|
+
content: n?.content
|
|
1627
|
+
};
|
|
1628
|
+
}), O = n(T, (e) => e.search), le = () => D(l, {
|
|
1629
|
+
data: p.value,
|
|
1630
|
+
disabled: m.value,
|
|
1631
|
+
content: ({ data: t }) => D("div", { class: "grid grid-cols-2 md:grid-cols-3 lg:grid-cols-4 xl:grid-cols-5 gap-x-2" }, [[...O.value.map((n) => {
|
|
1632
|
+
let r = e.config[n.code];
|
|
1633
|
+
return D(g, {
|
|
1634
|
+
label: r?.label ?? n.label,
|
|
1635
|
+
content: () => r?.search?.({ query: t }) ?? D(f, {
|
|
1636
|
+
disabled: !0,
|
|
1637
|
+
modelValue: n.code
|
|
1638
|
+
}, null)
|
|
1639
|
+
}, null);
|
|
1640
|
+
}), D(g, { content: () => D(ne, null, { default: () => [D(De, { action: () => b() }, { default: () => [ce("查询")] }), D(c, { onClick: () => x() }, { default: () => [ce("重置")] })] }) }, null)]])
|
|
1641
|
+
}, null), ue = () => D(Fe, {
|
|
1642
|
+
data: s.value,
|
|
1643
|
+
columns: se.value,
|
|
1644
|
+
showOverflowTooltip: !0,
|
|
1645
|
+
border: !0,
|
|
1646
|
+
onHeaderDragend: (e, t, n) => {
|
|
1647
|
+
let r = C.value.find((e) => e.code === n.columnKey);
|
|
1648
|
+
r && (r.width = e, me(() => {
|
|
1649
|
+
w(C.value);
|
|
1650
|
+
}));
|
|
1651
|
+
}
|
|
1652
|
+
}, null), de = () => D(h, {
|
|
1653
|
+
size: "small",
|
|
1654
|
+
total: v.value.itemCount,
|
|
1655
|
+
currentPage: v.value.pageIndex,
|
|
1656
|
+
pageSize: v.value.pageSize,
|
|
1657
|
+
"onUpdate:currentPage": (e) => v.value.pageIndex = e ?? 0,
|
|
1658
|
+
"onUpdate:pageSize": (e) => v.value.pageSize = e ?? 0,
|
|
1659
|
+
onCurrentChange: () => u(),
|
|
1660
|
+
onSizeChange: () => {
|
|
1661
|
+
v.value.pageIndex = 1, u();
|
|
1662
|
+
}
|
|
1663
|
+
}, null), fe = we("sortable");
|
|
1664
|
+
return zn(fe, C, {
|
|
1665
|
+
animation: 150,
|
|
1666
|
+
ghostClass: "bg-(--el-color-primary-light-7)",
|
|
1667
|
+
handle: ".cursor-grab",
|
|
1668
|
+
onUpdate: (e) => {
|
|
1669
|
+
Hn(C.value, e.oldIndex, e.newIndex, e), me(() => {
|
|
1670
|
+
w(C.value);
|
|
1671
|
+
});
|
|
1672
|
+
}
|
|
1673
|
+
}), i({
|
|
1674
|
+
search: b,
|
|
1675
|
+
data: s,
|
|
1676
|
+
paging: v,
|
|
1677
|
+
isFetching: m,
|
|
1678
|
+
url: _,
|
|
1679
|
+
query: p,
|
|
1680
|
+
path: d
|
|
1681
|
+
}), (t, n) => {
|
|
1682
|
+
let r = be("loading");
|
|
1683
|
+
return k(), E(ie, null, [D(le, { class: "rounded bg-(--el-fill-color-light) px-2 pt-4" }), Ee((k(), E("div", Un, [
|
|
1684
|
+
D(A(ee), {
|
|
1685
|
+
trigger: "click",
|
|
1686
|
+
width: "auto",
|
|
1687
|
+
"popper-class": "shadow-xl bg-(--el-bg-color)"
|
|
1688
|
+
}, {
|
|
1689
|
+
reference: j(() => [D(A(c), {
|
|
1690
|
+
icon: A(Le),
|
|
1691
|
+
text: "",
|
|
1692
|
+
class: "absolute top-0 right-0 z-1000"
|
|
1693
|
+
}, null, 8, ["icon"])]),
|
|
1694
|
+
default: j(() => [oe("div", Wn, [D(A(re), { size: "large" }, {
|
|
1695
|
+
default: j(() => [...n[0] ||= [ce(" 表头设置 ", -1)]]),
|
|
1696
|
+
_: 1
|
|
1697
|
+
}), D(A(te), { "max-height": 500 }, {
|
|
1698
|
+
default: j(() => [oe("div", {
|
|
1699
|
+
ref_key: "sortable",
|
|
1700
|
+
ref: fe,
|
|
1701
|
+
class: "flex flex-col divide-y divide-[#f2f6fc]"
|
|
1702
|
+
}, [(k(!0), E(ie, null, _e(A(C), (e) => (k(), E("div", {
|
|
1703
|
+
key: e.code,
|
|
1704
|
+
class: "flex w-50 items-center gap-2 py-2"
|
|
1705
|
+
}, [
|
|
1706
|
+
D(A(c), {
|
|
1707
|
+
text: "",
|
|
1708
|
+
icon: A(Ie),
|
|
1709
|
+
type: "primary",
|
|
1710
|
+
size: "small",
|
|
1711
|
+
class: "cursor-grab"
|
|
1712
|
+
}, null, 8, ["icon"]),
|
|
1713
|
+
D(A(re), { class: "flex-1 overflow-ellipsis" }, {
|
|
1714
|
+
default: j(() => [ce(xe(e.label), 1)]),
|
|
1715
|
+
_: 2
|
|
1716
|
+
}, 1024),
|
|
1717
|
+
D(A(S), {
|
|
1718
|
+
size: "small",
|
|
1719
|
+
"model-value": e.visible
|
|
1720
|
+
}, null, 8, ["model-value"])
|
|
1721
|
+
]))), 128))], 512)]),
|
|
1722
|
+
_: 1
|
|
1723
|
+
})])]),
|
|
1724
|
+
_: 1
|
|
1725
|
+
}),
|
|
1726
|
+
D(ue),
|
|
1727
|
+
e.pagination ? (k(), E("div", Gn, [D(de)])) : ae("", !0)
|
|
1728
|
+
])), [[r, A(m)]])], 64);
|
|
1729
|
+
};
|
|
1730
|
+
}
|
|
1731
|
+
}), qn = { class: "flex flex-1 flex-col gap-2 overflow-hidden" }, Jn = {
|
|
1732
|
+
key: 0,
|
|
1733
|
+
class: "flex justify-end"
|
|
1734
|
+
}, Yn = /* @__PURE__ */ O({
|
|
1735
|
+
__name: "XTableRequestNext",
|
|
1736
|
+
props: {
|
|
1737
|
+
request: { type: Function },
|
|
1738
|
+
pagination: {
|
|
1739
|
+
type: Boolean,
|
|
1740
|
+
default: !0
|
|
1741
|
+
},
|
|
1742
|
+
columns: {},
|
|
1743
|
+
header: { type: Function },
|
|
1744
|
+
footer: { type: Function },
|
|
1745
|
+
cellClassName: { type: [Function, String] },
|
|
1746
|
+
cellStyle: { type: [Function, Object] },
|
|
1747
|
+
rowClassName: { type: [Function, String] },
|
|
1748
|
+
rowStyle: { type: [Function, Object] },
|
|
1749
|
+
border: { type: Boolean },
|
|
1750
|
+
height: {},
|
|
1751
|
+
emptyText: {},
|
|
1752
|
+
rowKey: { type: Function },
|
|
1753
|
+
showOverflowTooltip: {
|
|
1754
|
+
type: [Boolean, Object],
|
|
1755
|
+
default: () => void 0
|
|
1756
|
+
},
|
|
1757
|
+
showSummary: { type: Boolean },
|
|
1758
|
+
size: {},
|
|
1759
|
+
fit: {
|
|
1760
|
+
type: Boolean,
|
|
1761
|
+
default: !0
|
|
1762
|
+
},
|
|
1763
|
+
spanMethod: { type: Function },
|
|
1764
|
+
summaryMethod: { type: Function }
|
|
1765
|
+
},
|
|
1766
|
+
emits: [
|
|
1767
|
+
"prepare",
|
|
1768
|
+
"headerDragend",
|
|
1769
|
+
"rowClick",
|
|
1770
|
+
"rowDblclick",
|
|
1771
|
+
"selectionChange"
|
|
1772
|
+
],
|
|
1773
|
+
setup(e, { expose: t, emit: n }) {
|
|
1774
|
+
let i = n, { data: a, execute: o, path: s, query: c, isFetching: l, url: u, paging: d } = e.request();
|
|
1775
|
+
t({
|
|
1776
|
+
search: r(async () => {
|
|
1777
|
+
i("prepare", {
|
|
1778
|
+
path: s.value,
|
|
1779
|
+
query: c.value
|
|
1780
|
+
}), o();
|
|
1781
|
+
}),
|
|
1782
|
+
data: a,
|
|
1783
|
+
paging: d,
|
|
1784
|
+
isFetching: l,
|
|
1785
|
+
url: u,
|
|
1786
|
+
query: c,
|
|
1787
|
+
path: s
|
|
1788
|
+
});
|
|
1789
|
+
let f = () => e.header?.({ query: c.value }), p = () => D(Fe, {
|
|
1790
|
+
data: a.value,
|
|
1791
|
+
columns: e.columns,
|
|
1792
|
+
showOverflowTooltip: e.showOverflowTooltip,
|
|
1793
|
+
onRowClick: (e) => i("rowClick", e),
|
|
1794
|
+
onRowDblclick: (e) => i("rowDblclick", e),
|
|
1795
|
+
onSelectionChange: (e) => i("selectionChange", e),
|
|
1796
|
+
onHeaderDragend: (e, t, n) => i("headerDragend", e, t, n),
|
|
1797
|
+
cellClassName: e.cellClassName,
|
|
1798
|
+
cellStyle: e.cellStyle,
|
|
1799
|
+
rowClassName: e.rowClassName,
|
|
1800
|
+
rowStyle: e.rowStyle,
|
|
1801
|
+
fit: e.fit
|
|
1802
|
+
}, null), m = () => D(h, {
|
|
1803
|
+
size: "small",
|
|
1804
|
+
total: d.value.itemCount,
|
|
1805
|
+
currentPage: d.value.pageIndex,
|
|
1806
|
+
pageSize: d.value.pageSize,
|
|
1807
|
+
"onUpdate:currentPage": (e) => d.value.pageIndex = e ?? 0,
|
|
1808
|
+
"onUpdate:pageSize": (e) => d.value.pageSize = e ?? 0,
|
|
1809
|
+
onCurrentChange: () => o(),
|
|
1810
|
+
onSizeChange: () => o()
|
|
1811
|
+
}, null), g = () => e.footer?.({ query: c.value });
|
|
1812
|
+
return (t, n) => {
|
|
1813
|
+
let r = be("loading");
|
|
1814
|
+
return Ee((k(), E("div", qn, [
|
|
1815
|
+
D(f),
|
|
1816
|
+
D(p),
|
|
1817
|
+
e.pagination ? (k(), E("div", Jn, [D(m)])) : ae("", !0),
|
|
1818
|
+
D(g)
|
|
1819
|
+
])), [[r, A(l)]]);
|
|
1820
|
+
};
|
|
1821
|
+
}
|
|
1822
|
+
}), Xn = /* @__PURE__ */ O({
|
|
1823
|
+
__name: "XUploadOssNext",
|
|
1824
|
+
props: /* @__PURE__ */ fe({
|
|
1825
|
+
maxSize: { default: () => 50 * 1024 },
|
|
1826
|
+
accept: {},
|
|
1827
|
+
disabled: { type: Boolean },
|
|
1828
|
+
limit: {},
|
|
1829
|
+
showFileList: { type: Boolean },
|
|
1830
|
+
multiple: { type: Boolean },
|
|
1831
|
+
onSuccess: { type: Function },
|
|
1832
|
+
onRemove: { type: Function },
|
|
1833
|
+
onPreview: { type: Function }
|
|
1834
|
+
}, {
|
|
1835
|
+
modelValue: {},
|
|
1836
|
+
modelModifiers: {}
|
|
1837
|
+
}),
|
|
1838
|
+
emits: ["update:modelValue"],
|
|
1839
|
+
setup(e) {
|
|
1840
|
+
let t = ue(o), n = Ce(e, "modelValue"), r = w(() => typeof t?.oss == "function" ? t.oss() : t?.oss), i = ge(""), a = (e) => {
|
|
1841
|
+
let t = `${r.value?.dir}/${Date.now()}/${e.name}`;
|
|
1842
|
+
return i.value = `${r.value?.host}/${t}`, {
|
|
1843
|
+
...r.value,
|
|
1844
|
+
key: t,
|
|
1845
|
+
OSSAccessKeyId: r.value?.accessId,
|
|
1846
|
+
success_action_status: "200"
|
|
1847
|
+
};
|
|
1848
|
+
}, s = (t) => (t.size > e.maxSize && b.warning("文件过大,请重新选择"), t.size < e.maxSize), c = (e, t) => n.value = Array.isArray(n.value) ? t.map((e) => e.url) : void 0, l = () => n.value = Array.isArray(n.value) ? n.value.concat(i.value) : i.value, u = (e) => window.open(e.url), d = w(() => [].concat(n.value ?? []).reverse().map((e) => ({
|
|
1849
|
+
name: e.split("/").findLast(() => !0),
|
|
1850
|
+
url: e,
|
|
1851
|
+
uid: C()
|
|
1852
|
+
})));
|
|
1853
|
+
return (t, n) => {
|
|
1854
|
+
let i = ye("XButton");
|
|
1855
|
+
return k(), T(A(p), he(le({
|
|
1856
|
+
accept: e.accept,
|
|
1857
|
+
action: r.value?.host,
|
|
1858
|
+
data: a,
|
|
1859
|
+
fileList: d.value,
|
|
1860
|
+
beforeUpload: s,
|
|
1861
|
+
onRemove: c,
|
|
1862
|
+
onSuccess: l,
|
|
1863
|
+
onPreview: u
|
|
1864
|
+
})), se({
|
|
1865
|
+
default: j(() => [ve(t.$slots, "default", {}, () => [D(i, {
|
|
1866
|
+
type: "primary",
|
|
1867
|
+
size: "small"
|
|
1868
|
+
}, {
|
|
1869
|
+
default: j(() => [...n[0] ||= [ce(" 点击上传 ", -1)]]),
|
|
1870
|
+
_: 1
|
|
1871
|
+
})])]),
|
|
1872
|
+
_: 2
|
|
1873
|
+
}, ["tip" in t.$slots ? {
|
|
1874
|
+
name: "tip",
|
|
1875
|
+
fn: j(() => [ve(t.$slots, "tip")]),
|
|
1876
|
+
key: "0"
|
|
1877
|
+
} : void 0]), 1040);
|
|
1878
|
+
};
|
|
1879
|
+
}
|
|
1880
|
+
}), Zn = /* @__PURE__ */ d({
|
|
1881
|
+
XButtonAsync: () => De,
|
|
1882
|
+
XButtonConfirm: () => Oe,
|
|
1883
|
+
XCascaderRequest: () => ke,
|
|
1884
|
+
XFormFlex: () => je,
|
|
1885
|
+
XFormRequestNext: () => Me,
|
|
1886
|
+
XRequest: () => Ne,
|
|
1887
|
+
XSelectRequest: () => Pe,
|
|
1888
|
+
XTableFlex: () => Fe,
|
|
1889
|
+
XTableRequestConfigNext: () => Kn,
|
|
1890
|
+
XTableRequestNext: () => Yn,
|
|
1891
|
+
XUploadOssNext: () => Xn
|
|
1892
|
+
});
|
|
1893
|
+
//#endregion
|
|
1894
|
+
export { Fe as a, Me as c, Oe as d, De as f, Kn as i, je as l, Xn as n, Pe as o, Yn as r, Ne as s, Zn as t, ke as u };
|