@vaadin/component-base 25.4.0-alpha3 → 25.4.0-alpha5

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-alpha3",
3
+ "version": "25.4.0-alpha5",
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-alpha3",
43
- "@vaadin/test-runner-commands": "25.4.0-alpha3",
42
+ "@vaadin/chai-plugins": "25.4.0-alpha5",
43
+ "@vaadin/test-runner-commands": "25.4.0-alpha5",
44
44
  "@vaadin/testing-helpers": "^2.0.0",
45
45
  "sinon": "^22.0.0"
46
46
  },
47
47
  "customElements": "custom-elements.json",
48
- "gitHead": "db7e679c1a8af00840cc05ddcbefff68dfed1e45"
48
+ "gitHead": "65e9c9e49c0a723b08ee91b9aae8b901e91a3597"
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-alpha3') {
16
+ export function defineCustomElement(CustomElement, version = '25.4.0-alpha5') {
17
17
  Object.defineProperty(CustomElement, 'version', {
18
18
  get() {
19
19
  return version;
package/src/gestures.js CHANGED
@@ -808,8 +808,8 @@ function trackFire(info, target, touch) {
808
808
  if (!target) {
809
809
  return;
810
810
  }
811
- const secondlast = info.moves[info.moves.length - 2];
812
- const lastmove = info.moves[info.moves.length - 1];
811
+ const secondlast = info.moves.at(-2);
812
+ const lastmove = info.moves.at(-1);
813
813
  const dx = lastmove.x - info.x;
814
814
  const dy = lastmove.y - info.y;
815
815
  let ddx,
@@ -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);
package/src/warnings.d.ts CHANGED
@@ -8,3 +8,8 @@
8
8
  * Issues a warning in the browser console if it has not been issued before.
9
9
  */
10
10
  export declare function issueWarning(warning: string): void;
11
+
12
+ /**
13
+ * Clears all issued warnings. Only intended for testing purposes.
14
+ */
15
+ export declare function clearWarnings(): void;