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.
Files changed (96) hide show
  1. package/README.md +1 -0
  2. package/dist/dd-base-impl.d.ts +1 -1
  3. package/dist/dd-base-impl.js +1 -1
  4. package/dist/dd-base-impl.js.map +1 -1
  5. package/dist/dd-draggable.d.ts +1 -1
  6. package/dist/dd-draggable.js +2 -2
  7. package/dist/dd-draggable.js.map +1 -1
  8. package/dist/dd-droppable.d.ts +1 -1
  9. package/dist/dd-droppable.js +1 -1
  10. package/dist/dd-droppable.js.map +1 -1
  11. package/dist/dd-element.d.ts +1 -1
  12. package/dist/dd-element.js +1 -1
  13. package/dist/dd-element.js.map +1 -1
  14. package/dist/dd-gridstack.d.ts +1 -1
  15. package/dist/dd-gridstack.js +1 -1
  16. package/dist/dd-gridstack.js.map +1 -1
  17. package/dist/dd-manager.d.ts +1 -1
  18. package/dist/dd-manager.js +1 -1
  19. package/dist/dd-manager.js.map +1 -1
  20. package/dist/dd-resizable-handle.d.ts +1 -1
  21. package/dist/dd-resizable-handle.js +1 -1
  22. package/dist/dd-resizable-handle.js.map +1 -1
  23. package/dist/dd-resizable.d.ts +1 -1
  24. package/dist/dd-resizable.js +1 -1
  25. package/dist/dd-resizable.js.map +1 -1
  26. package/dist/dd-touch.d.ts +1 -1
  27. package/dist/dd-touch.js +1 -1
  28. package/dist/dd-touch.js.map +1 -1
  29. package/dist/es5/dd-base-impl.d.ts +1 -1
  30. package/dist/es5/dd-base-impl.js +1 -1
  31. package/dist/es5/dd-base-impl.js.map +1 -1
  32. package/dist/es5/dd-draggable.d.ts +1 -1
  33. package/dist/es5/dd-draggable.js +2 -2
  34. package/dist/es5/dd-draggable.js.map +1 -1
  35. package/dist/es5/dd-droppable.d.ts +1 -1
  36. package/dist/es5/dd-droppable.js +1 -1
  37. package/dist/es5/dd-droppable.js.map +1 -1
  38. package/dist/es5/dd-element.d.ts +1 -1
  39. package/dist/es5/dd-element.js +1 -1
  40. package/dist/es5/dd-element.js.map +1 -1
  41. package/dist/es5/dd-gridstack.d.ts +1 -1
  42. package/dist/es5/dd-gridstack.js +1 -1
  43. package/dist/es5/dd-gridstack.js.map +1 -1
  44. package/dist/es5/dd-manager.d.ts +1 -1
  45. package/dist/es5/dd-manager.js +1 -1
  46. package/dist/es5/dd-manager.js.map +1 -1
  47. package/dist/es5/dd-resizable-handle.d.ts +1 -1
  48. package/dist/es5/dd-resizable-handle.js +1 -1
  49. package/dist/es5/dd-resizable-handle.js.map +1 -1
  50. package/dist/es5/dd-resizable.d.ts +1 -1
  51. package/dist/es5/dd-resizable.js +1 -1
  52. package/dist/es5/dd-resizable.js.map +1 -1
  53. package/dist/es5/dd-touch.d.ts +1 -1
  54. package/dist/es5/dd-touch.js +1 -1
  55. package/dist/es5/dd-touch.js.map +1 -1
  56. package/dist/es5/gridstack-all.js +1 -1
  57. package/dist/es5/gridstack-all.js.LICENSE.txt +1 -1
  58. package/dist/es5/gridstack-all.js.map +1 -1
  59. package/dist/es5/gridstack-engine.d.ts +1 -1
  60. package/dist/es5/gridstack-engine.js +1 -1
  61. package/dist/es5/gridstack-engine.js.map +1 -1
  62. package/dist/es5/gridstack-poly.js +1 -1
  63. package/dist/es5/gridstack.d.ts +6 -3
  64. package/dist/es5/gridstack.js +17 -15
  65. package/dist/es5/gridstack.js.map +1 -1
  66. package/dist/es5/types.d.ts +1 -1
  67. package/dist/es5/types.js +1 -1
  68. package/dist/es5/types.js.map +1 -1
  69. package/dist/es5/utils.d.ts +6 -6
  70. package/dist/es5/utils.js +25 -16
  71. package/dist/es5/utils.js.map +1 -1
  72. package/dist/gridstack-all.js +1 -1
  73. package/dist/gridstack-all.js.LICENSE.txt +1 -1
  74. package/dist/gridstack-all.js.map +1 -1
  75. package/dist/gridstack-engine.d.ts +1 -1
  76. package/dist/gridstack-engine.js +1 -1
  77. package/dist/gridstack-engine.js.map +1 -1
  78. package/dist/gridstack.css +17 -1
  79. package/dist/gridstack.d.ts +6 -3
  80. package/dist/gridstack.js +15 -15
  81. package/dist/gridstack.js.map +1 -1
  82. package/dist/gridstack.min.css +1 -1
  83. package/dist/ng/gridstack-item.component.d.ts +1 -1
  84. package/dist/ng/gridstack-item.component.js +1 -1
  85. package/dist/ng/gridstack.component.d.ts +1 -1
  86. package/dist/ng/gridstack.component.js +1 -1
  87. package/dist/src/gridstack.scss +9 -1
  88. package/dist/types.d.ts +1 -1
  89. package/dist/types.js +1 -1
  90. package/dist/types.js.map +1 -1
  91. package/dist/utils.d.ts +6 -6
  92. package/dist/utils.js +23 -16
  93. package/dist/utils.js.map +1 -1
  94. package/doc/CHANGES.md +8 -0
  95. package/doc/README.md +6 -13
  96. 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` - disables the oneColumnMode when the grid width is less than minW (default: 'false')
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` - minimal width. If grid width is less than or equal to, grid will be shown in one-column mode (default: `768`)
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.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "gridstack",
3
- "version": "8.0.0",
3
+ "version": "8.0.1",
4
4
  "license": "MIT",
5
5
  "author": "Alain Dumesny <alaind831+github@gmail.com> (https://github.com/adumesny)",
6
6
  "contributors": [