@coolon/angular-ui-powerups 2.0.0-alpha.9 → 2.0.1

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 (368) hide show
  1. package/CHANGELOG.md +207 -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 +1537 -277
  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 +46 -34
  12. package/coolon-angular-ui-powerups.metadata.json +1 -1
  13. package/esm2015/coolon-angular-ui-powerups.js +44 -32
  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 +38 -15
  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 +23 -13
  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 +7 -1
  88. package/esm2015/lib/components/forms/autocomplete-input/autocomplete-input.component.js.map +1 -1
  89. package/esm2015/lib/components/forms/autocomplete-input/autocomplete-input.component.metadata.json +1 -1
  90. package/esm2015/lib/components/forms/checkbox-input/checkbox-input.component.js +1 -1
  91. package/esm2015/lib/components/forms/checkbox-input/checkbox-input.component.js.map +1 -1
  92. package/esm2015/lib/components/forms/checkbox-input/checkbox-input.component.metadata.json +1 -1
  93. package/esm2015/lib/components/forms/multiple-select-input/multiple-select-input.component.js +2 -10
  94. package/esm2015/lib/components/forms/multiple-select-input/multiple-select-input.component.js.map +1 -1
  95. package/esm2015/lib/components/forms/multiple-select-input/multiple-select-input.component.metadata.json +1 -1
  96. package/esm2015/lib/components/forms/number-input/number-input.component.js +1 -1
  97. package/esm2015/lib/components/forms/number-input/number-input.component.js.map +1 -1
  98. package/esm2015/lib/components/forms/number-input/number-input.component.metadata.json +1 -1
  99. package/esm2015/lib/components/forms/password-input/password-input.component.js +1 -1
  100. package/esm2015/lib/components/forms/password-input/password-input.component.js.map +1 -1
  101. package/esm2015/lib/components/forms/password-input/password-input.component.metadata.json +1 -1
  102. package/esm2015/lib/components/forms/select-input/select-input.component.js +2 -2
  103. package/esm2015/lib/components/forms/select-input/select-input.component.js.map +1 -1
  104. package/esm2015/lib/components/forms/select-input/select-input.component.metadata.json +1 -1
  105. package/esm2015/lib/components/forms/string-input/string-input.component.js +3 -3
  106. package/esm2015/lib/components/forms/string-input/string-input.component.js.map +1 -1
  107. package/esm2015/lib/components/forms/string-input/string-input.component.metadata.json +1 -1
  108. package/esm2015/lib/components/forms/text-input/text-input.component.js +1 -1
  109. package/esm2015/lib/components/forms/text-input/text-input.component.js.map +1 -1
  110. package/esm2015/lib/components/forms/text-input/text-input.component.metadata.json +1 -1
  111. package/esm2015/lib/components/icon/icon.component.js +17 -4
  112. package/esm2015/lib/components/icon/icon.component.js.map +1 -1
  113. package/esm2015/lib/components/icon/icon.component.metadata.json +1 -1
  114. package/esm2015/lib/components/index.js +16 -0
  115. package/esm2015/lib/components/index.js.map +1 -1
  116. package/esm2015/lib/components/index.metadata.json +1 -1
  117. package/esm2015/lib/components/table/column-model.js +44 -2
  118. package/esm2015/lib/components/table/column-model.js.map +1 -1
  119. package/esm2015/lib/components/table/column-model.metadata.json +1 -1
  120. package/esm2015/lib/components/table/mutable-cell-renderer.js +1 -0
  121. package/esm2015/lib/components/table/mutable-cell-renderer.js.map +1 -0
  122. package/esm2015/lib/components/table/mutable-cell-renderer.metadata.json +1 -0
  123. package/esm2015/lib/components/table/table-model.js +10 -7
  124. package/esm2015/lib/components/table/table-model.js.map +1 -1
  125. package/esm2015/lib/components/table/table-model.metadata.json +1 -1
  126. package/esm2015/lib/components/table/table-row-menu/table-row-menu.component.js +73 -0
  127. package/esm2015/lib/components/table/table-row-menu/table-row-menu.component.js.map +1 -0
  128. package/esm2015/lib/components/table/table-row-menu/table-row-menu.component.metadata.json +1 -0
  129. package/esm2015/lib/components/table/table-row-menu/table-row-menu.component.ngfactory.js.map +1 -0
  130. package/esm2015/lib/components/table/table.component.js +1 -1
  131. package/esm2015/lib/components/table/table.component.js.map +1 -1
  132. package/esm2015/lib/components/table/table.component.metadata.json +1 -1
  133. package/esm2015/lib/components/track-by.js +5 -0
  134. package/esm2015/lib/components/track-by.js.map +1 -0
  135. package/esm2015/lib/interaction/activity-ref.js +10 -2
  136. package/esm2015/lib/interaction/activity-ref.js.map +1 -1
  137. package/esm2015/lib/interaction/activity-ref.metadata.json +1 -1
  138. package/esm2015/lib/interaction/activity.js +18 -1
  139. package/esm2015/lib/interaction/activity.js.map +1 -1
  140. package/esm2015/lib/interaction/activity.metadata.json +1 -1
  141. package/esm2015/lib/interaction/components/activity-actions/activity-actions.component.js +1 -1
  142. package/esm2015/lib/interaction/components/activity-actions/activity-actions.component.metadata.json +1 -1
  143. package/esm2015/lib/interaction/components/activity-container/activity-container.component.js +24 -17
  144. package/esm2015/lib/interaction/components/activity-container/activity-container.component.js.map +1 -1
  145. package/esm2015/lib/interaction/components/activity-container/activity-container.component.metadata.json +1 -1
  146. package/esm2015/lib/interaction/components/activity-container/activity-outlet/activity-outlet.component.js +1 -1
  147. package/esm2015/lib/interaction/components/activity-container/activity-outlet/activity-outlet.component.js.map +1 -1
  148. package/esm2015/lib/interaction/components/activity-container/activity-outlet/activity-outlet.component.metadata.json +1 -1
  149. package/esm2015/lib/interaction/interaction.module.ngfactory.js.map +1 -1
  150. package/esm2015/lib/place/components/abstract-place-navigation.component.js +4 -3
  151. package/esm2015/lib/place/components/abstract-place-navigation.component.js.map +1 -1
  152. package/esm2015/lib/place/components/abstract-place-navigation.component.metadata.json +1 -1
  153. package/esm2015/lib/place/components/list-place-nav/list-place-nav.component.js +1 -1
  154. package/esm2015/lib/place/components/list-place-nav/list-place-nav.component.js.map +1 -1
  155. package/esm2015/lib/place/components/list-place-nav/list-place-nav.component.metadata.json +1 -1
  156. package/esm2015/lib/place/components/place-outlet/place-outlet.component.js +56 -16
  157. package/esm2015/lib/place/components/place-outlet/place-outlet.component.js.map +1 -1
  158. package/esm2015/lib/place/components/place-outlet/place-outlet.component.metadata.json +1 -1
  159. package/esm2015/lib/place/components/side-place-navigation/side-place-navigation.component.js +2 -2
  160. package/esm2015/lib/place/components/side-place-navigation/side-place-navigation.component.js.map +1 -1
  161. package/esm2015/lib/place/components/side-place-navigation/side-place-navigation.component.metadata.json +1 -1
  162. package/esm2015/lib/place/components/tabbed-place-navigation/tabbed-place-navigation.component.js +1 -1
  163. package/esm2015/lib/place/components/tabbed-place-navigation/tabbed-place-navigation.component.js.map +1 -1
  164. package/esm2015/lib/place/components/tabbed-place-navigation/tabbed-place-navigation.component.metadata.json +1 -1
  165. package/esm2015/lib/place/place-component.js +13 -1
  166. package/esm2015/lib/place/place-component.js.map +1 -1
  167. package/esm2015/lib/place/place-component.metadata.json +1 -1
  168. package/esm2015/lib/place/place-router.js +2 -8
  169. package/esm2015/lib/place/place-router.js.map +1 -1
  170. package/esm2015/lib/place/place-router.metadata.json +1 -1
  171. package/esm2015/lib/place/place.module.js +3 -3
  172. package/esm2015/lib/place/place.module.js.map +1 -1
  173. package/esm2015/lib/place/place.module.metadata.json +1 -1
  174. package/esm2015/lib/place/place.module.ngfactory.js.map +1 -1
  175. package/esm2015/lib/place/route/parameter-decorators.js +2 -3
  176. package/esm2015/lib/place/route/parameter-decorators.js.map +1 -1
  177. package/esm2015/lib/place/route/parameter-decorators.metadata.json +1 -1
  178. package/esm5/coolon-angular-ui-powerups.js +44 -32
  179. package/esm5/coolon-angular-ui-powerups.js.map +1 -1
  180. package/esm5/lib/angular-ui-powerups.module.ngfactory.js.map +1 -1
  181. package/esm5/lib/components/card-container/card-container.component.js +1 -1
  182. package/esm5/lib/components/commands/command/command.component.js +64 -0
  183. package/esm5/lib/components/commands/command/command.component.js.map +1 -0
  184. package/esm5/lib/components/commands/command/command.component.ngfactory.js.map +1 -0
  185. package/esm5/lib/components/commands/command-face/command-face.component.js +123 -0
  186. package/esm5/lib/components/commands/command-face/command-face.component.js.map +1 -0
  187. package/esm5/lib/components/commands/command-face/command-face.component.ngfactory.js.map +1 -0
  188. package/esm5/lib/components/commands/command-face/command-face.component.scss.ngstyle.js.map +1 -0
  189. package/esm5/lib/components/commands/command-face.js +145 -0
  190. package/esm5/lib/components/commands/command-face.js.map +1 -0
  191. package/esm5/lib/components/commands/flex.component.js +33 -0
  192. package/esm5/lib/components/commands/flex.component.js.map +1 -0
  193. package/esm5/lib/components/commands/flex.component.ngfactory.js.map +1 -0
  194. package/esm5/lib/components/commands/group/command-group/command-group.component.js +51 -0
  195. package/esm5/lib/components/commands/group/command-group/command-group.component.js.map +1 -0
  196. package/esm5/lib/components/commands/group/command-group/command-group.component.ngfactory.js.map +1 -0
  197. package/esm5/lib/components/commands/group/command-group-menu-renderer/command-group-menu-renderer.component.js +59 -0
  198. package/esm5/lib/components/commands/group/command-group-menu-renderer/command-group-menu-renderer.component.js.map +1 -0
  199. package/esm5/lib/components/commands/group/command-group-menu-renderer/command-group-menu-renderer.component.ngfactory.js.map +1 -0
  200. package/esm5/lib/components/commands/group/command-group-renderer/command-group-renderer.component.js +42 -0
  201. package/esm5/lib/components/commands/group/command-group-renderer/command-group-renderer.component.js.map +1 -0
  202. package/esm5/lib/components/commands/group/command-group-renderer/command-group-renderer.component.ngfactory.js.map +1 -0
  203. package/esm5/lib/components/commands/group/command-group-renderer/command-group-renderer.component.scss.shim.ngstyle.js.map +1 -0
  204. package/esm5/lib/components/commands/group/command-group.js +122 -0
  205. package/esm5/lib/components/commands/group/command-group.js.map +1 -0
  206. package/esm5/lib/components/commands/group/more-menu.component.js +58 -0
  207. package/esm5/lib/components/commands/group/more-menu.component.js.map +1 -0
  208. package/esm5/lib/components/commands/group/more-menu.component.ngfactory.js.map +1 -0
  209. package/esm5/lib/components/commands/group/popup-menu.component.js +68 -0
  210. package/esm5/lib/components/commands/group/popup-menu.component.js.map +1 -0
  211. package/esm5/lib/components/commands/group/popup-menu.component.ngfactory.js.map +1 -0
  212. package/esm5/lib/components/commands/group/registration.js +80 -0
  213. package/esm5/lib/components/commands/group/registration.js.map +1 -0
  214. package/esm5/lib/components/commands/group/tool-bar/tool-bar.component.js +58 -0
  215. package/esm5/lib/components/commands/group/tool-bar/tool-bar.component.js.map +1 -0
  216. package/esm5/lib/components/commands/group/tool-bar/tool-bar.component.ngfactory.js.map +1 -0
  217. package/esm5/lib/components/commands/group/tool-bar/tool-bar.component.scss.shim.ngstyle.js.map +1 -0
  218. package/esm5/lib/components/commands/group/view-data.js +131 -0
  219. package/esm5/lib/components/commands/group/view-data.js.map +1 -0
  220. package/esm5/lib/components/commands/separator.component.js +37 -0
  221. package/esm5/lib/components/commands/separator.component.js.map +1 -0
  222. package/esm5/lib/components/commands/separator.component.ngfactory.js.map +1 -0
  223. package/esm5/lib/components/components.module.js +38 -15
  224. package/esm5/lib/components/components.module.js.map +1 -1
  225. package/esm5/lib/components/components.module.ngfactory.js.map +1 -1
  226. package/esm5/lib/components/forms/abstract-input.component.js +12 -4
  227. package/esm5/lib/components/forms/abstract-input.component.js.map +1 -1
  228. package/esm5/lib/components/forms/abstract-list-input.component.js +27 -14
  229. package/esm5/lib/components/forms/abstract-list-input.component.js.map +1 -1
  230. package/esm5/lib/components/forms/abstract-value-input.component.js +23 -13
  231. package/esm5/lib/components/forms/abstract-value-input.component.js.map +1 -1
  232. package/esm5/lib/components/forms/autocomplete-input/autocomplete-input.component.js +7 -1
  233. package/esm5/lib/components/forms/autocomplete-input/autocomplete-input.component.js.map +1 -1
  234. package/esm5/lib/components/forms/checkbox-input/checkbox-input.component.js +1 -1
  235. package/esm5/lib/components/forms/checkbox-input/checkbox-input.component.js.map +1 -1
  236. package/esm5/lib/components/forms/multiple-select-input/multiple-select-input.component.js +2 -10
  237. package/esm5/lib/components/forms/multiple-select-input/multiple-select-input.component.js.map +1 -1
  238. package/esm5/lib/components/forms/number-input/number-input.component.js +1 -1
  239. package/esm5/lib/components/forms/number-input/number-input.component.js.map +1 -1
  240. package/esm5/lib/components/forms/password-input/password-input.component.js +1 -1
  241. package/esm5/lib/components/forms/password-input/password-input.component.js.map +1 -1
  242. package/esm5/lib/components/forms/select-input/select-input.component.js +2 -2
  243. package/esm5/lib/components/forms/select-input/select-input.component.js.map +1 -1
  244. package/esm5/lib/components/forms/string-input/string-input.component.js +3 -3
  245. package/esm5/lib/components/forms/string-input/string-input.component.js.map +1 -1
  246. package/esm5/lib/components/forms/text-input/text-input.component.js +1 -1
  247. package/esm5/lib/components/forms/text-input/text-input.component.js.map +1 -1
  248. package/esm5/lib/components/icon/icon.component.js +15 -3
  249. package/esm5/lib/components/icon/icon.component.js.map +1 -1
  250. package/esm5/lib/components/index.js +16 -0
  251. package/esm5/lib/components/index.js.map +1 -1
  252. package/esm5/lib/components/table/column-model.js +45 -2
  253. package/esm5/lib/components/table/column-model.js.map +1 -1
  254. package/esm5/lib/components/table/mutable-cell-renderer.js +1 -0
  255. package/esm5/lib/components/table/mutable-cell-renderer.js.map +1 -0
  256. package/esm5/lib/components/table/table-model.js +10 -8
  257. package/esm5/lib/components/table/table-model.js.map +1 -1
  258. package/esm5/lib/components/table/table-row-menu/table-row-menu.component.js +63 -0
  259. package/esm5/lib/components/table/table-row-menu/table-row-menu.component.js.map +1 -0
  260. package/esm5/lib/components/table/table-row-menu/table-row-menu.component.ngfactory.js.map +1 -0
  261. package/esm5/lib/components/table/table.component.js +1 -1
  262. package/esm5/lib/components/table/table.component.js.map +1 -1
  263. package/esm5/lib/components/track-by.js +5 -0
  264. package/esm5/lib/components/track-by.js.map +1 -0
  265. package/esm5/lib/interaction/activity-ref.js +14 -2
  266. package/esm5/lib/interaction/activity-ref.js.map +1 -1
  267. package/esm5/lib/interaction/activity.js +27 -1
  268. package/esm5/lib/interaction/activity.js.map +1 -1
  269. package/esm5/lib/interaction/components/activity-actions/activity-actions.component.js +1 -1
  270. package/esm5/lib/interaction/components/activity-container/activity-container.component.js +24 -17
  271. package/esm5/lib/interaction/components/activity-container/activity-container.component.js.map +1 -1
  272. package/esm5/lib/interaction/components/activity-container/activity-outlet/activity-outlet.component.js +1 -1
  273. package/esm5/lib/interaction/components/activity-container/activity-outlet/activity-outlet.component.js.map +1 -1
  274. package/esm5/lib/interaction/interaction.module.ngfactory.js.map +1 -1
  275. package/esm5/lib/place/components/abstract-place-navigation.component.js +4 -3
  276. package/esm5/lib/place/components/abstract-place-navigation.component.js.map +1 -1
  277. package/esm5/lib/place/components/list-place-nav/list-place-nav.component.js +1 -1
  278. package/esm5/lib/place/components/list-place-nav/list-place-nav.component.js.map +1 -1
  279. package/esm5/lib/place/components/place-outlet/place-outlet.component.js +56 -16
  280. package/esm5/lib/place/components/place-outlet/place-outlet.component.js.map +1 -1
  281. package/esm5/lib/place/components/side-place-navigation/side-place-navigation.component.js +2 -2
  282. package/esm5/lib/place/components/side-place-navigation/side-place-navigation.component.js.map +1 -1
  283. package/esm5/lib/place/components/tabbed-place-navigation/tabbed-place-navigation.component.js +1 -1
  284. package/esm5/lib/place/components/tabbed-place-navigation/tabbed-place-navigation.component.js.map +1 -1
  285. package/esm5/lib/place/place-component.js +17 -1
  286. package/esm5/lib/place/place-component.js.map +1 -1
  287. package/esm5/lib/place/place-router.js +2 -8
  288. package/esm5/lib/place/place-router.js.map +1 -1
  289. package/esm5/lib/place/place.module.js +3 -3
  290. package/esm5/lib/place/place.module.js.map +1 -1
  291. package/esm5/lib/place/place.module.ngfactory.js.map +1 -1
  292. package/esm5/lib/place/route/parameter-decorators.js +2 -3
  293. package/esm5/lib/place/route/parameter-decorators.js.map +1 -1
  294. package/fesm2015/coolon-angular-ui-powerups.js +1290 -214
  295. package/fesm2015/coolon-angular-ui-powerups.js.map +1 -1
  296. package/fesm5/coolon-angular-ui-powerups.js +1468 -227
  297. package/fesm5/coolon-angular-ui-powerups.js.map +1 -1
  298. package/lib/components/commands/command/command.component.d.ts +22 -0
  299. package/lib/components/commands/command-face/command-face.component.d.ts +34 -0
  300. package/lib/components/commands/command-face.d.ts +40 -0
  301. package/lib/components/commands/flex.component.d.ts +11 -0
  302. package/lib/components/commands/group/command-group/command-group.component.d.ts +11 -0
  303. package/lib/components/commands/group/command-group-menu-renderer/command-group-menu-renderer.component.d.ts +21 -0
  304. package/lib/components/commands/group/command-group-renderer/command-group-renderer.component.d.ts +13 -0
  305. package/lib/components/commands/group/command-group.d.ts +41 -0
  306. package/lib/components/commands/group/more-menu.component.d.ts +14 -0
  307. package/lib/components/commands/group/popup-menu.component.d.ts +17 -0
  308. package/lib/components/commands/group/registration.d.ts +32 -0
  309. package/lib/components/commands/group/tool-bar/tool-bar.component.d.ts +13 -0
  310. package/lib/components/commands/group/view-data.d.ts +40 -0
  311. package/lib/components/commands/separator.component.d.ts +12 -0
  312. package/lib/components/forms/abstract-input.component.d.ts +8 -2
  313. package/lib/components/forms/abstract-list-input.component.d.ts +4 -3
  314. package/lib/components/forms/abstract-value-input.component.d.ts +4 -3
  315. package/lib/components/forms/autocomplete-input/autocomplete-input.component.d.ts +3 -0
  316. package/lib/components/forms/multiple-select-input/multiple-select-input.component.d.ts +1 -3
  317. package/lib/components/forms/select-input/select-input.component.d.ts +1 -1
  318. package/lib/components/icon/icon.component.d.ts +15 -0
  319. package/lib/components/index.d.ts +17 -0
  320. package/lib/components/table/column-model.d.ts +15 -17
  321. package/lib/components/table/mutable-cell-renderer.d.ts +6 -0
  322. package/lib/components/table/table-model.d.ts +7 -3
  323. package/lib/components/table/table-row-menu/table-row-menu.component.d.ts +26 -0
  324. package/lib/components/track-by.d.ts +3 -0
  325. package/lib/interaction/activity-ref.d.ts +3 -0
  326. package/lib/interaction/activity.d.ts +6 -2
  327. package/lib/interaction/components/activity-container/activity-container.component.d.ts +4 -2
  328. package/lib/place/components/abstract-place-navigation.component.d.ts +2 -2
  329. package/lib/place/components/place-outlet/place-outlet.component.d.ts +8 -2
  330. package/lib/place/components/side-place-navigation/side-place-navigation.component.d.ts +1 -1
  331. package/lib/place/place-component.d.ts +6 -0
  332. package/package.json +7 -5
  333. package/schematics/bootstrap-app/index.d.ts +3 -0
  334. package/schematics/bootstrap-app/index.js +81 -0
  335. package/schematics/bootstrap-app/index.js.map +1 -0
  336. package/schematics/bootstrap-app/schema.d.ts +3 -0
  337. package/schematics/bootstrap-app/schema.js +3 -0
  338. package/schematics/bootstrap-app/schema.js.map +1 -0
  339. package/schematics/bootstrap-app/schema.json +19 -0
  340. package/schematics/bootstrap-app/templates/app/app-routing.module.ts +19 -0
  341. package/schematics/bootstrap-app/templates/app/auth/auth.guard.spec.ts +15 -0
  342. package/schematics/bootstrap-app/templates/app/auth/auth.guard.ts +23 -0
  343. package/schematics/bootstrap-app/templates/app/auth/auth.module.ts +13 -0
  344. package/schematics/bootstrap-app/templates/app/auth/auth.service.ts +13 -0
  345. package/schematics/bootstrap-app/templates/app/i18n.ts +9 -0
  346. package/schematics/bootstrap-app/templates/app/places/home/home.component.html +1 -0
  347. package/schematics/bootstrap-app/templates/app/places/home/home.component.scss +4 -0
  348. package/schematics/bootstrap-app/templates/app/places/home/home.component.spec.ts +25 -0
  349. package/schematics/bootstrap-app/templates/app/places/home/home.component.ts +25 -0
  350. package/schematics/bootstrap-app/templates/app/places/place-routes.ts +3 -0
  351. package/schematics/bootstrap-app/templates/app/places/places.json5 +3 -0
  352. package/schematics/bootstrap-app/templates/i18n/config.json +9 -0
  353. package/schematics/bootstrap-app/templates/i18n/notifications.yml +19 -0
  354. package/schematics/bootstrap-app/templates/i18n/places/home.yml +6 -0
  355. package/schematics/collection.json +10 -1
  356. package/schematics/ng-add/index.d.ts +1 -0
  357. package/schematics/ng-add/index.js +27 -4
  358. package/schematics/ng-add/index.js.map +1 -1
  359. package/schematics/package-util.d.ts +13 -0
  360. package/schematics/package-util.js +60 -0
  361. package/schematics/package-util.js.map +1 -0
  362. package/schematics/place-add/index.d.ts +3 -0
  363. package/schematics/place-add/index.js +26 -0
  364. package/schematics/place-add/index.js.map +1 -0
  365. package/schematics/place-add/schema.d.ts +2 -0
  366. package/schematics/place-add/schema.js +3 -0
  367. package/schematics/place-add/schema.js.map +1 -0
  368. package/schematics/place-add/schema.json +8 -0
