@indigina/kendo 1.2.45 → 1.2.46
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/esm2022/lib/widgets/entity-edit/dropdowns/object-dropdown/object-dropdown.component.mjs +12 -3
- package/fesm2022/indigina-kendo.mjs +10 -2
- package/fesm2022/indigina-kendo.mjs.map +1 -1
- package/lib/widgets/entity-edit/dropdowns/object-dropdown/object-dropdown.component.d.ts +5 -1
- package/package.json +1 -1
package/esm2022/lib/widgets/entity-edit/dropdowns/object-dropdown/object-dropdown.component.mjs
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { ChangeDetectionStrategy, Component, EventEmitter, Input, Output, } from '@angular/core';
|
|
2
2
|
import { FieldComponent } from '../../../../angular/forms/widgets/field/field.component';
|
|
3
3
|
import { ControlContainer, FormGroupDirective, } from '@angular/forms';
|
|
4
|
+
import { BehaviorSubject } from 'rxjs';
|
|
4
5
|
import * as i0 from "@angular/core";
|
|
5
6
|
import * as i1 from "@angular/forms";
|
|
6
7
|
import * as i2 from "@ngx-translate/core";
|
|
@@ -21,6 +22,7 @@ export class ObjectDropdownComponent extends FieldComponent {
|
|
|
21
22
|
}
|
|
22
23
|
ngOnInit() {
|
|
23
24
|
super.ngOnInit();
|
|
25
|
+
this.setInputData();
|
|
24
26
|
this.writeSelectedItemIfExists(this.selectedItem);
|
|
25
27
|
this.setDefaultItem();
|
|
26
28
|
}
|
|
@@ -32,8 +34,13 @@ export class ObjectDropdownComponent extends FieldComponent {
|
|
|
32
34
|
}
|
|
33
35
|
ngOnChanges() {
|
|
34
36
|
super.ngOnChanges();
|
|
37
|
+
this.setInputData();
|
|
35
38
|
this.writeSelectedItemIfExists(this.selectedItem);
|
|
36
39
|
}
|
|
40
|
+
setInputData() {
|
|
41
|
+
let dataSubject = new BehaviorSubject(this.data);
|
|
42
|
+
this.data$ = dataSubject.asObservable();
|
|
43
|
+
}
|
|
37
44
|
onValueChange(event) {
|
|
38
45
|
if (event !== null) {
|
|
39
46
|
const entity = this.getEntityByValue(event);
|
|
@@ -65,7 +72,7 @@ export class ObjectDropdownComponent extends FieldComponent {
|
|
|
65
72
|
this.firstLoad = false;
|
|
66
73
|
}
|
|
67
74
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.0.6", ngImport: i0, type: ObjectDropdownComponent, deps: [{ token: i1.FormGroupDirective }, { token: i0.ElementRef }, { token: i2.TranslateService }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
68
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "17.0.6", type: ObjectDropdownComponent, selector: "object-dropdown", inputs: { fieldName: "fieldName", labelKey: "labelKey", data: "data", selectedItem: "selectedItem", defaultName: "defaultName" }, outputs: { selectedChange: "selectedChange" }, usesInheritance: true, usesOnChanges: true, ngImport: i0, template: "<div class=\"form-group\">\n <label\n for=\"{{ '_' + fieldName }}\"\n class=\"col-md-3 control-label\"\n translate=\"{{ labelKey }}\"\n ></label>\n <div class=\"col-md-9\" *ngIf=\"control\">\n <kendo-dropdownlist\n id=\"{{ '_' + fieldName }}\"\n [formControl]=\"control\"\n [data]=\"data\"\n [textField]=\"'description'\"\n [valueField]=\"'value'\"\n [valuePrimitive]=\"true\"\n [defaultItem]=\"defaultItem\"\n (valueChange)=\"onValueChange($event)\"\n >\n </kendo-dropdownlist>\n\n <div class=\"bg-danger\" *ngIf=\"control.invalid && control.touched\">\n <span *ngIf=\"control.errors['required']\">{{\n \"Required\" | translate : { param0: labelKey | translate }\n }}</span>\n <span *ngIf=\"control.errors['serverErrorMsg']\">{{\n control.errors[\"serverErrorMsg\"]\n }}</span>\n </div>\n </div>\n</div>\n", dependencies: [{ kind: "directive", type: i3.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i2.TranslateDirective, selector: "[translate],[ngx-translate]", inputs: ["translate", "translateParams"] }, { kind: "component", type: i4.DropDownListComponent, selector: "kendo-dropdownlist", inputs: ["customIconClass", "showStickyHeader", "icon", "svgIcon", "loading", "data", "value", "textField", "valueField", "adaptiveMode", "title", "subtitle", "popupSettings", "listHeight", "defaultItem", "disabled", "itemDisabled", "readonly", "filterable", "virtual", "ignoreCase", "delay", "valuePrimitive", "tabindex", "tabIndex", "size", "rounded", "fillMode", "leftRightArrowsNavigation", "id"], outputs: ["valueChange", "filterChange", "selectionChange", "open", "opened", "close", "closed", "focus", "blur"], exportAs: ["kendoDropDownList"] }, { kind: "directive", type: i1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1.FormControlDirective, selector: "[formControl]", inputs: ["formControl", "disabled", "ngModel"], outputs: ["ngModelChange"], exportAs: ["ngForm"] }, { kind: "pipe", type: i2.TranslatePipe, name: "translate" }], viewProviders: [
|
|
75
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "17.0.6", type: ObjectDropdownComponent, selector: "object-dropdown", inputs: { fieldName: "fieldName", labelKey: "labelKey", data: "data", selectedItem: "selectedItem", defaultName: "defaultName", rebind: "rebind" }, outputs: { selectedChange: "selectedChange" }, usesInheritance: true, usesOnChanges: true, ngImport: i0, template: "<div class=\"form-group\">\n <label\n for=\"{{ '_' + fieldName }}\"\n class=\"col-md-3 control-label\"\n translate=\"{{ labelKey }}\"\n ></label>\n <div class=\"col-md-9\" *ngIf=\"control\">\n <kendo-dropdownlist\n id=\"{{ '_' + fieldName }}\"\n [formControl]=\"control\"\n [data]=\"data$ | async\"\n [textField]=\"'description'\"\n [valueField]=\"'value'\"\n [valuePrimitive]=\"true\"\n [defaultItem]=\"defaultItem\"\n (valueChange)=\"onValueChange($event)\"\n >\n </kendo-dropdownlist>\n\n <div class=\"bg-danger\" *ngIf=\"control.invalid && control.touched\">\n <span *ngIf=\"control.errors['required']\">{{\n \"Required\" | translate : { param0: labelKey | translate }\n }}</span>\n <span *ngIf=\"control.errors['serverErrorMsg']\">{{\n control.errors[\"serverErrorMsg\"]\n }}</span>\n </div>\n </div>\n</div>\n", dependencies: [{ kind: "directive", type: i3.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i2.TranslateDirective, selector: "[translate],[ngx-translate]", inputs: ["translate", "translateParams"] }, { kind: "component", type: i4.DropDownListComponent, selector: "kendo-dropdownlist", inputs: ["customIconClass", "showStickyHeader", "icon", "svgIcon", "loading", "data", "value", "textField", "valueField", "adaptiveMode", "title", "subtitle", "popupSettings", "listHeight", "defaultItem", "disabled", "itemDisabled", "readonly", "filterable", "virtual", "ignoreCase", "delay", "valuePrimitive", "tabindex", "tabIndex", "size", "rounded", "fillMode", "leftRightArrowsNavigation", "id"], outputs: ["valueChange", "filterChange", "selectionChange", "open", "opened", "close", "closed", "focus", "blur"], exportAs: ["kendoDropDownList"] }, { kind: "directive", type: i1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1.FormControlDirective, selector: "[formControl]", inputs: ["formControl", "disabled", "ngModel"], outputs: ["ngModelChange"], exportAs: ["ngForm"] }, { kind: "pipe", type: i3.AsyncPipe, name: "async" }, { kind: "pipe", type: i2.TranslatePipe, name: "translate" }], viewProviders: [
|
|
69
76
|
{ provide: ControlContainer, useExisting: FormGroupDirective },
|
|
70
77
|
], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
71
78
|
}
|
|
@@ -73,7 +80,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.0.6", ngImpor
|
|
|
73
80
|
type: Component,
|
|
74
81
|
args: [{ selector: 'object-dropdown', viewProviders: [
|
|
75
82
|
{ provide: ControlContainer, useExisting: FormGroupDirective },
|
|
76
|
-
], changeDetection: ChangeDetectionStrategy.OnPush, template: "<div class=\"form-group\">\n <label\n for=\"{{ '_' + fieldName }}\"\n class=\"col-md-3 control-label\"\n translate=\"{{ labelKey }}\"\n ></label>\n <div class=\"col-md-9\" *ngIf=\"control\">\n <kendo-dropdownlist\n id=\"{{ '_' + fieldName }}\"\n [formControl]=\"control\"\n [data]=\"data\"\n [textField]=\"'description'\"\n [valueField]=\"'value'\"\n [valuePrimitive]=\"true\"\n [defaultItem]=\"defaultItem\"\n (valueChange)=\"onValueChange($event)\"\n >\n </kendo-dropdownlist>\n\n <div class=\"bg-danger\" *ngIf=\"control.invalid && control.touched\">\n <span *ngIf=\"control.errors['required']\">{{\n \"Required\" | translate : { param0: labelKey | translate }\n }}</span>\n <span *ngIf=\"control.errors['serverErrorMsg']\">{{\n control.errors[\"serverErrorMsg\"]\n }}</span>\n </div>\n </div>\n</div>\n" }]
|
|
83
|
+
], changeDetection: ChangeDetectionStrategy.OnPush, template: "<div class=\"form-group\">\n <label\n for=\"{{ '_' + fieldName }}\"\n class=\"col-md-3 control-label\"\n translate=\"{{ labelKey }}\"\n ></label>\n <div class=\"col-md-9\" *ngIf=\"control\">\n <kendo-dropdownlist\n id=\"{{ '_' + fieldName }}\"\n [formControl]=\"control\"\n [data]=\"data$ | async\"\n [textField]=\"'description'\"\n [valueField]=\"'value'\"\n [valuePrimitive]=\"true\"\n [defaultItem]=\"defaultItem\"\n (valueChange)=\"onValueChange($event)\"\n >\n </kendo-dropdownlist>\n\n <div class=\"bg-danger\" *ngIf=\"control.invalid && control.touched\">\n <span *ngIf=\"control.errors['required']\">{{\n \"Required\" | translate : { param0: labelKey | translate }\n }}</span>\n <span *ngIf=\"control.errors['serverErrorMsg']\">{{\n control.errors[\"serverErrorMsg\"]\n }}</span>\n </div>\n </div>\n</div>\n" }]
|
|
77
84
|
}], ctorParameters: () => [{ type: i1.FormGroupDirective }, { type: i0.ElementRef }, { type: i2.TranslateService }], propDecorators: { fieldName: [{
|
|
78
85
|
type: Input
|
|
79
86
|
}], labelKey: [{
|
|
@@ -84,7 +91,9 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.0.6", ngImpor
|
|
|
84
91
|
type: Input
|
|
85
92
|
}], defaultName: [{
|
|
86
93
|
type: Input
|
|
94
|
+
}], rebind: [{
|
|
95
|
+
type: Input
|
|
87
96
|
}], selectedChange: [{
|
|
88
97
|
type: Output
|
|
89
98
|
}] } });
|
|
90
|
-
//# sourceMappingURL=data:application/json;base64,
|
|
99
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoib2JqZWN0LWRyb3Bkb3duLmNvbXBvbmVudC5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uLy4uLy4uLy4uLy4uL3Byb2plY3RzL2tlbmRvL3NyYy9saWIvd2lkZ2V0cy9lbnRpdHktZWRpdC9kcm9wZG93bnMvb2JqZWN0LWRyb3Bkb3duL29iamVjdC1kcm9wZG93bi5jb21wb25lbnQudHMiLCIuLi8uLi8uLi8uLi8uLi8uLi8uLi8uLi9wcm9qZWN0cy9rZW5kby9zcmMvbGliL3dpZGdldHMvZW50aXR5LWVkaXQvZHJvcGRvd25zL29iamVjdC1kcm9wZG93bi9vYmplY3QtZHJvcGRvd24uY29tcG9uZW50Lmh0bWwiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUEsT0FBTyxFQUNMLHVCQUF1QixFQUN2QixTQUFTLEVBRVQsWUFBWSxFQUNaLEtBQUssRUFDTCxNQUFNLEdBQ1AsTUFBTSxlQUFlLENBQUM7QUFDdkIsT0FBTyxFQUFFLGNBQWMsRUFBRSxNQUFNLHlEQUF5RCxDQUFDO0FBQ3pGLE9BQU8sRUFFTCxnQkFBZ0IsRUFDaEIsa0JBQWtCLEdBQ25CLE1BQU0sZ0JBQWdCLENBQUM7QUFHeEIsT0FBTyxFQUFFLGVBQWUsRUFBYyxNQUFNLE1BQU0sQ0FBQzs7Ozs7O0FBRW5ELE1BQU0sV0FBVyxHQUFXLGNBQWMsQ0FBQztBQVUzQyxNQUFNLE9BQU8sdUJBQXdCLFNBQVEsY0FB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biAgICA8a2VuZG8tZHJvcGRvd25saXN0XG4gICAgICBpZD1cInt7ICdfJyArIGZpZWxkTmFtZSB9fVwiXG4gICAgICBbZm9ybUNvbnRyb2xdPVwiY29udHJvbFwiXG4gICAgICBbZGF0YV09XCJkYXRhJCB8IGFzeW5jXCJcbiAgICAgIFt0ZXh0RmllbGRdPVwiJ2Rlc2NyaXB0aW9uJ1wiXG4gICAgICBbdmFsdWVGaWVsZF09XCIndmFsdWUnXCJcbiAgICAgIFt2YWx1ZVByaW1pdGl2ZV09XCJ0cnVlXCJcbiAgICAgIFtkZWZhdWx0SXRlbV09XCJkZWZhdWx0SXRlbVwiXG4gICAgICAodmFsdWVDaGFuZ2UpPVwib25WYWx1ZUNoYW5nZSgkZXZlbnQpXCJcbiAgICA+XG4gICAgPC9rZW5kby1kcm9wZG93bmxpc3Q+XG5cbiAgICA8ZGl2IGNsYXNzPVwiYmctZGFuZ2VyXCIgKm5nSWY9XCJjb250cm9sLmludmFsaWQgJiYgY29udHJvbC50b3VjaGVkXCI+XG4gICAgICA8c3BhbiAqbmdJZj1cImNvbnRyb2wuZXJyb3JzWydyZXF1aXJlZCddXCI+e3tcbiAgICAgICAgXCJSZXF1aXJlZFwiIHwgdHJhbnNsYXRlIDogeyBwYXJhbTA6IGxhYmVsS2V5IHwgdHJhbnNsYXRlIH1cbiAgICAgIH19PC9zcGFuPlxuICAgICAgPHNwYW4gKm5nSWY9XCJjb250cm9sLmVycm9yc1snc2VydmVyRXJyb3JNc2cnXVwiPnt7XG4gICAgICAgIGNvbnRyb2wuZXJyb3JzW1wic2VydmVyRXJyb3JNc2dcIl1cbiAgICAgIH19PC9zcGFuPlxuICAgIDwvZGl2PlxuICA8L2Rpdj5cbjwvZGl2PlxuIl19
|
|
@@ -3826,6 +3826,7 @@ class ObjectDropdownComponent extends FieldComponent {
|
|
|
3826
3826
|
}
|
|
3827
3827
|
ngOnInit() {
|
|
3828
3828
|
super.ngOnInit();
|
|
3829
|
+
this.setInputData();
|
|
3829
3830
|
this.writeSelectedItemIfExists(this.selectedItem);
|
|
3830
3831
|
this.setDefaultItem();
|
|
3831
3832
|
}
|
|
@@ -3837,8 +3838,13 @@ class ObjectDropdownComponent extends FieldComponent {
|
|
|
3837
3838
|
}
|
|
3838
3839
|
ngOnChanges() {
|
|
3839
3840
|
super.ngOnChanges();
|
|
3841
|
+
this.setInputData();
|
|
3840
3842
|
this.writeSelectedItemIfExists(this.selectedItem);
|
|
3841
3843
|
}
|
|
3844
|
+
setInputData() {
|
|
3845
|
+
let dataSubject = new BehaviorSubject(this.data);
|
|
3846
|
+
this.data$ = dataSubject.asObservable();
|
|
3847
|
+
}
|
|
3842
3848
|
onValueChange(event) {
|
|
3843
3849
|
if (event !== null) {
|
|
3844
3850
|
const entity = this.getEntityByValue(event);
|
|
@@ -3870,7 +3876,7 @@ class ObjectDropdownComponent extends FieldComponent {
|
|
|
3870
3876
|
this.firstLoad = false;
|
|
3871
3877
|
}
|
|
3872
3878
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.0.6", ngImport: i0, type: ObjectDropdownComponent, deps: [{ token: i1$4.FormGroupDirective }, { token: i0.ElementRef }, { token: i1$1.TranslateService }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
3873
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "17.0.6", type: ObjectDropdownComponent, selector: "object-dropdown", inputs: { fieldName: "fieldName", labelKey: "labelKey", data: "data", selectedItem: "selectedItem", defaultName: "defaultName" }, outputs: { selectedChange: "selectedChange" }, usesInheritance: true, usesOnChanges: true, ngImport: i0, template: "<div class=\"form-group\">\n <label\n for=\"{{ '_' + fieldName }}\"\n class=\"col-md-3 control-label\"\n translate=\"{{ labelKey }}\"\n ></label>\n <div class=\"col-md-9\" *ngIf=\"control\">\n <kendo-dropdownlist\n id=\"{{ '_' + fieldName }}\"\n [formControl]=\"control\"\n [data]=\"data\"\n [textField]=\"'description'\"\n [valueField]=\"'value'\"\n [valuePrimitive]=\"true\"\n [defaultItem]=\"defaultItem\"\n (valueChange)=\"onValueChange($event)\"\n >\n </kendo-dropdownlist>\n\n <div class=\"bg-danger\" *ngIf=\"control.invalid && control.touched\">\n <span *ngIf=\"control.errors['required']\">{{\n \"Required\" | translate : { param0: labelKey | translate }\n }}</span>\n <span *ngIf=\"control.errors['serverErrorMsg']\">{{\n control.errors[\"serverErrorMsg\"]\n }}</span>\n </div>\n </div>\n</div>\n", dependencies: [{ kind: "directive", type: i2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i1$1.TranslateDirective, selector: "[translate],[ngx-translate]", inputs: ["translate", "translateParams"] }, { kind: "component", type: i4$2.DropDownListComponent, selector: "kendo-dropdownlist", inputs: ["customIconClass", "showStickyHeader", "icon", "svgIcon", "loading", "data", "value", "textField", "valueField", "adaptiveMode", "title", "subtitle", "popupSettings", "listHeight", "defaultItem", "disabled", "itemDisabled", "readonly", "filterable", "virtual", "ignoreCase", "delay", "valuePrimitive", "tabindex", "tabIndex", "size", "rounded", "fillMode", "leftRightArrowsNavigation", "id"], outputs: ["valueChange", "filterChange", "selectionChange", "open", "opened", "close", "closed", "focus", "blur"], exportAs: ["kendoDropDownList"] }, { kind: "directive", type: i1$4.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1$4.FormControlDirective, selector: "[formControl]", inputs: ["formControl", "disabled", "ngModel"], outputs: ["ngModelChange"], exportAs: ["ngForm"] }, { kind: "pipe", type: i1$1.TranslatePipe, name: "translate" }], viewProviders: [
|
|
3879
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "17.0.6", type: ObjectDropdownComponent, selector: "object-dropdown", inputs: { fieldName: "fieldName", labelKey: "labelKey", data: "data", selectedItem: "selectedItem", defaultName: "defaultName", rebind: "rebind" }, outputs: { selectedChange: "selectedChange" }, usesInheritance: true, usesOnChanges: true, ngImport: i0, template: "<div class=\"form-group\">\n <label\n for=\"{{ '_' + fieldName }}\"\n class=\"col-md-3 control-label\"\n translate=\"{{ labelKey }}\"\n ></label>\n <div class=\"col-md-9\" *ngIf=\"control\">\n <kendo-dropdownlist\n id=\"{{ '_' + fieldName }}\"\n [formControl]=\"control\"\n [data]=\"data$ | async\"\n [textField]=\"'description'\"\n [valueField]=\"'value'\"\n [valuePrimitive]=\"true\"\n [defaultItem]=\"defaultItem\"\n (valueChange)=\"onValueChange($event)\"\n >\n </kendo-dropdownlist>\n\n <div class=\"bg-danger\" *ngIf=\"control.invalid && control.touched\">\n <span *ngIf=\"control.errors['required']\">{{\n \"Required\" | translate : { param0: labelKey | translate }\n }}</span>\n <span *ngIf=\"control.errors['serverErrorMsg']\">{{\n control.errors[\"serverErrorMsg\"]\n }}</span>\n </div>\n </div>\n</div>\n", dependencies: [{ kind: "directive", type: i2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i1$1.TranslateDirective, selector: "[translate],[ngx-translate]", inputs: ["translate", "translateParams"] }, { kind: "component", type: i4$2.DropDownListComponent, selector: "kendo-dropdownlist", inputs: ["customIconClass", "showStickyHeader", "icon", "svgIcon", "loading", "data", "value", "textField", "valueField", "adaptiveMode", "title", "subtitle", "popupSettings", "listHeight", "defaultItem", "disabled", "itemDisabled", "readonly", "filterable", "virtual", "ignoreCase", "delay", "valuePrimitive", "tabindex", "tabIndex", "size", "rounded", "fillMode", "leftRightArrowsNavigation", "id"], outputs: ["valueChange", "filterChange", "selectionChange", "open", "opened", "close", "closed", "focus", "blur"], exportAs: ["kendoDropDownList"] }, { kind: "directive", type: i1$4.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1$4.FormControlDirective, selector: "[formControl]", inputs: ["formControl", "disabled", "ngModel"], outputs: ["ngModelChange"], exportAs: ["ngForm"] }, { kind: "pipe", type: i2.AsyncPipe, name: "async" }, { kind: "pipe", type: i1$1.TranslatePipe, name: "translate" }], viewProviders: [
|
|
3874
3880
|
{ provide: ControlContainer, useExisting: FormGroupDirective },
|
|
3875
3881
|
], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
3876
3882
|
}
|
|
@@ -3878,7 +3884,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.0.6", ngImpor
|
|
|
3878
3884
|
type: Component,
|
|
3879
3885
|
args: [{ selector: 'object-dropdown', viewProviders: [
|
|
3880
3886
|
{ provide: ControlContainer, useExisting: FormGroupDirective },
|
|
3881
|
-
], changeDetection: ChangeDetectionStrategy.OnPush, template: "<div class=\"form-group\">\n <label\n for=\"{{ '_' + fieldName }}\"\n class=\"col-md-3 control-label\"\n translate=\"{{ labelKey }}\"\n ></label>\n <div class=\"col-md-9\" *ngIf=\"control\">\n <kendo-dropdownlist\n id=\"{{ '_' + fieldName }}\"\n [formControl]=\"control\"\n [data]=\"data\"\n [textField]=\"'description'\"\n [valueField]=\"'value'\"\n [valuePrimitive]=\"true\"\n [defaultItem]=\"defaultItem\"\n (valueChange)=\"onValueChange($event)\"\n >\n </kendo-dropdownlist>\n\n <div class=\"bg-danger\" *ngIf=\"control.invalid && control.touched\">\n <span *ngIf=\"control.errors['required']\">{{\n \"Required\" | translate : { param0: labelKey | translate }\n }}</span>\n <span *ngIf=\"control.errors['serverErrorMsg']\">{{\n control.errors[\"serverErrorMsg\"]\n }}</span>\n </div>\n </div>\n</div>\n" }]
|
|
3887
|
+
], changeDetection: ChangeDetectionStrategy.OnPush, template: "<div class=\"form-group\">\n <label\n for=\"{{ '_' + fieldName }}\"\n class=\"col-md-3 control-label\"\n translate=\"{{ labelKey }}\"\n ></label>\n <div class=\"col-md-9\" *ngIf=\"control\">\n <kendo-dropdownlist\n id=\"{{ '_' + fieldName }}\"\n [formControl]=\"control\"\n [data]=\"data$ | async\"\n [textField]=\"'description'\"\n [valueField]=\"'value'\"\n [valuePrimitive]=\"true\"\n [defaultItem]=\"defaultItem\"\n (valueChange)=\"onValueChange($event)\"\n >\n </kendo-dropdownlist>\n\n <div class=\"bg-danger\" *ngIf=\"control.invalid && control.touched\">\n <span *ngIf=\"control.errors['required']\">{{\n \"Required\" | translate : { param0: labelKey | translate }\n }}</span>\n <span *ngIf=\"control.errors['serverErrorMsg']\">{{\n control.errors[\"serverErrorMsg\"]\n }}</span>\n </div>\n </div>\n</div>\n" }]
|
|
3882
3888
|
}], ctorParameters: () => [{ type: i1$4.FormGroupDirective }, { type: i0.ElementRef }, { type: i1$1.TranslateService }], propDecorators: { fieldName: [{
|
|
3883
3889
|
type: Input
|
|
3884
3890
|
}], labelKey: [{
|
|
@@ -3889,6 +3895,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.0.6", ngImpor
|
|
|
3889
3895
|
type: Input
|
|
3890
3896
|
}], defaultName: [{
|
|
3891
3897
|
type: Input
|
|
3898
|
+
}], rebind: [{
|
|
3899
|
+
type: Input
|
|
3892
3900
|
}], selectedChange: [{
|
|
3893
3901
|
type: Output
|
|
3894
3902
|
}] } });
|