@igo2/common 1.14.3 → 1.14.4

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 (351) hide show
  1. package/esm2020/igo2-common.mjs +4 -4
  2. package/esm2020/lib/action/action.module.mjs +26 -26
  3. package/esm2020/lib/action/actionbar/actionbar-item.component.mjs +251 -251
  4. package/esm2020/lib/action/actionbar/actionbar.component.mjs +369 -369
  5. package/esm2020/lib/action/actionbar/actionbar.module.mjs +56 -56
  6. package/esm2020/lib/action/index.mjs +3 -3
  7. package/esm2020/lib/action/shared/action.enums.mjs +7 -7
  8. package/esm2020/lib/action/shared/action.interfaces.mjs +1 -1
  9. package/esm2020/lib/action/shared/index.mjs +4 -4
  10. package/esm2020/lib/action/shared/store.mjs +7 -7
  11. package/esm2020/lib/backdrop/backdrop.component.mjs +25 -25
  12. package/esm2020/lib/backdrop/backdrop.module.mjs +24 -24
  13. package/esm2020/lib/backdrop/index.mjs +2 -2
  14. package/esm2020/lib/badge-icon/badge-icon.directive.mjs +140 -140
  15. package/esm2020/lib/badge-icon/badge-icon.module.mjs +25 -25
  16. package/esm2020/lib/badge-icon/index.mjs +2 -2
  17. package/esm2020/lib/clickout/clickout.directive.mjs +31 -31
  18. package/esm2020/lib/clickout/clickout.module.mjs +23 -23
  19. package/esm2020/lib/clickout/index.mjs +2 -2
  20. package/esm2020/lib/clone/clone.module.mjs +23 -23
  21. package/esm2020/lib/clone/clone.pipe.mjs +23 -23
  22. package/esm2020/lib/clone/index.mjs +2 -2
  23. package/esm2020/lib/collapsible/collapse.directive.mjs +54 -54
  24. package/esm2020/lib/collapsible/collapsible.component.mjs +56 -56
  25. package/esm2020/lib/collapsible/collapsible.module.mjs +26 -26
  26. package/esm2020/lib/collapsible/index.mjs +2 -2
  27. package/esm2020/lib/confirm-dialog/confirm-dialog.component.mjs +43 -43
  28. package/esm2020/lib/confirm-dialog/confirm-dialog.module.mjs +28 -28
  29. package/esm2020/lib/confirm-dialog/confirm-dialog.service.mjs +21 -21
  30. package/esm2020/lib/confirm-dialog/index.mjs +2 -2
  31. package/esm2020/lib/context-menu/context-menu.directive.mjs +102 -102
  32. package/esm2020/lib/context-menu/context-menu.module.mjs +24 -24
  33. package/esm2020/lib/context-menu/index.mjs +2 -2
  34. package/esm2020/lib/context-menu/long-press.directive.mjs +62 -62
  35. package/esm2020/lib/custom-html/custom-html.component.mjs +28 -28
  36. package/esm2020/lib/custom-html/custom-html.module.mjs +46 -46
  37. package/esm2020/lib/custom-html/custom-html.pipe.mjs +17 -17
  38. package/esm2020/lib/custom-html/index.mjs +2 -2
  39. package/esm2020/lib/dom/dom.interfaces.mjs +2 -2
  40. package/esm2020/lib/dom/dom.module.mjs +22 -22
  41. package/esm2020/lib/dom/dom.service.mjs +29 -29
  42. package/esm2020/lib/dom/index.mjs +3 -3
  43. package/esm2020/lib/drag-drop/drag-drop.directive.mjs +87 -87
  44. package/esm2020/lib/drag-drop/drag-drop.module.mjs +23 -23
  45. package/esm2020/lib/drag-drop/index.mjs +2 -2
  46. package/esm2020/lib/dynamic-component/dynamic-component.module.mjs +30 -30
  47. package/esm2020/lib/dynamic-component/dynamic-outlet/dynamic-outlet.component.mjs +122 -122
  48. package/esm2020/lib/dynamic-component/dynamic-outlet/dynamic-outlet.module.mjs +27 -27
  49. package/esm2020/lib/dynamic-component/index.mjs +3 -3
  50. package/esm2020/lib/dynamic-component/shared/dynamic-component.interfaces.mjs +2 -2
  51. package/esm2020/lib/dynamic-component/shared/dynamic-component.mjs +173 -173
  52. package/esm2020/lib/dynamic-component/shared/dynamic-component.service.mjs +28 -28
  53. package/esm2020/lib/dynamic-component/shared/index.mjs +4 -4
  54. package/esm2020/lib/entity/entity-selector/entity-selector.component.mjs +193 -193
  55. package/esm2020/lib/entity/entity-selector/entity-selector.module.mjs +31 -31
  56. package/esm2020/lib/entity/entity-table/entity-table-row.directive.mjs +136 -136
  57. package/esm2020/lib/entity/entity-table/entity-table.component.mjs +1367 -1367
  58. package/esm2020/lib/entity/entity-table/entity-table.module.mjs +101 -101
  59. package/esm2020/lib/entity/entity-table-paginator/entity-table-paginator.component.mjs +131 -131
  60. package/esm2020/lib/entity/entity-table-paginator/entity-table-paginator.interface.mjs +1 -1
  61. package/esm2020/lib/entity/entity-table-paginator/entity-table-paginator.module.mjs +27 -27
  62. package/esm2020/lib/entity/entity.module.mjs +30 -30
  63. package/esm2020/lib/entity/index.mjs +5 -5
  64. package/esm2020/lib/entity/shared/entity.enums.mjs +28 -28
  65. package/esm2020/lib/entity/shared/entity.interfaces.mjs +1 -1
  66. package/esm2020/lib/entity/shared/entity.utils.mjs +66 -66
  67. package/esm2020/lib/entity/shared/index.mjs +10 -10
  68. package/esm2020/lib/entity/shared/state.mjs +190 -190
  69. package/esm2020/lib/entity/shared/store.mjs +287 -287
  70. package/esm2020/lib/entity/shared/strategies/filter-custom-function.mjs +78 -78
  71. package/esm2020/lib/entity/shared/strategies/filter-selection.mjs +83 -83
  72. package/esm2020/lib/entity/shared/strategies/index.mjs +4 -4
  73. package/esm2020/lib/entity/shared/strategies/strategy.mjs +74 -74
  74. package/esm2020/lib/entity/shared/transaction.mjs +315 -315
  75. package/esm2020/lib/entity/shared/view.mjs +314 -314
  76. package/esm2020/lib/entity/shared/watcher.mjs +119 -119
  77. package/esm2020/lib/flexible/flexible.component.mjs +147 -147
  78. package/esm2020/lib/flexible/flexible.module.mjs +23 -23
  79. package/esm2020/lib/flexible/flexible.type.mjs +2 -2
  80. package/esm2020/lib/flexible/index.mjs +3 -3
  81. package/esm2020/lib/form/form/form.component.mjs +116 -116
  82. package/esm2020/lib/form/form/form.module.mjs +39 -39
  83. package/esm2020/lib/form/form-field/form-field-select.component.mjs +126 -126
  84. package/esm2020/lib/form/form-field/form-field-text.component.mjs +103 -103
  85. package/esm2020/lib/form/form-field/form-field-textarea.component.mjs +104 -104
  86. package/esm2020/lib/form/form-field/form-field.component.mjs +71 -71
  87. package/esm2020/lib/form/form-field/form-field.module.mjs +73 -73
  88. package/esm2020/lib/form/form-field/index.mjs +4 -4
  89. package/esm2020/lib/form/form-group/form-group.component.mjs +104 -104
  90. package/esm2020/lib/form/form-group/form-group.module.mjs +39 -39
  91. package/esm2020/lib/form/form.module.mjs +48 -48
  92. package/esm2020/lib/form/index.mjs +4 -4
  93. package/esm2020/lib/form/shared/form-field-component.mjs +7 -7
  94. package/esm2020/lib/form/shared/form-field.service.mjs +28 -28
  95. package/esm2020/lib/form/shared/form.interfaces.mjs +1 -1
  96. package/esm2020/lib/form/shared/form.service.mjs +80 -80
  97. package/esm2020/lib/form/shared/form.utils.mjs +39 -39
  98. package/esm2020/lib/form/shared/index.mjs +6 -6
  99. package/esm2020/lib/home-button/home-button.component.mjs +30 -30
  100. package/esm2020/lib/home-button/home-button.module.mjs +40 -40
  101. package/esm2020/lib/home-button/index.mjs +2 -2
  102. package/esm2020/lib/image/image-error.directive.mjs +34 -34
  103. package/esm2020/lib/image/image.module.mjs +24 -24
  104. package/esm2020/lib/image/index.mjs +2 -2
  105. package/esm2020/lib/image/secure-image.pipe.mjs +59 -59
  106. package/esm2020/lib/interactive-tour/index.mjs +5 -5
  107. package/esm2020/lib/interactive-tour/interactive-tour.component.mjs +134 -134
  108. package/esm2020/lib/interactive-tour/interactive-tour.interface.mjs +1 -1
  109. package/esm2020/lib/interactive-tour/interactive-tour.loader.mjs +43 -43
  110. package/esm2020/lib/interactive-tour/interactive-tour.module.mjs +39 -39
  111. package/esm2020/lib/interactive-tour/interactive-tour.service.mjs +284 -284
  112. package/esm2020/lib/json-dialog/index.mjs +3 -3
  113. package/esm2020/lib/json-dialog/json-dialog.component.mjs +108 -108
  114. package/esm2020/lib/json-dialog/json-dialog.module.mjs +28 -28
  115. package/esm2020/lib/json-dialog/json-dialog.service.mjs +23 -23
  116. package/esm2020/lib/keyvalue/index.mjs +2 -2
  117. package/esm2020/lib/keyvalue/keyvalue.module.mjs +23 -23
  118. package/esm2020/lib/keyvalue/keyvalue.pipe.mjs +17 -17
  119. package/esm2020/lib/list/index.mjs +2 -2
  120. package/esm2020/lib/list/list-item.directive.mjs +164 -164
  121. package/esm2020/lib/list/list.component.mjs +261 -261
  122. package/esm2020/lib/list/list.module.mjs +28 -28
  123. package/esm2020/lib/panel/index.mjs +2 -2
  124. package/esm2020/lib/panel/panel.component.mjs +58 -58
  125. package/esm2020/lib/panel/panel.module.mjs +18 -18
  126. package/esm2020/lib/sidenav/index.mjs +2 -2
  127. package/esm2020/lib/sidenav/sidenav-shim.directive.mjs +54 -54
  128. package/esm2020/lib/sidenav/sidenav.module.mjs +23 -23
  129. package/esm2020/lib/spinner/index.mjs +2 -2
  130. package/esm2020/lib/spinner/spinner-activity.directive.mjs +46 -46
  131. package/esm2020/lib/spinner/spinner.component.mjs +34 -34
  132. package/esm2020/lib/spinner/spinner.module.mjs +20 -20
  133. package/esm2020/lib/stop-propagation/index.mjs +2 -2
  134. package/esm2020/lib/stop-propagation/stop-drop-propagation.directive.mjs +21 -21
  135. package/esm2020/lib/stop-propagation/stop-propagation.directive.mjs +20 -20
  136. package/esm2020/lib/stop-propagation/stop-propagation.module.mjs +24 -24
  137. package/esm2020/lib/table/index.mjs +6 -6
  138. package/esm2020/lib/table/table-action-color.enum.mjs +7 -7
  139. package/esm2020/lib/table/table-database.mjs +28 -28
  140. package/esm2020/lib/table/table-datasource.mjs +60 -60
  141. package/esm2020/lib/table/table-model.interface.mjs +1 -1
  142. package/esm2020/lib/table/table.component.mjs +296 -296
  143. package/esm2020/lib/table/table.module.mjs +66 -66
  144. package/esm2020/lib/tool/index.mjs +3 -3
  145. package/esm2020/lib/tool/shared/index.mjs +6 -6
  146. package/esm2020/lib/tool/shared/tool-component.mjs +8 -8
  147. package/esm2020/lib/tool/shared/tool.interface.mjs +1 -1
  148. package/esm2020/lib/tool/shared/tool.service.mjs +43 -43
  149. package/esm2020/lib/tool/shared/toolbox.enums.mjs +6 -6
  150. package/esm2020/lib/tool/shared/toolbox.mjs +178 -178
  151. package/esm2020/lib/tool/tool.module.mjs +31 -31
  152. package/esm2020/lib/tool/toolbox/toolbox.animation.mjs +9 -9
  153. package/esm2020/lib/tool/toolbox/toolbox.component.mjs +255 -255
  154. package/esm2020/lib/tool/toolbox/toolbox.module.mjs +35 -35
  155. package/esm2020/lib/widget/index.mjs +3 -3
  156. package/esm2020/lib/widget/shared/index.mjs +4 -4
  157. package/esm2020/lib/widget/shared/widget.interfaces.mjs +2 -2
  158. package/esm2020/lib/widget/shared/widget.mjs +4 -4
  159. package/esm2020/lib/widget/shared/widget.service.mjs +19 -19
  160. package/esm2020/lib/widget/widget-outlet/widget-outlet.component.mjs +115 -115
  161. package/esm2020/lib/widget/widget-outlet/widget-outlet.module.mjs +31 -31
  162. package/esm2020/lib/widget/widget.module.mjs +31 -31
  163. package/esm2020/lib/workspace/index.mjs +3 -3
  164. package/esm2020/lib/workspace/shared/index.mjs +4 -4
  165. package/esm2020/lib/workspace/shared/store.mjs +39 -39
  166. package/esm2020/lib/workspace/shared/workspace.interfaces.mjs +1 -1
  167. package/esm2020/lib/workspace/shared/workspace.mjs +116 -116
  168. package/esm2020/lib/workspace/workspace-selector/workspace-selector.component.mjs +50 -50
  169. package/esm2020/lib/workspace/workspace-selector/workspace-selector.module.mjs +31 -31
  170. package/esm2020/lib/workspace/workspace-widget-outlet/workspace-widget-outlet.component.mjs +87 -87
  171. package/esm2020/lib/workspace/workspace-widget-outlet/workspace-widget-outlet.module.mjs +31 -31
  172. package/esm2020/lib/workspace/workspace.module.mjs +26 -26
  173. package/esm2020/public_api.mjs +73 -73
  174. package/fesm2015/igo2-common.mjs +10003 -10003
  175. package/fesm2015/igo2-common.mjs.map +1 -1
  176. package/fesm2020/igo2-common.mjs +9306 -9306
  177. package/fesm2020/igo2-common.mjs.map +1 -1
  178. package/index.d.ts +5 -5
  179. package/lib/action/action.module.d.ts +8 -8
  180. package/lib/action/actionbar/actionbar-item.component.d.ts +78 -78
  181. package/lib/action/actionbar/actionbar.component.d.ts +146 -146
  182. package/lib/action/actionbar/actionbar.module.d.ts +20 -20
  183. package/lib/action/index.d.ts +2 -2
  184. package/lib/action/shared/action.enums.d.ts +5 -5
  185. package/lib/action/shared/action.interfaces.d.ts +17 -17
  186. package/lib/action/shared/index.d.ts +3 -3
  187. package/lib/action/shared/store.d.ts +8 -8
  188. package/lib/backdrop/backdrop.component.d.ts +9 -9
  189. package/lib/backdrop/backdrop.module.d.ts +10 -10
  190. package/lib/backdrop/index.d.ts +1 -1
  191. package/lib/badge-icon/badge-icon.directive.d.ts +36 -36
  192. package/lib/badge-icon/badge-icon.module.d.ts +11 -11
  193. package/lib/badge-icon/index.d.ts +1 -1
  194. package/lib/clickout/clickout.directive.d.ts +10 -10
  195. package/lib/clickout/clickout.module.d.ts +9 -9
  196. package/lib/clickout/index.d.ts +1 -1
  197. package/lib/clone/clone.module.d.ts +9 -9
  198. package/lib/clone/clone.pipe.d.ts +7 -7
  199. package/lib/clone/index.d.ts +1 -1
  200. package/lib/collapsible/collapse.directive.d.ts +19 -19
  201. package/lib/collapsible/collapsible.component.d.ts +13 -13
  202. package/lib/collapsible/collapsible.module.d.ts +12 -12
  203. package/lib/collapsible/index.d.ts +2 -2
  204. package/lib/confirm-dialog/confirm-dialog.component.d.ts +9 -9
  205. package/lib/confirm-dialog/confirm-dialog.module.d.ts +12 -12
  206. package/lib/confirm-dialog/confirm-dialog.service.d.ts +10 -10
  207. package/lib/confirm-dialog/index.d.ts +2 -2
  208. package/lib/context-menu/context-menu.directive.d.ts +21 -21
  209. package/lib/context-menu/context-menu.module.d.ts +10 -10
  210. package/lib/context-menu/index.d.ts +2 -2
  211. package/lib/context-menu/long-press.directive.d.ts +20 -20
  212. package/lib/custom-html/custom-html.component.d.ts +9 -9
  213. package/lib/custom-html/custom-html.module.d.ts +16 -16
  214. package/lib/custom-html/custom-html.pipe.d.ts +10 -10
  215. package/lib/custom-html/index.d.ts +2 -2
  216. package/lib/dom/dom.interfaces.d.ts +10 -10
  217. package/lib/dom/dom.module.d.ts +8 -8
  218. package/lib/dom/dom.service.d.ts +10 -10
  219. package/lib/dom/index.d.ts +2 -2
  220. package/lib/drag-drop/drag-drop.directive.d.ts +14 -14
  221. package/lib/drag-drop/drag-drop.module.d.ts +9 -9
  222. package/lib/drag-drop/index.d.ts +1 -1
  223. package/lib/dynamic-component/dynamic-component.module.d.ts +8 -8
  224. package/lib/dynamic-component/dynamic-outlet/dynamic-outlet.component.d.ts +70 -70
  225. package/lib/dynamic-component/dynamic-outlet/dynamic-outlet.module.d.ts +11 -11
  226. package/lib/dynamic-component/index.d.ts +2 -2
  227. package/lib/dynamic-component/shared/dynamic-component.d.ts +88 -88
  228. package/lib/dynamic-component/shared/dynamic-component.interfaces.d.ts +3 -3
  229. package/lib/dynamic-component/shared/dynamic-component.service.d.ts +18 -18
  230. package/lib/dynamic-component/shared/index.d.ts +3 -3
  231. package/lib/entity/entity-selector/entity-selector.component.d.ts +92 -92
  232. package/lib/entity/entity-selector/entity-selector.module.d.ts +13 -13
  233. package/lib/entity/entity-table/entity-table-row.directive.d.ts +69 -69
  234. package/lib/entity/entity-table/entity-table.component.d.ts +327 -327
  235. package/lib/entity/entity-table/entity-table.module.d.ts +29 -29
  236. package/lib/entity/entity-table-paginator/entity-table-paginator.component.d.ts +49 -49
  237. package/lib/entity/entity-table-paginator/entity-table-paginator.interface.d.ts +8 -8
  238. package/lib/entity/entity-table-paginator/entity-table-paginator.module.d.ts +11 -11
  239. package/lib/entity/entity.module.d.ts +10 -10
  240. package/lib/entity/index.d.ts +5 -5
  241. package/lib/entity/shared/entity.enums.d.ts +23 -23
  242. package/lib/entity/shared/entity.interfaces.d.ts +114 -114
  243. package/lib/entity/shared/entity.utils.d.ts +49 -49
  244. package/lib/entity/shared/index.d.ts +9 -9
  245. package/lib/entity/shared/state.d.ts +103 -103
  246. package/lib/entity/shared/store.d.ts +176 -176
  247. package/lib/entity/shared/strategies/filter-custom-function.d.ts +51 -51
  248. package/lib/entity/shared/strategies/filter-selection.d.ts +48 -48
  249. package/lib/entity/shared/strategies/index.d.ts +3 -3
  250. package/lib/entity/shared/strategies/strategy.d.ts +56 -56
  251. package/lib/entity/shared/transaction.d.ts +168 -168
  252. package/lib/entity/shared/view.d.ts +193 -193
  253. package/lib/entity/shared/watcher.d.ts +72 -72
  254. package/lib/flexible/flexible.component.d.ts +41 -41
  255. package/lib/flexible/flexible.module.d.ts +9 -9
  256. package/lib/flexible/flexible.type.d.ts +2 -2
  257. package/lib/flexible/index.d.ts +2 -2
  258. package/lib/form/form/form.component.d.ts +53 -53
  259. package/lib/form/form/form.module.d.ts +12 -12
  260. package/lib/form/form-field/form-field-select.component.d.ts +48 -48
  261. package/lib/form/form-field/form-field-text.component.d.ts +41 -41
  262. package/lib/form/form-field/form-field-textarea.component.d.ts +41 -41
  263. package/lib/form/form-field/form-field.component.d.ts +34 -34
  264. package/lib/form/form-field/form-field.module.d.ts +21 -21
  265. package/lib/form/form-field/index.d.ts +4 -4
  266. package/lib/form/form-group/form-group.component.d.ts +49 -49
  267. package/lib/form/form-group/form-group.module.d.ts +14 -14
  268. package/lib/form/form.module.d.ts +13 -13
  269. package/lib/form/index.d.ts +4 -4
  270. package/lib/form/shared/form-field-component.d.ts +1 -1
  271. package/lib/form/shared/form-field.service.d.ts +19 -19
  272. package/lib/form/shared/form.interfaces.d.ts +57 -57
  273. package/lib/form/shared/form.service.d.ts +15 -15
  274. package/lib/form/shared/form.utils.d.ts +11 -11
  275. package/lib/form/shared/index.d.ts +5 -5
  276. package/lib/home-button/home-button.component.d.ts +9 -9
  277. package/lib/home-button/home-button.module.d.ts +15 -15
  278. package/lib/home-button/index.d.ts +1 -1
  279. package/lib/image/image-error.directive.d.ts +11 -11
  280. package/lib/image/image.module.d.ts +10 -10
  281. package/lib/image/index.d.ts +2 -2
  282. package/lib/image/secure-image.pipe.d.ts +13 -13
  283. package/lib/interactive-tour/index.d.ts +4 -4
  284. package/lib/interactive-tour/interactive-tour.component.d.ts +30 -30
  285. package/lib/interactive-tour/interactive-tour.interface.d.ts +32 -32
  286. package/lib/interactive-tour/interactive-tour.loader.d.ts +18 -18
  287. package/lib/interactive-tour/interactive-tour.module.d.ts +12 -12
  288. package/lib/interactive-tour/interactive-tour.service.d.ts +29 -29
  289. package/lib/json-dialog/index.d.ts +2 -2
  290. package/lib/json-dialog/json-dialog.component.d.ts +13 -13
  291. package/lib/json-dialog/json-dialog.module.d.ts +13 -13
  292. package/lib/json-dialog/json-dialog.service.d.ts +10 -10
  293. package/lib/keyvalue/index.d.ts +1 -1
  294. package/lib/keyvalue/keyvalue.module.d.ts +9 -9
  295. package/lib/keyvalue/keyvalue.pipe.d.ts +7 -7
  296. package/lib/list/index.d.ts +2 -2
  297. package/lib/list/list-item.directive.d.ts +43 -43
  298. package/lib/list/list.component.d.ts +51 -51
  299. package/lib/list/list.module.d.ts +14 -14
  300. package/lib/panel/index.d.ts +1 -1
  301. package/lib/panel/panel.component.d.ts +10 -10
  302. package/lib/panel/panel.module.d.ts +8 -8
  303. package/lib/sidenav/index.d.ts +1 -1
  304. package/lib/sidenav/sidenav-shim.directive.d.ts +20 -20
  305. package/lib/sidenav/sidenav.module.d.ts +9 -9
  306. package/lib/spinner/index.d.ts +2 -2
  307. package/lib/spinner/spinner-activity.directive.d.ts +32 -32
  308. package/lib/spinner/spinner.component.d.ts +12 -12
  309. package/lib/spinner/spinner.module.d.ts +10 -10
  310. package/lib/stop-propagation/index.d.ts +2 -2
  311. package/lib/stop-propagation/stop-drop-propagation.directive.d.ts +6 -6
  312. package/lib/stop-propagation/stop-propagation.directive.d.ts +6 -6
  313. package/lib/stop-propagation/stop-propagation.module.d.ts +10 -10
  314. package/lib/table/index.d.ts +5 -5
  315. package/lib/table/table-action-color.enum.d.ts +5 -5
  316. package/lib/table/table-database.d.ts +10 -10
  317. package/lib/table/table-datasource.d.ts +17 -17
  318. package/lib/table/table-model.interface.d.ts +28 -28
  319. package/lib/table/table.component.d.ts +40 -40
  320. package/lib/table/table.module.d.ts +20 -20
  321. package/lib/tool/index.d.ts +2 -2
  322. package/lib/tool/shared/index.d.ts +5 -5
  323. package/lib/tool/shared/tool-component.d.ts +2 -2
  324. package/lib/tool/shared/tool.interface.d.ts +18 -18
  325. package/lib/tool/shared/tool.service.d.ts +30 -30
  326. package/lib/tool/shared/toolbox.d.ts +95 -95
  327. package/lib/tool/shared/toolbox.enums.d.ts +5 -5
  328. package/lib/tool/tool.module.d.ts +10 -10
  329. package/lib/tool/toolbox/toolbox.animation.d.ts +2 -2
  330. package/lib/tool/toolbox/toolbox.component.d.ts +127 -127
  331. package/lib/tool/toolbox/toolbox.module.d.ts +13 -13
  332. package/lib/widget/index.d.ts +2 -2
  333. package/lib/widget/shared/index.d.ts +3 -3
  334. package/lib/widget/shared/widget.d.ts +4 -4
  335. package/lib/widget/shared/widget.interfaces.d.ts +12 -12
  336. package/lib/widget/shared/widget.service.d.ts +10 -10
  337. package/lib/widget/widget-outlet/widget-outlet.component.d.ts +71 -71
  338. package/lib/widget/widget-outlet/widget-outlet.module.d.ts +12 -12
  339. package/lib/widget/widget.module.d.ts +8 -8
  340. package/lib/workspace/index.d.ts +3 -3
  341. package/lib/workspace/shared/index.d.ts +3 -3
  342. package/lib/workspace/shared/store.d.ts +20 -20
  343. package/lib/workspace/shared/workspace.d.ts +108 -108
  344. package/lib/workspace/shared/workspace.interfaces.d.ts +11 -11
  345. package/lib/workspace/workspace-selector/workspace-selector.component.d.ts +39 -39
  346. package/lib/workspace/workspace-selector/workspace-selector.module.d.ts +12 -12
  347. package/lib/workspace/workspace-widget-outlet/workspace-widget-outlet.component.d.ts +57 -57
  348. package/lib/workspace/workspace-widget-outlet/workspace-widget-outlet.module.d.ts +12 -12
  349. package/lib/workspace/workspace.module.d.ts +9 -9
  350. package/package.json +3 -3
  351. package/public_api.d.ts +70 -70
