@vaadin/component-base 24.8.0-alpha17 → 24.8.0-alpha18
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/define.js +1 -1
- package/src/polylit-mixin.js +14 -0
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@vaadin/component-base",
|
|
3
|
-
"version": "24.8.0-
|
|
3
|
+
"version": "24.8.0-alpha18",
|
|
4
4
|
"publishConfig": {
|
|
5
5
|
"access": "public"
|
|
6
6
|
},
|
|
@@ -38,10 +38,10 @@
|
|
|
38
38
|
"lit": "^3.0.0"
|
|
39
39
|
},
|
|
40
40
|
"devDependencies": {
|
|
41
|
-
"@vaadin/chai-plugins": "24.8.0-
|
|
42
|
-
"@vaadin/test-runner-commands": "24.8.0-
|
|
41
|
+
"@vaadin/chai-plugins": "24.8.0-alpha18",
|
|
42
|
+
"@vaadin/test-runner-commands": "24.8.0-alpha18",
|
|
43
43
|
"@vaadin/testing-helpers": "^1.1.0",
|
|
44
44
|
"sinon": "^18.0.0"
|
|
45
45
|
},
|
|
46
|
-
"gitHead": "
|
|
46
|
+
"gitHead": "57d1022f4c197d3a0100d360017ea37777cb3595"
|
|
47
47
|
}
|
package/src/define.js
CHANGED
|
@@ -13,7 +13,7 @@ function dashToCamelCase(dash) {
|
|
|
13
13
|
|
|
14
14
|
const experimentalMap = {};
|
|
15
15
|
|
|
16
|
-
export function defineCustomElement(CustomElement, version = '24.8.0-
|
|
16
|
+
export function defineCustomElement(CustomElement, version = '24.8.0-alpha18') {
|
|
17
17
|
Object.defineProperty(CustomElement, 'version', {
|
|
18
18
|
get() {
|
|
19
19
|
return version;
|
package/src/polylit-mixin.js
CHANGED
|
@@ -45,6 +45,13 @@ function getOrCreateMap(obj, name) {
|
|
|
45
45
|
|
|
46
46
|
const PolylitMixinImplementation = (superclass) => {
|
|
47
47
|
class PolylitMixinClass extends superclass {
|
|
48
|
+
// PolylitMixin, and components using it, force synchronous updates
|
|
49
|
+
// in connectedCallback and for properties that are configured to
|
|
50
|
+
// be sync. This causes Lit's `change-in-update` warning to be
|
|
51
|
+
// logged for almost every component when Lit runs in development
|
|
52
|
+
// mode. Since we intentionally force updates, disable the warning.
|
|
53
|
+
static enabledWarnings = [];
|
|
54
|
+
|
|
48
55
|
static createProperty(name, options) {
|
|
49
56
|
if ([String, Boolean, Number, Array].includes(options)) {
|
|
50
57
|
options = {
|
|
@@ -68,6 +75,13 @@ const PolylitMixinImplementation = (superclass) => {
|
|
|
68
75
|
* @override
|
|
69
76
|
*/
|
|
70
77
|
static finalize() {
|
|
78
|
+
// Suppress warnings about deprecated overriding ReactiveElement methods
|
|
79
|
+
// as the mixin requires those. See https://github.com/lit/lit/pull/4901
|
|
80
|
+
if (window.litIssuedWarnings) {
|
|
81
|
+
window.litIssuedWarnings.add('no-override-create-property');
|
|
82
|
+
window.litIssuedWarnings.add('no-override-get-property-descriptor');
|
|
83
|
+
}
|
|
84
|
+
|
|
71
85
|
super.finalize();
|
|
72
86
|
|
|
73
87
|
if (Array.isArray(this.observers)) {
|