@vaadin/grid-pro 25.2.0-alpha9 → 25.2.0-beta2

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@vaadin/grid-pro",
3
- "version": "25.2.0-alpha9",
3
+ "version": "25.2.0-beta2",
4
4
  "publishConfig": {
5
5
  "access": "public"
6
6
  },
@@ -37,23 +37,23 @@
37
37
  ],
38
38
  "dependencies": {
39
39
  "@open-wc/dedupe-mixin": "^1.3.0",
40
- "@vaadin/a11y-base": "25.2.0-alpha9",
41
- "@vaadin/checkbox": "25.2.0-alpha9",
42
- "@vaadin/component-base": "25.2.0-alpha9",
43
- "@vaadin/grid": "25.2.0-alpha9",
44
- "@vaadin/lit-renderer": "25.2.0-alpha9",
45
- "@vaadin/select": "25.2.0-alpha9",
46
- "@vaadin/text-field": "25.2.0-alpha9",
47
- "@vaadin/vaadin-themable-mixin": "25.2.0-alpha9",
40
+ "@vaadin/a11y-base": "25.2.0-beta2",
41
+ "@vaadin/checkbox": "25.2.0-beta2",
42
+ "@vaadin/component-base": "25.2.0-beta2",
43
+ "@vaadin/grid": "25.2.0-beta2",
44
+ "@vaadin/lit-renderer": "25.2.0-beta2",
45
+ "@vaadin/select": "25.2.0-beta2",
46
+ "@vaadin/text-field": "25.2.0-beta2",
47
+ "@vaadin/vaadin-themable-mixin": "25.2.0-beta2",
48
48
  "lit": "^3.0.0"
49
49
  },
50
50
  "devDependencies": {
51
- "@vaadin/aura": "25.2.0-alpha9",
52
- "@vaadin/chai-plugins": "25.2.0-alpha9",
53
- "@vaadin/test-runner-commands": "25.2.0-alpha9",
51
+ "@vaadin/aura": "25.2.0-beta2",
52
+ "@vaadin/chai-plugins": "25.2.0-beta2",
53
+ "@vaadin/test-runner-commands": "25.2.0-beta2",
54
54
  "@vaadin/testing-helpers": "^2.0.0",
55
- "@vaadin/vaadin-lumo-styles": "25.2.0-alpha9",
56
- "sinon": "^21.0.2"
55
+ "@vaadin/vaadin-lumo-styles": "25.2.0-beta2",
56
+ "sinon": "^22.0.0"
57
57
  },
58
58
  "cvdlName": "vaadin-grid-pro",
59
59
  "customElements": "custom-elements.json",
@@ -61,5 +61,5 @@
61
61
  "web-types.json",
62
62
  "web-types.lit.json"
63
63
  ],
64
- "gitHead": "a38a03e8a8be45821f39c14054c63634dafe08d0"
64
+ "gitHead": "9e18feb8057baf278b72fec4e42657b19e48f499"
65
65
  }
@@ -4,16 +4,12 @@
4
4
  *
5
5
  * This program is available under Vaadin Commercial License and Service Terms.
6
6
  *
7
- *
8
7
  * See https://vaadin.com/commercial-license-and-service-terms for the full
9
8
  * license.
10
9
  */
11
10
  import { getDeepActiveElement } from '@vaadin/a11y-base/src/focus-utils.js';
12
11
  import { get, set } from '@vaadin/component-base/src/path-utils.js';
13
12
 
14
- /**
15
- * @polymerMixin
16
- */
17
13
  export const GridProEditColumnMixin = (superClass) =>
