@firestitch/list 14.0.0 → 14.0.1
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 +88 -88
- 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 +188 -188
- package/app/classes/pagination-controller.d.ts +197 -197
- package/app/classes/persistance-controller.d.ts +10 -10
- package/app/classes/reorder-controller.d.ts +67 -67
- package/app/classes/selection-controller.d.ts +155 -155
- package/app/classes/sorting-controller.d.ts +70 -70
- 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 +127 -127
- 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 +20 -20
- package/app/directives/cell/cell.directive.d.ts +8 -8
- package/app/directives/column/column.directive.d.ts +37 -37
- 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/action-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 +245 -245
- 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 -61
- 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/esm2020/app/classes/actions-controller.mjs +55 -55
- package/esm2020/app/classes/columns-controller.mjs +205 -205
- package/esm2020/app/classes/data-controller.mjs +344 -344
- package/esm2020/app/classes/external-params-controller.mjs +146 -146
- package/esm2020/app/classes/index.mjs +3 -3
- package/esm2020/app/classes/list-controller.mjs +673 -673
- package/esm2020/app/classes/pagination-controller.mjs +490 -490
- package/esm2020/app/classes/persistance-controller.mjs +19 -19
- package/esm2020/app/classes/reorder-controller.mjs +181 -181
- package/esm2020/app/classes/selection-controller.mjs +465 -465
- package/esm2020/app/classes/sorting-controller.mjs +201 -201
- package/esm2020/app/components/body/body.component.mjs +63 -63
- package/esm2020/app/components/body/row/actions/actions.component.mjs +96 -96
- package/esm2020/app/components/body/row/cell/cell.component.mjs +107 -107
- package/esm2020/app/components/body/row/inline-action/inline-action.component.mjs +32 -32
- package/esm2020/app/components/body/row/menu-action/menu-action.component.mjs +45 -45
- package/esm2020/app/components/body/row/row.component.mjs +321 -321
- package/esm2020/app/components/customize-cols/customize-cols.component.mjs +68 -68
- package/esm2020/app/components/footer/footer-row/footer-cell/footer-cell.component.mjs +16 -16
- package/esm2020/app/components/footer/footer-row/footer-row.component.mjs +27 -27
- package/esm2020/app/components/footer/footer.component.mjs +30 -30
- package/esm2020/app/components/head/head-cell/head-cell.component.mjs +29 -29
- package/esm2020/app/components/head/head.component.mjs +102 -102
- package/esm2020/app/components/list/list.component.mjs +384 -384
- package/esm2020/app/components/loader/loader.component.mjs +40 -40
- package/esm2020/app/components/manage-saved-filters/manage-saved-filters.component.mjs +76 -76
- package/esm2020/app/components/pagination/pagination.component.mjs +37 -37
- package/esm2020/app/components/saved-filters/saved-filters.component.mjs +29 -29
- package/esm2020/app/components/status/status.component.mjs +64 -64
- package/esm2020/app/directives/cell/cell.directive.mjs +18 -18
- package/esm2020/app/directives/column/column.directive.mjs +120 -120
- package/esm2020/app/directives/content/content.directive.mjs +12 -12
- package/esm2020/app/directives/content-init/content-init.directive.mjs +21 -21
- package/esm2020/app/directives/draggable-list/draggable-list.directive.mjs +330 -328
- package/esm2020/app/directives/draggable-row/draggable-row.directive.mjs +77 -77
- package/esm2020/app/directives/empty-state/empty-state.directive.mjs +13 -13
- package/esm2020/app/directives/footer/footer.directive.mjs +18 -18
- package/esm2020/app/directives/group-expand-trigger/group-expand-trigger.directive.mjs +26 -26
- package/esm2020/app/directives/group-footer/group-footer.directive.mjs +13 -13
- package/esm2020/app/directives/group-header/group-header.directive.mjs +13 -13
- package/esm2020/app/directives/header/header.directive.mjs +18 -18
- package/esm2020/app/directives/heading/heading.directive.mjs +13 -13
- package/esm2020/app/directives/heading-container/heading-container.directive.mjs +13 -13
- package/esm2020/app/directives/index.mjs +4 -4
- package/esm2020/app/directives/subheading/subheading.directive.mjs +13 -13
- package/esm2020/app/enums/action-type.enum.mjs +8 -8
- package/esm2020/app/enums/page-change-type.enum.mjs +6 -6
- package/esm2020/app/enums/pagination-strategy.enum.mjs +7 -7
- package/esm2020/app/enums/row-type.enum.mjs +7 -7
- package/esm2020/app/enums/state.enum.mjs +11 -11
- package/esm2020/app/fs-list.module.mjs +243 -243
- package/esm2020/app/fs-list.providers.mjs +4 -4
- package/esm2020/app/interfaces/cellconfig.interface.mjs +2 -2
- package/esm2020/app/interfaces/column-config.interface.mjs +1 -1
- package/esm2020/app/interfaces/draggable-list.interface.mjs +2 -2
- package/esm2020/app/interfaces/external-params.interface.mjs +2 -2
- package/esm2020/app/interfaces/index.mjs +5 -5
- package/esm2020/app/interfaces/listconfig.interface.mjs +1 -1
- package/esm2020/app/interfaces/pagination-state.interface.mjs +1 -1
- package/esm2020/app/interfaces/pagination.interface.mjs +2 -2
- package/esm2020/app/interfaces/sorting-change-event.interface.mjs +2 -2
- package/esm2020/app/models/column-async-attribute.mjs +13 -13
- package/esm2020/app/models/column-attributes.mjs +131 -131
- package/esm2020/app/models/column.model.mjs +163 -163
- package/esm2020/app/models/row/base-row.mjs +23 -23
- package/esm2020/app/models/row/child-row.mjs +28 -28
- package/esm2020/app/models/row/group-footer-row.mjs +20 -20
- package/esm2020/app/models/row/group-row.mjs +44 -44
- package/esm2020/app/models/row/simple-row.mjs +10 -10
- package/esm2020/app/models/row-action.model.mjs +89 -89
- package/esm2020/app/models/row.mjs +88 -88
- package/esm2020/app/models/styleConfig.model.mjs +75 -75
- package/esm2020/app/pipes/action-label.mjs +16 -16
- package/esm2020/app/pipes/index.mjs +1 -1
- package/esm2020/app/services/group-expand-notifier.service.mjs +26 -26
- package/esm2020/firestitch-list.mjs +4 -4
- package/esm2020/public_api.mjs +45 -45
- package/fesm2015/firestitch-list.mjs +5626 -5624
- package/fesm2015/firestitch-list.mjs.map +1 -1
- package/fesm2020/firestitch-list.mjs +5619 -5617
- package/fesm2020/firestitch-list.mjs.map +1 -1
- package/index.d.ts +5 -5
- package/package.json +1 -1
- package/public_api.d.ts +41 -41
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
import { SortingDirection } from '../models/column.model';
|
|
2
|
-
export declare type ExternalParams = IExternalPaginationParams & IExternalSortingParams;
|
|
3
|
-
export declare type ExternalQueryPagination = Record<keyof IExternalPaginationParams, string>;
|
|
4
|
-
export declare type ExternalQuerySorting = IExternalSortingParams;
|
|
5
|
-
interface IExternalPaginationParams {
|
|
6
|
-
page: number;
|
|
7
|
-
limit: number;
|
|
8
|
-
}
|
|
9
|
-
interface IExternalSortingParams {
|
|
10
|
-
sortName: string;
|
|
11
|
-
sortDirection: SortingDirection;
|
|
12
|
-
}
|
|
13
|
-
export {};
|
|
1
|
+
import { SortingDirection } from '../models/column.model';
|
|
2
|
+
export declare type ExternalParams = IExternalPaginationParams & IExternalSortingParams;
|
|
3
|
+
export declare type ExternalQueryPagination = Record<keyof IExternalPaginationParams, string>;
|
|
4
|
+
export declare type ExternalQuerySorting = IExternalSortingParams;
|
|
5
|
+
interface IExternalPaginationParams {
|
|
6
|
+
page: number;
|
|
7
|
+
limit: number;
|
|
8
|
+
}
|
|
9
|
+
interface IExternalSortingParams {
|
|
10
|
+
sortName: string;
|
|
11
|
+
sortDirection: SortingDirection;
|
|
12
|
+
}
|
|
13
|
+
export {};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export * from './cellconfig.interface';
|
|
2
|
-
export * from './listconfig.interface';
|
|
3
|
-
export * from './pagination.interface';
|
|
4
|
-
export * from './sorting-change-event.interface';
|
|
1
|
+
export * from './cellconfig.interface';
|
|
2
|
+
export * from './listconfig.interface';
|
|
3
|
+
export * from './pagination.interface';
|
|
4
|
+
export * from './sorting-change-event.interface';
|
|
@@ -1,245 +1,245 @@
|
|
|
1
|
-
import { FsFile } from '@firestitch/file';
|
|
2
|
-
import { ChangeFn, FsFilterAction, FsFilterAutoReload, FsFilterPersistance, IFilterConfigDateItem, IFilterConfigItem, IFilterSavedFiltersConfig } from '@firestitch/filter';
|
|
3
|
-
import { FsSelectionActionSelected, FsSelectionDialogConfigAction, SelectionRef } from '@firestitch/selection';
|
|
4
|
-
import { Observable } from 'rxjs';
|
|
5
|
-
import { ReorderPosition } from '../classes/reorder-controller';
|
|
6
|
-
import { ActionType } from '../enums/action-type.enum';
|
|
7
|
-
import { PaginationStrategy } from '../enums/pagination-strategy.enum';
|
|
8
|
-
import { RowType } from '../enums/row-type.enum';
|
|
9
|
-
import { FsListState } from '../enums/state.enum';
|
|
10
|
-
export interface FsPaging {
|
|
11
|
-
limits?: number[];
|
|
12
|
-
limit?: number;
|
|
13
|
-
page?: number;
|
|
14
|
-
pages?: number;
|
|
15
|
-
records?: number;
|
|
16
|
-
strategy?: PaginationStrategy;
|
|
17
|
-
}
|
|
18
|
-
export interface FsListConfig {
|
|
19
|
-
heading?: string;
|
|
20
|
-
trackBy?: string;
|
|
21
|
-
subheading?: string;
|
|
22
|
-
status?: boolean;
|
|
23
|
-
rowHoverHighlight?: boolean;
|
|
24
|
-
chips?: boolean;
|
|
25
|
-
column?: FsListColumnConfig;
|
|
26
|
-
autoFocus?: boolean;
|
|
27
|
-
filterInput?: boolean;
|
|
28
|
-
queryParam?: boolean;
|
|
29
|
-
paging?: FsPaging | false;
|
|
30
|
-
loadMore?: FsListLoadMoreConfig | boolean;
|
|
31
|
-
columnDefaults?: any;
|
|
32
|
-
filters?: (IFilterConfigItem | IFilterConfigDateItem)[];
|
|
33
|
-
savedFilters?: IFilterSavedFiltersConfig;
|
|
34
|
-
persist?: FsListPersitance;
|
|
35
|
-
rowActions?: (FsListRowActionGroup | FsListRowAction)[];
|
|
36
|
-
rowClass?: (row: any, options?: FsListRowClassOptions) => string;
|
|
37
|
-
rowHover?: boolean;
|
|
38
|
-
actions?: FsListAction[];
|
|
39
|
-
fetch?: FsListFetchFn;
|
|
40
|
-
afterFetch?: FsListAfterFetchFn;
|
|
41
|
-
beforeFetch?: FsListBeforeFetchFn;
|
|
42
|
-
afterContentInit?: FsListAfterContentInitFn;
|
|
43
|
-
afterInit?: FsListAfterInitFn;
|
|
44
|
-
selection?: FsListSelectionConfig;
|
|
45
|
-
initialFetch?: boolean;
|
|
46
|
-
rowEvents?: {
|
|
47
|
-
[name: string]: (event: any) => void;
|
|
48
|
-
};
|
|
49
|
-
header?: FsListHeaderConfig;
|
|
50
|
-
cell?: FsListCellConfig;
|
|
51
|
-
footer?: FsListFooterConfig;
|
|
52
|
-
reorder?: FsListReorderConfig;
|
|
53
|
-
sorts?: FsListSortsConfig[];
|
|
54
|
-
group?: FsListGroupConfig;
|
|
55
|
-
sort?: FsListSortConfig;
|
|
56
|
-
restore?: FsListRestoreConfig;
|
|
57
|
-
noResults?: FsListNoResultsConfig;
|
|
58
|
-
emptyState?: FsListEmptyStateConfig;
|
|
59
|
-
filterInit?: ChangeFn;
|
|
60
|
-
filterChange?: ChangeFn;
|
|
61
|
-
reload?: boolean;
|
|
62
|
-
style?: 'line' | 'card' | 'basic';
|
|
63
|
-
autoReload?: FsFilterAutoReload;
|
|
64
|
-
}
|
|
65
|
-
export interface FsListGroupConfig {
|
|
66
|
-
enabled?: boolean;
|
|
67
|
-
initialExpand?: boolean;
|
|
68
|
-
groupBy?: (row: any) => any;
|
|
69
|
-
compareBy?: (row: any) => any;
|
|
70
|
-
footer?: (row: {
|
|
71
|
-
[key: string]: any;
|
|
72
|
-
}, group?: {
|
|
73
|
-
[key: string]: any;
|
|
74
|
-
children: {
|
|
75
|
-
[key: string]: any;
|
|
76
|
-
}[];
|
|
77
|
-
}) => boolean;
|
|
78
|
-
actions?: (FsListRowActionGroup | FsListRowAction)[];
|
|
79
|
-
}
|
|
80
|
-
export interface FsListLoadMoreConfig {
|
|
81
|
-
enabled?: boolean;
|
|
82
|
-
label?: string;
|
|
83
|
-
buttonColor?: 'primary' | 'accent' | 'warn';
|
|
84
|
-
buttonType?: 'flat' | 'raised' | 'stroked' | 'basic';
|
|
85
|
-
}
|
|
86
|
-
export interface FsListReorderConfig {
|
|
87
|
-
start?: () => void;
|
|
88
|
-
moved?: FsListReorderMovedCallback;
|
|
89
|
-
done?: FsListReorderDoneCallback;
|
|
90
|
-
moveDrop?: FsListReorderMoveInGroupCallback;
|
|
91
|
-
position?: ReorderPosition;
|
|
92
|
-
disabled?: boolean;
|
|
93
|
-
toggle?: boolean;
|
|
94
|
-
label?: string;
|
|
95
|
-
menu?: boolean;
|
|
96
|
-
multiple?: boolean;
|
|
97
|
-
status?: boolean;
|
|
98
|
-
}
|
|
99
|
-
export declare type FsListReorderMovedCallback = (rows: FsListReorderData[]) => void;
|
|
100
|
-
export declare type FsListReorderDoneCallback = (rows: FsListReorderData[]) => void | Observable<any>;
|
|
101
|
-
export interface FsListReorderData {
|
|
102
|
-
type: RowType;
|
|
103
|
-
data: any;
|
|
104
|
-
parent: FsListReorderData;
|
|
105
|
-
}
|
|
106
|
-
export declare type FsListReorderMoveInGroupCallback = (data: {
|
|
107
|
-
row1: any;
|
|
108
|
-
row2: any;
|
|
109
|
-
group1: any;
|
|
110
|
-
group2: any;
|
|
111
|
-
}) => boolean;
|
|
112
|
-
export interface FsListHeaderConfig {
|
|
113
|
-
className?: string;
|
|
114
|
-
align?: string;
|
|
115
|
-
}
|
|
116
|
-
export interface FsListCellConfig {
|
|
117
|
-
className?: string;
|
|
118
|
-
align?: string;
|
|
119
|
-
}
|
|
120
|
-
export interface FsListFooterConfig {
|
|
121
|
-
className?: string;
|
|
122
|
-
align?: string;
|
|
123
|
-
}
|
|
124
|
-
export interface FsListSortsConfig {
|
|
125
|
-
name: string;
|
|
126
|
-
value: string;
|
|
127
|
-
direction?: 'asc' | 'desc';
|
|
128
|
-
}
|
|
129
|
-
export interface FsListSortConfig {
|
|
130
|
-
value: string;
|
|
131
|
-
direction?: 'asc' | 'desc';
|
|
132
|
-
}
|
|
133
|
-
export interface FsListRestoreConfig {
|
|
134
|
-
query?: any;
|
|
135
|
-
filter?: boolean | string;
|
|
136
|
-
filterLabel?: string;
|
|
137
|
-
menuLabel?: string;
|
|
138
|
-
click?: (row: FsListAbstractRow, event?: any) => void | Observable<any>;
|
|
139
|
-
reload?: boolean;
|
|
140
|
-
}
|
|
141
|
-
export interface FsListNoResultsConfig {
|
|
142
|
-
message?: string;
|
|
143
|
-
}
|
|
144
|
-
export interface FsListSelectionConfig {
|
|
145
|
-
actions?: FsSelectionDialogConfigAction[];
|
|
146
|
-
actionSelected?: (action: FsListActionSelected) => Observable<boolean>;
|
|
147
|
-
allSelected?: () => void;
|
|
148
|
-
cancelled?: () => void;
|
|
149
|
-
disabled?: boolean;
|
|
150
|
-
selectAll?: boolean;
|
|
151
|
-
selectionChanged?: (data: any, selectedAll: boolean, selectionRef: SelectionRef) => FsSelectionDialogConfigAction[] | Observable<FsSelectionDialogConfigAction[] | void> | void;
|
|
152
|
-
}
|
|
153
|
-
export interface FsListFetchSubscription {
|
|
154
|
-
loadOffset?: boolean;
|
|
155
|
-
scrollIntoView?: boolean;
|
|
156
|
-
}
|
|
157
|
-
export declare type FsListAction = {
|
|
158
|
-
customize?: boolean;
|
|
159
|
-
} & FsFilterAction;
|
|
160
|
-
export interface FsListRowActionGroup {
|
|
161
|
-
label?: string;
|
|
162
|
-
rowActions: FsListRowAction[];
|
|
163
|
-
}
|
|
164
|
-
export interface FsListRowAction {
|
|
165
|
-
label?: string | FsListRowActionLabelFn;
|
|
166
|
-
type?: ActionType;
|
|
167
|
-
className?: string;
|
|
168
|
-
icon?: string;
|
|
169
|
-
menu?: boolean;
|
|
170
|
-
click?: (row: any, event: any, index: any) => void;
|
|
171
|
-
link?: FsListRowActionLinkFn;
|
|
172
|
-
file?: FsListRowActionFile;
|
|
173
|
-
show?: (row: any, index: number) => boolean;
|
|
174
|
-
remove?: {
|
|
175
|
-
title?: string;
|
|
176
|
-
template?: string;
|
|
177
|
-
} | boolean;
|
|
178
|
-
restore?: boolean;
|
|
179
|
-
}
|
|
180
|
-
export declare type FsListRowActionFileFn = (selection: FsFile | FsFile[], row: FsListAbstractRow, index: number) => void;
|
|
181
|
-
export declare type FsListRowActionLinkFn = (row: FsListAbstractRow) => FsListRowActionLink;
|
|
182
|
-
export declare type FsListRowActionLabelFn = (row: FsListAbstractRow) => string;
|
|
183
|
-
export interface FsListRowActionFile {
|
|
184
|
-
select: FsListRowActionFileFn;
|
|
185
|
-
error?: (error: unknown) => void;
|
|
186
|
-
multiple?: boolean;
|
|
187
|
-
accept?: string;
|
|
188
|
-
minWidth?: number;
|
|
189
|
-
minHeight?: number;
|
|
190
|
-
maxWidth?: number;
|
|
191
|
-
maxHeight?: number;
|
|
192
|
-
imageQuality?: number;
|
|
193
|
-
}
|
|
194
|
-
export interface FsListRowActionLink {
|
|
195
|
-
link: any[] | string;
|
|
196
|
-
queryParams?: Record<string, any>;
|
|
197
|
-
target?: string;
|
|
198
|
-
}
|
|
199
|
-
export interface FsListAbstractRow {
|
|
200
|
-
[name: string]: any;
|
|
201
|
-
}
|
|
202
|
-
export declare type FsListTrackByFn = (row: FsListAbstractRow, index?: number) => boolean;
|
|
203
|
-
export declare type FsListTrackByTargetRowFn = (listRow: FsListAbstractRow, targetRow?: FsListAbstractRow) => boolean;
|
|
204
|
-
export declare type FsListColumnLoadFn = () => Observable<FsListColumn[]>;
|
|
205
|
-
export declare type FsListColumnChangeFn = (listColumns: FsListColumn[]) => void;
|
|
206
|
-
export declare type FsListColumnTitleFn = (name: string, defaultTitle: string) => string;
|
|
207
|
-
export declare type FsListColumnTooltipFn = (name: string, show: boolean, disabled: boolean) => string;
|
|
208
|
-
export declare type FsListColumnDisabledFn = (name: string) => boolean;
|
|
209
|
-
export declare type FsListColumnSelectedFn = (name: string, show: boolean) => boolean;
|
|
210
|
-
export interface FsListColumnConfig {
|
|
211
|
-
load?: FsListColumnLoadFn;
|
|
212
|
-
change?: FsListColumnChangeFn;
|
|
213
|
-
title?: FsListColumnTitleFn;
|
|
214
|
-
tooltip?: FsListColumnTooltipFn;
|
|
215
|
-
disabled?: FsListColumnDisabledFn;
|
|
216
|
-
selected?: FsListColumnSelectedFn;
|
|
217
|
-
}
|
|
218
|
-
export interface FsListColumn {
|
|
219
|
-
name: string;
|
|
220
|
-
show: boolean;
|
|
221
|
-
}
|
|
222
|
-
export interface FsListActionSelected extends FsSelectionActionSelected {
|
|
223
|
-
selected: any[];
|
|
224
|
-
}
|
|
225
|
-
export interface FsListEmptyStateConfig {
|
|
226
|
-
validate: FsListStateValidationFn;
|
|
227
|
-
}
|
|
228
|
-
export interface FsListFetchOptions {
|
|
229
|
-
state: FsListState;
|
|
230
|
-
}
|
|
231
|
-
export declare type FsListPersitance = FsFilterPersistance;
|
|
232
|
-
export declare type FsListStateValidationFn = (filters: any, rows: FsListAbstractRow[]) => boolean;
|
|
233
|
-
export declare type FsListFetchFn = (query: Record<string, any>, options: FsListFetchOptions) => Observable<{
|
|
234
|
-
data: unknown[];
|
|
235
|
-
paging?: FsPaging;
|
|
236
|
-
}>;
|
|
237
|
-
export declare type FsListAfterFetchFn = (query: Record<string, any>, data: unknown[]) => void;
|
|
238
|
-
export declare type FsListBeforeFetchFn = (query: any) => Observable<Record<string, any>>;
|
|
239
|
-
export declare type FsListAfterContentInitFn = (query: Record<string, any>, data: unknown[]) => void;
|
|
240
|
-
export interface FsListRowClassOptions {
|
|
241
|
-
index: number;
|
|
242
|
-
groupIndex?: number;
|
|
243
|
-
type?: RowType;
|
|
244
|
-
}
|
|
245
|
-
export declare type FsListAfterInitFn = (listComponent: any) => void;
|
|
1
|
+
import { FsFile } from '@firestitch/file';
|
|
2
|
+
import { ChangeFn, FsFilterAction, FsFilterAutoReload, FsFilterPersistance, IFilterConfigDateItem, IFilterConfigItem, IFilterSavedFiltersConfig } from '@firestitch/filter';
|
|
3
|
+
import { FsSelectionActionSelected, FsSelectionDialogConfigAction, SelectionRef } from '@firestitch/selection';
|
|
4
|
+
import { Observable } from 'rxjs';
|
|
5
|
+
import { ReorderPosition } from '../classes/reorder-controller';
|
|
6
|
+
import { ActionType } from '../enums/action-type.enum';
|
|
7
|
+
import { PaginationStrategy } from '../enums/pagination-strategy.enum';
|
|
8
|
+
import { RowType } from '../enums/row-type.enum';
|
|
9
|
+
import { FsListState } from '../enums/state.enum';
|
|
10
|
+
export interface FsPaging {
|
|
11
|
+
limits?: number[];
|
|
12
|
+
limit?: number;
|
|
13
|
+
page?: number;
|
|
14
|
+
pages?: number;
|
|
15
|
+
records?: number;
|
|
16
|
+
strategy?: PaginationStrategy;
|
|
17
|
+
}
|
|
18
|
+
export interface FsListConfig {
|
|
19
|
+
heading?: string;
|
|
20
|
+
trackBy?: string;
|
|
21
|
+
subheading?: string;
|
|
22
|
+
status?: boolean;
|
|
23
|
+
rowHoverHighlight?: boolean;
|
|
24
|
+
chips?: boolean;
|
|
25
|
+
column?: FsListColumnConfig;
|
|
26
|
+
autoFocus?: boolean;
|
|
27
|
+
filterInput?: boolean;
|
|
28
|
+
queryParam?: boolean;
|
|
29
|
+
paging?: FsPaging | false;
|
|
30
|
+
loadMore?: FsListLoadMoreConfig | boolean;
|
|
31
|
+
columnDefaults?: any;
|
|
32
|
+
filters?: (IFilterConfigItem | IFilterConfigDateItem)[];
|
|
33
|
+
savedFilters?: IFilterSavedFiltersConfig;
|
|
34
|
+
persist?: FsListPersitance;
|
|
35
|
+
rowActions?: (FsListRowActionGroup | FsListRowAction)[];
|
|
36
|
+
rowClass?: (row: any, options?: FsListRowClassOptions) => string;
|
|
37
|
+
rowHover?: boolean;
|
|
38
|
+
actions?: FsListAction[];
|
|
39
|
+
fetch?: FsListFetchFn;
|
|
40
|
+
afterFetch?: FsListAfterFetchFn;
|
|
41
|
+
beforeFetch?: FsListBeforeFetchFn;
|
|
42
|
+
afterContentInit?: FsListAfterContentInitFn;
|
|
43
|
+
afterInit?: FsListAfterInitFn;
|
|
44
|
+
selection?: FsListSelectionConfig;
|
|
45
|
+
initialFetch?: boolean;
|
|
46
|
+
rowEvents?: {
|
|
47
|
+
[name: string]: (event: any) => void;
|
|
48
|
+
};
|
|
49
|
+
header?: FsListHeaderConfig;
|
|
50
|
+
cell?: FsListCellConfig;
|
|
51
|
+
footer?: FsListFooterConfig;
|
|
52
|
+
reorder?: FsListReorderConfig;
|
|
53
|
+
sorts?: FsListSortsConfig[];
|
|
54
|
+
group?: FsListGroupConfig;
|
|
55
|
+
sort?: FsListSortConfig;
|
|
56
|
+
restore?: FsListRestoreConfig;
|
|
57
|
+
noResults?: FsListNoResultsConfig;
|
|
58
|
+
emptyState?: FsListEmptyStateConfig;
|
|
59
|
+
filterInit?: ChangeFn;
|
|
60
|
+
filterChange?: ChangeFn;
|
|
61
|
+
reload?: boolean;
|
|
62
|
+
style?: 'line' | 'card' | 'basic';
|
|
63
|
+
autoReload?: FsFilterAutoReload;
|
|
64
|
+
}
|
|
65
|
+
export interface FsListGroupConfig {
|
|
66
|
+
enabled?: boolean;
|
|
67
|
+
initialExpand?: boolean;
|
|
68
|
+
groupBy?: (row: any) => any;
|
|
69
|
+
compareBy?: (row: any) => any;
|
|
70
|
+
footer?: (row: {
|
|
71
|
+
[key: string]: any;
|
|
72
|
+
}, group?: {
|
|
73
|
+
[key: string]: any;
|
|
74
|
+
children: {
|
|
75
|
+
[key: string]: any;
|
|
76
|
+
}[];
|
|
77
|
+
}) => boolean;
|
|
78
|
+
actions?: (FsListRowActionGroup | FsListRowAction)[];
|
|
79
|
+
}
|
|
80
|
+
export interface FsListLoadMoreConfig {
|
|
81
|
+
enabled?: boolean;
|
|
82
|
+
label?: string;
|
|
83
|
+
buttonColor?: 'primary' | 'accent' | 'warn';
|
|
84
|
+
buttonType?: 'flat' | 'raised' | 'stroked' | 'basic';
|
|
85
|
+
}
|
|
86
|
+
export interface FsListReorderConfig {
|
|
87
|
+
start?: () => void;
|
|
88
|
+
moved?: FsListReorderMovedCallback;
|
|
89
|
+
done?: FsListReorderDoneCallback;
|
|
90
|
+
moveDrop?: FsListReorderMoveInGroupCallback;
|
|
91
|
+
position?: ReorderPosition;
|
|
92
|
+
disabled?: boolean;
|
|
93
|
+
toggle?: boolean;
|
|
94
|
+
label?: string;
|
|
95
|
+
menu?: boolean;
|
|
96
|
+
multiple?: boolean;
|
|
97
|
+
status?: boolean;
|
|
98
|
+
}
|
|
99
|
+
export declare type FsListReorderMovedCallback = (rows: FsListReorderData[]) => void;
|
|
100
|
+
export declare type FsListReorderDoneCallback = (rows: FsListReorderData[]) => void | Observable<any>;
|
|
101
|
+
export interface FsListReorderData {
|
|
102
|
+
type: RowType;
|
|
103
|
+
data: any;
|
|
104
|
+
parent: FsListReorderData;
|
|
105
|
+
}
|
|
106
|
+
export declare type FsListReorderMoveInGroupCallback = (data: {
|
|
107
|
+
row1: any;
|
|
108
|
+
row2: any;
|
|
109
|
+
group1: any;
|
|
110
|
+
group2: any;
|
|
111
|
+
}) => boolean;
|
|
112
|
+
export interface FsListHeaderConfig {
|
|
113
|
+
className?: string;
|
|
114
|
+
align?: string;
|
|
115
|
+
}
|
|
116
|
+
export interface FsListCellConfig {
|
|
117
|
+
className?: string;
|
|
118
|
+
align?: string;
|
|
119
|
+
}
|
|
120
|
+
export interface FsListFooterConfig {
|
|
121
|
+
className?: string;
|
|
122
|
+
align?: string;
|
|
123
|
+
}
|
|
124
|
+
export interface FsListSortsConfig {
|
|
125
|
+
name: string;
|
|
126
|
+
value: string;
|
|
127
|
+
direction?: 'asc' | 'desc';
|
|
128
|
+
}
|
|
129
|
+
export interface FsListSortConfig {
|
|
130
|
+
value: string;
|
|
131
|
+
direction?: 'asc' | 'desc';
|
|
132
|
+
}
|
|
133
|
+
export interface FsListRestoreConfig {
|
|
134
|
+
query?: any;
|
|
135
|
+
filter?: boolean | string;
|
|
136
|
+
filterLabel?: string;
|
|
137
|
+
menuLabel?: string;
|
|
138
|
+
click?: (row: FsListAbstractRow, event?: any) => void | Observable<any>;
|
|
139
|
+
reload?: boolean;
|
|
140
|
+
}
|
|
141
|
+
export interface FsListNoResultsConfig {
|
|
142
|
+
message?: string;
|
|
143
|
+
}
|
|
144
|
+
export interface FsListSelectionConfig {
|
|
145
|
+
actions?: FsSelectionDialogConfigAction[];
|
|
146
|
+
actionSelected?: (action: FsListActionSelected) => Observable<boolean>;
|
|
147
|
+
allSelected?: () => void;
|
|
148
|
+
cancelled?: () => void;
|
|
149
|
+
disabled?: boolean;
|
|
150
|
+
selectAll?: boolean;
|
|
151
|
+
selectionChanged?: (data: any, selectedAll: boolean, selectionRef: SelectionRef) => FsSelectionDialogConfigAction[] | Observable<FsSelectionDialogConfigAction[] | void> | void;
|
|
152
|
+
}
|
|
153
|
+
export interface FsListFetchSubscription {
|
|
154
|
+
loadOffset?: boolean;
|
|
155
|
+
scrollIntoView?: boolean;
|
|
156
|
+
}
|
|
157
|
+
export declare type FsListAction = {
|
|
158
|
+
customize?: boolean;
|
|
159
|
+
} & FsFilterAction;
|
|
160
|
+
export interface FsListRowActionGroup {
|
|
161
|
+
label?: string;
|
|
162
|
+
rowActions: FsListRowAction[];
|
|
163
|
+
}
|
|
164
|
+
export interface FsListRowAction {
|
|
165
|
+
label?: string | FsListRowActionLabelFn;
|
|
166
|
+
type?: ActionType;
|
|
167
|
+
className?: string;
|
|
168
|
+
icon?: string;
|
|
169
|
+
menu?: boolean;
|
|
170
|
+
click?: (row: any, event: any, index: any) => void;
|
|
171
|
+
link?: FsListRowActionLinkFn;
|
|
172
|
+
file?: FsListRowActionFile;
|
|
173
|
+
show?: (row: any, index: number) => boolean;
|
|
174
|
+
remove?: {
|
|
175
|
+
title?: string;
|
|
176
|
+
template?: string;
|
|
177
|
+
} | boolean;
|
|
178
|
+
restore?: boolean;
|
|
179
|
+
}
|
|
180
|
+
export declare type FsListRowActionFileFn = (selection: FsFile | FsFile[], row: FsListAbstractRow, index: number) => void;
|
|
181
|
+
export declare type FsListRowActionLinkFn = (row: FsListAbstractRow) => FsListRowActionLink;
|
|
182
|
+
export declare type FsListRowActionLabelFn = (row: FsListAbstractRow) => string;
|
|
183
|
+
export interface FsListRowActionFile {
|
|
184
|
+
select: FsListRowActionFileFn;
|
|
185
|
+
error?: (error: unknown) => void;
|
|
186
|
+
multiple?: boolean;
|
|
187
|
+
accept?: string;
|
|
188
|
+
minWidth?: number;
|
|
189
|
+
minHeight?: number;
|
|
190
|
+
maxWidth?: number;
|
|
191
|
+
maxHeight?: number;
|
|
192
|
+
imageQuality?: number;
|
|
193
|
+
}
|
|
194
|
+
export interface FsListRowActionLink {
|
|
195
|
+
link: any[] | string;
|
|
196
|
+
queryParams?: Record<string, any>;
|
|
197
|
+
target?: string;
|
|
198
|
+
}
|
|
199
|
+
export interface FsListAbstractRow {
|
|
200
|
+
[name: string]: any;
|
|
201
|
+
}
|
|
202
|
+
export declare type FsListTrackByFn = (row: FsListAbstractRow, index?: number) => boolean;
|
|
203
|
+
export declare type FsListTrackByTargetRowFn = (listRow: FsListAbstractRow, targetRow?: FsListAbstractRow) => boolean;
|
|
204
|
+
export declare type FsListColumnLoadFn = () => Observable<FsListColumn[]>;
|
|
205
|
+
export declare type FsListColumnChangeFn = (listColumns: FsListColumn[]) => void;
|
|
206
|
+
export declare type FsListColumnTitleFn = (name: string, defaultTitle: string) => string;
|
|
207
|
+
export declare type FsListColumnTooltipFn = (name: string, show: boolean, disabled: boolean) => string;
|
|
208
|
+
export declare type FsListColumnDisabledFn = (name: string) => boolean;
|
|
209
|
+
export declare type FsListColumnSelectedFn = (name: string, show: boolean) => boolean;
|
|
210
|
+
export interface FsListColumnConfig {
|
|
211
|
+
load?: FsListColumnLoadFn;
|
|
212
|
+
change?: FsListColumnChangeFn;
|
|
213
|
+
title?: FsListColumnTitleFn;
|
|
214
|
+
tooltip?: FsListColumnTooltipFn;
|
|
215
|
+
disabled?: FsListColumnDisabledFn;
|
|
216
|
+
selected?: FsListColumnSelectedFn;
|
|
217
|
+
}
|
|
218
|
+
export interface FsListColumn {
|
|
219
|
+
name: string;
|
|
220
|
+
show: boolean;
|
|
221
|
+
}
|
|
222
|
+
export interface FsListActionSelected extends FsSelectionActionSelected {
|
|
223
|
+
selected: any[];
|
|
224
|
+
}
|
|
225
|
+
export interface FsListEmptyStateConfig {
|
|
226
|
+
validate: FsListStateValidationFn;
|
|
227
|
+
}
|
|
228
|
+
export interface FsListFetchOptions {
|
|
229
|
+
state: FsListState;
|
|
230
|
+
}
|
|
231
|
+
export declare type FsListPersitance = FsFilterPersistance;
|
|
232
|
+
export declare type FsListStateValidationFn = (filters: any, rows: FsListAbstractRow[]) => boolean;
|
|
233
|
+
export declare type FsListFetchFn = (query: Record<string, any>, options: FsListFetchOptions) => Observable<{
|
|
234
|
+
data: unknown[];
|
|
235
|
+
paging?: FsPaging;
|
|
236
|
+
}>;
|
|
237
|
+
export declare type FsListAfterFetchFn = (query: Record<string, any>, data: unknown[]) => void;
|
|
238
|
+
export declare type FsListBeforeFetchFn = (query: any) => Observable<Record<string, any>>;
|
|
239
|
+
export declare type FsListAfterContentInitFn = (query: Record<string, any>, data: unknown[]) => void;
|
|
240
|
+
export interface FsListRowClassOptions {
|
|
241
|
+
index: number;
|
|
242
|
+
groupIndex?: number;
|
|
243
|
+
type?: RowType;
|
|
244
|
+
}
|
|
245
|
+
export declare type FsListAfterInitFn = (listComponent: any) => void;
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
export interface IPaginationState {
|
|
2
|
-
enabled: boolean;
|
|
3
|
-
strategy: string;
|
|
4
|
-
page: number;
|
|
5
|
-
offset: number;
|
|
6
|
-
limit: number;
|
|
7
|
-
records: number;
|
|
8
|
-
displayed: number;
|
|
9
|
-
}
|
|
1
|
+
export interface IPaginationState {
|
|
2
|
+
enabled: boolean;
|
|
3
|
+
strategy: string;
|
|
4
|
+
page: number;
|
|
5
|
+
offset: number;
|
|
6
|
+
limit: number;
|
|
7
|
+
records: number;
|
|
8
|
+
displayed: number;
|
|
9
|
+
}
|
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
import { PageChangeType } from '../enums/page-change-type.enum';
|
|
2
|
-
export interface QueryPageStrategy {
|
|
3
|
-
page?: number;
|
|
4
|
-
limit?: number;
|
|
5
|
-
}
|
|
6
|
-
export interface QueryOffsetStrategy {
|
|
7
|
-
offset?: number;
|
|
8
|
-
limit?: number;
|
|
9
|
-
}
|
|
10
|
-
export interface PageChange {
|
|
11
|
-
type: PageChangeType;
|
|
12
|
-
payload: any;
|
|
13
|
-
}
|
|
1
|
+
import { PageChangeType } from '../enums/page-change-type.enum';
|
|
2
|
+
export interface QueryPageStrategy {
|
|
3
|
+
page?: number;
|
|
4
|
+
limit?: number;
|
|
5
|
+
}
|
|
6
|
+
export interface QueryOffsetStrategy {
|
|
7
|
+
offset?: number;
|
|
8
|
+
limit?: number;
|
|
9
|
+
}
|
|
10
|
+
export interface PageChange {
|
|
11
|
+
type: PageChangeType;
|
|
12
|
+
payload: any;
|
|
13
|
+
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export interface SortingChangeEvent {
|
|
2
|
-
sortBy: string;
|
|
3
|
-
sortDirection: string;
|
|
4
|
-
}
|
|
1
|
+
export interface SortingChangeEvent {
|
|
2
|
+
sortBy: string;
|
|
3
|
+
sortDirection: string;
|
|
4
|
+
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { BehaviorSubject } from 'rxjs';
|
|
2
|
-
export declare class ColumnAsyncAttribute<T> extends BehaviorSubject<T> {
|
|
3
|
-
constructor(value: T);
|
|
4
|
-
next(value: T): void;
|
|
5
|
-
}
|
|
1
|
+
import { BehaviorSubject } from 'rxjs';
|
|
2
|
+
export declare class ColumnAsyncAttribute<T> extends BehaviorSubject<T> {
|
|
3
|
+
constructor(value: T);
|
|
4
|
+
next(value: T): void;
|
|
5
|
+
}
|