gridstack 4.2.4 → 4.3.0

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 (70) hide show
  1. package/README.md +15 -14
  2. package/dist/gridstack-dd.d.ts +1 -1
  3. package/dist/gridstack-dd.js +37 -32
  4. package/dist/gridstack-dd.js.map +1 -1
  5. package/dist/gridstack-ddi.d.ts +1 -1
  6. package/dist/gridstack-ddi.js +2 -1
  7. package/dist/gridstack-ddi.js.map +1 -1
  8. package/dist/gridstack-engine.d.ts +4 -3
  9. package/dist/gridstack-engine.js +25 -14
  10. package/dist/gridstack-engine.js.map +1 -1
  11. package/dist/gridstack-extra.css +800 -530
  12. package/dist/gridstack-extra.min.css +1 -1
  13. package/dist/gridstack-h5.d.ts +1 -1
  14. package/dist/gridstack-h5.js +1 -1
  15. package/dist/gridstack-h5.js.LICENSE.txt +1 -1
  16. package/dist/gridstack-h5.js.map +1 -1
  17. package/dist/gridstack-jq.d.ts +1 -1
  18. package/dist/gridstack-jq.js +1 -1
  19. package/dist/gridstack-jq.js.LICENSE.txt +1 -1
  20. package/dist/gridstack-jq.js.map +1 -1
  21. package/dist/gridstack-poly.js +1 -1
  22. package/dist/gridstack-static.d.ts +1 -1
  23. package/dist/gridstack-static.js +1 -1
  24. package/dist/gridstack-static.js.LICENSE.txt +1 -1
  25. package/dist/gridstack-static.js.map +1 -1
  26. package/dist/gridstack.css +306 -228
  27. package/dist/gridstack.d.ts +10 -5
  28. package/dist/gridstack.js +54 -34
  29. package/dist/gridstack.js.map +1 -1
  30. package/dist/gridstack.min.css +1 -1
  31. package/dist/h5/dd-base-impl.d.ts +2 -2
  32. package/dist/h5/dd-base-impl.js +2 -1
  33. package/dist/h5/dd-base-impl.js.map +1 -1
  34. package/dist/h5/dd-draggable.d.ts +1 -1
  35. package/dist/h5/dd-draggable.js +5 -1
  36. package/dist/h5/dd-draggable.js.map +1 -1
  37. package/dist/h5/dd-droppable.d.ts +1 -1
  38. package/dist/h5/dd-droppable.js +2 -1
  39. package/dist/h5/dd-droppable.js.map +1 -1
  40. package/dist/h5/dd-element.d.ts +1 -1
  41. package/dist/h5/dd-element.js +2 -1
  42. package/dist/h5/dd-element.js.map +1 -1
  43. package/dist/h5/dd-manager.d.ts +1 -1
  44. package/dist/h5/dd-manager.js +2 -1
  45. package/dist/h5/dd-manager.js.map +1 -1
  46. package/dist/h5/dd-resizable-handle.d.ts +1 -1
  47. package/dist/h5/dd-resizable-handle.js +2 -1
  48. package/dist/h5/dd-resizable-handle.js.map +1 -1
  49. package/dist/h5/dd-resizable.d.ts +1 -1
  50. package/dist/h5/dd-resizable.js +2 -1
  51. package/dist/h5/dd-resizable.js.map +1 -1
  52. package/dist/h5/dd-utils.d.ts +1 -1
  53. package/dist/h5/dd-utils.js +2 -1
  54. package/dist/h5/dd-utils.js.map +1 -1
  55. package/dist/h5/gridstack-dd-native.d.ts +1 -1
  56. package/dist/h5/gridstack-dd-native.js +13 -5
  57. package/dist/h5/gridstack-dd-native.js.map +1 -1
  58. package/dist/jq/gridstack-dd-jqueryui.js +20 -5
  59. package/dist/jq/gridstack-dd-jqueryui.js.map +1 -1
  60. package/dist/src/gridstack-extra.scss +7 -5
  61. package/dist/src/gridstack.scss +8 -6
  62. package/dist/types.d.ts +1 -1
  63. package/dist/types.js +1 -1
  64. package/dist/types.js.map +1 -1
  65. package/dist/utils.d.ts +8 -1
  66. package/dist/utils.js +35 -5
  67. package/dist/utils.js.map +1 -1
  68. package/doc/CHANGES.md +28 -0
  69. package/doc/README.md +8 -5
  70. package/package.json +3 -4