18
14
  class extends superClass {
19
15
  static get properties() {
@@ -60,7 +56,6 @@ export const GridProEditColumnMixin = (superClass) =>
60
56
  */
61
57
  editorType: {
62
58
  type: String,
63
- notify: true, // FIXME(web-padawan): needed by Flow counterpart
64
59
  value: 'text',
65
60
  },
66
61
 
@@ -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> {}
@@ -4,7 +4,6 @@
4
4
  *
5
5
  * This program is available under Vaadin Commercial License and Service Terms.
6
6
  *
7
- *
8
7
  * See https://vaadin.com/commercial-license-and-service-terms for the full
9
8
  * license.
10
9
  */
@@ -32,7 +31,6 @@ import { GridProEditColumnMixin } from './vaadin-grid-pro-edit-column-mixin.js';
32
31
  *
33
32
  * @customElement vaadin-grid-pro-edit-column
34
33
  * @extends GridColumn
35
- * @mixes GridProEditColumnMixin
36
34
  */
37
35
  class GridProEditColumn extends GridProEditColumnMixin(GridColumn) {
38
36
  static get is() {
@@ -4,14 +4,10 @@
4
4
  *
5
5
  * This program is available under Vaadin Commercial License and Service Terms.
6
6
  *
7
- *
8
7
  * See https://vaadin.com/commercial-license-and-service-terms for the full
9
8
  * license.
10
9
  */
11
10
 
12
- /**
13
- * @polymerMixin
14
- */
15
11
  export const GridProEditSelectMixin = (superClass) =>
16
12
  class extends superClass {
17
13
  static get properties() {
@@ -96,13 +92,13 @@ export const GridProEditSelectMixin = (superClass) =>
96
92
  }
97
93
 
98
94
  _optionsChanged(options) {
99
- if (options && options.length) {
95
+ if (options?.length) {
100
96
  this.items = options.map((option) => ({
101
97
  label: option,
102
98
  value: option,
103
99
  }));
104
100
 
105
- this._overlayElement = this._overlayElement || this.shadowRoot.querySelector('vaadin-select-overlay');
101
+ this._overlayElement ||= this.shadowRoot.querySelector('vaadin-select-overlay');
106
102
  this._overlayElement.addEventListener('vaadin-overlay-outside-click', () => {
107
103
  this._grid._stopEdit();
108
104
  });
@@ -4,7 +4,6 @@
4
4
  *
5
5
  * This program is available under Vaadin Commercial License and Service Terms.
6
6
  *
7
- *
8
7
  * See https://vaadin.com/commercial-license-and-service-terms for the full
9
8
  * license.
10
9
  */
@@ -17,7 +16,6 @@ import { GridProEditSelectMixin } from './vaadin-grid-pro-edit-select-mixin.js';
17
16
  *
18
17
  * @customElement vaadin-grid-pro-edit-select
19
18
  * @extends Select
20
- * @mixes GridProEditSelectMixin
21
19
  * @private
22
20
  */
23
21
  class GridProEditSelect extends GridProEditSelectMixin(Select) {
@@ -4,7 +4,6 @@
4
4
  *
5
5
  * This program is available under Vaadin Commercial License and Service Terms.
6
6
  *
7
- *
8
7
  * See https://vaadin.com/commercial-license-and-service-terms for the full
9
8
  * license.
10
9
  */
@@ -13,9 +12,6 @@ import { Debouncer } from '@vaadin/component-base/src/debounce.js';
13
12
  import { get, set } from '@vaadin/component-base/src/path-utils.js';
14
13
  import { iterateRowCells, updatePart } from '@vaadin/grid/src/vaadin-grid-helpers.js';
15
14
 
16
- /**
17
- * @polymerMixin
18
- */
19
15
  export const InlineEditingMixin = (superClass) =>
20
16
  class InlineEditingMixin extends superClass {
21
17
  static get properties() {
@@ -28,7 +24,6 @@ export const InlineEditingMixin = (superClass) =>
28
24
  */
29
25
  enterNextRow: {
30
26
  type: Boolean,
31
- notify: true, // FIXME(yuriy-fix): needed by Flow counterpart
32
27
  },
33
28
 
34
29
  /**
@@ -41,7 +36,6 @@ export const InlineEditingMixin = (superClass) =>
41
36
  */
42
37
  singleCellEdit: {
43
38
  type: Boolean,
44
- notify: true, // FIXME(yuriy-fix): needed by Flow counterpart
45
39
  },
46
40
 
47
41
  /**
@@ -230,7 +224,7 @@ export const InlineEditingMixin = (superClass) =>
230
224
  return;
231
225
  }
232
226
 
233
- if (edited && edited.cell === cell) {
227
+ if (edited?.cell === cell) {
234
228
  return;
235
229
  }
236
230
 
@@ -257,7 +251,7 @@ export const InlineEditingMixin = (superClass) =>
257
251
 
258
252
  /** @private */
259
253
  _isEditColumn(column) {
260
- return column && column.localName.toLowerCase() === 'vaadin-grid-pro-edit-column';
254
+ return column?.localName.toLowerCase() === 'vaadin-grid-pro-edit-column';
261
255
  }
262
256
 
263
257
  /** @private */
@@ -303,7 +297,7 @@ export const InlineEditingMixin = (superClass) =>
303
297
  return;
304
298
  }
305
299
 
306
- if (edited && edited.cell === cell && column._getEditorComponent(cell).contains(e.target)) {
300
+ if (edited?.cell === cell && column._getEditorComponent(cell).contains(e.target)) {
307
301
  return;
308
302
  }
309
303
 
@@ -463,7 +457,7 @@ export const InlineEditingMixin = (superClass) =>
463
457
 
464
458
  // Do not prevent Tab to allow native input blur and wait for it,
465
459
  // unless the keydown event is from the edit cell select overlay.
466
- if (e.key === 'Tab' && editor && editor.contains(e.target)) {
460
+ if (e.key === 'Tab' && editor?.contains(e.target)) {
467
461
  const ignore = await new Promise((resolve) => {
468
462
  editor.addEventListener(
469
463
  'focusout',
@@ -591,26 +585,4 @@ export const InlineEditingMixin = (superClass) =>
591
585
  const model = this.__getRowModel(cell.__parentRow);
592
586
  return column.isCellEditable(model);
593
587
  }
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
588
  };
@@ -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
  */
@@ -4,7 +4,6 @@
4
4
  *
5
5
  * This program is available under Vaadin Commercial License and Service Terms.
6
6
  *
7
- *
8
7
  * See https://vaadin.com/commercial-license-and-service-terms for the full
9
8
  * license.
10
9
  */
@@ -15,7 +14,6 @@ import { gridProStyles } from './styles/vaadin-grid-pro-base-styles.js';
15
14
  import { InlineEditingMixin } from './vaadin-grid-pro-inline-editing-mixin.js';
16
15
 
17
16
  /**
18
- *
19
17
  * `<vaadin-grid-pro>` is a high quality data grid / data table Web Component with extended functionality.
20
18
  * It extends `<vaadin-grid>` and adds extra features on top of the basic ones.
21
19
  *
@@ -43,13 +41,12 @@ import { InlineEditingMixin } from './vaadin-grid-pro-inline-editing-mixin.js';
43
41
  * @fires {CustomEvent} grid-dragstart - Fired when starting to drag grid rows.
44
42
  * @fires {CustomEvent} grid-dragend - Fired when the dragging of the rows ends.
45
43
  * @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.
44
+ * @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
45
  * @fires {CustomEvent} loading-changed - Fired when the `loading` property changes.
48
46
  * @fires {CustomEvent} selected-items-changed - Fired when the `selectedItems` property changes.
49
47
  *
50
48
  * @customElement vaadin-grid-pro
51
49
  * @extends Grid
52
- * @mixes InlineEditingMixin
53
50
  */
54
51
  class GridPro extends SlotStylesMixin(InlineEditingMixin(Grid)) {
55
52
  static get is() {