Skip to content

Commit 5120c59

Browse files
committed
v8.0.0 release
1 parent 2b82768 commit 5120c59

25 files changed

+59
-37
lines changed

Gruntfile.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -43,9 +43,9 @@ module.exports = function(grunt) {
4343
'dist/es5/gridstack-poly.js': ['src/gridstack-poly.js'],
4444
'dist/src/gridstack.scss': ['src/gridstack.scss'],
4545
'dist/src/gridstack-extra.scss': ['src/gridstack-extra.scss'],
46-
'dist/angular/README.md': ['demo/angular/src/app/README.md'],
47-
'dist/angular/gridstack.component.ts': ['demo/angular/src/app/gridstack.component.ts'],
48-
'dist/angular/gridstack-item.component.ts': ['demo/angular/src/app/gridstack-item.component.ts'],
46+
'dist/ng/README.md': ['demo/angular/src/app/README.md'],
47+
// 'dist/ng/gridstack.component.ts': ['demo/angular/src/app/gridstack.component.ts'],
48+
// 'dist/ng/gridstack-item.component.ts': ['demo/angular/src/app/gridstack-item.component.ts'],
4949
}
5050
}
5151
},

README.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,7 @@ Join us on Slack: [https://gridstackjs.slack.com](https://join.slack.com/t/grids
4444
- [Migrating to v5](#migrating-to-v5)
4545
- [Migrating to v6](#migrating-to-v6)
4646
- [Migrating to v7](#migrating-to-v7)
47+
- [Migrating to v8](#migrating-to-v8)
4748
- [jQuery Application](#jquery-application)
4849
- [Changes](#changes)
4950
- [The Team](#the-team)
@@ -444,6 +445,13 @@ The main difference is you only need to include gridstack.js and get D&D (deskto
444445
445446
New addition, no API breakage per say. See release notes about creating sub-grids on the fly.
446447
448+
## Migrating to v8
449+
450+
Possible breaking change if you use nested grid JSON format, or original Angular wrapper. Also target is now ES2020 (see release notes).
451+
* `GridStackOptions.subGrid` -> `GridStackOptions.subGridOpts` rename
452+
* We now have `GridStackWidget.subGridOpts` vs `GridStackNode.subGrid` (was `subGrid` with both types which is error prone)
453+
* `GridStackOptions.addRemoveCB` -> `GridStack.addRemoveCB` is now global instead of grid option
454+
447455
# jQuery Application
448456
449457
This is **old and no longer apply to v6+**. You'll need to use v5.1.1 and before

demo/angular/src/app/README.md

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ HTML
1515
Code
1616
```ts
1717
import { GridStack, GridStackOptions } from 'gridstack';
18-
import { gsCreateNgComponents } from './gridstack.component';
18+
import { gsCreateNgComponents } from 'gridstack/dist/ng/gridstack.component';
1919

2020
constructor() {
2121
// use the built in component creation code
@@ -48,7 +48,7 @@ Code
4848
```ts
4949
import { Component } from '@angular/core';
5050
import { GridStack, GridStackOptions } from 'gridstack';
51-
import { GridstackComponent, gsCreateNgComponents, NgGridStackWidget, nodesCB } from './gridstack.component';
51+
import { GridstackComponent, gsCreateNgComponents, NgGridStackWidget, nodesCB } from 'gridstack/dist/ng/gridstack.component';
5252

5353
// some custom components
5454
@Component({
@@ -107,7 +107,7 @@ HTML
107107
Code
108108
```javascript
109109
import { GridStackOptions, GridStackWidget } from 'gridstack';
110-
import { nodesCB } from './gridstack.component';
110+
import { nodesCB } from 'gridstack/dist/ng/gridstack.component';
111111

112112
/** sample grid options and items to load... */
113113
public gridOptions: GridStackOptions = {
@@ -138,8 +138,10 @@ to build the demo, go to demo/angular and run `yarn` + `yarn start` and Navigate
138138

139139
## Caveats
140140

141-
- This wrapper needs v8.0+ to run as it needs the latest changes
142-
- Code isn't compiled into a lib YET. You'll need to copy those files. Let me know (slack) if you are using it...
141+
- This wrapper needs:
142+
- gridstack v8.0+ to run as it needs the latest changes (use older version to match gs versions)
143+
- Angular 13+ for dynamic createComponent() API
144+
- Code in now shipped starting with v8.0+ in dist/ng for people to use directly!
143145

144146
## *ngFor Caveats
145147
- This wrapper handles well ngFor loops, but if you're using a trackBy function (as I would recommend) and no element id change after an update,

demo/angular/src/app/dummy.component.ts

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

demo/angular/src/app/gridstack-item.component.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/**
2-
* gridstack-item.component.ts 7.3.0-dev
2+
* gridstack-item.component.ts 8.0.0
33
* Copyright (c) 2022 Alain Dumesny - see GridStack root license
44
*/
55

demo/angular/src/app/gridstack.component.ts

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

demo/angular/tsconfig.lib.json

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
/* config to publish the angular wrapper classes */
2+
{
3+
"extends": "./tsconfig.json",
4+
"compilerOptions": {
5+
"outDir": ".../../../../dist/ng",
6+
"declaration": true,
7+
},
8+
"include": [
9+
"./src/app/gridstack.component.ts",
10+
"./src/app/gridstack-item.component.ts",
11+
],
12+
}

doc/CHANGES.md

Lines changed: 4 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-
- [7.3.0-dev (TBD)](#730-dev-tbd)
8+
- [8.0.0 (2023-04-29)](#800-2023-04-29)
99
- [7.3.0 (2023-04-01)](#730-2023-04-01)
1010
- [7.2.3 (2023-02-02)](#723-2023-02-02)
1111
- [7.2.2 (2023-01-16)](#722-2023-01-16)
@@ -83,15 +83,16 @@ Change log
8383

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

86-
## 7.3.0-dev (TBD)
87-
* package is now ES2020 (TS exported files), webpack all.js still umd (could be commonjs), still have es5/ files unchanged (for now)
86+
## 8.0.0 (2023-04-29)
87+
* package is now ES2020 (TS exported files), webpack all.js still umd (better than commonjs for browsers), still have es5/ files unchanged (for now)
8888
* optimize [#2243](https://github.com/gridstack/gridstack.js/issues/2243) removed `gs-min|max_w|h` attribute generated in CSS or written out as they are never used for rendering, only for initial load. This reduce our column/row CSS in half!
8989
* optimize: removed `gs-w='1'` and `gs-h='1'` dom attribute writing since we already have min-width/min-height set, no need to set more attributes.
9090
* optimize: remove `'ui-draggable'` and `'ui-resizable'` since wasn't used in CSS and we have the `-disabled` version when off (so we can use `not(xyz-disabled)`).
9191
* add: `GridStack.saveCB` global callback for each item during save so app can insert any custom data before serializing it. `save()` can now be passed optional callback
9292
* move: `GridStack.addRemoveCB` is now global instead of grid option. `load()` can still be passed different optional callback
9393
* fix: addGrid() to handle passing an existing initialized grid already
9494
* break: `GridStackOptions.subGrid` -> `GridStackOptions.subGridOpts`. We now have `GridStackWidget.subGridOpts` vs `GridStackNode.subGrid` (subclass) rather than try to merge the two at runtime since very different types...
95+
* tons of improvements for Angular wrapper.
9596

9697
## 7.3.0 (2023-04-01)
9798
* feat [#2229](https://github.com/gridstack/gridstack.js/pull/2229) support nonce for CSP. Thank you [@jedwards1211](https://github.com/jedwards1211)

package.json

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "gridstack",
3-
"version": "7.3.0-dev",
3+
"version": "8.0.0",
44
"license": "MIT",
55
"author": "Alain Dumesny <[email protected]> (https://github.com/adumesny)",
66
"contributors": [
@@ -25,9 +25,10 @@
2525
}
2626
],
2727
"scripts": {
28-
"build": "yarn --no-progress && rm -rf dist/* && grunt && yarn build:es6 && yarn build:es5 && yarn doc",
28+
"build": "yarn --no-progress && rm -rf dist/* && grunt && yarn build:es6 && yarn build:ng && yarn build:es5 && yarn doc",
2929
"build:es6": "webpack && tsc --stripInternal",
3030
"build:es5": "webpack --config es5/webpack.config.js && tsc --stripInternal --project es5/tsconfig.json",
31+
"build:ng": "tsc --stripInternal --project ./demo/angular/tsconfig.lib.json",
3132
"w": "webpack",
3233
"t": "rm -rf dist/* && grunt && tsc --stripInternal",
3334
"doc": "doctoc ./README.md && doctoc ./doc/README.md && doctoc ./doc/CHANGES.md",

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 7.3.0-dev
2+
* dd-base-impl.ts 8.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 7.3.0-dev
2+
* dd-draggable.ts 8.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 7.3.0-dev
2+
* dd-droppable.ts 8.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 7.3.0-dev
2+
* dd-elements.ts 8.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 7.3.0-dev
2+
* dd-gridstack.ts 8.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 7.3.0-dev
2+
* dd-manager.ts 8.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 7.3.0-dev
2+
* dd-resizable-handle.ts 8.0.0
33
* Copyright (c) 2021-2022 Alain Dumesny - see GridStack root license
44
*/
55

src/dd-resizable.ts

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

src/dd-touch.ts

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

src/gridstack-engine.ts

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

src/gridstack-poly.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/**
2-
* gridstack-poly.ts 7.3.0-dev used for IE and older browser support (not supported in v2-v4.3.1, but again in v4.4)
2+
* gridstack-poly.ts 8.0.0 used for IE and older browser support (not supported in v2-v4.3.1, but again in v4.4)
33
* Copyright (c) 2021 Alain Dumesny - see GridStack root license
44
*/
55

src/gridstack.scss

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/**
2-
* gridstack SASS styles 7.3.0-dev
2+
* gridstack SASS styles 8.0.0
33
* Copyright (c) 2021 Alain Dumesny - see GridStack root license
44
*/
55

src/gridstack.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*!
2-
* GridStack 7.3.0-dev
2+
* GridStack 8.0.0
33
* https://gridstackjs.com/
44
*
55
* Copyright (c) 2021-2022 Alain Dumesny
@@ -1649,7 +1649,7 @@ export class GridStack {
16491649
return this;
16501650
}
16511651

1652-
static GDRev = '7.3.0-dev';
1652+
static GDRev = '8.0.0';
16531653

16541654
/* ===========================================================================================
16551655
* drag&drop methods that used to be stubbed out and implemented in dd-gridstack.ts

src/types.ts

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

src/utils.ts

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

tsconfig.json

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,8 @@
11
{
22
"compilerOptions": {
3-
/*
4-
"allowJs": true,
5-
"esModuleInterop": true,
6-
"allowSyntheticDefaultImports": true
7-
*/
3+
// "allowJs": true,
4+
// "esModuleInterop": true,
5+
// "allowSyntheticDefaultImports": true
86
"declaration": true,
97
"emitDecoratorMetadata": true,
108
"experimentalDecorators": true,

0 commit comments

Comments
 (0)