@vaadin/component-base 24.5.0-alpha7 → 24.5.0-alpha9
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/README.md +1 -1
- package/package.json +5 -5
- package/src/define.js +1 -1
- package/src/slot-controller.d.ts +1 -0
- package/src/slot-controller.js +3 -4
package/README.md
CHANGED
|
@@ -4,7 +4,7 @@ A set of helpers and mixins used by Vaadin components.
|
|
|
4
4
|
|
|
5
5
|
## Contributing
|
|
6
6
|
|
|
7
|
-
Read the [contributing guide](https://vaadin.com/docs/latest/contributing
|
|
7
|
+
Read the [contributing guide](https://vaadin.com/docs/latest/contributing) to learn about our development process, how to propose bugfixes and improvements, and how to test your changes to Vaadin components.
|
|
8
8
|
|
|
9
9
|
## License
|
|
10
10
|
|
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-alpha9",
|
|
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
|
-
"@
|
|
42
|
-
"@vaadin/testing-helpers": "^0.
|
|
43
|
-
"sinon": "^
|
|
41
|
+
"@vaadin/chai-plugins": "24.5.0-alpha9",
|
|
42
|
+
"@vaadin/testing-helpers": "^1.0.0",
|
|
43
|
+
"sinon": "^18.0.0"
|
|
44
44
|
},
|
|
45
|
-
"gitHead": "
|
|
45
|
+
"gitHead": "804744762f3bec0a2247c4bbcbbb204dbcd78bc0"
|
|
46
46
|
}
|
package/src/define.js
CHANGED
package/src/slot-controller.d.ts
CHANGED
package/src/slot-controller.js
CHANGED
|
@@ -19,15 +19,14 @@ export class SlotController extends EventTarget {
|
|
|
19
19
|
* @return {string}
|
|
20
20
|
* @protected
|
|
21
21
|
*/
|
|
22
|
-
static generateId(host,
|
|
23
|
-
const prefix = slotName || 'default';
|
|
22
|
+
static generateId(host, prefix = 'default') {
|
|
24
23
|
return `${prefix}-${host.localName}-${generateUniqueId()}`;
|
|
25
24
|
}
|
|
26
25
|
|
|
27
26
|
constructor(host, slotName, tagName, config = {}) {
|
|
28
27
|
super();
|
|
29
28
|
|
|
30
|
-
const { initializer, multiple, observe, useUniqueId } = config;
|
|
29
|
+
const { initializer, multiple, observe, useUniqueId, uniqueIdPrefix } = config;
|
|
31
30
|
|
|
32
31
|
this.host = host;
|
|
33
32
|
this.slotName = slotName;
|
|
@@ -42,7 +41,7 @@ export class SlotController extends EventTarget {
|
|
|
42
41
|
|
|
43
42
|
// Only generate the default ID if requested by the controller.
|
|
44
43
|
if (useUniqueId) {
|
|
45
|
-
this.defaultId = this.constructor.generateId(host, slotName);
|
|
44
|
+
this.defaultId = this.constructor.generateId(host, uniqueIdPrefix || slotName);
|
|
46
45
|
}
|
|
47
46
|
}
|
|
48
47
|
|