@revolist/revogrid 4.11.18 → 4.11.20

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/package.json +1 -1
  2. package/readme.md +33 -23
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@revolist/revogrid",
3
- "version": "4.11.18",
3
+ "version": "4.11.20",
4
4
  "type": "module",
5
5
  "description": "Virtual reactive data grid spreadsheet component - RevoGrid.",
6
6
  "license": "MIT",
package/readme.md CHANGED
@@ -13,12 +13,10 @@
13
13
  <img src="https://sonarcloud.io/api/project_badges/measure?project=revolist_revogrid&metric=alert_status" alt="Sonar Quality Gate"/>
14
14
  </p>
15
15
 
16
- #
17
16
 
18
17
  <h3 align="center">Powerful data grid component built with <a href="https://stenciljs.com" target="_blank">StencilJS</a>.</h3>
19
18
  <p align="center">
20
19
  Support Millions of cells and thousands of columns easy and efficiently for fast data rendering. Easy to use.
21
-
22
20
  </p>
23
21
 
24
22
  <p align="center">
@@ -155,57 +153,69 @@ yarn add @revolist/revogrid;
155
153
 
156
154
  In `<revo-grid />` we have developed a sophisticated Continuous Delivery (CD) system powered by GitHub Actions. This advanced system automatically builds and delivers grid versions across multiple frameworks, including React, Angular, Svelte, Vue 2, and Vue 3, with full type support. This ensures continuous version delivery, providing the latest grid enhancements and upgrades across all supported frameworks ✨. In the future (version 5), we are planning to switch to monorepo based development.
157
155
 
158
- - [JavaScript](https://rv-grid.com/guide/);
159
- - [VueJs](https://rv-grid.com/guide/vue3/);
160
- - [Svelte](https://rv-grid.com/guide/svelte/);
161
- - [React](https://rv-grid.com/guide/react/);
162
- - [Angular](https://rv-grid.com/guide/angular/).
163
156
 
164
157
 
158
+ - [![VueJs](./assets/vuejs.svg) Vue 3](https://rv-grid.com/guide/vue3/) and [Vue 2](https://rv-grid.com/guide/vue2/)
159
+ - [![React](./assets/react.svg) React](https://rv-grid.com/guide/react/)
160
+ - [![Angular](./assets/angular.svg) Angular](https://rv-grid.com/guide/angular/)
161
+ - [![Svelte](./assets/svelte.svg) Svelte](https://rv-grid.com/guide/svelte/)
162
+ - [![JavaScript](./assets/js.svg) JavaScript](https://rv-grid.com/guide/)
163
+
165
164
  ## Basic Usage
166
165
 
167
166
  RevoGrid functions as a web component. Simply place the component on your page and access its properties as you would with any other HTML element. It also offers multiple ways to integrate our grid into your project:
168
167
 
169
168
  - [Import the grid into your project](https://rv-grid.com/guide/installation)
170
169
 
171
- ### JavaScript Data Grid Usage
170
+ ### JavaScript Data Grid Simple Usage
171
+
172
+ ```javascript
173
+ // Select the RevoGrid element from the DOM
174
+ const grid = document.querySelector('revo-grid');
175
+
176
+ // Define the columns for the grid
177
+ grid.columns = [{ prop: 'name', name: 'First Column' }, { prop: 'details' }];
178
+ // Define the data source for the grid
179
+ grid.source = [{ name: 'New Item', details: 'Item Description' }];
180
+ ```
181
+
182
+ ### Custom cell template
172
183
 
173
184
  ```javascript
174
185
  // Select the RevoGrid element from the DOM
175
186
  const grid = document.querySelector('revo-grid');
176
187
 
177
188
  // Define the columns for the grid
178
- const columns = [
179
- { prop: 'name', name: 'First Column' }, // Simple column definition
189
+ grid.columns = [
180
190
  {
181
- prop: 'details',
182
- name: 'Second Column',
183
- // Custom cell template for the 'details' column
184
- cellTemplate: (createElement, props) => {
185
- return createElement(
191
+ prop: 'name',
192
+ name: 'Custom cell template',
193
+ // Custom cell template
194
+ cellTemplate(h, { value }) {
195
+ return h(
186
196
  'div',
187
197
  {
188
198
  style: { backgroundColor: 'red' }, // Styling the cell background
189
199
  class: { 'inner-cell': true }, // Adding a CSS class
190
200
  },
191
- props.model[props.prop] || '' // Display the cell content or an empty string if undefined
201
+ value || '' // Display the cell content or an empty string if undefined
192
202
  );
193
203
  },
194
204
  },
195
205
  ];
196
-
197
206
  // Define the data source for the grid
198
- const items = [{ name: 'New Item', details: 'Item Description' }];
199
-
200
- // Assign the columns and data source to the grid
201
- grid.columns = columns;
202
- grid.source = items;
207
+ grid.source = [{ name: 'New Item' }];
203
208
  ```
204
209
 
205
-
206
210
  [Example and guide](https://rv-grid.com/guide/)
207
211
 
208
212
 
213
+ - [![VueJs](./assets/vuejs.svg) Vue 3](https://rv-grid.com/guide/vue3/) and [Vue 2](https://rv-grid.com/guide/vue2/)
214
+ - [![React](./assets/react.svg) React](https://rv-grid.com/guide/react/)
215
+ - [![Angular](./assets/angular.svg) Angular](https://rv-grid.com/guide/angular/)
216
+ - [![Svelte](./assets/svelte.svg) Svelte](https://rv-grid.com/guide/svelte/)
217
+ - [![JavaScript](./assets/js.svg) JavaScript](https://rv-grid.com/guide/)
218
+
209
219
  ## Versions
210
220
 
211
221
  - **2.0+**: Introduced the plugin system, grouping, sorting, and filtering.