@firestitch/list 14.0.2 → 16.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (210) hide show
  1. package/app/classes/actions-controller.d.ts +20 -20
  2. package/app/classes/columns-controller.d.ts +71 -71
  3. package/app/classes/data-controller.d.ts +88 -88
  4. package/app/classes/external-params-controller.d.ts +32 -32
  5. package/app/classes/index.d.ts +2 -2
  6. package/app/classes/list-controller.d.ts +188 -188
  7. package/app/classes/pagination-controller.d.ts +197 -197
  8. package/app/classes/persistance-controller.d.ts +10 -10
  9. package/app/classes/reorder-controller.d.ts +67 -67
  10. package/app/classes/selection-controller.d.ts +155 -155
  11. package/app/classes/sorting-controller.d.ts +70 -70
  12. package/app/components/body/body.component.d.ts +28 -28
  13. package/app/components/body/row/actions/actions.component.d.ts +36 -36
  14. package/app/components/body/row/cell/cell.component.d.ts +22 -22
  15. package/app/components/body/row/inline-action/inline-action.component.d.ts +13 -13
  16. package/app/components/body/row/menu-action/menu-action.component.d.ts +20 -20
  17. package/app/components/body/row/row.component.d.ts +85 -85
  18. package/app/components/customize-cols/customize-cols.component.d.ts +17 -17
  19. package/app/components/footer/footer-row/footer-cell/footer-cell.component.d.ts +7 -7
  20. package/app/components/footer/footer-row/footer-row.component.d.ts +8 -14
  21. package/app/components/footer/footer.component.d.ts +15 -15
  22. package/app/components/head/head-cell/head-cell.component.d.ts +14 -14
  23. package/app/components/head/head.component.d.ts +49 -49
  24. package/app/components/list/list.component.d.ts +127 -127
  25. package/app/components/loader/loader.component.d.ts +14 -14
  26. package/app/components/manage-saved-filters/manage-saved-filters.component.d.ts +13 -13
  27. package/app/components/pagination/pagination.component.d.ts +14 -14
  28. package/app/components/saved-filters/saved-filters.component.d.ts +15 -15
  29. package/app/components/status/status.component.d.ts +20 -20
  30. package/app/directives/cell/cell.directive.d.ts +8 -8
  31. package/app/directives/column/column.directive.d.ts +37 -37
  32. package/app/directives/content/content.directive.d.ts +5 -5
  33. package/app/directives/content-init/content-init.directive.d.ts +9 -9
  34. package/app/directives/draggable-list/draggable-list.directive.d.ts +95 -95
  35. package/app/directives/draggable-row/draggable-row.directive.d.ts +23 -23
  36. package/app/directives/empty-state/empty-state.directive.d.ts +5 -5
  37. package/app/directives/footer/footer.directive.d.ts +8 -8
  38. package/app/directives/group-expand-trigger/group-expand-trigger.directive.d.ts +10 -10
  39. package/app/directives/group-footer/group-footer.directive.d.ts +6 -6
  40. package/app/directives/group-header/group-header.directive.d.ts +6 -6
  41. package/app/directives/header/header.directive.d.ts +8 -8
  42. package/app/directives/heading/heading.directive.d.ts +5 -5
  43. package/app/directives/heading-container/heading-container.directive.d.ts +5 -5
  44. package/app/directives/index.d.ts +3 -3
  45. package/app/directives/subheading/subheading.directive.d.ts +5 -5
  46. package/app/enums/action-type.enum.d.ts +7 -7
  47. package/app/enums/page-change-type.enum.d.ts +4 -4
  48. package/app/enums/pagination-strategy.enum.d.ts +5 -5
  49. package/app/enums/row-type.enum.d.ts +6 -6
  50. package/app/enums/state.enum.d.ts +9 -9
  51. package/app/fs-list.module.d.ts +60 -60
  52. package/app/fs-list.providers.d.ts +3 -3
  53. package/app/interfaces/cellconfig.interface.d.ts +5 -5
  54. package/app/interfaces/column-config.interface.d.ts +2 -2
  55. package/app/interfaces/draggable-list.interface.d.ts +7 -7
  56. package/app/interfaces/external-params.interface.d.ts +13 -13
  57. package/app/interfaces/index.d.ts +4 -4
  58. package/app/interfaces/listconfig.interface.d.ts +245 -245
  59. package/app/interfaces/pagination-state.interface.d.ts +9 -9
  60. package/app/interfaces/pagination.interface.d.ts +13 -13
  61. package/app/interfaces/sorting-change-event.interface.d.ts +4 -4
  62. package/app/models/column-async-attribute.d.ts +5 -5
  63. package/app/models/column-attributes.d.ts +39 -39
  64. package/app/models/column.model.d.ts +61 -61
  65. package/app/models/row/base-row.d.ts +13 -13
  66. package/app/models/row/child-row.d.ts +12 -12
  67. package/app/models/row/group-footer-row.d.ts +10 -10
  68. package/app/models/row/group-row.d.ts +16 -16
  69. package/app/models/row/simple-row.d.ts +5 -5
  70. package/app/models/row-action.model.d.ts +29 -29
  71. package/app/models/row.d.ts +34 -34
  72. package/app/models/styleConfig.model.d.ts +31 -31
  73. package/app/pipes/action-label.d.ts +8 -8
  74. package/app/pipes/index.d.ts +1 -1
  75. package/app/services/group-expand-notifier.service.d.ts +11 -11
  76. package/esm2022/app/classes/actions-controller.mjs +57 -0
  77. package/esm2022/app/classes/columns-controller.mjs +211 -0
  78. package/esm2022/app/classes/data-controller.mjs +348 -0
  79. package/esm2022/app/classes/external-params-controller.mjs +153 -0
  80. package/{esm2020 → esm2022}/app/classes/index.mjs +3 -3
  81. package/esm2022/app/classes/list-controller.mjs +712 -0
  82. package/esm2022/app/classes/pagination-controller.mjs +491 -0
  83. package/esm2022/app/classes/persistance-controller.mjs +19 -0
  84. package/esm2022/app/classes/reorder-controller.mjs +191 -0
  85. package/esm2022/app/classes/selection-controller.mjs +473 -0
  86. package/esm2022/app/classes/sorting-controller.mjs +207 -0
  87. package/esm2022/app/components/body/body.component.mjs +73 -0
  88. package/esm2022/app/components/body/row/actions/actions.component.mjs +102 -0
  89. package/esm2022/app/components/body/row/cell/cell.component.mjs +109 -0
  90. package/esm2022/app/components/body/row/inline-action/inline-action.component.mjs +32 -0
  91. package/esm2022/app/components/body/row/menu-action/menu-action.component.mjs +51 -0
  92. package/esm2022/app/components/body/row/row.component.mjs +341 -0
  93. package/esm2022/app/components/customize-cols/customize-cols.component.mjs +70 -0
  94. package/esm2022/app/components/footer/footer-row/footer-cell/footer-cell.component.mjs +16 -0
  95. package/esm2022/app/components/footer/footer-row/footer-row.component.mjs +17 -0
  96. package/esm2022/app/components/footer/footer.component.mjs +35 -0
  97. package/esm2022/app/components/head/head-cell/head-cell.component.mjs +32 -0
  98. package/esm2022/app/components/head/head.component.mjs +113 -0
  99. package/esm2022/app/components/list/list.component.mjs +406 -0
  100. package/esm2022/app/components/loader/loader.component.mjs +40 -0
  101. package/esm2022/app/components/manage-saved-filters/manage-saved-filters.component.mjs +78 -0
  102. package/esm2022/app/components/pagination/pagination.component.mjs +40 -0
  103. package/esm2022/app/components/saved-filters/saved-filters.component.mjs +32 -0
  104. package/esm2022/app/components/status/status.component.mjs +69 -0
  105. package/esm2022/app/directives/cell/cell.directive.mjs +21 -0
  106. package/esm2022/app/directives/column/column.directive.mjs +137 -0
  107. package/{esm2020 → esm2022}/app/directives/content/content.directive.mjs +13 -13
  108. package/esm2022/app/directives/content-init/content-init.directive.mjs +23 -0
  109. package/esm2022/app/directives/draggable-list/draggable-list.directive.mjs +344 -0
  110. package/esm2022/app/directives/draggable-row/draggable-row.directive.mjs +83 -0
  111. package/esm2022/app/directives/empty-state/empty-state.directive.mjs +13 -0
  112. package/esm2022/app/directives/footer/footer.directive.mjs +21 -0
  113. package/esm2022/app/directives/group-expand-trigger/group-expand-trigger.directive.mjs +28 -0
  114. package/{esm2020 → esm2022}/app/directives/group-footer/group-footer.directive.mjs +14 -14
  115. package/{esm2020 → esm2022}/app/directives/group-header/group-header.directive.mjs +14 -14
  116. package/esm2022/app/directives/header/header.directive.mjs +21 -0
  117. package/esm2022/app/directives/heading/heading.directive.mjs +13 -0
  118. package/{esm2020 → esm2022}/app/directives/heading-container/heading-container.directive.mjs +13 -13
  119. package/{esm2020 → esm2022}/app/directives/index.mjs +4 -4
  120. package/esm2022/app/directives/subheading/subheading.directive.mjs +13 -0
  121. package/{esm2020 → esm2022}/app/enums/action-type.enum.mjs +8 -8
  122. package/{esm2020 → esm2022}/app/enums/page-change-type.enum.mjs +6 -6
  123. package/{esm2020 → esm2022}/app/enums/pagination-strategy.enum.mjs +7 -7
  124. package/{esm2020 → esm2022}/app/enums/row-type.enum.mjs +7 -7
  125. package/{esm2020 → esm2022}/app/enums/state.enum.mjs +11 -11
  126. package/{esm2020 → esm2022}/app/fs-list.module.mjs +244 -244
  127. package/{esm2020 → esm2022}/app/fs-list.providers.mjs +4 -4
  128. package/{esm2020 → esm2022}/app/interfaces/cellconfig.interface.mjs +2 -2
  129. package/{esm2020 → esm2022}/app/interfaces/column-config.interface.mjs +1 -1
  130. package/{esm2020 → esm2022}/app/interfaces/draggable-list.interface.mjs +2 -2
  131. package/esm2022/app/interfaces/external-params.interface.mjs +2 -0
  132. package/{esm2020 → esm2022}/app/interfaces/index.mjs +5 -5
  133. package/{esm2020 → esm2022}/app/interfaces/listconfig.interface.mjs +1 -1
  134. package/{esm2020 → esm2022}/app/interfaces/pagination-state.interface.mjs +1 -1
  135. package/esm2022/app/interfaces/pagination.interface.mjs +2 -0
  136. package/{esm2020 → esm2022}/app/interfaces/sorting-change-event.interface.mjs +2 -2
  137. package/{esm2020 → esm2022}/app/models/column-async-attribute.mjs +13 -13
  138. package/esm2022/app/models/column-attributes.mjs +139 -0
  139. package/esm2022/app/models/column.model.mjs +173 -0
  140. package/esm2022/app/models/row/base-row.mjs +25 -0
  141. package/esm2022/app/models/row/child-row.mjs +29 -0
  142. package/esm2022/app/models/row/group-footer-row.mjs +22 -0
  143. package/{esm2020 → esm2022}/app/models/row/group-row.mjs +45 -45
  144. package/{esm2020 → esm2022}/app/models/row/simple-row.mjs +10 -10
  145. package/esm2022/app/models/row-action.model.mjs +102 -0
  146. package/esm2022/app/models/row.mjs +90 -0
  147. package/esm2022/app/models/styleConfig.model.mjs +78 -0
  148. package/{esm2020 → esm2022}/app/pipes/action-label.mjs +17 -17
  149. package/{esm2020 → esm2022}/app/pipes/index.mjs +1 -1
  150. package/esm2022/app/services/group-expand-notifier.service.mjs +24 -0
  151. package/{esm2020 → esm2022}/firestitch-list.mjs +4 -4
  152. package/{esm2020 → esm2022}/public_api.mjs +45 -45
  153. package/{fesm2020 → fesm2022}/firestitch-list.mjs +5854 -5620
  154. package/fesm2022/firestitch-list.mjs.map +1 -0
  155. package/index.d.ts +5 -5
  156. package/package.json +5 -11
  157. package/public_api.d.ts +41 -41
  158. package/esm2020/app/classes/actions-controller.mjs +0 -55
  159. package/esm2020/app/classes/columns-controller.mjs +0 -206
  160. package/esm2020/app/classes/data-controller.mjs +0 -345
  161. package/esm2020/app/classes/external-params-controller.mjs +0 -147
  162. package/esm2020/app/classes/list-controller.mjs +0 -674
  163. package/esm2020/app/classes/pagination-controller.mjs +0 -491
  164. package/esm2020/app/classes/persistance-controller.mjs +0 -19
  165. package/esm2020/app/classes/reorder-controller.mjs +0 -182
  166. package/esm2020/app/classes/selection-controller.mjs +0 -466
  167. package/esm2020/app/classes/sorting-controller.mjs +0 -206
  168. package/esm2020/app/components/body/body.component.mjs +0 -64
  169. package/esm2020/app/components/body/row/actions/actions.component.mjs +0 -97
  170. package/esm2020/app/components/body/row/cell/cell.component.mjs +0 -107
  171. package/esm2020/app/components/body/row/inline-action/inline-action.component.mjs +0 -33
  172. package/esm2020/app/components/body/row/menu-action/menu-action.component.mjs +0 -46
  173. package/esm2020/app/components/body/row/row.component.mjs +0 -322
  174. package/esm2020/app/components/customize-cols/customize-cols.component.mjs +0 -68
  175. package/esm2020/app/components/footer/footer-row/footer-cell/footer-cell.component.mjs +0 -16
  176. package/esm2020/app/components/footer/footer-row/footer-row.component.mjs +0 -28
  177. package/esm2020/app/components/footer/footer.component.mjs +0 -31
  178. package/esm2020/app/components/head/head-cell/head-cell.component.mjs +0 -29
  179. package/esm2020/app/components/head/head.component.mjs +0 -103
  180. package/esm2020/app/components/list/list.component.mjs +0 -385
  181. package/esm2020/app/components/loader/loader.component.mjs +0 -40
  182. package/esm2020/app/components/manage-saved-filters/manage-saved-filters.component.mjs +0 -76
  183. package/esm2020/app/components/pagination/pagination.component.mjs +0 -37
  184. package/esm2020/app/components/saved-filters/saved-filters.component.mjs +0 -29
  185. package/esm2020/app/components/status/status.component.mjs +0 -64
  186. package/esm2020/app/directives/cell/cell.directive.mjs +0 -18
  187. package/esm2020/app/directives/column/column.directive.mjs +0 -121
  188. package/esm2020/app/directives/content-init/content-init.directive.mjs +0 -22
  189. package/esm2020/app/directives/draggable-list/draggable-list.directive.mjs +0 -330
  190. package/esm2020/app/directives/draggable-row/draggable-row.directive.mjs +0 -78
  191. package/esm2020/app/directives/empty-state/empty-state.directive.mjs +0 -13
  192. package/esm2020/app/directives/footer/footer.directive.mjs +0 -18
  193. package/esm2020/app/directives/group-expand-trigger/group-expand-trigger.directive.mjs +0 -26
  194. package/esm2020/app/directives/header/header.directive.mjs +0 -18
  195. package/esm2020/app/directives/heading/heading.directive.mjs +0 -13
  196. package/esm2020/app/directives/subheading/subheading.directive.mjs +0 -13
  197. package/esm2020/app/interfaces/external-params.interface.mjs +0 -2
  198. package/esm2020/app/interfaces/pagination.interface.mjs +0 -2
  199. package/esm2020/app/models/column-attributes.mjs +0 -132
  200. package/esm2020/app/models/column.model.mjs +0 -164
  201. package/esm2020/app/models/row/base-row.mjs +0 -23
  202. package/esm2020/app/models/row/child-row.mjs +0 -28
  203. package/esm2020/app/models/row/group-footer-row.mjs +0 -21
  204. package/esm2020/app/models/row-action.model.mjs +0 -90
  205. package/esm2020/app/models/row.mjs +0 -89
  206. package/esm2020/app/models/styleConfig.model.mjs +0 -76
  207. package/esm2020/app/services/group-expand-notifier.service.mjs +0 -26
  208. package/fesm2015/firestitch-list.mjs +0 -5801
  209. package/fesm2015/firestitch-list.mjs.map +0 -1
  210. package/fesm2020/firestitch-list.mjs.map +0 -1
