@vaadin/grid-pro 25.1.2 → 25.2.0-alpha10

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.
@@ -1066,6 +1066,20 @@
1066
1066
  "package": "@vaadin/grid/src/vaadin-grid.js"
1067
1067
  }
1068
1068
  },
1069
+ {
1070
+ "kind": "field",
1071
+ "name": "disabled",
1072
+ "privacy": "public",
1073
+ "type": {
1074
+ "text": "boolean"
1075
+ },
1076
+ "description": "If true, the user cannot interact with this element.",
1077
+ "attribute": "disabled",
1078
+ "inheritedFrom": {
1079
+ "name": "DisabledMixin",
1080
+ "package": "@vaadin/a11y-base/src/disabled-mixin.js"
1081
+ }
1082
+ },
1069
1083
  {
1070
1084
  "kind": "field",
1071
1085
  "name": "dragFilter",
@@ -1532,11 +1546,6 @@
1532
1546
  "name": "Grid",
1533
1547
  "package": "@vaadin/grid/src/vaadin-grid.js"
1534
1548
  }
1535
- },
1536
- {
1537
- "kind": "field",
1538
- "name": "slotStyles",
1539
- "readonly": true
1540
1549
  }
1541
1550
  ],
1542
1551
  "events": [
@@ -1577,7 +1586,7 @@
1577
1586
  "type": {
1578
1587
  "text": "CustomEvent"
1579
1588
  },
1580
- "description": "Fired when a cell is focused with click or keyboard navigation.",
1589
+ "description": "Fired when a cell is focused with click or keyboard navigation. Use the `context` property to read event details.",
1581
1590
  "name": "cell-focus",
1582
1591
  "inheritedFrom": {
1583
1592
  "name": "Grid",
@@ -1666,7 +1675,7 @@
1666
1675
  "type": {
1667
1676
  "text": "CustomEvent"
1668
1677
  },
1669
- "description": "Fired before exiting the cell edit mode, if the value has been changed.",
1678
+ "description": "Fired before exiting cell edit mode if the value has been changed. If the default is prevented, the value change is not applied.",
1670
1679
  "inheritedFrom": {
1671
1680
  "name": "InlineEditingMixin",
1672
1681
  "module": "src/vaadin-grid-pro-inline-editing-mixin.js"
@@ -1818,6 +1827,18 @@
1818
1827
  "package": "@vaadin/grid/src/vaadin-grid.js"
1819
1828
  }
1820
1829
  },
1830
+ {
1831
+ "name": "disabled",
1832
+ "type": {
1833
+ "text": "boolean"
1834
+ },
1835
+ "description": "If true, the user cannot interact with this element.",
1836
+ "fieldName": "disabled",
1837
+ "inheritedFrom": {
1838
+ "name": "DisabledMixin",
1839
+ "package": "@vaadin/a11y-base/src/disabled-mixin.js"
1840
+ }
1841
+ },
1821
1842
  {
1822
1843
  "name": "drag-filter",
1823
1844
  "type": {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@vaadin/grid-pro",
3
- "version": "25.1.2",
3
+ "version": "25.2.0-alpha10",
4
4
  "publishConfig": {
5
5
  "access": "public"
6
6
  },
@@ -37,22 +37,22 @@
37
37
  ],
38
38
  "dependencies": {
39
39
  "@open-wc/dedupe-mixin": "^1.3.0",
40
- "@vaadin/a11y-base": "~25.1.2",
41
- "@vaadin/checkbox": "~25.1.2",
42
- "@vaadin/component-base": "~25.1.2",
43
- "@vaadin/grid": "~25.1.2",
44
- "@vaadin/lit-renderer": "~25.1.2",
45
- "@vaadin/select": "~25.1.2",
46
- "@vaadin/text-field": "~25.1.2",
47
- "@vaadin/vaadin-themable-mixin": "~25.1.2",
40
+ "@vaadin/a11y-base": "25.2.0-alpha10",
41
+ "@vaadin/checkbox": "25.2.0-alpha10",
42
+ "@vaadin/component-base": "25.2.0-alpha10",
43
+ "@vaadin/grid": "25.2.0-alpha10",
44
+ "@vaadin/lit-renderer": "25.2.0-alpha10",
45
+ "@vaadin/select": "25.2.0-alpha10",
46
+ "@vaadin/text-field": "25.2.0-alpha10",
47
+ "@vaadin/vaadin-themable-mixin": "25.2.0-alpha10",
48
48
  "lit": "^3.0.0"
49
49
  },
50
50
  "devDependencies": {
51
- "@vaadin/aura": "~25.1.2",
52
- "@vaadin/chai-plugins": "~25.1.2",
53
- "@vaadin/test-runner-commands": "~25.1.2",
51
+ "@vaadin/aura": "25.2.0-alpha10",
52
+ "@vaadin/chai-plugins": "25.2.0-alpha10",
53
+ "@vaadin/test-runner-commands": "25.2.0-alpha10",
54
54
  "@vaadin/testing-helpers": "^2.0.0",
55
- "@vaadin/vaadin-lumo-styles": "~25.1.2",
55
+ "@vaadin/vaadin-lumo-styles": "25.2.0-alpha10",
56
56
  "sinon": "^21.0.2"
57
57
  },
58
58
  "cvdlName": "vaadin-grid-pro",
@@ -61,5 +61,5 @@
61
61
  "web-types.json",
62
62
  "web-types.lit.json"
63
63
  ],
64
- "gitHead": "48e5dc507ac5eb8d34839be06cac652f1635fe1c"
64
+ "gitHead": "1303b6a3eeecb44a9d26f2b53cb56d9e906febdf"
65
65
  }
