Important: This documentation covers Yarn 1 (Classic).
For Yarn 2+ docs and migration guide, see yarnpkg.com.

Package detail

@zestia/ember-dragula

zestia1.5kMITdeprecated12.1.0

Moved to GitHub Packages

An ember addon for dragula support.

ember-addon, dragula, ember-dragula, sortable

readme

@zestia/ember-dragula

Latest npm release Ember Observer

This Ember addon provides support for drag and drop using dragula

Installation

ember install @zestia/ember-dragula

Demo

https://zestia.github.io/ember-dragula

Example

<Dragula as |Container|>
  <Container>
    {{#each this.listOne as |item|}}
      {{item}}
    {{/each}}
  </Container>

  <Container>
    {{#each this.listTwo as |item|}}
      {{item}}
    {{/each}}
  </Container>
</Dragula>

Dragula

Arguments

@options

Optional. The full range of options that dragula accepts are supported, see the docs.

@onReady

Optional. The dragula instance is emitted via this action, allowing access to the drake API.

@on<Event>

Optional. The full range of events that dragula emits are supported, see the docs. These can be accessed by prefixing the event name with "on", e.g. @onDrag

Test helpers

To simulate dragging and dropping, test helpers are provided.

<summary>Example</summary>
import { simulateDragDrop } from '@zestia/ember-dragula/test-support/helpers/simulate-drag-drop';

Within a test:

const dragMe = find('.drag-me');
const dropHere = find('.drop-here');

await simulateDrag(dragMe);
await simulateDrop(dragMe, dropHere);
await simulateDragDrop(dragMe, dropHere);

changelog

Changelog

12.1.0

  • Run ember-cli-update

12.0.0

  • Remove Ember prefix from components
  • Run ember-cli-update
  • Yield only a Container, not dragula.Container
  • Upgrade dependencies

11.0.2

  • Upgrade dependencies

11.0.1

  • Run ember-cli-update

11.0.0

  • Upgrade dependencies
    • Ember Auto Import 2x #15
  • Add Embroider support

10.0.9

  • Upgrade dependencies

10.0.8

  • Use async/await in test helpers
  • Upgrade dependencies
  • Run ember-cli-update

10.0.7

  • Upgrade dependencies

10.0.6

  • Upgrade dependencies

10.0.5

  • Upgrade dependencies

10.0.4

  • Upgrade dependencies

10.0.3

  • Upgrade dependencies

10.0.2

  • Upgrade dependencies

10.0.1

  • Upgrade dependencies

10.0.0

  • Glimmerise component
  • Drop support for Ember < 3.16

9.0.3

  • Upgrade dependencies

9.0.2

  • Move render modifiers to dependencies
  • Upgrade dependencies

9.0.1

  • Upgrade dependencies

9.0.0

  • Small internal refactor
  • Drop support for Ember < 3.11

8.0.1

  • Upgrade dependencies

8.0.0

  • Rename @onInit= action to @onReady=

7.0.0

  • Switch to BEM syntax

6.0.1

  • Upgrade dependencies

6.0.0

  • Update templates
  • Upgrade dependencies
  • Must be invoked using angle brackets for attributes to be forwarded

5.0.4

  • Upgrade dependencies

5.0.3

  • Upgrade dependencies

5.0.2

  • Upgrade dependencies

5.0.1

  • Correct center drag point calculation in test helpers

5.0.0

  • Moves location of simulate drag drop test helpers
  • Updates drag drop test helpers to use Ember test helpers under the hood

4.0.0

  • Changes d.container to d.Container

3.2.4

  • Upgrade dependencies

3.2.3

  • Upgrade dependencies

3.2.2

  • Imports dragula rather than using the global

3.2.0

  • Changes to camel case actions (onDragend -> onDragEnd).

< 3.2.0

  • No changelog