Skip to content

Commit ad85e12

Browse files
ghiscodingnikhil56936pac
authored
feat!: prepare official 5.0 version release (#845)
* feat!: major folder restructuring with esbuild to support `iife`, `cjs` and `esm` and soon TypeScript (#804) * feat: migrate all Controls to TypeScript (#808) * feat: migrate all Menu/Buttons Plugins to TypeScript (#811) * feat: migrate all Decorator & Selection Plugins to TypeScript (#812) * feat: migrate CheckboxSelector & State Plugins to TypeScript (#813) * feat: migrate Draggable Grouping Plugins to TypeScript (#814) * feat: migrate Resizer Plugin to TypeScript (#815) * feat: migrate RowMoveManager Plugins to TypeScript (#817) * feat: migrate RowDetail Plugin to TypeScript (#822) * feat: migrate RemoteModel Plugins to TypeScript (#823) * feat: remove deprecated DataView methods (#833) * feat: remove deprecated DataView methods - `setAggregators` and `groupBy` were both replaced by `setGrouping` many years ago, so no need to keep these old functions anymore * feat: add new trading platform high frequency update grid (#835) * feat: add new trading platform high frequency update grid * fix: copying multiple times only kept last undo CellExternalCopyManager - fix an issue where copying and pasting to multiple area only kept the last undo and reapplied it over and over and the cause was because the clipCommand was global to the class so it only kept the last undo, the fix is to make sure the clipCommand variable is local to the execution handler instead --------- Co-authored-by: Nikhil Giddaluru <[email protected]> Co-authored-by: Ben McIntyre <[email protected]>
1 parent d0a0e3f commit ad85e12

File tree

831 files changed

+75499
-34681
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

831 files changed

+75499
-34681
lines changed

.eslintignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
*.d.ts

.eslintrc

Lines changed: 46 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -1,22 +1,49 @@
11
{
2-
"extends": [
3-
"eslint:recommended",
4-
"plugin:cypress/recommended"
5-
],
6-
"env": {
7-
"browser": true,
8-
"es6": true,
9-
"node": true
10-
},
11-
"globals": {
12-
"flatpickr": true,
13-
"Slick": true,
14-
"Sortable": true
15-
},
16-
"rules": {
17-
"cypress/no-unnecessary-waiting": "off",
18-
"cypress/unsafe-to-chain-command": "off",
19-
"no-cond-assign": "off",
20-
"no-prototype-builtins": [0]
2+
"parser": "@typescript-eslint/parser",
3+
"settings": {
4+
"node": {
5+
"tryExtensions": [".js", ".json", ".node", ".ts", ".d.ts"],
6+
"resolvePaths": ["node_modules/@types"]
217
}
8+
},
9+
"extends": [
10+
"plugin:@typescript-eslint/eslint-recommended",
11+
"plugin:@typescript-eslint/recommended",
12+
"plugin:cypress/recommended"
13+
],
14+
"plugins": ["@typescript-eslint", "node"],
15+
"root": true,
16+
"env": {
17+
"browser": true,
18+
"es6": true,
19+
"node": true
20+
},
21+
"globals": {
22+
"flatpickr": true,
23+
"Slick": true,
24+
"Sortable": true,
25+
"IIFE_ONLY": true
26+
},
27+
"rules": {
28+
"@typescript-eslint/ban-ts-comment": "off",
29+
"@typescript-eslint/no-empty-function": "off",
30+
"@typescript-eslint/no-explicit-any": "off",
31+
"@typescript-eslint/no-non-null-assertion": "off",
32+
"@typescript-eslint/no-unused-vars": ["error", { "argsIgnorePattern": "^_", "destructuredArrayIgnorePattern": "^_" }],
33+
"@typescript-eslint/ban-types": [
34+
"error",
35+
{
36+
"types": {
37+
// accept Function type
38+
"Function": false
39+
},
40+
"extendDefaults": true
41+
}
42+
],
43+
"cypress/no-assigning-return-values": "off",
44+
"cypress/no-unnecessary-waiting": "off",
45+
"cypress/unsafe-to-chain-command": "off",
46+
"no-cond-assign": "off",
47+
"no-prototype-builtins": [0]
48+
}
2249
}

.github/workflows/main.yml

Lines changed: 11 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ jobs:
2121
fail-fast: false
2222
matrix:
2323
# define which version of NodeJS to run the build
24-
node: [16]
24+
node: [18]
2525

2626
steps:
2727
- name: Clone repository
@@ -45,11 +45,17 @@ jobs:
4545
- run: npm --version
4646

4747
- name: Install npm dependencies
48-
run: npm install
48+
run: npm install --legacy-peer-deps
49+
50+
- name: Prod Build with TS Types
51+
run: npm run build:prod
52+
53+
- name: Start HTTP Server
54+
run: npm run serve:demo &
4955

5056
- name: Run Cypress E2E tests
51-
uses: cypress-io/github-action@v4
57+
uses: cypress-io/github-action@v5
5258
with:
53-
start: npm run serve
54-
wait-on: 'http://localhost:8080'
59+
# wait-on: 'http://localhost:8080'
5560
browser: chrome
61+
config-file: cypress/cypress.config.ts

.gitignore

Lines changed: 17 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,25 @@
55
*.exe
66
*.pdb
77
*.bak
8+
*.esproj
9+
*.sln
10+
.vs*
811
node_modules/*
12+
src/models/*.js
13+
src/plugins/*.js
14+
src/controls/*.js
15+
src/models/*.js
16+
src/*.js
17+
dist/browser/models/*
918
SlickgridRelease*
1019
nuget*
1120
testresult.xml
1221
yarn-error.log
13-
yarn.lock
22+
yarn.lock
23+
tsconfig.tsbuildinfo
24+
25+
# IDE - VSCode
26+
.vscode/*
27+
!.vscode/tasks.json
28+
!.vscode/launch.json
29+
!.vscode/extensions.json

.npmignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,11 @@ CODE_OF_CONDUCT.md
1414
nuget*
1515
cypress.json
1616
cypress/*
17+
lib
18+
node_modules
1719
examples
1820
SlickgridRelease*
21+
scripts
1922
tests
2023
testresult.xml
2124
package-lock.json

.vscode/launch.json

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
{
2+
// Use IntelliSense to learn about possible attributes.
3+
// Hover to view descriptions of existing attributes.
4+
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
5+
"version": "0.2.0",
6+
"configurations": [
7+
{
8+
"type": "chrome",
9+
"request": "launch",
10+
"name": "Launch Chrome against localhost",
11+
"url": "http://localhost:8080/examples/",
12+
"webRoot": "${workspaceFolder}"
13+
},
14+
{
15+
"type": "msedge",
16+
"request": "launch",
17+
"name": "Launch Edge against localhost",
18+
"url": "http://localhost:8080/examples/",
19+
"webRoot": "${workspaceFolder}"
20+
}
21+
]
22+
}

.vscode/settings.json

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
{
2+
"typescript.tsdk": "node_modules\\typescript\\lib"
3+
}

CHANGELOG.md

Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,48 @@
22
All notable changes to this project will be documented in this file.
33
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
44

5+
# [5.0.0-alpha.9](https://github.com/6pac/SlickGrid/compare/5.0.0-alpha.8...5.0.0-alpha.9) (2023-09-19)
6+
7+
# [5.0.0-alpha.8](https://github.com/6pac/SlickGrid/compare/5.0.0-alpha.7...5.0.0-alpha.8) (2023-09-19)
8+
9+
# [5.0.0-alpha.7](https://github.com/6pac/SlickGrid/compare/5.0.0-alpha.6...5.0.0-alpha.7) (2023-09-19)
10+
11+
# [5.0.0-alpha.6](https://github.com/6pac/SlickGrid/compare/5.0.0-alpha.5...5.0.0-alpha.6) (2023-09-19)
12+
13+
# [5.0.0-alpha.5](https://github.com/6pac/SlickGrid/compare/5.0.0-alpha.4...5.0.0-alpha.5) (2023-09-19)
14+
15+
# [5.0.0-alpha.4](https://github.com/6pac/SlickGrid/compare/5.0.0-alpha.3...5.0.0-alpha.4) (2023-09-19)
16+
17+
# [5.0.0-alpha.3](https://github.com/6pac/SlickGrid/compare/5.0.0-alpha.5...5.0.0-alpha.3) (2023-09-19)
18+
19+
# [5.0.0-alpha.5](https://github.com/6pac/SlickGrid/compare/5.0.0-alpha.1...5.0.0-alpha.5) (2023-09-19)
20+
21+
### Bug Fixes
22+
23+
* invalid argument type for setSelectedIds() method ([330e0e3](https://github.com/6pac/SlickGrid/commit/330e0e3e6f233439532804cafccf65e5781a9dd3))
24+
25+
# [5.0.0-alpha.1](https://github.com/6pac/SlickGrid/compare/5.0.0-alpha.0...5.0.0-alpha.1) (2023-09-19)
26+
27+
### Bug Fixes
28+
29+
* CJS fallbacks should be at the end not at beginning ([a244ada](https://github.com/6pac/SlickGrid/commit/a244ada34bf47489c6c5064e405a6d2ae6046aca))
30+
* copying multiple times only kept last undo CellExternalCopyManager ([cdda3fb](https://github.com/6pac/SlickGrid/commit/cdda3fb433c8350eecfe2e36f64ee26b083e3db6))
31+
32+
### Features
33+
34+
* add new trading platform high frequency update grid ([#835](https://github.com/6pac/SlickGrid/issues/835)) ([f86371b](https://github.com/6pac/SlickGrid/commit/f86371bdc15b76037f912717018e743c4202f232))
35+
* migrate all Controls to TypeScript ([#808](https://github.com/6pac/SlickGrid/issues/808)) ([0d129bd](https://github.com/6pac/SlickGrid/commit/0d129bd4ffed69d913681e7f7ad7fd558b1ca7ec))
36+
* migrate all Decorator & Selection Plugins to TypeScript ([#812](https://github.com/6pac/SlickGrid/issues/812)) ([cf3049e](https://github.com/6pac/SlickGrid/commit/cf3049ee05936b64bfe1abdc2aac932eb4a9751c))
37+
* migrate all Menu/Buttons Plugins to TypeScript ([#811](https://github.com/6pac/SlickGrid/issues/811)) ([c66c429](https://github.com/6pac/SlickGrid/commit/c66c429246be74fa13e7b0c5917f6d81c36d0049))
38+
* migrate CheckboxSelector & State Plugins to TypeScript ([#813](https://github.com/6pac/SlickGrid/issues/813)) ([2da9f7f](https://github.com/6pac/SlickGrid/commit/2da9f7f8fad1542bb15026bf0472d3462955b3ac))
39+
* migrate CustomTooltip Plugin to TypeScript ([#816](https://github.com/6pac/SlickGrid/issues/816)) ([0f2b417](https://github.com/6pac/SlickGrid/commit/0f2b417fad5fb5ef3fd0456694d55fdee9af9ae9))
40+
* migrate Draggable Grouping Plugins to TypeScript ([#814](https://github.com/6pac/SlickGrid/issues/814)) ([0037c7d](https://github.com/6pac/SlickGrid/commit/0037c7d831314706cc238340406e250f2d26ee64))
41+
* migrate RemoteModel Plugins to TypeScript ([#823](https://github.com/6pac/SlickGrid/issues/823)) ([7a816e2](https://github.com/6pac/SlickGrid/commit/7a816e22333e817cc9f8d415beeedba9e01ad20f))
42+
* migrate Resizer Plugin to TypeScript ([#815](https://github.com/6pac/SlickGrid/issues/815)) ([762ec3d](https://github.com/6pac/SlickGrid/commit/762ec3d3a3c08335ce2fec40d04bbaceb91ddeae))
43+
* migrate RowDetail Plugin to TypeScript ([#822](https://github.com/6pac/SlickGrid/issues/822)) ([685b009](https://github.com/6pac/SlickGrid/commit/685b00922fae002b946b50efdae53dfafb277c54))
44+
* migrate RowMoveManager Plugins to TypeScript ([#817](https://github.com/6pac/SlickGrid/issues/817)) ([8ad65ca](https://github.com/6pac/SlickGrid/commit/8ad65ca512e56a7c27d0b08ebcce656c4cf90c65))
45+
* remove deprecated DataView methods ([#833](https://github.com/6pac/SlickGrid/issues/833)) ([0f3ba49](https://github.com/6pac/SlickGrid/commit/0f3ba49b103e7094089f917ad36d4da294618ea2))
46+
547
## [4.0.1](https://github.com/6pac/SlickGrid/compare/4.0.0...4.0.1) (2023-06-30)
648

749
### Bug Fixes

CONTRIBUTING.md

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
# Contributing
2+
3+
We'd love for you to contribute and to make this project even better than it is today! If this interests you, please make sure to follow the steps below before creating a Pull Request.
4+
5+
When we mention `VSCode`, we mean the `Visual Studio Code` editor which can be downloaded [here](https://code.visualstudio.com)
6+
7+
Before accepting any Pull Request, we would you like to remind you to follow these steps:
8+
1. Install dependencies
9+
```sh
10+
npm install
11+
```
12+
2. Run a full build
13+
```sh
14+
npm run build:prod
15+
```
16+
3. Fix any Linting or TypeScript issues (if any) returned by the build process
17+
4. After being done with step 2 and 3, then the final step would be to proceed with your Pull Request
18+
- **NOTE** even though the `dist/` folder is included in Git for portability, you could choose (we stringly recommend) that you ignore/disregard these files from being included in your Pull Request.

README.md

Lines changed: 20 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -8,28 +8,36 @@
88

99
Check out the NEW SlickGrid Website! http://slickgrid.net/
1010

11-
This is the acknowledged most active non-customised fork of SlickGrid.
11+
This is the acknowledged most active fork of SlickGrid.
1212

13-
It aims to be a viable alternative master repo, building on the legacy of the mleibman/SlickGrid master branch, keeping libraries up to date and applying small, safe core patches and enhancements without turning into a personalised build. Our biggest changes include the merge of X-SlickGrid that brought Frozen columns/rows, we then also removed jQuery & jQueryUI and are now using native browser code in SlickGrid.
13+
It aims to be a viable alternative master repo, building on the legacy of the [mleibman/SlickGrid](https://github.com/mleibman/SlickGrid) master branch, keeping libraries up to date and applying, safe core patches and enhancements to keep the project up to date.
1414

15-
Check out the **[Examples](https://github.com/6pac/SlickGrid/wiki/Examples)** for examples demonstrating new features and use cases, such as dynamic grid creation and editors with third party controls.
15+
The project extends on the original SlickGrid foundation while also including the following changes
16+
- merged [X-SlickGrid](https://github.com/ddomingues/X-SlickGrid) code into the project which brought Frozen Columns/Rows (aka Pinning)
17+
- removed jQueryUI requirement in [v3](https://github.com/6pac/SlickGrid/wiki/Major-version-3.0----Removal-of-jQueryUI-requirement-(replaced-by-SortableJS)) (replaced it with [SortableJS](https://sortablejs.github.io/Sortable/))
18+
- removed jQuery requirement in [v4](https://github.com/6pac/SlickGrid/wiki/Major-version-4.0---Removal-of-jQuery-requirement)
19+
- modernized the project in [v5](https://github.com/6pac/SlickGrid/wiki/Major-version-5.0-%E2%80%90-ES6-ESM-and-TypeScript-Support) by migrating to TypeScript, we added ES6/ESM build targets and a new Alpine Theme
20+
21+
### Examples
22+
Check out the **[Examples](https://github.com/6pac/SlickGrid/wiki/Examples)** Wiki for a full list of examples demonstrating new features and use cases, such as dynamic grid creation and editors with third party controls.
1623

1724
Also check out the [Wiki](https://github.com/6pac/SlickGrid/wiki) for news and documentation.
1825

1926
### E2E Tests with Cypress
20-
We are now starting to add E2E (end to end) tests in the browser with [Cypress](https://www.cypress.io/). You can see [here](https://github.com/6pac/SlickGrid/tree/master/cypress/integration) the list of Examples that now have E2E tests. We also added these tests to the [GitHub Actions](https://github.com/features/actions) Workflow to automate certain steps while making sure any new commits aren't breaking the build/test. It will basically run all the E2E tests every time someone pushes a Commit or a Pull Request.
27+
We are now starting to add E2E (end to end) tests in the browser with [Cypress](https://www.cypress.io/). You can see [here](https://github.com/6pac/SlickGrid/tree/next/cypress/e2e) the list of Examples that now have E2E tests. We also added these tests to the [GitHub Actions](https://github.com/features/actions) Workflow (CI) to automate certain steps while also making sure that any new commits aren't breaking the build/tests. The concept is that it automatically runs all the E2E tests every time someone pushes a Commit or a Pull Request. We currently have tests for 22+ examples with almost ~300 tests.
2128

22-
We also welcome any new contributions (tests or fixes) and if you wish to add Cypress E2E tests, all you need to do is to clone the repo and then run the following commands
29+
We welcome any new contributions (tests or fixes) and if you wish to add Cypress E2E tests, all you need to do is to clone the repo and run the following commands
2330
```bash
2431
npm install # install all npm packages
25-
npm run serve # run a local http server on port 8080
26-
npm run cypress # open Cypress tool
32+
npm run dev # run a local development server on port 8080 in watch mode (or `npm run serve` without watch)
33+
npm run cypress # open Cypress UI tool
2734
```
2835
Once the Cypress UI is open, you can then click on "Run all Specs" to execute all E2E browser tests.
2936

30-
## SlickGrid 3.x drops jQueryUI requirement
31-
32-
We no longer require [jQueryUI](https://jqueryui.com/) in SlickGrid 3.0, we removed all associated code and replaced it with [SortableJS](https://sortablejs.github.io/Sortable/) which is a lot more modern and touch friendly. Please read [SlickGrid 3.0 - Annoucement & Migration](https://github.com/6pac/SlickGrid/wiki/Major-version-3.0----Removal-of-jQueryUI-requirement-(replaced-by-SortableJS)) Wiki for more info.
37+
## Migrations
3338

34-
## SlickGrid 4.x drops jQuery requirement
35-
SlickGrid is now using browser native code and no longer requires jQuery in SlickGrid 4.0. For more info, please read [SlickGrid 4.0 - Annoucement & Migration](https://github.com/6pac/SlickGrid/wiki/Major-version-4.0---Removal-of-jQuery-requirement)
39+
| SlickGrid | Migration Guide | Description |
40+
| --------- | --------------- | ----------- |
41+
| 3.x | [Announcing v3.0](https://github.com/6pac/SlickGrid/wiki/Major-version-3.0----Removal-of-jQueryUI-requirement-(replaced-by-SortableJS)) | dropping [jQueryUI](https://jqueryui.com/) requirement and replaced it with [SortableJS](https://sortablejs.github.io/Sortable/) which is a lot more modern and touch friendly |
42+
| 4.x | [Announcing v4.0](https://github.com/6pac/SlickGrid/wiki/Major-version-4.0---Removal-of-jQuery-requirement) | dropping [jQuery](https://jquery.com/) requirement, SlickGrid is now using browser native code |
43+
| 5.x | [Announcing v5.0](https://github.com/6pac/SlickGrid/wiki/Major-version-5.0-%E2%80%90-ES6-ESM-and-TypeScript-Support) | project modernization, added TypeScript with ES6, ESM builds and added a new Alpine Theme |

0 commit comments

Comments
 (0)