@angular-generic-table/core 5.0.0-alpha.2 → 5.0.0-rc.11

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 (260) hide show
  1. package/README.md +13 -134
  2. package/angular-generic-table-core.d.ts +2 -19
  3. package/esm2020/angular-generic-table-core.mjs +5 -0
  4. package/esm2020/lib/core.component.mjs +143 -0
  5. package/esm2020/lib/core.module.mjs +23 -0
  6. package/esm2020/lib/core.service.mjs +14 -0
  7. package/esm2020/lib/enums/order.enum.mjs +6 -0
  8. package/esm2020/lib/models/table-column.interface.mjs +2 -0
  9. package/esm2020/lib/models/table-config.interface.mjs +2 -0
  10. package/esm2020/lib/models/table-info.interface.mjs +2 -0
  11. package/esm2020/lib/models/table-meta.interface.mjs +2 -0
  12. package/esm2020/lib/models/table-row.interface.mjs +2 -0
  13. package/esm2020/lib/models/table-sort.interface.mjs +2 -0
  14. package/esm2020/lib/pagination/pagination.component.mjs +63 -0
  15. package/esm2020/lib/pagination/pagination.module.mjs +18 -0
  16. package/esm2020/lib/pipes/capital-case.pipe.mjs +17 -0
  17. package/esm2020/lib/pipes/dash-case.pipe.mjs +17 -0
  18. package/esm2020/lib/pipes/dynamic.pipe.mjs +25 -0
  19. package/esm2020/lib/pipes/highlight.pipe.mjs +48 -0
  20. package/esm2020/lib/pipes/sort-class.pipe.mjs +22 -0
  21. package/esm2020/lib/utilities/utilities.mjs +39 -0
  22. package/esm2020/public-api.mjs +15 -0
  23. package/fesm2015/angular-generic-table-core.mjs +412 -0
  24. package/fesm2015/angular-generic-table-core.mjs.map +1 -0
  25. package/fesm2020/angular-generic-table-core.mjs +408 -0
  26. package/fesm2020/angular-generic-table-core.mjs.map +1 -0
  27. package/lib/core.component.d.ts +34 -0
  28. package/lib/core.module.d.ts +12 -1
  29. package/lib/core.service.d.ts +6 -0
  30. package/lib/enums/order.enum.d.ts +4 -0
  31. package/lib/models/table-column.interface.d.ts +19 -0
  32. package/lib/models/table-config.interface.d.ts +15 -0
  33. package/lib/models/table-info.interface.d.ts +4 -0
  34. package/lib/models/table-meta.interface.d.ts +8 -0
  35. package/lib/models/table-row.interface.d.ts +4 -0
  36. package/lib/models/table-sort.interface.d.ts +5 -0
  37. package/lib/pagination/pagination.component.d.ts +14 -0
  38. package/lib/pagination/pagination.module.d.ts +8 -0
  39. package/lib/pipes/capital-case.pipe.d.ts +7 -0
  40. package/lib/pipes/dash-case.pipe.d.ts +4 -1
  41. package/lib/pipes/dynamic.pipe.d.ts +9 -0
  42. package/lib/pipes/highlight.pipe.d.ts +7 -0
  43. package/lib/pipes/sort-class.pipe.d.ts +11 -0
  44. package/lib/utilities/utilities.d.ts +6 -0
  45. package/package.json +26 -24
  46. package/public-api.d.ts +11 -0
  47. package/scss/index.scss +102 -0
  48. package/CHANGELOG.md +0 -461
  49. package/LICENSE.md +0 -201
  50. package/angular-generic-table-core.metadata.json +0 -1
  51. package/bundles/angular-generic-table-core.umd.js +0 -3679
  52. package/bundles/angular-generic-table-core.umd.js.map +0 -1
  53. package/bundles/angular-generic-table-core.umd.min.js +0 -2
  54. package/bundles/angular-generic-table-core.umd.min.js.map +0 -1
  55. package/css/generic-table.css +0 -168
  56. package/css/generic-table.css.map +0 -9
  57. package/css/generic-table.min.css +0 -2
  58. package/css/generic-table.min.css.map +0 -1
  59. package/esm2015/angular-generic-table-core.js +0 -28
  60. package/esm2015/angular-generic-table-core.metadata.json +0 -1
  61. package/esm2015/lib/components/generic-table/generic-table.component.js +0 -1738
  62. package/esm2015/lib/components/generic-table/generic-table.component.metadata.json +0 -1
  63. package/esm2015/lib/components/gt-checkbox/gt-checkbox.component.js +0 -88
  64. package/esm2015/lib/components/gt-checkbox/gt-checkbox.component.metadata.json +0 -1
  65. package/esm2015/lib/components/gt-custom-component-factory/gt-custom-component-factory.component.js +0 -112
  66. package/esm2015/lib/components/gt-custom-component-factory/gt-custom-component-factory.component.metadata.json +0 -1
  67. package/esm2015/lib/components/gt-drilldown/gt-drilldown.component.js +0 -53
  68. package/esm2015/lib/components/gt-drilldown/gt-drilldown.component.metadata.json +0 -1
  69. package/esm2015/lib/components/gt-dropdown/gt-dropdown.component.js +0 -176
  70. package/esm2015/lib/components/gt-dropdown/gt-dropdown.component.metadata.json +0 -1
  71. package/esm2015/lib/components/gt-expanding-row/gt-expanding-row.component.js +0 -147
  72. package/esm2015/lib/components/gt-expanding-row/gt-expanding-row.component.metadata.json +0 -1
  73. package/esm2015/lib/components/gt-pagination/gt-pagination.component.js +0 -141
  74. package/esm2015/lib/components/gt-pagination/gt-pagination.component.metadata.json +0 -1
  75. package/esm2015/lib/components/gt-table-info/gt-table-info.component.js +0 -103
  76. package/esm2015/lib/components/gt-table-info/gt-table-info.component.metadata.json +0 -1
  77. package/esm2015/lib/core.module.js +0 -100
  78. package/esm2015/lib/core.module.metadata.json +0 -1
  79. package/esm2015/lib/directives/component-anchor.directive.js +0 -65
  80. package/esm2015/lib/directives/component-anchor.directive.metadata.json +0 -1
  81. package/esm2015/lib/directives/gt-column-width.directive.js +0 -73
  82. package/esm2015/lib/directives/gt-column-width.directive.metadata.json +0 -1
  83. package/esm2015/lib/interfaces/gt-config-field.js +0 -96
  84. package/esm2015/lib/interfaces/gt-config-field.metadata.json +0 -1
  85. package/esm2015/lib/interfaces/gt-config-setting.js +0 -41
  86. package/esm2015/lib/interfaces/gt-config-setting.metadata.json +0 -1
  87. package/esm2015/lib/interfaces/gt-config-total.js +0 -20
  88. package/esm2015/lib/interfaces/gt-config-total.metadata.json +0 -1
  89. package/esm2015/lib/interfaces/gt-config.js +0 -24
  90. package/esm2015/lib/interfaces/gt-config.metadata.json +0 -1
  91. package/esm2015/lib/interfaces/gt-event.js +0 -16
  92. package/esm2015/lib/interfaces/gt-event.metadata.json +0 -1
  93. package/esm2015/lib/interfaces/gt-information.js +0 -38
  94. package/esm2015/lib/interfaces/gt-information.metadata.json +0 -1
  95. package/esm2015/lib/interfaces/gt-options.js +0 -55
  96. package/esm2015/lib/interfaces/gt-options.metadata.json +0 -1
  97. package/esm2015/lib/interfaces/gt-render-field.js +0 -29
  98. package/esm2015/lib/interfaces/gt-render-field.metadata.json +0 -1
  99. package/esm2015/lib/interfaces/gt-row-meta.js +0 -18
  100. package/esm2015/lib/interfaces/gt-row-meta.metadata.json +0 -1
  101. package/esm2015/lib/interfaces/gt-row.js +0 -20
  102. package/esm2015/lib/interfaces/gt-row.metadata.json +0 -1
  103. package/esm2015/lib/interfaces/gt-texts.js +0 -36
  104. package/esm2015/lib/interfaces/gt-texts.metadata.json +0 -1
  105. package/esm2015/lib/pipes/dash-case.pipe.js +0 -30
  106. package/esm2015/lib/pipes/dash-case.pipe.metadata.json +0 -1
  107. package/esm2015/lib/pipes/gt-chunk.pipe.js +0 -52
  108. package/esm2015/lib/pipes/gt-chunk.pipe.metadata.json +0 -1
  109. package/esm2015/lib/pipes/gt-column-class.pipe.js +0 -51
  110. package/esm2015/lib/pipes/gt-column-class.pipe.metadata.json +0 -1
  111. package/esm2015/lib/pipes/gt-filter.pipe.js +0 -60
  112. package/esm2015/lib/pipes/gt-filter.pipe.metadata.json +0 -1
  113. package/esm2015/lib/pipes/gt-highlight.pipe.js +0 -72
  114. package/esm2015/lib/pipes/gt-highlight.pipe.metadata.json +0 -1
  115. package/esm2015/lib/pipes/gt-is-editable.pipe.js +0 -37
  116. package/esm2015/lib/pipes/gt-is-editable.pipe.metadata.json +0 -1
  117. package/esm2015/lib/pipes/gt-is-observable.pipe.js +0 -31
  118. package/esm2015/lib/pipes/gt-is-observable.pipe.metadata.json +0 -1
  119. package/esm2015/lib/pipes/gt-meta.pipe.js +0 -54
  120. package/esm2015/lib/pipes/gt-meta.pipe.metadata.json +0 -1
  121. package/esm2015/lib/pipes/gt-order-by.pipe.js +0 -202
  122. package/esm2015/lib/pipes/gt-order-by.pipe.metadata.json +0 -1
  123. package/esm2015/lib/pipes/gt-property.pipe.js +0 -52
  124. package/esm2015/lib/pipes/gt-property.pipe.metadata.json +0 -1
  125. package/esm2015/lib/pipes/gt-render.pipe.js +0 -173
  126. package/esm2015/lib/pipes/gt-render.pipe.metadata.json +0 -1
  127. package/esm2015/lib/pipes/gt-row-class.pipe.js +0 -66
  128. package/esm2015/lib/pipes/gt-row-class.pipe.metadata.json +0 -1
  129. package/esm2015/lib/pipes/gt-search.pipe.js +0 -114
  130. package/esm2015/lib/pipes/gt-search.pipe.metadata.json +0 -1
  131. package/esm2015/lib/pipes/gt-totals-position.pipe.js +0 -35
  132. package/esm2015/lib/pipes/gt-totals-position.pipe.metadata.json +0 -1
  133. package/esm2015/lib/pipes/gt-totals.pipe.js +0 -46
  134. package/esm2015/lib/pipes/gt-totals.pipe.metadata.json +0 -1
  135. package/esm2015/lib/pipes/gt-visible.pipe.js +0 -71
  136. package/esm2015/lib/pipes/gt-visible.pipe.metadata.json +0 -1
  137. package/esm2015/public_api.js +0 -18
  138. package/esm2015/public_api.metadata.json +0 -1
  139. package/esm5/angular-generic-table-core.js +0 -28
  140. package/esm5/angular-generic-table-core.metadata.json +0 -1
  141. package/esm5/lib/components/generic-table/generic-table.component.js +0 -1813
  142. package/esm5/lib/components/generic-table/generic-table.component.metadata.json +0 -1
  143. package/esm5/lib/components/gt-checkbox/gt-checkbox.component.js +0 -100
  144. package/esm5/lib/components/gt-checkbox/gt-checkbox.component.metadata.json +0 -1
  145. package/esm5/lib/components/gt-custom-component-factory/gt-custom-component-factory.component.js +0 -136
  146. package/esm5/lib/components/gt-custom-component-factory/gt-custom-component-factory.component.metadata.json +0 -1
  147. package/esm5/lib/components/gt-drilldown/gt-drilldown.component.js +0 -41
  148. package/esm5/lib/components/gt-drilldown/gt-drilldown.component.metadata.json +0 -1
  149. package/esm5/lib/components/gt-dropdown/gt-dropdown.component.js +0 -179
  150. package/esm5/lib/components/gt-dropdown/gt-dropdown.component.metadata.json +0 -1
  151. package/esm5/lib/components/gt-expanding-row/gt-expanding-row.component.js +0 -173
  152. package/esm5/lib/components/gt-expanding-row/gt-expanding-row.component.metadata.json +0 -1
  153. package/esm5/lib/components/gt-pagination/gt-pagination.component.js +0 -149
  154. package/esm5/lib/components/gt-pagination/gt-pagination.component.metadata.json +0 -1
  155. package/esm5/lib/components/gt-table-info/gt-table-info.component.js +0 -111
  156. package/esm5/lib/components/gt-table-info/gt-table-info.component.metadata.json +0 -1
  157. package/esm5/lib/core.module.js +0 -104
  158. package/esm5/lib/core.module.metadata.json +0 -1
  159. package/esm5/lib/directives/component-anchor.directive.js +0 -66
  160. package/esm5/lib/directives/component-anchor.directive.metadata.json +0 -1
  161. package/esm5/lib/directives/gt-column-width.directive.js +0 -81
  162. package/esm5/lib/directives/gt-column-width.directive.metadata.json +0 -1
  163. package/esm5/lib/interfaces/gt-config-field.js +0 -96
  164. package/esm5/lib/interfaces/gt-config-field.metadata.json +0 -1
  165. package/esm5/lib/interfaces/gt-config-setting.js +0 -41
  166. package/esm5/lib/interfaces/gt-config-setting.metadata.json +0 -1
  167. package/esm5/lib/interfaces/gt-config-total.js +0 -20
  168. package/esm5/lib/interfaces/gt-config-total.metadata.json +0 -1
  169. package/esm5/lib/interfaces/gt-config.js +0 -24
  170. package/esm5/lib/interfaces/gt-config.metadata.json +0 -1
  171. package/esm5/lib/interfaces/gt-event.js +0 -16
  172. package/esm5/lib/interfaces/gt-event.metadata.json +0 -1
  173. package/esm5/lib/interfaces/gt-information.js +0 -38
  174. package/esm5/lib/interfaces/gt-information.metadata.json +0 -1
  175. package/esm5/lib/interfaces/gt-options.js +0 -55
  176. package/esm5/lib/interfaces/gt-options.metadata.json +0 -1
  177. package/esm5/lib/interfaces/gt-render-field.js +0 -29
  178. package/esm5/lib/interfaces/gt-render-field.metadata.json +0 -1
  179. package/esm5/lib/interfaces/gt-row-meta.js +0 -18
  180. package/esm5/lib/interfaces/gt-row-meta.metadata.json +0 -1
  181. package/esm5/lib/interfaces/gt-row.js +0 -20
  182. package/esm5/lib/interfaces/gt-row.metadata.json +0 -1
  183. package/esm5/lib/interfaces/gt-texts.js +0 -36
  184. package/esm5/lib/interfaces/gt-texts.metadata.json +0 -1
  185. package/esm5/lib/pipes/dash-case.pipe.js +0 -38
  186. package/esm5/lib/pipes/dash-case.pipe.metadata.json +0 -1
  187. package/esm5/lib/pipes/gt-chunk.pipe.js +0 -70
  188. package/esm5/lib/pipes/gt-chunk.pipe.metadata.json +0 -1
  189. package/esm5/lib/pipes/gt-column-class.pipe.js +0 -61
  190. package/esm5/lib/pipes/gt-column-class.pipe.metadata.json +0 -1
  191. package/esm5/lib/pipes/gt-filter.pipe.js +0 -73
  192. package/esm5/lib/pipes/gt-filter.pipe.metadata.json +0 -1
  193. package/esm5/lib/pipes/gt-highlight.pipe.js +0 -77
  194. package/esm5/lib/pipes/gt-highlight.pipe.metadata.json +0 -1
  195. package/esm5/lib/pipes/gt-is-editable.pipe.js +0 -47
  196. package/esm5/lib/pipes/gt-is-editable.pipe.metadata.json +0 -1
  197. package/esm5/lib/pipes/gt-is-observable.pipe.js +0 -39
  198. package/esm5/lib/pipes/gt-is-observable.pipe.metadata.json +0 -1
  199. package/esm5/lib/pipes/gt-meta.pipe.js +0 -65
  200. package/esm5/lib/pipes/gt-meta.pipe.metadata.json +0 -1
  201. package/esm5/lib/pipes/gt-order-by.pipe.js +0 -223
  202. package/esm5/lib/pipes/gt-order-by.pipe.metadata.json +0 -1
  203. package/esm5/lib/pipes/gt-property.pipe.js +0 -63
  204. package/esm5/lib/pipes/gt-property.pipe.metadata.json +0 -1
  205. package/esm5/lib/pipes/gt-render.pipe.js +0 -182
  206. package/esm5/lib/pipes/gt-render.pipe.metadata.json +0 -1
  207. package/esm5/lib/pipes/gt-row-class.pipe.js +0 -75
  208. package/esm5/lib/pipes/gt-row-class.pipe.metadata.json +0 -1
  209. package/esm5/lib/pipes/gt-search.pipe.js +0 -125
  210. package/esm5/lib/pipes/gt-search.pipe.metadata.json +0 -1
  211. package/esm5/lib/pipes/gt-totals-position.pipe.js +0 -45
  212. package/esm5/lib/pipes/gt-totals-position.pipe.metadata.json +0 -1
  213. package/esm5/lib/pipes/gt-totals.pipe.js +0 -57
  214. package/esm5/lib/pipes/gt-totals.pipe.metadata.json +0 -1
  215. package/esm5/lib/pipes/gt-visible.pipe.js +0 -79
  216. package/esm5/lib/pipes/gt-visible.pipe.metadata.json +0 -1
  217. package/esm5/public_api.js +0 -18
  218. package/esm5/public_api.metadata.json +0 -1
  219. package/fesm2015/angular-generic-table-core.js +0 -3289
  220. package/fesm2015/angular-generic-table-core.js.map +0 -1
  221. package/fesm5/angular-generic-table-core.js +0 -3578
  222. package/fesm5/angular-generic-table-core.js.map +0 -1
  223. package/lib/components/generic-table/generic-table.component.d.ts +0 -282
  224. package/lib/components/gt-checkbox/gt-checkbox.component.d.ts +0 -12
  225. package/lib/components/gt-custom-component-factory/gt-custom-component-factory.component.d.ts +0 -27
  226. package/lib/components/gt-drilldown/gt-drilldown.component.d.ts +0 -6
  227. package/lib/components/gt-dropdown/gt-dropdown.component.d.ts +0 -21
  228. package/lib/components/gt-expanding-row/gt-expanding-row.component.d.ts +0 -34
  229. package/lib/components/gt-pagination/gt-pagination.component.d.ts +0 -11
  230. package/lib/components/gt-table-info/gt-table-info.component.d.ts +0 -15
  231. package/lib/directives/component-anchor.directive.d.ts +0 -10
  232. package/lib/directives/gt-column-width.directive.d.ts +0 -11
  233. package/lib/interfaces/gt-config-field.d.ts +0 -87
  234. package/lib/interfaces/gt-config-setting.d.ts +0 -21
  235. package/lib/interfaces/gt-config-total.d.ts +0 -8
  236. package/lib/interfaces/gt-config.d.ts +0 -12
  237. package/lib/interfaces/gt-event.d.ts +0 -4
  238. package/lib/interfaces/gt-information.d.ts +0 -15
  239. package/lib/interfaces/gt-options.d.ts +0 -27
  240. package/lib/interfaces/gt-render-field.d.ts +0 -19
  241. package/lib/interfaces/gt-row-meta.d.ts +0 -5
  242. package/lib/interfaces/gt-row.d.ts +0 -6
  243. package/lib/interfaces/gt-texts.d.ts +0 -14
  244. package/lib/pipes/gt-chunk.pipe.d.ts +0 -8
  245. package/lib/pipes/gt-column-class.pipe.d.ts +0 -6
  246. package/lib/pipes/gt-filter.pipe.d.ts +0 -5
  247. package/lib/pipes/gt-highlight.pipe.d.ts +0 -7
  248. package/lib/pipes/gt-is-editable.pipe.d.ts +0 -4
  249. package/lib/pipes/gt-is-observable.pipe.d.ts +0 -4
  250. package/lib/pipes/gt-meta.pipe.d.ts +0 -5
  251. package/lib/pipes/gt-order-by.pipe.d.ts +0 -11
  252. package/lib/pipes/gt-property.pipe.d.ts +0 -7
  253. package/lib/pipes/gt-render.pipe.d.ts +0 -19
  254. package/lib/pipes/gt-row-class.pipe.d.ts +0 -5
  255. package/lib/pipes/gt-search.pipe.d.ts +0 -10
  256. package/lib/pipes/gt-totals-position.pipe.d.ts +0 -5
  257. package/lib/pipes/gt-totals.pipe.d.ts +0 -4
  258. package/lib/pipes/gt-visible.pipe.d.ts +0 -9
  259. package/public_api.d.ts +0 -18
  260. package/scss/generic-table.scss +0 -246
