zek 19.0.25 → 19.0.26
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/fesm2022/zek.mjs +9 -17
- package/fesm2022/zek.mjs.map +1 -1
- package/lib/modules/select2/select2.d.ts +1 -1
- package/package.json +1 -1
package/fesm2022/zek.mjs
CHANGED
|
@@ -6970,9 +6970,7 @@ class ZekSelect2 extends CoreComponent {
|
|
|
6970
6970
|
// this.dropdown.show();
|
|
6971
6971
|
// }
|
|
6972
6972
|
// let dropdown = document.getElementById(`dropdown-menu-container-${this.elementId}`);
|
|
6973
|
-
// console.log(dropdown);
|
|
6974
6973
|
// if (dropdown) {
|
|
6975
|
-
// console.log(dropdown.classList);
|
|
6976
6974
|
// if (!dropdown.classList.contains('show')) {
|
|
6977
6975
|
// let el = document.getElementById(`input-${this.elementId}`);
|
|
6978
6976
|
// if (el) {
|
|
@@ -6995,12 +6993,12 @@ class ZekSelect2 extends CoreComponent {
|
|
|
6995
6993
|
// }
|
|
6996
6994
|
}
|
|
6997
6995
|
inputUnfocused() {
|
|
6998
|
-
|
|
6999
|
-
|
|
7000
|
-
|
|
7001
|
-
|
|
7002
|
-
|
|
7003
|
-
|
|
6996
|
+
this.setText();
|
|
6997
|
+
}
|
|
6998
|
+
onItemMouseDown(event, item) {
|
|
6999
|
+
// Keep focus on input so blur handler does not run before selection.
|
|
7000
|
+
event.preventDefault();
|
|
7001
|
+
this.selectItem(item);
|
|
7004
7002
|
}
|
|
7005
7003
|
setText() {
|
|
7006
7004
|
if (this._selectedItem === undefined || this._selectedItem === null) {
|
|
@@ -7020,10 +7018,7 @@ class ZekSelect2 extends CoreComponent {
|
|
|
7020
7018
|
this.setText();
|
|
7021
7019
|
//set value
|
|
7022
7020
|
let v;
|
|
7023
|
-
if (
|
|
7024
|
-
v = null;
|
|
7025
|
-
}
|
|
7026
|
-
else if (this.valueField === undefined || this.valueField === null || this.valueField === '') {
|
|
7021
|
+
if (this.valueField === undefined || this.valueField === null || this.valueField === '') {
|
|
7027
7022
|
// this.value = v
|
|
7028
7023
|
v = item;
|
|
7029
7024
|
}
|
|
@@ -7038,15 +7033,12 @@ class ZekSelect2 extends CoreComponent {
|
|
|
7038
7033
|
}
|
|
7039
7034
|
}
|
|
7040
7035
|
}
|
|
7041
|
-
clear() {
|
|
7042
|
-
this.selectItem(null);
|
|
7043
|
-
}
|
|
7044
7036
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.6", ngImport: i0, type: ZekSelect2, deps: null, target: i0.ɵɵFactoryTarget.Component });
|
|
7045
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.0.6", type: ZekSelect2, isStandalone: true, selector: "zek-select2,[zek-select2]", inputs: { disabled: "disabled", data: "data", textField: "textField", valueField: "valueField", placeholder: "placeholder", value: "value" }, outputs: { selectedItemChange: "selectedItemChange", valueChange: "valueChange" }, usesInheritance: true, ngImport: i0, template: "<div class=\"input-group position-relative\" id=\"dropdown-menu-container-{{uniqueId}}\">\r\n <input type=\"text\" class=\"form-control\" placeholder=\"{{placeholder}}\" data-bs-toggle=\"dropdown\"\r\n id=\"input-{{uniqueId}}\"
|
|
7037
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.0.6", type: ZekSelect2, isStandalone: true, selector: "zek-select2,[zek-select2]", inputs: { disabled: "disabled", data: "data", textField: "textField", valueField: "valueField", placeholder: "placeholder", value: "value" }, outputs: { selectedItemChange: "selectedItemChange", valueChange: "valueChange" }, usesInheritance: true, ngImport: i0, template: "<div class=\"input-group position-relative\" id=\"dropdown-menu-container-{{uniqueId}}\">\r\n <input type=\"text\" class=\"form-control\" placeholder=\"{{placeholder}}\" data-bs-toggle=\"dropdown\"\r\n id=\"input-{{uniqueId}}\"\r\n [disabled]=\"disabled\"\r\n [(ngModel)]=\"text\"\r\n (ngModelChange)=\"onTextChange($event)\"\r\n (focus)=\"onFocus($event)\"\r\n (blur)=\"inputUnfocused()\">\r\n <button [disabled]=\"disabled\" class=\"btn btn-outline-secondary dropdown-toggle\" id=\"btn-{{uniqueId}}\" type=\"button\" data-bs-toggle=\"dropdown\" aria-expanded=\"false\" data-bs-reference=\"parent\"></button>\r\n <ul class=\"dropdown-menu dropdown-menu-start w-100 scrollable-menu\" id=\"dropdown-menu-{{uniqueId}}\">\r\n <ng-container *ngIf=\"textField\">\r\n <li *ngFor=\"let entry of filteredData\">\r\n <a href=\"javascript:void(0)\" (mousedown)=\"onItemMouseDown($event, entry)\" class=\"dropdown-item\"\r\n [class.active]=\"entry === selectedItem\">{{entry[textField]}}</a>\r\n </li>\r\n </ng-container>\r\n <ng-container *ngIf=\"!textField\">\r\n <li *ngFor=\"let entry of filteredData\">\r\n <a href=\"javascript:void(0)\" (mousedown)=\"onItemMouseDown($event, entry)\" class=\"dropdown-item\"\r\n [class.active]=\"entry === selectedItem\">{{entry}}</a>\r\n </li>\r\n </ng-container>\r\n </ul>\r\n</div>", styles: [".scrollable-menu{max-height:400px;overflow-y:auto}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i1$2.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i1$2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i2$1.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i2$1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i2$1.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }] });
|
|
7046
7038
|
}
|
|
7047
7039
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.6", ngImport: i0, type: ZekSelect2, decorators: [{
|
|
7048
7040
|
type: Component,
|
|
7049
|
-
args: [{ standalone: true, selector: 'zek-select2,[zek-select2]', imports: [CommonModule, FormsModule], template: "<div class=\"input-group position-relative\" id=\"dropdown-menu-container-{{uniqueId}}\">\r\n <input type=\"text\" class=\"form-control\" placeholder=\"{{placeholder}}\" data-bs-toggle=\"dropdown\"\r\n id=\"input-{{uniqueId}}\"
|
|
7041
|
+
args: [{ standalone: true, selector: 'zek-select2,[zek-select2]', imports: [CommonModule, FormsModule], template: "<div class=\"input-group position-relative\" id=\"dropdown-menu-container-{{uniqueId}}\">\r\n <input type=\"text\" class=\"form-control\" placeholder=\"{{placeholder}}\" data-bs-toggle=\"dropdown\"\r\n id=\"input-{{uniqueId}}\"\r\n [disabled]=\"disabled\"\r\n [(ngModel)]=\"text\"\r\n (ngModelChange)=\"onTextChange($event)\"\r\n (focus)=\"onFocus($event)\"\r\n (blur)=\"inputUnfocused()\">\r\n <button [disabled]=\"disabled\" class=\"btn btn-outline-secondary dropdown-toggle\" id=\"btn-{{uniqueId}}\" type=\"button\" data-bs-toggle=\"dropdown\" aria-expanded=\"false\" data-bs-reference=\"parent\"></button>\r\n <ul class=\"dropdown-menu dropdown-menu-start w-100 scrollable-menu\" id=\"dropdown-menu-{{uniqueId}}\">\r\n <ng-container *ngIf=\"textField\">\r\n <li *ngFor=\"let entry of filteredData\">\r\n <a href=\"javascript:void(0)\" (mousedown)=\"onItemMouseDown($event, entry)\" class=\"dropdown-item\"\r\n [class.active]=\"entry === selectedItem\">{{entry[textField]}}</a>\r\n </li>\r\n </ng-container>\r\n <ng-container *ngIf=\"!textField\">\r\n <li *ngFor=\"let entry of filteredData\">\r\n <a href=\"javascript:void(0)\" (mousedown)=\"onItemMouseDown($event, entry)\" class=\"dropdown-item\"\r\n [class.active]=\"entry === selectedItem\">{{entry}}</a>\r\n </li>\r\n </ng-container>\r\n </ul>\r\n</div>", styles: [".scrollable-menu{max-height:400px;overflow-y:auto}\n"] }]
|
|
7050
7042
|
}], propDecorators: { disabled: [{
|
|
7051
7043
|
type: Input
|
|
7052
7044
|
}], data: [{
|