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

angular-gridster2

Package Overview
Dependencies
Maintainers
1
Versions
245
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

angular-gridster2 - npm Package Compare versions

Comparing version 2.4.15 to 2.4.16

5

dist/gridster.component.d.ts

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

import { OnInit, ElementRef, OnDestroy, Renderer, ChangeDetectorRef } from '@angular/core';
import { OnInit, ElementRef, OnDestroy, Renderer, ChangeDetectorRef, OnChanges, SimpleChanges } from '@angular/core';
import { GridsterConfig } from './gridsterConfig.interface';

@@ -9,3 +9,3 @@ import { GridsterItemComponent } from './gridsterItem.component';

import { GridsterItemS } from './gridsterItemS.interface';
export declare class GridsterComponent implements OnInit, OnDestroy {
export declare class GridsterComponent implements OnInit, OnChanges, OnDestroy {
renderer: Renderer;

@@ -35,2 +35,3 @@ cdRef: ChangeDetectorRef;

ngOnInit(): void;
ngOnChanges(changes: SimpleChanges): void;
resize(): void;

@@ -37,0 +38,0 @@ setOptions(): void;

@@ -67,2 +67,7 @@ "use strict";

};
GridsterComponent.prototype.ngOnChanges = function (changes) {
if (changes.options) {
this.ngOnInit();
}
};
GridsterComponent.prototype.resize = function () {

@@ -69,0 +74,0 @@ var height;

2

dist/gridster.component.metadata.json

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

[{"__symbolic":"module","version":3,"metadata":{"GridsterComponent":{"__symbolic":"class","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Component"},"arguments":[{"selector":"gridster","template":"<gridster-grid class=\"gridster-grid\"></gridster-grid> <ng-content></ng-content> <gridster-preview class=\"gridster-preview\"></gridster-preview>","styles":[":host { position: relative; display: flex; overflow: auto; flex: 1 auto; background: grey; width: 100%; height: 100%; } :host(.fit) { overflow-x: hidden; overflow-y: hidden; } :host(.scrollVertical) { overflow-x: hidden; overflow-y: auto; } :host(.scrollHorizontal) { overflow-x: auto; overflow-y: hidden; } :host(.fixed) { overflow: auto; } :host(.mobile) { overflow-x: hidden; overflow-y: auto; display: block; } :host(.mobile) ::ng-deep gridster-item { position: relative; }"]}]}],"members":{"options":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input"}}]}],"__ctor__":[{"__symbolic":"constructor","parameters":[{"__symbolic":"reference","module":"@angular/core","name":"ElementRef"},{"__symbolic":"reference","module":"@angular/core","name":"Renderer"},{"__symbolic":"reference","module":"@angular/core","name":"ChangeDetectorRef"}]}],"ngOnInit":[{"__symbolic":"method"}],"resize":[{"__symbolic":"method"}],"setOptions":[{"__symbolic":"method"}],"optionsChanged":[{"__symbolic":"method"}],"ngOnDestroy":[{"__symbolic":"method"}],"onResize":[{"__symbolic":"method"}],"checkIfToResize":[{"__symbolic":"method"}],"setGridSize":[{"__symbolic":"method"}],"setGridDimensions":[{"__symbolic":"method"}],"calculateLayout":[{"__symbolic":"method"}],"addItem":[{"__symbolic":"method"}],"removeItem":[{"__symbolic":"method"}],"checkCollision":[{"__symbolic":"method"}],"checkGridCollision":[{"__symbolic":"method"}],"findItemWithItem":[{"__symbolic":"method"}],"findItemsWithItem":[{"__symbolic":"method"}],"autoPositionItem":[{"__symbolic":"method"}],"getNextPossiblePosition":[{"__symbolic":"method"}],"pixelsToPosition":[{"__symbolic":"method"}],"pixelsToPositionX":[{"__symbolic":"method"}],"pixelsToPositionY":[{"__symbolic":"method"}],"positionXToPixels":[{"__symbolic":"method"}],"positionYToPixels":[{"__symbolic":"method"}]},"statics":{"checkCollisionTwoItems":{"__symbolic":"function","parameters":["item","item2"],"value":{"__symbolic":"binop","operator":"&&","left":{"__symbolic":"binop","operator":"&&","left":{"__symbolic":"binop","operator":"&&","left":{"__symbolic":"binop","operator":"<","left":{"__symbolic":"select","expression":{"__symbolic":"reference","name":"item"},"member":"x"},"right":{"__symbolic":"binop","operator":"+","left":{"__symbolic":"select","expression":{"__symbolic":"reference","name":"item2"},"member":"x"},"right":{"__symbolic":"select","expression":{"__symbolic":"reference","name":"item2"},"member":"cols"}}},"right":{"__symbolic":"binop","operator":">","left":{"__symbolic":"binop","operator":"+","left":{"__symbolic":"select","expression":{"__symbolic":"reference","name":"item"},"member":"x"},"right":{"__symbolic":"select","expression":{"__symbolic":"reference","name":"item"},"member":"cols"}},"right":{"__symbolic":"select","expression":{"__symbolic":"reference","name":"item2"},"member":"x"}}},"right":{"__symbolic":"binop","operator":"<","left":{"__symbolic":"select","expression":{"__symbolic":"reference","name":"item"},"member":"y"},"right":{"__symbolic":"binop","operator":"+","left":{"__symbolic":"select","expression":{"__symbolic":"reference","name":"item2"},"member":"y"},"right":{"__symbolic":"select","expression":{"__symbolic":"reference","name":"item2"},"member":"rows"}}}},"right":{"__symbolic":"binop","operator":">","left":{"__symbolic":"binop","operator":"+","left":{"__symbolic":"select","expression":{"__symbolic":"reference","name":"item"},"member":"y"},"right":{"__symbolic":"select","expression":{"__symbolic":"reference","name":"item"},"member":"rows"}},"right":{"__symbolic":"select","expression":{"__symbolic":"reference","name":"item2"},"member":"y"}}}}}}}},{"__symbolic":"module","version":1,"metadata":{"GridsterComponent":{"__symbolic":"class","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Component"},"arguments":[{"selector":"gridster","template":"<gridster-grid class=\"gridster-grid\"></gridster-grid> <ng-content></ng-content> <gridster-preview class=\"gridster-preview\"></gridster-preview>","styles":[":host { position: relative; display: flex; overflow: auto; flex: 1 auto; background: grey; width: 100%; height: 100%; } :host(.fit) { overflow-x: hidden; overflow-y: hidden; } :host(.scrollVertical) { overflow-x: hidden; overflow-y: auto; } :host(.scrollHorizontal) { overflow-x: auto; overflow-y: hidden; } :host(.fixed) { overflow: auto; } :host(.mobile) { overflow-x: hidden; overflow-y: auto; display: block; } :host(.mobile) ::ng-deep gridster-item { position: relative; }"]}]}],"members":{"options":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input"}}]}],"__ctor__":[{"__symbolic":"constructor","parameters":[{"__symbolic":"reference","module":"@angular/core","name":"ElementRef"},{"__symbolic":"reference","module":"@angular/core","name":"Renderer"},{"__symbolic":"reference","module":"@angular/core","name":"ChangeDetectorRef"}]}],"ngOnInit":[{"__symbolic":"method"}],"resize":[{"__symbolic":"method"}],"setOptions":[{"__symbolic":"method"}],"optionsChanged":[{"__symbolic":"method"}],"ngOnDestroy":[{"__symbolic":"method"}],"onResize":[{"__symbolic":"method"}],"checkIfToResize":[{"__symbolic":"method"}],"setGridSize":[{"__symbolic":"method"}],"setGridDimensions":[{"__symbolic":"method"}],"calculateLayout":[{"__symbolic":"method"}],"addItem":[{"__symbolic":"method"}],"removeItem":[{"__symbolic":"method"}],"checkCollision":[{"__symbolic":"method"}],"checkGridCollision":[{"__symbolic":"method"}],"findItemWithItem":[{"__symbolic":"method"}],"findItemsWithItem":[{"__symbolic":"method"}],"autoPositionItem":[{"__symbolic":"method"}],"getNextPossiblePosition":[{"__symbolic":"method"}],"pixelsToPosition":[{"__symbolic":"method"}],"pixelsToPositionX":[{"__symbolic":"method"}],"pixelsToPositionY":[{"__symbolic":"method"}],"positionXToPixels":[{"__symbolic":"method"}],"positionYToPixels":[{"__symbolic":"method"}]},"statics":{"checkCollisionTwoItems":{"__symbolic":"function","parameters":["item","item2"],"value":{"__symbolic":"binop","operator":"&&","left":{"__symbolic":"binop","operator":"&&","left":{"__symbolic":"binop","operator":"&&","left":{"__symbolic":"binop","operator":"<","left":{"__symbolic":"select","expression":{"__symbolic":"reference","name":"item"},"member":"x"},"right":{"__symbolic":"binop","operator":"+","left":{"__symbolic":"select","expression":{"__symbolic":"reference","name":"item2"},"member":"x"},"right":{"__symbolic":"select","expression":{"__symbolic":"reference","name":"item2"},"member":"cols"}}},"right":{"__symbolic":"binop","operator":">","left":{"__symbolic":"binop","operator":"+","left":{"__symbolic":"select","expression":{"__symbolic":"reference","name":"item"},"member":"x"},"right":{"__symbolic":"select","expression":{"__symbolic":"reference","name":"item"},"member":"cols"}},"right":{"__symbolic":"select","expression":{"__symbolic":"reference","name":"item2"},"member":"x"}}},"right":{"__symbolic":"binop","operator":"<","left":{"__symbolic":"select","expression":{"__symbolic":"reference","name":"item"},"member":"y"},"right":{"__symbolic":"binop","operator":"+","left":{"__symbolic":"select","expression":{"__symbolic":"reference","name":"item2"},"member":"y"},"right":{"__symbolic":"select","expression":{"__symbolic":"reference","name":"item2"},"member":"rows"}}}},"right":{"__symbolic":"binop","operator":">","left":{"__symbolic":"binop","operator":"+","left":{"__symbolic":"select","expression":{"__symbolic":"reference","name":"item"},"member":"y"},"right":{"__symbolic":"select","expression":{"__symbolic":"reference","name":"item"},"member":"rows"}},"right":{"__symbolic":"select","expression":{"__symbolic":"reference","name":"item2"},"member":"y"}}}}}}}}]
[{"__symbolic":"module","version":3,"metadata":{"GridsterComponent":{"__symbolic":"class","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Component"},"arguments":[{"selector":"gridster","template":"<gridster-grid class=\"gridster-grid\"></gridster-grid> <ng-content></ng-content> <gridster-preview class=\"gridster-preview\"></gridster-preview>","styles":[":host { position: relative; display: flex; overflow: auto; flex: 1 auto; background: grey; width: 100%; height: 100%; } :host(.fit) { overflow-x: hidden; overflow-y: hidden; } :host(.scrollVertical) { overflow-x: hidden; overflow-y: auto; } :host(.scrollHorizontal) { overflow-x: auto; overflow-y: hidden; } :host(.fixed) { overflow: auto; } :host(.mobile) { overflow-x: hidden; overflow-y: auto; display: block; } :host(.mobile) ::ng-deep gridster-item { position: relative; }"]}]}],"members":{"options":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input"}}]}],"__ctor__":[{"__symbolic":"constructor","parameters":[{"__symbolic":"reference","module":"@angular/core","name":"ElementRef"},{"__symbolic":"reference","module":"@angular/core","name":"Renderer"},{"__symbolic":"reference","module":"@angular/core","name":"ChangeDetectorRef"}]}],"ngOnInit":[{"__symbolic":"method"}],"ngOnChanges":[{"__symbolic":"method"}],"resize":[{"__symbolic":"method"}],"setOptions":[{"__symbolic":"method"}],"optionsChanged":[{"__symbolic":"method"}],"ngOnDestroy":[{"__symbolic":"method"}],"onResize":[{"__symbolic":"method"}],"checkIfToResize":[{"__symbolic":"method"}],"setGridSize":[{"__symbolic":"method"}],"setGridDimensions":[{"__symbolic":"method"}],"calculateLayout":[{"__symbolic":"method"}],"addItem":[{"__symbolic":"method"}],"removeItem":[{"__symbolic":"method"}],"checkCollision":[{"__symbolic":"method"}],"checkGridCollision":[{"__symbolic":"method"}],"findItemWithItem":[{"__symbolic":"method"}],"findItemsWithItem":[{"__symbolic":"method"}],"autoPositionItem":[{"__symbolic":"method"}],"getNextPossiblePosition":[{"__symbolic":"method"}],"pixelsToPosition":[{"__symbolic":"method"}],"pixelsToPositionX":[{"__symbolic":"method"}],"pixelsToPositionY":[{"__symbolic":"method"}],"positionXToPixels":[{"__symbolic":"method"}],"positionYToPixels":[{"__symbolic":"method"}]},"statics":{"checkCollisionTwoItems":{"__symbolic":"function","parameters":["item","item2"],"value":{"__symbolic":"binop","operator":"&&","left":{"__symbolic":"binop","operator":"&&","left":{"__symbolic":"binop","operator":"&&","left":{"__symbolic":"binop","operator":"<","left":{"__symbolic":"select","expression":{"__symbolic":"reference","name":"item"},"member":"x"},"right":{"__symbolic":"binop","operator":"+","left":{"__symbolic":"select","expression":{"__symbolic":"reference","name":"item2"},"member":"x"},"right":{"__symbolic":"select","expression":{"__symbolic":"reference","name":"item2"},"member":"cols"}}},"right":{"__symbolic":"binop","operator":">","left":{"__symbolic":"binop","operator":"+","left":{"__symbolic":"select","expression":{"__symbolic":"reference","name":"item"},"member":"x"},"right":{"__symbolic":"select","expression":{"__symbolic":"reference","name":"item"},"member":"cols"}},"right":{"__symbolic":"select","expression":{"__symbolic":"reference","name":"item2"},"member":"x"}}},"right":{"__symbolic":"binop","operator":"<","left":{"__symbolic":"select","expression":{"__symbolic":"reference","name":"item"},"member":"y"},"right":{"__symbolic":"binop","operator":"+","left":{"__symbolic":"select","expression":{"__symbolic":"reference","name":"item2"},"member":"y"},"right":{"__symbolic":"select","expression":{"__symbolic":"reference","name":"item2"},"member":"rows"}}}},"right":{"__symbolic":"binop","operator":">","left":{"__symbolic":"binop","operator":"+","left":{"__symbolic":"select","expression":{"__symbolic":"reference","name":"item"},"member":"y"},"right":{"__symbolic":"select","expression":{"__symbolic":"reference","name":"item"},"member":"rows"}},"right":{"__symbolic":"select","expression":{"__symbolic":"reference","name":"item2"},"member":"y"}}}}}}}},{"__symbolic":"module","version":1,"metadata":{"GridsterComponent":{"__symbolic":"class","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Component"},"arguments":[{"selector":"gridster","template":"<gridster-grid class=\"gridster-grid\"></gridster-grid> <ng-content></ng-content> <gridster-preview class=\"gridster-preview\"></gridster-preview>","styles":[":host { position: relative; display: flex; overflow: auto; flex: 1 auto; background: grey; width: 100%; height: 100%; } :host(.fit) { overflow-x: hidden; overflow-y: hidden; } :host(.scrollVertical) { overflow-x: hidden; overflow-y: auto; } :host(.scrollHorizontal) { overflow-x: auto; overflow-y: hidden; } :host(.fixed) { overflow: auto; } :host(.mobile) { overflow-x: hidden; overflow-y: auto; display: block; } :host(.mobile) ::ng-deep gridster-item { position: relative; }"]}]}],"members":{"options":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input"}}]}],"__ctor__":[{"__symbolic":"constructor","parameters":[{"__symbolic":"reference","module":"@angular/core","name":"ElementRef"},{"__symbolic":"reference","module":"@angular/core","name":"Renderer"},{"__symbolic":"reference","module":"@angular/core","name":"ChangeDetectorRef"}]}],"ngOnInit":[{"__symbolic":"method"}],"ngOnChanges":[{"__symbolic":"method"}],"resize":[{"__symbolic":"method"}],"setOptions":[{"__symbolic":"method"}],"optionsChanged":[{"__symbolic":"method"}],"ngOnDestroy":[{"__symbolic":"method"}],"onResize":[{"__symbolic":"method"}],"checkIfToResize":[{"__symbolic":"method"}],"setGridSize":[{"__symbolic":"method"}],"setGridDimensions":[{"__symbolic":"method"}],"calculateLayout":[{"__symbolic":"method"}],"addItem":[{"__symbolic":"method"}],"removeItem":[{"__symbolic":"method"}],"checkCollision":[{"__symbolic":"method"}],"checkGridCollision":[{"__symbolic":"method"}],"findItemWithItem":[{"__symbolic":"method"}],"findItemsWithItem":[{"__symbolic":"method"}],"autoPositionItem":[{"__symbolic":"method"}],"getNextPossiblePosition":[{"__symbolic":"method"}],"pixelsToPosition":[{"__symbolic":"method"}],"pixelsToPositionX":[{"__symbolic":"method"}],"pixelsToPositionY":[{"__symbolic":"method"}],"positionXToPixels":[{"__symbolic":"method"}],"positionYToPixels":[{"__symbolic":"method"}]},"statics":{"checkCollisionTwoItems":{"__symbolic":"function","parameters":["item","item2"],"value":{"__symbolic":"binop","operator":"&&","left":{"__symbolic":"binop","operator":"&&","left":{"__symbolic":"binop","operator":"&&","left":{"__symbolic":"binop","operator":"<","left":{"__symbolic":"select","expression":{"__symbolic":"reference","name":"item"},"member":"x"},"right":{"__symbolic":"binop","operator":"+","left":{"__symbolic":"select","expression":{"__symbolic":"reference","name":"item2"},"member":"x"},"right":{"__symbolic":"select","expression":{"__symbolic":"reference","name":"item2"},"member":"cols"}}},"right":{"__symbolic":"binop","operator":">","left":{"__symbolic":"binop","operator":"+","left":{"__symbolic":"select","expression":{"__symbolic":"reference","name":"item"},"member":"x"},"right":{"__symbolic":"select","expression":{"__symbolic":"reference","name":"item"},"member":"cols"}},"right":{"__symbolic":"select","expression":{"__symbolic":"reference","name":"item2"},"member":"x"}}},"right":{"__symbolic":"binop","operator":"<","left":{"__symbolic":"select","expression":{"__symbolic":"reference","name":"item"},"member":"y"},"right":{"__symbolic":"binop","operator":"+","left":{"__symbolic":"select","expression":{"__symbolic":"reference","name":"item2"},"member":"y"},"right":{"__symbolic":"select","expression":{"__symbolic":"reference","name":"item2"},"member":"rows"}}}},"right":{"__symbolic":"binop","operator":">","left":{"__symbolic":"binop","operator":"+","left":{"__symbolic":"select","expression":{"__symbolic":"reference","name":"item"},"member":"y"},"right":{"__symbolic":"select","expression":{"__symbolic":"reference","name":"item"},"member":"rows"}},"right":{"__symbolic":"select","expression":{"__symbolic":"reference","name":"item2"},"member":"y"}}}}}}}}]

@@ -63,4 +63,4 @@ "use strict";

this.gridster.previewStyle();
this.push = new gridsterPush_service_1.GridsterPush(this.gridsterItem, this.gridster);
this.swap = new gridsterSwap_service_1.GridsterSwap(this.gridsterItem, this.gridster);
this.push = new gridsterPush_service_1.GridsterPush(this.gridsterItem);
this.swap = new gridsterSwap_service_1.GridsterSwap(this.gridsterItem);
this.gridster.dragInProgress = true;

@@ -67,0 +67,0 @@ this.gridster.gridLines.updateGrid();

import { GridsterItemComponent } from './gridsterItem.component';
import { GridsterComponent } from './gridster.component';
export declare class GridsterPush {
fromSouth: string;
fromNorth: string;
fromEast: string;
fromWest: string;
private pushedItems;

@@ -12,10 +15,7 @@ private pushedItemsTemp;

private tryPattern;
fromSouth: string;
fromNorth: string;
fromEast: string;
fromWest: string;
constructor(gridsterItem: GridsterItemComponent, gridster: GridsterComponent);
pushItems(direction: string, disable: boolean): void;
constructor(gridsterItem: GridsterItemComponent);
pushItems(direction: string, disable?: boolean): void;
restoreItems(): void;
setPushedItems(): void;
checkPushBack(): void;
private push(gridsterItem, direction);

@@ -31,4 +31,3 @@ private trySouth(gridsterItemCollide, gridsterItem);

private removeFromPushed(i);
checkPushBack(): void;
private checkPushedItem(pushedItem, i);
}

@@ -14,5 +14,4 @@ "use strict";

var gridsterItem_component_1 = require("./gridsterItem.component");
var gridster_component_1 = require("./gridster.component");
var GridsterPush = (function () {
function GridsterPush(gridsterItem, gridster) {
function GridsterPush(gridsterItem) {
this.pushedItems = [];

@@ -23,3 +22,3 @@ this.pushedItemsTemp = [];

this.gridsterItem = gridsterItem;
this.gridster = gridster;
this.gridster = gridsterItem.gridster;
this.tryPattern = {

@@ -72,2 +71,14 @@ fromEast: [this.tryWest, this.trySouth, this.tryNorth, this.tryEast],

};
GridsterPush.prototype.checkPushBack = function () {
var i = this.pushedItems.length - 1;
var change = false;
for (; i > -1; i--) {
if (this.checkPushedItem(this.pushedItems[i], i)) {
change = true;
}
}
if (change) {
this.checkPushBack();
}
};
GridsterPush.prototype.push = function (gridsterItem, direction) {

@@ -215,14 +226,2 @@ if (this.count > 3000) {

};
GridsterPush.prototype.checkPushBack = function () {
var i = this.pushedItems.length - 1;
var change = false;
for (; i > -1; i--) {
if (this.checkPushedItem(this.pushedItems[i], i)) {
change = true;
}
}
if (change) {
this.checkPushBack();
}
};
GridsterPush.prototype.checkPushedItem = function (pushedItem, i) {

@@ -258,5 +257,5 @@ var path = this.pushedItemsPath[i];

core_1.Injectable(),
__metadata("design:paramtypes", [gridsterItem_component_1.GridsterItemComponent, gridster_component_1.GridsterComponent])
__metadata("design:paramtypes", [gridsterItem_component_1.GridsterItemComponent])
], GridsterPush);
exports.GridsterPush = GridsterPush;
//# sourceMappingURL=gridsterPush.service.js.map

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

[{"__symbolic":"module","version":3,"metadata":{"GridsterPush":{"__symbolic":"class","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Injectable"}}],"members":{"__ctor__":[{"__symbolic":"constructor","parameters":[{"__symbolic":"reference","module":"./gridsterItem.component","name":"GridsterItemComponent"},{"__symbolic":"reference","module":"./gridster.component","name":"GridsterComponent"}]}],"pushItems":[{"__symbolic":"method"}],"restoreItems":[{"__symbolic":"method"}],"setPushedItems":[{"__symbolic":"method"}],"push":[{"__symbolic":"method"}],"trySouth":[{"__symbolic":"method"}],"tryNorth":[{"__symbolic":"method"}],"tryEast":[{"__symbolic":"method"}],"tryWest":[{"__symbolic":"method"}],"addToTempPushed":[{"__symbolic":"method"}],"removeFromTempPushed":[{"__symbolic":"method"}],"checkInTempPushed":[{"__symbolic":"method"}],"addToPushed":[{"__symbolic":"method"}],"removeFromPushed":[{"__symbolic":"method"}],"checkPushBack":[{"__symbolic":"method"}],"checkPushedItem":[{"__symbolic":"method"}]}}}},{"__symbolic":"module","version":1,"metadata":{"GridsterPush":{"__symbolic":"class","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Injectable"}}],"members":{"__ctor__":[{"__symbolic":"constructor","parameters":[{"__symbolic":"reference","module":"./gridsterItem.component","name":"GridsterItemComponent"},{"__symbolic":"reference","module":"./gridster.component","name":"GridsterComponent"}]}],"pushItems":[{"__symbolic":"method"}],"restoreItems":[{"__symbolic":"method"}],"setPushedItems":[{"__symbolic":"method"}],"push":[{"__symbolic":"method"}],"trySouth":[{"__symbolic":"method"}],"tryNorth":[{"__symbolic":"method"}],"tryEast":[{"__symbolic":"method"}],"tryWest":[{"__symbolic":"method"}],"addToTempPushed":[{"__symbolic":"method"}],"removeFromTempPushed":[{"__symbolic":"method"}],"checkInTempPushed":[{"__symbolic":"method"}],"addToPushed":[{"__symbolic":"method"}],"removeFromPushed":[{"__symbolic":"method"}],"checkPushBack":[{"__symbolic":"method"}],"checkPushedItem":[{"__symbolic":"method"}]}}}}]
[{"__symbolic":"module","version":3,"metadata":{"GridsterPush":{"__symbolic":"class","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Injectable"}}],"members":{"__ctor__":[{"__symbolic":"constructor","parameters":[{"__symbolic":"reference","module":"./gridsterItem.component","name":"GridsterItemComponent"}]}],"pushItems":[{"__symbolic":"method"}],"restoreItems":[{"__symbolic":"method"}],"setPushedItems":[{"__symbolic":"method"}],"checkPushBack":[{"__symbolic":"method"}],"push":[{"__symbolic":"method"}],"trySouth":[{"__symbolic":"method"}],"tryNorth":[{"__symbolic":"method"}],"tryEast":[{"__symbolic":"method"}],"tryWest":[{"__symbolic":"method"}],"addToTempPushed":[{"__symbolic":"method"}],"removeFromTempPushed":[{"__symbolic":"method"}],"checkInTempPushed":[{"__symbolic":"method"}],"addToPushed":[{"__symbolic":"method"}],"removeFromPushed":[{"__symbolic":"method"}],"checkPushedItem":[{"__symbolic":"method"}]}}}},{"__symbolic":"module","version":1,"metadata":{"GridsterPush":{"__symbolic":"class","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Injectable"}}],"members":{"__ctor__":[{"__symbolic":"constructor","parameters":[{"__symbolic":"reference","module":"./gridsterItem.component","name":"GridsterItemComponent"}]}],"pushItems":[{"__symbolic":"method"}],"restoreItems":[{"__symbolic":"method"}],"setPushedItems":[{"__symbolic":"method"}],"checkPushBack":[{"__symbolic":"method"}],"push":[{"__symbolic":"method"}],"trySouth":[{"__symbolic":"method"}],"tryNorth":[{"__symbolic":"method"}],"tryEast":[{"__symbolic":"method"}],"tryWest":[{"__symbolic":"method"}],"addToTempPushed":[{"__symbolic":"method"}],"removeFromTempPushed":[{"__symbolic":"method"}],"checkInTempPushed":[{"__symbolic":"method"}],"addToPushed":[{"__symbolic":"method"}],"removeFromPushed":[{"__symbolic":"method"}],"checkPushedItem":[{"__symbolic":"method"}]}}}}]
import { GridsterItemComponent } from './gridsterItem.component';
import { GridsterComponent } from './gridster.component';
export declare class GridsterPushResize {
fromSouth: string;
fromNorth: string;
fromEast: string;
fromWest: string;
private pushedItems;

@@ -9,10 +12,7 @@ private pushedItemsPath;

private tryPattern;
fromSouth: string;
fromNorth: string;
fromEast: string;
fromWest: string;
constructor(gridsterItem: GridsterItemComponent, gridster: GridsterComponent);
constructor(gridsterItem: GridsterItemComponent);
pushItems(direction: any): void;
restoreItems(): void;
setPushedItems(): void;
checkPushBack(): void;
private push(gridsterItem, direction);

@@ -25,4 +25,3 @@ private trySouth(gridsterItemCollide, gridsterItem, direction);

private removeFromPushed(i);
checkPushBack(): void;
private checkPushedItem(pushedItem, i);
}

