@firestitch/list 9.9.9 → 9.10.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.
- package/app/classes/actions-controller.d.ts +20 -20
- package/app/classes/columns-controller.d.ts +65 -65
- package/app/classes/data-controller.d.ts +89 -89
- package/app/classes/external-params-controller.d.ts +31 -31
- package/app/classes/index.d.ts +2 -2
- package/app/classes/list-controller.d.ts +166 -166
- package/app/classes/pagination-controller.d.ts +185 -185
- package/app/classes/persistance-controller.d.ts +7 -7
- package/app/classes/reorder-controller.d.ts +56 -56
- package/app/classes/selection-controller.d.ts +141 -141
- package/app/classes/sorting-controller.d.ts +64 -63
- package/app/components/body/body.component.d.ts +29 -29
- package/app/components/body/row/actions/actions.component.d.ts +32 -32
- package/app/components/body/row/cell/cell.component.d.ts +20 -20
- package/app/components/body/row/inline-action/inline-action.component.d.ts +10 -10
- package/app/components/body/row/row.component.d.ts +66 -66
- package/app/components/customize-cols/customize-cols.component.d.ts +14 -14
- package/app/components/footer/footer-row/footer-cell/footer-cell.component.d.ts +7 -4
- package/app/components/footer/footer-row/footer-row.component.d.ts +10 -8
- package/app/components/footer/footer.component.d.ts +10 -8
- package/app/components/head/head-cell/head-cell.component.d.ts +11 -11
- package/app/components/head/head.component.d.ts +40 -40
- package/app/components/list/list.component.d.ts +108 -108
- package/app/components/loader/loader.component.d.ts +11 -11
- package/app/components/manage-saved-filters/manage-saved-filters.component.d.ts +10 -10
- package/app/components/pagination/pagination.component.d.ts +11 -11
- package/app/components/saved-filters/saved-filters.component.d.ts +12 -12
- package/app/components/status/status.component.d.ts +18 -18
- package/app/directives/cell/cell.directive.d.ts +5 -5
- package/app/directives/column/column.directive.d.ts +24 -23
- package/app/directives/draggable-list/draggable-list.directive.d.ts +77 -77
- package/app/directives/draggable-row/draggable-row.directive.d.ts +18 -18
- package/app/directives/empty-state/empty-state.directive.d.ts +2 -2
- package/app/directives/footer/footer.directive.d.ts +5 -5
- package/app/directives/group-cell/group-cell.directive.d.ts +3 -3
- package/app/directives/group-expand-trigger/group-expand-trigger.directive.d.ts +7 -7
- package/app/directives/header/header.directive.d.ts +5 -5
- package/app/enums/button-type.enum.d.ts +7 -7
- package/app/enums/page-change-type.enum.d.ts +4 -4
- package/app/enums/pagination-strategy.enum.d.ts +5 -5
- package/app/enums/row-type.enum.d.ts +5 -5
- package/app/enums/state.enum.d.ts +9 -9
- package/app/fs-list.module.d.ts +6 -6
- package/app/fs-list.providers.d.ts +3 -3
- package/app/interfaces/cellconfig.interface.d.ts +5 -5
- package/app/interfaces/draggable-list.interface.d.ts +7 -7
- package/app/interfaces/external-params.interface.d.ts +13 -13
- package/app/interfaces/index.d.ts +3 -3
- package/app/interfaces/listconfig.interface.d.ts +220 -220
- package/app/interfaces/pagination.interface.d.ts +13 -13
- package/app/models/column.model.d.ts +48 -46
- package/app/models/row/base-row.d.ts +13 -13
- package/app/models/row/child-row.d.ts +12 -12
- package/app/models/row/group-row.d.ts +14 -14
- package/app/models/row/simple-row.d.ts +5 -5
- package/app/models/row-action.model.d.ts +29 -29
- package/app/models/row.d.ts +28 -28
- package/app/models/styleConfig.model.d.ts +31 -31
- package/app/services/group-expand-notifier.service.d.ts +8 -8
- package/bundles/firestitch-list.umd.js +5832 -5783
- package/bundles/firestitch-list.umd.js.map +1 -1
- package/bundles/firestitch-list.umd.min.js +1 -1
- package/bundles/firestitch-list.umd.min.js.map +1 -1
- package/esm2015/app/classes/actions-controller.js +55 -55
- package/esm2015/app/classes/columns-controller.js +185 -185
- package/esm2015/app/classes/data-controller.js +318 -311
- package/esm2015/app/classes/external-params-controller.js +155 -155
- package/esm2015/app/classes/index.js +3 -3
- package/esm2015/app/classes/list-controller.js +730 -730
- package/esm2015/app/classes/pagination-controller.js +461 -461
- package/esm2015/app/classes/persistance-controller.js +22 -22
- package/esm2015/app/classes/reorder-controller.js +161 -161
- package/esm2015/app/classes/selection-controller.js +444 -444
- package/esm2015/app/classes/sorting-controller.js +177 -167
- package/esm2015/app/components/body/body.component.js +103 -103
- package/esm2015/app/components/body/row/actions/actions.component.js +110 -110
- package/esm2015/app/components/body/row/cell/cell.component.js +93 -93
- package/esm2015/app/components/body/row/inline-action/inline-action.component.js +34 -34
- package/esm2015/app/components/body/row/row.component.js +267 -267
- package/esm2015/app/components/customize-cols/customize-cols.component.js +67 -67
- package/esm2015/app/components/footer/footer-row/footer-cell/footer-cell.component.js +27 -18
- package/esm2015/app/components/footer/footer-row/footer-row.component.js +39 -35
- package/esm2015/app/components/footer/footer.component.js +34 -30
- package/esm2015/app/components/head/head-cell/head-cell.component.js +35 -35
- package/esm2015/app/components/head/head.component.js +99 -99
- package/esm2015/app/components/list/list.component.js +357 -357
- package/esm2015/app/components/loader/loader.component.js +46 -46
- package/esm2015/app/components/manage-saved-filters/manage-saved-filters.component.js +75 -75
- package/esm2015/app/components/pagination/pagination.component.js +44 -44
- package/esm2015/app/components/saved-filters/saved-filters.component.js +36 -36
- package/esm2015/app/components/status/status.component.js +77 -77
- package/esm2015/app/directives/cell/cell.directive.js +21 -21
- package/esm2015/app/directives/column/column.directive.js +97 -93
- package/esm2015/app/directives/draggable-list/draggable-list.directive.js +264 -264
- package/esm2015/app/directives/draggable-row/draggable-row.directive.js +81 -81
- package/esm2015/app/directives/empty-state/empty-state.directive.js +11 -11
- package/esm2015/app/directives/footer/footer.directive.js +21 -21
- package/esm2015/app/directives/group-cell/group-cell.directive.js +12 -12
- package/esm2015/app/directives/group-expand-trigger/group-expand-trigger.directive.js +32 -32
- package/esm2015/app/directives/header/header.directive.js +21 -21
- package/esm2015/app/enums/button-type.enum.js +9 -9
- package/esm2015/app/enums/page-change-type.enum.js +6 -6
- package/esm2015/app/enums/pagination-strategy.enum.js +7 -7
- package/esm2015/app/enums/row-type.enum.js +7 -7
- package/esm2015/app/enums/state.enum.js +11 -11
- package/esm2015/app/fs-list.module.js +140 -140
- package/esm2015/app/fs-list.providers.js +4 -4
- package/esm2015/app/interfaces/cellconfig.interface.js +1 -1
- package/esm2015/app/interfaces/draggable-list.interface.js +1 -1
- package/esm2015/app/interfaces/external-params.interface.js +1 -1
- package/esm2015/app/interfaces/index.js +1 -1
- package/esm2015/app/interfaces/listconfig.interface.js +1 -1
- package/esm2015/app/interfaces/pagination.interface.js +1 -1
- package/esm2015/app/models/column.model.js +185 -175
- package/esm2015/app/models/row/base-row.js +23 -23
- package/esm2015/app/models/row/child-row.js +28 -28
- package/esm2015/app/models/row/group-row.js +41 -41
- package/esm2015/app/models/row/simple-row.js +10 -10
- package/esm2015/app/models/row-action.model.js +115 -115
- package/esm2015/app/models/row.js +77 -77
- package/esm2015/app/models/styleConfig.model.js +86 -86
- package/esm2015/app/services/group-expand-notifier.service.js +25 -25
- package/esm2015/firestitch-list.js +17 -17
- package/esm2015/public_api.js +40 -40
- package/esm5/app/classes/actions-controller.js +71 -71
- package/esm5/app/classes/columns-controller.js +236 -236
- package/esm5/app/classes/data-controller.js +374 -365
- package/esm5/app/classes/external-params-controller.js +185 -185
- package/esm5/app/classes/index.js +3 -3
- package/esm5/app/classes/list-controller.js +749 -749
- package/esm5/app/classes/pagination-controller.js +568 -568
- package/esm5/app/classes/persistance-controller.js +25 -25
- package/esm5/app/classes/reorder-controller.js +195 -195
- package/esm5/app/classes/selection-controller.js +465 -465
- package/esm5/app/classes/sorting-controller.js +204 -194
- package/esm5/app/components/body/body.component.js +104 -104
- package/esm5/app/components/body/row/actions/actions.component.js +113 -113
- package/esm5/app/components/body/row/cell/cell.component.js +95 -95
- package/esm5/app/components/body/row/inline-action/inline-action.component.js +35 -35
- package/esm5/app/components/body/row/row.component.js +295 -295
- package/esm5/app/components/customize-cols/customize-cols.component.js +69 -69
- package/esm5/app/components/footer/footer-row/footer-cell/footer-cell.component.js +29 -20
- package/esm5/app/components/footer/footer-row/footer-row.component.js +42 -38
- package/esm5/app/components/footer/footer.component.js +35 -31
- package/esm5/app/components/head/head-cell/head-cell.component.js +38 -38
- package/esm5/app/components/head/head.component.js +106 -106
- package/esm5/app/components/list/list.component.js +391 -391
- package/esm5/app/components/loader/loader.component.js +47 -47
- package/esm5/app/components/manage-saved-filters/manage-saved-filters.component.js +81 -81
- package/esm5/app/components/pagination/pagination.component.js +46 -46
- package/esm5/app/components/saved-filters/saved-filters.component.js +41 -41
- package/esm5/app/components/status/status.component.js +79 -79
- package/esm5/app/directives/cell/cell.directive.js +24 -24
- package/esm5/app/directives/column/column.directive.js +98 -94
- package/esm5/app/directives/draggable-list/draggable-list.directive.js +281 -281
- package/esm5/app/directives/draggable-row/draggable-row.directive.js +83 -83
- package/esm5/app/directives/empty-state/empty-state.directive.js +14 -14
- package/esm5/app/directives/footer/footer.directive.js +24 -24
- package/esm5/app/directives/group-cell/group-cell.directive.js +17 -17
- package/esm5/app/directives/group-expand-trigger/group-expand-trigger.directive.js +33 -33
- package/esm5/app/directives/header/header.directive.js +24 -24
- package/esm5/app/enums/button-type.enum.js +9 -9
- package/esm5/app/enums/page-change-type.enum.js +6 -6
- package/esm5/app/enums/pagination-strategy.enum.js +7 -7
- package/esm5/app/enums/row-type.enum.js +7 -7
- package/esm5/app/enums/state.enum.js +11 -11
- package/esm5/app/fs-list.module.js +145 -145
- package/esm5/app/fs-list.providers.js +4 -4
- package/esm5/app/interfaces/cellconfig.interface.js +1 -1
- package/esm5/app/interfaces/draggable-list.interface.js +1 -1
- package/esm5/app/interfaces/external-params.interface.js +1 -1
- package/esm5/app/interfaces/index.js +1 -1
- package/esm5/app/interfaces/listconfig.interface.js +1 -1
- package/esm5/app/interfaces/pagination.interface.js +1 -1
- package/esm5/app/models/column.model.js +204 -194
- package/esm5/app/models/row/base-row.js +35 -35
- package/esm5/app/models/row/child-row.js +43 -43
- package/esm5/app/models/row/group-row.js +61 -61
- package/esm5/app/models/row/simple-row.js +15 -15
- package/esm5/app/models/row-action.model.js +126 -126
- package/esm5/app/models/row.js +126 -126
- package/esm5/app/models/styleConfig.model.js +91 -91
- package/esm5/app/services/group-expand-notifier.service.js +30 -30
- package/esm5/firestitch-list.js +17 -17
- package/esm5/public_api.js +40 -40
- package/fesm2015/firestitch-list.js +5188 -5141
- package/fesm2015/firestitch-list.js.map +1 -1
- package/fesm5/firestitch-list.js +5817 -5768
- package/fesm5/firestitch-list.js.map +1 -1
- package/firestitch-list.d.ts +18 -18
- package/firestitch-list.metadata.json +1 -1
- package/package.json +1 -1
- package/public_api.d.ts +33 -33
|
@@ -1,104 +1,104 @@
|
|
|
1
|
-
import { __decorate, __metadata } from "tslib";
|
|
2
|
-
import { ChangeDetectionStrategy, ChangeDetectorRef, Component, ContentChild, DoCheck, ElementRef, EventEmitter, Input, IterableDiffer, IterableDiffers, OnDestroy, TemplateRef, ViewChild, ViewContainerRef, } from '@angular/core';
|
|
3
|
-
import { Subject } from 'rxjs';
|
|
4
|
-
import { ReorderController } from '../../classes/reorder-controller';
|
|
5
|
-
import { SelectionController } from '../../classes/selection-controller';
|
|
6
|
-
import { FsRowComponent } from './row/row.component';
|
|
7
|
-
var FsBodyComponent = /** @class */ (function () {
|
|
8
|
-
function FsBodyComponent(reorderContoller, el, cdRef, differs) {
|
|
9
|
-
this.reorderContoller = reorderContoller;
|
|
10
|
-
this.el = el;
|
|
11
|
-
this.cdRef = cdRef;
|
|
12
|
-
this.differs = differs;
|
|
13
|
-
this.columns = [];
|
|
14
|
-
this.hasFooter = false;
|
|
15
|
-
this.rowActionsRaw = [];
|
|
16
|
-
this.groupActionsRaw = [];
|
|
17
|
-
this.rowEvents = {};
|
|
18
|
-
this.hasRowActions = false;
|
|
19
|
-
this.restoreMode = false;
|
|
20
|
-
this._destroy$ = new Subject();
|
|
21
|
-
this._rowsDiffer = differs.find([]).create(null);
|
|
22
|
-
}
|
|
23
|
-
FsBodyComponent.prototype.ngDoCheck = function () {
|
|
24
|
-
if (this._rowsDiffer.diff(this.rows)) {
|
|
25
|
-
this.cdRef.markForCheck();
|
|
26
|
-
}
|
|
27
|
-
};
|
|
28
|
-
FsBodyComponent.prototype.ngOnDestroy = function () {
|
|
29
|
-
this._destroy$.next();
|
|
30
|
-
this._destroy$.complete();
|
|
31
|
-
};
|
|
32
|
-
FsBodyComponent.ctorParameters = function () { return [
|
|
33
|
-
{ type: ReorderController },
|
|
34
|
-
{ type: ElementRef },
|
|
35
|
-
{ type: ChangeDetectorRef },
|
|
36
|
-
{ type: IterableDiffers }
|
|
37
|
-
]; };
|
|
38
|
-
__decorate([
|
|
39
|
-
Input(),
|
|
40
|
-
__metadata("design:type", Array)
|
|
41
|
-
], FsBodyComponent.prototype, "rows", void 0);
|
|
42
|
-
__decorate([
|
|
43
|
-
Input(),
|
|
44
|
-
__metadata("design:type", Array)
|
|
45
|
-
], FsBodyComponent.prototype, "columns", void 0);
|
|
46
|
-
__decorate([
|
|
47
|
-
Input(),
|
|
48
|
-
__metadata("design:type", Object)
|
|
49
|
-
], FsBodyComponent.prototype, "hasFooter", void 0);
|
|
50
|
-
__decorate([
|
|
51
|
-
Input(),
|
|
52
|
-
__metadata("design:type", Array)
|
|
53
|
-
], FsBodyComponent.prototype, "rowActionsRaw", void 0);
|
|
54
|
-
__decorate([
|
|
55
|
-
Input(),
|
|
56
|
-
__metadata("design:type", Array)
|
|
57
|
-
], FsBodyComponent.prototype, "groupActionsRaw", void 0);
|
|
58
|
-
__decorate([
|
|
59
|
-
Input(),
|
|
60
|
-
__metadata("design:type", Object)
|
|
61
|
-
], FsBodyComponent.prototype, "rowEvents", void 0);
|
|
62
|
-
__decorate([
|
|
63
|
-
Input(),
|
|
64
|
-
__metadata("design:type", Object)
|
|
65
|
-
], FsBodyComponent.prototype, "rowClass", void 0);
|
|
66
|
-
__decorate([
|
|
67
|
-
Input(),
|
|
68
|
-
__metadata("design:type", Object)
|
|
69
|
-
], FsBodyComponent.prototype, "hasRowActions", void 0);
|
|
70
|
-
__decorate([
|
|
71
|
-
Input(),
|
|
72
|
-
__metadata("design:type", SelectionController)
|
|
73
|
-
], FsBodyComponent.prototype, "selection", void 0);
|
|
74
|
-
__decorate([
|
|
75
|
-
Input(),
|
|
76
|
-
__metadata("design:type", Object)
|
|
77
|
-
], FsBodyComponent.prototype, "restoreMode", void 0);
|
|
78
|
-
__decorate([
|
|
79
|
-
Input(),
|
|
80
|
-
__metadata("design:type", EventEmitter)
|
|
81
|
-
], FsBodyComponent.prototype, "rowRemoved", void 0);
|
|
82
|
-
__decorate([
|
|
83
|
-
ViewChild('rowsContainer', { read: ViewContainerRef, static: true }),
|
|
84
|
-
__metadata("design:type", Object)
|
|
85
|
-
], FsBodyComponent.prototype, "rowsContainer", void 0);
|
|
86
|
-
__decorate([
|
|
87
|
-
ContentChild(FsRowComponent, { read: TemplateRef, static: true }),
|
|
88
|
-
__metadata("design:type", TemplateRef)
|
|
89
|
-
], FsBodyComponent.prototype, "headerTemplate", void 0);
|
|
90
|
-
FsBodyComponent = __decorate([
|
|
91
|
-
Component({
|
|
92
|
-
selector: '[fs-list-body]',
|
|
93
|
-
template: "<ng-container *ngFor=\"let row of rows; let i = index;\">\
|
|
94
|
-
changeDetection: ChangeDetectionStrategy.OnPush
|
|
95
|
-
}),
|
|
96
|
-
__metadata("design:paramtypes", [ReorderController,
|
|
97
|
-
ElementRef,
|
|
98
|
-
ChangeDetectorRef,
|
|
99
|
-
IterableDiffers])
|
|
100
|
-
], FsBodyComponent);
|
|
101
|
-
return FsBodyComponent;
|
|
102
|
-
}());
|
|
103
|
-
export { FsBodyComponent };
|
|
104
|
-
//# sourceMappingURL=data:application/json;base64,
|
|
1
|
+
import { __decorate, __metadata } from "tslib";
|
|
2
|
+
import { ChangeDetectionStrategy, ChangeDetectorRef, Component, ContentChild, DoCheck, ElementRef, EventEmitter, Input, IterableDiffer, IterableDiffers, OnDestroy, TemplateRef, ViewChild, ViewContainerRef, } from '@angular/core';
|
|
3
|
+
import { Subject } from 'rxjs';
|
|
4
|
+
import { ReorderController } from '../../classes/reorder-controller';
|
|
5
|
+
import { SelectionController } from '../../classes/selection-controller';
|
|
6
|
+
import { FsRowComponent } from './row/row.component';
|
|
7
|
+
var FsBodyComponent = /** @class */ (function () {
|
|
8
|
+
function FsBodyComponent(reorderContoller, el, cdRef, differs) {
|
|
9
|
+
this.reorderContoller = reorderContoller;
|
|
10
|
+
this.el = el;
|
|
11
|
+
this.cdRef = cdRef;
|
|
12
|
+
this.differs = differs;
|
|
13
|
+
this.columns = [];
|
|
14
|
+
this.hasFooter = false;
|
|
15
|
+
this.rowActionsRaw = [];
|
|
16
|
+
this.groupActionsRaw = [];
|
|
17
|
+
this.rowEvents = {};
|
|
18
|
+
this.hasRowActions = false;
|
|
19
|
+
this.restoreMode = false;
|
|
20
|
+
this._destroy$ = new Subject();
|
|
21
|
+
this._rowsDiffer = differs.find([]).create(null);
|
|
22
|
+
}
|
|
23
|
+
FsBodyComponent.prototype.ngDoCheck = function () {
|
|
24
|
+
if (this._rowsDiffer.diff(this.rows)) {
|
|
25
|
+
this.cdRef.markForCheck();
|
|
26
|
+
}
|
|
27
|
+
};
|
|
28
|
+
FsBodyComponent.prototype.ngOnDestroy = function () {
|
|
29
|
+
this._destroy$.next();
|
|
30
|
+
this._destroy$.complete();
|
|
31
|
+
};
|
|
32
|
+
FsBodyComponent.ctorParameters = function () { return [
|
|
33
|
+
{ type: ReorderController },
|
|
34
|
+
{ type: ElementRef },
|
|
35
|
+
{ type: ChangeDetectorRef },
|
|
36
|
+
{ type: IterableDiffers }
|
|
37
|
+
]; };
|
|
38
|
+
__decorate([
|
|
39
|
+
Input(),
|
|
40
|
+
__metadata("design:type", Array)
|
|
41
|
+
], FsBodyComponent.prototype, "rows", void 0);
|
|
42
|
+
__decorate([
|
|
43
|
+
Input(),
|
|
44
|
+
__metadata("design:type", Array)
|
|
45
|
+
], FsBodyComponent.prototype, "columns", void 0);
|
|
46
|
+
__decorate([
|
|
47
|
+
Input(),
|
|
48
|
+
__metadata("design:type", Object)
|
|
49
|
+
], FsBodyComponent.prototype, "hasFooter", void 0);
|
|
50
|
+
__decorate([
|
|
51
|
+
Input(),
|
|
52
|
+
__metadata("design:type", Array)
|
|
53
|
+
], FsBodyComponent.prototype, "rowActionsRaw", void 0);
|
|
54
|
+
__decorate([
|
|
55
|
+
Input(),
|
|
56
|
+
__metadata("design:type", Array)
|
|
57
|
+
], FsBodyComponent.prototype, "groupActionsRaw", void 0);
|
|
58
|
+
__decorate([
|
|
59
|
+
Input(),
|
|
60
|
+
__metadata("design:type", Object)
|
|
61
|
+
], FsBodyComponent.prototype, "rowEvents", void 0);
|
|
62
|
+
__decorate([
|
|
63
|
+
Input(),
|
|
64
|
+
__metadata("design:type", Object)
|
|
65
|
+
], FsBodyComponent.prototype, "rowClass", void 0);
|
|
66
|
+
__decorate([
|
|
67
|
+
Input(),
|
|
68
|
+
__metadata("design:type", Object)
|
|
69
|
+
], FsBodyComponent.prototype, "hasRowActions", void 0);
|
|
70
|
+
__decorate([
|
|
71
|
+
Input(),
|
|
72
|
+
__metadata("design:type", SelectionController)
|
|
73
|
+
], FsBodyComponent.prototype, "selection", void 0);
|
|
74
|
+
__decorate([
|
|
75
|
+
Input(),
|
|
76
|
+
__metadata("design:type", Object)
|
|
77
|
+
], FsBodyComponent.prototype, "restoreMode", void 0);
|
|
78
|
+
__decorate([
|
|
79
|
+
Input(),
|
|
80
|
+
__metadata("design:type", EventEmitter)
|
|
81
|
+
], FsBodyComponent.prototype, "rowRemoved", void 0);
|
|
82
|
+
__decorate([
|
|
83
|
+
ViewChild('rowsContainer', { read: ViewContainerRef, static: true }),
|
|
84
|
+
__metadata("design:type", Object)
|
|
85
|
+
], FsBodyComponent.prototype, "rowsContainer", void 0);
|
|
86
|
+
__decorate([
|
|
87
|
+
ContentChild(FsRowComponent, { read: TemplateRef, static: true }),
|
|
88
|
+
__metadata("design:type", TemplateRef)
|
|
89
|
+
], FsBodyComponent.prototype, "headerTemplate", void 0);
|
|
90
|
+
FsBodyComponent = __decorate([
|
|
91
|
+
Component({
|
|
92
|
+
selector: '[fs-list-body]',
|
|
93
|
+
template: "<ng-container *ngFor=\"let row of rows; let i = index;\">\n <tr fs-list-row\n fsListDraggableRow\n [row]=\"row\"\n [rowIndex]=\"i\"\n [columns]=\"columns\"\n [rowActionsRaw]=\"rowActionsRaw\"\n [groupActionsRaw]=\"groupActionsRaw\"\n [hasRowActions]=\"hasRowActions\"\n [rowEvents]=\"rowEvents\"\n [rowClass]=\"rowClass\"\n [selection]=\"selection\"\n [restoreMode]=\"restoreMode\"\n [ngClass]=\"{ 'drag-row': reorderContoller.enabled }\"\n [rowRemoved]=\"rowRemoved\"\n #activeRow>\n </tr>\n</ng-container>\n",
|
|
94
|
+
changeDetection: ChangeDetectionStrategy.OnPush
|
|
95
|
+
}),
|
|
96
|
+
__metadata("design:paramtypes", [ReorderController,
|
|
97
|
+
ElementRef,
|
|
98
|
+
ChangeDetectorRef,
|
|
99
|
+
IterableDiffers])
|
|
100
|
+
], FsBodyComponent);
|
|
101
|
+
return FsBodyComponent;
|
|
102
|
+
}());
|
|
103
|
+
export { FsBodyComponent };
|
|
104
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiYm9keS5jb21wb25lbnQuanMiLCJzb3VyY2VSb290Ijoibmc6Ly9AZmlyZXN0aXRjaC9saXN0LyIsInNvdXJjZXMiOlsiYXBwL2NvbXBvbmVudHMvYm9keS9ib2R5LmNvbXBvbmVudC50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiO0FBQUEsT0FBTyxFQUNMLHVCQUF1QixFQUN2QixpQkFBaUIsRUFDakIsU0FBUyxFQUNULFlBQVksRUFDWixPQUFPLEVBQ1AsVUFBVSxFQUNWLFlBQVksRUFDWixLQUFLLEVBQ0wsY0FBYyxFQUNkLGVBQWUsRUFDZixTQUFTLEVBQ1QsV0FBVyxFQUNYLFNBQVMsRUFDVCxnQkFBZ0IsR0FDakIsTUFBTSxlQUFlLENBQUM7QUFFdkIsT0FBTyxFQUFFLE9BQU8sRUFBRSxNQUFNLE1BQU0sQ0FBQztBQUcvQixPQUFPLEVBQUUsaUJBQWlCLEVBQUU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xsZXIsXG4gICAgcHJpdmF0ZSBlbDogRWxlbWVudFJlZixcbiAgICBwcml2YXRlIGNkUmVmOiBDaGFuZ2VEZXRlY3RvclJlZixcbiAgICBwcml2YXRlIGRpZmZlcnM6IEl0ZXJhYmxlRGlmZmVycyxcbiAgKSB7XG4gICAgdGhpcy5fcm93c0RpZmZlciA9IGRpZmZlcnMuZmluZChbXSkuY3JlYXRlKG51bGwpO1xuICB9XG5cbiAgcHVibGljIG5nRG9DaGVjaygpIHtcbiAgICBpZiAodGhpcy5fcm93c0RpZmZlci5kaWZmKHRoaXMucm93cykpIHtcbiAgICAgIHRoaXMuY2RSZWYubWFya0ZvckNoZWNrKCk7XG4gICAgfVxuICB9XG5cbiAgcHVibGljIG5nT25EZXN0cm95KCkge1xuICAgIHRoaXMuX2Rlc3Ryb3kkLm5leHQoKTtcbiAgICB0aGlzLl9kZXN0cm95JC5jb21wbGV0ZSgpO1xuICB9XG5cbiAgLy8gLyoqXG4gIC8vICAqIFRyYWNrIEJ5IGZvciBpbXByb3ZlIGNoYW5nZSBkZXRlY3Rpb25cbiAgLy8gICogQHBhcmFtIGluZGV4XG4gIC8vICAqIEBwYXJhbSBpdGVtXG4gIC8vICAqL1xuICAvLyBwdWJsaWMgdHJhY2tCeUZuKGluZGV4LCBpdGVtKSB7XG4gIC8vICAgLy8gVE9ETyBpbXByb3ZlIHdpdGggdHJhY2sgYnkgaWRcbiAgLy8gICByZXR1cm4gaW5kZXg7XG4gIC8vIH1cbn1cbiJdfQ==
|
|
@@ -1,113 +1,113 @@
|
|
|
1
|
-
import { __decorate, __metadata } from "tslib";
|
|
2
|
-
import { ChangeDetectionStrategy, Component, EventEmitter, Input, } from '@angular/core';
|
|
3
|
-
import { Observable, Subject } from 'rxjs';
|
|
4
|
-
import { take, takeUntil } from 'rxjs/operators';
|
|
5
|
-
import { FsPrompt } from '@firestitch/prompt';
|
|
6
|
-
import { Row } from '../../../../models/row';
|
|
7
|
-
import { RowAction } from '../../../../models/row-action.model';
|
|
8
|
-
var FsRowActionsComponent = /** @class */ (function () {
|
|
9
|
-
function FsRowActionsComponent(_fsPrompt) {
|
|
10
|
-
this._fsPrompt = _fsPrompt;
|
|
11
|
-
this.restoreMode = false;
|
|
12
|
-
this.rowActions = [];
|
|
13
|
-
this.menuRowActions = [];
|
|
14
|
-
this.inlineRowActions = [];
|
|
15
|
-
this._destroy$ = new Subject();
|
|
16
|
-
}
|
|
17
|
-
FsRowActionsComponent.prototype.actionClick = function (action, row, event, menuRef) {
|
|
18
|
-
var _this = this;
|
|
19
|
-
if (action.remove) {
|
|
20
|
-
if (typeof action.remove === 'boolean') {
|
|
21
|
-
this.removeAction(action, row.data, event, this.index);
|
|
22
|
-
}
|
|
23
|
-
else {
|
|
24
|
-
this._fsPrompt.confirm({
|
|
25
|
-
title: action.remove.title,
|
|
26
|
-
template: action.remove.template,
|
|
27
|
-
}).pipe(take(1), takeUntil(this._destroy$)).subscribe({
|
|
28
|
-
next: function () {
|
|
29
|
-
_this.removeAction(action, row.data, event, _this.index);
|
|
30
|
-
},
|
|
31
|
-
error: function () { },
|
|
32
|
-
});
|
|
33
|
-
}
|
|
34
|
-
}
|
|
35
|
-
else {
|
|
36
|
-
action.click(row.data, event, this.index, menuRef);
|
|
37
|
-
}
|
|
38
|
-
};
|
|
39
|
-
/**
|
|
40
|
-
* Track By for improve change detection
|
|
41
|
-
* @param index
|
|
42
|
-
*/
|
|
43
|
-
FsRowActionsComponent.prototype.trackByFn = function (index) {
|
|
44
|
-
return index;
|
|
45
|
-
};
|
|
46
|
-
FsRowActionsComponent.prototype.clickOnTrigger = function (event) {
|
|
47
|
-
event.stopPropagation();
|
|
48
|
-
};
|
|
49
|
-
/**
|
|
50
|
-
* Emit that some row must be removed
|
|
51
|
-
* @param action
|
|
52
|
-
* @param row
|
|
53
|
-
* @param event
|
|
54
|
-
* @param index
|
|
55
|
-
*/
|
|
56
|
-
FsRowActionsComponent.prototype.removeAction = function (action, row, event, index) {
|
|
57
|
-
var _this = this;
|
|
58
|
-
var removeObservable = action.click(row, event, index);
|
|
59
|
-
if (removeObservable && removeObservable instanceof Observable) {
|
|
60
|
-
removeObservable
|
|
61
|
-
.pipe(take(1), takeUntil(this._destroy$))
|
|
62
|
-
.subscribe(function () {
|
|
63
|
-
_this.rowRemoved.emit(row);
|
|
64
|
-
});
|
|
65
|
-
}
|
|
66
|
-
};
|
|
67
|
-
FsRowActionsComponent.ctorParameters = function () { return [
|
|
68
|
-
{ type: FsPrompt }
|
|
69
|
-
]; };
|
|
70
|
-
__decorate([
|
|
71
|
-
Input(),
|
|
72
|
-
__metadata("design:type", Row)
|
|
73
|
-
], FsRowActionsComponent.prototype, "row", void 0);
|
|
74
|
-
__decorate([
|
|
75
|
-
Input(),
|
|
76
|
-
__metadata("design:type", Number)
|
|
77
|
-
], FsRowActionsComponent.prototype, "index", void 0);
|
|
78
|
-
__decorate([
|
|
79
|
-
Input(),
|
|
80
|
-
__metadata("design:type", Object)
|
|
81
|
-
], FsRowActionsComponent.prototype, "restoreMode", void 0);
|
|
82
|
-
__decorate([
|
|
83
|
-
Input(),
|
|
84
|
-
__metadata("design:type", Array)
|
|
85
|
-
], FsRowActionsComponent.prototype, "rowActions", void 0);
|
|
86
|
-
__decorate([
|
|
87
|
-
Input(),
|
|
88
|
-
__metadata("design:type", EventEmitter)
|
|
89
|
-
], FsRowActionsComponent.prototype, "rowRemoved", void 0);
|
|
90
|
-
__decorate([
|
|
91
|
-
Input(),
|
|
92
|
-
__metadata("design:type", Array)
|
|
93
|
-
], FsRowActionsComponent.prototype, "menuRowActions", void 0);
|
|
94
|
-
__decorate([
|
|
95
|
-
Input(),
|
|
96
|
-
__metadata("design:type", Array)
|
|
97
|
-
], FsRowActionsComponent.prototype, "inlineRowActions", void 0);
|
|
98
|
-
__decorate([
|
|
99
|
-
Input(),
|
|
100
|
-
__metadata("design:type", RowAction)
|
|
101
|
-
], FsRowActionsComponent.prototype, "restoreAction", void 0);
|
|
102
|
-
FsRowActionsComponent = __decorate([
|
|
103
|
-
Component({
|
|
104
|
-
selector: 'fs-list-row-actions',
|
|
105
|
-
template: "<ng-container *ngIf=\"!restoreMode || (restoreMode && !restoreAction)\">\
|
|
106
|
-
changeDetection: ChangeDetectionStrategy.OnPush
|
|
107
|
-
}),
|
|
108
|
-
__metadata("design:paramtypes", [FsPrompt])
|
|
109
|
-
], FsRowActionsComponent);
|
|
110
|
-
return FsRowActionsComponent;
|
|
111
|
-
}());
|
|
112
|
-
export { FsRowActionsComponent };
|
|
113
|
-
//# sourceMappingURL=data:application/json;base64,
|
|
1
|
+
import { __decorate, __metadata } from "tslib";
|
|
2
|
+
import { ChangeDetectionStrategy, Component, EventEmitter, Input, } from '@angular/core';
|
|
3
|
+
import { Observable, Subject } from 'rxjs';
|
|
4
|
+
import { take, takeUntil } from 'rxjs/operators';
|
|
5
|
+
import { FsPrompt } from '@firestitch/prompt';
|
|
6
|
+
import { Row } from '../../../../models/row';
|
|
7
|
+
import { RowAction } from '../../../../models/row-action.model';
|
|
8
|
+
var FsRowActionsComponent = /** @class */ (function () {
|
|
9
|
+
function FsRowActionsComponent(_fsPrompt) {
|
|
10
|
+
this._fsPrompt = _fsPrompt;
|
|
11
|
+
this.restoreMode = false;
|
|
12
|
+
this.rowActions = [];
|
|
13
|
+
this.menuRowActions = [];
|
|
14
|
+
this.inlineRowActions = [];
|
|
15
|
+
this._destroy$ = new Subject();
|
|
16
|
+
}
|
|
17
|
+
FsRowActionsComponent.prototype.actionClick = function (action, row, event, menuRef) {
|
|
18
|
+
var _this = this;
|
|
19
|
+
if (action.remove) {
|
|
20
|
+
if (typeof action.remove === 'boolean') {
|
|
21
|
+
this.removeAction(action, row.data, event, this.index);
|
|
22
|
+
}
|
|
23
|
+
else {
|
|
24
|
+
this._fsPrompt.confirm({
|
|
25
|
+
title: action.remove.title,
|
|
26
|
+
template: action.remove.template,
|
|
27
|
+
}).pipe(take(1), takeUntil(this._destroy$)).subscribe({
|
|
28
|
+
next: function () {
|
|
29
|
+
_this.removeAction(action, row.data, event, _this.index);
|
|
30
|
+
},
|
|
31
|
+
error: function () { },
|
|
32
|
+
});
|
|
33
|
+
}
|
|
34
|
+
}
|
|
35
|
+
else {
|
|
36
|
+
action.click(row.data, event, this.index, menuRef);
|
|
37
|
+
}
|
|
38
|
+
};
|
|
39
|
+
/**
|
|
40
|
+
* Track By for improve change detection
|
|
41
|
+
* @param index
|
|
42
|
+
*/
|
|
43
|
+
FsRowActionsComponent.prototype.trackByFn = function (index) {
|
|
44
|
+
return index;
|
|
45
|
+
};
|
|
46
|
+
FsRowActionsComponent.prototype.clickOnTrigger = function (event) {
|
|
47
|
+
event.stopPropagation();
|
|
48
|
+
};
|
|
49
|
+
/**
|
|
50
|
+
* Emit that some row must be removed
|
|
51
|
+
* @param action
|
|
52
|
+
* @param row
|
|
53
|
+
* @param event
|
|
54
|
+
* @param index
|
|
55
|
+
*/
|
|
56
|
+
FsRowActionsComponent.prototype.removeAction = function (action, row, event, index) {
|
|
57
|
+
var _this = this;
|
|
58
|
+
var removeObservable = action.click(row, event, index);
|
|
59
|
+
if (removeObservable && removeObservable instanceof Observable) {
|
|
60
|
+
removeObservable
|
|
61
|
+
.pipe(take(1), takeUntil(this._destroy$))
|
|
62
|
+
.subscribe(function () {
|
|
63
|
+
_this.rowRemoved.emit(row);
|
|
64
|
+
});
|
|
65
|
+
}
|
|
66
|
+
};
|
|
67
|
+
FsRowActionsComponent.ctorParameters = function () { return [
|
|
68
|
+
{ type: FsPrompt }
|
|
69
|
+
]; };
|
|
70
|
+
__decorate([
|
|
71
|
+
Input(),
|
|
72
|
+
__metadata("design:type", Row)
|
|
73
|
+
], FsRowActionsComponent.prototype, "row", void 0);
|
|
74
|
+
__decorate([
|
|
75
|
+
Input(),
|
|
76
|
+
__metadata("design:type", Number)
|
|
77
|
+
], FsRowActionsComponent.prototype, "index", void 0);
|
|
78
|
+
__decorate([
|
|
79
|
+
Input(),
|
|
80
|
+
__metadata("design:type", Object)
|
|
81
|
+
], FsRowActionsComponent.prototype, "restoreMode", void 0);
|
|
82
|
+
__decorate([
|
|
83
|
+
Input(),
|
|
84
|
+
__metadata("design:type", Array)
|
|
85
|
+
], FsRowActionsComponent.prototype, "rowActions", void 0);
|
|
86
|
+
__decorate([
|
|
87
|
+
Input(),
|
|
88
|
+
__metadata("design:type", EventEmitter)
|
|
89
|
+
], FsRowActionsComponent.prototype, "rowRemoved", void 0);
|
|
90
|
+
__decorate([
|
|
91
|
+
Input(),
|
|
92
|
+
__metadata("design:type", Array)
|
|
93
|
+
], FsRowActionsComponent.prototype, "menuRowActions", void 0);
|
|
94
|
+
__decorate([
|
|
95
|
+
Input(),
|
|
96
|
+
__metadata("design:type", Array)
|
|
97
|
+
], FsRowActionsComponent.prototype, "inlineRowActions", void 0);
|
|
98
|
+
__decorate([
|
|
99
|
+
Input(),
|
|
100
|
+
__metadata("design:type", RowAction)
|
|
101
|
+
], FsRowActionsComponent.prototype, "restoreAction", void 0);
|
|
102
|
+
FsRowActionsComponent = __decorate([
|
|
103
|
+
Component({
|
|
104
|
+
selector: 'fs-list-row-actions',
|
|
105
|
+
template: "<ng-container *ngIf=\"!restoreMode || (restoreMode && !restoreAction)\">\n <ng-container *ngFor=\"let action of inlineRowActions; trackBy: trackByFn\">\n <fs-list-row-inline-action class=\"row-inline-action row-inline-action-{{action.type}}\"\n [action]=\"action\"\n [ngClass]=\"{'mobile-hide': action.menu === undefined}\"\n (clicked)=\"actionClick(action, row, $event)\">\n </fs-list-row-inline-action>\n </ng-container>\n</ng-container>\n\n<!-- Menu -->\n<fs-menu class=\"row-menu-action\"\n *ngIf=\"menuRowActions.length || (restoreMode && restoreAction)\"\n (click)=\"clickOnTrigger($event)\"\n #menuRef\n>\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 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 <mat-icon *ngIf=\"action.icon\">{{action.icon}}</mat-icon>\n {{action.label}}\n </ng-template>\n </ng-container>\n\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\">\n <ng-container *ngFor=\"let subAction of action.rowActions\">\n <ng-template fs-menu-item\n [link]=\"subAction.routerLink?.link\"\n [queryParams]=\"subAction.routerLink?.queryParams\"\n [target]=\"subAction.routerLink?.target\"\n [hidden]=\"!subAction.isShown\"\n (click)=\"actionClick(subAction, row, $event, menuRef);\">\n <mat-icon *ngIf=\"subAction.icon\">{{subAction.icon}}</mat-icon>\n {{subAction.label}}\n </ng-template>\n </ng-container>\n </fs-menu-group>\n </ng-container>\n <ng-template #simpleMenuItem>\n <ng-template fs-menu-item\n [link]=\"action.routerLink?.link\"\n [queryParams]=\"action.routerLink?.queryParams\"\n [target]=\"action.routerLink?.target\"\n [hidden]=\"!action.isShown\"\n (click)=\"actionClick(action, row, $event, menuRef);\">\n <mat-icon *ngIf=\"action.icon\">{{action.icon}}</mat-icon>\n {{action.label}}\n </ng-template>\n </ng-template>\n </ng-container>\n </ng-container>\n\n <!-- Case when we have restore mode enabled and must hide menu actions -->\n <ng-container *ngIf=\"restoreMode && restoreAction\">\n <ng-template fs-menu-item (click)=\"actionClick(restoreAction, row, $event, menuRef)\">\n <mat-icon *ngIf=\"restoreAction.icon\">{{restoreAction.icon}}</mat-icon>\n {{restoreAction.label}}\n </ng-template>\n </ng-container>\n</fs-menu>\n",
|
|
106
|
+
changeDetection: ChangeDetectionStrategy.OnPush
|
|
107
|
+
}),
|
|
108
|
+
__metadata("design:paramtypes", [FsPrompt])
|
|
109
|
+
], FsRowActionsComponent);
|
|
110
|
+
return FsRowActionsComponent;
|
|
111
|
+
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