@vaadin/multi-select-combo-box 25.2.0-beta1 → 25.2.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.
@@ -549,24 +549,6 @@
549
549
  "package": "@vaadin/field-base/src/field-mixin.js"
550
550
  }
551
551
  },
552
- {
553
- "kind": "method",
554
- "name": "scrollToIndex",
555
- "parameters": [
556
- {
557
- "name": "index",
558
- "description": "Index of the item to scroll to",
559
- "type": {
560
- "text": "number"
561
- }
562
- }
563
- ],
564
- "description": "Scrolls the dropdown to the item at the given index and sets it as the\nfocused (highlighted) item. Safe to call before the dropdown is opened\nor while the data provider is loading: the call is queued and executed\nonce the overlay is open and not loading.\n\nBecause this sets the focused item, closing the dropdown without an\nexplicit selection change (e.g. via outside click or blur) will commit\nthe focused item as `selectedItem`. In the typical use case (scroll to\nthe currently selected item) this is a no-op; callers scrolling to a\ndifferent index should be aware of this behavior.",
565
- "inheritedFrom": {
566
- "name": "ComboBoxScrollToIndexMixin",
567
- "package": "@vaadin/combo-box/src/vaadin-combo-box-scroll-to-index-mixin.js"
568
- }
569
- },
570
552
  {
571
553
  "kind": "field",
572
554
  "name": "selectedItems",
@@ -1084,8 +1066,8 @@
1084
1066
  "package": "@vaadin/component-base/src/i18n-mixin.js"
1085
1067
  },
1086
1068
  {
1087
- "name": "ComboBoxScrollToIndexMixin",
1088
- "package": "@vaadin/combo-box/src/vaadin-combo-box-scroll-to-index-mixin.js"
1069
+ "name": "ComboBoxFocusIndexMixin",
1070
+ "package": "@vaadin/combo-box/src/vaadin-combo-box-focus-index-mixin.js"
1089
1071
  },
1090
1072
  {
1091
1073
  "name": "ComboBoxDataProviderMixin",
@@ -1694,24 +1676,6 @@
1694
1676
  "package": "@vaadin/field-base/src/field-mixin.js"
1695
1677
  }
1696
1678
  },
1697
- {
1698
- "kind": "method",
1699
- "name": "scrollToIndex",
1700
- "parameters": [
1701
- {
1702
- "name": "index",
1703
- "description": "Index of the item to scroll to",
1704
- "type": {
1705
- "text": "number"
1706
- }
1707
- }
1708
- ],
1709
- "description": "Scrolls the dropdown to the item at the given index and sets it as the\nfocused (highlighted) item. Safe to call before the dropdown is opened\nor while the data provider is loading: the call is queued and executed\nonce the overlay is open and not loading.\n\nBecause this sets the focused item, closing the dropdown without an\nexplicit selection change (e.g. via outside click or blur) will commit\nthe focused item as `selectedItem`. In the typical use case (scroll to\nthe currently selected item) this is a no-op; callers scrolling to a\ndifferent index should be aware of this behavior.",
1710
- "inheritedFrom": {
1711
- "name": "ComboBoxScrollToIndexMixin",
1712
- "package": "@vaadin/combo-box/src/vaadin-combo-box-scroll-to-index-mixin.js"
1713
- }
1714
- },
1715
1679
  {
1716
1680
  "kind": "field",
1717
1681
  "name": "selectedItems",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@vaadin/multi-select-combo-box",
3
- "version": "25.2.0-beta1",
3
+ "version": "25.2.0-rc1",
4
4
  "publishConfig": {
5
5
  "access": "public"
6
6
  },
@@ -37,29 +37,29 @@
37
37
  ],
38
38
  "dependencies": {
39
39
  "@open-wc/dedupe-mixin": "^1.3.0",
40
- "@vaadin/a11y-base": "25.2.0-beta1",
41
- "@vaadin/combo-box": "25.2.0-beta1",
42
- "@vaadin/component-base": "25.2.0-beta1",
43
- "@vaadin/field-base": "25.2.0-beta1",
44
- "@vaadin/input-container": "25.2.0-beta1",
45
- "@vaadin/item": "25.2.0-beta1",
46
- "@vaadin/lit-renderer": "25.2.0-beta1",
47
- "@vaadin/overlay": "25.2.0-beta1",
48
- "@vaadin/vaadin-themable-mixin": "25.2.0-beta1",
40
+ "@vaadin/a11y-base": "25.2.0-rc1",
41
+ "@vaadin/combo-box": "25.2.0-rc1",
42
+ "@vaadin/component-base": "25.2.0-rc1",
43
+ "@vaadin/field-base": "25.2.0-rc1",
44
+ "@vaadin/input-container": "25.2.0-rc1",
45
+ "@vaadin/item": "25.2.0-rc1",
46
+ "@vaadin/lit-renderer": "25.2.0-rc1",
47
+ "@vaadin/overlay": "25.2.0-rc1",
48
+ "@vaadin/vaadin-themable-mixin": "25.2.0-rc1",
49
49
  "lit": "^3.0.0"
50
50
  },
51
51
  "devDependencies": {
52
- "@vaadin/aura": "25.2.0-beta1",
53
- "@vaadin/chai-plugins": "25.2.0-beta1",
54
- "@vaadin/test-runner-commands": "25.2.0-beta1",
52
+ "@vaadin/aura": "25.2.0-rc1",
53
+ "@vaadin/chai-plugins": "25.2.0-rc1",
54
+ "@vaadin/test-runner-commands": "25.2.0-rc1",
55
55
  "@vaadin/testing-helpers": "^2.0.0",
56
- "@vaadin/vaadin-lumo-styles": "25.2.0-beta1",
57
- "sinon": "^21.0.2"
56
+ "@vaadin/vaadin-lumo-styles": "25.2.0-rc1",
57
+ "sinon": "^22.0.0"
58
58
  },