@@ -16,7 +16,7 @@ "use strict";

var GridsterPushResize = (function () {
function GridsterPushResize(gridsterItem, gridster) {
function GridsterPushResize(gridsterItem) {
this.pushedItems = [];
this.pushedItemsPath = [];
this.gridsterItem = gridsterItem;
this.gridster = gridster;
this.gridster = gridsterItem.gridster;
this.tryPattern = {

@@ -64,2 +64,14 @@ fromEast: this.tryWest,

};
GridsterPushResize.prototype.checkPushBack = function () {
var i = this.pushedItems.length - 1;
var change = false;
for (; i > -1; i--) {
if (this.checkPushedItem(this.pushedItems[i], i)) {
change = true;
}
}
if (change) {
this.checkPushBack();
}
};
GridsterPushResize.prototype.push = function (gridsterItem, direction) {

@@ -178,14 +190,2 @@ var gridsterItemCollision = this.gridster.checkCollision(gridsterItem.$item);

};
GridsterPushResize.prototype.checkPushBack = function () {
var i = this.pushedItems.length - 1;
var change = false;
for (; i > -1; i--) {
if (this.checkPushedItem(this.pushedItems[i], i)) {
change = true;
}
}
if (change) {
this.checkPushBack();
}
};
GridsterPushResize.prototype.checkPushedItem = function (pushedItem, i) {

@@ -226,5 +226,5 @@ var path = this.pushedItemsPath[i];

core_1.Injectable(),
__metadata("design:paramtypes", [gridsterItem_component_1.GridsterItemComponent, gridster_component_1.GridsterComponent])
__metadata("design:paramtypes", [gridsterItem_component_1.GridsterItemComponent])
], GridsterPushResize);
exports.GridsterPushResize = GridsterPushResize;
//# sourceMappingURL=gridsterPushResize.service.js.map

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

[{"__symbolic":"module","version":3,"metadata":{"GridsterPushResize":{"__symbolic":"class","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Injectable"}}],"members":{"__ctor__":[{"__symbolic":"constructor","parameters":[{"__symbolic":"reference","module":"./gridsterItem.component","name":"GridsterItemComponent"},{"__symbolic":"reference","module":"./gridster.component","name":"GridsterComponent"}]}],"pushItems":[{"__symbolic":"method"}],"restoreItems":[{"__symbolic":"method"}],"setPushedItems":[{"__symbolic":"method"}],"push":[{"__symbolic":"method"}],"trySouth":[{"__symbolic":"method"}],"tryNorth":[{"__symbolic":"method"}],"tryEast":[{"__symbolic":"method"}],"tryWest":[{"__symbolic":"method"}],"addToPushed":[{"__symbolic":"method"}],"removeFromPushed":[{"__symbolic":"method"}],"checkPushBack":[{"__symbolic":"method"}],"checkPushedItem":[{"__symbolic":"method"}]}}}},{"__symbolic":"module","version":1,"metadata":{"GridsterPushResize":{"__symbolic":"class","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Injectable"}}],"members":{"__ctor__":[{"__symbolic":"constructor","parameters":[{"__symbolic":"reference","module":"./gridsterItem.component","name":"GridsterItemComponent"},{"__symbolic":"reference","module":"./gridster.component","name":"GridsterComponent"}]}],"pushItems":[{"__symbolic":"method"}],"restoreItems":[{"__symbolic":"method"}],"setPushedItems":[{"__symbolic":"method"}],"push":[{"__symbolic":"method"}],"trySouth":[{"__symbolic":"method"}],"tryNorth":[{"__symbolic":"method"}],"tryEast":[{"__symbolic":"method"}],"tryWest":[{"__symbolic":"method"}],"addToPushed":[{"__symbolic":"method"}],"removeFromPushed":[{"__symbolic":"method"}],"checkPushBack":[{"__symbolic":"method"}],"checkPushedItem":[{"__symbolic":"method"}]}}}}]
[{"__symbolic":"module","version":3,"metadata":{"GridsterPushResize":{"__symbolic":"class","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Injectable"}}],"members":{"__ctor__":[{"__symbolic":"constructor","parameters":[{"__symbolic":"reference","module":"./gridsterItem.component","name":"GridsterItemComponent"}]}],"pushItems":[{"__symbolic":"method"}],"restoreItems":[{"__symbolic":"method"}],"setPushedItems":[{"__symbolic":"method"}],"checkPushBack":[{"__symbolic":"method"}],"push":[{"__symbolic":"method"}],"trySouth":[{"__symbolic":"method"}],"tryNorth":[{"__symbolic":"method"}],"tryEast":[{"__symbolic":"method"}],"tryWest":[{"__symbolic":"method"}],"addToPushed":[{"__symbolic":"method"}],"removeFromPushed":[{"__symbolic":"method"}],"checkPushedItem":[{"__symbolic":"method"}]}}}},{"__symbolic":"module","version":1,"metadata":{"GridsterPushResize":{"__symbolic":"class","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Injectable"}}],"members":{"__ctor__":[{"__symbolic":"constructor","parameters":[{"__symbolic":"reference","module":"./gridsterItem.component","name":"GridsterItemComponent"}]}],"pushItems":[{"__symbolic":"method"}],"restoreItems":[{"__symbolic":"method"}],"setPushedItems":[{"__symbolic":"method"}],"checkPushBack":[{"__symbolic":"method"}],"push":[{"__symbolic":"method"}],"trySouth":[{"__symbolic":"method"}],"tryNorth":[{"__symbolic":"method"}],"tryEast":[{"__symbolic":"method"}],"tryWest":[{"__symbolic":"method"}],"addToPushed":[{"__symbolic":"method"}],"removeFromPushed":[{"__symbolic":"method"}],"checkPushedItem":[{"__symbolic":"method"}]}}}}]

