@tetacom/ng-components 1.0.42 → 1.0.43
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/filter/base/filter-component-base.d.ts +1 -2
- package/component/filter/boolean-filter/boolean-filter.component.d.ts +1 -2
- package/component/filter/date-filter/date-filter.component.d.ts +1 -2
- package/component/filter/filter-host/filter-host.component.d.ts +1 -2
- package/component/filter/list-filter/list-filter.component.d.ts +1 -2
- package/component/filter/numeric-filter/numeric-filter.component.d.ts +1 -2
- package/component/filter/string-filter/string-filter.component.d.ts +1 -2
- package/component/table/base/cell-component-base.d.ts +1 -2
- package/component/table/base/detail-component-base.d.ts +1 -2
- package/component/table/base/head-cell-component-base.d.ts +2 -2
- package/component/table/cell/cell.component.d.ts +1 -2
- package/component/table/cell-host/cell-host.component.d.ts +1 -2
- package/component/table/contract/i-cell-instance.d.ts +1 -2
- package/component/table/contract/public-api.d.ts +0 -1
- package/component/table/contract/table-column.d.ts +0 -16
- package/component/table/default/boolean-cell/boolean-cell.component.d.ts +1 -2
- package/component/table/default/date-cell/date-cell.component.d.ts +1 -2
- package/component/table/default/date-time-cell/date-time-cell.component.d.ts +1 -2
- package/component/table/default/default-head-cell/default-head-cell.component.d.ts +6 -4
- package/component/table/default/list-cell/list-cell.component.d.ts +1 -2
- package/component/table/default/numeric-cell/numeric-cell.component.d.ts +1 -2
- package/component/table/default/string-cell/string-cell.component.d.ts +1 -2
- package/component/table/head-cell/head-cell.component.d.ts +1 -2
- package/component/table/head-cell-dropdown/head-cell-dropdown.component.d.ts +1 -2
- package/component/table/head-cell-host/head-cell-host.component.d.ts +6 -4
- package/component/table/public-api.d.ts +0 -1
- package/component/table/selection-cell/selection-cell.component.d.ts +2 -3
- package/component/table/service/table.service.d.ts +13 -17
- package/component/table/table/table.component.d.ts +12 -18
- package/component/table/table-body/table-body.component.d.ts +11 -17
- package/component/table/table-head/filter-dropdown-tab/filter-dropdown-tab.component.d.ts +1 -2
- package/component/table/table-head/main-dropdown-tab/main-dropdown-tab.component.d.ts +1 -2
- package/component/table/table-head/table-head.component.d.ts +1 -2
- package/component/table/table-head/visibility-dropdown-tab/visibility-dropdown-tab.component.d.ts +1 -2
- package/component/table/table-head-group/table-head-group.component.d.ts +1 -2
- package/component/table/table.module.d.ts +31 -32
- package/esm2020/common/util/array-util.mjs +2 -2
- package/esm2020/component/filter/base/filter-component-base.mjs +1 -1
- package/esm2020/component/filter/boolean-filter/boolean-filter.component.mjs +1 -1
- package/esm2020/component/filter/date-filter/date-filter.component.mjs +1 -1
- package/esm2020/component/filter/filter-host/filter-host.component.mjs +1 -1
- package/esm2020/component/filter/list-filter/list-filter.component.mjs +1 -1
- package/esm2020/component/filter/numeric-filter/numeric-filter.component.mjs +1 -1
- package/esm2020/component/filter/string-filter/string-filter.component.mjs +1 -1
- package/esm2020/component/select/select/select.component.mjs +2 -2
- package/esm2020/component/table/base/cell-component-base.mjs +2 -2
- package/esm2020/component/table/base/detail-component-base.mjs +1 -1
- package/esm2020/component/table/base/head-cell-component-base.mjs +1 -1
- package/esm2020/component/table/cell/cell.component.mjs +1 -1
- package/esm2020/component/table/cell-host/cell-host.component.mjs +1 -1
- package/esm2020/component/table/contract/i-cell-instance.mjs +1 -1
- package/esm2020/component/table/contract/public-api.mjs +1 -2
- package/esm2020/component/table/contract/table-column.mjs +1 -8
- package/esm2020/component/table/default/boolean-cell/boolean-cell.component.mjs +3 -3
- package/esm2020/component/table/default/date-cell/date-cell.component.mjs +4 -4
- package/esm2020/component/table/default/date-time-cell/date-time-cell.component.mjs +4 -4
- package/esm2020/component/table/default/default-head-cell/default-head-cell.component.mjs +11 -2
- package/esm2020/component/table/default/list-cell/list-cell.component.mjs +6 -6
- package/esm2020/component/table/default/numeric-cell/numeric-cell.component.mjs +3 -3
- package/esm2020/component/table/default/string-cell/string-cell.component.mjs +3 -3
- package/esm2020/component/table/head-cell/head-cell.component.mjs +3 -3
- package/esm2020/component/table/head-cell-dropdown/head-cell-dropdown.component.mjs +1 -1
- package/esm2020/component/table/head-cell-host/head-cell-host.component.mjs +14 -2
- package/esm2020/component/table/public-api.mjs +1 -2
- package/esm2020/component/table/selection-cell/selection-cell.component.mjs +1 -1
- package/esm2020/component/table/service/table.service.mjs +10 -12
- package/esm2020/component/table/table/table.component.mjs +18 -15
- package/esm2020/component/table/table-body/table-body.component.mjs +32 -35
- package/esm2020/component/table/table-head/filter-dropdown-tab/filter-dropdown-tab.component.mjs +1 -1
- package/esm2020/component/table/table-head/main-dropdown-tab/main-dropdown-tab.component.mjs +1 -1
- package/esm2020/component/table/table-head/table-head.component.mjs +1 -1
- package/esm2020/component/table/table-head/visibility-dropdown-tab/visibility-dropdown-tab.component.mjs +1 -1
- package/esm2020/component/table/table-head-group/table-head-group.component.mjs +1 -1
- package/esm2020/component/table/table.module.mjs +1 -6
- package/esm2020/directive/scroll-into-view/scroll-into-view.directive.mjs +2 -2
- package/fesm2015/tetacom-ng-components.mjs +112 -159
- package/fesm2015/tetacom-ng-components.mjs.map +1 -1
- package/fesm2020/tetacom-ng-components.mjs +106 -156
- package/fesm2020/tetacom-ng-components.mjs.map +1 -1
- package/package.json +1 -1
- package/style/switch.scss +1 -2
- package/component/table/base/group-row-component-base.d.ts +0 -12
- package/component/table/contract/table-row.d.ts +0 -17
- package/component/table/default/group-row/group-row.component.d.ts +0 -13
- package/esm2020/component/table/base/group-row-component-base.mjs +0 -3
- package/esm2020/component/table/contract/table-row.mjs +0 -40
- package/esm2020/component/table/default/group-row/group-row.component.mjs +0 -20
|
@@ -13,8 +13,7 @@ import * as i1$1 from '@ngneat/transloco';
|
|
|
13
13
|
import { TranslocoModule, TRANSLOCO_SCOPE } from '@ngneat/transloco';
|
|
14
14
|
import * as i5 from '@angular/cdk/scrolling';
|
|
15
15
|
import { ScrollingModule, CdkVirtualScrollViewport } from '@angular/cdk/scrolling';
|
|
16
|
-
import
|
|
17
|
-
import hash__default from 'object-hash';
|
|
16
|
+
import objectHash from 'object-hash';
|
|
18
17
|
import * as THREE from 'three';
|
|
19
18
|
import { OrbitControls } from 'three/examples/jsm/controls/OrbitControls';
|
|
20
19
|
import * as d3 from 'd3';
|
|
@@ -3073,7 +3072,7 @@ class ArrayUtil {
|
|
|
3073
3072
|
return result;
|
|
3074
3073
|
}
|
|
3075
3074
|
static findParents(tree, item) {
|
|
3076
|
-
if (tree
|
|
3075
|
+
if (tree?.indexOf(item) >= 0) {
|
|
3077
3076
|
return tree;
|
|
3078
3077
|
}
|
|
3079
3078
|
if (Array.isArray(tree)) {
|
|
@@ -4645,7 +4644,7 @@ class SelectComponent {
|
|
|
4645
4644
|
else {
|
|
4646
4645
|
this.value =
|
|
4647
4646
|
this.options &&
|
|
4648
|
-
this.options
|
|
4647
|
+
this.options?.find((option) => this.getValue(option) === value);
|
|
4649
4648
|
}
|
|
4650
4649
|
this._cdr.detectChanges();
|
|
4651
4650
|
}
|
|
@@ -6902,45 +6901,6 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.0.0", ngImpor
|
|
|
6902
6901
|
}]
|
|
6903
6902
|
}] });
|
|
6904
6903
|
|
|
6905
|
-
class TableRow {
|
|
6906
|
-
constructor(data) {
|
|
6907
|
-
this.expanded = false;
|
|
6908
|
-
this.showDetails = false;
|
|
6909
|
-
this.path = [];
|
|
6910
|
-
this.groupValue = [];
|
|
6911
|
-
// children: GridRow<T>[] = [];
|
|
6912
|
-
// parents: GridRow<T>[];
|
|
6913
|
-
// private backup: any = {};
|
|
6914
|
-
this._edit = false;
|
|
6915
|
-
if (data) {
|
|
6916
|
-
this.data = data;
|
|
6917
|
-
}
|
|
6918
|
-
}
|
|
6919
|
-
set edit(value) {
|
|
6920
|
-
if (value !== this._edit) {
|
|
6921
|
-
this._edit = value;
|
|
6922
|
-
this._hash = null;
|
|
6923
|
-
}
|
|
6924
|
-
}
|
|
6925
|
-
get edit() {
|
|
6926
|
-
return this._edit;
|
|
6927
|
-
}
|
|
6928
|
-
get hash() {
|
|
6929
|
-
if (!this._hash) {
|
|
6930
|
-
const hashObj = { ...this.data };
|
|
6931
|
-
if (hashObj.children) {
|
|
6932
|
-
delete hashObj.children;
|
|
6933
|
-
}
|
|
6934
|
-
this._hash = hash.sha1(hashObj);
|
|
6935
|
-
}
|
|
6936
|
-
return this._hash;
|
|
6937
|
-
}
|
|
6938
|
-
editData(items) {
|
|
6939
|
-
this.data = items;
|
|
6940
|
-
this._hash = null;
|
|
6941
|
-
}
|
|
6942
|
-
}
|
|
6943
|
-
|
|
6944
6904
|
class TableColumn extends FilterItem {
|
|
6945
6905
|
/**
|
|
6946
6906
|
* Инициализация из анонимного объекта
|
|
@@ -6955,10 +6915,6 @@ class TableColumn extends FilterItem {
|
|
|
6955
6915
|
* Коэффициент растяжения ячейки
|
|
6956
6916
|
*/
|
|
6957
6917
|
this.flex = 0;
|
|
6958
|
-
/**
|
|
6959
|
-
* Порядок группировки
|
|
6960
|
-
*/
|
|
6961
|
-
this.groupingOrder = 0;
|
|
6962
6918
|
this.width = options?.width ?? 150;
|
|
6963
6919
|
this.flex = options?.flex ?? 0;
|
|
6964
6920
|
this.headCellClass = options?.headCellClass ?? [];
|
|
@@ -6970,9 +6926,6 @@ class TableColumn extends FilterItem {
|
|
|
6970
6926
|
this.unitId = options?.unitId;
|
|
6971
6927
|
this.data = options?.data;
|
|
6972
6928
|
this.editable = options?.editable ?? true;
|
|
6973
|
-
this.groupBy = options?.groupBy ?? false;
|
|
6974
|
-
this.groupingOrder = options?.groupingOrder ?? 0;
|
|
6975
|
-
this.groupByFn = options?.groupByFn;
|
|
6976
6929
|
this.headCellComponent = options?.headCellComponent;
|
|
6977
6930
|
this.headDropdownConfig = options?.headDropdownConfig;
|
|
6978
6931
|
this.cellComponent = options?.cellComponent;
|
|
@@ -7185,7 +7138,12 @@ class TableService {
|
|
|
7185
7138
|
this.selectType = SelectType.mouse;
|
|
7186
7139
|
this.editType = EditType.cell;
|
|
7187
7140
|
this.editEvent = EditEvent.doubleClick;
|
|
7188
|
-
this.trackRow = (index, row) =>
|
|
7141
|
+
this.trackRow = (index, row) => {
|
|
7142
|
+
if (row['id']) {
|
|
7143
|
+
return row['id'];
|
|
7144
|
+
}
|
|
7145
|
+
return index;
|
|
7146
|
+
};
|
|
7189
7147
|
this.initialColumns = [];
|
|
7190
7148
|
this.displayColumns = [];
|
|
7191
7149
|
this._columns = new BehaviorSubject([]);
|
|
@@ -7202,7 +7160,6 @@ class TableService {
|
|
|
7202
7160
|
this._valueSet = new Subject();
|
|
7203
7161
|
this._stateChanged = new Subject();
|
|
7204
7162
|
this._filterClear = new Subject();
|
|
7205
|
-
this._groupToggle = new Subject();
|
|
7206
7163
|
this._selectedRows = new BehaviorSubject([]);
|
|
7207
7164
|
this._activeRow = new BehaviorSubject(null);
|
|
7208
7165
|
this._scrollIndex = new Subject();
|
|
@@ -7219,7 +7176,6 @@ class TableService {
|
|
|
7219
7176
|
this.valueSet = this._valueSet.asObservable();
|
|
7220
7177
|
this.stateChanged = this._stateChanged.asObservable();
|
|
7221
7178
|
this.filterClear = this._filterClear.asObservable();
|
|
7222
|
-
this.groupToggle = this._groupToggle.asObservable();
|
|
7223
7179
|
this.selectedRows = this._selectedRows.asObservable();
|
|
7224
7180
|
this.activeRow = this._activeRow.asObservable();
|
|
7225
7181
|
this.hiddenColumns = this._hiddenColumns.asObservable();
|
|
@@ -7232,7 +7188,7 @@ class TableService {
|
|
|
7232
7188
|
return this._currentEditCell;
|
|
7233
7189
|
}
|
|
7234
7190
|
setData(data) {
|
|
7235
|
-
this._displayData.next(data
|
|
7191
|
+
this._displayData.next(data ? [...data] : []);
|
|
7236
7192
|
}
|
|
7237
7193
|
setDict(dict) {
|
|
7238
7194
|
this._dict.next(dict);
|
|
@@ -7246,10 +7202,9 @@ class TableService {
|
|
|
7246
7202
|
'editable',
|
|
7247
7203
|
'cellComponent',
|
|
7248
7204
|
'headCellComponent',
|
|
7249
|
-
'headDropdownConfig'
|
|
7250
|
-
'groupByFn',
|
|
7205
|
+
'headDropdownConfig'
|
|
7251
7206
|
];
|
|
7252
|
-
this.initialColumnsHash =
|
|
7207
|
+
this.initialColumnsHash = objectHash(this.initialColumns, {
|
|
7253
7208
|
algorithm: 'sha1',
|
|
7254
7209
|
ignoreUnknown: true,
|
|
7255
7210
|
excludeKeys: (key) => {
|
|
@@ -7576,9 +7531,6 @@ class TableService {
|
|
|
7576
7531
|
columnIsHidden(column) {
|
|
7577
7532
|
return this._hiddenColumns.value.indexOf(column.name) >= 0;
|
|
7578
7533
|
}
|
|
7579
|
-
toggleGroup(row) {
|
|
7580
|
-
this._groupToggle.next(row);
|
|
7581
|
-
}
|
|
7582
7534
|
changeValue(coordinates) {
|
|
7583
7535
|
this._valueChanged.next(coordinates);
|
|
7584
7536
|
}
|
|
@@ -7597,7 +7549,7 @@ class TableService {
|
|
|
7597
7549
|
this._valueSet.next(value);
|
|
7598
7550
|
}
|
|
7599
7551
|
getRowByIndex(rowIndex) {
|
|
7600
|
-
return this._displayData
|
|
7552
|
+
return this._displayData?.value[rowIndex];
|
|
7601
7553
|
}
|
|
7602
7554
|
getRowIndex(row) {
|
|
7603
7555
|
return this._displayData.value.indexOf(row);
|
|
@@ -7772,26 +7724,6 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.0.0", ngImpor
|
|
|
7772
7724
|
}]
|
|
7773
7725
|
}], ctorParameters: function () { return []; } });
|
|
7774
7726
|
|
|
7775
|
-
class GroupRowComponentBase {
|
|
7776
|
-
}
|
|
7777
|
-
|
|
7778
|
-
class GroupRowComponent extends GroupRowComponentBase {
|
|
7779
|
-
constructor() {
|
|
7780
|
-
super();
|
|
7781
|
-
}
|
|
7782
|
-
ngOnInit() { }
|
|
7783
|
-
}
|
|
7784
|
-
GroupRowComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.0.0", ngImport: i0, type: GroupRowComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
7785
|
-
GroupRowComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.0.0", type: GroupRowComponent, selector: "teta-group-row", inputs: { row: "row", columns: "columns" }, usesInheritance: true, ngImport: i0, template: "<span>{{row.groupValue[row.level]}} ()</span>\n<!--<span>{{row.groupValue[row.level]}} ({{row.children.length}})</span>-->\n", styles: [""], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
7786
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.0.0", ngImport: i0, type: GroupRowComponent, decorators: [{
|
|
7787
|
-
type: Component,
|
|
7788
|
-
args: [{ selector: 'teta-group-row', changeDetection: ChangeDetectionStrategy.OnPush, template: "<span>{{row.groupValue[row.level]}} ()</span>\n<!--<span>{{row.groupValue[row.level]}} ({{row.children.length}})</span>-->\n" }]
|
|
7789
|
-
}], ctorParameters: function () { return []; }, propDecorators: { row: [{
|
|
7790
|
-
type: Input
|
|
7791
|
-
}], columns: [{
|
|
7792
|
-
type: Input
|
|
7793
|
-
}] } });
|
|
7794
|
-
|
|
7795
7727
|
class ClickService {
|
|
7796
7728
|
constructor(_document) {
|
|
7797
7729
|
this._document = _document;
|
|
@@ -8149,6 +8081,13 @@ class DefaultHeadCellComponent extends HeadCellComponentBase {
|
|
|
8149
8081
|
get column() {
|
|
8150
8082
|
return this._column;
|
|
8151
8083
|
}
|
|
8084
|
+
set columns(val) {
|
|
8085
|
+
this._columns = val;
|
|
8086
|
+
this._cdr.detectChanges();
|
|
8087
|
+
}
|
|
8088
|
+
get columns() {
|
|
8089
|
+
return this._columns;
|
|
8090
|
+
}
|
|
8152
8091
|
set data(data) {
|
|
8153
8092
|
this._data = data;
|
|
8154
8093
|
this._cdr.detectChanges();
|
|
@@ -8160,12 +8099,14 @@ class DefaultHeadCellComponent extends HeadCellComponentBase {
|
|
|
8160
8099
|
}
|
|
8161
8100
|
}
|
|
8162
8101
|
DefaultHeadCellComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.0.0", ngImport: i0, type: DefaultHeadCellComponent, deps: [{ token: i0.ChangeDetectorRef }], target: i0.ɵɵFactoryTarget.Component });
|
|
8163
|
-
DefaultHeadCellComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.0.0", type: DefaultHeadCellComponent, selector: "teta-default-head-cell", inputs: { column: "column", data: "data" }, usesInheritance: true, ngImport: i0, template: "<div class=\"column column_auto\" [tetaHint]=\"column.hint || column.caption\">\n <div class=\"table-head__cell__text\">\n {{column.caption}}\n </div>\n <div *ngIf=\"column.unit\" class=\"table-head__cell__text font-caption\" style=\"overflow: visible;\">\n [{{column.unit}}]\n </div>\n</div>\n", styles: [":host{align-items:center;justify-content:center;display:flex;min-width:0;padding:6px 8px}\n"], dependencies: [{ kind: "directive", type: i2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: HintDirective, selector: "[tetaHint]", inputs: ["tetaHint", "align", "verticalAlign", "delay"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
8102
|
+
DefaultHeadCellComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.0.0", type: DefaultHeadCellComponent, selector: "teta-default-head-cell", inputs: { column: "column", columns: "columns", data: "data" }, usesInheritance: true, ngImport: i0, template: "<div class=\"column column_auto\" [tetaHint]=\"column.hint || column.caption\">\n <div class=\"table-head__cell__text\">\n {{column.caption}}\n </div>\n <div *ngIf=\"column.unit\" class=\"table-head__cell__text font-caption\" style=\"overflow: visible;\">\n [{{column.unit}}]\n </div>\n</div>\n", styles: [":host{align-items:center;justify-content:center;display:flex;min-width:0;padding:6px 8px}\n"], dependencies: [{ kind: "directive", type: i2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: HintDirective, selector: "[tetaHint]", inputs: ["tetaHint", "align", "verticalAlign", "delay"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
8164
8103
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.0.0", ngImport: i0, type: DefaultHeadCellComponent, decorators: [{
|
|
8165
8104
|
type: Component,
|
|
8166
8105
|
args: [{ selector: 'teta-default-head-cell', changeDetection: ChangeDetectionStrategy.OnPush, template: "<div class=\"column column_auto\" [tetaHint]=\"column.hint || column.caption\">\n <div class=\"table-head__cell__text\">\n {{column.caption}}\n </div>\n <div *ngIf=\"column.unit\" class=\"table-head__cell__text font-caption\" style=\"overflow: visible;\">\n [{{column.unit}}]\n </div>\n</div>\n", styles: [":host{align-items:center;justify-content:center;display:flex;min-width:0;padding:6px 8px}\n"] }]
|
|
8167
8106
|
}], ctorParameters: function () { return [{ type: i0.ChangeDetectorRef }]; }, propDecorators: { column: [{
|
|
8168
8107
|
type: Input
|
|
8108
|
+
}], columns: [{
|
|
8109
|
+
type: Input
|
|
8169
8110
|
}], data: [{
|
|
8170
8111
|
type: Input
|
|
8171
8112
|
}] } });
|
|
@@ -8183,6 +8124,15 @@ class HeadCellHostComponent {
|
|
|
8183
8124
|
get column() {
|
|
8184
8125
|
return this._column;
|
|
8185
8126
|
}
|
|
8127
|
+
set columns(columns) {
|
|
8128
|
+
this._columns = columns;
|
|
8129
|
+
if (this.init) {
|
|
8130
|
+
this.componentRef.instance.columns = this._columns;
|
|
8131
|
+
}
|
|
8132
|
+
}
|
|
8133
|
+
get columns() {
|
|
8134
|
+
return this._columns;
|
|
8135
|
+
}
|
|
8186
8136
|
set data(data) {
|
|
8187
8137
|
this._data = data;
|
|
8188
8138
|
if (this.init) {
|
|
@@ -8199,17 +8149,20 @@ class HeadCellHostComponent {
|
|
|
8199
8149
|
this.componentRef =
|
|
8200
8150
|
this.viewContainerRef.createComponent(this.column.headCellComponent);
|
|
8201
8151
|
this.componentRef.instance.column = this.column;
|
|
8152
|
+
this.componentRef.instance.columns = this.columns;
|
|
8202
8153
|
this.componentRef.instance.data = this.data;
|
|
8203
8154
|
this.init = true;
|
|
8204
8155
|
}
|
|
8205
8156
|
}
|
|
8206
8157
|
HeadCellHostComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.0.0", ngImport: i0, type: HeadCellHostComponent, deps: [{ token: i0.ViewContainerRef }], target: i0.ɵɵFactoryTarget.Component });
|
|
8207
|
-
HeadCellHostComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.0.0", type: HeadCellHostComponent, selector: "teta-head-cell-host", inputs: { column: "column", data: "data" }, ngImport: i0, template: '', isInline: true, styles: [":host{display:contents}\n"], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
8158
|
+
HeadCellHostComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.0.0", type: HeadCellHostComponent, selector: "teta-head-cell-host", inputs: { column: "column", columns: "columns", data: "data" }, ngImport: i0, template: '', isInline: true, styles: [":host{display:contents}\n"], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
8208
8159
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.0.0", ngImport: i0, type: HeadCellHostComponent, decorators: [{
|
|
8209
8160
|
type: Component,
|
|
8210
8161
|
args: [{ selector: 'teta-head-cell-host', template: '', changeDetection: ChangeDetectionStrategy.OnPush, styles: [":host{display:contents}\n"] }]
|
|
8211
8162
|
}], ctorParameters: function () { return [{ type: i0.ViewContainerRef }]; }, propDecorators: { column: [{
|
|
8212
8163
|
type: Input
|
|
8164
|
+
}], columns: [{
|
|
8165
|
+
type: Input
|
|
8213
8166
|
}], data: [{
|
|
8214
8167
|
type: Input
|
|
8215
8168
|
}] } });
|
|
@@ -8971,10 +8924,10 @@ class HeadCellComponent {
|
|
|
8971
8924
|
}
|
|
8972
8925
|
}
|
|
8973
8926
|
HeadCellComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.0.0", ngImport: i0, type: HeadCellComponent, deps: [{ token: TableService }, { token: i0.ApplicationRef }, { token: i0.ElementRef }], target: i0.ɵɵFactoryTarget.Component });
|
|
8974
|
-
HeadCellComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.0.0", type: HeadCellComponent, selector: "teta-head-cell", inputs: { column: "column", showHeadCellMenu: "showHeadCellMenu", data: "data" }, host: { listeners: { "dragstart": "dragstart($event)", "dragenter": "dragenter($event)", "dragover": "allowDrop($event)", "dragleave": "dragleave($event)", "dragend": "dragend($event)", "drop": "drop($event)" }, properties: { "class.table-head__cell_active": "this.dropDownOpen" } }, viewQueries: [{ propertyName: "mainTemplate", first: true, predicate: ["mainTemplate"], descendants: true, static: true }, { propertyName: "filterTemplate", first: true, predicate: ["filterTemplate"], descendants: true, static: true }, { propertyName: "columnsTemplate", first: true, predicate: ["columnsTemplate"], descendants: true, static: true }], ngImport: i0, template: "<div draggable=\"true\" class=\"row row_auto\">\n <teta-dropdown [autoCloseIgnore]=\"['enter', 'inside']\"\n [verticalAlign]=\"verticalAlign.bottom\"\n [appendToBody]=\"false\"\n [(open)]=\"dropDownOpen\"\n [align]=\"align.left\"\n (click)=\"$event.preventDefault()\"\n [class.table-head__cell__menu_open]=\"dropDownOpen\"\n class=\"column column_auto justify-content-center\">\n <div tetaDropdownHead class=\"table-head__cell__wrapper\"\n [ngClass]=\"column.headCellClass\">\n <teta-head-cell-host [column]=\"column\" [data]=\"data\"></teta-head-cell-host>\n <teta-icon *ngIf=\"iconName | async as icon\"\n [palette]=\"'text'\"\n [name]=\"icon\"></teta-icon>\n </div>\n <teta-head-cell-dropdown tetaDropdownContent\n *ngIf=\"showHeadCellMenu\"\n [tabTemplates]=\"tabTemplates\"\n [data]=\"data\"\n [column]=\"column\"\n [columns]=\"columns | async\"\n [state]=\"state | async\"\n [(dropDownOpen)]=\"dropDownOpen\"></teta-head-cell-dropdown>\n </teta-dropdown>\n <div class=\"drop-area\"\n draggable=\"false\"\n [class.drop-area_left]=\"showDrag === 'left'\"\n [class.drop-area_right]=\"showDrag === 'right'\"\n *ngIf=\"showDrag\"></div>\n</div>\n<div class=\"table-head__cell__resize\"\n draggable=\"false\"\n (dragstart)=\"$event.preventDefault();$event.stopPropagation()\"\n (drag)=\"$event.preventDefault();$event.stopPropagation()\"\n [tetaResizeDrag]=\"'vertical'\"\n (resizeStart)=\"resizeStart($event)\"\n (resizeProcess)=\"resizeProcess($event)\"\n (resizeEnd)=\"resizeEnd()\">\n <div class=\"table-head__cell__resize_drag\"></div>\n</div>\n<ng-template #mainTemplate let-column=\"column\" let-columns=\"columns\" let-data=\"data\" let-state=\"state\"\n let-close=\"close\">\n <teta-main-dropdown-tab [column]=\"column\" [state]=\"state\" [close]=\"close\"></teta-main-dropdown-tab>\n</ng-template>\n<ng-template #filterTemplate let-column=\"column\" let-columns=\"columns\" let-data=\"data\" let-state=\"state\"\n let-close=\"close\">\n <teta-filter-dropdown-tab [column]=\"column\"\n [state]=\"state\"\n [close]=\"close\"\n [data]=\"data\"></teta-filter-dropdown-tab>\n</ng-template>\n<ng-template #columnsTemplate let-column=\"column\" let-columns=\"columns\" let-data=\"data\" let-state=\"state\"\n let-close=\"close\">\n <teta-visibility-dropdown-tab [column]=\"column\"\n [columns]=\"columns\"\n [state]=\"state\"\n [close]=\"close\"\n [data]=\"data\"></teta-visibility-dropdown-tab>\n</ng-template>\n", styles: [".drop-area{position:absolute;width:1px;background:var(--color-text-50);top:0;bottom:0;z-index:10}.drop-area_left{left:-1px}.drop-area_right{right:-1px}\n"], dependencies: [{ kind: "directive", type: i2.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: IconComponent, selector: "teta-icon", inputs: ["name", "size", "palette", "class"] }, { kind: "component", type: DropdownComponent, selector: "teta-dropdown", exportAs: ["dropdown"] }, { kind: "directive", type: DropdownHeadDirective, selector: "[tetaDropdownHead]" }, { kind: "directive", type: DropdownContentDirective, selector: "[tetaDropdownContent]" }, { kind: "directive", type: ResizeDragDirective, selector: "[tetaResizeDrag]", inputs: ["tetaResizeDrag"], outputs: ["resizeStart", "resizeProcess", "resizeEnd"] }, { kind: "component", type: HeadCellHostComponent, selector: "teta-head-cell-host", inputs: ["column", "data"] }, { kind: "component", type: HeadCellDropdownComponent, selector: "teta-head-cell-dropdown", inputs: ["columns", "column", "state", "data", "tabTemplates", "dropDownOpen"], outputs: ["dropDownOpenChange"] }, { kind: "component", type: MainDropdownTabComponent, selector: "teta-main-dropdown-tab", inputs: ["columns", "column", "state", "data", "close"] }, { kind: "component", type: FilterDropdownTabComponent, selector: "teta-filter-dropdown-tab", inputs: ["columns", "column", "state", "data", "close"] }, { kind: "component", type: VisibilityDropdownTabComponent, selector: "teta-visibility-dropdown-tab", inputs: ["columns", "column", "state", "data", "close"] }, { kind: "pipe", type: i2.AsyncPipe, name: "async" }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
8927
|
+
HeadCellComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.0.0", type: HeadCellComponent, selector: "teta-head-cell", inputs: { column: "column", showHeadCellMenu: "showHeadCellMenu", data: "data" }, host: { listeners: { "dragstart": "dragstart($event)", "dragenter": "dragenter($event)", "dragover": "allowDrop($event)", "dragleave": "dragleave($event)", "dragend": "dragend($event)", "drop": "drop($event)" }, properties: { "class.table-head__cell_active": "this.dropDownOpen" } }, viewQueries: [{ propertyName: "mainTemplate", first: true, predicate: ["mainTemplate"], descendants: true, static: true }, { propertyName: "filterTemplate", first: true, predicate: ["filterTemplate"], descendants: true, static: true }, { propertyName: "columnsTemplate", first: true, predicate: ["columnsTemplate"], descendants: true, static: true }], ngImport: i0, template: "<div draggable=\"true\" class=\"row row_auto\">\n <teta-dropdown [autoCloseIgnore]=\"['enter', 'inside']\"\n [verticalAlign]=\"verticalAlign.bottom\"\n [appendToBody]=\"false\"\n [(open)]=\"dropDownOpen\"\n [align]=\"align.left\"\n (click)=\"$event.preventDefault()\"\n [class.table-head__cell__menu_open]=\"dropDownOpen\"\n class=\"column column_auto justify-content-center\">\n <div tetaDropdownHead class=\"table-head__cell__wrapper\"\n [ngClass]=\"column.headCellClass\">\n <teta-head-cell-host [column]=\"column\" [columns]=\"columns | async\" [data]=\"data\"></teta-head-cell-host>\n <teta-icon *ngIf=\"iconName | async as icon\"\n [palette]=\"'text'\"\n [name]=\"icon\"></teta-icon>\n </div>\n <teta-head-cell-dropdown tetaDropdownContent\n *ngIf=\"showHeadCellMenu\"\n [tabTemplates]=\"tabTemplates\"\n [data]=\"data\"\n [column]=\"column\"\n [columns]=\"columns | async\"\n [state]=\"state | async\"\n [(dropDownOpen)]=\"dropDownOpen\"></teta-head-cell-dropdown>\n </teta-dropdown>\n <div class=\"drop-area\"\n draggable=\"false\"\n [class.drop-area_left]=\"showDrag === 'left'\"\n [class.drop-area_right]=\"showDrag === 'right'\"\n *ngIf=\"showDrag\"></div>\n</div>\n<div class=\"table-head__cell__resize\"\n draggable=\"false\"\n (dragstart)=\"$event.preventDefault();$event.stopPropagation()\"\n (drag)=\"$event.preventDefault();$event.stopPropagation()\"\n [tetaResizeDrag]=\"'vertical'\"\n (resizeStart)=\"resizeStart($event)\"\n (resizeProcess)=\"resizeProcess($event)\"\n (resizeEnd)=\"resizeEnd()\">\n <div class=\"table-head__cell__resize_drag\"></div>\n</div>\n<ng-template #mainTemplate let-column=\"column\" let-columns=\"columns\" let-data=\"data\" let-state=\"state\"\n let-close=\"close\">\n <teta-main-dropdown-tab [column]=\"column\" [state]=\"state\" [close]=\"close\"></teta-main-dropdown-tab>\n</ng-template>\n<ng-template #filterTemplate let-column=\"column\" let-columns=\"columns\" let-data=\"data\" let-state=\"state\"\n let-close=\"close\">\n <teta-filter-dropdown-tab [column]=\"column\"\n [state]=\"state\"\n [close]=\"close\"\n [data]=\"data\"></teta-filter-dropdown-tab>\n</ng-template>\n<ng-template #columnsTemplate let-column=\"column\" let-columns=\"columns\" let-data=\"data\" let-state=\"state\"\n let-close=\"close\">\n <teta-visibility-dropdown-tab [column]=\"column\"\n [columns]=\"columns\"\n [state]=\"state\"\n [close]=\"close\"\n [data]=\"data\"></teta-visibility-dropdown-tab>\n</ng-template>\n", styles: [".drop-area{position:absolute;width:1px;background:var(--color-text-50);top:0;bottom:0;z-index:10}.drop-area_left{left:-1px}.drop-area_right{right:-1px}\n"], dependencies: [{ kind: "directive", type: i2.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: IconComponent, selector: "teta-icon", inputs: ["name", "size", "palette", "class"] }, { kind: "component", type: DropdownComponent, selector: "teta-dropdown", exportAs: ["dropdown"] }, { kind: "directive", type: DropdownHeadDirective, selector: "[tetaDropdownHead]" }, { kind: "directive", type: DropdownContentDirective, selector: "[tetaDropdownContent]" }, { kind: "directive", type: ResizeDragDirective, selector: "[tetaResizeDrag]", inputs: ["tetaResizeDrag"], outputs: ["resizeStart", "resizeProcess", "resizeEnd"] }, { kind: "component", type: HeadCellHostComponent, selector: "teta-head-cell-host", inputs: ["column", "columns", "data"] }, { kind: "component", type: HeadCellDropdownComponent, selector: "teta-head-cell-dropdown", inputs: ["columns", "column", "state", "data", "tabTemplates", "dropDownOpen"], outputs: ["dropDownOpenChange"] }, { kind: "component", type: MainDropdownTabComponent, selector: "teta-main-dropdown-tab", inputs: ["columns", "column", "state", "data", "close"] }, { kind: "component", type: FilterDropdownTabComponent, selector: "teta-filter-dropdown-tab", inputs: ["columns", "column", "state", "data", "close"] }, { kind: "component", type: VisibilityDropdownTabComponent, selector: "teta-visibility-dropdown-tab", inputs: ["columns", "column", "state", "data", "close"] }, { kind: "pipe", type: i2.AsyncPipe, name: "async" }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
8975
8928
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.0.0", ngImport: i0, type: HeadCellComponent, decorators: [{
|
|
8976
8929
|
type: Component,
|
|
8977
|
-
args: [{ selector: 'teta-head-cell', changeDetection: ChangeDetectionStrategy.OnPush, template: "<div draggable=\"true\" class=\"row row_auto\">\n <teta-dropdown [autoCloseIgnore]=\"['enter', 'inside']\"\n [verticalAlign]=\"verticalAlign.bottom\"\n [appendToBody]=\"false\"\n [(open)]=\"dropDownOpen\"\n [align]=\"align.left\"\n (click)=\"$event.preventDefault()\"\n [class.table-head__cell__menu_open]=\"dropDownOpen\"\n class=\"column column_auto justify-content-center\">\n <div tetaDropdownHead class=\"table-head__cell__wrapper\"\n [ngClass]=\"column.headCellClass\">\n <teta-head-cell-host [column]=\"column\" [data]=\"data\"></teta-head-cell-host>\n <teta-icon *ngIf=\"iconName | async as icon\"\n [palette]=\"'text'\"\n [name]=\"icon\"></teta-icon>\n </div>\n <teta-head-cell-dropdown tetaDropdownContent\n *ngIf=\"showHeadCellMenu\"\n [tabTemplates]=\"tabTemplates\"\n [data]=\"data\"\n [column]=\"column\"\n [columns]=\"columns | async\"\n [state]=\"state | async\"\n [(dropDownOpen)]=\"dropDownOpen\"></teta-head-cell-dropdown>\n </teta-dropdown>\n <div class=\"drop-area\"\n draggable=\"false\"\n [class.drop-area_left]=\"showDrag === 'left'\"\n [class.drop-area_right]=\"showDrag === 'right'\"\n *ngIf=\"showDrag\"></div>\n</div>\n<div class=\"table-head__cell__resize\"\n draggable=\"false\"\n (dragstart)=\"$event.preventDefault();$event.stopPropagation()\"\n (drag)=\"$event.preventDefault();$event.stopPropagation()\"\n [tetaResizeDrag]=\"'vertical'\"\n (resizeStart)=\"resizeStart($event)\"\n (resizeProcess)=\"resizeProcess($event)\"\n (resizeEnd)=\"resizeEnd()\">\n <div class=\"table-head__cell__resize_drag\"></div>\n</div>\n<ng-template #mainTemplate let-column=\"column\" let-columns=\"columns\" let-data=\"data\" let-state=\"state\"\n let-close=\"close\">\n <teta-main-dropdown-tab [column]=\"column\" [state]=\"state\" [close]=\"close\"></teta-main-dropdown-tab>\n</ng-template>\n<ng-template #filterTemplate let-column=\"column\" let-columns=\"columns\" let-data=\"data\" let-state=\"state\"\n let-close=\"close\">\n <teta-filter-dropdown-tab [column]=\"column\"\n [state]=\"state\"\n [close]=\"close\"\n [data]=\"data\"></teta-filter-dropdown-tab>\n</ng-template>\n<ng-template #columnsTemplate let-column=\"column\" let-columns=\"columns\" let-data=\"data\" let-state=\"state\"\n let-close=\"close\">\n <teta-visibility-dropdown-tab [column]=\"column\"\n [columns]=\"columns\"\n [state]=\"state\"\n [close]=\"close\"\n [data]=\"data\"></teta-visibility-dropdown-tab>\n</ng-template>\n", styles: [".drop-area{position:absolute;width:1px;background:var(--color-text-50);top:0;bottom:0;z-index:10}.drop-area_left{left:-1px}.drop-area_right{right:-1px}\n"] }]
|
|
8930
|
+
args: [{ selector: 'teta-head-cell', changeDetection: ChangeDetectionStrategy.OnPush, template: "<div draggable=\"true\" class=\"row row_auto\">\n <teta-dropdown [autoCloseIgnore]=\"['enter', 'inside']\"\n [verticalAlign]=\"verticalAlign.bottom\"\n [appendToBody]=\"false\"\n [(open)]=\"dropDownOpen\"\n [align]=\"align.left\"\n (click)=\"$event.preventDefault()\"\n [class.table-head__cell__menu_open]=\"dropDownOpen\"\n class=\"column column_auto justify-content-center\">\n <div tetaDropdownHead class=\"table-head__cell__wrapper\"\n [ngClass]=\"column.headCellClass\">\n <teta-head-cell-host [column]=\"column\" [columns]=\"columns | async\" [data]=\"data\"></teta-head-cell-host>\n <teta-icon *ngIf=\"iconName | async as icon\"\n [palette]=\"'text'\"\n [name]=\"icon\"></teta-icon>\n </div>\n <teta-head-cell-dropdown tetaDropdownContent\n *ngIf=\"showHeadCellMenu\"\n [tabTemplates]=\"tabTemplates\"\n [data]=\"data\"\n [column]=\"column\"\n [columns]=\"columns | async\"\n [state]=\"state | async\"\n [(dropDownOpen)]=\"dropDownOpen\"></teta-head-cell-dropdown>\n </teta-dropdown>\n <div class=\"drop-area\"\n draggable=\"false\"\n [class.drop-area_left]=\"showDrag === 'left'\"\n [class.drop-area_right]=\"showDrag === 'right'\"\n *ngIf=\"showDrag\"></div>\n</div>\n<div class=\"table-head__cell__resize\"\n draggable=\"false\"\n (dragstart)=\"$event.preventDefault();$event.stopPropagation()\"\n (drag)=\"$event.preventDefault();$event.stopPropagation()\"\n [tetaResizeDrag]=\"'vertical'\"\n (resizeStart)=\"resizeStart($event)\"\n (resizeProcess)=\"resizeProcess($event)\"\n (resizeEnd)=\"resizeEnd()\">\n <div class=\"table-head__cell__resize_drag\"></div>\n</div>\n<ng-template #mainTemplate let-column=\"column\" let-columns=\"columns\" let-data=\"data\" let-state=\"state\"\n let-close=\"close\">\n <teta-main-dropdown-tab [column]=\"column\" [state]=\"state\" [close]=\"close\"></teta-main-dropdown-tab>\n</ng-template>\n<ng-template #filterTemplate let-column=\"column\" let-columns=\"columns\" let-data=\"data\" let-state=\"state\"\n let-close=\"close\">\n <teta-filter-dropdown-tab [column]=\"column\"\n [state]=\"state\"\n [close]=\"close\"\n [data]=\"data\"></teta-filter-dropdown-tab>\n</ng-template>\n<ng-template #columnsTemplate let-column=\"column\" let-columns=\"columns\" let-data=\"data\" let-state=\"state\"\n let-close=\"close\">\n <teta-visibility-dropdown-tab [column]=\"column\"\n [columns]=\"columns\"\n [state]=\"state\"\n [close]=\"close\"\n [data]=\"data\"></teta-visibility-dropdown-tab>\n</ng-template>\n", styles: [".drop-area{position:absolute;width:1px;background:var(--color-text-50);top:0;bottom:0;z-index:10}.drop-area_left{left:-1px}.drop-area_right{right:-1px}\n"] }]
|
|
8978
8931
|
}], ctorParameters: function () { return [{ type: TableService }, { type: i0.ApplicationRef }, { type: i0.ElementRef }]; }, propDecorators: { column: [{
|
|
8979
8932
|
type: Input
|
|
8980
8933
|
}], showHeadCellMenu: [{
|
|
@@ -9252,7 +9205,7 @@ class CellComponentBase {
|
|
|
9252
9205
|
.pipe(takeWhile((_) => this._alive))
|
|
9253
9206
|
.subscribe((cellValue) => {
|
|
9254
9207
|
if (this.index === cellValue.row && this.column.name === cellValue.column) {
|
|
9255
|
-
this.row
|
|
9208
|
+
this.row[this.column.name] = cellValue.value;
|
|
9256
9209
|
this.cdr.detectChanges();
|
|
9257
9210
|
}
|
|
9258
9211
|
});
|
|
@@ -9317,10 +9270,10 @@ class NumericCellComponent extends CellComponentBase {
|
|
|
9317
9270
|
}
|
|
9318
9271
|
}
|
|
9319
9272
|
NumericCellComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.0.0", ngImport: i0, type: NumericCellComponent, deps: [{ token: TableService }, { token: i0.ChangeDetectorRef }], target: i0.ɵɵFactoryTarget.Component });
|
|
9320
|
-
NumericCellComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.0.0", type: NumericCellComponent, selector: "teta-numeric-cell", inputs: { column: "column", row: "row" }, viewQueries: [{ propertyName: "input", first: true, predicate: ["input"], descendants: true }], usesInheritance: true, ngImport: i0, template: "<span [style.display]=\"edit ? 'none' : 'block'\"\n class=\"cell-text\"\n [class.cell-text_disabled]=\"!editable\">\n {{row
|
|
9273
|
+
NumericCellComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.0.0", type: NumericCellComponent, selector: "teta-numeric-cell", inputs: { column: "column", row: "row" }, viewQueries: [{ propertyName: "input", first: true, predicate: ["input"], descendants: true }], usesInheritance: true, ngImport: i0, template: "<span [style.display]=\"edit ? 'none' : 'block'\"\n class=\"cell-text\"\n [class.cell-text_disabled]=\"!editable\">\n {{row[column.name] | tetaNumber : 2}}\n</span>\n<input #input\n *ngIf=\"edit\"\n tetaOnlyNumber\n type=\"text\"\n class=\"input row_auto border-radius-0\"\n (blur)=\"setValue()\"\n [ngModel]=\"row[column.name]\"\n (ngModelChange)=\"row[column.name]=$event;\"/>\n", styles: [""], dependencies: [{ kind: "directive", type: i2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i3.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: i3.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i3.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "directive", type: OnlyNumberDirective, selector: "[tetaOnlyNumber]", inputs: ["tetaOnlyNumber", "allowDecimals", "allowSign", "decimalSeparator", "commaSeparator"] }, { kind: "pipe", type: NumberPipe, name: "tetaNumber" }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
9321
9274
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.0.0", ngImport: i0, type: NumericCellComponent, decorators: [{
|
|
9322
9275
|
type: Component,
|
|
9323
|
-
args: [{ selector: 'teta-numeric-cell', changeDetection: ChangeDetectionStrategy.OnPush, template: "<span [style.display]=\"edit ? 'none' : 'block'\"\n class=\"cell-text\"\n [class.cell-text_disabled]=\"!editable\">\n {{row
|
|
9276
|
+
args: [{ selector: 'teta-numeric-cell', changeDetection: ChangeDetectionStrategy.OnPush, template: "<span [style.display]=\"edit ? 'none' : 'block'\"\n class=\"cell-text\"\n [class.cell-text_disabled]=\"!editable\">\n {{row[column.name] | tetaNumber : 2}}\n</span>\n<input #input\n *ngIf=\"edit\"\n tetaOnlyNumber\n type=\"text\"\n class=\"input row_auto border-radius-0\"\n (blur)=\"setValue()\"\n [ngModel]=\"row[column.name]\"\n (ngModelChange)=\"row[column.name]=$event;\"/>\n" }]
|
|
9324
9277
|
}], ctorParameters: function () { return [{ type: TableService }, { type: i0.ChangeDetectorRef }]; }, propDecorators: { column: [{
|
|
9325
9278
|
type: Input
|
|
9326
9279
|
}], row: [{
|
|
@@ -9340,7 +9293,7 @@ class DateCellComponent extends CellComponentBase {
|
|
|
9340
9293
|
super.ngOnInit();
|
|
9341
9294
|
}
|
|
9342
9295
|
setValue(value) {
|
|
9343
|
-
this.row
|
|
9296
|
+
this.row[this.column.name] = value ? new Date(value) : value;
|
|
9344
9297
|
this.valueChanged();
|
|
9345
9298
|
this.cdr.detectChanges();
|
|
9346
9299
|
}
|
|
@@ -9357,10 +9310,10 @@ class DateCellComponent extends CellComponentBase {
|
|
|
9357
9310
|
}
|
|
9358
9311
|
}
|
|
9359
9312
|
DateCellComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.0.0", ngImport: i0, type: DateCellComponent, deps: [{ token: TableService }, { token: i0.ChangeDetectorRef }], target: i0.ɵɵFactoryTarget.Component });
|
|
9360
|
-
DateCellComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.0.0", type: DateCellComponent, selector: "teta-date-cell", inputs: { column: "column", row: "row" }, viewQueries: [{ propertyName: "input", first: true, predicate: ["input"], descendants: true }], usesInheritance: true, ngImport: i0, template: "<span [style.display]=\"edit ? 'none' : 'block'\"\n class=\"cell-text\"\n [class.cell-text_disabled]=\"!editable\">\n {{row
|
|
9313
|
+
DateCellComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.0.0", type: DateCellComponent, selector: "teta-date-cell", inputs: { column: "column", row: "row" }, viewQueries: [{ propertyName: "input", first: true, predicate: ["input"], descendants: true }], usesInheritance: true, ngImport: i0, template: "<span [style.display]=\"edit ? 'none' : 'block'\"\n class=\"cell-text\"\n [class.cell-text_disabled]=\"!editable\">\n {{row[column.name] | date : 'dd.MM.yyyy'}}\n</span>\n<teta-date-picker class=\"datepicker-table\"\n #input\n *ngIf=\"edit\"\n [appendToBody]=\"true\"\n [showTime]=\"false\"\n [ngModel]=\"row[column.name]\"\n (ngModelChange)=\"setValue($event)\"\n></teta-date-picker>\n", styles: [""], dependencies: [{ kind: "directive", type: i2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i3.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i3.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "component", type: DatePickerComponent, selector: "teta-date-picker", inputs: ["disabled", "invalid", "firstDayOfWeek", "disabledDates", "disabledPeriods", "disabledDays", "minDate", "maxDate", "minYearDate", "maxYearDate", "align", "verticalAlign", "appendToBody", "allowNull", "backdrop", "showTime", "format"] }, { kind: "pipe", type: i2.DatePipe, name: "date" }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
9361
9314
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.0.0", ngImport: i0, type: DateCellComponent, decorators: [{
|
|
9362
9315
|
type: Component,
|
|
9363
|
-
args: [{ selector: 'teta-date-cell', changeDetection: ChangeDetectionStrategy.OnPush, template: "<span [style.display]=\"edit ? 'none' : 'block'\"\n class=\"cell-text\"\n [class.cell-text_disabled]=\"!editable\">\n {{row
|
|
9316
|
+
args: [{ selector: 'teta-date-cell', changeDetection: ChangeDetectionStrategy.OnPush, template: "<span [style.display]=\"edit ? 'none' : 'block'\"\n class=\"cell-text\"\n [class.cell-text_disabled]=\"!editable\">\n {{row[column.name] | date : 'dd.MM.yyyy'}}\n</span>\n<teta-date-picker class=\"datepicker-table\"\n #input\n *ngIf=\"edit\"\n [appendToBody]=\"true\"\n [showTime]=\"false\"\n [ngModel]=\"row[column.name]\"\n (ngModelChange)=\"setValue($event)\"\n></teta-date-picker>\n" }]
|
|
9364
9317
|
}], ctorParameters: function () { return [{ type: TableService }, { type: i0.ChangeDetectorRef }]; }, propDecorators: { column: [{
|
|
9365
9318
|
type: Input
|
|
9366
9319
|
}], row: [{
|
|
@@ -9383,7 +9336,7 @@ class ListCellComponent extends CellComponentBase {
|
|
|
9383
9336
|
}
|
|
9384
9337
|
get displayFilterOptions() {
|
|
9385
9338
|
if (this.column?.parentName?.length > 0) {
|
|
9386
|
-
const parentValue = this.row
|
|
9339
|
+
const parentValue = this.row[this.column.parentName];
|
|
9387
9340
|
if (parentValue) {
|
|
9388
9341
|
return this.filterOptions.filter(_ => _.parentId === parentValue);
|
|
9389
9342
|
}
|
|
@@ -9392,7 +9345,7 @@ class ListCellComponent extends CellComponentBase {
|
|
|
9392
9345
|
}
|
|
9393
9346
|
setValue(value) {
|
|
9394
9347
|
// if(this.c)
|
|
9395
|
-
this.row
|
|
9348
|
+
this.row[this.column.name] = value;
|
|
9396
9349
|
this.valueChanged();
|
|
9397
9350
|
}
|
|
9398
9351
|
startEdit(initiator, type) {
|
|
@@ -9415,7 +9368,7 @@ class ListCellComponent extends CellComponentBase {
|
|
|
9415
9368
|
!(this.filterOptions instanceof Array)) {
|
|
9416
9369
|
return '';
|
|
9417
9370
|
}
|
|
9418
|
-
const item = this.filterOptions.find((option) => option.id === this.row
|
|
9371
|
+
const item = this.filterOptions.find((option) => option.id === this.row[this.column.name]);
|
|
9419
9372
|
if (item === null || item === undefined) {
|
|
9420
9373
|
return '';
|
|
9421
9374
|
}
|
|
@@ -9423,10 +9376,10 @@ class ListCellComponent extends CellComponentBase {
|
|
|
9423
9376
|
}
|
|
9424
9377
|
}
|
|
9425
9378
|
ListCellComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.0.0", ngImport: i0, type: ListCellComponent, deps: [{ token: TableService }, { token: i0.ChangeDetectorRef }], target: i0.ɵɵFactoryTarget.Component });
|
|
9426
|
-
ListCellComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.0.0", type: ListCellComponent, selector: "teta-list-cell", inputs: { column: "column", row: "row", filterOptions: "filterOptions" }, viewQueries: [{ propertyName: "input", first: true, predicate: ["input"], descendants: true }], usesInheritance: true, ngImport: i0, template: "<span [style.display]=\"edit ? 'none' : 'block'\"\n class=\"cell-text\"\n [class.cell-text_disabled]=\"!editable\">\n {{value}}\n</span>\n<teta-select #input\n class=\"row_auto select-table\"\n *ngIf=\"edit\"\n [allowNull]=\"!column.required\"\n [verticalAlign]=\"verticalAlign.auto\"\n [appendToBody]=\"true\"\n [options]=\"displayFilterOptions\"\n [valueRef]=\"'id'\"\n [textRef]=\"'name'\"\n [ngModel]=\"row
|
|
9379
|
+
ListCellComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.0.0", type: ListCellComponent, selector: "teta-list-cell", inputs: { column: "column", row: "row", filterOptions: "filterOptions" }, viewQueries: [{ propertyName: "input", first: true, predicate: ["input"], descendants: true }], usesInheritance: true, ngImport: i0, template: "<span [style.display]=\"edit ? 'none' : 'block'\"\n class=\"cell-text\"\n [class.cell-text_disabled]=\"!editable\">\n {{value}}\n</span>\n<teta-select #input\n class=\"row_auto select-table\"\n *ngIf=\"edit\"\n [allowNull]=\"!column.required\"\n [verticalAlign]=\"verticalAlign.auto\"\n [appendToBody]=\"true\"\n [options]=\"displayFilterOptions\"\n [valueRef]=\"'id'\"\n [textRef]=\"'name'\"\n [ngModel]=\"row[column.name]\"\n (ngModelChange)=\"setValue($event)\">\n</teta-select>\n", styles: [""], dependencies: [{ kind: "directive", type: i2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i3.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i3.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "component", type: SelectComponent, selector: "teta-select", inputs: ["multiple", "options", "invalid", "align", "verticalAlign", "autoClose", "autoCloseIgnore", "disabled", "itemSize", "virtual", "icon", "placeholder", "appendToBody", "allowNull", "valueRef", "textRef", "searchRef"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
9427
9380
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.0.0", ngImport: i0, type: ListCellComponent, decorators: [{
|
|
9428
9381
|
type: Component,
|
|
9429
|
-
args: [{ selector: 'teta-list-cell', changeDetection: ChangeDetectionStrategy.OnPush, template: "<span [style.display]=\"edit ? 'none' : 'block'\"\n class=\"cell-text\"\n [class.cell-text_disabled]=\"!editable\">\n {{value}}\n</span>\n<teta-select #input\n class=\"row_auto select-table\"\n *ngIf=\"edit\"\n [allowNull]=\"!column.required\"\n [verticalAlign]=\"verticalAlign.auto\"\n [appendToBody]=\"true\"\n [options]=\"displayFilterOptions\"\n [valueRef]=\"'id'\"\n [textRef]=\"'name'\"\n [ngModel]=\"row
|
|
9382
|
+
args: [{ selector: 'teta-list-cell', changeDetection: ChangeDetectionStrategy.OnPush, template: "<span [style.display]=\"edit ? 'none' : 'block'\"\n class=\"cell-text\"\n [class.cell-text_disabled]=\"!editable\">\n {{value}}\n</span>\n<teta-select #input\n class=\"row_auto select-table\"\n *ngIf=\"edit\"\n [allowNull]=\"!column.required\"\n [verticalAlign]=\"verticalAlign.auto\"\n [appendToBody]=\"true\"\n [options]=\"displayFilterOptions\"\n [valueRef]=\"'id'\"\n [textRef]=\"'name'\"\n [ngModel]=\"row[column.name]\"\n (ngModelChange)=\"setValue($event)\">\n</teta-select>\n" }]
|
|
9430
9383
|
}], ctorParameters: function () { return [{ type: TableService }, { type: i0.ChangeDetectorRef }]; }, propDecorators: { column: [{
|
|
9431
9384
|
type: Input
|
|
9432
9385
|
}], row: [{
|
|
@@ -9470,10 +9423,10 @@ class StringCellComponent extends CellComponentBase {
|
|
|
9470
9423
|
}
|
|
9471
9424
|
}
|
|
9472
9425
|
StringCellComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.0.0", ngImport: i0, type: StringCellComponent, deps: [{ token: TableService }, { token: i0.ChangeDetectorRef }], target: i0.ɵɵFactoryTarget.Component });
|
|
9473
|
-
StringCellComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.0.0", type: StringCellComponent, selector: "teta-string-cell", inputs: { column: "column", row: "row" }, viewQueries: [{ propertyName: "input", first: true, predicate: ["input"], descendants: true }], usesInheritance: true, ngImport: i0, template: "<span [style.display]=\"edit ? 'none' : 'block'\"\n class=\"cell-text\"\n [class.cell-text_disabled]=\"!editable\">\n {{row
|
|
9426
|
+
StringCellComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.0.0", type: StringCellComponent, selector: "teta-string-cell", inputs: { column: "column", row: "row" }, viewQueries: [{ propertyName: "input", first: true, predicate: ["input"], descendants: true }], usesInheritance: true, ngImport: i0, template: "<span [style.display]=\"edit ? 'none' : 'block'\"\n class=\"cell-text\"\n [class.cell-text_disabled]=\"!editable\">\n {{row[column.name]}}\n</span>\n<input #input\n *ngIf=\"edit\"\n type=\"text\"\n class=\"input row_auto border-radius-0\"\n (blur)=\"setValue()\"\n [ngModel]=\"row[column.name]\"\n (ngModelChange)=\"row[column.name]=$event\"/>\n\n", styles: [""], dependencies: [{ kind: "directive", type: i2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i3.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: i3.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i3.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
9474
9427
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.0.0", ngImport: i0, type: StringCellComponent, decorators: [{
|
|
9475
9428
|
type: Component,
|
|
9476
|
-
args: [{ selector: 'teta-string-cell', changeDetection: ChangeDetectionStrategy.OnPush, template: "<span [style.display]=\"edit ? 'none' : 'block'\"\n class=\"cell-text\"\n [class.cell-text_disabled]=\"!editable\">\n {{row
|
|
9429
|
+
args: [{ selector: 'teta-string-cell', changeDetection: ChangeDetectionStrategy.OnPush, template: "<span [style.display]=\"edit ? 'none' : 'block'\"\n class=\"cell-text\"\n [class.cell-text_disabled]=\"!editable\">\n {{row[column.name]}}\n</span>\n<input #input\n *ngIf=\"edit\"\n type=\"text\"\n class=\"input row_auto border-radius-0\"\n (blur)=\"setValue()\"\n [ngModel]=\"row[column.name]\"\n (ngModelChange)=\"row[column.name]=$event\"/>\n\n" }]
|
|
9477
9430
|
}], ctorParameters: function () { return [{ type: TableService }, { type: i0.ChangeDetectorRef }]; }, propDecorators: { column: [{
|
|
9478
9431
|
type: Input
|
|
9479
9432
|
}], row: [{
|
|
@@ -9508,10 +9461,10 @@ class BooleanCellComponent extends CellComponentBase {
|
|
|
9508
9461
|
}
|
|
9509
9462
|
}
|
|
9510
9463
|
BooleanCellComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.0.0", ngImport: i0, type: BooleanCellComponent, deps: [{ token: TableService }, { token: i0.ChangeDetectorRef }], target: i0.ɵɵFactoryTarget.Component });
|
|
9511
|
-
BooleanCellComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.0.0", type: BooleanCellComponent, selector: "teta-boolean-cell", inputs: { column: "column", row: "row" }, viewQueries: [{ propertyName: "input", first: true, predicate: ["input"], descendants: true }], usesInheritance: true, ngImport: i0, template: "<span [style.display]=\"edit ? 'none' : 'block'\"\n class=\"cell-text\"\n [class.cell-text_disabled]=\"!editable\">\n {{ row
|
|
9464
|
+
BooleanCellComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.0.0", type: BooleanCellComponent, selector: "teta-boolean-cell", inputs: { column: "column", row: "row" }, viewQueries: [{ propertyName: "input", first: true, predicate: ["input"], descendants: true }], usesInheritance: true, ngImport: i0, template: "<span [style.display]=\"edit ? 'none' : 'block'\"\n class=\"cell-text\"\n [class.cell-text_disabled]=\"!editable\">\n {{ row[column.name] }}\n</span>\n<teta-checkbox\n #input\n *ngIf=\"edit\"\n [binary]=\"true\"\n [(ngModel)]=\"row[column.name]\"\n (blur)=\"setValue()\"\n></teta-checkbox>\n", styles: [""], dependencies: [{ kind: "directive", type: i2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i3.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i3.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "component", type: CheckboxComponent, selector: "teta-checkbox", inputs: ["class", "palette", "noLabel", "disabled", "value", "binary", "allowNull"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
9512
9465
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.0.0", ngImport: i0, type: BooleanCellComponent, decorators: [{
|
|
9513
9466
|
type: Component,
|
|
9514
|
-
args: [{ selector: 'teta-boolean-cell', changeDetection: ChangeDetectionStrategy.OnPush, template: "<span [style.display]=\"edit ? 'none' : 'block'\"\n class=\"cell-text\"\n [class.cell-text_disabled]=\"!editable\">\n {{ row
|
|
9467
|
+
args: [{ selector: 'teta-boolean-cell', changeDetection: ChangeDetectionStrategy.OnPush, template: "<span [style.display]=\"edit ? 'none' : 'block'\"\n class=\"cell-text\"\n [class.cell-text_disabled]=\"!editable\">\n {{ row[column.name] }}\n</span>\n<teta-checkbox\n #input\n *ngIf=\"edit\"\n [binary]=\"true\"\n [(ngModel)]=\"row[column.name]\"\n (blur)=\"setValue()\"\n></teta-checkbox>\n" }]
|
|
9515
9468
|
}], ctorParameters: function () { return [{ type: TableService }, { type: i0.ChangeDetectorRef }]; }, propDecorators: { column: [{
|
|
9516
9469
|
type: Input
|
|
9517
9470
|
}], row: [{
|
|
@@ -9648,8 +9601,9 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.0.0", ngImpor
|
|
|
9648
9601
|
}] } });
|
|
9649
9602
|
|
|
9650
9603
|
class TableBodyComponent {
|
|
9651
|
-
constructor(_svc, _config, _cdr) {
|
|
9604
|
+
constructor(_svc, _elementRef, _config, _cdr) {
|
|
9652
9605
|
this._svc = _svc;
|
|
9606
|
+
this._elementRef = _elementRef;
|
|
9653
9607
|
this._config = _config;
|
|
9654
9608
|
this._cdr = _cdr;
|
|
9655
9609
|
this.selectedRows = [];
|
|
@@ -9660,17 +9614,6 @@ class TableBodyComponent {
|
|
|
9660
9614
|
this._columns = [];
|
|
9661
9615
|
this._alive = true;
|
|
9662
9616
|
this._hiddenColumns = [];
|
|
9663
|
-
this.getData = (index, count, success) => {
|
|
9664
|
-
const data = [];
|
|
9665
|
-
if (this.data?.length > 0) {
|
|
9666
|
-
const start = Math.max(0, index);
|
|
9667
|
-
const end = Math.min(index + count - 1, this.data.length - 1);
|
|
9668
|
-
for (let i = start; i <= end; i++) {
|
|
9669
|
-
data.push(this.data[i]);
|
|
9670
|
-
}
|
|
9671
|
-
}
|
|
9672
|
-
return success(data);
|
|
9673
|
-
};
|
|
9674
9617
|
}
|
|
9675
9618
|
set data(data) {
|
|
9676
9619
|
this._data = data;
|
|
@@ -9694,6 +9637,17 @@ class TableBodyComponent {
|
|
|
9694
9637
|
setActiveRow(row) {
|
|
9695
9638
|
this._svc.setActiveRow(row);
|
|
9696
9639
|
}
|
|
9640
|
+
// getData = (index, count, success) => {
|
|
9641
|
+
// const data = [];
|
|
9642
|
+
// if (this.data?.length > 0) {
|
|
9643
|
+
// const start = Math.max(0, index);
|
|
9644
|
+
// const end = Math.min(index + count - 1, this.data.length - 1);
|
|
9645
|
+
// for (let i = start; i <= end; i++) {
|
|
9646
|
+
// data.push(this.data[i]);
|
|
9647
|
+
// }
|
|
9648
|
+
// }
|
|
9649
|
+
// return success(data);
|
|
9650
|
+
// };
|
|
9697
9651
|
ngOnInit() {
|
|
9698
9652
|
this.locale = this._config.locale;
|
|
9699
9653
|
combineLatest([this._svc.columns, this._svc.hiddenColumns])
|
|
@@ -9714,10 +9668,14 @@ class TableBodyComponent {
|
|
|
9714
9668
|
this._cdr.markForCheck();
|
|
9715
9669
|
});
|
|
9716
9670
|
this._svc.scrollIndex
|
|
9717
|
-
.pipe(takeWhile((
|
|
9718
|
-
.subscribe(async (
|
|
9671
|
+
.pipe(takeWhile(() => this._alive))
|
|
9672
|
+
.subscribe(async (index) => {
|
|
9719
9673
|
if (this.viewport) {
|
|
9720
|
-
this.viewport.scrollToIndex(
|
|
9674
|
+
this.viewport.scrollToIndex(index, 'auto');
|
|
9675
|
+
}
|
|
9676
|
+
else {
|
|
9677
|
+
const row = this._elementRef.nativeElement.querySelector(`.table-row[data-row="${index}"]`);
|
|
9678
|
+
row?.scrollIntoView();
|
|
9721
9679
|
}
|
|
9722
9680
|
this._cdr.markForCheck();
|
|
9723
9681
|
});
|
|
@@ -9761,8 +9719,8 @@ class TableBodyComponent {
|
|
|
9761
9719
|
return '';
|
|
9762
9720
|
}
|
|
9763
9721
|
trackRow(index, row) {
|
|
9764
|
-
if (row
|
|
9765
|
-
return row
|
|
9722
|
+
if (row['id']) {
|
|
9723
|
+
return row['id'];
|
|
9766
9724
|
}
|
|
9767
9725
|
return index;
|
|
9768
9726
|
}
|
|
@@ -9771,27 +9729,27 @@ class TableBodyComponent {
|
|
|
9771
9729
|
}
|
|
9772
9730
|
getSum(columnName) {
|
|
9773
9731
|
return this.data?.reduce((accum, current) => {
|
|
9774
|
-
const val = parseFloat(current
|
|
9732
|
+
const val = parseFloat(current[columnName]);
|
|
9775
9733
|
return accum + (isNaN(val) ? 0 : val);
|
|
9776
9734
|
}, 0);
|
|
9777
9735
|
}
|
|
9778
9736
|
getMin(columnName) {
|
|
9779
|
-
return this.data?.reduce((accum, current) => accum != null && accum <= current
|
|
9737
|
+
return this.data?.reduce((accum, current) => accum != null && accum <= current[columnName]
|
|
9780
9738
|
? accum
|
|
9781
|
-
: current
|
|
9739
|
+
: current[columnName], null);
|
|
9782
9740
|
}
|
|
9783
9741
|
getMax(columnName) {
|
|
9784
|
-
return this.data?.reduce((accum, current) => accum != null && accum >= current
|
|
9742
|
+
return this.data?.reduce((accum, current) => accum != null && accum >= current[columnName]
|
|
9785
9743
|
? accum
|
|
9786
|
-
: current
|
|
9744
|
+
: current[columnName], null);
|
|
9787
9745
|
}
|
|
9788
9746
|
}
|
|
9789
|
-
TableBodyComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.0.0", ngImport: i0, type: TableBodyComponent, deps: [{ token: TableService }, { token: TetaConfigService }, { token: i0.ChangeDetectorRef }], target: i0.ɵɵFactoryTarget.Component });
|
|
9790
|
-
TableBodyComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.0.0", type: TableBodyComponent, selector: "teta-table-body", inputs: { virtual: "virtual", activeRow: "activeRow", selectedRows: "selectedRows", additionalComponent: "additionalComponent",
|
|
9747
|
+
TableBodyComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.0.0", ngImport: i0, type: TableBodyComponent, deps: [{ token: TableService }, { token: i0.ElementRef }, { token: TetaConfigService }, { token: i0.ChangeDetectorRef }], target: i0.ɵɵFactoryTarget.Component });
|
|
9748
|
+
TableBodyComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.0.0", type: TableBodyComponent, selector: "teta-table-body", inputs: { virtual: "virtual", activeRow: "activeRow", selectedRows: "selectedRows", additionalComponent: "additionalComponent", aggregate: "aggregate", selectType: "selectType", rowClass: "rowClass" }, host: { properties: { "class.table-body": "this.tableBodyClass" } }, viewQueries: [{ propertyName: "viewport", first: true, predicate: CdkVirtualScrollViewport, descendants: true }], ngImport: i0, template: "<cdk-virtual-scroll-viewport *ngIf=\"virtual\"\n class=\"table-body-container\"\n [itemSize]=\"28\">\n <ng-container *cdkVirtualFor=\"let row of data;templateCacheSize: 0; let rowIndex = index; trackBy: trackRow;\">\n <ng-container *ngTemplateOutlet=\"bodyTemplate; context: {row: row, rowIndex: rowIndex}\"></ng-container>\n </ng-container>\n</cdk-virtual-scroll-viewport>\n<div *ngIf=\"!virtual\"\n class=\"table-body-container\">\n <ng-container *ngFor=\"let row of data; let rowIndex = index; trackBy: trackRow;\">\n <ng-container *ngTemplateOutlet=\"bodyTemplate; context: {row: row, rowIndex: rowIndex}\"></ng-container>\n </ng-container>\n <ng-container *ngIf=\"aggregate\">\n <ng-container *ngTemplateOutlet=\"aggTemplate;\"></ng-container>\n </ng-container>\n</div>\n\n<ng-template #bodyTemplate let-row=\"row\" let-rowIndex=\"rowIndex\">\n <div class=\"table-row\"\n (click)=\"setActiveRow(row)\"\n (contextmenu)=\"setActiveRow(row)\"\n [attr.data-row]=\"rowIndex\"\n [class.table-row_odd]=\"rowIndex % 2 === 1\"\n [ngClass]=\"rowClass ? rowClass(row, rowIndex) : ''\"\n [class.table-row_selected]=\"selectedRows && selectedRows.indexOf(row) >= 0\"\n [style.flex-grow]=\"totalFlex\"\n [style.flex-basis.px]=\"totalWidth\"\n [style.min-width.px]=\"totalWidth\">\n <div class=\"table-row_locked\"\n *ngIf=\"locked.length > 0\"\n [style.flex-grow]=\"lockedFlex\"\n [style.flex-basis.px]=\"lockedWidth\"\n [style.min-width.px]=\"lockedWidth\"\n [style.zIndex]=\"row === activeRow ? 1 : 'unset'\">\n <teta-selection-cell *ngIf=\"selectType === selectTypeEnum.checkBox && locked.length\"\n [row]=\"row\"\n style=\"width: 28px;\"></teta-selection-cell>\n <teta-cell\n *ngFor=\"let column of locked; let colIndex = index; trackBy: trackColumns;\"\n [attr.data-row]=\"rowIndex\"\n [attr.data-column]=\"column.name\"\n [column]=\"column\"\n [filterOptions]=\"dict?dict[column.name]:[]\"\n [dict]=\"dict\"\n [row]=\"row\"\n [ngClass]=\"column.cellClass\"\n [attr.tabindex]=\"0\"\n [style.flex-grow]=\"column.flex\"\n [style.flex-basis.px]=\"column.width\"\n ></teta-cell>\n </div>\n <teta-selection-cell *ngIf=\"selectType === selectTypeEnum.checkBox && locked.length < 1\"\n [row]=\"row\"\n style=\"width: 28px;\"></teta-selection-cell>\n <teta-cell\n *ngFor=\"let column of unlocked; let colIndex = index; trackBy: trackColumns;\"\n [attr.data-row]=\"rowIndex\"\n [attr.data-column]=\"column.name\"\n [column]=\"column\"\n [filterOptions]=\"dict?dict[column.name]:[]\"\n [dict]=\"dict\"\n [row]=\"row\"\n [ngClass]=\"column.cellClass\"\n [attr.tabindex]=\"0\"\n [style.flex-grow]=\"column.flex\"\n [style.flex-basis.px]=\"column.width\"\n ></teta-cell>\n </div>\n</ng-template>\n\n<ng-template #aggTemplate>\n <ng-container *ngIf=\"locale | async as loc\">\n <div class=\"table-row\"\n *ngIf=\"aggregate\"\n [class.table-row_virtual]=\"virtual\"\n [style.flex-grow]=\"virtual ? totalFlex : ''\"\n [style.flex-basis.px]=\"virtual ? totalWidth : ''\"\n [style.min-width.px]=\"virtual ? totalWidth : ''\">\n <div class=\"table-row_locked\"\n *ngIf=\"locked.length > 0\"\n [style.flex-grow]=\"lockedFlex\"\n [style.flex-basis.px]=\"lockedWidth\"\n [style.min-width.px]=\"lockedWidth\">\n <div class=\"cell align-center justify-content-center\"\n style=\"width: 28px;\">\n <teta-icon [name]=\"'sumColor'\"></teta-icon>\n </div>\n <div class=\"cell cell-component justify-content-end\"\n *ngFor=\"let column of locked; let colIndex = index; trackBy: trackColumns;\"\n [attr.data-column]=\"column.name\"\n [ngClass]=\"column.cellClass\"\n [attr.tabindex]=\"0\"\n [style.flex-grow]=\"column.flex\"\n [style.flex-basis.px]=\"column.width\">\n <span class=\"cell-text cell-text_numeric font-title-3\">\n {{loc[getAggregateText(column)]}}:\n {{getAggregateValue(column) | tetaNumber : 2}}\n </span>\n </div>\n </div>\n <div class=\"cell align-center justify-content-center\"\n style=\"width: 28px;\"\n *ngIf=\"selectType === selectTypeEnum.checkBox && locked.length < 1\">\n <teta-icon [name]=\"'sumColor'\"></teta-icon>\n </div>\n <div class=\"cell cell-component justify-content-end\"\n *ngFor=\"let column of unlocked; let colIndex = index; trackBy: trackColumns;\"\n [attr.data-column]=\"column.name\"\n [ngClass]=\"column.cellClass\"\n [attr.tabindex]=\"0\"\n [style.flex-grow]=\"column.flex\"\n [style.flex-basis.px]=\"column.width\">\n <span class=\"cell-text cell-text_numeric font-title-3\">\n {{loc[getAggregateText(column)]}}:\n {{getAggregateValue(column) | tetaNumber : 2}}\n </span>\n </div>\n </div>\n </ng-container>\n</ng-template>\n", styles: [""], dependencies: [{ kind: "directive", type: i2.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i2.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i2.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "component", type: IconComponent, selector: "teta-icon", inputs: ["name", "size", "palette", "class"] }, { kind: "directive", type: i5.CdkFixedSizeVirtualScroll, selector: "cdk-virtual-scroll-viewport[itemSize]", inputs: ["itemSize", "minBufferPx", "maxBufferPx"] }, { kind: "directive", type: i5.CdkVirtualForOf, selector: "[cdkVirtualFor][cdkVirtualForOf]", inputs: ["cdkVirtualForOf", "cdkVirtualForTrackBy", "cdkVirtualForTemplate", "cdkVirtualForTemplateCacheSize"] }, { kind: "component", type: i5.CdkVirtualScrollViewport, selector: "cdk-virtual-scroll-viewport", inputs: ["orientation", "appendOnly"], outputs: ["scrolledIndexChange"] }, { kind: "component", type: CellComponent, selector: "teta-cell", inputs: ["column", "filterOptions", "dict", "row"] }, { kind: "component", type: SelectionCellComponent, selector: "teta-selection-cell", inputs: ["row"] }, { kind: "pipe", type: i2.AsyncPipe, name: "async" }, { kind: "pipe", type: NumberPipe, name: "tetaNumber" }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
9791
9749
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.0.0", ngImport: i0, type: TableBodyComponent, decorators: [{
|
|
9792
9750
|
type: Component,
|
|
9793
|
-
args: [{ selector: 'teta-table-body', changeDetection: ChangeDetectionStrategy.OnPush, template: "<cdk-virtual-scroll-viewport *ngIf=\"virtual\"\n class=\"table-body-container\"\n [itemSize]=\"28\">\n <ng-container *cdkVirtualFor=\"let row of data;templateCacheSize: 0; let rowIndex = index; trackBy: trackRow;\">\n <ng-container *ngTemplateOutlet=\"bodyTemplate; context: {row: row, rowIndex: rowIndex}\"></ng-container>\n </ng-container>\n</cdk-virtual-scroll-viewport>\n<div *ngIf=\"!virtual\"\n class=\"table-body-container\">\n <ng-container *ngFor=\"let row of data; let rowIndex = index; trackBy: trackRow;\">\n <ng-container *ngTemplateOutlet=\"bodyTemplate; context: {row: row, rowIndex: rowIndex}\"></ng-container>\n </ng-container>\n <ng-container *ngIf=\"aggregate\">\n <ng-container *ngTemplateOutlet=\"aggTemplate;\"></ng-container>\n </ng-container>\n</div>\n\n<ng-template #bodyTemplate let-row=\"row\" let-rowIndex=\"rowIndex\">\n <div class=\"table-row\"\n (click)=\"setActiveRow(row)\"\n (contextmenu)=\"setActiveRow(row)\"\n [attr.data-row]=\"rowIndex\"\n [class.table-row_odd]=\"rowIndex % 2 === 1\"\n [ngClass]=\"rowClass ? rowClass(row, rowIndex) : ''\"\n [class.table-row_selected]=\"selectedRows && selectedRows.indexOf(row) >= 0\"\n [style.flex-grow]=\"totalFlex\"\n [style.flex-basis.px]=\"totalWidth\"\n [style.min-width.px]=\"totalWidth\">\n <
|
|
9794
|
-
}], ctorParameters: function () { return [{ type: TableService }, { type: TetaConfigService }, { type: i0.ChangeDetectorRef }]; }, propDecorators: { virtual: [{
|
|
9751
|
+
args: [{ selector: 'teta-table-body', changeDetection: ChangeDetectionStrategy.OnPush, template: "<cdk-virtual-scroll-viewport *ngIf=\"virtual\"\n class=\"table-body-container\"\n [itemSize]=\"28\">\n <ng-container *cdkVirtualFor=\"let row of data;templateCacheSize: 0; let rowIndex = index; trackBy: trackRow;\">\n <ng-container *ngTemplateOutlet=\"bodyTemplate; context: {row: row, rowIndex: rowIndex}\"></ng-container>\n </ng-container>\n</cdk-virtual-scroll-viewport>\n<div *ngIf=\"!virtual\"\n class=\"table-body-container\">\n <ng-container *ngFor=\"let row of data; let rowIndex = index; trackBy: trackRow;\">\n <ng-container *ngTemplateOutlet=\"bodyTemplate; context: {row: row, rowIndex: rowIndex}\"></ng-container>\n </ng-container>\n <ng-container *ngIf=\"aggregate\">\n <ng-container *ngTemplateOutlet=\"aggTemplate;\"></ng-container>\n </ng-container>\n</div>\n\n<ng-template #bodyTemplate let-row=\"row\" let-rowIndex=\"rowIndex\">\n <div class=\"table-row\"\n (click)=\"setActiveRow(row)\"\n (contextmenu)=\"setActiveRow(row)\"\n [attr.data-row]=\"rowIndex\"\n [class.table-row_odd]=\"rowIndex % 2 === 1\"\n [ngClass]=\"rowClass ? rowClass(row, rowIndex) : ''\"\n [class.table-row_selected]=\"selectedRows && selectedRows.indexOf(row) >= 0\"\n [style.flex-grow]=\"totalFlex\"\n [style.flex-basis.px]=\"totalWidth\"\n [style.min-width.px]=\"totalWidth\">\n <div class=\"table-row_locked\"\n *ngIf=\"locked.length > 0\"\n [style.flex-grow]=\"lockedFlex\"\n [style.flex-basis.px]=\"lockedWidth\"\n [style.min-width.px]=\"lockedWidth\"\n [style.zIndex]=\"row === activeRow ? 1 : 'unset'\">\n <teta-selection-cell *ngIf=\"selectType === selectTypeEnum.checkBox && locked.length\"\n [row]=\"row\"\n style=\"width: 28px;\"></teta-selection-cell>\n <teta-cell\n *ngFor=\"let column of locked; let colIndex = index; trackBy: trackColumns;\"\n [attr.data-row]=\"rowIndex\"\n [attr.data-column]=\"column.name\"\n [column]=\"column\"\n [filterOptions]=\"dict?dict[column.name]:[]\"\n [dict]=\"dict\"\n [row]=\"row\"\n [ngClass]=\"column.cellClass\"\n [attr.tabindex]=\"0\"\n [style.flex-grow]=\"column.flex\"\n [style.flex-basis.px]=\"column.width\"\n ></teta-cell>\n </div>\n <teta-selection-cell *ngIf=\"selectType === selectTypeEnum.checkBox && locked.length < 1\"\n [row]=\"row\"\n style=\"width: 28px;\"></teta-selection-cell>\n <teta-cell\n *ngFor=\"let column of unlocked; let colIndex = index; trackBy: trackColumns;\"\n [attr.data-row]=\"rowIndex\"\n [attr.data-column]=\"column.name\"\n [column]=\"column\"\n [filterOptions]=\"dict?dict[column.name]:[]\"\n [dict]=\"dict\"\n [row]=\"row\"\n [ngClass]=\"column.cellClass\"\n [attr.tabindex]=\"0\"\n [style.flex-grow]=\"column.flex\"\n [style.flex-basis.px]=\"column.width\"\n ></teta-cell>\n </div>\n</ng-template>\n\n<ng-template #aggTemplate>\n <ng-container *ngIf=\"locale | async as loc\">\n <div class=\"table-row\"\n *ngIf=\"aggregate\"\n [class.table-row_virtual]=\"virtual\"\n [style.flex-grow]=\"virtual ? totalFlex : ''\"\n [style.flex-basis.px]=\"virtual ? totalWidth : ''\"\n [style.min-width.px]=\"virtual ? totalWidth : ''\">\n <div class=\"table-row_locked\"\n *ngIf=\"locked.length > 0\"\n [style.flex-grow]=\"lockedFlex\"\n [style.flex-basis.px]=\"lockedWidth\"\n [style.min-width.px]=\"lockedWidth\">\n <div class=\"cell align-center justify-content-center\"\n style=\"width: 28px;\">\n <teta-icon [name]=\"'sumColor'\"></teta-icon>\n </div>\n <div class=\"cell cell-component justify-content-end\"\n *ngFor=\"let column of locked; let colIndex = index; trackBy: trackColumns;\"\n [attr.data-column]=\"column.name\"\n [ngClass]=\"column.cellClass\"\n [attr.tabindex]=\"0\"\n [style.flex-grow]=\"column.flex\"\n [style.flex-basis.px]=\"column.width\">\n <span class=\"cell-text cell-text_numeric font-title-3\">\n {{loc[getAggregateText(column)]}}:\n {{getAggregateValue(column) | tetaNumber : 2}}\n </span>\n </div>\n </div>\n <div class=\"cell align-center justify-content-center\"\n style=\"width: 28px;\"\n *ngIf=\"selectType === selectTypeEnum.checkBox && locked.length < 1\">\n <teta-icon [name]=\"'sumColor'\"></teta-icon>\n </div>\n <div class=\"cell cell-component justify-content-end\"\n *ngFor=\"let column of unlocked; let colIndex = index; trackBy: trackColumns;\"\n [attr.data-column]=\"column.name\"\n [ngClass]=\"column.cellClass\"\n [attr.tabindex]=\"0\"\n [style.flex-grow]=\"column.flex\"\n [style.flex-basis.px]=\"column.width\">\n <span class=\"cell-text cell-text_numeric font-title-3\">\n {{loc[getAggregateText(column)]}}:\n {{getAggregateValue(column) | tetaNumber : 2}}\n </span>\n </div>\n </div>\n </ng-container>\n</ng-template>\n" }]
|
|
9752
|
+
}], ctorParameters: function () { return [{ type: TableService }, { type: i0.ElementRef }, { type: TetaConfigService }, { type: i0.ChangeDetectorRef }]; }, propDecorators: { virtual: [{
|
|
9795
9753
|
type: Input
|
|
9796
9754
|
}], activeRow: [{
|
|
9797
9755
|
type: Input
|
|
@@ -9799,16 +9757,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.0.0", ngImpor
|
|
|
9799
9757
|
type: Input
|
|
9800
9758
|
}], additionalComponent: [{
|
|
9801
9759
|
type: Input
|
|
9802
|
-
}], tree: [{
|
|
9803
|
-
type: Input
|
|
9804
9760
|
}], aggregate: [{
|
|
9805
9761
|
type: Input
|
|
9806
|
-
}], grouping: [{
|
|
9807
|
-
type: Input
|
|
9808
|
-
}], groupRowComponent: [{
|
|
9809
|
-
type: Input
|
|
9810
|
-
}], openLevels: [{
|
|
9811
|
-
type: Input
|
|
9812
9762
|
}], selectType: [{
|
|
9813
9763
|
type: Input
|
|
9814
9764
|
}], rowClass: [{
|
|
@@ -9828,8 +9778,12 @@ class TableComponent {
|
|
|
9828
9778
|
this.data = [];
|
|
9829
9779
|
this.columns = [];
|
|
9830
9780
|
this.selectType = SelectType.mouse;
|
|
9831
|
-
this.
|
|
9832
|
-
|
|
9781
|
+
this.trackRow = (index, row) => {
|
|
9782
|
+
if (row['id']) {
|
|
9783
|
+
return row['id'];
|
|
9784
|
+
}
|
|
9785
|
+
return index;
|
|
9786
|
+
};
|
|
9833
9787
|
this.editType = EditType.cell;
|
|
9834
9788
|
this.editEvent = EditEvent.doubleClick;
|
|
9835
9789
|
this.showHeadCellMenu = true;
|
|
@@ -10078,7 +10032,9 @@ class TableComponent {
|
|
|
10078
10032
|
}
|
|
10079
10033
|
if (changes.hasOwnProperty('data')) {
|
|
10080
10034
|
this._svc.setData(this.data);
|
|
10081
|
-
this._svc.selectRows(
|
|
10035
|
+
this._svc.selectRows(this.data?.filter((row) => {
|
|
10036
|
+
return this.selectedRows?.some((selectedRow) => this.trackRow(this._svc.getRowIndex(selectedRow), selectedRow) === this.trackRow(this._svc.getRowIndex(row), row));
|
|
10037
|
+
}));
|
|
10082
10038
|
}
|
|
10083
10039
|
if (changes.hasOwnProperty('dict')) {
|
|
10084
10040
|
this._svc.setDict(this.dict);
|
|
@@ -10123,6 +10079,9 @@ class TableComponent {
|
|
|
10123
10079
|
return row && this._elementRef.nativeElement.contains(row);
|
|
10124
10080
|
}
|
|
10125
10081
|
getCoordinates(event) {
|
|
10082
|
+
if (event.composedPath().indexOf(this._elementRef.nativeElement) < 0) {
|
|
10083
|
+
return null;
|
|
10084
|
+
}
|
|
10126
10085
|
const cell = this.getEventCell(event);
|
|
10127
10086
|
if (cell) {
|
|
10128
10087
|
const rowIndex = parseInt(cell.getAttribute('data-row'), 10);
|
|
@@ -10138,6 +10097,9 @@ class TableComponent {
|
|
|
10138
10097
|
return null;
|
|
10139
10098
|
}
|
|
10140
10099
|
getRow(event) {
|
|
10100
|
+
if (event.composedPath().indexOf(this._elementRef.nativeElement) < 0) {
|
|
10101
|
+
return null;
|
|
10102
|
+
}
|
|
10141
10103
|
const rowElement = this.getEventRow(event);
|
|
10142
10104
|
if (rowElement) {
|
|
10143
10105
|
const rowIndex = parseInt(rowElement.getAttribute('data-row'), 10);
|
|
@@ -10149,10 +10111,10 @@ class TableComponent {
|
|
|
10149
10111
|
}
|
|
10150
10112
|
}
|
|
10151
10113
|
TableComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.0.0", ngImport: i0, type: TableComponent, deps: [{ token: TableService }, { token: i0.ElementRef }], target: i0.ɵɵFactoryTarget.Component });
|
|
10152
|
-
TableComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.0.0", type: TableComponent, selector: "teta-table", inputs: { data: "data", columns: "columns", dict: "dict", filterOptions: "filterOptions", state: "state", cookieName: "cookieName", virtual: "virtual", detailComponent: "detailComponent", activeRow: "activeRow", selectedRows: "selectedRows", selectType: "selectType", aggregate: "aggregate",
|
|
10114
|
+
TableComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.0.0", type: TableComponent, selector: "teta-table", inputs: { data: "data", columns: "columns", dict: "dict", filterOptions: "filterOptions", state: "state", cookieName: "cookieName", virtual: "virtual", detailComponent: "detailComponent", activeRow: "activeRow", selectedRows: "selectedRows", selectType: "selectType", aggregate: "aggregate", trackRow: "trackRow", editType: "editType", editEvent: "editEvent", rowEditable: "rowEditable", rowClass: "rowClass", scrollToIndex: "scrollToIndex", showHeadCellMenu: "showHeadCellMenu", contextMenu: "contextMenu", contextMenuOpen: "contextMenuOpen" }, outputs: { contextMenuOpenChange: "contextMenuOpenChange", stateChange: "stateChange", bodyLeft: "bodyLeft", activeRowChange: "activeRowChange", selectedRowsChange: "selectedRowsChange", cellClick: "cellClick", cellDoubleClick: "cellDoubleClick", cellFocus: "cellFocus", cellKeyDown: "cellKeyDown", rowLeft: "rowLeft", rowEditStart: "rowEditStart", rowEditEnd: "rowEditEnd", cellEditStart: "cellEditStart", cellEditEnd: "cellEditEnd", valueChange: "valueChange", tableService: "tableService" }, host: { listeners: { "document:click": "handleClickOutsideAnyRow($event)", "focusin": "focusIn($event)", "dblclick": "dblclick($event)", "keydown": "keydown($event)", "mousedown": "mousedown($event)" }, properties: { "class.table": "this.tableClass" } }, providers: [TableService], viewQueries: [{ propertyName: "menu", first: true, predicate: ["contextMenu"], descendants: true, static: true }], usesOnChanges: true, ngImport: i0, template: "<div class=\"column column_auto\">\n <teta-table-head\n [selectType]=\"selectType\"\n [showHeadCellMenu]=\"showHeadCellMenu\"></teta-table-head>\n <div class=\"column column_auto position-relative\">\n <teta-table-body\n [tetaContextMenu]=\"contextMenu\"\n [open]=\"contextMenuOpen\"\n (openChange)=\"setContextMenuOpen($event)\"\n [aggregate]=\"aggregate\"\n [virtual]=\"virtual\"\n [activeRow]=\"activeRow\"\n [selectedRows]=\"selectedRowsList\"\n [additionalComponent]=\"detailComponent\"\n [selectType]=\"selectType\"\n [rowClass]=\"rowClass\"></teta-table-body>\n <div class=\"column column_auto\"\n style=\"position: absolute; top:0; bottom:0;left:0;right:0;\"\n *ngIf=\"!data?.length\">\n <ng-content></ng-content>\n </div>\n </div>\n</div>\n", styles: [""], dependencies: [{ kind: "directive", type: i2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: ContextMenuDirective, selector: "[tetaContextMenu]", inputs: ["tetaContextMenu", "autoCloseIgnore"] }, { kind: "component", type: TableHeadComponent, selector: "teta-table-head", inputs: ["selectType", "showHeadCellMenu"] }, { kind: "component", type: TableBodyComponent, selector: "teta-table-body", inputs: ["virtual", "activeRow", "selectedRows", "additionalComponent", "aggregate", "selectType", "rowClass"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
10153
10115
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.0.0", ngImport: i0, type: TableComponent, decorators: [{
|
|
10154
10116
|
type: Component,
|
|
10155
|
-
args: [{ selector: 'teta-table', changeDetection: ChangeDetectionStrategy.OnPush, providers: [TableService], template: "<div class=\"column column_auto\">\n <teta-table-head\n [selectType]=\"selectType\"\n [showHeadCellMenu]=\"showHeadCellMenu\"></teta-table-head>\n <div class=\"column column_auto position-relative\">\n <teta-table-body\n [tetaContextMenu]=\"contextMenu\"\n [open]=\"contextMenuOpen\"\n (openChange)=\"setContextMenuOpen($event)\"\n [aggregate]=\"aggregate\"\n [virtual]=\"virtual\"\n [activeRow]=\"activeRow\"\n [selectedRows]=\"selectedRowsList\"\n [additionalComponent]=\"detailComponent\"\n [
|
|
10117
|
+
args: [{ selector: 'teta-table', changeDetection: ChangeDetectionStrategy.OnPush, providers: [TableService], template: "<div class=\"column column_auto\">\n <teta-table-head\n [selectType]=\"selectType\"\n [showHeadCellMenu]=\"showHeadCellMenu\"></teta-table-head>\n <div class=\"column column_auto position-relative\">\n <teta-table-body\n [tetaContextMenu]=\"contextMenu\"\n [open]=\"contextMenuOpen\"\n (openChange)=\"setContextMenuOpen($event)\"\n [aggregate]=\"aggregate\"\n [virtual]=\"virtual\"\n [activeRow]=\"activeRow\"\n [selectedRows]=\"selectedRowsList\"\n [additionalComponent]=\"detailComponent\"\n [selectType]=\"selectType\"\n [rowClass]=\"rowClass\"></teta-table-body>\n <div class=\"column column_auto\"\n style=\"position: absolute; top:0; bottom:0;left:0;right:0;\"\n *ngIf=\"!data?.length\">\n <ng-content></ng-content>\n </div>\n </div>\n</div>\n" }]
|
|
10156
10118
|
}], ctorParameters: function () { return [{ type: TableService }, { type: i0.ElementRef }]; }, propDecorators: { data: [{
|
|
10157
10119
|
type: Input
|
|
10158
10120
|
}], columns: [{
|
|
@@ -10177,14 +10139,6 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.0.0", ngImpor
|
|
|
10177
10139
|
type: Input
|
|
10178
10140
|
}], aggregate: [{
|
|
10179
10141
|
type: Input
|
|
10180
|
-
}], grouping: [{
|
|
10181
|
-
type: Input
|
|
10182
|
-
}], groupRowComponent: [{
|
|
10183
|
-
type: Input
|
|
10184
|
-
}], openLevels: [{
|
|
10185
|
-
type: Input
|
|
10186
|
-
}], tree: [{
|
|
10187
|
-
type: Input
|
|
10188
10142
|
}], trackRow: [{
|
|
10189
10143
|
type: Input
|
|
10190
10144
|
}], editType: [{
|
|
@@ -10334,7 +10288,7 @@ class DateTimeCellComponent extends CellComponentBase {
|
|
|
10334
10288
|
super.ngOnInit();
|
|
10335
10289
|
}
|
|
10336
10290
|
setValue(value) {
|
|
10337
|
-
this.row
|
|
10291
|
+
this.row[this.column.name] = value;
|
|
10338
10292
|
this.valueChanged();
|
|
10339
10293
|
}
|
|
10340
10294
|
startEdit(initiator, type) {
|
|
@@ -10350,10 +10304,10 @@ class DateTimeCellComponent extends CellComponentBase {
|
|
|
10350
10304
|
}
|
|
10351
10305
|
}
|
|
10352
10306
|
DateTimeCellComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.0.0", ngImport: i0, type: DateTimeCellComponent, deps: [{ token: TableService }, { token: i0.ChangeDetectorRef }], target: i0.ɵɵFactoryTarget.Component });
|
|
10353
|
-
DateTimeCellComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.0.0", type: DateTimeCellComponent, selector: "teta-date-time-cell", inputs: { column: "column", row: "row" }, viewQueries: [{ propertyName: "input", first: true, predicate: ["input"], descendants: true }], usesInheritance: true, ngImport: i0, template: "<span [style.display]=\"edit ? 'none' : 'block'\"\n class=\"cell-text\"\n [class.cell-text_disabled]=\"!editable\">\n {{row
|
|
10307
|
+
DateTimeCellComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.0.0", type: DateTimeCellComponent, selector: "teta-date-time-cell", inputs: { column: "column", row: "row" }, viewQueries: [{ propertyName: "input", first: true, predicate: ["input"], descendants: true }], usesInheritance: true, ngImport: i0, template: "<span [style.display]=\"edit ? 'none' : 'block'\"\n class=\"cell-text\"\n [class.cell-text_disabled]=\"!editable\">\n {{row[column.name] | date : 'dd.MM.yyyy HH:mm:ss'}}\n</span>\n<teta-date-picker class=\"datepicker-table\" #input\n *ngIf=\"edit\"\n [appendToBody]=\"true\"\n [showTime]=\"true\"\n [ngModel]=\"row[column.name]\"\n (ngModelChange)=\"setValue($event)\"\n></teta-date-picker>\n", styles: [""], dependencies: [{ kind: "directive", type: i2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i3.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i3.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "component", type: DatePickerComponent, selector: "teta-date-picker", inputs: ["disabled", "invalid", "firstDayOfWeek", "disabledDates", "disabledPeriods", "disabledDays", "minDate", "maxDate", "minYearDate", "maxYearDate", "align", "verticalAlign", "appendToBody", "allowNull", "backdrop", "showTime", "format"] }, { kind: "pipe", type: i2.DatePipe, name: "date" }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
10354
10308
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.0.0", ngImport: i0, type: DateTimeCellComponent, decorators: [{
|
|
10355
10309
|
type: Component,
|
|
10356
|
-
args: [{ selector: 'teta-date-time-cell', changeDetection: ChangeDetectionStrategy.OnPush, template: "<span [style.display]=\"edit ? 'none' : 'block'\"\n class=\"cell-text\"\n [class.cell-text_disabled]=\"!editable\">\n {{row
|
|
10310
|
+
args: [{ selector: 'teta-date-time-cell', changeDetection: ChangeDetectionStrategy.OnPush, template: "<span [style.display]=\"edit ? 'none' : 'block'\"\n class=\"cell-text\"\n [class.cell-text_disabled]=\"!editable\">\n {{row[column.name] | date : 'dd.MM.yyyy HH:mm:ss'}}\n</span>\n<teta-date-picker class=\"datepicker-table\" #input\n *ngIf=\"edit\"\n [appendToBody]=\"true\"\n [showTime]=\"true\"\n [ngModel]=\"row[column.name]\"\n (ngModelChange)=\"setValue($event)\"\n></teta-date-picker>\n" }]
|
|
10357
10311
|
}], ctorParameters: function () { return [{ type: TableService }, { type: i0.ChangeDetectorRef }]; }, propDecorators: { column: [{
|
|
10358
10312
|
type: Input
|
|
10359
10313
|
}], row: [{
|
|
@@ -10409,7 +10363,6 @@ TableModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "1
|
|
|
10409
10363
|
TableBodyComponent,
|
|
10410
10364
|
CellComponent,
|
|
10411
10365
|
CellHostComponent,
|
|
10412
|
-
GroupRowComponent,
|
|
10413
10366
|
TableHeadGroupComponent,
|
|
10414
10367
|
HeadCellComponent,
|
|
10415
10368
|
DefaultHeadCellComponent,
|
|
@@ -10448,7 +10401,6 @@ TableModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "1
|
|
|
10448
10401
|
TableBodyComponent,
|
|
10449
10402
|
CellComponent,
|
|
10450
10403
|
CellHostComponent,
|
|
10451
|
-
GroupRowComponent,
|
|
10452
10404
|
DateTimeCellComponent,
|
|
10453
10405
|
BooleanCellComponent] });
|
|
10454
10406
|
TableModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "14.0.0", ngImport: i0, type: TableModule, imports: [CommonModule,
|
|
@@ -10484,7 +10436,6 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.0.0", ngImpor
|
|
|
10484
10436
|
TableBodyComponent,
|
|
10485
10437
|
CellComponent,
|
|
10486
10438
|
CellHostComponent,
|
|
10487
|
-
GroupRowComponent,
|
|
10488
10439
|
TableHeadGroupComponent,
|
|
10489
10440
|
HeadCellComponent,
|
|
10490
10441
|
DefaultHeadCellComponent,
|
|
@@ -10508,7 +10459,6 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.0.0", ngImpor
|
|
|
10508
10459
|
TableBodyComponent,
|
|
10509
10460
|
CellComponent,
|
|
10510
10461
|
CellHostComponent,
|
|
10511
|
-
GroupRowComponent,
|
|
10512
10462
|
DateTimeCellComponent,
|
|
10513
10463
|
BooleanCellComponent,
|
|
10514
10464
|
],
|
|
@@ -11962,7 +11912,7 @@ class ScrollIntoViewDirective {
|
|
|
11962
11912
|
if (coerceBooleanProperty(this.tetaScrollIntoView)) {
|
|
11963
11913
|
this.elementRef.nativeElement.scrollIntoView({
|
|
11964
11914
|
behavior: 'smooth',
|
|
11965
|
-
block: '
|
|
11915
|
+
block: 'start'
|
|
11966
11916
|
});
|
|
11967
11917
|
}
|
|
11968
11918
|
}
|
|
@@ -12122,5 +12072,5 @@ function tetaZoneOptimized(ngZone) {
|
|
|
12122
12072
|
* Generated bundle index. Do not edit.
|
|
12123
12073
|
*/
|
|
12124
12074
|
|
|
12125
|
-
export { AccordionComponent, AccordionContentDirective, AccordionHeadComponent, AccordionItemComponent, AccordionModule, AggregationType, Align, ArrayUtil, BooleanCellComponent, BooleanFilter, BooleanFilterComponent, ButtonComponent, ButtonModule, CHECKBOX_CONTROL_VALUE_ACCESSOR, CellComponent, CellComponentBase, CellHostComponent, Chart3dComponent, Chart3dModule, Chart3dOptions, CheckboxComponent, CheckboxModule, ClickOutsideDirective, ClickOutsideModule, ClickService, ColumnReorderEvent, ColumnResizeEvent, ContextMenuDirective, ContextMenuModule, CurrentModal, DATE_PICKER_CONTROL_VALUE_ACCESSOR, DAY_SELECT_CONTROL_VALUE_ACCESSOR, DateCellComponent, DateFilter, DateFilterComponent, DateFilterValue, DatePeriod, DatePickerComponent, DatePickerModule, DateTimeCellComponent, DateUtil, DaySelectComponent, DelimiterComponent, DelimiterModule, DetailComponentBase, DialogComponent, DialogService, DisableControlDirective, DisableControlModule, DomUtil, DragContainerDirective, DragContainerInstance, DragDirective, DragDropModule, DragDropService, DragInstance, DragPlaceholderDirective, DragPreviewDirective, DragSortContainerDirective, DragSortItemDirective, DragSortModule, DropdownComponent, DropdownContentDirective, DropdownDirective, DropdownHeadDirective, DropdownModule, DynamicComponentModule, DynamicComponentService, DynamicContentBaseDirective, DynamicData, EditEvent, EditType, ExpandCardComponent, ExpandCardModule, ExpandPanelComponent, ExpandPanelContentDirective, ExpandPanelHeadDirective, ExpandPanelModule, FileItemComponent, FileUploadAreaComponent, FileUploadModule, FilterBase, FilterComponentBase, FilterHostComponent, FilterItem, FilterModule, FilterState, FilterType, FormGroupTitleComponent, FormsUtil,
|
|
12075
|
+
export { AccordionComponent, AccordionContentDirective, AccordionHeadComponent, AccordionItemComponent, AccordionModule, AggregationType, Align, ArrayUtil, BooleanCellComponent, BooleanFilter, BooleanFilterComponent, ButtonComponent, ButtonModule, CHECKBOX_CONTROL_VALUE_ACCESSOR, CellComponent, CellComponentBase, CellHostComponent, Chart3dComponent, Chart3dModule, Chart3dOptions, CheckboxComponent, CheckboxModule, ClickOutsideDirective, ClickOutsideModule, ClickService, ColumnReorderEvent, ColumnResizeEvent, ContextMenuDirective, ContextMenuModule, CurrentModal, DATE_PICKER_CONTROL_VALUE_ACCESSOR, DAY_SELECT_CONTROL_VALUE_ACCESSOR, DateCellComponent, DateFilter, DateFilterComponent, DateFilterValue, DatePeriod, DatePickerComponent, DatePickerModule, DateTimeCellComponent, DateUtil, DaySelectComponent, DelimiterComponent, DelimiterModule, DetailComponentBase, DialogComponent, DialogService, DisableControlDirective, DisableControlModule, DomUtil, DragContainerDirective, DragContainerInstance, DragDirective, DragDropModule, DragDropService, DragInstance, DragPlaceholderDirective, DragPreviewDirective, DragSortContainerDirective, DragSortItemDirective, DragSortModule, DropdownComponent, DropdownContentDirective, DropdownDirective, DropdownHeadDirective, DropdownModule, DynamicComponentModule, DynamicComponentService, DynamicContentBaseDirective, DynamicData, EditEvent, EditType, ExpandCardComponent, ExpandCardModule, ExpandPanelComponent, ExpandPanelContentDirective, ExpandPanelHeadDirective, ExpandPanelModule, FileItemComponent, FileUploadAreaComponent, FileUploadModule, FilterBase, FilterComponentBase, FilterHostComponent, FilterItem, FilterModule, FilterState, FilterType, FormGroupTitleComponent, FormsUtil, HeadCellComponentBase, HeadCellHostComponent, HighlightDirective, HighlightModule, HintDirective, HintModule, IconComponent, IconModule, IconService, IconSpriteDirective, InputComponent, InputModule, LetContext, LetDirective, LetModule, ListCellComponent, ListFilter, ListFilterComponent, ListFilterType, LoaderDirective, LoaderModule, MONTH_PICKER_CONTROL_VALUE_ACCESSOR, Message, MessageComponent, MessageHostComponent, MessageModule, MessageService, ModalCloseReason, ModalContainerComponent, ModalInstance, ModalModule, ModalService, MonthPickerComponent, NoAutofillDirective, NoAutofillModule, NumberPipe, NumberPipeModule, NumericCellComponent, NumericFilter, NumericFilterComponent, NumericFilterValue, OnlyNumberDirective, OnlyNumberModule, OverlayContainerService, PagerComponent, PagerModule, PagerState, PagerUtil, PanelComponent, PanelModule, PopupContentComponent, PositionUtil, ProgressBarComponent, ProgressBarModule, PropertyGridComponent, PropertyGridModule, RadioButtonComponent, RadioComponent, RadioModule, ResizeDragDirective, ResizeDragModule, ResizePanelComponent, ResizePanelModule, SLIDER_CONTROL_VALUE_ACCESSOR, SWITCH_CONTROL_VALUE_ACCESSOR, ScrollIntoViewDirective, ScrollIntoViewModule, SelectComponent, SelectModule, SelectOptionDirective, SelectType, SelectValueDirective, SidebarComponent, SidebarModule, SidebarPosition, SortEvent, SortParam, StateUtil, StringCellComponent, StringFilter, StringFilterComponent, StringFilterType, StringUtil, SwitchButtonComponent, SwitchComponent, SwitchModule, TOGGLE_CONTROL_VALUE_ACCESSOR, TabComponent, TabContentDirective, TabTitleDirective, TableBodyComponent, TableColumn, TableColumnStore, TableComponent, TableHeadComponent, TableModule, TableService, TableUtil, TabsComponent, TabsModule, TetaConfigService, TetaContentRef, TetaSize, TetaTemplateDirective, TetaTemplateModule, TextFieldComponent, ThemeSwitchComponent, ThemeSwitchModule, ThemeSwitchService, ToggleComponent, ToggleModule, ToolbarComponent, ToolbarModule, TooltipDirective, TooltipModule, TreeComponent, TreeItemToggleComponent, TreeModule, TreeService, VerticalAlign, enLocale, formatNumber, getCellComponent, getPrecision, prependZero, ruLocale, tetaZoneFree, tetaZoneFull, tetaZoneOptimized };
|
|
12126
12076
|
//# sourceMappingURL=tetacom-ng-components.mjs.map
|