59
59
  "customElements": "custom-elements.json",
60
60
  "web-types": [
61
61
  "web-types.json",
62
62
  "web-types.lit.json"
63
63
  ],
64
- "gitHead": "471a23f60d1eb725f98a33f62cb9664d9c0a4163"
64
+ "gitHead": "7c581b396dbb889f75c8073d6b4d25537a65b873"
65
65
  }
@@ -12,7 +12,6 @@ import type { ComboBoxItemModel } from '@vaadin/combo-box/src/vaadin-combo-box.j
12
12
  import type { ComboBoxBaseMixinClass } from '@vaadin/combo-box/src/vaadin-combo-box-base-mixin.js';
13
13
  import type { ComboBoxDataProviderMixinClass } from '@vaadin/combo-box/src/vaadin-combo-box-data-provider-mixin.js';
14
14
  import type { ComboBoxItemsMixinClass } from '@vaadin/combo-box/src/vaadin-combo-box-items-mixin.js';
15
- import type { ComboBoxScrollToIndexMixinClass } from '@vaadin/combo-box/src/vaadin-combo-box-scroll-to-index-mixin.js';
16
15
  import type { DelegateStateMixinClass } from '@vaadin/component-base/src/delegate-state-mixin.js';
17
16
  import type { I18nMixinClass } from '@vaadin/component-base/src/i18n-mixin.js';
18
17
  import type { ResizeMixinClass } from '@vaadin/component-base/src/resize-mixin.js';
@@ -46,7 +45,6 @@ export declare function MultiSelectComboBoxMixin<TItem, T extends Constructor<HT
46
45
  Constructor<ComboBoxBaseMixinClass> &
47
46
  Constructor<ComboBoxDataProviderMixinClass<TItem>> &
48
47
  Constructor<ComboBoxItemsMixinClass<TItem>> &
49
- Constructor<ComboBoxScrollToIndexMixinClass> &
50
48
  Constructor<DelegateFocusMixinClass> &
51
49
  Constructor<DelegateStateMixinClass> &
52
50
  Constructor<DisabledMixinClass> &
@@ -5,9 +5,9 @@
5
5
  */
6
6
  import { announce } from '@vaadin/a11y-base/src/announce.js';
7
7
  import { ComboBoxDataProviderMixin } from '@vaadin/combo-box/src/vaadin-combo-box-data-provider-mixin.js';
8
+ import { ComboBoxFocusIndexMixin } from '@vaadin/combo-box/src/vaadin-combo-box-focus-index-mixin.js';
8
9
  import { ComboBoxItemsMixin } from '@vaadin/combo-box/src/vaadin-combo-box-items-mixin.js';
9
10
  import { ComboBoxPlaceholder } from '@vaadin/combo-box/src/vaadin-combo-box-placeholder.js';
10
- import { ComboBoxScrollToIndexMixin } from '@vaadin/combo-box/src/vaadin-combo-box-scroll-to-index-mixin.js';
11
11
  import { I18nMixin } from '@vaadin/component-base/src/i18n-mixin.js';
12
12
  import { ResizeMixin } from '@vaadin/component-base/src/resize-mixin.js';
13
13
  import { SlotController } from '@vaadin/component-base/src/slot-controller.js';
@@ -26,9 +26,7 @@ const DEFAULT_I18N = {
26
26
 
27
27
  export const MultiSelectComboBoxMixin = (superClass) =>
28
28
  class MultiSelectComboBoxMixinClass extends I18nMixin(
29
- ComboBoxScrollToIndexMixin(
30
- ComboBoxDataProviderMixin(ComboBoxItemsMixin(InputControlMixin(ResizeMixin(superClass)))),
31
- ),
29
+ ComboBoxFocusIndexMixin(ComboBoxDataProviderMixin(ComboBoxItemsMixin(InputControlMixin(ResizeMixin(superClass))))),
32
30
  ) {
33
31
  static get properties() {
34
32
  return {
@@ -729,6 +727,18 @@ export const MultiSelectComboBoxMixin = (superClass) =>
729
727
  // when the user types in a filter query.
730
728
  const focusedItem = oldItems ? oldItems[this._focusedIndex] : null;
731
729
 
730
+ // When both the previously-focused entry and the new entry at the
731
+ // same index are placeholders (e.g. the Flow connector mid-scroll
732
+ // re-pushing `__setDropdownItems`), preserve `_focusedIndex` until
733
+ // a follow-up call lands a real item at that position.
734
+ if (
735
+ oldItems &&
736
+ oldItems[this._focusedIndex] instanceof ComboBoxPlaceholder &&
737
+ newItems[this._focusedIndex] instanceof ComboBoxPlaceholder
738
+ ) {
739
+ return;
740
+ }
741
+
732
742
  // Try to first set focus on the item that had been focused before `newItems` were updated
733
743
  // if it is still present in the `newItems` array. Otherwise, set the focused index
734
744
  // depending on the selected item or the filter query.
package/web-types.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "$schema": "https://json.schemastore.org/web-types",
3
3
  "name": "@vaadin/multi-select-combo-box",
4
- "version": "25.2.0-beta1",
4
+ "version": "25.2.0-rc1",
5
5
  "description-markup": "markdown",
6
6
  "contributions": {
7
7
  "html": {
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "$schema": "https://json.schemastore.org/web-types",
3
3
  "name": "@vaadin/multi-select-combo-box",
4
- "version": "25.2.0-beta1",
4
+ "version": "25.2.0-rc1",
5
5
  "description-markup": "markdown",
6
6
  "framework": "lit",
7
7
  "framework-config": {