@firestitch/list 13.0.6 → 13.1.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/list-controller.d.ts +10 -7
- package/app/components/list/list.component.d.ts +2 -2
- package/app/interfaces/listconfig.interface.d.ts +4 -2
- package/esm2020/app/classes/list-controller.mjs +46 -40
- package/esm2020/app/components/body/row/actions/actions.component.mjs +3 -3
- package/esm2020/app/components/list/list.component.mjs +9 -9
- package/esm2020/app/interfaces/listconfig.interface.mjs +1 -1
- package/fesm2015/firestitch-list.mjs +67 -60
- package/fesm2015/firestitch-list.mjs.map +1 -1
- package/fesm2020/firestitch-list.mjs +50 -43
- package/fesm2020/firestitch-list.mjs.map +1 -1
- package/package.json +1 -1
|
@@ -880,10 +880,10 @@ class FsRowActionsComponent {
|
|
|
880
880
|
}
|
|
881
881
|
}
|
|
882
882
|
FsRowActionsComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.4.0", ngImport: i0, type: FsRowActionsComponent, deps: [{ token: i1$1.FsPrompt }], target: i0.ɵɵFactoryTarget.Component });
|
|
883
|
-
FsRowActionsComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.4.0", 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
|
|
883
|
+
FsRowActionsComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.4.0", 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 [action]=\"action\"\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\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 [icon]=\"action.icon\"\n [label]=\"action.label\"\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\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 [icon]=\"subAction.icon\"\n [label]=\"subAction.label\"\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 [icon]=\"action.icon\"\n [label]=\"action.label\"\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\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 | actionLabel:row}}\n </ng-template>\n </ng-container>\n</fs-menu>\n", styles: [":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"], components: [{ type: FsRowInlineActionComponent, selector: "fs-list-row-inline-action", inputs: ["action"], outputs: ["clicked", "fileSelect"] }, { type: i2$1.FsMenuComponent, selector: "fs-menu", inputs: ["class", "buttonClass", "buttonType", "buttonColor"], outputs: ["opened", "closed"] }, { type: FsRowMenuActionComponent, selector: "fs-list-row-menu-action", inputs: ["row", "icon", "label", "file"], outputs: ["fileSelect", "fileError"] }, { type: i2.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }], directives: [{ type: i3.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i3.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { type: i3.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { type: i2$1.FsMenuItemDirective, selector: "fs-menu-group,[fs-menu-item]" }], pipes: { "actionLabel": ActionLabelPipe }, changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
884
884
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.4.0", ngImport: i0, type: FsRowActionsComponent, decorators: [{
|
|
885
885
|
type: Component,
|
|
886
|
-
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
|
|
886
|
+
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 [action]=\"action\"\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\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 [icon]=\"action.icon\"\n [label]=\"action.label\"\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\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 [icon]=\"subAction.icon\"\n [label]=\"subAction.label\"\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 [icon]=\"action.icon\"\n [label]=\"action.label\"\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\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 | actionLabel:row}}\n </ng-template>\n </ng-container>\n</fs-menu>\n", styles: [":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"] }]
|
|
887
887
|
}], ctorParameters: function () { return [{ type: i1$1.FsPrompt }]; }, propDecorators: { row: [{
|
|
888
888
|
type: Input
|
|
889
889
|
}], index: [{
|
|
@@ -2039,6 +2039,23 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.4.0", ngImpor
|
|
|
2039
2039
|
args: ['rowsContainer', { read: ViewContainerRef, static: true }]
|
|
2040
2040
|
}] } });
|
|
2041
2041
|
|
|
2042
|
+
var PageChangeType;
|
|
2043
|
+
(function (PageChangeType) {
|
|
2044
|
+
PageChangeType[PageChangeType["Default"] = 0] = "Default";
|
|
2045
|
+
PageChangeType[PageChangeType["LimitChanged"] = 1] = "LimitChanged";
|
|
2046
|
+
})(PageChangeType || (PageChangeType = {}));
|
|
2047
|
+
|
|
2048
|
+
var FsListState;
|
|
2049
|
+
(function (FsListState) {
|
|
2050
|
+
FsListState[FsListState["Idle"] = 0] = "Idle";
|
|
2051
|
+
FsListState[FsListState["Load"] = 1] = "Load";
|
|
2052
|
+
FsListState[FsListState["Reload"] = 2] = "Reload";
|
|
2053
|
+
FsListState[FsListState["Filter"] = 3] = "Filter";
|
|
2054
|
+
FsListState[FsListState["Sort"] = 4] = "Sort";
|
|
2055
|
+
FsListState[FsListState["PageChange"] = 5] = "PageChange";
|
|
2056
|
+
FsListState[FsListState["LoadMore"] = 6] = "LoadMore";
|
|
2057
|
+
})(FsListState || (FsListState = {}));
|
|
2058
|
+
|
|
2042
2059
|
class StyleConfig {
|
|
2043
2060
|
constructor(config = {}) {
|
|
2044
2061
|
this.className = []; // Can't be used in tempaltes!
|
|
@@ -2277,23 +2294,6 @@ class Column {
|
|
|
2277
2294
|
}
|
|
2278
2295
|
}
|
|
2279
2296
|
|
|
2280
|
-
var PageChangeType;
|
|
2281
|
-
(function (PageChangeType) {
|
|
2282
|
-
PageChangeType[PageChangeType["Default"] = 0] = "Default";
|
|
2283
|
-
PageChangeType[PageChangeType["LimitChanged"] = 1] = "LimitChanged";
|
|
2284
|
-
})(PageChangeType || (PageChangeType = {}));
|
|
2285
|
-
|
|
2286
|
-
var FsListState;
|
|
2287
|
-
(function (FsListState) {
|
|
2288
|
-
FsListState[FsListState["Idle"] = 0] = "Idle";
|
|
2289
|
-
FsListState[FsListState["Load"] = 1] = "Load";
|
|
2290
|
-
FsListState[FsListState["Reload"] = 2] = "Reload";
|
|
2291
|
-
FsListState[FsListState["Filter"] = 3] = "Filter";
|
|
2292
|
-
FsListState[FsListState["Sort"] = 4] = "Sort";
|
|
2293
|
-
FsListState[FsListState["PageChange"] = 5] = "PageChange";
|
|
2294
|
-
FsListState[FsListState["LoadMore"] = 6] = "LoadMore";
|
|
2295
|
-
})(FsListState || (FsListState = {}));
|
|
2296
|
-
|
|
2297
2297
|
class ColumnsController {
|
|
2298
2298
|
constructor() {
|
|
2299
2299
|
this._visibleColumns$ = new BehaviorSubject([]);
|
|
@@ -4068,11 +4068,11 @@ class SortingController {
|
|
|
4068
4068
|
}
|
|
4069
4069
|
}
|
|
4070
4070
|
|
|
4071
|
-
const
|
|
4071
|
+
const showDeletedFilterKey = 'showDeleted';
|
|
4072
4072
|
class List {
|
|
4073
|
-
constructor(_el,
|
|
4073
|
+
constructor(_el, _config = {}, _fsScroll, _selectionDialog, _router, _route, _persistance, _inDialog) {
|
|
4074
4074
|
this._el = _el;
|
|
4075
|
-
this.
|
|
4075
|
+
this._config = _config;
|
|
4076
4076
|
this._fsScroll = _fsScroll;
|
|
4077
4077
|
this._selectionDialog = _selectionDialog;
|
|
4078
4078
|
this._router = _router;
|
|
@@ -4080,14 +4080,13 @@ class List {
|
|
|
4080
4080
|
this._persistance = _persistance;
|
|
4081
4081
|
this._inDialog = _inDialog;
|
|
4082
4082
|
this.filters = [];
|
|
4083
|
-
this.initialized$ = new BehaviorSubject(false);
|
|
4084
|
-
this.loading$ = new BehaviorSubject(false);
|
|
4085
4083
|
this.paging = new PaginationController();
|
|
4086
4084
|
this.columns = new ColumnsController();
|
|
4087
4085
|
this.actions = new ActionsController();
|
|
4088
4086
|
this.dataController = new DataController();
|
|
4089
4087
|
this.sorting = new SortingController();
|
|
4090
4088
|
this.filterConfig = null;
|
|
4089
|
+
this.loading$ = new BehaviorSubject(false);
|
|
4091
4090
|
this.fetchComplete$ = new Subject();
|
|
4092
4091
|
this.filtersReady$ = new Subject();
|
|
4093
4092
|
this.status = true;
|
|
@@ -4098,17 +4097,18 @@ class List {
|
|
|
4098
4097
|
this.initialFetch = true;
|
|
4099
4098
|
// Empty state
|
|
4100
4099
|
this.emptyStateEnabled = false;
|
|
4101
|
-
this.
|
|
4100
|
+
this._destroy$ = new Subject();
|
|
4101
|
+
this._initialized$ = new BehaviorSubject(false);
|
|
4102
4102
|
this._fetch$ = new Subject();
|
|
4103
4103
|
this._filtersQuery = new BehaviorSubject(null);
|
|
4104
4104
|
this._activeFiltersCount$ = this._filtersQuery
|
|
4105
4105
|
.pipe(map((v) => Object.keys(v).length), shareReplay());
|
|
4106
|
-
this._initialize(
|
|
4107
|
-
this._headerConfig = new StyleConfig(
|
|
4108
|
-
this._groupCellConfig = new StyleConfig(
|
|
4109
|
-
this._cellConfig = new StyleConfig(
|
|
4110
|
-
this._footerConfig = new StyleConfig(
|
|
4111
|
-
this.
|
|
4106
|
+
this._initialize(_config);
|
|
4107
|
+
this._headerConfig = new StyleConfig(_config.header);
|
|
4108
|
+
this._groupCellConfig = new StyleConfig(_config.cell);
|
|
4109
|
+
this._cellConfig = new StyleConfig(_config.cell);
|
|
4110
|
+
this._footerConfig = new StyleConfig(_config.footer);
|
|
4111
|
+
this._initialized$.next(true);
|
|
4112
4112
|
this.subscribe();
|
|
4113
4113
|
if (this.initialFetch) {
|
|
4114
4114
|
this.dataController.setOperation(FsListState.Load);
|
|
@@ -4127,6 +4127,12 @@ class List {
|
|
|
4127
4127
|
get activeFiltersCount$() {
|
|
4128
4128
|
return this._activeFiltersCount$;
|
|
4129
4129
|
}
|
|
4130
|
+
get destroy$() {
|
|
4131
|
+
return this._destroy$;
|
|
4132
|
+
}
|
|
4133
|
+
get initialized$() {
|
|
4134
|
+
return this._initialized$;
|
|
4135
|
+
}
|
|
4130
4136
|
fetchRemote(query) {
|
|
4131
4137
|
const options = {
|
|
4132
4138
|
state: this.dataController.operation,
|
|
@@ -4159,7 +4165,7 @@ class List {
|
|
|
4159
4165
|
this._updateSortingColumns();
|
|
4160
4166
|
// Default sort by
|
|
4161
4167
|
const externalSorting = this.externalParams.externalSorting;
|
|
4162
|
-
const initialSortConfig = externalSorting || this.
|
|
4168
|
+
const initialSortConfig = externalSorting || this._config.sort;
|
|
4163
4169
|
this.sorting.initialSortBy(initialSortConfig);
|
|
4164
4170
|
if (externalSorting && !this.sorting.isDefined) {
|
|
4165
4171
|
this.externalParams.clearSortingParams();
|
|
@@ -4185,7 +4191,7 @@ class List {
|
|
|
4185
4191
|
*/
|
|
4186
4192
|
subscribe() {
|
|
4187
4193
|
this.paging.pageChanged$
|
|
4188
|
-
.pipe(takeUntil(this.
|
|
4194
|
+
.pipe(takeUntil(this._destroy$))
|
|
4189
4195
|
.subscribe((event) => {
|
|
4190
4196
|
this.dataController.setOperation(FsListState.PageChange);
|
|
4191
4197
|
// Remove all rows if limits was changed
|
|
@@ -4207,12 +4213,12 @@ class List {
|
|
|
4207
4213
|
let el = this._el.nativeElement;
|
|
4208
4214
|
if (!contains) {
|
|
4209
4215
|
const rect = this._el.nativeElement.getBoundingClientRect();
|
|
4210
|
-
if ((rect.top + window.pageYOffset) < window.innerHeight) {
|
|
4216
|
+
if ((Number(rect.top || 0) + window.pageYOffset) < window.innerHeight) {
|
|
4211
4217
|
el = document.body;
|
|
4212
4218
|
}
|
|
4213
4219
|
}
|
|
4214
4220
|
this.fetchComplete$.asObservable()
|
|
4215
|
-
.pipe(take(1), takeUntil(this.
|
|
4221
|
+
.pipe(take(1), takeUntil(this._destroy$))
|
|
4216
4222
|
.subscribe((event) => {
|
|
4217
4223
|
var _a;
|
|
4218
4224
|
if ((_a = event === null || event === void 0 ? void 0 : event.scrollIntoView) !== null && _a !== void 0 ? _a : true) {
|
|
@@ -4223,7 +4229,7 @@ class List {
|
|
|
4223
4229
|
this._fetch$.next();
|
|
4224
4230
|
});
|
|
4225
4231
|
this.sorting.sortingChanged$
|
|
4226
|
-
.pipe(takeUntil(this.
|
|
4232
|
+
.pipe(takeUntil(this._destroy$))
|
|
4227
4233
|
.subscribe(() => {
|
|
4228
4234
|
this.dataController.setOperation(FsListState.Sort);
|
|
4229
4235
|
this.paging.page = 1;
|
|
@@ -4287,8 +4293,8 @@ class List {
|
|
|
4287
4293
|
this.externalParams.destroy();
|
|
4288
4294
|
}
|
|
4289
4295
|
this.columns.destroy();
|
|
4290
|
-
this.
|
|
4291
|
-
this.
|
|
4296
|
+
this._destroy$.next();
|
|
4297
|
+
this._destroy$.complete();
|
|
4292
4298
|
this.dataController.destroy();
|
|
4293
4299
|
}
|
|
4294
4300
|
/**
|
|
@@ -4310,7 +4316,7 @@ class List {
|
|
|
4310
4316
|
_initVariables(config) {
|
|
4311
4317
|
var _a, _b;
|
|
4312
4318
|
this.autoFocus = config.autoFocus;
|
|
4313
|
-
this.
|
|
4319
|
+
this.rowHoverHighlight = (_a = config.rowHoverHighlight) !== null && _a !== void 0 ? _a : true;
|
|
4314
4320
|
this.heading = config.heading;
|
|
4315
4321
|
this.trackBy = config.trackBy;
|
|
4316
4322
|
this.subheading = config.subheading;
|
|
@@ -4331,6 +4337,7 @@ class List {
|
|
|
4331
4337
|
this.beforeFetchFn = config.beforeFetch;
|
|
4332
4338
|
this.afterInit = config.afterInit;
|
|
4333
4339
|
this.style = config.style;
|
|
4340
|
+
this.autoReload = config.autoReload;
|
|
4334
4341
|
this.columns.initConfig(config.column);
|
|
4335
4342
|
}
|
|
4336
4343
|
/**
|
|
@@ -4357,7 +4364,7 @@ class List {
|
|
|
4357
4364
|
this.queryParam = false;
|
|
4358
4365
|
}
|
|
4359
4366
|
else {
|
|
4360
|
-
this.queryParam = (config.queryParam ===
|
|
4367
|
+
this.queryParam = (config.queryParam === undefined)
|
|
4361
4368
|
? true
|
|
4362
4369
|
: config.queryParam;
|
|
4363
4370
|
}
|
|
@@ -4395,7 +4402,7 @@ class List {
|
|
|
4395
4402
|
}
|
|
4396
4403
|
if (this.restore.filter !== false) {
|
|
4397
4404
|
this.filters.push({
|
|
4398
|
-
name:
|
|
4405
|
+
name: showDeletedFilterKey,
|
|
4399
4406
|
type: ItemType.Checkbox,
|
|
4400
4407
|
label: this.restore.filterLabel || 'Show Deleted',
|
|
4401
4408
|
});
|
|
@@ -4449,7 +4456,7 @@ class List {
|
|
|
4449
4456
|
_listenFetch() {
|
|
4450
4457
|
let fetch$ = this.fetch$;
|
|
4451
4458
|
// Should wait until saved filters not loaded
|
|
4452
|
-
if (
|
|
4459
|
+
if (this.filters) {
|
|
4453
4460
|
fetch$ = combineLatest([fetch$, this.filtersReady$])
|
|
4454
4461
|
.pipe(map(([params]) => params));
|
|
4455
4462
|
}
|
|
@@ -4503,7 +4510,7 @@ class List {
|
|
|
4503
4510
|
}), catchError((error) => {
|
|
4504
4511
|
console.error(error);
|
|
4505
4512
|
return EMPTY;
|
|
4506
|
-
}), takeUntil(this.
|
|
4513
|
+
}), takeUntil(this._destroy$))
|
|
4507
4514
|
.subscribe(([paramsQuery, response]) => {
|
|
4508
4515
|
this.initialFetch = false;
|
|
4509
4516
|
this._completeFetch(paramsQuery.params, paramsQuery.query, response);
|
|
@@ -4511,7 +4518,7 @@ class List {
|
|
|
4511
4518
|
}
|
|
4512
4519
|
_listenRowsRemove() {
|
|
4513
4520
|
this.dataController.rowsRemoved$
|
|
4514
|
-
.pipe(takeUntil(this.
|
|
4521
|
+
.pipe(takeUntil(this._destroy$))
|
|
4515
4522
|
.subscribe((rows) => {
|
|
4516
4523
|
if (this.paging.enabled) {
|
|
4517
4524
|
const removedCount = rows.length;
|
|
@@ -4544,7 +4551,7 @@ class List {
|
|
|
4544
4551
|
*/
|
|
4545
4552
|
_listenVisibleColumnChanges() {
|
|
4546
4553
|
this.columns.visibleColumns$
|
|
4547
|
-
.pipe(takeUntil(this.
|
|
4554
|
+
.pipe(takeUntil(this._destroy$))
|
|
4548
4555
|
.subscribe(() => {
|
|
4549
4556
|
this._updateSortingColumns();
|
|
4550
4557
|
});
|
|
@@ -4555,12 +4562,12 @@ class List {
|
|
|
4555
4562
|
}
|
|
4556
4563
|
if (this.scrollable) {
|
|
4557
4564
|
// Scrollable status by default
|
|
4558
|
-
if (this.scrollable.status ===
|
|
4565
|
+
if (this.scrollable.status === undefined) {
|
|
4559
4566
|
this.scrollable.status = true;
|
|
4560
4567
|
}
|
|
4561
4568
|
this._fsScroll
|
|
4562
4569
|
.component(this.scrollable.name)
|
|
4563
|
-
.pipe(takeUntil(this.
|
|
4570
|
+
.pipe(takeUntil(this._destroy$))
|
|
4564
4571
|
.subscribe((fsScrollInstance) => {
|
|
4565
4572
|
this.fsScrollInstance = fsScrollInstance;
|
|
4566
4573
|
this._fsScrollSubscription = fsScrollInstance
|
|
@@ -4591,7 +4598,7 @@ class List {
|
|
|
4591
4598
|
}
|
|
4592
4599
|
});
|
|
4593
4600
|
this.dataController.remoteRowsChange$
|
|
4594
|
-
.pipe(takeUntil(this.
|
|
4601
|
+
.pipe(takeUntil(this._destroy$))
|
|
4595
4602
|
.subscribe(() => {
|
|
4596
4603
|
fsScrollInstance.loaded();
|
|
4597
4604
|
});
|
|
@@ -4635,9 +4642,10 @@ class List {
|
|
|
4635
4642
|
sorts: sortValues,
|
|
4636
4643
|
sort: sortConfig,
|
|
4637
4644
|
chips: this.chips,
|
|
4645
|
+
autoReload: this.autoReload,
|
|
4638
4646
|
init: this._filterInit.bind(this),
|
|
4639
4647
|
change: this._filterChange.bind(this),
|
|
4640
|
-
reload: ((_a = this.
|
|
4648
|
+
reload: ((_a = this._config.reload) !== null && _a !== void 0 ? _a : true) ? this.reload.bind(this) : null,
|
|
4641
4649
|
sortChange: this._filterSort.bind(this),
|
|
4642
4650
|
};
|
|
4643
4651
|
}
|
|
@@ -4683,8 +4691,8 @@ class List {
|
|
|
4683
4691
|
}
|
|
4684
4692
|
_checkRestoreFilter() {
|
|
4685
4693
|
// Restore option
|
|
4686
|
-
if (this.restore && this.filtersQuery[
|
|
4687
|
-
delete this.filtersQuery[
|
|
4694
|
+
if (this.restore && this.filtersQuery[showDeletedFilterKey]) {
|
|
4695
|
+
delete this.filtersQuery[showDeletedFilterKey];
|
|
4688
4696
|
Object.assign(this.filtersQuery, this.restore.query);
|
|
4689
4697
|
this.restoreMode = true;
|
|
4690
4698
|
}
|
|
@@ -4788,10 +4796,9 @@ class List {
|
|
|
4788
4796
|
const restoreClickResult = restoreClickCallback(row);
|
|
4789
4797
|
if (restoreClickResult instanceof Observable) {
|
|
4790
4798
|
restoreClickResult
|
|
4791
|
-
.pipe(take(1), takeUntil(this.
|
|
4799
|
+
.pipe(take(1), takeUntil(this._destroy$))
|
|
4792
4800
|
.subscribe({
|
|
4793
4801
|
next: () => this.reload(),
|
|
4794
|
-
error: () => { },
|
|
4795
4802
|
});
|
|
4796
4803
|
}
|
|
4797
4804
|
}
|
|
@@ -5456,7 +5463,7 @@ class FsListComponent {
|
|
|
5456
5463
|
}
|
|
5457
5464
|
this._updateCustomizeAction(listConfig.actions);
|
|
5458
5465
|
this.list = new List(this._el, listConfig, this._scroll, this._selectionDialog, this._router, this._route, this._persistance, this._inDialog);
|
|
5459
|
-
this.
|
|
5466
|
+
this.rowHoverHighlight = this.list.rowHoverHighlight;
|
|
5460
5467
|
this._waitFirstLoad();
|
|
5461
5468
|
this.reorderController.initWithConfig(config.reorder, this.list.dataController, this.list.actions, this.list.selection);
|
|
5462
5469
|
if (this._listColumnDirectives) {
|
|
@@ -5484,7 +5491,7 @@ class FsListComponent {
|
|
|
5484
5491
|
},
|
|
5485
5492
|
})
|
|
5486
5493
|
.afterClosed()
|
|
5487
|
-
.pipe(takeUntil(this.list.
|
|
5494
|
+
.pipe(takeUntil(this.list.destroy$), takeUntil(this._destroy))
|
|
5488
5495
|
.subscribe((data) => {
|
|
5489
5496
|
if (data) {
|
|
5490
5497
|
this.list.columns.updateVisibilityForCols(data);
|
|
@@ -5500,7 +5507,7 @@ class FsListComponent {
|
|
|
5500
5507
|
_listenSortingChange() {
|
|
5501
5508
|
this.list.sorting
|
|
5502
5509
|
.sortingChanged$
|
|
5503
|
-
.pipe(takeUntil(this.list.
|
|
5510
|
+
.pipe(takeUntil(this.list.destroy$), takeUntil(this._destroy))
|
|
5504
5511
|
.subscribe((sort) => {
|
|
5505
5512
|
this._filterRef.updateSort(sort);
|
|
5506
5513
|
});
|
|
@@ -5511,7 +5518,7 @@ class FsListComponent {
|
|
|
5511
5518
|
.subscribe((row) => {
|
|
5512
5519
|
this.list.dataController.removeData(row);
|
|
5513
5520
|
this.body.rows
|
|
5514
|
-
.forEach((
|
|
5521
|
+
.forEach((bodyRow) => bodyRow.actionsUpdate());
|
|
5515
5522
|
});
|
|
5516
5523
|
}
|
|
5517
5524
|
_subscribeToGroupExpandStatusChange() {
|
|
@@ -5525,7 +5532,7 @@ class FsListComponent {
|
|
|
5525
5532
|
}
|
|
5526
5533
|
_waitFirstLoad() {
|
|
5527
5534
|
this.list.loading$
|
|
5528
|
-
.pipe(skip(1), filter((value) => !value), take(1), takeUntil(this.list.
|
|
5535
|
+
.pipe(skip(1), filter((value) => !value), take(1), takeUntil(this.list.destroy$), takeUntil(this._destroy))
|
|
5529
5536
|
.subscribe(() => {
|
|
5530
5537
|
this.firstLoad = false;
|
|
5531
5538
|
this._cdRef.markForCheck();
|
|
@@ -5542,7 +5549,7 @@ class FsListComponent {
|
|
|
5542
5549
|
}
|
|
5543
5550
|
}
|
|
5544
5551
|
FsListComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.4.0", ngImport: i0, type: FsListComponent, deps: [{ token: ReorderController }, { token: FS_LIST_DEFAULT_CONFIG, optional: true }, { token: i2$4.FsScrollService, optional: true }, { token: i1$2.MatDialogRef, optional: true }, { token: i4$1.DrawerRef, optional: true }, { token: i0.ElementRef }, { token: i5.SelectionDialog }, { token: i1$2.MatDialog }, { token: i0.ChangeDetectorRef }, { token: GroupExpandNotifierService }, { token: i7.Router }, { token: i7.ActivatedRoute }, { token: PersistanceController }, { token: i3.Location }], target: i0.ɵɵFactoryTarget.Component });
|
|
5545
|
-
FsListComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.4.0", type: FsListComponent, selector: "fs-list", inputs: { config: "config", loaderLines: "loaderLines" }, outputs: { filtersReady: "filtersReady" }, host: { properties: { "class.fs-list": "this.classFsList", "class.fs-list-row-highlight": "this.
|
|
5552
|
+
FsListComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.4.0", type: FsListComponent, selector: "fs-list", inputs: { config: "config", loaderLines: "loaderLines" }, outputs: { filtersReady: "filtersReady" }, host: { properties: { "class.fs-list": "this.classFsList", "class.fs-list-row-highlight": "this.rowHoverHighlight" } }, providers: [
|
|
5546
5553
|
GroupExpandNotifierService,
|
|
5547
5554
|
PersistanceController,
|
|
5548
5555
|
ReorderController,
|
|
@@ -5570,7 +5577,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.4.0", ngImpor
|
|
|
5570
5577
|
}, propDecorators: { classFsList: [{
|
|
5571
5578
|
type: HostBinding,
|
|
5572
5579
|
args: ['class.fs-list']
|
|
5573
|
-
}],
|
|
5580
|
+
}], rowHoverHighlight: [{
|
|
5574
5581
|
type: HostBinding,
|
|
5575
5582
|
args: ['class.fs-list-row-highlight']
|
|
5576
5583
|
}], config: [{
|