dolfo-angular 1.229.0 → 1.231.0
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.
|
@@ -48,19 +48,24 @@ class GridConfig {
|
|
|
48
48
|
loading$ = new BehaviorSubject(false);
|
|
49
49
|
selectedItems;
|
|
50
50
|
actions$ = new BehaviorSubject(null);
|
|
51
|
+
toolbar;
|
|
52
|
+
prevSub;
|
|
51
53
|
constructor(config) {
|
|
52
54
|
this.config = config;
|
|
53
55
|
this.refreshGrid();
|
|
54
56
|
this.actions$.next(config.actions);
|
|
57
|
+
if (config.toolbar)
|
|
58
|
+
this.toolbar = config.toolbar;
|
|
55
59
|
}
|
|
56
60
|
refreshGrid = () => {
|
|
57
61
|
this.selectedItems = [];
|
|
62
|
+
this.prevSub?.unsubscribe();
|
|
58
63
|
if (Array.isArray(this.config.items))
|
|
59
64
|
this.items$.next(this.config.items);
|
|
60
65
|
else {
|
|
61
|
-
this.
|
|
62
|
-
this.config.items.subscribe(it => {
|
|
63
|
-
this.
|
|
66
|
+
this.setLoading(true);
|
|
67
|
+
this.prevSub = this.config.items.subscribe(it => {
|
|
68
|
+
this.setLoading(false);
|
|
64
69
|
this.items$.next(it);
|
|
65
70
|
if (this.getSelectionConfig()?.defaultSelected)
|
|
66
71
|
this.selectedItems = it.filter(i => this.getSelectionConfig().defaultSelected(i));
|
|
@@ -77,7 +82,7 @@ class GridConfig {
|
|
|
77
82
|
getEvents = () => this.config.events;
|
|
78
83
|
getUniqueId = (item) => this.config.getItemKey(item);
|
|
79
84
|
isLoading$ = () => this.loading$.asObservable();
|
|
80
|
-
|
|
85
|
+
setLoading = (v) => this.loading$.next(v);
|
|
81
86
|
getSelectedItems = () => this.items$.getValue().filter(it => this.selectedItems.some(d => this.getUniqueId(d) === this.getUniqueId(it)));
|
|
82
87
|
toggleSelection = (item) => {
|
|
83
88
|
if (this.isItemSelected(item))
|
|
@@ -102,6 +107,13 @@ class GridConfig {
|
|
|
102
107
|
get hasActions() {
|
|
103
108
|
return !!this.actions$.getValue();
|
|
104
109
|
}
|
|
110
|
+
get hasToolbar() {
|
|
111
|
+
return !!this.toolbar;
|
|
112
|
+
}
|
|
113
|
+
getToolbarButtons() {
|
|
114
|
+
return this.toolbar.buttons;
|
|
115
|
+
}
|
|
116
|
+
setToolbar = (toolbar) => this.toolbar = toolbar;
|
|
105
117
|
}
|
|
106
118
|
|
|
107
119
|
class IconComponent {
|
|
@@ -417,7 +429,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.0", ngImpor
|
|
|
417
429
|
class TooltipDirective extends Subscriptable {
|
|
418
430
|
content;
|
|
419
431
|
direction = "top";
|
|
420
|
-
el = inject(ElementRef);
|
|
432
|
+
el = inject((ElementRef));
|
|
421
433
|
ts = inject(TooltipService);
|
|
422
434
|
constructor() {
|
|
423
435
|
super();
|
|
@@ -480,7 +492,7 @@ class InputContainerComponent {
|
|
|
480
492
|
return null;
|
|
481
493
|
}));
|
|
482
494
|
input = inject(BaseFormInput);
|
|
483
|
-
elRef = inject(ElementRef);
|
|
495
|
+
elRef = inject((ElementRef));
|
|
484
496
|
translateService = inject(TranslateService);
|
|
485
497
|
cp = inject(DecimalPipe);
|
|
486
498
|
focus = () => {
|
|
@@ -2198,14 +2210,14 @@ class ContextMenuDirective extends Subscriptable {
|
|
|
2198
2210
|
useElRef;
|
|
2199
2211
|
position = "bottom-left";
|
|
2200
2212
|
contextMenuService = inject(ContextMenuService);
|
|
2201
|
-
elRef = inject(ElementRef);
|
|
2213
|
+
elRef = inject((ElementRef));
|
|
2202
2214
|
ngOnInit() {
|
|
2203
2215
|
this.addSubscription(fromEvent(this.elRef.nativeElement, this.openOnClick ? "click" : "contextmenu").subscribe(e => {
|
|
2204
2216
|
e.preventDefault();
|
|
2205
|
-
const [left, top] = this.getElRefPosition();
|
|
2217
|
+
const [left, top] = this.useElRef ? this.getElRefPosition() : [e.clientX, e.clientY];
|
|
2206
2218
|
this.contextMenuService.openContextMenu({
|
|
2207
|
-
x:
|
|
2208
|
-
y:
|
|
2219
|
+
x: left,
|
|
2220
|
+
y: top,
|
|
2209
2221
|
items: this.contextMenu,
|
|
2210
2222
|
ref: this.elRef,
|
|
2211
2223
|
position: this.position
|
|
@@ -2213,17 +2225,17 @@ class ContextMenuDirective extends Subscriptable {
|
|
|
2213
2225
|
}));
|
|
2214
2226
|
}
|
|
2215
2227
|
getElRefPosition = () => {
|
|
2216
|
-
const
|
|
2228
|
+
const { left, width, top, height } = this.elRef.nativeElement.getBoundingClientRect();
|
|
2229
|
+
const diff = left + width;
|
|
2217
2230
|
if (this.position.startsWith("bottom-")) {
|
|
2218
|
-
const
|
|
2231
|
+
const posTop = top + height;
|
|
2219
2232
|
if (this.position === "bottom-left")
|
|
2220
|
-
return [
|
|
2221
|
-
return [diff,
|
|
2233
|
+
return [left, posTop];
|
|
2234
|
+
return [diff, posTop];
|
|
2222
2235
|
}
|
|
2223
|
-
const top = this.elRef.nativeElement.offsetTop;
|
|
2224
2236
|
if (this.position === "top-right")
|
|
2225
2237
|
return [diff, top];
|
|
2226
|
-
return [
|
|
2238
|
+
return [left, top];
|
|
2227
2239
|
};
|
|
2228
2240
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.0", ngImport: i0, type: ContextMenuDirective, deps: null, target: i0.ɵɵFactoryTarget.Directive });
|
|
2229
2241
|
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "16.1.0", version: "22.1.0", type: ContextMenuDirective, isStandalone: false, selector: "[dolfoContextMenu]", inputs: { contextMenu: ["dolfoContextMenu", "contextMenu"], openOnClick: ["openOnClick", "openOnClick", booleanAttribute], useElRef: ["useElRef", "useElRef", booleanAttribute], position: "position" }, usesInheritance: true, ngImport: i0 });
|
|
@@ -2253,7 +2265,7 @@ class NavigateDirective extends Subscriptable {
|
|
|
2253
2265
|
publicUrl = inject(APP_BASE_HREF);
|
|
2254
2266
|
storeService = inject(StoreService);
|
|
2255
2267
|
router = inject(Router);
|
|
2256
|
-
elementRef = inject(ElementRef);
|
|
2268
|
+
elementRef = inject((ElementRef));
|
|
2257
2269
|
constructor() {
|
|
2258
2270
|
super();
|
|
2259
2271
|
this.isLink = this.elementRef.nativeElement.tagName.toLowerCase() === "a";
|
|
@@ -2295,7 +2307,7 @@ class PopoverDirective extends Subscriptable {
|
|
|
2295
2307
|
content;
|
|
2296
2308
|
context;
|
|
2297
2309
|
direction = "top";
|
|
2298
|
-
el = inject(ElementRef);
|
|
2310
|
+
el = inject((ElementRef));
|
|
2299
2311
|
ps = inject(PopoverService);
|
|
2300
2312
|
ngOnInit() {
|
|
2301
2313
|
this.addSubscription(fromEvent(this.el.nativeElement, "mousedown").pipe(filter(() => !!this.ps.getPopover())).subscribe(() => this.ps.hide()));
|
|
@@ -2332,7 +2344,7 @@ class ScrollDragDirective extends Subscriptable {
|
|
|
2332
2344
|
mouseDownY;
|
|
2333
2345
|
initialScrollY = 0;
|
|
2334
2346
|
diffY = 0;
|
|
2335
|
-
elementRef = inject(ElementRef);
|
|
2347
|
+
elementRef = inject((ElementRef));
|
|
2336
2348
|
constructor() {
|
|
2337
2349
|
super();
|
|
2338
2350
|
this.addSubscription(fromEvent(this.elementRef.nativeElement, "mousedown").pipe(filter(e => e.button === 0)).subscribe(e => {
|
|
@@ -2522,12 +2534,13 @@ class GridComponent {
|
|
|
2522
2534
|
col.onLink(colValue);
|
|
2523
2535
|
}
|
|
2524
2536
|
};
|
|
2537
|
+
isToolbarBtnDisabled = (disabled) => typeof disabled === "boolean" ? disabled : disabled();
|
|
2525
2538
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.0", ngImport: i0, type: GridComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
2526
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.1.0", type: GridComponent, isStandalone: false, selector: "dolfo-grid", inputs: { config: "config" }, ngImport: i0, template: "@let loading = config.isLoading$() | async;\r\n\r\n<div class=\"grid-container\" [class.loading]=\"loading\">\r\n @if(loading){\r\n <div class=\"grid-loading\">\r\n <dolfo-icon name=\"spinner2\"></dolfo-icon>\r\n </div>\r\n }\r\n\r\n <table>\r\n @let columns = config.getColumns();\r\n @let showActions = config.hasActions;\r\n @let selection = config.getSelectionConfig();\r\n @let colSpan = columns.length + (showActions ? 1 : 0) + (selection ? 1 : 0);\r\n \r\n <thead>\r\n <tr>\r\n @if(selection){\r\n <th [style]=\"{ width: 0 }\">\r\n @if(selection.showSelectAll && selection.type === \"multiple\"){\r\n <input type=\"checkbox\" [checked]=\"config.isAllSelected()\" (change)=\"config.toggleSelectAll()\" />\r\n }\r\n </th>\r\n }\r\n\r\n @for(col of columns; track col.label){\r\n <th [ngStyle]=\"{ width: col.width + 'px', maxWidth: col.width + 'px' }\">{{ col.label | translate }}</th>\r\n }\r\n \r\n @if(showActions){\r\n <th>{{ \"grid.actions\" | translate }}</th>\r\n }\r\n </tr>\r\n </thead>\r\n \r\n <tbody>\r\n @let list = config.getList$() | async;\r\n \r\n @if(list.length > 0){\r\n @for(item of list; track config.getUniqueId(item)){\r\n @let itemActions = config.getActions$(item) | async;\r\n @let rowClass = config.getRowClass(item);\r\n \r\n <tr (click)=\"config.getEvents()?.onRowClick?.(item)\" [dolfoContextMenu]=\"itemActions\" position=\"bottom-right\">\r\n @if(selection){\r\n <td [ngClass]=\"rowClass\" class=\"align-center\">\r\n <input type=\"checkbox\" [checked]=\"config.isItemSelected(item)\" (change)=\"config.toggleSelection(item)\" />\r\n </td>\r\n }\r\n\r\n @for(col of columns; track col.label){\r\n <td #cell [ngStyle]=\"{ width: col.width + 'px' }\" [ngClass]=\"rowClass\" [class.align-right]=\"col.align === 'right'\" [class.align-center]=\"col.align === 'center'\" (click)=\"checkLink($event, col, item, cell)\" [innerHTML]=\"resolveField(item, col)\"></td>\r\n }\r\n \r\n @if(showActions){\r\n <td class=\"align-center actions\" [ngClass]=\"rowClass\">\r\n @if(itemActions.length > 0){\r\n <dolfo-button color=\"secondary\" [dolfoTooltip]=\"'grid.showActions' | translate\" [dolfoContextMenu]=\"itemActions\" position=\"bottom-right\" openOnClick>\r\n <dolfo-icon name=\"flickr\"></dolfo-icon>\r\n </dolfo-button>\r\n }\r\n </td>\r\n }\r\n </tr>\r\n }\r\n }@else {\r\n <tr>\r\n <td [colSpan]=\"colSpan\" class=\"align-center\">{{ \"grid.noResults\" | translate }}</td>\r\n </tr>\r\n }\r\n </tbody>\r\n </table>\r\n</div>", dependencies: [{ kind: "directive", type: i1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i1.NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }, { kind: "directive", type: ContextMenuDirective, selector: "[dolfoContextMenu]", inputs: ["dolfoContextMenu", "openOnClick", "useElRef", "position"] }, { kind: "directive", type: TooltipDirective, selector: "[dolfoTooltip]", inputs: ["dolfoTooltip", "direction"] }, { kind: "component", type: ButtonComponent, selector: "dolfo-button", inputs: ["type", "disabled", "color", "loading", "size", "textButton"], outputs: ["onClick", "onBlur", "onFocus"] }, { kind: "component", type: IconWrapperComponent, selector: "dolfo-icon", inputs: ["name"] }, { kind: "pipe", type: i1.AsyncPipe, name: "async" }, { kind: "pipe", type: TranslatePipe, name: "translate" }] });
|
|
2539
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.1.0", type: GridComponent, isStandalone: false, selector: "dolfo-grid", inputs: { config: "config" }, ngImport: i0, template: "@let loading = config.isLoading$() | async;\r\n\r\n<div class=\"grid-container\" [class.loading]=\"loading\">\r\n @if(loading){\r\n <div class=\"grid-loading\">\r\n <dolfo-icon name=\"spinner2\"></dolfo-icon>\r\n </div>\r\n }\r\n\r\n <table>\r\n @let columns = config.getColumns();\r\n @let showActions = config.hasActions;\r\n @let selection = config.getSelectionConfig();\r\n @let colSpan = columns.length + (showActions ? 1 : 0) + (selection ? 1 : 0);\r\n \r\n <thead>\r\n @if(config.hasToolbar){\r\n <tr class=\"dolfo-grid-toolbar\">\r\n <th [colSpan]=\"colSpan\">\r\n @for(btn of config.getToolbarButtons(); track btn.label){\r\n <dolfo-button color=\"white\" (onClick)=\"btn.onClick()\" [disabled]=\"isToolbarBtnDisabled(btn.disabled)\">\r\n @if(btn.icon){\r\n <dolfo-icon [name]=\"btn.icon\"></dolfo-icon>\r\n }\r\n\r\n {{ btn.label }}\r\n </dolfo-button>\r\n }\r\n </th>\r\n </tr>\r\n }\r\n\r\n <tr>\r\n @if(selection){\r\n <th [style]=\"{ width: 0 }\">\r\n @if(selection.showSelectAll && selection.type === \"multiple\"){\r\n <input type=\"checkbox\" [checked]=\"config.isAllSelected()\" (change)=\"config.toggleSelectAll()\" />\r\n }\r\n </th>\r\n }\r\n\r\n @for(col of columns; track col.label){\r\n <th [ngStyle]=\"{ width: col.width + 'px', maxWidth: col.width + 'px' }\">{{ col.label | translate }}</th>\r\n }\r\n \r\n @if(showActions){\r\n <th>{{ \"grid.actions\" | translate }}</th>\r\n }\r\n </tr>\r\n </thead>\r\n \r\n <tbody>\r\n @let list = config.getList$() | async;\r\n \r\n @if(list.length > 0){\r\n @for(item of list; track config.getUniqueId(item)){\r\n @let itemActions = config.getActions$(item) | async;\r\n @let rowClass = config.getRowClass(item);\r\n \r\n <tr (click)=\"config.getEvents()?.onRowClick?.(item)\" [dolfoContextMenu]=\"itemActions\" position=\"bottom-right\">\r\n @if(selection){\r\n <td [ngClass]=\"rowClass\" class=\"align-center\">\r\n <input type=\"checkbox\" [checked]=\"config.isItemSelected(item)\" (change)=\"config.toggleSelection(item)\" />\r\n </td>\r\n }\r\n\r\n @for(col of columns; track col.label){\r\n <td #cell [ngStyle]=\"{ width: col.width + 'px' }\" [ngClass]=\"rowClass\" [class.align-right]=\"col.align === 'right'\" [class.align-center]=\"col.align === 'center'\" (click)=\"checkLink($event, col, item, cell)\" [innerHTML]=\"resolveField(item, col)\"></td>\r\n }\r\n \r\n @if(showActions){\r\n <td class=\"align-center actions\" [ngClass]=\"rowClass\">\r\n @if(itemActions.length > 0){\r\n <dolfo-button color=\"secondary\" [dolfoTooltip]=\"'grid.showActions' | translate\" [dolfoContextMenu]=\"itemActions\" position=\"bottom-right\" openOnClick>\r\n <dolfo-icon name=\"flickr\"></dolfo-icon>\r\n </dolfo-button>\r\n }\r\n </td>\r\n }\r\n </tr>\r\n }\r\n }@else {\r\n <tr>\r\n <td [colSpan]=\"colSpan\" class=\"align-center\">{{ \"grid.noResults\" | translate }}</td>\r\n </tr>\r\n }\r\n </tbody>\r\n </table>\r\n</div>", dependencies: [{ kind: "directive", type: i1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i1.NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }, { kind: "directive", type: ContextMenuDirective, selector: "[dolfoContextMenu]", inputs: ["dolfoContextMenu", "openOnClick", "useElRef", "position"] }, { kind: "directive", type: TooltipDirective, selector: "[dolfoTooltip]", inputs: ["dolfoTooltip", "direction"] }, { kind: "component", type: ButtonComponent, selector: "dolfo-button", inputs: ["type", "disabled", "color", "loading", "size", "textButton"], outputs: ["onClick", "onBlur", "onFocus"] }, { kind: "component", type: IconWrapperComponent, selector: "dolfo-icon", inputs: ["name"] }, { kind: "pipe", type: i1.AsyncPipe, name: "async" }, { kind: "pipe", type: TranslatePipe, name: "translate" }] });
|
|
2527
2540
|
}
|
|
2528
2541
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.0", ngImport: i0, type: GridComponent, decorators: [{
|
|
2529
2542
|
type: Component,
|
|
2530
|
-
args: [{ selector: "dolfo-grid", standalone: false, template: "@let loading = config.isLoading$() | async;\r\n\r\n<div class=\"grid-container\" [class.loading]=\"loading\">\r\n @if(loading){\r\n <div class=\"grid-loading\">\r\n <dolfo-icon name=\"spinner2\"></dolfo-icon>\r\n </div>\r\n }\r\n\r\n <table>\r\n @let columns = config.getColumns();\r\n @let showActions = config.hasActions;\r\n @let selection = config.getSelectionConfig();\r\n @let colSpan = columns.length + (showActions ? 1 : 0) + (selection ? 1 : 0);\r\n \r\n <thead>\r\n <tr>\r\n @if(selection){\r\n <th [style]=\"{ width: 0 }\">\r\n @if(selection.showSelectAll && selection.type === \"multiple\"){\r\n <input type=\"checkbox\" [checked]=\"config.isAllSelected()\" (change)=\"config.toggleSelectAll()\" />\r\n }\r\n </th>\r\n }\r\n\r\n @for(col of columns; track col.label){\r\n <th [ngStyle]=\"{ width: col.width + 'px', maxWidth: col.width + 'px' }\">{{ col.label | translate }}</th>\r\n }\r\n \r\n @if(showActions){\r\n <th>{{ \"grid.actions\" | translate }}</th>\r\n }\r\n </tr>\r\n </thead>\r\n \r\n <tbody>\r\n @let list = config.getList$() | async;\r\n \r\n @if(list.length > 0){\r\n @for(item of list; track config.getUniqueId(item)){\r\n @let itemActions = config.getActions$(item) | async;\r\n @let rowClass = config.getRowClass(item);\r\n \r\n <tr (click)=\"config.getEvents()?.onRowClick?.(item)\" [dolfoContextMenu]=\"itemActions\" position=\"bottom-right\">\r\n @if(selection){\r\n <td [ngClass]=\"rowClass\" class=\"align-center\">\r\n <input type=\"checkbox\" [checked]=\"config.isItemSelected(item)\" (change)=\"config.toggleSelection(item)\" />\r\n </td>\r\n }\r\n\r\n @for(col of columns; track col.label){\r\n <td #cell [ngStyle]=\"{ width: col.width + 'px' }\" [ngClass]=\"rowClass\" [class.align-right]=\"col.align === 'right'\" [class.align-center]=\"col.align === 'center'\" (click)=\"checkLink($event, col, item, cell)\" [innerHTML]=\"resolveField(item, col)\"></td>\r\n }\r\n \r\n @if(showActions){\r\n <td class=\"align-center actions\" [ngClass]=\"rowClass\">\r\n @if(itemActions.length > 0){\r\n <dolfo-button color=\"secondary\" [dolfoTooltip]=\"'grid.showActions' | translate\" [dolfoContextMenu]=\"itemActions\" position=\"bottom-right\" openOnClick>\r\n <dolfo-icon name=\"flickr\"></dolfo-icon>\r\n </dolfo-button>\r\n }\r\n </td>\r\n }\r\n </tr>\r\n }\r\n }@else {\r\n <tr>\r\n <td [colSpan]=\"colSpan\" class=\"align-center\">{{ \"grid.noResults\" | translate }}</td>\r\n </tr>\r\n }\r\n </tbody>\r\n </table>\r\n</div>" }]
|
|
2543
|
+
args: [{ selector: "dolfo-grid", standalone: false, template: "@let loading = config.isLoading$() | async;\r\n\r\n<div class=\"grid-container\" [class.loading]=\"loading\">\r\n @if(loading){\r\n <div class=\"grid-loading\">\r\n <dolfo-icon name=\"spinner2\"></dolfo-icon>\r\n </div>\r\n }\r\n\r\n <table>\r\n @let columns = config.getColumns();\r\n @let showActions = config.hasActions;\r\n @let selection = config.getSelectionConfig();\r\n @let colSpan = columns.length + (showActions ? 1 : 0) + (selection ? 1 : 0);\r\n \r\n <thead>\r\n @if(config.hasToolbar){\r\n <tr class=\"dolfo-grid-toolbar\">\r\n <th [colSpan]=\"colSpan\">\r\n @for(btn of config.getToolbarButtons(); track btn.label){\r\n <dolfo-button color=\"white\" (onClick)=\"btn.onClick()\" [disabled]=\"isToolbarBtnDisabled(btn.disabled)\">\r\n @if(btn.icon){\r\n <dolfo-icon [name]=\"btn.icon\"></dolfo-icon>\r\n }\r\n\r\n {{ btn.label }}\r\n </dolfo-button>\r\n }\r\n </th>\r\n </tr>\r\n }\r\n\r\n <tr>\r\n @if(selection){\r\n <th [style]=\"{ width: 0 }\">\r\n @if(selection.showSelectAll && selection.type === \"multiple\"){\r\n <input type=\"checkbox\" [checked]=\"config.isAllSelected()\" (change)=\"config.toggleSelectAll()\" />\r\n }\r\n </th>\r\n }\r\n\r\n @for(col of columns; track col.label){\r\n <th [ngStyle]=\"{ width: col.width + 'px', maxWidth: col.width + 'px' }\">{{ col.label | translate }}</th>\r\n }\r\n \r\n @if(showActions){\r\n <th>{{ \"grid.actions\" | translate }}</th>\r\n }\r\n </tr>\r\n </thead>\r\n \r\n <tbody>\r\n @let list = config.getList$() | async;\r\n \r\n @if(list.length > 0){\r\n @for(item of list; track config.getUniqueId(item)){\r\n @let itemActions = config.getActions$(item) | async;\r\n @let rowClass = config.getRowClass(item);\r\n \r\n <tr (click)=\"config.getEvents()?.onRowClick?.(item)\" [dolfoContextMenu]=\"itemActions\" position=\"bottom-right\">\r\n @if(selection){\r\n <td [ngClass]=\"rowClass\" class=\"align-center\">\r\n <input type=\"checkbox\" [checked]=\"config.isItemSelected(item)\" (change)=\"config.toggleSelection(item)\" />\r\n </td>\r\n }\r\n\r\n @for(col of columns; track col.label){\r\n <td #cell [ngStyle]=\"{ width: col.width + 'px' }\" [ngClass]=\"rowClass\" [class.align-right]=\"col.align === 'right'\" [class.align-center]=\"col.align === 'center'\" (click)=\"checkLink($event, col, item, cell)\" [innerHTML]=\"resolveField(item, col)\"></td>\r\n }\r\n \r\n @if(showActions){\r\n <td class=\"align-center actions\" [ngClass]=\"rowClass\">\r\n @if(itemActions.length > 0){\r\n <dolfo-button color=\"secondary\" [dolfoTooltip]=\"'grid.showActions' | translate\" [dolfoContextMenu]=\"itemActions\" position=\"bottom-right\" openOnClick>\r\n <dolfo-icon name=\"flickr\"></dolfo-icon>\r\n </dolfo-button>\r\n }\r\n </td>\r\n }\r\n </tr>\r\n }\r\n }@else {\r\n <tr>\r\n <td [colSpan]=\"colSpan\" class=\"align-center\">{{ \"grid.noResults\" | translate }}</td>\r\n </tr>\r\n }\r\n </tbody>\r\n </table>\r\n</div>" }]
|
|
2531
2544
|
}], propDecorators: { config: [{
|
|
2532
2545
|
type: Input,
|
|
2533
2546
|
args: [{ required: true }]
|