@fluid-topics/ftds-combobox 2.2.18 → 2.2.19
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/build/ftds-base-combobox.d.ts +1 -1
- package/build/ftds-base-combobox.js +5 -4
- package/build/ftds-combobox-multi-value.d.ts +1 -1
- package/build/ftds-combobox-multi-value.js +4 -3
- package/build/ftds-combobox.light.js +59 -59
- package/build/ftds-combobox.min.js +7 -7
- package/package.json +10 -10
|
@@ -42,7 +42,7 @@ export declare abstract class FtdsBaseCombobox<T> extends FtdsBaseComboboxBase i
|
|
|
42
42
|
get activeItemId(): string | undefined;
|
|
43
43
|
protected renderField(): TemplateResult;
|
|
44
44
|
protected renderListboxContainer(isMultiSelectable: boolean): TemplateResult;
|
|
45
|
-
protected renderListboxItem(listboxItem: ListboxItem, index: number):
|
|
45
|
+
protected renderListboxItem(listboxItem: ListboxItem, index: number): typeof nothing | TemplateResult;
|
|
46
46
|
protected renderSuggestion(suggestion: SuggestionListboxItem, index: number): TemplateResult;
|
|
47
47
|
protected renderNewValueSuggestion(suggestion: SuggestionListboxItem, index: number): TemplateResult;
|
|
48
48
|
protected renderNewValueTag(): TemplateResult;
|
|
@@ -481,13 +481,14 @@ export class FtdsBaseCombobox extends FtdsBaseComboboxBase {
|
|
|
481
481
|
}
|
|
482
482
|
// When reaching the last suggestion we want to scroll down more to put the max suggestions message into view
|
|
483
483
|
getElementToScrollTo(suggestionIndex) {
|
|
484
|
-
var _a, _b, _c, _d
|
|
485
|
-
|
|
486
|
-
const
|
|
484
|
+
var _a, _b, _c, _d;
|
|
485
|
+
var _e;
|
|
486
|
+
const isLastSuggestion = ((_e = (_b = (_a = this.listbox) === null || _a === void 0 ? void 0 : _a.querySelectorAll(".listbox-option")) === null || _b === void 0 ? void 0 : _b.length) !== null && _e !== void 0 ? _e : 0) - 1 === suggestionIndex;
|
|
487
|
+
const maxSuggestionElement = (_c = this.listbox) === null || _c === void 0 ? void 0 : _c.querySelector(".listbox-option--message--max");
|
|
487
488
|
if (isLastSuggestion && maxSuggestionElement) {
|
|
488
489
|
return maxSuggestionElement;
|
|
489
490
|
}
|
|
490
|
-
return (
|
|
491
|
+
return (_d = this.listbox) === null || _d === void 0 ? void 0 : _d.children.item(suggestionIndex);
|
|
491
492
|
}
|
|
492
493
|
}
|
|
493
494
|
FtdsBaseCombobox.baseComboboxElementDefinitions = {
|
|
@@ -18,7 +18,7 @@ export declare class FtdsComboboxMultiValue extends FtdsBaseCombobox<ComboboxVal
|
|
|
18
18
|
isSuggestionSelected(value: string): boolean;
|
|
19
19
|
private notifySelectionChange;
|
|
20
20
|
private toggleSelectAll;
|
|
21
|
-
renderListboxItem(listboxItem: ListboxItem, index: number):
|
|
21
|
+
renderListboxItem(listboxItem: ListboxItem, index: number): typeof import("lit-html").nothing | TemplateResult;
|
|
22
22
|
private renderSelectAll;
|
|
23
23
|
private isValueSelected;
|
|
24
24
|
private areAllSuggestionsChecked;
|
|
@@ -194,13 +194,14 @@ export class FtdsComboboxMultiValue extends FtdsBaseCombobox {
|
|
|
194
194
|
`;
|
|
195
195
|
}
|
|
196
196
|
removeChipValueFromSelection(value) {
|
|
197
|
-
var _a
|
|
197
|
+
var _a;
|
|
198
|
+
var _b;
|
|
198
199
|
const removed = this.value.find((sv) => sv.value === value);
|
|
199
200
|
this.value = this.value.filter((selectedValue) => selectedValue.value !== value);
|
|
200
|
-
this.notifySelectionChange([(
|
|
201
|
+
this.notifySelectionChange([(_b = removed === null || removed === void 0 ? void 0 : removed.label) !== null && _b !== void 0 ? _b : value], false);
|
|
201
202
|
// When the last chip is removed we focus the input
|
|
202
203
|
if (this.value.length === 0) {
|
|
203
|
-
(
|
|
204
|
+
(_a = this.input) === null || _a === void 0 ? void 0 : _a.focus();
|
|
204
205
|
}
|
|
205
206
|
}
|
|
206
207
|
}
|