@smartbit4all/ng-client 5.0.14 → 5.0.16
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 +26 -17
- package/fesm2022/smartbit4all-ng-client.mjs.map +1 -1
- package/lib/smart-grid/smart-grid.component.d.ts +3 -2
- 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.16.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) {
|
|
@@ -11766,12 +11767,13 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.3", ngImpor
|
|
|
11766
11767
|
}] } });
|
|
11767
11768
|
|
|
11768
11769
|
class SmartGridComponent {
|
|
11769
|
-
constructor(service, cfService, dialog, injector, uiActionDescriptorService, compLib, gridMenuIcon) {
|
|
11770
|
+
constructor(service, cfService, dialog, injector, uiActionDescriptorService, uiActionService, compLib, gridMenuIcon) {
|
|
11770
11771
|
this.service = service;
|
|
11771
11772
|
this.cfService = cfService;
|
|
11772
11773
|
this.dialog = dialog;
|
|
11773
11774
|
this.injector = injector;
|
|
11774
11775
|
this.uiActionDescriptorService = uiActionDescriptorService;
|
|
11776
|
+
this.uiActionService = uiActionService;
|
|
11775
11777
|
this.compLib = compLib;
|
|
11776
11778
|
this.gridMenuIcon = gridMenuIcon;
|
|
11777
11779
|
// private readonly defaultPageSize: number = 10;
|
|
@@ -12426,8 +12428,15 @@ class SmartGridComponent {
|
|
|
12426
12428
|
if (this.smartGrid.options?.uiActionModelCallback) {
|
|
12427
12429
|
uiActionModel = this.smartGrid.options.uiActionModelCallback(uiActionModel);
|
|
12428
12430
|
}
|
|
12429
|
-
|
|
12430
|
-
this.smartGrid
|
|
12431
|
+
let uiActionSrv;
|
|
12432
|
+
if (this.smartGrid?.uiActionService) {
|
|
12433
|
+
uiActionSrv = this.smartGrid.uiActionService;
|
|
12434
|
+
}
|
|
12435
|
+
else {
|
|
12436
|
+
uiActionSrv = this.uiActionService;
|
|
12437
|
+
}
|
|
12438
|
+
uiActionSrv.uiActionModel = uiActionModel;
|
|
12439
|
+
uiActionSrv.execute(_uiAction, {
|
|
12431
12440
|
widgetId: this.smartGrid.gridIdentifier,
|
|
12432
12441
|
nodeId: row.id,
|
|
12433
12442
|
});
|
|
@@ -12632,13 +12641,13 @@ class SmartGridComponent {
|
|
|
12632
12641
|
getImageResourceStyle(resource) {
|
|
12633
12642
|
return resource.style ? resource.style : {};
|
|
12634
12643
|
}
|
|
12635
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.3", ngImport: i0, type: SmartGridComponent, deps: [{ token: SmartGridService }, { token: ComponentFactoryService }, { token: i1$1.MatDialog }, { token: i0.Injector }, { token: UiActionDescriptorService }, { token: COMPONENT_LIBRARY }, { token: 'gridMenuIcon' }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
12644
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.3", ngImport: i0, type: SmartGridComponent, deps: [{ token: SmartGridService }, { token: ComponentFactoryService }, { token: i1$1.MatDialog }, { token: i0.Injector }, { token: UiActionDescriptorService }, { token: UiActionService }, { token: COMPONENT_LIBRARY }, { token: 'gridMenuIcon' }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
12636
12645
|
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.3", type: SmartGridComponent, isStandalone: false, selector: "smart-grid", inputs: { smartGrid: "smartGrid", uuid: "uuid", dev: "dev" }, providers: [SmartGridService], viewQueries: [{ propertyName: "vcRefTable", first: true, predicate: ["table"], descendants: true, read: ViewContainerRef }, { propertyName: "toolbar", first: true, predicate: ["toolbar"], descendants: true }, { propertyName: "menu", first: true, predicate: ["menu"], descendants: true }], usesOnChanges: true, ngImport: i0, template: "@if(compLib === componentLibrary.PRIMENG) {\r\n<div *ngIf=\"smartGrid\" class=\"primeSmartGrid-container\">\r\n <div class=\"smart-grid-toolbar\">\r\n <smart-ui-action-toolbar #toolbar [id]=\"'grid_not_initialized'\"></smart-ui-action-toolbar>\r\n </div>\r\n <p-table\r\n *ngIf=\"!smartGrid.layoutDef || smartGrid.layoutDef === layoutDef().TABLE\"\r\n #pTable\r\n [value]=\"smartGrid.gridModel.page.rows!\"\r\n (onSort)=\"gridSort($event)\"\r\n [customSort]=\"true\"\r\n [sortMode]=\"'multiple'\"\r\n [lazy]=\"true\"\r\n (onLazyLoad)=\"lazyLoad($event)\"\r\n [reorderableColumns]=\"smartGrid.gridModel.view?.descriptor?.showEditColumns\"\r\n [columns]=\"columns\"\r\n (onColReorder)=\"onColOrder($event)\"\r\n (onRowSelect)=\"onRowSelect($event)\"\r\n (onRowUnselect)=\"onRowUnselect($event)\"\r\n [selection]=\"selectedRows\"\r\n (onHeaderCheckboxToggle)=\"onSelectAllRow($event)\"\r\n dataKey=\"id\"\r\n >\r\n <ng-container *ngIf=\"smartGrid.gridModel.view?.descriptor?.showEditColumns\">\r\n <ng-template pTemplate=\"caption\">\r\n <div *ngIf=\"smartGrid.gridModel.view?.descriptor?.showEditColumns\">\r\n <p-multiSelect\r\n display=\"chip\"\r\n [options]=\"smartGrid.gridModel.view?.descriptor?.columns\"\r\n optionLabel=\"label\"\r\n [(ngModel)]=\"columns\"\r\n selectedItemsLabel=\"{0} columns selected\"\r\n [style]=\"{ 'min-width': '200px' }\"\r\n placeholder=\"Choose Columns\"\r\n (onChange)=\"headerChange($event)\"\r\n />\r\n </div>\r\n </ng-template>\r\n </ng-container>\r\n <ng-template pTemplate=\"header\">\r\n <tr *ngIf=\"smartGrid.gridModel.view?.descriptor?.showEditColumns\">\r\n <th\r\n *ngIf=\"isMultiple && (tableType === 'checkbox' || tableType === 'CheckBox')\"\r\n style=\"width: 4rem\"\r\n >\r\n <p-tableHeaderCheckbox />\r\n </th>\r\n <th\r\n *ngIf=\"!isMultiple && (tableType === 'checkbox' || tableType === 'CheckBox')\"\r\n style=\"width: 4rem\"\r\n ></th>\r\n <th [pSortableColumn]=\"col.propertyName\" *ngFor=\"let col of columns\" pReorderableColumn>\r\n <p-sortIcon [field]=\"col.propertyName\" />\r\n {{ col.label }}\r\n </th>\r\n <th></th>\r\n </tr>\r\n <tr *ngIf=\"!smartGrid.gridModel.view?.descriptor?.showEditColumns\">\r\n <th\r\n *ngIf=\"isMultiple && (tableType === 'checkbox' || tableType === 'CheckBox')\"\r\n style=\"width: 4rem\"\r\n >\r\n <p-tableHeaderCheckbox />\r\n </th>\r\n <th\r\n *ngIf=\"!isMultiple && (tableType === 'checkbox' || tableType === 'CheckBox')\"\r\n style=\"width: 4rem\"\r\n ></th>\r\n <th [pSortableColumn]=\"col.propertyName\" *ngFor=\"let col of columns\">\r\n <p-sortIcon [field]=\"col.propertyName\" />\r\n {{ col.label }}\r\n </th>\r\n <th></th>\r\n </tr>\r\n <!-- <tr>\r\n <th *ngFor=\"let col of smartGrid?.gridModel?.view?.orderedColumnNames\">\r\n <p-columnFilter\r\n type=\"text\"\r\n [field]=\"'data.' + col\"\r\n [placeholder]=\"'Search by ' + col\"\r\n [ariaLabel]=\"'Filter ' + col\"\r\n />\r\n </th>\r\n </tr> -->\r\n </ng-template>\r\n <ng-template pTemplate=\"body\" let-row>\r\n <tr (dblclick)=\"onDoubleClick(row)\" *ngIf=\"row && row.data\">\r\n <td *ngIf=\"isMultiple && (tableType === 'checkbox' || tableType === 'CheckBox')\">\r\n <p-tableCheckbox *ngIf=\"row.selectable != false\" [value]=\"row\" />\r\n </td>\r\n <td *ngIf=\"!isMultiple && (tableType === 'checkbox' || tableType === 'CheckBox')\">\r\n <p-tableRadioButton [value]=\"row\" />\r\n </td>\r\n <td *ngFor=\"let col of smartGrid?.gridModel?.view?.orderedColumnNames\">\r\n <div *ngIf=\"row.icons[col]\">\r\n <div class=\"smart-table-icon-container\">\r\n <div *ngFor=\"let ir of getImageResourceIcons(row, col)\">\r\n <div\r\n pTooltip=\"{{ ir.tooltip?.tooltip }}\"\r\n tooltipPosition=\"right\"\r\n placeholder=\"Right\"\r\n [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 <div *ngIf=\"!row.icons[col]\" [innerHtml]=\"getColValue(col, row)\"> </div>\r\n </td>\r\n <td class=\"menu-button\">\r\n <p-button\r\n [rounded]=\"true\"\r\n [text]=\"true\"\r\n *ngIf=\"row.actions && row.actions.length > 0\"\r\n (onClick)=\"onOptionsClick($event, row)\"\r\n >\r\n <smart-icon icon=\"ellipsis-v\"></smart-icon>\r\n </p-button>\r\n </td>\r\n </tr>\r\n </ng-template>\r\n </p-table>\r\n <div\r\n *ngIf=\"smartGrid.layoutDef === layoutDef().CARD && smartGrid.dataLayoutDef\"\r\n class=\"cards-container\"\r\n [ngStyle]=\"{\r\n 'grid-template-columns':\r\n smartGrid.numberOfColumn !== undefined\r\n ? 'repeat(' + smartGrid.numberOfColumn + ', 1fr)'\r\n : ''\r\n }\"\r\n >\r\n <app-smart-grid-card\r\n class=\"smartGrid-card-container\"\r\n *ngFor=\"let task of smartGrid.gridModel.page.rows\"\r\n [item]=\"task\"\r\n [smartGrid]=\"smartGrid\"\r\n [onSelect]=\"onSelect.bind(this)\"\r\n ></app-smart-grid-card>\r\n </div>\r\n <p-paginator\r\n *ngIf=\"smartGrid.paginator\"\r\n [first]=\"pageIndex!\"\r\n [totalRecords]=\"length!\"\r\n [rows]=\"pageSize\"\r\n [rowsPerPageOptions]=\"pageSizeOptions\"\r\n (onPageChange)=\"onPrimeChangePage($event)\"\r\n [showCurrentPageReport]=\"true\"\r\n dropdownAppendTo=\"body\"\r\n />\r\n <p-menu #menu [model]=\"menuButtons\" [popup]=\"true\" appendTo=\"body\"> </p-menu>\r\n</div>\r\n}@else {\r\n<div *ngIf=\"smartGrid\" class=\"smartGrid-container\">\r\n <div class=\"smart-grid-toolbar\">\r\n <smart-ui-action-toolbar #toolbar [id]=\"'grid_not_initialized'\"></smart-ui-action-toolbar>\r\n <button\r\n (click)=\"editColumns()\"\r\n mat-mini-fab\r\n color=\"text-primary\"\r\n *ngIf=\"smartGrid.showEditColumns\"\r\n >\r\n <mat-icon aria-hidden=\"false\" aria-label=\"Columns\" class=\"smart-grid-edit-icon\"\r\n >view_columns</mat-icon\r\n >\r\n </button>\r\n </div>\r\n <!-- <div [ngClass]=\"isBlocked ? 'blocked' : ''\"></div> -->\r\n <div class=\"smartGridContent\">\r\n <div>\r\n <div *ngIf=\"smartGrid.showResultCount\">\r\n <div class=\"smartGrid-data-number\">\r\n {{ smartGrid.gridModel.totalRowCount }}\r\n </div>\r\n </div>\r\n </div>\r\n\r\n <div class=\"smart-grid-table-container\">\r\n <ng-template #table></ng-template>\r\n </div>\r\n\r\n <div *ngIf=\"smartGrid.layoutDef === layoutDef().EXPANDABLE\">\r\n <smart-expandable-section\r\n #gridExpandableSection\r\n *ngFor=\"let expandableSection of expandableSections\"\r\n [data]=\"expandableSection\"\r\n ></smart-expandable-section>\r\n </div>\r\n <div\r\n *ngIf=\"smartGrid.layoutDef === layoutDef().CARD && smartGrid.dataLayoutDef\"\r\n class=\"cards-container\"\r\n [ngStyle]=\"{\r\n 'grid-template-columns':\r\n smartGrid.numberOfColumn !== undefined\r\n ? 'repeat(' + smartGrid.numberOfColumn + ', 1fr)'\r\n : ''\r\n }\"\r\n >\r\n <app-smart-grid-card\r\n class=\"smartGrid-card-container\"\r\n *ngFor=\"let task of smartGrid.gridModel.page.rows\"\r\n [item]=\"task\"\r\n [smartGrid]=\"smartGrid\"\r\n [onSelect]=\"onSelect.bind(this)\"\r\n ></app-smart-grid-card>\r\n </div>\r\n <div\r\n *ngIf=\"smartGrid.layoutDef === layoutDef().TREE && treeControl\"\r\n class=\"tree-container\"\r\n [ngStyle]=\"{\r\n 'grid-template-columns':\r\n smartGrid.numberOfColumn !== undefined\r\n ? 'repeat(' + smartGrid.numberOfColumn + ', 1fr)'\r\n : ''\r\n }\"\r\n >\r\n <mat-tree [dataSource]=\"treeDataSource!\" [treeControl]=\"treeControl!\">\r\n <mat-tree-node\r\n *matTreeNodeDef=\"let node\"\r\n matTreeNodeToggle\r\n matTreeNodePadding\r\n matTreeNodePaddingIndent=\"24\"\r\n >\r\n <button mat-icon-button disabled class=\"tree-button\"></button>\r\n <mat-checkbox\r\n class=\"checklist-leaf-node\"\r\n [checked]=\"treeChecklistSelection?.isSelected(node)\"\r\n (change)=\"treeNodeSelectionToggle(node)\"\r\n >{{ getTreeItem(node) }}</mat-checkbox\r\n >\r\n </mat-tree-node>\r\n\r\n <mat-tree-node\r\n *matTreeNodeDef=\"let node; when: hasChild\"\r\n matTreeNodePadding\r\n matTreeNodePaddingIndent=\"24\"\r\n >\r\n <button\r\n mat-icon-button\r\n matTreeNodeToggle\r\n class=\"tree-button\"\r\n [attr.aria-label]=\"'Toggle ' + node.item\"\r\n >\r\n <mat-icon class=\"mat-icon-rtl-mirror\">\r\n {{ treeControl!.isExpanded(node) ? 'expand_more' : 'chevron_right' }}\r\n </mat-icon>\r\n </button>\r\n <mat-checkbox\r\n [checked]=\"treeChecklistSelection?.isSelected(node)\"\r\n [indeterminate]=\"descendantsPartiallySelected(node)\"\r\n (change)=\"treeNodeSelectionToggle(node)\"\r\n >{{ getTreeItem(node) }}</mat-checkbox\r\n >\r\n </mat-tree-node>\r\n </mat-tree>\r\n </div>\r\n </div>\r\n\r\n <mat-paginator\r\n *ngIf=\"smartGrid.paginator && !treeControl\"\r\n #paginator\r\n [length]=\"length\"\r\n [pageIndex]=\"pageIndex\"\r\n [pageSize]=\"pageSize\"\r\n [pageSizeOptions]=\"pageSizeOptions\"\r\n (page)=\"onChangePage($event)\"\r\n ></mat-paginator>\r\n</div>\r\n}\r\n", styles: [".smartGrid-container{position:relative;padding:1.5rem;display:flex;flex-direction:column;gap:1rem}.primeSmartGrid-container{display:flex;flex-direction:column;gap:1rem}.smartGrid-data-number{padding-bottom:1rem}.smart-table-icon-container{display:flex;flex-direction:row;justify-content:space-between;white-space:initial}.cards-container{display:grid;gap:1rem;padding:1rem}.smartGrid-card-container{height:auto;border:1px solid black;border-radius:8px}.smartGrid-container ::ng-deep .mat-form-field-appearance-legacy .mat-form-field-underline{bottom:0}.smartGridContent{width:100%;flex:1;overflow:auto}.blocked{position:absolute;width:calc(100% - 3rem);height:calc(100% - 3rem);z-index:110;background-color:#0003}.smart-grid-table-container{display:flex;flex-direction:column;gap:1rem}.smart-grid-toolbar{display:flex;flex-direction:row;justify-content:flex-end;align-items:center}.smart-grid-toolbar smart-ui-action-toolbar{width:100%}.smart-grid-edit-icon{color:var(--light-gray)}.tree-button{width:24px!important;height:24px!important}.menu-button{text-align:-webkit-right}\n"], dependencies: [{ kind: "directive", type: i10.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i10.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "directive", type: i6$3.Tooltip, selector: "[pTooltip]", inputs: ["tooltipPosition", "tooltipEvent", "appendTo", "positionStyle", "tooltipStyleClass", "tooltipZIndex", "escape", "showDelay", "hideDelay", "life", "positionTop", "positionLeft", "autoHide", "fitContent", "hideOnEscape", "pTooltip", "tooltipDisabled", "tooltipOptions"] }, { 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: "component", type: SmartIconComponent, selector: "smart-icon", inputs: ["icon", "color"] }, { kind: "component", type: i4.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "component", type: i2$1.MatIconButton, selector: "button[mat-icon-button]", exportAs: ["matButton"] }, { kind: "component", type: i2$1.MatMiniFabButton, selector: "button[mat-mini-fab]", exportAs: ["matButton"] }, { kind: "component", type: i11$1.MatPaginator, selector: "mat-paginator", inputs: ["color", "pageIndex", "length", "pageSize", "pageSizeOptions", "hidePageSize", "showFirstLastButtons", "selectConfig", "disabled"], outputs: ["page"], exportAs: ["matPaginator"] }, { kind: "directive", type: i12.MatTreeNodeDef, selector: "[matTreeNodeDef]", inputs: ["matTreeNodeDefWhen", "matTreeNode"] }, { kind: "directive", type: i12.MatTreeNodePadding, selector: "[matTreeNodePadding]", inputs: ["matTreeNodePadding", "matTreeNodePaddingIndent"] }, { kind: "directive", type: i12.MatTreeNodeToggle, selector: "[matTreeNodeToggle]", inputs: ["matTreeNodeToggleRecursive"] }, { kind: "component", type: i12.MatTree, selector: "mat-tree", exportAs: ["matTree"] }, { kind: "directive", type: i12.MatTreeNode, selector: "mat-tree-node", inputs: ["tabIndex", "disabled"], outputs: ["activation", "expandedChange"], exportAs: ["matTreeNode"] }, { 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: ExpandableSectionComponent, selector: "smart-expandable-section", inputs: ["data", "index"] }, { kind: "component", type: UiActionToolbarComponent, selector: "smart-ui-action-toolbar", inputs: ["uiActionModels", "uiActionDescriptorService", "id"] }, { kind: "directive", type: ComparableMultiselectDirective, selector: "p-multiSelect", inputs: ["compareWith"] }, { kind: "component", type: i17$1.Table, selector: "p-table", inputs: ["frozenColumns", "frozenValue", "style", "styleClass", "tableStyle", "tableStyleClass", "paginator", "pageLinks", "rowsPerPageOptions", "alwaysShowPaginator", "paginatorPosition", "paginatorStyleClass", "paginatorDropdownAppendTo", "paginatorDropdownScrollHeight", "currentPageReportTemplate", "showCurrentPageReport", "showJumpToPageDropdown", "showJumpToPageInput", "showFirstLastIcon", "showPageLinks", "defaultSortOrder", "sortMode", "resetPageOnSort", "selectionMode", "selectionPageOnly", "contextMenuSelection", "contextMenuSelectionMode", "dataKey", "metaKeySelection", "rowSelectable", "rowTrackBy", "lazy", "lazyLoadOnInit", "compareSelectionBy", "csvSeparator", "exportFilename", "filters", "globalFilterFields", "filterDelay", "filterLocale", "expandedRowKeys", "editingRowKeys", "rowExpandMode", "scrollable", "scrollDirection", "rowGroupMode", "scrollHeight", "virtualScroll", "virtualScrollItemSize", "virtualScrollOptions", "virtualScrollDelay", "frozenWidth", "responsive", "contextMenu", "resizableColumns", "columnResizeMode", "reorderableColumns", "loading", "loadingIcon", "showLoader", "rowHover", "customSort", "showInitialSortBadge", "autoLayout", "exportFunction", "exportHeader", "stateKey", "stateStorage", "editMode", "groupRowsBy", "size", "showGridlines", "stripedRows", "groupRowsByOrder", "responsiveLayout", "breakpoint", "paginatorLocale", "value", "columns", "first", "rows", "totalRecords", "sortField", "sortOrder", "multiSortMeta", "selection", "virtualRowHeight", "selectAll"], outputs: ["contextMenuSelectionChange", "selectAllChange", "selectionChange", "onRowSelect", "onRowUnselect", "onPage", "onSort", "onFilter", "onLazyLoad", "onRowExpand", "onRowCollapse", "onContextMenuSelect", "onColResize", "onColReorder", "onRowReorder", "onEditInit", "onEditComplete", "onEditCancel", "onHeaderCheckboxToggle", "sortFunction", "firstChange", "rowsChange", "onStateSave", "onStateRestore"] }, { kind: "directive", type: i6.PrimeTemplate, selector: "[pTemplate]", inputs: ["type", "pTemplate"] }, { kind: "directive", type: i17$1.SortableColumn, selector: "[pSortableColumn]", inputs: ["pSortableColumn", "pSortableColumnDisabled"] }, { kind: "directive", type: i17$1.ReorderableColumn, selector: "[pReorderableColumn]", inputs: ["pReorderableColumnDisabled"] }, { kind: "component", type: i17$1.SortIcon, selector: "p-sortIcon", inputs: ["field"] }, { kind: "component", type: i17$1.TableRadioButton, selector: "p-tableRadioButton", inputs: ["disabled", "value", "index", "inputId", "name", "ariaLabel"] }, { kind: "component", type: i17$1.TableCheckbox, selector: "p-tableCheckbox", inputs: ["disabled", "value", "index", "inputId", "name", "required", "ariaLabel"] }, { kind: "component", type: i17$1.TableHeaderCheckbox, selector: "p-tableHeaderCheckbox", inputs: ["disabled", "inputId", "name", "ariaLabel"] }, { kind: "component", type: i3.Button, selector: "p-button", inputs: ["type", "iconPos", "icon", "badge", "label", "disabled", "loading", "loadingIcon", "raised", "rounded", "text", "plain", "severity", "outlined", "link", "tabindex", "size", "variant", "style", "styleClass", "badgeClass", "badgeSeverity", "ariaLabel", "autofocus", "fluid", "buttonProps"], outputs: ["onClick", "onFocus", "onBlur"] }, { kind: "component", type: i20$1.Menu, selector: "p-menu", inputs: ["model", "popup", "style", "styleClass", "appendTo", "autoZIndex", "baseZIndex", "showTransitionOptions", "hideTransitionOptions", "ariaLabel", "ariaLabelledBy", "id", "tabindex"], outputs: ["onShow", "onHide", "onBlur", "onFocus"] }, { kind: "component", type: i21$1.Paginator, selector: "p-paginator", inputs: ["pageLinkSize", "style", "styleClass", "alwaysShow", "dropdownAppendTo", "templateLeft", "templateRight", "appendTo", "dropdownScrollHeight", "currentPageReportTemplate", "showCurrentPageReport", "showFirstLastIcon", "totalRecords", "rows", "rowsPerPageOptions", "showJumpToPageDropdown", "showJumpToPageInput", "jumpToPageItemTemplate", "showPageLinks", "locale", "dropdownItemTemplate", "first"], outputs: ["onPageChange"] }, { kind: "component", type: i1$5.MultiSelect, selector: "p-multiSelect, p-multiselect, p-multi-select", inputs: ["id", "ariaLabel", "style", "styleClass", "panelStyle", "panelStyleClass", "inputId", "disabled", "fluid", "readonly", "group", "filter", "filterPlaceHolder", "filterLocale", "overlayVisible", "tabindex", "variant", "appendTo", "dataKey", "name", "ariaLabelledBy", "displaySelectedLabel", "maxSelectedLabels", "selectionLimit", "selectedItemsLabel", "showToggleAll", "emptyFilterMessage", "emptyMessage", "resetFilterOnHide", "dropdownIcon", "chipIcon", "optionLabel", "optionValue", "optionDisabled", "optionGroupLabel", "optionGroupChildren", "showHeader", "filterBy", "scrollHeight", "lazy", "virtualScroll", "loading", "virtualScrollItemSize", "loadingIcon", "virtualScrollOptions", "overlayOptions", "ariaFilterLabel", "filterMatchMode", "tooltip", "tooltipPosition", "tooltipPositionStyle", "tooltipStyleClass", "autofocusFilter", "display", "autocomplete", "size", "showClear", "autofocus", "autoZIndex", "baseZIndex", "showTransitionOptions", "hideTransitionOptions", "defaultLabel", "placeholder", "options", "filterValue", "itemSize", "selectAll", "focusOnHover", "filterFields", "selectOnFocus", "autoOptionFocus", "highlightOnSelect"], outputs: ["onChange", "onFilter", "onFocus", "onBlur", "onClick", "onClear", "onPanelShow", "onPanelHide", "onLazyLoad", "onRemove", "onSelectAllChange"] }, { kind: "component", type: SmartGridCardComponent, selector: "app-smart-grid-card", inputs: ["item", "smartGrid", "onSelect"] }] }); }
|
|
12637
12646
|
}
|
|
12638
12647
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.3", ngImport: i0, type: SmartGridComponent, decorators: [{
|
|
12639
12648
|
type: Component,
|
|
12640
12649
|
args: [{ selector: 'smart-grid', providers: [SmartGridService], standalone: false, template: "@if(compLib === componentLibrary.PRIMENG) {\r\n<div *ngIf=\"smartGrid\" class=\"primeSmartGrid-container\">\r\n <div class=\"smart-grid-toolbar\">\r\n <smart-ui-action-toolbar #toolbar [id]=\"'grid_not_initialized'\"></smart-ui-action-toolbar>\r\n </div>\r\n <p-table\r\n *ngIf=\"!smartGrid.layoutDef || smartGrid.layoutDef === layoutDef().TABLE\"\r\n #pTable\r\n [value]=\"smartGrid.gridModel.page.rows!\"\r\n (onSort)=\"gridSort($event)\"\r\n [customSort]=\"true\"\r\n [sortMode]=\"'multiple'\"\r\n [lazy]=\"true\"\r\n (onLazyLoad)=\"lazyLoad($event)\"\r\n [reorderableColumns]=\"smartGrid.gridModel.view?.descriptor?.showEditColumns\"\r\n [columns]=\"columns\"\r\n (onColReorder)=\"onColOrder($event)\"\r\n (onRowSelect)=\"onRowSelect($event)\"\r\n (onRowUnselect)=\"onRowUnselect($event)\"\r\n [selection]=\"selectedRows\"\r\n (onHeaderCheckboxToggle)=\"onSelectAllRow($event)\"\r\n dataKey=\"id\"\r\n >\r\n <ng-container *ngIf=\"smartGrid.gridModel.view?.descriptor?.showEditColumns\">\r\n <ng-template pTemplate=\"caption\">\r\n <div *ngIf=\"smartGrid.gridModel.view?.descriptor?.showEditColumns\">\r\n <p-multiSelect\r\n display=\"chip\"\r\n [options]=\"smartGrid.gridModel.view?.descriptor?.columns\"\r\n optionLabel=\"label\"\r\n [(ngModel)]=\"columns\"\r\n selectedItemsLabel=\"{0} columns selected\"\r\n [style]=\"{ 'min-width': '200px' }\"\r\n placeholder=\"Choose Columns\"\r\n (onChange)=\"headerChange($event)\"\r\n />\r\n </div>\r\n </ng-template>\r\n </ng-container>\r\n <ng-template pTemplate=\"header\">\r\n <tr *ngIf=\"smartGrid.gridModel.view?.descriptor?.showEditColumns\">\r\n <th\r\n *ngIf=\"isMultiple && (tableType === 'checkbox' || tableType === 'CheckBox')\"\r\n style=\"width: 4rem\"\r\n >\r\n <p-tableHeaderCheckbox />\r\n </th>\r\n <th\r\n *ngIf=\"!isMultiple && (tableType === 'checkbox' || tableType === 'CheckBox')\"\r\n style=\"width: 4rem\"\r\n ></th>\r\n <th [pSortableColumn]=\"col.propertyName\" *ngFor=\"let col of columns\" pReorderableColumn>\r\n <p-sortIcon [field]=\"col.propertyName\" />\r\n {{ col.label }}\r\n </th>\r\n <th></th>\r\n </tr>\r\n <tr *ngIf=\"!smartGrid.gridModel.view?.descriptor?.showEditColumns\">\r\n <th\r\n *ngIf=\"isMultiple && (tableType === 'checkbox' || tableType === 'CheckBox')\"\r\n style=\"width: 4rem\"\r\n >\r\n <p-tableHeaderCheckbox />\r\n </th>\r\n <th\r\n *ngIf=\"!isMultiple && (tableType === 'checkbox' || tableType === 'CheckBox')\"\r\n style=\"width: 4rem\"\r\n ></th>\r\n <th [pSortableColumn]=\"col.propertyName\" *ngFor=\"let col of columns\">\r\n <p-sortIcon [field]=\"col.propertyName\" />\r\n {{ col.label }}\r\n </th>\r\n <th></th>\r\n </tr>\r\n <!-- <tr>\r\n <th *ngFor=\"let col of smartGrid?.gridModel?.view?.orderedColumnNames\">\r\n <p-columnFilter\r\n type=\"text\"\r\n [field]=\"'data.' + col\"\r\n [placeholder]=\"'Search by ' + col\"\r\n [ariaLabel]=\"'Filter ' + col\"\r\n />\r\n </th>\r\n </tr> -->\r\n </ng-template>\r\n <ng-template pTemplate=\"body\" let-row>\r\n <tr (dblclick)=\"onDoubleClick(row)\" *ngIf=\"row && row.data\">\r\n <td *ngIf=\"isMultiple && (tableType === 'checkbox' || tableType === 'CheckBox')\">\r\n <p-tableCheckbox *ngIf=\"row.selectable != false\" [value]=\"row\" />\r\n </td>\r\n <td *ngIf=\"!isMultiple && (tableType === 'checkbox' || tableType === 'CheckBox')\">\r\n <p-tableRadioButton [value]=\"row\" />\r\n </td>\r\n <td *ngFor=\"let col of smartGrid?.gridModel?.view?.orderedColumnNames\">\r\n <div *ngIf=\"row.icons[col]\">\r\n <div class=\"smart-table-icon-container\">\r\n <div *ngFor=\"let ir of getImageResourceIcons(row, col)\">\r\n <div\r\n pTooltip=\"{{ ir.tooltip?.tooltip }}\"\r\n tooltipPosition=\"right\"\r\n placeholder=\"Right\"\r\n [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 <div *ngIf=\"!row.icons[col]\" [innerHtml]=\"getColValue(col, row)\"> </div>\r\n </td>\r\n <td class=\"menu-button\">\r\n <p-button\r\n [rounded]=\"true\"\r\n [text]=\"true\"\r\n *ngIf=\"row.actions && row.actions.length > 0\"\r\n (onClick)=\"onOptionsClick($event, row)\"\r\n >\r\n <smart-icon icon=\"ellipsis-v\"></smart-icon>\r\n </p-button>\r\n </td>\r\n </tr>\r\n </ng-template>\r\n </p-table>\r\n <div\r\n *ngIf=\"smartGrid.layoutDef === layoutDef().CARD && smartGrid.dataLayoutDef\"\r\n class=\"cards-container\"\r\n [ngStyle]=\"{\r\n 'grid-template-columns':\r\n smartGrid.numberOfColumn !== undefined\r\n ? 'repeat(' + smartGrid.numberOfColumn + ', 1fr)'\r\n : ''\r\n }\"\r\n >\r\n <app-smart-grid-card\r\n class=\"smartGrid-card-container\"\r\n *ngFor=\"let task of smartGrid.gridModel.page.rows\"\r\n [item]=\"task\"\r\n [smartGrid]=\"smartGrid\"\r\n [onSelect]=\"onSelect.bind(this)\"\r\n ></app-smart-grid-card>\r\n </div>\r\n <p-paginator\r\n *ngIf=\"smartGrid.paginator\"\r\n [first]=\"pageIndex!\"\r\n [totalRecords]=\"length!\"\r\n [rows]=\"pageSize\"\r\n [rowsPerPageOptions]=\"pageSizeOptions\"\r\n (onPageChange)=\"onPrimeChangePage($event)\"\r\n [showCurrentPageReport]=\"true\"\r\n dropdownAppendTo=\"body\"\r\n />\r\n <p-menu #menu [model]=\"menuButtons\" [popup]=\"true\" appendTo=\"body\"> </p-menu>\r\n</div>\r\n}@else {\r\n<div *ngIf=\"smartGrid\" class=\"smartGrid-container\">\r\n <div class=\"smart-grid-toolbar\">\r\n <smart-ui-action-toolbar #toolbar [id]=\"'grid_not_initialized'\"></smart-ui-action-toolbar>\r\n <button\r\n (click)=\"editColumns()\"\r\n mat-mini-fab\r\n color=\"text-primary\"\r\n *ngIf=\"smartGrid.showEditColumns\"\r\n >\r\n <mat-icon aria-hidden=\"false\" aria-label=\"Columns\" class=\"smart-grid-edit-icon\"\r\n >view_columns</mat-icon\r\n >\r\n </button>\r\n </div>\r\n <!-- <div [ngClass]=\"isBlocked ? 'blocked' : ''\"></div> -->\r\n <div class=\"smartGridContent\">\r\n <div>\r\n <div *ngIf=\"smartGrid.showResultCount\">\r\n <div class=\"smartGrid-data-number\">\r\n {{ smartGrid.gridModel.totalRowCount }}\r\n </div>\r\n </div>\r\n </div>\r\n\r\n <div class=\"smart-grid-table-container\">\r\n <ng-template #table></ng-template>\r\n </div>\r\n\r\n <div *ngIf=\"smartGrid.layoutDef === layoutDef().EXPANDABLE\">\r\n <smart-expandable-section\r\n #gridExpandableSection\r\n *ngFor=\"let expandableSection of expandableSections\"\r\n [data]=\"expandableSection\"\r\n ></smart-expandable-section>\r\n </div>\r\n <div\r\n *ngIf=\"smartGrid.layoutDef === layoutDef().CARD && smartGrid.dataLayoutDef\"\r\n class=\"cards-container\"\r\n [ngStyle]=\"{\r\n 'grid-template-columns':\r\n smartGrid.numberOfColumn !== undefined\r\n ? 'repeat(' + smartGrid.numberOfColumn + ', 1fr)'\r\n : ''\r\n }\"\r\n >\r\n <app-smart-grid-card\r\n class=\"smartGrid-card-container\"\r\n *ngFor=\"let task of smartGrid.gridModel.page.rows\"\r\n [item]=\"task\"\r\n [smartGrid]=\"smartGrid\"\r\n [onSelect]=\"onSelect.bind(this)\"\r\n ></app-smart-grid-card>\r\n </div>\r\n <div\r\n *ngIf=\"smartGrid.layoutDef === layoutDef().TREE && treeControl\"\r\n class=\"tree-container\"\r\n [ngStyle]=\"{\r\n 'grid-template-columns':\r\n smartGrid.numberOfColumn !== undefined\r\n ? 'repeat(' + smartGrid.numberOfColumn + ', 1fr)'\r\n : ''\r\n }\"\r\n >\r\n <mat-tree [dataSource]=\"treeDataSource!\" [treeControl]=\"treeControl!\">\r\n <mat-tree-node\r\n *matTreeNodeDef=\"let node\"\r\n matTreeNodeToggle\r\n matTreeNodePadding\r\n matTreeNodePaddingIndent=\"24\"\r\n >\r\n <button mat-icon-button disabled class=\"tree-button\"></button>\r\n <mat-checkbox\r\n class=\"checklist-leaf-node\"\r\n [checked]=\"treeChecklistSelection?.isSelected(node)\"\r\n (change)=\"treeNodeSelectionToggle(node)\"\r\n >{{ getTreeItem(node) }}</mat-checkbox\r\n >\r\n </mat-tree-node>\r\n\r\n <mat-tree-node\r\n *matTreeNodeDef=\"let node; when: hasChild\"\r\n matTreeNodePadding\r\n matTreeNodePaddingIndent=\"24\"\r\n >\r\n <button\r\n mat-icon-button\r\n matTreeNodeToggle\r\n class=\"tree-button\"\r\n [attr.aria-label]=\"'Toggle ' + node.item\"\r\n >\r\n <mat-icon class=\"mat-icon-rtl-mirror\">\r\n {{ treeControl!.isExpanded(node) ? 'expand_more' : 'chevron_right' }}\r\n </mat-icon>\r\n </button>\r\n <mat-checkbox\r\n [checked]=\"treeChecklistSelection?.isSelected(node)\"\r\n [indeterminate]=\"descendantsPartiallySelected(node)\"\r\n (change)=\"treeNodeSelectionToggle(node)\"\r\n >{{ getTreeItem(node) }}</mat-checkbox\r\n >\r\n </mat-tree-node>\r\n </mat-tree>\r\n </div>\r\n </div>\r\n\r\n <mat-paginator\r\n *ngIf=\"smartGrid.paginator && !treeControl\"\r\n #paginator\r\n [length]=\"length\"\r\n [pageIndex]=\"pageIndex\"\r\n [pageSize]=\"pageSize\"\r\n [pageSizeOptions]=\"pageSizeOptions\"\r\n (page)=\"onChangePage($event)\"\r\n ></mat-paginator>\r\n</div>\r\n}\r\n", styles: [".smartGrid-container{position:relative;padding:1.5rem;display:flex;flex-direction:column;gap:1rem}.primeSmartGrid-container{display:flex;flex-direction:column;gap:1rem}.smartGrid-data-number{padding-bottom:1rem}.smart-table-icon-container{display:flex;flex-direction:row;justify-content:space-between;white-space:initial}.cards-container{display:grid;gap:1rem;padding:1rem}.smartGrid-card-container{height:auto;border:1px solid black;border-radius:8px}.smartGrid-container ::ng-deep .mat-form-field-appearance-legacy .mat-form-field-underline{bottom:0}.smartGridContent{width:100%;flex:1;overflow:auto}.blocked{position:absolute;width:calc(100% - 3rem);height:calc(100% - 3rem);z-index:110;background-color:#0003}.smart-grid-table-container{display:flex;flex-direction:column;gap:1rem}.smart-grid-toolbar{display:flex;flex-direction:row;justify-content:flex-end;align-items:center}.smart-grid-toolbar smart-ui-action-toolbar{width:100%}.smart-grid-edit-icon{color:var(--light-gray)}.tree-button{width:24px!important;height:24px!important}.menu-button{text-align:-webkit-right}\n"] }]
|
|
12641
|
-
}], ctorParameters: () => [{ type: SmartGridService }, { type: ComponentFactoryService }, { type: i1$1.MatDialog }, { type: i0.Injector }, { type: UiActionDescriptorService }, { type: ComponentLibrary, decorators: [{
|
|
12650
|
+
}], ctorParameters: () => [{ type: SmartGridService }, { type: ComponentFactoryService }, { type: i1$1.MatDialog }, { type: i0.Injector }, { type: UiActionDescriptorService }, { type: UiActionService }, { type: ComponentLibrary, decorators: [{
|
|
12642
12651
|
type: Inject,
|
|
12643
12652
|
args: [COMPONENT_LIBRARY]
|
|
12644
12653
|
}] }, { type: undefined, decorators: [{
|