Skip to content

Slickgrid-Universal is a monorepo which includes all Editors, Filters, Extensions, Services and is Framework Agnostic to take full advantage of SlickGrid core lib.

License

Notifications You must be signed in to change notification settings

Harsgalt86/slickgrid-universal

 
 

Repository files navigation

Slickgrid-Universal

License: MIT TypeScript lerna--lite NPM downloads npm

Actions Status Cypress.io jest codecov

Description

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.

Why create this monorepo?

Below is a list of reasons why this project was created and why it is a monorepo project:

  1. 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).
  2. decoupled a few Services that are not required by every project (OData, GraphQL, Export to CSV, Export to Excel, Composite Editor, RxJS, ...)
  3. 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)

Latest News & Releases

Check out the Releases section for all the latest News & Version Releases.

Like my work?

You could ⭐ the lib and perhaps support me with cafeine ☕. Thanks in advance.

Buy Me a Coffee at ko-fi.com

Live Demos & Available Framework Ports

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.

Available Framework Ports

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.

Fully Tested with Jest (Unit Tests) - Cypress (E2E Tests)

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.

Available Public Packages

Package Name Version Description Changes
@slickgrid-universal/common npm commonly used Formatters/Editors/Filters/Services/... changelog
@slickgrid-universal/binding npm basic Binding Engine & Helper changelog
@slickgrid-universal/event-pub-sub npm basic PubSub Service using JS Events changelog
@slickgrid-universal/composite-editor-component npm Composite Editor Modal Component changelog
@slickgrid-universal/custom-footer-component npm Custom Footer Component for the grid changelog
@slickgrid-universal/custom-tooltip-plugin npm Custom Tooltip (plugin) changelog
@slickgrid-universal/empty-warning-component npm simple Empty Data Warning Component changelog
@slickgrid-universal/pagination-component npm simple Pagination Component changelog
@slickgrid-universal/excel-export npm Export to Excel Service (xls/xlsx) changelog
@slickgrid-universal/text-export npm Export to Text File Service (csv/txt) changelog
@slickgrid-universal/graphql npm GraphQL Query Service (Filter/Sort/Paging) changelog
@slickgrid-universal/odata npm OData Query Service (Filter/Sort/Paging) changelog
@slickgrid-universal/row-detail-view-plugin npm Row Detail View (plugin) changelog
@slickgrid-universal/rxjs-observable npm RxJS Observable Service Wrapper changelog
@slickgrid-universal/utils npm Common JS Utils changelog
@slickgrid-universal/vanilla-bundle npm Vanilla TypeScript/ES6 implementation changelog
@slickgrid-universal/vanilla-force-bundle npm Vanilla TypeScript/ES6 for Salesforce implementation changelog

Installation

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

  1. Install pnpm workspace with pnpm or run it with npx
# from the root
pnpm install

# or with npx
npx pnpm install
  1. 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
  1. Build (bundle)

You also need to run a full build if you want to run the Jest unit tests

pnpm run bundle

Tests

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.

Jest Unit 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

Cypress E2E Tests

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

About

Slickgrid-Universal is a monorepo which includes all Editors, Filters, Extensions, Services and is Framework Agnostic to take full advantage of SlickGrid core lib.

Resources

License

Code of conduct

Stars

Watchers

Forks

Packages

No packages published

Languages

  • TypeScript 93.5%
  • SCSS 6.4%
  • JavaScript 0.1%