@dmlibs/dm-cmps 0.1.0 → 0.1.2

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.
@@ -6,7 +6,7 @@ import * as i2 from '@angular/material/form-field';
6
6
  import { MatFormFieldModule } from '@angular/material/form-field';
7
7
  import * as i5 from '@angular/material/select';
8
8
  import { MatSelectModule } from '@angular/material/select';
9
- import * as i10 from '@angular/common';
9
+ import * as i11 from '@angular/common';
10
10
  import { CommonModule } from '@angular/common';
11
11
  import * as i1 from '@angular/forms';
12
12
  import { FormControl, ReactiveFormsModule, FormsModule } from '@angular/forms';
@@ -15,20 +15,22 @@ import { MatInputModule } from '@angular/material/input';
15
15
  import * as i3 from '@angular/material/checkbox';
16
16
  import { MatCheckboxModule } from '@angular/material/checkbox';
17
17
  import { MatIcon } from '@angular/material/icon';
18
- import * as i7 from '@angular/material/button';
18
+ import * as i8 from '@angular/material/button';
19
19
  import { MatButtonModule } from '@angular/material/button';
20
20
  import * as i2$1 from '@angular/material/tooltip';
21
21
  import { MatTooltip, MatTooltipModule } from '@angular/material/tooltip';
22
- import * as i9 from '@angular/material/menu';
22
+ import * as i10 from '@angular/material/menu';
23
23
  import { MatMenuModule } from '@angular/material/menu';
24
24
  import * as i3$1 from '@angular/material/slider';
25
25
  import { MatSliderModule } from '@angular/material/slider';
26
26
  import { MatProgressSpinnerModule } from '@angular/material/progress-spinner';
27
- import * as i1$1 from '@angular/material/progress-bar';
27
+ import * as i2$2 from '@angular/material/progress-bar';
28
28
  import { MatProgressBarModule } from '@angular/material/progress-bar';
29
29
  import { A11yModule } from '@angular/cdk/a11y';
30
30
  import { moveItemInArray, CdkDragHandle, CdkDropList, CdkDrag } from '@angular/cdk/drag-drop';
31
- import * as i5$1 from '@angular/cdk/scrolling';
31
+ import * as i1$1 from '@angular/material/slide-toggle';
32
+ import { MatSlideToggleModule } from '@angular/material/slide-toggle';
33
+ import * as i6$1 from '@angular/cdk/scrolling';
32
34
 
33
35
  class DmCmpsDataSource {
34
36
  data;
@@ -620,7 +622,7 @@ class DmMatSelect {
620
622
  }
621
623
  }
622
624
  static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.0.3", ngImport: i0, type: DmMatSelect, deps: [], target: i0.ɵɵFactoryTarget.Component });
