sortablejs 1.15.6 → 1.15.7
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/Sortable.js +102 -117
- package/Sortable.min.js +2 -2
- package/modular/sortable.complete.esm.js +102 -117
- package/modular/sortable.core.esm.js +102 -117
- package/modular/sortable.esm.js +102 -117
- package/package.json +1 -1
- package/src/Sortable.js +5 -2
- package/src/utils.js +2 -2
package/modular/sortable.esm.js
CHANGED
|
@@ -1,134 +1,116 @@
|
|
|
1
1
|
/**!
|
|
2
|
-
* Sortable 1.15.
|
|
2
|
+
* Sortable 1.15.7
|
|
3
3
|
* @author RubaXa <trash@rubaxa.org>
|
|
4
4
|
* @author owenm <owen23355@gmail.com>
|
|
5
5
|
* @license MIT
|
|
6
6
|
*/
|
|
7
|
-
function
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
Object.defineProperties(target, Object.getOwnPropertyDescriptors(source));
|
|
29
|
-
} else {
|
|
30
|
-
ownKeys(Object(source)).forEach(function (key) {
|
|
31
|
-
Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key));
|
|
32
|
-
});
|
|
7
|
+
function _arrayLikeToArray(r, a) {
|
|
8
|
+
(null == a || a > r.length) && (a = r.length);
|
|
9
|
+
for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e];
|
|
10
|
+
return n;
|
|
11
|
+
}
|
|
12
|
+
function _arrayWithoutHoles(r) {
|
|
13
|
+
if (Array.isArray(r)) return _arrayLikeToArray(r);
|
|
14
|
+
}
|
|
15
|
+
function _defineProperty(e, r, t) {
|
|
16
|
+
return (r = _toPropertyKey(r)) in e ? Object.defineProperty(e, r, {
|
|
17
|
+
value: t,
|
|
18
|
+
enumerable: !0,
|
|
19
|
+
configurable: !0,
|
|
20
|
+
writable: !0
|
|
21
|
+
}) : e[r] = t, e;
|
|
22
|
+
}
|
|
23
|
+
function _extends() {
|
|
24
|
+
return _extends = Object.assign ? Object.assign.bind() : function (n) {
|
|
25
|
+
for (var e = 1; e < arguments.length; e++) {
|
|
26
|
+
var t = arguments[e];
|
|
27
|
+
for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]);
|
|
33
28
|
}
|
|
34
|
-
|
|
35
|
-
|
|
29
|
+
return n;
|
|
30
|
+
}, _extends.apply(null, arguments);
|
|
36
31
|
}
|
|
37
|
-
function
|
|
38
|
-
"
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
32
|
+
function _iterableToArray(r) {
|
|
33
|
+
if ("undefined" != typeof Symbol && null != r[Symbol.iterator] || null != r["@@iterator"]) return Array.from(r);
|
|
34
|
+
}
|
|
35
|
+
function _nonIterableSpread() {
|
|
36
|
+
throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
|
|
37
|
+
}
|
|
38
|
+
function ownKeys(e, r) {
|
|
39
|
+
var t = Object.keys(e);
|
|
40
|
+
if (Object.getOwnPropertySymbols) {
|
|
41
|
+
var o = Object.getOwnPropertySymbols(e);
|
|
42
|
+
r && (o = o.filter(function (r) {
|
|
43
|
+
return Object.getOwnPropertyDescriptor(e, r).enumerable;
|
|
44
|
+
})), t.push.apply(t, o);
|
|
48
45
|
}
|
|
49
|
-
return
|
|
50
|
-
}
|
|
51
|
-
function
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
46
|
+
return t;
|
|
47
|
+
}
|
|
48
|
+
function _objectSpread2(e) {
|
|
49
|
+
for (var r = 1; r < arguments.length; r++) {
|
|
50
|
+
var t = null != arguments[r] ? arguments[r] : {};
|
|
51
|
+
r % 2 ? ownKeys(Object(t), !0).forEach(function (r) {
|
|
52
|
+
_defineProperty(e, r, t[r]);
|
|
53
|
+
}) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) {
|
|
54
|
+
Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r));
|
|
58
55
|
});
|
|
59
|
-
} else {
|
|
60
|
-
obj[key] = value;
|
|
61
56
|
}
|
|
62
|
-
return
|
|
57
|
+
return e;
|
|
63
58
|
}
|
|
64
|
-
function
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
if (Object.prototype.hasOwnProperty.call(source, key)) {
|
|
70
|
-
target[key] = source[key];
|
|
71
|
-
}
|
|
72
|
-
}
|
|
73
|
-
}
|
|
74
|
-
return target;
|
|
75
|
-
};
|
|
76
|
-
return _extends.apply(this, arguments);
|
|
77
|
-
}
|
|
78
|
-
function _objectWithoutPropertiesLoose(source, excluded) {
|
|
79
|
-
if (source == null) return {};
|
|
80
|
-
var target = {};
|
|
81
|
-
var sourceKeys = Object.keys(source);
|
|
82
|
-
var key, i;
|
|
83
|
-
for (i = 0; i < sourceKeys.length; i++) {
|
|
84
|
-
key = sourceKeys[i];
|
|
85
|
-
if (excluded.indexOf(key) >= 0) continue;
|
|
86
|
-
target[key] = source[key];
|
|
87
|
-
}
|
|
88
|
-
return target;
|
|
89
|
-
}
|
|
90
|
-
function _objectWithoutProperties(source, excluded) {
|
|
91
|
-
if (source == null) return {};
|
|
92
|
-
var target = _objectWithoutPropertiesLoose(source, excluded);
|
|
93
|
-
var key, i;
|
|
59
|
+
function _objectWithoutProperties(e, t) {
|
|
60
|
+
if (null == e) return {};
|
|
61
|
+
var o,
|
|
62
|
+
r,
|
|
63
|
+
i = _objectWithoutPropertiesLoose(e, t);
|
|
94
64
|
if (Object.getOwnPropertySymbols) {
|
|
95
|
-
var
|
|
96
|
-
for (
|
|
97
|
-
key = sourceSymbolKeys[i];
|
|
98
|
-
if (excluded.indexOf(key) >= 0) continue;
|
|
99
|
-
if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue;
|
|
100
|
-
target[key] = source[key];
|
|
101
|
-
}
|
|
65
|
+
var n = Object.getOwnPropertySymbols(e);
|
|
66
|
+
for (r = 0; r < n.length; r++) o = n[r], -1 === t.indexOf(o) && {}.propertyIsEnumerable.call(e, o) && (i[o] = e[o]);
|
|
102
67
|
}
|
|
103
|
-
return
|
|
104
|
-
}
|
|
105
|
-
function
|
|
106
|
-
|
|
107
|
-
}
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
}
|
|
114
|
-
function
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
if (
|
|
119
|
-
|
|
120
|
-
if (
|
|
68
|
+
return i;
|
|
69
|
+
}
|
|
70
|
+
function _objectWithoutPropertiesLoose(r, e) {
|
|
71
|
+
if (null == r) return {};
|
|
72
|
+
var t = {};
|
|
73
|
+
for (var n in r) if ({}.hasOwnProperty.call(r, n)) {
|
|
74
|
+
if (-1 !== e.indexOf(n)) continue;
|
|
75
|
+
t[n] = r[n];
|
|
76
|
+
}
|
|
77
|
+
return t;
|
|
78
|
+
}
|
|
79
|
+
function _toConsumableArray(r) {
|
|
80
|
+
return _arrayWithoutHoles(r) || _iterableToArray(r) || _unsupportedIterableToArray(r) || _nonIterableSpread();
|
|
81
|
+
}
|
|
82
|
+
function _toPrimitive(t, r) {
|
|
83
|
+
if ("object" != typeof t || !t) return t;
|
|
84
|
+
var e = t[Symbol.toPrimitive];
|
|
85
|
+
if (void 0 !== e) {
|
|
86
|
+
var i = e.call(t, r || "default");
|
|
87
|
+
if ("object" != typeof i) return i;
|
|
88
|
+
throw new TypeError("@@toPrimitive must return a primitive value.");
|
|
89
|
+
}
|
|
90
|
+
return ("string" === r ? String : Number)(t);
|
|
121
91
|
}
|
|
122
|
-
function
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
return arr2;
|
|
92
|
+
function _toPropertyKey(t) {
|
|
93
|
+
var i = _toPrimitive(t, "string");
|
|
94
|
+
return "symbol" == typeof i ? i : i + "";
|
|
126
95
|
}
|
|
127
|
-
function
|
|
128
|
-
|
|
96
|
+
function _typeof(o) {
|
|
97
|
+
"@babel/helpers - typeof";
|
|
98
|
+
|
|
99
|
+
return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) {
|
|
100
|
+
return typeof o;
|
|
101
|
+
} : function (o) {
|
|
102
|
+
return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o;
|
|
103
|
+
}, _typeof(o);
|
|
104
|
+
}
|
|
105
|
+
function _unsupportedIterableToArray(r, a) {
|
|
106
|
+
if (r) {
|
|
107
|
+
if ("string" == typeof r) return _arrayLikeToArray(r, a);
|
|
108
|
+
var t = {}.toString.call(r).slice(8, -1);
|
|
109
|
+
return "Object" === t && r.constructor && (t = r.constructor.name), "Map" === t || "Set" === t ? Array.from(r) : "Arguments" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? _arrayLikeToArray(r, a) : void 0;
|
|
110
|
+
}
|
|
129
111
|
}
|
|
130
112
|
|
|
131
|
-
var version = "1.15.
|
|
113
|
+
var version = "1.15.7";
|
|
132
114
|
|
|
133
115
|
function userAgent(pattern) {
|
|
134
116
|
if (typeof window !== 'undefined' && window.navigator) {
|
|
@@ -171,7 +153,7 @@ function matches( /**HTMLElement*/el, /**String*/selector) {
|
|
|
171
153
|
return false;
|
|
172
154
|
}
|
|
173
155
|
function getParentOrHost(el) {
|
|
174
|
-
return el.host && el !== document && el.host.nodeType ? el.host : el.parentNode;
|
|
156
|
+
return el.host && el !== document && el.host.nodeType && el.host !== el ? el.host : el.parentNode;
|
|
175
157
|
}
|
|
176
158
|
function closest( /**HTMLElement*/el, /**String*/selector, /**HTMLElement*/ctx, includeCTX) {
|
|
177
159
|
if (el) {
|
|
@@ -2055,8 +2037,11 @@ Sortable.prototype = /** @lends Sortable.prototype */{
|
|
|
2055
2037
|
_nulling: function _nulling() {
|
|
2056
2038
|
pluginEvent('nulling', this);
|
|
2057
2039
|
rootEl = dragEl = parentEl = ghostEl = nextEl = cloneEl = lastDownEl = cloneHidden = tapEvt = touchEvt = moved = newIndex = newDraggableIndex = oldIndex = oldDraggableIndex = lastTarget = lastDirection = putSortable = activeGroup = Sortable.dragged = Sortable.ghost = Sortable.clone = Sortable.active = null;
|
|
2058
|
-
|
|
2059
|
-
|
|
2040
|
+
var el = this.el;
|
|
2041
|
+
savedInputChecked.forEach(function (checkEl) {
|
|
2042
|
+
if (el.contains(checkEl)) {
|
|
2043
|
+
checkEl.checked = true;
|
|
2044
|
+
}
|
|
2060
2045
|
});
|
|
2061
2046
|
savedInputChecked.length = lastDx = lastDy = 0;
|
|
2062
2047
|
},
|
package/package.json
CHANGED
package/src/Sortable.js
CHANGED
|
@@ -1555,8 +1555,11 @@ Sortable.prototype = /** @lends Sortable.prototype */ {
|
|
|
1555
1555
|
Sortable.clone =
|
|
1556
1556
|
Sortable.active = null;
|
|
1557
1557
|
|
|
1558
|
-
|
|
1559
|
-
|
|
1558
|
+
let el = this.el;
|
|
1559
|
+
savedInputChecked.forEach(function (checkEl) {
|
|
1560
|
+
if (el.contains(checkEl)) {
|
|
1561
|
+
checkEl.checked = true;
|
|
1562
|
+
}
|
|
1560
1563
|
});
|
|
1561
1564
|
|
|
1562
1565
|
savedInputChecked.length =
|
package/src/utils.js
CHANGED
|
@@ -38,7 +38,7 @@ function matches(/**HTMLElement*/el, /**String*/selector) {
|
|
|
38
38
|
}
|
|
39
39
|
|
|
40
40
|
function getParentOrHost(el) {
|
|
41
|
-
return (el.host && el !== document && el.host.nodeType)
|
|
41
|
+
return (el.host && el !== document && el.host.nodeType && el.host !== el)
|
|
42
42
|
? el.host
|
|
43
43
|
: el.parentNode;
|
|
44
44
|
}
|
|
@@ -256,7 +256,7 @@ function getRect(el, relativeToContainingBlock, relativeToNonStaticParent, undoS
|
|
|
256
256
|
|
|
257
257
|
/**
|
|
258
258
|
* Returns the content rect of the element (bounding rect minus border and padding)
|
|
259
|
-
* @param {HTMLElement} el
|
|
259
|
+
* @param {HTMLElement} el
|
|
260
260
|
*/
|
|
261
261
|
function getContentRect(el) {
|
|
262
262
|
let rect = getRect(el);
|