fixa-admin 0.0.60 → 0.0.62
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/esm2022/lib/components/grid/grid.component.mjs +67 -12
- package/esm2022/lib/models/shared.model.mjs +1 -1
- package/fesm2022/fixa-admin.mjs +66 -12
- package/fesm2022/fixa-admin.mjs.map +1 -1
- package/lib/components/grid/grid.component.d.ts +3 -0
- package/lib/models/shared.model.d.ts +4 -1
- package/package.json +1 -1
|
@@ -33,4 +33,4 @@ export var ContentType;
|
|
|
33
33
|
ContentType[ContentType["VIDEO"] = 0] = "VIDEO";
|
|
34
34
|
ContentType[ContentType["IMAGE"] = 1] = "IMAGE";
|
|
35
35
|
})(ContentType || (ContentType = {}));
|
|
36
|
-
//# sourceMappingURL=data:application/json;base64,
|
|
36
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoic2hhcmVkLm1vZGVsLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vLi4vLi4vLi4vcHJvamVjdHMvc2hhcmVkL3NyYy9saWIvbW9kZWxzL3NoYXJlZC5tb2RlbC50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFxR0EsTUFBTSxDQUFOLElBQVksY0FtQlg7QUFuQkQsV0FBWSxjQUFjO0lBQ3RCLCtCQUFhLENBQUE7SUFDYixrQ0FBZ0IsQ0FBQTtJQUNoQixpQ0FBZSxDQUFBO0lBQ2YseUNBQXVCLENBQUE7SUFDdkIsb0NBQWtCLENBQUE7SUFDbEIsNENBQTBCLENBQUE7SUFDMUIsMkNBQXlCLENBQUE7SUFDekIsdUNBQXFCLENBQUE7SUFDckIsZ0NBQWMsQ0FBQTtJQUNkLG1DQUFpQixDQUFBO0lBQ2pCLHlDQUF1QixDQUFBO0lBQ3ZCLHlDQUF1QixDQUFBO0lBQ3ZCLDZDQUEyQixDQUFBO0lBQzNCLHFEQUFtQ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tcbiAgICBpZDogc3RyaW5nO1xuICAgIHRhYmxlSWQ6IHN0cmluZztcbiAgICB1c2VyTmFtZTogc3RyaW5nO1xuICAgIHRpdGxlOiBzdHJpbmc7XG4gICAgZ3JpZDogR3JpZElucHV0TW9kZWw7XG59Il19
|
package/fesm2022/fixa-admin.mjs
CHANGED
|
@@ -55,6 +55,7 @@ import * as i2$1 from 'ng-zorro-antd/core/transition-patch';
|
|
|
55
55
|
import * as i3 from 'ng-zorro-antd/core/wave';
|
|
56
56
|
import * as i6 from 'ng-zorro-antd/grid';
|
|
57
57
|
import Dexie from 'dexie';
|
|
58
|
+
import { Observable, debounceTime, distinctUntilChanged, Subscription } from 'rxjs';
|
|
58
59
|
import * as i14 from 'ng-zorro-antd/select';
|
|
59
60
|
import { NzSelectModule } from 'ng-zorro-antd/select';
|
|
60
61
|
import * as i15 from 'ng-zorro-antd/tree-select';
|
|
@@ -63,7 +64,6 @@ import * as i16 from 'ng-zorro-antd/popover';
|
|
|
63
64
|
import { NzPopoverModule } from 'ng-zorro-antd/popover';
|
|
64
65
|
import * as i17 from '@qeydar/datepicker';
|
|
65
66
|
import { QeydarDatePickerModule } from '@qeydar/datepicker';
|
|
66
|
-
import { Subscription, Observable } from 'rxjs';
|
|
67
67
|
import Compressor from 'compressorjs';
|
|
68
68
|
import { NzCollapseModule } from 'ng-zorro-antd/collapse';
|
|
69
69
|
import * as am5 from '@amcharts/amcharts5';
|
|
@@ -817,11 +817,13 @@ class GridComponent {
|
|
|
817
817
|
}
|
|
818
818
|
set filterItems(v) {
|
|
819
819
|
if (v != null && v.length > 0) {
|
|
820
|
+
debugger;
|
|
821
|
+
this._filterItems = v;
|
|
820
822
|
v.forEach((el) => {
|
|
821
823
|
if (!this._filterBoxItems.find((item) => item.field == el.field)) {
|
|
822
824
|
let items = [];
|
|
823
825
|
if ((el.type == 'enum' || el.type == 'select' || el.type == 'tree-select') && el.items != null) {
|
|
824
|
-
el.items?.().then((res) => {
|
|
826
|
+
el.items?.(null).then((res) => {
|
|
825
827
|
let nodes = [];
|
|
826
828
|
if (el.type == 'tree-select') {
|
|
827
829
|
const convertToNzTreeNodes = (items) => {
|
|
@@ -843,16 +845,26 @@ class GridComponent {
|
|
|
843
845
|
position: el.position ? el.position : 'filter',
|
|
844
846
|
colSpan: el.colSpan ? el.colSpan : 1,
|
|
845
847
|
sort: el.sort ? el.sort : 0,
|
|
848
|
+
searchValue: null,
|
|
849
|
+
serverSide: el.serverSide ? el.serverSide : false,
|
|
846
850
|
nodes
|
|
847
851
|
});
|
|
848
852
|
});
|
|
849
853
|
}
|
|
850
854
|
else if (el.type == 'boolean') {
|
|
851
855
|
items.push({
|
|
852
|
-
label: this._translate.
|
|
856
|
+
label: this._translate.get("true").subscribe({
|
|
857
|
+
next: (value) => {
|
|
858
|
+
return value;
|
|
859
|
+
},
|
|
860
|
+
}),
|
|
853
861
|
value: true
|
|
854
862
|
}, {
|
|
855
|
-
label: this._translate.
|
|
863
|
+
label: this._translate.get("false").subscribe({
|
|
864
|
+
next: (value) => {
|
|
865
|
+
return value;
|
|
866
|
+
},
|
|
867
|
+
}),
|
|
856
868
|
value: false
|
|
857
869
|
});
|
|
858
870
|
this._filterBoxItems.push({
|
|
@@ -864,6 +876,8 @@ class GridComponent {
|
|
|
864
876
|
position: el.position ? el.position : 'filter',
|
|
865
877
|
colSpan: el.colSpan ? el.colSpan : 1,
|
|
866
878
|
sort: el.sort ? el.sort : 0,
|
|
879
|
+
searchValue: null,
|
|
880
|
+
serverSide: el.serverSide ? el.serverSide : false,
|
|
867
881
|
nodes: []
|
|
868
882
|
});
|
|
869
883
|
}
|
|
@@ -877,6 +891,8 @@ class GridComponent {
|
|
|
877
891
|
position: el.position ? el.position : 'filter',
|
|
878
892
|
colSpan: el.colSpan ? el.colSpan : 1,
|
|
879
893
|
sort: el.sort ? el.sort : 0,
|
|
894
|
+
searchValue: null,
|
|
895
|
+
serverSide: el.serverSide ? el.serverSide : false,
|
|
880
896
|
nodes: []
|
|
881
897
|
});
|
|
882
898
|
}
|
|
@@ -952,6 +968,9 @@ class GridComponent {
|
|
|
952
968
|
case 'date':
|
|
953
969
|
filter = 'agDateColumnFilter';
|
|
954
970
|
break;
|
|
971
|
+
case 'price':
|
|
972
|
+
filter = 'agNumberColumnFilter';
|
|
973
|
+
break;
|
|
955
974
|
default:
|
|
956
975
|
filter = 'agTextColumnFilter';
|
|
957
976
|
break;
|
|
@@ -1001,7 +1020,11 @@ class GridComponent {
|
|
|
1001
1020
|
filterParams,
|
|
1002
1021
|
cellRenderer: params => {
|
|
1003
1022
|
if (params.value) {
|
|
1004
|
-
return this._translate.
|
|
1023
|
+
return this._translate.get(params.value).subscribe({
|
|
1024
|
+
next: (value) => {
|
|
1025
|
+
return value;
|
|
1026
|
+
},
|
|
1027
|
+
});
|
|
1005
1028
|
}
|
|
1006
1029
|
else {
|
|
1007
1030
|
return '';
|
|
@@ -1084,7 +1107,7 @@ class GridComponent {
|
|
|
1084
1107
|
filterParams,
|
|
1085
1108
|
pinned: el.pinned,
|
|
1086
1109
|
cellRenderer: params => {
|
|
1087
|
-
if (params.value) {
|
|
1110
|
+
if (params.value != null) {
|
|
1088
1111
|
return params.value.toLocaleString();
|
|
1089
1112
|
}
|
|
1090
1113
|
else {
|
|
@@ -1140,7 +1163,11 @@ class GridComponent {
|
|
|
1140
1163
|
case 'enum':
|
|
1141
1164
|
Object.keys(el.filterItems).forEach((item) => {
|
|
1142
1165
|
items.push({
|
|
1143
|
-
label: this._translate.
|
|
1166
|
+
label: this._translate.get(el.filterItems[item]).subscribe({
|
|
1167
|
+
next: (value) => {
|
|
1168
|
+
return value;
|
|
1169
|
+
},
|
|
1170
|
+
}),
|
|
1144
1171
|
value: el.filterItems[item]
|
|
1145
1172
|
});
|
|
1146
1173
|
});
|
|
@@ -1148,10 +1175,18 @@ class GridComponent {
|
|
|
1148
1175
|
case 'boolean':
|
|
1149
1176
|
Object.keys(el.filterItems).forEach((item) => {
|
|
1150
1177
|
items.push({
|
|
1151
|
-
label: this._translate.
|
|
1178
|
+
label: this._translate.get("true").subscribe({
|
|
1179
|
+
next: (value) => {
|
|
1180
|
+
return value;
|
|
1181
|
+
},
|
|
1182
|
+
}),
|
|
1152
1183
|
value: true
|
|
1153
1184
|
}, {
|
|
1154
|
-
label: this._translate.
|
|
1185
|
+
label: this._translate.get("false").subscribe({
|
|
1186
|
+
next: (value) => {
|
|
1187
|
+
return value;
|
|
1188
|
+
},
|
|
1189
|
+
}),
|
|
1155
1190
|
value: false
|
|
1156
1191
|
});
|
|
1157
1192
|
});
|
|
@@ -1167,7 +1202,9 @@ class GridComponent {
|
|
|
1167
1202
|
position: 'filter',
|
|
1168
1203
|
colSpan: 1,
|
|
1169
1204
|
sort: 1,
|
|
1170
|
-
nodes: []
|
|
1205
|
+
nodes: [],
|
|
1206
|
+
serverSide: false,
|
|
1207
|
+
searchValue: null
|
|
1171
1208
|
});
|
|
1172
1209
|
this._filterBoxItems.sort((a, b) => {
|
|
1173
1210
|
return a.sort - b.sort;
|
|
@@ -1320,6 +1357,7 @@ class GridComponent {
|
|
|
1320
1357
|
this.gridApi.setFilterModel(null);
|
|
1321
1358
|
this.gridApi.onFilterChanged();
|
|
1322
1359
|
this.filterItemsValues = [];
|
|
1360
|
+
this._cdr.detectChanges();
|
|
1323
1361
|
this.refresh();
|
|
1324
1362
|
}
|
|
1325
1363
|
refreshParentNode(id) {
|
|
@@ -1334,6 +1372,7 @@ class GridComponent {
|
|
|
1334
1372
|
this.handleFilterLabelValue();
|
|
1335
1373
|
this.refresh();
|
|
1336
1374
|
this.visibleFilterBox = false;
|
|
1375
|
+
this._cdr.detectChanges();
|
|
1337
1376
|
}
|
|
1338
1377
|
setTemplateFilter(item) {
|
|
1339
1378
|
this.clearFilter();
|
|
@@ -1426,6 +1465,21 @@ class GridComponent {
|
|
|
1426
1465
|
this._cdr.detectChanges();
|
|
1427
1466
|
this.refresh();
|
|
1428
1467
|
}
|
|
1468
|
+
handleSearchSelectBox(e, item) {
|
|
1469
|
+
if (!this.searchChangeObserver) {
|
|
1470
|
+
Observable.create((observer) => {
|
|
1471
|
+
this.searchChangeObserver = observer;
|
|
1472
|
+
})
|
|
1473
|
+
.pipe(debounceTime(500))
|
|
1474
|
+
.pipe(distinctUntilChanged())
|
|
1475
|
+
.subscribe((c) => {
|
|
1476
|
+
this._filterItems.find((el) => el.field == item.field).items(c.target.value).then((res) => {
|
|
1477
|
+
item.items = res;
|
|
1478
|
+
});
|
|
1479
|
+
});
|
|
1480
|
+
}
|
|
1481
|
+
this.searchChangeObserver.next(event);
|
|
1482
|
+
}
|
|
1429
1483
|
createServerSideDatasource() {
|
|
1430
1484
|
return {
|
|
1431
1485
|
getRows: (params) => {
|
|
@@ -1609,11 +1663,11 @@ class GridComponent {
|
|
|
1609
1663
|
this.fetchTemplate();
|
|
1610
1664
|
}
|
|
1611
1665
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: GridComponent, deps: [{ token: i1$3.TranslateService }, { token: i0.ChangeDetectorRef }, { token: ToastService }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
1612
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "17.3.12", type: GridComponent, selector: "app-grid", inputs: { actionWidth: "actionWidth", label: "label", id: "id", isRowSelection: "isRowSelection", requireFilterOrData: "requireFilterOrData", rowModelType: "rowModelType", serverSideSort: "serverSideSort", serverSideFilter: "serverSideFilter", isToolbar: "isToolbar", rtl: "rtl", paginationPageSize: "paginationPageSize", paginationPageSizeSelector: "paginationPageSizeSelector", enableAdvancedFilter: "enableAdvancedFilter", treeModel: "treeModel", isLeaf: "isLeaf", rowData: "rowData", autoColumnSize: "autoColumnSize", showAdvancedButton: "showAdvancedButton", actionItems: "actionItems", toolbarItems: "toolbarItems", treeGroupColumn: "treeGroupColumn", filterItems: "filterItems", fetchData: "fetchData", column: "column" }, outputs: { onAction: "onAction", onToolbar: "onToolbar", onClicked: "onClicked", rowSelectionChange: "rowSelectionChange" }, ngImport: i0, template: "<!-- <button (click)=\"enableAdvancedFilter=!enableAdvancedFilter\">advanced</button> -->\n<div class=\"flex justify-between items-center py-4 border-b border-b-slate-200 mx-4\" *ngIf=\"isToolbar\">\n <div>\n <h4 class=\"font-semibold text-2xl\">{{ label }}</h4>\n </div>\n <div class=\"flex gap-3\">\n @for (item of toolbarItems; track $index) {\n <button nz-button [nzLoading]=\"item.loading ? item.loading : false\" (click)=\"handleClick(item)\" [nzType]=\"item.type\">\n <span nz-icon [nzType]=\"item.icon\"></span>\n {{ item.text }}\n </button>\n }\n <button\n (click)=\"handleVisibleFilterBox()\"\n nz-button\n nzType=\"default\"\n nz-popover\n nzPopoverTitle=\"\"\n nzPopoverTrigger=\"click\"\n [nzPopoverContent]=\"contentTemplate\"\n nzPopoverOverlayClassName=\"filter-popover\"\n nzPopoverPlacement=\"bottom\"\n *ngIf=\"_filterBoxItems.length > 0\">\n <span nz-icon nzType=\"filter\"></span>\n \u0641\u06CC\u0644\u062A\u0631\n </button>\n <button\n nz-button\n nzType=\"default\"\n class=\"flex items-center\"\n nz-popover\n nzPopoverTitle=\"\"\n [(nzPopoverVisible)]=\"visibleFilterTemplateBox\"\n nzPopoverTrigger=\"click\"\n [nzPopoverContent]=\"contentFilterTemplate\"\n nzPopoverOverlayClassName=\"filter-popover-sm\"\n nzPopoverPlacement=\"bottom\"\n *ngIf=\"id != null\">\n <span nz-icon nzType=\"layout\"></span>\n \u0641\u06CC\u0644\u062A\u0631 \u0647\u0627\u06CC \u0630\u062E\u06CC\u0631\u0647 \u0634\u062F\u0647\n </button>\n <button nz-button (click)=\"refresh()\" nzType=\"default\">\n <span nz-icon nzType=\"sync\"></span>\n \u0628\u0631\u0648\u0632\u0631\u0633\u0627\u0646\u06CC\n </button>\n <!-- <button nz-button (click)=\"advancedFilter()\" *ngIf=\"showAdvancedButton\" nzType=\"default\">\n <span nz-icon nzType=\"filter\"></span>\n \u062C\u0633\u062A\u062C\u0648\u06CC \u067E\u06CC\u0634\u0631\u0641\u062A\u0647\n </button> -->\n </div>\n</div>\n<ng-template #contentTemplate class=\"w-full\">\n <div class=\"grid gap-x-4 p-4 max-h-[400px] overflow-auto\" [ngClass]=\"{ 'grid-cols-1': _filterBoxItems.length == 1, 'grid-cols-2': _filterBoxItems.length > 1 }\">\n <div *ngFor=\"let item of _filterBoxItems\" [ngClass]=\"{ 'col-span-2': item.type == 'date' || item.type == 'date-time' || item.colSpan == 2 }\">\n <div *ngIf=\"item.type == 'date' || item.type == 'date-time'\" class=\"grid grid-cols-2 gap-x-4\">\n <nz-form-item>\n <nz-form-label>\u0627\u0632 \u062A\u0627\u0631\u06CC\u062E</nz-form-label>\n <nz-form-control>\n <qeydar-date-picker\n [ngModel]=\"item.value != null ? item.value[0] : null\"\n (onChangeValue)=\"changeDatePickerValue($event, item, 0)\"\n [showToday]=\"true\"\n [allowEmpty]=\"true\"\n [calendarType]=\"'jalali'\"\n format=\"yyyy-MM-dd\"\n [rtl]=\"true\"></qeydar-date-picker>\n </nz-form-control>\n </nz-form-item>\n <nz-form-item>\n <nz-form-label>\u062A\u0627 \u062A\u0627\u0631\u06CC\u062E</nz-form-label>\n <nz-form-control>\n <qeydar-date-picker\n [ngModel]=\"item.value != null ? item.value[1] : null\"\n (onChangeValue)=\"changeDatePickerValue($event, item, 1)\"\n [showToday]=\"true\"\n [allowEmpty]=\"true\"\n [calendarType]=\"'jalali'\"\n format=\"yyyy-MM-dd\"\n [rtl]=\"true\"></qeydar-date-picker>\n </nz-form-control>\n </nz-form-item>\n </div>\n <div *ngIf=\"item.type == 'enum' || item.type == 'select' || item.type == 'boolean'\">\n <nz-form-item class=\"w-full\">\n <nz-form-label>{{ item.label }}</nz-form-label>\n <nz-select class=\"w-full\" [(ngModel)]=\"item.value\" nzShowSearch>\n <nz-option *ngFor=\"let item2 of item.items\" [nzValue]=\"item2.value\" [nzLabel]=\"item2.label\"></nz-option>\n </nz-select>\n </nz-form-item>\n </div>\n <div *ngIf=\"item.type == 'tree-select'\">\n <nz-form-item class=\"w-full\">\n <nz-form-label>{{ item.label }}</nz-form-label>\n <nz-tree-select class=\"w-full\" [nzNodes]=\"item.nodes\" nzVirtualHeight=\"320px\" nzShowSearch [(ngModel)]=\"item.value\"></nz-tree-select>\n </nz-form-item>\n </div>\n <div *ngIf=\"item.type == 'string' || item.type == null\">\n <nz-form-item class=\"w-full\">\n <nz-form-label>{{ item.label }}</nz-form-label>\n <input type=\"text\" nz-input [(ngModel)]=\"item.value\" />\n </nz-form-item>\n </div>\n </div>\n </div>\n <div class=\"flex gap-2 p-4 border-t border-t-slate-200\">\n <button nz-button nzType=\"primary\" (click)=\"filter()\">\u0627\u0639\u0645\u0627\u0644</button>\n <button nz-button nzType=\"default\" (click)=\"clearFilter()\">\u067E\u0627\u06A9\u0633\u0627\u0632\u06CC \u0648 \u0628\u0633\u062A\u0646</button>\n </div>\n</ng-template>\n<!-- template items box -->\n<ng-template #contentFilterTemplate class=\"w-full\">\n <ul class=\"flex flex-col gap-2\" *ngIf=\"filterTemplateItems.length > 0\">\n <li class=\"p-2 rounded-lg cursor-pointer border border-slate-200\" *ngFor=\"let item of filterTemplateItems\" (click)=\"setTemplateFilter(item)\">{{ item.title }}</li>\n </ul>\n <p *ngIf=\"filterTemplateItems.length == 0\" class=\"text-center\">\u0642\u0627\u0644\u0628\u06CC \u062C\u0647\u062A \u0646\u0645\u0627\u06CC\u0634 \u0648\u062C\u0648\u062F \u0646\u062F\u0627\u0631\u062F</p>\n</ng-template>\n<div class=\"flex items-center justify-between gap-2 px-4 py-2 h-14\" *ngIf=\"isToolbar\">\n <div class=\"flex items-center gap-2\">\n <span class=\"font-medium text-sm text-blue-500\">\u0641\u06CC\u0644\u062A\u0631\u0647\u0627\u06CC \u0627\u0639\u0645\u0627\u0644 \u0634\u062F\u0647:</span>\n <ul class=\"flex items-center gap-2\">\n <li class=\"bg-white border border-slate-200 rounded-md px-2 py-1 flex items-center gap-1 h-8\" *ngIf=\"filterItemsValues.length == 0\">\n <span class=\"text-slate-800 font-medium text-sm\">\u0628\u062F\u0648\u0646 \u0641\u06CC\u0644\u062A\u0631</span>\n </li>\n <li class=\"bg-white border border-slate-200 rounded-md px-2 py-1 flex items-center gap-1 h-8\" *ngFor=\"let item of filterItemsValues\">\n <label class=\"text-slate-500 text-sm\">{{ item.label }}:</label>\n <span class=\"text-slate-800 font-medium text-sm\">{{ item.value | translate }}</span>\n <i class=\"fa-regular fa-times cursor-pointer ps-2\" (click)=\"removeFilter(item)\"></i>\n </li>\n </ul>\n </div>\n <div class=\"flex items-center gap-2\" *ngIf=\"id != null\">\n <button nz-button nzType=\"default\" *ngIf=\"filterItemsValues.length > 0 || gridId != null\" (click)=\"saveFilterGrid()\">\n {{ gridId == null ? '\u0630\u062E\u06CC\u0631\u0647 \u0641\u06CC\u0644\u062A\u0631' : '\u0627\u0639\u0645\u0627\u0644 \u062A\u063A\u06CC\u06CC\u0631\u0627\u062A \u0641\u06CC\u0644\u062A\u0631' }}\n </button>\n <button nz-button nzType=\"default\" *ngIf=\"gridId != null\" (click)=\"clearFilter(); gridId = null\">\u0644\u063A\u0648</button>\n </div>\n</div>\n\n<nz-modal [(nzVisible)]=\"isVisibleModal\" nzTitle=\"\u0627\u0641\u0632\u0648\u062F\u0646 \u0642\u0627\u0644\u0628 \u062C\u062F\u06CC\u062F\" (nzOnCancel)=\"handleCancelModal()\" (nzOnOk)=\"handleOkModal()\">\n <ng-container *nzModalContent>\n <nz-form-item class=\"w-full\">\n <nz-form-label>\u0639\u0646\u0648\u0627\u0646 \u0642\u0627\u0644\u0628</nz-form-label>\n <input type=\"text\" nz-input [(ngModel)]=\"templateName\" />\n </nz-form-item>\n </ng-container>\n</nz-modal>\n\n<ag-grid-angular\n style=\"width: 100%\"\n [style]=\"isToolbar ? 'height: calc(100% - 1rem - 114px);' : 'height: 100%;'\"\n [columnDefs]=\"columnDefs\"\n [pagination]=\"true\"\n [paginationPageSize]=\"paginationPageSize\"\n [paginationPageSizeSelector]=\"paginationPageSizeSelector\"\n [class]=\"themeClass\"\n [rowHeight]=\"48\"\n [defaultColDef]=\"defaultColDef\"\n [enableAdvancedFilter]=\"enableAdvancedFilter\"\n [enableRtl]=\"rtl\"\n [treeData]=\"treeModel\"\n [autoGroupColumnDef]=\"autoGroupColumnDef\"\n [isServerSideGroup]=\"isServerSideGroup\"\n [getServerSideGroupKey]=\"getServerSideGroupKey\"\n [rowModelType]=\"rowModelType\"\n [rowData]=\"rowData\"\n [serverSideDatasource]=\"datasource\"\n (gridReady)=\"onGridReady($event)\"\n [cacheBlockSize]=\"paginationPageSize\"\n [maxBlocksInCache]=\"2\"\n [context]=\"{ actionItems: actionItems }\"\n (cellDoubleClicked)=\"cellDoubleClicked($event)\"\n [autoSizeStrategy]=\"_autoColumnSize\"\n [rowSelection]=\"_rowSelection\"\n (selectionChanged)=\"selectionChanged($event)\"\n [theme]=\"\"\n [getRowClass]=\"getRowClass\"\n #grid />\n", dependencies: [{ kind: "directive", type: i3$1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i3$1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i3$1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: i4$1.AgGridAngular, selector: "ag-grid-angular", inputs: ["gridOptions", "modules", "statusBar", "sideBar", "suppressContextMenu", "preventDefaultOnContextMenu", "allowContextMenuWithControlKey", "columnMenu", "suppressMenuHide", "enableBrowserTooltips", "tooltipTrigger", "tooltipShowDelay", "tooltipHideDelay", "tooltipMouseTrack", "tooltipShowMode", "tooltipInteraction", "popupParent", "copyHeadersToClipboard", "copyGroupHeadersToClipboard", "clipboardDelimiter", "suppressCopyRowsToClipboard", "suppressCopySingleCellRanges", "suppressLastEmptyLineOnPaste", "suppressClipboardPaste", "suppressClipboardApi", "suppressCutToClipboard", "columnDefs", "defaultColDef", "defaultColGroupDef", "columnTypes", "dataTypeDefinitions", "maintainColumnOrder", "enableStrictPivotColumnOrder", "suppressFieldDotNotation", "headerHeight", "groupHeaderHeight", "floatingFiltersHeight", "pivotHeaderHeight", "pivotGroupHeaderHeight", "allowDragFromColumnsToolPanel", "suppressMovableColumns", "suppressColumnMoveAnimation", "suppressMoveWhenColumnDragging", "suppressDragLeaveHidesColumns", "suppressRowGroupHidesColumns", "colResizeDefault", "suppressAutoSize", "autoSizePadding", "skipHeaderOnAutoSize", "autoSizeStrategy", "components", "editType", "singleClickEdit", "suppressClickEdit", "readOnlyEdit", "stopEditingWhenCellsLoseFocus", "enterNavigatesVertically", "enterNavigatesVerticallyAfterEdit", "enableCellEditingOnBackspace", "undoRedoCellEditing", "undoRedoCellEditingLimit", "defaultCsvExportParams", "suppressCsvExport", "defaultExcelExportParams", "suppressExcelExport", "excelStyles", "quickFilterText", "cacheQuickFilter", "includeHiddenColumnsInQuickFilter", "quickFilterParser", "quickFilterMatcher", "applyQuickFilterBeforePivotOrAgg", "excludeChildrenWhenTreeDataFiltering", "enableAdvancedFilter", "advancedFilterModel", "includeHiddenColumnsInAdvancedFilter", "advancedFilterParent", "advancedFilterBuilderParams", "suppressAdvancedFilterEval", "suppressSetFilterByDefault", "enableCharts", "chartThemes", "customChartThemes", "chartThemeOverrides", "chartToolPanelsDef", "chartMenuItems", "loadingCellRenderer", "loadingCellRendererParams", "loadingCellRendererSelector", "localeText", "masterDetail", "keepDetailRows", "keepDetailRowsCount", "detailCellRenderer", "detailCellRendererParams", "detailRowHeight", "detailRowAutoHeight", "context", "dragAndDropImageComponent", "dragAndDropImageComponentParams", "alignedGrids", "tabIndex", "rowBuffer", "valueCache", "valueCacheNeverExpires", "enableCellExpressions", "suppressTouch", "suppressFocusAfterRefresh", "suppressAsyncEvents", "suppressBrowserResizeObserver", "suppressPropertyNamesCheck", "suppressChangeDetection", "debug", "loading", "overlayLoadingTemplate", "loadingOverlayComponent", "loadingOverlayComponentParams", "suppressLoadingOverlay", "overlayNoRowsTemplate", "noRowsOverlayComponent", "noRowsOverlayComponentParams", "suppressNoRowsOverlay", "pagination", "paginationPageSize", "paginationPageSizeSelector", "paginationAutoPageSize", "paginateChildRows", "suppressPaginationPanel", "pivotMode", "pivotPanelShow", "pivotMaxGeneratedColumns", "pivotDefaultExpanded", "pivotColumnGroupTotals", "pivotRowTotals", "pivotSuppressAutoColumn", "suppressExpandablePivotGroups", "functionsReadOnly", "aggFuncs", "suppressAggFuncInHeader", "alwaysAggregateAtRootLevel", "aggregateOnlyChangedColumns", "suppressAggFilteredOnly", "removePivotHeaderRowWhenSingleValueColumn", "animateRows", "enableCellChangeFlash", "cellFlashDuration", "cellFlashDelay", "cellFadeDuration", "cellFadeDelay", "allowShowChangeAfterFilter", "domLayout", "ensureDomOrder", "enableRtl", "suppressColumnVirtualisation", "suppressMaxRenderedRowRestriction", "suppressRowVirtualisation", "rowDragManaged", "suppressRowDrag", "suppressMoveWhenRowDragging", "rowDragEntireRow", "rowDragMultiRow", "rowDragText", "fullWidthCellRenderer", "fullWidthCellRendererParams", "embedFullWidthRows", "suppressGroupMaintainValueType", "groupDisplayType", "groupDefaultExpanded", "autoGroupColumnDef", "groupMaintainOrder", "groupSelectsChildren", "groupLockGroupColumns", "groupAggFiltering", "groupIncludeFooter", "groupIncludeTotalFooter", "groupTotalRow", "grandTotalRow", "suppressStickyTotalRow", "groupSuppressBlankHeader", "groupSelectsFiltered", "showOpenedGroup", "groupRemoveSingleChildren", "groupRemoveLowestSingleChildren", "groupHideOpenParents", "groupAllowUnbalanced", "rowGroupPanelShow", "groupRowRenderer", "groupRowRendererParams", "suppressMakeColumnVisibleAfterUnGroup", "treeData", "rowGroupPanelSuppressSort", "suppressGroupRowsSticky", "pinnedTopRowData", "pinnedBottomRowData", "rowModelType", "rowData", "asyncTransactionWaitMillis", "suppressModelUpdateAfterUpdateTransaction", "datasource", "cacheOverflowSize", "infiniteInitialRowCount", "serverSideInitialRowCount", "suppressServerSideInfiniteScroll", "suppressServerSideFullWidthLoadingRow", "cacheBlockSize", "maxBlocksInCache", "maxConcurrentDatasourceRequests", "blockLoadDebounceMillis", "purgeClosedRowNodes", "serverSideDatasource", "serverSideSortAllLevels", "serverSideEnableClientSideSort", "serverSideOnlyRefreshFilteredGroups", "serverSideSortOnServer", "serverSideFilterOnServer", "serverSidePivotResultFieldSeparator", "viewportDatasource", "viewportRowModelPageSize", "viewportRowModelBufferSize", "alwaysShowHorizontalScroll", "alwaysShowVerticalScroll", "debounceVerticalScrollbar", "suppressHorizontalScroll", "suppressScrollOnNewData", "suppressScrollWhenPopupsAreOpen", "suppressAnimationFrame", "suppressMiddleClickScrolls", "suppressPreventDefaultOnMouseWheel", "scrollbarWidth", "rowSelection", "cellSelection", "rowMultiSelectWithClick", "suppressRowDeselection", "suppressRowClickSelection", "suppressCellFocus", "suppressHeaderFocus", "selectionColumnDef", "suppressMultiRangeSelection", "enableCellTextSelection", "enableRangeSelection", "enableRangeHandle", "enableFillHandle", "fillHandleDirection", "suppressClearOnFillReduction", "sortingOrder", "accentedSort", "unSortIcon", "suppressMultiSort", "alwaysMultiSort", "multiSortKey", "suppressMaintainUnsortedOrder", "icons", "rowHeight", "rowStyle", "rowClass", "rowClassRules", "suppressRowHoverHighlight", "suppressRowTransform", "columnHoverHighlight", "gridId", "deltaSort", "treeDataDisplayType", "enableGroupEdit", "initialState", "theme", "loadThemeGoogleFonts", "getContextMenuItems", "getMainMenuItems", "postProcessPopup", "processUnpinnedColumns", "processCellForClipboard", "processHeaderForClipboard", "processGroupHeaderForClipboard", "processCellFromClipboard", "sendToClipboard", "processDataFromClipboard", "isExternalFilterPresent", "doesExternalFilterPass", "getChartToolbarItems", "createChartContainer", "focusGridInnerElement", "navigateToNextHeader", "tabToNextHeader", "navigateToNextCell", "tabToNextCell", "getLocaleText", "getDocument", "paginationNumberFormatter", "getGroupRowAgg", "isGroupOpenByDefault", "initialGroupOrderComparator", "processPivotResultColDef", "processPivotResultColGroupDef", "getDataPath", "getChildCount", "getServerSideGroupLevelParams", "isServerSideGroupOpenByDefault", "isApplyServerSideTransaction", "isServerSideGroup", "getServerSideGroupKey", "getBusinessKeyForNode", "getRowId", "resetRowDataOnUpdate", "processRowPostCreate", "isRowSelectable", "isRowMaster", "fillOperation", "postSortRows", "getRowStyle", "getRowClass", "getRowHeight", "isFullWidthRow"], outputs: ["toolPanelVisibleChanged", "toolPanelSizeChanged", "columnMenuVisibleChanged", "contextMenuVisibleChanged", "cutStart", "cutEnd", "pasteStart", "pasteEnd", "columnVisible", "columnPinned", "columnResized", "columnMoved", "columnValueChanged", "columnPivotModeChanged", "columnPivotChanged", "columnGroupOpened", "newColumnsLoaded", "gridColumnsChanged", "displayedColumnsChanged", "virtualColumnsChanged", "columnEverythingChanged", "columnHeaderMouseOver", "columnHeaderMouseLeave", "columnHeaderClicked", "columnHeaderContextMenu", "componentStateChanged", "cellValueChanged", "cellEditRequest", "rowValueChanged", "cellEditingStarted", "cellEditingStopped", "rowEditingStarted", "rowEditingStopped", "undoStarted", "undoEnded", "redoStarted", "redoEnded", "cellSelectionDeleteStart", "cellSelectionDeleteEnd", "rangeDeleteStart", "rangeDeleteEnd", "fillStart", "fillEnd", "filterOpened", "filterChanged", "filterModified", "advancedFilterBuilderVisibleChanged", "chartCreated", "chartRangeSelectionChanged", "chartOptionsChanged", "chartDestroyed", "cellKeyDown", "gridReady", "firstDataRendered", "gridSizeChanged", "modelUpdated", "virtualRowRemoved", "viewportChanged", "bodyScroll", "bodyScrollEnd", "dragStarted", "dragStopped", "dragCancelled", "stateUpdated", "paginationChanged", "rowDragEnter", "rowDragMove", "rowDragLeave", "rowDragEnd", "rowDragCancel", "columnRowGroupChanged", "rowGroupOpened", "expandOrCollapseAll", "pivotMaxColumnsExceeded", "pinnedRowDataChanged", "rowDataUpdated", "asyncTransactionsFlushed", "storeRefreshed", "headerFocused", "cellClicked", "cellDoubleClicked", "cellFocused", "cellMouseOver", "cellMouseOut", "cellMouseDown", "rowClicked", "rowDoubleClicked", "rowSelected", "selectionChanged", "cellContextMenu", "rangeSelectionChanged", "cellSelectionChanged", "tooltipShow", "tooltipHide", "sortChanged"] }, { kind: "directive", type: i5$1.NzIconDirective, selector: "[nz-icon]", inputs: ["nzSpin", "nzRotate", "nzType", "nzTheme", "nzTwotoneColor", "nzIconfont"], exportAs: ["nzIcon"] }, { kind: "component", type: i1$2.NzButtonComponent, selector: "button[nz-button], a[nz-button]", inputs: ["nzBlock", "nzGhost", "nzSearch", "nzLoading", "nzDanger", "disabled", "tabIndex", "nzType", "nzShape", "nzSize"], exportAs: ["nzButton"] }, { kind: "directive", type: i2$1.ɵNzTransitionPatchDirective, selector: "[nz-button], nz-button-group, [nz-icon], [nz-menu-item], [nz-submenu], nz-select-top-control, nz-select-placeholder, nz-input-group", inputs: ["hidden"] }, { kind: "directive", type: i3.NzWaveDirective, selector: "[nz-wave],button[nz-button]:not([nzType=\"link\"]):not([nzType=\"text\"])", inputs: ["nzWaveExtraNode"], exportAs: ["nzWave"] }, { kind: "component", type: i1.NzModalComponent, selector: "nz-modal", inputs: ["nzMask", "nzMaskClosable", "nzCloseOnNavigation", "nzVisible", "nzClosable", "nzOkLoading", "nzOkDisabled", "nzCancelDisabled", "nzCancelLoading", "nzKeyboard", "nzNoAnimation", "nzCentered", "nzDraggable", "nzContent", "nzFooter", "nzZIndex", "nzWidth", "nzWrapClassName", "nzClassName", "nzStyle", "nzTitle", "nzCloseIcon", "nzMaskStyle", "nzBodyStyle", "nzOkText", "nzCancelText", "nzOkType", "nzOkDanger", "nzIconType", "nzModalType", "nzAutofocus", "nzOnOk", "nzOnCancel"], outputs: ["nzOnOk", "nzOnCancel", "nzAfterOpen", "nzAfterClose", "nzVisibleChange"], exportAs: ["nzModal"] }, { kind: "directive", type: i1.NzModalContentDirective, selector: "[nzModalContent]", exportAs: ["nzModalContent"] }, { kind: "directive", type: i4.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: i4.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i4.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "directive", type: i5.NzInputDirective, selector: "input[nz-input],textarea[nz-input]", inputs: ["nzBorderless", "nzSize", "nzStepperless", "nzStatus", "disabled"], exportAs: ["nzInput"] }, { kind: "directive", type: i6.NzColDirective, selector: "[nz-col],nz-col,nz-form-control,nz-form-label", inputs: ["nzFlex", "nzSpan", "nzOrder", "nzOffset", "nzPush", "nzPull", "nzXs", "nzSm", "nzMd", "nzLg", "nzXl", "nzXXl"], exportAs: ["nzCol"] }, { kind: "directive", type: i6.NzRowDirective, selector: "[nz-row],nz-row,nz-form-item", inputs: ["nzAlign", "nzJustify", "nzGutter"], exportAs: ["nzRow"] }, { kind: "component", type: i7.NzFormItemComponent, selector: "nz-form-item", exportAs: ["nzFormItem"] }, { kind: "component", type: i7.NzFormLabelComponent, selector: "nz-form-label", inputs: ["nzFor", "nzRequired", "nzNoColon", "nzTooltipTitle", "nzTooltipIcon", "nzLabelAlign", "nzLabelWrap"], exportAs: ["nzFormLabel"] }, { kind: "component", type: i7.NzFormControlComponent, selector: "nz-form-control", inputs: ["nzSuccessTip", "nzWarningTip", "nzErrorTip", "nzValidatingTip", "nzExtra", "nzAutoTips", "nzDisableAutoTips", "nzHasFeedback", "nzValidateStatus"], exportAs: ["nzFormControl"] }, { kind: "component", type: i14.NzOptionComponent, selector: "nz-option", inputs: ["nzTitle", "nzLabel", "nzValue", "nzKey", "nzDisabled", "nzHide", "nzCustomContent"], exportAs: ["nzOption"] }, { kind: "component", type: i14.NzSelectComponent, selector: "nz-select", inputs: ["nzId", "nzSize", "nzStatus", "nzOptionHeightPx", "nzOptionOverflowSize", "nzDropdownClassName", "nzDropdownMatchSelectWidth", "nzDropdownStyle", "nzNotFoundContent", "nzPlaceHolder", "nzPlacement", "nzMaxTagCount", "nzDropdownRender", "nzCustomTemplate", "nzSuffixIcon", "nzClearIcon", "nzRemoveIcon", "nzMenuItemSelectedIcon", "nzTokenSeparators", "nzMaxTagPlaceholder", "nzMaxMultipleCount", "nzMode", "nzFilterOption", "compareWith", "nzAllowClear", "nzBorderless", "nzShowSearch", "nzLoading", "nzAutoFocus", "nzAutoClearSearchValue", "nzServerSearch", "nzDisabled", "nzOpen", "nzSelectOnTab", "nzBackdrop", "nzOptions", "nzShowArrow"], outputs: ["nzOnSearch", "nzScrollToBottom", "nzOpenChange", "nzBlur", "nzFocus"], exportAs: ["nzSelect"] }, { kind: "component", type: i15.NzTreeSelectComponent, selector: "nz-tree-select", inputs: ["nzId", "nzAllowClear", "nzShowExpand", "nzShowLine", "nzDropdownMatchSelectWidth", "nzCheckable", "nzHideUnMatched", "nzShowIcon", "nzShowSearch", "nzDisabled", "nzAsyncData", "nzMultiple", "nzDefaultExpandAll", "nzCheckStrictly", "nzVirtualItemSize", "nzVirtualMaxBufferPx", "nzVirtualMinBufferPx", "nzVirtualHeight", "nzExpandedIcon", "nzNotFoundContent", "nzNodes", "nzOpen", "nzSize", "nzPlaceHolder", "nzDropdownStyle", "nzDropdownClassName", "nzBackdrop", "nzStatus", "nzPlacement", "nzExpandedKeys", "nzDisplayWith", "nzMaxTagCount", "nzMaxTagPlaceholder", "nzTreeTemplate"], outputs: ["nzOpenChange", "nzCleared", "nzRemoved", "nzExpandChange", "nzTreeClick", "nzTreeCheckBoxChange"], exportAs: ["nzTreeSelect"] }, { kind: "directive", type: i16.NzPopoverDirective, selector: "[nz-popover]", inputs: ["nzPopoverArrowPointAtCenter", "nzPopoverTitle", "nzPopoverContent", "nz-popover", "nzPopoverTrigger", "nzPopoverPlacement", "nzPopoverOrigin", "nzPopoverVisible", "nzPopoverMouseEnterDelay", "nzPopoverMouseLeaveDelay", "nzPopoverOverlayClassName", "nzPopoverOverlayStyle", "nzPopoverBackdrop"], outputs: ["nzPopoverVisibleChange"], exportAs: ["nzPopover"] }, { kind: "component", type: i17.DatePickerComponent, selector: "qeydar-date-picker", inputs: ["rtl", "mode", "isRange", "customLabels", "calendarType", "lang", "cssClass", "footerDescription", "rangeInputLabels", "inputLabel", "placement", "disabled", "isInline", "showSidebar", "showToday", "valueFormat", "disableInputMask", "disabledDates", "disabledDatesFilter", "disabledTimesFilter", "allowEmpty", "readOnly", "readOnlyInput", "minDate", "maxDate", "format"], outputs: ["onFocus", "onBlur", "onChangeValue", "onOpenChange"] }, { kind: "pipe", type: i1$3.TranslatePipe, name: "translate" }] }); }
|
|
1666
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "17.3.12", type: GridComponent, selector: "app-grid", inputs: { actionWidth: "actionWidth", label: "label", id: "id", isRowSelection: "isRowSelection", requireFilterOrData: "requireFilterOrData", rowModelType: "rowModelType", serverSideSort: "serverSideSort", serverSideFilter: "serverSideFilter", isToolbar: "isToolbar", rtl: "rtl", paginationPageSize: "paginationPageSize", paginationPageSizeSelector: "paginationPageSizeSelector", enableAdvancedFilter: "enableAdvancedFilter", treeModel: "treeModel", isLeaf: "isLeaf", rowData: "rowData", autoColumnSize: "autoColumnSize", showAdvancedButton: "showAdvancedButton", actionItems: "actionItems", toolbarItems: "toolbarItems", treeGroupColumn: "treeGroupColumn", filterItems: "filterItems", fetchData: "fetchData", column: "column" }, outputs: { onAction: "onAction", onToolbar: "onToolbar", onClicked: "onClicked", rowSelectionChange: "rowSelectionChange" }, ngImport: i0, template: "<!-- <button (click)=\"enableAdvancedFilter=!enableAdvancedFilter\">advanced</button> -->\n<div class=\"flex justify-between items-center py-4 border-b border-b-slate-200 mx-4\" *ngIf=\"isToolbar\">\n <div>\n <h4 class=\"font-semibold text-2xl\">{{ label }}</h4>\n </div>\n <div class=\"flex gap-3\">\n @for (item of toolbarItems; track $index) {\n <button nz-button [nzLoading]=\"item.loading ? item.loading : false\" (click)=\"handleClick(item)\" [nzType]=\"item.type\">\n <span nz-icon [nzType]=\"item.icon\"></span>\n {{ item.text }}\n </button>\n }\n <button\n (click)=\"handleVisibleFilterBox()\"\n nz-button\n nzType=\"default\"\n nz-popover\n nzPopoverTitle=\"\"\n nzPopoverTrigger=\"click\"\n [nzPopoverContent]=\"contentTemplate\"\n nzPopoverOverlayClassName=\"filter-popover\"\n nzPopoverPlacement=\"bottom\"\n *ngIf=\"_filterBoxItems.length > 0\">\n <span nz-icon nzType=\"filter\"></span>\n \u0641\u06CC\u0644\u062A\u0631\n </button>\n <button\n nz-button\n nzType=\"default\"\n class=\"flex items-center\"\n nz-popover\n nzPopoverTitle=\"\"\n [(nzPopoverVisible)]=\"visibleFilterTemplateBox\"\n nzPopoverTrigger=\"click\"\n [nzPopoverContent]=\"contentFilterTemplate\"\n nzPopoverOverlayClassName=\"filter-popover-sm\"\n nzPopoverPlacement=\"bottom\"\n *ngIf=\"id != null\">\n <span nz-icon nzType=\"layout\"></span>\n \u0641\u06CC\u0644\u062A\u0631 \u0647\u0627\u06CC \u0630\u062E\u06CC\u0631\u0647 \u0634\u062F\u0647\n </button>\n <button nz-button (click)=\"refresh()\" nzType=\"default\">\n <span nz-icon nzType=\"sync\"></span>\n \u0628\u0631\u0648\u0632\u0631\u0633\u0627\u0646\u06CC\n </button>\n <!-- <button nz-button (click)=\"advancedFilter()\" *ngIf=\"showAdvancedButton\" nzType=\"default\">\n <span nz-icon nzType=\"filter\"></span>\n \u062C\u0633\u062A\u062C\u0648\u06CC \u067E\u06CC\u0634\u0631\u0641\u062A\u0647\n </button> -->\n </div>\n</div>\n<ng-template #contentTemplate class=\"w-full\">\n <div class=\"grid gap-x-4 p-4 max-h-[400px] overflow-auto\" [ngClass]=\"{ 'grid-cols-1': _filterBoxItems.length == 1, 'grid-cols-2': _filterBoxItems.length > 1 }\">\n <div *ngFor=\"let item of _filterBoxItems\" [ngClass]=\"{ 'col-span-2': item.type == 'date' || item.type == 'date-time' || item.colSpan == 2 }\">\n <div *ngIf=\"item.type == 'date' || item.type == 'date-time'\" class=\"grid grid-cols-2 gap-x-4\">\n <nz-form-item>\n <nz-form-label>\u0627\u0632 \u062A\u0627\u0631\u06CC\u062E</nz-form-label>\n <nz-form-control>\n <qeydar-date-picker\n [ngModel]=\"item.value != null ? item.value[0] : null\"\n (onChangeValue)=\"changeDatePickerValue($event, item, 0)\"\n [showToday]=\"true\"\n [allowEmpty]=\"true\"\n [calendarType]=\"'jalali'\"\n format=\"yyyy-MM-dd\"\n [rtl]=\"true\"></qeydar-date-picker>\n </nz-form-control>\n </nz-form-item>\n <nz-form-item>\n <nz-form-label>\u062A\u0627 \u062A\u0627\u0631\u06CC\u062E</nz-form-label>\n <nz-form-control>\n <qeydar-date-picker\n [ngModel]=\"item.value != null ? item.value[1] : null\"\n (onChangeValue)=\"changeDatePickerValue($event, item, 1)\"\n [showToday]=\"true\"\n [allowEmpty]=\"true\"\n [calendarType]=\"'jalali'\"\n format=\"yyyy-MM-dd\"\n [rtl]=\"true\"></qeydar-date-picker>\n </nz-form-control>\n </nz-form-item>\n </div>\n <div *ngIf=\"item.type == 'enum' || item.type == 'select' || item.type == 'boolean'\">\n <nz-form-item class=\"w-full\">\n <nz-form-label>{{ item.label }}</nz-form-label>\n <nz-select class=\"w-full\" [(ngModel)]=\"item.value\" nzShowSearch nzServerSearch (nzOnSearch)=\"handleSearchSelectBox($event, item)\" *ngIf=\"item.serverSide\">\n <nz-option *ngFor=\"let item2 of item.items\" [nzValue]=\"item2.value\" [nzLabel]=\"item2.label\"></nz-option>\n </nz-select>\n <nz-select class=\"w-full\" [(ngModel)]=\"item.value\" nzShowSearch *ngIf=\"!item.serverSide\">\n <nz-option *ngFor=\"let item2 of item.items\" [nzValue]=\"item2.value\" [nzLabel]=\"item2.label\"></nz-option>\n </nz-select>\n </nz-form-item>\n </div>\n <div *ngIf=\"item.type == 'tree-select'\">\n <nz-form-item class=\"w-full\">\n <nz-form-label>{{ item.label }}</nz-form-label>\n <nz-tree-select class=\"w-full\" [nzNodes]=\"item.nodes\" nzVirtualHeight=\"320px\" nzShowSearch [(ngModel)]=\"item.value\"></nz-tree-select>\n </nz-form-item>\n </div>\n <div *ngIf=\"item.type == 'string' || item.type == null\">\n <nz-form-item class=\"w-full\">\n <nz-form-label>{{ item.label }}</nz-form-label>\n <input type=\"text\" nz-input [(ngModel)]=\"item.value\" />\n </nz-form-item>\n </div>\n </div>\n </div>\n <div class=\"flex gap-2 p-4 border-t border-t-slate-200\">\n <button nz-button nzType=\"primary\" (click)=\"filter()\">\u0627\u0639\u0645\u0627\u0644</button>\n <button nz-button nzType=\"default\" (click)=\"clearFilter()\">\u067E\u0627\u06A9\u0633\u0627\u0632\u06CC \u0648 \u0628\u0633\u062A\u0646</button>\n </div>\n</ng-template>\n<!-- template items box -->\n<ng-template #contentFilterTemplate class=\"w-full\">\n <ul class=\"flex flex-col gap-2\" *ngIf=\"filterTemplateItems.length > 0\">\n <li class=\"p-2 rounded-lg cursor-pointer border border-slate-200\" *ngFor=\"let item of filterTemplateItems\" (click)=\"setTemplateFilter(item)\">{{ item.title }}</li>\n </ul>\n <p *ngIf=\"filterTemplateItems.length == 0\" class=\"text-center\">\u0642\u0627\u0644\u0628\u06CC \u062C\u0647\u062A \u0646\u0645\u0627\u06CC\u0634 \u0648\u062C\u0648\u062F \u0646\u062F\u0627\u0631\u062F</p>\n</ng-template>\n<div class=\"flex items-center justify-between gap-2 px-4 py-2 h-14\" *ngIf=\"isToolbar\">\n <div class=\"flex items-center gap-2\">\n <span class=\"font-medium text-sm text-blue-500\">\u0641\u06CC\u0644\u062A\u0631\u0647\u0627\u06CC \u0627\u0639\u0645\u0627\u0644 \u0634\u062F\u0647:</span>\n <ul class=\"flex items-center gap-2\">\n <li class=\"bg-white border border-slate-200 rounded-md px-2 py-1 flex items-center gap-1 h-8\" *ngIf=\"filterItemsValues.length == 0\">\n <span class=\"text-slate-800 font-medium text-sm\">\u0628\u062F\u0648\u0646 \u0641\u06CC\u0644\u062A\u0631</span>\n </li>\n <li class=\"bg-white border border-slate-200 rounded-md px-2 py-1 flex items-center gap-1 h-8\" *ngFor=\"let item of filterItemsValues\">\n <label class=\"text-slate-500 text-sm\">{{ item.label }}:</label>\n <span class=\"text-slate-800 font-medium text-sm\">{{ item.value | translate }}</span>\n <i class=\"fa-regular fa-times cursor-pointer ps-2\" (click)=\"removeFilter(item)\"></i>\n </li>\n </ul>\n </div>\n <div class=\"flex items-center gap-2\" *ngIf=\"id != null\">\n <button nz-button nzType=\"default\" *ngIf=\"filterItemsValues.length > 0 || gridId != null\" (click)=\"saveFilterGrid()\">\n {{ gridId == null ? '\u0630\u062E\u06CC\u0631\u0647 \u0641\u06CC\u0644\u062A\u0631' : '\u0627\u0639\u0645\u0627\u0644 \u062A\u063A\u06CC\u06CC\u0631\u0627\u062A \u0641\u06CC\u0644\u062A\u0631' }}\n </button>\n <button nz-button nzType=\"default\" *ngIf=\"gridId != null\" (click)=\"clearFilter(); gridId = null\">\u0644\u063A\u0648</button>\n </div>\n</div>\n\n<nz-modal [(nzVisible)]=\"isVisibleModal\" nzTitle=\"\u0627\u0641\u0632\u0648\u062F\u0646 \u0642\u0627\u0644\u0628 \u062C\u062F\u06CC\u062F\" (nzOnCancel)=\"handleCancelModal()\" (nzOnOk)=\"handleOkModal()\">\n <ng-container *nzModalContent>\n <nz-form-item class=\"w-full\">\n <nz-form-label>\u0639\u0646\u0648\u0627\u0646 \u0642\u0627\u0644\u0628</nz-form-label>\n <input type=\"text\" nz-input [(ngModel)]=\"templateName\" />\n </nz-form-item>\n </ng-container>\n</nz-modal>\n\n<ag-grid-angular\n style=\"width: 100%\"\n [style]=\"isToolbar ? 'height: calc(100% - 1rem - 114px);' : 'height: 100%;'\"\n [columnDefs]=\"columnDefs\"\n [pagination]=\"true\"\n [paginationPageSize]=\"paginationPageSize\"\n [paginationPageSizeSelector]=\"paginationPageSizeSelector\"\n [class]=\"themeClass\"\n [rowHeight]=\"48\"\n [defaultColDef]=\"defaultColDef\"\n [enableAdvancedFilter]=\"enableAdvancedFilter\"\n [enableRtl]=\"rtl\"\n [treeData]=\"treeModel\"\n [autoGroupColumnDef]=\"autoGroupColumnDef\"\n [isServerSideGroup]=\"isServerSideGroup\"\n [getServerSideGroupKey]=\"getServerSideGroupKey\"\n [rowModelType]=\"rowModelType\"\n [rowData]=\"rowData\"\n [serverSideDatasource]=\"datasource\"\n (gridReady)=\"onGridReady($event)\"\n [cacheBlockSize]=\"paginationPageSize\"\n [maxBlocksInCache]=\"2\"\n [context]=\"{ actionItems: actionItems }\"\n (cellDoubleClicked)=\"cellDoubleClicked($event)\"\n [autoSizeStrategy]=\"_autoColumnSize\"\n [rowSelection]=\"_rowSelection\"\n (selectionChanged)=\"selectionChanged($event)\"\n [theme]=\"\"\n [getRowClass]=\"getRowClass\"\n #grid />\n", dependencies: [{ kind: "directive", type: i3$1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i3$1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i3$1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: i4$1.AgGridAngular, selector: "ag-grid-angular", inputs: ["gridOptions", "modules", "statusBar", "sideBar", "suppressContextMenu", "preventDefaultOnContextMenu", "allowContextMenuWithControlKey", "columnMenu", "suppressMenuHide", "enableBrowserTooltips", "tooltipTrigger", "tooltipShowDelay", "tooltipHideDelay", "tooltipMouseTrack", "tooltipShowMode", "tooltipInteraction", "popupParent", "copyHeadersToClipboard", "copyGroupHeadersToClipboard", "clipboardDelimiter", "suppressCopyRowsToClipboard", "suppressCopySingleCellRanges", "suppressLastEmptyLineOnPaste", "suppressClipboardPaste", "suppressClipboardApi", "suppressCutToClipboard", "columnDefs", "defaultColDef", "defaultColGroupDef", "columnTypes", "dataTypeDefinitions", "maintainColumnOrder", "enableStrictPivotColumnOrder", "suppressFieldDotNotation", "headerHeight", "groupHeaderHeight", "floatingFiltersHeight", "pivotHeaderHeight", "pivotGroupHeaderHeight", "allowDragFromColumnsToolPanel", "suppressMovableColumns", "suppressColumnMoveAnimation", "suppressMoveWhenColumnDragging", "suppressDragLeaveHidesColumns", "suppressRowGroupHidesColumns", "colResizeDefault", "suppressAutoSize", "autoSizePadding", "skipHeaderOnAutoSize", "autoSizeStrategy", "components", "editType", "singleClickEdit", "suppressClickEdit", "readOnlyEdit", "stopEditingWhenCellsLoseFocus", "enterNavigatesVertically", "enterNavigatesVerticallyAfterEdit", "enableCellEditingOnBackspace", "undoRedoCellEditing", "undoRedoCellEditingLimit", "defaultCsvExportParams", "suppressCsvExport", "defaultExcelExportParams", "suppressExcelExport", "excelStyles", "quickFilterText", "cacheQuickFilter", "includeHiddenColumnsInQuickFilter", "quickFilterParser", "quickFilterMatcher", "applyQuickFilterBeforePivotOrAgg", "excludeChildrenWhenTreeDataFiltering", "enableAdvancedFilter", "advancedFilterModel", "includeHiddenColumnsInAdvancedFilter", "advancedFilterParent", "advancedFilterBuilderParams", "suppressAdvancedFilterEval", "suppressSetFilterByDefault", "enableCharts", "chartThemes", "customChartThemes", "chartThemeOverrides", "chartToolPanelsDef", "chartMenuItems", "loadingCellRenderer", "loadingCellRendererParams", "loadingCellRendererSelector", "localeText", "masterDetail", "keepDetailRows", "keepDetailRowsCount", "detailCellRenderer", "detailCellRendererParams", "detailRowHeight", "detailRowAutoHeight", "context", "dragAndDropImageComponent", "dragAndDropImageComponentParams", "alignedGrids", "tabIndex", "rowBuffer", "valueCache", "valueCacheNeverExpires", "enableCellExpressions", "suppressTouch", "suppressFocusAfterRefresh", "suppressAsyncEvents", "suppressBrowserResizeObserver", "suppressPropertyNamesCheck", "suppressChangeDetection", "debug", "loading", "overlayLoadingTemplate", "loadingOverlayComponent", "loadingOverlayComponentParams", "suppressLoadingOverlay", "overlayNoRowsTemplate", "noRowsOverlayComponent", "noRowsOverlayComponentParams", "suppressNoRowsOverlay", "pagination", "paginationPageSize", "paginationPageSizeSelector", "paginationAutoPageSize", "paginateChildRows", "suppressPaginationPanel", "pivotMode", "pivotPanelShow", "pivotMaxGeneratedColumns", "pivotDefaultExpanded", "pivotColumnGroupTotals", "pivotRowTotals", "pivotSuppressAutoColumn", "suppressExpandablePivotGroups", "functionsReadOnly", "aggFuncs", "suppressAggFuncInHeader", "alwaysAggregateAtRootLevel", "aggregateOnlyChangedColumns", "suppressAggFilteredOnly", "removePivotHeaderRowWhenSingleValueColumn", "animateRows", "enableCellChangeFlash", "cellFlashDuration", "cellFlashDelay", "cellFadeDuration", "cellFadeDelay", "allowShowChangeAfterFilter", "domLayout", "ensureDomOrder", "enableRtl", "suppressColumnVirtualisation", "suppressMaxRenderedRowRestriction", "suppressRowVirtualisation", "rowDragManaged", "suppressRowDrag", "suppressMoveWhenRowDragging", "rowDragEntireRow", "rowDragMultiRow", "rowDragText", "fullWidthCellRenderer", "fullWidthCellRendererParams", "embedFullWidthRows", "suppressGroupMaintainValueType", "groupDisplayType", "groupDefaultExpanded", "autoGroupColumnDef", "groupMaintainOrder", "groupSelectsChildren", "groupLockGroupColumns", "groupAggFiltering", "groupIncludeFooter", "groupIncludeTotalFooter", "groupTotalRow", "grandTotalRow", "suppressStickyTotalRow", "groupSuppressBlankHeader", "groupSelectsFiltered", "showOpenedGroup", "groupRemoveSingleChildren", "groupRemoveLowestSingleChildren", "groupHideOpenParents", "groupAllowUnbalanced", "rowGroupPanelShow", "groupRowRenderer", "groupRowRendererParams", "suppressMakeColumnVisibleAfterUnGroup", "treeData", "rowGroupPanelSuppressSort", "suppressGroupRowsSticky", "pinnedTopRowData", "pinnedBottomRowData", "rowModelType", "rowData", "asyncTransactionWaitMillis", "suppressModelUpdateAfterUpdateTransaction", "datasource", "cacheOverflowSize", "infiniteInitialRowCount", "serverSideInitialRowCount", "suppressServerSideInfiniteScroll", "suppressServerSideFullWidthLoadingRow", "cacheBlockSize", "maxBlocksInCache", "maxConcurrentDatasourceRequests", "blockLoadDebounceMillis", "purgeClosedRowNodes", "serverSideDatasource", "serverSideSortAllLevels", "serverSideEnableClientSideSort", "serverSideOnlyRefreshFilteredGroups", "serverSideSortOnServer", "serverSideFilterOnServer", "serverSidePivotResultFieldSeparator", "viewportDatasource", "viewportRowModelPageSize", "viewportRowModelBufferSize", "alwaysShowHorizontalScroll", "alwaysShowVerticalScroll", "debounceVerticalScrollbar", "suppressHorizontalScroll", "suppressScrollOnNewData", "suppressScrollWhenPopupsAreOpen", "suppressAnimationFrame", "suppressMiddleClickScrolls", "suppressPreventDefaultOnMouseWheel", "scrollbarWidth", "rowSelection", "cellSelection", "rowMultiSelectWithClick", "suppressRowDeselection", "suppressRowClickSelection", "suppressCellFocus", "suppressHeaderFocus", "selectionColumnDef", "suppressMultiRangeSelection", "enableCellTextSelection", "enableRangeSelection", "enableRangeHandle", "enableFillHandle", "fillHandleDirection", "suppressClearOnFillReduction", "sortingOrder", "accentedSort", "unSortIcon", "suppressMultiSort", "alwaysMultiSort", "multiSortKey", "suppressMaintainUnsortedOrder", "icons", "rowHeight", "rowStyle", "rowClass", "rowClassRules", "suppressRowHoverHighlight", "suppressRowTransform", "columnHoverHighlight", "gridId", "deltaSort", "treeDataDisplayType", "enableGroupEdit", "initialState", "theme", "loadThemeGoogleFonts", "getContextMenuItems", "getMainMenuItems", "postProcessPopup", "processUnpinnedColumns", "processCellForClipboard", "processHeaderForClipboard", "processGroupHeaderForClipboard", "processCellFromClipboard", "sendToClipboard", "processDataFromClipboard", "isExternalFilterPresent", "doesExternalFilterPass", "getChartToolbarItems", "createChartContainer", "focusGridInnerElement", "navigateToNextHeader", "tabToNextHeader", "navigateToNextCell", "tabToNextCell", "getLocaleText", "getDocument", "paginationNumberFormatter", "getGroupRowAgg", "isGroupOpenByDefault", "initialGroupOrderComparator", "processPivotResultColDef", "processPivotResultColGroupDef", "getDataPath", "getChildCount", "getServerSideGroupLevelParams", "isServerSideGroupOpenByDefault", "isApplyServerSideTransaction", "isServerSideGroup", "getServerSideGroupKey", "getBusinessKeyForNode", "getRowId", "resetRowDataOnUpdate", "processRowPostCreate", "isRowSelectable", "isRowMaster", "fillOperation", "postSortRows", "getRowStyle", "getRowClass", "getRowHeight", "isFullWidthRow"], outputs: ["toolPanelVisibleChanged", "toolPanelSizeChanged", "columnMenuVisibleChanged", "contextMenuVisibleChanged", "cutStart", "cutEnd", "pasteStart", "pasteEnd", "columnVisible", "columnPinned", "columnResized", "columnMoved", "columnValueChanged", "columnPivotModeChanged", "columnPivotChanged", "columnGroupOpened", "newColumnsLoaded", "gridColumnsChanged", "displayedColumnsChanged", "virtualColumnsChanged", "columnEverythingChanged", "columnHeaderMouseOver", "columnHeaderMouseLeave", "columnHeaderClicked", "columnHeaderContextMenu", "componentStateChanged", "cellValueChanged", "cellEditRequest", "rowValueChanged", "cellEditingStarted", "cellEditingStopped", "rowEditingStarted", "rowEditingStopped", "undoStarted", "undoEnded", "redoStarted", "redoEnded", "cellSelectionDeleteStart", "cellSelectionDeleteEnd", "rangeDeleteStart", "rangeDeleteEnd", "fillStart", "fillEnd", "filterOpened", "filterChanged", "filterModified", "advancedFilterBuilderVisibleChanged", "chartCreated", "chartRangeSelectionChanged", "chartOptionsChanged", "chartDestroyed", "cellKeyDown", "gridReady", "firstDataRendered", "gridSizeChanged", "modelUpdated", "virtualRowRemoved", "viewportChanged", "bodyScroll", "bodyScrollEnd", "dragStarted", "dragStopped", "dragCancelled", "stateUpdated", "paginationChanged", "rowDragEnter", "rowDragMove", "rowDragLeave", "rowDragEnd", "rowDragCancel", "columnRowGroupChanged", "rowGroupOpened", "expandOrCollapseAll", "pivotMaxColumnsExceeded", "pinnedRowDataChanged", "rowDataUpdated", "asyncTransactionsFlushed", "storeRefreshed", "headerFocused", "cellClicked", "cellDoubleClicked", "cellFocused", "cellMouseOver", "cellMouseOut", "cellMouseDown", "rowClicked", "rowDoubleClicked", "rowSelected", "selectionChanged", "cellContextMenu", "rangeSelectionChanged", "cellSelectionChanged", "tooltipShow", "tooltipHide", "sortChanged"] }, { kind: "directive", type: i5$1.NzIconDirective, selector: "[nz-icon]", inputs: ["nzSpin", "nzRotate", "nzType", "nzTheme", "nzTwotoneColor", "nzIconfont"], exportAs: ["nzIcon"] }, { kind: "component", type: i1$2.NzButtonComponent, selector: "button[nz-button], a[nz-button]", inputs: ["nzBlock", "nzGhost", "nzSearch", "nzLoading", "nzDanger", "disabled", "tabIndex", "nzType", "nzShape", "nzSize"], exportAs: ["nzButton"] }, { kind: "directive", type: i2$1.ɵNzTransitionPatchDirective, selector: "[nz-button], nz-button-group, [nz-icon], [nz-menu-item], [nz-submenu], nz-select-top-control, nz-select-placeholder, nz-input-group", inputs: ["hidden"] }, { kind: "directive", type: i3.NzWaveDirective, selector: "[nz-wave],button[nz-button]:not([nzType=\"link\"]):not([nzType=\"text\"])", inputs: ["nzWaveExtraNode"], exportAs: ["nzWave"] }, { kind: "component", type: i1.NzModalComponent, selector: "nz-modal", inputs: ["nzMask", "nzMaskClosable", "nzCloseOnNavigation", "nzVisible", "nzClosable", "nzOkLoading", "nzOkDisabled", "nzCancelDisabled", "nzCancelLoading", "nzKeyboard", "nzNoAnimation", "nzCentered", "nzDraggable", "nzContent", "nzFooter", "nzZIndex", "nzWidth", "nzWrapClassName", "nzClassName", "nzStyle", "nzTitle", "nzCloseIcon", "nzMaskStyle", "nzBodyStyle", "nzOkText", "nzCancelText", "nzOkType", "nzOkDanger", "nzIconType", "nzModalType", "nzAutofocus", "nzOnOk", "nzOnCancel"], outputs: ["nzOnOk", "nzOnCancel", "nzAfterOpen", "nzAfterClose", "nzVisibleChange"], exportAs: ["nzModal"] }, { kind: "directive", type: i1.NzModalContentDirective, selector: "[nzModalContent]", exportAs: ["nzModalContent"] }, { kind: "directive", type: i4.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: i4.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i4.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "directive", type: i5.NzInputDirective, selector: "input[nz-input],textarea[nz-input]", inputs: ["nzBorderless", "nzSize", "nzStepperless", "nzStatus", "disabled"], exportAs: ["nzInput"] }, { kind: "directive", type: i6.NzColDirective, selector: "[nz-col],nz-col,nz-form-control,nz-form-label", inputs: ["nzFlex", "nzSpan", "nzOrder", "nzOffset", "nzPush", "nzPull", "nzXs", "nzSm", "nzMd", "nzLg", "nzXl", "nzXXl"], exportAs: ["nzCol"] }, { kind: "directive", type: i6.NzRowDirective, selector: "[nz-row],nz-row,nz-form-item", inputs: ["nzAlign", "nzJustify", "nzGutter"], exportAs: ["nzRow"] }, { kind: "component", type: i7.NzFormItemComponent, selector: "nz-form-item", exportAs: ["nzFormItem"] }, { kind: "component", type: i7.NzFormLabelComponent, selector: "nz-form-label", inputs: ["nzFor", "nzRequired", "nzNoColon", "nzTooltipTitle", "nzTooltipIcon", "nzLabelAlign", "nzLabelWrap"], exportAs: ["nzFormLabel"] }, { kind: "component", type: i7.NzFormControlComponent, selector: "nz-form-control", inputs: ["nzSuccessTip", "nzWarningTip", "nzErrorTip", "nzValidatingTip", "nzExtra", "nzAutoTips", "nzDisableAutoTips", "nzHasFeedback", "nzValidateStatus"], exportAs: ["nzFormControl"] }, { kind: "component", type: i14.NzOptionComponent, selector: "nz-option", inputs: ["nzTitle", "nzLabel", "nzValue", "nzKey", "nzDisabled", "nzHide", "nzCustomContent"], exportAs: ["nzOption"] }, { kind: "component", type: i14.NzSelectComponent, selector: "nz-select", inputs: ["nzId", "nzSize", "nzStatus", "nzOptionHeightPx", "nzOptionOverflowSize", "nzDropdownClassName", "nzDropdownMatchSelectWidth", "nzDropdownStyle", "nzNotFoundContent", "nzPlaceHolder", "nzPlacement", "nzMaxTagCount", "nzDropdownRender", "nzCustomTemplate", "nzSuffixIcon", "nzClearIcon", "nzRemoveIcon", "nzMenuItemSelectedIcon", "nzTokenSeparators", "nzMaxTagPlaceholder", "nzMaxMultipleCount", "nzMode", "nzFilterOption", "compareWith", "nzAllowClear", "nzBorderless", "nzShowSearch", "nzLoading", "nzAutoFocus", "nzAutoClearSearchValue", "nzServerSearch", "nzDisabled", "nzOpen", "nzSelectOnTab", "nzBackdrop", "nzOptions", "nzShowArrow"], outputs: ["nzOnSearch", "nzScrollToBottom", "nzOpenChange", "nzBlur", "nzFocus"], exportAs: ["nzSelect"] }, { kind: "component", type: i15.NzTreeSelectComponent, selector: "nz-tree-select", inputs: ["nzId", "nzAllowClear", "nzShowExpand", "nzShowLine", "nzDropdownMatchSelectWidth", "nzCheckable", "nzHideUnMatched", "nzShowIcon", "nzShowSearch", "nzDisabled", "nzAsyncData", "nzMultiple", "nzDefaultExpandAll", "nzCheckStrictly", "nzVirtualItemSize", "nzVirtualMaxBufferPx", "nzVirtualMinBufferPx", "nzVirtualHeight", "nzExpandedIcon", "nzNotFoundContent", "nzNodes", "nzOpen", "nzSize", "nzPlaceHolder", "nzDropdownStyle", "nzDropdownClassName", "nzBackdrop", "nzStatus", "nzPlacement", "nzExpandedKeys", "nzDisplayWith", "nzMaxTagCount", "nzMaxTagPlaceholder", "nzTreeTemplate"], outputs: ["nzOpenChange", "nzCleared", "nzRemoved", "nzExpandChange", "nzTreeClick", "nzTreeCheckBoxChange"], exportAs: ["nzTreeSelect"] }, { kind: "directive", type: i16.NzPopoverDirective, selector: "[nz-popover]", inputs: ["nzPopoverArrowPointAtCenter", "nzPopoverTitle", "nzPopoverContent", "nz-popover", "nzPopoverTrigger", "nzPopoverPlacement", "nzPopoverOrigin", "nzPopoverVisible", "nzPopoverMouseEnterDelay", "nzPopoverMouseLeaveDelay", "nzPopoverOverlayClassName", "nzPopoverOverlayStyle", "nzPopoverBackdrop"], outputs: ["nzPopoverVisibleChange"], exportAs: ["nzPopover"] }, { kind: "component", type: i17.DatePickerComponent, selector: "qeydar-date-picker", inputs: ["rtl", "mode", "isRange", "customLabels", "calendarType", "lang", "cssClass", "footerDescription", "rangeInputLabels", "inputLabel", "placement", "disabled", "isInline", "showSidebar", "showToday", "valueFormat", "disableInputMask", "disabledDates", "disabledDatesFilter", "disabledTimesFilter", "allowEmpty", "readOnly", "readOnlyInput", "minDate", "maxDate", "format"], outputs: ["onFocus", "onBlur", "onChangeValue", "onOpenChange"] }, { kind: "pipe", type: i1$3.TranslatePipe, name: "translate" }] }); }
|
|
1613
1667
|
}
|
|
1614
1668
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: GridComponent, decorators: [{
|
|
1615
1669
|
type: Component,
|
|
1616
|
-
args: [{ selector: 'app-grid', template: "<!-- <button (click)=\"enableAdvancedFilter=!enableAdvancedFilter\">advanced</button> -->\n<div class=\"flex justify-between items-center py-4 border-b border-b-slate-200 mx-4\" *ngIf=\"isToolbar\">\n <div>\n <h4 class=\"font-semibold text-2xl\">{{ label }}</h4>\n </div>\n <div class=\"flex gap-3\">\n @for (item of toolbarItems; track $index) {\n <button nz-button [nzLoading]=\"item.loading ? item.loading : false\" (click)=\"handleClick(item)\" [nzType]=\"item.type\">\n <span nz-icon [nzType]=\"item.icon\"></span>\n {{ item.text }}\n </button>\n }\n <button\n (click)=\"handleVisibleFilterBox()\"\n nz-button\n nzType=\"default\"\n nz-popover\n nzPopoverTitle=\"\"\n nzPopoverTrigger=\"click\"\n [nzPopoverContent]=\"contentTemplate\"\n nzPopoverOverlayClassName=\"filter-popover\"\n nzPopoverPlacement=\"bottom\"\n *ngIf=\"_filterBoxItems.length > 0\">\n <span nz-icon nzType=\"filter\"></span>\n \u0641\u06CC\u0644\u062A\u0631\n </button>\n <button\n nz-button\n nzType=\"default\"\n class=\"flex items-center\"\n nz-popover\n nzPopoverTitle=\"\"\n [(nzPopoverVisible)]=\"visibleFilterTemplateBox\"\n nzPopoverTrigger=\"click\"\n [nzPopoverContent]=\"contentFilterTemplate\"\n nzPopoverOverlayClassName=\"filter-popover-sm\"\n nzPopoverPlacement=\"bottom\"\n *ngIf=\"id != null\">\n <span nz-icon nzType=\"layout\"></span>\n \u0641\u06CC\u0644\u062A\u0631 \u0647\u0627\u06CC \u0630\u062E\u06CC\u0631\u0647 \u0634\u062F\u0647\n </button>\n <button nz-button (click)=\"refresh()\" nzType=\"default\">\n <span nz-icon nzType=\"sync\"></span>\n \u0628\u0631\u0648\u0632\u0631\u0633\u0627\u0646\u06CC\n </button>\n <!-- <button nz-button (click)=\"advancedFilter()\" *ngIf=\"showAdvancedButton\" nzType=\"default\">\n <span nz-icon nzType=\"filter\"></span>\n \u062C\u0633\u062A\u062C\u0648\u06CC \u067E\u06CC\u0634\u0631\u0641\u062A\u0647\n </button> -->\n </div>\n</div>\n<ng-template #contentTemplate class=\"w-full\">\n <div class=\"grid gap-x-4 p-4 max-h-[400px] overflow-auto\" [ngClass]=\"{ 'grid-cols-1': _filterBoxItems.length == 1, 'grid-cols-2': _filterBoxItems.length > 1 }\">\n <div *ngFor=\"let item of _filterBoxItems\" [ngClass]=\"{ 'col-span-2': item.type == 'date' || item.type == 'date-time' || item.colSpan == 2 }\">\n <div *ngIf=\"item.type == 'date' || item.type == 'date-time'\" class=\"grid grid-cols-2 gap-x-4\">\n <nz-form-item>\n <nz-form-label>\u0627\u0632 \u062A\u0627\u0631\u06CC\u062E</nz-form-label>\n <nz-form-control>\n <qeydar-date-picker\n [ngModel]=\"item.value != null ? item.value[0] : null\"\n (onChangeValue)=\"changeDatePickerValue($event, item, 0)\"\n [showToday]=\"true\"\n [allowEmpty]=\"true\"\n [calendarType]=\"'jalali'\"\n format=\"yyyy-MM-dd\"\n [rtl]=\"true\"></qeydar-date-picker>\n </nz-form-control>\n </nz-form-item>\n <nz-form-item>\n <nz-form-label>\u062A\u0627 \u062A\u0627\u0631\u06CC\u062E</nz-form-label>\n <nz-form-control>\n <qeydar-date-picker\n [ngModel]=\"item.value != null ? item.value[1] : null\"\n (onChangeValue)=\"changeDatePickerValue($event, item, 1)\"\n [showToday]=\"true\"\n [allowEmpty]=\"true\"\n [calendarType]=\"'jalali'\"\n format=\"yyyy-MM-dd\"\n [rtl]=\"true\"></qeydar-date-picker>\n </nz-form-control>\n </nz-form-item>\n </div>\n <div *ngIf=\"item.type == 'enum' || item.type == 'select' || item.type == 'boolean'\">\n <nz-form-item class=\"w-full\">\n <nz-form-label>{{ item.label }}</nz-form-label>\n <nz-select class=\"w-full\" [(ngModel)]=\"item.value\" nzShowSearch>\n <nz-option *ngFor=\"let item2 of item.items\" [nzValue]=\"item2.value\" [nzLabel]=\"item2.label\"></nz-option>\n </nz-select>\n </nz-form-item>\n </div>\n <div *ngIf=\"item.type == 'tree-select'\">\n <nz-form-item class=\"w-full\">\n <nz-form-label>{{ item.label }}</nz-form-label>\n <nz-tree-select class=\"w-full\" [nzNodes]=\"item.nodes\" nzVirtualHeight=\"320px\" nzShowSearch [(ngModel)]=\"item.value\"></nz-tree-select>\n </nz-form-item>\n </div>\n <div *ngIf=\"item.type == 'string' || item.type == null\">\n <nz-form-item class=\"w-full\">\n <nz-form-label>{{ item.label }}</nz-form-label>\n <input type=\"text\" nz-input [(ngModel)]=\"item.value\" />\n </nz-form-item>\n </div>\n </div>\n </div>\n <div class=\"flex gap-2 p-4 border-t border-t-slate-200\">\n <button nz-button nzType=\"primary\" (click)=\"filter()\">\u0627\u0639\u0645\u0627\u0644</button>\n <button nz-button nzType=\"default\" (click)=\"clearFilter()\">\u067E\u0627\u06A9\u0633\u0627\u0632\u06CC \u0648 \u0628\u0633\u062A\u0646</button>\n </div>\n</ng-template>\n<!-- template items box -->\n<ng-template #contentFilterTemplate class=\"w-full\">\n <ul class=\"flex flex-col gap-2\" *ngIf=\"filterTemplateItems.length > 0\">\n <li class=\"p-2 rounded-lg cursor-pointer border border-slate-200\" *ngFor=\"let item of filterTemplateItems\" (click)=\"setTemplateFilter(item)\">{{ item.title }}</li>\n </ul>\n <p *ngIf=\"filterTemplateItems.length == 0\" class=\"text-center\">\u0642\u0627\u0644\u0628\u06CC \u062C\u0647\u062A \u0646\u0645\u0627\u06CC\u0634 \u0648\u062C\u0648\u062F \u0646\u062F\u0627\u0631\u062F</p>\n</ng-template>\n<div class=\"flex items-center justify-between gap-2 px-4 py-2 h-14\" *ngIf=\"isToolbar\">\n <div class=\"flex items-center gap-2\">\n <span class=\"font-medium text-sm text-blue-500\">\u0641\u06CC\u0644\u062A\u0631\u0647\u0627\u06CC \u0627\u0639\u0645\u0627\u0644 \u0634\u062F\u0647:</span>\n <ul class=\"flex items-center gap-2\">\n <li class=\"bg-white border border-slate-200 rounded-md px-2 py-1 flex items-center gap-1 h-8\" *ngIf=\"filterItemsValues.length == 0\">\n <span class=\"text-slate-800 font-medium text-sm\">\u0628\u062F\u0648\u0646 \u0641\u06CC\u0644\u062A\u0631</span>\n </li>\n <li class=\"bg-white border border-slate-200 rounded-md px-2 py-1 flex items-center gap-1 h-8\" *ngFor=\"let item of filterItemsValues\">\n <label class=\"text-slate-500 text-sm\">{{ item.label }}:</label>\n <span class=\"text-slate-800 font-medium text-sm\">{{ item.value | translate }}</span>\n <i class=\"fa-regular fa-times cursor-pointer ps-2\" (click)=\"removeFilter(item)\"></i>\n </li>\n </ul>\n </div>\n <div class=\"flex items-center gap-2\" *ngIf=\"id != null\">\n <button nz-button nzType=\"default\" *ngIf=\"filterItemsValues.length > 0 || gridId != null\" (click)=\"saveFilterGrid()\">\n {{ gridId == null ? '\u0630\u062E\u06CC\u0631\u0647 \u0641\u06CC\u0644\u062A\u0631' : '\u0627\u0639\u0645\u0627\u0644 \u062A\u063A\u06CC\u06CC\u0631\u0627\u062A \u0641\u06CC\u0644\u062A\u0631' }}\n </button>\n <button nz-button nzType=\"default\" *ngIf=\"gridId != null\" (click)=\"clearFilter(); gridId = null\">\u0644\u063A\u0648</button>\n </div>\n</div>\n\n<nz-modal [(nzVisible)]=\"isVisibleModal\" nzTitle=\"\u0627\u0641\u0632\u0648\u062F\u0646 \u0642\u0627\u0644\u0628 \u062C\u062F\u06CC\u062F\" (nzOnCancel)=\"handleCancelModal()\" (nzOnOk)=\"handleOkModal()\">\n <ng-container *nzModalContent>\n <nz-form-item class=\"w-full\">\n <nz-form-label>\u0639\u0646\u0648\u0627\u0646 \u0642\u0627\u0644\u0628</nz-form-label>\n <input type=\"text\" nz-input [(ngModel)]=\"templateName\" />\n </nz-form-item>\n </ng-container>\n</nz-modal>\n\n<ag-grid-angular\n style=\"width: 100%\"\n [style]=\"isToolbar ? 'height: calc(100% - 1rem - 114px);' : 'height: 100%;'\"\n [columnDefs]=\"columnDefs\"\n [pagination]=\"true\"\n [paginationPageSize]=\"paginationPageSize\"\n [paginationPageSizeSelector]=\"paginationPageSizeSelector\"\n [class]=\"themeClass\"\n [rowHeight]=\"48\"\n [defaultColDef]=\"defaultColDef\"\n [enableAdvancedFilter]=\"enableAdvancedFilter\"\n [enableRtl]=\"rtl\"\n [treeData]=\"treeModel\"\n [autoGroupColumnDef]=\"autoGroupColumnDef\"\n [isServerSideGroup]=\"isServerSideGroup\"\n [getServerSideGroupKey]=\"getServerSideGroupKey\"\n [rowModelType]=\"rowModelType\"\n [rowData]=\"rowData\"\n [serverSideDatasource]=\"datasource\"\n (gridReady)=\"onGridReady($event)\"\n [cacheBlockSize]=\"paginationPageSize\"\n [maxBlocksInCache]=\"2\"\n [context]=\"{ actionItems: actionItems }\"\n (cellDoubleClicked)=\"cellDoubleClicked($event)\"\n [autoSizeStrategy]=\"_autoColumnSize\"\n [rowSelection]=\"_rowSelection\"\n (selectionChanged)=\"selectionChanged($event)\"\n [theme]=\"\"\n [getRowClass]=\"getRowClass\"\n #grid />\n" }]
|
|
1670
|
+
args: [{ selector: 'app-grid', template: "<!-- <button (click)=\"enableAdvancedFilter=!enableAdvancedFilter\">advanced</button> -->\n<div class=\"flex justify-between items-center py-4 border-b border-b-slate-200 mx-4\" *ngIf=\"isToolbar\">\n <div>\n <h4 class=\"font-semibold text-2xl\">{{ label }}</h4>\n </div>\n <div class=\"flex gap-3\">\n @for (item of toolbarItems; track $index) {\n <button nz-button [nzLoading]=\"item.loading ? item.loading : false\" (click)=\"handleClick(item)\" [nzType]=\"item.type\">\n <span nz-icon [nzType]=\"item.icon\"></span>\n {{ item.text }}\n </button>\n }\n <button\n (click)=\"handleVisibleFilterBox()\"\n nz-button\n nzType=\"default\"\n nz-popover\n nzPopoverTitle=\"\"\n nzPopoverTrigger=\"click\"\n [nzPopoverContent]=\"contentTemplate\"\n nzPopoverOverlayClassName=\"filter-popover\"\n nzPopoverPlacement=\"bottom\"\n *ngIf=\"_filterBoxItems.length > 0\">\n <span nz-icon nzType=\"filter\"></span>\n \u0641\u06CC\u0644\u062A\u0631\n </button>\n <button\n nz-button\n nzType=\"default\"\n class=\"flex items-center\"\n nz-popover\n nzPopoverTitle=\"\"\n [(nzPopoverVisible)]=\"visibleFilterTemplateBox\"\n nzPopoverTrigger=\"click\"\n [nzPopoverContent]=\"contentFilterTemplate\"\n nzPopoverOverlayClassName=\"filter-popover-sm\"\n nzPopoverPlacement=\"bottom\"\n *ngIf=\"id != null\">\n <span nz-icon nzType=\"layout\"></span>\n \u0641\u06CC\u0644\u062A\u0631 \u0647\u0627\u06CC \u0630\u062E\u06CC\u0631\u0647 \u0634\u062F\u0647\n </button>\n <button nz-button (click)=\"refresh()\" nzType=\"default\">\n <span nz-icon nzType=\"sync\"></span>\n \u0628\u0631\u0648\u0632\u0631\u0633\u0627\u0646\u06CC\n </button>\n <!-- <button nz-button (click)=\"advancedFilter()\" *ngIf=\"showAdvancedButton\" nzType=\"default\">\n <span nz-icon nzType=\"filter\"></span>\n \u062C\u0633\u062A\u062C\u0648\u06CC \u067E\u06CC\u0634\u0631\u0641\u062A\u0647\n </button> -->\n </div>\n</div>\n<ng-template #contentTemplate class=\"w-full\">\n <div class=\"grid gap-x-4 p-4 max-h-[400px] overflow-auto\" [ngClass]=\"{ 'grid-cols-1': _filterBoxItems.length == 1, 'grid-cols-2': _filterBoxItems.length > 1 }\">\n <div *ngFor=\"let item of _filterBoxItems\" [ngClass]=\"{ 'col-span-2': item.type == 'date' || item.type == 'date-time' || item.colSpan == 2 }\">\n <div *ngIf=\"item.type == 'date' || item.type == 'date-time'\" class=\"grid grid-cols-2 gap-x-4\">\n <nz-form-item>\n <nz-form-label>\u0627\u0632 \u062A\u0627\u0631\u06CC\u062E</nz-form-label>\n <nz-form-control>\n <qeydar-date-picker\n [ngModel]=\"item.value != null ? item.value[0] : null\"\n (onChangeValue)=\"changeDatePickerValue($event, item, 0)\"\n [showToday]=\"true\"\n [allowEmpty]=\"true\"\n [calendarType]=\"'jalali'\"\n format=\"yyyy-MM-dd\"\n [rtl]=\"true\"></qeydar-date-picker>\n </nz-form-control>\n </nz-form-item>\n <nz-form-item>\n <nz-form-label>\u062A\u0627 \u062A\u0627\u0631\u06CC\u062E</nz-form-label>\n <nz-form-control>\n <qeydar-date-picker\n [ngModel]=\"item.value != null ? item.value[1] : null\"\n (onChangeValue)=\"changeDatePickerValue($event, item, 1)\"\n [showToday]=\"true\"\n [allowEmpty]=\"true\"\n [calendarType]=\"'jalali'\"\n format=\"yyyy-MM-dd\"\n [rtl]=\"true\"></qeydar-date-picker>\n </nz-form-control>\n </nz-form-item>\n </div>\n <div *ngIf=\"item.type == 'enum' || item.type == 'select' || item.type == 'boolean'\">\n <nz-form-item class=\"w-full\">\n <nz-form-label>{{ item.label }}</nz-form-label>\n <nz-select class=\"w-full\" [(ngModel)]=\"item.value\" nzShowSearch nzServerSearch (nzOnSearch)=\"handleSearchSelectBox($event, item)\" *ngIf=\"item.serverSide\">\n <nz-option *ngFor=\"let item2 of item.items\" [nzValue]=\"item2.value\" [nzLabel]=\"item2.label\"></nz-option>\n </nz-select>\n <nz-select class=\"w-full\" [(ngModel)]=\"item.value\" nzShowSearch *ngIf=\"!item.serverSide\">\n <nz-option *ngFor=\"let item2 of item.items\" [nzValue]=\"item2.value\" [nzLabel]=\"item2.label\"></nz-option>\n </nz-select>\n </nz-form-item>\n </div>\n <div *ngIf=\"item.type == 'tree-select'\">\n <nz-form-item class=\"w-full\">\n <nz-form-label>{{ item.label }}</nz-form-label>\n <nz-tree-select class=\"w-full\" [nzNodes]=\"item.nodes\" nzVirtualHeight=\"320px\" nzShowSearch [(ngModel)]=\"item.value\"></nz-tree-select>\n </nz-form-item>\n </div>\n <div *ngIf=\"item.type == 'string' || item.type == null\">\n <nz-form-item class=\"w-full\">\n <nz-form-label>{{ item.label }}</nz-form-label>\n <input type=\"text\" nz-input [(ngModel)]=\"item.value\" />\n </nz-form-item>\n </div>\n </div>\n </div>\n <div class=\"flex gap-2 p-4 border-t border-t-slate-200\">\n <button nz-button nzType=\"primary\" (click)=\"filter()\">\u0627\u0639\u0645\u0627\u0644</button>\n <button nz-button nzType=\"default\" (click)=\"clearFilter()\">\u067E\u0627\u06A9\u0633\u0627\u0632\u06CC \u0648 \u0628\u0633\u062A\u0646</button>\n </div>\n</ng-template>\n<!-- template items box -->\n<ng-template #contentFilterTemplate class=\"w-full\">\n <ul class=\"flex flex-col gap-2\" *ngIf=\"filterTemplateItems.length > 0\">\n <li class=\"p-2 rounded-lg cursor-pointer border border-slate-200\" *ngFor=\"let item of filterTemplateItems\" (click)=\"setTemplateFilter(item)\">{{ item.title }}</li>\n </ul>\n <p *ngIf=\"filterTemplateItems.length == 0\" class=\"text-center\">\u0642\u0627\u0644\u0628\u06CC \u062C\u0647\u062A \u0646\u0645\u0627\u06CC\u0634 \u0648\u062C\u0648\u062F \u0646\u062F\u0627\u0631\u062F</p>\n</ng-template>\n<div class=\"flex items-center justify-between gap-2 px-4 py-2 h-14\" *ngIf=\"isToolbar\">\n <div class=\"flex items-center gap-2\">\n <span class=\"font-medium text-sm text-blue-500\">\u0641\u06CC\u0644\u062A\u0631\u0647\u0627\u06CC \u0627\u0639\u0645\u0627\u0644 \u0634\u062F\u0647:</span>\n <ul class=\"flex items-center gap-2\">\n <li class=\"bg-white border border-slate-200 rounded-md px-2 py-1 flex items-center gap-1 h-8\" *ngIf=\"filterItemsValues.length == 0\">\n <span class=\"text-slate-800 font-medium text-sm\">\u0628\u062F\u0648\u0646 \u0641\u06CC\u0644\u062A\u0631</span>\n </li>\n <li class=\"bg-white border border-slate-200 rounded-md px-2 py-1 flex items-center gap-1 h-8\" *ngFor=\"let item of filterItemsValues\">\n <label class=\"text-slate-500 text-sm\">{{ item.label }}:</label>\n <span class=\"text-slate-800 font-medium text-sm\">{{ item.value | translate }}</span>\n <i class=\"fa-regular fa-times cursor-pointer ps-2\" (click)=\"removeFilter(item)\"></i>\n </li>\n </ul>\n </div>\n <div class=\"flex items-center gap-2\" *ngIf=\"id != null\">\n <button nz-button nzType=\"default\" *ngIf=\"filterItemsValues.length > 0 || gridId != null\" (click)=\"saveFilterGrid()\">\n {{ gridId == null ? '\u0630\u062E\u06CC\u0631\u0647 \u0641\u06CC\u0644\u062A\u0631' : '\u0627\u0639\u0645\u0627\u0644 \u062A\u063A\u06CC\u06CC\u0631\u0627\u062A \u0641\u06CC\u0644\u062A\u0631' }}\n </button>\n <button nz-button nzType=\"default\" *ngIf=\"gridId != null\" (click)=\"clearFilter(); gridId = null\">\u0644\u063A\u0648</button>\n </div>\n</div>\n\n<nz-modal [(nzVisible)]=\"isVisibleModal\" nzTitle=\"\u0627\u0641\u0632\u0648\u062F\u0646 \u0642\u0627\u0644\u0628 \u062C\u062F\u06CC\u062F\" (nzOnCancel)=\"handleCancelModal()\" (nzOnOk)=\"handleOkModal()\">\n <ng-container *nzModalContent>\n <nz-form-item class=\"w-full\">\n <nz-form-label>\u0639\u0646\u0648\u0627\u0646 \u0642\u0627\u0644\u0628</nz-form-label>\n <input type=\"text\" nz-input [(ngModel)]=\"templateName\" />\n </nz-form-item>\n </ng-container>\n</nz-modal>\n\n<ag-grid-angular\n style=\"width: 100%\"\n [style]=\"isToolbar ? 'height: calc(100% - 1rem - 114px);' : 'height: 100%;'\"\n [columnDefs]=\"columnDefs\"\n [pagination]=\"true\"\n [paginationPageSize]=\"paginationPageSize\"\n [paginationPageSizeSelector]=\"paginationPageSizeSelector\"\n [class]=\"themeClass\"\n [rowHeight]=\"48\"\n [defaultColDef]=\"defaultColDef\"\n [enableAdvancedFilter]=\"enableAdvancedFilter\"\n [enableRtl]=\"rtl\"\n [treeData]=\"treeModel\"\n [autoGroupColumnDef]=\"autoGroupColumnDef\"\n [isServerSideGroup]=\"isServerSideGroup\"\n [getServerSideGroupKey]=\"getServerSideGroupKey\"\n [rowModelType]=\"rowModelType\"\n [rowData]=\"rowData\"\n [serverSideDatasource]=\"datasource\"\n (gridReady)=\"onGridReady($event)\"\n [cacheBlockSize]=\"paginationPageSize\"\n [maxBlocksInCache]=\"2\"\n [context]=\"{ actionItems: actionItems }\"\n (cellDoubleClicked)=\"cellDoubleClicked($event)\"\n [autoSizeStrategy]=\"_autoColumnSize\"\n [rowSelection]=\"_rowSelection\"\n (selectionChanged)=\"selectionChanged($event)\"\n [theme]=\"\"\n [getRowClass]=\"getRowClass\"\n #grid />\n" }]
|
|
1617
1671
|
}], ctorParameters: () => [{ type: i1$3.TranslateService }, { type: i0.ChangeDetectorRef }, { type: ToastService }], propDecorators: { onAction: [{
|
|
1618
1672
|
type: Output
|
|
1619
1673
|
}], onToolbar: [{
|