@alauda/ui 6.5.4-beta.17 → 6.5.4-beta.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/autocomplete/autocomplete.directive.d.ts +2 -1
- package/esm2020/autocomplete/autocomplete.directive.mjs +16 -9
- package/esm2020/select/base-select.mjs +3 -8
- package/fesm2015/alauda-ui.mjs +17 -15
- package/fesm2015/alauda-ui.mjs.map +1 -1
- package/fesm2020/alauda-ui.mjs +17 -15
- package/fesm2020/alauda-ui.mjs.map +1 -1
- package/package.json +1 -1
- package/select/base-select.d.ts +1 -2
package/fesm2020/alauda-ui.mjs
CHANGED
|
@@ -1808,6 +1808,8 @@ class AutoCompleteDirective extends BaseTooltip {
|
|
|
1808
1808
|
this.show = new EventEmitter();
|
|
1809
1809
|
this.hide = new EventEmitter();
|
|
1810
1810
|
this.selected = new EventEmitter();
|
|
1811
|
+
// Whether to automatically update input value after selection
|
|
1812
|
+
this.autoPatchEnabled = true;
|
|
1811
1813
|
this.inputValue$$ = new BehaviorSubject('');
|
|
1812
1814
|
this.filterFn$$ = new BehaviorSubject(this.filterFn);
|
|
1813
1815
|
this.unsubscribe$ = new Subject();
|
|
@@ -1927,13 +1929,15 @@ class AutoCompleteDirective extends BaseTooltip {
|
|
|
1927
1929
|
}
|
|
1928
1930
|
onSuggestionClick(value) {
|
|
1929
1931
|
let isArrCtrl = false;
|
|
1930
|
-
if (this.
|
|
1931
|
-
|
|
1932
|
-
|
|
1933
|
-
|
|
1934
|
-
|
|
1935
|
-
|
|
1936
|
-
|
|
1932
|
+
if (this.autoPatchEnabled) {
|
|
1933
|
+
if (this.ngControl) {
|
|
1934
|
+
const { control } = this.ngControl;
|
|
1935
|
+
isArrCtrl = Array.isArray(control.value);
|
|
1936
|
+
control.patchValue(isArrCtrl ? [...control.value, value] : value);
|
|
1937
|
+
}
|
|
1938
|
+
else {
|
|
1939
|
+
this.input.value = value;
|
|
1940
|
+
}
|
|
1937
1941
|
}
|
|
1938
1942
|
this.inputValue$$.next(isArrCtrl ? '' : value);
|
|
1939
1943
|
this.selected.emit(value);
|
|
@@ -2010,7 +2014,7 @@ class AutoCompleteDirective extends BaseTooltip {
|
|
|
2010
2014
|
}
|
|
2011
2015
|
}
|
|
2012
2016
|
AutoCompleteDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.8", ngImport: i0, type: AutoCompleteDirective, deps: [{ token: i1$2.Overlay }, { token: i0.ViewContainerRef }, { token: i0.ElementRef }, { token: i0.Renderer2 }, { token: i0.ChangeDetectorRef }, { token: i0.NgZone }, { token: i4.NgControl, host: true, optional: true }], target: i0.ɵɵFactoryTarget.Directive });
|
|
2013
|
-
AutoCompleteDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "13.3.8", type: AutoCompleteDirective, selector: "input[auiAutocomplete],textarea[auiAutocomplete]", inputs: { class: ["auiAutocompleteClass", "class"], autocomplete: ["auiAutocomplete", "autocomplete"], filterFn: "filterFn", defaultFirstSuggestion: ["auiAutocompleteDefaultFirstSuggestion", "defaultFirstSuggestion"], suggestionTrigger: ["auiAutocompleteTrigger", "suggestionTrigger"] }, outputs: { show: "auiAutocompleteShow", hide: "auiAutocompleteHide", selected: "auiAutocompleteSelected" }, host: { attributes: { "autocomplete": "off" } }, exportAs: ["auiAutocomplete"], usesInheritance: true, ngImport: i0 });
|
|
2017
|
+
AutoCompleteDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "13.3.8", type: AutoCompleteDirective, selector: "input[auiAutocomplete],textarea[auiAutocomplete]", inputs: { class: ["auiAutocompleteClass", "class"], autocomplete: ["auiAutocomplete", "autocomplete"], filterFn: "filterFn", defaultFirstSuggestion: ["auiAutocompleteDefaultFirstSuggestion", "defaultFirstSuggestion"], suggestionTrigger: ["auiAutocompleteTrigger", "suggestionTrigger"], autoPatchEnabled: ["auiAutocompleteAutoPatchEnabled", "autoPatchEnabled"] }, outputs: { show: "auiAutocompleteShow", hide: "auiAutocompleteHide", selected: "auiAutocompleteSelected" }, host: { attributes: { "autocomplete": "off" } }, exportAs: ["auiAutocomplete"], usesInheritance: true, ngImport: i0 });
|
|
2014
2018
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.8", ngImport: i0, type: AutoCompleteDirective, decorators: [{
|
|
2015
2019
|
type: Directive,
|
|
2016
2020
|
args: [{
|
|
@@ -2048,6 +2052,9 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.8", ngImpor
|
|
|
2048
2052
|
}], selected: [{
|
|
2049
2053
|
type: Output,
|
|
2050
2054
|
args: ['auiAutocompleteSelected']
|
|
2055
|
+
}], autoPatchEnabled: [{
|
|
2056
|
+
type: Input,
|
|
2057
|
+
args: ['auiAutocompleteAutoPatchEnabled']
|
|
2051
2058
|
}] } });
|
|
2052
2059
|
class CustomAutoCompleteDirective extends AutoCompleteDirective {
|
|
2053
2060
|
constructor() {
|
|
@@ -7542,7 +7549,6 @@ class BaseSelect extends CommonFormControl {
|
|
|
7542
7549
|
super(...arguments);
|
|
7543
7550
|
this.filterFn = this._filterFn.bind(this);
|
|
7544
7551
|
this.trackFn = this._trackFn;
|
|
7545
|
-
this.clearFilterOnHide = true;
|
|
7546
7552
|
this.loading = false;
|
|
7547
7553
|
this.placeholder = '';
|
|
7548
7554
|
this.defaultFirstOption = true;
|
|
@@ -7697,9 +7703,7 @@ class BaseSelect extends CommonFormControl {
|
|
|
7697
7703
|
this.optionContent?.detach();
|
|
7698
7704
|
}
|
|
7699
7705
|
this.resetFocusedOption();
|
|
7700
|
-
|
|
7701
|
-
this.filterString = '';
|
|
7702
|
-
}
|
|
7706
|
+
this.filterString = '';
|
|
7703
7707
|
this.hide.emit();
|
|
7704
7708
|
}
|
|
7705
7709
|
onInput(event) {
|
|
@@ -7815,7 +7819,7 @@ class BaseSelect extends CommonFormControl {
|
|
|
7815
7819
|
}
|
|
7816
7820
|
}
|
|
7817
7821
|
BaseSelect.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.8", ngImport: i0, type: BaseSelect, deps: null, target: i0.ɵɵFactoryTarget.Directive });
|
|
7818
|
-
BaseSelect.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "13.3.8", type: BaseSelect, inputs: { size: "size", filterable: "filterable", clearable: "clearable", filterFn: "filterFn", trackFn: "trackFn", labelFn: "labelFn",
|
|
7822
|
+
BaseSelect.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "13.3.8", type: BaseSelect, inputs: { size: "size", filterable: "filterable", clearable: "clearable", filterFn: "filterFn", trackFn: "trackFn", labelFn: "labelFn", allowCreate: "allowCreate", loading: "loading", placeholder: "placeholder", defaultFirstOption: "defaultFirstOption", lazy: "lazy" }, outputs: { filterChange: "filterChange", show: "show", hide: "hide" }, queries: [{ propertyName: "optionContent", first: true, predicate: OptionContentDirective, descendants: true }, { propertyName: "contentOptions", predicate: OptionComponent, descendants: true }], viewQueries: [{ propertyName: "selectRef", first: true, predicate: ["selectRef"], descendants: true, static: true }, { propertyName: "tooltipRef", first: true, predicate: ["tooltipRef"], descendants: true, static: true }, { propertyName: "optionListRef", first: true, predicate: ["optionListRef"], descendants: true }, { propertyName: "inputtingOption", first: true, predicate: ["inputtingOption"], descendants: true }, { propertyName: "customOptions", predicate: OptionComponent, descendants: true }], usesInheritance: true, ngImport: i0 });
|
|
7819
7823
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.8", ngImport: i0, type: BaseSelect, decorators: [{
|
|
7820
7824
|
type: Directive
|
|
7821
7825
|
}], propDecorators: { size: [{
|
|
@@ -7830,8 +7834,6 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.8", ngImpor
|
|
|
7830
7834
|
type: Input
|
|
7831
7835
|
}], labelFn: [{
|
|
7832
7836
|
type: Input
|
|
7833
|
-
}], clearFilterOnHide: [{
|
|
7834
|
-
type: Input
|
|
7835
7837
|
}], allowCreate: [{
|
|
7836
7838
|
type: Input
|
|
7837
7839
|
}], loading: [{
|