@tetacom/ng-components 1.4.9 → 1.4.11
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/component/modal/modal.module.d.ts +1 -1
- package/esm2022/component/file-upload/file-upload-area/file-upload-area.component.mjs +3 -3
- package/esm2022/component/modal/dialog/dialog.component.mjs +3 -3
- package/esm2022/component/modal/modal.module.mjs +2 -2
- package/esm2022/component/property-grid/property-grid/property-grid-group/property-grid-group.component.mjs +4 -4
- package/esm2022/component/property-grid/property-grid/property-grid-item/property-grid-item.component.mjs +9 -7
- package/esm2022/component/property-grid/property-grid/property-grid.component.mjs +8 -6
- package/esm2022/pipe/date-pipe/teta-date.pipe.mjs +3 -3
- package/fesm2022/tetacom-ng-components.mjs +14 -10
- package/fesm2022/tetacom-ng-components.mjs.map +1 -1
- package/package.json +1 -1
- package/pipe/date-pipe/teta-date.pipe.d.ts +1 -1
|
@@ -16,8 +16,8 @@ import dayjs from 'dayjs';
|
|
|
16
16
|
import * as i4 from '@maskito/angular';
|
|
17
17
|
import { MaskitoModule } from '@maskito/angular';
|
|
18
18
|
import { trigger, transition, style, animate } from '@angular/animations';
|
|
19
|
-
import * as i1$2 from '@
|
|
20
|
-
import { TranslocoModule, TRANSLOCO_SCOPE, TranslocoService } from '@
|
|
19
|
+
import * as i1$2 from '@jsverse/transloco';
|
|
20
|
+
import { TranslocoModule, TRANSLOCO_SCOPE, TranslocoService } from '@jsverse/transloco';
|
|
21
21
|
import { CdkVirtualScrollViewport, CdkFixedSizeVirtualScroll, CdkVirtualForOf } from '@angular/cdk/scrolling';
|
|
22
22
|
import objectHash from 'object-hash';
|
|
23
23
|
import { coerceBooleanProperty } from '@angular/cdk/coercion';
|
|
@@ -6174,7 +6174,9 @@ class PropertyGridItemComponent {
|
|
|
6174
6174
|
}
|
|
6175
6175
|
ngOnChanges(changes) {
|
|
6176
6176
|
if (this.column() && this.item()) {
|
|
6177
|
-
this.formGroup.
|
|
6177
|
+
if (!this.formGroup.get(this.column().name)) {
|
|
6178
|
+
this.formGroup.setControl(this.column().name, FormsUtil.initControlFromColumn(this.column(), this.item()));
|
|
6179
|
+
}
|
|
6178
6180
|
this._formSub?.unsubscribe();
|
|
6179
6181
|
this._formSub = this.formGroup?.controls[this.column().name]?.valueChanges
|
|
6180
6182
|
.pipe(takeWhile(() => this._alive))
|
|
@@ -6187,7 +6189,7 @@ class PropertyGridItemComponent {
|
|
|
6187
6189
|
}
|
|
6188
6190
|
}
|
|
6189
6191
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.1", ngImport: i0, type: PropertyGridItemComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
6190
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "18.2.1", type: PropertyGridItemComponent, isStandalone: true, selector: "teta-property-grid-item", inputs: { column: { classPropertyName: "column", publicName: "column", isSignal: true, isRequired: false, transformFunction: null }, hideNonEditable: { classPropertyName: "hideNonEditable", publicName: "hideNonEditable", isSignal: true, isRequired: false, transformFunction: null }, dict: { classPropertyName: "dict", publicName: "dict", isSignal: true, isRequired: false, transformFunction: null }, decimalPart: { classPropertyName: "decimalPart", publicName: "decimalPart", isSignal: true, isRequired: false, transformFunction: null }, item: { classPropertyName: "item", publicName: "item", isSignal: true, isRequired: false, transformFunction: null }, itemTemplates: { classPropertyName: "itemTemplates", publicName: "itemTemplates", isSignal: true, isRequired: false, transformFunction: null }, horizontal: { classPropertyName: "horizontal", publicName: "horizontal", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { controlValueChange: "controlValueChange" }, usesOnChanges: true, ngImport: i0, template: "@if (editable() || !hideNonEditable()) {\n <teta-input\n [label]=\"caption()\"\n [hint]=\"column().hint\"\n [formGroup]=\"formGroup\"\n [horizontal]=\"horizontal()\"\n [required]=\"column().required\">\n @if (template()) {\n <ng-container\n *ngTemplateOutlet=\"template().template; context: { $implicit: formGroup?.get(column().name) }\"></ng-container>\n } @else {\n @if (formGroup?.get(column().name)) {\n @switch (column().filterType) {\n @case (filterTypeEnum.list) {\n <teta-select\n class=\"row_auto\"\n [tetaDisableControl]=\"!editable()\"\n [searchRef]=\"getDict()?.length > 10 ? 'name' : ''\"\n [allowNull]=\"!column().required\"\n [appendToBody]=\"true\"\n [invalid]=\"controlIsInvalid(column().name)\"\n [formControlName]=\"column().name\"\n [options]=\"getDict()\"\n [valueRef]=\"'id'\"\n [textRef]=\"'name'\"\n [multiple]=\"false\"></teta-select>\n }\n @case (filterTypeEnum.date) {\n <teta-date-picker\n class=\"row_auto\"\n [appendToBody]=\"true\"\n [tetaDisableControl]=\"!editable()\"\n [invalid]=\"controlIsInvalid(column().name)\"\n [formControlName]=\"column().name\"></teta-date-picker>\n }\n @case (filterTypeEnum.boolean) {\n <teta-toggle [tetaDisableControl]=\"!editable()\" [formControlName]=\"column().name\">\n {{ column().caption }}\n </teta-toggle>\n }\n @default {\n <teta-text-field\n class=\"row_auto\"\n [tetaDisableControl]=\"!editable()\"\n [decimalPart]=\"column().filterType === filterTypeEnum.number ? decimalPart() : null\"\n [onlyNumber]=\"column().filterType === filterTypeEnum.number\"\n [placeholder]=\"column().caption\"\n [invalid]=\"controlIsInvalid(column().name)\"\n [formControlName]=\"column().name\"\n ></teta-text-field>\n }\n }\n }\n }\n @if (controlIsInvalid(column().name)) {\n <div ngProjectAs=\"message\" class=\"color-red-50\">\n {{ getError(column()) }}\n </div>\n }\n </teta-input>\n}\n", styles: [""], dependencies: [{ kind: "component", type: InputComponent, selector: "teta-input", inputs: ["label", "hint", "viewType", "horizontal", "required"] }, { kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i2.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i2.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "directive", type: i2.FormControlName, selector: "[formControlName]", inputs: ["formControlName", "disabled", "ngModel"], outputs: ["ngModelChange"] }, { kind: "directive", type: NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "component", type: SelectComponent, selector: "teta-select", inputs: ["multiple", "options", "invalid", "align", "verticalAlign", "autoClose", "autoCloseIgnore", "disabled", "itemSize", "virtual", "icon", "placeholder", "appendToBody", "allowNull", "viewType", "notFoundText", "valueRef", "textRef", "searchRef"] }, { kind: "component", type: DatePickerComponent, selector: "teta-date-picker", inputs: ["date", "showTime", "minDate", "maxDate", "invalid", "disabled", "align", "verticalAlign", "viewType", "appendToBody", "backdrop", "allowNull", "firstDayOfWeek", "disabledDates", "disabledPeriods", "disabledDays", "minYearDate", "maxYearDate"], outputs: ["selectDate"] }, { kind: "component", type: ToggleComponent, selector: "teta-toggle", inputs: ["palette", "noLabel", "disabled"] }, { kind: "component", type: TextFieldComponent, selector: "teta-text-field", inputs: ["placeholder", "leftIconName", "disabled", "onlyNumber", "decimalPart", "invalid"] }, { kind: "directive", type: DisableControlDirective, selector: "[tetaDisableControl]", inputs: ["tetaDisableControl"] }], viewProviders: [FormsUtil.formProvider] }); }
|
|
6192
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "18.2.1", type: PropertyGridItemComponent, isStandalone: true, selector: "teta-property-grid-item", inputs: { column: { classPropertyName: "column", publicName: "column", isSignal: true, isRequired: false, transformFunction: null }, hideNonEditable: { classPropertyName: "hideNonEditable", publicName: "hideNonEditable", isSignal: true, isRequired: false, transformFunction: null }, dict: { classPropertyName: "dict", publicName: "dict", isSignal: true, isRequired: false, transformFunction: null }, decimalPart: { classPropertyName: "decimalPart", publicName: "decimalPart", isSignal: true, isRequired: false, transformFunction: null }, item: { classPropertyName: "item", publicName: "item", isSignal: true, isRequired: false, transformFunction: null }, itemTemplates: { classPropertyName: "itemTemplates", publicName: "itemTemplates", isSignal: true, isRequired: false, transformFunction: null }, horizontal: { classPropertyName: "horizontal", publicName: "horizontal", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { controlValueChange: "controlValueChange" }, usesOnChanges: true, ngImport: i0, template: "@if (editable() || !hideNonEditable()) {\n <teta-input\n [label]=\"caption()\"\n [hint]=\"column().hint\"\n [formGroup]=\"formGroup\"\n [horizontal]=\"horizontal()\"\n [required]=\"column().required\">\n @if (template()) {\n <ng-container\n *ngTemplateOutlet=\"template().template; context: { $implicit: formGroup?.get(column().name) }\"></ng-container>\n } @else {\n @if (formGroup?.get(column().name)) {\n @switch (column().filterType) {\n @case (filterTypeEnum.list) {\n <teta-select\n class=\"row_auto\"\n [tetaDisableControl]=\"!editable()\"\n [searchRef]=\"getDict()?.length > 10 ? 'name' : ''\"\n [allowNull]=\"!column().required\"\n [appendToBody]=\"true\"\n [invalid]=\"controlIsInvalid(column().name)\"\n [formControlName]=\"column().name\"\n [options]=\"getDict()\"\n [valueRef]=\"'id'\"\n [textRef]=\"'name'\"\n [multiple]=\"false\"></teta-select>\n }\n @case (filterTypeEnum.date) {\n <teta-date-picker\n class=\"row_auto\"\n [appendToBody]=\"true\"\n [tetaDisableControl]=\"!editable()\"\n [invalid]=\"controlIsInvalid(column().name)\"\n [formControlName]=\"column().name\"></teta-date-picker>\n }\n @case (filterTypeEnum.boolean) {\n <teta-toggle [tetaDisableControl]=\"!editable()\" [formControlName]=\"column().name\">\n {{ column().caption }}\n </teta-toggle>\n }\n @default {\n <teta-text-field\n class=\"row_auto\"\n [tetaDisableControl]=\"!editable()\"\n [decimalPart]=\"column().filterType === filterTypeEnum.number ? decimalPart() : null\"\n [onlyNumber]=\"column().filterType === filterTypeEnum.number\"\n [placeholder]=\"column().caption\"\n [invalid]=\"controlIsInvalid(column().name)\"\n [formControlName]=\"column().name\"\n ></teta-text-field>\n }\n }\n }\n }\n @if (controlIsInvalid(column().name)) {\n <div ngProjectAs=\"message\" class=\"color-red-50\">\n {{ getError(column()) }}\n </div>\n }\n </teta-input>\n}\n", styles: [""], dependencies: [{ kind: "component", type: InputComponent, selector: "teta-input", inputs: ["label", "hint", "viewType", "horizontal", "required"] }, { kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i2.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i2.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "directive", type: i2.FormControlName, selector: "[formControlName]", inputs: ["formControlName", "disabled", "ngModel"], outputs: ["ngModelChange"] }, { kind: "directive", type: NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "component", type: SelectComponent, selector: "teta-select", inputs: ["multiple", "options", "invalid", "align", "verticalAlign", "autoClose", "autoCloseIgnore", "disabled", "itemSize", "virtual", "icon", "placeholder", "appendToBody", "allowNull", "viewType", "notFoundText", "valueRef", "textRef", "searchRef"] }, { kind: "component", type: DatePickerComponent, selector: "teta-date-picker", inputs: ["date", "showTime", "minDate", "maxDate", "invalid", "disabled", "align", "verticalAlign", "viewType", "appendToBody", "backdrop", "allowNull", "firstDayOfWeek", "disabledDates", "disabledPeriods", "disabledDays", "minYearDate", "maxYearDate"], outputs: ["selectDate"] }, { kind: "component", type: ToggleComponent, selector: "teta-toggle", inputs: ["palette", "noLabel", "disabled"] }, { kind: "component", type: TextFieldComponent, selector: "teta-text-field", inputs: ["placeholder", "leftIconName", "disabled", "onlyNumber", "decimalPart", "invalid"] }, { kind: "directive", type: DisableControlDirective, selector: "[tetaDisableControl]", inputs: ["tetaDisableControl"] }], viewProviders: [FormsUtil.formProvider], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
6191
6193
|
}
|
|
6192
6194
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.1", ngImport: i0, type: PropertyGridItemComponent, decorators: [{
|
|
6193
6195
|
type: Component,
|
|
@@ -6201,7 +6203,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.1", ngImpor
|
|
|
6201
6203
|
ToggleComponent,
|
|
6202
6204
|
TextFieldComponent,
|
|
6203
6205
|
DisableControlDirective,
|
|
6204
|
-
], template: "@if (editable() || !hideNonEditable()) {\n <teta-input\n [label]=\"caption()\"\n [hint]=\"column().hint\"\n [formGroup]=\"formGroup\"\n [horizontal]=\"horizontal()\"\n [required]=\"column().required\">\n @if (template()) {\n <ng-container\n *ngTemplateOutlet=\"template().template; context: { $implicit: formGroup?.get(column().name) }\"></ng-container>\n } @else {\n @if (formGroup?.get(column().name)) {\n @switch (column().filterType) {\n @case (filterTypeEnum.list) {\n <teta-select\n class=\"row_auto\"\n [tetaDisableControl]=\"!editable()\"\n [searchRef]=\"getDict()?.length > 10 ? 'name' : ''\"\n [allowNull]=\"!column().required\"\n [appendToBody]=\"true\"\n [invalid]=\"controlIsInvalid(column().name)\"\n [formControlName]=\"column().name\"\n [options]=\"getDict()\"\n [valueRef]=\"'id'\"\n [textRef]=\"'name'\"\n [multiple]=\"false\"></teta-select>\n }\n @case (filterTypeEnum.date) {\n <teta-date-picker\n class=\"row_auto\"\n [appendToBody]=\"true\"\n [tetaDisableControl]=\"!editable()\"\n [invalid]=\"controlIsInvalid(column().name)\"\n [formControlName]=\"column().name\"></teta-date-picker>\n }\n @case (filterTypeEnum.boolean) {\n <teta-toggle [tetaDisableControl]=\"!editable()\" [formControlName]=\"column().name\">\n {{ column().caption }}\n </teta-toggle>\n }\n @default {\n <teta-text-field\n class=\"row_auto\"\n [tetaDisableControl]=\"!editable()\"\n [decimalPart]=\"column().filterType === filterTypeEnum.number ? decimalPart() : null\"\n [onlyNumber]=\"column().filterType === filterTypeEnum.number\"\n [placeholder]=\"column().caption\"\n [invalid]=\"controlIsInvalid(column().name)\"\n [formControlName]=\"column().name\"\n ></teta-text-field>\n }\n }\n }\n }\n @if (controlIsInvalid(column().name)) {\n <div ngProjectAs=\"message\" class=\"color-red-50\">\n {{ getError(column()) }}\n </div>\n }\n </teta-input>\n}\n" }]
|
|
6206
|
+
], changeDetection: ChangeDetectionStrategy.OnPush, template: "@if (editable() || !hideNonEditable()) {\n <teta-input\n [label]=\"caption()\"\n [hint]=\"column().hint\"\n [formGroup]=\"formGroup\"\n [horizontal]=\"horizontal()\"\n [required]=\"column().required\">\n @if (template()) {\n <ng-container\n *ngTemplateOutlet=\"template().template; context: { $implicit: formGroup?.get(column().name) }\"></ng-container>\n } @else {\n @if (formGroup?.get(column().name)) {\n @switch (column().filterType) {\n @case (filterTypeEnum.list) {\n <teta-select\n class=\"row_auto\"\n [tetaDisableControl]=\"!editable()\"\n [searchRef]=\"getDict()?.length > 10 ? 'name' : ''\"\n [allowNull]=\"!column().required\"\n [appendToBody]=\"true\"\n [invalid]=\"controlIsInvalid(column().name)\"\n [formControlName]=\"column().name\"\n [options]=\"getDict()\"\n [valueRef]=\"'id'\"\n [textRef]=\"'name'\"\n [multiple]=\"false\"></teta-select>\n }\n @case (filterTypeEnum.date) {\n <teta-date-picker\n class=\"row_auto\"\n [appendToBody]=\"true\"\n [tetaDisableControl]=\"!editable()\"\n [invalid]=\"controlIsInvalid(column().name)\"\n [formControlName]=\"column().name\"></teta-date-picker>\n }\n @case (filterTypeEnum.boolean) {\n <teta-toggle [tetaDisableControl]=\"!editable()\" [formControlName]=\"column().name\">\n {{ column().caption }}\n </teta-toggle>\n }\n @default {\n <teta-text-field\n class=\"row_auto\"\n [tetaDisableControl]=\"!editable()\"\n [decimalPart]=\"column().filterType === filterTypeEnum.number ? decimalPart() : null\"\n [onlyNumber]=\"column().filterType === filterTypeEnum.number\"\n [placeholder]=\"column().caption\"\n [invalid]=\"controlIsInvalid(column().name)\"\n [formControlName]=\"column().name\"\n ></teta-text-field>\n }\n }\n }\n }\n @if (controlIsInvalid(column().name)) {\n <div ngProjectAs=\"message\" class=\"color-red-50\">\n {{ getError(column()) }}\n </div>\n }\n </teta-input>\n}\n" }]
|
|
6205
6207
|
}], ctorParameters: () => [] });
|
|
6206
6208
|
|
|
6207
6209
|
class PropertyGridGroupComponent {
|
|
@@ -6216,11 +6218,11 @@ class PropertyGridGroupComponent {
|
|
|
6216
6218
|
this.itemTemplates = input();
|
|
6217
6219
|
}
|
|
6218
6220
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.1", ngImport: i0, type: PropertyGridGroupComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
6219
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "18.2.1", type: PropertyGridGroupComponent, isStandalone: true, selector: "teta-property-grid-group", inputs: { column: { classPropertyName: "column", publicName: "column", isSignal: true, isRequired: false, transformFunction: null }, hideNonEditable: { classPropertyName: "hideNonEditable", publicName: "hideNonEditable", isSignal: true, isRequired: false, transformFunction: null }, dict: { classPropertyName: "dict", publicName: "dict", isSignal: true, isRequired: false, transformFunction: null }, item: { classPropertyName: "item", publicName: "item", isSignal: true, isRequired: false, transformFunction: null }, horizontal: { classPropertyName: "horizontal", publicName: "horizontal", isSignal: true, isRequired: false, transformFunction: null }, decimalPart: { classPropertyName: "decimalPart", publicName: "decimalPart", isSignal: true, isRequired: false, transformFunction: null }, itemTemplates: { classPropertyName: "itemTemplates", publicName: "itemTemplates", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { controlValueChange: "controlValueChange" }, ngImport: i0, template: "<teta-expand-item>\n <span ngProjectAs=\"head\">\n {{ column().caption }}\n </span>\n <div class=\"form-container\">\n @for (col of column().columns; track col.name) {\n @if (col.columns?.length < 1) {\n @if (column().editable || !hideNonEditable) {\n <teta-property-grid-item\n [id]=\"col.name\"\n [dict]=\"dict()\"\n [column]=\"col\"\n [item]=\"item()\"\n [itemTemplates]=\"itemTemplates()\"\n [decimalPart]=\"decimalPart()\"\n [hideNonEditable]=\"hideNonEditable()\"\n (controlValueChange)=\"controlValueChange.emit($event)\"\n [horizontal]=\"horizontal()\"\n ></teta-property-grid-item>\n }\n } @else {\n <teta-property-grid-group\n [id]=\"col.name\"\n [dict]=\"dict()\"\n [column]=\"col\"\n [item]=\"item()\"\n [itemTemplates]=\"itemTemplates()\"\n [decimalPart]=\"decimalPart()\"\n [hideNonEditable]=\"hideNonEditable()\"\n [horizontal]=\"horizontal()\"\n (controlValueChange)=\"controlValueChange.emit($event)\"\n ></teta-property-grid-group>\n }\n }\n </div>\n</teta-expand-item>\n", styles: [":host{display:flex;flex-direction:column}\n"], dependencies: [{ kind: "component", type: PropertyGridGroupComponent, selector: "teta-property-grid-group", inputs: ["column", "hideNonEditable", "dict", "item", "horizontal", "decimalPart", "itemTemplates"], outputs: ["controlValueChange"] }, { kind: "component", type: ExpandItemComponent, selector: "teta-expand-item", inputs: ["open"], outputs: ["openChange"], exportAs: ["expand-item"] }, { kind: "component", type: PropertyGridItemComponent, selector: "teta-property-grid-item", inputs: ["column", "hideNonEditable", "dict", "decimalPart", "item", "itemTemplates", "horizontal"], outputs: ["controlValueChange"] }], viewProviders: [FormsUtil.formProvider] }); }
|
|
6221
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "18.2.1", type: PropertyGridGroupComponent, isStandalone: true, selector: "teta-property-grid-group", inputs: { column: { classPropertyName: "column", publicName: "column", isSignal: true, isRequired: false, transformFunction: null }, hideNonEditable: { classPropertyName: "hideNonEditable", publicName: "hideNonEditable", isSignal: true, isRequired: false, transformFunction: null }, dict: { classPropertyName: "dict", publicName: "dict", isSignal: true, isRequired: false, transformFunction: null }, item: { classPropertyName: "item", publicName: "item", isSignal: true, isRequired: false, transformFunction: null }, horizontal: { classPropertyName: "horizontal", publicName: "horizontal", isSignal: true, isRequired: false, transformFunction: null }, decimalPart: { classPropertyName: "decimalPart", publicName: "decimalPart", isSignal: true, isRequired: false, transformFunction: null }, itemTemplates: { classPropertyName: "itemTemplates", publicName: "itemTemplates", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { controlValueChange: "controlValueChange" }, ngImport: i0, template: "<teta-expand-item>\n <span ngProjectAs=\"head\">\n {{ column().caption }}\n </span>\n <div class=\"form-container\">\n @for (col of column().columns; track col.name) {\n @if (col.columns?.length < 1) {\n @if (column().editable || !hideNonEditable) {\n <teta-property-grid-item\n [id]=\"col.name\"\n [dict]=\"dict()\"\n [column]=\"col\"\n [item]=\"item()\"\n [itemTemplates]=\"itemTemplates()\"\n [decimalPart]=\"decimalPart()\"\n [hideNonEditable]=\"hideNonEditable()\"\n (controlValueChange)=\"controlValueChange.emit($event)\"\n [horizontal]=\"horizontal()\"\n ></teta-property-grid-item>\n }\n } @else {\n <teta-property-grid-group\n [id]=\"col.name\"\n [dict]=\"dict()\"\n [column]=\"col\"\n [item]=\"item()\"\n [itemTemplates]=\"itemTemplates()\"\n [decimalPart]=\"decimalPart()\"\n [hideNonEditable]=\"hideNonEditable()\"\n [horizontal]=\"horizontal()\"\n (controlValueChange)=\"controlValueChange.emit($event)\"\n ></teta-property-grid-group>\n }\n }\n </div>\n</teta-expand-item>\n", styles: [":host{display:flex;flex-direction:column}\n"], dependencies: [{ kind: "component", type: PropertyGridGroupComponent, selector: "teta-property-grid-group", inputs: ["column", "hideNonEditable", "dict", "item", "horizontal", "decimalPart", "itemTemplates"], outputs: ["controlValueChange"] }, { kind: "component", type: ExpandItemComponent, selector: "teta-expand-item", inputs: ["open"], outputs: ["openChange"], exportAs: ["expand-item"] }, { kind: "component", type: PropertyGridItemComponent, selector: "teta-property-grid-item", inputs: ["column", "hideNonEditable", "dict", "decimalPart", "item", "itemTemplates", "horizontal"], outputs: ["controlValueChange"] }], viewProviders: [FormsUtil.formProvider], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
6220
6222
|
}
|
|
6221
6223
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.1", ngImport: i0, type: PropertyGridGroupComponent, decorators: [{
|
|
6222
6224
|
type: Component,
|
|
6223
|
-
args: [{ selector: 'teta-property-grid-group', viewProviders: [FormsUtil.formProvider], standalone: true, imports: [ExpandItemComponent, PropertyGridItemComponent], template: "<teta-expand-item>\n <span ngProjectAs=\"head\">\n {{ column().caption }}\n </span>\n <div class=\"form-container\">\n @for (col of column().columns; track col.name) {\n @if (col.columns?.length < 1) {\n @if (column().editable || !hideNonEditable) {\n <teta-property-grid-item\n [id]=\"col.name\"\n [dict]=\"dict()\"\n [column]=\"col\"\n [item]=\"item()\"\n [itemTemplates]=\"itemTemplates()\"\n [decimalPart]=\"decimalPart()\"\n [hideNonEditable]=\"hideNonEditable()\"\n (controlValueChange)=\"controlValueChange.emit($event)\"\n [horizontal]=\"horizontal()\"\n ></teta-property-grid-item>\n }\n } @else {\n <teta-property-grid-group\n [id]=\"col.name\"\n [dict]=\"dict()\"\n [column]=\"col\"\n [item]=\"item()\"\n [itemTemplates]=\"itemTemplates()\"\n [decimalPart]=\"decimalPart()\"\n [hideNonEditable]=\"hideNonEditable()\"\n [horizontal]=\"horizontal()\"\n (controlValueChange)=\"controlValueChange.emit($event)\"\n ></teta-property-grid-group>\n }\n }\n </div>\n</teta-expand-item>\n", styles: [":host{display:flex;flex-direction:column}\n"] }]
|
|
6225
|
+
args: [{ selector: 'teta-property-grid-group', viewProviders: [FormsUtil.formProvider], standalone: true, imports: [ExpandItemComponent, PropertyGridItemComponent], changeDetection: ChangeDetectionStrategy.OnPush, template: "<teta-expand-item>\n <span ngProjectAs=\"head\">\n {{ column().caption }}\n </span>\n <div class=\"form-container\">\n @for (col of column().columns; track col.name) {\n @if (col.columns?.length < 1) {\n @if (column().editable || !hideNonEditable) {\n <teta-property-grid-item\n [id]=\"col.name\"\n [dict]=\"dict()\"\n [column]=\"col\"\n [item]=\"item()\"\n [itemTemplates]=\"itemTemplates()\"\n [decimalPart]=\"decimalPart()\"\n [hideNonEditable]=\"hideNonEditable()\"\n (controlValueChange)=\"controlValueChange.emit($event)\"\n [horizontal]=\"horizontal()\"\n ></teta-property-grid-item>\n }\n } @else {\n <teta-property-grid-group\n [id]=\"col.name\"\n [dict]=\"dict()\"\n [column]=\"col\"\n [item]=\"item()\"\n [itemTemplates]=\"itemTemplates()\"\n [decimalPart]=\"decimalPart()\"\n [hideNonEditable]=\"hideNonEditable()\"\n [horizontal]=\"horizontal()\"\n (controlValueChange)=\"controlValueChange.emit($event)\"\n ></teta-property-grid-group>\n }\n }\n </div>\n</teta-expand-item>\n", styles: [":host{display:flex;flex-direction:column}\n"] }]
|
|
6224
6226
|
}] });
|
|
6225
6227
|
|
|
6226
6228
|
class PropertyGridComponent {
|
|
@@ -6248,7 +6250,9 @@ class PropertyGridComponent {
|
|
|
6248
6250
|
if (this.item() && this.formGroup) {
|
|
6249
6251
|
for (const key in this.item()) {
|
|
6250
6252
|
if (this.item().hasOwnProperty(key)) {
|
|
6251
|
-
this.formGroup.
|
|
6253
|
+
if (!this.formGroup.get(key)) {
|
|
6254
|
+
this.formGroup.setControl(key, new UntypedFormControl(this.item()[key]));
|
|
6255
|
+
}
|
|
6252
6256
|
}
|
|
6253
6257
|
}
|
|
6254
6258
|
}
|
|
@@ -6281,11 +6285,11 @@ class PropertyGridComponent {
|
|
|
6281
6285
|
return this.dict()[name]?.find((_) => _.id === value);
|
|
6282
6286
|
}
|
|
6283
6287
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.1", ngImport: i0, type: PropertyGridComponent, deps: [{ token: i2.ControlContainer, optional: true }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
6284
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "18.2.1", type: PropertyGridComponent, isStandalone: true, selector: "teta-property-grid", inputs: { hideNonEditable: { classPropertyName: "hideNonEditable", publicName: "hideNonEditable", isSignal: true, isRequired: false, transformFunction: null }, columns: { classPropertyName: "columns", publicName: "columns", isSignal: true, isRequired: false, transformFunction: null }, dict: { classPropertyName: "dict", publicName: "dict", isSignal: true, isRequired: false, transformFunction: null }, item: { classPropertyName: "item", publicName: "item", isSignal: true, isRequired: false, transformFunction: null }, horizontal: { classPropertyName: "horizontal", publicName: "horizontal", isSignal: true, isRequired: false, transformFunction: null }, decimalPart: { classPropertyName: "decimalPart", publicName: "decimalPart", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { controlValueChange: "controlValueChange" }, host: { properties: { "class.form-container": "this.formClass" } }, queries: [{ propertyName: "itemTemplates", predicate: PropertyGridItemDescriptionDirective, isSignal: true }], ngImport: i0, template: "@if (columns().length) {\n @for (column of columns(); track column.name) {\n @if (column.columns?.length < 1 && (getEditable(column) || !hideNonEditable())) {\n <teta-property-grid-item\n [dict]=\"dict()\"\n [column]=\"column\"\n [item]=\"item()\"\n [id]=\"column.name\"\n [itemTemplates]=\"itemTemplates()\"\n [decimalPart]=\"decimalPart()\"\n [formGroup]=\"formGroup\"\n [horizontal]=\"horizontal()\"\n (controlValueChange)=\"onControlValueChange($event)\"\n [hideNonEditable]=\"hideNonEditable()\"\n ></teta-property-grid-item>\n }\n @if (column.columns?.length > 0 && (getEditable(column) || !hideNonEditable())) {\n <teta-property-grid-group\n [id]=\"column.name\"\n [dict]=\"dict()\"\n [column]=\"column\"\n [item]=\"item()\"\n [itemTemplates]=\"itemTemplates()\"\n [decimalPart]=\"decimalPart()\"\n [formGroup]=\"formGroup\"\n [horizontal]=\"horizontal()\"\n (controlValueChange)=\"onControlValueChange($event)\"\n [hideNonEditable]=\"hideNonEditable()\"\n ></teta-property-grid-group>\n }\n }\n}\n", styles: [":host{padding:12px 8px}\n"], dependencies: [{ kind: "component", type: PropertyGridItemComponent, selector: "teta-property-grid-item", inputs: ["column", "hideNonEditable", "dict", "decimalPart", "item", "itemTemplates", "horizontal"], outputs: ["controlValueChange"] }, { kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i2.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i2.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "component", type: PropertyGridGroupComponent, selector: "teta-property-grid-group", inputs: ["column", "hideNonEditable", "dict", "item", "horizontal", "decimalPart", "itemTemplates"], outputs: ["controlValueChange"] }], viewProviders: [FormsUtil.formProvider] }); }
|
|
6288
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "18.2.1", type: PropertyGridComponent, isStandalone: true, selector: "teta-property-grid", inputs: { hideNonEditable: { classPropertyName: "hideNonEditable", publicName: "hideNonEditable", isSignal: true, isRequired: false, transformFunction: null }, columns: { classPropertyName: "columns", publicName: "columns", isSignal: true, isRequired: false, transformFunction: null }, dict: { classPropertyName: "dict", publicName: "dict", isSignal: true, isRequired: false, transformFunction: null }, item: { classPropertyName: "item", publicName: "item", isSignal: true, isRequired: false, transformFunction: null }, horizontal: { classPropertyName: "horizontal", publicName: "horizontal", isSignal: true, isRequired: false, transformFunction: null }, decimalPart: { classPropertyName: "decimalPart", publicName: "decimalPart", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { controlValueChange: "controlValueChange" }, host: { properties: { "class.form-container": "this.formClass" } }, queries: [{ propertyName: "itemTemplates", predicate: PropertyGridItemDescriptionDirective, isSignal: true }], ngImport: i0, template: "@if (columns().length) {\n @for (column of columns(); track column.name) {\n @if (column.columns?.length < 1 && (getEditable(column) || !hideNonEditable())) {\n <teta-property-grid-item\n [dict]=\"dict()\"\n [column]=\"column\"\n [item]=\"item()\"\n [id]=\"column.name\"\n [itemTemplates]=\"itemTemplates()\"\n [decimalPart]=\"decimalPart()\"\n [formGroup]=\"formGroup\"\n [horizontal]=\"horizontal()\"\n (controlValueChange)=\"onControlValueChange($event)\"\n [hideNonEditable]=\"hideNonEditable()\"\n ></teta-property-grid-item>\n }\n @if (column.columns?.length > 0 && (getEditable(column) || !hideNonEditable())) {\n <teta-property-grid-group\n [id]=\"column.name\"\n [dict]=\"dict()\"\n [column]=\"column\"\n [item]=\"item()\"\n [itemTemplates]=\"itemTemplates()\"\n [decimalPart]=\"decimalPart()\"\n [formGroup]=\"formGroup\"\n [horizontal]=\"horizontal()\"\n (controlValueChange)=\"onControlValueChange($event)\"\n [hideNonEditable]=\"hideNonEditable()\"\n ></teta-property-grid-group>\n }\n }\n}\n", styles: [":host{padding:12px 8px}\n"], dependencies: [{ kind: "component", type: PropertyGridItemComponent, selector: "teta-property-grid-item", inputs: ["column", "hideNonEditable", "dict", "decimalPart", "item", "itemTemplates", "horizontal"], outputs: ["controlValueChange"] }, { kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i2.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i2.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "component", type: PropertyGridGroupComponent, selector: "teta-property-grid-group", inputs: ["column", "hideNonEditable", "dict", "item", "horizontal", "decimalPart", "itemTemplates"], outputs: ["controlValueChange"] }], viewProviders: [FormsUtil.formProvider], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
6285
6289
|
}
|
|
6286
6290
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.1", ngImport: i0, type: PropertyGridComponent, decorators: [{
|
|
6287
6291
|
type: Component,
|
|
6288
|
-
args: [{ selector: 'teta-property-grid', viewProviders: [FormsUtil.formProvider], standalone: true, imports: [PropertyGridItemComponent, FormsModule, ReactiveFormsModule, PropertyGridGroupComponent], template: "@if (columns().length) {\n @for (column of columns(); track column.name) {\n @if (column.columns?.length < 1 && (getEditable(column) || !hideNonEditable())) {\n <teta-property-grid-item\n [dict]=\"dict()\"\n [column]=\"column\"\n [item]=\"item()\"\n [id]=\"column.name\"\n [itemTemplates]=\"itemTemplates()\"\n [decimalPart]=\"decimalPart()\"\n [formGroup]=\"formGroup\"\n [horizontal]=\"horizontal()\"\n (controlValueChange)=\"onControlValueChange($event)\"\n [hideNonEditable]=\"hideNonEditable()\"\n ></teta-property-grid-item>\n }\n @if (column.columns?.length > 0 && (getEditable(column) || !hideNonEditable())) {\n <teta-property-grid-group\n [id]=\"column.name\"\n [dict]=\"dict()\"\n [column]=\"column\"\n [item]=\"item()\"\n [itemTemplates]=\"itemTemplates()\"\n [decimalPart]=\"decimalPart()\"\n [formGroup]=\"formGroup\"\n [horizontal]=\"horizontal()\"\n (controlValueChange)=\"onControlValueChange($event)\"\n [hideNonEditable]=\"hideNonEditable()\"\n ></teta-property-grid-group>\n }\n }\n}\n", styles: [":host{padding:12px 8px}\n"] }]
|
|
6292
|
+
args: [{ selector: 'teta-property-grid', viewProviders: [FormsUtil.formProvider], standalone: true, imports: [PropertyGridItemComponent, FormsModule, ReactiveFormsModule, PropertyGridGroupComponent], changeDetection: ChangeDetectionStrategy.OnPush, template: "@if (columns().length) {\n @for (column of columns(); track column.name) {\n @if (column.columns?.length < 1 && (getEditable(column) || !hideNonEditable())) {\n <teta-property-grid-item\n [dict]=\"dict()\"\n [column]=\"column\"\n [item]=\"item()\"\n [id]=\"column.name\"\n [itemTemplates]=\"itemTemplates()\"\n [decimalPart]=\"decimalPart()\"\n [formGroup]=\"formGroup\"\n [horizontal]=\"horizontal()\"\n (controlValueChange)=\"onControlValueChange($event)\"\n [hideNonEditable]=\"hideNonEditable()\"\n ></teta-property-grid-item>\n }\n @if (column.columns?.length > 0 && (getEditable(column) || !hideNonEditable())) {\n <teta-property-grid-group\n [id]=\"column.name\"\n [dict]=\"dict()\"\n [column]=\"column\"\n [item]=\"item()\"\n [itemTemplates]=\"itemTemplates()\"\n [decimalPart]=\"decimalPart()\"\n [formGroup]=\"formGroup\"\n [horizontal]=\"horizontal()\"\n (controlValueChange)=\"onControlValueChange($event)\"\n [hideNonEditable]=\"hideNonEditable()\"\n ></teta-property-grid-group>\n }\n }\n}\n", styles: [":host{padding:12px 8px}\n"] }]
|
|
6289
6293
|
}], ctorParameters: () => [{ type: i2.ControlContainer, decorators: [{
|
|
6290
6294
|
type: Optional
|
|
6291
6295
|
}] }], propDecorators: { formClass: [{
|