ik-next-form 0.0.9 → 0.0.11
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/designer.es.js +240 -2367
- package/dist/designer.umd.js +200 -205
- package/package.json +6 -4
package/dist/designer.es.js
CHANGED
|
@@ -27,10 +27,11 @@ import * as utils$2 from "iking-utils-pro";
|
|
|
27
27
|
import { ikUrl, paramType, ikTree, dayjs, ikDate, _, ikStore } from "iking-utils-pro";
|
|
28
28
|
import { IkSvgIcon, IkRadioGroup, IkIconPicker, IkPreviewFile, IkCurrencyInput, IkUploadImage, IkPickerUser, IkUploadFile } from "ik-next-ui";
|
|
29
29
|
import * as ElementPlusIconsVue from "@element-plus/icons-vue";
|
|
30
|
-
import { CirclePlus, Remove
|
|
30
|
+
import { CirclePlus, Remove, Platform, Search, Edit, Minus, Plus, InfoFilled, Delete, ArrowDown, ArrowUp, Bottom, Top, Back, Right, BottomLeft, TopRight, CaretLeft, CaretRight } from "@element-plus/icons-vue";
|
|
31
31
|
import { ElMessage, ElMessageBox, ElInput } from "element-plus";
|
|
32
32
|
import dayjs$1 from "dayjs";
|
|
33
33
|
import duration from "dayjs/plugin/duration";
|
|
34
|
+
import Sortable$1 from "sortablejs";
|
|
34
35
|
import Draggable from "vuedraggable";
|
|
35
36
|
function bind(fn, thisArg) {
|
|
36
37
|
return function wrap() {
|
|
@@ -149,7 +150,7 @@ function merge() {
|
|
|
149
150
|
}
|
|
150
151
|
return result2;
|
|
151
152
|
}
|
|
152
|
-
const extend$
|
|
153
|
+
const extend$1 = (a, b2, thisArg, { allOwnKeys } = {}) => {
|
|
153
154
|
forEach(b2, (val, key2) => {
|
|
154
155
|
if (thisArg && isFunction$1(val)) {
|
|
155
156
|
a[key2] = bind(val, thisArg);
|
|
@@ -233,10 +234,10 @@ const forEachEntry = (obj, fn) => {
|
|
|
233
234
|
}
|
|
234
235
|
};
|
|
235
236
|
const matchAll = (regExp, str) => {
|
|
236
|
-
let
|
|
237
|
+
let matches;
|
|
237
238
|
const arr = [];
|
|
238
|
-
while ((
|
|
239
|
-
arr.push(
|
|
239
|
+
while ((matches = regExp.exec(str)) !== null) {
|
|
240
|
+
arr.push(matches);
|
|
240
241
|
}
|
|
241
242
|
return arr;
|
|
242
243
|
};
|
|
@@ -363,7 +364,7 @@ var utils$1 = {
|
|
|
363
364
|
isFileList,
|
|
364
365
|
forEach,
|
|
365
366
|
merge,
|
|
366
|
-
extend: extend$
|
|
367
|
+
extend: extend$1,
|
|
367
368
|
trim,
|
|
368
369
|
stripBOM,
|
|
369
370
|
inherits,
|
|
@@ -487,8 +488,8 @@ function toFormData(obj, formData, options) {
|
|
|
487
488
|
metaTokens: true,
|
|
488
489
|
dots: false,
|
|
489
490
|
indexes: false
|
|
490
|
-
}, false, function defined(
|
|
491
|
-
return !utils$1.isUndefined(source[
|
|
491
|
+
}, false, function defined(option, source) {
|
|
492
|
+
return !utils$1.isUndefined(source[option]);
|
|
492
493
|
});
|
|
493
494
|
const metaTokens = options.metaTokens;
|
|
494
495
|
const visitor = options.visitor || defaultVisitor;
|
|
@@ -754,7 +755,7 @@ function stringifySafely(rawValue, parser, encoder) {
|
|
|
754
755
|
}
|
|
755
756
|
return (encoder || JSON.stringify)(rawValue);
|
|
756
757
|
}
|
|
757
|
-
const defaults
|
|
758
|
+
const defaults = {
|
|
758
759
|
transitional: transitionalDefaults,
|
|
759
760
|
adapter: ["xhr", "http", "fetch"],
|
|
760
761
|
transformRequest: [function transformRequest(data, headers) {
|
|
@@ -795,7 +796,7 @@ const defaults$1 = {
|
|
|
795
796
|
return data;
|
|
796
797
|
}],
|
|
797
798
|
transformResponse: [function transformResponse(data) {
|
|
798
|
-
const transitional2 = this.transitional || defaults
|
|
799
|
+
const transitional2 = this.transitional || defaults.transitional;
|
|
799
800
|
const forcedJSONParsing = transitional2 && transitional2.forcedJSONParsing;
|
|
800
801
|
const JSONRequested = this.responseType === "json";
|
|
801
802
|
if (utils$1.isResponse(data) || utils$1.isReadableStream(data)) {
|
|
@@ -837,9 +838,9 @@ const defaults$1 = {
|
|
|
837
838
|
}
|
|
838
839
|
};
|
|
839
840
|
utils$1.forEach(["delete", "get", "head", "post", "put", "patch"], (method) => {
|
|
840
|
-
defaults
|
|
841
|
+
defaults.headers[method] = {};
|
|
841
842
|
});
|
|
842
|
-
var defaults$
|
|
843
|
+
var defaults$1 = defaults;
|
|
843
844
|
const ignoreDuplicateOf = utils$1.toObjectSet([
|
|
844
845
|
"age",
|
|
845
846
|
"authorization",
|
|
@@ -1104,7 +1105,7 @@ utils$1.reduceDescriptors(AxiosHeaders.prototype, ({ value }, key2) => {
|
|
|
1104
1105
|
utils$1.freezeMethods(AxiosHeaders);
|
|
1105
1106
|
var AxiosHeaders$1 = AxiosHeaders;
|
|
1106
1107
|
function transformData(fns, response) {
|
|
1107
|
-
const config = this || defaults$
|
|
1108
|
+
const config = this || defaults$1;
|
|
1108
1109
|
const context = response || config;
|
|
1109
1110
|
const headers = AxiosHeaders$1.from(context.headers);
|
|
1110
1111
|
let data = context.data;
|
|
@@ -1169,7 +1170,7 @@ function speedometer(samplesCount, min) {
|
|
|
1169
1170
|
return passed ? Math.round(bytesCount * 1e3 / passed) : void 0;
|
|
1170
1171
|
};
|
|
1171
1172
|
}
|
|
1172
|
-
function throttle
|
|
1173
|
+
function throttle(fn, freq) {
|
|
1173
1174
|
let timestamp = 0;
|
|
1174
1175
|
const threshold = 1e3 / freq;
|
|
1175
1176
|
let timer = null;
|
|
@@ -1196,7 +1197,7 @@ function throttle$1(fn, freq) {
|
|
|
1196
1197
|
var progressEventReducer = (listener, isDownloadStream, freq = 3) => {
|
|
1197
1198
|
let bytesNotified = 0;
|
|
1198
1199
|
const _speedometer = speedometer(50, 250);
|
|
1199
|
-
return throttle
|
|
1200
|
+
return throttle((e) => {
|
|
1200
1201
|
const loaded = e.loaded;
|
|
1201
1202
|
const total = e.lengthComputable ? e.total : void 0;
|
|
1202
1203
|
const progressBytes = loaded - bytesNotified;
|
|
@@ -1794,7 +1795,7 @@ function dispatchRequest(config) {
|
|
|
1794
1795
|
if (["post", "put", "patch"].indexOf(config.method) !== -1) {
|
|
1795
1796
|
config.headers.setContentType("application/x-www-form-urlencoded", false);
|
|
1796
1797
|
}
|
|
1797
|
-
const adapter = adapters.getAdapter(config.adapter || defaults$
|
|
1798
|
+
const adapter = adapters.getAdapter(config.adapter || defaults$1.adapter);
|
|
1798
1799
|
return adapter(config).then(function onAdapterResolution(response) {
|
|
1799
1800
|
throwIfCancellationRequested(config);
|
|
1800
1801
|
response.data = transformData.call(config, config.transformResponse, response);
|
|
@@ -1819,17 +1820,17 @@ const validators$1 = {};
|
|
|
1819
1820
|
};
|
|
1820
1821
|
});
|
|
1821
1822
|
const deprecatedWarnings = {};
|
|
1822
|
-
validators$1.transitional = function transitional(validator2,
|
|
1823
|
+
validators$1.transitional = function transitional(validator2, version, message) {
|
|
1823
1824
|
function formatMessage(opt, desc) {
|
|
1824
1825
|
return "[Axios v" + VERSION + "] Transitional option '" + opt + "'" + desc + (message ? ". " + message : "");
|
|
1825
1826
|
}
|
|
1826
1827
|
return (value, opt, opts) => {
|
|
1827
1828
|
if (validator2 === false) {
|
|
1828
|
-
throw new AxiosError(formatMessage(opt, " has been removed" + (
|
|
1829
|
+
throw new AxiosError(formatMessage(opt, " has been removed" + (version ? " in " + version : "")), AxiosError.ERR_DEPRECATED);
|
|
1829
1830
|
}
|
|
1830
|
-
if (
|
|
1831
|
+
if (version && !deprecatedWarnings[opt]) {
|
|
1831
1832
|
deprecatedWarnings[opt] = true;
|
|
1832
|
-
console.warn(formatMessage(opt, " has been deprecated since v" +
|
|
1833
|
+
console.warn(formatMessage(opt, " has been deprecated since v" + version + " and will be removed in the near future"));
|
|
1833
1834
|
}
|
|
1834
1835
|
return validator2 ? validator2(value, opt, opts) : true;
|
|
1835
1836
|
};
|
|
@@ -2169,7 +2170,7 @@ function createInstance$1(defaultConfig2) {
|
|
|
2169
2170
|
};
|
|
2170
2171
|
return instance2;
|
|
2171
2172
|
}
|
|
2172
|
-
const axios = createInstance$1(defaults$
|
|
2173
|
+
const axios = createInstance$1(defaults$1);
|
|
2173
2174
|
axios.Axios = Axios$1;
|
|
2174
2175
|
axios.CanceledError = CanceledError;
|
|
2175
2176
|
axios.CancelToken = CancelToken$1;
|
|
@@ -3538,18 +3539,18 @@ var clipboard = { exports: {} };
|
|
|
3538
3539
|
return selectedText;
|
|
3539
3540
|
};
|
|
3540
3541
|
var actions_copy = ClipboardActionCopy;
|
|
3541
|
-
function
|
|
3542
|
+
function _typeof(obj) {
|
|
3542
3543
|
"@babel/helpers - typeof";
|
|
3543
3544
|
if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") {
|
|
3544
|
-
|
|
3545
|
+
_typeof = function _typeof2(obj2) {
|
|
3545
3546
|
return typeof obj2;
|
|
3546
3547
|
};
|
|
3547
3548
|
} else {
|
|
3548
|
-
|
|
3549
|
+
_typeof = function _typeof2(obj2) {
|
|
3549
3550
|
return obj2 && typeof Symbol === "function" && obj2.constructor === Symbol && obj2 !== Symbol.prototype ? "symbol" : typeof obj2;
|
|
3550
3551
|
};
|
|
3551
3552
|
}
|
|
3552
|
-
return
|
|
3553
|
+
return _typeof(obj);
|
|
3553
3554
|
}
|
|
3554
3555
|
var ClipboardActionDefault = function ClipboardActionDefault2() {
|
|
3555
3556
|
var options = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {};
|
|
@@ -3558,7 +3559,7 @@ var clipboard = { exports: {} };
|
|
|
3558
3559
|
throw new Error('Invalid "action" value, use either "copy" or "cut"');
|
|
3559
3560
|
}
|
|
3560
3561
|
if (target !== void 0) {
|
|
3561
|
-
if (target &&
|
|
3562
|
+
if (target && _typeof(target) === "object" && target.nodeType === 1) {
|
|
3562
3563
|
if (action === "copy" && target.hasAttribute("disabled")) {
|
|
3563
3564
|
throw new Error('Invalid "target" attribute. Please use "readonly" instead of "disabled" attribute');
|
|
3564
3565
|
}
|
|
@@ -3584,11 +3585,11 @@ var clipboard = { exports: {} };
|
|
|
3584
3585
|
function clipboard_typeof(obj) {
|
|
3585
3586
|
"@babel/helpers - typeof";
|
|
3586
3587
|
if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") {
|
|
3587
|
-
clipboard_typeof = function
|
|
3588
|
+
clipboard_typeof = function _typeof2(obj2) {
|
|
3588
3589
|
return typeof obj2;
|
|
3589
3590
|
};
|
|
3590
3591
|
} else {
|
|
3591
|
-
clipboard_typeof = function
|
|
3592
|
+
clipboard_typeof = function _typeof2(obj2) {
|
|
3592
3593
|
return obj2 && typeof Symbol === "function" && obj2.constructor === Symbol && obj2 !== Symbol.prototype ? "symbol" : typeof obj2;
|
|
3593
3594
|
};
|
|
3594
3595
|
}
|
|
@@ -3755,7 +3756,7 @@ var clipboard = { exports: {} };
|
|
|
3755
3756
|
}
|
|
3756
3757
|
}, {
|
|
3757
3758
|
key: "destroy",
|
|
3758
|
-
value: function
|
|
3759
|
+
value: function destroy() {
|
|
3759
3760
|
this.listener.destroy();
|
|
3760
3761
|
}
|
|
3761
3762
|
}], [{
|
|
@@ -3793,7 +3794,7 @@ var clipboard = { exports: {} };
|
|
|
3793
3794
|
var proto = Element.prototype;
|
|
3794
3795
|
proto.matches = proto.matchesSelector || proto.mozMatchesSelector || proto.msMatchesSelector || proto.oMatchesSelector || proto.webkitMatchesSelector;
|
|
3795
3796
|
}
|
|
3796
|
-
function
|
|
3797
|
+
function closest(element, selector) {
|
|
3797
3798
|
while (element && element.nodeType !== DOCUMENT_NODE_TYPE) {
|
|
3798
3799
|
if (typeof element.matches === "function" && element.matches(selector)) {
|
|
3799
3800
|
return element;
|
|
@@ -3801,10 +3802,10 @@ var clipboard = { exports: {} };
|
|
|
3801
3802
|
element = element.parentNode;
|
|
3802
3803
|
}
|
|
3803
3804
|
}
|
|
3804
|
-
module2.exports =
|
|
3805
|
+
module2.exports = closest;
|
|
3805
3806
|
},
|
|
3806
3807
|
438: function(module2, __unused_webpack_exports, __webpack_require__2) {
|
|
3807
|
-
var
|
|
3808
|
+
var closest = __webpack_require__2(828);
|
|
3808
3809
|
function _delegate(element, selector, type, callback, useCapture) {
|
|
3809
3810
|
var listenerFn = listener.apply(this, arguments);
|
|
3810
3811
|
element.addEventListener(type, listenerFn, useCapture);
|
|
@@ -3830,7 +3831,7 @@ var clipboard = { exports: {} };
|
|
|
3830
3831
|
}
|
|
3831
3832
|
function listener(element, selector, type, callback) {
|
|
3832
3833
|
return function(e) {
|
|
3833
|
-
e.delegateTarget =
|
|
3834
|
+
e.delegateTarget = closest(e.target, selector);
|
|
3834
3835
|
if (e.delegateTarget) {
|
|
3835
3836
|
callback.call(element, e);
|
|
3836
3837
|
}
|
|
@@ -3855,23 +3856,23 @@ var clipboard = { exports: {} };
|
|
|
3855
3856
|
};
|
|
3856
3857
|
},
|
|
3857
3858
|
370: function(module2, __unused_webpack_exports, __webpack_require__2) {
|
|
3858
|
-
var
|
|
3859
|
+
var is = __webpack_require__2(879);
|
|
3859
3860
|
var delegate = __webpack_require__2(438);
|
|
3860
3861
|
function listen(target, type, callback) {
|
|
3861
3862
|
if (!target && !type && !callback) {
|
|
3862
3863
|
throw new Error("Missing required arguments");
|
|
3863
3864
|
}
|
|
3864
|
-
if (!
|
|
3865
|
+
if (!is.string(type)) {
|
|
3865
3866
|
throw new TypeError("Second argument must be a String");
|
|
3866
3867
|
}
|
|
3867
|
-
if (!
|
|
3868
|
+
if (!is.fn(callback)) {
|
|
3868
3869
|
throw new TypeError("Third argument must be a Function");
|
|
3869
3870
|
}
|
|
3870
|
-
if (
|
|
3871
|
+
if (is.node(target)) {
|
|
3871
3872
|
return listenNode(target, type, callback);
|
|
3872
|
-
} else if (
|
|
3873
|
+
} else if (is.nodeList(target)) {
|
|
3873
3874
|
return listenNodeList(target, type, callback);
|
|
3874
|
-
} else if (
|
|
3875
|
+
} else if (is.string(target)) {
|
|
3875
3876
|
return listenSelector(target, type, callback);
|
|
3876
3877
|
} else {
|
|
3877
3878
|
throw new TypeError("First argument must be a String, HTMLElement, HTMLCollection, or NodeList");
|
|
@@ -4061,9 +4062,9 @@ function useMediaQuery(query, options = {}) {
|
|
|
4061
4062
|
const { window: window2 = defaultWindow } = options;
|
|
4062
4063
|
const isSupported = useSupported(() => window2 && "matchMedia" in window2 && typeof window2.matchMedia === "function");
|
|
4063
4064
|
let mediaQuery;
|
|
4064
|
-
const
|
|
4065
|
+
const matches = ref(false);
|
|
4065
4066
|
const handler = (event) => {
|
|
4066
|
-
|
|
4067
|
+
matches.value = event.matches;
|
|
4067
4068
|
};
|
|
4068
4069
|
const cleanup = () => {
|
|
4069
4070
|
if (!mediaQuery)
|
|
@@ -4082,14 +4083,14 @@ function useMediaQuery(query, options = {}) {
|
|
|
4082
4083
|
mediaQuery.addEventListener("change", handler);
|
|
4083
4084
|
else
|
|
4084
4085
|
mediaQuery.addListener(handler);
|
|
4085
|
-
|
|
4086
|
+
matches.value = mediaQuery.matches;
|
|
4086
4087
|
});
|
|
4087
4088
|
tryOnScopeDispose(() => {
|
|
4088
4089
|
stopWatch();
|
|
4089
4090
|
cleanup();
|
|
4090
4091
|
mediaQuery = void 0;
|
|
4091
4092
|
});
|
|
4092
|
-
return
|
|
4093
|
+
return matches;
|
|
4093
4094
|
}
|
|
4094
4095
|
function isNull(value) {
|
|
4095
4096
|
return value === null || value === void 0;
|
|
@@ -6376,14 +6377,14 @@ var ace$2 = { exports: {} };
|
|
|
6376
6377
|
return ("" + str).replace(/&/g, "&").replace(/"/g, """).replace(/'/g, "'").replace(/</g, "<");
|
|
6377
6378
|
};
|
|
6378
6379
|
exports2.getMatchOffsets = function(string, regExp) {
|
|
6379
|
-
var
|
|
6380
|
+
var matches = [];
|
|
6380
6381
|
string.replace(regExp, function(str) {
|
|
6381
|
-
|
|
6382
|
+
matches.push({
|
|
6382
6383
|
offset: arguments[arguments.length - 2],
|
|
6383
6384
|
length: str.length
|
|
6384
6385
|
});
|
|
6385
6386
|
});
|
|
6386
|
-
return
|
|
6387
|
+
return matches;
|
|
6387
6388
|
};
|
|
6388
6389
|
exports2.deferredCall = function(fcn) {
|
|
6389
6390
|
var timer = null;
|
|
@@ -9717,7 +9718,7 @@ var ace$2 = { exports: {} };
|
|
|
9717
9718
|
}
|
|
9718
9719
|
}
|
|
9719
9720
|
}
|
|
9720
|
-
function
|
|
9721
|
+
function autoScroll(cursor, prevCursor) {
|
|
9721
9722
|
var now = Date.now();
|
|
9722
9723
|
var lineHeight = editor.renderer.layerConfig.lineHeight;
|
|
9723
9724
|
var characterWidth = editor.renderer.layerConfig.characterWidth;
|
|
@@ -9757,7 +9758,7 @@ var ace$2 = { exports: {} };
|
|
|
9757
9758
|
var prevCursor = dragCursor;
|
|
9758
9759
|
dragCursor = editor.renderer.screenToTextCoordinates(x2, y);
|
|
9759
9760
|
scrollCursorIntoView(dragCursor, prevCursor);
|
|
9760
|
-
|
|
9761
|
+
autoScroll(dragCursor, prevCursor);
|
|
9761
9762
|
}
|
|
9762
9763
|
function addDragMarker() {
|
|
9763
9764
|
range = editor.selection.toOrientedRange();
|
|
@@ -17389,9 +17390,9 @@ var ace$2 = { exports: {} };
|
|
|
17389
17390
|
}
|
|
17390
17391
|
} else {
|
|
17391
17392
|
for (var i2 = 0; i2 < lines.length; i2++) {
|
|
17392
|
-
var
|
|
17393
|
-
for (var j = 0; j <
|
|
17394
|
-
var match =
|
|
17393
|
+
var matches = lang2.getMatchOffsets(lines[i2], re);
|
|
17394
|
+
for (var j = 0; j < matches.length; j++) {
|
|
17395
|
+
var match = matches[j];
|
|
17395
17396
|
ranges.push(new Range(i2, match.offset, i2, match.offset + match.length));
|
|
17396
17397
|
}
|
|
17397
17398
|
}
|
|
@@ -17547,7 +17548,7 @@ var ace$2 = { exports: {} };
|
|
|
17547
17548
|
} else if (backwards) {
|
|
17548
17549
|
var forEachInLine = function(row, endIndex, callback) {
|
|
17549
17550
|
var line = session.getLine(row);
|
|
17550
|
-
var
|
|
17551
|
+
var matches = [];
|
|
17551
17552
|
var m2, last = 0;
|
|
17552
17553
|
re.lastIndex = 0;
|
|
17553
17554
|
while (m2 = re.exec(line)) {
|
|
@@ -17560,11 +17561,11 @@ var ace$2 = { exports: {} };
|
|
|
17560
17561
|
}
|
|
17561
17562
|
if (m2.index + length > endIndex)
|
|
17562
17563
|
break;
|
|
17563
|
-
|
|
17564
|
+
matches.push(m2.index, length);
|
|
17564
17565
|
}
|
|
17565
|
-
for (var i2 =
|
|
17566
|
-
var column =
|
|
17567
|
-
var length =
|
|
17566
|
+
for (var i2 = matches.length - 1; i2 >= 0; i2 -= 2) {
|
|
17567
|
+
var column = matches[i2 - 1];
|
|
17568
|
+
var length = matches[i2];
|
|
17568
17569
|
if (callback(row, column, row, column + length))
|
|
17569
17570
|
return true;
|
|
17570
17571
|
}
|
|
@@ -20948,15 +20949,15 @@ var ace$2 = { exports: {} };
|
|
|
20948
20949
|
this.$moveLines(1, true);
|
|
20949
20950
|
};
|
|
20950
20951
|
Editor3.prototype.$moveLines = function(dir, copy) {
|
|
20951
|
-
var rows,
|
|
20952
|
+
var rows, moved;
|
|
20952
20953
|
var selection = this.selection;
|
|
20953
20954
|
if (!selection.inMultiSelectMode || this.inVirtualSelectionMode) {
|
|
20954
20955
|
var range = selection.toOrientedRange();
|
|
20955
20956
|
rows = this.$getSelectedRows(range);
|
|
20956
|
-
|
|
20957
|
+
moved = this.session.$moveLines(rows.first, rows.last, copy ? 0 : dir);
|
|
20957
20958
|
if (copy && dir == -1)
|
|
20958
|
-
|
|
20959
|
-
range.moveBy(
|
|
20959
|
+
moved = 0;
|
|
20960
|
+
range.moveBy(moved, 0);
|
|
20960
20961
|
selection.fromOrientedRange(range);
|
|
20961
20962
|
} else {
|
|
20962
20963
|
var ranges = selection.rangeList.ranges;
|
|
@@ -21885,10 +21886,10 @@ var ace$2 = { exports: {} };
|
|
|
21885
21886
|
var Lines = require2("./lines").Lines;
|
|
21886
21887
|
var nls = require2("../config").nls;
|
|
21887
21888
|
var Gutter = function() {
|
|
21888
|
-
function Gutter2(
|
|
21889
|
+
function Gutter2(parentEl) {
|
|
21889
21890
|
this.element = dom.createElement("div");
|
|
21890
21891
|
this.element.className = "ace_layer ace_gutter-layer";
|
|
21891
|
-
|
|
21892
|
+
parentEl.appendChild(this.element);
|
|
21892
21893
|
this.setShowFoldWidgets(this.$showFoldWidgets);
|
|
21893
21894
|
this.gutterWidth = 0;
|
|
21894
21895
|
this.$annotations = [];
|
|
@@ -22318,10 +22319,10 @@ var ace$2 = { exports: {} };
|
|
|
22318
22319
|
var Range = require2("../range").Range;
|
|
22319
22320
|
var dom = require2("../lib/dom");
|
|
22320
22321
|
var Marker = function() {
|
|
22321
|
-
function Marker2(
|
|
22322
|
+
function Marker2(parentEl) {
|
|
22322
22323
|
this.element = dom.createElement("div");
|
|
22323
22324
|
this.element.className = "ace_layer ace_marker-layer";
|
|
22324
|
-
|
|
22325
|
+
parentEl.appendChild(this.element);
|
|
22325
22326
|
}
|
|
22326
22327
|
Marker2.prototype.setPadding = function(padding) {
|
|
22327
22328
|
this.$padding = padding;
|
|
@@ -22332,7 +22333,7 @@ var ace$2 = { exports: {} };
|
|
|
22332
22333
|
Marker2.prototype.setMarkers = function(markers) {
|
|
22333
22334
|
this.markers = markers;
|
|
22334
22335
|
};
|
|
22335
|
-
Marker2.prototype.elt = function(className,
|
|
22336
|
+
Marker2.prototype.elt = function(className, css) {
|
|
22336
22337
|
var x2 = this.i != -1 && this.element.childNodes[this.i];
|
|
22337
22338
|
if (!x2) {
|
|
22338
22339
|
x2 = document.createElement("div");
|
|
@@ -22341,7 +22342,7 @@ var ace$2 = { exports: {} };
|
|
|
22341
22342
|
} else {
|
|
22342
22343
|
this.i++;
|
|
22343
22344
|
}
|
|
22344
|
-
x2.style.cssText =
|
|
22345
|
+
x2.style.cssText = css;
|
|
22345
22346
|
x2.className = className;
|
|
22346
22347
|
};
|
|
22347
22348
|
Marker2.prototype.update = function(config) {
|
|
@@ -22486,11 +22487,11 @@ var ace$2 = { exports: {} };
|
|
|
22486
22487
|
var nls = require2("../config").nls;
|
|
22487
22488
|
var isTextToken = require2("./text_util").isTextToken;
|
|
22488
22489
|
var Text2 = function() {
|
|
22489
|
-
function Text3(
|
|
22490
|
+
function Text3(parentEl) {
|
|
22490
22491
|
this.dom = dom;
|
|
22491
22492
|
this.element = this.dom.createElement("div");
|
|
22492
22493
|
this.element.className = "ace_layer ace_text-layer";
|
|
22493
|
-
|
|
22494
|
+
parentEl.appendChild(this.element);
|
|
22494
22495
|
this.$updateEolChar = this.$updateEolChar.bind(this);
|
|
22495
22496
|
this.$lines = new Lines(this.element);
|
|
22496
22497
|
}
|
|
@@ -23089,10 +23090,10 @@ var ace$2 = { exports: {} };
|
|
|
23089
23090
|
ace.define("ace/layer/cursor", ["require", "exports", "module", "ace/lib/dom"], function(require2, exports2, module2) {
|
|
23090
23091
|
var dom = require2("../lib/dom");
|
|
23091
23092
|
var Cursor = function() {
|
|
23092
|
-
function Cursor2(
|
|
23093
|
+
function Cursor2(parentEl) {
|
|
23093
23094
|
this.element = dom.createElement("div");
|
|
23094
23095
|
this.element.className = "ace_layer ace_cursor-layer";
|
|
23095
|
-
|
|
23096
|
+
parentEl.appendChild(this.element);
|
|
23096
23097
|
this.isVisible = false;
|
|
23097
23098
|
this.isBlinking = true;
|
|
23098
23099
|
this.blinkInterval = 1e3;
|
|
@@ -23709,7 +23710,7 @@ var ace$2 = { exports: {} };
|
|
|
23709
23710
|
var USE_OBSERVER = typeof ResizeObserver == "function";
|
|
23710
23711
|
var L = 200;
|
|
23711
23712
|
var FontMetrics = function() {
|
|
23712
|
-
function FontMetrics2(
|
|
23713
|
+
function FontMetrics2(parentEl) {
|
|
23713
23714
|
this.el = dom.createElement("div");
|
|
23714
23715
|
this.$setMeasureNodeStyles(this.el.style, true);
|
|
23715
23716
|
this.$main = dom.createElement("div");
|
|
@@ -23718,7 +23719,7 @@ var ace$2 = { exports: {} };
|
|
|
23718
23719
|
this.$setMeasureNodeStyles(this.$measureNode.style);
|
|
23719
23720
|
this.el.appendChild(this.$main);
|
|
23720
23721
|
this.el.appendChild(this.$measureNode);
|
|
23721
|
-
|
|
23722
|
+
parentEl.appendChild(this.el);
|
|
23722
23723
|
this.$measureNode.textContent = lang2.stringRepeat("X", CHAR_COUNT);
|
|
23723
23724
|
this.$characterSize = { width: 0, height: 0 };
|
|
23724
23725
|
if (USE_OBSERVER)
|
|
@@ -26734,7 +26735,7 @@ var ace$2 = { exports: {} };
|
|
|
26734
26735
|
exports2.commands = commands.defaultCommands.concat(commands.multiSelectCommands);
|
|
26735
26736
|
var Search2 = require2("./search").Search;
|
|
26736
26737
|
var search = new Search2();
|
|
26737
|
-
function
|
|
26738
|
+
function find(session, needle, dir) {
|
|
26738
26739
|
search.$options.wrap = true;
|
|
26739
26740
|
search.$options.needle = needle;
|
|
26740
26741
|
search.$options.backwards = dir == -1;
|
|
@@ -27197,7 +27198,7 @@ var ace$2 = { exports: {} };
|
|
|
27197
27198
|
return;
|
|
27198
27199
|
}
|
|
27199
27200
|
var needle = session.getTextRange(range);
|
|
27200
|
-
var newRange =
|
|
27201
|
+
var newRange = find(session, needle, dir);
|
|
27201
27202
|
if (newRange) {
|
|
27202
27203
|
newRange.cursor = dir == -1 ? newRange.start : newRange.end;
|
|
27203
27204
|
this.session.unfold(newRange);
|
|
@@ -30336,7 +30337,7 @@ const _sfc_main$5q = {
|
|
|
30336
30337
|
type: "primary",
|
|
30337
30338
|
size: "default",
|
|
30338
30339
|
link: "",
|
|
30339
|
-
icon: unref(Remove
|
|
30340
|
+
icon: unref(Remove),
|
|
30340
30341
|
onClick: ($event) => methods.remove($index)
|
|
30341
30342
|
}, null, 8, ["icon", "onClick"])
|
|
30342
30343
|
]),
|
|
@@ -30488,7 +30489,7 @@ const _sfc_main$5q = {
|
|
|
30488
30489
|
type: "primary",
|
|
30489
30490
|
size: "default",
|
|
30490
30491
|
link: "",
|
|
30491
|
-
icon: unref(Remove
|
|
30492
|
+
icon: unref(Remove),
|
|
30492
30493
|
onClick: ($event) => methods.removeExItem($index)
|
|
30493
30494
|
}, null, 8, ["icon", "onClick"])
|
|
30494
30495
|
]),
|
|
@@ -37089,7 +37090,7 @@ var __glob_0_10$3 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineP
|
|
|
37089
37090
|
}, Symbol.toStringTag, { value: "Module" }));
|
|
37090
37091
|
function noop() {
|
|
37091
37092
|
}
|
|
37092
|
-
const extend
|
|
37093
|
+
const extend = Object.assign;
|
|
37093
37094
|
const inBrowser$1 = typeof window !== "undefined";
|
|
37094
37095
|
const isObject = (val) => val !== null && typeof val === "object";
|
|
37095
37096
|
const isDef = (val) => val !== void 0 && val !== null;
|
|
@@ -37510,7 +37511,7 @@ const POPUP_TOGGLE_KEY = Symbol();
|
|
|
37510
37511
|
function useExpose(apis) {
|
|
37511
37512
|
const instance2 = getCurrentInstance();
|
|
37512
37513
|
if (instance2) {
|
|
37513
|
-
extend
|
|
37514
|
+
extend(instance2.proxy, apis);
|
|
37514
37515
|
}
|
|
37515
37516
|
}
|
|
37516
37517
|
const routeProps = {
|
|
@@ -37679,7 +37680,7 @@ defineComponent({
|
|
|
37679
37680
|
setup(props, {
|
|
37680
37681
|
slots
|
|
37681
37682
|
}) {
|
|
37682
|
-
const style = computed(() => mapThemeVarsToCSSVars(extend
|
|
37683
|
+
const style = computed(() => mapThemeVarsToCSSVars(extend({}, props.themeVars, props.theme === "dark" ? props.themeVarsDark : props.themeVarsLight)));
|
|
37683
37684
|
if (inBrowser$1) {
|
|
37684
37685
|
const addTheme = () => {
|
|
37685
37686
|
document.documentElement.classList.add(`van-theme-${props.theme}`);
|
|
@@ -37811,7 +37812,7 @@ var stdin_default$5 = defineComponent({
|
|
|
37811
37812
|
setup(props, {
|
|
37812
37813
|
slots
|
|
37813
37814
|
}) {
|
|
37814
|
-
const spinnerStyle = computed(() => extend
|
|
37815
|
+
const spinnerStyle = computed(() => extend({
|
|
37815
37816
|
color: props.color
|
|
37816
37817
|
}, getSizeStyle(props.size)));
|
|
37817
37818
|
const renderIcon = () => {
|
|
@@ -37966,10 +37967,10 @@ function useLockScroll(rootRef, shouldLock) {
|
|
|
37966
37967
|
}
|
|
37967
37968
|
};
|
|
37968
37969
|
const init = () => shouldLock() && lock();
|
|
37969
|
-
const
|
|
37970
|
+
const destroy = () => shouldLock() && unlock();
|
|
37970
37971
|
onMountedOrActivated(init);
|
|
37971
|
-
onDeactivated(
|
|
37972
|
-
onBeforeUnmount(
|
|
37972
|
+
onDeactivated(destroy);
|
|
37973
|
+
onBeforeUnmount(destroy);
|
|
37973
37974
|
watch(shouldLock, (value) => {
|
|
37974
37975
|
value ? lock() : unlock();
|
|
37975
37976
|
});
|
|
@@ -38013,7 +38014,7 @@ var stdin_default$4 = defineComponent({
|
|
|
38013
38014
|
};
|
|
38014
38015
|
const renderOverlay = lazyRender(() => {
|
|
38015
38016
|
var _a2;
|
|
38016
|
-
const style = extend
|
|
38017
|
+
const style = extend(getZIndexStyle(props.zIndex), props.customStyle);
|
|
38017
38018
|
if (isDef(props.duration)) {
|
|
38018
38019
|
style.animationDuration = `${props.duration}s`;
|
|
38019
38020
|
}
|
|
@@ -38035,7 +38036,7 @@ var stdin_default$4 = defineComponent({
|
|
|
38035
38036
|
}
|
|
38036
38037
|
});
|
|
38037
38038
|
const Overlay = withInstall(stdin_default$4);
|
|
38038
|
-
const popupProps = extend
|
|
38039
|
+
const popupProps = extend({}, popupSharedProps, {
|
|
38039
38040
|
round: Boolean,
|
|
38040
38041
|
position: makeStringProp("center"),
|
|
38041
38042
|
closeIcon: makeStringProp("cross"),
|
|
@@ -38267,7 +38268,7 @@ const cellSharedProps = {
|
|
|
38267
38268
|
default: null
|
|
38268
38269
|
}
|
|
38269
38270
|
};
|
|
38270
|
-
const cellProps = extend
|
|
38271
|
+
const cellProps = extend({}, cellSharedProps, routeProps);
|
|
38271
38272
|
var stdin_default$2 = defineComponent({
|
|
38272
38273
|
name: name$2,
|
|
38273
38274
|
props: cellProps,
|
|
@@ -38490,7 +38491,7 @@ const fieldSharedProps = {
|
|
|
38490
38491
|
default: null
|
|
38491
38492
|
}
|
|
38492
38493
|
};
|
|
38493
|
-
const fieldProps = extend
|
|
38494
|
+
const fieldProps = extend({}, cellSharedProps, fieldSharedProps, {
|
|
38494
38495
|
rows: numericProp,
|
|
38495
38496
|
type: makeStringProp("text"),
|
|
38496
38497
|
rules: Array,
|
|
@@ -39114,7 +39115,7 @@ function usePopupState() {
|
|
|
39114
39115
|
state.show = show;
|
|
39115
39116
|
};
|
|
39116
39117
|
const open2 = (props) => {
|
|
39117
|
-
extend
|
|
39118
|
+
extend(state, props, { transitionAppear: true });
|
|
39118
39119
|
toggle(true);
|
|
39119
39120
|
};
|
|
39120
39121
|
const close = () => toggle(false);
|
|
@@ -39161,7 +39162,7 @@ const defaultOptions$1 = {
|
|
|
39161
39162
|
};
|
|
39162
39163
|
let queue = [];
|
|
39163
39164
|
let allowMultiple = false;
|
|
39164
|
-
let currentOptions = extend
|
|
39165
|
+
let currentOptions = extend({}, defaultOptions$1);
|
|
39165
39166
|
const defaultOptionsMap = /* @__PURE__ */ new Map();
|
|
39166
39167
|
function parseOptions(message) {
|
|
39167
39168
|
if (isObject(message)) {
|
|
@@ -39219,10 +39220,10 @@ function showToast(options = {}) {
|
|
|
39219
39220
|
}
|
|
39220
39221
|
const toast = getInstance();
|
|
39221
39222
|
const parsedOptions = parseOptions(options);
|
|
39222
|
-
toast.open(extend
|
|
39223
|
+
toast.open(extend({}, currentOptions, defaultOptionsMap.get(parsedOptions.type || currentOptions.type), parsedOptions));
|
|
39223
39224
|
return toast;
|
|
39224
39225
|
}
|
|
39225
|
-
const createMethod = (type) => (options) => showToast(extend
|
|
39226
|
+
const createMethod = (type) => (options) => showToast(extend({
|
|
39226
39227
|
type
|
|
39227
39228
|
}, parseOptions(options)));
|
|
39228
39229
|
const showSuccessToast = createMethod("success");
|
|
@@ -42239,7 +42240,7 @@ var quill = { exports: {} };
|
|
|
42239
42240
|
return new BlotClass(node, value);
|
|
42240
42241
|
}
|
|
42241
42242
|
exports2.create = create;
|
|
42242
|
-
function
|
|
42243
|
+
function find(node, bubble) {
|
|
42243
42244
|
if (bubble === void 0) {
|
|
42244
42245
|
bubble = false;
|
|
42245
42246
|
}
|
|
@@ -42248,10 +42249,10 @@ var quill = { exports: {} };
|
|
|
42248
42249
|
if (node[exports2.DATA_KEY] != null)
|
|
42249
42250
|
return node[exports2.DATA_KEY].blot;
|
|
42250
42251
|
if (bubble)
|
|
42251
|
-
return
|
|
42252
|
+
return find(node.parentNode, bubble);
|
|
42252
42253
|
return null;
|
|
42253
42254
|
}
|
|
42254
|
-
exports2.find =
|
|
42255
|
+
exports2.find = find;
|
|
42255
42256
|
function query(query2, scope) {
|
|
42256
42257
|
if (scope === void 0) {
|
|
42257
42258
|
scope = Scope.ANY;
|
|
@@ -42689,7 +42690,7 @@ var quill = { exports: {} };
|
|
|
42689
42690
|
return obj[name2];
|
|
42690
42691
|
};
|
|
42691
42692
|
module2.exports = function extend2() {
|
|
42692
|
-
var options, name2, src, copy, copyIsArray,
|
|
42693
|
+
var options, name2, src, copy, copyIsArray, clone;
|
|
42693
42694
|
var target = arguments[0];
|
|
42694
42695
|
var i2 = 1;
|
|
42695
42696
|
var length = arguments.length;
|
|
@@ -42712,11 +42713,11 @@ var quill = { exports: {} };
|
|
|
42712
42713
|
if (deep && copy && (isPlainObject2(copy) || (copyIsArray = isArray2(copy)))) {
|
|
42713
42714
|
if (copyIsArray) {
|
|
42714
42715
|
copyIsArray = false;
|
|
42715
|
-
|
|
42716
|
+
clone = src && isArray2(src) ? src : [];
|
|
42716
42717
|
} else {
|
|
42717
|
-
|
|
42718
|
+
clone = src && isPlainObject2(src) ? src : {};
|
|
42718
42719
|
}
|
|
42719
|
-
setProperty(target, { name: name2, newValue: extend2(deep,
|
|
42720
|
+
setProperty(target, { name: name2, newValue: extend2(deep, clone, copy) });
|
|
42720
42721
|
} else if (typeof copy !== "undefined") {
|
|
42721
42722
|
setProperty(target, { name: name2, newValue: copy });
|
|
42722
42723
|
}
|
|
@@ -42964,13 +42965,13 @@ var quill = { exports: {} };
|
|
|
42964
42965
|
value: function split(index2) {
|
|
42965
42966
|
var force = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : false;
|
|
42966
42967
|
if (force && (index2 === 0 || index2 >= this.length() - NEWLINE_LENGTH)) {
|
|
42967
|
-
var
|
|
42968
|
+
var clone = this.clone();
|
|
42968
42969
|
if (index2 === 0) {
|
|
42969
|
-
this.parent.insertBefore(
|
|
42970
|
+
this.parent.insertBefore(clone, this);
|
|
42970
42971
|
return this;
|
|
42971
42972
|
} else {
|
|
42972
|
-
this.parent.insertBefore(
|
|
42973
|
-
return
|
|
42973
|
+
this.parent.insertBefore(clone, this.next);
|
|
42974
|
+
return clone;
|
|
42974
42975
|
}
|
|
42975
42976
|
} else {
|
|
42976
42977
|
var next = _get(Block2.prototype.__proto__ || Object.getPrototypeOf(Block2.prototype), "split", this).call(this, index2, force);
|
|
@@ -43006,7 +43007,7 @@ var quill = { exports: {} };
|
|
|
43006
43007
|
value: true
|
|
43007
43008
|
});
|
|
43008
43009
|
exports2.default = exports2.overload = exports2.expandConfig = void 0;
|
|
43009
|
-
var
|
|
43010
|
+
var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function(obj) {
|
|
43010
43011
|
return typeof obj;
|
|
43011
43012
|
} : function(obj) {
|
|
43012
43013
|
return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj;
|
|
@@ -43088,7 +43089,7 @@ var quill = { exports: {} };
|
|
|
43088
43089
|
function _interopRequireDefault(obj) {
|
|
43089
43090
|
return obj && obj.__esModule ? obj : { default: obj };
|
|
43090
43091
|
}
|
|
43091
|
-
function
|
|
43092
|
+
function _defineProperty(obj, key2, value) {
|
|
43092
43093
|
if (key2 in obj) {
|
|
43093
43094
|
Object.defineProperty(obj, key2, { value, enumerable: true, configurable: true, writable: true });
|
|
43094
43095
|
} else {
|
|
@@ -43113,7 +43114,7 @@ var quill = { exports: {} };
|
|
|
43113
43114
|
}
|
|
43114
43115
|
}, {
|
|
43115
43116
|
key: "find",
|
|
43116
|
-
value: function
|
|
43117
|
+
value: function find(node) {
|
|
43117
43118
|
return node.__quill || _parchment2.default.find(node);
|
|
43118
43119
|
}
|
|
43119
43120
|
}, {
|
|
@@ -43266,12 +43267,12 @@ var quill = { exports: {} };
|
|
|
43266
43267
|
if (range == null) {
|
|
43267
43268
|
return change;
|
|
43268
43269
|
} else if (_parchment2.default.query(name2, _parchment2.default.Scope.BLOCK)) {
|
|
43269
|
-
change = _this4.editor.formatLine(range.index, range.length,
|
|
43270
|
+
change = _this4.editor.formatLine(range.index, range.length, _defineProperty({}, name2, value));
|
|
43270
43271
|
} else if (range.length === 0) {
|
|
43271
43272
|
_this4.selection.format(name2, value);
|
|
43272
43273
|
return change;
|
|
43273
43274
|
} else {
|
|
43274
|
-
change = _this4.editor.formatText(range.index, range.length,
|
|
43275
|
+
change = _this4.editor.formatText(range.index, range.length, _defineProperty({}, name2, value));
|
|
43275
43276
|
}
|
|
43276
43277
|
_this4.setSelection(range, _emitter4.default.sources.SILENT);
|
|
43277
43278
|
return change;
|
|
@@ -43440,12 +43441,12 @@ var quill = { exports: {} };
|
|
|
43440
43441
|
}
|
|
43441
43442
|
}, {
|
|
43442
43443
|
key: "off",
|
|
43443
|
-
value: function
|
|
43444
|
+
value: function off() {
|
|
43444
43445
|
return this.emitter.off.apply(this.emitter, arguments);
|
|
43445
43446
|
}
|
|
43446
43447
|
}, {
|
|
43447
43448
|
key: "on",
|
|
43448
|
-
value: function
|
|
43449
|
+
value: function on() {
|
|
43449
43450
|
return this.emitter.on.apply(this.emitter, arguments);
|
|
43450
43451
|
}
|
|
43451
43452
|
}, {
|
|
@@ -43653,7 +43654,7 @@ var quill = { exports: {} };
|
|
|
43653
43654
|
} else if (typeof length !== "number") {
|
|
43654
43655
|
source = value, value = name2, name2 = length, length = 0;
|
|
43655
43656
|
}
|
|
43656
|
-
if ((typeof name2 === "undefined" ? "undefined" :
|
|
43657
|
+
if ((typeof name2 === "undefined" ? "undefined" : _typeof(name2)) === "object") {
|
|
43657
43658
|
formats = name2;
|
|
43658
43659
|
source = value;
|
|
43659
43660
|
} else if (typeof name2 === "string") {
|
|
@@ -44435,7 +44436,7 @@ var quill = { exports: {} };
|
|
|
44435
44436
|
Object.defineProperty(exports2, "__esModule", {
|
|
44436
44437
|
value: true
|
|
44437
44438
|
});
|
|
44438
|
-
var
|
|
44439
|
+
var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function(obj) {
|
|
44439
44440
|
return typeof obj;
|
|
44440
44441
|
} : function(obj) {
|
|
44441
44442
|
return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj;
|
|
@@ -44518,7 +44519,7 @@ var quill = { exports: {} };
|
|
|
44518
44519
|
function _interopRequireDefault(obj) {
|
|
44519
44520
|
return obj && obj.__esModule ? obj : { default: obj };
|
|
44520
44521
|
}
|
|
44521
|
-
function
|
|
44522
|
+
function _defineProperty(obj, key2, value) {
|
|
44522
44523
|
if (key2 in obj) {
|
|
44523
44524
|
Object.defineProperty(obj, key2, { value, enumerable: true, configurable: true, writable: true });
|
|
44524
44525
|
} else {
|
|
@@ -44568,7 +44569,7 @@ var quill = { exports: {} };
|
|
|
44568
44569
|
formats = (0, _extend2.default)(formats, (0, _block.bubbleFormats)(leaf));
|
|
44569
44570
|
}
|
|
44570
44571
|
attributes = _op2.default.attributes.diff(formats, attributes) || {};
|
|
44571
|
-
} else if (
|
|
44572
|
+
} else if (_typeof(op.insert) === "object") {
|
|
44572
44573
|
var key2 = Object.keys(op.insert)[0];
|
|
44573
44574
|
if (key2 == null)
|
|
44574
44575
|
return index2;
|
|
@@ -44690,7 +44691,7 @@ var quill = { exports: {} };
|
|
|
44690
44691
|
key: "insertEmbed",
|
|
44691
44692
|
value: function insertEmbed(index2, embed, value) {
|
|
44692
44693
|
this.scroll.insertAt(index2, embed, value);
|
|
44693
|
-
return this.update(new _quillDelta2.default().retain(index2).insert(
|
|
44694
|
+
return this.update(new _quillDelta2.default().retain(index2).insert(_defineProperty({}, embed, value)));
|
|
44694
44695
|
}
|
|
44695
44696
|
}, {
|
|
44696
44697
|
key: "insertText",
|
|
@@ -45929,7 +45930,7 @@ var quill = { exports: {} };
|
|
|
45929
45930
|
module2.exports = lib;
|
|
45930
45931
|
},
|
|
45931
45932
|
function(module2, exports2) {
|
|
45932
|
-
var
|
|
45933
|
+
var clone = function() {
|
|
45933
45934
|
function _instanceof(obj, type) {
|
|
45934
45935
|
return type != null && obj instanceof type;
|
|
45935
45936
|
}
|
|
@@ -45954,7 +45955,7 @@ var quill = { exports: {} };
|
|
|
45954
45955
|
nativePromise = function() {
|
|
45955
45956
|
};
|
|
45956
45957
|
}
|
|
45957
|
-
function
|
|
45958
|
+
function clone2(parent, circular, depth, prototype2, includeNonEnumerable) {
|
|
45958
45959
|
if (typeof circular === "object") {
|
|
45959
45960
|
depth = circular.depth;
|
|
45960
45961
|
prototype2 = circular.prototype;
|
|
@@ -45990,13 +45991,13 @@ var quill = { exports: {} };
|
|
|
45990
45991
|
reject(_clone(err, depth2 - 1));
|
|
45991
45992
|
});
|
|
45992
45993
|
});
|
|
45993
|
-
} else if (
|
|
45994
|
+
} else if (clone2.__isArray(parent2)) {
|
|
45994
45995
|
child = [];
|
|
45995
|
-
} else if (
|
|
45996
|
+
} else if (clone2.__isRegExp(parent2)) {
|
|
45996
45997
|
child = new RegExp(parent2.source, __getRegExpFlags(parent2));
|
|
45997
45998
|
if (parent2.lastIndex)
|
|
45998
45999
|
child.lastIndex = parent2.lastIndex;
|
|
45999
|
-
} else if (
|
|
46000
|
+
} else if (clone2.__isDate(parent2)) {
|
|
46000
46001
|
child = new Date(parent2.getTime());
|
|
46001
46002
|
} else if (useBuffer && Buffer.isBuffer(parent2)) {
|
|
46002
46003
|
if (Buffer.allocUnsafe) {
|
|
@@ -46082,7 +46083,7 @@ var quill = { exports: {} };
|
|
|
46082
46083
|
}
|
|
46083
46084
|
return _clone(parent, depth);
|
|
46084
46085
|
}
|
|
46085
|
-
|
|
46086
|
+
clone2.clonePrototype = function clonePrototype(parent) {
|
|
46086
46087
|
if (parent === null)
|
|
46087
46088
|
return null;
|
|
46088
46089
|
var c = function() {
|
|
@@ -46093,19 +46094,19 @@ var quill = { exports: {} };
|
|
|
46093
46094
|
function __objToStr(o2) {
|
|
46094
46095
|
return Object.prototype.toString.call(o2);
|
|
46095
46096
|
}
|
|
46096
|
-
|
|
46097
|
+
clone2.__objToStr = __objToStr;
|
|
46097
46098
|
function __isDate(o2) {
|
|
46098
46099
|
return typeof o2 === "object" && __objToStr(o2) === "[object Date]";
|
|
46099
46100
|
}
|
|
46100
|
-
|
|
46101
|
+
clone2.__isDate = __isDate;
|
|
46101
46102
|
function __isArray(o2) {
|
|
46102
46103
|
return typeof o2 === "object" && __objToStr(o2) === "[object Array]";
|
|
46103
46104
|
}
|
|
46104
|
-
|
|
46105
|
+
clone2.__isArray = __isArray;
|
|
46105
46106
|
function __isRegExp(o2) {
|
|
46106
46107
|
return typeof o2 === "object" && __objToStr(o2) === "[object RegExp]";
|
|
46107
46108
|
}
|
|
46108
|
-
|
|
46109
|
+
clone2.__isRegExp = __isRegExp;
|
|
46109
46110
|
function __getRegExpFlags(re) {
|
|
46110
46111
|
var flags = "";
|
|
46111
46112
|
if (re.global)
|
|
@@ -46116,11 +46117,11 @@ var quill = { exports: {} };
|
|
|
46116
46117
|
flags += "m";
|
|
46117
46118
|
return flags;
|
|
46118
46119
|
}
|
|
46119
|
-
|
|
46120
|
-
return
|
|
46120
|
+
clone2.__getRegExpFlags = __getRegExpFlags;
|
|
46121
|
+
return clone2;
|
|
46121
46122
|
}();
|
|
46122
46123
|
if (typeof module2 === "object" && module2.exports) {
|
|
46123
|
-
module2.exports =
|
|
46124
|
+
module2.exports = clone;
|
|
46124
46125
|
}
|
|
46125
46126
|
},
|
|
46126
46127
|
function(module2, exports2, __webpack_require__) {
|
|
@@ -46431,7 +46432,7 @@ var quill = { exports: {} };
|
|
|
46431
46432
|
value: true
|
|
46432
46433
|
});
|
|
46433
46434
|
exports2.SHORTKEY = exports2.default = void 0;
|
|
46434
|
-
var
|
|
46435
|
+
var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function(obj) {
|
|
46435
46436
|
return typeof obj;
|
|
46436
46437
|
} : function(obj) {
|
|
46437
46438
|
return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj;
|
|
@@ -46512,7 +46513,7 @@ var quill = { exports: {} };
|
|
|
46512
46513
|
function _interopRequireDefault(obj) {
|
|
46513
46514
|
return obj && obj.__esModule ? obj : { default: obj };
|
|
46514
46515
|
}
|
|
46515
|
-
function
|
|
46516
|
+
function _defineProperty(obj, key2, value) {
|
|
46516
46517
|
if (key2 in obj) {
|
|
46517
46518
|
Object.defineProperty(obj, key2, { value, enumerable: true, configurable: true, writable: true });
|
|
46518
46519
|
} else {
|
|
@@ -46644,7 +46645,7 @@ var quill = { exports: {} };
|
|
|
46644
46645
|
})) {
|
|
46645
46646
|
return false;
|
|
46646
46647
|
}
|
|
46647
|
-
} else if (
|
|
46648
|
+
} else if (_typeof(binding.format) === "object") {
|
|
46648
46649
|
if (!Object.keys(binding.format).every(function(name2) {
|
|
46649
46650
|
if (binding.format[name2] === true)
|
|
46650
46651
|
return curContext.format[name2] != null;
|
|
@@ -46839,7 +46840,7 @@ var quill = { exports: {} };
|
|
|
46839
46840
|
key: key2,
|
|
46840
46841
|
shiftKey,
|
|
46841
46842
|
altKey: null
|
|
46842
|
-
},
|
|
46843
|
+
}, _defineProperty(_ref3, where, /^$/), _defineProperty(_ref3, "handler", function handler(range) {
|
|
46843
46844
|
var index2 = range.index;
|
|
46844
46845
|
if (key2 === Keyboard.keys.RIGHT) {
|
|
46845
46846
|
index2 += range.length + 1;
|
|
@@ -46996,7 +46997,7 @@ var quill = { exports: {} };
|
|
|
46996
46997
|
if (typeof binding === "string" || typeof binding === "number") {
|
|
46997
46998
|
return normalize({ key: binding });
|
|
46998
46999
|
}
|
|
46999
|
-
if ((typeof binding === "undefined" ? "undefined" :
|
|
47000
|
+
if ((typeof binding === "undefined" ? "undefined" : _typeof(binding)) === "object") {
|
|
47000
47001
|
binding = (0, _clone2.default)(binding, false);
|
|
47001
47002
|
}
|
|
47002
47003
|
if (typeof binding.key === "string") {
|
|
@@ -47522,7 +47523,7 @@ var quill = { exports: {} };
|
|
|
47522
47523
|
Object.defineProperty(exports2, "__esModule", {
|
|
47523
47524
|
value: true
|
|
47524
47525
|
});
|
|
47525
|
-
var
|
|
47526
|
+
var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function(obj) {
|
|
47526
47527
|
return typeof obj;
|
|
47527
47528
|
} : function(obj) {
|
|
47528
47529
|
return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj;
|
|
@@ -47596,17 +47597,17 @@ var quill = { exports: {} };
|
|
|
47596
47597
|
}
|
|
47597
47598
|
}, {
|
|
47598
47599
|
key: "buildItem",
|
|
47599
|
-
value: function buildItem(
|
|
47600
|
+
value: function buildItem(option) {
|
|
47600
47601
|
var _this2 = this;
|
|
47601
47602
|
var item2 = document.createElement("span");
|
|
47602
47603
|
item2.tabIndex = "0";
|
|
47603
47604
|
item2.setAttribute("role", "button");
|
|
47604
47605
|
item2.classList.add("ql-picker-item");
|
|
47605
|
-
if (
|
|
47606
|
-
item2.setAttribute("data-value",
|
|
47606
|
+
if (option.hasAttribute("value")) {
|
|
47607
|
+
item2.setAttribute("data-value", option.getAttribute("value"));
|
|
47607
47608
|
}
|
|
47608
|
-
if (
|
|
47609
|
-
item2.setAttribute("data-label",
|
|
47609
|
+
if (option.textContent) {
|
|
47610
|
+
item2.setAttribute("data-label", option.textContent);
|
|
47610
47611
|
}
|
|
47611
47612
|
item2.addEventListener("click", function() {
|
|
47612
47613
|
_this2.selectItem(item2, true);
|
|
@@ -47649,10 +47650,10 @@ var quill = { exports: {} };
|
|
|
47649
47650
|
optionsCounter += 1;
|
|
47650
47651
|
this.label.setAttribute("aria-controls", options.id);
|
|
47651
47652
|
this.options = options;
|
|
47652
|
-
[].slice.call(this.select.options).forEach(function(
|
|
47653
|
-
var item2 = _this3.buildItem(
|
|
47653
|
+
[].slice.call(this.select.options).forEach(function(option) {
|
|
47654
|
+
var item2 = _this3.buildItem(option);
|
|
47654
47655
|
options.appendChild(item2);
|
|
47655
|
-
if (
|
|
47656
|
+
if (option.selected === true) {
|
|
47656
47657
|
_this3.selectItem(item2);
|
|
47657
47658
|
}
|
|
47658
47659
|
});
|
|
@@ -47712,7 +47713,7 @@ var quill = { exports: {} };
|
|
|
47712
47713
|
if (trigger) {
|
|
47713
47714
|
if (typeof Event === "function") {
|
|
47714
47715
|
this.select.dispatchEvent(new Event("change"));
|
|
47715
|
-
} else if ((typeof Event === "undefined" ? "undefined" :
|
|
47716
|
+
} else if ((typeof Event === "undefined" ? "undefined" : _typeof(Event)) === "object") {
|
|
47716
47717
|
var event = document.createEvent("Event");
|
|
47717
47718
|
event.initEvent("change", true, true);
|
|
47718
47719
|
this.select.dispatchEvent(event);
|
|
@@ -47723,15 +47724,15 @@ var quill = { exports: {} };
|
|
|
47723
47724
|
}, {
|
|
47724
47725
|
key: "update",
|
|
47725
47726
|
value: function update() {
|
|
47726
|
-
var
|
|
47727
|
+
var option = void 0;
|
|
47727
47728
|
if (this.select.selectedIndex > -1) {
|
|
47728
47729
|
var item2 = this.container.querySelector(".ql-picker-options").children[this.select.selectedIndex];
|
|
47729
|
-
|
|
47730
|
+
option = this.select.options[this.select.selectedIndex];
|
|
47730
47731
|
this.selectItem(item2);
|
|
47731
47732
|
} else {
|
|
47732
47733
|
this.selectItem(null);
|
|
47733
47734
|
}
|
|
47734
|
-
var isActive =
|
|
47735
|
+
var isActive = option != null && option !== this.select.querySelector("option[selected]");
|
|
47735
47736
|
this.label.classList.toggle("ql-active", isActive);
|
|
47736
47737
|
}
|
|
47737
47738
|
}]);
|
|
@@ -48046,8 +48047,8 @@ var quill = { exports: {} };
|
|
|
48046
48047
|
return true;
|
|
48047
48048
|
};
|
|
48048
48049
|
ClassAttributor2.prototype.remove = function(node) {
|
|
48049
|
-
var
|
|
48050
|
-
|
|
48050
|
+
var matches = match(node, this.keyName);
|
|
48051
|
+
matches.forEach(function(name2) {
|
|
48051
48052
|
node.classList.remove(name2);
|
|
48052
48053
|
});
|
|
48053
48054
|
if (node.classList.length === 0) {
|
|
@@ -49021,7 +49022,7 @@ var quill = { exports: {} };
|
|
|
49021
49022
|
}
|
|
49022
49023
|
}, {
|
|
49023
49024
|
key: "save",
|
|
49024
|
-
value: function
|
|
49025
|
+
value: function save() {
|
|
49025
49026
|
var value = this.textbox.value;
|
|
49026
49027
|
switch (this.root.getAttribute("data-mode")) {
|
|
49027
49028
|
case "link": {
|
|
@@ -49073,13 +49074,13 @@ var quill = { exports: {} };
|
|
|
49073
49074
|
function fillSelect(select, values) {
|
|
49074
49075
|
var defaultValue = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : false;
|
|
49075
49076
|
values.forEach(function(value) {
|
|
49076
|
-
var
|
|
49077
|
+
var option = document.createElement("option");
|
|
49077
49078
|
if (value === defaultValue) {
|
|
49078
|
-
|
|
49079
|
+
option.setAttribute("selected", "selected");
|
|
49079
49080
|
} else {
|
|
49080
|
-
|
|
49081
|
+
option.setAttribute("value", value);
|
|
49081
49082
|
}
|
|
49082
|
-
select.appendChild(
|
|
49083
|
+
select.appendChild(option);
|
|
49083
49084
|
});
|
|
49084
49085
|
}
|
|
49085
49086
|
exports2.BaseTooltip = BaseTooltip;
|
|
@@ -50310,7 +50311,7 @@ var quill = { exports: {} };
|
|
|
50310
50311
|
}
|
|
50311
50312
|
return true;
|
|
50312
50313
|
};
|
|
50313
|
-
EventEmitter.prototype.on = function
|
|
50314
|
+
EventEmitter.prototype.on = function on(event, fn, context) {
|
|
50314
50315
|
var listener = new EE(fn, context || this), evt = prefix ? prefix + event : event;
|
|
50315
50316
|
if (!this._events[evt])
|
|
50316
50317
|
this._events[evt] = listener, this._eventsCount++;
|
|
@@ -50396,7 +50397,7 @@ var quill = { exports: {} };
|
|
|
50396
50397
|
value: true
|
|
50397
50398
|
});
|
|
50398
50399
|
exports2.matchText = exports2.matchSpacing = exports2.matchNewline = exports2.matchBlot = exports2.matchAttributor = exports2.default = void 0;
|
|
50399
|
-
var
|
|
50400
|
+
var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function(obj) {
|
|
50400
50401
|
return typeof obj;
|
|
50401
50402
|
} : function(obj) {
|
|
50402
50403
|
return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj;
|
|
@@ -50479,7 +50480,7 @@ var quill = { exports: {} };
|
|
|
50479
50480
|
function _interopRequireDefault(obj) {
|
|
50480
50481
|
return obj && obj.__esModule ? obj : { default: obj };
|
|
50481
50482
|
}
|
|
50482
|
-
function
|
|
50483
|
+
function _defineProperty(obj, key2, value) {
|
|
50483
50484
|
if (key2 in obj) {
|
|
50484
50485
|
Object.defineProperty(obj, key2, { value, enumerable: true, configurable: true, writable: true });
|
|
50485
50486
|
} else {
|
|
@@ -50551,7 +50552,7 @@ var quill = { exports: {} };
|
|
|
50551
50552
|
if (formats[_code2.default.blotName]) {
|
|
50552
50553
|
var text = this.container.innerText;
|
|
50553
50554
|
this.container.innerHTML = "";
|
|
50554
|
-
return new _quillDelta2.default().insert(text,
|
|
50555
|
+
return new _quillDelta2.default().insert(text, _defineProperty({}, _code2.default.blotName, formats[_code2.default.blotName]));
|
|
50555
50556
|
}
|
|
50556
50557
|
var _prepareMatching = this.prepareMatching(), _prepareMatching2 = _slicedToArray(_prepareMatching, 2), elementMatchers = _prepareMatching2[0], textMatchers = _prepareMatching2[1];
|
|
50557
50558
|
var delta = traverse(this.container, elementMatchers, textMatchers);
|
|
@@ -50626,7 +50627,7 @@ var quill = { exports: {} };
|
|
|
50626
50627
|
matchVisual: true
|
|
50627
50628
|
};
|
|
50628
50629
|
function applyFormat(delta, format, value) {
|
|
50629
|
-
if ((typeof format === "undefined" ? "undefined" :
|
|
50630
|
+
if ((typeof format === "undefined" ? "undefined" : _typeof(format)) === "object") {
|
|
50630
50631
|
return Object.keys(format).reduce(function(delta2, key2) {
|
|
50631
50632
|
return applyFormat(delta2, key2, format[key2]);
|
|
50632
50633
|
}, delta);
|
|
@@ -50635,7 +50636,7 @@ var quill = { exports: {} };
|
|
|
50635
50636
|
if (op.attributes && op.attributes[format]) {
|
|
50636
50637
|
return delta2.push(op);
|
|
50637
50638
|
} else {
|
|
50638
|
-
return delta2.insert(op.insert, (0, _extend3.default)({},
|
|
50639
|
+
return delta2.insert(op.insert, (0, _extend3.default)({}, _defineProperty({}, format, value), op.attributes));
|
|
50639
50640
|
}
|
|
50640
50641
|
}, new _quillDelta2.default());
|
|
50641
50642
|
}
|
|
@@ -50992,7 +50993,7 @@ var quill = { exports: {} };
|
|
|
50992
50993
|
function _interopRequireDefault(obj) {
|
|
50993
50994
|
return obj && obj.__esModule ? obj : { default: obj };
|
|
50994
50995
|
}
|
|
50995
|
-
function
|
|
50996
|
+
function _defineProperty(obj, key2, value) {
|
|
50996
50997
|
if (key2 in obj) {
|
|
50997
50998
|
Object.defineProperty(obj, key2, { value, enumerable: true, configurable: true, writable: true });
|
|
50998
50999
|
} else {
|
|
@@ -51115,7 +51116,7 @@ var quill = { exports: {} };
|
|
|
51115
51116
|
value = prompt("Enter " + format);
|
|
51116
51117
|
if (!value)
|
|
51117
51118
|
return;
|
|
51118
|
-
_this2.quill.updateContents(new _quillDelta2.default().retain(range.index).delete(range.length).insert(
|
|
51119
|
+
_this2.quill.updateContents(new _quillDelta2.default().retain(range.index).delete(range.length).insert(_defineProperty({}, format, value)), _quill2.default.sources.USER);
|
|
51119
51120
|
} else {
|
|
51120
51121
|
_this2.quill.format(format, value, _quill2.default.sources.USER);
|
|
51121
51122
|
}
|
|
@@ -51130,23 +51131,23 @@ var quill = { exports: {} };
|
|
|
51130
51131
|
this.controls.forEach(function(pair) {
|
|
51131
51132
|
var _pair = _slicedToArray(pair, 2), format = _pair[0], input = _pair[1];
|
|
51132
51133
|
if (input.tagName === "SELECT") {
|
|
51133
|
-
var
|
|
51134
|
+
var option = void 0;
|
|
51134
51135
|
if (range == null) {
|
|
51135
|
-
|
|
51136
|
+
option = null;
|
|
51136
51137
|
} else if (formats[format] == null) {
|
|
51137
|
-
|
|
51138
|
+
option = input.querySelector("option[selected]");
|
|
51138
51139
|
} else if (!Array.isArray(formats[format])) {
|
|
51139
51140
|
var value = formats[format];
|
|
51140
51141
|
if (typeof value === "string") {
|
|
51141
51142
|
value = value.replace(/\"/g, '\\"');
|
|
51142
51143
|
}
|
|
51143
|
-
|
|
51144
|
+
option = input.querySelector('option[value="' + value + '"]');
|
|
51144
51145
|
}
|
|
51145
|
-
if (
|
|
51146
|
+
if (option == null) {
|
|
51146
51147
|
input.value = "";
|
|
51147
51148
|
input.selectedIndex = -1;
|
|
51148
51149
|
} else {
|
|
51149
|
-
|
|
51150
|
+
option.selected = true;
|
|
51150
51151
|
}
|
|
51151
51152
|
} else {
|
|
51152
51153
|
if (range == null) {
|
|
@@ -51200,13 +51201,13 @@ var quill = { exports: {} };
|
|
|
51200
51201
|
var input = document.createElement("select");
|
|
51201
51202
|
input.classList.add("ql-" + format);
|
|
51202
51203
|
values.forEach(function(value) {
|
|
51203
|
-
var
|
|
51204
|
+
var option = document.createElement("option");
|
|
51204
51205
|
if (value !== false) {
|
|
51205
|
-
|
|
51206
|
+
option.setAttribute("value", value);
|
|
51206
51207
|
} else {
|
|
51207
|
-
|
|
51208
|
+
option.setAttribute("selected", "selected");
|
|
51208
51209
|
}
|
|
51209
|
-
input.appendChild(
|
|
51210
|
+
input.appendChild(option);
|
|
51210
51211
|
});
|
|
51211
51212
|
container.appendChild(input);
|
|
51212
51213
|
}
|
|
@@ -51358,9 +51359,9 @@ var quill = { exports: {} };
|
|
|
51358
51359
|
}
|
|
51359
51360
|
_createClass(ColorPicker2, [{
|
|
51360
51361
|
key: "buildItem",
|
|
51361
|
-
value: function buildItem(
|
|
51362
|
-
var item2 = _get(ColorPicker2.prototype.__proto__ || Object.getPrototypeOf(ColorPicker2.prototype), "buildItem", this).call(this,
|
|
51363
|
-
item2.style.backgroundColor =
|
|
51362
|
+
value: function buildItem(option) {
|
|
51363
|
+
var item2 = _get(ColorPicker2.prototype.__proto__ || Object.getPrototypeOf(ColorPicker2.prototype), "buildItem", this).call(this, option);
|
|
51364
|
+
item2.style.backgroundColor = option.getAttribute("value") || "";
|
|
51364
51365
|
return item2;
|
|
51365
51366
|
}
|
|
51366
51367
|
}, {
|
|
@@ -52165,7 +52166,7 @@ var quill = { exports: {} };
|
|
|
52165
52166
|
function _interopRequireDefault(obj) {
|
|
52166
52167
|
return obj && obj.__esModule ? obj : { default: obj };
|
|
52167
52168
|
}
|
|
52168
|
-
function
|
|
52169
|
+
function _defineProperty(obj, key2, value) {
|
|
52169
52170
|
if (key2 in obj) {
|
|
52170
52171
|
Object.defineProperty(obj, key2, { value, enumerable: true, configurable: true, writable: true });
|
|
52171
52172
|
} else {
|
|
@@ -52293,7 +52294,7 @@ var quill = { exports: {} };
|
|
|
52293
52294
|
}, {
|
|
52294
52295
|
key: "formats",
|
|
52295
52296
|
value: function formats() {
|
|
52296
|
-
return
|
|
52297
|
+
return _defineProperty({}, this.statics.blotName, this.statics.formats(this.domNode));
|
|
52297
52298
|
}
|
|
52298
52299
|
}, {
|
|
52299
52300
|
key: "insertBefore",
|
|
@@ -58960,13 +58961,13 @@ const useMessage = () => {
|
|
|
58960
58961
|
cbErr == null ? void 0 : cbErr();
|
|
58961
58962
|
});
|
|
58962
58963
|
};
|
|
58963
|
-
const msgBoxPromptAsync = (title, msg,
|
|
58964
|
+
const msgBoxPromptAsync = (title, msg, option = {}, cb, cbErr) => {
|
|
58964
58965
|
ElMessageBox.prompt(msg, title, __spreadProps(__spreadValues({
|
|
58965
58966
|
confirmButtonText: "\u786E\u5B9A",
|
|
58966
58967
|
cancelButtonText: "\u53D6\u6D88",
|
|
58967
58968
|
customClass: "ik-msg-box",
|
|
58968
58969
|
draggable: true
|
|
58969
|
-
},
|
|
58970
|
+
}, option), {
|
|
58970
58971
|
beforeClose: async (action, instance2, done) => {
|
|
58971
58972
|
var _a2;
|
|
58972
58973
|
if (action !== "confirm") {
|
|
@@ -59050,9 +59051,9 @@ var containerMixin = {
|
|
|
59050
59051
|
this.designer.appendTableCol(widget2);
|
|
59051
59052
|
},
|
|
59052
59053
|
onContainerDragAdd(evt, subList) {
|
|
59053
|
-
const
|
|
59054
|
-
if (subList[
|
|
59055
|
-
this.designer.setSelected(subList[
|
|
59054
|
+
const newIndex = evt.newIndex;
|
|
59055
|
+
if (subList[newIndex]) {
|
|
59056
|
+
this.designer.setSelected(subList[newIndex]);
|
|
59056
59057
|
}
|
|
59057
59058
|
this.designer.emitHistoryChange();
|
|
59058
59059
|
this.designer.emitEvent("field-selected", this.widget);
|
|
@@ -64492,7 +64493,7 @@ const _sfc_main$3S = {
|
|
|
64492
64493
|
}
|
|
64493
64494
|
}
|
|
64494
64495
|
},
|
|
64495
|
-
deleteOption(
|
|
64496
|
+
deleteOption(option, index2) {
|
|
64496
64497
|
this.optionModel.optionItems.splice(index2, 1);
|
|
64497
64498
|
},
|
|
64498
64499
|
addOption() {
|
|
@@ -64636,20 +64637,20 @@ function _sfc_render$3H(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
64636
64637
|
list: $options.optionModel.optionItems,
|
|
64637
64638
|
"item-key": "id"
|
|
64638
64639
|
}, { group: "optionsGroup", ghostClass: "ghost", handle: ".drag-option" }), {
|
|
64639
|
-
item: withCtx(({ element:
|
|
64640
|
+
item: withCtx(({ element: option, index: idx }) => [
|
|
64640
64641
|
createElementVNode("li", null, [
|
|
64641
64642
|
createVNode(_component_el_radio, {
|
|
64642
|
-
value:
|
|
64643
|
+
value: option.value
|
|
64643
64644
|
}, {
|
|
64644
64645
|
default: withCtx(() => [
|
|
64645
64646
|
createVNode(_component_el_input, {
|
|
64646
|
-
modelValue:
|
|
64647
|
-
"onUpdate:modelValue": ($event) =>
|
|
64647
|
+
modelValue: option.value,
|
|
64648
|
+
"onUpdate:modelValue": ($event) => option.value = $event,
|
|
64648
64649
|
size: "small"
|
|
64649
64650
|
}, null, 8, ["modelValue", "onUpdate:modelValue"]),
|
|
64650
64651
|
createVNode(_component_el_input, {
|
|
64651
|
-
modelValue:
|
|
64652
|
-
"onUpdate:modelValue": ($event) =>
|
|
64652
|
+
modelValue: option.label,
|
|
64653
|
+
"onUpdate:modelValue": ($event) => option.label = $event,
|
|
64653
64654
|
size: "small",
|
|
64654
64655
|
class: "margin-left-normal margin-right-normal"
|
|
64655
64656
|
}, null, 8, ["modelValue", "onUpdate:modelValue"]),
|
|
@@ -64662,7 +64663,7 @@ function _sfc_render$3H(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
64662
64663
|
type: "danger",
|
|
64663
64664
|
icon: "el-icon-minus",
|
|
64664
64665
|
class: "col-delete-button",
|
|
64665
|
-
onClick: ($event) => $options.deleteOption(
|
|
64666
|
+
onClick: ($event) => $options.deleteOption(option, idx)
|
|
64666
64667
|
}, null, 8, ["onClick"])
|
|
64667
64668
|
])
|
|
64668
64669
|
]),
|
|
@@ -64687,20 +64688,20 @@ function _sfc_render$3H(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
64687
64688
|
list: $options.optionModel.optionItems,
|
|
64688
64689
|
"item-key": "id"
|
|
64689
64690
|
}, { group: "optionsGroup", ghostClass: "ghost", handle: ".drag-option" }), {
|
|
64690
|
-
item: withCtx(({ element:
|
|
64691
|
+
item: withCtx(({ element: option, index: idx }) => [
|
|
64691
64692
|
createElementVNode("li", null, [
|
|
64692
64693
|
createVNode(_component_el_checkbox, {
|
|
64693
|
-
label:
|
|
64694
|
+
label: option.value
|
|
64694
64695
|
}, {
|
|
64695
64696
|
default: withCtx(() => [
|
|
64696
64697
|
createVNode(_component_el_input, {
|
|
64697
|
-
modelValue:
|
|
64698
|
-
"onUpdate:modelValue": ($event) =>
|
|
64698
|
+
modelValue: option.value,
|
|
64699
|
+
"onUpdate:modelValue": ($event) => option.value = $event,
|
|
64699
64700
|
size: "small"
|
|
64700
64701
|
}, null, 8, ["modelValue", "onUpdate:modelValue"]),
|
|
64701
64702
|
createVNode(_component_el_input, {
|
|
64702
|
-
modelValue:
|
|
64703
|
-
"onUpdate:modelValue": ($event) =>
|
|
64703
|
+
modelValue: option.label,
|
|
64704
|
+
"onUpdate:modelValue": ($event) => option.label = $event,
|
|
64704
64705
|
size: "small",
|
|
64705
64706
|
class: "margin-left-normal margin-right-normal"
|
|
64706
64707
|
}, null, 8, ["modelValue", "onUpdate:modelValue"]),
|
|
@@ -64713,7 +64714,7 @@ function _sfc_render$3H(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
64713
64714
|
type: "danger",
|
|
64714
64715
|
icon: "el-icon-minus",
|
|
64715
64716
|
class: "col-delete-button",
|
|
64716
|
-
onClick: ($event) => $options.deleteOption(
|
|
64717
|
+
onClick: ($event) => $options.deleteOption(option, idx)
|
|
64717
64718
|
}, null, 8, ["onClick"])
|
|
64718
64719
|
])
|
|
64719
64720
|
]),
|
|
@@ -66469,2134 +66470,6 @@ var __glob_0_71 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.definePro
|
|
|
66469
66470
|
__proto__: null,
|
|
66470
66471
|
"default": buttonGroupSizeEditor
|
|
66471
66472
|
}, Symbol.toStringTag, { value: "Module" }));
|
|
66472
|
-
/**!
|
|
66473
|
-
* Sortable 1.14.0
|
|
66474
|
-
* @author RubaXa <trash@rubaxa.org>
|
|
66475
|
-
* @author owenm <owen23355@gmail.com>
|
|
66476
|
-
* @license MIT
|
|
66477
|
-
*/
|
|
66478
|
-
function ownKeys(object, enumerableOnly) {
|
|
66479
|
-
var keys = Object.keys(object);
|
|
66480
|
-
if (Object.getOwnPropertySymbols) {
|
|
66481
|
-
var symbols = Object.getOwnPropertySymbols(object);
|
|
66482
|
-
if (enumerableOnly) {
|
|
66483
|
-
symbols = symbols.filter(function(sym) {
|
|
66484
|
-
return Object.getOwnPropertyDescriptor(object, sym).enumerable;
|
|
66485
|
-
});
|
|
66486
|
-
}
|
|
66487
|
-
keys.push.apply(keys, symbols);
|
|
66488
|
-
}
|
|
66489
|
-
return keys;
|
|
66490
|
-
}
|
|
66491
|
-
function _objectSpread2(target) {
|
|
66492
|
-
for (var i2 = 1; i2 < arguments.length; i2++) {
|
|
66493
|
-
var source = arguments[i2] != null ? arguments[i2] : {};
|
|
66494
|
-
if (i2 % 2) {
|
|
66495
|
-
ownKeys(Object(source), true).forEach(function(key2) {
|
|
66496
|
-
_defineProperty(target, key2, source[key2]);
|
|
66497
|
-
});
|
|
66498
|
-
} else if (Object.getOwnPropertyDescriptors) {
|
|
66499
|
-
Object.defineProperties(target, Object.getOwnPropertyDescriptors(source));
|
|
66500
|
-
} else {
|
|
66501
|
-
ownKeys(Object(source)).forEach(function(key2) {
|
|
66502
|
-
Object.defineProperty(target, key2, Object.getOwnPropertyDescriptor(source, key2));
|
|
66503
|
-
});
|
|
66504
|
-
}
|
|
66505
|
-
}
|
|
66506
|
-
return target;
|
|
66507
|
-
}
|
|
66508
|
-
function _typeof(obj) {
|
|
66509
|
-
"@babel/helpers - typeof";
|
|
66510
|
-
if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") {
|
|
66511
|
-
_typeof = function(obj2) {
|
|
66512
|
-
return typeof obj2;
|
|
66513
|
-
};
|
|
66514
|
-
} else {
|
|
66515
|
-
_typeof = function(obj2) {
|
|
66516
|
-
return obj2 && typeof Symbol === "function" && obj2.constructor === Symbol && obj2 !== Symbol.prototype ? "symbol" : typeof obj2;
|
|
66517
|
-
};
|
|
66518
|
-
}
|
|
66519
|
-
return _typeof(obj);
|
|
66520
|
-
}
|
|
66521
|
-
function _defineProperty(obj, key2, value) {
|
|
66522
|
-
if (key2 in obj) {
|
|
66523
|
-
Object.defineProperty(obj, key2, {
|
|
66524
|
-
value,
|
|
66525
|
-
enumerable: true,
|
|
66526
|
-
configurable: true,
|
|
66527
|
-
writable: true
|
|
66528
|
-
});
|
|
66529
|
-
} else {
|
|
66530
|
-
obj[key2] = value;
|
|
66531
|
-
}
|
|
66532
|
-
return obj;
|
|
66533
|
-
}
|
|
66534
|
-
function _extends() {
|
|
66535
|
-
_extends = Object.assign || function(target) {
|
|
66536
|
-
for (var i2 = 1; i2 < arguments.length; i2++) {
|
|
66537
|
-
var source = arguments[i2];
|
|
66538
|
-
for (var key2 in source) {
|
|
66539
|
-
if (Object.prototype.hasOwnProperty.call(source, key2)) {
|
|
66540
|
-
target[key2] = source[key2];
|
|
66541
|
-
}
|
|
66542
|
-
}
|
|
66543
|
-
}
|
|
66544
|
-
return target;
|
|
66545
|
-
};
|
|
66546
|
-
return _extends.apply(this, arguments);
|
|
66547
|
-
}
|
|
66548
|
-
function _objectWithoutPropertiesLoose(source, excluded) {
|
|
66549
|
-
if (source == null)
|
|
66550
|
-
return {};
|
|
66551
|
-
var target = {};
|
|
66552
|
-
var sourceKeys = Object.keys(source);
|
|
66553
|
-
var key2, i2;
|
|
66554
|
-
for (i2 = 0; i2 < sourceKeys.length; i2++) {
|
|
66555
|
-
key2 = sourceKeys[i2];
|
|
66556
|
-
if (excluded.indexOf(key2) >= 0)
|
|
66557
|
-
continue;
|
|
66558
|
-
target[key2] = source[key2];
|
|
66559
|
-
}
|
|
66560
|
-
return target;
|
|
66561
|
-
}
|
|
66562
|
-
function _objectWithoutProperties(source, excluded) {
|
|
66563
|
-
if (source == null)
|
|
66564
|
-
return {};
|
|
66565
|
-
var target = _objectWithoutPropertiesLoose(source, excluded);
|
|
66566
|
-
var key2, i2;
|
|
66567
|
-
if (Object.getOwnPropertySymbols) {
|
|
66568
|
-
var sourceSymbolKeys = Object.getOwnPropertySymbols(source);
|
|
66569
|
-
for (i2 = 0; i2 < sourceSymbolKeys.length; i2++) {
|
|
66570
|
-
key2 = sourceSymbolKeys[i2];
|
|
66571
|
-
if (excluded.indexOf(key2) >= 0)
|
|
66572
|
-
continue;
|
|
66573
|
-
if (!Object.prototype.propertyIsEnumerable.call(source, key2))
|
|
66574
|
-
continue;
|
|
66575
|
-
target[key2] = source[key2];
|
|
66576
|
-
}
|
|
66577
|
-
}
|
|
66578
|
-
return target;
|
|
66579
|
-
}
|
|
66580
|
-
var version = "1.14.0";
|
|
66581
|
-
function userAgent(pattern) {
|
|
66582
|
-
if (typeof window !== "undefined" && window.navigator) {
|
|
66583
|
-
return !!/* @__PURE__ */ navigator.userAgent.match(pattern);
|
|
66584
|
-
}
|
|
66585
|
-
}
|
|
66586
|
-
var IE11OrLess = userAgent(/(?:Trident.*rv[ :]?11\.|msie|iemobile|Windows Phone)/i);
|
|
66587
|
-
var Edge = userAgent(/Edge/i);
|
|
66588
|
-
var FireFox = userAgent(/firefox/i);
|
|
66589
|
-
var Safari = userAgent(/safari/i) && !userAgent(/chrome/i) && !userAgent(/android/i);
|
|
66590
|
-
var IOS = userAgent(/iP(ad|od|hone)/i);
|
|
66591
|
-
var ChromeForAndroid = userAgent(/chrome/i) && userAgent(/android/i);
|
|
66592
|
-
var captureMode = {
|
|
66593
|
-
capture: false,
|
|
66594
|
-
passive: false
|
|
66595
|
-
};
|
|
66596
|
-
function on(el, event, fn) {
|
|
66597
|
-
el.addEventListener(event, fn, !IE11OrLess && captureMode);
|
|
66598
|
-
}
|
|
66599
|
-
function off(el, event, fn) {
|
|
66600
|
-
el.removeEventListener(event, fn, !IE11OrLess && captureMode);
|
|
66601
|
-
}
|
|
66602
|
-
function matches(el, selector) {
|
|
66603
|
-
if (!selector)
|
|
66604
|
-
return;
|
|
66605
|
-
selector[0] === ">" && (selector = selector.substring(1));
|
|
66606
|
-
if (el) {
|
|
66607
|
-
try {
|
|
66608
|
-
if (el.matches) {
|
|
66609
|
-
return el.matches(selector);
|
|
66610
|
-
} else if (el.msMatchesSelector) {
|
|
66611
|
-
return el.msMatchesSelector(selector);
|
|
66612
|
-
} else if (el.webkitMatchesSelector) {
|
|
66613
|
-
return el.webkitMatchesSelector(selector);
|
|
66614
|
-
}
|
|
66615
|
-
} catch (_2) {
|
|
66616
|
-
return false;
|
|
66617
|
-
}
|
|
66618
|
-
}
|
|
66619
|
-
return false;
|
|
66620
|
-
}
|
|
66621
|
-
function getParentOrHost(el) {
|
|
66622
|
-
return el.host && el !== document && el.host.nodeType ? el.host : el.parentNode;
|
|
66623
|
-
}
|
|
66624
|
-
function closest(el, selector, ctx, includeCTX) {
|
|
66625
|
-
if (el) {
|
|
66626
|
-
ctx = ctx || document;
|
|
66627
|
-
do {
|
|
66628
|
-
if (selector != null && (selector[0] === ">" ? el.parentNode === ctx && matches(el, selector) : matches(el, selector)) || includeCTX && el === ctx) {
|
|
66629
|
-
return el;
|
|
66630
|
-
}
|
|
66631
|
-
if (el === ctx)
|
|
66632
|
-
break;
|
|
66633
|
-
} while (el = getParentOrHost(el));
|
|
66634
|
-
}
|
|
66635
|
-
return null;
|
|
66636
|
-
}
|
|
66637
|
-
var R_SPACE = /\s+/g;
|
|
66638
|
-
function toggleClass(el, name2, state) {
|
|
66639
|
-
if (el && name2) {
|
|
66640
|
-
if (el.classList) {
|
|
66641
|
-
el.classList[state ? "add" : "remove"](name2);
|
|
66642
|
-
} else {
|
|
66643
|
-
var className = (" " + el.className + " ").replace(R_SPACE, " ").replace(" " + name2 + " ", " ");
|
|
66644
|
-
el.className = (className + (state ? " " + name2 : "")).replace(R_SPACE, " ");
|
|
66645
|
-
}
|
|
66646
|
-
}
|
|
66647
|
-
}
|
|
66648
|
-
function css(el, prop, val) {
|
|
66649
|
-
var style = el && el.style;
|
|
66650
|
-
if (style) {
|
|
66651
|
-
if (val === void 0) {
|
|
66652
|
-
if (document.defaultView && document.defaultView.getComputedStyle) {
|
|
66653
|
-
val = document.defaultView.getComputedStyle(el, "");
|
|
66654
|
-
} else if (el.currentStyle) {
|
|
66655
|
-
val = el.currentStyle;
|
|
66656
|
-
}
|
|
66657
|
-
return prop === void 0 ? val : val[prop];
|
|
66658
|
-
} else {
|
|
66659
|
-
if (!(prop in style) && prop.indexOf("webkit") === -1) {
|
|
66660
|
-
prop = "-webkit-" + prop;
|
|
66661
|
-
}
|
|
66662
|
-
style[prop] = val + (typeof val === "string" ? "" : "px");
|
|
66663
|
-
}
|
|
66664
|
-
}
|
|
66665
|
-
}
|
|
66666
|
-
function matrix(el, selfOnly) {
|
|
66667
|
-
var appliedTransforms = "";
|
|
66668
|
-
if (typeof el === "string") {
|
|
66669
|
-
appliedTransforms = el;
|
|
66670
|
-
} else {
|
|
66671
|
-
do {
|
|
66672
|
-
var transform = css(el, "transform");
|
|
66673
|
-
if (transform && transform !== "none") {
|
|
66674
|
-
appliedTransforms = transform + " " + appliedTransforms;
|
|
66675
|
-
}
|
|
66676
|
-
} while (!selfOnly && (el = el.parentNode));
|
|
66677
|
-
}
|
|
66678
|
-
var matrixFn = window.DOMMatrix || window.WebKitCSSMatrix || window.CSSMatrix || window.MSCSSMatrix;
|
|
66679
|
-
return matrixFn && new matrixFn(appliedTransforms);
|
|
66680
|
-
}
|
|
66681
|
-
function find(ctx, tagName, iterator) {
|
|
66682
|
-
if (ctx) {
|
|
66683
|
-
var list = ctx.getElementsByTagName(tagName), i2 = 0, n = list.length;
|
|
66684
|
-
if (iterator) {
|
|
66685
|
-
for (; i2 < n; i2++) {
|
|
66686
|
-
iterator(list[i2], i2);
|
|
66687
|
-
}
|
|
66688
|
-
}
|
|
66689
|
-
return list;
|
|
66690
|
-
}
|
|
66691
|
-
return [];
|
|
66692
|
-
}
|
|
66693
|
-
function getWindowScrollingElement() {
|
|
66694
|
-
var scrollingElement = document.scrollingElement;
|
|
66695
|
-
if (scrollingElement) {
|
|
66696
|
-
return scrollingElement;
|
|
66697
|
-
} else {
|
|
66698
|
-
return document.documentElement;
|
|
66699
|
-
}
|
|
66700
|
-
}
|
|
66701
|
-
function getRect(el, relativeToContainingBlock, relativeToNonStaticParent, undoScale, container) {
|
|
66702
|
-
if (!el.getBoundingClientRect && el !== window)
|
|
66703
|
-
return;
|
|
66704
|
-
var elRect, top, left, bottom, right, height2, width2;
|
|
66705
|
-
if (el !== window && el.parentNode && el !== getWindowScrollingElement()) {
|
|
66706
|
-
elRect = el.getBoundingClientRect();
|
|
66707
|
-
top = elRect.top;
|
|
66708
|
-
left = elRect.left;
|
|
66709
|
-
bottom = elRect.bottom;
|
|
66710
|
-
right = elRect.right;
|
|
66711
|
-
height2 = elRect.height;
|
|
66712
|
-
width2 = elRect.width;
|
|
66713
|
-
} else {
|
|
66714
|
-
top = 0;
|
|
66715
|
-
left = 0;
|
|
66716
|
-
bottom = window.innerHeight;
|
|
66717
|
-
right = window.innerWidth;
|
|
66718
|
-
height2 = window.innerHeight;
|
|
66719
|
-
width2 = window.innerWidth;
|
|
66720
|
-
}
|
|
66721
|
-
if ((relativeToContainingBlock || relativeToNonStaticParent) && el !== window) {
|
|
66722
|
-
container = container || el.parentNode;
|
|
66723
|
-
if (!IE11OrLess) {
|
|
66724
|
-
do {
|
|
66725
|
-
if (container && container.getBoundingClientRect && (css(container, "transform") !== "none" || relativeToNonStaticParent && css(container, "position") !== "static")) {
|
|
66726
|
-
var containerRect = container.getBoundingClientRect();
|
|
66727
|
-
top -= containerRect.top + parseInt(css(container, "border-top-width"));
|
|
66728
|
-
left -= containerRect.left + parseInt(css(container, "border-left-width"));
|
|
66729
|
-
bottom = top + elRect.height;
|
|
66730
|
-
right = left + elRect.width;
|
|
66731
|
-
break;
|
|
66732
|
-
}
|
|
66733
|
-
} while (container = container.parentNode);
|
|
66734
|
-
}
|
|
66735
|
-
}
|
|
66736
|
-
if (undoScale && el !== window) {
|
|
66737
|
-
var elMatrix = matrix(container || el), scaleX = elMatrix && elMatrix.a, scaleY = elMatrix && elMatrix.d;
|
|
66738
|
-
if (elMatrix) {
|
|
66739
|
-
top /= scaleY;
|
|
66740
|
-
left /= scaleX;
|
|
66741
|
-
width2 /= scaleX;
|
|
66742
|
-
height2 /= scaleY;
|
|
66743
|
-
bottom = top + height2;
|
|
66744
|
-
right = left + width2;
|
|
66745
|
-
}
|
|
66746
|
-
}
|
|
66747
|
-
return {
|
|
66748
|
-
top,
|
|
66749
|
-
left,
|
|
66750
|
-
bottom,
|
|
66751
|
-
right,
|
|
66752
|
-
width: width2,
|
|
66753
|
-
height: height2
|
|
66754
|
-
};
|
|
66755
|
-
}
|
|
66756
|
-
function isScrolledPast(el, elSide, parentSide) {
|
|
66757
|
-
var parent = getParentAutoScrollElement(el, true), elSideVal = getRect(el)[elSide];
|
|
66758
|
-
while (parent) {
|
|
66759
|
-
var parentSideVal = getRect(parent)[parentSide], visible = void 0;
|
|
66760
|
-
if (parentSide === "top" || parentSide === "left") {
|
|
66761
|
-
visible = elSideVal >= parentSideVal;
|
|
66762
|
-
} else {
|
|
66763
|
-
visible = elSideVal <= parentSideVal;
|
|
66764
|
-
}
|
|
66765
|
-
if (!visible)
|
|
66766
|
-
return parent;
|
|
66767
|
-
if (parent === getWindowScrollingElement())
|
|
66768
|
-
break;
|
|
66769
|
-
parent = getParentAutoScrollElement(parent, false);
|
|
66770
|
-
}
|
|
66771
|
-
return false;
|
|
66772
|
-
}
|
|
66773
|
-
function getChild(el, childNum, options, includeDragEl) {
|
|
66774
|
-
var currentChild = 0, i2 = 0, children = el.children;
|
|
66775
|
-
while (i2 < children.length) {
|
|
66776
|
-
if (children[i2].style.display !== "none" && children[i2] !== Sortable$1.ghost && (includeDragEl || children[i2] !== Sortable$1.dragged) && closest(children[i2], options.draggable, el, false)) {
|
|
66777
|
-
if (currentChild === childNum) {
|
|
66778
|
-
return children[i2];
|
|
66779
|
-
}
|
|
66780
|
-
currentChild++;
|
|
66781
|
-
}
|
|
66782
|
-
i2++;
|
|
66783
|
-
}
|
|
66784
|
-
return null;
|
|
66785
|
-
}
|
|
66786
|
-
function lastChild(el, selector) {
|
|
66787
|
-
var last = el.lastElementChild;
|
|
66788
|
-
while (last && (last === Sortable$1.ghost || css(last, "display") === "none" || selector && !matches(last, selector))) {
|
|
66789
|
-
last = last.previousElementSibling;
|
|
66790
|
-
}
|
|
66791
|
-
return last || null;
|
|
66792
|
-
}
|
|
66793
|
-
function index$j(el, selector) {
|
|
66794
|
-
var index2 = 0;
|
|
66795
|
-
if (!el || !el.parentNode) {
|
|
66796
|
-
return -1;
|
|
66797
|
-
}
|
|
66798
|
-
while (el = el.previousElementSibling) {
|
|
66799
|
-
if (el.nodeName.toUpperCase() !== "TEMPLATE" && el !== Sortable$1.clone && (!selector || matches(el, selector))) {
|
|
66800
|
-
index2++;
|
|
66801
|
-
}
|
|
66802
|
-
}
|
|
66803
|
-
return index2;
|
|
66804
|
-
}
|
|
66805
|
-
function getRelativeScrollOffset(el) {
|
|
66806
|
-
var offsetLeft = 0, offsetTop = 0, winScroller = getWindowScrollingElement();
|
|
66807
|
-
if (el) {
|
|
66808
|
-
do {
|
|
66809
|
-
var elMatrix = matrix(el), scaleX = elMatrix.a, scaleY = elMatrix.d;
|
|
66810
|
-
offsetLeft += el.scrollLeft * scaleX;
|
|
66811
|
-
offsetTop += el.scrollTop * scaleY;
|
|
66812
|
-
} while (el !== winScroller && (el = el.parentNode));
|
|
66813
|
-
}
|
|
66814
|
-
return [offsetLeft, offsetTop];
|
|
66815
|
-
}
|
|
66816
|
-
function indexOfObject(arr, obj) {
|
|
66817
|
-
for (var i2 in arr) {
|
|
66818
|
-
if (!arr.hasOwnProperty(i2))
|
|
66819
|
-
continue;
|
|
66820
|
-
for (var key2 in obj) {
|
|
66821
|
-
if (obj.hasOwnProperty(key2) && obj[key2] === arr[i2][key2])
|
|
66822
|
-
return Number(i2);
|
|
66823
|
-
}
|
|
66824
|
-
}
|
|
66825
|
-
return -1;
|
|
66826
|
-
}
|
|
66827
|
-
function getParentAutoScrollElement(el, includeSelf) {
|
|
66828
|
-
if (!el || !el.getBoundingClientRect)
|
|
66829
|
-
return getWindowScrollingElement();
|
|
66830
|
-
var elem = el;
|
|
66831
|
-
var gotSelf = false;
|
|
66832
|
-
do {
|
|
66833
|
-
if (elem.clientWidth < elem.scrollWidth || elem.clientHeight < elem.scrollHeight) {
|
|
66834
|
-
var elemCSS = css(elem);
|
|
66835
|
-
if (elem.clientWidth < elem.scrollWidth && (elemCSS.overflowX == "auto" || elemCSS.overflowX == "scroll") || elem.clientHeight < elem.scrollHeight && (elemCSS.overflowY == "auto" || elemCSS.overflowY == "scroll")) {
|
|
66836
|
-
if (!elem.getBoundingClientRect || elem === document.body)
|
|
66837
|
-
return getWindowScrollingElement();
|
|
66838
|
-
if (gotSelf || includeSelf)
|
|
66839
|
-
return elem;
|
|
66840
|
-
gotSelf = true;
|
|
66841
|
-
}
|
|
66842
|
-
}
|
|
66843
|
-
} while (elem = elem.parentNode);
|
|
66844
|
-
return getWindowScrollingElement();
|
|
66845
|
-
}
|
|
66846
|
-
function extend(dst, src) {
|
|
66847
|
-
if (dst && src) {
|
|
66848
|
-
for (var key2 in src) {
|
|
66849
|
-
if (src.hasOwnProperty(key2)) {
|
|
66850
|
-
dst[key2] = src[key2];
|
|
66851
|
-
}
|
|
66852
|
-
}
|
|
66853
|
-
}
|
|
66854
|
-
return dst;
|
|
66855
|
-
}
|
|
66856
|
-
function isRectEqual(rect1, rect2) {
|
|
66857
|
-
return Math.round(rect1.top) === Math.round(rect2.top) && Math.round(rect1.left) === Math.round(rect2.left) && Math.round(rect1.height) === Math.round(rect2.height) && Math.round(rect1.width) === Math.round(rect2.width);
|
|
66858
|
-
}
|
|
66859
|
-
var _throttleTimeout;
|
|
66860
|
-
function throttle(callback, ms) {
|
|
66861
|
-
return function() {
|
|
66862
|
-
if (!_throttleTimeout) {
|
|
66863
|
-
var args = arguments, _this = this;
|
|
66864
|
-
if (args.length === 1) {
|
|
66865
|
-
callback.call(_this, args[0]);
|
|
66866
|
-
} else {
|
|
66867
|
-
callback.apply(_this, args);
|
|
66868
|
-
}
|
|
66869
|
-
_throttleTimeout = setTimeout(function() {
|
|
66870
|
-
_throttleTimeout = void 0;
|
|
66871
|
-
}, ms);
|
|
66872
|
-
}
|
|
66873
|
-
};
|
|
66874
|
-
}
|
|
66875
|
-
function cancelThrottle() {
|
|
66876
|
-
clearTimeout(_throttleTimeout);
|
|
66877
|
-
_throttleTimeout = void 0;
|
|
66878
|
-
}
|
|
66879
|
-
function scrollBy(el, x2, y) {
|
|
66880
|
-
el.scrollLeft += x2;
|
|
66881
|
-
el.scrollTop += y;
|
|
66882
|
-
}
|
|
66883
|
-
function clone(el) {
|
|
66884
|
-
var Polymer = window.Polymer;
|
|
66885
|
-
var $ = window.jQuery || window.Zepto;
|
|
66886
|
-
if (Polymer && Polymer.dom) {
|
|
66887
|
-
return Polymer.dom(el).cloneNode(true);
|
|
66888
|
-
} else if ($) {
|
|
66889
|
-
return $(el).clone(true)[0];
|
|
66890
|
-
} else {
|
|
66891
|
-
return el.cloneNode(true);
|
|
66892
|
-
}
|
|
66893
|
-
}
|
|
66894
|
-
var expando = "Sortable" + new Date().getTime();
|
|
66895
|
-
function AnimationStateManager() {
|
|
66896
|
-
var animationStates = [], animationCallbackId;
|
|
66897
|
-
return {
|
|
66898
|
-
captureAnimationState: function captureAnimationState() {
|
|
66899
|
-
animationStates = [];
|
|
66900
|
-
if (!this.options.animation)
|
|
66901
|
-
return;
|
|
66902
|
-
var children = [].slice.call(this.el.children);
|
|
66903
|
-
children.forEach(function(child) {
|
|
66904
|
-
if (css(child, "display") === "none" || child === Sortable$1.ghost)
|
|
66905
|
-
return;
|
|
66906
|
-
animationStates.push({
|
|
66907
|
-
target: child,
|
|
66908
|
-
rect: getRect(child)
|
|
66909
|
-
});
|
|
66910
|
-
var fromRect = _objectSpread2({}, animationStates[animationStates.length - 1].rect);
|
|
66911
|
-
if (child.thisAnimationDuration) {
|
|
66912
|
-
var childMatrix = matrix(child, true);
|
|
66913
|
-
if (childMatrix) {
|
|
66914
|
-
fromRect.top -= childMatrix.f;
|
|
66915
|
-
fromRect.left -= childMatrix.e;
|
|
66916
|
-
}
|
|
66917
|
-
}
|
|
66918
|
-
child.fromRect = fromRect;
|
|
66919
|
-
});
|
|
66920
|
-
},
|
|
66921
|
-
addAnimationState: function addAnimationState(state) {
|
|
66922
|
-
animationStates.push(state);
|
|
66923
|
-
},
|
|
66924
|
-
removeAnimationState: function removeAnimationState(target) {
|
|
66925
|
-
animationStates.splice(indexOfObject(animationStates, {
|
|
66926
|
-
target
|
|
66927
|
-
}), 1);
|
|
66928
|
-
},
|
|
66929
|
-
animateAll: function animateAll(callback) {
|
|
66930
|
-
var _this = this;
|
|
66931
|
-
if (!this.options.animation) {
|
|
66932
|
-
clearTimeout(animationCallbackId);
|
|
66933
|
-
if (typeof callback === "function")
|
|
66934
|
-
callback();
|
|
66935
|
-
return;
|
|
66936
|
-
}
|
|
66937
|
-
var animating = false, animationTime = 0;
|
|
66938
|
-
animationStates.forEach(function(state) {
|
|
66939
|
-
var time = 0, target = state.target, fromRect = target.fromRect, toRect = getRect(target), prevFromRect = target.prevFromRect, prevToRect = target.prevToRect, animatingRect = state.rect, targetMatrix = matrix(target, true);
|
|
66940
|
-
if (targetMatrix) {
|
|
66941
|
-
toRect.top -= targetMatrix.f;
|
|
66942
|
-
toRect.left -= targetMatrix.e;
|
|
66943
|
-
}
|
|
66944
|
-
target.toRect = toRect;
|
|
66945
|
-
if (target.thisAnimationDuration) {
|
|
66946
|
-
if (isRectEqual(prevFromRect, toRect) && !isRectEqual(fromRect, toRect) && (animatingRect.top - toRect.top) / (animatingRect.left - toRect.left) === (fromRect.top - toRect.top) / (fromRect.left - toRect.left)) {
|
|
66947
|
-
time = calculateRealTime(animatingRect, prevFromRect, prevToRect, _this.options);
|
|
66948
|
-
}
|
|
66949
|
-
}
|
|
66950
|
-
if (!isRectEqual(toRect, fromRect)) {
|
|
66951
|
-
target.prevFromRect = fromRect;
|
|
66952
|
-
target.prevToRect = toRect;
|
|
66953
|
-
if (!time) {
|
|
66954
|
-
time = _this.options.animation;
|
|
66955
|
-
}
|
|
66956
|
-
_this.animate(target, animatingRect, toRect, time);
|
|
66957
|
-
}
|
|
66958
|
-
if (time) {
|
|
66959
|
-
animating = true;
|
|
66960
|
-
animationTime = Math.max(animationTime, time);
|
|
66961
|
-
clearTimeout(target.animationResetTimer);
|
|
66962
|
-
target.animationResetTimer = setTimeout(function() {
|
|
66963
|
-
target.animationTime = 0;
|
|
66964
|
-
target.prevFromRect = null;
|
|
66965
|
-
target.fromRect = null;
|
|
66966
|
-
target.prevToRect = null;
|
|
66967
|
-
target.thisAnimationDuration = null;
|
|
66968
|
-
}, time);
|
|
66969
|
-
target.thisAnimationDuration = time;
|
|
66970
|
-
}
|
|
66971
|
-
});
|
|
66972
|
-
clearTimeout(animationCallbackId);
|
|
66973
|
-
if (!animating) {
|
|
66974
|
-
if (typeof callback === "function")
|
|
66975
|
-
callback();
|
|
66976
|
-
} else {
|
|
66977
|
-
animationCallbackId = setTimeout(function() {
|
|
66978
|
-
if (typeof callback === "function")
|
|
66979
|
-
callback();
|
|
66980
|
-
}, animationTime);
|
|
66981
|
-
}
|
|
66982
|
-
animationStates = [];
|
|
66983
|
-
},
|
|
66984
|
-
animate: function animate(target, currentRect, toRect, duration2) {
|
|
66985
|
-
if (duration2) {
|
|
66986
|
-
css(target, "transition", "");
|
|
66987
|
-
css(target, "transform", "");
|
|
66988
|
-
var elMatrix = matrix(this.el), scaleX = elMatrix && elMatrix.a, scaleY = elMatrix && elMatrix.d, translateX = (currentRect.left - toRect.left) / (scaleX || 1), translateY = (currentRect.top - toRect.top) / (scaleY || 1);
|
|
66989
|
-
target.animatingX = !!translateX;
|
|
66990
|
-
target.animatingY = !!translateY;
|
|
66991
|
-
css(target, "transform", "translate3d(" + translateX + "px," + translateY + "px,0)");
|
|
66992
|
-
this.forRepaintDummy = repaint(target);
|
|
66993
|
-
css(target, "transition", "transform " + duration2 + "ms" + (this.options.easing ? " " + this.options.easing : ""));
|
|
66994
|
-
css(target, "transform", "translate3d(0,0,0)");
|
|
66995
|
-
typeof target.animated === "number" && clearTimeout(target.animated);
|
|
66996
|
-
target.animated = setTimeout(function() {
|
|
66997
|
-
css(target, "transition", "");
|
|
66998
|
-
css(target, "transform", "");
|
|
66999
|
-
target.animated = false;
|
|
67000
|
-
target.animatingX = false;
|
|
67001
|
-
target.animatingY = false;
|
|
67002
|
-
}, duration2);
|
|
67003
|
-
}
|
|
67004
|
-
}
|
|
67005
|
-
};
|
|
67006
|
-
}
|
|
67007
|
-
function repaint(target) {
|
|
67008
|
-
return target.offsetWidth;
|
|
67009
|
-
}
|
|
67010
|
-
function calculateRealTime(animatingRect, fromRect, toRect, options) {
|
|
67011
|
-
return Math.sqrt(Math.pow(fromRect.top - animatingRect.top, 2) + Math.pow(fromRect.left - animatingRect.left, 2)) / Math.sqrt(Math.pow(fromRect.top - toRect.top, 2) + Math.pow(fromRect.left - toRect.left, 2)) * options.animation;
|
|
67012
|
-
}
|
|
67013
|
-
var plugins = [];
|
|
67014
|
-
var defaults = {
|
|
67015
|
-
initializeByDefault: true
|
|
67016
|
-
};
|
|
67017
|
-
var PluginManager = {
|
|
67018
|
-
mount: function mount(plugin) {
|
|
67019
|
-
for (var option2 in defaults) {
|
|
67020
|
-
if (defaults.hasOwnProperty(option2) && !(option2 in plugin)) {
|
|
67021
|
-
plugin[option2] = defaults[option2];
|
|
67022
|
-
}
|
|
67023
|
-
}
|
|
67024
|
-
plugins.forEach(function(p2) {
|
|
67025
|
-
if (p2.pluginName === plugin.pluginName) {
|
|
67026
|
-
throw "Sortable: Cannot mount plugin ".concat(plugin.pluginName, " more than once");
|
|
67027
|
-
}
|
|
67028
|
-
});
|
|
67029
|
-
plugins.push(plugin);
|
|
67030
|
-
},
|
|
67031
|
-
pluginEvent: function pluginEvent(eventName, sortable, evt) {
|
|
67032
|
-
var _this = this;
|
|
67033
|
-
this.eventCanceled = false;
|
|
67034
|
-
evt.cancel = function() {
|
|
67035
|
-
_this.eventCanceled = true;
|
|
67036
|
-
};
|
|
67037
|
-
var eventNameGlobal = eventName + "Global";
|
|
67038
|
-
plugins.forEach(function(plugin) {
|
|
67039
|
-
if (!sortable[plugin.pluginName])
|
|
67040
|
-
return;
|
|
67041
|
-
if (sortable[plugin.pluginName][eventNameGlobal]) {
|
|
67042
|
-
sortable[plugin.pluginName][eventNameGlobal](_objectSpread2({
|
|
67043
|
-
sortable
|
|
67044
|
-
}, evt));
|
|
67045
|
-
}
|
|
67046
|
-
if (sortable.options[plugin.pluginName] && sortable[plugin.pluginName][eventName]) {
|
|
67047
|
-
sortable[plugin.pluginName][eventName](_objectSpread2({
|
|
67048
|
-
sortable
|
|
67049
|
-
}, evt));
|
|
67050
|
-
}
|
|
67051
|
-
});
|
|
67052
|
-
},
|
|
67053
|
-
initializePlugins: function initializePlugins(sortable, el, defaults2, options) {
|
|
67054
|
-
plugins.forEach(function(plugin) {
|
|
67055
|
-
var pluginName = plugin.pluginName;
|
|
67056
|
-
if (!sortable.options[pluginName] && !plugin.initializeByDefault)
|
|
67057
|
-
return;
|
|
67058
|
-
var initialized = new plugin(sortable, el, sortable.options);
|
|
67059
|
-
initialized.sortable = sortable;
|
|
67060
|
-
initialized.options = sortable.options;
|
|
67061
|
-
sortable[pluginName] = initialized;
|
|
67062
|
-
_extends(defaults2, initialized.defaults);
|
|
67063
|
-
});
|
|
67064
|
-
for (var option2 in sortable.options) {
|
|
67065
|
-
if (!sortable.options.hasOwnProperty(option2))
|
|
67066
|
-
continue;
|
|
67067
|
-
var modified = this.modifyOption(sortable, option2, sortable.options[option2]);
|
|
67068
|
-
if (typeof modified !== "undefined") {
|
|
67069
|
-
sortable.options[option2] = modified;
|
|
67070
|
-
}
|
|
67071
|
-
}
|
|
67072
|
-
},
|
|
67073
|
-
getEventProperties: function getEventProperties(name2, sortable) {
|
|
67074
|
-
var eventProperties = {};
|
|
67075
|
-
plugins.forEach(function(plugin) {
|
|
67076
|
-
if (typeof plugin.eventProperties !== "function")
|
|
67077
|
-
return;
|
|
67078
|
-
_extends(eventProperties, plugin.eventProperties.call(sortable[plugin.pluginName], name2));
|
|
67079
|
-
});
|
|
67080
|
-
return eventProperties;
|
|
67081
|
-
},
|
|
67082
|
-
modifyOption: function modifyOption(sortable, name2, value) {
|
|
67083
|
-
var modifiedValue;
|
|
67084
|
-
plugins.forEach(function(plugin) {
|
|
67085
|
-
if (!sortable[plugin.pluginName])
|
|
67086
|
-
return;
|
|
67087
|
-
if (plugin.optionListeners && typeof plugin.optionListeners[name2] === "function") {
|
|
67088
|
-
modifiedValue = plugin.optionListeners[name2].call(sortable[plugin.pluginName], value);
|
|
67089
|
-
}
|
|
67090
|
-
});
|
|
67091
|
-
return modifiedValue;
|
|
67092
|
-
}
|
|
67093
|
-
};
|
|
67094
|
-
function dispatchEvent(_ref) {
|
|
67095
|
-
var sortable = _ref.sortable, rootEl2 = _ref.rootEl, name2 = _ref.name, targetEl = _ref.targetEl, cloneEl2 = _ref.cloneEl, toEl = _ref.toEl, fromEl = _ref.fromEl, oldIndex2 = _ref.oldIndex, newIndex2 = _ref.newIndex, oldDraggableIndex2 = _ref.oldDraggableIndex, newDraggableIndex2 = _ref.newDraggableIndex, originalEvent = _ref.originalEvent, putSortable2 = _ref.putSortable, extraEventProperties = _ref.extraEventProperties;
|
|
67096
|
-
sortable = sortable || rootEl2 && rootEl2[expando];
|
|
67097
|
-
if (!sortable)
|
|
67098
|
-
return;
|
|
67099
|
-
var evt, options = sortable.options, onName = "on" + name2.charAt(0).toUpperCase() + name2.substr(1);
|
|
67100
|
-
if (window.CustomEvent && !IE11OrLess && !Edge) {
|
|
67101
|
-
evt = new CustomEvent(name2, {
|
|
67102
|
-
bubbles: true,
|
|
67103
|
-
cancelable: true
|
|
67104
|
-
});
|
|
67105
|
-
} else {
|
|
67106
|
-
evt = document.createEvent("Event");
|
|
67107
|
-
evt.initEvent(name2, true, true);
|
|
67108
|
-
}
|
|
67109
|
-
evt.to = toEl || rootEl2;
|
|
67110
|
-
evt.from = fromEl || rootEl2;
|
|
67111
|
-
evt.item = targetEl || rootEl2;
|
|
67112
|
-
evt.clone = cloneEl2;
|
|
67113
|
-
evt.oldIndex = oldIndex2;
|
|
67114
|
-
evt.newIndex = newIndex2;
|
|
67115
|
-
evt.oldDraggableIndex = oldDraggableIndex2;
|
|
67116
|
-
evt.newDraggableIndex = newDraggableIndex2;
|
|
67117
|
-
evt.originalEvent = originalEvent;
|
|
67118
|
-
evt.pullMode = putSortable2 ? putSortable2.lastPutMode : void 0;
|
|
67119
|
-
var allEventProperties = _objectSpread2(_objectSpread2({}, extraEventProperties), PluginManager.getEventProperties(name2, sortable));
|
|
67120
|
-
for (var option2 in allEventProperties) {
|
|
67121
|
-
evt[option2] = allEventProperties[option2];
|
|
67122
|
-
}
|
|
67123
|
-
if (rootEl2) {
|
|
67124
|
-
rootEl2.dispatchEvent(evt);
|
|
67125
|
-
}
|
|
67126
|
-
if (options[onName]) {
|
|
67127
|
-
options[onName].call(sortable, evt);
|
|
67128
|
-
}
|
|
67129
|
-
}
|
|
67130
|
-
var _excluded = ["evt"];
|
|
67131
|
-
var pluginEvent2 = function pluginEvent3(eventName, sortable) {
|
|
67132
|
-
var _ref = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : {}, originalEvent = _ref.evt, data = _objectWithoutProperties(_ref, _excluded);
|
|
67133
|
-
PluginManager.pluginEvent.bind(Sortable$1)(eventName, sortable, _objectSpread2({
|
|
67134
|
-
dragEl,
|
|
67135
|
-
parentEl,
|
|
67136
|
-
ghostEl,
|
|
67137
|
-
rootEl,
|
|
67138
|
-
nextEl,
|
|
67139
|
-
lastDownEl,
|
|
67140
|
-
cloneEl,
|
|
67141
|
-
cloneHidden,
|
|
67142
|
-
dragStarted: moved,
|
|
67143
|
-
putSortable,
|
|
67144
|
-
activeSortable: Sortable$1.active,
|
|
67145
|
-
originalEvent,
|
|
67146
|
-
oldIndex,
|
|
67147
|
-
oldDraggableIndex,
|
|
67148
|
-
newIndex,
|
|
67149
|
-
newDraggableIndex,
|
|
67150
|
-
hideGhostForTarget: _hideGhostForTarget,
|
|
67151
|
-
unhideGhostForTarget: _unhideGhostForTarget,
|
|
67152
|
-
cloneNowHidden: function cloneNowHidden() {
|
|
67153
|
-
cloneHidden = true;
|
|
67154
|
-
},
|
|
67155
|
-
cloneNowShown: function cloneNowShown() {
|
|
67156
|
-
cloneHidden = false;
|
|
67157
|
-
},
|
|
67158
|
-
dispatchSortableEvent: function dispatchSortableEvent(name2) {
|
|
67159
|
-
_dispatchEvent({
|
|
67160
|
-
sortable,
|
|
67161
|
-
name: name2,
|
|
67162
|
-
originalEvent
|
|
67163
|
-
});
|
|
67164
|
-
}
|
|
67165
|
-
}, data));
|
|
67166
|
-
};
|
|
67167
|
-
function _dispatchEvent(info) {
|
|
67168
|
-
dispatchEvent(_objectSpread2({
|
|
67169
|
-
putSortable,
|
|
67170
|
-
cloneEl,
|
|
67171
|
-
targetEl: dragEl,
|
|
67172
|
-
rootEl,
|
|
67173
|
-
oldIndex,
|
|
67174
|
-
oldDraggableIndex,
|
|
67175
|
-
newIndex,
|
|
67176
|
-
newDraggableIndex
|
|
67177
|
-
}, info));
|
|
67178
|
-
}
|
|
67179
|
-
var dragEl, parentEl, ghostEl, rootEl, nextEl, lastDownEl, cloneEl, cloneHidden, oldIndex, newIndex, oldDraggableIndex, newDraggableIndex, activeGroup, putSortable, awaitingDragStarted = false, ignoreNextClick = false, sortables = [], tapEvt, touchEvt, lastDx, lastDy, tapDistanceLeft, tapDistanceTop, moved, lastTarget, lastDirection, pastFirstInvertThresh = false, isCircumstantialInvert = false, targetMoveDistance, ghostRelativeParent, ghostRelativeParentInitialScroll = [], _silent = false, savedInputChecked = [];
|
|
67180
|
-
var documentExists = typeof document !== "undefined", PositionGhostAbsolutely = IOS, CSSFloatProperty = Edge || IE11OrLess ? "cssFloat" : "float", supportDraggable = documentExists && !ChromeForAndroid && !IOS && "draggable" in document.createElement("div"), supportCssPointerEvents = function() {
|
|
67181
|
-
if (!documentExists)
|
|
67182
|
-
return;
|
|
67183
|
-
if (IE11OrLess) {
|
|
67184
|
-
return false;
|
|
67185
|
-
}
|
|
67186
|
-
var el = document.createElement("x");
|
|
67187
|
-
el.style.cssText = "pointer-events:auto";
|
|
67188
|
-
return el.style.pointerEvents === "auto";
|
|
67189
|
-
}(), _detectDirection = function _detectDirection2(el, options) {
|
|
67190
|
-
var elCSS = css(el), elWidth = parseInt(elCSS.width) - parseInt(elCSS.paddingLeft) - parseInt(elCSS.paddingRight) - parseInt(elCSS.borderLeftWidth) - parseInt(elCSS.borderRightWidth), child1 = getChild(el, 0, options), child2 = getChild(el, 1, options), firstChildCSS = child1 && css(child1), secondChildCSS = child2 && css(child2), firstChildWidth = firstChildCSS && parseInt(firstChildCSS.marginLeft) + parseInt(firstChildCSS.marginRight) + getRect(child1).width, secondChildWidth = secondChildCSS && parseInt(secondChildCSS.marginLeft) + parseInt(secondChildCSS.marginRight) + getRect(child2).width;
|
|
67191
|
-
if (elCSS.display === "flex") {
|
|
67192
|
-
return elCSS.flexDirection === "column" || elCSS.flexDirection === "column-reverse" ? "vertical" : "horizontal";
|
|
67193
|
-
}
|
|
67194
|
-
if (elCSS.display === "grid") {
|
|
67195
|
-
return elCSS.gridTemplateColumns.split(" ").length <= 1 ? "vertical" : "horizontal";
|
|
67196
|
-
}
|
|
67197
|
-
if (child1 && firstChildCSS["float"] && firstChildCSS["float"] !== "none") {
|
|
67198
|
-
var touchingSideChild2 = firstChildCSS["float"] === "left" ? "left" : "right";
|
|
67199
|
-
return child2 && (secondChildCSS.clear === "both" || secondChildCSS.clear === touchingSideChild2) ? "vertical" : "horizontal";
|
|
67200
|
-
}
|
|
67201
|
-
return child1 && (firstChildCSS.display === "block" || firstChildCSS.display === "flex" || firstChildCSS.display === "table" || firstChildCSS.display === "grid" || firstChildWidth >= elWidth && elCSS[CSSFloatProperty] === "none" || child2 && elCSS[CSSFloatProperty] === "none" && firstChildWidth + secondChildWidth > elWidth) ? "vertical" : "horizontal";
|
|
67202
|
-
}, _dragElInRowColumn = function _dragElInRowColumn2(dragRect, targetRect, vertical) {
|
|
67203
|
-
var dragElS1Opp = vertical ? dragRect.left : dragRect.top, dragElS2Opp = vertical ? dragRect.right : dragRect.bottom, dragElOppLength = vertical ? dragRect.width : dragRect.height, targetS1Opp = vertical ? targetRect.left : targetRect.top, targetS2Opp = vertical ? targetRect.right : targetRect.bottom, targetOppLength = vertical ? targetRect.width : targetRect.height;
|
|
67204
|
-
return dragElS1Opp === targetS1Opp || dragElS2Opp === targetS2Opp || dragElS1Opp + dragElOppLength / 2 === targetS1Opp + targetOppLength / 2;
|
|
67205
|
-
}, _detectNearestEmptySortable = function _detectNearestEmptySortable2(x2, y) {
|
|
67206
|
-
var ret;
|
|
67207
|
-
sortables.some(function(sortable) {
|
|
67208
|
-
var threshold = sortable[expando].options.emptyInsertThreshold;
|
|
67209
|
-
if (!threshold || lastChild(sortable))
|
|
67210
|
-
return;
|
|
67211
|
-
var rect = getRect(sortable), insideHorizontally = x2 >= rect.left - threshold && x2 <= rect.right + threshold, insideVertically = y >= rect.top - threshold && y <= rect.bottom + threshold;
|
|
67212
|
-
if (insideHorizontally && insideVertically) {
|
|
67213
|
-
return ret = sortable;
|
|
67214
|
-
}
|
|
67215
|
-
});
|
|
67216
|
-
return ret;
|
|
67217
|
-
}, _prepareGroup = function _prepareGroup2(options) {
|
|
67218
|
-
function toFn(value, pull) {
|
|
67219
|
-
return function(to, from, dragEl2, evt) {
|
|
67220
|
-
var sameGroup = to.options.group.name && from.options.group.name && to.options.group.name === from.options.group.name;
|
|
67221
|
-
if (value == null && (pull || sameGroup)) {
|
|
67222
|
-
return true;
|
|
67223
|
-
} else if (value == null || value === false) {
|
|
67224
|
-
return false;
|
|
67225
|
-
} else if (pull && value === "clone") {
|
|
67226
|
-
return value;
|
|
67227
|
-
} else if (typeof value === "function") {
|
|
67228
|
-
return toFn(value(to, from, dragEl2, evt), pull)(to, from, dragEl2, evt);
|
|
67229
|
-
} else {
|
|
67230
|
-
var otherGroup = (pull ? to : from).options.group.name;
|
|
67231
|
-
return value === true || typeof value === "string" && value === otherGroup || value.join && value.indexOf(otherGroup) > -1;
|
|
67232
|
-
}
|
|
67233
|
-
};
|
|
67234
|
-
}
|
|
67235
|
-
var group = {};
|
|
67236
|
-
var originalGroup = options.group;
|
|
67237
|
-
if (!originalGroup || _typeof(originalGroup) != "object") {
|
|
67238
|
-
originalGroup = {
|
|
67239
|
-
name: originalGroup
|
|
67240
|
-
};
|
|
67241
|
-
}
|
|
67242
|
-
group.name = originalGroup.name;
|
|
67243
|
-
group.checkPull = toFn(originalGroup.pull, true);
|
|
67244
|
-
group.checkPut = toFn(originalGroup.put);
|
|
67245
|
-
group.revertClone = originalGroup.revertClone;
|
|
67246
|
-
options.group = group;
|
|
67247
|
-
}, _hideGhostForTarget = function _hideGhostForTarget2() {
|
|
67248
|
-
if (!supportCssPointerEvents && ghostEl) {
|
|
67249
|
-
css(ghostEl, "display", "none");
|
|
67250
|
-
}
|
|
67251
|
-
}, _unhideGhostForTarget = function _unhideGhostForTarget2() {
|
|
67252
|
-
if (!supportCssPointerEvents && ghostEl) {
|
|
67253
|
-
css(ghostEl, "display", "");
|
|
67254
|
-
}
|
|
67255
|
-
};
|
|
67256
|
-
if (documentExists) {
|
|
67257
|
-
document.addEventListener("click", function(evt) {
|
|
67258
|
-
if (ignoreNextClick) {
|
|
67259
|
-
evt.preventDefault();
|
|
67260
|
-
evt.stopPropagation && evt.stopPropagation();
|
|
67261
|
-
evt.stopImmediatePropagation && evt.stopImmediatePropagation();
|
|
67262
|
-
ignoreNextClick = false;
|
|
67263
|
-
return false;
|
|
67264
|
-
}
|
|
67265
|
-
}, true);
|
|
67266
|
-
}
|
|
67267
|
-
var nearestEmptyInsertDetectEvent = function nearestEmptyInsertDetectEvent2(evt) {
|
|
67268
|
-
if (dragEl) {
|
|
67269
|
-
evt = evt.touches ? evt.touches[0] : evt;
|
|
67270
|
-
var nearest = _detectNearestEmptySortable(evt.clientX, evt.clientY);
|
|
67271
|
-
if (nearest) {
|
|
67272
|
-
var event = {};
|
|
67273
|
-
for (var i2 in evt) {
|
|
67274
|
-
if (evt.hasOwnProperty(i2)) {
|
|
67275
|
-
event[i2] = evt[i2];
|
|
67276
|
-
}
|
|
67277
|
-
}
|
|
67278
|
-
event.target = event.rootEl = nearest;
|
|
67279
|
-
event.preventDefault = void 0;
|
|
67280
|
-
event.stopPropagation = void 0;
|
|
67281
|
-
nearest[expando]._onDragOver(event);
|
|
67282
|
-
}
|
|
67283
|
-
}
|
|
67284
|
-
};
|
|
67285
|
-
var _checkOutsideTargetEl = function _checkOutsideTargetEl2(evt) {
|
|
67286
|
-
if (dragEl) {
|
|
67287
|
-
dragEl.parentNode[expando]._isOutsideThisEl(evt.target);
|
|
67288
|
-
}
|
|
67289
|
-
};
|
|
67290
|
-
function Sortable$1(el, options) {
|
|
67291
|
-
if (!(el && el.nodeType && el.nodeType === 1)) {
|
|
67292
|
-
throw "Sortable: `el` must be an HTMLElement, not ".concat({}.toString.call(el));
|
|
67293
|
-
}
|
|
67294
|
-
this.el = el;
|
|
67295
|
-
this.options = options = _extends({}, options);
|
|
67296
|
-
el[expando] = this;
|
|
67297
|
-
var defaults2 = {
|
|
67298
|
-
group: null,
|
|
67299
|
-
sort: true,
|
|
67300
|
-
disabled: false,
|
|
67301
|
-
store: null,
|
|
67302
|
-
handle: null,
|
|
67303
|
-
draggable: /^[uo]l$/i.test(el.nodeName) ? ">li" : ">*",
|
|
67304
|
-
swapThreshold: 1,
|
|
67305
|
-
invertSwap: false,
|
|
67306
|
-
invertedSwapThreshold: null,
|
|
67307
|
-
removeCloneOnHide: true,
|
|
67308
|
-
direction: function direction() {
|
|
67309
|
-
return _detectDirection(el, this.options);
|
|
67310
|
-
},
|
|
67311
|
-
ghostClass: "sortable-ghost",
|
|
67312
|
-
chosenClass: "sortable-chosen",
|
|
67313
|
-
dragClass: "sortable-drag",
|
|
67314
|
-
ignore: "a, img",
|
|
67315
|
-
filter: null,
|
|
67316
|
-
preventOnFilter: true,
|
|
67317
|
-
animation: 0,
|
|
67318
|
-
easing: null,
|
|
67319
|
-
setData: function setData(dataTransfer, dragEl2) {
|
|
67320
|
-
dataTransfer.setData("Text", dragEl2.textContent);
|
|
67321
|
-
},
|
|
67322
|
-
dropBubble: false,
|
|
67323
|
-
dragoverBubble: false,
|
|
67324
|
-
dataIdAttr: "data-id",
|
|
67325
|
-
delay: 0,
|
|
67326
|
-
delayOnTouchOnly: false,
|
|
67327
|
-
touchStartThreshold: (Number.parseInt ? Number : window).parseInt(window.devicePixelRatio, 10) || 1,
|
|
67328
|
-
forceFallback: false,
|
|
67329
|
-
fallbackClass: "sortable-fallback",
|
|
67330
|
-
fallbackOnBody: false,
|
|
67331
|
-
fallbackTolerance: 0,
|
|
67332
|
-
fallbackOffset: {
|
|
67333
|
-
x: 0,
|
|
67334
|
-
y: 0
|
|
67335
|
-
},
|
|
67336
|
-
supportPointer: Sortable$1.supportPointer !== false && "PointerEvent" in window && !Safari,
|
|
67337
|
-
emptyInsertThreshold: 5
|
|
67338
|
-
};
|
|
67339
|
-
PluginManager.initializePlugins(this, el, defaults2);
|
|
67340
|
-
for (var name2 in defaults2) {
|
|
67341
|
-
!(name2 in options) && (options[name2] = defaults2[name2]);
|
|
67342
|
-
}
|
|
67343
|
-
_prepareGroup(options);
|
|
67344
|
-
for (var fn in this) {
|
|
67345
|
-
if (fn.charAt(0) === "_" && typeof this[fn] === "function") {
|
|
67346
|
-
this[fn] = this[fn].bind(this);
|
|
67347
|
-
}
|
|
67348
|
-
}
|
|
67349
|
-
this.nativeDraggable = options.forceFallback ? false : supportDraggable;
|
|
67350
|
-
if (this.nativeDraggable) {
|
|
67351
|
-
this.options.touchStartThreshold = 1;
|
|
67352
|
-
}
|
|
67353
|
-
if (options.supportPointer) {
|
|
67354
|
-
on(el, "pointerdown", this._onTapStart);
|
|
67355
|
-
} else {
|
|
67356
|
-
on(el, "mousedown", this._onTapStart);
|
|
67357
|
-
on(el, "touchstart", this._onTapStart);
|
|
67358
|
-
}
|
|
67359
|
-
if (this.nativeDraggable) {
|
|
67360
|
-
on(el, "dragover", this);
|
|
67361
|
-
on(el, "dragenter", this);
|
|
67362
|
-
}
|
|
67363
|
-
sortables.push(this.el);
|
|
67364
|
-
options.store && options.store.get && this.sort(options.store.get(this) || []);
|
|
67365
|
-
_extends(this, AnimationStateManager());
|
|
67366
|
-
}
|
|
67367
|
-
Sortable$1.prototype = {
|
|
67368
|
-
constructor: Sortable$1,
|
|
67369
|
-
_isOutsideThisEl: function _isOutsideThisEl(target) {
|
|
67370
|
-
if (!this.el.contains(target) && target !== this.el) {
|
|
67371
|
-
lastTarget = null;
|
|
67372
|
-
}
|
|
67373
|
-
},
|
|
67374
|
-
_getDirection: function _getDirection(evt, target) {
|
|
67375
|
-
return typeof this.options.direction === "function" ? this.options.direction.call(this, evt, target, dragEl) : this.options.direction;
|
|
67376
|
-
},
|
|
67377
|
-
_onTapStart: function _onTapStart(evt) {
|
|
67378
|
-
if (!evt.cancelable)
|
|
67379
|
-
return;
|
|
67380
|
-
var _this = this, el = this.el, options = this.options, preventOnFilter = options.preventOnFilter, type = evt.type, touch = evt.touches && evt.touches[0] || evt.pointerType && evt.pointerType === "touch" && evt, target = (touch || evt).target, originalTarget = evt.target.shadowRoot && (evt.path && evt.path[0] || evt.composedPath && evt.composedPath()[0]) || target, filter2 = options.filter;
|
|
67381
|
-
_saveInputCheckedState(el);
|
|
67382
|
-
if (dragEl) {
|
|
67383
|
-
return;
|
|
67384
|
-
}
|
|
67385
|
-
if (/mousedown|pointerdown/.test(type) && evt.button !== 0 || options.disabled) {
|
|
67386
|
-
return;
|
|
67387
|
-
}
|
|
67388
|
-
if (originalTarget.isContentEditable) {
|
|
67389
|
-
return;
|
|
67390
|
-
}
|
|
67391
|
-
if (!this.nativeDraggable && Safari && target && target.tagName.toUpperCase() === "SELECT") {
|
|
67392
|
-
return;
|
|
67393
|
-
}
|
|
67394
|
-
target = closest(target, options.draggable, el, false);
|
|
67395
|
-
if (target && target.animated) {
|
|
67396
|
-
return;
|
|
67397
|
-
}
|
|
67398
|
-
if (lastDownEl === target) {
|
|
67399
|
-
return;
|
|
67400
|
-
}
|
|
67401
|
-
oldIndex = index$j(target);
|
|
67402
|
-
oldDraggableIndex = index$j(target, options.draggable);
|
|
67403
|
-
if (typeof filter2 === "function") {
|
|
67404
|
-
if (filter2.call(this, evt, target, this)) {
|
|
67405
|
-
_dispatchEvent({
|
|
67406
|
-
sortable: _this,
|
|
67407
|
-
rootEl: originalTarget,
|
|
67408
|
-
name: "filter",
|
|
67409
|
-
targetEl: target,
|
|
67410
|
-
toEl: el,
|
|
67411
|
-
fromEl: el
|
|
67412
|
-
});
|
|
67413
|
-
pluginEvent2("filter", _this, {
|
|
67414
|
-
evt
|
|
67415
|
-
});
|
|
67416
|
-
preventOnFilter && evt.cancelable && evt.preventDefault();
|
|
67417
|
-
return;
|
|
67418
|
-
}
|
|
67419
|
-
} else if (filter2) {
|
|
67420
|
-
filter2 = filter2.split(",").some(function(criteria) {
|
|
67421
|
-
criteria = closest(originalTarget, criteria.trim(), el, false);
|
|
67422
|
-
if (criteria) {
|
|
67423
|
-
_dispatchEvent({
|
|
67424
|
-
sortable: _this,
|
|
67425
|
-
rootEl: criteria,
|
|
67426
|
-
name: "filter",
|
|
67427
|
-
targetEl: target,
|
|
67428
|
-
fromEl: el,
|
|
67429
|
-
toEl: el
|
|
67430
|
-
});
|
|
67431
|
-
pluginEvent2("filter", _this, {
|
|
67432
|
-
evt
|
|
67433
|
-
});
|
|
67434
|
-
return true;
|
|
67435
|
-
}
|
|
67436
|
-
});
|
|
67437
|
-
if (filter2) {
|
|
67438
|
-
preventOnFilter && evt.cancelable && evt.preventDefault();
|
|
67439
|
-
return;
|
|
67440
|
-
}
|
|
67441
|
-
}
|
|
67442
|
-
if (options.handle && !closest(originalTarget, options.handle, el, false)) {
|
|
67443
|
-
return;
|
|
67444
|
-
}
|
|
67445
|
-
this._prepareDragStart(evt, touch, target);
|
|
67446
|
-
},
|
|
67447
|
-
_prepareDragStart: function _prepareDragStart(evt, touch, target) {
|
|
67448
|
-
var _this = this, el = _this.el, options = _this.options, ownerDocument = el.ownerDocument, dragStartFn;
|
|
67449
|
-
if (target && !dragEl && target.parentNode === el) {
|
|
67450
|
-
var dragRect = getRect(target);
|
|
67451
|
-
rootEl = el;
|
|
67452
|
-
dragEl = target;
|
|
67453
|
-
parentEl = dragEl.parentNode;
|
|
67454
|
-
nextEl = dragEl.nextSibling;
|
|
67455
|
-
lastDownEl = target;
|
|
67456
|
-
activeGroup = options.group;
|
|
67457
|
-
Sortable$1.dragged = dragEl;
|
|
67458
|
-
tapEvt = {
|
|
67459
|
-
target: dragEl,
|
|
67460
|
-
clientX: (touch || evt).clientX,
|
|
67461
|
-
clientY: (touch || evt).clientY
|
|
67462
|
-
};
|
|
67463
|
-
tapDistanceLeft = tapEvt.clientX - dragRect.left;
|
|
67464
|
-
tapDistanceTop = tapEvt.clientY - dragRect.top;
|
|
67465
|
-
this._lastX = (touch || evt).clientX;
|
|
67466
|
-
this._lastY = (touch || evt).clientY;
|
|
67467
|
-
dragEl.style["will-change"] = "all";
|
|
67468
|
-
dragStartFn = function dragStartFn2() {
|
|
67469
|
-
pluginEvent2("delayEnded", _this, {
|
|
67470
|
-
evt
|
|
67471
|
-
});
|
|
67472
|
-
if (Sortable$1.eventCanceled) {
|
|
67473
|
-
_this._onDrop();
|
|
67474
|
-
return;
|
|
67475
|
-
}
|
|
67476
|
-
_this._disableDelayedDragEvents();
|
|
67477
|
-
if (!FireFox && _this.nativeDraggable) {
|
|
67478
|
-
dragEl.draggable = true;
|
|
67479
|
-
}
|
|
67480
|
-
_this._triggerDragStart(evt, touch);
|
|
67481
|
-
_dispatchEvent({
|
|
67482
|
-
sortable: _this,
|
|
67483
|
-
name: "choose",
|
|
67484
|
-
originalEvent: evt
|
|
67485
|
-
});
|
|
67486
|
-
toggleClass(dragEl, options.chosenClass, true);
|
|
67487
|
-
};
|
|
67488
|
-
options.ignore.split(",").forEach(function(criteria) {
|
|
67489
|
-
find(dragEl, criteria.trim(), _disableDraggable);
|
|
67490
|
-
});
|
|
67491
|
-
on(ownerDocument, "dragover", nearestEmptyInsertDetectEvent);
|
|
67492
|
-
on(ownerDocument, "mousemove", nearestEmptyInsertDetectEvent);
|
|
67493
|
-
on(ownerDocument, "touchmove", nearestEmptyInsertDetectEvent);
|
|
67494
|
-
on(ownerDocument, "mouseup", _this._onDrop);
|
|
67495
|
-
on(ownerDocument, "touchend", _this._onDrop);
|
|
67496
|
-
on(ownerDocument, "touchcancel", _this._onDrop);
|
|
67497
|
-
if (FireFox && this.nativeDraggable) {
|
|
67498
|
-
this.options.touchStartThreshold = 4;
|
|
67499
|
-
dragEl.draggable = true;
|
|
67500
|
-
}
|
|
67501
|
-
pluginEvent2("delayStart", this, {
|
|
67502
|
-
evt
|
|
67503
|
-
});
|
|
67504
|
-
if (options.delay && (!options.delayOnTouchOnly || touch) && (!this.nativeDraggable || !(Edge || IE11OrLess))) {
|
|
67505
|
-
if (Sortable$1.eventCanceled) {
|
|
67506
|
-
this._onDrop();
|
|
67507
|
-
return;
|
|
67508
|
-
}
|
|
67509
|
-
on(ownerDocument, "mouseup", _this._disableDelayedDrag);
|
|
67510
|
-
on(ownerDocument, "touchend", _this._disableDelayedDrag);
|
|
67511
|
-
on(ownerDocument, "touchcancel", _this._disableDelayedDrag);
|
|
67512
|
-
on(ownerDocument, "mousemove", _this._delayedDragTouchMoveHandler);
|
|
67513
|
-
on(ownerDocument, "touchmove", _this._delayedDragTouchMoveHandler);
|
|
67514
|
-
options.supportPointer && on(ownerDocument, "pointermove", _this._delayedDragTouchMoveHandler);
|
|
67515
|
-
_this._dragStartTimer = setTimeout(dragStartFn, options.delay);
|
|
67516
|
-
} else {
|
|
67517
|
-
dragStartFn();
|
|
67518
|
-
}
|
|
67519
|
-
}
|
|
67520
|
-
},
|
|
67521
|
-
_delayedDragTouchMoveHandler: function _delayedDragTouchMoveHandler(e) {
|
|
67522
|
-
var touch = e.touches ? e.touches[0] : e;
|
|
67523
|
-
if (Math.max(Math.abs(touch.clientX - this._lastX), Math.abs(touch.clientY - this._lastY)) >= Math.floor(this.options.touchStartThreshold / (this.nativeDraggable && window.devicePixelRatio || 1))) {
|
|
67524
|
-
this._disableDelayedDrag();
|
|
67525
|
-
}
|
|
67526
|
-
},
|
|
67527
|
-
_disableDelayedDrag: function _disableDelayedDrag() {
|
|
67528
|
-
dragEl && _disableDraggable(dragEl);
|
|
67529
|
-
clearTimeout(this._dragStartTimer);
|
|
67530
|
-
this._disableDelayedDragEvents();
|
|
67531
|
-
},
|
|
67532
|
-
_disableDelayedDragEvents: function _disableDelayedDragEvents() {
|
|
67533
|
-
var ownerDocument = this.el.ownerDocument;
|
|
67534
|
-
off(ownerDocument, "mouseup", this._disableDelayedDrag);
|
|
67535
|
-
off(ownerDocument, "touchend", this._disableDelayedDrag);
|
|
67536
|
-
off(ownerDocument, "touchcancel", this._disableDelayedDrag);
|
|
67537
|
-
off(ownerDocument, "mousemove", this._delayedDragTouchMoveHandler);
|
|
67538
|
-
off(ownerDocument, "touchmove", this._delayedDragTouchMoveHandler);
|
|
67539
|
-
off(ownerDocument, "pointermove", this._delayedDragTouchMoveHandler);
|
|
67540
|
-
},
|
|
67541
|
-
_triggerDragStart: function _triggerDragStart(evt, touch) {
|
|
67542
|
-
touch = touch || evt.pointerType == "touch" && evt;
|
|
67543
|
-
if (!this.nativeDraggable || touch) {
|
|
67544
|
-
if (this.options.supportPointer) {
|
|
67545
|
-
on(document, "pointermove", this._onTouchMove);
|
|
67546
|
-
} else if (touch) {
|
|
67547
|
-
on(document, "touchmove", this._onTouchMove);
|
|
67548
|
-
} else {
|
|
67549
|
-
on(document, "mousemove", this._onTouchMove);
|
|
67550
|
-
}
|
|
67551
|
-
} else {
|
|
67552
|
-
on(dragEl, "dragend", this);
|
|
67553
|
-
on(rootEl, "dragstart", this._onDragStart);
|
|
67554
|
-
}
|
|
67555
|
-
try {
|
|
67556
|
-
if (document.selection) {
|
|
67557
|
-
_nextTick(function() {
|
|
67558
|
-
document.selection.empty();
|
|
67559
|
-
});
|
|
67560
|
-
} else {
|
|
67561
|
-
window.getSelection().removeAllRanges();
|
|
67562
|
-
}
|
|
67563
|
-
} catch (err) {
|
|
67564
|
-
}
|
|
67565
|
-
},
|
|
67566
|
-
_dragStarted: function _dragStarted(fallback, evt) {
|
|
67567
|
-
awaitingDragStarted = false;
|
|
67568
|
-
if (rootEl && dragEl) {
|
|
67569
|
-
pluginEvent2("dragStarted", this, {
|
|
67570
|
-
evt
|
|
67571
|
-
});
|
|
67572
|
-
if (this.nativeDraggable) {
|
|
67573
|
-
on(document, "dragover", _checkOutsideTargetEl);
|
|
67574
|
-
}
|
|
67575
|
-
var options = this.options;
|
|
67576
|
-
!fallback && toggleClass(dragEl, options.dragClass, false);
|
|
67577
|
-
toggleClass(dragEl, options.ghostClass, true);
|
|
67578
|
-
Sortable$1.active = this;
|
|
67579
|
-
fallback && this._appendGhost();
|
|
67580
|
-
_dispatchEvent({
|
|
67581
|
-
sortable: this,
|
|
67582
|
-
name: "start",
|
|
67583
|
-
originalEvent: evt
|
|
67584
|
-
});
|
|
67585
|
-
} else {
|
|
67586
|
-
this._nulling();
|
|
67587
|
-
}
|
|
67588
|
-
},
|
|
67589
|
-
_emulateDragOver: function _emulateDragOver() {
|
|
67590
|
-
if (touchEvt) {
|
|
67591
|
-
this._lastX = touchEvt.clientX;
|
|
67592
|
-
this._lastY = touchEvt.clientY;
|
|
67593
|
-
_hideGhostForTarget();
|
|
67594
|
-
var target = document.elementFromPoint(touchEvt.clientX, touchEvt.clientY);
|
|
67595
|
-
var parent = target;
|
|
67596
|
-
while (target && target.shadowRoot) {
|
|
67597
|
-
target = target.shadowRoot.elementFromPoint(touchEvt.clientX, touchEvt.clientY);
|
|
67598
|
-
if (target === parent)
|
|
67599
|
-
break;
|
|
67600
|
-
parent = target;
|
|
67601
|
-
}
|
|
67602
|
-
dragEl.parentNode[expando]._isOutsideThisEl(target);
|
|
67603
|
-
if (parent) {
|
|
67604
|
-
do {
|
|
67605
|
-
if (parent[expando]) {
|
|
67606
|
-
var inserted = void 0;
|
|
67607
|
-
inserted = parent[expando]._onDragOver({
|
|
67608
|
-
clientX: touchEvt.clientX,
|
|
67609
|
-
clientY: touchEvt.clientY,
|
|
67610
|
-
target,
|
|
67611
|
-
rootEl: parent
|
|
67612
|
-
});
|
|
67613
|
-
if (inserted && !this.options.dragoverBubble) {
|
|
67614
|
-
break;
|
|
67615
|
-
}
|
|
67616
|
-
}
|
|
67617
|
-
target = parent;
|
|
67618
|
-
} while (parent = parent.parentNode);
|
|
67619
|
-
}
|
|
67620
|
-
_unhideGhostForTarget();
|
|
67621
|
-
}
|
|
67622
|
-
},
|
|
67623
|
-
_onTouchMove: function _onTouchMove(evt) {
|
|
67624
|
-
if (tapEvt) {
|
|
67625
|
-
var options = this.options, fallbackTolerance = options.fallbackTolerance, fallbackOffset = options.fallbackOffset, touch = evt.touches ? evt.touches[0] : evt, ghostMatrix = ghostEl && matrix(ghostEl, true), scaleX = ghostEl && ghostMatrix && ghostMatrix.a, scaleY = ghostEl && ghostMatrix && ghostMatrix.d, relativeScrollOffset = PositionGhostAbsolutely && ghostRelativeParent && getRelativeScrollOffset(ghostRelativeParent), dx = (touch.clientX - tapEvt.clientX + fallbackOffset.x) / (scaleX || 1) + (relativeScrollOffset ? relativeScrollOffset[0] - ghostRelativeParentInitialScroll[0] : 0) / (scaleX || 1), dy = (touch.clientY - tapEvt.clientY + fallbackOffset.y) / (scaleY || 1) + (relativeScrollOffset ? relativeScrollOffset[1] - ghostRelativeParentInitialScroll[1] : 0) / (scaleY || 1);
|
|
67626
|
-
if (!Sortable$1.active && !awaitingDragStarted) {
|
|
67627
|
-
if (fallbackTolerance && Math.max(Math.abs(touch.clientX - this._lastX), Math.abs(touch.clientY - this._lastY)) < fallbackTolerance) {
|
|
67628
|
-
return;
|
|
67629
|
-
}
|
|
67630
|
-
this._onDragStart(evt, true);
|
|
67631
|
-
}
|
|
67632
|
-
if (ghostEl) {
|
|
67633
|
-
if (ghostMatrix) {
|
|
67634
|
-
ghostMatrix.e += dx - (lastDx || 0);
|
|
67635
|
-
ghostMatrix.f += dy - (lastDy || 0);
|
|
67636
|
-
} else {
|
|
67637
|
-
ghostMatrix = {
|
|
67638
|
-
a: 1,
|
|
67639
|
-
b: 0,
|
|
67640
|
-
c: 0,
|
|
67641
|
-
d: 1,
|
|
67642
|
-
e: dx,
|
|
67643
|
-
f: dy
|
|
67644
|
-
};
|
|
67645
|
-
}
|
|
67646
|
-
var cssMatrix = "matrix(".concat(ghostMatrix.a, ",").concat(ghostMatrix.b, ",").concat(ghostMatrix.c, ",").concat(ghostMatrix.d, ",").concat(ghostMatrix.e, ",").concat(ghostMatrix.f, ")");
|
|
67647
|
-
css(ghostEl, "webkitTransform", cssMatrix);
|
|
67648
|
-
css(ghostEl, "mozTransform", cssMatrix);
|
|
67649
|
-
css(ghostEl, "msTransform", cssMatrix);
|
|
67650
|
-
css(ghostEl, "transform", cssMatrix);
|
|
67651
|
-
lastDx = dx;
|
|
67652
|
-
lastDy = dy;
|
|
67653
|
-
touchEvt = touch;
|
|
67654
|
-
}
|
|
67655
|
-
evt.cancelable && evt.preventDefault();
|
|
67656
|
-
}
|
|
67657
|
-
},
|
|
67658
|
-
_appendGhost: function _appendGhost() {
|
|
67659
|
-
if (!ghostEl) {
|
|
67660
|
-
var container = this.options.fallbackOnBody ? document.body : rootEl, rect = getRect(dragEl, true, PositionGhostAbsolutely, true, container), options = this.options;
|
|
67661
|
-
if (PositionGhostAbsolutely) {
|
|
67662
|
-
ghostRelativeParent = container;
|
|
67663
|
-
while (css(ghostRelativeParent, "position") === "static" && css(ghostRelativeParent, "transform") === "none" && ghostRelativeParent !== document) {
|
|
67664
|
-
ghostRelativeParent = ghostRelativeParent.parentNode;
|
|
67665
|
-
}
|
|
67666
|
-
if (ghostRelativeParent !== document.body && ghostRelativeParent !== document.documentElement) {
|
|
67667
|
-
if (ghostRelativeParent === document)
|
|
67668
|
-
ghostRelativeParent = getWindowScrollingElement();
|
|
67669
|
-
rect.top += ghostRelativeParent.scrollTop;
|
|
67670
|
-
rect.left += ghostRelativeParent.scrollLeft;
|
|
67671
|
-
} else {
|
|
67672
|
-
ghostRelativeParent = getWindowScrollingElement();
|
|
67673
|
-
}
|
|
67674
|
-
ghostRelativeParentInitialScroll = getRelativeScrollOffset(ghostRelativeParent);
|
|
67675
|
-
}
|
|
67676
|
-
ghostEl = dragEl.cloneNode(true);
|
|
67677
|
-
toggleClass(ghostEl, options.ghostClass, false);
|
|
67678
|
-
toggleClass(ghostEl, options.fallbackClass, true);
|
|
67679
|
-
toggleClass(ghostEl, options.dragClass, true);
|
|
67680
|
-
css(ghostEl, "transition", "");
|
|
67681
|
-
css(ghostEl, "transform", "");
|
|
67682
|
-
css(ghostEl, "box-sizing", "border-box");
|
|
67683
|
-
css(ghostEl, "margin", 0);
|
|
67684
|
-
css(ghostEl, "top", rect.top);
|
|
67685
|
-
css(ghostEl, "left", rect.left);
|
|
67686
|
-
css(ghostEl, "width", rect.width);
|
|
67687
|
-
css(ghostEl, "height", rect.height);
|
|
67688
|
-
css(ghostEl, "opacity", "0.8");
|
|
67689
|
-
css(ghostEl, "position", PositionGhostAbsolutely ? "absolute" : "fixed");
|
|
67690
|
-
css(ghostEl, "zIndex", "100000");
|
|
67691
|
-
css(ghostEl, "pointerEvents", "none");
|
|
67692
|
-
Sortable$1.ghost = ghostEl;
|
|
67693
|
-
container.appendChild(ghostEl);
|
|
67694
|
-
css(ghostEl, "transform-origin", tapDistanceLeft / parseInt(ghostEl.style.width) * 100 + "% " + tapDistanceTop / parseInt(ghostEl.style.height) * 100 + "%");
|
|
67695
|
-
}
|
|
67696
|
-
},
|
|
67697
|
-
_onDragStart: function _onDragStart(evt, fallback) {
|
|
67698
|
-
var _this = this;
|
|
67699
|
-
var dataTransfer = evt.dataTransfer;
|
|
67700
|
-
var options = _this.options;
|
|
67701
|
-
pluginEvent2("dragStart", this, {
|
|
67702
|
-
evt
|
|
67703
|
-
});
|
|
67704
|
-
if (Sortable$1.eventCanceled) {
|
|
67705
|
-
this._onDrop();
|
|
67706
|
-
return;
|
|
67707
|
-
}
|
|
67708
|
-
pluginEvent2("setupClone", this);
|
|
67709
|
-
if (!Sortable$1.eventCanceled) {
|
|
67710
|
-
cloneEl = clone(dragEl);
|
|
67711
|
-
cloneEl.draggable = false;
|
|
67712
|
-
cloneEl.style["will-change"] = "";
|
|
67713
|
-
this._hideClone();
|
|
67714
|
-
toggleClass(cloneEl, this.options.chosenClass, false);
|
|
67715
|
-
Sortable$1.clone = cloneEl;
|
|
67716
|
-
}
|
|
67717
|
-
_this.cloneId = _nextTick(function() {
|
|
67718
|
-
pluginEvent2("clone", _this);
|
|
67719
|
-
if (Sortable$1.eventCanceled)
|
|
67720
|
-
return;
|
|
67721
|
-
if (!_this.options.removeCloneOnHide) {
|
|
67722
|
-
rootEl.insertBefore(cloneEl, dragEl);
|
|
67723
|
-
}
|
|
67724
|
-
_this._hideClone();
|
|
67725
|
-
_dispatchEvent({
|
|
67726
|
-
sortable: _this,
|
|
67727
|
-
name: "clone"
|
|
67728
|
-
});
|
|
67729
|
-
});
|
|
67730
|
-
!fallback && toggleClass(dragEl, options.dragClass, true);
|
|
67731
|
-
if (fallback) {
|
|
67732
|
-
ignoreNextClick = true;
|
|
67733
|
-
_this._loopId = setInterval(_this._emulateDragOver, 50);
|
|
67734
|
-
} else {
|
|
67735
|
-
off(document, "mouseup", _this._onDrop);
|
|
67736
|
-
off(document, "touchend", _this._onDrop);
|
|
67737
|
-
off(document, "touchcancel", _this._onDrop);
|
|
67738
|
-
if (dataTransfer) {
|
|
67739
|
-
dataTransfer.effectAllowed = "move";
|
|
67740
|
-
options.setData && options.setData.call(_this, dataTransfer, dragEl);
|
|
67741
|
-
}
|
|
67742
|
-
on(document, "drop", _this);
|
|
67743
|
-
css(dragEl, "transform", "translateZ(0)");
|
|
67744
|
-
}
|
|
67745
|
-
awaitingDragStarted = true;
|
|
67746
|
-
_this._dragStartId = _nextTick(_this._dragStarted.bind(_this, fallback, evt));
|
|
67747
|
-
on(document, "selectstart", _this);
|
|
67748
|
-
moved = true;
|
|
67749
|
-
if (Safari) {
|
|
67750
|
-
css(document.body, "user-select", "none");
|
|
67751
|
-
}
|
|
67752
|
-
},
|
|
67753
|
-
_onDragOver: function _onDragOver(evt) {
|
|
67754
|
-
var el = this.el, target = evt.target, dragRect, targetRect, revert, options = this.options, group = options.group, activeSortable = Sortable$1.active, isOwner = activeGroup === group, canSort = options.sort, fromSortable = putSortable || activeSortable, vertical, _this = this, completedFired = false;
|
|
67755
|
-
if (_silent)
|
|
67756
|
-
return;
|
|
67757
|
-
function dragOverEvent(name2, extra) {
|
|
67758
|
-
pluginEvent2(name2, _this, _objectSpread2({
|
|
67759
|
-
evt,
|
|
67760
|
-
isOwner,
|
|
67761
|
-
axis: vertical ? "vertical" : "horizontal",
|
|
67762
|
-
revert,
|
|
67763
|
-
dragRect,
|
|
67764
|
-
targetRect,
|
|
67765
|
-
canSort,
|
|
67766
|
-
fromSortable,
|
|
67767
|
-
target,
|
|
67768
|
-
completed,
|
|
67769
|
-
onMove: function onMove(target2, after2) {
|
|
67770
|
-
return _onMove(rootEl, el, dragEl, dragRect, target2, getRect(target2), evt, after2);
|
|
67771
|
-
},
|
|
67772
|
-
changed
|
|
67773
|
-
}, extra));
|
|
67774
|
-
}
|
|
67775
|
-
function capture() {
|
|
67776
|
-
dragOverEvent("dragOverAnimationCapture");
|
|
67777
|
-
_this.captureAnimationState();
|
|
67778
|
-
if (_this !== fromSortable) {
|
|
67779
|
-
fromSortable.captureAnimationState();
|
|
67780
|
-
}
|
|
67781
|
-
}
|
|
67782
|
-
function completed(insertion) {
|
|
67783
|
-
dragOverEvent("dragOverCompleted", {
|
|
67784
|
-
insertion
|
|
67785
|
-
});
|
|
67786
|
-
if (insertion) {
|
|
67787
|
-
if (isOwner) {
|
|
67788
|
-
activeSortable._hideClone();
|
|
67789
|
-
} else {
|
|
67790
|
-
activeSortable._showClone(_this);
|
|
67791
|
-
}
|
|
67792
|
-
if (_this !== fromSortable) {
|
|
67793
|
-
toggleClass(dragEl, putSortable ? putSortable.options.ghostClass : activeSortable.options.ghostClass, false);
|
|
67794
|
-
toggleClass(dragEl, options.ghostClass, true);
|
|
67795
|
-
}
|
|
67796
|
-
if (putSortable !== _this && _this !== Sortable$1.active) {
|
|
67797
|
-
putSortable = _this;
|
|
67798
|
-
} else if (_this === Sortable$1.active && putSortable) {
|
|
67799
|
-
putSortable = null;
|
|
67800
|
-
}
|
|
67801
|
-
if (fromSortable === _this) {
|
|
67802
|
-
_this._ignoreWhileAnimating = target;
|
|
67803
|
-
}
|
|
67804
|
-
_this.animateAll(function() {
|
|
67805
|
-
dragOverEvent("dragOverAnimationComplete");
|
|
67806
|
-
_this._ignoreWhileAnimating = null;
|
|
67807
|
-
});
|
|
67808
|
-
if (_this !== fromSortable) {
|
|
67809
|
-
fromSortable.animateAll();
|
|
67810
|
-
fromSortable._ignoreWhileAnimating = null;
|
|
67811
|
-
}
|
|
67812
|
-
}
|
|
67813
|
-
if (target === dragEl && !dragEl.animated || target === el && !target.animated) {
|
|
67814
|
-
lastTarget = null;
|
|
67815
|
-
}
|
|
67816
|
-
if (!options.dragoverBubble && !evt.rootEl && target !== document) {
|
|
67817
|
-
dragEl.parentNode[expando]._isOutsideThisEl(evt.target);
|
|
67818
|
-
!insertion && nearestEmptyInsertDetectEvent(evt);
|
|
67819
|
-
}
|
|
67820
|
-
!options.dragoverBubble && evt.stopPropagation && evt.stopPropagation();
|
|
67821
|
-
return completedFired = true;
|
|
67822
|
-
}
|
|
67823
|
-
function changed() {
|
|
67824
|
-
newIndex = index$j(dragEl);
|
|
67825
|
-
newDraggableIndex = index$j(dragEl, options.draggable);
|
|
67826
|
-
_dispatchEvent({
|
|
67827
|
-
sortable: _this,
|
|
67828
|
-
name: "change",
|
|
67829
|
-
toEl: el,
|
|
67830
|
-
newIndex,
|
|
67831
|
-
newDraggableIndex,
|
|
67832
|
-
originalEvent: evt
|
|
67833
|
-
});
|
|
67834
|
-
}
|
|
67835
|
-
if (evt.preventDefault !== void 0) {
|
|
67836
|
-
evt.cancelable && evt.preventDefault();
|
|
67837
|
-
}
|
|
67838
|
-
target = closest(target, options.draggable, el, true);
|
|
67839
|
-
dragOverEvent("dragOver");
|
|
67840
|
-
if (Sortable$1.eventCanceled)
|
|
67841
|
-
return completedFired;
|
|
67842
|
-
if (dragEl.contains(evt.target) || target.animated && target.animatingX && target.animatingY || _this._ignoreWhileAnimating === target) {
|
|
67843
|
-
return completed(false);
|
|
67844
|
-
}
|
|
67845
|
-
ignoreNextClick = false;
|
|
67846
|
-
if (activeSortable && !options.disabled && (isOwner ? canSort || (revert = parentEl !== rootEl) : putSortable === this || (this.lastPutMode = activeGroup.checkPull(this, activeSortable, dragEl, evt)) && group.checkPut(this, activeSortable, dragEl, evt))) {
|
|
67847
|
-
vertical = this._getDirection(evt, target) === "vertical";
|
|
67848
|
-
dragRect = getRect(dragEl);
|
|
67849
|
-
dragOverEvent("dragOverValid");
|
|
67850
|
-
if (Sortable$1.eventCanceled)
|
|
67851
|
-
return completedFired;
|
|
67852
|
-
if (revert) {
|
|
67853
|
-
parentEl = rootEl;
|
|
67854
|
-
capture();
|
|
67855
|
-
this._hideClone();
|
|
67856
|
-
dragOverEvent("revert");
|
|
67857
|
-
if (!Sortable$1.eventCanceled) {
|
|
67858
|
-
if (nextEl) {
|
|
67859
|
-
rootEl.insertBefore(dragEl, nextEl);
|
|
67860
|
-
} else {
|
|
67861
|
-
rootEl.appendChild(dragEl);
|
|
67862
|
-
}
|
|
67863
|
-
}
|
|
67864
|
-
return completed(true);
|
|
67865
|
-
}
|
|
67866
|
-
var elLastChild = lastChild(el, options.draggable);
|
|
67867
|
-
if (!elLastChild || _ghostIsLast(evt, vertical, this) && !elLastChild.animated) {
|
|
67868
|
-
if (elLastChild === dragEl) {
|
|
67869
|
-
return completed(false);
|
|
67870
|
-
}
|
|
67871
|
-
if (elLastChild && el === evt.target) {
|
|
67872
|
-
target = elLastChild;
|
|
67873
|
-
}
|
|
67874
|
-
if (target) {
|
|
67875
|
-
targetRect = getRect(target);
|
|
67876
|
-
}
|
|
67877
|
-
if (_onMove(rootEl, el, dragEl, dragRect, target, targetRect, evt, !!target) !== false) {
|
|
67878
|
-
capture();
|
|
67879
|
-
el.appendChild(dragEl);
|
|
67880
|
-
parentEl = el;
|
|
67881
|
-
changed();
|
|
67882
|
-
return completed(true);
|
|
67883
|
-
}
|
|
67884
|
-
} else if (elLastChild && _ghostIsFirst(evt, vertical, this)) {
|
|
67885
|
-
var firstChild = getChild(el, 0, options, true);
|
|
67886
|
-
if (firstChild === dragEl) {
|
|
67887
|
-
return completed(false);
|
|
67888
|
-
}
|
|
67889
|
-
target = firstChild;
|
|
67890
|
-
targetRect = getRect(target);
|
|
67891
|
-
if (_onMove(rootEl, el, dragEl, dragRect, target, targetRect, evt, false) !== false) {
|
|
67892
|
-
capture();
|
|
67893
|
-
el.insertBefore(dragEl, firstChild);
|
|
67894
|
-
parentEl = el;
|
|
67895
|
-
changed();
|
|
67896
|
-
return completed(true);
|
|
67897
|
-
}
|
|
67898
|
-
} else if (target.parentNode === el) {
|
|
67899
|
-
targetRect = getRect(target);
|
|
67900
|
-
var direction = 0, targetBeforeFirstSwap, differentLevel = dragEl.parentNode !== el, differentRowCol = !_dragElInRowColumn(dragEl.animated && dragEl.toRect || dragRect, target.animated && target.toRect || targetRect, vertical), side1 = vertical ? "top" : "left", scrolledPastTop = isScrolledPast(target, "top", "top") || isScrolledPast(dragEl, "top", "top"), scrollBefore = scrolledPastTop ? scrolledPastTop.scrollTop : void 0;
|
|
67901
|
-
if (lastTarget !== target) {
|
|
67902
|
-
targetBeforeFirstSwap = targetRect[side1];
|
|
67903
|
-
pastFirstInvertThresh = false;
|
|
67904
|
-
isCircumstantialInvert = !differentRowCol && options.invertSwap || differentLevel;
|
|
67905
|
-
}
|
|
67906
|
-
direction = _getSwapDirection(evt, target, targetRect, vertical, differentRowCol ? 1 : options.swapThreshold, options.invertedSwapThreshold == null ? options.swapThreshold : options.invertedSwapThreshold, isCircumstantialInvert, lastTarget === target);
|
|
67907
|
-
var sibling;
|
|
67908
|
-
if (direction !== 0) {
|
|
67909
|
-
var dragIndex = index$j(dragEl);
|
|
67910
|
-
do {
|
|
67911
|
-
dragIndex -= direction;
|
|
67912
|
-
sibling = parentEl.children[dragIndex];
|
|
67913
|
-
} while (sibling && (css(sibling, "display") === "none" || sibling === ghostEl));
|
|
67914
|
-
}
|
|
67915
|
-
if (direction === 0 || sibling === target) {
|
|
67916
|
-
return completed(false);
|
|
67917
|
-
}
|
|
67918
|
-
lastTarget = target;
|
|
67919
|
-
lastDirection = direction;
|
|
67920
|
-
var nextSibling = target.nextElementSibling, after = false;
|
|
67921
|
-
after = direction === 1;
|
|
67922
|
-
var moveVector = _onMove(rootEl, el, dragEl, dragRect, target, targetRect, evt, after);
|
|
67923
|
-
if (moveVector !== false) {
|
|
67924
|
-
if (moveVector === 1 || moveVector === -1) {
|
|
67925
|
-
after = moveVector === 1;
|
|
67926
|
-
}
|
|
67927
|
-
_silent = true;
|
|
67928
|
-
setTimeout(_unsilent, 30);
|
|
67929
|
-
capture();
|
|
67930
|
-
if (after && !nextSibling) {
|
|
67931
|
-
el.appendChild(dragEl);
|
|
67932
|
-
} else {
|
|
67933
|
-
target.parentNode.insertBefore(dragEl, after ? nextSibling : target);
|
|
67934
|
-
}
|
|
67935
|
-
if (scrolledPastTop) {
|
|
67936
|
-
scrollBy(scrolledPastTop, 0, scrollBefore - scrolledPastTop.scrollTop);
|
|
67937
|
-
}
|
|
67938
|
-
parentEl = dragEl.parentNode;
|
|
67939
|
-
if (targetBeforeFirstSwap !== void 0 && !isCircumstantialInvert) {
|
|
67940
|
-
targetMoveDistance = Math.abs(targetBeforeFirstSwap - getRect(target)[side1]);
|
|
67941
|
-
}
|
|
67942
|
-
changed();
|
|
67943
|
-
return completed(true);
|
|
67944
|
-
}
|
|
67945
|
-
}
|
|
67946
|
-
if (el.contains(dragEl)) {
|
|
67947
|
-
return completed(false);
|
|
67948
|
-
}
|
|
67949
|
-
}
|
|
67950
|
-
return false;
|
|
67951
|
-
},
|
|
67952
|
-
_ignoreWhileAnimating: null,
|
|
67953
|
-
_offMoveEvents: function _offMoveEvents() {
|
|
67954
|
-
off(document, "mousemove", this._onTouchMove);
|
|
67955
|
-
off(document, "touchmove", this._onTouchMove);
|
|
67956
|
-
off(document, "pointermove", this._onTouchMove);
|
|
67957
|
-
off(document, "dragover", nearestEmptyInsertDetectEvent);
|
|
67958
|
-
off(document, "mousemove", nearestEmptyInsertDetectEvent);
|
|
67959
|
-
off(document, "touchmove", nearestEmptyInsertDetectEvent);
|
|
67960
|
-
},
|
|
67961
|
-
_offUpEvents: function _offUpEvents() {
|
|
67962
|
-
var ownerDocument = this.el.ownerDocument;
|
|
67963
|
-
off(ownerDocument, "mouseup", this._onDrop);
|
|
67964
|
-
off(ownerDocument, "touchend", this._onDrop);
|
|
67965
|
-
off(ownerDocument, "pointerup", this._onDrop);
|
|
67966
|
-
off(ownerDocument, "touchcancel", this._onDrop);
|
|
67967
|
-
off(document, "selectstart", this);
|
|
67968
|
-
},
|
|
67969
|
-
_onDrop: function _onDrop(evt) {
|
|
67970
|
-
var el = this.el, options = this.options;
|
|
67971
|
-
newIndex = index$j(dragEl);
|
|
67972
|
-
newDraggableIndex = index$j(dragEl, options.draggable);
|
|
67973
|
-
pluginEvent2("drop", this, {
|
|
67974
|
-
evt
|
|
67975
|
-
});
|
|
67976
|
-
parentEl = dragEl && dragEl.parentNode;
|
|
67977
|
-
newIndex = index$j(dragEl);
|
|
67978
|
-
newDraggableIndex = index$j(dragEl, options.draggable);
|
|
67979
|
-
if (Sortable$1.eventCanceled) {
|
|
67980
|
-
this._nulling();
|
|
67981
|
-
return;
|
|
67982
|
-
}
|
|
67983
|
-
awaitingDragStarted = false;
|
|
67984
|
-
isCircumstantialInvert = false;
|
|
67985
|
-
pastFirstInvertThresh = false;
|
|
67986
|
-
clearInterval(this._loopId);
|
|
67987
|
-
clearTimeout(this._dragStartTimer);
|
|
67988
|
-
_cancelNextTick(this.cloneId);
|
|
67989
|
-
_cancelNextTick(this._dragStartId);
|
|
67990
|
-
if (this.nativeDraggable) {
|
|
67991
|
-
off(document, "drop", this);
|
|
67992
|
-
off(el, "dragstart", this._onDragStart);
|
|
67993
|
-
}
|
|
67994
|
-
this._offMoveEvents();
|
|
67995
|
-
this._offUpEvents();
|
|
67996
|
-
if (Safari) {
|
|
67997
|
-
css(document.body, "user-select", "");
|
|
67998
|
-
}
|
|
67999
|
-
css(dragEl, "transform", "");
|
|
68000
|
-
if (evt) {
|
|
68001
|
-
if (moved) {
|
|
68002
|
-
evt.cancelable && evt.preventDefault();
|
|
68003
|
-
!options.dropBubble && evt.stopPropagation();
|
|
68004
|
-
}
|
|
68005
|
-
ghostEl && ghostEl.parentNode && ghostEl.parentNode.removeChild(ghostEl);
|
|
68006
|
-
if (rootEl === parentEl || putSortable && putSortable.lastPutMode !== "clone") {
|
|
68007
|
-
cloneEl && cloneEl.parentNode && cloneEl.parentNode.removeChild(cloneEl);
|
|
68008
|
-
}
|
|
68009
|
-
if (dragEl) {
|
|
68010
|
-
if (this.nativeDraggable) {
|
|
68011
|
-
off(dragEl, "dragend", this);
|
|
68012
|
-
}
|
|
68013
|
-
_disableDraggable(dragEl);
|
|
68014
|
-
dragEl.style["will-change"] = "";
|
|
68015
|
-
if (moved && !awaitingDragStarted) {
|
|
68016
|
-
toggleClass(dragEl, putSortable ? putSortable.options.ghostClass : this.options.ghostClass, false);
|
|
68017
|
-
}
|
|
68018
|
-
toggleClass(dragEl, this.options.chosenClass, false);
|
|
68019
|
-
_dispatchEvent({
|
|
68020
|
-
sortable: this,
|
|
68021
|
-
name: "unchoose",
|
|
68022
|
-
toEl: parentEl,
|
|
68023
|
-
newIndex: null,
|
|
68024
|
-
newDraggableIndex: null,
|
|
68025
|
-
originalEvent: evt
|
|
68026
|
-
});
|
|
68027
|
-
if (rootEl !== parentEl) {
|
|
68028
|
-
if (newIndex >= 0) {
|
|
68029
|
-
_dispatchEvent({
|
|
68030
|
-
rootEl: parentEl,
|
|
68031
|
-
name: "add",
|
|
68032
|
-
toEl: parentEl,
|
|
68033
|
-
fromEl: rootEl,
|
|
68034
|
-
originalEvent: evt
|
|
68035
|
-
});
|
|
68036
|
-
_dispatchEvent({
|
|
68037
|
-
sortable: this,
|
|
68038
|
-
name: "remove",
|
|
68039
|
-
toEl: parentEl,
|
|
68040
|
-
originalEvent: evt
|
|
68041
|
-
});
|
|
68042
|
-
_dispatchEvent({
|
|
68043
|
-
rootEl: parentEl,
|
|
68044
|
-
name: "sort",
|
|
68045
|
-
toEl: parentEl,
|
|
68046
|
-
fromEl: rootEl,
|
|
68047
|
-
originalEvent: evt
|
|
68048
|
-
});
|
|
68049
|
-
_dispatchEvent({
|
|
68050
|
-
sortable: this,
|
|
68051
|
-
name: "sort",
|
|
68052
|
-
toEl: parentEl,
|
|
68053
|
-
originalEvent: evt
|
|
68054
|
-
});
|
|
68055
|
-
}
|
|
68056
|
-
putSortable && putSortable.save();
|
|
68057
|
-
} else {
|
|
68058
|
-
if (newIndex !== oldIndex) {
|
|
68059
|
-
if (newIndex >= 0) {
|
|
68060
|
-
_dispatchEvent({
|
|
68061
|
-
sortable: this,
|
|
68062
|
-
name: "update",
|
|
68063
|
-
toEl: parentEl,
|
|
68064
|
-
originalEvent: evt
|
|
68065
|
-
});
|
|
68066
|
-
_dispatchEvent({
|
|
68067
|
-
sortable: this,
|
|
68068
|
-
name: "sort",
|
|
68069
|
-
toEl: parentEl,
|
|
68070
|
-
originalEvent: evt
|
|
68071
|
-
});
|
|
68072
|
-
}
|
|
68073
|
-
}
|
|
68074
|
-
}
|
|
68075
|
-
if (Sortable$1.active) {
|
|
68076
|
-
if (newIndex == null || newIndex === -1) {
|
|
68077
|
-
newIndex = oldIndex;
|
|
68078
|
-
newDraggableIndex = oldDraggableIndex;
|
|
68079
|
-
}
|
|
68080
|
-
_dispatchEvent({
|
|
68081
|
-
sortable: this,
|
|
68082
|
-
name: "end",
|
|
68083
|
-
toEl: parentEl,
|
|
68084
|
-
originalEvent: evt
|
|
68085
|
-
});
|
|
68086
|
-
this.save();
|
|
68087
|
-
}
|
|
68088
|
-
}
|
|
68089
|
-
}
|
|
68090
|
-
this._nulling();
|
|
68091
|
-
},
|
|
68092
|
-
_nulling: function _nulling() {
|
|
68093
|
-
pluginEvent2("nulling", this);
|
|
68094
|
-
rootEl = dragEl = parentEl = ghostEl = nextEl = cloneEl = lastDownEl = cloneHidden = tapEvt = touchEvt = moved = newIndex = newDraggableIndex = oldIndex = oldDraggableIndex = lastTarget = lastDirection = putSortable = activeGroup = Sortable$1.dragged = Sortable$1.ghost = Sortable$1.clone = Sortable$1.active = null;
|
|
68095
|
-
savedInputChecked.forEach(function(el) {
|
|
68096
|
-
el.checked = true;
|
|
68097
|
-
});
|
|
68098
|
-
savedInputChecked.length = lastDx = lastDy = 0;
|
|
68099
|
-
},
|
|
68100
|
-
handleEvent: function handleEvent(evt) {
|
|
68101
|
-
switch (evt.type) {
|
|
68102
|
-
case "drop":
|
|
68103
|
-
case "dragend":
|
|
68104
|
-
this._onDrop(evt);
|
|
68105
|
-
break;
|
|
68106
|
-
case "dragenter":
|
|
68107
|
-
case "dragover":
|
|
68108
|
-
if (dragEl) {
|
|
68109
|
-
this._onDragOver(evt);
|
|
68110
|
-
_globalDragOver(evt);
|
|
68111
|
-
}
|
|
68112
|
-
break;
|
|
68113
|
-
case "selectstart":
|
|
68114
|
-
evt.preventDefault();
|
|
68115
|
-
break;
|
|
68116
|
-
}
|
|
68117
|
-
},
|
|
68118
|
-
toArray: function toArray2() {
|
|
68119
|
-
var order = [], el, children = this.el.children, i2 = 0, n = children.length, options = this.options;
|
|
68120
|
-
for (; i2 < n; i2++) {
|
|
68121
|
-
el = children[i2];
|
|
68122
|
-
if (closest(el, options.draggable, this.el, false)) {
|
|
68123
|
-
order.push(el.getAttribute(options.dataIdAttr) || _generateId(el));
|
|
68124
|
-
}
|
|
68125
|
-
}
|
|
68126
|
-
return order;
|
|
68127
|
-
},
|
|
68128
|
-
sort: function sort(order, useAnimation) {
|
|
68129
|
-
var items = {}, rootEl2 = this.el;
|
|
68130
|
-
this.toArray().forEach(function(id2, i2) {
|
|
68131
|
-
var el = rootEl2.children[i2];
|
|
68132
|
-
if (closest(el, this.options.draggable, rootEl2, false)) {
|
|
68133
|
-
items[id2] = el;
|
|
68134
|
-
}
|
|
68135
|
-
}, this);
|
|
68136
|
-
useAnimation && this.captureAnimationState();
|
|
68137
|
-
order.forEach(function(id2) {
|
|
68138
|
-
if (items[id2]) {
|
|
68139
|
-
rootEl2.removeChild(items[id2]);
|
|
68140
|
-
rootEl2.appendChild(items[id2]);
|
|
68141
|
-
}
|
|
68142
|
-
});
|
|
68143
|
-
useAnimation && this.animateAll();
|
|
68144
|
-
},
|
|
68145
|
-
save: function save() {
|
|
68146
|
-
var store = this.options.store;
|
|
68147
|
-
store && store.set && store.set(this);
|
|
68148
|
-
},
|
|
68149
|
-
closest: function closest$1(el, selector) {
|
|
68150
|
-
return closest(el, selector || this.options.draggable, this.el, false);
|
|
68151
|
-
},
|
|
68152
|
-
option: function option(name2, value) {
|
|
68153
|
-
var options = this.options;
|
|
68154
|
-
if (value === void 0) {
|
|
68155
|
-
return options[name2];
|
|
68156
|
-
} else {
|
|
68157
|
-
var modifiedValue = PluginManager.modifyOption(this, name2, value);
|
|
68158
|
-
if (typeof modifiedValue !== "undefined") {
|
|
68159
|
-
options[name2] = modifiedValue;
|
|
68160
|
-
} else {
|
|
68161
|
-
options[name2] = value;
|
|
68162
|
-
}
|
|
68163
|
-
if (name2 === "group") {
|
|
68164
|
-
_prepareGroup(options);
|
|
68165
|
-
}
|
|
68166
|
-
}
|
|
68167
|
-
},
|
|
68168
|
-
destroy: function destroy() {
|
|
68169
|
-
pluginEvent2("destroy", this);
|
|
68170
|
-
var el = this.el;
|
|
68171
|
-
el[expando] = null;
|
|
68172
|
-
off(el, "mousedown", this._onTapStart);
|
|
68173
|
-
off(el, "touchstart", this._onTapStart);
|
|
68174
|
-
off(el, "pointerdown", this._onTapStart);
|
|
68175
|
-
if (this.nativeDraggable) {
|
|
68176
|
-
off(el, "dragover", this);
|
|
68177
|
-
off(el, "dragenter", this);
|
|
68178
|
-
}
|
|
68179
|
-
Array.prototype.forEach.call(el.querySelectorAll("[draggable]"), function(el2) {
|
|
68180
|
-
el2.removeAttribute("draggable");
|
|
68181
|
-
});
|
|
68182
|
-
this._onDrop();
|
|
68183
|
-
this._disableDelayedDragEvents();
|
|
68184
|
-
sortables.splice(sortables.indexOf(this.el), 1);
|
|
68185
|
-
this.el = el = null;
|
|
68186
|
-
},
|
|
68187
|
-
_hideClone: function _hideClone() {
|
|
68188
|
-
if (!cloneHidden) {
|
|
68189
|
-
pluginEvent2("hideClone", this);
|
|
68190
|
-
if (Sortable$1.eventCanceled)
|
|
68191
|
-
return;
|
|
68192
|
-
css(cloneEl, "display", "none");
|
|
68193
|
-
if (this.options.removeCloneOnHide && cloneEl.parentNode) {
|
|
68194
|
-
cloneEl.parentNode.removeChild(cloneEl);
|
|
68195
|
-
}
|
|
68196
|
-
cloneHidden = true;
|
|
68197
|
-
}
|
|
68198
|
-
},
|
|
68199
|
-
_showClone: function _showClone(putSortable2) {
|
|
68200
|
-
if (putSortable2.lastPutMode !== "clone") {
|
|
68201
|
-
this._hideClone();
|
|
68202
|
-
return;
|
|
68203
|
-
}
|
|
68204
|
-
if (cloneHidden) {
|
|
68205
|
-
pluginEvent2("showClone", this);
|
|
68206
|
-
if (Sortable$1.eventCanceled)
|
|
68207
|
-
return;
|
|
68208
|
-
if (dragEl.parentNode == rootEl && !this.options.group.revertClone) {
|
|
68209
|
-
rootEl.insertBefore(cloneEl, dragEl);
|
|
68210
|
-
} else if (nextEl) {
|
|
68211
|
-
rootEl.insertBefore(cloneEl, nextEl);
|
|
68212
|
-
} else {
|
|
68213
|
-
rootEl.appendChild(cloneEl);
|
|
68214
|
-
}
|
|
68215
|
-
if (this.options.group.revertClone) {
|
|
68216
|
-
this.animate(dragEl, cloneEl);
|
|
68217
|
-
}
|
|
68218
|
-
css(cloneEl, "display", "");
|
|
68219
|
-
cloneHidden = false;
|
|
68220
|
-
}
|
|
68221
|
-
}
|
|
68222
|
-
};
|
|
68223
|
-
function _globalDragOver(evt) {
|
|
68224
|
-
if (evt.dataTransfer) {
|
|
68225
|
-
evt.dataTransfer.dropEffect = "move";
|
|
68226
|
-
}
|
|
68227
|
-
evt.cancelable && evt.preventDefault();
|
|
68228
|
-
}
|
|
68229
|
-
function _onMove(fromEl, toEl, dragEl2, dragRect, targetEl, targetRect, originalEvent, willInsertAfter) {
|
|
68230
|
-
var evt, sortable = fromEl[expando], onMoveFn = sortable.options.onMove, retVal;
|
|
68231
|
-
if (window.CustomEvent && !IE11OrLess && !Edge) {
|
|
68232
|
-
evt = new CustomEvent("move", {
|
|
68233
|
-
bubbles: true,
|
|
68234
|
-
cancelable: true
|
|
68235
|
-
});
|
|
68236
|
-
} else {
|
|
68237
|
-
evt = document.createEvent("Event");
|
|
68238
|
-
evt.initEvent("move", true, true);
|
|
68239
|
-
}
|
|
68240
|
-
evt.to = toEl;
|
|
68241
|
-
evt.from = fromEl;
|
|
68242
|
-
evt.dragged = dragEl2;
|
|
68243
|
-
evt.draggedRect = dragRect;
|
|
68244
|
-
evt.related = targetEl || toEl;
|
|
68245
|
-
evt.relatedRect = targetRect || getRect(toEl);
|
|
68246
|
-
evt.willInsertAfter = willInsertAfter;
|
|
68247
|
-
evt.originalEvent = originalEvent;
|
|
68248
|
-
fromEl.dispatchEvent(evt);
|
|
68249
|
-
if (onMoveFn) {
|
|
68250
|
-
retVal = onMoveFn.call(sortable, evt, originalEvent);
|
|
68251
|
-
}
|
|
68252
|
-
return retVal;
|
|
68253
|
-
}
|
|
68254
|
-
function _disableDraggable(el) {
|
|
68255
|
-
el.draggable = false;
|
|
68256
|
-
}
|
|
68257
|
-
function _unsilent() {
|
|
68258
|
-
_silent = false;
|
|
68259
|
-
}
|
|
68260
|
-
function _ghostIsFirst(evt, vertical, sortable) {
|
|
68261
|
-
var rect = getRect(getChild(sortable.el, 0, sortable.options, true));
|
|
68262
|
-
var spacer = 10;
|
|
68263
|
-
return vertical ? evt.clientX < rect.left - spacer || evt.clientY < rect.top && evt.clientX < rect.right : evt.clientY < rect.top - spacer || evt.clientY < rect.bottom && evt.clientX < rect.left;
|
|
68264
|
-
}
|
|
68265
|
-
function _ghostIsLast(evt, vertical, sortable) {
|
|
68266
|
-
var rect = getRect(lastChild(sortable.el, sortable.options.draggable));
|
|
68267
|
-
var spacer = 10;
|
|
68268
|
-
return vertical ? evt.clientX > rect.right + spacer || evt.clientX <= rect.right && evt.clientY > rect.bottom && evt.clientX >= rect.left : evt.clientX > rect.right && evt.clientY > rect.top || evt.clientX <= rect.right && evt.clientY > rect.bottom + spacer;
|
|
68269
|
-
}
|
|
68270
|
-
function _getSwapDirection(evt, target, targetRect, vertical, swapThreshold, invertedSwapThreshold, invertSwap, isLastTarget) {
|
|
68271
|
-
var mouseOnAxis = vertical ? evt.clientY : evt.clientX, targetLength = vertical ? targetRect.height : targetRect.width, targetS1 = vertical ? targetRect.top : targetRect.left, targetS2 = vertical ? targetRect.bottom : targetRect.right, invert = false;
|
|
68272
|
-
if (!invertSwap) {
|
|
68273
|
-
if (isLastTarget && targetMoveDistance < targetLength * swapThreshold) {
|
|
68274
|
-
if (!pastFirstInvertThresh && (lastDirection === 1 ? mouseOnAxis > targetS1 + targetLength * invertedSwapThreshold / 2 : mouseOnAxis < targetS2 - targetLength * invertedSwapThreshold / 2)) {
|
|
68275
|
-
pastFirstInvertThresh = true;
|
|
68276
|
-
}
|
|
68277
|
-
if (!pastFirstInvertThresh) {
|
|
68278
|
-
if (lastDirection === 1 ? mouseOnAxis < targetS1 + targetMoveDistance : mouseOnAxis > targetS2 - targetMoveDistance) {
|
|
68279
|
-
return -lastDirection;
|
|
68280
|
-
}
|
|
68281
|
-
} else {
|
|
68282
|
-
invert = true;
|
|
68283
|
-
}
|
|
68284
|
-
} else {
|
|
68285
|
-
if (mouseOnAxis > targetS1 + targetLength * (1 - swapThreshold) / 2 && mouseOnAxis < targetS2 - targetLength * (1 - swapThreshold) / 2) {
|
|
68286
|
-
return _getInsertDirection(target);
|
|
68287
|
-
}
|
|
68288
|
-
}
|
|
68289
|
-
}
|
|
68290
|
-
invert = invert || invertSwap;
|
|
68291
|
-
if (invert) {
|
|
68292
|
-
if (mouseOnAxis < targetS1 + targetLength * invertedSwapThreshold / 2 || mouseOnAxis > targetS2 - targetLength * invertedSwapThreshold / 2) {
|
|
68293
|
-
return mouseOnAxis > targetS1 + targetLength / 2 ? 1 : -1;
|
|
68294
|
-
}
|
|
68295
|
-
}
|
|
68296
|
-
return 0;
|
|
68297
|
-
}
|
|
68298
|
-
function _getInsertDirection(target) {
|
|
68299
|
-
if (index$j(dragEl) < index$j(target)) {
|
|
68300
|
-
return 1;
|
|
68301
|
-
} else {
|
|
68302
|
-
return -1;
|
|
68303
|
-
}
|
|
68304
|
-
}
|
|
68305
|
-
function _generateId(el) {
|
|
68306
|
-
var str = el.tagName + el.className + el.src + el.href + el.textContent, i2 = str.length, sum = 0;
|
|
68307
|
-
while (i2--) {
|
|
68308
|
-
sum += str.charCodeAt(i2);
|
|
68309
|
-
}
|
|
68310
|
-
return sum.toString(36);
|
|
68311
|
-
}
|
|
68312
|
-
function _saveInputCheckedState(root) {
|
|
68313
|
-
savedInputChecked.length = 0;
|
|
68314
|
-
var inputs = root.getElementsByTagName("input");
|
|
68315
|
-
var idx = inputs.length;
|
|
68316
|
-
while (idx--) {
|
|
68317
|
-
var el = inputs[idx];
|
|
68318
|
-
el.checked && savedInputChecked.push(el);
|
|
68319
|
-
}
|
|
68320
|
-
}
|
|
68321
|
-
function _nextTick(fn) {
|
|
68322
|
-
return setTimeout(fn, 0);
|
|
68323
|
-
}
|
|
68324
|
-
function _cancelNextTick(id2) {
|
|
68325
|
-
return clearTimeout(id2);
|
|
68326
|
-
}
|
|
68327
|
-
if (documentExists) {
|
|
68328
|
-
on(document, "touchmove", function(evt) {
|
|
68329
|
-
if ((Sortable$1.active || awaitingDragStarted) && evt.cancelable) {
|
|
68330
|
-
evt.preventDefault();
|
|
68331
|
-
}
|
|
68332
|
-
});
|
|
68333
|
-
}
|
|
68334
|
-
Sortable$1.utils = {
|
|
68335
|
-
on,
|
|
68336
|
-
off,
|
|
68337
|
-
css,
|
|
68338
|
-
find,
|
|
68339
|
-
is: function is(el, selector) {
|
|
68340
|
-
return !!closest(el, selector, el, false);
|
|
68341
|
-
},
|
|
68342
|
-
extend,
|
|
68343
|
-
throttle,
|
|
68344
|
-
closest,
|
|
68345
|
-
toggleClass,
|
|
68346
|
-
clone,
|
|
68347
|
-
index: index$j,
|
|
68348
|
-
nextTick: _nextTick,
|
|
68349
|
-
cancelNextTick: _cancelNextTick,
|
|
68350
|
-
detectDirection: _detectDirection,
|
|
68351
|
-
getChild
|
|
68352
|
-
};
|
|
68353
|
-
Sortable$1.get = function(element) {
|
|
68354
|
-
return element[expando];
|
|
68355
|
-
};
|
|
68356
|
-
Sortable$1.mount = function() {
|
|
68357
|
-
for (var _len = arguments.length, plugins2 = new Array(_len), _key = 0; _key < _len; _key++) {
|
|
68358
|
-
plugins2[_key] = arguments[_key];
|
|
68359
|
-
}
|
|
68360
|
-
if (plugins2[0].constructor === Array)
|
|
68361
|
-
plugins2 = plugins2[0];
|
|
68362
|
-
plugins2.forEach(function(plugin) {
|
|
68363
|
-
if (!plugin.prototype || !plugin.prototype.constructor) {
|
|
68364
|
-
throw "Sortable: Mounted plugin must be a constructor function, not ".concat({}.toString.call(plugin));
|
|
68365
|
-
}
|
|
68366
|
-
if (plugin.utils)
|
|
68367
|
-
Sortable$1.utils = _objectSpread2(_objectSpread2({}, Sortable$1.utils), plugin.utils);
|
|
68368
|
-
PluginManager.mount(plugin);
|
|
68369
|
-
});
|
|
68370
|
-
};
|
|
68371
|
-
Sortable$1.create = function(el, options) {
|
|
68372
|
-
return new Sortable$1(el, options);
|
|
68373
|
-
};
|
|
68374
|
-
Sortable$1.version = version;
|
|
68375
|
-
var autoScrolls = [], scrollEl, scrollRootEl, scrolling = false, lastAutoScrollX, lastAutoScrollY, touchEvt$1, pointerElemChangedInterval;
|
|
68376
|
-
function AutoScrollPlugin() {
|
|
68377
|
-
function AutoScroll() {
|
|
68378
|
-
this.defaults = {
|
|
68379
|
-
scroll: true,
|
|
68380
|
-
forceAutoScrollFallback: false,
|
|
68381
|
-
scrollSensitivity: 30,
|
|
68382
|
-
scrollSpeed: 10,
|
|
68383
|
-
bubbleScroll: true
|
|
68384
|
-
};
|
|
68385
|
-
for (var fn in this) {
|
|
68386
|
-
if (fn.charAt(0) === "_" && typeof this[fn] === "function") {
|
|
68387
|
-
this[fn] = this[fn].bind(this);
|
|
68388
|
-
}
|
|
68389
|
-
}
|
|
68390
|
-
}
|
|
68391
|
-
AutoScroll.prototype = {
|
|
68392
|
-
dragStarted: function dragStarted(_ref) {
|
|
68393
|
-
var originalEvent = _ref.originalEvent;
|
|
68394
|
-
if (this.sortable.nativeDraggable) {
|
|
68395
|
-
on(document, "dragover", this._handleAutoScroll);
|
|
68396
|
-
} else {
|
|
68397
|
-
if (this.options.supportPointer) {
|
|
68398
|
-
on(document, "pointermove", this._handleFallbackAutoScroll);
|
|
68399
|
-
} else if (originalEvent.touches) {
|
|
68400
|
-
on(document, "touchmove", this._handleFallbackAutoScroll);
|
|
68401
|
-
} else {
|
|
68402
|
-
on(document, "mousemove", this._handleFallbackAutoScroll);
|
|
68403
|
-
}
|
|
68404
|
-
}
|
|
68405
|
-
},
|
|
68406
|
-
dragOverCompleted: function dragOverCompleted(_ref2) {
|
|
68407
|
-
var originalEvent = _ref2.originalEvent;
|
|
68408
|
-
if (!this.options.dragOverBubble && !originalEvent.rootEl) {
|
|
68409
|
-
this._handleAutoScroll(originalEvent);
|
|
68410
|
-
}
|
|
68411
|
-
},
|
|
68412
|
-
drop: function drop3() {
|
|
68413
|
-
if (this.sortable.nativeDraggable) {
|
|
68414
|
-
off(document, "dragover", this._handleAutoScroll);
|
|
68415
|
-
} else {
|
|
68416
|
-
off(document, "pointermove", this._handleFallbackAutoScroll);
|
|
68417
|
-
off(document, "touchmove", this._handleFallbackAutoScroll);
|
|
68418
|
-
off(document, "mousemove", this._handleFallbackAutoScroll);
|
|
68419
|
-
}
|
|
68420
|
-
clearPointerElemChangedInterval();
|
|
68421
|
-
clearAutoScrolls();
|
|
68422
|
-
cancelThrottle();
|
|
68423
|
-
},
|
|
68424
|
-
nulling: function nulling() {
|
|
68425
|
-
touchEvt$1 = scrollRootEl = scrollEl = scrolling = pointerElemChangedInterval = lastAutoScrollX = lastAutoScrollY = null;
|
|
68426
|
-
autoScrolls.length = 0;
|
|
68427
|
-
},
|
|
68428
|
-
_handleFallbackAutoScroll: function _handleFallbackAutoScroll(evt) {
|
|
68429
|
-
this._handleAutoScroll(evt, true);
|
|
68430
|
-
},
|
|
68431
|
-
_handleAutoScroll: function _handleAutoScroll(evt, fallback) {
|
|
68432
|
-
var _this = this;
|
|
68433
|
-
var x2 = (evt.touches ? evt.touches[0] : evt).clientX, y = (evt.touches ? evt.touches[0] : evt).clientY, elem = document.elementFromPoint(x2, y);
|
|
68434
|
-
touchEvt$1 = evt;
|
|
68435
|
-
if (fallback || this.options.forceAutoScrollFallback || Edge || IE11OrLess || Safari) {
|
|
68436
|
-
autoScroll(evt, this.options, elem, fallback);
|
|
68437
|
-
var ogElemScroller = getParentAutoScrollElement(elem, true);
|
|
68438
|
-
if (scrolling && (!pointerElemChangedInterval || x2 !== lastAutoScrollX || y !== lastAutoScrollY)) {
|
|
68439
|
-
pointerElemChangedInterval && clearPointerElemChangedInterval();
|
|
68440
|
-
pointerElemChangedInterval = setInterval(function() {
|
|
68441
|
-
var newElem = getParentAutoScrollElement(document.elementFromPoint(x2, y), true);
|
|
68442
|
-
if (newElem !== ogElemScroller) {
|
|
68443
|
-
ogElemScroller = newElem;
|
|
68444
|
-
clearAutoScrolls();
|
|
68445
|
-
}
|
|
68446
|
-
autoScroll(evt, _this.options, newElem, fallback);
|
|
68447
|
-
}, 10);
|
|
68448
|
-
lastAutoScrollX = x2;
|
|
68449
|
-
lastAutoScrollY = y;
|
|
68450
|
-
}
|
|
68451
|
-
} else {
|
|
68452
|
-
if (!this.options.bubbleScroll || getParentAutoScrollElement(elem, true) === getWindowScrollingElement()) {
|
|
68453
|
-
clearAutoScrolls();
|
|
68454
|
-
return;
|
|
68455
|
-
}
|
|
68456
|
-
autoScroll(evt, this.options, getParentAutoScrollElement(elem, false), false);
|
|
68457
|
-
}
|
|
68458
|
-
}
|
|
68459
|
-
};
|
|
68460
|
-
return _extends(AutoScroll, {
|
|
68461
|
-
pluginName: "scroll",
|
|
68462
|
-
initializeByDefault: true
|
|
68463
|
-
});
|
|
68464
|
-
}
|
|
68465
|
-
function clearAutoScrolls() {
|
|
68466
|
-
autoScrolls.forEach(function(autoScroll2) {
|
|
68467
|
-
clearInterval(autoScroll2.pid);
|
|
68468
|
-
});
|
|
68469
|
-
autoScrolls = [];
|
|
68470
|
-
}
|
|
68471
|
-
function clearPointerElemChangedInterval() {
|
|
68472
|
-
clearInterval(pointerElemChangedInterval);
|
|
68473
|
-
}
|
|
68474
|
-
var autoScroll = throttle(function(evt, options, rootEl2, isFallback) {
|
|
68475
|
-
if (!options.scroll)
|
|
68476
|
-
return;
|
|
68477
|
-
var x2 = (evt.touches ? evt.touches[0] : evt).clientX, y = (evt.touches ? evt.touches[0] : evt).clientY, sens = options.scrollSensitivity, speed = options.scrollSpeed, winScroller = getWindowScrollingElement();
|
|
68478
|
-
var scrollThisInstance = false, scrollCustomFn;
|
|
68479
|
-
if (scrollRootEl !== rootEl2) {
|
|
68480
|
-
scrollRootEl = rootEl2;
|
|
68481
|
-
clearAutoScrolls();
|
|
68482
|
-
scrollEl = options.scroll;
|
|
68483
|
-
scrollCustomFn = options.scrollFn;
|
|
68484
|
-
if (scrollEl === true) {
|
|
68485
|
-
scrollEl = getParentAutoScrollElement(rootEl2, true);
|
|
68486
|
-
}
|
|
68487
|
-
}
|
|
68488
|
-
var layersOut = 0;
|
|
68489
|
-
var currentParent = scrollEl;
|
|
68490
|
-
do {
|
|
68491
|
-
var el = currentParent, rect = getRect(el), top = rect.top, bottom = rect.bottom, left = rect.left, right = rect.right, width2 = rect.width, height2 = rect.height, canScrollX = void 0, canScrollY = void 0, scrollWidth = el.scrollWidth, scrollHeight = el.scrollHeight, elCSS = css(el), scrollPosX = el.scrollLeft, scrollPosY = el.scrollTop;
|
|
68492
|
-
if (el === winScroller) {
|
|
68493
|
-
canScrollX = width2 < scrollWidth && (elCSS.overflowX === "auto" || elCSS.overflowX === "scroll" || elCSS.overflowX === "visible");
|
|
68494
|
-
canScrollY = height2 < scrollHeight && (elCSS.overflowY === "auto" || elCSS.overflowY === "scroll" || elCSS.overflowY === "visible");
|
|
68495
|
-
} else {
|
|
68496
|
-
canScrollX = width2 < scrollWidth && (elCSS.overflowX === "auto" || elCSS.overflowX === "scroll");
|
|
68497
|
-
canScrollY = height2 < scrollHeight && (elCSS.overflowY === "auto" || elCSS.overflowY === "scroll");
|
|
68498
|
-
}
|
|
68499
|
-
var vx = canScrollX && (Math.abs(right - x2) <= sens && scrollPosX + width2 < scrollWidth) - (Math.abs(left - x2) <= sens && !!scrollPosX);
|
|
68500
|
-
var vy = canScrollY && (Math.abs(bottom - y) <= sens && scrollPosY + height2 < scrollHeight) - (Math.abs(top - y) <= sens && !!scrollPosY);
|
|
68501
|
-
if (!autoScrolls[layersOut]) {
|
|
68502
|
-
for (var i2 = 0; i2 <= layersOut; i2++) {
|
|
68503
|
-
if (!autoScrolls[i2]) {
|
|
68504
|
-
autoScrolls[i2] = {};
|
|
68505
|
-
}
|
|
68506
|
-
}
|
|
68507
|
-
}
|
|
68508
|
-
if (autoScrolls[layersOut].vx != vx || autoScrolls[layersOut].vy != vy || autoScrolls[layersOut].el !== el) {
|
|
68509
|
-
autoScrolls[layersOut].el = el;
|
|
68510
|
-
autoScrolls[layersOut].vx = vx;
|
|
68511
|
-
autoScrolls[layersOut].vy = vy;
|
|
68512
|
-
clearInterval(autoScrolls[layersOut].pid);
|
|
68513
|
-
if (vx != 0 || vy != 0) {
|
|
68514
|
-
scrollThisInstance = true;
|
|
68515
|
-
autoScrolls[layersOut].pid = setInterval(function() {
|
|
68516
|
-
if (isFallback && this.layer === 0) {
|
|
68517
|
-
Sortable$1.active._onTouchMove(touchEvt$1);
|
|
68518
|
-
}
|
|
68519
|
-
var scrollOffsetY = autoScrolls[this.layer].vy ? autoScrolls[this.layer].vy * speed : 0;
|
|
68520
|
-
var scrollOffsetX = autoScrolls[this.layer].vx ? autoScrolls[this.layer].vx * speed : 0;
|
|
68521
|
-
if (typeof scrollCustomFn === "function") {
|
|
68522
|
-
if (scrollCustomFn.call(Sortable$1.dragged.parentNode[expando], scrollOffsetX, scrollOffsetY, evt, touchEvt$1, autoScrolls[this.layer].el) !== "continue") {
|
|
68523
|
-
return;
|
|
68524
|
-
}
|
|
68525
|
-
}
|
|
68526
|
-
scrollBy(autoScrolls[this.layer].el, scrollOffsetX, scrollOffsetY);
|
|
68527
|
-
}.bind({
|
|
68528
|
-
layer: layersOut
|
|
68529
|
-
}), 24);
|
|
68530
|
-
}
|
|
68531
|
-
}
|
|
68532
|
-
layersOut++;
|
|
68533
|
-
} while (options.bubbleScroll && currentParent !== winScroller && (currentParent = getParentAutoScrollElement(currentParent, false)));
|
|
68534
|
-
scrolling = scrollThisInstance;
|
|
68535
|
-
}, 30);
|
|
68536
|
-
var drop = function drop2(_ref) {
|
|
68537
|
-
var originalEvent = _ref.originalEvent, putSortable2 = _ref.putSortable, dragEl2 = _ref.dragEl, activeSortable = _ref.activeSortable, dispatchSortableEvent = _ref.dispatchSortableEvent, hideGhostForTarget = _ref.hideGhostForTarget, unhideGhostForTarget = _ref.unhideGhostForTarget;
|
|
68538
|
-
if (!originalEvent)
|
|
68539
|
-
return;
|
|
68540
|
-
var toSortable = putSortable2 || activeSortable;
|
|
68541
|
-
hideGhostForTarget();
|
|
68542
|
-
var touch = originalEvent.changedTouches && originalEvent.changedTouches.length ? originalEvent.changedTouches[0] : originalEvent;
|
|
68543
|
-
var target = document.elementFromPoint(touch.clientX, touch.clientY);
|
|
68544
|
-
unhideGhostForTarget();
|
|
68545
|
-
if (toSortable && !toSortable.el.contains(target)) {
|
|
68546
|
-
dispatchSortableEvent("spill");
|
|
68547
|
-
this.onSpill({
|
|
68548
|
-
dragEl: dragEl2,
|
|
68549
|
-
putSortable: putSortable2
|
|
68550
|
-
});
|
|
68551
|
-
}
|
|
68552
|
-
};
|
|
68553
|
-
function Revert() {
|
|
68554
|
-
}
|
|
68555
|
-
Revert.prototype = {
|
|
68556
|
-
startIndex: null,
|
|
68557
|
-
dragStart: function dragStart(_ref2) {
|
|
68558
|
-
var oldDraggableIndex2 = _ref2.oldDraggableIndex;
|
|
68559
|
-
this.startIndex = oldDraggableIndex2;
|
|
68560
|
-
},
|
|
68561
|
-
onSpill: function onSpill(_ref3) {
|
|
68562
|
-
var dragEl2 = _ref3.dragEl, putSortable2 = _ref3.putSortable;
|
|
68563
|
-
this.sortable.captureAnimationState();
|
|
68564
|
-
if (putSortable2) {
|
|
68565
|
-
putSortable2.captureAnimationState();
|
|
68566
|
-
}
|
|
68567
|
-
var nextSibling = getChild(this.sortable.el, this.startIndex, this.options);
|
|
68568
|
-
if (nextSibling) {
|
|
68569
|
-
this.sortable.el.insertBefore(dragEl2, nextSibling);
|
|
68570
|
-
} else {
|
|
68571
|
-
this.sortable.el.appendChild(dragEl2);
|
|
68572
|
-
}
|
|
68573
|
-
this.sortable.animateAll();
|
|
68574
|
-
if (putSortable2) {
|
|
68575
|
-
putSortable2.animateAll();
|
|
68576
|
-
}
|
|
68577
|
-
},
|
|
68578
|
-
drop
|
|
68579
|
-
};
|
|
68580
|
-
_extends(Revert, {
|
|
68581
|
-
pluginName: "revertOnSpill"
|
|
68582
|
-
});
|
|
68583
|
-
function Remove() {
|
|
68584
|
-
}
|
|
68585
|
-
Remove.prototype = {
|
|
68586
|
-
onSpill: function onSpill2(_ref4) {
|
|
68587
|
-
var dragEl2 = _ref4.dragEl, putSortable2 = _ref4.putSortable;
|
|
68588
|
-
var parentSortable = putSortable2 || this.sortable;
|
|
68589
|
-
parentSortable.captureAnimationState();
|
|
68590
|
-
dragEl2.parentNode && dragEl2.parentNode.removeChild(dragEl2);
|
|
68591
|
-
parentSortable.animateAll();
|
|
68592
|
-
},
|
|
68593
|
-
drop
|
|
68594
|
-
};
|
|
68595
|
-
_extends(Remove, {
|
|
68596
|
-
pluginName: "removeOnSpill"
|
|
68597
|
-
});
|
|
68598
|
-
Sortable$1.mount(new AutoScrollPlugin());
|
|
68599
|
-
Sortable$1.mount(Remove, Revert);
|
|
68600
66473
|
var dataTableCustomClassEditor_vue_vue_type_style_index_0_scoped_true_lang = "";
|
|
68601
66474
|
var dataTableCustomClassEditor_vue_vue_type_style_index_1_lang = "";
|
|
68602
66475
|
const _sfc_main$3r = {
|
|
@@ -76973,7 +74846,7 @@ class BindFields$1 {
|
|
|
76973
74846
|
__publicField(this, "asyncEvent", false);
|
|
76974
74847
|
}
|
|
76975
74848
|
}
|
|
76976
|
-
class CustomEvent$
|
|
74849
|
+
class CustomEvent$1 {
|
|
76977
74850
|
constructor() {
|
|
76978
74851
|
__publicField(this, "name", "");
|
|
76979
74852
|
__publicField(this, "label", "");
|
|
@@ -77129,7 +75002,7 @@ const _sfc_main$13 = {
|
|
|
77129
75002
|
visible: false,
|
|
77130
75003
|
title: "\u590D\u5236\u4E8B\u4EF6\u7ED1\u5B9A"
|
|
77131
75004
|
},
|
|
77132
|
-
newCustomEvent: new CustomEvent$
|
|
75005
|
+
newCustomEvent: new CustomEvent$1(),
|
|
77133
75006
|
newCustomEventVisible: false,
|
|
77134
75007
|
fieldValueSourceTypeOptions: [
|
|
77135
75008
|
{ label: "\u8868\u8FBE\u5F0F", value: "expression" },
|
|
@@ -77145,7 +75018,7 @@ const _sfc_main$13 = {
|
|
|
77145
75018
|
},
|
|
77146
75019
|
handleCurrentEventChange(eventName) {
|
|
77147
75020
|
if (eventName === "custom") {
|
|
77148
|
-
this.bindModel.currentEvent = new CustomEvent$
|
|
75021
|
+
this.bindModel.currentEvent = new CustomEvent$1();
|
|
77149
75022
|
return;
|
|
77150
75023
|
}
|
|
77151
75024
|
const target = this.builtinEvents.find((item2) => item2.name === eventName);
|
|
@@ -77367,7 +75240,7 @@ const _sfc_main$13 = {
|
|
|
77367
75240
|
this.newCustomEventVisible = false;
|
|
77368
75241
|
},
|
|
77369
75242
|
handleAddCustomEventClick() {
|
|
77370
|
-
o.copyValue(this.newCustomEvent, new CustomEvent$
|
|
75243
|
+
o.copyValue(this.newCustomEvent, new CustomEvent$1());
|
|
77371
75244
|
this.newCustomEventVisible = true;
|
|
77372
75245
|
},
|
|
77373
75246
|
handleDelCustomEvent(event) {
|
|
@@ -78621,7 +76494,7 @@ class BindFields {
|
|
|
78621
76494
|
__publicField(this, "asyncEvent", false);
|
|
78622
76495
|
}
|
|
78623
76496
|
}
|
|
78624
|
-
class CustomEvent
|
|
76497
|
+
class CustomEvent {
|
|
78625
76498
|
constructor() {
|
|
78626
76499
|
__publicField(this, "name", "");
|
|
78627
76500
|
__publicField(this, "label", "");
|
|
@@ -78658,7 +76531,7 @@ const _sfc_main$11 = {
|
|
|
78658
76531
|
{ label: "JS \u4EE3\u7801", value: "code" },
|
|
78659
76532
|
{ label: "API \u670D\u52A1", value: "api" }
|
|
78660
76533
|
],
|
|
78661
|
-
newCustomEvent: new CustomEvent
|
|
76534
|
+
newCustomEvent: new CustomEvent(),
|
|
78662
76535
|
newCustomEventVisible: false,
|
|
78663
76536
|
fieldValueSourceTypeOptions: [
|
|
78664
76537
|
{ label: "\u8868\u8FBE\u5F0F", value: "expression" },
|
|
@@ -78708,7 +76581,7 @@ const _sfc_main$11 = {
|
|
|
78708
76581
|
activeCollapseItems: []
|
|
78709
76582
|
}, new BindFields());
|
|
78710
76583
|
this.bindModel = _.cloneDeep(__spreadValues(__spreadValues({}, defEvent), suffix.events));
|
|
78711
|
-
(_b2 = (_a2 = this.bindModel).currentEvent) != null ? _b2 : _a2.currentEvent = new CustomEvent
|
|
76584
|
+
(_b2 = (_a2 = this.bindModel).currentEvent) != null ? _b2 : _a2.currentEvent = new CustomEvent();
|
|
78712
76585
|
this.bindModel.visible = true;
|
|
78713
76586
|
this.bindModel.title = suffix.name || "\u64CD\u4F5C";
|
|
78714
76587
|
suffix.events = this.bindModel;
|
|
@@ -78837,7 +76710,7 @@ const _sfc_main$11 = {
|
|
|
78837
76710
|
activeCollapseItems: []
|
|
78838
76711
|
}, new BindFields());
|
|
78839
76712
|
this.bindModel = _.cloneDeep(__spreadValues(__spreadValues({}, defEvent), item2.events));
|
|
78840
|
-
(_b2 = (_a2 = this.bindModel).currentEvent) != null ? _b2 : _a2.currentEvent = new CustomEvent
|
|
76713
|
+
(_b2 = (_a2 = this.bindModel).currentEvent) != null ? _b2 : _a2.currentEvent = new CustomEvent();
|
|
78841
76714
|
this.bindModel.visible = true;
|
|
78842
76715
|
this.bindModel.title = item2.name || "\u64CD\u4F5C";
|
|
78843
76716
|
item2.events = this.bindModel;
|
|
@@ -80993,9 +78866,9 @@ const _sfc_main$Y = {
|
|
|
80993
78866
|
onGridDragEnd(evt, subList) {
|
|
80994
78867
|
},
|
|
80995
78868
|
onGridDragAdd(evt, subList) {
|
|
80996
|
-
const
|
|
80997
|
-
if (subList[
|
|
80998
|
-
this.designer.setSelected(subList[
|
|
78869
|
+
const newIndex = evt.newIndex;
|
|
78870
|
+
if (subList[newIndex]) {
|
|
78871
|
+
this.designer.setSelected(subList[newIndex]);
|
|
80999
78872
|
}
|
|
81000
78873
|
this.designer.emitHistoryChange();
|
|
81001
78874
|
this.designer.emitEvent("field-selected", this.widget);
|
|
@@ -81228,9 +79101,9 @@ const _sfc_main$X = {
|
|
|
81228
79101
|
},
|
|
81229
79102
|
methods: {
|
|
81230
79103
|
onSubFormDragAdd(evt, subList) {
|
|
81231
|
-
const
|
|
81232
|
-
if (subList[
|
|
81233
|
-
this.designer.setSelected(subList[
|
|
79104
|
+
const newIndex = evt.newIndex;
|
|
79105
|
+
if (subList[newIndex]) {
|
|
79106
|
+
this.designer.setSelected(subList[newIndex]);
|
|
81234
79107
|
}
|
|
81235
79108
|
this.designer.emitHistoryChange();
|
|
81236
79109
|
this.designer.emitEvent("field-selected", this.widget);
|
|
@@ -81515,9 +79388,9 @@ const _sfc_main$U = {
|
|
|
81515
79388
|
},
|
|
81516
79389
|
methods: {
|
|
81517
79390
|
onSubFormDragAdd(evt, subList) {
|
|
81518
|
-
const
|
|
81519
|
-
if (subList[
|
|
81520
|
-
this.designer.setSelected(subList[
|
|
79391
|
+
const newIndex = evt.newIndex;
|
|
79392
|
+
if (subList[newIndex]) {
|
|
79393
|
+
this.designer.setSelected(subList[newIndex]);
|
|
81521
79394
|
}
|
|
81522
79395
|
this.designer.emitHistoryChange();
|
|
81523
79396
|
this.designer.emitEvent("field-selected", this.widget);
|
|
@@ -81793,9 +79666,9 @@ const _sfc_main$S = {
|
|
|
81793
79666
|
onTableDragEnd(obj, subList) {
|
|
81794
79667
|
},
|
|
81795
79668
|
onTableDragAdd(evt, subList) {
|
|
81796
|
-
const
|
|
81797
|
-
if (subList[
|
|
81798
|
-
this.designer.setSelected(subList[
|
|
79669
|
+
const newIndex = evt.newIndex;
|
|
79670
|
+
if (subList[newIndex]) {
|
|
79671
|
+
this.designer.setSelected(subList[newIndex]);
|
|
81799
79672
|
}
|
|
81800
79673
|
this.designer.emitHistoryChange();
|
|
81801
79674
|
this.designer.emitEvent("field-selected", this.widget);
|
|
@@ -82555,9 +80428,9 @@ const _sfc_main$P = {
|
|
|
82555
80428
|
(_a2 = elDialog.parentNode) == null ? void 0 : _a2.removeChild(elDialog);
|
|
82556
80429
|
},
|
|
82557
80430
|
onDialogDragAdd(evt, subList) {
|
|
82558
|
-
const
|
|
82559
|
-
if (subList[
|
|
82560
|
-
this.designer.setSelected(subList[
|
|
80431
|
+
const newIndex = evt.newIndex;
|
|
80432
|
+
if (subList[newIndex]) {
|
|
80433
|
+
this.designer.setSelected(subList[newIndex]);
|
|
82561
80434
|
}
|
|
82562
80435
|
this.designer.emitHistoryChange();
|
|
82563
80436
|
this.designer.emitEvent("field-selected", this.widget);
|
|
@@ -82803,9 +80676,9 @@ const _sfc_main$O = {
|
|
|
82803
80676
|
beforeClose() {
|
|
82804
80677
|
},
|
|
82805
80678
|
onDrawerDragAdd(evt, subList) {
|
|
82806
|
-
const
|
|
82807
|
-
if (subList[
|
|
82808
|
-
this.designer.setSelected(subList[
|
|
80679
|
+
const newIndex = evt.newIndex;
|
|
80680
|
+
if (subList[newIndex]) {
|
|
80681
|
+
this.designer.setSelected(subList[newIndex]);
|
|
82809
80682
|
}
|
|
82810
80683
|
this.designer.emitHistoryChange();
|
|
82811
80684
|
this.designer.emitEvent("field-selected", this.widget);
|
|
@@ -83155,9 +81028,9 @@ const _sfc_main$N = {
|
|
|
83155
81028
|
this.disabledDraggable = value;
|
|
83156
81029
|
},
|
|
83157
81030
|
onDragAdd(evt) {
|
|
83158
|
-
const
|
|
83159
|
-
if (this.designer.widgetList[
|
|
83160
|
-
this.designer.setSelected(this.designer.widgetList[
|
|
81031
|
+
const newIndex = evt.newIndex;
|
|
81032
|
+
if (this.designer.widgetList[newIndex]) {
|
|
81033
|
+
this.designer.setSelected(this.designer.widgetList[newIndex]);
|
|
83161
81034
|
}
|
|
83162
81035
|
this.designer.emitHistoryChange();
|
|
83163
81036
|
this.designer.emitEvent("field-selected", null);
|
|
@@ -83932,13 +81805,13 @@ var IkFormDesigner = /* @__PURE__ */ _export_sfc(_sfc_main$M, [["render", _sfc_r
|
|
|
83932
81805
|
if (typeof window !== "undefined") {
|
|
83933
81806
|
let loadSvg = function() {
|
|
83934
81807
|
var body = document.body;
|
|
83935
|
-
var svgDom = document.getElementById("
|
|
81808
|
+
var svgDom = document.getElementById("__svg__icons__dom__1774599662657__");
|
|
83936
81809
|
if (!svgDom) {
|
|
83937
81810
|
svgDom = document.createElementNS("http://www.w3.org/2000/svg", "svg");
|
|
83938
81811
|
svgDom.style.position = "absolute";
|
|
83939
81812
|
svgDom.style.width = "0";
|
|
83940
81813
|
svgDom.style.height = "0";
|
|
83941
|
-
svgDom.id = "
|
|
81814
|
+
svgDom.id = "__svg__icons__dom__1774599662657__";
|
|
83942
81815
|
svgDom.setAttribute("xmlns", "http://www.w3.org/2000/svg");
|
|
83943
81816
|
svgDom.setAttribute("xmlns:link", "http://www.w3.org/1999/xlink");
|
|
83944
81817
|
}
|
|
@@ -88672,9 +86545,9 @@ const _sfc_main$q = {
|
|
|
88672
86545
|
(_a2 = elDialog.parentNode) == null ? void 0 : _a2.removeChild(elDialog);
|
|
88673
86546
|
},
|
|
88674
86547
|
onDialogDragAdd(evt, subList) {
|
|
88675
|
-
const
|
|
88676
|
-
if (subList[
|
|
88677
|
-
this.designer.setSelected(subList[
|
|
86548
|
+
const newIndex = evt.newIndex;
|
|
86549
|
+
if (subList[newIndex]) {
|
|
86550
|
+
this.designer.setSelected(subList[newIndex]);
|
|
88678
86551
|
}
|
|
88679
86552
|
this.designer.emitHistoryChange();
|
|
88680
86553
|
this.designer.emitEvent("field-selected", this.widget);
|
|
@@ -91087,11 +88960,11 @@ var uuid = function(prefix) {
|
|
|
91087
88960
|
var isTextarea = function(element) {
|
|
91088
88961
|
return element !== null && element.tagName.toLowerCase() === "textarea";
|
|
91089
88962
|
};
|
|
91090
|
-
var normalizePluginArray = function(
|
|
91091
|
-
if (typeof
|
|
88963
|
+
var normalizePluginArray = function(plugins) {
|
|
88964
|
+
if (typeof plugins === "undefined" || plugins === "") {
|
|
91092
88965
|
return [];
|
|
91093
88966
|
}
|
|
91094
|
-
return Array.isArray(
|
|
88967
|
+
return Array.isArray(plugins) ? plugins : plugins.split(" ");
|
|
91095
88968
|
};
|
|
91096
88969
|
var mergePlugins = function(initPlugins, inputPlugins) {
|
|
91097
88970
|
return normalizePluginArray(initPlugins).concat(normalizePluginArray(inputPlugins));
|
|
@@ -92690,10 +90563,10 @@ const _sfc_main$8 = {
|
|
|
92690
90563
|
sort: true,
|
|
92691
90564
|
handle: ".column-drag-handler",
|
|
92692
90565
|
ghostClass: "sortable-ghost",
|
|
92693
|
-
onEnd: ({ oldIndex
|
|
92694
|
-
const target = colState.tblData[
|
|
92695
|
-
colState.tblData.splice(
|
|
92696
|
-
colState.tblData.splice(
|
|
90566
|
+
onEnd: ({ oldIndex, newIndex }) => {
|
|
90567
|
+
const target = colState.tblData[oldIndex];
|
|
90568
|
+
colState.tblData.splice(oldIndex, 1);
|
|
90569
|
+
colState.tblData.splice(newIndex, 0, target);
|
|
92697
90570
|
}
|
|
92698
90571
|
});
|
|
92699
90572
|
},
|
|
@@ -95282,7 +93155,7 @@ const _sfc_main$1 = {
|
|
|
95282
93155
|
type: "primary",
|
|
95283
93156
|
size: "default",
|
|
95284
93157
|
link: "",
|
|
95285
|
-
icon: unref(Remove
|
|
93158
|
+
icon: unref(Remove),
|
|
95286
93159
|
onClick: ($event) => dsMethods.remove($index)
|
|
95287
93160
|
}, null, 8, ["icon", "onClick"])
|
|
95288
93161
|
]),
|
|
@@ -95862,8 +93735,8 @@ const install = (app2) => {
|
|
|
95862
93735
|
window.axios = axios$1;
|
|
95863
93736
|
try {
|
|
95864
93737
|
const packageJson = require("../package.json");
|
|
95865
|
-
const
|
|
95866
|
-
console.
|
|
93738
|
+
const version = packageJson.version;
|
|
93739
|
+
console.log("%c ik-next-form %c v" + version + " ", "background: #35495e; color: #fff; padding: 4px; border-radius: 3px 0 0 3px;", "background: #41b883; color: #fff; padding: 4px; border-radius: 0 3px 3px 0;");
|
|
95867
93740
|
console.warn = () => void 0;
|
|
95868
93741
|
} catch (err) {
|
|
95869
93742
|
console.error(err);
|