diff --git a/src/components/BootstrapBlazor.Sortable/BootstrapBlazor.Sortable.csproj b/src/components/BootstrapBlazor.Sortable/BootstrapBlazor.Sortable.csproj index d7678b40..149b10a0 100644 --- a/src/components/BootstrapBlazor.Sortable/BootstrapBlazor.Sortable.csproj +++ b/src/components/BootstrapBlazor.Sortable/BootstrapBlazor.Sortable.csproj @@ -1,5 +1,9 @@ + + 10.0.2 + + Bootstrap Blazor WebAssembly wasm UI Components Sortable Bootstrap UI components extensions of SortableJS diff --git a/src/components/BootstrapBlazor.Sortable/Components/SortableEvent.cs b/src/components/BootstrapBlazor.Sortable/Components/SortableEvent.cs index b62ae220..fed17c96 100644 --- a/src/components/BootstrapBlazor.Sortable/Components/SortableEvent.cs +++ b/src/components/BootstrapBlazor.Sortable/Components/SortableEvent.cs @@ -1,34 +1,39 @@ -// Copyright (c) Argo Zhang (argo@163.com). All rights reserved. +// Copyright (c) Argo Zhang (argo@163.com). All rights reserved. // Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. // Website: https://www.blazor.zone or https://argozhang.github.io/ namespace BootstrapBlazor.Components; /// -/// SortableEvent 类 +/// SortableEvent 类 +/// SortableEvent class /// public class SortableEvent { /// - /// 获得/设置 原始项所属容器 Id + /// 获得/设置 原始项所属容器 Id + /// Gets or sets the container Id of the original item. /// [NotNull] public string? FromId { get; set; } /// - /// 获得/设置 原始索引 + /// 获得/设置 原始索引 + /// Gets or sets the original index. /// [NotNull] public int OldIndex { get; set; } /// - /// 获得/设置 新索引 + /// 获得/设置 新索引 + /// Gets or sets the new index. /// [NotNull] public int NewIndex { get; set; } /// - /// 获得/设置 移动元素 集合 + /// 获得 移动元素 集合 + /// Gets the collection of moved elements. /// public List Items { get; } = []; } diff --git a/src/components/BootstrapBlazor.Sortable/Components/SortableList.razor.cs b/src/components/BootstrapBlazor.Sortable/Components/SortableList.razor.cs index f42a1791..a91f7f0a 100644 --- a/src/components/BootstrapBlazor.Sortable/Components/SortableList.razor.cs +++ b/src/components/BootstrapBlazor.Sortable/Components/SortableList.razor.cs @@ -1,4 +1,4 @@ -// Copyright (c) Argo Zhang (argo@163.com). All rights reserved. +// Copyright (c) Argo Zhang (argo@163.com). All rights reserved. // Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. // Website: https://www.blazor.zone or https://argozhang.github.io/ @@ -8,41 +8,46 @@ namespace BootstrapBlazor.Components; /// -/// SortableList 组件 +/// SortableList 组件 +/// SortableList component /// public partial class SortableList : ISortableList { /// - /// 获得/设置 配置项实例 + /// 获得/设置 配置项实例 + /// Gets or sets the configuration option instance . /// [Parameter] public SortableOption? Option { get; set; } /// - /// 获得/设置 子组件 必填项不可为空 + /// 获得/设置 子组件 必填项不可为空 + /// Gets or sets the child content. Required and cannot be null. /// [Parameter] [EditorRequired] public RenderFragment? ChildContent { get; set; } /// - /// 获得/设置 元素更新回调方法 + /// 获得/设置 元素更新回调方法 + /// Gets or sets the callback method when an element is updated. /// [Parameter] public Func? OnUpdate { get; set; } /// - /// 获得/设置 元素更新回调方法 + /// 获得/设置 元素移除回调方法 + /// Gets or sets the callback method when an element is removed. /// [Parameter] public Func? OnRemove { get; set; } /// - /// 获得/设置 元素增加回调方法 + /// 获得/设置 元素增加回调方法 + /// Gets or sets the callback method when an element is added. /// [Parameter] public Func? OnAdd { get; set; } - private string? ClassString => CssBuilder.Default("bb-sortable") .AddClassFromAttributes(AdditionalAttributes) .Build(); @@ -50,13 +55,12 @@ public partial class SortableList : ISortableList /// /// /// - /// protected override Task InvokeInitAsync() => InvokeVoidAsync("init", Id, Interop, Option, OnUpdate != null, OnRemove != null, OnAdd != null); /// - /// JavaScript 调用触发节点更新方法 + /// 由 JavaScript 调用触发节点更新方法 + /// Called by JavaScript to trigger the node update method. /// - /// [JSInvokable] public async Task TriggerUpdate(List items) { @@ -75,9 +79,9 @@ public async Task TriggerUpdate(List items) } /// - /// JavaScript 调用触发节点更新方法 + /// 由 JavaScript 调用触发节点移除方法 + /// Called by JavaScript to trigger the node remove method. /// - /// [JSInvokable] public async Task TriggerRemove(List items) { @@ -96,9 +100,9 @@ public async Task TriggerRemove(List items) } /// - /// JavaScript 调用触发节点更新方法 + /// 由 JavaScript 调用触发节点增加方法 + /// Called by JavaScript to trigger the node add method. /// - /// [JSInvokable] public async Task TriggerAdd(List items) { diff --git a/src/components/BootstrapBlazor.Sortable/Components/SortableListItem.cs b/src/components/BootstrapBlazor.Sortable/Components/SortableListItem.cs index 45bcfb3d..42064e4d 100644 --- a/src/components/BootstrapBlazor.Sortable/Components/SortableListItem.cs +++ b/src/components/BootstrapBlazor.Sortable/Components/SortableListItem.cs @@ -1,27 +1,31 @@ -// Copyright (c) Argo Zhang (argo@163.com). All rights reserved. +// Copyright (c) Argo Zhang (argo@163.com). All rights reserved. // Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. // Website: https://www.blazor.zone or https://argozhang.github.io/ namespace BootstrapBlazor.Components; /// -/// SortableListItem 类 +/// SortableListItem 类 +/// SortableListItem class /// public class SortableListItem { /// - /// 获得/设置 原始项所属容器 Id + /// 获得/设置 原始项所属容器 Id + /// Gets or sets the container Id of the original item. /// [NotNull] public string? FromId { get; set; } /// - /// 获得/设置 原始索引 + /// 获得/设置 原始索引 + /// Gets or sets the original index. /// public int OldIndex { get; set; } /// - /// 获得/设置 新索引 + /// 获得/设置 新索引 + /// Gets or sets the new index. /// public int NewIndex { get; set; } } diff --git a/src/components/BootstrapBlazor.Sortable/Components/SortableOption.cs b/src/components/BootstrapBlazor.Sortable/Components/SortableOption.cs index 36da8b06..2a889838 100644 --- a/src/components/BootstrapBlazor.Sortable/Components/SortableOption.cs +++ b/src/components/BootstrapBlazor.Sortable/Components/SortableOption.cs @@ -1,4 +1,4 @@ -// Copyright (c) Argo Zhang (argo@live.ca). All rights reserved. +// Copyright (c) Argo Zhang (argo@live.ca). All rights reserved. // Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. // Website: https://www.blazor.zone or https://argozhang.github.io/ @@ -7,204 +7,238 @@ namespace BootstrapBlazor.Components; /// -/// SortableOption 配置类 +/// SortableOption 配置类 +/// SortableOption configuration class /// public class SortableOption { /// - /// 获得/设置 目标元素选择器 + /// 获得/设置 目标元素选择器 + /// Gets or sets the target element selector. /// [JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)] public string? RootSelector { get; set; } /// - /// or { name: "...", pull: [true, false, 'clone', array], put: [true, false, array] } + /// 获得/设置 分组配置 + /// Gets or sets the group configuration. /// [JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)] public string? Group { get; set; } /// - /// 获得/设置 拖动时是否克隆元素 默认 null 未设置 不克隆 + /// 获得/设置 拖动时是否克隆元素 默认 null 未设置 不克隆 + /// Gets or sets whether to clone the element when dragging. Default is null (no clone). /// [JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)] public bool? Clone { get; set; } /// - /// 获得/设置 是否允许拖动回来 默认 null 未设置 允许 + /// 获得/设置 是否允许拖动回来 默认 null 未设置 允许 + /// Gets or sets whether to allow dragging back. Default is null (allowed). /// [JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)] public bool? Putback { get; set; } /// - /// sorting inside list + /// 获得/设置 是否允许列表内排序 + /// Gets or sets whether sorting inside the list is allowed. /// [JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)] public bool? Sort { get; set; } /// - /// time in milliseconds to define when the sorting should start + /// 获得/设置 开始排序的延迟时间(毫秒) + /// Gets or sets the time in milliseconds to define when the sorting should start. /// [JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)] public int? Delay { get; set; } /// - /// only delay if user is using touch + /// 获得/设置 是否仅在触摸操作时延迟 + /// Gets or sets whether to only delay if the user is using touch. /// [JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)] public bool? DelayOnTouchOnly { get; set; } /// - /// // px, how many pixels the point should move before cancelling a delayed drag event + /// 获得/设置 取消延迟拖动事件前点应移动的像素数 + /// Gets or sets how many pixels the point should move before cancelling a delayed drag event. /// [JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)] public int? TouchStartThreshold { get; set; } /// - /// Disables the sortable if set to true. + /// 获得/设置 是否禁用排序 + /// Gets or sets whether the sortable is disabled. /// [JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)] public bool? Disabled { get; set; } /// - /// ms, animation speed moving items when sorting, `0` — without animation + /// 获得/设置 排序时移动项目的动画速度(毫秒) 0 表示无动画 + /// Gets or sets the animation speed in milliseconds when sorting items. 0 means no animation. /// [JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)] public int? Animation { get; set; } /// - /// Easing for animation. Defaults to null. See https://easings.net/ for examples. + /// 获得/设置 动画缓动函数 默认 null + /// Gets or sets the easing for animation. Default is null. /// [JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)] public string? Easing { get; set; } /// - /// Drag handle selector within list items + /// 获得/设置 列表项内的拖动句柄选择器 + /// Gets or sets the drag handle selector within list items. /// [JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)] public string? Handle { get; set; } /// - /// Selectors that do not lead to dragging (String or Function) + /// 获得/设置 不允许拖动的选择器 + /// Gets or sets the selectors that do not lead to dragging. /// [JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)] public string? Filter { get; set; } /// - /// Call `event.preventDefault()` when triggered `filter` + /// 获得/设置 触发过滤时是否调用 event.preventDefault() + /// Gets or sets whether to call event.preventDefault() when filter is triggered. /// [JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)] public bool? PreventOnFilter { get; set; } /// - /// Specifies which items inside the element should be draggable + /// 获得/设置 元素内可拖动项的选择器 + /// Gets or sets which items inside the element should be draggable. /// [JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)] public string? Draggable { get; set; } /// - /// HTML attribute that is used by the `toArray()` method + /// 获得/设置 toArray() 方法使用的 HTML 属性 + /// Gets or sets the HTML attribute used by the toArray() method. /// [JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)] public string? DataIdAttr { get; set; } /// - /// Class name for the drop placeholder + /// 获得/设置 拖放占位符的样式类名 + /// Gets or sets the class name for the drop placeholder. /// [JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)] public string? GhostClass { get; set; } /// - /// Class name for the chosen item + /// 获得/设置 选中项的样式类名 + /// Gets or sets the class name for the chosen item. /// [JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)] public string? ChosenClass { get; set; } /// - /// Class name for the dragging item + /// 获得/设置 拖动项的样式类名 + /// Gets or sets the class name for the dragging item. /// [JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)] public string? DragClass { get; set; } /// - /// Threshold of the swap zone + /// 获得/设置 交换区域的阈值 + /// Gets or sets the threshold of the swap zone. /// [JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)] public int? SwapThreshold { get; set; } /// - /// Will always use inverted swap zone if set to true + /// 获得/设置 是否始终使用反转交换区域 + /// Gets or sets whether to always use the inverted swap zone. /// [JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)] public bool? InvertSwap { get; set; } /// - /// Threshold of the inverted swap zone (will be set to swapThreshold value by default) + /// 获得/设置 反转交换区域的阈值 + /// Gets or sets the threshold of the inverted swap zone. /// [JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)] public int? InvertedSwapThreshold { get; set; } /// - /// Direction of Sortable (will be detected automatically if not given) + /// 获得/设置 排序方向 + /// Gets or sets the direction of sortable. /// [JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)] public string? Direction { get; set; } /// - /// ignore the HTML5 DnD behaviour and force the fallback to kick in + /// 获得/设置 是否忽略 HTML5 DnD 行为强制使用回退方案 + /// Gets or sets whether to ignore the HTML5 DnD behaviour and force the fallback to kick in. /// [JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)] public bool? ForceFallback { get; set; } /// - /// Class name for the cloned DOM Element when using forceFallback + /// 获得/设置 使用 forceFallback 时克隆 DOM 元素的样式类名 + /// Gets or sets the class name for the cloned DOM element when using forceFallback. /// [JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)] public string? FallbackClass { get; set; } /// - /// Appends the cloned DOM Element into the Document's Body + /// 获得/设置 是否将克隆的 DOM 元素追加到 Document 的 Body 中 + /// Gets or sets whether to append the cloned DOM element into the document's body. /// [JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)] public bool? FallbackOnBody { get; set; } /// - /// Specify in pixels how far the mouse should move before it's considered as a drag. + /// 获得/设置 鼠标移动多少像素后被视为拖动 + /// Gets or sets how far in pixels the mouse should move before it is considered as a drag. /// [JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)] public int? FallbackTolerance { get; set; } /// - /// DragoverBubble + /// 获得/设置 是否允许 dragover 事件冒泡 + /// Gets or sets whether the dragover event should bubble. /// [JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)] public bool? DragoverBubble { get; set; } /// - /// Remove the clone element when it is not showing, rather than just hiding it + /// 获得/设置 不显示时是否移除克隆元素而不是隐藏 + /// Gets or sets whether to remove the clone element when it is not showing, rather than just hiding it. /// [JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)] public bool? RemoveCloneOnHide { get; set; } /// - /// px, distance mouse must be from empty sortable to insert drag element into it + /// 获得/设置 鼠标距离空排序容器多少像素时可插入拖动元素 + /// Gets or sets the distance in pixels the mouse must be from an empty sortable to insert a drag element into it. /// [JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)] public int? EmptyInsertThreshold { get; set; } /// - /// 获得/设置 是否允许多拖动 默认 null 未设置 + /// 获得/设置 是否允许多拖动 默认 null 未设置 + /// Gets or sets whether multi-drag is allowed. Default is null. /// [JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)] public bool? MultiDrag { get; set; } /// - /// 获得/设置 是否交换拖动 默认 null 未设置 + /// 获得/设置 是否交换拖动 默认 null 未设置 + /// Gets or sets whether swap dragging is enabled. Default is null. /// [JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)] public bool? Swap { get; set; } /// - /// 获得/设置 是否交换拖动项样式名称 默认 null 未设置 + /// 获得/设置 交换拖动项样式名称 默认 null 未设置 + /// Gets or sets the class name for the swap dragging item. Default is null. /// [JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)] public bool? SwapClass { get; set; } diff --git a/src/components/BootstrapBlazor.Sortable/wwwroot/sortable.esm.js b/src/components/BootstrapBlazor.Sortable/wwwroot/sortable.esm.js index 824d4814..c5d485ff 100644 --- a/src/components/BootstrapBlazor.Sortable/wwwroot/sortable.esm.js +++ b/src/components/BootstrapBlazor.Sortable/wwwroot/sortable.esm.js @@ -1,134 +1,116 @@ /**! - * Sortable 1.15.6 + * Sortable 1.15.7 * @author RubaXa * @author owenm * @license MIT */ -function ownKeys(object, enumerableOnly) { - var keys = Object.keys(object); - if (Object.getOwnPropertySymbols) { - var symbols = Object.getOwnPropertySymbols(object); - if (enumerableOnly) { - symbols = symbols.filter(function (sym) { - return Object.getOwnPropertyDescriptor(object, sym).enumerable; - }); - } - keys.push.apply(keys, symbols); - } - return keys; -} -function _objectSpread2(target) { - for (var i = 1; i < arguments.length; i++) { - var source = arguments[i] != null ? arguments[i] : {}; - if (i % 2) { - ownKeys(Object(source), true).forEach(function (key) { - _defineProperty(target, key, source[key]); - }); - } else if (Object.getOwnPropertyDescriptors) { - Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); - } else { - ownKeys(Object(source)).forEach(function (key) { - Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); - }); +function _arrayLikeToArray(r, a) { + (null == a || a > r.length) && (a = r.length); + for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e]; + return n; +} +function _arrayWithoutHoles(r) { + if (Array.isArray(r)) return _arrayLikeToArray(r); +} +function _defineProperty(e, r, t) { + return (r = _toPropertyKey(r)) in e ? Object.defineProperty(e, r, { + value: t, + enumerable: !0, + configurable: !0, + writable: !0 + }) : e[r] = t, e; +} +function _extends() { + return _extends = Object.assign ? Object.assign.bind() : function (n) { + for (var e = 1; e < arguments.length; e++) { + var t = arguments[e]; + for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]); } - } - return target; + return n; + }, _extends.apply(null, arguments); } -function _typeof(obj) { - "@babel/helpers - typeof"; - - if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { - _typeof = function (obj) { - return typeof obj; - }; - } else { - _typeof = function (obj) { - return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; - }; +function _iterableToArray(r) { + if ("undefined" != typeof Symbol && null != r[Symbol.iterator] || null != r["@@iterator"]) return Array.from(r); +} +function _nonIterableSpread() { + throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); +} +function ownKeys(e, r) { + var t = Object.keys(e); + if (Object.getOwnPropertySymbols) { + var o = Object.getOwnPropertySymbols(e); + r && (o = o.filter(function (r) { + return Object.getOwnPropertyDescriptor(e, r).enumerable; + })), t.push.apply(t, o); } - return _typeof(obj); -} -function _defineProperty(obj, key, value) { - if (key in obj) { - Object.defineProperty(obj, key, { - value: value, - enumerable: true, - configurable: true, - writable: true + return t; +} +function _objectSpread2(e) { + for (var r = 1; r < arguments.length; r++) { + var t = null != arguments[r] ? arguments[r] : {}; + r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { + _defineProperty(e, r, t[r]); + }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { + Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); - } else { - obj[key] = value; } - return obj; + return e; } -function _extends() { - _extends = Object.assign || function (target) { - for (var i = 1; i < arguments.length; i++) { - var source = arguments[i]; - for (var key in source) { - if (Object.prototype.hasOwnProperty.call(source, key)) { - target[key] = source[key]; - } - } - } - return target; - }; - return _extends.apply(this, arguments); -} -function _objectWithoutPropertiesLoose(source, excluded) { - if (source == null) return {}; - var target = {}; - var sourceKeys = Object.keys(source); - var key, i; - for (i = 0; i < sourceKeys.length; i++) { - key = sourceKeys[i]; - if (excluded.indexOf(key) >= 0) continue; - target[key] = source[key]; - } - return target; -} -function _objectWithoutProperties(source, excluded) { - if (source == null) return {}; - var target = _objectWithoutPropertiesLoose(source, excluded); - var key, i; +function _objectWithoutProperties(e, t) { + if (null == e) return {}; + var o, + r, + i = _objectWithoutPropertiesLoose(e, t); if (Object.getOwnPropertySymbols) { - var sourceSymbolKeys = Object.getOwnPropertySymbols(source); - for (i = 0; i < sourceSymbolKeys.length; i++) { - key = sourceSymbolKeys[i]; - if (excluded.indexOf(key) >= 0) continue; - if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; - target[key] = source[key]; - } + var n = Object.getOwnPropertySymbols(e); + for (r = 0; r < n.length; r++) o = n[r], -1 === t.indexOf(o) && {}.propertyIsEnumerable.call(e, o) && (i[o] = e[o]); } - return target; -} -function _toConsumableArray(arr) { - return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread(); -} -function _arrayWithoutHoles(arr) { - if (Array.isArray(arr)) return _arrayLikeToArray(arr); -} -function _iterableToArray(iter) { - if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter); -} -function _unsupportedIterableToArray(o, minLen) { - if (!o) return; - if (typeof o === "string") return _arrayLikeToArray(o, minLen); - var n = Object.prototype.toString.call(o).slice(8, -1); - if (n === "Object" && o.constructor) n = o.constructor.name; - if (n === "Map" || n === "Set") return Array.from(o); - if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); + return i; +} +function _objectWithoutPropertiesLoose(r, e) { + if (null == r) return {}; + var t = {}; + for (var n in r) if ({}.hasOwnProperty.call(r, n)) { + if (-1 !== e.indexOf(n)) continue; + t[n] = r[n]; + } + return t; +} +function _toConsumableArray(r) { + return _arrayWithoutHoles(r) || _iterableToArray(r) || _unsupportedIterableToArray(r) || _nonIterableSpread(); +} +function _toPrimitive(t, r) { + if ("object" != typeof t || !t) return t; + var e = t[Symbol.toPrimitive]; + if (void 0 !== e) { + var i = e.call(t, r || "default"); + if ("object" != typeof i) return i; + throw new TypeError("@@toPrimitive must return a primitive value."); + } + return ("string" === r ? String : Number)(t); } -function _arrayLikeToArray(arr, len) { - if (len == null || len > arr.length) len = arr.length; - for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i]; - return arr2; +function _toPropertyKey(t) { + var i = _toPrimitive(t, "string"); + return "symbol" == typeof i ? i : i + ""; } -function _nonIterableSpread() { - throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); +function _typeof(o) { + "@babel/helpers - typeof"; + + return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { + return typeof o; + } : function (o) { + return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; + }, _typeof(o); +} +function _unsupportedIterableToArray(r, a) { + if (r) { + if ("string" == typeof r) return _arrayLikeToArray(r, a); + var t = {}.toString.call(r).slice(8, -1); + 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; + } } -var version = "1.15.6"; +var version = "1.15.7"; function userAgent(pattern) { if (typeof window !== 'undefined' && window.navigator) { @@ -171,7 +153,7 @@ function matches( /**HTMLElement*/el, /**String*/selector) { return false; } function getParentOrHost(el) { - return el.host && el !== document && el.host.nodeType ? el.host : el.parentNode; + return el.host && el !== document && el.host.nodeType && el.host !== el ? el.host : el.parentNode; } function closest( /**HTMLElement*/el, /**String*/selector, /**HTMLElement*/ctx, includeCTX) { if (el) { @@ -2055,8 +2037,11 @@ Sortable.prototype = /** @lends Sortable.prototype */{ _nulling: function _nulling() { pluginEvent('nulling', this); 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; - savedInputChecked.forEach(function (el) { - el.checked = true; + var el = this.el; + savedInputChecked.forEach(function (checkEl) { + if (el.contains(checkEl)) { + checkEl.checked = true; + } }); savedInputChecked.length = lastDx = lastDy = 0; },