@firestitch/list 13.0.2 → 13.0.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (191) 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 +91 -91
  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 +191 -191
  7. package/app/classes/pagination-controller.d.ts +198 -196
  8. package/app/classes/persistance-controller.d.ts +10 -10
  9. package/app/classes/reorder-controller.d.ts +68 -68
  10. package/app/classes/selection-controller.d.ts +155 -155
  11. package/app/classes/sorting-controller.d.ts +65 -65
  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 +14 -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 +128 -126
  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 +21 -21
  30. package/app/directives/cell/cell.directive.d.ts +8 -8
  31. package/app/directives/column/column.directive.d.ts +33 -33
  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/button-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 +247 -247
  59. package/app/interfaces/pagination-state.interface.d.ts +9 -0
  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 +60 -60
  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/bundles/firestitch-list.umd.js +7218 -0
  77. package/bundles/firestitch-list.umd.js.map +1 -0
  78. package/{esm2020/app/classes/actions-controller.mjs → esm2015/app/classes/actions-controller.js} +55 -55
  79. package/{esm2020/app/classes/columns-controller.mjs → esm2015/app/classes/columns-controller.js} +205 -205
  80. package/esm2015/app/classes/data-controller.js +365 -0
  81. package/esm2015/app/classes/external-params-controller.js +147 -0
  82. package/{esm2020/app/classes/index.mjs → esm2015/app/classes/index.js} +3 -3
  83. package/esm2015/app/classes/list-controller.js +754 -0
  84. package/esm2015/app/classes/pagination-controller.js +479 -0
  85. package/{esm2020/app/classes/persistance-controller.mjs → esm2015/app/classes/persistance-controller.js} +19 -19
  86. package/esm2015/app/classes/reorder-controller.js +183 -0
  87. package/esm2015/app/classes/selection-controller.js +468 -0
  88. package/{esm2020/app/classes/sorting-controller.mjs → esm2015/app/classes/sorting-controller.js} +183 -183
  89. package/esm2015/app/components/body/body.component.js +69 -0
  90. package/esm2015/app/components/body/row/actions/actions.component.js +102 -0
  91. package/esm2015/app/components/body/row/cell/cell.component.js +113 -0
  92. package/esm2015/app/components/body/row/inline-action/inline-action.component.js +37 -0
  93. package/esm2015/app/components/body/row/menu-action/menu-action.component.js +50 -0
  94. package/esm2015/app/components/body/row/row.component.js +330 -0
  95. package/esm2015/app/components/customize-cols/customize-cols.component.js +72 -0
  96. package/esm2015/app/components/footer/footer-row/footer-cell/footer-cell.component.js +20 -0
  97. package/esm2015/app/components/footer/footer-row/footer-row.component.js +33 -0
  98. package/esm2015/app/components/footer/footer.component.js +36 -0
  99. package/esm2015/app/components/head/head-cell/head-cell.component.js +34 -0
  100. package/esm2015/app/components/head/head.component.js +108 -0
  101. package/esm2015/app/components/list/list.component.js +397 -0
  102. package/esm2015/app/components/loader/loader.component.js +45 -0
  103. package/esm2015/app/components/manage-saved-filters/manage-saved-filters.component.js +79 -0
  104. package/esm2015/app/components/pagination/pagination.component.js +42 -0
  105. package/esm2015/app/components/saved-filters/saved-filters.component.js +32 -0
  106. package/esm2015/app/components/status/status.component.js +72 -0
  107. package/{esm2020/app/directives/cell/cell.directive.mjs → esm2015/app/directives/cell/cell.directive.js} +18 -18
  108. package/{esm2020/app/directives/column/column.directive.mjs → esm2015/app/directives/column/column.directive.js} +112 -112
  109. package/{esm2020/app/directives/content/content.directive.mjs → esm2015/app/directives/content/content.directive.js} +13 -13
  110. package/{esm2020/app/directives/content-init/content-init.directive.mjs → esm2015/app/directives/content-init/content-init.directive.js} +22 -22
  111. package/esm2015/app/directives/draggable-list/draggable-list.directive.js +330 -0
  112. package/esm2015/app/directives/draggable-row/draggable-row.directive.js +79 -0
  113. package/{esm2020/app/directives/empty-state/empty-state.directive.mjs → esm2015/app/directives/empty-state/empty-state.directive.js} +13 -13
  114. package/{esm2020/app/directives/footer/footer.directive.mjs → esm2015/app/directives/footer/footer.directive.js} +18 -18
  115. package/{esm2020/app/directives/group-expand-trigger/group-expand-trigger.directive.mjs → esm2015/app/directives/group-expand-trigger/group-expand-trigger.directive.js} +26 -26
  116. package/{esm2020/app/directives/group-footer/group-footer.directive.mjs → esm2015/app/directives/group-footer/group-footer.directive.js} +14 -14
  117. package/{esm2020/app/directives/group-header/group-header.directive.mjs → esm2015/app/directives/group-header/group-header.directive.js} +14 -14
  118. package/{esm2020/app/directives/header/header.directive.mjs → esm2015/app/directives/header/header.directive.js} +18 -18
  119. package/{esm2020/app/directives/heading/heading.directive.mjs → esm2015/app/directives/heading/heading.directive.js} +13 -13
  120. package/{esm2020/app/directives/heading-container/heading-container.directive.mjs → esm2015/app/directives/heading-container/heading-container.directive.js} +13 -13
  121. package/{esm2020/app/directives/index.mjs → esm2015/app/directives/index.js} +4 -4
  122. package/{esm2020/app/directives/subheading/subheading.directive.mjs → esm2015/app/directives/subheading/subheading.directive.js} +13 -13
  123. package/{esm2020/app/enums/button-type.enum.mjs → esm2015/app/enums/button-type.enum.js} +9 -9
  124. package/{esm2020/app/enums/page-change-type.enum.mjs → esm2015/app/enums/page-change-type.enum.js} +6 -6
  125. package/{esm2020/app/enums/pagination-strategy.enum.mjs → esm2015/app/enums/pagination-strategy.enum.js} +7 -7
  126. package/{esm2020/app/enums/row-type.enum.mjs → esm2015/app/enums/row-type.enum.js} +7 -7
  127. package/{esm2020/app/enums/state.enum.mjs → esm2015/app/enums/state.enum.js} +11 -11
  128. package/{esm2020/app/fs-list.module.mjs → esm2015/app/fs-list.module.js} +246 -246
  129. package/{esm2020/app/fs-list.providers.mjs → esm2015/app/fs-list.providers.js} +4 -4
  130. package/{esm2020/app/interfaces/cellconfig.interface.mjs → esm2015/app/interfaces/cellconfig.interface.js} +2 -2
  131. package/{esm2020/app/interfaces/column-config.interface.mjs → esm2015/app/interfaces/column-config.interface.js} +1 -1
  132. package/{esm2020/app/interfaces/draggable-list.interface.mjs → esm2015/app/interfaces/draggable-list.interface.js} +2 -2
  133. package/esm2015/app/interfaces/external-params.interface.js +2 -0
  134. package/{esm2020/app/interfaces/index.mjs → esm2015/app/interfaces/index.js} +5 -5
  135. package/{esm2020/app/interfaces/listconfig.interface.mjs → esm2015/app/interfaces/listconfig.interface.js} +1 -1
  136. package/esm2015/app/interfaces/pagination-state.interface.js +2 -0
  137. package/esm2015/app/interfaces/pagination.interface.js +2 -0
  138. package/{esm2020/app/interfaces/sorting-change-event.interface.mjs → esm2015/app/interfaces/sorting-change-event.interface.js} +2 -2
  139. package/{esm2020/app/models/column-async-attribute.mjs → esm2015/app/models/column-async-attribute.js} +13 -13
  140. package/{esm2020/app/models/column-attributes.mjs → esm2015/app/models/column-attributes.js} +130 -130
  141. package/{esm2020/app/models/column.model.mjs → esm2015/app/models/column.model.js} +162 -162
  142. package/{esm2020/app/models/row/base-row.mjs → esm2015/app/models/row/base-row.js} +23 -23
  143. package/{esm2020/app/models/row/child-row.mjs → esm2015/app/models/row/child-row.js} +28 -28
  144. package/{esm2020/app/models/row/group-footer-row.mjs → esm2015/app/models/row/group-footer-row.js} +20 -20
  145. package/{esm2020/app/models/row/group-row.mjs → esm2015/app/models/row/group-row.js} +44 -44
  146. package/{esm2020/app/models/row/simple-row.mjs → esm2015/app/models/row/simple-row.js} +10 -10
  147. package/esm2015/app/models/row-action.model.js +90 -0
  148. package/{esm2020/app/models/row.mjs → esm2015/app/models/row.js} +88 -88
  149. package/{esm2020/app/models/styleConfig.model.mjs → esm2015/app/models/styleConfig.model.js} +75 -75
  150. package/{esm2020/app/pipes/action-label.mjs → esm2015/app/pipes/action-label.js} +17 -17
  151. package/{esm2020/app/pipes/index.mjs → esm2015/app/pipes/index.js} +1 -1
  152. package/{esm2020/app/services/group-expand-notifier.service.mjs → esm2015/app/services/group-expand-notifier.service.js} +26 -26
  153. package/{esm2020/firestitch-list.mjs → esm2015/firestitch-list.js} +4 -4
  154. package/{esm2020/public_api.mjs → esm2015/public_api.js} +46 -46
  155. package/fesm2015/{firestitch-list.mjs → firestitch-list.js} +5803 -5711
  156. package/fesm2015/firestitch-list.js.map +1 -0
  157. package/firestitch-list.d.ts +5 -5
  158. package/package.json +7 -20
  159. package/public_api.d.ts +41 -40
  160. package/esm2020/app/classes/data-controller.mjs +0 -367
  161. package/esm2020/app/classes/external-params-controller.mjs +0 -147
  162. package/esm2020/app/classes/list-controller.mjs +0 -752
  163. package/esm2020/app/classes/pagination-controller.mjs +0 -467
  164. package/esm2020/app/classes/reorder-controller.mjs +0 -182
  165. package/esm2020/app/classes/selection-controller.mjs +0 -468
  166. package/esm2020/app/components/body/body.component.mjs +0 -64
  167. package/esm2020/app/components/body/row/actions/actions.component.mjs +0 -97
  168. package/esm2020/app/components/body/row/cell/cell.component.mjs +0 -107
  169. package/esm2020/app/components/body/row/inline-action/inline-action.component.mjs +0 -33
  170. package/esm2020/app/components/body/row/menu-action/menu-action.component.mjs +0 -46
  171. package/esm2020/app/components/body/row/row.component.mjs +0 -323
  172. package/esm2020/app/components/customize-cols/customize-cols.component.mjs +0 -68
  173. package/esm2020/app/components/footer/footer-row/footer-cell/footer-cell.component.mjs +0 -16
  174. package/esm2020/app/components/footer/footer-row/footer-row.component.mjs +0 -28
  175. package/esm2020/app/components/footer/footer.component.mjs +0 -31
  176. package/esm2020/app/components/head/head-cell/head-cell.component.mjs +0 -29
  177. package/esm2020/app/components/head/head.component.mjs +0 -103
  178. package/esm2020/app/components/list/list.component.mjs +0 -388
  179. package/esm2020/app/components/loader/loader.component.mjs +0 -40
  180. package/esm2020/app/components/manage-saved-filters/manage-saved-filters.component.mjs +0 -76
  181. package/esm2020/app/components/pagination/pagination.component.mjs +0 -37
  182. package/esm2020/app/components/saved-filters/saved-filters.component.mjs +0 -29
  183. package/esm2020/app/components/status/status.component.mjs +0 -66
  184. package/esm2020/app/directives/draggable-list/draggable-list.directive.mjs +0 -328
  185. package/esm2020/app/directives/draggable-row/draggable-row.directive.mjs +0 -78
  186. package/esm2020/app/interfaces/external-params.interface.mjs +0 -2
  187. package/esm2020/app/interfaces/pagination.interface.mjs +0 -2
  188. package/esm2020/app/models/row-action.model.mjs +0 -90
  189. package/fesm2015/firestitch-list.mjs.map +0 -1
  190. package/fesm2020/firestitch-list.mjs +0 -5846
  191. 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 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,247 +1,247 @@