623
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.0.3", type: DmMatSelect, isStandalone: true, selector: "dm-mat-select", inputs: { formFieldClass: { classPropertyName: "formFieldClass", publicName: "formFieldClass", isSignal: true, isRequired: false, transformFunction: null }, wrapperClass: { classPropertyName: "wrapperClass", publicName: "wrapperClass", isSignal: true, isRequired: false, transformFunction: null }, appearance: { classPropertyName: "appearance", publicName: "appearance", isSignal: true, isRequired: false, transformFunction: null }, multiple: { classPropertyName: "multiple", publicName: "multiple", isSignal: true, isRequired: false, transformFunction: null }, selectAllEnabled: { classPropertyName: "selectAllEnabled", publicName: "selectAllEnabled", isSignal: true, isRequired: false, transformFunction: null }, selectAllLabel: { classPropertyName: "selectAllLabel", publicName: "selectAllLabel", isSignal: true, isRequired: false, transformFunction: null }, label: { classPropertyName: "label", publicName: "label", isSignal: true, isRequired: false, transformFunction: null }, options: { classPropertyName: "options", publicName: "options", isSignal: true, isRequired: false, transformFunction: null }, optionValueKey: { classPropertyName: "optionValueKey", publicName: "optionValueKey", isSignal: true, isRequired: false, transformFunction: null }, optionLabelKey: { classPropertyName: "optionLabelKey", publicName: "optionLabelKey", isSignal: true, isRequired: false, transformFunction: null }, searchable: { classPropertyName: "searchable", publicName: "searchable", isSignal: true, isRequired: false, transformFunction: null }, required: { classPropertyName: "required", publicName: "required", isSignal: true, isRequired: false, transformFunction: null }, disabled: { classPropertyName: "disabled", publicName: "disabled", isSignal: true, isRequired: false, transformFunction: null }, error: { classPropertyName: "error", publicName: "error", isSignal: true, isRequired: false, transformFunction: null }, searchPlaceholder: { classPropertyName: "searchPlaceholder", publicName: "searchPlaceholder", isSignal: true, isRequired: false, transformFunction: null }, emptyOption: { classPropertyName: "emptyOption", publicName: "emptyOption", isSignal: true, isRequired: false, transformFunction: null }, emptyOptionLabel: { classPropertyName: "emptyOptionLabel", publicName: "emptyOptionLabel", isSignal: true, isRequired: false, transformFunction: null }, emptyOptionValue: { classPropertyName: "emptyOptionValue", publicName: "emptyOptionValue", isSignal: true, isRequired: false, transformFunction: null }, optionNameFormat: { classPropertyName: "optionNameFormat", publicName: "optionNameFormat", isSignal: true, isRequired: false, transformFunction: null }, value: { classPropertyName: "value", publicName: "value", isSignal: true, isRequired: false, transformFunction: null }, formControl: { classPropertyName: "formControl", publicName: "formControl", isSignal: true, isRequired: false, transformFunction: null }, panelWidth: { classPropertyName: "panelWidth", publicName: "panelWidth", isSignal: true, isRequired: false, transformFunction: null }, panelClass: { classPropertyName: "panelClass", publicName: "panelClass", isSignal: true, isRequired: false, transformFunction: null }, searchSectionBackgroundColor: { classPropertyName: "searchSectionBackgroundColor", publicName: "searchSectionBackgroundColor", isSignal: true, isRequired: false, transformFunction: null }, sortBySelectedOnTop: { classPropertyName: "sortBySelectedOnTop", publicName: "sortBySelectedOnTop", isSignal: true, isRequired: false, transformFunction: null }, icon: { classPropertyName: "icon", publicName: "icon", isSignal: true, isRequired: false, transformFunction: null }, noDataLabel: { classPropertyName: "noDataLabel", publicName: "noDataLabel", isSignal: true, isRequired: false, transformFunction: null }, clearSearchAfterSelect: { classPropertyName: "clearSearchAfterSelect", publicName: "clearSearchAfterSelect", isSignal: true, isRequired: false, transformFunction: null }, clearSearchButtonTooltip: { classPropertyName: "clearSearchButtonTooltip", publicName: "clearSearchButtonTooltip", isSignal: true, isRequired: false, transformFunction: null }, focusSearchInputOnPanelOpen: { classPropertyName: "focusSearchInputOnPanelOpen", publicName: "focusSearchInputOnPanelOpen", isSignal: true, isRequired: false, transformFunction: null }, filterPredicate: { classPropertyName: "filterPredicate", publicName: "filterPredicate", isSignal: true, isRequired: false, transformFunction: null }, propertiesToSkipInSearch: { classPropertyName: "propertiesToSkipInSearch", publicName: "propertiesToSkipInSearch", isSignal: true, isRequired: false, transformFunction: null }, filterText: { classPropertyName: "filterText", publicName: "filterText", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { value: "valueChange", selectionChange: "selectionChange", filterText: "filterTextChange" }, ngImport: i0, template: "<div class=\"dm-mat-select-wrapper\" [class]=\"wrapperClass()\">\n <mat-form-field [appearance]=\"appearance()\" [class]=\"formFieldClass()\" style=\"width: 100%\">\n <mat-label>{{ label() }}</mat-label>\n <mat-select\n [multiple]=\"multiple()\"\n [formControl]=\"control()\"\n (selectionChange)=\"selectionChangeHandler($event)\"\n [disabled]=\"disabled()\"\n [panelWidth]=\"panelWidth()\"\n [panelClass]=\"panelClass()\"\n (opened)=\"onPanelOpened()\"\n >\n <div\n class=\"search-section\"\n [ngStyle]=\"{\n 'background-color': 'none'\n }\"\n >\n @if (searchable()) {\n <mat-form-field>\n <input\n id=\"dm-mat-select-search-input\"\n matInput\n [placeholder]=\"searchPlaceholder()\"\n [(ngModel)]=\"filterText\"\n (keyup)=\"applyFilter($event)\"\n (keyDown.Space)=\"$event.stopPropagation()\"\n />\n @if (filterText()) {\n <button\n mat-icon-button\n matSuffix\n (click)=\"resetSearch()\"\n [matTooltip]=\"clearSearchButtonTooltip() || ''\"\n >\n <mat-icon>close</mat-icon>\n </button>\n }\n </mat-form-field>\n } @if (selectAllEnabled() && multiple()) {\n <mat-checkbox [checked]=\"checkIfAllSelected()\" (change)=\"selectAllChange($event)\">{{\n selectAllLabel()\n }}</mat-checkbox>\n }\n </div>\n @if (emptyOption()) {\n <mat-option\n [value]=\"emptyOptionValue()\"\n (onSelectionChange)=\"onSelectionChangeHandler($event, emptyOptionValue())\"\n >{{ emptyOptionLabel() }}</mat-option\n >\n } @for (option of datasource().result(); track simpleArray() ? option :\n option[this.optionValueKey()]) {\n <mat-option\n [value]=\"simpleArray() ? option : option[optionValueKey()]\"\n (onSelectionChange)=\"onSelectionChangeHandler($event, option)\"\n >{{\n optionNameFormat()\n ? option.__dmMatSelectFormattedName\n : simpleArray()\n ? option\n : option[optionLabelKey()]\n }}</mat-option\n >\n } @if (datasource().result().length === 0) {\n <mat-option disabled>{{ noDataLabel() }}</mat-option>\n }\n </mat-select>\n\n @if (icon(); as icon) {\n <span matSuffix>\n @if (isBootstrapIcon()) {\n <span [innerHTML]=\"icon\"></span> } @else {\n <mat-icon matSuffix>{{ icon }}</mat-icon>\n }\n </span>\n }\n\n <span matSuffix>\n <ng-content select=\"[dm-mat-select-suffix]\"></ng-content>\n </span>\n\n <mat-error>{{ error() }}</mat-error>\n </mat-form-field>\n</div>\n", styles: [".dm-mat-select-wrapper{width:100%;position:relative}.dm-mat-select-wrapper .search-section{display:flex;flex-direction:column;position:sticky;top:0;z-index:1;background-color:var(--dm-mat-select-search-section-bg-color, #faf9fd)}.dm-mat-select-wrapper .search-section ::ng-deep mat-form-field>.mat-mdc-form-field-subscript-wrapper{display:none}.dm-mat-select-wrapper ::ng-deep mat-form-field>.mat-mdc-text-field-wrapper>.mat-mdc-form-field-flex>.mat-mdc-form-field-icon-suffix{padding:0 4px 0 8px}\n"], dependencies: [{ 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: "directive", type: i1.FormControlDirective, selector: "[formControl]", inputs: ["formControl", "disabled", "ngModel"], outputs: ["ngModelChange"], exportAs: ["ngForm"] }, { 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.MatLabel, selector: "mat-label" }, { kind: "directive", type: i2.MatError, selector: "mat-error, [matError]", inputs: ["id"] }, { 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: MatButtonModule }, { kind: "component", type: i7.MatIconButton, selector: "button[mat-icon-button], a[mat-icon-button], button[matIconButton], a[matIconButton]", exportAs: ["matButton", "matAnchor"] }, { kind: "ngmodule", type: MatSelectModule }, { 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: "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: CommonModule }, { kind: "directive", type: i10.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: 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"] }] });
625
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.0.3", type: DmMatSelect, isStandalone: true, selector: "dm-mat-select", inputs: { formFieldClass: { classPropertyName: "formFieldClass", publicName: "formFieldClass", isSignal: true, isRequired: false, transformFunction: null }, wrapperClass: { classPropertyName: "wrapperClass", publicName: "wrapperClass", isSignal: true, isRequired: false, transformFunction: null }, appearance: { classPropertyName: "appearance", publicName: "appearance", isSignal: true, isRequired: false, transformFunction: null }, multiple: { classPropertyName: "multiple", publicName: "multiple", isSignal: true, isRequired: false, transformFunction: null }, selectAllEnabled: { classPropertyName: "selectAllEnabled", publicName: "selectAllEnabled", isSignal: true, isRequired: false, transformFunction: null }, selectAllLabel: { classPropertyName: "selectAllLabel", publicName: "selectAllLabel", isSignal: true, isRequired: false, transformFunction: null }, label: { classPropertyName: "label", publicName: "label", isSignal: true, isRequired: false, transformFunction: null }, options: { classPropertyName: "options", publicName: "options", isSignal: true, isRequired: false, transformFunction: null }, optionValueKey: { classPropertyName: "optionValueKey", publicName: "optionValueKey", isSignal: true, isRequired: false, transformFunction: null }, optionLabelKey: { classPropertyName: "optionLabelKey", publicName: "optionLabelKey", isSignal: true, isRequired: false, transformFunction: null }, searchable: { classPropertyName: "searchable", publicName: "searchable", isSignal: true, isRequired: false, transformFunction: null }, required: { classPropertyName: "required", publicName: "required", isSignal: true, isRequired: false, transformFunction: null }, disabled: { classPropertyName: "disabled", publicName: "disabled", isSignal: true, isRequired: false, transformFunction: null }, error: { classPropertyName: "error", publicName: "error", isSignal: true, isRequired: false, transformFunction: null }, searchPlaceholder: { classPropertyName: "searchPlaceholder", publicName: "searchPlaceholder", isSignal: true, isRequired: false, transformFunction: null }, emptyOption: { classPropertyName: "emptyOption", publicName: "emptyOption", isSignal: true, isRequired: false, transformFunction: null }, emptyOptionLabel: { classPropertyName: "emptyOptionLabel", publicName: "emptyOptionLabel", isSignal: true, isRequired: false, transformFunction: null }, emptyOptionValue: { classPropertyName: "emptyOptionValue", publicName: "emptyOptionValue", isSignal: true, isRequired: false, transformFunction: null }, optionNameFormat: { classPropertyName: "optionNameFormat", publicName: "optionNameFormat", isSignal: true, isRequired: false, transformFunction: null }, value: { classPropertyName: "value", publicName: "value", isSignal: true, isRequired: false, transformFunction: null }, formControl: { classPropertyName: "formControl", publicName: "formControl", isSignal: true, isRequired: false, transformFunction: null }, panelWidth: { classPropertyName: "panelWidth", publicName: "panelWidth", isSignal: true, isRequired: false, transformFunction: null }, panelClass: { classPropertyName: "panelClass", publicName: "panelClass", isSignal: true, isRequired: false, transformFunction: null }, searchSectionBackgroundColor: { classPropertyName: "searchSectionBackgroundColor", publicName: "searchSectionBackgroundColor", isSignal: true, isRequired: false, transformFunction: null }, sortBySelectedOnTop: { classPropertyName: "sortBySelectedOnTop", publicName: "sortBySelectedOnTop", isSignal: true, isRequired: false, transformFunction: null }, icon: { classPropertyName: "icon", publicName: "icon", isSignal: true, isRequired: false, transformFunction: null }, noDataLabel: { classPropertyName: "noDataLabel", publicName: "noDataLabel", isSignal: true, isRequired: false, transformFunction: null }, clearSearchAfterSelect: { classPropertyName: "clearSearchAfterSelect", publicName: "clearSearchAfterSelect", isSignal: true, isRequired: false, transformFunction: null }, clearSearchButtonTooltip: { classPropertyName: "clearSearchButtonTooltip", publicName: "clearSearchButtonTooltip", isSignal: true, isRequired: false, transformFunction: null }, focusSearchInputOnPanelOpen: { classPropertyName: "focusSearchInputOnPanelOpen", publicName: "focusSearchInputOnPanelOpen", isSignal: true, isRequired: false, transformFunction: null }, filterPredicate: { classPropertyName: "filterPredicate", publicName: "filterPredicate", isSignal: true, isRequired: false, transformFunction: null }, propertiesToSkipInSearch: { classPropertyName: "propertiesToSkipInSearch", publicName: "propertiesToSkipInSearch", isSignal: true, isRequired: false, transformFunction: null }, filterText: { classPropertyName: "filterText", publicName: "filterText", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { value: "valueChange", selectionChange: "selectionChange", filterText: "filterTextChange" }, ngImport: i0, template: "<div class=\"dm-mat-select-wrapper\" [class]=\"wrapperClass()\">\n <mat-form-field [appearance]=\"appearance()\" [class]=\"formFieldClass()\" style=\"width: 100%\">\n <mat-label>{{ label() }}</mat-label>\n <mat-select\n [multiple]=\"multiple()\"\n [formControl]=\"control()\"\n (selectionChange)=\"selectionChangeHandler($event)\"\n [disabled]=\"disabled()\"\n [panelWidth]=\"panelWidth()\"\n [panelClass]=\"panelClass()\"\n (opened)=\"onPanelOpened()\"\n >\n <div\n class=\"search-section\"\n [ngStyle]=\"{\n 'background-color': 'none'\n }\"\n >\n @if (searchable()) {\n <mat-form-field>\n <input\n id=\"dm-mat-select-search-input\"\n matInput\n [placeholder]=\"searchPlaceholder()\"\n [(ngModel)]=\"filterText\"\n (keyup)=\"applyFilter($event)\"\n (keyDown.Space)=\"$event.stopPropagation()\"\n />\n @if (filterText()) {\n <button\n mat-icon-button\n matSuffix\n (click)=\"resetSearch()\"\n [matTooltip]=\"clearSearchButtonTooltip() || ''\"\n >\n <mat-icon>close</mat-icon>\n </button>\n }\n </mat-form-field>\n } @if (selectAllEnabled() && multiple()) {\n <mat-checkbox [checked]=\"checkIfAllSelected()\" (change)=\"selectAllChange($event)\">{{\n selectAllLabel()\n }}</mat-checkbox>\n }\n </div>\n @if (emptyOption()) {\n <mat-option\n [value]=\"emptyOptionValue()\"\n (onSelectionChange)=\"onSelectionChangeHandler($event, emptyOptionValue())\"\n >{{ emptyOptionLabel() }}</mat-option\n >\n } @for (option of datasource().result(); track simpleArray() ? option :\n option[this.optionValueKey()]) {\n <mat-option\n [value]=\"simpleArray() ? option : option[optionValueKey()]\"\n (onSelectionChange)=\"onSelectionChangeHandler($event, option)\"\n >{{\n optionNameFormat()\n ? option.__dmMatSelectFormattedName\n : simpleArray()\n ? option\n : option[optionLabelKey()]\n }}</mat-option\n >\n } @if (datasource().result().length === 0) {\n <mat-option disabled>{{ noDataLabel() }}</mat-option>\n }\n </mat-select>\n\n @if (icon(); as icon) {\n <span matSuffix>\n @if (isBootstrapIcon()) {\n <span [innerHTML]=\"icon\"></span> } @else {\n <mat-icon matSuffix>{{ icon }}</mat-icon>\n }\n </span>\n }\n\n <span matSuffix>\n <ng-content select=\"[dm-mat-select-suffix]\"></ng-content>\n </span>\n\n <mat-error>{{ error() }}</mat-error>\n </mat-form-field>\n</div>\n", styles: [".dm-mat-select-wrapper{width:100%;position:relative}.dm-mat-select-wrapper .search-section{display:flex;flex-direction:column;position:sticky;top:0;z-index:1;background-color:var(--dm-mat-select-search-section-bg-color, #faf9fd)}.dm-mat-select-wrapper .search-section ::ng-deep mat-form-field>.mat-mdc-form-field-subscript-wrapper{display:none}.dm-mat-select-wrapper ::ng-deep mat-form-field>.mat-mdc-text-field-wrapper>.mat-mdc-form-field-flex>.mat-mdc-form-field-icon-suffix{padding:0 4px 0 8px}\n"], dependencies: [{ 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: "directive", type: i1.FormControlDirective, selector: "[formControl]", inputs: ["formControl", "disabled", "ngModel"], outputs: ["ngModelChange"], exportAs: ["ngForm"] }, { 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.MatLabel, selector: "mat-label" }, { kind: "directive", type: i2.MatError, selector: "mat-error, [matError]", inputs: ["id"] }, { 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: MatButtonModule }, { kind: "component", type: i8.MatIconButton, selector: "button[mat-icon-button], a[mat-icon-button], button[matIconButton], a[matIconButton]", exportAs: ["matButton", "matAnchor"] }, { kind: "ngmodule", type: MatSelectModule }, { 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: "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: CommonModule }, { 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: 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"] }] });
624
626
  }
