Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 7 additions & 1 deletion angular/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -206,6 +206,12 @@ const gridItemRef = grid.container.createComponent(factory) as ComponentRef<Grid
you must manually update the `GridstackItemComponent.option` directly - see [modifyNgFor()](./projects/demo/src/app/app.component.ts#L202) example.
- The original client list of items is not updated to match **content** changes made by gridstack (TBD later), but adding new item or removing (as shown in demo) will update those new items. Client could use change/added/removed events to sync that list if they wish to do so.

Would appreciate getting help doing the same for React and Vue (2 other popular frameworks)
## Development

- **Angular Version:** We intentionally keep the `gridstack-angular` wrapper compiled with **Angular 14** (using Angular CLI/Webpack instead of Vite) to ensure maximum backwards compatibility. Upgrading the build system to Vite would require bumping the project to Angular 17+, which would drop support for users still on Angular 14-16.
- **Output Folders (`esm` and `fesm`):** The `dist/angular` folder contains `esm2020`, `fesm2015`, and `fesm2020` folders. These are generated by `ng-packagr` to comply with the **Angular Package Format (APF)**.
- **ESM** (ECMAScript Modules) contains unbundled modules (1-to-1 mapping to source files).
- **FESM** (Flattened ECMAScript Modules) contains bundled versions of the library optimized for tree-shaking by the Angular CLI.
- Unlike React and Vue, which just output raw ES modules and let the consumer's bundler (Vite/Webpack) handle it, Angular requires these specific flattened formats for backward compatibility and optimal compilation.

-Alain
2 changes: 1 addition & 1 deletion angular/doc/api/index.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# GridStack Angular Library v13.0.0
# GridStack Angular Library v13.0.1

## Modules

Expand Down
3 changes: 1 addition & 2 deletions angular/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
"scripts": {
"ng": "ng",
"start": "ng serve",
"build": "ng build",
"build": "ng build lib",
"watch": "ng build --watch --configuration development",
"test": "ng test",
"doc": "npx typedoc --options typedoc.json && npx typedoc --options typedoc.html.json",
Expand All @@ -30,7 +30,6 @@
"@angular/cli": "^14",
"@angular/compiler-cli": "^14",
"@types/jasmine": "~4.0.0",
"gridstack": "13.0.0",
"jasmine-core": "~4.3.0",
"karma": "~6.4.0",
"karma-chrome-launcher": "~3.1.0",
Expand Down
2 changes: 1 addition & 1 deletion angular/projects/lib/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "gridstack-angular",
"version": "13.0.0",
"version": "13.0.1",
"peerDependencies": {
"@angular/common": ">=14",
"@angular/core": ">=14"
Expand Down
2 changes: 1 addition & 1 deletion angular/projects/lib/src/lib/base-widget.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/**
* gridstack-item.component.ts 13.0.0
* gridstack-item.component.ts 13.0.1
* Copyright (c) 2022-2024 Alain Dumesny - see GridStack root license
*/

Expand Down
2 changes: 1 addition & 1 deletion angular/projects/lib/src/lib/gridstack-item.component.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/**
* gridstack-item.component.ts 13.0.0
* gridstack-item.component.ts 13.0.1
* Copyright (c) 2022-2024 Alain Dumesny - see GridStack root license
*/

Expand Down
2 changes: 1 addition & 1 deletion angular/projects/lib/src/lib/gridstack.component.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/**
* gridstack.component.ts 13.0.0
* gridstack.component.ts 13.0.1
* Copyright (c) 2022-2024 Alain Dumesny - see GridStack root license
*/

Expand Down
2 changes: 1 addition & 1 deletion angular/projects/lib/src/lib/gridstack.module.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/**
* gridstack.component.ts 13.0.0
* gridstack.component.ts 13.0.1
* Copyright (c) 2022-2024 Alain Dumesny - see GridStack root license
*/

Expand Down
2 changes: 1 addition & 1 deletion angular/projects/lib/src/lib/types.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/**
* gridstack-item.component.ts 13.0.0
* gridstack-item.component.ts 13.0.1
* Copyright (c) 2025 Alain Dumesny - see GridStack root license
*/

Expand Down
28 changes: 14 additions & 14 deletions doc/API.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# gridstack v13.0.0
# gridstack v13.0.1

## Classes

Expand Down Expand Up @@ -115,7 +115,7 @@ Construct a grid item from the given element and options
protected _updateResizeEvent(forceRemove): GridStack;
```

Defined in: [gridstack.ts:2169](https://github.com/adumesny/gridstack.js/blob/master/src/gridstack.ts#L2169)
Defined in: [gridstack.ts:2180](https://github.com/adumesny/gridstack.js/blob/master/src/gridstack.ts#L2180)

add or remove the grid element size event handler

Expand Down Expand Up @@ -429,7 +429,7 @@ Destroys a grid instance. DO NOT CALL any methods or access any vars after this
disable(recurse): GridStack;
```

Defined in: [gridstack.ts:2371](https://github.com/adumesny/gridstack.js/blob/master/src/gridstack.ts#L2371)
Defined in: [gridstack.ts:2382](https://github.com/adumesny/gridstack.js/blob/master/src/gridstack.ts#L2382)

Temporarily disables widgets moving/resizing.
If you want a more permanent way (which freezes up resources) use `setStatic(true)` instead.
Expand Down Expand Up @@ -470,7 +470,7 @@ grid.disable(false);
enable(recurse): GridStack;
```

Defined in: [gridstack.ts:2398](https://github.com/adumesny/gridstack.js/blob/master/src/gridstack.ts#L2398)
Defined in: [gridstack.ts:2409](https://github.com/adumesny/gridstack.js/blob/master/src/gridstack.ts#L2409)

Re-enables widgets moving/resizing - see disable().
Note: This is a no-op for static grids.
Expand Down Expand Up @@ -509,7 +509,7 @@ grid.enable(false);
enableMove(doEnable, recurse): GridStack;
```

Defined in: [gridstack.ts:2424](https://github.com/adumesny/gridstack.js/blob/master/src/gridstack.ts#L2424)
Defined in: [gridstack.ts:2435](https://github.com/adumesny/gridstack.js/blob/master/src/gridstack.ts#L2435)

Enables/disables widget moving for all widgets. No-op for static grids.
Note: locally defined items (with noMove property) still override this setting.
Expand Down Expand Up @@ -546,7 +546,7 @@ grid.enableMove(true, false);
enableResize(doEnable, recurse): GridStack;
```

Defined in: [gridstack.ts:2452](https://github.com/adumesny/gridstack.js/blob/master/src/gridstack.ts#L2452)
Defined in: [gridstack.ts:2463](https://github.com/adumesny/gridstack.js/blob/master/src/gridstack.ts#L2463)

Enables/disables widget resizing for all widgets. No-op for static grids.
Note: locally defined items (with noResize property) still override this setting.
Expand Down Expand Up @@ -688,7 +688,7 @@ const columnCount = grid.getColumn(); // returns 12 by default
static getDD(): DDGridStack;
```

Defined in: [gridstack.ts:2268](https://github.com/adumesny/gridstack.js/blob/master/src/gridstack.ts#L2268)
Defined in: [gridstack.ts:2279](https://github.com/adumesny/gridstack.js/blob/master/src/gridstack.ts#L2279)

Get the global drag & drop implementation instance.
This provides access to the underlying drag & drop functionality.
Expand Down Expand Up @@ -1096,7 +1096,7 @@ grid.margin('5px 10px 15px 20px'); // Different for each side
movable(els, val): GridStack;
```

Defined in: [gridstack.ts:2312](https://github.com/adumesny/gridstack.js/blob/master/src/gridstack.ts#L2312)
Defined in: [gridstack.ts:2323](https://github.com/adumesny/gridstack.js/blob/master/src/gridstack.ts#L2323)

Enables/Disables dragging by the user for specific grid elements.
For all items and future items, use enableMove() instead. No-op for static grids.
Expand Down Expand Up @@ -1432,7 +1432,7 @@ grid.on('added', (event, items) => {
onResize(clientWidth): GridStack;
```

Defined in: [gridstack.ts:2107](https://github.com/adumesny/gridstack.js/blob/master/src/gridstack.ts#L2107)
Defined in: [gridstack.ts:2118](https://github.com/adumesny/gridstack.js/blob/master/src/gridstack.ts#L2118)

called when we are being resized - check if the one Column Mode needs to be turned on/off
and remember the prev columns we used, or get our count from parent, as well as check for cellHeight==='auto' (square)
Expand All @@ -1454,7 +1454,7 @@ or `sizeToContent` gridItem options.
prepareDragDrop(el, force?): GridStack;
```

Defined in: [gridstack.ts:2841](https://github.com/adumesny/gridstack.js/blob/master/src/gridstack.ts#L2841)
Defined in: [gridstack.ts:2852](https://github.com/adumesny/gridstack.js/blob/master/src/gridstack.ts#L2852)

prepares the element for drag&drop - this is normally called by makeWidget() unless are are delay loading

Expand All @@ -1475,7 +1475,7 @@ prepares the element for drag&drop - this is normally called by makeWidget() unl
refreshDragHandles(els): GridStack;
```

Defined in: [gridstack.ts:2829](https://github.com/adumesny/gridstack.js/blob/master/src/gridstack.ts#L2829)
Defined in: [gridstack.ts:2840](https://github.com/adumesny/gridstack.js/blob/master/src/gridstack.ts#L2840)

Re-scans one or more widget elements for drag handle elements after delayed content
(React portal, Angular component, etc.) has been rendered inside the item.
Expand Down Expand Up @@ -1596,7 +1596,7 @@ Removes widget from the grid.
resizable(els, val): GridStack;
```

Defined in: [gridstack.ts:2338](https://github.com/adumesny/gridstack.js/blob/master/src/gridstack.ts#L2338)
Defined in: [gridstack.ts:2349](https://github.com/adumesny/gridstack.js/blob/master/src/gridstack.ts#L2349)

Enables/Disables user resizing for specific grid elements.
For all items and future items, use enableResize() instead. No-op for static grids.
Expand Down Expand Up @@ -1783,7 +1783,7 @@ static setupDragIn(
root?): void;
```

Defined in: [gridstack.ts:2281](https://github.com/adumesny/gridstack.js/blob/master/src/gridstack.ts#L2281)
Defined in: [gridstack.ts:2292](https://github.com/adumesny/gridstack.js/blob/master/src/gridstack.ts#L2292)

call to setup dragging in from the outside (say toolbar), by specifying the class selection and options.
Called during GridStack.init() as options, but can also be called directly (last param are used) in case the toolbar
Expand All @@ -1808,7 +1808,7 @@ is dynamically create and needs to be set later.
protected triggerEvent(event, target): void;
```

Defined in: [gridstack.ts:3103](https://github.com/adumesny/gridstack.js/blob/master/src/gridstack.ts#L3103)
Defined in: [gridstack.ts:3114](https://github.com/adumesny/gridstack.js/blob/master/src/gridstack.ts#L3114)

call given event callback on our main top-most grid (if we're nested)

Expand Down
7 changes: 5 additions & 2 deletions doc/CHANGES.md
Original file line number Diff line number Diff line change
Expand Up @@ -140,11 +140,14 @@ Change log

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

## 13.0.0-dev (TBD)
## 13.0.1-dev (TBD)
* feat: [#701](https://github.com/gridstack/gridstack.js/issues/701) major printing support for grids using PrintOptions (pageBreak, hide, orientation, ...)
* fix: [#3325](https://github.com/gridstack/gridstack.js/issues/3325) preinstall script
* fix: [#3329](https://github.com/gridstack/gridstack.js/pull/3329) DOM matches the visual order when widgets are moved around (accessibility tabbing, regular printing)

## 13.0.1 (2026-07-22)
* fix: [#3325](https://github.com/gridstack/gridstack.js/issues/3325) preinstall script
* fix: [#3324](https://github.com/gridstack/gridstack.js/issues/3324) vue files missing from package

## 13.0.0 (2026-07-18)
* NEW: react wrapper: re-did to follow the Angular pattern (drag&Drop between grid doesn't destroy content), events, lazyLoad support, fix memory leak, empty content, etc...
* NEW: vue wrapper: brand new wrapper follow same pattern as well
Expand Down
8 changes: 5 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "gridstack",
"version": "13.0.0",
"version": "13.0.1",
"license": "MIT",
"author": "Alain Dumesny <alaind831+github@gmail.com> (https://github.com/adumesny)",
"contributors": [
Expand All @@ -25,9 +25,11 @@
}
],
"scripts": {
"build": "grunt && webpack && tsc --project tsconfig.build.json --stripInternal && yarn build:ng && yarn build:react && yarn doc",
"build:ng": "cd angular && yarn build lib",
"build": "yarn build:core && yarn build:ng && yarn build:react && yarn build:vue && yarn doc",
"build:core": "grunt && webpack && tsc --project tsconfig.build.json --stripInternal",
"build:ng": "cd angular && yarn build",
"build:react": "cd react && yarn build:lib",
"build:vue": "cd vue && yarn build:lib",
"w": "webpack --mode development",
"t": "rm -rf dist/* && grunt && yarn w && tsc --project tsconfig.build.json --stripInternal",
"doc": "doctoc ./README.md && doctoc ./doc/CHANGES.md && node scripts/generate-docs.js",
Expand Down
4 changes: 2 additions & 2 deletions react/doc/api/base-widget.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ For functional components, prefer useWidgetSerializer instead.
new BaseWidget<P>(props): BaseWidget<P>;
```

Defined in: react/node\_modules/@types/react/ts5.0/index.d.ts:1003
Defined in: react/node\_modules/@types/react/ts5.0/index.d.ts:1017

###### Parameters

Expand All @@ -51,7 +51,7 @@ Component<P>.constructor
new BaseWidget<P>(props, context): BaseWidget<P>;
```

Defined in: react/node\_modules/@types/react/ts5.0/index.d.ts:1008
Defined in: react/node\_modules/@types/react/ts5.0/index.d.ts:1022

###### Parameters

Expand Down
2 changes: 1 addition & 1 deletion react/doc/api/index.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# GridStack React Library v13.0.0
# GridStack React Library v13.0.1

## Modules

Expand Down
5 changes: 4 additions & 1 deletion react/package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "react",
"private": true,
"version": "13.0.0",
"version": "13.0.1",
"type": "module",
"scripts": {
"dev": "vite",
Expand Down Expand Up @@ -33,5 +33,8 @@
"typescript-eslint": "^8.0.1",
"vite": "^6.4.3",
"vitest": "^4.1.0"
},
"resolutions": {
"vite": "^6.4.3"
}
}
Loading