Skip to content

Commit

Permalink
Merge pull request #28 from zestia/12-1-4
Browse files Browse the repository at this point in the history
12 1 4
  • Loading branch information
amk221 authored Sep 5, 2024
2 parents 9a9040c + 8c384fa commit 05e2cac
Show file tree
Hide file tree
Showing 24 changed files with 9,226 additions and 11,547 deletions.
1 change: 1 addition & 0 deletions .eslintignore
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
/vendor/

# compiled output
/declarations/
/dist/
/tmp/

Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -57,8 +57,8 @@ jobs:
fail-fast: false
matrix:
try-scenario:
- ember-lts-4.8
- ember-lts-4.12
- ember-lts-5.4
- ember-release
- ember-beta
- ember-canary
Expand Down
2 changes: 2 additions & 0 deletions .npmignore
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,8 @@
/ember-cli-build.js
/testem.js
/tests/
/tsconfig.declarations.json
/tsconfig.json
/yarn-error.log
/yarn.lock
.gitkeep
Expand Down
5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
# Changelog

## 12.1.4

- Run ember-cli-update
- Upgrade dependencies

## 12.1.3

- Run ember-cli-update
Expand Down
15 changes: 15 additions & 0 deletions addon/components/dragula-container.gjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
import Component from '@glimmer/component';
import { modifier } from 'ember-modifier';

export default class DragulaContainer extends Component {
lifecycle = modifier((element) => {
this.args.onInsert(element);
return () => this.args.onDestroy(element);
});

<template>
<div class="dragula__container" {{this.lifecycle}} ...attributes>
{{yield}}
</div>
</template>
}
8 changes: 0 additions & 8 deletions addon/components/dragula-container.hbs

This file was deleted.

23 changes: 16 additions & 7 deletions addon/components/dragula.js → addon/components/dragula.gjs
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import { action } from '@ember/object';

const { keys } = Object;

const events = {
export const events = {
drag: 'onDrag',
dragend: 'onDragEnd',
drop: 'onDrop',
Expand All @@ -18,19 +18,13 @@ const events = {
};

export default class Dragula extends Component {
static events = events;

drake;

DragulaContainer = DragulaContainer;

constructor() {
super(...arguments);

this.drake = dragula({ ...this.args.options });

this._setupHandlers();

this.args.onReady?.(this.drake);
}

Expand Down Expand Up @@ -58,4 +52,19 @@ export default class Dragula extends Component {
}
});
}

<template>
<div class="dragula" ...attributes {{this.dragula}}>
{{#let
(component
DragulaContainer
onInsert=this.addContainer
onDestroy=this.removeContainer
)
as |Container|
}}
{{yield Container}}
{{/let}}
</div>
</template>
}
12 changes: 0 additions & 12 deletions addon/components/dragula.hbs

This file was deleted.

Loading

0 comments on commit 05e2cac

Please sign in to comment.