Skip to content

Commit

Permalink
Merge branch 'master' into refactor-disabled
Browse files Browse the repository at this point in the history
  • Loading branch information
jacojoubert committed Oct 20, 2021
2 parents c0e88e7 + 16532ff commit 36aa312
Show file tree
Hide file tree
Showing 7 changed files with 10,522 additions and 9,281 deletions.
5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
* updated yarn.lock (ca925fa)
* Fix deprecation warning `Importing from ember-test-waiters is deprecated` (#423) (f817c5d)
* Require ember-decorators-polyfill to be installed by client app (#425) (f901543)
* Set default values for itemVisualClass and a11yAnnouncementConfig (#424) (436b7ac)

* update yarn.lock (a18d3cb)
* bump ember-get-config to version using babel v7 (#416) (92dd9b9)

Expand Down
12 changes: 6 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -42,16 +42,16 @@ $ ember install ember-sortable
```hbs
{{! app/templates/my-route.hbs }}
{{#sortable-group model=model.items onChange=(action "reorderItems") as |group|}}
<SortableGroup @model={{this.model.items}} @onChange={{this.reorderItems}} as |group|}}
{{#each group.model as |modelItem|}}
{{#group.item model=modelItem as |item|}}
<group.item @model={{modelItem}} as |item|}}
{{modelItem.name}}
{{#item.handle}}
<item.handle>
<span class="handle">&varr;</span>
{{/item.handle}}
{{/group.item}}
</item.handle>
</group.item>
{{/each}}
{{/sortable-group}}
</SortableGroup>
```

### modifier
Expand Down
7 changes: 4 additions & 3 deletions addon/components/sortable-item.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import { Promise, defer } from 'rsvp';
import Component from '@ember/component';
import { computed, defineProperty } from '@ember/object';
import { defineProperty } from '@ember/object';
import { or, readOnly } from '@ember/object/computed';
import { run, throttle } from '@ember/runloop';
import { DEBUG } from '@glimmer/env';
import scrollParent from '../system/scroll-parent';
Expand Down Expand Up @@ -118,7 +119,7 @@ export default Component.extend({
@property isBusy
@type Boolean
*/
isBusy: computed.or('isDragging', 'isDropping'),
isBusy: or('isDragging', 'isDropping'),

/**
The frequency with which the group is informed
Expand Down Expand Up @@ -158,7 +159,7 @@ export default Component.extend({
Allows host instance to use the `group` property for something else with
minimal overriding.
*/
_direction: computed.readOnly('direction'),
_direction: readOnly('direction'),


disableCheckScrollBounds: isTesting,
Expand Down
2 changes: 1 addition & 1 deletion addon/modifiers/sortable-item.js
Original file line number Diff line number Diff line change
Expand Up @@ -649,7 +649,7 @@ export default class SortableItemModifier extends Modifier {

get isAnimated() {
if (!this.element) {
return;
return undefined;
}

let el = this.element;
Expand Down
4 changes: 2 additions & 2 deletions addon/templates/components/sortable-group.hbs
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{{yield (
hash
item=(component "ember-sortable@sortable-item"
direction=direction
direction=this.direction
registerItem=(action "registerItem")
deregisterItem=(action "deregisterItem")
setSelectedItem=(action "setSelectedItem")
Expand All @@ -11,6 +11,6 @@
activateKeyDown=(action "activateKeyDown")
deactivateKeyDown=(action "deactivateKeyDown")
)
model=model
model=this.model
)
}}
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "ember-sortable",
"version": "2.2.4",
"version": "2.2.5",
"description": "Sortable UI primitives for Ember.",
"keywords": [
"ember-addon",
Expand All @@ -26,7 +26,7 @@
"dependencies": {
"@ember/render-modifiers": "^1.0.2",
"@ember/test-waiters": "^2.4.4",
"ember-cli-babel": "^7.11.1",
"ember-cli-babel": "^7.26.6",
"ember-cli-htmlbars": "^5.0.0",
"ember-cli-version-checker": "^5.1.2",
"ember-get-config": "^0.3.0",
Expand Down
19,769 changes: 10,502 additions & 9,267 deletions yarn.lock

Large diffs are not rendered by default.

0 comments on commit 36aa312

Please sign in to comment.