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