@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
|
@@ -1785,10 +1785,10 @@ class FsRowActionsComponent {
|
|
|
1785
1785
|
}
|
|
1786
1786
|
}
|
|
1787
1787
|
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 });
|
|
1788
|
-
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
|
|
1788
|
+
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 });
|
|
1789
1789
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.4.0", ngImport: i0, type: FsRowActionsComponent, decorators: [{
|
|
1790
1790
|
type: Component,
|
|
1791
|
-
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
|
|
1791
|
+
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"] }]
|
|
1792
1792
|
}], ctorParameters: function () { return [{ type: i1$1.FsPrompt }]; }, propDecorators: { row: [{
|
|
1793
1793
|
type: Input
|
|
1794
1794
|
}], index: [{
|
|
@@ -4058,11 +4058,11 @@ class PaginationController {
|
|
|
4058
4058
|
}
|
|
4059
4059
|
}
|
|
4060
4060
|
|
|
4061
|
-
const
|
|
4061
|
+
const showDeletedFilterKey = 'showDeleted';
|
|
4062
4062
|
class List {
|
|
4063
|
-
constructor(_el,
|
|
4063
|
+
constructor(_el, _config = {}, _fsScroll, _selectionDialog, _router, _route, _persistance, _inDialog) {
|
|
4064
4064
|
this._el = _el;
|
|
4065
|
-
this.
|
|
4065
|
+
this._config = _config;
|
|
4066
4066
|
this._fsScroll = _fsScroll;
|
|
4067
4067
|
this._selectionDialog = _selectionDialog;
|
|
4068
4068
|
this._router = _router;
|
|
@@ -4070,14 +4070,13 @@ class List {
|
|
|
4070
4070
|
this._persistance = _persistance;
|
|
4071
4071
|
this._inDialog = _inDialog;
|
|
4072
4072
|
this.filters = [];
|
|
4073
|
-
this.initialized$ = new BehaviorSubject(false);
|
|
4074
|
-
this.loading$ = new BehaviorSubject(false);
|
|
4075
4073
|
this.paging = new PaginationController();
|
|
4076
4074
|
this.columns = new ColumnsController();
|
|
4077
4075
|
this.actions = new ActionsController();
|
|
4078
4076
|
this.dataController = new DataController();
|
|
4079
4077
|
this.sorting = new SortingController();
|
|
4080
4078
|
this.filterConfig = null;
|
|
4079
|
+
this.loading$ = new BehaviorSubject(false);
|
|
4081
4080
|
this.fetchComplete$ = new Subject();
|
|
4082
4081
|
this.filtersReady$ = new Subject();
|
|
4083
4082
|
this.status = true;
|
|
@@ -4088,17 +4087,18 @@ class List {
|
|
|
4088
4087
|
this.initialFetch = true;
|
|
4089
4088
|
// Empty state
|
|
4090
4089
|
this.emptyStateEnabled = false;
|
|
4091
|
-
this.
|
|
4090
|
+
this._destroy$ = new Subject();
|
|
4091
|
+
this._initialized$ = new BehaviorSubject(false);
|
|
4092
4092
|
this._fetch$ = new Subject();
|
|
4093
4093
|
this._filtersQuery = new BehaviorSubject(null);
|
|
4094
4094
|
this._activeFiltersCount$ = this._filtersQuery
|
|
4095
4095
|
.pipe(map((v) => Object.keys(v).length), shareReplay());
|
|
4096
|
-
this._initialize(
|
|
4097
|
-
this._headerConfig = new StyleConfig(
|
|
4098
|
-
this._groupCellConfig = new StyleConfig(
|
|
4099
|
-
this._cellConfig = new StyleConfig(
|
|
4100
|
-
this._footerConfig = new StyleConfig(
|
|
4101
|
-
this.
|
|
4096
|
+
this._initialize(_config);
|
|
4097
|
+
this._headerConfig = new StyleConfig(_config.header);
|
|
4098
|
+
this._groupCellConfig = new StyleConfig(_config.cell);
|
|
4099
|
+
this._cellConfig = new StyleConfig(_config.cell);
|
|
4100
|
+
this._footerConfig = new StyleConfig(_config.footer);
|
|
4101
|
+
this._initialized$.next(true);
|
|
4102
4102
|
this.subscribe();
|
|
4103
4103
|
if (this.initialFetch) {
|
|
4104
4104
|
this.dataController.setOperation(FsListState.Load);
|
|
@@ -4117,6 +4117,12 @@ class List {
|
|
|
4117
4117
|
get activeFiltersCount$() {
|
|
4118
4118
|
return this._activeFiltersCount$;
|
|
4119
4119
|
}
|
|
4120
|
+
get destroy$() {
|
|
4121
|
+
return this._destroy$;
|
|
4122
|
+
}
|
|
4123
|
+
get initialized$() {
|
|
4124
|
+
return this._initialized$;
|
|
4125
|
+
}
|
|
4120
4126
|
fetchRemote(query) {
|
|
4121
4127
|
const options = {
|
|
4122
4128
|
state: this.dataController.operation,
|
|
@@ -4149,7 +4155,7 @@ class List {
|
|
|
4149
4155
|
this._updateSortingColumns();
|
|
4150
4156
|
// Default sort by
|
|
4151
4157
|
const externalSorting = this.externalParams.externalSorting;
|
|
4152
|
-
const initialSortConfig = externalSorting || this.
|
|
4158
|
+
const initialSortConfig = externalSorting || this._config.sort;
|
|
4153
4159
|
this.sorting.initialSortBy(initialSortConfig);
|
|
4154
4160
|
if (externalSorting && !this.sorting.isDefined) {
|
|
4155
4161
|
this.externalParams.clearSortingParams();
|
|
@@ -4175,7 +4181,7 @@ class List {
|
|
|
4175
4181
|
*/
|
|
4176
4182
|
subscribe() {
|
|
4177
4183
|
this.paging.pageChanged$
|
|
4178
|
-
.pipe(takeUntil(this.
|
|
4184
|
+
.pipe(takeUntil(this._destroy$))
|
|
4179
4185
|
.subscribe((event) => {
|
|
4180
4186
|
this.dataController.setOperation(FsListState.PageChange);
|
|
4181
4187
|
// Remove all rows if limits was changed
|
|
@@ -4197,12 +4203,12 @@ class List {
|
|
|
4197
4203
|
let el = this._el.nativeElement;
|
|
4198
4204
|
if (!contains) {
|
|
4199
4205
|
const rect = this._el.nativeElement.getBoundingClientRect();
|
|
4200
|
-
if ((rect.top + window.pageYOffset) < window.innerHeight) {
|
|
4206
|
+
if ((Number(rect.top || 0) + window.pageYOffset) < window.innerHeight) {
|
|
4201
4207
|
el = document.body;
|
|
4202
4208
|
}
|
|
4203
4209
|
}
|
|
4204
4210
|
this.fetchComplete$.asObservable()
|
|
4205
|
-
.pipe(take(1), takeUntil(this.
|
|
4211
|
+
.pipe(take(1), takeUntil(this._destroy$))
|
|
4206
4212
|
.subscribe((event) => {
|
|
4207
4213
|
if (event?.scrollIntoView ?? true) {
|
|
4208
4214
|
el.scrollIntoView({ behavior: 'smooth' });
|
|
@@ -4212,7 +4218,7 @@ class List {
|
|
|
4212
4218
|
this._fetch$.next();
|
|
4213
4219
|
});
|
|
4214
4220
|
this.sorting.sortingChanged$
|
|
4215
|
-
.pipe(takeUntil(this.
|
|
4221
|
+
.pipe(takeUntil(this._destroy$))
|
|
4216
4222
|
.subscribe(() => {
|
|
4217
4223
|
this.dataController.setOperation(FsListState.Sort);
|
|
4218
4224
|
this.paging.page = 1;
|
|
@@ -4276,8 +4282,8 @@ class List {
|
|
|
4276
4282
|
this.externalParams.destroy();
|
|
4277
4283
|
}
|
|
4278
4284
|
this.columns.destroy();
|
|
4279
|
-
this.
|
|
4280
|
-
this.
|
|
4285
|
+
this._destroy$.next();
|
|
4286
|
+
this._destroy$.complete();
|
|
4281
4287
|
this.dataController.destroy();
|
|
4282
4288
|
}
|
|
4283
4289
|
/**
|
|
@@ -4298,7 +4304,7 @@ class List {
|
|
|
4298
4304
|
}
|
|
4299
4305
|
_initVariables(config) {
|
|
4300
4306
|
this.autoFocus = config.autoFocus;
|
|
4301
|
-
this.
|
|
4307
|
+
this.rowHoverHighlight = config.rowHoverHighlight ?? true;
|
|
4302
4308
|
this.heading = config.heading;
|
|
4303
4309
|
this.trackBy = config.trackBy;
|
|
4304
4310
|
this.subheading = config.subheading;
|
|
@@ -4319,6 +4325,7 @@ class List {
|
|
|
4319
4325
|
this.beforeFetchFn = config.beforeFetch;
|
|
4320
4326
|
this.afterInit = config.afterInit;
|
|
4321
4327
|
this.style = config.style;
|
|
4328
|
+
this.autoReload = config.autoReload;
|
|
4322
4329
|
this.columns.initConfig(config.column);
|
|
4323
4330
|
}
|
|
4324
4331
|
/**
|
|
@@ -4345,7 +4352,7 @@ class List {
|
|
|
4345
4352
|
this.queryParam = false;
|
|
4346
4353
|
}
|
|
4347
4354
|
else {
|
|
4348
|
-
this.queryParam = (config.queryParam ===
|
|
4355
|
+
this.queryParam = (config.queryParam === undefined)
|
|
4349
4356
|
? true
|
|
4350
4357
|
: config.queryParam;
|
|
4351
4358
|
}
|
|
@@ -4383,7 +4390,7 @@ class List {
|
|
|
4383
4390
|
}
|
|
4384
4391
|
if (this.restore.filter !== false) {
|
|
4385
4392
|
this.filters.push({
|
|
4386
|
-
name:
|
|
4393
|
+
name: showDeletedFilterKey,
|
|
4387
4394
|
type: ItemType.Checkbox,
|
|
4388
4395
|
label: this.restore.filterLabel || 'Show Deleted',
|
|
4389
4396
|
});
|
|
@@ -4437,7 +4444,7 @@ class List {
|
|
|
4437
4444
|
_listenFetch() {
|
|
4438
4445
|
let fetch$ = this.fetch$;
|
|
4439
4446
|
// Should wait until saved filters not loaded
|
|
4440
|
-
if (
|
|
4447
|
+
if (this.filters) {
|
|
4441
4448
|
fetch$ = combineLatest([fetch$, this.filtersReady$])
|
|
4442
4449
|
.pipe(map(([params]) => params));
|
|
4443
4450
|
}
|
|
@@ -4493,7 +4500,7 @@ class List {
|
|
|
4493
4500
|
}), catchError((error) => {
|
|
4494
4501
|
console.error(error);
|
|
4495
4502
|
return EMPTY;
|
|
4496
|
-
}), takeUntil(this.
|
|
4503
|
+
}), takeUntil(this._destroy$))
|
|
4497
4504
|
.subscribe(([paramsQuery, response]) => {
|
|
4498
4505
|
this.initialFetch = false;
|
|
4499
4506
|
this._completeFetch(paramsQuery.params, paramsQuery.query, response);
|
|
@@ -4501,7 +4508,7 @@ class List {
|
|
|
4501
4508
|
}
|
|
4502
4509
|
_listenRowsRemove() {
|
|
4503
4510
|
this.dataController.rowsRemoved$
|
|
4504
|
-
.pipe(takeUntil(this.
|
|
4511
|
+
.pipe(takeUntil(this._destroy$))
|
|
4505
4512
|
.subscribe((rows) => {
|
|
4506
4513
|
if (this.paging.enabled) {
|
|
4507
4514
|
const removedCount = rows.length;
|
|
@@ -4534,7 +4541,7 @@ class List {
|
|
|
4534
4541
|
*/
|
|
4535
4542
|
_listenVisibleColumnChanges() {
|
|
4536
4543
|
this.columns.visibleColumns$
|
|
4537
|
-
.pipe(takeUntil(this.
|
|
4544
|
+
.pipe(takeUntil(this._destroy$))
|
|
4538
4545
|
.subscribe(() => {
|
|
4539
4546
|
this._updateSortingColumns();
|
|
4540
4547
|
});
|
|
@@ -4545,12 +4552,12 @@ class List {
|
|
|
4545
4552
|
}
|
|
4546
4553
|
if (this.scrollable) {
|
|
4547
4554
|
// Scrollable status by default
|
|
4548
|
-
if (this.scrollable.status ===
|
|
4555
|
+
if (this.scrollable.status === undefined) {
|
|
4549
4556
|
this.scrollable.status = true;
|
|
4550
4557
|
}
|
|
4551
4558
|
this._fsScroll
|
|
4552
4559
|
.component(this.scrollable.name)
|
|
4553
|
-
.pipe(takeUntil(this.
|
|
4560
|
+
.pipe(takeUntil(this._destroy$))
|
|
4554
4561
|
.subscribe((fsScrollInstance) => {
|
|
4555
4562
|
this.fsScrollInstance = fsScrollInstance;
|
|
4556
4563
|
this._fsScrollSubscription = fsScrollInstance
|
|
@@ -4581,7 +4588,7 @@ class List {
|
|
|
4581
4588
|
}
|
|
4582
4589
|
});
|
|
4583
4590
|
this.dataController.remoteRowsChange$
|
|
4584
|
-
.pipe(takeUntil(this.
|
|
4591
|
+
.pipe(takeUntil(this._destroy$))
|
|
4585
4592
|
.subscribe(() => {
|
|
4586
4593
|
fsScrollInstance.loaded();
|
|
4587
4594
|
});
|
|
@@ -4624,9 +4631,10 @@ class List {
|
|
|
4624
4631
|
sorts: sortValues,
|
|
4625
4632
|
sort: sortConfig,
|
|
4626
4633
|
chips: this.chips,
|
|
4634
|
+
autoReload: this.autoReload,
|
|
4627
4635
|
init: this._filterInit.bind(this),
|
|
4628
4636
|
change: this._filterChange.bind(this),
|
|
4629
|
-
reload: (this.
|
|
4637
|
+
reload: (this._config.reload ?? true) ? this.reload.bind(this) : null,
|
|
4630
4638
|
sortChange: this._filterSort.bind(this),
|
|
4631
4639
|
};
|
|
4632
4640
|
}
|
|
@@ -4672,8 +4680,8 @@ class List {
|
|
|
4672
4680
|
}
|
|
4673
4681
|
_checkRestoreFilter() {
|
|
4674
4682
|
// Restore option
|
|
4675
|
-
if (this.restore && this.filtersQuery[
|
|
4676
|
-
delete this.filtersQuery[
|
|
4683
|
+
if (this.restore && this.filtersQuery[showDeletedFilterKey]) {
|
|
4684
|
+
delete this.filtersQuery[showDeletedFilterKey];
|
|
4677
4685
|
Object.assign(this.filtersQuery, this.restore.query);
|
|
4678
4686
|
this.restoreMode = true;
|
|
4679
4687
|
}
|
|
@@ -4776,10 +4784,9 @@ class List {
|
|
|
4776
4784
|
const restoreClickResult = restoreClickCallback(row);
|
|
4777
4785
|
if (restoreClickResult instanceof Observable) {
|
|
4778
4786
|
restoreClickResult
|
|
4779
|
-
.pipe(take(1), takeUntil(this.
|
|
4787
|
+
.pipe(take(1), takeUntil(this._destroy$))
|
|
4780
4788
|
.subscribe({
|
|
4781
4789
|
next: () => this.reload(),
|
|
4782
|
-
error: () => { },
|
|
4783
4790
|
});
|
|
4784
4791
|
}
|
|
4785
4792
|
}
|
|
@@ -5444,7 +5451,7 @@ class FsListComponent {
|
|
|
5444
5451
|
}
|
|
5445
5452
|
this._updateCustomizeAction(listConfig.actions);
|
|
5446
5453
|
this.list = new List(this._el, listConfig, this._scroll, this._selectionDialog, this._router, this._route, this._persistance, this._inDialog);
|
|
5447
|
-
this.
|
|
5454
|
+
this.rowHoverHighlight = this.list.rowHoverHighlight;
|
|
5448
5455
|
this._waitFirstLoad();
|
|
5449
5456
|
this.reorderController.initWithConfig(config.reorder, this.list.dataController, this.list.actions, this.list.selection);
|
|
5450
5457
|
if (this._listColumnDirectives) {
|
|
@@ -5472,7 +5479,7 @@ class FsListComponent {
|
|
|
5472
5479
|
},
|
|
5473
5480
|
})
|
|
5474
5481
|
.afterClosed()
|
|
5475
|
-
.pipe(takeUntil(this.list.
|
|
5482
|
+
.pipe(takeUntil(this.list.destroy$), takeUntil(this._destroy))
|
|
5476
5483
|
.subscribe((data) => {
|
|
5477
5484
|
if (data) {
|
|
5478
5485
|
this.list.columns.updateVisibilityForCols(data);
|
|
@@ -5488,7 +5495,7 @@ class FsListComponent {
|
|
|
5488
5495
|
_listenSortingChange() {
|
|
5489
5496
|
this.list.sorting
|
|
5490
5497
|
.sortingChanged$
|
|
5491
|
-
.pipe(takeUntil(this.list.
|
|
5498
|
+
.pipe(takeUntil(this.list.destroy$), takeUntil(this._destroy))
|
|
5492
5499
|
.subscribe((sort) => {
|
|
5493
5500
|
this._filterRef.updateSort(sort);
|
|
5494
5501
|
});
|
|
@@ -5499,7 +5506,7 @@ class FsListComponent {
|
|
|
5499
5506
|
.subscribe((row) => {
|
|
5500
5507
|
this.list.dataController.removeData(row);
|
|
5501
5508
|
this.body.rows
|
|
5502
|
-
.forEach((
|
|
5509
|
+
.forEach((bodyRow) => bodyRow.actionsUpdate());
|
|
5503
5510
|
});
|
|
5504
5511
|
}
|
|
5505
5512
|
_subscribeToGroupExpandStatusChange() {
|
|
@@ -5513,7 +5520,7 @@ class FsListComponent {
|
|
|
5513
5520
|
}
|
|
5514
5521
|
_waitFirstLoad() {
|
|
5515
5522
|
this.list.loading$
|
|
5516
|
-
.pipe(skip(1), filter((value) => !value), take(1), takeUntil(this.list.
|
|
5523
|
+
.pipe(skip(1), filter((value) => !value), take(1), takeUntil(this.list.destroy$), takeUntil(this._destroy))
|
|
5517
5524
|
.subscribe(() => {
|
|
5518
5525
|
this.firstLoad = false;
|
|
5519
5526
|
this._cdRef.markForCheck();
|
|
@@ -5530,7 +5537,7 @@ class FsListComponent {
|
|
|
5530
5537
|
}
|
|
5531
5538
|
}
|
|
5532
5539
|
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 });
|
|
5533
|
-
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.
|
|
5540
|
+
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: [
|
|
5534
5541
|
GroupExpandNotifierService,
|
|
5535
5542
|
PersistanceController,
|
|
5536
5543
|
ReorderController,
|
|
@@ -5556,7 +5563,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.4.0", ngImpor
|
|
|
5556
5563
|
}] }, { type: i0.ElementRef }, { type: i5.SelectionDialog }, { type: i1$2.MatDialog }, { type: i0.ChangeDetectorRef }, { type: GroupExpandNotifierService }, { type: i7.Router }, { type: i7.ActivatedRoute }, { type: PersistanceController }, { type: i3.Location }]; }, propDecorators: { classFsList: [{
|
|
5557
5564
|
type: HostBinding,
|
|
5558
5565
|
args: ['class.fs-list']
|
|
5559
|
-
}],
|
|
5566
|
+
}], rowHoverHighlight: [{
|
|
5560
5567
|
type: HostBinding,
|
|
5561
5568
|
args: ['class.fs-list-row-highlight']
|
|
5562
5569
|
}], config: [{
|