@revolist/vue3-datagrid 4.26.2 → 4.27.0

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.
package/README.md CHANGED
@@ -7,9 +7,7 @@
7
7
  <p align="center">
8
8
  <a href="https://www.npmjs.com/package/@revolist/revogrid"><img src="https://img.shields.io/npm/v/@revolist/revogrid" alt="Latest Version on NPM"/></a>
9
9
  <a href="https://github.com/revolist/revogrid/blob/master/LICENSE"><img src="https://img.shields.io/npm/l/@revolist/revogrid" alt="Software License"/></a>
10
- <img src="https://badgen.net/bundlephobia/dependency-count/@revolist/revogrid" alt="Dependency count"/>
11
- <img src="https://badgen.net/bundlephobia/tree-shaking/@revolist/revogrid" alt="Tree shaking"/>
12
- <img src="https://img.shields.io/bundlephobia/min/@revolist/revogrid" alt="Bundle size"/>
10
+ <a href="https://www.npmjs.com/package/@revolist/revogrid"><img src="https://img.shields.io/npm/dm/@revolist/revogrid" alt="NPM downloads per month"/></a>
13
11
  <img src="https://sonarcloud.io/api/project_badges/measure?project=revolist_revogrid&metric=alert_status" alt="Sonar Quality Gate"/>
14
12
  <a href="https://github.com/revolist/revogrid/actions/workflows/unit.yml">
15
13
  <img src="https://github.com/revolist/revogrid/actions/workflows/unit.yml/badge.svg" alt="Workflow status badge" loading="lazy" height="20">
@@ -56,7 +54,7 @@ Used by some of the largest companies in Europe and the United States.
56
54
  - Seamless copy/paste from Excel, Google Sheets, or any other sheet format.
57
55
 
58
56
 
