@tetacom/ng-components 1.4.5 → 1.4.7
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/property-grid/property-grid/property-grid-group/property-grid-group.component.d.ts +11 -17
- package/component/property-grid/property-grid/property-grid-item/property-grid-item.component.d.ts +18 -19
- package/component/property-grid/property-grid/property-grid.component.d.ts +10 -15
- package/component/property-grid/public-api.d.ts +0 -1
- package/esm2022/component/date-picker/day-picker/day-picker.component.mjs +3 -3
- package/esm2022/component/property-grid/property-grid/property-grid-group/property-grid-group.component.mjs +15 -49
- package/esm2022/component/property-grid/property-grid/property-grid-item/property-grid-item.component.mjs +42 -55
- package/esm2022/component/property-grid/property-grid/property-grid.component.mjs +23 -40
- package/esm2022/component/property-grid/public-api.mjs +1 -2
- package/esm2022/util/forms-util.mjs +4 -11
- package/fesm2022/tetacom-ng-components.mjs +123 -236
- package/fesm2022/tetacom-ng-components.mjs.map +1 -1
- package/package.json +1 -1
- package/style/list.scss +2 -1
- package/util/forms-util.d.ts +1 -2
- package/component/property-grid/property-grid.module.d.ts +0 -13
- package/esm2022/component/property-grid/property-grid.module.mjs +0 -57
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import * as i0 from '@angular/core';
|
|
2
|
-
import { Component, ChangeDetectionStrategy, HostBinding, Directive, Optional, Inject, ContentChild, Input, Injectable, Host, HostListener, ViewChild, forwardRef, ElementRef, EventEmitter, Output, TemplateRef, Injector, ViewContainerRef, Pipe, ViewEncapsulation, ChangeDetectorRef, NgModule,
|
|
2
|
+
import { Component, ChangeDetectionStrategy, HostBinding, Directive, Optional, Inject, ContentChild, Input, Injectable, Host, HostListener, ViewChild, forwardRef, ElementRef, EventEmitter, Output, TemplateRef, Injector, ViewContainerRef, Pipe, ViewEncapsulation, ChangeDetectorRef, NgModule, inject, input, computed, output, effect, ContentChildren, SkipSelf, PLATFORM_ID, InjectionToken } from '@angular/core';
|
|
3
3
|
import * as i1$1 from '@angular/common';
|
|
4
4
|
import { NgTemplateOutlet, DOCUMENT, NgClass, AsyncPipe, DatePipe, CommonModule, isPlatformBrowser } from '@angular/common';
|
|
5
5
|
import * as i1 from '@angular/common/http';
|
|
@@ -10,14 +10,14 @@ import * as d3 from 'd3';
|
|
|
10
10
|
import { BehaviorSubject, ReplaySubject, combineLatest, takeWhile as takeWhile$1, filter, map as map$1, lastValueFrom, take, shareReplay, Subject, animationFrameScheduler, fromEvent, tap as tap$1, merge, Observable, share, pipe } from 'rxjs';
|
|
11
11
|
import { OrbitControls } from 'three-stdlib';
|
|
12
12
|
import * as i2 from '@angular/forms';
|
|
13
|
-
import { NG_VALUE_ACCESSOR, FormsModule, UntypedFormControl, UntypedFormGroup, Validators, ControlContainer,
|
|
13
|
+
import { NG_VALUE_ACCESSOR, FormsModule, UntypedFormControl, UntypedFormGroup, Validators, ControlContainer, FormGroup, NgForm, ReactiveFormsModule } from '@angular/forms';
|
|
14
14
|
import { maskitoDateTimeOptionsGenerator, maskitoDateOptionsGenerator, maskitoDateRangeOptionsGenerator } from '@maskito/kit';
|
|
15
15
|
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
19
|
import * as i1$2 from '@ngneat/transloco';
|
|
20
|
-
import { TranslocoModule, TRANSLOCO_SCOPE } from '@ngneat/transloco';
|
|
20
|
+
import { TranslocoModule, TRANSLOCO_SCOPE, TranslocoService } from '@ngneat/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';
|
|
@@ -1392,11 +1392,11 @@ class DayPickerComponent {
|
|
|
1392
1392
|
this.dayOrder = arr;
|
|
1393
1393
|
}
|
|
1394
1394
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.1", ngImport: i0, type: DayPickerComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
1395
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "18.2.1", type: DayPickerComponent, isStandalone: true, selector: "teta-day-picker", inputs: { date: "date", calendar: "calendar", viewType: "viewType", range: "range", min: "min", max: "max", locale: "locale", hoveredDate: "hoveredDate" }, outputs: { hoveredDateChange: "hoveredDateChange", selectDate: "selectDate" }, usesOnChanges: true, ngImport: i0, template: "<div class=\"datepicker-week font-caption\">\n @for (day of dayOrder; track day) {\n <p class=\"datepicker-day\">\n {{ day }}\n </p>\n }\n</div>\n<div class=\"datepicker-picker color-text-90 font-body-3\">\n @for (day of calendar; track day) {\n <div\n [class]=\"getRangeActiveClass(day) + ' datepicker-date font-body-3 datepicker_' + viewType\"\n (mouseenter)=\"hover(day.date)\"\n (click)=\"pickDate(day)\"\n [ngClass]=\"{\n 'datepicker-date_active': day.selected || (day.date === hoveredDate && range && !range.to),\n 'datepicker-date-range_hover': range && isHoveredRange(day),\n 'datepicker-date_disabled': day.disabled,\n 'color-text-30': day.disabled || (!range && !day.isCurrentMonth),\n 'datepicker-date-range_disabled': !day.isCurrentMonth && range,\n 'datepicker-date-range_active': isActiveRange(day)\n }\"\n >\n <teta-day-item [day]=\"day\"></teta-day-item>\n </div>\n }\n</div>\n", styles: [""], dependencies: [{ kind: "directive", type: NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "component", type: DayItemComponent, selector: "teta-day-item", inputs: ["day"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
1395
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "18.2.1", type: DayPickerComponent, isStandalone: true, selector: "teta-day-picker", inputs: { date: "date", calendar: "calendar", viewType: "viewType", range: "range", min: "min", max: "max", locale: "locale", hoveredDate: "hoveredDate" }, outputs: { hoveredDateChange: "hoveredDateChange", selectDate: "selectDate" }, usesOnChanges: true, ngImport: i0, template: "<div class=\"datepicker-week font-caption\">\n @for (day of dayOrder; track day) {\n <p class=\"datepicker-day\">\n {{ day }}\n </p>\n }\n</div>\n<div class=\"datepicker-picker color-text-90 font-body-3\">\n @for (day of calendar; track day.date.getTime()) {\n <div\n [class]=\"getRangeActiveClass(day) + ' datepicker-date font-body-3 datepicker_' + viewType\"\n (mouseenter)=\"hover(day.date)\"\n (click)=\"pickDate(day)\"\n [ngClass]=\"{\n 'datepicker-date_active': day.selected || (day.date === hoveredDate && range && !range.to),\n 'datepicker-date-range_hover': range && isHoveredRange(day),\n 'datepicker-date_disabled': day.disabled,\n 'color-text-30': day.disabled || (!range && !day.isCurrentMonth),\n 'datepicker-date-range_disabled': !day.isCurrentMonth && range,\n 'datepicker-date-range_active': isActiveRange(day)\n }\"\n >\n <teta-day-item [day]=\"day\"></teta-day-item>\n </div>\n }\n</div>\n", styles: [""], dependencies: [{ kind: "directive", type: NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "component", type: DayItemComponent, selector: "teta-day-item", inputs: ["day"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
1396
1396
|
}
|
|
1397
1397
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.1", ngImport: i0, type: DayPickerComponent, decorators: [{
|
|
1398
1398
|
type: Component,
|
|
1399
|
-
args: [{ selector: 'teta-day-picker', changeDetection: ChangeDetectionStrategy.OnPush, standalone: true, imports: [NgClass, DayItemComponent], template: "<div class=\"datepicker-week font-caption\">\n @for (day of dayOrder; track day) {\n <p class=\"datepicker-day\">\n {{ day }}\n </p>\n }\n</div>\n<div class=\"datepicker-picker color-text-90 font-body-3\">\n @for (day of calendar; track day) {\n <div\n [class]=\"getRangeActiveClass(day) + ' datepicker-date font-body-3 datepicker_' + viewType\"\n (mouseenter)=\"hover(day.date)\"\n (click)=\"pickDate(day)\"\n [ngClass]=\"{\n 'datepicker-date_active': day.selected || (day.date === hoveredDate && range && !range.to),\n 'datepicker-date-range_hover': range && isHoveredRange(day),\n 'datepicker-date_disabled': day.disabled,\n 'color-text-30': day.disabled || (!range && !day.isCurrentMonth),\n 'datepicker-date-range_disabled': !day.isCurrentMonth && range,\n 'datepicker-date-range_active': isActiveRange(day)\n }\"\n >\n <teta-day-item [day]=\"day\"></teta-day-item>\n </div>\n }\n</div>\n" }]
|
|
1399
|
+
args: [{ selector: 'teta-day-picker', changeDetection: ChangeDetectionStrategy.OnPush, standalone: true, imports: [NgClass, DayItemComponent], template: "<div class=\"datepicker-week font-caption\">\n @for (day of dayOrder; track day) {\n <p class=\"datepicker-day\">\n {{ day }}\n </p>\n }\n</div>\n<div class=\"datepicker-picker color-text-90 font-body-3\">\n @for (day of calendar; track day.date.getTime()) {\n <div\n [class]=\"getRangeActiveClass(day) + ' datepicker-date font-body-3 datepicker_' + viewType\"\n (mouseenter)=\"hover(day.date)\"\n (click)=\"pickDate(day)\"\n [ngClass]=\"{\n 'datepicker-date_active': day.selected || (day.date === hoveredDate && range && !range.to),\n 'datepicker-date-range_hover': range && isHoveredRange(day),\n 'datepicker-date_disabled': day.disabled,\n 'color-text-30': day.disabled || (!range && !day.isCurrentMonth),\n 'datepicker-date-range_disabled': !day.isCurrentMonth && range,\n 'datepicker-date-range_active': isActiveRange(day)\n }\"\n >\n <teta-day-item [day]=\"day\"></teta-day-item>\n </div>\n }\n</div>\n" }]
|
|
1400
1400
|
}], ctorParameters: () => [], propDecorators: { date: [{
|
|
1401
1401
|
type: Input
|
|
1402
1402
|
}], calendar: [{
|
|
@@ -5621,15 +5621,8 @@ class FormsUtil {
|
|
|
5621
5621
|
}
|
|
5622
5622
|
static { this.formProvider = {
|
|
5623
5623
|
provide: ControlContainer,
|
|
5624
|
-
useFactory:
|
|
5625
|
-
deps: [
|
|
5626
|
-
[new Optional(), NgForm],
|
|
5627
|
-
[new Optional(), NgModelGroup],
|
|
5628
|
-
],
|
|
5624
|
+
useFactory: () => inject(ControlContainer, { skipSelf: true })
|
|
5629
5625
|
}; }
|
|
5630
|
-
static formFactory(ngForm, ngModelGroup) {
|
|
5631
|
-
return ngModelGroup || ngForm || null;
|
|
5632
|
-
}
|
|
5633
5626
|
}
|
|
5634
5627
|
|
|
5635
5628
|
class PropertyGridItemDescriptionDirective {
|
|
@@ -5650,49 +5643,6 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.1", ngImpor
|
|
|
5650
5643
|
args: ['tetaPropertyGridItemDescription']
|
|
5651
5644
|
}] } });
|
|
5652
5645
|
|
|
5653
|
-
class TableColumn extends FilterItem {
|
|
5654
|
-
/**
|
|
5655
|
-
* Инициализация из анонимного объекта
|
|
5656
|
-
*/
|
|
5657
|
-
constructor(options) {
|
|
5658
|
-
super(options);
|
|
5659
|
-
/**
|
|
5660
|
-
* Ширина
|
|
5661
|
-
*/
|
|
5662
|
-
this.width = 80;
|
|
5663
|
-
/**
|
|
5664
|
-
* Коэффициент растяжения ячейки
|
|
5665
|
-
*/
|
|
5666
|
-
this.flex = 1;
|
|
5667
|
-
/**
|
|
5668
|
-
* Дочерние колонки
|
|
5669
|
-
*/
|
|
5670
|
-
this.columns = [];
|
|
5671
|
-
this.width = options?.width ?? 80;
|
|
5672
|
-
this.flex = options?.flex ?? 1;
|
|
5673
|
-
this.headCellClass = options?.headCellClass ?? [];
|
|
5674
|
-
this.cellClass = options?.cellClass ?? [];
|
|
5675
|
-
this.locked = options?.locked ?? false;
|
|
5676
|
-
this.parentName = options?.parentName;
|
|
5677
|
-
this.unit = options?.unit ?? '';
|
|
5678
|
-
this.unitMeasureParameterId = options?.unitMeasureParameterId;
|
|
5679
|
-
this.unitId = options?.unitId;
|
|
5680
|
-
this.data = options?.data;
|
|
5681
|
-
this.editable = options?.editable ?? true;
|
|
5682
|
-
this.headCellComponent = options?.headCellComponent;
|
|
5683
|
-
this.headDropdownConfig = options?.headDropdownConfig;
|
|
5684
|
-
this.cellComponent = options?.cellComponent;
|
|
5685
|
-
this.aggregate = options?.aggregate;
|
|
5686
|
-
this.defaultValue = options?.defaultValue;
|
|
5687
|
-
this.maxValue = options?.maxValue;
|
|
5688
|
-
this.minValue = options?.minValue;
|
|
5689
|
-
this.maxLength = options?.maxLength;
|
|
5690
|
-
this.required = options?.required;
|
|
5691
|
-
this.columns = options?.columns?.map((x) => new TableColumn(x)) ?? [];
|
|
5692
|
-
this.validators = options?.validators;
|
|
5693
|
-
}
|
|
5694
|
-
}
|
|
5695
|
-
|
|
5696
5646
|
const TOGGLE_CONTROL_VALUE_ACCESSOR = {
|
|
5697
5647
|
provide: NG_VALUE_ACCESSOR,
|
|
5698
5648
|
useExisting: forwardRef(() => ToggleComponent),
|
|
@@ -6147,9 +6097,6 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.1", ngImpor
|
|
|
6147
6097
|
}] } });
|
|
6148
6098
|
|
|
6149
6099
|
class PropertyGridItemComponent {
|
|
6150
|
-
get template() {
|
|
6151
|
-
return this.itemTemplates.find((item) => item.name === this.column.name);
|
|
6152
|
-
}
|
|
6153
6100
|
get formGroup() {
|
|
6154
6101
|
if (this._formGroup instanceof FormGroup) {
|
|
6155
6102
|
return this._formGroup;
|
|
@@ -6159,30 +6106,40 @@ class PropertyGridItemComponent {
|
|
|
6159
6106
|
}
|
|
6160
6107
|
return null;
|
|
6161
6108
|
}
|
|
6162
|
-
|
|
6163
|
-
|
|
6164
|
-
|
|
6165
|
-
|
|
6109
|
+
constructor() {
|
|
6110
|
+
this.transloco = inject(TranslocoService);
|
|
6111
|
+
this._formGroup = inject(ControlContainer);
|
|
6112
|
+
this.column = input();
|
|
6113
|
+
this.hideNonEditable = input();
|
|
6114
|
+
this.dict = input();
|
|
6115
|
+
this.decimalPart = input();
|
|
6116
|
+
this.item = input();
|
|
6117
|
+
this.itemTemplates = input();
|
|
6118
|
+
this.template = computed(() => {
|
|
6119
|
+
return this.itemTemplates().find((item) => item.name === this.column().name);
|
|
6166
6120
|
});
|
|
6167
|
-
|
|
6168
|
-
|
|
6169
|
-
|
|
6170
|
-
|
|
6171
|
-
|
|
6172
|
-
|
|
6173
|
-
|
|
6174
|
-
|
|
6175
|
-
this._transloco = _transloco;
|
|
6176
|
-
this._formGroup = _formGroup;
|
|
6177
|
-
this.controlValueChange = new EventEmitter();
|
|
6121
|
+
this.editable = computed(() => {
|
|
6122
|
+
return boolOrFuncCallback(this.column().editable)({
|
|
6123
|
+
column: this.column(),
|
|
6124
|
+
row: this.formGroup?.getRawValue(),
|
|
6125
|
+
});
|
|
6126
|
+
});
|
|
6127
|
+
this.horizontal = input();
|
|
6128
|
+
this.controlValueChange = output();
|
|
6178
6129
|
this.align = Align;
|
|
6179
6130
|
this.filterTypeEnum = FilterType;
|
|
6131
|
+
this.caption = computed(() => {
|
|
6132
|
+
if (this.column().filterType === FilterType.boolean) {
|
|
6133
|
+
return '';
|
|
6134
|
+
}
|
|
6135
|
+
return `${this.column().caption}${this.column().unit ? `, ${this.column().unit}` : ''}`;
|
|
6136
|
+
});
|
|
6180
6137
|
this._alive = true;
|
|
6181
6138
|
}
|
|
6182
6139
|
getDict() {
|
|
6183
6140
|
const dict = this.dict ? this.dict[this.column.name] : [];
|
|
6184
|
-
if (this.column.parentName?.length > 0) {
|
|
6185
|
-
return dict?.filter((dictItem) => dictItem.parentId === this.formGroup?.getRawValue()[this.column.parentName]);
|
|
6141
|
+
if (this.column().parentName?.length > 0) {
|
|
6142
|
+
return dict?.filter((dictItem) => dictItem.parentId === this.formGroup?.getRawValue()[this.column().parentName]);
|
|
6186
6143
|
}
|
|
6187
6144
|
return dict;
|
|
6188
6145
|
}
|
|
@@ -6192,20 +6149,20 @@ class PropertyGridItemComponent {
|
|
|
6192
6149
|
getError(column) {
|
|
6193
6150
|
const control = this.formGroup?.get(column.name);
|
|
6194
6151
|
if (control?.hasError('required')) {
|
|
6195
|
-
return this.
|
|
6152
|
+
return this.transloco.translate('errors.field_is_required');
|
|
6196
6153
|
}
|
|
6197
6154
|
if (control?.hasError('min')) {
|
|
6198
|
-
return this.
|
|
6155
|
+
return this.transloco.translate('errors.min_value', {
|
|
6199
6156
|
value: column.minValue,
|
|
6200
6157
|
});
|
|
6201
6158
|
}
|
|
6202
6159
|
if (control?.hasError('max')) {
|
|
6203
|
-
return this.
|
|
6160
|
+
return this.transloco.translate('errors.max_value', {
|
|
6204
6161
|
value: column.maxValue,
|
|
6205
6162
|
});
|
|
6206
6163
|
}
|
|
6207
6164
|
if (control?.hasError('maxlength')) {
|
|
6208
|
-
return this.
|
|
6165
|
+
return this.transloco.translate('errors.max_length', {
|
|
6209
6166
|
value: column.maxLength,
|
|
6210
6167
|
});
|
|
6211
6168
|
}
|
|
@@ -6216,21 +6173,21 @@ class PropertyGridItemComponent {
|
|
|
6216
6173
|
this._formSub?.unsubscribe();
|
|
6217
6174
|
}
|
|
6218
6175
|
ngOnChanges(changes) {
|
|
6219
|
-
if (this.column && this.item) {
|
|
6220
|
-
this.formGroup.
|
|
6176
|
+
if (this.column() && this.item()) {
|
|
6177
|
+
this.formGroup.setControl(this.column().name, FormsUtil.initControlFromColumn(this.column(), this.item()));
|
|
6221
6178
|
this._formSub?.unsubscribe();
|
|
6222
|
-
this._formSub = this.formGroup?.controls[this.column.name]?.valueChanges
|
|
6179
|
+
this._formSub = this.formGroup?.controls[this.column().name]?.valueChanges
|
|
6223
6180
|
.pipe(takeWhile(() => this._alive))
|
|
6224
6181
|
.subscribe((_) => {
|
|
6225
6182
|
this.controlValueChange.emit({
|
|
6226
6183
|
id: _,
|
|
6227
|
-
name: this.column.name,
|
|
6184
|
+
name: this.column().name,
|
|
6228
6185
|
});
|
|
6229
6186
|
});
|
|
6230
6187
|
}
|
|
6231
6188
|
}
|
|
6232
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.1", ngImport: i0, type: PropertyGridItemComponent, deps: [
|
|
6233
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "18.2.1", type: PropertyGridItemComponent, isStandalone: true, selector: "teta-property-grid-item", inputs: { column: "column", hideNonEditable: "hideNonEditable", dict: "dict", decimalPart: "decimalPart", item: "item", itemTemplates: "itemTemplates", horizontal: "horizontal" }, outputs: { controlValueChange: "controlValueChange" }, usesOnChanges: true, ngImport: i0, template: "@if (editable || !hideNonEditable) {\n<teta-input\n
|
|
6189
|
+
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] }); }
|
|
6234
6191
|
}
|
|
6235
6192
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.1", ngImport: i0, type: PropertyGridItemComponent, decorators: [{
|
|
6236
6193
|
type: Component,
|
|
@@ -6244,88 +6201,29 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.1", ngImpor
|
|
|
6244
6201
|
ToggleComponent,
|
|
6245
6202
|
TextFieldComponent,
|
|
6246
6203
|
DisableControlDirective,
|
|
6247
|
-
], template: "@if (editable || !hideNonEditable) {\n<teta-input\n
|
|
6248
|
-
}], ctorParameters: () => [
|
|
6249
|
-
type: Optional
|
|
6250
|
-
}] }], propDecorators: { column: [{
|
|
6251
|
-
type: Input
|
|
6252
|
-
}], hideNonEditable: [{
|
|
6253
|
-
type: Input
|
|
6254
|
-
}], dict: [{
|
|
6255
|
-
type: Input
|
|
6256
|
-
}], decimalPart: [{
|
|
6257
|
-
type: Input
|
|
6258
|
-
}], item: [{
|
|
6259
|
-
type: Input
|
|
6260
|
-
}], itemTemplates: [{
|
|
6261
|
-
type: Input
|
|
6262
|
-
}], horizontal: [{
|
|
6263
|
-
type: Input
|
|
6264
|
-
}], controlValueChange: [{
|
|
6265
|
-
type: Output
|
|
6266
|
-
}] } });
|
|
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" }]
|
|
6205
|
+
}], ctorParameters: () => [] });
|
|
6267
6206
|
|
|
6268
6207
|
class PropertyGridGroupComponent {
|
|
6269
|
-
|
|
6270
|
-
|
|
6271
|
-
|
|
6272
|
-
|
|
6273
|
-
|
|
6274
|
-
|
|
6275
|
-
|
|
6276
|
-
|
|
6277
|
-
|
|
6278
|
-
|
|
6279
|
-
|
|
6280
|
-
|
|
6281
|
-
row: this.formGroup?.getRawValue(),
|
|
6282
|
-
});
|
|
6283
|
-
}
|
|
6284
|
-
constructor(_formGroup) {
|
|
6285
|
-
this._formGroup = _formGroup;
|
|
6286
|
-
this.controlValueChange = new EventEmitter();
|
|
6287
|
-
}
|
|
6288
|
-
trackColumns(index, column) {
|
|
6289
|
-
return column.name;
|
|
6290
|
-
}
|
|
6291
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.1", ngImport: i0, type: PropertyGridGroupComponent, deps: [{ token: i2.ControlContainer, optional: true }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
6292
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "18.2.1", type: PropertyGridGroupComponent, isStandalone: true, selector: "teta-property-grid-group", inputs: { column: "column", hideNonEditable: "hideNonEditable", dict: "dict", item: "item", horizontal: "horizontal", decimalPart: "decimalPart", itemTemplates: "itemTemplates" }, 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 trackColumns($index, col)) { @if (col.columns?.length < 1) { @if (column.editable\n || !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 } } @if (col.columns?.length > 0) {\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 </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] }); }
|
|
6208
|
+
constructor() {
|
|
6209
|
+
this.column = input();
|
|
6210
|
+
this.hideNonEditable = input();
|
|
6211
|
+
this.dict = input();
|
|
6212
|
+
this.item = input();
|
|
6213
|
+
this.horizontal = input();
|
|
6214
|
+
this.controlValueChange = output();
|
|
6215
|
+
this.decimalPart = input();
|
|
6216
|
+
this.itemTemplates = input();
|
|
6217
|
+
}
|
|
6218
|
+
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] }); }
|
|
6293
6220
|
}
|
|
6294
6221
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.1", ngImport: i0, type: PropertyGridGroupComponent, decorators: [{
|
|
6295
6222
|
type: Component,
|
|
6296
|
-
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
|
|
6297
|
-
}]
|
|
6298
|
-
type: Optional
|
|
6299
|
-
}] }], propDecorators: { column: [{
|
|
6300
|
-
type: Input
|
|
6301
|
-
}], hideNonEditable: [{
|
|
6302
|
-
type: Input
|
|
6303
|
-
}], dict: [{
|
|
6304
|
-
type: Input
|
|
6305
|
-
}], item: [{
|
|
6306
|
-
type: Input
|
|
6307
|
-
}], horizontal: [{
|
|
6308
|
-
type: Input
|
|
6309
|
-
}], controlValueChange: [{
|
|
6310
|
-
type: Output
|
|
6311
|
-
}], decimalPart: [{
|
|
6312
|
-
type: Input
|
|
6313
|
-
}], itemTemplates: [{
|
|
6314
|
-
type: Input
|
|
6315
|
-
}] } });
|
|
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"] }]
|
|
6224
|
+
}] });
|
|
6316
6225
|
|
|
6317
6226
|
class PropertyGridComponent {
|
|
6318
|
-
set item(item) {
|
|
6319
|
-
this._item = item;
|
|
6320
|
-
if (this.formGroup) {
|
|
6321
|
-
this.formGroup.patchValue(item, {
|
|
6322
|
-
emitEvent: false,
|
|
6323
|
-
});
|
|
6324
|
-
}
|
|
6325
|
-
}
|
|
6326
|
-
get item() {
|
|
6327
|
-
return this._item;
|
|
6328
|
-
}
|
|
6329
6227
|
get formGroup() {
|
|
6330
6228
|
if (this._formGroup instanceof FormGroup) {
|
|
6331
6229
|
return this._formGroup;
|
|
@@ -6338,8 +6236,22 @@ class PropertyGridComponent {
|
|
|
6338
6236
|
constructor(_formGroup) {
|
|
6339
6237
|
this._formGroup = _formGroup;
|
|
6340
6238
|
this.formClass = true;
|
|
6341
|
-
this.
|
|
6342
|
-
this.
|
|
6239
|
+
this.hideNonEditable = input();
|
|
6240
|
+
this.columns = input();
|
|
6241
|
+
this.dict = input();
|
|
6242
|
+
this.item = input();
|
|
6243
|
+
this.horizontal = input();
|
|
6244
|
+
this.decimalPart = input();
|
|
6245
|
+
this.controlValueChange = output();
|
|
6246
|
+
effect(() => {
|
|
6247
|
+
if (this.item() && this.formGroup) {
|
|
6248
|
+
for (const key in this.item()) {
|
|
6249
|
+
if (this.item().hasOwnProperty(key)) {
|
|
6250
|
+
this.formGroup.setControl(key, new UntypedFormControl(this.item()[key]));
|
|
6251
|
+
}
|
|
6252
|
+
}
|
|
6253
|
+
}
|
|
6254
|
+
});
|
|
6343
6255
|
}
|
|
6344
6256
|
getEditable(column) {
|
|
6345
6257
|
return boolOrFuncCallback(column.editable)({
|
|
@@ -6348,7 +6260,7 @@ class PropertyGridComponent {
|
|
|
6348
6260
|
});
|
|
6349
6261
|
}
|
|
6350
6262
|
onControlValueChange(event) {
|
|
6351
|
-
const affected = this.columns.filter((_) => _.parentName === event.name);
|
|
6263
|
+
const affected = this.columns().filter((_) => _.parentName === event.name);
|
|
6352
6264
|
if (affected?.length) {
|
|
6353
6265
|
affected.forEach((item) => {
|
|
6354
6266
|
const value = this.formGroup.getRawValue()[item.name];
|
|
@@ -6364,21 +6276,15 @@ class PropertyGridComponent {
|
|
|
6364
6276
|
}
|
|
6365
6277
|
this.controlValueChange.emit(event);
|
|
6366
6278
|
}
|
|
6367
|
-
ngOnDestroy() {
|
|
6368
|
-
this._alive = false;
|
|
6369
|
-
}
|
|
6370
|
-
trackColumns(index, column) {
|
|
6371
|
-
return column.name;
|
|
6372
|
-
}
|
|
6373
6279
|
getDictValue(value, name) {
|
|
6374
|
-
return this.dict[name]?.find((_) => _.id === value);
|
|
6280
|
+
return this.dict()[name]?.find((_) => _.id === value);
|
|
6375
6281
|
}
|
|
6376
6282
|
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 }); }
|
|
6377
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "18.2.1", type: PropertyGridComponent, isStandalone: true, selector: "teta-property-grid", inputs: { hideNonEditable: "hideNonEditable", columns: "columns", dict: "dict", item: "item", horizontal: "horizontal", decimalPart: "decimalPart" }, outputs: { controlValueChange: "controlValueChange" }, host: { properties: { "class.form-container": "this.formClass" } }, queries: [{ propertyName: "itemTemplates", predicate: PropertyGridItemDescriptionDirective }], ngImport: i0, template: "@if (columns
|
|
6283
|
+
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 }], 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] }); }
|
|
6378
6284
|
}
|
|
6379
6285
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.1", ngImport: i0, type: PropertyGridComponent, decorators: [{
|
|
6380
6286
|
type: Component,
|
|
6381
|
-
args: [{ selector: 'teta-property-grid', viewProviders: [FormsUtil.formProvider], standalone: true, imports: [PropertyGridItemComponent, FormsModule, ReactiveFormsModule, PropertyGridGroupComponent], template: "@if (columns
|
|
6287
|
+
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"] }]
|
|
6382
6288
|
}], ctorParameters: () => [{ type: i2.ControlContainer, decorators: [{
|
|
6383
6289
|
type: Optional
|
|
6384
6290
|
}] }], propDecorators: { formClass: [{
|
|
@@ -6387,70 +6293,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.1", ngImpor
|
|
|
6387
6293
|
}], itemTemplates: [{
|
|
6388
6294
|
type: ContentChildren,
|
|
6389
6295
|
args: [PropertyGridItemDescriptionDirective]
|
|
6390
|
-
}], hideNonEditable: [{
|
|
6391
|
-
type: Input
|
|
6392
|
-
}], columns: [{
|
|
6393
|
-
type: Input
|
|
6394
|
-
}], dict: [{
|
|
6395
|
-
type: Input
|
|
6396
|
-
}], item: [{
|
|
6397
|
-
type: Input
|
|
6398
|
-
}], horizontal: [{
|
|
6399
|
-
type: Input
|
|
6400
|
-
}], decimalPart: [{
|
|
6401
|
-
type: Input
|
|
6402
|
-
}], controlValueChange: [{
|
|
6403
|
-
type: Output
|
|
6404
6296
|
}] } });
|
|
6405
6297
|
|
|
6406
|
-
class PropertyGridModule {
|
|
6407
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.1", ngImport: i0, type: PropertyGridModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
|
|
6408
|
-
static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "18.2.1", ngImport: i0, type: PropertyGridModule, imports: [CommonModule,
|
|
6409
|
-
FormsModule,
|
|
6410
|
-
ReactiveFormsModule,
|
|
6411
|
-
TranslocoModule,
|
|
6412
|
-
PropertyGridComponent,
|
|
6413
|
-
PropertyGridGroupComponent,
|
|
6414
|
-
PropertyGridItemComponent,
|
|
6415
|
-
PropertyGridItemDescriptionDirective], exports: [PropertyGridComponent, PropertyGridItemDescriptionDirective] }); }
|
|
6416
|
-
static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "18.2.1", ngImport: i0, type: PropertyGridModule, providers: [
|
|
6417
|
-
{
|
|
6418
|
-
provide: TRANSLOCO_SCOPE,
|
|
6419
|
-
useValue: { scope: 'errors', alias: 'errors' },
|
|
6420
|
-
multi: true,
|
|
6421
|
-
},
|
|
6422
|
-
], imports: [CommonModule,
|
|
6423
|
-
FormsModule,
|
|
6424
|
-
ReactiveFormsModule,
|
|
6425
|
-
TranslocoModule,
|
|
6426
|
-
PropertyGridComponent,
|
|
6427
|
-
PropertyGridGroupComponent,
|
|
6428
|
-
PropertyGridItemComponent] }); }
|
|
6429
|
-
}
|
|
6430
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.1", ngImport: i0, type: PropertyGridModule, decorators: [{
|
|
6431
|
-
type: NgModule,
|
|
6432
|
-
args: [{
|
|
6433
|
-
exports: [PropertyGridComponent, PropertyGridItemDescriptionDirective],
|
|
6434
|
-
imports: [
|
|
6435
|
-
CommonModule,
|
|
6436
|
-
FormsModule,
|
|
6437
|
-
ReactiveFormsModule,
|
|
6438
|
-
TranslocoModule,
|
|
6439
|
-
PropertyGridComponent,
|
|
6440
|
-
PropertyGridGroupComponent,
|
|
6441
|
-
PropertyGridItemComponent,
|
|
6442
|
-
PropertyGridItemDescriptionDirective,
|
|
6443
|
-
],
|
|
6444
|
-
providers: [
|
|
6445
|
-
{
|
|
6446
|
-
provide: TRANSLOCO_SCOPE,
|
|
6447
|
-
useValue: { scope: 'errors', alias: 'errors' },
|
|
6448
|
-
multi: true,
|
|
6449
|
-
},
|
|
6450
|
-
],
|
|
6451
|
-
}]
|
|
6452
|
-
}] });
|
|
6453
|
-
|
|
6454
6298
|
var SidebarPosition;
|
|
6455
6299
|
(function (SidebarPosition) {
|
|
6456
6300
|
SidebarPosition[SidebarPosition["left"] = 0] = "left";
|
|
@@ -6875,6 +6719,49 @@ class ColumnReorderEvent {
|
|
|
6875
6719
|
}
|
|
6876
6720
|
}
|
|
6877
6721
|
|
|
6722
|
+
class TableColumn extends FilterItem {
|
|
6723
|
+
/**
|
|
6724
|
+
* Инициализация из анонимного объекта
|
|
6725
|
+
*/
|
|
6726
|
+
constructor(options) {
|
|
6727
|
+
super(options);
|
|
6728
|
+
/**
|
|
6729
|
+
* Ширина
|
|
6730
|
+
*/
|
|
6731
|
+
this.width = 80;
|
|
6732
|
+
/**
|
|
6733
|
+
* Коэффициент растяжения ячейки
|
|
6734
|
+
*/
|
|
6735
|
+
this.flex = 1;
|
|
6736
|
+
/**
|
|
6737
|
+
* Дочерние колонки
|
|
6738
|
+
*/
|
|
6739
|
+
this.columns = [];
|
|
6740
|
+
this.width = options?.width ?? 80;
|
|
6741
|
+
this.flex = options?.flex ?? 1;
|
|
6742
|
+
this.headCellClass = options?.headCellClass ?? [];
|
|
6743
|
+
this.cellClass = options?.cellClass ?? [];
|
|
6744
|
+
this.locked = options?.locked ?? false;
|
|
6745
|
+
this.parentName = options?.parentName;
|
|
6746
|
+
this.unit = options?.unit ?? '';
|
|
6747
|
+
this.unitMeasureParameterId = options?.unitMeasureParameterId;
|
|
6748
|
+
this.unitId = options?.unitId;
|
|
6749
|
+
this.data = options?.data;
|
|
6750
|
+
this.editable = options?.editable ?? true;
|
|
6751
|
+
this.headCellComponent = options?.headCellComponent;
|
|
6752
|
+
this.headDropdownConfig = options?.headDropdownConfig;
|
|
6753
|
+
this.cellComponent = options?.cellComponent;
|
|
6754
|
+
this.aggregate = options?.aggregate;
|
|
6755
|
+
this.defaultValue = options?.defaultValue;
|
|
6756
|
+
this.maxValue = options?.maxValue;
|
|
6757
|
+
this.minValue = options?.minValue;
|
|
6758
|
+
this.maxLength = options?.maxLength;
|
|
6759
|
+
this.required = options?.required;
|
|
6760
|
+
this.columns = options?.columns?.map((x) => new TableColumn(x)) ?? [];
|
|
6761
|
+
this.validators = options?.validators;
|
|
6762
|
+
}
|
|
6763
|
+
}
|
|
6764
|
+
|
|
6878
6765
|
class TableColumnStore {
|
|
6879
6766
|
constructor(options) {
|
|
6880
6767
|
if (options) {
|
|
@@ -11665,5 +11552,5 @@ function tetaZoneOptimized(ngZone) {
|
|
|
11665
11552
|
* Generated bundle index. Do not edit.
|
|
11666
11553
|
*/
|
|
11667
11554
|
|
|
11668
|
-
export { ANIMATION_FRAME, AccordionComponent, AccordionContentDirective, AccordionHeadComponent, AccordionItemComponent, AggregationType, Align, ArrayUtil, AutoPositionDirective, AutocompleteComponent, AvatarComponent, BooleanCellComponent, BooleanFilter, BooleanFilterComponent, ButtonComponent, CHECKBOX_CONTROL_VALUE_ACCESSOR, CellComponent, CellComponentBase, CellHostComponent, Chart3dComponent, Chart3dOptions, CheckboxComponent, ClickOutsideDirective, ClickService, ColorInputComponent, ColumnReorderEvent, ColumnResizeEvent, ContextMenuDirective, CurrentModal, DATE_PICKER_CONTROL_VALUE_ACCESSOR, DATE_Range_CONTROL_VALUE_ACCESSOR, DateCalendarComponent, DateCellComponent, DateFilter, DateFilterComponent, DateFilterValue, DatePeriod, DatePickerComponent, DatePickerMode, DateRangeComponent, DateTimeCellComponent, DateUtil, DayModel, DelimiterComponent, DetailComponentBase, DialogComponent, DialogService, DisableControlDirective, DividerComponent, DomUtil, DragContainerDirective, DragContainerInstance, DragDirective, DragDropService, DragInstance, DragPlaceholderDirective, DragPreviewDirective, DragSortContainerDirective, DragSortItemDirective, DropdownComponent, DropdownContentDirective, DropdownDirective, DropdownHeadDirective, DynamicComponentService, DynamicContentBaseDirective, DynamicData, EditEvent, EditType, ExpandCardComponent, ExpandItemComponent, ExpandPanelComponent, ExpandPanelContentDirective, ExpandPanelHeadDirective, ExportType, FileItemComponent, FileUploadAreaComponent, FilterBase, FilterComponentBase, FilterHostComponent, FilterItem, FilterState, FilterType, FormGroupTitleComponent, FormsUtil, HeadCellComponentBase, HeadCellHostComponent, HighlightDirective, HintDirective, IconComponent, IconFileComponent, IconService, IconSpriteDirective, InputComponent, LetContext, LetDirective, ListCellComponent, ListFilter, ListFilterComponent, ListFilterType, LoaderDirective, Message, MessageComponent, MessageHostComponent, MessageService, ModalCloseReason, ModalContainerComponent, ModalInstance, ModalModule, ModalService, NoAutofillDirective, NumberPipe, NumericCellComponent, NumericFilter, NumericFilterComponent, NumericFilterValue, OnlyNumberDirective, OverlayContainerService, PagerComponent, PagerState, PagerUtil, PanelComponent, PopupContentComponent, PositionUtil, ProgressBarComponent, PropertyGridComponent, PropertyGridItemComponent, PropertyGridItemDescriptionDirective,
|
|
11555
|
+
export { ANIMATION_FRAME, AccordionComponent, AccordionContentDirective, AccordionHeadComponent, AccordionItemComponent, AggregationType, Align, ArrayUtil, AutoPositionDirective, AutocompleteComponent, AvatarComponent, BooleanCellComponent, BooleanFilter, BooleanFilterComponent, ButtonComponent, CHECKBOX_CONTROL_VALUE_ACCESSOR, CellComponent, CellComponentBase, CellHostComponent, Chart3dComponent, Chart3dOptions, CheckboxComponent, ClickOutsideDirective, ClickService, ColorInputComponent, ColumnReorderEvent, ColumnResizeEvent, ContextMenuDirective, CurrentModal, DATE_PICKER_CONTROL_VALUE_ACCESSOR, DATE_Range_CONTROL_VALUE_ACCESSOR, DateCalendarComponent, DateCellComponent, DateFilter, DateFilterComponent, DateFilterValue, DatePeriod, DatePickerComponent, DatePickerMode, DateRangeComponent, DateTimeCellComponent, DateUtil, DayModel, DelimiterComponent, DetailComponentBase, DialogComponent, DialogService, DisableControlDirective, DividerComponent, DomUtil, DragContainerDirective, DragContainerInstance, DragDirective, DragDropService, DragInstance, DragPlaceholderDirective, DragPreviewDirective, DragSortContainerDirective, DragSortItemDirective, DropdownComponent, DropdownContentDirective, DropdownDirective, DropdownHeadDirective, DynamicComponentService, DynamicContentBaseDirective, DynamicData, EditEvent, EditType, ExpandCardComponent, ExpandItemComponent, ExpandPanelComponent, ExpandPanelContentDirective, ExpandPanelHeadDirective, ExportType, FileItemComponent, FileUploadAreaComponent, FilterBase, FilterComponentBase, FilterHostComponent, FilterItem, FilterState, FilterType, FormGroupTitleComponent, FormsUtil, HeadCellComponentBase, HeadCellHostComponent, HighlightDirective, HintDirective, IconComponent, IconFileComponent, IconService, IconSpriteDirective, InputComponent, LetContext, LetDirective, ListCellComponent, ListFilter, ListFilterComponent, ListFilterType, LoaderDirective, Message, MessageComponent, MessageHostComponent, MessageService, ModalCloseReason, ModalContainerComponent, ModalInstance, ModalModule, ModalService, NoAutofillDirective, NumberPipe, NumericCellComponent, NumericFilter, NumericFilterComponent, NumericFilterValue, OnlyNumberDirective, OverlayContainerService, PagerComponent, PagerState, PagerUtil, PanelComponent, PopupContentComponent, PositionUtil, ProgressBarComponent, PropertyGridComponent, PropertyGridItemComponent, PropertyGridItemDescriptionDirective, RadioButtonComponent, RadioComponent, RangeCalendarComponent, ResizeDragDirective, ResizePanelComponent, SLIDER_CONTROL_VALUE_ACCESSOR, SWITCH_CONTROL_VALUE_ACCESSOR, ScrollIntoViewDirective, ScrollableComponent, ScrollableDirective, SelectComponent, SelectOptionDirective, SelectType, SelectValueDirective, SidebarComponent, SidebarPosition, SortEvent, SortParam, StateUtil, StepperComponent, StringCellComponent, StringFilter, StringFilterComponent, StringFilterType, StringUtil, SwitchButtonComponent, SwitchComponent, TOGGLE_CONTROL_VALUE_ACCESSOR, TabComponent, TabContentDirective, TabTitleDirective, TableBodyComponent, TableColumn, TableColumnStore, TableComponent, TableHeadComponent, TableRow, TableRowComponent, TableService, TableUtil, TabsComponent, TetaConfigService, TetaContentRef, TetaDatePipe, TetaSize, TetaTemplateDirective, TextFieldComponent, ThemeSwitchComponent, ThemeSwitchService, ToggleComponent, ToolbarComponent, TooltipDirective, TreeComponent, TreeItemToggleComponent, TreeService, VerticalAlign, WINDOW, boolOrFuncCallback, enLocale, exportDomToImage, formatNumber, getCellComponent, getPrecision, isFunction, prependZero, ruLocale, tetaZoneFree, tetaZoneFull, tetaZoneOptimized };
|
|
11669
11556
|
//# sourceMappingURL=tetacom-ng-components.mjs.map
|