@smartbit4all/ng-client 5.0.14 → 5.0.15
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/smartbit4all-ng-client.mjs +13 -12
- package/fesm2022/smartbit4all-ng-client.mjs.map +1 -1
- package/lib/smart-table/tables/material-table/material-table.component.d.ts +2 -1
- package/lib/smart-table/tables/mobile-table/mobile-table.component.d.ts +2 -1
- package/lib/smart-table/tables/table.d.ts +3 -2
- package/package.json +1 -1
- package/smartbit4all-ng-client-5.0.15.tgz +0 -0
- package/smartbit4all-ng-client-5.0.14.tgz +0 -0
|
@@ -7420,8 +7420,9 @@ class SmartObjectUtility {
|
|
|
7420
7420
|
}
|
|
7421
7421
|
|
|
7422
7422
|
class Table {
|
|
7423
|
-
constructor(cfService) {
|
|
7423
|
+
constructor(cfService, changeDetector) {
|
|
7424
7424
|
this.cfService = cfService;
|
|
7425
|
+
this.changeDetector = changeDetector;
|
|
7425
7426
|
this._destroy$ = new Subject();
|
|
7426
7427
|
this.tableType = SmartTableType;
|
|
7427
7428
|
this.smartTableButtonType = SmartTableButtonType;
|
|
@@ -7476,7 +7477,7 @@ class Table {
|
|
|
7476
7477
|
this.renderRows();
|
|
7477
7478
|
}
|
|
7478
7479
|
renderRows() {
|
|
7479
|
-
this.
|
|
7480
|
+
this.changeDetector.markForCheck();
|
|
7480
7481
|
}
|
|
7481
7482
|
handleOnRowDoubleClick(event, element) {
|
|
7482
7483
|
if (this.smartTable.defaultActions && this.smartTable.defaultActions.length > 0) {
|
|
@@ -7917,7 +7918,7 @@ class Table {
|
|
|
7917
7918
|
}
|
|
7918
7919
|
return undefined;
|
|
7919
7920
|
}
|
|
7920
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.3", ngImport: i0, type: Table, deps: [{ token: ComponentFactoryService }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
7921
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.3", ngImport: i0, type: Table, deps: [{ token: ComponentFactoryService }, { token: i0.ChangeDetectorRef }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
7921
7922
|
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.2.3", type: Table, isStandalone: false, selector: "ng-component", inputs: { smartTable: "smartTable" }, viewQueries: [{ propertyName: "myTableChild", first: true, predicate: ["myTable"], descendants: true }, { propertyName: "triggers", predicate: MatMenuTrigger, descendants: true }, { propertyName: "vcRef", predicate: ["expandedArea"], descendants: true, read: ViewContainerRef }, { propertyName: "defaultActionMenuComponents", predicate: DefaultActionsPopupComponent, descendants: true }], ngImport: i0, template: '', isInline: true }); }
|
|
7922
7923
|
}
|
|
7923
7924
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.3", ngImport: i0, type: Table, decorators: [{
|
|
@@ -7926,7 +7927,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.3", ngImpor
|
|
|
7926
7927
|
template: '',
|
|
7927
7928
|
standalone: false,
|
|
7928
7929
|
}]
|
|
7929
|
-
}], ctorParameters: () => [{ type: ComponentFactoryService }], propDecorators: { triggers: [{
|
|
7930
|
+
}], ctorParameters: () => [{ type: ComponentFactoryService }, { type: i0.ChangeDetectorRef }], propDecorators: { triggers: [{
|
|
7930
7931
|
type: ViewChildren,
|
|
7931
7932
|
args: [MatMenuTrigger]
|
|
7932
7933
|
}], vcRef: [{
|
|
@@ -7986,8 +7987,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.3", ngImpor
|
|
|
7986
7987
|
}] });
|
|
7987
7988
|
|
|
7988
7989
|
class MaterialTableComponent extends Table {
|
|
7989
|
-
constructor(cfService) {
|
|
7990
|
-
super(cfService);
|
|
7990
|
+
constructor(cfService, changeDetector) {
|
|
7991
|
+
super(cfService, changeDetector);
|
|
7991
7992
|
}
|
|
7992
7993
|
trackByFn(index, item) {
|
|
7993
7994
|
if (this.smartTable) {
|
|
@@ -8005,7 +8006,7 @@ class MaterialTableComponent extends Table {
|
|
|
8005
8006
|
}
|
|
8006
8007
|
return index;
|
|
8007
8008
|
}
|
|
8008
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.3", ngImport: i0, type: MaterialTableComponent, deps: [{ token: ComponentFactoryService }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
8009
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.3", ngImport: i0, type: MaterialTableComponent, deps: [{ token: ComponentFactoryService }, { token: i0.ChangeDetectorRef }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
8009
8010
|
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.2.3", type: MaterialTableComponent, isStandalone: false, selector: "lib-material-table", usesInheritance: true, ngImport: i0, template: "<table\r\n #myTable\r\n mat-table\r\n [dataSource]=\"smartTable.tableRows\"\r\n [trackBy]=\"trackByFn\"\r\n class=\"full-width\"\r\n multiTemplateDataRows\r\n>\r\n <!-- Column Descriptor -->\r\n <ng-container\r\n *ngFor=\"let header of smartTable.tableHeaders; let i = index\"\r\n matColumnDef=\"{{ header }}\"\r\n >\r\n <th\r\n mat-header-cell\r\n *matHeaderCellDef\r\n [ngClass]=\"getColumnClasses(smartTable.customSmartTableHeaders![i])\"\r\n [ngStyle]=\"getColumnStyles(smartTable.customSmartTableHeaders![i])\"\r\n >\r\n <div\r\n *ngIf=\"header === 'icon' || header === 'img' || header === 'options' || header === 'button'\"\r\n ></div>\r\n <div *ngIf=\"header === 'select'\">\r\n <mat-checkbox\r\n *ngIf=\"smartTable.customSmartTableHeaders![i].showCheckboxInHeader\"\r\n (change)=\"$event ? toggleAllRows() : null\"\r\n [checked]=\"smartTable.selection!.hasValue() && isAllSelected()\"\r\n [indeterminate]=\"smartTable.selection!.hasValue() && !isAllSelected()\"\r\n [aria-label]=\"checkboxLabel()\"\r\n >\r\n </mat-checkbox>\r\n <div *ngIf=\"!smartTable.customSmartTableHeaders![i].showCheckboxInHeader\">\r\n {{ smartTable.customTableHeaders[i] }}\r\n </div>\r\n </div>\r\n <div\r\n *ngIf=\"\r\n header !== 'icon' &&\r\n header !== 'img' &&\r\n header !== 'options' &&\r\n header !== 'button' &&\r\n header !== 'select' &&\r\n header !== 'expand' &&\r\n header !== 'actions'\r\n \"\r\n >\r\n <div *ngIf=\"smartTable.sortable; then sortable; else notSortable\"></div>\r\n <ng-template #sortable>\r\n <button\r\n (click)=\"sortButtonClicked($event, smartTable.customSmartTableHeaders![i])\"\r\n *ngIf=\"smartTable.sortable && isSortable(smartTable.customSmartTableHeaders![i])\"\r\n mat-button\r\n class=\"sortableHeaderButton\"\r\n >\r\n {{ smartTable.customTableHeaders[i] }}\r\n <smart-icon\r\n class=\"sortableHeaderButtonIcon\"\r\n *ngIf=\"getSortIcon(header)\"\r\n title=\"sort\"\r\n [icon]=\"getSortIcon(header)!\"\r\n ></smart-icon>\r\n <smart-icon\r\n class=\"sortableHeaderButtonIcon\"\r\n *ngIf=\"hasSortNumIcon(header)\"\r\n title=\"sort\"\r\n [icon]=\"getSortNumIcon(header)\"\r\n ></smart-icon>\r\n </button>\r\n </ng-template>\r\n <ng-template #notSortable>\r\n {{ smartTable.customTableHeaders[i] }}\r\n </ng-template>\r\n </div>\r\n </th>\r\n <td mat-cell *matCellDef=\"let element\" [ngClass]=\"isDisabled(element) ? 'disabledRow' : ''\">\r\n <mat-checkbox\r\n *ngIf=\"\r\n smartTable.customSmartTableHeaders &&\r\n smartTable.customSmartTableHeaders[i].propertyName === 'select' &&\r\n !isDisabled(element)\r\n \"\r\n (click)=\"$event.stopPropagation()\"\r\n (change)=\"\r\n $event\r\n ? setSelection(\r\n smartTable.selectionProperty\r\n ? smartTable.getValueDeeply(element, smartTable.selectionProperty)\r\n : element\r\n )\r\n : null\r\n \"\r\n [disabled]=\"isDisabled(element)\"\r\n [checked]=\"\r\n smartTable.selection!.isSelected(\r\n smartTable.selectionProperty\r\n ? smartTable.getValueDeeply(element, smartTable.selectionProperty)\r\n : element\r\n )\r\n \"\r\n [aria-label]=\"\r\n checkboxLabel(\r\n smartTable.selectionProperty\r\n ? smartTable.getValueDeeply(element, smartTable.selectionProperty)\r\n : element\r\n )\r\n \"\r\n >\r\n </mat-checkbox>\r\n <div\r\n *ngIf=\"\r\n smartTable.customSmartTableHeaders && smartTable.customSmartTableHeaders[i].properties\r\n \"\r\n >\r\n <div *ngIf=\"smartTable.customSmartTableHeaders[i].properties?.type === type().DATETIME\">\r\n {{\r\n getValue(element, header)\r\n | smartDateTime : smartTable.customSmartTableHeaders[i].properties?.dateFormat\r\n }}\r\n </div>\r\n <div *ngIf=\"smartTable.customSmartTableHeaders[i].properties?.type === type().DATE\">\r\n {{\r\n getValue(element, header)\r\n | smartDate : smartTable.customSmartTableHeaders[i].properties?.dateFormat\r\n }}\r\n </div>\r\n <div *ngIf=\"smartTable.customSmartTableHeaders[i].properties?.type === type().TIME\">\r\n {{\r\n getValue(element, header)\r\n | smartTime : smartTable.customSmartTableHeaders[i].properties?.dateFormat\r\n }}\r\n </div>\r\n <div *ngIf=\"smartTable.customSmartTableHeaders[i].properties?.type === type().CHECKBOX\">\r\n <mat-checkbox [disabled]=\"true\" [checked]=\"getValue(element, header)\"></mat-checkbox>\r\n </div>\r\n <div\r\n *ngIf=\"\r\n smartTable.customSmartTableHeaders[i].properties?.type === type().ICON &&\r\n smartTable.customSmartTableHeaders[i].properties?.icons?.length\r\n \"\r\n >\r\n <smart-icon\r\n [smartTooltip]=\"getToolTip(element, i)\"\r\n [icon]=\"getIcon(getValue(element, header), i)!\"\r\n [color]=\"getColor(getValue(element, header), i)\"\r\n >\r\n </smart-icon>\r\n </div>\r\n </div>\r\n <div class=\"smart-table-icon-container\">\r\n <div *ngFor=\"let ir of getImageResourceIcons(element, header)\">\r\n <div [smartTooltip]=\"ir.tooltip!\" [ngStyle]=\"getImageResourceStyle(ir)\"\r\n ><smart-icon [icon]=\"ir.identifier!\" [color]=\"ir.color!\"> </smart-icon\r\n ></div>\r\n </div>\r\n </div>\r\n <div\r\n *ngIf=\"smartTable.customSmartTableHeaders && smartTable.customSmartTableHeaders[i].buttons\"\r\n class=\"smart-table-buttons-col\"\r\n >\r\n <div *ngFor=\"let button of smartTable.customSmartTableHeaders[i].buttons\">\r\n <div *ngIf=\"showButton(button, element)\" [ngSwitch]=\"button.type\">\r\n <button\r\n (click)=\"customButtonClicked($event, button, element)\"\r\n *ngSwitchCase=\"smartTableButtonType.ICON\"\r\n mat-icon-button\r\n color=\"{{ button.color }}\"\r\n >\r\n <smart-icon title=\"{{ button.label }}\" [icon]=\"button.icon!\"></smart-icon>\r\n </button>\r\n <button\r\n (click)=\"customButtonClicked($event, button, element)\"\r\n *ngSwitchCase=\"smartTableButtonType.NORMAL\"\r\n mat-button\r\n color=\"{{ button.color }}\"\r\n >\r\n <smart-icon *ngIf=\"button.icon\" [icon]=\"button.icon\"></smart-icon>\r\n {{ button.label ?? (button.translator ? button.translator(element).title : '') }}\r\n </button>\r\n <button\r\n (click)=\"customButtonClicked($event, button, element)\"\r\n *ngSwitchCase=\"smartTableButtonType.RAISED\"\r\n mat-raised-button\r\n color=\"{{ button.color }}\"\r\n >\r\n <smart-icon *ngIf=\"button.icon\" [icon]=\"button.icon\"></smart-icon>\r\n {{ button.label ?? (button.translator ? button.translator(element).title : '') }}\r\n </button>\r\n <div *ngSwitchCase=\"smartTableButtonType.MENU\">\r\n <button\r\n *ngIf=\"showMenuButton(element, button)\"\r\n mat-button\r\n [matMenuTriggerFor]=\"menu\"\r\n (click)=\"customButtonClicked($event, button, element, undefined, true)\"\r\n color=\"{{ button.color }}\"\r\n >\r\n <smart-icon *ngIf=\"button.icon\" [icon]=\"button.icon\"></smart-icon>\r\n <!-- {{ button.label ?? (button.translator ? button.translator(element).title : '') }} -->\r\n </button>\r\n <mat-menu #menu=\"matMenu\">\r\n <div *ngIf=\"button.menuItemButtons\">\r\n <button\r\n *ngFor=\"let btn of button.menuItemButtons\"\r\n (click)=\"customButtonClicked($event, btn, element, undefined, true)\"\r\n mat-menu-item\r\n >\r\n <smart-icon\r\n *ngIf=\"btn?.translator(btn)?.icon\"\r\n [icon]=\"btn!.translator!(btn)!.icon!\"\r\n ></smart-icon>\r\n {{ btn?.translator(btn)?.title }}\r\n </button>\r\n </div>\r\n <div *ngIf=\"button.menuItemButtonsPropertyName\">\r\n <div *ngFor=\"let btn of getValue(element, button.menuItemButtonsPropertyName)\">\r\n <button\r\n *ngIf=\"btn.code !== ACTION_SEPERATOR\"\r\n (click)=\"customButtonClicked($event, button, element, btn, true)\"\r\n mat-menu-item\r\n [disabled]=\"btn.disabled\"\r\n [smartTooltip]=\"\r\n btn?.descriptor?.tooltip\r\n ? btn?.descriptor?.tooltip\r\n : button.translator!(btn).tooltip\r\n \"\r\n >\r\n <div\r\n class=\"smart-table-icon-container\"\r\n [ngClass]=\"\r\n button.translator!(btn).iconPosition === 'POST' ? 'reversed' : ''\r\n \"\r\n ><smart-icon\r\n *ngIf=\"button.translator!(btn).icon\"\r\n [icon]=\"button.translator!(btn).icon!\"\r\n ></smart-icon>\r\n {{ button.translator!(btn).title }}</div\r\n >\r\n </button>\r\n <mat-divider *ngIf=\"btn.code === ACTION_SEPERATOR\"></mat-divider>\r\n </div>\r\n </div>\r\n </mat-menu>\r\n </div>\r\n </div>\r\n </div>\r\n </div>\r\n <div *ngIf=\"smartTable.customSmartTableHeaders && smartTable.customSmartTableHeaders[i].icon\">\r\n <smart-icon\r\n *ngIf=\"smartTable.customSmartTableHeaders[i].icon?.icon\"\r\n [ngClass]=\"smartTable.customSmartTableHeaders[i].icon?.cssClass ?? ''\"\r\n [color]=\"smartTable.customSmartTableHeaders[i].icon?.color\"\r\n [icon]=\"smartTable.customSmartTableHeaders[i].icon!.icon\"\r\n >\r\n </smart-icon>\r\n </div>\r\n <div\r\n *ngIf=\"\r\n smartTable.customSmartTableHeaders &&\r\n smartTable.customSmartTableHeaders[i].translator !== undefined\r\n \"\r\n >\r\n {{ smartTable.customSmartTableHeaders[i].translator!(getValue(element, header)) }}\r\n </div>\r\n <button\r\n *ngIf=\"\r\n smartTable.customSmartTableHeaders &&\r\n smartTable.customSmartTableHeaders[i].propertyName === 'expand'\r\n \"\r\n mat-icon-button\r\n aria-label=\"expand row\"\r\n (click)=\"onToggle(element, $event)\"\r\n >\r\n <smart-icon *ngIf=\"expandedElement !== element\" [icon]=\"'keyboard_arrow_down'\"></smart-icon>\r\n <smart-icon *ngIf=\"expandedElement === element\" [icon]=\"'keyboard_arrow_up'\"></smart-icon>\r\n </button>\r\n <div\r\n *ngIf=\"\r\n !smartTable.customSmartTableHeaders ||\r\n (smartTable.customSmartTableHeaders &&\r\n !smartTable.customSmartTableHeaders[i].properties &&\r\n !smartTable.customSmartTableHeaders[i].icon &&\r\n !smartTable.customSmartTableHeaders[i].buttons &&\r\n !smartTable.customSmartTableHeaders[i].translator &&\r\n !(smartTable.customSmartTableHeaders[i].propertyName === 'select') &&\r\n !(smartTable.customSmartTableHeaders[i].propertyName === 'expand'))\r\n \"\r\n >\r\n <smart-icon *ngIf=\"header === 'icon'\" [icon]=\"getValue(element, header)!\"> </smart-icon>\r\n <img\r\n *ngIf=\"header === 'img'\"\r\n [src]=\"getValue(element, header)\"\r\n alt=\"\"\r\n class=\"smarttableImg\"\r\n />\r\n <div\r\n *ngIf=\"\r\n header !== 'icon' &&\r\n header !== 'img' &&\r\n header !== 'option' &&\r\n header !== 'button' &&\r\n !isImageResource(element, header)\r\n \"\r\n [innerHtml]=\"getValue(element, header)\"\r\n ></div>\r\n </div>\r\n </td>\r\n </ng-container>\r\n\r\n <!-- Expanded Content Column - The detail row is made up of this one column that spans across all columns -->\r\n <ng-container matColumnDef=\"expandedDetail\">\r\n <td mat-cell *matCellDef=\"let element\" [attr.colspan]=\"smartTable.tableHeaders.length\">\r\n <div\r\n class=\"example-element-detail\"\r\n [@detailExpand]=\"element == expandedElement ? 'expanded' : 'collapsed'\"\r\n >\r\n <ng-template #expandedArea></ng-template>\r\n </div>\r\n </td>\r\n </ng-container>\r\n\r\n <tr mat-header-row *matHeaderRowDef=\"smartTable.tableHeaders; sticky: true\"></tr>\r\n <ng-container *matRowDef=\"let element; columns: smartTable.tableHeaders\">\r\n <tr\r\n mat-row\r\n class=\"example-element-row\"\r\n [class.example-expanded-row]=\"expandedElement === element\"\r\n [ngClass]=\"getRowClasses(element)\"\r\n [ngStyle]=\"getRowStyles(element)\"\r\n (click)=\"handleOnRowClick(element)\"\r\n (dblclick)=\"handleOnRowDoubleClick($event, element)\"\r\n ></tr>\r\n <lib-default-actions-popup\r\n *ngIf=\"smartTable.defaultActionCodes && smartTable.defaultActionCodes.length > 0\"\r\n #defaultActionMenu\r\n [buttons]=\"getDefaultActionsForRow(element)!\"\r\n [row]=\"element\"\r\n ></lib-default-actions-popup>\r\n </ng-container>\r\n <tr mat-row *matRowDef=\"let row; columns: ['expandedDetail']\" class=\"example-detail-row\"></tr>\r\n</table>\r\n", styles: [".full-width{width:100%}.smarttableImg{width:25px}.smartTableRowHover:hover{cursor:pointer}tr.example-detail-row{height:0}tr.example-element-row:not(.example-expanded-row):hover{background:#f5f5f5}tr.example-element-row:not(.example-expanded-row):active{background:#efefef}.example-element-row td{border-bottom-width:0}.example-element-detail{overflow:hidden;display:flex;flex-direction:column}.example-element-diagram{min-width:80px;border:2px solid black;padding:8px;font-weight:lighter;margin:8px 0;height:104px}.example-element-symbol{font-weight:700;font-size:40px;line-height:normal}.example-element-description{padding:16px}.example-element-description-attribution{opacity:.5}.disabledRow{color:var(--disabled)}.disabledRow:hover{cursor:default}.smart-table-buttons-col{display:flex;flex-direction:row;justify-content:flex-end}.sortableHeaderButton{margin:0!important;padding:0!important;text-align:left!important}.selected{background-color:var(--primary-light-color)}.smart-table-icon-container{display:flex;flex-direction:row;justify-content:space-between;white-space:initial}.reversed{flex-direction:row-reverse;gap:1rem}:host ::ng-deep .mat-mdc-menu-item{line-height:normal!important}.mat-mdc-menu-item[disabled]{cursor:default!important}\n"], dependencies: [{ kind: "directive", type: SmartTooltipDirective, selector: "[smartTooltip]", inputs: ["smartTooltip"] }, { kind: "directive", type: i2.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { 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.NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }, { kind: "directive", type: i2.NgSwitch, selector: "[ngSwitch]", inputs: ["ngSwitch"] }, { kind: "directive", type: i2.NgSwitchCase, selector: "[ngSwitchCase]", inputs: ["ngSwitchCase"] }, { kind: "component", type: i4$2.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: i2$1.MatButton, selector: " button[mat-button], button[mat-raised-button], button[mat-flat-button], button[mat-stroked-button] ", exportAs: ["matButton"] }, { kind: "component", type: i2$1.MatIconButton, selector: "button[mat-icon-button]", exportAs: ["matButton"] }, { kind: "component", type: i6$1.MatTable, selector: "mat-table, table[mat-table]", exportAs: ["matTable"] }, { kind: "directive", type: i6$1.MatHeaderCellDef, selector: "[matHeaderCellDef]" }, { kind: "directive", type: i6$1.MatHeaderRowDef, selector: "[matHeaderRowDef]", inputs: ["matHeaderRowDef", "matHeaderRowDefSticky"] }, { kind: "directive", type: i6$1.MatColumnDef, selector: "[matColumnDef]", inputs: ["matColumnDef"] }, { kind: "directive", type: i6$1.MatCellDef, selector: "[matCellDef]" }, { kind: "directive", type: i6$1.MatRowDef, selector: "[matRowDef]", inputs: ["matRowDefColumns", "matRowDefWhen"] }, { kind: "directive", type: i6$1.MatHeaderCell, selector: "mat-header-cell, th[mat-header-cell]" }, { kind: "directive", type: i6$1.MatCell, selector: "mat-cell, td[mat-cell]" }, { kind: "component", type: i6$1.MatHeaderRow, selector: "mat-header-row, tr[mat-header-row]", exportAs: ["matHeaderRow"] }, { kind: "component", type: i6$1.MatRow, selector: "mat-row, tr[mat-row]", exportAs: ["matRow"] }, { kind: "component", type: i5$1.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: i5$1.MatMenuItem, selector: "[mat-menu-item]", inputs: ["role", "disabled", "disableRipple"], exportAs: ["matMenuItem"] }, { kind: "directive", type: i5$1.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: SmartIconComponent, selector: "smart-icon", inputs: ["icon", "color"] }, { kind: "component", type: i5$2.MatDivider, selector: "mat-divider", inputs: ["vertical", "inset"] }, { kind: "component", type: DefaultActionsPopupComponent, selector: "lib-default-actions-popup", inputs: ["buttons", "row", "colIdx"] }, { kind: "pipe", type: SmartDateTimePipe, name: "smartDateTime" }, { kind: "pipe", type: SmartDatePipe, name: "smartDate" }, { kind: "pipe", type: SmartTimePipe, name: "smartTime" }], animations: [
|
|
8010
8011
|
trigger('detailExpand', [
|
|
8011
8012
|
state('collapsed', style({ height: '0px', minHeight: '0' })),
|
|
@@ -8023,19 +8024,19 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.3", ngImpor
|
|
|
8023
8024
|
transition('expanded <=> collapsed', animate('225ms cubic-bezier(0.4, 0.0, 0.2, 1)')),
|
|
8024
8025
|
]),
|
|
8025
8026
|
], standalone: false, changeDetection: ChangeDetectionStrategy.OnPush, template: "<table\r\n #myTable\r\n mat-table\r\n [dataSource]=\"smartTable.tableRows\"\r\n [trackBy]=\"trackByFn\"\r\n class=\"full-width\"\r\n multiTemplateDataRows\r\n>\r\n <!-- Column Descriptor -->\r\n <ng-container\r\n *ngFor=\"let header of smartTable.tableHeaders; let i = index\"\r\n matColumnDef=\"{{ header }}\"\r\n >\r\n <th\r\n mat-header-cell\r\n *matHeaderCellDef\r\n [ngClass]=\"getColumnClasses(smartTable.customSmartTableHeaders![i])\"\r\n [ngStyle]=\"getColumnStyles(smartTable.customSmartTableHeaders![i])\"\r\n >\r\n <div\r\n *ngIf=\"header === 'icon' || header === 'img' || header === 'options' || header === 'button'\"\r\n ></div>\r\n <div *ngIf=\"header === 'select'\">\r\n <mat-checkbox\r\n *ngIf=\"smartTable.customSmartTableHeaders![i].showCheckboxInHeader\"\r\n (change)=\"$event ? toggleAllRows() : null\"\r\n [checked]=\"smartTable.selection!.hasValue() && isAllSelected()\"\r\n [indeterminate]=\"smartTable.selection!.hasValue() && !isAllSelected()\"\r\n [aria-label]=\"checkboxLabel()\"\r\n >\r\n </mat-checkbox>\r\n <div *ngIf=\"!smartTable.customSmartTableHeaders![i].showCheckboxInHeader\">\r\n {{ smartTable.customTableHeaders[i] }}\r\n </div>\r\n </div>\r\n <div\r\n *ngIf=\"\r\n header !== 'icon' &&\r\n header !== 'img' &&\r\n header !== 'options' &&\r\n header !== 'button' &&\r\n header !== 'select' &&\r\n header !== 'expand' &&\r\n header !== 'actions'\r\n \"\r\n >\r\n <div *ngIf=\"smartTable.sortable; then sortable; else notSortable\"></div>\r\n <ng-template #sortable>\r\n <button\r\n (click)=\"sortButtonClicked($event, smartTable.customSmartTableHeaders![i])\"\r\n *ngIf=\"smartTable.sortable && isSortable(smartTable.customSmartTableHeaders![i])\"\r\n mat-button\r\n class=\"sortableHeaderButton\"\r\n >\r\n {{ smartTable.customTableHeaders[i] }}\r\n <smart-icon\r\n class=\"sortableHeaderButtonIcon\"\r\n *ngIf=\"getSortIcon(header)\"\r\n title=\"sort\"\r\n [icon]=\"getSortIcon(header)!\"\r\n ></smart-icon>\r\n <smart-icon\r\n class=\"sortableHeaderButtonIcon\"\r\n *ngIf=\"hasSortNumIcon(header)\"\r\n title=\"sort\"\r\n [icon]=\"getSortNumIcon(header)\"\r\n ></smart-icon>\r\n </button>\r\n </ng-template>\r\n <ng-template #notSortable>\r\n {{ smartTable.customTableHeaders[i] }}\r\n </ng-template>\r\n </div>\r\n </th>\r\n <td mat-cell *matCellDef=\"let element\" [ngClass]=\"isDisabled(element) ? 'disabledRow' : ''\">\r\n <mat-checkbox\r\n *ngIf=\"\r\n smartTable.customSmartTableHeaders &&\r\n smartTable.customSmartTableHeaders[i].propertyName === 'select' &&\r\n !isDisabled(element)\r\n \"\r\n (click)=\"$event.stopPropagation()\"\r\n (change)=\"\r\n $event\r\n ? setSelection(\r\n smartTable.selectionProperty\r\n ? smartTable.getValueDeeply(element, smartTable.selectionProperty)\r\n : element\r\n )\r\n : null\r\n \"\r\n [disabled]=\"isDisabled(element)\"\r\n [checked]=\"\r\n smartTable.selection!.isSelected(\r\n smartTable.selectionProperty\r\n ? smartTable.getValueDeeply(element, smartTable.selectionProperty)\r\n : element\r\n )\r\n \"\r\n [aria-label]=\"\r\n checkboxLabel(\r\n smartTable.selectionProperty\r\n ? smartTable.getValueDeeply(element, smartTable.selectionProperty)\r\n : element\r\n )\r\n \"\r\n >\r\n </mat-checkbox>\r\n <div\r\n *ngIf=\"\r\n smartTable.customSmartTableHeaders && smartTable.customSmartTableHeaders[i].properties\r\n \"\r\n >\r\n <div *ngIf=\"smartTable.customSmartTableHeaders[i].properties?.type === type().DATETIME\">\r\n {{\r\n getValue(element, header)\r\n | smartDateTime : smartTable.customSmartTableHeaders[i].properties?.dateFormat\r\n }}\r\n </div>\r\n <div *ngIf=\"smartTable.customSmartTableHeaders[i].properties?.type === type().DATE\">\r\n {{\r\n getValue(element, header)\r\n | smartDate : smartTable.customSmartTableHeaders[i].properties?.dateFormat\r\n }}\r\n </div>\r\n <div *ngIf=\"smartTable.customSmartTableHeaders[i].properties?.type === type().TIME\">\r\n {{\r\n getValue(element, header)\r\n | smartTime : smartTable.customSmartTableHeaders[i].properties?.dateFormat\r\n }}\r\n </div>\r\n <div *ngIf=\"smartTable.customSmartTableHeaders[i].properties?.type === type().CHECKBOX\">\r\n <mat-checkbox [disabled]=\"true\" [checked]=\"getValue(element, header)\"></mat-checkbox>\r\n </div>\r\n <div\r\n *ngIf=\"\r\n smartTable.customSmartTableHeaders[i].properties?.type === type().ICON &&\r\n smartTable.customSmartTableHeaders[i].properties?.icons?.length\r\n \"\r\n >\r\n <smart-icon\r\n [smartTooltip]=\"getToolTip(element, i)\"\r\n [icon]=\"getIcon(getValue(element, header), i)!\"\r\n [color]=\"getColor(getValue(element, header), i)\"\r\n >\r\n </smart-icon>\r\n </div>\r\n </div>\r\n <div class=\"smart-table-icon-container\">\r\n <div *ngFor=\"let ir of getImageResourceIcons(element, header)\">\r\n <div [smartTooltip]=\"ir.tooltip!\" [ngStyle]=\"getImageResourceStyle(ir)\"\r\n ><smart-icon [icon]=\"ir.identifier!\" [color]=\"ir.color!\"> </smart-icon\r\n ></div>\r\n </div>\r\n </div>\r\n <div\r\n *ngIf=\"smartTable.customSmartTableHeaders && smartTable.customSmartTableHeaders[i].buttons\"\r\n class=\"smart-table-buttons-col\"\r\n >\r\n <div *ngFor=\"let button of smartTable.customSmartTableHeaders[i].buttons\">\r\n <div *ngIf=\"showButton(button, element)\" [ngSwitch]=\"button.type\">\r\n <button\r\n (click)=\"customButtonClicked($event, button, element)\"\r\n *ngSwitchCase=\"smartTableButtonType.ICON\"\r\n mat-icon-button\r\n color=\"{{ button.color }}\"\r\n >\r\n <smart-icon title=\"{{ button.label }}\" [icon]=\"button.icon!\"></smart-icon>\r\n </button>\r\n <button\r\n (click)=\"customButtonClicked($event, button, element)\"\r\n *ngSwitchCase=\"smartTableButtonType.NORMAL\"\r\n mat-button\r\n color=\"{{ button.color }}\"\r\n >\r\n <smart-icon *ngIf=\"button.icon\" [icon]=\"button.icon\"></smart-icon>\r\n {{ button.label ?? (button.translator ? button.translator(element).title : '') }}\r\n </button>\r\n <button\r\n (click)=\"customButtonClicked($event, button, element)\"\r\n *ngSwitchCase=\"smartTableButtonType.RAISED\"\r\n mat-raised-button\r\n color=\"{{ button.color }}\"\r\n >\r\n <smart-icon *ngIf=\"button.icon\" [icon]=\"button.icon\"></smart-icon>\r\n {{ button.label ?? (button.translator ? button.translator(element).title : '') }}\r\n </button>\r\n <div *ngSwitchCase=\"smartTableButtonType.MENU\">\r\n <button\r\n *ngIf=\"showMenuButton(element, button)\"\r\n mat-button\r\n [matMenuTriggerFor]=\"menu\"\r\n (click)=\"customButtonClicked($event, button, element, undefined, true)\"\r\n color=\"{{ button.color }}\"\r\n >\r\n <smart-icon *ngIf=\"button.icon\" [icon]=\"button.icon\"></smart-icon>\r\n <!-- {{ button.label ?? (button.translator ? button.translator(element).title : '') }} -->\r\n </button>\r\n <mat-menu #menu=\"matMenu\">\r\n <div *ngIf=\"button.menuItemButtons\">\r\n <button\r\n *ngFor=\"let btn of button.menuItemButtons\"\r\n (click)=\"customButtonClicked($event, btn, element, undefined, true)\"\r\n mat-menu-item\r\n >\r\n <smart-icon\r\n *ngIf=\"btn?.translator(btn)?.icon\"\r\n [icon]=\"btn!.translator!(btn)!.icon!\"\r\n ></smart-icon>\r\n {{ btn?.translator(btn)?.title }}\r\n </button>\r\n </div>\r\n <div *ngIf=\"button.menuItemButtonsPropertyName\">\r\n <div *ngFor=\"let btn of getValue(element, button.menuItemButtonsPropertyName)\">\r\n <button\r\n *ngIf=\"btn.code !== ACTION_SEPERATOR\"\r\n (click)=\"customButtonClicked($event, button, element, btn, true)\"\r\n mat-menu-item\r\n [disabled]=\"btn.disabled\"\r\n [smartTooltip]=\"\r\n btn?.descriptor?.tooltip\r\n ? btn?.descriptor?.tooltip\r\n : button.translator!(btn).tooltip\r\n \"\r\n >\r\n <div\r\n class=\"smart-table-icon-container\"\r\n [ngClass]=\"\r\n button.translator!(btn).iconPosition === 'POST' ? 'reversed' : ''\r\n \"\r\n ><smart-icon\r\n *ngIf=\"button.translator!(btn).icon\"\r\n [icon]=\"button.translator!(btn).icon!\"\r\n ></smart-icon>\r\n {{ button.translator!(btn).title }}</div\r\n >\r\n </button>\r\n <mat-divider *ngIf=\"btn.code === ACTION_SEPERATOR\"></mat-divider>\r\n </div>\r\n </div>\r\n </mat-menu>\r\n </div>\r\n </div>\r\n </div>\r\n </div>\r\n <div *ngIf=\"smartTable.customSmartTableHeaders && smartTable.customSmartTableHeaders[i].icon\">\r\n <smart-icon\r\n *ngIf=\"smartTable.customSmartTableHeaders[i].icon?.icon\"\r\n [ngClass]=\"smartTable.customSmartTableHeaders[i].icon?.cssClass ?? ''\"\r\n [color]=\"smartTable.customSmartTableHeaders[i].icon?.color\"\r\n [icon]=\"smartTable.customSmartTableHeaders[i].icon!.icon\"\r\n >\r\n </smart-icon>\r\n </div>\r\n <div\r\n *ngIf=\"\r\n smartTable.customSmartTableHeaders &&\r\n smartTable.customSmartTableHeaders[i].translator !== undefined\r\n \"\r\n >\r\n {{ smartTable.customSmartTableHeaders[i].translator!(getValue(element, header)) }}\r\n </div>\r\n <button\r\n *ngIf=\"\r\n smartTable.customSmartTableHeaders &&\r\n smartTable.customSmartTableHeaders[i].propertyName === 'expand'\r\n \"\r\n mat-icon-button\r\n aria-label=\"expand row\"\r\n (click)=\"onToggle(element, $event)\"\r\n >\r\n <smart-icon *ngIf=\"expandedElement !== element\" [icon]=\"'keyboard_arrow_down'\"></smart-icon>\r\n <smart-icon *ngIf=\"expandedElement === element\" [icon]=\"'keyboard_arrow_up'\"></smart-icon>\r\n </button>\r\n <div\r\n *ngIf=\"\r\n !smartTable.customSmartTableHeaders ||\r\n (smartTable.customSmartTableHeaders &&\r\n !smartTable.customSmartTableHeaders[i].properties &&\r\n !smartTable.customSmartTableHeaders[i].icon &&\r\n !smartTable.customSmartTableHeaders[i].buttons &&\r\n !smartTable.customSmartTableHeaders[i].translator &&\r\n !(smartTable.customSmartTableHeaders[i].propertyName === 'select') &&\r\n !(smartTable.customSmartTableHeaders[i].propertyName === 'expand'))\r\n \"\r\n >\r\n <smart-icon *ngIf=\"header === 'icon'\" [icon]=\"getValue(element, header)!\"> </smart-icon>\r\n <img\r\n *ngIf=\"header === 'img'\"\r\n [src]=\"getValue(element, header)\"\r\n alt=\"\"\r\n class=\"smarttableImg\"\r\n />\r\n <div\r\n *ngIf=\"\r\n header !== 'icon' &&\r\n header !== 'img' &&\r\n header !== 'option' &&\r\n header !== 'button' &&\r\n !isImageResource(element, header)\r\n \"\r\n [innerHtml]=\"getValue(element, header)\"\r\n ></div>\r\n </div>\r\n </td>\r\n </ng-container>\r\n\r\n <!-- Expanded Content Column - The detail row is made up of this one column that spans across all columns -->\r\n <ng-container matColumnDef=\"expandedDetail\">\r\n <td mat-cell *matCellDef=\"let element\" [attr.colspan]=\"smartTable.tableHeaders.length\">\r\n <div\r\n class=\"example-element-detail\"\r\n [@detailExpand]=\"element == expandedElement ? 'expanded' : 'collapsed'\"\r\n >\r\n <ng-template #expandedArea></ng-template>\r\n </div>\r\n </td>\r\n </ng-container>\r\n\r\n <tr mat-header-row *matHeaderRowDef=\"smartTable.tableHeaders; sticky: true\"></tr>\r\n <ng-container *matRowDef=\"let element; columns: smartTable.tableHeaders\">\r\n <tr\r\n mat-row\r\n class=\"example-element-row\"\r\n [class.example-expanded-row]=\"expandedElement === element\"\r\n [ngClass]=\"getRowClasses(element)\"\r\n [ngStyle]=\"getRowStyles(element)\"\r\n (click)=\"handleOnRowClick(element)\"\r\n (dblclick)=\"handleOnRowDoubleClick($event, element)\"\r\n ></tr>\r\n <lib-default-actions-popup\r\n *ngIf=\"smartTable.defaultActionCodes && smartTable.defaultActionCodes.length > 0\"\r\n #defaultActionMenu\r\n [buttons]=\"getDefaultActionsForRow(element)!\"\r\n [row]=\"element\"\r\n ></lib-default-actions-popup>\r\n </ng-container>\r\n <tr mat-row *matRowDef=\"let row; columns: ['expandedDetail']\" class=\"example-detail-row\"></tr>\r\n</table>\r\n", styles: [".full-width{width:100%}.smarttableImg{width:25px}.smartTableRowHover:hover{cursor:pointer}tr.example-detail-row{height:0}tr.example-element-row:not(.example-expanded-row):hover{background:#f5f5f5}tr.example-element-row:not(.example-expanded-row):active{background:#efefef}.example-element-row td{border-bottom-width:0}.example-element-detail{overflow:hidden;display:flex;flex-direction:column}.example-element-diagram{min-width:80px;border:2px solid black;padding:8px;font-weight:lighter;margin:8px 0;height:104px}.example-element-symbol{font-weight:700;font-size:40px;line-height:normal}.example-element-description{padding:16px}.example-element-description-attribution{opacity:.5}.disabledRow{color:var(--disabled)}.disabledRow:hover{cursor:default}.smart-table-buttons-col{display:flex;flex-direction:row;justify-content:flex-end}.sortableHeaderButton{margin:0!important;padding:0!important;text-align:left!important}.selected{background-color:var(--primary-light-color)}.smart-table-icon-container{display:flex;flex-direction:row;justify-content:space-between;white-space:initial}.reversed{flex-direction:row-reverse;gap:1rem}:host ::ng-deep .mat-mdc-menu-item{line-height:normal!important}.mat-mdc-menu-item[disabled]{cursor:default!important}\n"] }]
|
|
8026
|
-
}], ctorParameters: () => [{ type: ComponentFactoryService }] });
|
|
8027
|
+
}], ctorParameters: () => [{ type: ComponentFactoryService }, { type: i0.ChangeDetectorRef }] });
|
|
8027
8028
|
|
|
8028
8029
|
class MobileTableComponent extends Table {
|
|
8029
|
-
constructor(cfService) {
|
|
8030
|
-
super(cfService);
|
|
8030
|
+
constructor(cfService, changeDetector) {
|
|
8031
|
+
super(cfService, changeDetector);
|
|
8031
8032
|
}
|
|
8032
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.3", ngImport: i0, type: MobileTableComponent, deps: [{ token: ComponentFactoryService }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
8033
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.3", ngImport: i0, type: MobileTableComponent, deps: [{ token: ComponentFactoryService }, { token: i0.ChangeDetectorRef }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
8033
8034
|
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.2.3", type: MobileTableComponent, isStandalone: false, selector: "lib-mobile-table", usesInheritance: true, ngImport: i0, template: "<div class=\"mobileTable\">\r\n <div\r\n class=\"mobileTableRow\"\r\n *ngFor=\"let row of smartTable.tableRows\"\r\n [ngClass]=\"getRowClasses(row)\"\r\n [ngStyle]=\"getRowStyles(row)\"\r\n >\r\n <div\r\n class=\"mobileTableCell\"\r\n *ngFor=\"let header of smartTable.customSmartTableHeaders; let i = index\"\r\n (click)=\"handleOnRowClick(row)\"\r\n (dblclick)=\"handleOnRowDoubleClick($event, row)\"\r\n >\r\n <div class=\"mobileTableCellHeader\">\r\n {{ header.label }}\r\n </div>\r\n\r\n <mat-checkbox\r\n *ngIf=\"\r\n smartTable.customSmartTableHeaders &&\r\n smartTable.customSmartTableHeaders[i].propertyName === 'select'\r\n \"\r\n (click)=\"$event.stopPropagation()\"\r\n (change)=\"\r\n $event\r\n ? setSelection(\r\n smartTable.selectionProperty\r\n ? smartTable.getValueDeeply(row, smartTable.selectionProperty)\r\n : row\r\n )\r\n : null\r\n \"\r\n [disabled]=\"isDisabled(row)\"\r\n [checked]=\"\r\n smartTable.selection!.isSelected(\r\n smartTable.selectionProperty\r\n ? smartTable.getValueDeeply(row, smartTable.selectionProperty)\r\n : row\r\n )\r\n \"\r\n [aria-label]=\"\r\n checkboxLabel(\r\n smartTable.selectionProperty\r\n ? smartTable.getValueDeeply(row, smartTable.selectionProperty)\r\n : row\r\n )\r\n \"\r\n >\r\n </mat-checkbox>\r\n <div\r\n *ngIf=\"\r\n smartTable.customSmartTableHeaders && smartTable.customSmartTableHeaders[i].properties\r\n \"\r\n >\r\n <div *ngIf=\"smartTable.customSmartTableHeaders[i].properties?.type === type().DATETIME\">\r\n {{\r\n getValue(row, header.propertyName)\r\n | smartDateTime : smartTable.customSmartTableHeaders[i].properties?.dateFormat\r\n }}\r\n </div>\r\n <div *ngIf=\"smartTable.customSmartTableHeaders[i].properties?.type === type().DATE\">\r\n {{\r\n getValue(row, header.propertyName)\r\n | smartDate : smartTable.customSmartTableHeaders[i].properties?.dateFormat\r\n }}\r\n </div>\r\n <div *ngIf=\"smartTable.customSmartTableHeaders[i].properties?.type === type().TIME\">\r\n {{\r\n getValue(row, header.propertyName)\r\n | smartTime : smartTable.customSmartTableHeaders[i].properties?.dateFormat\r\n }}\r\n </div>\r\n <div *ngIf=\"smartTable.customSmartTableHeaders[i].properties?.type === type().CHECKBOX\">\r\n <mat-checkbox\r\n [disabled]=\"true\"\r\n [checked]=\"getValue(row, header.propertyName)\"\r\n ></mat-checkbox>\r\n </div>\r\n <div\r\n *ngIf=\"\r\n smartTable.customSmartTableHeaders[i].properties?.type === type().ICON &&\r\n smartTable.customSmartTableHeaders[i].properties?.icons?.length\r\n \"\r\n >\r\n <smart-icon\r\n [smartTooltip]=\"getToolTip(row, i)\"\r\n [icon]=\"getIcon(getValue(row, header.propertyName), i)!\"\r\n [color]=\"getColor(getValue(row, header.propertyName), i)\"\r\n >\r\n </smart-icon>\r\n </div>\r\n </div>\r\n <div *ngIf=\"isImageResource(row, header.propertyName)\">\r\n <smart-icon\r\n [icon]=\"getImageResourceIcon(row, header.propertyName)\"\r\n [color]=\"getImageResourceColor(row, header.propertyName)\"\r\n >\r\n </smart-icon>\r\n </div>\r\n <div\r\n *ngIf=\"smartTable.customSmartTableHeaders && smartTable.customSmartTableHeaders[i].buttons\"\r\n class=\"smart-table-buttons-col\"\r\n >\r\n <div *ngFor=\"let button of smartTable.customSmartTableHeaders[i].buttons\">\r\n <div *ngIf=\"showButton(button, row)\" [ngSwitch]=\"button.type\">\r\n <button\r\n (click)=\"customButtonClicked($event, button, row)\"\r\n *ngSwitchCase=\"smartTableButtonType.ICON\"\r\n mat-icon-button\r\n color=\"{{ button.color }}\"\r\n >\r\n <smart-icon title=\"{{ button.label }}\" [icon]=\"button.icon!\"></smart-icon>\r\n </button>\r\n <button\r\n (click)=\"customButtonClicked($event, button, row)\"\r\n *ngSwitchCase=\"smartTableButtonType.NORMAL\"\r\n mat-button\r\n color=\"{{ button.color }}\"\r\n >\r\n <smart-icon *ngIf=\"button.icon\" [icon]=\"button.icon\"></smart-icon>\r\n {{ button.label }}\r\n </button>\r\n <button\r\n (click)=\"customButtonClicked($event, button, row)\"\r\n *ngSwitchCase=\"smartTableButtonType.RAISED\"\r\n mat-raised-button\r\n color=\"{{ button.color }}\"\r\n >\r\n <smart-icon *ngIf=\"button.icon\" [icon]=\"button.icon\"></smart-icon>\r\n {{ button.label }}\r\n </button>\r\n <div *ngSwitchCase=\"smartTableButtonType.MENU\">\r\n <button\r\n *ngIf=\"showMenuButton(row, button)\"\r\n mat-button\r\n [matMenuTriggerFor]=\"menu\"\r\n (click)=\"customButtonClicked($event, button, row, undefined, true)\"\r\n color=\"{{ button.color }}\"\r\n >\r\n <smart-icon *ngIf=\"button.icon\" [icon]=\"button.icon\"></smart-icon>\r\n {{ button.label }}\r\n </button>\r\n <mat-menu #menu=\"matMenu\">\r\n <div *ngIf=\"button.menuItemButtons\">\r\n <button\r\n *ngFor=\"let btn of button.menuItemButtons\"\r\n (click)=\"customButtonClicked($event, btn, row, undefined, true)\"\r\n mat-menu-item\r\n >\r\n <smart-icon *ngIf=\"btn.icon\" [icon]=\"btn.icon\"></smart-icon>\r\n {{ btn.label }}\r\n </button>\r\n </div>\r\n <div *ngIf=\"button.menuItemButtonsPropertyName\">\r\n <button\r\n *ngFor=\"let btn of getValue(row, button.menuItemButtonsPropertyName)\"\r\n (click)=\"customButtonClicked($event, button, row, btn, true)\"\r\n [disabled]=\"btn.disabled\"\r\n mat-menu-item\r\n >\r\n {{ button.translator!(btn) }}\r\n </button>\r\n </div>\r\n </mat-menu>\r\n </div>\r\n </div>\r\n </div>\r\n </div>\r\n <div *ngIf=\"smartTable.customSmartTableHeaders && smartTable.customSmartTableHeaders[i].icon\">\r\n <smart-icon\r\n *ngIf=\"smartTable.customSmartTableHeaders[i].icon?.icon\"\r\n [ngClass]=\"smartTable.customSmartTableHeaders[i].icon?.cssClass ?? ''\"\r\n [color]=\"smartTable.customSmartTableHeaders[i].icon?.color\"\r\n [icon]=\"smartTable.customSmartTableHeaders[i].icon!.icon\"\r\n >\r\n </smart-icon>\r\n </div>\r\n <div\r\n *ngIf=\"\r\n smartTable.customSmartTableHeaders &&\r\n smartTable.customSmartTableHeaders[i].translator !== undefined\r\n \"\r\n >\r\n {{ smartTable.customSmartTableHeaders[i].translator!(getValue(row, header.propertyName)) }}\r\n </div>\r\n <div\r\n *ngIf=\"\r\n !smartTable.customSmartTableHeaders ||\r\n (smartTable.customSmartTableHeaders &&\r\n !smartTable.customSmartTableHeaders[i].properties &&\r\n !smartTable.customSmartTableHeaders[i].icon &&\r\n !smartTable.customSmartTableHeaders[i].buttons &&\r\n !smartTable.customSmartTableHeaders[i].translator &&\r\n !(smartTable.customSmartTableHeaders[i].propertyName === 'select') &&\r\n !(smartTable.customSmartTableHeaders[i].propertyName === 'expand'))\r\n \"\r\n >\r\n <smart-icon\r\n *ngIf=\"header.propertyName === 'icon'\"\r\n [icon]=\"getValue(row, header.propertyName)!\"\r\n >\r\n </smart-icon>\r\n <img\r\n *ngIf=\"header.propertyName === 'img'\"\r\n [src]=\"getValue(row, header.propertyName)\"\r\n alt=\"\"\r\n class=\"smarttableImg\"\r\n />\r\n <div\r\n *ngIf=\"\r\n header.propertyName !== 'icon' &&\r\n header.propertyName !== 'img' &&\r\n header.propertyName !== 'option' &&\r\n header.propertyName !== 'button'\r\n \"\r\n [innerHtml]=\"getValue(row, header.propertyName)\"\r\n ></div>\r\n </div>\r\n </div>\r\n </div>\r\n</div>\r\n", styles: [".mobileTable{display:flex;flex-direction:column}.mobileTableRow{display:flex;flex-direction:column;border-bottom:1px solid #ccc;padding:.5rem;gap:.5rem}.mobileTableCell{display:flex;flex-direction:column;gap:.25rem}.mobileTableCellHeader{font-weight:700;color:var(--primary-color)}.selected{background-color:var(--primary-light-color)}.mat-mdc-menu-item[disabled]{cursor:default!important}\n"], dependencies: [{ kind: "directive", type: SmartTooltipDirective, selector: "[smartTooltip]", inputs: ["smartTooltip"] }, { kind: "directive", type: i2.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { 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.NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }, { kind: "directive", type: i2.NgSwitch, selector: "[ngSwitch]", inputs: ["ngSwitch"] }, { kind: "directive", type: i2.NgSwitchCase, selector: "[ngSwitchCase]", inputs: ["ngSwitchCase"] }, { kind: "component", type: i4$2.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: i2$1.MatButton, selector: " button[mat-button], button[mat-raised-button], button[mat-flat-button], button[mat-stroked-button] ", exportAs: ["matButton"] }, { kind: "component", type: i2$1.MatIconButton, selector: "button[mat-icon-button]", exportAs: ["matButton"] }, { kind: "component", type: i5$1.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: i5$1.MatMenuItem, selector: "[mat-menu-item]", inputs: ["role", "disabled", "disableRipple"], exportAs: ["matMenuItem"] }, { kind: "directive", type: i5$1.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: SmartIconComponent, selector: "smart-icon", inputs: ["icon", "color"] }, { kind: "pipe", type: SmartDateTimePipe, name: "smartDateTime" }, { kind: "pipe", type: SmartDatePipe, name: "smartDate" }, { kind: "pipe", type: SmartTimePipe, name: "smartTime" }] }); }
|
|
8034
8035
|
}
|
|
8035
8036
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.3", ngImport: i0, type: MobileTableComponent, decorators: [{
|
|
8036
8037
|
type: Component,
|
|
8037
8038
|
args: [{ selector: 'lib-mobile-table', standalone: false, template: "<div class=\"mobileTable\">\r\n <div\r\n class=\"mobileTableRow\"\r\n *ngFor=\"let row of smartTable.tableRows\"\r\n [ngClass]=\"getRowClasses(row)\"\r\n [ngStyle]=\"getRowStyles(row)\"\r\n >\r\n <div\r\n class=\"mobileTableCell\"\r\n *ngFor=\"let header of smartTable.customSmartTableHeaders; let i = index\"\r\n (click)=\"handleOnRowClick(row)\"\r\n (dblclick)=\"handleOnRowDoubleClick($event, row)\"\r\n >\r\n <div class=\"mobileTableCellHeader\">\r\n {{ header.label }}\r\n </div>\r\n\r\n <mat-checkbox\r\n *ngIf=\"\r\n smartTable.customSmartTableHeaders &&\r\n smartTable.customSmartTableHeaders[i].propertyName === 'select'\r\n \"\r\n (click)=\"$event.stopPropagation()\"\r\n (change)=\"\r\n $event\r\n ? setSelection(\r\n smartTable.selectionProperty\r\n ? smartTable.getValueDeeply(row, smartTable.selectionProperty)\r\n : row\r\n )\r\n : null\r\n \"\r\n [disabled]=\"isDisabled(row)\"\r\n [checked]=\"\r\n smartTable.selection!.isSelected(\r\n smartTable.selectionProperty\r\n ? smartTable.getValueDeeply(row, smartTable.selectionProperty)\r\n : row\r\n )\r\n \"\r\n [aria-label]=\"\r\n checkboxLabel(\r\n smartTable.selectionProperty\r\n ? smartTable.getValueDeeply(row, smartTable.selectionProperty)\r\n : row\r\n )\r\n \"\r\n >\r\n </mat-checkbox>\r\n <div\r\n *ngIf=\"\r\n smartTable.customSmartTableHeaders && smartTable.customSmartTableHeaders[i].properties\r\n \"\r\n >\r\n <div *ngIf=\"smartTable.customSmartTableHeaders[i].properties?.type === type().DATETIME\">\r\n {{\r\n getValue(row, header.propertyName)\r\n | smartDateTime : smartTable.customSmartTableHeaders[i].properties?.dateFormat\r\n }}\r\n </div>\r\n <div *ngIf=\"smartTable.customSmartTableHeaders[i].properties?.type === type().DATE\">\r\n {{\r\n getValue(row, header.propertyName)\r\n | smartDate : smartTable.customSmartTableHeaders[i].properties?.dateFormat\r\n }}\r\n </div>\r\n <div *ngIf=\"smartTable.customSmartTableHeaders[i].properties?.type === type().TIME\">\r\n {{\r\n getValue(row, header.propertyName)\r\n | smartTime : smartTable.customSmartTableHeaders[i].properties?.dateFormat\r\n }}\r\n </div>\r\n <div *ngIf=\"smartTable.customSmartTableHeaders[i].properties?.type === type().CHECKBOX\">\r\n <mat-checkbox\r\n [disabled]=\"true\"\r\n [checked]=\"getValue(row, header.propertyName)\"\r\n ></mat-checkbox>\r\n </div>\r\n <div\r\n *ngIf=\"\r\n smartTable.customSmartTableHeaders[i].properties?.type === type().ICON &&\r\n smartTable.customSmartTableHeaders[i].properties?.icons?.length\r\n \"\r\n >\r\n <smart-icon\r\n [smartTooltip]=\"getToolTip(row, i)\"\r\n [icon]=\"getIcon(getValue(row, header.propertyName), i)!\"\r\n [color]=\"getColor(getValue(row, header.propertyName), i)\"\r\n >\r\n </smart-icon>\r\n </div>\r\n </div>\r\n <div *ngIf=\"isImageResource(row, header.propertyName)\">\r\n <smart-icon\r\n [icon]=\"getImageResourceIcon(row, header.propertyName)\"\r\n [color]=\"getImageResourceColor(row, header.propertyName)\"\r\n >\r\n </smart-icon>\r\n </div>\r\n <div\r\n *ngIf=\"smartTable.customSmartTableHeaders && smartTable.customSmartTableHeaders[i].buttons\"\r\n class=\"smart-table-buttons-col\"\r\n >\r\n <div *ngFor=\"let button of smartTable.customSmartTableHeaders[i].buttons\">\r\n <div *ngIf=\"showButton(button, row)\" [ngSwitch]=\"button.type\">\r\n <button\r\n (click)=\"customButtonClicked($event, button, row)\"\r\n *ngSwitchCase=\"smartTableButtonType.ICON\"\r\n mat-icon-button\r\n color=\"{{ button.color }}\"\r\n >\r\n <smart-icon title=\"{{ button.label }}\" [icon]=\"button.icon!\"></smart-icon>\r\n </button>\r\n <button\r\n (click)=\"customButtonClicked($event, button, row)\"\r\n *ngSwitchCase=\"smartTableButtonType.NORMAL\"\r\n mat-button\r\n color=\"{{ button.color }}\"\r\n >\r\n <smart-icon *ngIf=\"button.icon\" [icon]=\"button.icon\"></smart-icon>\r\n {{ button.label }}\r\n </button>\r\n <button\r\n (click)=\"customButtonClicked($event, button, row)\"\r\n *ngSwitchCase=\"smartTableButtonType.RAISED\"\r\n mat-raised-button\r\n color=\"{{ button.color }}\"\r\n >\r\n <smart-icon *ngIf=\"button.icon\" [icon]=\"button.icon\"></smart-icon>\r\n {{ button.label }}\r\n </button>\r\n <div *ngSwitchCase=\"smartTableButtonType.MENU\">\r\n <button\r\n *ngIf=\"showMenuButton(row, button)\"\r\n mat-button\r\n [matMenuTriggerFor]=\"menu\"\r\n (click)=\"customButtonClicked($event, button, row, undefined, true)\"\r\n color=\"{{ button.color }}\"\r\n >\r\n <smart-icon *ngIf=\"button.icon\" [icon]=\"button.icon\"></smart-icon>\r\n {{ button.label }}\r\n </button>\r\n <mat-menu #menu=\"matMenu\">\r\n <div *ngIf=\"button.menuItemButtons\">\r\n <button\r\n *ngFor=\"let btn of button.menuItemButtons\"\r\n (click)=\"customButtonClicked($event, btn, row, undefined, true)\"\r\n mat-menu-item\r\n >\r\n <smart-icon *ngIf=\"btn.icon\" [icon]=\"btn.icon\"></smart-icon>\r\n {{ btn.label }}\r\n </button>\r\n </div>\r\n <div *ngIf=\"button.menuItemButtonsPropertyName\">\r\n <button\r\n *ngFor=\"let btn of getValue(row, button.menuItemButtonsPropertyName)\"\r\n (click)=\"customButtonClicked($event, button, row, btn, true)\"\r\n [disabled]=\"btn.disabled\"\r\n mat-menu-item\r\n >\r\n {{ button.translator!(btn) }}\r\n </button>\r\n </div>\r\n </mat-menu>\r\n </div>\r\n </div>\r\n </div>\r\n </div>\r\n <div *ngIf=\"smartTable.customSmartTableHeaders && smartTable.customSmartTableHeaders[i].icon\">\r\n <smart-icon\r\n *ngIf=\"smartTable.customSmartTableHeaders[i].icon?.icon\"\r\n [ngClass]=\"smartTable.customSmartTableHeaders[i].icon?.cssClass ?? ''\"\r\n [color]=\"smartTable.customSmartTableHeaders[i].icon?.color\"\r\n [icon]=\"smartTable.customSmartTableHeaders[i].icon!.icon\"\r\n >\r\n </smart-icon>\r\n </div>\r\n <div\r\n *ngIf=\"\r\n smartTable.customSmartTableHeaders &&\r\n smartTable.customSmartTableHeaders[i].translator !== undefined\r\n \"\r\n >\r\n {{ smartTable.customSmartTableHeaders[i].translator!(getValue(row, header.propertyName)) }}\r\n </div>\r\n <div\r\n *ngIf=\"\r\n !smartTable.customSmartTableHeaders ||\r\n (smartTable.customSmartTableHeaders &&\r\n !smartTable.customSmartTableHeaders[i].properties &&\r\n !smartTable.customSmartTableHeaders[i].icon &&\r\n !smartTable.customSmartTableHeaders[i].buttons &&\r\n !smartTable.customSmartTableHeaders[i].translator &&\r\n !(smartTable.customSmartTableHeaders[i].propertyName === 'select') &&\r\n !(smartTable.customSmartTableHeaders[i].propertyName === 'expand'))\r\n \"\r\n >\r\n <smart-icon\r\n *ngIf=\"header.propertyName === 'icon'\"\r\n [icon]=\"getValue(row, header.propertyName)!\"\r\n >\r\n </smart-icon>\r\n <img\r\n *ngIf=\"header.propertyName === 'img'\"\r\n [src]=\"getValue(row, header.propertyName)\"\r\n alt=\"\"\r\n class=\"smarttableImg\"\r\n />\r\n <div\r\n *ngIf=\"\r\n header.propertyName !== 'icon' &&\r\n header.propertyName !== 'img' &&\r\n header.propertyName !== 'option' &&\r\n header.propertyName !== 'button'\r\n \"\r\n [innerHtml]=\"getValue(row, header.propertyName)\"\r\n ></div>\r\n </div>\r\n </div>\r\n </div>\r\n</div>\r\n", styles: [".mobileTable{display:flex;flex-direction:column}.mobileTableRow{display:flex;flex-direction:column;border-bottom:1px solid #ccc;padding:.5rem;gap:.5rem}.mobileTableCell{display:flex;flex-direction:column;gap:.25rem}.mobileTableCellHeader{font-weight:700;color:var(--primary-color)}.selected{background-color:var(--primary-light-color)}.mat-mdc-menu-item[disabled]{cursor:default!important}\n"] }]
|
|
8038
|
-
}], ctorParameters: () => [{ type: ComponentFactoryService }] });
|
|
8039
|
+
}], ctorParameters: () => [{ type: ComponentFactoryService }, { type: i0.ChangeDetectorRef }] });
|
|
8039
8040
|
|
|
8040
8041
|
class SmarttableComponent {
|
|
8041
8042
|
onResize(event) {
|