@@ -1,282 +0,0 @@
1
- import { EventEmitter, OnChanges, OnDestroy, OnInit, Renderer2, SimpleChanges, Type } from '@angular/core';
2
- import { GtRow } from '../../interfaces/gt-row';
3
- import { GtExpandedRow } from '../gt-expanding-row/gt-expanding-row.component';
4
- import { GtOptions } from '../../interfaces/gt-options';
5
- import { GtConfigField } from '../../interfaces/gt-config-field';
6
- import { GtConfigSetting } from '../../interfaces/gt-config-setting';
7
- import { GtRowMeta } from '../../interfaces/gt-row-meta';
8
- import { GtTexts } from '../../interfaces/gt-texts';
9
- import { GtConfig } from '../../interfaces/gt-config';
10
- import { GtEvent } from '../../interfaces/gt-event';
11
- import { GtInformation } from '../../interfaces/gt-information';
12
- import { GtRenderField } from '../../interfaces/gt-render-field';
13
- import { GtMetaPipe } from '../../pipes/gt-meta.pipe';
14
- export declare class GenericTableComponent<R extends GtRow, C extends GtExpandedRow<R>> implements OnInit, OnChanges, OnDestroy {
15
- private renderer;
16
- private gtMetaPipe;
17
- gtRowComponent: Type<C>;
18
- readonly hasEdits: boolean;
19
- gtOptions: GtOptions;
20
- gtTotals: any;
21
- gtFields: GtConfigField<R, any>[];
22
- gtSettings: GtConfigSetting[];
23
- gtData: Array<any>;
24
- columnWidth: Object;
25
- configObject: GtConfig<R>;
26
- sortOrder: Array<any>;
27
- metaInfo: {
28
- [gtRowId: string]: GtRowMeta;
29
- };
30
- selectedRows: Array<GtRow>;
31
- openRows: Array<GtRow>;
32
- private _gtSettings;
33
- private _gtFields;
34
- private _gtData;
35
- private _gtTotals;
36
- private _gtRowComponent;
37
- expandedRow: {
38
- component: Type<C>;
39
- data?: Array<any>;
40
- };
41
- gtDefaultTexts: GtTexts;
42
- gtTexts: GtTexts;
43
- gtClasses: string;
44
- gtEvent: EventEmitter<GtEvent>;
45
- gtDefaultOptions: GtOptions;
46
- private _gtOptions;
47
- store: Array<any>;
48
- loading: boolean;
49
- private debounceTimer;
50
- loadingProperty: string;
51
- lazyAllSelected: boolean;
52
- gtInfo: GtInformation;
53
- refreshPipe: boolean;
54
- refreshTotals: boolean;
55
- refreshSorting: boolean;
56
- refreshFilter: boolean;
57
- refreshPageArray: boolean;
58
- private globalInlineEditListener;
59
- editedRows: {
60
- [key: string]: {
61
- changes: {
62
- [key: string]: GtRenderField<GtRow, any>;
63
- };
64
- row: GtRow;
65
- };
66
- };
67
- data: {
68
- exportData: Array<any>;
69
- };
70
- constructor(renderer: Renderer2, gtMetaPipe: GtMetaPipe);
71
- /**
72
- * Sort table by object key.
73
- * @param objectKey - name of key to sort on.
74
- * @param event - such as key press during sorting.
75
- */
76
- gtSort: (objectKey: string, event: any) => void;
77
- /**
78
- * Change number of rows to be displayed.
79
- * @param rowLength - total number of rows.
80
- * @param reset - should page be reset to first page.
81
- */
82
- changeRowLength: (rowLength: any, reset?: boolean) => void;
83
- /**
84
- * Force a redraw of table rows.
85
- * As the table uses pure pipes, we need to force a redraw if an object in the array is changed to see the changes.
86
- */
87
- redraw: ($event?: any) => void;
88
- /** Update record range. */
89
- private updateRecordRange;
90
- /** Update totals. */
91
- private updateTotals;
92
- /** Go to next page. */
93
- nextPage: () => void;
94
- /** Go to previous page. */
95
- previousPage: () => void;
96
- /** Request more data (used when lazy loading) */
97
- private getData;
98
- /**
99
- * Go to specific page.
100
- * @param page - page number.
101
- */
102
- goToPage: (page: number) => void;
103
- /**
104
- * Get meta data for row.
105
- */
106
- getRowState(row: R): GtRowMeta;
107
- /**
108
- * Expand all rows.
109
- * @param expandedRow - component to render when rows are expanded.
110
- */
111
- expandAllRows(expandedRow: {
112
- component: Type<C>;
113
- data?: any;
114
- }): void;
115
- /**
116
- * Collapse all rows.
117
- */
118
- collapseAllRows(): void;
119
- /**
120
- * Select all rows.
121
- */
122
- selectAllRows(): void;
123
- /**
124
- * Deselect all rows.
125
- */
126
- deselectAllRows(): void;
127
- /**
128
- * Toggle all rows.
129
- */
130
- toggleAllRows(): void;
131
- /**
132
- * Toggle row collapsed state ie. expanded/open or collapsed/closed.
133
- * @param row - row object that should be expanded/collapsed.
134
- * @param expandedRow - component to render when row is expanded.
135
- */
136
- toggleCollapse(row: GtRow, expandedRow?: {
137
- component: Type<C>;
138
- data?: any;
139
- }): void;
140
- /**
141
- * Toggle row selected state ie. selected or not.
142
- * @param row - row object that should be selected/deselected.
143
- */
144
- toggleSelect(row: GtRow): void;
145
- rowClick(row: GtRow, $event: MouseEvent): void;
146
- /**
147
- * Update row data.
148
- * @param row - row object that has been edited.
149
- * @param oldValue - row object before edit.
150
- */
151
- updateRow(row: GtRow, oldValue: GtRow): void;
152
- /**
153
- * removes a row from the table
154
- * @param row - the row object to remove
155
- */
156
- removeRow(row: GtRow): void;
157
- /**
158
- * check if a row is selected
159
- * @param row - row object
160
- */
161
- isRowSelected(row: GtRow): boolean;
162
- /**
163
- * Update meta info for all rows, ie. isSelected, isOpen.
164
- * @param array - array that holds rows that need to be updated.
165
- * @param property - name of property that should be changed/toggled.
166
- * @param active - should rows be expanded/open, selected.
167
- * @param exception - update all rows except this one.
168
- */
169
- private _updateMetaInfo;
170
- /**
171
- * Push selected/expanded lazy loaded rows to array with meta data.
172
- * @param target - array to which rows should be added.
173
- * @param source - array that holds rows that should be added.
174
- * @returns array with added rows.
175
- */
176
- private _pushLazyRows;
177
- /**
178
- * Toggle meta info for all rows, ie. isSelected, isOpen.
179
- * @param property - name of property that should be changed/toggled.
180
- * @param active - should rows be expanded/open, selected.
181
- */
182
- private _toggleAllRowProperty;
183
- /**
184
- * Toggle meta info for row, ie. isSelected, isOpen.
185
- * @param row - row object.
186
- * @param property - name of property that should be changed/toggled.
187
- * @param propertyValues - optional property values that can be passed.
188
- */
189
- private _toggleRowProperty;
190
- /**
191
- * Update column.
192
- * @param $event - key up event.
193
- * @param row - row object.
194
- * @param column - column object.
195
- */
196
- gtUpdateColumn($event: KeyboardEvent, row: GtRow, column: GtRenderField<any, any>): void;
197
- /**
198
- * Dropdown select.
199
- * @param row - row object.
200
- * @param column - column object.
201
- */
202
- gtDropdownSelect(row: GtRow, column: GtRenderField<any, any>): void;
203
- private _editRow;
204
- /**
205
- * Listen for key down event - listen for key down event during inline edit.
206
- */
207
- private _listenForKeydownEvent;
208
- /**
209
- * Inline edit update - accept changes and update row values.
210
- */
211
- inlineEditUpdate(): void;
212
- /**
213
- * Inline edit cancel - cancel and reset inline edits.
214
- */
215
- inlineEditCancel(row?: GtRow): void;
216
- /**
217
- * Stop listening for key down event - stop listening for key down events passed during inline edit.
218
- */
219
- private _stopListeningForKeydownEvent;
220
- /**
221
- * Apply filter(s).
222
- * @param filter - object containing key value pairs, where value should be array of values.
223
- */
224
- gtApplyFilter(filter: Object): void;
225
- /** Clear/remove applied filter(s). */
226
- gtClearFilter(): void;
227
- /**
228
- * Search
229
- * @param value - string containing one or more words
230
- */
231
- gtSearch(value: string): void;
232
- /**
233
- * Add rows
234
- * @param rows - rows to add
235
- * @returns new data array.
236
- */
237
- gtAdd(rows: Array<R>): ReadonlyArray<R>;
238
- /**
239
- * Delete row
240
- * @param objectKey - object key you want to find match with
241
- * @param value - the value that should be deleted
242
- * @param match - all: delete all matches, first: delete first match (default)
243
- * @returns new data array.
244
- */
245
- gtDelete(objectKey: string, value: string | number, match?: 'first' | 'all'): ReadonlyArray<R>;
246
- /**
247
- * Create store to hold previously loaded records.
248
- * @param records - total number of records in store.
249
- * @param perPage - how many records to show per page.
250
- * @returns a nested array to hold records per page.
251
- */
252
- private createStore;
253
- /**
254
- * Create placeholders for rows while loading data from back-end.
255
- * @param perPage - how many records to show per page.
256
- * @returns an array containing empty records to be presented while fetching real data.
257
- */
258
- private loadingContent;
259
- /** Sort by sort order */
260
- private getSortOrder;
261
- /** Sort by column order */
262
- private getColumnOrder;
263
- /** Create a deep copy of data */
264
- private cloneDeep;
265
- /** Export data as CSV
266
- * @param fileName - optional file name (overrides default file name).
267
- * @param useBOM - use BOM (byte order marker).
268
- */
269
- exportCSV(fileName?: string, useBOM?: boolean): void;
270
- /** Return property */
271
- private getProperty;
272
- private restructureSorting;
273
- ngOnInit(): void;
274
- /**
275
- * Extend object function.
276
- */
277
- private extend;
278
- ngOnChanges(changes: SimpleChanges): void;
279
- trackByFn(index: number, item: GtRow): any;
280
- trackByColumnFn(index: number, item: GtConfigField<any, any>): string;
281
- ngOnDestroy(): void;
282
- }
@@ -1,12 +0,0 @@
1
- import { EventEmitter, OnInit } from '@angular/core';
2
- export declare class GtCheckboxComponent implements OnInit {
3
- initialValue: boolean;
4
- class: string;
5
- checked: boolean;
6
- private _checked;
7
- private _initialValue;
8
- changed: EventEmitter<boolean>;
9
- constructor();
10
- ngOnInit(): void;
11
- toggle(checked: boolean): void;
12
- }
@@ -1,27 +0,0 @@
1
- import { EventEmitter, Injector, OnInit, Type } from '@angular/core';
2
- import { ReplaySubject } from 'rxjs';
3
- export declare abstract class GtCustomComponent<R> implements OnInit {
4
- row: R;
5
- column: any;
6
- redrawEvent: EventEmitter<{
7
- row: R;
8
- column: any;
9
- }>;
10
- searchTerms: string;
11
- $searchTerms: ReplaySubject<string>;
12
- protected $redraw($event?: any): void;
13
- ngOnInit(): void;
14
- }
15
- export declare class GtCustomComponentFactory<R, C extends GtCustomComponent<R>> {
16
- searchTerms: string;
17
- type: Type<C>;
18
- injector: Injector;
19
- row: R;
20
- column: any;
21
- $searchTerms: ReplaySubject<string>;
22
- redrawEvent: EventEmitter<{
23
- row: R;
24
- column: any;
25
- }>;
26
- instance(instance: C): void;
27
- }
@@ -1,6 +0,0 @@
1
- import { OnInit } from '@angular/core';
2
- import { GtExpandedRow } from '../gt-expanding-row/gt-expanding-row.component';
3
- export declare class GtDrilldownComponent extends GtExpandedRow<any> implements OnInit {
4
- constructor();
5
- ngOnInit(): void;
6
- }
@@ -1,21 +0,0 @@
1
- import { EventEmitter, OnDestroy, OnInit, Renderer2 } from '@angular/core';
2
- import { Subject } from 'rxjs';
3
- export declare class GtDropdownComponent implements OnInit, OnDestroy {
4
- private renderer;
5
- selected: any;
6
- _selected: any;
7
- options: Array<any>;
8
- id: string;
9
- selectedChange: EventEmitter<any>;
10
- active: boolean;
11
- state: Subject<boolean>;
12
- tether: any;
13
- clickListener: Function;
14
- keyupListener: Function;
15
- constructor(renderer: Renderer2);
16
- select(option: any): void;
17
- toggleDropdown(): void;
18
- ngOnInit(): void;
19
- ngOnDestroy(): void;
20
- removeListeners(): void;
21
- }
@@ -1,34 +0,0 @@
1
- import { EventEmitter, Type } from '@angular/core';
2
- import { GtRow } from '../../interfaces/gt-row';
3
- import { GtConfigSetting } from '../../interfaces/gt-config-setting';
4
- import { GtConfigField } from '../../interfaces/gt-config-field';
5
- import { GtEvent } from '../../interfaces/gt-event';
6
- export declare class GtExpandedRow<R extends GtRow> {
7
- row: R;
8
- columnWidth: Object;
9
- gtSettings: Array<GtConfigSetting>;
10
- gtFields: Array<GtConfigField<R, any>>;
11
- gtOptions: any;
12
- gtInfo: any;
13
- data: any;
14
- redrawEvent: EventEmitter<R>;
15
- gtEvent: EventEmitter<GtEvent>;
16
- toggleRowEvent: EventEmitter<R>;
17
- $hide(): void;
18
- $redraw($event?: any): void;
19
- $rowClick(row: GtRow, $event: MouseEvent): void;
20
- }
21
- export declare class GtExpandingRowComponent<R extends GtRow, C extends GtExpandedRow<R>> {
22
- type: Type<C>;
23
- row: R;
24
- columnWidth: Object;
25
- gtSettings: Array<GtConfigSetting>;
26
- gtFields: Array<GtConfigField<R, any>>;
27
- gtOptions: any;
28
- gtInfo: any;
29
- data: any;
30
- redrawEvent: EventEmitter<R>;
31
- toggleRowEvent: EventEmitter<R>;
32
- gtEvent: any;
33
- newInstance(instance: C): void;
34
- }
@@ -1,11 +0,0 @@
1
- export declare class GtPaginationComponent {
2
- genericTable: GenericTableComponent<any, any>;
3
- private _genericTable;
4
- gtClasses: string;
5
- ready: boolean;
6
- }
7
- import { PipeTransform } from '@angular/core';
8
- import { GenericTableComponent } from '../generic-table/generic-table.component';
9
- export declare class PaginationPipe implements PipeTransform {
10
- transform(totalPages: number, currentPage: number): Array<any>;
11
- }
@@ -1,15 +0,0 @@
1
- import { AfterViewChecked, ChangeDetectorRef } from '@angular/core';
2
- export declare class GtTableInfoComponent implements AfterViewChecked {
3
- private _changeDetectionRef;
4
- genericTable: GenericTableComponent<any, any>;
5
- customText: string;
6
- constructor(_changeDetectionRef: ChangeDetectorRef);
7
- ngAfterViewChecked(): void;
8
- }
9
- import { PipeTransform } from '@angular/core';
10
- import { GenericTableComponent } from '../generic-table/generic-table.component';
11
- import { GtTexts } from '../../interfaces/gt-texts';
12
- import { GtInformation } from '../../interfaces/gt-information';
13
- export declare class TableInfoPipe implements PipeTransform {
14
- transform(texts: GtTexts | string, keys: GtInformation, recordsAfterSearch: number, recordFrom: number, recordTo: number, recordsAll: number, loading: string, tableInfoAfterSearch: string): string;
15
- }
@@ -1,10 +0,0 @@
1
- import { ComponentFactoryResolver, EventEmitter, Injector, OnInit, Type, ViewContainerRef } from '@angular/core';
2
- export declare class ComponentAnchorDirective<C> implements OnInit {
3
- private componentFactoryResolver;
4
- private viewContainer;
5
- ctor: Type<C>;
6
- injector: Injector;
7
- instance: EventEmitter<C>;
8
- constructor(componentFactoryResolver: ComponentFactoryResolver, viewContainer: ViewContainerRef);
9
- ngOnInit(): void;
10
- }
@@ -1,11 +0,0 @@
1
- import { ChangeDetectorRef, ElementRef } from '@angular/core';
2
- export declare class GtColumnWidthDirective {
3
- private hostElement;
4
- private cdRef;
5
- objectKey: string;
6
- widths: Object;
7
- onResize($event: any): void;
8
- constructor(hostElement: ElementRef, cdRef: ChangeDetectorRef);
9
- ngOnInit(): void;
10
- checkSize(): void;
11
- }
@@ -1,87 +0,0 @@
1
- import { GtRow } from './gt-row';
2
- import { Type, Injector } from '@angular/core';
3
- import { Observable } from 'rxjs';
4
- import { GtCustomComponent } from '../components/gt-custom-component-factory/gt-custom-component-factory.component';
5
- export declare type GtRenderFunc<R extends GtRow> = (row: R) => string;
6
- export declare type GtValueFunc<R extends GtRow> = (row: R) => any;
7
- export declare type GtClickFunc<R extends GtRow> = (row: R, col: any, event: MouseEvent) => void;
8
- export declare type GtClassFunc = (row: any, col: any) => string;
9
- export declare type GtInlineEditFunc<R extends GtRow> = (row: any, col: any) => boolean;
10
- export interface GtConfigField<R extends GtRow, C extends GtCustomComponent<any>> {
11
- /**
12
- * name or label of field
13
- * (will be displayed as heading for column)
14
- */
15
- name: string;
16
- /**
17
- * heading used when columns are stacked (overrides name)
18
- */
19
- stackedHeading?: string;
20
- /**
21
- * key for mapping column to settings and data
22
- */
23
- objectKey: string;
24
- /**
25
- * custom class names for column
26
- */
27
- classNames?: string;
28
- /**
29
- * custom class names for row
30
- */
31
- rowClass?: string | GtClassFunc;
32
- /**
33
- * custom class names for column
34
- */
35
- columnClass?: string | GtClassFunc;
36
- /**
37
- * custom column component and associated injector
38
- */
39
- columnComponent?: {
40
- type: Type<C> | 'checkbox';
41
- injector?: Injector;
42
- };
43
- /**
44
- * custom function for column presentation
45
- */
46
- render?: GtRenderFunc<R>;
47
- /**
48
- * compiled (false by default)
49
- */
50
- compile?: boolean;
51
- /**
52
- * custom function for column value
53
- */
54
- value?: GtValueFunc<R>;
55
- /**
56
- * custom click callback
57
- */
58
- click?: GtClickFunc<R>;
59
- /**
60
- * close (expand) when clicked
61
- */
62
- expand?: boolean | {
63
- component: Type<C>;
64
- data?: any;
65
- };
66
- /**
67
- * custom function for export presentation
68
- */
69
- export?: GtValueFunc<R>;
70
- sort?: GtValueFunc<R>;
71
- /**
72
- * custom function for search value,
73
- * set to false if field shouldn't be searchable (true by default)
74
- */
75
- search?: any;
76
- inlineEdit?: {
77
- active: Observable<boolean> | GtInlineEditFunc<R>;
78
- type?: Observable<any> | Array<any> | 'text' | 'number' | 'password' | 'email';
79
- } | boolean | Array<any> | 'number' | 'password' | 'email';
80
- /**
81
- * custom header
82
- */
83
- header?: {
84
- type: Type<C>;
85
- injector?: Injector;
86
- };
87
- }
@@ -1,21 +0,0 @@
1
- export interface GtConfigSetting {
2
- objectKey: string;
3
- visible?: boolean;
4
- enabled?: boolean;
5
- sort?: 'asc' | 'desc' | 'enable' | 'disable' | string;
6
- sortEnabled?: boolean;
7
- sortOrder?: number;
8
- columnOrder?: number;
9
- /**
10
- * should column be exported to CSV?
11
- */
12
- export?: boolean;
13
- /**
14
- * should we include this column when using global search?
15
- */
16
- search?: boolean;
17
- /**
18
- * should settings be locked for editing? (default is false)
19
- */
20
- lockSettings?: boolean;
21
- }
@@ -1,8 +0,0 @@
1
- export interface GtConfigTotal {
2
- name: string;
3
- position?: 'header' | 'footer';
4
- update?: boolean;
5
- fields: {
6
- [key: string]: string | number | Function;
7
- };
8
- }
@@ -1,12 +0,0 @@
1
- import { GtConfigField } from './gt-config-field';
2
- import { GtConfigSetting } from './gt-config-setting';
3
- import { GtRow } from './gt-row';
4
- import { GtInformation } from './gt-information';
5
- import { GtConfigTotal } from './gt-config-total';
6
- export interface GtConfig<R extends GtRow> {
7
- settings: Array<GtConfigSetting>;
8
- fields: Array<GtConfigField<R, any>>;
9
- totals?: Array<GtConfigTotal>;
10
- data?: Array<R>;
11
- info?: GtInformation;
12
- }
@@ -1,4 +0,0 @@
1
- export interface GtEvent {
2
- name: string;
3
- value: any;
4
- }
@@ -1,15 +0,0 @@
1
- export interface GtInformation {
2
- filter?: Object;
3
- pageCurrent: number;
4
- pageNext?: number;
5
- pagePrevious?: number;
6
- pageTotal?: number;
7
- recordFrom?: number;
8
- recordTo?: number;
9
- recordLength: number;
10
- recordsAll: number;
11
- recordsAfterFilter: number;
12
- recordsAfterSearch: number;
13
- searchTerms?: string;
14
- visibleRecords?: any;
15
- }
@@ -1,27 +0,0 @@
1
- import { Type } from '@angular/core';
2
- export declare type InitialStateFunc = (row: any) => boolean;
3
- export interface GtOptions {
4
- cache?: boolean;
5
- debounceTime?: number;
6
- csvDelimiter?: string;
7
- stack?: boolean;
8
- lazyLoad?: boolean;
9
- highlightSearch?: boolean;
10
- rowSelection?: boolean;
11
- rowSelectionAllowMultiple?: boolean;
12
- rowSelectionInitialState?: boolean | InitialStateFunc;
13
- rowExpandAllowMultiple?: boolean;
14
- rowExpandInitialState?: boolean | InitialStateFunc;
15
- rowExpandInitialComponent?: {
16
- component: Type<any>;
17
- data?: Array<any>;
18
- };
19
- numberOfRows?: number;
20
- reportColumnWidth?: boolean;
21
- /** object key containing unique row id */
22
- rowIndex?: string;
23
- /** allow table to be unsorted */
24
- allowUnsorted?: boolean;
25
- /** should data be mutated or deep copy to be made */
26
- mutateData?: boolean;
27
- }
@@ -1,19 +0,0 @@
1
- import { GtRow } from './gt-row';
2
- import { GtClickFunc } from './gt-config-field';
3
- import { Injector, Type } from '@angular/core';
4
- import { GtCustomComponent } from '../components/gt-custom-component-factory/gt-custom-component-factory.component';
5
- export interface GtRenderField<R extends GtRow, C extends GtCustomComponent<any>> {
6
- objectKey: string;
7
- renderValue?: any;
8
- click?: GtClickFunc<R>;
9
- expand?: boolean | {
10
- component: Type<C>;
11
- data?: any;
12
- };
13
- sortValue: any;
14
- columnComponent?: {
15
- type: Type<C> | 'checkbox';
16
- injector?: Injector;
17
- };
18
- edited?: boolean;
19
- }
@@ -1,5 +0,0 @@
1
- export interface GtRowMeta {
2
- isOpen?: boolean;
3
- isSelected?: boolean;
4
- isChecked?: boolean;
5
- }
@@ -1,6 +0,0 @@
1
- export interface GtRow {
2
- isOpen?: boolean;
3
- $$gtRowId?: any;
4
- $$gtRowClass?: string;
5
- $$gtInitialRowIndex?: number;
6
- }
@@ -1,14 +0,0 @@
1
- export interface GtTexts {
2
- loading?: string;
3
- noData?: string;
4
- noMatchingData?: string;
5
- noVisibleColumnsHeading?: string;
6
- noVisibleColumns?: string;
7
- tableInfo?: string;
8
- tableInfoAfterSearch?: string;
9
- csvDownload?: string;
10
- sortLabel?: string;
11
- paginateNext?: string;
12
- paginatePrevious?: string;
13
- inlineEditEdited?: string;
14
- }