- Notifications
You must be signed in to change notification settings - Fork30
Slickgrid-Universal is a monorepo which includes all Editors, Filters, Extensions, Services related to SlickGrid usage and is also Framework Agnostic
License
ghiscoding/slickgrid-universal
Folders and files
Name | Name | Last commit message | Last commit date | |
---|---|---|---|---|
Repository files navigation
Note
VueJS is now supported via a newSlickgrid-Vue Component 🚀. One major difference compare to the other existing framework wrappers is that Slickgrid-Vue is included directly in here under the/frameworks
folder, eventually all other framework wrappers will soon also be moved in here as well (which is scheduled for our next major version).
📘Documentation website powered by GitBook for version 4.0+ (or use theWikis for older versions)
Live Demo website
Also available in Stackblitz (Codeflow) below, this can also be used to provide an issue repro.
One of the best JavaScript data grid named as "SlickGrid", which was originally developed by @mleibman, beats most other data grids in terms of features, customizability & performance (running smoothly with even a million rows).
This is a monorepo project (usingpnpm workspaces andLerna-Lite) which is regrouping a few packages under a single repository. It was originally requiring6pac/slickgrid
as an external dependency, but that was dropped in v4.0, and it has been a standalone library since then. The main goal of this project is to create a common repo that includes all Editors, Filters, Extensions and Services that could be used by any frameworks (the project is framework agnostic).
What's the difference with the original SlickGrid (now6pac/slickgrid
) project?
If you have used the original SlickGrid in the past, you might be wondering, should I use the6pac/slickgrid
or Slickgrid-Universal (or any of its variances), what are the differences? The main difference is that the originalSlickGrid
/6pac/slickgrid
is like an unassembled IKEA product where it's very bare bone and unassembled, on the other hand Slickgrid-Universal is an all assembled product with batteries included. What we mean is that Slickgrid-Universal comes with many built-in things like Formatters, Editors, Filters, Tree Data, ... which are not available in the original SlickGrid. So in the end SlickGrid (6pac/slickgrid
) project is much smaller in size because it's very bare bone but you will have to implement many things by yourself (Sorting/Filtering/Editing/...), and if you're looking at creating very basic grids with the smallest footprint possible, then SlickGrid might work for you, otherwise Slickgrid-Universal has a more complete set of built-ins with a bit larger download size.
Side note, I am (@ghiscoding
) actually a maintainer in both projects, that is Slickgrid-Universal as well as the6pac/slickgrid
(in fact Slickgrid-Universal was originally requiring the6pac/slickgrid
dependency but that was eventually dropped and is now a standalone). The main reason to support both projects is to keep core files in sync as much as possible (SlickGrid, SlickDataView and all plugins). Both projects combined together have a large userbase and this mean more more stability for both projects, and we also often sync new features in both projects as well... and that's it, I hope it's clear what the differences are, if you need more clarity then feel free to open a new Discussion for more details.
Below is a list of reasons as to why this project was created and why it was built as a monorepo project:
- originally created to remove duplicated code from these 2 wrappersAngular-Slickgrid andAurelia-Slickgrid
- prior to this monorepo, these 2 projects had ~90% duplicated code in common which was not very DRY.
- being a common source makes it a lot easier to maintain by pushing fixes in this common project here.
- it also decoupled a few Services which are not required in every project (OData, GraphQL, Export to CSV, Export to Excel, Composite Editor, RxJS, ...)
- and finally it is framework agnostic, it could be implemented in many different frameworks (if you are interested in adding a different framework wrapper, which is not listed in thetable below (maybe Svelte), then please open a newDiscussion)
- you can use it in plain JavaScript (ES6) or TypeScript, i.e. we use plain JS (ES6) in our Salesforce environment with LWC (Lightning Web Component)
Check out theReleases section for all the latest News & Releases.
You could ⭐ the lib and perhaps support me with caffeine via the button below. Thanks in advance.
The GitHublive demo above shows 2 different UI themes (Material Design / Salesforce), but you could also choose the Bootstrap theme which is demoed in other frameworks from links available in the table below. Also note that even though the demos are built with eitherBootstrap orBulma, you could in theory use any other UI libraries. The project tries to be as much agnostic as possible and it does so by providing a large set of CSS/SASS variables which are available to customize however you want.
Project Repo | Live Demo | Stackblitz | Framework | Docs | Downloads | Changes |
---|---|---|---|---|---|---|
Angular-Slickgrid | demo | Angular | docs | changelog | ||
Aurelia-Slickgrid | demo | Aurelia | docs | changelog | ||
Slickgrid-React | demo | React | docs | changelog | ||
Slickgrid-Vue | demo | Vue -new 🚀 | docs | changelog | ||
Slickgrid-Universal-WebPack-Demo | demo | Vanilla / WebPack | docs | |||
Slickgrid-Universal-Vite-Demo | demo | Vanilla / Vite | docs | |||
Slickgrid-Universal/vanilla-force-bundle | n/a | n/a | Salesforce (LWC) | docs | zip file |
The Slickgrid-Universallive demo is a Vanilla Implementation (which is not associated to any framework) built withViteJS (originallyWebPack) and is also being used to run all E2E tests withCypress for testing every UI functionalities. TheVanilla-force-bundle, which extends thevanilla-bundle package, is what we use in our SalesForce implementation (with Lightning Web Component) and it can also be used as a Standalone script (seezip file). These were all the original reasons to create this monorepo library but above all it was to avoid code duplication. Dark Mode is also shown in some of the examples (not all), seeDark Mode documentation for more infos.
Slickgrid-Universal has close to100% Unit Test Coverage, ~5,000 Vitest unit tests including ~900 Cypress E2E tests to cover allExamples and most UI functionalities (each framework implementation also includes the same amount of E2E tests), the goal is to offer peace of mind that pretty much all the code and PR changes are fully tested before releasing anything.
NOTE: the installation instructions below areonly required if you want to contribute to this project, if however you just want to download a quick Slickgrid-Universal demo, then I would suggest you to take a look at the following reposSlickgrid-Universal Vite Demo orSlickgrid-Universal WebPack Demo.
To get started with development in this monorepo, you will need to clone the repo and follow the steps shown below. Note that you must be at the root of the project in order to run the commands below. This project also requirespnpm
.
- pnpm installation
This project usespnpm workspaces, you can install pnpm by choosing 1 of these 2 choices:
a. following theirinstallation
b. or install pnpm via Nodecorepack
corepackenable# optionally update pnpm to latestcorepack prepare pnpm@latest --activate
For a more targeted install, you could optionally install a specific framework (which avoids installing all frameworks).Taking Vue for example
pnpm vue:install
Note for frameworks development you will not only require the targeted install but it also requires you to run a
pnpm bundle
- Run Dev (Vanilla Implementation)
There is a Vanilla flavour implementation of this monorepo, vanilla means that it is not associated to any frameworkand 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 wrappers.
pnpm run dev
- Build (bundle)
You also need to run a full build in order to run the Vitest unit tests
pnpm run bundle
You must go through Installation Steps 1-3 prior to running the Vitest unit tests OR steps 1-2 for Cypress E2E tests.
To run all unit tests (with Vitest), you can run one of the following commands (make sure that steps 1-3 were executed prior to running this command)
pnpm runtest# or run Vitest in watch modepnpm 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 GUIpnpm run cypress# or run it in the shell (like a CI/CD would)pnpm run cypress:ci
About
Slickgrid-Universal is a monorepo which includes all Editors, Filters, Extensions, Services related to SlickGrid usage and is also Framework Agnostic