@@ -1,9 +1,10 @@
1
1
  import { __decorate, __extends, __metadata, __param } from "tslib";
2
2
  import { Component, EventEmitter, Inject, Input, Optional, Output, SkipSelf, ViewChild } from '@angular/core';
3
3
  import { ActivatedRoute, Router, RouterOutlet } from '@angular/router';
4
- import { DebugContext, Dsl, lang, ListModel, MutableValueModel, StoreInListModel, StoreInValueModel, TrackExternal, ValueModel } from '@coolon/pectin';
4
+ import { DebugContext, Dsl, lang, ListModel, MutableValueModel, StoreInListModel, StoreInValueModel, Trace, TrackExternal, ValueModel } from '@coolon/pectin';
5
5
  import * as _ from 'lodash';
6
6
  import { DisposableComponent } from '../../../components/disposable-component';
7
+ import { PlaceComponent } from '../../place-component';
7
8
  import { AUP_PLACE_CONFIG } from '../../place-config';
8
9
  import { PlaceRouter } from '../../place-router';
9
10
  import { LEFT_RIGHT_PLACE_ANIMATION } from './route-animations';
@@ -20,6 +21,7 @@ var PlaceOutletComponent = /** @class */ (function (_super) {
20
21
  _this._activePlaceModel = new MutableValueModel();
21
22
  _this.initialPlaceIndex = null;
22
23
  _this._isPushingVisitToRoute = new MutableValueModel(false);
24
+ _this.isVeryFirstLoad = true;
23
25
  var _a = Dsl.disposeWith(_this), chain = _a.chain, valueOf = _a.valueOf, before = _a.before, when = _a.when, after = _a.after, observe = _a.observe, switchOn = _a.switchOn;
24
26
  _this.parentOutletModel = new MutableValueModel(parentOutlet);
25
27
  var defaultPlaceAnimationOrder = chain(_this.parentOutletModel)
@@ -28,8 +30,9 @@ var PlaceOutletComponent = /** @class */ (function (_super) {
28
30
  .pluckList('children')
29
31
  .pluck('component');
30
32
  var activatePlaceType = chain(_this.activePlaceModel).map(function (p) { return p.constructor; });
31
- _this.placeAnimationOrder = chain(_this.customPlaceAnimationOrderModel)
32
- .otherwise(defaultPlaceAnimationOrder)
33
+ _this.placesInAnimationOrder = chain(_this.customPlaceAnimationOrderModel)
34
+ .otherwise(defaultPlaceAnimationOrder);
35
+ _this.activePlaceAnimationPosition = _this.placesInAnimationOrder
33
36
  .reduce(function (placesInOrder) {
34
37
  var placeIndex = 0;
35
38
  if (activatePlaceType.value) {
@@ -40,14 +43,16 @@ var PlaceOutletComponent = /** @class */ (function (_super) {
40
43
  }
41
44
  return _.isNil(_this.initialPlaceIndex) ? 0 : placeIndex - _this.initialPlaceIndex;
42
45
  }, { dependsOn: activatePlaceType });
46
+ _this.animationSupported = _this.placesInAnimationOrder.count().isGreaterThan(0);
47
+ _this.animationEnabled = valueOf.all(_this.animateModel, _this.animationSupported).areTruthy();
43
48
  // Extract our visit model from the place router.
44
49
  _this._activePlaceDefinition = chain(_this._activePlaceModel).pluck('placeDefinition');
45
50
  _this.routerVisitModel = _this._activePlaceDefinition.findIn(chain(placeRouter.activeVisitsByPlaceDefinition));
46
51
  _this.navigationInProgress = chain(_this.placeRouter.navigationInProgress);
47
- when.valueOf(_this.navigationInProgress).becomesFalsey(function () {
52
+ when(_this.navigationInProgress).becomesFalsey(function () {
48
53
  _this.checkStateAndInitialise();
49
54
  });
50
- when.valueOf(_this.outletActivated).becomesTruthy(function () {
55
+ when(_this.outletActivated).becomesTruthy(function () {
51
56
  _this.checkStateAndInitialise();
52
57
  });
53
58
  chain(_this._activePlaceModel)
@@ -60,7 +65,7 @@ var PlaceOutletComponent = /** @class */ (function (_super) {
60
65
  };
61
66
  // @Trace()
62
67
  PlaceOutletComponent.prototype.getAnimationOrder = function () {
63
- return this.placeAnimationOrder.value;
68
+ return this.activePlaceAnimationPosition.value;
64
69
  };
65
70
  Object.defineProperty(PlaceOutletComponent.prototype, "animationDuration", {
66
71
  get: function () {
@@ -71,7 +76,10 @@ var PlaceOutletComponent = /** @class */ (function (_super) {
71
76
  });
72
77
  // @Trace()
73
78
  PlaceOutletComponent.prototype.navigate = function (visit) {
74
- // console.log({ activatedRoute: this._activatedRouteModel.value });
79
+ // const place = this.placesInAnimationOrder.query().findMatching(p => visit.placeDefinition.component === p);
80
+ // if (!place) {
81
+ // lang.illegalState()
82
+ // }
75
83
  this.placeRouter.navigate(visit, {
76
84
  relativeTo: this.parentOutlet ? this.parentOutlet.activatedRouteModel.value : null
77
85
  });
@@ -97,14 +105,25 @@ var PlaceOutletComponent = /** @class */ (function (_super) {
97
105
  enumerable: true,
98
106
  configurable: true
99
107
  });
100
- // @Trace()
101
108
  PlaceOutletComponent.prototype.onOutletActivated = function (routerOutlet, place) {
102
109
  this._activatedRouteModel.value = routerOutlet.activatedRoute;
103
110
  this._activePlaceModel.value = place;
111
+ this.validateAnimationState(place);
104
112
  this.outletActivated.value = true;
105
113
  this.checkStateAndInitialise();
106
114
  };
107
- // @Trace()
115
+ PlaceOutletComponent.prototype.validateAnimationState = function (place) {
116
+ if (this.animateModel.value) {
117
+ if (this.placesInAnimationOrder.length < 1) {
118
+ console.error('PlaceOutlet.animate === true but placeAnimationOrder has not been set. Animation is disabled.');
119
+ }
120
+ else {
121
+ if (!this.placesInAnimationOrder.query().includes(place.placeDefinition.component)) {
122
+ console.error("PlaceOutlet.animate === true but placeAnimationOrder doesn't contain " + place.placeDefinition.component.name + ".");
123
+ }
124
+ }
125
+ }
126
+ };
108
127
  PlaceOutletComponent.prototype.onOutletDeactivated = function () {
109
128
  this.outletActivated.value = false;
110
129
  this._activePlaceModel.value = null;
@@ -121,7 +140,6 @@ var PlaceOutletComponent = /** @class */ (function (_super) {
121
140
  this.initialisePlace(routerVisit, activePlace);
122
141
  }
123
142
  };
124
- // @Trace()
125
143
  PlaceOutletComponent.prototype.initialisePlace = function (routerVisit, activePlace) {
126
144
  var _this = this;
127
145
  var visitModel = new MutableValueModel(routerVisit);
@@ -129,9 +147,18 @@ var PlaceOutletComponent = /** @class */ (function (_super) {
129
147
  activePlace.initialiseVisit(routerVisit, function (current, previous) {
130
148
  _this.pushVisitChangeToRoute(previous, current);
131
149
  });
132
- if (!this.animateModel.value) {
133
- // we're not animating so trigger any post animation callbacks now.
134
- this.animationDone();
150
+ var finishPlaceLoad = function () {
151
+ _this._activePlaceModel.value._notifyActive(true);
152
+ };
153
+ if (!this.animationEnabled.value || this.isVeryFirstLoad) {
154
+ // if animation is disabled or this is the very first load then
155
+ // we won't get our animation done callback so we finish the
156
+ // process here and now.
157
+ this.isVeryFirstLoad = false;
158
+ finishPlaceLoad();
159
+ }
160
+ else {
161
+ this.onAnimationFinishedJob = finishPlaceLoad;
135
162
  }
136
163
  var _a = Dsl.disposeWith(activePlace), when = _a.when, chain = _a.chain, valueOf = _a.valueOf;
137
164
  when.valueOf(this.routerVisitModel)
@@ -154,8 +181,9 @@ var PlaceOutletComponent = /** @class */ (function (_super) {
154
181
  };
155
182
  // @Trace()
156
183
  PlaceOutletComponent.prototype.animationDone = function () {
157
- if (this._activePlaceModel.value) {
158
- this._activePlaceModel.value.onPlaceReady();
184
+ if (this.onAnimationFinishedJob) {
185
+ this.onAnimationFinishedJob();
186
+ this.onAnimationFinishedJob = undefined;
159
187
  }
160
188
  };
161
189
  PlaceOutletComponent.ctorParameters = function () { return [
@@ -188,10 +216,22 @@ var PlaceOutletComponent = /** @class */ (function (_super) {
188
216
  ViewChild('routeOutlet', { static: true }),
189
217
  __metadata("design:type", RouterOutlet)
190
218
  ], PlaceOutletComponent.prototype, "routerOut", void 0);
219
+ __decorate([
220
+ Trace(),
221
+ __metadata("design:type", Function),
222
+ __metadata("design:paramtypes", [RouterOutlet, PlaceComponent]),
223
+ __metadata("design:returntype", void 0)
224
+ ], PlaceOutletComponent.prototype, "onOutletActivated", null);
225
+ __decorate([
226
+ Trace(),
227
+ __metadata("design:type", Function),
228
+ __metadata("design:paramtypes", []),
229
+ __metadata("design:returntype", void 0)
230
+ ], PlaceOutletComponent.prototype, "onOutletDeactivated", null);
191
231
  PlaceOutletComponent = __decorate([
192
232
  Component({
193
233
  selector: 'aup-place-outlet',
194
- template: "<ng-container *ngIf=\"animateModel.value\">\n <div class=\"router-outlet-container\" cdkScrollable\n [@routeAnimations]=\"{value: getAnimationOrder(), params:{duration: animationDuration}}\"\n (@routeAnimations.start)=\"animationStarted()\"\n (@routeAnimations.done)=\"animationDone()\"\n >\n <router-outlet #routerOutlet=\"outlet\"\n (activate)=\"onOutletActivated(routerOutlet, $event)\"\n (deactivate)=\"onOutletDeactivated()\">\n </router-outlet>\n </div>\n</ng-container>\n\n<ng-container *ngIf=\"!animateModel.value\">\n <div class=\"router-outlet-container\" cdkScrollable>\n <router-outlet #routerOutlet=\"outlet\"\n (activate)=\"onOutletActivated(routerOutlet, $event)\"\n (deactivate)=\"onOutletDeactivated()\">\n </router-outlet>\n </div>\n</ng-container>\n\n",
234
+ template: "<ng-container *ngIf=\"animationEnabled.value\">\n <div class=\"router-outlet-container\" cdkScrollable\n [@routeAnimations]=\"{value: getAnimationOrder(), params:{duration: animationDuration}}\"\n (@routeAnimations.start)=\"animationStarted()\"\n (@routeAnimations.done)=\"animationDone()\"\n >\n <router-outlet #routerOutlet=\"outlet\"\n (activate)=\"onOutletActivated(routerOutlet, $event)\"\n (deactivate)=\"onOutletDeactivated()\">\n </router-outlet>\n </div>\n</ng-container>\n\n<ng-container *ngIf=\"!animationEnabled.value\">\n <div class=\"router-outlet-container\" cdkScrollable>\n <router-outlet #routerOutlet=\"outlet\"\n (activate)=\"onOutletActivated(routerOutlet, $event)\"\n (deactivate)=\"onOutletDeactivated()\">\n </router-outlet>\n </div>\n</ng-container>\n\n",
195
235
  animations: [LEFT_RIGHT_PLACE_ANIMATION],
196
236
  styles: [":host{display:flex;flex-direction:column;min-height:0}.router-outlet-container{flex:1;display:block;position:relative;min-height:0;overflow-x:hidden;overflow-y:scroll}router-outlet{display:none}"]
197
237
  }),
@@ -1 +1 @@
1
- {"version":3,"file":"place-outlet.component.js","sourceRoot":"ng://@coolon/angular-ui-powerups/","sources":["lib/place/components/place-outlet/place-outlet.component.ts"],"names":[],"mappings":";AAAA,OAAO,EAAE,SAAS,EAAE,YAAY,EAAE,MAAM,EAAE,KAAK,EAAU,QAAQ,EAAE,MAAM,EAAE,QAAQ,EAAE,SAAS,EAAE,MAAM,eAAe,CAAC;AACtH,OAAO,EAAE,cAAc,EAAE,MAAM,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAC;AACvE,OAAO,EAEL,YAAY,EACZ,GAAG,EACH,IAAI,EACJ,SAAS,EACT,iBAAiB,EACjB,gBAAgB,EAChB,iBAAiB,EACjB,aAAa,EACb,UAAU,EAEX,MAAM,gBAAgB,CAAC;AACxB,OAAO,KAAK,CAAC,MAAM,QAAQ,CAAC;AAC5B,OAAO,EAAE,mBAAmB,EAAE,MAAM,0CAA0C,CAAC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,IAAI,EAAE,CAAC;kCACjC,UAAU;8DAAU;IAIlC;QADC,KAAK,CAAC,0BAA0B,CAAC,EAAE,aAAa,EAAE;kCACnB,SAAS;gFAAgC;IAIzE;QADC,KAAK,CAAC,qBAAqB,CAAC,EAAE,gBAAgB,CAAC,gCAAgC,CAAC;;2EACtB;IAG3D;QADC,MAAM,EAAE;;8DACkD;IAG3D;QADC,SAAS,CAAC,aAAa,EAAE,EAAE,MAAM,EAAE,IAAI,EAAE,CAAC;kCAChC,YAAY;2DAAC;IApBb,oBAAoB;QANhC,SAAS,CAAC;YACT,QAAQ,EAAE,kBAAkB;YAC5B,y3BAA4C;YAE5C,UAAU,EAAE,CAAC,0BAA0B,CAAC;;SACzC,CAAC;QAuCa,WAAA,QAAQ,EAAE,CAAA,EAAE,WAAA,MAAM,CAAC,gBAAgB,CAAC,CAAA;QACpC,WAAA,QAAQ,EAAE,CAAA,EAAE,WAAA,QAAQ,EAAE,CAAA;yCAHE,MAAM;YACD,WAAW,UAEH,oBAAoB;OAvC3D,oBAAoB,CA0LhC;IAAD,2BAAC;CAAA,AA1LD,CAA0C,mBAAmB,GA0L5D;SA1LY,oBAAoB","sourcesContent":["import { Component, EventEmitter, Inject, Input, OnInit, Optional, Output, SkipSelf, ViewChild } from '@angular/core';\nimport { ActivatedRoute, Router, RouterOutlet } from '@angular/router';\nimport {\n Constructable,\n DebugContext,\n Dsl,\n lang,\n ListModel,\n MutableValueModel,\n StoreInListModel,\n StoreInValueModel,\n TrackExternal,\n ValueModel,\n ValueModelChain\n} from '@coolon/pectin';\nimport * as _ from 'lodash';\nimport { DisposableComponent } from '../../../components/disposable-component';\nimport { PlaceComponent } from '../../place-component';\nimport { AUP_PLACE_CONFIG, PlaceConfig } from '../../place-config';\nimport { PlaceDefinition } from '../../place-definition';\nimport { PlaceRouter } from '../../place-router';\n\nimport { Visit } from '../../visit';\nimport { LEFT_RIGHT_PLACE_ANIMATION } from './route-animations';\n\n// Quick hack to avoid circular references between this and PlaceComponents.\ninterface PlaceRef {\n readonly placeDefinition: PlaceDefinition\n\n initialiseBindings(param: ValueModel<Visit>): void;\n\n onPlaceReady(): void;\n}\n\n@Component({\n selector: 'aup-place-outlet',\n templateUrl: './place-outlet.component.html',\n styleUrls: ['./place-outlet.component.scss'],\n animations: [LEFT_RIGHT_PLACE_ANIMATION]\n})\nexport class PlaceOutletComponent extends DisposableComponent implements OnInit {\n\n @Input() @StoreInValueModel('animateModel')\n animate: boolean;\n\n @Input() @TrackExternal({ defaultValue: true })\n animateModel: ValueModel<boolean>;\n\n // tslint:disable-next-line:no-input-rename\n @Input('placeAnimationOrderModel') @TrackExternal()\n customPlaceAnimationOrderModel: ListModel<Constructable<PlaceComponent>>;\n\n // tslint:disable-next-line:no-input-rename\n @Input('placeAnimationOrder') @StoreInListModel('customPlaceAnimationOrderModel')\n customPlaceAnimationOrder: Constructable<PlaceComponent>[];\n\n @Output()\n readonly placeChanged = new EventEmitter<PlaceComponent>();\n\n @ViewChild('routeOutlet', { static: true })\n routerOut: RouterOutlet;\n\n\n private outletActivated = new MutableValueModel(false);\n private readonly _activatedRouteModel = new MutableValueModel<ActivatedRoute>();\n private readonly _activePlaceModel = new MutableValueModel<PlaceComponent>();\n private readonly _activePlaceDefinition: ValueModelChain<PlaceDefinition>;\n\n private parentOutletModel: MutableValueModel<PlaceOutletComponent>;\n public readonly placeAnimationOrder: ValueModelChain<number>;\n\n private initialPlaceIndex: number = null;\n private routerVisitModel: ValueModelChain<Visit>;\n private _isPushingVisitToRoute = new MutableValueModel<boolean>(false);\n private navigationInProgress: ValueModelChain<boolean>;\n\n constructor(private readonly router: Router,\n private readonly placeRouter: PlaceRouter,\n @Optional() @Inject(AUP_PLACE_CONFIG) readonly placeConfig: PlaceConfig,\n @SkipSelf() @Optional() parentOutlet: PlaceOutletComponent) {\n super();\n const { chain, valueOf, before, when, after, observe, switchOn } = Dsl.disposeWith(this);\n\n this.parentOutletModel = new MutableValueModel(parentOutlet);\n\n const defaultPlaceAnimationOrder = chain(this.parentOutletModel)\n .pullValueModel(o => o.activePlaceModel)\n .pluck('placeDefinition')\n .pluckList('children')\n .pluck('component');\n\n const activatePlaceType = chain(this.activePlaceModel).map(p => p.constructor as Constructable<PlaceComponent>);\n this.placeAnimationOrder = chain(this.customPlaceAnimationOrderModel)\n .otherwise(defaultPlaceAnimationOrder)\n .reduce((placesInOrder) => {\n let placeIndex = 0;\n if (activatePlaceType.value) {\n placeIndex = placesInOrder.indexOf(activatePlaceType.value);\n if (_.isNil(this.initialPlaceIndex)) {\n this.initialPlaceIndex = placeIndex;\n }\n }\n return _.isNil(this.initialPlaceIndex) ? 0 : placeIndex - this.initialPlaceIndex;\n }, { dependsOn: activatePlaceType });\n\n // Extract our visit model from the place router.\n this._activePlaceDefinition = chain(this._activePlaceModel).pluck('placeDefinition');\n this.routerVisitModel = this._activePlaceDefinition.findIn(chain(placeRouter.activeVisitsByPlaceDefinition));\n\n this.navigationInProgress = chain(this.placeRouter.navigationInProgress);\n when.valueOf(this.navigationInProgress).becomesFalsey(() => {\n this.checkStateAndInitialise();\n });\n when.valueOf(this.outletActivated).becomesTruthy(() => {\n this.checkStateAndInitialise();\n });\n\n chain(this._activePlaceModel)\n .postponeWhile(this.navigationInProgress)\n .subscribe(place => this.placeChanged.emit(place));\n\n }\n\n // @Trace()\n ngOnInit() {\n }\n\n // @Trace()\n getAnimationOrder() {\n return this.placeAnimationOrder.value;\n }\n\n get animationDuration() {\n return this.placeConfig && this.placeConfig.animationDuration ? this.placeConfig.animationDuration : '500ms';\n }\n\n // @Trace()\n navigate(visit: Visit) {\n // console.log({ activatedRoute: this._activatedRouteModel.value });\n this.placeRouter.navigate(visit, {\n relativeTo: this.parentOutlet ? this.parentOutlet.activatedRouteModel.value : null\n });\n }\n\n get parentOutlet(): PlaceOutletComponent {\n return this.parentOutletModel.value;\n }\n\n\n get activePlaceModel(): ValueModel<PlaceComponent> {\n return this._activePlaceModel.readonly;\n }\n\n get activatedRouteModel(): ValueModel<ActivatedRoute> {\n return this._activatedRouteModel.readonly;\n }\n\n // @Trace()\n onOutletActivated(routerOutlet: RouterOutlet, place: PlaceComponent) {\n this._activatedRouteModel.value = routerOutlet.activatedRoute;\n this._activePlaceModel.value = place;\n this.outletActivated.value = true;\n this.checkStateAndInitialise();\n }\n\n // @Trace()\n onOutletDeactivated() {\n this.outletActivated.value = false;\n this._activePlaceModel.value = null;\n this._activatedRouteModel.value = null;\n }\n\n // @Trace()\n private checkStateAndInitialise() {\n const routerVisit = this.routerVisitModel.value;\n const activePlace = this.activePlaceModel.value;\n if (routerVisit && activePlace && !activePlace.isInitialised()) {\n if (routerVisit.placeDefinition !== activePlace.placeDefinition) {\n lang.illegalState('wrong visit!!!');\n }\n this.initialisePlace(routerVisit, activePlace);\n }\n }\n\n // @Trace()\n private initialisePlace(routerVisit: Visit, activePlace: PlaceComponent) {\n const visitModel = new MutableValueModel<Visit>(routerVisit);\n DebugContext.tag(visitModel, `PlaceOutletComponent[${activePlace.constructor.name})].visitModel`);\n activePlace.initialiseVisit(routerVisit, (current, previous) => {\n this.pushVisitChangeToRoute(previous, current);\n });\n if (!this.animateModel.value) {\n // we're not animating so trigger any post animation callbacks now.\n this.animationDone();\n }\n const { when, chain, valueOf } = Dsl.disposeWith(activePlace);\n when.valueOf(this.routerVisitModel)\n .changes(visit => {\n activePlace.updateVisit(visit);\n }, {\n unless: valueOf.any(\n this._isPushingVisitToRoute,\n this.routerVisitModel.isNil()\n ).areTruthy()\n });\n }\n\n private pushVisitChangeToRoute(previous: Visit, current: Visit) {\n this._isPushingVisitToRoute.value = true;\n this.placeRouter.pushVisitChangesToRoute(previous, current).finally(() => {\n this._isPushingVisitToRoute.value = false;\n });\n }\n\n// @Trace()\n animationStarted() {\n // console.log({ activePlace: this._activePlaceModel.value });\n }\n\n // @Trace()\n animationDone() {\n if (this._activePlaceModel.value) {\n this._activePlaceModel.value.onPlaceReady();\n }\n }\n\n}\n"]}
1
+ {"version":3,"file":"place-outlet.component.js","source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2BAAC;CAAA,AAnOD,CAA0C,mBAAmB,GAmO5D;SAnOY,oBAAoB","sourcesContent":["import { Component, EventEmitter, Inject, Input, OnInit, Optional, Output, SkipSelf, ViewChild } from '@angular/core';\nimport { ActivatedRoute, Router, RouterOutlet } from '@angular/router';\nimport {\n BooleanValueModelChain,\n Constructable,\n DebugContext,\n Dsl,\n lang,\n ListModel, ListModelChain,\n MutableValueModel,\n StoreInListModel,\n StoreInValueModel, Trace,\n TrackExternal,\n ValueModel,\n ValueModelChain\n} from '@coolon/pectin';\nimport * as _ from 'lodash';\nimport { DisposableComponent } from '../../../components/disposable-component';\nimport { PlaceComponent } from '../../place-component';\nimport { AUP_PLACE_CONFIG, PlaceConfig } from '../../place-config';\nimport { PlaceDefinition } from '../../place-definition';\nimport { PlaceRouter } from '../../place-router';\n\nimport { Visit } from '../../visit';\nimport { LEFT_RIGHT_PLACE_ANIMATION } from './route-animations';\n\n// Quick hack to avoid circular references between this and PlaceComponents.\ninterface PlaceRef {\n readonly placeDefinition: PlaceDefinition\n\n initialiseBindings(param: ValueModel<Visit>): void;\n\n onPlaceReady(): void;\n}\n\n@Component({\n selector: 'aup-place-outlet',\n templateUrl: './place-outlet.component.html',\n styleUrls: ['./place-outlet.component.scss'],\n animations: [LEFT_RIGHT_PLACE_ANIMATION]\n})\nexport class PlaceOutletComponent extends DisposableComponent implements OnInit {\n\n @Input() @StoreInValueModel('animateModel')\n animate: boolean;\n\n @Input() @TrackExternal({ defaultValue: true })\n animateModel: ValueModel<boolean>;\n\n // tslint:disable-next-line:no-input-rename\n @Input('placeAnimationOrderModel') @TrackExternal()\n customPlaceAnimationOrderModel: ListModel<Constructable<PlaceComponent>>;\n\n // tslint:disable-next-line:no-input-rename\n @Input('placeAnimationOrder') @StoreInListModel('customPlaceAnimationOrderModel')\n customPlaceAnimationOrder: Constructable<PlaceComponent>[];\n\n @Output()\n readonly placeChanged = new EventEmitter<PlaceComponent>();\n\n @ViewChild('routeOutlet', { static: true })\n routerOut: RouterOutlet;\n\n private onAnimationFinishedJob: () => void;\n\n\n private outletActivated = new MutableValueModel(false);\n private readonly _activatedRouteModel = new MutableValueModel<ActivatedRoute>();\n private readonly _activePlaceModel = new MutableValueModel<PlaceComponent>();\n private readonly _activePlaceDefinition: ValueModelChain<PlaceDefinition>;\n\n private parentOutletModel: MutableValueModel<PlaceOutletComponent>;\n public readonly activePlaceAnimationPosition: ValueModelChain<number>;\n\n private initialPlaceIndex: number = null;\n private routerVisitModel: ValueModelChain<Visit>;\n private _isPushingVisitToRoute = new MutableValueModel<boolean>(false);\n private navigationInProgress: ValueModelChain<boolean>;\n\n private isVeryFirstLoad = true;\n private placesInAnimationOrder: ListModelChain<Constructable<PlaceComponent>>;\n private animationSupported: BooleanValueModelChain;\n readonly animationEnabled: BooleanValueModelChain;\n\n constructor(private readonly router: Router,\n private readonly placeRouter: PlaceRouter,\n @Optional() @Inject(AUP_PLACE_CONFIG) readonly placeConfig: PlaceConfig,\n @SkipSelf() @Optional() parentOutlet: PlaceOutletComponent) {\n super();\n const { chain, valueOf, before, when, after, observe, switchOn } = Dsl.disposeWith(this);\n\n this.parentOutletModel = new MutableValueModel(parentOutlet);\n\n const defaultPlaceAnimationOrder = chain(this.parentOutletModel)\n .pullValueModel(o => o.activePlaceModel)\n .pluck('placeDefinition')\n .pluckList('children')\n .pluck('component');\n\n const activatePlaceType = chain(this.activePlaceModel).map(p => p.constructor as Constructable<PlaceComponent>);\n\n this.placesInAnimationOrder = chain(this.customPlaceAnimationOrderModel)\n .otherwise(defaultPlaceAnimationOrder);\n\n this.activePlaceAnimationPosition = this.placesInAnimationOrder\n .reduce((placesInOrder) => {\n let placeIndex = 0;\n if (activatePlaceType.value) {\n placeIndex = placesInOrder.indexOf(activatePlaceType.value);\n if (_.isNil(this.initialPlaceIndex)) {\n this.initialPlaceIndex = placeIndex;\n }\n }\n return _.isNil(this.initialPlaceIndex) ? 0 : placeIndex - this.initialPlaceIndex;\n }, { dependsOn: activatePlaceType });\n\n this.animationSupported = this.placesInAnimationOrder.count().isGreaterThan(0);\n this.animationEnabled = valueOf.all(\n this.animateModel,\n this.animationSupported\n ).areTruthy();\n\n // Extract our visit model from the place router.\n this._activePlaceDefinition = chain(this._activePlaceModel).pluck('placeDefinition');\n this.routerVisitModel = this._activePlaceDefinition.findIn(chain(placeRouter.activeVisitsByPlaceDefinition));\n\n this.navigationInProgress = chain(this.placeRouter.navigationInProgress);\n\n when(this.navigationInProgress).becomesFalsey(() => {\n this.checkStateAndInitialise();\n });\n when(this.outletActivated).becomesTruthy(() => {\n this.checkStateAndInitialise();\n });\n\n chain(this._activePlaceModel)\n .postponeWhile(this.navigationInProgress)\n .subscribe(place => this.placeChanged.emit(place));\n\n }\n\n // @Trace()\n ngOnInit() {\n }\n\n // @Trace()\n getAnimationOrder() {\n return this.activePlaceAnimationPosition.value;\n }\n\n get animationDuration() {\n return this.placeConfig && this.placeConfig.animationDuration ? this.placeConfig.animationDuration : '500ms';\n }\n\n // @Trace()\n navigate(visit: Visit) {\n // const place = this.placesInAnimationOrder.query().findMatching(p => visit.placeDefinition.component === p);\n // if (!place) {\n // lang.illegalState()\n // }\n this.placeRouter.navigate(visit, {\n relativeTo: this.parentOutlet ? this.parentOutlet.activatedRouteModel.value : null\n });\n }\n\n get parentOutlet(): PlaceOutletComponent {\n return this.parentOutletModel.value;\n }\n\n\n get activePlaceModel(): ValueModel<PlaceComponent> {\n return this._activePlaceModel.readonly;\n }\n\n get activatedRouteModel(): ValueModel<ActivatedRoute> {\n return this._activatedRouteModel.readonly;\n }\n\n @Trace()\n onOutletActivated(routerOutlet: RouterOutlet, place: PlaceComponent) {\n this._activatedRouteModel.value = routerOutlet.activatedRoute;\n this._activePlaceModel.value = place;\n this.validateAnimationState(place);\n this.outletActivated.value = true;\n this.checkStateAndInitialise();\n }\n\n private validateAnimationState(place: PlaceComponent) {\n if (this.animateModel.value) {\n if (this.placesInAnimationOrder.length < 1) {\n console.error('PlaceOutlet.animate === true but placeAnimationOrder has not been set. Animation is disabled.');\n } else {\n if (!this.placesInAnimationOrder.query().includes(place.placeDefinition.component)) {\n console.error(`PlaceOutlet.animate === true but placeAnimationOrder doesn't contain ${place.placeDefinition.component.name}.`);\n }\n }\n }\n }\n\n @Trace()\n onOutletDeactivated() {\n this.outletActivated.value = false;\n this._activePlaceModel.value = null;\n this._activatedRouteModel.value = null;\n }\n\n // @Trace()\n private checkStateAndInitialise() {\n const routerVisit = this.routerVisitModel.value;\n const activePlace = this.activePlaceModel.value;\n if (routerVisit && activePlace && !activePlace.isInitialised()) {\n if (routerVisit.placeDefinition !== activePlace.placeDefinition) {\n lang.illegalState('wrong visit!!!');\n }\n this.initialisePlace(routerVisit, activePlace);\n }\n }\n\n private initialisePlace(routerVisit: Visit, activePlace: PlaceComponent) {\n const visitModel = new MutableValueModel<Visit>(routerVisit);\n DebugContext.tag(visitModel, `PlaceOutletComponent[${activePlace.constructor.name})].visitModel`);\n activePlace.initialiseVisit(routerVisit, (current, previous) => {\n this.pushVisitChangeToRoute(previous, current);\n });\n const finishPlaceLoad = () => {\n this._activePlaceModel.value._notifyActive(true);\n }\n if (!this.animationEnabled.value || this.isVeryFirstLoad) {\n // if animation is disabled or this is the very first load then\n // we won't get our animation done callback so we finish the\n // process here and now.\n this.isVeryFirstLoad = false;\n finishPlaceLoad()\n } else {\n this.onAnimationFinishedJob = finishPlaceLoad;\n }\n const { when, chain, valueOf } = Dsl.disposeWith(activePlace);\n when.valueOf(this.routerVisitModel)\n .changes(visit => {\n activePlace.updateVisit(visit);\n }, {\n unless: valueOf.any(\n this._isPushingVisitToRoute,\n this.routerVisitModel.isNil()\n ).areTruthy()\n });\n }\n\n private pushVisitChangeToRoute(previous: Visit, current: Visit) {\n this._isPushingVisitToRoute.value = true;\n this.placeRouter.pushVisitChangesToRoute(previous, current).finally(() => {\n this._isPushingVisitToRoute.value = false;\n });\n }\n\n// @Trace()\n animationStarted() {\n // console.log({ activePlace: this._activePlaceModel.value });\n }\n\n // @Trace()\n animationDone() {\n if (this.onAnimationFinishedJob) {\n this.onAnimationFinishedJob();\n this.onAnimationFinishedJob = undefined;\n }\n }\n\n}\n"]}
@@ -41,7 +41,7 @@ import { AbstractPlaceNavigationComponent } from '../abstract-place-navigation.c
41
41
  * (at)Place({
42
42
  * path: 'myPlace',
43
43
  * data: {
44
- * nav: I18n.places.myPlace.nav()
44
+ * nav: I18n.places.myPlace.nav
45
45
  * }
46
46
  * })
47
47
  */
@@ -77,7 +77,7 @@ var SidePlaceNavigationComponent = /** @class */ (function (_super) {
77
77
  SidePlaceNavigationComponent = __decorate([
78
78
  Component({
79
79
  selector: 'aup-side-place-navigation',
80
- template: "<mat-nav-list>\n <a mat-list-item (click)=\"toggleMenu()\" class=\"home\">\n <aup-icon class=\"collapsed-only\" icon=\"mat:menu\"></aup-icon>\n <aup-icon class=\"expanded-only\" icon=\"mat:arrow_back\"></aup-icon>\n <span class=\"expanded-only\">Menu</span>\n </a>\n <a mat-list-item *ngFor=\"let placeDefinition of placeDefinitions.value\"\n [pectinCommand]=\"commandFactory.create(placeDefinition)\"\n [class.active]=\"isActive(placeDefinition)\"\n [matTooltip]=\"getNav(placeDefinition).tooltip()\">\n <aup-icon *ngIf=\"getNav(placeDefinition).icon()\" [icon]=\"getNav(placeDefinition).icon()\"></aup-icon>\n <span\n class=\"expanded-only\">{{getNav(placeDefinition).title()}}</span>\n </a>\n <span [style.flex]=\"1\"></span>\n <ng-container *ngIf=\"navEndTemplate\" [ngTemplateOutlet]=\"navEndTemplate\"></ng-container>\n</mat-nav-list>\n",
80
+ template: "<mat-nav-list>\n <a mat-list-item (click)=\"toggleMenu()\" class=\"home\">\n <aup-icon class=\"collapsed-only\" icon=\"mat:menu\"></aup-icon>\n <aup-icon class=\"expanded-only\" icon=\"mat:arrow_back\"></aup-icon>\n <span class=\"expanded-only\">Menu</span>\n </a>\n <a mat-list-item *ngFor=\"let placeDefinition of placeDefinitions.value\"\n [pectinCommand]=\"commandFactory.create(placeDefinition)\"\n [class.active]=\"isActive(placeDefinition)\"\n [matTooltip]=\"getNavigationFace(placeDefinition).tooltip()\">\n <aup-icon *ngIf=\"getNavigationFace(placeDefinition).icon()\" [icon]=\"getNavigationFace(placeDefinition).icon()\"></aup-icon>\n <span class=\"expanded-only\">{{getNavigationFace(placeDefinition).text()}}</span>\n </a>\n <span [style.flex]=\"1\"></span>\n <ng-container *ngIf=\"navEndTemplate\" [ngTemplateOutlet]=\"navEndTemplate\"></ng-container>\n</mat-nav-list>\n",
81
81
  styles: [":host{display:flex;flex-direction:column;--resolved-nav-item-width:var(--nav-width, 56px);--resolved-nav-item-height:var(--nav-item-height, var(--resolved-nav-item-width));--resolved-expanded-width:var(--nav-expanded-width, 235px);--resolved-color:var(--nav-color, rgba(255, 255, 255, 0.9));--resolved-background-color:var(--nav-background-color, #555);width:var(--resolved-nav-item-width);transition:width 125ms linear;background-color:var(--resolved-background-color);color:var(--resolved-color)}:host.expanded{width:var(--resolved-expanded-width);max-width:var(--resolved-expanded-width)}:host-context(.expanded) .expanded-only{max-width:100%}:host-context(.expanded) .collapsed-only{max-width:0}:host-context(.expanded) .mat-list-item aup-icon:not(.collapsed-only){margin-right:12px}:host-context(.expanded) .mat-list-item span{text-wrap:none;white-space:nowrap}.expanded-only{max-width:0;overflow:hidden}.collapsed-only{max-width:100%;overflow:hidden}mat-nav-list{flex:1;display:flex;flex-direction:column}.mat-list-item{width:var(--resolved-nav-item-width);height:var(--resolved-nav-item-height);color:inherit}.mat-list-item.active{background-color:#444}.mat-list-item.home{text-align:left}mat-icon{color:inherit}mat-icon.flip-horizontal{transform:scaleX(-1)}"]
82
82
  }),
83
83
  __metadata("design:paramtypes", [Router, PlaceRouter])
@@ -1 +1 @@
1
- {"version":3,"file":"side-place-navigation.component.js","sourceRoot":"ng://@coolon/angular-ui-powerups/","sources":["lib/place/components/side-place-navigation/side-place-navigation.component.ts"],"names":[],"mappings":";AAAA,OAAO,EAAE,SAAS,EAAE,YAAY,EAAE,WAAW,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AAClF,OAAO,EAAE,MAAM,EAAE,MAAM,iBAAiB,CAAC;AACzC,OAAO,EAAE,WAAW,EAAE,MAAM,oBAAoB,CAAC;AACjD,OAAO,EAAE,gCAAgC,EAAE,MAAM,wCAAwC,CAAC;AAG1F;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAyCG;AAMH;IAAkD,gDAAgC;IAQhF,sCAAqB,MAAc,EAAE,WAAwB;QAA7D,YACE,kBAAM,WAAW,CAAC,SACnB;QAFoB,YAAM,GAAN,MAAM,CAAQ;QAL5B,cAAQ,GAAG,KAAK,CAAC;;IAOxB,CAAC;IAED,iDAAU,GAAV;QACE,IAAI,CAAC,QAAQ,GAAG,IAAI,CAAC;IACvB,CAAC;IAED,mDAAY,GAAZ;QACE,IAAI,CAAC,QAAQ,GAAG,KAAK,CAAC;IACxB,CAAC;IAED,iDAAU,GAAV;QACE,IAAI,CAAC,QAAQ,GAAG,CAAC,IAAI,CAAC,QAAQ,CAAC;IACjC,CAAC;;gBAd4B,MAAM;gBAAe,WAAW;;IAL7D;QADC,WAAW,CAAC,gBAAgB,CAAC;;kEACN;IAGxB;QADC,YAAY,CAAC,gBAAgB,CAAC;kCACf,WAAW;wEAAM;IANtB,4BAA4B;QALxC,SAAS,CAAC;YACT,QAAQ,EAAE,2BAA2B;YACrC,43BAAqD;;SAEtD,CAAC;yCAS6B,MAAM,EAAe,WAAW;OARlD,4BAA4B,CAuBxC;IAAD,mCAAC;CAAA,AAvBD,CAAkD,gCAAgC,GAuBjF;SAvBY,4BAA4B","sourcesContent":["import { Component, ContentChild, HostBinding, TemplateRef } from '@angular/core';\nimport { Router } from '@angular/router';\nimport { PlaceRouter } from '../../place-router';\nimport { AbstractPlaceNavigationComponent } from '../abstract-place-navigation.component';\n\n\n/**\n * @example\n * // Usage\n * <aup-vertical-place-navigation [places]=\"placeConstructorArray\"\n * [placeOutlet]=\"placeOutletComponent\">\n * </aup-vertical-place-navigation>\n * <aup-place-outlet #placeOutletComponent></aup-place-outlet>\n *\n * // CSS overrides:\n * aup-side-place-navigation {\n * --nav-width: 56px\n * --nav-expanded-width: 235px\n * --nav-item-height: var(--nav-width)\n * --nav-background-color: #555;\n * --nav-color: rgba(255, 255, 255, 0.9);\n * }\n *\n * // Content Templates:\n * #navEndTemplate\n * <ng-template #navEndTemplate>\n * <a mat-list-item (click)=\"logout()\" matTooltip=\"Logout\">\n * <mat-icon>exit_to_app</mat-icon>\n * <span *ngIf=\"sideNav.expanded\">Logout</span>\n * </a>\n * </nav-template>\n *\n * // Place nav item in an i18n.yml\n * places:\n * myPlace:\n * nav(NavItem):\n * title: \"Activities\"\n * icon: \"build\"\n * tooltip: \"Alerts, confirms and dialogs\"\n *\n * // In your place\n * (at)Place({\n * path: 'myPlace',\n * data: {\n * nav: I18n.places.myPlace.nav()\n * }\n * })\n */\n@Component({\n selector: 'aup-side-place-navigation',\n templateUrl: './side-place-navigation.component.html',\n styleUrls: ['./side-place-navigation.component.scss']\n})\nexport class SidePlaceNavigationComponent extends AbstractPlaceNavigationComponent {\n\n @HostBinding('class.expanded')\n public expanded = false;\n\n @ContentChild('navEndTemplate')\n navEndTemplate: TemplateRef<any>;\n\n constructor(readonly router: Router, placeRouter: PlaceRouter) {\n super(placeRouter);\n }\n\n expandMenu() {\n this.expanded = true;\n }\n\n collapseMenu() {\n this.expanded = false;\n }\n\n toggleMenu() {\n this.expanded = !this.expanded;\n }\n}\n"]}
1
+ {"version":3,"file":"side-place-navigation.component.js","sourceRoot":"ng://@coolon/angular-ui-powerups/","sources":["lib/place/components/side-place-navigation/side-place-navigation.component.ts"],"names":[],"mappings":";AAAA,OAAO,EAAE,SAAS,EAAE,YAAY,EAAE,WAAW,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AAClF,OAAO,EAAE,MAAM,EAAE,MAAM,iBAAiB,CAAC;AACzC,OAAO,EAAE,WAAW,EAAE,MAAM,oBAAoB,CAAC;AACjD,OAAO,EAAE,gCAAgC,EAAE,MAAM,wCAAwC,CAAC;AAG1F;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAyCG;AAMH;IAAkD,gDAAgC;IAQhF,sCAAqB,MAAc,EAAE,WAAwB;QAA7D,YACE,kBAAM,WAAW,CAAC,SACnB;QAFoB,YAAM,GAAN,MAAM,CAAQ;QAL5B,cAAQ,GAAG,KAAK,CAAC;;IAOxB,CAAC;IAED,iDAAU,GAAV;QACE,IAAI,CAAC,QAAQ,GAAG,IAAI,CAAC;IACvB,CAAC;IAED,mDAAY,GAAZ;QACE,IAAI,CAAC,QAAQ,GAAG,KAAK,CAAC;IACxB,CAAC;IAED,iDAAU,GAAV;QACE,IAAI,CAAC,QAAQ,GAAG,CAAC,IAAI,CAAC,QAAQ,CAAC;IACjC,CAAC;;gBAd4B,MAAM;gBAAe,WAAW;;IAL7D;QADC,WAAW,CAAC,gBAAgB,CAAC;;kEACN;IAGxB;QADC,YAAY,CAAC,gBAAgB,CAAC;kCACf,WAAW;wEAAM;IANtB,4BAA4B;QALxC,SAAS,CAAC;YACT,QAAQ,EAAE,2BAA2B;YACrC,g6BAAqD;;SAEtD,CAAC;yCAS6B,MAAM,EAAe,WAAW;OARlD,4BAA4B,CAuBxC;IAAD,mCAAC;CAAA,AAvBD,CAAkD,gCAAgC,GAuBjF;SAvBY,4BAA4B","sourcesContent":["import { Component, ContentChild, HostBinding, TemplateRef } from '@angular/core';\nimport { Router } from '@angular/router';\nimport { PlaceRouter } from '../../place-router';\nimport { AbstractPlaceNavigationComponent } from '../abstract-place-navigation.component';\n\n\n/**\n * @example\n * // Usage\n * <aup-vertical-place-navigation [places]=\"placeConstructorArray\"\n * [placeOutlet]=\"placeOutletComponent\">\n * </aup-vertical-place-navigation>\n * <aup-place-outlet #placeOutletComponent></aup-place-outlet>\n *\n * // CSS overrides:\n * aup-side-place-navigation {\n * --nav-width: 56px\n * --nav-expanded-width: 235px\n * --nav-item-height: var(--nav-width)\n * --nav-background-color: #555;\n * --nav-color: rgba(255, 255, 255, 0.9);\n * }\n *\n * // Content Templates:\n * #navEndTemplate\n * <ng-template #navEndTemplate>\n * <a mat-list-item (click)=\"logout()\" matTooltip=\"Logout\">\n * <mat-icon>exit_to_app</mat-icon>\n * <span *ngIf=\"sideNav.expanded\">Logout</span>\n * </a>\n * </nav-template>\n *\n * // Place nav item in an i18n.yml\n * places:\n * myPlace:\n * nav(NavItem):\n * title: \"Activities\"\n * icon: \"build\"\n * tooltip: \"Alerts, confirms and dialogs\"\n *\n * // In your place\n * (at)Place({\n * path: 'myPlace',\n * data: {\n * nav: I18n.places.myPlace.nav\n * }\n * })\n */\n@Component({\n selector: 'aup-side-place-navigation',\n templateUrl: './side-place-navigation.component.html',\n styleUrls: ['./side-place-navigation.component.scss']\n})\nexport class SidePlaceNavigationComponent extends AbstractPlaceNavigationComponent {\n\n @HostBinding('class.expanded')\n public expanded = false;\n\n @ContentChild('navEndTemplate')\n navEndTemplate: TemplateRef<any>;\n\n constructor(readonly router: Router, placeRouter: PlaceRouter) {\n super(placeRouter);\n }\n\n expandMenu() {\n this.expanded = true;\n }\n\n collapseMenu() {\n this.expanded = false;\n }\n\n toggleMenu() {\n this.expanded = !this.expanded;\n }\n}\n"]}
@@ -13,7 +13,7 @@ var TabbedPlaceNavigationComponent = /** @class */ (function (_super) {
13
13
  TabbedPlaceNavigationComponent = __decorate([
14
14
  Component({
15
15
  selector: 'aup-tabbed-place-navigation',
16
- template: "<nav mat-tab-nav-bar>\n <a mat-tab-link *ngFor=\"let placeDefinition of placeDefinitions.value\"\n [pectinCommand]=\"commandFactory.create(placeDefinition)\"\n [active]=\"isActive(placeDefinition)\"\n [matTooltip]=\"getNav(placeDefinition).tooltip()\">\n <aup-icon *ngIf=\"getNav(placeDefinition).icon()\" [icon]=\"getNav(placeDefinition).icon()\"></aup-icon>\n <span>{{getNav(placeDefinition).title()}}</span>\n </a>\n</nav>\n",
16
+ template: "<nav mat-tab-nav-bar>\n <a mat-tab-link *ngFor=\"let placeDefinition of placeDefinitions.value\"\n [pectinCommand]=\"commandFactory.create(placeDefinition)\"\n [active]=\"isActive(placeDefinition)\"\n [matTooltip]=\"getNavigationFace(placeDefinition).tooltip()\">\n <aup-command-face [face]=\"getNavigationFace(placeDefinition)\"></aup-command-face>\n </a>\n</nav>\n",
17
17
  styles: [""]
18
18
  }),
19
19
  __metadata("design:paramtypes", [PlaceRouter])
@@ -1 +1 @@
1
- {"version":3,"file":"tabbed-place-navigation.component.js","sourceRoot":"ng://@coolon/angular-ui-powerups/","sources":["lib/place/components/tabbed-place-navigation/tabbed-place-navigation.component.ts"],"names":[],"mappings":";AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,eAAe,CAAC;AAC1C,OAAO,EAAE,WAAW,EAAE,MAAM,oBAAoB,CAAC;AACjD,OAAO,EAAE,gCAAgC,EAAE,MAAM,wCAAwC,CAAC;AAO1F;IAAoD,kDAAgC;IAClF,wCAAY,WAAuB;eACjC,kBAAM,WAAW,CAAC;IACpB,CAAC;;gBAFuB,WAAW;;IADxB,8BAA8B;QAL1C,SAAS,CAAC;YACT,QAAQ,EAAE,6BAA6B;YACvC,2cAAuD;;SAExD,CAAC;yCAEwB,WAAW;OADxB,8BAA8B,CAI1C;IAAD,qCAAC;CAAA,AAJD,CAAoD,gCAAgC,GAInF;SAJY,8BAA8B","sourcesContent":["import { Component } from '@angular/core';\nimport { PlaceRouter } from '../../place-router';\nimport { AbstractPlaceNavigationComponent } from '../abstract-place-navigation.component';\n\n@Component({\n selector: 'aup-tabbed-place-navigation',\n templateUrl: './tabbed-place-navigation.component.html',\n styleUrls: ['./tabbed-place-navigation.component.scss']\n})\nexport class TabbedPlaceNavigationComponent extends AbstractPlaceNavigationComponent {\n constructor(placeRouter:PlaceRouter) {\n super(placeRouter);\n }\n}\n"]}
1
+ {"version":3,"file":"tabbed-place-navigation.component.js","sourceRoot":"ng://@coolon/angular-ui-powerups/","sources":["lib/place/components/tabbed-place-navigation/tabbed-place-navigation.component.ts"],"names":[],"mappings":";AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,eAAe,CAAC;AAC1C,OAAO,EAAE,WAAW,EAAE,MAAM,oBAAoB,CAAC;AACjD,OAAO,EAAE,gCAAgC,EAAE,MAAM,wCAAwC,CAAC;AAO1F;IAAoD,kDAAgC;IAClF,wCAAY,WAAuB;eACjC,kBAAM,WAAW,CAAC;IACpB,CAAC;;gBAFuB,WAAW;;IADxB,8BAA8B;QAL1C,SAAS,CAAC;YACT,QAAQ,EAAE,6BAA6B;YACvC,2YAAuD;;SAExD,CAAC;yCAEwB,WAAW;OADxB,8BAA8B,CAI1C;IAAD,qCAAC;CAAA,AAJD,CAAoD,gCAAgC,GAInF;SAJY,8BAA8B","sourcesContent":["import { Component } from '@angular/core';\nimport { PlaceRouter } from '../../place-router';\nimport { AbstractPlaceNavigationComponent } from '../abstract-place-navigation.component';\n\n@Component({\n selector: 'aup-tabbed-place-navigation',\n templateUrl: './tabbed-place-navigation.component.html',\n styleUrls: ['./tabbed-place-navigation.component.scss']\n})\nexport class TabbedPlaceNavigationComponent extends AbstractPlaceNavigationComponent {\n constructor(placeRouter:PlaceRouter) {\n super(placeRouter);\n }\n}\n"]}
@@ -16,6 +16,9 @@ var PlaceComponent = /** @class */ (function (_super) {
16
16
  var _this = _super.call(this) || this;
17
17
  _this.visitModel = new MutableValueModel();
18
18
  _this._inVisitUpdate = new Guard();
19
+ _this._active = new MutableValueModel(false);
20
+ var _a = Dsl.disposeWith(_this), chain = _a.chain, valueOf = _a.valueOf, before = _a.before, when = _a.when, after = _a.after, observe = _a.observe, switchOn = _a.switchOn;
21
+ when(_this._active).becomesTruthy(function () { return _this.onPlaceReady(); });
19
22
  return _this;
20
23
  }
21
24
  PlaceComponent_1 = PlaceComponent;
@@ -25,7 +28,7 @@ var PlaceComponent = /** @class */ (function (_super) {
25
28
  assert.isNil(this.visitModel.value);
26
29
  var when = Dsl.disposeWith(this).when;
27
30
  this.visitModel.value = visit;
28
- DebugContext.get(this.visitModel).tag(this.placeDefinition.component.name + ".visitModel");
31
+ DebugContext.getOrCreate(this.visitModel).tag(this.placeDefinition.component.name + ".visitModel");
29
32
  this.placeDefinition.getVisitParameterDefs().forEach(function (parameterDef) { return _this.installBinding(parameterDef); });
30
33
  when.valueOf(this.visitModel).changes(function (current, previous) {
31
34
  notifyVisitChanged(current, previous);
@@ -73,6 +76,19 @@ var PlaceComponent = /** @class */ (function (_super) {
73
76
  enumerable: true,
74
77
  configurable: true
75
78
  });
79
+ Object.defineProperty(PlaceComponent.prototype, "active", {
80
+ get: function () {
81
+ return this._active.readonly;
82
+ },
83
+ enumerable: true,
84
+ configurable: true
85
+ });
86
+ /**
87
+ * Called by the router when the place is ready to interact after any animations have run.
88
+ */
89
+ PlaceComponent.prototype._notifyActive = function (active) {
90
+ this._active.value = active;
91
+ };
76
92
  PlaceComponent.prototype.onPlaceReady = function () {
77
93
  };
78
94
  var PlaceComponent_1;
@@ -1 +1 @@
1
- {"version":3,"file":"place-component.js","sourceRoot":"ng://@coolon/angular-ui-powerups/","sources":["lib/place/place-component.ts"],"names":[],"mappings":";AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,eAAe,CAAC;AAC1C,OAAO,EACL,MAAM,EACN,OAAO,EAEP,YAAY,EACZ,GAAG,EACH,KAAK,EAEL,IAAI,EACJ,iBAAiB,EAClB,MAAM,gBAAgB,CAAC;AACxB,OAAO,EAAE,KAAK,EAAE,MAAM,8BAA8B,CAAC;AACrD,OAAO,EAAE,OAAO,EAAE,MAAM,yCAAyC,CAAC;AAClE,OAAO,kBAAkB,CAAC;AAC1B,OAAO,EAAE,mBAAmB,EAAE,MAAM,oCAAoC,CAAC;AAEzE,OAAO,EAAE,eAAe,EAAE,MAAM,oBAAoB,CAAC;AAIrD,8CAA8C;AAC9C,MAAM,CAAC,IAAM,wBAAwB,GAAG,0BAA0B,CAAC;AACnE,qBAAqB;AACrB,MAAM,CAAC,IAAM,wBAAwB,GAAG,MAAM,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AAC;CAAA,AAtED,CAAoC,mBAAmB,GAsEtD;SAtEY,cAAc;AAwE3B,WAAiB,cAAc;IAE7B,SAAgB,2BAA2B,CAAC,MAAW;QACrD,OAAO,IAAI,CAAC,gBAAgB,CAAC,MAA4B,CAAC,CAAC,QAAQ,CAAC,cAAc,CAAC,CAAC;IACtF,CAAC;IAFe,0CAA2B,8BAE1C,CAAA;IAED,SAAgB,kBAAkB,CAAC,KAAoC;QACrE,OAAO,KAAK,CAAC,GAAG,CAAC,KAAK,CAAC,CAAC,eAAe,CAAC,wBAAwB,CAA+B,CAAC;IAClG,CAAC;IAFe,iCAAkB,qBAEjC,CAAA;IAED,SAAgB,aAAa,CAAC,KAAoC;QAChE,OAAO,OAAO,CAAC,WAAW,CAAC,wBAAwB,EAAE,KAAK,CAAC,CAAC;IAC9D,CAAC;IAFe,4BAAa,gBAE5B,CAAA;IAED,SAAgB,gBAAgB,CAAC,KAAoC,EAAE,UAA2B;QAChG,OAAO,CAAC,cAAc,CAAC,wBAAwB,EAAE,UAAU,EAAE,KAAK,CAAC,CAAC;IACtE,CAAC;IAFe,+BAAgB,mBAE/B,CAAA;AAEH,CAAC,EAlBgB,cAAc,KAAd,cAAc,QAkB9B","sourcesContent":["import { Directive } from '@angular/core';\nimport {\n assert,\n Binding,\n Constructable,\n DebugContext,\n Dsl,\n Guard,\n IMutableHasValue,\n lang,\n MutableValueModel\n} from '@coolon/pectin';\nimport { Klass } from '@coolon/typescript-utilities';\nimport { Memoize } from '@typescript-plus/fast-memoize-decorator';\nimport 'reflect-metadata';\nimport { DisposableComponent } from '../components/disposable-component';\nimport { InteractionContext } from '../interaction/interaction-context';\nimport { PlaceDefinition } from './place-definition';\nimport { ParameterDefinition } from './route/parameter-definition.class';\nimport { Visit } from './visit';\n\n// RAKE: making this Symbol(...) broke things.\nexport const DEFINITION_META_DATA_KEY = 'PLACE_DEFINITION_OPTIONS';\n// this one seems ok.\nexport const ROUTE_PARAMETER_LIST_KEY = Symbol('place:route:parameters');\n\n@Directive()\nexport class PlaceComponent extends DisposableComponent {\n\n private visitModel = new MutableValueModel<Visit>();\n private _inVisitUpdate = new Guard();\n\n interactionContext?: InteractionContext;\n\n canDeactivate?(interactionContext: InteractionContext): boolean | Promise<boolean>;\n\n constructor() {\n super();\n }\n\n // @Trace()\n public initialiseVisit(visit: Visit, notifyVisitChanged: (current: Visit, previous:Visit) => void) {\n assert.isNil(this.visitModel.value);\n\n const { when } = Dsl.disposeWith(this);\n\n this.visitModel.value = visit;\n DebugContext.get(this.visitModel).tag(`${this.placeDefinition.component.name}.visitModel`);\n this.placeDefinition.getVisitParameterDefs().forEach(parameterDef => this.installBinding(parameterDef));\n when.valueOf(this.visitModel).changes((current,previous) => {\n notifyVisitChanged(current, previous);\n }, {unless: this._inVisitUpdate});\n }\n\n public updateVisit(visit: Visit) {\n assert.isTruthy(this.isInitialised());\n assert.notNil(visit);\n this._inVisitUpdate.whileTrue(() => {\n this.visitModel.value = visit;\n });\n }\n\n isInitialised() {\n return !!this.visitModel.value;\n }\n\n // @Trace()\n private installBinding<T, S>(parameterDef: ParameterDefinition<T, S>) {\n const model = this[parameterDef.propertyName] as IMutableHasValue<S>;\n DebugContext.tag(model, `${this.placeDefinition.component.name}.${parameterDef.propertyName}`);\n const binding = this.registerDisposable(new Binding(this.visitModel, model, {\n toRight(visit: Visit): S {\n const value = visit.getParameter(parameterDef.name);\n // console.log('push to component', { name: parameterDef.name, value, visit });\n return value;\n },\n toLeft(value: S, currentVisit?: Visit): Visit {\n // console.log('push to route', { name: parameterDef.name, value, currentVisit });\n return currentVisit.replace(parameterDef, value);\n }\n }));\n\n binding.writeRight();\n }\n\n @Memoize()\n get placeDefinition(): PlaceDefinition {\n return PlaceComponent.getDefinition(this.constructor as any as Constructable<PlaceComponent>);\n }\n\n get childPlaces(): Constructable<PlaceComponent>[] {\n return this.placeDefinition.children.map(d => d.component);\n }\n\n onPlaceReady() {\n }\n\n}\n\nexport namespace PlaceComponent {\n\n export function isPlaceComponentConstructor(target: any): target is Constructable<PlaceComponent> {\n return lang.constructorChain(target as Constructable<any>).includes(PlaceComponent);\n }\n\n export function getRouteParameters(klass: Constructable<PlaceComponent>): ParameterDefinition<any>[] {\n return Klass.get(klass).getMetadataList(ROUTE_PARAMETER_LIST_KEY) as ParameterDefinition<any>[];\n }\n\n export function getDefinition(klass: Constructable<PlaceComponent>): PlaceDefinition {\n return Reflect.getMetadata(DEFINITION_META_DATA_KEY, klass);\n }\n\n export function injectDefinition(klass: Constructable<PlaceComponent>, definition: PlaceDefinition) {\n Reflect.defineMetadata(DEFINITION_META_DATA_KEY, definition, klass);\n }\n\n}\n"]}
1
+ {"version":3,"file":"place-component.js","sourceRoot":"ng://@coolon/angular-ui-powerups/","sources":["lib/place/place-component.ts"],"names":[],"mappings":";AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,eAAe,CAAC;AAC1C,OAAO,EACL,MAAM,EACN,OAAO,EAEP,YAAY,EACZ,GAAG,EACH,KAAK,EAEL,IAAI,EACJ,iBAAiB,EAClB,MAAM,gBAAgB,CAAC;AACxB,OAAO,EAAE,KAAK,EAAE,MAAM,8BAA8B,CAAC;AACrD,OAAO,EAAE,OAAO,EAAE,MAAM,yCAAyC,CAAC;AAClE,OAAO,kBAAkB,CAAC;AAC1B,OAAO,EAAE,mBAAmB,EAAE,MAAM,oCAAoC,CAAC;AAEzE,OAAO,EAAE,eAAe,EAAE,MAAM,oBAAoB,CAAC;AAIrD,8CAA8C;AAC9C,MAAM,CAAC,IAAM,wBAAwB,GAAG,0BAA0B,CAAC;AACnE,qBAAqB;AACrB,MAAM,CAAC,IAAM,wBAAwB,GAAG,MAAM,CAAC,wBAAwB,CAAC,CAAC;AAGzE;IAAoC,kCAAmB;IAUrD;QAAA,YACE,iBAAO,SAGR;QAZO,gBAAU,GAAG,IAAI,iBAAiB,EAAS,CAAC;QAC5C,oBAAc,GAAG,IAAI,KAAK,EAAE,CAAC;QAC7B,aAAO,GAAG,IAAI,iBAAiB,CAA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IAAI,CAAC,OAAO,CAAC,QAAQ,CAAC;QAC/B,CAAC;;;OAAA;IAED;;OAEG;IACH,sCAAa,GAAb,UAAc,MAAe;QAC3B,IAAI,CAAC,OAAO,CAAC,KAAK,GAAG,MAAM,CAAC;IAC9B,CAAC;IAED,qCAAY,GAAZ;IACA,CAAC;;IApBD;QADC,OAAO,EAAE;kCACa,eAAe;;yDAErC;IAhEU,cAAc;QAD1B,SAAS,EAAE;;OACC,cAAc,CAoF1B;IAAD,qBAAC;CAAA,AApFD,CAAoC,mBAAmB,GAoFtD;SApFY,cAAc;AAsF3B,WAAiB,cAAc;IAE7B,SAAgB,2BAA2B,CAAC,MAAW;QACrD,OAAO,IAAI,CAAC,gBAAgB,CAAC,MAA4B,CAAC,CAAC,QAAQ,CAAC,cAAc,CAAC,CAAC;IACtF,CAAC;IAFe,0CAA2B,8BAE1C,CAAA;IAED,SAAgB,kBAAkB,CAAC,KAAoC;QACrE,OAAO,KAAK,CAAC,GAAG,CAAC,KAAK,CAAC,CAAC,eAAe,CAAC,wBAAwB,CAA+B,CAAC;IAClG,CAAC;IAFe,iCAAkB,qBAEjC,CAAA;IAED,SAAgB,aAAa,CAAC,KAAoC;QAChE,OAAO,OAAO,CAAC,WAAW,CAAC,wBAAwB,EAAE,KAAK,CAAC,CAAC;IAC9D,CAAC;IAFe,4BAAa,gBAE5B,CAAA;IAED,SAAgB,gBAAgB,CAAC,KAAoC,EAAE,UAA2B;QAChG,OAAO,CAAC,cAAc,CAAC,wBAAwB,EAAE,UAAU,EAAE,KAAK,CAAC,CAAC;IACtE,CAAC;IAFe,+BAAgB,mBAE/B,CAAA;AAEH,CAAC,EAlBgB,cAAc,KAAd,cAAc,QAkB9B","sourcesContent":["import { Directive } from '@angular/core';\nimport {\n assert,\n Binding,\n Constructable,\n DebugContext,\n Dsl,\n Guard,\n IMutableHasValue,\n lang,\n MutableValueModel\n} from '@coolon/pectin';\nimport { Klass } from '@coolon/typescript-utilities';\nimport { Memoize } from '@typescript-plus/fast-memoize-decorator';\nimport 'reflect-metadata';\nimport { DisposableComponent } from '../components/disposable-component';\nimport { InteractionContext } from '../interaction/interaction-context';\nimport { PlaceDefinition } from './place-definition';\nimport { ParameterDefinition } from './route/parameter-definition.class';\nimport { Visit } from './visit';\n\n// RAKE: making this Symbol(...) broke things.\nexport const DEFINITION_META_DATA_KEY = 'PLACE_DEFINITION_OPTIONS';\n// this one seems ok.\nexport const ROUTE_PARAMETER_LIST_KEY = Symbol('place:route:parameters');\n\n@Directive()\nexport class PlaceComponent extends DisposableComponent {\n\n private visitModel = new MutableValueModel<Visit>();\n private _inVisitUpdate = new Guard();\n private _active = new MutableValueModel<boolean>(false);\n\n interactionContext?: InteractionContext;\n\n canDeactivate?(interactionContext: InteractionContext): boolean | Promise<boolean>;\n\n constructor() {\n super();\n const { chain, valueOf, before, when, after, observe, switchOn } = Dsl.disposeWith(this);\n when(this._active).becomesTruthy(() => this.onPlaceReady());\n }\n\n // @Trace()\n public initialiseVisit(visit: Visit, notifyVisitChanged: (current: Visit, previous:Visit) => void) {\n assert.isNil(this.visitModel.value);\n\n const { when } = Dsl.disposeWith(this);\n\n this.visitModel.value = visit;\n DebugContext.getOrCreate(this.visitModel).tag(`${this.placeDefinition.component.name}.visitModel`);\n this.placeDefinition.getVisitParameterDefs().forEach(parameterDef => this.installBinding(parameterDef));\n when.valueOf(this.visitModel).changes((current,previous) => {\n notifyVisitChanged(current, previous);\n }, {unless: this._inVisitUpdate});\n }\n\n public updateVisit(visit: Visit) {\n assert.isTruthy(this.isInitialised());\n assert.notNil(visit);\n this._inVisitUpdate.whileTrue(() => {\n this.visitModel.value = visit;\n });\n }\n\n isInitialised() {\n return !!this.visitModel.value;\n }\n\n // @Trace()\n private installBinding<T, S>(parameterDef: ParameterDefinition<T, S>) {\n const model = this[parameterDef.propertyName] as IMutableHasValue<S>;\n DebugContext.tag(model, `${this.placeDefinition.component.name}.${parameterDef.propertyName}`);\n const binding = this.registerDisposable(new Binding(this.visitModel, model, {\n toRight(visit: Visit): S {\n const value = visit.getParameter(parameterDef.name);\n // console.log('push to component', { name: parameterDef.name, value, visit });\n return value;\n },\n toLeft(value: S, currentVisit?: Visit): Visit {\n // console.log('push to route', { name: parameterDef.name, value, currentVisit });\n return currentVisit.replace(parameterDef, value);\n }\n }));\n\n binding.writeRight();\n }\n\n @Memoize()\n get placeDefinition(): PlaceDefinition {\n return PlaceComponent.getDefinition(this.constructor as any as Constructable<PlaceComponent>);\n }\n\n get childPlaces(): Constructable<PlaceComponent>[] {\n return this.placeDefinition.children.map(d => d.component);\n }\n\n get active() {\n return this._active.readonly;\n }\n\n /**\n * Called by the router when the place is ready to interact after any animations have run.\n */\n _notifyActive(active: boolean) {\n this._active.value = active;\n }\n\n onPlaceReady() {\n }\n\n}\n\nexport namespace PlaceComponent {\n\n export function isPlaceComponentConstructor(target: any): target is Constructable<PlaceComponent> {\n return lang.constructorChain(target as Constructable<any>).includes(PlaceComponent);\n }\n\n export function getRouteParameters(klass: Constructable<PlaceComponent>): ParameterDefinition<any>[] {\n return Klass.get(klass).getMetadataList(ROUTE_PARAMETER_LIST_KEY) as ParameterDefinition<any>[];\n }\n\n export function getDefinition(klass: Constructable<PlaceComponent>): PlaceDefinition {\n return Reflect.getMetadata(DEFINITION_META_DATA_KEY, klass);\n }\n\n export function injectDefinition(klass: Constructable<PlaceComponent>, definition: PlaceDefinition) {\n Reflect.defineMetadata(DEFINITION_META_DATA_KEY, definition, klass);\n }\n\n}\n"]}
@@ -2,7 +2,7 @@ import { __awaiter, __decorate, __extends, __generator, __metadata, __read, __sp
2
2
  import { Location } from '@angular/common';
3
3
  import { Injectable } from '@angular/core';
4
4
  import { ActivatedRoute, NavigationCancel, NavigationEnd, NavigationError, NavigationExtras, NavigationStart, Router } from '@angular/router';
5
- import { assert, DebugContext, Dsl, GarbageCollector, lang, Logger, MutableListModel, MutableValueModel, Trace } from '@coolon/pectin';
5
+ import { assert, DebugContext, Dsl, GarbageCollector, lang, Logger, MutableListModel, MutableValueModel } from '@coolon/pectin';
6
6
  import { InteractionService } from '../interaction/services/interaction.service';
7
7
  import { NavigatingDuringInteraction } from './navigation/session/interactions/navigating-during-interaction';
8
8
  import { PopStateDuringInteractionNavigation } from './navigation/session/interactions/pop-state-during-interaction-navigation';
@@ -12,7 +12,6 @@ import { NavigationContext } from './navigation/session/navigation-context';
12
12
  import { PopStateNavigation } from './navigation/session/pop-state-navigation';
13
13
  import { PlaceHistory } from './place-history';
14
14
  import { UrlService } from './url-service';
15
- import { Visit } from './visit';
16
15
  import * as i0 from "@angular/core";
17
16
  import * as i1 from "@angular/router";
18
17
  import * as i2 from "@angular/common";
@@ -214,6 +213,7 @@ var PlaceRouter = /** @class */ (function (_super) {
214
213
  enumerable: true,
215
214
  configurable: true
216
215
  });
216
+ // @Trace()
217
217
  PlaceRouter.prototype.pushVisitChangesToRoute = function (previous, next) {
218
218
  return __awaiter(this, void 0, void 0, function () {
219
219
  var _this = this;
@@ -314,12 +314,6 @@ var PlaceRouter = /** @class */ (function (_super) {
314
314
  { type: PlaceHistory }
315
315
  ]; };
316
316
  PlaceRouter.ɵprov = i0.ɵɵdefineInjectable({ factory: function PlaceRouter_Factory() { return new PlaceRouter(i0.ɵɵinject(i1.Router), i0.ɵɵinject(i2.Location), i0.ɵɵinject(i3.InteractionService), i0.ɵɵinject(i4.UrlService), i0.ɵɵinject(i5.PlaceHistory)); }, token: PlaceRouter, providedIn: "root" });
317
- __decorate([
318
- Trace(),
319
- __metadata("design:type", Function),
320
- __metadata("design:paramtypes", [Visit, Visit]),
321
- __metadata("design:returntype", Promise)
322
- ], PlaceRouter.prototype, "pushVisitChangesToRoute", null);
323
317
  PlaceRouter = __decorate([
324
318
  Injectable({
325
319
  providedIn: 'root'
@@ -1 +1 @@
1
- {"version":3,"file":"place-router.js","sourceRoot":"ng://@coolon/angular-ui-powerups/","sources":["lib/place/place-router.ts"],"names":[],"mappings":";AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,iBAAiB,C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;gBAC7C,IAAM,OAAO,GAAG,IAAI,yCAAyC,CAAC,KAAI,CAAC,iBAAiB,EAAE,KAAI,CAAC,UAAU,CAAC,mBAAmB,EAAE,EAAE,KAAK,CAAC,CAAC;gBACpI,KAAI,CAAC,YAAY,CAAC,OAAO,CAAC,CAAC;YAC7B,CAAC,CAAC,CAAC,CAAC;SAEL;IACH,CAAC;IAGO,2CAAqB,GAA7B,UAA8B,KAAY;QACxC,IAAM,GAAG,GAAG,KAAK,CAAC,eAAe,CAAC;QAClC,OAAO,KAAK,CAAC,UAAU,EAAE,CAAC,CAAC;YACzB,CAAC,GAAG,CAAC,mBAAmB,CAAC,KAAK,CAAC,EAAE,GAAG,CAAC,2BAA2B,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC;YAC1E,CAAC,GAAG,CAAC,2BAA2B,CAAC,KAAK,CAAC,CAAC,CAAC;IAC7C,CAAC;;gBA9Q2C,MAAM;gBACJ,QAAQ;gBACL,kBAAkB;gBAC1B,UAAU;gBACR,YAAY;;;IA4KvD;QADC,KAAK,EAAE;;yCACgC,KAAK,EAAQ,KAAK;;8DAWzD;IAxMU,WAAW;QAHvB,UAAU,CAAC;YACV,UAAU,EAAE,MAAM;SACnB,CAAC;yCAc4C,MAAM;YACJ,QAAQ;YACL,kBAAkB;YAC1B,UAAU;YACR,YAAY;OAjB5C,WAAW,CA6RvB;sBAvUD;CAuUC,AA7RD,CAAiC,gBAAgB,GA6RhD;SA7RY,WAAW","sourcesContent":["import { Location } from '@angular/common';\nimport { Injectable } from '@angular/core';\nimport {\n ActivatedRoute,\n NavigationCancel,\n NavigationEnd,\n NavigationError,\n NavigationExtras,\n NavigationStart,\n Router\n} from '@angular/router';\nimport {\n assert,\n DebugContext,\n Dsl,\n GarbageCollector,\n lang,\n ListModel,\n Logger, MapModelChain,\n MutableListModel,\n MutableValueModel,\n Trace,\n ValueModelChain\n} from '@coolon/pectin';\nimport { InteractionServiceRoutingAdapter } from '../interaction/services/interaction-service-routing-adapter';\nimport { InteractionService } from '../interaction/services/interaction.service';\nimport { NavigatingDuringInteraction } from './navigation/session/interactions/navigating-during-interaction';\nimport { PopStateDuringInteractionNavigation } from './navigation/session/interactions/pop-state-during-interaction-navigation';\nimport { SynchroniseInteractionContextIdsWithRoute } from './navigation/session/interactions/synchronise-interaction-context-ids-with-route';\nimport { Navigating } from './navigation/session/navigating';\nimport { NavigationContext } from './navigation/session/navigation-context';\nimport { NavigationSession } from './navigation/session/navigation-session';\nimport { PopStateNavigation } from './navigation/session/pop-state-navigation';\nimport { PlaceDefinition } from './place-definition';\nimport { PlaceHistory } from './place-history';\nimport { UrlService } from './url-service';\nimport { UrlSnapshot } from './url-snapshot';\nimport { Visit } from './visit';\n\n@Injectable({\n providedIn: 'root'\n})\nexport class PlaceRouter extends GarbageCollector {\n\n readonly navigationSessionModel = new MutableValueModel<NavigationSession>();\n readonly navigationInProgress: ValueModelChain<boolean>;\n readonly navigationSessionName: ValueModelChain<string>; // used by tests\n\n private readonly navigationContext: NavigationContext.Impl;\n\n private readonly _activeVisits = new MutableListModel<Visit>();\n readonly activeVisitsByPlaceDefinition: MapModelChain<PlaceDefinition, Visit>;\n private routerInteractionAdapter: InteractionServiceRoutingAdapter;\n private sessionFinishedJobs: (() => void)[] = [];\n\n constructor(private readonly angularRouter: Router,\n private readonly angularLocation: Location,\n private readonly interactionService: InteractionService,\n private readonly urlService: UrlService,\n private readonly placeHistory: PlaceHistory) {\n super();\n\n this.routerInteractionAdapter = interactionService.registerPlaceRouter(this);\n\n // TODO: Make this an interface and use 'this' instead.\n this.navigationContext = new NavigationContext.Impl(\n this.urlService,\n this.routerInteractionAdapter,\n (urlSnapshot: UrlSnapshot, options: { replaceUrl: boolean }) => {\n return this.navigateByUrl(urlSnapshot, options);\n },\n state => {\n this.transitionTo(state);\n },\n visits => {\n this.routingSessionFinished(visits);\n });\n\n const { chain, valueOf, before, when, after, observe, switchOn } = Dsl.disposeWith(this);\n this.navigationInProgress = chain(this.navigationSessionModel).isNotNil();\n\n const idleStateName = chain(this.interactionService.active).map(active => active ? 'IdleDuringInteraction' : 'Idle');\n this.navigationSessionName = chain(this.navigationSessionModel)\n .pluck('name')\n .otherwise(idleStateName);\n\n DebugContext.tag(this._activeVisits, 'PlaceRouter.activeVisits');\n this.activeVisitsByPlaceDefinition = chain(this._activeVisits).indexBy('placeDefinition');\n\n // TODO: make setup the callbacks in during module initiation to make this testable.\n angularRouter.events.subscribe(event => {\n // Routing event sequence\n // ======================\n // NavigationStart -> .... -> NavigationCancel --> redirect, go around again in the same session\n // NavigationStart -> .... -> NavigationEnd --> navigation complete, end session.\n // NavigationStart -> .... -> NavigationError --> navigation aborted, end session.\n // =======================\n if (event instanceof NavigationStart) {\n // console.log(`---> NavigationStart[${event.id}]: ${event.url} (${event.navigationTrigger})`);\n if (event.navigationTrigger === 'popstate') {\n this.onPopState(event);\n } else {\n this.onRouterStarted(event);\n }\n // console.log(`<--- NavigationStart[${event.id}]: ${event.url} (${event.navigationTrigger})`);\n }\n if (event instanceof NavigationEnd) {\n // console.log(`---> NavigationEnd[${event.id}]: ${event.url}`);\n this.onRouterEnd(event);\n // console.log(`<--- NavigationEnd[${event.id}]: ${event.url}`);\n }\n if (event instanceof NavigationError) {\n // console.log(`---> NavigationError[${event.id}]: ${event.url}`);\n this.onRouterError(event);\n // console.log(`<--- NavigationError[${event.id}]: ${event.url}`);\n }\n if (event instanceof NavigationCancel) {\n // console.log(`---> NavigationCancel[${event.id}]: ${event.url}`);\n this.onRouterCancelled(event);\n // console.log(`<--- NavigationCancel[${event.id}]: ${event.url}`);\n }\n });\n\n // The router needs to know about url changes and in some cases they are the only way the router can know if\n // the back button was clicked.\n angularLocation.onUrlChange(url => this.onUrlChanged(url));\n\n }\n\n get navigationSession() {\n return this.navigationSessionModel.value;\n }\n\n get currentSession() {\n return this.navigationSessionModel.value;\n }\n\n // @Trace()\n onPopState(event: NavigationStart) {\n assert.isTruthy(event.navigationTrigger === 'popstate');\n if (this.currentSession) {\n this.currentSession.onPopState(event);\n } else {\n const poppedHistoryUrl = event.url;\n const currentRouterUrl = this.urlService.getCurrentRouterUrl();\n const session = this.interactionService.isActive() ?\n new PopStateDuringInteractionNavigation(this.navigationContext, currentRouterUrl, poppedHistoryUrl) :\n new PopStateNavigation(this.navigationContext, currentRouterUrl, poppedHistoryUrl);\n this.transitionTo(session);\n }\n }\n\n // @Trace()\n onRouterStarted(event: NavigationStart) {\n assert.isFalsey(event.navigationTrigger === 'popstate');\n const inInteraction = this.interactionService.isActive();\n if (this.currentSession) {\n this.currentSession.onRouterStarted(event);\n } else {\n this.transitionTo(this.createNavigationSession(this.urlService.getCurrentRouterUrl()));\n }\n }\n\n // @Trace()\n onUrlChanged(newUrl: string) {\n // the back button can trigger a url change without a navigation session in progress so we\n // console.log(`---> Url Changed ${newUrl}`);\n if (this.currentSession) {\n this.currentSession.onUrlChange(newUrl);\n } else {\n console.log('FYI: url changed without a navigation session in progress');\n }\n // console.log(`<--- Url Changed`);\n }\n\n // @Trace()\n onRouterCancelled(event: NavigationCancel) {\n this.currentSession.onRouterCancelled(event);\n }\n\n // @Trace()\n onRouterError(event: NavigationError) {\n this.currentSession.onRouterError(event);\n }\n\n // @Trace()\n onRouterEnd(event: NavigationEnd) {\n this.currentSession.onRouterEnd(event);\n }\n\n navigate(visit: Visit, options?: { relativeTo: ActivatedRoute }) {\n return this.doNavigation(visit, async router => {\n const commands = [\n visit.placeDefinition.path,\n ...this.createRouteParameters(visit)\n ];\n await this.angularRouter.navigate(commands, {\n relativeTo: options ? options.relativeTo : null\n });\n });\n }\n\n // @Trace()\n async doNavigation(visit: Visit, runNavigationCommands: (router: Router) => any) {\n if (this.navigationInProgress.value) {\n lang.illegalState('Navigation already in progress');\n }\n const navigation = this.createNavigationSession(this.urlService.getCurrentRouterUrl());\n navigation.storeVisit(visit);\n this.transitionTo(navigation);\n try {\n await runNavigationCommands(this.angularRouter);\n } finally {\n // Check if the router has finished (in the case where no router change required) and we're still in a\n // transient state and finish of the transition.\n if (!this.angularRouter.getCurrentNavigation() && this.currentSession) {\n this.currentSession.onRouterEnd(new NavigationEnd(-1, '', ''));\n }\n }\n }\n\n navigateByUrl(urlSnapshot: UrlSnapshot, navigationExtras?: NavigationExtras) {\n // console.log(`### navigationByUrl -> ${urlSnapshot.urlTree.toString()}`);\n return this.angularRouter.navigateByUrl(urlSnapshot.urlTree, navigationExtras);\n }\n\n get activeVisits(): ListModel<Visit> {\n return this._activeVisits.readonly;\n }\n\n @Trace()\n async pushVisitChangesToRoute(previous: Visit, next: Visit): Promise<void> {\n this.placeHistory.updateVisit(next);\n\n // FIXME: no route id -> route id duplicates route parameters\n if (next.hasRoutingChangedFrom(previous)) {\n return this.doNavigation(next, router => {\n const urlSnapshot = this.urlService.parseUrl(this.angularRouter.routerState.snapshot.url).updateVisitSegments(next);\n // console.log('### Push Changes to route Redirect', { commands: urlSnapshot.url });\n return this.navigateByUrl(urlSnapshot);\n });\n }\n }\n\n\n private createNavigationSession(currentRouterUrl: string): NavigationSession {\n const inInteraction = this.interactionService.isActive();\n return inInteraction ?\n new NavigatingDuringInteraction(this.navigationContext, currentRouterUrl) :\n new Navigating(this.navigationContext, currentRouterUrl);\n }\n\n // @Trace()\n protected transitionTo(next: NavigationSession) {\n const previous = this.navigationSessionModel.value;\n if (!previous) {\n this.placeHistory.notifyNavigationStarted();\n }\n assert.isTruthy(next !== previous);\n Logger.get(this).info(`### Router State Transition: ${previous ? previous.toString() : 'null'} -> ${next.toString()}`);\n this.navigationSessionModel.value = next;\n if (!!previous) {\n previous.dispose();\n }\n next.notifyActive();\n }\n\n // @Trace()\n private routingSessionFinished(visits: Visit[]) {\n if (visits && visits.length > 0) {\n assert.isTruthy(this.navigationInProgress.value);\n this.placeHistory.notifyNavigationFinished(visits);\n // We update the active visits before we finish the session so the\n // place outlets can ignore the incoming changes until things are\n // settled. TODO: can we removed the event'ness here and just do a push?\n this._activeVisits.value = visits;\n }\n const session = this.currentSession;\n session.dispose();\n this.navigationSessionModel.value = null;\n console.log(`### Router Session Finished (was ${session.toString()})`);\n this.sessionFinishedJobs.forEach(job => job());\n this.sessionFinishedJobs = [];\n }\n\n private runAfterRoutingSessionFinishes(func: () => void) {\n assert.isTruthy(this.navigationInProgress);\n this.sessionFinishedJobs.push(func);\n }\n\n\n /**\n * Sync's the current interaction state with the URL. We need to push something in the URL in order\n * to be able to capture the back button on the first page. If we don't then the back click will exit\n * the app directly and we don't get to ask.\n */\n // @Trace()\n syncInteractionContextIdsWithRouter(): Promise<unknown> {\n if (this.navigationSession) {\n // console.log(`Navigation active -> ${this.navigationSession.toString()}, sync delayed until finished.`);\n const session = this.navigationSession;\n return new Promise((resolve, reject) => {\n this.runAfterRoutingSessionFinishes(() => {\n this.runAfterRoutingSessionFinishes(resolve);\n const syncSession = new SynchroniseInteractionContextIdsWithRoute(this.navigationContext, this.urlService.getCurrentRouterUrl(), false);\n this.transitionTo(syncSession);\n });\n });\n } else {\n return new Promise<unknown>(((resolve, reject) => {\n // console.log(`No navigation in progress, starting synchronisation job`);\n this.runAfterRoutingSessionFinishes(resolve);\n const session = new SynchroniseInteractionContextIdsWithRoute(this.navigationContext, this.urlService.getCurrentRouterUrl(), false);\n this.transitionTo(session);\n }));\n\n }\n }\n\n\n private createRouteParameters(visit: Visit) {\n const def = visit.placeDefinition;\n return visit.hasRouteId() ?\n [def.getFormattedRouteId(visit), def.getFormattedRouteParameters(visit)] :\n [def.getFormattedRouteParameters(visit)];\n }\n\n}\n\nexport namespace NavigationStateMachine {\n export type VisitsUpdatedCallback = (visits: Visit[]) => void;\n}\n"]}
1
+ {"version":3,"file":"place-router.js","sourceRoot":"ng://@coolon/angular-ui-powerups/","sources":["lib/place/place-router.ts"],"names":[],"mappings":";AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,iBAAiB,CAAC;AAC3C,OAAO,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAC3C,OAAO,EACL,cAAc,EACd,gBAAgB,EAChB,aAAa,EACb,eAAe,EAC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,OAAO,CAAC,CAAC;YAC7B,CAAC,CAAC,CAAC,CAAC;SAEL;IACH,CAAC;IAGO,2CAAqB,GAA7B,UAA8B,KAAY;QACxC,IAAM,GAAG,GAAG,KAAK,CAAC,eAAe,CAAC;QAClC,OAAO,KAAK,CAAC,UAAU,EAAE,CAAC,CAAC;YACzB,CAAC,GAAG,CAAC,mBAAmB,CAAC,KAAK,CAAC,EAAE,GAAG,CAAC,2BAA2B,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC;YAC1E,CAAC,GAAG,CAAC,2BAA2B,CAAC,KAAK,CAAC,CAAC,CAAC;IAC7C,CAAC;;gBA9Q2C,MAAM;gBACJ,QAAQ;gBACL,kBAAkB;gBAC1B,UAAU;gBACR,YAAY;;;IAjB5C,WAAW;QAHvB,UAAU,CAAC;YACV,UAAU,EAAE,MAAM;SACnB,CAAC;yCAc4C,MAAM;YACJ,QAAQ;YACL,kBAAkB;YAC1B,UAAU;YACR,YAAY;OAjB5C,WAAW,CA6RvB;sBAvUD;CAuUC,AA7RD,CAAiC,gBAAgB,GA6RhD;SA7RY,WAAW","sourcesContent":["import { Location } from '@angular/common';\nimport { Injectable } from '@angular/core';\nimport {\n ActivatedRoute,\n NavigationCancel,\n NavigationEnd,\n NavigationError,\n NavigationExtras,\n NavigationStart,\n Router\n} from '@angular/router';\nimport {\n assert,\n DebugContext,\n Dsl,\n GarbageCollector,\n lang,\n ListModel,\n Logger, MapModelChain,\n MutableListModel,\n MutableValueModel,\n Trace,\n ValueModelChain\n} from '@coolon/pectin';\nimport { InteractionServiceRoutingAdapter } from '../interaction/services/interaction-service-routing-adapter';\nimport { InteractionService } from '../interaction/services/interaction.service';\nimport { NavigatingDuringInteraction } from './navigation/session/interactions/navigating-during-interaction';\nimport { PopStateDuringInteractionNavigation } from './navigation/session/interactions/pop-state-during-interaction-navigation';\nimport { SynchroniseInteractionContextIdsWithRoute } from './navigation/session/interactions/synchronise-interaction-context-ids-with-route';\nimport { Navigating } from './navigation/session/navigating';\nimport { NavigationContext } from './navigation/session/navigation-context';\nimport { NavigationSession } from './navigation/session/navigation-session';\nimport { PopStateNavigation } from './navigation/session/pop-state-navigation';\nimport { PlaceDefinition } from './place-definition';\nimport { PlaceHistory } from './place-history';\nimport { UrlService } from './url-service';\nimport { UrlSnapshot } from './url-snapshot';\nimport { Visit } from './visit';\n\n@Injectable({\n providedIn: 'root'\n})\nexport class PlaceRouter extends GarbageCollector {\n\n readonly navigationSessionModel = new MutableValueModel<NavigationSession>();\n readonly navigationInProgress: ValueModelChain<boolean>;\n readonly navigationSessionName: ValueModelChain<string>; // used by tests\n\n private readonly navigationContext: NavigationContext.Impl;\n\n private readonly _activeVisits = new MutableListModel<Visit>();\n readonly activeVisitsByPlaceDefinition: MapModelChain<PlaceDefinition, Visit>;\n private routerInteractionAdapter: InteractionServiceRoutingAdapter;\n private sessionFinishedJobs: (() => void)[] = [];\n\n constructor(private readonly angularRouter: Router,\n private readonly angularLocation: Location,\n private readonly interactionService: InteractionService,\n private readonly urlService: UrlService,\n private readonly placeHistory: PlaceHistory) {\n super();\n\n this.routerInteractionAdapter = interactionService.registerPlaceRouter(this);\n\n // TODO: Make this an interface and use 'this' instead.\n this.navigationContext = new NavigationContext.Impl(\n this.urlService,\n this.routerInteractionAdapter,\n (urlSnapshot: UrlSnapshot, options: { replaceUrl: boolean }) => {\n return this.navigateByUrl(urlSnapshot, options);\n },\n state => {\n this.transitionTo(state);\n },\n visits => {\n this.routingSessionFinished(visits);\n });\n\n const { chain, valueOf, before, when, after, observe, switchOn } = Dsl.disposeWith(this);\n this.navigationInProgress = chain(this.navigationSessionModel).isNotNil();\n\n const idleStateName = chain(this.interactionService.active).map(active => active ? 'IdleDuringInteraction' : 'Idle');\n this.navigationSessionName = chain(this.navigationSessionModel)\n .pluck('name')\n .otherwise(idleStateName);\n\n DebugContext.tag(this._activeVisits, 'PlaceRouter.activeVisits');\n this.activeVisitsByPlaceDefinition = chain(this._activeVisits).indexBy('placeDefinition');\n\n // TODO: make setup the callbacks in during module initiation to make this testable.\n angularRouter.events.subscribe(event => {\n // Routing event sequence\n // ======================\n // NavigationStart -> .... -> NavigationCancel --> redirect, go around again in the same session\n // NavigationStart -> .... -> NavigationEnd --> navigation complete, end session.\n // NavigationStart -> .... -> NavigationError --> navigation aborted, end session.\n // =======================\n if (event instanceof NavigationStart) {\n // console.log(`---> NavigationStart[${event.id}]: ${event.url} (${event.navigationTrigger})`);\n if (event.navigationTrigger === 'popstate') {\n this.onPopState(event);\n } else {\n this.onRouterStarted(event);\n }\n // console.log(`<--- NavigationStart[${event.id}]: ${event.url} (${event.navigationTrigger})`);\n }\n if (event instanceof NavigationEnd) {\n // console.log(`---> NavigationEnd[${event.id}]: ${event.url}`);\n this.onRouterEnd(event);\n // console.log(`<--- NavigationEnd[${event.id}]: ${event.url}`);\n }\n if (event instanceof NavigationError) {\n // console.log(`---> NavigationError[${event.id}]: ${event.url}`);\n this.onRouterError(event);\n // console.log(`<--- NavigationError[${event.id}]: ${event.url}`);\n }\n if (event instanceof NavigationCancel) {\n // console.log(`---> NavigationCancel[${event.id}]: ${event.url}`);\n this.onRouterCancelled(event);\n // console.log(`<--- NavigationCancel[${event.id}]: ${event.url}`);\n }\n });\n\n // The router needs to know about url changes and in some cases they are the only way the router can know if\n // the back button was clicked.\n angularLocation.onUrlChange(url => this.onUrlChanged(url));\n\n }\n\n get navigationSession() {\n return this.navigationSessionModel.value;\n }\n\n get currentSession() {\n return this.navigationSessionModel.value;\n }\n\n // @Trace()\n onPopState(event: NavigationStart) {\n assert.isTruthy(event.navigationTrigger === 'popstate');\n if (this.currentSession) {\n this.currentSession.onPopState(event);\n } else {\n const poppedHistoryUrl = event.url;\n const currentRouterUrl = this.urlService.getCurrentRouterUrl();\n const session = this.interactionService.isActive() ?\n new PopStateDuringInteractionNavigation(this.navigationContext, currentRouterUrl, poppedHistoryUrl) :\n new PopStateNavigation(this.navigationContext, currentRouterUrl, poppedHistoryUrl);\n this.transitionTo(session);\n }\n }\n\n // @Trace()\n onRouterStarted(event: NavigationStart) {\n assert.isFalsey(event.navigationTrigger === 'popstate');\n const inInteraction = this.interactionService.isActive();\n if (this.currentSession) {\n this.currentSession.onRouterStarted(event);\n } else {\n this.transitionTo(this.createNavigationSession(this.urlService.getCurrentRouterUrl()));\n }\n }\n\n // @Trace()\n onUrlChanged(newUrl: string) {\n // the back button can trigger a url change without a navigation session in progress so we\n // console.log(`---> Url Changed ${newUrl}`);\n if (this.currentSession) {\n this.currentSession.onUrlChange(newUrl);\n } else {\n console.log('FYI: url changed without a navigation session in progress');\n }\n // console.log(`<--- Url Changed`);\n }\n\n // @Trace()\n onRouterCancelled(event: NavigationCancel) {\n this.currentSession.onRouterCancelled(event);\n }\n\n // @Trace()\n onRouterError(event: NavigationError) {\n this.currentSession.onRouterError(event);\n }\n\n // @Trace()\n onRouterEnd(event: NavigationEnd) {\n this.currentSession.onRouterEnd(event);\n }\n\n navigate(visit: Visit, options?: { relativeTo: ActivatedRoute }) {\n return this.doNavigation(visit, async router => {\n const commands = [\n visit.placeDefinition.path,\n ...this.createRouteParameters(visit)\n ];\n await this.angularRouter.navigate(commands, {\n relativeTo: options ? options.relativeTo : null\n });\n });\n }\n\n // @Trace()\n async doNavigation(visit: Visit, runNavigationCommands: (router: Router) => any) {\n if (this.navigationInProgress.value) {\n lang.illegalState('Navigation already in progress');\n }\n const navigation = this.createNavigationSession(this.urlService.getCurrentRouterUrl());\n navigation.storeVisit(visit);\n this.transitionTo(navigation);\n try {\n await runNavigationCommands(this.angularRouter);\n } finally {\n // Check if the router has finished (in the case where no router change required) and we're still in a\n // transient state and finish of the transition.\n if (!this.angularRouter.getCurrentNavigation() && this.currentSession) {\n this.currentSession.onRouterEnd(new NavigationEnd(-1, '', ''));\n }\n }\n }\n\n navigateByUrl(urlSnapshot: UrlSnapshot, navigationExtras?: NavigationExtras) {\n // console.log(`### navigationByUrl -> ${urlSnapshot.urlTree.toString()}`);\n return this.angularRouter.navigateByUrl(urlSnapshot.urlTree, navigationExtras);\n }\n\n get activeVisits(): ListModel<Visit> {\n return this._activeVisits.readonly;\n }\n\n // @Trace()\n async pushVisitChangesToRoute(previous: Visit, next: Visit): Promise<void> {\n this.placeHistory.updateVisit(next);\n\n // FIXME: no route id -> route id duplicates route parameters\n if (next.hasRoutingChangedFrom(previous)) {\n return this.doNavigation(next, router => {\n const urlSnapshot = this.urlService.parseUrl(this.angularRouter.routerState.snapshot.url).updateVisitSegments(next);\n // console.log('### Push Changes to route Redirect', { commands: urlSnapshot.url });\n return this.navigateByUrl(urlSnapshot);\n });\n }\n }\n\n\n private createNavigationSession(currentRouterUrl: string): NavigationSession {\n const inInteraction = this.interactionService.isActive();\n return inInteraction ?\n new NavigatingDuringInteraction(this.navigationContext, currentRouterUrl) :\n new Navigating(this.navigationContext, currentRouterUrl);\n }\n\n // @Trace()\n protected transitionTo(next: NavigationSession) {\n const previous = this.navigationSessionModel.value;\n if (!previous) {\n this.placeHistory.notifyNavigationStarted();\n }\n assert.isTruthy(next !== previous);\n Logger.get(this).info(`### Router State Transition: ${previous ? previous.toString() : 'null'} -> ${next.toString()}`);\n this.navigationSessionModel.value = next;\n if (!!previous) {\n previous.dispose();\n }\n next.notifyActive();\n }\n\n // @Trace()\n private routingSessionFinished(visits: Visit[]) {\n if (visits && visits.length > 0) {\n assert.isTruthy(this.navigationInProgress.value);\n this.placeHistory.notifyNavigationFinished(visits);\n // We update the active visits before we finish the session so the\n // place outlets can ignore the incoming changes until things are\n // settled. TODO: can we removed the event'ness here and just do a push?\n this._activeVisits.value = visits;\n }\n const session = this.currentSession;\n session.dispose();\n this.navigationSessionModel.value = null;\n console.log(`### Router Session Finished (was ${session.toString()})`);\n this.sessionFinishedJobs.forEach(job => job());\n this.sessionFinishedJobs = [];\n }\n\n private runAfterRoutingSessionFinishes(func: () => void) {\n assert.isTruthy(this.navigationInProgress);\n this.sessionFinishedJobs.push(func);\n }\n\n\n /**\n * Sync's the current interaction state with the URL. We need to push something in the URL in order\n * to be able to capture the back button on the first page. If we don't then the back click will exit\n * the app directly and we don't get to ask.\n */\n // @Trace()\n syncInteractionContextIdsWithRouter(): Promise<unknown> {\n if (this.navigationSession) {\n // console.log(`Navigation active -> ${this.navigationSession.toString()}, sync delayed until finished.`);\n const session = this.navigationSession;\n return new Promise((resolve, reject) => {\n this.runAfterRoutingSessionFinishes(() => {\n this.runAfterRoutingSessionFinishes(resolve);\n const syncSession = new SynchroniseInteractionContextIdsWithRoute(this.navigationContext, this.urlService.getCurrentRouterUrl(), false);\n this.transitionTo(syncSession);\n });\n });\n } else {\n return new Promise<unknown>(((resolve, reject) => {\n // console.log(`No navigation in progress, starting synchronisation job`);\n this.runAfterRoutingSessionFinishes(resolve);\n const session = new SynchroniseInteractionContextIdsWithRoute(this.navigationContext, this.urlService.getCurrentRouterUrl(), false);\n this.transitionTo(session);\n }));\n\n }\n }\n\n\n private createRouteParameters(visit: Visit) {\n const def = visit.placeDefinition;\n return visit.hasRouteId() ?\n [def.getFormattedRouteId(visit), def.getFormattedRouteParameters(visit)] :\n [def.getFormattedRouteParameters(visit)];\n }\n\n}\n\nexport namespace NavigationStateMachine {\n export type VisitsUpdatedCallback = (visits: Visit[]) => void;\n}\n"]}
@@ -2,22 +2,22 @@ import { __decorate } from "tslib";
2
2
  import { CommonModule } from '@angular/common';
3
3
  import { NgModule } from '@angular/core';
4
4
  import { FlexModule } from '@angular/flex-layout';
5
- import { MatProgressSpinnerModule } from '@angular/material/progress-spinner';
6
5
  import { MatIconModule } from '@angular/material/icon';
7
6
  import { MatListModule } from '@angular/material/list';
7
+ import { MatProgressSpinnerModule } from '@angular/material/progress-spinner';
8
8
  import { MatTabsModule } from '@angular/material/tabs';
9
9
  import { MatTooltipModule } from '@angular/material/tooltip';
10
10
  import { BrowserAnimationsModule } from '@angular/platform-browser/animations';
11
11
  import { RouterModule } from '@angular/router';
12
+ import { ComponentsModule } from '../components';
12
13
  import { DirectivesModule } from '../directives/directives.module';
13
14
  import { AbstractPlaceNavigationComponent } from './components/abstract-place-navigation.component';
14
15
  import { BusyOverlayComponent } from './components/busy-overlay/busy-overlay.component';
15
16
  import { EmptyStateComponent } from './components/empty-state/empty-state.component';
16
17
  import { ListPlaceNavComponent } from './components/list-place-nav/list-place-nav.component';
17
18
  import { PlaceOutletComponent } from './components/place-outlet/place-outlet.component';
18
- import { TabbedPlaceNavigationComponent } from './components/tabbed-place-navigation/tabbed-place-navigation.component';
19
19
  import { SidePlaceNavigationComponent } from './components/side-place-navigation/side-place-navigation.component';
20
- import { ComponentsModule } from '../components';
20
+ import { TabbedPlaceNavigationComponent } from './components/tabbed-place-navigation/tabbed-place-navigation.component';
21
21
  var PlaceModule = /** @class */ (function () {
22
22
  function PlaceModule() {
23
23
  }
@@ -1 +1 @@
1
- {"version":3,"file":"place.module.js","sourceRoot":"ng://@coolon/angular-ui-powerups/","sources":["lib/place/place.module.ts"],"names":[],"mappings":";AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAC;AAC/C,OAAO,EAAE,QAAQ,EAAE,MAAM,eAAe,CAAC;AACzC,OAAO,EAAE,UAAU,EAAE,MAAM,sBAAsB,CAAC;AAClD,OAAO,EAAE,wBAAwB,EAAE,MAAM,oCAAoC,CAAC;AAC9E,OAAO,EAAE,aAAa,EAAE,MAAM,wBAAwB,CAAC;AACvD,OAAO,EAAE,aAAa,EAAE,MAAM,wBAAwB,CAAC;AACvD,OAAO,EAAE,aAAa,EAAE,MAAM,wBAAwB,CAAC;AACvD,OAAO,EAAE,gBAAgB,EAAE,MAAM,2BAA2B,CAAC;AAC7D,OAAO,EAAE,uBAAuB,EAAE,MAAM,sCAAsC,CAAC;AAC/E,OAAO,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAC;AAC/C,OAAO,EAAE,gBAAgB,EAAE,MAAM,iCAAiC,CAAC;AACnE,OAAO,EAAE,gCAAgC,EAAE,MAAM,kDAAkD,CAAC;AACpG,OAAO,EAAE,oBAAoB,EAAE,MAAM,kDAAkD,CAAC;AACxF,OAAO,EAAE,mBAAmB,EAAE,MAAM,gDAAgD,CAAC;AACrF,OAAO,EAAE,qBAAqB,EAAE,MAAM,sDAAsD,CAAC;AAC7F,OAAO,EAAE,oBAAoB,EAAE,MAAM,kDAAkD,CAAC;AACxF,OAAO,EAAE,8BAA8B,EAAE,MAAM,wEAAwE,CAAC;AACxH,OAAO,EAAE,4BAA4B,EAAE,MAAM,oEAAoE,CAAC;AAElH,OAAO,EAAE,gBAAgB,EAAE,MAAM,eAAe,CAAC;AAuCjD;IAAA;IAEA,CAAC;IAFY,WAAW;QArCvB,QAAQ,CAAC;YACR,OAAO,EAAE;gBACP,YAAY;gBACZ,uBAAuB;gBACvB,wBAAwB;gBACxB,YAAY;gBACZ,aAAa;gBACb,aAAa;gBACb,gBAAgB;gBAChB,aAAa;gBACb,gBAAgB;gBAChB,UAAU;gBACV,gBAAgB;aACjB;YACD,YAAY,EAAE;gBACZ,mBAAmB;gBACnB,oBAAoB;gBACpB,oBAAoB;gBACpB,8BAA8B;gBAC9B,qBAAqB;gBACrB,4BAA4B;gBAC5B,gCAAgC;aACjC;YACD,eAAe,EAAE,CAAC,oBAAoB,CAAC;YACvC,OAAO,EAAE;gBACP,oBAAoB;gBACpB,oBAAoB;gBACpB,mBAAmB;gBACnB,8BAA8B;gBAC9B,qBAAqB;gBACrB,4BAA4B;gBAC5B,gCAAgC;aACjC;YACD,SAAS,EAAE;YACT,uEAAuE;aACxE;SACF,CAAC;OACW,WAAW,CAEvB;IAAD,kBAAC;CAAA,AAFD,IAEC;SAFY,WAAW","sourcesContent":["import { CommonModule } from '@angular/common';\nimport { NgModule } from '@angular/core';\nimport { FlexModule } from '@angular/flex-layout';\nimport { MatProgressSpinnerModule } from '@angular/material/progress-spinner';\nimport { MatIconModule } from '@angular/material/icon';\nimport { MatListModule } from '@angular/material/list';\nimport { MatTabsModule } from '@angular/material/tabs';\nimport { MatTooltipModule } from '@angular/material/tooltip';\nimport { BrowserAnimationsModule } from '@angular/platform-browser/animations';\nimport { RouterModule } from '@angular/router';\nimport { DirectivesModule } from '../directives/directives.module';\nimport { AbstractPlaceNavigationComponent } from './components/abstract-place-navigation.component';\nimport { BusyOverlayComponent } from './components/busy-overlay/busy-overlay.component';\nimport { EmptyStateComponent } from './components/empty-state/empty-state.component';\nimport { ListPlaceNavComponent } from './components/list-place-nav/list-place-nav.component';\nimport { PlaceOutletComponent } from './components/place-outlet/place-outlet.component';\nimport { TabbedPlaceNavigationComponent } from './components/tabbed-place-navigation/tabbed-place-navigation.component';\nimport { SidePlaceNavigationComponent } from './components/side-place-navigation/side-place-navigation.component';\nimport { UrlService } from './url-service';\nimport { ComponentsModule } from '../components';\n\n@NgModule({\n imports: [\n CommonModule,\n BrowserAnimationsModule,\n MatProgressSpinnerModule,\n RouterModule,\n MatTabsModule,\n MatListModule,\n MatTooltipModule,\n MatIconModule,\n DirectivesModule,\n FlexModule,\n ComponentsModule\n ],\n declarations: [\n EmptyStateComponent,\n BusyOverlayComponent,\n PlaceOutletComponent,\n TabbedPlaceNavigationComponent,\n ListPlaceNavComponent,\n SidePlaceNavigationComponent,\n AbstractPlaceNavigationComponent\n ],\n entryComponents: [BusyOverlayComponent],\n exports: [\n BusyOverlayComponent,\n PlaceOutletComponent,\n EmptyStateComponent,\n TabbedPlaceNavigationComponent,\n ListPlaceNavComponent,\n SidePlaceNavigationComponent,\n AbstractPlaceNavigationComponent\n ],\n providers: [\n // {provide: AUP_PLACE_CONFIG, useValue: {animationDuration: \"2000ms\"}}\n ]\n})\nexport class PlaceModule {\n\n}\n"]}
1
+ {"version":3,"file":"place.module.js","sourceRoot":"ng://@coolon/angular-ui-powerups/","sources":["lib/place/place.module.ts"],"names":[],"mappings":";AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAC;AAC/C,OAAO,EAAE,QAAQ,EAAE,MAAM,eAAe,CAAC;AACzC,OAAO,EAAE,UAAU,EAAE,MAAM,sBAAsB,CAAC;AAClD,OAAO,EAAE,aA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OAAO,EAAE;gBACP,oBAAoB;gBACpB,oBAAoB;gBACpB,mBAAmB;gBACnB,8BAA8B;gBAC9B,qBAAqB;gBACrB,4BAA4B;gBAC5B,gCAAgC;aACjC;YACD,SAAS,EAAE;YACT,uEAAuE;aACxE;SACF,CAAC;OACW,WAAW,CAEvB;IAAD,kBAAC;CAAA,AAFD,IAEC;SAFY,WAAW","sourcesContent":["import { CommonModule } from '@angular/common';\nimport { NgModule } from '@angular/core';\nimport { FlexModule } from '@angular/flex-layout';\nimport { MatIconModule } from '@angular/material/icon';\nimport { MatListModule } from '@angular/material/list';\nimport { MatProgressSpinnerModule } from '@angular/material/progress-spinner';\nimport { MatTabsModule } from '@angular/material/tabs';\nimport { MatTooltipModule } from '@angular/material/tooltip';\nimport { BrowserAnimationsModule } from '@angular/platform-browser/animations';\nimport { RouterModule } from '@angular/router';\nimport { ComponentsModule } from '../components';\nimport { DirectivesModule } from '../directives/directives.module';\nimport { AbstractPlaceNavigationComponent } from './components/abstract-place-navigation.component';\nimport { BusyOverlayComponent } from './components/busy-overlay/busy-overlay.component';\nimport { EmptyStateComponent } from './components/empty-state/empty-state.component';\nimport { ListPlaceNavComponent } from './components/list-place-nav/list-place-nav.component';\nimport { PlaceOutletComponent } from './components/place-outlet/place-outlet.component';\nimport { SidePlaceNavigationComponent } from './components/side-place-navigation/side-place-navigation.component';\nimport { TabbedPlaceNavigationComponent } from './components/tabbed-place-navigation/tabbed-place-navigation.component';\n\n@NgModule({\n imports: [\n CommonModule,\n BrowserAnimationsModule,\n MatProgressSpinnerModule,\n RouterModule,\n MatTabsModule,\n MatListModule,\n MatTooltipModule,\n MatIconModule,\n DirectivesModule,\n FlexModule,\n ComponentsModule\n ],\n declarations: [\n EmptyStateComponent,\n BusyOverlayComponent,\n PlaceOutletComponent,\n TabbedPlaceNavigationComponent,\n ListPlaceNavComponent,\n SidePlaceNavigationComponent,\n AbstractPlaceNavigationComponent\n ],\n entryComponents: [BusyOverlayComponent],\n exports: [\n BusyOverlayComponent,\n PlaceOutletComponent,\n EmptyStateComponent,\n TabbedPlaceNavigationComponent,\n ListPlaceNavComponent,\n SidePlaceNavigationComponent,\n AbstractPlaceNavigationComponent\n ],\n providers: [\n // {provide: AUP_PLACE_CONFIG, useValue: {animationDuration: \"2000ms\"}}\n ]\n})\nexport class PlaceModule {\n\n}\n"]}