@dmlibs/dm-cmps 0.1.2 → 0.1.4

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.
@@ -2154,7 +2154,7 @@ class DmTable {
2154
2154
  this.markRowAsModified(row);
2155
2155
  }
2156
2156
  static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.0.3", ngImport: i0, type: DmTable, deps: [], target: i0.ɵɵFactoryTarget.Component });
2157
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.0.3", type: DmTable, isStandalone: true, selector: "dm-table", inputs: { tableId: { classPropertyName: "tableId", publicName: "tableId", isSignal: true, isRequired: false, transformFunction: null }, dataSource: { classPropertyName: "dataSource", publicName: "dataSource", isSignal: true, isRequired: false, transformFunction: null }, columns: { classPropertyName: "columns", publicName: "columns", isSignal: true, isRequired: false, transformFunction: null }, noDataMessage: { classPropertyName: "noDataMessage", publicName: "noDataMessage", isSignal: true, isRequired: false, transformFunction: null }, enableSearch: { classPropertyName: "enableSearch", publicName: "enableSearch", isSignal: true, isRequired: false, transformFunction: null }, searchPlaceholder: { classPropertyName: "searchPlaceholder", publicName: "searchPlaceholder", isSignal: true, isRequired: false, transformFunction: null }, clearSearchTooltip: { classPropertyName: "clearSearchTooltip", publicName: "clearSearchTooltip", isSignal: true, isRequired: false, transformFunction: null }, searchInputAppearance: { classPropertyName: "searchInputAppearance", publicName: "searchInputAppearance", isSignal: true, isRequired: false, transformFunction: null }, filterPredicate: { classPropertyName: "filterPredicate", publicName: "filterPredicate", isSignal: true, isRequired: false, transformFunction: null }, actionButtons: { classPropertyName: "actionButtons", publicName: "actionButtons", isSignal: true, isRequired: false, transformFunction: null }, enablePrint: { classPropertyName: "enablePrint", publicName: "enablePrint", isSignal: true, isRequired: false, transformFunction: null }, printButton: { classPropertyName: "printButton", publicName: "printButton", isSignal: true, isRequired: false, transformFunction: null }, enablePagination: { classPropertyName: "enablePagination", publicName: "enablePagination", isSignal: true, isRequired: false, transformFunction: null }, autoPaginationAboveRowsCount: { classPropertyName: "autoPaginationAboveRowsCount", publicName: "autoPaginationAboveRowsCount", isSignal: true, isRequired: false, transformFunction: null }, paginatorSettings: { classPropertyName: "paginatorSettings", publicName: "paginatorSettings", isSignal: true, isRequired: false, transformFunction: null }, enableLoadingProgressbar: { classPropertyName: "enableLoadingProgressbar", publicName: "enableLoadingProgressbar", isSignal: true, isRequired: false, transformFunction: null }, enableColumnsDragAndDrop: { classPropertyName: "enableColumnsDragAndDrop", publicName: "enableColumnsDragAndDrop", isSignal: true, isRequired: false, transformFunction: null }, enableColumnsDragHandle: { classPropertyName: "enableColumnsDragHandle", publicName: "enableColumnsDragHandle", isSignal: true, isRequired: false, transformFunction: null }, enableTotalRow: { classPropertyName: "enableTotalRow", publicName: "enableTotalRow", isSignal: true, isRequired: false, transformFunction: null }, tableStyle: { classPropertyName: "tableStyle", publicName: "tableStyle", isSignal: true, isRequired: false, transformFunction: null }, tableClasses: { classPropertyName: "tableClasses", publicName: "tableClasses", isSignal: true, isRequired: false, transformFunction: null }, rowStyleFn: { classPropertyName: "rowStyleFn", publicName: "rowStyleFn", isSignal: true, isRequired: false, transformFunction: null }, editColumnsVisibility: { classPropertyName: "editColumnsVisibility", publicName: "editColumnsVisibility", isSignal: true, isRequired: false, transformFunction: null }, editColumnsVisibilityButton: { classPropertyName: "editColumnsVisibilityButton", publicName: "editColumnsVisibilityButton", isSignal: true, isRequired: false, transformFunction: null }, editColumnsVisibilitySelectAllLabel: { classPropertyName: "editColumnsVisibilitySelectAllLabel", publicName: "editColumnsVisibilitySelectAllLabel", isSignal: true, isRequired: false, transformFunction: null }, rowIdentifierField: { classPropertyName: "rowIdentifierField", publicName: "rowIdentifierField", isSignal: true, isRequired: false, transformFunction: null } }, host: { listeners: { "window:keydown.shift": "onShiftKeyDown($event)", "window:keyup.shift": "onShiftKeyUp($event)" } }, ngImport: i0, template: "<div id=\"dm-table-component-wrapper\">\n <div class=\"dm-table-top-section\">\n @if (enableSearch()) {\n <mat-form-field [appearance]=\"searchInputAppearance()\" class=\"dm-table-search-form-field\">\n <input\n matInput\n [placeholder]=\"searchPlaceholder()\"\n [(ngModel)]=\"searchTerm\"\n [ngModelOptions]=\"{ standalone: true }\"\n (keyup)=\"datasource().search($event.target.value)\"\n />\n @if (searchTerm()) {\n <button\n matSuffix\n mat-icon-button\n [matTooltip]=\"clearSearchTooltip()\"\n aria-label=\"Clear\"\n (click)=\"resetSearch()\"\n >\n <mat-icon>close</mat-icon>\n </button>\n }\n </mat-form-field>\n } @if (editColumnsVisibility() && editColumnsVisibilityButton()) {\n <ng-container\n *ngTemplateOutlet=\"\n editcolumnVisibilityMenuTrigger;\n context: { $implicit: editColumnsVisibilityButton() }\n \"\n ></ng-container>\n }\n <div class=\"spacer\"></div>\n @if (enablePrint()) {\n <ng-container\n *ngTemplateOutlet=\"\n dmTableActionButton;\n context: { $implicit: printButton(), defaultAction: printTable }\n \"\n ></ng-container>\n } @for (button of actionButtons(); track $index) { @if (!button.showIf ||\n button.showIf(visibleColumns(), datasource())) {\n <ng-container\n *ngTemplateOutlet=\"dmTableActionButton; context: { $implicit: button }\"\n ></ng-container>\n } }\n </div>\n <div\n [ngClass]=\"tableClasses()?.tableWrapper || {}\"\n [dmImportantStyle]=\"mergedTableStyle().tableWrapper || DEFAULT_TABLE_STYLE.tableWrapper || {}\"\n cdkScrollable\n >\n <table\n [ngStyle]=\"\n !tableClasses()?.table?.root\n ? mergedTableStyle().table?.root || DEFAULT_TABLE_STYLE.table?.root || {}\n : {}\n \"\n [ngClass]=\"tableClasses()?.table?.root || {}\"\n >\n <thead\n style=\"\n position: sticky !important;\n top: 0 !important;\n z-index: 10 !important;\n box-shadow: 0px 2px 2px 0px #0000006e;\n \"\n [ngStyle]=\"\n !tableClasses()?.table?.thead?.root\n ? mergedTableStyle().table?.thead?.root || DEFAULT_TABLE_STYLE.table?.thead?.root || {}\n : {}\n \"\n [ngClass]=\"tableClasses()?.table?.thead?.root || {}\"\n >\n @if (enableLoadingProgressbar()) {\n <tr style=\"height: 4px !important; max-height: 4px !important; line-height: 4px !important\">\n <th [attr.colspan]=\"visibleRuntimeColumns().length\" style=\"padding: 0 !important\">\n @if (datasource().isLoading()) {\n <mat-progress-bar mode=\"indeterminate\"></mat-progress-bar>\n }\n </th>\n </tr>\n }\n <tr\n [ngStyle]=\"\n !tableClasses()?.table?.thead?.tr\n ? mergedTableStyle().table?.thead?.tr || DEFAULT_TABLE_STYLE.table?.thead?.tr || {}\n : {}\n \"\n [ngClass]=\"tableClasses()?.table?.thead?.tr || {}\"\n cdkDropList\n [cdkDropListData]=\"visibleRuntimeColumns()\"\n [cdkDropListOrientation]=\"'horizontal'\"\n (cdkDropListDropped)=\"onColumnDrop($event)\"\n [cdkDropListAutoScrollStep]=\"20\"\n >\n @for (column of visibleRuntimeColumns(); let j = $index; track column.id) {\n <th\n cdkDrag\n [cdkDragDisabled]=\"!enableColumnsDragAndDrop()\"\n [ngStyle]=\"getHeaderThStyle(column)\"\n [ngClass]=\"tableClasses()?.table?.thead?.th || {}\"\n (mouseenter)=\"hoveredColumnHeaderIndex.set(j)\"\n (mouseleave)=\"hoveredColumnHeaderIndex.set(null)\"\n (click)=\"headerClickHandler(column, $event)\"\n (dblclick)=\"headerDoubleClickHandler(column, $event)\"\n (contextmenu)=\"headerContextMenuHandler(column, $event)\"\n >\n <div\n class=\"inner-header-cell\"\n [dmImportantStyle]=\"getHeaderThContentStyle(column)\"\n (click)=\"headerContentClickHandler(column, $event)\"\n (dblclick)=\"headerContentDoubleClickHandler(column, $event)\"\n (contextmenu)=\"headerContentContextMenuHandler(column, $event)\"\n >\n <span>\n {{ column.header }}\n </span>\n @if (column.sortable) {\n <span\n (click)=\"columnHeaderSortClickHandler(column, $event)\"\n style=\"display: flex; align-items: center\"\n >\n @if (isColumnSorted(column); as sort) {\n <mat-icon style=\"width: 20px; height: 20px; font-size: 20px\">{{\n sort.direction === 'asc' ? 'arrow_upward' : 'arrow_downward'\n }}</mat-icon>\n @if(columnsSortState().length > 1) { [{{ sort.index + 1 }}] } } @else if\n (hoveredColumnHeaderIndex() == j){\n <mat-icon style=\"opacity: 0.3; width: 20px; height: 20px; font-size: 20px\"\n >arrow_upward</mat-icon\n >\n }\n </span>\n } @if (enableColumnsDragHandle()) {\n\n <div class=\"spacer\"></div>\n <span>\n <ng-container\n *ngTemplateOutlet=\"dmTableHeaderMenuTrigger; context: { $implicit: column }\"\n />\n </span>\n <mat-icon style=\"cursor: move; font-size: 20px\" cdkDragHandle\n >drag_indicator</mat-icon\n >\n }\n </div>\n </th>\n }\n </tr>\n </thead>\n <tbody\n [dmImportantStyle]=\"\n !tableClasses()?.table?.tbody?.root\n ? mergedTableStyle().table?.tbody?.root || DEFAULT_TABLE_STYLE.table?.tbody?.root || {}\n : {}\n \"\n [ngClass]=\"tableClasses()?.table?.tbody?.root || {}\"\n >\n @for (row of datasource().result(); let i = $index; track row[rowIdentifierField()]) {\n <tr\n [dmImportantStyle]=\"getBodyRowStyle(i, row)\"\n (mouseenter)=\"hoveredRowIndex.set(i)\"\n (mouseleave)=\"hoveredRowIndex.set(null)\"\n >\n @for (column of visibleRuntimeColumns(); let j = $index; track j) {\n <td\n [dmImportantStyle]=\"getBodyTdStyle(i, column, row)\"\n (click)=\"cellClickHandler(row, column, $event)\"\n (contextmenu)=\"cellContextMenuHandler(row, column, $event)\"\n (dblclick)=\"cellDoubleClickHandler(row, column, $event)\"\n >\n <span\n [dmImportantStyle]=\"getBodyTdContentStyle(i, column, row)\"\n (click)=\"cellContentClickHandler(row, column, $event)\"\n (contextmenu)=\"cellContentContextMenuHandler(row, column, $event)\"\n (dblclick)=\"cellContentDoubleClickHandler(row, column, $event)\"\n >\n @switch (column.type) { @case ('$index') {\n {{ datasource().getFirstItemIndexInPage() + i + 1 }}\n } @case ('component') { @if (column.component) {\n <dm-table-cell-host\n [component]=\"column.component\"\n [context]=\"createCellContext(row, column)\"\n ></dm-table-cell-host>\n } } @case ('tel') {\n <a [href]=\"'tel:' + (column.field ? $any(row)[column.field] : '')\">{{\n resolveCellValue(row, column)\n }}</a>\n } @case ('mail') {\n <a [href]=\"'mailto:' + (column.field ? $any(row)[column.field] : '')\">{{\n resolveCellValue(row, column)\n }}</a>\n } @case ('link') {\n <a\n [href]=\"column.field ? $any(row)[column.field] : ''\"\n target=\"_blank\"\n rel=\"noopener noreferrer\"\n >{{ resolveCellValue(row, column) }}</a\n >\n } @case ('whatsapp') {\n <a\n [href]=\"'https://wa.me/' + (column.field ? $any(row)[column.field] : '')\"\n target=\"_blank\"\n rel=\"noopener noreferrer\"\n >{{ resolveCellValue(row, column) }}</a\n >\n } @case ('customHtml') { @if (column.customHtml) {\n <span [innerHTML]=\"column.customHtml\"></span>\n } @else if (column.customCellTemplate) {\n <ng-container\n *ngTemplateOutlet=\"\n column.customCellTemplate;\n context: createCellContext(row, column)\n \"\n >\n </ng-container>\n } } @case ('actions') {\n <span style=\"display: flex; align-items: center\">\n @for (button of column.actionsButtons || []; track $index) {\n <ng-container\n *ngTemplateOutlet=\"\n dmTableRowActionButton;\n context: {\n $implicit: button,\n row\n }\n \"\n ></ng-container>\n }\n </span>\n } @case('slideToggle') {\n <mat-slide-toggle\n [id]=\"'slideToggle_' + i + '_' + column.id\"\n [checked]=\"$any(row)[column.field!]\"\n [matTooltip]=\"getSlideToggleTooltip(row, column)\"\n (change)=\"onSlideToggleChange(row, column, $event)\"\n >\n <!-- {{ row[column.field!] }} -->\n {{ resolveCellValue(row, column) }}\n </mat-slide-toggle>\n } @case ('input') {\n <ng-container\n *ngTemplateOutlet=\"\n dmTableInputCell;\n context: {\n $implicit: row,\n column: column\n }\n \"\n />\n } @default {\n {{ resolveCellValue(row, column) }}\n } }\n </span>\n </td>\n }\n </tr>\n }\n </tbody>\n @if (enableTotalRow() && datasource().result().length > 0) {\n <tfoot\n style=\"\n position: sticky !important;\n bottom: 0 !important;\n z-index: 10 !important;\n box-shadow: 0px -2px 2px 0px #0000006e;\n \"\n [ngStyle]=\"\n !tableClasses()?.table?.tfoot?.root\n ? mergedTableStyle().table?.tfoot?.root || DEFAULT_TABLE_STYLE.table?.tfoot?.root || {}\n : {}\n \"\n [ngClass]=\"tableClasses()?.table?.tfoot?.root || {}\"\n >\n <tr>\n @for (column of visibleRuntimeColumns(); let j = $index; track column.id) {\n <td\n [ngStyle]=\"getFooterTdStyle(column)\"\n [ngClass]=\"tableClasses()?.table?.tfoot?.td || {}\"\n >\n @if (column.totalRowValueType == 'html') {\n <span [innerHTML]=\"totalRowValues().get(column.id) || ''\"></span>\n } @else {\n {{ totalRowValues().get(column.id) || '' }}\n }\n </td>\n }\n </tr>\n </tfoot>\n }\n </table>\n </div>\n @if (datasource().result().length === 0) {\n <div class=\"dm-table-no-data\">\n <span>{{ noDataMessage() }}</span>\n </div>\n } @else { @if (datasource().isPaginationEnabled()) {\n <ng-container [ngTemplateOutlet]=\"paginator\" />\n } }\n</div>\n\n<!-- MARK: Action Button template -->\n<ng-template #dmTableActionButton let-button let-defaultAction=\"defaultAction\">\n @if (button.buttonType === 'icon') {\n <button\n #rootTrigger=\"matMenuTrigger\"\n mat-icon-button\n [matTooltip]=\"button.tooltip || ''\"\n aria-label=\"{{ button.tooltip }}\"\n [matMenuTriggerFor]=\"button.children && button.children.length > 0 ? tableButtonRootMenu : null\"\n [matMenuTriggerData]=\"{\n buttons: button.children,\n rootTrigger: rootTrigger\n }\"\n (click)=\"\n button.children && button.children.length > 0\n ? null\n : button.onClick\n ? button.onClick(visibleColumns(), datasource())\n : defaultAction\n ? defaultAction($event)\n : null\n \"\n [ngStyle]=\"{ 'background-color': button.backgroundColor ? button.backgroundColor : undefined }\"\n >\n <mat-icon [style.color]=\"button.color ? button.color : undefined\">{{ button.icon }}</mat-icon>\n </button>\n } @else {\n <button\n #rootTrigger=\"matMenuTrigger\"\n [matButton]=\"button.buttonType || 'filled'\"\n [ngStyle]=\"{ 'background-color': button.backgroundColor ? button.backgroundColor : undefined }\"\n aria-label=\"{{ button.label }}\"\n [matTooltip]=\"button.tooltip || ''\"\n [matMenuTriggerFor]=\"button.children && button.children.length > 0 ? tableButtonRootMenu : null\"\n [matMenuTriggerData]=\"{\n buttons: button.children,\n rootTrigger: rootTrigger\n }\"\n (click)=\"\n button.children && button.children.length > 0\n ? null\n : button.onClick\n ? button.onClick(visibleColumns(), datasource())\n : defaultAction\n ? defaultAction($event)\n : null\n \"\n >\n @if (button.icon) {\n <mat-icon class=\"button-icon\" [ngStyle]=\"{ color: button.color ? button.color : undefined }\">{{\n button.icon\n }}</mat-icon>\n }\n <span [ngStyle]=\"{ color: button.color ? button.color : undefined }\">\n {{ button.label }}\n </span>\n </button>\n }\n <!-- @if (button.buttonType === 'icon') {\n <button\n mat-icon-button\n [color]=\"button.color\"\n [matTooltip]=\"button.tooltip || ''\"\n aria-label=\"{{ button.tooltip }}\"\n (click)=\"\n button.children && button.children.length > 0\n ? null\n : button.onClick\n ? button.onClick(datasource())\n : defaultAction\n ? defaultAction()\n : null\n \"\n >\n <mat-icon>{{ button.icon }}</mat-icon>\n </button>\n } @else {\n <button\n [matButton]=\"button.buttonType || 'filled'\"\n [ngStyle]=\"{ 'background-color': button.color ? button.color : undefined }\"\n aria-label=\"{{ button.label }}\"\n [matTooltip]=\"button.tooltip || ''\"\n (click)=\"\n button.children && button.children.length > 0\n ? null\n : button.onClick\n ? button.onClick(datasource())\n : defaultAction\n ? defaultAction()\n : null\n \"\n >\n @if (button.icon) {\n <mat-icon\n class=\"button-icon\"\n [ngStyle]=\"{ color: button.textColor ? button.textColor : undefined }\"\n >{{ button.icon }}</mat-icon\n >\n }\n <span [ngStyle]=\"{ color: button.textColor ? button.textColor : undefined }\">\n {{ button.label }}\n </span>\n </button>\n } -->\n</ng-template>\n\n<!-- MARK: Action Button root menu -->\n<mat-menu #tableButtonRootMenu=\"matMenu\">\n <ng-template matMenuContent let-buttons=\"buttons\" let-rootTrigger=\"rootTrigger\">\n <ng-container\n *ngTemplateOutlet=\"\n tableButtonRecursiveMenu;\n context: { buttons: buttons, rootTrigger: rootTrigger }\n \"\n ></ng-container>\n </ng-template>\n</mat-menu>\n\n<!-- MARK: Action Button recursive menu -->\n<ng-template #tableButtonRecursiveMenu let-buttons=\"buttons\" let-rootTrigger=\"rootTrigger\">\n @for (button of buttons; track $index) { @if (!button.showIf || button.showIf(visibleColumns(),\n datasource())) { @if (button.children?.length) {\n <button\n mat-menu-item\n [matMenuTriggerFor]=\"subMenu\"\n [matMenuTriggerData]=\"{\n buttons: button.children,\n rootTrigger\n }\"\n (click)=\"$event.stopPropagation()\"\n [ngStyle]=\"{ 'background-color': button.backgroundColor ? button.backgroundColor : undefined }\"\n >\n <span style=\"display: flex; align-items: center; width: 100%\">\n @if (button.icon) {\n <mat-icon [style.color]=\"button.color ? button.color : undefined\">{{ button.icon }}</mat-icon>\n }\n <span [style.color]=\"button.color ? button.color : undefined\">{{ button.label }}</span>\n <span class=\"spacer\"></span>\n <mat-icon [style.color]=\"button.color ? button.color : undefined\" class=\"submenu-arrow\"\n >chevron_left</mat-icon\n >\n </span>\n </button>\n\n <mat-menu #subMenu=\"matMenu\">\n <ng-container\n *ngTemplateOutlet=\"\n tableButtonRecursiveMenu;\n context: { buttons: button.children, rootTrigger: rootTrigger }\n \"\n ></ng-container>\n </mat-menu>\n } @else {\n <button\n mat-menu-item\n [matTooltip]=\"button.tooltip || ''\"\n (click)=\"button.onClick?.(visibleColumns(), datasource(), $event, getCloseParentMenusFn(rootTrigger))\"\n [ngStyle]=\"{ 'background-color': button.backgroundColor ? button.backgroundColor : undefined }\"\n >\n @if (button.icon) {\n <mat-icon [style.color]=\"button.color ? button.color : undefined\">{{ button.icon }}</mat-icon>\n }\n <span [style.color]=\"button.color ? button.color : undefined\">{{ button.label }}</span>\n </button>\n }} }\n</ng-template>\n\n<!-- MARK: Row button root menu -->\n<mat-menu #rowButtonRootMenu=\"matMenu\">\n <ng-template matMenuContent let-buttons=\"buttons\" let-row=\"row\" let-rootTrigger=\"rootTrigger\">\n <ng-container\n *ngTemplateOutlet=\"\n rowButtonRecursiveMenu;\n context: { buttons: buttons, row: row, rootTrigger: rootTrigger }\n \"\n ></ng-container>\n </ng-template>\n</mat-menu>\n\n<!-- MARK: Row button recursive menu -->\n<ng-template\n #rowButtonRecursiveMenu\n let-buttons=\"buttons\"\n let-row=\"row\"\n let-rootTrigger=\"rootTrigger\"\n>\n @for (button of buttons; track $index) { @if (button.children?.length) {\n <button\n mat-menu-item\n [matMenuTriggerFor]=\"subMenu\"\n [matMenuTriggerData]=\"{\n buttons: button.children,\n row,\n rootTrigger\n }\"\n (click)=\"$event.stopPropagation()\"\n [ngStyle]=\"{ 'background-color': button.backgroundColor ? button.backgroundColor : undefined }\"\n >\n <span style=\"display: flex; align-items: center; width: 100%\">\n @if (button.icon) {\n <mat-icon [style.color]=\"button.color ? button.color : undefined\">{{ button.icon }}</mat-icon>\n }\n <span [style.color]=\"button.color ? button.color : undefined\">{{ button.label }}</span>\n <span class=\"spacer\"></span>\n <mat-icon [style.color]=\"button.color ? button.color : undefined\" class=\"submenu-arrow\"\n >chevron_left</mat-icon\n >\n </span>\n </button>\n\n <mat-menu #subMenu=\"matMenu\">\n <ng-container\n *ngTemplateOutlet=\"\n rowButtonRecursiveMenu;\n context: { buttons: button.children, row: row, rootTrigger: rootTrigger }\n \"\n ></ng-container>\n </mat-menu>\n\n } @else {\n <button\n mat-menu-item\n [matTooltip]=\"button.tooltip || ''\"\n (click)=\"button.onClick?.(row, $event, getCloseParentMenusFn(rootTrigger))\"\n [ngStyle]=\"{ 'background-color': button.backgroundColor ? button.backgroundColor : undefined }\"\n >\n @if (button.icon) {\n <mat-icon [style.color]=\"button.color ? button.color : undefined\">{{ button.icon }}</mat-icon>\n }\n <span [style.color]=\"button.color ? button.color : undefined\">{{ button.label }}</span>\n </button>\n } }\n</ng-template>\n\n<!-- MARK: Row Action Button template -->\n<ng-template #dmTableRowActionButton let-button let-row=\"row\" let-defaultAction=\"defaultAction\">\n @if (button.buttonType === 'icon') {\n <button\n #rootTrigger=\"matMenuTrigger\"\n mat-icon-button\n [matTooltip]=\"button.tooltip || ''\"\n aria-label=\"{{ button.tooltip }}\"\n [matMenuTriggerFor]=\"button.children && button.children.length > 0 ? rowButtonRootMenu : null\"\n [matMenuTriggerData]=\"{\n buttons: button.children,\n row,\n rootTrigger: rootTrigger\n }\"\n (click)=\"\n button.children && button.children.length > 0\n ? null\n : button.onClick\n ? button.onClick(row)\n : defaultAction\n ? defaultAction($event)\n : null\n \"\n >\n <mat-icon [style.color]=\"button.color ? button.color : undefined\">{{ button.icon }}</mat-icon>\n </button>\n } @else {\n <button\n [matButton]=\"button.buttonType || 'filled'\"\n [ngStyle]=\"{ 'background-color': button.backgroundColor ? button.backgroundColor : undefined }\"\n aria-label=\"{{ button.label }}\"\n [matTooltip]=\"button.tooltip || ''\"\n [matMenuTriggerFor]=\"button.children && button.children.length > 0 ? rowButtonRootMenu : null\"\n #rootTrigger=\"matMenuTrigger\"\n [matMenuTriggerData]=\"{\n buttons: button.children,\n row,\n rootTrigger: rootTrigger\n }\"\n (click)=\"\n button.children && button.children.length > 0\n ? null\n : button.onClick\n ? button.onClick(row)\n : defaultAction\n ? defaultAction($event)\n : null\n \"\n >\n @if (button.icon) {\n <mat-icon class=\"button-icon\" [ngStyle]=\"{ color: button.color ? button.color : undefined }\">{{\n button.icon\n }}</mat-icon>\n }\n <span [ngStyle]=\"{ color: button.color ? button.color : undefined }\">\n {{ button.label }}\n </span>\n </button>\n }\n</ng-template>\n\n<!-- <mat-menu #buttonChildren=\"matMenu\">\n <ng-template matMenuContent let-buttons=\"buttons\" let-row=\"row\">\n @for (button of buttons || []; track $index) { @if (button.children && button.children.length >\n 0) {\n <ng-container *ngTemplateOutlet=\"subMenuTrigger; context: { button, row }\"></ng-container>\n } @else {\n <button\n mat-menu-item\n [matTooltip]=\"button.tooltip || ''\"\n aria-label=\"{{ button.tooltip }}\"\n (click)=\"\n button.children && button.children.length > 0\n ? null\n : button.onClick\n ? button.onClick(row, $event)\n : null\n \"\n >\n @if (button.icon) {\n <mat-icon>{{ button.icon }}</mat-icon>\n }\n <span>{{ button.label }}</span>\n </button>\n } }\n </ng-template>\n</mat-menu>\n\n<ng-template #subMenuTrigger let-button=\"button\" let-row=\"row\">\n <button\n mat-menu-item\n [matMenuTriggerFor]=\"buttonChildren\"\n [matMenuTriggerData]=\"{\n buttons: button.children,\n row\n }\"\n [matTooltip]=\"button.tooltip || ''\"\n aria-label=\"{{ button.tooltip }}\"\n >\n @if (button.icon) {\n <mat-icon>{{ button.icon }}</mat-icon>\n }\n <span>{{ button.label }}</span>\n </button>\n</ng-template> -->\n\n<!-- MARK: Paginator template -->\n<ng-template #paginator>\n <div\n class=\"dm-table-paginator-row\"\n [ngStyle]=\"mergedTableStyle().paginator?.root || {}\"\n [ngClass]=\"tableClasses()?.paginator?.root || {}\"\n >\n <p\n class=\"mb-0\"\n [ngStyle]=\"mergedTableStyle().paginator?.p || {}\"\n [ngClass]=\"tableClasses()?.paginator?.p || {}\"\n >\n {{\n paginatorSettings()?.numberOfItemsPerPageLabel ||\n DEFAULT_PAGINATOR_SETTINGS.numberOfItemsPerPageLabel\n }}\n </p>\n\n <div>\n <mat-form-field\n style=\"width: 100px\"\n class=\"dm-paginator-form-field ms-2 me-2\"\n [appearance]=\"'fill'\"\n [ngStyle]=\"mergedTableStyle().paginator?.mat_form_field || {}\"\n [ngClass]=\"tableClasses()?.paginator?.mat_form_field || {}\"\n >\n <mat-select\n [value]=\"datasource().getPageSize()\"\n [ngStyle]=\"mergedTableStyle().paginator?.mat_select || {}\"\n [ngClass]=\"tableClasses()?.paginator?.mat_select || {}\"\n >\n @for (option of (paginatorSettings()?.pageSizeOptions ||\n DEFAULT_PAGINATOR_SETTINGS.pageSizeOptions); track option) {\n <mat-option\n [value]=\"option\"\n (onSelectionChange)=\"onPageSizeChange($event, option)\"\n [ngStyle]=\"mergedTableStyle().paginator?.mat_option || {}\"\n [ngClass]=\"tableClasses()?.paginator?.mat_option || {}\"\n >{{ option }}</mat-option\n >\n }\n </mat-select>\n </mat-form-field>\n </div>\n\n @if (datasource().getPageSize() > 0) {\n <div class=\"dm-table-paginator-page-info\">\n <p\n [ngClass]=\"tableClasses()?.paginator?.p || {}\"\n [ngStyle]=\"mergedTableStyle().paginator?.p || {}\"\n >\n {{ datasource().getFirstItemIndexInPage() + 1 }}\n </p>\n\n <p\n [ngClass]=\"tableClasses()?.paginator?.p || {}\"\n [ngStyle]=\"mergedTableStyle().paginator?.p || {}\"\n >\n -\n </p>\n\n <p\n [ngClass]=\"tableClasses()?.paginator?.p || {}\"\n [ngStyle]=\"mergedTableStyle().paginator?.p || {}\"\n >\n {{ datasource().getLastItemIndexInPage() + 1 }}\n </p>\n\n <p\n [ngClass]=\"tableClasses()?.paginator?.p || {}\"\n [ngStyle]=\"mergedTableStyle().paginator?.p || {}\"\n >\n \u05DE\u05EA\u05D5\u05DA\n </p>\n\n <p\n [ngClass]=\"tableClasses()?.paginator?.p || {}\"\n [ngStyle]=\"mergedTableStyle().paginator?.p || {}\"\n >\n {{ datasource().getTotalResultElementsCount() }}\n </p>\n </div>\n }\n\n <div>\n @if (paginatorSettings()?.showFirstAndLastPagesButtons ||\n DEFAULT_PAGINATOR_SETTINGS.showFirstAndLastPagesButtons) {\n <button\n [ngStyle]=\"mergedTableStyle().paginator?.button || {}\"\n [ngClass]=\"tableClasses()?.paginator?.button || {}\"\n mat-icon-button\n (click)=\"datasource().firstPage()\"\n [matTooltip]=\"\n paginatorSettings()?.firstPageButtonLabel ||\n DEFAULT_PAGINATOR_SETTINGS.firstPageButtonLabel\n \"\n [matTooltipPosition]=\"'above'\"\n >\n <mat-icon>keyboard_double_arrow_right</mat-icon>\n </button>\n }\n <button\n [ngStyle]=\"mergedTableStyle().paginator?.button || {}\"\n [ngClass]=\"tableClasses()?.paginator?.button || {}\"\n mat-icon-button\n (click)=\"datasource().firstPage()\"\n [matTooltip]=\"\n paginatorSettings()?.previousPageButtonLabel ||\n DEFAULT_PAGINATOR_SETTINGS.previousPageButtonLabel\n \"\n [matTooltipPosition]=\"'above'\"\n >\n <mat-icon>chevron_right</mat-icon>\n </button>\n <button\n [ngStyle]=\"mergedTableStyle().paginator?.button || {}\"\n [ngClass]=\"tableClasses()?.paginator?.button || {}\"\n mat-icon-button\n (click)=\"datasource().nextPage()\"\n [matTooltip]=\"\n paginatorSettings()?.nextPageButtonLabel || DEFAULT_PAGINATOR_SETTINGS.nextPageButtonLabel\n \"\n [matTooltipPosition]=\"'above'\"\n >\n <mat-icon>chevron_left</mat-icon>\n </button>\n @if (paginatorSettings()?.showFirstAndLastPagesButtons ||\n DEFAULT_PAGINATOR_SETTINGS.showFirstAndLastPagesButtons) {\n <button\n [ngStyle]=\"mergedTableStyle().paginator?.button || {}\"\n [ngClass]=\"tableClasses()?.paginator?.button || {}\"\n mat-icon-button\n (click)=\"datasource().lastPage()\"\n [matTooltip]=\"\n paginatorSettings()?.lastPageButtonLabel || DEFAULT_PAGINATOR_SETTINGS.lastPageButtonLabel\n \"\n [matTooltipPosition]=\"'above'\"\n >\n <mat-icon>keyboard_double_arrow_left</mat-icon>\n </button>\n }\n </div>\n </div>\n</ng-template>\n\n<!-- MARK: Edit Columns Visibility Menu Trigger -->\n<ng-template #editcolumnVisibilityMenuTrigger let-button>\n @if (button.buttonType == 'icon') {\n <button\n mat-icon-button\n [matTooltip]=\"button.tooltip || ''\"\n aria-label=\"{{ button.tooltip }}\"\n [matMenuTriggerFor]=\"columnVisibilityMenu\"\n #rootTrigger=\"matMenuTrigger\"\n >\n <mat-icon [style.color]=\"button.textColor ? button.textColor : undefined\">{{\n button.icon\n }}</mat-icon>\n </button>\n } @else {\n <button\n [matButton]=\"button.buttonType || 'filled'\"\n [ngStyle]=\"{ 'background-color': button.color ? button.color : undefined }\"\n aria-label=\"{{ button.label }}\"\n [matTooltip]=\"button.tooltip || ''\"\n [matMenuTriggerFor]=\"columnVisibilityMenu\"\n #rootTrigger=\"matMenuTrigger\"\n >\n @if (button.icon) {\n <mat-icon\n class=\"button-icon\"\n [ngStyle]=\"{ color: button.textColor ? button.textColor : undefined }\"\n >{{ button.icon }}</mat-icon\n >\n }\n <span [style.color]=\"button.textColor ? button.textColor : undefined\">\n {{ button.label }}\n </span>\n </button>\n }\n</ng-template>\n\n<!-- MARK: Edit Columns Visibility Menu -->\n<mat-menu #columnVisibilityMenu=\"matMenu\">\n <div mat-menu-item disableRipple (click)=\"$event.stopPropagation()\">\n <mat-checkbox\n [checked]=\"isAllColumnsVisible()\"\n (change)=\"toggleAllColumnsVisibility($event)\"\n (click)=\"$event.stopPropagation()\"\n >{{ editColumnsVisibilitySelectAllLabel() }}</mat-checkbox\n >\n </div>\n @for (column of runtimeColumns(); track column.id) {\n <div mat-menu-item disableRipple (click)=\"$event.stopPropagation()\">\n <mat-checkbox\n [checked]=\"isColumnVisible(column)\"\n (change)=\"toggleColumnVisibility($event, column)\"\n (click)=\"$event.stopPropagation()\"\n >{{ column.header }}</mat-checkbox\n >\n </div>\n }\n</mat-menu>\n\n<!-- MARK: Input Cell Template -->\n<ng-template #dmTableInputCell let-row let-column=\"column\">\n @switch (column.inputType) { @case ('select') {\n <mat-select\n [dmImportantStyle]=\"getInputStyle(column)\"\n panelWidth=\"null\"\n [value]=\"resolveCellValue(row, column)\"\n >\n @for (option of column.selectOptions || []; track option.value) {\n <mat-option\n [value]=\"option.value\"\n (onSelectionChange)=\"inputCellSelectOptionChangeHandler(row, column, option, $event)\"\n >{{ option.label }}</mat-option\n >\n }\n </mat-select>\n } @case ('checkbox') {\n <mat-checkbox\n [checked]=\"resolveCellValue(row, column)\"\n (change)=\"inputCellCheckboxChangeHandler(row, column, $event)\"\n ></mat-checkbox>\n } @default {\n <input\n [type]=\"column.inputType || 'text'\"\n [value]=\"resolveCellValue(row, column)\"\n (change)=\"inputCellChangeHandler(row, column, $event)\"\n [dmImportantStyle]=\"getInputStyle(column)\"\n />\n } }\n</ng-template>\n\n<!-- MARK: Header Menu Trigger Template -->\n<ng-template #dmTableHeaderMenuTrigger let-column>\n @if (column?.headerMenuItems?.length) {\n <!-- <button\n mat-icon-button\n (click)=\"$event.stopPropagation()\"\n aria-label=\"Column Menu\"\n >\n </button> -->\n <mat-icon\n #rootTrigger=\"matMenuTrigger\"\n [matMenuTriggerFor]=\"dmTableHeaderRootMenu\"\n [matMenuTriggerData]=\"{\n menuItems: column.headerMenuItems,\n rootTrigger: rootTrigger\n }\"\n [matTooltip]=\"column.headerMenuTooltip || ''\"\n style=\"font-size: 20px; cursor: pointer; margin-left: 4px; height: 20px\"\n [ngStyle]=\"{\n color: getHeaderThContentStyle(column)?.color || getHeaderThStyle(column)?.color || ''\n }\"\n >menu</mat-icon\n >\n }\n</ng-template>\n\n<!-- MARK: Header Root Menu -->\n<mat-menu #dmTableHeaderRootMenu=\"matMenu\">\n <ng-template matMenuContent let-menuItems=\"menuItems\" let-rootTrigger=\"rootTrigger\">\n <ng-container\n *ngTemplateOutlet=\"\n dmTableHeaderRecursiveMenu;\n context: { menuItems: menuItems, rootTrigger: rootTrigger }\n \"\n ></ng-container>\n </ng-template>\n</mat-menu>\n\n<!-- MARK: Header Recursive Menu -->\n<ng-template #dmTableHeaderRecursiveMenu let-menuItems=\"menuItems\" let-rootTrigger=\"rootTrigger\">\n @for (menuItem of menuItems; track $index) { @if (!menuItem.showIf || (menuItem.showIf &&\n menuItem.showIf(datasource()))) {@if (menuItem.children?.length) {\n <button\n mat-menu-item\n [matMenuTriggerFor]=\"dmTableHeaderSubMenu\"\n [matMenuTriggerData]=\"{\n menuItems: menuItem.children,\n rootTrigger\n }\"\n (click)=\"$event.stopPropagation()\"\n [ngStyle]=\"{\n 'background-color': menuItem.backgroundColor ? menuItem.backgroundColor : undefined\n }\"\n >\n <span style=\"display: flex; align-items: center; width: 100%\">\n @if (menuItem.icon) {\n <mat-icon [style.color]=\"menuItem.color ? menuItem.color : undefined\">{{\n menuItem.icon\n }}</mat-icon>\n }\n <span [style.color]=\"menuItem.color ? menuItem.color : undefined\">{{ menuItem.label }}</span>\n <span class=\"spacer\"></span>\n <mat-icon [style.color]=\"menuItem.color ? menuItem.color : undefined\" class=\"submenu-arrow\"\n >chevron_left</mat-icon\n >\n </span>\n </button>\n\n <mat-menu #dmTableHeaderSubMenu=\"matMenu\">\n <ng-container\n *ngTemplateOutlet=\"\n dmTableHeaderRecursiveMenu;\n context: { menuItems: menuItem.children, rootTrigger: rootTrigger }\n \"\n />\n </mat-menu>\n } @else {\n <button\n mat-menu-item\n [matTooltip]=\"menuItem.tooltip || ''\"\n (click)=\"menuItem.onClick?.(datasource(), $event, getCloseParentMenusFn(rootTrigger))\"\n [ngStyle]=\"{\n 'background-color': menuItem.backgroundColor ? menuItem.backgroundColor : undefined\n }\"\n >\n @if (menuItem.icon) {\n <mat-icon [style.color]=\"menuItem.color ? menuItem.color : undefined\">{{\n menuItem.icon\n }}</mat-icon>\n }\n <span [style.color]=\"menuItem.color ? menuItem.color : undefined\">{{ menuItem.label }}</span>\n </button>\n } }}\n</ng-template>\n", styles: ["#dm-table-component-wrapper{width:100%}#dm-table-component-wrapper ::-webkit-scrollbar{width:var(--dm-table-scrollbar-width, 7px);height:var(--dm-table-scrollbar-width, 7px)}#dm-table-component-wrapper ::-webkit-scrollbar-track{background:var(--dm-table-scrollbar-background-color, #e0e0e0)}#dm-table-component-wrapper ::-webkit-scrollbar-thumb{background:var(--dm-table-scrollbar-color, #949496);border-radius:var(--dm-table-scrollbar-border-radius, 4px)}#dm-table-component-wrapper ::-webkit-scrollbar-thumb:hover{background:var(--dm-table-scrollbar-hover-color, #5f5f5f)}#dm-table-component-wrapper .dm-table-top-section{width:calc(100% - 10px);display:flex;align-items:center;padding:0 5px;gap:5px;flex-wrap:wrap}#dm-table-component-wrapper .dm-table-table-wrapper .dm-table-classic{width:100%;border-collapse:collapse;border-spacing:0;box-shadow:0 5px 5px -3px #003,0 8px 10px 1px #00000024,0 3px 14px 2px #0000001f;padding:0;font-size:1rem;border-radius:8px;page-break-inside:auto}#dm-table-component-wrapper .dm-table-table-wrapper .dm-table-classic tr{page-break-inside:avoid}#dm-table-component-wrapper .dm-table-table-wrapper .dm-table-classic th,#dm-table-component-wrapper .dm-table-table-wrapper .dm-table-classic td{text-align:start;max-width:none}#dm-table-component-wrapper .inner-header-cell{display:flex;align-items:center;gap:5px}#dm-table-component-wrapper .dm-table-no-data{width:98%;margin:10px auto 0;line-height:60px;display:flex;justify-content:center;align-items:center;padding:10px;font-size:1.5rem;font-weight:700;color:#dd2f2f;box-shadow:0 4px 6px #000000d7}#dm-table-component-wrapper .dm-table-paginator-row{display:flex;flex-wrap:wrap;justify-content:center;align-items:center;gap:5px}#dm-table-component-wrapper .dm-table-paginator-row .dm-table-paginator-page-info{display:flex;align-items:center;gap:5px}:host ::ng-deep .dm-paginator-form-field>.mat-mdc-form-field-bottom-align:before{content:\"\";display:none;height:0px}:host ::ng-deep .dm-table-search-form-field>.mat-mdc-form-field-bottom-align:before{content:\"\";display:none;height:0px}.cdk-drag-preview{border:none;box-sizing:border-box;background-color:var(--dm-table-header-background-color, #f5f5f5);color:var(--dm-table-header-color, #000000);border-radius:4px;box-shadow:0 5px 5px -3px #0003,0 8px 10px 1px #00000024,0 3px 14px 2px #0000001f}.cdk-drag-preview .inner-header-cell{display:flex;align-items:center}.spacer{flex-grow:1}\n"], dependencies: [{ kind: "directive", type: DmImportantStyleDirective, selector: "[dmImportantStyle]", inputs: ["dmImportantStyle"] }, { kind: "ngmodule", type: MatProgressSpinnerModule }, { kind: "ngmodule", type: MatSlideToggleModule }, { kind: "component", type: i1$1.MatSlideToggle, selector: "mat-slide-toggle", inputs: ["name", "id", "labelPosition", "aria-label", "aria-labelledby", "aria-describedby", "required", "color", "disabled", "disableRipple", "tabIndex", "checked", "hideIcon", "disabledInteractive"], outputs: ["change", "toggleChange"], exportAs: ["matSlideToggle"] }, { kind: "ngmodule", type: MatProgressBarModule }, { kind: "component", type: i2$2.MatProgressBar, selector: "mat-progress-bar", inputs: ["color", "value", "bufferValue", "mode"], outputs: ["animationEnd"], exportAs: ["matProgressBar"] }, { kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i1.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "ngmodule", type: MatFormFieldModule }, { kind: "component", type: i2.MatFormField, selector: "mat-form-field", inputs: ["hideRequiredMarker", "color", "floatLabel", "appearance", "subscriptSizing", "hintLabel"], exportAs: ["matFormField"] }, { kind: "directive", type: i2.MatSuffix, selector: "[matSuffix], [matIconSuffix], [matTextSuffix]", inputs: ["matTextSuffix"] }, { kind: "ngmodule", type: MatCheckboxModule }, { kind: "component", type: i3.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: "ngmodule", type: MatSelectModule }, { kind: "directive", type: i6$1.CdkScrollable, selector: "[cdk-scrollable], [cdkScrollable]" }, { kind: "component", type: i5.MatSelect, selector: "mat-select", inputs: ["aria-describedby", "panelClass", "disabled", "disableRipple", "tabIndex", "hideSingleSelectionIndicator", "placeholder", "required", "multiple", "disableOptionCentering", "compareWith", "value", "aria-label", "aria-labelledby", "errorStateMatcher", "typeaheadDebounceInterval", "sortComparator", "id", "panelWidth", "canSelectNullableOptions"], outputs: ["openedChange", "opened", "closed", "selectionChange", "valueChange"], exportAs: ["matSelect"] }, { kind: "component", type: i5.MatOption, selector: "mat-option", inputs: ["value", "id", "disabled"], outputs: ["onSelectionChange"], exportAs: ["matOption"] }, { kind: "component", type: DmTableCellHost, selector: "dm-table-cell-host", inputs: ["component", "context"] }, { kind: "ngmodule", type: MatButtonModule }, { kind: "component", type: i8.MatButton, selector: " button[matButton], a[matButton], button[mat-button], button[mat-raised-button], button[mat-flat-button], button[mat-stroked-button], a[mat-button], a[mat-raised-button], a[mat-flat-button], a[mat-stroked-button] ", inputs: ["matButton"], exportAs: ["matButton", "matAnchor"] }, { kind: "component", type: i8.MatIconButton, selector: "button[mat-icon-button], a[mat-icon-button], button[matIconButton], a[matIconButton]", exportAs: ["matButton", "matAnchor"] }, { kind: "ngmodule", type: MatInputModule }, { kind: "directive", type: i6.MatInput, selector: "input[matInput], textarea[matInput], select[matNativeControl], input[matNativeControl], textarea[matNativeControl]", inputs: ["disabled", "id", "placeholder", "name", "required", "type", "errorStateMatcher", "aria-describedby", "value", "readonly", "disabledInteractive"], exportAs: ["matInput"] }, { kind: "ngmodule", type: MatMenuModule }, { kind: "component", type: i10.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: i10.MatMenuItem, selector: "[mat-menu-item]", inputs: ["role", "disabled", "disableRipple"], exportAs: ["matMenuItem"] }, { kind: "directive", type: i10.MatMenuContent, selector: "ng-template[matMenuContent]" }, { kind: "directive", type: i10.MatMenuTrigger, selector: "[mat-menu-trigger-for], [matMenuTriggerFor]", inputs: ["mat-menu-trigger-for", "matMenuTriggerFor", "matMenuTriggerData", "matMenuTriggerRestoreFocus"], outputs: ["menuOpened", "onMenuOpen", "menuClosed", "onMenuClose"], exportAs: ["matMenuTrigger"] }, { kind: "directive", type: CdkDragHandle, selector: "[cdkDragHandle]", inputs: ["cdkDragHandleDisabled"] }, { kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i11.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i11.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "directive", type: i11.NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }, { kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i1.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "directive", type: CdkDropList, selector: "[cdkDropList], cdk-drop-list", inputs: ["cdkDropListConnectedTo", "cdkDropListData", "cdkDropListOrientation", "id", "cdkDropListLockAxis", "cdkDropListDisabled", "cdkDropListSortingDisabled", "cdkDropListEnterPredicate", "cdkDropListSortPredicate", "cdkDropListAutoScrollDisabled", "cdkDropListAutoScrollStep", "cdkDropListElementContainer", "cdkDropListHasAnchor"], outputs: ["cdkDropListDropped", "cdkDropListEntered", "cdkDropListExited", "cdkDropListSorted"], exportAs: ["cdkDropList"] }, { kind: "ngmodule", type: A11yModule }, { kind: "directive", type: MatTooltip, selector: "[matTooltip]", inputs: ["matTooltipPosition", "matTooltipPositionAtOrigin", "matTooltipDisabled", "matTooltipShowDelay", "matTooltipHideDelay", "matTooltipTouchGestures", "matTooltip", "matTooltipClass"], exportAs: ["matTooltip"] }, { kind: "component", type: MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "directive", type: CdkDrag, selector: "[cdkDrag]", inputs: ["cdkDragData", "cdkDragLockAxis", "cdkDragRootElement", "cdkDragBoundary", "cdkDragStartDelay", "cdkDragFreeDragPosition", "cdkDragDisabled", "cdkDragConstrainPosition", "cdkDragPreviewClass", "cdkDragPreviewContainer", "cdkDragScale"], outputs: ["cdkDragStarted", "cdkDragReleased", "cdkDragEnded", "cdkDragEntered", "cdkDragExited", "cdkDragDropped", "cdkDragMoved"], exportAs: ["cdkDrag"] }] });
2157
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.0.3", type: DmTable, isStandalone: true, selector: "dm-table", inputs: { tableId: { classPropertyName: "tableId", publicName: "tableId", isSignal: true, isRequired: false, transformFunction: null }, dataSource: { classPropertyName: "dataSource", publicName: "dataSource", isSignal: true, isRequired: false, transformFunction: null }, columns: { classPropertyName: "columns", publicName: "columns", isSignal: true, isRequired: false, transformFunction: null }, noDataMessage: { classPropertyName: "noDataMessage", publicName: "noDataMessage", isSignal: true, isRequired: false, transformFunction: null }, enableSearch: { classPropertyName: "enableSearch", publicName: "enableSearch", isSignal: true, isRequired: false, transformFunction: null }, searchPlaceholder: { classPropertyName: "searchPlaceholder", publicName: "searchPlaceholder", isSignal: true, isRequired: false, transformFunction: null }, clearSearchTooltip: { classPropertyName: "clearSearchTooltip", publicName: "clearSearchTooltip", isSignal: true, isRequired: false, transformFunction: null }, searchInputAppearance: { classPropertyName: "searchInputAppearance", publicName: "searchInputAppearance", isSignal: true, isRequired: false, transformFunction: null }, filterPredicate: { classPropertyName: "filterPredicate", publicName: "filterPredicate", isSignal: true, isRequired: false, transformFunction: null }, actionButtons: { classPropertyName: "actionButtons", publicName: "actionButtons", isSignal: true, isRequired: false, transformFunction: null }, enablePrint: { classPropertyName: "enablePrint", publicName: "enablePrint", isSignal: true, isRequired: false, transformFunction: null }, printButton: { classPropertyName: "printButton", publicName: "printButton", isSignal: true, isRequired: false, transformFunction: null }, enablePagination: { classPropertyName: "enablePagination", publicName: "enablePagination", isSignal: true, isRequired: false, transformFunction: null }, autoPaginationAboveRowsCount: { classPropertyName: "autoPaginationAboveRowsCount", publicName: "autoPaginationAboveRowsCount", isSignal: true, isRequired: false, transformFunction: null }, paginatorSettings: { classPropertyName: "paginatorSettings", publicName: "paginatorSettings", isSignal: true, isRequired: false, transformFunction: null }, enableLoadingProgressbar: { classPropertyName: "enableLoadingProgressbar", publicName: "enableLoadingProgressbar", isSignal: true, isRequired: false, transformFunction: null }, enableColumnsDragAndDrop: { classPropertyName: "enableColumnsDragAndDrop", publicName: "enableColumnsDragAndDrop", isSignal: true, isRequired: false, transformFunction: null }, enableColumnsDragHandle: { classPropertyName: "enableColumnsDragHandle", publicName: "enableColumnsDragHandle", isSignal: true, isRequired: false, transformFunction: null }, enableTotalRow: { classPropertyName: "enableTotalRow", publicName: "enableTotalRow", isSignal: true, isRequired: false, transformFunction: null }, tableStyle: { classPropertyName: "tableStyle", publicName: "tableStyle", isSignal: true, isRequired: false, transformFunction: null }, tableClasses: { classPropertyName: "tableClasses", publicName: "tableClasses", isSignal: true, isRequired: false, transformFunction: null }, rowStyleFn: { classPropertyName: "rowStyleFn", publicName: "rowStyleFn", isSignal: true, isRequired: false, transformFunction: null }, editColumnsVisibility: { classPropertyName: "editColumnsVisibility", publicName: "editColumnsVisibility", isSignal: true, isRequired: false, transformFunction: null }, editColumnsVisibilityButton: { classPropertyName: "editColumnsVisibilityButton", publicName: "editColumnsVisibilityButton", isSignal: true, isRequired: false, transformFunction: null }, editColumnsVisibilitySelectAllLabel: { classPropertyName: "editColumnsVisibilitySelectAllLabel", publicName: "editColumnsVisibilitySelectAllLabel", isSignal: true, isRequired: false, transformFunction: null }, rowIdentifierField: { classPropertyName: "rowIdentifierField", publicName: "rowIdentifierField", isSignal: true, isRequired: false, transformFunction: null } }, host: { listeners: { "window:keydown.shift": "onShiftKeyDown($event)", "window:keyup.shift": "onShiftKeyUp($event)" } }, ngImport: i0, template: "<div id=\"dm-table-component-wrapper\">\n <div class=\"dm-table-top-section\">\n @if (enableSearch()) {\n <mat-form-field [appearance]=\"searchInputAppearance()\" class=\"dm-table-search-form-field\">\n <input\n matInput\n [placeholder]=\"searchPlaceholder()\"\n [(ngModel)]=\"searchTerm\"\n [ngModelOptions]=\"{ standalone: true }\"\n (keyup)=\"datasource().search($event.target.value)\"\n />\n @if (searchTerm()) {\n <button\n matSuffix\n mat-icon-button\n [matTooltip]=\"clearSearchTooltip()\"\n aria-label=\"Clear\"\n (click)=\"resetSearch()\"\n >\n <mat-icon>close</mat-icon>\n </button>\n }\n </mat-form-field>\n } @if (editColumnsVisibility() && editColumnsVisibilityButton()) {\n <ng-container\n *ngTemplateOutlet=\"\n editcolumnVisibilityMenuTrigger;\n context: { $implicit: editColumnsVisibilityButton() }\n \"\n ></ng-container>\n }\n <div class=\"spacer\"></div>\n @if (enablePrint()) {\n <ng-container\n *ngTemplateOutlet=\"\n dmTableActionButton;\n context: { $implicit: printButton(), defaultAction: printTable }\n \"\n ></ng-container>\n } @for (button of actionButtons(); track $index) { @if (!button.showIf ||\n button.showIf(visibleColumns(), datasource())) {\n <ng-container\n *ngTemplateOutlet=\"dmTableActionButton; context: { $implicit: button }\"\n ></ng-container>\n } }\n </div>\n <div\n [ngClass]=\"tableClasses()?.tableWrapper || {}\"\n [dmImportantStyle]=\"mergedTableStyle().tableWrapper || DEFAULT_TABLE_STYLE.tableWrapper || {}\"\n cdkScrollable\n >\n <table\n [ngStyle]=\"\n !tableClasses()?.table?.root\n ? mergedTableStyle().table?.root || DEFAULT_TABLE_STYLE.table?.root || {}\n : {}\n \"\n [ngClass]=\"tableClasses()?.table?.root || {}\"\n >\n <thead\n style=\"\n position: sticky !important;\n top: 0 !important;\n z-index: 10 !important;\n box-shadow: 0px 2px 2px 0px #0000006e;\n \"\n [ngStyle]=\"\n !tableClasses()?.table?.thead?.root\n ? mergedTableStyle().table?.thead?.root || DEFAULT_TABLE_STYLE.table?.thead?.root || {}\n : {}\n \"\n [ngClass]=\"tableClasses()?.table?.thead?.root || {}\"\n >\n @if (enableLoadingProgressbar()) {\n <tr style=\"height: 4px !important; max-height: 4px !important; line-height: 4px !important\">\n <th [attr.colspan]=\"visibleRuntimeColumns().length\" style=\"padding: 0 !important\">\n @if (datasource().isLoading()) {\n <mat-progress-bar mode=\"indeterminate\"></mat-progress-bar>\n }\n </th>\n </tr>\n }\n <tr\n [ngStyle]=\"\n !tableClasses()?.table?.thead?.tr\n ? mergedTableStyle().table?.thead?.tr || DEFAULT_TABLE_STYLE.table?.thead?.tr || {}\n : {}\n \"\n [ngClass]=\"tableClasses()?.table?.thead?.tr || {}\"\n cdkDropList\n [cdkDropListData]=\"visibleRuntimeColumns()\"\n [cdkDropListOrientation]=\"'horizontal'\"\n (cdkDropListDropped)=\"onColumnDrop($event)\"\n [cdkDropListAutoScrollStep]=\"20\"\n >\n @for (column of visibleRuntimeColumns(); let j = $index; track column.id) {\n <th\n cdkDrag\n [cdkDragDisabled]=\"!enableColumnsDragAndDrop()\"\n [ngStyle]=\"getHeaderThStyle(column)\"\n [ngClass]=\"tableClasses()?.table?.thead?.th || {}\"\n (mouseenter)=\"hoveredColumnHeaderIndex.set(j)\"\n (mouseleave)=\"hoveredColumnHeaderIndex.set(null)\"\n (click)=\"headerClickHandler(column, $event)\"\n (dblclick)=\"headerDoubleClickHandler(column, $event)\"\n (contextmenu)=\"headerContextMenuHandler(column, $event)\"\n >\n <div\n class=\"inner-header-cell\"\n [dmImportantStyle]=\"getHeaderThContentStyle(column)\"\n (click)=\"headerContentClickHandler(column, $event)\"\n (dblclick)=\"headerContentDoubleClickHandler(column, $event)\"\n (contextmenu)=\"headerContentContextMenuHandler(column, $event)\"\n >\n <span>\n {{ column.header }}\n </span>\n @if (column.sortable) {\n <span\n (click)=\"columnHeaderSortClickHandler(column, $event)\"\n style=\"display: flex; align-items: center\"\n >\n @if (isColumnSorted(column); as sort) {\n <mat-icon style=\"width: 20px; height: 20px; font-size: 20px\">{{\n sort.direction === 'asc' ? 'arrow_upward' : 'arrow_downward'\n }}</mat-icon>\n @if(columnsSortState().length > 1) { [{{ sort.index + 1 }}] } } @else if\n (hoveredColumnHeaderIndex() == j){\n <mat-icon style=\"opacity: 0.3; width: 20px; height: 20px; font-size: 20px\"\n >arrow_upward</mat-icon\n >\n }\n </span>\n } @if (enableColumnsDragHandle() && enableColumnsDragAndDrop()) {\n\n <div class=\"spacer\"></div>\n <span>\n <ng-container\n *ngTemplateOutlet=\"dmTableHeaderMenuTrigger; context: { $implicit: column }\"\n />\n </span>\n <mat-icon style=\"cursor: move; font-size: 20px\" cdkDragHandle\n >drag_indicator</mat-icon\n >\n }\n </div>\n </th>\n }\n </tr>\n </thead>\n <tbody\n [dmImportantStyle]=\"\n !tableClasses()?.table?.tbody?.root\n ? mergedTableStyle().table?.tbody?.root || DEFAULT_TABLE_STYLE.table?.tbody?.root || {}\n : {}\n \"\n [ngClass]=\"tableClasses()?.table?.tbody?.root || {}\"\n >\n @for (row of datasource().result(); let i = $index; track row[rowIdentifierField()]) {\n <tr\n [dmImportantStyle]=\"getBodyRowStyle(i, row)\"\n (mouseenter)=\"hoveredRowIndex.set(i)\"\n (mouseleave)=\"hoveredRowIndex.set(null)\"\n >\n @for (column of visibleRuntimeColumns(); let j = $index; track j) {\n <td\n [dmImportantStyle]=\"getBodyTdStyle(i, column, row)\"\n (click)=\"cellClickHandler(row, column, $event)\"\n (contextmenu)=\"cellContextMenuHandler(row, column, $event)\"\n (dblclick)=\"cellDoubleClickHandler(row, column, $event)\"\n >\n <span\n [dmImportantStyle]=\"getBodyTdContentStyle(i, column, row)\"\n (click)=\"cellContentClickHandler(row, column, $event)\"\n (contextmenu)=\"cellContentContextMenuHandler(row, column, $event)\"\n (dblclick)=\"cellContentDoubleClickHandler(row, column, $event)\"\n >\n @switch (column.type) { @case ('$index') {\n {{ datasource().getFirstItemIndexInPage() + i + 1 }}\n } @case ('component') { @if (column.component) {\n <dm-table-cell-host\n [component]=\"column.component\"\n [context]=\"createCellContext(row, column)\"\n ></dm-table-cell-host>\n } } @case ('tel') {\n <a [href]=\"'tel:' + (column.field ? $any(row)[column.field] : '')\">{{\n resolveCellValue(row, column)\n }}</a>\n } @case ('mail') {\n <a [href]=\"'mailto:' + (column.field ? $any(row)[column.field] : '')\">{{\n resolveCellValue(row, column)\n }}</a>\n } @case ('link') {\n <a\n [href]=\"column.field ? $any(row)[column.field] : ''\"\n target=\"_blank\"\n rel=\"noopener noreferrer\"\n >{{ resolveCellValue(row, column) }}</a\n >\n } @case ('whatsapp') {\n <a\n [href]=\"'https://wa.me/' + (column.field ? $any(row)[column.field] : '')\"\n target=\"_blank\"\n rel=\"noopener noreferrer\"\n >{{ resolveCellValue(row, column) }}</a\n >\n } @case ('customHtml') { @if (column.customHtml) {\n <span [innerHTML]=\"column.customHtml\"></span>\n } @else if (column.customCellTemplate) {\n <ng-container\n *ngTemplateOutlet=\"\n column.customCellTemplate;\n context: createCellContext(row, column)\n \"\n >\n </ng-container>\n } } @case ('actions') {\n <span style=\"display: flex; align-items: center\">\n @for (button of column.actionsButtons || []; track $index) {\n <ng-container\n *ngTemplateOutlet=\"\n dmTableRowActionButton;\n context: {\n $implicit: button,\n row\n }\n \"\n ></ng-container>\n }\n </span>\n } @case('slideToggle') {\n <mat-slide-toggle\n [id]=\"'slideToggle_' + i + '_' + column.id\"\n [checked]=\"$any(row)[column.field!]\"\n [matTooltip]=\"getSlideToggleTooltip(row, column)\"\n (change)=\"onSlideToggleChange(row, column, $event)\"\n >\n <!-- {{ row[column.field!] }} -->\n {{ resolveCellValue(row, column) }}\n </mat-slide-toggle>\n } @case ('input') {\n <ng-container\n *ngTemplateOutlet=\"\n dmTableInputCell;\n context: {\n $implicit: row,\n column: column\n }\n \"\n />\n } @default {\n {{ resolveCellValue(row, column) }}\n } }\n </span>\n </td>\n }\n </tr>\n }\n </tbody>\n @if (enableTotalRow() && datasource().result().length > 0) {\n <tfoot\n style=\"\n position: sticky !important;\n bottom: 0 !important;\n z-index: 10 !important;\n box-shadow: 0px -2px 2px 0px #0000006e;\n \"\n [ngStyle]=\"\n !tableClasses()?.table?.tfoot?.root\n ? mergedTableStyle().table?.tfoot?.root || DEFAULT_TABLE_STYLE.table?.tfoot?.root || {}\n : {}\n \"\n [ngClass]=\"tableClasses()?.table?.tfoot?.root || {}\"\n >\n <tr>\n @for (column of visibleRuntimeColumns(); let j = $index; track column.id) {\n <td\n [ngStyle]=\"getFooterTdStyle(column)\"\n [ngClass]=\"tableClasses()?.table?.tfoot?.td || {}\"\n >\n @if (column.totalRowValueType == 'html') {\n <span [innerHTML]=\"totalRowValues().get(column.id) || ''\"></span>\n } @else {\n {{ totalRowValues().get(column.id) || '' }}\n }\n </td>\n }\n </tr>\n </tfoot>\n }\n </table>\n </div>\n @if (datasource().result().length === 0) {\n <div class=\"dm-table-no-data\">\n <span>{{ noDataMessage() }}</span>\n </div>\n } @else { @if (datasource().isPaginationEnabled()) {\n <ng-container [ngTemplateOutlet]=\"paginator\" />\n } }\n</div>\n\n<!-- MARK: Action Button template -->\n<ng-template #dmTableActionButton let-button let-defaultAction=\"defaultAction\">\n @if (button.buttonType === 'icon') {\n <button\n #rootTrigger=\"matMenuTrigger\"\n mat-icon-button\n [matTooltip]=\"button.tooltip || ''\"\n aria-label=\"{{ button.tooltip }}\"\n [matMenuTriggerFor]=\"button.children && button.children.length > 0 ? tableButtonRootMenu : null\"\n [matMenuTriggerData]=\"{\n buttons: button.children,\n rootTrigger: rootTrigger\n }\"\n (click)=\"\n button.children && button.children.length > 0\n ? null\n : button.onClick\n ? button.onClick(visibleColumns(), datasource())\n : defaultAction\n ? defaultAction($event)\n : null\n \"\n [ngStyle]=\"{ 'background-color': button.backgroundColor ? button.backgroundColor : undefined }\"\n >\n <mat-icon [style.color]=\"button.color ? button.color : undefined\">{{ button.icon }}</mat-icon>\n </button>\n } @else {\n <button\n #rootTrigger=\"matMenuTrigger\"\n [matButton]=\"button.buttonType || 'filled'\"\n [ngStyle]=\"{ 'background-color': button.backgroundColor ? button.backgroundColor : undefined }\"\n aria-label=\"{{ button.label }}\"\n [matTooltip]=\"button.tooltip || ''\"\n [matMenuTriggerFor]=\"button.children && button.children.length > 0 ? tableButtonRootMenu : null\"\n [matMenuTriggerData]=\"{\n buttons: button.children,\n rootTrigger: rootTrigger\n }\"\n (click)=\"\n button.children && button.children.length > 0\n ? null\n : button.onClick\n ? button.onClick(visibleColumns(), datasource())\n : defaultAction\n ? defaultAction($event)\n : null\n \"\n >\n @if (button.icon) {\n <mat-icon class=\"button-icon\" [ngStyle]=\"{ color: button.color ? button.color : undefined }\">{{\n button.icon\n }}</mat-icon>\n }\n <span [ngStyle]=\"{ color: button.color ? button.color : undefined }\">\n {{ button.label }}\n </span>\n </button>\n }\n <!-- @if (button.buttonType === 'icon') {\n <button\n mat-icon-button\n [color]=\"button.color\"\n [matTooltip]=\"button.tooltip || ''\"\n aria-label=\"{{ button.tooltip }}\"\n (click)=\"\n button.children && button.children.length > 0\n ? null\n : button.onClick\n ? button.onClick(datasource())\n : defaultAction\n ? defaultAction()\n : null\n \"\n >\n <mat-icon>{{ button.icon }}</mat-icon>\n </button>\n } @else {\n <button\n [matButton]=\"button.buttonType || 'filled'\"\n [ngStyle]=\"{ 'background-color': button.color ? button.color : undefined }\"\n aria-label=\"{{ button.label }}\"\n [matTooltip]=\"button.tooltip || ''\"\n (click)=\"\n button.children && button.children.length > 0\n ? null\n : button.onClick\n ? button.onClick(datasource())\n : defaultAction\n ? defaultAction()\n : null\n \"\n >\n @if (button.icon) {\n <mat-icon\n class=\"button-icon\"\n [ngStyle]=\"{ color: button.textColor ? button.textColor : undefined }\"\n >{{ button.icon }}</mat-icon\n >\n }\n <span [ngStyle]=\"{ color: button.textColor ? button.textColor : undefined }\">\n {{ button.label }}\n </span>\n </button>\n } -->\n</ng-template>\n\n<!-- MARK: Action Button root menu -->\n<mat-menu #tableButtonRootMenu=\"matMenu\">\n <ng-template matMenuContent let-buttons=\"buttons\" let-rootTrigger=\"rootTrigger\">\n <ng-container\n *ngTemplateOutlet=\"\n tableButtonRecursiveMenu;\n context: { buttons: buttons, rootTrigger: rootTrigger }\n \"\n ></ng-container>\n </ng-template>\n</mat-menu>\n\n<!-- MARK: Action Button recursive menu -->\n<ng-template #tableButtonRecursiveMenu let-buttons=\"buttons\" let-rootTrigger=\"rootTrigger\">\n @for (button of buttons; track $index) { @if (!button.showIf || button.showIf(visibleColumns(),\n datasource())) { @if (button.children?.length) {\n <button\n mat-menu-item\n [matMenuTriggerFor]=\"subMenu\"\n [matMenuTriggerData]=\"{\n buttons: button.children,\n rootTrigger\n }\"\n (click)=\"$event.stopPropagation()\"\n [ngStyle]=\"{ 'background-color': button.backgroundColor ? button.backgroundColor : undefined }\"\n >\n <span style=\"display: flex; align-items: center; width: 100%\">\n @if (button.icon) {\n <mat-icon [style.color]=\"button.color ? button.color : undefined\">{{ button.icon }}</mat-icon>\n }\n <span [style.color]=\"button.color ? button.color : undefined\">{{ button.label }}</span>\n <span class=\"spacer\"></span>\n <mat-icon [style.color]=\"button.color ? button.color : undefined\" class=\"submenu-arrow\"\n >chevron_left</mat-icon\n >\n </span>\n </button>\n\n <mat-menu #subMenu=\"matMenu\">\n <ng-container\n *ngTemplateOutlet=\"\n tableButtonRecursiveMenu;\n context: { buttons: button.children, rootTrigger: rootTrigger }\n \"\n ></ng-container>\n </mat-menu>\n } @else {\n <button\n mat-menu-item\n [matTooltip]=\"button.tooltip || ''\"\n (click)=\"button.onClick?.(visibleColumns(), datasource(), $event, getCloseParentMenusFn(rootTrigger))\"\n [ngStyle]=\"{ 'background-color': button.backgroundColor ? button.backgroundColor : undefined }\"\n >\n @if (button.icon) {\n <mat-icon [style.color]=\"button.color ? button.color : undefined\">{{ button.icon }}</mat-icon>\n }\n <span [style.color]=\"button.color ? button.color : undefined\">{{ button.label }}</span>\n </button>\n }} }\n</ng-template>\n\n<!-- MARK: Row button root menu -->\n<mat-menu #rowButtonRootMenu=\"matMenu\">\n <ng-template matMenuContent let-buttons=\"buttons\" let-row=\"row\" let-rootTrigger=\"rootTrigger\">\n <ng-container\n *ngTemplateOutlet=\"\n rowButtonRecursiveMenu;\n context: { buttons: buttons, row: row, rootTrigger: rootTrigger }\n \"\n ></ng-container>\n </ng-template>\n</mat-menu>\n\n<!-- MARK: Row button recursive menu -->\n<ng-template\n #rowButtonRecursiveMenu\n let-buttons=\"buttons\"\n let-row=\"row\"\n let-rootTrigger=\"rootTrigger\"\n>\n @for (button of buttons; track $index) { @if (button.children?.length) {\n <button\n mat-menu-item\n [matMenuTriggerFor]=\"subMenu\"\n [matMenuTriggerData]=\"{\n buttons: button.children,\n row,\n rootTrigger\n }\"\n (click)=\"$event.stopPropagation()\"\n [ngStyle]=\"{ 'background-color': button.backgroundColor ? button.backgroundColor : undefined }\"\n >\n <span style=\"display: flex; align-items: center; width: 100%\">\n @if (button.icon) {\n <mat-icon [style.color]=\"button.color ? button.color : undefined\">{{ button.icon }}</mat-icon>\n }\n <span [style.color]=\"button.color ? button.color : undefined\">{{ button.label }}</span>\n <span class=\"spacer\"></span>\n <mat-icon [style.color]=\"button.color ? button.color : undefined\" class=\"submenu-arrow\"\n >chevron_left</mat-icon\n >\n </span>\n </button>\n\n <mat-menu #subMenu=\"matMenu\">\n <ng-container\n *ngTemplateOutlet=\"\n rowButtonRecursiveMenu;\n context: { buttons: button.children, row: row, rootTrigger: rootTrigger }\n \"\n ></ng-container>\n </mat-menu>\n\n } @else {\n <button\n mat-menu-item\n [matTooltip]=\"button.tooltip || ''\"\n (click)=\"button.onClick?.(row, $event, getCloseParentMenusFn(rootTrigger))\"\n [ngStyle]=\"{ 'background-color': button.backgroundColor ? button.backgroundColor : undefined }\"\n >\n @if (button.icon) {\n <mat-icon [style.color]=\"button.color ? button.color : undefined\">{{ button.icon }}</mat-icon>\n }\n <span [style.color]=\"button.color ? button.color : undefined\">{{ button.label }}</span>\n </button>\n } }\n</ng-template>\n\n<!-- MARK: Row Action Button template -->\n<ng-template #dmTableRowActionButton let-button let-row=\"row\" let-defaultAction=\"defaultAction\">\n @if (button.buttonType === 'icon') {\n <button\n #rootTrigger=\"matMenuTrigger\"\n mat-icon-button\n [matTooltip]=\"button.tooltip || ''\"\n aria-label=\"{{ button.tooltip }}\"\n [matMenuTriggerFor]=\"button.children && button.children.length > 0 ? rowButtonRootMenu : null\"\n [matMenuTriggerData]=\"{\n buttons: button.children,\n row,\n rootTrigger: rootTrigger\n }\"\n (click)=\"\n button.children && button.children.length > 0\n ? null\n : button.onClick\n ? button.onClick(row)\n : defaultAction\n ? defaultAction($event)\n : null\n \"\n >\n <mat-icon [style.color]=\"button.color ? button.color : undefined\">{{ button.icon }}</mat-icon>\n </button>\n } @else {\n <button\n [matButton]=\"button.buttonType || 'filled'\"\n [ngStyle]=\"{ 'background-color': button.backgroundColor ? button.backgroundColor : undefined }\"\n aria-label=\"{{ button.label }}\"\n [matTooltip]=\"button.tooltip || ''\"\n [matMenuTriggerFor]=\"button.children && button.children.length > 0 ? rowButtonRootMenu : null\"\n #rootTrigger=\"matMenuTrigger\"\n [matMenuTriggerData]=\"{\n buttons: button.children,\n row,\n rootTrigger: rootTrigger\n }\"\n (click)=\"\n button.children && button.children.length > 0\n ? null\n : button.onClick\n ? button.onClick(row)\n : defaultAction\n ? defaultAction($event)\n : null\n \"\n >\n @if (button.icon) {\n <mat-icon class=\"button-icon\" [ngStyle]=\"{ color: button.color ? button.color : undefined }\">{{\n button.icon\n }}</mat-icon>\n }\n <span [ngStyle]=\"{ color: button.color ? button.color : undefined }\">\n {{ button.label }}\n </span>\n </button>\n }\n</ng-template>\n\n<!-- <mat-menu #buttonChildren=\"matMenu\">\n <ng-template matMenuContent let-buttons=\"buttons\" let-row=\"row\">\n @for (button of buttons || []; track $index) { @if (button.children && button.children.length >\n 0) {\n <ng-container *ngTemplateOutlet=\"subMenuTrigger; context: { button, row }\"></ng-container>\n } @else {\n <button\n mat-menu-item\n [matTooltip]=\"button.tooltip || ''\"\n aria-label=\"{{ button.tooltip }}\"\n (click)=\"\n button.children && button.children.length > 0\n ? null\n : button.onClick\n ? button.onClick(row, $event)\n : null\n \"\n >\n @if (button.icon) {\n <mat-icon>{{ button.icon }}</mat-icon>\n }\n <span>{{ button.label }}</span>\n </button>\n } }\n </ng-template>\n</mat-menu>\n\n<ng-template #subMenuTrigger let-button=\"button\" let-row=\"row\">\n <button\n mat-menu-item\n [matMenuTriggerFor]=\"buttonChildren\"\n [matMenuTriggerData]=\"{\n buttons: button.children,\n row\n }\"\n [matTooltip]=\"button.tooltip || ''\"\n aria-label=\"{{ button.tooltip }}\"\n >\n @if (button.icon) {\n <mat-icon>{{ button.icon }}</mat-icon>\n }\n <span>{{ button.label }}</span>\n </button>\n</ng-template> -->\n\n<!-- MARK: Paginator template -->\n<ng-template #paginator>\n <div\n class=\"dm-table-paginator-row\"\n [ngStyle]=\"mergedTableStyle().paginator?.root || {}\"\n [ngClass]=\"tableClasses()?.paginator?.root || {}\"\n >\n <p\n class=\"mb-0\"\n [ngStyle]=\"mergedTableStyle().paginator?.p || {}\"\n [ngClass]=\"tableClasses()?.paginator?.p || {}\"\n >\n {{\n paginatorSettings()?.numberOfItemsPerPageLabel ||\n DEFAULT_PAGINATOR_SETTINGS.numberOfItemsPerPageLabel\n }}\n </p>\n\n <div>\n <mat-form-field\n style=\"width: 100px\"\n class=\"dm-paginator-form-field ms-2 me-2\"\n [appearance]=\"'fill'\"\n [ngStyle]=\"mergedTableStyle().paginator?.mat_form_field || {}\"\n [ngClass]=\"tableClasses()?.paginator?.mat_form_field || {}\"\n >\n <mat-select\n [value]=\"datasource().getPageSize()\"\n [ngStyle]=\"mergedTableStyle().paginator?.mat_select || {}\"\n [ngClass]=\"tableClasses()?.paginator?.mat_select || {}\"\n >\n @for (option of (paginatorSettings()?.pageSizeOptions ||\n DEFAULT_PAGINATOR_SETTINGS.pageSizeOptions); track option) {\n <mat-option\n [value]=\"option\"\n (onSelectionChange)=\"onPageSizeChange($event, option)\"\n [ngStyle]=\"mergedTableStyle().paginator?.mat_option || {}\"\n [ngClass]=\"tableClasses()?.paginator?.mat_option || {}\"\n >{{ option }}</mat-option\n >\n }\n </mat-select>\n </mat-form-field>\n </div>\n\n @if (datasource().getPageSize() > 0) {\n <div class=\"dm-table-paginator-page-info\">\n <p\n [ngClass]=\"tableClasses()?.paginator?.p || {}\"\n [ngStyle]=\"mergedTableStyle().paginator?.p || {}\"\n >\n {{ datasource().getFirstItemIndexInPage() + 1 }}\n </p>\n\n <p\n [ngClass]=\"tableClasses()?.paginator?.p || {}\"\n [ngStyle]=\"mergedTableStyle().paginator?.p || {}\"\n >\n -\n </p>\n\n <p\n [ngClass]=\"tableClasses()?.paginator?.p || {}\"\n [ngStyle]=\"mergedTableStyle().paginator?.p || {}\"\n >\n {{ datasource().getLastItemIndexInPage() + 1 }}\n </p>\n\n <p\n [ngClass]=\"tableClasses()?.paginator?.p || {}\"\n [ngStyle]=\"mergedTableStyle().paginator?.p || {}\"\n >\n \u05DE\u05EA\u05D5\u05DA\n </p>\n\n <p\n [ngClass]=\"tableClasses()?.paginator?.p || {}\"\n [ngStyle]=\"mergedTableStyle().paginator?.p || {}\"\n >\n {{ datasource().getTotalResultElementsCount() }}\n </p>\n </div>\n }\n\n <div>\n @if (paginatorSettings()?.showFirstAndLastPagesButtons ||\n DEFAULT_PAGINATOR_SETTINGS.showFirstAndLastPagesButtons) {\n <button\n [ngStyle]=\"mergedTableStyle().paginator?.button || {}\"\n [ngClass]=\"tableClasses()?.paginator?.button || {}\"\n mat-icon-button\n (click)=\"datasource().firstPage()\"\n [matTooltip]=\"\n paginatorSettings()?.firstPageButtonLabel ||\n DEFAULT_PAGINATOR_SETTINGS.firstPageButtonLabel\n \"\n [matTooltipPosition]=\"'above'\"\n >\n <mat-icon>keyboard_double_arrow_right</mat-icon>\n </button>\n }\n <button\n [ngStyle]=\"mergedTableStyle().paginator?.button || {}\"\n [ngClass]=\"tableClasses()?.paginator?.button || {}\"\n mat-icon-button\n (click)=\"datasource().firstPage()\"\n [matTooltip]=\"\n paginatorSettings()?.previousPageButtonLabel ||\n DEFAULT_PAGINATOR_SETTINGS.previousPageButtonLabel\n \"\n [matTooltipPosition]=\"'above'\"\n >\n <mat-icon>chevron_right</mat-icon>\n </button>\n <button\n [ngStyle]=\"mergedTableStyle().paginator?.button || {}\"\n [ngClass]=\"tableClasses()?.paginator?.button || {}\"\n mat-icon-button\n (click)=\"datasource().nextPage()\"\n [matTooltip]=\"\n paginatorSettings()?.nextPageButtonLabel || DEFAULT_PAGINATOR_SETTINGS.nextPageButtonLabel\n \"\n [matTooltipPosition]=\"'above'\"\n >\n <mat-icon>chevron_left</mat-icon>\n </button>\n @if (paginatorSettings()?.showFirstAndLastPagesButtons ||\n DEFAULT_PAGINATOR_SETTINGS.showFirstAndLastPagesButtons) {\n <button\n [ngStyle]=\"mergedTableStyle().paginator?.button || {}\"\n [ngClass]=\"tableClasses()?.paginator?.button || {}\"\n mat-icon-button\n (click)=\"datasource().lastPage()\"\n [matTooltip]=\"\n paginatorSettings()?.lastPageButtonLabel || DEFAULT_PAGINATOR_SETTINGS.lastPageButtonLabel\n \"\n [matTooltipPosition]=\"'above'\"\n >\n <mat-icon>keyboard_double_arrow_left</mat-icon>\n </button>\n }\n </div>\n </div>\n</ng-template>\n\n<!-- MARK: Edit Columns Visibility Menu Trigger -->\n<ng-template #editcolumnVisibilityMenuTrigger let-button>\n @if (button.buttonType == 'icon') {\n <button\n mat-icon-button\n [matTooltip]=\"button.tooltip || ''\"\n aria-label=\"{{ button.tooltip }}\"\n [matMenuTriggerFor]=\"columnVisibilityMenu\"\n #rootTrigger=\"matMenuTrigger\"\n >\n <mat-icon [style.color]=\"button.textColor ? button.textColor : undefined\">{{\n button.icon\n }}</mat-icon>\n </button>\n } @else {\n <button\n [matButton]=\"button.buttonType || 'filled'\"\n [ngStyle]=\"{ 'background-color': button.color ? button.color : undefined }\"\n aria-label=\"{{ button.label }}\"\n [matTooltip]=\"button.tooltip || ''\"\n [matMenuTriggerFor]=\"columnVisibilityMenu\"\n #rootTrigger=\"matMenuTrigger\"\n >\n @if (button.icon) {\n <mat-icon\n class=\"button-icon\"\n [ngStyle]=\"{ color: button.textColor ? button.textColor : undefined }\"\n >{{ button.icon }}</mat-icon\n >\n }\n <span [style.color]=\"button.textColor ? button.textColor : undefined\">\n {{ button.label }}\n </span>\n </button>\n }\n</ng-template>\n\n<!-- MARK: Edit Columns Visibility Menu -->\n<mat-menu #columnVisibilityMenu=\"matMenu\">\n <div mat-menu-item disableRipple (click)=\"$event.stopPropagation()\">\n <mat-checkbox\n [checked]=\"isAllColumnsVisible()\"\n (change)=\"toggleAllColumnsVisibility($event)\"\n (click)=\"$event.stopPropagation()\"\n >{{ editColumnsVisibilitySelectAllLabel() }}</mat-checkbox\n >\n </div>\n @for (column of runtimeColumns(); track column.id) {\n <div mat-menu-item disableRipple (click)=\"$event.stopPropagation()\">\n <mat-checkbox\n [checked]=\"isColumnVisible(column)\"\n (change)=\"toggleColumnVisibility($event, column)\"\n (click)=\"$event.stopPropagation()\"\n >{{ column.header }}</mat-checkbox\n >\n </div>\n }\n</mat-menu>\n\n<!-- MARK: Input Cell Template -->\n<ng-template #dmTableInputCell let-row let-column=\"column\">\n @switch (column.inputType) { @case ('select') {\n <mat-select\n [dmImportantStyle]=\"getInputStyle(column)\"\n panelWidth=\"null\"\n [value]=\"resolveCellValue(row, column)\"\n >\n @for (option of column.selectOptions || []; track option.value) {\n <mat-option\n [value]=\"option.value\"\n (onSelectionChange)=\"inputCellSelectOptionChangeHandler(row, column, option, $event)\"\n >{{ option.label }}</mat-option\n >\n }\n </mat-select>\n } @case ('checkbox') {\n <mat-checkbox\n [checked]=\"resolveCellValue(row, column)\"\n (change)=\"inputCellCheckboxChangeHandler(row, column, $event)\"\n ></mat-checkbox>\n } @default {\n <input\n [type]=\"column.inputType || 'text'\"\n [value]=\"resolveCellValue(row, column)\"\n (change)=\"inputCellChangeHandler(row, column, $event)\"\n [dmImportantStyle]=\"getInputStyle(column)\"\n />\n } }\n</ng-template>\n\n<!-- MARK: Header Menu Trigger Template -->\n<ng-template #dmTableHeaderMenuTrigger let-column>\n @if (column?.headerMenuItems?.length) {\n <!-- <button\n mat-icon-button\n (click)=\"$event.stopPropagation()\"\n aria-label=\"Column Menu\"\n >\n </button> -->\n <mat-icon\n #rootTrigger=\"matMenuTrigger\"\n [matMenuTriggerFor]=\"dmTableHeaderRootMenu\"\n [matMenuTriggerData]=\"{\n menuItems: column.headerMenuItems,\n rootTrigger: rootTrigger\n }\"\n [matTooltip]=\"column.headerMenuTooltip || ''\"\n style=\"font-size: 20px; cursor: pointer; margin-left: 4px; height: 20px\"\n [ngStyle]=\"{\n color: getHeaderThContentStyle(column)?.color || getHeaderThStyle(column)?.color || ''\n }\"\n >menu</mat-icon\n >\n }\n</ng-template>\n\n<!-- MARK: Header Root Menu -->\n<mat-menu #dmTableHeaderRootMenu=\"matMenu\">\n <ng-template matMenuContent let-menuItems=\"menuItems\" let-rootTrigger=\"rootTrigger\">\n <ng-container\n *ngTemplateOutlet=\"\n dmTableHeaderRecursiveMenu;\n context: { menuItems: menuItems, rootTrigger: rootTrigger }\n \"\n ></ng-container>\n </ng-template>\n</mat-menu>\n\n<!-- MARK: Header Recursive Menu -->\n<ng-template #dmTableHeaderRecursiveMenu let-menuItems=\"menuItems\" let-rootTrigger=\"rootTrigger\">\n @for (menuItem of menuItems; track $index) { @if (!menuItem.showIf || (menuItem.showIf &&\n menuItem.showIf(datasource()))) {@if (menuItem.children?.length) {\n <button\n mat-menu-item\n [matMenuTriggerFor]=\"dmTableHeaderSubMenu\"\n [matMenuTriggerData]=\"{\n menuItems: menuItem.children,\n rootTrigger\n }\"\n (click)=\"$event.stopPropagation()\"\n [ngStyle]=\"{\n 'background-color': menuItem.backgroundColor ? menuItem.backgroundColor : undefined\n }\"\n >\n <span style=\"display: flex; align-items: center; width: 100%\">\n @if (menuItem.icon) {\n <mat-icon [style.color]=\"menuItem.color ? menuItem.color : undefined\">{{\n menuItem.icon\n }}</mat-icon>\n }\n <span [style.color]=\"menuItem.color ? menuItem.color : undefined\">{{ menuItem.label }}</span>\n <span class=\"spacer\"></span>\n <mat-icon [style.color]=\"menuItem.color ? menuItem.color : undefined\" class=\"submenu-arrow\"\n >chevron_left</mat-icon\n >\n </span>\n </button>\n\n <mat-menu #dmTableHeaderSubMenu=\"matMenu\">\n <ng-container\n *ngTemplateOutlet=\"\n dmTableHeaderRecursiveMenu;\n context: { menuItems: menuItem.children, rootTrigger: rootTrigger }\n \"\n />\n </mat-menu>\n } @else {\n <button\n mat-menu-item\n [matTooltip]=\"menuItem.tooltip || ''\"\n (click)=\"menuItem.onClick?.(datasource(), $event, getCloseParentMenusFn(rootTrigger))\"\n [ngStyle]=\"{\n 'background-color': menuItem.backgroundColor ? menuItem.backgroundColor : undefined\n }\"\n >\n @if (menuItem.icon) {\n <mat-icon [style.color]=\"menuItem.color ? menuItem.color : undefined\">{{\n menuItem.icon\n }}</mat-icon>\n }\n <span [style.color]=\"menuItem.color ? menuItem.color : undefined\">{{ menuItem.label }}</span>\n </button>\n } }}\n</ng-template>\n", styles: ["#dm-table-component-wrapper{width:100%}#dm-table-component-wrapper ::-webkit-scrollbar{width:var(--dm-table-scrollbar-width, 7px);height:var(--dm-table-scrollbar-width, 7px)}#dm-table-component-wrapper ::-webkit-scrollbar-track{background:var(--dm-table-scrollbar-background-color, #e0e0e0)}#dm-table-component-wrapper ::-webkit-scrollbar-thumb{background:var(--dm-table-scrollbar-color, #949496);border-radius:var(--dm-table-scrollbar-border-radius, 4px)}#dm-table-component-wrapper ::-webkit-scrollbar-thumb:hover{background:var(--dm-table-scrollbar-hover-color, #5f5f5f)}#dm-table-component-wrapper .dm-table-top-section{width:calc(100% - 10px);display:flex;align-items:center;padding:0 5px;gap:5px;flex-wrap:wrap}#dm-table-component-wrapper .dm-table-table-wrapper .dm-table-classic{width:100%;border-collapse:collapse;border-spacing:0;box-shadow:0 5px 5px -3px #003,0 8px 10px 1px #00000024,0 3px 14px 2px #0000001f;padding:0;font-size:1rem;border-radius:8px;page-break-inside:auto}#dm-table-component-wrapper .dm-table-table-wrapper .dm-table-classic tr{page-break-inside:avoid}#dm-table-component-wrapper .dm-table-table-wrapper .dm-table-classic th,#dm-table-component-wrapper .dm-table-table-wrapper .dm-table-classic td{text-align:start;max-width:none}#dm-table-component-wrapper .inner-header-cell{display:flex;align-items:center;gap:5px}#dm-table-component-wrapper .dm-table-no-data{width:98%;margin:10px auto 0;line-height:60px;display:flex;justify-content:center;align-items:center;padding:10px;font-size:1.5rem;font-weight:700;color:#dd2f2f;box-shadow:0 4px 6px #000000d7}#dm-table-component-wrapper .dm-table-paginator-row{display:flex;flex-wrap:wrap;justify-content:center;align-items:center;gap:5px}#dm-table-component-wrapper .dm-table-paginator-row .dm-table-paginator-page-info{display:flex;align-items:center;gap:5px}:host ::ng-deep .dm-paginator-form-field>.mat-mdc-form-field-bottom-align:before{content:\"\";display:none;height:0px}:host ::ng-deep .dm-table-search-form-field>.mat-mdc-form-field-bottom-align:before{content:\"\";display:none;height:0px}.cdk-drag-preview{border:none;box-sizing:border-box;background-color:var(--dm-table-header-background-color, #f5f5f5);color:var(--dm-table-header-color, #000000);border-radius:4px;box-shadow:0 5px 5px -3px #0003,0 8px 10px 1px #00000024,0 3px 14px 2px #0000001f}.cdk-drag-preview .inner-header-cell{display:flex;align-items:center}.spacer{flex-grow:1}\n"], dependencies: [{ kind: "directive", type: DmImportantStyleDirective, selector: "[dmImportantStyle]", inputs: ["dmImportantStyle"] }, { kind: "ngmodule", type: MatProgressSpinnerModule }, { kind: "ngmodule", type: MatSlideToggleModule }, { kind: "component", type: i1$1.MatSlideToggle, selector: "mat-slide-toggle", inputs: ["name", "id", "labelPosition", "aria-label", "aria-labelledby", "aria-describedby", "required", "color", "disabled", "disableRipple", "tabIndex", "checked", "hideIcon", "disabledInteractive"], outputs: ["change", "toggleChange"], exportAs: ["matSlideToggle"] }, { kind: "ngmodule", type: MatProgressBarModule }, { kind: "component", type: i2$2.MatProgressBar, selector: "mat-progress-bar", inputs: ["color", "value", "bufferValue", "mode"], outputs: ["animationEnd"], exportAs: ["matProgressBar"] }, { kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i1.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "ngmodule", type: MatFormFieldModule }, { kind: "component", type: i2.MatFormField, selector: "mat-form-field", inputs: ["hideRequiredMarker", "color", "floatLabel", "appearance", "subscriptSizing", "hintLabel"], exportAs: ["matFormField"] }, { kind: "directive", type: i2.MatSuffix, selector: "[matSuffix], [matIconSuffix], [matTextSuffix]", inputs: ["matTextSuffix"] }, { kind: "ngmodule", type: MatCheckboxModule }, { kind: "component", type: i3.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: "ngmodule", type: MatSelectModule }, { kind: "directive", type: i6$1.CdkScrollable, selector: "[cdk-scrollable], [cdkScrollable]" }, { kind: "component", type: i5.MatSelect, selector: "mat-select", inputs: ["aria-describedby", "panelClass", "disabled", "disableRipple", "tabIndex", "hideSingleSelectionIndicator", "placeholder", "required", "multiple", "disableOptionCentering", "compareWith", "value", "aria-label", "aria-labelledby", "errorStateMatcher", "typeaheadDebounceInterval", "sortComparator", "id", "panelWidth", "canSelectNullableOptions"], outputs: ["openedChange", "opened", "closed", "selectionChange", "valueChange"], exportAs: ["matSelect"] }, { kind: "component", type: i5.MatOption, selector: "mat-option", inputs: ["value", "id", "disabled"], outputs: ["onSelectionChange"], exportAs: ["matOption"] }, { kind: "component", type: DmTableCellHost, selector: "dm-table-cell-host", inputs: ["component", "context"] }, { kind: "ngmodule", type: MatButtonModule }, { kind: "component", type: i8.MatButton, selector: " button[matButton], a[matButton], button[mat-button], button[mat-raised-button], button[mat-flat-button], button[mat-stroked-button], a[mat-button], a[mat-raised-button], a[mat-flat-button], a[mat-stroked-button] ", inputs: ["matButton"], exportAs: ["matButton", "matAnchor"] }, { kind: "component", type: i8.MatIconButton, selector: "button[mat-icon-button], a[mat-icon-button], button[matIconButton], a[matIconButton]", exportAs: ["matButton", "matAnchor"] }, { kind: "ngmodule", type: MatInputModule }, { kind: "directive", type: i6.MatInput, selector: "input[matInput], textarea[matInput], select[matNativeControl], input[matNativeControl], textarea[matNativeControl]", inputs: ["disabled", "id", "placeholder", "name", "required", "type", "errorStateMatcher", "aria-describedby", "value", "readonly", "disabledInteractive"], exportAs: ["matInput"] }, { kind: "ngmodule", type: MatMenuModule }, { kind: "component", type: i10.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: i10.MatMenuItem, selector: "[mat-menu-item]", inputs: ["role", "disabled", "disableRipple"], exportAs: ["matMenuItem"] }, { kind: "directive", type: i10.MatMenuContent, selector: "ng-template[matMenuContent]" }, { kind: "directive", type: i10.MatMenuTrigger, selector: "[mat-menu-trigger-for], [matMenuTriggerFor]", inputs: ["mat-menu-trigger-for", "matMenuTriggerFor", "matMenuTriggerData", "matMenuTriggerRestoreFocus"], outputs: ["menuOpened", "onMenuOpen", "menuClosed", "onMenuClose"], exportAs: ["matMenuTrigger"] }, { kind: "directive", type: CdkDragHandle, selector: "[cdkDragHandle]", inputs: ["cdkDragHandleDisabled"] }, { kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i11.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i11.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "directive", type: i11.NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }, { kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i1.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "directive", type: CdkDropList, selector: "[cdkDropList], cdk-drop-list", inputs: ["cdkDropListConnectedTo", "cdkDropListData", "cdkDropListOrientation", "id", "cdkDropListLockAxis", "cdkDropListDisabled", "cdkDropListSortingDisabled", "cdkDropListEnterPredicate", "cdkDropListSortPredicate", "cdkDropListAutoScrollDisabled", "cdkDropListAutoScrollStep", "cdkDropListElementContainer", "cdkDropListHasAnchor"], outputs: ["cdkDropListDropped", "cdkDropListEntered", "cdkDropListExited", "cdkDropListSorted"], exportAs: ["cdkDropList"] }, { kind: "ngmodule", type: A11yModule }, { kind: "directive", type: MatTooltip, selector: "[matTooltip]", inputs: ["matTooltipPosition", "matTooltipPositionAtOrigin", "matTooltipDisabled", "matTooltipShowDelay", "matTooltipHideDelay", "matTooltipTouchGestures", "matTooltip", "matTooltipClass"], exportAs: ["matTooltip"] }, { kind: "component", type: MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "directive", type: CdkDrag, selector: "[cdkDrag]", inputs: ["cdkDragData", "cdkDragLockAxis", "cdkDragRootElement", "cdkDragBoundary", "cdkDragStartDelay", "cdkDragFreeDragPosition", "cdkDragDisabled", "cdkDragConstrainPosition", "cdkDragPreviewClass", "cdkDragPreviewContainer", "cdkDragScale"], outputs: ["cdkDragStarted", "cdkDragReleased", "cdkDragEnded", "cdkDragEntered", "cdkDragExited", "cdkDragDropped", "cdkDragMoved"], exportAs: ["cdkDrag"] }] });
2158
2158
  }
