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

gridstack

Package Overview
Dependencies
Maintainers
3
Versions
111
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

gridstack - npm Package Compare versions

Comparing version 2.0.0-rc to 2.0.0-rc2

2

dist/gridstack-dd.d.ts

@@ -18,3 +18,3 @@ /**

/** drag&drop events callbacks */
export declare type DDCallback = (event: Event, arg2: GridItemHTMLElement) => void;
export declare type DDCallback = (event: Event, arg2: GridItemHTMLElement, helper?: GridItemHTMLElement) => void;
/**

@@ -21,0 +21,0 @@ * Base class for drag'n'drop plugin.

"use strict";
// gridstack-dd.ts 2.0.0-rc @preserve
// gridstack-dd.ts 2.0.0-rc2 @preserve
Object.defineProperty(exports, "__esModule", { value: true });

@@ -4,0 +4,0 @@ /**

@@ -35,3 +35,3 @@ import { GridStackNode, GridStackWidget } from './types';

addNode(node: GridStackNode, triggerAddEvent?: boolean): GridStackNode;
removeNode(node: GridStackNode, removeDOM?: boolean, triggerRemoveEvent?: boolean): GridStackEngine;
removeNode(node: GridStackNode, removeDOM?: boolean, triggerEvent?: boolean): GridStackEngine;
removeAll(removeDOM?: boolean): GridStackEngine;

@@ -38,0 +38,0 @@ canMoveNode(node: GridStackNode, x: number, y: number, width?: number, height?: number): boolean;

"use strict";
// gridstack-engine.ts 2.0.0-rc @preserve
// gridstack-engine.ts 2.0.0-rc2 @preserve
Object.defineProperty(exports, "__esModule", { value: true });

@@ -312,9 +312,13 @@ /**

}
removeNode(node, removeDOM = true, triggerRemoveEvent = false) {
if (triggerRemoveEvent) {
removeNode(node, removeDOM = true, triggerEvent = false) {
if (triggerEvent) { // we wait until final drop to manually track removed items (rather than during drag)
this.removedNodes.push(node);
}
node._id = null; // hint that node is being removed
this.nodes = this.nodes.filter(n => n !== node);
this._packNodes();
// TODO: .splice(findIndex(),1) would be faster but apparently there are cases we have 2 instances ! (see spec 'load add new, delete others')
// this.nodes = this.nodes.filter(n => n !== node);
this.nodes.splice(this.nodes.findIndex(n => n === node), 1);
if (!this.float) {
this._packNodes();
}
this._notify(node, removeDOM);

@@ -321,0 +325,0 @@ return this;

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

// gridstack-poly.js 2.0.0-rc @preserve
// gridstack-poly.js 2.0.0-rc2 @preserve

@@ -3,0 +3,0 @@ /** IE and older browsers Polyfills for this library

@@ -302,3 +302,3 @@ /**

*/
removeWidget(els: GridStackElement, removeDOM?: boolean): GridStack;
removeWidget(els: GridStackElement, removeDOM?: boolean, triggerEvent?: boolean): GridStack;
/**

@@ -305,0 +305,0 @@ * Removes all widgets from the grid.

"use strict";
// gridstack-dd-jqueryui.ts 2.0.0-rc @preserve
// gridstack-dd-jqueryui.ts 2.0.0-rc2 @preserve
function __export(m) {

@@ -92,3 +92,3 @@ for (var p in m) if (!exports.hasOwnProperty(p)) exports[p] = m[p];

let $el = $(el);
$el.on(name, (event, ui) => { callback(event, ui.draggable ? ui.draggable.get(0) : event.target); });
$el.on(name, (event, ui) => { callback(event, ui.draggable ? ui.draggable[0] : event.target, ui.helper ? ui.helper[0] : null); });
return this;

@@ -95,0 +95,0 @@ }

@@ -54,3 +54,3 @@ /**

draggable?: DDDragOpt;
/** allows to drag external items using this selector - see dragInOption. (default: undefined) */
/** allows to drag external items using this selector - see dragInOptions. (default: undefined) */
dragIn?: string;

@@ -57,0 +57,0 @@ /** allows to drag external items using these options. (default?: { handle: '.grid-stack-item-content', revert: 'invalid', scroll: false, appendTo: 'body', helper: 'clone' }) */

"use strict";
// types.ts 2.0.0-rc @preserve
// types.ts 2.0.0-rc2 @preserve
Object.defineProperty(exports, "__esModule", { value: true });
//# sourceMappingURL=types.js.map
"use strict";
// utils.ts 2.0.0-rc @preserve
// utils.ts 2.0.0-rc2 @preserve
Object.defineProperty(exports, "__esModule", { value: true });

@@ -4,0 +4,0 @@ /** checks for obsolete method names */

@@ -47,2 +47,3 @@ Change log

- fix [1299](https://github.com/gridstack/gridstack.js/pull/1299) many columns round-off error
- fix [1102](https://github.com/gridstack/gridstack.js/issues/1102) loose functionality when they are moved to a new grid

@@ -49,0 +50,0 @@ ## 1.2.0 (2020-08-01)

@@ -130,5 +130,5 @@ gridstack.js API

- `autoPosition` - tells to ignore `x` and `y` attributes and to place element to the first available position. Having either one missing will also do that.
- `x`, `y` - (number) element position in row/column. Note: if one is missing this will `autoPosition` the item
- `width`, `height` - (number) element size in row/column (default 1x1)
- `maxWidth`, `minWidth`, `maxHeight`, `minHeight` - element constraints in row/column (default none)
- `x`, `y` - (number) element position in column/row. Note: if one is missing this will `autoPosition` the item
- `width`, `height` - (number) element size in column/row (default 1x1)
- `maxWidth`, `minWidth`, `maxHeight`, `minHeight` - element constraints in column/row (default none)
- `locked` - means another widget wouldn't be able to move it during dragging or resizing.

@@ -135,0 +135,0 @@ The widget can still be dragged or resized by the user.

{
"name": "gridstack",
"version": "2.0.0-rc",
"version": "2.0.0-rc2",
"description": "TypeScript/Javascript lib for dashboard layout and creation, no external dependencies, with many wrappers (React, Angular, Ember, knockout...)",

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

@@ -97,4 +97,4 @@ gridstack.js

```html
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/gridstack@2.0.0-rc/dist/gridstack.min.css" />
<script src="https://cdn.jsdelivr.net/npm/gridstack@2.0.0-rc/dist/gridstack.all.js"></script>
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/gridstack@2.0.0-rc2/dist/gridstack.min.css" />
<script src="https://cdn.jsdelivr.net/npm/gridstack@2.0.0-rc2/dist/gridstack.all.js"></script>
```

@@ -377,3 +377,3 @@

2. event signatures are generic and not jquery-ui dependent anymore. `gsresizestop` has been removed as `resizestop|dragstop` are now called **after** the DOm attributes have been updated.
2. event signatures are generic and not jquery-ui dependent anymore. `gsresizestop` has been removed as `resizestop|dragstop` are now called **after** the DOM attributes have been updated.

@@ -380,0 +380,0 @@ 3. `oneColumnMode` would trigger when `window.width` < 768px by default. We now check for grid width instead (more correct and supports nesting). You might need to adjust grid `minWidth` or `disableOneColumnMode`.

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 too big to display

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 too big to display

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