625
627
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.3", ngImport: i0, type: DmMatSelect, decorators: [{
626
628
  type: Component,
@@ -745,7 +747,7 @@ class DmColorPicker {
745
747
  registerOnChange(fn) { }
746
748
  registerOnTouched(fn) { }
747
749
  static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.0.3", ngImport: i0, type: DmColorPicker, deps: [], target: i0.ɵɵFactoryTarget.Component });
748
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.0.3", type: DmColorPicker, isStandalone: true, selector: "dm-color-picker", inputs: { colors: { classPropertyName: "colors", publicName: "colors", isSignal: true, isRequired: false, transformFunction: null }, formControl: { classPropertyName: "formControl", publicName: "formControl", isSignal: true, isRequired: false, transformFunction: null }, width: { classPropertyName: "width", publicName: "width", isSignal: true, isRequired: false, transformFunction: null }, height: { classPropertyName: "height", publicName: "height", isSignal: true, isRequired: false, transformFunction: null }, borderRadius: { classPropertyName: "borderRadius", publicName: "borderRadius", isSignal: true, isRequired: false, transformFunction: null }, tooltip: { classPropertyName: "tooltip", publicName: "tooltip", isSignal: true, isRequired: false, transformFunction: null }, tooltipPosition: { classPropertyName: "tooltipPosition", publicName: "tooltipPosition", isSignal: true, isRequired: false, transformFunction: null }, customColor: { classPropertyName: "customColor", publicName: "customColor", isSignal: true, isRequired: false, transformFunction: null }, opacitySlider: { classPropertyName: "opacitySlider", publicName: "opacitySlider", isSignal: true, isRequired: false, transformFunction: null }, opacitySliderLabel: { classPropertyName: "opacitySliderLabel", publicName: "opacitySliderLabel", isSignal: true, isRequired: false, transformFunction: null }, customColorTooltip: { classPropertyName: "customColorTooltip", publicName: "customColorTooltip", isSignal: true, isRequired: false, transformFunction: null }, wrapperClass: { classPropertyName: "wrapperClass", publicName: "wrapperClass", isSignal: true, isRequired: false, transformFunction: null }, wrapperStyle: { classPropertyName: "wrapperStyle", publicName: "wrapperStyle", isSignal: true, isRequired: false, transformFunction: null }, value: { classPropertyName: "value", publicName: "value", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { onColorChange: "onColorChange", value: "valueChange" }, ngImport: i0, template: "<div class=\"dm-color-picker-wrapper\" [class]=\"wrapperClass()\" [style]=\"wrapperStyle()\">\n <div\n class=\"dm-color-picker\"\n [matMenuTriggerFor]=\"colorPicker\"\n [style.background-color]=\"selectedColor()\"\n [matTooltip]=\"tooltip()\"\n [matTooltipPosition]=\"tooltipPosition()\"\n [style.width.px]=\"width()\"\n [style.height.px]=\"height()\"\n [style.border-radius]=\"radius()\"\n ></div>\n @if (opacitySlider()){\n <div class=\"dm-color-picker-slider-wrapper\">\n {{ opacitySliderLabel() }}\n <mat-slider min=\"0\" max=\"100\" step=\"1\" discrete [displayWith]=\"formatLabel\">\n <input\n matSliderThumb\n [value]=\"getOpacity()\"\n (input)=\"onOpacityChange($event)\"\n #slider\n (change)=\"updateSelectedColor()\"\n />\n </mat-slider>\n </div>\n }\n</div>\n\n<mat-menu #colorPicker=\"matMenu\">\n <div class=\"dm-color-picker-menu\">\n @for (color of colors(); track color.color){\n <div\n (click)=\"onColorSelected(color.color)\"\n class=\"dm-color-div\"\n [matTooltip]=\"color.tooltip || ''\"\n matTooltipPosition=\"above\"\n [style.background-color]=\"color.color\"\n ></div>\n } @if (customColor()){<input\n (click)=\"$event.stopPropagation()\"\n [matTooltip]=\"customColorTooltip()\"\n [matTooltipPosition]=\"tooltipPosition()\"\n [value]=\"selectedColor()\"\n type=\"color\"\n class=\"pointer\"\n (change)=\"_onColorChange($event)\"\n />}\n </div>\n</mat-menu>\n", styles: [".dm-color-picker-wrapper{display:flex;flex-direction:column;align-items:start;width:fit-content}.dm-color-picker-wrapper .dm-color-picker{cursor:pointer;padding:3px;box-shadow:0 0 2.5px 1px #00000080}.dm-color-picker-wrapper .dm-color-picker-slider-wrapper{display:flex;align-items:center;gap:5px}.dm-color-picker-menu{display:flex;flex-direction:row;flex-wrap:wrap;align-items:center;justify-content:center;width:100%;height:100%}.dm-color-picker-menu .dm-color-div{width:30px;height:30px;border-radius:50%;margin:5px;cursor:pointer;box-shadow:0 0 2.5px 1px #00000080}.dm-color-picker-menu .dm-color-div:hover{box-shadow:0 0 5px 2px #00000080}.pointer{cursor:pointer}\n"], dependencies: [{ kind: "ngmodule", type: MatMenuModule }, { kind: "component", type: i9.MatMenu, selector: "mat-menu", inputs: ["backdropClass", "aria-label", "aria-labelledby", "aria-describedby", "xPosition", "yPosition", "overlapTrigger", "hasBackdrop", "class", "classList"], outputs: ["closed", "close"], exportAs: ["matMenu"] }, { kind: "directive", type: i9.MatMenuTrigger, selector: "[mat-menu-trigger-for], [matMenuTriggerFor]", inputs: ["mat-menu-trigger-for", "matMenuTriggerFor", "matMenuTriggerData", "matMenuTriggerRestoreFocus"], outputs: ["menuOpened", "onMenuOpen", "menuClosed", "onMenuClose"], exportAs: ["matMenuTrigger"] }, { kind: "ngmodule", type: MatTooltipModule }, { kind: "directive", type: i2$1.MatTooltip, selector: "[matTooltip]", inputs: ["matTooltipPosition", "matTooltipPositionAtOrigin", "matTooltipDisabled", "matTooltipShowDelay", "matTooltipHideDelay", "matTooltipTouchGestures", "matTooltip", "matTooltipClass"], exportAs: ["matTooltip"] }, { kind: "ngmodule", type: CommonModule }, { kind: "ngmodule", type: MatSliderModule }, { kind: "component", type: i3$1.MatSlider, selector: "mat-slider", inputs: ["disabled", "discrete", "showTickMarks", "min", "color", "disableRipple", "max", "step", "displayWith"], exportAs: ["matSlider"] }, { kind: "directive", type: i3$1.MatSliderThumb, selector: "input[matSliderThumb]", inputs: ["value"], outputs: ["valueChange", "dragStart", "dragEnd"], exportAs: ["matSliderThumb"] }] });
750
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.0.3", type: DmColorPicker, isStandalone: true, selector: "dm-color-picker", inputs: { colors: { classPropertyName: "colors", publicName: "colors", isSignal: true, isRequired: false, transformFunction: null }, formControl: { classPropertyName: "formControl", publicName: "formControl", isSignal: true, isRequired: false, transformFunction: null }, width: { classPropertyName: "width", publicName: "width", isSignal: true, isRequired: false, transformFunction: null }, height: { classPropertyName: "height", publicName: "height", isSignal: true, isRequired: false, transformFunction: null }, borderRadius: { classPropertyName: "borderRadius", publicName: "borderRadius", isSignal: true, isRequired: false, transformFunction: null }, tooltip: { classPropertyName: "tooltip", publicName: "tooltip", isSignal: true, isRequired: false, transformFunction: null }, tooltipPosition: { classPropertyName: "tooltipPosition", publicName: "tooltipPosition", isSignal: true, isRequired: false, transformFunction: null }, customColor: { classPropertyName: "customColor", publicName: "customColor", isSignal: true, isRequired: false, transformFunction: null }, opacitySlider: { classPropertyName: "opacitySlider", publicName: "opacitySlider", isSignal: true, isRequired: false, transformFunction: null }, opacitySliderLabel: { classPropertyName: "opacitySliderLabel", publicName: "opacitySliderLabel", isSignal: true, isRequired: false, transformFunction: null }, customColorTooltip: { classPropertyName: "customColorTooltip", publicName: "customColorTooltip", isSignal: true, isRequired: false, transformFunction: null }, wrapperClass: { classPropertyName: "wrapperClass", publicName: "wrapperClass", isSignal: true, isRequired: false, transformFunction: null }, wrapperStyle: { classPropertyName: "wrapperStyle", publicName: "wrapperStyle", isSignal: true, isRequired: false, transformFunction: null }, value: { classPropertyName: "value", publicName: "value", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { onColorChange: "onColorChange", value: "valueChange" }, ngImport: i0, template: "<div class=\"dm-color-picker-wrapper\" [class]=\"wrapperClass()\" [style]=\"wrapperStyle()\">\n <div\n class=\"dm-color-picker\"\n [matMenuTriggerFor]=\"colorPicker\"\n [style.background-color]=\"selectedColor()\"\n [matTooltip]=\"tooltip()\"\n [matTooltipPosition]=\"tooltipPosition()\"\n [style.width.px]=\"width()\"\n [style.height.px]=\"height()\"\n [style.border-radius]=\"radius()\"\n ></div>\n @if (opacitySlider()){\n <div class=\"dm-color-picker-slider-wrapper\">\n {{ opacitySliderLabel() }}\n <mat-slider min=\"0\" max=\"100\" step=\"1\" discrete [displayWith]=\"formatLabel\">\n <input\n matSliderThumb\n [value]=\"getOpacity()\"\n (input)=\"onOpacityChange($event)\"\n #slider\n (change)=\"updateSelectedColor()\"\n />\n </mat-slider>\n </div>\n }\n</div>\n\n<mat-menu #colorPicker=\"matMenu\">\n <div class=\"dm-color-picker-menu\">\n @for (color of colors(); track color.color){\n <div\n (click)=\"onColorSelected(color.color)\"\n class=\"dm-color-div\"\n [matTooltip]=\"color.tooltip || ''\"\n matTooltipPosition=\"above\"\n [style.background-color]=\"color.color\"\n ></div>\n } @if (customColor()){<input\n (click)=\"$event.stopPropagation()\"\n [matTooltip]=\"customColorTooltip()\"\n [matTooltipPosition]=\"tooltipPosition()\"\n [value]=\"selectedColor()\"\n type=\"color\"\n class=\"pointer\"\n (change)=\"_onColorChange($event)\"\n />}\n </div>\n</mat-menu>\n", styles: [".dm-color-picker-wrapper{display:flex;flex-direction:column;align-items:start;width:fit-content}.dm-color-picker-wrapper .dm-color-picker{cursor:pointer;padding:3px;box-shadow:0 0 2.5px 1px #00000080}.dm-color-picker-wrapper .dm-color-picker-slider-wrapper{display:flex;align-items:center;gap:5px}.dm-color-picker-menu{display:flex;flex-direction:row;flex-wrap:wrap;align-items:center;justify-content:center;width:100%;height:100%}.dm-color-picker-menu .dm-color-div{width:30px;height:30px;border-radius:50%;margin:5px;cursor:pointer;box-shadow:0 0 2.5px 1px #00000080}.dm-color-picker-menu .dm-color-div:hover{box-shadow:0 0 5px 2px #00000080}.pointer{cursor:pointer}\n"], dependencies: [{ 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: "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: "ngmodule", type: MatTooltipModule }, { kind: "directive", type: i2$1.MatTooltip, selector: "[matTooltip]", inputs: ["matTooltipPosition", "matTooltipPositionAtOrigin", "matTooltipDisabled", "matTooltipShowDelay", "matTooltipHideDelay", "matTooltipTouchGestures", "matTooltip", "matTooltipClass"], exportAs: ["matTooltip"] }, { kind: "ngmodule", type: CommonModule }, { kind: "ngmodule", type: MatSliderModule }, { kind: "component", type: i3$1.MatSlider, selector: "mat-slider", inputs: ["disabled", "discrete", "showTickMarks", "min", "color", "disableRipple", "max", "step", "displayWith"], exportAs: ["matSlider"] }, { kind: "directive", type: i3$1.MatSliderThumb, selector: "input[matSliderThumb]", inputs: ["value"], outputs: ["valueChange", "dragStart", "dragEnd"], exportAs: ["matSliderThumb"] }] });
749
751
  }
750
752
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.3", ngImport: i0, type: DmColorPicker, decorators: [{
751
753
  type: Component,
@@ -886,12 +888,17 @@ const shouldCacheColumn = (column) => {
886
888
  };
887
889
  const DM_TABLE_HEADER_BACKGROUND_COLOR_CSS_VAR = '--dm-table-header-background-color';
888
890
  const DM_TABLE_HEADER_COLOR_CSS_VAR = '--dm-table-header-color';
891
+ const DM_TABLE_SCROLLBAR_COLOR_CSS_VAR = '--dm-table-scrollbar-color';
892
+ const DM_TABLE_SCROLLBAR_HOVER_COLOR_CSS_VAR = '--dm-table-scrollbar-hover-color';
893
+ const DM_TABLE_SCROLLBAR_BACKGROUND_COLOR_CSS_VAR = '--dm-table-scrollbar-background-color';
894
+ const DM_TABLE_SCROLLBAR_WIDTH_CSS_VAR = '--dm-table-scrollbar-width';
895
+ const DM_TABLE_SCROLLBAR_BORDER_RADIUS_CSS_VAR = '--dm-table-scrollbar-border-radius';
889
896
 
890
897
  class DmTableCellHost {
891
898
  component = input.required(...(ngDevMode ? [{ debugName: "component" }] : []));
892
899
  context = input.required(...(ngDevMode ? [{ debugName: "context" }] : []));
893
900
  static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.0.3", ngImport: i0, type: DmTableCellHost, deps: [], target: i0.ɵɵFactoryTarget.Component });
894
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "21.0.3", type: DmTableCellHost, isStandalone: true, selector: "dm-table-cell-host", inputs: { component: { classPropertyName: "component", publicName: "component", isSignal: true, isRequired: true, transformFunction: null }, context: { classPropertyName: "context", publicName: "context", isSignal: true, isRequired: true, transformFunction: null } }, ngImport: i0, template: "<ng-container\n *ngComponentOutlet=\"\n component();\n inputs: {\n row: context().row,\n column: context().column,\n }\n \"\n></ng-container>\n", styles: [""], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i10.NgComponentOutlet, selector: "[ngComponentOutlet]", inputs: ["ngComponentOutlet", "ngComponentOutletInputs", "ngComponentOutletInjector", "ngComponentOutletEnvironmentInjector", "ngComponentOutletContent", "ngComponentOutletNgModule"], exportAs: ["ngComponentOutlet"] }] });
901
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "21.0.3", type: DmTableCellHost, isStandalone: true, selector: "dm-table-cell-host", inputs: { component: { classPropertyName: "component", publicName: "component", isSignal: true, isRequired: true, transformFunction: null }, context: { classPropertyName: "context", publicName: "context", isSignal: true, isRequired: true, transformFunction: null } }, ngImport: i0, template: "<ng-container\n *ngComponentOutlet=\"\n component();\n inputs: {\n row: context().row,\n column: context().column,\n }\n \"\n></ng-container>\n", styles: [""], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i11.NgComponentOutlet, selector: "[ngComponentOutlet]", inputs: ["ngComponentOutlet", "ngComponentOutletInputs", "ngComponentOutletInjector", "ngComponentOutletEnvironmentInjector", "ngComponentOutletContent", "ngComponentOutletNgModule"], exportAs: ["ngComponentOutlet"] }] });
895
902
  }