@@ -60,7 +60,6 @@ export const GridProEditColumnMixin = (superClass) =>
60
60
  */
61
61
  editorType: {
62
62
  type: String,
63
- notify: true, // FIXME(web-padawan): needed by Flow counterpart
64
63
  value: 'text',
65
64
  },
66
65
 
@@ -29,7 +29,9 @@ export * from './vaadin-grid-pro-edit-column-mixin.js';
29
29
  * ...
30
30
  * ```
31
31
  */
32
- declare class GridProEditColumn<TItem = GridDefaultItem> extends HTMLElement {}
32
+ declare class GridProEditColumn<TItem = GridDefaultItem> extends HTMLElement {
33
+ hidden: boolean;
34
+ }
33
35
 
34
36
  interface GridProEditColumn<TItem = GridDefaultItem>
35
37
  extends GridProEditColumnMixinClass<TItem>, GridColumnMixin<TItem, GridColumn<TItem>>, GridColumn<TItem> {}
@@ -96,13 +96,13 @@ export const GridProEditSelectMixin = (superClass) =>
96
96
  }
97
97
 
98
98
  _optionsChanged(options) {
99
- if (options && options.length) {
99
+ if (options?.length) {
100
100
  this.items = options.map((option) => ({
101
101
  label: option,
102
102
  value: option,
103
103
  }));
104
104
 
105
- this._overlayElement = this._overlayElement || this.shadowRoot.querySelector('vaadin-select-overlay');
105
+ this._overlayElement ||= this.shadowRoot.querySelector('vaadin-select-overlay');
106
106
  this._overlayElement.addEventListener('vaadin-overlay-outside-click', () => {
107
107
  this._grid._stopEdit();
108
108
  });
@@ -28,7 +28,6 @@ export const InlineEditingMixin = (superClass) =>
28
28
  */
29
29
  enterNextRow: {
30
30
  type: Boolean,
31
- notify: true, // FIXME(yuriy-fix): needed by Flow counterpart
32
31
  },
33
32
 
34
33
  /**
@@ -41,7 +40,6 @@ export const InlineEditingMixin = (superClass) =>
41
40
  */
42
41
  singleCellEdit: {
43
42
  type: Boolean,
44
- notify: true, // FIXME(yuriy-fix): needed by Flow counterpart
45
43
  },
46
44
 
47
45
  /**
@@ -230,7 +228,7 @@ export const InlineEditingMixin = (superClass) =>
230
228
  return;
231
229
  }
232
230
 
233
- if (edited && edited.cell === cell) {
231
+ if (edited?.cell === cell) {
234
232
  return;
235
233
  }
236
234
 
@@ -257,7 +255,7 @@ export const InlineEditingMixin = (superClass) =>
257
255
 
258
256
  /** @private */
259
257
  _isEditColumn(column) {
260
- return column && column.localName.toLowerCase() === 'vaadin-grid-pro-edit-column';
258
+ return column?.localName.toLowerCase() === 'vaadin-grid-pro-edit-column';
261
259
  }
262
260
 
263
261
  /** @private */
@@ -303,7 +301,7 @@ export const InlineEditingMixin = (superClass) =>
303
301
  return;
304
302
  }
305
303
 
306
- if (edited && edited.cell === cell && column._getEditorComponent(cell).contains(e.target)) {
304
+ if (edited?.cell === cell && column._getEditorComponent(cell).contains(e.target)) {
307
305
  return;
308
306
  }
309
307
 
@@ -463,7 +461,7 @@ export const InlineEditingMixin = (superClass) =>
463
461
 
464
462
  // Do not prevent Tab to allow native input blur and wait for it,
465
463
  // unless the keydown event is from the edit cell select overlay.
466
- if (e.key === 'Tab' && editor && editor.contains(e.target)) {
464
+ if (e.key === 'Tab' && editor?.contains(e.target)) {
467
465
  const ignore = await new Promise((resolve) => {
468
466
  editor.addEventListener(
469
467
  'focusout',
@@ -591,26 +589,4 @@ export const InlineEditingMixin = (superClass) =>
591
589
  const model = this.__getRowModel(cell.__parentRow);
592
590
  return column.isCellEditable(model);
593
591
  }
594
-
595
- /**
596
- * Fired before exiting the cell edit mode, if the value has been changed.
597
- * If the default is prevented, value change would not be applied.
598
- *
599
- * @event item-property-changed
600
- * @param {Object} detail
601
- * @param {Object} detail.index the row index of the edited cell
602
- * @param {Object} detail.item the grid item rendered to the row of the edited cell
603
- * @param {Object} detail.path the column path of the edited cell
604
- * @param {Object} detail.value the new value of the edited cell
605
- */
606
-
607
- /**
608
- * Fired when the user starts editing a grid cell.
609
- *
610
- * @event cell-edit-started
611
- * @param {Object} detail
612
- * @param {Object} detail.index the row index of the edited cell
613
- * @param {Object} detail.item the grid item rendered to the row of the edited cell
614
- * @param {Object} detail.path the column path of the edited cell
615
- */
616
592
  };
@@ -69,7 +69,7 @@ export interface GridProEventMap<TItem>
69
69
  * @fires {CustomEvent} grid-dragstart - Fired when starting to drag grid rows.
70
70
  * @fires {CustomEvent} grid-dragend - Fired when the dragging of the rows ends.
71
71
  * @fires {CustomEvent} grid-drop - Fired when a drop occurs on top of the grid.
72
- * @fires {CustomEvent} item-property-changed - Fired before exiting the cell edit mode, if the value has been changed.
72
+ * @fires {CustomEvent} item-property-changed - Fired before exiting cell edit mode if the value has been changed. If the default is prevented, the value change is not applied.
73
73
  * @fires {CustomEvent} loading-changed - Fired when the `loading` property changes.
74
74
  * @fires {CustomEvent} selected-items-changed - Fired when the `selectedItems` property changes.
75
75
  */
@@ -43,7 +43,7 @@ import { InlineEditingMixin } from './vaadin-grid-pro-inline-editing-mixin.js';
43
43
  * @fires {CustomEvent} grid-dragstart - Fired when starting to drag grid rows.
44
44
  * @fires {CustomEvent} grid-dragend - Fired when the dragging of the rows ends.
45
45
  * @fires {CustomEvent} grid-drop - Fired when a drop occurs on top of the grid.
46
- * @fires {CustomEvent} item-property-changed - Fired before exiting the cell edit mode, if the value has been changed.
46
+ * @fires {CustomEvent} item-property-changed - Fired before exiting cell edit mode if the value has been changed. If the default is prevented, the value change is not applied.
47
47
  * @fires {CustomEvent} loading-changed - Fired when the `loading` property changes.
48
48
  * @fires {CustomEvent} selected-items-changed - Fired when the `selectedItems` property changes.
49
49
  *