package/doc/README.md CHANGED
@@ -53,7 +53,7 @@ gridstack.js API
53
53
  - [`removeWidget(el, removeDOM = true, triggerEvent = true)`](#removewidgetel-removedom--true-triggerevent--true)
54
54
  - [`removeAll(removeDOM = true)`](#removeallremovedom--true)
55
55
  - [`resizable(el, val)`](#resizableel-val)
56
- - [`save(saveContent = true): GridStackWidget[]`](#savesavecontent--true-gridstackwidget)
56
+ - [`save(saveContent = true, saveGridOpt = false): GridStackWidget[] | GridStackOptions`](#savesavecontent--true-savegridopt--false-gridstackwidget--gridstackoptions)
57
57
  - [`setAnimation(doAnimate)`](#setanimationdoanimate)
58
58
  - [`setStatic(staticValue)`](#setstaticstaticvalue)
59
59
  - [`update(el: GridStackElement, opts: GridStackWidget)`](#updateel-gridstackelement-opts-gridstackwidget)
@@ -120,7 +120,7 @@ gridstack.js API
120
120
  - `removable` - if `true` widgets could be removed by dragging outside of the grid. It could also be a selector string, in this case widgets will be removed by dropping them there (default: `false`) See [example](http://gridstackjs.com/demo/two.html)
121
121
  - `removeTimeout` - time in milliseconds before widget is being removed while dragging outside of the grid. (default: `2000`)
122
122
  - `row` - fix grid number of rows. This is a shortcut of writing `minRow:N, maxRow:N`. (default `0` no constrain)
123
- - `rtl` - if `true` turns grid to RTL. Possible values are `true`, `false`, `'auto'` (default: `'auto'`) See [example](http://gridstackjs.com/demo/rtl.html)
123
+ - `rtl` - if `true` turns grid to RTL. Possible values are `true`, `false`, `'auto'` (default: `'auto'`) See [example](https://gridstackjs.com/demo/right-to-left(rtl).html)
124
124
  - `staticGrid` - removes drag|drop|resize (default `false`). If `true` widgets are not movable/resizable by the user, but code can still move and oneColumnMode will still work. You can use the smaller gridstack-static.js lib. A CSS class `grid-stack-static` is also added to the container.
125
125
  - `styleInHead` - if `true` will add style element to `<head>` otherwise will add it to element's parent node (default `false`).
126
126
 
@@ -522,10 +522,13 @@ Enables/Disables user resizing of specific grid element. If you want all items,
522
522
  - `el` - widget to modify
523
523
  - `val` - if `true` widget will be resizable.
524
524
 
525
- ### `save(saveContent = true): GridStackWidget[]`
525
+ ### `save(saveContent = true, saveGridOpt = false): GridStackWidget[] | GridStackOptions`
526
526
 
527
- - returns the layout of the grid (and optionally the html content as well) that can be serialized (list of item non default attributes, not just w,y,x,y but also min/max and id). See `load()`
528
- - see [example](http://gridstackjs.com/demo/serialization.html)
527
+ saves the current layout returning a list of widgets for serialization which might include any nested grids.
528
+ - `saveContent` if true (default) the latest html inside `.grid-stack-content` will be saved to `GridStackWidget.content` field, else it will be removed.
529
+ - `saveGridOpt` if true (default `false`), save the grid options itself, so you can call the new `GridStack.addGrid()` to recreate everything from scratch. GridStackOptions.children would then contain the widget list instead.
530
+ - returns list of widgets or full grid option, including .children list of widgets
531
+ - see [serialization](http://gridstackjs.com/demo/serialization.html) and [nested](http://gridstackjs.com/demo/nested.html)
529
532
 
530
533
  ### `setAnimation(doAnimate)`
531
534
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "gridstack",
3
- "version": "4.2.4",
3
+ "version": "4.3.0",
4
4
  "description": "TypeScript/JS lib for dashboard layout and creation, no external dependencies, with many wrappers (React, Angular, Vue, Ember, knockout...)",
5
5
  "main": "./dist/gridstack.js",
6
6
  "types": "./dist/gridstack.d.ts",
@@ -54,7 +54,6 @@
54
54
  "url": "https://github.com/gridstack/gridstack.js/issues"
55
55
  },
56
56
  "homepage": "http://gridstack.github.io/gridstack.js/",
57
- "dependencies": {},
58
57
  "devDependencies": {
59
58
  "@types/jasmine": "^3.5.9",
60
59
  "@types/jquery": "^3.5.1",
@@ -83,12 +82,12 @@
83
82
  "karma-cli": "^2.0.0",
84
83
  "karma-jasmine": "^4.0.1",
85
84
  "karma-typescript": "4.1.1",
86
- "node-sass": "^5.0.0",
87
85
  "protractor": "^7.0.0",
88
86
  "puppeteer": "^5.4.1",
87
+ "sass": "^1.42.1",
89
88
  "serve-static": "^1.14.1",
90
89
  "ts-loader": "^8.0.7",
91
- "typescript": "3.6.5",
90
+ "typescript": "^3.7",
92
91
  "webpack": "^5.3.2",
93
92
  "webpack-cli": "^4.6.0"
94
93
  }