@eui/ecl 15.0.0-rc.19 → 15.0.0-rc.20
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/assets/i18n-ecl/bg.json +1 -0
- package/assets/i18n-ecl/cs.json +1 -0
- package/assets/i18n-ecl/da.json +1 -0
- package/assets/i18n-ecl/de.json +1 -0
- package/assets/i18n-ecl/el.json +1 -0
- package/assets/i18n-ecl/en.json +1 -0
- package/assets/i18n-ecl/es.json +1 -0
- package/assets/i18n-ecl/et.json +1 -0
- package/assets/i18n-ecl/fi.json +1 -0
- package/assets/i18n-ecl/fr.json +1 -0
- package/assets/i18n-ecl/ga.json +1 -0
- package/assets/i18n-ecl/hr.json +1 -0
- package/assets/i18n-ecl/hu.json +1 -0
- package/assets/i18n-ecl/it.json +1 -0
- package/assets/i18n-ecl/lt.json +1 -0
- package/assets/i18n-ecl/lv.json +1 -0
- package/assets/i18n-ecl/mt.json +1 -0
- package/assets/i18n-ecl/nl.json +1 -0
- package/assets/i18n-ecl/pl.json +1 -0
- package/assets/i18n-ecl/pt.json +1 -0
- package/assets/i18n-ecl/ro.json +1 -0
- package/assets/i18n-ecl/sk.json +1 -0
- package/assets/i18n-ecl/sl.json +1 -0
- package/assets/i18n-ecl/sv.json +1 -0
- package/docs/components/EclMultiselectComponent.html +21 -21
- package/docs/dependencies.html +2 -2
- package/docs/js/search/search_index.js +2 -2
- package/esm2020/lib/components/ecl-multiselect/ecl-multiselect.component.mjs +42 -18
- package/fesm2015/eui-ecl.mjs +41 -17
- package/fesm2015/eui-ecl.mjs.map +1 -1
- package/fesm2020/eui-ecl.mjs +41 -17
- package/fesm2020/eui-ecl.mjs.map +1 -1
- package/lib/components/ecl-multiselect/ecl-multiselect.component.d.ts +8 -4
- package/lib/components/ecl-multiselect/ecl-multiselect.component.d.ts.map +1 -1
- package/package.json +1 -1
package/fesm2020/eui-ecl.mjs
CHANGED
|
@@ -8599,12 +8599,14 @@ class EclMultiselectComponent extends ECLBaseDirective {
|
|
|
8599
8599
|
this.differs = differs;
|
|
8600
8600
|
this.translate = translate;
|
|
8601
8601
|
this.isInvalid = false;
|
|
8602
|
-
this._disabled = false;
|
|
8603
|
-
this.eclSize = 'm';
|
|
8604
8602
|
this.eclChange = new EventEmitter();
|
|
8603
|
+
this.eclSize = 'm';
|
|
8604
|
+
this._disabled = false;
|
|
8605
8605
|
this.multiSelectOptions = [];
|
|
8606
8606
|
this.selectedValues = [];
|
|
8607
8607
|
this.destroy$ = new Subject();
|
|
8608
|
+
this.NO_RESULTS_FOUND_TEXT = 'No results found';
|
|
8609
|
+
this.CLASS_NO_RESULTS_FOUND = 'ecl-select__multiple-no-results';
|
|
8608
8610
|
this.propagateChange = (_) => {
|
|
8609
8611
|
};
|
|
8610
8612
|
this.propagateTouched = () => {
|
|
@@ -8615,6 +8617,11 @@ class EclMultiselectComponent extends ECLBaseDirective {
|
|
|
8615
8617
|
}
|
|
8616
8618
|
this.bindCallbacks();
|
|
8617
8619
|
}
|
|
8620
|
+
get cssClasses() {
|
|
8621
|
+
return [
|
|
8622
|
+
super.getCssClasses('ecl-select'),
|
|
8623
|
+
].join(' ').trim();
|
|
8624
|
+
}
|
|
8618
8625
|
set eclPlaceholder(value) {
|
|
8619
8626
|
this._eclPlaceholder = value;
|
|
8620
8627
|
if (this.multiSelectInput) {
|
|
@@ -8630,11 +8637,6 @@ class EclMultiselectComponent extends ECLBaseDirective {
|
|
|
8630
8637
|
}
|
|
8631
8638
|
}
|
|
8632
8639
|
set disabled(value) { this._disabled = coerceBooleanProperty(value); }
|
|
8633
|
-
get cssClasses() {
|
|
8634
|
-
return [
|
|
8635
|
-
super.getCssClasses('ecl-select'),
|
|
8636
|
-
].join(' ').trim();
|
|
8637
|
-
}
|
|
8638
8640
|
ngOnInit() {
|
|
8639
8641
|
this.hostEl = this.getHostElement();
|
|
8640
8642
|
this.hostParentEl = this.getHostParentElement(this.hostEl);
|
|
@@ -8642,6 +8644,7 @@ class EclMultiselectComponent extends ECLBaseDirective {
|
|
|
8642
8644
|
this.selectIconContainerEl = this.createIconContainer();
|
|
8643
8645
|
this.multiselectWrapper = this.createWrapperMultiselect();
|
|
8644
8646
|
this.multiselectContainer = this.createSelectContainerMultiselect();
|
|
8647
|
+
this.noResultsFound = this.createNoResultsFound();
|
|
8645
8648
|
if (this.hostParentEl != null) {
|
|
8646
8649
|
this.hideOriginalSelectComponent();
|
|
8647
8650
|
this.createHtmlElements();
|
|
@@ -8716,6 +8719,14 @@ class EclMultiselectComponent extends ECLBaseDirective {
|
|
|
8716
8719
|
});
|
|
8717
8720
|
}));
|
|
8718
8721
|
}
|
|
8722
|
+
createNoResultsFound() {
|
|
8723
|
+
const noResultsDiv = document.createElement('div');
|
|
8724
|
+
noResultsDiv.classList.add('ecl-select__multiple-no-results');
|
|
8725
|
+
const textSpan = document.createElement('span');
|
|
8726
|
+
textSpan.innerHTML = this.NO_RESULTS_FOUND_TEXT;
|
|
8727
|
+
noResultsDiv.appendChild(textSpan);
|
|
8728
|
+
return noResultsDiv;
|
|
8729
|
+
}
|
|
8719
8730
|
hideOriginalSelectComponent() {
|
|
8720
8731
|
this.hostParentEl.replaceChild(this.hostWrapperEl, this.hostEl);
|
|
8721
8732
|
this.hostWrapperEl.appendChild(this.hostEl);
|
|
@@ -8917,7 +8928,9 @@ class EclMultiselectComponent extends ECLBaseDirective {
|
|
|
8917
8928
|
}
|
|
8918
8929
|
onSearchOptions(evt) {
|
|
8919
8930
|
const keyword = evt.target.value;
|
|
8931
|
+
let isMatchFound = false;
|
|
8920
8932
|
if (keyword === '') {
|
|
8933
|
+
isMatchFound = true;
|
|
8921
8934
|
this.multiSelectOptions.forEach(item => {
|
|
8922
8935
|
item.style.display = 'flex';
|
|
8923
8936
|
});
|
|
@@ -8927,9 +8940,17 @@ class EclMultiselectComponent extends ECLBaseDirective {
|
|
|
8927
8940
|
item.style.display = 'none';
|
|
8928
8941
|
}
|
|
8929
8942
|
else {
|
|
8943
|
+
isMatchFound = true;
|
|
8930
8944
|
item.style.display = 'flex';
|
|
8931
8945
|
}
|
|
8932
8946
|
});
|
|
8947
|
+
const noResultsFoundExists = this.multiDropdown.lastChild.classList.contains(this.CLASS_NO_RESULTS_FOUND);
|
|
8948
|
+
if (!isMatchFound && !noResultsFoundExists) {
|
|
8949
|
+
this.multiDropdown.appendChild(this.noResultsFound);
|
|
8950
|
+
}
|
|
8951
|
+
else if (isMatchFound && noResultsFoundExists) {
|
|
8952
|
+
this.multiDropdown.removeChild(this.noResultsFound);
|
|
8953
|
+
}
|
|
8933
8954
|
this.handleSelectAllDisableStatus();
|
|
8934
8955
|
}
|
|
8935
8956
|
handleSelectAllDisableStatus() {
|
|
@@ -8948,11 +8969,14 @@ class EclMultiselectComponent extends ECLBaseDirective {
|
|
|
8948
8969
|
this.multiSelectInput.value = null;
|
|
8949
8970
|
}
|
|
8950
8971
|
handleTranslations() {
|
|
8972
|
+
const SELECT_ALL_KEY = 'ecl.multiselect.SELECT-ALL';
|
|
8973
|
+
const NO_RESULTS_FOUND_KEY = 'ecl.multiselect.NO-RESULTS-FOUND';
|
|
8951
8974
|
this.translate
|
|
8952
|
-
.stream(
|
|
8975
|
+
.stream([SELECT_ALL_KEY, NO_RESULTS_FOUND_KEY])
|
|
8953
8976
|
.pipe(takeUntil(this.destroy$)).subscribe((translation) => {
|
|
8977
|
+
this.NO_RESULTS_FOUND_TEXT = translation[NO_RESULTS_FOUND_KEY];
|
|
8954
8978
|
if (this.checkboxLabel) {
|
|
8955
|
-
this.checkboxLabel.lastElementChild.textContent = translation;
|
|
8979
|
+
this.checkboxLabel.lastElementChild.textContent = translation[SELECT_ALL_KEY];
|
|
8956
8980
|
}
|
|
8957
8981
|
});
|
|
8958
8982
|
}
|
|
@@ -9157,7 +9181,7 @@ class EclMultiselectComponent extends ECLBaseDirective {
|
|
|
9157
9181
|
}
|
|
9158
9182
|
}
|
|
9159
9183
|
/** @nocollapse */ EclMultiselectComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.0.0", ngImport: i0, type: EclMultiselectComponent, deps: [{ token: i1$1.NgControl, optional: true, self: true }, { token: i0.ElementRef }, { token: i0.ViewContainerRef }, { token: i0.IterableDiffers }, { token: i2.TranslateService }], target: i0.ɵɵFactoryTarget.Component });
|
|
9160
|
-
/** @nocollapse */ EclMultiselectComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.0.0", type: EclMultiselectComponent, selector: "select[eclMultiselect]", inputs: { isInvalid: "isInvalid", eclPlaceholder: "eclPlaceholder",
|
|
9184
|
+
/** @nocollapse */ EclMultiselectComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.0.0", type: EclMultiselectComponent, selector: "select[eclMultiselect]", inputs: { isInvalid: "isInvalid", eclPlaceholder: "eclPlaceholder", eclSize: "eclSize", disabled: "disabled" }, outputs: { eclChange: "eclChange" }, host: { listeners: { "document:keyup.escape": "onEscapeKey($event)", "document:click": "onKeyUp($event)" }, properties: { "class": "this.cssClasses", "attr.disabled": "this.disabled" } }, queries: [{ propertyName: "eclOptionItems", predicate: EclMultiselectOptionDirective }], usesInheritance: true, ngImport: i0, template: "<ng-content></ng-content>" });
|
|
9161
9185
|
__decorate([
|
|
9162
9186
|
coerceBoolean
|
|
9163
9187
|
], EclMultiselectComponent.prototype, "isInvalid", void 0);
|
|
@@ -9173,20 +9197,20 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.0", ngImpor
|
|
|
9173
9197
|
args: [EclMultiselectOptionDirective]
|
|
9174
9198
|
}], isInvalid: [{
|
|
9175
9199
|
type: Input
|
|
9200
|
+
}], cssClasses: [{
|
|
9201
|
+
type: HostBinding,
|
|
9202
|
+
args: ['class']
|
|
9203
|
+
}], eclChange: [{
|
|
9204
|
+
type: Output
|
|
9176
9205
|
}], eclPlaceholder: [{
|
|
9177
9206
|
type: Input
|
|
9207
|
+
}], eclSize: [{
|
|
9208
|
+
type: Input
|
|
9178
9209
|
}], disabled: [{
|
|
9179
9210
|
type: Input
|
|
9180
9211
|
}, {
|
|
9181
9212
|
type: HostBinding,
|
|
9182
9213
|
args: ['attr.disabled']
|
|
9183
|
-
}], eclSize: [{
|
|
9184
|
-
type: Input
|
|
9185
|
-
}], cssClasses: [{
|
|
9186
|
-
type: HostBinding,
|
|
9187
|
-
args: ['class']
|
|
9188
|
-
}], eclChange: [{
|
|
9189
|
-
type: Output
|
|
9190
9214
|
}], onEscapeKey: [{
|
|
9191
9215
|
type: HostListener,
|
|
9192
9216
|
args: ['document:keyup.escape', ['$event']]
|