@evotor-dev/ui-kit 8.1.0 → 8.3.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/esm2022/lib/components/evo-table/evo-table/evo-table.component.mjs +6 -3
- package/fesm2022/evotor-dev-ui-kit.mjs +5 -2
- package/fesm2022/evotor-dev-ui-kit.mjs.map +1 -1
- package/lib/components/evo-table/evo-table/evo-table.component.d.ts +3 -3
- package/package.json +1 -1
- package/styles/components/evo-title.scss +4 -0
|
@@ -38,17 +38,20 @@ export class EvoTableComponent {
|
|
|
38
38
|
event: event,
|
|
39
39
|
});
|
|
40
40
|
}
|
|
41
|
+
getClasses(row, item) {
|
|
42
|
+
return typeof this.rowClasses === 'function' ? this.rowClasses(row, item) : this.rowClasses;
|
|
43
|
+
}
|
|
41
44
|
filterColumns() {
|
|
42
45
|
if (this.visibleColumns && this.columns) {
|
|
43
46
|
this.filteredColumns = this.columns.filter((col) => this.visibleColumns.includes(col.prop));
|
|
44
47
|
}
|
|
45
48
|
}
|
|
46
49
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.10", ngImport: i0, type: EvoTableComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
47
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "17.3.10", type: EvoTableComponent, isStandalone: true, selector: "evo-table", inputs: { data: "data", showHeader: "showHeader", stripe: "stripe", visibleColumns: "visibleColumns", rowClasses: "rowClasses" }, outputs: { rowClick: "rowClick" }, queries: [{ propertyName: "columns", predicate: EvoTableColumnComponent }], usesOnChanges: true, ngImport: i0, template: "<div class=\"evo-table\" [ngClass]=\"{'evo-table_row-clickable': states.isRowClickable}\">\n @if (showHeader) {\n <div class=\"evo-table__row evo-table__row_head mobile-hide\">\n @for (column of filteredColumns; track column.label) {\n <div class=\"evo-table__cell evo-table__cell_head\" [ngClass]=\"column.className\">\n @if (column.header; as header) {\n <ng-container *ngTemplateOutlet=\"header; context: {label: column.label}\" />\n } @else {\n {{ column.label }}\n }\n </div>\n }\n </div>\n }\n\n @for (item of data; track item; let row = $index) {\n <div class=\"evo-table__row\" [ngClass]=\"
|
|
50
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "17.3.10", type: EvoTableComponent, isStandalone: true, selector: "evo-table", inputs: { data: "data", showHeader: "showHeader", stripe: "stripe", visibleColumns: "visibleColumns", rowClasses: "rowClasses" }, outputs: { rowClick: "rowClick" }, queries: [{ propertyName: "columns", predicate: EvoTableColumnComponent }], usesOnChanges: true, ngImport: i0, template: "<div class=\"evo-table\" [ngClass]=\"{'evo-table_row-clickable': states.isRowClickable}\">\n @if (showHeader) {\n <div class=\"evo-table__row evo-table__row_head mobile-hide\">\n @for (column of filteredColumns; track column.label) {\n <div class=\"evo-table__cell evo-table__cell_head\" [ngClass]=\"column.className\">\n @if (column.header; as header) {\n <ng-container *ngTemplateOutlet=\"header; context: {label: column.label}\" />\n } @else {\n {{ column.label }}\n }\n </div>\n }\n </div>\n }\n\n @for (item of data; track item; let row = $index) {\n <div class=\"evo-table__row\" [ngClass]=\"getClasses(row, item)\" (click)=\"onRowClick(row, item, $event)\">\n @for (column of filteredColumns; track column.label; let col = $index) {\n <div class=\"evo-table__cell\" [ngClass]=\"column.className\">\n @if (column.label) {\n <div class=\"evo-table__label mobile-show\">\n @if (column.header; as header) {\n <ng-container *ngTemplateOutlet=\"header; context: {label: column.label}\" />\n } @else {\n {{ column.label }}\n }\n </div>\n }\n\n @if (column.content; as content) {\n <div class=\"evo-table__data\">\n <ng-container *ngTemplateOutlet=\"content; context: {row: row, col: col, item: item}\" />\n </div>\n } @else {\n {{ column.formatter(row, col, column.prop !== undefined ? item[column.prop] : item, item) }}\n }\n </div>\n }\n </div>\n }\n</div>\n", styles: [".evo-table{color:#212121}@media (min-width: 768px){.evo-table{display:table;width:100%}}.evo-table__row{padding:8px}.evo-table__row:nth-child(2n){background-color:#f4f6f8}@media (min-width: 768px){.evo-table__row{display:table-row}.evo-table__row:hover{background-color:#fff8e6}.evo-table__row_head:hover{background:none}}.evo-table__cell{margin-bottom:20px}.evo-table__cell:last-child{margin-bottom:0}@media (min-width: 768px){.evo-table__cell{display:table-cell;height:48px;padding:0 8px;vertical-align:middle}}.evo-table__cell_head{height:auto;padding-top:0;padding-bottom:16px;font-weight:600;white-space:nowrap}@media (min-width: 768px){.evo-table__cell.text-right{text-align:right}}@media (min-width: 768px){.evo-table__cell.text-center{text-align:center}}.evo-table__sort{position:relative;display:inline-block;padding-right:20px;vertical-align:top;cursor:pointer}.evo-table__sort_up:after,.evo-table__sort_down:after{content:\"\";position:absolute;right:0;border:5px solid transparent}.evo-table__sort_up:after{top:4px;border-bottom-color:#212121}.evo-table__sort_down:after{top:8px;border-top-color:#212121}.evo-table__label{margin-bottom:4px;font-weight:600}.evo-table_row-clickable .evo-table__row{cursor:pointer}:host(.evo-table_mobile) .evo-table__row{padding:0}@media (min-width: 768px){:host(.evo-table_mobile) .evo-table__row{display:table-row}:host(.evo-table_mobile) .evo-table__row:hover{background-color:#fff8e6}:host(.evo-table_mobile) .evo-table__row_head:hover{background:none}}:host(.evo-table_mobile) .evo-table__cell{display:flex;margin-bottom:0;padding:13px 8px}@media (min-width: 768px){:host(.evo-table_mobile) .evo-table__cell{display:table-cell;height:52px;padding:11px 16px;vertical-align:middle}}:host(.evo-table_mobile) .evo-table__label{width:50%;margin-bottom:0}@media (min-width: 768px){:host(.evo-table_mobile) .evo-table__label{width:auto;margin-bottom:4px}}:host(.evo-table_mobile-align_right) .evo-table__cell{justify-content:space-between}:host(.evo-table_mobile_short) .evo-table{display:table;width:100%}:host(.evo-table_mobile_short) .evo-table__row{display:table-row;padding:16px}:host(.evo-table_mobile_short) .evo-table__row:nth-child(2n){background-color:#f4f6f8}:host(.evo-table_mobile_short) .evo-table__row:hover{background-color:#fff8e6}:host(.evo-table_mobile_short) .evo-table__row_head:hover{background:none}:host(.evo-table_mobile_short) .evo-table__cell{display:table-cell;height:52px;padding:11px 16px;vertical-align:middle}:host(.evo-table_mobile_short) .evo-table__cell_head{height:auto;padding-top:0;padding-bottom:16px;font-weight:600;white-space:nowrap;border-top:none}:host(.evo-table_with-title) .evo-table__cell{font-weight:400}:host(.evo-table_with-title) .evo-table__cell:first-child{font-weight:600}@media (min-width: 768px){:host(.evo-table_with-title) .evo-table__cell:first-child{font-weight:400}}:host(.evo-table_with-title) .evo-table__cell:first-child .evo-table__label{display:none}:host(.evo-table_with-title) .evo-table__label{font-weight:400}\n"], dependencies: [{ kind: "directive", type: NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }] }); }
|
|
48
51
|
}
|
|
49
52
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.10", ngImport: i0, type: EvoTableComponent, decorators: [{
|
|
50
53
|
type: Component,
|
|
51
|
-
args: [{ selector: 'evo-table', standalone: true, imports: [NgClass, NgTemplateOutlet], template: "<div class=\"evo-table\" [ngClass]=\"{'evo-table_row-clickable': states.isRowClickable}\">\n @if (showHeader) {\n <div class=\"evo-table__row evo-table__row_head mobile-hide\">\n @for (column of filteredColumns; track column.label) {\n <div class=\"evo-table__cell evo-table__cell_head\" [ngClass]=\"column.className\">\n @if (column.header; as header) {\n <ng-container *ngTemplateOutlet=\"header; context: {label: column.label}\" />\n } @else {\n {{ column.label }}\n }\n </div>\n }\n </div>\n }\n\n @for (item of data; track item; let row = $index) {\n <div class=\"evo-table__row\" [ngClass]=\"
|
|
54
|
+
args: [{ selector: 'evo-table', standalone: true, imports: [NgClass, NgTemplateOutlet], template: "<div class=\"evo-table\" [ngClass]=\"{'evo-table_row-clickable': states.isRowClickable}\">\n @if (showHeader) {\n <div class=\"evo-table__row evo-table__row_head mobile-hide\">\n @for (column of filteredColumns; track column.label) {\n <div class=\"evo-table__cell evo-table__cell_head\" [ngClass]=\"column.className\">\n @if (column.header; as header) {\n <ng-container *ngTemplateOutlet=\"header; context: {label: column.label}\" />\n } @else {\n {{ column.label }}\n }\n </div>\n }\n </div>\n }\n\n @for (item of data; track item; let row = $index) {\n <div class=\"evo-table__row\" [ngClass]=\"getClasses(row, item)\" (click)=\"onRowClick(row, item, $event)\">\n @for (column of filteredColumns; track column.label; let col = $index) {\n <div class=\"evo-table__cell\" [ngClass]=\"column.className\">\n @if (column.label) {\n <div class=\"evo-table__label mobile-show\">\n @if (column.header; as header) {\n <ng-container *ngTemplateOutlet=\"header; context: {label: column.label}\" />\n } @else {\n {{ column.label }}\n }\n </div>\n }\n\n @if (column.content; as content) {\n <div class=\"evo-table__data\">\n <ng-container *ngTemplateOutlet=\"content; context: {row: row, col: col, item: item}\" />\n </div>\n } @else {\n {{ column.formatter(row, col, column.prop !== undefined ? item[column.prop] : item, item) }}\n }\n </div>\n }\n </div>\n }\n</div>\n", styles: [".evo-table{color:#212121}@media (min-width: 768px){.evo-table{display:table;width:100%}}.evo-table__row{padding:8px}.evo-table__row:nth-child(2n){background-color:#f4f6f8}@media (min-width: 768px){.evo-table__row{display:table-row}.evo-table__row:hover{background-color:#fff8e6}.evo-table__row_head:hover{background:none}}.evo-table__cell{margin-bottom:20px}.evo-table__cell:last-child{margin-bottom:0}@media (min-width: 768px){.evo-table__cell{display:table-cell;height:48px;padding:0 8px;vertical-align:middle}}.evo-table__cell_head{height:auto;padding-top:0;padding-bottom:16px;font-weight:600;white-space:nowrap}@media (min-width: 768px){.evo-table__cell.text-right{text-align:right}}@media (min-width: 768px){.evo-table__cell.text-center{text-align:center}}.evo-table__sort{position:relative;display:inline-block;padding-right:20px;vertical-align:top;cursor:pointer}.evo-table__sort_up:after,.evo-table__sort_down:after{content:\"\";position:absolute;right:0;border:5px solid transparent}.evo-table__sort_up:after{top:4px;border-bottom-color:#212121}.evo-table__sort_down:after{top:8px;border-top-color:#212121}.evo-table__label{margin-bottom:4px;font-weight:600}.evo-table_row-clickable .evo-table__row{cursor:pointer}:host(.evo-table_mobile) .evo-table__row{padding:0}@media (min-width: 768px){:host(.evo-table_mobile) .evo-table__row{display:table-row}:host(.evo-table_mobile) .evo-table__row:hover{background-color:#fff8e6}:host(.evo-table_mobile) .evo-table__row_head:hover{background:none}}:host(.evo-table_mobile) .evo-table__cell{display:flex;margin-bottom:0;padding:13px 8px}@media (min-width: 768px){:host(.evo-table_mobile) .evo-table__cell{display:table-cell;height:52px;padding:11px 16px;vertical-align:middle}}:host(.evo-table_mobile) .evo-table__label{width:50%;margin-bottom:0}@media (min-width: 768px){:host(.evo-table_mobile) .evo-table__label{width:auto;margin-bottom:4px}}:host(.evo-table_mobile-align_right) .evo-table__cell{justify-content:space-between}:host(.evo-table_mobile_short) .evo-table{display:table;width:100%}:host(.evo-table_mobile_short) .evo-table__row{display:table-row;padding:16px}:host(.evo-table_mobile_short) .evo-table__row:nth-child(2n){background-color:#f4f6f8}:host(.evo-table_mobile_short) .evo-table__row:hover{background-color:#fff8e6}:host(.evo-table_mobile_short) .evo-table__row_head:hover{background:none}:host(.evo-table_mobile_short) .evo-table__cell{display:table-cell;height:52px;padding:11px 16px;vertical-align:middle}:host(.evo-table_mobile_short) .evo-table__cell_head{height:auto;padding-top:0;padding-bottom:16px;font-weight:600;white-space:nowrap;border-top:none}:host(.evo-table_with-title) .evo-table__cell{font-weight:400}:host(.evo-table_with-title) .evo-table__cell:first-child{font-weight:600}@media (min-width: 768px){:host(.evo-table_with-title) .evo-table__cell:first-child{font-weight:400}}:host(.evo-table_with-title) .evo-table__cell:first-child .evo-table__label{display:none}:host(.evo-table_with-title) .evo-table__label{font-weight:400}\n"] }]
|
|
52
55
|
}], propDecorators: { data: [{
|
|
53
56
|
type: Input
|
|
54
57
|
}], showHeader: [{
|
|
@@ -65,4 +68,4 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.10", ngImpo
|
|
|
65
68
|
type: ContentChildren,
|
|
66
69
|
args: [EvoTableColumnComponent]
|
|
67
70
|
}] } });
|
|
68
|
-
//# sourceMappingURL=data:application/json;base64,
|
|
71
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiZXZvLXRhYmxlLmNvbXBvbmVudC5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uLy4uLy4uLy4uL3Byb2plY3RzL2V2by11aS1raXQvc3JjL2xpYi9jb21wb25lbnRzL2V2by10YWJsZS9ldm8tdGFibGUvZXZvLXRhYmxlLmNvbXBvbmVudC50cyIsIi4uLy4uLy4uLy4uLy4uLy4uLy4uL3Byb2plY3RzL2V2by11aS1raXQvc3JjL2xpYi9jb21wb25lbnRzL2V2by10YWJsZS9ldm8tdGFibGUvZXZvLXRhYmxlLmNvbXBvbmVudC5odG1sIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUFBLE9BQU8sRUFFSCxTQUFTLEVBQ1QsZUFBZSxFQUNmLFlBQVksRUFDWixLQUFLLEVBR0wsTUFBTSxHQUVULE1BQU0sZUFBZSxDQUFDO0FBQ3ZCLE9BQU8sRUFBQyx1QkFBdUIsRUFBQyxNQUFNLGdEQUFnRCxDQUFDO0FBQ3ZGLE9BQU8sRUFBQyxPQUFPLEVBQUUsZ0JBQWdCLEVBQUMsTUFBTSxpQkFBaUIsQ0FBQzs7QUFFMUQsTUFBTSxPQUFPLHFCQUFxQjtDQU9qQztBQVNELE1BQU0sT0FBTyxpQkFBaUI7SUFQOUI7UUFRSSxvQkFBZSxHQUE4QixFQUFFLENBQUM7UUFJaEQsMkJBQTJCO1FBQ2xCLGVBQVUsR0FBRyxJQUFJLENBQUM7UUFDbEIsV0FBTSxHQUFHLEtBQUssQ0FBQztRQUtkLGFBQVEsR0FBd0MsSUFBSSxZQUFZLEVBQXlCLENBQUM7UUFHcEcsV0FBTSxHQUFHO1lB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2NlbGxfaGVhZFwiIFtuZ0NsYXNzXT1cImNvbHVtbi5jbGFzc05hbWVcIj5cbiAgICAgICAgICAgICAgICAgICAgQGlmIChjb2x1bW4uaGVhZGVyOyBhcyBoZWFkZXIpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIDxuZy1jb250YWluZXIgKm5nVGVtcGxhdGVPdXRsZXQ9XCJoZWFkZXI7IGNvbnRleHQ6IHtsYWJlbDogY29sdW1uLmxhYmVsfVwiIC8+XG4gICAgICAgICAgICAgICAgICAgIH0gQGVsc2Uge1xuICAgICAgICAgICAgICAgICAgICAgICAge3sgY29sdW1uLmxhYmVsIH19XG4gICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICA8L2Rpdj5cbiAgICAgICAgICAgIH1cbiAgICAgICAgPC9kaXY+XG4gICAgfVxuXG4gICAgQGZvciAoaXRlbSBvZiBkYXRhOyB0cmFjayBpdGVtOyBsZXQgcm93ID0gJGluZGV4KSB7XG4gICAgICAgIDxkaXYgY2xhc3M9XCJldm8tdGFibGVfX3Jvd1wiIFtuZ0NsYXNzXT1cImdldENsYXNzZXMocm93LCBpdGVtKVwiIChjbGljayk9XCJvblJvd0NsaWNrKHJvdywgaXRlbSwgJGV2ZW50KVwiPlxuICAgICAgICAgICAgQGZvciAoY29sdW1uIG9mIGZpbHRlcmVkQ29sdW1uczsgdHJhY2sgY29sdW1uLmxhYmVsOyBsZXQgY29sID0gJGluZGV4KSB7XG4gICAgICAgICAgICAgICAgPGRpdiBjbGFzcz1cImV2by10YWJsZV9fY2VsbFwiIFtuZ0NsYXNzXT1cImNvbHVtbi5jbGFzc05hbWVcIj5cbiAgICAgICAgICAgICAgICAgICAgQGlmIChjb2x1bW4ubGFiZWwpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIDxkaXYgY2xhc3M9XCJldm8tdGFibGVfX2xhYmVsIG1vYmlsZS1zaG93XCI+XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgQGlmIChjb2x1bW4uaGVhZGVyOyBhcyBoZWFkZXIpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgPG5nLWNvbnRhaW5lciAqbmdUZW1wbGF0ZU91dGxldD1cImhlYWRlcjsgY29udGV4dDoge2xhYmVsOiBjb2x1bW4ubGFiZWx9XCIgLz5cbiAgICAgICAgICAgICAgICAgICAgICAgICAgICB9IEBlbHNlIHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAge3sgY29sdW1uLmxhYmVsIH19XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICAgICAgPC9kaXY+XG4gICAgICAgICAgICAgICAgICAgIH1cblxuICAgICAgICAgICAgICAgICAgICBAaWYgKGNvbHVtbi5jb250ZW50OyBhcyBjb250ZW50KSB7XG4gICAgICAgICAgICAgICAgICAgICAgICA8ZGl2IGNsYXNzPVwiZXZvLXRhYmxlX19kYXRhXCI+XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgPG5nLWNvbnRhaW5lciAqbmdUZW1wbGF0ZU91dGxldD1cImNvbnRlbnQ7IGNvbnRleHQ6IHtyb3c6IHJvdywgY29sOiBjb2wsIGl0ZW06IGl0ZW19XCIgLz5cbiAgICAgICAgICAgICAgICAgICAgICAgIDwvZGl2PlxuICAgICAgICAgICAgICAgICAgICB9IEBlbHNlIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIHt7IGNvbHVtbi5mb3JtYXR0ZXIocm93LCBjb2wsIGNvbHVtbi5wcm9wICE9PSB1bmRlZmluZWQgPyBpdGVtW2NvbHVtbi5wcm9wXSA6IGl0ZW0sIGl0ZW0pIH19XG4gICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICA8L2Rpdj5cbiAgICAgICAgICAgIH1cbiAgICAgICAgPC9kaXY+XG4gICAgfVxuPC9kaXY+XG4iXX0=
|
|
@@ -4674,17 +4674,20 @@ class EvoTableComponent {
|
|
|
4674
4674
|
event: event,
|
|
4675
4675
|
});
|
|
4676
4676
|
}
|
|
4677
|
+
getClasses(row, item) {
|
|
4678
|
+
return typeof this.rowClasses === 'function' ? this.rowClasses(row, item) : this.rowClasses;
|
|
4679
|
+
}
|
|
4677
4680
|
filterColumns() {
|
|
4678
4681
|
if (this.visibleColumns && this.columns) {
|
|
4679
4682
|
this.filteredColumns = this.columns.filter((col) => this.visibleColumns.includes(col.prop));
|
|
4680
4683
|
}
|
|
4681
4684
|
}
|
|
4682
4685
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.10", ngImport: i0, type: EvoTableComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
4683
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "17.3.10", type: EvoTableComponent, isStandalone: true, selector: "evo-table", inputs: { data: "data", showHeader: "showHeader", stripe: "stripe", visibleColumns: "visibleColumns", rowClasses: "rowClasses" }, outputs: { rowClick: "rowClick" }, queries: [{ propertyName: "columns", predicate: EvoTableColumnComponent }], usesOnChanges: true, ngImport: i0, template: "<div class=\"evo-table\" [ngClass]=\"{'evo-table_row-clickable': states.isRowClickable}\">\n @if (showHeader) {\n <div class=\"evo-table__row evo-table__row_head mobile-hide\">\n @for (column of filteredColumns; track column.label) {\n <div class=\"evo-table__cell evo-table__cell_head\" [ngClass]=\"column.className\">\n @if (column.header; as header) {\n <ng-container *ngTemplateOutlet=\"header; context: {label: column.label}\" />\n } @else {\n {{ column.label }}\n }\n </div>\n }\n </div>\n }\n\n @for (item of data; track item; let row = $index) {\n <div class=\"evo-table__row\" [ngClass]=\"
|
|
4686
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "17.3.10", type: EvoTableComponent, isStandalone: true, selector: "evo-table", inputs: { data: "data", showHeader: "showHeader", stripe: "stripe", visibleColumns: "visibleColumns", rowClasses: "rowClasses" }, outputs: { rowClick: "rowClick" }, queries: [{ propertyName: "columns", predicate: EvoTableColumnComponent }], usesOnChanges: true, ngImport: i0, template: "<div class=\"evo-table\" [ngClass]=\"{'evo-table_row-clickable': states.isRowClickable}\">\n @if (showHeader) {\n <div class=\"evo-table__row evo-table__row_head mobile-hide\">\n @for (column of filteredColumns; track column.label) {\n <div class=\"evo-table__cell evo-table__cell_head\" [ngClass]=\"column.className\">\n @if (column.header; as header) {\n <ng-container *ngTemplateOutlet=\"header; context: {label: column.label}\" />\n } @else {\n {{ column.label }}\n }\n </div>\n }\n </div>\n }\n\n @for (item of data; track item; let row = $index) {\n <div class=\"evo-table__row\" [ngClass]=\"getClasses(row, item)\" (click)=\"onRowClick(row, item, $event)\">\n @for (column of filteredColumns; track column.label; let col = $index) {\n <div class=\"evo-table__cell\" [ngClass]=\"column.className\">\n @if (column.label) {\n <div class=\"evo-table__label mobile-show\">\n @if (column.header; as header) {\n <ng-container *ngTemplateOutlet=\"header; context: {label: column.label}\" />\n } @else {\n {{ column.label }}\n }\n </div>\n }\n\n @if (column.content; as content) {\n <div class=\"evo-table__data\">\n <ng-container *ngTemplateOutlet=\"content; context: {row: row, col: col, item: item}\" />\n </div>\n } @else {\n {{ column.formatter(row, col, column.prop !== undefined ? item[column.prop] : item, item) }}\n }\n </div>\n }\n </div>\n }\n</div>\n", styles: [".evo-table{color:#212121}@media (min-width: 768px){.evo-table{display:table;width:100%}}.evo-table__row{padding:8px}.evo-table__row:nth-child(2n){background-color:#f4f6f8}@media (min-width: 768px){.evo-table__row{display:table-row}.evo-table__row:hover{background-color:#fff8e6}.evo-table__row_head:hover{background:none}}.evo-table__cell{margin-bottom:20px}.evo-table__cell:last-child{margin-bottom:0}@media (min-width: 768px){.evo-table__cell{display:table-cell;height:48px;padding:0 8px;vertical-align:middle}}.evo-table__cell_head{height:auto;padding-top:0;padding-bottom:16px;font-weight:600;white-space:nowrap}@media (min-width: 768px){.evo-table__cell.text-right{text-align:right}}@media (min-width: 768px){.evo-table__cell.text-center{text-align:center}}.evo-table__sort{position:relative;display:inline-block;padding-right:20px;vertical-align:top;cursor:pointer}.evo-table__sort_up:after,.evo-table__sort_down:after{content:\"\";position:absolute;right:0;border:5px solid transparent}.evo-table__sort_up:after{top:4px;border-bottom-color:#212121}.evo-table__sort_down:after{top:8px;border-top-color:#212121}.evo-table__label{margin-bottom:4px;font-weight:600}.evo-table_row-clickable .evo-table__row{cursor:pointer}:host(.evo-table_mobile) .evo-table__row{padding:0}@media (min-width: 768px){:host(.evo-table_mobile) .evo-table__row{display:table-row}:host(.evo-table_mobile) .evo-table__row:hover{background-color:#fff8e6}:host(.evo-table_mobile) .evo-table__row_head:hover{background:none}}:host(.evo-table_mobile) .evo-table__cell{display:flex;margin-bottom:0;padding:13px 8px}@media (min-width: 768px){:host(.evo-table_mobile) .evo-table__cell{display:table-cell;height:52px;padding:11px 16px;vertical-align:middle}}:host(.evo-table_mobile) .evo-table__label{width:50%;margin-bottom:0}@media (min-width: 768px){:host(.evo-table_mobile) .evo-table__label{width:auto;margin-bottom:4px}}:host(.evo-table_mobile-align_right) .evo-table__cell{justify-content:space-between}:host(.evo-table_mobile_short) .evo-table{display:table;width:100%}:host(.evo-table_mobile_short) .evo-table__row{display:table-row;padding:16px}:host(.evo-table_mobile_short) .evo-table__row:nth-child(2n){background-color:#f4f6f8}:host(.evo-table_mobile_short) .evo-table__row:hover{background-color:#fff8e6}:host(.evo-table_mobile_short) .evo-table__row_head:hover{background:none}:host(.evo-table_mobile_short) .evo-table__cell{display:table-cell;height:52px;padding:11px 16px;vertical-align:middle}:host(.evo-table_mobile_short) .evo-table__cell_head{height:auto;padding-top:0;padding-bottom:16px;font-weight:600;white-space:nowrap;border-top:none}:host(.evo-table_with-title) .evo-table__cell{font-weight:400}:host(.evo-table_with-title) .evo-table__cell:first-child{font-weight:600}@media (min-width: 768px){:host(.evo-table_with-title) .evo-table__cell:first-child{font-weight:400}}:host(.evo-table_with-title) .evo-table__cell:first-child .evo-table__label{display:none}:host(.evo-table_with-title) .evo-table__label{font-weight:400}\n"], dependencies: [{ kind: "directive", type: NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }] }); }
|
|
4684
4687
|
}
|
|
4685
4688
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.10", ngImport: i0, type: EvoTableComponent, decorators: [{
|
|
4686
4689
|
type: Component,
|
|
4687
|
-
args: [{ selector: 'evo-table', standalone: true, imports: [NgClass, NgTemplateOutlet], template: "<div class=\"evo-table\" [ngClass]=\"{'evo-table_row-clickable': states.isRowClickable}\">\n @if (showHeader) {\n <div class=\"evo-table__row evo-table__row_head mobile-hide\">\n @for (column of filteredColumns; track column.label) {\n <div class=\"evo-table__cell evo-table__cell_head\" [ngClass]=\"column.className\">\n @if (column.header; as header) {\n <ng-container *ngTemplateOutlet=\"header; context: {label: column.label}\" />\n } @else {\n {{ column.label }}\n }\n </div>\n }\n </div>\n }\n\n @for (item of data; track item; let row = $index) {\n <div class=\"evo-table__row\" [ngClass]=\"
|
|
4690
|
+
args: [{ selector: 'evo-table', standalone: true, imports: [NgClass, NgTemplateOutlet], template: "<div class=\"evo-table\" [ngClass]=\"{'evo-table_row-clickable': states.isRowClickable}\">\n @if (showHeader) {\n <div class=\"evo-table__row evo-table__row_head mobile-hide\">\n @for (column of filteredColumns; track column.label) {\n <div class=\"evo-table__cell evo-table__cell_head\" [ngClass]=\"column.className\">\n @if (column.header; as header) {\n <ng-container *ngTemplateOutlet=\"header; context: {label: column.label}\" />\n } @else {\n {{ column.label }}\n }\n </div>\n }\n </div>\n }\n\n @for (item of data; track item; let row = $index) {\n <div class=\"evo-table__row\" [ngClass]=\"getClasses(row, item)\" (click)=\"onRowClick(row, item, $event)\">\n @for (column of filteredColumns; track column.label; let col = $index) {\n <div class=\"evo-table__cell\" [ngClass]=\"column.className\">\n @if (column.label) {\n <div class=\"evo-table__label mobile-show\">\n @if (column.header; as header) {\n <ng-container *ngTemplateOutlet=\"header; context: {label: column.label}\" />\n } @else {\n {{ column.label }}\n }\n </div>\n }\n\n @if (column.content; as content) {\n <div class=\"evo-table__data\">\n <ng-container *ngTemplateOutlet=\"content; context: {row: row, col: col, item: item}\" />\n </div>\n } @else {\n {{ column.formatter(row, col, column.prop !== undefined ? item[column.prop] : item, item) }}\n }\n </div>\n }\n </div>\n }\n</div>\n", styles: [".evo-table{color:#212121}@media (min-width: 768px){.evo-table{display:table;width:100%}}.evo-table__row{padding:8px}.evo-table__row:nth-child(2n){background-color:#f4f6f8}@media (min-width: 768px){.evo-table__row{display:table-row}.evo-table__row:hover{background-color:#fff8e6}.evo-table__row_head:hover{background:none}}.evo-table__cell{margin-bottom:20px}.evo-table__cell:last-child{margin-bottom:0}@media (min-width: 768px){.evo-table__cell{display:table-cell;height:48px;padding:0 8px;vertical-align:middle}}.evo-table__cell_head{height:auto;padding-top:0;padding-bottom:16px;font-weight:600;white-space:nowrap}@media (min-width: 768px){.evo-table__cell.text-right{text-align:right}}@media (min-width: 768px){.evo-table__cell.text-center{text-align:center}}.evo-table__sort{position:relative;display:inline-block;padding-right:20px;vertical-align:top;cursor:pointer}.evo-table__sort_up:after,.evo-table__sort_down:after{content:\"\";position:absolute;right:0;border:5px solid transparent}.evo-table__sort_up:after{top:4px;border-bottom-color:#212121}.evo-table__sort_down:after{top:8px;border-top-color:#212121}.evo-table__label{margin-bottom:4px;font-weight:600}.evo-table_row-clickable .evo-table__row{cursor:pointer}:host(.evo-table_mobile) .evo-table__row{padding:0}@media (min-width: 768px){:host(.evo-table_mobile) .evo-table__row{display:table-row}:host(.evo-table_mobile) .evo-table__row:hover{background-color:#fff8e6}:host(.evo-table_mobile) .evo-table__row_head:hover{background:none}}:host(.evo-table_mobile) .evo-table__cell{display:flex;margin-bottom:0;padding:13px 8px}@media (min-width: 768px){:host(.evo-table_mobile) .evo-table__cell{display:table-cell;height:52px;padding:11px 16px;vertical-align:middle}}:host(.evo-table_mobile) .evo-table__label{width:50%;margin-bottom:0}@media (min-width: 768px){:host(.evo-table_mobile) .evo-table__label{width:auto;margin-bottom:4px}}:host(.evo-table_mobile-align_right) .evo-table__cell{justify-content:space-between}:host(.evo-table_mobile_short) .evo-table{display:table;width:100%}:host(.evo-table_mobile_short) .evo-table__row{display:table-row;padding:16px}:host(.evo-table_mobile_short) .evo-table__row:nth-child(2n){background-color:#f4f6f8}:host(.evo-table_mobile_short) .evo-table__row:hover{background-color:#fff8e6}:host(.evo-table_mobile_short) .evo-table__row_head:hover{background:none}:host(.evo-table_mobile_short) .evo-table__cell{display:table-cell;height:52px;padding:11px 16px;vertical-align:middle}:host(.evo-table_mobile_short) .evo-table__cell_head{height:auto;padding-top:0;padding-bottom:16px;font-weight:600;white-space:nowrap;border-top:none}:host(.evo-table_with-title) .evo-table__cell{font-weight:400}:host(.evo-table_with-title) .evo-table__cell:first-child{font-weight:600}@media (min-width: 768px){:host(.evo-table_with-title) .evo-table__cell:first-child{font-weight:400}}:host(.evo-table_with-title) .evo-table__cell:first-child .evo-table__label{display:none}:host(.evo-table_with-title) .evo-table__label{font-weight:400}\n"] }]
|
|
4688
4691
|
}], propDecorators: { data: [{
|
|
4689
4692
|
type: Input
|
|
4690
4693
|
}], showHeader: [{
|