@revolist/svelte-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**:
@@ -351,8 +384,10 @@ If you want to continue using **Svelte 4**, please switch to the [svelte-4](http
351
384
  - [![React](./assets/react.svg) React](https://rv-grid.com/guide/react/)
352
385
  - [![Angular](./assets/angular.svg) Angular](https://rv-grid.com/guide/angular/)
353
386
  - [![Svelte](./assets/svelte.svg) Svelte](https://rv-grid.com/guide/svelte/)
387
+ - [![Python](./assets/python.svg) Dash / Python](https://rv-grid.com/guide/dash/)
354
388
  - [![JavaScript](./assets/js.svg) JavaScript](https://rv-grid.com/guide/)
355
389
 
390
+
356
391
  ## Versions
357
392
 
358
393
  - **2.0+**: Introduced the plugin system, grouping, sorting, and filtering.
@@ -411,8 +446,8 @@ Thank you for supporting RevoGrid! 🙏
411
446
 
412
447
  ## Testing
413
448
 
414
- [![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)
415
- [![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)
449
+ [![Unit Tests](https://github.com/revolist/revogrid/actions/workflows/unit.yml/badge.svg?branch=main)](https://github.com/revolist/revogrid/actions/workflows/unit.yml)
450
+ [![E2E Tests](https://github.com/revolist/revogrid/actions/workflows/e2e.yml/badge.svg?branch=main)](https://github.com/revolist/revogrid/actions/workflows/e2e.yml)
416
451
 
417
452
  RevoGrid is thoroughly tested to ensure reliability and stability.
418
453
 
@@ -18,6 +18,7 @@ function RevoGrid($$anchor, $$props) {
18
18
  let range = $.prop($$props, "range", 8, void 0);
19
19
  let readonly = $.prop($$props, "readonly", 8, void 0);
20
20
  let resize = $.prop($$props, "resize", 8, void 0);
21
+ let resizeRow = $.prop($$props, "resizeRow", 8, void 0);
21
22
  let noHorizontalScrollTransfer = $.prop($$props, "noHorizontalScrollTransfer", 8, void 0);
22
23
  let canFocus = $.prop($$props, "canFocus", 8, void 0);
23
24
  let useClipboard = $.prop($$props, "useClipboard", 8, void 0);
@@ -175,6 +176,7 @@ function RevoGrid($$anchor, $$props) {
175
176
  $.template_effect(() => $.set_custom_element_data(revo_grid, "range", range()));
176
177
  $.template_effect(() => $.set_custom_element_data(revo_grid, "readonly", readonly()));
177
178
  $.template_effect(() => $.set_custom_element_data(revo_grid, "resize", resize()));
179
+ $.template_effect(() => $.set_custom_element_data(revo_grid, "resize-row", resizeRow()));
178
180
  $.template_effect(() => $.set_custom_element_data(revo_grid, "no-horizontal-scroll-transfer", noHorizontalScrollTransfer()));
179
181
  $.template_effect(() => $.set_custom_element_data(revo_grid, "can-focus", canFocus()));
180
182
  $.template_effect(() => $.set_custom_element_data(revo_grid, "use-clipboard", useClipboard()));
@@ -46,6 +46,7 @@
46
46
  let range = svelte_internal_client.prop($$props, "range", 8, void 0);
47
47
  let readonly = svelte_internal_client.prop($$props, "readonly", 8, void 0);
48
48
  let resize = svelte_internal_client.prop($$props, "resize", 8, void 0);
49
+ let resizeRow = svelte_internal_client.prop($$props, "resizeRow", 8, void 0);
49
50
  let noHorizontalScrollTransfer = svelte_internal_client.prop($$props, "noHorizontalScrollTransfer", 8, void 0);
50
51
  let canFocus = svelte_internal_client.prop($$props, "canFocus", 8, void 0);
51
52
  let useClipboard = svelte_internal_client.prop($$props, "useClipboard", 8, void 0);
@@ -203,6 +204,7 @@
203
204
  svelte_internal_client.template_effect(() => svelte_internal_client.set_custom_element_data(revo_grid, "range", range()));
204
205
  svelte_internal_client.template_effect(() => svelte_internal_client.set_custom_element_data(revo_grid, "readonly", readonly()));
205
206
  svelte_internal_client.template_effect(() => svelte_internal_client.set_custom_element_data(revo_grid, "resize", resize()));
207
+ svelte_internal_client.template_effect(() => svelte_internal_client.set_custom_element_data(revo_grid, "resize-row", resizeRow()));
206
208
  svelte_internal_client.template_effect(() => svelte_internal_client.set_custom_element_data(revo_grid, "no-horizontal-scroll-transfer", noHorizontalScrollTransfer()));
207
209
  svelte_internal_client.template_effect(() => svelte_internal_client.set_custom_element_data(revo_grid, "can-focus", canFocus()));
208
210
  svelte_internal_client.template_effect(() => svelte_internal_client.set_custom_element_data(revo_grid, "use-clipboard", useClipboard()));
@@ -32,6 +32,10 @@ Alternatively you can use `rowSize` to reset viewport */
32
32
  /** When true, columns are resizable. */
33
33
  resize?: Components.RevoGrid["resize"]
34
34
 
35
+ /** Enables row resizing. Pass a configuration object to customize the
36
+ height limits or enable resize edges across the full row. */
37
+ resizeRow?: Components.RevoGrid["resizeRow"]
38
+
35
39
  /** Prevents horizontal scroll state from being mirrored across viewport sections. */
36
40
  noHorizontalScrollTransfer?: Components.RevoGrid["noHorizontalScrollTransfer"]
37
41
 
@@ -99,7 +103,7 @@ By default disabled, hence operation is not performance efficient.
99
103
  Or define config. See `AutoSizeColumnConfig` for more details. */
100
104
  autoSizeColumn?: Components.RevoGrid["autoSizeColumn"]
101
105
 
102
- /** Enables filter plugin.
106
+ /** Enables filter plugin. Enabled by default; set to `false` to opt out.
103
107
  Can be boolean.
104
108
  Or can be filter collection See `FilterCollection` for more info. */
105
109
  filter?: Components.RevoGrid["filter"]
@@ -375,6 +379,7 @@ export default function RevoGrid($$anchor, $$props) {
375
379
  let range = $.prop($$props, 'range', 8, undefined);
376
380
  let readonly = $.prop($$props, 'readonly', 8, undefined);
377
381
  let resize = $.prop($$props, 'resize', 8, undefined);
382
+ let resizeRow = $.prop($$props, 'resizeRow', 8, undefined);
378
383
  let noHorizontalScrollTransfer = $.prop($$props, 'noHorizontalScrollTransfer', 8, undefined);
379
384
  let canFocus = $.prop($$props, 'canFocus', 8, undefined);
380
385
  let useClipboard = $.prop($$props, 'useClipboard', 8, undefined);
@@ -557,6 +562,7 @@ export default function RevoGrid($$anchor, $$props) {
557
562
  $.template_effect(() => $.set_custom_element_data(revo_grid, 'range', range()));
558
563
  $.template_effect(() => $.set_custom_element_data(revo_grid, 'readonly', readonly()));
559
564
  $.template_effect(() => $.set_custom_element_data(revo_grid, 'resize', resize()));
565
+ $.template_effect(() => $.set_custom_element_data(revo_grid, 'resize-row', resizeRow()));
560
566
  $.template_effect(() => $.set_custom_element_data(revo_grid, 'no-horizontal-scroll-transfer', noHorizontalScrollTransfer()));
561
567
  $.template_effect(() => $.set_custom_element_data(revo_grid, 'can-focus', canFocus()));
562
568
  $.template_effect(() => $.set_custom_element_data(revo_grid, 'use-clipboard', useClipboard()));
@@ -14,6 +14,7 @@ export let colSize = undefined;
14
14
  export let range = undefined;
15
15
  export let readonly = undefined;
16
16
  export let resize = undefined;
17
+ export let resizeRow = undefined;
17
18
  export let noHorizontalScrollTransfer = undefined;
18
19
  export let canFocus = undefined;
19
20
  export let useClipboard = undefined;
@@ -112,6 +113,7 @@ const onEvent = (e) => {
112
113
  range={range}
113
114
  readonly={readonly}
114
115
  resize={resize}
116
+ resize-row={resizeRow}
115
117
  no-horizontal-scroll-transfer={noHorizontalScrollTransfer}
116
118
  can-focus={canFocus}
117
119
  use-clipboard={useClipboard}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@revolist/svelte-datagrid",
3
- "version": "4.26.2",
3
+ "version": "4.27.0",
4
4
  "description": "Svelte DataGrid Spreadsheet component with native cell render support",
5
5
  "main": "./dist/svelte-datagrid.umd.cjs",
6
6
  "module": "./dist/svelte-datagrid.js",
@@ -73,7 +73,7 @@
73
73
  "vite-plugin-dts": "^5.0.1"
74
74
  },
75
75
  "dependencies": {
76
- "@revolist/revogrid": "4.26.2"
76
+ "@revolist/revogrid": "4.27.0"
77
77
  },
78
78
  "publishConfig": {
79
79
  "access": "public"