@vaadin/multi-select-combo-box 25.3.0-alpha11 → 25.3.0-alpha12
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/custom-elements.json +52 -0
- package/package.json +15 -15
- package/src/vaadin-multi-select-combo-box-mixin.js +11 -1
- package/web-types.json +19 -1
- package/web-types.lit.json +8 -1
package/custom-elements.json
CHANGED
|
@@ -126,6 +126,20 @@
|
|
|
126
126
|
"package": "@vaadin/a11y-base/src/delegate-focus-mixin.js"
|
|
127
127
|
}
|
|
128
128
|
},
|
|
129
|
+
{
|
|
130
|
+
"kind": "field",
|
|
131
|
+
"name": "autoFocusPartialMatch",
|
|
132
|
+
"privacy": "public",
|
|
133
|
+
"type": {
|
|
134
|
+
"text": "string"
|
|
135
|
+
},
|
|
136
|
+
"description": "Controls whether an item whose label partially matches the typed\nfilter is automatically focused. The focused item is highlighted\nin the dropdown while typing and is selected when committing the\nvalue, for example on Enter press:\n\n- `none` (default): do not focus partial matches.\n- `first-match`: focus the first item in the filtered results.\n- `only-match`: focus the item when filtering narrows the results to a single item.\n\nAn item whose label matches the filter exactly is always focused,\nregardless of this property. Matching is case-insensitive. A partial\nmatch is not focused when `allowCustomValue` is enabled, or while\nthe dropdown is closed. For example, with `autoOpenDisabled`, typing\ndoes not focus or select a match until the dropdown is opened.",
|
|
137
|
+
"attribute": "auto-focus-partial-match",
|
|
138
|
+
"inheritedFrom": {
|
|
139
|
+
"name": "ComboBoxItemsMixin",
|
|
140
|
+
"package": "@vaadin/combo-box/src/vaadin-combo-box-items-mixin.js"
|
|
141
|
+
}
|
|
142
|
+
},
|
|
129
143
|
{
|
|
130
144
|
"kind": "field",
|
|
131
145
|
"name": "autoOpenDisabled",
|
|
@@ -741,6 +755,18 @@
|
|
|
741
755
|
"description": "Set to true to not collapse selected items chips into the overflow\nchip and instead always expand vertically, causing input field to\nwrap into multiple lines when width is limited.",
|
|
742
756
|
"fieldName": "autoExpandVertically"
|
|
743
757
|
},
|
|
758
|
+
{
|
|
759
|
+
"name": "auto-focus-partial-match",
|
|
760
|
+
"type": {
|
|
761
|
+
"text": "string"
|
|
762
|
+
},
|
|
763
|
+
"description": "Controls whether an item whose label partially matches the typed\nfilter is automatically focused. The focused item is highlighted\nin the dropdown while typing and is selected when committing the\nvalue, for example on Enter press:\n\n- `none` (default): do not focus partial matches.\n- `first-match`: focus the first item in the filtered results.\n- `only-match`: focus the item when filtering narrows the results to a single item.\n\nAn item whose label matches the filter exactly is always focused,\nregardless of this property. Matching is case-insensitive. A partial\nmatch is not focused when `allowCustomValue` is enabled, or while\nthe dropdown is closed. For example, with `autoOpenDisabled`, typing\ndoes not focus or select a match until the dropdown is opened.",
|
|
764
|
+
"fieldName": "autoFocusPartialMatch",
|
|
765
|
+
"inheritedFrom": {
|
|
766
|
+
"name": "ComboBoxItemsMixin",
|
|
767
|
+
"package": "@vaadin/combo-box/src/vaadin-combo-box-items-mixin.js"
|
|
768
|
+
}
|
|
769
|
+
},
|
|
744
770
|
{
|
|
745
771
|
"name": "auto-open-disabled",
|
|
746
772
|
"type": {
|
|
@@ -1251,6 +1277,20 @@
|
|
|
1251
1277
|
"package": "@vaadin/a11y-base/src/delegate-focus-mixin.js"
|
|
1252
1278
|
}
|
|
1253
1279
|
},
|
|
1280
|
+
{
|
|
1281
|
+
"kind": "field",
|
|
1282
|
+
"name": "autoFocusPartialMatch",
|
|
1283
|
+
"privacy": "public",
|
|
1284
|
+
"type": {
|
|
1285
|
+
"text": "string"
|
|
1286
|
+
},
|
|
1287
|
+
"description": "Controls whether an item whose label partially matches the typed\nfilter is automatically focused. The focused item is highlighted\nin the dropdown while typing and is selected when committing the\nvalue, for example on Enter press:\n\n- `none` (default): do not focus partial matches.\n- `first-match`: focus the first item in the filtered results.\n- `only-match`: focus the item when filtering narrows the results to a single item.\n\nAn item whose label matches the filter exactly is always focused,\nregardless of this property. Matching is case-insensitive. A partial\nmatch is not focused when `allowCustomValue` is enabled, or while\nthe dropdown is closed. For example, with `autoOpenDisabled`, typing\ndoes not focus or select a match until the dropdown is opened.",
|
|
1288
|
+
"attribute": "auto-focus-partial-match",
|
|
1289
|
+
"inheritedFrom": {
|
|
1290
|
+
"name": "ComboBoxItemsMixin",
|
|
1291
|
+
"package": "@vaadin/combo-box/src/vaadin-combo-box-items-mixin.js"
|
|
1292
|
+
}
|
|
1293
|
+
},
|
|
1254
1294
|
{
|
|
1255
1295
|
"kind": "field",
|
|
1256
1296
|
"name": "autoOpenDisabled",
|
|
@@ -1931,6 +1971,18 @@
|
|
|
1931
1971
|
"module": "src/vaadin-multi-select-combo-box-mixin.js"
|
|
1932
1972
|
}
|
|
1933
1973
|
},
|
|
1974
|
+
{
|
|
1975
|
+
"name": "auto-focus-partial-match",
|
|
1976
|
+
"type": {
|
|
1977
|
+
"text": "string"
|
|
1978
|
+
},
|
|
1979
|
+
"description": "Controls whether an item whose label partially matches the typed\nfilter is automatically focused. The focused item is highlighted\nin the dropdown while typing and is selected when committing the\nvalue, for example on Enter press:\n\n- `none` (default): do not focus partial matches.\n- `first-match`: focus the first item in the filtered results.\n- `only-match`: focus the item when filtering narrows the results to a single item.\n\nAn item whose label matches the filter exactly is always focused,\nregardless of this property. Matching is case-insensitive. A partial\nmatch is not focused when `allowCustomValue` is enabled, or while\nthe dropdown is closed. For example, with `autoOpenDisabled`, typing\ndoes not focus or select a match until the dropdown is opened.",
|
|
1980
|
+
"fieldName": "autoFocusPartialMatch",
|
|
1981
|
+
"inheritedFrom": {
|
|
1982
|
+
"name": "ComboBoxItemsMixin",
|
|
1983
|
+
"package": "@vaadin/combo-box/src/vaadin-combo-box-items-mixin.js"
|
|
1984
|
+
}
|
|
1985
|
+
},
|
|
1934
1986
|
{
|
|
1935
1987
|
"name": "auto-open-disabled",
|
|
1936
1988
|
"type": {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@vaadin/multi-select-combo-box",
|
|
3
|
-
"version": "25.3.0-
|
|
3
|
+
"version": "25.3.0-alpha12",
|
|
4
4
|
"publishConfig": {
|
|
5
5
|
"access": "public"
|
|
6
6
|
},
|
|
@@ -37,23 +37,23 @@
|
|
|
37
37
|
],
|
|
38
38
|
"dependencies": {
|
|
39
39
|
"@open-wc/dedupe-mixin": "^1.3.0",
|
|
40
|
-
"@vaadin/a11y-base": "25.3.0-
|
|
41
|
-
"@vaadin/combo-box": "25.3.0-
|
|
42
|
-
"@vaadin/component-base": "25.3.0-
|
|
43
|
-
"@vaadin/field-base": "25.3.0-
|
|
44
|
-
"@vaadin/input-container": "25.3.0-
|
|
45
|
-
"@vaadin/item": "25.3.0-
|
|
46
|
-
"@vaadin/lit-renderer": "25.3.0-
|
|
47
|
-
"@vaadin/overlay": "25.3.0-
|
|
48
|
-
"@vaadin/vaadin-themable-mixin": "25.3.0-
|
|
40
|
+
"@vaadin/a11y-base": "25.3.0-alpha12",
|
|
41
|
+
"@vaadin/combo-box": "25.3.0-alpha12",
|
|
42
|
+
"@vaadin/component-base": "25.3.0-alpha12",
|
|
43
|
+
"@vaadin/field-base": "25.3.0-alpha12",
|
|
44
|
+
"@vaadin/input-container": "25.3.0-alpha12",
|
|
45
|
+
"@vaadin/item": "25.3.0-alpha12",
|
|
46
|
+
"@vaadin/lit-renderer": "25.3.0-alpha12",
|
|
47
|
+
"@vaadin/overlay": "25.3.0-alpha12",
|
|
48
|
+
"@vaadin/vaadin-themable-mixin": "25.3.0-alpha12",
|
|
49
49
|
"lit": "^3.0.0"
|
|
50
50
|
},
|
|
51
51
|
"devDependencies": {
|
|
52
|
-
"@vaadin/aura": "25.3.0-
|
|
53
|
-
"@vaadin/chai-plugins": "25.3.0-
|
|
54
|
-
"@vaadin/test-runner-commands": "25.3.0-
|
|
52
|
+
"@vaadin/aura": "25.3.0-alpha12",
|
|
53
|
+
"@vaadin/chai-plugins": "25.3.0-alpha12",
|
|
54
|
+
"@vaadin/test-runner-commands": "25.3.0-alpha12",
|
|
55
55
|
"@vaadin/testing-helpers": "^2.0.0",
|
|
56
|
-
"@vaadin/vaadin-lumo-styles": "25.3.0-
|
|
56
|
+
"@vaadin/vaadin-lumo-styles": "25.3.0-alpha12",
|
|
57
57
|
"sinon": "^22.0.0"
|
|
58
58
|
},
|
|
59
59
|
"customElements": "custom-elements.json",
|
|
@@ -61,5 +61,5 @@
|
|
|
61
61
|
"web-types.json",
|
|
62
62
|
"web-types.lit.json"
|
|
63
63
|
],
|
|
64
|
-
"gitHead": "
|
|
64
|
+
"gitHead": "0f0337783efe38332f5dc6a8968f207d2982de4b"
|
|
65
65
|
}
|
|
@@ -537,6 +537,16 @@ export const MultiSelectComboBoxMixin = (superClass) =>
|
|
|
537
537
|
__commitUserInput() {
|
|
538
538
|
if (this._focusedIndex > -1) {
|
|
539
539
|
const focusedItem = this._dropdownItems[this._focusedIndex];
|
|
540
|
+
// Do not unselect an already selected item when it was focused by
|
|
541
|
+
// filtering, in which case the input value still equals the filter.
|
|
542
|
+
if (
|
|
543
|
+
this._lastFilter &&
|
|
544
|
+
this._lastFilter === this._inputElementValue &&
|
|
545
|
+
this._findIndex(focusedItem, this.selectedItems, this.itemIdPath) !== -1
|
|
546
|
+
) {
|
|
547
|
+
this.__clearInternalValue();
|
|
548
|
+
return;
|
|
549
|
+
}
|
|
540
550
|
this.__selectItem(focusedItem);
|
|
541
551
|
} else if (this._inputElementValue) {
|
|
542
552
|
// Detect if input value doesn't match an existing item
|
|
@@ -754,7 +764,7 @@ export const MultiSelectComboBoxMixin = (superClass) =>
|
|
|
754
764
|
} else {
|
|
755
765
|
// When the user filled in something that is different from the current value = filtering is enabled,
|
|
756
766
|
// set the focused index to the item that matches the filter query.
|
|
757
|
-
this._focusedIndex = this.
|
|
767
|
+
this._focusedIndex = this.__getItemIndexByFilter(newItems);
|
|
758
768
|
}
|
|
759
769
|
}
|
|
760
770
|
|
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.3.0-
|
|
4
|
+
"version": "25.3.0-alpha12",
|
|
5
5
|
"description-markup": "markdown",
|
|
6
6
|
"contributions": {
|
|
7
7
|
"html": {
|
|
@@ -73,6 +73,15 @@
|
|
|
73
73
|
]
|
|
74
74
|
}
|
|
75
75
|
},
|
|
76
|
+
{
|
|
77
|
+
"name": "auto-focus-partial-match",
|
|
78
|
+
"description": "Controls whether an item whose label partially matches the typed\nfilter is automatically focused. The focused item is highlighted\nin the dropdown while typing and is selected when committing the\nvalue, for example on Enter press:\n\n- `none` (default): do not focus partial matches.\n- `first-match`: focus the first item in the filtered results.\n- `only-match`: focus the item when filtering narrows the results to a single item.\n\nAn item whose label matches the filter exactly is always focused,\nregardless of this property. Matching is case-insensitive. A partial\nmatch is not focused when `allowCustomValue` is enabled, or while\nthe dropdown is closed. For example, with `autoOpenDisabled`, typing\ndoes not focus or select a match until the dropdown is opened.",
|
|
79
|
+
"value": {
|
|
80
|
+
"type": [
|
|
81
|
+
"string"
|
|
82
|
+
]
|
|
83
|
+
}
|
|
84
|
+
},
|
|
76
85
|
{
|
|
77
86
|
"name": "auto-open-disabled",
|
|
78
87
|
"description": "Set true to prevent the overlay from opening automatically.",
|
|
@@ -391,6 +400,15 @@
|
|
|
391
400
|
]
|
|
392
401
|
}
|
|
393
402
|
},
|
|
403
|
+
{
|
|
404
|
+
"name": "autoFocusPartialMatch",
|
|
405
|
+
"description": "Controls whether an item whose label partially matches the typed\nfilter is automatically focused. The focused item is highlighted\nin the dropdown while typing and is selected when committing the\nvalue, for example on Enter press:\n\n- `none` (default): do not focus partial matches.\n- `first-match`: focus the first item in the filtered results.\n- `only-match`: focus the item when filtering narrows the results to a single item.\n\nAn item whose label matches the filter exactly is always focused,\nregardless of this property. Matching is case-insensitive. A partial\nmatch is not focused when `allowCustomValue` is enabled, or while\nthe dropdown is closed. For example, with `autoOpenDisabled`, typing\ndoes not focus or select a match until the dropdown is opened.",
|
|
406
|
+
"value": {
|
|
407
|
+
"type": [
|
|
408
|
+
"string"
|
|
409
|
+
]
|
|
410
|
+
}
|
|
411
|
+
},
|
|
394
412
|
{
|
|
395
413
|
"name": "autoOpenDisabled",
|
|
396
414
|
"description": "Set true to prevent the overlay from opening automatically.",
|
package/web-types.lit.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.3.0-
|
|
4
|
+
"version": "25.3.0-alpha12",
|
|
5
5
|
"description-markup": "markdown",
|
|
6
6
|
"framework": "lit",
|
|
7
7
|
"framework-config": {
|
|
@@ -75,6 +75,13 @@
|
|
|
75
75
|
"kind": "expression"
|
|
76
76
|
}
|
|
77
77
|
},
|
|
78
|
+
{
|
|
79
|
+
"name": ".autoFocusPartialMatch",
|
|
80
|
+
"description": "Controls whether an item whose label partially matches the typed\nfilter is automatically focused. The focused item is highlighted\nin the dropdown while typing and is selected when committing the\nvalue, for example on Enter press:\n\n- `none` (default): do not focus partial matches.\n- `first-match`: focus the first item in the filtered results.\n- `only-match`: focus the item when filtering narrows the results to a single item.\n\nAn item whose label matches the filter exactly is always focused,\nregardless of this property. Matching is case-insensitive. A partial\nmatch is not focused when `allowCustomValue` is enabled, or while\nthe dropdown is closed. For example, with `autoOpenDisabled`, typing\ndoes not focus or select a match until the dropdown is opened.",
|
|
81
|
+
"value": {
|
|
82
|
+
"kind": "expression"
|
|
83
|
+
}
|
|
84
|
+
},
|
|
78
85
|
{
|
|
79
86
|
"name": "?autoOpenDisabled",
|
|
80
87
|
"description": "Set true to prevent the overlay from opening automatically.",
|