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.1 to 1.3.2

4

dist/src/sortablejs.directive.d.ts
import { ElementRef, OnInit, OnChanges, OnDestroy, NgZone, SimpleChanges } from '@angular/core';
import { FormArray } from '@angular/forms';
import { SortablejsOptions } from './sortablejs-options';

@@ -7,3 +6,3 @@ export declare class SortablejsDirective implements OnInit, OnChanges, OnDestroy {

private zone;
items: any[] | FormArray;
items: any[] | any;
inputOptions: SortablejsOptions;

@@ -19,3 +18,4 @@ private _sortable;

private readonly bindingEnabled;
private readonly isItemsFormArray;
private readonly overridenOptions;
}
"use strict";
var core_1 = require('@angular/core');
var forms_1 = require('@angular/forms');
var sortablejs_module_1 = require('./sortablejs.module');

@@ -67,2 +66,12 @@ // Sortable

});
Object.defineProperty(SortablejsDirective.prototype, "isItemsFormArray", {
// we need this to identify that the input is a FormArray
// we don't want to have a dependency on @angular/forms just for that
get: function () {
// just checking for random FormArray methods not available on a standard array
return !!this.items.at && !!this.items.insert && !!this.items.reset;
},
enumerable: true,
configurable: true
});
Object.defineProperty(SortablejsDirective.prototype, "overridenOptions", {

@@ -77,3 +86,3 @@ get: function () {

onremove = function (item) {
if (_this.items instanceof forms_1.FormArray) {
if (_this.isItemsFormArray) {
_this.items.insert(event.newIndex, item);

@@ -91,3 +100,3 @@ }

var item = void 0;
if (_this.items instanceof forms_1.FormArray) {
if (_this.isItemsFormArray) {
item = _this.items.at(event.oldIndex);

@@ -106,3 +115,3 @@ _this.items.removeAt(event.oldIndex);

if (_this.bindingEnabled) {
if (_this.items instanceof forms_1.FormArray) {
if (_this.isItemsFormArray) {
var relocated = _this.items.at(event.oldIndex);

@@ -109,0 +118,0 @@ _this.items.removeAt(event.oldIndex);

{
"name": "angular-sortablejs",
"version": "1.3.1",
"version": "1.3.2",
"description": "SortableJS for Angular 2+",

@@ -37,7 +37,6 @@ "main": "./dist/index.js",

"dependencies": {
"@angular/core": "^2.0.0",
"@angular/forms": "^2.0.0",
"sortablejs": "^1.4.2"
},
"devDependencies": {
"@angular/core": "^2.0.0",
"@angular/compiler": "^2.1.0",

@@ -55,2 +54,5 @@ "@angular/compiler-cli": "^2.1.0",

},
"peerDependencies": {
"@angular/core": "^2.0.0"
},
"files": [

@@ -57,0 +59,0 @@ "dist/"

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