@@ -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 type ExternalParams = IExternalPaginationParams & IExternalSortingParams;
3
+ export type ExternalQueryPagination = Record<keyof IExternalPaginationParams, string>;
4
+ export 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 type FsListReorderMovedCallback = (rows: FsListReorderData[]) => void;
100
+ export type FsListReorderDoneCallback = (rows: FsListReorderData[]) => void | Observable<any>;
101
+ export interface FsListReorderData {
102
+ type: RowType;
103
+ data: any;
104
+ parent: FsListReorderData;
105
+ }
106
+ export 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 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 type FsListRowActionFileFn = (selection: FsFile | FsFile[], row: FsListAbstractRow, index: number) => void;
181
+ export type FsListRowActionLinkFn = (row: FsListAbstractRow) => FsListRowActionLink;
182
+ export 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 type FsListTrackByFn = (row: FsListAbstractRow, index?: number) => boolean;
203
+ export type FsListTrackByTargetRowFn = (listRow: FsListAbstractRow, targetRow?: FsListAbstractRow) => boolean;
204
+ export type FsListColumnLoadFn = () => Observable<FsListColumn[]>;
205
+ export type FsListColumnChangeFn = (listColumns: FsListColumn[]) => void;
206
+ export type FsListColumnTitleFn = (name: string, defaultTitle: string) => string;
207
+ export type FsListColumnTooltipFn = (name: string, show: boolean, disabled: boolean) => string;
208
+ export type FsListColumnDisabledFn = (name: string) => boolean;
209
+ export 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 type FsListPersitance = FsFilterPersistance;
232
+ export type FsListStateValidationFn = (filters: any, rows: FsListAbstractRow[]) => boolean;
233
+ export type FsListFetchFn = (query: Record<string, any>, options: FsListFetchOptions) => Observable<{
234
+ data: unknown[];
235
+ paging?: FsPaging;
236
+ }>;
237
+ export type FsListAfterFetchFn = (query: Record<string, any>, data: unknown[]) => void;
238
+ export type FsListBeforeFetchFn = (query: any) => Observable<Record<string, any>>;
239
+ export 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 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
+ }