@coolon/angular-ui-powerups 2.0.0-alpha.8 → 2.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (372) hide show
  1. package/CHANGELOG.md +212 -0
  2. package/assets/commands.scss +3 -0
  3. package/assets/icons.scss +30 -0
  4. package/assets/interaction.scss +5 -0
  5. package/assets/styles.scss +2 -0
  6. package/assets/tabs.scss +1 -1
  7. package/bundles/coolon-angular-ui-powerups.umd.js +1729 -377
  8. package/bundles/coolon-angular-ui-powerups.umd.js.map +1 -1
  9. package/bundles/coolon-angular-ui-powerups.umd.min.js +2 -2
  10. package/bundles/coolon-angular-ui-powerups.umd.min.js.map +1 -1
  11. package/coolon-angular-ui-powerups.d.ts +67 -54
  12. package/coolon-angular-ui-powerups.metadata.json +1 -1
  13. package/esm2015/coolon-angular-ui-powerups.js +65 -52
  14. package/esm2015/coolon-angular-ui-powerups.js.map +1 -1
  15. package/esm2015/coolon-angular-ui-powerups.metadata.json +1 -1
  16. package/esm2015/lib/angular-ui-powerups.module.ngfactory.js.map +1 -1
  17. package/esm2015/lib/components/card-container/card-container.component.js +1 -1
  18. package/esm2015/lib/components/card-container/card-container.component.metadata.json +1 -1
  19. package/esm2015/lib/components/commands/command/command.component.js +61 -0
  20. package/esm2015/lib/components/commands/command/command.component.js.map +1 -0
  21. package/esm2015/lib/components/commands/command/command.component.metadata.json +1 -0
  22. package/esm2015/lib/components/commands/command/command.component.ngfactory.js.map +1 -0
  23. package/esm2015/lib/components/commands/command-face/command-face.component.js +92 -0
  24. package/esm2015/lib/components/commands/command-face/command-face.component.js.map +1 -0
  25. package/esm2015/lib/components/commands/command-face/command-face.component.metadata.json +1 -0
  26. package/esm2015/lib/components/commands/command-face/command-face.component.ngfactory.js.map +1 -0
  27. package/esm2015/lib/components/commands/command-face/command-face.component.scss.ngstyle.js.map +1 -0
  28. package/esm2015/lib/components/commands/command-face.js +112 -0
  29. package/esm2015/lib/components/commands/command-face.js.map +1 -0
  30. package/esm2015/lib/components/commands/command-face.metadata.json +1 -0
  31. package/esm2015/lib/components/commands/flex.component.js +30 -0
  32. package/esm2015/lib/components/commands/flex.component.js.map +1 -0
  33. package/esm2015/lib/components/commands/flex.component.metadata.json +1 -0
  34. package/esm2015/lib/components/commands/flex.component.ngfactory.js.map +1 -0
  35. package/esm2015/lib/components/commands/group/command-group/command-group.component.js +47 -0
  36. package/esm2015/lib/components/commands/group/command-group/command-group.component.js.map +1 -0
  37. package/esm2015/lib/components/commands/group/command-group/command-group.component.metadata.json +1 -0
  38. package/esm2015/lib/components/commands/group/command-group/command-group.component.ngfactory.js.map +1 -0
  39. package/esm2015/lib/components/commands/group/command-group-menu-renderer/command-group-menu-renderer.component.js +55 -0
  40. package/esm2015/lib/components/commands/group/command-group-menu-renderer/command-group-menu-renderer.component.js.map +1 -0
  41. package/esm2015/lib/components/commands/group/command-group-menu-renderer/command-group-menu-renderer.component.metadata.json +1 -0
  42. package/esm2015/lib/components/commands/group/command-group-menu-renderer/command-group-menu-renderer.component.ngfactory.js.map +1 -0
  43. package/esm2015/lib/components/commands/group/command-group-renderer/command-group-renderer.component.js +39 -0
  44. package/esm2015/lib/components/commands/group/command-group-renderer/command-group-renderer.component.js.map +1 -0
  45. package/esm2015/lib/components/commands/group/command-group-renderer/command-group-renderer.component.metadata.json +1 -0
  46. package/esm2015/lib/components/commands/group/command-group-renderer/command-group-renderer.component.ngfactory.js.map +1 -0
  47. package/esm2015/lib/components/commands/group/command-group-renderer/command-group-renderer.component.scss.shim.ngstyle.js.map +1 -0
  48. package/esm2015/lib/components/commands/group/command-group.js +100 -0
  49. package/esm2015/lib/components/commands/group/command-group.js.map +1 -0
  50. package/esm2015/lib/components/commands/group/command-group.metadata.json +1 -0
  51. package/esm2015/lib/components/commands/group/more-menu.component.js +55 -0
  52. package/esm2015/lib/components/commands/group/more-menu.component.js.map +1 -0
  53. package/esm2015/lib/components/commands/group/more-menu.component.metadata.json +1 -0
  54. package/esm2015/lib/components/commands/group/more-menu.component.ngfactory.js.map +1 -0
  55. package/esm2015/lib/components/commands/group/popup-menu.component.js +65 -0
  56. package/esm2015/lib/components/commands/group/popup-menu.component.js.map +1 -0
  57. package/esm2015/lib/components/commands/group/popup-menu.component.metadata.json +1 -0
  58. package/esm2015/lib/components/commands/group/popup-menu.component.ngfactory.js.map +1 -0
  59. package/esm2015/lib/components/commands/group/registration.js +58 -0
  60. package/esm2015/lib/components/commands/group/registration.js.map +1 -0
  61. package/esm2015/lib/components/commands/group/registration.metadata.json +1 -0
  62. package/esm2015/lib/components/commands/group/tool-bar/tool-bar.component.js +55 -0
  63. package/esm2015/lib/components/commands/group/tool-bar/tool-bar.component.js.map +1 -0
  64. package/esm2015/lib/components/commands/group/tool-bar/tool-bar.component.metadata.json +1 -0
  65. package/esm2015/lib/components/commands/group/tool-bar/tool-bar.component.ngfactory.js.map +1 -0
  66. package/esm2015/lib/components/commands/group/tool-bar/tool-bar.component.scss.shim.ngstyle.js.map +1 -0
  67. package/esm2015/lib/components/commands/group/view-data.js +104 -0
  68. package/esm2015/lib/components/commands/group/view-data.js.map +1 -0
  69. package/esm2015/lib/components/commands/group/view-data.metadata.json +1 -0
  70. package/esm2015/lib/components/commands/separator.component.js +35 -0
  71. package/esm2015/lib/components/commands/separator.component.js.map +1 -0
  72. package/esm2015/lib/components/commands/separator.component.metadata.json +1 -0
  73. package/esm2015/lib/components/commands/separator.component.ngfactory.js.map +1 -0
  74. package/esm2015/lib/components/components.module.js +54 -14
  75. package/esm2015/lib/components/components.module.js.map +1 -1
  76. package/esm2015/lib/components/components.module.metadata.json +1 -1
  77. package/esm2015/lib/components/components.module.ngfactory.js.map +1 -1
  78. package/esm2015/lib/components/forms/abstract-input.component.js +12 -4
  79. package/esm2015/lib/components/forms/abstract-input.component.js.map +1 -1
  80. package/esm2015/lib/components/forms/abstract-input.component.metadata.json +1 -1
  81. package/esm2015/lib/components/forms/abstract-list-input.component.js +27 -14
  82. package/esm2015/lib/components/forms/abstract-list-input.component.js.map +1 -1
  83. package/esm2015/lib/components/forms/abstract-list-input.component.metadata.json +1 -1
  84. package/esm2015/lib/components/forms/abstract-value-input.component.js +31 -15
  85. package/esm2015/lib/components/forms/abstract-value-input.component.js.map +1 -1
  86. package/esm2015/lib/components/forms/abstract-value-input.component.metadata.json +1 -1
  87. package/esm2015/lib/components/forms/autocomplete-input/autocomplete-input.component.js +70 -0
  88. package/esm2015/lib/components/forms/autocomplete-input/autocomplete-input.component.js.map +1 -0
  89. package/esm2015/lib/components/forms/autocomplete-input/autocomplete-input.component.metadata.json +1 -0
  90. package/esm2015/lib/components/forms/autocomplete-input/autocomplete-input.component.ngfactory.js.map +1 -0
  91. package/esm2015/lib/components/forms/autocomplete-input/autocomplete-input.component.scss.shim.ngstyle.js.map +1 -0
  92. package/esm2015/lib/components/forms/checkbox-input/checkbox-input.component.js +1 -1
  93. package/esm2015/lib/components/forms/checkbox-input/checkbox-input.component.js.map +1 -1
  94. package/esm2015/lib/components/forms/checkbox-input/checkbox-input.component.metadata.json +1 -1
  95. package/esm2015/lib/components/forms/multiple-select-input/multiple-select-input.component.js +8 -9
  96. package/esm2015/lib/components/forms/multiple-select-input/multiple-select-input.component.js.map +1 -1
  97. package/esm2015/lib/components/forms/multiple-select-input/multiple-select-input.component.metadata.json +1 -1
  98. package/esm2015/lib/components/forms/number-input/number-input.component.js +1 -1
  99. package/esm2015/lib/components/forms/number-input/number-input.component.js.map +1 -1
  100. package/esm2015/lib/components/forms/number-input/number-input.component.metadata.json +1 -1
  101. package/esm2015/lib/components/forms/password-input/password-input.component.js +1 -1
  102. package/esm2015/lib/components/forms/password-input/password-input.component.js.map +1 -1
  103. package/esm2015/lib/components/forms/password-input/password-input.component.metadata.json +1 -1
  104. package/esm2015/lib/components/forms/select-input/select-input.component.js +2 -1
  105. package/esm2015/lib/components/forms/select-input/select-input.component.js.map +1 -1
  106. package/esm2015/lib/components/forms/select-input/select-input.component.metadata.json +1 -1
  107. package/esm2015/lib/components/forms/string-input/string-input.component.js +3 -3
  108. package/esm2015/lib/components/forms/string-input/string-input.component.js.map +1 -1
  109. package/esm2015/lib/components/forms/string-input/string-input.component.metadata.json +1 -1
  110. package/esm2015/lib/components/forms/text-input/text-input.component.js +1 -1
  111. package/esm2015/lib/components/forms/text-input/text-input.component.js.map +1 -1
  112. package/esm2015/lib/components/forms/text-input/text-input.component.metadata.json +1 -1
  113. package/esm2015/lib/components/icon/icon.component.js +17 -4
  114. package/esm2015/lib/components/icon/icon.component.js.map +1 -1
  115. package/esm2015/lib/components/icon/icon.component.metadata.json +1 -1
  116. package/esm2015/lib/components/index.js +17 -0
  117. package/esm2015/lib/components/index.js.map +1 -1
  118. package/esm2015/lib/components/index.metadata.json +1 -1
  119. package/esm2015/lib/components/table/column-model.js +44 -2
  120. package/esm2015/lib/components/table/column-model.js.map +1 -1
  121. package/esm2015/lib/components/table/column-model.metadata.json +1 -1
  122. package/esm2015/lib/components/table/mutable-cell-renderer.js +1 -0
  123. package/esm2015/lib/components/table/mutable-cell-renderer.js.map +1 -0
  124. package/esm2015/lib/components/table/mutable-cell-renderer.metadata.json +1 -0
  125. package/esm2015/lib/components/table/table-model.js +10 -7
  126. package/esm2015/lib/components/table/table-model.js.map +1 -1
  127. package/esm2015/lib/components/table/table-model.metadata.json +1 -1
  128. package/esm2015/lib/components/table/table-row-menu/table-row-menu.component.js +73 -0
  129. package/esm2015/lib/components/table/table-row-menu/table-row-menu.component.js.map +1 -0
  130. package/esm2015/lib/components/table/table-row-menu/table-row-menu.component.metadata.json +1 -0
  131. package/esm2015/lib/components/table/table-row-menu/table-row-menu.component.ngfactory.js.map +1 -0
  132. package/esm2015/lib/components/table/table.component.js +1 -1
  133. package/esm2015/lib/components/table/table.component.js.map +1 -1
  134. package/esm2015/lib/components/table/table.component.metadata.json +1 -1
  135. package/esm2015/lib/components/track-by.js +5 -0
  136. package/esm2015/lib/components/track-by.js.map +1 -0
  137. package/esm2015/lib/interaction/activity-ref.js +10 -2
  138. package/esm2015/lib/interaction/activity-ref.js.map +1 -1
  139. package/esm2015/lib/interaction/activity-ref.metadata.json +1 -1
  140. package/esm2015/lib/interaction/activity.js +18 -1
  141. package/esm2015/lib/interaction/activity.js.map +1 -1
  142. package/esm2015/lib/interaction/activity.metadata.json +1 -1
  143. package/esm2015/lib/interaction/components/activity-actions/activity-actions.component.js +1 -1
  144. package/esm2015/lib/interaction/components/activity-actions/activity-actions.component.metadata.json +1 -1
  145. package/esm2015/lib/interaction/components/activity-container/activity-container.component.js +24 -17
  146. package/esm2015/lib/interaction/components/activity-container/activity-container.component.js.map +1 -1
  147. package/esm2015/lib/interaction/components/activity-container/activity-container.component.metadata.json +1 -1
  148. package/esm2015/lib/interaction/components/activity-container/activity-outlet/activity-outlet.component.js +1 -1
  149. package/esm2015/lib/interaction/components/activity-container/activity-outlet/activity-outlet.component.js.map +1 -1
  150. package/esm2015/lib/interaction/components/activity-container/activity-outlet/activity-outlet.component.metadata.json +1 -1
  151. package/esm2015/lib/interaction/interaction.module.ngfactory.js.map +1 -1
  152. package/esm2015/lib/place/components/abstract-place-navigation.component.js +4 -3
  153. package/esm2015/lib/place/components/abstract-place-navigation.component.js.map +1 -1
  154. package/esm2015/lib/place/components/abstract-place-navigation.component.metadata.json +1 -1
  155. package/esm2015/lib/place/components/list-place-nav/list-place-nav.component.js +1 -1
  156. package/esm2015/lib/place/components/list-place-nav/list-place-nav.component.js.map +1 -1
  157. package/esm2015/lib/place/components/list-place-nav/list-place-nav.component.metadata.json +1 -1
  158. package/esm2015/lib/place/components/place-outlet/place-outlet.component.js +56 -16
  159. package/esm2015/lib/place/components/place-outlet/place-outlet.component.js.map +1 -1
  160. package/esm2015/lib/place/components/place-outlet/place-outlet.component.metadata.json +1 -1
  161. package/esm2015/lib/place/components/side-place-navigation/side-place-navigation.component.js +2 -2
  162. package/esm2015/lib/place/components/side-place-navigation/side-place-navigation.component.js.map +1 -1
  163. package/esm2015/lib/place/components/side-place-navigation/side-place-navigation.component.metadata.json +1 -1
  164. package/esm2015/lib/place/components/tabbed-place-navigation/tabbed-place-navigation.component.js +1 -1
  165. package/esm2015/lib/place/components/tabbed-place-navigation/tabbed-place-navigation.component.js.map +1 -1
  166. package/esm2015/lib/place/components/tabbed-place-navigation/tabbed-place-navigation.component.metadata.json +1 -1
  167. package/esm2015/lib/place/place-component.js +13 -1
  168. package/esm2015/lib/place/place-component.js.map +1 -1
  169. package/esm2015/lib/place/place-component.metadata.json +1 -1
  170. package/esm2015/lib/place/place-router.js +2 -8
  171. package/esm2015/lib/place/place-router.js.map +1 -1
  172. package/esm2015/lib/place/place-router.metadata.json +1 -1
  173. package/esm2015/lib/place/place.module.js +3 -3
  174. package/esm2015/lib/place/place.module.js.map +1 -1
  175. package/esm2015/lib/place/place.module.metadata.json +1 -1
  176. package/esm2015/lib/place/place.module.ngfactory.js.map +1 -1
  177. package/esm2015/lib/place/route/parameter-decorators.js +2 -3
  178. package/esm2015/lib/place/route/parameter-decorators.js.map +1 -1
  179. package/esm2015/lib/place/route/parameter-decorators.metadata.json +1 -1
  180. package/esm5/coolon-angular-ui-powerups.js +65 -52
  181. package/esm5/coolon-angular-ui-powerups.js.map +1 -1
  182. package/esm5/lib/angular-ui-powerups.module.ngfactory.js.map +1 -1
  183. package/esm5/lib/components/card-container/card-container.component.js +1 -1
  184. package/esm5/lib/components/commands/command/command.component.js +64 -0
  185. package/esm5/lib/components/commands/command/command.component.js.map +1 -0
  186. package/esm5/lib/components/commands/command/command.component.ngfactory.js.map +1 -0
  187. package/esm5/lib/components/commands/command-face/command-face.component.js +123 -0
  188. package/esm5/lib/components/commands/command-face/command-face.component.js.map +1 -0
  189. package/esm5/lib/components/commands/command-face/command-face.component.ngfactory.js.map +1 -0
  190. package/esm5/lib/components/commands/command-face/command-face.component.scss.ngstyle.js.map +1 -0
  191. package/esm5/lib/components/commands/command-face.js +145 -0
  192. package/esm5/lib/components/commands/command-face.js.map +1 -0
  193. package/esm5/lib/components/commands/flex.component.js +33 -0
  194. package/esm5/lib/components/commands/flex.component.js.map +1 -0
  195. package/esm5/lib/components/commands/flex.component.ngfactory.js.map +1 -0
  196. package/esm5/lib/components/commands/group/command-group/command-group.component.js +51 -0
  197. package/esm5/lib/components/commands/group/command-group/command-group.component.js.map +1 -0
  198. package/esm5/lib/components/commands/group/command-group/command-group.component.ngfactory.js.map +1 -0
  199. package/esm5/lib/components/commands/group/command-group-menu-renderer/command-group-menu-renderer.component.js +59 -0
  200. package/esm5/lib/components/commands/group/command-group-menu-renderer/command-group-menu-renderer.component.js.map +1 -0
  201. package/esm5/lib/components/commands/group/command-group-menu-renderer/command-group-menu-renderer.component.ngfactory.js.map +1 -0
  202. package/esm5/lib/components/commands/group/command-group-renderer/command-group-renderer.component.js +42 -0
  203. package/esm5/lib/components/commands/group/command-group-renderer/command-group-renderer.component.js.map +1 -0
  204. package/esm5/lib/components/commands/group/command-group-renderer/command-group-renderer.component.ngfactory.js.map +1 -0
  205. package/esm5/lib/components/commands/group/command-group-renderer/command-group-renderer.component.scss.shim.ngstyle.js.map +1 -0
  206. package/esm5/lib/components/commands/group/command-group.js +122 -0
  207. package/esm5/lib/components/commands/group/command-group.js.map +1 -0
  208. package/esm5/lib/components/commands/group/more-menu.component.js +58 -0
  209. package/esm5/lib/components/commands/group/more-menu.component.js.map +1 -0
  210. package/esm5/lib/components/commands/group/more-menu.component.ngfactory.js.map +1 -0
  211. package/esm5/lib/components/commands/group/popup-menu.component.js +68 -0
  212. package/esm5/lib/components/commands/group/popup-menu.component.js.map +1 -0
  213. package/esm5/lib/components/commands/group/popup-menu.component.ngfactory.js.map +1 -0
  214. package/esm5/lib/components/commands/group/registration.js +80 -0
  215. package/esm5/lib/components/commands/group/registration.js.map +1 -0
  216. package/esm5/lib/components/commands/group/tool-bar/tool-bar.component.js +58 -0
  217. package/esm5/lib/components/commands/group/tool-bar/tool-bar.component.js.map +1 -0
  218. package/esm5/lib/components/commands/group/tool-bar/tool-bar.component.ngfactory.js.map +1 -0
  219. package/esm5/lib/components/commands/group/tool-bar/tool-bar.component.scss.shim.ngstyle.js.map +1 -0
  220. package/esm5/lib/components/commands/group/view-data.js +131 -0
  221. package/esm5/lib/components/commands/group/view-data.js.map +1 -0
  222. package/esm5/lib/components/commands/separator.component.js +37 -0
  223. package/esm5/lib/components/commands/separator.component.js.map +1 -0
  224. package/esm5/lib/components/commands/separator.component.ngfactory.js.map +1 -0
  225. package/esm5/lib/components/components.module.js +54 -14
  226. package/esm5/lib/components/components.module.js.map +1 -1
  227. package/esm5/lib/components/components.module.ngfactory.js.map +1 -1
  228. package/esm5/lib/components/forms/abstract-input.component.js +12 -4
  229. package/esm5/lib/components/forms/abstract-input.component.js.map +1 -1
  230. package/esm5/lib/components/forms/abstract-list-input.component.js +27 -14
  231. package/esm5/lib/components/forms/abstract-list-input.component.js.map +1 -1
  232. package/esm5/lib/components/forms/abstract-value-input.component.js +31 -15
  233. package/esm5/lib/components/forms/abstract-value-input.component.js.map +1 -1
  234. package/esm5/lib/components/forms/autocomplete-input/autocomplete-input.component.js +73 -0
  235. package/esm5/lib/components/forms/autocomplete-input/autocomplete-input.component.js.map +1 -0
  236. package/esm5/lib/components/forms/autocomplete-input/autocomplete-input.component.ngfactory.js.map +1 -0
  237. package/esm5/lib/components/forms/autocomplete-input/autocomplete-input.component.scss.shim.ngstyle.js.map +1 -0
  238. package/esm5/lib/components/forms/checkbox-input/checkbox-input.component.js +1 -1
  239. package/esm5/lib/components/forms/checkbox-input/checkbox-input.component.js.map +1 -1
  240. package/esm5/lib/components/forms/multiple-select-input/multiple-select-input.component.js +8 -9
  241. package/esm5/lib/components/forms/multiple-select-input/multiple-select-input.component.js.map +1 -1
  242. package/esm5/lib/components/forms/number-input/number-input.component.js +1 -1
  243. package/esm5/lib/components/forms/number-input/number-input.component.js.map +1 -1
  244. package/esm5/lib/components/forms/password-input/password-input.component.js +1 -1
  245. package/esm5/lib/components/forms/password-input/password-input.component.js.map +1 -1
  246. package/esm5/lib/components/forms/select-input/select-input.component.js +2 -1
  247. package/esm5/lib/components/forms/select-input/select-input.component.js.map +1 -1
  248. package/esm5/lib/components/forms/string-input/string-input.component.js +3 -3
  249. package/esm5/lib/components/forms/string-input/string-input.component.js.map +1 -1
  250. package/esm5/lib/components/forms/text-input/text-input.component.js +1 -1
  251. package/esm5/lib/components/forms/text-input/text-input.component.js.map +1 -1
  252. package/esm5/lib/components/icon/icon.component.js +15 -3
  253. package/esm5/lib/components/icon/icon.component.js.map +1 -1
  254. package/esm5/lib/components/index.js +17 -0
  255. package/esm5/lib/components/index.js.map +1 -1
  256. package/esm5/lib/components/table/column-model.js +45 -2
  257. package/esm5/lib/components/table/column-model.js.map +1 -1
  258. package/esm5/lib/components/table/mutable-cell-renderer.js +1 -0
  259. package/esm5/lib/components/table/mutable-cell-renderer.js.map +1 -0
  260. package/esm5/lib/components/table/table-model.js +10 -8
  261. package/esm5/lib/components/table/table-model.js.map +1 -1
  262. package/esm5/lib/components/table/table-row-menu/table-row-menu.component.js +63 -0
  263. package/esm5/lib/components/table/table-row-menu/table-row-menu.component.js.map +1 -0
  264. package/esm5/lib/components/table/table-row-menu/table-row-menu.component.ngfactory.js.map +1 -0
  265. package/esm5/lib/components/table/table.component.js +1 -1
  266. package/esm5/lib/components/table/table.component.js.map +1 -1
  267. package/esm5/lib/components/track-by.js +5 -0
  268. package/esm5/lib/components/track-by.js.map +1 -0
  269. package/esm5/lib/interaction/activity-ref.js +14 -2
  270. package/esm5/lib/interaction/activity-ref.js.map +1 -1
  271. package/esm5/lib/interaction/activity.js +27 -1
  272. package/esm5/lib/interaction/activity.js.map +1 -1
  273. package/esm5/lib/interaction/components/activity-actions/activity-actions.component.js +1 -1
  274. package/esm5/lib/interaction/components/activity-container/activity-container.component.js +24 -17
  275. package/esm5/lib/interaction/components/activity-container/activity-container.component.js.map +1 -1
  276. package/esm5/lib/interaction/components/activity-container/activity-outlet/activity-outlet.component.js +1 -1
  277. package/esm5/lib/interaction/components/activity-container/activity-outlet/activity-outlet.component.js.map +1 -1
  278. package/esm5/lib/interaction/interaction.module.ngfactory.js.map +1 -1
  279. package/esm5/lib/place/components/abstract-place-navigation.component.js +4 -3
  280. package/esm5/lib/place/components/abstract-place-navigation.component.js.map +1 -1
  281. package/esm5/lib/place/components/list-place-nav/list-place-nav.component.js +1 -1
  282. package/esm5/lib/place/components/list-place-nav/list-place-nav.component.js.map +1 -1
  283. package/esm5/lib/place/components/place-outlet/place-outlet.component.js +56 -16
  284. package/esm5/lib/place/components/place-outlet/place-outlet.component.js.map +1 -1
  285. package/esm5/lib/place/components/side-place-navigation/side-place-navigation.component.js +2 -2
  286. package/esm5/lib/place/components/side-place-navigation/side-place-navigation.component.js.map +1 -1
  287. package/esm5/lib/place/components/tabbed-place-navigation/tabbed-place-navigation.component.js +1 -1
  288. package/esm5/lib/place/components/tabbed-place-navigation/tabbed-place-navigation.component.js.map +1 -1
  289. package/esm5/lib/place/place-component.js +17 -1
  290. package/esm5/lib/place/place-component.js.map +1 -1
  291. package/esm5/lib/place/place-router.js +2 -8
  292. package/esm5/lib/place/place-router.js.map +1 -1
  293. package/esm5/lib/place/place.module.js +3 -3
  294. package/esm5/lib/place/place.module.js.map +1 -1
  295. package/esm5/lib/place/place.module.ngfactory.js.map +1 -1
  296. package/esm5/lib/place/route/parameter-decorators.js +2 -3
  297. package/esm5/lib/place/route/parameter-decorators.js.map +1 -1
  298. package/fesm2015/coolon-angular-ui-powerups.js +1475 -311
  299. package/fesm2015/coolon-angular-ui-powerups.js.map +1 -1
  300. package/fesm5/coolon-angular-ui-powerups.js +1641 -309
  301. package/fesm5/coolon-angular-ui-powerups.js.map +1 -1
  302. package/lib/components/commands/command/command.component.d.ts +22 -0
  303. package/lib/components/commands/command-face/command-face.component.d.ts +34 -0
  304. package/lib/components/commands/command-face.d.ts +40 -0
  305. package/lib/components/commands/flex.component.d.ts +11 -0
  306. package/lib/components/commands/group/command-group/command-group.component.d.ts +11 -0
  307. package/lib/components/commands/group/command-group-menu-renderer/command-group-menu-renderer.component.d.ts +21 -0
  308. package/lib/components/commands/group/command-group-renderer/command-group-renderer.component.d.ts +13 -0
  309. package/lib/components/commands/group/command-group.d.ts +41 -0
  310. package/lib/components/commands/group/more-menu.component.d.ts +14 -0
  311. package/lib/components/commands/group/popup-menu.component.d.ts +17 -0
  312. package/lib/components/commands/group/registration.d.ts +32 -0
  313. package/lib/components/commands/group/tool-bar/tool-bar.component.d.ts +13 -0
  314. package/lib/components/commands/group/view-data.d.ts +40 -0
  315. package/lib/components/commands/separator.component.d.ts +12 -0
  316. package/lib/components/forms/abstract-input.component.d.ts +8 -2
  317. package/lib/components/forms/abstract-list-input.component.d.ts +4 -3
  318. package/lib/components/forms/abstract-value-input.component.d.ts +5 -4
  319. package/lib/components/forms/autocomplete-input/autocomplete-input.component.d.ts +25 -0
  320. package/lib/components/forms/multiple-select-input/multiple-select-input.component.d.ts +7 -2
  321. package/lib/components/forms/select-input/select-input.component.d.ts +1 -0
  322. package/lib/components/icon/icon.component.d.ts +15 -0
  323. package/lib/components/index.d.ts +18 -0
  324. package/lib/components/table/column-model.d.ts +15 -17
  325. package/lib/components/table/mutable-cell-renderer.d.ts +6 -0
  326. package/lib/components/table/table-model.d.ts +7 -3
  327. package/lib/components/table/table-row-menu/table-row-menu.component.d.ts +26 -0
  328. package/lib/components/track-by.d.ts +3 -0
  329. package/lib/interaction/activity-ref.d.ts +3 -0
  330. package/lib/interaction/activity.d.ts +6 -2
  331. package/lib/interaction/components/activity-container/activity-container.component.d.ts +4 -2
  332. package/lib/place/components/abstract-place-navigation.component.d.ts +2 -2
  333. package/lib/place/components/place-outlet/place-outlet.component.d.ts +8 -2
  334. package/lib/place/components/side-place-navigation/side-place-navigation.component.d.ts +1 -1
  335. package/lib/place/place-component.d.ts +6 -0
  336. package/package.json +7 -5
  337. package/schematics/bootstrap-app/index.d.ts +3 -0
  338. package/schematics/bootstrap-app/index.js +81 -0
  339. package/schematics/bootstrap-app/index.js.map +1 -0
  340. package/schematics/bootstrap-app/schema.d.ts +3 -0
  341. package/schematics/bootstrap-app/schema.js +3 -0
  342. package/schematics/bootstrap-app/schema.js.map +1 -0
  343. package/schematics/bootstrap-app/schema.json +19 -0
  344. package/schematics/bootstrap-app/templates/app/app-routing.module.ts +19 -0
  345. package/schematics/bootstrap-app/templates/app/auth/auth.guard.spec.ts +15 -0
  346. package/schematics/bootstrap-app/templates/app/auth/auth.guard.ts +23 -0
  347. package/schematics/bootstrap-app/templates/app/auth/auth.module.ts +13 -0
  348. package/schematics/bootstrap-app/templates/app/auth/auth.service.ts +13 -0
  349. package/schematics/bootstrap-app/templates/app/i18n.ts +9 -0
  350. package/schematics/bootstrap-app/templates/app/places/home/home.component.html +1 -0
  351. package/schematics/bootstrap-app/templates/app/places/home/home.component.scss +4 -0
  352. package/schematics/bootstrap-app/templates/app/places/home/home.component.spec.ts +25 -0
  353. package/schematics/bootstrap-app/templates/app/places/home/home.component.ts +25 -0
  354. package/schematics/bootstrap-app/templates/app/places/place-routes.ts +3 -0
  355. package/schematics/bootstrap-app/templates/app/places/places.json5 +3 -0
  356. package/schematics/bootstrap-app/templates/i18n/config.json +9 -0
  357. package/schematics/bootstrap-app/templates/i18n/notifications.yml +19 -0
  358. package/schematics/bootstrap-app/templates/i18n/places/home.yml +6 -0
  359. package/schematics/collection.json +10 -1
  360. package/schematics/ng-add/index.d.ts +1 -0
  361. package/schematics/ng-add/index.js +27 -4
  362. package/schematics/ng-add/index.js.map +1 -1
  363. package/schematics/package-util.d.ts +13 -0
  364. package/schematics/package-util.js +60 -0
  365. package/schematics/package-util.js.map +1 -0
  366. package/schematics/place-add/index.d.ts +3 -0
  367. package/schematics/place-add/index.js +26 -0
  368. package/schematics/place-add/index.js.map +1 -0
  369. package/schematics/place-add/schema.d.ts +2 -0
  370. package/schematics/place-add/schema.js +3 -0
  371. package/schematics/place-add/schema.js.map +1 -0
  372. package/schematics/place-add/schema.json +8 -0
