@kuzntsv/uikit 1.0.73 → 1.0.75
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.
|
@@ -15,15 +15,15 @@ import { Overlay } from "@angular/cdk/overlay";
|
|
|
15
15
|
import { ComponentPortal } from "@angular/cdk/portal";
|
|
16
16
|
import { COMMA, ENTER } from "@angular/cdk/keycodes";
|
|
17
17
|
import { AsyncPipe } from "@angular/common";
|
|
18
|
-
import * as i2 from "@angular/material/autocomplete";
|
|
18
|
+
import * as i2$1 from "@angular/material/autocomplete";
|
|
19
19
|
import { MatAutocompleteModule, MatOption } from "@angular/material/autocomplete";
|
|
20
|
-
import * as i3$
|
|
20
|
+
import * as i3$2 from "@angular/material/chips";
|
|
21
21
|
import { MatChipsModule } from "@angular/material/chips";
|
|
22
22
|
import { catchError, debounceTime, distinctUntilChanged, map as map$1, startWith as startWith$1 } from "rxjs/operators";
|
|
23
23
|
import { DateAdapter, MAT_DATE_FORMATS, MatOptgroup, MatOption as MatOption$1, NativeDateAdapter } from "@angular/material/core";
|
|
24
24
|
import { MatDateRangeInput, MatDateRangePicker, MatDatepickerToggle, MatEndDate, MatStartDate } from "@angular/material/datepicker";
|
|
25
25
|
import { MAT_DIALOG_DATA, MatDialog, MatDialogActions, MatDialogClose, MatDialogConfig, MatDialogContent, MatDialogRef, MatDialogTitle } from "@angular/material/dialog";
|
|
26
|
-
import * as
|
|
26
|
+
import * as i4 from "@angular/material/tooltip";
|
|
27
27
|
import { MatTooltip, MatTooltipModule } from "@angular/material/tooltip";
|
|
28
28
|
import { MatDivider } from "@angular/material/divider";
|
|
29
29
|
import { MatMenu, MatMenuContent, MatMenuItem, MatMenuTrigger } from "@angular/material/menu";
|
|
@@ -31,14 +31,17 @@ import { MatToolbar } from "@angular/material/toolbar";
|
|
|
31
31
|
import z, { z as z$1 } from "zod";
|
|
32
32
|
import { DomSanitizer } from "@angular/platform-browser";
|
|
33
33
|
import { MatProgressSpinner } from "@angular/material/progress-spinner";
|
|
34
|
-
import * as i3 from "@angular/cdk/scrolling";
|
|
34
|
+
import * as i3$1 from "@angular/cdk/scrolling";
|
|
35
35
|
import { ScrollingModule } from "@angular/cdk/scrolling";
|
|
36
36
|
import { MatFormField as MatFormField$1, MatLabel as MatLabel$1, MatSelect } from "@angular/material/select";
|
|
37
37
|
import { SelectionModel } from "@angular/cdk/collections";
|
|
38
38
|
import { MatCheckbox } from "@angular/material/checkbox";
|
|
39
|
-
import
|
|
40
|
-
import {
|
|
41
|
-
import
|
|
39
|
+
import * as i3 from "@angular/material/paginator";
|
|
40
|
+
import { MatPaginator, MatPaginatorModule } from "@angular/material/paginator";
|
|
41
|
+
import * as i2 from "@angular/material/sort";
|
|
42
|
+
import { MatSort, MatSortModule } from "@angular/material/sort";
|
|
43
|
+
import * as i1 from "@angular/material/table";
|
|
44
|
+
import { MatTableDataSource, MatTableModule } from "@angular/material/table";
|
|
42
45
|
var LoginFormComponent = class LoginFormComponent {
|
|
43
46
|
pending = input(false, ...ngDevMode ? [{ debugName: "pending" }] : /* istanbul ignore next */ []);
|
|
44
47
|
errorMessage = input("", ...ngDevMode ? [{ debugName: "errorMessage" }] : /* istanbul ignore next */ []);
|
|
@@ -575,7 +578,7 @@ var BaseMatChipComponent = class BaseMatChipComponent {
|
|
|
575
578
|
},
|
|
576
579
|
{
|
|
577
580
|
kind: "component",
|
|
578
|
-
type: i2.MatAutocomplete,
|
|
581
|
+
type: i2$1.MatAutocomplete,
|
|
579
582
|
selector: "mat-autocomplete",
|
|
580
583
|
inputs: [
|
|
581
584
|
"aria-label",
|
|
@@ -599,7 +602,7 @@ var BaseMatChipComponent = class BaseMatChipComponent {
|
|
|
599
602
|
},
|
|
600
603
|
{
|
|
601
604
|
kind: "component",
|
|
602
|
-
type: i2.MatOption,
|
|
605
|
+
type: i2$1.MatOption,
|
|
603
606
|
selector: "mat-option",
|
|
604
607
|
inputs: [
|
|
605
608
|
"value",
|
|
@@ -611,7 +614,7 @@ var BaseMatChipComponent = class BaseMatChipComponent {
|
|
|
611
614
|
},
|
|
612
615
|
{
|
|
613
616
|
kind: "directive",
|
|
614
|
-
type: i2.MatAutocompleteTrigger,
|
|
617
|
+
type: i2$1.MatAutocompleteTrigger,
|
|
615
618
|
selector: "input[matAutocomplete], textarea[matAutocomplete]",
|
|
616
619
|
inputs: [
|
|
617
620
|
"matAutocomplete",
|
|
@@ -641,7 +644,7 @@ var BaseMatChipComponent = class BaseMatChipComponent {
|
|
|
641
644
|
},
|
|
642
645
|
{
|
|
643
646
|
kind: "component",
|
|
644
|
-
type: i3$
|
|
647
|
+
type: i3$2.MatChipGrid,
|
|
645
648
|
selector: "mat-chip-grid",
|
|
646
649
|
inputs: [
|
|
647
650
|
"disabled",
|
|
@@ -654,7 +657,7 @@ var BaseMatChipComponent = class BaseMatChipComponent {
|
|
|
654
657
|
},
|
|
655
658
|
{
|
|
656
659
|
kind: "directive",
|
|
657
|
-
type: i3$
|
|
660
|
+
type: i3$2.MatChipInput,
|
|
658
661
|
selector: "input[matChipInputFor]",
|
|
659
662
|
inputs: [
|
|
660
663
|
"matChipInputFor",
|
|
@@ -671,12 +674,12 @@ var BaseMatChipComponent = class BaseMatChipComponent {
|
|
|
671
674
|
},
|
|
672
675
|
{
|
|
673
676
|
kind: "directive",
|
|
674
|
-
type: i3$
|
|
677
|
+
type: i3$2.MatChipRemove,
|
|
675
678
|
selector: "[matChipRemove]"
|
|
676
679
|
},
|
|
677
680
|
{
|
|
678
681
|
kind: "component",
|
|
679
|
-
type: i3$
|
|
682
|
+
type: i3$2.MatChipRow,
|
|
680
683
|
selector: "mat-chip-row, [mat-chip-row], mat-basic-chip-row, [mat-basic-chip-row]",
|
|
681
684
|
inputs: ["editable"],
|
|
682
685
|
outputs: ["edited"]
|
|
@@ -3117,7 +3120,7 @@ function cleanFilterParams(filters) {
|
|
|
3117
3120
|
const cleanParams = {};
|
|
3118
3121
|
Object.keys(filters).forEach((key) => {
|
|
3119
3122
|
const value = filters[key];
|
|
3120
|
-
if (value === null || value === void 0 || value === "") return;
|
|
3123
|
+
if (value === null || value === void 0 || value === "" || value === 0) return;
|
|
3121
3124
|
if (Array.isArray(value) && value.length === 0) return;
|
|
3122
3125
|
cleanParams[key] = value;
|
|
3123
3126
|
});
|
|
@@ -3912,7 +3915,7 @@ var BaseSelectAutocompleteWithVsComponent = class BaseSelectAutocompleteWithVsCo
|
|
|
3912
3915
|
},
|
|
3913
3916
|
{
|
|
3914
3917
|
kind: "component",
|
|
3915
|
-
type: i2.MatAutocomplete,
|
|
3918
|
+
type: i2$1.MatAutocomplete,
|
|
3916
3919
|
selector: "mat-autocomplete",
|
|
3917
3920
|
inputs: [
|
|
3918
3921
|
"aria-label",
|
|
@@ -3936,7 +3939,7 @@ var BaseSelectAutocompleteWithVsComponent = class BaseSelectAutocompleteWithVsCo
|
|
|
3936
3939
|
},
|
|
3937
3940
|
{
|
|
3938
3941
|
kind: "component",
|
|
3939
|
-
type: i2.MatOption,
|
|
3942
|
+
type: i2$1.MatOption,
|
|
3940
3943
|
selector: "mat-option",
|
|
3941
3944
|
inputs: [
|
|
3942
3945
|
"value",
|
|
@@ -3948,7 +3951,7 @@ var BaseSelectAutocompleteWithVsComponent = class BaseSelectAutocompleteWithVsCo
|
|
|
3948
3951
|
},
|
|
3949
3952
|
{
|
|
3950
3953
|
kind: "directive",
|
|
3951
|
-
type: i2.MatAutocompleteTrigger,
|
|
3954
|
+
type: i2$1.MatAutocompleteTrigger,
|
|
3952
3955
|
selector: "input[matAutocomplete], textarea[matAutocomplete]",
|
|
3953
3956
|
inputs: [
|
|
3954
3957
|
"matAutocomplete",
|
|
@@ -4004,7 +4007,7 @@ var BaseSelectAutocompleteWithVsComponent = class BaseSelectAutocompleteWithVsCo
|
|
|
4004
4007
|
},
|
|
4005
4008
|
{
|
|
4006
4009
|
kind: "directive",
|
|
4007
|
-
type: i3.CdkFixedSizeVirtualScroll,
|
|
4010
|
+
type: i3$1.CdkFixedSizeVirtualScroll,
|
|
4008
4011
|
selector: "cdk-virtual-scroll-viewport[itemSize]",
|
|
4009
4012
|
inputs: [
|
|
4010
4013
|
"itemSize",
|
|
@@ -4014,7 +4017,7 @@ var BaseSelectAutocompleteWithVsComponent = class BaseSelectAutocompleteWithVsCo
|
|
|
4014
4017
|
},
|
|
4015
4018
|
{
|
|
4016
4019
|
kind: "directive",
|
|
4017
|
-
type: i3.CdkVirtualForOf,
|
|
4020
|
+
type: i3$1.CdkVirtualForOf,
|
|
4018
4021
|
selector: "[cdkVirtualFor][cdkVirtualForOf]",
|
|
4019
4022
|
inputs: [
|
|
4020
4023
|
"cdkVirtualForOf",
|
|
@@ -4025,7 +4028,7 @@ var BaseSelectAutocompleteWithVsComponent = class BaseSelectAutocompleteWithVsCo
|
|
|
4025
4028
|
},
|
|
4026
4029
|
{
|
|
4027
4030
|
kind: "component",
|
|
4028
|
-
type: i3.CdkVirtualScrollViewport,
|
|
4031
|
+
type: i3$1.CdkVirtualScrollViewport,
|
|
4029
4032
|
selector: "cdk-virtual-scroll-viewport",
|
|
4030
4033
|
inputs: ["orientation", "appendOnly"],
|
|
4031
4034
|
outputs: ["scrolledIndexChange"]
|
|
@@ -4428,61 +4431,47 @@ var TableComponent = class TableComponent {
|
|
|
4428
4431
|
defaultPageSize = 10;
|
|
4429
4432
|
dataSource = new MatTableDataSource();
|
|
4430
4433
|
selection = new SelectionModel();
|
|
4431
|
-
displayedColumns
|
|
4432
|
-
|
|
4434
|
+
displayedColumns = computed(() => {
|
|
4435
|
+
return ["select", ...this.columnOptions()?.filter((c) => !c.hide).map((item) => item.name) || []];
|
|
4436
|
+
}, ...ngDevMode ? [{ debugName: "displayedColumns" }] : /* istanbul ignore next */ []);
|
|
4433
4437
|
constructor() {
|
|
4434
4438
|
effect(() => {
|
|
4435
|
-
this.dataSource.data = this.data();
|
|
4436
|
-
|
|
4437
|
-
|
|
4438
|
-
|
|
4439
|
-
this.selection.select(d);
|
|
4440
|
-
}
|
|
4439
|
+
this.dataSource.data = [...this.data()];
|
|
4440
|
+
if (this.selection) {
|
|
4441
|
+
const selected = this.selection.selected;
|
|
4442
|
+
this.selection.clear();
|
|
4443
|
+
this.data().filter((v) => selected.map((s) => JSON.stringify(s)).includes(JSON.stringify(v))).forEach((d) => this.selection.select(d));
|
|
4444
|
+
}
|
|
4445
|
+
});
|
|
4446
|
+
effect(() => {
|
|
4447
|
+
const paginator = this.paginator();
|
|
4448
|
+
if (paginator) {
|
|
4449
|
+
paginator._intl.itemsPerPageLabel = "Записей на странице";
|
|
4450
|
+
paginator._intl.firstPageLabel = "Первая страница";
|
|
4451
|
+
paginator._intl.previousPageLabel = "Предыдущая страница";
|
|
4452
|
+
paginator._intl.nextPageLabel = "Следующая страница";
|
|
4453
|
+
paginator._intl.lastPageLabel = "Последняя страница";
|
|
4454
|
+
paginator._intl.changes.next();
|
|
4455
|
+
}
|
|
4441
4456
|
});
|
|
4442
4457
|
}
|
|
4443
4458
|
ngOnInit() {
|
|
4444
|
-
this.displayedColumns = ["select"].concat(this.columnOptions()?.filter((c) => !c.hide).map((item) => item.name) || []);
|
|
4445
4459
|
this.selection = new SelectionModel(this.allowMultiSelect());
|
|
4460
|
+
this.selection.changed.subscribe((change) => {
|
|
4461
|
+
this.selectionChange.emit(change.source.selected);
|
|
4462
|
+
});
|
|
4446
4463
|
}
|
|
4447
|
-
|
|
4448
|
-
|
|
4464
|
+
onPageEvent(event) {
|
|
4465
|
+
this.pageStateChange.emit({
|
|
4466
|
+
pageIndex: event.pageIndex,
|
|
4467
|
+
pageSize: event.pageSize
|
|
4468
|
+
});
|
|
4449
4469
|
}
|
|
4450
|
-
|
|
4451
|
-
|
|
4452
|
-
|
|
4453
|
-
|
|
4454
|
-
|
|
4455
|
-
paginator._intl.previousPageLabel = "Предыдущая страница";
|
|
4456
|
-
paginator._intl.nextPageLabel = "Следующая страница";
|
|
4457
|
-
paginator._intl.lastPageLabel = "Последняя страница";
|
|
4458
|
-
const subs = paginator.page.subscribe((page) => {
|
|
4459
|
-
const pageState = {
|
|
4460
|
-
pageIndex: page.pageIndex,
|
|
4461
|
-
pageSize: page.pageSize
|
|
4462
|
-
};
|
|
4463
|
-
this.pageState.set(pageState);
|
|
4464
|
-
this.pageStateChange.emit(pageState);
|
|
4465
|
-
});
|
|
4466
|
-
this.subscription.add(subs);
|
|
4467
|
-
}
|
|
4468
|
-
const sortValue = this.sort();
|
|
4469
|
-
if (sortValue) {
|
|
4470
|
-
const subs = sortValue.sortChange.subscribe((sort) => {
|
|
4471
|
-
const sortState = {
|
|
4472
|
-
sortActive: sort.active,
|
|
4473
|
-
sortDirection: sort.direction
|
|
4474
|
-
};
|
|
4475
|
-
this.sortState.set(sortState);
|
|
4476
|
-
this.sortStateChange.emit(sortState);
|
|
4477
|
-
});
|
|
4478
|
-
this.subscription.add(subs);
|
|
4479
|
-
}
|
|
4480
|
-
if (this.selection) {
|
|
4481
|
-
const subs = this.selection.changed.subscribe((change) => {
|
|
4482
|
-
this.selectionChange.emit(change.source.selected);
|
|
4483
|
-
});
|
|
4484
|
-
this.subscription.add(subs);
|
|
4485
|
-
}
|
|
4470
|
+
onSortEvent(sort) {
|
|
4471
|
+
this.sortStateChange.emit({
|
|
4472
|
+
sortActive: sort.active,
|
|
4473
|
+
sortDirection: sort.direction
|
|
4474
|
+
});
|
|
4486
4475
|
}
|
|
4487
4476
|
isAllSelected() {
|
|
4488
4477
|
return this.selection.selected.length === this.dataSource.data.length;
|
|
@@ -4621,18 +4610,103 @@ var TableComponent = class TableComponent {
|
|
|
4621
4610
|
}
|
|
4622
4611
|
],
|
|
4623
4612
|
ngImport: i0,
|
|
4624
|
-
template: "<div class=\"component-container\">\r\n <div class=\"table-container\">\r\n <table mat-table [dataSource]=\"dataSource\"\r\n matSort\r\n [matSortActive]=\"sortState().sortActive || ''\"\r\n [matSortDirection]=\"sortState().sortDirection\"\r\n matSortDisableClear>\r\n\r\n <!-- Выбор строки Column -->\r\n <ng-container matColumnDef=\"select\">\r\n <th mat-header-cell *matHeaderCellDef>\r\n @if (allowMultiSelect()) {\r\n <mat-checkbox (change)=\"$event ? masterToggle() : null\" [checked]=\"selection.hasValue() && isAllSelected()\"\r\n [indeterminate]=\"selection.hasValue() && !isAllSelected()\">\r\n </mat-checkbox>\r\n }\r\n </th>\r\n <td mat-cell *matCellDef=\"let row\">\r\n <mat-checkbox (click)=\"$event.stopPropagation()\" (change)=\"$event ? selection.toggle(row) : null\"\r\n [checked]=\"selection.isSelected(row)\">\r\n </mat-checkbox>\r\n </td>\r\n @if (footer()) {\r\n <td mat-footer-cell *matFooterCellDef></td>\r\n }\r\n </ng-container>\r\n\r\n @for (item of columnOptions(); track item) {\r\n <ng-container matColumnDef={{item.name}}>\r\n <th mat-header-cell *matHeaderCellDef mat-sort-header [disabled]=\"item.titleSortDisable\">{{item.title}}</th>\r\n @if (!item.format) {\r\n <td mat-cell *matCellDef=\"let element\" (contextmenu)=\"onContextMenu($event, element)\" [matTooltip]=\"item.tooltip ?? ''\">\r\n {{element[item.name]}}\r\n </td>\r\n @if (footer()) {\r\n <td mat-footer-cell *matFooterCellDef>\r\n @if (item.footer) {\r\n <strong>{{ getTotal(item.name) }}</strong>\r\n }\r\n @if (item.footerTitle) {\r\n <strong>{{ item.footerTitle }}</strong>\r\n }\r\n </td>\r\n } \r\n }\r\n @if (item.format === 'pre-wrap') {\r\n <td mat-cell *matCellDef=\"let element\" (contextmenu)=\"onContextMenu($event, element)\" class=\"pre-wrap\" [matTooltip]=\"item.tooltip ?? ''\">\r\n {{element[item.name]}}\r\n </td>\r\n @if (footer()) {\r\n <td mat-footer-cell *matFooterCellDef>\r\n @if (item.footerTitle) {\r\n <strong>{{ item.footerTitle }}</strong>\r\n }\r\n </td>\r\n }\r\n }\r\n @if (item.format === 'link') {\r\n <td mat-cell *matCellDef=\"let element\" (contextmenu)=\"onContextMenu($event, element)\" [matTooltip]=\"item.tooltip ?? ''\">\r\n <a [href]=\"element[item.name]\" target=\"_blank\">{{element[item.name]}}</a>\r\n </td>\r\n @if (footer()) {\r\n <td mat-footer-cell *matFooterCellDef>\r\n @if (item.footerTitle) {\r\n <strong>{{ item.footerTitle }}</strong>\r\n }\r\n </td>\r\n }\r\n }\r\n @if (item.format === 'linkIcon') {\r\n <td mat-cell *matCellDef=\"let element\" (contextmenu)=\"onContextMenu($event, element)\" [matTooltip]=\"item.tooltip ?? ''\">\r\n @if (element[item.name]) {\r\n <a [href]=\"element[item.name]\" target=\"_blank\">\r\n @if (item.icon) {\r\n <mat-icon [class]=\"item.classList ? item.classList : ''\" >{{item.icon}}</mat-icon>\r\n } \r\n @if (item.symbol) {\r\n <span [class]=\"item.classList ? item.classList : ''\" >{{item.symbol}}</span>\r\n }\r\n </a>\r\n }\r\n </td>\r\n @if (footer()) {\r\n <td mat-footer-cell *matFooterCellDef>\r\n @if (item.footerTitle) {\r\n <strong>{{ item.footerTitle }}</strong>\r\n }\r\n </td>\r\n }\r\n }\r\n @if (item.format === 'routerLink') {\r\n <td mat-cell *matCellDef=\"let element\" (contextmenu)=\"onContextMenu($event, element)\" [matTooltip]=\"item.tooltip ?? ''\">\r\n <a [routerLink]=\"[element[item.name]]\">{{element[item.name]}}</a>\r\n </td>\r\n @if (footer()) {\r\n <td mat-footer-cell *matFooterCellDef>\r\n @if (item.footerTitle) {\r\n <strong>{{ item.footerTitle }}</strong>\r\n }\r\n </td>\r\n }\r\n }\r\n @if (item.format === 'routerLinkIcon') {\r\n <td mat-cell *matCellDef=\"let element\" (contextmenu)=\"onContextMenu($event, element)\" [matTooltip]=\"item.tooltip ?? ''\">\r\n @if (element[item.name]) {\r\n <a [routerLink]=\"[element[item.name]]\">\r\n @if (item.icon) {\r\n <mat-icon [class]=\"item.classList ? item.classList : ''\" >{{item.icon}}</mat-icon>\r\n } \r\n @if (item.symbol) {\r\n <span [class]=\"item.classList ? item.classList : ''\" >{{item.symbol}}</span>\r\n }\r\n </a>\r\n }\r\n </td>\r\n @if (footer()) {\r\n <td mat-footer-cell *matFooterCellDef>\r\n @if (item.footerTitle) {\r\n <strong>{{ item.footerTitle }}</strong>\r\n }\r\n </td>\r\n }\r\n }\r\n @if (item.format === 'checkbox') {\r\n <td mat-cell *matCellDef=\"let element\" (contextmenu)=\"onContextMenu($event, element)\" [matTooltip]=\"item.tooltip ?? ''\">\r\n <mat-checkbox [checked]=\"element[item.name] === 1\" [disabled]=\"true\"></mat-checkbox>\r\n </td>\r\n @if (footer()) {\r\n <td mat-footer-cell *matFooterCellDef>\r\n @if (item.footerTitle) {\r\n <strong>{{ item.footerTitle }}</strong>\r\n }\r\n </td>\r\n }\r\n }\r\n @if (item.format === 'icon') {\r\n <td mat-cell *matCellDef=\"let element\" (contextmenu)=\"onContextMenu($event, element)\" [matTooltip]=\"item.tooltip ?? ''\">\r\n @if (item.icon) {\r\n <mat-icon [class]=\"item.classList ? item.classList : ''\" >{{item.icon}}</mat-icon>\r\n } \r\n @if (item.symbol) {\r\n <span [class]=\"item.classList ? item.classList : ''\" >{{item.symbol}}</span>\r\n }\r\n </td>\r\n @if (footer()) {\r\n <td mat-footer-cell *matFooterCellDef>\r\n @if (item.footerTitle) {\r\n <strong>{{ item.footerTitle }}</strong>\r\n }\r\n </td>\r\n }\r\n }\r\n @if (item.format === 'icons') {\r\n <td mat-cell *matCellDef=\"let element\" (contextmenu)=\"onContextMenu($event, element)\">\r\n @if (item.icons) {\r\n <mat-icon [class]=\"item.classList ? item.classList[element[item.name]] : ''\" \r\n [matTooltip]=\"item.tooltips ? item.tooltips[element[item.name]] : ''\">{{item.icons[element[item.name]]}}</mat-icon>\r\n } \r\n @if (item.symbols) {\r\n <span [class]=\"item.classList ? item.classList[element[item.name]] : ''\" >{{item.symbols[element[item.name]]}}</span>\r\n }\r\n </td>\r\n @if (footer()) {\r\n <td mat-footer-cell *matFooterCellDef>\r\n @if (item.footerTitle) {\r\n <strong>{{ item.footerTitle }}</strong>\r\n }\r\n </td>\r\n }\r\n }\r\n @if (item.format === 'actions') {\r\n <td mat-cell *matCellDef=\"let element\" (contextmenu)=\"onContextMenu($event, element)\">\r\n @if (item.actions) {\r\n <div class=\"actions-container\">\r\n @for (action of item.actions; track action) {\r\n @if (!(action.hideFn ? action.hideFn(element) : action.hide)) {\r\n <button mat-icon-button\r\n (click)=\"action.onClickFn ? action.onClickFn(element) : ''\"\r\n (mousedown)=\"action.onClickMiddleFn ? action.onClickMiddleFn($event, element) : ''\"\r\n [disabled]=\"action.disabledFn ? action.disabledFn(element) : action.disabled\"\r\n [matTooltip]=\"action.tooltip ? action.tooltip : ''\" >\r\n @if (action.icon) {\r\n <mat-icon [class]=\"action.classList ? action.classList : ''\" >{{action.icon}}</mat-icon>\r\n }\r\n @if (action.symbol) {\r\n <span [class]=\"action.classList ? action.classList : ''\" >{{action.symbol}}</span>\r\n }\r\n {{ action.title }}\r\n </button>\r\n }\r\n }\r\n </div>\r\n } \r\n </td>\r\n @if (footer()) {\r\n <td mat-footer-cell *matFooterCellDef>\r\n @if (item.footerTitle) {\r\n <strong>{{ item.footerTitle }}</strong>\r\n }\r\n </td>\r\n }\r\n }\r\n @if (item.format === 'image') {\r\n <td mat-cell *matCellDef=\"let element\" (contextmenu)=\"onContextMenu($event, element)\" [matTooltip]=\"item.tooltip ?? ''\">\r\n @if (element[item.name]) {\r\n <img\r\n [src]=\"element[item.name]\"\r\n [alt]=\"item.imageAlt && element[item.imageAlt] ? element[item.imageAlt] : ''\"\r\n [class]=\"item.classList ? item.classList : ''\"\r\n />\r\n } \r\n </td>\r\n @if (footer()) {\r\n <td mat-footer-cell *matFooterCellDef>\r\n @if (item.footerTitle) {\r\n <strong>{{ item.footerTitle }}</strong>\r\n }\r\n </td>\r\n }\r\n }\r\n </ng-container>\r\n }\r\n\r\n <tr class=\"mat-row\" *matNoDataRow>\r\n <td class=\"mat-cell\" colspan=\"9999\">\r\n Нет данных для отображения\r\n </td>\r\n </tr>\r\n\r\n <tr mat-header-row *matHeaderRowDef=\"displayedColumns; sticky: true\"></tr>\r\n <tr mat-row *matRowDef=\"let row; columns: displayedColumns;\" \r\n (click)=\"onRowClicked(row)\" (dblclick)=\"onRowDblClicked(row)\" \r\n class=\"element-row\" [class.selected-row]=\"selection.isSelected(row)\">\r\n </tr>\r\n @if (footer()) {\r\n <tr mat-footer-row *matFooterRowDef=\"displayedColumns; sticky: true\"></tr>\r\n }\r\n </table>\r\n <div style=\"visibility: hidden; position: fixed\"\r\n [style.left]=\"contextMenuPosition.x\"\r\n [style.top]=\"contextMenuPosition.y\"\r\n [matMenuTriggerFor]=\"contextMenu\" #menuTrigger=\"matMenuTrigger\">\r\n </div>\r\n <mat-menu #contextMenu=\"matMenu\">\r\n <ng-template matMenuContent let-id=\"id\">\r\n @for (menuItem of opt(); track menuItem) {\r\n @if (menuItem.title === '-' && !(menuItem.hideFn ? menuItem.hideFn(itemForMenu) : menuItem.hide)) {\r\n <mat-divider></mat-divider>\r\n }\r\n @if (menuItem.title !== '-' && !(menuItem.hideFn ? menuItem.hideFn(itemForMenu) : menuItem.hide)) {\r\n <button mat-menu-item\r\n (click)=\"menuItem.onClickFn ? menuItem.onClickFn(itemForMenu) : ''\"\r\n (mousedown)=\"menuItem.onClickMiddleFn ? menuItem.onClickMiddleFn($event, itemForMenu, menuTrigger) : ''\"\r\n [disabled]=\"menuItem.disabledFn ? menuItem.disabledFn(itemForMenu) : menuItem.disabled\">\r\n @if (menuItem.icon) {\r\n <mat-icon [class]=\"menuItem.classList ? menuItem.classList : ''\">{{menuItem.icon}}</mat-icon>\r\n }\r\n @if (menuItem.symbol) {\r\n <span [class]=\"menuItem.classList ? menuItem.classList : ''\">{{menuItem.symbol}}</span>\r\n }\r\n {{ menuItem.title }}\r\n </button>\r\n }\r\n }\r\n </ng-template>\r\n </mat-menu>\r\n</div>\r\n\r\n\r\n<mat-paginator [length]=\"length()\"\r\n [pageIndex]=\"pageState().pageIndex || defaultPageIndex\"\r\n [pageSizeOptions]=\"[5, 10, 20, 50, 100]\"\r\n [pageSize]=\"pageState().pageSize || defaultPageSize\"\r\n showFirstLastButtons\r\n itemsPerPageLabel=\"\"\r\n></mat-paginator>\r\n</div>\r\n",
|
|
4613
|
+
template: "<div class=\"component-container\">\r\n <div class=\"table-container\">\r\n <table mat-table [dataSource]=\"dataSource\"\r\n matSort\r\n [matSortActive]=\"sortState().sortActive\"\r\n [matSortDirection]=\"sortState().sortDirection\"\r\n (matSortChange)=\"onSortEvent($event)\"\r\n matSortDisableClear>\r\n\r\n <!-- Выбор строки Column -->\r\n <ng-container matColumnDef=\"select\">\r\n <th mat-header-cell *matHeaderCellDef>\r\n @if (allowMultiSelect()) {\r\n <mat-checkbox (change)=\"$event ? masterToggle() : null\" [checked]=\"selection.hasValue() && isAllSelected()\"\r\n [indeterminate]=\"selection.hasValue() && !isAllSelected()\">\r\n </mat-checkbox>\r\n }\r\n </th>\r\n <td mat-cell *matCellDef=\"let row\">\r\n <mat-checkbox (click)=\"$event.stopPropagation()\" (change)=\"$event ? selection.toggle(row) : null\"\r\n [checked]=\"selection.isSelected(row)\">\r\n </mat-checkbox>\r\n </td>\r\n @if (footer()) {\r\n <td mat-footer-cell *matFooterCellDef></td>\r\n }\r\n </ng-container>\r\n\r\n @for (item of columnOptions(); track item) {\r\n <ng-container matColumnDef={{item.name}}>\r\n <th mat-header-cell *matHeaderCellDef mat-sort-header [disabled]=\"item.titleSortDisable\">{{item.title}}</th>\r\n @if (!item.format) {\r\n <td mat-cell *matCellDef=\"let element\" (contextmenu)=\"onContextMenu($event, element)\" [matTooltip]=\"item.tooltip ?? ''\">\r\n {{element[item.name]}}\r\n </td>\r\n @if (footer()) {\r\n <td mat-footer-cell *matFooterCellDef>\r\n @if (item.footer) {\r\n <strong>{{ getTotal(item.name) }}</strong>\r\n }\r\n @if (item.footerTitle) {\r\n <strong>{{ item.footerTitle }}</strong>\r\n }\r\n </td>\r\n } \r\n }\r\n @if (item.format === 'pre-wrap') {\r\n <td mat-cell *matCellDef=\"let element\" (contextmenu)=\"onContextMenu($event, element)\" class=\"pre-wrap\" [matTooltip]=\"item.tooltip ?? ''\">\r\n {{element[item.name]}}\r\n </td>\r\n @if (footer()) {\r\n <td mat-footer-cell *matFooterCellDef>\r\n @if (item.footerTitle) {\r\n <strong>{{ item.footerTitle }}</strong>\r\n }\r\n </td>\r\n }\r\n }\r\n @if (item.format === 'link') {\r\n <td mat-cell *matCellDef=\"let element\" (contextmenu)=\"onContextMenu($event, element)\" [matTooltip]=\"item.tooltip ?? ''\">\r\n <a [href]=\"element[item.name]\" target=\"_blank\">{{element[item.name]}}</a>\r\n </td>\r\n @if (footer()) {\r\n <td mat-footer-cell *matFooterCellDef>\r\n @if (item.footerTitle) {\r\n <strong>{{ item.footerTitle }}</strong>\r\n }\r\n </td>\r\n }\r\n }\r\n @if (item.format === 'linkIcon') {\r\n <td mat-cell *matCellDef=\"let element\" (contextmenu)=\"onContextMenu($event, element)\" [matTooltip]=\"item.tooltip ?? ''\">\r\n @if (element[item.name]) {\r\n <a [href]=\"element[item.name]\" target=\"_blank\">\r\n @if (item.icon) {\r\n <mat-icon [class]=\"item.classList ? item.classList : ''\" >{{item.icon}}</mat-icon>\r\n } \r\n @if (item.symbol) {\r\n <span [class]=\"item.classList ? item.classList : ''\" >{{item.symbol}}</span>\r\n }\r\n </a>\r\n }\r\n </td>\r\n @if (footer()) {\r\n <td mat-footer-cell *matFooterCellDef>\r\n @if (item.footerTitle) {\r\n <strong>{{ item.footerTitle }}</strong>\r\n }\r\n </td>\r\n }\r\n }\r\n @if (item.format === 'routerLink') {\r\n <td mat-cell *matCellDef=\"let element\" (contextmenu)=\"onContextMenu($event, element)\" [matTooltip]=\"item.tooltip ?? ''\">\r\n <a [routerLink]=\"[element[item.name]]\">{{element[item.name]}}</a>\r\n </td>\r\n @if (footer()) {\r\n <td mat-footer-cell *matFooterCellDef>\r\n @if (item.footerTitle) {\r\n <strong>{{ item.footerTitle }}</strong>\r\n }\r\n </td>\r\n }\r\n }\r\n @if (item.format === 'routerLinkIcon') {\r\n <td mat-cell *matCellDef=\"let element\" (contextmenu)=\"onContextMenu($event, element)\" [matTooltip]=\"item.tooltip ?? ''\">\r\n @if (element[item.name]) {\r\n <a [routerLink]=\"[element[item.name]]\">\r\n @if (item.icon) {\r\n <mat-icon [class]=\"item.classList ? item.classList : ''\" >{{item.icon}}</mat-icon>\r\n } \r\n @if (item.symbol) {\r\n <span [class]=\"item.classList ? item.classList : ''\" >{{item.symbol}}</span>\r\n }\r\n </a>\r\n }\r\n </td>\r\n @if (footer()) {\r\n <td mat-footer-cell *matFooterCellDef>\r\n @if (item.footerTitle) {\r\n <strong>{{ item.footerTitle }}</strong>\r\n }\r\n </td>\r\n }\r\n }\r\n @if (item.format === 'checkbox') {\r\n <td mat-cell *matCellDef=\"let element\" (contextmenu)=\"onContextMenu($event, element)\" [matTooltip]=\"item.tooltip ?? ''\">\r\n <mat-checkbox [checked]=\"element[item.name] === 1\" [disabled]=\"true\"></mat-checkbox>\r\n </td>\r\n @if (footer()) {\r\n <td mat-footer-cell *matFooterCellDef>\r\n @if (item.footerTitle) {\r\n <strong>{{ item.footerTitle }}</strong>\r\n }\r\n </td>\r\n }\r\n }\r\n @if (item.format === 'icon') {\r\n <td mat-cell *matCellDef=\"let element\" (contextmenu)=\"onContextMenu($event, element)\" [matTooltip]=\"item.tooltip ?? ''\">\r\n @if (item.icon) {\r\n <mat-icon [class]=\"item.classList ? item.classList : ''\" >{{item.icon}}</mat-icon>\r\n } \r\n @if (item.symbol) {\r\n <span [class]=\"item.classList ? item.classList : ''\" >{{item.symbol}}</span>\r\n }\r\n </td>\r\n @if (footer()) {\r\n <td mat-footer-cell *matFooterCellDef>\r\n @if (item.footerTitle) {\r\n <strong>{{ item.footerTitle }}</strong>\r\n }\r\n </td>\r\n }\r\n }\r\n @if (item.format === 'icons') {\r\n <td mat-cell *matCellDef=\"let element\" (contextmenu)=\"onContextMenu($event, element)\">\r\n @if (item.icons) {\r\n <mat-icon [class]=\"item.classList ? item.classList[element[item.name]] : ''\" \r\n [matTooltip]=\"item.tooltips ? item.tooltips[element[item.name]] : ''\">{{item.icons[element[item.name]]}}</mat-icon>\r\n } \r\n @if (item.symbols) {\r\n <span [class]=\"item.classList ? item.classList[element[item.name]] : ''\" >{{item.symbols[element[item.name]]}}</span>\r\n }\r\n </td>\r\n @if (footer()) {\r\n <td mat-footer-cell *matFooterCellDef>\r\n @if (item.footerTitle) {\r\n <strong>{{ item.footerTitle }}</strong>\r\n }\r\n </td>\r\n }\r\n }\r\n @if (item.format === 'actions') {\r\n <td mat-cell *matCellDef=\"let element\" (contextmenu)=\"onContextMenu($event, element)\">\r\n @if (item.actions) {\r\n <div class=\"actions-container\">\r\n @for (action of item.actions; track action) {\r\n @if (!(action.hideFn ? action.hideFn(element) : action.hide)) {\r\n <button mat-icon-button\r\n (click)=\"action.onClickFn ? action.onClickFn(element) : ''\"\r\n (mousedown)=\"action.onClickMiddleFn ? action.onClickMiddleFn($event, element) : ''\"\r\n [disabled]=\"action.disabledFn ? action.disabledFn(element) : action.disabled\"\r\n [matTooltip]=\"action.tooltip ? action.tooltip : ''\" >\r\n @if (action.icon) {\r\n <mat-icon [class]=\"action.classList ? action.classList : ''\" >{{action.icon}}</mat-icon>\r\n }\r\n @if (action.symbol) {\r\n <span [class]=\"action.classList ? action.classList : ''\" >{{action.symbol}}</span>\r\n }\r\n {{ action.title }}\r\n </button>\r\n }\r\n }\r\n </div>\r\n } \r\n </td>\r\n @if (footer()) {\r\n <td mat-footer-cell *matFooterCellDef>\r\n @if (item.footerTitle) {\r\n <strong>{{ item.footerTitle }}</strong>\r\n }\r\n </td>\r\n }\r\n }\r\n @if (item.format === 'image') {\r\n <td mat-cell *matCellDef=\"let element\" (contextmenu)=\"onContextMenu($event, element)\" [matTooltip]=\"item.tooltip ?? ''\">\r\n @if (element[item.name]) {\r\n <img\r\n [src]=\"element[item.name]\"\r\n [alt]=\"item.imageAlt && element[item.imageAlt] ? element[item.imageAlt] : ''\"\r\n [class]=\"item.classList ? item.classList : ''\"\r\n />\r\n } \r\n </td>\r\n @if (footer()) {\r\n <td mat-footer-cell *matFooterCellDef>\r\n @if (item.footerTitle) {\r\n <strong>{{ item.footerTitle }}</strong>\r\n }\r\n </td>\r\n }\r\n }\r\n </ng-container>\r\n }\r\n\r\n <tr class=\"mat-row\" *matNoDataRow>\r\n <td class=\"mat-cell\" colspan=\"9999\">\r\n Нет данных для отображения\r\n </td>\r\n </tr>\r\n\r\n <tr mat-header-row *matHeaderRowDef=\"displayedColumns; sticky: true\"></tr>\r\n <tr mat-row *matRowDef=\"let row; columns: displayedColumns;\" \r\n (click)=\"onRowClicked(row)\" (dblclick)=\"onRowDblClicked(row)\" \r\n class=\"element-row\" [class.selected-row]=\"selection.isSelected(row)\">\r\n </tr>\r\n @if (footer()) {\r\n <tr mat-footer-row *matFooterRowDef=\"displayedColumns; sticky: true\"></tr>\r\n }\r\n </table>\r\n <div style=\"visibility: hidden; position: fixed\"\r\n [style.left]=\"contextMenuPosition.x\"\r\n [style.top]=\"contextMenuPosition.y\"\r\n [matMenuTriggerFor]=\"contextMenu\" #menuTrigger=\"matMenuTrigger\">\r\n </div>\r\n <mat-menu #contextMenu=\"matMenu\">\r\n <ng-template matMenuContent let-id=\"id\">\r\n @for (menuItem of opt(); track menuItem) {\r\n @if (menuItem.title === '-' && !(menuItem.hideFn ? menuItem.hideFn(itemForMenu) : menuItem.hide)) {\r\n <mat-divider></mat-divider>\r\n }\r\n @if (menuItem.title !== '-' && !(menuItem.hideFn ? menuItem.hideFn(itemForMenu) : menuItem.hide)) {\r\n <button mat-menu-item\r\n (click)=\"menuItem.onClickFn ? menuItem.onClickFn(itemForMenu) : ''\"\r\n (mousedown)=\"menuItem.onClickMiddleFn ? menuItem.onClickMiddleFn($event, itemForMenu, menuTrigger) : ''\"\r\n [disabled]=\"menuItem.disabledFn ? menuItem.disabledFn(itemForMenu) : menuItem.disabled\">\r\n @if (menuItem.icon) {\r\n <mat-icon [class]=\"menuItem.classList ? menuItem.classList : ''\">{{menuItem.icon}}</mat-icon>\r\n }\r\n @if (menuItem.symbol) {\r\n <span [class]=\"menuItem.classList ? menuItem.classList : ''\">{{menuItem.symbol}}</span>\r\n }\r\n {{ menuItem.title }}\r\n </button>\r\n }\r\n }\r\n </ng-template>\r\n </mat-menu>\r\n</div>\r\n\r\n\r\n<mat-paginator [length]=\"length()\"\r\n [pageIndex]=\"pageState().pageIndex || defaultPageIndex\"\r\n [pageSizeOptions]=\"[5, 10, 20, 50, 100]\"\r\n [pageSize]=\"pageState().pageSize || defaultPageSize\"\r\n (page)=\"onPageEvent($event)\"\r\n showFirstLastButtons\r\n itemsPerPageLabel=\"\"\r\n></mat-paginator>\r\n</div>\r\n",
|
|
4625
4614
|
styles: [".component-container{display:flex;flex-direction:column;height:100%}.table-container{display:flex;flex-direction:column;justify-content:space-between;flex:auto;margin:0 20px;overflow:auto;height:400px}.center{position:absolute;inset:0 0 56px;background:#00000026;z-index:1;display:flex;align-items:center;justify-content:center}.mat-column-select{overflow:initial}tr.mat-footer-row{font-weight:700;height:56px}.mat-table{overflow-x:scroll}.mat-cell,.mat-header-cell{word-wrap:initial;display:table-cell;padding:0 10px;line-break:unset;white-space:nowrap;overflow:hidden;vertical-align:middle}.mat-row,.mat-header-row{display:table-row}tr.element-row:not(.selected-row):hover{background:#f5f5f5}tr.element-row:not(.selected-row):active{background:#efefef}.selected-row{background-color:#eee}.fact-done-row{background-color:#eefdec}a,a:visited,a:hover,a:active{color:inherit}.pre-wrap{white-space:pre-wrap}.actions-container{display:flex;column-gap:5px}\n"],
|
|
4626
4615
|
dependencies: [
|
|
4616
|
+
{
|
|
4617
|
+
kind: "ngmodule",
|
|
4618
|
+
type: MatTableModule
|
|
4619
|
+
},
|
|
4627
4620
|
{
|
|
4628
4621
|
kind: "component",
|
|
4629
|
-
type: MatTable,
|
|
4622
|
+
type: i1.MatTable,
|
|
4630
4623
|
selector: "mat-table, table[mat-table]",
|
|
4631
4624
|
exportAs: ["matTable"]
|
|
4632
4625
|
},
|
|
4633
4626
|
{
|
|
4634
4627
|
kind: "directive",
|
|
4635
|
-
type:
|
|
4628
|
+
type: i1.MatHeaderCellDef,
|
|
4629
|
+
selector: "[matHeaderCellDef]"
|
|
4630
|
+
},
|
|
4631
|
+
{
|
|
4632
|
+
kind: "directive",
|
|
4633
|
+
type: i1.MatHeaderRowDef,
|
|
4634
|
+
selector: "[matHeaderRowDef]",
|
|
4635
|
+
inputs: ["matHeaderRowDef", "matHeaderRowDefSticky"]
|
|
4636
|
+
},
|
|
4637
|
+
{
|
|
4638
|
+
kind: "directive",
|
|
4639
|
+
type: i1.MatColumnDef,
|
|
4640
|
+
selector: "[matColumnDef]",
|
|
4641
|
+
inputs: ["matColumnDef"]
|
|
4642
|
+
},
|
|
4643
|
+
{
|
|
4644
|
+
kind: "directive",
|
|
4645
|
+
type: i1.MatCellDef,
|
|
4646
|
+
selector: "[matCellDef]"
|
|
4647
|
+
},
|
|
4648
|
+
{
|
|
4649
|
+
kind: "directive",
|
|
4650
|
+
type: i1.MatRowDef,
|
|
4651
|
+
selector: "[matRowDef]",
|
|
4652
|
+
inputs: ["matRowDefColumns", "matRowDefWhen"]
|
|
4653
|
+
},
|
|
4654
|
+
{
|
|
4655
|
+
kind: "directive",
|
|
4656
|
+
type: i1.MatFooterCellDef,
|
|
4657
|
+
selector: "[matFooterCellDef]"
|
|
4658
|
+
},
|
|
4659
|
+
{
|
|
4660
|
+
kind: "directive",
|
|
4661
|
+
type: i1.MatFooterRowDef,
|
|
4662
|
+
selector: "[matFooterRowDef]",
|
|
4663
|
+
inputs: ["matFooterRowDef", "matFooterRowDefSticky"]
|
|
4664
|
+
},
|
|
4665
|
+
{
|
|
4666
|
+
kind: "directive",
|
|
4667
|
+
type: i1.MatHeaderCell,
|
|
4668
|
+
selector: "mat-header-cell, th[mat-header-cell]"
|
|
4669
|
+
},
|
|
4670
|
+
{
|
|
4671
|
+
kind: "directive",
|
|
4672
|
+
type: i1.MatCell,
|
|
4673
|
+
selector: "mat-cell, td[mat-cell]"
|
|
4674
|
+
},
|
|
4675
|
+
{
|
|
4676
|
+
kind: "directive",
|
|
4677
|
+
type: i1.MatFooterCell,
|
|
4678
|
+
selector: "mat-footer-cell, td[mat-footer-cell]"
|
|
4679
|
+
},
|
|
4680
|
+
{
|
|
4681
|
+
kind: "component",
|
|
4682
|
+
type: i1.MatHeaderRow,
|
|
4683
|
+
selector: "mat-header-row, tr[mat-header-row]",
|
|
4684
|
+
exportAs: ["matHeaderRow"]
|
|
4685
|
+
},
|
|
4686
|
+
{
|
|
4687
|
+
kind: "component",
|
|
4688
|
+
type: i1.MatRow,
|
|
4689
|
+
selector: "mat-row, tr[mat-row]",
|
|
4690
|
+
exportAs: ["matRow"]
|
|
4691
|
+
},
|
|
4692
|
+
{
|
|
4693
|
+
kind: "component",
|
|
4694
|
+
type: i1.MatFooterRow,
|
|
4695
|
+
selector: "mat-footer-row, tr[mat-footer-row]",
|
|
4696
|
+
exportAs: ["matFooterRow"]
|
|
4697
|
+
},
|
|
4698
|
+
{
|
|
4699
|
+
kind: "directive",
|
|
4700
|
+
type: i1.MatNoDataRow,
|
|
4701
|
+
selector: "ng-template[matNoDataRow]"
|
|
4702
|
+
},
|
|
4703
|
+
{
|
|
4704
|
+
kind: "ngmodule",
|
|
4705
|
+
type: MatSortModule
|
|
4706
|
+
},
|
|
4707
|
+
{
|
|
4708
|
+
kind: "directive",
|
|
4709
|
+
type: i2.MatSort,
|
|
4636
4710
|
selector: "[matSort]",
|
|
4637
4711
|
inputs: [
|
|
4638
4712
|
"matSortActive",
|
|
@@ -4645,20 +4719,40 @@ var TableComponent = class TableComponent {
|
|
|
4645
4719
|
exportAs: ["matSort"]
|
|
4646
4720
|
},
|
|
4647
4721
|
{
|
|
4648
|
-
kind: "
|
|
4649
|
-
type:
|
|
4650
|
-
selector: "[
|
|
4651
|
-
inputs: [
|
|
4722
|
+
kind: "component",
|
|
4723
|
+
type: i2.MatSortHeader,
|
|
4724
|
+
selector: "[mat-sort-header]",
|
|
4725
|
+
inputs: [
|
|
4726
|
+
"mat-sort-header",
|
|
4727
|
+
"arrowPosition",
|
|
4728
|
+
"start",
|
|
4729
|
+
"disabled",
|
|
4730
|
+
"sortActionDescription",
|
|
4731
|
+
"disableClear"
|
|
4732
|
+
],
|
|
4733
|
+
exportAs: ["matSortHeader"]
|
|
4652
4734
|
},
|
|
4653
4735
|
{
|
|
4654
|
-
kind: "
|
|
4655
|
-
type:
|
|
4656
|
-
selector: "[matHeaderCellDef]"
|
|
4736
|
+
kind: "ngmodule",
|
|
4737
|
+
type: MatPaginatorModule
|
|
4657
4738
|
},
|
|
4658
4739
|
{
|
|
4659
|
-
kind: "
|
|
4660
|
-
type:
|
|
4661
|
-
selector: "mat-
|
|
4740
|
+
kind: "component",
|
|
4741
|
+
type: i3.MatPaginator,
|
|
4742
|
+
selector: "mat-paginator",
|
|
4743
|
+
inputs: [
|
|
4744
|
+
"color",
|
|
4745
|
+
"pageIndex",
|
|
4746
|
+
"length",
|
|
4747
|
+
"pageSize",
|
|
4748
|
+
"pageSizeOptions",
|
|
4749
|
+
"hidePageSize",
|
|
4750
|
+
"showFirstLastButtons",
|
|
4751
|
+
"selectConfig",
|
|
4752
|
+
"disabled"
|
|
4753
|
+
],
|
|
4754
|
+
outputs: ["page"],
|
|
4755
|
+
exportAs: ["matPaginator"]
|
|
4662
4756
|
},
|
|
4663
4757
|
{
|
|
4664
4758
|
kind: "component",
|
|
@@ -4687,30 +4781,6 @@ var TableComponent = class TableComponent {
|
|
|
4687
4781
|
outputs: ["change", "indeterminateChange"],
|
|
4688
4782
|
exportAs: ["matCheckbox"]
|
|
4689
4783
|
},
|
|
4690
|
-
{
|
|
4691
|
-
kind: "directive",
|
|
4692
|
-
type: MatCellDef,
|
|
4693
|
-
selector: "[matCellDef]"
|
|
4694
|
-
},
|
|
4695
|
-
{
|
|
4696
|
-
kind: "directive",
|
|
4697
|
-
type: MatCell,
|
|
4698
|
-
selector: "mat-cell, td[mat-cell]"
|
|
4699
|
-
},
|
|
4700
|
-
{
|
|
4701
|
-
kind: "component",
|
|
4702
|
-
type: MatSortHeader,
|
|
4703
|
-
selector: "[mat-sort-header]",
|
|
4704
|
-
inputs: [
|
|
4705
|
-
"mat-sort-header",
|
|
4706
|
-
"arrowPosition",
|
|
4707
|
-
"start",
|
|
4708
|
-
"disabled",
|
|
4709
|
-
"sortActionDescription",
|
|
4710
|
-
"disableClear"
|
|
4711
|
-
],
|
|
4712
|
-
exportAs: ["matSortHeader"]
|
|
4713
|
-
},
|
|
4714
4784
|
{
|
|
4715
4785
|
kind: "component",
|
|
4716
4786
|
type: MatIcon,
|
|
@@ -4743,35 +4813,6 @@ var TableComponent = class TableComponent {
|
|
|
4743
4813
|
"routerLink"
|
|
4744
4814
|
]
|
|
4745
4815
|
},
|
|
4746
|
-
{
|
|
4747
|
-
kind: "directive",
|
|
4748
|
-
type: MatNoDataRow,
|
|
4749
|
-
selector: "ng-template[matNoDataRow]"
|
|
4750
|
-
},
|
|
4751
|
-
{
|
|
4752
|
-
kind: "directive",
|
|
4753
|
-
type: MatHeaderRowDef,
|
|
4754
|
-
selector: "[matHeaderRowDef]",
|
|
4755
|
-
inputs: ["matHeaderRowDef", "matHeaderRowDefSticky"]
|
|
4756
|
-
},
|
|
4757
|
-
{
|
|
4758
|
-
kind: "component",
|
|
4759
|
-
type: MatHeaderRow,
|
|
4760
|
-
selector: "mat-header-row, tr[mat-header-row]",
|
|
4761
|
-
exportAs: ["matHeaderRow"]
|
|
4762
|
-
},
|
|
4763
|
-
{
|
|
4764
|
-
kind: "directive",
|
|
4765
|
-
type: MatRowDef,
|
|
4766
|
-
selector: "[matRowDef]",
|
|
4767
|
-
inputs: ["matRowDefColumns", "matRowDefWhen"]
|
|
4768
|
-
},
|
|
4769
|
-
{
|
|
4770
|
-
kind: "component",
|
|
4771
|
-
type: MatRow,
|
|
4772
|
-
selector: "mat-row, tr[mat-row]",
|
|
4773
|
-
exportAs: ["matRow"]
|
|
4774
|
-
},
|
|
4775
4816
|
{
|
|
4776
4817
|
kind: "directive",
|
|
4777
4818
|
type: MatMenuTrigger,
|
|
@@ -4832,57 +4873,13 @@ var TableComponent = class TableComponent {
|
|
|
4832
4873
|
],
|
|
4833
4874
|
exportAs: ["matMenuItem"]
|
|
4834
4875
|
},
|
|
4835
|
-
{
|
|
4836
|
-
kind: "component",
|
|
4837
|
-
type: MatPaginator,
|
|
4838
|
-
selector: "mat-paginator",
|
|
4839
|
-
inputs: [
|
|
4840
|
-
"color",
|
|
4841
|
-
"pageIndex",
|
|
4842
|
-
"length",
|
|
4843
|
-
"pageSize",
|
|
4844
|
-
"pageSizeOptions",
|
|
4845
|
-
"hidePageSize",
|
|
4846
|
-
"showFirstLastButtons",
|
|
4847
|
-
"selectConfig",
|
|
4848
|
-
"disabled"
|
|
4849
|
-
],
|
|
4850
|
-
outputs: ["page"],
|
|
4851
|
-
exportAs: ["matPaginator"]
|
|
4852
|
-
},
|
|
4853
|
-
{
|
|
4854
|
-
kind: "directive",
|
|
4855
|
-
type: MatFooterRowDef,
|
|
4856
|
-
selector: "[matFooterRowDef]",
|
|
4857
|
-
inputs: ["matFooterRowDef", "matFooterRowDefSticky"]
|
|
4858
|
-
},
|
|
4859
|
-
{
|
|
4860
|
-
kind: "component",
|
|
4861
|
-
type: MatFooterRow,
|
|
4862
|
-
selector: "mat-footer-row, tr[mat-footer-row]",
|
|
4863
|
-
exportAs: ["matFooterRow"]
|
|
4864
|
-
},
|
|
4865
|
-
{
|
|
4866
|
-
kind: "directive",
|
|
4867
|
-
type: MatFooterCellDef,
|
|
4868
|
-
selector: "[matFooterCellDef]"
|
|
4869
|
-
},
|
|
4870
|
-
{
|
|
4871
|
-
kind: "directive",
|
|
4872
|
-
type: MatFooterCell,
|
|
4873
|
-
selector: "mat-footer-cell, td[mat-footer-cell]"
|
|
4874
|
-
},
|
|
4875
|
-
{
|
|
4876
|
-
kind: "ngmodule",
|
|
4877
|
-
type: MatTableModule
|
|
4878
|
-
},
|
|
4879
4876
|
{
|
|
4880
4877
|
kind: "ngmodule",
|
|
4881
4878
|
type: MatTooltipModule
|
|
4882
4879
|
},
|
|
4883
4880
|
{
|
|
4884
4881
|
kind: "directive",
|
|
4885
|
-
type:
|
|
4882
|
+
type: i4.MatTooltip,
|
|
4886
4883
|
selector: "[matTooltip]",
|
|
4887
4884
|
inputs: [
|
|
4888
4885
|
"matTooltipPosition",
|
|
@@ -4902,8 +4899,7 @@ var TableComponent = class TableComponent {
|
|
|
4902
4899
|
selector: "button[mat-icon-button], a[mat-icon-button], button[matIconButton], a[matIconButton]",
|
|
4903
4900
|
exportAs: ["matButton", "matAnchor"]
|
|
4904
4901
|
}
|
|
4905
|
-
]
|
|
4906
|
-
changeDetection: i0.ChangeDetectionStrategy.Eager
|
|
4902
|
+
]
|
|
4907
4903
|
});
|
|
4908
4904
|
};
|
|
4909
4905
|
i0.ɵɵngDeclareClassMetadata({
|
|
@@ -4915,39 +4911,22 @@ i0.ɵɵngDeclareClassMetadata({
|
|
|
4915
4911
|
type: Component,
|
|
4916
4912
|
args: [{
|
|
4917
4913
|
selector: "ngx-uik-table",
|
|
4918
|
-
changeDetection: ChangeDetectionStrategy.Eager,
|
|
4919
4914
|
imports: [
|
|
4920
|
-
|
|
4921
|
-
|
|
4922
|
-
|
|
4923
|
-
MatHeaderCellDef,
|
|
4924
|
-
MatHeaderCell,
|
|
4915
|
+
MatTableModule,
|
|
4916
|
+
MatSortModule,
|
|
4917
|
+
MatPaginatorModule,
|
|
4925
4918
|
MatCheckbox,
|
|
4926
|
-
MatCellDef,
|
|
4927
|
-
MatCell,
|
|
4928
|
-
MatSortHeader,
|
|
4929
4919
|
MatIcon,
|
|
4930
4920
|
RouterLink,
|
|
4931
|
-
MatNoDataRow,
|
|
4932
|
-
MatHeaderRowDef,
|
|
4933
|
-
MatHeaderRow,
|
|
4934
|
-
MatRowDef,
|
|
4935
|
-
MatRow,
|
|
4936
4921
|
MatMenuTrigger,
|
|
4937
4922
|
MatMenu,
|
|
4938
4923
|
MatMenuContent,
|
|
4939
4924
|
MatDivider,
|
|
4940
4925
|
MatMenuItem,
|
|
4941
|
-
MatPaginator,
|
|
4942
|
-
MatFooterRowDef,
|
|
4943
|
-
MatFooterRow,
|
|
4944
|
-
MatFooterCellDef,
|
|
4945
|
-
MatFooterCell,
|
|
4946
|
-
MatTableModule,
|
|
4947
4926
|
MatTooltipModule,
|
|
4948
4927
|
MatIconButton
|
|
4949
4928
|
],
|
|
4950
|
-
template: "<div class=\"component-container\">\r\n <div class=\"table-container\">\r\n <table mat-table [dataSource]=\"dataSource\"\r\n matSort\r\n [matSortActive]=\"sortState().sortActive || ''\"\r\n [matSortDirection]=\"sortState().sortDirection\"\r\n matSortDisableClear>\r\n\r\n <!-- Выбор строки Column -->\r\n <ng-container matColumnDef=\"select\">\r\n <th mat-header-cell *matHeaderCellDef>\r\n @if (allowMultiSelect()) {\r\n <mat-checkbox (change)=\"$event ? masterToggle() : null\" [checked]=\"selection.hasValue() && isAllSelected()\"\r\n [indeterminate]=\"selection.hasValue() && !isAllSelected()\">\r\n </mat-checkbox>\r\n }\r\n </th>\r\n <td mat-cell *matCellDef=\"let row\">\r\n <mat-checkbox (click)=\"$event.stopPropagation()\" (change)=\"$event ? selection.toggle(row) : null\"\r\n [checked]=\"selection.isSelected(row)\">\r\n </mat-checkbox>\r\n </td>\r\n @if (footer()) {\r\n <td mat-footer-cell *matFooterCellDef></td>\r\n }\r\n </ng-container>\r\n\r\n @for (item of columnOptions(); track item) {\r\n <ng-container matColumnDef={{item.name}}>\r\n <th mat-header-cell *matHeaderCellDef mat-sort-header [disabled]=\"item.titleSortDisable\">{{item.title}}</th>\r\n @if (!item.format) {\r\n <td mat-cell *matCellDef=\"let element\" (contextmenu)=\"onContextMenu($event, element)\" [matTooltip]=\"item.tooltip ?? ''\">\r\n {{element[item.name]}}\r\n </td>\r\n @if (footer()) {\r\n <td mat-footer-cell *matFooterCellDef>\r\n @if (item.footer) {\r\n <strong>{{ getTotal(item.name) }}</strong>\r\n }\r\n @if (item.footerTitle) {\r\n <strong>{{ item.footerTitle }}</strong>\r\n }\r\n </td>\r\n } \r\n }\r\n @if (item.format === 'pre-wrap') {\r\n <td mat-cell *matCellDef=\"let element\" (contextmenu)=\"onContextMenu($event, element)\" class=\"pre-wrap\" [matTooltip]=\"item.tooltip ?? ''\">\r\n {{element[item.name]}}\r\n </td>\r\n @if (footer()) {\r\n <td mat-footer-cell *matFooterCellDef>\r\n @if (item.footerTitle) {\r\n <strong>{{ item.footerTitle }}</strong>\r\n }\r\n </td>\r\n }\r\n }\r\n @if (item.format === 'link') {\r\n <td mat-cell *matCellDef=\"let element\" (contextmenu)=\"onContextMenu($event, element)\" [matTooltip]=\"item.tooltip ?? ''\">\r\n <a [href]=\"element[item.name]\" target=\"_blank\">{{element[item.name]}}</a>\r\n </td>\r\n @if (footer()) {\r\n <td mat-footer-cell *matFooterCellDef>\r\n @if (item.footerTitle) {\r\n <strong>{{ item.footerTitle }}</strong>\r\n }\r\n </td>\r\n }\r\n }\r\n @if (item.format === 'linkIcon') {\r\n <td mat-cell *matCellDef=\"let element\" (contextmenu)=\"onContextMenu($event, element)\" [matTooltip]=\"item.tooltip ?? ''\">\r\n @if (element[item.name]) {\r\n <a [href]=\"element[item.name]\" target=\"_blank\">\r\n @if (item.icon) {\r\n <mat-icon [class]=\"item.classList ? item.classList : ''\" >{{item.icon}}</mat-icon>\r\n } \r\n @if (item.symbol) {\r\n <span [class]=\"item.classList ? item.classList : ''\" >{{item.symbol}}</span>\r\n }\r\n </a>\r\n }\r\n </td>\r\n @if (footer()) {\r\n <td mat-footer-cell *matFooterCellDef>\r\n @if (item.footerTitle) {\r\n <strong>{{ item.footerTitle }}</strong>\r\n }\r\n </td>\r\n }\r\n }\r\n @if (item.format === 'routerLink') {\r\n <td mat-cell *matCellDef=\"let element\" (contextmenu)=\"onContextMenu($event, element)\" [matTooltip]=\"item.tooltip ?? ''\">\r\n <a [routerLink]=\"[element[item.name]]\">{{element[item.name]}}</a>\r\n </td>\r\n @if (footer()) {\r\n <td mat-footer-cell *matFooterCellDef>\r\n @if (item.footerTitle) {\r\n <strong>{{ item.footerTitle }}</strong>\r\n }\r\n </td>\r\n }\r\n }\r\n @if (item.format === 'routerLinkIcon') {\r\n <td mat-cell *matCellDef=\"let element\" (contextmenu)=\"onContextMenu($event, element)\" [matTooltip]=\"item.tooltip ?? ''\">\r\n @if (element[item.name]) {\r\n <a [routerLink]=\"[element[item.name]]\">\r\n @if (item.icon) {\r\n <mat-icon [class]=\"item.classList ? item.classList : ''\" >{{item.icon}}</mat-icon>\r\n } \r\n @if (item.symbol) {\r\n <span [class]=\"item.classList ? item.classList : ''\" >{{item.symbol}}</span>\r\n }\r\n </a>\r\n }\r\n </td>\r\n @if (footer()) {\r\n <td mat-footer-cell *matFooterCellDef>\r\n @if (item.footerTitle) {\r\n <strong>{{ item.footerTitle }}</strong>\r\n }\r\n </td>\r\n }\r\n }\r\n @if (item.format === 'checkbox') {\r\n <td mat-cell *matCellDef=\"let element\" (contextmenu)=\"onContextMenu($event, element)\" [matTooltip]=\"item.tooltip ?? ''\">\r\n <mat-checkbox [checked]=\"element[item.name] === 1\" [disabled]=\"true\"></mat-checkbox>\r\n </td>\r\n @if (footer()) {\r\n <td mat-footer-cell *matFooterCellDef>\r\n @if (item.footerTitle) {\r\n <strong>{{ item.footerTitle }}</strong>\r\n }\r\n </td>\r\n }\r\n }\r\n @if (item.format === 'icon') {\r\n <td mat-cell *matCellDef=\"let element\" (contextmenu)=\"onContextMenu($event, element)\" [matTooltip]=\"item.tooltip ?? ''\">\r\n @if (item.icon) {\r\n <mat-icon [class]=\"item.classList ? item.classList : ''\" >{{item.icon}}</mat-icon>\r\n } \r\n @if (item.symbol) {\r\n <span [class]=\"item.classList ? item.classList : ''\" >{{item.symbol}}</span>\r\n }\r\n </td>\r\n @if (footer()) {\r\n <td mat-footer-cell *matFooterCellDef>\r\n @if (item.footerTitle) {\r\n <strong>{{ item.footerTitle }}</strong>\r\n }\r\n </td>\r\n }\r\n }\r\n @if (item.format === 'icons') {\r\n <td mat-cell *matCellDef=\"let element\" (contextmenu)=\"onContextMenu($event, element)\">\r\n @if (item.icons) {\r\n <mat-icon [class]=\"item.classList ? item.classList[element[item.name]] : ''\" \r\n [matTooltip]=\"item.tooltips ? item.tooltips[element[item.name]] : ''\">{{item.icons[element[item.name]]}}</mat-icon>\r\n } \r\n @if (item.symbols) {\r\n <span [class]=\"item.classList ? item.classList[element[item.name]] : ''\" >{{item.symbols[element[item.name]]}}</span>\r\n }\r\n </td>\r\n @if (footer()) {\r\n <td mat-footer-cell *matFooterCellDef>\r\n @if (item.footerTitle) {\r\n <strong>{{ item.footerTitle }}</strong>\r\n }\r\n </td>\r\n }\r\n }\r\n @if (item.format === 'actions') {\r\n <td mat-cell *matCellDef=\"let element\" (contextmenu)=\"onContextMenu($event, element)\">\r\n @if (item.actions) {\r\n <div class=\"actions-container\">\r\n @for (action of item.actions; track action) {\r\n @if (!(action.hideFn ? action.hideFn(element) : action.hide)) {\r\n <button mat-icon-button\r\n (click)=\"action.onClickFn ? action.onClickFn(element) : ''\"\r\n (mousedown)=\"action.onClickMiddleFn ? action.onClickMiddleFn($event, element) : ''\"\r\n [disabled]=\"action.disabledFn ? action.disabledFn(element) : action.disabled\"\r\n [matTooltip]=\"action.tooltip ? action.tooltip : ''\" >\r\n @if (action.icon) {\r\n <mat-icon [class]=\"action.classList ? action.classList : ''\" >{{action.icon}}</mat-icon>\r\n }\r\n @if (action.symbol) {\r\n <span [class]=\"action.classList ? action.classList : ''\" >{{action.symbol}}</span>\r\n }\r\n {{ action.title }}\r\n </button>\r\n }\r\n }\r\n </div>\r\n } \r\n </td>\r\n @if (footer()) {\r\n <td mat-footer-cell *matFooterCellDef>\r\n @if (item.footerTitle) {\r\n <strong>{{ item.footerTitle }}</strong>\r\n }\r\n </td>\r\n }\r\n }\r\n @if (item.format === 'image') {\r\n <td mat-cell *matCellDef=\"let element\" (contextmenu)=\"onContextMenu($event, element)\" [matTooltip]=\"item.tooltip ?? ''\">\r\n @if (element[item.name]) {\r\n <img\r\n [src]=\"element[item.name]\"\r\n [alt]=\"item.imageAlt && element[item.imageAlt] ? element[item.imageAlt] : ''\"\r\n [class]=\"item.classList ? item.classList : ''\"\r\n />\r\n } \r\n </td>\r\n @if (footer()) {\r\n <td mat-footer-cell *matFooterCellDef>\r\n @if (item.footerTitle) {\r\n <strong>{{ item.footerTitle }}</strong>\r\n }\r\n </td>\r\n }\r\n }\r\n </ng-container>\r\n }\r\n\r\n <tr class=\"mat-row\" *matNoDataRow>\r\n <td class=\"mat-cell\" colspan=\"9999\">\r\n Нет данных для отображения\r\n </td>\r\n </tr>\r\n\r\n <tr mat-header-row *matHeaderRowDef=\"displayedColumns; sticky: true\"></tr>\r\n <tr mat-row *matRowDef=\"let row; columns: displayedColumns;\" \r\n (click)=\"onRowClicked(row)\" (dblclick)=\"onRowDblClicked(row)\" \r\n class=\"element-row\" [class.selected-row]=\"selection.isSelected(row)\">\r\n </tr>\r\n @if (footer()) {\r\n <tr mat-footer-row *matFooterRowDef=\"displayedColumns; sticky: true\"></tr>\r\n }\r\n </table>\r\n <div style=\"visibility: hidden; position: fixed\"\r\n [style.left]=\"contextMenuPosition.x\"\r\n [style.top]=\"contextMenuPosition.y\"\r\n [matMenuTriggerFor]=\"contextMenu\" #menuTrigger=\"matMenuTrigger\">\r\n </div>\r\n <mat-menu #contextMenu=\"matMenu\">\r\n <ng-template matMenuContent let-id=\"id\">\r\n @for (menuItem of opt(); track menuItem) {\r\n @if (menuItem.title === '-' && !(menuItem.hideFn ? menuItem.hideFn(itemForMenu) : menuItem.hide)) {\r\n <mat-divider></mat-divider>\r\n }\r\n @if (menuItem.title !== '-' && !(menuItem.hideFn ? menuItem.hideFn(itemForMenu) : menuItem.hide)) {\r\n <button mat-menu-item\r\n (click)=\"menuItem.onClickFn ? menuItem.onClickFn(itemForMenu) : ''\"\r\n (mousedown)=\"menuItem.onClickMiddleFn ? menuItem.onClickMiddleFn($event, itemForMenu, menuTrigger) : ''\"\r\n [disabled]=\"menuItem.disabledFn ? menuItem.disabledFn(itemForMenu) : menuItem.disabled\">\r\n @if (menuItem.icon) {\r\n <mat-icon [class]=\"menuItem.classList ? menuItem.classList : ''\">{{menuItem.icon}}</mat-icon>\r\n }\r\n @if (menuItem.symbol) {\r\n <span [class]=\"menuItem.classList ? menuItem.classList : ''\">{{menuItem.symbol}}</span>\r\n }\r\n {{ menuItem.title }}\r\n </button>\r\n }\r\n }\r\n </ng-template>\r\n </mat-menu>\r\n</div>\r\n\r\n\r\n<mat-paginator [length]=\"length()\"\r\n [pageIndex]=\"pageState().pageIndex || defaultPageIndex\"\r\n [pageSizeOptions]=\"[5, 10, 20, 50, 100]\"\r\n [pageSize]=\"pageState().pageSize || defaultPageSize\"\r\n showFirstLastButtons\r\n itemsPerPageLabel=\"\"\r\n></mat-paginator>\r\n</div>\r\n",
|
|
4929
|
+
template: "<div class=\"component-container\">\r\n <div class=\"table-container\">\r\n <table mat-table [dataSource]=\"dataSource\"\r\n matSort\r\n [matSortActive]=\"sortState().sortActive\"\r\n [matSortDirection]=\"sortState().sortDirection\"\r\n (matSortChange)=\"onSortEvent($event)\"\r\n matSortDisableClear>\r\n\r\n <!-- Выбор строки Column -->\r\n <ng-container matColumnDef=\"select\">\r\n <th mat-header-cell *matHeaderCellDef>\r\n @if (allowMultiSelect()) {\r\n <mat-checkbox (change)=\"$event ? masterToggle() : null\" [checked]=\"selection.hasValue() && isAllSelected()\"\r\n [indeterminate]=\"selection.hasValue() && !isAllSelected()\">\r\n </mat-checkbox>\r\n }\r\n </th>\r\n <td mat-cell *matCellDef=\"let row\">\r\n <mat-checkbox (click)=\"$event.stopPropagation()\" (change)=\"$event ? selection.toggle(row) : null\"\r\n [checked]=\"selection.isSelected(row)\">\r\n </mat-checkbox>\r\n </td>\r\n @if (footer()) {\r\n <td mat-footer-cell *matFooterCellDef></td>\r\n }\r\n </ng-container>\r\n\r\n @for (item of columnOptions(); track item) {\r\n <ng-container matColumnDef={{item.name}}>\r\n <th mat-header-cell *matHeaderCellDef mat-sort-header [disabled]=\"item.titleSortDisable\">{{item.title}}</th>\r\n @if (!item.format) {\r\n <td mat-cell *matCellDef=\"let element\" (contextmenu)=\"onContextMenu($event, element)\" [matTooltip]=\"item.tooltip ?? ''\">\r\n {{element[item.name]}}\r\n </td>\r\n @if (footer()) {\r\n <td mat-footer-cell *matFooterCellDef>\r\n @if (item.footer) {\r\n <strong>{{ getTotal(item.name) }}</strong>\r\n }\r\n @if (item.footerTitle) {\r\n <strong>{{ item.footerTitle }}</strong>\r\n }\r\n </td>\r\n } \r\n }\r\n @if (item.format === 'pre-wrap') {\r\n <td mat-cell *matCellDef=\"let element\" (contextmenu)=\"onContextMenu($event, element)\" class=\"pre-wrap\" [matTooltip]=\"item.tooltip ?? ''\">\r\n {{element[item.name]}}\r\n </td>\r\n @if (footer()) {\r\n <td mat-footer-cell *matFooterCellDef>\r\n @if (item.footerTitle) {\r\n <strong>{{ item.footerTitle }}</strong>\r\n }\r\n </td>\r\n }\r\n }\r\n @if (item.format === 'link') {\r\n <td mat-cell *matCellDef=\"let element\" (contextmenu)=\"onContextMenu($event, element)\" [matTooltip]=\"item.tooltip ?? ''\">\r\n <a [href]=\"element[item.name]\" target=\"_blank\">{{element[item.name]}}</a>\r\n </td>\r\n @if (footer()) {\r\n <td mat-footer-cell *matFooterCellDef>\r\n @if (item.footerTitle) {\r\n <strong>{{ item.footerTitle }}</strong>\r\n }\r\n </td>\r\n }\r\n }\r\n @if (item.format === 'linkIcon') {\r\n <td mat-cell *matCellDef=\"let element\" (contextmenu)=\"onContextMenu($event, element)\" [matTooltip]=\"item.tooltip ?? ''\">\r\n @if (element[item.name]) {\r\n <a [href]=\"element[item.name]\" target=\"_blank\">\r\n @if (item.icon) {\r\n <mat-icon [class]=\"item.classList ? item.classList : ''\" >{{item.icon}}</mat-icon>\r\n } \r\n @if (item.symbol) {\r\n <span [class]=\"item.classList ? item.classList : ''\" >{{item.symbol}}</span>\r\n }\r\n </a>\r\n }\r\n </td>\r\n @if (footer()) {\r\n <td mat-footer-cell *matFooterCellDef>\r\n @if (item.footerTitle) {\r\n <strong>{{ item.footerTitle }}</strong>\r\n }\r\n </td>\r\n }\r\n }\r\n @if (item.format === 'routerLink') {\r\n <td mat-cell *matCellDef=\"let element\" (contextmenu)=\"onContextMenu($event, element)\" [matTooltip]=\"item.tooltip ?? ''\">\r\n <a [routerLink]=\"[element[item.name]]\">{{element[item.name]}}</a>\r\n </td>\r\n @if (footer()) {\r\n <td mat-footer-cell *matFooterCellDef>\r\n @if (item.footerTitle) {\r\n <strong>{{ item.footerTitle }}</strong>\r\n }\r\n </td>\r\n }\r\n }\r\n @if (item.format === 'routerLinkIcon') {\r\n <td mat-cell *matCellDef=\"let element\" (contextmenu)=\"onContextMenu($event, element)\" [matTooltip]=\"item.tooltip ?? ''\">\r\n @if (element[item.name]) {\r\n <a [routerLink]=\"[element[item.name]]\">\r\n @if (item.icon) {\r\n <mat-icon [class]=\"item.classList ? item.classList : ''\" >{{item.icon}}</mat-icon>\r\n } \r\n @if (item.symbol) {\r\n <span [class]=\"item.classList ? item.classList : ''\" >{{item.symbol}}</span>\r\n }\r\n </a>\r\n }\r\n </td>\r\n @if (footer()) {\r\n <td mat-footer-cell *matFooterCellDef>\r\n @if (item.footerTitle) {\r\n <strong>{{ item.footerTitle }}</strong>\r\n }\r\n </td>\r\n }\r\n }\r\n @if (item.format === 'checkbox') {\r\n <td mat-cell *matCellDef=\"let element\" (contextmenu)=\"onContextMenu($event, element)\" [matTooltip]=\"item.tooltip ?? ''\">\r\n <mat-checkbox [checked]=\"element[item.name] === 1\" [disabled]=\"true\"></mat-checkbox>\r\n </td>\r\n @if (footer()) {\r\n <td mat-footer-cell *matFooterCellDef>\r\n @if (item.footerTitle) {\r\n <strong>{{ item.footerTitle }}</strong>\r\n }\r\n </td>\r\n }\r\n }\r\n @if (item.format === 'icon') {\r\n <td mat-cell *matCellDef=\"let element\" (contextmenu)=\"onContextMenu($event, element)\" [matTooltip]=\"item.tooltip ?? ''\">\r\n @if (item.icon) {\r\n <mat-icon [class]=\"item.classList ? item.classList : ''\" >{{item.icon}}</mat-icon>\r\n } \r\n @if (item.symbol) {\r\n <span [class]=\"item.classList ? item.classList : ''\" >{{item.symbol}}</span>\r\n }\r\n </td>\r\n @if (footer()) {\r\n <td mat-footer-cell *matFooterCellDef>\r\n @if (item.footerTitle) {\r\n <strong>{{ item.footerTitle }}</strong>\r\n }\r\n </td>\r\n }\r\n }\r\n @if (item.format === 'icons') {\r\n <td mat-cell *matCellDef=\"let element\" (contextmenu)=\"onContextMenu($event, element)\">\r\n @if (item.icons) {\r\n <mat-icon [class]=\"item.classList ? item.classList[element[item.name]] : ''\" \r\n [matTooltip]=\"item.tooltips ? item.tooltips[element[item.name]] : ''\">{{item.icons[element[item.name]]}}</mat-icon>\r\n } \r\n @if (item.symbols) {\r\n <span [class]=\"item.classList ? item.classList[element[item.name]] : ''\" >{{item.symbols[element[item.name]]}}</span>\r\n }\r\n </td>\r\n @if (footer()) {\r\n <td mat-footer-cell *matFooterCellDef>\r\n @if (item.footerTitle) {\r\n <strong>{{ item.footerTitle }}</strong>\r\n }\r\n </td>\r\n }\r\n }\r\n @if (item.format === 'actions') {\r\n <td mat-cell *matCellDef=\"let element\" (contextmenu)=\"onContextMenu($event, element)\">\r\n @if (item.actions) {\r\n <div class=\"actions-container\">\r\n @for (action of item.actions; track action) {\r\n @if (!(action.hideFn ? action.hideFn(element) : action.hide)) {\r\n <button mat-icon-button\r\n (click)=\"action.onClickFn ? action.onClickFn(element) : ''\"\r\n (mousedown)=\"action.onClickMiddleFn ? action.onClickMiddleFn($event, element) : ''\"\r\n [disabled]=\"action.disabledFn ? action.disabledFn(element) : action.disabled\"\r\n [matTooltip]=\"action.tooltip ? action.tooltip : ''\" >\r\n @if (action.icon) {\r\n <mat-icon [class]=\"action.classList ? action.classList : ''\" >{{action.icon}}</mat-icon>\r\n }\r\n @if (action.symbol) {\r\n <span [class]=\"action.classList ? action.classList : ''\" >{{action.symbol}}</span>\r\n }\r\n {{ action.title }}\r\n </button>\r\n }\r\n }\r\n </div>\r\n } \r\n </td>\r\n @if (footer()) {\r\n <td mat-footer-cell *matFooterCellDef>\r\n @if (item.footerTitle) {\r\n <strong>{{ item.footerTitle }}</strong>\r\n }\r\n </td>\r\n }\r\n }\r\n @if (item.format === 'image') {\r\n <td mat-cell *matCellDef=\"let element\" (contextmenu)=\"onContextMenu($event, element)\" [matTooltip]=\"item.tooltip ?? ''\">\r\n @if (element[item.name]) {\r\n <img\r\n [src]=\"element[item.name]\"\r\n [alt]=\"item.imageAlt && element[item.imageAlt] ? element[item.imageAlt] : ''\"\r\n [class]=\"item.classList ? item.classList : ''\"\r\n />\r\n } \r\n </td>\r\n @if (footer()) {\r\n <td mat-footer-cell *matFooterCellDef>\r\n @if (item.footerTitle) {\r\n <strong>{{ item.footerTitle }}</strong>\r\n }\r\n </td>\r\n }\r\n }\r\n </ng-container>\r\n }\r\n\r\n <tr class=\"mat-row\" *matNoDataRow>\r\n <td class=\"mat-cell\" colspan=\"9999\">\r\n Нет данных для отображения\r\n </td>\r\n </tr>\r\n\r\n <tr mat-header-row *matHeaderRowDef=\"displayedColumns; sticky: true\"></tr>\r\n <tr mat-row *matRowDef=\"let row; columns: displayedColumns;\" \r\n (click)=\"onRowClicked(row)\" (dblclick)=\"onRowDblClicked(row)\" \r\n class=\"element-row\" [class.selected-row]=\"selection.isSelected(row)\">\r\n </tr>\r\n @if (footer()) {\r\n <tr mat-footer-row *matFooterRowDef=\"displayedColumns; sticky: true\"></tr>\r\n }\r\n </table>\r\n <div style=\"visibility: hidden; position: fixed\"\r\n [style.left]=\"contextMenuPosition.x\"\r\n [style.top]=\"contextMenuPosition.y\"\r\n [matMenuTriggerFor]=\"contextMenu\" #menuTrigger=\"matMenuTrigger\">\r\n </div>\r\n <mat-menu #contextMenu=\"matMenu\">\r\n <ng-template matMenuContent let-id=\"id\">\r\n @for (menuItem of opt(); track menuItem) {\r\n @if (menuItem.title === '-' && !(menuItem.hideFn ? menuItem.hideFn(itemForMenu) : menuItem.hide)) {\r\n <mat-divider></mat-divider>\r\n }\r\n @if (menuItem.title !== '-' && !(menuItem.hideFn ? menuItem.hideFn(itemForMenu) : menuItem.hide)) {\r\n <button mat-menu-item\r\n (click)=\"menuItem.onClickFn ? menuItem.onClickFn(itemForMenu) : ''\"\r\n (mousedown)=\"menuItem.onClickMiddleFn ? menuItem.onClickMiddleFn($event, itemForMenu, menuTrigger) : ''\"\r\n [disabled]=\"menuItem.disabledFn ? menuItem.disabledFn(itemForMenu) : menuItem.disabled\">\r\n @if (menuItem.icon) {\r\n <mat-icon [class]=\"menuItem.classList ? menuItem.classList : ''\">{{menuItem.icon}}</mat-icon>\r\n }\r\n @if (menuItem.symbol) {\r\n <span [class]=\"menuItem.classList ? menuItem.classList : ''\">{{menuItem.symbol}}</span>\r\n }\r\n {{ menuItem.title }}\r\n </button>\r\n }\r\n }\r\n </ng-template>\r\n </mat-menu>\r\n</div>\r\n\r\n\r\n<mat-paginator [length]=\"length()\"\r\n [pageIndex]=\"pageState().pageIndex || defaultPageIndex\"\r\n [pageSizeOptions]=\"[5, 10, 20, 50, 100]\"\r\n [pageSize]=\"pageState().pageSize || defaultPageSize\"\r\n (page)=\"onPageEvent($event)\"\r\n showFirstLastButtons\r\n itemsPerPageLabel=\"\"\r\n></mat-paginator>\r\n</div>\r\n",
|
|
4951
4930
|
styles: [".component-container{display:flex;flex-direction:column;height:100%}.table-container{display:flex;flex-direction:column;justify-content:space-between;flex:auto;margin:0 20px;overflow:auto;height:400px}.center{position:absolute;inset:0 0 56px;background:#00000026;z-index:1;display:flex;align-items:center;justify-content:center}.mat-column-select{overflow:initial}tr.mat-footer-row{font-weight:700;height:56px}.mat-table{overflow-x:scroll}.mat-cell,.mat-header-cell{word-wrap:initial;display:table-cell;padding:0 10px;line-break:unset;white-space:nowrap;overflow:hidden;vertical-align:middle}.mat-row,.mat-header-row{display:table-row}tr.element-row:not(.selected-row):hover{background:#f5f5f5}tr.element-row:not(.selected-row):active{background:#efefef}.selected-row{background-color:#eee}.fact-done-row{background-color:#eefdec}a,a:visited,a:hover,a:active{color:inherit}.pre-wrap{white-space:pre-wrap}.actions-container{display:flex;column-gap:5px}\n"]
|
|
4952
4931
|
}]
|
|
4953
4932
|
}],
|