896
903
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.3", ngImport: i0, type: DmTableCellHost, decorators: [{
897
904
  type: Component,
@@ -1258,8 +1265,9 @@ const DEFAULT_TABLE_STYLE = {
1258
1265
  'margin-bottom': '0',
1259
1266
  },
1260
1267
  },
1261
- total_row_style: {},
1262
- scrollbar: {},
1268
+ scrollbar: {
1269
+ width: '6px',
1270
+ },
1263
1271
  };
1264
1272
  const DEFAULT_PRINT_TABLE_BUTTON = {
1265
1273
  icon: 'print',
@@ -1405,7 +1413,7 @@ class DmTable {
1405
1413
  enablePagination = input(false, { ...(ngDevMode ? { debugName: "enablePagination" } : {}), transform: booleanAttribute });
1406
1414
  autoPaginationAboveRowsCount = input(100, { ...(ngDevMode ? { debugName: "autoPaginationAboveRowsCount" } : {}), transform: numberAttribute });
1407
1415
  paginatorSettings = input(DEFAULT_PAGINATOR_SETTINGS, ...(ngDevMode ? [{ debugName: "paginatorSettings" }] : []));
1408
- enableLoadingOverlay = input(true, { ...(ngDevMode ? { debugName: "enableLoadingOverlay" } : {}), transform: booleanAttribute });
1416
+ enableLoadingProgressbar = input(true, { ...(ngDevMode ? { debugName: "enableLoadingProgressbar" } : {}), transform: booleanAttribute });
1409
1417
  enableColumnsDragAndDrop = input(false, { ...(ngDevMode ? { debugName: "enableColumnsDragAndDrop" } : {}), transform: booleanAttribute });
1410
1418
  enableColumnsDragHandle = input(true, { ...(ngDevMode ? { debugName: "enableColumnsDragHandle" } : {}), transform: booleanAttribute });
1411
1419
  enableTotalRow = input(false, { ...(ngDevMode ? { debugName: "enableTotalRow" } : {}), transform: booleanAttribute });
@@ -1420,8 +1428,29 @@ class DmTable {
1420
1428
  const defaults = { ...DEFAULT_TABLE_STYLE };
1421
1429
  const custom = this.tableStyle() || {};
1422
1430
  const newStyle = deepMerge(defaults, custom);
1431
+ this.saveScrollbarStyle(newStyle);
1423
1432
  return newStyle;
1424
1433
  }, ...(ngDevMode ? [{ debugName: "mergedTableStyle" }] : []));
1434
+ saveScrollbarStyle(mergedStyle) {
1435
+ console.log({ mergedStyle });
1436
+ const scrollbarColor = mergedStyle?.scrollbar?.['color'] ||
1437
+ mergedStyle?.table?.thead?.root?.['background-color'] ||
1438
+ '#949496';
1439
+ const scrollbarBackgroundColor = mergedStyle?.scrollbar?.['backgroundColor'] ||
1440
+ mergedStyle?.table?.tbody?.tr?.['background-color'] ||
1441
+ mergedStyle?.table?.tbody?.odd_row_style?.tr?.['background-color'] ||
1442
+ '#e0e0e0';
1443
+ const scrollbarHoverColor = mergedStyle?.scrollbar?.['hoverColor'] ||
1444
+ mergedStyle?.table?.thead?.root?.['background-color'] ||
1445
+ '#5f5f5f';
1446
+ const scrollbarWidth = mergedStyle?.scrollbar?.['width'] || '7px';
1447
+ const scrollbarBorderRadius = mergedStyle?.scrollbar?.['borderRadius'] || '4px';
1448
+ document.documentElement.style.setProperty(DM_TABLE_SCROLLBAR_COLOR_CSS_VAR, scrollbarColor);
1449
+ document.documentElement.style.setProperty(DM_TABLE_SCROLLBAR_BACKGROUND_COLOR_CSS_VAR, scrollbarBackgroundColor);
1450
+ document.documentElement.style.setProperty(DM_TABLE_SCROLLBAR_HOVER_COLOR_CSS_VAR, scrollbarHoverColor);
1451
+ document.documentElement.style.setProperty(DM_TABLE_SCROLLBAR_WIDTH_CSS_VAR, scrollbarWidth);
1452
+ document.documentElement.style.setProperty(DM_TABLE_SCROLLBAR_BORDER_RADIUS_CSS_VAR, scrollbarBorderRadius);
1453
+ }
1425
1454
  hoveredRowIndex = signal(null, ...(ngDevMode ? [{ debugName: "hoveredRowIndex" }] : []));
1426
1455
  datasource = signal(new DmCmpsDataSource([]), ...(ngDevMode ? [{ debugName: "datasource" }] : []));
1427
1456
  runtimeColumns = computed(() => {
@@ -1645,6 +1674,11 @@ class DmTable {
1645
1674
  row,
1646
1675
  column: column,
1647
1676
  });
1677
+ resetRowCache(row) {
1678
+ this.runtimeColumns().forEach((col) => {
1679
+ col.__cache?.delete(row);
1680
+ });
1681
+ }
1648
1682
  resolveCellValue(row, column) {
1649
1683
  if (column.type === '$index') {
1650
1684
  return null;
@@ -2030,6 +2064,7 @@ class DmTable {
2030
2064
  else {
2031
2065
  row[column.field] = option.value;
2032
2066
  }
2067
+ this.resetRowCache(row);
2033
2068
  this.markRowAsModified(row);
2034
2069
  }
2035
2070
  inputCellChangeHandler(row, column, event) {
@@ -2055,6 +2090,7 @@ class DmTable {
2055
2090
  else {
2056
2091
  row[column.field] = newValue;
2057
2092
  }
2093
+ this.resetRowCache(row);
2058
2094
  this.markRowAsModified(row);
2059
2095
  }
2060
2096
  inputCellCheckboxChangeHandler(row, column, event) {
@@ -2068,6 +2104,39 @@ class DmTable {
2068
2104
  if (onFaild && typeof onFaild === 'function') {
2069
2105
  onFaild(row, newValue);
2070
2106
  }
2107
+ event.source.toggle();
2108
+ console.warn('Input value is not valid:', newValue);
2109
+ return;
2110
+ }
2111
+ }
2112
+ if (valueSetter && typeof valueSetter === 'function') {
2113
+ valueSetter(row, newValue);
2114
+ }
2115
+ else {
2116
+ row[column.field] = newValue;
2117
+ }
2118
+ this.resetRowCache(row);
2119
+ this.markRowAsModified(row);
2120
+ }
2121
+ getSlideToggleTooltip(row, column) {
2122
+ const tooltip = column.slideToggleTooltip;
2123
+ if (tooltip && typeof tooltip === 'function') {
2124
+ return tooltip(row);
2125
+ }
2126
+ return tooltip || '';
2127
+ }
2128
+ onSlideToggleChange(row, column, change) {
2129
+ const newValue = change.checked;
2130
+ const valueSetter = column.valueSetter;
2131
+ const validator = column.inputValidator;
2132
+ if (validator && typeof validator === 'function') {
2133
+ const isValid = validator(row, newValue);
2134
+ if (!isValid) {
2135
+ const onFaild = column.onInputValidatorFailed;
2136
+ if (onFaild && typeof onFaild === 'function') {
2137
+ onFaild(row, newValue);
2138
+ }
2139
+ change.source.toggle();
2071
2140
  console.warn('Input value is not valid:', newValue);
2072
2141
  return;
2073
2142
  }
@@ -2078,16 +2147,21 @@ class DmTable {
2078
2147
  else {
2079
2148
  row[column.field] = newValue;
2080
2149
  }
2150
+ if (column.onSlideToggleChange && typeof column.onSlideToggleChange === 'function') {
2151
+ column.onSlideToggleChange(row, change);
2152
+ }
2153
+ this.resetRowCache(row);
2081
2154
  this.markRowAsModified(row);
2082
2155
  }
2083
2156
  static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.0.3", ngImport: i0, type: DmTable, deps: [], target: i0.ɵɵFactoryTarget.Component });
2084
- 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 }, enableLoadingOverlay: { classPropertyName: "enableLoadingOverlay", publicName: "enableLoadingOverlay", 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 (enableLoadingOverlay()) {\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 i) {\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 ? row[column.field] : '')\">{{\n resolveCellValue(row, column)\n }}</a>\n } @case ('mail') {\n <a [href]=\"'mailto:' + (column.field ? row[column.field] : '')\">{{\n resolveCellValue(row, column)\n }}</a>\n } @case ('link') {\n <a\n [href]=\"column.field ? 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 ? 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 ('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()) {\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 (input)=\"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<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<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-cmps-table-scrollbar-width, 7px);height:var(--dm-cmps-table-scrollbar-width, 7px)}#dm-table-component-wrapper ::-webkit-scrollbar-track{background:var(--dm-cmps-table-scrollbar-background-color, #e0e0e0)}#dm-table-component-wrapper ::-webkit-scrollbar-thumb{background:var(--dm-cmps-table-scrollbar-color, #949496);border-radius:6px}#dm-table-component-wrapper ::-webkit-scrollbar-thumb:hover{background:var(--dm-cmps-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: MatProgressBarModule }, { kind: "component", type: i1$1.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: i5$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: i7.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: i7.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: i9.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: i9.MatMenuItem, selector: "[mat-menu-item]", inputs: ["role", "disabled", "disableRipple"], exportAs: ["matMenuItem"] }, { kind: "directive", type: i9.MatMenuContent, selector: "ng-template[matMenuContent]" }, { kind: "directive", type: i9.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: i10.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i10.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "directive", type: i10.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()) {\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"] }] });
2085
2158
  }
