@tetacom/ng-components 1.6.3 → 1.6.5

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.
@@ -1,9 +1,13 @@
1
+ import { OnInit } from '@angular/core';
1
2
  import { NgControl } from '@angular/forms';
2
3
  import * as i0 from "@angular/core";
3
- export declare class DisableControlDirective {
4
+ export declare class DisableControlDirective implements OnInit {
4
5
  private ngControl;
6
+ private disabled;
5
7
  set tetaDisableControl(val: boolean);
6
8
  constructor(ngControl: NgControl);
9
+ ngOnInit(): void;
10
+ private toggleControl;
7
11
  static ɵfac: i0.ɵɵFactoryDeclaration<DisableControlDirective, never>;
8
12
  static ɵdir: i0.ɵɵDirectiveDeclaration<DisableControlDirective, "[tetaDisableControl]", never, { "tetaDisableControl": { "alias": "tetaDisableControl"; "required": false; }; }, {}, never, never, true, never>;
9
13
  }
@@ -6124,6 +6124,16 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.5", ngImpor
6124
6124
 
6125
6125
  class DisableControlDirective {
6126
6126
  set tetaDisableControl(val) {
6127
+ this.toggleControl(val);
6128
+ this.disabled = val;
6129
+ }
6130
+ constructor(ngControl) {
6131
+ this.ngControl = ngControl;
6132
+ }
6133
+ ngOnInit() {
6134
+ this.toggleControl(this.disabled);
6135
+ }
6136
+ toggleControl(val) {
6127
6137
  if (this.ngControl.control) {
6128
6138
  if (val) {
6129
6139
  this.ngControl.control.disable({
@@ -6137,9 +6147,6 @@ class DisableControlDirective {
6137
6147
  }
6138
6148
  }
6139
6149
  }
6140
- constructor(ngControl) {
6141
- this.ngControl = ngControl;
6142
- }
6143
6150
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.5", ngImport: i0, type: DisableControlDirective, deps: [{ token: i2.NgControl }], target: i0.ɵɵFactoryTarget.Directive }); }
6144
6151
  static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "19.0.5", type: DisableControlDirective, isStandalone: true, selector: "[tetaDisableControl]", inputs: { tetaDisableControl: "tetaDisableControl" }, ngImport: i0 }); }
6145
6152
  }
@@ -6183,9 +6190,6 @@ class PropertyGridItemComponent {
6183
6190
  return `${this.column().caption}${this.column().unit ? `, ${this.column().unit}` : ''}`;
6184
6191
  });
6185
6192
  this.hint = computed(() => {
6186
- if (this.column().filterType === FilterType.boolean) {
6187
- return '';
6188
- }
6189
6193
  return `${this.column().hint || this.column().caption}${this.column().unit ? `, ${this.column().unit}` : ''}`;
6190
6194
  });
6191
6195
  this._alive = true;
@@ -6252,7 +6256,7 @@ class PropertyGridItemComponent {
6252
6256
  }
6253
6257
  }
6254
6258
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.5", ngImport: i0, type: PropertyGridItemComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
6255
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.0.5", 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]=\"hint()\"\n [formGroup]=\"formGroup\"\n [horizontal]=\"horizontal()\"\n [required]=\"column().required\"\n >\n @if (template()) {\n <ng-container\n *ngTemplateOutlet=\"template().template; context: { $implicit: formGroup?.get(column().name) }\"\n ></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\"\n ></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\"\n ></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 }); }
6259
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.0.5", 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]=\"hint()\"\n [formGroup]=\"formGroup\"\n [horizontal]=\"horizontal()\"\n [required]=\"column().required\"\n >\n @if (template()) {\n <ng-container\n *ngTemplateOutlet=\"template().template; context: { $implicit: formGroup?.get(column().name) }\"\n ></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\"\n ></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\"\n ></teta-date-picker>\n }\n @case (filterTypeEnum.boolean) {\n <teta-toggle\n [tetaDisableControl]=\"!editable()\"\n [formControlName]=\"column().name\"\n [tetaHint]=\"hint()\"\n [align]=\"align.left\"\n >\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"] }, { kind: "directive", type: HintDirective, selector: "[tetaHint]", inputs: ["tetaHint", "align", "verticalAlign", "delay", "viewType", "overflownOnly"] }], viewProviders: [FormsUtil.formProvider], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
6256
6260
  }
6257
6261
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.5", ngImport: i0, type: PropertyGridItemComponent, decorators: [{
6258
6262
  type: Component,
@@ -6266,7 +6270,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.5", ngImpor
6266
6270
  ToggleComponent,
6267
6271
  TextFieldComponent,
6268
6272
  DisableControlDirective,
6269
- ], changeDetection: ChangeDetectionStrategy.OnPush, template: "@if (editable() || !hideNonEditable()) {\n <teta-input\n [label]=\"caption()\"\n [hint]=\"hint()\"\n [formGroup]=\"formGroup\"\n [horizontal]=\"horizontal()\"\n [required]=\"column().required\"\n >\n @if (template()) {\n <ng-container\n *ngTemplateOutlet=\"template().template; context: { $implicit: formGroup?.get(column().name) }\"\n ></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\"\n ></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\"\n ></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" }]
6273
+ HintDirective,
6274
+ ], changeDetection: ChangeDetectionStrategy.OnPush, template: "@if (editable() || !hideNonEditable()) {\n <teta-input\n [label]=\"caption()\"\n [hint]=\"hint()\"\n [formGroup]=\"formGroup\"\n [horizontal]=\"horizontal()\"\n [required]=\"column().required\"\n >\n @if (template()) {\n <ng-container\n *ngTemplateOutlet=\"template().template; context: { $implicit: formGroup?.get(column().name) }\"\n ></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\"\n ></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\"\n ></teta-date-picker>\n }\n @case (filterTypeEnum.boolean) {\n <teta-toggle\n [tetaDisableControl]=\"!editable()\"\n [formControlName]=\"column().name\"\n [tetaHint]=\"hint()\"\n [align]=\"align.left\"\n >\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" }]
6270
6275
  }] });
6271
6276
 
6272
6277
  class PropertyGridGroupComponent {