@tetacom/ng-components 1.6.10 → 1.6.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.
|
@@ -44,6 +44,7 @@ export interface ITableColumnOptions extends IFilterItemOptions {
|
|
|
44
44
|
minValue?: number;
|
|
45
45
|
maxLength?: number;
|
|
46
46
|
required?: boolean;
|
|
47
|
+
decimalLength?: number;
|
|
47
48
|
validators?: ValidatorFn[];
|
|
48
49
|
}
|
|
49
50
|
export declare class TableColumn extends FilterItem {
|
|
@@ -125,6 +126,10 @@ export declare class TableColumn extends FilterItem {
|
|
|
125
126
|
* Поле обязательно для заполнения
|
|
126
127
|
*/
|
|
127
128
|
required: boolean;
|
|
129
|
+
/**
|
|
130
|
+
* Размер дробной части для числовых полей
|
|
131
|
+
*/
|
|
132
|
+
decimalLength?: number;
|
|
128
133
|
/**
|
|
129
134
|
* Функции валидации
|
|
130
135
|
*/
|
|
@@ -6853,6 +6853,7 @@ class TableColumn extends FilterItem {
|
|
|
6853
6853
|
this.minValue = options?.minValue;
|
|
6854
6854
|
this.maxLength = options?.maxLength;
|
|
6855
6855
|
this.required = options?.required;
|
|
6856
|
+
this.decimalLength = options?.decimalLength;
|
|
6856
6857
|
this.columns = options?.columns?.map((x) => new TableColumn(x)) ?? [];
|
|
6857
6858
|
this.validators = options?.validators;
|
|
6858
6859
|
}
|
|
@@ -7832,11 +7833,11 @@ class NumericCellComponent extends CellComponentBase {
|
|
|
7832
7833
|
this.cdr.markForCheck();
|
|
7833
7834
|
}
|
|
7834
7835
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.5", ngImport: i0, type: NumericCellComponent, deps: [{ token: TableService }, { token: i0.ChangeDetectorRef }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
7835
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.0.5", type: NumericCellComponent, isStandalone: true, selector: "teta-numeric-cell", viewQueries: [{ propertyName: "input", first: true, predicate: ["input"], descendants: true }], usesInheritance: true, ngImport: i0, template: "<span [style.display]=\"edit ? 'none' : 'block'\" class=\"cell-text\" [class.cell-text_disabled]=\"!editable\">\n {{ control?.value | tetaNumber: 2 }}\n</span>\n@if (edit) {\n <input\n #input\n [tetaOnlyNumber]=\"true\"\n type=\"text\"\n class=\"input row_auto border-radius-0\"\n (keydown.enter)=\"input.blur()\"\n [formControl]=\"control\"\n />\n}\n", styles: [""], dependencies: [{ kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i2.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.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: OnlyNumberDirective, selector: "[tetaOnlyNumber]", inputs: ["tetaOnlyNumber", "allowDecimals", "allowSign", "decimalSeparator", "commaSeparator", "onlyPositive"] }, { kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i2.FormControlDirective, selector: "[formControl]", inputs: ["formControl", "disabled", "ngModel"], outputs: ["ngModelChange"], exportAs: ["ngForm"] }, { kind: "pipe", type: NumberPipe, name: "tetaNumber" }], viewProviders: [FormsUtil.formProvider], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
7836
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.0.5", type: NumericCellComponent, isStandalone: true, selector: "teta-numeric-cell", viewQueries: [{ propertyName: "input", first: true, predicate: ["input"], descendants: true }], usesInheritance: true, ngImport: i0, template: "<span [style.display]=\"edit ? 'none' : 'block'\" class=\"cell-text\" [class.cell-text_disabled]=\"!editable\">\n {{ control?.value | tetaNumber: column.decimalLength ?? 2 }}\n</span>\n@if (edit) {\n <input\n #input\n [tetaOnlyNumber]=\"true\"\n type=\"text\"\n class=\"input row_auto border-radius-0\"\n (keydown.enter)=\"input.blur()\"\n [formControl]=\"control\"\n />\n}\n", styles: [""], dependencies: [{ kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i2.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.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: OnlyNumberDirective, selector: "[tetaOnlyNumber]", inputs: ["tetaOnlyNumber", "allowDecimals", "allowSign", "decimalSeparator", "commaSeparator", "onlyPositive"] }, { kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i2.FormControlDirective, selector: "[formControl]", inputs: ["formControl", "disabled", "ngModel"], outputs: ["ngModelChange"], exportAs: ["ngForm"] }, { kind: "pipe", type: NumberPipe, name: "tetaNumber" }], viewProviders: [FormsUtil.formProvider], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
7836
7837
|
}
|
|
7837
7838
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.5", ngImport: i0, type: NumericCellComponent, decorators: [{
|
|
7838
7839
|
type: Component,
|
|
7839
|
-
args: [{ selector: 'teta-numeric-cell', changeDetection: ChangeDetectionStrategy.OnPush, viewProviders: [FormsUtil.formProvider], imports: [FormsModule, OnlyNumberDirective, ReactiveFormsModule, NumberPipe], template: "<span [style.display]=\"edit ? 'none' : 'block'\" class=\"cell-text\" [class.cell-text_disabled]=\"!editable\">\n {{ control?.value | tetaNumber: 2 }}\n</span>\n@if (edit) {\n <input\n #input\n [tetaOnlyNumber]=\"true\"\n type=\"text\"\n class=\"input row_auto border-radius-0\"\n (keydown.enter)=\"input.blur()\"\n [formControl]=\"control\"\n />\n}\n" }]
|
|
7840
|
+
args: [{ selector: 'teta-numeric-cell', changeDetection: ChangeDetectionStrategy.OnPush, viewProviders: [FormsUtil.formProvider], imports: [FormsModule, OnlyNumberDirective, ReactiveFormsModule, NumberPipe], template: "<span [style.display]=\"edit ? 'none' : 'block'\" class=\"cell-text\" [class.cell-text_disabled]=\"!editable\">\n {{ control?.value | tetaNumber: column.decimalLength ?? 2 }}\n</span>\n@if (edit) {\n <input\n #input\n [tetaOnlyNumber]=\"true\"\n type=\"text\"\n class=\"input row_auto border-radius-0\"\n (keydown.enter)=\"input.blur()\"\n [formControl]=\"control\"\n />\n}\n" }]
|
|
7840
7841
|
}], ctorParameters: () => [{ type: TableService }, { type: i0.ChangeDetectorRef }], propDecorators: { input: [{
|
|
7841
7842
|
type: ViewChild,
|
|
7842
7843
|
args: ['input', { static: false }]
|