@firestitch/list 12.18.2 → 12.18.3
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 +12 -5
- package/app/components/list/list.component.d.ts +19 -17
- package/app/fs-list.module.d.ts +1 -1
- package/app/interfaces/listconfig.interface.d.ts +13 -34
- package/bundles/firestitch-list.umd.js +4786 -4775
- package/bundles/firestitch-list.umd.js.map +1 -1
- package/esm2015/app/classes/list-controller.js +32 -27
- package/esm2015/app/classes/persistance-controller.js +3 -3
- package/esm2015/app/classes/reorder-controller.js +3 -3
- package/esm2015/app/components/body/body.component.js +3 -3
- package/esm2015/app/components/body/row/actions/actions.component.js +3 -3
- package/esm2015/app/components/body/row/cell/cell.component.js +3 -3
- package/esm2015/app/components/body/row/inline-action/inline-action.component.js +3 -3
- package/esm2015/app/components/body/row/menu-action/menu-action.component.js +3 -3
- package/esm2015/app/components/body/row/row.component.js +3 -3
- package/esm2015/app/components/customize-cols/customize-cols.component.js +3 -3
- package/esm2015/app/components/footer/footer-row/footer-cell/footer-cell.component.js +3 -3
- package/esm2015/app/components/footer/footer-row/footer-row.component.js +3 -3
- package/esm2015/app/components/footer/footer.component.js +3 -3
- package/esm2015/app/components/head/head-cell/head-cell.component.js +3 -3
- package/esm2015/app/components/head/head.component.js +3 -3
- package/esm2015/app/components/list/list.component.js +42 -40
- package/esm2015/app/components/loader/loader.component.js +3 -3
- package/esm2015/app/components/manage-saved-filters/manage-saved-filters.component.js +3 -3
- package/esm2015/app/components/pagination/pagination.component.js +3 -3
- package/esm2015/app/components/saved-filters/saved-filters.component.js +3 -3
- package/esm2015/app/components/status/status.component.js +3 -3
- package/esm2015/app/directives/cell/cell.directive.js +3 -3
- package/esm2015/app/directives/column/column.directive.js +3 -3
- package/esm2015/app/directives/content/content.directive.js +3 -3
- package/esm2015/app/directives/content-init/content-init.directive.js +3 -3
- package/esm2015/app/directives/draggable-list/draggable-list.directive.js +3 -3
- package/esm2015/app/directives/draggable-row/draggable-row.directive.js +3 -3
- package/esm2015/app/directives/empty-state/empty-state.directive.js +3 -3
- package/esm2015/app/directives/footer/footer.directive.js +3 -3
- package/esm2015/app/directives/group-expand-trigger/group-expand-trigger.directive.js +3 -3
- package/esm2015/app/directives/group-footer/group-footer.directive.js +3 -3
- package/esm2015/app/directives/group-header/group-header.directive.js +3 -3
- package/esm2015/app/directives/header/header.directive.js +3 -3
- package/esm2015/app/directives/heading/heading.directive.js +3 -3
- package/esm2015/app/directives/heading-container/heading-container.directive.js +3 -3
- package/esm2015/app/directives/subheading/subheading.directive.js +3 -3
- package/esm2015/app/fs-list.module.js +42 -41
- package/esm2015/app/interfaces/listconfig.interface.js +1 -1
- package/esm2015/app/pipes/action-label.js +3 -3
- package/esm2015/app/services/group-expand-notifier.service.js +3 -3
- package/fesm2015/firestitch-list.js +4251 -4240
- package/fesm2015/firestitch-list.js.map +1 -1
- package/package.json +1 -1
|
@@ -7,14 +7,14 @@ import { BehaviorSubject, Observable, Subject } from 'rxjs';
|
|
|
7
7
|
import { FsListAfterContentInitFn, FsListAfterFetchFn, FsListAfterInitFn, FsListBeforeFetchFn, FsListConfig, FsListEmptyStateConfig, FsListFetchFn, FsListFetchSubscription, FsListNoResultsConfig, FsListPersitance, FsListRestoreConfig, FsListScrollableConfig, FsListTrackByFn } from '../interfaces';
|
|
8
8
|
import { ColumnsController } from './columns-controller';
|
|
9
9
|
import { DataController } from './data-controller';
|
|
10
|
+
import { ExternalParamsController } from './external-params-controller';
|
|
10
11
|
import { ActionsController } from './index';
|
|
11
12
|
import { PaginationController } from './pagination-controller';
|
|
13
|
+
import { PersistanceController } from './persistance-controller';
|
|
12
14
|
import { SelectionController } from './selection-controller';
|
|
13
15
|
import { SortingController } from './sorting-controller';
|
|
14
|
-
import { ExternalParamsController } from './external-params-controller';
|
|
15
|
-
import { PersistanceController } from './persistance-controller';
|
|
16
16
|
export declare class List {
|
|
17
|
-
private
|
|
17
|
+
private _el;
|
|
18
18
|
private config;
|
|
19
19
|
private fsScroll;
|
|
20
20
|
private selectionDialog;
|
|
@@ -77,13 +77,14 @@ export declare class List {
|
|
|
77
77
|
private readonly _cellConfig;
|
|
78
78
|
private readonly _footerConfig;
|
|
79
79
|
private _fsScrollSubscription;
|
|
80
|
-
constructor(
|
|
80
|
+
constructor(_el: ElementRef, config: FsListConfig, fsScroll: FsScrollService, selectionDialog: SelectionDialog, router: Router, route: ActivatedRoute, persistance: PersistanceController, inDialog: boolean);
|
|
81
81
|
get hasSavedFilters(): boolean;
|
|
82
82
|
get filtersQuery(): Record<string, any>;
|
|
83
83
|
get activeFiltersCount$(): Observable<number>;
|
|
84
84
|
fetchRemote(query: any): any;
|
|
85
85
|
/**
|
|
86
86
|
* Transform templates for using
|
|
87
|
+
*
|
|
87
88
|
* @param templates
|
|
88
89
|
*/
|
|
89
90
|
tranformTemplatesToColumns(templates: any): void;
|
|
@@ -96,17 +97,20 @@ export declare class List {
|
|
|
96
97
|
hasData(trackBy: FsListTrackByFn): boolean;
|
|
97
98
|
/**
|
|
98
99
|
* Toggle group mode status
|
|
100
|
+
*
|
|
99
101
|
* @param value
|
|
100
102
|
*/
|
|
101
103
|
groupEnabled(value: boolean): void;
|
|
102
104
|
destroy(): void;
|
|
103
105
|
/**
|
|
104
106
|
* Do initialization of table
|
|
107
|
+
*
|
|
105
108
|
* @param config
|
|
106
109
|
*/
|
|
107
110
|
private initialize;
|
|
108
111
|
/**
|
|
109
112
|
* Just init options by default it it wasn't specified
|
|
113
|
+
*
|
|
110
114
|
* @param config
|
|
111
115
|
*/
|
|
112
116
|
private initDefaultOptions;
|
|
@@ -116,6 +120,7 @@ export declare class List {
|
|
|
116
120
|
private initRestore;
|
|
117
121
|
/**
|
|
118
122
|
* Init paging
|
|
123
|
+
*
|
|
119
124
|
* @param pagingConfig
|
|
120
125
|
* @param loadMore
|
|
121
126
|
*/
|
|
@@ -142,14 +147,16 @@ export declare class List {
|
|
|
142
147
|
/**
|
|
143
148
|
* Update and watch filter changes
|
|
144
149
|
*/
|
|
145
|
-
private
|
|
150
|
+
private _initFilters;
|
|
146
151
|
/**
|
|
147
152
|
* Callback when Filter has been initialized
|
|
153
|
+
*
|
|
148
154
|
* @param filters
|
|
149
155
|
*/
|
|
150
156
|
private filterInit;
|
|
151
157
|
/**
|
|
152
158
|
* Callback when Filter has been changed
|
|
159
|
+
*
|
|
153
160
|
* @param filterQuery
|
|
154
161
|
* @param filterSort
|
|
155
162
|
*/
|
|
@@ -1,27 +1,28 @@
|
|
|
1
1
|
import { Location } from '@angular/common';
|
|
2
|
-
import { AfterContentInit, ChangeDetectorRef, ElementRef, EventEmitter, OnDestroy, OnInit, TemplateRef } from '@angular/core';
|
|
3
|
-
import { MatDialog, MatDialogRef } from '@angular/material/dialog';
|
|
2
|
+
import { AfterContentInit, ChangeDetectorRef, ElementRef, EventEmitter, OnDestroy, OnInit, QueryList, TemplateRef } from '@angular/core';
|
|
4
3
|
import { ActivatedRoute, Router } from '@angular/router';
|
|
4
|
+
import { MatDialog, MatDialogRef } from '@angular/material/dialog';
|
|
5
5
|
import { DrawerRef } from '@firestitch/drawer';
|
|
6
6
|
import { FilterComponent } from '@firestitch/filter';
|
|
7
7
|
import { FsScrollService } from '@firestitch/scroll';
|
|
8
8
|
import { SelectionDialog } from '@firestitch/selection';
|
|
9
9
|
import { List } from '../../classes/list-controller';
|
|
10
|
-
import { ReorderController } from '../../classes/reorder-controller';
|
|
11
10
|
import { PersistanceController } from '../../classes/persistance-controller';
|
|
11
|
+
import { ReorderController } from '../../classes/reorder-controller';
|
|
12
|
+
import { FsListColumnDirective } from '../../directives/column/column.directive';
|
|
12
13
|
import { FsListAbstractRow, FsListAction, FsListConfig, FsListSelectionConfig, FsListTrackByFn, FsListTrackByTargetRowFn } from '../../interfaces';
|
|
13
14
|
import { GroupExpandNotifierService } from '../../services/group-expand-notifier.service';
|
|
14
15
|
import * as i0 from "@angular/core";
|
|
15
16
|
export declare class FsListComponent implements OnInit, OnDestroy, AfterContentInit {
|
|
16
17
|
reorderController: ReorderController;
|
|
17
18
|
private _defaultOptions;
|
|
18
|
-
private
|
|
19
|
+
private _scroll;
|
|
19
20
|
private _dialogRef;
|
|
20
21
|
private _drawerRef;
|
|
21
22
|
private _el;
|
|
22
|
-
private
|
|
23
|
-
private
|
|
24
|
-
private
|
|
23
|
+
private _selectionDialog;
|
|
24
|
+
private _dialog;
|
|
25
|
+
private _cdRef;
|
|
25
26
|
private _groupExpandNotifier;
|
|
26
27
|
private _router;
|
|
27
28
|
private _route;
|
|
@@ -32,36 +33,35 @@ export declare class FsListComponent implements OnInit, OnDestroy, AfterContentI
|
|
|
32
33
|
set config(config: FsListConfig);
|
|
33
34
|
loaderLines: number;
|
|
34
35
|
filtersReady: EventEmitter<void>;
|
|
36
|
+
headingTemplate: TemplateRef<any>;
|
|
37
|
+
headingContainerTemplate: TemplateRef<any>;
|
|
38
|
+
subheadingTemplate: TemplateRef<any>;
|
|
35
39
|
list: List;
|
|
36
40
|
keywordVisible: boolean;
|
|
37
41
|
rowRemoved: EventEmitter<any>;
|
|
38
42
|
firstLoad: boolean;
|
|
39
|
-
private
|
|
43
|
+
private _listColumnDirectives;
|
|
40
44
|
private _filterRef;
|
|
41
45
|
private _filterParamsReady;
|
|
42
46
|
private _inDialog;
|
|
43
47
|
private _destroy;
|
|
44
|
-
|
|
48
|
+
set filterReference(component: any);
|
|
45
49
|
/**
|
|
46
50
|
* Set columns to config
|
|
47
51
|
* Create Column Model instances
|
|
48
|
-
*
|
|
49
52
|
*/
|
|
50
|
-
|
|
53
|
+
set columnTemplates(listColumnDirectives: QueryList<FsListColumnDirective>);
|
|
51
54
|
private set _emptyStateTemplate(value);
|
|
52
|
-
|
|
53
|
-
headingContainerTemplate: TemplateRef<any>;
|
|
54
|
-
subheadingTemplate: TemplateRef<any>;
|
|
55
|
-
constructor(reorderController: ReorderController, _defaultOptions: any, fsScroll: FsScrollService, _dialogRef: MatDialogRef<any>, _drawerRef: DrawerRef<any>, _el: ElementRef, selectionDialog: SelectionDialog, dialog: MatDialog, cdRef: ChangeDetectorRef, _groupExpandNotifier: GroupExpandNotifierService, _router: Router, _route: ActivatedRoute, _persistance: PersistanceController, _location: Location);
|
|
55
|
+
constructor(reorderController: ReorderController, _defaultOptions: FsListConfig, _scroll: FsScrollService, _dialogRef: MatDialogRef<any>, _drawerRef: DrawerRef<any>, _el: ElementRef, _selectionDialog: SelectionDialog, _dialog: MatDialog, _cdRef: ChangeDetectorRef, _groupExpandNotifier: GroupExpandNotifierService, _router: Router, _route: ActivatedRoute, _persistance: PersistanceController, _location: Location);
|
|
56
56
|
/**
|
|
57
57
|
* Return reference for filter
|
|
58
58
|
*/
|
|
59
59
|
get filterRef(): FilterComponent;
|
|
60
|
+
set groupEnabled(value: boolean);
|
|
60
61
|
get groupEnabled(): boolean;
|
|
61
62
|
get hasFilterKeyword(): boolean;
|
|
62
63
|
get hasStatus(): boolean;
|
|
63
64
|
get paginatorVisible(): boolean;
|
|
64
|
-
set groupEnabled(value: boolean);
|
|
65
65
|
get filtersQuery(): Record<string, unknown>;
|
|
66
66
|
ngAfterContentInit(): void;
|
|
67
67
|
ngOnInit(): void;
|
|
@@ -100,11 +100,13 @@ export declare class FsListComponent implements OnInit, OnDestroy, AfterContentI
|
|
|
100
100
|
private _emitFiltersReadyEvent;
|
|
101
101
|
/**
|
|
102
102
|
* Initialize config for list
|
|
103
|
+
*
|
|
103
104
|
* @param config
|
|
104
105
|
*/
|
|
105
106
|
private _initWithConfig;
|
|
106
107
|
/**
|
|
107
108
|
* Find action with customize flag and re-declare click function for CustomizeColsDialog
|
|
109
|
+
*
|
|
108
110
|
* @param actions
|
|
109
111
|
*/
|
|
110
112
|
private _updateCustomizeAction;
|
|
@@ -118,5 +120,5 @@ export declare class FsListComponent implements OnInit, OnDestroy, AfterContentI
|
|
|
118
120
|
private _configMergeCustomizer;
|
|
119
121
|
private _restorePersistance;
|
|
120
122
|
static ɵfac: i0.ɵɵFactoryDeclaration<FsListComponent, [null, { optional: true; }, { optional: true; }, { optional: true; }, { optional: true; }, null, null, null, null, null, null, null, null, null]>;
|
|
121
|
-
static ɵcmp: i0.ɵɵComponentDeclaration<FsListComponent, "fs-list", never, { "config": "config"; "loaderLines": "loaderLines"; }, { "filtersReady": "filtersReady"; }, ["
|
|
123
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<FsListComponent, "fs-list", never, { "config": "config"; "loaderLines": "loaderLines"; }, { "filtersReady": "filtersReady"; }, ["headingTemplate", "headingContainerTemplate", "subheadingTemplate", "_emptyStateTemplate", "columnTemplates"], ["[fs-list-content]"]>;
|
|
122
124
|
}
|
package/app/fs-list.module.d.ts
CHANGED
|
@@ -57,4 +57,4 @@ export declare class FsListModule {
|
|
|
57
57
|
static ɵmod: i0.ɵɵNgModuleDeclaration<FsListModule, [typeof i1.FsListComponent, typeof i2.FsRowComponent, typeof i3.FsRowActionsComponent, typeof i4.FsRowInlineActionComponent, typeof i5.FsRowMenuActionComponent, typeof i6.FsCellComponent, typeof i7.FsFooterRowComponent, typeof i8.FsFooterCellComponent, typeof i9.FsStatusComponent, typeof i10.FsListLoaderComponent, typeof i11.FsListSavedFiltersComponent, typeof i12.FsListManageSavedFiltersComponent, typeof i13.FsHeadComponent, typeof i14.FsHeadCellComponent, typeof i15.FsBodyComponent, typeof i16.FsFooterComponent, typeof i17.FsPaginationComponent, typeof i18.FsListColumnDirective, typeof i19.FsListCellDirective, typeof i20.FsListHeaderDirective, typeof i21.FsListFooterDirective, typeof i22.FsListGroupHeaderDirective, typeof i23.FsListGroupFooterDirective, typeof i24.FsListGroupExpandTriggerDirective, typeof i25.FsListDraggableListDirective, typeof i26.FsListDraggableRowDirective, typeof i27.FsListEmptyStateDirective, typeof i28.FsListContentDirective, typeof i29.FsListContentInitDirective, typeof i30.FsListSubheadingDirective, typeof i31.FsListHeadingDirective, typeof i32.FsListHeadingContainerDirective, typeof i33.CustomizeColsDialogComponent, typeof i34.ActionLabelPipe], [typeof i35.CommonModule, typeof i36.RouterModule, typeof i37.MatButtonModule, typeof i38.MatIconModule, typeof i39.MatMenuModule, typeof i40.MatProgressSpinnerModule, typeof i41.MatCheckboxModule, typeof i42.MatRippleModule, typeof i43.FsFilterModule, typeof i44.FsMenuModule, typeof i45.FsScrollModule, typeof i46.FsPromptModule, typeof i47.MatDialogModule, typeof i48.MatTooltipModule, typeof i49.FsFileModule, typeof i50.FsCommonModule], [typeof i1.FsListComponent, typeof i2.FsRowComponent, typeof i6.FsCellComponent, typeof i10.FsListLoaderComponent, typeof i18.FsListColumnDirective, typeof i19.FsListCellDirective, typeof i20.FsListHeaderDirective, typeof i21.FsListFooterDirective, typeof i22.FsListGroupHeaderDirective, typeof i23.FsListGroupFooterDirective, typeof i24.FsListGroupExpandTriggerDirective, typeof i27.FsListEmptyStateDirective, typeof i28.FsListContentDirective, typeof i30.FsListSubheadingDirective, typeof i31.FsListHeadingDirective, typeof i32.FsListHeadingContainerDirective]>;
|
|
58
58
|
static ɵinj: i0.ɵɵInjectorDeclaration<FsListModule>;
|
|
59
59
|
}
|
|
60
|
-
export declare function
|
|
60
|
+
export declare function fsListConfigFactory(config: FsListConfig): any;
|
|
@@ -28,7 +28,7 @@ export interface FsListConfig {
|
|
|
28
28
|
queryParam?: boolean;
|
|
29
29
|
paging?: FsPaging | false;
|
|
30
30
|
loadMore?: FsListLoadMoreConfig | boolean;
|
|
31
|
-
columnDefaults?:
|
|
31
|
+
columnDefaults?: any;
|
|
32
32
|
filters?: (IFilterConfigItem | IFilterConfigDateItem)[];
|
|
33
33
|
savedFilters?: IFilterSavedFiltersConfig;
|
|
34
34
|
persist?: FsListPersitance;
|
|
@@ -58,6 +58,7 @@ export interface FsListConfig {
|
|
|
58
58
|
emptyState?: FsListEmptyStateConfig;
|
|
59
59
|
filterInit?: ChangeFn;
|
|
60
60
|
filterChange?: ChangeFn;
|
|
61
|
+
reload?: boolean;
|
|
61
62
|
style?: 'line' | 'card';
|
|
62
63
|
}
|
|
63
64
|
export interface FsListGroupConfig {
|
|
@@ -177,15 +178,9 @@ export interface FsListRowAction {
|
|
|
177
178
|
} | boolean;
|
|
178
179
|
restore?: boolean;
|
|
179
180
|
}
|
|
180
|
-
export
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
export interface FsListRowActionLinkFn {
|
|
184
|
-
(row: FsListAbstractRow): FsListRowActionLink;
|
|
185
|
-
}
|
|
186
|
-
export interface FsListRowActionLabelFn {
|
|
187
|
-
(row: FsListAbstractRow): string;
|
|
188
|
-
}
|
|
181
|
+
export declare type FsListRowActionFileFn = (selection: FsFile | FsFile[], row: FsListAbstractRow, index: number) => void;
|
|
182
|
+
export declare type FsListRowActionLinkFn = (row: FsListAbstractRow) => FsListRowActionLink;
|
|
183
|
+
export declare type FsListRowActionLabelFn = (row: FsListAbstractRow) => string;
|
|
189
184
|
export interface FsListRowActionFile {
|
|
190
185
|
select: FsListRowActionFileFn;
|
|
191
186
|
error?: (error: unknown) => void;
|
|
@@ -205,30 +200,14 @@ export interface FsListRowActionLink {
|
|
|
205
200
|
export interface FsListAbstractRow {
|
|
206
201
|
[name: string]: any;
|
|
207
202
|
}
|
|
208
|
-
export
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
export
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
export
|
|
215
|
-
|
|
216
|
-
}
|
|
217
|
-
export interface FsListColumnChangeFn {
|
|
218
|
-
(listColumns: FsListColumn[]): void;
|
|
219
|
-
}
|
|
220
|
-
export interface FsListColumnTitleFn {
|
|
221
|
-
(name: string, defaultTitle: string): string;
|
|
222
|
-
}
|
|
223
|
-
export interface FsListColumnTooltipFn {
|
|
224
|
-
(name: string, show: boolean, disabled: boolean): string;
|
|
225
|
-
}
|
|
226
|
-
export interface FsListColumnDisabledFn {
|
|
227
|
-
(name: string): boolean;
|
|
228
|
-
}
|
|
229
|
-
export interface FsListColumnSelectedFn {
|
|
230
|
-
(name: string, show: boolean): boolean;
|
|
231
|
-
}
|
|
203
|
+
export declare type FsListTrackByFn = (row: FsListAbstractRow, index?: number) => boolean;
|
|
204
|
+
export declare type FsListTrackByTargetRowFn = (listRow: FsListAbstractRow, targetRow?: FsListAbstractRow) => boolean;
|
|
205
|
+
export declare type FsListColumnLoadFn = () => Observable<FsListColumn[]>;
|
|
206
|
+
export declare type FsListColumnChangeFn = (listColumns: FsListColumn[]) => void;
|
|
207
|
+
export declare type FsListColumnTitleFn = (name: string, defaultTitle: string) => string;
|
|
208
|
+
export declare type FsListColumnTooltipFn = (name: string, show: boolean, disabled: boolean) => string;
|
|
209
|
+
export declare type FsListColumnDisabledFn = (name: string) => boolean;
|
|
210
|
+
export declare type FsListColumnSelectedFn = (name: string, show: boolean) => boolean;
|
|
232
211
|
export interface FsListColumnConfig {
|
|
233
212
|
load?: FsListColumnLoadFn;
|
|
234
213
|
change?: FsListColumnChangeFn;
|