2159
2159
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.3", ngImport: i0, type: DmTable, decorators: [{
2160
2160
  type: Component,
@@ -2179,7 +2179,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.3", ngImpor
2179
2179
  MatTooltip,
2180
2180
  MatIcon,
2181
2181
  CdkDrag,
2182
- ], template: "<div id=\"dm-table-component-wrapper\">\n <div class=\"dm-table-top-section\">\n @if (enableSearch()) {\n <mat-form-field [appearance]=\"searchInputAppearance()\" class=\"dm-table-search-form-field\">\n <input\n matInput\n [placeholder]=\"searchPlaceholder()\"\n [(ngModel)]=\"searchTerm\"\n [ngModelOptions]=\"{ standalone: true }\"\n (keyup)=\"datasource().search($event.target.value)\"\n />\n @if (searchTerm()) {\n <button\n matSuffix\n mat-icon-button\n [matTooltip]=\"clearSearchTooltip()\"\n aria-label=\"Clear\"\n (click)=\"resetSearch()\"\n >\n <mat-icon>close</mat-icon>\n </button>\n }\n </mat-form-field>\n } @if (editColumnsVisibility() && editColumnsVisibilityButton()) {\n <ng-container\n *ngTemplateOutlet=\"\n editcolumnVisibilityMenuTrigger;\n context: { $implicit: editColumnsVisibilityButton() }\n \"\n ></ng-container>\n }\n <div class=\"spacer\"></div>\n @if (enablePrint()) {\n <ng-container\n *ngTemplateOutlet=\"\n dmTableActionButton;\n context: { $implicit: printButton(), defaultAction: printTable }\n \"\n ></ng-container>\n } @for (button of actionButtons(); track $index) { @if (!button.showIf ||\n button.showIf(visibleColumns(), datasource())) {\n <ng-container\n *ngTemplateOutlet=\"dmTableActionButton; context: { $implicit: button }\"\n ></ng-container>\n } }\n </div>\n <div\n [ngClass]=\"tableClasses()?.tableWrapper || {}\"\n [dmImportantStyle]=\"mergedTableStyle().tableWrapper || DEFAULT_TABLE_STYLE.tableWrapper || {}\"\n cdkScrollable\n >\n <table\n [ngStyle]=\"\n !tableClasses()?.table?.root\n ? mergedTableStyle().table?.root || DEFAULT_TABLE_STYLE.table?.root || {}\n : {}\n \"\n [ngClass]=\"tableClasses()?.table?.root || {}\"\n >\n <thead\n style=\"\n position: sticky !important;\n top: 0 !important;\n z-index: 10 !important;\n box-shadow: 0px 2px 2px 0px #0000006e;\n \"\n [ngStyle]=\"\n !tableClasses()?.table?.thead?.root\n ? mergedTableStyle().table?.thead?.root || DEFAULT_TABLE_STYLE.table?.thead?.root || {}\n : {}\n \"\n [ngClass]=\"tableClasses()?.table?.thead?.root || {}\"\n >\n @if (enableLoadingProgressbar()) {\n <tr style=\"height: 4px !important; max-height: 4px !important; line-height: 4px !important\">\n <th [attr.colspan]=\"visibleRuntimeColumns().length\" style=\"padding: 0 !important\">\n @if (datasource().isLoading()) {\n <mat-progress-bar mode=\"indeterminate\"></mat-progress-bar>\n }\n </th>\n </tr>\n }\n <tr\n [ngStyle]=\"\n !tableClasses()?.table?.thead?.tr\n ? mergedTableStyle().table?.thead?.tr || DEFAULT_TABLE_STYLE.table?.thead?.tr || {}\n : {}\n \"\n [ngClass]=\"tableClasses()?.table?.thead?.tr || {}\"\n cdkDropList\n [cdkDropListData]=\"visibleRuntimeColumns()\"\n [cdkDropListOrientation]=\"'horizontal'\"\n (cdkDropListDropped)=\"onColumnDrop($event)\"\n [cdkDropListAutoScrollStep]=\"20\"\n >\n @for (column of visibleRuntimeColumns(); let j = $index; track column.id) {\n <th\n cdkDrag\n [cdkDragDisabled]=\"!enableColumnsDragAndDrop()\"\n [ngStyle]=\"getHeaderThStyle(column)\"\n [ngClass]=\"tableClasses()?.table?.thead?.th || {}\"\n (mouseenter)=\"hoveredColumnHeaderIndex.set(j)\"\n (mouseleave)=\"hoveredColumnHeaderIndex.set(null)\"\n (click)=\"headerClickHandler(column, $event)\"\n (dblclick)=\"headerDoubleClickHandler(column, $event)\"\n (contextmenu)=\"headerContextMenuHandler(column, $event)\"\n >\n <div\n class=\"inner-header-cell\"\n [dmImportantStyle]=\"getHeaderThContentStyle(column)\"\n (click)=\"headerContentClickHandler(column, $event)\"\n (dblclick)=\"headerContentDoubleClickHandler(column, $event)\"\n (contextmenu)=\"headerContentContextMenuHandler(column, $event)\"\n >\n <span>\n {{ column.header }}\n </span>\n @if (column.sortable) {\n <span\n (click)=\"columnHeaderSortClickHandler(column, $event)\"\n style=\"display: flex; align-items: center\"\n >\n @if (isColumnSorted(column); as sort) {\n <mat-icon style=\"width: 20px; height: 20px; font-size: 20px\">{{\n sort.direction === 'asc' ? 'arrow_upward' : 'arrow_downward'\n }}</mat-icon>\n @if(columnsSortState().length > 1) { [{{ sort.index + 1 }}] } } @else if\n (hoveredColumnHeaderIndex() == j){\n <mat-icon style=\"opacity: 0.3; width: 20px; height: 20px; font-size: 20px\"\n >arrow_upward</mat-icon\n >\n }\n </span>\n } @if (enableColumnsDragHandle()) {\n\n <div class=\"spacer\"></div>\n <span>\n <ng-container\n *ngTemplateOutlet=\"dmTableHeaderMenuTrigger; context: { $implicit: column }\"\n />\n </span>\n <mat-icon style=\"cursor: move; font-size: 20px\" cdkDragHandle\n >drag_indicator</mat-icon\n >\n }\n </div>\n </th>\n }\n </tr>\n </thead>\n <tbody\n [dmImportantStyle]=\"\n !tableClasses()?.table?.tbody?.root\n ? mergedTableStyle().table?.tbody?.root || DEFAULT_TABLE_STYLE.table?.tbody?.root || {}\n : {}\n \"\n [ngClass]=\"tableClasses()?.table?.tbody?.root || {}\"\n >\n @for (row of datasource().result(); let i = $index; track row[rowIdentifierField()]) {\n <tr\n [dmImportantStyle]=\"getBodyRowStyle(i, row)\"\n (mouseenter)=\"hoveredRowIndex.set(i)\"\n (mouseleave)=\"hoveredRowIndex.set(null)\"\n >\n @for (column of visibleRuntimeColumns(); let j = $index; track j) {\n <td\n [dmImportantStyle]=\"getBodyTdStyle(i, column, row)\"\n (click)=\"cellClickHandler(row, column, $event)\"\n (contextmenu)=\"cellContextMenuHandler(row, column, $event)\"\n (dblclick)=\"cellDoubleClickHandler(row, column, $event)\"\n >\n <span\n [dmImportantStyle]=\"getBodyTdContentStyle(i, column, row)\"\n (click)=\"cellContentClickHandler(row, column, $event)\"\n (contextmenu)=\"cellContentContextMenuHandler(row, column, $event)\"\n (dblclick)=\"cellContentDoubleClickHandler(row, column, $event)\"\n >\n @switch (column.type) { @case ('$index') {\n {{ datasource().getFirstItemIndexInPage() + i + 1 }}\n } @case ('component') { @if (column.component) {\n <dm-table-cell-host\n [component]=\"column.component\"\n [context]=\"createCellContext(row, column)\"\n ></dm-table-cell-host>\n } } @case ('tel') {\n <a [href]=\"'tel:' + (column.field ? $any(row)[column.field] : '')\">{{\n resolveCellValue(row, column)\n }}</a>\n } @case ('mail') {\n <a [href]=\"'mailto:' + (column.field ? $any(row)[column.field] : '')\">{{\n resolveCellValue(row, column)\n }}</a>\n } @case ('link') {\n <a\n [href]=\"column.field ? $any(row)[column.field] : ''\"\n target=\"_blank\"\n rel=\"noopener noreferrer\"\n >{{ resolveCellValue(row, column) }}</a\n >\n } @case ('whatsapp') {\n <a\n [href]=\"'https://wa.me/' + (column.field ? $any(row)[column.field] : '')\"\n target=\"_blank\"\n rel=\"noopener noreferrer\"\n >{{ resolveCellValue(row, column) }}</a\n >\n } @case ('customHtml') { @if (column.customHtml) {\n <span [innerHTML]=\"column.customHtml\"></span>\n } @else if (column.customCellTemplate) {\n <ng-container\n *ngTemplateOutlet=\"\n column.customCellTemplate;\n context: createCellContext(row, column)\n \"\n >\n </ng-container>\n } } @case ('actions') {\n <span style=\"display: flex; align-items: center\">\n @for (button of column.actionsButtons || []; track $index) {\n <ng-container\n *ngTemplateOutlet=\"\n dmTableRowActionButton;\n context: {\n $implicit: button,\n row\n }\n \"\n ></ng-container>\n }\n </span>\n } @case('slideToggle') {\n <mat-slide-toggle\n [id]=\"'slideToggle_' + i + '_' + column.id\"\n [checked]=\"$any(row)[column.field!]\"\n [matTooltip]=\"getSlideToggleTooltip(row, column)\"\n (change)=\"onSlideToggleChange(row, column, $event)\"\n >\n <!-- {{ row[column.field!] }} -->\n {{ resolveCellValue(row, column) }}\n </mat-slide-toggle>\n } @case ('input') {\n <ng-container\n *ngTemplateOutlet=\"\n dmTableInputCell;\n context: {\n $implicit: row,\n column: column\n }\n \"\n />\n } @default {\n {{ resolveCellValue(row, column) }}\n } }\n </span>\n </td>\n }\n </tr>\n }\n </tbody>\n @if (enableTotalRow() && datasource().result().length > 0) {\n <tfoot\n style=\"\n position: sticky !important;\n bottom: 0 !important;\n z-index: 10 !important;\n box-shadow: 0px -2px 2px 0px #0000006e;\n \"\n [ngStyle]=\"\n !tableClasses()?.table?.tfoot?.root\n ? mergedTableStyle().table?.tfoot?.root || DEFAULT_TABLE_STYLE.table?.tfoot?.root || {}\n : {}\n \"\n [ngClass]=\"tableClasses()?.table?.tfoot?.root || {}\"\n >\n <tr>\n @for (column of visibleRuntimeColumns(); let j = $index; track column.id) {\n <td\n [ngStyle]=\"getFooterTdStyle(column)\"\n [ngClass]=\"tableClasses()?.table?.tfoot?.td || {}\"\n >\n @if (column.totalRowValueType == 'html') {\n <span [innerHTML]=\"totalRowValues().get(column.id) || ''\"></span>\n } @else {\n {{ totalRowValues().get(column.id) || '' }}\n }\n </td>\n }\n </tr>\n </tfoot>\n }\n </table>\n </div>\n @if (datasource().result().length === 0) {\n <div class=\"dm-table-no-data\">\n <span>{{ noDataMessage() }}</span>\n </div>\n } @else { @if (datasource().isPaginationEnabled()) {\n <ng-container [ngTemplateOutlet]=\"paginator\" />\n } }\n</div>\n\n<!-- MARK: Action Button template -->\n<ng-template #dmTableActionButton let-button let-defaultAction=\"defaultAction\">\n @if (button.buttonType === 'icon') {\n <button\n #rootTrigger=\"matMenuTrigger\"\n mat-icon-button\n [matTooltip]=\"button.tooltip || ''\"\n aria-label=\"{{ button.tooltip }}\"\n [matMenuTriggerFor]=\"button.children && button.children.length > 0 ? tableButtonRootMenu : null\"\n [matMenuTriggerData]=\"{\n buttons: button.children,\n rootTrigger: rootTrigger\n }\"\n (click)=\"\n button.children && button.children.length > 0\n ? null\n : button.onClick\n ? button.onClick(visibleColumns(), datasource())\n : defaultAction\n ? defaultAction($event)\n : null\n \"\n [ngStyle]=\"{ 'background-color': button.backgroundColor ? button.backgroundColor : undefined }\"\n >\n <mat-icon [style.color]=\"button.color ? button.color : undefined\">{{ button.icon }}</mat-icon>\n </button>\n } @else {\n <button\n #rootTrigger=\"matMenuTrigger\"\n [matButton]=\"button.buttonType || 'filled'\"\n [ngStyle]=\"{ 'background-color': button.backgroundColor ? button.backgroundColor : undefined }\"\n aria-label=\"{{ button.label }}\"\n [matTooltip]=\"button.tooltip || ''\"\n [matMenuTriggerFor]=\"button.children && button.children.length > 0 ? tableButtonRootMenu : null\"\n [matMenuTriggerData]=\"{\n buttons: button.children,\n rootTrigger: rootTrigger\n }\"\n (click)=\"\n button.children && button.children.length > 0\n ? null\n : button.onClick\n ? button.onClick(visibleColumns(), datasource())\n : defaultAction\n ? defaultAction($event)\n : null\n \"\n >\n @if (button.icon) {\n <mat-icon class=\"button-icon\" [ngStyle]=\"{ color: button.color ? button.color : undefined }\">{{\n button.icon\n }}</mat-icon>\n }\n <span [ngStyle]=\"{ color: button.color ? button.color : undefined }\">\n {{ button.label }}\n </span>\n </button>\n }\n <!-- @if (button.buttonType === 'icon') {\n <button\n mat-icon-button\n [color]=\"button.color\"\n [matTooltip]=\"button.tooltip || ''\"\n aria-label=\"{{ button.tooltip }}\"\n (click)=\"\n button.children && button.children.length > 0\n ? null\n : button.onClick\n ? button.onClick(datasource())\n : defaultAction\n ? defaultAction()\n : null\n \"\n >\n <mat-icon>{{ button.icon }}</mat-icon>\n </button>\n } @else {\n <button\n [matButton]=\"button.buttonType || 'filled'\"\n [ngStyle]=\"{ 'background-color': button.color ? button.color : undefined }\"\n aria-label=\"{{ button.label }}\"\n [matTooltip]=\"button.tooltip || ''\"\n (click)=\"\n button.children && button.children.length > 0\n ? null\n : button.onClick\n ? button.onClick(datasource())\n : defaultAction\n ? defaultAction()\n : null\n \"\n >\n @if (button.icon) {\n <mat-icon\n class=\"button-icon\"\n [ngStyle]=\"{ color: button.textColor ? button.textColor : undefined }\"\n >{{ button.icon }}</mat-icon\n >\n }\n <span [ngStyle]=\"{ color: button.textColor ? button.textColor : undefined }\">\n {{ button.label }}\n </span>\n </button>\n } -->\n</ng-template>\n\n<!-- MARK: Action Button root menu -->\n<mat-menu #tableButtonRootMenu=\"matMenu\">\n <ng-template matMenuContent let-buttons=\"buttons\" let-rootTrigger=\"rootTrigger\">\n <ng-container\n *ngTemplateOutlet=\"\n tableButtonRecursiveMenu;\n context: { buttons: buttons, rootTrigger: rootTrigger }\n \"\n ></ng-container>\n </ng-template>\n</mat-menu>\n\n<!-- MARK: Action Button recursive menu -->\n<ng-template #tableButtonRecursiveMenu let-buttons=\"buttons\" let-rootTrigger=\"rootTrigger\">\n @for (button of buttons; track $index) { @if (!button.showIf || button.showIf(visibleColumns(),\n datasource())) { @if (button.children?.length) {\n <button\n mat-menu-item\n [matMenuTriggerFor]=\"subMenu\"\n [matMenuTriggerData]=\"{\n buttons: button.children,\n rootTrigger\n }\"\n (click)=\"$event.stopPropagation()\"\n [ngStyle]=\"{ 'background-color': button.backgroundColor ? button.backgroundColor : undefined }\"\n >\n <span style=\"display: flex; align-items: center; width: 100%\">\n @if (button.icon) {\n <mat-icon [style.color]=\"button.color ? button.color : undefined\">{{ button.icon }}</mat-icon>\n }\n <span [style.color]=\"button.color ? button.color : undefined\">{{ button.label }}</span>\n <span class=\"spacer\"></span>\n <mat-icon [style.color]=\"button.color ? button.color : undefined\" class=\"submenu-arrow\"\n >chevron_left</mat-icon\n >\n </span>\n </button>\n\n <mat-menu #subMenu=\"matMenu\">\n <ng-container\n *ngTemplateOutlet=\"\n tableButtonRecursiveMenu;\n context: { buttons: button.children, rootTrigger: rootTrigger }\n \"\n ></ng-container>\n </mat-menu>\n } @else {\n <button\n mat-menu-item\n [matTooltip]=\"button.tooltip || ''\"\n (click)=\"button.onClick?.(visibleColumns(), datasource(), $event, getCloseParentMenusFn(rootTrigger))\"\n [ngStyle]=\"{ 'background-color': button.backgroundColor ? button.backgroundColor : undefined }\"\n >\n @if (button.icon) {\n <mat-icon [style.color]=\"button.color ? button.color : undefined\">{{ button.icon }}</mat-icon>\n }\n <span [style.color]=\"button.color ? button.color : undefined\">{{ button.label }}</span>\n </button>\n }} }\n</ng-template>\n\n<!-- MARK: Row button root menu -->\n<mat-menu #rowButtonRootMenu=\"matMenu\">\n <ng-template matMenuContent let-buttons=\"buttons\" let-row=\"row\" let-rootTrigger=\"rootTrigger\">\n <ng-container\n *ngTemplateOutlet=\"\n rowButtonRecursiveMenu;\n context: { buttons: buttons, row: row, rootTrigger: rootTrigger }\n \"\n ></ng-container>\n </ng-template>\n</mat-menu>\n\n<!-- MARK: Row button recursive menu -->\n<ng-template\n #rowButtonRecursiveMenu\n let-buttons=\"buttons\"\n let-row=\"row\"\n let-rootTrigger=\"rootTrigger\"\n>\n @for (button of buttons; track $index) { @if (button.children?.length) {\n <button\n mat-menu-item\n [matMenuTriggerFor]=\"subMenu\"\n [matMenuTriggerData]=\"{\n buttons: button.children,\n row,\n rootTrigger\n }\"\n (click)=\"$event.stopPropagation()\"\n [ngStyle]=\"{ 'background-color': button.backgroundColor ? button.backgroundColor : undefined }\"\n >\n <span style=\"display: flex; align-items: center; width: 100%\">\n @if (button.icon) {\n <mat-icon [style.color]=\"button.color ? button.color : undefined\">{{ button.icon }}</mat-icon>\n }\n <span [style.color]=\"button.color ? button.color : undefined\">{{ button.label }}</span>\n <span class=\"spacer\"></span>\n <mat-icon [style.color]=\"button.color ? button.color : undefined\" class=\"submenu-arrow\"\n >chevron_left</mat-icon\n >\n </span>\n </button>\n\n <mat-menu #subMenu=\"matMenu\">\n <ng-container\n *ngTemplateOutlet=\"\n rowButtonRecursiveMenu;\n context: { buttons: button.children, row: row, rootTrigger: rootTrigger }\n \"\n ></ng-container>\n </mat-menu>\n\n } @else {\n <button\n mat-menu-item\n [matTooltip]=\"button.tooltip || ''\"\n (click)=\"button.onClick?.(row, $event, getCloseParentMenusFn(rootTrigger))\"\n [ngStyle]=\"{ 'background-color': button.backgroundColor ? button.backgroundColor : undefined }\"\n >\n @if (button.icon) {\n <mat-icon [style.color]=\"button.color ? button.color : undefined\">{{ button.icon }}</mat-icon>\n }\n <span [style.color]=\"button.color ? button.color : undefined\">{{ button.label }}</span>\n </button>\n } }\n</ng-template>\n\n<!-- MARK: Row Action Button template -->\n<ng-template #dmTableRowActionButton let-button let-row=\"row\" let-defaultAction=\"defaultAction\">\n @if (button.buttonType === 'icon') {\n <button\n #rootTrigger=\"matMenuTrigger\"\n mat-icon-button\n [matTooltip]=\"button.tooltip || ''\"\n aria-label=\"{{ button.tooltip }}\"\n [matMenuTriggerFor]=\"button.children && button.children.length > 0 ? rowButtonRootMenu : null\"\n [matMenuTriggerData]=\"{\n buttons: button.children,\n row,\n rootTrigger: rootTrigger\n }\"\n (click)=\"\n button.children && button.children.length > 0\n ? null\n : button.onClick\n ? button.onClick(row)\n : defaultAction\n ? defaultAction($event)\n : null\n \"\n >\n <mat-icon [style.color]=\"button.color ? button.color : undefined\">{{ button.icon }}</mat-icon>\n </button>\n } @else {\n <button\n [matButton]=\"button.buttonType || 'filled'\"\n [ngStyle]=\"{ 'background-color': button.backgroundColor ? button.backgroundColor : undefined }\"\n aria-label=\"{{ button.label }}\"\n [matTooltip]=\"button.tooltip || ''\"\n [matMenuTriggerFor]=\"button.children && button.children.length > 0 ? rowButtonRootMenu : null\"\n #rootTrigger=\"matMenuTrigger\"\n [matMenuTriggerData]=\"{\n buttons: button.children,\n row,\n rootTrigger: rootTrigger\n }\"\n (click)=\"\n button.children && button.children.length > 0\n ? null\n : button.onClick\n ? button.onClick(row)\n : defaultAction\n ? defaultAction($event)\n : null\n \"\n >\n @if (button.icon) {\n <mat-icon class=\"button-icon\" [ngStyle]=\"{ color: button.color ? button.color : undefined }\">{{\n button.icon\n }}</mat-icon>\n }\n <span [ngStyle]=\"{ color: button.color ? button.color : undefined }\">\n {{ button.label }}\n </span>\n </button>\n }\n</ng-template>\n\n<!-- <mat-menu #buttonChildren=\"matMenu\">\n <ng-template matMenuContent let-buttons=\"buttons\" let-row=\"row\">\n @for (button of buttons || []; track $index) { @if (button.children && button.children.length >\n 0) {\n <ng-container *ngTemplateOutlet=\"subMenuTrigger; context: { button, row }\"></ng-container>\n } @else {\n <button\n mat-menu-item\n [matTooltip]=\"button.tooltip || ''\"\n aria-label=\"{{ button.tooltip }}\"\n (click)=\"\n button.children && button.children.length > 0\n ? null\n : button.onClick\n ? button.onClick(row, $event)\n : null\n \"\n >\n @if (button.icon) {\n <mat-icon>{{ button.icon }}</mat-icon>\n }\n <span>{{ button.label }}</span>\n </button>\n } }\n </ng-template>\n</mat-menu>\n\n<ng-template #subMenuTrigger let-button=\"button\" let-row=\"row\">\n <button\n mat-menu-item\n [matMenuTriggerFor]=\"buttonChildren\"\n [matMenuTriggerData]=\"{\n buttons: button.children,\n row\n }\"\n [matTooltip]=\"button.tooltip || ''\"\n aria-label=\"{{ button.tooltip }}\"\n >\n @if (button.icon) {\n <mat-icon>{{ button.icon }}</mat-icon>\n }\n <span>{{ button.label }}</span>\n </button>\n</ng-template> -->\n\n<!-- MARK: Paginator template -->\n<ng-template #paginator>\n <div\n class=\"dm-table-paginator-row\"\n [ngStyle]=\"mergedTableStyle().paginator?.root || {}\"\n [ngClass]=\"tableClasses()?.paginator?.root || {}\"\n >\n <p\n class=\"mb-0\"\n [ngStyle]=\"mergedTableStyle().paginator?.p || {}\"\n [ngClass]=\"tableClasses()?.paginator?.p || {}\"\n >\n {{\n paginatorSettings()?.numberOfItemsPerPageLabel ||\n DEFAULT_PAGINATOR_SETTINGS.numberOfItemsPerPageLabel\n }}\n </p>\n\n <div>\n <mat-form-field\n style=\"width: 100px\"\n class=\"dm-paginator-form-field ms-2 me-2\"\n [appearance]=\"'fill'\"\n [ngStyle]=\"mergedTableStyle().paginator?.mat_form_field || {}\"\n [ngClass]=\"tableClasses()?.paginator?.mat_form_field || {}\"\n >\n <mat-select\n [value]=\"datasource().getPageSize()\"\n [ngStyle]=\"mergedTableStyle().paginator?.mat_select || {}\"\n [ngClass]=\"tableClasses()?.paginator?.mat_select || {}\"\n >\n @for (option of (paginatorSettings()?.pageSizeOptions ||\n DEFAULT_PAGINATOR_SETTINGS.pageSizeOptions); track option) {\n <mat-option\n [value]=\"option\"\n (onSelectionChange)=\"onPageSizeChange($event, option)\"\n [ngStyle]=\"mergedTableStyle().paginator?.mat_option || {}\"\n [ngClass]=\"tableClasses()?.paginator?.mat_option || {}\"\n >{{ option }}</mat-option\n >\n }\n </mat-select>\n </mat-form-field>\n </div>\n\n @if (datasource().getPageSize() > 0) {\n <div class=\"dm-table-paginator-page-info\">\n <p\n [ngClass]=\"tableClasses()?.paginator?.p || {}\"\n [ngStyle]=\"mergedTableStyle().paginator?.p || {}\"\n >\n {{ datasource().getFirstItemIndexInPage() + 1 }}\n </p>\n\n <p\n [ngClass]=\"tableClasses()?.paginator?.p || {}\"\n [ngStyle]=\"mergedTableStyle().paginator?.p || {}\"\n >\n -\n </p>\n\n <p\n [ngClass]=\"tableClasses()?.paginator?.p || {}\"\n [ngStyle]=\"mergedTableStyle().paginator?.p || {}\"\n >\n {{ datasource().getLastItemIndexInPage() + 1 }}\n </p>\n\n <p\n [ngClass]=\"tableClasses()?.paginator?.p || {}\"\n [ngStyle]=\"mergedTableStyle().paginator?.p || {}\"\n >\n \u05DE\u05EA\u05D5\u05DA\n </p>\n\n <p\n [ngClass]=\"tableClasses()?.paginator?.p || {}\"\n [ngStyle]=\"mergedTableStyle().paginator?.p || {}\"\n >\n {{ datasource().getTotalResultElementsCount() }}\n </p>\n </div>\n }\n\n <div>\n @if (paginatorSettings()?.showFirstAndLastPagesButtons ||\n DEFAULT_PAGINATOR_SETTINGS.showFirstAndLastPagesButtons) {\n <button\n [ngStyle]=\"mergedTableStyle().paginator?.button || {}\"\n [ngClass]=\"tableClasses()?.paginator?.button || {}\"\n mat-icon-button\n (click)=\"datasource().firstPage()\"\n [matTooltip]=\"\n paginatorSettings()?.firstPageButtonLabel ||\n DEFAULT_PAGINATOR_SETTINGS.firstPageButtonLabel\n \"\n [matTooltipPosition]=\"'above'\"\n >\n <mat-icon>keyboard_double_arrow_right</mat-icon>\n </button>\n }\n <button\n [ngStyle]=\"mergedTableStyle().paginator?.button || {}\"\n [ngClass]=\"tableClasses()?.paginator?.button || {}\"\n mat-icon-button\n (click)=\"datasource().firstPage()\"\n [matTooltip]=\"\n paginatorSettings()?.previousPageButtonLabel ||\n DEFAULT_PAGINATOR_SETTINGS.previousPageButtonLabel\n \"\n [matTooltipPosition]=\"'above'\"\n >\n <mat-icon>chevron_right</mat-icon>\n </button>\n <button\n [ngStyle]=\"mergedTableStyle().paginator?.button || {}\"\n [ngClass]=\"tableClasses()?.paginator?.button || {}\"\n mat-icon-button\n (click)=\"datasource().nextPage()\"\n [matTooltip]=\"\n paginatorSettings()?.nextPageButtonLabel || DEFAULT_PAGINATOR_SETTINGS.nextPageButtonLabel\n \"\n [matTooltipPosition]=\"'above'\"\n >\n <mat-icon>chevron_left</mat-icon>\n </button>\n @if (paginatorSettings()?.showFirstAndLastPagesButtons ||\n DEFAULT_PAGINATOR_SETTINGS.showFirstAndLastPagesButtons) {\n <button\n [ngStyle]=\"mergedTableStyle().paginator?.button || {}\"\n [ngClass]=\"tableClasses()?.paginator?.button || {}\"\n mat-icon-button\n (click)=\"datasource().lastPage()\"\n [matTooltip]=\"\n paginatorSettings()?.lastPageButtonLabel || DEFAULT_PAGINATOR_SETTINGS.lastPageButtonLabel\n \"\n [matTooltipPosition]=\"'above'\"\n >\n <mat-icon>keyboard_double_arrow_left</mat-icon>\n </button>\n }\n </div>\n </div>\n</ng-template>\n\n<!-- MARK: Edit Columns Visibility Menu Trigger -->\n<ng-template #editcolumnVisibilityMenuTrigger let-button>\n @if (button.buttonType == 'icon') {\n <button\n mat-icon-button\n [matTooltip]=\"button.tooltip || ''\"\n aria-label=\"{{ button.tooltip }}\"\n [matMenuTriggerFor]=\"columnVisibilityMenu\"\n #rootTrigger=\"matMenuTrigger\"\n >\n <mat-icon [style.color]=\"button.textColor ? button.textColor : undefined\">{{\n button.icon\n }}</mat-icon>\n </button>\n } @else {\n <button\n [matButton]=\"button.buttonType || 'filled'\"\n [ngStyle]=\"{ 'background-color': button.color ? button.color : undefined }\"\n aria-label=\"{{ button.label }}\"\n [matTooltip]=\"button.tooltip || ''\"\n [matMenuTriggerFor]=\"columnVisibilityMenu\"\n #rootTrigger=\"matMenuTrigger\"\n >\n @if (button.icon) {\n <mat-icon\n class=\"button-icon\"\n [ngStyle]=\"{ color: button.textColor ? button.textColor : undefined }\"\n >{{ button.icon }}</mat-icon\n >\n }\n <span [style.color]=\"button.textColor ? button.textColor : undefined\">\n {{ button.label }}\n </span>\n </button>\n }\n</ng-template>\n\n<!-- MARK: Edit Columns Visibility Menu -->\n<mat-menu #columnVisibilityMenu=\"matMenu\">\n <div mat-menu-item disableRipple (click)=\"$event.stopPropagation()\">\n <mat-checkbox\n [checked]=\"isAllColumnsVisible()\"\n (change)=\"toggleAllColumnsVisibility($event)\"\n (click)=\"$event.stopPropagation()\"\n >{{ editColumnsVisibilitySelectAllLabel() }}</mat-checkbox\n >\n </div>\n @for (column of runtimeColumns(); track column.id) {\n <div mat-menu-item disableRipple (click)=\"$event.stopPropagation()\">\n <mat-checkbox\n [checked]=\"isColumnVisible(column)\"\n (change)=\"toggleColumnVisibility($event, column)\"\n (click)=\"$event.stopPropagation()\"\n >{{ column.header }}</mat-checkbox\n >\n </div>\n }\n</mat-menu>\n\n<!-- MARK: Input Cell Template -->\n<ng-template #dmTableInputCell let-row let-column=\"column\">\n @switch (column.inputType) { @case ('select') {\n <mat-select\n [dmImportantStyle]=\"getInputStyle(column)\"\n panelWidth=\"null\"\n [value]=\"resolveCellValue(row, column)\"\n >\n @for (option of column.selectOptions || []; track option.value) {\n <mat-option\n [value]=\"option.value\"\n (onSelectionChange)=\"inputCellSelectOptionChangeHandler(row, column, option, $event)\"\n >{{ option.label }}</mat-option\n >\n }\n </mat-select>\n } @case ('checkbox') {\n <mat-checkbox\n [checked]=\"resolveCellValue(row, column)\"\n (change)=\"inputCellCheckboxChangeHandler(row, column, $event)\"\n ></mat-checkbox>\n } @default {\n <input\n [type]=\"column.inputType || 'text'\"\n [value]=\"resolveCellValue(row, column)\"\n (change)=\"inputCellChangeHandler(row, column, $event)\"\n [dmImportantStyle]=\"getInputStyle(column)\"\n />\n } }\n</ng-template>\n\n<!-- MARK: Header Menu Trigger Template -->\n<ng-template #dmTableHeaderMenuTrigger let-column>\n @if (column?.headerMenuItems?.length) {\n <!-- <button\n mat-icon-button\n (click)=\"$event.stopPropagation()\"\n aria-label=\"Column Menu\"\n >\n </button> -->\n <mat-icon\n #rootTrigger=\"matMenuTrigger\"\n [matMenuTriggerFor]=\"dmTableHeaderRootMenu\"\n [matMenuTriggerData]=\"{\n menuItems: column.headerMenuItems,\n rootTrigger: rootTrigger\n }\"\n [matTooltip]=\"column.headerMenuTooltip || ''\"\n style=\"font-size: 20px; cursor: pointer; margin-left: 4px; height: 20px\"\n [ngStyle]=\"{\n color: getHeaderThContentStyle(column)?.color || getHeaderThStyle(column)?.color || ''\n }\"\n >menu</mat-icon\n >\n }\n</ng-template>\n\n<!-- MARK: Header Root Menu -->\n<mat-menu #dmTableHeaderRootMenu=\"matMenu\">\n <ng-template matMenuContent let-menuItems=\"menuItems\" let-rootTrigger=\"rootTrigger\">\n <ng-container\n *ngTemplateOutlet=\"\n dmTableHeaderRecursiveMenu;\n context: { menuItems: menuItems, rootTrigger: rootTrigger }\n \"\n ></ng-container>\n </ng-template>\n</mat-menu>\n\n<!-- MARK: Header Recursive Menu -->\n<ng-template #dmTableHeaderRecursiveMenu let-menuItems=\"menuItems\" let-rootTrigger=\"rootTrigger\">\n @for (menuItem of menuItems; track $index) { @if (!menuItem.showIf || (menuItem.showIf &&\n menuItem.showIf(datasource()))) {@if (menuItem.children?.length) {\n <button\n mat-menu-item\n [matMenuTriggerFor]=\"dmTableHeaderSubMenu\"\n [matMenuTriggerData]=\"{\n menuItems: menuItem.children,\n rootTrigger\n }\"\n (click)=\"$event.stopPropagation()\"\n [ngStyle]=\"{\n 'background-color': menuItem.backgroundColor ? menuItem.backgroundColor : undefined\n }\"\n >\n <span style=\"display: flex; align-items: center; width: 100%\">\n @if (menuItem.icon) {\n <mat-icon [style.color]=\"menuItem.color ? menuItem.color : undefined\">{{\n menuItem.icon\n }}</mat-icon>\n }\n <span [style.color]=\"menuItem.color ? menuItem.color : undefined\">{{ menuItem.label }}</span>\n <span class=\"spacer\"></span>\n <mat-icon [style.color]=\"menuItem.color ? menuItem.color : undefined\" class=\"submenu-arrow\"\n >chevron_left</mat-icon\n >\n </span>\n </button>\n\n <mat-menu #dmTableHeaderSubMenu=\"matMenu\">\n <ng-container\n *ngTemplateOutlet=\"\n dmTableHeaderRecursiveMenu;\n context: { menuItems: menuItem.children, rootTrigger: rootTrigger }\n \"\n />\n </mat-menu>\n } @else {\n <button\n mat-menu-item\n [matTooltip]=\"menuItem.tooltip || ''\"\n (click)=\"menuItem.onClick?.(datasource(), $event, getCloseParentMenusFn(rootTrigger))\"\n [ngStyle]=\"{\n 'background-color': menuItem.backgroundColor ? menuItem.backgroundColor : undefined\n }\"\n >\n @if (menuItem.icon) {\n <mat-icon [style.color]=\"menuItem.color ? menuItem.color : undefined\">{{\n menuItem.icon\n }}</mat-icon>\n }\n <span [style.color]=\"menuItem.color ? menuItem.color : undefined\">{{ menuItem.label }}</span>\n </button>\n } }}\n</ng-template>\n", styles: ["#dm-table-component-wrapper{width:100%}#dm-table-component-wrapper ::-webkit-scrollbar{width:var(--dm-table-scrollbar-width, 7px);height:var(--dm-table-scrollbar-width, 7px)}#dm-table-component-wrapper ::-webkit-scrollbar-track{background:var(--dm-table-scrollbar-background-color, #e0e0e0)}#dm-table-component-wrapper ::-webkit-scrollbar-thumb{background:var(--dm-table-scrollbar-color, #949496);border-radius:var(--dm-table-scrollbar-border-radius, 4px)}#dm-table-component-wrapper ::-webkit-scrollbar-thumb:hover{background:var(--dm-table-scrollbar-hover-color, #5f5f5f)}#dm-table-component-wrapper .dm-table-top-section{width:calc(100% - 10px);display:flex;align-items:center;padding:0 5px;gap:5px;flex-wrap:wrap}#dm-table-component-wrapper .dm-table-table-wrapper .dm-table-classic{width:100%;border-collapse:collapse;border-spacing:0;box-shadow:0 5px 5px -3px #003,0 8px 10px 1px #00000024,0 3px 14px 2px #0000001f;padding:0;font-size:1rem;border-radius:8px;page-break-inside:auto}#dm-table-component-wrapper .dm-table-table-wrapper .dm-table-classic tr{page-break-inside:avoid}#dm-table-component-wrapper .dm-table-table-wrapper .dm-table-classic th,#dm-table-component-wrapper .dm-table-table-wrapper .dm-table-classic td{text-align:start;max-width:none}#dm-table-component-wrapper .inner-header-cell{display:flex;align-items:center;gap:5px}#dm-table-component-wrapper .dm-table-no-data{width:98%;margin:10px auto 0;line-height:60px;display:flex;justify-content:center;align-items:center;padding:10px;font-size:1.5rem;font-weight:700;color:#dd2f2f;box-shadow:0 4px 6px #000000d7}#dm-table-component-wrapper .dm-table-paginator-row{display:flex;flex-wrap:wrap;justify-content:center;align-items:center;gap:5px}#dm-table-component-wrapper .dm-table-paginator-row .dm-table-paginator-page-info{display:flex;align-items:center;gap:5px}:host ::ng-deep .dm-paginator-form-field>.mat-mdc-form-field-bottom-align:before{content:\"\";display:none;height:0px}:host ::ng-deep .dm-table-search-form-field>.mat-mdc-form-field-bottom-align:before{content:\"\";display:none;height:0px}.cdk-drag-preview{border:none;box-sizing:border-box;background-color:var(--dm-table-header-background-color, #f5f5f5);color:var(--dm-table-header-color, #000000);border-radius:4px;box-shadow:0 5px 5px -3px #0003,0 8px 10px 1px #00000024,0 3px 14px 2px #0000001f}.cdk-drag-preview .inner-header-cell{display:flex;align-items:center}.spacer{flex-grow:1}\n"] }]
2182
+ ], template: "<div id=\"dm-table-component-wrapper\">\n <div class=\"dm-table-top-section\">\n @if (enableSearch()) {\n <mat-form-field [appearance]=\"searchInputAppearance()\" class=\"dm-table-search-form-field\">\n <input\n matInput\n [placeholder]=\"searchPlaceholder()\"\n [(ngModel)]=\"searchTerm\"\n [ngModelOptions]=\"{ standalone: true }\"\n (keyup)=\"datasource().search($event.target.value)\"\n />\n @if (searchTerm()) {\n <button\n matSuffix\n mat-icon-button\n [matTooltip]=\"clearSearchTooltip()\"\n aria-label=\"Clear\"\n (click)=\"resetSearch()\"\n >\n <mat-icon>close</mat-icon>\n </button>\n }\n </mat-form-field>\n } @if (editColumnsVisibility() && editColumnsVisibilityButton()) {\n <ng-container\n *ngTemplateOutlet=\"\n editcolumnVisibilityMenuTrigger;\n context: { $implicit: editColumnsVisibilityButton() }\n \"\n ></ng-container>\n }\n <div class=\"spacer\"></div>\n @if (enablePrint()) {\n <ng-container\n *ngTemplateOutlet=\"\n dmTableActionButton;\n context: { $implicit: printButton(), defaultAction: printTable }\n \"\n ></ng-container>\n } @for (button of actionButtons(); track $index) { @if (!button.showIf ||\n button.showIf(visibleColumns(), datasource())) {\n <ng-container\n *ngTemplateOutlet=\"dmTableActionButton; context: { $implicit: button }\"\n ></ng-container>\n } }\n </div>\n <div\n [ngClass]=\"tableClasses()?.tableWrapper || {}\"\n [dmImportantStyle]=\"mergedTableStyle().tableWrapper || DEFAULT_TABLE_STYLE.tableWrapper || {}\"\n cdkScrollable\n >\n <table\n [ngStyle]=\"\n !tableClasses()?.table?.root\n ? mergedTableStyle().table?.root || DEFAULT_TABLE_STYLE.table?.root || {}\n : {}\n \"\n [ngClass]=\"tableClasses()?.table?.root || {}\"\n >\n <thead\n style=\"\n position: sticky !important;\n top: 0 !important;\n z-index: 10 !important;\n box-shadow: 0px 2px 2px 0px #0000006e;\n \"\n [ngStyle]=\"\n !tableClasses()?.table?.thead?.root\n ? mergedTableStyle().table?.thead?.root || DEFAULT_TABLE_STYLE.table?.thead?.root || {}\n : {}\n \"\n [ngClass]=\"tableClasses()?.table?.thead?.root || {}\"\n >\n @if (enableLoadingProgressbar()) {\n <tr style=\"height: 4px !important; max-height: 4px !important; line-height: 4px !important\">\n <th [attr.colspan]=\"visibleRuntimeColumns().length\" style=\"padding: 0 !important\">\n @if (datasource().isLoading()) {\n <mat-progress-bar mode=\"indeterminate\"></mat-progress-bar>\n }\n </th>\n </tr>\n }\n <tr\n [ngStyle]=\"\n !tableClasses()?.table?.thead?.tr\n ? mergedTableStyle().table?.thead?.tr || DEFAULT_TABLE_STYLE.table?.thead?.tr || {}\n : {}\n \"\n [ngClass]=\"tableClasses()?.table?.thead?.tr || {}\"\n cdkDropList\n [cdkDropListData]=\"visibleRuntimeColumns()\"\n [cdkDropListOrientation]=\"'horizontal'\"\n (cdkDropListDropped)=\"onColumnDrop($event)\"\n [cdkDropListAutoScrollStep]=\"20\"\n >\n @for (column of visibleRuntimeColumns(); let j = $index; track column.id) {\n <th\n cdkDrag\n [cdkDragDisabled]=\"!enableColumnsDragAndDrop()\"\n [ngStyle]=\"getHeaderThStyle(column)\"\n [ngClass]=\"tableClasses()?.table?.thead?.th || {}\"\n (mouseenter)=\"hoveredColumnHeaderIndex.set(j)\"\n (mouseleave)=\"hoveredColumnHeaderIndex.set(null)\"\n (click)=\"headerClickHandler(column, $event)\"\n (dblclick)=\"headerDoubleClickHandler(column, $event)\"\n (contextmenu)=\"headerContextMenuHandler(column, $event)\"\n >\n <div\n class=\"inner-header-cell\"\n [dmImportantStyle]=\"getHeaderThContentStyle(column)\"\n (click)=\"headerContentClickHandler(column, $event)\"\n (dblclick)=\"headerContentDoubleClickHandler(column, $event)\"\n (contextmenu)=\"headerContentContextMenuHandler(column, $event)\"\n >\n <span>\n {{ column.header }}\n </span>\n @if (column.sortable) {\n <span\n (click)=\"columnHeaderSortClickHandler(column, $event)\"\n style=\"display: flex; align-items: center\"\n >\n @if (isColumnSorted(column); as sort) {\n <mat-icon style=\"width: 20px; height: 20px; font-size: 20px\">{{\n sort.direction === 'asc' ? 'arrow_upward' : 'arrow_downward'\n }}</mat-icon>\n @if(columnsSortState().length > 1) { [{{ sort.index + 1 }}] } } @else if\n (hoveredColumnHeaderIndex() == j){\n <mat-icon style=\"opacity: 0.3; width: 20px; height: 20px; font-size: 20px\"\n >arrow_upward</mat-icon\n >\n }\n </span>\n } @if (enableColumnsDragHandle() && enableColumnsDragAndDrop()) {\n\n <div class=\"spacer\"></div>\n <span>\n <ng-container\n *ngTemplateOutlet=\"dmTableHeaderMenuTrigger; context: { $implicit: column }\"\n />\n </span>\n <mat-icon style=\"cursor: move; font-size: 20px\" cdkDragHandle\n >drag_indicator</mat-icon\n >\n }\n </div>\n </th>\n }\n </tr>\n </thead>\n <tbody\n [dmImportantStyle]=\"\n !tableClasses()?.table?.tbody?.root\n ? mergedTableStyle().table?.tbody?.root || DEFAULT_TABLE_STYLE.table?.tbody?.root || {}\n : {}\n \"\n [ngClass]=\"tableClasses()?.table?.tbody?.root || {}\"\n >\n @for (row of datasource().result(); let i = $index; track row[rowIdentifierField()]) {\n <tr\n [dmImportantStyle]=\"getBodyRowStyle(i, row)\"\n (mouseenter)=\"hoveredRowIndex.set(i)\"\n (mouseleave)=\"hoveredRowIndex.set(null)\"\n >\n @for (column of visibleRuntimeColumns(); let j = $index; track j) {\n <td\n [dmImportantStyle]=\"getBodyTdStyle(i, column, row)\"\n (click)=\"cellClickHandler(row, column, $event)\"\n (contextmenu)=\"cellContextMenuHandler(row, column, $event)\"\n (dblclick)=\"cellDoubleClickHandler(row, column, $event)\"\n >\n <span\n [dmImportantStyle]=\"getBodyTdContentStyle(i, column, row)\"\n (click)=\"cellContentClickHandler(row, column, $event)\"\n (contextmenu)=\"cellContentContextMenuHandler(row, column, $event)\"\n (dblclick)=\"cellContentDoubleClickHandler(row, column, $event)\"\n >\n @switch (column.type) { @case ('$index') {\n {{ datasource().getFirstItemIndexInPage() + i + 1 }}\n } @case ('component') { @if (column.component) {\n <dm-table-cell-host\n [component]=\"column.component\"\n [context]=\"createCellContext(row, column)\"\n ></dm-table-cell-host>\n } } @case ('tel') {\n <a [href]=\"'tel:' + (column.field ? $any(row)[column.field] : '')\">{{\n resolveCellValue(row, column)\n }}</a>\n } @case ('mail') {\n <a [href]=\"'mailto:' + (column.field ? $any(row)[column.field] : '')\">{{\n resolveCellValue(row, column)\n }}</a>\n } @case ('link') {\n <a\n [href]=\"column.field ? $any(row)[column.field] : ''\"\n target=\"_blank\"\n rel=\"noopener noreferrer\"\n >{{ resolveCellValue(row, column) }}</a\n >\n } @case ('whatsapp') {\n <a\n [href]=\"'https://wa.me/' + (column.field ? $any(row)[column.field] : '')\"\n target=\"_blank\"\n rel=\"noopener noreferrer\"\n >{{ resolveCellValue(row, column) }}</a\n >\n } @case ('customHtml') { @if (column.customHtml) {\n <span [innerHTML]=\"column.customHtml\"></span>\n } @else if (column.customCellTemplate) {\n <ng-container\n *ngTemplateOutlet=\"\n column.customCellTemplate;\n context: createCellContext(row, column)\n \"\n >\n </ng-container>\n } } @case ('actions') {\n <span style=\"display: flex; align-items: center\">\n @for (button of column.actionsButtons || []; track $index) {\n <ng-container\n *ngTemplateOutlet=\"\n dmTableRowActionButton;\n context: {\n $implicit: button,\n row\n }\n \"\n ></ng-container>\n }\n </span>\n } @case('slideToggle') {\n <mat-slide-toggle\n [id]=\"'slideToggle_' + i + '_' + column.id\"\n [checked]=\"$any(row)[column.field!]\"\n [matTooltip]=\"getSlideToggleTooltip(row, column)\"\n (change)=\"onSlideToggleChange(row, column, $event)\"\n >\n <!-- {{ row[column.field!] }} -->\n {{ resolveCellValue(row, column) }}\n </mat-slide-toggle>\n } @case ('input') {\n <ng-container\n *ngTemplateOutlet=\"\n dmTableInputCell;\n context: {\n $implicit: row,\n column: column\n }\n \"\n />\n } @default {\n {{ resolveCellValue(row, column) }}\n } }\n </span>\n </td>\n }\n </tr>\n }\n </tbody>\n @if (enableTotalRow() && datasource().result().length > 0) {\n <tfoot\n style=\"\n position: sticky !important;\n bottom: 0 !important;\n z-index: 10 !important;\n box-shadow: 0px -2px 2px 0px #0000006e;\n \"\n [ngStyle]=\"\n !tableClasses()?.table?.tfoot?.root\n ? mergedTableStyle().table?.tfoot?.root || DEFAULT_TABLE_STYLE.table?.tfoot?.root || {}\n : {}\n \"\n [ngClass]=\"tableClasses()?.table?.tfoot?.root || {}\"\n >\n <tr>\n @for (column of visibleRuntimeColumns(); let j = $index; track column.id) {\n <td\n [ngStyle]=\"getFooterTdStyle(column)\"\n [ngClass]=\"tableClasses()?.table?.tfoot?.td || {}\"\n >\n @if (column.totalRowValueType == 'html') {\n <span [innerHTML]=\"totalRowValues().get(column.id) || ''\"></span>\n } @else {\n {{ totalRowValues().get(column.id) || '' }}\n }\n </td>\n }\n </tr>\n </tfoot>\n }\n </table>\n </div>\n @if (datasource().result().length === 0) {\n <div class=\"dm-table-no-data\">\n <span>{{ noDataMessage() }}</span>\n </div>\n } @else { @if (datasource().isPaginationEnabled()) {\n <ng-container [ngTemplateOutlet]=\"paginator\" />\n } }\n</div>\n\n<!-- MARK: Action Button template -->\n<ng-template #dmTableActionButton let-button let-defaultAction=\"defaultAction\">\n @if (button.buttonType === 'icon') {\n <button\n #rootTrigger=\"matMenuTrigger\"\n mat-icon-button\n [matTooltip]=\"button.tooltip || ''\"\n aria-label=\"{{ button.tooltip }}\"\n [matMenuTriggerFor]=\"button.children && button.children.length > 0 ? tableButtonRootMenu : null\"\n [matMenuTriggerData]=\"{\n buttons: button.children,\n rootTrigger: rootTrigger\n }\"\n (click)=\"\n button.children && button.children.length > 0\n ? null\n : button.onClick\n ? button.onClick(visibleColumns(), datasource())\n : defaultAction\n ? defaultAction($event)\n : null\n \"\n [ngStyle]=\"{ 'background-color': button.backgroundColor ? button.backgroundColor : undefined }\"\n >\n <mat-icon [style.color]=\"button.color ? button.color : undefined\">{{ button.icon }}</mat-icon>\n </button>\n } @else {\n <button\n #rootTrigger=\"matMenuTrigger\"\n [matButton]=\"button.buttonType || 'filled'\"\n [ngStyle]=\"{ 'background-color': button.backgroundColor ? button.backgroundColor : undefined }\"\n aria-label=\"{{ button.label }}\"\n [matTooltip]=\"button.tooltip || ''\"\n [matMenuTriggerFor]=\"button.children && button.children.length > 0 ? tableButtonRootMenu : null\"\n [matMenuTriggerData]=\"{\n buttons: button.children,\n rootTrigger: rootTrigger\n }\"\n (click)=\"\n button.children && button.children.length > 0\n ? null\n : button.onClick\n ? button.onClick(visibleColumns(), datasource())\n : defaultAction\n ? defaultAction($event)\n : null\n \"\n >\n @if (button.icon) {\n <mat-icon class=\"button-icon\" [ngStyle]=\"{ color: button.color ? button.color : undefined }\">{{\n button.icon\n }}</mat-icon>\n }\n <span [ngStyle]=\"{ color: button.color ? button.color : undefined }\">\n {{ button.label }}\n </span>\n </button>\n }\n <!-- @if (button.buttonType === 'icon') {\n <button\n mat-icon-button\n [color]=\"button.color\"\n [matTooltip]=\"button.tooltip || ''\"\n aria-label=\"{{ button.tooltip }}\"\n (click)=\"\n button.children && button.children.length > 0\n ? null\n : button.onClick\n ? button.onClick(datasource())\n : defaultAction\n ? defaultAction()\n : null\n \"\n >\n <mat-icon>{{ button.icon }}</mat-icon>\n </button>\n } @else {\n <button\n [matButton]=\"button.buttonType || 'filled'\"\n [ngStyle]=\"{ 'background-color': button.color ? button.color : undefined }\"\n aria-label=\"{{ button.label }}\"\n [matTooltip]=\"button.tooltip || ''\"\n (click)=\"\n button.children && button.children.length > 0\n ? null\n : button.onClick\n ? button.onClick(datasource())\n : defaultAction\n ? defaultAction()\n : null\n \"\n >\n @if (button.icon) {\n <mat-icon\n class=\"button-icon\"\n [ngStyle]=\"{ color: button.textColor ? button.textColor : undefined }\"\n >{{ button.icon }}</mat-icon\n >\n }\n <span [ngStyle]=\"{ color: button.textColor ? button.textColor : undefined }\">\n {{ button.label }}\n </span>\n </button>\n } -->\n</ng-template>\n\n<!-- MARK: Action Button root menu -->\n<mat-menu #tableButtonRootMenu=\"matMenu\">\n <ng-template matMenuContent let-buttons=\"buttons\" let-rootTrigger=\"rootTrigger\">\n <ng-container\n *ngTemplateOutlet=\"\n tableButtonRecursiveMenu;\n context: { buttons: buttons, rootTrigger: rootTrigger }\n \"\n ></ng-container>\n </ng-template>\n</mat-menu>\n\n<!-- MARK: Action Button recursive menu -->\n<ng-template #tableButtonRecursiveMenu let-buttons=\"buttons\" let-rootTrigger=\"rootTrigger\">\n @for (button of buttons; track $index) { @if (!button.showIf || button.showIf(visibleColumns(),\n datasource())) { @if (button.children?.length) {\n <button\n mat-menu-item\n [matMenuTriggerFor]=\"subMenu\"\n [matMenuTriggerData]=\"{\n buttons: button.children,\n rootTrigger\n }\"\n (click)=\"$event.stopPropagation()\"\n [ngStyle]=\"{ 'background-color': button.backgroundColor ? button.backgroundColor : undefined }\"\n >\n <span style=\"display: flex; align-items: center; width: 100%\">\n @if (button.icon) {\n <mat-icon [style.color]=\"button.color ? button.color : undefined\">{{ button.icon }}</mat-icon>\n }\n <span [style.color]=\"button.color ? button.color : undefined\">{{ button.label }}</span>\n <span class=\"spacer\"></span>\n <mat-icon [style.color]=\"button.color ? button.color : undefined\" class=\"submenu-arrow\"\n >chevron_left</mat-icon\n >\n </span>\n </button>\n\n <mat-menu #subMenu=\"matMenu\">\n <ng-container\n *ngTemplateOutlet=\"\n tableButtonRecursiveMenu;\n context: { buttons: button.children, rootTrigger: rootTrigger }\n \"\n ></ng-container>\n </mat-menu>\n } @else {\n <button\n mat-menu-item\n [matTooltip]=\"button.tooltip || ''\"\n (click)=\"button.onClick?.(visibleColumns(), datasource(), $event, getCloseParentMenusFn(rootTrigger))\"\n [ngStyle]=\"{ 'background-color': button.backgroundColor ? button.backgroundColor : undefined }\"\n >\n @if (button.icon) {\n <mat-icon [style.color]=\"button.color ? button.color : undefined\">{{ button.icon }}</mat-icon>\n }\n <span [style.color]=\"button.color ? button.color : undefined\">{{ button.label }}</span>\n </button>\n }} }\n</ng-template>\n\n<!-- MARK: Row button root menu -->\n<mat-menu #rowButtonRootMenu=\"matMenu\">\n <ng-template matMenuContent let-buttons=\"buttons\" let-row=\"row\" let-rootTrigger=\"rootTrigger\">\n <ng-container\n *ngTemplateOutlet=\"\n rowButtonRecursiveMenu;\n context: { buttons: buttons, row: row, rootTrigger: rootTrigger }\n \"\n ></ng-container>\n </ng-template>\n</mat-menu>\n\n<!-- MARK: Row button recursive menu -->\n<ng-template\n #rowButtonRecursiveMenu\n let-buttons=\"buttons\"\n let-row=\"row\"\n let-rootTrigger=\"rootTrigger\"\n>\n @for (button of buttons; track $index) { @if (button.children?.length) {\n <button\n mat-menu-item\n [matMenuTriggerFor]=\"subMenu\"\n [matMenuTriggerData]=\"{\n buttons: button.children,\n row,\n rootTrigger\n }\"\n (click)=\"$event.stopPropagation()\"\n [ngStyle]=\"{ 'background-color': button.backgroundColor ? button.backgroundColor : undefined }\"\n >\n <span style=\"display: flex; align-items: center; width: 100%\">\n @if (button.icon) {\n <mat-icon [style.color]=\"button.color ? button.color : undefined\">{{ button.icon }}</mat-icon>\n }\n <span [style.color]=\"button.color ? button.color : undefined\">{{ button.label }}</span>\n <span class=\"spacer\"></span>\n <mat-icon [style.color]=\"button.color ? button.color : undefined\" class=\"submenu-arrow\"\n >chevron_left</mat-icon\n >\n </span>\n </button>\n\n <mat-menu #subMenu=\"matMenu\">\n <ng-container\n *ngTemplateOutlet=\"\n rowButtonRecursiveMenu;\n context: { buttons: button.children, row: row, rootTrigger: rootTrigger }\n \"\n ></ng-container>\n </mat-menu>\n\n } @else {\n <button\n mat-menu-item\n [matTooltip]=\"button.tooltip || ''\"\n (click)=\"button.onClick?.(row, $event, getCloseParentMenusFn(rootTrigger))\"\n [ngStyle]=\"{ 'background-color': button.backgroundColor ? button.backgroundColor : undefined }\"\n >\n @if (button.icon) {\n <mat-icon [style.color]=\"button.color ? button.color : undefined\">{{ button.icon }}</mat-icon>\n }\n <span [style.color]=\"button.color ? button.color : undefined\">{{ button.label }}</span>\n </button>\n } }\n</ng-template>\n\n<!-- MARK: Row Action Button template -->\n<ng-template #dmTableRowActionButton let-button let-row=\"row\" let-defaultAction=\"defaultAction\">\n @if (button.buttonType === 'icon') {\n <button\n #rootTrigger=\"matMenuTrigger\"\n mat-icon-button\n [matTooltip]=\"button.tooltip || ''\"\n aria-label=\"{{ button.tooltip }}\"\n [matMenuTriggerFor]=\"button.children && button.children.length > 0 ? rowButtonRootMenu : null\"\n [matMenuTriggerData]=\"{\n buttons: button.children,\n row,\n rootTrigger: rootTrigger\n }\"\n (click)=\"\n button.children && button.children.length > 0\n ? null\n : button.onClick\n ? button.onClick(row)\n : defaultAction\n ? defaultAction($event)\n : null\n \"\n >\n <mat-icon [style.color]=\"button.color ? button.color : undefined\">{{ button.icon }}</mat-icon>\n </button>\n } @else {\n <button\n [matButton]=\"button.buttonType || 'filled'\"\n [ngStyle]=\"{ 'background-color': button.backgroundColor ? button.backgroundColor : undefined }\"\n aria-label=\"{{ button.label }}\"\n [matTooltip]=\"button.tooltip || ''\"\n [matMenuTriggerFor]=\"button.children && button.children.length > 0 ? rowButtonRootMenu : null\"\n #rootTrigger=\"matMenuTrigger\"\n [matMenuTriggerData]=\"{\n buttons: button.children,\n row,\n rootTrigger: rootTrigger\n }\"\n (click)=\"\n button.children && button.children.length > 0\n ? null\n : button.onClick\n ? button.onClick(row)\n : defaultAction\n ? defaultAction($event)\n : null\n \"\n >\n @if (button.icon) {\n <mat-icon class=\"button-icon\" [ngStyle]=\"{ color: button.color ? button.color : undefined }\">{{\n button.icon\n }}</mat-icon>\n }\n <span [ngStyle]=\"{ color: button.color ? button.color : undefined }\">\n {{ button.label }}\n </span>\n </button>\n }\n</ng-template>\n\n<!-- <mat-menu #buttonChildren=\"matMenu\">\n <ng-template matMenuContent let-buttons=\"buttons\" let-row=\"row\">\n @for (button of buttons || []; track $index) { @if (button.children && button.children.length >\n 0) {\n <ng-container *ngTemplateOutlet=\"subMenuTrigger; context: { button, row }\"></ng-container>\n } @else {\n <button\n mat-menu-item\n [matTooltip]=\"button.tooltip || ''\"\n aria-label=\"{{ button.tooltip }}\"\n (click)=\"\n button.children && button.children.length > 0\n ? null\n : button.onClick\n ? button.onClick(row, $event)\n : null\n \"\n >\n @if (button.icon) {\n <mat-icon>{{ button.icon }}</mat-icon>\n }\n <span>{{ button.label }}</span>\n </button>\n } }\n </ng-template>\n</mat-menu>\n\n<ng-template #subMenuTrigger let-button=\"button\" let-row=\"row\">\n <button\n mat-menu-item\n [matMenuTriggerFor]=\"buttonChildren\"\n [matMenuTriggerData]=\"{\n buttons: button.children,\n row\n }\"\n [matTooltip]=\"button.tooltip || ''\"\n aria-label=\"{{ button.tooltip }}\"\n >\n @if (button.icon) {\n <mat-icon>{{ button.icon }}</mat-icon>\n }\n <span>{{ button.label }}</span>\n </button>\n</ng-template> -->\n\n<!-- MARK: Paginator template -->\n<ng-template #paginator>\n <div\n class=\"dm-table-paginator-row\"\n [ngStyle]=\"mergedTableStyle().paginator?.root || {}\"\n [ngClass]=\"tableClasses()?.paginator?.root || {}\"\n >\n <p\n class=\"mb-0\"\n [ngStyle]=\"mergedTableStyle().paginator?.p || {}\"\n [ngClass]=\"tableClasses()?.paginator?.p || {}\"\n >\n {{\n paginatorSettings()?.numberOfItemsPerPageLabel ||\n DEFAULT_PAGINATOR_SETTINGS.numberOfItemsPerPageLabel\n }}\n </p>\n\n <div>\n <mat-form-field\n style=\"width: 100px\"\n class=\"dm-paginator-form-field ms-2 me-2\"\n [appearance]=\"'fill'\"\n [ngStyle]=\"mergedTableStyle().paginator?.mat_form_field || {}\"\n [ngClass]=\"tableClasses()?.paginator?.mat_form_field || {}\"\n >\n <mat-select\n [value]=\"datasource().getPageSize()\"\n [ngStyle]=\"mergedTableStyle().paginator?.mat_select || {}\"\n [ngClass]=\"tableClasses()?.paginator?.mat_select || {}\"\n >\n @for (option of (paginatorSettings()?.pageSizeOptions ||\n DEFAULT_PAGINATOR_SETTINGS.pageSizeOptions); track option) {\n <mat-option\n [value]=\"option\"\n (onSelectionChange)=\"onPageSizeChange($event, option)\"\n [ngStyle]=\"mergedTableStyle().paginator?.mat_option || {}\"\n [ngClass]=\"tableClasses()?.paginator?.mat_option || {}\"\n >{{ option }}</mat-option\n >\n }\n </mat-select>\n </mat-form-field>\n </div>\n\n @if (datasource().getPageSize() > 0) {\n <div class=\"dm-table-paginator-page-info\">\n <p\n [ngClass]=\"tableClasses()?.paginator?.p || {}\"\n [ngStyle]=\"mergedTableStyle().paginator?.p || {}\"\n >\n {{ datasource().getFirstItemIndexInPage() + 1 }}\n </p>\n\n <p\n [ngClass]=\"tableClasses()?.paginator?.p || {}\"\n [ngStyle]=\"mergedTableStyle().paginator?.p || {}\"\n >\n -\n </p>\n\n <p\n [ngClass]=\"tableClasses()?.paginator?.p || {}\"\n [ngStyle]=\"mergedTableStyle().paginator?.p || {}\"\n >\n {{ datasource().getLastItemIndexInPage() + 1 }}\n </p>\n\n <p\n [ngClass]=\"tableClasses()?.paginator?.p || {}\"\n [ngStyle]=\"mergedTableStyle().paginator?.p || {}\"\n >\n \u05DE\u05EA\u05D5\u05DA\n </p>\n\n <p\n [ngClass]=\"tableClasses()?.paginator?.p || {}\"\n [ngStyle]=\"mergedTableStyle().paginator?.p || {}\"\n >\n {{ datasource().getTotalResultElementsCount() }}\n </p>\n </div>\n }\n\n <div>\n @if (paginatorSettings()?.showFirstAndLastPagesButtons ||\n DEFAULT_PAGINATOR_SETTINGS.showFirstAndLastPagesButtons) {\n <button\n [ngStyle]=\"mergedTableStyle().paginator?.button || {}\"\n [ngClass]=\"tableClasses()?.paginator?.button || {}\"\n mat-icon-button\n (click)=\"datasource().firstPage()\"\n [matTooltip]=\"\n paginatorSettings()?.firstPageButtonLabel ||\n DEFAULT_PAGINATOR_SETTINGS.firstPageButtonLabel\n \"\n [matTooltipPosition]=\"'above'\"\n >\n <mat-icon>keyboard_double_arrow_right</mat-icon>\n </button>\n }\n <button\n [ngStyle]=\"mergedTableStyle().paginator?.button || {}\"\n [ngClass]=\"tableClasses()?.paginator?.button || {}\"\n mat-icon-button\n (click)=\"datasource().firstPage()\"\n [matTooltip]=\"\n paginatorSettings()?.previousPageButtonLabel ||\n DEFAULT_PAGINATOR_SETTINGS.previousPageButtonLabel\n \"\n [matTooltipPosition]=\"'above'\"\n >\n <mat-icon>chevron_right</mat-icon>\n </button>\n <button\n [ngStyle]=\"mergedTableStyle().paginator?.button || {}\"\n [ngClass]=\"tableClasses()?.paginator?.button || {}\"\n mat-icon-button\n (click)=\"datasource().nextPage()\"\n [matTooltip]=\"\n paginatorSettings()?.nextPageButtonLabel || DEFAULT_PAGINATOR_SETTINGS.nextPageButtonLabel\n \"\n [matTooltipPosition]=\"'above'\"\n >\n <mat-icon>chevron_left</mat-icon>\n </button>\n @if (paginatorSettings()?.showFirstAndLastPagesButtons ||\n DEFAULT_PAGINATOR_SETTINGS.showFirstAndLastPagesButtons) {\n <button\n [ngStyle]=\"mergedTableStyle().paginator?.button || {}\"\n [ngClass]=\"tableClasses()?.paginator?.button || {}\"\n mat-icon-button\n (click)=\"datasource().lastPage()\"\n [matTooltip]=\"\n paginatorSettings()?.lastPageButtonLabel || DEFAULT_PAGINATOR_SETTINGS.lastPageButtonLabel\n \"\n [matTooltipPosition]=\"'above'\"\n >\n <mat-icon>keyboard_double_arrow_left</mat-icon>\n </button>\n }\n </div>\n </div>\n</ng-template>\n\n<!-- MARK: Edit Columns Visibility Menu Trigger -->\n<ng-template #editcolumnVisibilityMenuTrigger let-button>\n @if (button.buttonType == 'icon') {\n <button\n mat-icon-button\n [matTooltip]=\"button.tooltip || ''\"\n aria-label=\"{{ button.tooltip }}\"\n [matMenuTriggerFor]=\"columnVisibilityMenu\"\n #rootTrigger=\"matMenuTrigger\"\n >\n <mat-icon [style.color]=\"button.textColor ? button.textColor : undefined\">{{\n button.icon\n }}</mat-icon>\n </button>\n } @else {\n <button\n [matButton]=\"button.buttonType || 'filled'\"\n [ngStyle]=\"{ 'background-color': button.color ? button.color : undefined }\"\n aria-label=\"{{ button.label }}\"\n [matTooltip]=\"button.tooltip || ''\"\n [matMenuTriggerFor]=\"columnVisibilityMenu\"\n #rootTrigger=\"matMenuTrigger\"\n >\n @if (button.icon) {\n <mat-icon\n class=\"button-icon\"\n [ngStyle]=\"{ color: button.textColor ? button.textColor : undefined }\"\n >{{ button.icon }}</mat-icon\n >\n }\n <span [style.color]=\"button.textColor ? button.textColor : undefined\">\n {{ button.label }}\n </span>\n </button>\n }\n</ng-template>\n\n<!-- MARK: Edit Columns Visibility Menu -->\n<mat-menu #columnVisibilityMenu=\"matMenu\">\n <div mat-menu-item disableRipple (click)=\"$event.stopPropagation()\">\n <mat-checkbox\n [checked]=\"isAllColumnsVisible()\"\n (change)=\"toggleAllColumnsVisibility($event)\"\n (click)=\"$event.stopPropagation()\"\n >{{ editColumnsVisibilitySelectAllLabel() }}</mat-checkbox\n >\n </div>\n @for (column of runtimeColumns(); track column.id) {\n <div mat-menu-item disableRipple (click)=\"$event.stopPropagation()\">\n <mat-checkbox\n [checked]=\"isColumnVisible(column)\"\n (change)=\"toggleColumnVisibility($event, column)\"\n (click)=\"$event.stopPropagation()\"\n >{{ column.header }}</mat-checkbox\n >\n </div>\n }\n</mat-menu>\n\n<!-- MARK: Input Cell Template -->\n<ng-template #dmTableInputCell let-row let-column=\"column\">\n @switch (column.inputType) { @case ('select') {\n <mat-select\n [dmImportantStyle]=\"getInputStyle(column)\"\n panelWidth=\"null\"\n [value]=\"resolveCellValue(row, column)\"\n >\n @for (option of column.selectOptions || []; track option.value) {\n <mat-option\n [value]=\"option.value\"\n (onSelectionChange)=\"inputCellSelectOptionChangeHandler(row, column, option, $event)\"\n >{{ option.label }}</mat-option\n >\n }\n </mat-select>\n } @case ('checkbox') {\n <mat-checkbox\n [checked]=\"resolveCellValue(row, column)\"\n (change)=\"inputCellCheckboxChangeHandler(row, column, $event)\"\n ></mat-checkbox>\n } @default {\n <input\n [type]=\"column.inputType || 'text'\"\n [value]=\"resolveCellValue(row, column)\"\n (change)=\"inputCellChangeHandler(row, column, $event)\"\n [dmImportantStyle]=\"getInputStyle(column)\"\n />\n } }\n</ng-template>\n\n<!-- MARK: Header Menu Trigger Template -->\n<ng-template #dmTableHeaderMenuTrigger let-column>\n @if (column?.headerMenuItems?.length) {\n <!-- <button\n mat-icon-button\n (click)=\"$event.stopPropagation()\"\n aria-label=\"Column Menu\"\n >\n </button> -->\n <mat-icon\n #rootTrigger=\"matMenuTrigger\"\n [matMenuTriggerFor]=\"dmTableHeaderRootMenu\"\n [matMenuTriggerData]=\"{\n menuItems: column.headerMenuItems,\n rootTrigger: rootTrigger\n }\"\n [matTooltip]=\"column.headerMenuTooltip || ''\"\n style=\"font-size: 20px; cursor: pointer; margin-left: 4px; height: 20px\"\n [ngStyle]=\"{\n color: getHeaderThContentStyle(column)?.color || getHeaderThStyle(column)?.color || ''\n }\"\n >menu</mat-icon\n >\n }\n</ng-template>\n\n<!-- MARK: Header Root Menu -->\n<mat-menu #dmTableHeaderRootMenu=\"matMenu\">\n <ng-template matMenuContent let-menuItems=\"menuItems\" let-rootTrigger=\"rootTrigger\">\n <ng-container\n *ngTemplateOutlet=\"\n dmTableHeaderRecursiveMenu;\n context: { menuItems: menuItems, rootTrigger: rootTrigger }\n \"\n ></ng-container>\n </ng-template>\n</mat-menu>\n\n<!-- MARK: Header Recursive Menu -->\n<ng-template #dmTableHeaderRecursiveMenu let-menuItems=\"menuItems\" let-rootTrigger=\"rootTrigger\">\n @for (menuItem of menuItems; track $index) { @if (!menuItem.showIf || (menuItem.showIf &&\n menuItem.showIf(datasource()))) {@if (menuItem.children?.length) {\n <button\n mat-menu-item\n [matMenuTriggerFor]=\"dmTableHeaderSubMenu\"\n [matMenuTriggerData]=\"{\n menuItems: menuItem.children,\n rootTrigger\n }\"\n (click)=\"$event.stopPropagation()\"\n [ngStyle]=\"{\n 'background-color': menuItem.backgroundColor ? menuItem.backgroundColor : undefined\n }\"\n >\n <span style=\"display: flex; align-items: center; width: 100%\">\n @if (menuItem.icon) {\n <mat-icon [style.color]=\"menuItem.color ? menuItem.color : undefined\">{{\n menuItem.icon\n }}</mat-icon>\n }\n <span [style.color]=\"menuItem.color ? menuItem.color : undefined\">{{ menuItem.label }}</span>\n <span class=\"spacer\"></span>\n <mat-icon [style.color]=\"menuItem.color ? menuItem.color : undefined\" class=\"submenu-arrow\"\n >chevron_left</mat-icon\n >\n </span>\n </button>\n\n <mat-menu #dmTableHeaderSubMenu=\"matMenu\">\n <ng-container\n *ngTemplateOutlet=\"\n dmTableHeaderRecursiveMenu;\n context: { menuItems: menuItem.children, rootTrigger: rootTrigger }\n \"\n />\n </mat-menu>\n } @else {\n <button\n mat-menu-item\n [matTooltip]=\"menuItem.tooltip || ''\"\n (click)=\"menuItem.onClick?.(datasource(), $event, getCloseParentMenusFn(rootTrigger))\"\n [ngStyle]=\"{\n 'background-color': menuItem.backgroundColor ? menuItem.backgroundColor : undefined\n }\"\n >\n @if (menuItem.icon) {\n <mat-icon [style.color]=\"menuItem.color ? menuItem.color : undefined\">{{\n menuItem.icon\n }}</mat-icon>\n }\n <span [style.color]=\"menuItem.color ? menuItem.color : undefined\">{{ menuItem.label }}</span>\n </button>\n } }}\n</ng-template>\n", styles: ["#dm-table-component-wrapper{width:100%}#dm-table-component-wrapper ::-webkit-scrollbar{width:var(--dm-table-scrollbar-width, 7px);height:var(--dm-table-scrollbar-width, 7px)}#dm-table-component-wrapper ::-webkit-scrollbar-track{background:var(--dm-table-scrollbar-background-color, #e0e0e0)}#dm-table-component-wrapper ::-webkit-scrollbar-thumb{background:var(--dm-table-scrollbar-color, #949496);border-radius:var(--dm-table-scrollbar-border-radius, 4px)}#dm-table-component-wrapper ::-webkit-scrollbar-thumb:hover{background:var(--dm-table-scrollbar-hover-color, #5f5f5f)}#dm-table-component-wrapper .dm-table-top-section{width:calc(100% - 10px);display:flex;align-items:center;padding:0 5px;gap:5px;flex-wrap:wrap}#dm-table-component-wrapper .dm-table-table-wrapper .dm-table-classic{width:100%;border-collapse:collapse;border-spacing:0;box-shadow:0 5px 5px -3px #003,0 8px 10px 1px #00000024,0 3px 14px 2px #0000001f;padding:0;font-size:1rem;border-radius:8px;page-break-inside:auto}#dm-table-component-wrapper .dm-table-table-wrapper .dm-table-classic tr{page-break-inside:avoid}#dm-table-component-wrapper .dm-table-table-wrapper .dm-table-classic th,#dm-table-component-wrapper .dm-table-table-wrapper .dm-table-classic td{text-align:start;max-width:none}#dm-table-component-wrapper .inner-header-cell{display:flex;align-items:center;gap:5px}#dm-table-component-wrapper .dm-table-no-data{width:98%;margin:10px auto 0;line-height:60px;display:flex;justify-content:center;align-items:center;padding:10px;font-size:1.5rem;font-weight:700;color:#dd2f2f;box-shadow:0 4px 6px #000000d7}#dm-table-component-wrapper .dm-table-paginator-row{display:flex;flex-wrap:wrap;justify-content:center;align-items:center;gap:5px}#dm-table-component-wrapper .dm-table-paginator-row .dm-table-paginator-page-info{display:flex;align-items:center;gap:5px}:host ::ng-deep .dm-paginator-form-field>.mat-mdc-form-field-bottom-align:before{content:\"\";display:none;height:0px}:host ::ng-deep .dm-table-search-form-field>.mat-mdc-form-field-bottom-align:before{content:\"\";display:none;height:0px}.cdk-drag-preview{border:none;box-sizing:border-box;background-color:var(--dm-table-header-background-color, #f5f5f5);color:var(--dm-table-header-color, #000000);border-radius:4px;box-shadow:0 5px 5px -3px #0003,0 8px 10px 1px #00000024,0 3px 14px 2px #0000001f}.cdk-drag-preview .inner-header-cell{display:flex;align-items:center}.spacer{flex-grow:1}\n"] }]
2183
2183
  }], ctorParameters: () => [], propDecorators: { onShiftKeyDown: [{
2184
2184
  type: HostListener,
2185
2185
  args: ['window:keydown.shift', ['$event']]