@dmlibs/dm-cmps 0.1.37 → 0.2.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/fesm2022/dmlibs-dm-cmps.mjs +454 -208
- package/fesm2022/dmlibs-dm-cmps.mjs.map +1 -1
- package/package.json +5 -4
- package/types/dmlibs-dm-cmps.d.ts +60 -4
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import * as i0 from '@angular/core';
|
|
2
|
-
import { signal, input, booleanAttribute, model, computed, output, effect, forwardRef, Component, Injectable, numberAttribute, Input, Directive, HostListener, Pipe } from '@angular/core';
|
|
2
|
+
import { signal, input, booleanAttribute, model, computed, output, effect, forwardRef, ChangeDetectionStrategy, Component, Injectable, numberAttribute, Input, Directive, untracked, HostListener, Pipe } from '@angular/core';
|
|
3
3
|
import { toObservable } from '@angular/core/rxjs-interop';
|
|
4
4
|
import { Subject, Subscription, switchMap, debounceTime, distinctUntilChanged } from 'rxjs';
|
|
5
5
|
import * as i2 from '@angular/material/form-field';
|
|
@@ -37,8 +37,10 @@ class DmCmpsDataSource {
|
|
|
37
37
|
data;
|
|
38
38
|
filteredData;
|
|
39
39
|
_resultData;
|
|
40
|
-
result = signal([],
|
|
41
|
-
|
|
40
|
+
result = signal([], /* @ts-ignore */
|
|
41
|
+
...(ngDevMode ? [{ debugName: "result" }] : /* istanbul ignore next */ []));
|
|
42
|
+
resultVersion = signal(0, /* @ts-ignore */
|
|
43
|
+
...(ngDevMode ? [{ debugName: "resultVersion" }] : /* istanbul ignore next */ []));
|
|
42
44
|
paginationEnabled = false;
|
|
43
45
|
currentPageIndex = 0;
|
|
44
46
|
pageSize = 10;
|
|
@@ -77,13 +79,15 @@ class DmCmpsDataSource {
|
|
|
77
79
|
}
|
|
78
80
|
return match(filter);
|
|
79
81
|
};
|
|
80
|
-
isLoading = signal(false,
|
|
82
|
+
isLoading = signal(false, /* @ts-ignore */
|
|
83
|
+
...(ngDevMode ? [{ debugName: "isLoading" }] : /* istanbul ignore next */ []));
|
|
81
84
|
objectToFilterBy = null;
|
|
82
85
|
fieldsToSearchIn = [];
|
|
83
86
|
sortMap = [];
|
|
84
87
|
sortFn = null;
|
|
85
88
|
searchTerms$ = new Subject();
|
|
86
|
-
searchDebounceTime = signal(300,
|
|
89
|
+
searchDebounceTime = signal(300, /* @ts-ignore */
|
|
90
|
+
...(ngDevMode ? [{ debugName: "searchDebounceTime" }] : /* istanbul ignore next */ []));
|
|
87
91
|
subscription = new Subscription();
|
|
88
92
|
/**
|
|
89
93
|
* builds a new DmCmpsDataSource
|
|
@@ -101,6 +105,9 @@ class DmCmpsDataSource {
|
|
|
101
105
|
this.subscription.add(toObservable(this.searchDebounceTime)
|
|
102
106
|
.pipe(switchMap((debounceMs) => this.searchTerms$.pipe(debounceTime(debounceMs), distinctUntilChanged((p, c) => p === c))))
|
|
103
107
|
.subscribe((term) => {
|
|
108
|
+
// a new search term always starts from the first page; data updates
|
|
109
|
+
// (which also flow through applySearch) keep the current page index
|
|
110
|
+
this.currentPageIndex = 0;
|
|
104
111
|
this.searchTerm = term;
|
|
105
112
|
this.applySearch();
|
|
106
113
|
}));
|
|
@@ -190,6 +197,11 @@ class DmCmpsDataSource {
|
|
|
190
197
|
getCurrentPageIndex() {
|
|
191
198
|
return this.currentPageIndex;
|
|
192
199
|
}
|
|
200
|
+
setCurrentPageIndex(index) {
|
|
201
|
+
this.currentPageIndex = Math.max(0, Math.min(index, this.getTotalPagesCount() - 1));
|
|
202
|
+
this.updateResultSignal();
|
|
203
|
+
return this.currentPageIndex;
|
|
204
|
+
}
|
|
193
205
|
getTotalPagesCount() {
|
|
194
206
|
if (this.pageSize <= 0) {
|
|
195
207
|
return 1;
|
|
@@ -229,6 +241,9 @@ class DmCmpsDataSource {
|
|
|
229
241
|
return new Promise((resolve) => {
|
|
230
242
|
const res = (() => {
|
|
231
243
|
if (this.isPaginationEnabled()) {
|
|
244
|
+
// keep the current page when the result still reaches it, otherwise fall back
|
|
245
|
+
// to the last valid page (e.g. after the datasource was replaced by a smaller one)
|
|
246
|
+
this.currentPageIndex = Math.max(0, Math.min(this.currentPageIndex, this.getTotalPagesCount() - 1));
|
|
232
247
|
const startIndex = this.currentPageIndex * this.pageSize;
|
|
233
248
|
return this._resultData.slice(startIndex, startIndex + this.pageSize);
|
|
234
249
|
}
|
|
@@ -260,7 +275,6 @@ class DmCmpsDataSource {
|
|
|
260
275
|
this._resultData = [...this.filteredData];
|
|
261
276
|
}
|
|
262
277
|
else {
|
|
263
|
-
this.currentPageIndex = 0;
|
|
264
278
|
this._resultData = this.filteredData.filter((item) => this.filterPredicate(item, this.searchTerm));
|
|
265
279
|
}
|
|
266
280
|
await this.updateResultSignal();
|
|
@@ -395,48 +409,73 @@ const SEARCH_SECTION_BG_COLOR_VAR = '--dm-mat-select-search-section-bg-color';
|
|
|
395
409
|
const SEARCH_SECTION_BG_COLOR_DEFAULT_VALUE = '#faf9fd';
|
|
396
410
|
|
|
397
411
|
class DmMatSelect {
|
|
398
|
-
formFieldClass = input('',
|
|
399
|
-
|
|
400
|
-
|
|
401
|
-
|
|
402
|
-
|
|
403
|
-
|
|
404
|
-
|
|
405
|
-
|
|
406
|
-
|
|
407
|
-
|
|
408
|
-
|
|
409
|
-
|
|
410
|
-
|
|
411
|
-
|
|
412
|
-
|
|
413
|
-
|
|
414
|
-
|
|
415
|
-
|
|
416
|
-
|
|
417
|
-
|
|
412
|
+
formFieldClass = input('', /* @ts-ignore */
|
|
413
|
+
...(ngDevMode ? [{ debugName: "formFieldClass" }] : /* istanbul ignore next */ []));
|
|
414
|
+
wrapperClass = input('', /* @ts-ignore */
|
|
415
|
+
...(ngDevMode ? [{ debugName: "wrapperClass" }] : /* istanbul ignore next */ []));
|
|
416
|
+
appearance = input('fill', /* @ts-ignore */
|
|
417
|
+
...(ngDevMode ? [{ debugName: "appearance" }] : /* istanbul ignore next */ []));
|
|
418
|
+
multiple = input(false, { ...(ngDevMode ? { debugName: "multiple" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
|
|
419
|
+
selectAllEnabled = input(false, { ...(ngDevMode ? { debugName: "selectAllEnabled" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
|
|
420
|
+
selectAllLabel = input('בחר הכל', /* @ts-ignore */
|
|
421
|
+
...(ngDevMode ? [{ debugName: "selectAllLabel" }] : /* istanbul ignore next */ []));
|
|
422
|
+
label = input('', /* @ts-ignore */
|
|
423
|
+
...(ngDevMode ? [{ debugName: "label" }] : /* istanbul ignore next */ []));
|
|
424
|
+
options = input([], /* @ts-ignore */
|
|
425
|
+
...(ngDevMode ? [{ debugName: "options" }] : /* istanbul ignore next */ []));
|
|
426
|
+
optionValueKey = input('_id', /* @ts-ignore */
|
|
427
|
+
...(ngDevMode ? [{ debugName: "optionValueKey" }] : /* istanbul ignore next */ []));
|
|
428
|
+
optionLabelKey = input('name', /* @ts-ignore */
|
|
429
|
+
...(ngDevMode ? [{ debugName: "optionLabelKey" }] : /* istanbul ignore next */ []));
|
|
430
|
+
searchable = input(false, { ...(ngDevMode ? { debugName: "searchable" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
|
|
431
|
+
returnObject = input(false, { ...(ngDevMode ? { debugName: "returnObject" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
|
|
432
|
+
required = input(false, { ...(ngDevMode ? { debugName: "required" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
|
|
433
|
+
disabled = input(false, { ...(ngDevMode ? { debugName: "disabled" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
|
|
434
|
+
error = input(null, /* @ts-ignore */
|
|
435
|
+
...(ngDevMode ? [{ debugName: "error" }] : /* istanbul ignore next */ []));
|
|
436
|
+
searchPlaceholder = input('חפש...', /* @ts-ignore */
|
|
437
|
+
...(ngDevMode ? [{ debugName: "searchPlaceholder" }] : /* istanbul ignore next */ []));
|
|
438
|
+
emptyOption = input(false, { ...(ngDevMode ? { debugName: "emptyOption" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
|
|
439
|
+
emptyOptionLabel = input('ללא', /* @ts-ignore */
|
|
440
|
+
...(ngDevMode ? [{ debugName: "emptyOptionLabel" }] : /* istanbul ignore next */ []));
|
|
441
|
+
emptyOptionValue = input(null, /* @ts-ignore */
|
|
442
|
+
...(ngDevMode ? [{ debugName: "emptyOptionValue" }] : /* istanbul ignore next */ []));
|
|
443
|
+
optionNameFormat = input(null, /* @ts-ignore */
|
|
444
|
+
...(ngDevMode ? [{ debugName: "optionNameFormat" }] : /* istanbul ignore next */ []));
|
|
418
445
|
_optionNameFormat = null;
|
|
419
|
-
datasource = signal(new DmCmpsDataSource(),
|
|
420
|
-
|
|
421
|
-
|
|
422
|
-
|
|
423
|
-
|
|
424
|
-
|
|
425
|
-
|
|
446
|
+
datasource = signal(new DmCmpsDataSource(), /* @ts-ignore */
|
|
447
|
+
...(ngDevMode ? [{ debugName: "datasource" }] : /* istanbul ignore next */ []));
|
|
448
|
+
value = model(null, /* @ts-ignore */
|
|
449
|
+
...(ngDevMode ? [{ debugName: "value" }] : /* istanbul ignore next */ []));
|
|
450
|
+
formControl = input(null, /* @ts-ignore */
|
|
451
|
+
...(ngDevMode ? [{ debugName: "formControl" }] : /* istanbul ignore next */ []));
|
|
452
|
+
panelWidth = input('auto', /* @ts-ignore */
|
|
453
|
+
...(ngDevMode ? [{ debugName: "panelWidth" }] : /* istanbul ignore next */ []));
|
|
454
|
+
panelClass = input('', /* @ts-ignore */
|
|
455
|
+
...(ngDevMode ? [{ debugName: "panelClass" }] : /* istanbul ignore next */ []));
|
|
456
|
+
searchSectionBackgroundColor = input(SEARCH_SECTION_BG_COLOR_DEFAULT_VALUE, /* @ts-ignore */
|
|
457
|
+
...(ngDevMode ? [{ debugName: "searchSectionBackgroundColor" }] : /* istanbul ignore next */ []));
|
|
458
|
+
sortBySelectedOnTop = input(false, { ...(ngDevMode ? { debugName: "sortBySelectedOnTop" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
|
|
426
459
|
internalControl = new FormControl(null);
|
|
427
|
-
control = computed(() => this.formControl() ?? this.internalControl,
|
|
460
|
+
control = computed(() => this.formControl() ?? this.internalControl, /* @ts-ignore */
|
|
461
|
+
...(ngDevMode ? [{ debugName: "control" }] : /* istanbul ignore next */ []));
|
|
428
462
|
selectionChange = output();
|
|
429
463
|
onSelectionChange = output();
|
|
430
|
-
icon = input(null,
|
|
464
|
+
icon = input(null, /* @ts-ignore */
|
|
465
|
+
...(ngDevMode ? [{ debugName: "icon" }] : /* istanbul ignore next */ []));
|
|
431
466
|
isBootstrapIcon = computed(() => {
|
|
432
467
|
return this.icon() ? this.icon().includes('bi-') : false;
|
|
433
|
-
},
|
|
434
|
-
|
|
435
|
-
|
|
436
|
-
|
|
437
|
-
|
|
438
|
-
|
|
439
|
-
|
|
468
|
+
}, /* @ts-ignore */
|
|
469
|
+
...(ngDevMode ? [{ debugName: "isBootstrapIcon" }] : /* istanbul ignore next */ []));
|
|
470
|
+
noDataLabel = input('אין נתונים להצגה', /* @ts-ignore */
|
|
471
|
+
...(ngDevMode ? [{ debugName: "noDataLabel" }] : /* istanbul ignore next */ []));
|
|
472
|
+
clearSearchAfterSelect = input(true, { ...(ngDevMode ? { debugName: "clearSearchAfterSelect" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
|
|
473
|
+
clearSearchButtonTooltip = input('נקה חיפוש', /* @ts-ignore */
|
|
474
|
+
...(ngDevMode ? [{ debugName: "clearSearchButtonTooltip" }] : /* istanbul ignore next */ []));
|
|
475
|
+
focusSearchInputOnPanelOpen = input(true, { ...(ngDevMode ? { debugName: "focusSearchInputOnPanelOpen" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
|
|
476
|
+
hideErrorArea = input(false, { ...(ngDevMode ? { debugName: "hideErrorArea" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
|
|
477
|
+
filterPredicate = input(null, /* @ts-ignore */
|
|
478
|
+
...(ngDevMode ? [{ debugName: "filterPredicate" }] : /* istanbul ignore next */ []));
|
|
440
479
|
_filterPredicate = null;
|
|
441
480
|
propertiesToSkipInSearch = input([
|
|
442
481
|
'_id',
|
|
@@ -447,18 +486,26 @@ class DmMatSelect {
|
|
|
447
486
|
'updatedBy',
|
|
448
487
|
'creatorName',
|
|
449
488
|
'updaterName',
|
|
450
|
-
],
|
|
489
|
+
], /* @ts-ignore */
|
|
490
|
+
...(ngDevMode ? [{ debugName: "propertiesToSkipInSearch" }] : /* istanbul ignore next */ []));
|
|
451
491
|
simpleArray = computed(() => {
|
|
452
492
|
return typeof this.options()[0] === 'string' || typeof this.options()[0] === 'number';
|
|
453
|
-
},
|
|
454
|
-
|
|
455
|
-
|
|
456
|
-
|
|
457
|
-
|
|
493
|
+
}, /* @ts-ignore */
|
|
494
|
+
...(ngDevMode ? [{ debugName: "simpleArray" }] : /* istanbul ignore next */ []));
|
|
495
|
+
optionTemplate = input(null, /* @ts-ignore */
|
|
496
|
+
...(ngDevMode ? [{ debugName: "optionTemplate" }] : /* istanbul ignore next */ []));
|
|
497
|
+
selectTriggerTemplate = input(null, /* @ts-ignore */
|
|
498
|
+
...(ngDevMode ? [{ debugName: "selectTriggerTemplate" }] : /* istanbul ignore next */ []));
|
|
499
|
+
optionStyleFn = input(null, /* @ts-ignore */
|
|
500
|
+
...(ngDevMode ? [{ debugName: "optionStyleFn" }] : /* istanbul ignore next */ []));
|
|
501
|
+
optionDisabledFn = input(null, /* @ts-ignore */
|
|
502
|
+
...(ngDevMode ? [{ debugName: "optionDisabledFn" }] : /* istanbul ignore next */ []));
|
|
458
503
|
optionDisabledCache = new WeakMap();
|
|
459
504
|
optionStyleCache = new WeakMap();
|
|
460
|
-
selectedOptionsIdsSet = signal(new Set(),
|
|
461
|
-
|
|
505
|
+
selectedOptionsIdsSet = signal(new Set(), /* @ts-ignore */
|
|
506
|
+
...(ngDevMode ? [{ debugName: "selectedOptionsIdsSet" }] : /* istanbul ignore next */ []));
|
|
507
|
+
filterText = model('', /* @ts-ignore */
|
|
508
|
+
...(ngDevMode ? [{ debugName: "filterText" }] : /* istanbul ignore next */ []));
|
|
462
509
|
checkIfAllSelected = computed(() => {
|
|
463
510
|
const options = this.datasource().result();
|
|
464
511
|
const selected = this.control().value;
|
|
@@ -470,7 +517,8 @@ class DmMatSelect {
|
|
|
470
517
|
return this.selectedOptionsIdsSet().has(optionValue);
|
|
471
518
|
});
|
|
472
519
|
return allSelected;
|
|
473
|
-
},
|
|
520
|
+
}, /* @ts-ignore */
|
|
521
|
+
...(ngDevMode ? [{ debugName: "checkIfAllSelected" }] : /* istanbul ignore next */ []));
|
|
474
522
|
constructor() {
|
|
475
523
|
this.runEffects();
|
|
476
524
|
}
|
|
@@ -678,16 +726,16 @@ class DmMatSelect {
|
|
|
678
726
|
}, 0);
|
|
679
727
|
}
|
|
680
728
|
}
|
|
681
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
682
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "
|
|
729
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.2", ngImport: i0, type: DmMatSelect, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
730
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.0.2", 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 }, returnObject: { classPropertyName: "returnObject", publicName: "returnObject", 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 }, hideErrorArea: { classPropertyName: "hideErrorArea", publicName: "hideErrorArea", 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 }, optionTemplate: { classPropertyName: "optionTemplate", publicName: "optionTemplate", isSignal: true, isRequired: false, transformFunction: null }, selectTriggerTemplate: { classPropertyName: "selectTriggerTemplate", publicName: "selectTriggerTemplate", isSignal: true, isRequired: false, transformFunction: null }, optionStyleFn: { classPropertyName: "optionStyleFn", publicName: "optionStyleFn", isSignal: true, isRequired: false, transformFunction: null }, optionDisabledFn: { classPropertyName: "optionDisabledFn", publicName: "optionDisabledFn", isSignal: true, isRequired: false, transformFunction: null }, filterText: { classPropertyName: "filterText", publicName: "filterText", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { value: "valueChange", selectionChange: "selectionChange", onSelectionChange: "onSelectionChange", filterText: "filterTextChange" }, providers: [
|
|
683
731
|
{
|
|
684
732
|
provide: NG_VALUE_ACCESSOR,
|
|
685
733
|
useExisting: forwardRef(() => DmMatSelect),
|
|
686
734
|
multi: true,
|
|
687
735
|
},
|
|
688
|
-
], ngImport: i0, template: "<div class=\"dm-mat-select-wrapper\" [class]=\"wrapperClass()\">\n <mat-form-field\n [appearance]=\"appearance()\"\n [class]=\"formFieldClass()\"\n style=\"width: 100%\"\n [class.hide-error-area]=\"hideErrorArea()\"\n >\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 @if (selectTriggerTemplate()) {\n <mat-select-trigger>\n <ng-container\n [ngTemplateOutlet]=\"selectTriggerTemplate()\"\n [ngTemplateOutletContext]=\"{\n value: control().value,\n multiple: multiple(),\n }\"\n ></ng-container>\n </mat-select-trigger>\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 }\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 [ngStyle]=\"resolveOptionStyle(null)\"\n [disabled]=\"resolveOptionDisabled(null)\"\n >{{ emptyOptionLabel() }}</mat-option\n >\n }\n @for (\n option of datasource().result();\n track simpleArray() ? option : option[this.optionValueKey()]\n ) {\n <!-- <mat-option\n [value]=\"simpleArray() ? option : option[optionValueKey()]\"\n (onSelectionChange)=\"onSelectionChangeHandler($event, option)\"\n >\n @if (optionTemplate()) {\n <ng-container\n [ngTemplateOutlet]=\"optionTemplate()\"\n [ngTemplateOutletContext]=\"{\n option: option,\n value: simpleArray() ? option : option[optionValueKey()],\n label: optionNameFormat()\n ? option?.__dmMatSelectFormattedName || ''\n : simpleArray()\n ? option\n : option[optionLabelKey()],\n }\"\n ></ng-container>\n } @else {\n {{\n optionNameFormat()\n ? option?.__dmMatSelectFormattedName || ''\n : simpleArray()\n ? option\n : option[optionLabelKey()]\n }}\n }\n </mat-option> -->\n <mat-option\n [value]=\"simpleArray() ? option : option[optionValueKey()]\"\n (onSelectionChange)=\"onSelectionChangeHandler($event, option)\"\n [ngStyle]=\"resolveOptionStyle(option)\"\n [disabled]=\"resolveOptionDisabled(option)\"\n >\n @if (optionTemplate()) {\n <ng-container\n [ngTemplateOutlet]=\"optionTemplate()\"\n [ngTemplateOutletContext]=\"{\n option: option,\n value: simpleArray() ? option : option[optionValueKey()],\n label: optionNameFormat()\n ? option?.__dmMatSelectFormattedName || ''\n : simpleArray()\n ? option\n : option[optionLabelKey()],\n onSelectionChange: onSelectionChangeHandler,\n }\"\n ></ng-container>\n } @else {\n {{\n optionNameFormat()\n ? option?.__dmMatSelectFormattedName || ''\n : simpleArray()\n ? option\n : option[optionLabelKey()]\n }}\n }\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>\n } @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}.dm-mat-select-wrapper ::ng-deep .hide-error-area>.mat-mdc-form-field-subscript-wrapper{display:none!important;height:0!important}\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: i9.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: "directive", type: i5.MatSelectTrigger, selector: "mat-select-trigger" }, { 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: i12.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "directive", type: i12.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"] }] });
|
|
736
|
+
], ngImport: i0, template: "<div class=\"dm-mat-select-wrapper\" [class]=\"wrapperClass()\">\n <mat-form-field\n [appearance]=\"appearance()\"\n [class]=\"formFieldClass()\"\n style=\"width: 100%\"\n [class.hide-error-area]=\"hideErrorArea()\"\n >\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 @if (selectTriggerTemplate()) {\n <mat-select-trigger>\n <ng-container\n [ngTemplateOutlet]=\"selectTriggerTemplate()\"\n [ngTemplateOutletContext]=\"{\n value: control().value,\n multiple: multiple(),\n }\"\n ></ng-container>\n </mat-select-trigger>\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 }\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 [ngStyle]=\"resolveOptionStyle(null)\"\n [disabled]=\"resolveOptionDisabled(null)\"\n >{{ emptyOptionLabel() }}</mat-option\n >\n }\n @for (\n option of datasource().result();\n track simpleArray() ? option : option[this.optionValueKey()]\n ) {\n <!-- <mat-option\n [value]=\"simpleArray() ? option : option[optionValueKey()]\"\n (onSelectionChange)=\"onSelectionChangeHandler($event, option)\"\n >\n @if (optionTemplate()) {\n <ng-container\n [ngTemplateOutlet]=\"optionTemplate()\"\n [ngTemplateOutletContext]=\"{\n option: option,\n value: simpleArray() ? option : option[optionValueKey()],\n label: optionNameFormat()\n ? option?.__dmMatSelectFormattedName || ''\n : simpleArray()\n ? option\n : option[optionLabelKey()],\n }\"\n ></ng-container>\n } @else {\n {{\n optionNameFormat()\n ? option?.__dmMatSelectFormattedName || ''\n : simpleArray()\n ? option\n : option[optionLabelKey()]\n }}\n }\n </mat-option> -->\n <mat-option\n [value]=\"simpleArray() ? option : option[optionValueKey()]\"\n (onSelectionChange)=\"onSelectionChangeHandler($event, option)\"\n [ngStyle]=\"resolveOptionStyle(option)\"\n [disabled]=\"resolveOptionDisabled(option)\"\n >\n @if (optionTemplate()) {\n <ng-container\n [ngTemplateOutlet]=\"optionTemplate()\"\n [ngTemplateOutletContext]=\"{\n option: option,\n value: simpleArray() ? option : option[optionValueKey()],\n label: optionNameFormat()\n ? option?.__dmMatSelectFormattedName || ''\n : simpleArray()\n ? option\n : option[optionLabelKey()],\n onSelectionChange: onSelectionChangeHandler,\n }\"\n ></ng-container>\n } @else {\n {{\n optionNameFormat()\n ? option?.__dmMatSelectFormattedName || ''\n : simpleArray()\n ? option\n : option[optionLabelKey()]\n }}\n }\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>\n } @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}.dm-mat-select-wrapper ::ng-deep .hide-error-area>.mat-mdc-form-field-subscript-wrapper{display:none!important;height:0!important}\n"], dependencies: [{ kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i1.DefaultValueAccessor, selector: "input:not([type=checkbox]):not([ngNoCva])[formControlName],textarea:not([ngNoCva])[formControlName],input:not([type=checkbox]):not([ngNoCva])[formControl],textarea:not([ngNoCva])[formControl],input:not([type=checkbox]):not([ngNoCva])[ngModel],textarea:not([ngNoCva])[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: i9.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: "directive", type: i5.MatSelectTrigger, selector: "mat-select-trigger" }, { 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: i12.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "directive", type: i12.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"] }], changeDetection: i0.ChangeDetectionStrategy.Eager });
|
|
689
737
|
}
|
|
690
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
738
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.2", ngImport: i0, type: DmMatSelect, decorators: [{
|
|
691
739
|
type: Component,
|
|
692
740
|
args: [{ selector: 'dm-mat-select', standalone: true, imports: [
|
|
693
741
|
ReactiveFormsModule,
|
|
@@ -706,7 +754,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.3", ngImpor
|
|
|
706
754
|
useExisting: forwardRef(() => DmMatSelect),
|
|
707
755
|
multi: true,
|
|
708
756
|
},
|
|
709
|
-
], template: "<div class=\"dm-mat-select-wrapper\" [class]=\"wrapperClass()\">\n <mat-form-field\n [appearance]=\"appearance()\"\n [class]=\"formFieldClass()\"\n style=\"width: 100%\"\n [class.hide-error-area]=\"hideErrorArea()\"\n >\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 @if (selectTriggerTemplate()) {\n <mat-select-trigger>\n <ng-container\n [ngTemplateOutlet]=\"selectTriggerTemplate()\"\n [ngTemplateOutletContext]=\"{\n value: control().value,\n multiple: multiple(),\n }\"\n ></ng-container>\n </mat-select-trigger>\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 }\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 [ngStyle]=\"resolveOptionStyle(null)\"\n [disabled]=\"resolveOptionDisabled(null)\"\n >{{ emptyOptionLabel() }}</mat-option\n >\n }\n @for (\n option of datasource().result();\n track simpleArray() ? option : option[this.optionValueKey()]\n ) {\n <!-- <mat-option\n [value]=\"simpleArray() ? option : option[optionValueKey()]\"\n (onSelectionChange)=\"onSelectionChangeHandler($event, option)\"\n >\n @if (optionTemplate()) {\n <ng-container\n [ngTemplateOutlet]=\"optionTemplate()\"\n [ngTemplateOutletContext]=\"{\n option: option,\n value: simpleArray() ? option : option[optionValueKey()],\n label: optionNameFormat()\n ? option?.__dmMatSelectFormattedName || ''\n : simpleArray()\n ? option\n : option[optionLabelKey()],\n }\"\n ></ng-container>\n } @else {\n {{\n optionNameFormat()\n ? option?.__dmMatSelectFormattedName || ''\n : simpleArray()\n ? option\n : option[optionLabelKey()]\n }}\n }\n </mat-option> -->\n <mat-option\n [value]=\"simpleArray() ? option : option[optionValueKey()]\"\n (onSelectionChange)=\"onSelectionChangeHandler($event, option)\"\n [ngStyle]=\"resolveOptionStyle(option)\"\n [disabled]=\"resolveOptionDisabled(option)\"\n >\n @if (optionTemplate()) {\n <ng-container\n [ngTemplateOutlet]=\"optionTemplate()\"\n [ngTemplateOutletContext]=\"{\n option: option,\n value: simpleArray() ? option : option[optionValueKey()],\n label: optionNameFormat()\n ? option?.__dmMatSelectFormattedName || ''\n : simpleArray()\n ? option\n : option[optionLabelKey()],\n onSelectionChange: onSelectionChangeHandler,\n }\"\n ></ng-container>\n } @else {\n {{\n optionNameFormat()\n ? option?.__dmMatSelectFormattedName || ''\n : simpleArray()\n ? option\n : option[optionLabelKey()]\n }}\n }\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>\n } @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}.dm-mat-select-wrapper ::ng-deep .hide-error-area>.mat-mdc-form-field-subscript-wrapper{display:none!important;height:0!important}\n"] }]
|
|
757
|
+
], changeDetection: ChangeDetectionStrategy.Eager, template: "<div class=\"dm-mat-select-wrapper\" [class]=\"wrapperClass()\">\n <mat-form-field\n [appearance]=\"appearance()\"\n [class]=\"formFieldClass()\"\n style=\"width: 100%\"\n [class.hide-error-area]=\"hideErrorArea()\"\n >\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 @if (selectTriggerTemplate()) {\n <mat-select-trigger>\n <ng-container\n [ngTemplateOutlet]=\"selectTriggerTemplate()\"\n [ngTemplateOutletContext]=\"{\n value: control().value,\n multiple: multiple(),\n }\"\n ></ng-container>\n </mat-select-trigger>\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 }\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 [ngStyle]=\"resolveOptionStyle(null)\"\n [disabled]=\"resolveOptionDisabled(null)\"\n >{{ emptyOptionLabel() }}</mat-option\n >\n }\n @for (\n option of datasource().result();\n track simpleArray() ? option : option[this.optionValueKey()]\n ) {\n <!-- <mat-option\n [value]=\"simpleArray() ? option : option[optionValueKey()]\"\n (onSelectionChange)=\"onSelectionChangeHandler($event, option)\"\n >\n @if (optionTemplate()) {\n <ng-container\n [ngTemplateOutlet]=\"optionTemplate()\"\n [ngTemplateOutletContext]=\"{\n option: option,\n value: simpleArray() ? option : option[optionValueKey()],\n label: optionNameFormat()\n ? option?.__dmMatSelectFormattedName || ''\n : simpleArray()\n ? option\n : option[optionLabelKey()],\n }\"\n ></ng-container>\n } @else {\n {{\n optionNameFormat()\n ? option?.__dmMatSelectFormattedName || ''\n : simpleArray()\n ? option\n : option[optionLabelKey()]\n }}\n }\n </mat-option> -->\n <mat-option\n [value]=\"simpleArray() ? option : option[optionValueKey()]\"\n (onSelectionChange)=\"onSelectionChangeHandler($event, option)\"\n [ngStyle]=\"resolveOptionStyle(option)\"\n [disabled]=\"resolveOptionDisabled(option)\"\n >\n @if (optionTemplate()) {\n <ng-container\n [ngTemplateOutlet]=\"optionTemplate()\"\n [ngTemplateOutletContext]=\"{\n option: option,\n value: simpleArray() ? option : option[optionValueKey()],\n label: optionNameFormat()\n ? option?.__dmMatSelectFormattedName || ''\n : simpleArray()\n ? option\n : option[optionLabelKey()],\n onSelectionChange: onSelectionChangeHandler,\n }\"\n ></ng-container>\n } @else {\n {{\n optionNameFormat()\n ? option?.__dmMatSelectFormattedName || ''\n : simpleArray()\n ? option\n : option[optionLabelKey()]\n }}\n }\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>\n } @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}.dm-mat-select-wrapper ::ng-deep .hide-error-area>.mat-mdc-form-field-subscript-wrapper{display:none!important;height:0!important}\n"] }]
|
|
710
758
|
}], ctorParameters: () => [], propDecorators: { formFieldClass: [{ type: i0.Input, args: [{ isSignal: true, alias: "formFieldClass", required: false }] }], wrapperClass: [{ type: i0.Input, args: [{ isSignal: true, alias: "wrapperClass", required: false }] }], appearance: [{ type: i0.Input, args: [{ isSignal: true, alias: "appearance", required: false }] }], multiple: [{ type: i0.Input, args: [{ isSignal: true, alias: "multiple", required: false }] }], selectAllEnabled: [{ type: i0.Input, args: [{ isSignal: true, alias: "selectAllEnabled", required: false }] }], selectAllLabel: [{ type: i0.Input, args: [{ isSignal: true, alias: "selectAllLabel", required: false }] }], label: [{ type: i0.Input, args: [{ isSignal: true, alias: "label", required: false }] }], options: [{ type: i0.Input, args: [{ isSignal: true, alias: "options", required: false }] }], optionValueKey: [{ type: i0.Input, args: [{ isSignal: true, alias: "optionValueKey", required: false }] }], optionLabelKey: [{ type: i0.Input, args: [{ isSignal: true, alias: "optionLabelKey", required: false }] }], searchable: [{ type: i0.Input, args: [{ isSignal: true, alias: "searchable", required: false }] }], returnObject: [{ type: i0.Input, args: [{ isSignal: true, alias: "returnObject", required: false }] }], required: [{ type: i0.Input, args: [{ isSignal: true, alias: "required", required: false }] }], disabled: [{ type: i0.Input, args: [{ isSignal: true, alias: "disabled", required: false }] }], error: [{ type: i0.Input, args: [{ isSignal: true, alias: "error", required: false }] }], searchPlaceholder: [{ type: i0.Input, args: [{ isSignal: true, alias: "searchPlaceholder", required: false }] }], emptyOption: [{ type: i0.Input, args: [{ isSignal: true, alias: "emptyOption", required: false }] }], emptyOptionLabel: [{ type: i0.Input, args: [{ isSignal: true, alias: "emptyOptionLabel", required: false }] }], emptyOptionValue: [{ type: i0.Input, args: [{ isSignal: true, alias: "emptyOptionValue", required: false }] }], optionNameFormat: [{ type: i0.Input, args: [{ isSignal: true, alias: "optionNameFormat", required: false }] }], value: [{ type: i0.Input, args: [{ isSignal: true, alias: "value", required: false }] }, { type: i0.Output, args: ["valueChange"] }], formControl: [{ type: i0.Input, args: [{ isSignal: true, alias: "formControl", required: false }] }], panelWidth: [{ type: i0.Input, args: [{ isSignal: true, alias: "panelWidth", required: false }] }], panelClass: [{ type: i0.Input, args: [{ isSignal: true, alias: "panelClass", required: false }] }], searchSectionBackgroundColor: [{ type: i0.Input, args: [{ isSignal: true, alias: "searchSectionBackgroundColor", required: false }] }], sortBySelectedOnTop: [{ type: i0.Input, args: [{ isSignal: true, alias: "sortBySelectedOnTop", required: false }] }], selectionChange: [{ type: i0.Output, args: ["selectionChange"] }], onSelectionChange: [{ type: i0.Output, args: ["onSelectionChange"] }], icon: [{ type: i0.Input, args: [{ isSignal: true, alias: "icon", required: false }] }], noDataLabel: [{ type: i0.Input, args: [{ isSignal: true, alias: "noDataLabel", required: false }] }], clearSearchAfterSelect: [{ type: i0.Input, args: [{ isSignal: true, alias: "clearSearchAfterSelect", required: false }] }], clearSearchButtonTooltip: [{ type: i0.Input, args: [{ isSignal: true, alias: "clearSearchButtonTooltip", required: false }] }], focusSearchInputOnPanelOpen: [{ type: i0.Input, args: [{ isSignal: true, alias: "focusSearchInputOnPanelOpen", required: false }] }], hideErrorArea: [{ type: i0.Input, args: [{ isSignal: true, alias: "hideErrorArea", required: false }] }], filterPredicate: [{ type: i0.Input, args: [{ isSignal: true, alias: "filterPredicate", required: false }] }], propertiesToSkipInSearch: [{ type: i0.Input, args: [{ isSignal: true, alias: "propertiesToSkipInSearch", required: false }] }], optionTemplate: [{ type: i0.Input, args: [{ isSignal: true, alias: "optionTemplate", required: false }] }], selectTriggerTemplate: [{ type: i0.Input, args: [{ isSignal: true, alias: "selectTriggerTemplate", required: false }] }], optionStyleFn: [{ type: i0.Input, args: [{ isSignal: true, alias: "optionStyleFn", required: false }] }], optionDisabledFn: [{ type: i0.Input, args: [{ isSignal: true, alias: "optionDisabledFn", required: false }] }], filterText: [{ type: i0.Input, args: [{ isSignal: true, alias: "filterText", required: false }] }, { type: i0.Output, args: ["filterTextChange"] }] } });
|
|
711
759
|
|
|
712
760
|
class DmColorPicker {
|
|
@@ -721,32 +769,47 @@ class DmColorPicker {
|
|
|
721
769
|
{ color: '#A9A9A9' },
|
|
722
770
|
{ color: '#FFFFFF' },
|
|
723
771
|
{ color: '#000000' },
|
|
724
|
-
],
|
|
725
|
-
|
|
772
|
+
], /* @ts-ignore */
|
|
773
|
+
...(ngDevMode ? [{ debugName: "colors" }] : /* istanbul ignore next */ []));
|
|
774
|
+
formControl = input(null, /* @ts-ignore */
|
|
775
|
+
...(ngDevMode ? [{ debugName: "formControl" }] : /* istanbul ignore next */ []));
|
|
726
776
|
internalFormControl = new FormControl('');
|
|
727
|
-
control = computed(() => this.formControl() ?? this.internalFormControl,
|
|
728
|
-
|
|
729
|
-
|
|
730
|
-
|
|
777
|
+
control = computed(() => this.formControl() ?? this.internalFormControl, /* @ts-ignore */
|
|
778
|
+
...(ngDevMode ? [{ debugName: "control" }] : /* istanbul ignore next */ []));
|
|
779
|
+
width = input(30, /* @ts-ignore */
|
|
780
|
+
...(ngDevMode ? [{ debugName: "width" }] : /* istanbul ignore next */ []));
|
|
781
|
+
height = input(30, /* @ts-ignore */
|
|
782
|
+
...(ngDevMode ? [{ debugName: "height" }] : /* istanbul ignore next */ []));
|
|
783
|
+
borderRadius = input('50%', /* @ts-ignore */
|
|
784
|
+
...(ngDevMode ? [{ debugName: "borderRadius" }] : /* istanbul ignore next */ []));
|
|
731
785
|
radius = computed(() => {
|
|
732
786
|
return typeof this.borderRadius() === 'number'
|
|
733
787
|
? `${this.borderRadius()}px`
|
|
734
788
|
: this.borderRadius();
|
|
735
|
-
},
|
|
736
|
-
|
|
737
|
-
|
|
738
|
-
|
|
739
|
-
|
|
740
|
-
|
|
789
|
+
}, /* @ts-ignore */
|
|
790
|
+
...(ngDevMode ? [{ debugName: "radius" }] : /* istanbul ignore next */ []));
|
|
791
|
+
selectedColor = signal('#FFFFFF', /* @ts-ignore */
|
|
792
|
+
...(ngDevMode ? [{ debugName: "selectedColor" }] : /* istanbul ignore next */ []));
|
|
793
|
+
tooltip = input('', /* @ts-ignore */
|
|
794
|
+
...(ngDevMode ? [{ debugName: "tooltip" }] : /* istanbul ignore next */ []));
|
|
795
|
+
tooltipPosition = input('above', /* @ts-ignore */
|
|
796
|
+
...(ngDevMode ? [{ debugName: "tooltipPosition" }] : /* istanbul ignore next */ []));
|
|
797
|
+
customColor = input(false, { ...(ngDevMode ? { debugName: "customColor" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
|
|
798
|
+
opacitySlider = input(false, { ...(ngDevMode ? { debugName: "opacitySlider" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
|
|
741
799
|
// @Input() opacitySliderColor: 'primary' | 'accent' | 'warn' = 'primary';
|
|
742
|
-
opacitySliderLabel = input('שקיפות',
|
|
743
|
-
|
|
744
|
-
|
|
745
|
-
|
|
800
|
+
opacitySliderLabel = input('שקיפות', /* @ts-ignore */
|
|
801
|
+
...(ngDevMode ? [{ debugName: "opacitySliderLabel" }] : /* istanbul ignore next */ []));
|
|
802
|
+
customColorTooltip = input('צבע מותאם אישית', /* @ts-ignore */
|
|
803
|
+
...(ngDevMode ? [{ debugName: "customColorTooltip" }] : /* istanbul ignore next */ []));
|
|
804
|
+
wrapperClass = input('', /* @ts-ignore */
|
|
805
|
+
...(ngDevMode ? [{ debugName: "wrapperClass" }] : /* istanbul ignore next */ []));
|
|
806
|
+
wrapperStyle = input('', /* @ts-ignore */
|
|
807
|
+
...(ngDevMode ? [{ debugName: "wrapperStyle" }] : /* istanbul ignore next */ []));
|
|
746
808
|
onColorChange = output();
|
|
747
809
|
// @Input() ngModel: string = '';
|
|
748
810
|
// @Output() ngModelChange = new EventEmitter<string>();
|
|
749
|
-
value = model('',
|
|
811
|
+
value = model('', /* @ts-ignore */
|
|
812
|
+
...(ngDevMode ? [{ debugName: "value" }] : /* istanbul ignore next */ []));
|
|
750
813
|
constructor() {
|
|
751
814
|
this.runEffects();
|
|
752
815
|
}
|
|
@@ -815,16 +878,16 @@ class DmColorPicker {
|
|
|
815
878
|
writeValue(value) { }
|
|
816
879
|
registerOnChange(fn) { }
|
|
817
880
|
registerOnTouched(fn) { }
|
|
818
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
819
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "
|
|
881
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.2", ngImport: i0, type: DmColorPicker, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
882
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.0.2", 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" }, providers: [
|
|
820
883
|
{
|
|
821
884
|
provide: NG_VALUE_ACCESSOR,
|
|
822
885
|
useExisting: forwardRef(() => DmColorPicker),
|
|
823
886
|
multi: true,
|
|
824
887
|
},
|
|
825
|
-
], 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: i11.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: i11.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"] }] });
|
|
888
|
+
], 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: i11.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: i11.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"] }], changeDetection: i0.ChangeDetectionStrategy.Eager });
|
|
826
889
|
}
|
|
827
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
890
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.2", ngImport: i0, type: DmColorPicker, decorators: [{
|
|
828
891
|
type: Component,
|
|
829
892
|
args: [{ selector: 'dm-color-picker', standalone: true, imports: [MatMenuModule, MatTooltipModule, CommonModule, MatSliderModule], providers: [
|
|
830
893
|
{
|
|
@@ -832,22 +895,26 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.3", ngImpor
|
|
|
832
895
|
useExisting: forwardRef(() => DmColorPicker),
|
|
833
896
|
multi: true,
|
|
834
897
|
},
|
|
835
|
-
], 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"] }]
|
|
898
|
+
], changeDetection: ChangeDetectionStrategy.Eager, 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"] }]
|
|
836
899
|
}], ctorParameters: () => [], propDecorators: { colors: [{ type: i0.Input, args: [{ isSignal: true, alias: "colors", required: false }] }], formControl: [{ type: i0.Input, args: [{ isSignal: true, alias: "formControl", required: false }] }], width: [{ type: i0.Input, args: [{ isSignal: true, alias: "width", required: false }] }], height: [{ type: i0.Input, args: [{ isSignal: true, alias: "height", required: false }] }], borderRadius: [{ type: i0.Input, args: [{ isSignal: true, alias: "borderRadius", required: false }] }], tooltip: [{ type: i0.Input, args: [{ isSignal: true, alias: "tooltip", required: false }] }], tooltipPosition: [{ type: i0.Input, args: [{ isSignal: true, alias: "tooltipPosition", required: false }] }], customColor: [{ type: i0.Input, args: [{ isSignal: true, alias: "customColor", required: false }] }], opacitySlider: [{ type: i0.Input, args: [{ isSignal: true, alias: "opacitySlider", required: false }] }], opacitySliderLabel: [{ type: i0.Input, args: [{ isSignal: true, alias: "opacitySliderLabel", required: false }] }], customColorTooltip: [{ type: i0.Input, args: [{ isSignal: true, alias: "customColorTooltip", required: false }] }], wrapperClass: [{ type: i0.Input, args: [{ isSignal: true, alias: "wrapperClass", required: false }] }], wrapperStyle: [{ type: i0.Input, args: [{ isSignal: true, alias: "wrapperStyle", required: false }] }], onColorChange: [{ type: i0.Output, args: ["onColorChange"] }], value: [{ type: i0.Input, args: [{ isSignal: true, alias: "value", required: false }] }, { type: i0.Output, args: ["valueChange"] }] } });
|
|
837
900
|
|
|
838
901
|
const DEFAULT_SPINNER_ID = 'dm-spinner';
|
|
839
902
|
class DmSpinnerService {
|
|
840
903
|
// visibility$: BehaviorSubject<boolean> = new BehaviorSubject<boolean>(false);
|
|
841
|
-
visibility$ = signal(false,
|
|
842
|
-
|
|
843
|
-
|
|
904
|
+
visibility$ = signal(false, /* @ts-ignore */
|
|
905
|
+
...(ngDevMode ? [{ debugName: "visibility$" }] : /* istanbul ignore next */ []));
|
|
906
|
+
spinnerToShow$ = signal(DEFAULT_SPINNER_ID, /* @ts-ignore */
|
|
907
|
+
...(ngDevMode ? [{ debugName: "spinnerToShow$" }] : /* istanbul ignore next */ []));
|
|
908
|
+
spinnerTasks$ = signal(new Set(), /* @ts-ignore */
|
|
909
|
+
...(ngDevMode ? [{ debugName: "spinnerTasks$" }] : /* istanbul ignore next */ []));
|
|
844
910
|
// spinnerToShow$: BehaviorSubject<string> = new BehaviorSubject<string>(
|
|
845
911
|
// 'dm-cmps-spinner'
|
|
846
912
|
// );
|
|
847
913
|
// spinnerTasks$: BehaviorSubject<Set<string>> = new BehaviorSubject<
|
|
848
914
|
// Set<string>
|
|
849
915
|
// >(new Set());
|
|
850
|
-
spinnerText = signal('',
|
|
916
|
+
spinnerText = signal('', /* @ts-ignore */
|
|
917
|
+
...(ngDevMode ? [{ debugName: "spinnerText" }] : /* istanbul ignore next */ []));
|
|
851
918
|
constructor() { }
|
|
852
919
|
showSpinner(spinnerId = DEFAULT_SPINNER_ID) {
|
|
853
920
|
this.visibility$.set(true);
|
|
@@ -874,10 +941,10 @@ class DmSpinnerService {
|
|
|
874
941
|
setSpinnerText(text) {
|
|
875
942
|
this.spinnerText.set(text);
|
|
876
943
|
}
|
|
877
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
878
|
-
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "
|
|
944
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.2", ngImport: i0, type: DmSpinnerService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
|
|
945
|
+
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "22.0.2", ngImport: i0, type: DmSpinnerService, providedIn: 'root' });
|
|
879
946
|
}
|
|
880
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
947
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.2", ngImport: i0, type: DmSpinnerService, decorators: [{
|
|
881
948
|
type: Injectable,
|
|
882
949
|
args: [{
|
|
883
950
|
providedIn: 'root',
|
|
@@ -901,27 +968,44 @@ class DmSpinner {
|
|
|
901
968
|
_backgroundBlur: { field: '--dm-spinner-background-blur' },
|
|
902
969
|
textPositionYOffset: { field: '--dm-spinner-text-position-y-offset' },
|
|
903
970
|
};
|
|
904
|
-
color = input('#1a4bd6',
|
|
905
|
-
|
|
906
|
-
|
|
907
|
-
|
|
908
|
-
|
|
909
|
-
|
|
910
|
-
|
|
911
|
-
|
|
912
|
-
|
|
913
|
-
|
|
914
|
-
|
|
915
|
-
|
|
916
|
-
|
|
917
|
-
|
|
918
|
-
|
|
919
|
-
|
|
971
|
+
color = input('#1a4bd6', /* @ts-ignore */
|
|
972
|
+
...(ngDevMode ? [{ debugName: "color" }] : /* istanbul ignore next */ []));
|
|
973
|
+
type = input('rounded', /* @ts-ignore */
|
|
974
|
+
...(ngDevMode ? [{ debugName: "type" }] : /* istanbul ignore next */ []));
|
|
975
|
+
gifSrc = input('https://media.tenor.com/I6kN-6X7nhAAAAAi/loading-buffering.gif', /* @ts-ignore */
|
|
976
|
+
...(ngDevMode ? [{ debugName: "gifSrc" }] : /* istanbul ignore next */ []));
|
|
977
|
+
size = input(40, /* @ts-ignore */
|
|
978
|
+
...(ngDevMode ? [{ debugName: "size" }] : /* istanbul ignore next */ []));
|
|
979
|
+
shapeSize = input(25, /* @ts-ignore */
|
|
980
|
+
...(ngDevMode ? [{ debugName: "shapeSize" }] : /* istanbul ignore next */ []));
|
|
981
|
+
speed = input(2, /* @ts-ignore */
|
|
982
|
+
...(ngDevMode ? [{ debugName: "speed" }] : /* istanbul ignore next */ []));
|
|
983
|
+
borderThikness = input(5, /* @ts-ignore */
|
|
984
|
+
...(ngDevMode ? [{ debugName: "borderThikness" }] : /* istanbul ignore next */ []));
|
|
985
|
+
position = input('absolute', /* @ts-ignore */
|
|
986
|
+
...(ngDevMode ? [{ debugName: "position" }] : /* istanbul ignore next */ []));
|
|
987
|
+
backgroundColor = input('', /* @ts-ignore */
|
|
988
|
+
...(ngDevMode ? [{ debugName: "backgroundColor" }] : /* istanbul ignore next */ []));
|
|
989
|
+
text = input('טוען...', /* @ts-ignore */
|
|
990
|
+
...(ngDevMode ? [{ debugName: "text" }] : /* istanbul ignore next */ []));
|
|
991
|
+
textColor = input('#000000', /* @ts-ignore */
|
|
992
|
+
...(ngDevMode ? [{ debugName: "textColor" }] : /* istanbul ignore next */ []));
|
|
993
|
+
fontSize = input(20, /* @ts-ignore */
|
|
994
|
+
...(ngDevMode ? [{ debugName: "fontSize" }] : /* istanbul ignore next */ []));
|
|
995
|
+
textPosition = input('center', /* @ts-ignore */
|
|
996
|
+
...(ngDevMode ? [{ debugName: "textPosition" }] : /* istanbul ignore next */ []));
|
|
997
|
+
colors = input(['#1a4bd6', '#000000'], /* @ts-ignore */
|
|
998
|
+
...(ngDevMode ? [{ debugName: "colors" }] : /* istanbul ignore next */ []));
|
|
999
|
+
backgroundBlur = input(5, { ...(ngDevMode ? { debugName: "backgroundBlur" } : /* istanbul ignore next */ {}), transform: numberAttribute });
|
|
1000
|
+
textPositionYOffset = input(0, { ...(ngDevMode ? { debugName: "textPositionYOffset" } : /* istanbul ignore next */ {}), transform: numberAttribute });
|
|
920
1001
|
_backgroundBlur = computed(() => {
|
|
921
1002
|
return `${this.backgroundBlur() || 0}px`;
|
|
922
|
-
},
|
|
923
|
-
|
|
924
|
-
|
|
1003
|
+
}, /* @ts-ignore */
|
|
1004
|
+
...(ngDevMode ? [{ debugName: "_backgroundBlur" }] : /* istanbul ignore next */ []));
|
|
1005
|
+
name = input(DEFAULT_SPINNER_ID, /* @ts-ignore */
|
|
1006
|
+
...(ngDevMode ? [{ debugName: "name" }] : /* istanbul ignore next */ []));
|
|
1007
|
+
spinnerText = signal('', /* @ts-ignore */
|
|
1008
|
+
...(ngDevMode ? [{ debugName: "spinnerText" }] : /* istanbul ignore next */ []));
|
|
925
1009
|
constructor(_spinnerService, renderer) {
|
|
926
1010
|
this._spinnerService = _spinnerService;
|
|
927
1011
|
this.renderer = renderer;
|
|
@@ -956,12 +1040,12 @@ class DmSpinner {
|
|
|
956
1040
|
}
|
|
957
1041
|
ngOnInit() { }
|
|
958
1042
|
ngOnDestroy() { }
|
|
959
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
960
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "
|
|
1043
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.2", ngImport: i0, type: DmSpinner, deps: [{ token: DmSpinnerService }, { token: i0.Renderer2 }], target: i0.ɵɵFactoryTarget.Component });
|
|
1044
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.0.2", type: DmSpinner, isStandalone: true, selector: "dm-spinner", inputs: { color: { classPropertyName: "color", publicName: "color", isSignal: true, isRequired: false, transformFunction: null }, type: { classPropertyName: "type", publicName: "type", isSignal: true, isRequired: false, transformFunction: null }, gifSrc: { classPropertyName: "gifSrc", publicName: "gifSrc", isSignal: true, isRequired: false, transformFunction: null }, size: { classPropertyName: "size", publicName: "size", isSignal: true, isRequired: false, transformFunction: null }, shapeSize: { classPropertyName: "shapeSize", publicName: "shapeSize", isSignal: true, isRequired: false, transformFunction: null }, speed: { classPropertyName: "speed", publicName: "speed", isSignal: true, isRequired: false, transformFunction: null }, borderThikness: { classPropertyName: "borderThikness", publicName: "borderThikness", isSignal: true, isRequired: false, transformFunction: null }, position: { classPropertyName: "position", publicName: "position", isSignal: true, isRequired: false, transformFunction: null }, backgroundColor: { classPropertyName: "backgroundColor", publicName: "backgroundColor", isSignal: true, isRequired: false, transformFunction: null }, text: { classPropertyName: "text", publicName: "text", isSignal: true, isRequired: false, transformFunction: null }, textColor: { classPropertyName: "textColor", publicName: "textColor", isSignal: true, isRequired: false, transformFunction: null }, fontSize: { classPropertyName: "fontSize", publicName: "fontSize", isSignal: true, isRequired: false, transformFunction: null }, textPosition: { classPropertyName: "textPosition", publicName: "textPosition", isSignal: true, isRequired: false, transformFunction: null }, colors: { classPropertyName: "colors", publicName: "colors", isSignal: true, isRequired: false, transformFunction: null }, backgroundBlur: { classPropertyName: "backgroundBlur", publicName: "backgroundBlur", isSignal: true, isRequired: false, transformFunction: null }, textPositionYOffset: { classPropertyName: "textPositionYOffset", publicName: "textPositionYOffset", isSignal: true, isRequired: false, transformFunction: null }, name: { classPropertyName: "name", publicName: "name", isSignal: true, isRequired: false, transformFunction: null } }, ngImport: i0, template: "@if ( (_spinnerService.visibility$() && (_spinnerService.spinnerToShow$() == name())) ||\n(_spinnerService.spinnerTasks$().size > 0 && name() == 'dm-spinner')) {\n\n<div class=\"dm-spinner-wrapper\">\n <div class=\"dm-spinner-inner-wrapper\">\n @switch (type()) { @case ('flower') {\n <div class=\"dm-spinner-flower\"></div>\n } @case ('rounded') {\n <div class=\"dm-spinner-rounded\"></div>\n } @case ('gif') {\n <img class=\"dm-spinner-gif\" [src]=\"gifSrc()\" [width]=\"size()\" [height]=\"'auto'\" />\n } }\n <div class=\"dm-spinner-text\" [style.font-size.px]=\"fontSize()\">\n {{ spinnerText() }}\n </div>\n </div>\n</div>\n}\n", styles: [":host-context(.loading-active) .dm-spinner-wrapper{pointer-events:none}:host-context(.loading-active) .dm-spinner-wrapper{pointer-events:auto}.dm-spinner-wrapper{position:var(--dm-spinner-position, absolute);top:0;left:0;height:100%;width:100%;background-color:var(--dm-spinner-background-color, rgba(0, 0, 0, .2));z-index:9999999999;-webkit-backdrop-filter:blur(var(--dm-spinner-background-blur, 5px));backdrop-filter:blur(var(--dm-spinner-background-blur, 5px))}.dm-spinner-wrapper .dm-spinner-inner-wrapper{position:relative;width:100%;height:100%;display:block}.dm-spinner-wrapper .dm-spinner-inner-wrapper .dm-spinner-rounded{width:calc(var(--dm-spinner-size, 60) * 1px);position:absolute;height:calc(var(--dm-spinner-size, 60) * 1px);transform-origin:center;top:calc(50% - var(--dm-spinner-size, 60) / 2 * 1px);left:calc(50% - var(--dm-spinner-size, 60) / 2 * 1px);border-top:calc(var(--dm-spinner-border-thikness, 5) * 1px) solid var(--dm-spinner-first-color, #1a4bd6);border-right:calc(var(--dm-spinner-border-thikness, 5) * 1px) solid var(--dm-spinner-second-color, #e6f0fb);border-bottom:calc(var(--dm-spinner-border-thikness, 5) * 1px) solid var(--dm-spinner-first-color, #1a4bd6);border-left:calc(var(--dm-spinner-border-thikness, 5) * 1px) solid var(--dm-spinner-second-color, #e6f0fb);border-radius:50%;animation:spin calc(var(--dm-spinner-speed, 2) * 1s) linear infinite}@keyframes spin{0%{transform:rotate(0)}to{transform:rotate(360deg)}}.dm-spinner-wrapper .dm-spinner-inner-wrapper .dm-spinner-flower{width:calc(var(--dm-spinner-shape-size, 25) * 1px);position:absolute;height:calc(var(--dm-spinner-shape-size, 25) * 1px);background-color:none;border-radius:50%;transform-origin:center;top:calc(50% - var(--dm-spinner-shape-size, 25) / 2 * 1px);left:calc(50% - var(--dm-spinner-shape-size, 25) / 2 * 1px);animation:flower calc(var(--dm-spinner-speed, 2) * 1s) linear infinite}@keyframes flower{0%{rotate:0deg;transform:scale(0);box-shadow:calc(var(--dm-spinner-size, 60) / 2 * 1px) calc(var(--dm-spinner-size, 60) / 2 * 1px) 0 calc(var(--dm-spinner-size, 60) / 2 * 1px) var(--dm-spinner-first-color, #1a4bd6),calc(var(--dm-spinner-size, 60) / 2 * -1px) calc(var(--dm-spinner-size, 60) / 2 * 1px) 0 calc(var(--dm-spinner-size, 60) / 2 * 1px) var(--dm-spinner-second-color, #e6f0fb),calc(var(--dm-spinner-size, 60) / 2 * -1px) calc(var(--dm-spinner-size, 60) / 2 * -1px) 0 calc(var(--dm-spinner-size, 60) / 2 * 1px) var(--dm-spinner-thired-color, #1a4bd6),calc(var(--dm-spinner-size, 60) / 2 * 1px) calc(var(--dm-spinner-size, 60) / 2 * -1px) 0 calc(var(--dm-spinner-size, 60) / 2 * 1px) var(--dm-spinner-fourth-color, #e6f0fb)}25%{rotate:180deg;transform:scale(1);box-shadow:calc(var(--dm-spinner-size, 60) / 2 * 1px) calc(var(--dm-spinner-size, 60) / 2 * 1px) 0 var(--dm-spinner-fourth-color, #e6f0fb),calc(var(--dm-spinner-size, 60) / 2 * -1px) calc(var(--dm-spinner-size, 60) / 2 * 1px) 0 var(--dm-spinner-thired-color, #1a4bd6),calc(var(--dm-spinner-size, 60) / 2 * -1px) calc(var(--dm-spinner-size, 60) / 2 * -1px) 0 var(--dm-spinner-first-color, #1a4bd6),calc(var(--dm-spinner-size, 60) / 2 * 1px) calc(var(--dm-spinner-size, 60) / 2 * -1px) 0 var(--dm-spinner-second-color, #e6f0fb)}50%{rotate:360deg;transform:scale(1);box-shadow:0 0 0 var(--dm-spinner-first-color, #1a4bd6),0 0 0 var(--dm-spinner-second-color, #e6f0fb),0 0 0 var(--dm-spinner-thired-color, #1a4bd6),0 0 0 var(--dm-spinner-fourth-color, #e6f0fb)}75%{rotate:540deg;transform:scale(1);box-shadow:calc(var(--dm-spinner-size, 60) / 2 * 1px) calc(var(--dm-spinner-size, 60) / 2 * 1px) 0 var(--dm-spinner-second-color, #e6f0fb),calc(var(--dm-spinner-size, 60) / 2 * -1px) calc(var(--dm-spinner-size, 60) / 2 * 1px) 0 var(--dm-spinner-fourth-color, #e6f0fb),calc(var(--dm-spinner-size, 60) / 2 * -1px) calc(var(--dm-spinner-size, 60) / 2 * -1px) 0 var(--dm-spinner-first-color, #1a4bd6),calc(var(--dm-spinner-size, 60) / 2 * 1px) calc(var(--dm-spinner-size, 60) / 2 * -1px) 0 var(--dm-spinner-thired-color, #1a4bd6)}to{rotate:720deg;transform:scale(0);box-shadow:calc(var(--dm-spinner-size, 60) / 2 * 1px) calc(var(--dm-spinner-size, 60) / 2 * 1px) 0 calc(var(--dm-spinner-size, 60) / 2 * 1px) var(--dm-spinner-first-color, #1a4bd6),calc(var(--dm-spinner-size, 60) / 2 * -1px) calc(var(--dm-spinner-size, 60) / 2 * 1px) 0 calc(var(--dm-spinner-size, 60) / 2 * 1px) var(--dm-spinner-second-color, #e6f0fb),calc(var(--dm-spinner-size, 60) / 2 * -1px) calc(var(--dm-spinner-size, 60) / 2 * -1px) 0 calc(var(--dm-spinner-size, 60) / 2 * 1px) var(--dm-spinner-thired-color, #1a4bd6),calc(var(--dm-spinner-size, 60) / 2 * 1px) calc(var(--dm-spinner-size, 60) / 2 * -1px) 0 calc(var(--dm-spinner-size, 60) / 2 * 1px) var(--dm-spinner-fourth-color, #e6f0fb)}}.dm-spinner-wrapper .dm-spinner-inner-wrapper .dm-spinner-gif{width:calc(var(--dm-spinner-size, 60) * 1px);position:absolute;height:calc(var(--dm-spinner-size, 60) * 1px);transform-origin:center;top:calc(50% - var(--dm-spinner-size, 60) / 2 * 1px);left:calc(50% - var(--dm-spinner-size, 60) / 2 * 1px);background-size:cover}.dm-spinner-wrapper .dm-spinner-inner-wrapper .dm-spinner-text{position:relative;display:flow-root;top:calc(50% + var(--dm-spinner-size, 60) * 1px / 2 + 5px + var(--dm-spinner-font-size, 20) * 1px / 2 + var(--dm-spinner-text-position-y-offset, 0px) * 1px);margin:0 auto;color:var(--dm-spinner-text-color, #000);text-align:center;font-weight:700}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }], changeDetection: i0.ChangeDetectionStrategy.Eager });
|
|
961
1045
|
}
|
|
962
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
1046
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.2", ngImport: i0, type: DmSpinner, decorators: [{
|
|
963
1047
|
type: Component,
|
|
964
|
-
args: [{ selector: 'dm-spinner', standalone: true, imports: [CommonModule], template: "@if ( (_spinnerService.visibility$() && (_spinnerService.spinnerToShow$() == name())) ||\n(_spinnerService.spinnerTasks$().size > 0 && name() == 'dm-spinner')) {\n\n<div class=\"dm-spinner-wrapper\">\n <div class=\"dm-spinner-inner-wrapper\">\n @switch (type()) { @case ('flower') {\n <div class=\"dm-spinner-flower\"></div>\n } @case ('rounded') {\n <div class=\"dm-spinner-rounded\"></div>\n } @case ('gif') {\n <img class=\"dm-spinner-gif\" [src]=\"gifSrc()\" [width]=\"size()\" [height]=\"'auto'\" />\n } }\n <div class=\"dm-spinner-text\" [style.font-size.px]=\"fontSize()\">\n {{ spinnerText() }}\n </div>\n </div>\n</div>\n}\n", styles: [":host-context(.loading-active) .dm-spinner-wrapper{pointer-events:none}:host-context(.loading-active) .dm-spinner-wrapper{pointer-events:auto}.dm-spinner-wrapper{position:var(--dm-spinner-position, absolute);top:0;left:0;height:100%;width:100%;background-color:var(--dm-spinner-background-color, rgba(0, 0, 0, .2));z-index:9999999999;-webkit-backdrop-filter:blur(var(--dm-spinner-background-blur, 5px));backdrop-filter:blur(var(--dm-spinner-background-blur, 5px))}.dm-spinner-wrapper .dm-spinner-inner-wrapper{position:relative;width:100%;height:100%;display:block}.dm-spinner-wrapper .dm-spinner-inner-wrapper .dm-spinner-rounded{width:calc(var(--dm-spinner-size, 60) * 1px);position:absolute;height:calc(var(--dm-spinner-size, 60) * 1px);transform-origin:center;top:calc(50% - var(--dm-spinner-size, 60) / 2 * 1px);left:calc(50% - var(--dm-spinner-size, 60) / 2 * 1px);border-top:calc(var(--dm-spinner-border-thikness, 5) * 1px) solid var(--dm-spinner-first-color, #1a4bd6);border-right:calc(var(--dm-spinner-border-thikness, 5) * 1px) solid var(--dm-spinner-second-color, #e6f0fb);border-bottom:calc(var(--dm-spinner-border-thikness, 5) * 1px) solid var(--dm-spinner-first-color, #1a4bd6);border-left:calc(var(--dm-spinner-border-thikness, 5) * 1px) solid var(--dm-spinner-second-color, #e6f0fb);border-radius:50%;animation:spin calc(var(--dm-spinner-speed, 2) * 1s) linear infinite}@keyframes spin{0%{transform:rotate(0)}to{transform:rotate(360deg)}}.dm-spinner-wrapper .dm-spinner-inner-wrapper .dm-spinner-flower{width:calc(var(--dm-spinner-shape-size, 25) * 1px);position:absolute;height:calc(var(--dm-spinner-shape-size, 25) * 1px);background-color:none;border-radius:50%;transform-origin:center;top:calc(50% - var(--dm-spinner-shape-size, 25) / 2 * 1px);left:calc(50% - var(--dm-spinner-shape-size, 25) / 2 * 1px);animation:flower calc(var(--dm-spinner-speed, 2) * 1s) linear infinite}@keyframes flower{0%{rotate:0deg;transform:scale(0);box-shadow:calc(var(--dm-spinner-size, 60) / 2 * 1px) calc(var(--dm-spinner-size, 60) / 2 * 1px) 0 calc(var(--dm-spinner-size, 60) / 2 * 1px) var(--dm-spinner-first-color, #1a4bd6),calc(var(--dm-spinner-size, 60) / 2 * -1px) calc(var(--dm-spinner-size, 60) / 2 * 1px) 0 calc(var(--dm-spinner-size, 60) / 2 * 1px) var(--dm-spinner-second-color, #e6f0fb),calc(var(--dm-spinner-size, 60) / 2 * -1px) calc(var(--dm-spinner-size, 60) / 2 * -1px) 0 calc(var(--dm-spinner-size, 60) / 2 * 1px) var(--dm-spinner-thired-color, #1a4bd6),calc(var(--dm-spinner-size, 60) / 2 * 1px) calc(var(--dm-spinner-size, 60) / 2 * -1px) 0 calc(var(--dm-spinner-size, 60) / 2 * 1px) var(--dm-spinner-fourth-color, #e6f0fb)}25%{rotate:180deg;transform:scale(1);box-shadow:calc(var(--dm-spinner-size, 60) / 2 * 1px) calc(var(--dm-spinner-size, 60) / 2 * 1px) 0 var(--dm-spinner-fourth-color, #e6f0fb),calc(var(--dm-spinner-size, 60) / 2 * -1px) calc(var(--dm-spinner-size, 60) / 2 * 1px) 0 var(--dm-spinner-thired-color, #1a4bd6),calc(var(--dm-spinner-size, 60) / 2 * -1px) calc(var(--dm-spinner-size, 60) / 2 * -1px) 0 var(--dm-spinner-first-color, #1a4bd6),calc(var(--dm-spinner-size, 60) / 2 * 1px) calc(var(--dm-spinner-size, 60) / 2 * -1px) 0 var(--dm-spinner-second-color, #e6f0fb)}50%{rotate:360deg;transform:scale(1);box-shadow:0 0 0 var(--dm-spinner-first-color, #1a4bd6),0 0 0 var(--dm-spinner-second-color, #e6f0fb),0 0 0 var(--dm-spinner-thired-color, #1a4bd6),0 0 0 var(--dm-spinner-fourth-color, #e6f0fb)}75%{rotate:540deg;transform:scale(1);box-shadow:calc(var(--dm-spinner-size, 60) / 2 * 1px) calc(var(--dm-spinner-size, 60) / 2 * 1px) 0 var(--dm-spinner-second-color, #e6f0fb),calc(var(--dm-spinner-size, 60) / 2 * -1px) calc(var(--dm-spinner-size, 60) / 2 * 1px) 0 var(--dm-spinner-fourth-color, #e6f0fb),calc(var(--dm-spinner-size, 60) / 2 * -1px) calc(var(--dm-spinner-size, 60) / 2 * -1px) 0 var(--dm-spinner-first-color, #1a4bd6),calc(var(--dm-spinner-size, 60) / 2 * 1px) calc(var(--dm-spinner-size, 60) / 2 * -1px) 0 var(--dm-spinner-thired-color, #1a4bd6)}to{rotate:720deg;transform:scale(0);box-shadow:calc(var(--dm-spinner-size, 60) / 2 * 1px) calc(var(--dm-spinner-size, 60) / 2 * 1px) 0 calc(var(--dm-spinner-size, 60) / 2 * 1px) var(--dm-spinner-first-color, #1a4bd6),calc(var(--dm-spinner-size, 60) / 2 * -1px) calc(var(--dm-spinner-size, 60) / 2 * 1px) 0 calc(var(--dm-spinner-size, 60) / 2 * 1px) var(--dm-spinner-second-color, #e6f0fb),calc(var(--dm-spinner-size, 60) / 2 * -1px) calc(var(--dm-spinner-size, 60) / 2 * -1px) 0 calc(var(--dm-spinner-size, 60) / 2 * 1px) var(--dm-spinner-thired-color, #1a4bd6),calc(var(--dm-spinner-size, 60) / 2 * 1px) calc(var(--dm-spinner-size, 60) / 2 * -1px) 0 calc(var(--dm-spinner-size, 60) / 2 * 1px) var(--dm-spinner-fourth-color, #e6f0fb)}}.dm-spinner-wrapper .dm-spinner-inner-wrapper .dm-spinner-gif{width:calc(var(--dm-spinner-size, 60) * 1px);position:absolute;height:calc(var(--dm-spinner-size, 60) * 1px);transform-origin:center;top:calc(50% - var(--dm-spinner-size, 60) / 2 * 1px);left:calc(50% - var(--dm-spinner-size, 60) / 2 * 1px);background-size:cover}.dm-spinner-wrapper .dm-spinner-inner-wrapper .dm-spinner-text{position:relative;display:flow-root;top:calc(50% + var(--dm-spinner-size, 60) * 1px / 2 + 5px + var(--dm-spinner-font-size, 20) * 1px / 2 + var(--dm-spinner-text-position-y-offset, 0px) * 1px);margin:0 auto;color:var(--dm-spinner-text-color, #000);text-align:center;font-weight:700}\n"] }]
|
|
1048
|
+
args: [{ selector: 'dm-spinner', standalone: true, imports: [CommonModule], changeDetection: ChangeDetectionStrategy.Eager, template: "@if ( (_spinnerService.visibility$() && (_spinnerService.spinnerToShow$() == name())) ||\n(_spinnerService.spinnerTasks$().size > 0 && name() == 'dm-spinner')) {\n\n<div class=\"dm-spinner-wrapper\">\n <div class=\"dm-spinner-inner-wrapper\">\n @switch (type()) { @case ('flower') {\n <div class=\"dm-spinner-flower\"></div>\n } @case ('rounded') {\n <div class=\"dm-spinner-rounded\"></div>\n } @case ('gif') {\n <img class=\"dm-spinner-gif\" [src]=\"gifSrc()\" [width]=\"size()\" [height]=\"'auto'\" />\n } }\n <div class=\"dm-spinner-text\" [style.font-size.px]=\"fontSize()\">\n {{ spinnerText() }}\n </div>\n </div>\n</div>\n}\n", styles: [":host-context(.loading-active) .dm-spinner-wrapper{pointer-events:none}:host-context(.loading-active) .dm-spinner-wrapper{pointer-events:auto}.dm-spinner-wrapper{position:var(--dm-spinner-position, absolute);top:0;left:0;height:100%;width:100%;background-color:var(--dm-spinner-background-color, rgba(0, 0, 0, .2));z-index:9999999999;-webkit-backdrop-filter:blur(var(--dm-spinner-background-blur, 5px));backdrop-filter:blur(var(--dm-spinner-background-blur, 5px))}.dm-spinner-wrapper .dm-spinner-inner-wrapper{position:relative;width:100%;height:100%;display:block}.dm-spinner-wrapper .dm-spinner-inner-wrapper .dm-spinner-rounded{width:calc(var(--dm-spinner-size, 60) * 1px);position:absolute;height:calc(var(--dm-spinner-size, 60) * 1px);transform-origin:center;top:calc(50% - var(--dm-spinner-size, 60) / 2 * 1px);left:calc(50% - var(--dm-spinner-size, 60) / 2 * 1px);border-top:calc(var(--dm-spinner-border-thikness, 5) * 1px) solid var(--dm-spinner-first-color, #1a4bd6);border-right:calc(var(--dm-spinner-border-thikness, 5) * 1px) solid var(--dm-spinner-second-color, #e6f0fb);border-bottom:calc(var(--dm-spinner-border-thikness, 5) * 1px) solid var(--dm-spinner-first-color, #1a4bd6);border-left:calc(var(--dm-spinner-border-thikness, 5) * 1px) solid var(--dm-spinner-second-color, #e6f0fb);border-radius:50%;animation:spin calc(var(--dm-spinner-speed, 2) * 1s) linear infinite}@keyframes spin{0%{transform:rotate(0)}to{transform:rotate(360deg)}}.dm-spinner-wrapper .dm-spinner-inner-wrapper .dm-spinner-flower{width:calc(var(--dm-spinner-shape-size, 25) * 1px);position:absolute;height:calc(var(--dm-spinner-shape-size, 25) * 1px);background-color:none;border-radius:50%;transform-origin:center;top:calc(50% - var(--dm-spinner-shape-size, 25) / 2 * 1px);left:calc(50% - var(--dm-spinner-shape-size, 25) / 2 * 1px);animation:flower calc(var(--dm-spinner-speed, 2) * 1s) linear infinite}@keyframes flower{0%{rotate:0deg;transform:scale(0);box-shadow:calc(var(--dm-spinner-size, 60) / 2 * 1px) calc(var(--dm-spinner-size, 60) / 2 * 1px) 0 calc(var(--dm-spinner-size, 60) / 2 * 1px) var(--dm-spinner-first-color, #1a4bd6),calc(var(--dm-spinner-size, 60) / 2 * -1px) calc(var(--dm-spinner-size, 60) / 2 * 1px) 0 calc(var(--dm-spinner-size, 60) / 2 * 1px) var(--dm-spinner-second-color, #e6f0fb),calc(var(--dm-spinner-size, 60) / 2 * -1px) calc(var(--dm-spinner-size, 60) / 2 * -1px) 0 calc(var(--dm-spinner-size, 60) / 2 * 1px) var(--dm-spinner-thired-color, #1a4bd6),calc(var(--dm-spinner-size, 60) / 2 * 1px) calc(var(--dm-spinner-size, 60) / 2 * -1px) 0 calc(var(--dm-spinner-size, 60) / 2 * 1px) var(--dm-spinner-fourth-color, #e6f0fb)}25%{rotate:180deg;transform:scale(1);box-shadow:calc(var(--dm-spinner-size, 60) / 2 * 1px) calc(var(--dm-spinner-size, 60) / 2 * 1px) 0 var(--dm-spinner-fourth-color, #e6f0fb),calc(var(--dm-spinner-size, 60) / 2 * -1px) calc(var(--dm-spinner-size, 60) / 2 * 1px) 0 var(--dm-spinner-thired-color, #1a4bd6),calc(var(--dm-spinner-size, 60) / 2 * -1px) calc(var(--dm-spinner-size, 60) / 2 * -1px) 0 var(--dm-spinner-first-color, #1a4bd6),calc(var(--dm-spinner-size, 60) / 2 * 1px) calc(var(--dm-spinner-size, 60) / 2 * -1px) 0 var(--dm-spinner-second-color, #e6f0fb)}50%{rotate:360deg;transform:scale(1);box-shadow:0 0 0 var(--dm-spinner-first-color, #1a4bd6),0 0 0 var(--dm-spinner-second-color, #e6f0fb),0 0 0 var(--dm-spinner-thired-color, #1a4bd6),0 0 0 var(--dm-spinner-fourth-color, #e6f0fb)}75%{rotate:540deg;transform:scale(1);box-shadow:calc(var(--dm-spinner-size, 60) / 2 * 1px) calc(var(--dm-spinner-size, 60) / 2 * 1px) 0 var(--dm-spinner-second-color, #e6f0fb),calc(var(--dm-spinner-size, 60) / 2 * -1px) calc(var(--dm-spinner-size, 60) / 2 * 1px) 0 var(--dm-spinner-fourth-color, #e6f0fb),calc(var(--dm-spinner-size, 60) / 2 * -1px) calc(var(--dm-spinner-size, 60) / 2 * -1px) 0 var(--dm-spinner-first-color, #1a4bd6),calc(var(--dm-spinner-size, 60) / 2 * 1px) calc(var(--dm-spinner-size, 60) / 2 * -1px) 0 var(--dm-spinner-thired-color, #1a4bd6)}to{rotate:720deg;transform:scale(0);box-shadow:calc(var(--dm-spinner-size, 60) / 2 * 1px) calc(var(--dm-spinner-size, 60) / 2 * 1px) 0 calc(var(--dm-spinner-size, 60) / 2 * 1px) var(--dm-spinner-first-color, #1a4bd6),calc(var(--dm-spinner-size, 60) / 2 * -1px) calc(var(--dm-spinner-size, 60) / 2 * 1px) 0 calc(var(--dm-spinner-size, 60) / 2 * 1px) var(--dm-spinner-second-color, #e6f0fb),calc(var(--dm-spinner-size, 60) / 2 * -1px) calc(var(--dm-spinner-size, 60) / 2 * -1px) 0 calc(var(--dm-spinner-size, 60) / 2 * 1px) var(--dm-spinner-thired-color, #1a4bd6),calc(var(--dm-spinner-size, 60) / 2 * 1px) calc(var(--dm-spinner-size, 60) / 2 * -1px) 0 calc(var(--dm-spinner-size, 60) / 2 * 1px) var(--dm-spinner-fourth-color, #e6f0fb)}}.dm-spinner-wrapper .dm-spinner-inner-wrapper .dm-spinner-gif{width:calc(var(--dm-spinner-size, 60) * 1px);position:absolute;height:calc(var(--dm-spinner-size, 60) * 1px);transform-origin:center;top:calc(50% - var(--dm-spinner-size, 60) / 2 * 1px);left:calc(50% - var(--dm-spinner-size, 60) / 2 * 1px);background-size:cover}.dm-spinner-wrapper .dm-spinner-inner-wrapper .dm-spinner-text{position:relative;display:flow-root;top:calc(50% + var(--dm-spinner-size, 60) * 1px / 2 + 5px + var(--dm-spinner-font-size, 20) * 1px / 2 + var(--dm-spinner-text-position-y-offset, 0px) * 1px);margin:0 auto;color:var(--dm-spinner-text-color, #000);text-align:center;font-weight:700}\n"] }]
|
|
965
1049
|
}], ctorParameters: () => [{ type: DmSpinnerService }, { type: i0.Renderer2 }], propDecorators: { color: [{ type: i0.Input, args: [{ isSignal: true, alias: "color", required: false }] }], type: [{ type: i0.Input, args: [{ isSignal: true, alias: "type", required: false }] }], gifSrc: [{ type: i0.Input, args: [{ isSignal: true, alias: "gifSrc", required: false }] }], size: [{ type: i0.Input, args: [{ isSignal: true, alias: "size", required: false }] }], shapeSize: [{ type: i0.Input, args: [{ isSignal: true, alias: "shapeSize", required: false }] }], speed: [{ type: i0.Input, args: [{ isSignal: true, alias: "speed", required: false }] }], borderThikness: [{ type: i0.Input, args: [{ isSignal: true, alias: "borderThikness", required: false }] }], position: [{ type: i0.Input, args: [{ isSignal: true, alias: "position", required: false }] }], backgroundColor: [{ type: i0.Input, args: [{ isSignal: true, alias: "backgroundColor", required: false }] }], text: [{ type: i0.Input, args: [{ isSignal: true, alias: "text", required: false }] }], textColor: [{ type: i0.Input, args: [{ isSignal: true, alias: "textColor", required: false }] }], fontSize: [{ type: i0.Input, args: [{ isSignal: true, alias: "fontSize", required: false }] }], textPosition: [{ type: i0.Input, args: [{ isSignal: true, alias: "textPosition", required: false }] }], colors: [{ type: i0.Input, args: [{ isSignal: true, alias: "colors", required: false }] }], backgroundBlur: [{ type: i0.Input, args: [{ isSignal: true, alias: "backgroundBlur", required: false }] }], textPositionYOffset: [{ type: i0.Input, args: [{ isSignal: true, alias: "textPositionYOffset", required: false }] }], name: [{ type: i0.Input, args: [{ isSignal: true, alias: "name", required: false }] }] } });
|
|
966
1050
|
|
|
967
1051
|
const shouldCacheColumn = (column) => {
|
|
@@ -976,14 +1060,16 @@ const DM_TABLE_SCROLLBAR_WIDTH_CSS_VAR = '--dm-table-scrollbar-width';
|
|
|
976
1060
|
const DM_TABLE_SCROLLBAR_BORDER_RADIUS_CSS_VAR = '--dm-table-scrollbar-border-radius';
|
|
977
1061
|
|
|
978
1062
|
class DmTableCellHost {
|
|
979
|
-
component = input.required(
|
|
980
|
-
|
|
981
|
-
|
|
982
|
-
|
|
1063
|
+
component = input.required(/* @ts-ignore */
|
|
1064
|
+
...(ngDevMode ? [{ debugName: "component" }] : /* istanbul ignore next */ []));
|
|
1065
|
+
context = input.required(/* @ts-ignore */
|
|
1066
|
+
...(ngDevMode ? [{ debugName: "context" }] : /* istanbul ignore next */ []));
|
|
1067
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.2", ngImport: i0, type: DmTableCellHost, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
1068
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "22.0.2", 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: i12.NgComponentOutlet, selector: "[ngComponentOutlet]", inputs: ["ngComponentOutlet", "ngComponentOutletInputs", "ngComponentOutletInjector", "ngComponentOutletEnvironmentInjector", "ngComponentOutletContent", "ngComponentOutletNgModule"], exportAs: ["ngComponentOutlet"] }], changeDetection: i0.ChangeDetectionStrategy.Eager });
|
|
983
1069
|
}
|
|
984
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
1070
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.2", ngImport: i0, type: DmTableCellHost, decorators: [{
|
|
985
1071
|
type: Component,
|
|
986
|
-
args: [{ selector: 'dm-table-cell-host', standalone: true, imports: [CommonModule], template: "<ng-container\n *ngComponentOutlet=\"\n component();\n inputs: {\n row: context().row,\n column: context().column,\n }\n \"\n></ng-container>\n" }]
|
|
1072
|
+
args: [{ selector: 'dm-table-cell-host', standalone: true, imports: [CommonModule], changeDetection: ChangeDetectionStrategy.Eager, template: "<ng-container\n *ngComponentOutlet=\"\n component();\n inputs: {\n row: context().row,\n column: context().column,\n }\n \"\n></ng-container>\n" }]
|
|
987
1073
|
}], propDecorators: { component: [{ type: i0.Input, args: [{ isSignal: true, alias: "component", required: true }] }], context: [{ type: i0.Input, args: [{ isSignal: true, alias: "context", required: true }] }] } });
|
|
988
1074
|
|
|
989
1075
|
const daysOfWeek = {
|
|
@@ -1244,10 +1330,10 @@ class DmDateService {
|
|
|
1244
1330
|
}
|
|
1245
1331
|
return ageWithMonths;
|
|
1246
1332
|
}
|
|
1247
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
1248
|
-
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "
|
|
1333
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.2", ngImport: i0, type: DmDateService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
|
|
1334
|
+
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "22.0.2", ngImport: i0, type: DmDateService, providedIn: 'root' });
|
|
1249
1335
|
}
|
|
1250
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
1336
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.2", ngImport: i0, type: DmDateService, decorators: [{
|
|
1251
1337
|
type: Injectable,
|
|
1252
1338
|
args: [{
|
|
1253
1339
|
providedIn: 'root',
|
|
@@ -1425,17 +1511,55 @@ function deepMerge(defaults, custom) {
|
|
|
1425
1511
|
return result;
|
|
1426
1512
|
}
|
|
1427
1513
|
|
|
1428
|
-
class
|
|
1429
|
-
prefix = 'dm-table:
|
|
1514
|
+
class DmTableStateStorage {
|
|
1515
|
+
prefix = 'dm-table:state';
|
|
1516
|
+
legacyColumnsPrefix = 'dm-table:columns';
|
|
1517
|
+
get storage() {
|
|
1518
|
+
try {
|
|
1519
|
+
return typeof localStorage !== 'undefined' ? localStorage : null;
|
|
1520
|
+
}
|
|
1521
|
+
catch {
|
|
1522
|
+
return null;
|
|
1523
|
+
}
|
|
1524
|
+
}
|
|
1430
1525
|
load(tableId) {
|
|
1431
|
-
const
|
|
1432
|
-
|
|
1526
|
+
const storage = this.storage;
|
|
1527
|
+
if (!storage)
|
|
1528
|
+
return null;
|
|
1529
|
+
try {
|
|
1530
|
+
const raw = storage.getItem(`${this.prefix}:${tableId}`);
|
|
1531
|
+
const state = raw ? JSON.parse(raw) : null;
|
|
1532
|
+
if (state?.columns)
|
|
1533
|
+
return state;
|
|
1534
|
+
// fallback to the legacy columns-only key (pre saveState versions)
|
|
1535
|
+
const legacyRaw = storage.getItem(`${this.legacyColumnsPrefix}:${tableId}`);
|
|
1536
|
+
if (legacyRaw) {
|
|
1537
|
+
return { ...(state ?? { version: 1 }), columns: JSON.parse(legacyRaw) };
|
|
1538
|
+
}
|
|
1539
|
+
return state;
|
|
1540
|
+
}
|
|
1541
|
+
catch {
|
|
1542
|
+
return null;
|
|
1543
|
+
}
|
|
1433
1544
|
}
|
|
1434
|
-
|
|
1435
|
-
|
|
1545
|
+
saveSlice(tableId, key, value) {
|
|
1546
|
+
const storage = this.storage;
|
|
1547
|
+
if (!storage)
|
|
1548
|
+
return;
|
|
1549
|
+
const next = {
|
|
1550
|
+
...(this.load(tableId) ?? { version: 1 }),
|
|
1551
|
+
version: 1,
|
|
1552
|
+
[key]: value,
|
|
1553
|
+
};
|
|
1554
|
+
storage.setItem(`${this.prefix}:${tableId}`, JSON.stringify(next));
|
|
1555
|
+
if (key === 'columns') {
|
|
1556
|
+
// the legacy key is merged into the new one on load, so it can be dropped once migrated
|
|
1557
|
+
storage.removeItem(`${this.legacyColumnsPrefix}:${tableId}`);
|
|
1558
|
+
}
|
|
1436
1559
|
}
|
|
1437
1560
|
clear(tableId) {
|
|
1438
|
-
|
|
1561
|
+
this.storage?.removeItem(`${this.prefix}:${tableId}`);
|
|
1562
|
+
this.storage?.removeItem(`${this.legacyColumnsPrefix}:${tableId}`);
|
|
1439
1563
|
}
|
|
1440
1564
|
}
|
|
1441
1565
|
|
|
@@ -1454,10 +1578,10 @@ class DmImportantStyleDirective {
|
|
|
1454
1578
|
this.el.nativeElement.style.setProperty(key, value, 'important');
|
|
1455
1579
|
});
|
|
1456
1580
|
}
|
|
1457
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
1458
|
-
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "
|
|
1581
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.2", ngImport: i0, type: DmImportantStyleDirective, deps: [{ token: i0.ElementRef }], target: i0.ɵɵFactoryTarget.Directive });
|
|
1582
|
+
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "22.0.2", type: DmImportantStyleDirective, isStandalone: true, selector: "[dmImportantStyle]", inputs: { styles: ["dmImportantStyle", "styles"] }, usesOnChanges: true, ngImport: i0 });
|
|
1459
1583
|
}
|
|
1460
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
1584
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.2", ngImport: i0, type: DmImportantStyleDirective, decorators: [{
|
|
1461
1585
|
type: Directive,
|
|
1462
1586
|
args: [{
|
|
1463
1587
|
selector: '[dmImportantStyle]',
|
|
@@ -1469,29 +1593,35 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.3", ngImpor
|
|
|
1469
1593
|
}] } });
|
|
1470
1594
|
|
|
1471
1595
|
class DmIcon {
|
|
1472
|
-
icon = input.required(
|
|
1473
|
-
|
|
1474
|
-
|
|
1475
|
-
|
|
1596
|
+
icon = input.required(/* @ts-ignore */
|
|
1597
|
+
...(ngDevMode ? [{ debugName: "icon" }] : /* istanbul ignore next */ []));
|
|
1598
|
+
color = input(/* @ts-ignore */
|
|
1599
|
+
...(ngDevMode ? [undefined, { debugName: "color" }] : /* istanbul ignore next */ []));
|
|
1600
|
+
size = input(/* @ts-ignore */
|
|
1601
|
+
...(ngDevMode ? [undefined, { debugName: "size" }] : /* istanbul ignore next */ []));
|
|
1602
|
+
isBootstrapIcon = computed(() => this.icon().startsWith('<i'), /* @ts-ignore */
|
|
1603
|
+
...(ngDevMode ? [{ debugName: "isBootstrapIcon" }] : /* istanbul ignore next */ []));
|
|
1476
1604
|
sizeString = computed(() => {
|
|
1477
1605
|
const size = this.size() || '24px';
|
|
1478
1606
|
if (typeof size === 'number') {
|
|
1479
1607
|
return `${size}px`;
|
|
1480
1608
|
}
|
|
1481
1609
|
return size;
|
|
1482
|
-
},
|
|
1610
|
+
}, /* @ts-ignore */
|
|
1611
|
+
...(ngDevMode ? [{ debugName: "sizeString" }] : /* istanbul ignore next */ []));
|
|
1483
1612
|
constructor() { }
|
|
1484
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
1485
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "
|
|
1613
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.2", ngImport: i0, type: DmIcon, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
1614
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.0.2", type: DmIcon, isStandalone: true, selector: "dm-icon", inputs: { icon: { classPropertyName: "icon", publicName: "icon", isSignal: true, isRequired: true, transformFunction: null }, color: { classPropertyName: "color", publicName: "color", isSignal: true, isRequired: false, transformFunction: null }, size: { classPropertyName: "size", publicName: "size", isSignal: true, isRequired: false, transformFunction: null } }, ngImport: i0, template: "<div\n [ngStyle]=\"{\n width: sizeString(),\n height: sizeString()\n }\"\n>\n @if(isBootstrapIcon()) {\n <span\n [innerHTML]=\"icon()\"\n [ngStyle]=\"{\n color: color(),\n 'font-size': sizeString(),\n width: sizeString(),\n height: sizeString()\n }\"\n ></span>\n } @else {\n <mat-icon\n [ngStyle]=\"{\n color: color(),\n 'font-size': sizeString(),\n width: sizeString(),\n height: sizeString()\n }\"\n >{{ icon() }}</mat-icon\n >\n }\n</div>\n", styles: [""], dependencies: [{ kind: "component", type: MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i12.NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }], changeDetection: i0.ChangeDetectionStrategy.Eager });
|
|
1486
1615
|
}
|
|
1487
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
1616
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.2", ngImport: i0, type: DmIcon, decorators: [{
|
|
1488
1617
|
type: Component,
|
|
1489
|
-
args: [{ selector: 'dm-icon', imports: [MatIcon, CommonModule], standalone: true, template: "<div\n [ngStyle]=\"{\n width: sizeString(),\n height: sizeString()\n }\"\n>\n @if(isBootstrapIcon()) {\n <span\n [innerHTML]=\"icon()\"\n [ngStyle]=\"{\n color: color(),\n 'font-size': sizeString(),\n width: sizeString(),\n height: sizeString()\n }\"\n ></span>\n } @else {\n <mat-icon\n [ngStyle]=\"{\n color: color(),\n 'font-size': sizeString(),\n width: sizeString(),\n height: sizeString()\n }\"\n >{{ icon() }}</mat-icon\n >\n }\n</div>\n" }]
|
|
1618
|
+
args: [{ selector: 'dm-icon', imports: [MatIcon, CommonModule], standalone: true, changeDetection: ChangeDetectionStrategy.Eager, template: "<div\n [ngStyle]=\"{\n width: sizeString(),\n height: sizeString()\n }\"\n>\n @if(isBootstrapIcon()) {\n <span\n [innerHTML]=\"icon()\"\n [ngStyle]=\"{\n color: color(),\n 'font-size': sizeString(),\n width: sizeString(),\n height: sizeString()\n }\"\n ></span>\n } @else {\n <mat-icon\n [ngStyle]=\"{\n color: color(),\n 'font-size': sizeString(),\n width: sizeString(),\n height: sizeString()\n }\"\n >{{ icon() }}</mat-icon\n >\n }\n</div>\n" }]
|
|
1490
1619
|
}], ctorParameters: () => [], propDecorators: { icon: [{ type: i0.Input, args: [{ isSignal: true, alias: "icon", required: true }] }], color: [{ type: i0.Input, args: [{ isSignal: true, alias: "color", required: false }] }], size: [{ type: i0.Input, args: [{ isSignal: true, alias: "size", required: false }] }] } });
|
|
1491
1620
|
|
|
1492
1621
|
class DmTable {
|
|
1493
1622
|
sanitizer;
|
|
1494
|
-
shiftKeyPressed = signal(false,
|
|
1623
|
+
shiftKeyPressed = signal(false, /* @ts-ignore */
|
|
1624
|
+
...(ngDevMode ? [{ debugName: "shiftKeyPressed" }] : /* istanbul ignore next */ []));
|
|
1495
1625
|
onShiftKeyDown(event) {
|
|
1496
1626
|
this.shiftKeyPressed.set(true);
|
|
1497
1627
|
}
|
|
@@ -1500,38 +1630,65 @@ class DmTable {
|
|
|
1500
1630
|
}
|
|
1501
1631
|
DEFAULT_PAGINATOR_SETTINGS = DEFAULT_PAGINATOR_SETTINGS;
|
|
1502
1632
|
DEFAULT_TABLE_STYLE = DEFAULT_TABLE_STYLE;
|
|
1503
|
-
tableId = input(
|
|
1504
|
-
|
|
1505
|
-
|
|
1506
|
-
|
|
1507
|
-
|
|
1508
|
-
|
|
1509
|
-
|
|
1510
|
-
|
|
1511
|
-
|
|
1633
|
+
tableId = input(/* @ts-ignore */
|
|
1634
|
+
...(ngDevMode ? [undefined, { debugName: "tableId" }] : /* istanbul ignore next */ []));
|
|
1635
|
+
saveState = input(/* @ts-ignore */
|
|
1636
|
+
...(ngDevMode ? [undefined, { debugName: "saveState" }] : /* istanbul ignore next */ []));
|
|
1637
|
+
saveStateResolved = computed(() => ({
|
|
1638
|
+
columns: this.saveState()?.columns ?? true,
|
|
1639
|
+
paginator: this.saveState()?.paginator ?? false,
|
|
1640
|
+
sort: this.saveState()?.sort ?? false,
|
|
1641
|
+
filter: this.saveState()?.filter ?? false,
|
|
1642
|
+
}), /* @ts-ignore */
|
|
1643
|
+
...(ngDevMode ? [{ debugName: "saveStateResolved" }] : /* istanbul ignore next */ []));
|
|
1644
|
+
dataSource = input.required(/* @ts-ignore */
|
|
1645
|
+
...(ngDevMode ? [{ debugName: "dataSource" }] : /* istanbul ignore next */ []));
|
|
1646
|
+
columns = input.required(/* @ts-ignore */
|
|
1647
|
+
...(ngDevMode ? [{ debugName: "columns" }] : /* istanbul ignore next */ []));
|
|
1648
|
+
noDataMessage = input('אין נתונים להצגה', /* @ts-ignore */
|
|
1649
|
+
...(ngDevMode ? [{ debugName: "noDataMessage" }] : /* istanbul ignore next */ []));
|
|
1650
|
+
enableSearch = input(false, { ...(ngDevMode ? { debugName: "enableSearch" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
|
|
1651
|
+
searchPlaceholder = input('חיפוש...', /* @ts-ignore */
|
|
1652
|
+
...(ngDevMode ? [{ debugName: "searchPlaceholder" }] : /* istanbul ignore next */ []));
|
|
1653
|
+
clearSearchTooltip = input('נקה חיפוש', /* @ts-ignore */
|
|
1654
|
+
...(ngDevMode ? [{ debugName: "clearSearchTooltip" }] : /* istanbul ignore next */ []));
|
|
1655
|
+
searchInputAppearance = input('fill', /* @ts-ignore */
|
|
1656
|
+
...(ngDevMode ? [{ debugName: "searchInputAppearance" }] : /* istanbul ignore next */ []));
|
|
1657
|
+
filterPredicate = input(null, /* @ts-ignore */
|
|
1658
|
+
...(ngDevMode ? [{ debugName: "filterPredicate" }] : /* istanbul ignore next */ []));
|
|
1512
1659
|
_filterPredicate = null;
|
|
1513
|
-
enableSperatedSearch = input(false, { ...(ngDevMode ? { debugName: "enableSperatedSearch" } : {}), transform: booleanAttribute });
|
|
1514
|
-
actionButtons = input([],
|
|
1515
|
-
|
|
1516
|
-
|
|
1517
|
-
|
|
1518
|
-
|
|
1519
|
-
|
|
1520
|
-
|
|
1521
|
-
|
|
1522
|
-
|
|
1523
|
-
|
|
1524
|
-
|
|
1525
|
-
|
|
1526
|
-
|
|
1527
|
-
|
|
1528
|
-
|
|
1529
|
-
|
|
1530
|
-
|
|
1660
|
+
enableSperatedSearch = input(false, { ...(ngDevMode ? { debugName: "enableSperatedSearch" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
|
|
1661
|
+
actionButtons = input([], /* @ts-ignore */
|
|
1662
|
+
...(ngDevMode ? [{ debugName: "actionButtons" }] : /* istanbul ignore next */ []));
|
|
1663
|
+
enablePrint = input(false, { ...(ngDevMode ? { debugName: "enablePrint" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
|
|
1664
|
+
printButton = input(DEFAULT_PRINT_TABLE_BUTTON, /* @ts-ignore */
|
|
1665
|
+
...(ngDevMode ? [{ debugName: "printButton" }] : /* istanbul ignore next */ []));
|
|
1666
|
+
enablePagination = input(false, { ...(ngDevMode ? { debugName: "enablePagination" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
|
|
1667
|
+
autoPaginationAboveRowsCount = input(100, { ...(ngDevMode ? { debugName: "autoPaginationAboveRowsCount" } : /* istanbul ignore next */ {}), transform: numberAttribute });
|
|
1668
|
+
paginatorSettings = input(DEFAULT_PAGINATOR_SETTINGS, /* @ts-ignore */
|
|
1669
|
+
...(ngDevMode ? [{ debugName: "paginatorSettings" }] : /* istanbul ignore next */ []));
|
|
1670
|
+
enableLoadingProgressbar = input(true, { ...(ngDevMode ? { debugName: "enableLoadingProgressbar" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
|
|
1671
|
+
enableColumnsDragAndDrop = input(false, { ...(ngDevMode ? { debugName: "enableColumnsDragAndDrop" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
|
|
1672
|
+
enableColumnsDragHandle = input(true, { ...(ngDevMode ? { debugName: "enableColumnsDragHandle" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
|
|
1673
|
+
enableTotalRow = input(false, { ...(ngDevMode ? { debugName: "enableTotalRow" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
|
|
1674
|
+
tableStyle = input(DEFAULT_TABLE_STYLE, /* @ts-ignore */
|
|
1675
|
+
...(ngDevMode ? [{ debugName: "tableStyle" }] : /* istanbul ignore next */ []));
|
|
1676
|
+
tableClasses = input(/* @ts-ignore */
|
|
1677
|
+
...(ngDevMode ? [undefined, { debugName: "tableClasses" }] : /* istanbul ignore next */ []));
|
|
1678
|
+
rowStyleFn = input(null, /* @ts-ignore */
|
|
1679
|
+
...(ngDevMode ? [{ debugName: "rowStyleFn" }] : /* istanbul ignore next */ []));
|
|
1680
|
+
disableRowHoverStyling = input(false, { ...(ngDevMode ? { debugName: "disableRowHoverStyling" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
|
|
1681
|
+
editColumnsVisibility = input(false, { ...(ngDevMode ? { debugName: "editColumnsVisibility" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
|
|
1682
|
+
editColumnsVisibilityButton = input(DM_TABLE_EDIT_COLUMNS_VISIBILITY_BUTTON, /* @ts-ignore */
|
|
1683
|
+
...(ngDevMode ? [{ debugName: "editColumnsVisibilityButton" }] : /* istanbul ignore next */ []));
|
|
1684
|
+
editColumnsVisibilitySelectAllLabel = input('הצג את כל העמודות', /* @ts-ignore */
|
|
1685
|
+
...(ngDevMode ? [{ debugName: "editColumnsVisibilitySelectAllLabel" }] : /* istanbul ignore next */ []));
|
|
1531
1686
|
rowDoubleClick = output();
|
|
1532
|
-
onRowDoubleClick = input(
|
|
1533
|
-
|
|
1534
|
-
|
|
1687
|
+
onRowDoubleClick = input(/* @ts-ignore */
|
|
1688
|
+
...(ngDevMode ? [undefined, { debugName: "onRowDoubleClick" }] : /* istanbul ignore next */ []));
|
|
1689
|
+
enableLogs = input(false, { ...(ngDevMode ? { debugName: "enableLogs" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
|
|
1690
|
+
columnsSortState = signal([], /* @ts-ignore */
|
|
1691
|
+
...(ngDevMode ? [{ debugName: "columnsSortState" }] : /* istanbul ignore next */ []));
|
|
1535
1692
|
mergedTableStyle = computed(() => {
|
|
1536
1693
|
const defaults = { ...DEFAULT_TABLE_STYLE };
|
|
1537
1694
|
const custom = this.tableStyle() || {};
|
|
@@ -1541,7 +1698,8 @@ class DmTable {
|
|
|
1541
1698
|
}
|
|
1542
1699
|
this.saveScrollbarStyle(newStyle);
|
|
1543
1700
|
return newStyle;
|
|
1544
|
-
},
|
|
1701
|
+
}, /* @ts-ignore */
|
|
1702
|
+
...(ngDevMode ? [{ debugName: "mergedTableStyle" }] : /* istanbul ignore next */ []));
|
|
1545
1703
|
saveScrollbarStyle(mergedStyle) {
|
|
1546
1704
|
const scrollbarColor = mergedStyle?.scrollbar?.['color'] ||
|
|
1547
1705
|
mergedStyle?.table?.thead?.root?.['background-color'] ||
|
|
@@ -1561,16 +1719,25 @@ class DmTable {
|
|
|
1561
1719
|
document.documentElement.style.setProperty(DM_TABLE_SCROLLBAR_WIDTH_CSS_VAR, scrollbarWidth);
|
|
1562
1720
|
document.documentElement.style.setProperty(DM_TABLE_SCROLLBAR_BORDER_RADIUS_CSS_VAR, scrollbarBorderRadius);
|
|
1563
1721
|
}
|
|
1564
|
-
hoveredRowIndex = signal(null,
|
|
1565
|
-
|
|
1722
|
+
hoveredRowIndex = signal(null, /* @ts-ignore */
|
|
1723
|
+
...(ngDevMode ? [{ debugName: "hoveredRowIndex" }] : /* istanbul ignore next */ []));
|
|
1724
|
+
datasource = signal(new DmCmpsDataSource([]), /* @ts-ignore */
|
|
1725
|
+
...(ngDevMode ? [{ debugName: "datasource" }] : /* istanbul ignore next */ []));
|
|
1566
1726
|
runtimeColumns = computed(() => {
|
|
1567
1727
|
const cols = this.columns() ?? [];
|
|
1568
1728
|
const normalized = this.normalizeColumns(cols);
|
|
1569
1729
|
return this.reconcileColumns(normalized);
|
|
1570
|
-
},
|
|
1571
|
-
|
|
1572
|
-
|
|
1573
|
-
|
|
1730
|
+
}, /* @ts-ignore */
|
|
1731
|
+
...(ngDevMode ? [{ debugName: "runtimeColumns" }] : /* istanbul ignore next */ []));
|
|
1732
|
+
hoveredColumnHeaderIndex = signal(null, /* @ts-ignore */
|
|
1733
|
+
...(ngDevMode ? [{ debugName: "hoveredColumnHeaderIndex" }] : /* istanbul ignore next */ []));
|
|
1734
|
+
stateStorage = new DmTableStateStorage();
|
|
1735
|
+
columnState = signal(null, /* @ts-ignore */
|
|
1736
|
+
...(ngDevMode ? [{ debugName: "columnState" }] : /* istanbul ignore next */ []));
|
|
1737
|
+
/** Restored-from-storage or user-chosen page size; wins over paginatorSettings().pageSize. */
|
|
1738
|
+
persistedPageSize = signal(null, /* @ts-ignore */
|
|
1739
|
+
...(ngDevMode ? [{ debugName: "persistedPageSize" }] : /* istanbul ignore next */ []));
|
|
1740
|
+
restoredForTableId = null;
|
|
1574
1741
|
visibleRuntimeColumns = computed(() => {
|
|
1575
1742
|
const cols = this.runtimeColumns();
|
|
1576
1743
|
const state = this.columnState();
|
|
@@ -1590,14 +1757,19 @@ class DmTable {
|
|
|
1590
1757
|
.filter((x) => x.state.visible !== false)
|
|
1591
1758
|
.sort((a, b) => a.state.order - b.state.order)
|
|
1592
1759
|
.map((x) => x.col);
|
|
1593
|
-
},
|
|
1760
|
+
}, /* @ts-ignore */
|
|
1761
|
+
...(ngDevMode ? [{ debugName: "visibleRuntimeColumns" }] : /* istanbul ignore next */ []));
|
|
1594
1762
|
visibleColumns = computed(() => {
|
|
1595
1763
|
return this.visibleRuntimeColumns().map((col) => col);
|
|
1596
|
-
},
|
|
1764
|
+
}, /* @ts-ignore */
|
|
1765
|
+
...(ngDevMode ? [{ debugName: "visibleColumns" }] : /* istanbul ignore next */ []));
|
|
1597
1766
|
prevColumns = new Map();
|
|
1598
|
-
rowIdentifierField = input('_id',
|
|
1599
|
-
|
|
1600
|
-
|
|
1767
|
+
rowIdentifierField = input('_id', /* @ts-ignore */
|
|
1768
|
+
...(ngDevMode ? [{ debugName: "rowIdentifierField" }] : /* istanbul ignore next */ []));
|
|
1769
|
+
modifiedRowsIds = signal(new Set(), /* @ts-ignore */
|
|
1770
|
+
...(ngDevMode ? [{ debugName: "modifiedRowsIds" }] : /* istanbul ignore next */ []));
|
|
1771
|
+
searchTerm = signal('', /* @ts-ignore */
|
|
1772
|
+
...(ngDevMode ? [{ debugName: "searchTerm" }] : /* istanbul ignore next */ []));
|
|
1601
1773
|
totalRowValues = computed(() => {
|
|
1602
1774
|
const ds = this.datasource();
|
|
1603
1775
|
const cols = this.runtimeColumns();
|
|
@@ -1615,7 +1787,8 @@ class DmTable {
|
|
|
1615
1787
|
}
|
|
1616
1788
|
}
|
|
1617
1789
|
return map;
|
|
1618
|
-
},
|
|
1790
|
+
}, /* @ts-ignore */
|
|
1791
|
+
...(ngDevMode ? [{ debugName: "totalRowValues" }] : /* istanbul ignore next */ []));
|
|
1619
1792
|
totalRowStyles = computed(() => {
|
|
1620
1793
|
const ds = this.datasource();
|
|
1621
1794
|
const cols = this.runtimeColumns();
|
|
@@ -1635,7 +1808,8 @@ class DmTable {
|
|
|
1635
1808
|
}
|
|
1636
1809
|
}
|
|
1637
1810
|
return map;
|
|
1638
|
-
},
|
|
1811
|
+
}, /* @ts-ignore */
|
|
1812
|
+
...(ngDevMode ? [{ debugName: "totalRowStyles" }] : /* istanbul ignore next */ []));
|
|
1639
1813
|
constructor(sanitizer) {
|
|
1640
1814
|
this.sanitizer = sanitizer;
|
|
1641
1815
|
this.runEffects();
|
|
@@ -1650,23 +1824,27 @@ class DmTable {
|
|
|
1650
1824
|
effect(() => {
|
|
1651
1825
|
const tableId = this.tableId();
|
|
1652
1826
|
const cols = this.runtimeColumns();
|
|
1653
|
-
|
|
1654
|
-
|
|
1655
|
-
|
|
1656
|
-
}
|
|
1827
|
+
const saveStateOptions = this.saveStateResolved();
|
|
1828
|
+
const stored = tableId ? this.stateStorage.load(tableId) : null;
|
|
1829
|
+
let storedColumns = saveStateOptions.columns ? (stored?.columns ?? null) : null;
|
|
1657
1830
|
// sanitize stored state to remove any columns that no longer exist
|
|
1658
|
-
if (
|
|
1831
|
+
if (storedColumns) {
|
|
1659
1832
|
const colIds = new Set(cols.map((c) => c.id));
|
|
1660
|
-
|
|
1833
|
+
storedColumns = storedColumns.filter((s) => colIds.has(s.id));
|
|
1834
|
+
}
|
|
1835
|
+
this.columnState.set(this.initColumnState(cols, storedColumns));
|
|
1836
|
+
// paginator/sort/filter are restored once per tableId (they are live user state afterwards)
|
|
1837
|
+
if (tableId && this.restoredForTableId !== tableId) {
|
|
1838
|
+
this.restoredForTableId = tableId;
|
|
1839
|
+
untracked(() => this.restoreNonColumnState(stored, cols, saveStateOptions));
|
|
1661
1840
|
}
|
|
1662
|
-
this.columnState.set(this.initColumnState(cols, stored));
|
|
1663
1841
|
});
|
|
1664
1842
|
effect(() => {
|
|
1665
1843
|
const id = this.tableId();
|
|
1666
1844
|
const state = this.columnState();
|
|
1667
|
-
if (!id || !state)
|
|
1845
|
+
if (!id || !state || !this.saveStateResolved().columns)
|
|
1668
1846
|
return;
|
|
1669
|
-
this.
|
|
1847
|
+
this.stateStorage.saveSlice(id, 'columns', state);
|
|
1670
1848
|
});
|
|
1671
1849
|
effect(() => {
|
|
1672
1850
|
this._filterPredicate = this.filterPredicate();
|
|
@@ -1680,7 +1858,18 @@ class DmTable {
|
|
|
1680
1858
|
this.datasource().applySperatedSearch(true);
|
|
1681
1859
|
}
|
|
1682
1860
|
if (this.enablePagination() || dataSource.length >= this.autoPaginationAboveRowsCount()) {
|
|
1683
|
-
this.datasource()
|
|
1861
|
+
const ds = this.datasource();
|
|
1862
|
+
const desiredPageSize = untracked(this.persistedPageSize) ??
|
|
1863
|
+
this.paginatorSettings()?.pageSize ??
|
|
1864
|
+
DEFAULT_PAGINATOR_SETTINGS.pageSize;
|
|
1865
|
+
if (!untracked(() => ds.isPaginationEnabled())) {
|
|
1866
|
+
ds.applyPagination(desiredPageSize);
|
|
1867
|
+
}
|
|
1868
|
+
else if (untracked(() => ds.getPageSize()) !== desiredPageSize) {
|
|
1869
|
+
// setPageSize keeps the current page index (clamped by the datasource),
|
|
1870
|
+
// so a datasource update doesn't kick the user back to the first page
|
|
1871
|
+
ds.setPageSize(desiredPageSize);
|
|
1872
|
+
}
|
|
1684
1873
|
}
|
|
1685
1874
|
else {
|
|
1686
1875
|
this.datasource().disablePagination();
|
|
@@ -1701,6 +1890,58 @@ class DmTable {
|
|
|
1701
1890
|
this.datasource().sortByFields(sortState);
|
|
1702
1891
|
}
|
|
1703
1892
|
});
|
|
1893
|
+
effect(() => {
|
|
1894
|
+
const id = this.tableId();
|
|
1895
|
+
const sortState = this.columnsSortState();
|
|
1896
|
+
if (!id || !this.saveStateResolved().sort)
|
|
1897
|
+
return;
|
|
1898
|
+
this.stateStorage.saveSlice(id, 'sort',
|
|
1899
|
+
// sortFn is not serializable, it is re-attached from the column definition on restore
|
|
1900
|
+
sortState.map(({ id: colId, field, direction }) => ({ id: colId, field, direction })));
|
|
1901
|
+
});
|
|
1902
|
+
effect(() => {
|
|
1903
|
+
const id = this.tableId();
|
|
1904
|
+
const term = this.searchTerm();
|
|
1905
|
+
if (!id || !this.saveStateResolved().filter)
|
|
1906
|
+
return;
|
|
1907
|
+
this.stateStorage.saveSlice(id, 'filter', term);
|
|
1908
|
+
});
|
|
1909
|
+
}
|
|
1910
|
+
restoreNonColumnState(stored, cols, options) {
|
|
1911
|
+
if (!stored)
|
|
1912
|
+
return;
|
|
1913
|
+
if (options.paginator && typeof stored.pageSize === 'number') {
|
|
1914
|
+
const pageSizeOptions = this.paginatorSettings()?.pageSizeOptions ?? DEFAULT_PAGINATOR_SETTINGS.pageSizeOptions;
|
|
1915
|
+
if (pageSizeOptions?.includes(stored.pageSize)) {
|
|
1916
|
+
this.persistedPageSize.set(stored.pageSize);
|
|
1917
|
+
}
|
|
1918
|
+
}
|
|
1919
|
+
if (options.sort && stored.sort?.length) {
|
|
1920
|
+
const colMap = new Map(cols.map((c) => [c.id, c]));
|
|
1921
|
+
const restoredSort = [];
|
|
1922
|
+
for (const sort of stored.sort) {
|
|
1923
|
+
// drop sort entries whose column no longer exists
|
|
1924
|
+
const col = sort.id ? colMap.get(sort.id) : cols.find((c) => c.field === sort.field);
|
|
1925
|
+
if (!col)
|
|
1926
|
+
continue;
|
|
1927
|
+
const entry = {
|
|
1928
|
+
id: sort.id ?? col.id,
|
|
1929
|
+
field: sort.field,
|
|
1930
|
+
direction: sort.direction,
|
|
1931
|
+
};
|
|
1932
|
+
if (col.sortFn) {
|
|
1933
|
+
entry.sortFn = col.sortFn;
|
|
1934
|
+
}
|
|
1935
|
+
restoredSort.push(entry);
|
|
1936
|
+
}
|
|
1937
|
+
if (restoredSort.length) {
|
|
1938
|
+
this.columnsSortState.set(restoredSort);
|
|
1939
|
+
}
|
|
1940
|
+
}
|
|
1941
|
+
if (options.filter && stored.filter) {
|
|
1942
|
+
this.searchTerm.set(stored.filter);
|
|
1943
|
+
this.datasource().search(stored.filter);
|
|
1944
|
+
}
|
|
1704
1945
|
}
|
|
1705
1946
|
initColumnState(columns, stored) {
|
|
1706
1947
|
// 1. If user has saved state → use it
|
|
@@ -1864,6 +2105,11 @@ class DmTable {
|
|
|
1864
2105
|
onPageSizeChange(event, option) {
|
|
1865
2106
|
if (event.isUserInput) {
|
|
1866
2107
|
this.datasource().setPageSize(option);
|
|
2108
|
+
this.persistedPageSize.set(option);
|
|
2109
|
+
const id = this.tableId();
|
|
2110
|
+
if (id && this.saveStateResolved().paginator) {
|
|
2111
|
+
this.stateStorage.saveSlice(id, 'pageSize', option);
|
|
2112
|
+
}
|
|
1867
2113
|
}
|
|
1868
2114
|
}
|
|
1869
2115
|
getFooterTdStyle(column) {
|
|
@@ -2333,10 +2579,10 @@ class DmTable {
|
|
|
2333
2579
|
}
|
|
2334
2580
|
return { headers, rows };
|
|
2335
2581
|
};
|
|
2336
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
2337
|
-
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: true, transformFunction: null }, columns: { classPropertyName: "columns", publicName: "columns", isSignal: true, isRequired: true, 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 }, enableSperatedSearch: { classPropertyName: "enableSperatedSearch", publicName: "enableSperatedSearch", 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 }, disableRowHoverStyling: { classPropertyName: "disableRowHoverStyling", publicName: "disableRowHoverStyling", 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 }, onRowDoubleClick: { classPropertyName: "onRowDoubleClick", publicName: "onRowDoubleClick", isSignal: true, isRequired: false, transformFunction: null }, enableLogs: { classPropertyName: "enableLogs", publicName: "enableLogs", isSignal: true, isRequired: false, transformFunction: null }, rowIdentifierField: { classPropertyName: "rowIdentifierField", publicName: "rowIdentifierField", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { rowDoubleClick: "rowDoubleClick" }, 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 }\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 }\n @for (button of actionButtons(); track $index) {\n @if (!button.showIf || button.showIf(visibleColumns(), datasource())) {\n <ng-container\n *ngTemplateOutlet=\"dmTableActionButton; context: { $implicit: button }\"\n ></ng-container>\n }\n }\n </div>\n <div\n [ngClass]=\"tableClasses()?.tableWrapper || {}\"\n [ngStyle]=\"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\n style=\"height: 4px !important; max-height: 4px !important; line-height: 4px !important\"\n >\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) {\n [{{ sort.index + 1 }}]\n }\n } @else if (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 }\n @if (enableColumnsDragHandle() && enableColumnsDragAndDrop()) {\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) {\n @case ('$index') {\n {{ datasource().getFirstItemIndexInPage() + i + 1 }}\n }\n @case ('component') {\n @if (column.component) {\n <dm-table-cell-host\n [component]=\"column.component\"\n [context]=\"createCellContext(row, column)\"\n ></dm-table-cell-host>\n }\n }\n @case ('tel') {\n <a [href]=\"'tel:' + (column.field ? $any(row)[column.field] : '')\">{{\n resolveCellValue(row, column)\n }}</a>\n }\n @case ('mail') {\n <a [href]=\"'mailto:' + (column.field ? $any(row)[column.field] : '')\">{{\n resolveCellValue(row, column)\n }}</a>\n }\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 }\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 }\n @case ('customHtml') {\n @if (column.customCellTemplate) {\n <ng-container\n *ngTemplateOutlet=\"\n column.customCellTemplate;\n context: createCellContext(row, column)\n \"\n >\n </ng-container>\n } @else {\n <span [innerHTML]=\"resolveCellValue(row, column)\"></span>\n }\n }\n @case ('actions') {\n <span style=\"display: flex; align-items: center\">\n @for (button of column.actionsButtons || []; track $index) {\n @if (!button.showIf || button.showIf(row)) {\n <ng-container\n *ngTemplateOutlet=\"\n dmTableRowActionButton;\n context: {\n $implicit: button,\n row,\n }\n \"\n ></ng-container>\n }\n }\n </span>\n }\n @case ('slideToggle') {\n <mat-slide-toggle\n [id]=\"'slideToggle_' + i + '_' + column.id\"\n [checked]=\"resolveCellValue(row, column)\"\n [matTooltip]=\"getSlideToggleTooltip(row, column)\"\n (change)=\"onSlideToggleChange(row, column, $event)\"\n [disabled]=\"isSlideToggleDisabled(row, column)\"\n >\n {{ getSlideToggleLabel(row, column) }}\n </mat-slide-toggle>\n }\n @case ('input') {\n <ng-container\n *ngTemplateOutlet=\"\n dmTableInputCell;\n context: {\n $implicit: row,\n column: column,\n }\n \"\n />\n }\n @default {\n {{ resolveCellValue(row, column) }}\n }\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 ||\n DEFAULT_TABLE_STYLE.table?.tfoot?.root ||\n {}\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 {\n @if (datasource().isPaginationEnabled()) {\n <ng-container [ngTemplateOutlet]=\"paginator\" />\n }\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]=\"\n button.children && button.children.length > 0 ? tableButtonRootMenu : null\n \"\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]=\"{\n 'background-color': button.backgroundColor ? button.backgroundColor : undefined,\n }\"\n >\n <dm-icon [icon]=\"button.icon\" [color]=\"button.color ? button.color : undefined\"></dm-icon>\n </button>\n } @else {\n <button\n #rootTrigger=\"matMenuTrigger\"\n [matButton]=\"button.buttonType || 'filled'\"\n [ngStyle]=\"{\n 'background-color': button.backgroundColor ? button.backgroundColor : undefined,\n }\"\n aria-label=\"{{ button.label }}\"\n [matTooltip]=\"button.tooltip || ''\"\n [matMenuTriggerFor]=\"\n button.children && button.children.length > 0 ? tableButtonRootMenu : null\n \"\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 <div class=\"dm-table-button-label-flex\">\n @if (button.icon) {\n <dm-icon [icon]=\"button.icon\" [color]=\"button.color ? button.color : undefined\"></dm-icon>\n }\n <span [ngStyle]=\"{ color: button.color ? button.color : undefined }\">\n {{ button.label }}\n </span>\n </div>\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) {\n @if (!button.showIf || button.showIf(visibleColumns(), datasource())) {\n @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]=\"{\n 'background-color': button.backgroundColor ? button.backgroundColor : undefined,\n }\"\n >\n <span style=\"display: flex; align-items: center; width: 100%; gap: 5px\">\n @if (button.icon) {\n <dm-icon\n [icon]=\"button.icon\"\n [color]=\"button.color ? button.color : undefined\"\n ></dm-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)=\"\n button.onClick?.(\n visibleColumns(),\n datasource(),\n $event,\n getCloseParentMenusFn(rootTrigger)\n )\n \"\n [ngStyle]=\"{\n 'background-color': button.backgroundColor ? button.backgroundColor : undefined,\n }\"\n >\n <div class=\"dm-table-button-label-flex\">\n @if (button.icon) {\n <dm-icon\n [icon]=\"button.icon\"\n [color]=\"button.color ? button.color : undefined\"\n ></dm-icon>\n }\n <span [style.color]=\"button.color ? button.color : undefined\">{{ button.label }}</span>\n </div>\n </button>\n }\n }\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) {\n @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]=\"{\n 'background-color': button.backgroundColor ? button.backgroundColor : undefined,\n }\"\n >\n <span style=\"display: flex; align-items: center; width: 100%; gap: 5px\">\n @if (button.icon) {\n <dm-icon\n [icon]=\"button.icon\"\n [color]=\"button.color ? button.color : undefined\"\n ></dm-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 } @else {\n <button\n mat-menu-item\n [matTooltip]=\"button.tooltip || ''\"\n (click)=\"button.onClick?.(row, $event, getCloseParentMenusFn(rootTrigger))\"\n [ngStyle]=\"{\n 'background-color': button.backgroundColor ? button.backgroundColor : undefined,\n }\"\n >\n <span class=\"dm-table-button-label-flex\">\n @if (button.icon) {\n <dm-icon\n [icon]=\"button.icon\"\n [color]=\"button.color ? button.color : undefined\"\n ></dm-icon>\n }\n <span [style.color]=\"button.color ? button.color : undefined\">{{ button.label }}</span>\n </span>\n </button>\n }\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 <dm-icon [icon]=\"button.icon\" [color]=\"button.color ? button.color : undefined\"></dm-icon>\n </button>\n } @else {\n <button\n [matButton]=\"button.buttonType || 'filled'\"\n [ngStyle]=\"{\n 'background-color': button.backgroundColor ? button.backgroundColor : undefined,\n }\"\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 <span class=\"dm-table-button-label-flex\">\n @if (button.icon) {\n <dm-icon [icon]=\"button.icon\" [color]=\"button.color ? button.color : undefined\"></dm-icon>\n }\n <span [ngStyle]=\"{ color: button.color ? button.color : undefined }\">\n {{ button.label }}\n </span>\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 (\n option of paginatorSettings()?.pageSizeOptions ||\n DEFAULT_PAGINATOR_SETTINGS.pageSizeOptions;\n track option\n ) {\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 (\n paginatorSettings()?.showFirstAndLastPagesButtons ||\n DEFAULT_PAGINATOR_SETTINGS.showFirstAndLastPagesButtons\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()?.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 (\n paginatorSettings()?.showFirstAndLastPagesButtons ||\n DEFAULT_PAGINATOR_SETTINGS.showFirstAndLastPagesButtons\n ) {\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 ||\n 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 <dm-icon\n [icon]=\"button.icon\"\n [color]=\"button.textColor ? button.textColor : undefined\"\n ></dm-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 <span class=\"dm-table-button-label-flex\">\n @if (button.icon) {\n <dm-icon\n [icon]=\"button.icon\"\n [color]=\"button.textColor ? button.textColor : undefined\"\n ></dm-icon>\n }\n <span [style.color]=\"button.textColor ? button.textColor : undefined\">\n {{ button.label }}\n </span>\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) {\n @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 }\n @case ('checkbox') {\n <mat-checkbox\n [checked]=\"resolveCellValue(row, column)\"\n (change)=\"inputCellCheckboxChangeHandler(row, column, $event)\"\n ></mat-checkbox>\n }\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 }\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) {\n @if (!menuItem.showIf || (menuItem.showIf && menuItem.showIf(datasource()))) {\n @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%; gap: 5px\">\n @if (menuItem.icon) {\n <dm-icon\n [icon]=\"menuItem.icon\"\n [color]=\"menuItem.color ? menuItem.color : undefined\"\n ></dm-icon>\n }\n <span [style.color]=\"menuItem.color ? menuItem.color : undefined\">{{\n menuItem.label\n }}</span>\n <span class=\"spacer\"></span>\n <mat-icon\n [style.color]=\"menuItem.color ? menuItem.color : undefined\"\n 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 <span class=\"dm-table-button-label-flex\">\n @if (menuItem.icon) {\n <dm-icon\n [icon]=\"menuItem.icon\"\n [color]=\"menuItem.color ? menuItem.color : undefined\"\n ></dm-icon>\n }\n <span [style.color]=\"menuItem.color ? menuItem.color : undefined\">{{\n menuItem.label\n }}</span>\n </span>\n </button>\n }\n }\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}.dm-table-button-label-flex{display:flex;align-items:center;gap:5px}\n"], dependencies: [{ kind: "directive", type: DmImportantStyleDirective, selector: "[dmImportantStyle]", inputs: ["dmImportantStyle"] }, { kind: "ngmodule", type: MatProgressSpinnerModule }, { kind: "ngmodule", type: MatSlideToggleModule }, { kind: "component", type: i2$2.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: i3$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: i7.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: i9.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: i9.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: i11.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: i11.MatMenuItem, selector: "[mat-menu-item]", inputs: ["role", "disabled", "disableRipple"], exportAs: ["matMenuItem"] }, { kind: "directive", type: i11.MatMenuContent, selector: "ng-template[matMenuContent]" }, { kind: "directive", type: i11.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: i12.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i12.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "directive", type: i12.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: "component", type: DmIcon, selector: "dm-icon", inputs: ["icon", "color", "size"] }, { 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"] }] });
|
|
2582
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.2", ngImport: i0, type: DmTable, deps: [{ token: i1$1.DomSanitizer }], target: i0.ɵɵFactoryTarget.Component });
|
|
2583
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.0.2", type: DmTable, isStandalone: true, selector: "dm-table", inputs: { tableId: { classPropertyName: "tableId", publicName: "tableId", isSignal: true, isRequired: false, transformFunction: null }, saveState: { classPropertyName: "saveState", publicName: "saveState", isSignal: true, isRequired: false, transformFunction: null }, dataSource: { classPropertyName: "dataSource", publicName: "dataSource", isSignal: true, isRequired: true, transformFunction: null }, columns: { classPropertyName: "columns", publicName: "columns", isSignal: true, isRequired: true, 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 }, enableSperatedSearch: { classPropertyName: "enableSperatedSearch", publicName: "enableSperatedSearch", 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 }, disableRowHoverStyling: { classPropertyName: "disableRowHoverStyling", publicName: "disableRowHoverStyling", 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 }, onRowDoubleClick: { classPropertyName: "onRowDoubleClick", publicName: "onRowDoubleClick", isSignal: true, isRequired: false, transformFunction: null }, enableLogs: { classPropertyName: "enableLogs", publicName: "enableLogs", isSignal: true, isRequired: false, transformFunction: null }, rowIdentifierField: { classPropertyName: "rowIdentifierField", publicName: "rowIdentifierField", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { rowDoubleClick: "rowDoubleClick" }, 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 }\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 }\n @for (button of actionButtons(); track $index) {\n @if (!button.showIf || button.showIf(visibleColumns(), datasource())) {\n <ng-container\n *ngTemplateOutlet=\"dmTableActionButton; context: { $implicit: button }\"\n ></ng-container>\n }\n }\n </div>\n <div\n [ngClass]=\"tableClasses()?.tableWrapper || {}\"\n [ngStyle]=\"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\n style=\"height: 4px !important; max-height: 4px !important; line-height: 4px !important\"\n >\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) {\n [{{ sort.index + 1 }}]\n }\n } @else if (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 }\n @if (enableColumnsDragHandle() && enableColumnsDragAndDrop()) {\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) {\n @case ('$index') {\n {{ datasource().getFirstItemIndexInPage() + i + 1 }}\n }\n @case ('component') {\n @if (column.component) {\n <dm-table-cell-host\n [component]=\"column.component\"\n [context]=\"createCellContext(row, column)\"\n ></dm-table-cell-host>\n }\n }\n @case ('tel') {\n <a [href]=\"'tel:' + (column.field ? $any(row)[column.field] : '')\">{{\n resolveCellValue(row, column)\n }}</a>\n }\n @case ('mail') {\n <a [href]=\"'mailto:' + (column.field ? $any(row)[column.field] : '')\">{{\n resolveCellValue(row, column)\n }}</a>\n }\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 }\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 }\n @case ('customHtml') {\n @if (column.customCellTemplate) {\n <ng-container\n *ngTemplateOutlet=\"\n column.customCellTemplate;\n context: createCellContext(row, column)\n \"\n >\n </ng-container>\n } @else {\n <span [innerHTML]=\"resolveCellValue(row, column)\"></span>\n }\n }\n @case ('actions') {\n <span style=\"display: flex; align-items: center\">\n @for (button of column.actionsButtons || []; track $index) {\n @if (!button.showIf || button.showIf(row)) {\n <ng-container\n *ngTemplateOutlet=\"\n dmTableRowActionButton;\n context: {\n $implicit: button,\n row,\n }\n \"\n ></ng-container>\n }\n }\n </span>\n }\n @case ('slideToggle') {\n <mat-slide-toggle\n [id]=\"'slideToggle_' + i + '_' + column.id\"\n [checked]=\"resolveCellValue(row, column)\"\n [matTooltip]=\"getSlideToggleTooltip(row, column)\"\n (change)=\"onSlideToggleChange(row, column, $event)\"\n [disabled]=\"isSlideToggleDisabled(row, column)\"\n >\n {{ getSlideToggleLabel(row, column) }}\n </mat-slide-toggle>\n }\n @case ('input') {\n <ng-container\n *ngTemplateOutlet=\"\n dmTableInputCell;\n context: {\n $implicit: row,\n column: column,\n }\n \"\n />\n }\n @default {\n {{ resolveCellValue(row, column) }}\n }\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 ||\n DEFAULT_TABLE_STYLE.table?.tfoot?.root ||\n {}\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 {\n @if (datasource().isPaginationEnabled()) {\n <ng-container [ngTemplateOutlet]=\"paginator\" />\n }\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]=\"\n button.children && button.children.length > 0 ? tableButtonRootMenu : null\n \"\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]=\"{\n 'background-color': button.backgroundColor ? button.backgroundColor : undefined,\n }\"\n >\n <dm-icon [icon]=\"button.icon\" [color]=\"button.color ? button.color : undefined\"></dm-icon>\n </button>\n } @else {\n <button\n #rootTrigger=\"matMenuTrigger\"\n [matButton]=\"button.buttonType || 'filled'\"\n [ngStyle]=\"{\n 'background-color': button.backgroundColor ? button.backgroundColor : undefined,\n }\"\n aria-label=\"{{ button.label }}\"\n [matTooltip]=\"button.tooltip || ''\"\n [matMenuTriggerFor]=\"\n button.children && button.children.length > 0 ? tableButtonRootMenu : null\n \"\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 <div class=\"dm-table-button-label-flex\">\n @if (button.icon) {\n <dm-icon [icon]=\"button.icon\" [color]=\"button.color ? button.color : undefined\"></dm-icon>\n }\n <span [ngStyle]=\"{ color: button.color ? button.color : undefined }\">\n {{ button.label }}\n </span>\n </div>\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) {\n @if (!button.showIf || button.showIf(visibleColumns(), datasource())) {\n @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]=\"{\n 'background-color': button.backgroundColor ? button.backgroundColor : undefined,\n }\"\n >\n <span style=\"display: flex; align-items: center; width: 100%; gap: 5px\">\n @if (button.icon) {\n <dm-icon\n [icon]=\"button.icon\"\n [color]=\"button.color ? button.color : undefined\"\n ></dm-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)=\"\n button.onClick?.(\n visibleColumns(),\n datasource(),\n $event,\n getCloseParentMenusFn(rootTrigger)\n )\n \"\n [ngStyle]=\"{\n 'background-color': button.backgroundColor ? button.backgroundColor : undefined,\n }\"\n >\n <div class=\"dm-table-button-label-flex\">\n @if (button.icon) {\n <dm-icon\n [icon]=\"button.icon\"\n [color]=\"button.color ? button.color : undefined\"\n ></dm-icon>\n }\n <span [style.color]=\"button.color ? button.color : undefined\">{{ button.label }}</span>\n </div>\n </button>\n }\n }\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) {\n @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]=\"{\n 'background-color': button.backgroundColor ? button.backgroundColor : undefined,\n }\"\n >\n <span style=\"display: flex; align-items: center; width: 100%; gap: 5px\">\n @if (button.icon) {\n <dm-icon\n [icon]=\"button.icon\"\n [color]=\"button.color ? button.color : undefined\"\n ></dm-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 } @else {\n <button\n mat-menu-item\n [matTooltip]=\"button.tooltip || ''\"\n (click)=\"button.onClick?.(row, $event, getCloseParentMenusFn(rootTrigger))\"\n [ngStyle]=\"{\n 'background-color': button.backgroundColor ? button.backgroundColor : undefined,\n }\"\n >\n <span class=\"dm-table-button-label-flex\">\n @if (button.icon) {\n <dm-icon\n [icon]=\"button.icon\"\n [color]=\"button.color ? button.color : undefined\"\n ></dm-icon>\n }\n <span [style.color]=\"button.color ? button.color : undefined\">{{ button.label }}</span>\n </span>\n </button>\n }\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 <dm-icon [icon]=\"button.icon\" [color]=\"button.color ? button.color : undefined\"></dm-icon>\n </button>\n } @else {\n <button\n [matButton]=\"button.buttonType || 'filled'\"\n [ngStyle]=\"{\n 'background-color': button.backgroundColor ? button.backgroundColor : undefined,\n }\"\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 <span class=\"dm-table-button-label-flex\">\n @if (button.icon) {\n <dm-icon [icon]=\"button.icon\" [color]=\"button.color ? button.color : undefined\"></dm-icon>\n }\n <span [ngStyle]=\"{ color: button.color ? button.color : undefined }\">\n {{ button.label }}\n </span>\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 (\n option of paginatorSettings()?.pageSizeOptions ||\n DEFAULT_PAGINATOR_SETTINGS.pageSizeOptions;\n track option\n ) {\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 (\n paginatorSettings()?.showFirstAndLastPagesButtons ||\n DEFAULT_PAGINATOR_SETTINGS.showFirstAndLastPagesButtons\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()?.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().previousPage()\"\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 (\n paginatorSettings()?.showFirstAndLastPagesButtons ||\n DEFAULT_PAGINATOR_SETTINGS.showFirstAndLastPagesButtons\n ) {\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 ||\n 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 <dm-icon\n [icon]=\"button.icon\"\n [color]=\"button.textColor ? button.textColor : undefined\"\n ></dm-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 <span class=\"dm-table-button-label-flex\">\n @if (button.icon) {\n <dm-icon\n [icon]=\"button.icon\"\n [color]=\"button.textColor ? button.textColor : undefined\"\n ></dm-icon>\n }\n <span [style.color]=\"button.textColor ? button.textColor : undefined\">\n {{ button.label }}\n </span>\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) {\n @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 }\n @case ('checkbox') {\n <mat-checkbox\n [checked]=\"resolveCellValue(row, column)\"\n (change)=\"inputCellCheckboxChangeHandler(row, column, $event)\"\n ></mat-checkbox>\n }\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 }\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) {\n @if (!menuItem.showIf || (menuItem.showIf && menuItem.showIf(datasource()))) {\n @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%; gap: 5px\">\n @if (menuItem.icon) {\n <dm-icon\n [icon]=\"menuItem.icon\"\n [color]=\"menuItem.color ? menuItem.color : undefined\"\n ></dm-icon>\n }\n <span [style.color]=\"menuItem.color ? menuItem.color : undefined\">{{\n menuItem.label\n }}</span>\n <span class=\"spacer\"></span>\n <mat-icon\n [style.color]=\"menuItem.color ? menuItem.color : undefined\"\n 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 <span class=\"dm-table-button-label-flex\">\n @if (menuItem.icon) {\n <dm-icon\n [icon]=\"menuItem.icon\"\n [color]=\"menuItem.color ? menuItem.color : undefined\"\n ></dm-icon>\n }\n <span [style.color]=\"menuItem.color ? menuItem.color : undefined\">{{\n menuItem.label\n }}</span>\n </span>\n </button>\n }\n }\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}.dm-table-button-label-flex{display:flex;align-items:center;gap:5px}\n"], dependencies: [{ kind: "directive", type: DmImportantStyleDirective, selector: "[dmImportantStyle]", inputs: ["dmImportantStyle"] }, { kind: "ngmodule", type: MatProgressSpinnerModule }, { kind: "ngmodule", type: MatSlideToggleModule }, { kind: "component", type: i2$2.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: i3$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]):not([ngNoCva])[formControlName],textarea:not([ngNoCva])[formControlName],input:not([type=checkbox]):not([ngNoCva])[formControl],textarea:not([ngNoCva])[formControl],input:not([type=checkbox]):not([ngNoCva])[ngModel],textarea:not([ngNoCva])[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: i7.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: i9.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: i9.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: i11.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: i11.MatMenuItem, selector: "[mat-menu-item]", inputs: ["role", "disabled", "disableRipple"], exportAs: ["matMenuItem"] }, { kind: "directive", type: i11.MatMenuContent, selector: "ng-template[matMenuContent]" }, { kind: "directive", type: i11.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: i12.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i12.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "directive", type: i12.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: "component", type: DmIcon, selector: "dm-icon", inputs: ["icon", "color", "size"] }, { 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"] }], changeDetection: i0.ChangeDetectionStrategy.Eager });
|
|
2338
2584
|
}
|
|
2339
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
2585
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.2", ngImport: i0, type: DmTable, decorators: [{
|
|
2340
2586
|
type: Component,
|
|
2341
2587
|
args: [{ selector: 'dm-table', imports: [
|
|
2342
2588
|
DmImportantStyleDirective,
|
|
@@ -2360,14 +2606,14 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.3", ngImpor
|
|
|
2360
2606
|
MatIcon,
|
|
2361
2607
|
DmIcon,
|
|
2362
2608
|
CdkDrag,
|
|
2363
|
-
], 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 }\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 }\n @for (button of actionButtons(); track $index) {\n @if (!button.showIf || button.showIf(visibleColumns(), datasource())) {\n <ng-container\n *ngTemplateOutlet=\"dmTableActionButton; context: { $implicit: button }\"\n ></ng-container>\n }\n }\n </div>\n <div\n [ngClass]=\"tableClasses()?.tableWrapper || {}\"\n [ngStyle]=\"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\n style=\"height: 4px !important; max-height: 4px !important; line-height: 4px !important\"\n >\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) {\n [{{ sort.index + 1 }}]\n }\n } @else if (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 }\n @if (enableColumnsDragHandle() && enableColumnsDragAndDrop()) {\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) {\n @case ('$index') {\n {{ datasource().getFirstItemIndexInPage() + i + 1 }}\n }\n @case ('component') {\n @if (column.component) {\n <dm-table-cell-host\n [component]=\"column.component\"\n [context]=\"createCellContext(row, column)\"\n ></dm-table-cell-host>\n }\n }\n @case ('tel') {\n <a [href]=\"'tel:' + (column.field ? $any(row)[column.field] : '')\">{{\n resolveCellValue(row, column)\n }}</a>\n }\n @case ('mail') {\n <a [href]=\"'mailto:' + (column.field ? $any(row)[column.field] : '')\">{{\n resolveCellValue(row, column)\n }}</a>\n }\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 }\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 }\n @case ('customHtml') {\n @if (column.customCellTemplate) {\n <ng-container\n *ngTemplateOutlet=\"\n column.customCellTemplate;\n context: createCellContext(row, column)\n \"\n >\n </ng-container>\n } @else {\n <span [innerHTML]=\"resolveCellValue(row, column)\"></span>\n }\n }\n @case ('actions') {\n <span style=\"display: flex; align-items: center\">\n @for (button of column.actionsButtons || []; track $index) {\n @if (!button.showIf || button.showIf(row)) {\n <ng-container\n *ngTemplateOutlet=\"\n dmTableRowActionButton;\n context: {\n $implicit: button,\n row,\n }\n \"\n ></ng-container>\n }\n }\n </span>\n }\n @case ('slideToggle') {\n <mat-slide-toggle\n [id]=\"'slideToggle_' + i + '_' + column.id\"\n [checked]=\"resolveCellValue(row, column)\"\n [matTooltip]=\"getSlideToggleTooltip(row, column)\"\n (change)=\"onSlideToggleChange(row, column, $event)\"\n [disabled]=\"isSlideToggleDisabled(row, column)\"\n >\n {{ getSlideToggleLabel(row, column) }}\n </mat-slide-toggle>\n }\n @case ('input') {\n <ng-container\n *ngTemplateOutlet=\"\n dmTableInputCell;\n context: {\n $implicit: row,\n column: column,\n }\n \"\n />\n }\n @default {\n {{ resolveCellValue(row, column) }}\n }\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 ||\n DEFAULT_TABLE_STYLE.table?.tfoot?.root ||\n {}\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 {\n @if (datasource().isPaginationEnabled()) {\n <ng-container [ngTemplateOutlet]=\"paginator\" />\n }\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]=\"\n button.children && button.children.length > 0 ? tableButtonRootMenu : null\n \"\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]=\"{\n 'background-color': button.backgroundColor ? button.backgroundColor : undefined,\n }\"\n >\n <dm-icon [icon]=\"button.icon\" [color]=\"button.color ? button.color : undefined\"></dm-icon>\n </button>\n } @else {\n <button\n #rootTrigger=\"matMenuTrigger\"\n [matButton]=\"button.buttonType || 'filled'\"\n [ngStyle]=\"{\n 'background-color': button.backgroundColor ? button.backgroundColor : undefined,\n }\"\n aria-label=\"{{ button.label }}\"\n [matTooltip]=\"button.tooltip || ''\"\n [matMenuTriggerFor]=\"\n button.children && button.children.length > 0 ? tableButtonRootMenu : null\n \"\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 <div class=\"dm-table-button-label-flex\">\n @if (button.icon) {\n <dm-icon [icon]=\"button.icon\" [color]=\"button.color ? button.color : undefined\"></dm-icon>\n }\n <span [ngStyle]=\"{ color: button.color ? button.color : undefined }\">\n {{ button.label }}\n </span>\n </div>\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) {\n @if (!button.showIf || button.showIf(visibleColumns(), datasource())) {\n @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]=\"{\n 'background-color': button.backgroundColor ? button.backgroundColor : undefined,\n }\"\n >\n <span style=\"display: flex; align-items: center; width: 100%; gap: 5px\">\n @if (button.icon) {\n <dm-icon\n [icon]=\"button.icon\"\n [color]=\"button.color ? button.color : undefined\"\n ></dm-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)=\"\n button.onClick?.(\n visibleColumns(),\n datasource(),\n $event,\n getCloseParentMenusFn(rootTrigger)\n )\n \"\n [ngStyle]=\"{\n 'background-color': button.backgroundColor ? button.backgroundColor : undefined,\n }\"\n >\n <div class=\"dm-table-button-label-flex\">\n @if (button.icon) {\n <dm-icon\n [icon]=\"button.icon\"\n [color]=\"button.color ? button.color : undefined\"\n ></dm-icon>\n }\n <span [style.color]=\"button.color ? button.color : undefined\">{{ button.label }}</span>\n </div>\n </button>\n }\n }\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) {\n @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]=\"{\n 'background-color': button.backgroundColor ? button.backgroundColor : undefined,\n }\"\n >\n <span style=\"display: flex; align-items: center; width: 100%; gap: 5px\">\n @if (button.icon) {\n <dm-icon\n [icon]=\"button.icon\"\n [color]=\"button.color ? button.color : undefined\"\n ></dm-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 } @else {\n <button\n mat-menu-item\n [matTooltip]=\"button.tooltip || ''\"\n (click)=\"button.onClick?.(row, $event, getCloseParentMenusFn(rootTrigger))\"\n [ngStyle]=\"{\n 'background-color': button.backgroundColor ? button.backgroundColor : undefined,\n }\"\n >\n <span class=\"dm-table-button-label-flex\">\n @if (button.icon) {\n <dm-icon\n [icon]=\"button.icon\"\n [color]=\"button.color ? button.color : undefined\"\n ></dm-icon>\n }\n <span [style.color]=\"button.color ? button.color : undefined\">{{ button.label }}</span>\n </span>\n </button>\n }\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 <dm-icon [icon]=\"button.icon\" [color]=\"button.color ? button.color : undefined\"></dm-icon>\n </button>\n } @else {\n <button\n [matButton]=\"button.buttonType || 'filled'\"\n [ngStyle]=\"{\n 'background-color': button.backgroundColor ? button.backgroundColor : undefined,\n }\"\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 <span class=\"dm-table-button-label-flex\">\n @if (button.icon) {\n <dm-icon [icon]=\"button.icon\" [color]=\"button.color ? button.color : undefined\"></dm-icon>\n }\n <span [ngStyle]=\"{ color: button.color ? button.color : undefined }\">\n {{ button.label }}\n </span>\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 (\n option of paginatorSettings()?.pageSizeOptions ||\n DEFAULT_PAGINATOR_SETTINGS.pageSizeOptions;\n track option\n ) {\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 (\n paginatorSettings()?.showFirstAndLastPagesButtons ||\n DEFAULT_PAGINATOR_SETTINGS.showFirstAndLastPagesButtons\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()?.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 (\n paginatorSettings()?.showFirstAndLastPagesButtons ||\n DEFAULT_PAGINATOR_SETTINGS.showFirstAndLastPagesButtons\n ) {\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 ||\n 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 <dm-icon\n [icon]=\"button.icon\"\n [color]=\"button.textColor ? button.textColor : undefined\"\n ></dm-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 <span class=\"dm-table-button-label-flex\">\n @if (button.icon) {\n <dm-icon\n [icon]=\"button.icon\"\n [color]=\"button.textColor ? button.textColor : undefined\"\n ></dm-icon>\n }\n <span [style.color]=\"button.textColor ? button.textColor : undefined\">\n {{ button.label }}\n </span>\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) {\n @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 }\n @case ('checkbox') {\n <mat-checkbox\n [checked]=\"resolveCellValue(row, column)\"\n (change)=\"inputCellCheckboxChangeHandler(row, column, $event)\"\n ></mat-checkbox>\n }\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 }\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) {\n @if (!menuItem.showIf || (menuItem.showIf && menuItem.showIf(datasource()))) {\n @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%; gap: 5px\">\n @if (menuItem.icon) {\n <dm-icon\n [icon]=\"menuItem.icon\"\n [color]=\"menuItem.color ? menuItem.color : undefined\"\n ></dm-icon>\n }\n <span [style.color]=\"menuItem.color ? menuItem.color : undefined\">{{\n menuItem.label\n }}</span>\n <span class=\"spacer\"></span>\n <mat-icon\n [style.color]=\"menuItem.color ? menuItem.color : undefined\"\n 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 <span class=\"dm-table-button-label-flex\">\n @if (menuItem.icon) {\n <dm-icon\n [icon]=\"menuItem.icon\"\n [color]=\"menuItem.color ? menuItem.color : undefined\"\n ></dm-icon>\n }\n <span [style.color]=\"menuItem.color ? menuItem.color : undefined\">{{\n menuItem.label\n }}</span>\n </span>\n </button>\n }\n }\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}.dm-table-button-label-flex{display:flex;align-items:center;gap:5px}\n"] }]
|
|
2609
|
+
], changeDetection: ChangeDetectionStrategy.Eager, 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 }\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 }\n @for (button of actionButtons(); track $index) {\n @if (!button.showIf || button.showIf(visibleColumns(), datasource())) {\n <ng-container\n *ngTemplateOutlet=\"dmTableActionButton; context: { $implicit: button }\"\n ></ng-container>\n }\n }\n </div>\n <div\n [ngClass]=\"tableClasses()?.tableWrapper || {}\"\n [ngStyle]=\"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\n style=\"height: 4px !important; max-height: 4px !important; line-height: 4px !important\"\n >\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) {\n [{{ sort.index + 1 }}]\n }\n } @else if (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 }\n @if (enableColumnsDragHandle() && enableColumnsDragAndDrop()) {\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) {\n @case ('$index') {\n {{ datasource().getFirstItemIndexInPage() + i + 1 }}\n }\n @case ('component') {\n @if (column.component) {\n <dm-table-cell-host\n [component]=\"column.component\"\n [context]=\"createCellContext(row, column)\"\n ></dm-table-cell-host>\n }\n }\n @case ('tel') {\n <a [href]=\"'tel:' + (column.field ? $any(row)[column.field] : '')\">{{\n resolveCellValue(row, column)\n }}</a>\n }\n @case ('mail') {\n <a [href]=\"'mailto:' + (column.field ? $any(row)[column.field] : '')\">{{\n resolveCellValue(row, column)\n }}</a>\n }\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 }\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 }\n @case ('customHtml') {\n @if (column.customCellTemplate) {\n <ng-container\n *ngTemplateOutlet=\"\n column.customCellTemplate;\n context: createCellContext(row, column)\n \"\n >\n </ng-container>\n } @else {\n <span [innerHTML]=\"resolveCellValue(row, column)\"></span>\n }\n }\n @case ('actions') {\n <span style=\"display: flex; align-items: center\">\n @for (button of column.actionsButtons || []; track $index) {\n @if (!button.showIf || button.showIf(row)) {\n <ng-container\n *ngTemplateOutlet=\"\n dmTableRowActionButton;\n context: {\n $implicit: button,\n row,\n }\n \"\n ></ng-container>\n }\n }\n </span>\n }\n @case ('slideToggle') {\n <mat-slide-toggle\n [id]=\"'slideToggle_' + i + '_' + column.id\"\n [checked]=\"resolveCellValue(row, column)\"\n [matTooltip]=\"getSlideToggleTooltip(row, column)\"\n (change)=\"onSlideToggleChange(row, column, $event)\"\n [disabled]=\"isSlideToggleDisabled(row, column)\"\n >\n {{ getSlideToggleLabel(row, column) }}\n </mat-slide-toggle>\n }\n @case ('input') {\n <ng-container\n *ngTemplateOutlet=\"\n dmTableInputCell;\n context: {\n $implicit: row,\n column: column,\n }\n \"\n />\n }\n @default {\n {{ resolveCellValue(row, column) }}\n }\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 ||\n DEFAULT_TABLE_STYLE.table?.tfoot?.root ||\n {}\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 {\n @if (datasource().isPaginationEnabled()) {\n <ng-container [ngTemplateOutlet]=\"paginator\" />\n }\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]=\"\n button.children && button.children.length > 0 ? tableButtonRootMenu : null\n \"\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]=\"{\n 'background-color': button.backgroundColor ? button.backgroundColor : undefined,\n }\"\n >\n <dm-icon [icon]=\"button.icon\" [color]=\"button.color ? button.color : undefined\"></dm-icon>\n </button>\n } @else {\n <button\n #rootTrigger=\"matMenuTrigger\"\n [matButton]=\"button.buttonType || 'filled'\"\n [ngStyle]=\"{\n 'background-color': button.backgroundColor ? button.backgroundColor : undefined,\n }\"\n aria-label=\"{{ button.label }}\"\n [matTooltip]=\"button.tooltip || ''\"\n [matMenuTriggerFor]=\"\n button.children && button.children.length > 0 ? tableButtonRootMenu : null\n \"\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 <div class=\"dm-table-button-label-flex\">\n @if (button.icon) {\n <dm-icon [icon]=\"button.icon\" [color]=\"button.color ? button.color : undefined\"></dm-icon>\n }\n <span [ngStyle]=\"{ color: button.color ? button.color : undefined }\">\n {{ button.label }}\n </span>\n </div>\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) {\n @if (!button.showIf || button.showIf(visibleColumns(), datasource())) {\n @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]=\"{\n 'background-color': button.backgroundColor ? button.backgroundColor : undefined,\n }\"\n >\n <span style=\"display: flex; align-items: center; width: 100%; gap: 5px\">\n @if (button.icon) {\n <dm-icon\n [icon]=\"button.icon\"\n [color]=\"button.color ? button.color : undefined\"\n ></dm-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)=\"\n button.onClick?.(\n visibleColumns(),\n datasource(),\n $event,\n getCloseParentMenusFn(rootTrigger)\n )\n \"\n [ngStyle]=\"{\n 'background-color': button.backgroundColor ? button.backgroundColor : undefined,\n }\"\n >\n <div class=\"dm-table-button-label-flex\">\n @if (button.icon) {\n <dm-icon\n [icon]=\"button.icon\"\n [color]=\"button.color ? button.color : undefined\"\n ></dm-icon>\n }\n <span [style.color]=\"button.color ? button.color : undefined\">{{ button.label }}</span>\n </div>\n </button>\n }\n }\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) {\n @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]=\"{\n 'background-color': button.backgroundColor ? button.backgroundColor : undefined,\n }\"\n >\n <span style=\"display: flex; align-items: center; width: 100%; gap: 5px\">\n @if (button.icon) {\n <dm-icon\n [icon]=\"button.icon\"\n [color]=\"button.color ? button.color : undefined\"\n ></dm-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 } @else {\n <button\n mat-menu-item\n [matTooltip]=\"button.tooltip || ''\"\n (click)=\"button.onClick?.(row, $event, getCloseParentMenusFn(rootTrigger))\"\n [ngStyle]=\"{\n 'background-color': button.backgroundColor ? button.backgroundColor : undefined,\n }\"\n >\n <span class=\"dm-table-button-label-flex\">\n @if (button.icon) {\n <dm-icon\n [icon]=\"button.icon\"\n [color]=\"button.color ? button.color : undefined\"\n ></dm-icon>\n }\n <span [style.color]=\"button.color ? button.color : undefined\">{{ button.label }}</span>\n </span>\n </button>\n }\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 <dm-icon [icon]=\"button.icon\" [color]=\"button.color ? button.color : undefined\"></dm-icon>\n </button>\n } @else {\n <button\n [matButton]=\"button.buttonType || 'filled'\"\n [ngStyle]=\"{\n 'background-color': button.backgroundColor ? button.backgroundColor : undefined,\n }\"\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 <span class=\"dm-table-button-label-flex\">\n @if (button.icon) {\n <dm-icon [icon]=\"button.icon\" [color]=\"button.color ? button.color : undefined\"></dm-icon>\n }\n <span [ngStyle]=\"{ color: button.color ? button.color : undefined }\">\n {{ button.label }}\n </span>\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 (\n option of paginatorSettings()?.pageSizeOptions ||\n DEFAULT_PAGINATOR_SETTINGS.pageSizeOptions;\n track option\n ) {\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 (\n paginatorSettings()?.showFirstAndLastPagesButtons ||\n DEFAULT_PAGINATOR_SETTINGS.showFirstAndLastPagesButtons\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()?.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().previousPage()\"\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 (\n paginatorSettings()?.showFirstAndLastPagesButtons ||\n DEFAULT_PAGINATOR_SETTINGS.showFirstAndLastPagesButtons\n ) {\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 ||\n 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 <dm-icon\n [icon]=\"button.icon\"\n [color]=\"button.textColor ? button.textColor : undefined\"\n ></dm-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 <span class=\"dm-table-button-label-flex\">\n @if (button.icon) {\n <dm-icon\n [icon]=\"button.icon\"\n [color]=\"button.textColor ? button.textColor : undefined\"\n ></dm-icon>\n }\n <span [style.color]=\"button.textColor ? button.textColor : undefined\">\n {{ button.label }}\n </span>\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) {\n @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 }\n @case ('checkbox') {\n <mat-checkbox\n [checked]=\"resolveCellValue(row, column)\"\n (change)=\"inputCellCheckboxChangeHandler(row, column, $event)\"\n ></mat-checkbox>\n }\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 }\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) {\n @if (!menuItem.showIf || (menuItem.showIf && menuItem.showIf(datasource()))) {\n @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%; gap: 5px\">\n @if (menuItem.icon) {\n <dm-icon\n [icon]=\"menuItem.icon\"\n [color]=\"menuItem.color ? menuItem.color : undefined\"\n ></dm-icon>\n }\n <span [style.color]=\"menuItem.color ? menuItem.color : undefined\">{{\n menuItem.label\n }}</span>\n <span class=\"spacer\"></span>\n <mat-icon\n [style.color]=\"menuItem.color ? menuItem.color : undefined\"\n 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 <span class=\"dm-table-button-label-flex\">\n @if (menuItem.icon) {\n <dm-icon\n [icon]=\"menuItem.icon\"\n [color]=\"menuItem.color ? menuItem.color : undefined\"\n ></dm-icon>\n }\n <span [style.color]=\"menuItem.color ? menuItem.color : undefined\">{{\n menuItem.label\n }}</span>\n </span>\n </button>\n }\n }\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}.dm-table-button-label-flex{display:flex;align-items:center;gap:5px}\n"] }]
|
|
2364
2610
|
}], ctorParameters: () => [{ type: i1$1.DomSanitizer }], propDecorators: { onShiftKeyDown: [{
|
|
2365
2611
|
type: HostListener,
|
|
2366
2612
|
args: ['window:keydown.shift', ['$event']]
|
|
2367
2613
|
}], onShiftKeyUp: [{
|
|
2368
2614
|
type: HostListener,
|
|
2369
2615
|
args: ['window:keyup.shift', ['$event']]
|
|
2370
|
-
}], tableId: [{ type: i0.Input, args: [{ isSignal: true, alias: "tableId", required: false }] }], dataSource: [{ type: i0.Input, args: [{ isSignal: true, alias: "dataSource", required: true }] }], columns: [{ type: i0.Input, args: [{ isSignal: true, alias: "columns", required: true }] }], 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 }] }], enableSperatedSearch: [{ type: i0.Input, args: [{ isSignal: true, alias: "enableSperatedSearch", 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 }] }], disableRowHoverStyling: [{ type: i0.Input, args: [{ isSignal: true, alias: "disableRowHoverStyling", 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 }] }], rowDoubleClick: [{ type: i0.Output, args: ["rowDoubleClick"] }], onRowDoubleClick: [{ type: i0.Input, args: [{ isSignal: true, alias: "onRowDoubleClick", required: false }] }], enableLogs: [{ type: i0.Input, args: [{ isSignal: true, alias: "enableLogs", required: false }] }], rowIdentifierField: [{ type: i0.Input, args: [{ isSignal: true, alias: "rowIdentifierField", required: false }] }] } });
|
|
2616
|
+
}], tableId: [{ type: i0.Input, args: [{ isSignal: true, alias: "tableId", required: false }] }], saveState: [{ type: i0.Input, args: [{ isSignal: true, alias: "saveState", required: false }] }], dataSource: [{ type: i0.Input, args: [{ isSignal: true, alias: "dataSource", required: true }] }], columns: [{ type: i0.Input, args: [{ isSignal: true, alias: "columns", required: true }] }], 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 }] }], enableSperatedSearch: [{ type: i0.Input, args: [{ isSignal: true, alias: "enableSperatedSearch", 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 }] }], disableRowHoverStyling: [{ type: i0.Input, args: [{ isSignal: true, alias: "disableRowHoverStyling", 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 }] }], rowDoubleClick: [{ type: i0.Output, args: ["rowDoubleClick"] }], onRowDoubleClick: [{ type: i0.Input, args: [{ isSignal: true, alias: "onRowDoubleClick", required: false }] }], enableLogs: [{ type: i0.Input, args: [{ isSignal: true, alias: "enableLogs", required: false }] }], rowIdentifierField: [{ type: i0.Input, args: [{ isSignal: true, alias: "rowIdentifierField", required: false }] }] } });
|
|
2371
2617
|
|
|
2372
2618
|
class DmDatePipe {
|
|
2373
2619
|
/**
|
|
@@ -2411,10 +2657,10 @@ class DmDatePipe {
|
|
|
2411
2657
|
return '';
|
|
2412
2658
|
return DmDateService.getDateString(value, format, lang);
|
|
2413
2659
|
}
|
|
2414
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
2415
|
-
static ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "
|
|
2660
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.2", ngImport: i0, type: DmDatePipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe });
|
|
2661
|
+
static ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "22.0.2", ngImport: i0, type: DmDatePipe, isStandalone: true, name: "dmDate" });
|
|
2416
2662
|
}
|
|
2417
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
2663
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.2", ngImport: i0, type: DmDatePipe, decorators: [{
|
|
2418
2664
|
type: Pipe,
|
|
2419
2665
|
args: [{
|
|
2420
2666
|
name: 'dmDate',
|
|
@@ -2508,10 +2754,10 @@ class DmRunOncePipeSevice {
|
|
|
2508
2754
|
const key = this.generateFunctionKey(func);
|
|
2509
2755
|
this.clearCache(key);
|
|
2510
2756
|
}
|
|
2511
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
2512
|
-
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "
|
|
2757
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.2", ngImport: i0, type: DmRunOncePipeSevice, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
|
|
2758
|
+
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "22.0.2", ngImport: i0, type: DmRunOncePipeSevice, providedIn: 'root' });
|
|
2513
2759
|
}
|
|
2514
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
2760
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.2", ngImport: i0, type: DmRunOncePipeSevice, decorators: [{
|
|
2515
2761
|
type: Injectable,
|
|
2516
2762
|
args: [{
|
|
2517
2763
|
providedIn: 'root',
|
|
@@ -2595,10 +2841,10 @@ class DmFilterByPipe {
|
|
|
2595
2841
|
}
|
|
2596
2842
|
return array;
|
|
2597
2843
|
}
|
|
2598
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
2599
|
-
static ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "
|
|
2844
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.2", ngImport: i0, type: DmFilterByPipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe });
|
|
2845
|
+
static ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "22.0.2", ngImport: i0, type: DmFilterByPipe, isStandalone: true, name: "filterBy", pure: false });
|
|
2600
2846
|
}
|
|
2601
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
2847
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.2", ngImport: i0, type: DmFilterByPipe, decorators: [{
|
|
2602
2848
|
type: Pipe,
|
|
2603
2849
|
args: [{
|
|
2604
2850
|
name: 'filterBy',
|
|
@@ -2630,10 +2876,10 @@ class DmRunOncePipe {
|
|
|
2630
2876
|
const key = this.runOncePipeService.generateFunctionKey(func, ...args);
|
|
2631
2877
|
return this.runOncePipeService.getOrCache(key, () => func(...args), [...args]);
|
|
2632
2878
|
}
|
|
2633
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
2634
|
-
static ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "
|
|
2879
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.2", ngImport: i0, type: DmRunOncePipe, deps: [{ token: DmRunOncePipeSevice }], target: i0.ɵɵFactoryTarget.Pipe });
|
|
2880
|
+
static ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "22.0.2", ngImport: i0, type: DmRunOncePipe, isStandalone: true, name: "runOnce", pure: false });
|
|
2635
2881
|
}
|
|
2636
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
2882
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.2", ngImport: i0, type: DmRunOncePipe, decorators: [{
|
|
2637
2883
|
type: Pipe,
|
|
2638
2884
|
args: [{
|
|
2639
2885
|
name: 'runOnce',
|