gridstack 8.0.0 → 8.0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +1 -0
- package/dist/dd-base-impl.d.ts +1 -1
- package/dist/dd-base-impl.js +1 -1
- package/dist/dd-base-impl.js.map +1 -1
- package/dist/dd-draggable.d.ts +1 -1
- package/dist/dd-draggable.js +2 -2
- package/dist/dd-draggable.js.map +1 -1
- package/dist/dd-droppable.d.ts +1 -1
- package/dist/dd-droppable.js +1 -1
- package/dist/dd-droppable.js.map +1 -1
- package/dist/dd-element.d.ts +1 -1
- package/dist/dd-element.js +1 -1
- package/dist/dd-element.js.map +1 -1
- package/dist/dd-gridstack.d.ts +1 -1
- package/dist/dd-gridstack.js +1 -1
- package/dist/dd-gridstack.js.map +1 -1
- package/dist/dd-manager.d.ts +1 -1
- package/dist/dd-manager.js +1 -1
- package/dist/dd-manager.js.map +1 -1
- package/dist/dd-resizable-handle.d.ts +1 -1
- package/dist/dd-resizable-handle.js +1 -1
- package/dist/dd-resizable-handle.js.map +1 -1
- package/dist/dd-resizable.d.ts +1 -1
- package/dist/dd-resizable.js +1 -1
- package/dist/dd-resizable.js.map +1 -1
- package/dist/dd-touch.d.ts +1 -1
- package/dist/dd-touch.js +1 -1
- package/dist/dd-touch.js.map +1 -1
- package/dist/es5/dd-base-impl.d.ts +1 -1
- package/dist/es5/dd-base-impl.js +1 -1
- package/dist/es5/dd-base-impl.js.map +1 -1
- package/dist/es5/dd-draggable.d.ts +1 -1
- package/dist/es5/dd-draggable.js +2 -2
- package/dist/es5/dd-draggable.js.map +1 -1
- package/dist/es5/dd-droppable.d.ts +1 -1
- package/dist/es5/dd-droppable.js +1 -1
- package/dist/es5/dd-droppable.js.map +1 -1
- package/dist/es5/dd-element.d.ts +1 -1
- package/dist/es5/dd-element.js +1 -1
- package/dist/es5/dd-element.js.map +1 -1
- package/dist/es5/dd-gridstack.d.ts +1 -1
- package/dist/es5/dd-gridstack.js +1 -1
- package/dist/es5/dd-gridstack.js.map +1 -1
- package/dist/es5/dd-manager.d.ts +1 -1
- package/dist/es5/dd-manager.js +1 -1
- package/dist/es5/dd-manager.js.map +1 -1
- package/dist/es5/dd-resizable-handle.d.ts +1 -1
- package/dist/es5/dd-resizable-handle.js +1 -1
- package/dist/es5/dd-resizable-handle.js.map +1 -1
- package/dist/es5/dd-resizable.d.ts +1 -1
- package/dist/es5/dd-resizable.js +1 -1
- package/dist/es5/dd-resizable.js.map +1 -1
- package/dist/es5/dd-touch.d.ts +1 -1
- package/dist/es5/dd-touch.js +1 -1
- package/dist/es5/dd-touch.js.map +1 -1
- package/dist/es5/gridstack-all.js +1 -1
- package/dist/es5/gridstack-all.js.LICENSE.txt +1 -1
- package/dist/es5/gridstack-all.js.map +1 -1
- package/dist/es5/gridstack-engine.d.ts +1 -1
- package/dist/es5/gridstack-engine.js +1 -1
- package/dist/es5/gridstack-engine.js.map +1 -1
- package/dist/es5/gridstack-poly.js +1 -1
- package/dist/es5/gridstack.d.ts +6 -3
- package/dist/es5/gridstack.js +17 -15
- package/dist/es5/gridstack.js.map +1 -1
- package/dist/es5/types.d.ts +1 -1
- package/dist/es5/types.js +1 -1
- package/dist/es5/types.js.map +1 -1
- package/dist/es5/utils.d.ts +6 -6
- package/dist/es5/utils.js +25 -16
- package/dist/es5/utils.js.map +1 -1
- package/dist/gridstack-all.js +1 -1
- package/dist/gridstack-all.js.LICENSE.txt +1 -1
- package/dist/gridstack-all.js.map +1 -1
- package/dist/gridstack-engine.d.ts +1 -1
- package/dist/gridstack-engine.js +1 -1
- package/dist/gridstack-engine.js.map +1 -1
- package/dist/gridstack.css +17 -1
- package/dist/gridstack.d.ts +6 -3
- package/dist/gridstack.js +15 -15
- package/dist/gridstack.js.map +1 -1
- package/dist/gridstack.min.css +1 -1
- package/dist/ng/gridstack-item.component.d.ts +1 -1
- package/dist/ng/gridstack-item.component.js +1 -1
- package/dist/ng/gridstack.component.d.ts +1 -1
- package/dist/ng/gridstack.component.js +1 -1
- package/dist/src/gridstack.scss +9 -1
- package/dist/types.d.ts +1 -1
- package/dist/types.js +1 -1
- package/dist/types.js.map +1 -1
- package/dist/utils.d.ts +6 -6
- package/dist/utils.js +23 -16
- package/dist/utils.js.map +1 -1
- package/doc/CHANGES.md +8 -0
- package/doc/README.md +6 -13
- package/package.json +1 -1
package/doc/README.md
CHANGED
|
@@ -28,7 +28,7 @@ gridstack.js API
|
|
|
28
28
|
- [`init(options: GridStackOptions = {}, elOrString: GridStackElement = '.grid-stack'): GridStack`](#initoptions-gridstackoptions---elorstring-gridstackelement--grid-stack-gridstack)
|
|
29
29
|
- [`initAll(options: GridStackOptions = {}, selector = '.grid-stack'): GridStack[]`](#initalloptions-gridstackoptions---selector--grid-stack-gridstack)
|
|
30
30
|
- [`addGrid(parent: HTMLElement, opt: GridStackOptions = {}): GridStack `](#addgridparent-htmlelement-opt-gridstackoptions---gridstack-)
|
|
31
|
-
- [`setupDragIn(dragIn?: string, dragInOptions?: DDDragInOpt)`](#setupdragindragin-string-draginoptions-dddraginopt)
|
|
31
|
+
- [`setupDragIn(dragIn?: string | HTMLElement[], dragInOptions?: DDDragInOpt, root = document)`](#setupdragindragin-string--htmlelement-draginoptions-dddraginopt-root--document)
|
|
32
32
|
- [`GridStack.registerEngine(engineClass: typeof GridStackEngine)`](#gridstackregisterengineengineclass-typeof-gridstackengine)
|
|
33
33
|
- [API](#api)
|
|
34
34
|
- [`addWidget(el?: GridStackWidget | GridStackElement, options?: GridStackWidget)`](#addwidgetel-gridstackwidget--gridstackelement-options-gridstackwidget)
|
|
@@ -94,15 +94,8 @@ gridstack.js API
|
|
|
94
94
|
- `column` - Integer > 0 (default 12) which can change on the fly with `column(N)` API, or `'auto'` for nested grids to size themselves to the parent grid container (to make sub-items are the same size). See [column](http://gridstackjs.com/demo/column.html) and [nested](http://gridstackjs.com/demo/nested.html)
|
|
95
95
|
- `class`?: string - additional class on top of '.grid-stack' (which is required for our CSS) to differentiate this instance
|
|
96
96
|
- `disableDrag` - disallows dragging of widgets (default: `false`).
|
|
97
|
-
- `disableOneColumnMode` -
|
|
97
|
+
- `disableOneColumnMode` - Prevents the grid container from being displayed in "one column mode", even when the container's width is smaller than the value of oneColumnSize (default value of oneColumnSize is 768px). By default, this option is set to "false".
|
|
98
98
|
- `disableResize` - disallows resizing of widgets (default: `false`).
|
|
99
|
-
- `dragIn` - specify the class of items that can be dragged into grids
|
|
100
|
-
* example: `dragIn: '.newWidget'`.
|
|
101
|
-
* **Note**: if you have multiple grids, it's best to call `GridStack.setupDragIn()` with same params as it only need to be done once.
|
|
102
|
-
- `dragInOptions` - options for items that can be dragged into grids - see `DDDragInOpt`
|
|
103
|
-
* example `dragInOptions: { appendTo: 'body', helper: 'clone', handle: '.grid-stack-item-content' }`
|
|
104
|
-
* **Note**: if you have multiple grids, it's best to call `GridStack.setupDragIn()` with same params as it only need to be done once.
|
|
105
|
-
* **Note2**: instead of 'clone' you can also pass your own function (get passed the event).
|
|
106
99
|
- `draggable` - allows to override draggable options - see `DDDragOpt`. (default: `{handle: '.grid-stack-item-content', appendTo: 'body', scroll: true}`)
|
|
107
100
|
- `dragOut` to let user drag nested grid items out of a parent or not (default false) See [example](http://gridstackjs.com/demo/nested.html)
|
|
108
101
|
- `engineClass` - the type of engine to create (so you can subclass) default to GridStackEngine
|
|
@@ -121,7 +114,7 @@ gridstack.js API
|
|
|
121
114
|
- `minRow` - minimum rows amount which is handy to prevent grid from collapsing when empty. Default is `0`. You can also do this with `min-height` CSS attribute on the grid div in pixels, which will round to the closest row.
|
|
122
115
|
- `nonce` - If you are using a nonce-based Content Security Policy, pass your nonce here and
|
|
123
116
|
GridStack will add it to the <style> elements it creates.
|
|
124
|
-
- `oneColumnSize` -
|
|
117
|
+
- `oneColumnSize` - When the width of the grid is equal to or less than the value set in oneColumnSize, the grid will be displayed in one-column mode. By default, the value of this option is set to "768".
|
|
125
118
|
- `oneColumnModeDomSort` - set to `true` if you want oneColumnMode to use the DOM order and ignore x,y from normal multi column layouts during sorting. This enables you to have custom 1 column layout that differ from the rest. (default?: `false`)
|
|
126
119
|
- `placeholderClass` - class for placeholder (default: `'grid-stack-placeholder'`)
|
|
127
120
|
- `placeholderText` - placeholder default content (default: `''`)
|
|
@@ -330,15 +323,15 @@ grids.forEach(...)
|
|
|
330
323
|
* @param opt grids options used to initialize the grid, and list of children
|
|
331
324
|
* see [nested.html](https://github.com/gridstack/gridstack.js/tree/master/demo/nested.html) demo
|
|
332
325
|
|
|
333
|
-
### `setupDragIn(dragIn?: string, dragInOptions?: DDDragInOpt)`
|
|
326
|
+
### `setupDragIn(dragIn?: string | HTMLElement[], dragInOptions?: DDDragInOpt, root = document)`
|
|
334
327
|
|
|
335
328
|
* call to setup dragging in from the outside (say toolbar), by specifying the class selection and options.
|
|
336
329
|
Called during `GridStack.init()` as options, but can also be called directly (last param are cached) in case the toolbar is dynamically create and needs to change later.
|
|
337
|
-
* @param dragIn string selector (ex: `'.sidebar .grid-stack-item'`)
|
|
330
|
+
* @param dragIn string selector (ex: `'.sidebar .grid-stack-item'`) or list of dom elements
|
|
338
331
|
* @param dragInOptions options - see `DDDragInOpt`. (default: `{handle: '.grid-stack-item-content', appendTo: 'body'}`
|
|
332
|
+
* @param root - default to document (for shadow dom support)
|
|
339
333
|
but you will probably also want `helper: 'clone'` or your own callback function).
|
|
340
334
|
|
|
341
|
-
|
|
342
335
|
### `GridStack.registerEngine(engineClass: typeof GridStackEngine)`
|
|
343
336
|
|
|
344
337
|
* call to specify global custom engine subclass - see instead `GridStackOptions.engineClass` if you only need to replace just one instance.
|