All notable changes to this project will be documented in this file. See Conventional Commits for commit guidelines.
2.1.3 (2019-01-13)
Note: Version bump only for package ng2-dragula
2.1.2 (2019-01-12)
Note: Version bump only for package ng2-dragula
2.1.1 (2018-11-01)
2.1.0 (2018-09-06)
- include sourceIndex and targetIndex in model events (ea5fb03)
2.0.4 (2018-08-31)
- package: make NPMJS.com readme link to GH (c0e7b1b)
2.0.3 (2018-08-31)
2.0.2 (2018-07-25)
- directive should only emit, not save on removeModel (59783f0)
- was doubling up on writes to drake.models, causing sometimes wrong model order (f1b26cd), closes #878
2.0.1 (2018-07-20)
- types: '@types/dragula' was a devDependency, not present in published version, closes #876 (eaef778)
2.0.0 (2018-07-19)
Version 2.0.0 is big. It has lots of breaking API changes are bundled into one release. (Thankfully, it also gains a hefty test suite.) Rather than reading all the changes here, maybe check out the V2 migration guide.
@types/dragula
DragulaOptions.copy only taking boolean (ec282c0)- build with Angular Package Format via ng-packagr (c362bd8)
- DragulaService.handleModels called twice (intro'd by c5b1d40) (d4df88c)
- dropModel event not ever firing if models is initially null/undefined. fix #307 (c5b1d40)
- export EventTypes, document MockDrake much more (10249ab)
- memory leaks and containers/dragulaModels hanging around in drakes after destroy or setting null (2d2c890), closes #794 #852 #784
- Mismatch of on remove parameter values. Thanks @Thanatos-elNyx, fix #842 and #855 (7cb1889)
- more types on DragulaService (927cad5)
- redo confusing DragulaService methods (setOptions => createGroup) (f50d37a)
- remove [dragulaOptions] (d2886c3)
- fix target.removeChild(dropElm). (766285a), closes #596
- Custom copyItem to clone model objects (78f3f9f)
- DragulaModule.forRoot(), with plain DragulaModule on child NgModules. (b739f9b), closes #805 #187
- dropModel and removeModel get item, sourceModel/targetModel props (572c1ba)
- enable two-way binding of [(dragulaModel)] (53f8d41)
- new strongly typed events API with type (aka 'bag') filtering (6339fc4)
- Requires Angular 6. This is because of the Angular Package Format changes, and also RxJS 6's breaking changes.
- Requires RxJS 6. If you are still using Angular 5, which
requires RxJs 5, and you can't upgrade yet (even though the CLI upgrade
tools are excellent), you might be able to use
rxjs@5.6.0-forward-compat.5
. This has not been tested. - Requires importing
DragulaModule.forRoot()
in your root NgModule, and plain DragulaModule in child modules. This is so you can break your app into lazy loaded modules and not experience problems with having more than 1 DragulaService.
dragulaModel
no longer modifies arrays internally. You have to use[(dragulaModel)]="myModel"
if you want to save the changes the library makes. In most cases, this will be an easy change. However, if you were relying on the arrays being modified directly, that will no longer work.- Removes
[dragulaOptions]
from the directive. It is not a neater API (still have to import DragulaOptions, why not just import DragulaService), and it is misleading (changing the object does not get reflected merely because it uses Angular binding; you can't change options once set).
- All the events available on DragulaService are now functions
with an optional
groupName?: string
argument that narrows the stream down to events from drags of a particular group. (Groups are formerly known as 'bags'). E.g:this.dragulaService.drag("DOG").subscribe(...)
. - DragulaService events are now proper Observables, not EventEmitters.
- DragulaService events no longer output arrays directly from Dragula.js;
they are now strongly typed objects.
You can migrate by just swapping square braces for curly ones, if you
used the same names:
.subscribe(([el, source]) => {})
becomes.subscribe(({el, source}) => {})
DragulaService.add
now takes aGroup
. You probably don't want to use it.DragulaService.setOptions
is now calledcreateGroup
. This is much clearer. It was not obvious that setOptions actually created groups before; it was even less obvious that you couldn't call it again later to change behaviour.- If you are using
copy
with[dragulaModel]
, you must now provide your owncopyItem
function. The old one wasJSON.parse(JSON.stringify(x))
, which was terrible.
1.5.0 (2017-05-21)
1.3.1 (2017-04-10)
- package: relaxed peer dependencies to allow ng v4 (94f5e2b)
1.3.0 (2017-01-17)
- demo: make AoT compatible (8667689)
- package: v1.3.0 upgrade to ng v2.3+ (b8ce361)
1.2.2 (2016-12-16)
1.2.2-0 (2016-10-19)
1.2.1 (2016-09-21)
- ng2: Update to angular2 final (#414) (1f872dd)
- package: update dragula tp 3.7.2 (#405) (99b3808), closes #404
1.2.0 (2016-09-07)
- demo: the error in the demo move
}
to the bottom(#329) (c20e699) - demo: update ngFor syntax (e3c870a)
- package: added main entry point to package.json (#319) (a53bf7b)
- package: upgrade to angular 2.0.0-rc.2 (#299) (e275b99)
1.1.10 (2016-06-06)
1.1.9 (2016-05-13)
- publish: enabled .d.ts files generation (a7366c8)
1.1.8 (2016-05-13)
- publish: ng2-dragula publish flow fixed (61a6bec)
1.1.7 (2016-05-12)
- dragula: compatible with webpack and other loaders. no more window.dragula (e6830ca)
- dragula: use require. also update to beta.6 (b0a9ca3)
- dragula: using typings and removed require usage (feaf945)
- dragulaModel: model sync works properly now (326d198)
- removeModel: issue with callback (c19c676)
- require: removing require (b033e85)
- require: removing usage of require (0f7ee40)