@firestitch/list 18.0.23 → 18.0.24
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/app/components/body/row/inline-action/inline-action.component.d.ts +8 -4
- package/app/components/body/row/menu-action/menu-action.component.d.ts +9 -5
- package/app/interfaces/listconfig.interface.d.ts +1 -1
- package/app/models/row-action.model.d.ts +2 -1
- package/esm2022/app/components/body/row/actions/actions.component.mjs +3 -3
- package/esm2022/app/components/body/row/inline-action/inline-action.component.mjs +17 -7
- package/esm2022/app/components/body/row/menu-action/menu-action.component.mjs +16 -8
- package/esm2022/app/interfaces/listconfig.interface.mjs +1 -1
- package/esm2022/app/models/row-action.model.mjs +4 -1
- package/fesm2022/firestitch-list.mjs +34 -15
- package/fesm2022/firestitch-list.mjs.map +1 -1
- package/package.json +1 -1
|
@@ -1281,6 +1281,9 @@ class RowAction {
|
|
|
1281
1281
|
get isGroup() {
|
|
1282
1282
|
return this._isGroup;
|
|
1283
1283
|
}
|
|
1284
|
+
getRowIcon(row) {
|
|
1285
|
+
return typeof this.icon === 'function' ? this.icon(row) : this.icon;
|
|
1286
|
+
}
|
|
1284
1287
|
_init(value) {
|
|
1285
1288
|
this.icon = value.icon;
|
|
1286
1289
|
this.menu = value.menu ?? true;
|
|
@@ -1358,15 +1361,22 @@ class RowAction {
|
|
|
1358
1361
|
|
|
1359
1362
|
class FsRowInlineActionComponent {
|
|
1360
1363
|
actionType;
|
|
1361
|
-
|
|
1364
|
+
rowAction;
|
|
1365
|
+
row;
|
|
1362
1366
|
clicked = new EventEmitter();
|
|
1363
1367
|
fileSelect = new EventEmitter();
|
|
1368
|
+
icon;
|
|
1369
|
+
ngOnChanges(changes) {
|
|
1370
|
+
if (changes.row) {
|
|
1371
|
+
this.icon = this.rowAction.getRowIcon(this.row.data);
|
|
1372
|
+
}
|
|
1373
|
+
}
|
|
1364
1374
|
actionClick(event) {
|
|
1365
1375
|
this.clicked.emit(event);
|
|
1366
1376
|
}
|
|
1367
1377
|
ngOnInit() {
|
|
1368
|
-
this.actionType = this.
|
|
1369
|
-
if (!this.
|
|
1378
|
+
this.actionType = this.rowAction.type;
|
|
1379
|
+
if (!this.rowAction.label && this.rowAction.icon) {
|
|
1370
1380
|
this.actionType = ActionType.Icon;
|
|
1371
1381
|
}
|
|
1372
1382
|
}
|
|
@@ -1374,12 +1384,14 @@ class FsRowInlineActionComponent {
|
|
|
1374
1384
|
this.fileSelect.emit(event);
|
|
1375
1385
|
}
|
|
1376
1386
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.7", ngImport: i0, type: FsRowInlineActionComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
1377
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.2.7", type: FsRowInlineActionComponent, selector: "fs-list-row-inline-action", inputs: {
|
|
1387
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.2.7", type: FsRowInlineActionComponent, selector: "fs-list-row-inline-action", inputs: { rowAction: "rowAction", row: "row" }, outputs: { clicked: "clicked", fileSelect: "fileSelect" }, usesOnChanges: true, ngImport: i0, template: "<ng-container\n *ngIf=\"rowAction.isShown\"\n [ngSwitch]=\"actionType\">\n <!-- Basic button -->\n <ng-container *ngSwitchCase=\"'basic'\">\n <ng-container *ngIf=\"!rowAction.routerLink; else link\">\n <button\n type=\"button\"\n mat-button\n (click)=\"actionClick($event)\"\n [ngClass]=\"rowAction.classArray\">\n <ng-template [ngTemplateOutlet]=\"buttonContent\"></ng-template>\n </button>\n </ng-container>\n <ng-template #link>\n <a\n mat-button\n [routerLink]=\"rowAction.routerLink.link\"\n [queryParams]=\"rowAction.routerLink.queryParams\">\n <ng-template [ngTemplateOutlet]=\"buttonContent\"></ng-template>\n </a>\n </ng-template>\n </ng-container>\n <!-- Raised button -->\n <ng-container *ngSwitchCase=\"'raised'\">\n <ng-container *ngIf=\"!rowAction.routerLink; else link\">\n <button\n type=\"button\"\n mat-raised-button\n (click)=\"actionClick($event)\"\n [ngClass]=\"rowAction.classArray\">\n <ng-template [ngTemplateOutlet]=\"buttonContent\"></ng-template>\n </button>\n </ng-container>\n <ng-template #link>\n <a\n mat-raised-button\n [routerLink]=\"rowAction.routerLink.link\"\n [queryParams]=\"rowAction.routerLink.queryParams\">\n <ng-template [ngTemplateOutlet]=\"buttonContent\"></ng-template>\n </a>\n </ng-template>\n </ng-container>\n <!-- Icon button -->\n <ng-container *ngSwitchCase=\"'icon'\">\n <ng-container *ngIf=\"!rowAction.routerLink; else link\">\n <button\n type=\"button\"\n mat-icon-button\n (click)=\"actionClick($event)\"\n [ngClass]=\"rowAction.classArray\">\n <ng-template [ngTemplateOutlet]=\"buttonContent\"></ng-template>\n </button>\n </ng-container>\n <ng-template #link>\n <a\n mat-icon-button\n [routerLink]=\"rowAction.routerLink.link\"\n [queryParams]=\"rowAction.routerLink.queryParams\">\n <ng-template [ngTemplateOutlet]=\"buttonContent\"></ng-template>\n </a>\n </ng-template>\n </ng-container>\n <!-- Fab button -->\n <ng-container *ngSwitchCase=\"'fab'\">\n <ng-container *ngIf=\"!rowAction.routerLink; else link\">\n <button\n type=\"button\"\n mat-fab\n (click)=\"actionClick($event)\"\n [ngClass]=\"rowAction.classArray\">\n <ng-template [ngTemplateOutlet]=\"buttonContent\"></ng-template>\n </button>\n </ng-container>\n <ng-template #link>\n <a\n mat-fab\n [routerLink]=\"rowAction.routerLink.link\"\n [queryParams]=\"rowAction.routerLink.queryParams\">\n <ng-template [ngTemplateOutlet]=\"buttonContent\"></ng-template>\n </a>\n </ng-template>\n </ng-container>\n <!-- Mini Fab button -->\n <ng-container *ngSwitchCase=\"'mini-fab'\">\n <ng-container *ngIf=\"!rowAction.routerLink; else link\">\n <button\n type=\"button\"\n mat-mini-fab\n (click)=\"actionClick($event)\"\n [ngClass]=\"rowAction.classArray\">\n <ng-template [ngTemplateOutlet]=\"buttonContent\"></ng-template>\n </button>\n </ng-container>\n <ng-template #link>\n <a\n mat-mini-fab\n [routerLink]=\"rowAction.routerLink.link\"\n [queryParams]=\"rowAction.routerLink.queryParams\">\n <ng-template [ngTemplateOutlet]=\"buttonContent\"></ng-template>\n </a>\n </ng-template>\n </ng-container>\n <ng-template #buttonContent>\n <ng-container *ngIf=\"!rowAction.fileConfig else uploadFileBtn\">\n <mat-icon *ngIf=\"icon\">\n {{ icon }}\n </mat-icon>\n {{ rowAction.label }}\n </ng-container>\n <ng-template #uploadFileBtn>\n <fs-file\n class=\"action-button\"\n [accept]=\"rowAction.fileConfig.accept || '*'\"\n [multiple]=\"rowAction.fileConfig.multiple\"\n [minWidth]=\"rowAction.fileConfig.minWidth\"\n [minHeight]=\"rowAction.fileConfig.minHeight\"\n [imageWidth]=\"rowAction.fileConfig.maxWidth\"\n [imageHeight]=\"rowAction.fileConfig.maxHeight\"\n (select)=\"fileSelected($event)\"\n (error)=\"rowAction.fileConfig.error && rowAction.fileConfig.error($event)\">\n <mat-icon *ngIf=\"icon\">\n {{ icon }}\n </mat-icon>\n {{ rowAction.label }}\n </fs-file>\n </ng-template>\n </ng-template>\n</ng-container>", styles: ["mat-icon{display:flex}\n"], dependencies: [{ kind: "directive", type: i1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i1.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "directive", type: i1.NgSwitch, selector: "[ngSwitch]", inputs: ["ngSwitch"] }, { kind: "directive", type: i1.NgSwitchCase, selector: "[ngSwitchCase]", inputs: ["ngSwitchCase"] }, { kind: "directive", type: i6.RouterLink, selector: "[routerLink]", inputs: ["target", "queryParams", "fragment", "queryParamsHandling", "state", "info", "relativeTo", "preserveFragment", "skipLocationChange", "replaceUrl", "routerLink"] }, { kind: "component", type: i3.MatAnchor, selector: "a[mat-button], a[mat-raised-button], a[mat-flat-button], a[mat-stroked-button]", exportAs: ["matButton", "matAnchor"] }, { kind: "component", type: i3.MatButton, selector: " button[mat-button], button[mat-raised-button], button[mat-flat-button], button[mat-stroked-button] ", exportAs: ["matButton"] }, { kind: "component", type: i3.MatIconAnchor, selector: "a[mat-icon-button]", exportAs: ["matButton", "matAnchor"] }, { kind: "component", type: i3.MatIconButton, selector: "button[mat-icon-button]", exportAs: ["matButton"] }, { kind: "component", type: i3.MatMiniFabAnchor, selector: "a[mat-mini-fab]", exportAs: ["matButton", "matAnchor"] }, { kind: "component", type: i3.MatMiniFabButton, selector: "button[mat-mini-fab]", exportAs: ["matButton"] }, { kind: "component", type: i3.MatFabAnchor, selector: "a[mat-fab]", inputs: ["extended"], exportAs: ["matButton", "matAnchor"] }, { kind: "component", type: i3.MatFabButton, selector: "button[mat-fab]", inputs: ["extended"], exportAs: ["matButton"] }, { kind: "component", type: i3$1.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "component", type: i5.FsFileComponent, selector: "fs-file", inputs: ["minHeight", "minWidth", "orientate", "multiple", "capture", "allowClick", "allowDrop", "accept", "disabled", "imageWidth", "imageHeight", "imageQuality"], outputs: ["select", "error", "beforeProcessing", "clicked", "declined"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
1378
1388
|
}
|
|
1379
1389
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.7", ngImport: i0, type: FsRowInlineActionComponent, decorators: [{
|
|
1380
1390
|
type: Component,
|
|
1381
|
-
args: [{ selector: 'fs-list-row-inline-action', changeDetection: ChangeDetectionStrategy.OnPush, template: "<ng-container\n *ngIf=\"
|
|
1382
|
-
}], propDecorators: {
|
|
1391
|
+
args: [{ selector: 'fs-list-row-inline-action', changeDetection: ChangeDetectionStrategy.OnPush, template: "<ng-container\n *ngIf=\"rowAction.isShown\"\n [ngSwitch]=\"actionType\">\n <!-- Basic button -->\n <ng-container *ngSwitchCase=\"'basic'\">\n <ng-container *ngIf=\"!rowAction.routerLink; else link\">\n <button\n type=\"button\"\n mat-button\n (click)=\"actionClick($event)\"\n [ngClass]=\"rowAction.classArray\">\n <ng-template [ngTemplateOutlet]=\"buttonContent\"></ng-template>\n </button>\n </ng-container>\n <ng-template #link>\n <a\n mat-button\n [routerLink]=\"rowAction.routerLink.link\"\n [queryParams]=\"rowAction.routerLink.queryParams\">\n <ng-template [ngTemplateOutlet]=\"buttonContent\"></ng-template>\n </a>\n </ng-template>\n </ng-container>\n <!-- Raised button -->\n <ng-container *ngSwitchCase=\"'raised'\">\n <ng-container *ngIf=\"!rowAction.routerLink; else link\">\n <button\n type=\"button\"\n mat-raised-button\n (click)=\"actionClick($event)\"\n [ngClass]=\"rowAction.classArray\">\n <ng-template [ngTemplateOutlet]=\"buttonContent\"></ng-template>\n </button>\n </ng-container>\n <ng-template #link>\n <a\n mat-raised-button\n [routerLink]=\"rowAction.routerLink.link\"\n [queryParams]=\"rowAction.routerLink.queryParams\">\n <ng-template [ngTemplateOutlet]=\"buttonContent\"></ng-template>\n </a>\n </ng-template>\n </ng-container>\n <!-- Icon button -->\n <ng-container *ngSwitchCase=\"'icon'\">\n <ng-container *ngIf=\"!rowAction.routerLink; else link\">\n <button\n type=\"button\"\n mat-icon-button\n (click)=\"actionClick($event)\"\n [ngClass]=\"rowAction.classArray\">\n <ng-template [ngTemplateOutlet]=\"buttonContent\"></ng-template>\n </button>\n </ng-container>\n <ng-template #link>\n <a\n mat-icon-button\n [routerLink]=\"rowAction.routerLink.link\"\n [queryParams]=\"rowAction.routerLink.queryParams\">\n <ng-template [ngTemplateOutlet]=\"buttonContent\"></ng-template>\n </a>\n </ng-template>\n </ng-container>\n <!-- Fab button -->\n <ng-container *ngSwitchCase=\"'fab'\">\n <ng-container *ngIf=\"!rowAction.routerLink; else link\">\n <button\n type=\"button\"\n mat-fab\n (click)=\"actionClick($event)\"\n [ngClass]=\"rowAction.classArray\">\n <ng-template [ngTemplateOutlet]=\"buttonContent\"></ng-template>\n </button>\n </ng-container>\n <ng-template #link>\n <a\n mat-fab\n [routerLink]=\"rowAction.routerLink.link\"\n [queryParams]=\"rowAction.routerLink.queryParams\">\n <ng-template [ngTemplateOutlet]=\"buttonContent\"></ng-template>\n </a>\n </ng-template>\n </ng-container>\n <!-- Mini Fab button -->\n <ng-container *ngSwitchCase=\"'mini-fab'\">\n <ng-container *ngIf=\"!rowAction.routerLink; else link\">\n <button\n type=\"button\"\n mat-mini-fab\n (click)=\"actionClick($event)\"\n [ngClass]=\"rowAction.classArray\">\n <ng-template [ngTemplateOutlet]=\"buttonContent\"></ng-template>\n </button>\n </ng-container>\n <ng-template #link>\n <a\n mat-mini-fab\n [routerLink]=\"rowAction.routerLink.link\"\n [queryParams]=\"rowAction.routerLink.queryParams\">\n <ng-template [ngTemplateOutlet]=\"buttonContent\"></ng-template>\n </a>\n </ng-template>\n </ng-container>\n <ng-template #buttonContent>\n <ng-container *ngIf=\"!rowAction.fileConfig else uploadFileBtn\">\n <mat-icon *ngIf=\"icon\">\n {{ icon }}\n </mat-icon>\n {{ rowAction.label }}\n </ng-container>\n <ng-template #uploadFileBtn>\n <fs-file\n class=\"action-button\"\n [accept]=\"rowAction.fileConfig.accept || '*'\"\n [multiple]=\"rowAction.fileConfig.multiple\"\n [minWidth]=\"rowAction.fileConfig.minWidth\"\n [minHeight]=\"rowAction.fileConfig.minHeight\"\n [imageWidth]=\"rowAction.fileConfig.maxWidth\"\n [imageHeight]=\"rowAction.fileConfig.maxHeight\"\n (select)=\"fileSelected($event)\"\n (error)=\"rowAction.fileConfig.error && rowAction.fileConfig.error($event)\">\n <mat-icon *ngIf=\"icon\">\n {{ icon }}\n </mat-icon>\n {{ rowAction.label }}\n </fs-file>\n </ng-template>\n </ng-template>\n</ng-container>", styles: ["mat-icon{display:flex}\n"] }]
|
|
1392
|
+
}], propDecorators: { rowAction: [{
|
|
1393
|
+
type: Input
|
|
1394
|
+
}], row: [{
|
|
1383
1395
|
type: Input
|
|
1384
1396
|
}], clicked: [{
|
|
1385
1397
|
type: Output
|
|
@@ -1405,14 +1417,20 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.7", ngImpor
|
|
|
1405
1417
|
class FsRowMenuActionComponent {
|
|
1406
1418
|
_menu;
|
|
1407
1419
|
row;
|
|
1408
|
-
|
|
1409
|
-
label;
|
|
1420
|
+
rowAction;
|
|
1410
1421
|
file;
|
|
1411
1422
|
fileSelect = new EventEmitter();
|
|
1412
1423
|
fileError = new EventEmitter();
|
|
1424
|
+
icon;
|
|
1425
|
+
label;
|
|
1413
1426
|
constructor(_menu) {
|
|
1414
1427
|
this._menu = _menu;
|
|
1415
1428
|
}
|
|
1429
|
+
ngOnChanges(changes) {
|
|
1430
|
+
if (changes.row) {
|
|
1431
|
+
this.icon = this.rowAction.getRowIcon(this.row.data);
|
|
1432
|
+
}
|
|
1433
|
+
}
|
|
1416
1434
|
selectFile(event) {
|
|
1417
1435
|
this.fileSelect.emit(event);
|
|
1418
1436
|
this.closeMenu();
|
|
@@ -1424,17 +1442,18 @@ class FsRowMenuActionComponent {
|
|
|
1424
1442
|
closeMenu() {
|
|
1425
1443
|
this._menu.closeMenu();
|
|
1426
1444
|
}
|
|
1445
|
+
ngOnInit() {
|
|
1446
|
+
this.label = this.rowAction.label;
|
|
1447
|
+
}
|
|
1427
1448
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.7", ngImport: i0, type: FsRowMenuActionComponent, deps: [{ token: i3$2.FsMenuComponent }], target: i0.ɵɵFactoryTarget.Component });
|
|
1428
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.2.7", type: FsRowMenuActionComponent, selector: "fs-list-row-menu-action", inputs: { row: "row",
|
|
1449
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.2.7", type: FsRowMenuActionComponent, selector: "fs-list-row-menu-action", inputs: { row: "row", rowAction: "rowAction", file: "file" }, outputs: { fileSelect: "fileSelect", fileError: "fileError" }, usesOnChanges: true, ngImport: i0, template: "<ng-container *ngIf=\"!file else withFile\">\n <mat-icon *ngIf=\"icon\">\n {{ icon }}\n </mat-icon>\n {{ label| actionLabel:row }}\n</ng-container>\n<ng-template #withFile>\n <fs-file\n class=\"action-button\"\n [accept]=\"file.accept || '*'\"\n [multiple]=\"file.multiple\"\n [minWidth]=\"file.minWidth\"\n [minHeight]=\"file.minHeight\"\n [imageWidth]=\"file.maxWidth\"\n [imageHeight]=\"file.maxHeight\"\n (click)=\"$event.stopPropagation();\"\n (select)=\"selectFile($event)\"\n (error)=\"errorFile($event)\"\n (cancel)=\"closeMenu()\">\n <mat-icon *ngIf=\"icon\">\n {{ icon }}\n </mat-icon>\n {{ label| actionLabel:row }}\n </fs-file>\n</ng-template>", dependencies: [{ kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: i3$1.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "component", type: i5.FsFileComponent, selector: "fs-file", inputs: ["minHeight", "minWidth", "orientate", "multiple", "capture", "allowClick", "allowDrop", "accept", "disabled", "imageWidth", "imageHeight", "imageQuality"], outputs: ["select", "error", "beforeProcessing", "clicked", "declined"] }, { kind: "pipe", type: ActionLabelPipe, name: "actionLabel" }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
1429
1450
|
}
|
|
1430
1451
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.7", ngImport: i0, type: FsRowMenuActionComponent, decorators: [{
|
|
1431
1452
|
type: Component,
|
|
1432
|
-
args: [{ selector: 'fs-list-row-menu-action', changeDetection: ChangeDetectionStrategy.OnPush, template: "<ng-container *ngIf=\"!file else withFile\">\n <mat-icon *ngIf=\"icon\"
|
|
1453
|
+
args: [{ selector: 'fs-list-row-menu-action', changeDetection: ChangeDetectionStrategy.OnPush, template: "<ng-container *ngIf=\"!file else withFile\">\n <mat-icon *ngIf=\"icon\">\n {{ icon }}\n </mat-icon>\n {{ label| actionLabel:row }}\n</ng-container>\n<ng-template #withFile>\n <fs-file\n class=\"action-button\"\n [accept]=\"file.accept || '*'\"\n [multiple]=\"file.multiple\"\n [minWidth]=\"file.minWidth\"\n [minHeight]=\"file.minHeight\"\n [imageWidth]=\"file.maxWidth\"\n [imageHeight]=\"file.maxHeight\"\n (click)=\"$event.stopPropagation();\"\n (select)=\"selectFile($event)\"\n (error)=\"errorFile($event)\"\n (cancel)=\"closeMenu()\">\n <mat-icon *ngIf=\"icon\">\n {{ icon }}\n </mat-icon>\n {{ label| actionLabel:row }}\n </fs-file>\n</ng-template>" }]
|
|
1433
1454
|
}], ctorParameters: () => [{ type: i3$2.FsMenuComponent }], propDecorators: { row: [{
|
|
1434
1455
|
type: Input
|
|
1435
|
-
}],
|
|
1436
|
-
type: Input
|
|
1437
|
-
}], label: [{
|
|
1456
|
+
}], rowAction: [{
|
|
1438
1457
|
type: Input
|
|
1439
1458
|
}], file: [{
|
|
1440
1459
|
type: Input
|
|
@@ -1509,11 +1528,11 @@ class FsRowActionsComponent {
|
|
|
1509
1528
|
}
|
|
1510
1529
|
}
|
|
1511
1530
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.7", ngImport: i0, type: FsRowActionsComponent, deps: [{ token: i1$1.FsPrompt }], target: i0.ɵɵFactoryTarget.Component });
|
|
1512
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.2.7", type: FsRowActionsComponent, selector: "fs-list-row-actions", inputs: { row: "row", index: "index", restoreMode: "restoreMode", rowActions: "rowActions", rowRemoved: "rowRemoved", menuRowActions: "menuRowActions", inlineRowActions: "inlineRowActions", restoreAction: "restoreAction" }, ngImport: i0, template: "<ng-container *ngIf=\"!restoreMode || (restoreMode && !restoreAction)\">\n <ng-container *ngFor=\"let action of inlineRowActions; trackBy: trackByFn\">\n <fs-list-row-inline-action\n class=\"row-inline-action row-inline-action-{{action.type}}\"\n [
|
|
1531
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.2.7", type: FsRowActionsComponent, selector: "fs-list-row-actions", inputs: { row: "row", index: "index", restoreMode: "restoreMode", rowActions: "rowActions", rowRemoved: "rowRemoved", menuRowActions: "menuRowActions", inlineRowActions: "inlineRowActions", restoreAction: "restoreAction" }, ngImport: i0, template: "<ng-container *ngIf=\"!restoreMode || (restoreMode && !restoreAction)\">\n <ng-container *ngFor=\"let action of inlineRowActions; trackBy: trackByFn\">\n <fs-list-row-inline-action\n class=\"row-inline-action row-inline-action-{{action.type}}\"\n [rowAction]=\"action\"\n [row]=\"row\"\n [ngClass]=\"{ 'mobile-hide': action.menu === undefined }\"\n (clicked)=\"actionClick(action, row, $event)\"\n (fileSelect)=\"action.fileConfig.select($event, row, index)\">\n </fs-list-row-inline-action>\n </ng-container>\n</ng-container>\n<!-- Menu -->\n<fs-menu\n class=\"row-menu-action\"\n *ngIf=\"menuRowActions.length || (restoreMode && restoreAction)\"\n #menuRef>\n <!-- Case when we have usual menu actions -->\n <ng-container *ngIf=\"!restoreMode || (restoreMode && !restoreAction)\">\n <ng-container *ngFor=\"let action of inlineRowActions; trackBy: trackByFn\">\n <ng-template\n class=\"hidden-mobile-menu-action\"\n fs-menu-item\n [link]=\"action.routerLink?.link\"\n [queryParams]=\"action.routerLink?.queryParams\"\n [target]=\"action.routerLink?.target\"\n [hidden]=\"action.menu !== undefined && !action.isShown\">\n <fs-list-row-menu-action\n [rowAction]=\"action\"\n [row]=\"row\"\n [file]=\"action.fileConfig\"\n (fileSelect)=\"action.fileConfig.select($event, row, index)\"\n (fileError)=\"action.fileConfig.error && action.fileConfig.error($event)\">\n </fs-list-row-menu-action>\n </ng-template>\n </ng-container>\n <ng-container *ngFor=\"let action of menuRowActions; trackBy: trackByFn\">\n <ng-container *ngIf=\"action.isGroup else simpleMenuItem\">\n <fs-menu-group [label]=\"action.label | actionLabel:row\">\n <ng-container *ngFor=\"let subAction of action.rowActions\">\n <ng-template\n fs-menu-item\n [link]=\"subAction.routerLink?.link\"\n [queryParams]=\"subAction.routerLink?.queryParams\"\n [target]=\"subAction.routerLink?.target\"\n [hidden]=\"!subAction.isShown\"\n [class]=\"subAction.className\"\n (click)=\"actionClick(subAction, row, $event, menuRef);\">\n <fs-list-row-menu-action\n [rowAction]=\"subAction\"\n [row]=\"row\"\n [file]=\"subAction.fileConfig\"\n (fileSelect)=\"subAction.fileConfig.select($event, row, index)\"\n (fileError)=\"subAction.fileConfig.error && subAction.fileConfig.error($event)\">\n </fs-list-row-menu-action>\n </ng-template>\n </ng-container>\n </fs-menu-group>\n </ng-container>\n <ng-template #simpleMenuItem>\n <ng-template\n fs-menu-item\n [link]=\"action.routerLink?.link\"\n [queryParams]=\"action.routerLink?.queryParams\"\n [target]=\"action.routerLink?.target\"\n [hidden]=\"!action.isShown\"\n [class]=\"action.className\"\n (click)=\"actionClick(action, row, $event, menuRef);\">\n <fs-list-row-menu-action\n [rowAction]=\"action\"\n [row]=\"row\"\n [file]=\"action.fileConfig\"\n (fileSelect)=\"action.fileConfig.select($event, row, index)\"\n (fileError)=\"action.fileConfig.error && action.fileConfig.error($event)\">\n </fs-list-row-menu-action>\n </ng-template>\n </ng-template>\n </ng-container>\n </ng-container>\n <!-- Case when we have restore mode enabled and must hide menu actions -->\n <ng-container *ngIf=\"restoreMode && restoreAction\">\n <ng-template\n fs-menu-item\n (click)=\"actionClick(restoreAction, row, $event, menuRef)\">\n <mat-icon *ngIf=\"restoreAction.icon\">\n {{ restoreAction.icon }}\n </mat-icon>\n {{ restoreAction.label | actionLabel:row }}\n </ng-template>\n </ng-container>\n</fs-menu>", styles: [":host{display:flex;align-items:center;justify-content:flex-end}:host ::ng-deep fs-list-row-inline-action{margin-left:5px}:host ::ng-deep fs-list-row-inline-action:first-child{margin-left:0}::ng-deep .hidden-mobile-menu-action{display:none!important}\n"], dependencies: [{ kind: "directive", type: i1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: i3$1.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "component", type: i3$2.FsMenuComponent, selector: "fs-menu", inputs: ["class", "buttonClass", "buttonType", "buttonColor"], outputs: ["opened", "closed"] }, { kind: "directive", type: i3$2.FsMenuItemDirective, selector: "fs-menu-group,[fs-menu-item]" }, { kind: "component", type: FsRowInlineActionComponent, selector: "fs-list-row-inline-action", inputs: ["rowAction", "row"], outputs: ["clicked", "fileSelect"] }, { kind: "component", type: FsRowMenuActionComponent, selector: "fs-list-row-menu-action", inputs: ["row", "rowAction", "file"], outputs: ["fileSelect", "fileError"] }, { kind: "pipe", type: ActionLabelPipe, name: "actionLabel" }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
1513
1532
|
}
|
|
1514
1533
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.7", ngImport: i0, type: FsRowActionsComponent, decorators: [{
|
|
1515
1534
|
type: Component,
|
|
1516
|
-
args: [{ selector: 'fs-list-row-actions', changeDetection: ChangeDetectionStrategy.OnPush, template: "<ng-container *ngIf=\"!restoreMode || (restoreMode && !restoreAction)\">\n <ng-container *ngFor=\"let action of inlineRowActions; trackBy: trackByFn\">\n <fs-list-row-inline-action\n class=\"row-inline-action row-inline-action-{{action.type}}\"\n [
|
|
1535
|
+
args: [{ selector: 'fs-list-row-actions', changeDetection: ChangeDetectionStrategy.OnPush, template: "<ng-container *ngIf=\"!restoreMode || (restoreMode && !restoreAction)\">\n <ng-container *ngFor=\"let action of inlineRowActions; trackBy: trackByFn\">\n <fs-list-row-inline-action\n class=\"row-inline-action row-inline-action-{{action.type}}\"\n [rowAction]=\"action\"\n [row]=\"row\"\n [ngClass]=\"{ 'mobile-hide': action.menu === undefined }\"\n (clicked)=\"actionClick(action, row, $event)\"\n (fileSelect)=\"action.fileConfig.select($event, row, index)\">\n </fs-list-row-inline-action>\n </ng-container>\n</ng-container>\n<!-- Menu -->\n<fs-menu\n class=\"row-menu-action\"\n *ngIf=\"menuRowActions.length || (restoreMode && restoreAction)\"\n #menuRef>\n <!-- Case when we have usual menu actions -->\n <ng-container *ngIf=\"!restoreMode || (restoreMode && !restoreAction)\">\n <ng-container *ngFor=\"let action of inlineRowActions; trackBy: trackByFn\">\n <ng-template\n class=\"hidden-mobile-menu-action\"\n fs-menu-item\n [link]=\"action.routerLink?.link\"\n [queryParams]=\"action.routerLink?.queryParams\"\n [target]=\"action.routerLink?.target\"\n [hidden]=\"action.menu !== undefined && !action.isShown\">\n <fs-list-row-menu-action\n [rowAction]=\"action\"\n [row]=\"row\"\n [file]=\"action.fileConfig\"\n (fileSelect)=\"action.fileConfig.select($event, row, index)\"\n (fileError)=\"action.fileConfig.error && action.fileConfig.error($event)\">\n </fs-list-row-menu-action>\n </ng-template>\n </ng-container>\n <ng-container *ngFor=\"let action of menuRowActions; trackBy: trackByFn\">\n <ng-container *ngIf=\"action.isGroup else simpleMenuItem\">\n <fs-menu-group [label]=\"action.label | actionLabel:row\">\n <ng-container *ngFor=\"let subAction of action.rowActions\">\n <ng-template\n fs-menu-item\n [link]=\"subAction.routerLink?.link\"\n [queryParams]=\"subAction.routerLink?.queryParams\"\n [target]=\"subAction.routerLink?.target\"\n [hidden]=\"!subAction.isShown\"\n [class]=\"subAction.className\"\n (click)=\"actionClick(subAction, row, $event, menuRef);\">\n <fs-list-row-menu-action\n [rowAction]=\"subAction\"\n [row]=\"row\"\n [file]=\"subAction.fileConfig\"\n (fileSelect)=\"subAction.fileConfig.select($event, row, index)\"\n (fileError)=\"subAction.fileConfig.error && subAction.fileConfig.error($event)\">\n </fs-list-row-menu-action>\n </ng-template>\n </ng-container>\n </fs-menu-group>\n </ng-container>\n <ng-template #simpleMenuItem>\n <ng-template\n fs-menu-item\n [link]=\"action.routerLink?.link\"\n [queryParams]=\"action.routerLink?.queryParams\"\n [target]=\"action.routerLink?.target\"\n [hidden]=\"!action.isShown\"\n [class]=\"action.className\"\n (click)=\"actionClick(action, row, $event, menuRef);\">\n <fs-list-row-menu-action\n [rowAction]=\"action\"\n [row]=\"row\"\n [file]=\"action.fileConfig\"\n (fileSelect)=\"action.fileConfig.select($event, row, index)\"\n (fileError)=\"action.fileConfig.error && action.fileConfig.error($event)\">\n </fs-list-row-menu-action>\n </ng-template>\n </ng-template>\n </ng-container>\n </ng-container>\n <!-- Case when we have restore mode enabled and must hide menu actions -->\n <ng-container *ngIf=\"restoreMode && restoreAction\">\n <ng-template\n fs-menu-item\n (click)=\"actionClick(restoreAction, row, $event, menuRef)\">\n <mat-icon *ngIf=\"restoreAction.icon\">\n {{ restoreAction.icon }}\n </mat-icon>\n {{ restoreAction.label | actionLabel:row }}\n </ng-template>\n </ng-container>\n</fs-menu>", styles: [":host{display:flex;align-items:center;justify-content:flex-end}:host ::ng-deep fs-list-row-inline-action{margin-left:5px}:host ::ng-deep fs-list-row-inline-action:first-child{margin-left:0}::ng-deep .hidden-mobile-menu-action{display:none!important}\n"] }]
|
|
1517
1536
|
}], ctorParameters: () => [{ type: i1$1.FsPrompt }], propDecorators: { row: [{
|
|
1518
1537
|
type: Input
|
|
1519
1538
|
}], index: [{
|