This is a monorepo project (using pnpm workspaces) which is regrouping a few packages under a single repository. It is using and requiring SlickGrid core library (more specifically the 6pac/SlickGrid fork) and behind the scene (the "Why?" is simply because there is no need to rewrite the core library itself, in other words this is a wrapper library). The main goal of this library is to create a common repo that includes all Editors, Filters, Extensions and Services that could be used by any Framework (it is framework agnostic). The original SlickGrid is like an IKEA product that requires assembling everything yourself, however in this project here, we offer an all assembled product including a lot more available Editors, Filters, OData, GraphQL, ... and SlickGrid simply does not offer that by default. See below for more project details.
Below is a list of reasons why this project was created and why it is a monorepo project:
- it removed a lot of duplicate code that were common in both
Angular-Slickgrid and Aurelia-Slickgrid libraries
- prior to creating this monorepo, these 2 libs had ~90% of TypeScript code in common which was not very DRY, it is also a lot easier to maintain by pushing fixes in 1 common lib (this one here).
- decoupled a few Services that are not required by every project (OData, GraphQL, Export to CSV, Export to Excel, Composite Editor, RxJS, ...)
- framework agnostic, it could be implemented in many different frameworks (if you are interested in adding a different framework port that is not listed in the table below, please open a new Discussion)
- you can use it in plain JavaScript (ES6) or TypeScript, on our side we use it with plain JS (ES6) in our Salesforce environment with LWC (Lightning Web Component)
Check out the Releases section for all the latest News & Version Releases.
You could ⭐ the lib and perhaps support me with cafeine ☕. Thanks in advance.
The GitHub live demo shows 2 different UI themes (Material Design / Salesforce), but you could also choose the Bootstrap theme which is demoed in other frameworks with available links shown in the table below. Also note that these live demos are using Bootstrap and Bulma, but you could use any other UI libraries you wish since the lib is UI framework agnostic and there's a ton of CSS/SASS variables available to make it look the way you want.
Project Repo | Live Demo | UI used | Description |
---|---|---|---|
Angular-Slickgrid | demo | Bootstrap | for Angular framework |
Aurelia-Slickgrid | demo | Bootstrap | for Aurelia framework |
Slickgrid-React | demo | Bootstrap | for React framework |
Slickgrid-Universal-WebPack-Demo | demo | Bulma | Slickgrid-Universal demo with WebPack & TypeScript (demo purposes only) |
Slickgrid-Universal-Vite-Demo | demo | Bulma | Slickgrid-Universal demo with Vite & TypeScript (demo purposes only) |
The Slickgrid-Universal live demo is a Vanilla Implementation (which is not associated to any framework) built with ViteJS (originally WebPack) and is also used by Cypress for E2E testing all the UI functionalities. The Vanilla-force-bundle, which extends the vanilla-bundle package is also what we use in our SalesForce implementation (with Lightning Web Component), which was the original reason to create this monorepo library and avoid code duplication.
Slickgrid-Universal has 100% Unit Test Coverage, about +4,000 Jest unit tests and also +500 Cypress E2E tests to cover all Examples and most UI functionalities (each framework implementation also have an additional 500 tests), the goal is to test everything and offer peace of mind that whenever a new PR is opened, we have tests to cover them.
NOTE: the installation instructions below are only required if you want to contribute to this project, if on the other hand you just want to download a quick Slickgrid-Universal demo, then take a look at Slickgrid-Universal Vite Demo or Slickgrid-Universal WebPack Demo.
To get started and do development with this monorepo, you will need to clone the repo and follow the steps shown below. You must be at the root of the project to run the following commands. This project uses pnpm
, you can install it via npm i -g pnpm
or follow their installation
- Install pnpm workspace with pnpm or run it with
npx
# from the root
pnpm install
# or with npx
npx pnpm install
- Run Dev (Vanilla Implementation)
There is a Vanilla flavour implementation of this monorepo, vanilla means that it is not associated to any framework and is written in plain TypeScript without being bound to any framework. The implementation is very similar to Angular and Aurelia. It could be used as a guideline to implement it for other framework ports.
pnpm run dev
- Build (bundle)
You also need to run a full build if you want to run the Jest unit tests
pnpm run bundle
You must go through Installation Steps 1-2 (or 1,3) prior to running the Jest unit tests OR steps 1-2 when running Cypress E2E tests.
To run all unit tests (with Jest), you can run one of the following commands (make sure that steps 1,3 were executed prior to running this command)
pnpm run test
# or run Jest in watch mode
pnpm run test:watch
To run all E2E tests (with Cypress), you can run one of the following commands (make sure that steps 1,2 were executed prior to running this command)
# will open the Cypress GUI
pnpm run cypress
# or run it in the shell (like a CI/CD would)
pnpm run cypress:ci