@@ -1 +1 @@
1
- [{"__symbolic":"module","version":4,"metadata":{"SelectInputComponent":{"__symbolic":"class","extends":{"__symbolic":"reference","module":"../abstract-value-input.component","name":"AbstractValueInputComponent","line":15,"character":51},"arity":1,"decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Component","line":10,"character":1},"arguments":[{"selector":"aup-select-input","template":"<mat-form-field appearance=\"standard\" [floatLabel]=\"floatLabel\">\n <mat-label *ngIf=\"label\">{{label}}</mat-label>\n <mat-select placeholder=\"{{placeholder}}\"\n [(ngModel)]=\"valueModel.value\"\n [disabled]=\"!enabled.value\"\n (keydown.enter)=\"notifyEnterKey()\"\n (keydown.escape)=\"notifyEscapeKey()\"\n [pectinFocusBinding]=\"focusContext\"\n [errorStateMatcher]=\"errorStateMatcher\"\n >\n <mat-option *ngIf=\"allowNil\">{{placeholder}}</mat-option>\n <mat-option *ngFor=\"let option of optionsModel.value; let i = index\" [value]=\"option\">\n <ng-container *ngIf=\"!optionTemplateRef\">{{optionLabelFormat(option)}}</ng-container>\n <ng-container *ngIf=\"optionTemplateRef\"\n [ngTemplateOutlet]=\"optionTemplateRef\"\n [ngTemplateOutletContext]=\"{ $implicit: option, index: i }\"\n >\n </ng-container>\n </mat-option>\n </mat-select>\n <mat-hint *ngIf=\"showHint\">{{hint}}</mat-hint>\n <mat-error *ngIf=\"hasErrors\">{{firstError}}</mat-error>\n</mat-form-field>\n","styles":[":host{display:inline-block}mat-form-field{width:100%}"]}]}],"members":{"optionsModel":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":20,"character":3}},{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@coolon/pectin","name":"TrackExternal","line":20,"character":12}}]}],"options":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":23,"character":3}},{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@coolon/pectin","name":"StoreInListModel","line":23,"character":12},"arguments":["optionsModel"]}]}],"optionLabel":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":26,"character":3}}]}],"allowNil":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":29,"character":3}}]}],"optionTemplateRef":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"ContentChild","line":32,"character":3},"arguments":["optionTemplate"]}]}],"nilOptionTemplateRef":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"ContentChild","line":35,"character":3},"arguments":["nilOptionTemplate"]}]}],"optionLabelFormat":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":38,"character":3}}]}],"__ctor__":[{"__symbolic":"constructor"}],"ngOnInit":[{"__symbolic":"method"}]}}}}]
1
+ [{"__symbolic":"module","version":4,"metadata":{"SelectInputComponent":{"__symbolic":"class","extends":{"__symbolic":"reference","module":"../abstract-value-input.component","name":"AbstractValueInputComponent","line":16,"character":51},"arity":1,"decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Component","line":11,"character":1},"arguments":[{"selector":"aup-select-input","template":"<mat-form-field appearance=\"standard\" [floatLabel]=\"floatLabel\">\n <mat-label *ngIf=\"label\">{{label}}</mat-label>\n <mat-select placeholder=\"{{placeholder}}\"\n [(ngModel)]=\"componentValueModel.value\"\n [disabled]=\"!enabled.value\"\n (keydown.enter)=\"notifyEnterKey()\"\n (keydown.escape)=\"notifyEscapeKey()\"\n [pectinFocusBinding]=\"focusContext\"\n [errorStateMatcher]=\"errorStateMatcher\"\n >\n <mat-option *ngIf=\"allowNil\">\n <ng-container *ngIf=\"!nilOptionTemplateRef\">{{placeholder}}</ng-container>\n <ng-container *ngIf=\"nilOptionTemplateRef\" [ngTemplateOutlet]=\"nilOptionTemplateRef\"></ng-container>\n </mat-option>\n <mat-option *ngFor=\"let option of optionsModel.value; let i = index\" [value]=\"option\">\n <ng-container *ngIf=\"!optionTemplateRef\">{{optionLabelFormat(option)}}</ng-container>\n <ng-container *ngIf=\"optionTemplateRef\"\n [ngTemplateOutlet]=\"optionTemplateRef\"\n [ngTemplateOutletContext]=\"{ $implicit: option, index: i }\"\n >\n </ng-container>\n </mat-option>\n </mat-select>\n <mat-hint *ngIf=\"showHint\">{{hint}}</mat-hint>\n <mat-error *ngIf=\"hasErrors\">{{firstError}}</mat-error>\n</mat-form-field>\n","styles":[":host{display:inline-block}mat-form-field{width:100%}"]}]}],"members":{"optionsModel":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":21,"character":3}},{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@coolon/pectin","name":"TrackExternal","line":21,"character":12}}]}],"options":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":24,"character":3}},{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@coolon/pectin","name":"StoreInListModel","line":24,"character":12},"arguments":["optionsModel"]}]}],"optionLabel":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":27,"character":3}}]}],"allowNil":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":30,"character":3}}]}],"optionTemplateRef":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"ContentChild","line":33,"character":3},"arguments":["optionTemplate"]}]}],"nilOptionTemplateRef":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"ContentChild","line":36,"character":3},"arguments":["nilOptionTemplate"]}]}],"optionLabelFormat":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":39,"character":3}}]}],"__ctor__":[{"__symbolic":"constructor"}],"ngOnInit":[{"__symbolic":"method"}]}}}}]
@@ -7,9 +7,9 @@ let StringInputComponent = class StringInputComponent extends AbstractValueInput
7
7
  super();
