@vaadin/board 23.1.0-alpha1 → 23.1.0-alpha4
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 +4 -4
- package/src/vaadin-board-row.js +8 -8
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@vaadin/board",
|
|
3
|
-
"version": "23.1.0-
|
|
3
|
+
"version": "23.1.0-alpha4",
|
|
4
4
|
"publishConfig": {
|
|
5
5
|
"access": "public"
|
|
6
6
|
},
|
|
@@ -37,13 +37,13 @@
|
|
|
37
37
|
],
|
|
38
38
|
"dependencies": {
|
|
39
39
|
"@polymer/polymer": "^3.0.0",
|
|
40
|
-
"@vaadin/component-base": "23.1.0-
|
|
40
|
+
"@vaadin/component-base": "23.1.0-alpha4",
|
|
41
41
|
"@vaadin/vaadin-license-checker": "^2.1.0"
|
|
42
42
|
},
|
|
43
43
|
"devDependencies": {
|
|
44
44
|
"@esm-bundle/chai": "^4.3.4",
|
|
45
45
|
"@vaadin/testing-helpers": "^0.3.2",
|
|
46
|
-
"sinon": "^
|
|
46
|
+
"sinon": "^13.0.2"
|
|
47
47
|
},
|
|
48
|
-
"gitHead": "
|
|
48
|
+
"gitHead": "aacdb7fe09811894751f0378ff7fb66071892c71"
|
|
49
49
|
}
|
package/src/vaadin-board-row.js
CHANGED
|
@@ -12,7 +12,7 @@ import { ResizeMixin } from '@vaadin/component-base/src/resize-mixin.js';
|
|
|
12
12
|
const CLASSES = {
|
|
13
13
|
SMALL: 'small',
|
|
14
14
|
MEDIUM: 'medium',
|
|
15
|
-
LARGE: 'large'
|
|
15
|
+
LARGE: 'large',
|
|
16
16
|
};
|
|
17
17
|
|
|
18
18
|
/**
|
|
@@ -131,18 +131,18 @@ class BoardRow extends ResizeMixin(ElementMixin(PolymerElement)) {
|
|
|
131
131
|
_calculateFlexBasis(colSpan, width, colsInRow, breakpoints) {
|
|
132
132
|
if (width < breakpoints.smallSize) {
|
|
133
133
|
colsInRow = 1;
|
|
134
|
-
} else if (width < breakpoints.mediumSize && colsInRow
|
|
134
|
+
} else if (width < breakpoints.mediumSize && colsInRow === 4) {
|
|
135
135
|
colsInRow = 2;
|
|
136
136
|
}
|
|
137
137
|
let flexBasis = (colSpan / colsInRow) * 100;
|
|
138
138
|
flexBasis = flexBasis > 100 ? 100 : flexBasis;
|
|
139
|
-
return flexBasis
|
|
139
|
+
return `${flexBasis}%`;
|
|
140
140
|
}
|
|
141
141
|
|
|
142
142
|
/** @private */
|
|
143
143
|
_reportError() {
|
|
144
144
|
const errorMessage = 'The column configuration is not valid; column count should add up to 3 or 4.';
|
|
145
|
-
console.warn(errorMessage,
|
|
145
|
+
console.warn(errorMessage, `check: \r\n${this.outerHTML}`);
|
|
146
146
|
}
|
|
147
147
|
|
|
148
148
|
/**
|
|
@@ -231,9 +231,9 @@ class BoardRow extends ResizeMixin(ElementMixin(PolymerElement)) {
|
|
|
231
231
|
const breakpoints = this._measureBreakpointsInPx();
|
|
232
232
|
if (
|
|
233
233
|
forceResize ||
|
|
234
|
-
width
|
|
235
|
-
breakpoints.smallSize
|
|
236
|
-
breakpoints.mediumSize
|
|
234
|
+
width !== this._oldWidth ||
|
|
235
|
+
breakpoints.smallSize !== this._oldBreakpoints.smallSize ||
|
|
236
|
+
breakpoints.mediumSize !== this._oldBreakpoints.mediumSize
|
|
237
237
|
) {
|
|
238
238
|
const nodes = this.$.insertionPoint.assignedNodes({ flatten: true });
|
|
239
239
|
const isElementNode = (node) => {
|
|
@@ -245,7 +245,7 @@ class BoardRow extends ResizeMixin(ElementMixin(PolymerElement)) {
|
|
|
245
245
|
const colsInRow = boardCols.reduce((a, b) => a + b, 0);
|
|
246
246
|
this._removeExtraNodesFromDOM(boardCols, filteredNodes).forEach((e, i) => {
|
|
247
247
|
const newFlexBasis = this._calculateFlexBasis(boardCols[i], width, colsInRow, breakpoints);
|
|
248
|
-
if (forceResize || !this._oldFlexBasis[i] || this._oldFlexBasis[i]
|
|
248
|
+
if (forceResize || !this._oldFlexBasis[i] || this._oldFlexBasis[i] !== newFlexBasis) {
|
|
249
249
|
this._oldFlexBasis[i] = newFlexBasis;
|
|
250
250
|
e.style.flexBasis = newFlexBasis;
|
|
251
251
|
}
|