@vaadin/component-base 25.4.0-alpha2 → 25.4.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.
@@ -115,20 +115,10 @@
115
115
  "type": {
116
116
  "text": "Object | undefined"
117
117
  },
118
- "description": "The object used to localize this component. To change the default\nlocalization, set this to an object that provides all properties, or\njust the individual properties you want to change.\n\nWhen not set, defaults to `undefined`.\n\nShould be overridden by subclasses to provide a custom JSDoc with the\ndefault I18N properties.",
119
- "attribute": "i18n"
120
- }
121
- ],
122
- "attributes": [
123
- {
124
- "name": "i18n",
125
- "type": {
126
- "text": "Object | undefined"
127
- },
128
- "description": "The object used to localize this component. To change the default\nlocalization, set this to an object that provides all properties, or\njust the individual properties you want to change.\n\nWhen not set, defaults to `undefined`.\n\nShould be overridden by subclasses to provide a custom JSDoc with the\ndefault I18N properties.",
129
- "fieldName": "i18n"
118
+ "description": "The object used to localize this component. To change the default\nlocalization, set this to an object that provides all properties, or\njust the individual properties you want to change.\n\nWhen not set, defaults to `undefined`.\n\nShould be overridden by subclasses to provide a custom JSDoc with the\ndefault I18N properties."
130
119
  }
131
120
  ],
121
+ "attributes": [],
132
122
  "parameters": [
133
123
  {
134
124
  "name": "superClass"
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@vaadin/component-base",
3
- "version": "25.4.0-alpha2",
3
+ "version": "25.4.0-alpha4",
4
4
  "publishConfig": {
5
5
  "access": "public"
6
6
  },
@@ -39,11 +39,11 @@
39
39
  },
40
40
  "devDependencies": {
41
41
  "@polymer/polymer": "^3.0.0",
42
- "@vaadin/chai-plugins": "25.4.0-alpha2",
43
- "@vaadin/test-runner-commands": "25.4.0-alpha2",
42
+ "@vaadin/chai-plugins": "25.4.0-alpha4",
43
+ "@vaadin/test-runner-commands": "25.4.0-alpha4",
44
44
  "@vaadin/testing-helpers": "^2.0.0",
45
45
  "sinon": "^22.0.0"
46
46
  },
47
47
  "customElements": "custom-elements.json",
48
- "gitHead": "213f8b55112558d2f976d8730fe44370ca868333"
48
+ "gitHead": "7809e4c099538333a6dbd11d8da18a0c6ec30dad"
49
49
  }
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 = '25.4.0-alpha2') {
16
+ export function defineCustomElement(CustomElement, version = '25.4.0-alpha4') {
17
17
  Object.defineProperty(CustomElement, 'version', {
18
18
  get() {
19
19
  return version;
@@ -14,7 +14,7 @@ export class SlotController extends EventTarget implements ReactiveController {
14
14
  /**
15
15
  * The slotted node managed by the controller.
16
16
  */
17
- node: HTMLElement;
17
+ node: HTMLElement | null;
18
18
 
19
19
  /**
20
20
  * The list of slotted nodes managed by the controller.
@@ -217,7 +217,11 @@ export class SlotController extends EventTarget {
217
217
  );
218
218
 
219
219
  if (removedNodes.length) {
220
- this.nodes = current.filter((node) => !removedNodes.includes(node));
220
+ if (this.multiple) {
221
+ this.nodes = current.filter((node) => !removedNodes.includes(node));
222
+ } else if (removedNodes.includes(this.node)) {
223
+ this.node = null;
224
+ }
221
225
 
222
226
  removedNodes.forEach((node) => {
223
227
  this.teardownNode(node);