8
8
  const { chain, valueOf, before, when, after, observe, switchOn } = Dsl.disposeWith(this);
9
9
  this.clearCommand = Command.create(() => {
10
- this.valueModel.value = null;
10
+ this.componentValueModel.value = null;
11
11
  });
12
- this.clearCommand.disableWhile(chain.stringValue(this.valueModel).isBlank());
12
+ this.clearCommand.disableWhile(chain.stringValue(this.componentValueModel).isBlank());
13
13
  }
14
14
  ngOnInit() {
15
15
  }
@@ -25,7 +25,7 @@ __decorate([
25
25
  StringInputComponent = __decorate([
26
26
  Component({
27
27
  selector: 'aup-string-input',
28
- template: "<mat-form-field appearance=\"standard\" [floatLabel]=\"floatLabel\">\n <mat-label *ngIf=\"label\">{{label}}</mat-label>\n <input matInput\n placeholder=\"{{placeholder}}\"\n [(ngModel)]=\"valueModel.value\"\n [disabled]=\"!enabled.value\"\n (keydown.enter)=\"notifyEnterKey()\"\n (keydown.escape)=\"notifyEscapeKey()\"\n [pectinFocusBinding]=\"focusContext\"\n [errorStateMatcher]=\"errorStateMatcher\"\n >\n <mat-hint *ngIf=\"showHint\">{{hint}}</mat-hint>\n <mat-error *ngIf=\"hasErrors\">{{firstError}}</mat-error>\n <button mat-button mat-icon-button matSuffix *ngIf=\"enableClear\" [pectinCommand]=\"clearCommand\">\n <aup-icon icon=\"mat:close\"></aup-icon>\n </button>\n</mat-form-field>\n\n",
28
+ template: "<mat-form-field appearance=\"standard\" [floatLabel]=\"floatLabel\">\n <mat-label *ngIf=\"label\">{{label}}</mat-label>\n <input matInput\n placeholder=\"{{placeholder}}\"\n [(ngModel)]=\"componentValueModel.value\"\n [disabled]=\"!enabled.value\"\n (keydown.enter)=\"notifyEnterKey()\"\n (keydown.escape)=\"notifyEscapeKey()\"\n [pectinFocusBinding]=\"focusContext\"\n [errorStateMatcher]=\"errorStateMatcher\"\n >\n <mat-hint *ngIf=\"showHint\">{{hint}}</mat-hint>\n <mat-error *ngIf=\"hasErrors\">{{firstError}}</mat-error>\n <button mat-button mat-icon-button matSuffix *ngIf=\"enableClear\" [pectinCommand]=\"clearCommand\">\n <aup-icon icon=\"mat:close\"></aup-icon>\n </button>\n</mat-form-field>\n\n",
29
29
  styles: ["button[disabled]{visibility:hidden}"]
30
30
  }),
31
31
  __metadata("design:paramtypes", [])
@@ -1 +1 @@
1
- {"version":3,"file":"string-input.component.js","sourceRoot":"ng://@coolon/angular-ui-powerups/","sources":["lib/components/forms/string-input/string-input.component.ts"],"names":[],"mappings":";AAAA,OAAO,EAAE,SAAS,EAAE,KAAK,EAAU,MAAM,eAAe,CAAC;AACzD,OAAO,EAAE,OAAO,EAAE,GAAG,EAA4B,iBAAiB,EAAE,aAAa,EAAE,UAAU,EAAE,MAAM,gBAAgB,CAAC;AACtH,OAAO,EAAE,2BAA2B,EAAE,MAAM,mCAAmC,CAAC;AAOhF,IAAa,oBAAoB,GAAjC,MAAa,oBAAqB,SAAQ,2BAAmC;IAU3E;QACE,KAAK,EAAE,CAAC;QACR,MAAM,EAAE,KAAK,EAAE,OAAO,EAAE,MAAM,EAAE,IAAI,EAAE,KAAK,EAAE,OAAO,EAAE,QAAQ,EAAE,GAAG,GAAG,CAAC,WAAW,CAAC,IAAI,CAAC,CAAC;QACzF,IAAI,CAAC,YAAY,GAAG,OAAO,CAAC,MAAM,CAAC,GAAG,EAAE;YACtC,IAAI,CAAC,UAAU,CAAC,KAAK,GAAG,IAAI,CAAC;QAC/B,CAAC,CAAC,CAAC;QACH,IAAI,CAAC,YAAY,CAAC,YAAY,CAAC,KAAK,CAAC,WAAW,CAAC,IAAI,CAAC,UAAU,CAAC,CAAC,OAAO,EAAE,CAAC,CAAC;IAC/E,CAAC;IAED,QAAQ;IACR,CAAC;CAEF,CAAA;AAnBC;IADC,KAAK,EAAE,EAAE,aAAa,CAAC,EAAE,YAAY,EAAE,KAAK,EAAE,CAAC;8BAC9B,UAAU;8DAAU;AAGtC;IADC,KAAK,EAAE,EAAE,iBAAiB,CAAC,kBAAkB,CAAC;;yDAC1B;AANV,oBAAoB;IALhC,SAAS,CAAC;QACT,QAAQ,EAAE,kBAAkB;QAC5B,wwBAA4C;;KAE7C,CAAC;;GACW,oBAAoB,CAsBhC;SAtBY,oBAAoB","sourcesContent":["import { Component, Input, OnInit } from '@angular/core';\nimport { Command, Dsl, Form, IMutableValueModel, StoreInValueModel, TrackExternal, ValueModel } from '@coolon/pectin';\nimport { AbstractValueInputComponent } from '../abstract-value-input.component';\n\n@Component({\n selector: 'aup-string-input',\n templateUrl: './string-input.component.html',\n styleUrls: ['./string-input.component.scss']\n})\nexport class StringInputComponent extends AbstractValueInputComponent<string> implements OnInit {\n\n @Input() @TrackExternal({ defaultValue: false })\n enableClearModel: ValueModel<boolean>;\n\n @Input() @StoreInValueModel('enableClearModel')\n enableClear: boolean;\n\n readonly clearCommand: Command<void>;\n\n constructor() {\n super();\n const { chain, valueOf, before, when, after, observe, switchOn } = Dsl.disposeWith(this);\n this.clearCommand = Command.create(() => {\n this.valueModel.value = null;\n });\n this.clearCommand.disableWhile(chain.stringValue(this.valueModel).isBlank());\n }\n\n ngOnInit() {\n }\n\n}\n"]}
1
+ {"version":3,"file":"string-input.component.js","sourceRoot":"ng://@coolon/angular-ui-powerups/","sources":["lib/components/forms/string-input/string-input.component.ts"],"names":[],"mappings":";AAAA,OAAO,EAAE,SAAS,EAAE,KAAK,EAAU,MAAM,eAAe,CAAC;AACzD,OAAO,EAAE,OAAO,EAAE,GAAG,EAA4B,iBAAiB,EAAE,aAAa,EAAE,UAAU,EAAE,MAAM,gBAAgB,CAAC;AACtH,OAAO,EAAE,2BAA2B,EAAE,MAAM,mCAAmC,CAAC;AAOhF,IAAa,oBAAoB,GAAjC,MAAa,oBAAqB,SAAQ,2BAAmC;IAU3E;QACE,KAAK,EAAE,CAAC;QACR,MAAM,EAAE,KAAK,EAAE,OAAO,EAAE,MAAM,EAAE,IAAI,EAAE,KAAK,EAAE,OAAO,EAAE,QAAQ,EAAE,GAAG,GAAG,CAAC,WAAW,CAAC,IAAI,CAAC,CAAC;QACzF,IAAI,CAAC,YAAY,GAAG,OAAO,CAAC,MAAM,CAAC,GAAG,EAAE;YACtC,IAAI,CAAC,mBAAmB,CAAC,KAAK,GAAG,IAAI,CAAC;QACxC,CAAC,CAAC,CAAC;QACH,IAAI,CAAC,YAAY,CAAC,YAAY,CAAC,KAAK,CAAC,WAAW,CAAC,IAAI,CAAC,mBAAmB,CAAC,CAAC,OAAO,EAAE,CAAC,CAAC;IACxF,CAAC;IAED,QAAQ;IACR,CAAC;CAEF,CAAA;AAnBC;IADC,KAAK,EAAE,EAAE,aAAa,CAAC,EAAE,YAAY,EAAE,KAAK,EAAE,CAAC;8BAC9B,UAAU;8DAAU;AAGtC;IADC,KAAK,EAAE,EAAE,iBAAiB,CAAC,kBAAkB,CAAC;;yDAC1B;AANV,oBAAoB;IALhC,SAAS,CAAC;QACT,QAAQ,EAAE,kBAAkB;QAC5B,ixBAA4C;;KAE7C,CAAC;;GACW,oBAAoB,CAsBhC;SAtBY,oBAAoB","sourcesContent":["import { Component, Input, OnInit } from '@angular/core';\nimport { Command, Dsl, Form, IMutableValueModel, StoreInValueModel, TrackExternal, ValueModel } from '@coolon/pectin';\nimport { AbstractValueInputComponent } from '../abstract-value-input.component';\n\n@Component({\n selector: 'aup-string-input',\n templateUrl: './string-input.component.html',\n styleUrls: ['./string-input.component.scss']\n})\nexport class StringInputComponent extends AbstractValueInputComponent<string> implements OnInit {\n\n @Input() @TrackExternal({ defaultValue: false })\n enableClearModel: ValueModel<boolean>;\n\n @Input() @StoreInValueModel('enableClearModel')\n enableClear: boolean;\n\n readonly clearCommand: Command<void>;\n\n constructor() {\n super();\n const { chain, valueOf, before, when, after, observe, switchOn } = Dsl.disposeWith(this);\n this.clearCommand = Command.create(() => {\n this.componentValueModel.value = null;\n });\n this.clearCommand.disableWhile(chain.stringValue(this.componentValueModel).isBlank());\n }\n\n ngOnInit() {\n }\n\n}\n"]}
@@ -1 +1 @@
1
- [{"__symbolic":"module","version":4,"metadata":{"StringInputComponent":{"__symbolic":"class","extends":{"__symbolic":"reference","module":"../abstract-value-input.component","name":"AbstractValueInputComponent","line":9,"character":42},"decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Component","line":4,"character":1},"arguments":[{"selector":"aup-string-input","template":"<mat-form-field appearance=\"standard\" [floatLabel]=\"floatLabel\">\n <mat-label *ngIf=\"label\">{{label}}</mat-label>\n <input matInput\n placeholder=\"{{placeholder}}\"\n [(ngModel)]=\"valueModel.value\"\n [disabled]=\"!enabled.value\"\n (keydown.enter)=\"notifyEnterKey()\"\n (keydown.escape)=\"notifyEscapeKey()\"\n [pectinFocusBinding]=\"focusContext\"\n [errorStateMatcher]=\"errorStateMatcher\"\n >\n <mat-hint *ngIf=\"showHint\">{{hint}}</mat-hint>\n <mat-error *ngIf=\"hasErrors\">{{firstError}}</mat-error>\n <button mat-button mat-icon-button matSuffix *ngIf=\"enableClear\" [pectinCommand]=\"clearCommand\">\n <aup-icon icon=\"mat:close\"></aup-icon>\n </button>\n</mat-form-field>\n\n","styles":["button[disabled]{visibility:hidden}"]}]}],"members":{"enableClearModel":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":11,"character":3}},{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@coolon/pectin","name":"TrackExternal","line":11,"character":12},"arguments":[{"defaultValue":false}]}]}],"enableClear":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":14,"character":3}},{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@coolon/pectin","name":"StoreInValueModel","line":14,"character":12},"arguments":["enableClearModel"]}]}],"__ctor__":[{"__symbolic":"constructor"}],"ngOnInit":[{"__symbolic":"method"}]}}}}]
1
+ [{"__symbolic":"module","version":4,"metadata":{"StringInputComponent":{"__symbolic":"class","extends":{"__symbolic":"reference","module":"../abstract-value-input.component","name":"AbstractValueInputComponent","line":9,"character":42},"decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Component","line":4,"character":1},"arguments":[{"selector":"aup-string-input","template":"<mat-form-field appearance=\"standard\" [floatLabel]=\"floatLabel\">\n <mat-label *ngIf=\"label\">{{label}}</mat-label>\n <input matInput\n placeholder=\"{{placeholder}}\"\n [(ngModel)]=\"componentValueModel.value\"\n [disabled]=\"!enabled.value\"\n (keydown.enter)=\"notifyEnterKey()\"\n (keydown.escape)=\"notifyEscapeKey()\"\n [pectinFocusBinding]=\"focusContext\"\n [errorStateMatcher]=\"errorStateMatcher\"\n >\n <mat-hint *ngIf=\"showHint\">{{hint}}</mat-hint>\n <mat-error *ngIf=\"hasErrors\">{{firstError}}</mat-error>\n <button mat-button mat-icon-button matSuffix *ngIf=\"enableClear\" [pectinCommand]=\"clearCommand\">\n <aup-icon icon=\"mat:close\"></aup-icon>\n </button>\n</mat-form-field>\n\n","styles":["button[disabled]{visibility:hidden}"]}]}],"members":{"enableClearModel":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":11,"character":3}},{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@coolon/pectin","name":"TrackExternal","line":11,"character":12},"arguments":[{"defaultValue":false}]}]}],"enableClear":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":14,"character":3}},{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@coolon/pectin","name":"StoreInValueModel","line":14,"character":12},"arguments":["enableClearModel"]}]}],"__ctor__":[{"__symbolic":"constructor"}],"ngOnInit":[{"__symbolic":"method"}]}}}}]
@@ -23,7 +23,7 @@ __decorate([
23
23
  TextInputComponent = __decorate([
24
24
  Component({
25
25
  selector: 'aup-text-input',
26
- template: "<mat-form-field appearance=\"standard\" [floatLabel]=\"floatLabel\">\n <mat-label *ngIf=\"label\">{{label}}</mat-label>\n <textarea matInput\n placeholder=\"{{placeholder}}\"\n [(ngModel)]=\"valueModel.value\"\n [disabled]=\"!enabled.value\"\n (keydown.enter)=\"notifyEnterKey()\"\n (keydown.escape)=\"notifyEscapeKey()\"\n [pectinFocusBinding]=\"focusContext\"\n [errorStateMatcher]=\"errorStateMatcher\"\n [rows]=\"rows\"\n [cols]=\"cols\"\n >\n </textarea>\n <mat-hint *ngIf=\"showHint\">{{hint}}</mat-hint>\n <mat-error *ngIf=\"hasErrors\">{{firstError}}</mat-error>\n</mat-form-field>\n\n",
26
+ template: "<mat-form-field appearance=\"standard\" [floatLabel]=\"floatLabel\">\n <mat-label *ngIf=\"label\">{{label}}</mat-label>\n <textarea matInput\n placeholder=\"{{placeholder}}\"\n [(ngModel)]=\"componentValueModel.value\"\n [disabled]=\"!enabled.value\"\n (keydown.enter)=\"notifyEnterKey()\"\n (keydown.escape)=\"notifyEscapeKey()\"\n [pectinFocusBinding]=\"focusContext\"\n [errorStateMatcher]=\"errorStateMatcher\"\n [rows]=\"rows\"\n [cols]=\"cols\"\n >\n </textarea>\n <mat-hint *ngIf=\"showHint\">{{hint}}</mat-hint>\n <mat-error *ngIf=\"hasErrors\">{{firstError}}</mat-error>\n</mat-form-field>\n\n",
27
27
  styles: ["button[disabled]{visibility:hidden}textarea{overflow:auto}"]
28
28
  }),
29
29
  __metadata("design:paramtypes", [])
@@ -1 +1 @@
1
- {"version":3,"file":"text-input.component.js","sourceRoot":"ng://@coolon/angular-ui-powerups/","sources":["lib/components/forms/text-input/text-input.component.ts"],"names":[],"mappings":";AAAA,OAAO,EAAE,SAAS,EAAE,KAAK,EAAU,MAAM,eAAe,CAAC;AAEzD,OAAO,EAAE,2BAA2B,EAAE,MAAM,mCAAmC,CAAC;AAOhF,IAAa,kBAAkB,GAA/B,MAAa,kBAAmB,SAAQ,2BAAmC;IAQzE;QACE,KAAK,EAAE,CAAC;QAPV,wDAAwD;QACxD,wEAAwE;QAE/D,SAAI,GAAG,CAAC,CAAC;QAKhB,4FAA4F;IAC9F,CAAC;IAED,QAAQ;IACR,CAAC;CAEF,CAAA;AAXU;IAAR,KAAK,EAAE;;gDAAU;AACT;IAAR,KAAK,EAAE;;gDAAc;AANX,kBAAkB;IAL9B,SAAS,CAAC;QACT,QAAQ,EAAE,gBAAgB;QAC1B,ssBAA0C;;KAE3C,CAAC;;GACW,kBAAkB,CAgB9B;SAhBY,kBAAkB","sourcesContent":["import { Component, Input, OnInit } from '@angular/core';\nimport { Form, IMutableValueModel, TrackExternal } from '@coolon/pectin';\nimport { AbstractValueInputComponent } from '../abstract-value-input.component';\n\n@Component({\n selector: 'aup-text-input',\n templateUrl: './text-input.component.html',\n styleUrls: ['./text-input.component.scss']\n})\nexport class TextInputComponent extends AbstractValueInputComponent<string> implements OnInit {\n\n // @Input() @TrackExternal({ delegateTo: 'inputModel' })\n // valueModel: Form.ValueModelBase<string> | IMutableValueModel<string>;\n\n @Input() rows = 2;\n @Input() cols: number;\n\n constructor() {\n super();\n // const { chain, valueOf, before, when, after, observe, switchOn } = Dsl.disposeWith(this);\n }\n\n ngOnInit() {\n }\n\n}\n"]}
1
+ {"version":3,"file":"text-input.component.js","sourceRoot":"ng://@coolon/angular-ui-powerups/","sources":["lib/components/forms/text-input/text-input.component.ts"],"names":[],"mappings":";AAAA,OAAO,EAAE,SAAS,EAAE,KAAK,EAAU,MAAM,eAAe,CAAC;AAEzD,OAAO,EAAE,2BAA2B,EAAE,MAAM,mCAAmC,CAAC;AAOhF,IAAa,kBAAkB,GAA/B,MAAa,kBAAmB,SAAQ,2BAAmC;IAQzE;QACE,KAAK,EAAE,CAAC;QAPV,wDAAwD;QACxD,wEAAwE;QAE/D,SAAI,GAAG,CAAC,CAAC;QAKhB,4FAA4F;IAC9F,CAAC;IAED,QAAQ;IACR,CAAC;CAEF,CAAA;AAXU;IAAR,KAAK,EAAE;;gDAAU;AACT;IAAR,KAAK,EAAE;;gDAAc;AANX,kBAAkB;IAL9B,SAAS,CAAC;QACT,QAAQ,EAAE,gBAAgB;QAC1B,+sBAA0C;;KAE3C,CAAC;;GACW,kBAAkB,CAgB9B;SAhBY,kBAAkB","sourcesContent":["import { Component, Input, OnInit } from '@angular/core';\nimport { Form, IMutableValueModel, TrackExternal } from '@coolon/pectin';\nimport { AbstractValueInputComponent } from '../abstract-value-input.component';\n\n@Component({\n selector: 'aup-text-input',\n templateUrl: './text-input.component.html',\n styleUrls: ['./text-input.component.scss']\n})\nexport class TextInputComponent extends AbstractValueInputComponent<string> implements OnInit {\n\n // @Input() @TrackExternal({ delegateTo: 'inputModel' })\n // valueModel: Form.ValueModelBase<string> | IMutableValueModel<string>;\n\n @Input() rows = 2;\n @Input() cols: number;\n\n constructor() {\n super();\n // const { chain, valueOf, before, when, after, observe, switchOn } = Dsl.disposeWith(this);\n }\n\n ngOnInit() {\n }\n\n}\n"]}
@@ -1 +1 @@
1
- [{"__symbolic":"module","version":4,"metadata":{"TextInputComponent":{"__symbolic":"class","extends":{"__symbolic":"reference","module":"../abstract-value-input.component","name":"AbstractValueInputComponent","line":9,"character":40},"decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Component","line":4,"character":1},"arguments":[{"selector":"aup-text-input","template":"<mat-form-field appearance=\"standard\" [floatLabel]=\"floatLabel\">\n <mat-label *ngIf=\"label\">{{label}}</mat-label>\n <textarea matInput\n placeholder=\"{{placeholder}}\"\n [(ngModel)]=\"valueModel.value\"\n [disabled]=\"!enabled.value\"\n (keydown.enter)=\"notifyEnterKey()\"\n (keydown.escape)=\"notifyEscapeKey()\"\n [pectinFocusBinding]=\"focusContext\"\n [errorStateMatcher]=\"errorStateMatcher\"\n [rows]=\"rows\"\n [cols]=\"cols\"\n >\n </textarea>\n <mat-hint *ngIf=\"showHint\">{{hint}}</mat-hint>\n <mat-error *ngIf=\"hasErrors\">{{firstError}}</mat-error>\n</mat-form-field>\n\n","styles":["button[disabled]{visibility:hidden}textarea{overflow:auto}"]}]}],"members":{"rows":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":14,"character":3}}]}],"cols":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":15,"character":3}}]}],"__ctor__":[{"__symbolic":"constructor"}],"ngOnInit":[{"__symbolic":"method"}]}}}}]
1
+ [{"__symbolic":"module","version":4,"metadata":{"TextInputComponent":{"__symbolic":"class","extends":{"__symbolic":"reference","module":"../abstract-value-input.component","name":"AbstractValueInputComponent","line":9,"character":40},"decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Component","line":4,"character":1},"arguments":[{"selector":"aup-text-input","template":"<mat-form-field appearance=\"standard\" [floatLabel]=\"floatLabel\">\n <mat-label *ngIf=\"label\">{{label}}</mat-label>\n <textarea matInput\n placeholder=\"{{placeholder}}\"\n [(ngModel)]=\"componentValueModel.value\"\n [disabled]=\"!enabled.value\"\n (keydown.enter)=\"notifyEnterKey()\"\n (keydown.escape)=\"notifyEscapeKey()\"\n [pectinFocusBinding]=\"focusContext\"\n [errorStateMatcher]=\"errorStateMatcher\"\n [rows]=\"rows\"\n [cols]=\"cols\"\n >\n </textarea>\n <mat-hint *ngIf=\"showHint\">{{hint}}</mat-hint>\n <mat-error *ngIf=\"hasErrors\">{{firstError}}</mat-error>\n</mat-form-field>\n\n","styles":["button[disabled]{visibility:hidden}textarea{overflow:auto}"]}]}],"members":{"rows":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":14,"character":3}}]}],"cols":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":15,"character":3}}]}],"__ctor__":[{"__symbolic":"constructor"}],"ngOnInit":[{"__symbolic":"method"}]}}}}]
@@ -1,6 +1,12 @@
1
+ var IconComponent_1;
1
2
  import { __decorate, __metadata } from "tslib";
