Skip to content

Commit c21474b

Browse files
committed
v6.0.0 release
1 parent a682cf9 commit c21474b

18 files changed

+64
-51
lines changed

README.md

Lines changed: 44 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -15,9 +15,9 @@ If you find this lib useful, please donate [PayPal](https://www.paypal.me/alaind
1515
[![Donate](https://img.shields.io/badge/Donate-PayPal-green.svg)](https://www.paypal.me/alaind831)
1616
[![Donate](https://img.shields.io/badge/Donate-Venmo-g.svg)](https://www.venmo.com/adumesny)
1717

18-
Join us on Slack: https://gridstackjs.troolee.com
18+
Join us on Slack: https://gridstackjs.slack.com
1919

20-
[![Slack Status](https://gridstackjs.troolee.com/badge.svg)](https://gridstackjs.troolee.com)
20+
[![Slack Status](https://gridstackjs.troolee.com/badge.svg)](https://gridstackjs.slack.com)
2121
<!-- START doctoc generated TOC please keep comment here to allow auto update -->
2222
<!-- DON'T EDIT THIS SECTION, INSTEAD RE-RUN doctoc TO UPDATE -->
2323
**Table of Contents** *generated with [DocToc](http://doctoc.herokuapp.com/)*
@@ -42,6 +42,7 @@ Join us on Slack: https://gridstackjs.troolee.com
4242
- [Migrating to v3](#migrating-to-v3)
4343
- [Migrating to v4](#migrating-to-v4)
4444
- [Migrating to v5](#migrating-to-v5)
45+
- [Migrating to v6](#migrating-to-v6)
4546
- [jQuery Application](#jquery-application)
4647
- [Changes](#changes)
4748
- [The Team](#the-team)
@@ -71,44 +72,21 @@ ES6 or Typescript
7172
```js
7273
import 'gridstack/dist/gridstack.min.css';
7374
import { GridStack } from 'gridstack';
74-
// THEN to get HTML5 drag&drop
75-
import 'gridstack/dist/h5/gridstack-dd-native';
76-
// OR to get legacy jquery-ui drag&drop (support Mobile touch devices, h5 does not yet)
77-
import 'gridstack/dist/jq/gridstack-dd-jqueryui';
78-
// OR nothing to get static grids (API driven, no user drag&drop)
7975
```
8076

81-
**Note**: `jquery` & `jquery-ui` are imported by name, so you will have to specify their location in your webpack (or equivalent) config file,
82-
which means you can possibly bring your own version
83-
```js
84-
alias: {
85-
'jquery': 'gridstack/dist/jq/jquery.js',
86-
'jquery-ui': 'gridstack/dist/jq/jquery-ui.js',
87-
'jquery.ui': 'gridstack/dist/jq/jquery-ui.js',
88-
'jquery.ui.touch-punch': 'gridstack/dist/jq/jquery.ui.touch-punch.js',
89-
},
90-
```
91-
92-
Alternatively (single combined file) in html
77+
Alternatively (single combined file, notice the -all.js) in html
9378

9479
```html
9580
<link href="node_modules/gridstack/dist/gridstack.min.css" rel="stylesheet"/>
96-
<!-- HTML5 drag&drop (70k) -->
97-
<script src="node_modules/gridstack/dist/gridstack-h5.js"></script>
98-
<!-- OR jquery-ui drag&drop (195k) -->
99-
<script src="node_modules/gridstack/dist/gridstack-jq.js"></script>
100-
<!-- OR static grid (40k) -->
101-
<script src="node_modules/gridstack/dist/gridstack-static.js"></script>
81+
<script src="node_modules/gridstack/dist/gridstack-all.js"></script>
10282
```
10383

104-
**Note**: the API is the same, regardless of the plugin (or lack thereof) so you can switch at any time. The Jquery version will export $ that it bundles and currently the only one to support mobile/touch devices through `jquery.ui.touch-punch` (h5 version is planned). Read more at [migrating to v3](#migrating-to-v3)
105-
106-
**Note2**: IE support was dropped in v2, but restored in v4.4 by an external contributor (I have no interest in testing+supporting obsolete browser so this might break in the future).
84+
**Note**: IE support was dropped in v2, but restored in v4.4 by an external contributor (I have no interest in testing+supporting obsolete browser so this likely will break again in the future).
10785
You can use the es5 files and polyfill (larger) for older browser instead. For example:
10886
```html
10987
<link href="node_modules/gridstack/dist/gridstack.min.css" rel="stylesheet"/>
11088
<script src="node_modules/gridstack/dist/es5/gridstack-poly.js"></script>
111-
<script src="node_modules/gridstack/dist/es5/gridstack-jq.js"></script>
89+
<script src="node_modules/gridstack/dist/es5/gridstack-all.js"></script>
11290
```
11391

11492

@@ -161,7 +139,7 @@ see [jsfiddle sample](https://jsfiddle.net/adumesny/jqhkry7g) as running example
161139

162140
## Requirements
163141

164-
GridStack no longer requires external dependencies as of v1.0.0 (lodash was removed in v0.5.0 and jquery API in v1.0.0). v3.0.0 is a complete HTML5 re-write which removes all jquery dependency (still available for legacy apps). All you need to include now is `gridstack-h5.js` and `gridstack.min.css` (layouts are done using CSS column based %).
142+
GridStack no longer requires external dependencies as of v1.0.0 (lodash was removed in v0.5.0 and jquery API in v1.0.0). v3 is a complete HTML5 re-write removing need for jquery (still available for legacy apps). v6 is native mouse and touch event for mobile support, and no longer have jquery-ui version. All you need to include now is `gridstack-all.js` and `gridstack.min.css` (layouts are done using CSS column based %).
165143

166144
## Extend Library
167145

@@ -455,9 +433,44 @@ make sure to read v4 migration first!
455433
v5 does not have any breaking changes from v4, but a focus on nested grids in h5 mode:
456434
You can now drag in/out of parent into nested child, with new API parameters values. See the release notes.
457435
436+
## Migrating to v6
437+
438+
the API did not really change from v5, but a complete re-write of Drag&Drop to use native mouseevent (instead of HTML draggable=true which is buggy on Mac Safari, and doesn't work on mobile devices) and touchevent (mobile), and we no longer have jquery ui option (wasn't working well for nested grids, didn't want to maintain legacy lib).
439+
440+
The main difference is you only need to include gridstack.js and get D&D (desktop and mobile) out of the box for the same size as h5 version.
441+
458442
# jQuery Application
459443
460-
We now have a native HTML5 drag'n'drop through the plugin system (default), but the jquery-ui version can be used instead. It will bundle `jquery` (3.5.1) + `jquery-ui` (1.13.1 minimal drag|drop|resize) + `jquery-ui-touch-punch` (1.0.8 for mobile support) in `gridstack-jq.js`.
444+
This is **old and no longer apply to v6+**. You'll need to use v5.1.1 and before
445+
446+
```js
447+
import 'gridstack/dist/gridstack.min.css';
448+
import { GridStack } from 'gridstack';
449+
import 'gridstack/dist/jq/gridstack-dd-jqueryui';
450+
```
451+
**Note**: `jquery` & `jquery-ui` are imported by name, so you will have to specify their location in your webpack (or equivalent) config file,
452+
which means you can possibly bring your own version
453+
```js
454+
alias: {
455+
'jquery': 'gridstack/dist/jq/jquery.js',
456+
'jquery-ui': 'gridstack/dist/jq/jquery-ui.js',
457+
'jquery.ui': 'gridstack/dist/jq/jquery-ui.js',
458+
'jquery.ui.touch-punch': 'gridstack/dist/jq/jquery.ui.touch-punch.js',
459+
},
460+
```
461+
Alternatively (single combined file) in html
462+
463+
```html
464+
<link href="node_modules/gridstack/dist/gridstack.min.css" rel="stylesheet"/>
465+
<!-- HTML5 drag&drop (70k) -->
466+
<script src="node_modules/gridstack/dist/gridstack-h5.js"></script>
467+
<!-- OR jquery-ui drag&drop (195k) -->
468+
<script src="node_modules/gridstack/dist/gridstack-jq.js"></script>
469+
<!-- OR static grid (40k) -->
470+
<script src="node_modules/gridstack/dist/gridstack-static.js"></script>
471+
```
472+
473+
We have a native HTML5 drag'n'drop through the plugin system (default), but the jquery-ui version can be used instead. It will bundle `jquery` (3.5.1) + `jquery-ui` (1.13.1 minimal drag|drop|resize) + `jquery-ui-touch-punch` (1.0.8 for mobile support) in `gridstack-jq.js`.
461474
462475
**NOTE: in v4, v3**: we ES6 module import jquery & jquery-ui by name, so you need to specify location of those .js files, which means you might be able to bring your own version as well. See the include instructions.
463476

doc/CHANGES.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ Change log
55
<!-- DON'T EDIT THIS SECTION, INSTEAD RE-RUN doctoc TO UPDATE -->
66
**Table of Contents** *generated with [DocToc](http://doctoc.herokuapp.com/)*
77

8-
- [6.0.0-beta (TBD)](#600-beta-tbd)
8+
- [6.0.0 (2022-08-21)](#600-2022-08-21)
99
- [5.1.1 (2022-06-16)](#511-2022-06-16)
1010
- [5.1.0 (2022-05-21)](#510-2022-05-21)
1111
- [5.0.0 (2022-01-10)](#500-2022-01-10)
@@ -69,9 +69,9 @@ Change log
6969

7070
<!-- END doctoc generated TOC please keep comment here to allow auto update -->
7171

72-
## 6.0.0-beta (TBD)
72+
## 6.0.0 (2022-08-21)
7373
* converted previous HTML5 `draggable=true` based code to simple Mouse Events and Touch mobile support for drag&Drop.
74-
* removed all jquery-ui related code, and D7D plugging as we only support native events now
74+
* removed all jquery-ui related code, and D&D plugging as we only support native events now
7575
* `alwaysShowResizeHandle` now support `'mobile'` which is the default, making it much easier (see doc)
7676
* changed `commit()` to be `batchUpdate(false)` to make it easier to turn batch on/off. updated doc. old API remains for now
7777

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "gridstack",
3-
"version": "6.0.0-beta",
3+
"version": "6.0.0",
44
"description": "TypeScript/JS lib for dashboard layout and creation, no external dependencies, with many wrappers (React, Angular, Vue, Ember, knockout...)",
55
"main": "./dist/gridstack.js",
66
"types": "./dist/gridstack.d.ts",

src/dd-base-impl.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/**
2-
* dd-base-impl.ts 6.0.0-beta
2+
* dd-base-impl.ts 6.0.0
33
* Copyright (c) 2021-2022 Alain Dumesny - see GridStack root license
44
*/
55

src/dd-draggable.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/**
2-
* dd-draggable.ts 6.0.0-beta
2+
* dd-draggable.ts 6.0.0
33
* Copyright (c) 2021-2022 Alain Dumesny - see GridStack root license
44
*/
55

src/dd-droppable.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/**
2-
* dd-droppable.ts 6.0.0-beta
2+
* dd-droppable.ts 6.0.0
33
* Copyright (c) 2021-2022 Alain Dumesny - see GridStack root license
44
*/
55

src/dd-element.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/**
2-
* dd-elements.ts 6.0.0-beta
2+
* dd-elements.ts 6.0.0
33
* Copyright (c) 2021 Alain Dumesny - see GridStack root license
44
*/
55

src/dd-gridstack.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/**
2-
* dd-gridstack.ts 6.0.0-beta
2+
* dd-gridstack.ts 6.0.0
33
* Copyright (c) 2021 Alain Dumesny - see GridStack root license
44
*/
55

src/dd-manager.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/**
2-
* dd-manager.ts 6.0.0-beta
2+
* dd-manager.ts 6.0.0
33
* Copyright (c) 2021 Alain Dumesny - see GridStack root license
44
*/
55

src/dd-resizable-handle.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/**
2-
* dd-resizable-handle.ts 6.0.0-beta
2+
* dd-resizable-handle.ts 6.0.0
33
* Copyright (c) 2021-2022 Alain Dumesny - see GridStack root license
44
*/
55

0 commit comments

Comments
 (0)