59
- - **Lightweight**: Minimal initial bundle size ![Min size](https://badgen.net/bundlephobia/min/@revolist/revogrid@latest). Can be imported with polyfills or as a module for modern browsers.
57
+ - **Lightweight**: Minimal initial bundle size. Can be imported with polyfills or as a module for modern browsers.
60
58
 
61
59
  - **[Intelligent Virtual DOM](https://rv-grid.com/guide/overview#VNode-Reactive-DOM)**: Smart row recombination to minimize redraws.
62
60
 
@@ -76,6 +74,40 @@ Used by some of the largest companies in Europe and the United States.
76
74
  - Header filtering.
77
75
  - Custom filters to extend system filters with your own set.
78
76
 
77
+ Blank filters preserve source-value identity and own-property presence. By default,
78
+ `null`, owned `undefined`, exactly `""`, and missing own properties are blank;
79
+ whitespace-only strings, `false`, `0`, `NaN`, arrays, and objects are not. The
80
+ policy can be configured at grid level and overridden field-by-field per column
81
+ with `blankSemantics`. Existing saved `empty` and `notEmpty` operator IDs remain
82
+ compatible and are labeled “Is blank” and “Is not blank.”
83
+
84
+ ```ts
85
+ const filter = {
86
+ blankSemantics: {
87
+ whitespaceOnlyString: true,
88
+ emptyArray: true,
89
+ isBlank(value, context, fallbackResult) {
90
+ return value === 'N/A' || fallbackResult;
91
+ },
92
+ },
93
+ };
94
+
95
+ const columns = [{
96
+ prop: 'tags',
97
+ filter: 'array',
98
+ // Partial column policy; other fields inherit the grid policy.
99
+ blankSemantics: { emptyArray: false },
100
+ }];
101
+ ```
102
+
103
+ An inherited property counts as missing. A `cellParser` supplies the value for
104
+ ordinary comparisons but does not replace the raw value used for blank checks.
105
+ The callback receives the source value, row model, column, property, parsed
106
+ value, own-property status, effective policy, and fallback result. “Is not
107
+ blank” is the exact inverse of the resolved blank predicate. Typed operators
108
+ remain strict; blank configuration never normalizes `false`, `0`, or arrays
109
+ into another source value.
110
+
79
111
  - **[Export](https://rv-grid.com/guide/export.plugin)**:
80
112
  - **[CSV](https://rv-grid.com/guide/export.plugin)**: Built-in file export for core RevoGrid data workflows.
81
113
  - **[PDF](https://rv-grid.com/guide/pdf-export)**: Browser-side PDF export with the lightweight [`@revolist/revogrid-pdf-export`](https://www.npmjs.com/package/@revolist/revogrid-pdf-export) plugin.
@@ -84,6 +116,7 @@ Used by some of the largest companies in Europe and the United States.
84
116
  - **Custom Sizes**: Define custom sizes for [columns](https://rv-grid.com/guide/column/#Column-Size) and [rows](https://rv-grid.com/guide/row/height). Automatic sizing based on content.
85
117
 
86
118
  - **[Column Resizing](https://rv-grid.com/guide/column/resize)**: Adjust column widths.
119
+ - **[Row Resizing](https://rv-grid.com/guide/row/resize)**: Resize from row-header edges or enable full-row resize edges with optional height limits.
87
120
  - **Auto Size Columns**: Intelligent column width adjustment that automatically adapts to content, ensuring optimal readability and layout efficiency.
88
121
 
89
122
  - **Pinned/Sticky/Freezed Elements**:
@@ -409,8 +442,10 @@ export default defineComponent({
409
442
  - [![React](./assets/react.svg) React](https://rv-grid.com/guide/react/)
410
443
  - [![Angular](./assets/angular.svg) Angular](https://rv-grid.com/guide/angular/)
411
444
  - [![Svelte](./assets/svelte.svg) Svelte](https://rv-grid.com/guide/svelte/)
445
+ - [![Python](./assets/python.svg) Dash / Python](https://rv-grid.com/guide/dash/)
412
446
  - [![JavaScript](./assets/js.svg) JavaScript](https://rv-grid.com/guide/)
413
447
 
448
+
414
449
  ## Versions
415
450
 
416
451
  - **2.0+**: Introduced the plugin system, grouping, sorting, and filtering.
@@ -469,8 +504,8 @@ Thank you for supporting RevoGrid! 🙏
469
504
 
470
505
  ## Testing
471
506
 
472
- [![Unit Tests](https://github.com/revolist/revogrid/actions/workflows/ci-unit.yml/badge.svg?branch=main)](https://github.com/revolist/revogrid/actions/workflows/ci-unit.yml)
473
- [![E2E Tests](https://github.com/revolist/revogrid/actions/workflows/ci-e2e.yml/badge.svg?branch=main)](https://github.com/revolist/revogrid/actions/workflows/ci-e2e.yml)
507
+ [![Unit Tests](https://github.com/revolist/revogrid/actions/workflows/unit.yml/badge.svg?branch=main)](https://github.com/revolist/revogrid/actions/workflows/unit.yml)
508
+ [![E2E Tests](https://github.com/revolist/revogrid/actions/workflows/e2e.yml/badge.svg?branch=main)](https://github.com/revolist/revogrid/actions/workflows/e2e.yml)
474
509
 
475
510
  RevoGrid is thoroughly tested to ensure reliability and stability.
476
511
 
@@ -1,4 +1,4 @@
1
- import { defineComponent as A, ref as I, getCurrentInstance as g, inject as _, h as O, createVNode as S, render as E, defineAsyncComponent as z } from "vue";
1
+ import { defineComponent as A, ref as I, getCurrentInstance as g, inject as _, h as O, createVNode as z, render as E, defineAsyncComponent as S } from "vue";
2
2
  import { defineCustomElements as D } from "@revolist/revogrid/loader";
3
3
  export * from "@revolist/revogrid/loader";
4
4
  export * from "@revolist/revogrid";
@@ -56,6 +56,7 @@ const p = "routerLink", R = "navManager", L = "router", M = "aria", f = /* @__PU
56
56
  "range",
57
57
  "readonly",
58
58
  "resize",
59
+ "resizeRow",
59
60
  "noHorizontalScrollTransfer",
60
61
  "canFocus",
61
62
  "useClipboard",
@@ -145,7 +146,7 @@ const T = (e, t, s, r, i = null) => {
145
146
  for (const c in s)
146
147
  n.component.props[c] = s[c];
147
148
  } else
148
- n = S(e, s), k(n, r), E(n, t);
149
+ n = z(e, s), k(n, r), E(n, t);
149
150
  return { vueInstance: n, destroy: () => E(null, t), el: t };
150
151
  }, K = (e, t) => {
151
152
  const s = g();
@@ -207,7 +208,7 @@ const j = (e) => {
207
208
  function X(e) {
208
209
  return !!e && (typeof e == "object" || typeof e == "function") && typeof e.then == "function";
209
210
  }
210
- const P = D?.(), q = z(async () => (X(P) && await P, U));
211
+ const P = D?.(), q = S(async () => (X(P) && await P, U));
211
212
  export {
212
213
  q as VGrid,
213
214
  j as VGridVueEditor,
@@ -1 +1 @@
1
- (function(o,s){typeof exports=="object"&&typeof module<"u"?s(exports,require("vue"),require("@revolist/revogrid/loader"),require("@revolist/revogrid")):typeof define=="function"&&define.amd?define(["exports","vue","@revolist/revogrid/loader","@revolist/revogrid"],s):(o=typeof globalThis<"u"?globalThis:o||self,s(o.Vue3Datagrid={},o.Vue,o.RevogridLoader,o.Revogrid))})(this,(function(o,s,p,C){"use strict";const y="routerLink",E="navManager",k="router",S="aria",f=Symbol(),R={default:f},w=e=>e?.split(" ")||[],D=(e,t,a=[])=>[...Array.from(e.value?.classList||[]),...a].filter((i,c,n)=>!t.has(i)&&n.indexOf(i)===c),M=((e,t,a=[],i,c)=>{const n=s.defineComponent((r,{attrs:l,slots:g,emit:x})=>{r[i];const T=s.ref(),I=new Set(w(l.class)),A=s.getCurrentInstance()?.appContext?.provides[E]?s.inject(E):void 0,N=h=>{const{routerLink:v}=r;if(v!==f)if(A!==void 0){h.preventDefault();let u={event:h};for(const m in r){const d=r[m];r.hasOwnProperty(m)&&m.startsWith(k)&&d!==f&&(u[m]=d)}A.navigate(u)}else console.warn("Tried to navigate, but no router was found. Make sure you have mounted Vue Router.")};return()=>{r[i],w(l.class).forEach(d=>{I.add(d)});const h=r.onClick,v=d=>{h!==void 0&&h(d),d.defaultPrevented||N(d)};let u={ref:T,class:D(T,I),onClick:v};for(const d in r){const _=r[d];(r.hasOwnProperty(d)&&_!==f||d.startsWith(S))&&(u[d]=_)}return r[y]!==f&&(u={...u,href:r[y]}),s.h(e,u,g.default&&g.default())}});return typeof n!="function"&&(n.name=e,n.props={[y]:R},a.forEach(r=>{n.props[r]=R})),n})("revo-grid",void 0,["rowHeaders","frameSize","rowSize","colSize","range","readonly","resize","noHorizontalScrollTransfer","canFocus","useClipboard","columns","source","pinnedTopSource","pinnedBottomSource","rowDefinitions","editors","applyOnClose","plugins","columnTypes","theme","themeDefinitions","rowClass","autoSizeColumn","filter","sorting","focusTemplate","canMoveColumns","trimmedRows","exporting","grouping","stretch","additionalData","disableVirtualX","virtualX","disableVirtualY","hideAttribution","jobsBeforeRender","registerVNode","accessible","rtl","canDrag","contentsizechanged","beforeedit","beforerangeedit","afteredit","beforeautofill","beforerange","afterfocus","roworderchanged","beforesorting","beforesourcesortingapply","beforesortingapply","aftersortingapply","rowdragstart","headerclick","beforecellfocus","beforefocuslost","beforesourceset","beforeanysource","aftersourceset","afteranysource","beforecolumnsgather","beforecolumnsset","beforecolumnapplied","aftercolumnsset","beforefilterapply","beforefiltertrimmed","beforetrimmed","aftertrimmed","viewportscroll","beforeexport","beforeeditstart","aftercolumnresize","beforerowdefinition","filterconfigchanged","sortingconfigchanged","rowheaderschanged","beforegridrender","aftergridrender","aftergridinit","additionaldatachanged","afterthemechanged","created"]);function V(e,t){t?.appContext&&(e.appContext=t.appContext)}const b=(e,t,a,i,c=null)=>{if(!t)return c?.destroy?.(),{vueInstance:null,destroy:()=>null,el:null};let n=t._vnode;if(n){V(n,i);for(const l in a)n.component.props[l]=a[l]}else n=s.createVNode(e,a),V(n,i),s.render(n,t);return{vueInstance:n,destroy:()=>s.render(null,t),el:t}},j=(e,t)=>{const a=s.getCurrentInstance();return(i,c,n)=>{const r=t?{...t,...c}:c;r.addition=n;let l=null;return i("span",{key:`${c.prop}-${c.rowIndex||0}`,ref:g=>{l=b(e,g,r,a,l)}})}};class z{constructor(t,a,i,c,n){this.VueEditorConstructor=t,this.column=a,this.save=i,this.close=c,this.vInstance=n,this.element=null}componentDidRender(){}disconnectedCallback(){this.vueEl?.destroy(),this.vueEl=void 0}render(t){return t("span",{key:`${this.column.prop}-${this.editCell?.rowIndex||0}`,ref:a=>{const i={...this.editCell,column:this.column,save:this.save,close:this.close};this.vueEl=b(this.VueEditorConstructor,a,i,this.vInstance)}})}}const L=e=>{const t=s.getCurrentInstance();return function(a,i,c){return new z(e,a,i,c,t)}};function G(e){return!!e&&(typeof e=="object"||typeof e=="function")&&typeof e.then=="function"}const P=p.defineCustomElements?.(),O=s.defineAsyncComponent(async()=>(G(P)&&await P,M));o.VGrid=O,o.VGridVueEditor=L,o.VGridVueTemplate=j,o.VGridVueTemplateConstructor=b,o.default=O,Object.keys(p).forEach(e=>{e!=="default"&&!Object.prototype.hasOwnProperty.call(o,e)&&Object.defineProperty(o,e,{enumerable:!0,get:()=>p[e]})}),Object.keys(C).forEach(e=>{e!=="default"&&!Object.prototype.hasOwnProperty.call(o,e)&&Object.defineProperty(o,e,{enumerable:!0,get:()=>C[e]})}),Object.defineProperties(o,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}})}));
1
+ (function(o,s){typeof exports=="object"&&typeof module<"u"?s(exports,require("vue"),require("@revolist/revogrid/loader"),require("@revolist/revogrid")):typeof define=="function"&&define.amd?define(["exports","vue","@revolist/revogrid/loader","@revolist/revogrid"],s):(o=typeof globalThis<"u"?globalThis:o||self,s(o.Vue3Datagrid={},o.Vue,o.RevogridLoader,o.Revogrid))})(this,(function(o,s,p,C){"use strict";const y="routerLink",E="navManager",k="router",S="aria",f=Symbol(),R={default:f},w=e=>e?.split(" ")||[],z=(e,t,a=[])=>[...Array.from(e.value?.classList||[]),...a].filter((i,c,n)=>!t.has(i)&&n.indexOf(i)===c),D=((e,t,a=[],i,c)=>{const n=s.defineComponent((r,{attrs:l,slots:g,emit:x})=>{r[i];const T=s.ref(),I=new Set(w(l.class)),A=s.getCurrentInstance()?.appContext?.provides[E]?s.inject(E):void 0,N=h=>{const{routerLink:v}=r;if(v!==f)if(A!==void 0){h.preventDefault();let u={event:h};for(const m in r){const d=r[m];r.hasOwnProperty(m)&&m.startsWith(k)&&d!==f&&(u[m]=d)}A.navigate(u)}else console.warn("Tried to navigate, but no router was found. Make sure you have mounted Vue Router.")};return()=>{r[i],w(l.class).forEach(d=>{I.add(d)});const h=r.onClick,v=d=>{h!==void 0&&h(d),d.defaultPrevented||N(d)};let u={ref:T,class:z(T,I),onClick:v};for(const d in r){const _=r[d];(r.hasOwnProperty(d)&&_!==f||d.startsWith(S))&&(u[d]=_)}return r[y]!==f&&(u={...u,href:r[y]}),s.h(e,u,g.default&&g.default())}});return typeof n!="function"&&(n.name=e,n.props={[y]:R},a.forEach(r=>{n.props[r]=R})),n})("revo-grid",void 0,["rowHeaders","frameSize","rowSize","colSize","range","readonly","resize","resizeRow","noHorizontalScrollTransfer","canFocus","useClipboard","columns","source","pinnedTopSource","pinnedBottomSource","rowDefinitions","editors","applyOnClose","plugins","columnTypes","theme","themeDefinitions","rowClass","autoSizeColumn","filter","sorting","focusTemplate","canMoveColumns","trimmedRows","exporting","grouping","stretch","additionalData","disableVirtualX","virtualX","disableVirtualY","hideAttribution","jobsBeforeRender","registerVNode","accessible","rtl","canDrag","contentsizechanged","beforeedit","beforerangeedit","afteredit","beforeautofill","beforerange","afterfocus","roworderchanged","beforesorting","beforesourcesortingapply","beforesortingapply","aftersortingapply","rowdragstart","headerclick","beforecellfocus","beforefocuslost","beforesourceset","beforeanysource","aftersourceset","afteranysource","beforecolumnsgather","beforecolumnsset","beforecolumnapplied","aftercolumnsset","beforefilterapply","beforefiltertrimmed","beforetrimmed","aftertrimmed","viewportscroll","beforeexport","beforeeditstart","aftercolumnresize","beforerowdefinition","filterconfigchanged","sortingconfigchanged","rowheaderschanged","beforegridrender","aftergridrender","aftergridinit","additionaldatachanged","afterthemechanged","created"]);function V(e,t){t?.appContext&&(e.appContext=t.appContext)}const b=(e,t,a,i,c=null)=>{if(!t)return c?.destroy?.(),{vueInstance:null,destroy:()=>null,el:null};let n=t._vnode;if(n){V(n,i);for(const l in a)n.component.props[l]=a[l]}else n=s.createVNode(e,a),V(n,i),s.render(n,t);return{vueInstance:n,destroy:()=>s.render(null,t),el:t}},M=(e,t)=>{const a=s.getCurrentInstance();return(i,c,n)=>{const r=t?{...t,...c}:c;r.addition=n;let l=null;return i("span",{key:`${c.prop}-${c.rowIndex||0}`,ref:g=>{l=b(e,g,r,a,l)}})}};class j{constructor(t,a,i,c,n){this.VueEditorConstructor=t,this.column=a,this.save=i,this.close=c,this.vInstance=n,this.element=null}componentDidRender(){}disconnectedCallback(){this.vueEl?.destroy(),this.vueEl=void 0}render(t){return t("span",{key:`${this.column.prop}-${this.editCell?.rowIndex||0}`,ref:a=>{const i={...this.editCell,column:this.column,save:this.save,close:this.close};this.vueEl=b(this.VueEditorConstructor,a,i,this.vInstance)}})}}const L=e=>{const t=s.getCurrentInstance();return function(a,i,c){return new j(e,a,i,c,t)}};function G(e){return!!e&&(typeof e=="object"||typeof e=="function")&&typeof e.then=="function"}const P=p.defineCustomElements?.(),O=s.defineAsyncComponent(async()=>(G(P)&&await P,D));o.VGrid=O,o.VGridVueEditor=L,o.VGridVueTemplate=M,o.VGridVueTemplateConstructor=b,o.default=O,Object.keys(p).forEach(e=>{e!=="default"&&!Object.prototype.hasOwnProperty.call(o,e)&&Object.defineProperty(o,e,{enumerable:!0,get:()=>p[e]})}),Object.keys(C).forEach(e=>{e!=="default"&&!Object.prototype.hasOwnProperty.call(o,e)&&Object.defineProperty(o,e,{enumerable:!0,get:()=>C[e]})}),Object.defineProperties(o,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}})}));
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@revolist/vue3-datagrid",
3
- "version": "4.26.2",
3
+ "version": "4.27.0",
4
4
  "description": "Vue 3 DataGrid Spreadsheet component with native Vue 3 cell render support",
5
5
  "main": "./dist/vue3-datagrid.umd.cjs",
6
6
  "module": "./dist/vue3-datagrid.js",
@@ -65,7 +65,7 @@
65
65
  "homepage": "https://github.com/revolist/revogrid#readme",
66
66
  "license": "MIT",
67
67
  "dependencies": {
68
- "@revolist/revogrid": "4.26.2"
68
+ "@revolist/revogrid": "4.27.0"
69
69
  },
70
70
  "devDependencies": {
71
71
  "@stencil/core": "^4.43.2",