1
- import { FsFile } from '@firestitch/file';
2
- import { ChangeFn, FsFilterAction, 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/button-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
- rowHighlight?: 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
- actions?: FsListAction[];
38
- fetch?: FsListFetchFn;
39
- afterFetch?: FsListAfterFetchFn;
40
- beforeFetch?: FsListBeforeFetchFn;
41
- afterContentInit?: FsListAfterContentInitFn;
42
- afterInit?: FsListAfterInitFn;
43
- scrollable?: FsListScrollableConfig;
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
- }
64
- export interface FsListGroupConfig {
65
- enabled?: boolean;
66
- initialExpand?: boolean;
67
- groupBy?: (row: any) => any;
68
- compareBy?: (row: any) => any;
69
- footer?: (row: {
70
- [key: string]: any;
71
- }, group?: {
72
- [key: string]: any;
73
- children: {
74
- [key: string]: any;
75
- }[];
76
- }) => boolean;
77
- actions?: (FsListRowActionGroup | FsListRowAction)[];
78
- }
79
- export interface FsListLoadMoreConfig {
80
- label?: string;
81
- }
82
- export interface FsListReorderConfig {
83
- start?: () => void;
84
- moved?: FsListReorderMovedCallback;
85
- done?: FsListReorderDoneCallback;
86
- moveDrop?: FsListReorderMoveInGroupCallback;
87
- position?: ReorderPosition;
88
- disabled?: boolean;
89
- toggle?: boolean;
90
- label?: string;
91
- menu?: boolean;
92
- multiple?: boolean;
93
- status?: boolean;
94
- }
95
- export declare type FsListReorderMovedCallback = (rows: FsListReorderData[]) => void;
96
- export declare type FsListReorderDoneCallback = (rows: FsListReorderData[]) => void | Observable<any>;
97
- export interface FsListReorderData {
98
- type: RowType;
99
- data: any;
100
- parent: FsListReorderData;
101
- }
102
- export declare type FsListReorderMoveInGroupCallback = (data: {
103
- row1: any;
104
- row2: any;
105
- group1: any;
106
- group2: any;
107
- }) => boolean;
108
- export interface FsListHeaderConfig {
109
- className?: string;
110
- align?: string;
111
- }
112
- export interface FsListCellConfig {
113
- className?: string;
114
- align?: string;
115
- }
116
- export interface FsListFooterConfig {
117
- className?: string;
118
- align?: string;
119
- }
120
- export interface FsListSortsConfig {
121
- name: string;
122
- value: string;
123
- direction?: 'asc' | 'desc';
124
- }
125
- export interface FsListSortConfig {
126
- value: string;
127
- direction?: 'asc' | 'desc';
128
- }
129
- export interface FsListScrollableConfig {
130
- name: string;
131
- activationDown?: number;
132
- loaderDiametr?: number;
133
- status?: boolean;
134
- }
135
- export interface FsListRestoreConfig {
136
- query?: any;
137
- filter?: boolean | string;
138
- filterLabel?: string;
139
- menuLabel?: string;
140
- click?: (row: FsListAbstractRow, event?: any) => void | Observable<any>;
141
- reload?: boolean;
142
- }
143
- export interface FsListNoResultsConfig {
144
- message?: string;
145
- }
146
- export interface FsListSelectionConfig {
147
- actions?: FsSelectionDialogConfigAction[];
148
- actionSelected?: (action: FsListActionSelected) => Observable<boolean>;
149
- allSelected?: () => void;
150
- cancelled?: () => void;
151
- disabled?: boolean;
152
- selectAll?: boolean;
153
- selectionChanged?: (data: any, selectedAll: boolean, selectionRef: SelectionRef) => FsSelectionDialogConfigAction[] | Observable<FsSelectionDialogConfigAction[] | void> | void;
154
- }
155
- export interface FsListFetchSubscription {
156
- loadOffset?: boolean;
157
- scrollIntoView?: boolean;
158
- }
159
- export declare type FsListAction = {
160
- customize?: boolean;
161
- } & FsFilterAction;
162
- export interface FsListRowActionGroup {
163
- label?: string;
164
- rowActions: FsListRowAction[];
165
- }
166
- export interface FsListRowAction {
167
- label?: string | FsListRowActionLabelFn;
168
- type?: ActionType;
169
- className?: string;
170
- icon?: string;
171
- menu?: boolean;
172
- click?: (row: any, event: any, index: any) => void;
173
- link?: FsListRowActionLinkFn;
174
- file?: FsListRowActionFile;
175
- show?: (row: any, index: number) => boolean;
176
- remove?: {
177
- title?: string;
178
- template?: string;
179
- } | boolean;
180
- restore?: boolean;
181
- }
182
- export declare type FsListRowActionFileFn = (selection: FsFile | FsFile[], row: FsListAbstractRow, index: number) => void;
183
- export declare type FsListRowActionLinkFn = (row: FsListAbstractRow) => FsListRowActionLink;
184
- export declare type FsListRowActionLabelFn = (row: FsListAbstractRow) => string;
185
- export interface FsListRowActionFile {
186
- select: FsListRowActionFileFn;
187
- error?: (error: unknown) => void;
188
- multiple?: boolean;
189
- accept?: string;
190
- minWidth?: number;
191
- minHeight?: number;
192
- maxWidth?: number;
193
- maxHeight?: number;
194
- imageQuality?: number;
195
- }
196
- export interface FsListRowActionLink {
197
- link: any[] | string;
198
- queryParams?: Record<string, any>;
199
- target?: string;
200
- }
201
- export interface FsListAbstractRow {
202
- [name: string]: any;
203
- }
204
- export declare type FsListTrackByFn = (row: FsListAbstractRow, index?: number) => boolean;
205
- export declare type FsListTrackByTargetRowFn = (listRow: FsListAbstractRow, targetRow?: FsListAbstractRow) => boolean;
206
- export declare type FsListColumnLoadFn = () => Observable<FsListColumn[]>;
207
- export declare type FsListColumnChangeFn = (listColumns: FsListColumn[]) => void;
208
- export declare type FsListColumnTitleFn = (name: string, defaultTitle: string) => string;
209
- export declare type FsListColumnTooltipFn = (name: string, show: boolean, disabled: boolean) => string;
210
- export declare type FsListColumnDisabledFn = (name: string) => boolean;
211
- export declare type FsListColumnSelectedFn = (name: string, show: boolean) => boolean;
212
- export interface FsListColumnConfig {
213
- load?: FsListColumnLoadFn;
214
- change?: FsListColumnChangeFn;
215
- title?: FsListColumnTitleFn;
216
- tooltip?: FsListColumnTooltipFn;
217
- disabled?: FsListColumnDisabledFn;
218
- selected?: FsListColumnSelectedFn;
219
- }
220
- export interface FsListColumn {
221
- name: string;
222
- show: boolean;
223
- }
224
- export interface FsListActionSelected extends FsSelectionActionSelected {
225
- selected: any[];
226
- }
227
- export interface FsListEmptyStateConfig {
228
- validate: FsListStateValidationFn;
229
- }
230
- export interface FsListFetchOptions {
231
- state: FsListState;
232
- }
233
- export declare type FsListPersitance = FsFilterPersistance;
234
- export declare type FsListStateValidationFn = (filters: any, rows: FsListAbstractRow[]) => boolean;
235
- export declare type FsListFetchFn = (query: Record<string, any>, options: FsListFetchOptions) => Observable<{
236
- data: unknown[];
237
- paging?: FsPaging;
238
- }>;
239
- export declare type FsListAfterFetchFn = (query: Record<string, any>, data: unknown[]) => void;
240
- export declare type FsListBeforeFetchFn = (query: any) => Observable<Record<string, any>>;
241
- export declare type FsListAfterContentInitFn = (query: Record<string, any>, data: unknown[]) => void;
242
- export interface FsListRowClassOptions {
243
- index: number;
244
- groupIndex?: number;
245
- type?: RowType;
246
- }
247
- export declare type FsListAfterInitFn = (listComponent: any) => void;
1
+ import { FsFile } from '@firestitch/file';
2
+ import { ChangeFn, FsFilterAction, 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/button-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
+ rowHighlight?: 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
+ actions?: FsListAction[];
38
+ fetch?: FsListFetchFn;
39
+ afterFetch?: FsListAfterFetchFn;
40
+ beforeFetch?: FsListBeforeFetchFn;
41
+ afterContentInit?: FsListAfterContentInitFn;
42
+ afterInit?: FsListAfterInitFn;
43
+ scrollable?: FsListScrollableConfig;
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
+ }
64
+ export interface FsListGroupConfig {
65
+ enabled?: boolean;
66
+ initialExpand?: boolean;
67
+ groupBy?: (row: any) => any;
68
+ compareBy?: (row: any) => any;
69
+ footer?: (row: {
70
+ [key: string]: any;
71
+ }, group?: {
72
+ [key: string]: any;
73
+ children: {
74
+ [key: string]: any;
75
+ }[];
76
+ }) => boolean;
77
+ actions?: (FsListRowActionGroup | FsListRowAction)[];
78
+ }
79
+ export interface FsListLoadMoreConfig {
80
+ label?: string;
81
+ }
82
+ export interface FsListReorderConfig {
83
+ start?: () => void;
84
+ moved?: FsListReorderMovedCallback;
85
+ done?: FsListReorderDoneCallback;
86
+ moveDrop?: FsListReorderMoveInGroupCallback;
87
+ position?: ReorderPosition;
88
+ disabled?: boolean;
89
+ toggle?: boolean;
90
+ label?: string;
91
+ menu?: boolean;
92
+ multiple?: boolean;
93
+ status?: boolean;
94
+ }
95
+ export declare type FsListReorderMovedCallback = (rows: FsListReorderData[]) => void;
96
+ export declare type FsListReorderDoneCallback = (rows: FsListReorderData[]) => void | Observable<any>;
97
+ export interface FsListReorderData {
98
+ type: RowType;
99
+ data: any;
100
+ parent: FsListReorderData;
101
+ }
102
+ export declare type FsListReorderMoveInGroupCallback = (data: {
103
+ row1: any;
104
+ row2: any;
105
+ group1: any;
106
+ group2: any;
107
+ }) => boolean;
108
+ export interface FsListHeaderConfig {
109
+ className?: string;
110
+ align?: string;
111
+ }
112
+ export interface FsListCellConfig {
113
+ className?: string;
114
+ align?: string;
115
+ }
116
+ export interface FsListFooterConfig {
117
+ className?: string;
118
+ align?: string;
119
+ }
120
+ export interface FsListSortsConfig {
121
+ name: string;
122
+ value: string;
123
+ direction?: 'asc' | 'desc';
124
+ }
125
+ export interface FsListSortConfig {
126
+ value: string;
127
+ direction?: 'asc' | 'desc';
128
+ }
129
+ export interface FsListScrollableConfig {
130
+ name: string;
131
+ activationDown?: number;
132
+ loaderDiametr?: number;
133
+ status?: boolean;
134
+ }
135
+ export interface FsListRestoreConfig {
136
+ query?: any;
137
+ filter?: boolean | string;
138
+ filterLabel?: string;
139
+ menuLabel?: string;
140
+ click?: (row: FsListAbstractRow, event?: any) => void | Observable<any>;
141
+ reload?: boolean;
142
+ }
143
+ export interface FsListNoResultsConfig {
144
+ message?: string;
145
+ }
146
+ export interface FsListSelectionConfig {
147
+ actions?: FsSelectionDialogConfigAction[];
148
+ actionSelected?: (action: FsListActionSelected) => Observable<boolean>;
149
+ allSelected?: () => void;
150
+ cancelled?: () => void;
151
+ disabled?: boolean;
152
+ selectAll?: boolean;
153
+ selectionChanged?: (data: any, selectedAll: boolean, selectionRef: SelectionRef) => FsSelectionDialogConfigAction[] | Observable<FsSelectionDialogConfigAction[] | void> | void;
154
+ }
155
+ export interface FsListFetchSubscription {
156
+ loadOffset?: boolean;
157
+ scrollIntoView?: boolean;
158
+ }
159
+ export declare type FsListAction = {
160
+ customize?: boolean;
161
+ } & FsFilterAction;
162
+ export interface FsListRowActionGroup {
163
+ label?: string;
164
+ rowActions: FsListRowAction[];
165
+ }
166
+ export interface FsListRowAction {
167
+ label?: string | FsListRowActionLabelFn;
168
+ type?: ActionType;
169
+ className?: string;
170
+ icon?: string;
171
+ menu?: boolean;
172
+ click?: (row: any, event: any, index: any) => void;
173
+ link?: FsListRowActionLinkFn;
174
+ file?: FsListRowActionFile;
175
+ show?: (row: any, index: number) => boolean;
176
+ remove?: {
177
+ title?: string;
178
+ template?: string;
179
+ } | boolean;
180
+ restore?: boolean;
181
+ }
182
+ export declare type FsListRowActionFileFn = (selection: FsFile | FsFile[], row: FsListAbstractRow, index: number) => void;
183
+ export declare type FsListRowActionLinkFn = (row: FsListAbstractRow) => FsListRowActionLink;
184
+ export declare type FsListRowActionLabelFn = (row: FsListAbstractRow) => string;
185
+ export interface FsListRowActionFile {
186
+ select: FsListRowActionFileFn;
187
+ error?: (error: unknown) => void;
188
+ multiple?: boolean;
189
+ accept?: string;
190
+ minWidth?: number;
191
+ minHeight?: number;
192
+ maxWidth?: number;
193
+ maxHeight?: number;
194
+ imageQuality?: number;
195
+ }
196
+ export interface FsListRowActionLink {
197
+ link: any[] | string;
198
+ queryParams?: Record<string, any>;
199
+ target?: string;
200
+ }
201
+ export interface FsListAbstractRow {
202
+ [name: string]: any;
203
+ }
204
+ export declare type FsListTrackByFn = (row: FsListAbstractRow, index?: number) => boolean;
205
+ export declare type FsListTrackByTargetRowFn = (listRow: FsListAbstractRow, targetRow?: FsListAbstractRow) => boolean;
206
+ export declare type FsListColumnLoadFn = () => Observable<FsListColumn[]>;
207
+ export declare type FsListColumnChangeFn = (listColumns: FsListColumn[]) => void;
208
+ export declare type FsListColumnTitleFn = (name: string, defaultTitle: string) => string;
209
+ export declare type FsListColumnTooltipFn = (name: string, show: boolean, disabled: boolean) => string;
210
+ export declare type FsListColumnDisabledFn = (name: string) => boolean;
211
+ export declare type FsListColumnSelectedFn = (name: string, show: boolean) => boolean;
212
+ export interface FsListColumnConfig {
213
+ load?: FsListColumnLoadFn;
214
+ change?: FsListColumnChangeFn;
215
+ title?: FsListColumnTitleFn;
216
+ tooltip?: FsListColumnTooltipFn;
217
+ disabled?: FsListColumnDisabledFn;
218
+ selected?: FsListColumnSelectedFn;
219
+ }
220
+ export interface FsListColumn {
221
+ name: string;
222
+ show: boolean;
223
+ }
224
+ export interface FsListActionSelected extends FsSelectionActionSelected {
225
+ selected: any[];
226
+ }
227
+ export interface FsListEmptyStateConfig {
228
+ validate: FsListStateValidationFn;
229
+ }
230
+ export interface FsListFetchOptions {
231
+ state: FsListState;
232
+ }
233
+ export declare type FsListPersitance = FsFilterPersistance;
234
+ export declare type FsListStateValidationFn = (filters: any, rows: FsListAbstractRow[]) => boolean;
235
+ export declare type FsListFetchFn = (query: Record<string, any>, options: FsListFetchOptions) => Observable<{
236
+ data: unknown[];
237
+ paging?: FsPaging;
238
+ }>;
239
+ export declare type FsListAfterFetchFn = (query: Record<string, any>, data: unknown[]) => void;
240
+ export declare type FsListBeforeFetchFn = (query: any) => Observable<Record<string, any>>;
241
+ export declare type FsListAfterContentInitFn = (query: Record<string, any>, data: unknown[]) => void;
242
+ export interface FsListRowClassOptions {
243
+ index: number;
244
+ groupIndex?: number;
245
+ type?: RowType;
246
+ }
247
+ export declare type FsListAfterInitFn = (listComponent: any) => void;
@@ -0,0 +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,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
+ }
@@ -1,39 +1,39 @@
1
- import { Observable } from 'rxjs';
2
- export declare class ColumnAttributes {
3
- private _title;
4
- private _name;
5
- private _customize;
6
- private _sortable;
7
- private _sortableDefault;
8
- private _direction$;
9
- private _align;
10
- private _width;
11
- private _className;
12
- private _visible$;
13
- constructor(attrs?: {
14
- [key: string]: any;
15
- });
16
- set title(value: string);
17
- get title(): string;
18
- set name(value: string);
19
- get name(): string;
20
- set customize(value: boolean);
21
- get customize(): boolean;
22
- set sortable(value: boolean);
23
- get sortable(): boolean;
24
- set sortableDefault(value: boolean);
25
- get sortableDefault(): boolean;
26
- set direction(value: 'asc' | 'desc');
27
- get direction(): 'asc' | 'desc';
28
- get direction$(): Observable<'asc' | 'desc'>;
29
- set align(value: string);
30
- get align(): string;
31
- set width(value: string);
32
- get width(): string;
33
- set className(value: string | string[]);
34
- get className(): string | string[];
35
- set visible(value: boolean);
36
- get visible(): boolean;
37
- get visible$(): Observable<boolean>;
38
- private _init;
39
- }
1
+ import { Observable } from 'rxjs';
2
+ export declare class ColumnAttributes {
3
+ private _title;
4
+ private _name;
5
+ private _customize;
6
+ private _sortable;
7
+ private _sortableDefault;
8
+ private _direction$;
9
+ private _align;
10
+ private _width;
11
+ private _className;
12
+ private _visible$;
13
+ constructor(attrs?: {
14
+ [key: string]: any;
15
+ });
16
+ set title(value: string);
17
+ get title(): string;
18
+ set name(value: string);
19
+ get name(): string;
20
+ set customize(value: boolean);
21
+ get customize(): boolean;
22
+ set sortable(value: boolean);
23
+ get sortable(): boolean;
24
+ set sortableDefault(value: boolean);
25
+ get sortableDefault(): boolean;
26
+ set direction(value: 'asc' | 'desc');
27
+ get direction(): 'asc' | 'desc';
28
+ get direction$(): Observable<'asc' | 'desc'>;
29
+ set align(value: string);
30
+ get align(): string;
31
+ set width(value: string);
32
+ get width(): string;
33
+ set className(value: string | string[]);
34
+ get className(): string | string[];
35
+ set visible(value: boolean);
36
+ get visible(): boolean;
37
+ get visible$(): Observable<boolean>;
38
+ private _init;
39
+ }