@firestitch/list 13.0.4 → 13.0.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/app/classes/actions-controller.d.ts +20 -20
- package/app/classes/columns-controller.d.ts +71 -71
- package/app/classes/data-controller.d.ts +91 -91
- package/app/classes/external-params-controller.d.ts +32 -32
- package/app/classes/index.d.ts +2 -2
- package/app/classes/list-controller.d.ts +191 -191
- package/app/classes/pagination-controller.d.ts +198 -198
- package/app/classes/persistance-controller.d.ts +10 -10
- package/app/classes/reorder-controller.d.ts +68 -68
- package/app/classes/selection-controller.d.ts +155 -155
- package/app/classes/sorting-controller.d.ts +65 -65
- package/app/components/body/body.component.d.ts +28 -28
- package/app/components/body/row/actions/actions.component.d.ts +36 -36
- package/app/components/body/row/cell/cell.component.d.ts +22 -22
- package/app/components/body/row/inline-action/inline-action.component.d.ts +13 -13
- package/app/components/body/row/menu-action/menu-action.component.d.ts +20 -20
- package/app/components/body/row/row.component.d.ts +85 -85
- package/app/components/customize-cols/customize-cols.component.d.ts +17 -17
- package/app/components/footer/footer-row/footer-cell/footer-cell.component.d.ts +7 -7
- package/app/components/footer/footer-row/footer-row.component.d.ts +14 -14
- package/app/components/footer/footer.component.d.ts +15 -15
- package/app/components/head/head-cell/head-cell.component.d.ts +14 -14
- package/app/components/head/head.component.d.ts +49 -49
- package/app/components/list/list.component.d.ts +128 -128
- package/app/components/loader/loader.component.d.ts +14 -14
- package/app/components/manage-saved-filters/manage-saved-filters.component.d.ts +13 -13
- package/app/components/pagination/pagination.component.d.ts +14 -14
- package/app/components/saved-filters/saved-filters.component.d.ts +15 -15
- package/app/components/status/status.component.d.ts +21 -21
- package/app/directives/cell/cell.directive.d.ts +8 -8
- package/app/directives/column/column.directive.d.ts +37 -33
- package/app/directives/content/content.directive.d.ts +5 -5
- package/app/directives/content-init/content-init.directive.d.ts +9 -9
- package/app/directives/draggable-list/draggable-list.directive.d.ts +95 -95
- package/app/directives/draggable-row/draggable-row.directive.d.ts +23 -23
- package/app/directives/empty-state/empty-state.directive.d.ts +5 -5
- package/app/directives/footer/footer.directive.d.ts +8 -8
- package/app/directives/group-expand-trigger/group-expand-trigger.directive.d.ts +10 -10
- package/app/directives/group-footer/group-footer.directive.d.ts +6 -6
- package/app/directives/group-header/group-header.directive.d.ts +6 -6
- package/app/directives/header/header.directive.d.ts +8 -8
- package/app/directives/heading/heading.directive.d.ts +5 -5
- package/app/directives/heading-container/heading-container.directive.d.ts +5 -5
- package/app/directives/index.d.ts +3 -3
- package/app/directives/subheading/subheading.directive.d.ts +5 -5
- package/app/enums/button-type.enum.d.ts +7 -7
- package/app/enums/page-change-type.enum.d.ts +4 -4
- package/app/enums/pagination-strategy.enum.d.ts +5 -5
- package/app/enums/row-type.enum.d.ts +6 -6
- package/app/enums/state.enum.d.ts +9 -9
- package/app/fs-list.module.d.ts +60 -60
- package/app/fs-list.providers.d.ts +3 -3
- package/app/interfaces/cellconfig.interface.d.ts +5 -5
- package/app/interfaces/column-config.interface.d.ts +2 -2
- package/app/interfaces/draggable-list.interface.d.ts +7 -7
- package/app/interfaces/external-params.interface.d.ts +13 -13
- package/app/interfaces/index.d.ts +4 -4
- package/app/interfaces/listconfig.interface.d.ts +247 -247
- package/app/interfaces/pagination-state.interface.d.ts +9 -9
- package/app/interfaces/pagination.interface.d.ts +13 -13
- package/app/interfaces/sorting-change-event.interface.d.ts +4 -4
- package/app/models/column-async-attribute.d.ts +5 -5
- package/app/models/column-attributes.d.ts +39 -39
- package/app/models/column.model.d.ts +61 -60
- package/app/models/row/base-row.d.ts +13 -13
- package/app/models/row/child-row.d.ts +12 -12
- package/app/models/row/group-footer-row.d.ts +10 -10
- package/app/models/row/group-row.d.ts +16 -16
- package/app/models/row/simple-row.d.ts +5 -5
- package/app/models/row-action.model.d.ts +29 -29
- package/app/models/row.d.ts +34 -34
- package/app/models/styleConfig.model.d.ts +31 -31
- package/app/pipes/action-label.d.ts +8 -8
- package/app/pipes/index.d.ts +1 -1
- package/app/services/group-expand-notifier.service.d.ts +11 -11
- package/{esm2015/app/classes/actions-controller.js → esm2020/app/classes/actions-controller.mjs} +55 -55
- package/{esm2015/app/classes/columns-controller.js → esm2020/app/classes/columns-controller.mjs} +205 -205
- package/esm2020/app/classes/data-controller.mjs +367 -0
- package/esm2020/app/classes/external-params-controller.mjs +147 -0
- package/{esm2015/app/classes/index.js → esm2020/app/classes/index.mjs} +3 -3
- package/esm2020/app/classes/list-controller.mjs +752 -0
- package/{esm2015/app/classes/pagination-controller.js → esm2020/app/classes/pagination-controller.mjs} +478 -479
- package/{esm2015/app/classes/persistance-controller.js → esm2020/app/classes/persistance-controller.mjs} +19 -19
- package/esm2020/app/classes/reorder-controller.mjs +182 -0
- package/esm2020/app/classes/selection-controller.mjs +468 -0
- package/{esm2015/app/classes/sorting-controller.js → esm2020/app/classes/sorting-controller.mjs} +183 -183
- package/esm2020/app/components/body/body.component.mjs +64 -0
- package/esm2020/app/components/body/row/actions/actions.component.mjs +97 -0
- package/esm2020/app/components/body/row/cell/cell.component.mjs +107 -0
- package/esm2020/app/components/body/row/inline-action/inline-action.component.mjs +33 -0
- package/esm2020/app/components/body/row/menu-action/menu-action.component.mjs +46 -0
- package/esm2020/app/components/body/row/row.component.mjs +323 -0
- package/esm2020/app/components/customize-cols/customize-cols.component.mjs +68 -0
- package/esm2020/app/components/footer/footer-row/footer-cell/footer-cell.component.mjs +16 -0
- package/esm2020/app/components/footer/footer-row/footer-row.component.mjs +28 -0
- package/esm2020/app/components/footer/footer.component.mjs +31 -0
- package/esm2020/app/components/head/head-cell/head-cell.component.mjs +29 -0
- package/esm2020/app/components/head/head.component.mjs +103 -0
- package/esm2020/app/components/list/list.component.mjs +391 -0
- package/esm2020/app/components/loader/loader.component.mjs +40 -0
- package/esm2020/app/components/manage-saved-filters/manage-saved-filters.component.mjs +76 -0
- package/esm2020/app/components/pagination/pagination.component.mjs +37 -0
- package/esm2020/app/components/saved-filters/saved-filters.component.mjs +29 -0
- package/esm2020/app/components/status/status.component.mjs +66 -0
- package/{esm2015/app/directives/cell/cell.directive.js → esm2020/app/directives/cell/cell.directive.mjs} +18 -18
- package/esm2020/app/directives/column/column.directive.mjs +121 -0
- package/{esm2015/app/directives/content/content.directive.js → esm2020/app/directives/content/content.directive.mjs} +13 -13
- package/{esm2015/app/directives/content-init/content-init.directive.js → esm2020/app/directives/content-init/content-init.directive.mjs} +22 -22
- package/esm2020/app/directives/draggable-list/draggable-list.directive.mjs +328 -0
- package/esm2020/app/directives/draggable-row/draggable-row.directive.mjs +78 -0
- package/{esm2015/app/directives/empty-state/empty-state.directive.js → esm2020/app/directives/empty-state/empty-state.directive.mjs} +13 -13
- package/{esm2015/app/directives/footer/footer.directive.js → esm2020/app/directives/footer/footer.directive.mjs} +18 -18
- package/{esm2015/app/directives/group-expand-trigger/group-expand-trigger.directive.js → esm2020/app/directives/group-expand-trigger/group-expand-trigger.directive.mjs} +26 -26
- package/{esm2015/app/directives/group-footer/group-footer.directive.js → esm2020/app/directives/group-footer/group-footer.directive.mjs} +14 -14
- package/{esm2015/app/directives/group-header/group-header.directive.js → esm2020/app/directives/group-header/group-header.directive.mjs} +14 -14
- package/{esm2015/app/directives/header/header.directive.js → esm2020/app/directives/header/header.directive.mjs} +18 -18
- package/{esm2015/app/directives/heading/heading.directive.js → esm2020/app/directives/heading/heading.directive.mjs} +13 -13
- package/{esm2015/app/directives/heading-container/heading-container.directive.js → esm2020/app/directives/heading-container/heading-container.directive.mjs} +13 -13
- package/{esm2015/app/directives/index.js → esm2020/app/directives/index.mjs} +4 -4
- package/{esm2015/app/directives/subheading/subheading.directive.js → esm2020/app/directives/subheading/subheading.directive.mjs} +13 -13
- package/{esm2015/app/enums/button-type.enum.js → esm2020/app/enums/button-type.enum.mjs} +9 -9
- package/{esm2015/app/enums/page-change-type.enum.js → esm2020/app/enums/page-change-type.enum.mjs} +6 -6
- package/{esm2015/app/enums/pagination-strategy.enum.js → esm2020/app/enums/pagination-strategy.enum.mjs} +7 -7
- package/{esm2015/app/enums/row-type.enum.js → esm2020/app/enums/row-type.enum.mjs} +7 -7
- package/{esm2015/app/enums/state.enum.js → esm2020/app/enums/state.enum.mjs} +11 -11
- package/{esm2015/app/fs-list.module.js → esm2020/app/fs-list.module.mjs} +246 -246
- package/{esm2015/app/fs-list.providers.js → esm2020/app/fs-list.providers.mjs} +4 -4
- package/{esm2015/app/interfaces/cellconfig.interface.js → esm2020/app/interfaces/cellconfig.interface.mjs} +2 -2
- package/{esm2015/app/interfaces/column-config.interface.js → esm2020/app/interfaces/column-config.interface.mjs} +1 -1
- package/{esm2015/app/interfaces/draggable-list.interface.js → esm2020/app/interfaces/draggable-list.interface.mjs} +2 -2
- package/esm2020/app/interfaces/external-params.interface.mjs +2 -0
- package/{esm2015/app/interfaces/index.js → esm2020/app/interfaces/index.mjs} +5 -5
- package/{esm2015/app/interfaces/listconfig.interface.js → esm2020/app/interfaces/listconfig.interface.mjs} +1 -1
- package/{esm2015/app/interfaces/pagination-state.interface.js → esm2020/app/interfaces/pagination-state.interface.mjs} +1 -1
- package/esm2020/app/interfaces/pagination.interface.mjs +2 -0
- package/{esm2015/app/interfaces/sorting-change-event.interface.js → esm2020/app/interfaces/sorting-change-event.interface.mjs} +2 -2
- package/{esm2015/app/models/column-async-attribute.js → esm2020/app/models/column-async-attribute.mjs} +13 -13
- package/esm2020/app/models/column-attributes.mjs +132 -0
- package/esm2020/app/models/column.model.mjs +164 -0
- package/{esm2015/app/models/row/base-row.js → esm2020/app/models/row/base-row.mjs} +23 -23
- package/{esm2015/app/models/row/child-row.js → esm2020/app/models/row/child-row.mjs} +28 -28
- package/{esm2015/app/models/row/group-footer-row.js → esm2020/app/models/row/group-footer-row.mjs} +20 -20
- package/{esm2015/app/models/row/group-row.js → esm2020/app/models/row/group-row.mjs} +44 -44
- package/{esm2015/app/models/row/simple-row.js → esm2020/app/models/row/simple-row.mjs} +10 -10
- package/esm2020/app/models/row-action.model.mjs +90 -0
- package/{esm2015/app/models/row.js → esm2020/app/models/row.mjs} +88 -88
- package/{esm2015/app/models/styleConfig.model.js → esm2020/app/models/styleConfig.model.mjs} +75 -75
- package/{esm2015/app/pipes/action-label.js → esm2020/app/pipes/action-label.mjs} +17 -17
- package/{esm2015/app/pipes/index.js → esm2020/app/pipes/index.mjs} +1 -1
- package/{esm2015/app/services/group-expand-notifier.service.js → esm2020/app/services/group-expand-notifier.service.mjs} +26 -26
- package/{esm2015/firestitch-list.js → esm2020/firestitch-list.mjs} +4 -4
- package/{esm2015/public_api.js → esm2020/public_api.mjs} +45 -45
- package/fesm2015/{firestitch-list.js → firestitch-list.mjs} +5739 -5805
- package/fesm2015/firestitch-list.mjs.map +1 -0
- package/fesm2020/firestitch-list.mjs +5871 -0
- package/fesm2020/firestitch-list.mjs.map +1 -0
- package/firestitch-list.d.ts +5 -5
- package/package.json +20 -7
- package/public_api.d.ts +41 -41
- package/bundles/firestitch-list.umd.js +0 -7222
- package/bundles/firestitch-list.umd.js.map +0 -1
- package/esm2015/app/classes/data-controller.js +0 -365
- package/esm2015/app/classes/external-params-controller.js +0 -147
- package/esm2015/app/classes/list-controller.js +0 -754
- package/esm2015/app/classes/reorder-controller.js +0 -183
- package/esm2015/app/classes/selection-controller.js +0 -468
- package/esm2015/app/components/body/body.component.js +0 -69
- package/esm2015/app/components/body/row/actions/actions.component.js +0 -102
- package/esm2015/app/components/body/row/cell/cell.component.js +0 -113
- package/esm2015/app/components/body/row/inline-action/inline-action.component.js +0 -37
- package/esm2015/app/components/body/row/menu-action/menu-action.component.js +0 -50
- package/esm2015/app/components/body/row/row.component.js +0 -330
- package/esm2015/app/components/customize-cols/customize-cols.component.js +0 -72
- package/esm2015/app/components/footer/footer-row/footer-cell/footer-cell.component.js +0 -20
- package/esm2015/app/components/footer/footer-row/footer-row.component.js +0 -33
- package/esm2015/app/components/footer/footer.component.js +0 -36
- package/esm2015/app/components/head/head-cell/head-cell.component.js +0 -34
- package/esm2015/app/components/head/head.component.js +0 -108
- package/esm2015/app/components/list/list.component.js +0 -397
- package/esm2015/app/components/loader/loader.component.js +0 -45
- package/esm2015/app/components/manage-saved-filters/manage-saved-filters.component.js +0 -79
- package/esm2015/app/components/pagination/pagination.component.js +0 -42
- package/esm2015/app/components/saved-filters/saved-filters.component.js +0 -32
- package/esm2015/app/components/status/status.component.js +0 -72
- package/esm2015/app/directives/column/column.directive.js +0 -112
- package/esm2015/app/directives/draggable-list/draggable-list.directive.js +0 -330
- package/esm2015/app/directives/draggable-row/draggable-row.directive.js +0 -79
- package/esm2015/app/interfaces/external-params.interface.js +0 -2
- package/esm2015/app/interfaces/pagination.interface.js +0 -2
- package/esm2015/app/models/column-attributes.js +0 -131
- package/esm2015/app/models/column.model.js +0 -163
- package/esm2015/app/models/row-action.model.js +0 -90
- package/fesm2015/firestitch-list.js.map +0 -1
|
@@ -1,191 +1,191 @@
|
|
|
1
|
-
import { ElementRef, TemplateRef } from '@angular/core';
|
|
2
|
-
import { ActivatedRoute, Router } from '@angular/router';
|
|
3
|
-
import { ChangeFn, FilterConfig, IFilterSavedFiltersConfig } from '@firestitch/filter';
|
|
4
|
-
import { FsScrollInstance, FsScrollService } from '@firestitch/scroll';
|
|
5
|
-
import { SelectionDialog } from '@firestitch/selection';
|
|
6
|
-
import { BehaviorSubject, Observable, Subject } from 'rxjs';
|
|
7
|
-
import { FsListAfterContentInitFn, FsListAfterFetchFn, FsListAfterInitFn, FsListBeforeFetchFn, FsListConfig, FsListEmptyStateConfig, FsListFetchFn, FsListFetchSubscription, FsListNoResultsConfig, FsListPersitance, FsListRestoreConfig, FsListScrollableConfig, FsListTrackByFn } from '../interfaces';
|
|
8
|
-
import { ColumnsController } from './columns-controller';
|
|
9
|
-
import { DataController } from './data-controller';
|
|
10
|
-
import { ExternalParamsController } from './external-params-controller';
|
|
11
|
-
import { ActionsController } from './index';
|
|
12
|
-
import { PaginationController } from './pagination-controller';
|
|
13
|
-
import { PersistanceController } from './persistance-controller';
|
|
14
|
-
import { SelectionController } from './selection-controller';
|
|
15
|
-
import { SortingController } from './sorting-controller';
|
|
16
|
-
export declare class List {
|
|
17
|
-
private _el;
|
|
18
|
-
private config;
|
|
19
|
-
private _fsScroll;
|
|
20
|
-
private _selectionDialog;
|
|
21
|
-
private _router;
|
|
22
|
-
private _route;
|
|
23
|
-
private _persistance;
|
|
24
|
-
private _inDialog;
|
|
25
|
-
heading: string;
|
|
26
|
-
trackBy: string;
|
|
27
|
-
subheading: string;
|
|
28
|
-
autoFocus: boolean;
|
|
29
|
-
rowHighlight: boolean;
|
|
30
|
-
rowActionsRaw: any[];
|
|
31
|
-
groupActionsRaw: any[];
|
|
32
|
-
rowClass: any;
|
|
33
|
-
rowEvents: any;
|
|
34
|
-
restore: FsListRestoreConfig;
|
|
35
|
-
persist: FsListPersitance;
|
|
36
|
-
filters: any[];
|
|
37
|
-
filterInitCb: ChangeFn;
|
|
38
|
-
filterChangeCb: ChangeFn;
|
|
39
|
-
savedFilters: IFilterSavedFiltersConfig;
|
|
40
|
-
scrollable: FsListScrollableConfig;
|
|
41
|
-
noResults: FsListNoResultsConfig;
|
|
42
|
-
emptyState: FsListEmptyStateConfig;
|
|
43
|
-
fetchFn: FsListFetchFn;
|
|
44
|
-
beforeFetchFn: FsListBeforeFetchFn;
|
|
45
|
-
afterFetchFn: FsListAfterFetchFn;
|
|
46
|
-
afterContentInit: FsListAfterContentInitFn;
|
|
47
|
-
afterInit: FsListAfterInitFn;
|
|
48
|
-
style: any;
|
|
49
|
-
initialized$: BehaviorSubject<boolean>;
|
|
50
|
-
loading$: BehaviorSubject<boolean>;
|
|
51
|
-
hasRowActions: any;
|
|
52
|
-
paging: PaginationController;
|
|
53
|
-
columns: ColumnsController;
|
|
54
|
-
actions: ActionsController;
|
|
55
|
-
dataController: DataController;
|
|
56
|
-
sorting: SortingController;
|
|
57
|
-
externalParams: ExternalParamsController;
|
|
58
|
-
selection: SelectionController;
|
|
59
|
-
filterConfig: FilterConfig;
|
|
60
|
-
fetchComplete$: Subject<{
|
|
61
|
-
scrollIntoView?: boolean;
|
|
62
|
-
}>;
|
|
63
|
-
filtersReady$: Subject<void>;
|
|
64
|
-
status: boolean;
|
|
65
|
-
chips: boolean;
|
|
66
|
-
filterInput: boolean;
|
|
67
|
-
queryParam: boolean;
|
|
68
|
-
restoreMode: boolean;
|
|
69
|
-
initialFetch: boolean;
|
|
70
|
-
emptyStateEnabled: boolean;
|
|
71
|
-
emptyStateTemplate: TemplateRef<any>;
|
|
72
|
-
fsScrollInstance: FsScrollInstance;
|
|
73
|
-
onDestroy$: Subject<unknown>;
|
|
74
|
-
private _fetch$;
|
|
75
|
-
private readonly _filtersQuery;
|
|
76
|
-
private readonly _activeFiltersCount$;
|
|
77
|
-
private readonly _headerConfig;
|
|
78
|
-
private readonly _groupCellConfig;
|
|
79
|
-
private readonly _cellConfig;
|
|
80
|
-
private readonly _footerConfig;
|
|
81
|
-
private _fsScrollSubscription;
|
|
82
|
-
constructor(_el: ElementRef, config: FsListConfig, _fsScroll: FsScrollService, _selectionDialog: SelectionDialog, _router: Router, _route: ActivatedRoute, _persistance: PersistanceController, _inDialog: boolean);
|
|
83
|
-
get fetch$(): Observable<FsListFetchSubscription | void>;
|
|
84
|
-
get hasSavedFilters(): boolean;
|
|
85
|
-
get filtersQuery(): Record<string, any>;
|
|
86
|
-
get activeFiltersCount$(): Observable<number>;
|
|
87
|
-
fetchRemote(query: any): any;
|
|
88
|
-
/**
|
|
89
|
-
* Transform templates for using
|
|
90
|
-
*
|
|
91
|
-
* @param templates
|
|
92
|
-
*/
|
|
93
|
-
tranformTemplatesToColumns(templates: any): void;
|
|
94
|
-
reload(): void;
|
|
95
|
-
/**
|
|
96
|
-
* Watch page changes
|
|
97
|
-
*/
|
|
98
|
-
subscribe(): void;
|
|
99
|
-
getData(trackBy?: FsListTrackByFn): any[];
|
|
100
|
-
hasData(trackBy: FsListTrackByFn): boolean;
|
|
101
|
-
/**
|
|
102
|
-
* Toggle group mode status
|
|
103
|
-
*
|
|
104
|
-
* @param value
|
|
105
|
-
*/
|
|
106
|
-
groupEnabled(value: boolean): void;
|
|
107
|
-
destroy(): void;
|
|
108
|
-
/**
|
|
109
|
-
* Do initialization of table
|
|
110
|
-
*
|
|
111
|
-
* @param config
|
|
112
|
-
*/
|
|
113
|
-
private _initialize;
|
|
114
|
-
private _initVariables;
|
|
115
|
-
/**
|
|
116
|
-
* Just init options by default it it wasn't specified
|
|
117
|
-
*
|
|
118
|
-
* @param config
|
|
119
|
-
*/
|
|
120
|
-
private _initDefaultOptions;
|
|
121
|
-
/**
|
|
122
|
-
* Init restore row action and append Show Deleted option into filters
|
|
123
|
-
*/
|
|
124
|
-
private _initRestore;
|
|
125
|
-
/**
|
|
126
|
-
* Init paging
|
|
127
|
-
*
|
|
128
|
-
* @param pagingConfig
|
|
129
|
-
* @param loadMore
|
|
130
|
-
*/
|
|
131
|
-
private _initPaging;
|
|
132
|
-
/**
|
|
133
|
-
* Split actions by categories
|
|
134
|
-
*/
|
|
135
|
-
private _initActions;
|
|
136
|
-
private _initSelection;
|
|
137
|
-
private _initializeData;
|
|
138
|
-
private _initGroups;
|
|
139
|
-
private _initExternalParamsController;
|
|
140
|
-
/**
|
|
141
|
-
* Subscribe to fetch$ event with debounce
|
|
142
|
-
*/
|
|
143
|
-
private _listenFetch;
|
|
144
|
-
private _listenRowsRemove;
|
|
145
|
-
/**
|
|
146
|
-
* Lister may have originally hidden columns, but visibility of those columns
|
|
147
|
-
* can be changed programmaticaly in any time
|
|
148
|
-
*/
|
|
149
|
-
private _listenVisibleColumnChanges;
|
|
150
|
-
private _initInfinityScroll;
|
|
151
|
-
/**
|
|
152
|
-
* Update and watch filter changes
|
|
153
|
-
*/
|
|
154
|
-
private _initFilters;
|
|
155
|
-
/**
|
|
156
|
-
* Callback when Filter has been initialized
|
|
157
|
-
*
|
|
158
|
-
* @param filters
|
|
159
|
-
*/
|
|
160
|
-
private _filterInit;
|
|
161
|
-
/**
|
|
162
|
-
* Callback when Filter has been changed
|
|
163
|
-
*
|
|
164
|
-
* @param filterQuery
|
|
165
|
-
* @param filterSort
|
|
166
|
-
*/
|
|
167
|
-
private _filterChange;
|
|
168
|
-
private _checkRestoreFilter;
|
|
169
|
-
private _filterSort;
|
|
170
|
-
private _completeFetch;
|
|
171
|
-
private _completeFetchUpdateSelecton;
|
|
172
|
-
/**
|
|
173
|
-
* Will do some actions if you removed item and item was last on his own page
|
|
174
|
-
*
|
|
175
|
-
* Ex: if list has 3 pages and on third page you have only one item. And you just deleted this item.
|
|
176
|
-
* You must go to second page, but if it was last page and you can't go back -> just reload
|
|
177
|
-
*
|
|
178
|
-
* @param deletedCount
|
|
179
|
-
*/
|
|
180
|
-
private _noDataPaginationUpdate;
|
|
181
|
-
/**
|
|
182
|
-
* Temporary solution, will do auto subscribe if was returned Observable.
|
|
183
|
-
*
|
|
184
|
-
* TODO: MOVE THIS PEACE OF CODE TO SPECIAL PLACE
|
|
185
|
-
*
|
|
186
|
-
* @param restoreClickCallback
|
|
187
|
-
* @param row
|
|
188
|
-
*/
|
|
189
|
-
private _restoreClick;
|
|
190
|
-
private _updateSortingColumns;
|
|
191
|
-
}
|
|
1
|
+
import { ElementRef, TemplateRef } from '@angular/core';
|
|
2
|
+
import { ActivatedRoute, Router } from '@angular/router';
|
|
3
|
+
import { ChangeFn, FilterConfig, IFilterSavedFiltersConfig } from '@firestitch/filter';
|
|
4
|
+
import { FsScrollInstance, FsScrollService } from '@firestitch/scroll';
|
|
5
|
+
import { SelectionDialog } from '@firestitch/selection';
|
|
6
|
+
import { BehaviorSubject, Observable, Subject } from 'rxjs';
|
|
7
|
+
import { FsListAfterContentInitFn, FsListAfterFetchFn, FsListAfterInitFn, FsListBeforeFetchFn, FsListConfig, FsListEmptyStateConfig, FsListFetchFn, FsListFetchSubscription, FsListNoResultsConfig, FsListPersitance, FsListRestoreConfig, FsListScrollableConfig, FsListTrackByFn } from '../interfaces';
|
|
8
|
+
import { ColumnsController } from './columns-controller';
|
|
9
|
+
import { DataController } from './data-controller';
|
|
10
|
+
import { ExternalParamsController } from './external-params-controller';
|
|
11
|
+
import { ActionsController } from './index';
|
|
12
|
+
import { PaginationController } from './pagination-controller';
|
|
13
|
+
import { PersistanceController } from './persistance-controller';
|
|
14
|
+
import { SelectionController } from './selection-controller';
|
|
15
|
+
import { SortingController } from './sorting-controller';
|
|
16
|
+
export declare class List {
|
|
17
|
+
private _el;
|
|
18
|
+
private config;
|
|
19
|
+
private _fsScroll;
|
|
20
|
+
private _selectionDialog;
|
|
21
|
+
private _router;
|
|
22
|
+
private _route;
|
|
23
|
+
private _persistance;
|
|
24
|
+
private _inDialog;
|
|
25
|
+
heading: string;
|
|
26
|
+
trackBy: string;
|
|
27
|
+
subheading: string;
|
|
28
|
+
autoFocus: boolean;
|
|
29
|
+
rowHighlight: boolean;
|
|
30
|
+
rowActionsRaw: any[];
|
|
31
|
+
groupActionsRaw: any[];
|
|
32
|
+
rowClass: any;
|
|
33
|
+
rowEvents: any;
|
|
34
|
+
restore: FsListRestoreConfig;
|
|
35
|
+
persist: FsListPersitance;
|
|
36
|
+
filters: any[];
|
|
37
|
+
filterInitCb: ChangeFn;
|
|
38
|
+
filterChangeCb: ChangeFn;
|
|
39
|
+
savedFilters: IFilterSavedFiltersConfig;
|
|
40
|
+
scrollable: FsListScrollableConfig;
|
|
41
|
+
noResults: FsListNoResultsConfig;
|
|
42
|
+
emptyState: FsListEmptyStateConfig;
|
|
43
|
+
fetchFn: FsListFetchFn;
|
|
44
|
+
beforeFetchFn: FsListBeforeFetchFn;
|
|
45
|
+
afterFetchFn: FsListAfterFetchFn;
|
|
46
|
+
afterContentInit: FsListAfterContentInitFn;
|
|
47
|
+
afterInit: FsListAfterInitFn;
|
|
48
|
+
style: any;
|
|
49
|
+
initialized$: BehaviorSubject<boolean>;
|
|
50
|
+
loading$: BehaviorSubject<boolean>;
|
|
51
|
+
hasRowActions: any;
|
|
52
|
+
paging: PaginationController;
|
|
53
|
+
columns: ColumnsController;
|
|
54
|
+
actions: ActionsController;
|
|
55
|
+
dataController: DataController;
|
|
56
|
+
sorting: SortingController;
|
|
57
|
+
externalParams: ExternalParamsController;
|
|
58
|
+
selection: SelectionController;
|
|
59
|
+
filterConfig: FilterConfig;
|
|
60
|
+
fetchComplete$: Subject<{
|
|
61
|
+
scrollIntoView?: boolean;
|
|
62
|
+
}>;
|
|
63
|
+
filtersReady$: Subject<void>;
|
|
64
|
+
status: boolean;
|
|
65
|
+
chips: boolean;
|
|
66
|
+
filterInput: boolean;
|
|
67
|
+
queryParam: boolean;
|
|
68
|
+
restoreMode: boolean;
|
|
69
|
+
initialFetch: boolean;
|
|
70
|
+
emptyStateEnabled: boolean;
|
|
71
|
+
emptyStateTemplate: TemplateRef<any>;
|
|
72
|
+
fsScrollInstance: FsScrollInstance;
|
|
73
|
+
onDestroy$: Subject<unknown>;
|
|
74
|
+
private _fetch$;
|
|
75
|
+
private readonly _filtersQuery;
|
|
76
|
+
private readonly _activeFiltersCount$;
|
|
77
|
+
private readonly _headerConfig;
|
|
78
|
+
private readonly _groupCellConfig;
|
|
79
|
+
private readonly _cellConfig;
|
|
80
|
+
private readonly _footerConfig;
|
|
81
|
+
private _fsScrollSubscription;
|
|
82
|
+
constructor(_el: ElementRef, config: FsListConfig, _fsScroll: FsScrollService, _selectionDialog: SelectionDialog, _router: Router, _route: ActivatedRoute, _persistance: PersistanceController, _inDialog: boolean);
|
|
83
|
+
get fetch$(): Observable<FsListFetchSubscription | void>;
|
|
84
|
+
get hasSavedFilters(): boolean;
|
|
85
|
+
get filtersQuery(): Record<string, any>;
|
|
86
|
+
get activeFiltersCount$(): Observable<number>;
|
|
87
|
+
fetchRemote(query: any): any;
|
|
88
|
+
/**
|
|
89
|
+
* Transform templates for using
|
|
90
|
+
*
|
|
91
|
+
* @param templates
|
|
92
|
+
*/
|
|
93
|
+
tranformTemplatesToColumns(templates: any): void;
|
|
94
|
+
reload(): void;
|
|
95
|
+
/**
|
|
96
|
+
* Watch page changes
|
|
97
|
+
*/
|
|
98
|
+
subscribe(): void;
|
|
99
|
+
getData(trackBy?: FsListTrackByFn): any[];
|
|
100
|
+
hasData(trackBy: FsListTrackByFn): boolean;
|
|
101
|
+
/**
|
|
102
|
+
* Toggle group mode status
|
|
103
|
+
*
|
|
104
|
+
* @param value
|
|
105
|
+
*/
|
|
106
|
+
groupEnabled(value: boolean): void;
|
|
107
|
+
destroy(): void;
|
|
108
|
+
/**
|
|
109
|
+
* Do initialization of table
|
|
110
|
+
*
|
|
111
|
+
* @param config
|
|
112
|
+
*/
|
|
113
|
+
private _initialize;
|
|
114
|
+
private _initVariables;
|
|
115
|
+
/**
|
|
116
|
+
* Just init options by default it it wasn't specified
|
|
117
|
+
*
|
|
118
|
+
* @param config
|
|
119
|
+
*/
|
|
120
|
+
private _initDefaultOptions;
|
|
121
|
+
/**
|
|
122
|
+
* Init restore row action and append Show Deleted option into filters
|
|
123
|
+
*/
|
|
124
|
+
private _initRestore;
|
|
125
|
+
/**
|
|
126
|
+
* Init paging
|
|
127
|
+
*
|
|
128
|
+
* @param pagingConfig
|
|
129
|
+
* @param loadMore
|
|
130
|
+
*/
|
|
131
|
+
private _initPaging;
|
|
132
|
+
/**
|
|
133
|
+
* Split actions by categories
|
|
134
|
+
*/
|
|
135
|
+
private _initActions;
|
|
136
|
+
private _initSelection;
|
|
137
|
+
private _initializeData;
|
|
138
|
+
private _initGroups;
|
|
139
|
+
private _initExternalParamsController;
|
|
140
|
+
/**
|
|
141
|
+
* Subscribe to fetch$ event with debounce
|
|
142
|
+
*/
|
|
143
|
+
private _listenFetch;
|
|
144
|
+
private _listenRowsRemove;
|
|
145
|
+
/**
|
|
146
|
+
* Lister may have originally hidden columns, but visibility of those columns
|
|
147
|
+
* can be changed programmaticaly in any time
|
|
148
|
+
*/
|
|
149
|
+
private _listenVisibleColumnChanges;
|
|
150
|
+
private _initInfinityScroll;
|
|
151
|
+
/**
|
|
152
|
+
* Update and watch filter changes
|
|
153
|
+
*/
|
|
154
|
+
private _initFilters;
|
|
155
|
+
/**
|
|
156
|
+
* Callback when Filter has been initialized
|
|
157
|
+
*
|
|
158
|
+
* @param filters
|
|
159
|
+
*/
|
|
160
|
+
private _filterInit;
|
|
161
|
+
/**
|
|
162
|
+
* Callback when Filter has been changed
|
|
163
|
+
*
|
|
164
|
+
* @param filterQuery
|
|
165
|
+
* @param filterSort
|
|
166
|
+
*/
|
|
167
|
+
private _filterChange;
|
|
168
|
+
private _checkRestoreFilter;
|
|
169
|
+
private _filterSort;
|
|
170
|
+
private _completeFetch;
|
|
171
|
+
private _completeFetchUpdateSelecton;
|
|
172
|
+
/**
|
|
173
|
+
* Will do some actions if you removed item and item was last on his own page
|
|
174
|
+
*
|
|
175
|
+
* Ex: if list has 3 pages and on third page you have only one item. And you just deleted this item.
|
|
176
|
+
* You must go to second page, but if it was last page and you can't go back -> just reload
|
|
177
|
+
*
|
|
178
|
+
* @param deletedCount
|
|
179
|
+
*/
|
|
180
|
+
private _noDataPaginationUpdate;
|
|
181
|
+
/**
|
|
182
|
+
* Temporary solution, will do auto subscribe if was returned Observable.
|
|
183
|
+
*
|
|
184
|
+
* TODO: MOVE THIS PEACE OF CODE TO SPECIAL PLACE
|
|
185
|
+
*
|
|
186
|
+
* @param restoreClickCallback
|
|
187
|
+
* @param row
|
|
188
|
+
*/
|
|
189
|
+
private _restoreClick;
|
|
190
|
+
private _updateSortingColumns;
|
|
191
|
+
}
|