2086
2159
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.3", ngImport: i0, type: DmTable, decorators: [{
2087
2160
  type: Component,
2088
2161
  args: [{ selector: 'dm-table', imports: [
2089
2162
  DmImportantStyleDirective,
2090
2163
  MatProgressSpinnerModule,
2164
+ MatSlideToggleModule,
2091
2165
  MatProgressBarModule,
2092
2166
  ReactiveFormsModule,
2093
2167
  MatFormFieldModule,
@@ -2105,14 +2179,14 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.3", ngImpor
2105
2179
  MatTooltip,
2106
2180
  MatIcon,
2107
2181
  CdkDrag,
2108
- ], 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 (enableLoadingOverlay()) {\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 i) {\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 ? row[column.field] : '')\">{{\n resolveCellValue(row, column)\n }}</a>\n } @case ('mail') {\n <a [href]=\"'mailto:' + (column.field ? row[column.field] : '')\">{{\n resolveCellValue(row, column)\n }}</a>\n } @case ('link') {\n <a\n [href]=\"column.field ? 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 ? 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 ('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()) {\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 (input)=\"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<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<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-cmps-table-scrollbar-width, 7px);height:var(--dm-cmps-table-scrollbar-width, 7px)}#dm-table-component-wrapper ::-webkit-scrollbar-track{background:var(--dm-cmps-table-scrollbar-background-color, #e0e0e0)}#dm-table-component-wrapper ::-webkit-scrollbar-thumb{background:var(--dm-cmps-table-scrollbar-color, #949496);border-radius:6px}#dm-table-component-wrapper ::-webkit-scrollbar-thumb:hover{background:var(--dm-cmps-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()) {\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"] }]
2109
2183
  }], ctorParameters: () => [], propDecorators: { onShiftKeyDown: [{
2110
2184
  type: HostListener,
2111
2185
  args: ['window:keydown.shift', ['$event']]
2112
2186
  }], onShiftKeyUp: [{
2113
2187
  type: HostListener,
2114
2188
  args: ['window:keyup.shift', ['$event']]
2115
- }], tableId: [{ type: i0.Input, args: [{ isSignal: true, alias: "tableId", required: false }] }], dataSource: [{ type: i0.Input, args: [{ isSignal: true, alias: "dataSource", required: false }] }], columns: [{ type: i0.Input, args: [{ isSignal: true, alias: "columns", required: false }] }], noDataMessage: [{ type: i0.Input, args: [{ isSignal: true, alias: "noDataMessage", required: false }] }], enableSearch: [{ type: i0.Input, args: [{ isSignal: true, alias: "enableSearch", required: false }] }], searchPlaceholder: [{ type: i0.Input, args: [{ isSignal: true, alias: "searchPlaceholder", required: false }] }], clearSearchTooltip: [{ type: i0.Input, args: [{ isSignal: true, alias: "clearSearchTooltip", required: false }] }], searchInputAppearance: [{ type: i0.Input, args: [{ isSignal: true, alias: "searchInputAppearance", required: false }] }], filterPredicate: [{ type: i0.Input, args: [{ isSignal: true, alias: "filterPredicate", required: false }] }], actionButtons: [{ type: i0.Input, args: [{ isSignal: true, alias: "actionButtons", required: false }] }], enablePrint: [{ type: i0.Input, args: [{ isSignal: true, alias: "enablePrint", required: false }] }], printButton: [{ type: i0.Input, args: [{ isSignal: true, alias: "printButton", required: false }] }], enablePagination: [{ type: i0.Input, args: [{ isSignal: true, alias: "enablePagination", required: false }] }], autoPaginationAboveRowsCount: [{ type: i0.Input, args: [{ isSignal: true, alias: "autoPaginationAboveRowsCount", required: false }] }], paginatorSettings: [{ type: i0.Input, args: [{ isSignal: true, alias: "paginatorSettings", required: false }] }], enableLoadingOverlay: [{ type: i0.Input, args: [{ isSignal: true, alias: "enableLoadingOverlay", required: false }] }], enableColumnsDragAndDrop: [{ type: i0.Input, args: [{ isSignal: true, alias: "enableColumnsDragAndDrop", required: false }] }], enableColumnsDragHandle: [{ type: i0.Input, args: [{ isSignal: true, alias: "enableColumnsDragHandle", required: false }] }], enableTotalRow: [{ type: i0.Input, args: [{ isSignal: true, alias: "enableTotalRow", required: false }] }], tableStyle: [{ type: i0.Input, args: [{ isSignal: true, alias: "tableStyle", required: false }] }], tableClasses: [{ type: i0.Input, args: [{ isSignal: true, alias: "tableClasses", required: false }] }], rowStyleFn: [{ type: i0.Input, args: [{ isSignal: true, alias: "rowStyleFn", required: false }] }], editColumnsVisibility: [{ type: i0.Input, args: [{ isSignal: true, alias: "editColumnsVisibility", required: false }] }], editColumnsVisibilityButton: [{ type: i0.Input, args: [{ isSignal: true, alias: "editColumnsVisibilityButton", required: false }] }], editColumnsVisibilitySelectAllLabel: [{ type: i0.Input, args: [{ isSignal: true, alias: "editColumnsVisibilitySelectAllLabel", required: false }] }], rowIdentifierField: [{ type: i0.Input, args: [{ isSignal: true, alias: "rowIdentifierField", required: false }] }] } });
2189
+ }], tableId: [{ type: i0.Input, args: [{ isSignal: true, alias: "tableId", required: false }] }], dataSource: [{ type: i0.Input, args: [{ isSignal: true, alias: "dataSource", required: false }] }], columns: [{ type: i0.Input, args: [{ isSignal: true, alias: "columns", required: false }] }], noDataMessage: [{ type: i0.Input, args: [{ isSignal: true, alias: "noDataMessage", required: false }] }], enableSearch: [{ type: i0.Input, args: [{ isSignal: true, alias: "enableSearch", required: false }] }], searchPlaceholder: [{ type: i0.Input, args: [{ isSignal: true, alias: "searchPlaceholder", required: false }] }], clearSearchTooltip: [{ type: i0.Input, args: [{ isSignal: true, alias: "clearSearchTooltip", required: false }] }], searchInputAppearance: [{ type: i0.Input, args: [{ isSignal: true, alias: "searchInputAppearance", required: false }] }], filterPredicate: [{ type: i0.Input, args: [{ isSignal: true, alias: "filterPredicate", required: false }] }], actionButtons: [{ type: i0.Input, args: [{ isSignal: true, alias: "actionButtons", required: false }] }], enablePrint: [{ type: i0.Input, args: [{ isSignal: true, alias: "enablePrint", required: false }] }], printButton: [{ type: i0.Input, args: [{ isSignal: true, alias: "printButton", required: false }] }], enablePagination: [{ type: i0.Input, args: [{ isSignal: true, alias: "enablePagination", required: false }] }], autoPaginationAboveRowsCount: [{ type: i0.Input, args: [{ isSignal: true, alias: "autoPaginationAboveRowsCount", required: false }] }], paginatorSettings: [{ type: i0.Input, args: [{ isSignal: true, alias: "paginatorSettings", required: false }] }], enableLoadingProgressbar: [{ type: i0.Input, args: [{ isSignal: true, alias: "enableLoadingProgressbar", required: false }] }], enableColumnsDragAndDrop: [{ type: i0.Input, args: [{ isSignal: true, alias: "enableColumnsDragAndDrop", required: false }] }], enableColumnsDragHandle: [{ type: i0.Input, args: [{ isSignal: true, alias: "enableColumnsDragHandle", required: false }] }], enableTotalRow: [{ type: i0.Input, args: [{ isSignal: true, alias: "enableTotalRow", required: false }] }], tableStyle: [{ type: i0.Input, args: [{ isSignal: true, alias: "tableStyle", required: false }] }], tableClasses: [{ type: i0.Input, args: [{ isSignal: true, alias: "tableClasses", required: false }] }], rowStyleFn: [{ type: i0.Input, args: [{ isSignal: true, alias: "rowStyleFn", required: false }] }], editColumnsVisibility: [{ type: i0.Input, args: [{ isSignal: true, alias: "editColumnsVisibility", required: false }] }], editColumnsVisibilityButton: [{ type: i0.Input, args: [{ isSignal: true, alias: "editColumnsVisibilityButton", required: false }] }], editColumnsVisibilitySelectAllLabel: [{ type: i0.Input, args: [{ isSignal: true, alias: "editColumnsVisibilitySelectAllLabel", required: false }] }], rowIdentifierField: [{ type: i0.Input, args: [{ isSignal: true, alias: "rowIdentifierField", required: false }] }] } });
2116
2190
 
2117
2191
  /**
2118
2192
  * Generated bundle index. Do not edit.