@@ -1,297 +1,297 @@
1
- import { Component, ViewChild, Input, Output, EventEmitter } from '@angular/core';
2
- import { MatSort } from '@angular/material/sort';
3
- import { SelectionModel } from '@angular/cdk/collections';
4
- import { debounceTime, distinctUntilChanged } from 'rxjs/operators';
5
- import { fromEvent } from 'rxjs';
6
- import { ObjectUtils } from '@igo2/utils';
7
- import { TableDataSource } from './table-datasource';
8
- import { TableActionColor } from './table-action-color.enum';
9
- import * as i0 from "@angular/core";
10
- import * as i1 from "@angular/common";
11
- import * as i2 from "@angular/material/icon";
12
- import * as i3 from "@angular/material/button";
13
- import * as i4 from "@angular/material/table";
14
- import * as i5 from "@angular/material/form-field";
15
- import * as i6 from "@angular/material/input";
16
- import * as i7 from "@angular/material/sort";
17
- import * as i8 from "@angular/material/checkbox";
18
- import * as i9 from "@ngx-translate/core";
19
- const _c0 = ["filter"];
20
- function TableComponent_div_1_Template(rf, ctx) { if (rf & 1) {
21
- i0.ɵɵelementStart(0, "div", 12)(1, "mat-form-field", 13);
22
- i0.ɵɵelement(2, "input", 14, 15);
23
- i0.ɵɵpipe(4, "translate");
24
- i0.ɵɵelementEnd()();
25
- } if (rf & 2) {
26
- i0.ɵɵadvance(2);
27
- i0.ɵɵproperty("placeholder", i0.ɵɵpipeBind1(4, 1, "igo.common.table.filter"));
28
- } }
29
- function TableComponent_th_6_Template(rf, ctx) { if (rf & 1) {
30
- const _r11 = i0.ɵɵgetCurrentView();
31
- i0.ɵɵelementStart(0, "th", 16)(1, "mat-checkbox", 17);
32
- i0.ɵɵlistener("change", function TableComponent_th_6_Template_mat_checkbox_change_1_listener($event) { i0.ɵɵrestoreView(_r11); const ctx_r10 = i0.ɵɵnextContext(); return i0.ɵɵresetView($event ? ctx_r10.masterToggle() : null); });
33
- i0.ɵɵelementEnd()();
34
- } if (rf & 2) {
35
- const ctx_r2 = i0.ɵɵnextContext();
36
- i0.ɵɵadvance(1);
37
- i0.ɵɵproperty("checked", ctx_r2.selection.hasValue() && ctx_r2.isAllSelected())("indeterminate", ctx_r2.selection.hasValue() && !ctx_r2.isAllSelected());
38
- } }
39
- function TableComponent_td_7_Template(rf, ctx) { if (rf & 1) {
40
- const _r15 = i0.ɵɵgetCurrentView();
41
- i0.ɵɵelementStart(0, "td", 18)(1, "mat-checkbox", 19);
42
- i0.ɵɵlistener("click", function TableComponent_td_7_Template_mat_checkbox_click_1_listener($event) { return $event.stopPropagation(); })("change", function TableComponent_td_7_Template_mat_checkbox_change_1_listener($event) { const restoredCtx = i0.ɵɵrestoreView(_r15); const row_r12 = restoredCtx.$implicit; const ctx_r14 = i0.ɵɵnextContext(); return i0.ɵɵresetView($event ? ctx_r14.selection.toggle(row_r12) : null); });
43
- i0.ɵɵelementEnd()();
44
- } if (rf & 2) {
45
- const row_r12 = ctx.$implicit;
46
- const ctx_r3 = i0.ɵɵnextContext();
47
- i0.ɵɵadvance(1);
48
- i0.ɵɵproperty("checked", ctx_r3.selection.isSelected(row_r12));
49
- } }
50
- function TableComponent_ng_container_8_ng_container_1_th_1_Template(rf, ctx) { if (rf & 1) {
51
- i0.ɵɵelementStart(0, "th", 25);
52
- i0.ɵɵtext(1);
53
- i0.ɵɵelementEnd();
54
- } if (rf & 2) {
55
- const column_r16 = i0.ɵɵnextContext(2).$implicit;
56
- i0.ɵɵadvance(1);
57
- i0.ɵɵtextInterpolate1(" ", column_r16.title, " ");
58
- } }
59
- function TableComponent_ng_container_8_ng_container_1_Template(rf, ctx) { if (rf & 1) {
60
- i0.ɵɵelementContainerStart(0);
61
- i0.ɵɵtemplate(1, TableComponent_ng_container_8_ng_container_1_th_1_Template, 2, 1, "th", 24);
62
- i0.ɵɵelementContainerEnd();
63
- } }
64
- function TableComponent_ng_container_8_ng_container_2_th_1_Template(rf, ctx) { if (rf & 1) {
65
- i0.ɵɵelementStart(0, "th", 16);
66
- i0.ɵɵtext(1);
67
- i0.ɵɵelementEnd();
68
- } if (rf & 2) {
69
- const column_r16 = i0.ɵɵnextContext(2).$implicit;
70
- i0.ɵɵadvance(1);
71
- i0.ɵɵtextInterpolate1(" ", column_r16.title, " ");
72
- } }
73
- function TableComponent_ng_container_8_ng_container_2_Template(rf, ctx) { if (rf & 1) {
74
- i0.ɵɵelementContainerStart(0);
75
- i0.ɵɵtemplate(1, TableComponent_ng_container_8_ng_container_2_th_1_Template, 2, 1, "th", 6);
76
- i0.ɵɵelementContainerEnd();
77
- } }
78
- const _c1 = function () { return {}; };
79
- function TableComponent_ng_container_8_ng_container_3_td_1_Template(rf, ctx) { if (rf & 1) {
80
- i0.ɵɵelementStart(0, "td", 27);
81
- i0.ɵɵtext(1);
82
- i0.ɵɵelementEnd();
83
- } if (rf & 2) {
84
- const row_r27 = ctx.$implicit;
85
- const column_r16 = i0.ɵɵnextContext(2).$implicit;
86
- const ctx_r26 = i0.ɵɵnextContext();
87
- i0.ɵɵproperty("ngClass", ctx_r26.model.cellClassFunc ? ctx_r26.model.cellClassFunc(row_r27, column_r16) : i0.ɵɵpureFunction0(2, _c1));
88
- i0.ɵɵadvance(1);
89
- i0.ɵɵtextInterpolate1(" ", ctx_r26.getValue(row_r27, column_r16.name), " ");
90
- } }
91
- function TableComponent_ng_container_8_ng_container_3_Template(rf, ctx) { if (rf & 1) {
92
- i0.ɵɵelementContainerStart(0);
93
- i0.ɵɵtemplate(1, TableComponent_ng_container_8_ng_container_3_td_1_Template, 2, 3, "td", 26);
94
- i0.ɵɵelementContainerEnd();
95
- } }
96
- function TableComponent_ng_container_8_ng_template_4_td_0_Template(rf, ctx) { if (rf & 1) {
97
- i0.ɵɵelement(0, "td", 29);
98
- } if (rf & 2) {
99
- const row_r30 = ctx.$implicit;
100
- const column_r16 = i0.ɵɵnextContext(2).$implicit;
101
- const ctx_r29 = i0.ɵɵnextContext();
102
- i0.ɵɵproperty("ngClass", ctx_r29.model.cellClassFunc ? ctx_r29.model.cellClassFunc(row_r30, column_r16) : i0.ɵɵpureFunction0(2, _c1))("innerHTML", ctx_r29.getValue(row_r30, column_r16.name), i0.ɵɵsanitizeHtml);
103
- } }
104
- function TableComponent_ng_container_8_ng_template_4_Template(rf, ctx) { if (rf & 1) {
105
- i0.ɵɵtemplate(0, TableComponent_ng_container_8_ng_template_4_td_0_Template, 1, 3, "td", 28);
106
- } }
107
- function TableComponent_ng_container_8_Template(rf, ctx) { if (rf & 1) {
108
- i0.ɵɵelementContainerStart(0, 20);
109
- i0.ɵɵtemplate(1, TableComponent_ng_container_8_ng_container_1_Template, 2, 0, "ng-container", 21);
110
- i0.ɵɵtemplate(2, TableComponent_ng_container_8_ng_container_2_Template, 2, 0, "ng-container", 21);
111
- i0.ɵɵtemplate(3, TableComponent_ng_container_8_ng_container_3_Template, 2, 0, "ng-container", 22);
112
- i0.ɵɵtemplate(4, TableComponent_ng_container_8_ng_template_4_Template, 1, 0, "ng-template", null, 23, i0.ɵɵtemplateRefExtractor);
113
- i0.ɵɵelementContainerEnd();
114
- } if (rf & 2) {
115
- const column_r16 = ctx.$implicit;
116
- const _r20 = i0.ɵɵreference(5);
117
- i0.ɵɵproperty("matColumnDef", column_r16.name);
118
- i0.ɵɵadvance(1);
119
- i0.ɵɵproperty("ngIf", column_r16.sortable);
120
- i0.ɵɵadvance(1);
121
- i0.ɵɵproperty("ngIf", !column_r16.sortable);
122
- i0.ɵɵadvance(1);
123
- i0.ɵɵproperty("ngIf", !column_r16.html)("ngIfElse", _r20);
124
- } }
125
- function TableComponent_th_10_Template(rf, ctx) { if (rf & 1) {
126
- i0.ɵɵelement(0, "th", 16);
127
- } }
128
- function TableComponent_td_11_button_1_Template(rf, ctx) { if (rf & 1) {
129
- const _r36 = i0.ɵɵgetCurrentView();
130
- i0.ɵɵelementStart(0, "button", 31);
131
- i0.ɵɵlistener("click", function TableComponent_td_11_button_1_Template_button_click_0_listener($event) { const restoredCtx = i0.ɵɵrestoreView(_r36); const action_r34 = restoredCtx.$implicit; const row_r32 = i0.ɵɵnextContext().$implicit; const ctx_r35 = i0.ɵɵnextContext(); return i0.ɵɵresetView(ctx_r35.handleClickAction($event, action_r34, row_r32)); });
132
- i0.ɵɵelement(1, "mat-icon", 32);
133
- i0.ɵɵelementEnd();
134
- } if (rf & 2) {
135
- const action_r34 = ctx.$implicit;
136
- const ctx_r33 = i0.ɵɵnextContext(2);
137
- i0.ɵɵproperty("color", ctx_r33.getActionColor(action_r34.color));
138
- i0.ɵɵadvance(1);
139
- i0.ɵɵpropertyInterpolate("svgIcon", action_r34.icon);
140
- } }
141
- function TableComponent_td_11_Template(rf, ctx) { if (rf & 1) {
142
- i0.ɵɵelementStart(0, "td", 18);
143
- i0.ɵɵtemplate(1, TableComponent_td_11_button_1_Template, 2, 2, "button", 30);
144
- i0.ɵɵelementEnd();
145
- } if (rf & 2) {
146
- const ctx_r6 = i0.ɵɵnextContext();
147
- i0.ɵɵadvance(1);
148
- i0.ɵɵproperty("ngForOf", ctx_r6.model.actions);
149
- } }
150
- function TableComponent_tr_12_Template(rf, ctx) { if (rf & 1) {
151
- i0.ɵɵelement(0, "tr", 33);
152
- } }
153
- function TableComponent_tr_13_Template(rf, ctx) { if (rf & 1) {
154
- const _r40 = i0.ɵɵgetCurrentView();
155
- i0.ɵɵelementStart(0, "tr", 34);
156
- i0.ɵɵlistener("click", function TableComponent_tr_13_Template_tr_click_0_listener() { const restoredCtx = i0.ɵɵrestoreView(_r40); const row_r38 = restoredCtx.$implicit; const ctx_r39 = i0.ɵɵnextContext(); return i0.ɵɵresetView(ctx_r39.selection.toggle(row_r38)); });
157
- i0.ɵɵelementEnd();
158
- } if (rf & 2) {
159
- const row_r38 = ctx.$implicit;
160
- const ctx_r8 = i0.ɵɵnextContext();
161
- i0.ɵɵproperty("ngClass", ctx_r8.model.rowClassFunc ? ctx_r8.model.rowClassFunc(row_r38) : i0.ɵɵpureFunction0(1, _c1));
162
- } }
163
- export class TableComponent {
164
- constructor() {
165
- this._hasFIlterInput = true;
166
- this.selection = new SelectionModel(true, []);
167
- this.select = new EventEmitter();
168
- }
169
- get database() {
170
- return this._database;
171
- }
172
- set database(value) {
173
- this._database = value;
174
- }
175
- get model() {
176
- return this._model;
177
- }
178
- set model(value) {
179
- this._model = value;
180
- }
181
- get hasFilterInput() {
182
- return this._hasFIlterInput;
183
- }
184
- set hasFilterInput(value) {
185
- this._hasFIlterInput = value;
186
- }
187
- ngOnInit() {
188
- this.dataSource = new TableDataSource(this.database, this.model, this.sort);
189
- if (this.model) {
190
- this.displayedColumns = this.model.columns
191
- .filter(c => c.displayed !== false)
192
- .map(c => c.name);
193
- if (this.model.selectionCheckbox) {
194
- this.displayedColumns.unshift('selectionCheckbox');
195
- }
196
- if (this.model.actions && this.model.actions.length) {
197
- this.displayedColumns.push('action');
198
- }
199
- }
200
- this.selection.changed.subscribe(e => this.select.emit(e));
201
- }
202
- ngAfterViewInit() {
203
- if (this.filter) {
204
- fromEvent(this.filter.nativeElement, 'keyup')
205
- .pipe(debounceTime(150), distinctUntilChanged())
206
- .subscribe(() => {
207
- if (!this.dataSource) {
208
- return;
209
- }
210
- this.dataSource.filter = this.filter.nativeElement.value;
211
- });
212
- }
213
- }
214
- ngOnChanges(change) {
215
- if (change.database) {
216
- this.dataSource = new TableDataSource(this.database, this.model, this.sort);
217
- this.selection.clear();
218
- }
219
- }
220
- getActionColor(colorId) {
221
- return TableActionColor[colorId];
222
- }
223
- getValue(row, key) {
224
- return ObjectUtils.resolve(row, key);
225
- }
226
- /** Whether the number of selected elements matches the total number of rows. */
227
- isAllSelected() {
228
- const numSelected = this.selection.selected.length;
229
- const numRows = this.database.data.length;
230
- return numSelected === numRows;
231
- }
232
- /** Selects all rows if they are not all selected; otherwise clear selection. */
233
- masterToggle() {
234
- this.isAllSelected()
235
- ? this.selection.clear()
236
- : this.database.data.forEach(row => this.selection.select(row));
237
- }
238
- handleClickAction(event, action, row) {
239
- event.stopPropagation();
240
- action.click(row);
241
- }
242
- }
243
- TableComponent.ɵfac = function TableComponent_Factory(t) { return new (t || TableComponent)(); };
244
- TableComponent.ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: TableComponent, selectors: [["igo-table"]], viewQuery: function TableComponent_Query(rf, ctx) { if (rf & 1) {
245
- i0.ɵɵviewQuery(_c0, 5);
246
- i0.ɵɵviewQuery(MatSort, 7);
247
- } if (rf & 2) {
248
- let _t;
249
- i0.ɵɵqueryRefresh(_t = i0.ɵɵloadQuery()) && (ctx.filter = _t.first);
250
- i0.ɵɵqueryRefresh(_t = i0.ɵɵloadQuery()) && (ctx.sort = _t.first);
251
- } }, inputs: { database: "database", model: "model", hasFilterInput: "hasFilterInput" }, outputs: { select: "select" }, features: [i0.ɵɵNgOnChangesFeature], decls: 14, vars: 5, consts: [[1, "table-box"], ["class", "table-header", 4, "ngIf"], [1, "table-container"], ["mat-table", "", "matSort", "", 3, "dataSource"], ["table", ""], ["matColumnDef", "selectionCheckbox"], ["mat-header-cell", "", 4, "matHeaderCellDef"], ["mat-cell", "", 4, "matCellDef"], [3, "matColumnDef", 4, "ngFor", "ngForOf"], ["matColumnDef", "action"], ["mat-header-row", "", 4, "matHeaderRowDef"], ["mat-row", "", 3, "ngClass", "click", 4, "matRowDef", "matRowDefColumns"], [1, "table-header"], ["floatPlaceholder", "never"], ["matInput", "", 3, "placeholder"], ["filter", ""], ["mat-header-cell", ""], [3, "checked", "indeterminate", "change"], ["mat-cell", ""], [3, "checked", "click", "change"], [3, "matColumnDef"], [4, "ngIf"], [4, "ngIf", "ngIfElse"], ["cellHTML", ""], ["mat-header-cell", "", "mat-sort-header", "", 4, "matHeaderCellDef"], ["mat-header-cell", "", "mat-sort-header", ""], ["mat-cell", "", "class", "mat-cell-text", 3, "ngClass", 4, "matCellDef"], ["mat-cell", "", 1, "mat-cell-text", 3, "ngClass"], ["mat-cell", "", "class", "mat-cell-text", 3, "ngClass", "innerHTML", 4, "matCellDef"], ["mat-cell", "", 1, "mat-cell-text", 3, "ngClass", "innerHTML"], ["mat-mini-fab", "", 3, "color", "click", 4, "ngFor", "ngForOf"], ["mat-mini-fab", "", 3, "color", "click"], [3, "svgIcon"], ["mat-header-row", ""], ["mat-row", "", 3, "ngClass", "click"]], template: function TableComponent_Template(rf, ctx) { if (rf & 1) {
252
- i0.ɵɵelementStart(0, "div", 0);
253
- i0.ɵɵtemplate(1, TableComponent_div_1_Template, 5, 3, "div", 1);
254
- i0.ɵɵelementStart(2, "div", 2)(3, "table", 3, 4);
255
- i0.ɵɵelementContainerStart(5, 5);
256
- i0.ɵɵtemplate(6, TableComponent_th_6_Template, 2, 2, "th", 6);
257
- i0.ɵɵtemplate(7, TableComponent_td_7_Template, 2, 1, "td", 7);
258
- i0.ɵɵelementContainerEnd();
259
- i0.ɵɵtemplate(8, TableComponent_ng_container_8_Template, 6, 5, "ng-container", 8);
260
- i0.ɵɵelementContainerStart(9, 9);
261
- i0.ɵɵtemplate(10, TableComponent_th_10_Template, 1, 0, "th", 6);
262
- i0.ɵɵtemplate(11, TableComponent_td_11_Template, 2, 1, "td", 7);
263
- i0.ɵɵelementContainerEnd();
264
- i0.ɵɵtemplate(12, TableComponent_tr_12_Template, 1, 0, "tr", 10);
265
- i0.ɵɵtemplate(13, TableComponent_tr_13_Template, 1, 2, "tr", 11);
266
- i0.ɵɵelementEnd()()();
267
- } if (rf & 2) {
268
- i0.ɵɵadvance(1);
269
- i0.ɵɵproperty("ngIf", ctx.hasFilterInput);
270
- i0.ɵɵadvance(2);
271
- i0.ɵɵproperty("dataSource", ctx.dataSource);
272
- i0.ɵɵadvance(5);
273
- i0.ɵɵproperty("ngForOf", ctx.model.columns);
274
- i0.ɵɵadvance(4);
275
- i0.ɵɵproperty("matHeaderRowDef", ctx.displayedColumns);
276
- i0.ɵɵadvance(1);
277
- i0.ɵɵproperty("matRowDefColumns", ctx.displayedColumns);
278
- } }, dependencies: [i1.NgClass, i1.NgForOf, i1.NgIf, i2.MatIcon, i3.MatButton, i4.MatTable, i4.MatHeaderCellDef, i4.MatHeaderRowDef, i4.MatColumnDef, i4.MatCellDef, i4.MatRowDef, i4.MatHeaderCell, i4.MatCell, i4.MatHeaderRow, i4.MatRow, i5.MatFormField, i6.MatInput, i7.MatSort, i7.MatSortHeader, i8.MatCheckbox, i9.TranslatePipe], styles: ["[_nghost-%COMP%]{width:100%;height:100%;display:block}.table-container[_ngcontent-%COMP%]{display:flex;flex-direction:column;height:100%;overflow:auto;flex:1 1 auto}.table-box[_ngcontent-%COMP%]{height:100%;display:flex;flex-direction:column}.table-header[_ngcontent-%COMP%]{min-height:64px;max-width:500px;display:flex;flex:0 1 auto;align-items:baseline;padding:8px 24px 0;font-size:20px;justify-content:space-between}tr[mat-header-row][_ngcontent-%COMP%], tr[mat-row][_ngcontent-%COMP%]{height:60px}.mat-cell-text[_ngcontent-%COMP%]{overflow:hidden;word-wrap:break-word}td[mat-cell][_ngcontent-%COMP%]{padding-right:15px}th.mat-header-cell[_ngcontent-%COMP%]{padding-right:5px}button[_ngcontent-%COMP%]{margin-right:10px}"] });
279
- (function () { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(TableComponent, [{
280
- type: Component,
281
- args: [{ selector: 'igo-table', template: "<div class='table-box'>\n <div class='table-header' *ngIf=\"hasFilterInput\">\n <mat-form-field floatPlaceholder='never'>\n <input matInput #filter [placeholder]=\"'igo.common.table.filter' | translate\">\n </mat-form-field>\n </div>\n\n <div class='table-container'>\n <table mat-table #table [dataSource]='dataSource' matSort>\n\n <!-- Checkbox Column -->\n <ng-container matColumnDef=\"selectionCheckbox\">\n <th mat-header-cell *matHeaderCellDef>\n <mat-checkbox (change)=\"$event ? masterToggle() : null\"\n [checked]=\"selection.hasValue() && isAllSelected()\"\n [indeterminate]=\"selection.hasValue() && !isAllSelected()\">\n </mat-checkbox>\n </th>\n <td mat-cell *matCellDef=\"let row\">\n <mat-checkbox (click)=\"$event.stopPropagation()\"\n (change)=\"$event ? selection.toggle(row) : null\"\n [checked]=\"selection.isSelected(row)\">\n </mat-checkbox>\n </td>\n </ng-container>\n\n <ng-container [matColumnDef]='column.name' *ngFor='let column of model.columns'>\n <ng-container *ngIf='column.sortable'>\n <th mat-header-cell *matHeaderCellDef mat-sort-header> {{column.title}} </th>\n </ng-container>\n\n <ng-container *ngIf='!column.sortable'>\n <th mat-header-cell *matHeaderCellDef> {{column.title}} </th>\n </ng-container>\n\n <ng-container *ngIf=\"!column.html; else cellHTML\">\n <td mat-cell *matCellDef='let row' class=\"mat-cell-text\"\n [ngClass]=\"model.cellClassFunc ? model.cellClassFunc(row, column) : {}\">\n {{getValue(row, column.name)}}\n </td>\n </ng-container>\n\n <ng-template #cellHTML>\n <td mat-cell *matCellDef='let row' class=\"mat-cell-text\"\n [ngClass]=\"model.cellClassFunc ? model.cellClassFunc(row, column) : {}\"\n [innerHTML]=\"getValue(row, column.name)\">\n </td>\n </ng-template>\n </ng-container>\n\n <!-- Action Column -->\n <ng-container matColumnDef='action'>\n <th mat-header-cell *matHeaderCellDef></th>\n <td mat-cell *matCellDef='let row'>\n <button *ngFor='let action of model.actions'\n mat-mini-fab\n [color]='getActionColor(action.color)'\n (click)='handleClickAction($event, action, row)'>\n <mat-icon svgIcon=\"{{action.icon}}\"></mat-icon>\n </button>\n </td>\n </ng-container>\n\n <tr mat-header-row *matHeaderRowDef='displayedColumns;'></tr>\n <tr mat-row\n *matRowDef='let row; columns: displayedColumns;'\n [ngClass]=\"model.rowClassFunc ? model.rowClassFunc(row) : {}\"\n (click)=\"selection.toggle(row)\">\n </tr>\n\n </table>\n </div>\n\n</div>\n", styles: [":host{width:100%;height:100%;display:block}.table-container{display:flex;flex-direction:column;height:100%;overflow:auto;flex:1 1 auto}.table-box{height:100%;display:flex;flex-direction:column}.table-header{min-height:64px;max-width:500px;display:flex;flex:0 1 auto;align-items:baseline;padding:8px 24px 0;font-size:20px;justify-content:space-between}tr[mat-header-row],tr[mat-row]{height:60px}.mat-cell-text{overflow:hidden;word-wrap:break-word}td[mat-cell]{padding-right:15px}th.mat-header-cell{padding-right:5px}button{margin-right:10px}\n"] }]
282
- }], null, { database: [{
283
- type: Input
284
- }], model: [{
285
- type: Input
286
- }], hasFilterInput: [{
287
- type: Input
288
- }], select: [{
289
- type: Output
290
- }], filter: [{
291
- type: ViewChild,
292
- args: ['filter']
293
- }], sort: [{
294
- type: ViewChild,
295
- args: [MatSort, { static: true }]
296
- }] }); })();
1
+ import { Component, ViewChild, Input, Output, EventEmitter } from '@angular/core';
2
+ import { MatSort } from '@angular/material/sort';
3
+ import { SelectionModel } from '@angular/cdk/collections';
4
+ import { debounceTime, distinctUntilChanged } from 'rxjs/operators';
5
+ import { fromEvent } from 'rxjs';
6
+ import { ObjectUtils } from '@igo2/utils';
7
+ import { TableDataSource } from './table-datasource';
8
+ import { TableActionColor } from './table-action-color.enum';
9
+ import * as i0 from "@angular/core";
10
+ import * as i1 from "@angular/common";
11
+ import * as i2 from "@angular/material/icon";
12
+ import * as i3 from "@angular/material/button";
13
+ import * as i4 from "@angular/material/table";
14
+ import * as i5 from "@angular/material/form-field";
15
+ import * as i6 from "@angular/material/input";
16
+ import * as i7 from "@angular/material/sort";
17
+ import * as i8 from "@angular/material/checkbox";
18
+ import * as i9 from "@ngx-translate/core";
19
+ const _c0 = ["filter"];
20
+ function TableComponent_div_1_Template(rf, ctx) { if (rf & 1) {
21
+ i0.ɵɵelementStart(0, "div", 12)(1, "mat-form-field", 13);
22
+ i0.ɵɵelement(2, "input", 14, 15);
23
+ i0.ɵɵpipe(4, "translate");
24
+ i0.ɵɵelementEnd()();
25
+ } if (rf & 2) {
26
+ i0.ɵɵadvance(2);
27
+ i0.ɵɵproperty("placeholder", i0.ɵɵpipeBind1(4, 1, "igo.common.table.filter"));
28
+ } }
29
+ function TableComponent_th_6_Template(rf, ctx) { if (rf & 1) {
30
+ const _r11 = i0.ɵɵgetCurrentView();
31
+ i0.ɵɵelementStart(0, "th", 16)(1, "mat-checkbox", 17);
32
+ i0.ɵɵlistener("change", function TableComponent_th_6_Template_mat_checkbox_change_1_listener($event) { i0.ɵɵrestoreView(_r11); const ctx_r10 = i0.ɵɵnextContext(); return i0.ɵɵresetView($event ? ctx_r10.masterToggle() : null); });
33
+ i0.ɵɵelementEnd()();
34
+ } if (rf & 2) {
35
+ const ctx_r2 = i0.ɵɵnextContext();
36
+ i0.ɵɵadvance(1);
37
+ i0.ɵɵproperty("checked", ctx_r2.selection.hasValue() && ctx_r2.isAllSelected())("indeterminate", ctx_r2.selection.hasValue() && !ctx_r2.isAllSelected());
38
+ } }
39
+ function TableComponent_td_7_Template(rf, ctx) { if (rf & 1) {
40
+ const _r15 = i0.ɵɵgetCurrentView();
41
+ i0.ɵɵelementStart(0, "td", 18)(1, "mat-checkbox", 19);
42
+ i0.ɵɵlistener("click", function TableComponent_td_7_Template_mat_checkbox_click_1_listener($event) { return $event.stopPropagation(); })("change", function TableComponent_td_7_Template_mat_checkbox_change_1_listener($event) { const restoredCtx = i0.ɵɵrestoreView(_r15); const row_r12 = restoredCtx.$implicit; const ctx_r14 = i0.ɵɵnextContext(); return i0.ɵɵresetView($event ? ctx_r14.selection.toggle(row_r12) : null); });
43
+ i0.ɵɵelementEnd()();
44
+ } if (rf & 2) {
45
+ const row_r12 = ctx.$implicit;
46
+ const ctx_r3 = i0.ɵɵnextContext();
47
+ i0.ɵɵadvance(1);
48
+ i0.ɵɵproperty("checked", ctx_r3.selection.isSelected(row_r12));
49
+ } }
50
+ function TableComponent_ng_container_8_ng_container_1_th_1_Template(rf, ctx) { if (rf & 1) {
51
+ i0.ɵɵelementStart(0, "th", 25);
52
+ i0.ɵɵtext(1);
53
+ i0.ɵɵelementEnd();
54
+ } if (rf & 2) {
55
+ const column_r16 = i0.ɵɵnextContext(2).$implicit;
56
+ i0.ɵɵadvance(1);
57
+ i0.ɵɵtextInterpolate1(" ", column_r16.title, " ");
58
+ } }
59
+ function TableComponent_ng_container_8_ng_container_1_Template(rf, ctx) { if (rf & 1) {
60
+ i0.ɵɵelementContainerStart(0);
61
+ i0.ɵɵtemplate(1, TableComponent_ng_container_8_ng_container_1_th_1_Template, 2, 1, "th", 24);
62
+ i0.ɵɵelementContainerEnd();
63
+ } }
64
+ function TableComponent_ng_container_8_ng_container_2_th_1_Template(rf, ctx) { if (rf & 1) {
65
+ i0.ɵɵelementStart(0, "th", 16);
66
+ i0.ɵɵtext(1);
67
+ i0.ɵɵelementEnd();
68
+ } if (rf & 2) {
69
+ const column_r16 = i0.ɵɵnextContext(2).$implicit;
70
+ i0.ɵɵadvance(1);
71
+ i0.ɵɵtextInterpolate1(" ", column_r16.title, " ");
72
+ } }
73
+ function TableComponent_ng_container_8_ng_container_2_Template(rf, ctx) { if (rf & 1) {
74
+ i0.ɵɵelementContainerStart(0);
75
+ i0.ɵɵtemplate(1, TableComponent_ng_container_8_ng_container_2_th_1_Template, 2, 1, "th", 6);
76
+ i0.ɵɵelementContainerEnd();
77
+ } }
78
+ const _c1 = function () { return {}; };
79
+ function TableComponent_ng_container_8_ng_container_3_td_1_Template(rf, ctx) { if (rf & 1) {
80
+ i0.ɵɵelementStart(0, "td", 27);
81
+ i0.ɵɵtext(1);
82
+ i0.ɵɵelementEnd();
83
+ } if (rf & 2) {
84
+ const row_r27 = ctx.$implicit;
85
+ const column_r16 = i0.ɵɵnextContext(2).$implicit;
86
+ const ctx_r26 = i0.ɵɵnextContext();
87
+ i0.ɵɵproperty("ngClass", ctx_r26.model.cellClassFunc ? ctx_r26.model.cellClassFunc(row_r27, column_r16) : i0.ɵɵpureFunction0(2, _c1));
88
+ i0.ɵɵadvance(1);
89
+ i0.ɵɵtextInterpolate1(" ", ctx_r26.getValue(row_r27, column_r16.name), " ");
90
+ } }
91
+ function TableComponent_ng_container_8_ng_container_3_Template(rf, ctx) { if (rf & 1) {
92
+ i0.ɵɵelementContainerStart(0);
93
+ i0.ɵɵtemplate(1, TableComponent_ng_container_8_ng_container_3_td_1_Template, 2, 3, "td", 26);
94
+ i0.ɵɵelementContainerEnd();
95
+ } }
96
+ function TableComponent_ng_container_8_ng_template_4_td_0_Template(rf, ctx) { if (rf & 1) {
97
+ i0.ɵɵelement(0, "td", 29);
98
+ } if (rf & 2) {
99
+ const row_r30 = ctx.$implicit;
100
+ const column_r16 = i0.ɵɵnextContext(2).$implicit;
101
+ const ctx_r29 = i0.ɵɵnextContext();
102
+ i0.ɵɵproperty("ngClass", ctx_r29.model.cellClassFunc ? ctx_r29.model.cellClassFunc(row_r30, column_r16) : i0.ɵɵpureFunction0(2, _c1))("innerHTML", ctx_r29.getValue(row_r30, column_r16.name), i0.ɵɵsanitizeHtml);
103
+ } }
104
+ function TableComponent_ng_container_8_ng_template_4_Template(rf, ctx) { if (rf & 1) {
105
+ i0.ɵɵtemplate(0, TableComponent_ng_container_8_ng_template_4_td_0_Template, 1, 3, "td", 28);
106
+ } }
107
+ function TableComponent_ng_container_8_Template(rf, ctx) { if (rf & 1) {
108
+ i0.ɵɵelementContainerStart(0, 20);
109
+ i0.ɵɵtemplate(1, TableComponent_ng_container_8_ng_container_1_Template, 2, 0, "ng-container", 21);
110
+ i0.ɵɵtemplate(2, TableComponent_ng_container_8_ng_container_2_Template, 2, 0, "ng-container", 21);
111
+ i0.ɵɵtemplate(3, TableComponent_ng_container_8_ng_container_3_Template, 2, 0, "ng-container", 22);
112
+ i0.ɵɵtemplate(4, TableComponent_ng_container_8_ng_template_4_Template, 1, 0, "ng-template", null, 23, i0.ɵɵtemplateRefExtractor);
113
+ i0.ɵɵelementContainerEnd();
114
+ } if (rf & 2) {
115
+ const column_r16 = ctx.$implicit;
116
+ const _r20 = i0.ɵɵreference(5);
117
+ i0.ɵɵproperty("matColumnDef", column_r16.name);
118
+ i0.ɵɵadvance(1);
119
+ i0.ɵɵproperty("ngIf", column_r16.sortable);
120
+ i0.ɵɵadvance(1);
121
+ i0.ɵɵproperty("ngIf", !column_r16.sortable);
122
+ i0.ɵɵadvance(1);
123
+ i0.ɵɵproperty("ngIf", !column_r16.html)("ngIfElse", _r20);
124
+ } }
125
+ function TableComponent_th_10_Template(rf, ctx) { if (rf & 1) {
126
+ i0.ɵɵelement(0, "th", 16);
127
+ } }
128
+ function TableComponent_td_11_button_1_Template(rf, ctx) { if (rf & 1) {
129
+ const _r36 = i0.ɵɵgetCurrentView();
130
+ i0.ɵɵelementStart(0, "button", 31);
131
+ i0.ɵɵlistener("click", function TableComponent_td_11_button_1_Template_button_click_0_listener($event) { const restoredCtx = i0.ɵɵrestoreView(_r36); const action_r34 = restoredCtx.$implicit; const row_r32 = i0.ɵɵnextContext().$implicit; const ctx_r35 = i0.ɵɵnextContext(); return i0.ɵɵresetView(ctx_r35.handleClickAction($event, action_r34, row_r32)); });
132
+ i0.ɵɵelement(1, "mat-icon", 32);
133
+ i0.ɵɵelementEnd();
134
+ } if (rf & 2) {
135
+ const action_r34 = ctx.$implicit;
136
+ const ctx_r33 = i0.ɵɵnextContext(2);
137
+ i0.ɵɵproperty("color", ctx_r33.getActionColor(action_r34.color));
138
+ i0.ɵɵadvance(1);
139
+ i0.ɵɵpropertyInterpolate("svgIcon", action_r34.icon);
140
+ } }
141
+ function TableComponent_td_11_Template(rf, ctx) { if (rf & 1) {
142
+ i0.ɵɵelementStart(0, "td", 18);
143
+ i0.ɵɵtemplate(1, TableComponent_td_11_button_1_Template, 2, 2, "button", 30);
144
+ i0.ɵɵelementEnd();
145
+ } if (rf & 2) {
146
+ const ctx_r6 = i0.ɵɵnextContext();
147
+ i0.ɵɵadvance(1);
148
+ i0.ɵɵproperty("ngForOf", ctx_r6.model.actions);
149
+ } }
150
+ function TableComponent_tr_12_Template(rf, ctx) { if (rf & 1) {
151
+ i0.ɵɵelement(0, "tr", 33);
152
+ } }
153
+ function TableComponent_tr_13_Template(rf, ctx) { if (rf & 1) {
154
+ const _r40 = i0.ɵɵgetCurrentView();
155
+ i0.ɵɵelementStart(0, "tr", 34);
156
+ i0.ɵɵlistener("click", function TableComponent_tr_13_Template_tr_click_0_listener() { const restoredCtx = i0.ɵɵrestoreView(_r40); const row_r38 = restoredCtx.$implicit; const ctx_r39 = i0.ɵɵnextContext(); return i0.ɵɵresetView(ctx_r39.selection.toggle(row_r38)); });
157
+ i0.ɵɵelementEnd();
158
+ } if (rf & 2) {
159
+ const row_r38 = ctx.$implicit;
160
+ const ctx_r8 = i0.ɵɵnextContext();
161
+ i0.ɵɵproperty("ngClass", ctx_r8.model.rowClassFunc ? ctx_r8.model.rowClassFunc(row_r38) : i0.ɵɵpureFunction0(1, _c1));
162
+ } }
163
+ export class TableComponent {
164
+ constructor() {
165
+ this._hasFIlterInput = true;
166
+ this.selection = new SelectionModel(true, []);
167
+ this.select = new EventEmitter();
168
+ }
169
+ get database() {
170
+ return this._database;
171
+ }
172
+ set database(value) {
173
+ this._database = value;
174
+ }
175
+ get model() {
176
+ return this._model;
177
+ }
178
+ set model(value) {
179
+ this._model = value;
180
+ }
181
+ get hasFilterInput() {
182
+ return this._hasFIlterInput;
183
+ }
184
+ set hasFilterInput(value) {
185
+ this._hasFIlterInput = value;
186
+ }
187
+ ngOnInit() {
188
+ this.dataSource = new TableDataSource(this.database, this.model, this.sort);
189
+ if (this.model) {
190
+ this.displayedColumns = this.model.columns
191
+ .filter(c => c.displayed !== false)
192
+ .map(c => c.name);
193
+ if (this.model.selectionCheckbox) {
194
+ this.displayedColumns.unshift('selectionCheckbox');
195
+ }
196
+ if (this.model.actions && this.model.actions.length) {
197
+ this.displayedColumns.push('action');
198
+ }
199
+ }
200
+ this.selection.changed.subscribe(e => this.select.emit(e));
201
+ }
202
+ ngAfterViewInit() {
203
+ if (this.filter) {
204
+ fromEvent(this.filter.nativeElement, 'keyup')
205
+ .pipe(debounceTime(150), distinctUntilChanged())
206
+ .subscribe(() => {
207
+ if (!this.dataSource) {
208
+ return;
209
+ }
210
+ this.dataSource.filter = this.filter.nativeElement.value;
211
+ });
212
+ }
213
+ }
214
+ ngOnChanges(change) {
215
+ if (change.database) {
216
+ this.dataSource = new TableDataSource(this.database, this.model, this.sort);
217
+ this.selection.clear();
218
+ }
219
+ }
220
+ getActionColor(colorId) {
221
+ return TableActionColor[colorId];
222
+ }
223
+ getValue(row, key) {
224
+ return ObjectUtils.resolve(row, key);
225
+ }
226
+ /** Whether the number of selected elements matches the total number of rows. */
227
+ isAllSelected() {
228
+ const numSelected = this.selection.selected.length;
229
+ const numRows = this.database.data.length;
230
+ return numSelected === numRows;
231
+ }
232
+ /** Selects all rows if they are not all selected; otherwise clear selection. */
233
+ masterToggle() {
234
+ this.isAllSelected()
235
+ ? this.selection.clear()
236
+ : this.database.data.forEach(row => this.selection.select(row));
237
+ }
238
+ handleClickAction(event, action, row) {
239
+ event.stopPropagation();
240
+ action.click(row);
241
+ }
242
+ }
243
+ TableComponent.ɵfac = function TableComponent_Factory(t) { return new (t || TableComponent)(); };
244
+ TableComponent.ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: TableComponent, selectors: [["igo-table"]], viewQuery: function TableComponent_Query(rf, ctx) { if (rf & 1) {
245
+ i0.ɵɵviewQuery(_c0, 5);
246
+ i0.ɵɵviewQuery(MatSort, 7);
247
+ } if (rf & 2) {
248
+ let _t;
249
+ i0.ɵɵqueryRefresh(_t = i0.ɵɵloadQuery()) && (ctx.filter = _t.first);
250
+ i0.ɵɵqueryRefresh(_t = i0.ɵɵloadQuery()) && (ctx.sort = _t.first);
251
+ } }, inputs: { database: "database", model: "model", hasFilterInput: "hasFilterInput" }, outputs: { select: "select" }, features: [i0.ɵɵNgOnChangesFeature], decls: 14, vars: 5, consts: [[1, "table-box"], ["class", "table-header", 4, "ngIf"], [1, "table-container"], ["mat-table", "", "matSort", "", 3, "dataSource"], ["table", ""], ["matColumnDef", "selectionCheckbox"], ["mat-header-cell", "", 4, "matHeaderCellDef"], ["mat-cell", "", 4, "matCellDef"], [3, "matColumnDef", 4, "ngFor", "ngForOf"], ["matColumnDef", "action"], ["mat-header-row", "", 4, "matHeaderRowDef"], ["mat-row", "", 3, "ngClass", "click", 4, "matRowDef", "matRowDefColumns"], [1, "table-header"], ["floatPlaceholder", "never"], ["matInput", "", 3, "placeholder"], ["filter", ""], ["mat-header-cell", ""], [3, "checked", "indeterminate", "change"], ["mat-cell", ""], [3, "checked", "click", "change"], [3, "matColumnDef"], [4, "ngIf"], [4, "ngIf", "ngIfElse"], ["cellHTML", ""], ["mat-header-cell", "", "mat-sort-header", "", 4, "matHeaderCellDef"], ["mat-header-cell", "", "mat-sort-header", ""], ["mat-cell", "", "class", "mat-cell-text", 3, "ngClass", 4, "matCellDef"], ["mat-cell", "", 1, "mat-cell-text", 3, "ngClass"], ["mat-cell", "", "class", "mat-cell-text", 3, "ngClass", "innerHTML", 4, "matCellDef"], ["mat-cell", "", 1, "mat-cell-text", 3, "ngClass", "innerHTML"], ["mat-mini-fab", "", 3, "color", "click", 4, "ngFor", "ngForOf"], ["mat-mini-fab", "", 3, "color", "click"], [3, "svgIcon"], ["mat-header-row", ""], ["mat-row", "", 3, "ngClass", "click"]], template: function TableComponent_Template(rf, ctx) { if (rf & 1) {
252
+ i0.ɵɵelementStart(0, "div", 0);
253
+ i0.ɵɵtemplate(1, TableComponent_div_1_Template, 5, 3, "div", 1);
254
+ i0.ɵɵelementStart(2, "div", 2)(3, "table", 3, 4);
255
+ i0.ɵɵelementContainerStart(5, 5);
256
+ i0.ɵɵtemplate(6, TableComponent_th_6_Template, 2, 2, "th", 6);
257
+ i0.ɵɵtemplate(7, TableComponent_td_7_Template, 2, 1, "td", 7);
258
+ i0.ɵɵelementContainerEnd();
259
+ i0.ɵɵtemplate(8, TableComponent_ng_container_8_Template, 6, 5, "ng-container", 8);
260
+ i0.ɵɵelementContainerStart(9, 9);
261
+ i0.ɵɵtemplate(10, TableComponent_th_10_Template, 1, 0, "th", 6);
262
+ i0.ɵɵtemplate(11, TableComponent_td_11_Template, 2, 1, "td", 7);
263
+ i0.ɵɵelementContainerEnd();
264
+ i0.ɵɵtemplate(12, TableComponent_tr_12_Template, 1, 0, "tr", 10);
265
+ i0.ɵɵtemplate(13, TableComponent_tr_13_Template, 1, 2, "tr", 11);
266
+ i0.ɵɵelementEnd()()();
267
+ } if (rf & 2) {
268
+ i0.ɵɵadvance(1);
269
+ i0.ɵɵproperty("ngIf", ctx.hasFilterInput);
270
+ i0.ɵɵadvance(2);
271
+ i0.ɵɵproperty("dataSource", ctx.dataSource);
272
+ i0.ɵɵadvance(5);
273
+ i0.ɵɵproperty("ngForOf", ctx.model.columns);
274
+ i0.ɵɵadvance(4);
275
+ i0.ɵɵproperty("matHeaderRowDef", ctx.displayedColumns);
276
+ i0.ɵɵadvance(1);
277
+ i0.ɵɵproperty("matRowDefColumns", ctx.displayedColumns);
278
+ } }, dependencies: [i1.NgClass, i1.NgForOf, i1.NgIf, i2.MatIcon, i3.MatButton, i4.MatTable, i4.MatHeaderCellDef, i4.MatHeaderRowDef, i4.MatColumnDef, i4.MatCellDef, i4.MatRowDef, i4.MatHeaderCell, i4.MatCell, i4.MatHeaderRow, i4.MatRow, i5.MatFormField, i6.MatInput, i7.MatSort, i7.MatSortHeader, i8.MatCheckbox, i9.TranslatePipe], styles: ["[_nghost-%COMP%]{width:100%;height:100%;display:block}.table-container[_ngcontent-%COMP%]{display:flex;flex-direction:column;height:100%;overflow:auto;flex:1 1 auto}.table-box[_ngcontent-%COMP%]{height:100%;display:flex;flex-direction:column}.table-header[_ngcontent-%COMP%]{min-height:64px;max-width:500px;display:flex;flex:0 1 auto;align-items:baseline;padding:8px 24px 0;font-size:20px;justify-content:space-between}tr[mat-header-row][_ngcontent-%COMP%], tr[mat-row][_ngcontent-%COMP%]{height:60px}.mat-cell-text[_ngcontent-%COMP%]{overflow:hidden;word-wrap:break-word}td[mat-cell][_ngcontent-%COMP%]{padding-right:15px}th.mat-header-cell[_ngcontent-%COMP%]{padding-right:5px}button[_ngcontent-%COMP%]{margin-right:10px}"] });
279
+ (function () { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(TableComponent, [{
280
+ type: Component,
281
+ args: [{ selector: 'igo-table', template: "<div class='table-box'>\n <div class='table-header' *ngIf=\"hasFilterInput\">\n <mat-form-field floatPlaceholder='never'>\n <input matInput #filter [placeholder]=\"'igo.common.table.filter' | translate\">\n </mat-form-field>\n </div>\n\n <div class='table-container'>\n <table mat-table #table [dataSource]='dataSource' matSort>\n\n <!-- Checkbox Column -->\n <ng-container matColumnDef=\"selectionCheckbox\">\n <th mat-header-cell *matHeaderCellDef>\n <mat-checkbox (change)=\"$event ? masterToggle() : null\"\n [checked]=\"selection.hasValue() && isAllSelected()\"\n [indeterminate]=\"selection.hasValue() && !isAllSelected()\">\n </mat-checkbox>\n </th>\n <td mat-cell *matCellDef=\"let row\">\n <mat-checkbox (click)=\"$event.stopPropagation()\"\n (change)=\"$event ? selection.toggle(row) : null\"\n [checked]=\"selection.isSelected(row)\">\n </mat-checkbox>\n </td>\n </ng-container>\n\n <ng-container [matColumnDef]='column.name' *ngFor='let column of model.columns'>\n <ng-container *ngIf='column.sortable'>\n <th mat-header-cell *matHeaderCellDef mat-sort-header> {{column.title}} </th>\n </ng-container>\n\n <ng-container *ngIf='!column.sortable'>\n <th mat-header-cell *matHeaderCellDef> {{column.title}} </th>\n </ng-container>\n\n <ng-container *ngIf=\"!column.html; else cellHTML\">\n <td mat-cell *matCellDef='let row' class=\"mat-cell-text\"\n [ngClass]=\"model.cellClassFunc ? model.cellClassFunc(row, column) : {}\">\n {{getValue(row, column.name)}}\n </td>\n </ng-container>\n\n <ng-template #cellHTML>\n <td mat-cell *matCellDef='let row' class=\"mat-cell-text\"\n [ngClass]=\"model.cellClassFunc ? model.cellClassFunc(row, column) : {}\"\n [innerHTML]=\"getValue(row, column.name)\">\n </td>\n </ng-template>\n </ng-container>\n\n <!-- Action Column -->\n <ng-container matColumnDef='action'>\n <th mat-header-cell *matHeaderCellDef></th>\n <td mat-cell *matCellDef='let row'>\n <button *ngFor='let action of model.actions'\n mat-mini-fab\n [color]='getActionColor(action.color)'\n (click)='handleClickAction($event, action, row)'>\n <mat-icon svgIcon=\"{{action.icon}}\"></mat-icon>\n </button>\n </td>\n </ng-container>\n\n <tr mat-header-row *matHeaderRowDef='displayedColumns;'></tr>\n <tr mat-row\n *matRowDef='let row; columns: displayedColumns;'\n [ngClass]=\"model.rowClassFunc ? model.rowClassFunc(row) : {}\"\n (click)=\"selection.toggle(row)\">\n </tr>\n\n </table>\n </div>\n\n</div>\n", styles: [":host{width:100%;height:100%;display:block}.table-container{display:flex;flex-direction:column;height:100%;overflow:auto;flex:1 1 auto}.table-box{height:100%;display:flex;flex-direction:column}.table-header{min-height:64px;max-width:500px;display:flex;flex:0 1 auto;align-items:baseline;padding:8px 24px 0;font-size:20px;justify-content:space-between}tr[mat-header-row],tr[mat-row]{height:60px}.mat-cell-text{overflow:hidden;word-wrap:break-word}td[mat-cell]{padding-right:15px}th.mat-header-cell{padding-right:5px}button{margin-right:10px}\n"] }]
282
+ }], null, { database: [{
283
+ type: Input
284
+ }], model: [{
285
+ type: Input
286
+ }], hasFilterInput: [{
287
+ type: Input
288
+ }], select: [{
289
+ type: Output
290
+ }], filter: [{
291
+ type: ViewChild,
292
+ args: ['filter']
293
+ }], sort: [{
294
+ type: ViewChild,
295
+ args: [MatSort, { static: true }]
296
+ }] }); })();
297
297
  //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoidGFibGUuY29tcG9uZW50LmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vLi4vLi4vLi4vcGFja2FnZXMvY29tbW9uL3NyYy9saWIvdGFibGUvdGFibGUuY29tcG9uZW50LnRzIiwiLi4vLi4vLi4vLi4vLi4vcGFja2FnZXMvY29tbW9uL3NyYy9saWIvdGFibGUvdGFibGUuY29tcG9uZW50Lmh0bWwiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUEsT0FBTyxFQUNMLFNBQVMsRUFFVCxTQUFTLEVBQ1QsS0FBSyxFQUNMLE1BQU0sRUFJTixZQUFZLEVBQ2IsTUFBTSxlQUFlLENBQUM7QUFDdkIsT0FBTyxFQUFFLE9BQU8sRUFBRSxNQUFNLHdCQUF3QixDQUFDO0FBQ2pELE9BQU8sRUFBRSxjQUFjLEVBQUUsTUFBTSwwQkFBMEIsQ0FBQztBQUUxRCxPQUFPLEVBQUUsWUFBWSxFQUFFLG9CQUFvQixFQUFFLE1BQU0sZ0JBQWdCLENBQUM7QUFDcE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