ember-sortable 2.3.0 → 3.0.1
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/.github/ISSUE_TEMPLATE/bug_report.md +2 -2
- package/.github/workflows/github_ci.yml +15 -13
- package/CHANGELOG.md +229 -107
- package/MIGRATION_GUIDE_MODIFIERS.md +20 -13
- package/MIGRATION_GUIDE_V2.md +20 -8
- package/README.md +75 -152
- package/V2_MIGRATION_RFC.md +188 -222
- package/addon/modifiers/sortable-group.js +48 -50
- package/addon/modifiers/sortable-handle.js +16 -18
- package/addon/modifiers/sortable-item.js +104 -77
- package/addon/services/ember-sortable.js +3 -6
- package/addon/system/scroll-parent.js +1 -1
- package/addon/utils/coordinate.js +1 -1
- package/addon/utils/css-calculation.js +2 -2
- package/addon/utils/defaults.js +4 -3
- package/addon/utils/keyboard.js +3 -12
- package/addon-test-support/helpers/drag.js +3 -11
- package/addon-test-support/helpers/index.js +1 -4
- package/addon-test-support/helpers/reorder.js +4 -6
- package/addon-test-support/utils/keyboard.js +3 -12
- package/addon-test-support/utils/offset.js +6 -6
- package/config/environment.js +2 -2
- package/index.js +0 -20
- package/package.json +34 -20
- package/addon/components/sortable-group.js +0 -741
- package/addon/components/sortable-handle.js +0 -30
- package/addon/components/sortable-item.js +0 -770
- package/addon/styles/components/sortable-group.css +0 -9
- package/addon/templates/components/sortable-group.hbs +0 -16
- package/addon/templates/components/sortable-handle.hbs +0 -1
- package/addon/templates/components/sortable-item.hbs +0 -2
- package/addon/utils/transitionend.js +0 -22
- package/app/components/sortable-group.js +0 -3
- package/app/components/sortable-handle.js +0 -4
- package/app/components/sortable-item.js +0 -3
- package/vendor/polyfills/closest.js +0 -21
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
{{yield (
|
|
2
|
-
hash
|
|
3
|
-
item=(component "ember-sortable@sortable-item"
|
|
4
|
-
direction=this.direction
|
|
5
|
-
registerItem=(action "registerItem")
|
|
6
|
-
deregisterItem=(action "deregisterItem")
|
|
7
|
-
setSelectedItem=(action "setSelectedItem")
|
|
8
|
-
update=(action "update")
|
|
9
|
-
prepare=(action "prepare")
|
|
10
|
-
commit=(action "commit")
|
|
11
|
-
activateKeyDown=(action "activateKeyDown")
|
|
12
|
-
deactivateKeyDown=(action "deactivateKeyDown")
|
|
13
|
-
)
|
|
14
|
-
model=this.model
|
|
15
|
-
)
|
|
16
|
-
}}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{{yield}}
|
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
// Thanks to http://davidwalsh.name/css-animation-callback
|
|
2
|
-
|
|
3
|
-
function whichTransitionEvent() {
|
|
4
|
-
var t;
|
|
5
|
-
var el = document.createElement('fake-element');
|
|
6
|
-
var transitions = {
|
|
7
|
-
'transition': 'transitionend',
|
|
8
|
-
'OTransition': 'oTransitionEnd',
|
|
9
|
-
'MozTransition': 'transitionend',
|
|
10
|
-
'WebkitTransition': 'webkitTransitionEnd'
|
|
11
|
-
};
|
|
12
|
-
|
|
13
|
-
for (t in transitions) {
|
|
14
|
-
if (el.style[t] !== undefined) {
|
|
15
|
-
return transitions[t];
|
|
16
|
-
}
|
|
17
|
-
}
|
|
18
|
-
}
|
|
19
|
-
|
|
20
|
-
const transitionend = whichTransitionEvent();
|
|
21
|
-
|
|
22
|
-
export default transitionend;
|
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
// Polyfill for 'closest' and `matches` in IE11.
|
|
2
|
-
// https://github.com/jonathantneal/closest
|
|
3
|
-
if (typeof window !== 'undefined' && typeof document !== 'undefined') {
|
|
4
|
-
(function(ElementProto) {
|
|
5
|
-
if (typeof ElementProto.closest !== 'function') {
|
|
6
|
-
ElementProto.closest = function closest(selector) {
|
|
7
|
-
var element = this;
|
|
8
|
-
|
|
9
|
-
while (element && element.nodeType === 1) {
|
|
10
|
-
if (element.msMatchesSelector(selector)) {
|
|
11
|
-
return element;
|
|
12
|
-
}
|
|
13
|
-
|
|
14
|
-
element = element.parentNode;
|
|
15
|
-
}
|
|
16
|
-
|
|
17
|
-
return null;
|
|
18
|
-
};
|
|
19
|
-
}
|
|
20
|
-
})(window.Element.prototype);
|
|
21
|
-
}
|