@pungfe/element 0.2.3 → 0.2.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/advance-DdQuXFvG.cjs +1 -0
- package/dist/{advance-CLMBtS1v.js → advance-XX4jhTXw.js} +471 -462
- package/dist/advance.cjs +1 -1
- package/dist/advance.js +1 -1
- package/dist/{basic-CDT2kTg7.cjs → basic-BurPopWk.cjs} +1 -1
- package/dist/{basic-BSoDuE_Y.js → basic-CLsUtCqz.js} +1 -1
- package/dist/basic.cjs +1 -1
- package/dist/basic.js +1 -1
- package/dist/index.cjs +1 -1
- package/dist/index.js +3 -3
- package/dist/locales/ar.d.ts +2 -0
- package/dist/locales/th.d.ts +2 -0
- package/dist/locales-CgMjypnK.cjs +1 -0
- package/dist/locales-PXHtDoUh.js +797 -0
- package/dist/locales.cjs +1 -1
- package/dist/locales.d.ts +2 -0
- package/dist/locales.js +2 -2
- package/package.json +1 -1
- package/dist/advance-DKAuGDya.cjs +0 -1
- package/dist/locales-CaqVR6ZJ.cjs +0 -1
- package/dist/locales-DkwGxV6Q.js +0 -391
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { A as e, C as t, D as n, E as r, O as i, S as a, T as o, _ as s, a as c, b as l, d as u, g as d, k as f, l as p, n as m, o as h, s as g, u as _, w as v, x as y, y as b } from "./basic-
|
|
2
|
-
import { ElMessage as x, ElPopconfirm as
|
|
3
|
-
import { Fragment as
|
|
1
|
+
import { A as e, C as t, D as n, E as r, O as i, S as a, T as o, _ as s, a as c, b as l, d as u, g as d, k as f, l as p, n as m, o as h, s as g, u as _, w as v, x as y, y as b } from "./basic-CLsUtCqz.js";
|
|
2
|
+
import { ElMessage as x, ElPopconfirm as ee, ElPopover as te, ElScrollbar as ne, ElSpace as S, ElSwitch as re, ElText as ie, genFileId as C, useLocale as ae } from "element-plus";
|
|
3
|
+
import { Fragment as oe, computed as w, createBlock as T, createCommentVNode as se, createElementBlock as E, createElementVNode as ce, createSlots as le, createTextVNode as ue, createVNode as D, defineComponent as O, guardReactiveProps as de, inject as fe, isRef as pe, isVNode as me, mergeModels as he, mergeProps as ge, nextTick as _e, normalizeProps as ve, openBlock as k, ref as ye, renderSlot as be, resolveComponent as xe, resolveDirective as Se, toDisplayString as Ce, toValue as we, unref as A, useModel as Te, useTemplateRef as Ee, watch as De, withCtx as j, withDirectives as Oe } from "vue";
|
|
4
4
|
//#endregion
|
|
5
5
|
//#region src/components/advance/XButtonAsync.vue
|
|
6
|
-
var
|
|
6
|
+
var ke = /* @__PURE__ */ O({
|
|
7
7
|
__name: "XButtonAsync",
|
|
8
8
|
props: {
|
|
9
9
|
action: { type: Function },
|
|
@@ -24,20 +24,20 @@ var Oe = /* @__PURE__ */ k({
|
|
|
24
24
|
} catch (e) {
|
|
25
25
|
console.log(e);
|
|
26
26
|
}
|
|
27
|
-
}), n =
|
|
28
|
-
return (n, i) => (
|
|
27
|
+
}), n = fe(b, void 0), r = w(() => e.link ?? n);
|
|
28
|
+
return (n, i) => (k(), T(A(y), ge({
|
|
29
29
|
disabled: e.disabled,
|
|
30
30
|
icon: e.icon,
|
|
31
31
|
type: e.type,
|
|
32
32
|
link: r.value,
|
|
33
33
|
size: e.size,
|
|
34
34
|
text: e.text
|
|
35
|
-
}, { onClick:
|
|
36
|
-
default:
|
|
35
|
+
}, { onClick: A(t) }), {
|
|
36
|
+
default: j(() => [be(n.$slots, "default")]),
|
|
37
37
|
_: 3
|
|
38
38
|
}, 16, ["onClick"]));
|
|
39
39
|
}
|
|
40
|
-
}),
|
|
40
|
+
}), Ae = /* @__PURE__ */ O({
|
|
41
41
|
__name: "XButtonConfirm",
|
|
42
42
|
props: {
|
|
43
43
|
title: { default: "是否执行?" },
|
|
@@ -53,13 +53,13 @@ var Oe = /* @__PURE__ */ k({
|
|
|
53
53
|
},
|
|
54
54
|
emits: ["cancel", "confirm"],
|
|
55
55
|
setup(e, { emit: t }) {
|
|
56
|
-
let n = t, r =
|
|
57
|
-
return (t, r) => (
|
|
56
|
+
let n = t, r = fe(b, void 0), i = w(() => e.link ?? r);
|
|
57
|
+
return (t, r) => (k(), T(A(ee), {
|
|
58
58
|
title: e.title,
|
|
59
59
|
onCancel: r[0] ||= () => n("cancel"),
|
|
60
60
|
onConfirm: r[1] ||= () => n("confirm")
|
|
61
61
|
}, {
|
|
62
|
-
reference:
|
|
62
|
+
reference: j(() => [D(A(y), ve(de({
|
|
63
63
|
disabled: e.disabled,
|
|
64
64
|
icon: e.icon,
|
|
65
65
|
type: e.type,
|
|
@@ -67,31 +67,31 @@ var Oe = /* @__PURE__ */ k({
|
|
|
67
67
|
size: e.size,
|
|
68
68
|
text: e.text
|
|
69
69
|
})), {
|
|
70
|
-
default:
|
|
70
|
+
default: j(() => [be(t.$slots, "default")]),
|
|
71
71
|
_: 3
|
|
72
72
|
}, 16)]),
|
|
73
|
-
actions:
|
|
73
|
+
actions: j(({ confirm: e, cancel: t }) => [D(A(y), {
|
|
74
74
|
size: "small",
|
|
75
75
|
disabled: !1,
|
|
76
76
|
onClick: t
|
|
77
77
|
}, {
|
|
78
|
-
default:
|
|
78
|
+
default: j(() => [...r[2] ||= [ue(" 取消 ", -1)]]),
|
|
79
79
|
_: 1
|
|
80
|
-
}, 8, ["onClick"]),
|
|
80
|
+
}, 8, ["onClick"]), D(A(y), {
|
|
81
81
|
type: "danger",
|
|
82
82
|
disabled: !1,
|
|
83
83
|
size: "small",
|
|
84
84
|
onClick: e
|
|
85
85
|
}, {
|
|
86
|
-
default:
|
|
86
|
+
default: j(() => [...r[3] ||= [ue(" 确定 ", -1)]]),
|
|
87
87
|
_: 1
|
|
88
88
|
}, 8, ["onClick"])]),
|
|
89
89
|
_: 3
|
|
90
90
|
}, 8, ["title"]));
|
|
91
91
|
}
|
|
92
|
-
}),
|
|
92
|
+
}), je = /* @__PURE__ */ O({
|
|
93
93
|
__name: "XCascaderRequest",
|
|
94
|
-
props: /* @__PURE__ */
|
|
94
|
+
props: /* @__PURE__ */ he({
|
|
95
95
|
request: { type: Function },
|
|
96
96
|
clearable: { type: Boolean },
|
|
97
97
|
disabled: {
|
|
@@ -106,9 +106,9 @@ var Oe = /* @__PURE__ */ k({
|
|
|
106
106
|
modelValue: {},
|
|
107
107
|
modelModifiers: {}
|
|
108
108
|
}),
|
|
109
|
-
emits: /* @__PURE__ */
|
|
109
|
+
emits: /* @__PURE__ */ he(["prepare", "change"], ["update:modelValue"]),
|
|
110
110
|
setup(e, { expose: t, emit: n }) {
|
|
111
|
-
let r = n, i =
|
|
111
|
+
let r = n, i = Te(e, "modelValue"), { data: a, path: o, url: s, execute: c, query: l } = e.request();
|
|
112
112
|
return t({
|
|
113
113
|
search: f(async () => {
|
|
114
114
|
r("prepare", {
|
|
@@ -121,18 +121,18 @@ var Oe = /* @__PURE__ */ k({
|
|
|
121
121
|
url: s,
|
|
122
122
|
execute: c,
|
|
123
123
|
query: l
|
|
124
|
-
}), (t, n) => (
|
|
124
|
+
}), (t, n) => (k(), T(A(d), ge({
|
|
125
125
|
modelValue: i.value,
|
|
126
126
|
"onUpdate:modelValue": n[0] ||= (e) => i.value = e
|
|
127
127
|
}, {
|
|
128
128
|
clearable: e.clearable,
|
|
129
129
|
disabled: e.disabled,
|
|
130
130
|
filterable: e.filterable,
|
|
131
|
-
data:
|
|
131
|
+
data: A(a),
|
|
132
132
|
props: e.props
|
|
133
133
|
}), null, 16, ["modelValue"]));
|
|
134
134
|
}
|
|
135
|
-
}),
|
|
135
|
+
}), Me = { class: "flex-1 overflow-hidden" }, Ne = /* @__PURE__ */ O({
|
|
136
136
|
__name: "XFormFlex",
|
|
137
137
|
props: {
|
|
138
138
|
content: { type: Function },
|
|
@@ -144,21 +144,21 @@ var Oe = /* @__PURE__ */ k({
|
|
|
144
144
|
labelWidth: {}
|
|
145
145
|
},
|
|
146
146
|
setup(e, { expose: t }) {
|
|
147
|
-
let n =
|
|
147
|
+
let n = Ee("form");
|
|
148
148
|
t({
|
|
149
149
|
validate: () => n.value?.validate(),
|
|
150
150
|
clearValidate: () => n.value?.clearValidate()
|
|
151
151
|
});
|
|
152
152
|
let r = () => e.content?.({ data: e.data ?? {} });
|
|
153
|
-
return (e, t) => (
|
|
154
|
-
default:
|
|
153
|
+
return (e, t) => (k(), E("div", Me, [D(A(ne), null, {
|
|
154
|
+
default: j(() => [D(A(u), ge({
|
|
155
155
|
ref_key: "form",
|
|
156
156
|
ref: n
|
|
157
157
|
}, e.$props, { content: r }), null, 16)]),
|
|
158
158
|
_: 1
|
|
159
159
|
})]));
|
|
160
160
|
}
|
|
161
|
-
}),
|
|
161
|
+
}), Pe = /* @__PURE__ */ O({
|
|
162
162
|
__name: "XFormRequestNext",
|
|
163
163
|
props: {
|
|
164
164
|
request: { type: Function },
|
|
@@ -174,7 +174,7 @@ var Oe = /* @__PURE__ */ k({
|
|
|
174
174
|
},
|
|
175
175
|
emits: ["prepare"],
|
|
176
176
|
setup(e, { expose: t, emit: n }) {
|
|
177
|
-
let r = n, { data: i, isFetching: a, execute: o, path: s, url: c, query: l } = e.request(), d = JSON.stringify(i.value), p =
|
|
177
|
+
let r = n, { data: i, isFetching: a, execute: o, path: s, url: c, query: l } = e.request(), d = JSON.stringify(i.value), p = w(() => a.value || (typeof e.disabled == "function" ? e.disabled({ data: i.value }) : e.disabled)), m = Ee("form"), h = () => i.value = JSON.parse(d), g = () => m.value?.validate(), _ = () => m.value?.clearValidate(), v = () => {
|
|
178
178
|
h(), m.value?.resetFields();
|
|
179
179
|
}, y = f(async () => {
|
|
180
180
|
r("prepare", {
|
|
@@ -191,23 +191,23 @@ var Oe = /* @__PURE__ */ k({
|
|
|
191
191
|
reset: h,
|
|
192
192
|
resetFields: v
|
|
193
193
|
}), (t, n) => {
|
|
194
|
-
let r =
|
|
195
|
-
return
|
|
194
|
+
let r = Se("loading");
|
|
195
|
+
return Oe((k(), T(A(u), ge({
|
|
196
196
|
ref_key: "form",
|
|
197
197
|
ref: m,
|
|
198
198
|
class: "flex flex-1 flex-col gap-2 overflow-hidden"
|
|
199
199
|
}, {
|
|
200
|
-
data:
|
|
200
|
+
data: A(i),
|
|
201
201
|
disabled: p.value,
|
|
202
202
|
inline: e.inline,
|
|
203
203
|
labelPosition: e.labelPosition,
|
|
204
204
|
labelSuffix: e.labelSuffix,
|
|
205
205
|
labelWidth: e.labelWidth,
|
|
206
206
|
content: b
|
|
207
|
-
}), null, 16)), [[r,
|
|
207
|
+
}), null, 16)), [[r, A(a)]]);
|
|
208
208
|
};
|
|
209
209
|
}
|
|
210
|
-
}),
|
|
210
|
+
}), Fe = /* @__PURE__ */ O({
|
|
211
211
|
__name: "XRequest",
|
|
212
212
|
props: {
|
|
213
213
|
request: { type: Function },
|
|
@@ -237,18 +237,18 @@ var Oe = /* @__PURE__ */ k({
|
|
|
237
237
|
url: l,
|
|
238
238
|
execute: u,
|
|
239
239
|
search: d
|
|
240
|
-
}), (e, t) =>
|
|
241
|
-
data:
|
|
242
|
-
paging:
|
|
243
|
-
path:
|
|
244
|
-
query:
|
|
245
|
-
isFetching:
|
|
246
|
-
search:
|
|
247
|
-
}, () => [
|
|
240
|
+
}), (e, t) => be(e.$slots, "default", {
|
|
241
|
+
data: A(i),
|
|
242
|
+
paging: A(a),
|
|
243
|
+
path: A(o),
|
|
244
|
+
query: A(s),
|
|
245
|
+
isFetching: A(c),
|
|
246
|
+
search: A(d)
|
|
247
|
+
}, () => [D(p)]);
|
|
248
248
|
}
|
|
249
|
-
}),
|
|
249
|
+
}), Ie = /* @__PURE__ */ O({
|
|
250
250
|
__name: "XSelectRequest",
|
|
251
|
-
props: /* @__PURE__ */
|
|
251
|
+
props: /* @__PURE__ */ he({
|
|
252
252
|
request: { type: Function },
|
|
253
253
|
supplement: { type: Function },
|
|
254
254
|
collapseTagsTooltip: { type: Boolean },
|
|
@@ -278,14 +278,14 @@ var Oe = /* @__PURE__ */ k({
|
|
|
278
278
|
modelValue: {},
|
|
279
279
|
modelModifiers: {}
|
|
280
280
|
}),
|
|
281
|
-
emits: /* @__PURE__ */
|
|
281
|
+
emits: /* @__PURE__ */ he([
|
|
282
282
|
"prepare",
|
|
283
283
|
"blur",
|
|
284
284
|
"change",
|
|
285
285
|
"focus"
|
|
286
286
|
], ["update:modelValue"]),
|
|
287
287
|
setup(e, { expose: t, emit: n }) {
|
|
288
|
-
let r = n, i =
|
|
288
|
+
let r = n, i = Te(e, "modelValue"), { data: a, isFetching: o, path: s, url: c, execute: l, query: u } = e.request(), d = f(async (e) => {
|
|
289
289
|
r("prepare", {
|
|
290
290
|
path: s.value,
|
|
291
291
|
query: u.value
|
|
@@ -298,10 +298,10 @@ var Oe = /* @__PURE__ */ k({
|
|
|
298
298
|
url: c,
|
|
299
299
|
execute: l,
|
|
300
300
|
query: u
|
|
301
|
-
}), (t, n) => (
|
|
302
|
-
data:
|
|
303
|
-
supplement:
|
|
304
|
-
remoteMethod:
|
|
301
|
+
}), (t, n) => (k(), T(A(h), ge({
|
|
302
|
+
data: A(a),
|
|
303
|
+
supplement: A(p),
|
|
304
|
+
remoteMethod: A(d),
|
|
305
305
|
factory: e.factory,
|
|
306
306
|
allowCreate: e.allowCreate,
|
|
307
307
|
clearable: e.clearable,
|
|
@@ -309,8 +309,8 @@ var Oe = /* @__PURE__ */ k({
|
|
|
309
309
|
identify: e.identify,
|
|
310
310
|
remote: e.remote,
|
|
311
311
|
filterable: e.remote || e.filterable,
|
|
312
|
-
disabled:
|
|
313
|
-
loading:
|
|
312
|
+
disabled: A(o) || e.disabled,
|
|
313
|
+
loading: A(o) || e.loading,
|
|
314
314
|
multiple: e.multiple,
|
|
315
315
|
size: e.size
|
|
316
316
|
}, {
|
|
@@ -321,26 +321,26 @@ var Oe = /* @__PURE__ */ k({
|
|
|
321
321
|
onChange: n[3] ||= (e) => t.$emit("change", e)
|
|
322
322
|
}), null, 16, ["modelValue"]));
|
|
323
323
|
}
|
|
324
|
-
}),
|
|
324
|
+
}), Le = /* @__PURE__ */ O({
|
|
325
325
|
name: "Rank",
|
|
326
326
|
__name: "rank",
|
|
327
327
|
setup(e) {
|
|
328
|
-
return (e, t) => (
|
|
328
|
+
return (e, t) => (k(), E("svg", {
|
|
329
329
|
xmlns: "http://www.w3.org/2000/svg",
|
|
330
330
|
viewBox: "0 0 1024 1024"
|
|
331
|
-
}, [
|
|
331
|
+
}, [ce("path", {
|
|
332
332
|
fill: "currentColor",
|
|
333
333
|
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"
|
|
334
334
|
})]));
|
|
335
335
|
}
|
|
336
|
-
}),
|
|
336
|
+
}), Re = /* @__PURE__ */ O({
|
|
337
337
|
name: "Setting",
|
|
338
338
|
__name: "setting",
|
|
339
339
|
setup(e) {
|
|
340
|
-
return (e, t) => (
|
|
340
|
+
return (e, t) => (k(), E("svg", {
|
|
341
341
|
xmlns: "http://www.w3.org/2000/svg",
|
|
342
342
|
viewBox: "0 0 1024 1024"
|
|
343
|
-
}, [
|
|
343
|
+
}, [ce("path", {
|
|
344
344
|
fill: "currentColor",
|
|
345
345
|
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"
|
|
346
346
|
})]));
|
|
@@ -348,7 +348,7 @@ var Oe = /* @__PURE__ */ k({
|
|
|
348
348
|
});
|
|
349
349
|
//#endregion
|
|
350
350
|
//#region node_modules/sortablejs/modular/sortable.esm.js
|
|
351
|
-
function
|
|
351
|
+
function ze(e, t, n) {
|
|
352
352
|
return (t = Ge(t)) in e ? Object.defineProperty(e, t, {
|
|
353
353
|
value: n,
|
|
354
354
|
enumerable: !0,
|
|
@@ -356,16 +356,16 @@ function Re(e, t, n) {
|
|
|
356
356
|
writable: !0
|
|
357
357
|
}) : e[t] = n, e;
|
|
358
358
|
}
|
|
359
|
-
function
|
|
360
|
-
return
|
|
359
|
+
function Be() {
|
|
360
|
+
return Be = Object.assign ? Object.assign.bind() : function(e) {
|
|
361
361
|
for (var t = 1; t < arguments.length; t++) {
|
|
362
362
|
var n = arguments[t];
|
|
363
363
|
for (var r in n) ({}).hasOwnProperty.call(n, r) && (e[r] = n[r]);
|
|
364
364
|
}
|
|
365
365
|
return e;
|
|
366
|
-
},
|
|
366
|
+
}, Be.apply(null, arguments);
|
|
367
367
|
}
|
|
368
|
-
function
|
|
368
|
+
function Ve(e, t) {
|
|
369
369
|
var n = Object.keys(e);
|
|
370
370
|
if (Object.getOwnPropertySymbols) {
|
|
371
371
|
var r = Object.getOwnPropertySymbols(e);
|
|
@@ -375,12 +375,12 @@ function Be(e, t) {
|
|
|
375
375
|
}
|
|
376
376
|
return n;
|
|
377
377
|
}
|
|
378
|
-
function
|
|
378
|
+
function M(e) {
|
|
379
379
|
for (var t = 1; t < arguments.length; t++) {
|
|
380
380
|
var n = arguments[t] == null ? {} : arguments[t];
|
|
381
|
-
t % 2 ?
|
|
382
|
-
|
|
383
|
-
}) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(n)) :
|
|
381
|
+
t % 2 ? Ve(Object(n), !0).forEach(function(t) {
|
|
382
|
+
ze(e, t, n[t]);
|
|
383
|
+
}) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(n)) : Ve(Object(n)).forEach(function(t) {
|
|
384
384
|
Object.defineProperty(e, t, Object.getOwnPropertyDescriptor(n, t));
|
|
385
385
|
});
|
|
386
386
|
}
|
|
@@ -434,10 +434,10 @@ var Ye = Je(/(?:Trident.*rv[ :]?11\.|msie|iemobile|Windows Phone)/i), Xe = Je(/E
|
|
|
434
434
|
capture: !1,
|
|
435
435
|
passive: !1
|
|
436
436
|
};
|
|
437
|
-
function
|
|
437
|
+
function N(e, t, n) {
|
|
438
438
|
e.addEventListener(t, n, !Ye && tt);
|
|
439
439
|
}
|
|
440
|
-
function
|
|
440
|
+
function P(e, t, n) {
|
|
441
441
|
e.removeEventListener(t, n, !Ye && tt);
|
|
442
442
|
}
|
|
443
443
|
function nt(e, t) {
|
|
@@ -455,7 +455,7 @@ function nt(e, t) {
|
|
|
455
455
|
function rt(e) {
|
|
456
456
|
return e.host && e !== document && e.host.nodeType && e.host !== e ? e.host : e.parentNode;
|
|
457
457
|
}
|
|
458
|
-
function
|
|
458
|
+
function F(e, t, n, r) {
|
|
459
459
|
if (e) {
|
|
460
460
|
n ||= document;
|
|
461
461
|
do {
|
|
@@ -466,10 +466,10 @@ function P(e, t, n, r) {
|
|
|
466
466
|
return null;
|
|
467
467
|
}
|
|
468
468
|
var it = /\s+/g;
|
|
469
|
-
function
|
|
469
|
+
function I(e, t, n) {
|
|
470
470
|
e && t && (e.classList ? e.classList[n ? "add" : "remove"](t) : e.className = ((" " + e.className + " ").replace(it, " ").replace(" " + t + " ", " ") + (n ? " " + t : "")).replace(it, " "));
|
|
471
471
|
}
|
|
472
|
-
function
|
|
472
|
+
function L(e, t, n) {
|
|
473
473
|
var r = e && e.style;
|
|
474
474
|
if (r) {
|
|
475
475
|
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];
|
|
@@ -480,7 +480,7 @@ function at(e, t) {
|
|
|
480
480
|
var n = "";
|
|
481
481
|
if (typeof e == "string") n = e;
|
|
482
482
|
else do {
|
|
483
|
-
var r =
|
|
483
|
+
var r = L(e, "transform");
|
|
484
484
|
r && r !== "none" && (n = r + " " + n);
|
|
485
485
|
} while (!t && (e = e.parentNode));
|
|
486
486
|
var i = window.DOMMatrix || window.WebKitCSSMatrix || window.CSSMatrix || window.MSCSSMatrix;
|
|
@@ -494,16 +494,16 @@ function ot(e, t, n) {
|
|
|
494
494
|
}
|
|
495
495
|
return [];
|
|
496
496
|
}
|
|
497
|
-
function
|
|
497
|
+
function st() {
|
|
498
498
|
return document.scrollingElement || document.documentElement;
|
|
499
499
|
}
|
|
500
500
|
function R(e, t, n, r, i) {
|
|
501
501
|
if (!(!e.getBoundingClientRect && e !== window)) {
|
|
502
502
|
var a, o, s, c, l, u, d;
|
|
503
|
-
if (e !== window && e.parentNode && e !==
|
|
504
|
-
if (i && i.getBoundingClientRect && (
|
|
503
|
+
if (e !== window && e.parentNode && e !== st() ? (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, !Ye)) do
|
|
504
|
+
if (i && i.getBoundingClientRect && (L(i, "transform") !== "none" || n && L(i, "position") !== "static")) {
|
|
505
505
|
var f = i.getBoundingClientRect();
|
|
506
|
-
o -= f.top + parseInt(
|
|
506
|
+
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;
|
|
507
507
|
break;
|
|
508
508
|
}
|
|
509
509
|
while (i = i.parentNode);
|
|
@@ -521,18 +521,18 @@ function R(e, t, n, r, i) {
|
|
|
521
521
|
};
|
|
522
522
|
}
|
|
523
523
|
}
|
|
524
|
-
function
|
|
525
|
-
for (var r =
|
|
524
|
+
function ct(e, t, n) {
|
|
525
|
+
for (var r = pt(e, !0), i = R(e)[t]; r;) {
|
|
526
526
|
var a = R(r)[n], o = void 0;
|
|
527
527
|
if (o = n === "top" || n === "left" ? i >= a : i <= a, !o) return r;
|
|
528
|
-
if (r ===
|
|
529
|
-
r =
|
|
528
|
+
if (r === st()) break;
|
|
529
|
+
r = pt(r, !1);
|
|
530
530
|
}
|
|
531
531
|
return !1;
|
|
532
532
|
}
|
|
533
|
-
function
|
|
533
|
+
function lt(e, t, n, r) {
|
|
534
534
|
for (var i = 0, a = 0, o = e.children; a < o.length;) {
|
|
535
|
-
if (o[a].style.display !== "none" && o[a] !== Q.ghost && (r || o[a] !== Q.dragged) &&
|
|
535
|
+
if (o[a].style.display !== "none" && o[a] !== Q.ghost && (r || o[a] !== Q.dragged) && F(o[a], n.draggable, e, !1)) {
|
|
536
536
|
if (i === t) return o[a];
|
|
537
537
|
i++;
|
|
538
538
|
}
|
|
@@ -540,8 +540,8 @@ function ct(e, t, n, r) {
|
|
|
540
540
|
}
|
|
541
541
|
return null;
|
|
542
542
|
}
|
|
543
|
-
function
|
|
544
|
-
for (var n = e.lastElementChild; n && (n === Q.ghost ||
|
|
543
|
+
function ut(e, t) {
|
|
544
|
+
for (var n = e.lastElementChild; n && (n === Q.ghost || L(n, "display") === "none" || t && !nt(n, t));) n = n.previousElementSibling;
|
|
545
545
|
return n || null;
|
|
546
546
|
}
|
|
547
547
|
function z(e, t) {
|
|
@@ -550,84 +550,84 @@ function z(e, t) {
|
|
|
550
550
|
for (; e = e.previousElementSibling;) e.nodeName.toUpperCase() !== "TEMPLATE" && e !== Q.clone && (!t || nt(e, t)) && n++;
|
|
551
551
|
return n;
|
|
552
552
|
}
|
|
553
|
-
function
|
|
554
|
-
var t = 0, n = 0, r =
|
|
553
|
+
function dt(e) {
|
|
554
|
+
var t = 0, n = 0, r = st();
|
|
555
555
|
if (e) do {
|
|
556
556
|
var i = at(e), a = i.a, o = i.d;
|
|
557
557
|
t += e.scrollLeft * a, n += e.scrollTop * o;
|
|
558
558
|
} while (e !== r && (e = e.parentNode));
|
|
559
559
|
return [t, n];
|
|
560
560
|
}
|
|
561
|
-
function
|
|
561
|
+
function ft(e, t) {
|
|
562
562
|
for (var n in e) if (e.hasOwnProperty(n)) {
|
|
563
563
|
for (var r in t) if (t.hasOwnProperty(r) && t[r] === e[n][r]) return Number(n);
|
|
564
564
|
}
|
|
565
565
|
return -1;
|
|
566
566
|
}
|
|
567
|
-
function
|
|
568
|
-
if (!e || !e.getBoundingClientRect) return
|
|
567
|
+
function pt(e, t) {
|
|
568
|
+
if (!e || !e.getBoundingClientRect) return st();
|
|
569
569
|
var n = e, r = !1;
|
|
570
570
|
do
|
|
571
571
|
if (n.clientWidth < n.scrollWidth || n.clientHeight < n.scrollHeight) {
|
|
572
|
-
var i =
|
|
572
|
+
var i = L(n);
|
|
573
573
|
if (n.clientWidth < n.scrollWidth && (i.overflowX == "auto" || i.overflowX == "scroll") || n.clientHeight < n.scrollHeight && (i.overflowY == "auto" || i.overflowY == "scroll")) {
|
|
574
|
-
if (!n.getBoundingClientRect || n === document.body) return
|
|
574
|
+
if (!n.getBoundingClientRect || n === document.body) return st();
|
|
575
575
|
if (r || t) return n;
|
|
576
576
|
r = !0;
|
|
577
577
|
}
|
|
578
578
|
}
|
|
579
579
|
while (n = n.parentNode);
|
|
580
|
-
return
|
|
580
|
+
return st();
|
|
581
581
|
}
|
|
582
|
-
function
|
|
582
|
+
function mt(e, t) {
|
|
583
583
|
if (e && t) for (var n in t) t.hasOwnProperty(n) && (e[n] = t[n]);
|
|
584
584
|
return e;
|
|
585
585
|
}
|
|
586
|
-
function
|
|
586
|
+
function ht(e, t) {
|
|
587
587
|
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);
|
|
588
588
|
}
|
|
589
|
-
var
|
|
590
|
-
function
|
|
589
|
+
var gt;
|
|
590
|
+
function _t(e, t) {
|
|
591
591
|
return function() {
|
|
592
|
-
if (!
|
|
592
|
+
if (!gt) {
|
|
593
593
|
var n = arguments, r = this;
|
|
594
|
-
n.length === 1 ? e.call(r, n[0]) : e.apply(r, n),
|
|
595
|
-
|
|
594
|
+
n.length === 1 ? e.call(r, n[0]) : e.apply(r, n), gt = setTimeout(function() {
|
|
595
|
+
gt = void 0;
|
|
596
596
|
}, t);
|
|
597
597
|
}
|
|
598
598
|
};
|
|
599
599
|
}
|
|
600
|
-
function
|
|
601
|
-
clearTimeout(
|
|
600
|
+
function vt() {
|
|
601
|
+
clearTimeout(gt), gt = void 0;
|
|
602
602
|
}
|
|
603
|
-
function
|
|
603
|
+
function yt(e, t, n) {
|
|
604
604
|
e.scrollLeft += t, e.scrollTop += n;
|
|
605
605
|
}
|
|
606
|
-
function
|
|
606
|
+
function bt(e) {
|
|
607
607
|
var t = window.Polymer, n = window.jQuery || window.Zepto;
|
|
608
608
|
return t && t.dom ? t.dom(e).cloneNode(!0) : n ? n(e).clone(!0)[0] : e.cloneNode(!0);
|
|
609
609
|
}
|
|
610
|
-
function
|
|
610
|
+
function xt(e, t, n) {
|
|
611
611
|
var r = {};
|
|
612
612
|
return Array.from(e.children).forEach(function(i) {
|
|
613
|
-
if (!(!
|
|
613
|
+
if (!(!F(i, t.draggable, e, !1) || i.animated || i === n)) {
|
|
614
614
|
var a = R(i);
|
|
615
615
|
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);
|
|
616
616
|
}
|
|
617
617
|
}), r.width = r.right - r.left, r.height = r.bottom - r.top, r.x = r.left, r.y = r.top, r;
|
|
618
618
|
}
|
|
619
619
|
var B = "Sortable" + (/* @__PURE__ */ new Date()).getTime();
|
|
620
|
-
function
|
|
620
|
+
function St() {
|
|
621
621
|
var e = [], t;
|
|
622
622
|
return {
|
|
623
623
|
captureAnimationState: function() {
|
|
624
624
|
e = [], this.options.animation && [].slice.call(this.el.children).forEach(function(t) {
|
|
625
|
-
if (!(
|
|
625
|
+
if (!(L(t, "display") === "none" || t === Q.ghost)) {
|
|
626
626
|
e.push({
|
|
627
627
|
target: t,
|
|
628
628
|
rect: R(t)
|
|
629
629
|
});
|
|
630
|
-
var n =
|
|
630
|
+
var n = M({}, e[e.length - 1].rect);
|
|
631
631
|
if (t.thisAnimationDuration) {
|
|
632
632
|
var r = at(t, !0);
|
|
633
633
|
r && (n.top -= r.f, n.left -= r.e);
|
|
@@ -640,7 +640,7 @@ function xt() {
|
|
|
640
640
|
e.push(t);
|
|
641
641
|
},
|
|
642
642
|
removeAnimationState: function(t) {
|
|
643
|
-
e.splice(
|
|
643
|
+
e.splice(ft(e, { target: t }), 1);
|
|
644
644
|
},
|
|
645
645
|
animateAll: function(n) {
|
|
646
646
|
var r = this;
|
|
@@ -651,7 +651,7 @@ function xt() {
|
|
|
651
651
|
var i = !1, a = 0;
|
|
652
652
|
e.forEach(function(e) {
|
|
653
653
|
var t = 0, n = e.target, o = n.fromRect, s = R(n), c = n.prevFromRect, l = n.prevToRect, u = e.rect, d = at(n, !0);
|
|
654
|
-
d && (s.top -= d.f, s.left -= d.e), n.toRect = s, n.thisAnimationDuration &&
|
|
654
|
+
d && (s.top -= d.f, s.left -= d.e), n.toRect = s, n.thisAnimationDuration && ht(c, s) && !ht(o, s) && (u.top - s.top) / (u.left - s.left) === (o.top - s.top) / (o.left - s.left) && (t = wt(u, c, l, r.options)), ht(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() {
|
|
655
655
|
n.animationTime = 0, n.prevFromRect = null, n.fromRect = null, n.prevToRect = null, n.thisAnimationDuration = null;
|
|
656
656
|
}, t), n.thisAnimationDuration = t);
|
|
657
657
|
}), clearTimeout(t), i ? t = setTimeout(function() {
|
|
@@ -660,27 +660,27 @@ function xt() {
|
|
|
660
660
|
},
|
|
661
661
|
animate: function(e, t, n, r) {
|
|
662
662
|
if (r) {
|
|
663
|
-
|
|
663
|
+
L(e, "transition", ""), L(e, "transform", "");
|
|
664
664
|
var i = at(this.el), a = i && i.a, o = i && i.d, s = (t.left - n.left) / (a || 1), c = (t.top - n.top) / (o || 1);
|
|
665
|
-
e.animatingX = !!s, e.animatingY = !!c,
|
|
666
|
-
|
|
665
|
+
e.animatingX = !!s, e.animatingY = !!c, L(e, "transform", "translate3d(" + s + "px," + c + "px,0)"), this.forRepaintDummy = Ct(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() {
|
|
666
|
+
L(e, "transition", ""), L(e, "transform", ""), e.animated = !1, e.animatingX = !1, e.animatingY = !1;
|
|
667
667
|
}, r);
|
|
668
668
|
}
|
|
669
669
|
}
|
|
670
670
|
};
|
|
671
671
|
}
|
|
672
|
-
function
|
|
672
|
+
function Ct(e) {
|
|
673
673
|
return e.offsetWidth;
|
|
674
674
|
}
|
|
675
|
-
function
|
|
675
|
+
function wt(e, t, n, r) {
|
|
676
676
|
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;
|
|
677
677
|
}
|
|
678
|
-
var
|
|
678
|
+
var Tt = [], Et = { initializeByDefault: !0 }, Dt = {
|
|
679
679
|
mount: function(e) {
|
|
680
|
-
for (var t in
|
|
681
|
-
|
|
680
|
+
for (var t in Et) Et.hasOwnProperty(t) && !(t in e) && (e[t] = Et[t]);
|
|
681
|
+
Tt.forEach(function(t) {
|
|
682
682
|
if (t.pluginName === e.pluginName) throw `Sortable: Cannot mount plugin ${e.pluginName} more than once`;
|
|
683
|
-
}),
|
|
683
|
+
}), Tt.push(e);
|
|
684
684
|
},
|
|
685
685
|
pluginEvent: function(e, t, n) {
|
|
686
686
|
var r = this;
|
|
@@ -688,16 +688,16 @@ var wt = [], Tt = { initializeByDefault: !0 }, Et = {
|
|
|
688
688
|
r.eventCanceled = !0;
|
|
689
689
|
};
|
|
690
690
|
var i = e + "Global";
|
|
691
|
-
|
|
692
|
-
t[r.pluginName] && (t[r.pluginName][i] && t[r.pluginName][i](
|
|
691
|
+
Tt.forEach(function(r) {
|
|
692
|
+
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)));
|
|
693
693
|
});
|
|
694
694
|
},
|
|
695
695
|
initializePlugins: function(e, t, n, r) {
|
|
696
|
-
for (var i in
|
|
696
|
+
for (var i in Tt.forEach(function(r) {
|
|
697
697
|
var i = r.pluginName;
|
|
698
698
|
if (!(!e.options[i] && !r.initializeByDefault)) {
|
|
699
699
|
var a = new r(e, t, e.options);
|
|
700
|
-
a.sortable = e, a.options = e.options, e[i] = a,
|
|
700
|
+
a.sortable = e, a.options = e.options, e[i] = a, Be(n, a.defaults);
|
|
701
701
|
}
|
|
702
702
|
}), e.options) if (e.options.hasOwnProperty(i)) {
|
|
703
703
|
var a = this.modifyOption(e, i, e.options[i]);
|
|
@@ -706,18 +706,18 @@ var wt = [], Tt = { initializeByDefault: !0 }, Et = {
|
|
|
706
706
|
},
|
|
707
707
|
getEventProperties: function(e, t) {
|
|
708
708
|
var n = {};
|
|
709
|
-
return
|
|
710
|
-
typeof r.eventProperties == "function" &&
|
|
709
|
+
return Tt.forEach(function(r) {
|
|
710
|
+
typeof r.eventProperties == "function" && Be(n, r.eventProperties.call(t[r.pluginName], e));
|
|
711
711
|
}), n;
|
|
712
712
|
},
|
|
713
713
|
modifyOption: function(e, t, n) {
|
|
714
714
|
var r;
|
|
715
|
-
return
|
|
715
|
+
return Tt.forEach(function(i) {
|
|
716
716
|
e[i.pluginName] && i.optionListeners && typeof i.optionListeners[t] == "function" && (r = i.optionListeners[t].call(e[i.pluginName], n));
|
|
717
717
|
}), r;
|
|
718
718
|
}
|
|
719
719
|
};
|
|
720
|
-
function
|
|
720
|
+
function Ot(e) {
|
|
721
721
|
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;
|
|
722
722
|
if (t ||= n && n[B], t) {
|
|
723
723
|
var h, g = t.options, _ = "on" + r.charAt(0).toUpperCase() + r.substr(1);
|
|
@@ -725,37 +725,37 @@ function Dt(e) {
|
|
|
725
725
|
bubbles: !0,
|
|
726
726
|
cancelable: !0
|
|
727
727
|
}) : (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;
|
|
728
|
-
var v =
|
|
728
|
+
var v = M(M({}, m), Dt.getEventProperties(r, t));
|
|
729
729
|
for (var y in v) h[y] = v[y];
|
|
730
730
|
n && n.dispatchEvent(h), g[_] && g[_].call(t, h);
|
|
731
731
|
}
|
|
732
732
|
}
|
|
733
|
-
var
|
|
734
|
-
var n = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : {}, r = n.evt, i = He(n,
|
|
735
|
-
|
|
733
|
+
var kt = ["evt"], V = function(e, t) {
|
|
734
|
+
var n = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : {}, r = n.evt, i = He(n, kt);
|
|
735
|
+
Dt.pluginEvent.bind(Q)(e, t, M({
|
|
736
736
|
dragEl: U,
|
|
737
737
|
parentEl: W,
|
|
738
738
|
ghostEl: G,
|
|
739
739
|
rootEl: K,
|
|
740
|
-
nextEl:
|
|
741
|
-
lastDownEl:
|
|
740
|
+
nextEl: At,
|
|
741
|
+
lastDownEl: jt,
|
|
742
742
|
cloneEl: q,
|
|
743
|
-
cloneHidden:
|
|
744
|
-
dragStarted:
|
|
743
|
+
cloneHidden: Mt,
|
|
744
|
+
dragStarted: Gt,
|
|
745
745
|
putSortable: Y,
|
|
746
746
|
activeSortable: Q.active,
|
|
747
747
|
originalEvent: r,
|
|
748
|
-
oldIndex:
|
|
749
|
-
oldDraggableIndex:
|
|
748
|
+
oldIndex: Nt,
|
|
749
|
+
oldDraggableIndex: Pt,
|
|
750
750
|
newIndex: J,
|
|
751
|
-
newDraggableIndex:
|
|
752
|
-
hideGhostForTarget:
|
|
753
|
-
unhideGhostForTarget:
|
|
751
|
+
newDraggableIndex: Ft,
|
|
752
|
+
hideGhostForTarget: un,
|
|
753
|
+
unhideGhostForTarget: dn,
|
|
754
754
|
cloneNowHidden: function() {
|
|
755
|
-
|
|
755
|
+
Mt = !0;
|
|
756
756
|
},
|
|
757
757
|
cloneNowShown: function() {
|
|
758
|
-
|
|
758
|
+
Mt = !1;
|
|
759
759
|
},
|
|
760
760
|
dispatchSortableEvent: function(e) {
|
|
761
761
|
H({
|
|
@@ -767,45 +767,45 @@ var Ot = ["evt"], V = function(e, t) {
|
|
|
767
767
|
}, i));
|
|
768
768
|
};
|
|
769
769
|
function H(e) {
|
|
770
|
-
|
|
770
|
+
Ot(M({
|
|
771
771
|
putSortable: Y,
|
|
772
772
|
cloneEl: q,
|
|
773
773
|
targetEl: U,
|
|
774
774
|
rootEl: K,
|
|
775
|
-
oldIndex:
|
|
776
|
-
oldDraggableIndex:
|
|
775
|
+
oldIndex: Nt,
|
|
776
|
+
oldDraggableIndex: Pt,
|
|
777
777
|
newIndex: J,
|
|
778
|
-
newDraggableIndex:
|
|
778
|
+
newDraggableIndex: Ft
|
|
779
779
|
}, e));
|
|
780
780
|
}
|
|
781
|
-
var U, W, G, K,
|
|
782
|
-
if (
|
|
781
|
+
var U, W, G, K, At, jt, q, Mt, Nt, J, Pt, Ft, It, Y, Lt = !1, Rt = !1, zt = [], Bt, X, Vt, Ht, Ut, Wt, Gt, Kt, qt, Jt = !1, Yt = !1, Xt, Z, Zt = [], Qt = !1, $t = [], en = typeof document < "u", tn = $e, nn = Xe || Ye ? "cssFloat" : "float", rn = en && !et && !$e && "draggable" in document.createElement("div"), an = function() {
|
|
782
|
+
if (en) {
|
|
783
783
|
if (Ye) return !1;
|
|
784
784
|
var e = document.createElement("x");
|
|
785
785
|
return e.style.cssText = "pointer-events:auto", e.style.pointerEvents === "auto";
|
|
786
786
|
}
|
|
787
|
-
}(),
|
|
788
|
-
var n =
|
|
787
|
+
}(), on = function(e, t) {
|
|
788
|
+
var n = L(e), r = parseInt(n.width) - parseInt(n.paddingLeft) - parseInt(n.paddingRight) - parseInt(n.borderLeftWidth) - parseInt(n.borderRightWidth), i = lt(e, 0, t), a = lt(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;
|
|
789
789
|
if (n.display === "flex") return n.flexDirection === "column" || n.flexDirection === "column-reverse" ? "vertical" : "horizontal";
|
|
790
790
|
if (n.display === "grid") return n.gridTemplateColumns.split(" ").length <= 1 ? "vertical" : "horizontal";
|
|
791
791
|
if (i && o.float && o.float !== "none") {
|
|
792
792
|
var u = o.float === "left" ? "left" : "right";
|
|
793
793
|
return a && (s.clear === "both" || s.clear === u) ? "vertical" : "horizontal";
|
|
794
794
|
}
|
|
795
|
-
return i && (o.display === "block" || o.display === "flex" || o.display === "table" || o.display === "grid" || c >= r && n[
|
|
796
|
-
},
|
|
795
|
+
return i && (o.display === "block" || o.display === "flex" || o.display === "table" || o.display === "grid" || c >= r && n[nn] === "none" || a && n[nn] === "none" && c + l > r) ? "vertical" : "horizontal";
|
|
796
|
+
}, sn = function(e, t, n) {
|
|
797
797
|
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;
|
|
798
798
|
return r === o || i === s || r + a / 2 === o + c / 2;
|
|
799
|
-
},
|
|
799
|
+
}, cn = function(e, t) {
|
|
800
800
|
var n;
|
|
801
|
-
return
|
|
801
|
+
return zt.some(function(r) {
|
|
802
802
|
var i = r[B].options.emptyInsertThreshold;
|
|
803
|
-
if (!(!i ||
|
|
803
|
+
if (!(!i || ut(r))) {
|
|
804
804
|
var a = R(r), o = e >= a.left - i && e <= a.right + i, s = t >= a.top - i && t <= a.bottom + i;
|
|
805
805
|
if (o && s) return n = r;
|
|
806
806
|
}
|
|
807
807
|
}), n;
|
|
808
|
-
},
|
|
808
|
+
}, ln = function(e) {
|
|
809
809
|
function t(e, n) {
|
|
810
810
|
return function(r, i, a, o) {
|
|
811
811
|
var s = r.options.group.name && i.options.group.name && r.options.group.name === i.options.group.name;
|
|
@@ -819,30 +819,30 @@ var U, W, G, K, kt, At, q, jt, Mt, J, Nt, Pt, Ft, Y, It = !1, Lt = !1, Rt = [],
|
|
|
819
819
|
}
|
|
820
820
|
var n = {}, r = e.group;
|
|
821
821
|
(!r || Ke(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;
|
|
822
|
-
}, ln = function() {
|
|
823
|
-
!rn && G && I(G, "display", "none");
|
|
824
822
|
}, un = function() {
|
|
825
|
-
!
|
|
823
|
+
!an && G && L(G, "display", "none");
|
|
824
|
+
}, dn = function() {
|
|
825
|
+
!an && G && L(G, "display", "");
|
|
826
826
|
};
|
|
827
|
-
|
|
828
|
-
if (
|
|
827
|
+
en && !et && document.addEventListener("click", function(e) {
|
|
828
|
+
if (Rt) return e.preventDefault(), e.stopPropagation && e.stopPropagation(), e.stopImmediatePropagation && e.stopImmediatePropagation(), Rt = !1, !1;
|
|
829
829
|
}, !0);
|
|
830
|
-
var
|
|
830
|
+
var fn = function(e) {
|
|
831
831
|
if (U) {
|
|
832
832
|
e = e.touches ? e.touches[0] : e;
|
|
833
|
-
var t =
|
|
833
|
+
var t = cn(e.clientX, e.clientY);
|
|
834
834
|
if (t) {
|
|
835
835
|
var n = {};
|
|
836
836
|
for (var r in e) e.hasOwnProperty(r) && (n[r] = e[r]);
|
|
837
837
|
n.target = n.rootEl = t, n.preventDefault = void 0, n.stopPropagation = void 0, t[B]._onDragOver(n);
|
|
838
838
|
}
|
|
839
839
|
}
|
|
840
|
-
},
|
|
840
|
+
}, pn = function(e) {
|
|
841
841
|
U && U.parentNode[B]._isOutsideThisEl(e.target);
|
|
842
842
|
};
|
|
843
843
|
function Q(e, t) {
|
|
844
844
|
if (!(e && e.nodeType && e.nodeType === 1)) throw `Sortable: \`el\` must be an HTMLElement, not ${{}.toString.call(e)}`;
|
|
845
|
-
this.el = e, this.options = t =
|
|
845
|
+
this.el = e, this.options = t = Be({}, t), e[B] = this;
|
|
846
846
|
var n = {
|
|
847
847
|
group: null,
|
|
848
848
|
sort: !0,
|
|
@@ -855,7 +855,7 @@ function Q(e, t) {
|
|
|
855
855
|
invertedSwapThreshold: null,
|
|
856
856
|
removeCloneOnHide: !0,
|
|
857
857
|
direction: function() {
|
|
858
|
-
return
|
|
858
|
+
return on(e, this.options);
|
|
859
859
|
},
|
|
860
860
|
ghostClass: "sortable-ghost",
|
|
861
861
|
chosenClass: "sortable-chosen",
|
|
@@ -885,14 +885,14 @@ function Q(e, t) {
|
|
|
885
885
|
supportPointer: Q.supportPointer !== !1 && "PointerEvent" in window && (!Qe || $e),
|
|
886
886
|
emptyInsertThreshold: 5
|
|
887
887
|
};
|
|
888
|
-
for (var r in
|
|
889
|
-
for (var i in
|
|
890
|
-
this.nativeDraggable = t.forceFallback ? !1 :
|
|
888
|
+
for (var r in Dt.initializePlugins(this, e, n), n) !(r in t) && (t[r] = n[r]);
|
|
889
|
+
for (var i in ln(t), this) i.charAt(0) === "_" && typeof this[i] == "function" && (this[i] = this[i].bind(this));
|
|
890
|
+
this.nativeDraggable = t.forceFallback ? !1 : rn, 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)), zt.push(this.el), t.store && t.store.get && this.sort(t.store.get(this) || []), Be(this, St());
|
|
891
891
|
}
|
|
892
892
|
Q.prototype = {
|
|
893
893
|
constructor: Q,
|
|
894
894
|
_isOutsideThisEl: function(e) {
|
|
895
|
-
!this.el.contains(e) && e !== this.el && (
|
|
895
|
+
!this.el.contains(e) && e !== this.el && (Kt = null);
|
|
896
896
|
},
|
|
897
897
|
_getDirection: function(e, t) {
|
|
898
898
|
return typeof this.options.direction == "function" ? this.options.direction.call(this, e, t, U) : this.options.direction;
|
|
@@ -900,8 +900,8 @@ Q.prototype = {
|
|
|
900
900
|
_onTapStart: function(e) {
|
|
901
901
|
if (e.cancelable) {
|
|
902
902
|
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;
|
|
903
|
-
if (
|
|
904
|
-
if (
|
|
903
|
+
if (Cn(n), !U && !(/mousedown|pointerdown/.test(a) && e.button !== 0 || r.disabled) && !c.isContentEditable && !(!this.nativeDraggable && Qe && s && s.tagName.toUpperCase() === "SELECT") && (s = F(s, r.draggable, n, !1), !(s && s.animated) && jt !== s)) {
|
|
904
|
+
if (Nt = z(s), Pt = z(s, r.draggable), typeof l == "function") {
|
|
905
905
|
if (l.call(this, e, s, this)) {
|
|
906
906
|
H({
|
|
907
907
|
sortable: t,
|
|
@@ -914,7 +914,7 @@ Q.prototype = {
|
|
|
914
914
|
return;
|
|
915
915
|
}
|
|
916
916
|
} else if (l && (l = l.split(",").some(function(r) {
|
|
917
|
-
if (r =
|
|
917
|
+
if (r = F(c, r.trim(), n, !1), r) return H({
|
|
918
918
|
sortable: t,
|
|
919
919
|
rootEl: r,
|
|
920
920
|
name: "filter",
|
|
@@ -926,7 +926,7 @@ Q.prototype = {
|
|
|
926
926
|
i && e.preventDefault();
|
|
927
927
|
return;
|
|
928
928
|
}
|
|
929
|
-
r.handle && !
|
|
929
|
+
r.handle && !F(c, r.handle, n, !1) || this._prepareDragStart(e, o, s);
|
|
930
930
|
}
|
|
931
931
|
}
|
|
932
932
|
},
|
|
@@ -934,11 +934,11 @@ Q.prototype = {
|
|
|
934
934
|
var r = this, i = r.el, a = r.options, o = i.ownerDocument, s;
|
|
935
935
|
if (n && !U && n.parentNode === i) {
|
|
936
936
|
var c = R(n);
|
|
937
|
-
if (K = i, U = n, W = U.parentNode,
|
|
937
|
+
if (K = i, U = n, W = U.parentNode, At = U.nextSibling, jt = n, It = a.group, Q.dragged = U, Bt = {
|
|
938
938
|
target: U,
|
|
939
939
|
clientX: (t || e).clientX,
|
|
940
940
|
clientY: (t || e).clientY
|
|
941
|
-
},
|
|
941
|
+
}, Ut = Bt.clientX - c.left, Wt = Bt.clientY - c.top, this._lastX = (t || e).clientX, this._lastY = (t || e).clientY, U.style["will-change"] = "all", s = function() {
|
|
942
942
|
if (V("delayEnded", r, { evt: e }), Q.eventCanceled) {
|
|
943
943
|
r._onDrop();
|
|
944
944
|
return;
|
|
@@ -947,15 +947,15 @@ Q.prototype = {
|
|
|
947
947
|
sortable: r,
|
|
948
948
|
name: "choose",
|
|
949
949
|
originalEvent: e
|
|
950
|
-
}),
|
|
950
|
+
}), I(U, a.chosenClass, !0);
|
|
951
951
|
}, a.ignore.split(",").forEach(function(e) {
|
|
952
|
-
ot(U, e.trim(),
|
|
953
|
-
}),
|
|
952
|
+
ot(U, e.trim(), gn);
|
|
953
|
+
}), N(o, "dragover", fn), N(o, "mousemove", fn), N(o, "touchmove", fn), 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)), Ze && this.nativeDraggable && (this.options.touchStartThreshold = 4, U.draggable = !0), V("delayStart", this, { evt: e }), a.delay && (!a.delayOnTouchOnly || t) && (!this.nativeDraggable || !(Xe || Ye))) {
|
|
954
954
|
if (Q.eventCanceled) {
|
|
955
955
|
this._onDrop();
|
|
956
956
|
return;
|
|
957
957
|
}
|
|
958
|
-
a.supportPointer ? (
|
|
958
|
+
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);
|
|
959
959
|
} else s();
|
|
960
960
|
}
|
|
961
961
|
},
|
|
@@ -964,25 +964,25 @@ Q.prototype = {
|
|
|
964
964
|
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();
|
|
965
965
|
},
|
|
966
966
|
_disableDelayedDrag: function() {
|
|
967
|
-
U &&
|
|
967
|
+
U && gn(U), clearTimeout(this._dragStartTimer), this._disableDelayedDragEvents();
|
|
968
968
|
},
|
|
969
969
|
_disableDelayedDragEvents: function() {
|
|
970
970
|
var e = this.el.ownerDocument;
|
|
971
|
-
|
|
971
|
+
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);
|
|
972
972
|
},
|
|
973
973
|
_triggerDragStart: function(e, t) {
|
|
974
|
-
t ||= e.pointerType == "touch" && e, !this.nativeDraggable || t ? this.options.supportPointer ?
|
|
974
|
+
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));
|
|
975
975
|
try {
|
|
976
|
-
document.selection ?
|
|
976
|
+
document.selection ? wn(function() {
|
|
977
977
|
document.selection.empty();
|
|
978
978
|
}) : window.getSelection().removeAllRanges();
|
|
979
979
|
} catch {}
|
|
980
980
|
},
|
|
981
981
|
_dragStarted: function(e, t) {
|
|
982
|
-
if (
|
|
983
|
-
V("dragStarted", this, { evt: t }), this.nativeDraggable &&
|
|
982
|
+
if (Lt = !1, K && U) {
|
|
983
|
+
V("dragStarted", this, { evt: t }), this.nativeDraggable && N(document, "dragover", pn);
|
|
984
984
|
var n = this.options;
|
|
985
|
-
!e &&
|
|
985
|
+
!e && I(U, n.dragClass, !1), I(U, n.ghostClass, !0), Q.active = this, e && this._appendGhost(), H({
|
|
986
986
|
sortable: this,
|
|
987
987
|
name: "start",
|
|
988
988
|
originalEvent: t
|
|
@@ -991,7 +991,7 @@ Q.prototype = {
|
|
|
991
991
|
},
|
|
992
992
|
_emulateDragOver: function() {
|
|
993
993
|
if (X) {
|
|
994
|
-
this._lastX = X.clientX, this._lastY = X.clientY,
|
|
994
|
+
this._lastX = X.clientX, this._lastY = X.clientY, un();
|
|
995
995
|
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;
|
|
996
996
|
if (U.parentNode[B]._isOutsideThisEl(e), t) do {
|
|
997
997
|
if (t[B]) {
|
|
@@ -1005,18 +1005,18 @@ Q.prototype = {
|
|
|
1005
1005
|
}
|
|
1006
1006
|
e = t;
|
|
1007
1007
|
} while (t = rt(t));
|
|
1008
|
-
|
|
1008
|
+
dn();
|
|
1009
1009
|
}
|
|
1010
1010
|
},
|
|
1011
1011
|
_onTouchMove: function(e) {
|
|
1012
|
-
if (
|
|
1013
|
-
var t = this.options, n = t.fallbackTolerance, r = t.fallbackOffset, i = e.touches ? e.touches[0] : e, a = G && at(G, !0), o = G && a && a.a, s = G && a && a.d, c =
|
|
1014
|
-
if (!Q.active && !
|
|
1012
|
+
if (Bt) {
|
|
1013
|
+
var t = this.options, n = t.fallbackTolerance, r = t.fallbackOffset, i = e.touches ? e.touches[0] : e, a = G && at(G, !0), o = G && a && a.a, s = G && a && a.d, c = tn && Z && dt(Z), l = (i.clientX - Bt.clientX + r.x) / (o || 1) + (c ? c[0] - Zt[0] : 0) / (o || 1), u = (i.clientY - Bt.clientY + r.y) / (s || 1) + (c ? c[1] - Zt[1] : 0) / (s || 1);
|
|
1014
|
+
if (!Q.active && !Lt) {
|
|
1015
1015
|
if (n && Math.max(Math.abs(i.clientX - this._lastX), Math.abs(i.clientY - this._lastY)) < n) return;
|
|
1016
1016
|
this._onDragStart(e, !0);
|
|
1017
1017
|
}
|
|
1018
1018
|
if (G) {
|
|
1019
|
-
a ? (a.e += l - (
|
|
1019
|
+
a ? (a.e += l - (Vt || 0), a.f += u - (Ht || 0)) : a = {
|
|
1020
1020
|
a: 1,
|
|
1021
1021
|
b: 0,
|
|
1022
1022
|
c: 0,
|
|
@@ -1025,19 +1025,19 @@ Q.prototype = {
|
|
|
1025
1025
|
f: u
|
|
1026
1026
|
};
|
|
1027
1027
|
var d = `matrix(${a.a},${a.b},${a.c},${a.d},${a.e},${a.f})`;
|
|
1028
|
-
|
|
1028
|
+
L(G, "webkitTransform", d), L(G, "mozTransform", d), L(G, "msTransform", d), L(G, "transform", d), Vt = l, Ht = u, X = i;
|
|
1029
1029
|
}
|
|
1030
1030
|
e.cancelable && e.preventDefault();
|
|
1031
1031
|
}
|
|
1032
1032
|
},
|
|
1033
1033
|
_appendGhost: function() {
|
|
1034
1034
|
if (!G) {
|
|
1035
|
-
var e = this.options.fallbackOnBody ? document.body : K, t = R(U, !0,
|
|
1036
|
-
if (
|
|
1037
|
-
for (Z = e;
|
|
1038
|
-
Z !== document.body && Z !== document.documentElement ? (Z === document && (Z =
|
|
1035
|
+
var e = this.options.fallbackOnBody ? document.body : K, t = R(U, !0, tn, !0, e), n = this.options;
|
|
1036
|
+
if (tn) {
|
|
1037
|
+
for (Z = e; L(Z, "position") === "static" && L(Z, "transform") === "none" && Z !== document;) Z = Z.parentNode;
|
|
1038
|
+
Z !== document.body && Z !== document.documentElement ? (Z === document && (Z = st()), t.top += Z.scrollTop, t.left += Z.scrollLeft) : Z = st(), Zt = dt(Z);
|
|
1039
1039
|
}
|
|
1040
|
-
G = U.cloneNode(!0),
|
|
1040
|
+
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", tn ? "absolute" : "fixed"), L(G, "zIndex", "100000"), L(G, "pointerEvents", "none"), Q.ghost = G, e.appendChild(G), L(G, "transform-origin", Ut / parseInt(G.style.width) * 100 + "% " + Wt / parseInt(G.style.height) * 100 + "%");
|
|
1041
1041
|
}
|
|
1042
1042
|
},
|
|
1043
1043
|
_onDragStart: function(e, t) {
|
|
@@ -1046,18 +1046,18 @@ Q.prototype = {
|
|
|
1046
1046
|
this._onDrop();
|
|
1047
1047
|
return;
|
|
1048
1048
|
}
|
|
1049
|
-
V("setupClone", this), Q.eventCanceled || (q =
|
|
1049
|
+
V("setupClone", this), Q.eventCanceled || (q = bt(U), q.removeAttribute("id"), q.draggable = !1, q.style["will-change"] = "", this._hideClone(), I(q, this.options.chosenClass, !1), Q.clone = q), n.cloneId = wn(function() {
|
|
1050
1050
|
V("clone", n), !Q.eventCanceled && (n.options.removeCloneOnHide || K.insertBefore(q, U), n._hideClone(), H({
|
|
1051
1051
|
sortable: n,
|
|
1052
1052
|
name: "clone"
|
|
1053
1053
|
}));
|
|
1054
|
-
}), !t &&
|
|
1054
|
+
}), !t && I(U, i.dragClass, !0), t ? (Rt = !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)")), Lt = !0, n._dragStartId = wn(n._dragStarted.bind(n, t, e)), N(document, "selectstart", n), Gt = !0, window.getSelection().removeAllRanges(), Qe && L(document.body, "user-select", "none");
|
|
1055
1055
|
},
|
|
1056
1056
|
_onDragOver: function(e) {
|
|
1057
|
-
var t = this.el, n = e.target, r, i, a, o = this.options, s = o.group, c = Q.active, l =
|
|
1058
|
-
if (
|
|
1057
|
+
var t = this.el, n = e.target, r, i, a, o = this.options, s = o.group, c = Q.active, l = It === s, u = o.sort, d = Y || c, f, p = this, m = !1;
|
|
1058
|
+
if (Qt) return;
|
|
1059
1059
|
function h(o, s) {
|
|
1060
|
-
V(o, p,
|
|
1060
|
+
V(o, p, M({
|
|
1061
1061
|
evt: e,
|
|
1062
1062
|
isOwner: l,
|
|
1063
1063
|
axis: f ? "vertical" : "horizontal",
|
|
@@ -1069,7 +1069,7 @@ Q.prototype = {
|
|
|
1069
1069
|
target: n,
|
|
1070
1070
|
completed: _,
|
|
1071
1071
|
onMove: function(n, i) {
|
|
1072
|
-
return
|
|
1072
|
+
return hn(K, t, U, r, n, R(n), e, i);
|
|
1073
1073
|
},
|
|
1074
1074
|
changed: v
|
|
1075
1075
|
}, s));
|
|
@@ -1078,50 +1078,50 @@ Q.prototype = {
|
|
|
1078
1078
|
h("dragOverAnimationCapture"), p.captureAnimationState(), p !== d && d.captureAnimationState();
|
|
1079
1079
|
}
|
|
1080
1080
|
function _(r) {
|
|
1081
|
-
return h("dragOverCompleted", { insertion: r }), r && (l ? c._hideClone() : c._showClone(p), p !== d && (
|
|
1081
|
+
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() {
|
|
1082
1082
|
h("dragOverAnimationComplete"), p._ignoreWhileAnimating = null;
|
|
1083
|
-
}), p !== d && (d.animateAll(), d._ignoreWhileAnimating = null)), (n === U && !U.animated || n === t && !n.animated) && (
|
|
1083
|
+
}), p !== d && (d.animateAll(), d._ignoreWhileAnimating = null)), (n === U && !U.animated || n === t && !n.animated) && (Kt = null), !o.dragoverBubble && !e.rootEl && n !== document && (U.parentNode[B]._isOutsideThisEl(e.target), !r && fn(e)), !o.dragoverBubble && e.stopPropagation && e.stopPropagation(), m = !0;
|
|
1084
1084
|
}
|
|
1085
1085
|
function v() {
|
|
1086
|
-
J = z(U),
|
|
1086
|
+
J = z(U), Ft = z(U, o.draggable), H({
|
|
1087
1087
|
sortable: p,
|
|
1088
1088
|
name: "change",
|
|
1089
1089
|
toEl: t,
|
|
1090
1090
|
newIndex: J,
|
|
1091
|
-
newDraggableIndex:
|
|
1091
|
+
newDraggableIndex: Ft,
|
|
1092
1092
|
originalEvent: e
|
|
1093
1093
|
});
|
|
1094
1094
|
}
|
|
1095
|
-
if (e.preventDefault !== void 0 && e.cancelable && e.preventDefault(), n =
|
|
1095
|
+
if (e.preventDefault !== void 0 && e.cancelable && e.preventDefault(), n = F(n, o.draggable, t, !0), h("dragOver"), Q.eventCanceled) return m;
|
|
1096
1096
|
if (U.contains(e.target) || n.animated && n.animatingX && n.animatingY || p._ignoreWhileAnimating === n) return _(!1);
|
|
1097
|
-
if (
|
|
1097
|
+
if (Rt = !1, c && !o.disabled && (l ? u || (a = W !== K) : Y === this || (this.lastPutMode = It.checkPull(this, c, U, e)) && s.checkPut(this, c, U, e))) {
|
|
1098
1098
|
if (f = this._getDirection(e, n) === "vertical", r = R(U), h("dragOverValid"), Q.eventCanceled) return m;
|
|
1099
|
-
if (a) return W = K, g(), this._hideClone(), h("revert"), Q.eventCanceled || (
|
|
1100
|
-
var y =
|
|
1101
|
-
if (!y ||
|
|
1099
|
+
if (a) return W = K, g(), this._hideClone(), h("revert"), Q.eventCanceled || (At ? K.insertBefore(U, At) : K.appendChild(U)), _(!0);
|
|
1100
|
+
var y = ut(t, o.draggable);
|
|
1101
|
+
if (!y || yn(e, f, this) && !y.animated) {
|
|
1102
1102
|
if (y === U) return _(!1);
|
|
1103
|
-
if (y && t === e.target && (n = y), n && (i = R(n)),
|
|
1104
|
-
} else if (y &&
|
|
1105
|
-
var b =
|
|
1103
|
+
if (y && t === e.target && (n = y), n && (i = R(n)), hn(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);
|
|
1104
|
+
} else if (y && vn(e, f, this)) {
|
|
1105
|
+
var b = lt(t, 0, o, !0);
|
|
1106
1106
|
if (b === U) return _(!1);
|
|
1107
|
-
if (n = b, i = R(n),
|
|
1107
|
+
if (n = b, i = R(n), hn(K, t, U, r, n, i, e, !1) !== !1) return g(), t.insertBefore(U, b), W = t, v(), _(!0);
|
|
1108
1108
|
} else if (n.parentNode === t) {
|
|
1109
1109
|
i = R(n);
|
|
1110
|
-
var x = 0,
|
|
1111
|
-
|
|
1112
|
-
var
|
|
1110
|
+
var x = 0, ee, te = U.parentNode !== t, ne = !sn(U.animated && U.toRect || r, n.animated && n.toRect || i, f), S = f ? "top" : "left", re = ct(n, "top", "top") || ct(U, "top", "top"), ie = re ? re.scrollTop : void 0;
|
|
1111
|
+
Kt !== n && (ee = i[S], Jt = !1, Yt = !ne && o.invertSwap || te), x = bn(e, n, i, f, ne ? 1 : o.swapThreshold, o.invertedSwapThreshold == null ? o.swapThreshold : o.invertedSwapThreshold, Yt, Kt === n);
|
|
1112
|
+
var C;
|
|
1113
1113
|
if (x !== 0) {
|
|
1114
|
-
var
|
|
1114
|
+
var ae = z(U);
|
|
1115
1115
|
do
|
|
1116
|
-
|
|
1117
|
-
while (
|
|
1116
|
+
ae -= x, C = W.children[ae];
|
|
1117
|
+
while (C && (L(C, "display") === "none" || C === G));
|
|
1118
1118
|
}
|
|
1119
|
-
if (x === 0 ||
|
|
1120
|
-
|
|
1121
|
-
var
|
|
1122
|
-
|
|
1123
|
-
var
|
|
1124
|
-
if (
|
|
1119
|
+
if (x === 0 || C === n) return _(!1);
|
|
1120
|
+
Kt = n, qt = x;
|
|
1121
|
+
var oe = n.nextElementSibling, w = !1;
|
|
1122
|
+
w = x === 1;
|
|
1123
|
+
var T = hn(K, t, U, r, n, i, e, w);
|
|
1124
|
+
if (T !== !1) return (T === 1 || T === -1) && (w = T === 1), Qt = !0, setTimeout(_n, 30), g(), w && !oe ? t.appendChild(U) : n.parentNode.insertBefore(U, w ? oe : n), re && yt(re, 0, ie - re.scrollTop), W = U.parentNode, ee !== void 0 && !Yt && (Xt = Math.abs(ee - R(n)[S])), v(), _(!0);
|
|
1125
1125
|
}
|
|
1126
1126
|
if (t.contains(U)) return _(!1);
|
|
1127
1127
|
}
|
|
@@ -1129,26 +1129,26 @@ Q.prototype = {
|
|
|
1129
1129
|
},
|
|
1130
1130
|
_ignoreWhileAnimating: null,
|
|
1131
1131
|
_offMoveEvents: function() {
|
|
1132
|
-
|
|
1132
|
+
P(document, "mousemove", this._onTouchMove), P(document, "touchmove", this._onTouchMove), P(document, "pointermove", this._onTouchMove), P(document, "dragover", fn), P(document, "mousemove", fn), P(document, "touchmove", fn);
|
|
1133
1133
|
},
|
|
1134
1134
|
_offUpEvents: function() {
|
|
1135
1135
|
var e = this.el.ownerDocument;
|
|
1136
|
-
|
|
1136
|
+
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);
|
|
1137
1137
|
},
|
|
1138
1138
|
_onDrop: function(e) {
|
|
1139
1139
|
var t = this.el, n = this.options;
|
|
1140
|
-
if (J = z(U),
|
|
1140
|
+
if (J = z(U), Ft = z(U, n.draggable), V("drop", this, { evt: e }), W = U && U.parentNode, J = z(U), Ft = z(U, n.draggable), Q.eventCanceled) {
|
|
1141
1141
|
this._nulling();
|
|
1142
1142
|
return;
|
|
1143
1143
|
}
|
|
1144
|
-
|
|
1144
|
+
Lt = !1, Yt = !1, Jt = !1, clearInterval(this._loopId), clearTimeout(this._dragStartTimer), Tn(this.cloneId), Tn(this._dragStartId), this.nativeDraggable && (P(document, "drop", this), P(t, "dragstart", this._onDragStart)), this._offMoveEvents(), this._offUpEvents(), Qe && L(document.body, "user-select", ""), L(U, "transform", ""), e && (Gt && (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), gn(U), U.style["will-change"] = "", Gt && !Lt && I(U, Y ? Y.options.ghostClass : this.options.ghostClass, !1), I(U, this.options.chosenClass, !1), H({
|
|
1145
1145
|
sortable: this,
|
|
1146
1146
|
name: "unchoose",
|
|
1147
1147
|
toEl: W,
|
|
1148
1148
|
newIndex: null,
|
|
1149
1149
|
newDraggableIndex: null,
|
|
1150
1150
|
originalEvent: e
|
|
1151
|
-
}), K === W ? J !==
|
|
1151
|
+
}), K === W ? J !== Nt && J >= 0 && (H({
|
|
1152
1152
|
sortable: this,
|
|
1153
1153
|
name: "update",
|
|
1154
1154
|
toEl: W,
|
|
@@ -1180,7 +1180,7 @@ Q.prototype = {
|
|
|
1180
1180
|
name: "sort",
|
|
1181
1181
|
toEl: W,
|
|
1182
1182
|
originalEvent: e
|
|
1183
|
-
})), Y && Y.save()), Q.active && ((J == null || J === -1) && (J =
|
|
1183
|
+
})), Y && Y.save()), Q.active && ((J == null || J === -1) && (J = Nt, Ft = Pt), H({
|
|
1184
1184
|
sortable: this,
|
|
1185
1185
|
name: "end",
|
|
1186
1186
|
toEl: W,
|
|
@@ -1188,11 +1188,11 @@ Q.prototype = {
|
|
|
1188
1188
|
}), this.save()))), this._nulling();
|
|
1189
1189
|
},
|
|
1190
1190
|
_nulling: function() {
|
|
1191
|
-
V("nulling", this), K = U = W = G =
|
|
1191
|
+
V("nulling", this), K = U = W = G = At = q = jt = Mt = Bt = X = Gt = J = Ft = Nt = Pt = Kt = qt = Y = It = Q.dragged = Q.ghost = Q.clone = Q.active = null;
|
|
1192
1192
|
var e = this.el;
|
|
1193
|
-
|
|
1193
|
+
$t.forEach(function(t) {
|
|
1194
1194
|
e.contains(t) && (t.checked = !0);
|
|
1195
|
-
}),
|
|
1195
|
+
}), $t.length = Vt = Ht = 0;
|
|
1196
1196
|
},
|
|
1197
1197
|
handleEvent: function(e) {
|
|
1198
1198
|
switch (e.type) {
|
|
@@ -1202,7 +1202,7 @@ Q.prototype = {
|
|
|
1202
1202
|
break;
|
|
1203
1203
|
case "dragenter":
|
|
1204
1204
|
case "dragover":
|
|
1205
|
-
U && (this._onDragOver(e),
|
|
1205
|
+
U && (this._onDragOver(e), mn(e));
|
|
1206
1206
|
break;
|
|
1207
1207
|
case "selectstart":
|
|
1208
1208
|
e.preventDefault();
|
|
@@ -1210,14 +1210,14 @@ Q.prototype = {
|
|
|
1210
1210
|
}
|
|
1211
1211
|
},
|
|
1212
1212
|
toArray: function() {
|
|
1213
|
-
for (var e = [], t, n = this.el.children, r = 0, i = n.length, a = this.options; r < i; r++) t = n[r],
|
|
1213
|
+
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) || Sn(t));
|
|
1214
1214
|
return e;
|
|
1215
1215
|
},
|
|
1216
1216
|
sort: function(e, t) {
|
|
1217
1217
|
var n = {}, r = this.el;
|
|
1218
1218
|
this.toArray().forEach(function(e, t) {
|
|
1219
1219
|
var i = r.children[t];
|
|
1220
|
-
|
|
1220
|
+
F(i, this.options.draggable, r, !1) && (n[e] = i);
|
|
1221
1221
|
}, this), t && this.captureAnimationState(), e.forEach(function(e) {
|
|
1222
1222
|
n[e] && (r.removeChild(n[e]), r.appendChild(n[e]));
|
|
1223
1223
|
}), t && this.animateAll();
|
|
@@ -1227,25 +1227,25 @@ Q.prototype = {
|
|
|
1227
1227
|
e && e.set && e.set(this);
|
|
1228
1228
|
},
|
|
1229
1229
|
closest: function(e, t) {
|
|
1230
|
-
return
|
|
1230
|
+
return F(e, t || this.options.draggable, this.el, !1);
|
|
1231
1231
|
},
|
|
1232
1232
|
option: function(e, t) {
|
|
1233
1233
|
var n = this.options;
|
|
1234
1234
|
if (t === void 0) return n[e];
|
|
1235
|
-
var r =
|
|
1236
|
-
r === void 0 ? n[e] = t : n[e] = r, e === "group" &&
|
|
1235
|
+
var r = Dt.modifyOption(this, e, t);
|
|
1236
|
+
r === void 0 ? n[e] = t : n[e] = r, e === "group" && ln(n);
|
|
1237
1237
|
},
|
|
1238
1238
|
destroy: function() {
|
|
1239
1239
|
V("destroy", this);
|
|
1240
1240
|
var e = this.el;
|
|
1241
|
-
e[B] = null,
|
|
1241
|
+
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) {
|
|
1242
1242
|
e.removeAttribute("draggable");
|
|
1243
|
-
}), this._onDrop(), this._disableDelayedDragEvents(),
|
|
1243
|
+
}), this._onDrop(), this._disableDelayedDragEvents(), zt.splice(zt.indexOf(this.el), 1), this.el = e = null;
|
|
1244
1244
|
},
|
|
1245
1245
|
_hideClone: function() {
|
|
1246
|
-
if (!
|
|
1246
|
+
if (!Mt) {
|
|
1247
1247
|
if (V("hideClone", this), Q.eventCanceled) return;
|
|
1248
|
-
|
|
1248
|
+
L(q, "display", "none"), this.options.removeCloneOnHide && q.parentNode && q.parentNode.removeChild(q), Mt = !0;
|
|
1249
1249
|
}
|
|
1250
1250
|
},
|
|
1251
1251
|
_showClone: function(e) {
|
|
@@ -1253,86 +1253,86 @@ Q.prototype = {
|
|
|
1253
1253
|
this._hideClone();
|
|
1254
1254
|
return;
|
|
1255
1255
|
}
|
|
1256
|
-
if (
|
|
1256
|
+
if (Mt) {
|
|
1257
1257
|
if (V("showClone", this), Q.eventCanceled) return;
|
|
1258
|
-
U.parentNode == K && !this.options.group.revertClone ? K.insertBefore(q, U) :
|
|
1258
|
+
U.parentNode == K && !this.options.group.revertClone ? K.insertBefore(q, U) : At ? K.insertBefore(q, At) : K.appendChild(q), this.options.group.revertClone && this.animate(U, q), L(q, "display", ""), Mt = !1;
|
|
1259
1259
|
}
|
|
1260
1260
|
}
|
|
1261
1261
|
};
|
|
1262
|
-
function
|
|
1262
|
+
function mn(e) {
|
|
1263
1263
|
e.dataTransfer && (e.dataTransfer.dropEffect = "move"), e.cancelable && e.preventDefault();
|
|
1264
1264
|
}
|
|
1265
|
-
function
|
|
1265
|
+
function hn(e, t, n, r, i, a, o, s) {
|
|
1266
1266
|
var c, l = e[B], u = l.options.onMove, d;
|
|
1267
1267
|
return window.CustomEvent && !Ye && !Xe ? c = new CustomEvent("move", {
|
|
1268
1268
|
bubbles: !0,
|
|
1269
1269
|
cancelable: !0
|
|
1270
1270
|
}) : (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;
|
|
1271
1271
|
}
|
|
1272
|
-
function
|
|
1272
|
+
function gn(e) {
|
|
1273
1273
|
e.draggable = !1;
|
|
1274
1274
|
}
|
|
1275
|
-
function
|
|
1276
|
-
|
|
1275
|
+
function _n() {
|
|
1276
|
+
Qt = !1;
|
|
1277
1277
|
}
|
|
1278
|
-
function
|
|
1279
|
-
var r = R(
|
|
1278
|
+
function vn(e, t, n) {
|
|
1279
|
+
var r = R(lt(n.el, 0, n.options, !0)), i = xt(n.el, n.options, G), a = 10;
|
|
1280
1280
|
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;
|
|
1281
1281
|
}
|
|
1282
|
-
function
|
|
1283
|
-
var r = R(
|
|
1282
|
+
function yn(e, t, n) {
|
|
1283
|
+
var r = R(ut(n.el, n.options.draggable)), i = xt(n.el, n.options, G), a = 10;
|
|
1284
1284
|
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;
|
|
1285
1285
|
}
|
|
1286
|
-
function
|
|
1286
|
+
function bn(e, t, n, r, i, a, o, s) {
|
|
1287
1287
|
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;
|
|
1288
1288
|
if (!o) {
|
|
1289
|
-
if (s &&
|
|
1290
|
-
if (!
|
|
1291
|
-
else if (
|
|
1292
|
-
} else if (c > u + l * (1 - i) / 2 && c < d - l * (1 - i) / 2) return
|
|
1289
|
+
if (s && Xt < l * i) {
|
|
1290
|
+
if (!Jt && (qt === 1 ? c > u + l * a / 2 : c < d - l * a / 2) && (Jt = !0), Jt) f = !0;
|
|
1291
|
+
else if (qt === 1 ? c < u + Xt : c > d - Xt) return -qt;
|
|
1292
|
+
} else if (c > u + l * (1 - i) / 2 && c < d - l * (1 - i) / 2) return xn(t);
|
|
1293
1293
|
}
|
|
1294
1294
|
return f ||= o, f && (c < u + l * a / 2 || c > d - l * a / 2) ? c > u + l / 2 ? 1 : -1 : 0;
|
|
1295
1295
|
}
|
|
1296
|
-
function
|
|
1296
|
+
function xn(e) {
|
|
1297
1297
|
return z(U) < z(e) ? 1 : -1;
|
|
1298
1298
|
}
|
|
1299
|
-
function
|
|
1299
|
+
function Sn(e) {
|
|
1300
1300
|
for (var t = e.tagName + e.className + e.src + e.href + e.textContent, n = t.length, r = 0; n--;) r += t.charCodeAt(n);
|
|
1301
1301
|
return r.toString(36);
|
|
1302
1302
|
}
|
|
1303
|
-
function
|
|
1304
|
-
|
|
1303
|
+
function Cn(e) {
|
|
1304
|
+
$t.length = 0;
|
|
1305
1305
|
for (var t = e.getElementsByTagName("input"), n = t.length; n--;) {
|
|
1306
1306
|
var r = t[n];
|
|
1307
|
-
r.checked &&
|
|
1307
|
+
r.checked && $t.push(r);
|
|
1308
1308
|
}
|
|
1309
1309
|
}
|
|
1310
|
-
function
|
|
1310
|
+
function wn(e) {
|
|
1311
1311
|
return setTimeout(e, 0);
|
|
1312
1312
|
}
|
|
1313
|
-
function
|
|
1313
|
+
function Tn(e) {
|
|
1314
1314
|
return clearTimeout(e);
|
|
1315
1315
|
}
|
|
1316
|
-
|
|
1317
|
-
(Q.active ||
|
|
1316
|
+
en && N(document, "touchmove", function(e) {
|
|
1317
|
+
(Q.active || Lt) && e.cancelable && e.preventDefault();
|
|
1318
1318
|
}), Q.utils = {
|
|
1319
|
-
on:
|
|
1320
|
-
off:
|
|
1321
|
-
css:
|
|
1319
|
+
on: N,
|
|
1320
|
+
off: P,
|
|
1321
|
+
css: L,
|
|
1322
1322
|
find: ot,
|
|
1323
1323
|
is: function(e, t) {
|
|
1324
|
-
return !!
|
|
1324
|
+
return !!F(e, t, e, !1);
|
|
1325
1325
|
},
|
|
1326
|
-
extend:
|
|
1327
|
-
throttle:
|
|
1328
|
-
closest:
|
|
1329
|
-
toggleClass:
|
|
1330
|
-
clone:
|
|
1326
|
+
extend: mt,
|
|
1327
|
+
throttle: _t,
|
|
1328
|
+
closest: F,
|
|
1329
|
+
toggleClass: I,
|
|
1330
|
+
clone: bt,
|
|
1331
1331
|
index: z,
|
|
1332
|
-
nextTick:
|
|
1333
|
-
cancelNextTick:
|
|
1334
|
-
detectDirection:
|
|
1335
|
-
getChild:
|
|
1332
|
+
nextTick: wn,
|
|
1333
|
+
cancelNextTick: Tn,
|
|
1334
|
+
detectDirection: on,
|
|
1335
|
+
getChild: lt,
|
|
1336
1336
|
expando: B
|
|
1337
1337
|
}, Q.get = function(e) {
|
|
1338
1338
|
return e[B];
|
|
@@ -1340,13 +1340,13 @@ $t && M(document, "touchmove", function(e) {
|
|
|
1340
1340
|
var e = [...arguments];
|
|
1341
1341
|
e[0].constructor === Array && (e = e[0]), e.forEach(function(e) {
|
|
1342
1342
|
if (!e.prototype || !e.prototype.constructor) throw `Sortable: Mounted plugin must be a constructor function, not ${{}.toString.call(e)}`;
|
|
1343
|
-
e.utils && (Q.utils =
|
|
1343
|
+
e.utils && (Q.utils = M(M({}, Q.utils), e.utils)), Dt.mount(e);
|
|
1344
1344
|
});
|
|
1345
1345
|
}, Q.create = function(e, t) {
|
|
1346
1346
|
return new Q(e, t);
|
|
1347
1347
|
}, Q.version = qe;
|
|
1348
|
-
var $ = [],
|
|
1349
|
-
function
|
|
1348
|
+
var $ = [], En, Dn, On = !1, kn, An, jn, Mn;
|
|
1349
|
+
function Nn() {
|
|
1350
1350
|
function e() {
|
|
1351
1351
|
for (var e in this.defaults = {
|
|
1352
1352
|
scroll: !0,
|
|
@@ -1359,70 +1359,70 @@ function Mn() {
|
|
|
1359
1359
|
return e.prototype = {
|
|
1360
1360
|
dragStarted: function(e) {
|
|
1361
1361
|
var t = e.originalEvent;
|
|
1362
|
-
this.sortable.nativeDraggable ?
|
|
1362
|
+
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);
|
|
1363
1363
|
},
|
|
1364
1364
|
dragOverCompleted: function(e) {
|
|
1365
1365
|
var t = e.originalEvent;
|
|
1366
1366
|
!this.options.dragOverBubble && !t.rootEl && this._handleAutoScroll(t);
|
|
1367
1367
|
},
|
|
1368
1368
|
drop: function() {
|
|
1369
|
-
this.sortable.nativeDraggable ?
|
|
1369
|
+
this.sortable.nativeDraggable ? P(document, "dragover", this._handleAutoScroll) : (P(document, "pointermove", this._handleFallbackAutoScroll), P(document, "touchmove", this._handleFallbackAutoScroll), P(document, "mousemove", this._handleFallbackAutoScroll)), Fn(), Pn(), vt();
|
|
1370
1370
|
},
|
|
1371
1371
|
nulling: function() {
|
|
1372
|
-
|
|
1372
|
+
jn = Dn = En = On = Mn = kn = An = null, $.length = 0;
|
|
1373
1373
|
},
|
|
1374
1374
|
_handleFallbackAutoScroll: function(e) {
|
|
1375
1375
|
this._handleAutoScroll(e, !0);
|
|
1376
1376
|
},
|
|
1377
1377
|
_handleAutoScroll: function(e, t) {
|
|
1378
1378
|
var n = this, r = (e.touches ? e.touches[0] : e).clientX, i = (e.touches ? e.touches[0] : e).clientY, a = document.elementFromPoint(r, i);
|
|
1379
|
-
if (
|
|
1380
|
-
|
|
1381
|
-
var o =
|
|
1382
|
-
|
|
1383
|
-
var a =
|
|
1384
|
-
a !== o && (o = a,
|
|
1385
|
-
}, 10),
|
|
1379
|
+
if (jn = e, t || this.options.forceAutoScrollFallback || Xe || Ye || Qe) {
|
|
1380
|
+
In(e, this.options, a, t);
|
|
1381
|
+
var o = pt(a, !0);
|
|
1382
|
+
On && (!Mn || r !== kn || i !== An) && (Mn && Fn(), Mn = setInterval(function() {
|
|
1383
|
+
var a = pt(document.elementFromPoint(r, i), !0);
|
|
1384
|
+
a !== o && (o = a, Pn()), In(e, n.options, a, t);
|
|
1385
|
+
}, 10), kn = r, An = i);
|
|
1386
1386
|
} else {
|
|
1387
|
-
if (!this.options.bubbleScroll ||
|
|
1388
|
-
|
|
1387
|
+
if (!this.options.bubbleScroll || pt(a, !0) === st()) {
|
|
1388
|
+
Pn();
|
|
1389
1389
|
return;
|
|
1390
1390
|
}
|
|
1391
|
-
|
|
1391
|
+
In(e, this.options, pt(a, !1), !1);
|
|
1392
1392
|
}
|
|
1393
1393
|
}
|
|
1394
|
-
},
|
|
1394
|
+
}, Be(e, {
|
|
1395
1395
|
pluginName: "scroll",
|
|
1396
1396
|
initializeByDefault: !0
|
|
1397
1397
|
});
|
|
1398
1398
|
}
|
|
1399
|
-
function
|
|
1399
|
+
function Pn() {
|
|
1400
1400
|
$.forEach(function(e) {
|
|
1401
1401
|
clearInterval(e.pid);
|
|
1402
1402
|
}), $ = [];
|
|
1403
1403
|
}
|
|
1404
|
-
function
|
|
1405
|
-
clearInterval(
|
|
1404
|
+
function Fn() {
|
|
1405
|
+
clearInterval(Mn);
|
|
1406
1406
|
}
|
|
1407
|
-
var
|
|
1407
|
+
var In = _t(function(e, t, n, r) {
|
|
1408
1408
|
if (t.scroll) {
|
|
1409
|
-
var i = (e.touches ? e.touches[0] : e).clientX, a = (e.touches ? e.touches[0] : e).clientY, o = t.scrollSensitivity, s = t.scrollSpeed, c =
|
|
1410
|
-
|
|
1411
|
-
var d = 0, f =
|
|
1409
|
+
var i = (e.touches ? e.touches[0] : e).clientX, a = (e.touches ? e.touches[0] : e).clientY, o = t.scrollSensitivity, s = t.scrollSpeed, c = st(), l = !1, u;
|
|
1410
|
+
Dn !== n && (Dn = n, Pn(), En = t.scroll, u = t.scrollFn, En === !0 && (En = pt(n, !0)));
|
|
1411
|
+
var d = 0, f = En;
|
|
1412
1412
|
do {
|
|
1413
|
-
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,
|
|
1414
|
-
p === c ? (x = y <
|
|
1415
|
-
var
|
|
1416
|
-
if (!$[d]) for (var
|
|
1417
|
-
($[d].vx !=
|
|
1418
|
-
r && this.layer === 0 && Q.active._onTouchMove(
|
|
1413
|
+
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, ie = p.scrollTop;
|
|
1414
|
+
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"));
|
|
1415
|
+
var C = x && (Math.abs(v - i) <= o && re + y < te) - (Math.abs(_ - i) <= o && !!re), ae = ee && (Math.abs(g - a) <= o && ie + b < ne) - (Math.abs(h - a) <= o && !!ie);
|
|
1416
|
+
if (!$[d]) for (var oe = 0; oe <= d; oe++) $[oe] || ($[oe] = {});
|
|
1417
|
+
($[d].vx != C || $[d].vy != ae || $[d].el !== p) && ($[d].el = p, $[d].vx = C, $[d].vy = ae, clearInterval($[d].pid), (C != 0 || ae != 0) && (l = !0, $[d].pid = setInterval(function() {
|
|
1418
|
+
r && this.layer === 0 && Q.active._onTouchMove(jn);
|
|
1419
1419
|
var t = $[this.layer].vy ? $[this.layer].vy * s : 0, n = $[this.layer].vx ? $[this.layer].vx * s : 0;
|
|
1420
|
-
typeof u == "function" && u.call(Q.dragged.parentNode[B], n, t, e,
|
|
1420
|
+
typeof u == "function" && u.call(Q.dragged.parentNode[B], n, t, e, jn, $[this.layer].el) !== "continue" || yt($[this.layer].el, n, t);
|
|
1421
1421
|
}.bind({ layer: d }), 24))), d++;
|
|
1422
|
-
} while (t.bubbleScroll && f !== c && (f =
|
|
1423
|
-
|
|
1422
|
+
} while (t.bubbleScroll && f !== c && (f = pt(f, !1)));
|
|
1423
|
+
On = l;
|
|
1424
1424
|
}
|
|
1425
|
-
}, 30),
|
|
1425
|
+
}, 30), Ln = function(e) {
|
|
1426
1426
|
var t = e.originalEvent, n = e.putSortable, r = e.dragEl, i = e.activeSortable, a = e.dispatchSortableEvent, o = e.hideGhostForTarget, s = e.unhideGhostForTarget;
|
|
1427
1427
|
if (t) {
|
|
1428
1428
|
var c = n || i;
|
|
@@ -1434,8 +1434,8 @@ var Fn = gt(function(e, t, n, r) {
|
|
|
1434
1434
|
}));
|
|
1435
1435
|
}
|
|
1436
1436
|
};
|
|
1437
|
-
function
|
|
1438
|
-
|
|
1437
|
+
function Rn() {}
|
|
1438
|
+
Rn.prototype = {
|
|
1439
1439
|
startIndex: null,
|
|
1440
1440
|
dragStart: function(e) {
|
|
1441
1441
|
this.startIndex = e.oldDraggableIndex;
|
|
@@ -1443,25 +1443,25 @@ Ln.prototype = {
|
|
|
1443
1443
|
onSpill: function(e) {
|
|
1444
1444
|
var t = e.dragEl, n = e.putSortable;
|
|
1445
1445
|
this.sortable.captureAnimationState(), n && n.captureAnimationState();
|
|
1446
|
-
var r =
|
|
1446
|
+
var r = lt(this.sortable.el, this.startIndex, this.options);
|
|
1447
1447
|
r ? this.sortable.el.insertBefore(t, r) : this.sortable.el.appendChild(t), this.sortable.animateAll(), n && n.animateAll();
|
|
1448
1448
|
},
|
|
1449
|
-
drop:
|
|
1450
|
-
},
|
|
1451
|
-
function
|
|
1452
|
-
|
|
1449
|
+
drop: Ln
|
|
1450
|
+
}, Be(Rn, { pluginName: "revertOnSpill" });
|
|
1451
|
+
function zn() {}
|
|
1452
|
+
zn.prototype = {
|
|
1453
1453
|
onSpill: function(e) {
|
|
1454
1454
|
var t = e.dragEl, n = e.putSortable || this.sortable;
|
|
1455
1455
|
n.captureAnimationState(), t.parentNode && t.parentNode.removeChild(t), n.animateAll();
|
|
1456
1456
|
},
|
|
1457
|
-
drop:
|
|
1458
|
-
},
|
|
1457
|
+
drop: Ln
|
|
1458
|
+
}, Be(zn, { pluginName: "removeOnSpill" }), Q.mount(new Nn()), Q.mount(zn, Rn);
|
|
1459
1459
|
//#endregion
|
|
1460
1460
|
//#region node_modules/@vueuse/integrations/dist/useSortable-Cc5LKbDD.js
|
|
1461
|
-
function
|
|
1461
|
+
function Bn(e, n, i = {}) {
|
|
1462
1462
|
let s, { document: c = a, watchElement: l = !1, ...u } = i, d = { onUpdate: (e) => {
|
|
1463
|
-
|
|
1464
|
-
} }, f =
|
|
1463
|
+
Un(n, e.oldIndex, e.newIndex, e);
|
|
1464
|
+
} }, f = w(() => typeof e == "string" ? c?.querySelector(e) : t(e)), p = () => {
|
|
1465
1465
|
s?.destroy(), s = void 0;
|
|
1466
1466
|
}, m = (e) => {
|
|
1467
1467
|
!e || s !== void 0 || (s = new Q(e, {
|
|
@@ -1475,7 +1475,7 @@ function zn(e, n, i = {}) {
|
|
|
1475
1475
|
if (t !== void 0) s?.option(e, t);
|
|
1476
1476
|
else return s?.option(e);
|
|
1477
1477
|
}, _;
|
|
1478
|
-
return l && typeof e != "string" ? _ =
|
|
1478
|
+
return l && typeof e != "string" ? _ = De(f, (e) => {
|
|
1479
1479
|
p(), e && m(e);
|
|
1480
1480
|
}, {
|
|
1481
1481
|
immediate: !0,
|
|
@@ -1490,26 +1490,26 @@ function zn(e, n, i = {}) {
|
|
|
1490
1490
|
option: g
|
|
1491
1491
|
};
|
|
1492
1492
|
}
|
|
1493
|
-
function
|
|
1493
|
+
function Vn(e, t, n) {
|
|
1494
1494
|
let r = e.children[n];
|
|
1495
1495
|
e.insertBefore(t, r);
|
|
1496
1496
|
}
|
|
1497
|
-
function
|
|
1497
|
+
function Hn(e) {
|
|
1498
1498
|
e.parentNode && e.parentNode.removeChild(e);
|
|
1499
1499
|
}
|
|
1500
|
-
function
|
|
1501
|
-
r != null && (
|
|
1502
|
-
let i =
|
|
1500
|
+
function Un(e, t, n, r = null) {
|
|
1501
|
+
r != null && (Hn(r.item), Vn(r.from, r.item, t));
|
|
1502
|
+
let i = pe(e), a = i ? [...we(e)] : we(e);
|
|
1503
1503
|
if (n >= 0 && n < a.length) {
|
|
1504
1504
|
let r = a.splice(t, 1)[0];
|
|
1505
|
-
|
|
1505
|
+
_e(() => {
|
|
1506
1506
|
a.splice(n, 0, r), i && (e.value = a);
|
|
1507
1507
|
});
|
|
1508
1508
|
}
|
|
1509
1509
|
}
|
|
1510
1510
|
//#endregion
|
|
1511
1511
|
//#region src/components/advance/XTableConfig.vue?vue&type=script&setup=true&lang.tsx
|
|
1512
|
-
var
|
|
1512
|
+
var Wn = { class: "relative flex flex-1 flex-col gap-2 overflow-hidden" }, Gn = /* @__PURE__ */ O({
|
|
1513
1513
|
__name: "XTableConfig",
|
|
1514
1514
|
props: {
|
|
1515
1515
|
data: {},
|
|
@@ -1545,56 +1545,56 @@ var Un = { class: "relative flex flex-1 flex-col gap-2 overflow-hidden" }, Wn =
|
|
|
1545
1545
|
minWidth: t.width,
|
|
1546
1546
|
content: n?.content
|
|
1547
1547
|
};
|
|
1548
|
-
}), u =
|
|
1549
|
-
|
|
1548
|
+
}), u = ye();
|
|
1549
|
+
Bn(u, o, {
|
|
1550
1550
|
animation: 150,
|
|
1551
1551
|
ghostClass: "bg-(--el-color-primary-light-7)",
|
|
1552
1552
|
handle: ".cursor-grab",
|
|
1553
1553
|
onUpdate: (e) => {
|
|
1554
|
-
|
|
1554
|
+
Un(o.value, e.oldIndex, e.newIndex, e), _e(() => {
|
|
1555
1555
|
s(o.value);
|
|
1556
1556
|
});
|
|
1557
1557
|
}
|
|
1558
1558
|
});
|
|
1559
|
-
let d = () =>
|
|
1559
|
+
let d = () => D(Kn, {
|
|
1560
1560
|
data: e.data,
|
|
1561
1561
|
columns: l.value,
|
|
1562
1562
|
showOverflowTooltip: !0,
|
|
1563
1563
|
border: !0,
|
|
1564
1564
|
onHeaderDragend: (e, t, n) => {
|
|
1565
1565
|
let r = o.value.find((e) => e.code === n.columnKey);
|
|
1566
|
-
r && (r.width = e,
|
|
1566
|
+
r && (r.width = e, _e(() => {
|
|
1567
1567
|
s(o.value);
|
|
1568
1568
|
}));
|
|
1569
1569
|
},
|
|
1570
1570
|
onRowClick: (e) => a("rowClick", e)
|
|
1571
|
-
}, null), f = () =>
|
|
1571
|
+
}, null), f = () => D(te, {
|
|
1572
1572
|
trigger: "click",
|
|
1573
1573
|
width: "auto",
|
|
1574
1574
|
"popper-class": "shadow-xl bg-(--el-bg-color)"
|
|
1575
1575
|
}, {
|
|
1576
|
-
reference: () =>
|
|
1577
|
-
icon:
|
|
1576
|
+
reference: () => D(y, {
|
|
1577
|
+
icon: Re,
|
|
1578
1578
|
text: !0,
|
|
1579
1579
|
class: "absolute top-0 right-0 z-1000"
|
|
1580
1580
|
}, null),
|
|
1581
|
-
default: () =>
|
|
1581
|
+
default: () => D("div", { class: "flex flex-col gap-2" }, [D(ie, { size: "large" }, { default: () => [ue(" 表头设置 ")] }), D(ne, { "max-height": 500 }, { default: () => [D("div", {
|
|
1582
1582
|
ref: u,
|
|
1583
1583
|
class: "flex flex-col divide-y divide-[#f2f6fc]"
|
|
1584
|
-
}, { default: () => o.value.map((e) =>
|
|
1585
|
-
|
|
1584
|
+
}, { default: () => o.value.map((e) => D("div", { class: "flex w-50 items-center gap-2 py-2" }, [
|
|
1585
|
+
D(y, {
|
|
1586
1586
|
text: !0,
|
|
1587
|
-
icon:
|
|
1587
|
+
icon: Le,
|
|
1588
1588
|
type: "primary",
|
|
1589
1589
|
size: "small",
|
|
1590
1590
|
class: "cursor-grab"
|
|
1591
1591
|
}, null),
|
|
1592
|
-
|
|
1593
|
-
|
|
1592
|
+
D(ie, { class: "flex-1 overflow-ellipsis" }, { default: () => [e.label] }),
|
|
1593
|
+
D(re, {
|
|
1594
1594
|
size: "small",
|
|
1595
1595
|
modelValue: e.visible,
|
|
1596
1596
|
"onUpdate:modelValue": (t) => {
|
|
1597
|
-
e.visible = t,
|
|
1597
|
+
e.visible = t, _e(() => {
|
|
1598
1598
|
s(o.value);
|
|
1599
1599
|
});
|
|
1600
1600
|
}
|
|
@@ -1602,11 +1602,11 @@ var Un = { class: "relative flex flex-1 flex-col gap-2 overflow-hidden" }, Wn =
|
|
|
1602
1602
|
])) })] })])
|
|
1603
1603
|
});
|
|
1604
1604
|
return t({ data: e.data }), (e, t) => {
|
|
1605
|
-
let n =
|
|
1606
|
-
return
|
|
1605
|
+
let n = Se("loading");
|
|
1606
|
+
return Oe((k(), E("div", Wn, [D(f), D(d)])), [[n, A(c)]]);
|
|
1607
1607
|
};
|
|
1608
1608
|
}
|
|
1609
|
-
}),
|
|
1609
|
+
}), Kn = /* @__PURE__ */ O({
|
|
1610
1610
|
__name: "XTableFlex",
|
|
1611
1611
|
props: {
|
|
1612
1612
|
cellClassName: { type: [Function, String] },
|
|
@@ -1633,7 +1633,7 @@ var Un = { class: "relative flex flex-1 flex-col gap-2 overflow-hidden" }, Wn =
|
|
|
1633
1633
|
"selectionChange"
|
|
1634
1634
|
],
|
|
1635
1635
|
setup(e, { expose: t }) {
|
|
1636
|
-
let n =
|
|
1636
|
+
let n = Ee("container"), r = v(n), i = Ee("table");
|
|
1637
1637
|
return t({
|
|
1638
1638
|
clearSelection: () => i.value?.clearSelection(),
|
|
1639
1639
|
getSelectionRows: () => i.value?.getSelectionRows(),
|
|
@@ -1642,25 +1642,31 @@ var Un = { class: "relative flex flex-1 flex-col gap-2 overflow-hidden" }, Wn =
|
|
|
1642
1642
|
setScrollLeft: (e) => i.value?.scrollTo(e),
|
|
1643
1643
|
setScrollTop: (e) => i.value?.scrollTo(e),
|
|
1644
1644
|
toggleRowSelection: (e, t, n) => i.value?.toggleRowSelection(e, t, n)
|
|
1645
|
-
}), (e, t) => (
|
|
1645
|
+
}), (e, t) => (k(), E("div", {
|
|
1646
1646
|
ref_key: "container",
|
|
1647
1647
|
ref: n,
|
|
1648
1648
|
class: "flex-1 overflow-hidden"
|
|
1649
|
-
}, [
|
|
1649
|
+
}, [D(A(c), ge({
|
|
1650
1650
|
ref_key: "table",
|
|
1651
1651
|
ref: i
|
|
1652
1652
|
}, { ...e.$props }, {
|
|
1653
|
-
height:
|
|
1653
|
+
height: A(r).height.value,
|
|
1654
1654
|
onRowClick: t[0] ||= (t) => e.$emit("rowClick", t),
|
|
1655
1655
|
onRowDblclick: t[1] ||= (t) => e.$emit("rowDblclick", t),
|
|
1656
1656
|
onSelectionChange: t[2] ||= (t) => e.$emit("selectionChange", t),
|
|
1657
1657
|
onHeaderDragend: t[3] ||= (t, n, r) => e.$emit("headerDragend", t, n, r)
|
|
1658
1658
|
}), null, 16, ["height"])], 512));
|
|
1659
1659
|
}
|
|
1660
|
-
}),
|
|
1660
|
+
}), qn = { class: "relative flex flex-1 flex-col gap-2 overflow-hidden" }, Jn = {
|
|
1661
1661
|
key: 0,
|
|
1662
1662
|
class: "flex justify-end"
|
|
1663
|
-
}
|
|
1663
|
+
};
|
|
1664
|
+
function Yn(e) {
|
|
1665
|
+
return typeof e == "function" || Object.prototype.toString.call(e) === "[object Object]" && !me(e);
|
|
1666
|
+
}
|
|
1667
|
+
//#endregion
|
|
1668
|
+
//#region src/components/advance/XTableRequestConfigNext.vue
|
|
1669
|
+
var Xn = /* @__PURE__ */ O({
|
|
1664
1670
|
__name: "XTableRequestConfigNext",
|
|
1665
1671
|
props: {
|
|
1666
1672
|
request: { type: Function },
|
|
@@ -1694,14 +1700,14 @@ var Un = { class: "relative flex flex-1 flex-col gap-2 overflow-hidden" }, Wn =
|
|
|
1694
1700
|
"selectionChange"
|
|
1695
1701
|
],
|
|
1696
1702
|
setup(e, { expose: t, emit: r }) {
|
|
1697
|
-
let a = r, { data: o, execute: s, path: c, query:
|
|
1703
|
+
let a = r, { data: o, execute: s, path: c, query: d, isFetching: m, url: h, paging: v } = e.request(), b = JSON.stringify(d.value), x = f(async () => {
|
|
1698
1704
|
a("prepare", {
|
|
1699
1705
|
path: c.value,
|
|
1700
|
-
query:
|
|
1706
|
+
query: d.value
|
|
1701
1707
|
}), s();
|
|
1702
|
-
}),
|
|
1703
|
-
|
|
1704
|
-
}), { data:
|
|
1708
|
+
}), ee = f(async () => {
|
|
1709
|
+
d.value = JSON.parse(b), x();
|
|
1710
|
+
}), { data: C, update: ce, loading: le } = e.fields(), O = n(C, (e) => e.visible), de = i(O, (t) => {
|
|
1705
1711
|
let n = e.config[t.code];
|
|
1706
1712
|
return {
|
|
1707
1713
|
columnKey: t.code,
|
|
@@ -1710,119 +1716,122 @@ var Un = { class: "relative flex flex-1 flex-col gap-2 overflow-hidden" }, Wn =
|
|
|
1710
1716
|
minWidth: t.width,
|
|
1711
1717
|
content: n?.content
|
|
1712
1718
|
};
|
|
1713
|
-
}),
|
|
1714
|
-
|
|
1719
|
+
}), pe = n(O, (e) => e.search), me = w(() => !!pe.value.length), he = ye();
|
|
1720
|
+
Bn(he, C, {
|
|
1715
1721
|
animation: 150,
|
|
1716
1722
|
ghostClass: "bg-(--el-color-primary-light-7)",
|
|
1717
1723
|
handle: ".cursor-grab",
|
|
1718
1724
|
onUpdate: (e) => {
|
|
1719
|
-
|
|
1720
|
-
|
|
1725
|
+
Un(C.value, e.oldIndex, e.newIndex, e), _e(() => {
|
|
1726
|
+
ce(C.value);
|
|
1721
1727
|
});
|
|
1722
1728
|
}
|
|
1723
1729
|
});
|
|
1724
|
-
let fe = () =>
|
|
1725
|
-
data:
|
|
1726
|
-
disabled:
|
|
1727
|
-
content: ({ data: t }) =>
|
|
1730
|
+
let { t: ge } = ae(fe(l, void 0)), ve = () => D(u, {
|
|
1731
|
+
data: d.value,
|
|
1732
|
+
disabled: le.value || m.value,
|
|
1733
|
+
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" }, [[...pe.value.map((n) => {
|
|
1728
1734
|
let r = e.config[n.code];
|
|
1729
|
-
return
|
|
1735
|
+
return D(_, {
|
|
1730
1736
|
label: r?.label ?? n.label,
|
|
1731
|
-
content: () => r?.search?.({ query: t }) ??
|
|
1737
|
+
content: () => r?.search?.({ query: t }) ?? D(p, {
|
|
1732
1738
|
disabled: !0,
|
|
1733
1739
|
modelValue: n.code
|
|
1734
1740
|
}, null)
|
|
1735
1741
|
}, null);
|
|
1736
|
-
}),
|
|
1737
|
-
|
|
1742
|
+
}), D(_, { content: () => {
|
|
1743
|
+
let e, t;
|
|
1744
|
+
return D(S, null, { default: () => [D(ke, { action: () => x() }, Yn(e = ge("common.query")) ? e : { default: () => [e] }), D(y, { onClick: () => ee() }, Yn(t = ge("common.reset")) ? t : { default: () => [t] })] });
|
|
1745
|
+
} }, null)]])
|
|
1746
|
+
}, null), be = () => e.header?.({
|
|
1738
1747
|
data: o.value,
|
|
1739
|
-
isFetching:
|
|
1740
|
-
paging:
|
|
1748
|
+
isFetching: m.value,
|
|
1749
|
+
paging: v.value,
|
|
1741
1750
|
path: c.value,
|
|
1742
|
-
query:
|
|
1743
|
-
}),
|
|
1751
|
+
query: d.value
|
|
1752
|
+
}), xe = () => D(Kn, {
|
|
1744
1753
|
data: o.value,
|
|
1745
|
-
columns:
|
|
1754
|
+
columns: de.value,
|
|
1746
1755
|
showOverflowTooltip: !0,
|
|
1747
1756
|
border: !0,
|
|
1748
1757
|
onHeaderDragend: (e, t, n) => {
|
|
1749
|
-
let r =
|
|
1750
|
-
r && (r.width = e,
|
|
1751
|
-
|
|
1758
|
+
let r = C.value.find((e) => e.code === n.columnKey);
|
|
1759
|
+
r && (r.width = e, _e(() => {
|
|
1760
|
+
ce(C.value);
|
|
1752
1761
|
}));
|
|
1753
1762
|
}
|
|
1754
|
-
}, null),
|
|
1763
|
+
}, null), Ce = () => D(te, {
|
|
1755
1764
|
trigger: "click",
|
|
1756
1765
|
width: "auto",
|
|
1757
1766
|
"popper-class": "shadow-xl bg-(--el-bg-color)"
|
|
1758
1767
|
}, {
|
|
1759
|
-
reference: () =>
|
|
1760
|
-
icon:
|
|
1768
|
+
reference: () => D(y, {
|
|
1769
|
+
icon: Re,
|
|
1761
1770
|
text: !0,
|
|
1762
1771
|
class: "absolute top-0 right-0 z-1000"
|
|
1763
1772
|
}, null),
|
|
1764
|
-
default: () =>
|
|
1765
|
-
ref:
|
|
1773
|
+
default: () => D("div", { class: "flex flex-col gap-2" }, [D(ie, { size: "large" }, { default: () => [ue(" 表头设置 ")] }), D(ne, { "max-height": 500 }, { default: () => [D("div", {
|
|
1774
|
+
ref: he,
|
|
1766
1775
|
class: "flex flex-col divide-y divide-[#f2f6fc]"
|
|
1767
|
-
}, { default: () =>
|
|
1768
|
-
|
|
1776
|
+
}, { default: () => C.value.map((e) => D("div", { class: "flex w-50 items-center gap-2 py-2" }, [
|
|
1777
|
+
D(y, {
|
|
1769
1778
|
text: !0,
|
|
1770
|
-
icon:
|
|
1779
|
+
icon: Le,
|
|
1771
1780
|
type: "primary",
|
|
1772
1781
|
size: "small",
|
|
1773
1782
|
class: "cursor-grab"
|
|
1774
1783
|
}, null),
|
|
1775
|
-
|
|
1776
|
-
|
|
1784
|
+
D(ie, { class: "flex-1 overflow-ellipsis" }, { default: () => [e.label] }),
|
|
1785
|
+
D(re, {
|
|
1777
1786
|
size: "small",
|
|
1778
1787
|
modelValue: e.visible,
|
|
1779
1788
|
"onUpdate:modelValue": (t) => {
|
|
1780
|
-
e.visible = t,
|
|
1781
|
-
|
|
1789
|
+
e.visible = t, _e(() => {
|
|
1790
|
+
ce(C.value);
|
|
1782
1791
|
});
|
|
1783
1792
|
}
|
|
1784
1793
|
}, null)
|
|
1785
1794
|
])) })] })])
|
|
1786
|
-
}),
|
|
1795
|
+
}), we = () => D(g, {
|
|
1787
1796
|
size: "small",
|
|
1788
|
-
total:
|
|
1789
|
-
currentPage:
|
|
1790
|
-
pageSize:
|
|
1791
|
-
"onUpdate:currentPage": (e) =>
|
|
1792
|
-
"onUpdate:pageSize": (e) =>
|
|
1797
|
+
total: v.value.itemCount,
|
|
1798
|
+
currentPage: v.value.pageIndex,
|
|
1799
|
+
pageSize: v.value.pageSize,
|
|
1800
|
+
"onUpdate:currentPage": (e) => v.value.pageIndex = e ?? 0,
|
|
1801
|
+
"onUpdate:pageSize": (e) => v.value.pageSize = e ?? 0,
|
|
1793
1802
|
onCurrentChange: () => s(),
|
|
1794
1803
|
onSizeChange: () => {
|
|
1795
|
-
|
|
1804
|
+
v.value.pageIndex = 1, s();
|
|
1796
1805
|
}
|
|
1797
1806
|
}, null);
|
|
1798
1807
|
return t({
|
|
1799
|
-
search:
|
|
1808
|
+
search: x,
|
|
1800
1809
|
data: o,
|
|
1801
|
-
paging:
|
|
1802
|
-
isFetching:
|
|
1803
|
-
url:
|
|
1804
|
-
query:
|
|
1810
|
+
paging: v,
|
|
1811
|
+
isFetching: m,
|
|
1812
|
+
url: h,
|
|
1813
|
+
query: d,
|
|
1805
1814
|
path: c
|
|
1806
1815
|
}), (t, n) => {
|
|
1807
|
-
let r =
|
|
1808
|
-
return
|
|
1809
|
-
|
|
1816
|
+
let r = Se("loading");
|
|
1817
|
+
return k(), E(oe, null, [
|
|
1818
|
+
me.value ? (k(), T(ve, {
|
|
1810
1819
|
key: 0,
|
|
1811
1820
|
class: "rounded bg-(--el-fill-color-darker) px-2 pt-4"
|
|
1812
|
-
})) :
|
|
1813
|
-
|
|
1814
|
-
|
|
1815
|
-
|
|
1816
|
-
|
|
1817
|
-
e.pagination ? (
|
|
1818
|
-
])), [[r,
|
|
1821
|
+
})) : se("", !0),
|
|
1822
|
+
D(be),
|
|
1823
|
+
Oe((k(), E("div", qn, [
|
|
1824
|
+
D(Ce),
|
|
1825
|
+
D(xe),
|
|
1826
|
+
e.pagination ? (k(), E("div", Jn, [D(we)])) : se("", !0)
|
|
1827
|
+
])), [[r, A(le) || A(m)]])
|
|
1819
1828
|
], 64);
|
|
1820
1829
|
};
|
|
1821
1830
|
}
|
|
1822
|
-
}),
|
|
1831
|
+
}), Zn = { class: "flex flex-1 flex-col gap-2 overflow-hidden" }, Qn = {
|
|
1823
1832
|
key: 0,
|
|
1824
1833
|
class: "flex justify-end"
|
|
1825
|
-
},
|
|
1834
|
+
}, $n = /* @__PURE__ */ O({
|
|
1826
1835
|
__name: "XTableRequestNext",
|
|
1827
1836
|
props: {
|
|
1828
1837
|
request: { type: Function },
|
|
@@ -1874,7 +1883,7 @@ var Un = { class: "relative flex flex-1 flex-col gap-2 overflow-hidden" }, Wn =
|
|
|
1874
1883
|
query: s,
|
|
1875
1884
|
path: o
|
|
1876
1885
|
});
|
|
1877
|
-
let d = () => e.header?.({ query: s.value }), p = () =>
|
|
1886
|
+
let d = () => e.header?.({ query: s.value }), p = () => D(Kn, {
|
|
1878
1887
|
data: i.value,
|
|
1879
1888
|
columns: e.columns,
|
|
1880
1889
|
showOverflowTooltip: e.showOverflowTooltip,
|
|
@@ -1886,7 +1895,7 @@ var Un = { class: "relative flex flex-1 flex-col gap-2 overflow-hidden" }, Wn =
|
|
|
1886
1895
|
cellStyle: e.cellStyle,
|
|
1887
1896
|
rowClassName: e.rowClassName,
|
|
1888
1897
|
rowStyle: e.rowStyle
|
|
1889
|
-
}, null), m = () =>
|
|
1898
|
+
}, null), m = () => D(g, {
|
|
1890
1899
|
size: "small",
|
|
1891
1900
|
total: u.value.itemCount,
|
|
1892
1901
|
currentPage: u.value.pageIndex,
|
|
@@ -1897,18 +1906,18 @@ var Un = { class: "relative flex flex-1 flex-col gap-2 overflow-hidden" }, Wn =
|
|
|
1897
1906
|
onSizeChange: () => a()
|
|
1898
1907
|
}, null), h = () => e.footer?.({ query: s.value });
|
|
1899
1908
|
return (t, n) => {
|
|
1900
|
-
let r =
|
|
1901
|
-
return
|
|
1902
|
-
|
|
1903
|
-
|
|
1904
|
-
e.pagination ? (
|
|
1905
|
-
|
|
1906
|
-
])), [[r,
|
|
1909
|
+
let r = Se("loading");
|
|
1910
|
+
return Oe((k(), E("div", Zn, [
|
|
1911
|
+
D(d),
|
|
1912
|
+
D(p),
|
|
1913
|
+
e.pagination ? (k(), E("div", Qn, [D(m)])) : se("", !0),
|
|
1914
|
+
D(h)
|
|
1915
|
+
])), [[r, A(c)]]);
|
|
1907
1916
|
};
|
|
1908
1917
|
}
|
|
1909
|
-
}),
|
|
1918
|
+
}), er = /* @__PURE__ */ O({
|
|
1910
1919
|
__name: "XUploadOssNext",
|
|
1911
|
-
props: /* @__PURE__ */
|
|
1920
|
+
props: /* @__PURE__ */ he({
|
|
1912
1921
|
maxSize: { default: () => 50 * 1024 * 1024 },
|
|
1913
1922
|
accept: {},
|
|
1914
1923
|
disabled: { type: Boolean },
|
|
@@ -1924,7 +1933,7 @@ var Un = { class: "relative flex flex-1 flex-col gap-2 overflow-hidden" }, Wn =
|
|
|
1924
1933
|
}),
|
|
1925
1934
|
emits: ["update:modelValue"],
|
|
1926
1935
|
setup(e) {
|
|
1927
|
-
let t =
|
|
1936
|
+
let t = fe(s), n = Te(e, "modelValue"), r = w(() => typeof t?.oss == "function" ? t.oss() : t?.oss), i = ye(""), a = (e) => {
|
|
1928
1937
|
let t = `${r.value?.dir}/${Date.now()}/${e.name}`;
|
|
1929
1938
|
return i.value = `${r.value?.host}/${t}`, {
|
|
1930
1939
|
...r.value,
|
|
@@ -1932,14 +1941,14 @@ var Un = { class: "relative flex flex-1 flex-col gap-2 overflow-hidden" }, Wn =
|
|
|
1932
1941
|
OSSAccessKeyId: r.value?.accessId,
|
|
1933
1942
|
success_action_status: "200"
|
|
1934
1943
|
};
|
|
1935
|
-
}, o = (t) => (t.size > e.maxSize && x.warning("文件过大,请重新选择"), t.size < e.maxSize), c = (e, t) => n.value = Array.isArray(n.value) ? t.map((e) => e.url) : void 0, u = () => n.value = Array.isArray(n.value) ? n.value.concat(i.value) : i.value, d = (e) => window.open(e.url), f =
|
|
1944
|
+
}, o = (t) => (t.size > e.maxSize && x.warning("文件过大,请重新选择"), t.size < e.maxSize), c = (e, t) => n.value = Array.isArray(n.value) ? t.map((e) => e.url) : void 0, u = () => n.value = Array.isArray(n.value) ? n.value.concat(i.value) : i.value, d = (e) => window.open(e.url), f = w(() => [].concat(n.value ?? []).reverse().map((e) => ({
|
|
1936
1945
|
name: e.split("/").findLast(() => !0),
|
|
1937
1946
|
url: e,
|
|
1938
|
-
uid:
|
|
1939
|
-
}))), { t: p } =
|
|
1947
|
+
uid: C()
|
|
1948
|
+
}))), { t: p } = ae(fe(l, void 0));
|
|
1940
1949
|
return (t, n) => {
|
|
1941
|
-
let i =
|
|
1942
|
-
return
|
|
1950
|
+
let i = xe("XButton");
|
|
1951
|
+
return k(), T(A(m), ge({
|
|
1943
1952
|
accept: e.accept,
|
|
1944
1953
|
action: r.value?.host,
|
|
1945
1954
|
data: a,
|
|
@@ -1948,35 +1957,35 @@ var Un = { class: "relative flex flex-1 flex-col gap-2 overflow-hidden" }, Wn =
|
|
|
1948
1957
|
onRemove: c,
|
|
1949
1958
|
onSuccess: u,
|
|
1950
1959
|
onPreview: d
|
|
1951
|
-
}, { showFileList: "" }),
|
|
1952
|
-
default:
|
|
1960
|
+
}, { showFileList: "" }), le({
|
|
1961
|
+
default: j(() => [be(t.$slots, "default", {}, () => [D(i, {
|
|
1953
1962
|
type: "primary",
|
|
1954
1963
|
size: "small"
|
|
1955
1964
|
}, {
|
|
1956
|
-
default:
|
|
1965
|
+
default: j(() => [ue(Ce(A(p)("el.uploadOss.placeholder")), 1)]),
|
|
1957
1966
|
_: 1
|
|
1958
1967
|
})])]),
|
|
1959
1968
|
_: 2
|
|
1960
1969
|
}, ["tip" in t.$slots ? {
|
|
1961
1970
|
name: "tip",
|
|
1962
|
-
fn:
|
|
1971
|
+
fn: j(() => [be(t.$slots, "tip")]),
|
|
1963
1972
|
key: "0"
|
|
1964
1973
|
} : void 0]), 1040);
|
|
1965
1974
|
};
|
|
1966
1975
|
}
|
|
1967
|
-
}),
|
|
1968
|
-
XButtonAsync: () =>
|
|
1969
|
-
XButtonConfirm: () =>
|
|
1970
|
-
XCascaderRequest: () =>
|
|
1971
|
-
XFormFlex: () =>
|
|
1972
|
-
XFormRequestNext: () =>
|
|
1973
|
-
XRequest: () =>
|
|
1974
|
-
XSelectRequest: () =>
|
|
1975
|
-
XTableConfig: () =>
|
|
1976
|
-
XTableFlex: () =>
|
|
1977
|
-
XTableRequestConfigNext: () =>
|
|
1978
|
-
XTableRequestNext: () =>
|
|
1979
|
-
XUploadOssNext: () =>
|
|
1976
|
+
}), tr = /* @__PURE__ */ e({
|
|
1977
|
+
XButtonAsync: () => ke,
|
|
1978
|
+
XButtonConfirm: () => Ae,
|
|
1979
|
+
XCascaderRequest: () => je,
|
|
1980
|
+
XFormFlex: () => Ne,
|
|
1981
|
+
XFormRequestNext: () => Pe,
|
|
1982
|
+
XRequest: () => Fe,
|
|
1983
|
+
XSelectRequest: () => Ie,
|
|
1984
|
+
XTableConfig: () => Gn,
|
|
1985
|
+
XTableFlex: () => Kn,
|
|
1986
|
+
XTableRequestConfigNext: () => Xn,
|
|
1987
|
+
XTableRequestNext: () => $n,
|
|
1988
|
+
XUploadOssNext: () => er
|
|
1980
1989
|
});
|
|
1981
1990
|
//#endregion
|
|
1982
|
-
export {
|
|
1991
|
+
export { Kn as a, Fe as c, je as d, Ae as f, Xn as i, Pe as l, er as n, Gn as o, ke as p, $n as r, Ie as s, tr as t, Ne as u };
|