@@ -74,4 +74,4 @@ "use strict";

this.gridster.previewStyle();
this.push = new gridsterPush_service_1.GridsterPush(this.gridsterItem, this.gridster);
this.pushResize = new gridsterPushResize_service_1.GridsterPushResize(this.gridsterItem, this.gridster);
this.push = new gridsterPush_service_1.GridsterPush(this.gridsterItem);
this.pushResize = new gridsterPushResize_service_1.GridsterPushResize(this.gridsterItem);
this.gridster.dragInProgress = true;

@@ -78,0 +78,0 @@ this.gridster.gridLines.updateGrid();

import { GridsterItemComponent } from './gridsterItem.component';
import { GridsterComponent } from './gridster.component';
export declare class GridsterSwap {

@@ -7,3 +6,3 @@ private swapedItem;

private gridster;
constructor(gridsterItem: GridsterItemComponent, gridster: GridsterComponent);
constructor(gridsterItem: GridsterItemComponent);
swapItems(): void;

@@ -10,0 +9,0 @@ checkSwapBack(): void;

@@ -14,7 +14,6 @@ "use strict";

var gridsterItem_component_1 = require("./gridsterItem.component");
var gridster_component_1 = require("./gridster.component");
var GridsterSwap = (function () {
function GridsterSwap(gridsterItem, gridster) {
function GridsterSwap(gridsterItem) {
this.gridsterItem = gridsterItem;
this.gridster = gridster;
this.gridster = gridsterItem.gridster;
}

@@ -87,5 +86,5 @@ GridsterSwap.prototype.swapItems = function () {

core_1.Injectable(),
__metadata("design:paramtypes", [gridsterItem_component_1.GridsterItemComponent, gridster_component_1.GridsterComponent])
__metadata("design:paramtypes", [gridsterItem_component_1.GridsterItemComponent])
], GridsterSwap);
exports.GridsterSwap = GridsterSwap;
//# sourceMappingURL=gridsterSwap.service.js.map

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

[{"__symbolic":"module","version":3,"metadata":{"GridsterSwap":{"__symbolic":"class","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Injectable"}}],"members":{"__ctor__":[{"__symbolic":"constructor","parameters":[{"__symbolic":"reference","module":"./gridsterItem.component","name":"GridsterItemComponent"},{"__symbolic":"reference","module":"./gridster.component","name":"GridsterComponent"}]}],"swapItems":[{"__symbolic":"method"}],"checkSwapBack":[{"__symbolic":"method"}],"restoreSwapItem":[{"__symbolic":"method"}],"setSwapItem":[{"__symbolic":"method"}],"checkSwap":[{"__symbolic":"method"}]}}}},{"__symbolic":"module","version":1,"metadata":{"GridsterSwap":{"__symbolic":"class","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Injectable"}}],"members":{"__ctor__":[{"__symbolic":"constructor","parameters":[{"__symbolic":"reference","module":"./gridsterItem.component","name":"GridsterItemComponent"},{"__symbolic":"reference","module":"./gridster.component","name":"GridsterComponent"}]}],"swapItems":[{"__symbolic":"method"}],"checkSwapBack":[{"__symbolic":"method"}],"restoreSwapItem":[{"__symbolic":"method"}],"setSwapItem":[{"__symbolic":"method"}],"checkSwap":[{"__symbolic":"method"}]}}}}]
[{"__symbolic":"module","version":3,"metadata":{"GridsterSwap":{"__symbolic":"class","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Injectable"}}],"members":{"__ctor__":[{"__symbolic":"constructor","parameters":[{"__symbolic":"reference","module":"./gridsterItem.component","name":"GridsterItemComponent"}]}],"swapItems":[{"__symbolic":"method"}],"checkSwapBack":[{"__symbolic":"method"}],"restoreSwapItem":[{"__symbolic":"method"}],"setSwapItem":[{"__symbolic":"method"}],"checkSwap":[{"__symbolic":"method"}]}}}},{"__symbolic":"module","version":1,"metadata":{"GridsterSwap":{"__symbolic":"class","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Injectable"}}],"members":{"__ctor__":[{"__symbolic":"constructor","parameters":[{"__symbolic":"reference","module":"./gridsterItem.component","name":"GridsterItemComponent"}]}],"swapItems":[{"__symbolic":"method"}],"checkSwapBack":[{"__symbolic":"method"}],"restoreSwapItem":[{"__symbolic":"method"}],"setSwapItem":[{"__symbolic":"method"}],"checkSwap":[{"__symbolic":"method"}]}}}}]

