@vaadin/component-base 24.5.0-beta1 → 24.5.0-rc1
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 +3 -3
- package/src/define.d.ts +1 -1
- package/src/define.js +7 -7
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@vaadin/component-base",
|
|
3
|
-
"version": "24.5.0-
|
|
3
|
+
"version": "24.5.0-rc1",
|
|
4
4
|
"publishConfig": {
|
|
5
5
|
"access": "public"
|
|
6
6
|
},
|
|
@@ -38,9 +38,9 @@
|
|
|
38
38
|
"lit": "^3.0.0"
|
|
39
39
|
},
|
|
40
40
|
"devDependencies": {
|
|
41
|
-
"@vaadin/chai-plugins": "24.5.0-
|
|
41
|
+
"@vaadin/chai-plugins": "24.5.0-rc1",
|
|
42
42
|
"@vaadin/testing-helpers": "^1.0.0",
|
|
43
43
|
"sinon": "^18.0.0"
|
|
44
44
|
},
|
|
45
|
-
"gitHead": "
|
|
45
|
+
"gitHead": "a8ae853ab69d7938cf507843784f1551a2eeb972"
|
|
46
46
|
}
|
package/src/define.d.ts
CHANGED
|
@@ -7,4 +7,4 @@ export interface CustomElementType extends CustomElementConstructor {
|
|
|
7
7
|
is: string;
|
|
8
8
|
}
|
|
9
9
|
|
|
10
|
-
export declare function defineCustomElement(CustomElement: CustomElementConstructor): void;
|
|
10
|
+
export declare function defineCustomElement(CustomElement: CustomElementConstructor, version?: string): void;
|
package/src/define.js
CHANGED
|
@@ -4,15 +4,15 @@
|
|
|
4
4
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
5
5
|
*/
|
|
6
6
|
|
|
7
|
-
export function defineCustomElement(CustomElement) {
|
|
7
|
+
export function defineCustomElement(CustomElement, version = '24.5.0-rc1') {
|
|
8
|
+
Object.defineProperty(CustomElement, 'version', {
|
|
9
|
+
get() {
|
|
10
|
+
return version;
|
|
11
|
+
},
|
|
12
|
+
});
|
|
13
|
+
|
|
8
14
|
const defined = customElements.get(CustomElement.is);
|
|
9
15
|
if (!defined) {
|
|
10
|
-
Object.defineProperty(CustomElement, 'version', {
|
|
11
|
-
get() {
|
|
12
|
-
return '24.5.0-beta1';
|
|
13
|
-
},
|
|
14
|
-
});
|
|
15
|
-
|
|
16
16
|
customElements.define(CustomElement.is, CustomElement);
|
|
17
17
|
} else {
|
|
18
18
|
const definedVersion = defined.version;
|