2
3
  import { Component, Input } from '@angular/core';
3
- let IconComponent = class IconComponent {
4
+ import { Enum } from 'typescript-string-enums';
5
+ let IconComponent = IconComponent_1 = class IconComponent {
6
+ constructor() {
7
+ this.allowedPrefixes = Enum.values(IconComponent_1.IconPrefix).map(p => `${p}:`);
8
+ this.iconPrefix = IconComponent_1.IconPrefix;
9
+ }
4
10
  set icon(iconName) {
5
11
  this._icon = iconName;
6
12
  if (!iconName) {
@@ -16,7 +22,7 @@ let IconComponent = class IconComponent {
16
22
  if (this.prefix) {
17
23
  this.errorMessage = `Unknown icon "${iconName}"`;
18
24
  }
19
- this.errorMessage = `Unknown icon prefix "${this.prefix}"`;
25
+ this.errorMessage = `Unknown icon prefix, expected one of [${this.allowedPrefixes.join(',')}] got "${this.prefix}:"`;
20
26
  }
21
27
  get icon() {
22
28
  return this._icon;
@@ -27,12 +33,19 @@ __decorate([
27
33
  __metadata("design:type", String),
28
34
  __metadata("design:paramtypes", [String])
29
35
  ], IconComponent.prototype, "icon", null);
30
- IconComponent = __decorate([
36
+ IconComponent = IconComponent_1 = __decorate([
31
37
  Component({
32
38
  selector: 'aup-icon',
33
- template: "<ng-container [ngSwitch]=\"prefix\">\n\n <mat-icon *ngSwitchCase=\"'svg'\"\n [svgIcon]=\"suffix\"\n class=\"svgIcon\">\n </mat-icon>\n\n <mat-icon *ngSwitchCase=\"'mat'\">\n {{suffix}}\n </mat-icon>\n\n <div *ngSwitchCase=\"'fab'\"\n class=\"faIconWrapper\">\n <fa-icon [icon]=\"suffix\">\n </fa-icon>\n </div>\n\n <mat-icon *ngSwitchDefault\n [matTooltip]=\"errorMessage\">\n bug_report\n </mat-icon>\n\n</ng-container>\n\n",
39
+ template: "<ng-container [ngSwitch]=\"prefix\">\n\n <mat-icon *ngSwitchCase=\"iconPrefix.SVG\"\n [svgIcon]=\"suffix\"\n class=\"svgIcon\">\n </mat-icon>\n\n <mat-icon *ngSwitchCase=\"iconPrefix.MATERIAL\">\n {{suffix}}\n </mat-icon>\n\n <div *ngSwitchCase=\"iconPrefix.FONT_AWESOME\"\n class=\"faIconWrapper\">\n <fa-icon [icon]=\"suffix\">\n </fa-icon>\n </div>\n\n <mat-icon *ngSwitchDefault\n [matTooltip]=\"errorMessage\">\n bug_report\n </mat-icon>\n\n</ng-container>\n\n",
34
40
  styles: [":host{display:inline-flex;width:24px}fa-icon{vertical-align:middle}.faIconWrapper{text-align:center;width:24px;height:24px}.svgIcon{width:24px;height:24px}:host(.mat-chip-remove) mat-icon{font-size:18px}mat-icon{width:inherit;height:inherit}"]
35
41
  })
36
42
  ], IconComponent);
37
43
  export { IconComponent };
44
+ (function (IconComponent) {
45
+ IconComponent.IconPrefix = Enum({
46
+ SVG: 'svg',
47
+ FONT_AWESOME: 'fa',
48
+ MATERIAL: 'mat'
49
+ });
50
+ })(IconComponent || (IconComponent = {}));
38
51
  //# sourceMappingURL=icon.component.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"icon.component.js","sourceRoot":"ng://@coolon/angular-ui-powerups/","sources":["lib/components/icon/icon.component.ts"],"names":[],"mappings":";AAAA,OAAO,EAAE,SAAS,EAAE,KAAK,EAA4B,MAAM,eAAe,CAAC;AAO3E,IAAa,aAAa,GAA1B,MAAa,aAAa;IASxB,IAAI,IAAI,CAAC,QAAgB;QACvB,IAAI,CAAC,KAAK,GAAG,QAAQ,CAAC;QACtB,IAAI,CAAC,QAAQ,EAAE;YACb,IAAI,CAAC,YAAY,GAAG,aAAa,CAAC;YAClC,IAAI,CAAC,MAAM,GAAG,SAAS,CAAC;YACxB,OAAO;SACR;QAED,MAAM,UAAU,GAAG,QAAQ,CAAC,OAAO,CAAC,GAAG,CAAC,CAAC;QACzC,IAAI,UAAU,GAAG,CAAC,EAAE;YAClB,IAAI,CAAC,MAAM,GAAG,IAAI,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,EAAE,UAAU,CAAC,CAAC;YAC7C,IAAI,CAAC,MAAM,GAAG,IAAI,CAAC,IAAI,CAAC,KAAK,CAAC,UAAU,GAAG,CAAC,CAAC,CAAC;SAC/C;QACD,IAAI,IAAI,CAAC,MAAM,EAAE;YACf,IAAI,CAAC,YAAY,GAAG,iBAAiB,QAAQ,GAAG,CAAC;SAClD;QACD,IAAI,CAAC,YAAY,GAAG,wBAAwB,IAAI,CAAC,MAAM,GAAG,CAAC;IAC7D,CAAC;IAED,IAAI,IAAI;QACN,OAAO,IAAI,CAAC,KAAK,CAAC;IACpB,CAAC;CAEF,CAAA;AAvBC;IADC,KAAK,EAAE;;;yCAkBP;AA1BU,aAAa;IALzB,SAAS,CAAC;QACT,QAAQ,EAAE,UAAU;QACpB,+eAAoC;;KAErC,CAAC;GACW,aAAa,CAgCzB;SAhCY,aAAa","sourcesContent":["import { Component, Input, OnChanges, SimpleChanges } from '@angular/core';\n\n@Component({\n selector: 'aup-icon',\n templateUrl: './icon.component.html',\n styleUrls: ['./icon.component.scss']\n})\nexport class IconComponent {\n\n _icon: string;\n\n prefix: string;\n suffix: string;\n errorMessage: string;\n\n @Input()\n set icon(iconName: string) {\n this._icon = iconName;\n if (!iconName) {\n this.errorMessage = 'icon is nil';\n this.prefix = undefined;\n return;\n }\n\n const colonIndex = iconName.indexOf(':');\n if (colonIndex > 0) {\n this.prefix = this.icon.slice(0, colonIndex);\n this.suffix = this.icon.slice(colonIndex + 1);\n }\n if (this.prefix) {\n this.errorMessage = `Unknown icon \"${iconName}\"`;\n }\n this.errorMessage = `Unknown icon prefix \"${this.prefix}\"`;\n }\n\n get icon(): string {\n return this._icon;\n }\n\n}\n"]}
1
+ {"version":3,"file":"icon.component.js","sourceRoot":"ng://@coolon/angular-ui-powerups/","sources":["lib/components/icon/icon.component.ts"],"names":[],"mappings":";;AAAA,OAAO,EAAE,SAAS,EAAE,KAAK,EAA4B,MAAM,eAAe,CAAC;AAC3E,OAAO,EAAC,IAAI,EAAC,MAAM,yBAAyB,CAAC;AAO7C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,wBAAU,GAAG,IAAI,CAAC;QAC7B,GAAG,EAAE,KAAK;QACV,YAAY,EAAE,IAAI;QAClB,QAAQ,EAAE,KAAK;KAChB,CAAC,CAAC;AAGL,CAAC,EATgB,aAAa,KAAb,aAAa,QAS7B","sourcesContent":["import { Component, Input, OnChanges, SimpleChanges } from '@angular/core';\nimport {Enum} from 'typescript-string-enums';\n\n@Component({\n selector: 'aup-icon',\n templateUrl: './icon.component.html',\n styleUrls: ['./icon.component.scss']\n})\nexport class IconComponent {\n\n _icon: string;\n\n prefix: string;\n suffix: string;\n errorMessage: string;\n\n allowedPrefixes = Enum.values(IconComponent.IconPrefix).map(p => `${p}:`);\n iconPrefix = IconComponent.IconPrefix;\n\n @Input()\n set icon(iconName: string) {\n this._icon = iconName;\n if (!iconName) {\n this.errorMessage = 'icon is nil';\n this.prefix = undefined;\n return;\n }\n\n const colonIndex = iconName.indexOf(':');\n if (colonIndex > 0) {\n this.prefix = this.icon.slice(0, colonIndex);\n this.suffix = this.icon.slice(colonIndex + 1);\n }\n if (this.prefix) {\n this.errorMessage = `Unknown icon \"${iconName}\"`;\n }\n this.errorMessage = `Unknown icon prefix, expected one of [${this.allowedPrefixes.join(',')}] got \"${this.prefix}:\"`;\n }\n\n get icon(): string {\n return this._icon;\n }\n\n}\nexport namespace IconComponent {\n\n export const IconPrefix = Enum({\n SVG: 'svg',\n FONT_AWESOME: 'fa',\n MATERIAL: 'mat'\n });\n export type IconPrefix = Enum<typeof IconPrefix>;\n\n}\n"]}
@@ -1 +1 @@
1
- [{"__symbolic":"module","version":4,"metadata":{"IconComponent":{"__symbolic":"class","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Component","line":2,"character":1},"arguments":[{"selector":"aup-icon","template":"<ng-container [ngSwitch]=\"prefix\">\n\n <mat-icon *ngSwitchCase=\"'svg'\"\n [svgIcon]=\"suffix\"\n class=\"svgIcon\">\n </mat-icon>\n\n <mat-icon *ngSwitchCase=\"'mat'\">\n {{suffix}}\n </mat-icon>\n\n <div *ngSwitchCase=\"'fab'\"\n class=\"faIconWrapper\">\n <fa-icon [icon]=\"suffix\">\n </fa-icon>\n </div>\n\n <mat-icon *ngSwitchDefault\n [matTooltip]=\"errorMessage\">\n bug_report\n </mat-icon>\n\n</ng-container>\n\n","styles":[":host{display:inline-flex;width:24px}fa-icon{vertical-align:middle}.faIconWrapper{text-align:center;width:24px;height:24px}.svgIcon{width:24px;height:24px}:host(.mat-chip-remove) mat-icon{font-size:18px}mat-icon{width:inherit;height:inherit}"]}]}],"members":{"icon":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":15,"character":3}}]}]}}}}]
1
+ [{"__symbolic":"module","version":4,"metadata":{"IconComponent":{"__symbolic":"class","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Component","line":3,"character":1},"arguments":[{"selector":"aup-icon","template":"<ng-container [ngSwitch]=\"prefix\">\n\n <mat-icon *ngSwitchCase=\"iconPrefix.SVG\"\n [svgIcon]=\"suffix\"\n class=\"svgIcon\">\n </mat-icon>\n\n <mat-icon *ngSwitchCase=\"iconPrefix.MATERIAL\">\n {{suffix}}\n </mat-icon>\n\n <div *ngSwitchCase=\"iconPrefix.FONT_AWESOME\"\n class=\"faIconWrapper\">\n <fa-icon [icon]=\"suffix\">\n </fa-icon>\n </div>\n\n <mat-icon *ngSwitchDefault\n [matTooltip]=\"errorMessage\">\n bug_report\n </mat-icon>\n\n</ng-container>\n\n","styles":[":host{display:inline-flex;width:24px}fa-icon{vertical-align:middle}.faIconWrapper{text-align:center;width:24px;height:24px}.svgIcon{width:24px;height:24px}:host(.mat-chip-remove) mat-icon{font-size:18px}mat-icon{width:inherit;height:inherit}"]}]}],"members":{"icon":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":19,"character":3}}]}]}}}}]
@@ -5,11 +5,27 @@ export * from "./components.module";
5
5
  export * from "./disposable-component";
6
6
  export * from "./focusable.component";
7
7
  export * from "./resize-aware.component";
8
+ export * from "./track-by";
8
9
  export * from "./card-container/card-container.component";
10
+ export * from "./commands/command-face";
11
+ export * from "./commands/flex.component";
12
+ export * from "./commands/separator.component";
13
+ export * from "./commands/command/command.component";
14
+ export * from "./commands/command-face/command-face.component";
15
+ export * from "./commands/group/command-group";
16
+ export * from "./commands/group/more-menu.component";
17
+ export * from "./commands/group/popup-menu.component";
18
+ export * from "./commands/group/registration";
19
+ export * from "./commands/group/view-data";
20
+ export * from "./commands/group/command-group/command-group.component";
21
+ export * from "./commands/group/command-group-menu-renderer/command-group-menu-renderer.component";
22
+ export * from "./commands/group/command-group-renderer/command-group-renderer.component";
23
+ export * from "./commands/group/tool-bar/tool-bar.component";
9
24
  export * from "./focus-container/focus-container.component";
10
25
  export * from "./forms/abstract-input.component";
11
26
  export * from "./forms/abstract-list-input.component";
12
27
  export * from "./forms/abstract-value-input.component";
28
+ export * from "./forms/autocomplete-input/autocomplete-input.component";
13
29
  export * from "./forms/checkbox-input/checkbox-input.component";
14
30
  export * from "./forms/multiple-select-input/multiple-select-input.component";
15
31
  export * from "./forms/number-input/number-input.component";
@@ -35,6 +51,7 @@ export * from "./table/select-cell-renderer/select-cell-renderer.component";
35
51
  export * from "./table/select-header-cell-renderer/select-header-cell-renderer.component";
36
52
  export * from "./table/table-cell-renderer/table-cell-renderer.component";
37
53
  export * from "./table/table-header-cell-renderer/table-header-cell-renderer.component";
54
+ export * from "./table/table-row-menu/table-row-menu.component";
38
55
  export * from "./types/bounds.class";
39
56
  export * from "./types/dimension.class";
40
57
  export * from "./types/point.class";
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"ng://@coolon/angular-ui-powerups/","sources":["lib/components/index.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,cAAc,qBAAqB,CAAC;AACpC,cAAc,wBAAwB,CAAC;AACvC,cAAc,uBAAuB,CAAC;AACtC,cAAc,0BAA0B,CAAC;AACzC,cAAc,2CAA2C,CAAC;AAC1D,cAAc,6CAA6C,CAAC;AAC5D,cAAc,kCAAkC,CAAC;AACjD,cAAc,uCAAuC,CAAC;AACtD,cAAc,wCAAwC,CAAC;AACvD,cAAc,iDAAiD,CAAC;AAChE,cAAc,+DAA+D,CAAC;AAC9E,cAAc,6CAA6C,CAAC;AAC5D,cAAc,iDAAiD,CAAC;AAChE,cAAc,6CAA6C,CAAC;AAC5D,cAAc,6CAA6C,CAAC;AAC5D,cAAc,yCAAyC,CAAC;AACxD,cAAc,uBAAuB,CAAC;AACtC,cAAc,uBAAuB,CAAC;AACtC,cAAc,+CAA+C,CAAC;AAC9D,cAAc,2CAA2C,CAAC;AAC1D,cAAc,qCAAqC,CAAC;AAEpD,cAAc,yBAAyB,CAAC;AAExC,cAAc,sBAAsB,CAAC;AAErC,cAAc,sBAAsB,CAAC;AAErC,cAAc,qBAAqB,CAAC;AACpC,cAAc,yBAAyB,CAAC;AACxC,cAAc,mDAAmD,CAAC;AAClE,cAAc,+DAA+D,CAAC;AAC9E,cAAc,6EAA6E,CAAC;AAC5F,cAAc,uDAAuD,CAAC;AACtE,cAAc,6DAA6D,CAAC;AAC5E,cAAc,2EAA2E,CAAC;AAC1F,cAAc,2DAA2D,CAAC;AAC1E,cAAc,yEAAyE,CAAC;AACxF,cAAc,sBAAsB,CAAC;AACrC,cAAc,yBAAyB,CAAC;AACxC,cAAc,qBAAqB,CAAC;AACpC,cAAc,+DAA+D,CAAC","sourcesContent":["/**\n * @file Automatically generated by barrelsby.\n */\n\nexport * from \"./components.module\";\nexport * from \"./disposable-component\";\nexport * from \"./focusable.component\";\nexport * from \"./resize-aware.component\";\nexport * from \"./card-container/card-container.component\";\nexport * from \"./focus-container/focus-container.component\";\nexport * from \"./forms/abstract-input.component\";\nexport * from \"./forms/abstract-list-input.component\";\nexport * from \"./forms/abstract-value-input.component\";\nexport * from \"./forms/checkbox-input/checkbox-input.component\";\nexport * from \"./forms/multiple-select-input/multiple-select-input.component\";\nexport * from \"./forms/number-input/number-input.component\";\nexport * from \"./forms/password-input/password-input.component\";\nexport * from \"./forms/select-input/select-input.component\";\nexport * from \"./forms/string-input/string-input.component\";\nexport * from \"./forms/text-input/text-input.component\";\nexport * from \"./icon/icon.component\";\nexport * from \"./noop/noop.component\";\nexport * from \"./scroll-container/scroll-container.component\";\nexport * from \"./section-header/section-header.component\";\nexport * from \"./switch-case/switch-case.component\";\nexport * from \"./table/cell-editors\";\nexport * from \"./table/cell-portal-ref\";\nexport * from \"./table/cell-renderer\";\nexport * from \"./table/column-model\";\nexport * from \"./table/column-text-properties\";\nexport * from \"./table/edit-session\";\nexport * from \"./table/table-def\";\nexport * from \"./table/table-model\";\nexport * from \"./table/table.component\";\nexport * from \"./table/column-template/column-template.directive\";\nexport * from \"./table/default-cell-renderer/default-cell-renderer.component\";\nexport * from \"./table/default-header-cell-renderer/default-header-cell-renderer.component\";\nexport * from \"./table/edit-row-controls/edit-row-controls.component\";\nexport * from \"./table/select-cell-renderer/select-cell-renderer.component\";\nexport * from \"./table/select-header-cell-renderer/select-header-cell-renderer.component\";\nexport * from \"./table/table-cell-renderer/table-cell-renderer.component\";\nexport * from \"./table/table-header-cell-renderer/table-header-cell-renderer.component\";\nexport * from \"./types/bounds.class\";\nexport * from \"./types/dimension.class\";\nexport * from \"./types/point.class\";\nexport * from \"./vertical-focus-container/vertical-focus-container.component\";\n"]}
1
+ {"version":3,"file":"index.js","sourceRoot":"ng://@coolon/angular-ui-powerups/","sources":["lib/components/index.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,cAAc,qBAAqB,CAAC;AACpC,cAAc,wBAAwB,CAAC;AACvC,cAAc,uBAAuB,CAAC;AACtC,cAAc,0BAA0B,CAAC;AACzC,cAAc,YAAY,CAAC;AAC3B,cAAc,2CAA2C,CAAC;AAC1D,cAAc,yBAAyB,CAAC;AACxC,cAAc,2BAA2B,CAAC;AAC1C,cAAc,gCAAgC,CAAC;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+D,CAAC","sourcesContent":["/**\n * @file Automatically generated by barrelsby.\n */\n\nexport * from \"./components.module\";\nexport * from \"./disposable-component\";\nexport * from \"./focusable.component\";\nexport * from \"./resize-aware.component\";\nexport * from \"./track-by\";\nexport * from \"./card-container/card-container.component\";\nexport * from \"./commands/command-face\";\nexport * from \"./commands/flex.component\";\nexport * from \"./commands/separator.component\";\nexport * from \"./commands/command/command.component\";\nexport * from \"./commands/command-face/command-face.component\";\nexport * from \"./commands/group/command-group\";\nexport * from \"./commands/group/more-menu.component\";\nexport * from \"./commands/group/popup-menu.component\";\nexport * from \"./commands/group/registration\";\nexport * from \"./commands/group/view-data\";\nexport * from \"./commands/group/command-group/command-group.component\";\nexport * from \"./commands/group/command-group-menu-renderer/command-group-menu-renderer.component\";\nexport * from \"./commands/group/command-group-renderer/command-group-renderer.component\";\nexport * from \"./commands/group/tool-bar/tool-bar.component\";\nexport * from \"./focus-container/focus-container.component\";\nexport * from \"./forms/abstract-input.component\";\nexport * from \"./forms/abstract-list-input.component\";\nexport * from \"./forms/abstract-value-input.component\";\nexport * from \"./forms/autocomplete-input/autocomplete-input.component\";\nexport * from \"./forms/checkbox-input/checkbox-input.component\";\nexport * from \"./forms/multiple-select-input/multiple-select-input.component\";\nexport * from \"./forms/number-input/number-input.component\";\nexport * from \"./forms/password-input/password-input.component\";\nexport * from \"./forms/select-input/select-input.component\";\nexport * from \"./forms/string-input/string-input.component\";\nexport * from \"./forms/text-input/text-input.component\";\nexport * from \"./icon/icon.component\";\nexport * from \"./noop/noop.component\";\nexport * from \"./scroll-container/scroll-container.component\";\nexport * from \"./section-header/section-header.component\";\nexport * from \"./switch-case/switch-case.component\";\nexport * from \"./table/cell-editors\";\nexport * from \"./table/cell-portal-ref\";\nexport * from \"./table/cell-renderer\";\nexport * from \"./table/column-model\";\nexport * from \"./table/column-text-properties\";\nexport * from \"./table/edit-session\";\nexport * from \"./table/mutable-cell-renderer\";\nexport * from \"./table/table-def\";\nexport * from \"./table/table-model\";\nexport * from \"./table/table.component\";\nexport * from \"./table/column-template/column-template.directive\";\nexport * from \"./table/default-cell-renderer/default-cell-renderer.component\";\nexport * from \"./table/default-header-cell-renderer/default-header-cell-renderer.component\";\nexport * from \"./table/edit-row-controls/edit-row-controls.component\";\nexport * from \"./table/select-cell-renderer/select-cell-renderer.component\";\nexport * from \"./table/select-header-cell-renderer/select-header-cell-renderer.component\";\nexport * from \"./table/table-cell-renderer/table-cell-renderer.component\";\nexport * from \"./table/table-header-cell-renderer/table-header-cell-renderer.component\";\nexport * from \"./table/table-row-menu/table-row-menu.component\";\nexport * from \"./types/bounds.class\";\nexport * from \"./types/dimension.class\";\nexport * from \"./types/point.class\";\nexport * from \"./vertical-focus-container/vertical-focus-container.component\";\n"]}
@@ -1 +1 @@
1
- [{"__symbolic":"module","version":4,"metadata":{},"exports":[{"from":"./components.module"},{"from":"./disposable-component"},{"from":"./focusable.component"},{"from":"./resize-aware.component"},{"from":"./card-container/card-container.component"},{"from":"./focus-container/focus-container.component"},{"from":"./forms/abstract-input.component"},{"from":"./forms/abstract-list-input.component"},{"from":"./forms/abstract-value-input.component"},{"from":"./forms/checkbox-input/checkbox-input.component"},{"from":"./forms/multiple-select-input/multiple-select-input.component"},{"from":"./forms/number-input/number-input.component"},{"from":"./forms/password-input/password-input.component"},{"from":"./forms/select-input/select-input.component"},{"from":"./forms/string-input/string-input.component"},{"from":"./forms/text-input/text-input.component"},{"from":"./icon/icon.component"},{"from":"./noop/noop.component"},{"from":"./scroll-container/scroll-container.component"},{"from":"./section-header/section-header.component"},{"from":"./switch-case/switch-case.component"},{"from":"./table/cell-editors"},{"from":"./table/cell-portal-ref"},{"from":"./table/cell-renderer"},{"from":"./table/column-model"},{"from":"./table/column-text-properties"},{"from":"./table/edit-session"},{"from":"./table/table-def"},{"from":"./table/table-model"},{"from":"./table/table.component"},{"from":"./table/column-template/column-template.directive"},{"from":"./table/default-cell-renderer/default-cell-renderer.component"},{"from":"./table/default-header-cell-renderer/default-header-cell-renderer.component"},{"from":"./table/edit-row-controls/edit-row-controls.component"},{"from":"./table/select-cell-renderer/select-cell-renderer.component"},{"from":"./table/select-header-cell-renderer/select-header-cell-renderer.component"},{"from":"./table/table-cell-renderer/table-cell-renderer.component"},{"from":"./table/table-header-cell-renderer/table-header-cell-renderer.component"},{"from":"./types/bounds.class"},{"from":"./types/dimension.class"},{"from":"./types/point.class"},{"from":"./vertical-focus-container/vertical-focus-container.component"}]}]
1
+ [{"__symbolic":"module","version":4,"metadata":{},"exports":[{"from":"./components.module"},{"from":"./disposable-component"},{"from":"./focusable.component"},{"from":"./resize-aware.component"},{"from":"./track-by"},{"from":"./card-container/card-container.component"},{"from":"./commands/command-face"},{"from":"./commands/flex.component"},{"from":"./commands/separator.component"},{"from":"./commands/command/command.component"},{"from":"./commands/command-face/command-face.component"},{"from":"./commands/group/command-group"},{"from":"./commands/group/more-menu.component"},{"from":"./commands/group/popup-menu.component"},{"from":"./commands/group/registration"},{"from":"./commands/group/view-data"},{"from":"./commands/group/command-group/command-group.component"},{"from":"./commands/group/command-group-menu-renderer/command-group-menu-renderer.component"},{"from":"./commands/group/command-group-renderer/command-group-renderer.component"},{"from":"./commands/group/tool-bar/tool-bar.component"},{"from":"./focus-container/focus-container.component"},{"from":"./forms/abstract-input.component"},{"from":"./forms/abstract-list-input.component"},{"from":"./forms/abstract-value-input.component"},{"from":"./forms/autocomplete-input/autocomplete-input.component"},{"from":"./forms/checkbox-input/checkbox-input.component"},{"from":"./forms/multiple-select-input/multiple-select-input.component"},{"from":"./forms/number-input/number-input.component"},{"from":"./forms/password-input/password-input.component"},{"from":"./forms/select-input/select-input.component"},{"from":"./forms/string-input/string-input.component"},{"from":"./forms/text-input/text-input.component"},{"from":"./icon/icon.component"},{"from":"./noop/noop.component"},{"from":"./scroll-container/scroll-container.component"},{"from":"./section-header/section-header.component"},{"from":"./switch-case/switch-case.component"},{"from":"./table/cell-editors"},{"from":"./table/cell-portal-ref"},{"from":"./table/cell-renderer"},{"from":"./table/column-model"},{"from":"./table/column-text-properties"},{"from":"./table/edit-session"},{"from":"./table/mutable-cell-renderer"},{"from":"./table/table-def"},{"from":"./table/table-model"},{"from":"./table/table.component"},{"from":"./table/column-template/column-template.directive"},{"from":"./table/default-cell-renderer/default-cell-renderer.component"},{"from":"./table/default-header-cell-renderer/default-header-cell-renderer.component"},{"from":"./table/edit-row-controls/edit-row-controls.component"},{"from":"./table/select-cell-renderer/select-cell-renderer.component"},{"from":"./table/select-header-cell-renderer/select-header-cell-renderer.component"},{"from":"./table/table-cell-renderer/table-cell-renderer.component"},{"from":"./table/table-header-cell-renderer/table-header-cell-renderer.component"},{"from":"./table/table-row-menu/table-row-menu.component"},{"from":"./types/bounds.class"},{"from":"./types/dimension.class"},{"from":"./types/point.class"},{"from":"./vertical-focus-container/vertical-focus-container.component"}]}]
@@ -12,6 +12,7 @@ import { SelectHeaderCellRendererComponent } from './select-header-cell-renderer
12
12
  const noop = () => {
13
13
  };
14
14
  const ɵ0 = noop;
15
+ const CELL_RENDERER_COMPONENT_ROW_CACHE = Symbol("aup-cell-renderer:row-data-cache");
15
16
  export class ColumnModel {
16
17
  constructor(columnId, defaults) {
17
18
  this.columnId = columnId;
@@ -125,6 +126,34 @@ export class PropertyColumnModel extends ColumnModel {
125
126
  }));
126
127
  return this;
127
128
  }
129
+ mutableCellRenderer(componentType, options) {
130
+ this.configureCellRenderer(new ComponentCellRendererPortalRef(componentType, (component, rowData, firstTime) => {
131
+ // keep a local copy most recent row value so it's available to teh
132
+ // edit callback without having to add/remove subscribers all the time.
133
+ component[CELL_RENDERER_COMPONENT_ROW_CACHE] = rowData.row;
134
+ let disableEditCallback = false;
135
+ if (firstTime) {
136
+ if (_.isFunction(options === null || options === void 0 ? void 0 : options.onComponentInit)) {
137
+ options.onComponentInit(component);
138
+ }
139
+ // install our edit callback
140
+ component.onValueEdited((is, was) => {
141
+ if (!disableEditCallback) {
142
+ options.onValueEdit(component[CELL_RENDERER_COMPONENT_ROW_CACHE], is, was);
143
+ }
144
+ });
145
+ }
146
+ // now push the value the component and disable the callback just incase the component misbehaves
147
+ // and fires a value change during the operation.
148
+ disableEditCallback = true;
149
+ component.value = rowData.row[this.property];
150
+ disableEditCallback = false;
151
+ if (!_.isFunction(options) && _.isFunction(options === null || options === void 0 ? void 0 : options.onRowUpdate)) {
152
+ options.onRowUpdate(component, rowData.row);
153
+ }
154
+ }));
155
+ return this;
156
+ }
128
157
  cellEditor(editor, validatorsOrInitialiser, onComponentInit) {
129
158
  const validators = Array.isArray(validatorsOrInitialiser) ? validatorsOrInitialiser : undefined;
130
159
  const initialiser = _.isFunction(validatorsOrInitialiser) ? validatorsOrInitialiser : onComponentInit;
@@ -192,9 +221,22 @@ export class CustomValueColumnModel extends ColumnModel {
192
221
  this.getValue = getValue;
193
222
  this.cellRenderer(DefaultCellRendererComponent);
194
223
  }
195
- cellRenderer(componentType) {
196
- this.configureCellRenderer(new ComponentCellRendererPortalRef(componentType, (component, rowData) => {
224
+ cellRenderer(componentType, onComponentInitOrOptions) {
225
+ this.configureCellRenderer(new ComponentCellRendererPortalRef(componentType, (component, rowData, firstTime) => {
226
+ if (firstTime) {
227
+ if (_.isFunction(onComponentInitOrOptions)) {
228
+ onComponentInitOrOptions(component);
229
+ }
230
+ else {
231
+ if (_.isFunction(onComponentInitOrOptions === null || onComponentInitOrOptions === void 0 ? void 0 : onComponentInitOrOptions.onComponentInit)) {
232
+ onComponentInitOrOptions.onComponentInit(component);
233
+ }
234
+ }
235
+ }
197
236
  component.value = this.getValue(rowData.row);
237
+ if (!_.isFunction(onComponentInitOrOptions) && _.isFunction(onComponentInitOrOptions === null || onComponentInitOrOptions === void 0 ? void 0 : onComponentInitOrOptions.onRowUpdate)) {
238
+ onComponentInitOrOptions.onRowUpdate(component, rowData.row);
239
+ }
198
240
  }));
199
241
  return this;
200
242
  }
@@ -1 +1 @@
1
- {"version":3,"file":"column-model.js","sourceRoot":"ng://@coolon/angular-ui-powerups/","sources":["lib/components/table/column-model.ts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ACd,CAAC;IAED,SAAS,CAAC,GAAQ;QAChB,IAAI,CAAC,cAAc,CAAC,aAAa,CAAC,OAAO,CAAC,GAAG,CAAC,CAAC;IACjD,CAAC;CACF","sourcesContent":["import { ComponentType } from '@angular/cdk/overlay';\nimport { TemplateRef, ViewContainerRef } from '@angular/core';\nimport {\n Command,\n DirtyTrackingForm,\n MultipleSelectionModel,\n SelectionModel,\n Types,\n UnaryCommand,\n Validator\n} from '@coolon/pectin';\nimport { assert } from '@coolon/typescript-utilities';\nimport { Memoize } from '@typescript-plus/fast-memoize-decorator/dist/src';\nimport _ from 'lodash';\nimport { CellEditorComponent, CellListEditorComponent } from './cell-editors';\nimport {\n CellEditorPortalRef,\n CellHeaderPortalRef,\n CellRendererPortalRef,\n ComponentCellRendererPortalRef,\n TemplateCellRendererPortalRef\n} from './cell-portal-ref';\nimport { ColumnTextProperties } from './column-text-properties';\nimport { DefaultCellRendererComponent } from './default-cell-renderer/default-cell-renderer.component';\nimport { DefaultHeaderCellRendererComponent } from './default-header-cell-renderer/default-header-cell-renderer.component';\nimport { EditRowControls } from './edit-row-controls/edit-row-controls.component';\nimport { EditSession } from './edit-session';\nimport { SelectCellRendererComponent } from './select-cell-renderer/select-cell-renderer.component';\nimport { SelectHeaderCellRendererComponent } from './select-header-cell-renderer/select-header-cell-renderer.component';\nimport { TableCellRendererComponent } from './table-cell-renderer/table-cell-renderer.component';\nimport { TableHeaderCellRendererComponent } from './table-header-cell-renderer/table-header-cell-renderer.component';\n\n\nconst noop = () => {\n};\n\nexport interface RowData<Row> {\n row: Row;\n editSession?: EditSession<Row>;\n editRowCommand: Command<void>;\n}\n\n\nexport class ColumnModel<Row> {\n\n private _columnTextProperties: ColumnTextProperties;\n\n private _columnHeaderPortalRef: CellHeaderPortalRef<Row, any>;\n private _cellRendererPortalRef: CellRendererPortalRef<Row, any>;\n private _cellEditorPortalRef: CellEditorPortalRef<Row, any>;\n\n private _selectRowOnClick = undefined;\n\n constructor(readonly columnId: string, private defaults: ColumnModel.Defaults) {\n this.cellHeaderRenderer(DefaultHeaderCellRendererComponent, (component, column) => {\n component.headerText = column.getHeaderText();\n });\n }\n\n @Memoize()\n getHeaderText(): string {\n return this.getColumnTextProperties()?.headerText() || this.getDefaultHeaderText();\n }\n\n protected getDefaultHeaderText() {\n return this.columnId;\n }\n\n @Memoize()\n getColumnTextProperties(): ColumnTextProperties {\n return this._columnTextProperties || this.defaults.getColumnTextProperties(this);\n }\n\n textProperties(columnTextProperties: ColumnTextProperties): this {\n this._columnTextProperties = columnTextProperties;\n return this;\n }\n\n protected configureHeaderRenderer<C>(config: CellHeaderPortalRef<Row, any>): void {\n this._columnHeaderPortalRef = config;\n }\n\n protected configureCellRenderer<C>(config: CellRendererPortalRef<Row, any>): void {\n this._cellRendererPortalRef = config;\n }\n\n protected configureCellEditor<E>(cellEditor: CellEditorPortalRef<Row, E>): void {\n this._cellEditorPortalRef = cellEditor;\n }\n\n cellHeaderRenderer<C>(componentType: ComponentType<C>, initialiser: (component: C, column: ColumnModel<Row>) => void): this {\n this.configureHeaderRenderer(new CellHeaderPortalRef<Row, C>(componentType, initialiser));\n return this;\n }\n\n hasEditorPortal() {\n return !!this._cellEditorPortalRef;\n }\n\n attachHeaderCell(host: any) {\n this._columnHeaderPortalRef.initialiseHost(host, this);\n }\n\n attachCell(host: any) {\n this._cellRendererPortalRef.initialiseHost(host, this);\n if (this.hasEditorPortal()) {\n this._cellEditorPortalRef.initialiseHost(host, this);\n }\n }\n\n onHeaderAttached(host: TableHeaderCellRendererComponent, component: any) {\n this._columnHeaderPortalRef.onPortalAttached(host, component);\n }\n\n onRendererAttached(host: TableCellRendererComponent<Row>, component: any) {\n this._cellRendererPortalRef.onPortalAttached(host, component);\n }\n\n // @Trace()\n onEditorAttached(host: TableCellRendererComponent<Row>, component: any) {\n this._cellEditorPortalRef.onPortalAttached(host, component);\n }\n\n updatePortalContent(host: TableCellRendererComponent<Row>) {\n this._cellRendererPortalRef.pushState(host);\n }\n\n protected selectRowOnClick(selectOnRowClick: boolean): this {\n this._selectRowOnClick = selectOnRowClick;\n return this;\n }\n\n isRowSelectionEnabled(): boolean | undefined {\n return this._selectRowOnClick;\n }\n\n isRowSelectionExplicitlyEnabled(): boolean {\n return this._selectRowOnClick === true;\n }\n\n isRowSelectionExplicitlyDisabled(): boolean {\n return this._selectRowOnClick === false;\n }\n}\n\nexport namespace ColumnModel {\n export interface Defaults {\n getColumnTextProperties(columnModel: ColumnModel<any>): ColumnTextProperties;\n }\n}\n\nexport interface CellEditorOptions<V, C> { //extends CellRendererOptions<E> {\n validators?: Validator<V>[];\n\n initialiseComponent?(component: C);\n}\n\n\nexport type OnComponentInit<C> = (component: C) => void;\n\nexport interface CellRendererOptions<Row, E> {\n onComponentInit?: (component: E) => void;\n onRowUpdate?: (component: E, row: Row) => void;\n}\n\nexport class PropertyColumnModel<Row, P extends Types.ValuePropertiesOf<Row>> extends ColumnModel<Row> {\n\n\n private _format: (value: Row[P]) => any = (value) => value;\n\n constructor(id: string, readonly property: P, defaults: ColumnModel.Defaults) {\n super(id, defaults);\n this.cellRenderer(DefaultCellRendererComponent);\n }\n\n cellRenderer<E extends { value: Row[P] }>(componentType: ComponentType<E>, options?: CellRendererOptions<Row, E>): this\n cellRenderer<E extends { value: Row[P] }>(componentType: ComponentType<E>, onComponentInit?: OnComponentInit<E>): this\n cellRenderer<E extends { value: Row[P] }>(componentType: ComponentType<E>, onComponentInitOrOptions?: CellRendererOptions<Row, E> | OnComponentInit<E>): this {\n this.configureCellRenderer(new ComponentCellRendererPortalRef(componentType, (component, rowData, firstTime) => {\n if (firstTime) {\n if (_.isFunction(onComponentInitOrOptions)) {\n onComponentInitOrOptions(component);\n } else {\n if (_.isFunction(onComponentInitOrOptions?.onComponentInit)) {\n onComponentInitOrOptions.onComponentInit(component);\n }\n }\n }\n component.value = this._format(rowData.row[this.property]);\n\n if (!_.isFunction(onComponentInitOrOptions) && _.isFunction(onComponentInitOrOptions?.onRowUpdate)) {\n onComponentInitOrOptions.onRowUpdate(component, rowData.row);\n }\n\n }));\n return this;\n }\n\n cellEditor<E extends CellEditorComponent<Row[P]>>(editor: ComponentType<E>, validators?: Validator<Row[P]>[], initialiseComponent?: (component: E) => void): this\n cellEditor<E extends CellEditorComponent<Row[P]>>(editor: ComponentType<E>, initialiseComponent?: (component: E) => void): this\n cellEditor<E extends CellEditorComponent<Row[P]>>(editor: ComponentType<E>, validatorsOrInitialiser?: Validator<Row[P]>[] | ((component: E) => void), onComponentInit?: (component: E) => void): this {\n const validators = Array.isArray(validatorsOrInitialiser) ? validatorsOrInitialiser : undefined;\n const initialiser = _.isFunction(validatorsOrInitialiser) ? validatorsOrInitialiser : onComponentInit;\n this.configureCellEditor(new CellEditorPortalRef(editor, (component: E, editSession: EditSession<Row>) => {\n const formValueModel = editSession.form.pluck(this.property);\n if (validators) {\n formValueModel.validateUsing(validators);\n }\n component.valueModel = formValueModel;\n if (initialiser) {\n initialiser(component);\n }\n }));\n return this;\n }\n\n format(formatter: (value: Row[P]) => any): this {\n assert.isFunction(formatter);\n this._format = formatter;\n return this;\n }\n\n public selectRowOnClick(selectOnRowClick: boolean): this {\n return super.selectRowOnClick(selectOnRowClick);\n }\n\n}\n\nexport class ListPropertyColumnModel<Row, P extends Types.ArrayPropertiesOf<Row>> extends ColumnModel<Row> {\n\n private _format: (value: Types.ArrayElementType<Row, P>[]) => any = (value) => value.map(v => v?.toString()).join(', ');\n\n constructor(id: string, readonly property: P, defaults: ColumnModel.Defaults) {\n super(id, defaults);\n this.cellRenderer(DefaultCellRendererComponent);\n }\n\n cellRenderer(componentType: ComponentType<{ value: Types.ArrayElementType<Row, P>[] }>): this {\n this.configureCellRenderer(new ComponentCellRendererPortalRef(componentType, (component, rowData) => {\n component.value = this._format(rowData.row[this.property]);\n }));\n return this;\n }\n\n cellEditor<C extends CellListEditorComponent<Types.ArrayElementType<Row, P>>>(editor: ComponentType<C>, validators?: Validator<Types.ArrayElementType<Row, P>[]>[], initialiseComponent?: (component: C) => void): this\n cellEditor<C extends CellListEditorComponent<Types.ArrayElementType<Row, P>>>(editor: ComponentType<C>, initialiseComponent?: (component: C) => void): this\n cellEditor<C extends CellListEditorComponent<Types.ArrayElementType<Row, P>>>(editor: ComponentType<C>, validatorsOrInitialiser?: Validator<Types.ArrayElementType<Row, P>[]>[] | ((component: C) => void), initialiseComponent?: (component: C) => void): this {\n const validators = Array.isArray(validatorsOrInitialiser) ? validatorsOrInitialiser : undefined;\n const initialiser = _.isFunction(validatorsOrInitialiser) ? validatorsOrInitialiser : initialiseComponent;\n\n this.configureCellEditor(new CellEditorPortalRef(editor, (component: C, editSession: EditSession<Row>) => {\n const formListModel = editSession.form.pluckList(this.property);\n if (validators) {\n formListModel.validateUsing(validators);\n }\n component.listModel = formListModel;\n if (initialiser) {\n initialiser(component);\n }\n }));\n return this;\n }\n\n format(formatter: (value: Types.ArrayElementType<Row, P>[]) => any): this {\n assert.isFunction(formatter);\n this._format = formatter;\n return this;\n }\n\n public selectRowOnClick(selectOnRowClick: boolean): this {\n return super.selectRowOnClick(selectOnRowClick);\n }\n\n}\n\nexport class CustomValueColumnModel<Row, V> extends ColumnModel<Row> {\n constructor(columnId: string, defaults: ColumnModel.Defaults, private getValue: (row: Row) => V) {\n super(columnId, defaults);\n this.cellRenderer(DefaultCellRendererComponent);\n }\n\n cellRenderer(componentType: ComponentType<{ value: V }>): this {\n this.configureCellRenderer(new ComponentCellRendererPortalRef(componentType, (component, rowData) => {\n component.value = this.getValue(rowData.row);\n }));\n return this;\n }\n\n public selectRowOnClick(selectOnRowClick: boolean): this {\n return super.selectRowOnClick(selectOnRowClick);\n }\n\n}\n\nexport class EditorControlColumnModel<Row> extends ColumnModel<Row> {\n\n constructor(columnId: string, saveCommand: UnaryCommand<DirtyTrackingForm<Row>, boolean>, defaults: ColumnModel.Defaults) {\n super(columnId, defaults);\n this.cellRenderer(EditRowControls);\n }\n\n cellRenderer(componentType: ComponentType<{ row: Row, editSession: EditSession<Row>, editRowCommand: Command<void> }>): this {\n this.configureCellRenderer(new ComponentCellRendererPortalRef(componentType, (component, rowData: RowData<Row>) => {\n component.row = rowData.row;\n component.editSession = rowData.editSession;\n component.editRowCommand = rowData.editRowCommand;\n }));\n return this;\n }\n\n protected getDefaultHeaderText(): string {\n return '';\n }\n}\n\nexport class CustomTemplateColumnModel<Row> extends ColumnModel<Row> {\n private readonly config = new TemplateCellRendererPortalRef<Row>();\n\n constructor(columnId: string, defaults: ColumnModel.Defaults) {\n super(columnId, defaults);\n this.configureCellRenderer(this.config);\n }\n\n setTemplate(templateRef: TemplateRef<any>, viewContainer: ViewContainerRef, fillCell: boolean, padChild: boolean) {\n this.config.registerPortal(templateRef, viewContainer, fillCell, padChild);\n }\n\n public selectRowOnClick(selectOnRowClick: boolean): this {\n return super.selectRowOnClick(selectOnRowClick);\n }\n\n}\n\nexport class SelectionColumnModel<Row> extends ColumnModel<Row> {\n\n private _enableHeaderControls = true;\n\n constructor(columnId: string, defaults: ColumnModel.Defaults, private readonly selectionModel: SelectionModel<Row>) {\n super(columnId, defaults);\n this.selectOnRowClick(false);\n if (selectionModel instanceof MultipleSelectionModel) {\n this.cellHeaderRenderer(SelectHeaderCellRendererComponent, (component) => {\n component.selectionModel = selectionModel;\n component.enableHeaderControls = this._enableHeaderControls;\n });\n }\n this.configureCellRenderer(new ComponentCellRendererPortalRef(SelectCellRendererComponent, (component, rowData: RowData<Row>) => {\n component.row = rowData.row;\n component.selectionModel = selectionModel;\n }));\n }\n\n protected getDefaultHeaderText(): string {\n return '';\n }\n\n isRowSelectionEnabledByDefault(): boolean | undefined {\n return this.isRowSelectionExplicitlyEnabled();\n }\n\n selectOnRowClick(selectOnRowClick: boolean): this {\n // note we're using different method name as the selection column treats this\n // state as the default for all columns.\n return super.selectRowOnClick(selectOnRowClick);\n }\n\n enableHeaderControls(enable: boolean): this {\n this._enableHeaderControls = enable;\n return this;\n }\n\n selectRow(row: Row) {\n this.selectionModel.selectCommand.execute(row);\n }\n}\n\n\n"]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AoB,GAAG,IAAI,CAAC,qBAAqB,CAAC;YAC9D,CAAC,CAAC,CAAC;SACJ;QACD,IAAI,CAAC,qBAAqB,CAAC,IAAI,8BAA8B,CAAC,2BAA2B,EAAE,CAAC,SAAS,EAAE,OAAqB,EAAE,EAAE;YAC9H,SAAS,CAAC,GAAG,GAAG,OAAO,CAAC,GAAG,CAAC;YAC5B,SAAS,CAAC,cAAc,GAAG,cAAc,CAAC;QAC5C,CAAC,CAAC,CAAC,CAAC;IACN,CAAC;IAES,oBAAoB;QAC5B,OAAO,EAAE,CAAC;IACZ,CAAC;IAED,8BAA8B;QAC5B,OAAO,IAAI,CAAC,+BAA+B,EAAE,CAAC;IAChD,CAAC;IAED,gBAAgB,CAAC,gBAAyB;QACxC,6EAA6E;QAC7E,wCAAwC;QACxC,OAAO,KAAK,CAAC,gBAAgB,CAAC,gBAAgB,CAAC,CAAC;IAClD,CAAC;IAED,oBAAoB,CAAC,MAAe;QAClC,IAAI,CAAC,qBAAqB,GAAG,MAAM,CAAC;QACpC,OAAO,IAAI,CAAC;IACd,CAAC;IAED,SAAS,CAAC,GAAQ;QAChB,IAAI,CAAC,cAAc,CAAC,aAAa,CAAC,OAAO,CAAC,GAAG,CAAC,CAAC;IACjD,CAAC;CACF","sourcesContent":["import { ComponentType } from '@angular/cdk/overlay';\nimport { TemplateRef, ViewContainerRef } from '@angular/core';\nimport {\n Command,\n DirtyTrackingForm,\n Disposable,\n MultipleSelectionModel,\n SelectionModel,\n Types,\n UnaryCommand,\n Validator\n} from '@coolon/pectin';\nimport { assert } from '@coolon/typescript-utilities';\nimport { Memoize } from '@typescript-plus/fast-memoize-decorator/dist/src';\nimport _ from 'lodash';\nimport { CellEditorComponent, CellListEditorComponent } from './cell-editors';\nimport {\n CellEditorPortalRef,\n CellHeaderPortalRef,\n CellRendererPortalRef,\n ComponentCellRendererPortalRef,\n TemplateCellRendererPortalRef\n} from './cell-portal-ref';\nimport { CellRenderer } from './cell-renderer';\nimport { ColumnTextProperties } from './column-text-properties';\nimport { DefaultCellRendererComponent } from './default-cell-renderer/default-cell-renderer.component';\nimport { DefaultHeaderCellRendererComponent } from './default-header-cell-renderer/default-header-cell-renderer.component';\nimport { EditRowControls } from './edit-row-controls/edit-row-controls.component';\nimport { EditSession } from './edit-session';\nimport { MutableCellRenderer } from './mutable-cell-renderer';\nimport { SelectCellRendererComponent } from './select-cell-renderer/select-cell-renderer.component';\nimport { SelectHeaderCellRendererComponent } from './select-header-cell-renderer/select-header-cell-renderer.component';\nimport { TableCellRendererComponent } from './table-cell-renderer/table-cell-renderer.component';\nimport { TableHeaderCellRendererComponent } from './table-header-cell-renderer/table-header-cell-renderer.component';\n\n\nconst noop = () => {\n};\n\nexport interface RowData<Row> {\n row: Row;\n editSession?: EditSession<Row>;\n editRowCommand: Command<void>;\n}\n\nconst CELL_RENDERER_COMPONENT_ROW_CACHE = Symbol(\"aup-cell-renderer:row-data-cache\")\n\nexport type OnComponentInit<C> = (component: C) => void;\n\nexport interface CellRendererOptions<Row, E> {\n onComponentInit?: (component: E) => void;\n onRowUpdate?: (component: E, row: Row) => void;\n}\n\n\nexport interface MutableCellRendererOptions<Row, E, P extends keyof Row> extends CellRendererOptions<Row, E> {\n onValueEdit: (row: Row, is: Row[P], was: Row[P]) => void;\n}\n\nexport class ColumnModel<Row> {\n\n private _columnTextProperties: ColumnTextProperties;\n\n private _columnHeaderPortalRef: CellHeaderPortalRef<Row, any>;\n private _cellRendererPortalRef: CellRendererPortalRef<Row, any>;\n private _cellEditorPortalRef: CellEditorPortalRef<Row, any>;\n\n private _selectRowOnClick = undefined;\n\n constructor(readonly columnId: string, private defaults: ColumnModel.Defaults) {\n this.cellHeaderRenderer(DefaultHeaderCellRendererComponent, (component, column) => {\n component.headerText = column.getHeaderText();\n });\n }\n\n @Memoize()\n getHeaderText(): string {\n return this.getColumnTextProperties()?.headerText() || this.getDefaultHeaderText();\n }\n\n protected getDefaultHeaderText() {\n return this.columnId;\n }\n\n @Memoize()\n getColumnTextProperties(): ColumnTextProperties {\n return this._columnTextProperties || this.defaults.getColumnTextProperties(this);\n }\n\n textProperties(columnTextProperties: ColumnTextProperties): this {\n this._columnTextProperties = columnTextProperties;\n return this;\n }\n\n protected configureHeaderRenderer<C>(config: CellHeaderPortalRef<Row, any>): void {\n this._columnHeaderPortalRef = config;\n }\n\n protected configureCellRenderer<C>(config: CellRendererPortalRef<Row, any>): void {\n this._cellRendererPortalRef = config;\n }\n\n protected configureCellEditor<E>(cellEditor: CellEditorPortalRef<Row, E>): void {\n this._cellEditorPortalRef = cellEditor;\n }\n\n cellHeaderRenderer<C>(componentType: ComponentType<C>, initialiser: (component: C, column: ColumnModel<Row>) => void): this {\n this.configureHeaderRenderer(new CellHeaderPortalRef<Row, C>(componentType, initialiser));\n return this;\n }\n\n hasEditorPortal() {\n return !!this._cellEditorPortalRef;\n }\n\n attachHeaderCell(host: any) {\n this._columnHeaderPortalRef.initialiseHost(host, this);\n }\n\n attachCell(host: any) {\n this._cellRendererPortalRef.initialiseHost(host, this);\n if (this.hasEditorPortal()) {\n this._cellEditorPortalRef.initialiseHost(host, this);\n }\n }\n\n onHeaderAttached(host: TableHeaderCellRendererComponent, component: any) {\n this._columnHeaderPortalRef.onPortalAttached(host, component);\n }\n\n onRendererAttached(host: TableCellRendererComponent<Row>, component: any) {\n this._cellRendererPortalRef.onPortalAttached(host, component);\n }\n\n // @Trace()\n onEditorAttached(host: TableCellRendererComponent<Row>, component: any) {\n this._cellEditorPortalRef.onPortalAttached(host, component);\n }\n\n updatePortalContent(host: TableCellRendererComponent<Row>) {\n this._cellRendererPortalRef.pushState(host);\n }\n\n protected selectRowOnClick(selectOnRowClick: boolean): this {\n this._selectRowOnClick = selectOnRowClick;\n return this;\n }\n\n isRowSelectionEnabled(): boolean | undefined {\n return this._selectRowOnClick;\n }\n\n isRowSelectionExplicitlyEnabled(): boolean {\n return this._selectRowOnClick === true;\n }\n\n isRowSelectionExplicitlyDisabled(): boolean {\n return this._selectRowOnClick === false;\n }\n}\n\nexport namespace ColumnModel {\n export interface Defaults {\n getColumnTextProperties(columnModel: ColumnModel<any>): ColumnTextProperties;\n }\n}\n\n\nexport class PropertyColumnModel<Row, P extends Types.ValuePropertiesOf<Row>> extends ColumnModel<Row> {\n\n\n private _format: (value: Row[P]) => any = (value) => value;\n\n constructor(id: string, readonly property: P, defaults: ColumnModel.Defaults) {\n super(id, defaults);\n this.cellRenderer(DefaultCellRendererComponent);\n }\n\n cellRenderer<E extends CellRenderer<Row[P]>>(componentType: ComponentType<E>, options?: CellRendererOptions<Row, E>): this\n cellRenderer<E extends CellRenderer<Row[P]>>(componentType: ComponentType<E>, onComponentInit?: OnComponentInit<E>): this\n cellRenderer<E extends CellRenderer<Row[P]>>(componentType: ComponentType<E>, onComponentInitOrOptions?: CellRendererOptions<Row, E> | OnComponentInit<E>): this {\n this.configureCellRenderer(new ComponentCellRendererPortalRef(componentType, (component, rowData, firstTime) => {\n if (firstTime) {\n if (_.isFunction(onComponentInitOrOptions)) {\n onComponentInitOrOptions(component);\n } else {\n if (_.isFunction(onComponentInitOrOptions?.onComponentInit)) {\n onComponentInitOrOptions.onComponentInit(component);\n }\n }\n }\n component.value = this._format(rowData.row[this.property]);\n\n if (!_.isFunction(onComponentInitOrOptions) && _.isFunction(onComponentInitOrOptions?.onRowUpdate)) {\n onComponentInitOrOptions.onRowUpdate(component, rowData.row);\n }\n }));\n return this;\n }\n\n\n mutableCellRenderer<E extends MutableCellRenderer<Row[P]>>(componentType: ComponentType<E>, options: MutableCellRendererOptions<Row, E, P>): this {\n\n this.configureCellRenderer(new ComponentCellRendererPortalRef(componentType, (component, rowData, firstTime) => {\n\n // keep a local copy most recent row value so it's available to teh\n // edit callback without having to add/remove subscribers all the time.\n component[CELL_RENDERER_COMPONENT_ROW_CACHE]= rowData.row;\n let disableEditCallback = false;\n\n if (firstTime) {\n if (_.isFunction(options?.onComponentInit)) {\n options.onComponentInit(component);\n }\n // install our edit callback\n component.onValueEdited((is, was) => {\n if (!disableEditCallback) {\n options.onValueEdit(component[CELL_RENDERER_COMPONENT_ROW_CACHE], is, was);\n }\n });\n\n }\n\n // now push the value the component and disable the callback just incase the component misbehaves\n // and fires a value change during the operation.\n disableEditCallback = true;\n component.value = rowData.row[this.property];\n disableEditCallback = false;\n\n if (!_.isFunction(options) && _.isFunction(options?.onRowUpdate)) {\n options.onRowUpdate(component, rowData.row);\n }\n\n }));\n return this;\n }\n\n cellEditor<E extends CellEditorComponent<Row[P]>>(editor: ComponentType<E>, validators?: Validator<Row[P]>[], initialiseComponent?: (component: E) => void): this\n cellEditor<E extends CellEditorComponent<Row[P]>>(editor: ComponentType<E>, initialiseComponent?: (component: E) => void): this\n cellEditor<E extends CellEditorComponent<Row[P]>>(editor: ComponentType<E>, validatorsOrInitialiser?: Validator<Row[P]>[] | ((component: E) => void), onComponentInit?: (component: E) => void): this {\n const validators = Array.isArray(validatorsOrInitialiser) ? validatorsOrInitialiser : undefined;\n const initialiser = _.isFunction(validatorsOrInitialiser) ? validatorsOrInitialiser : onComponentInit;\n this.configureCellEditor(new CellEditorPortalRef(editor, (component: E, editSession: EditSession<Row>) => {\n const formValueModel = editSession.form.pluck(this.property);\n if (validators) {\n formValueModel.validateUsing(validators);\n }\n component.valueModel = formValueModel;\n if (initialiser) {\n initialiser(component);\n }\n }));\n return this;\n }\n\n format(formatter: (value: Row[P]) => any): this {\n assert.isFunction(formatter);\n this._format = formatter;\n return this;\n }\n\n public selectRowOnClick(selectOnRowClick: boolean): this {\n return super.selectRowOnClick(selectOnRowClick);\n }\n\n}\n\nexport class ListPropertyColumnModel<Row, P extends Types.ArrayPropertiesOf<Row>> extends ColumnModel<Row> {\n\n private _format: (value: Types.ArrayElementType<Row, P>[]) => any = (value) => value.map(v => v?.toString()).join(', ');\n\n constructor(id: string, readonly property: P, defaults: ColumnModel.Defaults) {\n super(id, defaults);\n this.cellRenderer(DefaultCellRendererComponent);\n }\n\n cellRenderer(componentType: ComponentType<{ value: Types.ArrayElementType<Row, P>[] }>): this {\n this.configureCellRenderer(new ComponentCellRendererPortalRef(componentType, (component, rowData) => {\n component.value = this._format(rowData.row[this.property]);\n }));\n return this;\n }\n\n cellEditor<C extends CellListEditorComponent<Types.ArrayElementType<Row, P>>>(editor: ComponentType<C>, validators?: Validator<Types.ArrayElementType<Row, P>[]>[], initialiseComponent?: (component: C) => void): this\n cellEditor<C extends CellListEditorComponent<Types.ArrayElementType<Row, P>>>(editor: ComponentType<C>, initialiseComponent?: (component: C) => void): this\n cellEditor<C extends CellListEditorComponent<Types.ArrayElementType<Row, P>>>(editor: ComponentType<C>, validatorsOrInitialiser?: Validator<Types.ArrayElementType<Row, P>[]>[] | ((component: C) => void), initialiseComponent?: (component: C) => void): this {\n const validators = Array.isArray(validatorsOrInitialiser) ? validatorsOrInitialiser : undefined;\n const initialiser = _.isFunction(validatorsOrInitialiser) ? validatorsOrInitialiser : initialiseComponent;\n\n this.configureCellEditor(new CellEditorPortalRef(editor, (component: C, editSession: EditSession<Row>) => {\n const formListModel = editSession.form.pluckList(this.property);\n if (validators) {\n formListModel.validateUsing(validators);\n }\n component.listModel = formListModel;\n if (initialiser) {\n initialiser(component);\n }\n }));\n return this;\n }\n\n format(formatter: (value: Types.ArrayElementType<Row, P>[]) => any): this {\n assert.isFunction(formatter);\n this._format = formatter;\n return this;\n }\n\n public selectRowOnClick(selectOnRowClick: boolean): this {\n return super.selectRowOnClick(selectOnRowClick);\n }\n\n}\n\nexport class CustomValueColumnModel<Row, V> extends ColumnModel<Row> {\n constructor(columnId: string, defaults: ColumnModel.Defaults, private getValue: (row: Row) => V) {\n super(columnId, defaults);\n this.cellRenderer(DefaultCellRendererComponent);\n }\n\n cellRenderer<C extends { value: V }>(componentType: ComponentType<C>, onComponentInitOrOptions?: CellRendererOptions<Row, C> | OnComponentInit<C>): this {\n this.configureCellRenderer(new ComponentCellRendererPortalRef(componentType, (component, rowData, firstTime) => {\n if (firstTime) {\n if (_.isFunction(onComponentInitOrOptions)) {\n onComponentInitOrOptions(component);\n } else {\n if (_.isFunction(onComponentInitOrOptions?.onComponentInit)) {\n onComponentInitOrOptions.onComponentInit(component);\n }\n }\n }\n component.value = this.getValue(rowData.row);\n\n if (!_.isFunction(onComponentInitOrOptions) && _.isFunction(onComponentInitOrOptions?.onRowUpdate)) {\n onComponentInitOrOptions.onRowUpdate(component, rowData.row);\n }\n }));\n return this;\n }\n\n public selectRowOnClick(selectOnRowClick: boolean): this {\n return super.selectRowOnClick(selectOnRowClick);\n }\n\n}\n\nexport class EditorControlColumnModel<Row> extends ColumnModel<Row> {\n\n constructor(columnId: string, saveCommand: UnaryCommand<DirtyTrackingForm<Row>, boolean>, defaults: ColumnModel.Defaults) {\n super(columnId, defaults);\n this.cellRenderer(EditRowControls);\n }\n\n cellRenderer(componentType: ComponentType<{ row: Row, editSession: EditSession<Row>, editRowCommand: Command<void> }>): this {\n this.configureCellRenderer(new ComponentCellRendererPortalRef(componentType, (component, rowData: RowData<Row>) => {\n component.row = rowData.row;\n component.editSession = rowData.editSession;\n component.editRowCommand = rowData.editRowCommand;\n }));\n return this;\n }\n\n protected getDefaultHeaderText(): string {\n return '';\n }\n}\n\nexport class CustomTemplateColumnModel<Row> extends ColumnModel<Row> {\n private readonly config = new TemplateCellRendererPortalRef<Row>();\n\n constructor(columnId: string, defaults: ColumnModel.Defaults) {\n super(columnId, defaults);\n this.configureCellRenderer(this.config);\n }\n\n setTemplate(templateRef: TemplateRef<any>, viewContainer: ViewContainerRef, fillCell: boolean, padChild: boolean) {\n this.config.registerPortal(templateRef, viewContainer, fillCell, padChild);\n }\n\n public selectRowOnClick(selectOnRowClick: boolean): this {\n return super.selectRowOnClick(selectOnRowClick);\n }\n\n}\n\nexport class SelectionColumnModel<Row> extends ColumnModel<Row> {\n\n private _enableHeaderControls = true;\n\n constructor(columnId: string, defaults: ColumnModel.Defaults, private readonly selectionModel: SelectionModel<Row>) {\n super(columnId, defaults);\n this.selectOnRowClick(false);\n if (selectionModel instanceof MultipleSelectionModel) {\n this.cellHeaderRenderer(SelectHeaderCellRendererComponent, (component) => {\n component.selectionModel = selectionModel;\n component.enableHeaderControls = this._enableHeaderControls;\n });\n }\n this.configureCellRenderer(new ComponentCellRendererPortalRef(SelectCellRendererComponent, (component, rowData: RowData<Row>) => {\n component.row = rowData.row;\n component.selectionModel = selectionModel;\n }));\n }\n\n protected getDefaultHeaderText(): string {\n return '';\n }\n\n isRowSelectionEnabledByDefault(): boolean | undefined {\n return this.isRowSelectionExplicitlyEnabled();\n }\n\n selectOnRowClick(selectOnRowClick: boolean): this {\n // note we're using different method name as the selection column treats this\n // state as the default for all columns.\n return super.selectRowOnClick(selectOnRowClick);\n }\n\n enableHeaderControls(enable: boolean): this {\n this._enableHeaderControls = enable;\n return this;\n }\n\n selectRow(row: Row) {\n this.selectionModel.selectCommand.execute(row);\n }\n}\n\n\n"]}
@@ -1 +1 @@
1
- [{"__symbolic":"module","version":4,"metadata":{"ɵ0":{"__symbolic":"error","message":"Lambda not supported","line":33,"character":13},"RowData":{"__symbolic":"interface"},"ColumnModel":{"__symbolic":"class","arity":1,"members":{"__ctor__":[{"__symbolic":"constructor","parameters":[{"__symbolic":"reference","name":"string"},{"__symbolic":"select","expression":{"__symbolic":"reference","name":"ColumnModel"},"member":"Defaults"}]}],"getHeaderText":[{"__symbolic":"method","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@typescript-plus/fast-memoize-decorator/dist/src","name":"Memoize","line":59,"character":3}}]}],"getDefaultHeaderText":[{"__symbolic":"method"}],"getColumnTextProperties":[{"__symbolic":"method","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@typescript-plus/fast-memoize-decorator/dist/src","name":"Memoize","line":68,"character":3}}]}],"textProperties":[{"__symbolic":"method"}],"configureHeaderRenderer":[{"__symbolic":"method"}],"configureCellRenderer":[{"__symbolic":"method"}],"configureCellEditor":[{"__symbolic":"method"}],"cellHeaderRenderer":[{"__symbolic":"method"}],"hasEditorPortal":[{"__symbolic":"method"}],"attachHeaderCell":[{"__symbolic":"method"}],"attachCell":[{"__symbolic":"method"}],"onHeaderAttached":[{"__symbolic":"method"}],"onRendererAttached":[{"__symbolic":"method"}],"onEditorAttached":[{"__symbolic":"method"}],"updatePortalContent":[{"__symbolic":"method"}],"selectRowOnClick":[{"__symbolic":"method"}],"isRowSelectionEnabled":[{"__symbolic":"method"}],"isRowSelectionExplicitlyEnabled":[{"__symbolic":"method"}],"isRowSelectionExplicitlyDisabled":[{"__symbolic":"method"}]}},"CellEditorOptions":{"__symbolic":"interface"},"OnComponentInit":{"__symbolic":"interface"},"CellRendererOptions":{"__symbolic":"interface"},"PropertyColumnModel":{"__symbolic":"class","extends":{"__symbolic":"reference","name":"ColumnModel"},"arity":2,"members":{"__ctor__":[{"__symbolic":"constructor","parameters":[{"__symbolic":"reference","name":"string"},{"__symbolic":"error","message":"Could not resolve type","line":170,"character":45,"context":{"typeName":"P"}},{"__symbolic":"select","expression":{"__symbolic":"reference","name":"ColumnModel"},"member":"Defaults"}]}],"cellRenderer":[{"__symbolic":"method"},{"__symbolic":"method"},{"__symbolic":"method"}],"cellEditor":[{"__symbolic":"method"},{"__symbolic":"method"},{"__symbolic":"method"}],"format":[{"__symbolic":"method"}],"selectRowOnClick":[{"__symbolic":"method"}]}},"ListPropertyColumnModel":{"__symbolic":"class","extends":{"__symbolic":"reference","name":"ColumnModel"},"arity":2,"members":{"__ctor__":[{"__symbolic":"constructor","parameters":[{"__symbolic":"reference","name":"string"},{"__symbolic":"error","message":"Could not resolve type","line":232,"character":45,"context":{"typeName":"P"}},{"__symbolic":"select","expression":{"__symbolic":"reference","name":"ColumnModel"},"member":"Defaults"}]}],"cellRenderer":[{"__symbolic":"method"}],"cellEditor":[{"__symbolic":"method"},{"__symbolic":"method"},{"__symbolic":"method"}],"format":[{"__symbolic":"method"}],"selectRowOnClick":[{"__symbolic":"method"}]}},"CustomValueColumnModel":{"__symbolic":"class","extends":{"__symbolic":"reference","name":"ColumnModel"},"arity":2,"members":{"__ctor__":[{"__symbolic":"constructor","parameters":[{"__symbolic":"reference","name":"string"},{"__symbolic":"select","expression":{"__symbolic":"reference","name":"ColumnModel"},"member":"Defaults"},{"__symbolic":"error","message":"Expression form not supported","line":276,"character":82}]}],"cellRenderer":[{"__symbolic":"method"}],"selectRowOnClick":[{"__symbolic":"method"}]}},"EditorControlColumnModel":{"__symbolic":"class","extends":{"__symbolic":"reference","name":"ColumnModel"},"arity":1,"members":{"__ctor__":[{"__symbolic":"constructor","parameters":[{"__symbolic":"reference","name":"string"},{"__symbolic":"reference","module":"@coolon/pectin","name":"UnaryCommand","line":296,"character":45,"arguments":[{"__symbolic":"reference","module":"@coolon/pectin","name":"DirtyTrackingForm","line":296,"character":58,"arguments":[{"__symbolic":"error","message":"Could not resolve type","line":296,"character":76,"context":{"typeName":"Row"}}]},{"__symbolic":"reference","name":"boolean"}]},{"__symbolic":"select","expression":{"__symbolic":"reference","name":"ColumnModel"},"member":"Defaults"}]}],"cellRenderer":[{"__symbolic":"method"}],"getDefaultHeaderText":[{"__symbolic":"method"}]}},"CustomTemplateColumnModel":{"__symbolic":"class","extends":{"__symbolic":"reference","name":"ColumnModel"},"arity":1,"members":{"__ctor__":[{"__symbolic":"constructor","parameters":[{"__symbolic":"reference","name":"string"},{"__symbolic":"select","expression":{"__symbolic":"reference","name":"ColumnModel"},"member":"Defaults"}]}],"setTemplate":[{"__symbolic":"method"}],"selectRowOnClick":[{"__symbolic":"method"}]}},"SelectionColumnModel":{"__symbolic":"class","extends":{"__symbolic":"reference","name":"ColumnModel"},"arity":1,"members":{"__ctor__":[{"__symbolic":"constructor","parameters":[{"__symbolic":"reference","name":"string"},{"__symbolic":"select","expression":{"__symbolic":"reference","name":"ColumnModel"},"member":"Defaults"},{"__symbolic":"reference","module":"@coolon/pectin","name":"SelectionModel","line":337,"character":97,"arguments":[{"__symbolic":"error","message":"Could not resolve type","line":337,"character":112,"context":{"typeName":"Row"}}]}]}],"getDefaultHeaderText":[{"__symbolic":"method"}],"isRowSelectionEnabledByDefault":[{"__symbolic":"method"}],"selectOnRowClick":[{"__symbolic":"method"}],"enableHeaderControls":[{"__symbolic":"method"}],"selectRow":[{"__symbolic":"method"}]}}}}]
1
+ [{"__symbolic":"module","version":4,"metadata":{"ɵ0":{"__symbolic":"error","message":"Lambda not supported","line":36,"character":13},"RowData":{"__symbolic":"interface"},"OnComponentInit":{"__symbolic":"interface"},"CellRendererOptions":{"__symbolic":"interface"},"MutableCellRendererOptions":{"__symbolic":"interface"},"ColumnModel":{"__symbolic":"class","arity":1,"members":{"__ctor__":[{"__symbolic":"constructor","parameters":[{"__symbolic":"reference","name":"string"},{"__symbolic":"select","expression":{"__symbolic":"reference","name":"ColumnModel"},"member":"Defaults"}]}],"getHeaderText":[{"__symbolic":"method","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@typescript-plus/fast-memoize-decorator/dist/src","name":"Memoize","line":75,"character":3}}]}],"getDefaultHeaderText":[{"__symbolic":"method"}],"getColumnTextProperties":[{"__symbolic":"method","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@typescript-plus/fast-memoize-decorator/dist/src","name":"Memoize","line":84,"character":3}}]}],"textProperties":[{"__symbolic":"method"}],"configureHeaderRenderer":[{"__symbolic":"method"}],"configureCellRenderer":[{"__symbolic":"method"}],"configureCellEditor":[{"__symbolic":"method"}],"cellHeaderRenderer":[{"__symbolic":"method"}],"hasEditorPortal":[{"__symbolic":"method"}],"attachHeaderCell":[{"__symbolic":"method"}],"attachCell":[{"__symbolic":"method"}],"onHeaderAttached":[{"__symbolic":"method"}],"onRendererAttached":[{"__symbolic":"method"}],"onEditorAttached":[{"__symbolic":"method"}],"updatePortalContent":[{"__symbolic":"method"}],"selectRowOnClick":[{"__symbolic":"method"}],"isRowSelectionEnabled":[{"__symbolic":"method"}],"isRowSelectionExplicitlyEnabled":[{"__symbolic":"method"}],"isRowSelectionExplicitlyDisabled":[{"__symbolic":"method"}]}},"PropertyColumnModel":{"__symbolic":"class","extends":{"__symbolic":"reference","name":"ColumnModel"},"arity":2,"members":{"__ctor__":[{"__symbolic":"constructor","parameters":[{"__symbolic":"reference","name":"string"},{"__symbolic":"error","message":"Could not resolve type","line":173,"character":45,"context":{"typeName":"P"}},{"__symbolic":"select","expression":{"__symbolic":"reference","name":"ColumnModel"},"member":"Defaults"}]}],"cellRenderer":[{"__symbolic":"method"},{"__symbolic":"method"},{"__symbolic":"method"}],"mutableCellRenderer":[{"__symbolic":"method"}],"cellEditor":[{"__symbolic":"method"},{"__symbolic":"method"},{"__symbolic":"method"}],"format":[{"__symbolic":"method"}],"selectRowOnClick":[{"__symbolic":"method"}]}},"ListPropertyColumnModel":{"__symbolic":"class","extends":{"__symbolic":"reference","name":"ColumnModel"},"arity":2,"members":{"__ctor__":[{"__symbolic":"constructor","parameters":[{"__symbolic":"reference","name":"string"},{"__symbolic":"error","message":"Could not resolve type","line":271,"character":45,"context":{"typeName":"P"}},{"__symbolic":"select","expression":{"__symbolic":"reference","name":"ColumnModel"},"member":"Defaults"}]}],"cellRenderer":[{"__symbolic":"method"}],"cellEditor":[{"__symbolic":"method"},{"__symbolic":"method"},{"__symbolic":"method"}],"format":[{"__symbolic":"method"}],"selectRowOnClick":[{"__symbolic":"method"}]}},"CustomValueColumnModel":{"__symbolic":"class","extends":{"__symbolic":"reference","name":"ColumnModel"},"arity":2,"members":{"__ctor__":[{"__symbolic":"constructor","parameters":[{"__symbolic":"reference","name":"string"},{"__symbolic":"select","expression":{"__symbolic":"reference","name":"ColumnModel"},"member":"Defaults"},{"__symbolic":"error","message":"Expression form not supported","line":315,"character":82}]}],"cellRenderer":[{"__symbolic":"method"}],"selectRowOnClick":[{"__symbolic":"method"}]}},"EditorControlColumnModel":{"__symbolic":"class","extends":{"__symbolic":"reference","name":"ColumnModel"},"arity":1,"members":{"__ctor__":[{"__symbolic":"constructor","parameters":[{"__symbolic":"reference","name":"string"},{"__symbolic":"reference","module":"@coolon/pectin","name":"UnaryCommand","line":348,"character":45,"arguments":[{"__symbolic":"reference","module":"@coolon/pectin","name":"DirtyTrackingForm","line":348,"character":58,"arguments":[{"__symbolic":"error","message":"Could not resolve type","line":348,"character":76,"context":{"typeName":"Row"}}]},{"__symbolic":"reference","name":"boolean"}]},{"__symbolic":"select","expression":{"__symbolic":"reference","name":"ColumnModel"},"member":"Defaults"}]}],"cellRenderer":[{"__symbolic":"method"}],"getDefaultHeaderText":[{"__symbolic":"method"}]}},"CustomTemplateColumnModel":{"__symbolic":"class","extends":{"__symbolic":"reference","name":"ColumnModel"},"arity":1,"members":{"__ctor__":[{"__symbolic":"constructor","parameters":[{"__symbolic":"reference","name":"string"},{"__symbolic":"select","expression":{"__symbolic":"reference","name":"ColumnModel"},"member":"Defaults"}]}],"setTemplate":[{"__symbolic":"method"}],"selectRowOnClick":[{"__symbolic":"method"}]}},"SelectionColumnModel":{"__symbolic":"class","extends":{"__symbolic":"reference","name":"ColumnModel"},"arity":1,"members":{"__ctor__":[{"__symbolic":"constructor","parameters":[{"__symbolic":"reference","name":"string"},{"__symbolic":"select","expression":{"__symbolic":"reference","name":"ColumnModel"},"member":"Defaults"},{"__symbolic":"reference","module":"@coolon/pectin","name":"SelectionModel","line":389,"character":97,"arguments":[{"__symbolic":"error","message":"Could not resolve type","line":389,"character":112,"context":{"typeName":"Row"}}]}]}],"getDefaultHeaderText":[{"__symbolic":"method"}],"isRowSelectionEnabledByDefault":[{"__symbolic":"method"}],"selectOnRowClick":[{"__symbolic":"method"}],"enableHeaderControls":[{"__symbolic":"method"}],"selectRow":[{"__symbolic":"method"}]}}}}]
@@ -0,0 +1 @@
1
+ //# sourceMappingURL=mutable-cell-renderer.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"mutable-cell-renderer.js","sourceRoot":"ng://@coolon/angular-ui-powerups/","sources":["lib/components/table/mutable-cell-renderer.ts"],"names":[],"mappings":"","sourcesContent":["import { CellRenderer } from './cell-renderer';\nimport { Disposable } from '@coolon/pectin';\n\nexport interface MutableCellRenderer<T> extends CellRenderer<T> {\n value: T;\n\n onValueEdited(callback: (is: T, was: T) => void): Disposable;\n}\n"]}
@@ -0,0 +1 @@
1
+ [{"__symbolic":"module","version":4,"metadata":{"MutableCellRenderer":{"__symbolic":"interface"}}}]
@@ -89,6 +89,9 @@ let TableModel = TableModel_1 = class TableModel {
89
89
  this._editorSessions = new MutableListModel();
90
90
  this.rowClassNamePredicates = [];
91
91
  this._createForm = (row) => new DirtyTrackingForm();
92
+ this.trackBy = (index, item) => {
93
+ return this.identityOf ? this.identityOf(item) : index;
94
+ };
92
95
  this.identityOf = sourceOfTruth.identityOf;
93
96
  const { chain, valueOf, before, when, after, observe, switchOn } = Dsl.disposeWith(this._garbage);
94
97
  this._columnsById = chain(this._columns).indexBy('columnId');
@@ -110,11 +113,6 @@ let TableModel = TableModel_1 = class TableModel {
110
113
  get rowsBeingEdited() {
111
114
  return this._rowsBeingEdited.readonly;
112
115
  }
113
- getTrackByFunction() {
114
- return (index, item) => {
115
- return this.identityOf ? this.identityOf(item) : index;
116
- };
117
- }
118
116
  get columns() {
119
117
  return this._columns.readonly;
120
118
  }
@@ -136,6 +134,9 @@ let TableModel = TableModel_1 = class TableModel {
136
134
  addCustomColumn(columnId, dataAccessor) {
137
135
  return this.addColumn(new CustomValueColumnModel(columnId, this, dataAccessor));
138
136
  }
137
+ addComponentColumn(columnId, component, onComponentInitOrOptions) {
138
+ return this.addColumn(new CustomValueColumnModel(columnId, this, row => row)).cellRenderer(component, onComponentInitOrOptions);
139
+ }
139
140
  addTemplateColumn(columnId) {
140
141
  return this.addColumn(new CustomTemplateColumnModel(columnId, this));
141
142
  }
@@ -164,12 +165,14 @@ let TableModel = TableModel_1 = class TableModel {
164
165
  }
165
166
  return column;
166
167
  }
168
+ // removeColumn(column: ColumnModel<Row>) {
169
+ //
170
+ // }
167
171
  columnTextProperties(columnTextProperties) {
168
172
  this._columnTextPropertiesLookup = columnTextProperties;
169
173
  }
170
174
  getColumnTextProperties(column) {
171
- const factory = this._columnTextPropertiesLookup ? this._columnTextPropertiesLookup[column.columnId] : undefined;
172
- return factory ? factory() : undefined;
175
+ return this._columnTextPropertiesLookup ? this._columnTextPropertiesLookup[column.columnId] : undefined;
173
176
  }
174
177
  startEditSession(row) {
175
178
  const rowId = this.identityOf(row);