@rlucan/ui 20.0.12 → 20.0.14
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/fesm2022/rlucan-ui.mjs +11 -2
- package/fesm2022/rlucan-ui.mjs.map +1 -1
- package/index.d.ts +4 -1
- package/package.json +1 -1
package/fesm2022/rlucan-ui.mjs
CHANGED
|
@@ -2224,6 +2224,12 @@ class TableComponent {
|
|
|
2224
2224
|
get columnList() {
|
|
2225
2225
|
return this.columns.map(c => c.name);
|
|
2226
2226
|
}
|
|
2227
|
+
multipleColumns(columns) {
|
|
2228
|
+
return columns.map(c => c.name);
|
|
2229
|
+
}
|
|
2230
|
+
allColumns() {
|
|
2231
|
+
return this.columns.concat(this.multipleRows.flat());
|
|
2232
|
+
}
|
|
2227
2233
|
constructor(/*private persistService: PersistService, */ domSanitizer) {
|
|
2228
2234
|
this.domSanitizer = domSanitizer;
|
|
2229
2235
|
this.columns = [];
|
|
@@ -2232,6 +2238,7 @@ class TableComponent {
|
|
|
2232
2238
|
this.footerTemplates = {};
|
|
2233
2239
|
this.stateStoreKey = '';
|
|
2234
2240
|
this.hasFooter = false;
|
|
2241
|
+
this.multipleRows = [];
|
|
2235
2242
|
}
|
|
2236
2243
|
ngOnInit() {
|
|
2237
2244
|
this.options = { ...{ sticky: false }, ...this.options };
|
|
@@ -2284,11 +2291,11 @@ class TableComponent {
|
|
|
2284
2291
|
}
|
|
2285
2292
|
}
|
|
2286
2293
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.9", ngImport: i0, type: TableComponent, deps: [{ token: i1$1.DomSanitizer }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
2287
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.9", type: TableComponent, isStandalone: false, selector: "ui-table", inputs: { columns: "columns", dataSource: "dataSource", options: "options", rowTemplates: "rowTemplates", headerTemplates: "headerTemplates", footerTemplates: "footerTemplates", stateStoreKey: "stateStoreKey", rowAction: "rowAction", hasFooter: "hasFooter", matSortActive: "matSortActive", matSortDirection: "matSortDirection" }, viewQueries: [{ propertyName: "matSort", first: true, predicate: MatSort, descendants: true }], ngImport: i0, template: "<table mat-table matSort [dataSource]=\"dataSource\" style=\"width: 100%\" [matSortActive]=\"matSortActive\"\r\n [matSortDirection]=\"matSortDirection\">\r\n\r\n <ng-container *ngFor=\"let c of columns\" [matColumnDef]=\"c.name\" [sticky]=\"c.sticky || false\">\r\n\r\n <ng-container *ngIf=\"c.sortable\">\r\n <th mat-header-cell *matHeaderCellDef mat-sort-header>{{ c.label }}</th>\r\n </ng-container>\r\n\r\n <ng-container *ngIf=\"!c.sortable\">\r\n <ng-container *ngIf=\"!headerTemplates[c.name] && !c.headerTemplate\">\r\n <th mat-header-cell *matHeaderCellDef>{{ c.label }}</th>\r\n </ng-container>\r\n\r\n <ng-container *ngIf=\"c.headerTemplate\">\r\n <th mat-header-cell *matHeaderCellDef>\r\n <ng-template [ngTemplateOutlet]=\"c.headerTemplate(c)\"\r\n [ngTemplateOutletContext]=\"{column:c}\"></ng-template>\r\n </th>\r\n </ng-container>\r\n\r\n <ng-container *ngIf=\"headerTemplates[c.name]\">\r\n <th mat-header-cell *matHeaderCellDef>\r\n <ng-template [ngTemplateOutlet]=\"headerTemplates[c.name]\"></ng-template>\r\n </th>\r\n </ng-container>\r\n\r\n <ng-container *ngIf=\"!footerTemplates[c.name] && !c.footerTemplate\">\r\n <td mat-footer-cell *matFooterCellDef>{{ c.footerLabel }}</td>\r\n </ng-container>\r\n\r\n <ng-container *ngIf=\"c.footerTemplate\">\r\n <td mat-footer-cell *matFooterCellDef>\r\n <ng-template [ngTemplateOutlet]=\"c.footerTemplate(c)\"\r\n [ngTemplateOutletContext]=\"{column:c}\"></ng-template>\r\n </td>\r\n </ng-container>\r\n\r\n <ng-container *ngIf=\"footerTemplates[c.name]\">\r\n <td mat-footer-cell *matFooterCellDef>\r\n <ng-template [ngTemplateOutlet]=\"footerTemplates[c.name]\"></ng-template>\r\n </td>\r\n </ng-container>\r\n\r\n </ng-container>\r\n\r\n <td mat-cell *matCellDef=\"let element\" [colSpan]=\"c.colSpan ? c.colSpan(element) : 1\"\r\n [class]=\"c.cellClass ? c.cellClass(element, c) : ''\">\r\n <ng-container *ngIf=\"!c.colSpan || c.colSpan(element) > 0\">\r\n <ng-container *ngIf=\"rowTemplates[c.name]\">\r\n <ng-template [ngTemplateOutlet]=\"rowTemplates[c.name]\"\r\n [ngTemplateOutletContext]=\"{row:element}\"></ng-template>\r\n </ng-container>\r\n\r\n <ng-container *ngIf=\"c.cellTemplate\">\r\n <ng-template [ngTemplateOutlet]=\"c.cellTemplate(c, element)\"\r\n [ngTemplateOutletContext]=\"{row:element, column: c}\"></ng-template>\r\n </ng-container>\r\n\r\n <ng-container *ngIf=\"!rowTemplates[c.name] && !c.cellTemplate\">\r\n <span [innerHTML]=\"display(element, c)\"></span>\r\n </ng-container>\r\n </ng-container>\r\n </td>\r\n </ng-container>\r\n\r\n <tr mat-header-row *matHeaderRowDef=\"columnList; sticky: options?.headerSticky\"></tr>\r\n <tr mat-row *matRowDef=\"let row; columns: columnList;\" (click)=\"rowClicked(row)\"></tr>\r\n @if (hasFooter) {\r\n <tr mat-footer-row *matFooterRowDef=\"columnList; sticky: options?.footerSticky\"></tr>\r\n }\r\n</table>\r\n", styles: [":host table{width:100%}:host td[colspan=\"0\"]{display:none}:host .mat-header-cell{font-weight:400;font-size:14px}:host.inverse .mat-header-row{background-color:#fff}\n"], dependencies: [{ kind: "directive", type: i2.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i2.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "component", type: i3$4.MatTable, selector: "mat-table, table[mat-table]", exportAs: ["matTable"] }, { kind: "directive", type: i3$4.MatHeaderCellDef, selector: "[matHeaderCellDef]" }, { kind: "directive", type: i3$4.MatHeaderRowDef, selector: "[matHeaderRowDef]", inputs: ["matHeaderRowDef", "matHeaderRowDefSticky"] }, { kind: "directive", type: i3$4.MatColumnDef, selector: "[matColumnDef]", inputs: ["matColumnDef"] }, { kind: "directive", type: i3$4.MatCellDef, selector: "[matCellDef]" }, { kind: "directive", type: i3$4.MatRowDef, selector: "[matRowDef]", inputs: ["matRowDefColumns", "matRowDefWhen"] }, { kind: "directive", type: i3$4.MatFooterCellDef, selector: "[matFooterCellDef]" }, { kind: "directive", type: i3$4.MatFooterRowDef, selector: "[matFooterRowDef]", inputs: ["matFooterRowDef", "matFooterRowDefSticky"] }, { kind: "directive", type: i3$4.MatHeaderCell, selector: "mat-header-cell, th[mat-header-cell]" }, { kind: "directive", type: i3$4.MatCell, selector: "mat-cell, td[mat-cell]" }, { kind: "directive", type: i3$4.MatFooterCell, selector: "mat-footer-cell, td[mat-footer-cell]" }, { kind: "component", type: i3$4.MatHeaderRow, selector: "mat-header-row, tr[mat-header-row]", exportAs: ["matHeaderRow"] }, { kind: "component", type: i3$4.MatRow, selector: "mat-row, tr[mat-row]", exportAs: ["matRow"] }, { kind: "component", type: i3$4.MatFooterRow, selector: "mat-footer-row, tr[mat-footer-row]", exportAs: ["matFooterRow"] }, { kind: "directive", type: i4$7.MatSort, selector: "[matSort]", inputs: ["matSortActive", "matSortStart", "matSortDirection", "matSortDisableClear", "matSortDisabled"], outputs: ["matSortChange"], exportAs: ["matSort"] }, { kind: "component", type: i4$7.MatSortHeader, selector: "[mat-sort-header]", inputs: ["mat-sort-header", "arrowPosition", "start", "disabled", "sortActionDescription", "disableClear"], exportAs: ["matSortHeader"] }] }); }
|
|
2294
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.9", type: TableComponent, isStandalone: false, selector: "ui-table", inputs: { columns: "columns", dataSource: "dataSource", options: "options", rowTemplates: "rowTemplates", headerTemplates: "headerTemplates", footerTemplates: "footerTemplates", stateStoreKey: "stateStoreKey", rowAction: "rowAction", hasFooter: "hasFooter", multipleRows: "multipleRows", matSortActive: "matSortActive", matSortDirection: "matSortDirection" }, viewQueries: [{ propertyName: "matSort", first: true, predicate: MatSort, descendants: true }], ngImport: i0, template: "@if (multipleRows.length > 0) {\r\n<table mat-table matSort [dataSource]=\"dataSource\" style=\"width: 100%\" [matSortActive]=\"matSortActive\" multiTemplateDataRows\r\n [matSortDirection]=\"matSortDirection\">\r\n\r\n <ng-container *ngFor=\"let c of allColumns()\" [matColumnDef]=\"c.name\" [sticky]=\"c.sticky || false\">\r\n\r\n <ng-container *ngIf=\"c.sortable\">\r\n <th mat-header-cell *matHeaderCellDef mat-sort-header>{{ c.label }}</th>\r\n </ng-container>\r\n\r\n <ng-container *ngIf=\"!c.sortable\">\r\n <ng-container *ngIf=\"!headerTemplates[c.name] && !c.headerTemplate\">\r\n <th mat-header-cell *matHeaderCellDef>{{ c.label }}</th>\r\n </ng-container>\r\n\r\n <ng-container *ngIf=\"c.headerTemplate\">\r\n <th mat-header-cell *matHeaderCellDef>\r\n <ng-template [ngTemplateOutlet]=\"c.headerTemplate(c)\"\r\n [ngTemplateOutletContext]=\"{column:c}\"></ng-template>\r\n </th>\r\n </ng-container>\r\n\r\n <ng-container *ngIf=\"headerTemplates[c.name]\">\r\n <th mat-header-cell *matHeaderCellDef>\r\n <ng-template [ngTemplateOutlet]=\"headerTemplates[c.name]\"></ng-template>\r\n </th>\r\n </ng-container>\r\n\r\n <ng-container *ngIf=\"!footerTemplates[c.name] && !c.footerTemplate\">\r\n <td mat-footer-cell *matFooterCellDef>{{ c.footerLabel }}</td>\r\n </ng-container>\r\n\r\n <ng-container *ngIf=\"c.footerTemplate\">\r\n <td mat-footer-cell *matFooterCellDef>\r\n <ng-template [ngTemplateOutlet]=\"c.footerTemplate(c)\"\r\n [ngTemplateOutletContext]=\"{column:c}\"></ng-template>\r\n </td>\r\n </ng-container>\r\n\r\n <ng-container *ngIf=\"footerTemplates[c.name]\">\r\n <td mat-footer-cell *matFooterCellDef>\r\n <ng-template [ngTemplateOutlet]=\"footerTemplates[c.name]\"></ng-template>\r\n </td>\r\n </ng-container>\r\n\r\n </ng-container>\r\n\r\n <td mat-cell *matCellDef=\"let element\" [colSpan]=\"c.colSpan ? c.colSpan(element) : 1\"\r\n [class]=\"c.cellClass ? c.cellClass(element, c) : ''\">\r\n <ng-container *ngIf=\"!c.colSpan || c.colSpan(element) > 0\">\r\n <ng-container *ngIf=\"rowTemplates[c.name]\">\r\n <ng-template [ngTemplateOutlet]=\"rowTemplates[c.name]\"\r\n [ngTemplateOutletContext]=\"{row:element}\"></ng-template>\r\n </ng-container>\r\n\r\n <ng-container *ngIf=\"c.cellTemplate\">\r\n <ng-template [ngTemplateOutlet]=\"c.cellTemplate(c, element)\"\r\n [ngTemplateOutletContext]=\"{row:element, column: c}\"></ng-template>\r\n </ng-container>\r\n\r\n <ng-container *ngIf=\"!rowTemplates[c.name] && !c.cellTemplate\">\r\n <span [innerHTML]=\"display(element, c)\"></span>\r\n </ng-container>\r\n </ng-container>\r\n </td>\r\n </ng-container>\r\n\r\n <tr mat-header-row *matHeaderRowDef=\"columnList; sticky: options?.headerSticky\"></tr>\r\n <tr mat-row *matRowDef=\"let row; columns: columnList;\" (click)=\"rowClicked(row)\"></tr>\r\n @for (r of multipleRows; track r) {\r\n <tr mat-row *matRowDef=\"let row; columns: multipleColumns(r);\"></tr>\r\n }\r\n @if (hasFooter) {\r\n <tr mat-footer-row *matFooterRowDef=\"columnList; sticky: options?.footerSticky\"></tr>\r\n }\r\n</table>\r\n} @else {\r\n<table mat-table matSort [dataSource]=\"dataSource\" style=\"width: 100%\" [matSortActive]=\"matSortActive\"\r\n [matSortDirection]=\"matSortDirection\">\r\n\r\n <ng-container *ngFor=\"let c of columns\" [matColumnDef]=\"c.name\" [sticky]=\"c.sticky || false\">\r\n\r\n <ng-container *ngIf=\"c.sortable\">\r\n <th mat-header-cell *matHeaderCellDef mat-sort-header>{{ c.label }}</th>\r\n </ng-container>\r\n\r\n <ng-container *ngIf=\"!c.sortable\">\r\n <ng-container *ngIf=\"!headerTemplates[c.name] && !c.headerTemplate\">\r\n <th mat-header-cell *matHeaderCellDef>{{ c.label }}</th>\r\n </ng-container>\r\n\r\n <ng-container *ngIf=\"c.headerTemplate\">\r\n <th mat-header-cell *matHeaderCellDef>\r\n <ng-template [ngTemplateOutlet]=\"c.headerTemplate(c)\"\r\n [ngTemplateOutletContext]=\"{column:c}\"></ng-template>\r\n </th>\r\n </ng-container>\r\n\r\n <ng-container *ngIf=\"headerTemplates[c.name]\">\r\n <th mat-header-cell *matHeaderCellDef>\r\n <ng-template [ngTemplateOutlet]=\"headerTemplates[c.name]\"></ng-template>\r\n </th>\r\n </ng-container>\r\n\r\n <ng-container *ngIf=\"!footerTemplates[c.name] && !c.footerTemplate\">\r\n <td mat-footer-cell *matFooterCellDef>{{ c.footerLabel }}</td>\r\n </ng-container>\r\n\r\n <ng-container *ngIf=\"c.footerTemplate\">\r\n <td mat-footer-cell *matFooterCellDef>\r\n <ng-template [ngTemplateOutlet]=\"c.footerTemplate(c)\"\r\n [ngTemplateOutletContext]=\"{column:c}\"></ng-template>\r\n </td>\r\n </ng-container>\r\n\r\n <ng-container *ngIf=\"footerTemplates[c.name]\">\r\n <td mat-footer-cell *matFooterCellDef>\r\n <ng-template [ngTemplateOutlet]=\"footerTemplates[c.name]\"></ng-template>\r\n </td>\r\n </ng-container>\r\n\r\n </ng-container>\r\n\r\n <td mat-cell *matCellDef=\"let element\" [colSpan]=\"c.colSpan ? c.colSpan(element) : 1\"\r\n [class]=\"c.cellClass ? c.cellClass(element, c) : ''\">\r\n <ng-container *ngIf=\"!c.colSpan || c.colSpan(element) > 0\">\r\n <ng-container *ngIf=\"rowTemplates[c.name]\">\r\n <ng-template [ngTemplateOutlet]=\"rowTemplates[c.name]\"\r\n [ngTemplateOutletContext]=\"{row:element}\"></ng-template>\r\n </ng-container>\r\n\r\n <ng-container *ngIf=\"c.cellTemplate\">\r\n <ng-template [ngTemplateOutlet]=\"c.cellTemplate(c, element)\"\r\n [ngTemplateOutletContext]=\"{row:element, column: c}\"></ng-template>\r\n </ng-container>\r\n\r\n <ng-container *ngIf=\"!rowTemplates[c.name] && !c.cellTemplate\">\r\n <span [innerHTML]=\"display(element, c)\"></span>\r\n </ng-container>\r\n </ng-container>\r\n </td>\r\n </ng-container>\r\n\r\n <tr mat-header-row *matHeaderRowDef=\"columnList; sticky: options?.headerSticky\"></tr>\r\n <tr mat-row *matRowDef=\"let row; columns: columnList;\" (click)=\"rowClicked(row)\"></tr>\r\n @if (hasFooter) {\r\n <tr mat-footer-row *matFooterRowDef=\"columnList; sticky: options?.footerSticky\"></tr>\r\n }\r\n</table>\r\n}\r\n", styles: [":host table{width:100%}:host td[colspan=\"0\"]{display:none}:host .mat-header-cell{font-weight:400;font-size:14px}:host.inverse .mat-header-row{background-color:#fff}\n"], dependencies: [{ kind: "directive", type: i2.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i2.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "component", type: i3$4.MatTable, selector: "mat-table, table[mat-table]", exportAs: ["matTable"] }, { kind: "directive", type: i3$4.MatHeaderCellDef, selector: "[matHeaderCellDef]" }, { kind: "directive", type: i3$4.MatHeaderRowDef, selector: "[matHeaderRowDef]", inputs: ["matHeaderRowDef", "matHeaderRowDefSticky"] }, { kind: "directive", type: i3$4.MatColumnDef, selector: "[matColumnDef]", inputs: ["matColumnDef"] }, { kind: "directive", type: i3$4.MatCellDef, selector: "[matCellDef]" }, { kind: "directive", type: i3$4.MatRowDef, selector: "[matRowDef]", inputs: ["matRowDefColumns", "matRowDefWhen"] }, { kind: "directive", type: i3$4.MatFooterCellDef, selector: "[matFooterCellDef]" }, { kind: "directive", type: i3$4.MatFooterRowDef, selector: "[matFooterRowDef]", inputs: ["matFooterRowDef", "matFooterRowDefSticky"] }, { kind: "directive", type: i3$4.MatHeaderCell, selector: "mat-header-cell, th[mat-header-cell]" }, { kind: "directive", type: i3$4.MatCell, selector: "mat-cell, td[mat-cell]" }, { kind: "directive", type: i3$4.MatFooterCell, selector: "mat-footer-cell, td[mat-footer-cell]" }, { kind: "component", type: i3$4.MatHeaderRow, selector: "mat-header-row, tr[mat-header-row]", exportAs: ["matHeaderRow"] }, { kind: "component", type: i3$4.MatRow, selector: "mat-row, tr[mat-row]", exportAs: ["matRow"] }, { kind: "component", type: i3$4.MatFooterRow, selector: "mat-footer-row, tr[mat-footer-row]", exportAs: ["matFooterRow"] }, { kind: "directive", type: i4$7.MatSort, selector: "[matSort]", inputs: ["matSortActive", "matSortStart", "matSortDirection", "matSortDisableClear", "matSortDisabled"], outputs: ["matSortChange"], exportAs: ["matSort"] }, { kind: "component", type: i4$7.MatSortHeader, selector: "[mat-sort-header]", inputs: ["mat-sort-header", "arrowPosition", "start", "disabled", "sortActionDescription", "disableClear"], exportAs: ["matSortHeader"] }] }); }
|
|
2288
2295
|
}
|
|
2289
2296
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.9", ngImport: i0, type: TableComponent, decorators: [{
|
|
2290
2297
|
type: Component,
|
|
2291
|
-
args: [{ selector: 'ui-table', standalone: false, template: "<table mat-table matSort [dataSource]=\"dataSource\" style=\"width: 100%\" [matSortActive]=\"matSortActive\"\r\n [matSortDirection]=\"matSortDirection\">\r\n\r\n <ng-container *ngFor=\"let c of columns\" [matColumnDef]=\"c.name\" [sticky]=\"c.sticky || false\">\r\n\r\n <ng-container *ngIf=\"c.sortable\">\r\n <th mat-header-cell *matHeaderCellDef mat-sort-header>{{ c.label }}</th>\r\n </ng-container>\r\n\r\n <ng-container *ngIf=\"!c.sortable\">\r\n <ng-container *ngIf=\"!headerTemplates[c.name] && !c.headerTemplate\">\r\n <th mat-header-cell *matHeaderCellDef>{{ c.label }}</th>\r\n </ng-container>\r\n\r\n <ng-container *ngIf=\"c.headerTemplate\">\r\n <th mat-header-cell *matHeaderCellDef>\r\n <ng-template [ngTemplateOutlet]=\"c.headerTemplate(c)\"\r\n [ngTemplateOutletContext]=\"{column:c}\"></ng-template>\r\n </th>\r\n </ng-container>\r\n\r\n <ng-container *ngIf=\"headerTemplates[c.name]\">\r\n <th mat-header-cell *matHeaderCellDef>\r\n <ng-template [ngTemplateOutlet]=\"headerTemplates[c.name]\"></ng-template>\r\n </th>\r\n </ng-container>\r\n\r\n <ng-container *ngIf=\"!footerTemplates[c.name] && !c.footerTemplate\">\r\n <td mat-footer-cell *matFooterCellDef>{{ c.footerLabel }}</td>\r\n </ng-container>\r\n\r\n <ng-container *ngIf=\"c.footerTemplate\">\r\n <td mat-footer-cell *matFooterCellDef>\r\n <ng-template [ngTemplateOutlet]=\"c.footerTemplate(c)\"\r\n [ngTemplateOutletContext]=\"{column:c}\"></ng-template>\r\n </td>\r\n </ng-container>\r\n\r\n <ng-container *ngIf=\"footerTemplates[c.name]\">\r\n <td mat-footer-cell *matFooterCellDef>\r\n <ng-template [ngTemplateOutlet]=\"footerTemplates[c.name]\"></ng-template>\r\n </td>\r\n </ng-container>\r\n\r\n </ng-container>\r\n\r\n <td mat-cell *matCellDef=\"let element\" [colSpan]=\"c.colSpan ? c.colSpan(element) : 1\"\r\n [class]=\"c.cellClass ? c.cellClass(element, c) : ''\">\r\n <ng-container *ngIf=\"!c.colSpan || c.colSpan(element) > 0\">\r\n <ng-container *ngIf=\"rowTemplates[c.name]\">\r\n <ng-template [ngTemplateOutlet]=\"rowTemplates[c.name]\"\r\n [ngTemplateOutletContext]=\"{row:element}\"></ng-template>\r\n </ng-container>\r\n\r\n <ng-container *ngIf=\"c.cellTemplate\">\r\n <ng-template [ngTemplateOutlet]=\"c.cellTemplate(c, element)\"\r\n [ngTemplateOutletContext]=\"{row:element, column: c}\"></ng-template>\r\n </ng-container>\r\n\r\n <ng-container *ngIf=\"!rowTemplates[c.name] && !c.cellTemplate\">\r\n <span [innerHTML]=\"display(element, c)\"></span>\r\n </ng-container>\r\n </ng-container>\r\n </td>\r\n </ng-container>\r\n\r\n <tr mat-header-row *matHeaderRowDef=\"columnList; sticky: options?.headerSticky\"></tr>\r\n <tr mat-row *matRowDef=\"let row; columns: columnList;\" (click)=\"rowClicked(row)\"></tr>\r\n @if (hasFooter) {\r\n <tr mat-footer-row *matFooterRowDef=\"columnList; sticky: options?.footerSticky\"></tr>\r\n }\r\n</table>\r\n", styles: [":host table{width:100%}:host td[colspan=\"0\"]{display:none}:host .mat-header-cell{font-weight:400;font-size:14px}:host.inverse .mat-header-row{background-color:#fff}\n"] }]
|
|
2298
|
+
args: [{ selector: 'ui-table', standalone: false, template: "@if (multipleRows.length > 0) {\r\n<table mat-table matSort [dataSource]=\"dataSource\" style=\"width: 100%\" [matSortActive]=\"matSortActive\" multiTemplateDataRows\r\n [matSortDirection]=\"matSortDirection\">\r\n\r\n <ng-container *ngFor=\"let c of allColumns()\" [matColumnDef]=\"c.name\" [sticky]=\"c.sticky || false\">\r\n\r\n <ng-container *ngIf=\"c.sortable\">\r\n <th mat-header-cell *matHeaderCellDef mat-sort-header>{{ c.label }}</th>\r\n </ng-container>\r\n\r\n <ng-container *ngIf=\"!c.sortable\">\r\n <ng-container *ngIf=\"!headerTemplates[c.name] && !c.headerTemplate\">\r\n <th mat-header-cell *matHeaderCellDef>{{ c.label }}</th>\r\n </ng-container>\r\n\r\n <ng-container *ngIf=\"c.headerTemplate\">\r\n <th mat-header-cell *matHeaderCellDef>\r\n <ng-template [ngTemplateOutlet]=\"c.headerTemplate(c)\"\r\n [ngTemplateOutletContext]=\"{column:c}\"></ng-template>\r\n </th>\r\n </ng-container>\r\n\r\n <ng-container *ngIf=\"headerTemplates[c.name]\">\r\n <th mat-header-cell *matHeaderCellDef>\r\n <ng-template [ngTemplateOutlet]=\"headerTemplates[c.name]\"></ng-template>\r\n </th>\r\n </ng-container>\r\n\r\n <ng-container *ngIf=\"!footerTemplates[c.name] && !c.footerTemplate\">\r\n <td mat-footer-cell *matFooterCellDef>{{ c.footerLabel }}</td>\r\n </ng-container>\r\n\r\n <ng-container *ngIf=\"c.footerTemplate\">\r\n <td mat-footer-cell *matFooterCellDef>\r\n <ng-template [ngTemplateOutlet]=\"c.footerTemplate(c)\"\r\n [ngTemplateOutletContext]=\"{column:c}\"></ng-template>\r\n </td>\r\n </ng-container>\r\n\r\n <ng-container *ngIf=\"footerTemplates[c.name]\">\r\n <td mat-footer-cell *matFooterCellDef>\r\n <ng-template [ngTemplateOutlet]=\"footerTemplates[c.name]\"></ng-template>\r\n </td>\r\n </ng-container>\r\n\r\n </ng-container>\r\n\r\n <td mat-cell *matCellDef=\"let element\" [colSpan]=\"c.colSpan ? c.colSpan(element) : 1\"\r\n [class]=\"c.cellClass ? c.cellClass(element, c) : ''\">\r\n <ng-container *ngIf=\"!c.colSpan || c.colSpan(element) > 0\">\r\n <ng-container *ngIf=\"rowTemplates[c.name]\">\r\n <ng-template [ngTemplateOutlet]=\"rowTemplates[c.name]\"\r\n [ngTemplateOutletContext]=\"{row:element}\"></ng-template>\r\n </ng-container>\r\n\r\n <ng-container *ngIf=\"c.cellTemplate\">\r\n <ng-template [ngTemplateOutlet]=\"c.cellTemplate(c, element)\"\r\n [ngTemplateOutletContext]=\"{row:element, column: c}\"></ng-template>\r\n </ng-container>\r\n\r\n <ng-container *ngIf=\"!rowTemplates[c.name] && !c.cellTemplate\">\r\n <span [innerHTML]=\"display(element, c)\"></span>\r\n </ng-container>\r\n </ng-container>\r\n </td>\r\n </ng-container>\r\n\r\n <tr mat-header-row *matHeaderRowDef=\"columnList; sticky: options?.headerSticky\"></tr>\r\n <tr mat-row *matRowDef=\"let row; columns: columnList;\" (click)=\"rowClicked(row)\"></tr>\r\n @for (r of multipleRows; track r) {\r\n <tr mat-row *matRowDef=\"let row; columns: multipleColumns(r);\"></tr>\r\n }\r\n @if (hasFooter) {\r\n <tr mat-footer-row *matFooterRowDef=\"columnList; sticky: options?.footerSticky\"></tr>\r\n }\r\n</table>\r\n} @else {\r\n<table mat-table matSort [dataSource]=\"dataSource\" style=\"width: 100%\" [matSortActive]=\"matSortActive\"\r\n [matSortDirection]=\"matSortDirection\">\r\n\r\n <ng-container *ngFor=\"let c of columns\" [matColumnDef]=\"c.name\" [sticky]=\"c.sticky || false\">\r\n\r\n <ng-container *ngIf=\"c.sortable\">\r\n <th mat-header-cell *matHeaderCellDef mat-sort-header>{{ c.label }}</th>\r\n </ng-container>\r\n\r\n <ng-container *ngIf=\"!c.sortable\">\r\n <ng-container *ngIf=\"!headerTemplates[c.name] && !c.headerTemplate\">\r\n <th mat-header-cell *matHeaderCellDef>{{ c.label }}</th>\r\n </ng-container>\r\n\r\n <ng-container *ngIf=\"c.headerTemplate\">\r\n <th mat-header-cell *matHeaderCellDef>\r\n <ng-template [ngTemplateOutlet]=\"c.headerTemplate(c)\"\r\n [ngTemplateOutletContext]=\"{column:c}\"></ng-template>\r\n </th>\r\n </ng-container>\r\n\r\n <ng-container *ngIf=\"headerTemplates[c.name]\">\r\n <th mat-header-cell *matHeaderCellDef>\r\n <ng-template [ngTemplateOutlet]=\"headerTemplates[c.name]\"></ng-template>\r\n </th>\r\n </ng-container>\r\n\r\n <ng-container *ngIf=\"!footerTemplates[c.name] && !c.footerTemplate\">\r\n <td mat-footer-cell *matFooterCellDef>{{ c.footerLabel }}</td>\r\n </ng-container>\r\n\r\n <ng-container *ngIf=\"c.footerTemplate\">\r\n <td mat-footer-cell *matFooterCellDef>\r\n <ng-template [ngTemplateOutlet]=\"c.footerTemplate(c)\"\r\n [ngTemplateOutletContext]=\"{column:c}\"></ng-template>\r\n </td>\r\n </ng-container>\r\n\r\n <ng-container *ngIf=\"footerTemplates[c.name]\">\r\n <td mat-footer-cell *matFooterCellDef>\r\n <ng-template [ngTemplateOutlet]=\"footerTemplates[c.name]\"></ng-template>\r\n </td>\r\n </ng-container>\r\n\r\n </ng-container>\r\n\r\n <td mat-cell *matCellDef=\"let element\" [colSpan]=\"c.colSpan ? c.colSpan(element) : 1\"\r\n [class]=\"c.cellClass ? c.cellClass(element, c) : ''\">\r\n <ng-container *ngIf=\"!c.colSpan || c.colSpan(element) > 0\">\r\n <ng-container *ngIf=\"rowTemplates[c.name]\">\r\n <ng-template [ngTemplateOutlet]=\"rowTemplates[c.name]\"\r\n [ngTemplateOutletContext]=\"{row:element}\"></ng-template>\r\n </ng-container>\r\n\r\n <ng-container *ngIf=\"c.cellTemplate\">\r\n <ng-template [ngTemplateOutlet]=\"c.cellTemplate(c, element)\"\r\n [ngTemplateOutletContext]=\"{row:element, column: c}\"></ng-template>\r\n </ng-container>\r\n\r\n <ng-container *ngIf=\"!rowTemplates[c.name] && !c.cellTemplate\">\r\n <span [innerHTML]=\"display(element, c)\"></span>\r\n </ng-container>\r\n </ng-container>\r\n </td>\r\n </ng-container>\r\n\r\n <tr mat-header-row *matHeaderRowDef=\"columnList; sticky: options?.headerSticky\"></tr>\r\n <tr mat-row *matRowDef=\"let row; columns: columnList;\" (click)=\"rowClicked(row)\"></tr>\r\n @if (hasFooter) {\r\n <tr mat-footer-row *matFooterRowDef=\"columnList; sticky: options?.footerSticky\"></tr>\r\n }\r\n</table>\r\n}\r\n", styles: [":host table{width:100%}:host td[colspan=\"0\"]{display:none}:host .mat-header-cell{font-weight:400;font-size:14px}:host.inverse .mat-header-row{background-color:#fff}\n"] }]
|
|
2292
2299
|
}], ctorParameters: () => [{ type: i1$1.DomSanitizer }], propDecorators: { columns: [{
|
|
2293
2300
|
type: Input
|
|
2294
2301
|
}], dataSource: [{
|
|
@@ -2307,6 +2314,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.9", ngImpor
|
|
|
2307
2314
|
type: Input
|
|
2308
2315
|
}], hasFooter: [{
|
|
2309
2316
|
type: Input
|
|
2317
|
+
}], multipleRows: [{
|
|
2318
|
+
type: Input
|
|
2310
2319
|
}], matSortActive: [{
|
|
2311
2320
|
type: Input
|
|
2312
2321
|
}], matSortDirection: [{
|