@vaadin/vaadin-grid 5.9.1 → 5.9.2

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
@@ -15,7 +15,7 @@
15
15
  "repository": "vaadin/vaadin-grid",
16
16
  "homepage": "https://vaadin.com/components",
17
17
  "name": "@vaadin/vaadin-grid",
18
- "version": "5.9.1",
18
+ "version": "5.9.2",
19
19
  "main": "vaadin-grid.js",
20
20
  "author": "Vaadin Ltd",
21
21
  "license": "Apache-2.0",
@@ -45,32 +45,33 @@
45
45
  },
46
46
  "resolutions": {
47
47
  "@webcomponents/webcomponentsjs": "2.0.0",
48
- "es-abstract": "1.17.6",
49
- "@types/doctrine": "0.0.3",
50
48
  "inherits": "2.0.3",
51
49
  "samsam": "1.1.3",
52
50
  "supports-color": "3.1.2",
53
51
  "type-detect": "1.0.0"
54
52
  },
55
53
  "scripts": {
56
- "generate-typings": "gen-typescript-declarations --outDir . --verify"
57
- },
58
- "devDependencies": {
59
- "@webcomponents/webcomponentsjs": "^2.0.0",
60
- "wct-browser-legacy": "^1.0.1",
54
+ "generate-typings": "gen-typescript-declarations --outDir . --verify",
55
+ "test": "wct --npm"
56
+ },
57
+ "devDependencies": {
58
+ "@web-padawan/gen-typescript-declarations": "^1.6.2",
59
+ "web-component-tester": "6.9.2",
60
+ "@polymer/app-localize-behavior": "^3.0.0",
61
+ "@polymer/iron-ajax": "^3.0.0",
62
+ "@polymer/iron-component-page": "^4.0.0",
63
+ "@polymer/iron-image": "^3.0.0",
64
+ "@polymer/iron-list": "^3.0.0",
65
+ "@polymer/iron-media-query": "^3.0.0",
61
66
  "@polymer/iron-test-helpers": "^3.0.0",
62
- "@polymer/paper-input": "^3.0.0",
63
67
  "@polymer/paper-checkbox": "^3.0.0",
64
- "@polymer/iron-flex-layout": "^3.0.0",
65
- "@polymer/iron-image": "^3.0.0",
68
+ "@polymer/paper-input": "^3.0.0",
66
69
  "@polymer/paper-slider": "^3.0.0",
67
- "@polymer/iron-media-query": "^3.0.0",
68
- "@polymer/iron-component-page": "^4.0.0",
69
- "@polymer/iron-ajax": "^3.0.0",
70
- "@polymer/app-localize-behavior": "^3.0.0",
71
- "@polymer/iron-list": "^3.0.0",
72
- "@vaadin/vaadin-demo-helpers": "^3.1.0",
70
+ "@polymer/test-fixture": "^4.0.0",
73
71
  "@vaadin/vaadin-button": "^2.4.0",
74
- "@vaadin/vaadin-context-menu": "^4.5.0"
72
+ "@vaadin/vaadin-context-menu": "^4.5.0",
73
+ "@vaadin/vaadin-demo-helpers": "^3.1.0",
74
+ "@webcomponents/webcomponentsjs": "^2.0.0",
75
+ "wct-browser-legacy": "^1.0.1"
75
76
  }
76
77
  }
@@ -8,7 +8,6 @@ import { GestureEventListeners } from '@polymer/polymer/lib/mixins/gesture-event
8
8
  import { GridHelper } from './vaadin-grid-helpers.js';
9
9
  import { addListener } from '@polymer/polymer/lib/utils/gestures.js';
10
10
  import { dom } from '@polymer/polymer/lib/legacy/polymer.dom.js';
11
- import { useShadow } from '@polymer/polymer/lib/utils/settings.js';
12
11
 