@@ -6,1 +6,4 @@ export { GridsterComponent } from './gridster.component';

export { GridsterModule } from './gridster.module';
export { GridsterPush } from './gridsterPush.service';
export { GridsterPushResize } from './gridsterPushResize.service';
export { GridsterSwap } from './gridsterSwap.service';

@@ -9,2 +9,8 @@ "use strict";

exports.GridsterModule = gridster_module_1.GridsterModule;
var gridsterPush_service_1 = require("./gridsterPush.service");
exports.GridsterPush = gridsterPush_service_1.GridsterPush;
var gridsterPushResize_service_1 = require("./gridsterPushResize.service");
exports.GridsterPushResize = gridsterPushResize_service_1.GridsterPushResize;
var gridsterSwap_service_1 = require("./gridsterSwap.service");
exports.GridsterSwap = gridsterSwap_service_1.GridsterSwap;
//# sourceMappingURL=index.js.map

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

[{"__symbolic":"module","version":3,"metadata":{},"exports":[{"from":"./gridster.component","export":["GridsterComponent"]},{"from":"./gridsterItem.component","export":["GridsterItemComponent"]},{"from":"./gridsterItem.interface","export":["GridsterItem"]},{"from":"./gridsterConfig.interface","export":["GridsterConfig","GridType","Draggable"]},{"from":"./gridster.module","export":["GridsterModule"]}]},{"__symbolic":"module","version":1,"metadata":{},"exports":[{"from":"./gridster.component","export":["GridsterComponent"]},{"from":"./gridsterItem.component","export":["GridsterItemComponent"]},{"from":"./gridsterItem.interface","export":["GridsterItem"]},{"from":"./gridsterConfig.interface","export":["GridsterConfig","GridType","Draggable"]},{"from":"./gridster.module","export":["GridsterModule"]}]}]
[{"__symbolic":"module","version":3,"metadata":{},"exports":[{"from":"./gridster.component","export":["GridsterComponent"]},{"from":"./gridsterItem.component","export":["GridsterItemComponent"]},{"from":"./gridsterItem.interface","export":["GridsterItem"]},{"from":"./gridsterConfig.interface","export":["GridsterConfig","GridType","Draggable"]},{"from":"./gridster.module","export":["GridsterModule"]},{"from":"./gridsterPush.service","export":["GridsterPush"]},{"from":"./gridsterPushResize.service","export":["GridsterPushResize"]},{"from":"./gridsterSwap.service","export":["GridsterSwap"]}]},{"__symbolic":"module","version":1,"metadata":{},"exports":[{"from":"./gridster.component","export":["GridsterComponent"]},{"from":"./gridsterItem.component","export":["GridsterItemComponent"]},{"from":"./gridsterItem.interface","export":["GridsterItem"]},{"from":"./gridsterConfig.interface","export":["GridsterConfig","GridType","Draggable"]},{"from":"./gridster.module","export":["GridsterModule"]},{"from":"./gridsterPush.service","export":["GridsterPush"]},{"from":"./gridsterPushResize.service","export":["GridsterPushResize"]},{"from":"./gridsterSwap.service","export":["GridsterSwap"]}]}]
{
"name": "angular-gridster2",
"version": "2.4.15",
"version": "2.4.16",
"license": "MIT",

@@ -5,0 +5,0 @@ "main": "dist/index.js",

@@ -178,2 +178,16 @@ angular-gridster2

this.options.api.getNextPossiblePosition(item: GridsterItem); // call to get a viable position for item. Returns true if found
// if you want to push items from code use the GridsterPush service
import {GridsterItemComponent, GridsterPush, GridsterPushResize, GridsterSwap} from 'gridster'
myMethod(gridsterItemComponent: GridsterItemComponent) {
const push = new GridsterPush(gridsterItemComponent); // init the service
gridsterItemComponent.$item.rows += 1; // move your item
push.pushItems(push.fromEast); // push items from a direction
push.setPushedItems(); // save the items pushed
push.restoreItems(); // restore to initial state the pushed items
push.checkPushBack(); // check for items restore to original position
// same for GridsterPushResize and GridsterSwap
}
```

@@ -180,0 +194,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

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