@firestitch/list 18.0.26 → 18.0.27
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/columns-controller.d.ts +3 -3
- package/app/classes/external-params-controller.d.ts +2 -3
- package/app/classes/list-controller.d.ts +2 -3
- package/app/classes/persistance-controller.d.ts +20 -5
- package/app/components/customize-cols/customize-cols.component.d.ts +5 -3
- package/app/components/list/list.component.d.ts +8 -11
- package/app/interfaces/listconfig.interface.d.ts +10 -2
- package/esm2022/app/classes/columns-controller.mjs +14 -14
- package/esm2022/app/classes/external-params-controller.mjs +13 -13
- package/esm2022/app/classes/index.mjs +1 -1
- package/esm2022/app/classes/list-controller.mjs +14 -11
- package/esm2022/app/classes/persistance-controller.mjs +80 -14
- package/esm2022/app/components/body/row/cell/cell.component.mjs +3 -3
- package/esm2022/app/components/customize-cols/customize-cols.component.mjs +20 -17
- package/esm2022/app/components/footer/footer-row/footer-cell/footer-cell.component.mjs +3 -3
- package/esm2022/app/components/head/head-cell/head-cell.component.mjs +1 -1
- package/esm2022/app/components/list/list.component.mjs +32 -43
- package/esm2022/app/components/loader/loader.component.mjs +3 -3
- package/esm2022/app/components/manage-saved-filters/manage-saved-filters.component.mjs +3 -3
- package/esm2022/app/components/saved-filters/saved-filters.component.mjs +3 -3
- package/esm2022/app/directives/cell/cell.directive.mjs +1 -1
- package/esm2022/app/directives/empty-state/empty-state.directive.mjs +1 -1
- package/esm2022/app/directives/footer/footer.directive.mjs +1 -1
- package/esm2022/app/directives/group-expand-trigger/group-expand-trigger.directive.mjs +1 -1
- package/esm2022/app/directives/header/header.directive.mjs +1 -1
- package/esm2022/app/directives/heading/heading.directive.mjs +1 -1
- package/esm2022/app/directives/heading-container/heading-container.directive.mjs +1 -1
- package/esm2022/app/directives/index.mjs +1 -1
- package/esm2022/app/directives/subheading/subheading.directive.mjs +1 -1
- package/esm2022/app/enums/page-change-type.enum.mjs +1 -1
- package/esm2022/app/enums/pagination-strategy.enum.mjs +1 -1
- package/esm2022/app/enums/state.enum.mjs +1 -1
- package/esm2022/app/interfaces/cellconfig.interface.mjs +1 -1
- package/esm2022/app/interfaces/draggable-list.interface.mjs +1 -1
- package/esm2022/app/interfaces/external-params.interface.mjs +1 -1
- package/esm2022/app/interfaces/listconfig.interface.mjs +1 -1
- package/esm2022/app/interfaces/sorting-change-event.interface.mjs +1 -1
- package/esm2022/app/models/row/base-row.mjs +1 -1
- package/esm2022/app/models/row/child-row.mjs +1 -1
- package/esm2022/app/models/row/simple-row.mjs +1 -1
- package/fesm2022/firestitch-list.mjs +168 -105
- package/fesm2022/firestitch-list.mjs.map +1 -1
- package/package.json +1 -1
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import * as i1 from '@angular/common';
|
|
2
|
-
import { CommonModule } from '@angular/common';
|
|
2
|
+
import { Location, CommonModule } from '@angular/common';
|
|
3
3
|
import * as i0 from '@angular/core';
|
|
4
|
-
import { Injectable, Directive, Input, EventEmitter, Component, ChangeDetectionStrategy, Output, Pipe, HostBinding, ViewChildren, TemplateRef, ViewContainerRef, ViewChild, ContentChild,
|
|
5
|
-
import * as
|
|
4
|
+
import { Injectable, Directive, Input, EventEmitter, Component, ChangeDetectionStrategy, Output, Pipe, HostBinding, ViewChildren, TemplateRef, ViewContainerRef, ViewChild, ContentChild, inject, HostListener, ContentChildren, InjectionToken, ChangeDetectorRef, Injector, Optional, Inject, NgModule } from '@angular/core';
|
|
5
|
+
import * as i5 from '@angular/router';
|
|
6
6
|
import { RouterModule } from '@angular/router';
|
|
7
7
|
import * as i3 from '@angular/material/button';
|
|
8
8
|
import { MatButtonModule } from '@angular/material/button';
|
|
@@ -10,8 +10,8 @@ import * as i4 from '@angular/material/checkbox';
|
|
|
10
10
|
import { MatCheckboxModule } from '@angular/material/checkbox';
|
|
11
11
|
import * as i4$2 from '@angular/material/core';
|
|
12
12
|
import { MatRippleModule } from '@angular/material/core';
|
|
13
|
-
import * as
|
|
14
|
-
import { MAT_DIALOG_DATA, MatDialogModule } from '@angular/material/dialog';
|
|
13
|
+
import * as i3$3 from '@angular/material/dialog';
|
|
14
|
+
import { MatDialogRef, MAT_DIALOG_DATA, MatDialogModule } from '@angular/material/dialog';
|
|
15
15
|
import * as i3$1 from '@angular/material/icon';
|
|
16
16
|
import { MatIconModule } from '@angular/material/icon';
|
|
17
17
|
import { MatMenuModule } from '@angular/material/menu';
|
|
@@ -19,9 +19,9 @@ import * as i2$1 from '@angular/material/progress-spinner';
|
|
|
19
19
|
import { MatProgressSpinnerModule } from '@angular/material/progress-spinner';
|
|
20
20
|
import * as i4$1 from '@angular/material/tooltip';
|
|
21
21
|
import { MatTooltipModule } from '@angular/material/tooltip';
|
|
22
|
-
import * as i5$
|
|
22
|
+
import * as i5$2 from '@firestitch/common';
|
|
23
23
|
import { getNormalizedPath, FsCommonModule } from '@firestitch/common';
|
|
24
|
-
import * as i5 from '@firestitch/file';
|
|
24
|
+
import * as i5$1 from '@firestitch/file';
|
|
25
25
|
import { FsFileModule } from '@firestitch/file';
|
|
26
26
|
import * as i2 from '@firestitch/filter';
|
|
27
27
|
import { ItemType, FilterComponent, FsFilterModule } from '@firestitch/filter';
|
|
@@ -30,13 +30,12 @@ import { FsMenuModule } from '@firestitch/menu';
|
|
|
30
30
|
import * as i1$1 from '@firestitch/prompt';
|
|
31
31
|
import { FsPromptModule } from '@firestitch/prompt';
|
|
32
32
|
import { FsScrollModule } from '@firestitch/scroll';
|
|
33
|
-
import { BehaviorSubject, Subject, Observable, merge, from,
|
|
33
|
+
import { BehaviorSubject, Subject, Observable, of, merge, from, combineLatest, EMPTY } from 'rxjs';
|
|
34
34
|
import { takeUntil, take, filter, tap, skip, distinctUntilChanged, map, shareReplay, delay, switchMap, debounceTime, mapTo, catchError } from 'rxjs/operators';
|
|
35
35
|
import { get, isString, isObject, isBoolean, isNumber, isFunction, cloneDeep, random, mergeWith } from 'lodash-es';
|
|
36
|
-
import
|
|
37
|
-
import
|
|
38
|
-
import * as
|
|
39
|
-
import { FsPersistanceStore } from '@firestitch/store';
|
|
36
|
+
import { FsStore } from '@firestitch/store';
|
|
37
|
+
import { DrawerRef } from '@firestitch/drawer';
|
|
38
|
+
import * as i2$2 from '@firestitch/selection';
|
|
40
39
|
|
|
41
40
|
var ReorderPosition;
|
|
42
41
|
(function (ReorderPosition) {
|
|
@@ -1384,7 +1383,7 @@ class FsRowInlineActionComponent {
|
|
|
1384
1383
|
this.fileSelect.emit(event);
|
|
1385
1384
|
}
|
|
1386
1385
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.7", ngImport: i0, type: FsRowInlineActionComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
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:
|
|
1386
|
+
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: i5.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$1.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 });
|
|
1388
1387
|
}
|
|
1389
1388
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.7", ngImport: i0, type: FsRowInlineActionComponent, decorators: [{
|
|
1390
1389
|
type: Component,
|
|
@@ -1446,7 +1445,7 @@ class FsRowMenuActionComponent {
|
|
|
1446
1445
|
this.label = this.rowAction.label;
|
|
1447
1446
|
}
|
|
1448
1447
|
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 });
|
|
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 });
|
|
1448
|
+
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$1.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 });
|
|
1450
1449
|
}
|
|
1451
1450
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.7", ngImport: i0, type: FsRowMenuActionComponent, decorators: [{
|
|
1452
1451
|
type: Component,
|
|
@@ -1886,11 +1885,11 @@ class FsCellComponent {
|
|
|
1886
1885
|
}
|
|
1887
1886
|
}
|
|
1888
1887
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.7", ngImport: i0, type: FsCellComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
1889
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.2.7", type: FsCellComponent, selector: "[fs-cell]", inputs: { column: "column", row: "row", rowIndex: "rowIndex" }, host: { properties: { "class.fs-list-col": "this.isColl", "attr.role": "this.role" } }, usesOnChanges: true, ngImport: i0, template: "<ng-template [ngTemplateOutlet]=\"cellTemplate || defaultCellTemplate\" [ngTemplateOutletContext]=\"cellContext\"></ng-template>\n\n<ng-template #defaultCellTemplate let-value=\"value\">\n {{value}}\n</ng-template>\n", dependencies: [{ kind: "directive", type: i1.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
1888
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.2.7", type: FsCellComponent, selector: "[fs-cell]", inputs: { column: "column", row: "row", rowIndex: "rowIndex" }, host: { properties: { "class.fs-list-col": "this.isColl", "attr.role": "this.role" } }, usesOnChanges: true, ngImport: i0, template: "<ng-template [ngTemplateOutlet]=\"cellTemplate || defaultCellTemplate\" [ngTemplateOutletContext]=\"cellContext\"></ng-template>\r\n\r\n<ng-template #defaultCellTemplate let-value=\"value\">\r\n {{value}}\r\n</ng-template>\r\n", dependencies: [{ kind: "directive", type: i1.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
1890
1889
|
}
|
|
1891
1890
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.7", ngImport: i0, type: FsCellComponent, decorators: [{
|
|
1892
1891
|
type: Component,
|
|
1893
|
-
args: [{ selector: '[fs-cell]', changeDetection: ChangeDetectionStrategy.OnPush, template: "<ng-template [ngTemplateOutlet]=\"cellTemplate || defaultCellTemplate\" [ngTemplateOutletContext]=\"cellContext\"></ng-template>\n\n<ng-template #defaultCellTemplate let-value=\"value\">\n {{value}}\n</ng-template>\n" }]
|
|
1892
|
+
args: [{ selector: '[fs-cell]', changeDetection: ChangeDetectionStrategy.OnPush, template: "<ng-template [ngTemplateOutlet]=\"cellTemplate || defaultCellTemplate\" [ngTemplateOutletContext]=\"cellContext\"></ng-template>\r\n\r\n<ng-template #defaultCellTemplate let-value=\"value\">\r\n {{value}}\r\n</ng-template>\r\n" }]
|
|
1894
1893
|
}], propDecorators: { isColl: [{
|
|
1895
1894
|
type: HostBinding,
|
|
1896
1895
|
args: ['class.fs-list-col']
|
|
@@ -2370,16 +2369,98 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.7", ngImpor
|
|
|
2370
2369
|
args: [FsRowComponent, { read: TemplateRef, static: true }]
|
|
2371
2370
|
}] } });
|
|
2372
2371
|
|
|
2372
|
+
class PersistanceController {
|
|
2373
|
+
filtersEnabled = false;
|
|
2374
|
+
columnsEnabled = false;
|
|
2375
|
+
pagingEnabled = false;
|
|
2376
|
+
sortingEnabled = false;
|
|
2377
|
+
_store = inject(FsStore);
|
|
2378
|
+
_name;
|
|
2379
|
+
_data = {};
|
|
2380
|
+
_location = inject(Location);
|
|
2381
|
+
init(listConfig, inDialog) {
|
|
2382
|
+
const config = this._initConfig(listConfig, inDialog);
|
|
2383
|
+
if (config) {
|
|
2384
|
+
this.filtersEnabled = config.persistFilter;
|
|
2385
|
+
this.columnsEnabled = config.persistColumn;
|
|
2386
|
+
this.pagingEnabled = config.persistPaging;
|
|
2387
|
+
this.sortingEnabled = config.persistSorting;
|
|
2388
|
+
this._name = config.name;
|
|
2389
|
+
this._data = this._get() || {};
|
|
2390
|
+
}
|
|
2391
|
+
}
|
|
2392
|
+
setSorting(value) {
|
|
2393
|
+
this._set('sorting', value);
|
|
2394
|
+
}
|
|
2395
|
+
setPaging(value) {
|
|
2396
|
+
this._set('paging', value);
|
|
2397
|
+
}
|
|
2398
|
+
setColumns(value) {
|
|
2399
|
+
this._set('columns', value);
|
|
2400
|
+
}
|
|
2401
|
+
getColumns() {
|
|
2402
|
+
return this._data.columns || [];
|
|
2403
|
+
}
|
|
2404
|
+
getSorting() {
|
|
2405
|
+
return this._data.sorting || {};
|
|
2406
|
+
}
|
|
2407
|
+
getPaging() {
|
|
2408
|
+
return this._data.paging || {};
|
|
2409
|
+
}
|
|
2410
|
+
_set(key, value) {
|
|
2411
|
+
this._data[key] = value;
|
|
2412
|
+
const storeData = this._store.get('fs-list-persist') || {};
|
|
2413
|
+
storeData[this._name] = this._data;
|
|
2414
|
+
this._store.set('fs-list-persist', storeData);
|
|
2415
|
+
}
|
|
2416
|
+
_get() {
|
|
2417
|
+
const storeData = this._store.get('fs-list-persist');
|
|
2418
|
+
if (storeData) {
|
|
2419
|
+
return storeData[this._name];
|
|
2420
|
+
}
|
|
2421
|
+
return {};
|
|
2422
|
+
}
|
|
2423
|
+
_initConfig(config, inDialog) {
|
|
2424
|
+
let persistanceConfig = this._getDefaultConfig(config);
|
|
2425
|
+
if (persistanceConfig) {
|
|
2426
|
+
persistanceConfig = {
|
|
2427
|
+
name: persistanceConfig.name || getNormalizedPath(this._location),
|
|
2428
|
+
persistFilter: !inDialog || !!persistanceConfig.name,
|
|
2429
|
+
persistPaging: !inDialog || !!persistanceConfig.name,
|
|
2430
|
+
persistSorting: !inDialog || !!persistanceConfig.name,
|
|
2431
|
+
persistColumn: !inDialog || !!persistanceConfig.name,
|
|
2432
|
+
...persistanceConfig,
|
|
2433
|
+
};
|
|
2434
|
+
}
|
|
2435
|
+
return persistanceConfig;
|
|
2436
|
+
}
|
|
2437
|
+
_getDefaultConfig(config) {
|
|
2438
|
+
if (config) {
|
|
2439
|
+
return {
|
|
2440
|
+
...(config === true ? {} : config),
|
|
2441
|
+
};
|
|
2442
|
+
}
|
|
2443
|
+
return null;
|
|
2444
|
+
}
|
|
2445
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.7", ngImport: i0, type: PersistanceController, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
|
|
2446
|
+
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "18.2.7", ngImport: i0, type: PersistanceController });
|
|
2447
|
+
}
|
|
2448
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.7", ngImport: i0, type: PersistanceController, decorators: [{
|
|
2449
|
+
type: Injectable
|
|
2450
|
+
}] });
|
|
2451
|
+
|
|
2373
2452
|
class CustomizeColsDialogComponent {
|
|
2374
|
-
_dialog;
|
|
2375
2453
|
columns = [];
|
|
2376
2454
|
saveDisabled = false;
|
|
2455
|
+
columnsEnabled = false;
|
|
2377
2456
|
_changeFn;
|
|
2378
2457
|
_destroy$ = new Subject();
|
|
2379
|
-
|
|
2380
|
-
|
|
2381
|
-
|
|
2382
|
-
|
|
2458
|
+
_persistance = inject(PersistanceController);
|
|
2459
|
+
_dialog = inject(MatDialogRef);
|
|
2460
|
+
_data = inject(MAT_DIALOG_DATA);
|
|
2461
|
+
constructor() {
|
|
2462
|
+
this.columns = this._data.columns;
|
|
2463
|
+
this._changeFn = this._data.changeFn;
|
|
2383
2464
|
}
|
|
2384
2465
|
ngOnDestroy() {
|
|
2385
2466
|
this._destroy$.next(null);
|
|
@@ -2397,6 +2478,9 @@ class CustomizeColsDialogComponent {
|
|
|
2397
2478
|
show: column.show,
|
|
2398
2479
|
};
|
|
2399
2480
|
});
|
|
2481
|
+
if (this._persistance.columnsEnabled) {
|
|
2482
|
+
this._persistance.setColumns(data);
|
|
2483
|
+
}
|
|
2400
2484
|
this.saveDisabled = true;
|
|
2401
2485
|
const changed = this._changeFn ? this._changeFn(data) : null;
|
|
2402
2486
|
if (changed instanceof Observable) {
|
|
@@ -2418,27 +2502,24 @@ class CustomizeColsDialogComponent {
|
|
|
2418
2502
|
cancel() {
|
|
2419
2503
|
this._dialog.close();
|
|
2420
2504
|
}
|
|
2421
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.7", ngImport: i0, type: CustomizeColsDialogComponent, deps: [
|
|
2422
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "18.2.7", type: CustomizeColsDialogComponent, selector: "ng-component", ngImport: i0, template: "<h1 matDialogTitle>\n Customize columns\n</h1>\n<mat-dialog-content>\n <div class=\"columns\">\n <div *ngFor=\"let column of columns\">\n <mat-checkbox\n [checked]=\"column.show\"\n (change)=\"visibilityChange($event, column)\"\n [disabled]=\"column.disabled\">\n @if (column.title) {\n {{ column.title }}\n } @else {\n <ng-template [ngTemplateOutlet]=\"column.template\"></ng-template>\n }\n </mat-checkbox>\n </div>\n </div>\n</mat-dialog-content>\n<mat-dialog-actions>\n <button\n type=\"button\"\n mat-button\n color=\"primary\"\n (click)=\"save()\"\n [disabled]=\"saveDisabled\">\n Save\n </button>\n <button\n type=\"button\"\n mat-button\n (click)=\"cancel()\">\n Cancel\n </button>\n</mat-dialog-actions>", styles: [".mat-checkbox{min-height:32px;display:block}.mat-icon{font-size:14px;height:14px;width:14px;vertical-align:middle}.columns{margin-bottom:1.25em}\n"], dependencies: [{ kind: "directive", type: i1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i1.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { 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: i4.MatCheckbox, selector: "mat-checkbox", inputs: ["aria-label", "aria-labelledby", "aria-describedby", "id", "required", "labelPosition", "name", "value", "disableRipple", "tabIndex", "color", "disabledInteractive", "checked", "disabled", "indeterminate"], outputs: ["change", "indeterminateChange"], exportAs: ["matCheckbox"] }, { kind: "directive", type:
|
|
2505
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.7", ngImport: i0, type: CustomizeColsDialogComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
2506
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "18.2.7", type: CustomizeColsDialogComponent, selector: "ng-component", ngImport: i0, template: "<h1 matDialogTitle>\n Customize columns\n</h1>\n<mat-dialog-content>\n <div class=\"columns\">\n <div *ngFor=\"let column of columns\">\n <mat-checkbox\n [checked]=\"column.show\"\n (change)=\"visibilityChange($event, column)\"\n [disabled]=\"column.disabled\">\n @if (column.title) {\n {{ column.title }}\n } @else {\n <ng-template [ngTemplateOutlet]=\"column.template\"></ng-template>\n }\n </mat-checkbox>\n </div>\n </div>\n</mat-dialog-content>\n<mat-dialog-actions>\n <button\n type=\"button\"\n mat-button\n color=\"primary\"\n (click)=\"save()\"\n [disabled]=\"saveDisabled\">\n Save\n </button>\n <button\n type=\"button\"\n mat-button\n (click)=\"cancel()\">\n Cancel\n </button>\n</mat-dialog-actions>", styles: [".mat-checkbox{min-height:32px;display:block}.mat-icon{font-size:14px;height:14px;width:14px;vertical-align:middle}.columns{margin-bottom:1.25em}\n"], dependencies: [{ kind: "directive", type: i1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i1.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { 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: i4.MatCheckbox, selector: "mat-checkbox", inputs: ["aria-label", "aria-labelledby", "aria-describedby", "id", "required", "labelPosition", "name", "value", "disableRipple", "tabIndex", "color", "disabledInteractive", "checked", "disabled", "indeterminate"], outputs: ["change", "indeterminateChange"], exportAs: ["matCheckbox"] }, { kind: "directive", type: i3$3.MatDialogTitle, selector: "[mat-dialog-title], [matDialogTitle]", inputs: ["id"], exportAs: ["matDialogTitle"] }, { kind: "directive", type: i3$3.MatDialogActions, selector: "[mat-dialog-actions], mat-dialog-actions, [matDialogActions]", inputs: ["align"] }, { kind: "directive", type: i3$3.MatDialogContent, selector: "[mat-dialog-content], mat-dialog-content, [matDialogContent]" }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
2423
2507
|
}
|
|
2424
2508
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.7", ngImport: i0, type: CustomizeColsDialogComponent, decorators: [{
|
|
2425
2509
|
type: Component,
|
|
2426
2510
|
args: [{ changeDetection: ChangeDetectionStrategy.OnPush, template: "<h1 matDialogTitle>\n Customize columns\n</h1>\n<mat-dialog-content>\n <div class=\"columns\">\n <div *ngFor=\"let column of columns\">\n <mat-checkbox\n [checked]=\"column.show\"\n (change)=\"visibilityChange($event, column)\"\n [disabled]=\"column.disabled\">\n @if (column.title) {\n {{ column.title }}\n } @else {\n <ng-template [ngTemplateOutlet]=\"column.template\"></ng-template>\n }\n </mat-checkbox>\n </div>\n </div>\n</mat-dialog-content>\n<mat-dialog-actions>\n <button\n type=\"button\"\n mat-button\n color=\"primary\"\n (click)=\"save()\"\n [disabled]=\"saveDisabled\">\n Save\n </button>\n <button\n type=\"button\"\n mat-button\n (click)=\"cancel()\">\n Cancel\n </button>\n</mat-dialog-actions>", styles: [".mat-checkbox{min-height:32px;display:block}.mat-icon{font-size:14px;height:14px;width:14px;vertical-align:middle}.columns{margin-bottom:1.25em}\n"] }]
|
|
2427
|
-
}], ctorParameters: () => [
|
|
2428
|
-
type: Inject,
|
|
2429
|
-
args: [MAT_DIALOG_DATA]
|
|
2430
|
-
}] }, { type: i1$2.MatDialogRef }] });
|
|
2511
|
+
}], ctorParameters: () => [] });
|
|
2431
2512
|
|
|
2432
2513
|
class FsFooterCellComponent extends FsCellComponent {
|
|
2433
2514
|
constructor() {
|
|
2434
2515
|
super();
|
|
2435
2516
|
}
|
|
2436
2517
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.7", ngImport: i0, type: FsFooterCellComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
2437
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.2.7", type: FsFooterCellComponent, selector: "[fs-list-footer-cell]", usesInheritance: true, ngImport: i0, template: "<ng-template [ngTemplateOutlet]=\"column.footerTemplate || cell\" [ngTemplateOutletContext]=\"cellContext\"></ng-template>\n\n<ng-template #cell let-value=\"value\">\n {{value}}\n</ng-template>\n", dependencies: [{ kind: "directive", type: i1.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
2518
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.2.7", type: FsFooterCellComponent, selector: "[fs-list-footer-cell]", usesInheritance: true, ngImport: i0, template: "<ng-template [ngTemplateOutlet]=\"column.footerTemplate || cell\" [ngTemplateOutletContext]=\"cellContext\"></ng-template>\r\n\r\n<ng-template #cell let-value=\"value\">\r\n {{value}}\r\n</ng-template>\r\n", dependencies: [{ kind: "directive", type: i1.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
2438
2519
|
}
|
|
2439
2520
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.7", ngImport: i0, type: FsFooterCellComponent, decorators: [{
|
|
2440
2521
|
type: Component,
|
|
2441
|
-
args: [{ selector: '[fs-list-footer-cell]', changeDetection: ChangeDetectionStrategy.OnPush, template: "<ng-template [ngTemplateOutlet]=\"column.footerTemplate || cell\" [ngTemplateOutletContext]=\"cellContext\"></ng-template>\n\n<ng-template #cell let-value=\"value\">\n {{value}}\n</ng-template>\n" }]
|
|
2522
|
+
args: [{ selector: '[fs-list-footer-cell]', changeDetection: ChangeDetectionStrategy.OnPush, template: "<ng-template [ngTemplateOutlet]=\"column.footerTemplate || cell\" [ngTemplateOutletContext]=\"cellContext\"></ng-template>\r\n\r\n<ng-template #cell let-value=\"value\">\r\n {{value}}\r\n</ng-template>\r\n" }]
|
|
2442
2523
|
}], ctorParameters: () => [] });
|
|
2443
2524
|
|
|
2444
2525
|
class FsFooterRowComponent extends FsRowComponent {
|
|
@@ -2985,16 +3066,13 @@ var FsListState;
|
|
|
2985
3066
|
})(FsListState || (FsListState = {}));
|
|
2986
3067
|
|
|
2987
3068
|
class ColumnsController {
|
|
3069
|
+
_persistance;
|
|
2988
3070
|
_visibleColumns$ = new BehaviorSubject([]);
|
|
2989
3071
|
_visibleColumnsShared$ = this._visibleColumns$.pipe();
|
|
2990
3072
|
_theadClass = '';
|
|
2991
3073
|
_loadFn;
|
|
2992
3074
|
_changeFn;
|
|
2993
|
-
// private _customizeFieldTitleFn: FsListColumnTitleFn;
|
|
2994
|
-
// private _customizeFieldDisabledFn: FsListColumnDisabledFn;
|
|
2995
|
-
//private _columnTooltipFn: FsListColumnTooltipFn;
|
|
2996
3075
|
_isConfigured = false;
|
|
2997
|
-
_loadFnConfigured = false;
|
|
2998
3076
|
_changeFnConfigured = false;
|
|
2999
3077
|
_columnsFetched = false;
|
|
3000
3078
|
_hasHeader = false;
|
|
@@ -3003,7 +3081,10 @@ class ColumnsController {
|
|
|
3003
3081
|
_defaultConfigs;
|
|
3004
3082
|
_columnsUpdated$ = new Subject();
|
|
3005
3083
|
_destroy$ = new Subject();
|
|
3006
|
-
constructor() {
|
|
3084
|
+
constructor(_persistance) {
|
|
3085
|
+
this._persistance = _persistance;
|
|
3086
|
+
this._loadFn = () => of([]);
|
|
3087
|
+
}
|
|
3007
3088
|
get columns() {
|
|
3008
3089
|
return this._columns.slice();
|
|
3009
3090
|
}
|
|
@@ -3040,9 +3121,6 @@ class ColumnsController {
|
|
|
3040
3121
|
get configured() {
|
|
3041
3122
|
return this._isConfigured;
|
|
3042
3123
|
}
|
|
3043
|
-
get loadFnConfigured() {
|
|
3044
|
-
return this._loadFnConfigured;
|
|
3045
|
-
}
|
|
3046
3124
|
get changeFnConfigured() {
|
|
3047
3125
|
return this._changeFnConfigured;
|
|
3048
3126
|
}
|
|
@@ -3065,7 +3143,6 @@ class ColumnsController {
|
|
|
3065
3143
|
if (config) {
|
|
3066
3144
|
if (config.load) {
|
|
3067
3145
|
this._loadFn = config.load;
|
|
3068
|
-
this._loadFnConfigured = true;
|
|
3069
3146
|
}
|
|
3070
3147
|
if (config.change) {
|
|
3071
3148
|
this._changeFn = config.change;
|
|
@@ -3104,10 +3181,14 @@ class ColumnsController {
|
|
|
3104
3181
|
*/
|
|
3105
3182
|
loadRemoteColumnConfigs() {
|
|
3106
3183
|
return this._loadFn()
|
|
3107
|
-
.pipe(tap((
|
|
3184
|
+
.pipe(tap((column) => {
|
|
3108
3185
|
this._columnsFetched = true;
|
|
3109
|
-
this.updateVisibilityForCols(
|
|
3110
|
-
this.updateCustomizableForCols(
|
|
3186
|
+
this.updateVisibilityForCols(column);
|
|
3187
|
+
this.updateCustomizableForCols(column);
|
|
3188
|
+
}), tap(() => {
|
|
3189
|
+
if (this._persistance.columnsEnabled) {
|
|
3190
|
+
this.updateVisibilityForCols(this._persistance.getColumns());
|
|
3191
|
+
}
|
|
3111
3192
|
}), takeUntil(this._destroy$));
|
|
3112
3193
|
}
|
|
3113
3194
|
/**
|
|
@@ -3516,7 +3597,6 @@ class DataController {
|
|
|
3516
3597
|
}
|
|
3517
3598
|
|
|
3518
3599
|
class ExternalParamsController {
|
|
3519
|
-
_router;
|
|
3520
3600
|
_route;
|
|
3521
3601
|
_persistance;
|
|
3522
3602
|
_paginator;
|
|
@@ -3529,8 +3609,7 @@ class ExternalParamsController {
|
|
|
3529
3609
|
sortDirection: null,
|
|
3530
3610
|
};
|
|
3531
3611
|
_destroy$ = new Subject();
|
|
3532
|
-
constructor(
|
|
3533
|
-
this._router = _router;
|
|
3612
|
+
constructor(_route, _persistance, _paginator, _sorting, _queryParamsEnabled) {
|
|
3534
3613
|
this._route = _route;
|
|
3535
3614
|
this._persistance = _persistance;
|
|
3536
3615
|
this._paginator = _paginator;
|
|
@@ -3548,7 +3627,7 @@ class ExternalParamsController {
|
|
|
3548
3627
|
};
|
|
3549
3628
|
}
|
|
3550
3629
|
get _enabled() {
|
|
3551
|
-
return this._queryParamsEnabled || this._persistance.
|
|
3630
|
+
return this._queryParamsEnabled || this._persistance.filtersEnabled;
|
|
3552
3631
|
}
|
|
3553
3632
|
get _page() {
|
|
3554
3633
|
return this._externalParams.page;
|
|
@@ -3564,9 +3643,11 @@ class ExternalParamsController {
|
|
|
3564
3643
|
}
|
|
3565
3644
|
initialize() {
|
|
3566
3645
|
// Restore from localStorage parameters if persistance enabled
|
|
3567
|
-
if (this._persistance.
|
|
3568
|
-
this._restorePaginationParams(this._persistance.
|
|
3569
|
-
|
|
3646
|
+
if (this._persistance.pagingEnabled) {
|
|
3647
|
+
this._restorePaginationParams(this._persistance.getPaging());
|
|
3648
|
+
}
|
|
3649
|
+
if (this._persistance.sortingEnabled) {
|
|
3650
|
+
this._restoreSortingParams(this._persistance.getSorting());
|
|
3570
3651
|
}
|
|
3571
3652
|
// Restore from queryParams and override if persistance already had values for those params
|
|
3572
3653
|
if (this._queryParamsEnabled) {
|
|
@@ -3638,12 +3719,12 @@ class ExternalParamsController {
|
|
|
3638
3719
|
sortDirection: direction,
|
|
3639
3720
|
});
|
|
3640
3721
|
}
|
|
3641
|
-
if (this._persistance.
|
|
3722
|
+
if (this._persistance.filtersEnabled) {
|
|
3642
3723
|
if (name && direction) {
|
|
3643
|
-
this._persistance.
|
|
3724
|
+
this._persistance.setSorting({ sortName: name, sortDirection: direction });
|
|
3644
3725
|
}
|
|
3645
3726
|
else {
|
|
3646
|
-
this._persistance.
|
|
3727
|
+
this._persistance.setSorting(null);
|
|
3647
3728
|
}
|
|
3648
3729
|
}
|
|
3649
3730
|
}
|
|
@@ -3651,8 +3732,8 @@ class ExternalParamsController {
|
|
|
3651
3732
|
if (this._queryParamsEnabled) {
|
|
3652
3733
|
this._replaceState(params);
|
|
3653
3734
|
}
|
|
3654
|
-
if (this._persistance.
|
|
3655
|
-
this._persistance.
|
|
3735
|
+
if (this._persistance.filtersEnabled) {
|
|
3736
|
+
this._persistance.setPaging(params);
|
|
3656
3737
|
}
|
|
3657
3738
|
}
|
|
3658
3739
|
_replaceState(data) {
|
|
@@ -4263,7 +4344,6 @@ class List {
|
|
|
4263
4344
|
_el;
|
|
4264
4345
|
_config;
|
|
4265
4346
|
_selectionDialog;
|
|
4266
|
-
_router;
|
|
4267
4347
|
_route;
|
|
4268
4348
|
_persistance;
|
|
4269
4349
|
_inDialog;
|
|
@@ -4292,11 +4372,11 @@ class List {
|
|
|
4292
4372
|
style;
|
|
4293
4373
|
hasRowActions;
|
|
4294
4374
|
rowActionsHover = false;
|
|
4295
|
-
paging
|
|
4296
|
-
columns
|
|
4297
|
-
actions
|
|
4298
|
-
dataController
|
|
4299
|
-
sorting
|
|
4375
|
+
paging;
|
|
4376
|
+
columns;
|
|
4377
|
+
actions;
|
|
4378
|
+
dataController;
|
|
4379
|
+
sorting;
|
|
4300
4380
|
externalParams;
|
|
4301
4381
|
selection;
|
|
4302
4382
|
filterConfig = null;
|
|
@@ -4322,14 +4402,18 @@ class List {
|
|
|
4322
4402
|
_groupCellConfig;
|
|
4323
4403
|
_cellConfig;
|
|
4324
4404
|
_footerConfig;
|
|
4325
|
-
constructor(_el, _config = {}, _selectionDialog,
|
|
4405
|
+
constructor(_el, _config = {}, _selectionDialog, _route, _persistance, _inDialog) {
|
|
4326
4406
|
this._el = _el;
|
|
4327
4407
|
this._config = _config;
|
|
4328
4408
|
this._selectionDialog = _selectionDialog;
|
|
4329
|
-
this._router = _router;
|
|
4330
4409
|
this._route = _route;
|
|
4331
4410
|
this._persistance = _persistance;
|
|
4332
4411
|
this._inDialog = _inDialog;
|
|
4412
|
+
this.columns = new ColumnsController(this._persistance);
|
|
4413
|
+
this.actions = new ActionsController();
|
|
4414
|
+
this.paging = new PaginationController();
|
|
4415
|
+
this.dataController = new DataController();
|
|
4416
|
+
this.sorting = new SortingController();
|
|
4333
4417
|
this._initialize(_config);
|
|
4334
4418
|
this._headerConfig = new StyleConfig(_config.header);
|
|
4335
4419
|
this._groupCellConfig = new StyleConfig(_config.cell);
|
|
@@ -4673,7 +4757,7 @@ class List {
|
|
|
4673
4757
|
}
|
|
4674
4758
|
}
|
|
4675
4759
|
_initExternalParamsController() {
|
|
4676
|
-
this.externalParams = new ExternalParamsController(this.
|
|
4760
|
+
this.externalParams = new ExternalParamsController(this._route, this._persistance, this.paging, this.sorting, this.queryParam);
|
|
4677
4761
|
}
|
|
4678
4762
|
/**
|
|
4679
4763
|
* Subscribe to fetch$ event with debounce
|
|
@@ -4715,7 +4799,7 @@ class List {
|
|
|
4715
4799
|
}
|
|
4716
4800
|
return { params, query };
|
|
4717
4801
|
}), switchMap(({ params, query }) => {
|
|
4718
|
-
if (
|
|
4802
|
+
if (!this.columns.columnsFetched) {
|
|
4719
4803
|
return this.columns.loadRemoteColumnConfigs()
|
|
4720
4804
|
.pipe(mapTo({ params, query }));
|
|
4721
4805
|
}
|
|
@@ -4978,19 +5062,6 @@ class List {
|
|
|
4978
5062
|
}
|
|
4979
5063
|
}
|
|
4980
5064
|
|
|
4981
|
-
const FILTER_STORE_KEY = 'fs-list-persist';
|
|
4982
|
-
class PersistanceController extends FsPersistanceStore {
|
|
4983
|
-
STORE_KEY = FILTER_STORE_KEY;
|
|
4984
|
-
constructor(_store, _route) {
|
|
4985
|
-
super(_store, _route);
|
|
4986
|
-
}
|
|
4987
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.7", ngImport: i0, type: PersistanceController, deps: [{ token: i1$3.FsStore }, { token: i6.ActivatedRoute }], target: i0.ɵɵFactoryTarget.Injectable });
|
|
4988
|
-
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "18.2.7", ngImport: i0, type: PersistanceController });
|
|
4989
|
-
}
|
|
4990
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.7", ngImport: i0, type: PersistanceController, decorators: [{
|
|
4991
|
-
type: Injectable
|
|
4992
|
-
}], ctorParameters: () => [{ type: i1$3.FsStore }, { type: i6.ActivatedRoute }] });
|
|
4993
|
-
|
|
4994
5065
|
class FsListHeadingDirective {
|
|
4995
5066
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.7", ngImport: i0, type: FsListHeadingDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive });
|
|
4996
5067
|
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "18.2.7", type: FsListHeadingDirective, selector: "[fs-list-heading],[fsListHeading]", ngImport: i0 });
|
|
@@ -5304,13 +5375,13 @@ class FsListSavedFiltersComponent {
|
|
|
5304
5375
|
// viewContainerRef: this._vcRef,
|
|
5305
5376
|
// });
|
|
5306
5377
|
}
|
|
5307
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.7", ngImport: i0, type: FsListSavedFiltersComponent, deps: [{ token:
|
|
5308
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.2.7", type: FsListSavedFiltersComponent, selector: "fs-list-saved-filters", ngImport: i0, template: "<ng-container *ngIf=\"savedFiltersEnabled$ | async\"><!--\n -->, saved filter\n <fs-filter-saved-filters-menu (manage)=\"showManageDialog()\"></fs-filter-saved-filters-menu>\n</ng-container>\n", dependencies: [{ kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: i2.FsSavedFiltersMenuComponent, selector: "fs-filter-saved-filters-menu", outputs: ["clear"] }, { kind: "pipe", type: i1.AsyncPipe, name: "async" }] });
|
|
5378
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.7", ngImport: i0, type: FsListSavedFiltersComponent, deps: [{ token: i3$3.MatDialog }, { token: i2.ExternalParamsController }, { token: i0.ViewContainerRef }], target: i0.ɵɵFactoryTarget.Component });
|
|
5379
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.2.7", type: FsListSavedFiltersComponent, selector: "fs-list-saved-filters", ngImport: i0, template: "<ng-container *ngIf=\"savedFiltersEnabled$ | async\"><!--\r\n -->, saved filter\r\n <fs-filter-saved-filters-menu (manage)=\"showManageDialog()\"></fs-filter-saved-filters-menu>\r\n</ng-container>\r\n", dependencies: [{ kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: i2.FsSavedFiltersMenuComponent, selector: "fs-filter-saved-filters-menu", outputs: ["clear"] }, { kind: "pipe", type: i1.AsyncPipe, name: "async" }] });
|
|
5309
5380
|
}
|
|
5310
5381
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.7", ngImport: i0, type: FsListSavedFiltersComponent, decorators: [{
|
|
5311
5382
|
type: Component,
|
|
5312
|
-
args: [{ selector: 'fs-list-saved-filters', template: "<ng-container *ngIf=\"savedFiltersEnabled$ | async\"><!--\n -->, saved filter\n <fs-filter-saved-filters-menu (manage)=\"showManageDialog()\"></fs-filter-saved-filters-menu>\n</ng-container>\n" }]
|
|
5313
|
-
}], ctorParameters: () => [{ type:
|
|
5383
|
+
args: [{ selector: 'fs-list-saved-filters', template: "<ng-container *ngIf=\"savedFiltersEnabled$ | async\"><!--\r\n -->, saved filter\r\n <fs-filter-saved-filters-menu (manage)=\"showManageDialog()\"></fs-filter-saved-filters-menu>\r\n</ng-container>\r\n" }]
|
|
5384
|
+
}], ctorParameters: () => [{ type: i3$3.MatDialog }, { type: i2.ExternalParamsController }, { type: i0.ViewContainerRef }] });
|
|
5314
5385
|
|
|
5315
5386
|
class FsStatusComponent {
|
|
5316
5387
|
list;
|
|
@@ -5425,11 +5496,11 @@ class FsListLoaderComponent {
|
|
|
5425
5496
|
}
|
|
5426
5497
|
}
|
|
5427
5498
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.7", ngImport: i0, type: FsListLoaderComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
5428
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.2.7", type: FsListLoaderComponent, selector: "fs-list-loader", inputs: { columns: "columns", loaderLines: "loaderLines" }, usesOnChanges: true, ngImport: i0, template: "<table>\n <thead>\n <tr>\n <th *ngFor=\"let col of cols; let column = index\" [width]=\"widths[column] + '%'\">\n <div class=\"fs-skeleton-placeholder\" [style.width]=\"(placeholderWidths[0][column]/2) + '%'\"></div>\n </th>\n </tr>\n </thead>\n <tbody>\n <tr *ngFor=\"let row of rows; let index=index\">\n <td *ngFor=\"let col of cols; let column = index\">\n <div class=\"fs-skeleton-placeholder\" [style.width]=\"placeholderWidths[index][column] + '%'\"></div>\n </td>\n </tr>\n </tbody>\n</table>\n", styles: ["table{width:100%;border-spacing:0}.fs-skeleton-placeholder{opacity:.5}:host ::ng-deep tbody tr:hover td{background:transparent}\n"], dependencies: [{ kind: "directive", type: i1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
5499
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.2.7", type: FsListLoaderComponent, selector: "fs-list-loader", inputs: { columns: "columns", loaderLines: "loaderLines" }, usesOnChanges: true, ngImport: i0, template: "<table>\r\n <thead>\r\n <tr>\r\n <th *ngFor=\"let col of cols; let column = index\" [width]=\"widths[column] + '%'\">\r\n <div class=\"fs-skeleton-placeholder\" [style.width]=\"(placeholderWidths[0][column]/2) + '%'\"></div>\r\n </th>\r\n </tr>\r\n </thead>\r\n <tbody>\r\n <tr *ngFor=\"let row of rows; let index=index\">\r\n <td *ngFor=\"let col of cols; let column = index\">\r\n <div class=\"fs-skeleton-placeholder\" [style.width]=\"placeholderWidths[index][column] + '%'\"></div>\r\n </td>\r\n </tr>\r\n </tbody>\r\n</table>\r\n", styles: ["table{width:100%;border-spacing:0}.fs-skeleton-placeholder{opacity:.5}:host ::ng-deep tbody tr:hover td{background:transparent}\n"], dependencies: [{ kind: "directive", type: i1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
5429
5500
|
}
|
|
5430
5501
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.7", ngImport: i0, type: FsListLoaderComponent, decorators: [{
|
|
5431
5502
|
type: Component,
|
|
5432
|
-
args: [{ selector: 'fs-list-loader', changeDetection: ChangeDetectionStrategy.OnPush, template: "<table>\n <thead>\n <tr>\n <th *ngFor=\"let col of cols; let column = index\" [width]=\"widths[column] + '%'\">\n <div class=\"fs-skeleton-placeholder\" [style.width]=\"(placeholderWidths[0][column]/2) + '%'\"></div>\n </th>\n </tr>\n </thead>\n <tbody>\n <tr *ngFor=\"let row of rows; let index=index\">\n <td *ngFor=\"let col of cols; let column = index\">\n <div class=\"fs-skeleton-placeholder\" [style.width]=\"placeholderWidths[index][column] + '%'\"></div>\n </td>\n </tr>\n </tbody>\n</table>\n", styles: ["table{width:100%;border-spacing:0}.fs-skeleton-placeholder{opacity:.5}:host ::ng-deep tbody tr:hover td{background:transparent}\n"] }]
|
|
5503
|
+
args: [{ selector: 'fs-list-loader', changeDetection: ChangeDetectionStrategy.OnPush, template: "<table>\r\n <thead>\r\n <tr>\r\n <th *ngFor=\"let col of cols; let column = index\" [width]=\"widths[column] + '%'\">\r\n <div class=\"fs-skeleton-placeholder\" [style.width]=\"(placeholderWidths[0][column]/2) + '%'\"></div>\r\n </th>\r\n </tr>\r\n </thead>\r\n <tbody>\r\n <tr *ngFor=\"let row of rows; let index=index\">\r\n <td *ngFor=\"let col of cols; let column = index\">\r\n <div class=\"fs-skeleton-placeholder\" [style.width]=\"placeholderWidths[index][column] + '%'\"></div>\r\n </td>\r\n </tr>\r\n </tbody>\r\n</table>\r\n", styles: ["table{width:100%;border-spacing:0}.fs-skeleton-placeholder{opacity:.5}:host ::ng-deep tbody tr:hover td{background:transparent}\n"] }]
|
|
5433
5504
|
}], propDecorators: { columns: [{
|
|
5434
5505
|
type: Input
|
|
5435
5506
|
}], loaderLines: [{
|
|
@@ -5452,7 +5523,7 @@ class FsPaginationComponent {
|
|
|
5452
5523
|
this.pagination.goLast();
|
|
5453
5524
|
}
|
|
5454
5525
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.7", ngImport: i0, type: FsPaginationComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
5455
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "18.2.7", type: FsPaginationComponent, selector: "fs-list-pagination", inputs: { pagination: "pagination", rows: "rows" }, ngImport: i0, template: "<div class=\"pagination-container\">\n @if (pagination.hasManyStrategy) {\n <ng-container *ngTemplateOutlet=\"strategyMany\"></ng-container>\n } @else if (pagination.loadMoreEnabled) {\n <ng-container *ngTemplateOutlet=\"strategyLoadMore\"></ng-container>\n } @else {\n <ng-container *ngTemplateOutlet=\"strategyOffsetPage\"></ng-container>\n }\n</div>\n<ng-template #strategyLoadMore>\n @if (pagination.hasNextPage) {\n <div class=\"fs-list-load-more\">\n <button\n mat-button\n type=\"button\"\n [class]=\"pagination.loadMoreButtonClass\"\n [color]=\"pagination.loadMoreButtonColor\"\n (click)=\"next()\">\n {{ pagination.loadMoreLabel }}\n </button>\n </div>\n }\n</ng-template>\n<ng-template #strategyOffsetPage>\n @if (pagination.records > pagination.limit) {\n <ng-container *ngIf=\"pagination?.pages\"></ng-container>\n <ng-container\n [ngTemplateOutlet]=\"firstPageButton\"\n [ngTemplateOutletContext]=\"{ disabled: !pagination.hasPrevPage }\">\n </ng-container>\n <ng-container\n [ngTemplateOutlet]=\"prevPageButton\"\n [ngTemplateOutletContext]=\"{ disabled: !pagination.hasPrevPage }\">\n </ng-container>\n <div class=\"number\">\n {{ pagination.page | fsFormatNumber }} of {{ pagination.pages | fsFormatNumber }}\n </div>\n <ng-container\n [ngTemplateOutlet]=\"nextPageButton\"\n [ngTemplateOutletContext]=\"{ disabled: !pagination.hasNextPage }\">\n </ng-container>\n <ng-container\n [ngTemplateOutlet]=\"lastPageButton\"\n [ngTemplateOutletContext]=\"{ disabled: !pagination.hasNextPage }\">\n </ng-container>\n }\n</ng-template>\n<ng-template #strategyMany>\n @if (!(pagination.pageRecords ===0 && pagination.page === 1)) {\n <ng-container\n [ngTemplateOutlet]=\"firstPageButton\"\n [ngTemplateOutletContext]=\"{ disabled: !pagination.hasPrevPage }\">\n </ng-container>\n <ng-container\n [ngTemplateOutlet]=\"prevPageButton\"\n [ngTemplateOutletContext]=\"{ disabled: !pagination.hasPrevPage }\">\n </ng-container>\n <div class=\"number\">\n {{ pagination.page }}\n </div>\n <ng-container\n [ngTemplateOutlet]=\"nextPageButton\"\n [ngTemplateOutletContext]=\"{ disabled: !pagination.hasNextPage }\">\n </ng-container>\n <ng-container\n [ngTemplateOutlet]=\"lastPageButton\"\n [ngTemplateOutletContext]=\"{ disabled: true }\">\n </ng-container>\n }\n</ng-template>\n<ng-template\n #firstPageButton\n let-disabled=\"disabled\">\n <a\n matRipple\n [matRippleRadius]=\"15\"\n [matRippleCentered]=\"true\"\n class=\"first\"\n [class.disabled]=\"disabled\"\n (click)=\"first()\">\n <mat-icon>\n first_page\n </mat-icon>\n </a>\n</ng-template>\n<ng-template\n #prevPageButton\n let-disabled=\"disabled\">\n <a\n matRipple\n [matRippleRadius]=\"15\"\n [matRippleCentered]=\"true\"\n class=\"previous\"\n [class.disabled]=\"disabled\"\n (click)=\"prev()\">\n <mat-icon>\n keyboard_arrow_left\n </mat-icon>\n </a>\n</ng-template>\n<ng-template\n #nextPageButton\n let-disabled=\"disabled\">\n <a\n matRipple\n [matRippleRadius]=\"15\"\n [matRippleCentered]=\"true\"\n class=\"next\"\n [class.disabled]=\"disabled\"\n (click)=\"next()\">\n <mat-icon>\n keyboard_arrow_right\n </mat-icon>\n </a>\n</ng-template>\n<ng-template\n #lastPageButton\n let-disabled=\"disabled\">\n <a\n matRipple\n [matRippleRadius]=\"15\"\n [matRippleCentered]=\"true\"\n class=\"last\"\n [class.disabled]=\"disabled\"\n (click)=\"last()\">\n <mat-icon>\n last_page\n </mat-icon>\n </a>\n</ng-template>", styles: [".pagination-container{display:flex;justify-content:center;align-items:center;-webkit-user-select:none;user-select:none;width:100%}a{text-align:center;color:#000000de;text-decoration:none;font-size:15px;cursor:pointer;display:flex}a:not(.page){padding:10px}a.disabled{pointer-events:none;cursor:default;color:#d8d8d8}.number{font-size:90%}.fs-list-load-more button{width:100%;margin-top:10px}\n"], dependencies: [{ kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i1.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { 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$1.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "directive", type: i4$2.MatRipple, selector: "[mat-ripple], [matRipple]", inputs: ["matRippleColor", "matRippleUnbounded", "matRippleCentered", "matRippleRadius", "matRippleAnimation", "matRippleDisabled", "matRippleTrigger"], exportAs: ["matRipple"] }, { kind: "pipe", type: i5$
|
|
5526
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "18.2.7", type: FsPaginationComponent, selector: "fs-list-pagination", inputs: { pagination: "pagination", rows: "rows" }, ngImport: i0, template: "<div class=\"pagination-container\">\n @if (pagination.hasManyStrategy) {\n <ng-container *ngTemplateOutlet=\"strategyMany\"></ng-container>\n } @else if (pagination.loadMoreEnabled) {\n <ng-container *ngTemplateOutlet=\"strategyLoadMore\"></ng-container>\n } @else {\n <ng-container *ngTemplateOutlet=\"strategyOffsetPage\"></ng-container>\n }\n</div>\n<ng-template #strategyLoadMore>\n @if (pagination.hasNextPage) {\n <div class=\"fs-list-load-more\">\n <button\n mat-button\n type=\"button\"\n [class]=\"pagination.loadMoreButtonClass\"\n [color]=\"pagination.loadMoreButtonColor\"\n (click)=\"next()\">\n {{ pagination.loadMoreLabel }}\n </button>\n </div>\n }\n</ng-template>\n<ng-template #strategyOffsetPage>\n @if (pagination.records > pagination.limit) {\n <ng-container *ngIf=\"pagination?.pages\"></ng-container>\n <ng-container\n [ngTemplateOutlet]=\"firstPageButton\"\n [ngTemplateOutletContext]=\"{ disabled: !pagination.hasPrevPage }\">\n </ng-container>\n <ng-container\n [ngTemplateOutlet]=\"prevPageButton\"\n [ngTemplateOutletContext]=\"{ disabled: !pagination.hasPrevPage }\">\n </ng-container>\n <div class=\"number\">\n {{ pagination.page | fsFormatNumber }} of {{ pagination.pages | fsFormatNumber }}\n </div>\n <ng-container\n [ngTemplateOutlet]=\"nextPageButton\"\n [ngTemplateOutletContext]=\"{ disabled: !pagination.hasNextPage }\">\n </ng-container>\n <ng-container\n [ngTemplateOutlet]=\"lastPageButton\"\n [ngTemplateOutletContext]=\"{ disabled: !pagination.hasNextPage }\">\n </ng-container>\n }\n</ng-template>\n<ng-template #strategyMany>\n @if (!(pagination.pageRecords ===0 && pagination.page === 1)) {\n <ng-container\n [ngTemplateOutlet]=\"firstPageButton\"\n [ngTemplateOutletContext]=\"{ disabled: !pagination.hasPrevPage }\">\n </ng-container>\n <ng-container\n [ngTemplateOutlet]=\"prevPageButton\"\n [ngTemplateOutletContext]=\"{ disabled: !pagination.hasPrevPage }\">\n </ng-container>\n <div class=\"number\">\n {{ pagination.page }}\n </div>\n <ng-container\n [ngTemplateOutlet]=\"nextPageButton\"\n [ngTemplateOutletContext]=\"{ disabled: !pagination.hasNextPage }\">\n </ng-container>\n <ng-container\n [ngTemplateOutlet]=\"lastPageButton\"\n [ngTemplateOutletContext]=\"{ disabled: true }\">\n </ng-container>\n }\n</ng-template>\n<ng-template\n #firstPageButton\n let-disabled=\"disabled\">\n <a\n matRipple\n [matRippleRadius]=\"15\"\n [matRippleCentered]=\"true\"\n class=\"first\"\n [class.disabled]=\"disabled\"\n (click)=\"first()\">\n <mat-icon>\n first_page\n </mat-icon>\n </a>\n</ng-template>\n<ng-template\n #prevPageButton\n let-disabled=\"disabled\">\n <a\n matRipple\n [matRippleRadius]=\"15\"\n [matRippleCentered]=\"true\"\n class=\"previous\"\n [class.disabled]=\"disabled\"\n (click)=\"prev()\">\n <mat-icon>\n keyboard_arrow_left\n </mat-icon>\n </a>\n</ng-template>\n<ng-template\n #nextPageButton\n let-disabled=\"disabled\">\n <a\n matRipple\n [matRippleRadius]=\"15\"\n [matRippleCentered]=\"true\"\n class=\"next\"\n [class.disabled]=\"disabled\"\n (click)=\"next()\">\n <mat-icon>\n keyboard_arrow_right\n </mat-icon>\n </a>\n</ng-template>\n<ng-template\n #lastPageButton\n let-disabled=\"disabled\">\n <a\n matRipple\n [matRippleRadius]=\"15\"\n [matRippleCentered]=\"true\"\n class=\"last\"\n [class.disabled]=\"disabled\"\n (click)=\"last()\">\n <mat-icon>\n last_page\n </mat-icon>\n </a>\n</ng-template>", styles: [".pagination-container{display:flex;justify-content:center;align-items:center;-webkit-user-select:none;user-select:none;width:100%}a{text-align:center;color:#000000de;text-decoration:none;font-size:15px;cursor:pointer;display:flex}a:not(.page){padding:10px}a.disabled{pointer-events:none;cursor:default;color:#d8d8d8}.number{font-size:90%}.fs-list-load-more button{width:100%;margin-top:10px}\n"], dependencies: [{ kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i1.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { 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$1.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "directive", type: i4$2.MatRipple, selector: "[mat-ripple], [matRipple]", inputs: ["matRippleColor", "matRippleUnbounded", "matRippleCentered", "matRippleRadius", "matRippleAnimation", "matRippleDisabled", "matRippleTrigger"], exportAs: ["matRipple"] }, { kind: "pipe", type: i5$2.FsFormatNumberPipe, name: "fsFormatNumber" }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
5456
5527
|
}
|
|
5457
5528
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.7", ngImport: i0, type: FsPaginationComponent, decorators: [{
|
|
5458
5529
|
type: Component,
|
|
@@ -5487,17 +5558,13 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.7", ngImpor
|
|
|
5487
5558
|
class FsListComponent {
|
|
5488
5559
|
reorderController;
|
|
5489
5560
|
_config;
|
|
5490
|
-
_dialogRef;
|
|
5491
|
-
_drawerRef;
|
|
5492
5561
|
_el;
|
|
5493
5562
|
_selectionDialog;
|
|
5494
5563
|
_dialog;
|
|
5495
5564
|
_cdRef;
|
|
5496
5565
|
_groupExpandNotifier;
|
|
5497
|
-
_router;
|
|
5498
5566
|
_route;
|
|
5499
5567
|
_persistance;
|
|
5500
|
-
_location;
|
|
5501
5568
|
classFsList = true;
|
|
5502
5569
|
rowHoverHighlight;
|
|
5503
5570
|
set config(config) {
|
|
@@ -5517,8 +5584,8 @@ class FsListComponent {
|
|
|
5517
5584
|
_listColumnDirectives;
|
|
5518
5585
|
_filterRef;
|
|
5519
5586
|
_filterParamsReady = false;
|
|
5520
|
-
_inDialog;
|
|
5521
5587
|
_destroy = new Subject();
|
|
5588
|
+
_injector = inject(Injector);
|
|
5522
5589
|
set filterReference(component) {
|
|
5523
5590
|
this._filterRef = component;
|
|
5524
5591
|
this.list.actions.setFilterRef(component);
|
|
@@ -5539,21 +5606,18 @@ class FsListComponent {
|
|
|
5539
5606
|
this.list.emptyStateTemplate = template;
|
|
5540
5607
|
}
|
|
5541
5608
|
}
|
|
5542
|
-
|
|
5609
|
+
_dialogRef = inject(MatDialogRef, { optional: true });
|
|
5610
|
+
_drawerRef = inject(DrawerRef, { optional: true });
|
|
5611
|
+
constructor(reorderController, _config, _el, _selectionDialog, _dialog, _cdRef, _groupExpandNotifier, _route, _persistance) {
|
|
5543
5612
|
this.reorderController = reorderController;
|
|
5544
5613
|
this._config = _config;
|
|
5545
|
-
this._dialogRef = _dialogRef;
|
|
5546
|
-
this._drawerRef = _drawerRef;
|
|
5547
5614
|
this._el = _el;
|
|
5548
5615
|
this._selectionDialog = _selectionDialog;
|
|
5549
5616
|
this._dialog = _dialog;
|
|
5550
5617
|
this._cdRef = _cdRef;
|
|
5551
5618
|
this._groupExpandNotifier = _groupExpandNotifier;
|
|
5552
|
-
this._router = _router;
|
|
5553
5619
|
this._route = _route;
|
|
5554
5620
|
this._persistance = _persistance;
|
|
5555
|
-
this._location = _location;
|
|
5556
|
-
this._inDialog = !!this._dialogRef || !!this._drawerRef;
|
|
5557
5621
|
}
|
|
5558
5622
|
/**
|
|
5559
5623
|
* Return reference for filter
|
|
@@ -5690,6 +5754,9 @@ class FsListComponent {
|
|
|
5690
5754
|
this._cdRef.markForCheck();
|
|
5691
5755
|
}
|
|
5692
5756
|
}
|
|
5757
|
+
get inDialog() {
|
|
5758
|
+
return !!this._dialogRef || !!this._drawerRef;
|
|
5759
|
+
}
|
|
5693
5760
|
/**
|
|
5694
5761
|
* Initialize config for list
|
|
5695
5762
|
*
|
|
@@ -5716,7 +5783,7 @@ class FsListComponent {
|
|
|
5716
5783
|
this._restorePersistance(listConfig.persist);
|
|
5717
5784
|
}
|
|
5718
5785
|
this._updateCustomizeAction(listConfig.actions);
|
|
5719
|
-
this.list = new List(this._el, listConfig, this._selectionDialog, this.
|
|
5786
|
+
this.list = new List(this._el, listConfig, this._selectionDialog, this._route, this._persistance, this.inDialog);
|
|
5720
5787
|
this.rowHoverHighlight = this.list.rowHoverHighlight;
|
|
5721
5788
|
this._waitFirstLoad();
|
|
5722
5789
|
this.reorderController.initWithConfig(config.reorder, this.list.dataController, this.list.actions, this.list.selection);
|
|
@@ -5739,6 +5806,7 @@ class FsListComponent {
|
|
|
5739
5806
|
actionClickFn(null);
|
|
5740
5807
|
}
|
|
5741
5808
|
this._dialog.open(CustomizeColsDialogComponent, {
|
|
5809
|
+
injector: this._injector,
|
|
5742
5810
|
data: {
|
|
5743
5811
|
columns: this.list.columns.columnsForDialog,
|
|
5744
5812
|
changeFn: this.list.columns.changeFn,
|
|
@@ -5798,10 +5866,9 @@ class FsListComponent {
|
|
|
5798
5866
|
}
|
|
5799
5867
|
}
|
|
5800
5868
|
_restorePersistance(persistConfig) {
|
|
5801
|
-
|
|
5802
|
-
this._persistance.setConfig(persistConfig, namespace, this._inDialog);
|
|
5869
|
+
this._persistance.init(persistConfig, this.inDialog);
|
|
5803
5870
|
}
|
|
5804
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.7", ngImport: i0, type: FsListComponent, deps: [{ token: ReorderController }, { token: FS_LIST_CONFIG, optional: true }, { token:
|
|
5871
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.7", ngImport: i0, type: FsListComponent, deps: [{ token: ReorderController }, { token: FS_LIST_CONFIG, optional: true }, { token: i0.ElementRef }, { token: i2$2.SelectionDialog }, { token: i3$3.MatDialog }, { token: i0.ChangeDetectorRef }, { token: GroupExpandNotifierService }, { token: i5.ActivatedRoute }, { token: PersistanceController }], target: i0.ɵɵFactoryTarget.Component });
|
|
5805
5872
|
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "18.2.7", 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: [
|
|
5806
5873
|
GroupExpandNotifierService,
|
|
5807
5874
|
PersistanceController,
|
|
@@ -5820,11 +5887,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.7", ngImpor
|
|
|
5820
5887
|
}, {
|
|
5821
5888
|
type: Inject,
|
|
5822
5889
|
args: [FS_LIST_CONFIG]
|
|
5823
|
-
}] }, { type:
|
|
5824
|
-
type: Optional
|
|
5825
|
-
}] }, { type: i3$3.DrawerRef, decorators: [{
|
|
5826
|
-
type: Optional
|
|
5827
|
-
}] }, { type: i0.ElementRef }, { type: i4$3.SelectionDialog }, { type: i1$2.MatDialog }, { type: i0.ChangeDetectorRef }, { type: GroupExpandNotifierService }, { type: i6.Router }, { type: i6.ActivatedRoute }, { type: PersistanceController }, { type: i1.Location }], propDecorators: { classFsList: [{
|
|
5890
|
+
}] }, { type: i0.ElementRef }, { type: i2$2.SelectionDialog }, { type: i3$3.MatDialog }, { type: i0.ChangeDetectorRef }, { type: GroupExpandNotifierService }, { type: i5.ActivatedRoute }, { type: PersistanceController }], propDecorators: { classFsList: [{
|
|
5828
5891
|
type: HostBinding,
|
|
5829
5892
|
args: ['class.fs-list']
|
|
5830
5893
|
}], rowHoverHighlight: [{
|
|
@@ -5920,11 +5983,11 @@ class FsListManageSavedFiltersComponent {
|
|
|
5920
5983
|
};
|
|
5921
5984
|
}
|
|
5922
5985
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.7", ngImport: i0, type: FsListManageSavedFiltersComponent, deps: [{ token: i2.ExternalParamsController }], target: i0.ɵɵFactoryTarget.Component });
|
|
5923
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.2.7", type: FsListManageSavedFiltersComponent, selector: "ng-component", ngImport: i0, template: "<h1 mat-dialog-title>\n Manage Saved Filters\n</h1>\n<div mat-dialog-content>\n <fs-list [config]=\"config\">\n <fs-list-column name=\"name\" title=\"Name\">\n <ng-template fs-list-cell let-row=\"row\">\n {{ row.name }}\n </ng-template>\n </fs-list-column>\n </fs-list>\n</div>\n<div mat-dialog-actions>\n <button mat-button\n [mat-dialog-close]=\"null\"\n type=\"button\"\n color=\"primary\">\n Done\n </button>\n</div>\n", dependencies: [{ kind: "component", type: i3.MatButton, selector: " button[mat-button], button[mat-raised-button], button[mat-flat-button], button[mat-stroked-button] ", exportAs: ["matButton"] }, { kind: "directive", type:
|
|
5986
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.2.7", type: FsListManageSavedFiltersComponent, selector: "ng-component", ngImport: i0, template: "<h1 mat-dialog-title>\r\n Manage Saved Filters\r\n</h1>\r\n<div mat-dialog-content>\r\n <fs-list [config]=\"config\">\r\n <fs-list-column name=\"name\" title=\"Name\">\r\n <ng-template fs-list-cell let-row=\"row\">\r\n {{ row.name }}\r\n </ng-template>\r\n </fs-list-column>\r\n </fs-list>\r\n</div>\r\n<div mat-dialog-actions>\r\n <button mat-button\r\n [mat-dialog-close]=\"null\"\r\n type=\"button\"\r\n color=\"primary\">\r\n Done\r\n </button>\r\n</div>\r\n", dependencies: [{ kind: "component", type: i3.MatButton, selector: " button[mat-button], button[mat-raised-button], button[mat-flat-button], button[mat-stroked-button] ", exportAs: ["matButton"] }, { kind: "directive", type: i3$3.MatDialogClose, selector: "[mat-dialog-close], [matDialogClose]", inputs: ["aria-label", "type", "mat-dialog-close", "matDialogClose"], exportAs: ["matDialogClose"] }, { kind: "directive", type: i3$3.MatDialogTitle, selector: "[mat-dialog-title], [matDialogTitle]", inputs: ["id"], exportAs: ["matDialogTitle"] }, { kind: "directive", type: i3$3.MatDialogActions, selector: "[mat-dialog-actions], mat-dialog-actions, [matDialogActions]", inputs: ["align"] }, { kind: "directive", type: i3$3.MatDialogContent, selector: "[mat-dialog-content], mat-dialog-content, [matDialogContent]" }, { kind: "component", type: FsListComponent, selector: "fs-list", inputs: ["config", "loaderLines"], outputs: ["filtersReady"] }, { kind: "directive", type: FsListColumnDirective, selector: "fs-list-column", inputs: ["show", "title", "name", "customizable", "sortable", "sortableDefault", "sortableDirection", "direction", "align", "width", "class"] }, { kind: "directive", type: FsListCellDirective, selector: "[fs-list-cell]", inputs: ["colspan", "align", "class"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
5924
5987
|
}
|
|
5925
5988
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.7", ngImport: i0, type: FsListManageSavedFiltersComponent, decorators: [{
|
|
5926
5989
|
type: Component,
|
|
5927
|
-
args: [{ changeDetection: ChangeDetectionStrategy.OnPush, template: "<h1 mat-dialog-title>\n Manage Saved Filters\n</h1>\n<div mat-dialog-content>\n <fs-list [config]=\"config\">\n <fs-list-column name=\"name\" title=\"Name\">\n <ng-template fs-list-cell let-row=\"row\">\n {{ row.name }}\n </ng-template>\n </fs-list-column>\n </fs-list>\n</div>\n<div mat-dialog-actions>\n <button mat-button\n [mat-dialog-close]=\"null\"\n type=\"button\"\n color=\"primary\">\n Done\n </button>\n</div>\n" }]
|
|
5990
|
+
args: [{ changeDetection: ChangeDetectionStrategy.OnPush, template: "<h1 mat-dialog-title>\r\n Manage Saved Filters\r\n</h1>\r\n<div mat-dialog-content>\r\n <fs-list [config]=\"config\">\r\n <fs-list-column name=\"name\" title=\"Name\">\r\n <ng-template fs-list-cell let-row=\"row\">\r\n {{ row.name }}\r\n </ng-template>\r\n </fs-list-column>\r\n </fs-list>\r\n</div>\r\n<div mat-dialog-actions>\r\n <button mat-button\r\n [mat-dialog-close]=\"null\"\r\n type=\"button\"\r\n color=\"primary\">\r\n Done\r\n </button>\r\n</div>\r\n" }]
|
|
5928
5991
|
}], ctorParameters: () => [{ type: i2.ExternalParamsController }] });
|
|
5929
5992
|
|
|
5930
5993
|
class FsListContentDirective {
|