gi-component 0.0.44 → 0.0.45
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/components/descriptions/src/descriptions.vue.d.ts +1 -1
- package/dist/components/drawer/src/drawer.vue.d.ts +1 -1
- package/dist/components/flex/src/flex.vue.d.ts +2 -2
- package/dist/components/flex/src/type.d.ts +2 -2
- package/dist/components/nav-tabs/index.d.ts +4 -0
- package/dist/components/nav-tabs/src/nav-tabs.vue.d.ts +49 -0
- package/dist/components/nav-tabs/src/type.d.ts +12 -0
- package/dist/components/plus-tabs/index.d.ts +8 -0
- package/dist/components/plus-tabs/src/context.d.ts +26 -0
- package/dist/components/plus-tabs/src/plus-tab-pane.vue.d.ts +39 -0
- package/dist/components/plus-tabs/src/plus-tabs.vue.d.ts +78 -0
- package/dist/components/plus-tabs/src/type.d.ts +5 -0
- package/dist/components/tab/index.d.ts +2 -0
- package/dist/components/tab/src/context.d.ts +10 -0
- package/dist/components/tab/src/tab-item.vue.d.ts +26 -0
- package/dist/components/tab/src/tab.vue.d.ts +44 -0
- package/dist/components/tab/src/type.d.ts +21 -0
- package/dist/components/tab/src/use-nav-tabs.d.ts +2 -0
- package/dist/components/tab/src/use-tabs.d.ts +13 -0
- package/dist/components/tabs/src/tabs.vue.d.ts +2 -2
- package/dist/gi.css +1 -1
- package/dist/hooks/index.d.ts +1 -0
- package/dist/hooks/useNavTabs.d.ts +22 -0
- package/dist/index.d.ts +3 -3
- package/dist/index.es.js +263 -2023
- package/dist/index.es.js.map +1 -1
- package/dist/index.umd.js +1 -1
- package/dist/index.umd.js.map +1 -1
- package/package.json +1 -1
- package/packages/components/nav-tabs/index.ts +5 -0
- package/packages/components/nav-tabs/src/nav-tabs.vue +164 -0
- package/packages/components/nav-tabs/src/type.ts +13 -0
- package/packages/components.d.ts +34 -33
- package/packages/hooks/index.ts +1 -0
- package/packages/hooks/useNavTabs.ts +275 -0
- package/packages/index.ts +4 -0
package/dist/index.es.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { defineComponent, createElementBlock, openBlock, createElementVNode, getCurrentInstance, useAttrs, computed, createBlock, unref, mergeProps, withCtx, renderSlot, createTextVNode, toDisplayString, useSlots, normalizeClass, createCommentVNode, normalizeStyle, createVNode, createSlots, Fragment, renderList, mergeModels, useModel, ref, resolveDynamicComponent, resolveComponent, h
|
|
1
|
+
import { defineComponent, createElementBlock, openBlock, createElementVNode, getCurrentInstance, onMounted, watch, toValue, toRef, nextTick, onUnmounted, useAttrs, computed, createBlock, unref, mergeProps, withCtx, renderSlot, createTextVNode, toDisplayString, useSlots, normalizeClass, createCommentVNode, normalizeStyle, createVNode, createSlots, Fragment, renderList, mergeModels, useModel, ref, resolveDynamicComponent, resolveComponent, h, createApp, onUpdated, inject, toRefs, watchEffect, reactive, provide, normalizeProps, guardReactiveProps, useTemplateRef } from "vue";
|
|
2
2
|
import * as El from "element-plus";
|
|
3
|
-
import El__default, { ElButton, ElSpace, ElDescriptions, ElDescriptionsItem, ElDialog, ElDrawer, ElInput, ElForm, ElTable, ElTableColumn, ElFormItem, ElText, ElMessage, ElIcon, ElSplitter, ElSplitterPanel, ElRow, ElPagination,
|
|
3
|
+
import El__default, { ElButton, ElSpace, ElDescriptions, ElDescriptionsItem, ElDialog, ElDrawer, ElInput, ElForm, ElTable, ElTableColumn, ElFormItem, ElText, ElMessage, ElIcon, ElSplitter, ElSplitterPanel, ElRow, ElPagination, ElTabs, ElTabPane, ElCheckbox, ElScrollbar, ElTree, ElCheckboxGroup, ElEmpty } from "element-plus";
|
|
4
4
|
/*! Element Plus Icons Vue v2.3.2 */
|
|
5
5
|
var _sfc_main6 = /* @__PURE__ */ defineComponent({
|
|
6
6
|
name: "ArrowDown",
|
|
@@ -122,21 +122,6 @@ var _sfc_main56 = /* @__PURE__ */ defineComponent({
|
|
|
122
122
|
]));
|
|
123
123
|
}
|
|
124
124
|
}), close_default = _sfc_main56;
|
|
125
|
-
var _sfc_main74 = /* @__PURE__ */ defineComponent({
|
|
126
|
-
name: "DCaret",
|
|
127
|
-
__name: "d-caret",
|
|
128
|
-
setup(__props) {
|
|
129
|
-
return (_ctx, _cache) => (openBlock(), createElementBlock("svg", {
|
|
130
|
-
xmlns: "http://www.w3.org/2000/svg",
|
|
131
|
-
viewBox: "0 0 1024 1024"
|
|
132
|
-
}, [
|
|
133
|
-
createElementVNode("path", {
|
|
134
|
-
fill: "currentColor",
|
|
135
|
-
d: "m512 128 288 320H224zM224 576h576L512 896z"
|
|
136
|
-
})
|
|
137
|
-
]));
|
|
138
|
-
}
|
|
139
|
-
}), d_caret_default = _sfc_main74;
|
|
140
125
|
var _sfc_main80 = /* @__PURE__ */ defineComponent({
|
|
141
126
|
name: "Delete",
|
|
142
127
|
__name: "delete",
|
|
@@ -186,36 +171,6 @@ var _sfc_main94 = /* @__PURE__ */ defineComponent({
|
|
|
186
171
|
]));
|
|
187
172
|
}
|
|
188
173
|
}), edit_default = _sfc_main94;
|
|
189
|
-
var _sfc_main118 = /* @__PURE__ */ defineComponent({
|
|
190
|
-
name: "FullScreen",
|
|
191
|
-
__name: "full-screen",
|
|
192
|
-
setup(__props) {
|
|
193
|
-
return (_ctx, _cache) => (openBlock(), createElementBlock("svg", {
|
|
194
|
-
xmlns: "http://www.w3.org/2000/svg",
|
|
195
|
-
viewBox: "0 0 1024 1024"
|
|
196
|
-
}, [
|
|
197
|
-
createElementVNode("path", {
|
|
198
|
-
fill: "currentColor",
|
|
199
|
-
d: "m160 96.064 192 .192a32 32 0 0 1 0 64l-192-.192V352a32 32 0 0 1-64 0V96h64zm0 831.872V928H96V672a32 32 0 1 1 64 0v191.936l192-.192a32 32 0 1 1 0 64zM864 96.064V96h64v256a32 32 0 1 1-64 0V160.064l-192 .192a32 32 0 1 1 0-64zm0 831.872-192-.192a32 32 0 0 1 0-64l192 .192V672a32 32 0 1 1 64 0v256h-64z"
|
|
200
|
-
})
|
|
201
|
-
]));
|
|
202
|
-
}
|
|
203
|
-
}), full_screen_default = _sfc_main118;
|
|
204
|
-
var _sfc_main127 = /* @__PURE__ */ defineComponent({
|
|
205
|
-
name: "Grid",
|
|
206
|
-
__name: "grid",
|
|
207
|
-
setup(__props) {
|
|
208
|
-
return (_ctx, _cache) => (openBlock(), createElementBlock("svg", {
|
|
209
|
-
xmlns: "http://www.w3.org/2000/svg",
|
|
210
|
-
viewBox: "0 0 1024 1024"
|
|
211
|
-
}, [
|
|
212
|
-
createElementVNode("path", {
|
|
213
|
-
fill: "currentColor",
|
|
214
|
-
d: "M640 384v256H384V384zm64 0h192v256H704zm-64 512H384V704h256zm64 0V704h192v192zm-64-768v192H384V128zm64 0h192v192H704zM320 384v256H128V384zm0 512H128V704h192zm0-768v192H128V128z"
|
|
215
|
-
})
|
|
216
|
-
]));
|
|
217
|
-
}
|
|
218
|
-
}), grid_default = _sfc_main127;
|
|
219
174
|
var _sfc_main143 = /* @__PURE__ */ defineComponent({
|
|
220
175
|
name: "InfoFilled",
|
|
221
176
|
__name: "info-filled",
|
|
@@ -231,51 +186,6 @@ var _sfc_main143 = /* @__PURE__ */ defineComponent({
|
|
|
231
186
|
]));
|
|
232
187
|
}
|
|
233
188
|
}), info_filled_default = _sfc_main143;
|
|
234
|
-
var _sfc_main149 = /* @__PURE__ */ defineComponent({
|
|
235
|
-
name: "List",
|
|
236
|
-
__name: "list",
|
|
237
|
-
setup(__props) {
|
|
238
|
-
return (_ctx, _cache) => (openBlock(), createElementBlock("svg", {
|
|
239
|
-
xmlns: "http://www.w3.org/2000/svg",
|
|
240
|
-
viewBox: "0 0 1024 1024"
|
|
241
|
-
}, [
|
|
242
|
-
createElementVNode("path", {
|
|
243
|
-
fill: "currentColor",
|
|
244
|
-
d: "M704 192h160v736H160V192h160v64h384zM288 512h448v-64H288zm0 256h448v-64H288zm96-576V96h256v96z"
|
|
245
|
-
})
|
|
246
|
-
]));
|
|
247
|
-
}
|
|
248
|
-
}), list_default = _sfc_main149;
|
|
249
|
-
var _sfc_main169 = /* @__PURE__ */ defineComponent({
|
|
250
|
-
name: "Minus",
|
|
251
|
-
__name: "minus",
|
|
252
|
-
setup(__props) {
|
|
253
|
-
return (_ctx, _cache) => (openBlock(), createElementBlock("svg", {
|
|
254
|
-
xmlns: "http://www.w3.org/2000/svg",
|
|
255
|
-
viewBox: "0 0 1024 1024"
|
|
256
|
-
}, [
|
|
257
|
-
createElementVNode("path", {
|
|
258
|
-
fill: "currentColor",
|
|
259
|
-
d: "M128 544h768a32 32 0 1 0 0-64H128a32 32 0 0 0 0 64"
|
|
260
|
-
})
|
|
261
|
-
]));
|
|
262
|
-
}
|
|
263
|
-
}), minus_default = _sfc_main169;
|
|
264
|
-
var _sfc_main187 = /* @__PURE__ */ defineComponent({
|
|
265
|
-
name: "Operation",
|
|
266
|
-
__name: "operation",
|
|
267
|
-
setup(__props) {
|
|
268
|
-
return (_ctx, _cache) => (openBlock(), createElementBlock("svg", {
|
|
269
|
-
xmlns: "http://www.w3.org/2000/svg",
|
|
270
|
-
viewBox: "0 0 1024 1024"
|
|
271
|
-
}, [
|
|
272
|
-
createElementVNode("path", {
|
|
273
|
-
fill: "currentColor",
|
|
274
|
-
d: "M389.44 768a96.064 96.064 0 0 1 181.12 0H896v64H570.56a96.064 96.064 0 0 1-181.12 0H128v-64zm192-288a96.064 96.064 0 0 1 181.12 0H896v64H762.56a96.064 96.064 0 0 1-181.12 0H128v-64zm-320-288a96.064 96.064 0 0 1 181.12 0H896v64H442.56a96.064 96.064 0 0 1-181.12 0H128v-64z"
|
|
275
|
-
})
|
|
276
|
-
]));
|
|
277
|
-
}
|
|
278
|
-
}), operation_default = _sfc_main187;
|
|
279
189
|
var _sfc_main201 = /* @__PURE__ */ defineComponent({
|
|
280
190
|
name: "Plus",
|
|
281
191
|
__name: "plus",
|
|
@@ -321,21 +231,6 @@ var _sfc_main225 = /* @__PURE__ */ defineComponent({
|
|
|
321
231
|
]));
|
|
322
232
|
}
|
|
323
233
|
}), search_default = _sfc_main225;
|
|
324
|
-
var _sfc_main231 = /* @__PURE__ */ defineComponent({
|
|
325
|
-
name: "Setting",
|
|
326
|
-
__name: "setting",
|
|
327
|
-
setup(__props) {
|
|
328
|
-
return (_ctx, _cache) => (openBlock(), createElementBlock("svg", {
|
|
329
|
-
xmlns: "http://www.w3.org/2000/svg",
|
|
330
|
-
viewBox: "0 0 1024 1024"
|
|
331
|
-
}, [
|
|
332
|
-
createElementVNode("path", {
|
|
333
|
-
fill: "currentColor",
|
|
334
|
-
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"
|
|
335
|
-
})
|
|
336
|
-
]));
|
|
337
|
-
}
|
|
338
|
-
}), setting_default = _sfc_main231;
|
|
339
234
|
var _sfc_main249 = /* @__PURE__ */ defineComponent({
|
|
340
235
|
name: "SuccessFilled",
|
|
341
236
|
__name: "success-filled",
|
|
@@ -389,6 +284,146 @@ function useBemClass() {
|
|
|
389
284
|
const b = (name = "") => `${prefix}-${name ? `${name}` : ""}`;
|
|
390
285
|
return { b };
|
|
391
286
|
}
|
|
287
|
+
function normalizeSelector(value) {
|
|
288
|
+
if (value.startsWith(".") || value.startsWith("#")) {
|
|
289
|
+
return value;
|
|
290
|
+
}
|
|
291
|
+
return `.${value}`;
|
|
292
|
+
}
|
|
293
|
+
function resolveElement(target, root) {
|
|
294
|
+
if (!target) {
|
|
295
|
+
return null;
|
|
296
|
+
}
|
|
297
|
+
if (typeof target !== "string") {
|
|
298
|
+
return target;
|
|
299
|
+
}
|
|
300
|
+
const scope = root ?? document;
|
|
301
|
+
return scope.querySelector(normalizeSelector(target));
|
|
302
|
+
}
|
|
303
|
+
function scrollItemToCenter(scrollEl, activeEl, behavior = "smooth") {
|
|
304
|
+
const maxScroll = scrollEl.scrollWidth - scrollEl.clientWidth;
|
|
305
|
+
if (maxScroll <= 0) {
|
|
306
|
+
return;
|
|
307
|
+
}
|
|
308
|
+
const target = activeEl.offsetLeft - (scrollEl.clientWidth - activeEl.offsetWidth) / 2;
|
|
309
|
+
scrollEl.scrollTo({
|
|
310
|
+
left: Math.max(0, Math.min(target, maxScroll)),
|
|
311
|
+
behavior
|
|
312
|
+
});
|
|
313
|
+
}
|
|
314
|
+
function useNavTabs(options) {
|
|
315
|
+
const {
|
|
316
|
+
tabEl,
|
|
317
|
+
tabScrollEl,
|
|
318
|
+
tabItemClassName,
|
|
319
|
+
activeValue,
|
|
320
|
+
activeClassSuffix = "--active",
|
|
321
|
+
wheelSpeed = 1
|
|
322
|
+
} = options;
|
|
323
|
+
const activeClassName = `${tabItemClassName}${activeClassSuffix}`;
|
|
324
|
+
const itemSelector = normalizeSelector(tabItemClassName);
|
|
325
|
+
let rootEl = null;
|
|
326
|
+
let scrollEl = null;
|
|
327
|
+
let resizeObserver = null;
|
|
328
|
+
const resolveElements = () => {
|
|
329
|
+
var _a, _b;
|
|
330
|
+
const instanceRoot = (_b = (_a = getCurrentInstance()) == null ? void 0 : _a.proxy) == null ? void 0 : _b.$el;
|
|
331
|
+
const fallbackRoot = instanceRoot instanceof HTMLElement ? instanceRoot : document;
|
|
332
|
+
rootEl = resolveElement(toValue(tabEl), fallbackRoot);
|
|
333
|
+
scrollEl = resolveElement(toValue(tabScrollEl), rootEl ?? fallbackRoot);
|
|
334
|
+
return Boolean(rootEl && scrollEl);
|
|
335
|
+
};
|
|
336
|
+
const findActiveItem = () => {
|
|
337
|
+
if (!scrollEl) {
|
|
338
|
+
return null;
|
|
339
|
+
}
|
|
340
|
+
const activeByClass = scrollEl.querySelector(normalizeSelector(activeClassName));
|
|
341
|
+
if (activeByClass instanceof HTMLElement) {
|
|
342
|
+
return activeByClass;
|
|
343
|
+
}
|
|
344
|
+
const value = activeValue !== void 0 ? toValue(activeValue) : void 0;
|
|
345
|
+
if (value === void 0) {
|
|
346
|
+
return null;
|
|
347
|
+
}
|
|
348
|
+
const items = scrollEl.querySelectorAll(itemSelector);
|
|
349
|
+
const matched = Array.from(items).find((item) => item.dataset.value === String(value));
|
|
350
|
+
return matched ?? null;
|
|
351
|
+
};
|
|
352
|
+
const scrollToActive = (behavior = "smooth") => {
|
|
353
|
+
if (!scrollEl) {
|
|
354
|
+
return;
|
|
355
|
+
}
|
|
356
|
+
const activeItem = findActiveItem();
|
|
357
|
+
if (activeItem) {
|
|
358
|
+
scrollItemToCenter(scrollEl, activeItem, behavior);
|
|
359
|
+
}
|
|
360
|
+
};
|
|
361
|
+
const handleWheel = (event) => {
|
|
362
|
+
if (!scrollEl) {
|
|
363
|
+
return;
|
|
364
|
+
}
|
|
365
|
+
const delta = Math.abs(event.deltaX) > Math.abs(event.deltaY) ? event.deltaX : event.deltaY;
|
|
366
|
+
if (delta === 0) {
|
|
367
|
+
return;
|
|
368
|
+
}
|
|
369
|
+
event.preventDefault();
|
|
370
|
+
scrollEl.scrollLeft += delta * wheelSpeed;
|
|
371
|
+
};
|
|
372
|
+
const bindWheel = () => {
|
|
373
|
+
scrollEl == null ? void 0 : scrollEl.addEventListener("wheel", handleWheel, { passive: false });
|
|
374
|
+
};
|
|
375
|
+
const unbindWheel = () => {
|
|
376
|
+
scrollEl == null ? void 0 : scrollEl.removeEventListener("wheel", handleWheel);
|
|
377
|
+
};
|
|
378
|
+
const bindResizeObserver = () => {
|
|
379
|
+
if (!scrollEl || typeof ResizeObserver === "undefined") {
|
|
380
|
+
return;
|
|
381
|
+
}
|
|
382
|
+
resizeObserver = new ResizeObserver(() => {
|
|
383
|
+
scrollToActive("auto");
|
|
384
|
+
});
|
|
385
|
+
resizeObserver.observe(scrollEl);
|
|
386
|
+
};
|
|
387
|
+
const unbindResizeObserver = () => {
|
|
388
|
+
resizeObserver == null ? void 0 : resizeObserver.disconnect();
|
|
389
|
+
resizeObserver = null;
|
|
390
|
+
};
|
|
391
|
+
const setup = async () => {
|
|
392
|
+
await nextTick();
|
|
393
|
+
if (!resolveElements()) {
|
|
394
|
+
return;
|
|
395
|
+
}
|
|
396
|
+
bindWheel();
|
|
397
|
+
bindResizeObserver();
|
|
398
|
+
scrollToActive("auto");
|
|
399
|
+
};
|
|
400
|
+
onMounted(() => {
|
|
401
|
+
setup();
|
|
402
|
+
});
|
|
403
|
+
watch(
|
|
404
|
+
() => [toValue(tabEl), toValue(tabScrollEl)],
|
|
405
|
+
() => {
|
|
406
|
+
unbindWheel();
|
|
407
|
+
unbindResizeObserver();
|
|
408
|
+
setup();
|
|
409
|
+
}
|
|
410
|
+
);
|
|
411
|
+
if (activeValue !== void 0) {
|
|
412
|
+
watch(toRef(activeValue), () => {
|
|
413
|
+
nextTick(() => scrollToActive());
|
|
414
|
+
});
|
|
415
|
+
}
|
|
416
|
+
onUnmounted(() => {
|
|
417
|
+
unbindWheel();
|
|
418
|
+
unbindResizeObserver();
|
|
419
|
+
rootEl = null;
|
|
420
|
+
scrollEl = null;
|
|
421
|
+
});
|
|
422
|
+
return {
|
|
423
|
+
scrollToActive,
|
|
424
|
+
getScrollEl: () => scrollEl
|
|
425
|
+
};
|
|
426
|
+
}
|
|
392
427
|
const _sfc_main$l = /* @__PURE__ */ defineComponent({
|
|
393
428
|
__name: "button",
|
|
394
429
|
props: {
|
|
@@ -856,7 +891,7 @@ function createDialog() {
|
|
|
856
891
|
dialogApp.unmount();
|
|
857
892
|
container.remove();
|
|
858
893
|
};
|
|
859
|
-
return () => h
|
|
894
|
+
return () => h(_sfc_main$i, {
|
|
860
895
|
...dialogOptions.value,
|
|
861
896
|
"modelValue": visible.value,
|
|
862
897
|
"onUpdate:modelValue": (val) => visible.value = val,
|
|
@@ -889,7 +924,7 @@ function createDialog() {
|
|
|
889
924
|
info(options) {
|
|
890
925
|
return this.create({
|
|
891
926
|
...options,
|
|
892
|
-
content: () => h
|
|
927
|
+
content: () => h(DialogContent, { type: "info", content: options.content }),
|
|
893
928
|
simple: true,
|
|
894
929
|
style: { maxWidth: "420px", ...options.style },
|
|
895
930
|
lockScroll: false
|
|
@@ -898,7 +933,7 @@ function createDialog() {
|
|
|
898
933
|
success(options) {
|
|
899
934
|
return this.create({
|
|
900
935
|
...options,
|
|
901
|
-
content: () => h
|
|
936
|
+
content: () => h(DialogContent, { type: "success", content: options.content }),
|
|
902
937
|
simple: true,
|
|
903
938
|
style: { maxWidth: "420px", ...options.style },
|
|
904
939
|
lockScroll: false
|
|
@@ -907,7 +942,7 @@ function createDialog() {
|
|
|
907
942
|
warning(options) {
|
|
908
943
|
return this.create({
|
|
909
944
|
...options,
|
|
910
|
-
content: () => h
|
|
945
|
+
content: () => h(DialogContent, { type: "warning", content: options.content }),
|
|
911
946
|
simple: true,
|
|
912
947
|
style: { maxWidth: "420px", ...options.style },
|
|
913
948
|
lockScroll: false
|
|
@@ -916,7 +951,7 @@ function createDialog() {
|
|
|
916
951
|
error(options) {
|
|
917
952
|
return this.create({
|
|
918
953
|
...options,
|
|
919
|
-
content: () => h
|
|
954
|
+
content: () => h(DialogContent, { type: "error", content: options.content }),
|
|
920
955
|
simple: true,
|
|
921
956
|
style: { maxWidth: "420px", ...options.style },
|
|
922
957
|
lockScroll: false
|
|
@@ -1145,7 +1180,7 @@ function createDrawer() {
|
|
|
1145
1180
|
drawerApp.unmount();
|
|
1146
1181
|
container.remove();
|
|
1147
1182
|
};
|
|
1148
|
-
return () => h
|
|
1183
|
+
return () => h(_sfc_main$f, {
|
|
1149
1184
|
...dialogOptions.value,
|
|
1150
1185
|
"modelValue": visible.value,
|
|
1151
1186
|
"onUpdate:modelValue": (val) => visible.value = val,
|
|
@@ -1449,19 +1484,13 @@ const _sfc_main$b = /* @__PURE__ */ defineComponent({
|
|
|
1449
1484
|
setup(__props) {
|
|
1450
1485
|
const props = __props;
|
|
1451
1486
|
const { b } = useBemClass();
|
|
1452
|
-
const classNames = computed(() => [b("flex")]);
|
|
1453
|
-
const
|
|
1454
|
-
small: "8px",
|
|
1455
|
-
middle: "12px",
|
|
1456
|
-
large: "16px"
|
|
1457
|
-
};
|
|
1487
|
+
const classNames = computed(() => [b("flex"), b(`flex__size--${props.gap}`)]);
|
|
1488
|
+
const SIZE_MAP = ["small", "middle", "large"];
|
|
1458
1489
|
const resolvedGap = computed(() => {
|
|
1459
|
-
if (props.gap === void 0 || props.gap === null || props.gap === "")
|
|
1490
|
+
if (props.gap === void 0 || props.gap === null || props.gap === "" || SIZE_MAP.includes(props.gap))
|
|
1460
1491
|
return void 0;
|
|
1461
1492
|
if (typeof props.gap === "number")
|
|
1462
1493
|
return `${props.gap}px`;
|
|
1463
|
-
if (gapMap[props.gap])
|
|
1464
|
-
return gapMap[props.gap];
|
|
1465
1494
|
return String(props.gap);
|
|
1466
1495
|
});
|
|
1467
1496
|
const resolvedWrap = computed(() => {
|
|
@@ -1497,7 +1526,7 @@ const _sfc_main$b = /* @__PURE__ */ defineComponent({
|
|
|
1497
1526
|
};
|
|
1498
1527
|
}
|
|
1499
1528
|
});
|
|
1500
|
-
const Flex = /* @__PURE__ */ _export_sfc(_sfc_main$b, [["__scopeId", "data-v-
|
|
1529
|
+
const Flex = /* @__PURE__ */ _export_sfc(_sfc_main$b, [["__scopeId", "data-v-efd62aed"]]);
|
|
1501
1530
|
const GridContextInjectionKey = Symbol(
|
|
1502
1531
|
"GridContextInjectionKey"
|
|
1503
1532
|
);
|
|
@@ -2411,7 +2440,90 @@ const _sfc_main$8 = /* @__PURE__ */ defineComponent({
|
|
|
2411
2440
|
}
|
|
2412
2441
|
});
|
|
2413
2442
|
const Form = /* @__PURE__ */ _export_sfc(_sfc_main$8, [["__scopeId", "data-v-85d6c1a1"]]);
|
|
2443
|
+
const _hoisted_1$1 = ["data-value", "onClick"];
|
|
2414
2444
|
const _sfc_main$7 = /* @__PURE__ */ defineComponent({
|
|
2445
|
+
__name: "nav-tabs",
|
|
2446
|
+
props: /* @__PURE__ */ mergeModels({
|
|
2447
|
+
data: { default: () => [] },
|
|
2448
|
+
wheelSpeed: { default: 1 },
|
|
2449
|
+
activeClassSuffix: { default: "--active" }
|
|
2450
|
+
}, {
|
|
2451
|
+
"modelValue": {},
|
|
2452
|
+
"modelModifiers": {}
|
|
2453
|
+
}),
|
|
2454
|
+
emits: /* @__PURE__ */ mergeModels(["change"], ["update:modelValue"]),
|
|
2455
|
+
setup(__props, { emit: __emit }) {
|
|
2456
|
+
const model = useModel(__props, "modelValue");
|
|
2457
|
+
const props = __props;
|
|
2458
|
+
const emits = __emit;
|
|
2459
|
+
const slots = useSlots();
|
|
2460
|
+
const { b } = useBemClass();
|
|
2461
|
+
const rootRef = ref(null);
|
|
2462
|
+
const scrollRef = ref(null);
|
|
2463
|
+
const tabItemClassName = b("nav-tabs-item");
|
|
2464
|
+
useNavTabs({
|
|
2465
|
+
tabEl: rootRef,
|
|
2466
|
+
tabScrollEl: scrollRef,
|
|
2467
|
+
tabItemClassName,
|
|
2468
|
+
activeValue: model,
|
|
2469
|
+
activeClassSuffix: props.activeClassSuffix,
|
|
2470
|
+
wheelSpeed: props.wheelSpeed
|
|
2471
|
+
});
|
|
2472
|
+
function handleItemClick(item) {
|
|
2473
|
+
if (item.disabled) {
|
|
2474
|
+
return;
|
|
2475
|
+
}
|
|
2476
|
+
model.value = item.value;
|
|
2477
|
+
emits("change", item.value);
|
|
2478
|
+
}
|
|
2479
|
+
return (_ctx, _cache) => {
|
|
2480
|
+
return openBlock(), createElementBlock("div", {
|
|
2481
|
+
ref_key: "rootRef",
|
|
2482
|
+
ref: rootRef,
|
|
2483
|
+
class: normalizeClass(unref(b)("nav-tabs"))
|
|
2484
|
+
}, [
|
|
2485
|
+
unref(slots)["left-extra"] ? (openBlock(), createElementBlock("div", {
|
|
2486
|
+
key: 0,
|
|
2487
|
+
class: normalizeClass(unref(b)("nav-tabs__left"))
|
|
2488
|
+
}, [
|
|
2489
|
+
renderSlot(_ctx.$slots, "left-extra", {}, void 0, true)
|
|
2490
|
+
], 2)) : createCommentVNode("", true),
|
|
2491
|
+
createElementVNode("div", {
|
|
2492
|
+
ref_key: "scrollRef",
|
|
2493
|
+
ref: scrollRef,
|
|
2494
|
+
class: normalizeClass(unref(b)("nav-tabs__scroll"))
|
|
2495
|
+
}, [
|
|
2496
|
+
renderSlot(_ctx.$slots, "default", {
|
|
2497
|
+
data: props.data
|
|
2498
|
+
}, () => [
|
|
2499
|
+
(openBlock(true), createElementBlock(Fragment, null, renderList(props.data, (item) => {
|
|
2500
|
+
return openBlock(), createElementBlock("div", {
|
|
2501
|
+
key: item.value,
|
|
2502
|
+
class: normalizeClass([
|
|
2503
|
+
unref(b)("nav-tabs-item"),
|
|
2504
|
+
{
|
|
2505
|
+
[unref(b)("nav-tabs-item--active")]: model.value === item.value,
|
|
2506
|
+
[unref(b)("nav-tabs-item--disabled")]: item.disabled
|
|
2507
|
+
}
|
|
2508
|
+
]),
|
|
2509
|
+
"data-value": item.value,
|
|
2510
|
+
onClick: ($event) => handleItemClick(item)
|
|
2511
|
+
}, toDisplayString(item.label), 11, _hoisted_1$1);
|
|
2512
|
+
}), 128))
|
|
2513
|
+
], true)
|
|
2514
|
+
], 2),
|
|
2515
|
+
unref(slots)["right-extra"] ? (openBlock(), createElementBlock("div", {
|
|
2516
|
+
key: 1,
|
|
2517
|
+
class: normalizeClass(unref(b)("nav-tabs__right"))
|
|
2518
|
+
}, [
|
|
2519
|
+
renderSlot(_ctx.$slots, "right-extra", {}, void 0, true)
|
|
2520
|
+
], 2)) : createCommentVNode("", true)
|
|
2521
|
+
], 2);
|
|
2522
|
+
};
|
|
2523
|
+
}
|
|
2524
|
+
});
|
|
2525
|
+
const NavTabs = /* @__PURE__ */ _export_sfc(_sfc_main$7, [["__scopeId", "data-v-198d4dd6"]]);
|
|
2526
|
+
const _sfc_main$6 = /* @__PURE__ */ defineComponent({
|
|
2415
2527
|
__name: "split-button",
|
|
2416
2528
|
props: {
|
|
2417
2529
|
collapsed: { type: Boolean, default: false },
|
|
@@ -2462,8 +2574,8 @@ const _sfc_main$7 = /* @__PURE__ */ defineComponent({
|
|
|
2462
2574
|
};
|
|
2463
2575
|
}
|
|
2464
2576
|
});
|
|
2465
|
-
const SplitButton = /* @__PURE__ */ _export_sfc(_sfc_main$
|
|
2466
|
-
const _sfc_main$
|
|
2577
|
+
const SplitButton = /* @__PURE__ */ _export_sfc(_sfc_main$6, [["__scopeId", "data-v-ad431228"]]);
|
|
2578
|
+
const _sfc_main$5 = /* @__PURE__ */ defineComponent({
|
|
2467
2579
|
__name: "page-layout",
|
|
2468
2580
|
props: {
|
|
2469
2581
|
size: { default: 270 },
|
|
@@ -2569,8 +2681,8 @@ const _sfc_main$6 = /* @__PURE__ */ defineComponent({
|
|
|
2569
2681
|
};
|
|
2570
2682
|
}
|
|
2571
2683
|
});
|
|
2572
|
-
const PageLayout = /* @__PURE__ */ _export_sfc(_sfc_main$
|
|
2573
|
-
const _sfc_main$
|
|
2684
|
+
const PageLayout = /* @__PURE__ */ _export_sfc(_sfc_main$5, [["__scopeId", "data-v-a35bb713"]]);
|
|
2685
|
+
const _sfc_main$4 = /* @__PURE__ */ defineComponent({
|
|
2574
2686
|
__name: "TableColumn",
|
|
2575
2687
|
props: {
|
|
2576
2688
|
column: {}
|
|
@@ -2585,7 +2697,7 @@ const _sfc_main$5 = /* @__PURE__ */ defineComponent({
|
|
|
2585
2697
|
return openBlock(), createBlock(unref(ElTableColumn), normalizeProps(guardReactiveProps(columnProps.value)), createSlots({
|
|
2586
2698
|
default: withCtx(() => [
|
|
2587
2699
|
_ctx.column.children && _ctx.column.children.length > 0 ? (openBlock(true), createElementBlock(Fragment, { key: 0 }, renderList(_ctx.column.children, (child) => {
|
|
2588
|
-
return openBlock(), createBlock(_sfc_main$
|
|
2700
|
+
return openBlock(), createBlock(_sfc_main$4, {
|
|
2589
2701
|
key: child.prop || child.label,
|
|
2590
2702
|
column: child
|
|
2591
2703
|
}, createSlots({ _: 2 }, [
|
|
@@ -2621,7 +2733,7 @@ const _sfc_main$5 = /* @__PURE__ */ defineComponent({
|
|
|
2621
2733
|
};
|
|
2622
2734
|
}
|
|
2623
2735
|
});
|
|
2624
|
-
const _sfc_main$
|
|
2736
|
+
const _sfc_main$3 = /* @__PURE__ */ defineComponent({
|
|
2625
2737
|
__name: "table",
|
|
2626
2738
|
props: {
|
|
2627
2739
|
data: { default: () => [] },
|
|
@@ -2708,7 +2820,7 @@ const _sfc_main$4 = /* @__PURE__ */ defineComponent({
|
|
|
2708
2820
|
}), {
|
|
2709
2821
|
default: withCtx(() => [
|
|
2710
2822
|
(openBlock(true), createElementBlock(Fragment, null, renderList(props.columns, (item) => {
|
|
2711
|
-
return openBlock(), createBlock(_sfc_main$
|
|
2823
|
+
return openBlock(), createBlock(_sfc_main$4, {
|
|
2712
2824
|
key: item.prop || item.label,
|
|
2713
2825
|
column: item
|
|
2714
2826
|
}, createSlots({ _: 2 }, [
|
|
@@ -2742,1880 +2854,7 @@ const _sfc_main$4 = /* @__PURE__ */ defineComponent({
|
|
|
2742
2854
|
};
|
|
2743
2855
|
}
|
|
2744
2856
|
});
|
|
2745
|
-
const
|
|
2746
|
-
var an = Object.defineProperty;
|
|
2747
|
-
var Pe = Object.getOwnPropertySymbols;
|
|
2748
|
-
var yt = Object.prototype.hasOwnProperty, wt = Object.prototype.propertyIsEnumerable;
|
|
2749
|
-
var bt = (t, e, n) => e in t ? an(t, e, { enumerable: true, configurable: true, writable: true, value: n }) : t[e] = n, fe = (t, e) => {
|
|
2750
|
-
for (var n in e || (e = {}))
|
|
2751
|
-
yt.call(e, n) && bt(t, n, e[n]);
|
|
2752
|
-
if (Pe)
|
|
2753
|
-
for (var n of Pe(e))
|
|
2754
|
-
wt.call(e, n) && bt(t, n, e[n]);
|
|
2755
|
-
return t;
|
|
2756
|
-
};
|
|
2757
|
-
var $e = (t, e) => {
|
|
2758
|
-
var n = {};
|
|
2759
|
-
for (var o in t)
|
|
2760
|
-
yt.call(t, o) && e.indexOf(o) < 0 && (n[o] = t[o]);
|
|
2761
|
-
if (t != null && Pe)
|
|
2762
|
-
for (var o of Pe(t))
|
|
2763
|
-
e.indexOf(o) < 0 && wt.call(t, o) && (n[o] = t[o]);
|
|
2764
|
-
return n;
|
|
2765
|
-
};
|
|
2766
|
-
const Ht = "[vue-draggable-plus]: ";
|
|
2767
|
-
function mn(t) {
|
|
2768
|
-
console.warn(Ht + t);
|
|
2769
|
-
}
|
|
2770
|
-
function vn(t) {
|
|
2771
|
-
console.error(Ht + t);
|
|
2772
|
-
}
|
|
2773
|
-
function St(t, e, n) {
|
|
2774
|
-
return n >= 0 && n < t.length && t.splice(n, 0, t.splice(e, 1)[0]), t;
|
|
2775
|
-
}
|
|
2776
|
-
function bn(t) {
|
|
2777
|
-
return t.replace(/-(\w)/g, (e, n) => n ? n.toUpperCase() : "");
|
|
2778
|
-
}
|
|
2779
|
-
function yn(t) {
|
|
2780
|
-
return Object.keys(t).reduce((e, n) => (typeof t[n] != "undefined" && (e[bn(n)] = t[n]), e), {});
|
|
2781
|
-
}
|
|
2782
|
-
function Dt(t, e) {
|
|
2783
|
-
return Array.isArray(t) && t.splice(e, 1), t;
|
|
2784
|
-
}
|
|
2785
|
-
function _t(t, e, n) {
|
|
2786
|
-
return Array.isArray(t) && t.splice(e, 0, n), t;
|
|
2787
|
-
}
|
|
2788
|
-
function wn(t) {
|
|
2789
|
-
return typeof t == "undefined";
|
|
2790
|
-
}
|
|
2791
|
-
function En(t) {
|
|
2792
|
-
return typeof t == "string";
|
|
2793
|
-
}
|
|
2794
|
-
function Tt(t, e, n) {
|
|
2795
|
-
const o = t.children[n];
|
|
2796
|
-
t.insertBefore(e, o);
|
|
2797
|
-
}
|
|
2798
|
-
function Ke(t) {
|
|
2799
|
-
t.parentNode && t.parentNode.removeChild(t);
|
|
2800
|
-
}
|
|
2801
|
-
function Sn(t, e = document) {
|
|
2802
|
-
var o;
|
|
2803
|
-
let n = null;
|
|
2804
|
-
return typeof (e == null ? void 0 : e.querySelector) == "function" ? n = (o = e == null ? void 0 : e.querySelector) == null ? void 0 : o.call(e, t) : n = document.querySelector(t), n || mn(`Element not found: ${t}`), n;
|
|
2805
|
-
}
|
|
2806
|
-
function Dn(t, e, n = null) {
|
|
2807
|
-
return function(...o) {
|
|
2808
|
-
return t.apply(n, o), e.apply(n, o);
|
|
2809
|
-
};
|
|
2810
|
-
}
|
|
2811
|
-
function _n(t, e) {
|
|
2812
|
-
const n = fe({}, t);
|
|
2813
|
-
return Object.keys(e).forEach((o) => {
|
|
2814
|
-
n[o] ? n[o] = Dn(t[o], e[o]) : n[o] = e[o];
|
|
2815
|
-
}), n;
|
|
2816
|
-
}
|
|
2817
|
-
function Tn(t) {
|
|
2818
|
-
return t instanceof HTMLElement;
|
|
2819
|
-
}
|
|
2820
|
-
function Ct(t, e) {
|
|
2821
|
-
Object.keys(t).forEach((n) => {
|
|
2822
|
-
e(n, t[n]);
|
|
2823
|
-
});
|
|
2824
|
-
}
|
|
2825
|
-
function Cn(t) {
|
|
2826
|
-
return t.charCodeAt(0) === 111 && t.charCodeAt(1) === 110 && (t.charCodeAt(2) > 122 || t.charCodeAt(2) < 97);
|
|
2827
|
-
}
|
|
2828
|
-
const On = Object.assign;
|
|
2829
|
-
/**!
|
|
2830
|
-
* Sortable 1.15.2
|
|
2831
|
-
* @author RubaXa <trash@rubaxa.org>
|
|
2832
|
-
* @author owenm <owen23355@gmail.com>
|
|
2833
|
-
* @license MIT
|
|
2834
|
-
*/
|
|
2835
|
-
function Ot(t, e) {
|
|
2836
|
-
var n = Object.keys(t);
|
|
2837
|
-
if (Object.getOwnPropertySymbols) {
|
|
2838
|
-
var o = Object.getOwnPropertySymbols(t);
|
|
2839
|
-
e && (o = o.filter(function(r) {
|
|
2840
|
-
return Object.getOwnPropertyDescriptor(t, r).enumerable;
|
|
2841
|
-
})), n.push.apply(n, o);
|
|
2842
|
-
}
|
|
2843
|
-
return n;
|
|
2844
|
-
}
|
|
2845
|
-
function ne(t) {
|
|
2846
|
-
for (var e = 1; e < arguments.length; e++) {
|
|
2847
|
-
var n = arguments[e] != null ? arguments[e] : {};
|
|
2848
|
-
e % 2 ? Ot(Object(n), true).forEach(function(o) {
|
|
2849
|
-
In(t, o, n[o]);
|
|
2850
|
-
}) : Object.getOwnPropertyDescriptors ? Object.defineProperties(t, Object.getOwnPropertyDescriptors(n)) : Ot(Object(n)).forEach(function(o) {
|
|
2851
|
-
Object.defineProperty(t, o, Object.getOwnPropertyDescriptor(n, o));
|
|
2852
|
-
});
|
|
2853
|
-
}
|
|
2854
|
-
return t;
|
|
2855
|
-
}
|
|
2856
|
-
function Ye(t) {
|
|
2857
|
-
"@babel/helpers - typeof";
|
|
2858
|
-
return typeof Symbol == "function" && typeof Symbol.iterator == "symbol" ? Ye = function(e) {
|
|
2859
|
-
return typeof e;
|
|
2860
|
-
} : Ye = function(e) {
|
|
2861
|
-
return e && typeof Symbol == "function" && e.constructor === Symbol && e !== Symbol.prototype ? "symbol" : typeof e;
|
|
2862
|
-
}, Ye(t);
|
|
2863
|
-
}
|
|
2864
|
-
function In(t, e, n) {
|
|
2865
|
-
return e in t ? Object.defineProperty(t, e, {
|
|
2866
|
-
value: n,
|
|
2867
|
-
enumerable: true,
|
|
2868
|
-
configurable: true,
|
|
2869
|
-
writable: true
|
|
2870
|
-
}) : t[e] = n, t;
|
|
2871
|
-
}
|
|
2872
|
-
function ie() {
|
|
2873
|
-
return ie = Object.assign || function(t) {
|
|
2874
|
-
for (var e = 1; e < arguments.length; e++) {
|
|
2875
|
-
var n = arguments[e];
|
|
2876
|
-
for (var o in n)
|
|
2877
|
-
Object.prototype.hasOwnProperty.call(n, o) && (t[o] = n[o]);
|
|
2878
|
-
}
|
|
2879
|
-
return t;
|
|
2880
|
-
}, ie.apply(this, arguments);
|
|
2881
|
-
}
|
|
2882
|
-
function An(t, e) {
|
|
2883
|
-
if (t == null)
|
|
2884
|
-
return {};
|
|
2885
|
-
var n = {}, o = Object.keys(t), r, i;
|
|
2886
|
-
for (i = 0; i < o.length; i++)
|
|
2887
|
-
r = o[i], !(e.indexOf(r) >= 0) && (n[r] = t[r]);
|
|
2888
|
-
return n;
|
|
2889
|
-
}
|
|
2890
|
-
function xn(t, e) {
|
|
2891
|
-
if (t == null)
|
|
2892
|
-
return {};
|
|
2893
|
-
var n = An(t, e), o, r;
|
|
2894
|
-
if (Object.getOwnPropertySymbols) {
|
|
2895
|
-
var i = Object.getOwnPropertySymbols(t);
|
|
2896
|
-
for (r = 0; r < i.length; r++)
|
|
2897
|
-
o = i[r], !(e.indexOf(o) >= 0) && Object.prototype.propertyIsEnumerable.call(t, o) && (n[o] = t[o]);
|
|
2898
|
-
}
|
|
2899
|
-
return n;
|
|
2900
|
-
}
|
|
2901
|
-
var Nn = "1.15.2";
|
|
2902
|
-
function re(t) {
|
|
2903
|
-
if (typeof window != "undefined" && window.navigator)
|
|
2904
|
-
return !!/* @__PURE__ */ navigator.userAgent.match(t);
|
|
2905
|
-
}
|
|
2906
|
-
var ae = re(/(?:Trident.*rv[ :]?11\.|msie|iemobile|Windows Phone)/i), xe = re(/Edge/i), It = re(/firefox/i), Te = re(/safari/i) && !re(/chrome/i) && !re(/android/i), Lt = re(/iP(ad|od|hone)/i), Wt = re(/chrome/i) && re(/android/i), Gt = {
|
|
2907
|
-
capture: false,
|
|
2908
|
-
passive: false
|
|
2909
|
-
};
|
|
2910
|
-
function S(t, e, n) {
|
|
2911
|
-
t.addEventListener(e, n, !ae && Gt);
|
|
2912
|
-
}
|
|
2913
|
-
function E(t, e, n) {
|
|
2914
|
-
t.removeEventListener(e, n, !ae && Gt);
|
|
2915
|
-
}
|
|
2916
|
-
function We(t, e) {
|
|
2917
|
-
if (e) {
|
|
2918
|
-
if (e[0] === ">" && (e = e.substring(1)), t)
|
|
2919
|
-
try {
|
|
2920
|
-
if (t.matches)
|
|
2921
|
-
return t.matches(e);
|
|
2922
|
-
if (t.msMatchesSelector)
|
|
2923
|
-
return t.msMatchesSelector(e);
|
|
2924
|
-
if (t.webkitMatchesSelector)
|
|
2925
|
-
return t.webkitMatchesSelector(e);
|
|
2926
|
-
} catch (n) {
|
|
2927
|
-
return false;
|
|
2928
|
-
}
|
|
2929
|
-
return false;
|
|
2930
|
-
}
|
|
2931
|
-
}
|
|
2932
|
-
function Pn(t) {
|
|
2933
|
-
return t.host && t !== document && t.host.nodeType ? t.host : t.parentNode;
|
|
2934
|
-
}
|
|
2935
|
-
function Q(t, e, n, o) {
|
|
2936
|
-
if (t) {
|
|
2937
|
-
n = n || document;
|
|
2938
|
-
do {
|
|
2939
|
-
if (e != null && (e[0] === ">" ? t.parentNode === n && We(t, e) : We(t, e)) || o && t === n)
|
|
2940
|
-
return t;
|
|
2941
|
-
if (t === n)
|
|
2942
|
-
break;
|
|
2943
|
-
} while (t = Pn(t));
|
|
2944
|
-
}
|
|
2945
|
-
return null;
|
|
2946
|
-
}
|
|
2947
|
-
var At = /\s+/g;
|
|
2948
|
-
function V(t, e, n) {
|
|
2949
|
-
if (t && e)
|
|
2950
|
-
if (t.classList)
|
|
2951
|
-
t.classList[n ? "add" : "remove"](e);
|
|
2952
|
-
else {
|
|
2953
|
-
var o = (" " + t.className + " ").replace(At, " ").replace(" " + e + " ", " ");
|
|
2954
|
-
t.className = (o + (n ? " " + e : "")).replace(At, " ");
|
|
2955
|
-
}
|
|
2956
|
-
}
|
|
2957
|
-
function h(t, e, n) {
|
|
2958
|
-
var o = t && t.style;
|
|
2959
|
-
if (o) {
|
|
2960
|
-
if (n === void 0)
|
|
2961
|
-
return document.defaultView && document.defaultView.getComputedStyle ? n = document.defaultView.getComputedStyle(t, "") : t.currentStyle && (n = t.currentStyle), e === void 0 ? n : n[e];
|
|
2962
|
-
!(e in o) && e.indexOf("webkit") === -1 && (e = "-webkit-" + e), o[e] = n + (typeof n == "string" ? "" : "px");
|
|
2963
|
-
}
|
|
2964
|
-
}
|
|
2965
|
-
function ye(t, e) {
|
|
2966
|
-
var n = "";
|
|
2967
|
-
if (typeof t == "string")
|
|
2968
|
-
n = t;
|
|
2969
|
-
else
|
|
2970
|
-
do {
|
|
2971
|
-
var o = h(t, "transform");
|
|
2972
|
-
o && o !== "none" && (n = o + " " + n);
|
|
2973
|
-
} while (!e && (t = t.parentNode));
|
|
2974
|
-
var r = window.DOMMatrix || window.WebKitCSSMatrix || window.CSSMatrix || window.MSCSSMatrix;
|
|
2975
|
-
return r && new r(n);
|
|
2976
|
-
}
|
|
2977
|
-
function jt(t, e, n) {
|
|
2978
|
-
if (t) {
|
|
2979
|
-
var o = t.getElementsByTagName(e), r = 0, i = o.length;
|
|
2980
|
-
if (n)
|
|
2981
|
-
for (; r < i; r++)
|
|
2982
|
-
n(o[r], r);
|
|
2983
|
-
return o;
|
|
2984
|
-
}
|
|
2985
|
-
return [];
|
|
2986
|
-
}
|
|
2987
|
-
function te() {
|
|
2988
|
-
var t = document.scrollingElement;
|
|
2989
|
-
return t || document.documentElement;
|
|
2990
|
-
}
|
|
2991
|
-
function P(t, e, n, o, r) {
|
|
2992
|
-
if (!(!t.getBoundingClientRect && t !== window)) {
|
|
2993
|
-
var i, a, l, s, u, d, f;
|
|
2994
|
-
if (t !== window && t.parentNode && t !== te() ? (i = t.getBoundingClientRect(), a = i.top, l = i.left, s = i.bottom, u = i.right, d = i.height, f = i.width) : (a = 0, l = 0, s = window.innerHeight, u = window.innerWidth, d = window.innerHeight, f = window.innerWidth), (e || n) && t !== window && (r = r || t.parentNode, !ae))
|
|
2995
|
-
do
|
|
2996
|
-
if (r && r.getBoundingClientRect && (h(r, "transform") !== "none" || n && h(r, "position") !== "static")) {
|
|
2997
|
-
var m = r.getBoundingClientRect();
|
|
2998
|
-
a -= m.top + parseInt(h(r, "border-top-width")), l -= m.left + parseInt(h(r, "border-left-width")), s = a + i.height, u = l + i.width;
|
|
2999
|
-
break;
|
|
3000
|
-
}
|
|
3001
|
-
while (r = r.parentNode);
|
|
3002
|
-
if (o && t !== window) {
|
|
3003
|
-
var y = ye(r || t), b = y && y.a, w = y && y.d;
|
|
3004
|
-
y && (a /= w, l /= b, f /= b, d /= w, s = a + d, u = l + f);
|
|
3005
|
-
}
|
|
3006
|
-
return {
|
|
3007
|
-
top: a,
|
|
3008
|
-
left: l,
|
|
3009
|
-
bottom: s,
|
|
3010
|
-
right: u,
|
|
3011
|
-
width: f,
|
|
3012
|
-
height: d
|
|
3013
|
-
};
|
|
3014
|
-
}
|
|
3015
|
-
}
|
|
3016
|
-
function xt(t, e, n) {
|
|
3017
|
-
for (var o = ce(t, true), r = P(t)[e]; o; ) {
|
|
3018
|
-
var i = P(o)[n], a = void 0;
|
|
3019
|
-
if (a = r >= i, !a)
|
|
3020
|
-
return o;
|
|
3021
|
-
if (o === te())
|
|
3022
|
-
break;
|
|
3023
|
-
o = ce(o, false);
|
|
3024
|
-
}
|
|
3025
|
-
return false;
|
|
3026
|
-
}
|
|
3027
|
-
function we(t, e, n, o) {
|
|
3028
|
-
for (var r = 0, i = 0, a = t.children; i < a.length; ) {
|
|
3029
|
-
if (a[i].style.display !== "none" && a[i] !== p.ghost && (o || a[i] !== p.dragged) && Q(a[i], n.draggable, t, false)) {
|
|
3030
|
-
if (r === e)
|
|
3031
|
-
return a[i];
|
|
3032
|
-
r++;
|
|
3033
|
-
}
|
|
3034
|
-
i++;
|
|
3035
|
-
}
|
|
3036
|
-
return null;
|
|
3037
|
-
}
|
|
3038
|
-
function ht(t, e) {
|
|
3039
|
-
for (var n = t.lastElementChild; n && (n === p.ghost || h(n, "display") === "none" || e && !We(n, e)); )
|
|
3040
|
-
n = n.previousElementSibling;
|
|
3041
|
-
return n || null;
|
|
3042
|
-
}
|
|
3043
|
-
function J(t, e) {
|
|
3044
|
-
var n = 0;
|
|
3045
|
-
if (!t || !t.parentNode)
|
|
3046
|
-
return -1;
|
|
3047
|
-
for (; t = t.previousElementSibling; )
|
|
3048
|
-
t.nodeName.toUpperCase() !== "TEMPLATE" && t !== p.clone && (!e || We(t, e)) && n++;
|
|
3049
|
-
return n;
|
|
3050
|
-
}
|
|
3051
|
-
function Nt(t) {
|
|
3052
|
-
var e = 0, n = 0, o = te();
|
|
3053
|
-
if (t)
|
|
3054
|
-
do {
|
|
3055
|
-
var r = ye(t), i = r.a, a = r.d;
|
|
3056
|
-
e += t.scrollLeft * i, n += t.scrollTop * a;
|
|
3057
|
-
} while (t !== o && (t = t.parentNode));
|
|
3058
|
-
return [e, n];
|
|
3059
|
-
}
|
|
3060
|
-
function Mn(t, e) {
|
|
3061
|
-
for (var n in t)
|
|
3062
|
-
if (t.hasOwnProperty(n)) {
|
|
3063
|
-
for (var o in e)
|
|
3064
|
-
if (e.hasOwnProperty(o) && e[o] === t[n][o])
|
|
3065
|
-
return Number(n);
|
|
3066
|
-
}
|
|
3067
|
-
return -1;
|
|
3068
|
-
}
|
|
3069
|
-
function ce(t, e) {
|
|
3070
|
-
if (!t || !t.getBoundingClientRect)
|
|
3071
|
-
return te();
|
|
3072
|
-
var n = t, o = false;
|
|
3073
|
-
do
|
|
3074
|
-
if (n.clientWidth < n.scrollWidth || n.clientHeight < n.scrollHeight) {
|
|
3075
|
-
var r = h(n);
|
|
3076
|
-
if (n.clientWidth < n.scrollWidth && (r.overflowX == "auto" || r.overflowX == "scroll") || n.clientHeight < n.scrollHeight && (r.overflowY == "auto" || r.overflowY == "scroll")) {
|
|
3077
|
-
if (!n.getBoundingClientRect || n === document.body)
|
|
3078
|
-
return te();
|
|
3079
|
-
if (o || e)
|
|
3080
|
-
return n;
|
|
3081
|
-
o = true;
|
|
3082
|
-
}
|
|
3083
|
-
}
|
|
3084
|
-
while (n = n.parentNode);
|
|
3085
|
-
return te();
|
|
3086
|
-
}
|
|
3087
|
-
function Fn(t, e) {
|
|
3088
|
-
if (t && e)
|
|
3089
|
-
for (var n in e)
|
|
3090
|
-
e.hasOwnProperty(n) && (t[n] = e[n]);
|
|
3091
|
-
return t;
|
|
3092
|
-
}
|
|
3093
|
-
function Je(t, e) {
|
|
3094
|
-
return Math.round(t.top) === Math.round(e.top) && Math.round(t.left) === Math.round(e.left) && Math.round(t.height) === Math.round(e.height) && Math.round(t.width) === Math.round(e.width);
|
|
3095
|
-
}
|
|
3096
|
-
var Ce;
|
|
3097
|
-
function zt(t, e) {
|
|
3098
|
-
return function() {
|
|
3099
|
-
if (!Ce) {
|
|
3100
|
-
var n = arguments, o = this;
|
|
3101
|
-
n.length === 1 ? t.call(o, n[0]) : t.apply(o, n), Ce = setTimeout(function() {
|
|
3102
|
-
Ce = void 0;
|
|
3103
|
-
}, e);
|
|
3104
|
-
}
|
|
3105
|
-
};
|
|
3106
|
-
}
|
|
3107
|
-
function Rn() {
|
|
3108
|
-
clearTimeout(Ce), Ce = void 0;
|
|
3109
|
-
}
|
|
3110
|
-
function Ut(t, e, n) {
|
|
3111
|
-
t.scrollLeft += e, t.scrollTop += n;
|
|
3112
|
-
}
|
|
3113
|
-
function Vt(t) {
|
|
3114
|
-
var e = window.Polymer, n = window.jQuery || window.Zepto;
|
|
3115
|
-
return e && e.dom ? e.dom(t).cloneNode(true) : n ? n(t).clone(true)[0] : t.cloneNode(true);
|
|
3116
|
-
}
|
|
3117
|
-
function $t(t, e, n) {
|
|
3118
|
-
var o = {};
|
|
3119
|
-
return Array.from(t.children).forEach(function(r) {
|
|
3120
|
-
var i, a, l, s;
|
|
3121
|
-
if (!(!Q(r, e.draggable, t, false) || r.animated || r === n)) {
|
|
3122
|
-
var u = P(r);
|
|
3123
|
-
o.left = Math.min((i = o.left) !== null && i !== void 0 ? i : 1 / 0, u.left), o.top = Math.min((a = o.top) !== null && a !== void 0 ? a : 1 / 0, u.top), o.right = Math.max((l = o.right) !== null && l !== void 0 ? l : -1 / 0, u.right), o.bottom = Math.max((s = o.bottom) !== null && s !== void 0 ? s : -1 / 0, u.bottom);
|
|
3124
|
-
}
|
|
3125
|
-
}), o.width = o.right - o.left, o.height = o.bottom - o.top, o.x = o.left, o.y = o.top, o;
|
|
3126
|
-
}
|
|
3127
|
-
var q = "Sortable" + (/* @__PURE__ */ new Date()).getTime();
|
|
3128
|
-
function Xn() {
|
|
3129
|
-
var t = [], e;
|
|
3130
|
-
return {
|
|
3131
|
-
captureAnimationState: function() {
|
|
3132
|
-
if (t = [], !!this.options.animation) {
|
|
3133
|
-
var o = [].slice.call(this.el.children);
|
|
3134
|
-
o.forEach(function(r) {
|
|
3135
|
-
if (!(h(r, "display") === "none" || r === p.ghost)) {
|
|
3136
|
-
t.push({
|
|
3137
|
-
target: r,
|
|
3138
|
-
rect: P(r)
|
|
3139
|
-
});
|
|
3140
|
-
var i = ne({}, t[t.length - 1].rect);
|
|
3141
|
-
if (r.thisAnimationDuration) {
|
|
3142
|
-
var a = ye(r, true);
|
|
3143
|
-
a && (i.top -= a.f, i.left -= a.e);
|
|
3144
|
-
}
|
|
3145
|
-
r.fromRect = i;
|
|
3146
|
-
}
|
|
3147
|
-
});
|
|
3148
|
-
}
|
|
3149
|
-
},
|
|
3150
|
-
addAnimationState: function(o) {
|
|
3151
|
-
t.push(o);
|
|
3152
|
-
},
|
|
3153
|
-
removeAnimationState: function(o) {
|
|
3154
|
-
t.splice(Mn(t, {
|
|
3155
|
-
target: o
|
|
3156
|
-
}), 1);
|
|
3157
|
-
},
|
|
3158
|
-
animateAll: function(o) {
|
|
3159
|
-
var r = this;
|
|
3160
|
-
if (!this.options.animation) {
|
|
3161
|
-
clearTimeout(e), typeof o == "function" && o();
|
|
3162
|
-
return;
|
|
3163
|
-
}
|
|
3164
|
-
var i = false, a = 0;
|
|
3165
|
-
t.forEach(function(l) {
|
|
3166
|
-
var s = 0, u = l.target, d = u.fromRect, f = P(u), m = u.prevFromRect, y = u.prevToRect, b = l.rect, w = ye(u, true);
|
|
3167
|
-
w && (f.top -= w.f, f.left -= w.e), u.toRect = f, u.thisAnimationDuration && Je(m, f) && !Je(d, f) && // Make sure animatingRect is on line between toRect & fromRect
|
|
3168
|
-
(b.top - f.top) / (b.left - f.left) === (d.top - f.top) / (d.left - f.left) && (s = Bn(b, m, y, r.options)), Je(f, d) || (u.prevFromRect = d, u.prevToRect = f, s || (s = r.options.animation), r.animate(u, b, f, s)), s && (i = true, a = Math.max(a, s), clearTimeout(u.animationResetTimer), u.animationResetTimer = setTimeout(function() {
|
|
3169
|
-
u.animationTime = 0, u.prevFromRect = null, u.fromRect = null, u.prevToRect = null, u.thisAnimationDuration = null;
|
|
3170
|
-
}, s), u.thisAnimationDuration = s);
|
|
3171
|
-
}), clearTimeout(e), i ? e = setTimeout(function() {
|
|
3172
|
-
typeof o == "function" && o();
|
|
3173
|
-
}, a) : typeof o == "function" && o(), t = [];
|
|
3174
|
-
},
|
|
3175
|
-
animate: function(o, r, i, a) {
|
|
3176
|
-
if (a) {
|
|
3177
|
-
h(o, "transition", ""), h(o, "transform", "");
|
|
3178
|
-
var l = ye(this.el), s = l && l.a, u = l && l.d, d = (r.left - i.left) / (s || 1), f = (r.top - i.top) / (u || 1);
|
|
3179
|
-
o.animatingX = !!d, o.animatingY = !!f, h(o, "transform", "translate3d(" + d + "px," + f + "px,0)"), this.forRepaintDummy = Yn(o), h(o, "transition", "transform " + a + "ms" + (this.options.easing ? " " + this.options.easing : "")), h(o, "transform", "translate3d(0,0,0)"), typeof o.animated == "number" && clearTimeout(o.animated), o.animated = setTimeout(function() {
|
|
3180
|
-
h(o, "transition", ""), h(o, "transform", ""), o.animated = false, o.animatingX = false, o.animatingY = false;
|
|
3181
|
-
}, a);
|
|
3182
|
-
}
|
|
3183
|
-
}
|
|
3184
|
-
};
|
|
3185
|
-
}
|
|
3186
|
-
function Yn(t) {
|
|
3187
|
-
return t.offsetWidth;
|
|
3188
|
-
}
|
|
3189
|
-
function Bn(t, e, n, o) {
|
|
3190
|
-
return Math.sqrt(Math.pow(e.top - t.top, 2) + Math.pow(e.left - t.left, 2)) / Math.sqrt(Math.pow(e.top - n.top, 2) + Math.pow(e.left - n.left, 2)) * o.animation;
|
|
3191
|
-
}
|
|
3192
|
-
var ge = [], Ze = {
|
|
3193
|
-
initializeByDefault: true
|
|
3194
|
-
}, Ne = {
|
|
3195
|
-
mount: function(e) {
|
|
3196
|
-
for (var n in Ze)
|
|
3197
|
-
Ze.hasOwnProperty(n) && !(n in e) && (e[n] = Ze[n]);
|
|
3198
|
-
ge.forEach(function(o) {
|
|
3199
|
-
if (o.pluginName === e.pluginName)
|
|
3200
|
-
throw "Sortable: Cannot mount plugin ".concat(e.pluginName, " more than once");
|
|
3201
|
-
}), ge.push(e);
|
|
3202
|
-
},
|
|
3203
|
-
pluginEvent: function(e, n, o) {
|
|
3204
|
-
var r = this;
|
|
3205
|
-
this.eventCanceled = false, o.cancel = function() {
|
|
3206
|
-
r.eventCanceled = true;
|
|
3207
|
-
};
|
|
3208
|
-
var i = e + "Global";
|
|
3209
|
-
ge.forEach(function(a) {
|
|
3210
|
-
n[a.pluginName] && (n[a.pluginName][i] && n[a.pluginName][i](ne({
|
|
3211
|
-
sortable: n
|
|
3212
|
-
}, o)), n.options[a.pluginName] && n[a.pluginName][e] && n[a.pluginName][e](ne({
|
|
3213
|
-
sortable: n
|
|
3214
|
-
}, o)));
|
|
3215
|
-
});
|
|
3216
|
-
},
|
|
3217
|
-
initializePlugins: function(e, n, o, r) {
|
|
3218
|
-
ge.forEach(function(l) {
|
|
3219
|
-
var s = l.pluginName;
|
|
3220
|
-
if (!(!e.options[s] && !l.initializeByDefault)) {
|
|
3221
|
-
var u = new l(e, n, e.options);
|
|
3222
|
-
u.sortable = e, u.options = e.options, e[s] = u, ie(o, u.defaults);
|
|
3223
|
-
}
|
|
3224
|
-
});
|
|
3225
|
-
for (var i in e.options)
|
|
3226
|
-
if (e.options.hasOwnProperty(i)) {
|
|
3227
|
-
var a = this.modifyOption(e, i, e.options[i]);
|
|
3228
|
-
typeof a != "undefined" && (e.options[i] = a);
|
|
3229
|
-
}
|
|
3230
|
-
},
|
|
3231
|
-
getEventProperties: function(e, n) {
|
|
3232
|
-
var o = {};
|
|
3233
|
-
return ge.forEach(function(r) {
|
|
3234
|
-
typeof r.eventProperties == "function" && ie(o, r.eventProperties.call(n[r.pluginName], e));
|
|
3235
|
-
}), o;
|
|
3236
|
-
},
|
|
3237
|
-
modifyOption: function(e, n, o) {
|
|
3238
|
-
var r;
|
|
3239
|
-
return ge.forEach(function(i) {
|
|
3240
|
-
e[i.pluginName] && i.optionListeners && typeof i.optionListeners[n] == "function" && (r = i.optionListeners[n].call(e[i.pluginName], o));
|
|
3241
|
-
}), r;
|
|
3242
|
-
}
|
|
3243
|
-
};
|
|
3244
|
-
function kn(t) {
|
|
3245
|
-
var e = t.sortable, n = t.rootEl, o = t.name, r = t.targetEl, i = t.cloneEl, a = t.toEl, l = t.fromEl, s = t.oldIndex, u = t.newIndex, d = t.oldDraggableIndex, f = t.newDraggableIndex, m = t.originalEvent, y = t.putSortable, b = t.extraEventProperties;
|
|
3246
|
-
if (e = e || n && n[q], !!e) {
|
|
3247
|
-
var w, L = e.options, G = "on" + o.charAt(0).toUpperCase() + o.substr(1);
|
|
3248
|
-
window.CustomEvent && !ae && !xe ? w = new CustomEvent(o, {
|
|
3249
|
-
bubbles: true,
|
|
3250
|
-
cancelable: true
|
|
3251
|
-
}) : (w = document.createEvent("Event"), w.initEvent(o, true, true)), w.to = a || n, w.from = l || n, w.item = r || n, w.clone = i, w.oldIndex = s, w.newIndex = u, w.oldDraggableIndex = d, w.newDraggableIndex = f, w.originalEvent = m, w.pullMode = y ? y.lastPutMode : void 0;
|
|
3252
|
-
var R = ne(ne({}, b), Ne.getEventProperties(o, e));
|
|
3253
|
-
for (var j in R)
|
|
3254
|
-
w[j] = R[j];
|
|
3255
|
-
n && n.dispatchEvent(w), L[G] && L[G].call(e, w);
|
|
3256
|
-
}
|
|
3257
|
-
}
|
|
3258
|
-
var Hn = ["evt"], z = function(e, n) {
|
|
3259
|
-
var o = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : {}, r = o.evt, i = xn(o, Hn);
|
|
3260
|
-
Ne.pluginEvent.bind(p)(e, n, ne({
|
|
3261
|
-
dragEl: c,
|
|
3262
|
-
parentEl: O,
|
|
3263
|
-
ghostEl: g,
|
|
3264
|
-
rootEl: T,
|
|
3265
|
-
nextEl: pe,
|
|
3266
|
-
lastDownEl: Be,
|
|
3267
|
-
cloneEl: C,
|
|
3268
|
-
cloneHidden: ue,
|
|
3269
|
-
dragStarted: Se,
|
|
3270
|
-
putSortable: Y,
|
|
3271
|
-
activeSortable: p.active,
|
|
3272
|
-
originalEvent: r,
|
|
3273
|
-
oldIndex: be,
|
|
3274
|
-
oldDraggableIndex: Oe,
|
|
3275
|
-
newIndex: $,
|
|
3276
|
-
newDraggableIndex: se,
|
|
3277
|
-
hideGhostForTarget: Zt,
|
|
3278
|
-
unhideGhostForTarget: Qt,
|
|
3279
|
-
cloneNowHidden: function() {
|
|
3280
|
-
ue = true;
|
|
3281
|
-
},
|
|
3282
|
-
cloneNowShown: function() {
|
|
3283
|
-
ue = false;
|
|
3284
|
-
},
|
|
3285
|
-
dispatchSortableEvent: function(l) {
|
|
3286
|
-
W({
|
|
3287
|
-
sortable: n,
|
|
3288
|
-
name: l,
|
|
3289
|
-
originalEvent: r
|
|
3290
|
-
});
|
|
3291
|
-
}
|
|
3292
|
-
}, i));
|
|
3293
|
-
};
|
|
3294
|
-
function W(t) {
|
|
3295
|
-
kn(ne({
|
|
3296
|
-
putSortable: Y,
|
|
3297
|
-
cloneEl: C,
|
|
3298
|
-
targetEl: c,
|
|
3299
|
-
rootEl: T,
|
|
3300
|
-
oldIndex: be,
|
|
3301
|
-
oldDraggableIndex: Oe,
|
|
3302
|
-
newIndex: $,
|
|
3303
|
-
newDraggableIndex: se
|
|
3304
|
-
}, t));
|
|
3305
|
-
}
|
|
3306
|
-
var c, O, g, T, pe, Be, C, ue, be, $, Oe, se, Me, Y, ve = false, Ge = false, je = [], de, Z, Qe, et, Pt, Mt, Se, me, Ie, Ae = false, Fe = false, ke, H, tt = [], lt = false, ze = [], Ve = typeof document != "undefined", Re = Lt, Ft = xe || ae ? "cssFloat" : "float", Ln = Ve && !Wt && !Lt && "draggable" in document.createElement("div"), qt = (function() {
|
|
3307
|
-
if (Ve) {
|
|
3308
|
-
if (ae)
|
|
3309
|
-
return false;
|
|
3310
|
-
var t = document.createElement("x");
|
|
3311
|
-
return t.style.cssText = "pointer-events:auto", t.style.pointerEvents === "auto";
|
|
3312
|
-
}
|
|
3313
|
-
})(), Kt = function(e, n) {
|
|
3314
|
-
var o = h(e), r = parseInt(o.width) - parseInt(o.paddingLeft) - parseInt(o.paddingRight) - parseInt(o.borderLeftWidth) - parseInt(o.borderRightWidth), i = we(e, 0, n), a = we(e, 1, n), l = i && h(i), s = a && h(a), u = l && parseInt(l.marginLeft) + parseInt(l.marginRight) + P(i).width, d = s && parseInt(s.marginLeft) + parseInt(s.marginRight) + P(a).width;
|
|
3315
|
-
if (o.display === "flex")
|
|
3316
|
-
return o.flexDirection === "column" || o.flexDirection === "column-reverse" ? "vertical" : "horizontal";
|
|
3317
|
-
if (o.display === "grid")
|
|
3318
|
-
return o.gridTemplateColumns.split(" ").length <= 1 ? "vertical" : "horizontal";
|
|
3319
|
-
if (i && l.float && l.float !== "none") {
|
|
3320
|
-
var f = l.float === "left" ? "left" : "right";
|
|
3321
|
-
return a && (s.clear === "both" || s.clear === f) ? "vertical" : "horizontal";
|
|
3322
|
-
}
|
|
3323
|
-
return i && (l.display === "block" || l.display === "flex" || l.display === "table" || l.display === "grid" || u >= r && o[Ft] === "none" || a && o[Ft] === "none" && u + d > r) ? "vertical" : "horizontal";
|
|
3324
|
-
}, Wn = function(e, n, o) {
|
|
3325
|
-
var r = o ? e.left : e.top, i = o ? e.right : e.bottom, a = o ? e.width : e.height, l = o ? n.left : n.top, s = o ? n.right : n.bottom, u = o ? n.width : n.height;
|
|
3326
|
-
return r === l || i === s || r + a / 2 === l + u / 2;
|
|
3327
|
-
}, Gn = function(e, n) {
|
|
3328
|
-
var o;
|
|
3329
|
-
return je.some(function(r) {
|
|
3330
|
-
var i = r[q].options.emptyInsertThreshold;
|
|
3331
|
-
if (!(!i || ht(r))) {
|
|
3332
|
-
var a = P(r), l = e >= a.left - i && e <= a.right + i, s = n >= a.top - i && n <= a.bottom + i;
|
|
3333
|
-
if (l && s)
|
|
3334
|
-
return o = r;
|
|
3335
|
-
}
|
|
3336
|
-
}), o;
|
|
3337
|
-
}, Jt = function(e) {
|
|
3338
|
-
function n(i, a) {
|
|
3339
|
-
return function(l, s, u, d) {
|
|
3340
|
-
var f = l.options.group.name && s.options.group.name && l.options.group.name === s.options.group.name;
|
|
3341
|
-
if (i == null && (a || f))
|
|
3342
|
-
return true;
|
|
3343
|
-
if (i == null || i === false)
|
|
3344
|
-
return false;
|
|
3345
|
-
if (a && i === "clone")
|
|
3346
|
-
return i;
|
|
3347
|
-
if (typeof i == "function")
|
|
3348
|
-
return n(i(l, s, u, d), a)(l, s, u, d);
|
|
3349
|
-
var m = (a ? l : s).options.group.name;
|
|
3350
|
-
return i === true || typeof i == "string" && i === m || i.join && i.indexOf(m) > -1;
|
|
3351
|
-
};
|
|
3352
|
-
}
|
|
3353
|
-
var o = {}, r = e.group;
|
|
3354
|
-
(!r || Ye(r) != "object") && (r = {
|
|
3355
|
-
name: r
|
|
3356
|
-
}), o.name = r.name, o.checkPull = n(r.pull, true), o.checkPut = n(r.put), o.revertClone = r.revertClone, e.group = o;
|
|
3357
|
-
}, Zt = function() {
|
|
3358
|
-
!qt && g && h(g, "display", "none");
|
|
3359
|
-
}, Qt = function() {
|
|
3360
|
-
!qt && g && h(g, "display", "");
|
|
3361
|
-
};
|
|
3362
|
-
Ve && !Wt && document.addEventListener("click", function(t) {
|
|
3363
|
-
if (Ge)
|
|
3364
|
-
return t.preventDefault(), t.stopPropagation && t.stopPropagation(), t.stopImmediatePropagation && t.stopImmediatePropagation(), Ge = false, false;
|
|
3365
|
-
}, true);
|
|
3366
|
-
var he = function(e) {
|
|
3367
|
-
if (c) {
|
|
3368
|
-
e = e.touches ? e.touches[0] : e;
|
|
3369
|
-
var n = Gn(e.clientX, e.clientY);
|
|
3370
|
-
if (n) {
|
|
3371
|
-
var o = {};
|
|
3372
|
-
for (var r in e)
|
|
3373
|
-
e.hasOwnProperty(r) && (o[r] = e[r]);
|
|
3374
|
-
o.target = o.rootEl = n, o.preventDefault = void 0, o.stopPropagation = void 0, n[q]._onDragOver(o);
|
|
3375
|
-
}
|
|
3376
|
-
}
|
|
3377
|
-
}, jn = function(e) {
|
|
3378
|
-
c && c.parentNode[q]._isOutsideThisEl(e.target);
|
|
3379
|
-
};
|
|
3380
|
-
function p(t, e) {
|
|
3381
|
-
if (!(t && t.nodeType && t.nodeType === 1))
|
|
3382
|
-
throw "Sortable: `el` must be an HTMLElement, not ".concat({}.toString.call(t));
|
|
3383
|
-
this.el = t, this.options = e = ie({}, e), t[q] = this;
|
|
3384
|
-
var n = {
|
|
3385
|
-
group: null,
|
|
3386
|
-
sort: true,
|
|
3387
|
-
disabled: false,
|
|
3388
|
-
store: null,
|
|
3389
|
-
handle: null,
|
|
3390
|
-
draggable: /^[uo]l$/i.test(t.nodeName) ? ">li" : ">*",
|
|
3391
|
-
swapThreshold: 1,
|
|
3392
|
-
// percentage; 0 <= x <= 1
|
|
3393
|
-
invertSwap: false,
|
|
3394
|
-
// invert always
|
|
3395
|
-
invertedSwapThreshold: null,
|
|
3396
|
-
// will be set to same as swapThreshold if default
|
|
3397
|
-
removeCloneOnHide: true,
|
|
3398
|
-
direction: function() {
|
|
3399
|
-
return Kt(t, this.options);
|
|
3400
|
-
},
|
|
3401
|
-
ghostClass: "sortable-ghost",
|
|
3402
|
-
chosenClass: "sortable-chosen",
|
|
3403
|
-
dragClass: "sortable-drag",
|
|
3404
|
-
ignore: "a, img",
|
|
3405
|
-
filter: null,
|
|
3406
|
-
preventOnFilter: true,
|
|
3407
|
-
animation: 0,
|
|
3408
|
-
easing: null,
|
|
3409
|
-
setData: function(a, l) {
|
|
3410
|
-
a.setData("Text", l.textContent);
|
|
3411
|
-
},
|
|
3412
|
-
dropBubble: false,
|
|
3413
|
-
dragoverBubble: false,
|
|
3414
|
-
dataIdAttr: "data-id",
|
|
3415
|
-
delay: 0,
|
|
3416
|
-
delayOnTouchOnly: false,
|
|
3417
|
-
touchStartThreshold: (Number.parseInt ? Number : window).parseInt(window.devicePixelRatio, 10) || 1,
|
|
3418
|
-
forceFallback: false,
|
|
3419
|
-
fallbackClass: "sortable-fallback",
|
|
3420
|
-
fallbackOnBody: false,
|
|
3421
|
-
fallbackTolerance: 0,
|
|
3422
|
-
fallbackOffset: {
|
|
3423
|
-
x: 0,
|
|
3424
|
-
y: 0
|
|
3425
|
-
},
|
|
3426
|
-
supportPointer: p.supportPointer !== false && "PointerEvent" in window && !Te,
|
|
3427
|
-
emptyInsertThreshold: 5
|
|
3428
|
-
};
|
|
3429
|
-
Ne.initializePlugins(this, t, n);
|
|
3430
|
-
for (var o in n)
|
|
3431
|
-
!(o in e) && (e[o] = n[o]);
|
|
3432
|
-
Jt(e);
|
|
3433
|
-
for (var r in this)
|
|
3434
|
-
r.charAt(0) === "_" && typeof this[r] == "function" && (this[r] = this[r].bind(this));
|
|
3435
|
-
this.nativeDraggable = e.forceFallback ? false : Ln, this.nativeDraggable && (this.options.touchStartThreshold = 1), e.supportPointer ? S(t, "pointerdown", this._onTapStart) : (S(t, "mousedown", this._onTapStart), S(t, "touchstart", this._onTapStart)), this.nativeDraggable && (S(t, "dragover", this), S(t, "dragenter", this)), je.push(this.el), e.store && e.store.get && this.sort(e.store.get(this) || []), ie(this, Xn());
|
|
3436
|
-
}
|
|
3437
|
-
p.prototype = /** @lends Sortable.prototype */
|
|
3438
|
-
{
|
|
3439
|
-
constructor: p,
|
|
3440
|
-
_isOutsideThisEl: function(e) {
|
|
3441
|
-
!this.el.contains(e) && e !== this.el && (me = null);
|
|
3442
|
-
},
|
|
3443
|
-
_getDirection: function(e, n) {
|
|
3444
|
-
return typeof this.options.direction == "function" ? this.options.direction.call(this, e, n, c) : this.options.direction;
|
|
3445
|
-
},
|
|
3446
|
-
_onTapStart: function(e) {
|
|
3447
|
-
if (e.cancelable) {
|
|
3448
|
-
var n = this, o = this.el, r = this.options, i = r.preventOnFilter, a = e.type, l = e.touches && e.touches[0] || e.pointerType && e.pointerType === "touch" && e, s = (l || e).target, u = e.target.shadowRoot && (e.path && e.path[0] || e.composedPath && e.composedPath()[0]) || s, d = r.filter;
|
|
3449
|
-
if (Zn(o), !c && !(/mousedown|pointerdown/.test(a) && e.button !== 0 || r.disabled) && !u.isContentEditable && !(!this.nativeDraggable && Te && s && s.tagName.toUpperCase() === "SELECT") && (s = Q(s, r.draggable, o, false), !(s && s.animated) && Be !== s)) {
|
|
3450
|
-
if (be = J(s), Oe = J(s, r.draggable), typeof d == "function") {
|
|
3451
|
-
if (d.call(this, e, s, this)) {
|
|
3452
|
-
W({
|
|
3453
|
-
sortable: n,
|
|
3454
|
-
rootEl: u,
|
|
3455
|
-
name: "filter",
|
|
3456
|
-
targetEl: s,
|
|
3457
|
-
toEl: o,
|
|
3458
|
-
fromEl: o
|
|
3459
|
-
}), z("filter", n, {
|
|
3460
|
-
evt: e
|
|
3461
|
-
}), i && e.cancelable && e.preventDefault();
|
|
3462
|
-
return;
|
|
3463
|
-
}
|
|
3464
|
-
} else if (d && (d = d.split(",").some(function(f) {
|
|
3465
|
-
if (f = Q(u, f.trim(), o, false), f)
|
|
3466
|
-
return W({
|
|
3467
|
-
sortable: n,
|
|
3468
|
-
rootEl: f,
|
|
3469
|
-
name: "filter",
|
|
3470
|
-
targetEl: s,
|
|
3471
|
-
fromEl: o,
|
|
3472
|
-
toEl: o
|
|
3473
|
-
}), z("filter", n, {
|
|
3474
|
-
evt: e
|
|
3475
|
-
}), true;
|
|
3476
|
-
}), d)) {
|
|
3477
|
-
i && e.cancelable && e.preventDefault();
|
|
3478
|
-
return;
|
|
3479
|
-
}
|
|
3480
|
-
r.handle && !Q(u, r.handle, o, false) || this._prepareDragStart(e, l, s);
|
|
3481
|
-
}
|
|
3482
|
-
}
|
|
3483
|
-
},
|
|
3484
|
-
_prepareDragStart: function(e, n, o) {
|
|
3485
|
-
var r = this, i = r.el, a = r.options, l = i.ownerDocument, s;
|
|
3486
|
-
if (o && !c && o.parentNode === i) {
|
|
3487
|
-
var u = P(o);
|
|
3488
|
-
if (T = i, c = o, O = c.parentNode, pe = c.nextSibling, Be = o, Me = a.group, p.dragged = c, de = {
|
|
3489
|
-
target: c,
|
|
3490
|
-
clientX: (n || e).clientX,
|
|
3491
|
-
clientY: (n || e).clientY
|
|
3492
|
-
}, Pt = de.clientX - u.left, Mt = de.clientY - u.top, this._lastX = (n || e).clientX, this._lastY = (n || e).clientY, c.style["will-change"] = "all", s = function() {
|
|
3493
|
-
if (z("delayEnded", r, {
|
|
3494
|
-
evt: e
|
|
3495
|
-
}), p.eventCanceled) {
|
|
3496
|
-
r._onDrop();
|
|
3497
|
-
return;
|
|
3498
|
-
}
|
|
3499
|
-
r._disableDelayedDragEvents(), !It && r.nativeDraggable && (c.draggable = true), r._triggerDragStart(e, n), W({
|
|
3500
|
-
sortable: r,
|
|
3501
|
-
name: "choose",
|
|
3502
|
-
originalEvent: e
|
|
3503
|
-
}), V(c, a.chosenClass, true);
|
|
3504
|
-
}, a.ignore.split(",").forEach(function(d) {
|
|
3505
|
-
jt(c, d.trim(), nt);
|
|
3506
|
-
}), S(l, "dragover", he), S(l, "mousemove", he), S(l, "touchmove", he), S(l, "mouseup", r._onDrop), S(l, "touchend", r._onDrop), S(l, "touchcancel", r._onDrop), It && this.nativeDraggable && (this.options.touchStartThreshold = 4, c.draggable = true), z("delayStart", this, {
|
|
3507
|
-
evt: e
|
|
3508
|
-
}), a.delay && (!a.delayOnTouchOnly || n) && (!this.nativeDraggable || !(xe || ae))) {
|
|
3509
|
-
if (p.eventCanceled) {
|
|
3510
|
-
this._onDrop();
|
|
3511
|
-
return;
|
|
3512
|
-
}
|
|
3513
|
-
S(l, "mouseup", r._disableDelayedDrag), S(l, "touchend", r._disableDelayedDrag), S(l, "touchcancel", r._disableDelayedDrag), S(l, "mousemove", r._delayedDragTouchMoveHandler), S(l, "touchmove", r._delayedDragTouchMoveHandler), a.supportPointer && S(l, "pointermove", r._delayedDragTouchMoveHandler), r._dragStartTimer = setTimeout(s, a.delay);
|
|
3514
|
-
} else
|
|
3515
|
-
s();
|
|
3516
|
-
}
|
|
3517
|
-
},
|
|
3518
|
-
_delayedDragTouchMoveHandler: function(e) {
|
|
3519
|
-
var n = e.touches ? e.touches[0] : e;
|
|
3520
|
-
Math.max(Math.abs(n.clientX - this._lastX), Math.abs(n.clientY - this._lastY)) >= Math.floor(this.options.touchStartThreshold / (this.nativeDraggable && window.devicePixelRatio || 1)) && this._disableDelayedDrag();
|
|
3521
|
-
},
|
|
3522
|
-
_disableDelayedDrag: function() {
|
|
3523
|
-
c && nt(c), clearTimeout(this._dragStartTimer), this._disableDelayedDragEvents();
|
|
3524
|
-
},
|
|
3525
|
-
_disableDelayedDragEvents: function() {
|
|
3526
|
-
var e = this.el.ownerDocument;
|
|
3527
|
-
E(e, "mouseup", this._disableDelayedDrag), E(e, "touchend", this._disableDelayedDrag), E(e, "touchcancel", this._disableDelayedDrag), E(e, "mousemove", this._delayedDragTouchMoveHandler), E(e, "touchmove", this._delayedDragTouchMoveHandler), E(e, "pointermove", this._delayedDragTouchMoveHandler);
|
|
3528
|
-
},
|
|
3529
|
-
_triggerDragStart: function(e, n) {
|
|
3530
|
-
n = n || e.pointerType == "touch" && e, !this.nativeDraggable || n ? this.options.supportPointer ? S(document, "pointermove", this._onTouchMove) : n ? S(document, "touchmove", this._onTouchMove) : S(document, "mousemove", this._onTouchMove) : (S(c, "dragend", this), S(T, "dragstart", this._onDragStart));
|
|
3531
|
-
try {
|
|
3532
|
-
document.selection ? He(function() {
|
|
3533
|
-
document.selection.empty();
|
|
3534
|
-
}) : window.getSelection().removeAllRanges();
|
|
3535
|
-
} catch (o) {
|
|
3536
|
-
}
|
|
3537
|
-
},
|
|
3538
|
-
_dragStarted: function(e, n) {
|
|
3539
|
-
if (ve = false, T && c) {
|
|
3540
|
-
z("dragStarted", this, {
|
|
3541
|
-
evt: n
|
|
3542
|
-
}), this.nativeDraggable && S(document, "dragover", jn);
|
|
3543
|
-
var o = this.options;
|
|
3544
|
-
!e && V(c, o.dragClass, false), V(c, o.ghostClass, true), p.active = this, e && this._appendGhost(), W({
|
|
3545
|
-
sortable: this,
|
|
3546
|
-
name: "start",
|
|
3547
|
-
originalEvent: n
|
|
3548
|
-
});
|
|
3549
|
-
} else
|
|
3550
|
-
this._nulling();
|
|
3551
|
-
},
|
|
3552
|
-
_emulateDragOver: function() {
|
|
3553
|
-
if (Z) {
|
|
3554
|
-
this._lastX = Z.clientX, this._lastY = Z.clientY, Zt();
|
|
3555
|
-
for (var e = document.elementFromPoint(Z.clientX, Z.clientY), n = e; e && e.shadowRoot && (e = e.shadowRoot.elementFromPoint(Z.clientX, Z.clientY), e !== n); )
|
|
3556
|
-
n = e;
|
|
3557
|
-
if (c.parentNode[q]._isOutsideThisEl(e), n)
|
|
3558
|
-
do {
|
|
3559
|
-
if (n[q]) {
|
|
3560
|
-
var o = void 0;
|
|
3561
|
-
if (o = n[q]._onDragOver({
|
|
3562
|
-
clientX: Z.clientX,
|
|
3563
|
-
clientY: Z.clientY,
|
|
3564
|
-
target: e,
|
|
3565
|
-
rootEl: n
|
|
3566
|
-
}), o && !this.options.dragoverBubble)
|
|
3567
|
-
break;
|
|
3568
|
-
}
|
|
3569
|
-
e = n;
|
|
3570
|
-
} while (n = n.parentNode);
|
|
3571
|
-
Qt();
|
|
3572
|
-
}
|
|
3573
|
-
},
|
|
3574
|
-
_onTouchMove: function(e) {
|
|
3575
|
-
if (de) {
|
|
3576
|
-
var n = this.options, o = n.fallbackTolerance, r = n.fallbackOffset, i = e.touches ? e.touches[0] : e, a = g && ye(g, true), l = g && a && a.a, s = g && a && a.d, u = Re && H && Nt(H), d = (i.clientX - de.clientX + r.x) / (l || 1) + (u ? u[0] - tt[0] : 0) / (l || 1), f = (i.clientY - de.clientY + r.y) / (s || 1) + (u ? u[1] - tt[1] : 0) / (s || 1);
|
|
3577
|
-
if (!p.active && !ve) {
|
|
3578
|
-
if (o && Math.max(Math.abs(i.clientX - this._lastX), Math.abs(i.clientY - this._lastY)) < o)
|
|
3579
|
-
return;
|
|
3580
|
-
this._onDragStart(e, true);
|
|
3581
|
-
}
|
|
3582
|
-
if (g) {
|
|
3583
|
-
a ? (a.e += d - (Qe || 0), a.f += f - (et || 0)) : a = {
|
|
3584
|
-
a: 1,
|
|
3585
|
-
b: 0,
|
|
3586
|
-
c: 0,
|
|
3587
|
-
d: 1,
|
|
3588
|
-
e: d,
|
|
3589
|
-
f
|
|
3590
|
-
};
|
|
3591
|
-
var m = "matrix(".concat(a.a, ",").concat(a.b, ",").concat(a.c, ",").concat(a.d, ",").concat(a.e, ",").concat(a.f, ")");
|
|
3592
|
-
h(g, "webkitTransform", m), h(g, "mozTransform", m), h(g, "msTransform", m), h(g, "transform", m), Qe = d, et = f, Z = i;
|
|
3593
|
-
}
|
|
3594
|
-
e.cancelable && e.preventDefault();
|
|
3595
|
-
}
|
|
3596
|
-
},
|
|
3597
|
-
_appendGhost: function() {
|
|
3598
|
-
if (!g) {
|
|
3599
|
-
var e = this.options.fallbackOnBody ? document.body : T, n = P(c, true, Re, true, e), o = this.options;
|
|
3600
|
-
if (Re) {
|
|
3601
|
-
for (H = e; h(H, "position") === "static" && h(H, "transform") === "none" && H !== document; )
|
|
3602
|
-
H = H.parentNode;
|
|
3603
|
-
H !== document.body && H !== document.documentElement ? (H === document && (H = te()), n.top += H.scrollTop, n.left += H.scrollLeft) : H = te(), tt = Nt(H);
|
|
3604
|
-
}
|
|
3605
|
-
g = c.cloneNode(true), V(g, o.ghostClass, false), V(g, o.fallbackClass, true), V(g, o.dragClass, true), h(g, "transition", ""), h(g, "transform", ""), h(g, "box-sizing", "border-box"), h(g, "margin", 0), h(g, "top", n.top), h(g, "left", n.left), h(g, "width", n.width), h(g, "height", n.height), h(g, "opacity", "0.8"), h(g, "position", Re ? "absolute" : "fixed"), h(g, "zIndex", "100000"), h(g, "pointerEvents", "none"), p.ghost = g, e.appendChild(g), h(g, "transform-origin", Pt / parseInt(g.style.width) * 100 + "% " + Mt / parseInt(g.style.height) * 100 + "%");
|
|
3606
|
-
}
|
|
3607
|
-
},
|
|
3608
|
-
_onDragStart: function(e, n) {
|
|
3609
|
-
var o = this, r = e.dataTransfer, i = o.options;
|
|
3610
|
-
if (z("dragStart", this, {
|
|
3611
|
-
evt: e
|
|
3612
|
-
}), p.eventCanceled) {
|
|
3613
|
-
this._onDrop();
|
|
3614
|
-
return;
|
|
3615
|
-
}
|
|
3616
|
-
z("setupClone", this), p.eventCanceled || (C = Vt(c), C.removeAttribute("id"), C.draggable = false, C.style["will-change"] = "", this._hideClone(), V(C, this.options.chosenClass, false), p.clone = C), o.cloneId = He(function() {
|
|
3617
|
-
z("clone", o), !p.eventCanceled && (o.options.removeCloneOnHide || T.insertBefore(C, c), o._hideClone(), W({
|
|
3618
|
-
sortable: o,
|
|
3619
|
-
name: "clone"
|
|
3620
|
-
}));
|
|
3621
|
-
}), !n && V(c, i.dragClass, true), n ? (Ge = true, o._loopId = setInterval(o._emulateDragOver, 50)) : (E(document, "mouseup", o._onDrop), E(document, "touchend", o._onDrop), E(document, "touchcancel", o._onDrop), r && (r.effectAllowed = "move", i.setData && i.setData.call(o, r, c)), S(document, "drop", o), h(c, "transform", "translateZ(0)")), ve = true, o._dragStartId = He(o._dragStarted.bind(o, n, e)), S(document, "selectstart", o), Se = true, Te && h(document.body, "user-select", "none");
|
|
3622
|
-
},
|
|
3623
|
-
// Returns true - if no further action is needed (either inserted or another condition)
|
|
3624
|
-
_onDragOver: function(e) {
|
|
3625
|
-
var n = this.el, o = e.target, r, i, a, l = this.options, s = l.group, u = p.active, d = Me === s, f = l.sort, m = Y || u, y, b = this, w = false;
|
|
3626
|
-
if (lt)
|
|
3627
|
-
return;
|
|
3628
|
-
function L(ee, Ee) {
|
|
3629
|
-
z(ee, b, ne({
|
|
3630
|
-
evt: e,
|
|
3631
|
-
isOwner: d,
|
|
3632
|
-
axis: y ? "vertical" : "horizontal",
|
|
3633
|
-
revert: a,
|
|
3634
|
-
dragRect: r,
|
|
3635
|
-
targetRect: i,
|
|
3636
|
-
canSort: f,
|
|
3637
|
-
fromSortable: m,
|
|
3638
|
-
target: o,
|
|
3639
|
-
completed: R,
|
|
3640
|
-
onMove: function(vt, rn) {
|
|
3641
|
-
return Xe(T, n, c, r, vt, P(vt), e, rn);
|
|
3642
|
-
},
|
|
3643
|
-
changed: j
|
|
3644
|
-
}, Ee));
|
|
3645
|
-
}
|
|
3646
|
-
function G() {
|
|
3647
|
-
L("dragOverAnimationCapture"), b.captureAnimationState(), b !== m && m.captureAnimationState();
|
|
3648
|
-
}
|
|
3649
|
-
function R(ee) {
|
|
3650
|
-
return L("dragOverCompleted", {
|
|
3651
|
-
insertion: ee
|
|
3652
|
-
}), ee && (d ? u._hideClone() : u._showClone(b), b !== m && (V(c, Y ? Y.options.ghostClass : u.options.ghostClass, false), V(c, l.ghostClass, true)), Y !== b && b !== p.active ? Y = b : b === p.active && Y && (Y = null), m === b && (b._ignoreWhileAnimating = o), b.animateAll(function() {
|
|
3653
|
-
L("dragOverAnimationComplete"), b._ignoreWhileAnimating = null;
|
|
3654
|
-
}), b !== m && (m.animateAll(), m._ignoreWhileAnimating = null)), (o === c && !c.animated || o === n && !o.animated) && (me = null), !l.dragoverBubble && !e.rootEl && o !== document && (c.parentNode[q]._isOutsideThisEl(e.target), !ee && he(e)), !l.dragoverBubble && e.stopPropagation && e.stopPropagation(), w = true;
|
|
3655
|
-
}
|
|
3656
|
-
function j() {
|
|
3657
|
-
$ = J(c), se = J(c, l.draggable), W({
|
|
3658
|
-
sortable: b,
|
|
3659
|
-
name: "change",
|
|
3660
|
-
toEl: n,
|
|
3661
|
-
newIndex: $,
|
|
3662
|
-
newDraggableIndex: se,
|
|
3663
|
-
originalEvent: e
|
|
3664
|
-
});
|
|
3665
|
-
}
|
|
3666
|
-
if (e.preventDefault !== void 0 && e.cancelable && e.preventDefault(), o = Q(o, l.draggable, n, true), L("dragOver"), p.eventCanceled)
|
|
3667
|
-
return w;
|
|
3668
|
-
if (c.contains(e.target) || o.animated && o.animatingX && o.animatingY || b._ignoreWhileAnimating === o)
|
|
3669
|
-
return R(false);
|
|
3670
|
-
if (Ge = false, u && !l.disabled && (d ? f || (a = O !== T) : Y === this || (this.lastPutMode = Me.checkPull(this, u, c, e)) && s.checkPut(this, u, c, e))) {
|
|
3671
|
-
if (y = this._getDirection(e, o) === "vertical", r = P(c), L("dragOverValid"), p.eventCanceled)
|
|
3672
|
-
return w;
|
|
3673
|
-
if (a)
|
|
3674
|
-
return O = T, G(), this._hideClone(), L("revert"), p.eventCanceled || (pe ? T.insertBefore(c, pe) : T.appendChild(c)), R(true);
|
|
3675
|
-
var B = ht(n, l.draggable);
|
|
3676
|
-
if (!B || $n(e, y, this) && !B.animated) {
|
|
3677
|
-
if (B === c)
|
|
3678
|
-
return R(false);
|
|
3679
|
-
if (B && n === e.target && (o = B), o && (i = P(o)), Xe(T, n, c, r, o, i, e, !!o) !== false)
|
|
3680
|
-
return G(), B && B.nextSibling ? n.insertBefore(c, B.nextSibling) : n.appendChild(c), O = n, j(), R(true);
|
|
3681
|
-
} else if (B && Vn(e, y, this)) {
|
|
3682
|
-
var X = we(n, 0, l, true);
|
|
3683
|
-
if (X === c)
|
|
3684
|
-
return R(false);
|
|
3685
|
-
if (o = X, i = P(o), Xe(T, n, c, r, o, i, e, false) !== false)
|
|
3686
|
-
return G(), n.insertBefore(c, X), O = n, j(), R(true);
|
|
3687
|
-
} else if (o.parentNode === n) {
|
|
3688
|
-
i = P(o);
|
|
3689
|
-
var K = 0, oe, le = c.parentNode !== n, k = !Wn(c.animated && c.toRect || r, o.animated && o.toRect || i, y), v = y ? "top" : "left", D = xt(o, "top", "top") || xt(c, "top", "top"), A = D ? D.scrollTop : void 0;
|
|
3690
|
-
me !== o && (oe = i[v], Ae = false, Fe = !k && l.invertSwap || le), K = qn(e, o, i, y, k ? 1 : l.swapThreshold, l.invertedSwapThreshold == null ? l.swapThreshold : l.invertedSwapThreshold, Fe, me === o);
|
|
3691
|
-
var I;
|
|
3692
|
-
if (K !== 0) {
|
|
3693
|
-
var _ = J(c);
|
|
3694
|
-
do
|
|
3695
|
-
_ -= K, I = O.children[_];
|
|
3696
|
-
while (I && (h(I, "display") === "none" || I === g));
|
|
3697
|
-
}
|
|
3698
|
-
if (K === 0 || I === o)
|
|
3699
|
-
return R(false);
|
|
3700
|
-
me = o, Ie = K;
|
|
3701
|
-
var x = o.nextElementSibling, M = false;
|
|
3702
|
-
M = K === 1;
|
|
3703
|
-
var F = Xe(T, n, c, r, o, i, e, M);
|
|
3704
|
-
if (F !== false)
|
|
3705
|
-
return (F === 1 || F === -1) && (M = F === 1), lt = true, setTimeout(Un, 30), G(), M && !x ? n.appendChild(c) : o.parentNode.insertBefore(c, M ? x : o), D && Ut(D, 0, A - D.scrollTop), O = c.parentNode, oe !== void 0 && !Fe && (ke = Math.abs(oe - P(o)[v])), j(), R(true);
|
|
3706
|
-
}
|
|
3707
|
-
if (n.contains(c))
|
|
3708
|
-
return R(false);
|
|
3709
|
-
}
|
|
3710
|
-
return false;
|
|
3711
|
-
},
|
|
3712
|
-
_ignoreWhileAnimating: null,
|
|
3713
|
-
_offMoveEvents: function() {
|
|
3714
|
-
E(document, "mousemove", this._onTouchMove), E(document, "touchmove", this._onTouchMove), E(document, "pointermove", this._onTouchMove), E(document, "dragover", he), E(document, "mousemove", he), E(document, "touchmove", he);
|
|
3715
|
-
},
|
|
3716
|
-
_offUpEvents: function() {
|
|
3717
|
-
var e = this.el.ownerDocument;
|
|
3718
|
-
E(e, "mouseup", this._onDrop), E(e, "touchend", this._onDrop), E(e, "pointerup", this._onDrop), E(e, "touchcancel", this._onDrop), E(document, "selectstart", this);
|
|
3719
|
-
},
|
|
3720
|
-
_onDrop: function(e) {
|
|
3721
|
-
var n = this.el, o = this.options;
|
|
3722
|
-
if ($ = J(c), se = J(c, o.draggable), z("drop", this, {
|
|
3723
|
-
evt: e
|
|
3724
|
-
}), O = c && c.parentNode, $ = J(c), se = J(c, o.draggable), p.eventCanceled) {
|
|
3725
|
-
this._nulling();
|
|
3726
|
-
return;
|
|
3727
|
-
}
|
|
3728
|
-
ve = false, Fe = false, Ae = false, clearInterval(this._loopId), clearTimeout(this._dragStartTimer), st(this.cloneId), st(this._dragStartId), this.nativeDraggable && (E(document, "drop", this), E(n, "dragstart", this._onDragStart)), this._offMoveEvents(), this._offUpEvents(), Te && h(document.body, "user-select", ""), h(c, "transform", ""), e && (Se && (e.cancelable && e.preventDefault(), !o.dropBubble && e.stopPropagation()), g && g.parentNode && g.parentNode.removeChild(g), (T === O || Y && Y.lastPutMode !== "clone") && C && C.parentNode && C.parentNode.removeChild(C), c && (this.nativeDraggable && E(c, "dragend", this), nt(c), c.style["will-change"] = "", Se && !ve && V(c, Y ? Y.options.ghostClass : this.options.ghostClass, false), V(c, this.options.chosenClass, false), W({
|
|
3729
|
-
sortable: this,
|
|
3730
|
-
name: "unchoose",
|
|
3731
|
-
toEl: O,
|
|
3732
|
-
newIndex: null,
|
|
3733
|
-
newDraggableIndex: null,
|
|
3734
|
-
originalEvent: e
|
|
3735
|
-
}), T !== O ? ($ >= 0 && (W({
|
|
3736
|
-
rootEl: O,
|
|
3737
|
-
name: "add",
|
|
3738
|
-
toEl: O,
|
|
3739
|
-
fromEl: T,
|
|
3740
|
-
originalEvent: e
|
|
3741
|
-
}), W({
|
|
3742
|
-
sortable: this,
|
|
3743
|
-
name: "remove",
|
|
3744
|
-
toEl: O,
|
|
3745
|
-
originalEvent: e
|
|
3746
|
-
}), W({
|
|
3747
|
-
rootEl: O,
|
|
3748
|
-
name: "sort",
|
|
3749
|
-
toEl: O,
|
|
3750
|
-
fromEl: T,
|
|
3751
|
-
originalEvent: e
|
|
3752
|
-
}), W({
|
|
3753
|
-
sortable: this,
|
|
3754
|
-
name: "sort",
|
|
3755
|
-
toEl: O,
|
|
3756
|
-
originalEvent: e
|
|
3757
|
-
})), Y && Y.save()) : $ !== be && $ >= 0 && (W({
|
|
3758
|
-
sortable: this,
|
|
3759
|
-
name: "update",
|
|
3760
|
-
toEl: O,
|
|
3761
|
-
originalEvent: e
|
|
3762
|
-
}), W({
|
|
3763
|
-
sortable: this,
|
|
3764
|
-
name: "sort",
|
|
3765
|
-
toEl: O,
|
|
3766
|
-
originalEvent: e
|
|
3767
|
-
})), p.active && (($ == null || $ === -1) && ($ = be, se = Oe), W({
|
|
3768
|
-
sortable: this,
|
|
3769
|
-
name: "end",
|
|
3770
|
-
toEl: O,
|
|
3771
|
-
originalEvent: e
|
|
3772
|
-
}), this.save()))), this._nulling();
|
|
3773
|
-
},
|
|
3774
|
-
_nulling: function() {
|
|
3775
|
-
z("nulling", this), T = c = O = g = pe = C = Be = ue = de = Z = Se = $ = se = be = Oe = me = Ie = Y = Me = p.dragged = p.ghost = p.clone = p.active = null, ze.forEach(function(e) {
|
|
3776
|
-
e.checked = true;
|
|
3777
|
-
}), ze.length = Qe = et = 0;
|
|
3778
|
-
},
|
|
3779
|
-
handleEvent: function(e) {
|
|
3780
|
-
switch (e.type) {
|
|
3781
|
-
case "drop":
|
|
3782
|
-
case "dragend":
|
|
3783
|
-
this._onDrop(e);
|
|
3784
|
-
break;
|
|
3785
|
-
case "dragenter":
|
|
3786
|
-
case "dragover":
|
|
3787
|
-
c && (this._onDragOver(e), zn(e));
|
|
3788
|
-
break;
|
|
3789
|
-
case "selectstart":
|
|
3790
|
-
e.preventDefault();
|
|
3791
|
-
break;
|
|
3792
|
-
}
|
|
3793
|
-
},
|
|
3794
|
-
/**
|
|
3795
|
-
* Serializes the item into an array of string.
|
|
3796
|
-
* @returns {String[]}
|
|
3797
|
-
*/
|
|
3798
|
-
toArray: function() {
|
|
3799
|
-
for (var e = [], n, o = this.el.children, r = 0, i = o.length, a = this.options; r < i; r++)
|
|
3800
|
-
n = o[r], Q(n, a.draggable, this.el, false) && e.push(n.getAttribute(a.dataIdAttr) || Jn(n));
|
|
3801
|
-
return e;
|
|
3802
|
-
},
|
|
3803
|
-
/**
|
|
3804
|
-
* Sorts the elements according to the array.
|
|
3805
|
-
* @param {String[]} order order of the items
|
|
3806
|
-
*/
|
|
3807
|
-
sort: function(e, n) {
|
|
3808
|
-
var o = {}, r = this.el;
|
|
3809
|
-
this.toArray().forEach(function(i, a) {
|
|
3810
|
-
var l = r.children[a];
|
|
3811
|
-
Q(l, this.options.draggable, r, false) && (o[i] = l);
|
|
3812
|
-
}, this), n && this.captureAnimationState(), e.forEach(function(i) {
|
|
3813
|
-
o[i] && (r.removeChild(o[i]), r.appendChild(o[i]));
|
|
3814
|
-
}), n && this.animateAll();
|
|
3815
|
-
},
|
|
3816
|
-
/**
|
|
3817
|
-
* Save the current sorting
|
|
3818
|
-
*/
|
|
3819
|
-
save: function() {
|
|
3820
|
-
var e = this.options.store;
|
|
3821
|
-
e && e.set && e.set(this);
|
|
3822
|
-
},
|
|
3823
|
-
/**
|
|
3824
|
-
* For each element in the set, get the first element that matches the selector by testing the element itself and traversing up through its ancestors in the DOM tree.
|
|
3825
|
-
* @param {HTMLElement} el
|
|
3826
|
-
* @param {String} [selector] default: `options.draggable`
|
|
3827
|
-
* @returns {HTMLElement|null}
|
|
3828
|
-
*/
|
|
3829
|
-
closest: function(e, n) {
|
|
3830
|
-
return Q(e, n || this.options.draggable, this.el, false);
|
|
3831
|
-
},
|
|
3832
|
-
/**
|
|
3833
|
-
* Set/get option
|
|
3834
|
-
* @param {string} name
|
|
3835
|
-
* @param {*} [value]
|
|
3836
|
-
* @returns {*}
|
|
3837
|
-
*/
|
|
3838
|
-
option: function(e, n) {
|
|
3839
|
-
var o = this.options;
|
|
3840
|
-
if (n === void 0)
|
|
3841
|
-
return o[e];
|
|
3842
|
-
var r = Ne.modifyOption(this, e, n);
|
|
3843
|
-
typeof r != "undefined" ? o[e] = r : o[e] = n, e === "group" && Jt(o);
|
|
3844
|
-
},
|
|
3845
|
-
/**
|
|
3846
|
-
* Destroy
|
|
3847
|
-
*/
|
|
3848
|
-
destroy: function() {
|
|
3849
|
-
z("destroy", this);
|
|
3850
|
-
var e = this.el;
|
|
3851
|
-
e[q] = null, E(e, "mousedown", this._onTapStart), E(e, "touchstart", this._onTapStart), E(e, "pointerdown", this._onTapStart), this.nativeDraggable && (E(e, "dragover", this), E(e, "dragenter", this)), Array.prototype.forEach.call(e.querySelectorAll("[draggable]"), function(n) {
|
|
3852
|
-
n.removeAttribute("draggable");
|
|
3853
|
-
}), this._onDrop(), this._disableDelayedDragEvents(), je.splice(je.indexOf(this.el), 1), this.el = e = null;
|
|
3854
|
-
},
|
|
3855
|
-
_hideClone: function() {
|
|
3856
|
-
if (!ue) {
|
|
3857
|
-
if (z("hideClone", this), p.eventCanceled)
|
|
3858
|
-
return;
|
|
3859
|
-
h(C, "display", "none"), this.options.removeCloneOnHide && C.parentNode && C.parentNode.removeChild(C), ue = true;
|
|
3860
|
-
}
|
|
3861
|
-
},
|
|
3862
|
-
_showClone: function(e) {
|
|
3863
|
-
if (e.lastPutMode !== "clone") {
|
|
3864
|
-
this._hideClone();
|
|
3865
|
-
return;
|
|
3866
|
-
}
|
|
3867
|
-
if (ue) {
|
|
3868
|
-
if (z("showClone", this), p.eventCanceled)
|
|
3869
|
-
return;
|
|
3870
|
-
c.parentNode == T && !this.options.group.revertClone ? T.insertBefore(C, c) : pe ? T.insertBefore(C, pe) : T.appendChild(C), this.options.group.revertClone && this.animate(c, C), h(C, "display", ""), ue = false;
|
|
3871
|
-
}
|
|
3872
|
-
}
|
|
3873
|
-
};
|
|
3874
|
-
function zn(t) {
|
|
3875
|
-
t.dataTransfer && (t.dataTransfer.dropEffect = "move"), t.cancelable && t.preventDefault();
|
|
3876
|
-
}
|
|
3877
|
-
function Xe(t, e, n, o, r, i, a, l) {
|
|
3878
|
-
var s, u = t[q], d = u.options.onMove, f;
|
|
3879
|
-
return window.CustomEvent && !ae && !xe ? s = new CustomEvent("move", {
|
|
3880
|
-
bubbles: true,
|
|
3881
|
-
cancelable: true
|
|
3882
|
-
}) : (s = document.createEvent("Event"), s.initEvent("move", true, true)), s.to = e, s.from = t, s.dragged = n, s.draggedRect = o, s.related = r || e, s.relatedRect = i || P(e), s.willInsertAfter = l, s.originalEvent = a, t.dispatchEvent(s), d && (f = d.call(u, s, a)), f;
|
|
3883
|
-
}
|
|
3884
|
-
function nt(t) {
|
|
3885
|
-
t.draggable = false;
|
|
3886
|
-
}
|
|
3887
|
-
function Un() {
|
|
3888
|
-
lt = false;
|
|
3889
|
-
}
|
|
3890
|
-
function Vn(t, e, n) {
|
|
3891
|
-
var o = P(we(n.el, 0, n.options, true)), r = $t(n.el, n.options, g), i = 10;
|
|
3892
|
-
return e ? t.clientX < r.left - i || t.clientY < o.top && t.clientX < o.right : t.clientY < r.top - i || t.clientY < o.bottom && t.clientX < o.left;
|
|
3893
|
-
}
|
|
3894
|
-
function $n(t, e, n) {
|
|
3895
|
-
var o = P(ht(n.el, n.options.draggable)), r = $t(n.el, n.options, g), i = 10;
|
|
3896
|
-
return e ? t.clientX > r.right + i || t.clientY > o.bottom && t.clientX > o.left : t.clientY > r.bottom + i || t.clientX > o.right && t.clientY > o.top;
|
|
3897
|
-
}
|
|
3898
|
-
function qn(t, e, n, o, r, i, a, l) {
|
|
3899
|
-
var s = o ? t.clientY : t.clientX, u = o ? n.height : n.width, d = o ? n.top : n.left, f = o ? n.bottom : n.right, m = false;
|
|
3900
|
-
if (!a) {
|
|
3901
|
-
if (l && ke < u * r) {
|
|
3902
|
-
if (!Ae && (Ie === 1 ? s > d + u * i / 2 : s < f - u * i / 2) && (Ae = true), Ae)
|
|
3903
|
-
m = true;
|
|
3904
|
-
else if (Ie === 1 ? s < d + ke : s > f - ke)
|
|
3905
|
-
return -Ie;
|
|
3906
|
-
} else if (s > d + u * (1 - r) / 2 && s < f - u * (1 - r) / 2)
|
|
3907
|
-
return Kn(e);
|
|
3908
|
-
}
|
|
3909
|
-
return m = m || a, m && (s < d + u * i / 2 || s > f - u * i / 2) ? s > d + u / 2 ? 1 : -1 : 0;
|
|
3910
|
-
}
|
|
3911
|
-
function Kn(t) {
|
|
3912
|
-
return J(c) < J(t) ? 1 : -1;
|
|
3913
|
-
}
|
|
3914
|
-
function Jn(t) {
|
|
3915
|
-
for (var e = t.tagName + t.className + t.src + t.href + t.textContent, n = e.length, o = 0; n--; )
|
|
3916
|
-
o += e.charCodeAt(n);
|
|
3917
|
-
return o.toString(36);
|
|
3918
|
-
}
|
|
3919
|
-
function Zn(t) {
|
|
3920
|
-
ze.length = 0;
|
|
3921
|
-
for (var e = t.getElementsByTagName("input"), n = e.length; n--; ) {
|
|
3922
|
-
var o = e[n];
|
|
3923
|
-
o.checked && ze.push(o);
|
|
3924
|
-
}
|
|
3925
|
-
}
|
|
3926
|
-
function He(t) {
|
|
3927
|
-
return setTimeout(t, 0);
|
|
3928
|
-
}
|
|
3929
|
-
function st(t) {
|
|
3930
|
-
return clearTimeout(t);
|
|
3931
|
-
}
|
|
3932
|
-
Ve && S(document, "touchmove", function(t) {
|
|
3933
|
-
(p.active || ve) && t.cancelable && t.preventDefault();
|
|
3934
|
-
});
|
|
3935
|
-
p.utils = {
|
|
3936
|
-
on: S,
|
|
3937
|
-
off: E,
|
|
3938
|
-
css: h,
|
|
3939
|
-
find: jt,
|
|
3940
|
-
is: function(e, n) {
|
|
3941
|
-
return !!Q(e, n, e, false);
|
|
3942
|
-
},
|
|
3943
|
-
extend: Fn,
|
|
3944
|
-
throttle: zt,
|
|
3945
|
-
closest: Q,
|
|
3946
|
-
toggleClass: V,
|
|
3947
|
-
clone: Vt,
|
|
3948
|
-
index: J,
|
|
3949
|
-
nextTick: He,
|
|
3950
|
-
cancelNextTick: st,
|
|
3951
|
-
detectDirection: Kt,
|
|
3952
|
-
getChild: we
|
|
3953
|
-
};
|
|
3954
|
-
p.get = function(t) {
|
|
3955
|
-
return t[q];
|
|
3956
|
-
};
|
|
3957
|
-
p.mount = function() {
|
|
3958
|
-
for (var t = arguments.length, e = new Array(t), n = 0; n < t; n++)
|
|
3959
|
-
e[n] = arguments[n];
|
|
3960
|
-
e[0].constructor === Array && (e = e[0]), e.forEach(function(o) {
|
|
3961
|
-
if (!o.prototype || !o.prototype.constructor)
|
|
3962
|
-
throw "Sortable: Mounted plugin must be a constructor function, not ".concat({}.toString.call(o));
|
|
3963
|
-
o.utils && (p.utils = ne(ne({}, p.utils), o.utils)), Ne.mount(o);
|
|
3964
|
-
});
|
|
3965
|
-
};
|
|
3966
|
-
p.create = function(t, e) {
|
|
3967
|
-
return new p(t, e);
|
|
3968
|
-
};
|
|
3969
|
-
p.version = Nn;
|
|
3970
|
-
var N = [], De, ut, ct = false, ot, rt, Ue, _e;
|
|
3971
|
-
function Qn() {
|
|
3972
|
-
function t() {
|
|
3973
|
-
this.defaults = {
|
|
3974
|
-
scroll: true,
|
|
3975
|
-
forceAutoScrollFallback: false,
|
|
3976
|
-
scrollSensitivity: 30,
|
|
3977
|
-
scrollSpeed: 10,
|
|
3978
|
-
bubbleScroll: true
|
|
3979
|
-
};
|
|
3980
|
-
for (var e in this)
|
|
3981
|
-
e.charAt(0) === "_" && typeof this[e] == "function" && (this[e] = this[e].bind(this));
|
|
3982
|
-
}
|
|
3983
|
-
return t.prototype = {
|
|
3984
|
-
dragStarted: function(n) {
|
|
3985
|
-
var o = n.originalEvent;
|
|
3986
|
-
this.sortable.nativeDraggable ? S(document, "dragover", this._handleAutoScroll) : this.options.supportPointer ? S(document, "pointermove", this._handleFallbackAutoScroll) : o.touches ? S(document, "touchmove", this._handleFallbackAutoScroll) : S(document, "mousemove", this._handleFallbackAutoScroll);
|
|
3987
|
-
},
|
|
3988
|
-
dragOverCompleted: function(n) {
|
|
3989
|
-
var o = n.originalEvent;
|
|
3990
|
-
!this.options.dragOverBubble && !o.rootEl && this._handleAutoScroll(o);
|
|
3991
|
-
},
|
|
3992
|
-
drop: function() {
|
|
3993
|
-
this.sortable.nativeDraggable ? E(document, "dragover", this._handleAutoScroll) : (E(document, "pointermove", this._handleFallbackAutoScroll), E(document, "touchmove", this._handleFallbackAutoScroll), E(document, "mousemove", this._handleFallbackAutoScroll)), Rt(), Le(), Rn();
|
|
3994
|
-
},
|
|
3995
|
-
nulling: function() {
|
|
3996
|
-
Ue = ut = De = ct = _e = ot = rt = null, N.length = 0;
|
|
3997
|
-
},
|
|
3998
|
-
_handleFallbackAutoScroll: function(n) {
|
|
3999
|
-
this._handleAutoScroll(n, true);
|
|
4000
|
-
},
|
|
4001
|
-
_handleAutoScroll: function(n, o) {
|
|
4002
|
-
var r = this, i = (n.touches ? n.touches[0] : n).clientX, a = (n.touches ? n.touches[0] : n).clientY, l = document.elementFromPoint(i, a);
|
|
4003
|
-
if (Ue = n, o || this.options.forceAutoScrollFallback || xe || ae || Te) {
|
|
4004
|
-
it(n, this.options, l, o);
|
|
4005
|
-
var s = ce(l, true);
|
|
4006
|
-
ct && (!_e || i !== ot || a !== rt) && (_e && Rt(), _e = setInterval(function() {
|
|
4007
|
-
var u = ce(document.elementFromPoint(i, a), true);
|
|
4008
|
-
u !== s && (s = u, Le()), it(n, r.options, u, o);
|
|
4009
|
-
}, 10), ot = i, rt = a);
|
|
4010
|
-
} else {
|
|
4011
|
-
if (!this.options.bubbleScroll || ce(l, true) === te()) {
|
|
4012
|
-
Le();
|
|
4013
|
-
return;
|
|
4014
|
-
}
|
|
4015
|
-
it(n, this.options, ce(l, false), false);
|
|
4016
|
-
}
|
|
4017
|
-
}
|
|
4018
|
-
}, ie(t, {
|
|
4019
|
-
pluginName: "scroll",
|
|
4020
|
-
initializeByDefault: true
|
|
4021
|
-
});
|
|
4022
|
-
}
|
|
4023
|
-
function Le() {
|
|
4024
|
-
N.forEach(function(t) {
|
|
4025
|
-
clearInterval(t.pid);
|
|
4026
|
-
}), N = [];
|
|
4027
|
-
}
|
|
4028
|
-
function Rt() {
|
|
4029
|
-
clearInterval(_e);
|
|
4030
|
-
}
|
|
4031
|
-
var it = zt(function(t, e, n, o) {
|
|
4032
|
-
if (e.scroll) {
|
|
4033
|
-
var r = (t.touches ? t.touches[0] : t).clientX, i = (t.touches ? t.touches[0] : t).clientY, a = e.scrollSensitivity, l = e.scrollSpeed, s = te(), u = false, d;
|
|
4034
|
-
ut !== n && (ut = n, Le(), De = e.scroll, d = e.scrollFn, De === true && (De = ce(n, true)));
|
|
4035
|
-
var f = 0, m = De;
|
|
4036
|
-
do {
|
|
4037
|
-
var y = m, b = P(y), w = b.top, L = b.bottom, G = b.left, R = b.right, j = b.width, B = b.height, X = void 0, K = void 0, oe = y.scrollWidth, le = y.scrollHeight, k = h(y), v = y.scrollLeft, D = y.scrollTop;
|
|
4038
|
-
y === s ? (X = j < oe && (k.overflowX === "auto" || k.overflowX === "scroll" || k.overflowX === "visible"), K = B < le && (k.overflowY === "auto" || k.overflowY === "scroll" || k.overflowY === "visible")) : (X = j < oe && (k.overflowX === "auto" || k.overflowX === "scroll"), K = B < le && (k.overflowY === "auto" || k.overflowY === "scroll"));
|
|
4039
|
-
var A = X && (Math.abs(R - r) <= a && v + j < oe) - (Math.abs(G - r) <= a && !!v), I = K && (Math.abs(L - i) <= a && D + B < le) - (Math.abs(w - i) <= a && !!D);
|
|
4040
|
-
if (!N[f])
|
|
4041
|
-
for (var _ = 0; _ <= f; _++)
|
|
4042
|
-
N[_] || (N[_] = {});
|
|
4043
|
-
(N[f].vx != A || N[f].vy != I || N[f].el !== y) && (N[f].el = y, N[f].vx = A, N[f].vy = I, clearInterval(N[f].pid), (A != 0 || I != 0) && (u = true, N[f].pid = setInterval((function() {
|
|
4044
|
-
o && this.layer === 0 && p.active._onTouchMove(Ue);
|
|
4045
|
-
var x = N[this.layer].vy ? N[this.layer].vy * l : 0, M = N[this.layer].vx ? N[this.layer].vx * l : 0;
|
|
4046
|
-
typeof d == "function" && d.call(p.dragged.parentNode[q], M, x, t, Ue, N[this.layer].el) !== "continue" || Ut(N[this.layer].el, M, x);
|
|
4047
|
-
}).bind({
|
|
4048
|
-
layer: f
|
|
4049
|
-
}), 24))), f++;
|
|
4050
|
-
} while (e.bubbleScroll && m !== s && (m = ce(m, false)));
|
|
4051
|
-
ct = u;
|
|
4052
|
-
}
|
|
4053
|
-
}, 30), en = function(e) {
|
|
4054
|
-
var n = e.originalEvent, o = e.putSortable, r = e.dragEl, i = e.activeSortable, a = e.dispatchSortableEvent, l = e.hideGhostForTarget, s = e.unhideGhostForTarget;
|
|
4055
|
-
if (n) {
|
|
4056
|
-
var u = o || i;
|
|
4057
|
-
l();
|
|
4058
|
-
var d = n.changedTouches && n.changedTouches.length ? n.changedTouches[0] : n, f = document.elementFromPoint(d.clientX, d.clientY);
|
|
4059
|
-
s(), u && !u.el.contains(f) && (a("spill"), this.onSpill({
|
|
4060
|
-
dragEl: r,
|
|
4061
|
-
putSortable: o
|
|
4062
|
-
}));
|
|
4063
|
-
}
|
|
4064
|
-
};
|
|
4065
|
-
function pt() {
|
|
4066
|
-
}
|
|
4067
|
-
pt.prototype = {
|
|
4068
|
-
startIndex: null,
|
|
4069
|
-
dragStart: function(e) {
|
|
4070
|
-
var n = e.oldDraggableIndex;
|
|
4071
|
-
this.startIndex = n;
|
|
4072
|
-
},
|
|
4073
|
-
onSpill: function(e) {
|
|
4074
|
-
var n = e.dragEl, o = e.putSortable;
|
|
4075
|
-
this.sortable.captureAnimationState(), o && o.captureAnimationState();
|
|
4076
|
-
var r = we(this.sortable.el, this.startIndex, this.options);
|
|
4077
|
-
r ? this.sortable.el.insertBefore(n, r) : this.sortable.el.appendChild(n), this.sortable.animateAll(), o && o.animateAll();
|
|
4078
|
-
},
|
|
4079
|
-
drop: en
|
|
4080
|
-
};
|
|
4081
|
-
ie(pt, {
|
|
4082
|
-
pluginName: "revertOnSpill"
|
|
4083
|
-
});
|
|
4084
|
-
function gt() {
|
|
4085
|
-
}
|
|
4086
|
-
gt.prototype = {
|
|
4087
|
-
onSpill: function(e) {
|
|
4088
|
-
var n = e.dragEl, o = e.putSortable, r = o || this.sortable;
|
|
4089
|
-
r.captureAnimationState(), n.parentNode && n.parentNode.removeChild(n), r.animateAll();
|
|
4090
|
-
},
|
|
4091
|
-
drop: en
|
|
4092
|
-
};
|
|
4093
|
-
ie(gt, {
|
|
4094
|
-
pluginName: "removeOnSpill"
|
|
4095
|
-
});
|
|
4096
|
-
p.mount(new Qn());
|
|
4097
|
-
p.mount(gt, pt);
|
|
4098
|
-
function eo(t) {
|
|
4099
|
-
return t == null ? t : JSON.parse(JSON.stringify(t));
|
|
4100
|
-
}
|
|
4101
|
-
function to(t) {
|
|
4102
|
-
getCurrentInstance() && onUnmounted(t);
|
|
4103
|
-
}
|
|
4104
|
-
function no(t) {
|
|
4105
|
-
getCurrentInstance() ? onMounted(t) : nextTick(t);
|
|
4106
|
-
}
|
|
4107
|
-
let tn = null, nn = null;
|
|
4108
|
-
function Xt(t = null, e = null) {
|
|
4109
|
-
tn = t, nn = e;
|
|
4110
|
-
}
|
|
4111
|
-
function oo() {
|
|
4112
|
-
return {
|
|
4113
|
-
data: tn,
|
|
4114
|
-
clonedData: nn
|
|
4115
|
-
};
|
|
4116
|
-
}
|
|
4117
|
-
const Yt = Symbol("cloneElement");
|
|
4118
|
-
function on(...t) {
|
|
4119
|
-
var le, k;
|
|
4120
|
-
const e = (le = getCurrentInstance()) == null ? void 0 : le.proxy;
|
|
4121
|
-
let n = null;
|
|
4122
|
-
const o = t[0];
|
|
4123
|
-
let [, r, i] = t;
|
|
4124
|
-
Array.isArray(unref(r)) || (i = r, r = null);
|
|
4125
|
-
let a = null;
|
|
4126
|
-
const {
|
|
4127
|
-
immediate: l = true,
|
|
4128
|
-
clone: s = eo,
|
|
4129
|
-
forceFallback: u,
|
|
4130
|
-
fallbackOnBody: d,
|
|
4131
|
-
customUpdate: f
|
|
4132
|
-
} = (k = unref(i)) != null ? k : {};
|
|
4133
|
-
function m(v) {
|
|
4134
|
-
var F;
|
|
4135
|
-
const { from: D, oldIndex: A, item: I } = v, _ = Array.from(D.childNodes);
|
|
4136
|
-
n = u && !d ? _.slice(0, -1) : _;
|
|
4137
|
-
const x = unref((F = unref(r)) == null ? void 0 : F[A]), M = s(x);
|
|
4138
|
-
Xt(x, M), I[Yt] = M;
|
|
4139
|
-
}
|
|
4140
|
-
function y(v) {
|
|
4141
|
-
const D = v.item[Yt];
|
|
4142
|
-
if (!wn(D)) {
|
|
4143
|
-
if (Ke(v.item), isRef(r)) {
|
|
4144
|
-
const A = [...unref(r)];
|
|
4145
|
-
r.value = _t(A, v.newDraggableIndex, D);
|
|
4146
|
-
return;
|
|
4147
|
-
}
|
|
4148
|
-
_t(unref(r), v.newDraggableIndex, D);
|
|
4149
|
-
}
|
|
4150
|
-
}
|
|
4151
|
-
function b(v) {
|
|
4152
|
-
const { from: D, item: A, oldIndex: I, oldDraggableIndex: _, pullMode: x, clone: M } = v;
|
|
4153
|
-
if (Tt(D, A, I), x === "clone") {
|
|
4154
|
-
Ke(M);
|
|
4155
|
-
return;
|
|
4156
|
-
}
|
|
4157
|
-
if (isRef(r)) {
|
|
4158
|
-
const F = [...unref(r)];
|
|
4159
|
-
r.value = Dt(F, _);
|
|
4160
|
-
return;
|
|
4161
|
-
}
|
|
4162
|
-
Dt(unref(r), _);
|
|
4163
|
-
}
|
|
4164
|
-
function w(v) {
|
|
4165
|
-
if (f) {
|
|
4166
|
-
f(v);
|
|
4167
|
-
return;
|
|
4168
|
-
}
|
|
4169
|
-
const { from: D, item: A, oldIndex: I, oldDraggableIndex: _, newDraggableIndex: x } = v;
|
|
4170
|
-
if (Ke(A), Tt(D, A, I), isRef(r)) {
|
|
4171
|
-
const M = [...unref(r)];
|
|
4172
|
-
r.value = St(
|
|
4173
|
-
M,
|
|
4174
|
-
_,
|
|
4175
|
-
x
|
|
4176
|
-
);
|
|
4177
|
-
return;
|
|
4178
|
-
}
|
|
4179
|
-
St(unref(r), _, x);
|
|
4180
|
-
}
|
|
4181
|
-
function L(v) {
|
|
4182
|
-
const { newIndex: D, oldIndex: A, from: I, to: _ } = v;
|
|
4183
|
-
let x = null;
|
|
4184
|
-
const M = D === A && I === _;
|
|
4185
|
-
try {
|
|
4186
|
-
if (M) {
|
|
4187
|
-
let F = null;
|
|
4188
|
-
n == null || n.some((ee, Ee) => {
|
|
4189
|
-
if (F && (n == null ? void 0 : n.length) !== _.childNodes.length)
|
|
4190
|
-
return I.insertBefore(F, ee.nextSibling), true;
|
|
4191
|
-
const mt = _.childNodes[Ee];
|
|
4192
|
-
F = _ == null ? void 0 : _.replaceChild(ee, mt);
|
|
4193
|
-
});
|
|
4194
|
-
}
|
|
4195
|
-
} catch (F) {
|
|
4196
|
-
x = F;
|
|
4197
|
-
} finally {
|
|
4198
|
-
n = null;
|
|
4199
|
-
}
|
|
4200
|
-
nextTick(() => {
|
|
4201
|
-
if (Xt(), x)
|
|
4202
|
-
throw x;
|
|
4203
|
-
});
|
|
4204
|
-
}
|
|
4205
|
-
const G = {
|
|
4206
|
-
onUpdate: w,
|
|
4207
|
-
onStart: m,
|
|
4208
|
-
onAdd: y,
|
|
4209
|
-
onRemove: b,
|
|
4210
|
-
onEnd: L
|
|
4211
|
-
};
|
|
4212
|
-
function R(v) {
|
|
4213
|
-
const D = unref(o);
|
|
4214
|
-
return v || (v = En(D) ? Sn(D, e == null ? void 0 : e.$el) : D), v && !Tn(v) && (v = v.$el), v || vn("Root element not found"), v;
|
|
4215
|
-
}
|
|
4216
|
-
function j() {
|
|
4217
|
-
var I;
|
|
4218
|
-
const _ = (I = unref(i)) != null ? I : {}, { immediate: v, clone: D } = _, A = $e(_, ["immediate", "clone"]);
|
|
4219
|
-
return Ct(A, (x, M) => {
|
|
4220
|
-
Cn(x) && (A[x] = (F, ...ee) => {
|
|
4221
|
-
const Ee = oo();
|
|
4222
|
-
return On(F, Ee), M(F, ...ee);
|
|
4223
|
-
});
|
|
4224
|
-
}), _n(
|
|
4225
|
-
r === null ? {} : G,
|
|
4226
|
-
A
|
|
4227
|
-
);
|
|
4228
|
-
}
|
|
4229
|
-
const B = (v) => {
|
|
4230
|
-
v = R(v), a && X.destroy(), a = new p(v, j());
|
|
4231
|
-
};
|
|
4232
|
-
watch(
|
|
4233
|
-
() => i,
|
|
4234
|
-
() => {
|
|
4235
|
-
a && Ct(j(), (v, D) => {
|
|
4236
|
-
a == null || a.option(v, D);
|
|
4237
|
-
});
|
|
4238
|
-
},
|
|
4239
|
-
{ deep: true }
|
|
4240
|
-
);
|
|
4241
|
-
const X = {
|
|
4242
|
-
option: (v, D) => a == null ? void 0 : a.option(v, D),
|
|
4243
|
-
destroy: () => {
|
|
4244
|
-
a == null || a.destroy(), a = null;
|
|
4245
|
-
},
|
|
4246
|
-
save: () => a == null ? void 0 : a.save(),
|
|
4247
|
-
toArray: () => a == null ? void 0 : a.toArray(),
|
|
4248
|
-
closest: (...v) => a == null ? void 0 : a.closest(...v)
|
|
4249
|
-
}, K = () => X == null ? void 0 : X.option("disabled", true), oe = () => X == null ? void 0 : X.option("disabled", false);
|
|
4250
|
-
return no(() => {
|
|
4251
|
-
l && B();
|
|
4252
|
-
}), to(X.destroy), fe({ start: B, pause: K, resume: oe }, X);
|
|
4253
|
-
}
|
|
4254
|
-
const ft = [
|
|
4255
|
-
"update",
|
|
4256
|
-
"start",
|
|
4257
|
-
"add",
|
|
4258
|
-
"remove",
|
|
4259
|
-
"choose",
|
|
4260
|
-
"unchoose",
|
|
4261
|
-
"end",
|
|
4262
|
-
"sort",
|
|
4263
|
-
"filter",
|
|
4264
|
-
"clone",
|
|
4265
|
-
"move",
|
|
4266
|
-
"change"
|
|
4267
|
-
], ro = [
|
|
4268
|
-
"clone",
|
|
4269
|
-
"animation",
|
|
4270
|
-
"ghostClass",
|
|
4271
|
-
"group",
|
|
4272
|
-
"sort",
|
|
4273
|
-
"disabled",
|
|
4274
|
-
"store",
|
|
4275
|
-
"handle",
|
|
4276
|
-
"draggable",
|
|
4277
|
-
"swapThreshold",
|
|
4278
|
-
"invertSwap",
|
|
4279
|
-
"invertedSwapThreshold",
|
|
4280
|
-
"removeCloneOnHide",
|
|
4281
|
-
"direction",
|
|
4282
|
-
"chosenClass",
|
|
4283
|
-
"dragClass",
|
|
4284
|
-
"ignore",
|
|
4285
|
-
"filter",
|
|
4286
|
-
"preventOnFilter",
|
|
4287
|
-
"easing",
|
|
4288
|
-
"setData",
|
|
4289
|
-
"dropBubble",
|
|
4290
|
-
"dragoverBubble",
|
|
4291
|
-
"dataIdAttr",
|
|
4292
|
-
"delay",
|
|
4293
|
-
"delayOnTouchOnly",
|
|
4294
|
-
"touchStartThreshold",
|
|
4295
|
-
"forceFallback",
|
|
4296
|
-
"fallbackClass",
|
|
4297
|
-
"fallbackOnBody",
|
|
4298
|
-
"fallbackTolerance",
|
|
4299
|
-
"fallbackOffset",
|
|
4300
|
-
"supportPointer",
|
|
4301
|
-
"emptyInsertThreshold",
|
|
4302
|
-
"scroll",
|
|
4303
|
-
"forceAutoScrollFallback",
|
|
4304
|
-
"scrollSensitivity",
|
|
4305
|
-
"scrollSpeed",
|
|
4306
|
-
"bubbleScroll",
|
|
4307
|
-
"modelValue",
|
|
4308
|
-
"tag",
|
|
4309
|
-
"target",
|
|
4310
|
-
"customUpdate",
|
|
4311
|
-
...ft.map((t) => `on${t.replace(/^\S/, (e) => e.toUpperCase())}`)
|
|
4312
|
-
], lo = defineComponent({
|
|
4313
|
-
name: "VueDraggable",
|
|
4314
|
-
model: {
|
|
4315
|
-
prop: "modelValue",
|
|
4316
|
-
event: "update:modelValue"
|
|
4317
|
-
},
|
|
4318
|
-
props: ro,
|
|
4319
|
-
emits: ["update:modelValue", ...ft],
|
|
4320
|
-
setup(t, { slots: e, emit: n, expose: o, attrs: r }) {
|
|
4321
|
-
const i = ft.reduce((d, f) => {
|
|
4322
|
-
const m = `on${f.replace(/^\S/, (y) => y.toUpperCase())}`;
|
|
4323
|
-
return d[m] = (...y) => n(f, ...y), d;
|
|
4324
|
-
}, {}), a = computed(() => {
|
|
4325
|
-
const y = toRefs(t), { modelValue: d } = y, f = $e(y, ["modelValue"]), m = Object.entries(f).reduce((b, [w, L]) => {
|
|
4326
|
-
const G = unref(L);
|
|
4327
|
-
return G !== void 0 && (b[w] = G), b;
|
|
4328
|
-
}, {});
|
|
4329
|
-
return fe(fe({}, i), yn(fe(fe({}, r), m)));
|
|
4330
|
-
}), l = computed({
|
|
4331
|
-
get: () => t.modelValue,
|
|
4332
|
-
set: (d) => n("update:modelValue", d)
|
|
4333
|
-
}), s = ref(), u = reactive(
|
|
4334
|
-
on(t.target || s, l, a)
|
|
4335
|
-
);
|
|
4336
|
-
return o(u), () => {
|
|
4337
|
-
var d;
|
|
4338
|
-
return h$1(t.tag || "div", { ref: s }, (d = e == null ? void 0 : e.default) == null ? void 0 : d.call(e, u));
|
|
4339
|
-
};
|
|
4340
|
-
}
|
|
4341
|
-
});
|
|
4342
|
-
const _hoisted_1$1 = { class: "drag-handle" };
|
|
4343
|
-
const _sfc_main$3 = /* @__PURE__ */ defineComponent({
|
|
4344
|
-
__name: "table-pro",
|
|
4345
|
-
props: {
|
|
4346
|
-
columns: { default: () => [] }
|
|
4347
|
-
},
|
|
4348
|
-
emits: ["column-change"],
|
|
4349
|
-
setup(__props, { expose: __expose, emit: __emit }) {
|
|
4350
|
-
const props = __props;
|
|
4351
|
-
const emit = __emit;
|
|
4352
|
-
const { b } = useBemClass();
|
|
4353
|
-
const tableRef = useTemplateRef("tableRef");
|
|
4354
|
-
const isFullscreen = ref(false);
|
|
4355
|
-
const isStripe = ref(false);
|
|
4356
|
-
const isBorder = ref(false);
|
|
4357
|
-
const showToolbar = ref(true);
|
|
4358
|
-
const localColumns = ref([]);
|
|
4359
|
-
const columnSettingVisible = ref(false);
|
|
4360
|
-
const originalColumns = ref([]);
|
|
4361
|
-
watch(() => props.columns, (val) => {
|
|
4362
|
-
localColumns.value = val.map((col) => ({
|
|
4363
|
-
...col,
|
|
4364
|
-
_visible: col._visible !== false
|
|
4365
|
-
}));
|
|
4366
|
-
originalColumns.value = val.map((col) => ({ ...col }));
|
|
4367
|
-
}, { immediate: true, deep: true });
|
|
4368
|
-
const mergedProps = computed(() => {
|
|
4369
|
-
return {
|
|
4370
|
-
stripe: isStripe.value,
|
|
4371
|
-
border: isBorder.value
|
|
4372
|
-
};
|
|
4373
|
-
});
|
|
4374
|
-
const computedColumns = computed(() => {
|
|
4375
|
-
return localColumns.value.filter((col) => col._visible !== false);
|
|
4376
|
-
});
|
|
4377
|
-
const toggleFullscreen = () => {
|
|
4378
|
-
isFullscreen.value = !isFullscreen.value;
|
|
4379
|
-
};
|
|
4380
|
-
const toggleStripe = () => {
|
|
4381
|
-
isStripe.value = !isStripe.value;
|
|
4382
|
-
};
|
|
4383
|
-
const toggleBorder = () => {
|
|
4384
|
-
isBorder.value = !isBorder.value;
|
|
4385
|
-
};
|
|
4386
|
-
const isLastVisibleColumn = (col) => {
|
|
4387
|
-
const visibleColumns = localColumns.value.filter((c2) => c2._visible !== false && c2.label);
|
|
4388
|
-
return visibleColumns.length <= 1 && col._visible !== false;
|
|
4389
|
-
};
|
|
4390
|
-
const toggleColumnVisible = (col, val) => {
|
|
4391
|
-
const idx = localColumns.value.findIndex((c2) => c2.prop === col.prop || c2.label === col.label);
|
|
4392
|
-
if (idx > -1) {
|
|
4393
|
-
localColumns.value[idx] = { ...localColumns.value[idx], _visible: val };
|
|
4394
|
-
}
|
|
4395
|
-
emitColumnChange();
|
|
4396
|
-
};
|
|
4397
|
-
const getFixedTitle = (col) => {
|
|
4398
|
-
if (col.fixed === "left") return "取消固定";
|
|
4399
|
-
if (col.fixed === "right") return "固定在右侧";
|
|
4400
|
-
return "固定在左侧";
|
|
4401
|
-
};
|
|
4402
|
-
const toggleColumnFixed = (col) => {
|
|
4403
|
-
const idx = localColumns.value.findIndex((c2) => c2.prop === col.prop || c2.label === col.label);
|
|
4404
|
-
if (idx > -1) {
|
|
4405
|
-
const current = localColumns.value[idx];
|
|
4406
|
-
let nextFixed;
|
|
4407
|
-
if (!current.fixed) {
|
|
4408
|
-
nextFixed = "left";
|
|
4409
|
-
} else if (current.fixed === "left") {
|
|
4410
|
-
nextFixed = "right";
|
|
4411
|
-
} else {
|
|
4412
|
-
nextFixed = false;
|
|
4413
|
-
}
|
|
4414
|
-
localColumns.value[idx] = { ...current, fixed: nextFixed };
|
|
4415
|
-
}
|
|
4416
|
-
emitColumnChange();
|
|
4417
|
-
};
|
|
4418
|
-
const resetColumns = () => {
|
|
4419
|
-
localColumns.value = originalColumns.value.map((col) => ({
|
|
4420
|
-
...col,
|
|
4421
|
-
_visible: true,
|
|
4422
|
-
fixed: col.fixed
|
|
4423
|
-
}));
|
|
4424
|
-
emitColumnChange();
|
|
4425
|
-
};
|
|
4426
|
-
const emitColumnChange = () => {
|
|
4427
|
-
emit("column-change", [...localColumns.value]);
|
|
4428
|
-
};
|
|
4429
|
-
__expose({
|
|
4430
|
-
tableRef,
|
|
4431
|
-
isFullscreen,
|
|
4432
|
-
isStripe,
|
|
4433
|
-
isBorder,
|
|
4434
|
-
toggleFullscreen,
|
|
4435
|
-
toggleStripe,
|
|
4436
|
-
toggleBorder,
|
|
4437
|
-
getColumns: () => localColumns.value,
|
|
4438
|
-
setColumns: (cols) => {
|
|
4439
|
-
localColumns.value = cols;
|
|
4440
|
-
}
|
|
4441
|
-
});
|
|
4442
|
-
return (_ctx, _cache) => {
|
|
4443
|
-
return openBlock(), createElementBlock("div", {
|
|
4444
|
-
class: normalizeClass([unref(b)("table-pro"), { [unref(b)("table-pro--fullscreen")]: isFullscreen.value }])
|
|
4445
|
-
}, [
|
|
4446
|
-
showToolbar.value ? (openBlock(), createElementBlock("div", {
|
|
4447
|
-
key: 0,
|
|
4448
|
-
class: normalizeClass(unref(b)("table-pro-toolbar"))
|
|
4449
|
-
}, [
|
|
4450
|
-
createElementVNode("div", {
|
|
4451
|
-
class: normalizeClass(unref(b)("table-pro-toolbar-right"))
|
|
4452
|
-
}, [
|
|
4453
|
-
createVNode(unref(ElTooltip), {
|
|
4454
|
-
content: "全屏",
|
|
4455
|
-
"show-after": 500
|
|
4456
|
-
}, {
|
|
4457
|
-
default: withCtx(() => [
|
|
4458
|
-
createVNode(unref(ElButton), {
|
|
4459
|
-
icon: unref(full_screen_default),
|
|
4460
|
-
circle: "",
|
|
4461
|
-
onClick: toggleFullscreen
|
|
4462
|
-
}, null, 8, ["icon"])
|
|
4463
|
-
]),
|
|
4464
|
-
_: 1
|
|
4465
|
-
}),
|
|
4466
|
-
createVNode(unref(ElTooltip), {
|
|
4467
|
-
content: isStripe.value ? "关闭斑马纹" : "开启斑马纹",
|
|
4468
|
-
"show-after": 500
|
|
4469
|
-
}, {
|
|
4470
|
-
default: withCtx(() => [
|
|
4471
|
-
createVNode(unref(ElButton), {
|
|
4472
|
-
icon: unref(list_default),
|
|
4473
|
-
type: isStripe.value ? "primary" : "default",
|
|
4474
|
-
circle: "",
|
|
4475
|
-
onClick: toggleStripe
|
|
4476
|
-
}, null, 8, ["icon", "type"])
|
|
4477
|
-
]),
|
|
4478
|
-
_: 1
|
|
4479
|
-
}, 8, ["content"]),
|
|
4480
|
-
createVNode(unref(ElTooltip), {
|
|
4481
|
-
content: isBorder.value ? "关闭边框" : "开启边框",
|
|
4482
|
-
"show-after": 500
|
|
4483
|
-
}, {
|
|
4484
|
-
default: withCtx(() => [
|
|
4485
|
-
createVNode(unref(ElButton), {
|
|
4486
|
-
icon: unref(grid_default),
|
|
4487
|
-
type: isBorder.value ? "primary" : "default",
|
|
4488
|
-
circle: "",
|
|
4489
|
-
onClick: toggleBorder
|
|
4490
|
-
}, null, 8, ["icon", "type"])
|
|
4491
|
-
]),
|
|
4492
|
-
_: 1
|
|
4493
|
-
}, 8, ["content"]),
|
|
4494
|
-
createVNode(unref(ElPopover), {
|
|
4495
|
-
placement: "bottom-end",
|
|
4496
|
-
width: 320,
|
|
4497
|
-
trigger: "click",
|
|
4498
|
-
visible: columnSettingVisible.value,
|
|
4499
|
-
"onUpdate:visible": _cache[1] || (_cache[1] = ($event) => columnSettingVisible.value = $event),
|
|
4500
|
-
"popper-class": "gi-table-pro-column-setting"
|
|
4501
|
-
}, {
|
|
4502
|
-
reference: withCtx(() => [
|
|
4503
|
-
createVNode(unref(ElTooltip), {
|
|
4504
|
-
content: "列设置",
|
|
4505
|
-
"show-after": 500
|
|
4506
|
-
}, {
|
|
4507
|
-
default: withCtx(() => [
|
|
4508
|
-
createVNode(unref(ElButton), {
|
|
4509
|
-
icon: unref(setting_default),
|
|
4510
|
-
type: columnSettingVisible.value ? "primary" : "default",
|
|
4511
|
-
circle: ""
|
|
4512
|
-
}, null, 8, ["icon", "type"])
|
|
4513
|
-
]),
|
|
4514
|
-
_: 1
|
|
4515
|
-
})
|
|
4516
|
-
]),
|
|
4517
|
-
default: withCtx(() => [
|
|
4518
|
-
createElementVNode("div", {
|
|
4519
|
-
class: normalizeClass(unref(b)("table-pro-column-panel"))
|
|
4520
|
-
}, [
|
|
4521
|
-
createElementVNode("div", {
|
|
4522
|
-
class: normalizeClass(unref(b)("table-pro-column-panel-header"))
|
|
4523
|
-
}, [
|
|
4524
|
-
_cache[3] || (_cache[3] = createElementVNode("span", null, "列设置", -1)),
|
|
4525
|
-
createVNode(unref(ElButton), {
|
|
4526
|
-
text: "",
|
|
4527
|
-
size: "small",
|
|
4528
|
-
onClick: resetColumns
|
|
4529
|
-
}, {
|
|
4530
|
-
default: withCtx(() => [..._cache[2] || (_cache[2] = [
|
|
4531
|
-
createTextVNode("重置", -1)
|
|
4532
|
-
])]),
|
|
4533
|
-
_: 1
|
|
4534
|
-
})
|
|
4535
|
-
], 2),
|
|
4536
|
-
createVNode(unref(lo), {
|
|
4537
|
-
modelValue: localColumns.value,
|
|
4538
|
-
"onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => localColumns.value = $event),
|
|
4539
|
-
animation: 200,
|
|
4540
|
-
ghostClass: "gi-table-pro-ghost",
|
|
4541
|
-
handle: ".drag-handle",
|
|
4542
|
-
itemKey: "prop"
|
|
4543
|
-
}, {
|
|
4544
|
-
item: withCtx(({ element }) => [
|
|
4545
|
-
createElementVNode("div", {
|
|
4546
|
-
class: normalizeClass(unref(b)("table-pro-column-item"))
|
|
4547
|
-
}, [
|
|
4548
|
-
createElementVNode("span", _hoisted_1$1, [
|
|
4549
|
-
createVNode(unref(ElIcon), null, {
|
|
4550
|
-
default: withCtx(() => [
|
|
4551
|
-
createVNode(unref(operation_default))
|
|
4552
|
-
]),
|
|
4553
|
-
_: 1
|
|
4554
|
-
})
|
|
4555
|
-
]),
|
|
4556
|
-
element.label ? (openBlock(), createBlock(unref(ElCheckbox), {
|
|
4557
|
-
key: 0,
|
|
4558
|
-
"model-value": element._visible !== false,
|
|
4559
|
-
disabled: isLastVisibleColumn(element),
|
|
4560
|
-
onChange: (val) => toggleColumnVisible(element, val)
|
|
4561
|
-
}, {
|
|
4562
|
-
default: withCtx(() => [
|
|
4563
|
-
createTextVNode(toDisplayString(element.label), 1)
|
|
4564
|
-
]),
|
|
4565
|
-
_: 2
|
|
4566
|
-
}, 1032, ["model-value", "disabled", "onChange"])) : (openBlock(), createElementBlock("span", {
|
|
4567
|
-
key: 1,
|
|
4568
|
-
class: normalizeClass(unref(b)("table-pro-column-item-label"))
|
|
4569
|
-
}, toDisplayString(element.label || element.type), 3)),
|
|
4570
|
-
element.label ? (openBlock(), createBlock(unref(ElButton), {
|
|
4571
|
-
key: 2,
|
|
4572
|
-
link: "",
|
|
4573
|
-
size: "small",
|
|
4574
|
-
type: element.fixed === "left" ? "primary" : "default",
|
|
4575
|
-
title: getFixedTitle(element),
|
|
4576
|
-
onClick: ($event) => toggleColumnFixed(element)
|
|
4577
|
-
}, {
|
|
4578
|
-
default: withCtx(() => [
|
|
4579
|
-
createVNode(unref(ElIcon), null, {
|
|
4580
|
-
default: withCtx(() => [
|
|
4581
|
-
element.fixed === "left" ? (openBlock(), createBlock(unref(d_caret_default), { key: 0 })) : element.fixed === "right" ? (openBlock(), createBlock(unref(arrow_left_default), { key: 1 })) : (openBlock(), createBlock(unref(minus_default), { key: 2 }))
|
|
4582
|
-
]),
|
|
4583
|
-
_: 2
|
|
4584
|
-
}, 1024)
|
|
4585
|
-
]),
|
|
4586
|
-
_: 2
|
|
4587
|
-
}, 1032, ["type", "title", "onClick"])) : createCommentVNode("", true)
|
|
4588
|
-
], 2)
|
|
4589
|
-
]),
|
|
4590
|
-
_: 1
|
|
4591
|
-
}, 8, ["modelValue"])
|
|
4592
|
-
], 2)
|
|
4593
|
-
]),
|
|
4594
|
-
_: 1
|
|
4595
|
-
}, 8, ["visible"])
|
|
4596
|
-
], 2)
|
|
4597
|
-
], 2)) : createCommentVNode("", true),
|
|
4598
|
-
createVNode(GiTable$1, mergeProps({
|
|
4599
|
-
ref_key: "tableRef",
|
|
4600
|
-
ref: tableRef
|
|
4601
|
-
}, mergedProps.value, {
|
|
4602
|
-
columns: computedColumns.value,
|
|
4603
|
-
data: props.data
|
|
4604
|
-
}), createSlots({ _: 2 }, [
|
|
4605
|
-
renderList(_ctx.$slots, (_, slotName) => {
|
|
4606
|
-
return {
|
|
4607
|
-
name: slotName,
|
|
4608
|
-
fn: withCtx((scope) => [
|
|
4609
|
-
renderSlot(_ctx.$slots, slotName, normalizeProps(guardReactiveProps(scope)), void 0, true)
|
|
4610
|
-
])
|
|
4611
|
-
};
|
|
4612
|
-
})
|
|
4613
|
-
]), 1040, ["columns", "data"])
|
|
4614
|
-
], 2);
|
|
4615
|
-
};
|
|
4616
|
-
}
|
|
4617
|
-
});
|
|
4618
|
-
const TablePro = /* @__PURE__ */ _export_sfc(_sfc_main$3, [["__scopeId", "data-v-034d33bc"]]);
|
|
2857
|
+
const Table = /* @__PURE__ */ _export_sfc(_sfc_main$3, [["__scopeId", "data-v-763fcf58"]]);
|
|
4619
2858
|
const _sfc_main$2 = /* @__PURE__ */ defineComponent({
|
|
4620
2859
|
__name: "tabs",
|
|
4621
2860
|
props: /* @__PURE__ */ mergeModels({
|
|
@@ -4656,7 +2895,7 @@ const _sfc_main$2 = /* @__PURE__ */ defineComponent({
|
|
|
4656
2895
|
"onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => model.value = $event),
|
|
4657
2896
|
type: props.type,
|
|
4658
2897
|
stretch: props.stretch,
|
|
4659
|
-
onTabClick: _cache[1] || (_cache[1] = (
|
|
2898
|
+
onTabClick: _cache[1] || (_cache[1] = (p, e) => emits("tab-click", p, e)),
|
|
4660
2899
|
onTabChange: _cache[2] || (_cache[2] = ($event) => emits("tab-change", $event))
|
|
4661
2900
|
}, {
|
|
4662
2901
|
default: withCtx(() => [
|
|
@@ -4735,7 +2974,7 @@ const _sfc_main$1 = /* @__PURE__ */ defineComponent({
|
|
|
4735
2974
|
}
|
|
4736
2975
|
function hexToRgb(hex) {
|
|
4737
2976
|
const body = hex.startsWith("#") ? hex.slice(1) : hex;
|
|
4738
|
-
const full = body.length === 3 ? body.split("").map((
|
|
2977
|
+
const full = body.length === 3 ? body.split("").map((c) => c + c).join("") : body;
|
|
4739
2978
|
return {
|
|
4740
2979
|
r: Number.parseInt(full.slice(0, 2), 16),
|
|
4741
2980
|
g: Number.parseInt(full.slice(2, 4), 16),
|
|
@@ -4743,7 +2982,7 @@ const _sfc_main$1 = /* @__PURE__ */ defineComponent({
|
|
|
4743
2982
|
};
|
|
4744
2983
|
}
|
|
4745
2984
|
function stylesForType(type, color, rgb) {
|
|
4746
|
-
const { r, g
|
|
2985
|
+
const { r, g, b: b2 } = rgb;
|
|
4747
2986
|
const closeHoverVars = {
|
|
4748
2987
|
"--tag-close-hover-color": "#fff",
|
|
4749
2988
|
"--tag-close-hover-bg-color": color
|
|
@@ -4760,33 +2999,33 @@ const _sfc_main$1 = /* @__PURE__ */ defineComponent({
|
|
|
4760
2999
|
return {
|
|
4761
3000
|
color,
|
|
4762
3001
|
backgroundColor: "transparent",
|
|
4763
|
-
borderColor: `rgba(${r}, ${
|
|
3002
|
+
borderColor: `rgba(${r}, ${g}, ${b2}, 0.6)`,
|
|
4764
3003
|
...closeHoverVars
|
|
4765
3004
|
};
|
|
4766
3005
|
case "light-outline":
|
|
4767
3006
|
return {
|
|
4768
3007
|
color,
|
|
4769
|
-
backgroundColor: `rgba(${r}, ${
|
|
4770
|
-
borderColor: `rgba(${r}, ${
|
|
3008
|
+
backgroundColor: `rgba(${r}, ${g}, ${b2}, 0.1)`,
|
|
3009
|
+
borderColor: `rgba(${r}, ${g}, ${b2}, 0.2)`,
|
|
4771
3010
|
...closeHoverVars
|
|
4772
3011
|
};
|
|
4773
3012
|
case "light":
|
|
4774
3013
|
default:
|
|
4775
3014
|
return {
|
|
4776
3015
|
color,
|
|
4777
|
-
backgroundColor: `rgba(${r}, ${
|
|
3016
|
+
backgroundColor: `rgba(${r}, ${g}, ${b2}, 0.1)`,
|
|
4778
3017
|
...closeHoverVars
|
|
4779
3018
|
};
|
|
4780
3019
|
}
|
|
4781
3020
|
}
|
|
4782
3021
|
const className = computed(() => {
|
|
4783
|
-
const
|
|
3022
|
+
const c = props.color;
|
|
4784
3023
|
return [
|
|
4785
3024
|
b("tag"),
|
|
4786
3025
|
props.type && b(`tag__type--${props.type}`),
|
|
4787
3026
|
props.size && b(`tag__size--${props.size}`),
|
|
4788
3027
|
props.round && b("tag--round"),
|
|
4789
|
-
|
|
3028
|
+
c && isSemanticThemeColor(c) && b(`tag__color--${c}`)
|
|
4790
3029
|
].filter(Boolean).join(" ");
|
|
4791
3030
|
});
|
|
4792
3031
|
const tagStyle = computed(() => {
|
|
@@ -6778,7 +5017,7 @@ function requireToStringDate() {
|
|
|
6778
5017
|
var cacheItem = cacheFormatMaps[format];
|
|
6779
5018
|
if (!cacheItem) {
|
|
6780
5019
|
var posIndexs = [];
|
|
6781
|
-
var
|
|
5020
|
+
var re = format.replace(/([$(){}*+.?\\^|])/g, "\\$1").replace(customParseRes, function(text, val) {
|
|
6782
5021
|
var firstChar = text.charAt(0);
|
|
6783
5022
|
if (firstChar === "[") {
|
|
6784
5023
|
return val;
|
|
@@ -6788,7 +5027,7 @@ function requireToStringDate() {
|
|
|
6788
5027
|
});
|
|
6789
5028
|
cacheItem = cacheFormatMaps[format] = {
|
|
6790
5029
|
_i: posIndexs,
|
|
6791
|
-
_r: new RegExp(
|
|
5030
|
+
_r: new RegExp(re)
|
|
6792
5031
|
};
|
|
6793
5032
|
}
|
|
6794
5033
|
var resMaps = {};
|
|
@@ -10522,10 +8761,10 @@ const createSelectDialog = (params) => {
|
|
|
10522
8761
|
const DialogTableRef = ref();
|
|
10523
8762
|
const { component, componentProps: componentPropsFromParams, tip, ...restParams } = params;
|
|
10524
8763
|
Dialog.open({
|
|
10525
|
-
bodyClass: "
|
|
8764
|
+
bodyClass: "g-p0",
|
|
10526
8765
|
...restParams,
|
|
10527
8766
|
title: params.title || options.title,
|
|
10528
|
-
content: () => h
|
|
8767
|
+
content: () => h(params.component, {
|
|
10529
8768
|
ref: (e) => DialogTableRef.value = e,
|
|
10530
8769
|
multiple,
|
|
10531
8770
|
queryParams,
|
|
@@ -10564,6 +8803,7 @@ const components = {
|
|
|
10564
8803
|
Tabs,
|
|
10565
8804
|
InputGroup,
|
|
10566
8805
|
InputSearch,
|
|
8806
|
+
NavTabs,
|
|
10567
8807
|
Flex,
|
|
10568
8808
|
Grid,
|
|
10569
8809
|
GridItem,
|
|
@@ -10571,8 +8811,7 @@ const components = {
|
|
|
10571
8811
|
PageLayout,
|
|
10572
8812
|
Dialog: _sfc_main$i,
|
|
10573
8813
|
EditTable,
|
|
10574
|
-
Table
|
|
10575
|
-
TablePro,
|
|
8814
|
+
Table,
|
|
10576
8815
|
Tag,
|
|
10577
8816
|
TreeTransfer
|
|
10578
8817
|
};
|
|
@@ -10584,6 +8823,7 @@ const GiDot = Dot;
|
|
|
10584
8823
|
const GiTabs = Tabs;
|
|
10585
8824
|
const GiInputGroup = InputGroup;
|
|
10586
8825
|
const GiInputSearch = InputSearch;
|
|
8826
|
+
const GiNavTabs = NavTabs;
|
|
10587
8827
|
const GiFlex = Flex;
|
|
10588
8828
|
const GiGrid = Grid;
|
|
10589
8829
|
const GiGridItem = GridItem;
|
|
@@ -10591,8 +8831,7 @@ const GiForm = Form;
|
|
|
10591
8831
|
const GiPageLayout = PageLayout;
|
|
10592
8832
|
const GiDialog = _sfc_main$i;
|
|
10593
8833
|
const GiEditTable = EditTable;
|
|
10594
|
-
const GiTable =
|
|
10595
|
-
const GiTablePro = TablePro;
|
|
8834
|
+
const GiTable = Table;
|
|
10596
8835
|
const GiTag = Tag;
|
|
10597
8836
|
const GiTreeTransfer = TreeTransfer;
|
|
10598
8837
|
function capitalizeWord(word) {
|
|
@@ -10626,9 +8865,9 @@ export {
|
|
|
10626
8865
|
GiGridItem,
|
|
10627
8866
|
GiInputGroup,
|
|
10628
8867
|
GiInputSearch,
|
|
8868
|
+
GiNavTabs,
|
|
10629
8869
|
GiPageLayout,
|
|
10630
8870
|
GiTable,
|
|
10631
|
-
GiTablePro,
|
|
10632
8871
|
GiTabs,
|
|
10633
8872
|
GiTag,
|
|
10634
8873
|
GiTreeTransfer,
|
|
@@ -10636,6 +8875,7 @@ export {
|
|
|
10636
8875
|
createDrawer,
|
|
10637
8876
|
createSelectDialog,
|
|
10638
8877
|
index as default,
|
|
10639
|
-
useBemClass
|
|
8878
|
+
useBemClass,
|
|
8879
|
+
useNavTabs
|
|
10640
8880
|
};
|
|
10641
8881
|
//# sourceMappingURL=index.es.js.map
|