@enigmatry/entry-components 20.3.1-preview.1 → 21.1.1
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/README.md +1 -0
- package/fesm2022/enigmatry-entry-components-button.mjs +14 -11
- package/fesm2022/enigmatry-entry-components-button.mjs.map +1 -1
- package/fesm2022/enigmatry-entry-components-common.mjs +31 -31
- package/fesm2022/enigmatry-entry-components-common.mjs.map +1 -1
- package/fesm2022/enigmatry-entry-components-date-time-picker.mjs +20 -20
- package/fesm2022/enigmatry-entry-components-date-time-picker.mjs.map +1 -1
- package/fesm2022/enigmatry-entry-components-dialog.mjs +21 -21
- package/fesm2022/enigmatry-entry-components-dialog.mjs.map +1 -1
- package/fesm2022/enigmatry-entry-components-file-input.mjs +11 -12
- package/fesm2022/enigmatry-entry-components-file-input.mjs.map +1 -1
- package/fesm2022/enigmatry-entry-components-permissions.mjs +10 -10
- package/fesm2022/enigmatry-entry-components-permissions.mjs.map +1 -1
- package/fesm2022/enigmatry-entry-components-search-filter.mjs +33 -33
- package/fesm2022/enigmatry-entry-components-search-filter.mjs.map +1 -1
- package/fesm2022/enigmatry-entry-components-spinner.mjs +22 -13
- package/fesm2022/enigmatry-entry-components-spinner.mjs.map +1 -1
- package/fesm2022/enigmatry-entry-components-table.mjs +224 -322
- package/fesm2022/enigmatry-entry-components-table.mjs.map +1 -1
- package/fesm2022/enigmatry-entry-components-validation.mjs +31 -24
- package/fesm2022/enigmatry-entry-components-validation.mjs.map +1 -1
- package/fesm2022/enigmatry-entry-components.mjs +4 -4
- package/fesm2022/enigmatry-entry-components.mjs.map +1 -1
- package/package.json +25 -24
- package/styles/modules/components/toggle/_generator.scss +1 -1
- package/styles/partials/core/components/forms/_general.scss +1 -0
- package/table/README.md +57 -44
- package/{button/index.d.ts → types/enigmatry-entry-components-button.d.ts} +1 -1
- package/types/enigmatry-entry-components-table.d.ts +256 -0
- package/table/index.d.ts +0 -260
- /package/{common/index.d.ts → types/enigmatry-entry-components-common.d.ts} +0 -0
- /package/{date-time-picker/index.d.ts → types/enigmatry-entry-components-date-time-picker.d.ts} +0 -0
- /package/{dialog/index.d.ts → types/enigmatry-entry-components-dialog.d.ts} +0 -0
- /package/{file-input/index.d.ts → types/enigmatry-entry-components-file-input.d.ts} +0 -0
- /package/{permissions/index.d.ts → types/enigmatry-entry-components-permissions.d.ts} +0 -0
- /package/{search-filter/index.d.ts → types/enigmatry-entry-components-search-filter.d.ts} +0 -0
- /package/{spinner/index.d.ts → types/enigmatry-entry-components-spinner.d.ts} +0 -0
- /package/{validation/index.d.ts → types/enigmatry-entry-components-validation.d.ts} +0 -0
- /package/{index.d.ts → types/enigmatry-entry-components.d.ts} +0 -0
|
@@ -1,29 +1,28 @@
|
|
|
1
|
-
import * as
|
|
1
|
+
import * as i5 from '@angular/material/paginator';
|
|
2
2
|
import { MatPaginatorModule } from '@angular/material/paginator';
|
|
3
3
|
export { PageEvent } from '@angular/material/paginator';
|
|
4
4
|
import * as i0 from '@angular/core';
|
|
5
|
-
import { InjectionToken,
|
|
5
|
+
import { InjectionToken, input, inject, ChangeDetectionStrategy, Component, computed, output, viewChild, ElementRef, signal, linkedSignal, TemplateRef, effect, NgModule } from '@angular/core';
|
|
6
6
|
import { createInjectionToken, provideConfig } from '@enigmatry/entry-components/common';
|
|
7
7
|
import { SelectionModel } from '@angular/cdk/collections';
|
|
8
|
-
import * as
|
|
9
|
-
import { MatTableDataSource, MatTableModule } from '@angular/material/table';
|
|
10
|
-
import * as i1 from '@angular/common';
|
|
11
|
-
import { CommonModule } from '@angular/common';
|
|
12
|
-
import * as i3$1 from '@angular/material/sort';
|
|
13
|
-
import { MatSortModule } from '@angular/material/sort';
|
|
14
|
-
import * as i5 from '@angular/material/checkbox';
|
|
8
|
+
import * as i3$1 from '@angular/material/checkbox';
|
|
15
9
|
import { MatCheckboxModule } from '@angular/material/checkbox';
|
|
16
|
-
import * as
|
|
10
|
+
import * as i4 from '@angular/material/radio';
|
|
17
11
|
import { MatRadioModule } from '@angular/material/radio';
|
|
18
|
-
import * as i2 from '@angular/material/
|
|
12
|
+
import * as i2$1 from '@angular/material/sort';
|
|
13
|
+
import { MatSortModule } from '@angular/material/sort';
|
|
14
|
+
import * as i1$1 from '@angular/material/table';
|
|
15
|
+
import { MatTableDataSource, MatTableModule } from '@angular/material/table';
|
|
16
|
+
import { DatePipe, DecimalPipe, PercentPipe, CurrencyPipe, CommonModule } from '@angular/common';
|
|
17
|
+
import * as i2 from '@angular/material/button';
|
|
18
|
+
import { MatButtonModule } from '@angular/material/button';
|
|
19
|
+
import * as i3 from '@angular/material/icon';
|
|
19
20
|
import { MatIconModule } from '@angular/material/icon';
|
|
20
|
-
import * as
|
|
21
|
+
import * as i1 from '@angular/material/menu';
|
|
21
22
|
import { MatMenuModule } from '@angular/material/menu';
|
|
22
|
-
import * as i4 from '@angular/material/button';
|
|
23
|
-
import { MatButtonModule } from '@angular/material/button';
|
|
24
23
|
import { FormsModule } from '@angular/forms';
|
|
25
24
|
|
|
26
|
-
class
|
|
25
|
+
class EntryTableConfiguration {
|
|
27
26
|
constructor(config = {}) {
|
|
28
27
|
/** Show paginator, default is true */
|
|
29
28
|
this.showPaginator = true;
|
|
@@ -59,9 +58,9 @@ class EntryTableConfig {
|
|
|
59
58
|
* - noResultsText: 'No results found'
|
|
60
59
|
* - rowFocusVisible: false
|
|
61
60
|
*/
|
|
62
|
-
const
|
|
61
|
+
const ENTRY_TABLE_CONFIGURATION = createInjectionToken(new EntryTableConfiguration());
|
|
63
62
|
/** Provide entry table config */
|
|
64
|
-
const
|
|
63
|
+
const provideEntryTableConfiguration = (config) => provideConfig(ENTRY_TABLE_CONFIGURATION, () => new EntryTableConfiguration(config));
|
|
65
64
|
/** Default percentage multiplier injection token */
|
|
66
65
|
const DEFAULT_PERCENTAGE_MULTIPLIER = new InjectionToken('');
|
|
67
66
|
|
|
@@ -71,349 +70,248 @@ class PagedQuery {
|
|
|
71
70
|
constructor() {
|
|
72
71
|
this.pageNumber = defaultPageNumber;
|
|
73
72
|
this.pageSize = defaultPageSize;
|
|
74
|
-
this.
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
this.pageNumber = page.pageIndex + 1;
|
|
85
|
-
this.pageSize = page.pageSize;
|
|
86
|
-
}
|
|
87
|
-
applyRouteChanges(queryParams) {
|
|
88
|
-
this.pageNumber = queryParams['pageNumber'] ? Number(queryParams['pageNumber']) : defaultPageNumber;
|
|
89
|
-
this.pageSize = queryParams['pageSize'] ? Number(queryParams['pageSize']) : this.pageSize;
|
|
90
|
-
this.sortBy = this.getValueIfNotEmpty(queryParams['sortBy'] ?? this.sortBy);
|
|
91
|
-
this.sortDirection = this.getValueIfNotEmpty(queryParams['sortDirection'] ?? this.sortDirection);
|
|
92
|
-
}
|
|
93
|
-
getRouteQueryParams() {
|
|
94
|
-
return {
|
|
95
|
-
pageNumber: this.pageNumber,
|
|
96
|
-
pageSize: this.pageSize,
|
|
97
|
-
sortBy: this.sortBy,
|
|
98
|
-
sortDirection: this.sortDirection
|
|
73
|
+
this.sortChange = (sort) => {
|
|
74
|
+
if (sort.active) {
|
|
75
|
+
this.sortBy = sort.active;
|
|
76
|
+
this.sortDirection = this.getValueIfNotEmpty(sort.direction);
|
|
77
|
+
this.pageNumber = defaultPageNumber;
|
|
78
|
+
}
|
|
79
|
+
};
|
|
80
|
+
this.pageChange = (page) => {
|
|
81
|
+
this.pageNumber = page.pageIndex + 1;
|
|
82
|
+
this.pageSize = page.pageSize;
|
|
99
83
|
};
|
|
84
|
+
this.applyRouteChanges = (queryParams) => {
|
|
85
|
+
this.pageNumber = queryParams['pageNumber'] ? Number(queryParams['pageNumber']) : defaultPageNumber;
|
|
86
|
+
this.pageSize = queryParams['pageSize'] ? Number(queryParams['pageSize']) : this.pageSize;
|
|
87
|
+
this.sortBy = this.getValueIfNotEmpty(queryParams['sortBy'] ?? this.sortBy);
|
|
88
|
+
this.sortDirection = this.getValueIfNotEmpty(queryParams['sortDirection'] ?? this.sortDirection);
|
|
89
|
+
};
|
|
90
|
+
this.getRouteQueryParams = () => {
|
|
91
|
+
return {
|
|
92
|
+
pageNumber: this.pageNumber,
|
|
93
|
+
pageSize: this.pageSize,
|
|
94
|
+
sortBy: this.sortBy,
|
|
95
|
+
sortDirection: this.sortDirection
|
|
96
|
+
};
|
|
97
|
+
};
|
|
98
|
+
this.getValueIfNotEmpty = (value) => value ? value : undefined;
|
|
100
99
|
}
|
|
101
100
|
}
|
|
102
101
|
|
|
103
102
|
class EntryCellFormattedValueComponent {
|
|
104
103
|
constructor() {
|
|
104
|
+
this.value = input(...(ngDevMode ? [undefined, { debugName: "value" }] : /* istanbul ignore next */ []));
|
|
105
|
+
this.type = input(...(ngDevMode ? [undefined, { debugName: "type" }] : /* istanbul ignore next */ []));
|
|
106
|
+
this.typeParameter = input(...(ngDevMode ? [undefined, { debugName: "typeParameter" }] : /* istanbul ignore next */ []));
|
|
105
107
|
this.defaultPercentageMultiplier = inject(DEFAULT_PERCENTAGE_MULTIPLIER);
|
|
106
108
|
}
|
|
107
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
108
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "
|
|
109
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.8", ngImport: i0, type: EntryCellFormattedValueComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
110
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.8", type: EntryCellFormattedValueComponent, isStandalone: true, selector: "entry-cell-formatted-value", inputs: { value: { classPropertyName: "value", publicName: "value", isSignal: true, isRequired: false, transformFunction: null }, type: { classPropertyName: "type", publicName: "type", isSignal: true, isRequired: false, transformFunction: null }, typeParameter: { classPropertyName: "typeParameter", publicName: "typeParameter", isSignal: true, isRequired: false, transformFunction: null } }, ngImport: i0, template: "@switch (type()) {\n @case('boolean'){\n {{value() ? '\\u2713' : ''}}\n }\n @case('number'){\n {{value() | number: typeParameter()?.digitsInfo : typeParameter()?.locale}}\n }\n @case('currency'){\n {{value() | currency: typeParameter()?.currencyCode : typeParameter()?.display : typeParameter()?.digitsInfo :\n typeParameter()?.locale}}\n }\n @case('percent'){\n {{+(value() ?? 0) * (typeParameter()?.multiplier ?? defaultPercentageMultiplier) | percent: typeParameter()?.digitsInfo : typeParameter()?.locale}}\n }\n @case('date'){\n {{value() | date: typeParameter()?.format : typeParameter()?.timezone : typeParameter()?.locale}}\n }\n @case('link'){\n <a [href]=\"value()\" target=\"_blank\">{{value()}}</a>\n }\n @default{\n {{value()}}\n }\n}", dependencies: [{ kind: "pipe", type: DatePipe, name: "date" }, { kind: "pipe", type: DecimalPipe, name: "number" }, { kind: "pipe", type: PercentPipe, name: "percent" }, { kind: "pipe", type: CurrencyPipe, name: "currency" }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
109
111
|
}
|
|
110
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
112
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.8", ngImport: i0, type: EntryCellFormattedValueComponent, decorators: [{
|
|
111
113
|
type: Component,
|
|
112
|
-
args: [{ selector: 'entry-cell-formatted-value', changeDetection: ChangeDetectionStrategy.OnPush,
|
|
113
|
-
}], propDecorators: { value: [{
|
|
114
|
-
type: Input
|
|
115
|
-
}], type: [{
|
|
116
|
-
type: Input
|
|
117
|
-
}], typeParameter: [{
|
|
118
|
-
type: Input
|
|
119
|
-
}] } });
|
|
114
|
+
args: [{ imports: [DatePipe, DecimalPipe, PercentPipe, CurrencyPipe], selector: 'entry-cell-formatted-value', changeDetection: ChangeDetectionStrategy.OnPush, template: "@switch (type()) {\n @case('boolean'){\n {{value() ? '\\u2713' : ''}}\n }\n @case('number'){\n {{value() | number: typeParameter()?.digitsInfo : typeParameter()?.locale}}\n }\n @case('currency'){\n {{value() | currency: typeParameter()?.currencyCode : typeParameter()?.display : typeParameter()?.digitsInfo :\n typeParameter()?.locale}}\n }\n @case('percent'){\n {{+(value() ?? 0) * (typeParameter()?.multiplier ?? defaultPercentageMultiplier) | percent: typeParameter()?.digitsInfo : typeParameter()?.locale}}\n }\n @case('date'){\n {{value() | date: typeParameter()?.format : typeParameter()?.timezone : typeParameter()?.locale}}\n }\n @case('link'){\n <a [href]=\"value()\" target=\"_blank\">{{value()}}</a>\n }\n @default{\n {{value()}}\n }\n}" }]
|
|
115
|
+
}], propDecorators: { value: [{ type: i0.Input, args: [{ isSignal: true, alias: "value", required: false }] }], type: [{ type: i0.Input, args: [{ isSignal: true, alias: "type", required: false }] }], typeParameter: [{ type: i0.Input, args: [{ isSignal: true, alias: "typeParameter", required: false }] }] } });
|
|
120
116
|
|
|
121
117
|
class EntryCellComponent {
|
|
122
118
|
constructor() {
|
|
123
|
-
this.
|
|
124
|
-
|
|
119
|
+
this.rowData = input.required(...(ngDevMode ? [{ debugName: "rowData" }] : /* istanbul ignore next */ []));
|
|
120
|
+
this.columnDefinition = input.required(...(ngDevMode ? [{ debugName: "columnDefinition" }] : /* istanbul ignore next */ []));
|
|
121
|
+
this.value = computed(() => this.getCellValue(this.rowData(), this.columnDefinition()), ...(ngDevMode ? [{ debugName: "value" }] : /* istanbul ignore next */ []));
|
|
122
|
+
this.printableValue = computed(() => this.value() ?? '', ...(ngDevMode ? [{ debugName: "printableValue" }] : /* istanbul ignore next */ []));
|
|
123
|
+
this.getCellValue = (rowData, columnDefinition) => {
|
|
124
|
+
const keys = columnDefinition.field ? columnDefinition.field.split('.') : [];
|
|
125
125
|
return keys.reduce((data, key) => data && data[key], rowData);
|
|
126
126
|
};
|
|
127
127
|
}
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
}
|
|
131
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.10", ngImport: i0, type: EntryCellComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
132
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "20.3.10", type: EntryCellComponent, isStandalone: false, selector: "entry-cell", inputs: { rowData: "rowData", colDef: "colDef" }, ngImport: i0, template: "<entry-cell-formatted-value [value]=\"value\" [type]=\"colDef.type!\" [typeParameter]=\"colDef.typeParameter\"></entry-cell-formatted-value>", dependencies: [{ kind: "component", type: EntryCellFormattedValueComponent, selector: "entry-cell-formatted-value", inputs: ["value", "type", "typeParameter"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
128
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.8", ngImport: i0, type: EntryCellComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
129
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "21.2.8", type: EntryCellComponent, isStandalone: true, selector: "entry-cell", inputs: { rowData: { classPropertyName: "rowData", publicName: "rowData", isSignal: true, isRequired: true, transformFunction: null }, columnDefinition: { classPropertyName: "columnDefinition", publicName: "columnDefinition", isSignal: true, isRequired: true, transformFunction: null } }, ngImport: i0, template: "<entry-cell-formatted-value [value]=\"printableValue()\" [type]=\"columnDefinition().type!\"\n [typeParameter]=\"columnDefinition().typeParameter\"></entry-cell-formatted-value>", dependencies: [{ kind: "component", type: EntryCellFormattedValueComponent, selector: "entry-cell-formatted-value", inputs: ["value", "type", "typeParameter"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
133
130
|
}
|
|
134
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
131
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.8", ngImport: i0, type: EntryCellComponent, decorators: [{
|
|
135
132
|
type: Component,
|
|
136
|
-
args: [{ selector: 'entry-cell', changeDetection: ChangeDetectionStrategy.OnPush,
|
|
137
|
-
}], propDecorators: { rowData: [{
|
|
138
|
-
type: Input
|
|
139
|
-
}], colDef: [{
|
|
140
|
-
type: Input
|
|
141
|
-
}] } });
|
|
133
|
+
args: [{ imports: [EntryCellFormattedValueComponent], selector: 'entry-cell', changeDetection: ChangeDetectionStrategy.OnPush, template: "<entry-cell-formatted-value [value]=\"printableValue()\" [type]=\"columnDefinition().type!\"\n [typeParameter]=\"columnDefinition().typeParameter\"></entry-cell-formatted-value>" }]
|
|
134
|
+
}], propDecorators: { rowData: [{ type: i0.Input, args: [{ isSignal: true, alias: "rowData", required: true }] }], columnDefinition: [{ type: i0.Input, args: [{ isSignal: true, alias: "columnDefinition", required: true }] }] } });
|
|
142
135
|
|
|
143
136
|
class EntryCellContextMenuComponent {
|
|
144
137
|
constructor() {
|
|
145
|
-
this.items = [];
|
|
146
|
-
this.
|
|
147
|
-
this.
|
|
148
|
-
this.
|
|
149
|
-
this.
|
|
138
|
+
this.items = input.required(...(ngDevMode ? [{ debugName: "items" }] : /* istanbul ignore next */ []));
|
|
139
|
+
this.rowMenuFormatter = input(...(ngDevMode ? [undefined, { debugName: "rowMenuFormatter" }] : /* istanbul ignore next */ []));
|
|
140
|
+
this.rowData = input(...(ngDevMode ? [undefined, { debugName: "rowData" }] : /* istanbul ignore next */ []));
|
|
141
|
+
this.triggerIcon = input('more_vert', ...(ngDevMode ? [{ debugName: "triggerIcon" }] : /* istanbul ignore next */ []));
|
|
142
|
+
this.isSubMenu = input(false, ...(ngDevMode ? [{ debugName: "isSubMenu" }] : /* istanbul ignore next */ []));
|
|
143
|
+
this.selected = output();
|
|
144
|
+
this.menuItems = computed(() => (this.rowMenuFormatter()?.items
|
|
145
|
+
? this.rowMenuFormatter()?.items(this.rowData)
|
|
146
|
+
: this.items()) ?? [], ...(ngDevMode ? [{ debugName: "menuItems" }] : /* istanbul ignore next */ []));
|
|
147
|
+
this.menu = viewChild('menu', ...(ngDevMode ? [{ debugName: "menu" }] : /* istanbul ignore next */ []));
|
|
148
|
+
this.subMenu = viewChild('subMenu', ...(ngDevMode ? [{ debugName: "subMenu" }] : /* istanbul ignore next */ []));
|
|
150
149
|
}
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
? this.rowMenuFormatter.items(this.rowData)
|
|
154
|
-
: this.items;
|
|
155
|
-
}
|
|
156
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.10", ngImport: i0, type: EntryCellContextMenuComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
157
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "20.3.10", type: EntryCellContextMenuComponent, isStandalone: false, selector: "entry-cell-context-menu", inputs: { items: "items", rowMenuFormatter: "rowMenuFormatter", rowData: "rowData", triggerIcon: "triggerIcon", isSubMenu: "isSubMenu" }, outputs: { selected: "selected" }, viewQueries: [{ propertyName: "menu", first: true, predicate: ["menu"], descendants: true, static: true }], ngImport: i0, template: "<button *ngIf=\"!isSubMenu\" mat-icon-button [matMenuTriggerFor]=\"menu\" (click)=\"$event.stopPropagation()\">\n <mat-icon>{{triggerIcon}}</mat-icon>\n</button>\n<mat-menu #menu=\"matMenu\" class=\"entry-table-menu\" role=\"menu\">\n <ng-container *ngFor=\"let item of menuItems\">\n <ng-container\n *ngIf=\"item.items?.length; then menuSubItems; else menuItem\">\n </ng-container>\n\n <ng-template #menuSubItems>\n <button mat-menu-item [disabled]=\"item.disabled\" [matMenuTriggerFor]=\"subMenu.menu\"\n class=\"context-menu-item\">\n <mat-icon class=\"icon\" *ngIf=\"item.icon\">{{item.icon}}</mat-icon>\n <span class=\"description\">{{item.name}}</span>\n <entry-cell-context-menu #subMenu [items]=\"item.items ?? []\" [rowData]=\"rowData\" [isSubMenu]=\"true\"\n (selected)=\"selected.emit($event)\">\n </entry-cell-context-menu>\n </button>\n </ng-template>\n\n <ng-template #menuItem>\n <button mat-menu-item [disabled]=\"item.disabled\" (click)=\"selected.emit(item.id)\" class=\"context-menu-item\">\n <mat-icon class=\"icon\" *ngIf=\"item.icon\">{{item.icon}}</mat-icon>\n <span class=\"description\">{{item.name}}</span>\n </button>\n </ng-template>\n </ng-container>\n</mat-menu>", dependencies: [{ kind: "directive", type: i1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: i2.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "component", type: i3.MatMenu, selector: "mat-menu", inputs: ["backdropClass", "aria-label", "aria-labelledby", "aria-describedby", "xPosition", "yPosition", "overlapTrigger", "hasBackdrop", "class", "classList"], outputs: ["closed", "close"], exportAs: ["matMenu"] }, { kind: "component", type: i3.MatMenuItem, selector: "[mat-menu-item]", inputs: ["role", "disabled", "disableRipple"], exportAs: ["matMenuItem"] }, { kind: "directive", type: i3.MatMenuTrigger, selector: "[mat-menu-trigger-for], [matMenuTriggerFor]", inputs: ["mat-menu-trigger-for", "matMenuTriggerFor", "matMenuTriggerData", "matMenuTriggerRestoreFocus"], outputs: ["menuOpened", "onMenuOpen", "menuClosed", "onMenuClose"], exportAs: ["matMenuTrigger"] }, { kind: "component", type: i4.MatIconButton, selector: "button[mat-icon-button], a[mat-icon-button], button[matIconButton], a[matIconButton]", exportAs: ["matButton", "matAnchor"] }, { kind: "component", type: EntryCellContextMenuComponent, selector: "entry-cell-context-menu", inputs: ["items", "rowMenuFormatter", "rowData", "triggerIcon", "isSubMenu"], outputs: ["selected"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
150
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.8", ngImport: i0, type: EntryCellContextMenuComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
151
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.8", type: EntryCellContextMenuComponent, isStandalone: true, selector: "entry-cell-context-menu", inputs: { items: { classPropertyName: "items", publicName: "items", isSignal: true, isRequired: true, transformFunction: null }, rowMenuFormatter: { classPropertyName: "rowMenuFormatter", publicName: "rowMenuFormatter", isSignal: true, isRequired: false, transformFunction: null }, rowData: { classPropertyName: "rowData", publicName: "rowData", isSignal: true, isRequired: false, transformFunction: null }, triggerIcon: { classPropertyName: "triggerIcon", publicName: "triggerIcon", isSignal: true, isRequired: false, transformFunction: null }, isSubMenu: { classPropertyName: "isSubMenu", publicName: "isSubMenu", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { selected: "selected" }, viewQueries: [{ propertyName: "menu", first: true, predicate: ["menu"], descendants: true, isSignal: true }, { propertyName: "subMenu", first: true, predicate: ["subMenu"], descendants: true, isSignal: true }], ngImport: i0, template: "@if(!isSubMenu())\n{\n <button mat-icon-button [matMenuTriggerFor]=\"menu\" (click)=\"$event.stopPropagation()\">\n <mat-icon>{{triggerIcon()}}</mat-icon>\n </button>\n}\n\n<mat-menu #menu=\"matMenu\" class=\"entry-table-menu\" role=\"menu\">\n @for(menuItem of menuItems(); track menuItem.id)\n {\n <button mat-menu-item [disabled]=\"menuItem.disabled\"\n [matMenuTriggerFor]=\"menuItem.items?.length ? (subMenu()?.menu() ?? null) : null\"\n (click)=\"!menuItem.items?.length && selected.emit(menuItem.id)\" class=\"context-menu-item\">\n\n @if(menuItem.icon)\n {\n <mat-icon class=\"icon\">{{menuItem.icon}}</mat-icon>\n }\n\n <span class=\"description\">{{menuItem.name}}</span>\n\n @if(menuItem.items?.length)\n {\n <entry-cell-context-menu #subMenu [items]=\"menuItem.items ?? []\" [rowData]=\"rowData()\" [isSubMenu]=\"true\"\n (selected)=\"selected.emit($event)\">\n </entry-cell-context-menu>\n }\n </button>\n }\n</mat-menu>", dependencies: [{ kind: "component", type: EntryCellContextMenuComponent, selector: "entry-cell-context-menu", inputs: ["items", "rowMenuFormatter", "rowData", "triggerIcon", "isSubMenu"], outputs: ["selected"] }, { kind: "ngmodule", type: MatMenuModule }, { kind: "component", type: i1.MatMenu, selector: "mat-menu", inputs: ["backdropClass", "aria-label", "aria-labelledby", "aria-describedby", "xPosition", "yPosition", "overlapTrigger", "hasBackdrop", "class", "classList"], outputs: ["closed", "close"], exportAs: ["matMenu"] }, { kind: "component", type: i1.MatMenuItem, selector: "[mat-menu-item]", inputs: ["role", "disabled", "disableRipple"], exportAs: ["matMenuItem"] }, { kind: "directive", type: i1.MatMenuTrigger, selector: "[mat-menu-trigger-for], [matMenuTriggerFor]", inputs: ["mat-menu-trigger-for", "matMenuTriggerFor", "matMenuTriggerData", "matMenuTriggerRestoreFocus"], outputs: ["menuOpened", "onMenuOpen", "menuClosed", "onMenuClose"], exportAs: ["matMenuTrigger"] }, { kind: "ngmodule", type: MatButtonModule }, { kind: "component", type: i2.MatIconButton, selector: "button[mat-icon-button], a[mat-icon-button], button[matIconButton], a[matIconButton]", exportAs: ["matButton", "matAnchor"] }, { kind: "ngmodule", type: MatIconModule }, { kind: "component", type: i3.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
158
152
|
}
|
|
159
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
153
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.8", ngImport: i0, type: EntryCellContextMenuComponent, decorators: [{
|
|
160
154
|
type: Component,
|
|
161
|
-
args: [{ selector: 'entry-cell-context-menu', changeDetection: ChangeDetectionStrategy.OnPush,
|
|
162
|
-
}], propDecorators: { items: [{
|
|
163
|
-
type: Input
|
|
164
|
-
}], rowMenuFormatter: [{
|
|
165
|
-
type: Input
|
|
166
|
-
}], rowData: [{
|
|
167
|
-
type: Input
|
|
168
|
-
}], triggerIcon: [{
|
|
169
|
-
type: Input
|
|
170
|
-
}], isSubMenu: [{
|
|
171
|
-
type: Input
|
|
172
|
-
}], selected: [{
|
|
173
|
-
type: Output
|
|
174
|
-
}], menu: [{
|
|
175
|
-
type: ViewChild,
|
|
176
|
-
args: ['menu', { static: true }]
|
|
177
|
-
}] } });
|
|
155
|
+
args: [{ selector: 'entry-cell-context-menu', imports: [MatMenuModule, MatButtonModule, MatIconModule, EntryCellContextMenuComponent], changeDetection: ChangeDetectionStrategy.OnPush, template: "@if(!isSubMenu())\n{\n <button mat-icon-button [matMenuTriggerFor]=\"menu\" (click)=\"$event.stopPropagation()\">\n <mat-icon>{{triggerIcon()}}</mat-icon>\n </button>\n}\n\n<mat-menu #menu=\"matMenu\" class=\"entry-table-menu\" role=\"menu\">\n @for(menuItem of menuItems(); track menuItem.id)\n {\n <button mat-menu-item [disabled]=\"menuItem.disabled\"\n [matMenuTriggerFor]=\"menuItem.items?.length ? (subMenu()?.menu() ?? null) : null\"\n (click)=\"!menuItem.items?.length && selected.emit(menuItem.id)\" class=\"context-menu-item\">\n\n @if(menuItem.icon)\n {\n <mat-icon class=\"icon\">{{menuItem.icon}}</mat-icon>\n }\n\n <span class=\"description\">{{menuItem.name}}</span>\n\n @if(menuItem.items?.length)\n {\n <entry-cell-context-menu #subMenu [items]=\"menuItem.items ?? []\" [rowData]=\"rowData()\" [isSubMenu]=\"true\"\n (selected)=\"selected.emit($event)\">\n </entry-cell-context-menu>\n }\n </button>\n }\n</mat-menu>" }]
|
|
156
|
+
}], propDecorators: { items: [{ type: i0.Input, args: [{ isSignal: true, alias: "items", required: true }] }], rowMenuFormatter: [{ type: i0.Input, args: [{ isSignal: true, alias: "rowMenuFormatter", required: false }] }], rowData: [{ type: i0.Input, args: [{ isSignal: true, alias: "rowData", required: false }] }], triggerIcon: [{ type: i0.Input, args: [{ isSignal: true, alias: "triggerIcon", required: false }] }], isSubMenu: [{ type: i0.Input, args: [{ isSignal: true, alias: "isSubMenu", required: false }] }], selected: [{ type: i0.Output, args: ["selected"] }], menu: [{ type: i0.ViewChild, args: ['menu', { isSignal: true }] }], subMenu: [{ type: i0.ViewChild, args: ['subMenu', { isSignal: true }] }] } });
|
|
178
157
|
|
|
179
158
|
/* eslint-disable max-lines */
|
|
180
159
|
class EntryTableComponent {
|
|
181
160
|
constructor() {
|
|
182
|
-
this.
|
|
183
|
-
this.
|
|
184
|
-
this._elementRef = inject((ElementRef));
|
|
185
|
-
this._changeDetectorRef = inject(ChangeDetectorRef);
|
|
161
|
+
this.configuration = inject(ENTRY_TABLE_CONFIGURATION);
|
|
162
|
+
this.elementRef = inject((ElementRef));
|
|
186
163
|
this.dataSource = new MatTableDataSource([]);
|
|
187
|
-
this.
|
|
164
|
+
this.selectionColumn = 'selection-column';
|
|
165
|
+
this.contextMenuColumn = 'context-menu-column';
|
|
166
|
+
this.columns = input([], ...(ngDevMode ? [{ debugName: "columns" }] : /* istanbul ignore next */ []));
|
|
167
|
+
this.displayedColumns = computed(() => {
|
|
168
|
+
const result = this.columns().filter(item => !item.hide)
|
|
169
|
+
.map(item => item.field);
|
|
170
|
+
if (this.rowSelectable() && !result.includes(this.selectionColumn)) {
|
|
171
|
+
result.unshift(this.selectionColumn);
|
|
172
|
+
}
|
|
173
|
+
if (this.showContextMenu() && !result.includes(this.contextMenuColumn)) {
|
|
174
|
+
result.push(this.contextMenuColumn);
|
|
175
|
+
}
|
|
176
|
+
return result;
|
|
177
|
+
}, ...(ngDevMode ? [{ debugName: "displayedColumns" }] : /* istanbul ignore next */ []));
|
|
188
178
|
// Data
|
|
189
|
-
this.
|
|
190
|
-
this.
|
|
191
|
-
this.total = 0;
|
|
192
|
-
this.loading = false;
|
|
193
|
-
|
|
194
|
-
this.
|
|
195
|
-
this.
|
|
196
|
-
this.
|
|
197
|
-
this.
|
|
198
|
-
this.
|
|
199
|
-
this.
|
|
179
|
+
this.data = input([], ...(ngDevMode ? [{ debugName: "data" }] : /* istanbul ignore next */ []));
|
|
180
|
+
this.trueData = signal(([]), ...(ngDevMode ? [{ debugName: "trueData" }] : /* istanbul ignore next */ []));
|
|
181
|
+
this.total = linkedSignal(() => 0, ...(ngDevMode ? [{ debugName: "total" }] : /* istanbul ignore next */ []));
|
|
182
|
+
this.loading = input(false, ...(ngDevMode ? [{ debugName: "loading" }] : /* istanbul ignore next */ []));
|
|
183
|
+
// Pagination
|
|
184
|
+
this.showPaginator = input(this.configuration.showPaginator, ...(ngDevMode ? [{ debugName: "showPaginator" }] : /* istanbul ignore next */ []));
|
|
185
|
+
this.pageDisabled = input(this.configuration.showFirstLastButtons, ...(ngDevMode ? [{ debugName: "pageDisabled" }] : /* istanbul ignore next */ []));
|
|
186
|
+
this.showFirstLastButtons = input(false, ...(ngDevMode ? [{ debugName: "showFirstLastButtons" }] : /* istanbul ignore next */ []));
|
|
187
|
+
this.pageIndex = linkedSignal(() => 0, ...(ngDevMode ? [{ debugName: "pageIndex" }] : /* istanbul ignore next */ []));
|
|
188
|
+
this.pageSize = linkedSignal(() => 0, ...(ngDevMode ? [{ debugName: "pageSize" }] : /* istanbul ignore next */ []));
|
|
189
|
+
this.pageSizeOptions = input(this.configuration.pageSizeOptions, ...(ngDevMode ? [{ debugName: "pageSizeOptions" }] : /* istanbul ignore next */ []));
|
|
190
|
+
this.hidePageSize = input(this.configuration.hidePageSize, ...(ngDevMode ? [{ debugName: "hidePageSize" }] : /* istanbul ignore next */ []));
|
|
191
|
+
this.paginationTemplate = input(...(ngDevMode ? [undefined, { debugName: "paginationTemplate" }] : /* istanbul ignore next */ []));
|
|
192
|
+
this.shouldShowPaginator = computed(() => {
|
|
193
|
+
return this.showPaginator() && this.trueData()?.length;
|
|
194
|
+
}, ...(ngDevMode ? [{ debugName: "shouldShowPaginator" }] : /* istanbul ignore next */ []));
|
|
195
|
+
this.pageChange = output();
|
|
196
|
+
// Sort
|
|
197
|
+
this.sortActive = input(...(ngDevMode ? [undefined, { debugName: "sortActive" }] : /* istanbul ignore next */ []));
|
|
198
|
+
this.sortDirection = input(...(ngDevMode ? [undefined, { debugName: "sortDirection" }] : /* istanbul ignore next */ []));
|
|
199
|
+
this.sortDisableClear = input(false, ...(ngDevMode ? [{ debugName: "sortDisableClear" }] : /* istanbul ignore next */ []));
|
|
200
|
+
this.sortDisabled = input(false, ...(ngDevMode ? [{ debugName: "sortDisabled" }] : /* istanbul ignore next */ []));
|
|
201
|
+
this.sortStart = input('asc', ...(ngDevMode ? [{ debugName: "sortStart" }] : /* istanbul ignore next */ []));
|
|
202
|
+
this.sortChange = output();
|
|
200
203
|
// Row
|
|
201
|
-
this.rowHover = false;
|
|
202
|
-
this.rowStriped = false;
|
|
203
|
-
this.
|
|
204
|
+
this.rowHover = input(false, ...(ngDevMode ? [{ debugName: "rowHover" }] : /* istanbul ignore next */ []));
|
|
205
|
+
this.rowStriped = input(false, ...(ngDevMode ? [{ debugName: "rowStriped" }] : /* istanbul ignore next */ []));
|
|
206
|
+
this.rowFocusVisible = input(this.configuration.rowFocusVisible, ...(ngDevMode ? [{ debugName: "rowFocusVisible" }] : /* istanbul ignore next */ []));
|
|
207
|
+
this.rowClick = output();
|
|
204
208
|
// Row selection
|
|
205
|
-
this.multiSelectable = true;
|
|
206
|
-
this.rowSelection =
|
|
207
|
-
|
|
208
|
-
this.
|
|
209
|
-
this.
|
|
210
|
-
this.
|
|
211
|
-
this.
|
|
209
|
+
this.multiSelectable = input(true, ...(ngDevMode ? [{ debugName: "multiSelectable" }] : /* istanbul ignore next */ []));
|
|
210
|
+
this.rowSelection = linkedSignal(() => this.rowSelectable() ?
|
|
211
|
+
new SelectionModel(this.multiSelectable(), this.rowSelected()) : new SelectionModel(true, []), ...(ngDevMode ? [{ debugName: "rowSelection" }] : /* istanbul ignore next */ []));
|
|
212
|
+
this.rowSelected = input([], ...(ngDevMode ? [{ debugName: "rowSelected" }] : /* istanbul ignore next */ []));
|
|
213
|
+
this.rowSelectable = input(false, ...(ngDevMode ? [{ debugName: "rowSelectable" }] : /* istanbul ignore next */ []));
|
|
214
|
+
this.showSelectAllCheckbox = input(true, ...(ngDevMode ? [{ debugName: "showSelectAllCheckbox" }] : /* istanbul ignore next */ []));
|
|
215
|
+
this.rowSelectionFormatter = input({}, ...(ngDevMode ? [{ debugName: "rowSelectionFormatter" }] : /* istanbul ignore next */ []));
|
|
216
|
+
this.rowClassFormatter = input(...(ngDevMode ? [undefined, { debugName: "rowClassFormatter" }] : /* istanbul ignore next */ []));
|
|
212
217
|
// Context menu
|
|
213
|
-
this.showContextMenu = false;
|
|
214
|
-
this.contextMenuItems = [];
|
|
215
|
-
this.
|
|
216
|
-
this.
|
|
217
|
-
this.
|
|
218
|
+
this.showContextMenu = input(false, ...(ngDevMode ? [{ debugName: "showContextMenu" }] : /* istanbul ignore next */ []));
|
|
219
|
+
this.contextMenuItems = input([], ...(ngDevMode ? [{ debugName: "contextMenuItems" }] : /* istanbul ignore next */ []));
|
|
220
|
+
this.contextMenuTemplate = input(null, ...(ngDevMode ? [{ debugName: "contextMenuTemplate" }] : /* istanbul ignore next */ []));
|
|
221
|
+
this.rowContextMenuFormatter = input(...(ngDevMode ? [undefined, { debugName: "rowContextMenuFormatter" }] : /* istanbul ignore next */ []));
|
|
222
|
+
this.contextMenuItemSelected = output();
|
|
223
|
+
// No Result
|
|
224
|
+
this.noResultText = input(this.configuration.noResultsText, ...(ngDevMode ? [{ debugName: "noResultText" }] : /* istanbul ignore next */ []));
|
|
225
|
+
this.noResultTemplate = input(null, ...(ngDevMode ? [{ debugName: "noResultTemplate" }] : /* istanbul ignore next */ []));
|
|
226
|
+
this.hasNoResult = computed(() => !this.trueData()?.length && !this.loading(), ...(ngDevMode ? [{ debugName: "hasNoResult" }] : /* istanbul ignore next */ []));
|
|
227
|
+
this.headerTemplate = input(...(ngDevMode ? [undefined, { debugName: "headerTemplate" }] : /* istanbul ignore next */ []));
|
|
228
|
+
this.unknownTemplateAsTemplate = (template) => template;
|
|
229
|
+
this.cellTemplate = input(...(ngDevMode ? [undefined, { debugName: "cellTemplate" }] : /* istanbul ignore next */ []));
|
|
218
230
|
this.toTemplateIndex = (template, key) => template[key];
|
|
219
|
-
this.isTemplateRef = (
|
|
220
|
-
this.
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
}
|
|
232
|
-
if (this.showContextMenu && !this.displayedColumns.includes(this.contextMenuColumn)) {
|
|
233
|
-
this.displayedColumns.push(this.contextMenuColumn);
|
|
231
|
+
this.isTemplateRef = (value) => value instanceof TemplateRef;
|
|
232
|
+
this.getRowClassList = (rowData, index) => {
|
|
233
|
+
const classList = {
|
|
234
|
+
selected: this.rowSelection().isSelected(rowData),
|
|
235
|
+
// eslint-disable-next-line @typescript-eslint/no-magic-numbers
|
|
236
|
+
'mat-row-odd': index % 2
|
|
237
|
+
};
|
|
238
|
+
const rowFormatter = this.rowClassFormatter();
|
|
239
|
+
if (rowFormatter) {
|
|
240
|
+
Object.keys(rowFormatter).forEach(key => {
|
|
241
|
+
classList[key] = rowFormatter[key](rowData);
|
|
242
|
+
});
|
|
234
243
|
}
|
|
235
|
-
|
|
236
|
-
|
|
244
|
+
return classList;
|
|
245
|
+
};
|
|
246
|
+
this.getColumnClassList = (columnDefinition) => {
|
|
247
|
+
const customClasses = columnDefinition.class ?? '';
|
|
248
|
+
const columnType = columnDefinition.type ?? '';
|
|
249
|
+
const columnField = `cell-${this.convertToKebabCase(columnDefinition.field)}`;
|
|
250
|
+
return `${customClasses} ${columnType} ${columnField}`;
|
|
251
|
+
};
|
|
252
|
+
this.getIndex = (index, dataIndex) => typeof index === 'undefined' ? dataIndex : index;
|
|
253
|
+
this.allRowsSelected = () => {
|
|
254
|
+
const selectedCount = this.rowSelection().selected.length;
|
|
255
|
+
const rowCount = this.dataSource.data.filter(row => !this.rowSelectionFormatter().disabled?.(row)).length;
|
|
256
|
+
return selectedCount === rowCount;
|
|
257
|
+
};
|
|
258
|
+
this.toggleSelectAllCheckbox = () => {
|
|
259
|
+
if (this.allRowsSelected()) {
|
|
260
|
+
this.rowSelection().clear();
|
|
237
261
|
}
|
|
238
|
-
|
|
239
|
-
this.data
|
|
262
|
+
else {
|
|
263
|
+
this.dataSource.data.forEach(row => {
|
|
264
|
+
if (!this.rowSelectionFormatter().disabled?.(row)) {
|
|
265
|
+
this.rowSelection().select(row);
|
|
266
|
+
}
|
|
267
|
+
});
|
|
240
268
|
}
|
|
269
|
+
this.rowSelection.set(this.rowSelection());
|
|
241
270
|
};
|
|
242
|
-
this.
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
return (!this.data || this._data.length === 0) && !this.loading;
|
|
246
|
-
}
|
|
247
|
-
detectChanges() {
|
|
248
|
-
this._changeDetectorRef.detectChanges();
|
|
249
|
-
}
|
|
250
|
-
getRowClassList(rowData, index) {
|
|
251
|
-
const classList = {
|
|
252
|
-
selected: this.rowSelection.isSelected(rowData),
|
|
253
|
-
// eslint-disable-next-line @typescript-eslint/no-magic-numbers
|
|
254
|
-
'mat-row-odd': index % 2
|
|
271
|
+
this.toggleRowSelection = (row) => {
|
|
272
|
+
this.rowSelection().toggle(row);
|
|
273
|
+
this.rowSelection.set(this.rowSelection());
|
|
255
274
|
};
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
this.dataSource.disconnect();
|
|
283
|
-
}
|
|
284
|
-
this.dataSource = new MatTableDataSource(this._data);
|
|
285
|
-
if (changes['data']) {
|
|
286
|
-
this.scrollToTop();
|
|
287
|
-
}
|
|
288
|
-
}
|
|
289
|
-
isAllSelected() {
|
|
290
|
-
const numSelected = this.rowSelection.selected.length;
|
|
291
|
-
const numRows = this.dataSource.data.filter(row => !this.rowSelectionFormatter.disabled?.(row)).length;
|
|
292
|
-
return numSelected === numRows;
|
|
293
|
-
}
|
|
294
|
-
toggleSelectAllCheckbox() {
|
|
295
|
-
if (this.isAllSelected()) {
|
|
296
|
-
this.rowSelection.clear();
|
|
297
|
-
this.rowSelectionChange.emit(this.rowSelection.selected);
|
|
298
|
-
return;
|
|
299
|
-
}
|
|
300
|
-
this.dataSource.data.forEach(row => {
|
|
301
|
-
if (!this.rowSelectionFormatter.disabled?.(row)) {
|
|
302
|
-
this.rowSelection.select(row);
|
|
275
|
+
this.handlePage = (event) => {
|
|
276
|
+
this.pageChange.emit(event);
|
|
277
|
+
};
|
|
278
|
+
this.scrollToTop = () => {
|
|
279
|
+
this.elementRef.nativeElement.scrollTop = 0;
|
|
280
|
+
};
|
|
281
|
+
this.convertToKebabCase = (value) => value?.replace(/([a-z0-9])([A-Z])/gu, '$1-$2').toLowerCase();
|
|
282
|
+
effect(() => {
|
|
283
|
+
if (this.data()) {
|
|
284
|
+
let trueData;
|
|
285
|
+
if (Array.isArray(this.data())) {
|
|
286
|
+
trueData = this.data();
|
|
287
|
+
}
|
|
288
|
+
else {
|
|
289
|
+
const page = this.data();
|
|
290
|
+
this.total.set(page.totalCount ?? 0);
|
|
291
|
+
this.pageSize.set(page.pageSize ?? this.pageSize() ?? this.configuration.pageSize);
|
|
292
|
+
this.pageIndex.set(page.pageNumber ? page.pageNumber - 1 : this.pageIndex());
|
|
293
|
+
trueData = this.data()?.items ?? [];
|
|
294
|
+
}
|
|
295
|
+
if (this.dataSource) {
|
|
296
|
+
this.dataSource.disconnect();
|
|
297
|
+
}
|
|
298
|
+
this.dataSource = new MatTableDataSource(trueData);
|
|
299
|
+
this.trueData.set(trueData);
|
|
300
|
+
this.scrollToTop();
|
|
303
301
|
}
|
|
304
302
|
});
|
|
305
|
-
this.rowSelectionChange.emit(this.rowSelection.selected);
|
|
306
|
-
}
|
|
307
|
-
toggleRowSelection(row) {
|
|
308
|
-
this.rowSelection.toggle(row);
|
|
309
|
-
this.rowSelectionChange.emit(this.rowSelection.selected);
|
|
310
|
-
}
|
|
311
|
-
handlePage(e) {
|
|
312
|
-
this.pageChange.emit(e);
|
|
313
|
-
}
|
|
314
|
-
scrollToTop() {
|
|
315
|
-
this._elementRef.nativeElement.scrollTop = 0;
|
|
316
303
|
}
|
|
317
|
-
|
|
318
|
-
return this.showPaginator && this._data.length > 0;
|
|
319
|
-
}
|
|
320
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.10", ngImport: i0, type: EntryTableComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
321
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "20.3.10", type: EntryTableComponent, isStandalone: false, selector: "entry-table", inputs: { displayedColumns: "displayedColumns", columns: "columns", data: "data", total: "total", loading: "loading", showPaginator: "showPaginator", pageDisabled: "pageDisabled", showFirstLastButtons: "showFirstLastButtons", pageIndex: "pageIndex", pageSize: "pageSize", pageSizeOptions: "pageSizeOptions", hidePageSize: "hidePageSize", paginationTemplate: "paginationTemplate", sortActive: "sortActive", sortDirection: "sortDirection", sortDisableClear: "sortDisableClear", sortDisabled: "sortDisabled", sortStart: "sortStart", rowHover: "rowHover", rowStriped: "rowStriped", rowFocusVisible: "rowFocusVisible", multiSelectable: "multiSelectable", rowSelected: "rowSelected", rowSelectable: "rowSelectable", showSelectAllCheckbox: "showSelectAllCheckbox", rowSelectionFormatter: "rowSelectionFormatter", rowClassFormatter: "rowClassFormatter", showContextMenu: "showContextMenu", contextMenuItems: "contextMenuItems", contextMenuTemplate: "contextMenuTemplate", rowContextMenuFormatter: "rowContextMenuFormatter", noResultText: "noResultText", noResultTemplate: "noResultTemplate", headerTemplate: "headerTemplate", cellTemplate: "cellTemplate" }, outputs: { pageChange: "pageChange", sortChange: "sortChange", rowClick: "rowClick", rowSelectionChange: "rowSelectionChange", contextMenuItemSelected: "contextMenuItemSelected" }, host: { properties: { "class": "this.className" } }, usesOnChanges: true, ngImport: i0, template: "<!-- Table content -->\n<table mat-table\n [ngClass]=\"{'mat-table-hover': rowHover, 'mat-table-striped': rowStriped, 'mat-table-with-data': !hasNoResult }\"\n [dataSource]=\"dataSource\"\n matSort\n [matSortActive]=\"sortActive\"\n [matSortDirection]=\"sortDirection\"\n [matSortDisableClear]=\"sortDisableClear\"\n [matSortDisabled]=\"sortDisabled\"\n [matSortStart]=\"sortStart\"\n (matSortChange)=\"sortChange.emit($event)\">\n\n <!-- Selection column -->\n <ng-container *ngIf=\"rowSelectable\" [matColumnDef]=\"selectionColumn\">\n <th mat-header-cell *matHeaderCellDef class=\"selection-cell\" aria-label=\"Select rows\">\n <mat-checkbox aria-label=\"Select all\" *ngIf=\"multiSelectable && showSelectAllCheckbox\"\n [checked]=\"rowSelection.hasValue() && isAllSelected()\"\n [indeterminate]=\"rowSelection.hasValue() && !isAllSelected()\"\n (change)=\"$event ? toggleSelectAllCheckbox() : null\">\n </mat-checkbox>\n </th>\n <td mat-cell *matCellDef=\"let row; let index = index; let dataIndex = dataIndex;\"\n class=\"selection-cell\"\n (click)=\"$event.stopPropagation()\">\n <mat-checkbox aria-label=\"Select row\"\n *ngIf=\"multiSelectable && !(rowSelectionFormatter.hideCheckbox && rowSelectionFormatter.hideCheckbox!(row))\"\n [disabled]=\"rowSelectionFormatter.disabled && rowSelectionFormatter.disabled!(row)\"\n [checked]=\"rowSelection.isSelected(row)\"\n (change)=\"$event ? toggleRowSelection(row) : null\">\n </mat-checkbox>\n <mat-radio-button aria-label=\"Select row\"\n *ngIf=\"!multiSelectable && !(rowSelectionFormatter.hideCheckbox && rowSelectionFormatter.hideCheckbox!(row))\"\n [disabled]=\"rowSelectionFormatter.disabled && rowSelectionFormatter.disabled!(row)\"\n [checked]=\"rowSelection.isSelected(row)\"\n [value]=\"rowSelection.isSelected(row)\"\n (change)=\"$event ? toggleRowSelection(row) : null\">\n </mat-radio-button>\n </td>\n </ng-container>\n\n <!-- Context menu column -->\n <ng-container *ngIf=\"showContextMenu\" [matColumnDef]=\"contextMenuColumn\">\n <th mat-header-cell *matHeaderCellDef class=\"action-cell\" aria-label=\"Context Menu Actions\"></th>\n <td mat-cell *matCellDef=\"let row; let index = index; let dataIndex = dataIndex;\"\n class=\"action-cell\">\n <ng-template [ngIf]=\"isTemplateRef(contextMenuTemplate)\" [ngIfElse]=\"contextMenuTpl\">\n <ng-template [ngTemplateOutlet]=\"contextMenuTemplate\"\n [ngTemplateOutletContext]=\"{ $implicit: row, rowData: row }\">\n </ng-template>\n </ng-template>\n <ng-template #contextMenuTpl>\n <entry-cell-context-menu\n [items]=\"contextMenuItems\"\n [rowData]=\"row\"\n [rowMenuFormatter]=\"rowContextMenuFormatter\"\n (selected)=\"contextMenuItemSelected.emit({itemId: $event, rowData: row})\"\n ></entry-cell-context-menu>\n </ng-template>\n </td>\n </ng-container>\n\n <ng-container *ngFor=\"let col of columns;\">\n <ng-container [matColumnDef]=\"col.field\"\n [sticky]=\"col.pinned==='left'\" [stickyEnd]=\"col.pinned==='right'\">\n <th mat-header-cell *matHeaderCellDef\n [class]=\"getColumnClassList(col)\"\n [ngClass]=\"{'mat-table-sticky-left': col.pinned === 'left', 'mat-table-sticky-right': col.pinned === 'right'}\"\n [ngStyle]=\"{'width': col.width, 'min-width': col.width}\">\n <ng-template [ngIf]=\"isTemplateRef(headerTemplate)\" [ngIfElse]=\"headerTpl\">\n <ng-template [ngTemplateOutlet]=\"headerTemplate\"\n [ngTemplateOutletContext]=\"{ $implicit: col, colDef: col }\">\n </ng-template>\n </ng-template>\n <ng-template #headerTpl>\n <ng-template [ngIf]=\"headerTemplate && isTemplateRef(toTemplateIndex(headerTemplate, col.field))\"\n [ngIfElse]=\"defaultHeaderTpl\">\n <ng-template [ngTemplateOutlet]=\"toTemplateIndex(headerTemplate, col.field)\"\n [ngTemplateOutletContext]=\"{ $implicit: col, colDef: col }\">\n </ng-template>\n </ng-template>\n </ng-template>\n <ng-template #defaultHeaderTpl>\n <div [mat-sort-header]=\"col.sortProp?.id || col.field\"\n [disabled]=\"!col.sortable\"\n [disableClear]=\"col.sortProp?.disableClear\">\n <span>{{col.header}}</span>\n </div>\n </ng-template>\n </th>\n\n <td mat-cell *matCellDef=\"let row; let index = index; let dataIndex = dataIndex;\"\n [class]=\"getColumnClassList(col)\"\n [ngClass]=\"{'mat-table-sticky-left': col.pinned === 'left', 'mat-table-sticky-right': col.pinned === 'right'}\"\n [ngStyle]=\"{'width': col.width, 'min-width': col.width}\">\n <ng-template [ngIf]=\"isTemplateRef(cellTemplate)\" [ngIfElse]=\"cellTpl\">\n <ng-template [ngTemplateOutlet]=\"cellTemplate\"\n [ngTemplateOutletContext]=\"{ $implicit: row, rowData: row, index: getIndex(index, dataIndex), colDef: col }\">\n </ng-template>\n </ng-template>\n <ng-template #cellTpl>\n <ng-template [ngIf]=\"cellTemplate && isTemplateRef(toTemplateIndex(cellTemplate, col.field))\"\n [ngIfElse]=\"colDefCellTpl\">\n <ng-template [ngTemplateOutlet]=\"toTemplateIndex(cellTemplate, col.field)\"\n [ngTemplateOutletContext]=\"{ $implicit: row, rowData: row, index: getIndex(index, dataIndex), colDef: col }\">\n </ng-template>\n </ng-template>\n </ng-template>\n <ng-template #colDefCellTpl>\n <ng-template [ngIf]=\"col.cellTemplate\" [ngIfElse]=\"defaultCellTpl\"\n [ngTemplateOutlet]=\"col.cellTemplate ?? null\"\n [ngTemplateOutletContext]=\"{ $implicit: row, rowData: row, index: getIndex(index, dataIndex), colDef: col }\">\n </ng-template>\n </ng-template>\n <ng-template #defaultCellTpl>\n <entry-cell [rowData]=\"row\" [colDef]=\"col\"></entry-cell>\n </ng-template>\n </td>\n </ng-container>\n </ng-container>\n\n <tr mat-header-row *matHeaderRowDef=\"displayedColumns; sticky: true\"></tr>\n <tr mat-row\n *matRowDef=\"let row; let index = index; let dataIndex = dataIndex; columns: displayedColumns;\"\n [ngClass]=\"getRowClassList(row, getIndex(index, dataIndex))\"\n [attr.tabindex]=\"rowFocusVisible ? 0 : -1\"\n (click)=\"rowClick.emit(row)\"\n (keydown.enter)=\"rowClick.emit(row)\">\n </tr>\n</table>\n\n<!-- No results -->\n<div class=\"no-results mat-body-2\" *ngIf=\"hasNoResult\">\n <ng-template [ngIf]=\"isTemplateRef(noResultTemplate)\" [ngIfElse]=\"defaultNoResultTpl\">\n <ng-template [ngTemplateOutlet]=\"noResultTemplate\"></ng-template>\n </ng-template>\n <ng-template #defaultNoResultTpl>{{noResultText}}</ng-template>\n</div>\n\n<!-- Pagination -->\n<ng-template [ngIf]=\"isTemplateRef(paginationTemplate)\" [ngIfElse]=\"defaultPaginationTemplate\">\n <ng-template [ngTemplateOutlet]=\"paginationTemplate\"></ng-template>\n</ng-template>\n<ng-template #defaultPaginationTemplate>\n <mat-paginator class=\"pagination\" *ngIf=\"shouldShowPaginator\"\n [showFirstLastButtons]=\"showFirstLastButtons\"\n [length]=\"total\"\n [pageIndex]=\"pageIndex\"\n [pageSize]=\"pageSize\"\n [pageSizeOptions]=\"pageSizeOptions\"\n [hidePageSize]=\"hidePageSize\"\n (page)=\"handlePage($event)\"\n [disabled]=\"pageDisabled\">\n </mat-paginator>\n</ng-template>\n", dependencies: [{ kind: "directive", type: i1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i1.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "directive", type: i1.NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }, { kind: "component", type: i2$1.MatTable, selector: "mat-table, table[mat-table]", exportAs: ["matTable"] }, { kind: "directive", type: i2$1.MatHeaderCellDef, selector: "[matHeaderCellDef]" }, { kind: "directive", type: i2$1.MatHeaderRowDef, selector: "[matHeaderRowDef]", inputs: ["matHeaderRowDef", "matHeaderRowDefSticky"] }, { kind: "directive", type: i2$1.MatColumnDef, selector: "[matColumnDef]", inputs: ["matColumnDef"] }, { kind: "directive", type: i2$1.MatCellDef, selector: "[matCellDef]" }, { kind: "directive", type: i2$1.MatRowDef, selector: "[matRowDef]", inputs: ["matRowDefColumns", "matRowDefWhen"] }, { kind: "directive", type: i2$1.MatHeaderCell, selector: "mat-header-cell, th[mat-header-cell]" }, { kind: "directive", type: i2$1.MatCell, selector: "mat-cell, td[mat-cell]" }, { kind: "component", type: i2$1.MatHeaderRow, selector: "mat-header-row, tr[mat-header-row]", exportAs: ["matHeaderRow"] }, { kind: "component", type: i2$1.MatRow, selector: "mat-row, tr[mat-row]", exportAs: ["matRow"] }, { kind: "directive", type: i3$1.MatSort, selector: "[matSort]", inputs: ["matSortActive", "matSortStart", "matSortDirection", "matSortDisableClear", "matSortDisabled"], outputs: ["matSortChange"], exportAs: ["matSort"] }, { kind: "component", type: i3$1.MatSortHeader, selector: "[mat-sort-header]", inputs: ["mat-sort-header", "arrowPosition", "start", "disabled", "sortActionDescription", "disableClear"], exportAs: ["matSortHeader"] }, { kind: "component", type: i4$1.MatPaginator, selector: "mat-paginator", inputs: ["color", "pageIndex", "length", "pageSize", "pageSizeOptions", "hidePageSize", "showFirstLastButtons", "selectConfig", "disabled"], outputs: ["page"], exportAs: ["matPaginator"] }, { kind: "component", type: i5.MatCheckbox, selector: "mat-checkbox", inputs: ["aria-label", "aria-labelledby", "aria-describedby", "aria-expanded", "aria-controls", "aria-owns", "id", "required", "labelPosition", "name", "value", "disableRipple", "tabIndex", "color", "disabledInteractive", "checked", "disabled", "indeterminate"], outputs: ["change", "indeterminateChange"], exportAs: ["matCheckbox"] }, { kind: "component", type: i6.MatRadioButton, selector: "mat-radio-button", inputs: ["id", "name", "aria-label", "aria-labelledby", "aria-describedby", "disableRipple", "tabIndex", "checked", "value", "labelPosition", "disabled", "required", "color", "disabledInteractive"], outputs: ["change"], exportAs: ["matRadioButton"] }, { kind: "component", type: EntryCellComponent, selector: "entry-cell", inputs: ["rowData", "colDef"] }, { kind: "component", type: EntryCellContextMenuComponent, selector: "entry-cell-context-menu", inputs: ["items", "rowMenuFormatter", "rowData", "triggerIcon", "isSubMenu"], outputs: ["selected"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
304
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.8", ngImport: i0, type: EntryTableComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
305
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.8", type: EntryTableComponent, isStandalone: true, selector: "entry-table", inputs: { columns: { classPropertyName: "columns", publicName: "columns", isSignal: true, isRequired: false, transformFunction: null }, data: { classPropertyName: "data", publicName: "data", isSignal: true, isRequired: false, transformFunction: null }, loading: { classPropertyName: "loading", publicName: "loading", isSignal: true, isRequired: false, transformFunction: null }, showPaginator: { classPropertyName: "showPaginator", publicName: "showPaginator", isSignal: true, isRequired: false, transformFunction: null }, pageDisabled: { classPropertyName: "pageDisabled", publicName: "pageDisabled", isSignal: true, isRequired: false, transformFunction: null }, showFirstLastButtons: { classPropertyName: "showFirstLastButtons", publicName: "showFirstLastButtons", isSignal: true, isRequired: false, transformFunction: null }, pageSizeOptions: { classPropertyName: "pageSizeOptions", publicName: "pageSizeOptions", isSignal: true, isRequired: false, transformFunction: null }, hidePageSize: { classPropertyName: "hidePageSize", publicName: "hidePageSize", isSignal: true, isRequired: false, transformFunction: null }, paginationTemplate: { classPropertyName: "paginationTemplate", publicName: "paginationTemplate", isSignal: true, isRequired: false, transformFunction: null }, sortActive: { classPropertyName: "sortActive", publicName: "sortActive", isSignal: true, isRequired: false, transformFunction: null }, sortDirection: { classPropertyName: "sortDirection", publicName: "sortDirection", isSignal: true, isRequired: false, transformFunction: null }, sortDisableClear: { classPropertyName: "sortDisableClear", publicName: "sortDisableClear", isSignal: true, isRequired: false, transformFunction: null }, sortDisabled: { classPropertyName: "sortDisabled", publicName: "sortDisabled", isSignal: true, isRequired: false, transformFunction: null }, sortStart: { classPropertyName: "sortStart", publicName: "sortStart", isSignal: true, isRequired: false, transformFunction: null }, rowHover: { classPropertyName: "rowHover", publicName: "rowHover", isSignal: true, isRequired: false, transformFunction: null }, rowStriped: { classPropertyName: "rowStriped", publicName: "rowStriped", isSignal: true, isRequired: false, transformFunction: null }, rowFocusVisible: { classPropertyName: "rowFocusVisible", publicName: "rowFocusVisible", isSignal: true, isRequired: false, transformFunction: null }, multiSelectable: { classPropertyName: "multiSelectable", publicName: "multiSelectable", isSignal: true, isRequired: false, transformFunction: null }, rowSelected: { classPropertyName: "rowSelected", publicName: "rowSelected", isSignal: true, isRequired: false, transformFunction: null }, rowSelectable: { classPropertyName: "rowSelectable", publicName: "rowSelectable", isSignal: true, isRequired: false, transformFunction: null }, showSelectAllCheckbox: { classPropertyName: "showSelectAllCheckbox", publicName: "showSelectAllCheckbox", isSignal: true, isRequired: false, transformFunction: null }, rowSelectionFormatter: { classPropertyName: "rowSelectionFormatter", publicName: "rowSelectionFormatter", isSignal: true, isRequired: false, transformFunction: null }, rowClassFormatter: { classPropertyName: "rowClassFormatter", publicName: "rowClassFormatter", isSignal: true, isRequired: false, transformFunction: null }, showContextMenu: { classPropertyName: "showContextMenu", publicName: "showContextMenu", isSignal: true, isRequired: false, transformFunction: null }, contextMenuItems: { classPropertyName: "contextMenuItems", publicName: "contextMenuItems", isSignal: true, isRequired: false, transformFunction: null }, contextMenuTemplate: { classPropertyName: "contextMenuTemplate", publicName: "contextMenuTemplate", isSignal: true, isRequired: false, transformFunction: null }, rowContextMenuFormatter: { classPropertyName: "rowContextMenuFormatter", publicName: "rowContextMenuFormatter", isSignal: true, isRequired: false, transformFunction: null }, noResultText: { classPropertyName: "noResultText", publicName: "noResultText", isSignal: true, isRequired: false, transformFunction: null }, noResultTemplate: { classPropertyName: "noResultTemplate", publicName: "noResultTemplate", isSignal: true, isRequired: false, transformFunction: null }, headerTemplate: { classPropertyName: "headerTemplate", publicName: "headerTemplate", isSignal: true, isRequired: false, transformFunction: null }, cellTemplate: { classPropertyName: "cellTemplate", publicName: "cellTemplate", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { pageChange: "pageChange", sortChange: "sortChange", rowClick: "rowClick", contextMenuItemSelected: "contextMenuItemSelected" }, host: { classAttribute: "entry-table" }, ngImport: i0, template: "<!-- Table content -->\n<table mat-table [class.mat-table-hover]=\"rowHover()\" [class.mat-table-striped]=\"rowStriped()\"\n [class.mat-table-with-data]=\"!hasNoResult()\" [dataSource]=\"dataSource\" matSort [matSortActive]=\"sortActive()!\"\n [matSortDirection]=\"sortDirection()!\" [matSortDisableClear]=\"sortDisableClear()\" [matSortDisabled]=\"sortDisabled()\"\n [matSortStart]=\"sortStart()\" (matSortChange)=\"sortChange.emit($event)\">\n\n <!-- Selection column -->\n @if(rowSelectable())\n {\n <ng-container [matColumnDef]=\"selectionColumn\">\n <th mat-header-cell *matHeaderCellDef class=\"selection-cell\" aria-label=\"Select rows\">\n @if(multiSelectable() && showSelectAllCheckbox())\n {\n <mat-checkbox aria-label=\"Select all\" [checked]=\"rowSelection().hasValue() && allRowsSelected()\"\n [indeterminate]=\"rowSelection().hasValue() && !allRowsSelected()\"\n (change)=\"$event ? toggleSelectAllCheckbox() : null\">\n </mat-checkbox>\n }\n </th>\n <td mat-cell *matCellDef=\"let row; let index = index; let dataIndex = dataIndex;\" class=\"selection-cell\"\n (click)=\"$event.stopPropagation()\">\n @if(multiSelectable() && !(rowSelectionFormatter().hideCheckbox && rowSelectionFormatter().hideCheckbox!(row)))\n {\n <mat-checkbox aria-label=\"Select row\"\n [disabled]=\"rowSelectionFormatter().disabled && rowSelectionFormatter().disabled!(row)\"\n [checked]=\"rowSelection().isSelected(row)\" (change)=\"$event ? toggleRowSelection(row) : null\">\n </mat-checkbox>\n }\n\n @if(!multiSelectable() && !(rowSelectionFormatter().hideCheckbox && rowSelectionFormatter().hideCheckbox!(row)))\n {\n <mat-radio-button aria-label=\"Select row\"\n [disabled]=\"rowSelectionFormatter().disabled && rowSelectionFormatter().disabled!(row)\"\n [checked]=\"rowSelection().isSelected(row)\" [value]=\"rowSelection().isSelected(row)\"\n (change)=\"$event ? toggleRowSelection(row) : null\">\n </mat-radio-button>\n }\n </td>\n </ng-container>\n }\n\n <!-- Context menu column -->\n @if(showContextMenu())\n {\n <ng-container [matColumnDef]=\"contextMenuColumn\">\n <th mat-header-cell *matHeaderCellDef class=\"action-cell\" aria-label=\"Context Menu Actions\"></th>\n\n <td mat-cell *matCellDef=\"let row; let index = index; let dataIndex = dataIndex;\" class=\"action-cell\">\n @if(isTemplateRef(contextMenuTemplate()))\n {\n <ng-template [ngTemplateOutlet]=\"contextMenuTemplate()\"\n [ngTemplateOutletContext]=\"{ $implicit: row, rowData: row }\">\n </ng-template>\n }\n @else{\n <entry-cell-context-menu [items]=\"contextMenuItems()\" [rowData]=\"row\"\n [rowMenuFormatter]=\"rowContextMenuFormatter()\"\n (selected)=\"contextMenuItemSelected.emit({itemId: $event, rowData: row})\"></entry-cell-context-menu>\n }\n </td>\n </ng-container>\n }\n\n @for(column of columns(); track column.field)\n {\n <ng-container [matColumnDef]=\"column.field\" [sticky]=\"column.pinned==='left'\" [stickyEnd]=\"column.pinned==='right'\">\n <th mat-header-cell *matHeaderCellDef [class]=\"getColumnClassList(column)\"\n [class.mat-table-sticky-left]=\"column.pinned === 'left'\"\n [class.mat-table-sticky-right]=\"column.pinned === 'right'\"\n [style]=\"{'width': column.width, 'min-width': column.width}\">\n @if(isTemplateRef(headerTemplate()))\n {\n <ng-template [ngTemplateOutlet]=\"unknownTemplateAsTemplate(headerTemplate())\"\n [ngTemplateOutletContext]=\"{ $implicit: column, colDef: column }\">\n </ng-template>\n }\n @else if(headerTemplate() && isTemplateRef(toTemplateIndex(unknownTemplateAsTemplate(headerTemplate()),\n column.field))) {\n <ng-template [ngTemplateOutlet]=\"toTemplateIndex(unknownTemplateAsTemplate(headerTemplate()), column.field)\"\n [ngTemplateOutletContext]=\"{ $implicit: column, colDef: column }\">\n </ng-template>\n }\n @else {\n <div [mat-sort-header]=\"column.sortProperties?.id || column.field\" [disabled]=\"!column.sortable\"\n [disableClear]=\"column.sortProperties?.disableClear\">\n <span>{{column.header}}</span>\n </div>\n }\n </th>\n <td mat-cell *matCellDef=\"let row; let index = index; let dataIndex = dataIndex;\"\n [class]=\"getColumnClassList(column)\" [class.mat-table-sticky-left]=\"column.pinned === 'left'\"\n [class.mat-table-sticky-right]=\"column.pinned === 'right'\"\n [style]=\"{'width': column.width, 'min-width': column.width}\">\n @if(isTemplateRef(cellTemplate()))\n {\n <ng-template [ngTemplateOutlet]=\"unknownTemplateAsTemplate(cellTemplate())\"\n [ngTemplateOutletContext]=\"{ $implicit: row, rowData: row, index: getIndex(index, dataIndex), colDef: column }\">\n </ng-template>\n }\n @else if(cellTemplate() && isTemplateRef(toTemplateIndex(unknownTemplateAsTemplate(cellTemplate()),\n column.field)))\n {\n <ng-template [ngTemplateOutlet]=\"toTemplateIndex(unknownTemplateAsTemplate(cellTemplate()), column.field)\"\n [ngTemplateOutletContext]=\"{ $implicit: row, rowData: row, index: getIndex(index, dataIndex), colDef: column }\">\n </ng-template>\n }\n @else if(column.cellTemplate) {\n <ng-template [ngTemplateOutlet]=\"column.cellTemplate\"\n [ngTemplateOutletContext]=\"{ $implicit: row, rowData: row, index: getIndex(index, dataIndex), colDef: column }\">\n </ng-template>\n }\n @else {\n <entry-cell [rowData]=\"row\" [columnDefinition]=\"column\"></entry-cell>\n }\n </td>\n </ng-container>\n }\n\n <tr mat-header-row *matHeaderRowDef=\"displayedColumns(); sticky: true\"></tr>\n <tr mat-row *matRowDef=\"let row; let index = index; let dataIndex = dataIndex; columns: displayedColumns();\"\n [class]=\"getRowClassList(row, getIndex(index, dataIndex))\" [attr.tabindex]=\"rowFocusVisible() ? 0 : -1\"\n (click)=\"rowClick.emit(row)\" (keydown.enter)=\"rowClick.emit(row)\">\n </tr>\n</table>\n\n<!-- No results -->\n@if(hasNoResult())\n{\n<div class=\"no-results mat-body-2\">\n @if(isTemplateRef(noResultTemplate()))\n {\n <ng-template [ngTemplateOutlet]=\"noResultTemplate()\"></ng-template>\n }\n @else {\n {{noResultText()}}\n }\n</div>\n}\n<!-- Pagination -->\n@if(isTemplateRef(paginationTemplate()))\n{\n<ng-template [ngTemplateOutlet]=\"paginationTemplate()\"></ng-template>\n}\n@else if(shouldShowPaginator()) {\n<mat-paginator class=\"pagination\" [showFirstLastButtons]=\"showFirstLastButtons()\" [length]=\"total()\"\n [pageIndex]=\"pageIndex()\" [pageSize]=\"pageSize()\" [pageSizeOptions]=\"pageSizeOptions()\"\n [hidePageSize]=\"hidePageSize()\" (page)=\"handlePage($event)\" [disabled]=\"pageDisabled()\">\n</mat-paginator>\n}", dependencies: [{ kind: "ngmodule", type: MatTableModule }, { kind: "component", type: i1$1.MatTable, selector: "mat-table, table[mat-table]", exportAs: ["matTable"] }, { kind: "directive", type: i1$1.MatHeaderCellDef, selector: "[matHeaderCellDef]" }, { kind: "directive", type: i1$1.MatHeaderRowDef, selector: "[matHeaderRowDef]", inputs: ["matHeaderRowDef", "matHeaderRowDefSticky"] }, { kind: "directive", type: i1$1.MatColumnDef, selector: "[matColumnDef]", inputs: ["matColumnDef"] }, { kind: "directive", type: i1$1.MatCellDef, selector: "[matCellDef]" }, { kind: "directive", type: i1$1.MatRowDef, selector: "[matRowDef]", inputs: ["matRowDefColumns", "matRowDefWhen"] }, { kind: "directive", type: i1$1.MatHeaderCell, selector: "mat-header-cell, th[mat-header-cell]" }, { kind: "directive", type: i1$1.MatCell, selector: "mat-cell, td[mat-cell]" }, { kind: "component", type: i1$1.MatHeaderRow, selector: "mat-header-row, tr[mat-header-row]", exportAs: ["matHeaderRow"] }, { kind: "component", type: i1$1.MatRow, selector: "mat-row, tr[mat-row]", exportAs: ["matRow"] }, { kind: "ngmodule", type: MatSortModule }, { kind: "directive", type: i2$1.MatSort, selector: "[matSort]", inputs: ["matSortActive", "matSortStart", "matSortDirection", "matSortDisableClear", "matSortDisabled"], outputs: ["matSortChange"], exportAs: ["matSort"] }, { kind: "component", type: i2$1.MatSortHeader, selector: "[mat-sort-header]", inputs: ["mat-sort-header", "arrowPosition", "start", "disabled", "sortActionDescription", "disableClear"], exportAs: ["matSortHeader"] }, { kind: "ngmodule", type: MatCheckboxModule }, { kind: "component", type: i3$1.MatCheckbox, selector: "mat-checkbox", inputs: ["aria-label", "aria-labelledby", "aria-describedby", "aria-expanded", "aria-controls", "aria-owns", "id", "required", "labelPosition", "name", "value", "disableRipple", "tabIndex", "color", "disabledInteractive", "checked", "disabled", "indeterminate"], outputs: ["change", "indeterminateChange"], exportAs: ["matCheckbox"] }, { kind: "ngmodule", type: MatRadioModule }, { kind: "component", type: i4.MatRadioButton, selector: "mat-radio-button", inputs: ["id", "name", "aria-label", "aria-labelledby", "aria-describedby", "disableRipple", "tabIndex", "checked", "value", "labelPosition", "disabled", "required", "color", "disabledInteractive"], outputs: ["change"], exportAs: ["matRadioButton"] }, { kind: "ngmodule", type: MatPaginatorModule }, { kind: "component", type: i5.MatPaginator, selector: "mat-paginator", inputs: ["color", "pageIndex", "length", "pageSize", "pageSizeOptions", "hidePageSize", "showFirstLastButtons", "selectConfig", "disabled"], outputs: ["page"], exportAs: ["matPaginator"] }, { kind: "component", type: EntryCellComponent, selector: "entry-cell", inputs: ["rowData", "columnDefinition"] }, { kind: "component", type: EntryCellContextMenuComponent, selector: "entry-cell-context-menu", inputs: ["items", "rowMenuFormatter", "rowData", "triggerIcon", "isSubMenu"], outputs: ["selected"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
322
306
|
}
|
|
323
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
307
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.8", ngImport: i0, type: EntryTableComponent, decorators: [{
|
|
324
308
|
type: Component,
|
|
325
|
-
args: [{ selector: 'entry-table', changeDetection: ChangeDetectionStrategy.OnPush,
|
|
326
|
-
}], propDecorators: {
|
|
327
|
-
type: HostBinding,
|
|
328
|
-
args: ['class']
|
|
329
|
-
}], displayedColumns: [{
|
|
330
|
-
type: Input
|
|
331
|
-
}], columns: [{
|
|
332
|
-
type: Input
|
|
333
|
-
}], data: [{
|
|
334
|
-
type: Input
|
|
335
|
-
}], total: [{
|
|
336
|
-
type: Input
|
|
337
|
-
}], loading: [{
|
|
338
|
-
type: Input
|
|
339
|
-
}], showPaginator: [{
|
|
340
|
-
type: Input
|
|
341
|
-
}], pageDisabled: [{
|
|
342
|
-
type: Input
|
|
343
|
-
}], showFirstLastButtons: [{
|
|
344
|
-
type: Input
|
|
345
|
-
}], pageIndex: [{
|
|
346
|
-
type: Input
|
|
347
|
-
}], pageSize: [{
|
|
348
|
-
type: Input
|
|
349
|
-
}], pageSizeOptions: [{
|
|
350
|
-
type: Input
|
|
351
|
-
}], hidePageSize: [{
|
|
352
|
-
type: Input
|
|
353
|
-
}], paginationTemplate: [{
|
|
354
|
-
type: Input
|
|
355
|
-
}], pageChange: [{
|
|
356
|
-
type: Output
|
|
357
|
-
}], sortActive: [{
|
|
358
|
-
type: Input
|
|
359
|
-
}], sortDirection: [{
|
|
360
|
-
type: Input
|
|
361
|
-
}], sortDisableClear: [{
|
|
362
|
-
type: Input
|
|
363
|
-
}], sortDisabled: [{
|
|
364
|
-
type: Input
|
|
365
|
-
}], sortStart: [{
|
|
366
|
-
type: Input
|
|
367
|
-
}], sortChange: [{
|
|
368
|
-
type: Output
|
|
369
|
-
}], rowHover: [{
|
|
370
|
-
type: Input
|
|
371
|
-
}], rowStriped: [{
|
|
372
|
-
type: Input
|
|
373
|
-
}], rowFocusVisible: [{
|
|
374
|
-
type: Input
|
|
375
|
-
}], rowClick: [{
|
|
376
|
-
type: Output
|
|
377
|
-
}], multiSelectable: [{
|
|
378
|
-
type: Input
|
|
379
|
-
}], rowSelected: [{
|
|
380
|
-
type: Input
|
|
381
|
-
}], rowSelectable: [{
|
|
382
|
-
type: Input
|
|
383
|
-
}], showSelectAllCheckbox: [{
|
|
384
|
-
type: Input
|
|
385
|
-
}], rowSelectionFormatter: [{
|
|
386
|
-
type: Input
|
|
387
|
-
}], rowClassFormatter: [{
|
|
388
|
-
type: Input
|
|
389
|
-
}], rowSelectionChange: [{
|
|
390
|
-
type: Output
|
|
391
|
-
}], showContextMenu: [{
|
|
392
|
-
type: Input
|
|
393
|
-
}], contextMenuItems: [{
|
|
394
|
-
type: Input
|
|
395
|
-
}], contextMenuTemplate: [{
|
|
396
|
-
type: Input
|
|
397
|
-
}], rowContextMenuFormatter: [{
|
|
398
|
-
type: Input
|
|
399
|
-
}], contextMenuItemSelected: [{
|
|
400
|
-
type: Output
|
|
401
|
-
}], noResultText: [{
|
|
402
|
-
type: Input
|
|
403
|
-
}], noResultTemplate: [{
|
|
404
|
-
type: Input
|
|
405
|
-
}], headerTemplate: [{
|
|
406
|
-
type: Input
|
|
407
|
-
}], cellTemplate: [{
|
|
408
|
-
type: Input
|
|
409
|
-
}] } });
|
|
309
|
+
args: [{ selector: 'entry-table', host: { class: 'entry-table' }, imports: [MatTableModule, MatSortModule, MatCheckboxModule, MatRadioModule, MatPaginatorModule, EntryCellComponent, EntryCellContextMenuComponent], changeDetection: ChangeDetectionStrategy.OnPush, template: "<!-- Table content -->\n<table mat-table [class.mat-table-hover]=\"rowHover()\" [class.mat-table-striped]=\"rowStriped()\"\n [class.mat-table-with-data]=\"!hasNoResult()\" [dataSource]=\"dataSource\" matSort [matSortActive]=\"sortActive()!\"\n [matSortDirection]=\"sortDirection()!\" [matSortDisableClear]=\"sortDisableClear()\" [matSortDisabled]=\"sortDisabled()\"\n [matSortStart]=\"sortStart()\" (matSortChange)=\"sortChange.emit($event)\">\n\n <!-- Selection column -->\n @if(rowSelectable())\n {\n <ng-container [matColumnDef]=\"selectionColumn\">\n <th mat-header-cell *matHeaderCellDef class=\"selection-cell\" aria-label=\"Select rows\">\n @if(multiSelectable() && showSelectAllCheckbox())\n {\n <mat-checkbox aria-label=\"Select all\" [checked]=\"rowSelection().hasValue() && allRowsSelected()\"\n [indeterminate]=\"rowSelection().hasValue() && !allRowsSelected()\"\n (change)=\"$event ? toggleSelectAllCheckbox() : null\">\n </mat-checkbox>\n }\n </th>\n <td mat-cell *matCellDef=\"let row; let index = index; let dataIndex = dataIndex;\" class=\"selection-cell\"\n (click)=\"$event.stopPropagation()\">\n @if(multiSelectable() && !(rowSelectionFormatter().hideCheckbox && rowSelectionFormatter().hideCheckbox!(row)))\n {\n <mat-checkbox aria-label=\"Select row\"\n [disabled]=\"rowSelectionFormatter().disabled && rowSelectionFormatter().disabled!(row)\"\n [checked]=\"rowSelection().isSelected(row)\" (change)=\"$event ? toggleRowSelection(row) : null\">\n </mat-checkbox>\n }\n\n @if(!multiSelectable() && !(rowSelectionFormatter().hideCheckbox && rowSelectionFormatter().hideCheckbox!(row)))\n {\n <mat-radio-button aria-label=\"Select row\"\n [disabled]=\"rowSelectionFormatter().disabled && rowSelectionFormatter().disabled!(row)\"\n [checked]=\"rowSelection().isSelected(row)\" [value]=\"rowSelection().isSelected(row)\"\n (change)=\"$event ? toggleRowSelection(row) : null\">\n </mat-radio-button>\n }\n </td>\n </ng-container>\n }\n\n <!-- Context menu column -->\n @if(showContextMenu())\n {\n <ng-container [matColumnDef]=\"contextMenuColumn\">\n <th mat-header-cell *matHeaderCellDef class=\"action-cell\" aria-label=\"Context Menu Actions\"></th>\n\n <td mat-cell *matCellDef=\"let row; let index = index; let dataIndex = dataIndex;\" class=\"action-cell\">\n @if(isTemplateRef(contextMenuTemplate()))\n {\n <ng-template [ngTemplateOutlet]=\"contextMenuTemplate()\"\n [ngTemplateOutletContext]=\"{ $implicit: row, rowData: row }\">\n </ng-template>\n }\n @else{\n <entry-cell-context-menu [items]=\"contextMenuItems()\" [rowData]=\"row\"\n [rowMenuFormatter]=\"rowContextMenuFormatter()\"\n (selected)=\"contextMenuItemSelected.emit({itemId: $event, rowData: row})\"></entry-cell-context-menu>\n }\n </td>\n </ng-container>\n }\n\n @for(column of columns(); track column.field)\n {\n <ng-container [matColumnDef]=\"column.field\" [sticky]=\"column.pinned==='left'\" [stickyEnd]=\"column.pinned==='right'\">\n <th mat-header-cell *matHeaderCellDef [class]=\"getColumnClassList(column)\"\n [class.mat-table-sticky-left]=\"column.pinned === 'left'\"\n [class.mat-table-sticky-right]=\"column.pinned === 'right'\"\n [style]=\"{'width': column.width, 'min-width': column.width}\">\n @if(isTemplateRef(headerTemplate()))\n {\n <ng-template [ngTemplateOutlet]=\"unknownTemplateAsTemplate(headerTemplate())\"\n [ngTemplateOutletContext]=\"{ $implicit: column, colDef: column }\">\n </ng-template>\n }\n @else if(headerTemplate() && isTemplateRef(toTemplateIndex(unknownTemplateAsTemplate(headerTemplate()),\n column.field))) {\n <ng-template [ngTemplateOutlet]=\"toTemplateIndex(unknownTemplateAsTemplate(headerTemplate()), column.field)\"\n [ngTemplateOutletContext]=\"{ $implicit: column, colDef: column }\">\n </ng-template>\n }\n @else {\n <div [mat-sort-header]=\"column.sortProperties?.id || column.field\" [disabled]=\"!column.sortable\"\n [disableClear]=\"column.sortProperties?.disableClear\">\n <span>{{column.header}}</span>\n </div>\n }\n </th>\n <td mat-cell *matCellDef=\"let row; let index = index; let dataIndex = dataIndex;\"\n [class]=\"getColumnClassList(column)\" [class.mat-table-sticky-left]=\"column.pinned === 'left'\"\n [class.mat-table-sticky-right]=\"column.pinned === 'right'\"\n [style]=\"{'width': column.width, 'min-width': column.width}\">\n @if(isTemplateRef(cellTemplate()))\n {\n <ng-template [ngTemplateOutlet]=\"unknownTemplateAsTemplate(cellTemplate())\"\n [ngTemplateOutletContext]=\"{ $implicit: row, rowData: row, index: getIndex(index, dataIndex), colDef: column }\">\n </ng-template>\n }\n @else if(cellTemplate() && isTemplateRef(toTemplateIndex(unknownTemplateAsTemplate(cellTemplate()),\n column.field)))\n {\n <ng-template [ngTemplateOutlet]=\"toTemplateIndex(unknownTemplateAsTemplate(cellTemplate()), column.field)\"\n [ngTemplateOutletContext]=\"{ $implicit: row, rowData: row, index: getIndex(index, dataIndex), colDef: column }\">\n </ng-template>\n }\n @else if(column.cellTemplate) {\n <ng-template [ngTemplateOutlet]=\"column.cellTemplate\"\n [ngTemplateOutletContext]=\"{ $implicit: row, rowData: row, index: getIndex(index, dataIndex), colDef: column }\">\n </ng-template>\n }\n @else {\n <entry-cell [rowData]=\"row\" [columnDefinition]=\"column\"></entry-cell>\n }\n </td>\n </ng-container>\n }\n\n <tr mat-header-row *matHeaderRowDef=\"displayedColumns(); sticky: true\"></tr>\n <tr mat-row *matRowDef=\"let row; let index = index; let dataIndex = dataIndex; columns: displayedColumns();\"\n [class]=\"getRowClassList(row, getIndex(index, dataIndex))\" [attr.tabindex]=\"rowFocusVisible() ? 0 : -1\"\n (click)=\"rowClick.emit(row)\" (keydown.enter)=\"rowClick.emit(row)\">\n </tr>\n</table>\n\n<!-- No results -->\n@if(hasNoResult())\n{\n<div class=\"no-results mat-body-2\">\n @if(isTemplateRef(noResultTemplate()))\n {\n <ng-template [ngTemplateOutlet]=\"noResultTemplate()\"></ng-template>\n }\n @else {\n {{noResultText()}}\n }\n</div>\n}\n<!-- Pagination -->\n@if(isTemplateRef(paginationTemplate()))\n{\n<ng-template [ngTemplateOutlet]=\"paginationTemplate()\"></ng-template>\n}\n@else if(shouldShowPaginator()) {\n<mat-paginator class=\"pagination\" [showFirstLastButtons]=\"showFirstLastButtons()\" [length]=\"total()\"\n [pageIndex]=\"pageIndex()\" [pageSize]=\"pageSize()\" [pageSizeOptions]=\"pageSizeOptions()\"\n [hidePageSize]=\"hidePageSize()\" (page)=\"handlePage($event)\" [disabled]=\"pageDisabled()\">\n</mat-paginator>\n}" }]
|
|
310
|
+
}], ctorParameters: () => [], propDecorators: { columns: [{ type: i0.Input, args: [{ isSignal: true, alias: "columns", required: false }] }], data: [{ type: i0.Input, args: [{ isSignal: true, alias: "data", required: false }] }], loading: [{ type: i0.Input, args: [{ isSignal: true, alias: "loading", required: false }] }], showPaginator: [{ type: i0.Input, args: [{ isSignal: true, alias: "showPaginator", required: false }] }], pageDisabled: [{ type: i0.Input, args: [{ isSignal: true, alias: "pageDisabled", required: false }] }], showFirstLastButtons: [{ type: i0.Input, args: [{ isSignal: true, alias: "showFirstLastButtons", required: false }] }], pageSizeOptions: [{ type: i0.Input, args: [{ isSignal: true, alias: "pageSizeOptions", required: false }] }], hidePageSize: [{ type: i0.Input, args: [{ isSignal: true, alias: "hidePageSize", required: false }] }], paginationTemplate: [{ type: i0.Input, args: [{ isSignal: true, alias: "paginationTemplate", required: false }] }], pageChange: [{ type: i0.Output, args: ["pageChange"] }], sortActive: [{ type: i0.Input, args: [{ isSignal: true, alias: "sortActive", required: false }] }], sortDirection: [{ type: i0.Input, args: [{ isSignal: true, alias: "sortDirection", required: false }] }], sortDisableClear: [{ type: i0.Input, args: [{ isSignal: true, alias: "sortDisableClear", required: false }] }], sortDisabled: [{ type: i0.Input, args: [{ isSignal: true, alias: "sortDisabled", required: false }] }], sortStart: [{ type: i0.Input, args: [{ isSignal: true, alias: "sortStart", required: false }] }], sortChange: [{ type: i0.Output, args: ["sortChange"] }], rowHover: [{ type: i0.Input, args: [{ isSignal: true, alias: "rowHover", required: false }] }], rowStriped: [{ type: i0.Input, args: [{ isSignal: true, alias: "rowStriped", required: false }] }], rowFocusVisible: [{ type: i0.Input, args: [{ isSignal: true, alias: "rowFocusVisible", required: false }] }], rowClick: [{ type: i0.Output, args: ["rowClick"] }], multiSelectable: [{ type: i0.Input, args: [{ isSignal: true, alias: "multiSelectable", required: false }] }], rowSelected: [{ type: i0.Input, args: [{ isSignal: true, alias: "rowSelected", required: false }] }], rowSelectable: [{ type: i0.Input, args: [{ isSignal: true, alias: "rowSelectable", required: false }] }], showSelectAllCheckbox: [{ type: i0.Input, args: [{ isSignal: true, alias: "showSelectAllCheckbox", required: false }] }], rowSelectionFormatter: [{ type: i0.Input, args: [{ isSignal: true, alias: "rowSelectionFormatter", required: false }] }], rowClassFormatter: [{ type: i0.Input, args: [{ isSignal: true, alias: "rowClassFormatter", required: false }] }], showContextMenu: [{ type: i0.Input, args: [{ isSignal: true, alias: "showContextMenu", required: false }] }], contextMenuItems: [{ type: i0.Input, args: [{ isSignal: true, alias: "contextMenuItems", required: false }] }], contextMenuTemplate: [{ type: i0.Input, args: [{ isSignal: true, alias: "contextMenuTemplate", required: false }] }], rowContextMenuFormatter: [{ type: i0.Input, args: [{ isSignal: true, alias: "rowContextMenuFormatter", required: false }] }], contextMenuItemSelected: [{ type: i0.Output, args: ["contextMenuItemSelected"] }], noResultText: [{ type: i0.Input, args: [{ isSignal: true, alias: "noResultText", required: false }] }], noResultTemplate: [{ type: i0.Input, args: [{ isSignal: true, alias: "noResultTemplate", required: false }] }], headerTemplate: [{ type: i0.Input, args: [{ isSignal: true, alias: "headerTemplate", required: false }] }], cellTemplate: [{ type: i0.Input, args: [{ isSignal: true, alias: "cellTemplate", required: false }] }] } });
|
|
410
311
|
|
|
411
312
|
class EntryTableModule {
|
|
412
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
413
|
-
static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "
|
|
414
|
-
EntryCellComponent,
|
|
415
|
-
EntryCellContextMenuComponent,
|
|
416
|
-
EntryCellFormattedValueComponent], imports: [CommonModule,
|
|
313
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.8", ngImport: i0, type: EntryTableModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
|
|
314
|
+
static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "21.2.8", ngImport: i0, type: EntryTableModule, imports: [CommonModule,
|
|
417
315
|
FormsModule,
|
|
418
316
|
MatTableModule,
|
|
419
317
|
MatSortModule,
|
|
@@ -423,11 +321,15 @@ class EntryTableModule {
|
|
|
423
321
|
MatMenuModule,
|
|
424
322
|
MatRadioModule,
|
|
425
323
|
CommonModule,
|
|
426
|
-
MatButtonModule
|
|
324
|
+
MatButtonModule,
|
|
325
|
+
EntryTableComponent,
|
|
326
|
+
EntryCellComponent,
|
|
327
|
+
EntryCellContextMenuComponent,
|
|
328
|
+
EntryCellFormattedValueComponent], exports: [EntryTableComponent,
|
|
427
329
|
EntryCellComponent,
|
|
428
330
|
EntryCellContextMenuComponent,
|
|
429
331
|
EntryCellFormattedValueComponent] }); }
|
|
430
|
-
static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "
|
|
332
|
+
static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "21.2.8", ngImport: i0, type: EntryTableModule, providers: [
|
|
431
333
|
{ provide: DEFAULT_PERCENTAGE_MULTIPLIER, useValue: 1 }
|
|
432
334
|
], imports: [CommonModule,
|
|
433
335
|
FormsModule,
|
|
@@ -439,9 +341,11 @@ class EntryTableModule {
|
|
|
439
341
|
MatMenuModule,
|
|
440
342
|
MatRadioModule,
|
|
441
343
|
CommonModule,
|
|
442
|
-
MatButtonModule
|
|
344
|
+
MatButtonModule,
|
|
345
|
+
EntryTableComponent,
|
|
346
|
+
EntryCellContextMenuComponent] }); }
|
|
443
347
|
}
|
|
444
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
348
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.8", ngImport: i0, type: EntryTableModule, decorators: [{
|
|
445
349
|
type: NgModule,
|
|
446
350
|
args: [{
|
|
447
351
|
imports: [
|
|
@@ -455,9 +359,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.10", ngImpo
|
|
|
455
359
|
MatMenuModule,
|
|
456
360
|
MatRadioModule,
|
|
457
361
|
CommonModule,
|
|
458
|
-
MatButtonModule
|
|
459
|
-
],
|
|
460
|
-
declarations: [
|
|
362
|
+
MatButtonModule,
|
|
461
363
|
EntryTableComponent,
|
|
462
364
|
EntryCellComponent,
|
|
463
365
|
EntryCellContextMenuComponent,
|
|
@@ -479,5 +381,5 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.10", ngImpo
|
|
|
479
381
|
* Generated bundle index. Do not edit.
|
|
480
382
|
*/
|
|
481
383
|
|
|
482
|
-
export { DEFAULT_PERCENTAGE_MULTIPLIER,
|
|
384
|
+
export { DEFAULT_PERCENTAGE_MULTIPLIER, ENTRY_TABLE_CONFIGURATION, EntryCellComponent, EntryCellContextMenuComponent, EntryCellFormattedValueComponent, EntryTableComponent, EntryTableConfiguration, EntryTableModule, PagedQuery, defaultPageNumber, defaultPageSize, provideEntryTableConfiguration };
|
|
483
385
|
//# sourceMappingURL=enigmatry-entry-components-table.mjs.map
|