From cc161dd3b751e4e0bbc72707e59740a03ca82b9f Mon Sep 17 00:00:00 2001 From: Alain Dumesny Date: Wed, 23 Apr 2025 18:36:16 -0700 Subject: [PATCH 01/18] v12.1.0-dev --- angular/projects/lib/src/lib/base-widget.ts | 2 +- angular/projects/lib/src/lib/gridstack-item.component.ts | 2 +- angular/projects/lib/src/lib/gridstack.component.ts | 2 +- angular/projects/lib/src/lib/gridstack.module.ts | 2 +- angular/projects/lib/src/lib/types.ts | 2 +- package.json | 2 +- src/dd-base-impl.ts | 2 +- src/dd-draggable.ts | 2 +- src/dd-droppable.ts | 2 +- src/dd-element.ts | 2 +- src/dd-gridstack.ts | 2 +- src/dd-manager.ts | 2 +- src/dd-resizable-handle.ts | 2 +- src/dd-resizable.ts | 2 +- src/dd-touch.ts | 2 +- src/gridstack-engine.ts | 2 +- src/gridstack.scss | 2 +- src/gridstack.ts | 4 ++-- src/types.ts | 2 +- src/utils.ts | 2 +- 20 files changed, 21 insertions(+), 21 deletions(-) diff --git a/angular/projects/lib/src/lib/base-widget.ts b/angular/projects/lib/src/lib/base-widget.ts index acf2a071..48469a52 100644 --- a/angular/projects/lib/src/lib/base-widget.ts +++ b/angular/projects/lib/src/lib/base-widget.ts @@ -1,5 +1,5 @@ /** - * gridstack-item.component.ts 12.1.0 + * gridstack-item.component.ts 12.1.0-dev * Copyright (c) 2022-2024 Alain Dumesny - see GridStack root license */ diff --git a/angular/projects/lib/src/lib/gridstack-item.component.ts b/angular/projects/lib/src/lib/gridstack-item.component.ts index 85ee0b78..37a6ac18 100644 --- a/angular/projects/lib/src/lib/gridstack-item.component.ts +++ b/angular/projects/lib/src/lib/gridstack-item.component.ts @@ -1,5 +1,5 @@ /** - * gridstack-item.component.ts 12.1.0 + * gridstack-item.component.ts 12.1.0-dev * Copyright (c) 2022-2024 Alain Dumesny - see GridStack root license */ diff --git a/angular/projects/lib/src/lib/gridstack.component.ts b/angular/projects/lib/src/lib/gridstack.component.ts index 1a551227..9daedcd0 100644 --- a/angular/projects/lib/src/lib/gridstack.component.ts +++ b/angular/projects/lib/src/lib/gridstack.component.ts @@ -1,5 +1,5 @@ /** - * gridstack.component.ts 12.1.0 + * gridstack.component.ts 12.1.0-dev * Copyright (c) 2022-2024 Alain Dumesny - see GridStack root license */ diff --git a/angular/projects/lib/src/lib/gridstack.module.ts b/angular/projects/lib/src/lib/gridstack.module.ts index b454489b..46e33571 100644 --- a/angular/projects/lib/src/lib/gridstack.module.ts +++ b/angular/projects/lib/src/lib/gridstack.module.ts @@ -1,5 +1,5 @@ /** - * gridstack.component.ts 12.1.0 + * gridstack.component.ts 12.1.0-dev * Copyright (c) 2022-2024 Alain Dumesny - see GridStack root license */ diff --git a/angular/projects/lib/src/lib/types.ts b/angular/projects/lib/src/lib/types.ts index 3d6df57a..112881be 100644 --- a/angular/projects/lib/src/lib/types.ts +++ b/angular/projects/lib/src/lib/types.ts @@ -1,5 +1,5 @@ /** - * gridstack-item.component.ts 12.1.0 + * gridstack-item.component.ts 12.1.0-dev * Copyright (c) 2025 Alain Dumesny - see GridStack root license */ diff --git a/package.json b/package.json index 94c36ebc..5b97dc65 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "gridstack", - "version": "12.1.0", + "version": "12.1.0-dev", "license": "MIT", "author": "Alain Dumesny (https://github.com/adumesny)", "contributors": [ diff --git a/src/dd-base-impl.ts b/src/dd-base-impl.ts index ca757b70..0d2c3840 100644 --- a/src/dd-base-impl.ts +++ b/src/dd-base-impl.ts @@ -1,5 +1,5 @@ /** - * dd-base-impl.ts 12.1.0 + * dd-base-impl.ts 12.1.0-dev * Copyright (c) 2021-2024 Alain Dumesny - see GridStack root license */ diff --git a/src/dd-draggable.ts b/src/dd-draggable.ts index 262c77a7..8711aa34 100644 --- a/src/dd-draggable.ts +++ b/src/dd-draggable.ts @@ -1,5 +1,5 @@ /** - * dd-draggable.ts 12.1.0 + * dd-draggable.ts 12.1.0-dev * Copyright (c) 2021-2024 Alain Dumesny - see GridStack root license */ diff --git a/src/dd-droppable.ts b/src/dd-droppable.ts index 2d7f81d2..6481c6a8 100644 --- a/src/dd-droppable.ts +++ b/src/dd-droppable.ts @@ -1,5 +1,5 @@ /** - * dd-droppable.ts 12.1.0 + * dd-droppable.ts 12.1.0-dev * Copyright (c) 2021-2024 Alain Dumesny - see GridStack root license */ diff --git a/src/dd-element.ts b/src/dd-element.ts index 39101210..9b613c2e 100644 --- a/src/dd-element.ts +++ b/src/dd-element.ts @@ -1,5 +1,5 @@ /** - * dd-elements.ts 12.1.0 + * dd-elements.ts 12.1.0-dev * Copyright (c) 2021-2024 Alain Dumesny - see GridStack root license */ diff --git a/src/dd-gridstack.ts b/src/dd-gridstack.ts index 41f25047..68f48446 100644 --- a/src/dd-gridstack.ts +++ b/src/dd-gridstack.ts @@ -1,5 +1,5 @@ /** - * dd-gridstack.ts 12.1.0 + * dd-gridstack.ts 12.1.0-dev * Copyright (c) 2021-2024 Alain Dumesny - see GridStack root license */ diff --git a/src/dd-manager.ts b/src/dd-manager.ts index 9b66a1d9..48cc403c 100644 --- a/src/dd-manager.ts +++ b/src/dd-manager.ts @@ -1,5 +1,5 @@ /** - * dd-manager.ts 12.1.0 + * dd-manager.ts 12.1.0-dev * Copyright (c) 2021-2024 Alain Dumesny - see GridStack root license */ diff --git a/src/dd-resizable-handle.ts b/src/dd-resizable-handle.ts index bb01857b..298baaf9 100644 --- a/src/dd-resizable-handle.ts +++ b/src/dd-resizable-handle.ts @@ -1,5 +1,5 @@ /** - * dd-resizable-handle.ts 12.1.0 + * dd-resizable-handle.ts 12.1.0-dev * Copyright (c) 2021-2024 Alain Dumesny - see GridStack root license */ diff --git a/src/dd-resizable.ts b/src/dd-resizable.ts index 2db5a3f7..de0bd393 100644 --- a/src/dd-resizable.ts +++ b/src/dd-resizable.ts @@ -1,5 +1,5 @@ /** - * dd-resizable.ts 12.1.0 + * dd-resizable.ts 12.1.0-dev * Copyright (c) 2021-2024 Alain Dumesny - see GridStack root license */ diff --git a/src/dd-touch.ts b/src/dd-touch.ts index 86f0f412..a6943159 100644 --- a/src/dd-touch.ts +++ b/src/dd-touch.ts @@ -1,5 +1,5 @@ /** - * touch.ts 12.1.0 + * touch.ts 12.1.0-dev * Copyright (c) 2021-2024 Alain Dumesny - see GridStack root license */ diff --git a/src/gridstack-engine.ts b/src/gridstack-engine.ts index 1126647a..acb4b33a 100644 --- a/src/gridstack-engine.ts +++ b/src/gridstack-engine.ts @@ -1,5 +1,5 @@ /** - * gridstack-engine.ts 12.1.0 + * gridstack-engine.ts 12.1.0-dev * Copyright (c) 2021-2024 Alain Dumesny - see GridStack root license */ diff --git a/src/gridstack.scss b/src/gridstack.scss index d0812f39..43fad25f 100644 --- a/src/gridstack.scss +++ b/src/gridstack.scss @@ -1,5 +1,5 @@ /** - * gridstack SASS styles 12.1.0 + * gridstack SASS styles 12.1.0-dev * Copyright (c) 2021-2024 Alain Dumesny - see GridStack root license */ diff --git a/src/gridstack.ts b/src/gridstack.ts index 038d02e9..6b8866ca 100644 --- a/src/gridstack.ts +++ b/src/gridstack.ts @@ -1,5 +1,5 @@ /*! - * GridStack 12.1.0 + * GridStack 12.1.0-dev * https://gridstackjs.com/ * * Copyright (c) 2021-2024 Alain Dumesny @@ -1889,7 +1889,7 @@ export class GridStack { return this; } - static GDRev = '12.1.0'; + static GDRev = '12.1.0-dev'; /* =========================================================================================== * drag&drop methods that used to be stubbed out and implemented in dd-gridstack.ts diff --git a/src/types.ts b/src/types.ts index 391c1b73..30a19fc6 100644 --- a/src/types.ts +++ b/src/types.ts @@ -1,5 +1,5 @@ /** - * types.ts 12.1.0 + * types.ts 12.1.0-dev * Copyright (c) 2021-2024 Alain Dumesny - see GridStack root license */ diff --git a/src/utils.ts b/src/utils.ts index 097329b6..1af1d3e4 100644 --- a/src/utils.ts +++ b/src/utils.ts @@ -1,5 +1,5 @@ /** - * utils.ts 12.1.0 + * utils.ts 12.1.0-dev * Copyright (c) 2021-2024 Alain Dumesny - see GridStack root license */ From 05d2e7a8801b5abb2c9f530dc5cae8c8e80db341 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Thu, 17 Apr 2025 20:49:23 +0000 Subject: [PATCH 02/18] Bump http-proxy-middleware from 2.0.7 to 2.0.9 in /angular Bumps [http-proxy-middleware](https://github.com/chimurai/http-proxy-middleware) from 2.0.7 to 2.0.9. - [Release notes](https://github.com/chimurai/http-proxy-middleware/releases) - [Changelog](https://github.com/chimurai/http-proxy-middleware/blob/v2.0.9/CHANGELOG.md) - [Commits](https://github.com/chimurai/http-proxy-middleware/compare/v2.0.7...v2.0.9) --- updated-dependencies: - dependency-name: http-proxy-middleware dependency-version: 2.0.9 dependency-type: indirect ... Signed-off-by: dependabot[bot] --- angular/yarn.lock | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/angular/yarn.lock b/angular/yarn.lock index 4cb83362..c8a30f91 100644 --- a/angular/yarn.lock +++ b/angular/yarn.lock @@ -3895,9 +3895,9 @@ http-proxy-agent@^5.0.0: debug "4" http-proxy-middleware@^2.0.3: - version "2.0.7" - resolved "https://registry.yarnpkg.com/http-proxy-middleware/-/http-proxy-middleware-2.0.7.tgz#915f236d92ae98ef48278a95dedf17e991936ec6" - integrity sha512-fgVY8AV7qU7z/MmXJ/rxwbrtQH4jBQ9m7kp3llF0liB7glmFeVZFBepQb32T3y8n8k2+AEYuMPCpinYW+/CuRA== + version "2.0.9" + resolved "https://registry.yarnpkg.com/http-proxy-middleware/-/http-proxy-middleware-2.0.9.tgz#e9e63d68afaa4eee3d147f39149ab84c0c2815ef" + integrity sha512-c1IyJYLYppU574+YI7R4QyX2ystMtVXZwIdzazUIPIJsHuWNd+mho2j+bKoHftndicGj9yh+xjd+l0yj7VeT1Q== dependencies: "@types/http-proxy" "^1.17.8" http-proxy "^1.18.1" From ca9715f79594531f22d25206dfab271ebdc332aa Mon Sep 17 00:00:00 2001 From: Alain Dumesny Date: Thu, 24 Apr 2025 07:01:29 -0700 Subject: [PATCH 03/18] doc update --- README.md | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 5f6693dd..90a58d8e 100644 --- a/README.md +++ b/README.md @@ -501,8 +501,10 @@ GridStack.renderCB = function(el: HTMLElement, w: GridStackNode) { * column and cell height code has been re-writen to use browser CSS variables, and we no longer need a tons of custom CSS classes! this fixes a long standing issue where people forget to include the right CSS for non 12 columns layouts, and a big speedup in many cases (many columns, or small cellHeight values). -**Breaking change:** -* `gridstack-extra.min.css` no longer exist, nor is custom column CSS needed. API/options hasn't changed. +**Potential breaking change:** +* `gridstack-extra.min.css` no longer exist, nor is custom column CSS classes needed. API/options hasn't changed. +* (v12.1) `ES5` folder content has been removed - was for IE support, which has been dropped. +* (v12.1) nested grid events are now sent to the main grid. You might have to adjust your workaround of this missing feature. nested.html demo has been adjusted. # jQuery Application From f9dcf664dd0cede5bb30cb668872ed5cfa3258e7 Mon Sep 17 00:00:00 2001 From: Alain Dumesny Date: Mon, 28 Apr 2025 10:02:19 -0700 Subject: [PATCH 04/18] fix opts.minRow being undefined * incorrect logic during updateOptions() making minRow=undefined, which messed getRow. --- src/gridstack.ts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/gridstack.ts b/src/gridstack.ts index 6b8866ca..78ac9ac3 100644 --- a/src/gridstack.ts +++ b/src/gridstack.ts @@ -1042,7 +1042,7 @@ export class GridStack { /** returns the current number of rows, which will be at least `minRow` if set */ public getRow(): number { - return Math.max(this.engine.getRow(), this.opts.minRow); + return Math.max(this.engine.getRow(), this.opts.minRow || 0); } /** @@ -1300,8 +1300,8 @@ export class GridStack { if (o.float !== undefined) this.float(o.float); if (o.row !== undefined) { opts.minRow = opts.maxRow = opts.row = o.row; } else { - if (opts.minRow !== undefined) opts.minRow = o.minRow; - if (opts.maxRow !== undefined) opts.maxRow = o.maxRow; + if (o.minRow !== undefined) opts.minRow = o.minRow; + if (o.maxRow !== undefined) opts.maxRow = o.maxRow; } if (o.children?.length) this.load(o.children); // TBD if we have a real need for these (more complex code) From 2048664c4aa4161807ccb8c54d72d9eb3f00df9a Mon Sep 17 00:00:00 2001 From: Alain Dumesny Date: Mon, 28 Apr 2025 10:27:30 -0700 Subject: [PATCH 05/18] ng: GridstackComponent not doing event for nested --- .../projects/lib/src/lib/gridstack.component.ts | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-) diff --git a/angular/projects/lib/src/lib/gridstack.component.ts b/angular/projects/lib/src/lib/gridstack.component.ts index 9daedcd0..3b1d7a93 100644 --- a/angular/projects/lib/src/lib/gridstack.component.ts +++ b/angular/projects/lib/src/lib/gridstack.component.ts @@ -178,8 +178,14 @@ export class GridstackComponent implements OnInit, AfterContentInit, OnDestroy { /** get all known events as easy to use Outputs for convenience */ protected hookEvents(grid?: GridStack) { if (!grid) return; + // nested grids don't have events in v12.1+ so skip + if (grid.parentGridNode) return; grid - .on('added', (event: Event, nodes: GridStackNode[]) => { this.checkEmpty(); this.addedCB.emit({event, nodes}); }) + .on('added', (event: Event, nodes: GridStackNode[]) => { + const gridComp = (nodes[0].grid?.el as GridCompHTMLElement)._gridComp || this; + gridComp.checkEmpty(); + this.addedCB.emit({event, nodes}); + }) .on('change', (event: Event, nodes: GridStackNode[]) => this.changeCB.emit({event, nodes})) .on('disable', (event: Event) => this.disableCB.emit({event})) .on('drag', (event: Event, el: GridItemHTMLElement) => this.dragCB.emit({event, el})) @@ -187,7 +193,11 @@ export class GridstackComponent implements OnInit, AfterContentInit, OnDestroy { .on('dragstop', (event: Event, el: GridItemHTMLElement) => this.dragStopCB.emit({event, el})) .on('dropped', (event: Event, previousNode: GridStackNode, newNode: GridStackNode) => this.droppedCB.emit({event, previousNode, newNode})) .on('enable', (event: Event) => this.enableCB.emit({event})) - .on('removed', (event: Event, nodes: GridStackNode[]) => { this.checkEmpty(); this.removedCB.emit({event, nodes}); }) + .on('removed', (event: Event, nodes: GridStackNode[]) => { + const gridComp = (nodes[0].grid?.el as GridCompHTMLElement)._gridComp || this; + gridComp.checkEmpty(); + this.removedCB.emit({event, nodes}); + }) .on('resize', (event: Event, el: GridItemHTMLElement) => this.resizeCB.emit({event, el})) .on('resizestart', (event: Event, el: GridItemHTMLElement) => this.resizeStartCB.emit({event, el})) .on('resizestop', (event: Event, el: GridItemHTMLElement) => this.resizeStopCB.emit({event, el})) @@ -195,6 +205,8 @@ export class GridstackComponent implements OnInit, AfterContentInit, OnDestroy { protected unhookEvents(grid?: GridStack) { if (!grid) return; + // nested grids don't have events in v12.1+ so skip + if (grid.parentGridNode) return; grid.off('added change disable drag dragstart dragstop dropped enable removed resize resizestart resizestop'); } } From 6b72b238e6b5ac5788704b5d3db5483e1353d749 Mon Sep 17 00:00:00 2001 From: Alain Dumesny Date: Mon, 28 Apr 2025 10:32:12 -0700 Subject: [PATCH 06/18] v12.1.1 --- angular/package.json | 2 +- angular/projects/lib/src/lib/base-widget.ts | 2 +- angular/projects/lib/src/lib/gridstack-item.component.ts | 2 +- angular/projects/lib/src/lib/gridstack.component.ts | 2 +- angular/projects/lib/src/lib/gridstack.module.ts | 2 +- angular/projects/lib/src/lib/types.ts | 2 +- angular/yarn.lock | 8 ++++---- doc/CHANGES.md | 4 ++++ package.json | 2 +- react/package.json | 2 +- react/yarn.lock | 8 ++++---- src/dd-base-impl.ts | 2 +- src/dd-draggable.ts | 2 +- src/dd-droppable.ts | 2 +- src/dd-element.ts | 2 +- src/dd-gridstack.ts | 2 +- src/dd-manager.ts | 2 +- src/dd-resizable-handle.ts | 2 +- src/dd-resizable.ts | 2 +- src/dd-touch.ts | 2 +- src/gridstack-engine.ts | 2 +- src/gridstack.scss | 2 +- src/gridstack.ts | 4 ++-- src/types.ts | 2 +- src/utils.ts | 2 +- 25 files changed, 35 insertions(+), 31 deletions(-) diff --git a/angular/package.json b/angular/package.json index 5047ec6a..a9f38e9d 100644 --- a/angular/package.json +++ b/angular/package.json @@ -18,7 +18,7 @@ "@angular/platform-browser": "^14", "@angular/platform-browser-dynamic": "^14", "@angular/router": "^14", - "gridstack": "^12.1.0", + "gridstack": "^12.1.1", "rxjs": "~7.5.0", "tslib": "^2.3.0", "zone.js": "~0.11.4" diff --git a/angular/projects/lib/src/lib/base-widget.ts b/angular/projects/lib/src/lib/base-widget.ts index 48469a52..a949db08 100644 --- a/angular/projects/lib/src/lib/base-widget.ts +++ b/angular/projects/lib/src/lib/base-widget.ts @@ -1,5 +1,5 @@ /** - * gridstack-item.component.ts 12.1.0-dev + * gridstack-item.component.ts 12.1.1 * Copyright (c) 2022-2024 Alain Dumesny - see GridStack root license */ diff --git a/angular/projects/lib/src/lib/gridstack-item.component.ts b/angular/projects/lib/src/lib/gridstack-item.component.ts index 37a6ac18..c9c4590c 100644 --- a/angular/projects/lib/src/lib/gridstack-item.component.ts +++ b/angular/projects/lib/src/lib/gridstack-item.component.ts @@ -1,5 +1,5 @@ /** - * gridstack-item.component.ts 12.1.0-dev + * gridstack-item.component.ts 12.1.1 * Copyright (c) 2022-2024 Alain Dumesny - see GridStack root license */ diff --git a/angular/projects/lib/src/lib/gridstack.component.ts b/angular/projects/lib/src/lib/gridstack.component.ts index 3b1d7a93..0315b238 100644 --- a/angular/projects/lib/src/lib/gridstack.component.ts +++ b/angular/projects/lib/src/lib/gridstack.component.ts @@ -1,5 +1,5 @@ /** - * gridstack.component.ts 12.1.0-dev + * gridstack.component.ts 12.1.1 * Copyright (c) 2022-2024 Alain Dumesny - see GridStack root license */ diff --git a/angular/projects/lib/src/lib/gridstack.module.ts b/angular/projects/lib/src/lib/gridstack.module.ts index 46e33571..e1fff1c8 100644 --- a/angular/projects/lib/src/lib/gridstack.module.ts +++ b/angular/projects/lib/src/lib/gridstack.module.ts @@ -1,5 +1,5 @@ /** - * gridstack.component.ts 12.1.0-dev + * gridstack.component.ts 12.1.1 * Copyright (c) 2022-2024 Alain Dumesny - see GridStack root license */ diff --git a/angular/projects/lib/src/lib/types.ts b/angular/projects/lib/src/lib/types.ts index 112881be..bdfc9391 100644 --- a/angular/projects/lib/src/lib/types.ts +++ b/angular/projects/lib/src/lib/types.ts @@ -1,5 +1,5 @@ /** - * gridstack-item.component.ts 12.1.0-dev + * gridstack-item.component.ts 12.1.1 * Copyright (c) 2025 Alain Dumesny - see GridStack root license */ diff --git a/angular/yarn.lock b/angular/yarn.lock index c8a30f91..61a66123 100644 --- a/angular/yarn.lock +++ b/angular/yarn.lock @@ -3752,10 +3752,10 @@ graceful-fs@^4.1.2, graceful-fs@^4.1.6, graceful-fs@^4.2.0, graceful-fs@^4.2.4, resolved "https://registry.yarnpkg.com/graceful-fs/-/graceful-fs-4.2.11.tgz#4183e4e8bf08bb6e05bbb2f7d2e0c8f712ca40e3" integrity sha512-RbJ5/jmFcNNCcDV5o9eTnBLJ/HszWV0P73bc+Ff4nS/rJj+YaS6IGyiOL0VoBYX+l1Wrl3k63h/KrH+nhJ0XvQ== -gridstack@^12.1.0: - version "12.1.0" - resolved "https://registry.yarnpkg.com/gridstack/-/gridstack-12.1.0.tgz#e6eb42bae61285bfc698b67f773af3fb4bff42f3" - integrity sha512-Xs1xWLSniquld8+zdvBWUSuEoCC4Fx+jOhR82EKdTM0eQmRmL3fR8mmrhCb3k3ISFoEwwiaCpA6oIKD4bBJTJQ== +gridstack@^12.1.1: + version "12.1.1" + resolved "https://registry.yarnpkg.com/gridstack/-/gridstack-12.1.1.tgz#623ea5b6560cc9509252db66fd7a529d70bd2d26" + integrity sha512-wpfNUkzVBuHJftRRMRQDpH8DPIO5NBdfE0ioIIVoXFePBzqqVTpfgttSs5IJYqO4Uj5LfnJ2fjOmsFEBqpeSwg== handle-thing@^2.0.0: version "2.0.1" diff --git a/doc/CHANGES.md b/doc/CHANGES.md index 32165bfd..aa2258e2 100644 --- a/doc/CHANGES.md +++ b/doc/CHANGES.md @@ -5,6 +5,7 @@ Change log **Table of Contents** *generated with [DocToc](http://doctoc.herokuapp.com/)* +- [12.1.1 (2024-04-28)](#1211-2024-04-28) - [12.1.0 (2024-04-23)](#1210-2024-04-23) - [12.0.0 (2025-04-12)](#1200-2025-04-12) - [11.5.1 (2025-03-23)](#1151-2025-03-23) @@ -125,6 +126,9 @@ Change log +## 12.1.1 (2024-04-28) +* fix [#3038](https://github.com/gridstack/gridstack.js/pull/3038) `updateOptions()` fix opts.minRow being undefined + ## 12.1.0 (2024-04-23) * feat [#2671](https://github.com/gridstack/gridstack.js/issues/2671) subgrid now propagate events to topmost grid. Use `el.gridstackNode.grid` to know which (sub) grid. * fix [#3028](https://github.com/gridstack/gridstack.js/pull/3028) `updateOptions()` no longer modifies passed in struct. only field we check are being handled too. diff --git a/package.json b/package.json index 5b97dc65..d051efb1 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "gridstack", - "version": "12.1.0-dev", + "version": "12.1.1", "license": "MIT", "author": "Alain Dumesny (https://github.com/adumesny)", "contributors": [ diff --git a/react/package.json b/react/package.json index 74b1f3de..85b871e9 100644 --- a/react/package.json +++ b/react/package.json @@ -11,7 +11,7 @@ "preview": "vite preview" }, "dependencies": { - "gridstack": "^12.1.0", + "gridstack": "^12.1.1", "react": "^18.3.1", "react-dom": "^18.3.1", "react-fast-compare": "^3.2.2" diff --git a/react/yarn.lock b/react/yarn.lock index 27661389..639a08bc 100644 --- a/react/yarn.lock +++ b/react/yarn.lock @@ -832,10 +832,10 @@ graphemer@^1.4.0: resolved "https://registry.yarnpkg.com/graphemer/-/graphemer-1.4.0.tgz#fb2f1d55e0e3a1849aeffc90c4fa0dd53a0e66c6" integrity sha512-EtKwoO6kxCL9WO5xipiHTZlSzBm7WLT627TqC/uVRd0HKmq8NXyebnNYxDoBi7wt8eTWrUrKXCOVaFq9x1kgag== -gridstack@^12.1.0: - version "12.1.0" - resolved "https://registry.yarnpkg.com/gridstack/-/gridstack-12.1.0.tgz#e6eb42bae61285bfc698b67f773af3fb4bff42f3" - integrity sha512-Xs1xWLSniquld8+zdvBWUSuEoCC4Fx+jOhR82EKdTM0eQmRmL3fR8mmrhCb3k3ISFoEwwiaCpA6oIKD4bBJTJQ== +gridstack@^12.1.1: + version "12.1.1" + resolved "https://registry.yarnpkg.com/gridstack/-/gridstack-12.1.1.tgz#623ea5b6560cc9509252db66fd7a529d70bd2d26" + integrity sha512-wpfNUkzVBuHJftRRMRQDpH8DPIO5NBdfE0ioIIVoXFePBzqqVTpfgttSs5IJYqO4Uj5LfnJ2fjOmsFEBqpeSwg== has-flag@^4.0.0: version "4.0.0" diff --git a/src/dd-base-impl.ts b/src/dd-base-impl.ts index 0d2c3840..b7c8604c 100644 --- a/src/dd-base-impl.ts +++ b/src/dd-base-impl.ts @@ -1,5 +1,5 @@ /** - * dd-base-impl.ts 12.1.0-dev + * dd-base-impl.ts 12.1.1 * Copyright (c) 2021-2024 Alain Dumesny - see GridStack root license */ diff --git a/src/dd-draggable.ts b/src/dd-draggable.ts index 8711aa34..42eee1d1 100644 --- a/src/dd-draggable.ts +++ b/src/dd-draggable.ts @@ -1,5 +1,5 @@ /** - * dd-draggable.ts 12.1.0-dev + * dd-draggable.ts 12.1.1 * Copyright (c) 2021-2024 Alain Dumesny - see GridStack root license */ diff --git a/src/dd-droppable.ts b/src/dd-droppable.ts index 6481c6a8..820cf9ef 100644 --- a/src/dd-droppable.ts +++ b/src/dd-droppable.ts @@ -1,5 +1,5 @@ /** - * dd-droppable.ts 12.1.0-dev + * dd-droppable.ts 12.1.1 * Copyright (c) 2021-2024 Alain Dumesny - see GridStack root license */ diff --git a/src/dd-element.ts b/src/dd-element.ts index 9b613c2e..84115684 100644 --- a/src/dd-element.ts +++ b/src/dd-element.ts @@ -1,5 +1,5 @@ /** - * dd-elements.ts 12.1.0-dev + * dd-elements.ts 12.1.1 * Copyright (c) 2021-2024 Alain Dumesny - see GridStack root license */ diff --git a/src/dd-gridstack.ts b/src/dd-gridstack.ts index 68f48446..a8d21dbf 100644 --- a/src/dd-gridstack.ts +++ b/src/dd-gridstack.ts @@ -1,5 +1,5 @@ /** - * dd-gridstack.ts 12.1.0-dev + * dd-gridstack.ts 12.1.1 * Copyright (c) 2021-2024 Alain Dumesny - see GridStack root license */ diff --git a/src/dd-manager.ts b/src/dd-manager.ts index 48cc403c..851a3707 100644 --- a/src/dd-manager.ts +++ b/src/dd-manager.ts @@ -1,5 +1,5 @@ /** - * dd-manager.ts 12.1.0-dev + * dd-manager.ts 12.1.1 * Copyright (c) 2021-2024 Alain Dumesny - see GridStack root license */ diff --git a/src/dd-resizable-handle.ts b/src/dd-resizable-handle.ts index 298baaf9..ea2dbef2 100644 --- a/src/dd-resizable-handle.ts +++ b/src/dd-resizable-handle.ts @@ -1,5 +1,5 @@ /** - * dd-resizable-handle.ts 12.1.0-dev + * dd-resizable-handle.ts 12.1.1 * Copyright (c) 2021-2024 Alain Dumesny - see GridStack root license */ diff --git a/src/dd-resizable.ts b/src/dd-resizable.ts index de0bd393..7bb6c112 100644 --- a/src/dd-resizable.ts +++ b/src/dd-resizable.ts @@ -1,5 +1,5 @@ /** - * dd-resizable.ts 12.1.0-dev + * dd-resizable.ts 12.1.1 * Copyright (c) 2021-2024 Alain Dumesny - see GridStack root license */ diff --git a/src/dd-touch.ts b/src/dd-touch.ts index a6943159..2e125c06 100644 --- a/src/dd-touch.ts +++ b/src/dd-touch.ts @@ -1,5 +1,5 @@ /** - * touch.ts 12.1.0-dev + * touch.ts 12.1.1 * Copyright (c) 2021-2024 Alain Dumesny - see GridStack root license */ diff --git a/src/gridstack-engine.ts b/src/gridstack-engine.ts index acb4b33a..9a2f4d72 100644 --- a/src/gridstack-engine.ts +++ b/src/gridstack-engine.ts @@ -1,5 +1,5 @@ /** - * gridstack-engine.ts 12.1.0-dev + * gridstack-engine.ts 12.1.1 * Copyright (c) 2021-2024 Alain Dumesny - see GridStack root license */ diff --git a/src/gridstack.scss b/src/gridstack.scss index 43fad25f..e2a1ffcf 100644 --- a/src/gridstack.scss +++ b/src/gridstack.scss @@ -1,5 +1,5 @@ /** - * gridstack SASS styles 12.1.0-dev + * gridstack SASS styles 12.1.1 * Copyright (c) 2021-2024 Alain Dumesny - see GridStack root license */ diff --git a/src/gridstack.ts b/src/gridstack.ts index 78ac9ac3..53b1fddc 100644 --- a/src/gridstack.ts +++ b/src/gridstack.ts @@ -1,5 +1,5 @@ /*! - * GridStack 12.1.0-dev + * GridStack 12.1.1 * https://gridstackjs.com/ * * Copyright (c) 2021-2024 Alain Dumesny @@ -1889,7 +1889,7 @@ export class GridStack { return this; } - static GDRev = '12.1.0-dev'; + static GDRev = '12.1.1'; /* =========================================================================================== * drag&drop methods that used to be stubbed out and implemented in dd-gridstack.ts diff --git a/src/types.ts b/src/types.ts index 30a19fc6..87901de6 100644 --- a/src/types.ts +++ b/src/types.ts @@ -1,5 +1,5 @@ /** - * types.ts 12.1.0-dev + * types.ts 12.1.1 * Copyright (c) 2021-2024 Alain Dumesny - see GridStack root license */ diff --git a/src/utils.ts b/src/utils.ts index 1af1d3e4..87318a05 100644 --- a/src/utils.ts +++ b/src/utils.ts @@ -1,5 +1,5 @@ /** - * utils.ts 12.1.0-dev + * utils.ts 12.1.1 * Copyright (c) 2021-2024 Alain Dumesny - see GridStack root license */ From c83bd550b932ad58898e5c6906ca57e75bc6ec12 Mon Sep 17 00:00:00 2001 From: Alain Dumesny Date: Sun, 4 May 2025 16:32:22 -0700 Subject: [PATCH 07/18] fix `opts.animate` again fix #3043 --- doc/CHANGES.md | 4 ++++ src/gridstack.ts | 8 ++++---- 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/doc/CHANGES.md b/doc/CHANGES.md index aa2258e2..57cc265a 100644 --- a/doc/CHANGES.md +++ b/doc/CHANGES.md @@ -126,6 +126,10 @@ Change log +## 12.1.1-dev (TBD) +* fix [#3043](https://github.com/gridstack/gridstack.js/issues/3043) fix `opts.animate` again + + ## 12.1.1 (2024-04-28) * fix [#3038](https://github.com/gridstack/gridstack.js/pull/3038) `updateOptions()` fix opts.minRow being undefined diff --git a/src/gridstack.ts b/src/gridstack.ts index 53b1fddc..2b4007d6 100644 --- a/src/gridstack.ts +++ b/src/gridstack.ts @@ -23,7 +23,7 @@ import { import { DDGridStack } from './dd-gridstack'; import { isTouch } from './dd-touch'; import { DDManager } from './dd-manager'; -import { DDElementHost } from './dd-element';/** global instance */ +import { DDElementHost } from './dd-element'; /** global instance */ const dd = new DDGridStack; // export all dependent file as well to make it easier for users to just import the main file @@ -704,7 +704,8 @@ export class GridStack { // if we are loading from empty temporarily remove animation const blank = !this.engine.nodes.length; - if (blank) this.setAnimation(false); + const noAnim = blank && this.opts.animate; + if (noAnim) this.setAnimation(false); // see if any items are missing from new layout and need to be removed first if (!blank && addRemove) { @@ -769,8 +770,7 @@ export class GridStack { delete this._ignoreLayoutsNodeChange; delete this.engine.skipCacheUpdate; prevCB ? GridStack.addRemoveCB = prevCB : delete GridStack.addRemoveCB; - // delay adding animation back - if (blank && this.opts?.animate) this.setAnimation(this.opts.animate, true); + if (noAnim) this.setAnimation(true, true); // delay adding animation back return this; } From 1f9d0c01d87004e418eea37d4bcf46698993394c Mon Sep 17 00:00:00 2001 From: Alain Dumesny Date: Sun, 4 May 2025 17:00:19 -0700 Subject: [PATCH 08/18] remove no-op 'cursor: move' CSS * fix #3044 --- doc/CHANGES.md | 1 + src/dd-draggable.ts | 2 +- src/gridstack.scss | 1 - 3 files changed, 2 insertions(+), 2 deletions(-) diff --git a/doc/CHANGES.md b/doc/CHANGES.md index 57cc265a..1f550f92 100644 --- a/doc/CHANGES.md +++ b/doc/CHANGES.md @@ -5,6 +5,7 @@ Change log **Table of Contents** *generated with [DocToc](http://doctoc.herokuapp.com/)* +- [12.1.1-dev (TBD)](#1211-dev-tbd) - [12.1.1 (2024-04-28)](#1211-2024-04-28) - [12.1.0 (2024-04-23)](#1210-2024-04-23) - [12.0.0 (2025-04-12)](#1200-2025-04-12) diff --git a/src/dd-draggable.ts b/src/dd-draggable.ts index 42eee1d1..cfd0d230 100644 --- a/src/dd-draggable.ts +++ b/src/dd-draggable.ts @@ -312,7 +312,7 @@ export class DDDraggable extends DDBaseImplement implements HTMLElementExtendOpt // TODO: set all at once with style.cssText += ... ? https://stackoverflow.com/questions/3968593 const style = this.helper.style; style.pointerEvents = 'none'; // needed for over items to get enter/leave - // style.cursor = 'move'; // TODO: can't set with pointerEvents=none ! (done in CSS as well) + // style.cursor = 'move'; // TODO: can't set with pointerEvents=none ! (no longer in CSS either as no-op) style.width = this.dragOffset.width + 'px'; style.height = this.dragOffset.height + 'px'; style.willChange = 'left, top'; diff --git a/src/gridstack.scss b/src/gridstack.scss index e2a1ffcf..868b3fa9 100644 --- a/src/gridstack.scss +++ b/src/gridstack.scss @@ -118,7 +118,6 @@ $animation_speed: .3s !default; &.ui-draggable-dragging { will-change: left, top; - cursor: move; } &.ui-resizable-resizing { From 059952494394fd4481c53db77d3cdb800c2a4f19 Mon Sep 17 00:00:00 2001 From: Alain Dumesny Date: Wed, 7 May 2025 14:15:11 -0700 Subject: [PATCH 09/18] nested grid resizeToContentCBCheck() fix * make sure nested items size they parent item even when in batch mode (eg: load()) otherwise it never happens --- doc/CHANGES.md | 1 + src/gridstack.ts | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/doc/CHANGES.md b/doc/CHANGES.md index 1f550f92..8e79b166 100644 --- a/doc/CHANGES.md +++ b/doc/CHANGES.md @@ -129,6 +129,7 @@ Change log ## 12.1.1-dev (TBD) * fix [#3043](https://github.com/gridstack/gridstack.js/issues/3043) fix `opts.animate` again +* fix [#3047](https://github.com/gridstack/gridstack.js/pull/3047) nested grid resizeToContentCBCheck() fix ## 12.1.1 (2024-04-28) diff --git a/src/gridstack.ts b/src/gridstack.ts index 2b4007d6..913d1b47 100644 --- a/src/gridstack.ts +++ b/src/gridstack.ts @@ -1616,7 +1616,7 @@ export class GridStack { } // if we're a nested grid inside an sizeToContent item, tell it to resize itself too - if (parent && !parent.grid.engine.batchMode && Utils.shouldSizeToContent(parent)) { + if (parent && Utils.shouldSizeToContent(parent)) { parent.grid.resizeToContentCBCheck(parent.el); } From 653e98deb152debbd1cc9b3015583c5c6c6d68cf Mon Sep 17 00:00:00 2001 From: Alain Dumesny Date: Wed, 7 May 2025 14:22:35 -0700 Subject: [PATCH 10/18] more `opts.animate` * better fix #3043 --- doc/CHANGES.md | 2 +- src/gridstack.ts | 11 +++++------ 2 files changed, 6 insertions(+), 7 deletions(-) diff --git a/doc/CHANGES.md b/doc/CHANGES.md index 8e79b166..c390b72e 100644 --- a/doc/CHANGES.md +++ b/doc/CHANGES.md @@ -129,7 +129,7 @@ Change log ## 12.1.1-dev (TBD) * fix [#3043](https://github.com/gridstack/gridstack.js/issues/3043) fix `opts.animate` again -* fix [#3047](https://github.com/gridstack/gridstack.js/pull/3047) nested grid resizeToContentCBCheck() fix +* fix [#3048](https://github.com/gridstack/gridstack.js/pull/3048) nested grid resizeToContentCBCheck() fix ## 12.1.1 (2024-04-28) diff --git a/src/gridstack.ts b/src/gridstack.ts index 913d1b47..d8e3bb5e 100644 --- a/src/gridstack.ts +++ b/src/gridstack.ts @@ -2251,9 +2251,11 @@ export class GridStack { delete this.placeholder.gridstackNode; // disable animation when replacing a placeholder (already positioned) with actual content - const noAnim = wasAdded && this.opts.animate; - if (noAnim) this.setAnimation(false); - + if (wasAdded && this.opts.animate) { + this.setAnimation(false); + this.setAnimation(true, true); // delay adding back + } + // notify previous grid of removal // console.log('drop delete _gridstackNodeOrig') // TEST const origNode = el._gridstackNodeOrig; @@ -2314,9 +2316,6 @@ export class GridStack { this._gsEventHandler['dropped']({ ...event, type: 'dropped' }, origNode && origNode.grid ? origNode : undefined, node); } - // delay adding animation back - if (noAnim) this.setAnimation(this.opts.animate, true); - return false; // prevent parent from receiving msg (which may be grid as well) }); return this; From 54e2a4a9bb5895a11cc71ed0f57c19f2e8be6e1f Mon Sep 17 00:00:00 2001 From: Alain Dumesny Date: Wed, 7 May 2025 14:27:50 -0700 Subject: [PATCH 11/18] v12.1.2 --- angular/package.json | 2 +- angular/projects/lib/src/lib/base-widget.ts | 2 +- angular/projects/lib/src/lib/gridstack-item.component.ts | 2 +- angular/projects/lib/src/lib/gridstack.component.ts | 8 +++++--- angular/projects/lib/src/lib/gridstack.module.ts | 2 +- angular/projects/lib/src/lib/types.ts | 2 +- angular/yarn.lock | 8 ++++---- doc/CHANGES.md | 5 ++--- package.json | 2 +- react/package.json | 2 +- react/yarn.lock | 8 ++++---- src/dd-base-impl.ts | 2 +- src/dd-draggable.ts | 2 +- src/dd-droppable.ts | 2 +- src/dd-element.ts | 2 +- src/dd-gridstack.ts | 2 +- src/dd-manager.ts | 2 +- src/dd-resizable-handle.ts | 2 +- src/dd-resizable.ts | 2 +- src/dd-touch.ts | 2 +- src/gridstack-engine.ts | 2 +- src/gridstack.scss | 2 +- src/gridstack.ts | 6 +++--- src/types.ts | 2 +- src/utils.ts | 2 +- 25 files changed, 38 insertions(+), 37 deletions(-) diff --git a/angular/package.json b/angular/package.json index a9f38e9d..4365ad85 100644 --- a/angular/package.json +++ b/angular/package.json @@ -18,7 +18,7 @@ "@angular/platform-browser": "^14", "@angular/platform-browser-dynamic": "^14", "@angular/router": "^14", - "gridstack": "^12.1.1", + "gridstack": "^12.1.2", "rxjs": "~7.5.0", "tslib": "^2.3.0", "zone.js": "~0.11.4" diff --git a/angular/projects/lib/src/lib/base-widget.ts b/angular/projects/lib/src/lib/base-widget.ts index a949db08..26d8aa3e 100644 --- a/angular/projects/lib/src/lib/base-widget.ts +++ b/angular/projects/lib/src/lib/base-widget.ts @@ -1,5 +1,5 @@ /** - * gridstack-item.component.ts 12.1.1 + * gridstack-item.component.ts 12.1.2 * Copyright (c) 2022-2024 Alain Dumesny - see GridStack root license */ diff --git a/angular/projects/lib/src/lib/gridstack-item.component.ts b/angular/projects/lib/src/lib/gridstack-item.component.ts index c9c4590c..d5c8770e 100644 --- a/angular/projects/lib/src/lib/gridstack-item.component.ts +++ b/angular/projects/lib/src/lib/gridstack-item.component.ts @@ -1,5 +1,5 @@ /** - * gridstack-item.component.ts 12.1.1 + * gridstack-item.component.ts 12.1.2 * Copyright (c) 2022-2024 Alain Dumesny - see GridStack root license */ diff --git a/angular/projects/lib/src/lib/gridstack.component.ts b/angular/projects/lib/src/lib/gridstack.component.ts index 0315b238..59440ff1 100644 --- a/angular/projects/lib/src/lib/gridstack.component.ts +++ b/angular/projects/lib/src/lib/gridstack.component.ts @@ -1,10 +1,12 @@ /** - * gridstack.component.ts 12.1.1 + * gridstack.component.ts 12.1.2 * Copyright (c) 2022-2024 Alain Dumesny - see GridStack root license */ -import { AfterContentInit, Component, ContentChildren, ElementRef, EventEmitter, Input, - OnDestroy, OnInit, Output, QueryList, Type, ViewChild, ViewContainerRef, reflectComponentType, ComponentRef } from '@angular/core'; +import { + AfterContentInit, Component, ContentChildren, ElementRef, EventEmitter, Input, + OnDestroy, OnInit, Output, QueryList, Type, ViewChild, ViewContainerRef, reflectComponentType, ComponentRef +} from '@angular/core'; import { NgIf } from '@angular/common'; import { Subscription } from 'rxjs'; import { GridHTMLElement, GridItemHTMLElement, GridStack, GridStackNode, GridStackOptions, GridStackWidget } from 'gridstack'; diff --git a/angular/projects/lib/src/lib/gridstack.module.ts b/angular/projects/lib/src/lib/gridstack.module.ts index e1fff1c8..64479fcf 100644 --- a/angular/projects/lib/src/lib/gridstack.module.ts +++ b/angular/projects/lib/src/lib/gridstack.module.ts @@ -1,5 +1,5 @@ /** - * gridstack.component.ts 12.1.1 + * gridstack.component.ts 12.1.2 * Copyright (c) 2022-2024 Alain Dumesny - see GridStack root license */ diff --git a/angular/projects/lib/src/lib/types.ts b/angular/projects/lib/src/lib/types.ts index bdfc9391..15af50f4 100644 --- a/angular/projects/lib/src/lib/types.ts +++ b/angular/projects/lib/src/lib/types.ts @@ -1,5 +1,5 @@ /** - * gridstack-item.component.ts 12.1.1 + * gridstack-item.component.ts 12.1.2 * Copyright (c) 2025 Alain Dumesny - see GridStack root license */ diff --git a/angular/yarn.lock b/angular/yarn.lock index 61a66123..3e6f405b 100644 --- a/angular/yarn.lock +++ b/angular/yarn.lock @@ -3752,10 +3752,10 @@ graceful-fs@^4.1.2, graceful-fs@^4.1.6, graceful-fs@^4.2.0, graceful-fs@^4.2.4, resolved "https://registry.yarnpkg.com/graceful-fs/-/graceful-fs-4.2.11.tgz#4183e4e8bf08bb6e05bbb2f7d2e0c8f712ca40e3" integrity sha512-RbJ5/jmFcNNCcDV5o9eTnBLJ/HszWV0P73bc+Ff4nS/rJj+YaS6IGyiOL0VoBYX+l1Wrl3k63h/KrH+nhJ0XvQ== -gridstack@^12.1.1: - version "12.1.1" - resolved "https://registry.yarnpkg.com/gridstack/-/gridstack-12.1.1.tgz#623ea5b6560cc9509252db66fd7a529d70bd2d26" - integrity sha512-wpfNUkzVBuHJftRRMRQDpH8DPIO5NBdfE0ioIIVoXFePBzqqVTpfgttSs5IJYqO4Uj5LfnJ2fjOmsFEBqpeSwg== +gridstack@^12.1.2: + version "12.1.2" + resolved "https://registry.yarnpkg.com/gridstack/-/gridstack-12.1.2.tgz#784f6d55873bb48fa9230c1284f769c9fbf785a8" + integrity sha512-IC1mkm5xonhAnftwIxsG+B3bawxC61ciKWEvX15ExpVQPbNVN7O9aZZhM7Y/eE4JaIR8PXrdkjd12gMnwNYRLQ== handle-thing@^2.0.0: version "2.0.1" diff --git a/doc/CHANGES.md b/doc/CHANGES.md index c390b72e..79bde722 100644 --- a/doc/CHANGES.md +++ b/doc/CHANGES.md @@ -5,7 +5,7 @@ Change log **Table of Contents** *generated with [DocToc](http://doctoc.herokuapp.com/)* -- [12.1.1-dev (TBD)](#1211-dev-tbd) +- [12.1.2 (2024-05-07)](#1212-2024-05-07) - [12.1.1 (2024-04-28)](#1211-2024-04-28) - [12.1.0 (2024-04-23)](#1210-2024-04-23) - [12.0.0 (2025-04-12)](#1200-2025-04-12) @@ -127,11 +127,10 @@ Change log -## 12.1.1-dev (TBD) +## 12.1.2 (2024-05-07) * fix [#3043](https://github.com/gridstack/gridstack.js/issues/3043) fix `opts.animate` again * fix [#3048](https://github.com/gridstack/gridstack.js/pull/3048) nested grid resizeToContentCBCheck() fix - ## 12.1.1 (2024-04-28) * fix [#3038](https://github.com/gridstack/gridstack.js/pull/3038) `updateOptions()` fix opts.minRow being undefined diff --git a/package.json b/package.json index d051efb1..39a558ff 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "gridstack", - "version": "12.1.1", + "version": "12.1.2", "license": "MIT", "author": "Alain Dumesny (https://github.com/adumesny)", "contributors": [ diff --git a/react/package.json b/react/package.json index 85b871e9..dd2f1d89 100644 --- a/react/package.json +++ b/react/package.json @@ -11,7 +11,7 @@ "preview": "vite preview" }, "dependencies": { - "gridstack": "^12.1.1", + "gridstack": "^12.1.2", "react": "^18.3.1", "react-dom": "^18.3.1", "react-fast-compare": "^3.2.2" diff --git a/react/yarn.lock b/react/yarn.lock index 639a08bc..27864976 100644 --- a/react/yarn.lock +++ b/react/yarn.lock @@ -832,10 +832,10 @@ graphemer@^1.4.0: resolved "https://registry.yarnpkg.com/graphemer/-/graphemer-1.4.0.tgz#fb2f1d55e0e3a1849aeffc90c4fa0dd53a0e66c6" integrity sha512-EtKwoO6kxCL9WO5xipiHTZlSzBm7WLT627TqC/uVRd0HKmq8NXyebnNYxDoBi7wt8eTWrUrKXCOVaFq9x1kgag== -gridstack@^12.1.1: - version "12.1.1" - resolved "https://registry.yarnpkg.com/gridstack/-/gridstack-12.1.1.tgz#623ea5b6560cc9509252db66fd7a529d70bd2d26" - integrity sha512-wpfNUkzVBuHJftRRMRQDpH8DPIO5NBdfE0ioIIVoXFePBzqqVTpfgttSs5IJYqO4Uj5LfnJ2fjOmsFEBqpeSwg== +gridstack@^12.1.2: + version "12.1.2" + resolved "https://registry.yarnpkg.com/gridstack/-/gridstack-12.1.2.tgz#784f6d55873bb48fa9230c1284f769c9fbf785a8" + integrity sha512-IC1mkm5xonhAnftwIxsG+B3bawxC61ciKWEvX15ExpVQPbNVN7O9aZZhM7Y/eE4JaIR8PXrdkjd12gMnwNYRLQ== has-flag@^4.0.0: version "4.0.0" diff --git a/src/dd-base-impl.ts b/src/dd-base-impl.ts index b7c8604c..1185d7f3 100644 --- a/src/dd-base-impl.ts +++ b/src/dd-base-impl.ts @@ -1,5 +1,5 @@ /** - * dd-base-impl.ts 12.1.1 + * dd-base-impl.ts 12.1.2 * Copyright (c) 2021-2024 Alain Dumesny - see GridStack root license */ diff --git a/src/dd-draggable.ts b/src/dd-draggable.ts index cfd0d230..679d7894 100644 --- a/src/dd-draggable.ts +++ b/src/dd-draggable.ts @@ -1,5 +1,5 @@ /** - * dd-draggable.ts 12.1.1 + * dd-draggable.ts 12.1.2 * Copyright (c) 2021-2024 Alain Dumesny - see GridStack root license */ diff --git a/src/dd-droppable.ts b/src/dd-droppable.ts index 820cf9ef..f000771e 100644 --- a/src/dd-droppable.ts +++ b/src/dd-droppable.ts @@ -1,5 +1,5 @@ /** - * dd-droppable.ts 12.1.1 + * dd-droppable.ts 12.1.2 * Copyright (c) 2021-2024 Alain Dumesny - see GridStack root license */ diff --git a/src/dd-element.ts b/src/dd-element.ts index 84115684..b00ee516 100644 --- a/src/dd-element.ts +++ b/src/dd-element.ts @@ -1,5 +1,5 @@ /** - * dd-elements.ts 12.1.1 + * dd-elements.ts 12.1.2 * Copyright (c) 2021-2024 Alain Dumesny - see GridStack root license */ diff --git a/src/dd-gridstack.ts b/src/dd-gridstack.ts index a8d21dbf..a10f8f1b 100644 --- a/src/dd-gridstack.ts +++ b/src/dd-gridstack.ts @@ -1,5 +1,5 @@ /** - * dd-gridstack.ts 12.1.1 + * dd-gridstack.ts 12.1.2 * Copyright (c) 2021-2024 Alain Dumesny - see GridStack root license */ diff --git a/src/dd-manager.ts b/src/dd-manager.ts index 851a3707..469c96e8 100644 --- a/src/dd-manager.ts +++ b/src/dd-manager.ts @@ -1,5 +1,5 @@ /** - * dd-manager.ts 12.1.1 + * dd-manager.ts 12.1.2 * Copyright (c) 2021-2024 Alain Dumesny - see GridStack root license */ diff --git a/src/dd-resizable-handle.ts b/src/dd-resizable-handle.ts index ea2dbef2..012f350f 100644 --- a/src/dd-resizable-handle.ts +++ b/src/dd-resizable-handle.ts @@ -1,5 +1,5 @@ /** - * dd-resizable-handle.ts 12.1.1 + * dd-resizable-handle.ts 12.1.2 * Copyright (c) 2021-2024 Alain Dumesny - see GridStack root license */ diff --git a/src/dd-resizable.ts b/src/dd-resizable.ts index 7bb6c112..21ec6f7b 100644 --- a/src/dd-resizable.ts +++ b/src/dd-resizable.ts @@ -1,5 +1,5 @@ /** - * dd-resizable.ts 12.1.1 + * dd-resizable.ts 12.1.2 * Copyright (c) 2021-2024 Alain Dumesny - see GridStack root license */ diff --git a/src/dd-touch.ts b/src/dd-touch.ts index 2e125c06..1c826c24 100644 --- a/src/dd-touch.ts +++ b/src/dd-touch.ts @@ -1,5 +1,5 @@ /** - * touch.ts 12.1.1 + * touch.ts 12.1.2 * Copyright (c) 2021-2024 Alain Dumesny - see GridStack root license */ diff --git a/src/gridstack-engine.ts b/src/gridstack-engine.ts index 9a2f4d72..be4de847 100644 --- a/src/gridstack-engine.ts +++ b/src/gridstack-engine.ts @@ -1,5 +1,5 @@ /** - * gridstack-engine.ts 12.1.1 + * gridstack-engine.ts 12.1.2 * Copyright (c) 2021-2024 Alain Dumesny - see GridStack root license */ diff --git a/src/gridstack.scss b/src/gridstack.scss index 868b3fa9..84a54cbc 100644 --- a/src/gridstack.scss +++ b/src/gridstack.scss @@ -1,5 +1,5 @@ /** - * gridstack SASS styles 12.1.1 + * gridstack SASS styles 12.1.2 * Copyright (c) 2021-2024 Alain Dumesny - see GridStack root license */ diff --git a/src/gridstack.ts b/src/gridstack.ts index d8e3bb5e..306692c3 100644 --- a/src/gridstack.ts +++ b/src/gridstack.ts @@ -1,5 +1,5 @@ /*! - * GridStack 12.1.1 + * GridStack 12.1.2 * https://gridstackjs.com/ * * Copyright (c) 2021-2024 Alain Dumesny @@ -1889,7 +1889,7 @@ export class GridStack { return this; } - static GDRev = '12.1.1'; + static GDRev = '12.1.2'; /* =========================================================================================== * drag&drop methods that used to be stubbed out and implemented in dd-gridstack.ts @@ -2255,7 +2255,7 @@ export class GridStack { this.setAnimation(false); this.setAnimation(true, true); // delay adding back } - + // notify previous grid of removal // console.log('drop delete _gridstackNodeOrig') // TEST const origNode = el._gridstackNodeOrig; diff --git a/src/types.ts b/src/types.ts index 87901de6..6427e65f 100644 --- a/src/types.ts +++ b/src/types.ts @@ -1,5 +1,5 @@ /** - * types.ts 12.1.1 + * types.ts 12.1.2 * Copyright (c) 2021-2024 Alain Dumesny - see GridStack root license */ diff --git a/src/utils.ts b/src/utils.ts index 87318a05..352e5f32 100644 --- a/src/utils.ts +++ b/src/utils.ts @@ -1,5 +1,5 @@ /** - * utils.ts 12.1.1 + * utils.ts 12.1.2 * Copyright (c) 2021-2024 Alain Dumesny - see GridStack root license */ From 0c13251261d6e6c2c645ae6a49962d0afbf98c09 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 7 May 2025 21:28:27 +0000 Subject: [PATCH 12/18] Bump vite from 5.4.18 to 5.4.19 in /react Bumps [vite](https://github.com/vitejs/vite/tree/HEAD/packages/vite) from 5.4.18 to 5.4.19. - [Release notes](https://github.com/vitejs/vite/releases) - [Changelog](https://github.com/vitejs/vite/blob/v5.4.19/packages/vite/CHANGELOG.md) - [Commits](https://github.com/vitejs/vite/commits/v5.4.19/packages/vite) --- updated-dependencies: - dependency-name: vite dependency-version: 5.4.19 dependency-type: direct:development ... Signed-off-by: dependabot[bot] --- react/package.json | 2 +- react/yarn.lock | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/react/package.json b/react/package.json index dd2f1d89..0fd3c256 100644 --- a/react/package.json +++ b/react/package.json @@ -27,6 +27,6 @@ "globals": "^15.9.0", "typescript": "^5.5.3", "typescript-eslint": "^8.0.1", - "vite": "^5.4.18" + "vite": "^5.4.19" } } diff --git a/react/yarn.lock b/react/yarn.lock index 27864976..b06d91af 100644 --- a/react/yarn.lock +++ b/react/yarn.lock @@ -1222,10 +1222,10 @@ uri-js@^4.2.2: dependencies: punycode "^2.1.0" -vite@^5.4.18: - version "5.4.18" - resolved "https://registry.yarnpkg.com/vite/-/vite-5.4.18.tgz#b5af357f9d5ebb2e0c085779b7a37a77f09168a4" - integrity sha512-1oDcnEp3lVyHCuQ2YFelM4Alm2o91xNoMncRm1U7S+JdYfYOvbiGZ3/CxGttrOu2M/KcGz7cRC2DoNUA6urmMA== +vite@^5.4.19: + version "5.4.19" + resolved "https://registry.yarnpkg.com/vite/-/vite-5.4.19.tgz#20efd060410044b3ed555049418a5e7d1998f959" + integrity sha512-qO3aKv3HoQC8QKiNSTuUM1l9o/XX3+c+VTgLHbJWHZGeTPVAg2XwazI9UWzoxjIJCGCV2zU60uqMzjeLZuULqA== dependencies: esbuild "^0.21.3" postcss "^8.4.43" From 25c015e892c6d7dcbeda9bcdd4a45d9191266b33 Mon Sep 17 00:00:00 2001 From: Alain Dumesny Date: Wed, 7 May 2025 14:36:59 -0700 Subject: [PATCH 13/18] v12.1.2-dev --- angular/projects/lib/src/lib/base-widget.ts | 2 +- angular/projects/lib/src/lib/gridstack-item.component.ts | 2 +- angular/projects/lib/src/lib/gridstack.component.ts | 2 +- angular/projects/lib/src/lib/gridstack.module.ts | 2 +- angular/projects/lib/src/lib/types.ts | 2 +- doc/CHANGES.md | 4 ++-- package.json | 2 +- src/dd-base-impl.ts | 2 +- src/dd-draggable.ts | 2 +- src/dd-droppable.ts | 2 +- src/dd-element.ts | 2 +- src/dd-gridstack.ts | 2 +- src/dd-manager.ts | 2 +- src/dd-resizable-handle.ts | 2 +- src/dd-resizable.ts | 2 +- src/dd-touch.ts | 2 +- src/gridstack-engine.ts | 2 +- src/gridstack.scss | 2 +- src/gridstack.ts | 4 ++-- src/types.ts | 2 +- src/utils.ts | 2 +- 21 files changed, 23 insertions(+), 23 deletions(-) diff --git a/angular/projects/lib/src/lib/base-widget.ts b/angular/projects/lib/src/lib/base-widget.ts index 26d8aa3e..a76196ca 100644 --- a/angular/projects/lib/src/lib/base-widget.ts +++ b/angular/projects/lib/src/lib/base-widget.ts @@ -1,5 +1,5 @@ /** - * gridstack-item.component.ts 12.1.2 + * gridstack-item.component.ts 12.1.2-dev * Copyright (c) 2022-2024 Alain Dumesny - see GridStack root license */ diff --git a/angular/projects/lib/src/lib/gridstack-item.component.ts b/angular/projects/lib/src/lib/gridstack-item.component.ts index d5c8770e..0582525b 100644 --- a/angular/projects/lib/src/lib/gridstack-item.component.ts +++ b/angular/projects/lib/src/lib/gridstack-item.component.ts @@ -1,5 +1,5 @@ /** - * gridstack-item.component.ts 12.1.2 + * gridstack-item.component.ts 12.1.2-dev * Copyright (c) 2022-2024 Alain Dumesny - see GridStack root license */ diff --git a/angular/projects/lib/src/lib/gridstack.component.ts b/angular/projects/lib/src/lib/gridstack.component.ts index 59440ff1..3f851659 100644 --- a/angular/projects/lib/src/lib/gridstack.component.ts +++ b/angular/projects/lib/src/lib/gridstack.component.ts @@ -1,5 +1,5 @@ /** - * gridstack.component.ts 12.1.2 + * gridstack.component.ts 12.1.2-dev * Copyright (c) 2022-2024 Alain Dumesny - see GridStack root license */ diff --git a/angular/projects/lib/src/lib/gridstack.module.ts b/angular/projects/lib/src/lib/gridstack.module.ts index 64479fcf..3b1bd76a 100644 --- a/angular/projects/lib/src/lib/gridstack.module.ts +++ b/angular/projects/lib/src/lib/gridstack.module.ts @@ -1,5 +1,5 @@ /** - * gridstack.component.ts 12.1.2 + * gridstack.component.ts 12.1.2-dev * Copyright (c) 2022-2024 Alain Dumesny - see GridStack root license */ diff --git a/angular/projects/lib/src/lib/types.ts b/angular/projects/lib/src/lib/types.ts index 15af50f4..0366ef58 100644 --- a/angular/projects/lib/src/lib/types.ts +++ b/angular/projects/lib/src/lib/types.ts @@ -1,5 +1,5 @@ /** - * gridstack-item.component.ts 12.1.2 + * gridstack-item.component.ts 12.1.2-dev * Copyright (c) 2025 Alain Dumesny - see GridStack root license */ diff --git a/doc/CHANGES.md b/doc/CHANGES.md index 79bde722..4644fac0 100644 --- a/doc/CHANGES.md +++ b/doc/CHANGES.md @@ -5,7 +5,7 @@ Change log **Table of Contents** *generated with [DocToc](http://doctoc.herokuapp.com/)* -- [12.1.2 (2024-05-07)](#1212-2024-05-07) +- [12.1.2-dev (2024-05-07)](#1212-2024-05-07) - [12.1.1 (2024-04-28)](#1211-2024-04-28) - [12.1.0 (2024-04-23)](#1210-2024-04-23) - [12.0.0 (2025-04-12)](#1200-2025-04-12) @@ -127,7 +127,7 @@ Change log -## 12.1.2 (2024-05-07) +## 12.1.2-dev (2024-05-07) * fix [#3043](https://github.com/gridstack/gridstack.js/issues/3043) fix `opts.animate` again * fix [#3048](https://github.com/gridstack/gridstack.js/pull/3048) nested grid resizeToContentCBCheck() fix diff --git a/package.json b/package.json index 39a558ff..0a6cba36 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "gridstack", - "version": "12.1.2", + "version": "12.1.2-dev", "license": "MIT", "author": "Alain Dumesny (https://github.com/adumesny)", "contributors": [ diff --git a/src/dd-base-impl.ts b/src/dd-base-impl.ts index 1185d7f3..b320864b 100644 --- a/src/dd-base-impl.ts +++ b/src/dd-base-impl.ts @@ -1,5 +1,5 @@ /** - * dd-base-impl.ts 12.1.2 + * dd-base-impl.ts 12.1.2-dev * Copyright (c) 2021-2024 Alain Dumesny - see GridStack root license */ diff --git a/src/dd-draggable.ts b/src/dd-draggable.ts index 679d7894..d1361b9e 100644 --- a/src/dd-draggable.ts +++ b/src/dd-draggable.ts @@ -1,5 +1,5 @@ /** - * dd-draggable.ts 12.1.2 + * dd-draggable.ts 12.1.2-dev * Copyright (c) 2021-2024 Alain Dumesny - see GridStack root license */ diff --git a/src/dd-droppable.ts b/src/dd-droppable.ts index f000771e..3c196692 100644 --- a/src/dd-droppable.ts +++ b/src/dd-droppable.ts @@ -1,5 +1,5 @@ /** - * dd-droppable.ts 12.1.2 + * dd-droppable.ts 12.1.2-dev * Copyright (c) 2021-2024 Alain Dumesny - see GridStack root license */ diff --git a/src/dd-element.ts b/src/dd-element.ts index b00ee516..3b6a5a02 100644 --- a/src/dd-element.ts +++ b/src/dd-element.ts @@ -1,5 +1,5 @@ /** - * dd-elements.ts 12.1.2 + * dd-elements.ts 12.1.2-dev * Copyright (c) 2021-2024 Alain Dumesny - see GridStack root license */ diff --git a/src/dd-gridstack.ts b/src/dd-gridstack.ts index a10f8f1b..e7f24cad 100644 --- a/src/dd-gridstack.ts +++ b/src/dd-gridstack.ts @@ -1,5 +1,5 @@ /** - * dd-gridstack.ts 12.1.2 + * dd-gridstack.ts 12.1.2-dev * Copyright (c) 2021-2024 Alain Dumesny - see GridStack root license */ diff --git a/src/dd-manager.ts b/src/dd-manager.ts index 469c96e8..55ef30ff 100644 --- a/src/dd-manager.ts +++ b/src/dd-manager.ts @@ -1,5 +1,5 @@ /** - * dd-manager.ts 12.1.2 + * dd-manager.ts 12.1.2-dev * Copyright (c) 2021-2024 Alain Dumesny - see GridStack root license */ diff --git a/src/dd-resizable-handle.ts b/src/dd-resizable-handle.ts index 012f350f..18a5460a 100644 --- a/src/dd-resizable-handle.ts +++ b/src/dd-resizable-handle.ts @@ -1,5 +1,5 @@ /** - * dd-resizable-handle.ts 12.1.2 + * dd-resizable-handle.ts 12.1.2-dev * Copyright (c) 2021-2024 Alain Dumesny - see GridStack root license */ diff --git a/src/dd-resizable.ts b/src/dd-resizable.ts index 21ec6f7b..e2c40e8d 100644 --- a/src/dd-resizable.ts +++ b/src/dd-resizable.ts @@ -1,5 +1,5 @@ /** - * dd-resizable.ts 12.1.2 + * dd-resizable.ts 12.1.2-dev * Copyright (c) 2021-2024 Alain Dumesny - see GridStack root license */ diff --git a/src/dd-touch.ts b/src/dd-touch.ts index 1c826c24..11ac0859 100644 --- a/src/dd-touch.ts +++ b/src/dd-touch.ts @@ -1,5 +1,5 @@ /** - * touch.ts 12.1.2 + * touch.ts 12.1.2-dev * Copyright (c) 2021-2024 Alain Dumesny - see GridStack root license */ diff --git a/src/gridstack-engine.ts b/src/gridstack-engine.ts index be4de847..3d2c1dc4 100644 --- a/src/gridstack-engine.ts +++ b/src/gridstack-engine.ts @@ -1,5 +1,5 @@ /** - * gridstack-engine.ts 12.1.2 + * gridstack-engine.ts 12.1.2-dev * Copyright (c) 2021-2024 Alain Dumesny - see GridStack root license */ diff --git a/src/gridstack.scss b/src/gridstack.scss index 84a54cbc..7ae1d6d0 100644 --- a/src/gridstack.scss +++ b/src/gridstack.scss @@ -1,5 +1,5 @@ /** - * gridstack SASS styles 12.1.2 + * gridstack SASS styles 12.1.2-dev * Copyright (c) 2021-2024 Alain Dumesny - see GridStack root license */ diff --git a/src/gridstack.ts b/src/gridstack.ts index 306692c3..726296ad 100644 --- a/src/gridstack.ts +++ b/src/gridstack.ts @@ -1,5 +1,5 @@ /*! - * GridStack 12.1.2 + * GridStack 12.1.2-dev * https://gridstackjs.com/ * * Copyright (c) 2021-2024 Alain Dumesny @@ -1889,7 +1889,7 @@ export class GridStack { return this; } - static GDRev = '12.1.2'; + static GDRev = '12.1.2-dev'; /* =========================================================================================== * drag&drop methods that used to be stubbed out and implemented in dd-gridstack.ts diff --git a/src/types.ts b/src/types.ts index 6427e65f..644d7b05 100644 --- a/src/types.ts +++ b/src/types.ts @@ -1,5 +1,5 @@ /** - * types.ts 12.1.2 + * types.ts 12.1.2-dev * Copyright (c) 2021-2024 Alain Dumesny - see GridStack root license */ diff --git a/src/utils.ts b/src/utils.ts index 352e5f32..5e833eef 100644 --- a/src/utils.ts +++ b/src/utils.ts @@ -1,5 +1,5 @@ /** - * utils.ts 12.1.2 + * utils.ts 12.1.2-dev * Copyright (c) 2021-2024 Alain Dumesny - see GridStack root license */ From 26348e6ad0e56f759b4815c2b34358483bcba700 Mon Sep 17 00:00:00 2001 From: Alain Dumesny Date: Tue, 27 May 2025 07:13:09 -0700 Subject: [PATCH 14/18] doc update fix #3058 --- README.md | 7 +++++-- doc/CHANGES.md | 2 +- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index 90a58d8e..360721e9 100644 --- a/README.md +++ b/README.md @@ -477,15 +477,18 @@ breaking change: **Breaking change:** +* V11 add new `GridStack.renderCB` that is called for you to create the widget content (entire GridStackWidget is passed so you can use id or some other field as logic) while GS creates the 2 needed parent divs + classes, unlike `GridStack.addRemoveCB` which doesn't create anything for you. Both can be handy for Angular/React/Vue frameworks. +* `addWidget(w: GridStackWidget)` is now the only supported format, no more string content passing. You will need to create content yourself as shown below, OR use `GridStack.createWidgetDivs()` to create parent divs, do the innerHtml, then call `makeWidget(el)` instead. * if your code relies on `GridStackWidget.content` with real HTML (like a few demos) it is up to you to do this: ```ts // NOTE: REAL apps would sanitize-html or DOMPurify before blinding setting innerHTML. see #2736 GridStack.renderCB = function(el: HTMLElement, w: GridStackNode) { el.innerHTML = w.content; }; + +// now you can create widgets like this again +let gridWidget = grid.addWidget({x, y, w, h, content: '
My html content
'}); ``` -* V11 add new `GridStack.renderCB` that is called for you to create the widget content (entire GridStackWidget is passed so you can use id or some other field as logic) while GS creates the 2 needed parent divs + classes, unlike `GridStack.addRemoveCB` which doesn't create anything for you. Both can be handy for Angular/React/Vue frameworks. -* `addWidget(w: GridStackWidget)` is now the only supported format, no more string content passing. You will need to create content yourself (`GridStack.createWidgetDivs()` can be used to create parent divs) then call `makeWidget(el)` instead. **Potential breaking change:** diff --git a/doc/CHANGES.md b/doc/CHANGES.md index 4644fac0..0072066e 100644 --- a/doc/CHANGES.md +++ b/doc/CHANGES.md @@ -5,7 +5,7 @@ Change log **Table of Contents** *generated with [DocToc](http://doctoc.herokuapp.com/)* -- [12.1.2-dev (2024-05-07)](#1212-2024-05-07) +- [12.1.2-dev (2024-05-07)](#1212-dev-2024-05-07) - [12.1.1 (2024-04-28)](#1211-2024-04-28) - [12.1.0 (2024-04-23)](#1210-2024-04-23) - [12.0.0 (2025-04-12)](#1200-2025-04-12) From cae3467e0fd85da88a144a6ce872fa78f26a7b10 Mon Sep 17 00:00:00 2001 From: Alain Dumesny Date: Tue, 27 May 2025 15:03:52 -0700 Subject: [PATCH 15/18] added `GridStack.updateCB(w)` * gets called after a widget has been updated (eg: load() after initial layout) instead of created --- doc/CHANGES.md | 8 ++++++-- src/gridstack.ts | 4 ++++ 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/doc/CHANGES.md b/doc/CHANGES.md index 0072066e..c3e445dd 100644 --- a/doc/CHANGES.md +++ b/doc/CHANGES.md @@ -5,7 +5,8 @@ Change log **Table of Contents** *generated with [DocToc](http://doctoc.herokuapp.com/)* -- [12.1.2-dev (2024-05-07)](#1212-dev-2024-05-07) +- [12.2.0 (2025-05-27)](#1220-2025-05-27) +- [12.1.2 (2024-05-07)](#1212-2024-05-07) - [12.1.1 (2024-04-28)](#1211-2024-04-28) - [12.1.0 (2024-04-23)](#1210-2024-04-23) - [12.0.0 (2025-04-12)](#1200-2025-04-12) @@ -127,7 +128,10 @@ Change log -## 12.1.2-dev (2024-05-07) +## 12.2.0 (2025-05-27) +* feat: [#3061](https://github.com/gridstack/gridstack.js/pull/3061) added `GridStack.updateCB(w)` that gets called after a widget has been updated (eg: load() after initial layout) instead of created + +## 12.1.2 (2024-05-07) * fix [#3043](https://github.com/gridstack/gridstack.js/issues/3043) fix `opts.animate` again * fix [#3048](https://github.com/gridstack/gridstack.js/pull/3048) nested grid resizeToContentCBCheck() fix diff --git a/src/gridstack.ts b/src/gridstack.ts index 726296ad..1a63d73c 100644 --- a/src/gridstack.ts +++ b/src/gridstack.ts @@ -187,6 +187,9 @@ export class GridStack { */ public static renderCB?: RenderFcn = (el: HTMLElement, w: GridStackNode) => { if (el && w?.content) el.textContent = w.content; }; + /** called after a widget has been updated (eg: load() into an existing list of children) so application can do extra work */ + public static updateCB?: (w: GridStackNode) => void; + /** callback to use for resizeToContent instead of the built in one */ public static resizeToContentCB?: ResizeToContentFcn; /** parent class for sizing content. defaults to '.grid-stack-item-content' */ @@ -1383,6 +1386,7 @@ export class GridStack { if (ddChanged) { this.prepareDragDrop(n.el); } + GridStack.updateCB(n); // call user callback so they know widget got updated }); return this; From 860d255e0a38c359790f149c300bee8ecbe2dc1e Mon Sep 17 00:00:00 2001 From: Alain Dumesny Date: Tue, 27 May 2025 15:13:39 -0700 Subject: [PATCH 16/18] more GridStack.updateCB use of #3061 --- angular/projects/lib/src/lib/gridstack.component.ts | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/angular/projects/lib/src/lib/gridstack.component.ts b/angular/projects/lib/src/lib/gridstack.component.ts index 3f851659..89d90929 100644 --- a/angular/projects/lib/src/lib/gridstack.component.ts +++ b/angular/projects/lib/src/lib/gridstack.component.ts @@ -126,6 +126,9 @@ export class GridstackComponent implements OnInit, AfterContentInit, OnDestroy { if (!GridStack.saveCB) { GridStack.saveCB = gsSaveAdditionalNgInfo; } + if (!GridStack.updateCB) { + GridStack.updateCB = gsUpdateNgComponents; + } this.el._gridComp = this; } @@ -315,3 +318,12 @@ export function gsSaveAdditionalNgInfo(n: NgGridStackNode, w: NgGridStackWidget) //.... save any custom data } } + +/** + * track when widgeta re updated (rather than created) to make sure we de-serialize them as well + */ +export function gsUpdateNgComponents(n: NgGridStackNode) { + const w: NgGridStackWidget = n; + const gridItem = (n.el as GridItemCompHTMLElement)?._gridItemComp; + if (gridItem?.childWidget && w.input) gridItem.childWidget.deserialize(w); +} \ No newline at end of file From 7bc1c5d881ba69707b908fdd202ed0a8531b3871 Mon Sep 17 00:00:00 2001 From: Alain Dumesny Date: Tue, 27 May 2025 15:21:11 -0700 Subject: [PATCH 17/18] v12.2.0 --- angular/package.json | 2 +- angular/projects/lib/src/lib/base-widget.ts | 2 +- angular/projects/lib/src/lib/gridstack-item.component.ts | 2 +- angular/projects/lib/src/lib/gridstack.component.ts | 2 +- angular/projects/lib/src/lib/gridstack.module.ts | 2 +- angular/projects/lib/src/lib/types.ts | 2 +- angular/yarn.lock | 8 ++++---- package.json | 2 +- react/package.json | 2 +- react/yarn.lock | 8 ++++---- src/dd-base-impl.ts | 2 +- src/dd-draggable.ts | 2 +- src/dd-droppable.ts | 2 +- src/dd-element.ts | 2 +- src/dd-gridstack.ts | 2 +- src/dd-manager.ts | 2 +- src/dd-resizable-handle.ts | 2 +- src/dd-resizable.ts | 2 +- src/dd-touch.ts | 2 +- src/gridstack-engine.ts | 2 +- src/gridstack.scss | 2 +- src/gridstack.ts | 6 +++--- src/types.ts | 2 +- src/utils.ts | 2 +- 24 files changed, 32 insertions(+), 32 deletions(-) diff --git a/angular/package.json b/angular/package.json index 4365ad85..ab9cb60b 100644 --- a/angular/package.json +++ b/angular/package.json @@ -18,7 +18,7 @@ "@angular/platform-browser": "^14", "@angular/platform-browser-dynamic": "^14", "@angular/router": "^14", - "gridstack": "^12.1.2", + "gridstack": "^12.2.0", "rxjs": "~7.5.0", "tslib": "^2.3.0", "zone.js": "~0.11.4" diff --git a/angular/projects/lib/src/lib/base-widget.ts b/angular/projects/lib/src/lib/base-widget.ts index a76196ca..310fb49d 100644 --- a/angular/projects/lib/src/lib/base-widget.ts +++ b/angular/projects/lib/src/lib/base-widget.ts @@ -1,5 +1,5 @@ /** - * gridstack-item.component.ts 12.1.2-dev + * gridstack-item.component.ts 12.2.0 * Copyright (c) 2022-2024 Alain Dumesny - see GridStack root license */ diff --git a/angular/projects/lib/src/lib/gridstack-item.component.ts b/angular/projects/lib/src/lib/gridstack-item.component.ts index 0582525b..0e87b57a 100644 --- a/angular/projects/lib/src/lib/gridstack-item.component.ts +++ b/angular/projects/lib/src/lib/gridstack-item.component.ts @@ -1,5 +1,5 @@ /** - * gridstack-item.component.ts 12.1.2-dev + * gridstack-item.component.ts 12.2.0 * Copyright (c) 2022-2024 Alain Dumesny - see GridStack root license */ diff --git a/angular/projects/lib/src/lib/gridstack.component.ts b/angular/projects/lib/src/lib/gridstack.component.ts index 89d90929..798ce959 100644 --- a/angular/projects/lib/src/lib/gridstack.component.ts +++ b/angular/projects/lib/src/lib/gridstack.component.ts @@ -1,5 +1,5 @@ /** - * gridstack.component.ts 12.1.2-dev + * gridstack.component.ts 12.2.0 * Copyright (c) 2022-2024 Alain Dumesny - see GridStack root license */ diff --git a/angular/projects/lib/src/lib/gridstack.module.ts b/angular/projects/lib/src/lib/gridstack.module.ts index 3b1bd76a..149c6148 100644 --- a/angular/projects/lib/src/lib/gridstack.module.ts +++ b/angular/projects/lib/src/lib/gridstack.module.ts @@ -1,5 +1,5 @@ /** - * gridstack.component.ts 12.1.2-dev + * gridstack.component.ts 12.2.0 * Copyright (c) 2022-2024 Alain Dumesny - see GridStack root license */ diff --git a/angular/projects/lib/src/lib/types.ts b/angular/projects/lib/src/lib/types.ts index 0366ef58..257f31fc 100644 --- a/angular/projects/lib/src/lib/types.ts +++ b/angular/projects/lib/src/lib/types.ts @@ -1,5 +1,5 @@ /** - * gridstack-item.component.ts 12.1.2-dev + * gridstack-item.component.ts 12.2.0 * Copyright (c) 2025 Alain Dumesny - see GridStack root license */ diff --git a/angular/yarn.lock b/angular/yarn.lock index 3e6f405b..5fb9d616 100644 --- a/angular/yarn.lock +++ b/angular/yarn.lock @@ -3752,10 +3752,10 @@ graceful-fs@^4.1.2, graceful-fs@^4.1.6, graceful-fs@^4.2.0, graceful-fs@^4.2.4, resolved "https://registry.yarnpkg.com/graceful-fs/-/graceful-fs-4.2.11.tgz#4183e4e8bf08bb6e05bbb2f7d2e0c8f712ca40e3" integrity sha512-RbJ5/jmFcNNCcDV5o9eTnBLJ/HszWV0P73bc+Ff4nS/rJj+YaS6IGyiOL0VoBYX+l1Wrl3k63h/KrH+nhJ0XvQ== -gridstack@^12.1.2: - version "12.1.2" - resolved "https://registry.yarnpkg.com/gridstack/-/gridstack-12.1.2.tgz#784f6d55873bb48fa9230c1284f769c9fbf785a8" - integrity sha512-IC1mkm5xonhAnftwIxsG+B3bawxC61ciKWEvX15ExpVQPbNVN7O9aZZhM7Y/eE4JaIR8PXrdkjd12gMnwNYRLQ== +gridstack@^12.2.0: + version "12.2.0" + resolved "https://registry.yarnpkg.com/gridstack/-/gridstack-12.2.0.tgz#5c3f8ef35374daffe6d863ce198c77c8067977f3" + integrity sha512-xvOGd8guyRO5A2LKFRYy4DALNVd20TlrN/88Ad0q6zJOyE9EJt1htB1LWpWMgWmOJPf1YDIR0PPCbV3PqHCTgg== handle-thing@^2.0.0: version "2.0.1" diff --git a/package.json b/package.json index 0a6cba36..c6afa6e4 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "gridstack", - "version": "12.1.2-dev", + "version": "12.2.0", "license": "MIT", "author": "Alain Dumesny (https://github.com/adumesny)", "contributors": [ diff --git a/react/package.json b/react/package.json index dd2f1d89..8a08b324 100644 --- a/react/package.json +++ b/react/package.json @@ -11,7 +11,7 @@ "preview": "vite preview" }, "dependencies": { - "gridstack": "^12.1.2", + "gridstack": "^12.2.0", "react": "^18.3.1", "react-dom": "^18.3.1", "react-fast-compare": "^3.2.2" diff --git a/react/yarn.lock b/react/yarn.lock index 27864976..00f4062f 100644 --- a/react/yarn.lock +++ b/react/yarn.lock @@ -832,10 +832,10 @@ graphemer@^1.4.0: resolved "https://registry.yarnpkg.com/graphemer/-/graphemer-1.4.0.tgz#fb2f1d55e0e3a1849aeffc90c4fa0dd53a0e66c6" integrity sha512-EtKwoO6kxCL9WO5xipiHTZlSzBm7WLT627TqC/uVRd0HKmq8NXyebnNYxDoBi7wt8eTWrUrKXCOVaFq9x1kgag== -gridstack@^12.1.2: - version "12.1.2" - resolved "https://registry.yarnpkg.com/gridstack/-/gridstack-12.1.2.tgz#784f6d55873bb48fa9230c1284f769c9fbf785a8" - integrity sha512-IC1mkm5xonhAnftwIxsG+B3bawxC61ciKWEvX15ExpVQPbNVN7O9aZZhM7Y/eE4JaIR8PXrdkjd12gMnwNYRLQ== +gridstack@^12.2.0: + version "12.2.0" + resolved "https://registry.yarnpkg.com/gridstack/-/gridstack-12.2.0.tgz#5c3f8ef35374daffe6d863ce198c77c8067977f3" + integrity sha512-xvOGd8guyRO5A2LKFRYy4DALNVd20TlrN/88Ad0q6zJOyE9EJt1htB1LWpWMgWmOJPf1YDIR0PPCbV3PqHCTgg== has-flag@^4.0.0: version "4.0.0" diff --git a/src/dd-base-impl.ts b/src/dd-base-impl.ts index b320864b..491a5fa1 100644 --- a/src/dd-base-impl.ts +++ b/src/dd-base-impl.ts @@ -1,5 +1,5 @@ /** - * dd-base-impl.ts 12.1.2-dev + * dd-base-impl.ts 12.2.0 * Copyright (c) 2021-2024 Alain Dumesny - see GridStack root license */ diff --git a/src/dd-draggable.ts b/src/dd-draggable.ts index d1361b9e..26ba8089 100644 --- a/src/dd-draggable.ts +++ b/src/dd-draggable.ts @@ -1,5 +1,5 @@ /** - * dd-draggable.ts 12.1.2-dev + * dd-draggable.ts 12.2.0 * Copyright (c) 2021-2024 Alain Dumesny - see GridStack root license */ diff --git a/src/dd-droppable.ts b/src/dd-droppable.ts index 3c196692..6818dc7d 100644 --- a/src/dd-droppable.ts +++ b/src/dd-droppable.ts @@ -1,5 +1,5 @@ /** - * dd-droppable.ts 12.1.2-dev + * dd-droppable.ts 12.2.0 * Copyright (c) 2021-2024 Alain Dumesny - see GridStack root license */ diff --git a/src/dd-element.ts b/src/dd-element.ts index 3b6a5a02..f45ba046 100644 --- a/src/dd-element.ts +++ b/src/dd-element.ts @@ -1,5 +1,5 @@ /** - * dd-elements.ts 12.1.2-dev + * dd-elements.ts 12.2.0 * Copyright (c) 2021-2024 Alain Dumesny - see GridStack root license */ diff --git a/src/dd-gridstack.ts b/src/dd-gridstack.ts index e7f24cad..0985452e 100644 --- a/src/dd-gridstack.ts +++ b/src/dd-gridstack.ts @@ -1,5 +1,5 @@ /** - * dd-gridstack.ts 12.1.2-dev + * dd-gridstack.ts 12.2.0 * Copyright (c) 2021-2024 Alain Dumesny - see GridStack root license */ diff --git a/src/dd-manager.ts b/src/dd-manager.ts index 55ef30ff..bf9c7a58 100644 --- a/src/dd-manager.ts +++ b/src/dd-manager.ts @@ -1,5 +1,5 @@ /** - * dd-manager.ts 12.1.2-dev + * dd-manager.ts 12.2.0 * Copyright (c) 2021-2024 Alain Dumesny - see GridStack root license */ diff --git a/src/dd-resizable-handle.ts b/src/dd-resizable-handle.ts index 18a5460a..b1978b06 100644 --- a/src/dd-resizable-handle.ts +++ b/src/dd-resizable-handle.ts @@ -1,5 +1,5 @@ /** - * dd-resizable-handle.ts 12.1.2-dev + * dd-resizable-handle.ts 12.2.0 * Copyright (c) 2021-2024 Alain Dumesny - see GridStack root license */ diff --git a/src/dd-resizable.ts b/src/dd-resizable.ts index e2c40e8d..1faa322f 100644 --- a/src/dd-resizable.ts +++ b/src/dd-resizable.ts @@ -1,5 +1,5 @@ /** - * dd-resizable.ts 12.1.2-dev + * dd-resizable.ts 12.2.0 * Copyright (c) 2021-2024 Alain Dumesny - see GridStack root license */ diff --git a/src/dd-touch.ts b/src/dd-touch.ts index 11ac0859..80f37571 100644 --- a/src/dd-touch.ts +++ b/src/dd-touch.ts @@ -1,5 +1,5 @@ /** - * touch.ts 12.1.2-dev + * touch.ts 12.2.0 * Copyright (c) 2021-2024 Alain Dumesny - see GridStack root license */ diff --git a/src/gridstack-engine.ts b/src/gridstack-engine.ts index 3d2c1dc4..6ab13cae 100644 --- a/src/gridstack-engine.ts +++ b/src/gridstack-engine.ts @@ -1,5 +1,5 @@ /** - * gridstack-engine.ts 12.1.2-dev + * gridstack-engine.ts 12.2.0 * Copyright (c) 2021-2024 Alain Dumesny - see GridStack root license */ diff --git a/src/gridstack.scss b/src/gridstack.scss index 7ae1d6d0..f947e413 100644 --- a/src/gridstack.scss +++ b/src/gridstack.scss @@ -1,5 +1,5 @@ /** - * gridstack SASS styles 12.1.2-dev + * gridstack SASS styles 12.2.0 * Copyright (c) 2021-2024 Alain Dumesny - see GridStack root license */ diff --git a/src/gridstack.ts b/src/gridstack.ts index 1a63d73c..9ee2b49d 100644 --- a/src/gridstack.ts +++ b/src/gridstack.ts @@ -1,5 +1,5 @@ /*! - * GridStack 12.1.2-dev + * GridStack 12.2.0 * https://gridstackjs.com/ * * Copyright (c) 2021-2024 Alain Dumesny @@ -189,7 +189,7 @@ export class GridStack { /** called after a widget has been updated (eg: load() into an existing list of children) so application can do extra work */ public static updateCB?: (w: GridStackNode) => void; - + /** callback to use for resizeToContent instead of the built in one */ public static resizeToContentCB?: ResizeToContentFcn; /** parent class for sizing content. defaults to '.grid-stack-item-content' */ @@ -1893,7 +1893,7 @@ export class GridStack { return this; } - static GDRev = '12.1.2-dev'; + static GDRev = '12.2.0'; /* =========================================================================================== * drag&drop methods that used to be stubbed out and implemented in dd-gridstack.ts diff --git a/src/types.ts b/src/types.ts index 644d7b05..c119b367 100644 --- a/src/types.ts +++ b/src/types.ts @@ -1,5 +1,5 @@ /** - * types.ts 12.1.2-dev + * types.ts 12.2.0 * Copyright (c) 2021-2024 Alain Dumesny - see GridStack root license */ diff --git a/src/utils.ts b/src/utils.ts index 5e833eef..fa81b94d 100644 --- a/src/utils.ts +++ b/src/utils.ts @@ -1,5 +1,5 @@ /** - * utils.ts 12.1.2-dev + * utils.ts 12.2.0 * Copyright (c) 2021-2024 Alain Dumesny - see GridStack root license */ From 7dd3819d85c7ce126533d9b252b6b6d652c26282 Mon Sep 17 00:00:00 2001 From: Alain Dumesny Date: Wed, 28 May 2025 08:24:56 -0700 Subject: [PATCH 18/18] v12.2.1 fix `GridStack.updateCB(w)` crash --- angular/package.json | 2 +- angular/projects/lib/src/lib/base-widget.ts | 2 +- angular/projects/lib/src/lib/gridstack-item.component.ts | 2 +- angular/projects/lib/src/lib/gridstack.component.ts | 2 +- angular/projects/lib/src/lib/gridstack.module.ts | 2 +- angular/projects/lib/src/lib/types.ts | 2 +- angular/yarn.lock | 8 ++++---- doc/CHANGES.md | 4 ++++ package.json | 2 +- react/package.json | 2 +- react/yarn.lock | 8 ++++---- src/dd-base-impl.ts | 2 +- src/dd-draggable.ts | 2 +- src/dd-droppable.ts | 2 +- src/dd-element.ts | 2 +- src/dd-gridstack.ts | 2 +- src/dd-manager.ts | 2 +- src/dd-resizable-handle.ts | 2 +- src/dd-resizable.ts | 2 +- src/dd-touch.ts | 2 +- src/gridstack-engine.ts | 2 +- src/gridstack.scss | 2 +- src/gridstack.ts | 6 +++--- src/types.ts | 2 +- src/utils.ts | 2 +- 25 files changed, 36 insertions(+), 32 deletions(-) diff --git a/angular/package.json b/angular/package.json index ab9cb60b..073449b1 100644 --- a/angular/package.json +++ b/angular/package.json @@ -18,7 +18,7 @@ "@angular/platform-browser": "^14", "@angular/platform-browser-dynamic": "^14", "@angular/router": "^14", - "gridstack": "^12.2.0", + "gridstack": "^12.2.1", "rxjs": "~7.5.0", "tslib": "^2.3.0", "zone.js": "~0.11.4" diff --git a/angular/projects/lib/src/lib/base-widget.ts b/angular/projects/lib/src/lib/base-widget.ts index 310fb49d..7847abf5 100644 --- a/angular/projects/lib/src/lib/base-widget.ts +++ b/angular/projects/lib/src/lib/base-widget.ts @@ -1,5 +1,5 @@ /** - * gridstack-item.component.ts 12.2.0 + * gridstack-item.component.ts 12.2.1 * Copyright (c) 2022-2024 Alain Dumesny - see GridStack root license */ diff --git a/angular/projects/lib/src/lib/gridstack-item.component.ts b/angular/projects/lib/src/lib/gridstack-item.component.ts index 0e87b57a..39278bb6 100644 --- a/angular/projects/lib/src/lib/gridstack-item.component.ts +++ b/angular/projects/lib/src/lib/gridstack-item.component.ts @@ -1,5 +1,5 @@ /** - * gridstack-item.component.ts 12.2.0 + * gridstack-item.component.ts 12.2.1 * Copyright (c) 2022-2024 Alain Dumesny - see GridStack root license */ diff --git a/angular/projects/lib/src/lib/gridstack.component.ts b/angular/projects/lib/src/lib/gridstack.component.ts index 798ce959..9be73d2e 100644 --- a/angular/projects/lib/src/lib/gridstack.component.ts +++ b/angular/projects/lib/src/lib/gridstack.component.ts @@ -1,5 +1,5 @@ /** - * gridstack.component.ts 12.2.0 + * gridstack.component.ts 12.2.1 * Copyright (c) 2022-2024 Alain Dumesny - see GridStack root license */ diff --git a/angular/projects/lib/src/lib/gridstack.module.ts b/angular/projects/lib/src/lib/gridstack.module.ts index 149c6148..4e1e8bcb 100644 --- a/angular/projects/lib/src/lib/gridstack.module.ts +++ b/angular/projects/lib/src/lib/gridstack.module.ts @@ -1,5 +1,5 @@ /** - * gridstack.component.ts 12.2.0 + * gridstack.component.ts 12.2.1 * Copyright (c) 2022-2024 Alain Dumesny - see GridStack root license */ diff --git a/angular/projects/lib/src/lib/types.ts b/angular/projects/lib/src/lib/types.ts index 257f31fc..634de4cb 100644 --- a/angular/projects/lib/src/lib/types.ts +++ b/angular/projects/lib/src/lib/types.ts @@ -1,5 +1,5 @@ /** - * gridstack-item.component.ts 12.2.0 + * gridstack-item.component.ts 12.2.1 * Copyright (c) 2025 Alain Dumesny - see GridStack root license */ diff --git a/angular/yarn.lock b/angular/yarn.lock index 5fb9d616..53b0d63a 100644 --- a/angular/yarn.lock +++ b/angular/yarn.lock @@ -3752,10 +3752,10 @@ graceful-fs@^4.1.2, graceful-fs@^4.1.6, graceful-fs@^4.2.0, graceful-fs@^4.2.4, resolved "https://registry.yarnpkg.com/graceful-fs/-/graceful-fs-4.2.11.tgz#4183e4e8bf08bb6e05bbb2f7d2e0c8f712ca40e3" integrity sha512-RbJ5/jmFcNNCcDV5o9eTnBLJ/HszWV0P73bc+Ff4nS/rJj+YaS6IGyiOL0VoBYX+l1Wrl3k63h/KrH+nhJ0XvQ== -gridstack@^12.2.0: - version "12.2.0" - resolved "https://registry.yarnpkg.com/gridstack/-/gridstack-12.2.0.tgz#5c3f8ef35374daffe6d863ce198c77c8067977f3" - integrity sha512-xvOGd8guyRO5A2LKFRYy4DALNVd20TlrN/88Ad0q6zJOyE9EJt1htB1LWpWMgWmOJPf1YDIR0PPCbV3PqHCTgg== +gridstack@^12.2.1: + version "12.2.1" + resolved "https://registry.yarnpkg.com/gridstack/-/gridstack-12.2.1.tgz#0e82e3d9d11e5229388d73bd57f8ef1a0e7059c4" + integrity sha512-xU69tThmmVxgMHTuM/z3rIKiiGm0zW4tcB6yRcuwiOUUBiwb3tslzFOrUjWz+PwaxoAW+JChT4fqOLl+oKAxZA== handle-thing@^2.0.0: version "2.0.1" diff --git a/doc/CHANGES.md b/doc/CHANGES.md index c3e445dd..5024cb33 100644 --- a/doc/CHANGES.md +++ b/doc/CHANGES.md @@ -5,6 +5,7 @@ Change log **Table of Contents** *generated with [DocToc](http://doctoc.herokuapp.com/)* +- [12.2.1 (2025-05-28)](#1221-2025-05-28) - [12.2.0 (2025-05-27)](#1220-2025-05-27) - [12.1.2 (2024-05-07)](#1212-2024-05-07) - [12.1.1 (2024-04-28)](#1211-2024-04-28) @@ -128,6 +129,9 @@ Change log +## 12.2.1 (2025-05-28) +* fix: [#3064](https://github.com/gridstack/gridstack.js/pull/3064) fix `GridStack.updateCB(w)` crash + ## 12.2.0 (2025-05-27) * feat: [#3061](https://github.com/gridstack/gridstack.js/pull/3061) added `GridStack.updateCB(w)` that gets called after a widget has been updated (eg: load() after initial layout) instead of created diff --git a/package.json b/package.json index c6afa6e4..7e18eb3e 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "gridstack", - "version": "12.2.0", + "version": "12.2.1", "license": "MIT", "author": "Alain Dumesny (https://github.com/adumesny)", "contributors": [ diff --git a/react/package.json b/react/package.json index 8a08b324..77cb8c3e 100644 --- a/react/package.json +++ b/react/package.json @@ -11,7 +11,7 @@ "preview": "vite preview" }, "dependencies": { - "gridstack": "^12.2.0", + "gridstack": "^12.2.1", "react": "^18.3.1", "react-dom": "^18.3.1", "react-fast-compare": "^3.2.2" diff --git a/react/yarn.lock b/react/yarn.lock index 00f4062f..65fa8a50 100644 --- a/react/yarn.lock +++ b/react/yarn.lock @@ -832,10 +832,10 @@ graphemer@^1.4.0: resolved "https://registry.yarnpkg.com/graphemer/-/graphemer-1.4.0.tgz#fb2f1d55e0e3a1849aeffc90c4fa0dd53a0e66c6" integrity sha512-EtKwoO6kxCL9WO5xipiHTZlSzBm7WLT627TqC/uVRd0HKmq8NXyebnNYxDoBi7wt8eTWrUrKXCOVaFq9x1kgag== -gridstack@^12.2.0: - version "12.2.0" - resolved "https://registry.yarnpkg.com/gridstack/-/gridstack-12.2.0.tgz#5c3f8ef35374daffe6d863ce198c77c8067977f3" - integrity sha512-xvOGd8guyRO5A2LKFRYy4DALNVd20TlrN/88Ad0q6zJOyE9EJt1htB1LWpWMgWmOJPf1YDIR0PPCbV3PqHCTgg== +gridstack@^12.2.1: + version "12.2.1" + resolved "https://registry.yarnpkg.com/gridstack/-/gridstack-12.2.1.tgz#0e82e3d9d11e5229388d73bd57f8ef1a0e7059c4" + integrity sha512-xU69tThmmVxgMHTuM/z3rIKiiGm0zW4tcB6yRcuwiOUUBiwb3tslzFOrUjWz+PwaxoAW+JChT4fqOLl+oKAxZA== has-flag@^4.0.0: version "4.0.0" diff --git a/src/dd-base-impl.ts b/src/dd-base-impl.ts index 491a5fa1..f417de9f 100644 --- a/src/dd-base-impl.ts +++ b/src/dd-base-impl.ts @@ -1,5 +1,5 @@ /** - * dd-base-impl.ts 12.2.0 + * dd-base-impl.ts 12.2.1 * Copyright (c) 2021-2024 Alain Dumesny - see GridStack root license */ diff --git a/src/dd-draggable.ts b/src/dd-draggable.ts index 26ba8089..ad3606c4 100644 --- a/src/dd-draggable.ts +++ b/src/dd-draggable.ts @@ -1,5 +1,5 @@ /** - * dd-draggable.ts 12.2.0 + * dd-draggable.ts 12.2.1 * Copyright (c) 2021-2024 Alain Dumesny - see GridStack root license */ diff --git a/src/dd-droppable.ts b/src/dd-droppable.ts index 6818dc7d..f29835c9 100644 --- a/src/dd-droppable.ts +++ b/src/dd-droppable.ts @@ -1,5 +1,5 @@ /** - * dd-droppable.ts 12.2.0 + * dd-droppable.ts 12.2.1 * Copyright (c) 2021-2024 Alain Dumesny - see GridStack root license */ diff --git a/src/dd-element.ts b/src/dd-element.ts index f45ba046..c6b9f83b 100644 --- a/src/dd-element.ts +++ b/src/dd-element.ts @@ -1,5 +1,5 @@ /** - * dd-elements.ts 12.2.0 + * dd-elements.ts 12.2.1 * Copyright (c) 2021-2024 Alain Dumesny - see GridStack root license */ diff --git a/src/dd-gridstack.ts b/src/dd-gridstack.ts index 0985452e..67347fa2 100644 --- a/src/dd-gridstack.ts +++ b/src/dd-gridstack.ts @@ -1,5 +1,5 @@ /** - * dd-gridstack.ts 12.2.0 + * dd-gridstack.ts 12.2.1 * Copyright (c) 2021-2024 Alain Dumesny - see GridStack root license */ diff --git a/src/dd-manager.ts b/src/dd-manager.ts index bf9c7a58..6f13f40c 100644 --- a/src/dd-manager.ts +++ b/src/dd-manager.ts @@ -1,5 +1,5 @@ /** - * dd-manager.ts 12.2.0 + * dd-manager.ts 12.2.1 * Copyright (c) 2021-2024 Alain Dumesny - see GridStack root license */ diff --git a/src/dd-resizable-handle.ts b/src/dd-resizable-handle.ts index b1978b06..4e3ae9ec 100644 --- a/src/dd-resizable-handle.ts +++ b/src/dd-resizable-handle.ts @@ -1,5 +1,5 @@ /** - * dd-resizable-handle.ts 12.2.0 + * dd-resizable-handle.ts 12.2.1 * Copyright (c) 2021-2024 Alain Dumesny - see GridStack root license */ diff --git a/src/dd-resizable.ts b/src/dd-resizable.ts index 1faa322f..d99b0df1 100644 --- a/src/dd-resizable.ts +++ b/src/dd-resizable.ts @@ -1,5 +1,5 @@ /** - * dd-resizable.ts 12.2.0 + * dd-resizable.ts 12.2.1 * Copyright (c) 2021-2024 Alain Dumesny - see GridStack root license */ diff --git a/src/dd-touch.ts b/src/dd-touch.ts index 80f37571..9e1fb71b 100644 --- a/src/dd-touch.ts +++ b/src/dd-touch.ts @@ -1,5 +1,5 @@ /** - * touch.ts 12.2.0 + * touch.ts 12.2.1 * Copyright (c) 2021-2024 Alain Dumesny - see GridStack root license */ diff --git a/src/gridstack-engine.ts b/src/gridstack-engine.ts index 6ab13cae..02a7bf2f 100644 --- a/src/gridstack-engine.ts +++ b/src/gridstack-engine.ts @@ -1,5 +1,5 @@ /** - * gridstack-engine.ts 12.2.0 + * gridstack-engine.ts 12.2.1 * Copyright (c) 2021-2024 Alain Dumesny - see GridStack root license */ diff --git a/src/gridstack.scss b/src/gridstack.scss index f947e413..6700d747 100644 --- a/src/gridstack.scss +++ b/src/gridstack.scss @@ -1,5 +1,5 @@ /** - * gridstack SASS styles 12.2.0 + * gridstack SASS styles 12.2.1 * Copyright (c) 2021-2024 Alain Dumesny - see GridStack root license */ diff --git a/src/gridstack.ts b/src/gridstack.ts index 9ee2b49d..39096f5d 100644 --- a/src/gridstack.ts +++ b/src/gridstack.ts @@ -1,5 +1,5 @@ /*! - * GridStack 12.2.0 + * GridStack 12.2.1 * https://gridstackjs.com/ * * Copyright (c) 2021-2024 Alain Dumesny @@ -1386,7 +1386,7 @@ export class GridStack { if (ddChanged) { this.prepareDragDrop(n.el); } - GridStack.updateCB(n); // call user callback so they know widget got updated + if (GridStack.updateCB) GridStack.updateCB(n); // call user callback so they know widget got updated }); return this; @@ -1893,7 +1893,7 @@ export class GridStack { return this; } - static GDRev = '12.2.0'; + static GDRev = '12.2.1'; /* =========================================================================================== * drag&drop methods that used to be stubbed out and implemented in dd-gridstack.ts diff --git a/src/types.ts b/src/types.ts index c119b367..b59735e5 100644 --- a/src/types.ts +++ b/src/types.ts @@ -1,5 +1,5 @@ /** - * types.ts 12.2.0 + * types.ts 12.2.1 * Copyright (c) 2021-2024 Alain Dumesny - see GridStack root license */ diff --git a/src/utils.ts b/src/utils.ts index fa81b94d..4014a189 100644 --- a/src/utils.ts +++ b/src/utils.ts @@ -1,5 +1,5 @@ /** - * utils.ts 12.2.0 + * utils.ts 12.2.1 * Copyright (c) 2021-2024 Alain Dumesny - see GridStack root license */