Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

angular-sortablejs

Package Overview
Dependencies
Maintainers
2
Versions
45
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

angular-sortablejs - npm Package Compare versions

Comparing version 1.3.2 to 2.0.0-0

dist/src/sortablejs-options.metadata.json

6

dist/index.js

@@ -1,6 +0,2 @@

"use strict";
function __export(m) {
for (var p in m) if (!exports.hasOwnProperty(p)) exports[p] = m[p];
}
__export(require('./src/sortablejs.module'));
export * from './src/sortablejs.module';
//# sourceMappingURL=index.js.map

@@ -1,2 +0,1 @@

"use strict";
//# sourceMappingURL=sortablejs-options.js.map

@@ -9,2 +9,3 @@ import { ElementRef, OnInit, OnChanges, OnDestroy, NgZone, SimpleChanges } from '@angular/core';

private _sortable;
private onremove;
runInsideAngular: boolean;

@@ -11,0 +12,0 @@ constructor(element: ElementRef, zone: NgZone);

@@ -1,12 +0,4 @@

"use strict";
var core_1 = require('@angular/core');
var sortablejs_module_1 = require('./sortablejs.module');
// Sortable
var Sortable = require('sortablejs');
// original library calls the events in unnatural order
// first the item is added, then removed from the previous array
// this is a temporary event to work this around
// as long as only one sortable takes place at a certain time
// this is enough to have a single `global` event
var onremove;
import { Directive, ElementRef, Input, NgZone } from '@angular/core';
import { SortablejsModule } from './sortablejs.module';
import * as Sortable from 'sortablejs/Sortable.min';
var SortablejsDirective = (function () {

@@ -48,3 +40,3 @@ function SortablejsDirective(element, zone) {

get: function () {
return Object.assign({}, sortablejs_module_1.SortablejsModule._globalOptions, this.inputOptions, this.overridenOptions);
return Object.assign({}, SortablejsModule._globalOptions, this.inputOptions, this.overridenOptions);
},

@@ -85,3 +77,3 @@ enumerable: true,

if (_this.bindingEnabled) {
onremove = function (item) {
_this.onremove = function (item) {
if (_this.isItemsFormArray) {

@@ -107,4 +99,4 @@ _this.items.insert(event.newIndex, item);

}
onremove(item);
onremove = null;
_this.onremove(item);
_this.onremove = null;
}

@@ -131,20 +123,20 @@ _this.proxyEvent('onRemove', event);

});
SortablejsDirective.decorators = [
{ type: core_1.Directive, args: [{
selector: '[sortablejs]'
},] },
];
/** @nocollapse */
SortablejsDirective.ctorParameters = function () { return [
{ type: core_1.ElementRef, },
{ type: core_1.NgZone, },
]; };
SortablejsDirective.propDecorators = {
'items': [{ type: core_1.Input, args: ['sortablejs',] },],
'inputOptions': [{ type: core_1.Input, args: ['sortablejsOptions',] },],
'runInsideAngular': [{ type: core_1.Input },],
};
return SortablejsDirective;
}());
exports.SortablejsDirective = SortablejsDirective;
export { SortablejsDirective };
SortablejsDirective.decorators = [
{ type: Directive, args: [{
selector: '[sortablejs]'
},] },
];
/** @nocollapse */
SortablejsDirective.ctorParameters = function () { return [
{ type: ElementRef, },
{ type: NgZone, },
]; };
SortablejsDirective.propDecorators = {
'items': [{ type: Input, args: ['sortablejs',] },],
'inputOptions': [{ type: Input, args: ['sortablejsOptions',] },],
'runInsideAngular': [{ type: Input },],
};
//# sourceMappingURL=sortablejs.directive.js.map

@@ -1,4 +0,3 @@

"use strict";
var core_1 = require('@angular/core');
var sortablejs_directive_1 = require('./sortablejs.directive');
import { NgModule } from '@angular/core';
import { SortablejsDirective } from './sortablejs.directive';
var SortablejsModule = (function () {

@@ -11,14 +10,14 @@ function SortablejsModule() {

};
SortablejsModule._globalOptions = {};
SortablejsModule.decorators = [
{ type: core_1.NgModule, args: [{
declarations: [sortablejs_directive_1.SortablejsDirective],
exports: [sortablejs_directive_1.SortablejsDirective]
},] },
];
/** @nocollapse */
SortablejsModule.ctorParameters = function () { return []; };
return SortablejsModule;
}());
exports.SortablejsModule = SortablejsModule;
export { SortablejsModule };
SortablejsModule._globalOptions = {};
SortablejsModule.decorators = [
{ type: NgModule, args: [{
declarations: [SortablejsDirective],
exports: [SortablejsDirective]
},] },
];
/** @nocollapse */
SortablejsModule.ctorParameters = function () { return []; };
//# sourceMappingURL=sortablejs.module.js.map
{
"name": "angular-sortablejs",
"version": "1.3.2",
"description": "SortableJS for Angular 2+",
"version": "2.0.0-0",
"description": "SortableJS for Angular",
"main": "./dist/index.js",

@@ -36,21 +36,19 @@ "typings": "./dist/index",

"homepage": "https://github.com/SortableJS/angular-sortablejs#readme",
"dependencies": {
"sortablejs": "^1.4.2"
},
"devDependencies": {
"@angular/core": "^2.0.0",
"@angular/compiler": "^2.1.0",
"@angular/compiler-cli": "^2.1.0",
"@types/core-js": "^0.9.32",
"@types/node": "^6.0.38",
"@types/sortablejs": "^1.3.29",
"@types/systemjs": "^0.19.30",
"git-validate": "^2.1.4",
"rimraf": "^2.5.2",
"rxjs": "^5.0.2",
"tslint": "^3.13.0",
"typescript": "2.0.3"
"sortablejs": "^1.5.1",
"@angular/compiler": "4.0.1",
"@angular/compiler-cli": "4.0.1",
"@angular/core": "4.0.1",
"@types/node": "7.0.12",
"@types/sortablejs": "1.3.31",
"@types/systemjs": "0.20.2",
"git-validate": "2.2.2",
"rimraf": "2.6.1",
"rxjs": "5.3.0",
"tslint": "5.0.0",
"typescript": "2.2.2"
},
"peerDependencies": {
"@angular/core": "^2.0.0"
"sortablejs": "^1.5.1",
"@angular/core": "^4.0.0"
},

@@ -57,0 +55,0 @@ "files": [

@@ -7,6 +7,14 @@ # angular-sortablejs

Angular 4.x
```sh
npm install --save angular-sortablejs
npm install --save sortablejs && npm install --save angular-sortablejs
```
Angular 2.x: sortablejs is included (changed in 2.0.0)
```sh
npm install --save angular-sortablejs@1.3.1
```
### Webpack configuration

@@ -21,16 +29,16 @@

```javascript
...
// ...
var map = {
...
'angular-sortablejs': 'node_modules/angular-sortablejs',
// ...
'angular-sortablejs': 'node_modules/angular-sortablejs/dist/',
'sortablejs': 'node_modules/sortablejs/Sortable.js',
...
// ...
};
...
// ...
var packages = {
...
// ...
'angular-sortablejs': { main: 'index.js', defaultExtension: 'js' },
...
// ...
};
...
// ...
var config = {

@@ -52,5 +60,5 @@ map: map,

imports: [
...
// ...
SortablejsModule,
...
// ...
]

@@ -163,4 +171,4 @@ ```

By default, the boolean parameter **runInsideAngular** is set to **false**.
This means that the initial binding of all mouse events of the component will be set so that they **will not** trigger Angular's change detection.
By default, the boolean parameter **runInsideAngular** is set to **false**.
This means that the initial binding of all mouse events of the component will be set so that they **will not** trigger Angular's change detection.

@@ -175,3 +183,3 @@ If this parameter is set to true, then for large components - with a lot of data bindings - the UI will function in a staggered and lagging way (mainly when dragging items), while every event will trigger the change detection (which might be needed in some special edge cases).

imports: [
...
// ...
// any properties and events available on original library work here as well

@@ -181,3 +189,3 @@ SortablejsModule.forRoot({

}),
...
// ...
]

@@ -184,0 +192,0 @@ ```

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc