@enigmatry/entry-components 19.0.1-preview.5 → 20.0.1-preview.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/button/index.d.ts +54 -3
- package/common/index.d.ts +243 -3
- package/date-time-picker/index.d.ts +100 -3
- package/dialog/index.d.ts +197 -3
- package/fesm2022/enigmatry-entry-components-button.mjs +19 -30
- package/fesm2022/enigmatry-entry-components-button.mjs.map +1 -1
- package/fesm2022/enigmatry-entry-components-common.mjs +129 -133
- package/fesm2022/enigmatry-entry-components-common.mjs.map +1 -1
- package/fesm2022/enigmatry-entry-components-date-time-picker.mjs +53 -50
- package/fesm2022/enigmatry-entry-components-date-time-picker.mjs.map +1 -1
- package/fesm2022/enigmatry-entry-components-dialog.mjs +53 -78
- package/fesm2022/enigmatry-entry-components-dialog.mjs.map +1 -1
- package/fesm2022/enigmatry-entry-components-file-input.mjs +55 -51
- package/fesm2022/enigmatry-entry-components-file-input.mjs.map +1 -1
- package/fesm2022/enigmatry-entry-components-permissions.mjs +28 -23
- package/fesm2022/enigmatry-entry-components-permissions.mjs.map +1 -1
- package/fesm2022/enigmatry-entry-components-search-filter.mjs +55 -59
- package/fesm2022/enigmatry-entry-components-search-filter.mjs.map +1 -1
- package/fesm2022/enigmatry-entry-components-spinner.mjs +21 -21
- package/fesm2022/enigmatry-entry-components-spinner.mjs.map +1 -1
- package/fesm2022/enigmatry-entry-components-table.mjs +77 -86
- package/fesm2022/enigmatry-entry-components-table.mjs.map +1 -1
- package/fesm2022/enigmatry-entry-components-validation.mjs +43 -47
- package/fesm2022/enigmatry-entry-components-validation.mjs.map +1 -1
- package/fesm2022/enigmatry-entry-components.mjs +6 -6
- package/fesm2022/enigmatry-entry-components.mjs.map +1 -1
- package/file-input/index.d.ts +87 -5
- package/index.d.ts +37 -3
- package/package.json +10 -8
- package/permissions/index.d.ts +40 -5
- package/search-filter/index.d.ts +228 -3
- package/spinner/index.d.ts +34 -5
- package/table/README.md +6 -3
- package/table/index.d.ts +260 -4
- package/validation/index.d.ts +123 -3
- package/button/entry-button-config.d.ts +0 -30
- package/button/entry-button.directive.d.ts +0 -18
- package/button/entry-button.module.d.ts +0 -9
- package/button/public-api.d.ts +0 -3
- package/common/common.module.d.ts +0 -14
- package/common/constants.d.ts +0 -2
- package/common/date-time/entry-date-time-adapter.d.ts +0 -41
- package/common/date-time/entry-date-time-formats.d.ts +0 -25
- package/common/date-time/entry-time-adapter.d.ts +0 -9
- package/common/date-time/index.d.ts +0 -4
- package/common/date-time/native-time-adapter.d.ts +0 -13
- package/common/directives/auto-disable-button.directive.d.ts +0 -26
- package/common/directives/index.d.ts +0 -4
- package/common/directives/ng-control-accessor.directive.d.ts +0 -12
- package/common/directives/noop-control-value-accessor.d.ts +0 -10
- package/common/directives/scroll-to-invalid-control.directive.d.ts +0 -18
- package/common/event-plugins/abstract.plugin.d.ts +0 -40
- package/common/event-plugins/debounce.plugin.d.ts +0 -15
- package/common/event-plugins/index.d.ts +0 -2
- package/common/event-plugins/throttle.plugin.d.ts +0 -15
- package/common/interceptors/accept-language.interceptor.d.ts +0 -16
- package/common/interceptors/index.d.ts +0 -1
- package/common/public-api.d.ts +0 -6
- package/common/utils/index.d.ts +0 -1
- package/common/utils/provide-config.d.ts +0 -3
- package/date-time-picker/date-time-picker-config.model.d.ts +0 -20
- package/date-time-picker/date-time-picker.component.d.ts +0 -38
- package/date-time-picker/date-time-picker.module.d.ts +0 -17
- package/date-time-picker/public-api.d.ts +0 -3
- package/date-time-picker/time-picker.component.d.ts +0 -26
- package/dialog/dialogs/alert/entry-alert-dialog-data.interface.d.ts +0 -18
- package/dialog/dialogs/alert/entry-alert-dialog.component.d.ts +0 -13
- package/dialog/dialogs/confirm/entry-confirm-dialog-data.interface.d.ts +0 -8
- package/dialog/dialogs/confirm/entry-confirm-dialog.component.d.ts +0 -13
- package/dialog/dialogs/entry-dialog.component.d.ts +0 -43
- package/dialog/dialogs/error/entry-error-dialog-data.interface.d.ts +0 -9
- package/dialog/dialogs/error/entry-error-dialog.component.d.ts +0 -15
- package/dialog/entry-dialog-buttons-alignment.type.d.ts +0 -2
- package/dialog/entry-dialog-config.model.d.ts +0 -33
- package/dialog/entry-dialog.module.d.ts +0 -15
- package/dialog/entry-dialog.service.d.ts +0 -55
- package/dialog/public-api.d.ts +0 -11
- package/file-input/entry-file-input.component.d.ts +0 -74
- package/file-input/entry-file-input.module.d.ts +0 -12
- package/file-input/public-api.d.ts +0 -2
- package/modules/entry-components.module.d.ts +0 -28
- package/permissions/permission-type.d.ts +0 -3
- package/permissions/permission.directive.d.ts +0 -11
- package/permissions/permission.guard.d.ts +0 -2
- package/permissions/permission.module.d.ts +0 -9
- package/permissions/permission.pipe.d.ts +0 -11
- package/permissions/permission.service.d.ts +0 -4
- package/permissions/public-api.d.ts +0 -5
- package/public-api.d.ts +0 -10
- package/search-filter/autocomplete/autocomplete-search-filter.component.d.ts +0 -22
- package/search-filter/autocomplete/autocomplete-search-filter.model.d.ts +0 -19
- package/search-filter/control-type.d.ts +0 -7
- package/search-filter/date/date-search-filter.component.d.ts +0 -10
- package/search-filter/date/date-search-filter.model.d.ts +0 -8
- package/search-filter/date-time/date-time-search-filter.component.d.ts +0 -10
- package/search-filter/date-time/date-time-search-filter.model.d.ts +0 -8
- package/search-filter/entry-search-filter.component.d.ts +0 -38
- package/search-filter/entry-search-filter.module.d.ts +0 -22
- package/search-filter/public-api.d.ts +0 -11
- package/search-filter/search-filter-base.model.d.ts +0 -29
- package/search-filter/search-filter-config.model.d.ts +0 -16
- package/search-filter/search-filter-params.type.d.ts +0 -7
- package/search-filter/select/select-search-filter.component.d.ts +0 -14
- package/search-filter/select/select-search-filter.model.d.ts +0 -22
- package/search-filter/select-option.model.d.ts +0 -12
- package/search-filter/text/text-search-filter.component.d.ts +0 -10
- package/search-filter/text/text-search-filter.model.d.ts +0 -8
- package/spinner/entry-spinner/spinner.component.d.ts +0 -24
- package/spinner/public-api.d.ts +0 -2
- package/spinner/spinner-overlay-container.d.ts +0 -17
- package/spinner/spinner.module.d.ts +0 -10
- package/table/components/entry-cell/entry-cell.component.d.ts +0 -10
- package/table/components/entry-cell-context-menu/entry-cell-context-menu.component.d.ts +0 -18
- package/table/components/entry-cell-formatted-value/entry-cell-formatted-value.component.d.ts +0 -10
- package/table/components/entry-table/entry-table.component.d.ts +0 -82
- package/table/components/index.d.ts +0 -4
- package/table/entry-table.module.d.ts +0 -20
- package/table/interfaces/cell-template.d.ts +0 -4
- package/table/interfaces/column-def.d.ts +0 -20
- package/table/interfaces/column-sort-prop.d.ts +0 -5
- package/table/interfaces/column-type-parameter.d.ts +0 -9
- package/table/interfaces/column-type.d.ts +0 -1
- package/table/interfaces/context-menu-item.d.ts +0 -7
- package/table/interfaces/entry-table-config.d.ts +0 -33
- package/table/interfaces/index.d.ts +0 -12
- package/table/interfaces/paged-query.d.ts +0 -15
- package/table/interfaces/pagination.d.ts +0 -19
- package/table/interfaces/row-class-formatter.d.ts +0 -3
- package/table/interfaces/row-context-menu-formatter.d.ts +0 -4
- package/table/interfaces/row-selection-formatter.d.ts +0 -4
- package/table/public-api.d.ts +0 -3
- package/validation/entry-display-control-validation.directive.d.ts +0 -27
- package/validation/entry-form-errors.component.d.ts +0 -18
- package/validation/entry-validation-config.model.d.ts +0 -48
- package/validation/entry-validation.d.ts +0 -15
- package/validation/entry-validation.module.d.ts +0 -11
- package/validation/public-api.d.ts +0 -6
- package/validation/validation-problem-details.interface.d.ts +0 -9
|
@@ -2,7 +2,7 @@ import * as i4$1 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, inject, Input, ChangeDetectionStrategy, Component, EventEmitter, ViewChild, Output, ElementRef, ChangeDetectorRef, TemplateRef, HostBinding, NgModule } from '@angular/core';
|
|
6
6
|
import { createInjectionToken, provideConfig } from '@enigmatry/entry-components/common';
|
|
7
7
|
import { SelectionModel } from '@angular/cdk/collections';
|
|
8
8
|
import * as i2$1 from '@angular/material/table';
|
|
@@ -32,6 +32,7 @@ class EntryTableConfig {
|
|
|
32
32
|
/** Page size, default 20 */
|
|
33
33
|
this.pageSize = 20;
|
|
34
34
|
/** Page size options, default [20, 50, 100] */
|
|
35
|
+
// eslint-disable-next-line @typescript-eslint/no-magic-numbers
|
|
35
36
|
this.pageSizeOptions = [20, 50, 100];
|
|
36
37
|
/** Hide page size options, default is false */
|
|
37
38
|
this.hidePageSize = false;
|
|
@@ -60,9 +61,7 @@ class EntryTableConfig {
|
|
|
60
61
|
*/
|
|
61
62
|
const ENTRY_TABLE_CONFIG = createInjectionToken(new EntryTableConfig());
|
|
62
63
|
/** Provide entry table config */
|
|
63
|
-
|
|
64
|
-
return provideConfig(ENTRY_TABLE_CONFIG, () => new EntryTableConfig(config));
|
|
65
|
-
}
|
|
64
|
+
const provideEntryTableConfig = (config) => provideConfig(ENTRY_TABLE_CONFIG, () => new EntryTableConfig(config));
|
|
66
65
|
/** Default percentage multiplier injection token */
|
|
67
66
|
const DEFAULT_PERCENTAGE_MULTIPLIER = new InjectionToken('');
|
|
68
67
|
|
|
@@ -72,6 +71,7 @@ class PagedQuery {
|
|
|
72
71
|
constructor() {
|
|
73
72
|
this.pageNumber = defaultPageNumber;
|
|
74
73
|
this.pageSize = defaultPageSize;
|
|
74
|
+
this.getValueIfNotEmpty = (value) => value ? value : undefined;
|
|
75
75
|
}
|
|
76
76
|
sortChange(sort) {
|
|
77
77
|
if (sort.active) {
|
|
@@ -85,10 +85,10 @@ class PagedQuery {
|
|
|
85
85
|
this.pageSize = page.pageSize;
|
|
86
86
|
}
|
|
87
87
|
applyRouteChanges(queryParams) {
|
|
88
|
-
this.pageNumber = queryParams
|
|
89
|
-
this.pageSize = queryParams
|
|
90
|
-
this.sortBy = this.getValueIfNotEmpty(queryParams
|
|
91
|
-
this.sortDirection = this.getValueIfNotEmpty(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
92
|
}
|
|
93
93
|
getRouteQueryParams() {
|
|
94
94
|
return {
|
|
@@ -98,25 +98,19 @@ class PagedQuery {
|
|
|
98
98
|
sortDirection: this.sortDirection
|
|
99
99
|
};
|
|
100
100
|
}
|
|
101
|
-
getValueIfNotEmpty(value) {
|
|
102
|
-
return value ? value : undefined;
|
|
103
|
-
}
|
|
104
101
|
}
|
|
105
102
|
|
|
106
103
|
class EntryCellFormattedValueComponent {
|
|
107
|
-
constructor(
|
|
108
|
-
this.defaultPercentageMultiplier =
|
|
104
|
+
constructor() {
|
|
105
|
+
this.defaultPercentageMultiplier = inject(DEFAULT_PERCENTAGE_MULTIPLIER);
|
|
109
106
|
}
|
|
110
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
111
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "
|
|
107
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.1.2", ngImport: i0, type: EntryCellFormattedValueComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
108
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "20.1.2", type: EntryCellFormattedValueComponent, isStandalone: false, selector: "entry-cell-formatted-value", inputs: { value: "value", type: "type", typeParameter: "typeParameter" }, ngImport: i0, template: "<ng-container [ngSwitch]=\"type\">\n <!-- Boolean -->\n <ng-container *ngSwitchCase=\"'boolean'\">\n {{value ? '\\u2713' : ''}}\n </ng-container>\n <!-- Number -->\n <ng-container *ngSwitchCase=\"'number'\">\n {{value | number: typeParameter?.digitsInfo : typeParameter?.locale}}\n </ng-container>\n <!-- Currency -->\n <ng-container *ngSwitchCase=\"'currency'\">\n {{value | currency: typeParameter?.currencyCode : typeParameter?.display : typeParameter?.digitsInfo : typeParameter?.locale}}\n </ng-container>\n <!-- Percent -->\n <ng-container *ngSwitchCase=\"'percent'\">\n {{+(value ?? 0) * (typeParameter?.multiplier ?? defaultPercentageMultiplier) | percent: typeParameter?.digitsInfo : typeParameter?.locale}}\n </ng-container>\n <!-- Date -->\n <ng-container *ngSwitchCase=\"'date'\">\n {{value | date: typeParameter?.format : typeParameter?.timezone : typeParameter?.locale}}\n </ng-container>\n <!-- Link -->\n <ng-container *ngSwitchCase=\"'link'\">\n <a [href]=\"value\" target=\"_blank\">{{value}}</a>\n </ng-container>\n <!-- Default -->\n <ng-container *ngSwitchDefault>\n {{value}}\n </ng-container>\n</ng-container>\n", dependencies: [{ kind: "directive", type: i1.NgSwitch, selector: "[ngSwitch]", inputs: ["ngSwitch"] }, { kind: "directive", type: i1.NgSwitchCase, selector: "[ngSwitchCase]", inputs: ["ngSwitchCase"] }, { kind: "directive", type: i1.NgSwitchDefault, selector: "[ngSwitchDefault]" }, { kind: "pipe", type: i1.DecimalPipe, name: "number" }, { kind: "pipe", type: i1.PercentPipe, name: "percent" }, { kind: "pipe", type: i1.CurrencyPipe, name: "currency" }, { kind: "pipe", type: i1.DatePipe, name: "date" }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
112
109
|
}
|
|
113
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
110
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.1.2", ngImport: i0, type: EntryCellFormattedValueComponent, decorators: [{
|
|
114
111
|
type: Component,
|
|
115
|
-
args: [{ selector: 'entry-cell-formatted-value', changeDetection: ChangeDetectionStrategy.OnPush, standalone: false, template: "<ng-container [ngSwitch]=\"type\">\n <!-- Boolean -->\n <ng-container *ngSwitchCase=\"'boolean'\">\n {{value ? '\\u2713' : ''}}\n </ng-container>\n <!-- Number -->\n <ng-container *ngSwitchCase=\"'number'\">\n {{value | number: typeParameter?.digitsInfo : typeParameter?.locale}}\n </ng-container>\n <!-- Currency -->\n <ng-container *ngSwitchCase=\"'currency'\">\n {{value | currency: typeParameter?.currencyCode : typeParameter?.display : typeParameter?.digitsInfo : typeParameter?.locale}}\n </ng-container>\n <!-- Percent -->\n <ng-container *ngSwitchCase=\"'percent'\">\n {{+value * (typeParameter?.multiplier ?? defaultPercentageMultiplier) | percent: typeParameter?.digitsInfo : typeParameter?.locale}}\n </ng-container>\n <!-- Date -->\n <ng-container *ngSwitchCase=\"'date'\">\n {{value | date: typeParameter?.format : typeParameter?.timezone : typeParameter?.locale}}\n </ng-container>\n <!-- Link -->\n <ng-container *ngSwitchCase=\"'link'\">\n <a [href]=\"value\" target=\"_blank\">{{value}}</a>\n </ng-container>\n <!-- Default -->\n <ng-container *ngSwitchDefault>\n {{value}}\n </ng-container>\n</ng-container>\n" }]
|
|
116
|
-
}],
|
|
117
|
-
type: Inject,
|
|
118
|
-
args: [DEFAULT_PERCENTAGE_MULTIPLIER]
|
|
119
|
-
}] }], propDecorators: { value: [{
|
|
112
|
+
args: [{ selector: 'entry-cell-formatted-value', changeDetection: ChangeDetectionStrategy.OnPush, standalone: false, template: "<ng-container [ngSwitch]=\"type\">\n <!-- Boolean -->\n <ng-container *ngSwitchCase=\"'boolean'\">\n {{value ? '\\u2713' : ''}}\n </ng-container>\n <!-- Number -->\n <ng-container *ngSwitchCase=\"'number'\">\n {{value | number: typeParameter?.digitsInfo : typeParameter?.locale}}\n </ng-container>\n <!-- Currency -->\n <ng-container *ngSwitchCase=\"'currency'\">\n {{value | currency: typeParameter?.currencyCode : typeParameter?.display : typeParameter?.digitsInfo : typeParameter?.locale}}\n </ng-container>\n <!-- Percent -->\n <ng-container *ngSwitchCase=\"'percent'\">\n {{+(value ?? 0) * (typeParameter?.multiplier ?? defaultPercentageMultiplier) | percent: typeParameter?.digitsInfo : typeParameter?.locale}}\n </ng-container>\n <!-- Date -->\n <ng-container *ngSwitchCase=\"'date'\">\n {{value | date: typeParameter?.format : typeParameter?.timezone : typeParameter?.locale}}\n </ng-container>\n <!-- Link -->\n <ng-container *ngSwitchCase=\"'link'\">\n <a [href]=\"value\" target=\"_blank\">{{value}}</a>\n </ng-container>\n <!-- Default -->\n <ng-container *ngSwitchDefault>\n {{value}}\n </ng-container>\n</ng-container>\n" }]
|
|
113
|
+
}], propDecorators: { value: [{
|
|
120
114
|
type: Input
|
|
121
115
|
}], type: [{
|
|
122
116
|
type: Input
|
|
@@ -125,19 +119,21 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.1.3", ngImpor
|
|
|
125
119
|
}] } });
|
|
126
120
|
|
|
127
121
|
class EntryCellComponent {
|
|
122
|
+
constructor() {
|
|
123
|
+
this.getCellValue = (rowData, colDef) => {
|
|
124
|
+
const keys = colDef.field ? colDef.field.split('.') : [];
|
|
125
|
+
return keys.reduce((data, key) => data && data[key], rowData);
|
|
126
|
+
};
|
|
127
|
+
}
|
|
128
128
|
get value() {
|
|
129
129
|
return this.getCellValue(this.rowData, this.colDef);
|
|
130
130
|
}
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
return keys.reduce((data, key) => data && data[key], rowData);
|
|
134
|
-
}
|
|
135
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.1.3", ngImport: i0, type: EntryCellComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
136
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.1.3", 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 }); }
|
|
131
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.1.2", ngImport: i0, type: EntryCellComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
132
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "20.1.2", 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 }); }
|
|
137
133
|
}
|
|
138
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
134
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.1.2", ngImport: i0, type: EntryCellComponent, decorators: [{
|
|
139
135
|
type: Component,
|
|
140
|
-
args: [{ selector: 'entry-cell', changeDetection: ChangeDetectionStrategy.OnPush, standalone: false, template: "<entry-cell-formatted-value [value]=\"value\" [type]=\"colDef.type
|
|
136
|
+
args: [{ selector: 'entry-cell', changeDetection: ChangeDetectionStrategy.OnPush, standalone: false, template: "<entry-cell-formatted-value [value]=\"value\" [type]=\"colDef.type!\" [typeParameter]=\"colDef.typeParameter\"></entry-cell-formatted-value>" }]
|
|
141
137
|
}], propDecorators: { rowData: [{
|
|
142
138
|
type: Input
|
|
143
139
|
}], colDef: [{
|
|
@@ -157,12 +153,12 @@ class EntryCellContextMenuComponent {
|
|
|
157
153
|
? this.rowMenuFormatter.items(this.rowData)
|
|
158
154
|
: this.items;
|
|
159
155
|
}
|
|
160
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
161
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "
|
|
156
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.1.2", ngImport: i0, type: EntryCellContextMenuComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
157
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "20.1.2", 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 }); }
|
|
162
158
|
}
|
|
163
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
159
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.1.2", ngImport: i0, type: EntryCellContextMenuComponent, decorators: [{
|
|
164
160
|
type: Component,
|
|
165
|
-
args: [{ selector: 'entry-cell-context-menu', changeDetection: ChangeDetectionStrategy.OnPush, standalone: false, 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
|
|
161
|
+
args: [{ selector: 'entry-cell-context-menu', changeDetection: ChangeDetectionStrategy.OnPush, standalone: false, 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>" }]
|
|
166
162
|
}], propDecorators: { items: [{
|
|
167
163
|
type: Input
|
|
168
164
|
}], rowMenuFormatter: [{
|
|
@@ -180,16 +176,13 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.1.3", ngImpor
|
|
|
180
176
|
args: ['menu', { static: true }]
|
|
181
177
|
}] } });
|
|
182
178
|
|
|
183
|
-
/* eslint-disable
|
|
179
|
+
/* eslint-disable max-lines */
|
|
184
180
|
class EntryTableComponent {
|
|
185
|
-
|
|
186
|
-
return (!this.data || this._data.length === 0) && !this.loading;
|
|
187
|
-
}
|
|
188
|
-
constructor(_config, _elementRef, _changeDetectorRef) {
|
|
189
|
-
this._config = _config;
|
|
190
|
-
this._elementRef = _elementRef;
|
|
191
|
-
this._changeDetectorRef = _changeDetectorRef;
|
|
181
|
+
constructor() {
|
|
192
182
|
this.className = 'entry-table';
|
|
183
|
+
this._config = inject(ENTRY_TABLE_CONFIG);
|
|
184
|
+
this._elementRef = inject((ElementRef));
|
|
185
|
+
this._changeDetectorRef = inject(ChangeDetectorRef);
|
|
193
186
|
this.dataSource = new MatTableDataSource([]);
|
|
194
187
|
this.columns = [];
|
|
195
188
|
// Data
|
|
@@ -222,18 +215,43 @@ class EntryTableComponent {
|
|
|
222
215
|
this.contextMenuItemSelected = new EventEmitter();
|
|
223
216
|
this.selectionColumn = 'selection-column';
|
|
224
217
|
this.contextMenuColumn = 'context-menu-column';
|
|
218
|
+
this.toTemplateIndex = (template, key) => template[key];
|
|
219
|
+
this.isTemplateRef = (obj) => obj instanceof TemplateRef;
|
|
220
|
+
this.getIndex = (index, dataIndex) => typeof index === 'undefined' ? dataIndex : index;
|
|
221
|
+
this.initializeVariables = () => {
|
|
222
|
+
this.showPaginator = this.showPaginator ?? this._config.showPaginator;
|
|
223
|
+
this.showFirstLastButtons = this.showFirstLastButtons ?? this._config.showFirstLastButtons;
|
|
224
|
+
this.pageSizeOptions = this.pageSizeOptions ?? this._config.pageSizeOptions;
|
|
225
|
+
this.hidePageSize = this.hidePageSize ?? this._config.hidePageSize;
|
|
226
|
+
this.noResultText = this.noResultText ?? this._config.noResultsText;
|
|
227
|
+
this.rowFocusVisible = this.rowFocusVisible ?? this._config.rowFocusVisible;
|
|
228
|
+
this.displayedColumns = this.columns.filter(item => !item.hide).map(item => item.field);
|
|
229
|
+
if (this.rowSelectable && !this.displayedColumns.includes(this.selectionColumn)) {
|
|
230
|
+
this.displayedColumns.unshift(this.selectionColumn);
|
|
231
|
+
}
|
|
232
|
+
if (this.showContextMenu && !this.displayedColumns.includes(this.contextMenuColumn)) {
|
|
233
|
+
this.displayedColumns.push(this.contextMenuColumn);
|
|
234
|
+
}
|
|
235
|
+
if (this.rowSelectable) {
|
|
236
|
+
this.rowSelection = new SelectionModel(this.multiSelectable, this.rowSelected);
|
|
237
|
+
}
|
|
238
|
+
if (!this.data) {
|
|
239
|
+
this.data = [];
|
|
240
|
+
}
|
|
241
|
+
};
|
|
242
|
+
this.convertToKebabCase = (value) => value?.replace(/([a-z0-9])([A-Z])/gu, '$1-$2').toLowerCase();
|
|
243
|
+
}
|
|
244
|
+
get hasNoResult() {
|
|
245
|
+
return (!this.data || this._data.length === 0) && !this.loading;
|
|
225
246
|
}
|
|
226
247
|
detectChanges() {
|
|
227
248
|
this._changeDetectorRef.detectChanges();
|
|
228
249
|
}
|
|
229
|
-
isTemplateRef(obj) {
|
|
230
|
-
return obj instanceof TemplateRef;
|
|
231
|
-
}
|
|
232
250
|
getRowClassList(rowData, index) {
|
|
233
251
|
const classList = {
|
|
234
252
|
selected: this.rowSelection.isSelected(rowData),
|
|
235
|
-
// eslint-disable-next-line @typescript-eslint/
|
|
236
|
-
'mat-row-odd': index % 2
|
|
253
|
+
// eslint-disable-next-line @typescript-eslint/no-magic-numbers
|
|
254
|
+
'mat-row-odd': index % 2
|
|
237
255
|
};
|
|
238
256
|
if (this.rowClassFormatter) {
|
|
239
257
|
for (const key of Object.keys(this.rowClassFormatter)) {
|
|
@@ -249,25 +267,7 @@ class EntryTableComponent {
|
|
|
249
267
|
return `${customClasses} ${columnType} ${columnField}`;
|
|
250
268
|
}
|
|
251
269
|
ngOnChanges(changes) {
|
|
252
|
-
this.
|
|
253
|
-
this.showFirstLastButtons = this.showFirstLastButtons ?? this._config.showFirstLastButtons;
|
|
254
|
-
this.pageSizeOptions = this.pageSizeOptions ?? this._config.pageSizeOptions;
|
|
255
|
-
this.hidePageSize = this.hidePageSize ?? this._config.hidePageSize;
|
|
256
|
-
this.noResultText = this.noResultText ?? this._config.noResultsText;
|
|
257
|
-
this.rowFocusVisible = this.rowFocusVisible ?? this._config.rowFocusVisible;
|
|
258
|
-
this.displayedColumns = this.columns.filter(item => !item.hide).map(item => item.field);
|
|
259
|
-
if (this.rowSelectable && !this.displayedColumns.includes(this.selectionColumn)) {
|
|
260
|
-
this.displayedColumns.unshift(this.selectionColumn);
|
|
261
|
-
}
|
|
262
|
-
if (this.showContextMenu && !this.displayedColumns.includes(this.contextMenuColumn)) {
|
|
263
|
-
this.displayedColumns.push(this.contextMenuColumn);
|
|
264
|
-
}
|
|
265
|
-
if (this.rowSelectable) {
|
|
266
|
-
this.rowSelection = new SelectionModel(this.multiSelectable, this.rowSelected);
|
|
267
|
-
}
|
|
268
|
-
if (!this.data) {
|
|
269
|
-
this.data = [];
|
|
270
|
-
}
|
|
270
|
+
this.initializeVariables();
|
|
271
271
|
if (Array.isArray(this.data)) {
|
|
272
272
|
this._data = this.data;
|
|
273
273
|
}
|
|
@@ -282,13 +282,10 @@ class EntryTableComponent {
|
|
|
282
282
|
this.dataSource.disconnect();
|
|
283
283
|
}
|
|
284
284
|
this.dataSource = new MatTableDataSource(this._data);
|
|
285
|
-
if (changes
|
|
285
|
+
if (changes['data']) {
|
|
286
286
|
this.scrollToTop();
|
|
287
287
|
}
|
|
288
288
|
}
|
|
289
|
-
getIndex(index, dataIndex) {
|
|
290
|
-
return typeof index === 'undefined' ? dataIndex : index;
|
|
291
|
-
}
|
|
292
289
|
isAllSelected() {
|
|
293
290
|
const numSelected = this.rowSelection.selected.length;
|
|
294
291
|
const numRows = this.dataSource.data.filter(row => !this.rowSelectionFormatter.disabled?.(row)).length;
|
|
@@ -320,19 +317,13 @@ class EntryTableComponent {
|
|
|
320
317
|
get shouldShowPaginator() {
|
|
321
318
|
return this.showPaginator && this._data.length > 0;
|
|
322
319
|
}
|
|
323
|
-
|
|
324
|
-
return value?.replace(/([a-z0-9])([A-Z])/g, '$1-$2').toLowerCase();
|
|
325
|
-
}
|
|
326
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.1.3", ngImport: i0, type: EntryTableComponent, deps: [{ token: ENTRY_TABLE_CONFIG }, { token: i0.ElementRef }, { token: i0.ChangeDetectorRef }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
327
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.1.3", 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(headerTemplate[col.field])\"\n [ngIfElse]=\"defaultHeaderTpl\">\n <ng-template [ngTemplateOutlet]=\"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(cellTemplate[col.field])\"\n [ngIfElse]=\"colDefCellTpl\">\n <ng-template [ngTemplateOutlet]=\"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 }); }
|
|
320
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.1.2", ngImport: i0, type: EntryTableComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
321
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "20.1.2", 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 }); }
|
|
328
322
|
}
|
|
329
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
323
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.1.2", ngImport: i0, type: EntryTableComponent, decorators: [{
|
|
330
324
|
type: Component,
|
|
331
|
-
args: [{ selector: 'entry-table', changeDetection: ChangeDetectionStrategy.OnPush, standalone: false, 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(headerTemplate
|
|
332
|
-
}],
|
|
333
|
-
type: Inject,
|
|
334
|
-
args: [ENTRY_TABLE_CONFIG]
|
|
335
|
-
}] }, { type: i0.ElementRef }, { type: i0.ChangeDetectorRef }], propDecorators: { className: [{
|
|
325
|
+
args: [{ selector: 'entry-table', changeDetection: ChangeDetectionStrategy.OnPush, standalone: false, 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" }]
|
|
326
|
+
}], propDecorators: { className: [{
|
|
336
327
|
type: HostBinding,
|
|
337
328
|
args: ['class']
|
|
338
329
|
}], displayedColumns: [{
|
|
@@ -359,10 +350,10 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.1.3", ngImpor
|
|
|
359
350
|
type: Input
|
|
360
351
|
}], hidePageSize: [{
|
|
361
352
|
type: Input
|
|
362
|
-
}], pageChange: [{
|
|
363
|
-
type: Output
|
|
364
353
|
}], paginationTemplate: [{
|
|
365
354
|
type: Input
|
|
355
|
+
}], pageChange: [{
|
|
356
|
+
type: Output
|
|
366
357
|
}], sortActive: [{
|
|
367
358
|
type: Input
|
|
368
359
|
}], sortDirection: [{
|
|
@@ -418,8 +409,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.1.3", ngImpor
|
|
|
418
409
|
}] } });
|
|
419
410
|
|
|
420
411
|
class EntryTableModule {
|
|
421
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
422
|
-
static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "
|
|
412
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.1.2", ngImport: i0, type: EntryTableModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
|
|
413
|
+
static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "20.1.2", ngImport: i0, type: EntryTableModule, declarations: [EntryTableComponent,
|
|
423
414
|
EntryCellComponent,
|
|
424
415
|
EntryCellContextMenuComponent,
|
|
425
416
|
EntryCellFormattedValueComponent], imports: [CommonModule,
|
|
@@ -436,7 +427,7 @@ class EntryTableModule {
|
|
|
436
427
|
EntryCellComponent,
|
|
437
428
|
EntryCellContextMenuComponent,
|
|
438
429
|
EntryCellFormattedValueComponent] }); }
|
|
439
|
-
static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "
|
|
430
|
+
static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "20.1.2", ngImport: i0, type: EntryTableModule, providers: [
|
|
440
431
|
{ provide: DEFAULT_PERCENTAGE_MULTIPLIER, useValue: 1 }
|
|
441
432
|
], imports: [CommonModule,
|
|
442
433
|
FormsModule,
|
|
@@ -450,7 +441,7 @@ class EntryTableModule {
|
|
|
450
441
|
CommonModule,
|
|
451
442
|
MatButtonModule] }); }
|
|
452
443
|
}
|
|
453
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
444
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.1.2", ngImport: i0, type: EntryTableModule, decorators: [{
|
|
454
445
|
type: NgModule,
|
|
455
446
|
args: [{
|
|
456
447
|
imports: [
|