Skip to content
Open
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
6 changes: 6 additions & 0 deletions .eslintignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
node_modules
dist
coverage
config
.angular
assets
69 changes: 18 additions & 51 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,71 +2,38 @@

[![npm version](https://badge.fury.io/js/angular2gridster.svg)](https://badge.fury.io/js/angular2gridster)

Angular implementation of well known Gridster (no jQuery, no external libraries, only Angular and Rx.js). [Demo](https://swiety85.github.io/angular2gridster/).
> **Note**
> This is a fork of [Angular2Gridster](https://github.com/swiety85/angular2gridster). It is updated to Angular 20+ with some minor tweaks and updates added.

1. [Getting started](https://github.com/swiety85/angular2gridster/wiki/Getting-started)
2. [What is Angular2gridster and why to use it?](https://github.com/swiety85/angular2gridster/wiki)
3. [API Documentation](https://github.com/swiety85/angular2gridster/wiki/API-Documentation)
4. [Roadmap](https://github.com/swiety85/angular2gridster/wiki/Roadmap)

More comprehensive documentation is available in [Wiki](https://github.com/swiety85/angular2gridster/wiki).

Development progress can be tracked in [Milestones](https://github.com/swiety85/angular2gridster/milestones) and in [Project board](https://github.com/swiety85/angular2gridster/projects/1).
Angular implementation of the well-known Gridster (no jQuery, no external libraries, only Angular and Rx.js).

## Versions:

- Version **13.x** works with **Angular 13.x**.
- Version **12.x** works with **Angular 12.x**.
- Version **11.x** works with **Angular 11.x**.
- Version **10.x** works with **Angular 10.x**.
- Version **9.x** works with **Angular 9.x**.
- Version **8.x** works with **Angular 8.x**.
- Version **7.x** works with **Angular 7.x**.
- Version **6.x** works with **Angular 6.x**.
- Version **5.x** works with **Angular 5.x**.
- Version **4.x** works with **Angular 4.x**.
Major versions of this library work with the corresponding Angular major version. For example:
- Version **20.x** of angular2gridster works with **Angular 20.x**.

Versions **1.x** and **0.x** works only with **Angular 4.x**, but the newest states you can find in **v4.x**.
Versions **1.x** and **0.x** of this library work only with **Angular 4.x**.

## Installation

```shell
npm install angular2gridster
npm install @hyperviewhq/angular2gridster
```

Once installed you need to import our module:

```js
...
import { GridsterModule } from 'angular2gridster';

@NgModule({
declarations: [
AppComponent
],
imports: [
...
GridsterModule.forRoot() // .forRoot() is required since version v4+
],
providers: [],
bootstrap: [AppComponent]
})
export class AppModule { }
```

The example it imports in AppModule, but it could also be imported in any other module - depends where you want to use it.
The example imports in AppModule, but it could also be imported in any other module - depends on where you want to use it.

### Additional steps for System.js

To make Angular2gridster works with System.js you need to provide dedicated configuration in `systemjs.config.js`.
It requires change in `map` object and 'packages' as follows:
To make Angular2gridster works with System.js you need to provide a dedicated configuration in `systemjs.config.js`.
It requires a change in `map`` object and 'packages' as follows:

```js
System.config({
map: {
// ...
rxjs: 'node_modules/rxjs',
angular2gridster: 'node_modules/angular2gridster',
angular2gridster: 'node_modules/@hyperviewhq/angular2gridster',
},
packages: {
// ...
Expand Down Expand Up @@ -158,9 +125,9 @@ If you use `responsiveOptions`, then item coords will be assigned to different b
- `lg` (1250px - 1800px), it uses `xLg` and `yLg` attributes
- from `xl` (1800px), it uses `xXl` and `yXl` attributes

(widths in px are only example and works for `responsiveOptions in example above).
(widths in px are only example and works for `responsiveOptions in the example above).

If you set `responsiveSizes: true`, item size can be different for different breakpoints. In this case size will be binded to following attributes:
If you set `responsiveSizes: true`, item size can be different for different breakpoints. In this case, size will be bound to following attributes:

- till `sm` (480px), it uses `w` and `h` attributes
- `sm` (480px - 768px), it uses `wSm` and `hSm` attributes
Expand All @@ -183,9 +150,9 @@ Go to: http://localhost:4200/
## Compilation problems

If somebody will have compilation problems please add an issue (if not yet created). I will try to fix it as soon as possible.
Angular compiler has still some issues opened and it is changing frequently.
The angular compiler has still some issues open and it is changing frequently.

As a temporary solution copy files from `/projects/angular2gridster/src/lib` folder to dedicated folder in your project.
As a temporary solution copy files from the`/``projects/`angular2gridster/src/lib` folder to dedicated folder in your project.

## Issues

Expand All @@ -194,9 +161,9 @@ please provide the steps to reproduce and if possible a minimal demo of the prob

[![Edit Angular](https://codesandbox.io/static/img/play-codesandbox.svg)](https://codesandbox.io/s/angular-otned?fontsize=14)

The project is in development so don't hesitate to writte any questions or suggestion on issue list.
I look forward to get a response from you.
The project is in development so don't hesitate to write any questions or suggestions on issue list.
I look forward to getting a response from you.

## Origin

This project was created on idea of [GridList](https://github.com/hootsuite/grid). Great alternative for Gridster.
This project was created on the idea of [GridList](https://github.com/hootsuite/grid)](https://github.com/hootsuite/grid). Great alternative for Gridster.
72 changes: 54 additions & 18 deletions angular.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,12 +11,15 @@
"schematics": {},
"architect": {
"build": {
"builder": "@angular-devkit/build-angular:browser",
"builder": "@angular-devkit/build-angular:application",
"options": {
"outputPath": "dist/gridster-demo",
"outputPath": {
"base": "dist/gridster-demo"
},
"index": "src/index.html",
"main": "src/main.ts",
"polyfills": "src/polyfills.ts",
"polyfills": [
"zone.js"
],
"tsConfig": "src/tsconfig.app.json",
"assets": [
"src/favicon.ico",
Expand All @@ -26,12 +29,11 @@
"src/styles.css"
],
"scripts": [],
"vendorChunk": true,
"extractLicenses": false,
"buildOptimizer": false,
"sourceMap": true,
"optimization": false,
"namedChunks": true
"namedChunks": true,
"browser": "src/main.ts"
},
"configurations": {
"production": {
Expand All @@ -51,35 +53,35 @@
"outputHashing": "all",
"sourceMap": false,
"namedChunks": false,
"extractLicenses": true,
"vendorChunk": false,
"buildOptimizer": true
"extractLicenses": true
}
},
"defaultConfiguration": ""
},
"serve": {
"builder": "@angular-devkit/build-angular:dev-server",
"options": {
"browserTarget": "gridster-demo:build"
"buildTarget": "gridster-demo:build"
},
"configurations": {
"production": {
"browserTarget": "gridster-demo:build:production"
"buildTarget": "gridster-demo:build:production"
}
}
},
"extract-i18n": {
"builder": "@angular-devkit/build-angular:extract-i18n",
"options": {
"browserTarget": "gridster-demo:build"
"buildTarget": "gridster-demo:build"
}
},
"test": {
"builder": "@angular-devkit/build-angular:karma",
"options": {
"main": "src/test.ts",
"polyfills": "src/polyfills.ts",
"polyfills": [
"zone.js"
],
"tsConfig": "src/tsconfig.spec.json",
"karmaConfig": "src/karma.conf.js",
"styles": [
Expand Down Expand Up @@ -121,9 +123,9 @@
},
"configurations": {
"production": {
"project": "projects/angular2gridster/ng-package.prod.json"
, "tsConfig": "projects/angular2gridster/tsconfig.lib.prod.json"
}
"project": "projects/angular2gridster/ng-package.prod.json",
"tsConfig": "projects/angular2gridster/tsconfig.lib.prod.json"
}
}
},
"test": {
Expand All @@ -137,5 +139,39 @@
}
}
},
"defaultProject": "gridster-demo"
"cli": {
"analytics": false
},
"schematics": {
"@angular-eslint/schematics:application": {
"setParserOptionsProject": true
},
"@angular-eslint/schematics:library": {
"setParserOptionsProject": true
},
"@schematics/angular:component": {
"type": "component"
},
"@schematics/angular:directive": {
"type": "directive"
},
"@schematics/angular:service": {
"type": "service"
},
"@schematics/angular:guard": {
"typeSeparator": "."
},
"@schematics/angular:interceptor": {
"typeSeparator": "."
},
"@schematics/angular:module": {
"typeSeparator": "."
},
"@schematics/angular:pipe": {
"typeSeparator": "."
},
"@schematics/angular:resolver": {
"typeSeparator": "."
}
}
}
Loading