13
12
  /**
14
13
  * @polymerMixin
@@ -214,15 +213,24 @@ export const ColumnReorderingMixin = superClass => class ColumnReorderingMixin e
214
213
  if (!this._draggedColumn) {
215
214
  this._toggleAttribute('no-content-pointer-events', true, this.$.scroller);
216
215
  }
216
+ // Workaround a ShadyDOM bug
217
+ this._reorderGhost.hidden = true;
218
+
217
219
  let cell;
218
- if (useShadow) {
220
+ if (this.shadowRoot.elementFromPoint) {
219
221
  cell = this.shadowRoot.elementFromPoint(x, y);
220
222
  } else {
221
223
  cell = document.elementFromPoint(x, y);
224
+ }
222
225
 
223
- // Workaround a FF58 bug
226
+ this._reorderGhost.hidden = false;
227
+
228
+ // Workaround FF58/ShadyDOM bugs
229
+ while (!cell._column && cell.parentElement) {
224
230
  if (cell.localName === 'vaadin-grid-cell-content') {
225
231
  cell = cell.assignedSlot.parentNode;
232
+ } else {
233
+ cell = cell.parentElement;
226
234
  }
227
235
 
228
236
  }
@@ -255,7 +255,7 @@ import {timeOut, animationFrame} from '@polymer/polymer/lib/utils/async.js';
255
255
  * `reorder-status` | Reflects the status of a cell while columns are being reordered | cell
256
256
  * `frozen` | Frozen cell | cell
257
257
  * `last-frozen` | Last frozen cell | cell
258
- * * `first-column` | First visible cell on a row | cell
258
+ * `first-column` | First visible cell on a row | cell
259
259
  * `last-column` | Last visible cell on a row | cell
260
260
  * `selected` | Selected row | row
261
261
  * `expanded` | Expanded row | row
@@ -263,6 +263,7 @@ import {timeOut, animationFrame} from '@polymer/polymer/lib/utils/async.js';
263
263
  * `loading` | Row that is waiting for data from data provider | row
264
264
  * `odd` | Odd row | row
265
265
  * `first` | The first body row | row
266
+ * `last` | The last body row | row
266
267
  * `dragstart` | Set for one frame when drag of a row is starting. The value is a number when multiple rows are dragged | row
267
268
  * `dragover` | Set when the row is dragged over | row
268
269
  * `drag-disabled` | Set to a row that isn't available for dragging | row
@@ -239,7 +239,7 @@ const TOUCH_DEVICE = (() => {
239
239
  * `reorder-status` | Reflects the status of a cell while columns are being reordered | cell
240
240
  * `frozen` | Frozen cell | cell
241
241
  * `last-frozen` | Last frozen cell | cell
242
- * * `first-column` | First visible cell on a row | cell
242
+ * `first-column` | First visible cell on a row | cell
243
243
  * `last-column` | Last visible cell on a row | cell
244
244
  * `selected` | Selected row | row
245
245
  * `expanded` | Expanded row | row
@@ -247,6 +247,7 @@ const TOUCH_DEVICE = (() => {
247
247
  * `loading` | Row that is waiting for data from data provider | row
248
248
  * `odd` | Odd row | row
249
249
  * `first` | The first body row | row
250
+ * `last` | The last body row | row
250
251
  * `dragstart` | Set for one frame when drag of a row is starting. The value is a number when multiple rows are dragged | row
251
252
  * `dragover` | Set when the row is dragged over | row
252
253
  * `drag-disabled` | Set to a row that isn't available for dragging | row
@@ -322,7 +323,7 @@ class GridElement extends
322
323
  }
323
324
 
324
325
  static get version() {
325
- return '5.9.1';
326
+ return '5.9.2';
326
327
  }
327
328
 
328
329
  static get observers() {
@@ -764,6 +765,7 @@ class GridElement extends
764
765
  }
765
766
 
766
767
  this._toggleAttribute('first', index === 0, row);
768
+ this._toggleAttribute('last', index === this._effectiveSize - 1, row);
767
769
  this._toggleAttribute('odd', index % 2, row);
768
770
  this._a11yUpdateRowRowindex(row, index);
769
771
  this._getItem(index, row);
@@ -118,6 +118,10 @@ const $_documentContainer = html`<dom-module id="lumo-grid" theme-for="vaadin-gr
118
118
  margin-top: -1px;
119
119
  }
120
120
 
121
+ :host([all-rows-visible]) [part~="row"][last][dragover="below"] [part~="cell"]::after {
122
+ height: 1px;
123
+ }
124
+
121
125
  [part~="row"][dragover="above"] [part~="cell"]::after {
122
126
  top: auto;
123
127
  bottom: 100%;
@@ -161,6 +161,10 @@ const $_documentContainer = html`<dom-module id="material-grid" theme-for="vaadi
161
161
  margin-top: -1px;
162
162
  }
163
163
 
164
+ :host([all-rows-visible]) [part~="row"][last][dragover="below"] [part~="cell"]::after {
165
+ height: 1px;
166
+ }
167
+
164
168
  [part~="row"][dragover="above"] [part~="cell"]::after {
165
169
  top: auto;
166
170
  bottom: 100%;